WinCvs Source: Main Page

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WinCvs Source Documentation

1.3 Beta 20 Build 1

Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: File Index

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WinCvs Source File List

Here is a list of all files with brief descriptions:
common/AboutDlg.cpp [code]
common/AboutDlg.h [code]
common/AdminOptionDlg.cpp [code]
common/AdminOptionDlg.h [code]
common/AnnotateDlg.cpp [code]
common/AnnotateDlg.h [code]
common/AppConsole.cpp [code]
common/AppConsole.h [code]
common/AppGlue.cpp [code]
common/AppGlue.h [code]
common/AppGlue.mac.cpp [code]
common/AppGlue.mac.h [code]
common/AskYesNo.cpp [code]
common/AskYesNo.h [code]
common/Authen.cpp [code]
common/Authen.h [code]
common/BrowseViewColumn.cpp [code]
common/BrowseViewColumn.h [code]
common/BrowseViewHandlers.cpp [code]
common/BrowseViewHandlers.h [code]
common/BrowseViewModel.cpp [code]
common/BrowseViewModel.h [code]
common/CheckoutDlg.cpp [code]
common/CheckoutDlg.h [code]
common/CommitDlg.cpp [code]
common/CommitDlg.h [code]
common/CPStr.cpp [code]
common/CPStr.h [code]
common/CTCP2Parse.cpp [code]
common/CTCP2Parse.hpp [code]
common/CvsAlert.cpp [code]
common/CvsAlert.h [code]
common/CvsArgs.cpp [code]
common/CvsArgs.h [code]
common/CvsCommands.cpp [code]
common/CvsCommands.h [code]
common/CvsEntries.cpp [code]
common/CvsEntries.h [code]
common/cvsgui_i18n.h [code]
common/CvsIgnore.cpp [code]
common/CvsIgnore.h [code]
common/CvsPrefs.cpp [code]
common/CvsPrefs.h [code]
common/CvsRootDlg.cpp [code]
common/CvsRootDlg.h [code]
common/CvsSandboxInfo.cpp [code]
common/CvsSandboxInfo.h [code]
common/DiffDlg.cpp [code]
common/DiffDlg.h [code]
common/dll_garbage.c [code]
common/dll_garbage.h [code]
common/dll_glue.c [code]
common/dll_glue.h [code]
common/dll_loader.c [code]
common/dll_loader.h [code]
common/dll_process.h [code]
common/EditorMonDlg.cpp [code]
common/EditorMonDlg.h [code]
common/FileActionDlg.cpp [code]
common/FileActionDlg.h [code]
common/FileTraversal.cpp [code]
common/FileTraversal.h [code]
common/FilterMaskOptDlg.cpp [code]
common/FilterMaskOptDlg.h [code]
common/FilterSelectionDlg.cpp [code]
common/FilterSelectionDlg.h [code]
common/fnmatch.c [code]
common/fnmatch.h [code]
common/getline.c [code]
common/getline.h [code]
common/getopt.c [code]
common/getopt.h [code]
common/getopt1.c [code]
common/GetPassword.cpp [code]
common/GetPassword.h [code]
common/GetPrefs.cpp [code]
common/GetPrefs.h [code]
common/GraphOptDlg.cpp [code]
common/GraphOptDlg.h [code]
common/ImportDlg.cpp [code]
common/ImportDlg.h [code]
common/ImportFilter.cpp [code]
common/ImportFilter.h [code]
common/ImportFilterDlg.cpp [code]
common/ImportFilterDlg.h [code]
common/InitDlg.cpp [code]
common/InitDlg.h [code]
common/ItemListDlg.cpp [code]
common/ItemListDlg.h [code]
common/KeywordComboBox.cpp [code]
common/KeywordComboBox.h [code]
common/LaunchHandlers.cpp [code]
common/LaunchHandlers.h [code]
common/LineCmd.cpp [code]
common/LineCmd.h [code]
common/LogDlg.cpp [code]
common/LogDlg.h [code]
common/LoginDlg.cpp [code]
common/LoginDlg.h [code]
common/LogParse.cpp [code]
common/LogParse.h [code]
common/MacBinEncoding.cpp [code]
common/MacBinEncoding.h [code]
common/MacBinMaps.cpp [code]
common/MacBinMaps.h [code]
common/MacMisc.cpp [code]
common/MacMisc.h [code]
common/MacrosSetup.cpp [code]
common/MacrosSetup.h [code]
common/MakeSurePathExists.cpp [code]
common/MakeSurePathExists.h [code]
common/MoveToTrash.cpp [code]
common/MoveToTrash.h [code]
common/MultiFiles.cpp [code]
common/MultiFiles.h [code]
common/MultiString.cpp [code]
common/MultiString.h [code]
common/OptionalPropertySheet.cpp [code]
common/OptionalPropertySheet.h [code]
common/Persistent.cpp [code]
common/Persistent.h [code]
common/ProgressDlg.cpp [code]
common/ProgressDlg.h [code]
common/PromptFiles.cpp [code]
common/PromptFiles.h [code]
common/PythonContainer.cpp [code]
common/PythonContainer.h [code]
common/PythonGlue.cpp [code]
common/PythonGlue.h [code]
common/PythonGlue.impl.h [code]
common/PythonImpl.cpp [code]
common/PythonImpl.h [code]
common/PythonMacros.h [code]
common/ReleaseDlg.cpp [code]
common/ReleaseDlg.h [code]
common/RtagDlg.cpp [code]
common/RtagDlg.h [code]
common/SaveSettingsDlg.cpp [code]
common/SaveSettingsDlg.h [code]
common/SelectionDetailsDlg.cpp [code]
common/SelectionDetailsDlg.h [code]
common/SmartComboBox.cpp [code]
common/SmartComboBox.h [code]
common/SortList.h [code]
common/StatusDlg.cpp [code]
common/StatusDlg.h [code]
common/TagDlg.cpp [code]
common/TagDlg.h [code]
common/TclGlue.cpp [code]
common/TclGlue.h [code]
common/TclGlue.mac.cpp [code]
common/TclGlue.mac.h [code]
common/TemplateDlg.cpp [code]
common/TemplateDlg.h [code]
common/TextBinary.cpp [code]
common/TextBinary.h [code]
common/UCvsApp.cpp [code]
common/UCvsApp.h [code]
common/UCvsCommands.h [code]
common/UCvsConsole.cpp [code]
common/UCvsConsole.h [code]
common/UCvsDialogs.h [code]
common/UCvsFiles.cpp [code]
common/UCvsFiles.h [code]
common/UCvsFolders.cpp [code]
common/UCvsFolders.h [code]
common/UCvsFrame.cpp [code]
common/UCvsFrame.h [code]
common/UCvsGraph.cpp [code]
common/UCvsGraph.h [code]
common/UCvsMenubar.cpp [code]
common/UCvsMenubar.h [code]
common/UCvsStatusbar.cpp [code]
common/UCvsStatusbar.h [code]
common/UCvsToolbar.cpp [code]
common/UCvsToolbar.h [code]
common/UpdateDlg.cpp [code]
common/UpdateDlg.h [code]
common/VolsPaths.c [code]
common/VolsPaths.h [code]
rf/uconfig.h [code]
rf/uconsole.cpp [code]
rf/uconsole.h [code]
rf/udraw.cpp [code]
rf/udraw.h [code]
rf/uevent.cpp [code]
rf/umain.h [code]
rf/umenu.cpp [code]
rf/umenu.h [code]
rf/uobject.cpp [code]
rf/uobject.h [code]
rf/ustr.cpp [code]
rf/ustr.h [code]
rf/utoolbar.cpp [code]
rf/utoolbar.h [code]
rf/uwidget.cpp [code]
rf/uwidget.h [code]
rf/support/gtk/stdafx.h [code]
rf/support/macapp/stdafx.h [code]
rf/support/macapp/UPseudoSupport.cpp [code]
rf/support/macapp/UPseudoSupport.h [code]
rf/support/mfc/dib.c [code]
rf/support/mfc/dib.h [code]
rf/support/mfc/PseudoButton.cpp [code]
rf/support/mfc/PseudoButton.h [code]
rf/support/mfc/PseudoDlg.cpp [code]
rf/support/mfc/PseudoDlg.h [code]
rf/support/mfc/PseudoDraw.cpp [code]
rf/support/mfc/PseudoDraw.h [code]
rf/support/mfc/PseudoList.cpp [code]
rf/support/mfc/pseudolist.h [code]
rf/support/mfc/StdAfx.cpp [code]
rf/support/mfc/StdAfx.h [code]
rf/support/powerplant/stdafx.h [code]
rf/support/powerplant/UPseudoSupport.cpp [code]
rf/support/powerplant/UPseudoSupport.h [code]
WinCvs/BrowseFileView.cpp [code]
WinCvs/BrowseFileView.h [code]
WinCvs/BrowserBar.cpp [code]
WinCvs/BrowserBar.h [code]
WinCvs/ColorStatic.cpp [code]
WinCvs/ColorStatic.h [code]
WinCvs/ConsoleBar.cpp [code]
WinCvs/ConsoleBar.h [code]
WinCvs/CustomizeMenus.cpp [code]
WinCvs/CustomizeMenus.h [code]
WinCvs/CvsStatusBar.cpp [code]
WinCvs/CvsStatusBar.h [code]
WinCvs/ExploreBar.cpp [code]
WinCvs/ExploreBar.h [code]
WinCvs/FileViewWatcher.cpp [code]
WinCvs/FileViewWatcher.h [code]
WinCvs/GraphDoc.cpp [code]
WinCvs/GraphDoc.h [code]
WinCvs/GraphFrm.cpp [code]
WinCvs/GraphFrm.h [code]
WinCvs/GraphView.cpp [code]
WinCvs/GraphView.h [code]
WinCvs/HHelpSupport.cpp [code]
WinCvs/HHelpSupport.h [code]
WinCvs/HistComboBoxEx.cpp [code]
WinCvs/HistComboBoxEx.h [code]
WinCvs/LogFrm.cpp [code]
WinCvs/LogFrm.h [code]
WinCvs/MainFrm.cpp [code]
WinCvs/MainFrm.h [code]
WinCvs/MfFileDialog.cpp [code]
WinCvs/MfFileDialog.h [code]
WinCvs/MMenuString.cpp [code]
WinCvs/MMenuString.h [code]
WinCvs/MultilineEntryDlg.cpp [code]
WinCvs/MultilineEntryDlg.h [code]
WinCvs/ndir.c [code]
WinCvs/ndir.h [code]
WinCvs/NoPython.cpp [code]
WinCvs/NoPython.h [code]
WinCvs/resource.h [code]
WinCvs/SortHeaderCtrl.cpp [code]
WinCvs/SortHeaderCtrl.h [code]
WinCvs/Splash.cpp [code]
WinCvs/Splash.h [code]
WinCvs/Stat.cpp [code]
WinCvs/StdAfx.cpp [code]
WinCvs/StdAfx.h [code]
WinCvs/TipDlg.cpp [code]
WinCvs/TipDlg.h [code]
WinCvs/version_fu.h [code]
WinCvs/version_no.h [code]
WinCvs/Win32wstring.hpp [code]
WinCvs/wincvs.cpp [code]
WinCvs/wincvs.h [code]
WinCvs/wincvs.odl [code]
WinCvs/wincvs_winutil.cpp [code]
WinCvs/wincvs_winutil.h [code]
WinCvs/WinCvsBrowser.cpp [code]
WinCvs/WinCvsBrowser.h [code]
WinCvs/WinCvsDebug.cpp [code]
WinCvs/WinCvsDebug.h [code]
WinCvs/wincvsDoc.cpp [code]
WinCvs/wincvsDoc.h [code]
WinCvs/wincvsView.cpp [code]
WinCvs/wincvsView.h [code]
WinCvs/CJLib/CJLibrary/CJBrowseEdit.cpp [code]
WinCvs/CJLib/CJLibrary/CJCaption.cpp [code]
WinCvs/CJLib/CJLibrary/CJCaptionPopupWnd.cpp [code]
WinCvs/CJLib/CJLibrary/CJColorPicker.cpp [code]
WinCvs/CJLib/CJLibrary/CJColorPopup.cpp [code]
WinCvs/CJLib/CJLibrary/CJComboBoxEx.cpp [code]
WinCvs/CJLib/CJLibrary/CJControlBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJDateTimeCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJDockBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJDockContext.cpp [code]
WinCvs/CJLib/CJLibrary/CJExplorerBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJFlatButton.cpp [code]
WinCvs/CJLib/CJLibrary/CJFlatComboBox.cpp [code]
WinCvs/CJLib/CJLibrary/CJFlatHeaderCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJFlatSplitterWnd.cpp [code]
WinCvs/CJLib/CJLibrary/CJFlatTabCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJFontCombo.cpp [code]
WinCvs/CJLib/CJLibrary/CJFrameWnd.cpp [code]
WinCvs/CJLib/CJLibrary/CJHexEdit.cpp [code]
WinCvs/CJLib/CJLibrary/CJHtmlView.cpp [code]
WinCvs/CJLib/CJLibrary/CJHyperLink.cpp [code]
WinCvs/CJLib/CJLibrary/CJLibrary.cpp [code]
WinCvs/CJLib/CJLibrary/CJListBox.cpp [code]
WinCvs/CJLib/CJLibrary/CJListCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJListView.cpp [code]
WinCvs/CJLib/CJLibrary/CJLogoPane.cpp [code]
WinCvs/CJLib/CJLibrary/CJMaskEdit.cpp [code]
WinCvs/CJLib/CJLibrary/CJMDIChildWnd.cpp [code]
WinCvs/CJLib/CJLibrary/CJMDIFrameWnd.cpp [code]
WinCvs/CJLib/CJLibrary/CJMemFile.cpp [code]
WinCvs/CJLib/CJLibrary/CJMenu.cpp [code]
WinCvs/CJLib/CJLibrary/CJMenuBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJMetaFileButton.cpp [code]
WinCvs/CJLib/CJLibrary/CJMiniDockFrameWnd.cpp [code]
WinCvs/CJLib/CJLibrary/CJOutlookBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJPagerCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJReBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJReBarCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJShell.cpp [code]
WinCvs/CJLib/CJLibrary/CJShellList.cpp [code]
WinCvs/CJLib/CJLibrary/CJShellTree.cpp [code]
WinCvs/CJLib/CJLibrary/CJSizeDockBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJSortClass.cpp [code]
WinCvs/CJLib/CJLibrary/CJStatusBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJTabCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJTabCtrlBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJTabView.cpp [code]
WinCvs/CJLib/CJLibrary/CJToolBar.cpp [code]
WinCvs/CJLib/CJLibrary/CJToolBarBase.cpp [code]
WinCvs/CJLib/CJLibrary/CJToolBarCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJTreeCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/CJWindowPlacement.cpp [code]
WinCvs/CJLib/CJLibrary/GfxGroupEdit.cpp [code]
WinCvs/CJLib/CJLibrary/GfxOutBarCtrl.cpp [code]
WinCvs/CJLib/CJLibrary/GfxSplitterWnd.cpp [code]
WinCvs/CJLib/CJLibrary/Resource.h [code]
WinCvs/CJLib/CJLibrary/StdAfx.cpp [code]
WinCvs/CJLib/CJLibrary/StdAfx.h [code]
WinCvs/CJLib/CJLibrary/Subclass.cpp [code]
WinCvs/CJLib/Include/CJBrowseEdit.h [code]
WinCvs/CJLib/Include/CJCaption.h [code]
WinCvs/CJLib/Include/CJCaptionPopupWnd.h [code]
WinCvs/CJLib/Include/CJColorPicker.h [code]
WinCvs/CJLib/Include/CJColorPopup.h [code]
WinCvs/CJLib/Include/CJComboBoxEx.h [code]
WinCvs/CJLib/Include/CJControlBar.h [code]
WinCvs/CJLib/Include/CJDateTimeCtrl.h [code]
WinCvs/CJLib/Include/CJDockBar.h [code]
WinCvs/CJLib/Include/CJDockContext.h [code]
WinCvs/CJLib/Include/CJExplorerBar.h [code]
WinCvs/CJLib/Include/CJFlatButton.h [code]
WinCvs/CJLib/Include/CJFlatComboBox.h [code]
WinCvs/CJLib/Include/CJFlatHeaderCtrl.h [code]
WinCvs/CJLib/Include/CJFlatSplitterWnd.h [code]
WinCvs/CJLib/Include/CJFlatTabCtrl.h [code]
WinCvs/CJLib/Include/CJFontCombo.h [code]
WinCvs/CJLib/Include/CJFrameWnd.h [code]
WinCvs/CJLib/Include/CJHexEdit.h [code]
WinCvs/CJLib/Include/CJHtmlView.h [code]
WinCvs/CJLib/Include/CJHyperLink.h [code]
WinCvs/CJLib/Include/CJLibrary.h [code]
WinCvs/CJLib/Include/CJListBox.h [code]
WinCvs/CJLib/Include/CJListCtrl.h [code]
WinCvs/CJLib/Include/CJListView.h [code]
WinCvs/CJLib/Include/CJLogoPane.h [code]
WinCvs/CJLib/Include/CJMaskEdit.h [code]
WinCvs/CJLib/Include/CJMDIChildWnd.h [code]
WinCvs/CJLib/Include/CJMDIFrameWnd.h [code]
WinCvs/CJLib/Include/CJMemFile.h [code]
WinCvs/CJLib/Include/CJMenu.h [code]
WinCvs/CJLib/Include/CJMenuBar.h [code]
WinCvs/CJLib/Include/CJMetaFileButton.h [code]
WinCvs/CJLib/Include/CJMiniDockFrameWnd.h [code]
WinCvs/CJLib/Include/CJOutlookBar.h [code]
WinCvs/CJLib/Include/CJPagerCtrl.h [code]
WinCvs/CJLib/Include/CJReBar.h [code]
WinCvs/CJLib/Include/CJReBarCtrl.h [code]
WinCvs/CJLib/Include/CJResource.h [code]
WinCvs/CJLib/Include/CJShell.h [code]
WinCvs/CJLib/Include/CJShellList.h [code]
WinCvs/CJLib/Include/CJShellTree.h [code]
WinCvs/CJLib/Include/CJSizeDockBar.h [code]
WinCvs/CJLib/Include/CJSortClass.h [code]
WinCvs/CJLib/Include/CJStatusBar.h [code]
WinCvs/CJLib/Include/CJTabCtrl.h [code]
WinCvs/CJLib/Include/CJTabCtrlBar.h [code]
WinCvs/CJLib/Include/CJTabView.h [code]
WinCvs/CJLib/Include/CJToolBar.h [code]
WinCvs/CJLib/Include/CJToolBarBase.h [code]
WinCvs/CJLib/Include/CJToolBarCtrl.h [code]
WinCvs/CJLib/Include/CJTreeCtrl.h [code]
WinCvs/CJLib/Include/CJWindowPlacement.h [code]
WinCvs/CJLib/Include/GfxGroupEdit.h [code]
WinCvs/CJLib/Include/GfxOutBarCtrl.h [code]
WinCvs/CJLib/Include/GfxSplitterWnd.h [code]
WinCvs/CJLib/Include/Subclass.h [code]
WinCvs/HHelp/wincvs.h [code]
WinCvs/res/resrc1.h [code]
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AboutDlg.cpp File Reference

common/AboutDlg.cpp File Reference

#include "stdafx.h"
#include "uwidget.h"
#include "AboutDlg.h"
#include "UCvsApp.h"

Include dependency graph for AboutDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void AboutDialog (void)

Function Documentation

void AboutDialog ( void )

Definition at line 76 of file AboutDlg.cpp.

References EV_INIT_WIDGET, EV_SETTEXT, UCvsApp::GetAppName(), kUMainWidget, UCreate_AboutDlg(), and UEventSendMessage().

Referenced by UCvsFrame::OnAbout().

00077 {
00078     void *wid = UCreate_AboutDlg();
00079     const char*  appText = UCvsApp::gApp->GetAppName();
00080
00081     UAboutDlg *dlg = new UAboutDlg ();
00082     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00083     UEventSendMessage(dlg->GetWidID(), EV_SETTEXT, kUMainWidget, const_cast<char*>(appText));
00084
00085     bool res = false;
00086
00087     res = dlg->DoModal();
00088
00089     return;
00090 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AboutDlg.h File Reference

common/AboutDlg.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void AboutDialog (void)

Function Documentation

void AboutDialog ( void )

Definition at line 76 of file AboutDlg.cpp.

References EV_INIT_WIDGET, EV_SETTEXT, UCvsApp::GetAppName(), kUMainWidget, UCreate_AboutDlg(), and UEventSendMessage().

Referenced by UCvsFrame::OnAbout().

00077 {
00078     void *wid = UCreate_AboutDlg();
00079     const char*  appText = UCvsApp::gApp->GetAppName();
00080
00081     UAboutDlg *dlg = new UAboutDlg ();
00082     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00083     UEventSendMessage(dlg->GetWidID(), EV_SETTEXT, kUMainWidget, const_cast<char*>(appText));
00084
00085     bool res = false;
00086
00087     res = dlg->DoModal();
00088
00089     return;
00090 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AdminOptionDlg.cpp File Reference

common/AdminOptionDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "AdminOptionDlg.h"
#include "GetPrefs.h"
#include "CvsAlert.h"

Include dependency graph for AdminOptionDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool | CompatGetAdminOptions (const MultiFiles *mf, kAdminOptionDlgType type, UStr &optionString)

Variables

char * | sDefStates []
Default states.
CMString gCommitLogs
CMString | gPrevStates (10,"P_PrevStates", sDefStates)

Function Documentation

bool CompatGetAdminOptions | ( | const MultiFiles * | mf,
 |  | kAdminOptionDlgType | type,
 |  | UStr & | optionString
 | ) |

Get the admin option Definition at line 169 of file AdminOptionDlg.cpp.

References kChangeLog, kSetDescription, kSetState, and CGetPrefs_GLOBALS::StoreValues().

00170 {
00171     bool userHitOK = false;
00172
00173     const char* title = "Admin option settings";
00174
00175     switch( type )
00176     {
00177     case kChangeLog:
00178         title = "Change log message";
00179         break;
00180     case kSetState:
00181         title = "Set state";
00182         break;
00183     case kSetDescription:
00184         title = "Set description";
00185         break;
00186     default:
00187 #ifdef WIN32
00188         ASSERT(FALSE); //unknown type
00189 #endif
00190         break;
00191     }
00192
00193 #ifdef WIN32
00194     CHHelpPropertySheet pages(title);
00195     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00196
00197     CAdminOption_MAIN page1(mf, type, optionString.c_str());
00198     CGetPrefs_GLOBALS page2;
00199
00200     pages.AddPage(&page1);
00201     pages.AddPage(&page2);
00202
00203     if( pages.DoModal() == IDOK )
00204     {
00205         optionString = (const char*)page1.GetOptionString();
00206
00207         page2.StoreValues();
00208
00209         userHitOK = true;
00210     }
00211 #endif /* WIN32 */
00212
00213 #ifdef qMacCvsPP
00214 #endif /* qMacCvsPP */
00215 #if qUnix
00216 #endif // qUnix
00217
00218     return userHitOK;
00219 }

Here is the call graph for this function:

Variable Documentation

CMString gCommitLogs

Referenced by CImport_MAIN::OnInitDialog(), CCommit_MAIN::OnInitDialog(), and CAdminOption_MAIN::SetMultilineEntry().

CMString gPrevStates(10,"P_PrevStates", sDefStates) [static]

Referenced by CAdminOption_MAIN::SetMultilineEntry().

char* sDefStates[]

Initial value:

{
    "Rel",
    "Stab",
    "Exp",
    0L
}
Default states.

Definition at line 41 of file AdminOptionDlg.cpp.

Generated on Sat Aug 7 22:43:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AdminOptionDlg.h File Reference

common/AdminOptionDlg.h File Reference

#include "MultilineEntryDlg.h"
#include "HHelpSupport.h"

Include dependency graph for AdminOptionDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CAdminOption_MAIN

Defines

#define | AFX_ADMINOPTIONDLG_H__C9A89564_F0A4_4294_8C6C_18469D18BCB3__INCLUDED_

Enumerations

enum kAdminOptionDlgType {
kChangeLog,
kSetState,
kSetDescription
}
Admin option dialog type. More...

Functions

bool | CompatGetAdminOptions (const MultiFiles *mf, kAdminOptionDlgType type, CStr &optionString)

Define Documentation

#define AFX_ADMINOPTIONDLG_H__C9A89564_F0A4_4294_8C6C_18469D18BCB3__INCLUDED_

Definition at line 26 of file AdminOptionDlg.h.

Enumeration Type Documentation

enum kAdminOptionDlgType

Admin option dialog type.

Enumeration values:
kChangeLog | Change log message
kSetState | Set the revision state
kSetDescription | Set the file description
Definition at line 40 of file AdminOptionDlg.h.
00041 {
00042     kChangeLog,
00043     kSetState,
00044     kSetDescription
00045 } kAdminOptionDlgType;

Function Documentation

bool CompatGetAdminOptions | ( | const MultiFiles * | mf,
 |  | kAdminOptionDlgType | type,
 |  | CStr & | optionString
 | ) |

Referenced by CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), and CGraphView::OnGraphSetstate().

Generated on Sat Aug 7 22:43:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AnnotateDlg.cpp File Reference

common/AnnotateDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "OptionalPropertySheet.h"
#include "AnnotateDlg.h"
#include "CvsPrefs.h"
#include "MultiString.h"
#include "MultiFiles.h"
#include "ItemListDlg.h"
#include "GetPrefs.h"

Include dependency graph for AnnotateDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetAnnotate (const MultiFiles *mf, kAnnotateCmdType annotateType, bool &noRecurs, bool &isDate, UPStr &rev, bool &force)
Get the annotate options.

Function Documentation

bool CompatGetAnnotate | ( | const MultiFiles * | mf,
 |  | kAnnotateCmdType | annotateType,
 |  | bool & | noRecurs,
 |  | bool & | isDate,
 |  | UPStr & | rev,
 |  | bool & | force
 | ) |

Get the annotate options.

Definition at line 231 of file AnnotateDlg.cpp.

References CPStr, gCvsPrefs, CvsPrefs::HideCommandDlgAnnotate(), kAnnotateGraph, CAnnotate_MAIN::m_force, CAnnotate_MAIN::m_hasRev, CAnnotate_MAIN::m_isDate, CAnnotate_MAIN::m_noRecurse, CAnnotate_MAIN::m_rev, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgAnnotate(), and CGetPrefs_GLOBALS::StoreValues().

Referenced by CvsCmdAnnotate().

00233 {
00234     bool userHitOK = false;
00235
00236     static CPStr sLastRev;
00237     static bool bIsDate = false;
00238
00239     bool hasRev = false;
00240     CPStr initialRev;
00241
00242     // Graph view diff supplies initial revisions, so don't override them
00243     if( annotateType == kAnnotateGraph )
00244     {
00245         initialRev = rev;
00246         hasRev = !rev.empty();
00247     }
00248     else
00249     {
00250         rev = "";
00251         hasRev = false;
00252         initialRev = sLastRev;
00253     }
00254
00255     noRecurs = false;
00256     force = false;
00257     isDate = bIsDate;
00258
00259 #ifdef WIN32
00260     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgAnnotate(), "Annotate settings");
00261     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00262
00263     CAnnotate_MAIN page1(mf, annotateType, initialRev, isDate);
00264     CGetPrefs_GLOBALS page2;
00265
00266     pages.AddPage(&page1);
00267     pages.AddPage(&page2);
00268
00269     if( pages.DoModal() == IDOK )
00270     {
00271         noRecurs = page1.m_noRecurse == TRUE;
00272
00273         sLastRev = page1.m_rev;
00274         isDate = page1.m_isDate == TRUE;
00275         hasRev = page1.m_hasRev == TRUE;
00276         force = page1.m_force == TRUE;
00277
00278         page2.StoreValues();
00279         gCvsPrefs.SetHideCommandDlgAnnotate(pages.GetHideCommandDlg());
00280         userHitOK = true;
00281     }
00282 #endif /* WIN32 */
00283
00284 #ifdef qMacCvsPP
00285   userHitOK = true;
00286 #endif /* qMacCvsPP */
00287
00288 #if qUnix
00289 #endif // qUnix
00290
00291     if( userHitOK )
00292     {
00293         if( hasRev )
00294             rev = sLastRev;
00295
00296         bIsDate = isDate;
00297
00298         gCvsPrefs.save();
00299     }
00300
00301     return userHitOK;
00302 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AnnotateDlg.h File Reference

common/AnnotateDlg.h File Reference

#include "CPStr.h"
#include "SmartComboBox.h"
#include "CvsCommands.h"
#include "HHelpSupport.h"

Include dependency graph for AnnotateDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CAnnotate_MAIN

Defines

#define | AFX_ANNOTATEDLG_H__864729EE_838B_473D_8723_E1269829F781__INCLUDED_

Functions

bool | CompatGetAnnotate (const MultiFiles *mf, kAnnotateCmdType annotateType, bool &noRecurs, bool &isDate, UPStr &rev, bool &force)
Get the annotate options.

Variables

CMString gRevNames
CMString gDateNames

Define Documentation

#define AFX_ANNOTATEDLG_H__864729EE_838B_473D_8723_E1269829F781__INCLUDED_

Definition at line 26 of file AnnotateDlg.h.

Function Documentation

bool CompatGetAnnotate | ( | const MultiFiles * | mf,
 |  | kAnnotateCmdType | annotateType,
 |  | bool & | noRecurs,
 |  | bool & | isDate,
 |  | UPStr & | rev,
 |  | bool & | force
 | ) |

Get the annotate options.

Definition at line 231 of file AnnotateDlg.cpp.

References CPStr, gCvsPrefs, CvsPrefs::HideCommandDlgAnnotate(), kAnnotateGraph, CAnnotate_MAIN::m_force, CAnnotate_MAIN::m_hasRev, CAnnotate_MAIN::m_isDate, CAnnotate_MAIN::m_noRecurse, CAnnotate_MAIN::m_rev, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgAnnotate(), and CGetPrefs_GLOBALS::StoreValues().

Referenced by CvsCmdAnnotate().

00233 {
00234     bool userHitOK = false;
00235
00236     static CPStr sLastRev;
00237     static bool bIsDate = false;
00238
00239     bool hasRev = false;
00240     CPStr initialRev;
00241
00242     // Graph view diff supplies initial revisions, so don't override them
00243     if( annotateType == kAnnotateGraph )
00244     {
00245         initialRev = rev;
00246         hasRev = !rev.empty();
00247     }
00248     else
00249     {
00250         rev = "";
00251         hasRev = false;
00252         initialRev = sLastRev;
00253     }
00254
00255     noRecurs = false;
00256     force = false;
00257     isDate = bIsDate;
00258
00259 #ifdef WIN32
00260     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgAnnotate(), "Annotate settings");
00261     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00262
00263     CAnnotate_MAIN page1(mf, annotateType, initialRev, isDate);
00264     CGetPrefs_GLOBALS page2;
00265
00266     pages.AddPage(&page1);
00267     pages.AddPage(&page2);
00268
00269     if( pages.DoModal() == IDOK )
00270     {
00271         noRecurs = page1.m_noRecurse == TRUE;
00272
00273         sLastRev = page1.m_rev;
00274         isDate = page1.m_isDate == TRUE;
00275         hasRev = page1.m_hasRev == TRUE;
00276         force = page1.m_force == TRUE;
00277
00278         page2.StoreValues();
00279         gCvsPrefs.SetHideCommandDlgAnnotate(pages.GetHideCommandDlg());
00280         userHitOK = true;
00281     }
00282 #endif /* WIN32 */
00283
00284 #ifdef qMacCvsPP
00285   userHitOK = true;
00286 #endif /* qMacCvsPP */
00287
00288 #if qUnix
00289 #endif // qUnix
00290
00291     if( userHitOK )
00292     {
00293         if( hasRev )
00294             rev = sLastRev;
00295
00296         bIsDate = isDate;
00297
00298         gCvsPrefs.save();
00299     }
00300
00301     return userHitOK;
00302 }

Here is the call graph for this function:

Variable Documentation

CMString gDateNames

Referenced by CAnnotate_MAIN::CAnnotate_MAIN(), CDiff_MAIN::CDiff_MAIN(), CItemListDlg::CItemListDlg(), CRtag_OPTIONS::CRtag_OPTIONS(), CUpdateMerge::CUpdateMerge(), CUpdateOptions::CUpdateOptions(), CDiff_MAIN::OnCheck1(), CDiff_MAIN::OnCheck2(), and CAnnotate_MAIN::OnIsdate().

CMString gRevNames

Referenced by CAnnotate_MAIN::CAnnotate_MAIN(), CCommit_OPTIONS::CCommit_OPTIONS(), CDiff_MAIN::CDiff_MAIN(), CItemListDlg::CItemListDlg(), CRtag_MAIN::CRtag_MAIN(), CRtag_OPTIONS::CRtag_OPTIONS(), CTag_MAIN::CTag_MAIN(), CUpdateMerge::CUpdateMerge(), CUpdateOptions::CUpdateOptions(), CDiff_MAIN::OnCheck1(), CDiff_MAIN::OnCheck2(), and CAnnotate_MAIN::OnIsdate().

Generated on Sat Aug 7 22:43:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppConsole.cpp File Reference

common/AppConsole.cpp File Reference

#include "stdafx.h"
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include "AppConsole.h"
#include "wincvs.h"
#include "wincvsView.h"

Include dependency graph for AppConsole.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | cvs_out (const char *format,...)
void | cvs_err (const char *format,...)
void | cvs_outstr (const char *str, size_t len)
void | cvs_errstr (const char *str, size_t len)

Function Documentation

void cvs_err | ( | const char * | format,
 |  |  | ...
 | ) |

Definition at line 90 of file AppConsole.cpp.

References kUMainConsoleID, NULL, CWincvsView::OutConsole(), UCvsConsole::OutConsole(), and UAppConsole().

Referenced by _loadPersistentSettings(), ControlCvsArgs::addfile(), RemoveCvsArgs::addfile(), AskCreatePersistentSettings(), BrowserGetMultiFiles(), BuildIgnoredList(), CompatEndMoveToTrash(), CompatGetPrefs(), CompatImportFilter(), CompatMoveToTrash(), copy_list_types(), CProgress::CProgress(), CTcl_Interp::CTcl_Interp(), CvsCmdAdd(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdMoveToTrash(), CvsCmdRelease(), CvsLogParse(), CBrowseFileView::EnterFolder(), Entries_Open(), Entries_SetVisited(), FileTimeToUnixTime(), FileTraverse(), FillBuffer(), FormatDefaultSettingsLoc(), GetNextEntriesLine(), glue_getenv(), InitializeInterp(), CLogoutThread::InitInstance(), CWincvsApp::InitInstance(), launchCVS(), LaunchDefaultEditor(), LaunchDiff(), LaunchEditor(), LaunchExplore(), LaunchHandler(), LaunchNewInst(), LaunchProperties(), LaunchViewer(), list_add_type(), list_add_warning(), CPersistent::LoadAll(), LoadSettingsInternal(), MakeTmpFile(), mystrdup(), UCvsFiles::OnCmdExplore(), UCvsFolders::OnCmdExplore(), CCvsStatusBar::OnCreate(), MacroTraversal::OnError(), CFindSettings::OnError(), TBrowserFillDummy::OnError(), MacroTraversal::OnFile(), CBrowseFileView::OnInitialUpdate(), ReadIgnoredFile(), CPersistent::SaveAll(), CWincvsApp::SaveAllModified(), CPersistent::SaveAllSettings(), UCvsFolders::SetDefaultRoot(), CGraphDoc::SetNode(), SettingsGetLoc(), UCvsApp::StartScriptEngine(), CWincvsApp::StartScriptEngine(), Tag_Open(), tclSafeRemove(), UCvsApp::UCvsApp(), and UCvsGraph::UCvsGraph().

00091 {
00092     va_list args;
00093     char mess[1024] = {'\0'};
00094
00095     va_start (args, format);
00096     vsprintf (mess, format, args);
00097     va_end (args);
00098
00099 #ifdef WIN32
00100     CWinApp* app = AfxGetApp();
00101     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00102     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00103     if(view == NULL)
00104         return;
00105
00106     view->OutConsole(mess, strlen(mess), true);
00107 #endif /* WIN32 */
00108 #ifdef qMacCvsPP
00109     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00110     if(log == 0L)
00111         return;
00112     log->WriteCharsToConsole(mess, strlen(mess), true);
00113 #endif /* qMacCvsPP */
00114 #ifdef qUnix
00115     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00116     if(console == 0L)
00117     {
00118         UAppConsole(mess);
00119         return;
00120     }
00121
00122     console->OutConsole(mess, strlen(mess), true);
00123 #endif /* qUnix */
00124 }

Here is the call graph for this function:

void cvs_errstr | ( | const char * | str,
 |  | size_t | len
 | ) |

Definition at line 155 of file AppConsole.cpp.

References kUMainConsoleID, NULL, CWincvsView::OutConsole(), UCvsConsole::OutConsole(), and UAppConsole().

Referenced by CCvsStreamConsole::cvs_err(), CCvsRootConsole::cvs_err(), CItemListConsole::cvs_err(), cvsgui_write(), CTcl_Interp::DoFile(), CTcl_Interp::DoScript(), glue_consoleerr(), and tclCvsErrProc().

00156 {
00157 #ifdef WIN32
00158     CWinApp* app = AfxGetApp();
00159     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00160     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00161     if(view == NULL)
00162         return;
00163
00164     view->OutConsole(str, len, true);
00165 #endif /* WIN32 */
00166 #ifdef qMacCvsPP
00167     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00168     if(log == 0L)
00169         return;
00170     log->WriteCharsToConsole(str, len, true);
00171 #endif /* qMacCvsPP */
00172 #ifdef qUnix
00173     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00174     if(console == 0L)
00175     {
00176         UAppConsole(str);
00177         return;
00178     }
00179
00180     console->OutConsole(str, len, true);
00181 #endif /* qUnix */
00182 }

Here is the call graph for this function:

void cvs_out | ( | const char * | format,
 |  |  | ...
 | ) |

Definition at line 54 of file AppConsole.cpp.

References kUMainConsoleID, NULL, CWincvsView::OutConsole(), UCvsConsole::OutConsole(), and UAppConsole().

Referenced by RemoveCvsArgs::addfile(), CompatEndMoveToTrash(), CompatGetPrefs(), CvsCmdMoveToTrash(), ImportReport::EnterDirectory(), glue_exit(), CWincvsApp::OnAppCopyrights(), CWincvsApp::OnAppCredits(), UCvsFrame::OnCmdStopcvs(), UCvsFrame::OnCopyrights(), UCvsFrame::OnCredits(), CMainFrame::OnDropFiles(), CWincvsDoc::OnUsePyshell(), CWincvsDoc::OnUseTclshell(), CvsArgs::print(), UCvsApp::SayWelcome(), UCvsApp::StartScriptEngine(), and CWincvsApp::StartScriptEngine().

00055 {
00056     va_list args;
00057     char mess[1024] = {'\0'};
00058
00059     va_start (args, format);
00060     vsprintf (mess, format, args);
00061     va_end (args);
00062
00063 #ifdef WIN32
00064     CWinApp* app = AfxGetApp();
00065     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00066     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00067     if(view == NULL)
00068         return;
00069
00070     view->OutConsole(mess, strlen(mess));
00071 #endif /* WIN32 */
00072 #ifdef qMacCvsPP
00073     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00074     if(log == 0L)
00075         return;
00076     log->WriteCharsToConsole(mess, strlen(mess));
00077 #endif /* qMacCvsPP */
00078 #ifdef qUnix
00079     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00080     if(console == 0L)
00081     {
00082         UAppConsole(mess);
00083         return;
00084     }
00085
00086     console->OutConsole(mess, strlen(mess));
00087 #endif /* qUnix */
00088 }

Here is the call graph for this function:

void cvs_outstr | ( | const char * | str,
 |  | size_t | len
 | ) |

Definition at line 126 of file AppConsole.cpp.

References kUMainConsoleID, NULL, CWincvsView::OutConsole(), UCvsConsole::OutConsole(), and UAppConsole().

Referenced by cvsgui_write(), CvsLogParse(), CTcl_Interp::DoFile(), CTcl_Interp::DoScript(), glue_consoleout(), CvsArgs::print(), and tclCvsOutProc().

00127 {
00128 #ifdef WIN32
00129     CWinApp* app = AfxGetApp();
00130     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00131     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00132     if(view == NULL)
00133         return;
00134
00135     view->OutConsole(str, len);
00136 #endif /* WIN32 */
00137 #ifdef qMacCvsPP
00138     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00139     if(log == 0L)
00140         return;
00141     log->WriteCharsToConsole(str, len);
00142 #endif /* qMacCvsPP */
00143 #ifdef qUnix
00144     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00145     if(console == 0L)
00146     {
00147         UAppConsole(str);
00148         return;
00149     }
00150
00151     console->OutConsole(str, len);
00152 #endif /* qUnix */
00153 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppConsole.h File Reference

common/AppConsole.h File Reference

#include <stdio.h>

Include dependency graph for AppConsole.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CColorConsole

Defines

#define | WCHARFORMAT CHARFORMAT

Enumerations

enum kConsoleColor {
kNormal,
kBrown,
kGreen,
kMagenta,
kRed,
kBlue,
kBold,
kItalic,
kUnderline,
kNL
}

Functions

void | cvs_out (const char *format,...)
void | cvs_err (const char *format,...)
void | cvs_outstr (const char *str, size_t len)
void | cvs_errstr (const char *str, size_t len)

Define Documentation

#define WCHARFORMAT CHARFORMAT

Definition at line 54 of file AppConsole.h.

Referenced by CCharFormat::CCharFormat(), CWincvsView::GetCurFormat(), CCharFormat::operator CHARFORMAT &(), CWincvsView::OutColor(), and CWincvsView::OutLine().

Enumeration Type Documentation

enum kConsoleColor

Enumeration values:
kNormal
kBrown
kGreen
kMagenta
kRed
kBlue
kBold
kItalic
kUnderline
kNL
Definition at line 35 of file AppConsole.h.

Referenced by PyColorConsole::Print().

00036 {
00037     kNormal,
00038     kBrown,
00039     kGreen,
00040     kMagenta,
00041     kRed,
00042     kBlue,
00043     kBold,
00044     kItalic,
00045     kUnderline,
00046     kNL // newline
00047 } kConsoleColor;

Function Documentation

void cvs_err | ( | const char * | format,
 |  |  | ...
 | ) |

Definition at line 90 of file AppConsole.cpp.

References kUMainConsoleID, NULL, UCvsConsole::OutConsole(), CWincvsView::OutConsole(), and UAppConsole().

Referenced by _loadPersistentSettings(), RemoveCvsArgs::addfile(), ControlCvsArgs::addfile(), AskCreatePersistentSettings(), BrowserGetMultiFiles(), BuildIgnoredList(), CompatEndMoveToTrash(), CompatGetPrefs(), CompatImportFilter(), CompatMoveToTrash(), copy_list_types(), CProgress::CProgress(), CTcl_Interp::CTcl_Interp(), CvsCmdAdd(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdMoveToTrash(), CvsCmdRelease(), CvsLogParse(), CBrowseFileView::EnterFolder(), Entries_Open(), Entries_SetVisited(), FileTimeToUnixTime(), FileTraverse(), FillBuffer(), FormatDefaultSettingsLoc(), GetNextEntriesLine(), glue_getenv(), InitializeInterp(), CWincvsApp::InitInstance(), CLogoutThread::InitInstance(), launchCVS(), LaunchDefaultEditor(), LaunchDiff(), LaunchEditor(), LaunchExplore(), LaunchHandler(), LaunchNewInst(), LaunchProperties(), LaunchViewer(), list_add_type(), list_add_warning(), CPersistent::LoadAll(), LoadSettingsInternal(), MakeTmpFile(), mystrdup(), UCvsFolders::OnCmdExplore(), UCvsFiles::OnCmdExplore(), CCvsStatusBar::OnCreate(), TBrowserFillDummy::OnError(), CFindSettings::OnError(), MacroTraversal::OnError(), MacroTraversal::OnFile(), CBrowseFileView::OnInitialUpdate(), ReadIgnoredFile(), CPersistent::SaveAll(), CWincvsApp::SaveAllModified(), CPersistent::SaveAllSettings(), UCvsFolders::SetDefaultRoot(), CGraphDoc::SetNode(), SettingsGetLoc(), CWincvsApp::StartScriptEngine(), UCvsApp::StartScriptEngine(), Tag_Open(), tclSafeRemove(), UCvsApp::UCvsApp(), and UCvsGraph::UCvsGraph().

00091 {
00092     va_list args;
00093     char mess[1024] = {'\0'};
00094
00095     va_start (args, format);
00096     vsprintf (mess, format, args);
00097     va_end (args);
00098
00099 #ifdef WIN32
00100     CWinApp* app = AfxGetApp();
00101     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00102     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00103     if(view == NULL)
00104         return;
00105
00106     view->OutConsole(mess, strlen(mess), true);
00107 #endif /* WIN32 */
00108 #ifdef qMacCvsPP
00109     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00110     if(log == 0L)
00111         return;
00112     log->WriteCharsToConsole(mess, strlen(mess), true);
00113 #endif /* qMacCvsPP */
00114 #ifdef qUnix
00115     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00116     if(console == 0L)
00117     {
00118         UAppConsole(mess);
00119         return;
00120     }
00121
00122     console->OutConsole(mess, strlen(mess), true);
00123 #endif /* qUnix */
00124 }

Here is the call graph for this function:

void cvs_errstr | ( | const char * | str,
 |  | size_t | len
 | ) |

Definition at line 155 of file AppConsole.cpp.

References kUMainConsoleID, NULL, UCvsConsole::OutConsole(), CWincvsView::OutConsole(), and UAppConsole().

Referenced by CItemListConsole::cvs_err(), CCvsRootConsole::cvs_err(), CCvsStreamConsole::cvs_err(), cvsgui_write(), CTcl_Interp::DoFile(), CTcl_Interp::DoScript(), glue_consoleerr(), and tclCvsErrProc().

00156 {
00157 #ifdef WIN32
00158     CWinApp* app = AfxGetApp();
00159     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00160     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00161     if(view == NULL)
00162         return;
00163
00164     view->OutConsole(str, len, true);
00165 #endif /* WIN32 */
00166 #ifdef qMacCvsPP
00167     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00168     if(log == 0L)
00169         return;
00170     log->WriteCharsToConsole(str, len, true);
00171 #endif /* qMacCvsPP */
00172 #ifdef qUnix
00173     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00174     if(console == 0L)
00175     {
00176         UAppConsole(str);
00177         return;
00178     }
00179
00180     console->OutConsole(str, len, true);
00181 #endif /* qUnix */
00182 }

Here is the call graph for this function:

void cvs_out | ( | const char * | format,
 |  |  | ...
 | ) |

Definition at line 54 of file AppConsole.cpp.

References kUMainConsoleID, NULL, UCvsConsole::OutConsole(), CWincvsView::OutConsole(), and UAppConsole().

Referenced by RemoveCvsArgs::addfile(), CompatEndMoveToTrash(), CompatGetPrefs(), CvsCmdMoveToTrash(), ImportReport::EnterDirectory(), glue_exit(), CWincvsApp::OnAppCopyrights(), CWincvsApp::OnAppCredits(), UCvsFrame::OnCmdStopcvs(), UCvsFrame::OnCopyrights(), UCvsFrame::OnCredits(), CMainFrame::OnDropFiles(), CWincvsDoc::OnUsePyshell(), CWincvsDoc::OnUseTclshell(), CvsArgs::print(), UCvsApp::SayWelcome(), CWincvsApp::StartScriptEngine(), and UCvsApp::StartScriptEngine().

00055 {
00056     va_list args;
00057     char mess[1024] = {'\0'};
00058
00059     va_start (args, format);
00060     vsprintf (mess, format, args);
00061     va_end (args);
00062
00063 #ifdef WIN32
00064     CWinApp* app = AfxGetApp();
00065     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00066     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00067     if(view == NULL)
00068         return;
00069
00070     view->OutConsole(mess, strlen(mess));
00071 #endif /* WIN32 */
00072 #ifdef qMacCvsPP
00073     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00074     if(log == 0L)
00075         return;
00076     log->WriteCharsToConsole(mess, strlen(mess));
00077 #endif /* qMacCvsPP */
00078 #ifdef qUnix
00079     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00080     if(console == 0L)
00081     {
00082         UAppConsole(mess);
00083         return;
00084     }
00085
00086     console->OutConsole(mess, strlen(mess));
00087 #endif /* qUnix */
00088 }

Here is the call graph for this function:

void cvs_outstr | ( | const char * | str,
 |  | size_t | len
 | ) |

Definition at line 126 of file AppConsole.cpp.

References kUMainConsoleID, NULL, UCvsConsole::OutConsole(), CWincvsView::OutConsole(), and UAppConsole().

Referenced by cvsgui_write(), CvsLogParse(), CTcl_Interp::DoFile(), CTcl_Interp::DoScript(), glue_consoleout(), CvsArgs::print(), and tclCvsOutProc().

00127 {
00128 #ifdef WIN32
00129     CWinApp* app = AfxGetApp();
00130     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00131     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00132     if(view == NULL)
00133         return;
00134
00135     view->OutConsole(str, len);
00136 #endif /* WIN32 */
00137 #ifdef qMacCvsPP
00138     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00139     if(log == 0L)
00140         return;
00141     log->WriteCharsToConsole(str, len);
00142 #endif /* qMacCvsPP */
00143 #ifdef qUnix
00144     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00145     if(console == 0L)
00146     {
00147         UAppConsole(str);
00148         return;
00149     }
00150
00151     console->OutConsole(str, len);
00152 #endif /* qUnix */
00153 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppGlue.cpp File Reference

common/AppGlue.cpp File Reference

#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "wincvs.h"
#include "PromptFiles.h"
#include "BrowseFileView.h"
#include "wincvs_winutil.h"
#include <process.h>
#include <direct.h>
#include "cvsgui_process.h"
#include "Authen.h"
#include "CvsPrefs.h"
#include "AppGlue.h"
#include "AppConsole.h"
#include "GetPassword.h"
#include "AskYesNo.h"
#include "CvsArgs.h"
#include "FileTraversal.h"
#include "CvsCommands.h"
#include "cvsgui_i18n.h"
#include "CvsAlert.h"

Include dependency graph for AppGlue.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | CVS_EXTERN_C

Functions

void | glue_ondestroy (const CvsProcess *process)
void | glue_exit (int code, const CvsProcess *process)
long | glue_consoleout (const char *txt, long len, const CvsProcess *process)
long | glue_consoleerr (const char *txt, long len, const CvsProcess *process)
long | glue_consolein (const char *txt, long len, const CvsProcess *process)
const char * | glue_getenv (const char *name, const CvsProcess *process)
int | launchCVS (int test, const char *path, int argc, char *const *argv, CCvsConsole *console, const char *cvsfile)
void | stopCVS ()
int | testCVS (const char *cvsfile, int argc, char *const *argv)
int | launchCVS (const char *path, int argc, char *const *argv, CCvsConsole *console)
FILE * | launchCVS (const char *dir, const CvsArgs &args, UStr &tmpFile, const char *prefix, const char *extension)
const char * | launchCVS (const char *dir, const CvsArgs &args, const char *prefix, const char *extension)
void | WaitForCvs (void)
Wait for the CVS thread to terminate.

Variables

int sLastExitCode
Last CVS command exit code.
CTmpFiles sTmpList
Temporary files list.
CvsProcessCallbacks | sCallTable

Define Documentation

#define CVS_EXTERN_C

Definition at line 109 of file AppGlue.cpp.

Referenced by glue_consoleerr(), glue_consolein(), glue_consoleout(), glue_exit(), glue_getenv(), and glue_ondestroy().

Function Documentation

long glue_consoleerr | ( | const char * | txt,
 |  | long | len,
 |  | const CvsProcess * | process
 | ) |

Send stderr of the CVS command to the console

Parameters:
txt | Text to be send to the console
len | Text length
process | CVS Process
Returns:
The printed text length
Definition at line 176 of file AppGlue.cpp.

References CCvsConsole::cvs_err(), cvs_errstr(), CVS_EXTERN_C, CvsProcess, and CCvsProcessData::GetCvsConsole().

00177 {
00178     if( process->appData )
00179     {
00180         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00181         if( pCvsProcessData->GetCvsConsole() )
00182         {
00183             return pCvsProcessData->GetCvsConsole()->cvs_err(txt, len);
00184         }
00185     }
00186
00187     cvs_errstr(txt, len);
00188
00189     return len;
00190 }

Here is the call graph for this function:

long glue_consolein | ( | const char * | txt,
 |  | long | len,
 |  | const CvsProcess * | process
 | ) |

Send stdin of the console to the CVS command

Parameters:
txt | Text to be send to the CVS command
len | Text length
process | CVS Process
Returns:
The sent text length
Definition at line 199 of file AppGlue.cpp.

References CVS_EXTERN_C, and CvsProcess.

00200 {
00201     return 0;
00202 }

long glue_consoleout | ( | const char * | txt,
 |  | long | len,
 |  | const CvsProcess * | process
 | ) |

Send stdout of the CVS command to the console

Parameters:
txt | Text to be send to the console
len | Text length
process | CVS Process
Returns:
The printed text length
Definition at line 153 of file AppGlue.cpp.

References CVS_EXTERN_C, CCvsConsole::cvs_out(), cvs_outstr(), CvsProcess, and CCvsProcessData::GetCvsConsole().

00154 {
00155     if( process->appData )
00156     {
00157         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00158         if( pCvsProcessData->GetCvsConsole() )
00159         {
00160             return pCvsProcessData->GetCvsConsole()->cvs_out(txt, len);
00161         }
00162     }
00163
00164     cvs_outstr(txt, len);
00165
00166     return len;
00167 }

Here is the call graph for this function:

void glue_exit | ( | int | code,
 |  | const CvsProcess * | process
 | ) |

Print the CVS command exit code

Parameters:
code | Exit code to print
process | CVS Process
Definition at line 138 of file AppGlue.cpp.

References _i18n, CVS_EXTERN_C, cvs_out(), CvsProcess, gCvsPrefs, CvsPrefs::IsTclFileRunning(), and sLastExitCode.

00139 {
00140     if( !gCvsPrefs.IsTclFileRunning() )
00141         cvs_out(_i18n("\n***** CVS exited normally with code %d *****\n\n"), code);
00142
00143     sLastExitCode = code;
00144 }

Here is the call graph for this function:

const char* glue_getenv | ( | const char * | name,
 |  | const CvsProcess * | process
 | ) |

Set the environmental variables for the CVS command

Parameters:
name | Environmental variable name
process | CVS Process
Returns:
The environmental variable value as const char*
Note:
Make sure that the returned pointer doesn't get deallocated prematurely
Definition at line 230 of file AppGlue.cpp.

References _i18n, BrowserGetDirectory(), BUTTONTITLE_NO, BUTTONTITLE_YES, CvsPrefs::CheckoutRO(), CompatGetPassword(), CStr, cvs_err(), CVS_EXTERN_C, CvsProcess, gCvsPrefs, getenv, CWincvsApp::GetEnvMainThread(), MacBinMaps::GetEnvPlainTypes(), MacBinMaps::GetEnvTypes(), CvsPrefs::Home(), CvsPrefs::ICTextOption(), ISO8559_none, CvsPrefs::IsoConvert(), kCvsAlertOKButton, kCvsAlertQuestionIcon, MAC_APPSINGLE, MAC_HQX, MAC_PLAIN_BINARY, CvsPrefs::MacBinEncodeBinariesOnly(), CvsPrefs::MacBinEncoding(), CvsPrefs::MacLF(), NULL, CvsPrefs::save(), CvsPrefs::SetHome(), CvsAlert::ShowAlert(), and CvsPrefs::UnixLF().

Referenced by CMainFrame::OnTimer().

00231 {
00232     if( name == NULL )
00233         return NULL;
00234
00235 #ifdef WIN32
00236     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00237     if( !app )
00238     {
00239         ASSERT(FALSE);  // need an application object
00240         return NULL;
00241     }
00242
00243     if( ::GetCurrentThreadId() != app->m_nThreadID &&
00244         (strcmp(name, "CVS_GETPASS") == 0 || strcmp(name, "CVSLIB_YESNO") == 0 ||
00245         strcmp(name, "HOME") == 0) )
00246     {
00247         return app->GetEnvMainThread(name);
00248     }
00249 #endif /* WIN32 */
00250
00251 #ifdef TARGET_OS_MAC
00252     char* result;
00253     if( (result = ae_getenv(name)) != (char*)-1 )
00254     {
00255         if( result == 0L && isGlobalEnvVariable(name) )
00256         {
00257             // in this case only we let continue
00258             // to get the MacCVS settings. So the CWCVS
00259             // users (or any AppleEvent user) can set
00260             // these variables in MacCVS but still can overide
00261             // them using Apple Events.
00262         }
00263         else
00264             return result;
00265     }
00266 #endif /* TARGET_OS_MAC */
00267
00268 #if INTERNAL_AUTHEN
00269     // Give a chance for the new AuthenModel to react to the getenv callback
00270     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00271     std::vector<AuthenModel*>& allInstances = AuthenModel::GetAllInstances();
00272     std::vector<AuthenModel*>::const_iterator i;
00273
00274     if( curModel != 0L )
00275     {
00276         const char* res = curModel->OnGetEnv(name);
00277         if( res != 0L )
00278             return res;
00279     }
00280
00281     for(i = allInstances.begin(); i != allInstances.end(); ++i)
00282     {
00283         AuthenModel* model = *i;
00284
00285         if( model == curModel )
00286             continue;
00287
00288         const char* res = model->OnGetEnv(name);
00289         if( res != 0L )
00290             return res;
00291     }
00292
00293     if( strcmp(name, "USER") == 0
00294 #ifdef WIN32
00295         // I do that (and see the "STRATA_HACK" in
00296         // subr.c) because people get tired on Windows
00297         // to have to check their Windows login :
00298         // this is only for .rhosts authentication.
00299         || strcmp(name, "LOGNAME") == 0
00300 #endif /* WIN32 */
00301         )
00302     {
00303         static char user[64];
00304
00305         // extract from the cvsroot
00306         const char* ccvsroot = gCvsPrefs;
00307         ccvsroot = Authen::skiptoken(ccvsroot);
00308         char* login = strchr(ccvsroot, '@');
00309         if( login == NULL )
00310         {
00311             // for WIN32/gcvs this means the CVSROOT is local
00312 #ifdef TARGET_OS_MAC
00313             cvs_err(_i18n("MacCvs: Cannot extract login from cvsroot %s !\n"), ccvsroot);
00314 #endif /* TARGET_OS_MAC */
00315             return NULL;
00316         }
00317
00318         int length = login - ccvsroot;
00319         memcpy(user, ccvsroot, length * sizeof(char));
00320         user[length] = '\0';
00321
00322         return user;
00323     }
00324     else if( strcmp(name, "CVSROOT") == 0 )
00325     {
00326         static CStr root;
00327
00328         // extract from the cvsroot
00329         const char* ccvsroot = gCvsPrefs;
00330         ccvsroot = Authen::skiptoken(ccvsroot);
00331         root = gAuthen.token();
00332         root << ccvsroot;
00333
00334         return root;
00335     }
00336     else
00337 #endif /* INTERNAL_AUTHEN */
00338     if( strcmp(name, "CVSREAD") == 0 )
00339     {
00340         return gCvsPrefs.CheckoutRO() ? (char*)"1" : 0L;
00341     }
00342     else if( strncmp(name, "CVS_GETPASS", strlen("CVS_GETPASS")) == 0 )
00343     {
00344         UStr str(_i18n("Enter the password:"));
00345         char *tmp;
00346         if( (tmp = strchr(name, '=')) != 0L )
00347         {
00348             str = ++tmp;
00349         }
00350
00351         return CompatGetPassword(str);
00352     }
00353     else if( strcmp(name, "CVSLIB_YESNO") == 0 )
00354     {
00355 #ifdef qMacCvsPP
00356         // let user know we need some input
00357         CMacCvsApp::gApp->InteractWithUser();
00358         // make sure log window is front-most window, visible and not minimized, since we're referring to it in our [modal] alert
00359         LWindow* logwindow = CMacCvsApp::gApp->GetLogWindow();
00360         if ( logwindow )
00361         {
00362             if ( !logwindow->IsVisible() ) logwindow->Show();
00363             if ( IsWindowCollapsed(logwindow->GetMacWindow()) ) CollapseWindow(logwindow->GetMacWindow(), false);
00364             logwindow->Select();
00365         }
00366 #endif /* qMacCvsPP */
00367
00368         CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00369             _i18n("CVS is requiring you to answer yes or no."), _i18n("(See the console for details)"),
00370             BUTTONTITLE_YES, BUTTONTITLE_NO);
00371
00372         return cvsAlert.ShowAlert() == kCvsAlertOKButton ? "yes" : "no";
00373     }
00374 #if DIRTY_MCP_SUPPORT
00375     else if( strcmp(name, "DIRTY_MCP") == 0 )
00376     {
00377         return gCvsPrefs.DirtySupport() ? "yes" : "no";
00378     }
00379 #endif
00380 #ifdef WIN32
00381     else if( strcmp(name, "HOME") == 0 )
00382     {
00383         // prompt for home the first time
00384         if( gCvsPrefs.Home() == 0L )
00385         {
00386             char oldpath[_MAX_PATH];
00387             getcwd(oldpath, _MAX_PATH-1);
00388
00389             CStr home;
00390             if( !BrowserGetDirectory(_i18n("Select your home directory"), home) )
00391             {
00392                 chdir(oldpath);
00393                 return 0L;
00394             }
00395
00396             gCvsPrefs.SetHome(home);
00397             gCvsPrefs.save();
00398             chdir(oldpath);
00399         }
00400
00401         // Windows 98 doesn't like C:\/.cvspass
00402         static CStr home;
00403         home = gCvsPrefs.Home();
00404         home.rtrim (kPathDelimiter);
00405
00406         return home;
00407     }
00408     else if( strcmp(name, "CVSUSEUNIXLF") == 0 )
00409     {
00410         return gCvsPrefs.UnixLF() ? "1" : 0L;
00411     }
00412 #endif /*WIN32 */
00413 #if TARGET_RT_MAC_MACHO
00414     else if( strcmp(name, "CVS_MACLF") == 0 )
00415     {
00416         return gCvsPrefs.MacLF() ? "1" : 0L;
00417     }
00418 #endif
00419 #ifdef TARGET_OS_MAC
00420     else if( strcmp(name, "ISO8859") == 0 )
00421     {
00422         static char iso[6];
00423
00424         if( gCvsPrefs.IsoConvert() == ISO8559_none )
00425             return 0L;
00426
00427         sprintf(iso, "%d", (int)gCvsPrefs.IsoConvert());
00428         return iso;
00429     }
00430     else if( strcmp(name, "IC_ON_TXT") == 0 )
00431     {
00432         return gCvsPrefs.ICTextOption() ? "1" : 0L;
00433     }
00434     else if( strcmp(name, "MAC_ENCODE_ONLY_BINARY_FILES") == 0 )
00435     {
00436         return gCvsPrefs.MacBinEncodeBinariesOnly() ? "1" : 0L;
00437     }
00438     else if( strcmp(name, "MAC_DEFAULT_RESOURCE_ENCODING") == 0 )
00439     {
00440         switch(gCvsPrefs.MacBinEncoding())
00441         {
00442             case MAC_HQX:
00443                 return (char*)"HQX";
00444                 break;
00445             case MAC_APPSINGLE:
00446                 return (char*)"AppleSingle";
00447                 break;
00448             case MAC_PLAIN_BINARY:
00449                 return (char*)"PlainBinary";
00450                 break;
00451         }
00452         return 0L;
00453     }
00454     else if( strcmp(name, "MAC_BINARY_TYPES_SINGLE") == 0 )
00455     {
00456         return (char*)MacBinMaps::GetEnvTypes(MAC_APPSINGLE);
00457     }
00458     else if( strcmp(name, "MAC_BINARY_TYPES_HQX") == 0 )
00459     {
00460         return (char*)MacBinMaps::GetEnvTypes(MAC_HQX);
00461     }
00462     else if( strcmp(name, "MAC_BINARY_TYPES_PLAIN") == 0 )
00463     {
00464         return (char*)MacBinMaps::GetEnvPlainTypes();
00465     }
00466 #endif /* TARGET_OS_MAC */
00467     else
00468     {
00469         char* res;
00470         res = getenv(name);
00471         return res;
00472     }
00473
00474     return NULL;
00475 }

Here is the call graph for this function:

void glue_ondestroy ( const CvsProcess * process )

Release any application data allocated

Parameters:
process CVS Process
Definition at line 124 of file AppGlue.cpp.

References CVS_EXTERN_C, and CvsProcess.

00125 {
00126     if( process->appData )
00127     {
00128         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00129         delete pCvsProcessData;
00130     }
00131 }

const char* launchCVS | ( | const char * | dir,
 |  | const CvsArgs & | args,
 |  | const char * | prefix,
 |  | const char * | extension
 | ) |

Launch cvs command and put the cvs output in a file

Parameters:
dir | Directory
args | Cvs arguments
prefix | File prefix
extension | File extension
Returns:
The file name on success, NULL on error
Note:
The temp file is automatically removed when quitting
Definition at line 772 of file AppGlue.cpp.

References CStr, CTmpFiles::push_back(), and sTmpList.

Referenced by CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdImportModule(), CvsCmdInit(), CvsCmdLock(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdRelease(), CvsCmdRemove(), CvsCmdRtag(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), cvsgui_RunCvs(), CvsLogParse(), launchCVS(), LaunchCvsRootCommand(), LaunchItemListCommand(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), CGraphView::RetrieveSel(), CGraphView::SaveSel(), tclCvsProc(), and testCVS().

00774 {
00775     CStr filename;
00776     FILE* file = launchCVS(dir, args, filename, prefix, extension);
00777     if( file == 0L )
00778         return 0L;
00779
00780     fclose(file);
00781
00782     return sTmpList.push_back(filename);
00783 }

Here is the call graph for this function:

FILE* launchCVS | ( | const char * | dir,
 |  | const CvsArgs & | args,
 |  | UStr & | tmpFile,
 |  | const char * | prefix,
 |  | const char * | extension
 | ) |

Launch cvs command and send a stream of the cvs output into a file

Parameters:
dir | Directory
args | Cvs arguments
tmpFile | File name
prefix | File prefix
extension | File extension
Returns:
The output file handle on success, NULL on error
Definition at line 733 of file AppGlue.cpp.
00735 {
00736     if( !MakeTmpFile(tmpFile, prefix, extension) )
00737         return 0L;
00738
00739     FILE* res = fopen(tmpFile, gCvsPrefs.UnixLF() ? "wb+" : "w+");
00740     if( res == 0L )
00741     {
00742         cvs_err(_i18n("Impossible to open the temp file '%s' for write (error %d)"),
00743             (const char*)tmpFile, errno);
00744
00745         return 0L;
00746     }
00747
00748     CStreamConsole console(res);
00749
00750     int ret = launchCVS(dir, args.Argc(), args.Argv(), &console);
00751     fseek(res, 0L, SEEK_SET);
00752
00753     // if CVS breaks, we should recognize it (e.g. ext. diff should only start if everything goes fine)
00754     if( ret != 0 )
00755     {
00756         fclose(res);
00757         res = NULL;
00758     }
00759
00760     return res;
00761 }

int launchCVS | ( | const char * | path,
 |  | int | argc,
 |  | char *const * | argv,
 |  | CCvsConsole * | console
 | ) |

Launch cvs command

Parameters:
path | Cvs binary file
argc | Arguments count
argv | Arguments
console | Console
Returns:
The process return error code
Definition at line 719 of file AppGlue.cpp.
00720 {
00721     return launchCVS(FALSE, path, argc, argv, console, NULL);
00722 }

int launchCVS | ( | int | test,
 |  | const char * | path,
 |  | int | argc,
 |  | char *const * | argv,
 |  | CCvsConsole * | console,
 |  | const char * | cvsfile
 | ) |

Launch CVS command

Parameters:
test | CVS testing
path | CVS binary file
argc | Arguments count
argv | Arguments
console | Console
cvsfile | CVS binary file
Returns:
The process return error code
Definition at line 487 of file AppGlue.cpp.
00488 {
00489 #if INTERNAL_AUTHEN
00490     CAuthenSetUp setupEnv;
00491 #endif /* INTERNAL_AUTHEN */
00492     CvsProcessStartupInfo startupInfo;
00493
00494     startupInfo.hasTty = ( !test ? gCvsPrefs.CvsConsole() : true ); // test cvs has always tty (prevent printing cvs version info on console
00495     startupInfo.currentDirectory = path;
00496
00497 #ifdef WIN32
00498     WORD wShowWindow = startupInfo.showWindowState;
00499     switch( gCvsPrefs.ShowCvs() )
00500     {
00501     case SHOWCVS_HIDE:
00502         wShowWindow = SW_HIDE;
00503         break;
00504     case SHOWCVS_SHOWNORMAL:
00505         wShowWindow = SW_SHOWNORMAL;
00506         break;
00507     case SHOWCVS_SHOWNOACTIVATE:
00508         wShowWindow = SW_SHOWNOACTIVATE;
00509         break;
00510     case SHOWCVS_SHOWMINNOACTIVE:
00511         wShowWindow = SW_SHOWMINNOACTIVE;
00512         break;
00513     default:
00514         break;
00515     }
00516
00517     startupInfo.showWindowState = wShowWindow;
00518 #endif
00519
00520     CCvsProcessData* pCvsProcessData = NULL;
00521     if( console )
00522     {
00523         pCvsProcessData = new CCvsProcessData;
00524         if( pCvsProcessData )
00525         {
00526             pCvsProcessData->SetCvsConsole(console);
00527         }
00528     }
00529
00530     CStr cvscmd;
00531
00532 #ifdef WIN32
00533     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00534 #elif qUnix
00535     UCvsApp* app = UCvsApp::gApp;
00536 #elif TARGET_RT_MAC_MACHO
00537     CMacCvsApp* app = CMacCvsApp::gApp;
00538 #endif
00539
00540     if( app->IsCvsRunning() && cvs_process_is_active(app->GetCvsProcess()) )
00541     {
00542         cvs_err(_i18n("Error: CVS is already running !\n"));
00543         return -1;
00544     }
00545
00546 #if qUnix || TARGET_RT_MAC_MACHO
00547     if(path != 0L && chdir(path) != 0) {
00548         cvs_err(("Error: cannot chdir to %s (error %d)!\n"), path, errno);
00549     }
00550 #endif // qUnix
00551
00552     app->SetCvsStopping(false);
00553
00554     if( !test )
00555     {
00556         gCvsPrefs.WhichCvs(cvscmd, gCvsPrefs.UseAltCvs());
00557         sLastExitCode = 0;
00558     }
00559     else
00560     {
00561         cvscmd = cvsfile;
00562         sLastExitCode = errNoCvsguiProtocol;
00563     }
00564
00565 #if qUnix || TARGET_RT_MAC_MACHO
00566     struct stat sb;
00567
00568     if( stat(cvscmd, &sb) == -1 ||
00569 #if qUnix || TARGET_RT_MAC_MACHO
00570          S_ISLNK(sb.st_mode) ||
00571 #endif
00572          !(S_ISREG(sb.st_mode)) )
00573     {
00574         cvs_err(_i18n("Unable to find the cvs process in : (error %d)\n"), errno);
00575         cvs_err("1) %s\n", (const char*)cvscmd);
00576
00577         return errInternal;
00578     }
00579 #endif
00580
00581     CvsProcess* proc = cvs_process_run(cvscmd.c_str(), argc - 1, (char**)argv + 1, &sCallTable, &startupInfo, (void*)pCvsProcessData);
00582     if( proc == 0L )
00583     {
00584         CStr errorDetails;
00585
00586         if( startupInfo.errorInfo == badArguments )
00587         {
00588             errorDetails = "Invalid call arguments";
00589         }
00590         else if( startupInfo.errorInfo == noMemory )
00591         {
00592             errorDetails = "No memory to create CVS process";
00593         }
00594         else if( startupInfo.errorInfo == systemError )
00595         {
00596 #ifndef WIN32
00597             errorDetails = strerror(startupInfo.lastErrnoValue);
00598             errorDetails += " (error ";
00599             errorDetails += startupInfo.lastErrnoValue;
00600             errorDetails += ")";
00601 #else
00602             CStr strMsg;
00603             LPVOID lpvBuffer = NULL;
00604
00605             FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
00606                 NULL,
00607                 startupInfo.lastErrorValue,
00608                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
00609                 (LPTSTR)&lpvBuffer,
00610                 0,
00611                 NULL);
00612
00613             strMsg += (char*)lpvBuffer;
00614
00615             // Trim the padding newline characters
00616             strMsg.rtrim( "\r\n");
00617
00618             if( lpvBuffer )
00619             {
00620                 LocalFree(lpvBuffer);
00621             }
00622
00623             errorDetails = strMsg;
00624 #endif
00625         }
00626         else
00627         {
00628             errorDetails = "Unknown error";
00629         }
00630
00631         cvs_err(_i18n("Unable to initialize the CVS process: %s\n"), errorDetails.c_str());
00632         cvs_err(_i18n("The CVS used is : %s\n"), cvscmd.c_str());
00633     }
00634     else
00635     {
00636         app->SetCvsRunning(true);
00637         app->SetCvsProcess(proc);
00638 #if defined(WIN32) || defined(qUnix)
00639         app->PeekPumpAndIdle(true);
00640 #endif
00641 #if !defined(qUnix)  &&  !defined(TARGET_RT_MAC_MACHO)
00642         if( console != 0L )
00643 #endif
00644         {
00645             time_t start = time(NULL);
00646
00647             while( TRUE )
00648             {
00649 #if defined(WIN32) || defined(qUnix)
00650                 app->PeekPumpAndIdle(false);
00651 #endif
00652
00653 #if TARGET_RT_MAC_MACHO
00654                 glue_eventdispatcher(0L);
00655 #endif
00656                 cvs_process_give_time();
00657
00658                 if( !cvs_process_is_active(proc) )
00659                     break;
00660
00661                 if ( test && ( (time(NULL) - start) > 10 ) )
00662                 {
00663                     cvs_err(_i18n("testing cvs timed out\n"));
00664                     cvs_process_stop(proc);
00665                 }
00666             } // end while
00667 #if TARGET_RT_MAC_MACHO
00668             cvs_process_destroy(proc);
00669             app->SetCvsRunning(false);
00670             app->SetCvsProcess(NULL);
00671 #endif
00672         }
00673     }
00674
00675     return sLastExitCode;
00676 }

void stopCVS ( )

Stop running CVS command Definition at line 681 of file AppGlue.cpp.

References _i18n, CWincvsApp::GetCvsProcess(), and CWincvsApp::SetCvsStopping().

Referenced by CItemListDlg::OnCancel(), CCvsRootDlg::OnCancel(), and CWincvsApp::OnStopcvs().

00682 {
00683 #ifdef WIN32
00684
00685     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00686     app->SetCvsStopping(true);
00687
00688     ::PostMessage(AfxGetMainWnd()->GetSafeHwnd(),
00689         WM_SETMESSAGESTRING,
00690         0,
00691         (LPARAM)_i18n("***** Stopping CVS on user request !!! *****"));
00692
00693     // Commented out for now to avoid the deadlock
00694     //cvs_out(_i18n("***** Stopping CVS on user request !!! *****\n\n"));
00695
00696     cvs_process_stop(app->GetCvsProcess());
00697 #endif
00698 }

Here is the call graph for this function:

int testCVS | ( | const char * | cvsfile,
 |  | int | argc,
 |  | char *const * | argv
 | ) |

Test whether specified cvs binary supports cvsgui protocol

Parameters:
cvsfile | Cvs binary file
argc | Arguments count
argv | Arguments
Returns:
The process return error code
Definition at line 707 of file AppGlue.cpp.

References launchCVS(), and NULL.

00708 {
00709     return launchCVS(TRUE, NULL, argc, argv, NULL, cvsfile);
00710 }

Here is the call graph for this function:

void WaitForCvs ( void )

Wait for the CVS thread to terminate.

Definition at line 786 of file AppGlue.cpp.

References CWincvsApp::GetCvsProcess().

Referenced by CvsCmdLogin(), and CWincvsApp::SaveAllModified().

00787 {
00788     // pump messages manually
00789     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00790
00791     while( TRUE )
00792     {
00793         if( app->GetCvsProcess() == 0L )
00794             return;
00795
00796         if( !cvs_process_is_active(app->GetCvsProcess()) )
00797             return;
00798
00799         Sleep(100);
00800     }
00801 }

Here is the call graph for this function:

Variable Documentation

CvsProcessCallbacks sCallTable [static]

Initial value:

 {
    glue_consoleout,
    glue_consoleerr,
    glue_getenv,
    glue_exit,
    glue_ondestroy
}
Definition at line 112 of file AppGlue.cpp.

Referenced by launchCVS().

int sLastExitCode [static]

Last CVS command exit code.

Definition at line 101 of file AppGlue.cpp.

Referenced by glue_exit(), and launchCVS().

CTmpFiles sTmpList

Temporary files list.

Definition at line 104 of file AppGlue.cpp.

Referenced by launchCVS().

Generated on Sat Aug 7 22:43:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppGlue.h File Reference

common/AppGlue.h File Reference

#include <stdio.h>
#include <vector>
#include <fcntl.h>
#include <io.h>

Include dependency graph for AppGlue.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCvsProcessData
Application data holder passed to the cvsgui protocol callbacks. More...
class | CCvsConsole
Abstract base class for CVS process console. More...
class | CCvsStreamConsole
Base class for CVS stream console. More...
class | CStreamConsole
Class to implement stream console. More...
class | CTmpFiles
Class to support the clean up of any temporary files created. More...

Defines

#define | errInternal -99
#define | errThreadRunning -98
#define | errNoCvsguiProtocol -97

Typedefs

typedef _CvsProcess | CvsProcess

Functions

long | glue_consoleout (const char *txt, long len, const CvsProcess *process)
long | glue_consoleerr (const char *txt, long len, const CvsProcess *process)
long | glue_consolein (const char *txt, long len, const CvsProcess *process)
const char * | glue_getenv (const char *name, const CvsProcess *process)
void | glue_exit (int code, const CvsProcess *process)
void | glue_ondestroy (const CvsProcess *process)
int | testCVS (const char *path, int argc, char *const *argv)
int | launchCVS (const char *path, int argc, char *const *argv, CCvsConsole *console=0L)
int | launchCVS (int test, const char *path, int argc, char *const *argv, CCvsConsole *console=0L, const char *cvsfile=0L)
void | stopCVS ()
FILE * | launchCVS (const char *dir, const CvsArgs &args, UStr &tmpFile, const char *prefix=0L, const char *extension=0L)
const char * | launchCVS (const char *dir, const CvsArgs &args, const char *prefix=0L, const char *extension=0L)
void | WaitForCvs (void)
Wait for the CVS thread to terminate.

Define Documentation

#define errInternal -99

Definition at line 39 of file AppGlue.h.

Referenced by launchCVS().

#define errNoCvsguiProtocol -97

Definition at line 41 of file AppGlue.h.

Referenced by launchCVS().

#define errThreadRunning -98

Definition at line 40 of file AppGlue.h.

Typedef Documentation

typedef struct _CvsProcess CvsProcess

Definition at line 36 of file AppGlue.h.

Referenced by CWincvsApp::GetCvsProcess(), UCvsApp::GetCvsProcess(), glue_consoleerr(), glue_consolein(), glue_consoleout(), glue_exit(), glue_getenv(), glue_ondestroy(), launchCVS(), UCvsApp::OnMainTimer(), CWincvsApp::SetCvsProcess(), and UCvsApp::SetCvsProcess().

Function Documentation

long glue_consoleerr | ( | const char * | txt,
 |  | long | len,
 |  | const CvsProcess * | process
 | ) |

Send stderr of the CVS command to the console

Parameters:
txt | Text to be send to the console
len | Text length
process | CVS Process
Returns:
The printed text length
Definition at line 176 of file AppGlue.cpp.

References CCvsConsole::cvs_err(), cvs_errstr(), CVS_EXTERN_C, CvsProcess, and CCvsProcessData::GetCvsConsole().

00177 {
00178     if( process->appData )
00179     {
00180         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00181         if( pCvsProcessData->GetCvsConsole() )
00182         {
00183             return pCvsProcessData->GetCvsConsole()->cvs_err(txt, len);
00184         }
00185     }
00186
00187     cvs_errstr(txt, len);
00188
00189     return len;
00190 }

Here is the call graph for this function:

long glue_consolein | ( | const char * | txt,
 |  | long | len,
 |  | const CvsProcess * | process
 | ) |

Send stdin of the console to the CVS command

Parameters:
txt | Text to be send to the CVS command
len | Text length
process | CVS Process
Returns:
The sent text length
Definition at line 199 of file AppGlue.cpp.

References CVS_EXTERN_C, and CvsProcess.

00200 {
00201     return 0;
00202 }

long glue_consoleout | ( | const char * | txt,
 |  | long | len,
 |  | const CvsProcess * | process
 | ) |

Send stdout of the CVS command to the console

Parameters:
txt | Text to be send to the console
len | Text length
process | CVS Process
Returns:
The printed text length
Definition at line 153 of file AppGlue.cpp.

References CVS_EXTERN_C, CCvsConsole::cvs_out(), cvs_outstr(), CvsProcess, and CCvsProcessData::GetCvsConsole().

00154 {
00155     if( process->appData )
00156     {
00157         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00158         if( pCvsProcessData->GetCvsConsole() )
00159         {
00160             return pCvsProcessData->GetCvsConsole()->cvs_out(txt, len);
00161         }
00162     }
00163
00164     cvs_outstr(txt, len);
00165
00166     return len;
00167 }

Here is the call graph for this function:

void glue_exit | ( | int | code,
 |  | const CvsProcess * | process
 | ) |

Print the CVS command exit code

Parameters:
code | Exit code to print
process | CVS Process
Definition at line 138 of file AppGlue.cpp.

References _i18n, CVS_EXTERN_C, cvs_out(), CvsProcess, gCvsPrefs, CvsPrefs::IsTclFileRunning(), and sLastExitCode.

00139 {
00140     if( !gCvsPrefs.IsTclFileRunning() )
00141         cvs_out(_i18n("\n***** CVS exited normally with code %d *****\n\n"), code);
00142
00143     sLastExitCode = code;
00144 }

Here is the call graph for this function:

const char* glue_getenv | ( | const char * | name,
 |  | const CvsProcess * | process
 | ) |

Set the environmental variables for the CVS command

Parameters:
name | Environmental variable name
process | CVS Process
Returns:
The environmental variable value as const char*
Note:
Make sure that the returned pointer doesn't get deallocated prematurely
Definition at line 230 of file AppGlue.cpp.

References _i18n, BrowserGetDirectory(), BUTTONTITLE_NO, BUTTONTITLE_YES, CvsPrefs::CheckoutRO(), CompatGetPassword(), CStr, cvs_err(), CVS_EXTERN_C, CvsProcess, gCvsPrefs, getenv, CWincvsApp::GetEnvMainThread(), MacBinMaps::GetEnvPlainTypes(), MacBinMaps::GetEnvTypes(), CvsPrefs::Home(), CvsPrefs::ICTextOption(), ISO8559_none, CvsPrefs::IsoConvert(), kCvsAlertOKButton, kCvsAlertQuestionIcon, MAC_APPSINGLE, MAC_HQX, MAC_PLAIN_BINARY, CvsPrefs::MacBinEncodeBinariesOnly(), CvsPrefs::MacBinEncoding(), CvsPrefs::MacLF(), NULL, CvsPrefs::save(), CvsPrefs::SetHome(), CvsAlert::ShowAlert(), and CvsPrefs::UnixLF().

Referenced by CMainFrame::OnTimer().

00231 {
00232     if( name == NULL )
00233         return NULL;
00234
00235 #ifdef WIN32
00236     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00237     if( !app )
00238     {
00239         ASSERT(FALSE);  // need an application object
00240         return NULL;
00241     }
00242
00243     if( ::GetCurrentThreadId() != app->m_nThreadID &&
00244         (strcmp(name, "CVS_GETPASS") == 0 || strcmp(name, "CVSLIB_YESNO") == 0 ||
00245         strcmp(name, "HOME") == 0) )
00246     {
00247         return app->GetEnvMainThread(name);
00248     }
00249 #endif /* WIN32 */
00250
00251 #ifdef TARGET_OS_MAC
00252     char* result;
00253     if( (result = ae_getenv(name)) != (char*)-1 )
00254     {
00255         if( result == 0L && isGlobalEnvVariable(name) )
00256         {
00257             // in this case only we let continue
00258             // to get the MacCVS settings. So the CWCVS
00259             // users (or any AppleEvent user) can set
00260             // these variables in MacCVS but still can overide
00261             // them using Apple Events.
00262         }
00263         else
00264             return result;
00265     }
00266 #endif /* TARGET_OS_MAC */
00267
00268 #if INTERNAL_AUTHEN
00269     // Give a chance for the new AuthenModel to react to the getenv callback
00270     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00271     std::vector<AuthenModel*>& allInstances = AuthenModel::GetAllInstances();
00272     std::vector<AuthenModel*>::const_iterator i;
00273
00274     if( curModel != 0L )
00275     {
00276         const char* res = curModel->OnGetEnv(name);
00277         if( res != 0L )
00278             return res;
00279     }
00280
00281     for(i = allInstances.begin(); i != allInstances.end(); ++i)
00282     {
00283         AuthenModel* model = *i;
00284
00285         if( model == curModel )
00286             continue;
00287
00288         const char* res = model->OnGetEnv(name);
00289         if( res != 0L )
00290             return res;
00291     }
00292
00293     if( strcmp(name, "USER") == 0
00294 #ifdef WIN32
00295         // I do that (and see the "STRATA_HACK" in
00296         // subr.c) because people get tired on Windows
00297         // to have to check their Windows login :
00298         // this is only for .rhosts authentication.
00299         || strcmp(name, "LOGNAME") == 0
00300 #endif /* WIN32 */
00301         )
00302     {
00303         static char user[64];
00304
00305         // extract from the cvsroot
00306         const char* ccvsroot = gCvsPrefs;
00307         ccvsroot = Authen::skiptoken(ccvsroot);
00308         char* login = strchr(ccvsroot, '@');
00309         if( login == NULL )
00310         {
00311             // for WIN32/gcvs this means the CVSROOT is local
00312 #ifdef TARGET_OS_MAC
00313             cvs_err(_i18n("MacCvs: Cannot extract login from cvsroot %s !\n"), ccvsroot);
00314 #endif /* TARGET_OS_MAC */
00315             return NULL;
00316         }
00317
00318         int length = login - ccvsroot;
00319         memcpy(user, ccvsroot, length * sizeof(char));
00320         user[length] = '\0';
00321
00322         return user;
00323     }
00324     else if( strcmp(name, "CVSROOT") == 0 )
00325     {
00326         static CStr root;
00327
00328         // extract from the cvsroot
00329         const char* ccvsroot = gCvsPrefs;
00330         ccvsroot = Authen::skiptoken(ccvsroot);
00331         root = gAuthen.token();
00332         root << ccvsroot;
00333
00334         return root;
00335     }
00336     else
00337 #endif /* INTERNAL_AUTHEN */
00338     if( strcmp(name, "CVSREAD") == 0 )
00339     {
00340         return gCvsPrefs.CheckoutRO() ? (char*)"1" : 0L;
00341     }
00342     else if( strncmp(name, "CVS_GETPASS", strlen("CVS_GETPASS")) == 0 )
00343     {
00344         UStr str(_i18n("Enter the password:"));
00345         char *tmp;
00346         if( (tmp = strchr(name, '=')) != 0L )
00347         {
00348             str = ++tmp;
00349         }
00350
00351         return CompatGetPassword(str);
00352     }
00353     else if( strcmp(name, "CVSLIB_YESNO") == 0 )
00354     {
00355 #ifdef qMacCvsPP
00356         // let user know we need some input
00357         CMacCvsApp::gApp->InteractWithUser();
00358         // make sure log window is front-most window, visible and not minimized, since we're referring to it in our [modal] alert
00359         LWindow* logwindow = CMacCvsApp::gApp->GetLogWindow();
00360         if ( logwindow )
00361         {
00362             if ( !logwindow->IsVisible() ) logwindow->Show();
00363             if ( IsWindowCollapsed(logwindow->GetMacWindow()) ) CollapseWindow(logwindow->GetMacWindow(), false);
00364             logwindow->Select();
00365         }
00366 #endif /* qMacCvsPP */
00367
00368         CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00369             _i18n("CVS is requiring you to answer yes or no."), _i18n("(See the console for details)"),
00370             BUTTONTITLE_YES, BUTTONTITLE_NO);
00371
00372         return cvsAlert.ShowAlert() == kCvsAlertOKButton ? "yes" : "no";
00373     }
00374 #if DIRTY_MCP_SUPPORT
00375     else if( strcmp(name, "DIRTY_MCP") == 0 )
00376     {
00377         return gCvsPrefs.DirtySupport() ? "yes" : "no";
00378     }
00379 #endif
00380 #ifdef WIN32
00381     else if( strcmp(name, "HOME") == 0 )
00382     {
00383         // prompt for home the first time
00384         if( gCvsPrefs.Home() == 0L )
00385         {
00386             char oldpath[_MAX_PATH];
00387             getcwd(oldpath, _MAX_PATH-1);
00388
00389             CStr home;
00390             if( !BrowserGetDirectory(_i18n("Select your home directory"), home) )
00391             {
00392                 chdir(oldpath);
00393                 return 0L;
00394             }
00395
00396             gCvsPrefs.SetHome(home);
00397             gCvsPrefs.save();
00398             chdir(oldpath);
00399         }
00400
00401         // Windows 98 doesn't like C:\/.cvspass
00402         static CStr home;
00403         home = gCvsPrefs.Home();
00404         home.rtrim (kPathDelimiter);
00405
00406         return home;
00407     }
00408     else if( strcmp(name, "CVSUSEUNIXLF") == 0 )
00409     {
00410         return gCvsPrefs.UnixLF() ? "1" : 0L;
00411     }
00412 #endif /*WIN32 */
00413 #if TARGET_RT_MAC_MACHO
00414     else if( strcmp(name, "CVS_MACLF") == 0 )
00415     {
00416         return gCvsPrefs.MacLF() ? "1" : 0L;
00417     }
00418 #endif
00419 #ifdef TARGET_OS_MAC
00420     else if( strcmp(name, "ISO8859") == 0 )
00421     {
00422         static char iso[6];
00423
00424         if( gCvsPrefs.IsoConvert() == ISO8559_none )
00425             return 0L;
00426
00427         sprintf(iso, "%d", (int)gCvsPrefs.IsoConvert());
00428         return iso;
00429     }
00430     else if( strcmp(name, "IC_ON_TXT") == 0 )
00431     {
00432         return gCvsPrefs.ICTextOption() ? "1" : 0L;
00433     }
00434     else if( strcmp(name, "MAC_ENCODE_ONLY_BINARY_FILES") == 0 )
00435     {
00436         return gCvsPrefs.MacBinEncodeBinariesOnly() ? "1" : 0L;
00437     }
00438     else if( strcmp(name, "MAC_DEFAULT_RESOURCE_ENCODING") == 0 )
00439     {
00440         switch(gCvsPrefs.MacBinEncoding())
00441         {
00442             case MAC_HQX:
00443                 return (char*)"HQX";
00444                 break;
00445             case MAC_APPSINGLE:
00446                 return (char*)"AppleSingle";
00447                 break;
00448             case MAC_PLAIN_BINARY:
00449                 return (char*)"PlainBinary";
00450                 break;
00451         }
00452         return 0L;
00453     }
00454     else if( strcmp(name, "MAC_BINARY_TYPES_SINGLE") == 0 )
00455     {
00456         return (char*)MacBinMaps::GetEnvTypes(MAC_APPSINGLE);
00457     }
00458     else if( strcmp(name, "MAC_BINARY_TYPES_HQX") == 0 )
00459     {
00460         return (char*)MacBinMaps::GetEnvTypes(MAC_HQX);
00461     }
00462     else if( strcmp(name, "MAC_BINARY_TYPES_PLAIN") == 0 )
00463     {
00464         return (char*)MacBinMaps::GetEnvPlainTypes();
00465     }
00466 #endif /* TARGET_OS_MAC */
00467     else
00468     {
00469         char* res;
00470         res = getenv(name);
00471         return res;
00472     }
00473
00474     return NULL;
00475 }

Here is the call graph for this function:

void glue_ondestroy ( const CvsProcess * process )

Release any application data allocated

Parameters:
process CVS Process
Definition at line 124 of file AppGlue.cpp.

References CVS_EXTERN_C, and CvsProcess.

00125 {
00126     if( process->appData )
00127     {
00128         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00129         delete pCvsProcessData;
00130     }
00131 }

const char* launchCVS | ( | const char * | dir,
 |  | const CvsArgs & | args,
 |  | const char * | prefix,
 |  | const char * | extension
 | ) |

Launch cvs command and put the cvs output in a file

Parameters:
dir | Directory
args | Cvs arguments
prefix | File prefix
extension | File extension
Returns:
The file name on success, NULL on error
Note:
The temp file is automatically removed when quitting
Definition at line 772 of file AppGlue.cpp.

References CStr, CTmpFiles::push_back(), and sTmpList.

Referenced by CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdImportModule(), CvsCmdInit(), CvsCmdLock(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdRelease(), CvsCmdRemove(), CvsCmdRtag(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), cvsgui_RunCvs(), CvsLogParse(), launchCVS(), LaunchCvsRootCommand(), LaunchItemListCommand(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), CGraphView::RetrieveSel(), CGraphView::SaveSel(), tclCvsProc(), and testCVS().

00774 {
00775     CStr filename;
00776     FILE* file = launchCVS(dir, args, filename, prefix, extension);
00777     if( file == 0L )
00778         return 0L;
00779
00780     fclose(file);
00781
00782     return sTmpList.push_back(filename);
00783 }

Here is the call graph for this function:

FILE* launchCVS | ( | const char * | dir,
 |  | const CvsArgs & | args,
 |  | UStr & | tmpFile,
 |  | const char * | prefix,
 |  | const char * | extension
 | ) |

Launch cvs command and send a stream of the cvs output into a file

Parameters:
dir | Directory
args | Cvs arguments
tmpFile | File name
prefix | File prefix
extension | File extension
Returns:
The output file handle on success, NULL on error
Definition at line 733 of file AppGlue.cpp.

References _i18n, CvsArgs::Argc(), CvsArgs::Argv(), cvs_err(), gCvsPrefs, launchCVS(), MakeTmpFile(), NULL, and CvsPrefs::UnixLF().

00735 {
00736     if( !MakeTmpFile(tmpFile, prefix, extension) )
00737         return 0L;
00738
00739     FILE* res = fopen(tmpFile, gCvsPrefs.UnixLF() ? "wb+" : "w+");
00740     if( res == 0L )
00741     {
00742         cvs_err(_i18n("Impossible to open the temp file '%s' for write (error %d)"),
00743             (const char*)tmpFile, errno);
00744
00745         return 0L;
00746     }
00747
00748     CStreamConsole console(res);
00749
00750     int ret = launchCVS(dir, args.Argc(), args.Argv(), &console);
00751     fseek(res, 0L, SEEK_SET);
00752
00753     // if CVS breaks, we should recognize it (e.g. ext. diff should only start if everything goes fine)
00754     if( ret != 0 )
00755     {
00756         fclose(res);
00757         res = NULL;
00758     }
00759
00760     return res;
00761 }

Here is the call graph for this function:

int launchCVS | ( | int | test,
 |  | const char * | path,
 |  | int | argc,
 |  | char *const * | argv,
 |  | CCvsConsole * | console,
 |  | const char * | cvsfile
 | ) |

Launch CVS command

Parameters:
test | CVS testing
path | CVS binary file
argc | Arguments count
argv | Arguments
console | Console
cvsfile | CVS binary file
Returns:
The process return error code
Definition at line 487 of file AppGlue.cpp.

References _i18n, CStr, cvs_err(), CvsPrefs::CvsConsole(), CvsProcess, errInternal, errNoCvsguiProtocol, gCvsPrefs, glue_eventdispatcher(), NULL, sCallTable, CCvsProcessData::SetCvsConsole(), CvsPrefs::ShowCvs(), SHOWCVS_HIDE, SHOWCVS_SHOWMINNOACTIVE, SHOWCVS_SHOWNOACTIVATE, SHOWCVS_SHOWNORMAL, sLastExitCode, stat::st_mode, stat, CvsPrefs::UseAltCvs(), and CvsPrefs::WhichCvs().

00488 {
00489 #if INTERNAL_AUTHEN
00490     CAuthenSetUp setupEnv;
00491 #endif /* INTERNAL_AUTHEN */
00492     CvsProcessStartupInfo startupInfo;
00493
00494     startupInfo.hasTty = ( !test ? gCvsPrefs.CvsConsole() : true ); // test cvs has always tty (prevent printing cvs version info on console
00495     startupInfo.currentDirectory = path;
00496
00497 #ifdef WIN32
00498     WORD wShowWindow = startupInfo.showWindowState;
00499     switch( gCvsPrefs.ShowCvs() )
00500     {
00501     case SHOWCVS_HIDE:
00502         wShowWindow = SW_HIDE;
00503         break;
00504     case SHOWCVS_SHOWNORMAL:
00505         wShowWindow = SW_SHOWNORMAL;
00506         break;
00507     case SHOWCVS_SHOWNOACTIVATE:
00508         wShowWindow = SW_SHOWNOACTIVATE;
00509         break;
00510     case SHOWCVS_SHOWMINNOACTIVE:
00511         wShowWindow = SW_SHOWMINNOACTIVE;
00512         break;
00513     default:
00514         break;
00515     }
00516
00517     startupInfo.showWindowState = wShowWindow;
00518 #endif
00519
00520     CCvsProcessData* pCvsProcessData = NULL;
00521     if( console )
00522     {
00523         pCvsProcessData = new CCvsProcessData;
00524         if( pCvsProcessData )
00525         {
00526             pCvsProcessData->SetCvsConsole(console);
00527         }
00528     }
00529
00530     CStr cvscmd;
00531
00532 #ifdef WIN32
00533     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00534 #elif qUnix
00535     UCvsApp* app = UCvsApp::gApp;
00536 #elif TARGET_RT_MAC_MACHO
00537     CMacCvsApp* app = CMacCvsApp::gApp;
00538 #endif
00539
00540     if( app->IsCvsRunning() && cvs_process_is_active(app->GetCvsProcess()) )
00541     {
00542         cvs_err(_i18n("Error: CVS is already running !\n"));
00543         return -1;
00544     }
00545
00546 #if qUnix || TARGET_RT_MAC_MACHO
00547     if(path != 0L && chdir(path) != 0) {
00548         cvs_err(("Error: cannot chdir to %s (error %d)!\n"), path, errno);
00549     }
00550 #endif // qUnix
00551
00552     app->SetCvsStopping(false);
00553
00554     if( !test )
00555     {
00556         gCvsPrefs.WhichCvs(cvscmd, gCvsPrefs.UseAltCvs());
00557         sLastExitCode = 0;
00558     }
00559     else
00560     {
00561         cvscmd = cvsfile;
00562         sLastExitCode = errNoCvsguiProtocol;
00563     }
00564
00565 #if qUnix || TARGET_RT_MAC_MACHO
00566     struct stat sb;
00567
00568     if( stat(cvscmd, &sb) == -1 ||
00569 #if qUnix || TARGET_RT_MAC_MACHO
00570          S_ISLNK(sb.st_mode) ||
00571 #endif
00572          !(S_ISREG(sb.st_mode)) )
00573     {
00574         cvs_err(_i18n("Unable to find the cvs process in : (error %d)\n"), errno);
00575         cvs_err("1) %s\n", (const char*)cvscmd);
00576
00577         return errInternal;
00578     }
00579 #endif
00580
00581     CvsProcess* proc = cvs_process_run(cvscmd.c_str(), argc - 1, (char**)argv + 1, &sCallTable, &startupInfo, (void*)pCvsProcessData);
00582     if( proc == 0L )
00583     {
00584         CStr errorDetails;
00585
00586         if( startupInfo.errorInfo == badArguments )
00587         {
00588             errorDetails = "Invalid call arguments";
00589         }
00590         else if( startupInfo.errorInfo == noMemory )
00591         {
00592             errorDetails = "No memory to create CVS process";
00593         }
00594         else if( startupInfo.errorInfo == systemError )
00595         {
00596 #ifndef WIN32
00597             errorDetails = strerror(startupInfo.lastErrnoValue);
00598             errorDetails += " (error ";
00599             errorDetails += startupInfo.lastErrnoValue;
00600             errorDetails += ")";
00601 #else
00602             CStr strMsg;
00603             LPVOID lpvBuffer = NULL;
00604
00605             FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
00606                 NULL,
00607                 startupInfo.lastErrorValue,
00608                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
00609                 (LPTSTR)&lpvBuffer,
00610                 0,
00611                 NULL);
00612
00613             strMsg += (char*)lpvBuffer;
00614
00615             // Trim the padding newline characters
00616             strMsg.rtrim( "\r\n");
00617
00618             if( lpvBuffer )
00619             {
00620                 LocalFree(lpvBuffer);
00621             }
00622
00623             errorDetails = strMsg;
00624 #endif
00625         }
00626         else
00627         {
00628             errorDetails = "Unknown error";
00629         }
00630
00631         cvs_err(_i18n("Unable to initialize the CVS process: %s\n"), errorDetails.c_str());
00632         cvs_err(_i18n("The CVS used is : %s\n"), cvscmd.c_str());
00633     }
00634     else
00635     {
00636         app->SetCvsRunning(true);
00637         app->SetCvsProcess(proc);
00638 #if defined(WIN32) || defined(qUnix)
00639         app->PeekPumpAndIdle(true);
00640 #endif
00641 #if !defined(qUnix)  &&  !defined(TARGET_RT_MAC_MACHO)
00642         if( console != 0L )
00643 #endif
00644         {
00645             time_t start = time(NULL);
00646
00647             while( TRUE )
00648             {
00649 #if defined(WIN32) || defined(qUnix)
00650                 app->PeekPumpAndIdle(false);
00651 #endif
00652
00653 #if TARGET_RT_MAC_MACHO
00654                 glue_eventdispatcher(0L);
00655 #endif
00656                 cvs_process_give_time();
00657
00658                 if( !cvs_process_is_active(proc) )
00659                     break;
00660
00661                 if ( test && ( (time(NULL) - start) > 10 ) )
00662                 {
00663                     cvs_err(_i18n("testing cvs timed out\n"));
00664                     cvs_process_stop(proc);
00665                 }
00666             } // end while
00667 #if TARGET_RT_MAC_MACHO
00668             cvs_process_destroy(proc);
00669             app->SetCvsRunning(false);
00670             app->SetCvsProcess(NULL);
00671 #endif
00672         }
00673     }
00674
00675     return sLastExitCode;
00676 }

Here is the call graph for this function:

int launchCVS | ( | const char * | path,
 |  | int | argc,
 |  | char *const * | argv,
 |  | CCvsConsole * | console
 | ) |

Launch cvs command

Parameters:
path | Cvs binary file
argc | Arguments count
argv | Arguments
console | Console
Returns:
The process return error code
Definition at line 719 of file AppGlue.cpp.

References launchCVS(), and NULL.

00720 {
00721     return launchCVS(FALSE, path, argc, argv, console, NULL);
00722 }

Here is the call graph for this function:

void stopCVS ( )

Stop running CVS command Definition at line 681 of file AppGlue.cpp.

References _i18n, CWincvsApp::GetCvsProcess(), and CWincvsApp::SetCvsStopping().

Referenced by CCvsRootDlg::OnCancel(), CItemListDlg::OnCancel(), and CWincvsApp::OnStopcvs().

00682 {
00683 #ifdef WIN32
00684
00685     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00686     app->SetCvsStopping(true);
00687
00688     ::PostMessage(AfxGetMainWnd()->GetSafeHwnd(),
00689         WM_SETMESSAGESTRING,
00690         0,
00691         (LPARAM)_i18n("***** Stopping CVS on user request !!! *****"));
00692
00693     // Commented out for now to avoid the deadlock
00694     //cvs_out(_i18n("***** Stopping CVS on user request !!! *****\n\n"));
00695
00696     cvs_process_stop(app->GetCvsProcess());
00697 #endif
00698 }

Here is the call graph for this function:

int testCVS | ( | const char * | cvsfile,
 |  | int | argc,
 |  | char *const * | argv
 | ) |

Test whether specified cvs binary supports cvsgui protocol

Parameters:
cvsfile | Cvs binary file
argc | Arguments count
argv | Arguments
Returns:
The process return error code
Definition at line 707 of file AppGlue.cpp.

References launchCVS(), and NULL.

00708 {
00709     return launchCVS(TRUE, NULL, argc, argv, NULL, cvsfile);
00710 }

Here is the call graph for this function:

void WaitForCvs ( void )

Wait for the CVS thread to terminate.

Definition at line 786 of file AppGlue.cpp.

References CWincvsApp::GetCvsProcess().

Referenced by CvsCmdLogin(), and CWincvsApp::SaveAllModified().

00787 {
00788     // pump messages manually
00789     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00790
00791     while( TRUE )
00792     {
00793         if( app->GetCvsProcess() == 0L )
00794             return;
00795
00796         if( !cvs_process_is_active(app->GetCvsProcess()) )
00797             return;
00798
00799         Sleep(100);
00800     }
00801 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppGlue.mac.cpp File Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

common/AppGlue.mac.cpp File Reference

Go to the source code of this file.

Generated on Sat Aug 7 22:43:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppGlue.mac.h File Reference

common/AppGlue.mac.h File Reference

#include "dll_loader.h"

Include dependency graph for AppGlue.mac.h:

Include dependency graph

Go to the source code of this file.

Functions

int glue_eventdispatcher (EventRecord *ev)

Function Documentation

int glue_eventdispatcher ( EventRecord * ev )

Referenced by launchCVS().

Generated on Sat Aug 7 22:43:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AskYesNo.cpp File Reference

common/AskYesNo.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "AskYesNo.h"
#include "uwidget.h"
#include "cvsgui_i18n.h"

Include dependency graph for AskYesNo.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | UPromptMessage
class | UEditMessage

Functions

bool | PromptEditMessage (const char *msg, UStr &edit, const char *title, const char *def, const char *cncl)

Function Documentation

bool PromptEditMessage | ( | const char * | msg,
 |  | UStr & | edit,
 |  | const char * | title,
 |  | const char * | def,
 |  | const char * | cncl
 | ) |

Definition at line 158 of file AskYesNo.cpp.

References UWidget::DoModal(), EV_INIT_WIDGET, UCmdTarget::GetWidID(), IDD_EDITMESSAGE, kUMainWidget, UCreate_AskYesNoDlg(), and UEventSendMessage().

Referenced by cvsgui_PromptEditMessage().

00159 {
00160     bool res = false;
00161 #if qUnix
00162     void *wid = UCreate_AskYesNoDlg();
00163     UEditMessage* dlg = new UEditMessage(msg, edit, title, def, cncl);
00164     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00165     res = dlg->DoModal();
00166
00167 #else
00168
00169     std::auto_ptr<UEditMessage> dlg(new UEditMessage(msg, edit, title, def, cncl));
00170
00171 #ifdef WIN32
00172     res = dlg->DoModal(IDD_EDITMESSAGE);
00173 #endif
00174 #ifdef qMacCvsPP
00175     res = dlg->DoModal(dlg_PromptEditCommand);
00176 #endif
00177
00178 #endif
00179     if(res)
00180         edit = dlg->m_edit;
00181
00182     return res;
00183 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AskYesNo.h File Reference

common/AskYesNo.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | AFX_ASKYESNO_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_

Functions

bool | PromptEditMessage (const char *msg, UStr &edit, const char *title="Message", const char *def="OK", const char *cncl="Cancel")

Define Documentation

#define AFX_ASKYESNO_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_

Definition at line 24 of file AskYesNo.h.

Function Documentation

bool PromptEditMessage | ( | const char * | msg,
 |  | UStr & | edit,
 |  | const char * | title = "Message",
 |  | const char * | def = "OK",
 |  | const char * | cncl = "Cancel"
 | ) |

Definition at line 158 of file AskYesNo.cpp.

References UWidget::DoModal(), EV_INIT_WIDGET, UCmdTarget::GetWidID(), IDD_EDITMESSAGE, kUMainWidget, UCreate_AskYesNoDlg(), and UEventSendMessage().

Referenced by cvsgui_PromptEditMessage().

00159 {
00160     bool res = false;
00161 #if qUnix
00162     void *wid = UCreate_AskYesNoDlg();
00163     UEditMessage* dlg = new UEditMessage(msg, edit, title, def, cncl);
00164     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00165     res = dlg->DoModal();
00166
00167 #else
00168
00169     std::auto_ptr<UEditMessage> dlg(new UEditMessage(msg, edit, title, def, cncl));
00170
00171 #ifdef WIN32
00172     res = dlg->DoModal(IDD_EDITMESSAGE);
00173 #endif
00174 #ifdef qMacCvsPP
00175     res = dlg->DoModal(dlg_PromptEditCommand);
00176 #endif
00177
00178 #endif
00179     if(res)
00180         edit = dlg->m_edit;
00181
00182     return res;
00183 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/Authen.cpp File Reference

common/Authen.cpp File Reference

#include "stdafx.h"
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "CvsPrefs.h"
#include "Authen.h"
#include "AppConsole.h"
#include "MultiFiles.h"
#include "PromptFiles.h"
#include "CvsArgs.h"
#include "uwidget.h"
#include "SmartComboBox.h"
#include "CvsCommands.h"
#include "cvsgui_i18n.h"
#include <algorithm>

Include dependency graph for Authen.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:43:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/Authen.h File Reference

common/Authen.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:43:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewColumn.cpp File Reference

common/BrowseViewColumn.cpp File Reference

#include "stdafx.h"
#include "FileTraversal.h"
#include "BrowseViewColumn.h"
#include "CvsEntries.h"
#include "cvsgui_i18n.h"
#include "wincvs_winutil.h"
#include <time.h>

Include dependency graph for BrowseViewColumn.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | KoNameColumn
Name column. More...
class | KoExtColumn
Extension column. More...
class | KoPathColumn
Path column. More...
class | KoRevisionColumn
Revision column. More...
class | KoOptionColumn
Option column. More...
class | KoEncodingColumn
Encoding column. More...
class | KoStateColumn
State column. More...
class | KoTagColumn
Tag column. More...
class | KoDateColumn
Date column. More...
class | KoConflictColumn
Conflict column. More...
class | KoRegularModel
Regular columnar model. More...
class | KoRecursiveModel
Recursive columnar model. More...

Defines

#define | _countof(array) (sizeof(array)/sizeof(array[0]))
Get the size of an array.
#define | PLATFORM_COLUMN_WIDTH(mac, other) other

Functions

int CALLBACK | _Compare (LPARAM data1, LPARAM data2, LPARAM data)
Compare callback.

Variables

KoNameColumn nameColumn
Name column.
KoExtColumn extColumn
Extension column.
KoPathColumn pathColumn
Path column.
KoRevisionColumn revisionColumn
Revision column.
KoOptionColumn optionColumn
Option column.
KoEncodingColumn encodingColumn
Encoding column.
KoStateColumn stateColumn
State column.
KoTagColumn tagColumn
Tag column.
KoDateColumn dateColumn
Date column.
KoConflictColumn conflictColumn
Conflict column.
const KiColumn * | columnsRegular []
All columns for regular view.
const int | typesRegular []
All columns types for regular view.
const KiColumn * | columnsRecursive []
All columns for flat view.
const int | typesRecursive []
All columns types for flat view.
KoRegularModel modelRegular
Regular columnar model.
KoRecursiveModel modelRecursive
Recursive columnar model.

Define Documentation

#define _countof ( array ) (sizeof(array)/sizeof(array[0]))

Get the size of an array.

Definition at line 44 of file BrowseViewColumn.cpp.

#define PLATFORM_COLUMN_WIDTH | ( | mac,
 |  | other | ) | other

Definition at line 50 of file BrowseViewColumn.cpp.

Referenced by KoDateColumn::GetSetupData(), KoStateColumn::GetSetupData(), KoRevisionColumn::GetSetupData(), KoPathColumn::GetSetupData(), KoExtColumn::GetSetupData(), and KoNameColumn::GetSetupData().

Function Documentation

int CALLBACK _Compare | ( | LPARAM | data1,
 |  | LPARAM | data2,
 |  | LPARAM | data
 | ) |

Compare callback.

Compare callback function

Parameters:
data1 | First node data
data2 | Second node data
data | Sort parameters data
Returns:
-1, 0 or +1
Definition at line 65 of file BrowseViewColumn.cpp.

References KiColumn::Compare(), ENT_SUBDIR, KiColumn::GetColumnIndex(), EntnodeData::GetType(), CSortParam::m_column, CSortParam::m_columnAlt, CSortParam::m_context, CSortParam::m_fAccendant, CSortParam::m_fGroupSubDir, and NULL.

Referenced by gtkCompareWrap(), and CBrowseFileView::Resort().

00069 {
00070     int res = 0;
00071
00072     const EntnodeData* d1 = (const EntnodeData*)data1;
00073     const EntnodeData* d2 = (const EntnodeData*)data2;
00074
00075     const CSortParam* pSortParam = (CSortParam*)data;
00076
00077     bool overrideCompare = false;
00078
00079     if( pSortParam->m_fGroupSubDir )
00080     {
00081         // Group sub-directories
00082         const int d1IsDir = d1->GetType() == ENT_SUBDIR ? 1 : 0;
00083         const int d2IsDir = d2->GetType() == ENT_SUBDIR ? 1 : 0;
00084
00085         if( (d1IsDir + d2IsDir) == 1 )
00086         {
00087             // One (and only one of them) is a directory
00088             overrideCompare = true;
00089             res = d1IsDir ? -1 : 1;
00090         }
00091     }
00092
00093     if( !overrideCompare )
00094     {
00095         const int columnIndex = pSortParam->m_column->GetColumnIndex();
00096
00097         if( columnIndex == ColumnIndex::kOption ||
00098             columnIndex == ColumnIndex::kState ||
00099             columnIndex == ColumnIndex::kStickyTag ||
00100             columnIndex == ColumnIndex::kConflict )
00101         {
00102             // Make the non-empty items show on top
00103             const char* s1;
00104             const char* s2;
00105             const int f1IsEmpty = ((s1 = (*d1)[pSortParam->m_column->GetColumnIndex()]) == NULL || strcmp(s1, "") == 0) ? 1 : 0;
00106             const int f2IsEmpty = ((s2 = (*d2)[pSortParam->m_column->GetColumnIndex()]) == NULL || strcmp(s2, "") == 0) ? 1 : 0;
00107
00108             if( (f1IsEmpty + f2IsEmpty) == 1 )
00109             {
00110                 // One (and only one of them) is empty
00111                 overrideCompare = true;
00112                 res = f1IsEmpty ? 1 : -1;
00113             }
00114         }
00115     }
00116
00117     if( !overrideCompare )
00118     {
00119         res = pSortParam->m_column->Compare(pSortParam->m_context, d1, d2);
00120
00121         if( res == 0 && pSortParam->m_column != pSortParam->m_columnAlt )
00122         {
00123             res = pSortParam->m_columnAlt->Compare(pSortParam->m_context, d1, d2);
00124         }
00125         else if( pSortParam->m_fAccendant )
00126         {
00127             res = -res;
00128         }
00129     }
00130
00131     return res;
00132 }

Here is the call graph for this function:

Variable Documentation

const KiColumn* columnsRecursive[] [static]

Initial value:

 {
    &nameColumn, &extColumn, &pathColumn,
    &revisionColumn, &optionColumn, &encodingColumn, &stateColumn,
    &tagColumn, &dateColumn, &conflictColumn
}
All columns for flat view.

Definition at line 741 of file BrowseViewColumn.cpp.

Referenced by KoRecursiveModel::GetAt(), and KoRecursiveModel::GetCount().

const KiColumn* columnsRegular[] [static]

Initial value:

 {
    &nameColumn, &extColumn,
    &revisionColumn, &optionColumn, &encodingColumn, &stateColumn,
    &tagColumn, &dateColumn, &conflictColumn
}
All columns for regular view.

Definition at line 727 of file BrowseViewColumn.cpp.

Referenced by KoRegularModel::GetAt(), and KoRegularModel::GetCount().

KoConflictColumn conflictColumn

Conflict column.

KoDateColumn dateColumn

Date column.

KoEncodingColumn encodingColumn

Encoding column.

KoExtColumn extColumn

Extension column.

KoRecursiveModel modelRecursive

Recursive columnar model.

Referenced by KiColumnModel::GetRecursiveModel().

KoRegularModel modelRegular

Regular columnar model.

Referenced by KiColumnModel::GetRegularModel().

KoNameColumn nameColumn

Name column.

KoOptionColumn optionColumn

Option column.

KoPathColumn pathColumn

Path column.

KoRevisionColumn revisionColumn

Revision column.

KoStateColumn stateColumn

State column.

KoTagColumn tagColumn

Tag column.

const int typesRecursive[] [static]

Initial value:

 {
    EntnodeData::kName, EntnodeFile::kExt, EntnodeFile::kPath,
    EntnodeFile::kVN, EntnodeFile::kOption, EntnodeFile::kEncoding, EntnodeData::kState,
    EntnodeFile::kTag, EntnodeFile::kTS, EntnodeFile::kConflict
}
All columns types for flat view.

Definition at line 748 of file BrowseViewColumn.cpp.

Referenced by KoRecursiveModel::GetType().

const int typesRegular[] [static]

Initial value:

 {
    EntnodeData::kName, EntnodeFile::kExt,
    EntnodeFile::kVN, EntnodeFile::kOption, EntnodeFile::kEncoding, EntnodeData::kState,
    EntnodeFile::kTag, EntnodeFile::kTS, EntnodeFile::kConflict
}
All columns types for regular view.

Definition at line 734 of file BrowseViewColumn.cpp.

Referenced by KoRegularModel::GetType().

Generated on Sat Aug 7 22:43:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewColumn.h File Reference

common/BrowseViewColumn.h File Reference

#include "ustr.h"

Include dependency graph for BrowseViewColumn.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | KoColumnContext
Context in which a column is accessed. More...
class | KiColumn
Column descriptor abstract class. More...
class | KiColumnModel
Columnar model of the data. More...
struct | CSortParam
Sort parameters. More...

Functions

int CALLBACK | _Compare (LPARAM data1, LPARAM data2, LPARAM data)
Compare callback.

Function Documentation

int CALLBACK _Compare | ( | LPARAM | data1,
 |  | LPARAM | data2,
 |  | LPARAM | data
 | ) |

Compare callback.

Compare callback function

Parameters:
data1 | First node data
data2 | Second node data
data | Sort parameters data
Returns:
-1, 0 or +1
Definition at line 65 of file BrowseViewColumn.cpp.

References KiColumn::Compare(), ENT_SUBDIR, KiColumn::GetColumnIndex(), EntnodeData::GetType(), CSortParam::m_column, CSortParam::m_columnAlt, CSortParam::m_context, CSortParam::m_fAccendant, CSortParam::m_fGroupSubDir, and NULL.

Referenced by gtkCompareWrap(), and CBrowseFileView::Resort().

00069 {
00070     int res = 0;
00071
00072     const EntnodeData* d1 = (const EntnodeData*)data1;
00073     const EntnodeData* d2 = (const EntnodeData*)data2;
00074
00075     const CSortParam* pSortParam = (CSortParam*)data;
00076
00077     bool overrideCompare = false;
00078
00079     if( pSortParam->m_fGroupSubDir )
00080     {
00081         // Group sub-directories
00082         const int d1IsDir = d1->GetType() == ENT_SUBDIR ? 1 : 0;
00083         const int d2IsDir = d2->GetType() == ENT_SUBDIR ? 1 : 0;
00084
00085         if( (d1IsDir + d2IsDir) == 1 )
00086         {
00087             // One (and only one of them) is a directory
00088             overrideCompare = true;
00089             res = d1IsDir ? -1 : 1;
00090         }
00091     }
00092
00093     if( !overrideCompare )
00094     {
00095         const int columnIndex = pSortParam->m_column->GetColumnIndex();
00096
00097         if( columnIndex == ColumnIndex::kOption ||
00098             columnIndex == ColumnIndex::kState ||
00099             columnIndex == ColumnIndex::kStickyTag ||
00100             columnIndex == ColumnIndex::kConflict )
00101         {
00102             // Make the non-empty items show on top
00103             const char* s1;
00104             const char* s2;
00105             const int f1IsEmpty = ((s1 = (*d1)[pSortParam->m_column->GetColumnIndex()]) == NULL || strcmp(s1, "") == 0) ? 1 : 0;
00106             const int f2IsEmpty = ((s2 = (*d2)[pSortParam->m_column->GetColumnIndex()]) == NULL || strcmp(s2, "") == 0) ? 1 : 0;
00107
00108             if( (f1IsEmpty + f2IsEmpty) == 1 )
00109             {
00110                 // One (and only one of them) is empty
00111                 overrideCompare = true;
00112                 res = f1IsEmpty ? 1 : -1;
00113             }
00114         }
00115     }
00116
00117     if( !overrideCompare )
00118     {
00119         res = pSortParam->m_column->Compare(pSortParam->m_context, d1, d2);
00120
00121         if( res == 0 && pSortParam->m_column != pSortParam->m_columnAlt )
00122         {
00123             res = pSortParam->m_columnAlt->Compare(pSortParam->m_context, d1, d2);
00124         }
00125         else if( pSortParam->m_fAccendant )
00126         {
00127             res = -res;
00128         }
00129     }
00130
00131     return res;
00132 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:43:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewHandlers.cpp File Reference

common/BrowseViewHandlers.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "BrowseViewHandlers.h"
#include "PromptFiles.h"
#include "MultiFiles.h"

Include dependency graph for BrowseViewHandlers.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:43:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewHandlers.h File Reference

common/BrowseViewHandlers.h File Reference

#include "CvsCommands.h"
#include "CPStr.h"
#include "cvsgui_i18n.h"

Include dependency graph for BrowseViewHandlers.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | KiSelectionHandler
Interface describing a handler to process a selection-related command. More...
class | KoMoveToTrashHandler
Handles moving files to trash. More...
class | KoUpdateMoveToTrashHandler
Handles figuring out if moving files to trash is enabled. More...
class | TTagHandler< tagType >
Handles tag command. More...
class | TEditHandler< editType >
Handles edit command. More...
class | KoUneditHandler
Handles edit stop request on the selected items. More...
class | KoReleaseHandler
Handles releasing on the selected items. More...
class | KoWatchersHandler
Handles watchers on the selected items. More...
class | KoEditorsHandler
Handles editors on the selected items. More...
class | KoWatchOnHandler
Handles watch on on the selected items. More...
class | KoWatchOffHandler
Handles watch off on the selected items. More...
class | KoDiffHandler
Handles diffing on the selected items. More...
class | KoGraphDiffHandler
Handles diffing on the selected items. More...
class | KoLogHandler
Handles log queries on the selected items. More...
class | KoGraphHandler
Handles graph log queries on the selected items. More...
class | KoStatusHandler
Handles status queries on the selected items. More...
class | KoFileRemoveHandler
Handles file remove requests. More...
class | KoLockHandler
Handles locking on the selected items. More...
class | KoUnlockHandler
Handles unlocking on the selected items. More...
class | KoAddHandler
Handles addition of the selected items. More...
class | KoAddBinaryHandler
Handles binary addition of the selected items. More...
class | KoAddUnicodeHandler
Handles unicode addition of the selected items. More...
class | KoCommitHandler
Handles commits of the selected items. More...
class | KoUpdateHandler
Handles updates on the selected items. More...
class | KoQueryUpdateHandler
Handles query updates on the selected items. More...
class | KoAnnotateHandler
Handles annotate on the selected items. More...
class | KoGraphAnnotateHandler
Handles annotate on the selected graph items. More...
class | KoCancelChangesHandler
Handles cancel changes on the selected items. More...
class | KoCommandLineHandler
Handles Command Line. More...
class | KoImportHandler
Handles Import. More...
class | KoCheckoutHandler
Handles Checkout. More...
class | TRtagHandler< tagType >
Handles rtag command. More...
class | KoFileActionHandler
Handles file action. More...
class | TLaunchHandler< lauchType >
Handles shell action launch. More...

Typedefs

typedef TTagHandler< kTagCreate > | KoCreateTagHandler
typedef TTagHandler< kTagDelete > | KoDeleteTagHandler
typedef TTagHandler< kTagBranch > | KoBranchTagHandler
typedef TEditHandler< kEditNormal > | KoEditHandler
typedef TEditHandler< kEditReserved > | KoReservedEditHandler
typedef TEditHandler< kEditForce > | KoForceEditHandler
typedef TRtagHandler< kTagCreate > | KoRtagCreateHandler
typedef TRtagHandler< kTagDelete > | KoRtagDeleteHandler
typedef TRtagHandler< kTagBranch > | KoRtagBranchHandler
typedef TLaunchHandler< kLaunchEdit > | KoLaunchEditHandler
typedef TLaunchHandler< kLaunchDefaultEdit > | KoLaunchDefaultEditHandler
typedef TLaunchHandler< kLaunchOpen > | KoLaunchOpenHandler
typedef TLaunchHandler< kLaunchOpenAs > | KoLaunchOpenAsHandler
typedef TLaunchHandler< kLaunchDefault > | KoLaunchDefaultHandler

Enumerations

enum kSelType {
kSelNone,
kSelFiles,
kSelDir
}
Command selection type enum. More...

Typedef Documentation

typedef TTagHandler<kTagBranch> KoBranchTagHandler

Definition at line 150 of file BrowseViewHandlers.h.

Referenced by UCvsFolders::OnCmdTagBranch(), UCvsFiles::OnCmdTagBranch(), CWinCvsBrowser::OnViewTagBranch(), and CBrowseFileView::OnViewTagBranch().

typedef TTagHandler<kTagCreate> KoCreateTagHandler

Definition at line 148 of file BrowseViewHandlers.h.

Referenced by UCvsFolders::OnCmdTagNew(), UCvsFiles::OnCmdTagNew(), CWinCvsBrowser::OnViewTagNew(), and CBrowseFileView::OnViewTagNew().

typedef TTagHandler<kTagDelete> KoDeleteTagHandler

Definition at line 149 of file BrowseViewHandlers.h.

Referenced by UCvsFolders::OnCmdTagDelete(), UCvsFiles::OnCmdTagDelete(), CWinCvsBrowser::OnViewTagDelete(), and CBrowseFileView::OnViewTagDelete().

typedef TEditHandler<kEditNormal> KoEditHandler

Definition at line 174 of file BrowseViewHandlers.h.

Referenced by UCvsFolders::OnCmdEdit(), UCvsFiles::OnCmdEdit(), CWinCvsBrowser::OnViewEdit(), and CBrowseFileView::OnViewEdit().

typedef TEditHandler<kEditForce> KoForceEditHandler

Definition at line 176 of file BrowseViewHandlers.h.

Referenced by CWinCvsBrowser::OnViewForceedit(), and CBrowseFileView::OnViewForceedit().

typedef TLaunchHandler<kLaunchDefaultEdit> KoLaunchDefaultEditHandler

Definition at line 793 of file BrowseViewHandlers.h.

Referenced by CBrowseFileView::OnViewEditseldef().

typedef TLaunchHandler<kLaunchDefault> KoLaunchDefaultHandler

Definition at line 796 of file BrowseViewHandlers.h.

Referenced by CBrowseFileView::OnQueryShellactionDefault().

typedef TLaunchHandler<kLaunchEdit> KoLaunchEditHandler

Definition at line 792 of file BrowseViewHandlers.h.

Referenced by CBrowseFileView::OnViewEditsel().

typedef TLaunchHandler<kLaunchOpenAs> KoLaunchOpenAsHandler

Definition at line 795 of file BrowseViewHandlers.h.

Referenced by CBrowseFileView::OnViewOpenselas().

typedef TLaunchHandler<kLaunchOpen> KoLaunchOpenHandler

Definition at line 794 of file BrowseViewHandlers.h.

Referenced by CBrowseFileView::OnViewOpensel().

typedef TEditHandler<kEditReserved> KoReservedEditHandler

Definition at line 175 of file BrowseViewHandlers.h.

Referenced by UCvsFolders::OnCmdResEdit(), UCvsFiles::OnCmdResEdit(), CWinCvsBrowser::OnViewReservededit(), and CBrowseFileView::OnViewReservededit().

typedef TRtagHandler<kTagBranch> KoRtagBranchHandler

Definition at line 753 of file BrowseViewHandlers.h.

Referenced by CWincvsDoc::OnAppRtagBranch(), CWinCvsBrowser::OnAppRtagbranch(), CBrowseFileView::OnAppRtagbranch(), and UCvsFrame::OnCmdRtagBranch().

typedef TRtagHandler<kTagCreate> KoRtagCreateHandler

Definition at line 751 of file BrowseViewHandlers.h.

Referenced by CWinCvsBrowser::OnAppRtagcreate(), CBrowseFileView::OnAppRtagcreate(), CWincvsDoc::OnAppRtagNew(), and UCvsFrame::OnCmdRtagNew().

typedef TRtagHandler<kTagDelete> KoRtagDeleteHandler

Definition at line 752 of file BrowseViewHandlers.h.

Referenced by CWincvsDoc::OnAppRtagDelete(), CWinCvsBrowser::OnAppRtagdelete(), CBrowseFileView::OnAppRtagdelete(), and UCvsFrame::OnCmdRtagDelete().

Enumeration Type Documentation

enum kSelType

Command selection type enum.

Enumeration values:
kSelNone | Not specified
kSelFiles | Selection contains files
kSelDir | Selection contains directory
Definition at line 25 of file BrowseViewHandlers.h.

Referenced by KiSelectionHandler::GetSelType().

00026 {
00027     kSelNone,
00028     kSelFiles,
00029     kSelDir
00030 } kSelType;

Generated on Sat Aug 7 22:43:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewModel.cpp File Reference

common/BrowseViewModel.cpp File Reference

#include "stdafx.h"
#include "BrowseViewModel.h"
#include "Persistent.h"
#include "CvsEntries.h"
#include "BrowseViewColumn.h"

Include dependency graph for BrowseViewModel.cpp:

Include dependency graph

Go to the source code of this file.

Variables

CPersistentBool | gViewChanged ("P_ViewChanged", false, kAddSettings)
CPersistentBool | gViewAdded ("P_ViewAdded", false, kAddSettings)
CPersistentBool | gViewRemoved ("P_ViewRemoved", false, kAddSettings)
CPersistentBool | gViewConflicts ("P_ViewConflicts", false, kAddSettings)
CPersistentBool | gViewUnknown ("P_ViewUnknown", false, kAddSettings)
CPersistentBool | gViewHideUnknown ("P_ViewHideUnknown", false, kAddSettings)
CPersistentBool | gViewMissing ("P_ViewMissing", false, kAddSettings)
CPersistentBool | gViewHideMissing ("P_ViewHideMissing", false, kAddSettings)
CPersistentBool | gDisplayRecursive ("P_DisplayRecursive", false, kAddSettings)
CPersistentBool | gFileViewIgnore ("P_FileViewIgnore", true, kAddSettings)
CPersistentBool | gFilterMasksEnable ("P_FilterMasksEnable", true, kAddSettings)

Variable Documentation

CPersistentBool gDisplayRecursive("P_DisplayRecursive", false, kAddSettings) [static]

Referenced by KoRecursionModel::LoadSettings(), and KoRecursionModel::SaveSettings().

CPersistentBool gFileViewIgnore("P_FileViewIgnore", true, kAddSettings) [static]

Referenced by KoIgnoreModel::LoadSettings(), and KoIgnoreModel::SaveSettings().

CPersistentBool gFilterMasksEnable("P_FilterMasksEnable", true, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

CPersistentBool gViewAdded("P_ViewAdded", false, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

CPersistentBool gViewChanged("P_ViewChanged", false, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

CPersistentBool gViewConflicts("P_ViewConflicts", false, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

CPersistentBool gViewHideMissing("P_ViewHideMissing", false, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

CPersistentBool gViewHideUnknown("P_ViewHideUnknown", false, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

CPersistentBool gViewMissing("P_ViewMissing", false, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

CPersistentBool gViewRemoved("P_ViewRemoved", false, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

CPersistentBool gViewUnknown("P_ViewUnknown", false, kAddSettings) [static]

Referenced by KoFilterModel::LoadSettings(), and KoFilterModel::SaveSettings().

Generated on Sat Aug 7 22:43:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewModel.h File Reference

common/BrowseViewModel.h File Reference

#include "ustr.h"
#include <vector>
#include <string>
#include <map>

Include dependency graph for BrowseViewModel.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | NotificationManager
Notification manager. More...
struct | NotificationManager::Node
Node describing observer registration. More...
class | KiFilterBase
Filter's base class. More...
class | KiFilterModel
Interface to filtering entries. More...
class | KiRecursionModel
Interface to recursive display of entries. More...
class | KiIgnoreModel
Interface to recursive display of entries. More...
class | KoFilterMask
Filter mask item. More...
class | KoFilterModel
Interface to filtering entries. More...
class | KoRecursionModel
Interface to recursive display of entries. More...
class | KoIgnoreModel
Interface for ignored entries. More...

Defines

#define | FILTER_TOKEN_SEPARATORS " \t;"

Typedefs

typedef void(* | FNOBSERVER )(CObject *)
Typedef used to cast to proper notification handler.
typedef std::map< int, KoFilterMask > | FilterMaskContainer
Filter mask container.

Enumerations

enum {
kFilterNone = 0x0000,
kFilterChanged = 0x0001,
kFilterAdded = 0x0002,
kFilterRemoved = 0x0004,
kFilterConflicts = 0x0010,
kFilterMissing = 0x0020,
kFilterHideMissing = 0x0040,
kFilterUnknown = 0x0100,
kFilterHideUnknown = 0x0200,
kFilterModified = kFilterChanged | kFilterAdded | kFilterRemoved | kFilterConflicts
}
Filter type enum. More...

Define Documentation

#define FILTER_TOKEN_SEPARATORS " \t;"

Definition at line 34 of file BrowseViewModel.h.

Referenced by KoFilterMask::SetMask().

Typedef Documentation

typedef std::map<int, KoFilterMask> FilterMaskContainer

Filter mask container.

Definition at line 161 of file BrowseViewModel.h.

typedef void(* FNOBSERVER)(CObject *)

Typedef used to cast to proper notification handler.

Definition at line 41 of file BrowseViewModel.h.

Referenced by NotificationManager::CheckIn(), and NotificationManager::Node::Node().

Enumeration Type Documentation

anonymous enum

Filter type enum.

Enumeration values:
kFilterNone | No filter
kFilterChanged | Only changed files are to be displayed
kFilterAdded | Only added files are to be displayed
kFilterRemoved | Only removed files are to be displayed
kFilterConflicts | Conflicting files shall be displayed
kFilterMissing | Missing files have to be shown
kFilterHideMissing | Missing files have to be hidden
kFilterUnknown | Unknown files have to be shown
kFilterHideUnknown | Unknown files have to be hidden, mutually exclusive with kFilterMissing
kFilterModified | Flags indicating that file is modified and can be commited
Definition at line 44 of file BrowseViewModel.h.
00044     {
00045     kFilterNone         = 0x0000,
00047     kFilterChanged      = 0x0001,
00048     kFilterAdded        = 0x0002,
00049     kFilterRemoved      = 0x0004,
00050     kFilterConflicts    = 0x0010,
00052     kFilterMissing      = 0x0020,
00053     kFilterHideMissing  = 0x0040,
00054     kFilterUnknown      = 0x0100,
00055     kFilterHideUnknown  = 0x0200,
00057     // Combinations
00058     kFilterModified     = kFilterChanged | kFilterAdded | kFilterRemoved | kFilterConflicts
00059 };

Generated on Sat Aug 7 22:43:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CheckoutDlg.cpp File Reference

common/CheckoutDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include <sys\stat.h>
#include <direct.h>
#include <errno.h>
#include "wincvs_winutil.h"
#include "CheckoutDlg.h"
#include "CvsPrefs.h"
#include "MultiString.h"
#include "MultiFiles.h"
#include "UpdateDlg.h"
#include "PromptFiles.h"
#include "ItemListDlg.h"
#include "CvsRootDlg.h"
#include "FileTraversal.h"
#include "CvsEntries.h"
#include "GetPrefs.h"

Include dependency graph for CheckoutDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool | IsCvsDirectory (const char *dir)
bool | CompatGetCheckout (const MultiFiles *mf, UStr &modname, UStr &path, bool &norecurs, bool &toStdout, UStr &date, UStr &rev, bool &useMostRecent, UStr &rev1, UStr &rev2, bool &branchPointMerge, bool &threeWayConflicts, bool &doexport, bool &forceCvsroot, UStr &cvsroot, bool &overrideCheckoutDir, UStr &checkoutDir, UStr &keyword, bool &resetSticky, bool &dontShortenPaths, bool &caseSensitiveNames, bool &lastCheckinTime)
Get the checkout options.

Variables

CMString | gOldModules (20,"P_OldModules")

Function Documentation

bool CompatGetCheckout | ( | const MultiFiles * | mf,
 |  | UStr & | modname,
 |  | UStr & | path,
 |  | bool & | norecurs,
 |  | bool & | toStdout,
 |  | UStr & | date,
 |  | UStr & | rev,
 |  | bool & | useMostRecent,
 |  | UStr & | rev1,
 |  | UStr & | rev2,
 |  | bool & | branchPointMerge,
 |  | bool & | threeWayConflicts,
 |  | bool & | doexport,
 |  | bool & | forceCvsroot,
 |  | UStr & | cvsroot,
 |  | bool & | overrideCheckoutDir,
 |  | UStr & | checkoutDir,
 |  | UStr & | keyword,
 |  | bool & | resetSticky,
 |  | bool & | dontShortenPaths,
 |  | bool & | caseSensitiveNames,
 |  | bool & | lastCheckinTime
 | ) |

Get the checkout options.

Definition at line 654 of file CheckoutDlg.cpp.

References _i18n, BrowserGetDirectory(), CPStr, CStr, EV_INIT_WIDGET, FindBestLastCvsroot(), FindBestLastModuleName(), gCvsPrefs, MultiFiles::getdir(), InsertLastCvsroot(), InsertLastModuleName(), IsCvsDirectory(), kUMainWidget, CUpdateMerge::m_branchPointMerge, CUpdateOptions::m_caseSensitiveNames, CCheckout_MAIN::m_checkoutDir, CCheckout_MAIN::m_cvsroot, CUpdateOptions::m_date, CUpdateMerge::m_date1, CUpdateMerge::m_date2, CCheckout_MAIN::m_dontShortenPaths, CCheckout_MAIN::m_export, CCheckout_MAIN::m_forceRoot, CUpdateOptions::m_hasDate, CUpdateMerge::m_hasDate1, CUpdateMerge::m_hasDate2, CUpdateOptions::m_hasRev, CUpdateOptions::m_keyword, CUpdateOptions::m_lastCheckinTime, CUpdateOptions::m_match, CUpdateMerge::m_mergeType, CCheckout_MAIN::m_moduleName, CCheckout_MAIN::m_noRecurse, CCheckout_MAIN::m_overrideCoDir, CCheckout_MAIN::m_path, CUpdateOptions::m_resetSticky, CUpdateOptions::m_rev, CUpdateMerge::m_rev1, CUpdateMerge::m_rev2, CUpdateOptions::m_stdout, CUpdateMerge::m_threeWayConflicts, CvsPrefs::save(), CvsPrefs::SetUpdateCaseSensitiveNames(), CvsPrefs::SetUpdateLastCheckinTime(), CvsPrefs::SetUpdateThreeWayConflicts(), SplitPath(), CGetPrefs_GLOBALS::StoreValues(), UCreate_CheckoutDlg(), UEventSendMessage(), CvsPrefs::UpdateCaseSensitiveNames(), CvsPrefs::UpdateLastCheckinTime(), and CvsPrefs::UpdateThreeWayConflicts().

Referenced by CvsCmdCheckoutModule().

00669 {
00670     bool userHitOK = false;
00671
00672     date = "";
00673     rev = "";
00674     rev1 = "";
00675     rev2 = "";
00676     branchPointMerge = false;
00677     threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00678     modname = "";
00679     norecurs = false;
00680     toStdout = false;
00681     useMostRecent = false;
00682     doexport = false;
00683     forceCvsroot = false;
00684     overrideCheckoutDir = false;
00685     caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00686     lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00687
00688     static CStr sLastModName;
00689     static CStr sLastRev;
00690     static CStr sLastDate;
00691     static CStr sLastRev1;
00692     static CStr sLastRev2;
00693     static CStr sLastDate1;
00694     static CStr sLastDate2;
00695     static bool lastDontShortenPaths = false;
00696     static bool lastForceCvsroot = true;
00697     static CStr sLastCvsroot("");
00698
00699     bool hasDate = false;
00700     bool hasRev = false;
00701     bool merge1 = false;
00702     bool merge2 = false;
00703     bool hasDate1 = false;
00704     bool hasDate2 = false;
00705
00706     keyword = "";
00707     resetSticky = false;
00708     dontShortenPaths = lastDontShortenPaths;
00709
00710     FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00711     FindBestLastModuleName(path.c_str(), sLastModName);
00712
00713     if( !path.empty() )
00714     {
00715         while( IsCvsDirectory(path) )
00716         {
00717             CStr uppath, folder;
00718             if( !SplitPath(path, uppath, folder) || uppath.empty() )
00719             {
00720                 break;
00721             }
00722
00723             path = uppath;
00724         }
00725     }
00726
00727 #ifdef WIN32
00728     CHHelpPropertySheet pages(_i18n("Checkout settings"));
00729     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00730
00731     CCheckout_MAIN page1(mf, sLastModName, path, dontShortenPaths, lastForceCvsroot, sLastCvsroot);
00732     CUpdateOptions page2(mf, sLastRev, sLastDate, keyword, resetSticky, caseSensitiveNames, lastCheckinTime);
00733     CUpdateMerge page3(mf, true, sLastRev1, sLastRev2, sLastDate1, sLastDate2, threeWayConflicts);
00734     CGetPrefs_GLOBALS page4;
00735
00736     pages.AddPage(&page1);
00737     pages.AddPage(&page2);
00738     pages.AddPage(&page3);
00739     pages.AddPage(&page4);
00740
00741     if( pages.DoModal() == IDOK )
00742     {
00743         sLastModName = (const char*)page1.m_moduleName;
00744         path = (const char*)page1.m_path;
00745         norecurs = page1.m_noRecurse == TRUE;
00746         overrideCheckoutDir = page1.m_overrideCoDir == TRUE;
00747         checkoutDir = (const char*)page1.m_checkoutDir;
00748         lastDontShortenPaths = page1.m_dontShortenPaths == TRUE;
00749         lastForceCvsroot = page1.m_forceRoot == TRUE;
00750         sLastCvsroot = page1.m_cvsroot;
00751         doexport = page1.m_export == TRUE;
00752
00753         sLastDate = page2.m_date;
00754         sLastRev = page2.m_rev;
00755         hasDate = page2.m_hasDate == TRUE;
00756         hasRev = page2.m_hasRev == TRUE;
00757         useMostRecent = page2.m_match == TRUE;
00758         keyword = page2.m_keyword;
00759         resetSticky = page2.m_resetSticky == TRUE;
00760         toStdout = page2.m_stdout == TRUE;
00761         gCvsPrefs.SetUpdateCaseSensitiveNames(page2.m_caseSensitiveNames == TRUE);
00762         gCvsPrefs.SetUpdateLastCheckinTime(page2.m_lastCheckinTime == TRUE);
00763
00764         merge1 = page3.m_mergeType >= 1;
00765         merge2 = page3.m_mergeType == 2;
00766         sLastRev1 = page3.m_rev1;
00767         sLastRev2 = page3.m_rev2;
00768         hasDate1 = page3.m_hasDate1 == TRUE;
00769         hasDate2 = page3.m_hasDate2 == TRUE;
00770         sLastDate1 = page3.m_date1;
00771         sLastDate2 = page3.m_date2;
00772         branchPointMerge = page3.m_branchPointMerge == TRUE;
00773         gCvsPrefs.SetUpdateThreeWayConflicts(page3.m_threeWayConflicts == TRUE);
00774
00775         page4.StoreValues();
00776         userHitOK = true;
00777     }
00778 #endif /* WIN32 */
00779 #ifdef qMacCvsPP
00780     StDialogHandler theHandler(dlg_Checkout, LCommander::GetTopCommander());
00781     LWindow *theDialog = theHandler.GetDialog();
00782     ThrowIfNil_(theDialog);
00783     static UInt16 sRuntimePanel = 1;
00784
00785     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00786         (theDialog->FindPaneByID(item_MultiViewPrefs));
00787     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00788
00789     multiView->SwitchToPanel(3);
00790     DoDataExchange_Globals(theDialog, true);
00791     multiView->SwitchToPanel(2);
00792     DoDataExchange_CheckoutOptions(theDialog, mf, hasDate, hasRev,
00793         sLastDate, sLastRev, useMostRecent, doexport, forceCvsroot, true);
00794     multiView->SwitchToPanel(1);
00795     DoDataExchange_CheckoutMain(theDialog, mf, sLastModName, norecurs, toStdout, overrideCheckoutDir, checkoutDir, true);
00796     dynamic_cast<LBroadcaster*> (theDialog->FindPaneByID (item_EditPath))->AddListener (&theHandler);
00797     dynamic_cast<LBroadcaster*> (theDialog->FindPaneByID (item_CheckGroupPath))->AddListener (&theHandler);
00798
00799
00800     groupView->SetValue(sRuntimePanel);
00801     theDialog->Show();
00802     MessageT hitMessage;
00803     while (true)
00804     {       // Let DialogHandler process events
00805         hitMessage = theHandler.DoDialog();
00806
00807         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00808             break;
00809
00810         if(hitMessage == item_CheckGroupPath || hitMessage == item_EditPath)
00811         {
00812             if(theDialog->GetValueForPaneID(item_CheckGroupPath) == Button_Off)
00813             {
00814                 continue;
00815             }
00816
00817             CStr dir;
00818             if( BrowserGetDirectory("Select a directory to checkout to", dir) )
00819             {
00820                 CPStr tmp(dir.c_str());
00821                 theDialog->SetDescriptorForPaneID(item_ShowPath, tmp);
00822             }
00823             else if(hitMessage == item_CheckGroupPath)
00824             {
00825                 theDialog->SetValueForPaneID(item_CheckGroupPath, Button_Off);
00826             }
00827         }
00828     }
00829     theDialog->Hide();
00830     sRuntimePanel = groupView->GetValue();
00831
00832     if(hitMessage == msg_OK)
00833     {
00834         multiView->SwitchToPanel(1);
00835         DoDataExchange_CheckoutMain(theDialog, mf, sLastModName, norecurs, toStdout, overrideCheckoutDir, checkoutDir, false);
00836         multiView->SwitchToPanel(2);
00837         DoDataExchange_CheckoutOptions(theDialog, mf, hasDate, hasRev,
00838             sLastDate, sLastRev, useMostRecent, doexport, forceCvsroot, false);
00839         multiView->SwitchToPanel(3);
00840         DoDataExchange_Globals(theDialog, false);
00841
00842         Assert_(sLastModName.length() != 0);
00843
00844         userHitOK = true;
00845     }
00846 #endif /* qMacCvsPP */
00847 #if qUnix
00848     void *wid = UCreate_CheckoutDlg();
00849
00850     UCvsCheckout *dlg = new UCvsCheckout();
00851     UCvsCheckout_MAIN *tab1 = new UCvsCheckout_MAIN(sLastModName, path);
00852     UCvsCheckout_STICKY *tab2 = new UCvsCheckout_STICKY(sLastRev, sLastDate);
00853     UCvsCheckout_OPTIONS *tab3 = new UCvsCheckout_OPTIONS();
00854     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00855     dlg->AddPage(tab1, UCvsCheckout::kTabGeneral, 0);
00856     dlg->AddPage(tab2, UCvsCheckout::kTabGeneral, 1);
00857     dlg->AddPage(tab3, UCvsCheckout::kTabGeneral, 2);
00858
00859     if(dlg->DoModal())
00860     {
00861         sLastModName = tab1->m_modname;
00862         path = tab1->m_path;
00863         norecurs = tab1->m_norecurs;
00864         toStdout = tab1->m_stdout;
00865
00866         sLastDate = tab2->m_date;
00867         sLastRev = tab2->m_rev;
00868         hasDate = tab2->m_hasdate;
00869         hasRev = tab2->m_hasrev;
00870         useMostRecent = tab2->m_match;
00871
00872         doexport = tab3->m_export;
00873         forceCvsroot = tab3->m_forceroot;
00874
00875         userHitOK = true;
00876     }
00877
00878     delete dlg;
00879 #endif // qUnix
00880
00881     if( userHitOK )
00882     {
00883         threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00884         caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00885         lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00886
00887         if( hasDate && !sLastDate.empty() )
00888             date = sLastDate;
00889
00890         if( hasRev && !sLastRev.empty() )
00891             rev = sLastRev;
00892
00893         modname = sLastModName;
00894
00895         dontShortenPaths = lastDontShortenPaths;
00896
00897         if( merge1 && merge2 && !sLastRev1.empty() && !sLastRev2.empty() )
00898         {
00899             rev1 = sLastRev1;
00900             rev2 = sLastRev2;
00901
00902             if( hasDate1 )
00903                 rev1 << ":" << sLastDate1;
00904
00905             if( hasDate2 )
00906                 rev2 << ":" << sLastDate2;
00907         }
00908
00909         if( merge1 && !merge2 && !sLastRev1.empty() )
00910         {
00911             rev1 = sLastRev1;
00912
00913             if( hasDate1 )
00914                 rev1 << ":" << sLastDate1;
00915         }
00916
00917         forceCvsroot = lastForceCvsroot;
00918         cvsroot = sLastCvsroot;
00919
00920         if( forceCvsroot )
00921         {
00922             if( mf )
00923             {
00924                 // Add selection rather than actual checkout folder
00925                 CStr strSelection;
00926                 mf->getdir(0, strSelection);
00927
00928                 if( !strSelection.empty() )
00929                 {
00930                     InsertLastCvsroot(strSelection, cvsroot);
00931                     InsertLastModuleName(strSelection, modname);
00932                 }
00933             }
00934
00935             if( overrideCheckoutDir && !path.empty() )
00936             {
00937                 // Add override folder if selected
00938                 CStr strPath(path);
00939                 strPath << kPathDelimiter << checkoutDir;
00940
00941                 InsertLastCvsroot(strPath, cvsroot);
00942                 InsertLastModuleName(strPath, modname);
00943             }
00944         }
00945
00946         gCvsPrefs.save();
00947     }
00948
00949     return userHitOK;
00950 }

Here is the call graph for this function:

bool IsCvsDirectory ( const char * dir ) [static]

Check whether a given directory is a CVS-controlled one

Parameters:
dir Directory to check
Returns:
true if the directory is a CVS-controlled, false otherwise
Definition at line 70 of file CheckoutDlg.cpp.

References BuildIgnoredList(), CStr, Entries_SetVisited(), EntnodeData::IsUnknown(), SplitPath(), stat::st_mode, and stat.

Referenced by CompatGetCheckout().

00071 {
00072     bool res = false;
00073
00074     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00075     vector<CStr> ignlist;
00076     struct stat sb;
00077
00078     std::string strPath = dir;
00079     strPath.erase(strPath.find_last_not_of(kPathDelimiter) + 1, string::npos);
00080
00081     int statres = stat(strPath.c_str(), &sb);
00082     if( statres != -1 && S_ISDIR(sb.st_mode) )
00083     {
00084         CStr uppath, folder;
00085         if( !SplitPath(dir, uppath, folder) || uppath.empty() )
00086         {
00087             uppath = dir;
00088             folder = ".";
00089         }
00090
00091         BuildIgnoredList(ignlist, uppath);
00092
00093         EntnodeData* data = Entries_SetVisited(uppath, entries, folder, sb, true, &ignlist);
00094         if( !data->IsUnknown() )
00095         {
00096             res = true;
00097         }
00098     }
00099
00100     return res;
00101 }

Here is the call graph for this function:

Variable Documentation

CMString gOldModules(20,"P_OldModules")

Referenced by CCheckout_MAIN::CCheckout_MAIN(), and CRtag_MAIN::CRtag_MAIN().

Generated on Sat Aug 7 22:43:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CheckoutDlg.h File Reference

common/CheckoutDlg.h File Reference

#include "CPStr.h"
#include "SmartComboBox.h"
#include "KeywordComboBox.h"
#include "HHelpSupport.h"

Include dependency graph for CheckoutDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCheckout_MAIN
Main checkout page. More...

Defines

#define | AFX_CHECKOUTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

bool | CompatGetCheckout (const MultiFiles *mf, UStr &modname, UStr &path, bool &norecurs, bool &toStdout, UStr &date, UStr &rev, bool &useMostRecent, UStr &rev1, UStr &rev2, bool &branchPointMerge, bool &threeWayConflicts, bool &doexport, bool &forceCvsroot, UStr &cvsroot, bool &overrideCheckoutDir, UStr &checkoutDir, UStr &keyword, bool &resetSticky, bool &dontShortenPaths, bool &caseSensitiveNames, bool &lastCheckinTime)
Get the checkout options.

Variables

CMString gOldModules

Define Documentation

#define AFX_CHECKOUTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file CheckoutDlg.h.

Function Documentation

bool CompatGetCheckout | ( | const MultiFiles * | mf,
 |  | UStr & | modname,
 |  | UStr & | path,
 |  | bool & | norecurs,
 |  | bool & | toStdout,
 |  | UStr & | date,
 |  | UStr & | rev,
 |  | bool & | useMostRecent,
 |  | UStr & | rev1,
 |  | UStr & | rev2,
 |  | bool & | branchPointMerge,
 |  | bool & | threeWayConflicts,
 |  | bool & | doexport,
 |  | bool & | forceCvsroot,
 |  | UStr & | cvsroot,
 |  | bool & | overrideCheckoutDir,
 |  | UStr & | checkoutDir,
 |  | UStr & | keyword,
 |  | bool & | resetSticky,
 |  | bool & | dontShortenPaths,
 |  | bool & | caseSensitiveNames,
 |  | bool & | lastCheckinTime
 | ) |

Get the checkout options.

Definition at line 654 of file CheckoutDlg.cpp.

References _i18n, BrowserGetDirectory(), CPStr, CStr, EV_INIT_WIDGET, FindBestLastCvsroot(), FindBestLastModuleName(), gCvsPrefs, MultiFiles::getdir(), InsertLastCvsroot(), InsertLastModuleName(), IsCvsDirectory(), kUMainWidget, CUpdateMerge::m_branchPointMerge, CUpdateOptions::m_caseSensitiveNames, CCheckout_MAIN::m_checkoutDir, CCheckout_MAIN::m_cvsroot, CUpdateOptions::m_date, CUpdateMerge::m_date1, CUpdateMerge::m_date2, CCheckout_MAIN::m_dontShortenPaths, CCheckout_MAIN::m_export, CCheckout_MAIN::m_forceRoot, CUpdateOptions::m_hasDate, CUpdateMerge::m_hasDate1, CUpdateMerge::m_hasDate2, CUpdateOptions::m_hasRev, CUpdateOptions::m_keyword, CUpdateOptions::m_lastCheckinTime, CUpdateOptions::m_match, CUpdateMerge::m_mergeType, CCheckout_MAIN::m_moduleName, CCheckout_MAIN::m_noRecurse, CCheckout_MAIN::m_overrideCoDir, CCheckout_MAIN::m_path, CUpdateOptions::m_resetSticky, CUpdateOptions::m_rev, CUpdateMerge::m_rev1, CUpdateMerge::m_rev2, CUpdateOptions::m_stdout, CUpdateMerge::m_threeWayConflicts, CvsPrefs::save(), CvsPrefs::SetUpdateCaseSensitiveNames(), CvsPrefs::SetUpdateLastCheckinTime(), CvsPrefs::SetUpdateThreeWayConflicts(), SplitPath(), CGetPrefs_GLOBALS::StoreValues(), UCreate_CheckoutDlg(), UEventSendMessage(), CvsPrefs::UpdateCaseSensitiveNames(), CvsPrefs::UpdateLastCheckinTime(), and CvsPrefs::UpdateThreeWayConflicts().

Referenced by CvsCmdCheckoutModule().

00669 {
00670     bool userHitOK = false;
00671
00672     date = "";
00673     rev = "";
00674     rev1 = "";
00675     rev2 = "";
00676     branchPointMerge = false;
00677     threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00678     modname = "";
00679     norecurs = false;
00680     toStdout = false;
00681     useMostRecent = false;
00682     doexport = false;
00683     forceCvsroot = false;
00684     overrideCheckoutDir = false;
00685     caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00686     lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00687
00688     static CStr sLastModName;
00689     static CStr sLastRev;
00690     static CStr sLastDate;
00691     static CStr sLastRev1;
00692     static CStr sLastRev2;
00693     static CStr sLastDate1;
00694     static CStr sLastDate2;
00695     static bool lastDontShortenPaths = false;
00696     static bool lastForceCvsroot = true;
00697     static CStr sLastCvsroot("");
00698
00699     bool hasDate = false;
00700     bool hasRev = false;
00701     bool merge1 = false;
00702     bool merge2 = false;
00703     bool hasDate1 = false;
00704     bool hasDate2 = false;
00705
00706     keyword = "";
00707     resetSticky = false;
00708     dontShortenPaths = lastDontShortenPaths;
00709
00710     FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00711     FindBestLastModuleName(path.c_str(), sLastModName);
00712
00713     if( !path.empty() )
00714     {
00715         while( IsCvsDirectory(path) )
00716         {
00717             CStr uppath, folder;
00718             if( !SplitPath(path, uppath, folder) || uppath.empty() )
00719             {
00720                 break;
00721             }
00722
00723             path = uppath;
00724         }
00725     }
00726
00727 #ifdef WIN32
00728     CHHelpPropertySheet pages(_i18n("Checkout settings"));
00729     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00730
00731     CCheckout_MAIN page1(mf, sLastModName, path, dontShortenPaths, lastForceCvsroot, sLastCvsroot);
00732     CUpdateOptions page2(mf, sLastRev, sLastDate, keyword, resetSticky, caseSensitiveNames, lastCheckinTime);
00733     CUpdateMerge page3(mf, true, sLastRev1, sLastRev2, sLastDate1, sLastDate2, threeWayConflicts);
00734     CGetPrefs_GLOBALS page4;
00735
00736     pages.AddPage(&page1);
00737     pages.AddPage(&page2);
00738     pages.AddPage(&page3);
00739     pages.AddPage(&page4);
00740
00741     if( pages.DoModal() == IDOK )
00742     {
00743         sLastModName = (const char*)page1.m_moduleName;
00744         path = (const char*)page1.m_path;
00745         norecurs = page1.m_noRecurse == TRUE;
00746         overrideCheckoutDir = page1.m_overrideCoDir == TRUE;
00747         checkoutDir = (const char*)page1.m_checkoutDir;
00748         lastDontShortenPaths = page1.m_dontShortenPaths == TRUE;
00749         lastForceCvsroot = page1.m_forceRoot == TRUE;
00750         sLastCvsroot = page1.m_cvsroot;
00751         doexport = page1.m_export == TRUE;
00752
00753         sLastDate = page2.m_date;
00754         sLastRev = page2.m_rev;
00755         hasDate = page2.m_hasDate == TRUE;
00756         hasRev = page2.m_hasRev == TRUE;
00757         useMostRecent = page2.m_match == TRUE;
00758         keyword = page2.m_keyword;
00759         resetSticky = page2.m_resetSticky == TRUE;
00760         toStdout = page2.m_stdout == TRUE;
00761         gCvsPrefs.SetUpdateCaseSensitiveNames(page2.m_caseSensitiveNames == TRUE);
00762         gCvsPrefs.SetUpdateLastCheckinTime(page2.m_lastCheckinTime == TRUE);
00763
00764         merge1 = page3.m_mergeType >= 1;
00765         merge2 = page3.m_mergeType == 2;
00766         sLastRev1 = page3.m_rev1;
00767         sLastRev2 = page3.m_rev2;
00768         hasDate1 = page3.m_hasDate1 == TRUE;
00769         hasDate2 = page3.m_hasDate2 == TRUE;
00770         sLastDate1 = page3.m_date1;
00771         sLastDate2 = page3.m_date2;
00772         branchPointMerge = page3.m_branchPointMerge == TRUE;
00773         gCvsPrefs.SetUpdateThreeWayConflicts(page3.m_threeWayConflicts == TRUE);
00774
00775         page4.StoreValues();
00776         userHitOK = true;
00777     }
00778 #endif /* WIN32 */
00779 #ifdef qMacCvsPP
00780     StDialogHandler theHandler(dlg_Checkout, LCommander::GetTopCommander());
00781     LWindow *theDialog = theHandler.GetDialog();
00782     ThrowIfNil_(theDialog);
00783     static UInt16 sRuntimePanel = 1;
00784
00785     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00786         (theDialog->FindPaneByID(item_MultiViewPrefs));
00787     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00788
00789     multiView->SwitchToPanel(3);
00790     DoDataExchange_Globals(theDialog, true);
00791     multiView->SwitchToPanel(2);
00792     DoDataExchange_CheckoutOptions(theDialog, mf, hasDate, hasRev,
00793         sLastDate, sLastRev, useMostRecent, doexport, forceCvsroot, true);
00794     multiView->SwitchToPanel(1);
00795     DoDataExchange_CheckoutMain(theDialog, mf, sLastModName, norecurs, toStdout, overrideCheckoutDir, checkoutDir, true);
00796     dynamic_cast<LBroadcaster*> (theDialog->FindPaneByID (item_EditPath))->AddListener (&theHandler);
00797     dynamic_cast<LBroadcaster*> (theDialog->FindPaneByID (item_CheckGroupPath))->AddListener (&theHandler);
00798
00799
00800     groupView->SetValue(sRuntimePanel);
00801     theDialog->Show();
00802     MessageT hitMessage;
00803     while (true)
00804     {       // Let DialogHandler process events
00805         hitMessage = theHandler.DoDialog();
00806
00807         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00808             break;
00809
00810         if(hitMessage == item_CheckGroupPath || hitMessage == item_EditPath)
00811         {
00812             if(theDialog->GetValueForPaneID(item_CheckGroupPath) == Button_Off)
00813             {
00814                 continue;
00815             }
00816
00817             CStr dir;
00818             if( BrowserGetDirectory("Select a directory to checkout to", dir) )
00819             {
00820                 CPStr tmp(dir.c_str());
00821                 theDialog->SetDescriptorForPaneID(item_ShowPath, tmp);
00822             }
00823             else if(hitMessage == item_CheckGroupPath)
00824             {
00825                 theDialog->SetValueForPaneID(item_CheckGroupPath, Button_Off);
00826             }
00827         }
00828     }
00829     theDialog->Hide();
00830     sRuntimePanel = groupView->GetValue();
00831
00832     if(hitMessage == msg_OK)
00833     {
00834         multiView->SwitchToPanel(1);
00835         DoDataExchange_CheckoutMain(theDialog, mf, sLastModName, norecurs, toStdout, overrideCheckoutDir, checkoutDir, false);
00836         multiView->SwitchToPanel(2);
00837         DoDataExchange_CheckoutOptions(theDialog, mf, hasDate, hasRev,
00838             sLastDate, sLastRev, useMostRecent, doexport, forceCvsroot, false);
00839         multiView->SwitchToPanel(3);
00840         DoDataExchange_Globals(theDialog, false);
00841
00842         Assert_(sLastModName.length() != 0);
00843
00844         userHitOK = true;
00845     }
00846 #endif /* qMacCvsPP */
00847 #if qUnix
00848     void *wid = UCreate_CheckoutDlg();
00849
00850     UCvsCheckout *dlg = new UCvsCheckout();
00851     UCvsCheckout_MAIN *tab1 = new UCvsCheckout_MAIN(sLastModName, path);
00852     UCvsCheckout_STICKY *tab2 = new UCvsCheckout_STICKY(sLastRev, sLastDate);
00853     UCvsCheckout_OPTIONS *tab3 = new UCvsCheckout_OPTIONS();
00854     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00855     dlg->AddPage(tab1, UCvsCheckout::kTabGeneral, 0);
00856     dlg->AddPage(tab2, UCvsCheckout::kTabGeneral, 1);
00857     dlg->AddPage(tab3, UCvsCheckout::kTabGeneral, 2);
00858
00859     if(dlg->DoModal())
00860     {
00861         sLastModName = tab1->m_modname;
00862         path = tab1->m_path;
00863         norecurs = tab1->m_norecurs;
00864         toStdout = tab1->m_stdout;
00865
00866         sLastDate = tab2->m_date;
00867         sLastRev = tab2->m_rev;
00868         hasDate = tab2->m_hasdate;
00869         hasRev = tab2->m_hasrev;
00870         useMostRecent = tab2->m_match;
00871
00872         doexport = tab3->m_export;
00873         forceCvsroot = tab3->m_forceroot;
00874
00875         userHitOK = true;
00876     }
00877
00878     delete dlg;
00879 #endif // qUnix
00880
00881     if( userHitOK )
00882     {
00883         threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00884         caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00885         lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00886
00887         if( hasDate && !sLastDate.empty() )
00888             date = sLastDate;
00889
00890         if( hasRev && !sLastRev.empty() )
00891             rev = sLastRev;
00892
00893         modname = sLastModName;
00894
00895         dontShortenPaths = lastDontShortenPaths;
00896
00897         if( merge1 && merge2 && !sLastRev1.empty() && !sLastRev2.empty() )
00898         {
00899             rev1 = sLastRev1;
00900             rev2 = sLastRev2;
00901
00902             if( hasDate1 )
00903                 rev1 << ":" << sLastDate1;
00904
00905             if( hasDate2 )
00906                 rev2 << ":" << sLastDate2;
00907         }
00908
00909         if( merge1 && !merge2 && !sLastRev1.empty() )
00910         {
00911             rev1 = sLastRev1;
00912
00913             if( hasDate1 )
00914                 rev1 << ":" << sLastDate1;
00915         }
00916
00917         forceCvsroot = lastForceCvsroot;
00918         cvsroot = sLastCvsroot;
00919
00920         if( forceCvsroot )
00921         {
00922             if( mf )
00923             {
00924                 // Add selection rather than actual checkout folder
00925                 CStr strSelection;
00926                 mf->getdir(0, strSelection);
00927
00928                 if( !strSelection.empty() )
00929                 {
00930                     InsertLastCvsroot(strSelection, cvsroot);
00931                     InsertLastModuleName(strSelection, modname);
00932                 }
00933             }
00934
00935             if( overrideCheckoutDir && !path.empty() )
00936             {
00937                 // Add override folder if selected
00938                 CStr strPath(path);
00939                 strPath << kPathDelimiter << checkoutDir;
00940
00941                 InsertLastCvsroot(strPath, cvsroot);
00942                 InsertLastModuleName(strPath, modname);
00943             }
00944         }
00945
00946         gCvsPrefs.save();
00947     }
00948
00949     return userHitOK;
00950 }

Here is the call graph for this function:

Variable Documentation

CMString gOldModules

Generated on Sat Aug 7 22:43:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CommitDlg.cpp File Reference

common/CommitDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include <process.h>
#include "CommitDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "getline.h"
#include "MultiString.h"
#include "CvsCommands.h"
#include "EditorMonDlg.h"
#include "ItemListDlg.h"
#include "BrowseViewHandlers.h"
#include "GetPrefs.h"

Include dependency graph for CommitDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool | CompatGetCommit (const MultiFiles *mf, UStr &commit, bool &norecurs, bool &forceCommit, bool &forceRecurse, UStr &rev, bool &noModuleProgram, bool &checkValidEdits)

Variables

CMString | gCommitLogs (20,"P_CommitLogs")
CPersistentBool | gCheckValidEdits ("P_CheckValidEdits", false, kAddSettings)

Function Documentation

bool CompatGetCommit | ( | const MultiFiles * | mf,
 |  | UStr & | commit,
 |  | bool & | norecurs,
 |  | bool & | forceCommit,
 |  | bool & | forceRecurse,
 |  | UStr & | rev,
 |  | bool & | noModuleProgram,
 |  | bool & | checkValidEdits
 | ) |

Get the commit options Definition at line 882 of file CommitDlg.cpp.

References MultiFiles::begin(), MultiFiles::const_iterator, ConvertString(), CStr, UStr::empty(), MultiFiles::end(), UStr::endsWith(), EV_INIT_WIDGET, gCheckValidEdits, gCvsPrefs, MultiFiles::getdir(), CCommit_MAIN::GetLogMsg(), kUMainWidget, CCommit_OPTIONS::m_checkValidEdits, CCommit_OPTIONS::m_forceCommit, CCommit_OPTIONS::m_forceRecurse, CCommit_OPTIONS::m_forceRevision, CCommit_OPTIONS::m_noModuleProgram, CCommit_OPTIONS::m_noRecurse, CCommit_OPTIONS::m_rev, MultiFiles::newdir(), MultiFiles::newfile(), MultiFiles::NumDirs(), KoDiffHandler::OnFiles(), CvsPrefs::save(), CGetPrefs_GLOBALS::StoreValues(), MultiFiles::TotalNumFiles(), UCreate_CommitDlg(), and UEventSendMessage().

Referenced by CvsCmdCommit().

00886 {
00887     bool userHitOK = false;
00888
00889     static CStr sLastMsg;
00890     static CStr sLastRev;
00891
00892     bool hasRev = false;
00893
00894     norecurs = false;
00895     commit = "";
00896     forceCommit = false;
00897     forceRecurse = false;
00898     rev = "";
00899     noModuleProgram = false;
00900     checkValidEdits = (bool)gCheckValidEdits;
00901
00902 #ifdef WIN32
00903     CHHelpPropertySheet pages("Commit settings");
00904     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00905
00906     CCommit_MAIN page1(mf, sLastMsg);
00907     CCommit_OPTIONS page2(mf);
00908     CGetPrefs_GLOBALS page3;
00909
00910     pages.AddPage(&page1);
00911     pages.AddPage(&page2);
00912     pages.AddPage(&page3);
00913
00914     if( pages.DoModal() == IDOK )
00915     {
00916         commit = (const char*)page1.GetLogMsg();
00917         sLastMsg = (const char*)page1.GetLogMsg();
00918
00919         norecurs = page2.m_noRecurse ? true : false;
00920         forceCommit = page2.m_forceCommit ? true : false;
00921         forceRecurse = page2.m_forceRecurse ? true : false;
00922         hasRev = page2.m_forceRevision ? true : false;
00923         sLastRev = page2.m_rev;
00924         noModuleProgram = page2.m_noModuleProgram ? true : false;
00925         gCheckValidEdits = page2.m_checkValidEdits ? true : false;
00926
00927         page3.StoreValues();
00928
00929         userHitOK = true;
00930     }
00931 #endif /* WIN32 */
00932
00933 #ifndef WIN32
00934     // Redundant, to be phased out since it can be extracted in the dialog itself
00935     const char* pathTmpl = 0L;
00936     CStr tmpl;
00937     if( mf->NumDirs() > 0 )
00938     {
00939         if( mf->getdir(0, tmpl) )
00940         {
00941             pathTmpl = tmpl.c_str();
00942         }
00943     }
00944 #endif
00945
00946 #ifdef qMacCvsPP
00947     StDialogHandler theHandler(dlg_Commit, LCommander::GetTopCommander());
00948     LWindow *theDialog = theHandler.GetDialog();
00949     ThrowIfNil_(theDialog);
00950     static UInt16 sRuntimePanel = 1;
00951     UInt16      msgEncoding(sCommitMsgEncoding);
00952
00953     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00954         (theDialog->FindPaneByID(item_MultiViewPrefs));
00955     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00956
00957     multiView->SwitchToPanel(3);
00958     DoDataExchange_Globals(theDialog, true);
00959     multiView->SwitchToPanel(2);
00960     DoDataExchange_CommitOptions(theDialog, mf, norecurs, forceCommit, forceRecurse, hasRev, sLastRev, noModuleProgram, true);
00961     multiView->SwitchToPanel(1);
00962     DoDataExchange_Commit(theDialog, sLastMsg, pathTmpl, msgEncoding, true);
00963
00964     LPopupButton *previewDiff = dynamic_cast<LPopupButton*>
00965                                 (theDialog->FindPaneByID(item_PreviewDiffPopup));
00966     LPushButton *previewBtn = dynamic_cast<LPushButton*>
00967                                 (theDialog->FindPaneByID(item_PreviewDiffBtn));
00968     previewBtn->AddListener(&theHandler);
00969     previewDiff->DeleteAllMenuItems();
00970     if( mf && mf->TotalNumFiles() )
00971     {
00972         MultiFiles::const_iterator mfi;
00973         for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00974         {
00975             for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
00976             {
00977                 UStr path;
00978                 UStr fileName, currRev;
00979
00980                 mfi->get(nIndex, path, fileName, currRev);
00981                 if(!path.empty() && !path.endsWith(kPathDelimiter))
00982                     path << kPathDelimiter;
00983                 path << fileName;
00984                 previewDiff->InsertMenuItem(LStr255(path), ::CountMenuItems(previewDiff->GetMacMenuH()));
00985             }
00986         }
00987     }
00988     else
00989     {
00990         previewDiff->Disable();
00991         previewBtn->Disable();
00992     }
00993
00994     groupView->SetValue(sRuntimePanel);
00995     theDialog->Show();
00996     MessageT hitMessage;
00997     while (true)
00998     {       // Let DialogHandler process events
00999         hitMessage = theHandler.DoDialog();
01000
01001         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01002             break;
01003
01004         if(hitMessage == item_PreviewDiffBtn)
01005         {
01006             int file = previewDiff->GetCurrentMenuItem(), count = 1;
01007             MultiFiles::const_iterator mfi;
01008             for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01009             {
01010                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++, count++)
01011                 {
01012                     if(count == file)
01013                     {
01014                         UStr path;
01015                         UStr fileName, currRev;
01016                         mfi->get(nIndex, path, fileName, currRev);
01017
01018                         MultiFiles mf;
01019                         mf.newdir(path);
01020                         mf.newfile(fileName, 0, currRev);
01021
01022                         KoDiffHandler handler;
01023                         handler.OnFiles(&mf);
01024                         break;
01025                     }
01026                 }
01027             }
01028         }
01029     }
01030     theDialog->Hide();
01031     sRuntimePanel = groupView->GetValue();
01032
01033     if(hitMessage == msg_OK)
01034     {
01035         multiView->SwitchToPanel(1);
01036         DoDataExchange_Commit(theDialog, sLastMsg, pathTmpl, msgEncoding, false);
01037         multiView->SwitchToPanel(2);
01038         DoDataExchange_CommitOptions(theDialog, mf, norecurs, forceCommit, forceRecurse, hasRev, sLastRev, noModuleProgram, false);
01039         multiView->SwitchToPanel(3);
01040         DoDataExchange_Globals(theDialog, false);
01041         sCommitMsgEncoding = msgEncoding;
01042         if ( msgEncoding == kMsgEncodingUTF8 ) {
01043         commit = sLastMsg;
01044         } else {
01045           commit = ConvertString(sLastMsg, kCFStringEncodingUTF8, msgEncoding == kMsgEncodingMacOSRoman ? kCFStringEncodingMacRoman : kCFStringEncodingISOLatin1, true);
01046         }
01047         commit.replace('\015', '\012');
01048         userHitOK = true;
01049     }
01050 #endif /* qMacCvsPP */
01051 #if qUnix
01052     void *wid = UCreate_CommitDlg();
01053
01054     UCvsCommit *dlg = new UCvsCommit();
01055     UCvsCommit_MAIN *tab1 = new UCvsCommit_MAIN( mf, sLastMsg, pathTmpl);
01056     UCvsCommit_OPTIONS *tab2 = new UCvsCommit_OPTIONS( mf);
01057
01058     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01059     dlg->AddPage(tab1, UCvsCommit::kTabGeneral, 0);
01060     dlg->AddPage(tab2, UCvsCommit::kTabGeneral, 1);
01061
01062     if(dlg->DoModal())
01063     {
01064         commit = tab1->m_logmsg;
01065         sLastMsg = tab1->m_logmsg;
01066         norecurs = tab2->m_noRecurse;
01067         forceCommit = tab2->m_forceCommit;
01068         forceRecurse = tab2->m_forceRecurse;
01069         hasRev = tab2->m_forceRevision;
01070         sLastRev = tab2->m_rev;
01071         noModuleProgram = tab2->m_noModuleProgram;
01072         gCheckValidEdits = tab2->m_checkValidEdits;
01073
01074         userHitOK = true;
01075     }
01076
01077     delete dlg;
01078 #endif // qUnix
01079
01080     if( userHitOK )
01081     {
01082         if( commit.length() == 0 )
01083             commit = "no message";
01084
01085         if( hasRev && !sLastRev.empty() )
01086             rev = sLastRev;
01087
01088         checkValidEdits = (bool)gCheckValidEdits;
01089
01090         gCvsPrefs.save();
01091     }
01092
01093     return userHitOK;
01094 }

Here is the call graph for this function:

Variable Documentation

CPersistentBool gCheckValidEdits("P_CheckValidEdits", false, kAddSettings) [static]

Referenced by CCommit_OPTIONS::CCommit_OPTIONS(), and CompatGetCommit().

CMString gCommitLogs(20,"P_CommitLogs")

Generated on Sat Aug 7 22:43:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CommitDlg.h File Reference

common/CommitDlg.h File Reference

#include "SmartComboBox.h"
#include "MultilineEntryDlg.h"
#include "HHelpSupport.h"

Include dependency graph for CommitDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCommit_MAIN
class | CCommit_OPTIONS

Defines

#define | AFX_COMMITDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

bool | CompatGetCommit (const MultiFiles *mf, UStr &commit, bool &norecurs, bool &forceCommit, bool &forceRecurse, UStr &rev, bool &noModuleProgram, bool &checkValidEdits)

Variables

CMString gRevNames

Define Documentation

#define AFX_COMMITDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file CommitDlg.h.

Function Documentation

bool CompatGetCommit | ( | const MultiFiles * | mf,
 |  | UStr & | commit,
 |  | bool & | norecurs,
 |  | bool & | forceCommit,
 |  | bool & | forceRecurse,
 |  | UStr & | rev,
 |  | bool & | noModuleProgram,
 |  | bool & | checkValidEdits
 | ) |

Get the commit options Definition at line 882 of file CommitDlg.cpp.

References MultiFiles::begin(), MultiFiles::const_iterator, ConvertString(), CStr, UStr::empty(), MultiFiles::end(), UStr::endsWith(), EV_INIT_WIDGET, gCheckValidEdits, gCvsPrefs, MultiFiles::getdir(), CCommit_MAIN::GetLogMsg(), kUMainWidget, CCommit_OPTIONS::m_checkValidEdits, CCommit_OPTIONS::m_forceCommit, CCommit_OPTIONS::m_forceRecurse, CCommit_OPTIONS::m_forceRevision, CCommit_OPTIONS::m_noModuleProgram, CCommit_OPTIONS::m_noRecurse, CCommit_OPTIONS::m_rev, MultiFiles::newdir(), MultiFiles::newfile(), MultiFiles::NumDirs(), KoDiffHandler::OnFiles(), CvsPrefs::save(), CGetPrefs_GLOBALS::StoreValues(), MultiFiles::TotalNumFiles(), UCreate_CommitDlg(), and UEventSendMessage().

Referenced by CvsCmdCommit().

00886 {
00887     bool userHitOK = false;
00888
00889     static CStr sLastMsg;
00890     static CStr sLastRev;
00891
00892     bool hasRev = false;
00893
00894     norecurs = false;
00895     commit = "";
00896     forceCommit = false;
00897     forceRecurse = false;
00898     rev = "";
00899     noModuleProgram = false;
00900     checkValidEdits = (bool)gCheckValidEdits;
00901
00902 #ifdef WIN32
00903     CHHelpPropertySheet pages("Commit settings");
00904     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00905
00906     CCommit_MAIN page1(mf, sLastMsg);
00907     CCommit_OPTIONS page2(mf);
00908     CGetPrefs_GLOBALS page3;
00909
00910     pages.AddPage(&page1);
00911     pages.AddPage(&page2);
00912     pages.AddPage(&page3);
00913
00914     if( pages.DoModal() == IDOK )
00915     {
00916         commit = (const char*)page1.GetLogMsg();
00917         sLastMsg = (const char*)page1.GetLogMsg();
00918
00919         norecurs = page2.m_noRecurse ? true : false;
00920         forceCommit = page2.m_forceCommit ? true : false;
00921         forceRecurse = page2.m_forceRecurse ? true : false;
00922         hasRev = page2.m_forceRevision ? true : false;
00923         sLastRev = page2.m_rev;
00924         noModuleProgram = page2.m_noModuleProgram ? true : false;
00925         gCheckValidEdits = page2.m_checkValidEdits ? true : false;
00926
00927         page3.StoreValues();
00928
00929         userHitOK = true;
00930     }
00931 #endif /* WIN32 */
00932
00933 #ifndef WIN32
00934     // Redundant, to be phased out since it can be extracted in the dialog itself
00935     const char* pathTmpl = 0L;
00936     CStr tmpl;
00937     if( mf->NumDirs() > 0 )
00938     {
00939         if( mf->getdir(0, tmpl) )
00940         {
00941             pathTmpl = tmpl.c_str();
00942         }
00943     }
00944 #endif
00945
00946 #ifdef qMacCvsPP
00947     StDialogHandler theHandler(dlg_Commit, LCommander::GetTopCommander());
00948     LWindow *theDialog = theHandler.GetDialog();
00949     ThrowIfNil_(theDialog);
00950     static UInt16 sRuntimePanel = 1;
00951     UInt16      msgEncoding(sCommitMsgEncoding);
00952
00953     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00954         (theDialog->FindPaneByID(item_MultiViewPrefs));
00955     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00956
00957     multiView->SwitchToPanel(3);
00958     DoDataExchange_Globals(theDialog, true);
00959     multiView->SwitchToPanel(2);
00960     DoDataExchange_CommitOptions(theDialog, mf, norecurs, forceCommit, forceRecurse, hasRev, sLastRev, noModuleProgram, true);
00961     multiView->SwitchToPanel(1);
00962     DoDataExchange_Commit(theDialog, sLastMsg, pathTmpl, msgEncoding, true);
00963
00964     LPopupButton *previewDiff = dynamic_cast<LPopupButton*>
00965                                 (theDialog->FindPaneByID(item_PreviewDiffPopup));
00966     LPushButton *previewBtn = dynamic_cast<LPushButton*>
00967                                 (theDialog->FindPaneByID(item_PreviewDiffBtn));
00968     previewBtn->AddListener(&theHandler);
00969     previewDiff->DeleteAllMenuItems();
00970     if( mf && mf->TotalNumFiles() )
00971     {
00972         MultiFiles::const_iterator mfi;
00973         for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00974         {
00975             for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
00976             {
00977                 UStr path;
00978                 UStr fileName, currRev;
00979
00980                 mfi->get(nIndex, path, fileName, currRev);
00981                 if(!path.empty() && !path.endsWith(kPathDelimiter))
00982                     path << kPathDelimiter;
00983                 path << fileName;
00984                 previewDiff->InsertMenuItem(LStr255(path), ::CountMenuItems(previewDiff->GetMacMenuH()));
00985             }
00986         }
00987     }
00988     else
00989     {
00990         previewDiff->Disable();
00991         previewBtn->Disable();
00992     }
00993
00994     groupView->SetValue(sRuntimePanel);
00995     theDialog->Show();
00996     MessageT hitMessage;
00997     while (true)
00998     {       // Let DialogHandler process events
00999         hitMessage = theHandler.DoDialog();
01000
01001         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01002             break;
01003
01004         if(hitMessage == item_PreviewDiffBtn)
01005         {
01006             int file = previewDiff->GetCurrentMenuItem(), count = 1;
01007             MultiFiles::const_iterator mfi;
01008             for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01009             {
01010                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++, count++)
01011                 {
01012                     if(count == file)
01013                     {
01014                         UStr path;
01015                         UStr fileName, currRev;
01016                         mfi->get(nIndex, path, fileName, currRev);
01017
01018                         MultiFiles mf;
01019                         mf.newdir(path);
01020                         mf.newfile(fileName, 0, currRev);
01021
01022                         KoDiffHandler handler;
01023                         handler.OnFiles(&mf);
01024                         break;
01025                     }
01026                 }
01027             }
01028         }
01029     }
01030     theDialog->Hide();
01031     sRuntimePanel = groupView->GetValue();
01032
01033     if(hitMessage == msg_OK)
01034     {
01035         multiView->SwitchToPanel(1);
01036         DoDataExchange_Commit(theDialog, sLastMsg, pathTmpl, msgEncoding, false);
01037         multiView->SwitchToPanel(2);
01038         DoDataExchange_CommitOptions(theDialog, mf, norecurs, forceCommit, forceRecurse, hasRev, sLastRev, noModuleProgram, false);
01039         multiView->SwitchToPanel(3);
01040         DoDataExchange_Globals(theDialog, false);
01041         sCommitMsgEncoding = msgEncoding;
01042         if ( msgEncoding == kMsgEncodingUTF8 ) {
01043         commit = sLastMsg;
01044         } else {
01045           commit = ConvertString(sLastMsg, kCFStringEncodingUTF8, msgEncoding == kMsgEncodingMacOSRoman ? kCFStringEncodingMacRoman : kCFStringEncodingISOLatin1, true);
01046         }
01047         commit.replace('\015', '\012');
01048         userHitOK = true;
01049     }
01050 #endif /* qMacCvsPP */
01051 #if qUnix
01052     void *wid = UCreate_CommitDlg();
01053
01054     UCvsCommit *dlg = new UCvsCommit();
01055     UCvsCommit_MAIN *tab1 = new UCvsCommit_MAIN( mf, sLastMsg, pathTmpl);
01056     UCvsCommit_OPTIONS *tab2 = new UCvsCommit_OPTIONS( mf);
01057
01058     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01059     dlg->AddPage(tab1, UCvsCommit::kTabGeneral, 0);
01060     dlg->AddPage(tab2, UCvsCommit::kTabGeneral, 1);
01061
01062     if(dlg->DoModal())
01063     {
01064         commit = tab1->m_logmsg;
01065         sLastMsg = tab1->m_logmsg;
01066         norecurs = tab2->m_noRecurse;
01067         forceCommit = tab2->m_forceCommit;
01068         forceRecurse = tab2->m_forceRecurse;
01069         hasRev = tab2->m_forceRevision;
01070         sLastRev = tab2->m_rev;
01071         noModuleProgram = tab2->m_noModuleProgram;
01072         gCheckValidEdits = tab2->m_checkValidEdits;
01073
01074         userHitOK = true;
01075     }
01076
01077     delete dlg;
01078 #endif // qUnix
01079
01080     if( userHitOK )
01081     {
01082         if( commit.length() == 0 )
01083             commit = "no message";
01084
01085         if( hasRev && !sLastRev.empty() )
01086             rev = sLastRev;
01087
01088         checkValidEdits = (bool)gCheckValidEdits;
01089
01090         gCvsPrefs.save();
01091     }
01092
01093     return userHitOK;
01094 }

Here is the call graph for this function:

Variable Documentation

CMString gRevNames

Generated on Sat Aug 7 22:43:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CPStr.cpp File Reference

common/CPStr.cpp File Reference

#include "stdafx.h"
#include "CPStr.h"

Include dependency graph for CPStr.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:43:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CPStr.h File Reference

common/CPStr.h File Reference

#include <string.h>
#include <stdlib.h>
#include <exception>
#include "Persistent.h"
#include "ustr.h"

Include dependency graph for CPStr.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | PCPStr
Persistent P string. More...
class | PCStr
Persistent C string. More...

Generated on Sat Aug 7 22:43:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CTCP2Parse.cpp File Reference

common/CTCP2Parse.cpp File Reference

#include "stdafx.h"
#include "CTCP2Parse.hpp"

Include dependency graph for CTCP2Parse.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | CTCP2_TOGGLE(ch, var)
#define | CCOLOR (char)3
#define | CCTCP2 (char)6
#define | MIRC_TRANSPARENT 16
#define | isn(ch) ((ch) >= '0' && (ch) <= '9')
#define | CBOLD (char)2
#define | CCTCP2 (char)6
#define | CSTOP (char)15
#define | CREV (char)22
#define | CUNDR (char)31
#define | INVALID_SEQUENCE -1
#define | ANSI_SGM_TA_RESET 0
#define | ANSI_SGM_TA_BOLD 1
#define | ANSI_SGM_TA_FAINT 2
#define | ANSI_SGM_TA_ITALIC 3
#define | ANSI_SGM_TA_ULINE 4
#define | ANSI_SGM_TA_BLINK 5
#define | ANSI_SGM_TA_REV 7
#define | ANSI_SGM_TA_CONSEAL 8
#define | ANSI_SGM_TA_NORMAL 22
#define | ANSI_SGM_TA_ITALIC_OFF 23
#define | ANSI_SGM_TA_ULINE_OFF 24
#define | ANSI_SGM_TA_BLINK_OFF 25
#define | ANSI_SGM_TA_REV_OFF 27
#define | ANSI_SGM_FC_BLK 30
#define | ANSI_SGM_FC_RED 31
#define | ANSI_SGM_FC_GRN 32
#define | ANSI_SGM_FC_YEL 33
#define | ANSI_SGM_FC_BLU 34
#define | ANSI_SGM_FC_MAG 35
#define | ANSI_SGM_FC_CYN 36
#define | ANSI_SGM_FC_WHT 37
#define | ANSI_SGM_FC_DEFAULT 39
#define | ANSI_SGM_BC_BLK 40
#define | ANSI_SGM_BC_RED 41
#define | ANSI_SGM_BC_GRN 42
#define | ANSI_SGM_BC_YEL 43
#define | ANSI_SGM_BC_BLU 44
#define | ANSI_SGM_BC_MAG 45
#define | ANSI_SGM_BC_CYN 46
#define | ANSI_SGM_BC_WHT 47
#define | ANSI_SGM_BC_DEFAULT 49

Define Documentation

#define ANSI_SGM_BC_BLK 40

Definition at line 622 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_BC_BLU 44

Definition at line 626 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_BC_CYN 46

Definition at line 628 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_BC_DEFAULT 49

Definition at line 630 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_BC_GRN 42

Definition at line 624 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_BC_MAG 45

Definition at line 627 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_BC_RED 41

Definition at line 623 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_BC_WHT 47

Definition at line 629 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_BC_YEL 43

Definition at line 625 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_BLK 30

Definition at line 612 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_BLU 34

Definition at line 616 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_CYN 36

Definition at line 618 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_DEFAULT 39

Definition at line 620 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_GRN 32

Definition at line 614 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_MAG 35

Definition at line 617 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_RED 31

Definition at line 613 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_WHT 37

Definition at line 619 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_FC_YEL 33

Definition at line 615 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_BLINK 5

Definition at line 603 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_BLINK_OFF 25

Definition at line 609 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_BOLD 1

Definition at line 599 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_CONSEAL 8

Definition at line 605 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_FAINT 2

Definition at line 600 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_ITALIC 3

Definition at line 601 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_ITALIC_OFF 23

Definition at line 607 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_NORMAL 22

Definition at line 606 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_RESET 0

Definition at line 598 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_REV 7

Definition at line 604 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_REV_OFF 27

Definition at line 610 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_ULINE 4

Definition at line 602 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define ANSI_SGM_TA_ULINE_OFF 24

Definition at line 608 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m().

#define CBOLD (char)2

Definition at line 495 of file CTCP2Parse.cpp.

Referenced by irciiAttrCvt::ircii2ctcp().

#define CCOLOR (char)3

Definition at line 369 of file CTCP2Parse.cpp.

#define CCTCP2 (char)6

Definition at line 496 of file CTCP2Parse.cpp.

#define CCTCP2 (char)6

Definition at line 496 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::do_m(), irciiAttrCvt::ircii2ctcp(), and mircAttrCvt::mirc2ctcp().

#define CREV (char)22

Definition at line 498 of file CTCP2Parse.cpp.

Referenced by irciiAttrCvt::ircii2ctcp().

#define CSTOP (char)15

Definition at line 497 of file CTCP2Parse.cpp.

Referenced by irciiAttrCvt::ircii2ctcp().

#define CTCP2_TOGGLE | ( | ch,
 |  | var | )

Value:

case (ch): \
        decodeToggle(line, &parseFrmChar, &parseEndChar, &(var)); \
            break;

Referenced by CTCP2Parse::ParseIt().

#define CUNDR (char)31

Definition at line 499 of file CTCP2Parse.cpp.

Referenced by irciiAttrCvt::ircii2ctcp().

#define INVALID_SEQUENCE -1

Definition at line 552 of file CTCP2Parse.cpp.

Referenced by ansiAttrCvt::ansi2ctcp(), and ansiAttrCvt::AnsiSeq::AnsiSeq().

#define isn ( ch ) ((ch) >= '0' && (ch) <= '9')

Definition at line 372 of file CTCP2Parse.cpp.

Referenced by mircAttrCvt::extractcolor().

#define MIRC_TRANSPARENT 16

Definition at line 371 of file CTCP2Parse.cpp.

Referenced by mircAttrCvt::extractcolor().

Generated on Sat Aug 7 22:43:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CTCP2Parse.hpp File Reference

common/CTCP2Parse.hpp File Reference

#include <string>
#include <vector>

Include dependency graph for CTCP2Parse.hpp:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | mircAttrCvt
class | irciiAttrCvt
class | ansiAttrCvt
class | ansiAttrCvt::AnsiSeq
class | CTCP2Parse
struct | CTCP2Parse::RGBColor

Generated on Sat Aug 7 22:43:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsAlert.cpp File Reference

common/CvsAlert.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "CvsAlert.h"
#include "Persistent.h"

Include dependency graph for CvsAlert.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define DEFAULT_ALERT_TITLE _i18n("WinCvs Alert");
Default CvsAlert dialog title.

Define Documentation

#define DEFAULT_ALERT_TITLE _i18n("WinCvs Alert");

Default CvsAlert dialog title.

Definition at line 54 of file CvsAlert.cpp.

Referenced by CvsAlert::CvsAlert().

Generated on Sat Aug 7 22:43:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsAlert.h File Reference

common/CvsAlert.h File Reference

#include <string>
#include "uwidget.h"
#include "cvsgui_i18n.h"

Include dependency graph for CvsAlert.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CvsAlert
CVS Alert class. More...
class | CCVSAlert_MAIN

Defines

#define | AFX_CVSALERT_H__ACFE8C41_9836_11D1_AE50_00C0F0067852__INCLUDED_
#define | BUTTONTITLE_OK _i18n("OK")
Title for OK button.
#define | BUTTONTITLE_CANCEL _i18n("Cancel")
Title for Cancel button.
#define | BUTTONTITLE_CONTINUE _i18n("Continue")
Title for Continue button.
#define | BUTTONTITLE_YES _i18n("Yes")
Title for Yes button.
#define | BUTTONTITLE_NO _i18n("No")
Title for No button.
#define | BUTTONTITLE_DELETE _i18n("Delete")
Title for Delete button.

Enumerations

enum kCvsAlertIconType {
kCvsAlertNoIcon,
kCvsAlertStopIcon,
kCvsAlertNoteIcon,
kCvsAlertWarningIcon,
kCvsAlertQuestionIcon
}
Icon type enum. More...
enum kCvsAlertButtonType {
kCvsAlertOKButton,
kCvsAlertCancelButton,
kCvsAlertOtherButton
}
Button IDs enum. More...

Define Documentation

#define AFX_CVSALERT_H__ACFE8C41_9836_11D1_AE50_00C0F0067852__INCLUDED_

Definition at line 25 of file CvsAlert.h.

#define BUTTONTITLE_CANCEL _i18n("Cancel")

Title for Cancel button.

Definition at line 40 of file CvsAlert.h.

Referenced by AskCreatePersistentSettings(), CvsCmdAdd(), CGraphView::OnGraphSetstate(), CCVSAlert_MAIN::SetButtonAccelerator(), and CvsAlert::ShowAlert().

#define BUTTONTITLE_CONTINUE _i18n("Continue")

Title for Continue button.

Definition at line 43 of file CvsAlert.h.

Referenced by CvsCmdAdd(), and CGraphView::OnGraphSetstate().

#define BUTTONTITLE_DELETE _i18n("Delete")

Title for Delete button.

Definition at line 52 of file CvsAlert.h.

Referenced by AskCreatePersistentSettings().

#define BUTTONTITLE_NO _i18n("No")

Title for No button.

Definition at line 49 of file CvsAlert.h.

Referenced by CompatMakeSurePathExists(), DDV_CheckCVSROOT(), glue_getenv(), CGraphView::OnViewDelrev(), and USmartCombo::RemoveItem().

#define BUTTONTITLE_OK _i18n("OK")

Title for OK button.

Definition at line 37 of file CvsAlert.h.

Referenced by CItemListDlg::CheckSettings(), CompatGetEditorMsg(), CTipDlg::CTipDlg(), DDV_CheckPathExists(), DDV_MinChars(), CHistComboBoxEx::DelKeyTest(), CImport_MAIN::DoDataExchange(), CTipDlg::GetNextTipString(), CWincvsApp::InitInstance(), CMainFrame::OnClose(), CWincvsApp::OnHelpCvs(), CTemplateDlg::OnInitDialog(), CTemplateDlg::OnOK(), UCvsFrame::OnQuit(), UCvsFolders::ProcessSelectionCommand(), CCVSAlert_MAIN::SetButtonAccelerator(), and CvsAlert::ShowAlert().

#define BUTTONTITLE_YES _i18n("Yes")

Title for Yes button.

Definition at line 46 of file CvsAlert.h.

Referenced by CompatMakeSurePathExists(), DDV_CheckCVSROOT(), glue_getenv(), CGraphView::OnViewDelrev(), and USmartCombo::RemoveItem().

Enumeration Type Documentation

enum kCvsAlertButtonType

Button IDs enum.

Enumeration values:
kCvsAlertOKButton | OK button ID
kCvsAlertCancelButton | Cancel button ID
kCvsAlertOtherButton | ID of optional 3rd button
Definition at line 66 of file CvsAlert.h.

Referenced by CvsCmdMoveToTrash(), and CvsAlert::ShowAlert().

00066              {
00067     kCvsAlertOKButton,
00068     kCvsAlertCancelButton,
00069     kCvsAlertOtherButton
00070 }kCvsAlertButtonType;

enum kCvsAlertIconType

Icon type enum.

Enumeration values:
kCvsAlertNoIcon | No icon
kCvsAlertStopIcon | Stop icon (for critical errors)
kCvsAlertNoteIcon | Note/information icon
kCvsAlertWarningIcon | Warning/exclamation icon
kCvsAlertQuestionIcon | Question icon
Definition at line 57 of file CvsAlert.h.

Referenced by CvsAlert::GetIcon().

00057              {
00058     kCvsAlertNoIcon,
00059     kCvsAlertStopIcon,
00060     kCvsAlertNoteIcon,
00061     kCvsAlertWarningIcon,
00062     kCvsAlertQuestionIcon
00063 }kCvsAlertIconType;

Generated on Sat Aug 7 22:43:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsArgs.cpp File Reference

common/CvsArgs.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <string>
#include <sstream>
#include "CvsPrefs.h"
#include "CvsArgs.h"
#include "AppConsole.h"
#include "Authen.h"
#include "FileTraversal.h"
#include "MoveToTrash.h"

Include dependency graph for CvsArgs.cpp:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace | std

Defines

#define | MAX_PRINT_ARG 80

Functions

char * | mystrdup (const char *string)
char * | reduceString (const char *str, CStaticAllocT< char > &buf)
Reduce a long string for printing, add "..." if the length is up the limit.
char * | expandLF (const char *str, CStaticAllocT< char > &buf)
Replace
by "\n" so it's readable.

Variables

CStaticAllocT< char > | buf

Define Documentation

#define MAX_PRINT_ARG 80

Definition at line 50 of file CvsArgs.cpp.

Referenced by CvsArgs::print(), and reduceString().

Function Documentation

char* expandLF | ( | const char * | str,
 |  | CStaticAllocT< char > & | buf
 | ) | [static]

Replace
by "\n" so it's readable.

Definition at line 90 of file CvsArgs.cpp.

References CStaticAllocT< T >::AdjustSize(), and buf.

Referenced by CvsArgs::print().

00091 {
00092     int numLFs = 0;
00093     const char *runner = str;
00094     while((runner = strchr(runner, '\n')) != 0L)
00095     {
00096         numLFs++;
00097         runner++;
00098     }
00099
00100     size_t len = strlen(str);
00101     buf.AdjustSize(len + numLFs + 1); // numLFs * "\n" + '\0'
00102
00103     char *tmp = buf;
00104     char c;
00105     runner = str;
00106     while((c = *runner++) != '\0')
00107     {
00108         if(c == '\n')
00109         {
00110             *tmp++ = '\\';
00111             *tmp++ = 'n';
00112         }
00113         else
00114             *tmp++ = c;
00115     }
00116     *tmp++ = '\0';
00117
00118     return buf;
00119 }

Here is the call graph for this function:

char* mystrdup ( const char * string ) [static]

Definition at line 54 of file CvsArgs.cpp.

References cvs_err(), exit, malloc, and NULL.

Referenced by CvsArgs::add(), and CvsArgs::reset().

00055 {
00056     int size = strlen(string);
00057     char *result = (char *)malloc((size + 1) * sizeof(char));
00058     if(result == NULL)
00059     {
00060         cvs_err("Impossible to allocate %d bytes !\n", size + 1);
00061         exit(1);
00062     }
00063     strcpy(result, string);
00064     return result;
00065 }

Here is the call graph for this function:

char* reduceString | ( | const char * | str,
 |  | CStaticAllocT< char > & | buf
 | ) | [static]

Reduce a long string for printing, add "..." if the length is up the limit.

Definition at line 68 of file CvsArgs.cpp.

References CStaticAllocT< T >::AdjustSize(), buf, and MAX_PRINT_ARG.

Referenced by CvsArgs::print().

00069 {
00070     buf.AdjustSize(MAX_PRINT_ARG + 4); // "..." + '\0'
00071     size_t len = strlen(str);
00072     if(len < MAX_PRINT_ARG)
00073     {
00074         strcpy(buf, str);
00075     }
00076     else
00077     {
00078         memcpy((char *)buf, str, MAX_PRINT_ARG * sizeof(char));
00079         char *tmp = (char *)buf + MAX_PRINT_ARG;
00080         *tmp++ = '.';
00081         *tmp++ = '.';
00082         *tmp++ = '.';
00083         *tmp = '\0';
00084     }
00085
00086     return buf;
00087 }

Here is the call graph for this function:

Variable Documentation

CStaticAllocT<char> buf [static]

Definition at line 52 of file CvsArgs.cpp.

Referenced by expandLF(), CvsArgs::print(), and reduceString().

Generated on Sat Aug 7 22:43:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsArgs.h File Reference

common/CvsArgs.h File Reference

#include "TextBinary.h"

Include dependency graph for CvsArgs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CvsArgs
Class to handle cvs arguments, append "cvs" and misc options defined by preferences ("-z9" for example). More...
class | ControlCvsArgs
Base class for control arguments used by add commands (added files are tested appropriate). More...
class | AddCvsArgs
Class to add files. More...
class | AddBinCvsArgs
Class to add binary files. More...
class | AddUnicodeCvsArgs
Class to add Unicode files. More...
class | RemoveCvsArgs
Class to remove files. More...

Defines

#define | CVS_CMD "cvs"
CVS command line client abbreviation.

Define Documentation

#define CVS_CMD "cvs"

CVS command line client abbreviation.

Definition at line 34 of file CvsArgs.h.

Referenced by CvsCmdCommandLine(), and CvsArgs::reset().

Generated on Sat Aug 7 22:43:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsCommands.cpp File Reference

common/CvsCommands.cpp File Reference

#include "stdafx.h"
#include <errno.h>
#include <process.h>
#include "wincvs.h"
#include "CvsCommands.h"
#include "CvsArgs.h"
#include "MultiFiles.h"
#include "PromptFiles.h"
#include "AppConsole.h"
#include "AppGlue.h"
#include "MoveToTrash.h"
#include "LineCmd.h"
#include "CvsAlert.h"
#include "CommitDlg.h"
#include "ImportDlg.h"
#include "CheckoutDlg.h"
#include "TclGlue.h"
#include "ImportFilterDlg.h"
#include "UpdateDlg.h"
#include "LogDlg.h"
#include "DiffDlg.h"
#include "LogParse.h"
#include "RtagDlg.h"
#include "TagDlg.h"
#include "InitDlg.h"
#include "ReleaseDlg.h"
#include "AnnotateDlg.h"
#include "StatusDlg.h"
#include "LoginDlg.h"
#include "BrowseViewHandlers.h"
#include "LaunchHandlers.h"
#include "FileActionDlg.h"
#include "Authen.h"

Include dependency graph for CvsCommands.cpp:

Include dependency graph

Go to the source code of this file.

Functions

const char * | GetEditTypeName (const kEditCmdType editType)
const char * | GetTagTypeName (const kTagCmdType tagType)
const char * | GetRtagTypeName (const kTagCmdType tagType)
void | CvsCmdMacrosAdmin (const char *macroName)
bool | CheckSelectionHandler (KiSelectionHandler &handler, MultiFiles *&mf, bool forceNormalize=false)
void | CvsCmdInit ()
void | CvsCmdLogin (void)
void | CvsCmdLogout (void)
void | CvsCmdRtag (KiSelectionHandler &handler, const kTagCmdType tagType)
void | CvsCmdCheckoutModule (KiSelectionHandler &handler)
void | CvsCmdImportModule (KiSelectionHandler &handler)
void | CvsCmdCommandLine (KiSelectionHandler &handler)
void | CvsCmdCancelChanges (KiSelectionHandler &handler)
void | CvsCmdUpdate (KiSelectionHandler &handler, bool queryOnly)
void | CvsCmdCommit (KiSelectionHandler &handler)
void | CvsCmdDiff (KiSelectionHandler &handler, kDiffCmdType diffType)
void | CvsCmdAdd (KiSelectionHandler &handler, kAddCmdType addType)
void | CvsCmdRemove (KiSelectionHandler &handler)
void | CvsCmdLog (KiSelectionHandler &handler, bool outGraph, void *defWnd)
void | CvsCmdStatus (KiSelectionHandler &handler)
void | CvsCmdLock (KiSelectionHandler &handler)
void | CvsCmdUnlock (KiSelectionHandler &handler)
void | CvsCmdTag (KiSelectionHandler &handler, const kTagCmdType tagType)
void | CvsCmdEdit (KiSelectionHandler &handler, kEditCmdType editType)
void | CvsCmdUnedit (KiSelectionHandler &handler)
void | CvsCmdWatchOn (KiSelectionHandler &handler)
void | CvsCmdWatchOff (KiSelectionHandler &handler)
void | CvsCmdRelease (KiSelectionHandler &handler)
void | CvsCmdWatchers (KiSelectionHandler &handler)
void | CvsCmdEditors (KiSelectionHandler &handler)
void | CvsCmdAnnotate (KiSelectionHandler &handler, kAnnotateCmdType annotateType)
void | CvsCmdMoveToTrash (KiSelectionHandler &handler)
void | CvsCmdFileAction (KiSelectionHandler &handler)
void | CvsCmdLaunch (KiSelectionHandler &handler, const kLaunchType launchType)

Function Documentation

bool CheckSelectionHandler | ( | KiSelectionHandler & | handler,
 |  | MultiFiles *& | mf,
 |  | bool | forceNormalize = false
 | ) | [static]

Verify the selection handler is properly setup to carry on launching command

Parameters:
handler | Command handler to be tested
mf | Returned selection as MultiFiles
forceNormalize | specifies whether to force normalization of the MultiFiles or rely on the selection handler's requirements
Returns:
true if handler is properly setup, false otherwise
Definition at line 189 of file CvsCommands.cpp.

References gCvsPrefs, KiSelectionHandler::GetNeedSelection(), KiSelectionHandler::GetSelection(), KiSelectionHandler::NeedsNormalize(), and MultiFiles::Normalize().

Referenced by CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdFileAction(), CvsCmdImportModule(), CvsCmdLaunch(), CvsCmdLock(), CvsCmdLog(), CvsCmdMoveToTrash(), CvsCmdRelease(), CvsCmdRemove(), CvsCmdRtag(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), and CvsCmdWatchOn().

00190 {
00191 #if INTERNAL_AUTHEN
00192     if( gCvsPrefs.empty() )
00193     {
00194         return false;
00195     }
00196 #endif /* INTERNAL_AUTHEN */
00197
00198     mf = handler.GetSelection();
00199     if( !mf && handler.GetNeedSelection() )
00200     {
00201         return false;
00202     }
00203
00204     return ( forceNormalize || handler.NeedsNormalize() ) ? mf->Normalize() : true;
00205 }

Here is the call graph for this function:

void CvsCmdAdd | ( | KiSelectionHandler & | handler,
 |  | kAddCmdType | addType
 | ) |

Execute cvs add command

Parameters:
handler | Selection for the command
addType | Add type
Definition at line 1224 of file CvsCommands.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), BUTTONTITLE_CANCEL, BUTTONTITLE_CONTINUE, CheckSelectionHandler(), MultiFiles::const_iterator, CStr, cvs_err(), MultiFiles::end(), ControlCvsArgs::HasProblem(), kAddBinary, kAddNormal, kAddUnicode, kCvsAlertOKButton, kCvsAlertWarningIcon, launchCVS(), NULL, CvsArgs::print(), CvsAlert::ShowAlert(), and SplitPath().

Referenced by KoAddHandler::OnFiles(), KoAddBinaryHandler::OnFiles(), KoAddUnicodeHandler::OnFiles(), KoAddHandler::OnFolder(), KoAddBinaryHandler::OnFolder(), and KoAddUnicodeHandler::OnFolder().

01225 {
01226     MultiFiles* mf = NULL;
01227     if( !CheckSelectionHandler(handler, mf) )
01228         return;
01229
01230     MultiFiles::const_iterator mfi;
01231     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01232     {
01233         if( mfi->NumFiles() > 0 )
01234         {
01235             // Files
01236             ControlCvsArgs* args = NULL;
01237             switch( addType )
01238             {
01239             default:
01240             case kAddNormal:
01241                 args = new AddCvsArgs;
01242                 break;
01243             case kAddBinary:
01244                 args = new AddBinCvsArgs;
01245                 break;
01246             case kAddUnicode:
01247                 args = new AddUnicodeCvsArgs;
01248                 break;
01249             }
01250
01251             if( !args )
01252             {
01253                 cvs_err("Unable to allocate memory for arguments list\n");
01254                 return;
01255             }
01256
01257             args->add("add");
01258
01259             if( addType == kAddBinary )
01260             {
01261                 args->add("-kb");
01262             }
01263             else if( addType == kAddUnicode )
01264             {
01265                 args->add("-ku");
01266             }
01267
01268             const char* dir = mfi->add(*args);
01269
01270             CvsAlert cvsAlert(kCvsAlertWarningIcon,
01271                 _i18n("Do you want to continue?"), _i18n("Some problems have been found while adding files and should be corrected. See the console window for details."),
01272                 BUTTONTITLE_CONTINUE, BUTTONTITLE_CANCEL);
01273
01274             if( !args->HasProblem() || cvsAlert.ShowAlert() == kCvsAlertOKButton )
01275             {
01276                 args->print(dir);
01277                 launchCVS(dir, args->Argc(), args->Argv());
01278             }
01279
01280             delete args;
01281         }
01282         else
01283         {
01284             // Directory
01285             const char* dir = mfi->getdir();
01286             CStr uppath, folder;
01287
01288             if( !SplitPath(dir, uppath, folder) )
01289             {
01290                 cvs_err(_i18n("Unable to convert path name '%s'\n"), dir);
01291                 return;
01292             }
01293
01294             CvsArgs args;
01295             args.add("add");
01296             args.add(folder);
01297
01298             args.print(uppath);
01299             launchCVS(uppath, args.Argc(), args.Argv());
01300         }
01301     }
01302 }

Here is the call graph for this function:

void CvsCmdAnnotate | ( | KiSelectionHandler & | handler,
 |  | kAnnotateCmdType | annotateType
 | ) |

Execute cvs annotate command

Parameters:
handler | Selection for the command
annotateType | Annotate command type
Definition at line 1794 of file CvsCommands.cpp.

References CvsArgs::add(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetAnnotate(), MultiFiles::const_iterator, CPStr, CStr, MultiFiles::end(), FlatenSubFolders(), MultiFilesEntry::get(), GetExtension(), kAnnotateGraph, launchCVS(), LaunchDefaultEditor(), NULL, MultiFilesEntry::NumFiles(), CvsArgs::print(), and MultiFiles::TotalNumFiles().

Referenced by KoAnnotateHandler::OnFiles(), and KoGraphAnnotateHandler::OnFiles().

01795 {
01796     MultiFiles* mf = NULL;
01797     if( !CheckSelectionHandler(handler, mf) )
01798         return;
01799
01800     bool noRecurs;
01801     bool isDate;
01802     CPStr rev;
01803     bool force;
01804
01805     if( annotateType == kAnnotateGraph )
01806     {
01807         if( mf->TotalNumFiles() == 1 )
01808         {
01809             const MultiFilesEntry& mfe = *mf->begin();
01810
01811             if( mfe.NumFiles() == 1 )
01812             {
01813               CStr ignorePath, ignoreName, revision;
01814
01815               if( mfe.get(0, ignorePath, ignoreName, revision) )
01816                   rev = revision;
01817             }
01818         }
01819     }
01820
01821     if( !CompatGetAnnotate(mf, annotateType, noRecurs, isDate, rev, force) )
01822         return;
01823
01824     MultiFiles::const_iterator mfi;
01825     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01826     {
01827         CStr path, filename, ext, base, currRev;
01828         CStr file;
01829
01830         for(int i = 0; ; i++)
01831         {
01832             if( !mfi->get(i, path, filename, currRev) )
01833                 break;
01834
01835             // note that filename can contain subfolders
01836
01837             GetExtension(filename, base, ext);
01838
01839             CvsArgs args;
01840             CStr tmpf(base);
01841
01842             if( !rev.empty() )
01843             {
01844                 tmpf << "_ann_";
01845                 tmpf << rev;
01846                 tmpf << '_';
01847             }
01848             else
01849                 tmpf << "_ann_";
01850
01851             // convert subfolder names to regular name
01852             FlatenSubFolders(tmpf);
01853
01854             args.add("annotate");
01855
01856             if( noRecurs )
01857             {
01858                 args.add("-l");
01859             }
01860
01861             if( force )
01862             {
01863                 args.add("-f");
01864             }
01865
01866             if( !rev.empty() )
01867             {
01868                 args.add(isDate ? "-D" : "-r");
01869                 args.add(rev);
01870             }
01871
01872             args.add(filename);
01873             args.print(path);
01874             file = launchCVS(path, args, (const char *)tmpf, ext);
01875
01876             if( file.empty() )
01877                 continue;
01878
01879             LaunchDefaultEditor(file);
01880         }
01881     }
01882 }

Here is the call graph for this function:

void CvsCmdCancelChanges ( KiSelectionHandler & handler )

Execute cvs update command

Parameters:
handler Selection for the command
Definition at line 827 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoCancelChangesHandler::OnFiles().

00828 {
00829     MultiFiles* mf = NULL;
00830     if( !CheckSelectionHandler(handler, mf) )
00831         return;
00832
00833     MultiFiles::const_iterator mfi;
00834     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00835     {
00836         RemoveCvsArgs args;
00837         args.add("update");
00838
00839         const char* dir = mfi->add(args);
00840         args.print(dir);
00841         launchCVS(dir, args.Argc(), args.Argv());
00842     }
00843 }

Here is the call graph for this function:

void CvsCmdCheckoutModule ( KiSelectionHandler & handler )

Execute cvs checkout and cvs export command

Parameters:
handler Selection for the command
Definition at line 416 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetCheckout(), MultiFiles::const_iterator, CStr, gCvsPrefs, launchCVS(), NULL, CvsArgs::print(), and CvsPrefs::PruneOption().

Referenced by KoCheckoutHandler::OnFiles(), and KoCheckoutHandler::OnFolder().

00417 {
00418     MultiFiles* mf = NULL;
00419     if( !CheckSelectionHandler(handler, mf) )
00420         return;
00421
00422     MultiFiles::const_iterator mfi = mf->begin();
00423     const char* dir = mfi->getdir();
00424
00425     bool norecurs;
00426     CStr modname;
00427     CStr path(dir);
00428     bool toStdout;
00429     CStr date;
00430     CStr rev;
00431     bool useMostRecent;
00432     CStr rev1;
00433     CStr rev2;
00434     bool branchPointMerge;
00435     bool threeWayConflicts;
00436     bool doexport;
00437     bool forceCvsroot;
00438     CStr cvsroot;
00439     bool overrideCheckoutDir;
00440     CStr checkoutDir;
00441     CStr keyword;
00442     bool resetSticky;
00443     bool dontShortenPaths;
00444     bool caseSensitiveNames;
00445     bool lastCheckinTime;
00446
00447     if( !CompatGetCheckout(mf, modname, path, norecurs,
00448         toStdout, date, rev, useMostRecent, rev1, rev2, branchPointMerge, threeWayConflicts,
00449         doexport, forceCvsroot, cvsroot, overrideCheckoutDir, checkoutDir, keyword, resetSticky, dontShortenPaths,
00450         caseSensitiveNames, lastCheckinTime) )
00451     {
00452         return;
00453     }
00454
00455     CvsArgs args;
00456
00457     if( forceCvsroot )
00458     {
00459 #if INTERNAL_AUTHEN
00460         args.addcvsroot();
00461 #else
00462         args.add("-d");
00463         args.add(cvsroot);
00464 #endif /* INTERNAL_AUTHEN */
00465     }
00466
00467     args.add(doexport ? "export" : "checkout");
00468
00469     if( gCvsPrefs.PruneOption() && !doexport )
00470         args.add("-P");
00471
00472     if( norecurs )
00473         args.add("-l");
00474
00475     if( toStdout )
00476         args.add("-p");
00477
00478     if( caseSensitiveNames )
00479         args.add("-S");
00480
00481     if( lastCheckinTime )
00482         args.add("-t");
00483
00484     if( resetSticky )
00485     {
00486         args.add("-A");
00487     }
00488     else
00489     {
00490         if( !keyword.empty() )
00491         {
00492             args.add(keyword);
00493         }
00494
00495         if( useMostRecent )
00496         {
00497             args.add("-f");
00498         }
00499
00500         if( !date.empty() )
00501         {
00502             args.add("-D");
00503             args.add(date);
00504         }
00505
00506         if( !rev.empty() )
00507         {
00508             args.add("-r");
00509             args.add(rev);
00510         }
00511     }
00512
00513     if( !rev1.empty() )
00514     {
00515         if( branchPointMerge )
00516             args.add("-b");
00517
00518         if( threeWayConflicts )
00519             args.add("-3");
00520
00521         CStr tmp;
00522         tmp = "-j";
00523         tmp << rev1;
00524         args.add(tmp);
00525     }
00526
00527     if( !rev2.empty() )
00528     {
00529         CStr tmp;
00530         tmp = "-j";
00531         tmp << rev2;
00532         args.add(tmp);
00533     }
00534
00535     if( doexport && rev.empty() && date.empty() )
00536     {
00537         args.add("-r");
00538         args.add("HEAD");
00539     }
00540
00541     if( overrideCheckoutDir )
00542     {
00543         if( dontShortenPaths )
00544             args.add("-N");
00545
00546         args.add("-d");
00547         args.add(checkoutDir);
00548     }
00549
00550     args.add(modname);
00551
00552     args.print(path);
00553     launchCVS(path, args.Argc(), args.Argv());
00554 }

Here is the call graph for this function:

void CvsCmdCommandLine ( KiSelectionHandler & handler )

Execute command line

Parameters:
handler Selection for the command
Definition at line 721 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetCommand(), MultiFiles::const_iterator, CStr, CVS_CMD, MultiFiles::end(), launchCVS(), MAX_ARGS, NULL, CvsArgs::print(), and StringToArgv().

Referenced by CWincvsDoc::OnAppCmdline(), UCvsFrame::OnCmdCmdline(), KoCommandLineHandler::OnFiles(), and KoCommandLineHandler::OnFolder().

00722 {
00723     MultiFiles* mf = NULL;
00724     if( !CheckSelectionHandler(handler, mf) )
00725         return;
00726
00727     CStr dir;
00728     CStr cmd;
00729     bool addDefault;
00730     bool addSelection;
00731     bool forceCvsroot;
00732     CStr cvsroot;
00733
00734     if( !CompatGetCommand(mf, cmd, dir, addDefault, addSelection, forceCvsroot, cvsroot) )
00735         return;
00736
00737     char* argv[MAX_ARGS];
00738     int argc = StringToArgv(cmd.c_str(), argv);
00739
00740     if( addSelection )
00741     {
00742         MultiFiles::const_iterator mfi;
00743         for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00744         {
00745             CvsArgs args(addDefault);
00746
00747             if( addDefault && forceCvsroot )
00748             {
00749 #if INTERNAL_AUTHEN
00750                 args.addcvsroot();
00751 #else
00752                 args.add("-d");
00753                 args.add(cvsroot);
00754 #endif /* INTERNAL_AUTHEN */
00755             }
00756
00757             for(int i = 0; i < argc; i++)
00758             {
00759                 if( addDefault && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00760                 {
00761                     // Skip the "cvs" arguments as it's already added by args constructor
00762                     continue;
00763                 }
00764
00765                 args.add(argv[i]);
00766
00767                 if( !addDefault && forceCvsroot && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00768                 {
00769 #if INTERNAL_AUTHEN
00770                     args.addcvsroot();
00771 #else
00772                     args.add("-d");
00773                     args.add(cvsroot);
00774 #endif /* INTERNAL_AUTHEN */
00775                 }
00776             }
00777
00778             const char* dir = mfi->add(args);
00779             args.print(dir);
00780             launchCVS(dir, args.Argc(), args.Argv());
00781         }
00782     }
00783     else
00784     {
00785         CvsArgs args(addDefault);
00786
00787         if( addDefault && forceCvsroot )
00788         {
00789 #if INTERNAL_AUTHEN
00790             args.addcvsroot();
00791 #else
00792             args.add("-d");
00793             args.add(cvsroot);
00794 #endif /* INTERNAL_AUTHEN */
00795         }
00796
00797         for(int i = 0; i < argc; i++)
00798         {
00799             if( addDefault && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00800             {
00801                 // Skip the "cvs" arguments as it's already added by args constructor
00802                 continue;
00803             }
00804
00805             args.add(argv[i]);
00806
00807             if( !addDefault && forceCvsroot && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00808             {
00809 #if INTERNAL_AUTHEN
00810                 args.addcvsroot();
00811 #else
00812                 args.add("-d");
00813                 args.add(cvsroot);
00814 #endif /* INTERNAL_AUTHEN */
00815             }
00816         }
00817
00818         args.print(dir);
00819         launchCVS(dir, args.Argc(), args.Argv());
00820     }
00821 }

Here is the call graph for this function:

void CvsCmdCommit ( KiSelectionHandler & handler )

Execute cvs commit command

Parameters:
handler Selection for the command
Definition at line 966 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CleanupLogMsg(), CompatGetCommit(), MultiFiles::const_iterator, CStr, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoCommitHandler::OnFiles(), and KoCommitHandler::OnFolder().

00967 {
00968     MultiFiles* mf = NULL;
00969     if( !CheckSelectionHandler(handler, mf) )
00970         return;
00971
00972     bool norecurs;
00973     CStr logmsg;
00974     bool forceCommit;
00975     bool forceRecurse;
00976     CStr rev;
00977     bool noModuleProgram;
00978     bool checkValidEdits;
00979
00980     if( !CompatGetCommit(mf, logmsg, norecurs, forceCommit, forceRecurse, rev, noModuleProgram, checkValidEdits) )
00981         return;
00982
00983     MultiFiles::const_iterator mfi;
00984     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00985     {
00986         CvsArgs args;
00987         args.add("commit");
00988
00989         if( checkValidEdits )
00990             args.add("-c");
00991
00992         if( norecurs )
00993             args.add("-l");
00994
00995         if( noModuleProgram )
00996             args.add("-n");
00997
00998         if( forceCommit )
00999             args.add("-f");
01000
01001         if( forceRecurse )
01002             args.add("-R");
01003
01004         args.add("-m");
01005         args.add(CleanupLogMsg(logmsg));
01006
01007         if( !rev.empty() )
01008         {
01009             args.add("-r");
01010             args.add(rev);
01011         }
01012
01013         const char* dir = mfi->add(args);
01014         args.print(dir);
01015         launchCVS(dir, args.Argc(), args.Argv());
01016     }
01017 }

Here is the call graph for this function:

void CvsCmdDiff | ( | KiSelectionHandler & | handler,
 |  | kDiffCmdType | diffType
 | ) |

Execute cvs diff or external diff command

Parameters:
handler | Selection for the command
diffType | Diff command type
Definition at line 1024 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetDiff(), MultiFiles::const_iterator, CStr, MultiFiles::end(), FlatenSubFolders(), MultiFilesEntry::get(), GetExtension(), kDiffGraph, launchCVS(), LaunchDiff(), NULL, MultiFilesEntry::NumFiles(), CvsArgs::parse(), CvsArgs::print(), and MultiFiles::TotalNumFiles().

Referenced by KoDiffHandler::OnFiles(), KoGraphDiffHandler::OnFiles(), and KoDiffHandler::OnFolder().

01025 {
01026     MultiFiles* mf = NULL;
01027     if( !CheckSelectionHandler(handler, mf) )
01028         return;
01029
01030     bool noRecurs;
01031     bool isDate1;
01032     bool isDate2;
01033     bool useExtDiff;
01034     CStr rev1;
01035     CStr rev2;
01036     bool unifiedDiff;
01037     bool noWhiteSpace;
01038     bool noBlankLines;
01039     bool ignoreCase;
01040     bool extDiffResult;
01041     CStr diffOptions;
01042     CStr keyword;
01043     CStr  diffTool;
01044
01045     if( diffType == kDiffGraph )
01046     {
01047         // determine initial revision settings
01048         if( mf->TotalNumFiles() > 0 )
01049         {
01050             const MultiFilesEntry& mfe = *mf->begin();
01051             CStr ignorePath, ignoreName, rev;
01052
01053             switch( mfe.NumFiles() )
01054             {
01055             case 2:
01056                 if( mfe.get(1, ignorePath, ignoreName, rev) )
01057                     rev2 = rev;
01058
01059                 // fall thru
01060             case 1:
01061                 if( mfe.get(0, ignorePath, ignoreName, rev) )
01062                     rev1 = rev;
01063
01064                 break;
01065             }
01066         }
01067     }
01068
01069     if( !CompatGetDiff(mf, diffType, noRecurs, isDate1, isDate2, rev1, rev2, useExtDiff, diffTool,
01070         unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, keyword, diffOptions,
01071         mf->TotalNumFiles() > 0) )
01072     {
01073         return;
01074     }
01075
01076     MultiFiles::const_iterator mfi;
01077     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01078     {
01079         extDiffResult = false;
01080
01081         if( mfi->NumFiles() && useExtDiff )
01082         {
01083             CStr path, filename, ext, base, currRev;
01084             CStr file1, file2;
01085
01086             for(int i = 0; ; i++)
01087             {
01088                 if( !mfi->get(i, path, filename, currRev) )
01089                     break;
01090
01091                 if( 0 < i && kDiffGraph == diffType )
01092                 {
01093                     // Graph diff contains two files, but it's actually the same one
01094                     break;
01095                 }
01096
01097                 // note that filename can contain subfolders
01098
01099                 GetExtension(filename, base, ext);
01100
01101                 CvsArgs args;
01102                 CStr tmpf(base);
01103                 tmpf << '_';
01104
01105                 if( !rev1.empty() )
01106                     tmpf << rev1;
01107                 else
01108                     tmpf << currRev;
01109
01110                 tmpf << '_';
01111
01112                 // convert subfolder names to regular name
01113                 FlatenSubFolders(tmpf);
01114
01115                 args.add("update");
01116                 args.add("-p");
01117
01118                 if( !rev1.empty() )
01119                 {
01120                     args.add(isDate1 ? "-D" : "-r");
01121                     args.add(rev1);
01122                 }
01123                 else if( !currRev.empty() )
01124                 {
01125                     args.add("-r");
01126                     args.add(currRev);
01127                 }
01128
01129                 args.add(filename);
01130                 args.print(path);
01131                 file1 = launchCVS(path, args, (const char *)tmpf, ext);
01132
01133                 if( rev2.empty() )
01134                 {
01135                     file2 = path;
01136
01137                     if( !file2.endsWith(kPathDelimiter) )
01138                         file2 << kPathDelimiter;
01139
01140                     file2 << filename;
01141                 }
01142                 else
01143                 {
01144                     CvsArgs args2;
01145
01146                     tmpf = base;
01147                     tmpf << '_';
01148                     tmpf << rev2;
01149                     tmpf << '_';
01150
01151                     // convert subfolder names to regular name
01152                     FlatenSubFolders(tmpf);
01153
01154                     args2.add("update");
01155                     args2.add("-p");
01156                     args2.add(isDate2 ? "-D" : "-r");
01157                     args2.add(rev2);
01158                     args2.add(filename);
01159                     args2.print(path);
01160                     file2 = launchCVS(path, args2, (const char *)tmpf, ext);
01161                 }
01162
01163                 if( file1.empty() || file2.empty() )
01164                     continue;
01165
01166                 extDiffResult = LaunchDiff(file1, file2, diffTool, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase);
01167             }
01168         }
01169
01170         if( !mfi->NumFiles() || !useExtDiff || !extDiffResult )
01171         {
01172             CvsArgs args;
01173             args.add("diff");
01174
01175             if( noRecurs )
01176                 args.add("-l");
01177
01178             if( !rev1.empty() )
01179             {
01180                 args.add(isDate1 ? "-D" : "-r");
01181                 args.add(rev1);
01182             }
01183
01184             if( !rev2.empty() )
01185             {
01186                 args.add(isDate2 ? "-D" : "-r");
01187                 args.add(rev2);
01188             }
01189
01190             if( unifiedDiff )
01191                 args.add("-u");     // --unified, -u
01192
01193             if( noWhiteSpace )
01194                 args.add("-wb");    //--ignore-all-space --ignore-space-change
01195
01196             if( noBlankLines )
01197                 args.add("-B");     //--ignore-blank-lines
01198
01199             if( ignoreCase )
01200                 args.add("-i");     //--ignore-case
01201
01202             if( !keyword.empty() )
01203             {
01204                 args.add(keyword);
01205             }
01206
01207             if( !diffOptions.empty() )
01208             {
01209                 args.parse(diffOptions);
01210             }
01211
01212             const char* dir = mfi->add(args);
01213             args.print(dir);
01214             launchCVS(dir, args.Argc(), args.Argv());
01215         }
01216     }
01217 }

Here is the call graph for this function:

void CvsCmdEdit | ( | KiSelectionHandler & | handler,
 |  | kEditCmdType | editType
 | ) |

Execute cvs edit command

Parameters:
handler | Selection for the command
editType | Edit type
Definition at line 1586 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), kEditForce, kEditNormal, kEditReserved, launchCVS(), NULL, and CvsArgs::print().

Referenced by TEditHandler< editType >::OnFiles(), and TEditHandler< editType >::OnFolder().

01587 {
01588     MultiFiles* mf = NULL;
01589     if( !CheckSelectionHandler(handler, mf) )
01590         return;
01591
01592     MultiFiles::const_iterator mfi;
01593     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01594     {
01595         CvsArgs args;
01596         args.add("edit");
01597
01598         switch( editType )
01599         {
01600         default:
01601         case kEditNormal:
01602             // intentionally blank
01603             break;
01604         case kEditReserved:
01605             args.add("-c");
01606             break;
01607         case kEditForce:
01608             args.add("-f");
01609             break;
01610         }
01611
01612         const char* dir = mfi->add(args);
01613         args.print(dir);
01614         launchCVS(dir, args.Argc(), args.Argv());
01615     }
01616 }

Here is the call graph for this function:

void CvsCmdEditors ( KiSelectionHandler & handler )

Execute cvs editors command

Parameters:
handler Selection for the command
Definition at line 1771 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoEditorsHandler::OnFiles(), and KoEditorsHandler::OnFolder().

01772 {
01773     MultiFiles* mf = NULL;
01774     if( !CheckSelectionHandler(handler, mf) )
01775         return;
01776
01777     MultiFiles::const_iterator mfi;
01778     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01779     {
01780         CvsArgs args;
01781         args.add("editors");
01782
01783         const char* dir = mfi->add(args);
01784         args.print(dir);
01785         launchCVS(dir, args.Argc(), args.Argv());
01786     }
01787 }

Here is the call graph for this function:

void CvsCmdFileAction ( KiSelectionHandler & handler )

Execute file action command

Parameters:
handler Selection for the command
Definition at line 1965 of file CvsCommands.cpp.

References MultiFiles::begin(), CheckSelectionHandler(), CompatGetFileAction(), MultiFiles::const_iterator, UStr::empty(), MultiFiles::end(), UStr::endsWith(), kLaunchEdit, kLaunchType, LaunchHandler(), and NULL.

Referenced by KoFileActionHandler::OnFiles().

01966 {
01967     MultiFiles* mf = NULL;
01968     if( !CheckSelectionHandler(handler, mf) )
01969         return;
01970
01971     bool noRecurs = false;
01972     kLaunchType launchType = kLaunchEdit;
01973
01974     if( !CompatGetFileAction(mf, launchType) )
01975         return;
01976
01977     MultiFiles::const_iterator mfi;
01978     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01979     {
01980         for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
01981         {
01982             UStr path;
01983             UStr fileName;
01984             UStr currRev;
01985
01986             mfi->get(nIndex, path, fileName, currRev);
01987             if( !path.empty() && !path.endsWith(kPathDelimiter) )
01988                 path << kPathDelimiter;
01989
01990             path << fileName;
01991
01992             LaunchHandler(launchType, path);
01993         }
01994     }
01995 }

Here is the call graph for this function:

void CvsCmdImportModule ( KiSelectionHandler & handler )

Execute cvs import command

Parameters:
handler Selection for the command
Definition at line 560 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CleanupLogMsg(), CompatGetImport(), CompatImportFilter(), MultiFiles::const_iterator, CPStr, CStr, MultiFiles::end(), free_list_types(), ReportConflict::GetPattern(), ReportConflict::HasForceBinary(), ReportConflict::HasForceNoKeywords(), ReportConflict::HasForceText(), ReportConflict::HasForceUnicode(), ReportConflict::HasIgnore(), ReportConflict::IsBinary(), ReportConflict::IsExtension(), ReportConflict::IsUnicode(), launchCVS(), ReportConflict::next, NULL, and CvsArgs::print().

Referenced by KoImportHandler::OnFiles(), and KoImportHandler::OnFolder().

00561 {
00562     MultiFiles* mf = NULL;
00563     if( !CheckSelectionHandler(handler, mf) )
00564         return;
00565
00566     MultiFiles::const_iterator mfi;
00567     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00568     {
00569         const char* dir = mfi->getdir();
00570         ReportConflict* entries = NULL;
00571         ReportWarning* warnings = NULL;
00572
00573         if( !CompatImportFilter(dir, entries, warnings) )
00574             return;
00575
00576         CStr modname, vendortag, reltag, path(dir), vendorBranchId;
00577         CStr logmsg;
00578         bool useDefIgnore;
00579         bool useFilesTime;
00580         bool createSandbox;
00581         bool dontCreateVendorTag;
00582         bool overwriteReleaseTags;
00583         bool forceCvsroot;
00584         CStr cvsroot;
00585
00586         if( !CompatGetImport(mf, entries, warnings, modname, logmsg, vendortag, reltag, vendorBranchId, path, useDefIgnore, useFilesTime, createSandbox, dontCreateVendorTag, overwriteReleaseTags, forceCvsroot, cvsroot) )
00587             return;
00588
00589         CvsArgs args;
00590
00591         if( forceCvsroot )
00592         {
00593 #if INTERNAL_AUTHEN
00594             args.addcvsroot();
00595 #else
00596             args.add("-d");
00597             args.add(cvsroot);
00598 #endif /* INTERNAL_AUTHEN */
00599         }
00600
00601         args.add("import");
00602
00603         if( createSandbox )
00604         {
00605             args.add("-C");
00606         }
00607
00608         if( useFilesTime )
00609         {
00610             args.add("-d");
00611         }
00612
00613         if( !dontCreateVendorTag && overwriteReleaseTags )
00614         {
00615             args.add("-f");
00616         }
00617
00618         // Fill the wrappers
00619         ReportConflict* tmpentry = entries;
00620
00621         if( !useDefIgnore )
00622         {
00623             args.add("-I"); // no default (core, *.o...)
00624             args.add("!");
00625             args.add("-I"); // but ignore the CVS folders
00626             args.add("CVS");
00627         }
00628
00629         while( tmpentry != 0L )
00630         {
00631             if( tmpentry->HasIgnore() )
00632             {
00633                 CPStr ign;
00634                 args.add("-I");
00635
00636                 if( tmpentry->IsExtension() )
00637                     ign << '*';
00638
00639                 ign << tmpentry->GetPattern();
00640                 args.add(ign);
00641             }
00642             else if( !tmpentry->HasForceText() &&
00643                 (tmpentry->IsBinary() || tmpentry->HasForceBinary() || tmpentry->HasForceNoKeywords() ||
00644                 tmpentry->IsUnicode() || tmpentry->HasForceUnicode()) )
00645             {
00646                 CPStr wrap;
00647                 const char* pattern = tmpentry->GetPattern();
00648                 bool hasSpace = strchr(pattern, ' ') != 0L;
00649                 args.add("-W");
00650
00651                 if( hasSpace )
00652                     wrap << '"';
00653
00654                 if( tmpentry->IsExtension() )
00655                     wrap << '*';
00656
00657                 wrap << pattern;
00658
00659                 if( hasSpace )
00660                     wrap << '"';
00661
00662                 if( tmpentry->HasForceNoKeywords() )
00663                 {
00664                     wrap << " -k 'o'";
00665                 }
00666                 else if( tmpentry->HasForceBinary() )
00667                 {
00668                     wrap << " -k 'b'";
00669                 }
00670                 else if( tmpentry->HasForceUnicode() )
00671                 {
00672                     wrap << " -k 'u'";
00673                 }
00674                 else if( tmpentry->IsBinary() )
00675                 {
00676                     wrap << " -k 'b'";
00677                 }
00678                 else if( tmpentry->IsUnicode() )
00679                 {
00680                     wrap << " -k 'u'";
00681                 }
00682
00683                 args.add(wrap);
00684             }
00685
00686             tmpentry = tmpentry->next;
00687         }
00688
00689         free_list_types(warnings, entries);
00690
00691         if( !vendorBranchId.empty() )
00692         {
00693             args.add("-b");
00694             args.add(vendorBranchId);
00695         }
00696
00697         args.add("-m");
00698         args.add(CleanupLogMsg(logmsg));
00699
00700         if( dontCreateVendorTag )
00701         {
00702             args.add("-n");
00703             args.add(modname);
00704         }
00705         else
00706         {
00707             args.add(modname);
00708             args.add(vendortag);
00709             args.add(reltag);
00710         }
00711
00712         args.print(path);
00713         launchCVS(path, args.Argc(), args.Argv());
00714     }
00715 }

Here is the call graph for this function:

void CvsCmdInit ( )

Execute cvs init command Definition at line 210 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CompatGetInit(), CStr, gCvsPrefs, launchCVS(), and CvsArgs::print().

Referenced by UCvsFrame::OnCmdInit(), and CWincvsDoc::OnViewInit().

00211 {
00212 #if INTERNAL_AUTHEN
00213     if( gCvsPrefs.empty() )
00214         return;
00215 #endif /* INTERNAL_AUTHEN */
00216
00217     bool forceCvsroot;
00218     CStr cvsroot;
00219
00220     if( !CompatGetInit(forceCvsroot, cvsroot) )
00221         return;
00222
00223     CvsArgs args;
00224
00225     if( forceCvsroot )
00226     {
00227 #if INTERNAL_AUTHEN
00228         args.addcvsroot();
00229 #else
00230         args.add("-d");
00231         args.add(cvsroot);
00232 #endif /* INTERNAL_AUTHEN */
00233     }
00234
00235     args.add("init");
00236
00237     args.print();
00238     launchCVS(0L, args.Argc(), args.Argv());
00239 }

Here is the call graph for this function:

void CvsCmdLaunch | ( | KiSelectionHandler & | handler,
 |  | const kLaunchType | launchType
 | ) |

Execute launch command

Parameters:
handler | Selection for the command
launchType | Launch type
Definition at line 2002 of file CvsCommands.cpp.

References MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, UStr::empty(), MultiFiles::end(), UStr::endsWith(), LaunchHandler(), and NULL.

Referenced by TLaunchHandler< lauchType >::OnFiles().

02003 {
02004     MultiFiles* mf = NULL;
02005     if( !CheckSelectionHandler(handler, mf) )
02006         return;
02007
02008     MultiFiles::const_iterator mfi;
02009     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
02010     {
02011         for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
02012         {
02013             UStr path;
02014             UStr fileName;
02015             UStr currRev;
02016
02017             mfi->get(nIndex, path, fileName, currRev);
02018             if( !path.empty() && !path.endsWith(kPathDelimiter) )
02019                 path << kPathDelimiter;
02020
02021             path << fileName;
02022
02023             LaunchHandler(launchType, path);
02024         }
02025     }
02026 }

Here is the call graph for this function:

void CvsCmdLock ( KiSelectionHandler & handler )

Execute cvs admin -l command

Parameters:
handler Selection for the command
Definition at line 1475 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoLockHandler::OnFiles(), and KoLockHandler::OnFolder().

01476 {
01477     MultiFiles* mf = NULL;
01478     if( !CheckSelectionHandler(handler, mf) )
01479         return;
01480
01481     MultiFiles::const_iterator mfi;
01482     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01483     {
01484         CvsArgs args;
01485         args.add("admin");
01486         args.add("-l");
01487
01488         const char* dir = mfi->add(args);
01489         args.print(dir);
01490         launchCVS(dir, args.Argc(), args.Argv());
01491     }
01492 }

Here is the call graph for this function:

void CvsCmdLog | ( | KiSelectionHandler & | handler,
 |  | bool | outGraph,
 |  | void * | defWnd
 | ) |

Execute cvs log or graph command

Parameters:
handler | Selection for the command
outGraph | true for the graph
defWnd | Default window
Definition at line 1337 of file CvsCommands.cpp.

References CvsArgs::add(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetLog(), MultiFiles::const_iterator, CStr, CvsLogParse(), MultiFiles::end(), NULL, and CvsArgs::print().

Referenced by KoLogHandler::OnFiles(), KoGraphHandler::OnFiles(), and KoLogHandler::OnFolder().

01338 {
01339     MultiFiles* mf = NULL;
01340     if( !CheckSelectionHandler(handler, mf) )
01341         return;
01342
01343     bool noRecurs;
01344     bool defBranch;
01345     CStr date;
01346     bool headerOnly;
01347     bool headerDesc;
01348     bool supress;
01349     bool noTags;
01350     bool onlyRCSfile;
01351     bool hasRev;
01352     CStr rev;
01353     CStr states;
01354     bool hasUser;
01355     CStr users;
01356
01357     if( !CompatGetLog(mf, noRecurs, defBranch, date,
01358         headerOnly, headerDesc, supress,
01359         noTags, onlyRCSfile, hasRev,
01360         rev, states, hasUser, users,
01361         outGraph) )
01362     {
01363         return;
01364     }
01365
01366     MultiFiles::const_iterator mfi;
01367     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01368     {
01369         CvsArgs args;
01370         args.add("log");
01371
01372         if( noRecurs )
01373             args.add("-l");
01374
01375         if( defBranch )
01376             args.add("-b");
01377
01378         if( headerDesc )
01379         {
01380             args.add("-t");
01381         }
01382         else
01383         {
01384             if( headerOnly )
01385                 args.add("-h");
01386         }
01387
01388         if( supress )
01389             args.add("-S");
01390
01391         if( noTags )
01392             args.add("-N");
01393
01394         if( onlyRCSfile )
01395             args.add("-R");
01396
01397         if( !date.empty() )
01398         {
01399             args.add("-d");
01400             args.add(date);
01401         }
01402
01403         if( !states.empty() )
01404         {
01405             args.add("-s");
01406             args.add(states);
01407         }
01408
01409         if( hasRev )
01410         {
01411             CStr tmp;
01412             tmp = "-r";
01413             tmp << rev;
01414             args.add(tmp);
01415         }
01416
01417         if( hasUser )
01418         {
01419             CStr tmp;
01420             tmp = "-w";
01421             tmp << users;
01422             args.add(tmp);
01423         }
01424
01425         const char* dir = mfi->add(args);
01426         args.print(dir);
01427         CvsLogParse(dir, args, outGraph, defWnd);
01428     }
01429 }

Here is the call graph for this function:

void CvsCmdLogin ( void )

Execute cvs login command Definition at line 244 of file CvsCommands.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CompatGetLogin(), CStr, cvs_err(), CvsCmdLogout(), gCvsPrefs, CvsPrefs::HasLoogedIn(), launchCVS(), CvsPrefs::LogoutTimeOut(), CvsArgs::print(), CvsPrefs::SetHasLoogedIn(), and WaitForCvs().

Referenced by CWincvsDoc::OnAppLogin(), and UCvsFrame::OnCmdLogin().

00245 {
00246 #if INTERNAL_AUTHEN
00247     if( gCvsPrefs.empty() )
00248         return;
00249 #endif /* INTERNAL_AUTHEN */
00250
00251     bool forceCvsroot;
00252     CStr cvsroot;
00253
00254     if( !CompatGetLogin(forceCvsroot, cvsroot) )
00255         return;
00256
00257 #if INTERNAL_AUTHEN
00258     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00259     if( !curModel->HasLogin() )
00260     {
00261         cvs_err(_i18n("Logging in is required for 'pserver' or 'sspi' authentication only (see Preferences dialog).\n"
00262             "Please consult the CVS manual for more details.\n"));
00263     }
00264 #endif /* INTERNAL_AUTHEN */
00265
00266     if( gCvsPrefs.HasLoogedIn() && gCvsPrefs.LogoutTimeOut() > 0 )
00267     {
00268         cvs_err(_i18n("Making automatic logout:\n"));
00269         CvsCmdLogout();
00270         WaitForCvs();
00271     }
00272
00273     gCvsPrefs.SetHasLoogedIn(true);
00274
00275     CvsArgs args;
00276
00277     if( forceCvsroot )
00278     {
00279 #if INTERNAL_AUTHEN
00280         args.addcvsroot();
00281 #else
00282         args.add("-d");
00283         args.add(cvsroot);
00284 #endif /* INTERNAL_AUTHEN */
00285     }
00286
00287     args.add("login");
00288
00289     args.print();
00290     launchCVS(0L, args.Argc(), args.Argv());
00291 }

Here is the call graph for this function:

void CvsCmdLogout ( void )

Execute cvs logout command Definition at line 296 of file CvsCommands.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), cvs_err(), gCvsPrefs, launchCVS(), CvsArgs::print(), and CvsPrefs::SetHasLoogedIn().

Referenced by CvsCmdLogin(), CLogoutThread::InitInstance(), CWincvsDoc::OnAppLogout(), UCvsFrame::OnCmdLogout(), and CWincvsApp::SaveAllModified().

00297 {
00298 #if INTERNAL_AUTHEN
00299     if( gCvsPrefs.empty() )
00300         return;
00301
00302     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00303     if( !curModel->HasLogin() )
00304     {
00305         cvs_err(_i18n("Logging out is required for 'pserver' or 'sspi' authentication only (see Preferences dialog).\n"
00306             "Please consult the CVS manual for more details.\n"));
00307     }
00308 #endif /* INTERNAL_AUTHEN */
00309
00310     gCvsPrefs.SetHasLoogedIn(false);
00311
00312     CvsArgs args;
00313
00314     args.add("logout");
00315
00316     args.print();
00317     launchCVS(0L, args.Argc(), args.Argv());
00318 }

Here is the call graph for this function:

void CvsCmdMacrosAdmin ( const char * macroName )

Execute admin macro

Parameters:
macroName Macro name to be executed
Definition at line 167 of file CvsCommands.cpp.

References CStr, CTcl_Interp::DoScriptVar(), gCvsPrefs, CTcl_Interp::IsAvail(), and CTcl_Interp::Unixfy().

Referenced by UCvsFrame::OnCmdMacroAdmin(), and CWincvsDoc::OnMacroAdmin().

00168 {
00169     if(
00170 #if INTERNAL_AUTHEN
00171         gCvsPrefs.empty() ||
00172 #endif /* INTERNAL_AUTHEN */
00173         !CTcl_Interp::IsAvail() )
00174         return;
00175
00176     CTcl_Interp interp;
00177     CStr path = macroName;
00178     CTcl_Interp::Unixfy(path);
00179     interp.DoScriptVar("source \"%s\"", (const char*)path);
00180 }

Here is the call graph for this function:

void CvsCmdMoveToTrash ( KiSelectionHandler & handler )

Execute erase command

Parameters:
handler Selection for the command
Definition at line 1888 of file CvsCommands.cpp.

References _i18n, MultiFiles::begin(), UStr::c_str(), CheckSelectionHandler(), CompatBeginMoveToTrash(), CompatEndMoveToTrash(), CompatMoveToTrash(), MultiFiles::const_iterator, CStr, cvs_err(), cvs_out(), MultiFiles::end(), UStr::endsWith(), kCvsAlertButtonType, kCvsAlertCancelButton, kCvsAlertOKButton, kCvsAlertQuestionIcon, NULL, and CvsAlert::ShowAlert().

Referenced by KoMoveToTrashHandler::OnFiles().

01889 {
01890     MultiFiles* mf = NULL;
01891     if( !CheckSelectionHandler(handler, mf) )
01892         return;
01893
01894     const char* primaryMsg = NULL;
01895     const char* secondaryMsg = NULL;
01896     kCvsAlertButtonType defaultButton = kCvsAlertCancelButton;
01897
01898 #if defined (TARGET_OS_MAC)
01899     primaryMsg = _i18n("Are you sure you want to move the selected files to the trash?");
01900     secondaryMsg = _i18n("The files will be moved into the trash just as if you deleted them from the Finder.");
01901     defaultButton = kCvsAlertOKButton;
01902 #elif defined (WIN32)
01903     primaryMsg = _i18n("Are you sure you want to move the selected files to the recycle bin?");
01904 #else
01905     primaryMsg = _i18n("Are you sure you want to remove the selected files?");
01906 #endif
01907
01908     CvsAlert cvsAlert(kCvsAlertQuestionIcon,
01909         primaryMsg, secondaryMsg);
01910
01911     if( cvsAlert.ShowAlert(defaultButton) != kCvsAlertOKButton )
01912     {
01913         return;
01914     }
01915
01916     CompatBeginMoveToTrash();
01917
01918     MultiFiles::const_iterator mfi;
01919     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01920     {
01921         int count = mfi->NumFiles();
01922         for(int i = 0; i < count; i++)
01923         {
01924             CStr path, fileName, currRev;
01925             if( mfi->get(i, path, fileName, currRev) )
01926             {
01927                 UStr fn(path);
01928                 if( !fn.endsWith(kPathDelimiter) )
01929                     fn << kPathDelimiter;
01930
01931                 fn << fileName;
01932
01933                 if( !CompatMoveToTrash(fn) )
01934                 {
01935                     UStr errText;
01936
01937                     // HINT for translate: "Unable to remove '<FILE>' (error <ERROR>)\n"
01938                     errText << _i18n("Unable to remove '") << fn << _i18n("' (error ") << errno << ")\n";
01939
01940                     cvs_err( errText.c_str() );
01941                 }
01942                 else
01943                 {
01944                     UStr errText;
01945 #if defined (TARGET_OS_MAC)
01946                     errText << "'" << fn << _i18n("' has been moved successfully to the trash ...\n");
01947 #elif defined (WIN32)
01948                     errText << "'" << fn << _i18n("' has been moved successfully to the recycle bin ...\n");
01949 #else
01950                     errText << "'" << fn << _i18n("' has been removed successfully ...\n");
01951 #endif
01952                     cvs_out( errText.c_str() );
01953                 }
01954             }
01955         }
01956     }
01957
01958     CompatEndMoveToTrash();
01959 }

Here is the call graph for this function:

void CvsCmdRelease ( KiSelectionHandler & handler )

Execute cvs release command

Parameters:
handler Selection for the command
Definition at line 1690 of file CvsCommands.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CheckSelectionHandler(), CompatGetRelease(), CStr, cvs_err(), MultiFiles::getdir(), kReleaseDelAll, kReleaseDelCvsInfo, kReleaseDelDir, kReleaseDelType, kReleaseNoDel, launchCVS(), NULL, CvsArgs::print(), and SplitPath().

Referenced by KoReleaseHandler::OnFolder().

01691 {
01692     MultiFiles* mf = NULL;
01693     if( !CheckSelectionHandler(handler, mf) )
01694         return;
01695
01696     CStr dir;
01697     if( !mf->getdir(0, dir) )
01698     {
01699         return;
01700     }
01701
01702     CStr uppath, folder;
01703     if( !SplitPath(dir, uppath, folder) )
01704     {
01705         cvs_err(_i18n("Unable to convert path name '%s'\n"), dir.c_str());
01706
01707         // Even thought something didn't work we will try to continue and put all the responsibility onto the user
01708         uppath = dir;
01709         folder = ".";
01710     }
01711
01712     kReleaseDelType removeDirectoryOption = kReleaseNoDel;
01713
01714     if( !CompatGetRelease(mf, dir, removeDirectoryOption) )
01715     {
01716         return;
01717     }
01718
01719     CvsArgs args;
01720     args.add("release");
01721
01722     switch( removeDirectoryOption )
01723     {
01724     default:
01725     case kReleaseNoDel:
01726         break;
01727     case kReleaseDelDir:
01728         args.add("-d");
01729         break;
01730     case kReleaseDelAll:
01731         args.add("-d");
01732         args.add("-f");
01733         break;
01734     case kReleaseDelCvsInfo:
01735         args.add("-e");
01736         break;
01737     }
01738
01739     args.add(folder);
01740
01741     args.print(uppath);
01742     launchCVS(uppath, args.Argc(), args.Argv());
01743 }

Here is the call graph for this function:

void CvsCmdRemove ( KiSelectionHandler & handler )

Execute cvs remove command

Parameters:
handler Selection for the command
Definition at line 1308 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatBeginMoveToTrash(), CompatEndMoveToTrash(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoFileRemoveHandler::OnFiles().

01309 {
01310     MultiFiles* mf = NULL;
01311     if( !CheckSelectionHandler(handler, mf) )
01312         return;
01313
01314     MultiFiles::const_iterator mfi;
01315     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01316     {
01317         RemoveCvsArgs args;
01318
01319         CompatBeginMoveToTrash();
01320
01321         args.add("remove");
01322         const char* dir = mfi->add(args);
01323         args.print(dir);
01324
01325         CompatEndMoveToTrash();
01326
01327         launchCVS(dir, args.Argc(), args.Argv());
01328     }
01329 }

Here is the call graph for this function:

void CvsCmdRtag | ( | KiSelectionHandler & | handler,
 |  | const kTagCmdType | tagType
 | ) |

Execute cvs rtag command

Parameters:
handler | Selection for the command
tagType | Tag type
Definition at line 325 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CheckSelectionHandler(), CompatGetRtag(), CStr, kTagBranch, kTagCreate, kTagDelete, launchCVS(), NULL, and CvsArgs::print().

Referenced by CWincvsDoc::OnAppRtagBranch(), CWincvsDoc::OnAppRtagDelete(), CWincvsDoc::OnAppRtagNew(), UCvsFrame::OnCmdRtagBranch(), UCvsFrame::OnCmdRtagDelete(), UCvsFrame::OnCmdRtagNew(), TRtagHandler< tagType >::OnFiles(), and TRtagHandler< tagType >::OnFolder().

00326 {
00327     MultiFiles* mf = NULL;
00328     if( !CheckSelectionHandler(handler, mf) )
00329         return;
00330
00331     bool norecurs;
00332     bool movDelBranch;
00333     bool overwriteExisting;
00334     bool useMostRecent;
00335     bool lookAttic;
00336     CStr modname;
00337     CStr tagname;
00338     CStr date;
00339     CStr rev;
00340     bool forceCvsroot;
00341     CStr cvsroot;
00342
00343     if( !CompatGetRtag(mf, tagType, norecurs, movDelBranch, overwriteExisting, tagname, modname, date, rev, useMostRecent, lookAttic, forceCvsroot, cvsroot) )
00344         return;
00345
00346     CvsArgs args;
00347
00348     if( forceCvsroot )
00349     {
00350 #if INTERNAL_AUTHEN
00351         args.addcvsroot();
00352 #else
00353         args.add("-d");
00354         args.add(cvsroot);
00355 #endif /* INTERNAL_AUTHEN */
00356     }
00357
00358     args.add("rtag");
00359
00360     switch( tagType )
00361     {
00362     case kTagCreate:
00363         // Nothing to do
00364         break;
00365     case kTagDelete:
00366         args.add("-d");
00367         break;
00368     case kTagBranch:
00369         args.add("-b");
00370         break;
00371     default:
00372         break;
00373     }
00374
00375     if( norecurs )
00376         args.add("-l");
00377
00378     if( movDelBranch )
00379         args.add("-B");
00380
00381     if( lookAttic )
00382         args.add("-a");
00383
00384     if( tagType == kTagCreate || tagType == kTagBranch )
00385     {
00386         if( useMostRecent )
00387             args.add("-f");
00388
00389         if( overwriteExisting )
00390             args.add("-F");
00391
00392         if( !date.empty() )
00393         {
00394             args.add("-D");
00395             args.add(date);
00396         }
00397
00398         if( !rev.empty() )
00399         {
00400             args.add("-r");
00401             args.add(rev);
00402         }
00403     }
00404
00405     args.add(tagname);
00406     args.add(modname);
00407
00408     args.print();
00409     launchCVS(0L, args.Argc(), args.Argv());
00410 }

Here is the call graph for this function:

void CvsCmdStatus ( KiSelectionHandler & handler )

Execute cvs status command

Parameters:
handler Selection for the command
Definition at line 1435 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetStatus(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, CvsArgs::print(), STATUSOUTPUT_QUICK, STATUSOUTPUT_TYPE, and STATUSOUTPUT_VERBOSE.

Referenced by KoStatusHandler::OnFiles(), and KoStatusHandler::OnFolder().

01436 {
01437     MultiFiles* mf = NULL;
01438     if( !CheckSelectionHandler(handler, mf) )
01439         return;
01440
01441     bool noRecurs = false;
01442     STATUSOUTPUT_TYPE outputType = STATUSOUTPUT_VERBOSE;
01443
01444     if( !CompatGetStatus(mf, noRecurs, outputType) )
01445         return;
01446
01447     MultiFiles::const_iterator mfi;
01448     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01449     {
01450         CvsArgs args;
01451         args.add("status");
01452
01453         if( noRecurs )
01454             args.add("-l");
01455
01456         if( STATUSOUTPUT_VERBOSE == outputType )
01457         {
01458             args.add("-v");
01459         }
01460         else if( STATUSOUTPUT_QUICK == outputType )
01461         {
01462             args.add("-q");
01463         }
01464
01465         const char* dir = mfi->add(args);
01466         args.print(dir);
01467         launchCVS(dir, args.Argc(), args.Argv());
01468     }
01469 }

Here is the call graph for this function:

void CvsCmdTag | ( | KiSelectionHandler & | handler,
 |  | const kTagCmdType | tagType
 | ) |

Execute cvs tag command

Parameters:
handler | Selection for the command
tagType | Tag type
Definition at line 1522 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetTag(), MultiFiles::const_iterator, CStr, MultiFiles::end(), kTagBranch, kTagCreate, kTagDelete, launchCVS(), NULL, and CvsArgs::print().

Referenced by TTagHandler< tagType >::OnFiles(), and TTagHandler< tagType >::OnFolder().

01523 {
01524     MultiFiles* mf = NULL;
01525     if( !CheckSelectionHandler(handler, mf) )
01526         return;
01527
01528     bool noRecurs;
01529     bool movDelBranch;
01530     bool overwriteExisting;
01531     bool checkUnmod;
01532     CStr tagName;
01533
01534     if( !CompatGetTag(mf, tagType, noRecurs, movDelBranch, overwriteExisting, tagName, checkUnmod) )
01535         return;
01536
01537     MultiFiles::const_iterator mfi;
01538     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01539     {
01540         CvsArgs args;
01541         args.add("tag");
01542
01543         switch( tagType )
01544         {
01545         case kTagCreate:
01546             // Nothing to do
01547             break;
01548         case kTagDelete:
01549             args.add("-d");
01550             break;
01551         case kTagBranch:
01552             args.add("-b");
01553             break;
01554         default:
01555             break;
01556         }
01557
01558         if( noRecurs )
01559             args.add("-l");
01560
01561         if( movDelBranch )
01562             args.add("-B");
01563
01564         if( tagType == kTagCreate || tagType == kTagBranch )
01565         {
01566             if( overwriteExisting )
01567                 args.add("-F");
01568
01569             if( checkUnmod )
01570                 args.add("-c");
01571         }
01572
01573         args.add(tagName);
01574
01575         const char* dir = mfi->add(args);
01576         args.print(dir);
01577         launchCVS(dir, args.Argc(), args.Argv());
01578     }
01579 }

Here is the call graph for this function:

void CvsCmdUnedit ( KiSelectionHandler & handler )

Execute cvs unedit command

Parameters:
handler Selection for the command
Definition at line 1622 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoUneditHandler::OnFiles(), and KoUneditHandler::OnFolder().

01623 {
01624     MultiFiles* mf = NULL;
01625     if( !CheckSelectionHandler(handler, mf) )
01626         return;
01627
01628     MultiFiles::const_iterator mfi;
01629     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01630     {
01631         CvsArgs args;
01632         args.add("unedit");
01633
01634         const char* dir = mfi->add(args);
01635         args.print(dir);
01636         launchCVS(dir, args.Argc(), args.Argv());
01637     }
01638 }

Here is the call graph for this function:

void CvsCmdUnlock ( KiSelectionHandler & handler )

Execute cvs admin -u command

Parameters:
handler Selection for the command
Definition at line 1498 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoUnlockHandler::OnFiles(), and KoUnlockHandler::OnFolder().

01499 {
01500     MultiFiles* mf = NULL;
01501     if( !CheckSelectionHandler(handler, mf) )
01502         return;
01503
01504     MultiFiles::const_iterator mfi;
01505     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01506     {
01507         CvsArgs args;
01508         args.add("admin");
01509         args.add("-u");
01510
01511         const char* dir = mfi->add(args);
01512         args.print(dir);
01513         launchCVS(dir, args.Argc(), args.Argv());
01514     }
01515 }

Here is the call graph for this function:

void CvsCmdUpdate | ( | KiSelectionHandler & | handler,
 |  | bool | queryOnly
 | ) |

Execute cvs update command

Parameters:
handler | Selection for the command
queryOnly | true for query update, false for the update command
Definition at line 850 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetUpdate(), MultiFiles::const_iterator, CStr, MultiFiles::end(), gCvsPrefs, launchCVS(), NULL, CvsArgs::print(), and CvsPrefs::PruneOption().

Referenced by KoUpdateHandler::OnFiles(), KoQueryUpdateHandler::OnFiles(), KoUpdateHandler::OnFolder(), and KoQueryUpdateHandler::OnFolder().

00851 {
00852     MultiFiles* mf = NULL;
00853     if( !CheckSelectionHandler(handler, mf) )
00854         return;
00855
00856     bool toStdout;
00857     bool noRecurs;
00858     bool resetSticky;
00859     CStr date;
00860     CStr rev;
00861     bool useMostRecent;
00862     CStr rev1;
00863     CStr rev2;
00864     bool branchPointMerge;
00865     bool threeWayConflicts;
00866     bool createMissDir;
00867     bool getCleanCopy;
00868     CStr keyword;
00869     bool caseSensitiveNames;
00870     bool lastCheckinTime;
00871
00872     if( !queryOnly && !CompatGetUpdate(mf, toStdout, noRecurs, resetSticky,
00873         date, rev, useMostRecent, rev1, rev2, branchPointMerge, threeWayConflicts,
00874         createMissDir, getCleanCopy, keyword, caseSensitiveNames, lastCheckinTime) )
00875         return;
00876
00877     MultiFiles::const_iterator mfi;
00878     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00879     {
00880         CvsArgs args;
00881
00882         if( queryOnly )
00883             args.add("-n");
00884
00885         args.add("update");
00886
00887         if( !keyword.empty() )
00888         {
00889             args.add(keyword);
00890         }
00891
00892         if( gCvsPrefs.PruneOption() )
00893             args.add("-P");
00894
00895         if( caseSensitiveNames )
00896             args.add("-S");
00897
00898         if( lastCheckinTime )
00899             args.add("-t");
00900
00901         if( !queryOnly )
00902         {
00903             if( resetSticky )
00904                 args.add("-A");
00905
00906             if( createMissDir )
00907                 args.add("-d");
00908
00909             if( getCleanCopy )
00910                 args.add("-C");
00911
00912             if( !date.empty() )
00913             {
00914                 args.add("-D");
00915                 args.add(date);
00916             }
00917
00918             if( useMostRecent )
00919                 args.add("-f");
00920
00921             if( !rev1.empty() )
00922             {
00923                 if( branchPointMerge )
00924                     args.add("-b");
00925
00926                 if( threeWayConflicts )
00927                     args.add("-3");
00928
00929                 CStr tmp;
00930                 tmp = "-j";
00931                 tmp << rev1;
00932                 args.add(tmp);
00933             }
00934
00935             if( !rev2.empty() )
00936             {
00937                 CStr tmp;
00938                 tmp = "-j";
00939                 tmp << rev2;
00940                 args.add(tmp);
00941             }
00942
00943             if( noRecurs )
00944                 args.add("-l");
00945
00946             if( toStdout )
00947                 args.add("-p");
00948
00949             if( !rev.empty() )
00950             {
00951                 args.add("-r");
00952                 args.add(rev);
00953             }
00954         }
00955
00956         const char* dir = mfi->add(args);
00957         args.print(dir);
00958         launchCVS(dir, args.Argc(), args.Argv());
00959     }
00960 }

Here is the call graph for this function:

void CvsCmdWatchers ( KiSelectionHandler & handler )

Execute cvs watchers command

Parameters:
handler Selection for the command
Definition at line 1749 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoWatchersHandler::OnFiles(), and KoWatchersHandler::OnFolder().

01750 {
01751     MultiFiles* mf = NULL;
01752     if( !CheckSelectionHandler(handler, mf) )
01753         return;
01754
01755     MultiFiles::const_iterator mfi;
01756     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01757     {
01758         CvsArgs args;
01759         args.add("watchers");
01760
01761         const char* dir = mfi->add(args);
01762         args.print(dir);
01763         launchCVS(dir, args.Argc(), args.Argv());
01764     }
01765 }

Here is the call graph for this function:

void CvsCmdWatchOff ( KiSelectionHandler & handler )

Execute cvs watch remove command

Parameters:
handler Selection for the command
Definition at line 1667 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoWatchOffHandler::OnFiles(), and KoWatchOffHandler::OnFolder().

01668 {
01669     MultiFiles* mf = NULL;
01670     if( !CheckSelectionHandler(handler, mf) )
01671         return;
01672
01673     MultiFiles::const_iterator mfi;
01674     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01675     {
01676         CvsArgs args;
01677         args.add("watch");
01678         args.add("remove");
01679
01680         const char* dir = mfi->add(args);
01681         args.print(dir);
01682         launchCVS(dir, args.Argc(), args.Argv());
01683     }
01684 }

Here is the call graph for this function:

void CvsCmdWatchOn ( KiSelectionHandler & handler )

Execute cvs watch add command

Parameters:
handler Selection for the command
Definition at line 1644 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoWatchOnHandler::OnFiles(), and KoWatchOnHandler::OnFolder().

01645 {
01646     MultiFiles* mf = NULL;
01647     if( !CheckSelectionHandler(handler, mf) )
01648         return;
01649
01650     MultiFiles::const_iterator mfi;
01651     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01652     {
01653         CvsArgs args;
01654         args.add("watch");
01655         args.add("add");
01656
01657         const char* dir = mfi->add(args);
01658         args.print(dir);
01659         launchCVS(dir, args.Argc(), args.Argv());
01660     }
01661 }

Here is the call graph for this function:

const char* GetEditTypeName ( const kEditCmdType editType )

Get the edit type name

Parameters:
editType Edit type
Returns:
The edit type name
Definition at line 87 of file CvsCommands.cpp.

References _i18n, kEditForce, kEditNormal, and kEditReserved.

Referenced by TEditHandler< editType >::TEditHandler().

00088 {
00089     const char* res = _i18n("Unknown");
00090
00091     switch( editType )
00092     {
00093     case kEditNormal:
00094         res = _i18n("Edit");
00095         break;
00096     case kEditReserved:
00097         res = _i18n("Reserved Edit");
00098         break;
00099     case kEditForce:
00100         res = _i18n("Force Edit");
00101         break;
00102     default:
00103         break;
00104     }
00105
00106     return res;
00107 }

const char* GetRtagTypeName ( const kTagCmdType tagType )

Get the tag type name

Parameters:
tagType Edit type
Returns:
The tag type name
Definition at line 141 of file CvsCommands.cpp.

References _i18n, kTagBranch, kTagCreate, and kTagDelete.

Referenced by TRtagHandler< tagType >::TRtagHandler().

00142 {
00143     const char* res = _i18n("Unknown");
00144
00145     switch( tagType )
00146     {
00147     case kTagCreate:
00148         res = _i18n("Rtag Create");
00149         break;
00150     case kTagDelete:
00151         res = _i18n("Rtag Delete");
00152         break;
00153     case kTagBranch:
00154         res = _i18n("RTag Branch");
00155         break;
00156     default:
00157         break;
00158     }
00159
00160     return res;
00161 }

const char* GetTagTypeName ( const kTagCmdType tagType )

Get the tag type name

Parameters:
tagType Edit type
Returns:
The tag type name
Definition at line 114 of file CvsCommands.cpp.

References _i18n, kTagBranch, kTagCreate, and kTagDelete.

Referenced by TTagHandler< tagType >::TTagHandler().

00115 {
00116     const char* res = _i18n("Unknown");
00117
00118     switch( tagType )
00119     {
00120     case kTagCreate:
00121         res = _i18n("Create Tag");
00122         break;
00123     case kTagDelete:
00124         res = _i18n("Delete Tag");
00125         break;
00126     case kTagBranch:
00127         res = _i18n("Branch");
00128         break;
00129     default:
00130         break;
00131     }
00132
00133     return res;
00134 }

Generated on Sat Aug 7 22:44:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsCommands.h File Reference

common/CvsCommands.h File Reference

#include "LaunchHandlers.h"

Include dependency graph for CvsCommands.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Enumerations

enum kEditCmdType {
kEditNormal,
kEditReserved,
kEditForce
}
Edit command type enum. More...
enum kTagCmdType {
kTagCreate,
kTagDelete,
kTagBranch
}
Tag command type enum. More...
enum kAddCmdType {
kAddNormal,
kAddBinary,
kAddUnicode
}
Add command type enum. More...
enum kDiffCmdType {
kDiffFile,
kDiffFolder,
kDiffGraph
}
Diff command type enum. More...
enum kAnnotateCmdType {
kAnnotateFile,
kAnnotateGraph
}
Annotate command type enum. More...

Functions

void | CvsCmdInit ()
void | CvsCmdLogin (void)
void | CvsCmdLogout (void)
void | CvsCmdRtag (KiSelectionHandler &handler, const kTagCmdType tagType)
void | CvsCmdCommandLine (KiSelectionHandler &handler)
void | CvsCmdCheckoutModule (KiSelectionHandler &handler)
void | CvsCmdImportModule (KiSelectionHandler &handler)
void | CvsCmdCancelChanges (KiSelectionHandler &handler)
void | CvsCmdUpdate (KiSelectionHandler &handler, bool queryOnly=false)
void | CvsCmdCommit (KiSelectionHandler &handler)
void | CvsCmdDiff (KiSelectionHandler &handler, kDiffCmdType diffType)
void | CvsCmdAdd (KiSelectionHandler &handler, kAddCmdType addType=kAddNormal)
void | CvsCmdRemove (KiSelectionHandler &handler)
void | CvsCmdLog (KiSelectionHandler &handler, bool outGraph=false, void *defWnd=0L)
void | CvsCmdStatus (KiSelectionHandler &handler)
void | CvsCmdLock (KiSelectionHandler &handler)
void | CvsCmdUnlock (KiSelectionHandler &handler)
void | CvsCmdTag (KiSelectionHandler &handler, const kTagCmdType tagType)
void | CvsCmdEdit (KiSelectionHandler &handler, kEditCmdType editType=kEditNormal)
void | CvsCmdUnedit (KiSelectionHandler &handler)
void | CvsCmdWatchOn (KiSelectionHandler &handler)
void | CvsCmdWatchOff (KiSelectionHandler &handler)
void | CvsCmdRelease (KiSelectionHandler &handler)
void | CvsCmdWatchers (KiSelectionHandler &handler)
void | CvsCmdEditors (KiSelectionHandler &handler)
void | CvsCmdAnnotate (KiSelectionHandler &handler, kAnnotateCmdType annotateType=kAnnotateFile)
void | CvsCmdMoveToTrash (KiSelectionHandler &handler)
void | CvsCmdFileAction (KiSelectionHandler &handler)
void | CvsCmdLaunch (KiSelectionHandler &handler, const kLaunchType launchType)
void | CvsCmdMacrosAdmin (const char *macroName)
const char * | GetEditTypeName (const kEditCmdType editType)
const char * | GetTagTypeName (const kTagCmdType tagType)
const char * | GetRtagTypeName (const kTagCmdType tagType)

Enumeration Type Documentation

enum kAddCmdType

Add command type enum.

Enumeration values:
kAddNormal | cvs add
kAddBinary | cvs add -kb
kAddUnicode | cvs add -ku
Definition at line 47 of file CvsCommands.h.
00048 {
00049     kAddNormal,
00050     kAddBinary,
00051     kAddUnicode
00052 } kAddCmdType;

enum kAnnotateCmdType

Annotate command type enum.

Enumeration values:
kAnnotateFile | Annotate file selection
kAnnotateGraph | Annotate graph selection
Definition at line 63 of file CvsCommands.h.
00064 {
00065     kAnnotateFile,
00066     kAnnotateGraph
00067 } kAnnotateCmdType;

enum kDiffCmdType

Diff command type enum.

Enumeration values:
kDiffFile | Diff file selection
kDiffFolder | Diff folder selection
kDiffGraph | Diff graph selection
Definition at line 55 of file CvsCommands.h.
00056 {
00057     kDiffFile,
00058     kDiffFolder,
00059     kDiffGraph
00060 } kDiffCmdType;

enum kEditCmdType

Edit command type enum.

Enumeration values:
kEditNormal | cvs edit
kEditReserved | cvs edit -c
kEditForce | cvs edit -f
Definition at line 31 of file CvsCommands.h.
00032 {
00033     kEditNormal,
00034     kEditReserved,
00035     kEditForce
00036 } kEditCmdType;

enum kTagCmdType

Tag command type enum.

Enumeration values:
kTagCreate | Create tag
kTagDelete | Delete tag
kTagBranch | Create branch tag
Definition at line 39 of file CvsCommands.h.
00040 {
00041     kTagCreate,
00042     kTagDelete,
00043     kTagBranch
00044 } kTagCmdType;

Function Documentation

void CvsCmdAdd | ( | KiSelectionHandler & | handler,
 |  | kAddCmdType | addType
 | ) |

Execute cvs add command

Parameters:
handler | Selection for the command
addType | Add type
Definition at line 1224 of file CvsCommands.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), BUTTONTITLE_CANCEL, BUTTONTITLE_CONTINUE, CheckSelectionHandler(), MultiFiles::const_iterator, CStr, cvs_err(), MultiFiles::end(), ControlCvsArgs::HasProblem(), kAddBinary, kAddNormal, kAddUnicode, kCvsAlertOKButton, kCvsAlertWarningIcon, launchCVS(), NULL, CvsArgs::print(), CvsAlert::ShowAlert(), and SplitPath().

Referenced by KoAddUnicodeHandler::OnFiles(), KoAddBinaryHandler::OnFiles(), KoAddHandler::OnFiles(), KoAddUnicodeHandler::OnFolder(), KoAddBinaryHandler::OnFolder(), and KoAddHandler::OnFolder().

01225 {
01226     MultiFiles* mf = NULL;
01227     if( !CheckSelectionHandler(handler, mf) )
01228         return;
01229
01230     MultiFiles::const_iterator mfi;
01231     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01232     {
01233         if( mfi->NumFiles() > 0 )
01234         {
01235             // Files
01236             ControlCvsArgs* args = NULL;
01237             switch( addType )
01238             {
01239             default:
01240             case kAddNormal:
01241                 args = new AddCvsArgs;
01242                 break;
01243             case kAddBinary:
01244                 args = new AddBinCvsArgs;
01245                 break;
01246             case kAddUnicode:
01247                 args = new AddUnicodeCvsArgs;
01248                 break;
01249             }
01250
01251             if( !args )
01252             {
01253                 cvs_err("Unable to allocate memory for arguments list\n");
01254                 return;
01255             }
01256
01257             args->add("add");
01258
01259             if( addType == kAddBinary )
01260             {
01261                 args->add("-kb");
01262             }
01263             else if( addType == kAddUnicode )
01264             {
01265                 args->add("-ku");
01266             }
01267
01268             const char* dir = mfi->add(*args);
01269
01270             CvsAlert cvsAlert(kCvsAlertWarningIcon,
01271                 _i18n("Do you want to continue?"), _i18n("Some problems have been found while adding files and should be corrected. See the console window for details."),
01272                 BUTTONTITLE_CONTINUE, BUTTONTITLE_CANCEL);
01273
01274             if( !args->HasProblem() || cvsAlert.ShowAlert() == kCvsAlertOKButton )
01275             {
01276                 args->print(dir);
01277                 launchCVS(dir, args->Argc(), args->Argv());
01278             }
01279
01280             delete args;
01281         }
01282         else
01283         {
01284             // Directory
01285             const char* dir = mfi->getdir();
01286             CStr uppath, folder;
01287
01288             if( !SplitPath(dir, uppath, folder) )
01289             {
01290                 cvs_err(_i18n("Unable to convert path name '%s'\n"), dir);
01291                 return;
01292             }
01293
01294             CvsArgs args;
01295             args.add("add");
01296             args.add(folder);
01297
01298             args.print(uppath);
01299             launchCVS(uppath, args.Argc(), args.Argv());
01300         }
01301     }
01302 }

Here is the call graph for this function:

void CvsCmdAnnotate | ( | KiSelectionHandler & | handler,
 |  | kAnnotateCmdType | annotateType
 | ) |

Execute cvs annotate command

Parameters:
handler | Selection for the command
annotateType | Annotate command type
Definition at line 1794 of file CvsCommands.cpp.

References CvsArgs::add(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetAnnotate(), MultiFiles::const_iterator, CPStr, CStr, MultiFiles::end(), FlatenSubFolders(), MultiFilesEntry::get(), GetExtension(), kAnnotateGraph, launchCVS(), LaunchDefaultEditor(), NULL, MultiFilesEntry::NumFiles(), CvsArgs::print(), and MultiFiles::TotalNumFiles().

Referenced by KoGraphAnnotateHandler::OnFiles(), and KoAnnotateHandler::OnFiles().

01795 {
01796     MultiFiles* mf = NULL;
01797     if( !CheckSelectionHandler(handler, mf) )
01798         return;
01799
01800     bool noRecurs;
01801     bool isDate;
01802     CPStr rev;
01803     bool force;
01804
01805     if( annotateType == kAnnotateGraph )
01806     {
01807         if( mf->TotalNumFiles() == 1 )
01808         {
01809             const MultiFilesEntry& mfe = *mf->begin();
01810
01811             if( mfe.NumFiles() == 1 )
01812             {
01813               CStr ignorePath, ignoreName, revision;
01814
01815               if( mfe.get(0, ignorePath, ignoreName, revision) )
01816                   rev = revision;
01817             }
01818         }
01819     }
01820
01821     if( !CompatGetAnnotate(mf, annotateType, noRecurs, isDate, rev, force) )
01822         return;
01823
01824     MultiFiles::const_iterator mfi;
01825     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01826     {
01827         CStr path, filename, ext, base, currRev;
01828         CStr file;
01829
01830         for(int i = 0; ; i++)
01831         {
01832             if( !mfi->get(i, path, filename, currRev) )
01833                 break;
01834
01835             // note that filename can contain subfolders
01836
01837             GetExtension(filename, base, ext);
01838
01839             CvsArgs args;
01840             CStr tmpf(base);
01841
01842             if( !rev.empty() )
01843             {
01844                 tmpf << "_ann_";
01845                 tmpf << rev;
01846                 tmpf << '_';
01847             }
01848             else
01849                 tmpf << "_ann_";
01850
01851             // convert subfolder names to regular name
01852             FlatenSubFolders(tmpf);
01853
01854             args.add("annotate");
01855
01856             if( noRecurs )
01857             {
01858                 args.add("-l");
01859             }
01860
01861             if( force )
01862             {
01863                 args.add("-f");
01864             }
01865
01866             if( !rev.empty() )
01867             {
01868                 args.add(isDate ? "-D" : "-r");
01869                 args.add(rev);
01870             }
01871
01872             args.add(filename);
01873             args.print(path);
01874             file = launchCVS(path, args, (const char *)tmpf, ext);
01875
01876             if( file.empty() )
01877                 continue;
01878
01879             LaunchDefaultEditor(file);
01880         }
01881     }
01882 }

Here is the call graph for this function:

void CvsCmdCancelChanges ( KiSelectionHandler & handler )

Execute cvs update command

Parameters:
handler Selection for the command
Definition at line 827 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoCancelChangesHandler::OnFiles().

00828 {
00829     MultiFiles* mf = NULL;
00830     if( !CheckSelectionHandler(handler, mf) )
00831         return;
00832
00833     MultiFiles::const_iterator mfi;
00834     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00835     {
00836         RemoveCvsArgs args;
00837         args.add("update");
00838
00839         const char* dir = mfi->add(args);
00840         args.print(dir);
00841         launchCVS(dir, args.Argc(), args.Argv());
00842     }
00843 }

Here is the call graph for this function:

void CvsCmdCheckoutModule ( KiSelectionHandler & handler )

Execute cvs checkout and cvs export command

Parameters:
handler Selection for the command
Definition at line 416 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetCheckout(), MultiFiles::const_iterator, CStr, gCvsPrefs, launchCVS(), NULL, CvsArgs::print(), and CvsPrefs::PruneOption().

Referenced by KoCheckoutHandler::OnFiles(), and KoCheckoutHandler::OnFolder().

00417 {
00418     MultiFiles* mf = NULL;
00419     if( !CheckSelectionHandler(handler, mf) )
00420         return;
00421
00422     MultiFiles::const_iterator mfi = mf->begin();
00423     const char* dir = mfi->getdir();
00424
00425     bool norecurs;
00426     CStr modname;
00427     CStr path(dir);
00428     bool toStdout;
00429     CStr date;
00430     CStr rev;
00431     bool useMostRecent;
00432     CStr rev1;
00433     CStr rev2;
00434     bool branchPointMerge;
00435     bool threeWayConflicts;
00436     bool doexport;
00437     bool forceCvsroot;
00438     CStr cvsroot;
00439     bool overrideCheckoutDir;
00440     CStr checkoutDir;
00441     CStr keyword;
00442     bool resetSticky;
00443     bool dontShortenPaths;
00444     bool caseSensitiveNames;
00445     bool lastCheckinTime;
00446
00447     if( !CompatGetCheckout(mf, modname, path, norecurs,
00448         toStdout, date, rev, useMostRecent, rev1, rev2, branchPointMerge, threeWayConflicts,
00449         doexport, forceCvsroot, cvsroot, overrideCheckoutDir, checkoutDir, keyword, resetSticky, dontShortenPaths,
00450         caseSensitiveNames, lastCheckinTime) )
00451     {
00452         return;
00453     }
00454
00455     CvsArgs args;
00456
00457     if( forceCvsroot )
00458     {
00459 #if INTERNAL_AUTHEN
00460         args.addcvsroot();
00461 #else
00462         args.add("-d");
00463         args.add(cvsroot);
00464 #endif /* INTERNAL_AUTHEN */
00465     }
00466
00467     args.add(doexport ? "export" : "checkout");
00468
00469     if( gCvsPrefs.PruneOption() && !doexport )
00470         args.add("-P");
00471
00472     if( norecurs )
00473         args.add("-l");
00474
00475     if( toStdout )
00476         args.add("-p");
00477
00478     if( caseSensitiveNames )
00479         args.add("-S");
00480
00481     if( lastCheckinTime )
00482         args.add("-t");
00483
00484     if( resetSticky )
00485     {
00486         args.add("-A");
00487     }
00488     else
00489     {
00490         if( !keyword.empty() )
00491         {
00492             args.add(keyword);
00493         }
00494
00495         if( useMostRecent )
00496         {
00497             args.add("-f");
00498         }
00499
00500         if( !date.empty() )
00501         {
00502             args.add("-D");
00503             args.add(date);
00504         }
00505
00506         if( !rev.empty() )
00507         {
00508             args.add("-r");
00509             args.add(rev);
00510         }
00511     }
00512
00513     if( !rev1.empty() )
00514     {
00515         if( branchPointMerge )
00516             args.add("-b");
00517
00518         if( threeWayConflicts )
00519             args.add("-3");
00520
00521         CStr tmp;
00522         tmp = "-j";
00523         tmp << rev1;
00524         args.add(tmp);
00525     }
00526
00527     if( !rev2.empty() )
00528     {
00529         CStr tmp;
00530         tmp = "-j";
00531         tmp << rev2;
00532         args.add(tmp);
00533     }
00534
00535     if( doexport && rev.empty() && date.empty() )
00536     {
00537         args.add("-r");
00538         args.add("HEAD");
00539     }
00540
00541     if( overrideCheckoutDir )
00542     {
00543         if( dontShortenPaths )
00544             args.add("-N");
00545
00546         args.add("-d");
00547         args.add(checkoutDir);
00548     }
00549
00550     args.add(modname);
00551
00552     args.print(path);
00553     launchCVS(path, args.Argc(), args.Argv());
00554 }

Here is the call graph for this function:

void CvsCmdCommandLine ( KiSelectionHandler & handler )

Execute command line

Parameters:
handler Selection for the command
Definition at line 721 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetCommand(), MultiFiles::const_iterator, CStr, CVS_CMD, MultiFiles::end(), launchCVS(), MAX_ARGS, NULL, CvsArgs::print(), and StringToArgv().

Referenced by CWincvsDoc::OnAppCmdline(), UCvsFrame::OnCmdCmdline(), KoCommandLineHandler::OnFiles(), and KoCommandLineHandler::OnFolder().

00722 {
00723     MultiFiles* mf = NULL;
00724     if( !CheckSelectionHandler(handler, mf) )
00725         return;
00726
00727     CStr dir;
00728     CStr cmd;
00729     bool addDefault;
00730     bool addSelection;
00731     bool forceCvsroot;
00732     CStr cvsroot;
00733
00734     if( !CompatGetCommand(mf, cmd, dir, addDefault, addSelection, forceCvsroot, cvsroot) )
00735         return;
00736
00737     char* argv[MAX_ARGS];
00738     int argc = StringToArgv(cmd.c_str(), argv);
00739
00740     if( addSelection )
00741     {
00742         MultiFiles::const_iterator mfi;
00743         for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00744         {
00745             CvsArgs args(addDefault);
00746
00747             if( addDefault && forceCvsroot )
00748             {
00749 #if INTERNAL_AUTHEN
00750                 args.addcvsroot();
00751 #else
00752                 args.add("-d");
00753                 args.add(cvsroot);
00754 #endif /* INTERNAL_AUTHEN */
00755             }
00756
00757             for(int i = 0; i < argc; i++)
00758             {
00759                 if( addDefault && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00760                 {
00761                     // Skip the "cvs" arguments as it's already added by args constructor
00762                     continue;
00763                 }
00764
00765                 args.add(argv[i]);
00766
00767                 if( !addDefault && forceCvsroot && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00768                 {
00769 #if INTERNAL_AUTHEN
00770                     args.addcvsroot();
00771 #else
00772                     args.add("-d");
00773                     args.add(cvsroot);
00774 #endif /* INTERNAL_AUTHEN */
00775                 }
00776             }
00777
00778             const char* dir = mfi->add(args);
00779             args.print(dir);
00780             launchCVS(dir, args.Argc(), args.Argv());
00781         }
00782     }
00783     else
00784     {
00785         CvsArgs args(addDefault);
00786
00787         if( addDefault && forceCvsroot )
00788         {
00789 #if INTERNAL_AUTHEN
00790             args.addcvsroot();
00791 #else
00792             args.add("-d");
00793             args.add(cvsroot);
00794 #endif /* INTERNAL_AUTHEN */
00795         }
00796
00797         for(int i = 0; i < argc; i++)
00798         {
00799             if( addDefault && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00800             {
00801                 // Skip the "cvs" arguments as it's already added by args constructor
00802                 continue;
00803             }
00804
00805             args.add(argv[i]);
00806
00807             if( !addDefault && forceCvsroot && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00808             {
00809 #if INTERNAL_AUTHEN
00810                 args.addcvsroot();
00811 #else
00812                 args.add("-d");
00813                 args.add(cvsroot);
00814 #endif /* INTERNAL_AUTHEN */
00815             }
00816         }
00817
00818         args.print(dir);
00819         launchCVS(dir, args.Argc(), args.Argv());
00820     }
00821 }

Here is the call graph for this function:

void CvsCmdCommit ( KiSelectionHandler & handler )

Execute cvs commit command

Parameters:
handler Selection for the command
Definition at line 966 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CleanupLogMsg(), CompatGetCommit(), MultiFiles::const_iterator, CStr, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoCommitHandler::OnFiles(), and KoCommitHandler::OnFolder().

00967 {
00968     MultiFiles* mf = NULL;
00969     if( !CheckSelectionHandler(handler, mf) )
00970         return;
00971
00972     bool norecurs;
00973     CStr logmsg;
00974     bool forceCommit;
00975     bool forceRecurse;
00976     CStr rev;
00977     bool noModuleProgram;
00978     bool checkValidEdits;
00979
00980     if( !CompatGetCommit(mf, logmsg, norecurs, forceCommit, forceRecurse, rev, noModuleProgram, checkValidEdits) )
00981         return;
00982
00983     MultiFiles::const_iterator mfi;
00984     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00985     {
00986         CvsArgs args;
00987         args.add("commit");
00988
00989         if( checkValidEdits )
00990             args.add("-c");
00991
00992         if( norecurs )
00993             args.add("-l");
00994
00995         if( noModuleProgram )
00996             args.add("-n");
00997
00998         if( forceCommit )
00999             args.add("-f");
01000
01001         if( forceRecurse )
01002             args.add("-R");
01003
01004         args.add("-m");
01005         args.add(CleanupLogMsg(logmsg));
01006
01007         if( !rev.empty() )
01008         {
01009             args.add("-r");
01010             args.add(rev);
01011         }
01012
01013         const char* dir = mfi->add(args);
01014         args.print(dir);
01015         launchCVS(dir, args.Argc(), args.Argv());
01016     }
01017 }

Here is the call graph for this function:

void CvsCmdDiff | ( | KiSelectionHandler & | handler,
 |  | kDiffCmdType | diffType
 | ) |

Execute cvs diff or external diff command

Parameters:
handler | Selection for the command
diffType | Diff command type
Definition at line 1024 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetDiff(), MultiFiles::const_iterator, CStr, MultiFiles::end(), FlatenSubFolders(), MultiFilesEntry::get(), GetExtension(), kDiffGraph, launchCVS(), LaunchDiff(), NULL, MultiFilesEntry::NumFiles(), CvsArgs::parse(), CvsArgs::print(), and MultiFiles::TotalNumFiles().

Referenced by KoGraphDiffHandler::OnFiles(), KoDiffHandler::OnFiles(), and KoDiffHandler::OnFolder().

01025 {
01026     MultiFiles* mf = NULL;
01027     if( !CheckSelectionHandler(handler, mf) )
01028         return;
01029
01030     bool noRecurs;
01031     bool isDate1;
01032     bool isDate2;
01033     bool useExtDiff;
01034     CStr rev1;
01035     CStr rev2;
01036     bool unifiedDiff;
01037     bool noWhiteSpace;
01038     bool noBlankLines;
01039     bool ignoreCase;
01040     bool extDiffResult;
01041     CStr diffOptions;
01042     CStr keyword;
01043     CStr  diffTool;
01044
01045     if( diffType == kDiffGraph )
01046     {
01047         // determine initial revision settings
01048         if( mf->TotalNumFiles() > 0 )
01049         {
01050             const MultiFilesEntry& mfe = *mf->begin();
01051             CStr ignorePath, ignoreName, rev;
01052
01053             switch( mfe.NumFiles() )
01054             {
01055             case 2:
01056                 if( mfe.get(1, ignorePath, ignoreName, rev) )
01057                     rev2 = rev;
01058
01059                 // fall thru
01060             case 1:
01061                 if( mfe.get(0, ignorePath, ignoreName, rev) )
01062                     rev1 = rev;
01063
01064                 break;
01065             }
01066         }
01067     }
01068
01069     if( !CompatGetDiff(mf, diffType, noRecurs, isDate1, isDate2, rev1, rev2, useExtDiff, diffTool,
01070         unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, keyword, diffOptions,
01071         mf->TotalNumFiles() > 0) )
01072     {
01073         return;
01074     }
01075
01076     MultiFiles::const_iterator mfi;
01077     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01078     {
01079         extDiffResult = false;
01080
01081         if( mfi->NumFiles() && useExtDiff )
01082         {
01083             CStr path, filename, ext, base, currRev;
01084             CStr file1, file2;
01085
01086             for(int i = 0; ; i++)
01087             {
01088                 if( !mfi->get(i, path, filename, currRev) )
01089                     break;
01090
01091                 if( 0 < i && kDiffGraph == diffType )
01092                 {
01093                     // Graph diff contains two files, but it's actually the same one
01094                     break;
01095                 }
01096
01097                 // note that filename can contain subfolders
01098
01099                 GetExtension(filename, base, ext);
01100
01101                 CvsArgs args;
01102                 CStr tmpf(base);
01103                 tmpf << '_';
01104
01105                 if( !rev1.empty() )
01106                     tmpf << rev1;
01107                 else
01108                     tmpf << currRev;
01109
01110                 tmpf << '_';
01111
01112                 // convert subfolder names to regular name
01113                 FlatenSubFolders(tmpf);
01114
01115                 args.add("update");
01116                 args.add("-p");
01117
01118                 if( !rev1.empty() )
01119                 {
01120                     args.add(isDate1 ? "-D" : "-r");
01121                     args.add(rev1);
01122                 }
01123                 else if( !currRev.empty() )
01124                 {
01125                     args.add("-r");
01126                     args.add(currRev);
01127                 }
01128
01129                 args.add(filename);
01130                 args.print(path);
01131                 file1 = launchCVS(path, args, (const char *)tmpf, ext);
01132
01133                 if( rev2.empty() )
01134                 {
01135                     file2 = path;
01136
01137                     if( !file2.endsWith(kPathDelimiter) )
01138                         file2 << kPathDelimiter;
01139
01140                     file2 << filename;
01141                 }
01142                 else
01143                 {
01144                     CvsArgs args2;
01145
01146                     tmpf = base;
01147                     tmpf << '_';
01148                     tmpf << rev2;
01149                     tmpf << '_';
01150
01151                     // convert subfolder names to regular name
01152                     FlatenSubFolders(tmpf);
01153
01154                     args2.add("update");
01155                     args2.add("-p");
01156                     args2.add(isDate2 ? "-D" : "-r");
01157                     args2.add(rev2);
01158                     args2.add(filename);
01159                     args2.print(path);
01160                     file2 = launchCVS(path, args2, (const char *)tmpf, ext);
01161                 }
01162
01163                 if( file1.empty() || file2.empty() )
01164                     continue;
01165
01166                 extDiffResult = LaunchDiff(file1, file2, diffTool, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase);
01167             }
01168         }
01169
01170         if( !mfi->NumFiles() || !useExtDiff || !extDiffResult )
01171         {
01172             CvsArgs args;
01173             args.add("diff");
01174
01175             if( noRecurs )
01176                 args.add("-l");
01177
01178             if( !rev1.empty() )
01179             {
01180                 args.add(isDate1 ? "-D" : "-r");
01181                 args.add(rev1);
01182             }
01183
01184             if( !rev2.empty() )
01185             {
01186                 args.add(isDate2 ? "-D" : "-r");
01187                 args.add(rev2);
01188             }
01189
01190             if( unifiedDiff )
01191                 args.add("-u");     // --unified, -u
01192
01193             if( noWhiteSpace )
01194                 args.add("-wb");    //--ignore-all-space --ignore-space-change
01195
01196             if( noBlankLines )
01197                 args.add("-B");     //--ignore-blank-lines
01198
01199             if( ignoreCase )
01200                 args.add("-i");     //--ignore-case
01201
01202             if( !keyword.empty() )
01203             {
01204                 args.add(keyword);
01205             }
01206
01207             if( !diffOptions.empty() )
01208             {
01209                 args.parse(diffOptions);
01210             }
01211
01212             const char* dir = mfi->add(args);
01213             args.print(dir);
01214             launchCVS(dir, args.Argc(), args.Argv());
01215         }
01216     }
01217 }

Here is the call graph for this function:

void CvsCmdEdit | ( | KiSelectionHandler & | handler,
 |  | kEditCmdType | editType
 | ) |

Execute cvs edit command

Parameters:
handler | Selection for the command
editType | Edit type
Definition at line 1586 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), kEditForce, kEditNormal, kEditReserved, launchCVS(), NULL, and CvsArgs::print().

Referenced by TEditHandler< editType >::OnFiles(), and TEditHandler< editType >::OnFolder().

01587 {
01588     MultiFiles* mf = NULL;
01589     if( !CheckSelectionHandler(handler, mf) )
01590         return;
01591
01592     MultiFiles::const_iterator mfi;
01593     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01594     {
01595         CvsArgs args;
01596         args.add("edit");
01597
01598         switch( editType )
01599         {
01600         default:
01601         case kEditNormal:
01602             // intentionally blank
01603             break;
01604         case kEditReserved:
01605             args.add("-c");
01606             break;
01607         case kEditForce:
01608             args.add("-f");
01609             break;
01610         }
01611
01612         const char* dir = mfi->add(args);
01613         args.print(dir);
01614         launchCVS(dir, args.Argc(), args.Argv());
01615     }
01616 }

Here is the call graph for this function:

void CvsCmdEditors ( KiSelectionHandler & handler )

Execute cvs editors command

Parameters:
handler Selection for the command
Definition at line 1771 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoEditorsHandler::OnFiles(), and KoEditorsHandler::OnFolder().

01772 {
01773     MultiFiles* mf = NULL;
01774     if( !CheckSelectionHandler(handler, mf) )
01775         return;
01776
01777     MultiFiles::const_iterator mfi;
01778     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01779     {
01780         CvsArgs args;
01781         args.add("editors");
01782
01783         const char* dir = mfi->add(args);
01784         args.print(dir);
01785         launchCVS(dir, args.Argc(), args.Argv());
01786     }
01787 }

Here is the call graph for this function:

void CvsCmdFileAction ( KiSelectionHandler & handler )

Execute file action command

Parameters:
handler Selection for the command
Definition at line 1965 of file CvsCommands.cpp.

References MultiFiles::begin(), CheckSelectionHandler(), CompatGetFileAction(), MultiFiles::const_iterator, UStr::empty(), MultiFiles::end(), UStr::endsWith(), kLaunchEdit, kLaunchType, LaunchHandler(), and NULL.

Referenced by KoFileActionHandler::OnFiles().

01966 {
01967     MultiFiles* mf = NULL;
01968     if( !CheckSelectionHandler(handler, mf) )
01969         return;
01970
01971     bool noRecurs = false;
01972     kLaunchType launchType = kLaunchEdit;
01973
01974     if( !CompatGetFileAction(mf, launchType) )
01975         return;
01976
01977     MultiFiles::const_iterator mfi;
01978     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01979     {
01980         for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
01981         {
01982             UStr path;
01983             UStr fileName;
01984             UStr currRev;
01985
01986             mfi->get(nIndex, path, fileName, currRev);
01987             if( !path.empty() && !path.endsWith(kPathDelimiter) )
01988                 path << kPathDelimiter;
01989
01990             path << fileName;
01991
01992             LaunchHandler(launchType, path);
01993         }
01994     }
01995 }

Here is the call graph for this function:

void CvsCmdImportModule ( KiSelectionHandler & handler )

Execute cvs import command

Parameters:
handler Selection for the command
Definition at line 560 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CleanupLogMsg(), CompatGetImport(), CompatImportFilter(), MultiFiles::const_iterator, CPStr, CStr, MultiFiles::end(), free_list_types(), ReportConflict::GetPattern(), ReportConflict::HasForceBinary(), ReportConflict::HasForceNoKeywords(), ReportConflict::HasForceText(), ReportConflict::HasForceUnicode(), ReportConflict::HasIgnore(), ReportConflict::IsBinary(), ReportConflict::IsExtension(), ReportConflict::IsUnicode(), launchCVS(), ReportConflict::next, NULL, and CvsArgs::print().

Referenced by KoImportHandler::OnFiles(), and KoImportHandler::OnFolder().

00561 {
00562     MultiFiles* mf = NULL;
00563     if( !CheckSelectionHandler(handler, mf) )
00564         return;
00565
00566     MultiFiles::const_iterator mfi;
00567     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00568     {
00569         const char* dir = mfi->getdir();
00570         ReportConflict* entries = NULL;
00571         ReportWarning* warnings = NULL;
00572
00573         if( !CompatImportFilter(dir, entries, warnings) )
00574             return;
00575
00576         CStr modname, vendortag, reltag, path(dir), vendorBranchId;
00577         CStr logmsg;
00578         bool useDefIgnore;
00579         bool useFilesTime;
00580         bool createSandbox;
00581         bool dontCreateVendorTag;
00582         bool overwriteReleaseTags;
00583         bool forceCvsroot;
00584         CStr cvsroot;
00585
00586         if( !CompatGetImport(mf, entries, warnings, modname, logmsg, vendortag, reltag, vendorBranchId, path, useDefIgnore, useFilesTime, createSandbox, dontCreateVendorTag, overwriteReleaseTags, forceCvsroot, cvsroot) )
00587             return;
00588
00589         CvsArgs args;
00590
00591         if( forceCvsroot )
00592         {
00593 #if INTERNAL_AUTHEN
00594             args.addcvsroot();
00595 #else
00596             args.add("-d");
00597             args.add(cvsroot);
00598 #endif /* INTERNAL_AUTHEN */
00599         }
00600
00601         args.add("import");
00602
00603         if( createSandbox )
00604         {
00605             args.add("-C");
00606         }
00607
00608         if( useFilesTime )
00609         {
00610             args.add("-d");
00611         }
00612
00613         if( !dontCreateVendorTag && overwriteReleaseTags )
00614         {
00615             args.add("-f");
00616         }
00617
00618         // Fill the wrappers
00619         ReportConflict* tmpentry = entries;
00620
00621         if( !useDefIgnore )
00622         {
00623             args.add("-I"); // no default (core, *.o...)
00624             args.add("!");
00625             args.add("-I"); // but ignore the CVS folders
00626             args.add("CVS");
00627         }
00628
00629         while( tmpentry != 0L )
00630         {
00631             if( tmpentry->HasIgnore() )
00632             {
00633                 CPStr ign;
00634                 args.add("-I");
00635
00636                 if( tmpentry->IsExtension() )
00637                     ign << '*';
00638
00639                 ign << tmpentry->GetPattern();
00640                 args.add(ign);
00641             }
00642             else if( !tmpentry->HasForceText() &&
00643                 (tmpentry->IsBinary() || tmpentry->HasForceBinary() || tmpentry->HasForceNoKeywords() ||
00644                 tmpentry->IsUnicode() || tmpentry->HasForceUnicode()) )
00645             {
00646                 CPStr wrap;
00647                 const char* pattern = tmpentry->GetPattern();
00648                 bool hasSpace = strchr(pattern, ' ') != 0L;
00649                 args.add("-W");
00650
00651                 if( hasSpace )
00652                     wrap << '"';
00653
00654                 if( tmpentry->IsExtension() )
00655                     wrap << '*';
00656
00657                 wrap << pattern;
00658
00659                 if( hasSpace )
00660                     wrap << '"';
00661
00662                 if( tmpentry->HasForceNoKeywords() )
00663                 {
00664                     wrap << " -k 'o'";
00665                 }
00666                 else if( tmpentry->HasForceBinary() )
00667                 {
00668                     wrap << " -k 'b'";
00669                 }
00670                 else if( tmpentry->HasForceUnicode() )
00671                 {
00672                     wrap << " -k 'u'";
00673                 }
00674                 else if( tmpentry->IsBinary() )
00675                 {
00676                     wrap << " -k 'b'";
00677                 }
00678                 else if( tmpentry->IsUnicode() )
00679                 {
00680                     wrap << " -k 'u'";
00681                 }
00682
00683                 args.add(wrap);
00684             }
00685
00686             tmpentry = tmpentry->next;
00687         }
00688
00689         free_list_types(warnings, entries);
00690
00691         if( !vendorBranchId.empty() )
00692         {
00693             args.add("-b");
00694             args.add(vendorBranchId);
00695         }
00696
00697         args.add("-m");
00698         args.add(CleanupLogMsg(logmsg));
00699
00700         if( dontCreateVendorTag )
00701         {
00702             args.add("-n");
00703             args.add(modname);
00704         }
00705         else
00706         {
00707             args.add(modname);
00708             args.add(vendortag);
00709             args.add(reltag);
00710         }
00711
00712         args.print(path);
00713         launchCVS(path, args.Argc(), args.Argv());
00714     }
00715 }

Here is the call graph for this function:

void CvsCmdInit ( )

Execute cvs init command Definition at line 210 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CompatGetInit(), CStr, gCvsPrefs, launchCVS(), and CvsArgs::print().

Referenced by UCvsFrame::OnCmdInit(), and CWincvsDoc::OnViewInit().

00211 {
00212 #if INTERNAL_AUTHEN
00213     if( gCvsPrefs.empty() )
00214         return;
00215 #endif /* INTERNAL_AUTHEN */
00216
00217     bool forceCvsroot;
00218     CStr cvsroot;
00219
00220     if( !CompatGetInit(forceCvsroot, cvsroot) )
00221         return;
00222
00223     CvsArgs args;
00224
00225     if( forceCvsroot )
00226     {
00227 #if INTERNAL_AUTHEN
00228         args.addcvsroot();
00229 #else
00230         args.add("-d");
00231         args.add(cvsroot);
00232 #endif /* INTERNAL_AUTHEN */
00233     }
00234
00235     args.add("init");
00236
00237     args.print();
00238     launchCVS(0L, args.Argc(), args.Argv());
00239 }

Here is the call graph for this function:

void CvsCmdLaunch | ( | KiSelectionHandler & | handler,
 |  | const kLaunchType | launchType
 | ) |

Execute launch command

Parameters:
handler | Selection for the command
launchType | Launch type
Definition at line 2002 of file CvsCommands.cpp.

References MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, UStr::empty(), MultiFiles::end(), UStr::endsWith(), LaunchHandler(), and NULL.

Referenced by TLaunchHandler< lauchType >::OnFiles().

02003 {
02004     MultiFiles* mf = NULL;
02005     if( !CheckSelectionHandler(handler, mf) )
02006         return;
02007
02008     MultiFiles::const_iterator mfi;
02009     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
02010     {
02011         for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
02012         {
02013             UStr path;
02014             UStr fileName;
02015             UStr currRev;
02016
02017             mfi->get(nIndex, path, fileName, currRev);
02018             if( !path.empty() && !path.endsWith(kPathDelimiter) )
02019                 path << kPathDelimiter;
02020
02021             path << fileName;
02022
02023             LaunchHandler(launchType, path);
02024         }
02025     }
02026 }

Here is the call graph for this function:

void CvsCmdLock ( KiSelectionHandler & handler )

Execute cvs admin -l command

Parameters:
handler Selection for the command
Definition at line 1475 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoLockHandler::OnFiles(), and KoLockHandler::OnFolder().

01476 {
01477     MultiFiles* mf = NULL;
01478     if( !CheckSelectionHandler(handler, mf) )
01479         return;
01480
01481     MultiFiles::const_iterator mfi;
01482     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01483     {
01484         CvsArgs args;
01485         args.add("admin");
01486         args.add("-l");
01487
01488         const char* dir = mfi->add(args);
01489         args.print(dir);
01490         launchCVS(dir, args.Argc(), args.Argv());
01491     }
01492 }

Here is the call graph for this function:

void CvsCmdLog | ( | KiSelectionHandler & | handler,
 |  | bool | outGraph,
 |  | void * | defWnd
 | ) |

Execute cvs log or graph command

Parameters:
handler | Selection for the command
outGraph | true for the graph
defWnd | Default window
Definition at line 1337 of file CvsCommands.cpp.

References CvsArgs::add(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetLog(), MultiFiles::const_iterator, CStr, CvsLogParse(), MultiFiles::end(), NULL, and CvsArgs::print().

Referenced by KoGraphHandler::OnFiles(), KoLogHandler::OnFiles(), and KoLogHandler::OnFolder().

01338 {
01339     MultiFiles* mf = NULL;
01340     if( !CheckSelectionHandler(handler, mf) )
01341         return;
01342
01343     bool noRecurs;
01344     bool defBranch;
01345     CStr date;
01346     bool headerOnly;
01347     bool headerDesc;
01348     bool supress;
01349     bool noTags;
01350     bool onlyRCSfile;
01351     bool hasRev;
01352     CStr rev;
01353     CStr states;
01354     bool hasUser;
01355     CStr users;
01356
01357     if( !CompatGetLog(mf, noRecurs, defBranch, date,
01358         headerOnly, headerDesc, supress,
01359         noTags, onlyRCSfile, hasRev,
01360         rev, states, hasUser, users,
01361         outGraph) )
01362     {
01363         return;
01364     }
01365
01366     MultiFiles::const_iterator mfi;
01367     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01368     {
01369         CvsArgs args;
01370         args.add("log");
01371
01372         if( noRecurs )
01373             args.add("-l");
01374
01375         if( defBranch )
01376             args.add("-b");
01377
01378         if( headerDesc )
01379         {
01380             args.add("-t");
01381         }
01382         else
01383         {
01384             if( headerOnly )
01385                 args.add("-h");
01386         }
01387
01388         if( supress )
01389             args.add("-S");
01390
01391         if( noTags )
01392             args.add("-N");
01393
01394         if( onlyRCSfile )
01395             args.add("-R");
01396
01397         if( !date.empty() )
01398         {
01399             args.add("-d");
01400             args.add(date);
01401         }
01402
01403         if( !states.empty() )
01404         {
01405             args.add("-s");
01406             args.add(states);
01407         }
01408
01409         if( hasRev )
01410         {
01411             CStr tmp;
01412             tmp = "-r";
01413             tmp << rev;
01414             args.add(tmp);
01415         }
01416
01417         if( hasUser )
01418         {
01419             CStr tmp;
01420             tmp = "-w";
01421             tmp << users;
01422             args.add(tmp);
01423         }
01424
01425         const char* dir = mfi->add(args);
01426         args.print(dir);
01427         CvsLogParse(dir, args, outGraph, defWnd);
01428     }
01429 }

Here is the call graph for this function:

void CvsCmdLogin ( void )

Execute cvs login command Definition at line 244 of file CvsCommands.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CompatGetLogin(), CStr, cvs_err(), CvsCmdLogout(), gCvsPrefs, CvsPrefs::HasLoogedIn(), launchCVS(), CvsPrefs::LogoutTimeOut(), CvsArgs::print(), CvsPrefs::SetHasLoogedIn(), and WaitForCvs().

Referenced by CWincvsDoc::OnAppLogin(), and UCvsFrame::OnCmdLogin().

00245 {
00246 #if INTERNAL_AUTHEN
00247     if( gCvsPrefs.empty() )
00248         return;
00249 #endif /* INTERNAL_AUTHEN */
00250
00251     bool forceCvsroot;
00252     CStr cvsroot;
00253
00254     if( !CompatGetLogin(forceCvsroot, cvsroot) )
00255         return;
00256
00257 #if INTERNAL_AUTHEN
00258     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00259     if( !curModel->HasLogin() )
00260     {
00261         cvs_err(_i18n("Logging in is required for 'pserver' or 'sspi' authentication only (see Preferences dialog).\n"
00262             "Please consult the CVS manual for more details.\n"));
00263     }
00264 #endif /* INTERNAL_AUTHEN */
00265
00266     if( gCvsPrefs.HasLoogedIn() && gCvsPrefs.LogoutTimeOut() > 0 )
00267     {
00268         cvs_err(_i18n("Making automatic logout:\n"));
00269         CvsCmdLogout();
00270         WaitForCvs();
00271     }
00272
00273     gCvsPrefs.SetHasLoogedIn(true);
00274
00275     CvsArgs args;
00276
00277     if( forceCvsroot )
00278     {
00279 #if INTERNAL_AUTHEN
00280         args.addcvsroot();
00281 #else
00282         args.add("-d");
00283         args.add(cvsroot);
00284 #endif /* INTERNAL_AUTHEN */
00285     }
00286
00287     args.add("login");
00288
00289     args.print();
00290     launchCVS(0L, args.Argc(), args.Argv());
00291 }

Here is the call graph for this function:

void CvsCmdLogout ( void )

Execute cvs logout command Definition at line 296 of file CvsCommands.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), cvs_err(), gCvsPrefs, launchCVS(), CvsArgs::print(), and CvsPrefs::SetHasLoogedIn().

Referenced by CvsCmdLogin(), CLogoutThread::InitInstance(), CWincvsDoc::OnAppLogout(), UCvsFrame::OnCmdLogout(), and CWincvsApp::SaveAllModified().

00297 {
00298 #if INTERNAL_AUTHEN
00299     if( gCvsPrefs.empty() )
00300         return;
00301
00302     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00303     if( !curModel->HasLogin() )
00304     {
00305         cvs_err(_i18n("Logging out is required for 'pserver' or 'sspi' authentication only (see Preferences dialog).\n"
00306             "Please consult the CVS manual for more details.\n"));
00307     }
00308 #endif /* INTERNAL_AUTHEN */
00309
00310     gCvsPrefs.SetHasLoogedIn(false);
00311
00312     CvsArgs args;
00313
00314     args.add("logout");
00315
00316     args.print();
00317     launchCVS(0L, args.Argc(), args.Argv());
00318 }

Here is the call graph for this function:

void CvsCmdMacrosAdmin ( const char * macroName )

Execute admin macro

Parameters:
macroName Macro name to be executed
Definition at line 167 of file CvsCommands.cpp.

References CStr, CTcl_Interp::DoScriptVar(), gCvsPrefs, CTcl_Interp::IsAvail(), and CTcl_Interp::Unixfy().

Referenced by UCvsFrame::OnCmdMacroAdmin(), and CWincvsDoc::OnMacroAdmin().

00168 {
00169     if(
00170 #if INTERNAL_AUTHEN
00171         gCvsPrefs.empty() ||
00172 #endif /* INTERNAL_AUTHEN */
00173         !CTcl_Interp::IsAvail() )
00174         return;
00175
00176     CTcl_Interp interp;
00177     CStr path = macroName;
00178     CTcl_Interp::Unixfy(path);
00179     interp.DoScriptVar("source \"%s\"", (const char*)path);
00180 }

Here is the call graph for this function:

void CvsCmdMoveToTrash ( KiSelectionHandler & handler )

Execute erase command

Parameters:
handler Selection for the command
Definition at line 1888 of file CvsCommands.cpp.

References _i18n, MultiFiles::begin(), UStr::c_str(), CheckSelectionHandler(), CompatBeginMoveToTrash(), CompatEndMoveToTrash(), CompatMoveToTrash(), MultiFiles::const_iterator, CStr, cvs_err(), cvs_out(), MultiFiles::end(), UStr::endsWith(), kCvsAlertButtonType, kCvsAlertCancelButton, kCvsAlertOKButton, kCvsAlertQuestionIcon, NULL, and CvsAlert::ShowAlert().

Referenced by KoMoveToTrashHandler::OnFiles().

01889 {
01890     MultiFiles* mf = NULL;
01891     if( !CheckSelectionHandler(handler, mf) )
01892         return;
01893
01894     const char* primaryMsg = NULL;
01895     const char* secondaryMsg = NULL;
01896     kCvsAlertButtonType defaultButton = kCvsAlertCancelButton;
01897
01898 #if defined (TARGET_OS_MAC)
01899     primaryMsg = _i18n("Are you sure you want to move the selected files to the trash?");
01900     secondaryMsg = _i18n("The files will be moved into the trash just as if you deleted them from the Finder.");
01901     defaultButton = kCvsAlertOKButton;
01902 #elif defined (WIN32)
01903     primaryMsg = _i18n("Are you sure you want to move the selected files to the recycle bin?");
01904 #else
01905     primaryMsg = _i18n("Are you sure you want to remove the selected files?");
01906 #endif
01907
01908     CvsAlert cvsAlert(kCvsAlertQuestionIcon,
01909         primaryMsg, secondaryMsg);
01910
01911     if( cvsAlert.ShowAlert(defaultButton) != kCvsAlertOKButton )
01912     {
01913         return;
01914     }
01915
01916     CompatBeginMoveToTrash();
01917
01918     MultiFiles::const_iterator mfi;
01919     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01920     {
01921         int count = mfi->NumFiles();
01922         for(int i = 0; i < count; i++)
01923         {
01924             CStr path, fileName, currRev;
01925             if( mfi->get(i, path, fileName, currRev) )
01926             {
01927                 UStr fn(path);
01928                 if( !fn.endsWith(kPathDelimiter) )
01929                     fn << kPathDelimiter;
01930
01931                 fn << fileName;
01932
01933                 if( !CompatMoveToTrash(fn) )
01934                 {
01935                     UStr errText;
01936
01937                     // HINT for translate: "Unable to remove '<FILE>' (error <ERROR>)\n"
01938                     errText << _i18n("Unable to remove '") << fn << _i18n("' (error ") << errno << ")\n";
01939
01940                     cvs_err( errText.c_str() );
01941                 }
01942                 else
01943                 {
01944                     UStr errText;
01945 #if defined (TARGET_OS_MAC)
01946                     errText << "'" << fn << _i18n("' has been moved successfully to the trash ...\n");
01947 #elif defined (WIN32)
01948                     errText << "'" << fn << _i18n("' has been moved successfully to the recycle bin ...\n");
01949 #else
01950                     errText << "'" << fn << _i18n("' has been removed successfully ...\n");
01951 #endif
01952                     cvs_out( errText.c_str() );
01953                 }
01954             }
01955         }
01956     }
01957
01958     CompatEndMoveToTrash();
01959 }

Here is the call graph for this function:

void CvsCmdRelease ( KiSelectionHandler & handler )

Execute cvs release command

Parameters:
handler Selection for the command
Definition at line 1690 of file CvsCommands.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CheckSelectionHandler(), CompatGetRelease(), CStr, cvs_err(), MultiFiles::getdir(), kReleaseDelAll, kReleaseDelCvsInfo, kReleaseDelDir, kReleaseDelType, kReleaseNoDel, launchCVS(), NULL, CvsArgs::print(), and SplitPath().

Referenced by KoReleaseHandler::OnFolder().

01691 {
01692     MultiFiles* mf = NULL;
01693     if( !CheckSelectionHandler(handler, mf) )
01694         return;
01695
01696     CStr dir;
01697     if( !mf->getdir(0, dir) )
01698     {
01699         return;
01700     }
01701
01702     CStr uppath, folder;
01703     if( !SplitPath(dir, uppath, folder) )
01704     {
01705         cvs_err(_i18n("Unable to convert path name '%s'\n"), dir.c_str());
01706
01707         // Even thought something didn't work we will try to continue and put all the responsibility onto the user
01708         uppath = dir;
01709         folder = ".";
01710     }
01711
01712     kReleaseDelType removeDirectoryOption = kReleaseNoDel;
01713
01714     if( !CompatGetRelease(mf, dir, removeDirectoryOption) )
01715     {
01716         return;
01717     }
01718
01719     CvsArgs args;
01720     args.add("release");
01721
01722     switch( removeDirectoryOption )
01723     {
01724     default:
01725     case kReleaseNoDel:
01726         break;
01727     case kReleaseDelDir:
01728         args.add("-d");
01729         break;
01730     case kReleaseDelAll:
01731         args.add("-d");
01732         args.add("-f");
01733         break;
01734     case kReleaseDelCvsInfo:
01735         args.add("-e");
01736         break;
01737     }
01738
01739     args.add(folder);
01740
01741     args.print(uppath);
01742     launchCVS(uppath, args.Argc(), args.Argv());
01743 }

Here is the call graph for this function:

void CvsCmdRemove ( KiSelectionHandler & handler )

Execute cvs remove command

Parameters:
handler Selection for the command
Definition at line 1308 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatBeginMoveToTrash(), CompatEndMoveToTrash(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoFileRemoveHandler::OnFiles().

01309 {
01310     MultiFiles* mf = NULL;
01311     if( !CheckSelectionHandler(handler, mf) )
01312         return;
01313
01314     MultiFiles::const_iterator mfi;
01315     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01316     {
01317         RemoveCvsArgs args;
01318
01319         CompatBeginMoveToTrash();
01320
01321         args.add("remove");
01322         const char* dir = mfi->add(args);
01323         args.print(dir);
01324
01325         CompatEndMoveToTrash();
01326
01327         launchCVS(dir, args.Argc(), args.Argv());
01328     }
01329 }

Here is the call graph for this function:

void CvsCmdRtag | ( | KiSelectionHandler & | handler,
 |  | const kTagCmdType | tagType
 | ) |

Execute cvs rtag command

Parameters:
handler | Selection for the command
tagType | Tag type
Definition at line 325 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CheckSelectionHandler(), CompatGetRtag(), CStr, kTagBranch, kTagCreate, kTagDelete, launchCVS(), NULL, and CvsArgs::print().

Referenced by CWincvsDoc::OnAppRtagBranch(), CWincvsDoc::OnAppRtagDelete(), CWincvsDoc::OnAppRtagNew(), UCvsFrame::OnCmdRtagBranch(), UCvsFrame::OnCmdRtagDelete(), UCvsFrame::OnCmdRtagNew(), TRtagHandler< tagType >::OnFiles(), and TRtagHandler< tagType >::OnFolder().

00326 {
00327     MultiFiles* mf = NULL;
00328     if( !CheckSelectionHandler(handler, mf) )
00329         return;
00330
00331     bool norecurs;
00332     bool movDelBranch;
00333     bool overwriteExisting;
00334     bool useMostRecent;
00335     bool lookAttic;
00336     CStr modname;
00337     CStr tagname;
00338     CStr date;
00339     CStr rev;
00340     bool forceCvsroot;
00341     CStr cvsroot;
00342
00343     if( !CompatGetRtag(mf, tagType, norecurs, movDelBranch, overwriteExisting, tagname, modname, date, rev, useMostRecent, lookAttic, forceCvsroot, cvsroot) )
00344         return;
00345
00346     CvsArgs args;
00347
00348     if( forceCvsroot )
00349     {
00350 #if INTERNAL_AUTHEN
00351         args.addcvsroot();
00352 #else
00353         args.add("-d");
00354         args.add(cvsroot);
00355 #endif /* INTERNAL_AUTHEN */
00356     }
00357
00358     args.add("rtag");
00359
00360     switch( tagType )
00361     {
00362     case kTagCreate:
00363         // Nothing to do
00364         break;
00365     case kTagDelete:
00366         args.add("-d");
00367         break;
00368     case kTagBranch:
00369         args.add("-b");
00370         break;
00371     default:
00372         break;
00373     }
00374
00375     if( norecurs )
00376         args.add("-l");
00377
00378     if( movDelBranch )
00379         args.add("-B");
00380
00381     if( lookAttic )
00382         args.add("-a");
00383
00384     if( tagType == kTagCreate || tagType == kTagBranch )
00385     {
00386         if( useMostRecent )
00387             args.add("-f");
00388
00389         if( overwriteExisting )
00390             args.add("-F");
00391
00392         if( !date.empty() )
00393         {
00394             args.add("-D");
00395             args.add(date);
00396         }
00397
00398         if( !rev.empty() )
00399         {
00400             args.add("-r");
00401             args.add(rev);
00402         }
00403     }
00404
00405     args.add(tagname);
00406     args.add(modname);
00407
00408     args.print();
00409     launchCVS(0L, args.Argc(), args.Argv());
00410 }

Here is the call graph for this function:

void CvsCmdStatus ( KiSelectionHandler & handler )

Execute cvs status command

Parameters:
handler Selection for the command
Definition at line 1435 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetStatus(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, CvsArgs::print(), STATUSOUTPUT_QUICK, STATUSOUTPUT_TYPE, and STATUSOUTPUT_VERBOSE.

Referenced by KoStatusHandler::OnFiles(), and KoStatusHandler::OnFolder().

01436 {
01437     MultiFiles* mf = NULL;
01438     if( !CheckSelectionHandler(handler, mf) )
01439         return;
01440
01441     bool noRecurs = false;
01442     STATUSOUTPUT_TYPE outputType = STATUSOUTPUT_VERBOSE;
01443
01444     if( !CompatGetStatus(mf, noRecurs, outputType) )
01445         return;
01446
01447     MultiFiles::const_iterator mfi;
01448     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01449     {
01450         CvsArgs args;
01451         args.add("status");
01452
01453         if( noRecurs )
01454             args.add("-l");
01455
01456         if( STATUSOUTPUT_VERBOSE == outputType )
01457         {
01458             args.add("-v");
01459         }
01460         else if( STATUSOUTPUT_QUICK == outputType )
01461         {
01462             args.add("-q");
01463         }
01464
01465         const char* dir = mfi->add(args);
01466         args.print(dir);
01467         launchCVS(dir, args.Argc(), args.Argv());
01468     }
01469 }

Here is the call graph for this function:

void CvsCmdTag | ( | KiSelectionHandler & | handler,
 |  | const kTagCmdType | tagType
 | ) |

Execute cvs tag command

Parameters:
handler | Selection for the command
tagType | Tag type
Definition at line 1522 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetTag(), MultiFiles::const_iterator, CStr, MultiFiles::end(), kTagBranch, kTagCreate, kTagDelete, launchCVS(), NULL, and CvsArgs::print().

Referenced by TTagHandler< tagType >::OnFiles(), and TTagHandler< tagType >::OnFolder().

01523 {
01524     MultiFiles* mf = NULL;
01525     if( !CheckSelectionHandler(handler, mf) )
01526         return;
01527
01528     bool noRecurs;
01529     bool movDelBranch;
01530     bool overwriteExisting;
01531     bool checkUnmod;
01532     CStr tagName;
01533
01534     if( !CompatGetTag(mf, tagType, noRecurs, movDelBranch, overwriteExisting, tagName, checkUnmod) )
01535         return;
01536
01537     MultiFiles::const_iterator mfi;
01538     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01539     {
01540         CvsArgs args;
01541         args.add("tag");
01542
01543         switch( tagType )
01544         {
01545         case kTagCreate:
01546             // Nothing to do
01547             break;
01548         case kTagDelete:
01549             args.add("-d");
01550             break;
01551         case kTagBranch:
01552             args.add("-b");
01553             break;
01554         default:
01555             break;
01556         }
01557
01558         if( noRecurs )
01559             args.add("-l");
01560
01561         if( movDelBranch )
01562             args.add("-B");
01563
01564         if( tagType == kTagCreate || tagType == kTagBranch )
01565         {
01566             if( overwriteExisting )
01567                 args.add("-F");
01568
01569             if( checkUnmod )
01570                 args.add("-c");
01571         }
01572
01573         args.add(tagName);
01574
01575         const char* dir = mfi->add(args);
01576         args.print(dir);
01577         launchCVS(dir, args.Argc(), args.Argv());
01578     }
01579 }

Here is the call graph for this function:

void CvsCmdUnedit ( KiSelectionHandler & handler )

Execute cvs unedit command

Parameters:
handler Selection for the command
Definition at line 1622 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoUneditHandler::OnFiles(), and KoUneditHandler::OnFolder().

01623 {
01624     MultiFiles* mf = NULL;
01625     if( !CheckSelectionHandler(handler, mf) )
01626         return;
01627
01628     MultiFiles::const_iterator mfi;
01629     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01630     {
01631         CvsArgs args;
01632         args.add("unedit");
01633
01634         const char* dir = mfi->add(args);
01635         args.print(dir);
01636         launchCVS(dir, args.Argc(), args.Argv());
01637     }
01638 }

Here is the call graph for this function:

void CvsCmdUnlock ( KiSelectionHandler & handler )

Execute cvs admin -u command

Parameters:
handler Selection for the command
Definition at line 1498 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoUnlockHandler::OnFiles(), and KoUnlockHandler::OnFolder().

01499 {
01500     MultiFiles* mf = NULL;
01501     if( !CheckSelectionHandler(handler, mf) )
01502         return;
01503
01504     MultiFiles::const_iterator mfi;
01505     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01506     {
01507         CvsArgs args;
01508         args.add("admin");
01509         args.add("-u");
01510
01511         const char* dir = mfi->add(args);
01512         args.print(dir);
01513         launchCVS(dir, args.Argc(), args.Argv());
01514     }
01515 }

Here is the call graph for this function:

void CvsCmdUpdate | ( | KiSelectionHandler & | handler,
 |  | bool | queryOnly
 | ) |

Execute cvs update command

Parameters:
handler | Selection for the command
queryOnly | true for query update, false for the update command
Definition at line 850 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), CompatGetUpdate(), MultiFiles::const_iterator, CStr, MultiFiles::end(), gCvsPrefs, launchCVS(), NULL, CvsArgs::print(), and CvsPrefs::PruneOption().

Referenced by KoQueryUpdateHandler::OnFiles(), KoUpdateHandler::OnFiles(), KoQueryUpdateHandler::OnFolder(), and KoUpdateHandler::OnFolder().

00851 {
00852     MultiFiles* mf = NULL;
00853     if( !CheckSelectionHandler(handler, mf) )
00854         return;
00855
00856     bool toStdout;
00857     bool noRecurs;
00858     bool resetSticky;
00859     CStr date;
00860     CStr rev;
00861     bool useMostRecent;
00862     CStr rev1;
00863     CStr rev2;
00864     bool branchPointMerge;
00865     bool threeWayConflicts;
00866     bool createMissDir;
00867     bool getCleanCopy;
00868     CStr keyword;
00869     bool caseSensitiveNames;
00870     bool lastCheckinTime;
00871
00872     if( !queryOnly && !CompatGetUpdate(mf, toStdout, noRecurs, resetSticky,
00873         date, rev, useMostRecent, rev1, rev2, branchPointMerge, threeWayConflicts,
00874         createMissDir, getCleanCopy, keyword, caseSensitiveNames, lastCheckinTime) )
00875         return;
00876
00877     MultiFiles::const_iterator mfi;
00878     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00879     {
00880         CvsArgs args;
00881
00882         if( queryOnly )
00883             args.add("-n");
00884
00885         args.add("update");
00886
00887         if( !keyword.empty() )
00888         {
00889             args.add(keyword);
00890         }
00891
00892         if( gCvsPrefs.PruneOption() )
00893             args.add("-P");
00894
00895         if( caseSensitiveNames )
00896             args.add("-S");
00897
00898         if( lastCheckinTime )
00899             args.add("-t");
00900
00901         if( !queryOnly )
00902         {
00903             if( resetSticky )
00904                 args.add("-A");
00905
00906             if( createMissDir )
00907                 args.add("-d");
00908
00909             if( getCleanCopy )
00910                 args.add("-C");
00911
00912             if( !date.empty() )
00913             {
00914                 args.add("-D");
00915                 args.add(date);
00916             }
00917
00918             if( useMostRecent )
00919                 args.add("-f");
00920
00921             if( !rev1.empty() )
00922             {
00923                 if( branchPointMerge )
00924                     args.add("-b");
00925
00926                 if( threeWayConflicts )
00927                     args.add("-3");
00928
00929                 CStr tmp;
00930                 tmp = "-j";
00931                 tmp << rev1;
00932                 args.add(tmp);
00933             }
00934
00935             if( !rev2.empty() )
00936             {
00937                 CStr tmp;
00938                 tmp = "-j";
00939                 tmp << rev2;
00940                 args.add(tmp);
00941             }
00942
00943             if( noRecurs )
00944                 args.add("-l");
00945
00946             if( toStdout )
00947                 args.add("-p");
00948
00949             if( !rev.empty() )
00950             {
00951                 args.add("-r");
00952                 args.add(rev);
00953             }
00954         }
00955
00956         const char* dir = mfi->add(args);
00957         args.print(dir);
00958         launchCVS(dir, args.Argc(), args.Argv());
00959     }
00960 }

Here is the call graph for this function:

void CvsCmdWatchers ( KiSelectionHandler & handler )

Execute cvs watchers command

Parameters:
handler Selection for the command
Definition at line 1749 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoWatchersHandler::OnFiles(), and KoWatchersHandler::OnFolder().

01750 {
01751     MultiFiles* mf = NULL;
01752     if( !CheckSelectionHandler(handler, mf) )
01753         return;
01754
01755     MultiFiles::const_iterator mfi;
01756     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01757     {
01758         CvsArgs args;
01759         args.add("watchers");
01760
01761         const char* dir = mfi->add(args);
01762         args.print(dir);
01763         launchCVS(dir, args.Argc(), args.Argv());
01764     }
01765 }

Here is the call graph for this function:

void CvsCmdWatchOff ( KiSelectionHandler & handler )

Execute cvs watch remove command

Parameters:
handler Selection for the command
Definition at line 1667 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoWatchOffHandler::OnFiles(), and KoWatchOffHandler::OnFolder().

01668 {
01669     MultiFiles* mf = NULL;
01670     if( !CheckSelectionHandler(handler, mf) )
01671         return;
01672
01673     MultiFiles::const_iterator mfi;
01674     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01675     {
01676         CvsArgs args;
01677         args.add("watch");
01678         args.add("remove");
01679
01680         const char* dir = mfi->add(args);
01681         args.print(dir);
01682         launchCVS(dir, args.Argc(), args.Argv());
01683     }
01684 }

Here is the call graph for this function:

void CvsCmdWatchOn ( KiSelectionHandler & handler )

Execute cvs watch add command

Parameters:
handler Selection for the command
Definition at line 1644 of file CvsCommands.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CheckSelectionHandler(), MultiFiles::const_iterator, MultiFiles::end(), launchCVS(), NULL, and CvsArgs::print().

Referenced by KoWatchOnHandler::OnFiles(), and KoWatchOnHandler::OnFolder().

01645 {
01646     MultiFiles* mf = NULL;
01647     if( !CheckSelectionHandler(handler, mf) )
01648         return;
01649
01650     MultiFiles::const_iterator mfi;
01651     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01652     {
01653         CvsArgs args;
01654         args.add("watch");
01655         args.add("add");
01656
01657         const char* dir = mfi->add(args);
01658         args.print(dir);
01659         launchCVS(dir, args.Argc(), args.Argv());
01660     }
01661 }

Here is the call graph for this function:

const char* GetEditTypeName ( const kEditCmdType editType )

Get the edit type name

Parameters:
editType Edit type
Returns:
The edit type name
Definition at line 87 of file CvsCommands.cpp.

References _i18n, kEditForce, kEditNormal, and kEditReserved.

Referenced by TEditHandler< editType >::TEditHandler().

00088 {
00089     const char* res = _i18n("Unknown");
00090
00091     switch( editType )
00092     {
00093     case kEditNormal:
00094         res = _i18n("Edit");
00095         break;
00096     case kEditReserved:
00097         res = _i18n("Reserved Edit");
00098         break;
00099     case kEditForce:
00100         res = _i18n("Force Edit");
00101         break;
00102     default:
00103         break;
00104     }
00105
00106     return res;
00107 }

const char* GetRtagTypeName ( const kTagCmdType tagType )

Get the tag type name

Parameters:
tagType Edit type
Returns:
The tag type name
Definition at line 141 of file CvsCommands.cpp.

References _i18n, kTagBranch, kTagCreate, and kTagDelete.

Referenced by TRtagHandler< tagType >::TRtagHandler().

00142 {
00143     const char* res = _i18n("Unknown");
00144
00145     switch( tagType )
00146     {
00147     case kTagCreate:
00148         res = _i18n("Rtag Create");
00149         break;
00150     case kTagDelete:
00151         res = _i18n("Rtag Delete");
00152         break;
00153     case kTagBranch:
00154         res = _i18n("RTag Branch");
00155         break;
00156     default:
00157         break;
00158     }
00159
00160     return res;
00161 }

const char* GetTagTypeName ( const kTagCmdType tagType )

Get the tag type name

Parameters:
tagType Edit type
Returns:
The tag type name
Definition at line 114 of file CvsCommands.cpp.

References _i18n, kTagBranch, kTagCreate, and kTagDelete.

Referenced by TTagHandler< tagType >::TTagHandler().

00115 {
00116     const char* res = _i18n("Unknown");
00117
00118     switch( tagType )
00119     {
00120     case kTagCreate:
00121         res = _i18n("Create Tag");
00122         break;
00123     case kTagDelete:
00124         res = _i18n("Delete Tag");
00125         break;
00126     case kTagBranch:
00127         res = _i18n("Branch");
00128         break;
00129     default:
00130         break;
00131     }
00132
00133     return res;
00134 }

Generated on Sat Aug 7 22:44:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsEntries.cpp File Reference

common/CvsEntries.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <cstring>
#include <sys/types.h>
#include <sys/stat.h>
#include <sstream>
#include <algorithm>
#include "CvsEntries.h"
#include "AppConsole.h"
#include "getline.h"
#include "FileTraversal.h"
#include "BrowseViewColumn.h"
#include "WinCvsDebug.h"
#include <time.h>

Include dependency graph for CvsEntries.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | NEW new
#define | NAMESPACE(w) ::
#define | STR_ENCODING_TEXT _i18n("Text")
#define | STR_ENCODING_BINARY _i18n("Binary")
#define | STR_ENCODING_UNICODE _i18n("Unicode")
#define | STR_STATE_IGNORED _i18n("Ignored")
#define | STR_STATE_UNKNOWN _i18n("Unknown")
#define | STR_STATE_CONFLICT _i18n("Conflict")
#define | STR_STATE_RESOLVED _i18n("Resolved")
#define | STR_STATE_MODIFIED _i18n("Modified")
#define | STR_STATE_REMOVED _i18n("Removed")
#define | STR_STATE_MISSING _i18n("Missing")

Functions

time_t | GetDateTime (const char *strTime)
const char * | CloneStr (const char *cp)
void | DisposeStr (const char *cp)
char * | FindExtension (const char *name)
EntnodeData * | GetNextEntriesLine (FILE *fpin, const char *path, char *cmd=NULL)
bool | Entries_Open (CSortList< ENTNODE > &entries, const char *fullpath)
bool | VerifyUnmodified (const struct stat &sb, const char *ts)
void | SetEncoding (EntnodeFile *data)
EntnodeData * | Entries_SetVisited (const char *path, CSortList< ENTNODE > &entries, const char *name, const struct stat &finfo, bool isFolder, const std::vector< UStr > *ignlist)
void | Entries_SetMissing (CSortList< ENTNODE > &entries)
bool | Tag_Open (UStr &tag, const char *fullpath)

Variables

::string | gStrMonths [] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}
Months table used to parse the date string.

Define Documentation

#define NAMESPACE ( w ) ::

Definition at line 73 of file CvsEntries.cpp.

Referenced by CMMenuString::GetData(), GetDateTime(), CMultilineEntryDlg::OnSelchangeCombo(), CMPString::rtCMPString(), and CMMenuString::SizeOf().

#define NEW new

Definition at line 66 of file CvsEntries.cpp.

#define STR_ENCODING_BINARY _i18n("Binary")

Definition at line 81 of file CvsEntries.cpp.

Referenced by SetEncoding().

#define STR_ENCODING_TEXT _i18n("Text")

Definition at line 80 of file CvsEntries.cpp.

Referenced by SetEncoding().

#define STR_ENCODING_UNICODE _i18n("Unicode")

Definition at line 82 of file CvsEntries.cpp.

Referenced by SetEncoding().

#define STR_STATE_CONFLICT _i18n("Conflict")

Definition at line 86 of file CvsEntries.cpp.

Referenced by Entries_SetVisited().

#define STR_STATE_IGNORED _i18n("Ignored")

Definition at line 84 of file CvsEntries.cpp.

Referenced by Entries_SetVisited().

#define STR_STATE_MISSING _i18n("Missing")

Definition at line 90 of file CvsEntries.cpp.

Referenced by Entries_SetMissing().

#define STR_STATE_MODIFIED _i18n("Modified")

Definition at line 88 of file CvsEntries.cpp.

Referenced by Entries_SetVisited().

#define STR_STATE_REMOVED _i18n("Removed")

Definition at line 89 of file CvsEntries.cpp.

Referenced by Entries_SetMissing(), and Entries_SetVisited().

#define STR_STATE_RESOLVED _i18n("Resolved")

Definition at line 87 of file CvsEntries.cpp.

Referenced by Entries_SetVisited().

#define STR_STATE_UNKNOWN _i18n("Unknown")

Definition at line 85 of file CvsEntries.cpp.

Referenced by Entries_SetVisited().

Function Documentation

const char* CloneStr ( const char * cp ) [static]

Clone the string

Parameters:
cp String to be cloned
Returns:
Pointer to the cloned string
Note:
You must release memory allocated for the string
Definition at line 157 of file CvsEntries.cpp.

References NULL, and strdup().

Referenced by EntnodeData::EntnodeData(), EntnodeFile::EntnodeFile(), EntnodePath::EntnodePath(), and EntnodeFile::GetRelativePath().

00158 {
00159     if( cp && *cp )
00160     {
00161         cp = strdup(cp);
00162         if( !cp )
00163         {
00164             throw std::bad_alloc();
00165         }
00166     }
00167     else
00168     {
00169         cp = NULL;
00170     }
00171
00172     return cp;
00173 }

Here is the call graph for this function:

void DisposeStr ( const char * cp ) [static]

Dispose cloned string

Parameters:
cp Pointer to the cloned string to be released
Definition at line 179 of file CvsEntries.cpp.

References free.

Referenced by EntnodeFile::GetRelativePath(), EntnodeData::~EntnodeData(), EntnodeFile::~EntnodeFile(), and EntnodePath::~EntnodePath().

00180 {
00181     if( cp )
00182     {
00183         free((void*)cp);
00184     }
00185 }

bool Entries_Open | ( | CSortList< ENTNODE > & | entries,
 |  | const char * | fullpath
 | ) |

Read the entries file into a list, hashing on the file name

Parameters:
entries | Return file list
fullpath | Path to read files from
Returns:
true on success, false otherwise
Note:
UPDATE_DIR is the name of the current directory, for use in error messages, or NULL if not known (that is, no-one has gotten around to updating the caller to pass in the information)
Definition at line 633 of file CvsEntries.cpp.

References cvs_err(), CSortList< T >::Delete(), UStr::endsWith(), GetNextEntriesLine(), CSortList< T >::InsideAndInsert(), NULL, CSortList< T >::Reset(), and EntnodeData::UnRef().

Referenced by CFillPyEntries::EnterDirectory(), CFillTclEntries::EnterDirectory(), TViewFill::EnterDirectory(), TBrowserFill::EnterDirectory(), CGraphDoc::SetNode(), and UCvsGraph::UCvsGraph().

00634 {
00635     EntnodeData* ent;
00636
00637     UStr adminPath(fullpath);
00638     if( !adminPath.endsWith(kPathDelimiter) )
00639         adminPath << kPathDelimiter;
00640
00641     adminPath << "CVS";
00642     adminPath << kPathDelimiter;
00643
00644     entries.Reset();
00645
00646     UStr filename = adminPath;
00647     filename << "Entries";
00648
00649     FILE* fpin = fopen(filename, "r");
00650     if( fpin == NULL )
00651         return false;
00652
00653     while( (ent = GetNextEntriesLine(fpin, fullpath)) != NULL )
00654     {
00655         ENTNODE newnode(ent);
00656         ent->UnRef();
00657
00658         if( entries.InsideAndInsert(newnode) )
00659         {
00660             cvs_err("Warning : duplicated entry in the 'CVS/Entries' file in directory '%s'\n", fullpath);
00661         }
00662     }
00663
00664     fclose(fpin);
00665
00666     filename = adminPath;
00667     filename << "Entries.log";
00668
00669     fpin = fopen(filename, "r");
00670     if( fpin != NULL )
00671     {
00672         char cmd;
00673
00674         while( (ent = GetNextEntriesLine(fpin, &cmd)) != NULL )
00675         {
00676             ENTNODE newnode(ent);
00677             ent->UnRef();
00678
00679             switch (cmd)
00680             {
00681             case 'A':
00682                 if(entries.InsideAndInsert(newnode))
00683                 {
00684                     // Don't care
00685                 }
00686                 break;
00687             case 'R':
00688                 entries.Delete(newnode);
00689                 break;
00690             default:
00691                 /* Ignore unrecognized commands */
00692                 break;
00693             }
00694         }
00695
00696         fclose(fpin);
00697     }
00698
00699     return true;
00700 }

Here is the call graph for this function:

void Entries_SetMissing ( CSortList< ENTNODE > & entries )

Mark the missing entries

Parameters:
entries Entries list
Returns:
true on success, false otherwise
Note:
Called after the traversal marks the entries that didn't have "Entries_SetVisited" call associated
Definition at line 939 of file CvsEntries.cpp.

References ENTNODE::Data(), CSortList< T >::Get(), EntnodeData::IsRemoved(), EntnodeData::IsVisited(), CSortList< T >::NumOfElements(), SetEncoding(), EntnodeData::SetMissing(), EntnodeData::SetState(), STR_STATE_MISSING, and STR_STATE_REMOVED.

Referenced by cvsgui_GetCvsEntries(), TViewFill::ExitDirectory(), CWinCvsBrowser::OnItemexpanding(), UCvsFolders::OnTreeExpanding(), UCvsFiles::ResetView(), and tclCvsEntriesProc().

00940 {
00941     int numEntries = entries.NumOfElements();
00942     for(int i = 0; i < numEntries; i++)
00943     {
00944         const ENTNODE& theNode = entries.Get(i);
00945         EntnodeData* data = theNode.Data();
00946
00947         if( data->IsVisited() )
00948             continue;
00949
00950         data->SetMissing(true);
00951         data->SetState(data->IsRemoved() ? STR_STATE_REMOVED : STR_STATE_MISSING);
00952
00953         SetEncoding(dynamic_cast<EntnodeFile*>(data));
00954     }
00955 }

Here is the call graph for this function:

EntnodeData* Entries_SetVisited | ( | const char * | path,
 |  | CSortList< ENTNODE > & | entries,
 |  | const char * | name,
 |  | const struct stat & | finfo,
 |  | bool | isFolder,
 |  | const std::vector< UStr > * | ignlist
 | ) |

Fill an ENTNODE when the file appears on the disk

Parameters:
path | Path
entries | Entries list
name | Filename
finfo | File stat info
isFolder | true for folder, false otherwise
ignlist | Ignore list
Returns:
The reference to the node
Note:
It sets some flags like "visited", "unknown", "ignored" etc.
Definition at line 779 of file CvsEntries.cpp.

References CStr, cvs_err(), ENTNODE::Data(), CSortList< T >::Get(), CSortList< T >::InsideAndInsert(), EntnodeData::IsIgnored(), EntnodeData::IsUnknown(), MatchIgnoredList(), NEW, NULL, SetEncoding(), EntnodeData::SetIgnored(), EntnodeData::SetState(), EntnodeData::SetUnknown(), EntnodeData::SetVisited(), stat::st_mode, stat::st_mtime, stat, STR_STATE_CONFLICT, STR_STATE_IGNORED, STR_STATE_MODIFIED, STR_STATE_REMOVED, STR_STATE_RESOLVED, STR_STATE_UNKNOWN, EntnodeData::UnRef(), EntnodePath::UnRef(), and VerifyUnmodified().

Referenced by IsCvsDirectory(), CFillPyEntries::OnDirectory(), CFillTclEntries::OnDirectory(), TViewFill::OnDirectory(), TBrowserFill::OnDirectory(), CFillPyEntries::OnFile(), CFillTclEntries::OnFile(), TViewFill::OnFile(), CHistComboBoxEx::SetIcon(), CGraphDoc::SetNode(), and UCvsGraph::UCvsGraph().

00781 {
00782     int index;
00783     bool isCvs = false;
00784
00785     EntnodePath* thePath = new EntnodePath(path);
00786
00787     if( isFolder )
00788     {
00789         EntnodeFolder* data = NEW EntnodeFolder(name, thePath);
00790         ENTNODE node(data);
00791         data->UnRef();
00792         isCvs = entries.InsideAndInsert(node, &index);
00793     }
00794     else
00795     {
00796         EntnodeFile* data = NEW EntnodeFile(name, thePath);
00797         ENTNODE node(data);
00798
00799         data->UnRef();
00800         isCvs = entries.InsideAndInsert(node, &index);
00801     }
00802
00803     thePath->UnRef();
00804
00805     const ENTNODE& theNode = entries.Get(index);
00806     EntnodeData* data = theNode.Data();
00807
00808     data->SetVisited(true);
00809
00810     if( !isCvs )
00811     {
00812         data->SetUnknown(true);
00813
00814         if( ignlist != NULL && MatchIgnoredList(name, *ignlist) )
00815             data->SetIgnored(true);
00816
00817         // The folder may have some cvs informations in it, despite the fact
00818         // that it is not referenced by the parent directory, so try to figure it out
00819
00820         if( !data->IsIgnored() )
00821         {
00822             CStr cvsFile(path);
00823             if( !cvsFile.endsWith(kPathDelimiter) )
00824                 cvsFile << kPathDelimiter;
00825
00826             cvsFile << name;
00827             if( !cvsFile.endsWith(kPathDelimiter) )
00828                 cvsFile << kPathDelimiter;
00829
00830             cvsFile << "CVS";
00831             struct stat sb;
00832             if( stat(cvsFile, &sb) != -1 && S_ISDIR(sb.st_mode) )
00833             {
00834                 data->SetUnknown(false);
00835             }
00836         }
00837     }
00838
00839     if( isFolder )
00840     {
00841         if( data->IsIgnored() )
00842         {
00843             data->SetState(STR_STATE_IGNORED);
00844         }
00845         else if( data->IsUnknown() )
00846         {
00847             data->SetState(STR_STATE_UNKNOWN);
00848         }
00849         else
00850         {
00851             data->SetState("");
00852         }
00853     }
00854     else
00855     {
00856         const char* ts = (*data)[EntnodeFile::kTS];
00857         if( ts == NULL )
00858         {
00859             data->SetUnmodified(true);
00860             data->SetResolved(false);
00861         }
00862         else
00863         {
00864             data->SetUnmodified(VerifyUnmodified(finfo, ts));
00865
00866             if( data->GetConflict() != NULL )
00867             {
00868                 data->SetResolved(!VerifyUnmodified(finfo, data->GetConflict()));
00869             }
00870         }
00871
00872 #if defined(WIN32)
00873 #   if ENABLE_WINCVSDEBUG
00874         if( GetWinCvsDebugMaskBit(wcvsdbg_trace_modified_checks_bit) )
00875         {
00876             char scratch[128];
00877
00878             /* copied from VerifyUnmodified... */
00879             char* cp;
00880             struct tm* tm_p;
00881             struct tm local_tm;
00882             tm_p = gmtime(&finfo.st_mtime);
00883             if( tm_p )
00884             {
00885                 memcpy(&local_tm, tm_p, sizeof(local_tm));
00886                 cp = asctime(&local_tm);    /* copy in the modify time */
00887             }
00888             else
00889             {
00890                 cp = "NULL";
00891             }
00892
00893             _snprintf(scratch, 128,
00894                 "Checking timestamps for %s: Entries: %s, file: %s --> %s\n",
00895                 name, ts, cp,
00896                 data->IsUnmodified() ? "unmodified" : "modified");
00897
00898             cvs_err(scratch);
00899             OutputDebugString(scratch);
00900         }
00901 #   endif   // ENABLE_WINCVSDEBUG
00902 #endif
00903
00904         data->SetLocked((finfo.st_mode & S_IWRITE) == 0);
00905
00906         if( data->IsRemoved() )
00907         {
00908             data->SetState(STR_STATE_REMOVED);
00909         }
00910         else if( data->IsIgnored() )
00911         {
00912             data->SetState(STR_STATE_IGNORED);
00913         }
00914         else if( data->IsUnknown() )
00915         {
00916             data->SetState(STR_STATE_UNKNOWN);
00917         }
00918         else if( data->GetConflict() != NULL )
00919         {
00920             data->SetState(data->IsResolved() ? STR_STATE_RESOLVED : STR_STATE_CONFLICT);
00921         }
00922         else if( !data->IsUnmodified() )
00923         {
00924             data->SetState(STR_STATE_MODIFIED);
00925         }
00926
00927         SetEncoding(dynamic_cast<EntnodeFile*>(data));
00928     }
00929
00930     return data;
00931 }

Here is the call graph for this function:

char* FindExtension ( const char * name ) [static]

Find the extention in the filename

Parameters:
name File name
Returns:
The pointer to the extension, NULL if not found
Note:
Folders and filenames starting with dot are not considered to have extensions
Definition at line 193 of file CvsEntries.cpp.

References NULL.

Referenced by EntnodeFile::EntnodeFile().

00194 {
00195     // Look for the last occurrence of '.'
00196     char* ptr = strrchr(name, '.');
00197
00198     // If Entry is a subfolder, there is no extension
00199     // If '.' is the first char, there is also no extension
00200     if( ptr == name )
00201     {
00202         ptr = NULL;
00203     }
00204
00205     // Ignore '.'
00206     if( ptr )
00207     {
00208         ++ptr;
00209     }
00210
00211     return ptr;
00212 }

time_t GetDateTime ( const char * strTime )

Extract the date-time information from the string

Parameters:
strTime Date-time string as returned by asctime function (CVS/Entries file format)
Returns:
The date-time as time_t value or (time_t)-1 as returned by mktime
Definition at line 100 of file CvsEntries.cpp.

References gStrMonths, and NAMESPACE.

Referenced by KoDateColumn::Compare(), and CItemListDlg::CompareItems().

00101 {
00102     struct tm tmTime = { 0 };
00103
00104     NAMESPACE(std) string stringTime = strTime;
00105
00106     if( stringTime.empty() )
00107     {
00108         return -1;
00109     }
00110
00111     // Replace the time separator with spaces to help with parsing
00112     replace(stringTime.begin(), stringTime.end(), ':', ' ');
00113
00114     // Parse
00115     NAMESPACE(std) stringstream parser;
00116     parser << stringTime;
00117
00118     NAMESPACE(std) string strDay;
00119     NAMESPACE(std) string strMonth;
00120
00121     parser >> strDay;
00122     parser >> strMonth;
00123     {
00124         // Find out the month
00125         tmTime.tm_mon = -1;
00126         NAMESPACE(std) string* month = find(gStrMonths, gStrMonths + 12, strMonth);
00127
00128         if( month != gStrMonths + 12 )
00129         {
00130             tmTime.tm_mon = month - gStrMonths;
00131         }
00132         else
00133         {
00134             return (time_t)(-1);
00135         }
00136     }
00137
00138     parser >> tmTime.tm_mday;
00139     parser >> tmTime.tm_hour;
00140     parser >> tmTime.tm_min;
00141     parser >> tmTime.tm_sec;
00142
00143     parser >> tmTime.tm_year;
00144     tmTime.tm_year -= 1900;
00145
00146     tmTime.tm_isdst = -1;
00147
00148     return mktime(&tmTime);
00149 }

EntnodeData* GetNextEntriesLine | ( | FILE * | fpin,
 |  | const char * | path,
 |  | char * | cmd = NULL
 | ) | [static]

Get the next real Entries line

Parameters:
fpin | File
path | Path
cmd | Command
Returns:
The next real Entries line or NULL on end of file
Note:
On error, prints an error message and returns NULL
Definition at line 511 of file CvsEntries.cpp.

References cvs_err(), ENT_FILE, ENT_SUBDIR, ent_type, free, getline(), NEW, NULL, and EntnodePath::UnRef().

Referenced by Entries_Open().

00512 {
00513     EntnodeData* ent;
00514     char* line = NULL;
00515     size_t line_chars_allocated = 0;
00516     register char* cp;
00517     ent_type type;
00518     char* l, *user, *vn, *ts, *option;
00519     char* tag_or_date, *tag, *date, *ts_conflict;
00520     int line_length;
00521
00522     EntnodePath* thePath = new EntnodePath(path);
00523
00524     ent = NULL;
00525     while( (line_length = getline(&line, &line_chars_allocated, fpin)) > 0 )
00526     {
00527         l = line;
00528
00529         /* If CMD is not NULL, we are reading an Entries.Log file.
00530         Each line in the Entries.Log file starts with a single
00531         character command followed by a space.  For backward
00532         compatibility, the absence of a space indicates an add
00533         command.  */
00534         if( cmd != NULL )
00535         {
00536             if( l[1] != ' ' )
00537                 *cmd = 'A';
00538             else
00539             {
00540                 *cmd = l[0];
00541                 l += 2;
00542             }
00543         }
00544
00545         type = ENT_FILE;
00546
00547         if( l[0] == 'D' )
00548         {
00549             type = ENT_SUBDIR;
00550             ++l;
00551             /* An empty D line is permitted; it is a signal that this
00552             Entries file lists all known subdirectories.  */
00553         }
00554
00555         if( l[0] != '/' )
00556             continue;
00557
00558         user = l + 1;
00559         if( (cp = strchr(user, '/')) == NULL )
00560             continue;
00561
00562         *cp++ = '\0';
00563         vn = cp;
00564         if( (cp = strchr(vn, '/')) == NULL )
00565             continue;
00566
00567         *cp++ = '\0';
00568         ts = cp;
00569         if( (cp = strchr(ts, '/')) == NULL )
00570             continue;
00571
00572         *cp++ = '\0';
00573         option = cp;
00574         if( (cp = strchr(option, '/')) == NULL )
00575             continue;
00576
00577         *cp++ = '\0';
00578         tag_or_date = cp;
00579
00580         if( (cp = strchr(tag_or_date, '\n')) == NULL
00581 #ifdef TARGET_OS_MAC
00582             && (cp = strchr(tag_or_date, '\r')) == NULL
00583 #endif
00584         )
00585             continue;
00586
00587         *cp = '\0';
00588         tag = (char*)NULL;
00589         date = (char*)NULL;
00590
00591         if( *tag_or_date == 'T' )
00592             tag = tag_or_date + 1;
00593         else if( *tag_or_date == 'D' )
00594             date = tag_or_date + 1;
00595
00596         if( (ts_conflict = strchr(ts, '+')) )
00597             *ts_conflict++ = '\0';
00598
00599         if( user && strlen(user) )
00600         {
00601             if( type == ENT_SUBDIR )
00602                 ent = NEW EntnodeFolder(user, thePath);
00603             else
00604                 ent = NEW EntnodeFile(user, thePath, vn, ts, option, tag, date, ts_conflict);
00605         }
00606         else
00607         {
00608             continue;
00609         }
00610
00611         break;
00612     }
00613
00614     if( line_length < 0 && !feof(fpin) )
00615         cvs_err("Cannot read entries file (error %d)\n", errno);
00616
00617     free(line);
00618
00619     thePath->UnRef();
00620
00621     return ent;
00622 }

Here is the call graph for this function:

void SetEncoding ( EntnodeFile * data ) [static]

Set the file encoding description

Parameters:
data File node data
Definition at line 748 of file CvsEntries.cpp.

References NULL, STR_ENCODING_BINARY, STR_ENCODING_TEXT, and STR_ENCODING_UNICODE.

Referenced by Entries_SetMissing(), and Entries_SetVisited().

00749 {
00750     if( data )
00751     {
00752         const char* info = (*data)[EntnodeFile::kOption];
00753         if( info != NULL && (strcmp(info, "-kb") == 0 || strcmp(info, "-kB") == 0) )
00754         {
00755             ((EntnodeFile*)data)->SetEncoding(STR_ENCODING_BINARY);
00756         }
00757         else if( info != NULL && strcmp(info, "-ku") == 0 )
00758         {
00759             ((EntnodeFile*)data)->SetEncoding(STR_ENCODING_UNICODE);
00760         }
00761         else
00762         {
00763             ((EntnodeFile*)data)->SetEncoding(STR_ENCODING_TEXT);
00764         }
00765     }
00766 }

bool Tag_Open | ( | UStr & | tag,
 |  | const char * | fullpath
 | ) |

Read the tag file

Parameters:
tag | Return tag
fullpath | Path
Returns:
false if no CVS/Tag, true otherwise
Definition at line 963 of file CvsEntries.cpp.

References CStr, cvs_err(), free, getline(), and NULL.

Referenced by TViewFill::OnDirectory().

00964 {
00965     tag = "";
00966     CStr tagFile(fullpath);
00967     if( !tagFile.endsWith(kPathDelimiter) )
00968         tagFile << kPathDelimiter;
00969
00970     tagFile << "Tag";
00971
00972     FILE* fpin = fopen(tagFile, "r");
00973     if( fpin == NULL )
00974         return false;
00975
00976     char* line = NULL;
00977     size_t line_chars_allocated = 0;
00978     int line_length;
00979     if( (line_length = getline(&line, &line_chars_allocated, fpin)) > 0 )
00980     {
00981         char* tmp = strchr(line, '\n');
00982         if( tmp != NULL )
00983             *tmp = '\0';
00984
00985         if( line[0] == 'T' )
00986             tag = line + 1;
00987     }
00988
00989     if( line != NULL )
00990         free(line);
00991
00992     if( line_length < 0 && !feof(fpin) )
00993     {
00994         cvs_err("Cannot open Tag file in '%s' (error %d)\n", fullpath, errno);
00995         return false;
00996     }
00997
00998     fclose(fpin);
00999
01000     return !tag.empty();
01001 }

Here is the call graph for this function:

bool VerifyUnmodified | ( | const struct stat & | sb,
 |  | const char * | ts
 | ) | [static]

Verify that file is not modified

Parameters:
sb | Stat information
ts | Timestamp
Returns:
true if file is unmodified, false otherwise
Note:
Contains the work-around for DST bug
Definition at line 709 of file CvsEntries.cpp.

References stat::st_mtime.

Referenced by Entries_SetVisited().

00710 {
00711     char* cp;
00712     struct tm* tm_p;
00713     struct tm local_tm;
00714
00715     /* We want to use the same timestamp format as is stored in the
00716     st_mtime.  For unix (and NT I think) this *must* be universal
00717     time (UT), so that files don't appear to be modified merely
00718     because the timezone has changed.  For VMS, or hopefully other
00719     systems where gmtime returns NULL, the modification time is
00720     stored in local time, and therefore it is not possible to cause
00721     st_mtime to be out of sync by changing the timezone.  */
00722
00723     tm_p = gmtime(&sb.st_mtime);
00724     if( tm_p )
00725     {
00726         memcpy(&local_tm, tm_p, sizeof (local_tm));
00727         cp = asctime(&local_tm);    /* copy in the modify time */
00728     }
00729     else
00730         cp = ctime(&sb.st_mtime);
00731
00732     cp[24] = 0;
00733
00734     /* Deal with the differences in timestamps - POSIX uses space filled, NT uses zero filled */
00735     if( cp[8]=='0' && ts[8]==' ' )
00736         cp[8]=' ';
00737
00738     if( cp[8]==' ' && ts[8]=='0' )
00739         cp[8]='0';
00740
00741     return strcmp(cp, ts) == 0;
00742 }

Variable Documentation

:: string gStrMonths[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}

Months table used to parse the date string.

Definition at line 78 of file CvsEntries.cpp.

Referenced by GetDateTime().

Generated on Sat Aug 7 22:44:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsEntries.h File Reference

common/CvsEntries.h File Reference

#include "SortList.h"
#include "CvsIgnore.h"
#include "cvsgui_i18n.h"
#include "CvsPrefs.h"

Include dependency graph for CvsEntries.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | ColumnIndex
Column index class. More...
class | EntnodePath
class | EntnodeData
class | EntnodeFile
class | EntnodeFolder
class | ENTNODE
Allow reference of a file or a folder node. More...

Enumerations

enum ent_type {
ENT_FILE,
ENT_SUBDIR
}
Entry type enum. More...

Functions

time_t | GetDateTime (const char *strTime)
bool | Entries_Open (CSortList< ENTNODE > &entries, const char *fullpath)
EntnodeData * | Entries_SetVisited (const char *path, CSortList< ENTNODE > &entries, const char *name, const struct stat &finfo, bool isFolder, const std::vector< UStr > *ignlist=NULL)
void | Entries_SetMissing (CSortList< ENTNODE > &entries)
bool | Tag_Open (UStr &tag, const char *fullpath)

Enumeration Type Documentation

enum ent_type

Entry type enum.

Enumeration values:
ENT_FILE | File entry
ENT_SUBDIR | Directory entry
Definition at line 43 of file CvsEntries.h.

Referenced by GetNextEntriesLine(), EntnodeFolder::GetType(), and EntnodeFile::GetType().

00044 {
00045     ENT_FILE,
00046     ENT_SUBDIR
00047 } ent_type;

Function Documentation

bool Entries_Open | ( | CSortList< ENTNODE > & | entries,
 |  | const char * | fullpath
 | ) |

Read the entries file into a list, hashing on the file name

Parameters:
entries | Return file list
fullpath | Path to read files from
Returns:
true on success, false otherwise
Note:
UPDATE_DIR is the name of the current directory, for use in error messages, or NULL if not known (that is, no-one has gotten around to updating the caller to pass in the information)
Definition at line 633 of file CvsEntries.cpp.

References cvs_err(), CSortList< T >::Delete(), UStr::endsWith(), GetNextEntriesLine(), CSortList< T >::InsideAndInsert(), NULL, CSortList< T >::Reset(), and EntnodeData::UnRef().

Referenced by TBrowserFill::EnterDirectory(), TViewFill::EnterDirectory(), CFillTclEntries::EnterDirectory(), CFillPyEntries::EnterDirectory(), CGraphDoc::SetNode(), and UCvsGraph::UCvsGraph().

00634 {
00635     EntnodeData* ent;
00636
00637     UStr adminPath(fullpath);
00638     if( !adminPath.endsWith(kPathDelimiter) )
00639         adminPath << kPathDelimiter;
00640
00641     adminPath << "CVS";
00642     adminPath << kPathDelimiter;
00643
00644     entries.Reset();
00645
00646     UStr filename = adminPath;
00647     filename << "Entries";
00648
00649     FILE* fpin = fopen(filename, "r");
00650     if( fpin == NULL )
00651         return false;
00652
00653     while( (ent = GetNextEntriesLine(fpin, fullpath)) != NULL )
00654     {
00655         ENTNODE newnode(ent);
00656         ent->UnRef();
00657
00658         if( entries.InsideAndInsert(newnode) )
00659         {
00660             cvs_err("Warning : duplicated entry in the 'CVS/Entries' file in directory '%s'\n", fullpath);
00661         }
00662     }
00663
00664     fclose(fpin);
00665
00666     filename = adminPath;
00667     filename << "Entries.log";
00668
00669     fpin = fopen(filename, "r");
00670     if( fpin != NULL )
00671     {
00672         char cmd;
00673
00674         while( (ent = GetNextEntriesLine(fpin, &cmd)) != NULL )
00675         {
00676             ENTNODE newnode(ent);
00677             ent->UnRef();
00678
00679             switch (cmd)
00680             {
00681             case 'A':
00682                 if(entries.InsideAndInsert(newnode))
00683                 {
00684                     // Don't care
00685                 }
00686                 break;
00687             case 'R':
00688                 entries.Delete(newnode);
00689                 break;
00690             default:
00691                 /* Ignore unrecognized commands */
00692                 break;
00693             }
00694         }
00695
00696         fclose(fpin);
00697     }
00698
00699     return true;
00700 }

Here is the call graph for this function:

void Entries_SetMissing ( CSortList< ENTNODE > & entries )

Mark the missing entries

Parameters:
entries Entries list
Returns:
true on success, false otherwise
Note:
Called after the traversal marks the entries that didn't have "Entries_SetVisited" call associated
Definition at line 939 of file CvsEntries.cpp.

References ENTNODE::Data(), CSortList< T >::Get(), EntnodeData::IsRemoved(), EntnodeData::IsVisited(), CSortList< T >::NumOfElements(), SetEncoding(), EntnodeData::SetMissing(), EntnodeData::SetState(), STR_STATE_MISSING, and STR_STATE_REMOVED.

Referenced by cvsgui_GetCvsEntries(), TViewFill::ExitDirectory(), CWinCvsBrowser::OnItemexpanding(), UCvsFolders::OnTreeExpanding(), UCvsFiles::ResetView(), and tclCvsEntriesProc().

00940 {
00941     int numEntries = entries.NumOfElements();
00942     for(int i = 0; i < numEntries; i++)
00943     {
00944         const ENTNODE& theNode = entries.Get(i);
00945         EntnodeData* data = theNode.Data();
00946
00947         if( data->IsVisited() )
00948             continue;
00949
00950         data->SetMissing(true);
00951         data->SetState(data->IsRemoved() ? STR_STATE_REMOVED : STR_STATE_MISSING);
00952
00953         SetEncoding(dynamic_cast<EntnodeFile*>(data));
00954     }
00955 }

Here is the call graph for this function:

EntnodeData* Entries_SetVisited | ( | const char * | path,
 |  | CSortList< ENTNODE > & | entries,
 |  | const char * | name,
 |  | const struct stat & | finfo,
 |  | bool | isFolder,
 |  | const std::vector< UStr > * | ignlist
 | ) |

Fill an ENTNODE when the file appears on the disk

Parameters:
path | Path
entries | Entries list
name | Filename
finfo | File stat info
isFolder | true for folder, false otherwise
ignlist | Ignore list
Returns:
The reference to the node
Note:
It sets some flags like "visited", "unknown", "ignored" etc.
Definition at line 779 of file CvsEntries.cpp.

References CStr, cvs_err(), ENTNODE::Data(), CSortList< T >::Get(), CSortList< T >::InsideAndInsert(), EntnodeData::IsIgnored(), EntnodeData::IsUnknown(), MatchIgnoredList(), NEW, NULL, SetEncoding(), EntnodeData::SetIgnored(), EntnodeData::SetState(), EntnodeData::SetUnknown(), EntnodeData::SetVisited(), stat::st_mode, stat::st_mtime, stat, STR_STATE_CONFLICT, STR_STATE_IGNORED, STR_STATE_MODIFIED, STR_STATE_REMOVED, STR_STATE_RESOLVED, STR_STATE_UNKNOWN, EntnodePath::UnRef(), EntnodeData::UnRef(), and VerifyUnmodified().

Referenced by IsCvsDirectory(), TBrowserFill::OnDirectory(), TViewFill::OnDirectory(), CFillTclEntries::OnDirectory(), CFillPyEntries::OnDirectory(), TViewFill::OnFile(), CFillTclEntries::OnFile(), CFillPyEntries::OnFile(), CHistComboBoxEx::SetIcon(), CGraphDoc::SetNode(), and UCvsGraph::UCvsGraph().

00781 {
00782     int index;
00783     bool isCvs = false;
00784
00785     EntnodePath* thePath = new EntnodePath(path);
00786
00787     if( isFolder )
00788     {
00789         EntnodeFolder* data = NEW EntnodeFolder(name, thePath);
00790         ENTNODE node(data);
00791         data->UnRef();
00792         isCvs = entries.InsideAndInsert(node, &index);
00793     }
00794     else
00795     {
00796         EntnodeFile* data = NEW EntnodeFile(name, thePath);
00797         ENTNODE node(data);
00798
00799         data->UnRef();
00800         isCvs = entries.InsideAndInsert(node, &index);
00801     }
00802
00803     thePath->UnRef();
00804
00805     const ENTNODE& theNode = entries.Get(index);
00806     EntnodeData* data = theNode.Data();
00807
00808     data->SetVisited(true);
00809
00810     if( !isCvs )
00811     {
00812         data->SetUnknown(true);
00813
00814         if( ignlist != NULL && MatchIgnoredList(name, *ignlist) )
00815             data->SetIgnored(true);
00816
00817         // The folder may have some cvs informations in it, despite the fact
00818         // that it is not referenced by the parent directory, so try to figure it out
00819
00820         if( !data->IsIgnored() )
00821         {
00822             CStr cvsFile(path);
00823             if( !cvsFile.endsWith(kPathDelimiter) )
00824                 cvsFile << kPathDelimiter;
00825
00826             cvsFile << name;
00827             if( !cvsFile.endsWith(kPathDelimiter) )
00828                 cvsFile << kPathDelimiter;
00829
00830             cvsFile << "CVS";
00831             struct stat sb;
00832             if( stat(cvsFile, &sb) != -1 && S_ISDIR(sb.st_mode) )
00833             {
00834                 data->SetUnknown(false);
00835             }
00836         }
00837     }
00838
00839     if( isFolder )
00840     {
00841         if( data->IsIgnored() )
00842         {
00843             data->SetState(STR_STATE_IGNORED);
00844         }
00845         else if( data->IsUnknown() )
00846         {
00847             data->SetState(STR_STATE_UNKNOWN);
00848         }
00849         else
00850         {
00851             data->SetState("");
00852         }
00853     }
00854     else
00855     {
00856         const char* ts = (*data)[EntnodeFile::kTS];
00857         if( ts == NULL )
00858         {
00859             data->SetUnmodified(true);
00860             data->SetResolved(false);
00861         }
00862         else
00863         {
00864             data->SetUnmodified(VerifyUnmodified(finfo, ts));
00865
00866             if( data->GetConflict() != NULL )
00867             {
00868                 data->SetResolved(!VerifyUnmodified(finfo, data->GetConflict()));
00869             }
00870         }
00871
00872 #if defined(WIN32)
00873 #   if ENABLE_WINCVSDEBUG
00874         if( GetWinCvsDebugMaskBit(wcvsdbg_trace_modified_checks_bit) )
00875         {
00876             char scratch[128];
00877
00878             /* copied from VerifyUnmodified... */
00879             char* cp;
00880             struct tm* tm_p;
00881             struct tm local_tm;
00882             tm_p = gmtime(&finfo.st_mtime);
00883             if( tm_p )
00884             {
00885                 memcpy(&local_tm, tm_p, sizeof(local_tm));
00886                 cp = asctime(&local_tm);    /* copy in the modify time */
00887             }
00888             else
00889             {
00890                 cp = "NULL";
00891             }
00892
00893             _snprintf(scratch, 128,
00894                 "Checking timestamps for %s: Entries: %s, file: %s --> %s\n",
00895                 name, ts, cp,
00896                 data->IsUnmodified() ? "unmodified" : "modified");
00897
00898             cvs_err(scratch);
00899             OutputDebugString(scratch);
00900         }
00901 #   endif   // ENABLE_WINCVSDEBUG
00902 #endif
00903
00904         data->SetLocked((finfo.st_mode & S_IWRITE) == 0);
00905
00906         if( data->IsRemoved() )
00907         {
00908             data->SetState(STR_STATE_REMOVED);
00909         }
00910         else if( data->IsIgnored() )
00911         {
00912             data->SetState(STR_STATE_IGNORED);
00913         }
00914         else if( data->IsUnknown() )
00915         {
00916             data->SetState(STR_STATE_UNKNOWN);
00917         }
00918         else if( data->GetConflict() != NULL )
00919         {
00920             data->SetState(data->IsResolved() ? STR_STATE_RESOLVED : STR_STATE_CONFLICT);
00921         }
00922         else if( !data->IsUnmodified() )
00923         {
00924             data->SetState(STR_STATE_MODIFIED);
00925         }
00926
00927         SetEncoding(dynamic_cast<EntnodeFile*>(data));
00928     }
00929
00930     return data;
00931 }

Here is the call graph for this function:

time_t GetDateTime ( const char * strTime )

Extract the date-time information from the string

Parameters:
strTime Date-time string as returned by asctime function (CVS/Entries file format)
Returns:
The date-time as time_t value or (time_t)-1 as returned by mktime
Definition at line 100 of file CvsEntries.cpp.

References gStrMonths, and NAMESPACE.

Referenced by KoDateColumn::Compare(), and CItemListDlg::CompareItems().

00101 {
00102     struct tm tmTime = { 0 };
00103
00104     NAMESPACE(std) string stringTime = strTime;
00105
00106     if( stringTime.empty() )
00107     {
00108         return -1;
00109     }
00110
00111     // Replace the time separator with spaces to help with parsing
00112     replace(stringTime.begin(), stringTime.end(), ':', ' ');
00113
00114     // Parse
00115     NAMESPACE(std) stringstream parser;
00116     parser << stringTime;
00117
00118     NAMESPACE(std) string strDay;
00119     NAMESPACE(std) string strMonth;
00120
00121     parser >> strDay;
00122     parser >> strMonth;
00123     {
00124         // Find out the month
00125         tmTime.tm_mon = -1;
00126         NAMESPACE(std) string* month = find(gStrMonths, gStrMonths + 12, strMonth);
00127
00128         if( month != gStrMonths + 12 )
00129         {
00130             tmTime.tm_mon = month - gStrMonths;
00131         }
00132         else
00133         {
00134             return (time_t)(-1);
00135         }
00136     }
00137
00138     parser >> tmTime.tm_mday;
00139     parser >> tmTime.tm_hour;
00140     parser >> tmTime.tm_min;
00141     parser >> tmTime.tm_sec;
00142
00143     parser >> tmTime.tm_year;
00144     tmTime.tm_year -= 1900;
00145
00146     tmTime.tm_isdst = -1;
00147
00148     return mktime(&tmTime);
00149 }

bool Tag_Open | ( | UStr & | tag,
 |  | const char * | fullpath
 | ) |

Read the tag file

Parameters:
tag | Return tag
fullpath | Path
Returns:
false if no CVS/Tag, true otherwise
Definition at line 963 of file CvsEntries.cpp.

References CStr, cvs_err(), free, getline(), and NULL.

Referenced by TViewFill::OnDirectory().

00964 {
00965     tag = "";
00966     CStr tagFile(fullpath);
00967     if( !tagFile.endsWith(kPathDelimiter) )
00968         tagFile << kPathDelimiter;
00969
00970     tagFile << "Tag";
00971
00972     FILE* fpin = fopen(tagFile, "r");
00973     if( fpin == NULL )
00974         return false;
00975
00976     char* line = NULL;
00977     size_t line_chars_allocated = 0;
00978     int line_length;
00979     if( (line_length = getline(&line, &line_chars_allocated, fpin)) > 0 )
00980     {
00981         char* tmp = strchr(line, '\n');
00982         if( tmp != NULL )
00983             *tmp = '\0';
00984
00985         if( line[0] == 'T' )
00986             tag = line + 1;
00987     }
00988
00989     if( line != NULL )
00990         free(line);
00991
00992     if( line_length < 0 && !feof(fpin) )
00993     {
00994         cvs_err("Cannot open Tag file in '%s' (error %d)\n", fullpath, errno);
00995         return false;
00996     }
00997
00998     fclose(fpin);
00999
01000     return !tag.empty();
01001 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/cvsgui_i18n.h File Reference

common/cvsgui_i18n.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define _i18n _T
Simply wrong, temporary definition until i18n is properly supported.

Define Documentation

#define _i18n _T

Simply wrong, temporary definition until i18n is properly supported.

Definition at line 26 of file cvsgui_i18n.h.

Referenced by CompatGetCheckout(), CompatGetCommand(), CompatGetRelease(), CompatGetUpdate(), CreateFilterToolbar(), CreateMainMenubar(), CreateMainToolbar(), CvsCmdAdd(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdMoveToTrash(), CvsCmdRelease(), CItemListDlg::DisplayItems(), CCvsRootDlg::DisplayKeywords(), CHHelpSupport::DoOnContextMenu(), CCvsRootDlg::FillProtocolsComboBox(), ColumnIndex::GetColumnName(), GetEditTypeName(), GetLaunchTypeName(), GetRtagTypeName(), KiSelectionHandler::GetSelection(), GetTagTypeName(), glue_exit(), glue_getenv(), CItemListDlg::InitListCtrl(), CCvsRootDlg::InitListCtrl(), KoAddBinaryHandler::KoAddBinaryHandler(), KoAddHandler::KoAddHandler(), KoAddUnicodeHandler::KoAddUnicodeHandler(), KoAnnotateHandler::KoAnnotateHandler(), KoCancelChangesHandler::KoCancelChangesHandler(), KoCheckoutHandler::KoCheckoutHandler(), KoCommandLineHandler::KoCommandLineHandler(), KoCommitHandler::KoCommitHandler(), KoDiffHandler::KoDiffHandler(), KoEditorsHandler::KoEditorsHandler(), KoFileActionHandler::KoFileActionHandler(), KoFileRemoveHandler::KoFileRemoveHandler(), KoGraphAnnotateHandler::KoGraphAnnotateHandler(), KoGraphDiffHandler::KoGraphDiffHandler(), KoGraphHandler::KoGraphHandler(), KoImportHandler::KoImportHandler(), KoLockHandler::KoLockHandler(), KoLogHandler::KoLogHandler(), KoMoveToTrashHandler::KoMoveToTrashHandler(), KoQueryUpdateHandler::KoQueryUpdateHandler(), KoReleaseHandler::KoReleaseHandler(), KoStatusHandler::KoStatusHandler(), KoUneditHandler::KoUneditHandler(), KoUnlockHandler::KoUnlockHandler(), KoUpdateHandler::KoUpdateHandler(), KoUpdateMoveToTrashHandler::KoUpdateMoveToTrashHandler(), KoWatchersHandler::KoWatchersHandler(), KoWatchOffHandler::KoWatchOffHandler(), KoWatchOnHandler::KoWatchOnHandler(), launchCVS(), LaunchDefaultEditor(), LaunchDiff(), LaunchEditor(), LaunchHandler(), LaunchViewer(), MakeTmpFile(), UCvsFrame::OnBrowserPopup(), CItemListDlg::OnCancel(), CCvsRootDlg::OnCancel(), UCvsFolders::OnCmdExplore(), UCvsFiles::OnCmdExplore(), UCvsFrame::OnCmdStopcvs(), UCvsFiles::OnCmdUIEditseldef(), UCvsFrame::OnCopyrights(), UCvsFrame::OnCredits(), CGraphView::OnGraphSetstate(), CWincvsApp::OnHelpCvs(), CTag_MAIN::OnInitDialog(), UCvsFrame::OnQuit(), CItemListDlg::OnRefresh(), CCvsRootDlg::ReadAvailableProtocols(), CCvsRootDlg::ReadProtocolDetails(), USmartCombo::RemoveItem(), UCvsFolders::SetDefaultRoot(), and stopCVS().

Generated on Sat Aug 7 22:44:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsIgnore.cpp File Reference

common/CvsIgnore.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <string.h>
#include "FileTraversal.h"
#include "AppConsole.h"
#include "CvsIgnore.h"
#include "getline.h"
#include "fnmatch.h"
#include "CvsPrefs.h"
#include "wincvs.h"

Include dependency graph for CvsIgnore.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | ign_add (const char *ign, bool hold, std::vector< UStr > &ignlist)
bool | ReadIgnoredFile (const char *fileName, std::vector< UStr > &ignlist)
void | BuildIgnoredList (std::vector< UStr > &ignlist, const char *path)
bool | MatchIgnoredList (const char *filename, const std::vector< UStr > &ignlist)

Function Documentation

void BuildIgnoredList | ( | std::vector< UStr > & | ignlist,
 |  | const char * | path
 | ) |

Open and parse the .cvsignore in the given folder

Parameters:
ignlist | Return ignore list
path | Folder path
Definition at line 148 of file CvsIgnore.cpp.

References CStr, cvs_err(), UStr::endsWith(), gCvsPrefs, CvsPrefs::Home(), ign_add(), MacGetPrefsFolder(), ReadIgnoredFile(), stat::st_mode, stat, and UFSSpec.

Referenced by CFillPyEntries::EnterDirectory(), CFillTclEntries::EnterDirectory(), TViewFill::EnterDirectory(), TBrowserFill::EnterDirectory(), ImportReport::ImportReport(), IsCvsDirectory(), and CHistComboBoxEx::SetIcon().

00149 {
00150     ignlist.erase(ignlist.begin(), ignlist.end());
00151
00152     static std::vector<CStr> deflist;
00153     static bool deflistparsed = false;
00154
00155     if( !deflistparsed )
00156     {
00157 #ifdef TARGET_OS_MAC
00158         UFSSpec theFolder;
00159         CStr home;
00160
00161         if(MacGetPrefsFolder(theFolder, home) == noErr)
00162         {
00163 #else /* !TARGET_OS_MAC */
00164         if(gCvsPrefs.Home() != 0L)
00165         {
00166             CStr home(gCvsPrefs.Home());
00167 #endif /* !TARGET_OS_MAC */
00168
00169             struct stat sb;
00170             if( stat(home, &sb) != 0 || !S_ISDIR(sb.st_mode) )
00171             {
00172                 cvs_err("Warning : unable to access your HOME path '%s'\n", gCvsPrefs.Home());
00173                 cvs_err("          ~/.cvsignore will not be read\n");
00174             }
00175
00176             if( !home.empty() && !home.endsWith(kPathDelimiter) )
00177                 home << kPathDelimiter;
00178
00179             home << ".cvsignore";
00180
00181             // Read .cvsignore file from HOME directory.
00182             // If HOME dir doesn't have such a file then
00183             // try to read global file from executable path.
00184             if( ReadIgnoredFile(home, deflist) == false )
00185             {
00186                 CStr appPath;
00187
00188 #ifdef WIN32
00189                 ((CWincvsApp *)AfxGetApp())->GetAppPath(appPath);
00190 #elif defined(qUnix)
00191                 // Unix version uses only .cvsignore file in HOME dir
00192 #else
00193 #   ifdef qMacCvsPP
00194                 appPath = CMacCvsApp::GetAppPath();
00195 #   endif /* qMacCvsPP */
00196 #endif
00197                 if( !appPath.empty() )
00198                 {
00199                     if( !appPath.endsWith(kPathDelimiter) )
00200                         appPath << kPathDelimiter;
00201
00202                     appPath << ".cvsignore";
00203
00204                     ReadIgnoredFile(appPath, deflist);
00205                 }
00206             }
00207         }
00208
00209         deflistparsed = true;
00210     }
00211     else
00212     {
00213         ignlist = deflist;
00214     }
00215
00216 #if qUnix || TARGET_RT_MAC_MACHO
00217     // from cvs/src/ignore.c
00218     CStr ign_default(". .. core RCSLOG tags TAGS RCS SCCS .make.state\
00219  .nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\
00220  *.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe .DS_Store _$* *$");
00221     ign_add (ign_default, false, ignlist);
00222 #endif
00223
00224     UStr ignPath(path);
00225     if( !ignPath.endsWith(kPathDelimiter) )
00226         ignPath << kPathDelimiter;
00227
00228     ignPath << ".cvsignore";
00229
00230     // load the file from the current source directory
00231     ReadIgnoredFile(ignPath, ignlist);
00232 }

Here is the call graph for this function:

void ign_add | ( | const char * | ign,
 |  | bool | hold,
 |  | std::vector< UStr > & | ignlist
 | ) | [static]

Definition at line 58 of file CvsIgnore.cpp.

References CStr.

Referenced by BuildIgnoredList(), and ReadIgnoredFile().

00059 {
00060     if (!ign || !*ign)
00061         return;
00062
00063     int ign_hold = ignlist.size() == 0 ? -1 : (int)ignlist.size();
00064
00065     for (; *ign; ign++)
00066     {
00067         const char *mark;
00068
00069         /* ignore whitespace before the token */
00070         if (isspace (*ign))
00071             continue;
00072
00073         /*
00074         * if we find a single character !, we must re-set the ignore list
00075         * (saving it if necessary).  We also catch * as a special case in a
00076         * global ignore file as an optimization
00077         */
00078         if ((!*(ign+1) || isspace (*(ign+1))) && (*ign == '!' || *ign == '*'))
00079         {
00080             if (!hold)
00081             {
00082                 /* permanently reset the ignore list */
00083                 ignlist.erase(ignlist.begin(), ignlist.end());
00084
00085                 /* if we are doing a '!', continue; otherwise add the '*' */
00086                 if (*ign == '!')
00087                 {
00088                     continue;
00089                 }
00090             }
00091             else if (*ign == '!')
00092             {
00093                 /* temporarily reset the ignore list */
00094                 if (ign_hold >= 0)
00095                 {
00096                     ignlist.erase(ignlist.begin(), ignlist.begin() + ign_hold);
00097                     ign_hold = -1;
00098                 }
00099                 continue;
00100             }
00101         }
00102
00103         /* find the end of this token */
00104         for (mark = ign; *mark && !isspace (*mark); mark++)
00105             /* do nothing */ ;
00106
00107
00108         ignlist.push_back(CStr(ign).substr(0,mark - ign));
00109
00110         if (*mark)
00111             ign = mark;
00112         else
00113             ign = mark - 1;
00114     }
00115 }

bool MatchIgnoredList | ( | const char * | filename,
 |  | const std::vector< UStr > & | ignlist
 | ) |

Tells if the name match the .cvsignore

Parameters:
filename | Filename to match
ignlist | Ignore list to match
Returns:
true on success, false otherwise
Definition at line 240 of file CvsIgnore.cpp.

References fnmatch().

Referenced by Entries_SetVisited(), KoFilterMask::IsMatch(), and list_add_type().

00241 {
00242     if( filename )
00243     {
00244         std::vector<CStr>::const_iterator i;
00245         for(i = ignlist.begin(); i != ignlist.end(); ++i)
00246         {
00247             if( fnmatch(*i, filename, 0) == 0 )
00248             {
00249                 return true;
00250             }
00251         }
00252     }
00253
00254     return false;
00255 }

Here is the call graph for this function:

bool ReadIgnoredFile | ( | const char * | fileName,
 |  | std::vector< UStr > & | ignlist
 | ) | [static]

Definition at line 119 of file CvsIgnore.cpp.

References cvs_err(), free, getline(), ign_add(), and NULL.

Referenced by BuildIgnoredList().

00120 {
00121     FILE *fp;
00122     char *line = NULL;
00123     size_t line_allocated = 0;
00124
00125     fp = fopen(fileName, "r");
00126     if(fp != 0L)
00127     {
00128         while (getline (&line, &line_allocated, fp) >= 0)
00129             ign_add (line, false, ignlist);
00130
00131         if (ferror (fp))
00132             cvs_err("Problem while parsing '%s'", fileName);
00133
00134         fclose (fp);
00135     }
00136
00137     if(line != 0L)
00138         free (line);
00139
00140     return(fp != 0L);
00141 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsIgnore.h File Reference

common/CvsIgnore.h File Reference

#include <vector>
#include "CPStr.h"

Include dependency graph for CvsIgnore.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void | BuildIgnoredList (std::vector< UStr > &ignlist, const char *path)
bool | MatchIgnoredList (const char *filename, const std::vector< UStr > &ignlist)

Function Documentation

void BuildIgnoredList | ( | std::vector< UStr > & | ignlist,
 |  | const char * | path
 | ) |

Open and parse the .cvsignore in the given folder

Parameters:
ignlist | Return ignore list
path | Folder path
Definition at line 148 of file CvsIgnore.cpp.

References CStr, cvs_err(), UStr::endsWith(), gCvsPrefs, CvsPrefs::Home(), ign_add(), MacGetPrefsFolder(), ReadIgnoredFile(), stat::st_mode, stat, and UFSSpec.

Referenced by TBrowserFill::EnterDirectory(), TViewFill::EnterDirectory(), CFillTclEntries::EnterDirectory(), CFillPyEntries::EnterDirectory(), ImportReport::ImportReport(), IsCvsDirectory(), and CHistComboBoxEx::SetIcon().

00149 {
00150     ignlist.erase(ignlist.begin(), ignlist.end());
00151
00152     static std::vector<CStr> deflist;
00153     static bool deflistparsed = false;
00154
00155     if( !deflistparsed )
00156     {
00157 #ifdef TARGET_OS_MAC
00158         UFSSpec theFolder;
00159         CStr home;
00160
00161         if(MacGetPrefsFolder(theFolder, home) == noErr)
00162         {
00163 #else /* !TARGET_OS_MAC */
00164         if(gCvsPrefs.Home() != 0L)
00165         {
00166             CStr home(gCvsPrefs.Home());
00167 #endif /* !TARGET_OS_MAC */
00168
00169             struct stat sb;
00170             if( stat(home, &sb) != 0 || !S_ISDIR(sb.st_mode) )
00171             {
00172                 cvs_err("Warning : unable to access your HOME path '%s'\n", gCvsPrefs.Home());
00173                 cvs_err("          ~/.cvsignore will not be read\n");
00174             }
00175
00176             if( !home.empty() && !home.endsWith(kPathDelimiter) )
00177                 home << kPathDelimiter;
00178
00179             home << ".cvsignore";
00180
00181             // Read .cvsignore file from HOME directory.
00182             // If HOME dir doesn't have such a file then
00183             // try to read global file from executable path.
00184             if( ReadIgnoredFile(home, deflist) == false )
00185             {
00186                 CStr appPath;
00187
00188 #ifdef WIN32
00189                 ((CWincvsApp *)AfxGetApp())->GetAppPath(appPath);
00190 #elif defined(qUnix)
00191                 // Unix version uses only .cvsignore file in HOME dir
00192 #else
00193 #   ifdef qMacCvsPP
00194                 appPath = CMacCvsApp::GetAppPath();
00195 #   endif /* qMacCvsPP */
00196 #endif
00197                 if( !appPath.empty() )
00198                 {
00199                     if( !appPath.endsWith(kPathDelimiter) )
00200                         appPath << kPathDelimiter;
00201
00202                     appPath << ".cvsignore";
00203
00204                     ReadIgnoredFile(appPath, deflist);
00205                 }
00206             }
00207         }
00208
00209         deflistparsed = true;
00210     }
00211     else
00212     {
00213         ignlist = deflist;
00214     }
00215
00216 #if qUnix || TARGET_RT_MAC_MACHO
00217     // from cvs/src/ignore.c
00218     CStr ign_default(". .. core RCSLOG tags TAGS RCS SCCS .make.state\
00219  .nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\
00220  *.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe .DS_Store _$* *$");
00221     ign_add (ign_default, false, ignlist);
00222 #endif
00223
00224     UStr ignPath(path);
00225     if( !ignPath.endsWith(kPathDelimiter) )
00226         ignPath << kPathDelimiter;
00227
00228     ignPath << ".cvsignore";
00229
00230     // load the file from the current source directory
00231     ReadIgnoredFile(ignPath, ignlist);
00232 }

Here is the call graph for this function:

bool MatchIgnoredList | ( | const char * | filename,
 |  | const std::vector< UStr > & | ignlist
 | ) |

Tells if the name match the .cvsignore

Parameters:
filename | Filename to match
ignlist | Ignore list to match
Returns:
true on success, false otherwise
Definition at line 240 of file CvsIgnore.cpp.

References fnmatch().

Referenced by Entries_SetVisited(), KoFilterMask::IsMatch(), and list_add_type().

00241 {
00242     if( filename )
00243     {
00244         std::vector<CStr>::const_iterator i;
00245         for(i = ignlist.begin(); i != ignlist.end(); ++i)
00246         {
00247             if( fnmatch(*i, filename, 0) == 0 )
00248             {
00249                 return true;
00250             }
00251         }
00252     }
00253
00254     return false;
00255 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsPrefs.cpp File Reference

common/CvsPrefs.cpp File Reference

#include "stdafx.h"
#include <string.h>
#include <stdlib.h>
#include <algorithm>
#include <string>
#include "CvsPrefs.h"
#include "Authen.h"
#include "AppConsole.h"
#include "CvsArgs.h"
#include "MultiString.h"
#include "FileTraversal.h"
#include "WinCvsBrowser.h"
#include "wincvs.h"
#include "wincvs_winutil.h"

Include dependency graph for CvsPrefs.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | DEFAULT_MATCH_ENTRIES_CASE false

Functions

bool | FindBestLastCvsroot (const char *path, UStr &lastCvsroot)
void | InsertLastCvsroot (const char *path, const char *cvsroot)
bool | FindBestLastModuleName (const char *path, UStr &lastModuleName)
void | InsertLastModuleName (const char *path, const char *moduleName)
void | MigrateCvsrootList ()

Variables

CvsPrefs gCvsPrefs
CPersistentInt | gPersistentShema ("P_PersistentShema", SCHEMA_0)
CPersistentBool | gCheckoutRO ("P_CheckoutRO", false, kAddSettings)
CPersistentBool | gZ9Option ("P_Z9Option", false, kAddSettings)
CPersistentBool | gPruneOption ("P_PruneOption", true, kAddSettings)
CPersistentBool | gQuietOption ("P_QuietOption", false)
CPersistentInt | gIsoConvert ("P_NIsoConvert", ISO8559_none, kAddSettings)
CPersistentBool | gICTextOption ("P_ICTextOption", false, kAddSettings)
CPersistentBool | gAddBinControl ("P_AddBinControl", true)
CPersistentInt | gMacBinEncoding ("P_NMacBinEncoding", MAC_HQX, kAddSettings)
CPersistentBool | gMacBinEncodeOnlyBinaryFiles ("P_MacBinOnlyBinaries", true, kAddSettings)
CPersistentInt | gUseShell ("P_UseShell", SHELL_TCL)
CPersistentBool | gMatchEntriesCase ("P_MatchEntriesCase", false)
CMString | gOldCvsroots (20,"P_OldCvsroots")
CKeyString | gLastCvsroot (100,"P_LastCvsroot")
CKeyString | gLastModuleName (100,"P_LastModuleName")
CPersistentInt | gKserverPort ("P_KserverPort",-1, kAddSettings)
CPersistentInt | gPserverPort ("P_PserverPort",-1, kAddSettings)
CPersistentInt | gRhostPort ("P_RhostPort",-1, kAddSettings)
PCPStr | gServerName ("P_ServerName", 0L, kAddSettings)
PCStr | gRshName ("P_RshName", 0L, kAddSettings)
CPersistentBool | gEncryptCommunication ("P_EncryptCommunication", false, kAddSettings)
PCStr | gHome ("P_Home", 0L, kAddSettings)
PCStr | gViewer ("P_Viewer","Notepad")
PCStr | gHelper ("P_Helper","netscape")
PCStr | gBrowser ("P_Browser","gmc")
PCStr | gExtdiff ("P_Extdiff","")
CPersistentBool | gAlwaysUseCvsroot ("P_AlwaysUseCvsroot", false, kAddSettings)
CPersistentInt | gLogoutTimeOut ("P_LogoutTimeOut", 0)
PCStr | gProxyHost ("P_ProxyHost","www.mydomain", kAddSettings)
CPersistentInt | gProxyPort ("P_ProxyPort", 8888, kAddSettings)
CPersistentBool | gUseProxy ("P_UseProxy", false, kAddSettings)
CPersistentBool | gUnixLF ("P_UnixLF", false, kAddSettings)
CPersistentBool | gMacLF ("P_MacLF", false, kAddSettings)
CPersistentInt | gZLevel ("P_ZLevel", 9, kAddSettings)
CPersistentInt | gCvsVersion ("P_CvsVersion", 0, kAddSettings)
CPersistentBool | gCvsConsole ("P_CvsConsole", false, kAddSettings)
CPersistentInt | gWordWrapLogMsg ("P_WordWrapLogMsg", 0, kAddSettings)
PCStr | gLastWorkingDir ("P_LastWorkingDir", 0L, kAddSettings)
CPersistentBool | gDisableSplashScreen ("P_DisableSplashScreen", false)
CPersistentInt | gStatusOutputType ("P_StatusOutputType", STATUSOUTPUT_VERBOSE)
CPersistentInt | gFileActionType ("P_FileActionType", 0)
CPersistentBool | gUpdateCaseSensitiveNames ("P_UpdateCaseSensitiveNames", false, kAddSettings)
CPersistentBool | gUpdateLastCheckinTime ("P_UpdateLastCheckinTime", false, kAddSettings)
CPersistentBool | gUpdateThreeWayConflicts ("P_UpdateThreeWayConflicts", false, kAddSettings)
CPersistentBool | gHideCommandDlgUpdate ("P_HideCommandDlgUpdate", false)
CPersistentBool | gHideCommandDlgDiff ("P_HideCommandDlgDiff", false)
CPersistentBool | gHideCommandDlgLog ("P_HideCommandDlgLog", false)
CPersistentBool | gHideCommandDlgGraph ("P_HideCommandDlgGraph", false)
CPersistentBool | gHideCommandDlgAnnotate ("P_HideCommandDlgAnnotate", false)
CPersistentBool | gHideCommandDlgStatus ("P_HideCommandDlgStatus", false)
CPersistentBool | gHideCommandDlgFileAction ("P_HideCommandDlgFileAction", false)
CPersistentBool | gHideCommandDlgUseShift ("P_HideCommandDlgUseShift", true)
CPersistentBool | gCtrlPressedOnOK ("P_CtrlPressedOnOK", true)
CKeyString | gWhichCvs (20,"P_WhichCvs")
CPersistentBool | gUseAltCvs ("P_UseAltCvs", false, kAddSettings)
PCStr | gSettingsFolder ("P_SettingsFolder", 0L)
CPersistentInt | gShowCvs ("P_ShowCvs", SHOWCVS_HIDE, kAddSettings)
PCStr | gTclLibrary ("P_TclLibrary", 0L)
PCStr | gPythonLibrary ("P_PythonLibrary", 0L)

Define Documentation

#define DEFAULT_MATCH_ENTRIES_CASE false

Definition at line 83 of file CvsPrefs.cpp.

Function Documentation

bool FindBestLastCvsroot | ( | const char * | path,
 |  | UStr & | lastCvsroot
 | ) |

Find the best CVS root match for a given path

Parameters:
path | Path to find the match for
lastCvsroot | Return last CVS root
Returns:
true if match was found, false otherwise
Definition at line 515 of file CvsPrefs.cpp.

References CStr, TMString< T >::GetList(), gLastCvsroot, TKeyString< delimiter >::Split(), and StrPathCmp().

Referenced by CompatGetCheckout(), CompatGetCommand(), CompatGetImport(), and CompatGetRtag().

00516 {
00517     bool res = false;
00518
00519     CStr bestCvsrootPath;
00520     CStr bestCvsroot;
00521
00522     const std::vector<CStr>& list = gLastCvsroot.GetList();
00523     for(std::vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00524     {
00525         CStr key;
00526         CStr value;
00527
00528         gLastCvsroot.Split((*i).c_str(), key, value);
00529         if( StrPathCmp(key, path) == 0 )
00530         {
00531             lastCvsroot = value;
00532             res = true;
00533             break;
00534         }
00535
00536         std::string strKey = key.c_str();
00537         std::string strPath = path;
00538
00539         strKey.erase(strKey.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00540         strPath.erase(strPath.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00541
00542         std::transform(strKey.begin(), strKey.end(), strKey.begin(), tolower);
00543         std::transform(strPath.begin(), strPath.end(), strPath.begin(), tolower);
00544
00545         if( strPath.find(strKey) != std::string::npos && strKey.length() > bestCvsrootPath.length() )
00546         {
00547             bestCvsrootPath = key;
00548             bestCvsroot = value;
00549         }
00550     }
00551
00552     if( !res && !bestCvsroot.empty() )
00553     {
00554         lastCvsroot = bestCvsroot;
00555         res = true;
00556     }
00557
00558     return res;
00559 }

Here is the call graph for this function:

bool FindBestLastModuleName | ( | const char * | path,
 |  | UStr & | lastModuleName
 | ) |

Find the best module name match for a given path

Parameters:
path | Path to find the match for
lastModuleName | Return last module name
Returns:
true if match was found, false otherwise
Definition at line 579 of file CvsPrefs.cpp.

References CStr, TMString< T >::GetList(), gLastModuleName, TKeyString< delimiter >::Split(), and StrPathCmp().

Referenced by CompatGetCheckout(), and CompatGetRtag().

00580 {
00581     bool res = false;
00582
00583     CStr bestModuleNamePath;
00584     CStr bestModuleName;
00585
00586     const std::vector<CStr>& list = gLastModuleName.GetList();
00587     for(std::vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00588     {
00589         CStr key;
00590         CStr value;
00591
00592         gLastModuleName.Split((*i).c_str(), key, value);
00593         if( StrPathCmp(key, path) == 0 )
00594         {
00595             lastModuleName = value;
00596             res = true;
00597             break;
00598         }
00599
00600         std::string strKey = key.c_str();
00601         std::string strPath = path;
00602
00603         strKey.erase(strKey.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00604         strPath.erase(strPath.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00605
00606         std::transform(strKey.begin(), strKey.end(), strKey.begin(), tolower);
00607         std::transform(strPath.begin(), strPath.end(), strPath.begin(), tolower);
00608
00609         if( strPath.find(strKey) != std::string::npos && strKey.length() > bestModuleName.length() )
00610         {
00611             bestModuleNamePath = key;
00612             bestModuleName = value;
00613         }
00614     }
00615
00616     if( !res && !bestModuleName.empty() )
00617     {
00618         lastModuleName = bestModuleName;
00619         res = true;
00620     }
00621
00622     return res;
00623 }

Here is the call graph for this function:

void InsertLastCvsroot | ( | const char * | path,
 |  | const char * | cvsroot
 | ) |

Insert the mapping of last CVS root for a given path

Parameters:
path | Path
cvsroot | Last CVS root
Definition at line 566 of file CvsPrefs.cpp.

References TKeyString< delimiter >::Concatenate(), CStr, gLastCvsroot, and TMString< T >::Insert().

Referenced by CompatGetCheckout(), CompatGetCommand(), CompatGetImport(), and CompatGetRtag().

00567 {
00568     CStr mapValue;
00569     gLastCvsroot.Concatenate(mapValue, path, cvsroot);
00570     gLastCvsroot.Insert(mapValue);
00571 }

Here is the call graph for this function:

void InsertLastModuleName | ( | const char * | path,
 |  | const char * | moduleName
 | ) |

Insert the mapping of last module name for a given path

Parameters:
path | Path
moduleName | Last module name
Definition at line 630 of file CvsPrefs.cpp.

References TKeyString< delimiter >::Concatenate(), CStr, gLastModuleName, and TMString< T >::Insert().

Referenced by CompatGetCheckout(), and CompatGetRtag().

00631 {
00632     CStr mapValue;
00633     gLastModuleName.Concatenate(mapValue, path, moduleName);
00634     gLastModuleName.Insert(mapValue);
00635 }

Here is the call graph for this function:

void MigrateCvsrootList ( )

Helper method to migrate into a single CMString for cvsroot history Definition at line 640 of file CvsPrefs.cpp.

References CStr, gOldCvsroots, TMString< T >::Insert(), NUM_CVSROOT, PROFILE_NAME, and TMString< T >::Remove().

Referenced by CvsPrefs::load().

00641 {
00642     for(int nIndex = 0; nIndex <= NUM_CVSROOT; nIndex++)
00643     {
00644         CStr cvsroot;
00645         char tmp[20];
00646         sprintf(tmp, "P_Cvsroot%d", nIndex);
00647
00648 #ifdef WIN32
00649         BYTE* ppData;
00650         UINT pBytes = 0;
00651
00652         if( !AfxGetApp()->GetProfileBinary(PROFILE_NAME, tmp, &ppData, &pBytes) )
00653         {
00654             continue;
00655         }
00656
00657         cvsroot = (char*)ppData;
00658         delete ppData;
00659 #endif /* WIN32 */
00660
00661 #if qUnix
00662         /* remove unused entries */
00663         gOldCvsroots.Remove(tmp);
00664 #endif // qUnix
00665
00666 #if qMacCvsPP
00667 #endif // qMacCvsPP
00668
00669         if( !cvsroot.empty() )
00670         {
00671             gOldCvsroots.Insert(cvsroot);
00672         }
00673     }
00674 }

Here is the call graph for this function:

Variable Documentation

CPersistentBool gAddBinControl("P_AddBinControl", true) [static]

Referenced by CvsPrefs::AddControl(), and CvsPrefs::SetAddControl().

CPersistentBool gAlwaysUseCvsroot("P_AlwaysUseCvsroot", false, kAddSettings) [static]

Referenced by CvsPrefs::AlwaysUseCvsroot(), and CvsPrefs::SetAlwaysUseCvsroot().

PCStr gBrowser("P_Browser","gmc") [static]

Referenced by CvsPrefs::Browser(), and CvsPrefs::SetBrowser().

CPersistentBool gCheckoutRO("P_CheckoutRO", false, kAddSettings) [static]

Referenced by CvsPrefs::CheckoutRO(), and CvsPrefs::SetCheckoutRO().

CPersistentBool gCtrlPressedOnOK("P_CtrlPressedOnOK", true) [static]

Referenced by CvsPrefs::CtrlPressedOnOK(), and CvsPrefs::SetCtrlPressedOnOK().

CPersistentBool gCvsConsole("P_CvsConsole", false, kAddSettings) [static]

Referenced by CvsPrefs::CvsConsole(), and CvsPrefs::SetCvsConsole().

CvsPrefs gCvsPrefs

Definition at line 86 of file CvsPrefs.cpp.

Referenced by _loadPersistentSettings(), ControlCvsArgs::addfile(), BuildIgnoredList(), CGetPrefs_CVS::CGetPrefs_CVS(), CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), CGetPrefs_WINCVS::CGetPrefs_WINCVS(), CheckSelectionHandler(), CMultilineEntryDlg::CMultilineEntryDlg(), EntnodeData::Compare(), CompatGetAnnotate(), CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetDiff(), CompatGetEditorMsg(), CompatGetFileAction(), CompatGetImport(), CompatGetInit(), CompatGetLog(), CompatGetLogin(), CompatGetPrefs(), CompatGetRtag(), CompatGetStatus(), CompatGetTag(), CompatGetUpdate(), CPython_Interp::CPython_Interp(), CustomizeMenus(), CvsCmdCheckoutModule(), CvsCmdInit(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdMacrosAdmin(), CvsCmdUpdate(), UCvsFolders::DisableGeneric(), UCvsFiles::DisableGeneric(), CTcl_Interp::DoScript(), CCvsStatusBar::DrawItem(), UCvsFiles::EditSel(), CBrowseFileView::EnterFolder(), UCvsApp::Execute(), FormatDefaultSettingsLoc(), glue_exit(), glue_getenv(), CWincvsApp::InitInstance(), CLogoutThread::InitInstance(), IsAppEnabled(), CTcl_Interp::IsAvail(), CPython_Interp::IsAvail(), IsHideCommandKeyPressed(), launchCVS(), LaunchDefaultEditor(), LaunchDiff(), LaunchExplore(), CPersistent::LoadAll(), CWinCvsBrowser::NotifySelectionChange(), CMainFrame::OnClose(), UCvsFolders::OnCmdExplore(), UCvsFiles::OnCmdExplore(), UCvsFrame::OnCmdPreferences(), UCvsFolders::OnCmdUICheckout(), UCvsFiles::OnCmdUIEditseldef(), UCvsFolders::OnCmdUIImport(), UCvsFolders::OnCmdUIResEdit(), UCvsFiles::OnCmdUIResEdit(), UCvsFolders::OnCreate(), UCvsConsole::OnCreate(), CWincvsApp::OnHelpCvs(), CMultilineEntryDlg::OnInitDialog(), COptionalPropertySheet::OnInitDialog(), CGetPrefs_CVS::OnInitDialog(), CWincvsView::OnKeyDown(), CWincvsView::OnMyFormatFont(), UCvsFrame::OnQuit(), CCvsStatusBar::OnTimer(), CWincvsDoc::OnUpdateUsePyshell(), CWincvsDoc::OnUpdateUseTclshell(), CWincvsDoc::OnUsePyshell(), CWincvsDoc::OnUseTclshell(), CMultilineEntryDlg::OnWordwrap(), CCvsStreamConsole::Open(), CvsArgs::reset(), CPersistent::SaveAll(), CWincvsApp::SaveAllModified(), CPersistent::SaveAllSettings(), UCvsApp::SayWelcome(), CCvsStreamConsole::SetMode(), SettingsGetLoc(), PyPersistent::SetValue(), CWincvsApp::StartScriptEngine(), UCvsApp::StartScriptEngine(), CGetPrefs_CVSCMD_DIALOGS::StoreValues(), CGetPrefs_CVS::StoreValues(), CGetPrefs_WINCVS::StoreValues(), CGetPrefs_GLOBALS::StoreValues(), TestBuffer(), UCvsApp::UCvsApp(), CvsPrefs::WhichCvs(), and CPython_Interp::~CPython_Interp().

CPersistentInt gCvsVersion("P_CvsVersion", 0, kAddSettings) [static]

Referenced by CvsPrefs::CvsVersion(), and CvsPrefs::SetCvsVersion().

CPersistentBool gDisableSplashScreen("P_DisableSplashScreen", false) [static]

Referenced by CvsPrefs::DisableSplashScreen(), and CvsPrefs::SetDisableSplashScreen().

CPersistentBool gEncryptCommunication("P_EncryptCommunication", false, kAddSettings) [static]

Referenced by CvsPrefs::EncryptCommunication(), and CvsPrefs::SetEncryptCommunication().

PCStr gExtdiff("P_Extdiff","") [static]

Referenced by CvsPrefs::ExtDiff(), and CvsPrefs::SetExtDiff().

CPersistentInt gFileActionType("P_FileActionType", 0) [static]

Referenced by CvsPrefs::FileActionType(), and CvsPrefs::SetFileActionType().

PCStr gHelper("P_Helper","netscape") [static]

Referenced by CvsPrefs::Helper(), and CvsPrefs::SetHelper().

CPersistentBool gHideCommandDlgAnnotate("P_HideCommandDlgAnnotate", false) [static]

Referenced by CvsPrefs::HideCommandDlgAnnotate(), and CvsPrefs::SetHideCommandDlgAnnotate().

CPersistentBool gHideCommandDlgDiff("P_HideCommandDlgDiff", false) [static]

Referenced by CvsPrefs::HideCommandDlgDiff(), and CvsPrefs::SetHideCommandDlgDiff().

CPersistentBool gHideCommandDlgFileAction("P_HideCommandDlgFileAction", false) [static]

Referenced by CvsPrefs::HideCommandDlgFileAction(), and CvsPrefs::SetHideCommandDlgFileAction().

CPersistentBool gHideCommandDlgGraph("P_HideCommandDlgGraph", false) [static]

Referenced by CvsPrefs::HideCommandDlgGraph(), and CvsPrefs::SetHideCommandDlgGraph().

CPersistentBool gHideCommandDlgLog("P_HideCommandDlgLog", false) [static]

Referenced by CvsPrefs::HideCommandDlgLog(), and CvsPrefs::SetHideCommandDlgLog().

CPersistentBool gHideCommandDlgStatus("P_HideCommandDlgStatus", false) [static]

Referenced by CvsPrefs::HideCommandDlgStatus(), and CvsPrefs::SetHideCommandDlgStatus().

CPersistentBool gHideCommandDlgUpdate("P_HideCommandDlgUpdate", false) [static]

Referenced by CvsPrefs::HideCommandDlgUpdate(), and CvsPrefs::SetHideCommandDlgUpdate().

CPersistentBool gHideCommandDlgUseShift("P_HideCommandDlgUseShift", true) [static]

Referenced by CvsPrefs::HideCommandDlgUseShift(), and CvsPrefs::SetHideCommandDlgUseShift().

PCStr gHome("P_Home", 0L, kAddSettings) [static]

Referenced by CvsPrefs::Home(), and CvsPrefs::SetHome().

CPersistentBool gICTextOption("P_ICTextOption", false, kAddSettings) [static]

Referenced by CvsPrefs::ICTextOption(), and CvsPrefs::SetICTextOption().

CPersistentInt gIsoConvert("P_NIsoConvert", ISO8559_none, kAddSettings) [static]

Referenced by CvsPrefs::IsoConvert(), and CvsPrefs::SetIsoConvert().

CPersistentInt gKserverPort("P_KserverPort",-1, kAddSettings) [static]

Referenced by CvsPrefs::KserverPort(), and CvsPrefs::SetKserverPort().

CKeyString gLastCvsroot(100,"P_LastCvsroot") [static]

Referenced by FindBestLastCvsroot(), and InsertLastCvsroot().

CKeyString gLastModuleName(100,"P_LastModuleName") [static]

Referenced by FindBestLastModuleName(), and InsertLastModuleName().

PCStr gLastWorkingDir("P_LastWorkingDir", 0L, kAddSettings) [static]

Referenced by CvsPrefs::LastWorkingDir(), and CvsPrefs::SetLastWorkingDir().

CPersistentInt gLogoutTimeOut("P_LogoutTimeOut", 0) [static]

Referenced by CvsPrefs::LogoutTimeOut(), and CvsPrefs::SetLogoutTimeOut().

CPersistentBool gMacBinEncodeOnlyBinaryFiles("P_MacBinOnlyBinaries", true, kAddSettings) [static]

Referenced by CvsPrefs::MacBinEncodeBinariesOnly(), and CvsPrefs::SetMacBinEncodeBinariesOnly().

CPersistentInt gMacBinEncoding("P_NMacBinEncoding", MAC_HQX, kAddSettings) [static]

Referenced by CvsPrefs::MacBinEncoding(), and CvsPrefs::SetMacBinEncoding().

CPersistentBool gMacLF("P_MacLF", false, kAddSettings) [static]

Referenced by CvsPrefs::MacLF(), and CvsPrefs::SetMacLF().

CPersistentBool gMatchEntriesCase("P_MatchEntriesCase", false) [static]

Referenced by CvsPrefs::MatchEntriesCase(), and CvsPrefs::SetMatchEntriesCase().

CMString gOldCvsroots(20,"P_OldCvsroots")

Referenced by CCheckout_MAIN::CCheckout_MAIN(), CCmdLine_MAIN::CCmdLine_MAIN(), CImport_MAIN::CImport_MAIN(), CInit_MAIN::CInit_MAIN(), CItemListDlg::CItemListDlg(), CLogin_MAIN::CLogin_MAIN(), CRtag_MAIN::CRtag_MAIN(), CvsPrefs::load(), CPersistent::LoadAll(), and MigrateCvsrootList().

CPersistentInt gPersistentShema("P_PersistentShema", SCHEMA_0) [static]

Referenced by CvsPrefs::NeedCvsrootMigration(), and CvsPrefs::save().

PCStr gProxyHost("P_ProxyHost","www.mydomain", kAddSettings) [static]

Referenced by CvsPrefs::ProxyHost(), and CvsPrefs::SetProxyHost().

CPersistentInt gProxyPort("P_ProxyPort", 8888, kAddSettings) [static]

Referenced by CvsPrefs::ProxyPort(), and CvsPrefs::SetProxyPort().

CPersistentBool gPruneOption("P_PruneOption", true, kAddSettings) [static]

Referenced by CvsPrefs::PruneOption(), and CvsPrefs::SetPruneOption().

CPersistentInt gPserverPort("P_PserverPort",-1, kAddSettings) [static]

Referenced by CvsPrefs::PserverPort(), and CvsPrefs::SetPserverPort().

PCStr gPythonLibrary("P_PythonLibrary", 0L) [static]

Referenced by CvsPrefs::PythonLibrary(), and CvsPrefs::SetPythonLibrary().

CPersistentBool gQuietOption("P_QuietOption", false) [static]

Referenced by CvsPrefs::QuietOption(), and CvsPrefs::SetQuietOption().

CPersistentInt gRhostPort("P_RhostPort",-1, kAddSettings) [static]

Referenced by CvsPrefs::RhostPort(), and CvsPrefs::SetRhostPort().

PCStr gRshName("P_RshName", 0L, kAddSettings) [static]

Referenced by CvsPrefs::RshName(), and CvsPrefs::SetRshName().

PCPStr gServerName("P_ServerName", 0L, kAddSettings) [static]

Referenced by CvsPrefs::ServerName(), and CvsPrefs::SetServerName().

PCStr gSettingsFolder("P_SettingsFolder", 0L) [static]

Referenced by CvsPrefs::SetSettingsFolder(), and CvsPrefs::SettingsFolder().

CPersistentInt gShowCvs("P_ShowCvs", SHOWCVS_HIDE, kAddSettings) [static]

Referenced by CvsPrefs::SetShowCvs(), and CvsPrefs::ShowCvs().

CPersistentInt gStatusOutputType("P_StatusOutputType", STATUSOUTPUT_VERBOSE) [static]

Referenced by CvsPrefs::SetStatusOutputType(), and CvsPrefs::StatusOutputType().

PCStr gTclLibrary("P_TclLibrary", 0L) [static]

Referenced by CvsPrefs::SetTclLibrary(), and CvsPrefs::TclLibrary().

CPersistentBool gUnixLF("P_UnixLF", false, kAddSettings) [static]

Referenced by CvsPrefs::SetUnixLF(), and CvsPrefs::UnixLF().

CPersistentBool gUpdateCaseSensitiveNames("P_UpdateCaseSensitiveNames", false, kAddSettings) [static]

Referenced by CvsPrefs::SetUpdateCaseSensitiveNames(), and CvsPrefs::UpdateCaseSensitiveNames().

CPersistentBool gUpdateLastCheckinTime("P_UpdateLastCheckinTime", false, kAddSettings) [static]

Referenced by CvsPrefs::SetUpdateLastCheckinTime(), and CvsPrefs::UpdateLastCheckinTime().

CPersistentBool gUpdateThreeWayConflicts("P_UpdateThreeWayConflicts", false, kAddSettings) [static]

Referenced by CvsPrefs::SetUpdateThreeWayConflicts(), and CvsPrefs::UpdateThreeWayConflicts().

CPersistentBool gUseAltCvs("P_UseAltCvs", false, kAddSettings) [static]

Referenced by CvsPrefs::SetUseAltCvs(), and CvsPrefs::UseAltCvs().

CPersistentBool gUseProxy("P_UseProxy", false, kAddSettings) [static]

Referenced by CvsPrefs::SetUseProxy(), and CvsPrefs::UseProxy().

CPersistentInt gUseShell("P_UseShell", SHELL_TCL) [static]

Referenced by CvsPrefs::GetUseShell(), and CvsPrefs::SetUseShell().

PCStr gViewer("P_Viewer","Notepad") [static]

Referenced by CvsPrefs::SetViewer(), and CvsPrefs::Viewer().

CKeyString gWhichCvs(20,"P_WhichCvs")

Referenced by CvsPrefs::SetWhichCvs(), and CvsPrefs::WhichCvs().

CPersistentInt gWordWrapLogMsg("P_WordWrapLogMsg", 0, kAddSettings) [static]

Referenced by CvsPrefs::SetWordWrapLogMsg(), and CvsPrefs::WordWrapLogMsg().

CPersistentBool gZ9Option("P_Z9Option", false, kAddSettings) [static]

Referenced by CvsPrefs::SetZ9Option(), and CvsPrefs::Z9Option().

CPersistentInt gZLevel("P_ZLevel", 9, kAddSettings) [static]

Referenced by CvsPrefs::SetZLevel(), and CvsPrefs::ZLevel().

Generated on Sat Aug 7 22:44:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsPrefs.h File Reference

common/CvsPrefs.h File Reference

#include <string.h>
#include "CPStr.h"
#include "Persistent.h"

Include dependency graph for CvsPrefs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CvsPrefs

Defines

#define | DIRTY_MCP_SUPPORT 0
#define | NUM_CVSROOT 20

Typedefs

typedef int | FILEACTION_TYPE
kLaunchType

Enumerations

enum SCHEMA_NUMBER {
SCHEMA_0,
SCHEMA_1,
SCHEMA_2,
SCHEMA_CURRENT = SCHEMA_2
}
Schema enum. More...
enum ISO8559 {
ISO8559_none,
ISO8559_1,
ISO8559_1_MacCvsPro,
ISO8559_2,
ISO8559_3,
ISO8559_4,
ISO8559_5,
ISO8559_6,
ISO8559_7,
ISO8559_8,
ISO8559_9,
ISO8559_10
}
enum MACENCODING {
MAC_HQX,
MAC_APPSINGLE,
MAC_PLAIN_BINARY
}
enum SHELL_KIND {
SHELL_TCL,
SHELL_PYTHON
}
enum STATUSOUTPUT_TYPE {
STATUSOUTPUT_STANDARD,
STATUSOUTPUT_QUICK,
STATUSOUTPUT_VERBOSE
}
enum SHOWCVS_TYPE {
SHOWCVS_HIDE,
SHOWCVS_SHOWNORMAL,
SHOWCVS_SHOWNOACTIVATE,
SHOWCVS_SHOWMINNOACTIVE
}
enum kWinVersion {
kWin16,
kWinNT35,
kWinNT4,
kWin32
}
Windows version enum. More...

Functions

bool | FindBestLastCvsroot (const char *path, UStr &lastCvsroot)
void | InsertLastCvsroot (const char *path, const char *cvsroot)
bool | FindBestLastModuleName (const char *path, UStr &lastModuleName)
void | InsertLastModuleName (const char *path, const char *moduleName)
void | MigrateCvsrootList ()

Variables

CMString gOldCvsroots
CvsPrefs gCvsPrefs

Define Documentation

#define DIRTY_MCP_SUPPORT 0

Definition at line 38 of file CvsPrefs.h.

#define NUM_CVSROOT 20

Definition at line 99 of file CvsPrefs.h.

Referenced by CvsPrefs::load(), CPersistent::LoadAll(), and MigrateCvsrootList().

Typedef Documentation

typedef int FILEACTION_TYPE

kLaunchType

Definition at line 89 of file CvsPrefs.h.

Referenced by CompatGetFileAction(), CvsPrefs::FileActionType(), and CvsPrefs::SetFileActionType().

Enumeration Type Documentation

enum ISO8559

Enumeration values:
ISO8559_none
ISO8559_1
ISO8559_1_MacCvsPro
ISO8559_2
ISO8559_3
ISO8559_4
ISO8559_5
ISO8559_6
ISO8559_7
ISO8559_8
ISO8559_9
ISO8559_10
Definition at line 52 of file CvsPrefs.h.

Referenced by CvsPrefs::IsoConvert().

00053 {
00054     ISO8559_none, // no conversion
00055     ISO8559_1, // Latin1
00056     ISO8559_1_MacCvsPro, // Latin1
00057     ISO8559_2, // Latin2
00058     ISO8559_3, // Latin3
00059     ISO8559_4, // Latin4
00060     ISO8559_5, // Cyrillic
00061     ISO8559_6, // Arabic
00062     ISO8559_7, // Greek
00063     ISO8559_8, // Hebrew
00064     ISO8559_9, // Latin5 (Turkish)
00065     ISO8559_10 // Latin6 (Nordic)
00066 } ISO8559;

enum kWinVersion

Windows version enum.

Enumeration values:
kWin16
kWinNT35
kWinNT4
kWin32
Definition at line 103 of file CvsPrefs.h.

Referenced by CvsPrefs::WhichVersion().

00104     {
00105         kWin16,
00106         kWinNT35,
00107         kWinNT4,
00108         kWin32
00109     } kWinVersion;

enum MACENCODING

Enumeration values:
MAC_HQX
MAC_APPSINGLE
MAC_PLAIN_BINARY
Definition at line 68 of file CvsPrefs.h.

Referenced by CvsPrefs::MacBinEncoding().

00069 {
00070     MAC_HQX, // HQX (7bits)
00071     MAC_APPSINGLE, // Apple Single
00072     MAC_PLAIN_BINARY // plain binary without resource fork
00073 } MACENCODING;

enum SCHEMA_NUMBER

Schema enum.

Enumeration values:
SCHEMA_0 | Default
SCHEMA_1 | WinCvs 1.3b7 and greater
SCHEMA_2 | gCvs 1.1 and greater
SCHEMA_CURRENT | Current schema
Definition at line 44 of file CvsPrefs.h.
00045 {
00046     SCHEMA_0,
00047     SCHEMA_1,
00048     SCHEMA_2,
00049     SCHEMA_CURRENT = SCHEMA_2
00050 } SCHEMA_NUMBER;

enum SHELL_KIND

Enumeration values:
SHELL_TCL
SHELL_PYTHON
Definition at line 75 of file CvsPrefs.h.

Referenced by CvsPrefs::GetUseShell().

00076 {
00077     SHELL_TCL,
00078     SHELL_PYTHON
00079 } SHELL_KIND;

enum SHOWCVS_TYPE

Enumeration values:
SHOWCVS_HIDE
SHOWCVS_SHOWNORMAL
SHOWCVS_SHOWNOACTIVATE
SHOWCVS_SHOWMINNOACTIVE
Definition at line 91 of file CvsPrefs.h.

Referenced by CvsPrefs::ShowCvs(), and CGetPrefs_CVS::StoreValues().

00092 {
00093     SHOWCVS_HIDE,
00094     SHOWCVS_SHOWNORMAL,
00095     SHOWCVS_SHOWNOACTIVATE,
00096     SHOWCVS_SHOWMINNOACTIVE
00097 } SHOWCVS_TYPE;

enum STATUSOUTPUT_TYPE

Enumeration values:
STATUSOUTPUT_STANDARD
STATUSOUTPUT_QUICK
STATUSOUTPUT_VERBOSE
Definition at line 81 of file CvsPrefs.h.

Referenced by CompatGetStatus(), CvsCmdStatus(), and CvsPrefs::StatusOutputType().

00082 {
00083     STATUSOUTPUT_STANDARD,
00084     STATUSOUTPUT_QUICK,
00085     STATUSOUTPUT_VERBOSE
00086 } STATUSOUTPUT_TYPE;

Function Documentation

bool FindBestLastCvsroot | ( | const char * | path,
 |  | UStr & | lastCvsroot
 | ) |

Find the best CVS root match for a given path

Parameters:
path | Path to find the match for
lastCvsroot | Return last CVS root
Returns:
true if match was found, false otherwise
Definition at line 515 of file CvsPrefs.cpp.

References CStr, TMString< T >::GetList(), gLastCvsroot, TKeyString< delimiter >::Split(), and StrPathCmp().

Referenced by CompatGetCheckout(), CompatGetCommand(), CompatGetImport(), and CompatGetRtag().

00516 {
00517     bool res = false;
00518
00519     CStr bestCvsrootPath;
00520     CStr bestCvsroot;
00521
00522     const std::vector<CStr>& list = gLastCvsroot.GetList();
00523     for(std::vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00524     {
00525         CStr key;
00526         CStr value;
00527
00528         gLastCvsroot.Split((*i).c_str(), key, value);
00529         if( StrPathCmp(key, path) == 0 )
00530         {
00531             lastCvsroot = value;
00532             res = true;
00533             break;
00534         }
00535
00536         std::string strKey = key.c_str();
00537         std::string strPath = path;
00538
00539         strKey.erase(strKey.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00540         strPath.erase(strPath.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00541
00542         std::transform(strKey.begin(), strKey.end(), strKey.begin(), tolower);
00543         std::transform(strPath.begin(), strPath.end(), strPath.begin(), tolower);
00544
00545         if( strPath.find(strKey) != std::string::npos && strKey.length() > bestCvsrootPath.length() )
00546         {
00547             bestCvsrootPath = key;
00548             bestCvsroot = value;
00549         }
00550     }
00551
00552     if( !res && !bestCvsroot.empty() )
00553     {
00554         lastCvsroot = bestCvsroot;
00555         res = true;
00556     }
00557
00558     return res;
00559 }

Here is the call graph for this function:

bool FindBestLastModuleName | ( | const char * | path,
 |  | UStr & | lastModuleName
 | ) |

Find the best module name match for a given path

Parameters:
path | Path to find the match for
lastModuleName | Return last module name
Returns:
true if match was found, false otherwise
Definition at line 579 of file CvsPrefs.cpp.

References CStr, TMString< T >::GetList(), gLastModuleName, TKeyString< delimiter >::Split(), and StrPathCmp().

Referenced by CompatGetCheckout(), and CompatGetRtag().

00580 {
00581     bool res = false;
00582
00583     CStr bestModuleNamePath;
00584     CStr bestModuleName;
00585
00586     const std::vector<CStr>& list = gLastModuleName.GetList();
00587     for(std::vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00588     {
00589         CStr key;
00590         CStr value;
00591
00592         gLastModuleName.Split((*i).c_str(), key, value);
00593         if( StrPathCmp(key, path) == 0 )
00594         {
00595             lastModuleName = value;
00596             res = true;
00597             break;
00598         }
00599
00600         std::string strKey = key.c_str();
00601         std::string strPath = path;
00602
00603         strKey.erase(strKey.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00604         strPath.erase(strPath.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00605
00606         std::transform(strKey.begin(), strKey.end(), strKey.begin(), tolower);
00607         std::transform(strPath.begin(), strPath.end(), strPath.begin(), tolower);
00608
00609         if( strPath.find(strKey) != std::string::npos && strKey.length() > bestModuleName.length() )
00610         {
00611             bestModuleNamePath = key;
00612             bestModuleName = value;
00613         }
00614     }
00615
00616     if( !res && !bestModuleName.empty() )
00617     {
00618         lastModuleName = bestModuleName;
00619         res = true;
00620     }
00621
00622     return res;
00623 }

Here is the call graph for this function:

void InsertLastCvsroot | ( | const char * | path,
 |  | const char * | cvsroot
 | ) |

Insert the mapping of last CVS root for a given path

Parameters:
path | Path
cvsroot | Last CVS root
Definition at line 566 of file CvsPrefs.cpp.

References TKeyString< delimiter >::Concatenate(), CStr, gLastCvsroot, and TMString< T >::Insert().

Referenced by CompatGetCheckout(), CompatGetCommand(), CompatGetImport(), and CompatGetRtag().

00567 {
00568     CStr mapValue;
00569     gLastCvsroot.Concatenate(mapValue, path, cvsroot);
00570     gLastCvsroot.Insert(mapValue);
00571 }

Here is the call graph for this function:

void InsertLastModuleName | ( | const char * | path,
 |  | const char * | moduleName
 | ) |

Insert the mapping of last module name for a given path

Parameters:
path | Path
moduleName | Last module name
Definition at line 630 of file CvsPrefs.cpp.

References TKeyString< delimiter >::Concatenate(), CStr, gLastModuleName, and TMString< T >::Insert().

Referenced by CompatGetCheckout(), and CompatGetRtag().

00631 {
00632     CStr mapValue;
00633     gLastModuleName.Concatenate(mapValue, path, moduleName);
00634     gLastModuleName.Insert(mapValue);
00635 }

Here is the call graph for this function:

void MigrateCvsrootList ( )

Helper method to migrate into a single CMString for cvsroot history Definition at line 640 of file CvsPrefs.cpp.

References CStr, gOldCvsroots, TMString< T >::Insert(), NUM_CVSROOT, PROFILE_NAME, and TMString< T >::Remove().

Referenced by CvsPrefs::load().

00641 {
00642     for(int nIndex = 0; nIndex <= NUM_CVSROOT; nIndex++)
00643     {
00644         CStr cvsroot;
00645         char tmp[20];
00646         sprintf(tmp, "P_Cvsroot%d", nIndex);
00647
00648 #ifdef WIN32
00649         BYTE* ppData;
00650         UINT pBytes = 0;
00651
00652         if( !AfxGetApp()->GetProfileBinary(PROFILE_NAME, tmp, &ppData, &pBytes) )
00653         {
00654             continue;
00655         }
00656
00657         cvsroot = (char*)ppData;
00658         delete ppData;
00659 #endif /* WIN32 */
00660
00661 #if qUnix
00662         /* remove unused entries */
00663         gOldCvsroots.Remove(tmp);
00664 #endif // qUnix
00665
00666 #if qMacCvsPP
00667 #endif // qMacCvsPP
00668
00669         if( !cvsroot.empty() )
00670         {
00671             gOldCvsroots.Insert(cvsroot);
00672         }
00673     }
00674 }

Here is the call graph for this function:

Variable Documentation

CvsPrefs gCvsPrefs

Definition at line 86 of file CvsPrefs.cpp.

Referenced by _loadPersistentSettings(), ControlCvsArgs::addfile(), BuildIgnoredList(), CGetPrefs_CVS::CGetPrefs_CVS(), CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), CGetPrefs_WINCVS::CGetPrefs_WINCVS(), CheckSelectionHandler(), CMultilineEntryDlg::CMultilineEntryDlg(), EntnodeData::Compare(), CompatGetAnnotate(), CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetDiff(), CompatGetEditorMsg(), CompatGetFileAction(), CompatGetImport(), CompatGetInit(), CompatGetLog(), CompatGetLogin(), CompatGetPrefs(), CompatGetRtag(), CompatGetStatus(), CompatGetTag(), CompatGetUpdate(), CPython_Interp::CPython_Interp(), CustomizeMenus(), CvsCmdCheckoutModule(), CvsCmdInit(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdMacrosAdmin(), CvsCmdUpdate(), UCvsFiles::DisableGeneric(), UCvsFolders::DisableGeneric(), CTcl_Interp::DoScript(), CCvsStatusBar::DrawItem(), UCvsFiles::EditSel(), CBrowseFileView::EnterFolder(), UCvsApp::Execute(), FormatDefaultSettingsLoc(), glue_exit(), glue_getenv(), CLogoutThread::InitInstance(), CWincvsApp::InitInstance(), IsAppEnabled(), CPython_Interp::IsAvail(), CTcl_Interp::IsAvail(), IsHideCommandKeyPressed(), launchCVS(), LaunchDefaultEditor(), LaunchDiff(), LaunchExplore(), CPersistent::LoadAll(), CWinCvsBrowser::NotifySelectionChange(), CMainFrame::OnClose(), UCvsFiles::OnCmdExplore(), UCvsFolders::OnCmdExplore(), UCvsFrame::OnCmdPreferences(), UCvsFolders::OnCmdUICheckout(), UCvsFiles::OnCmdUIEditseldef(), UCvsFolders::OnCmdUIImport(), UCvsFiles::OnCmdUIResEdit(), UCvsFolders::OnCmdUIResEdit(), UCvsConsole::OnCreate(), UCvsFolders::OnCreate(), CWincvsApp::OnHelpCvs(), CGetPrefs_CVS::OnInitDialog(), COptionalPropertySheet::OnInitDialog(), CMultilineEntryDlg::OnInitDialog(), CWincvsView::OnKeyDown(), CWincvsView::OnMyFormatFont(), UCvsFrame::OnQuit(), CCvsStatusBar::OnTimer(), CWincvsDoc::OnUpdateUsePyshell(), CWincvsDoc::OnUpdateUseTclshell(), CWincvsDoc::OnUsePyshell(), CWincvsDoc::OnUseTclshell(), CMultilineEntryDlg::OnWordwrap(), CCvsStreamConsole::Open(), CvsArgs::reset(), CPersistent::SaveAll(), CWincvsApp::SaveAllModified(), CPersistent::SaveAllSettings(), UCvsApp::SayWelcome(), CCvsStreamConsole::SetMode(), SettingsGetLoc(), PyPersistent::SetValue(), UCvsApp::StartScriptEngine(), CWincvsApp::StartScriptEngine(), CGetPrefs_GLOBALS::StoreValues(), CGetPrefs_WINCVS::StoreValues(), CGetPrefs_CVS::StoreValues(), CGetPrefs_CVSCMD_DIALOGS::StoreValues(), TestBuffer(), UCvsApp::UCvsApp(), CvsPrefs::WhichCvs(), and CPython_Interp::~CPython_Interp().

CMString gOldCvsroots

Referenced by CCheckout_MAIN::CCheckout_MAIN(), CCmdLine_MAIN::CCmdLine_MAIN(), CImport_MAIN::CImport_MAIN(), CInit_MAIN::CInit_MAIN(), CItemListDlg::CItemListDlg(), CLogin_MAIN::CLogin_MAIN(), CRtag_MAIN::CRtag_MAIN(), CvsPrefs::load(), CPersistent::LoadAll(), and MigrateCvsrootList().

Generated on Sat Aug 7 22:44:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsRootDlg.cpp File Reference

common/CvsRootDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "CvsRootDlg.h"
#include "AppConsole.h"
#include "CvsArgs.h"

Include dependency graph for CvsRootDlg.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | CHR_ROOT_TOKEN_SEPARATOR ':'
Token separator in CVS root string.
#define | CHR_KEYWORD_QUOTE '\''
Keyword quote character in CVS root string.
#define | CHR_PROTOCOL_TOKEN_SEPARATOR ';'
Protocol token separator in CVS root string.
#define | CHR_KEYWORD_TOKEN_SEPARATOR '='
Keyword token separator.
#define | WM_READ_PROTOCOLS WM_APP + 1

Functions

int | LaunchCvsRootCommand (CCvsRootConsole *cvsRootConsole, const char *protocol=NULL)
string | FormatCvsRoot (const char *protocol, KeywordDisplayInfoList &displayInfoList, const char *path)
bool | CompatGetCvsRoot (UStr &cvsRoot)
Get CVSROOT.

Variables

CMString | gPrevCVsRootRepositoryPaths (20,"P_PrevCvsRootRepositoryPaths")
CMKeyString | gPrevCvsRootKeywords (200,"P_PrevCvsRootKeywords")

Define Documentation

#define CHR_KEYWORD_QUOTE '\''

Keyword quote character in CVS root string.

Definition at line 45 of file CvsRootDlg.cpp.

Referenced by FormatCvsRoot(), CCvsRootParser::NormalizeCvsRoot(), and CCvsRootParser::Parse().

#define CHR_KEYWORD_TOKEN_SEPARATOR '='

Keyword token separator.

Definition at line 51 of file CvsRootDlg.cpp.

Referenced by FormatCvsRoot(), and CCvsRootParser::Parse().

#define CHR_PROTOCOL_TOKEN_SEPARATOR ';'

Protocol token separator in CVS root string.

Definition at line 48 of file CvsRootDlg.cpp.

Referenced by FormatCvsRoot(), CCvsRootParser::NormalizeCvsRoot(), and CCvsRootParser::Parse().

#define CHR_ROOT_TOKEN_SEPARATOR ':'

Token separator in CVS root string.

Definition at line 42 of file CvsRootDlg.cpp.

Referenced by FormatCvsRoot(), and CCvsRootParser::NormalizeCvsRoot().

#define WM_READ_PROTOCOLS WM_APP + 1

Definition at line 607 of file CvsRootDlg.cpp.

Referenced by CCvsRootDlg::PostReadProtocolsMsg().

Function Documentation

bool CompatGetCvsRoot ( UStr & cvsRoot )

Get CVSROOT.

Definition at line 1326 of file CvsRootDlg.cpp.

References CCvsRootDlg::m_cvsroot.

Referenced by CMultilineEntryDlg::ActionFormatCvsRoot(), CCheckout_MAIN::OnSelcvsroot(), CImport_MAIN::OnSelcvsroot(), CInit_MAIN::OnSelcvsroot(), CItemListDlg::OnSelcvsroot(), CCmdLine_MAIN::OnSelcvsroot(), CLogin_MAIN::OnSelcvsroot(), and CRtag_MAIN::OnSelcvsroot().

01327 {
01328     bool userHitOK = false;
01329
01330 #ifdef WIN32
01331     CCvsRootDlg cvsRootDlg(cvsRoot);
01332
01333     if( cvsRootDlg.DoModal() == IDOK )
01334     {
01335         cvsRoot = cvsRootDlg.m_cvsroot;
01336
01337         userHitOK = true;
01338     }
01339 #endif /* WIN32 */
01340
01341 #if qUnix
01342 #endif // qUnix
01343
01344 #ifdef qMacCvsPP
01345 #endif /* qMacCvsPP */
01346
01347     return userHitOK;
01348 }

string FormatCvsRoot | ( | const char * | protocol,
 |  | KeywordDisplayInfoList & | displayInfoList,
 |  | const char * | path
 | ) | [static]

Format CVS root

Parameters:
protocol | Protocol
displayInfoList | Display info list
path | Repository path
Returns:
CVS root string
Definition at line 514 of file CvsRootDlg.cpp.

References CHR_KEYWORD_QUOTE, CHR_KEYWORD_TOKEN_SEPARATOR, CHR_PROTOCOL_TOKEN_SEPARATOR, CHR_ROOT_TOKEN_SEPARATOR, KeywordDisplayInfo::GetRowInfo(), KeywordDisplayInfo::GetValue(), KeywordDisplayInfoList, and KeywordInfo::m_keyword.

Referenced by CCvsRootDlg::UpdateCvsRoot().

00515 {
00516     string cvsroot;
00517
00518     cvsroot = CHR_ROOT_TOKEN_SEPARATOR;
00519
00520     if( protocol )
00521     {
00522         cvsroot += protocol;
00523     }
00524
00525     for(KeywordDisplayInfoList::const_iterator it = displayInfoList.begin(); it != displayInfoList.end(); it++)
00526     {
00527         const KeywordDisplayInfo* displayInfo = *it;
00528         if( displayInfo && !displayInfo->GetValue().empty() )
00529         {
00530             bool needsQuote = displayInfo->GetValue().find(CHR_ROOT_TOKEN_SEPARATOR) != string::npos;
00531
00532             cvsroot += CHR_PROTOCOL_TOKEN_SEPARATOR;
00533             cvsroot += displayInfo->GetRowInfo().m_keyword;
00534             cvsroot += CHR_KEYWORD_TOKEN_SEPARATOR;
00535
00536             if( needsQuote )
00537             {
00538                 cvsroot += CHR_KEYWORD_QUOTE;
00539             }
00540
00541             cvsroot += displayInfo->GetValue();
00542
00543             if( needsQuote )
00544             {
00545                 cvsroot += CHR_KEYWORD_QUOTE;
00546             }
00547         }
00548     }
00549
00550     cvsroot += CHR_ROOT_TOKEN_SEPARATOR;
00551     cvsroot += path;
00552
00553     return cvsroot;
00554 }

Here is the call graph for this function:

int LaunchCvsRootCommand | ( | CCvsRootConsole * | cvsRootConsole,
 |  | const char * | protocol = NULL
 | ) | [static]

Launch and parse CVS command appropriate to the type and parameters

Parameters:
cvsRootConsole | CVS root console
protocol | Protocol to get the information for, NULL to get the protocols list
Returns:
The launch result
Definition at line 487 of file CvsRootDlg.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), launchCVS(), NULL, CCvsRootConsole::Parse(), and CvsArgs::print().

Referenced by CCvsRootDlg::ReadAvailableProtocols(), and CCvsRootDlg::ReadProtocolDetails().

00488 {
00489     CvsArgs args;
00490     args.add("info");
00491
00492     if( protocol )
00493     {
00494         args.add(protocol);
00495     }
00496
00497     const char* dir = NULL;
00498
00499     args.print(dir);
00500
00501     const int launchRes = launchCVS(dir, args.Argc(), args.Argv(), cvsRootConsole);
00502     cvsRootConsole->Parse(launchRes);
00503
00504     return launchRes;
00505 }

Here is the call graph for this function:

Variable Documentation

CMKeyString gPrevCvsRootKeywords(200,"P_PrevCvsRootKeywords") [static]

Referenced by CEditKeywordDlg::CEditKeywordDlg().

CMString gPrevCVsRootRepositoryPaths(20,"P_PrevCvsRootRepositoryPaths") [static]

Referenced by CCvsRootDlg::CCvsRootDlg().

Generated on Sat Aug 7 22:44:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsRootDlg.h File Reference

common/CvsRootDlg.h File Reference

#include "AppGlue.h"
#include "SmartComboBox.h"
#include "HHelpSupport.h"
#include <string>
#include <sstream>
#include <set>
#include <list>
#include <map>
#include <algorithm>

Include dependency graph for CvsRootDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | KeywordInfo
Structure to hold protocol row information. More...
class | CCvsRootConsole
Base class for cvsRoot list console. More...
class | CInfoParserConsole
Class to parse protocols available (obtained using cvs info). More...
class | CProtocolParserConsole
Class to parse protocol info (obtained using cvs info protocol). More...
class | CCvsRootParser
Class to parse CVS root string. More...
class | KeywordDisplayInfo
Class to hold and support data display. More...
class | CCvsRootDlg
class | CEditKeywordDlg

Defines

#define | AFX_CVSROOTDLG_H__E7B87F15_691C_407E_AFAE_910BE8E98A0A__INCLUDED_

Typedefs

typedef std::map< string,
string > 		CvsProtocolList
CVS protocol list container.
typedef std::vector< KeywordInfo > | KeywordList
Keyword list.
typedef std::vector< const
KeywordDisplayInfo * > 		KeywordDisplayInfoList
Display info list.

Enumerations

enum kInfoCmdType {
kInfoCmd,
kProtocolCmd
}
Enum types of info commands. More...
enum kCvsRootDisplayType {
kCvsRootDisplayWait,
kCvsRootDisplayData,
kCvsRootDisplayInfo
}
Display type enum. More...

Functions

bool | CompatGetCvsRoot (UStr &cvsRoot)
Get CVSROOT.

Define Documentation

#define AFX_CVSROOTDLG_H__E7B87F15_691C_407E_AFAE_910BE8E98A0A__INCLUDED_

Definition at line 22 of file CvsRootDlg.h.

Typedef Documentation

typedef std::map<string, string> CvsProtocolList

CVS protocol list container.

Definition at line 56 of file CvsRootDlg.h.

Referenced by CCvsRootDlg::FillProtocolsComboBox(), CCvsRootParser::GetCvsProtocolList(), CInfoParserConsole::GetCvsProtocolList(), and CCvsRootDlg::UpdateKeywords().

typedef std::vector<const KeywordDisplayInfo*> KeywordDisplayInfoList

Display info list.

Definition at line 186 of file CvsRootDlg.h.

Referenced by FormatCvsRoot(), and CCvsRootDlg::UpdateCvsRoot().

typedef std::vector<KeywordInfo> KeywordList

Keyword list.

Definition at line 66 of file CvsRootDlg.h.

Referenced by CCvsRootDlg::DisplayKeywords(), and CProtocolParserConsole::GetKeywordList().

Enumeration Type Documentation

enum kCvsRootDisplayType

Display type enum.

Enumeration values:
kCvsRootDisplayWait | Display the wait prompt while retrieving the data
kCvsRootDisplayData | Display the data
kCvsRootDisplayInfo | Display the information
Definition at line 156 of file CvsRootDlg.h.
00157 {
00158     kCvsRootDisplayWait,
00159     kCvsRootDisplayData,
00160     kCvsRootDisplayInfo
00161 } kCvsRootDisplayType;

enum kInfoCmdType

Enum types of info commands.

Enumeration values:
kInfoCmd | Info command
kProtocolCmd | Protocol info command
Definition at line 49 of file CvsRootDlg.h.
00050 {
00051     kInfoCmd,
00052     kProtocolCmd
00053 } kInfoCmdType;

Function Documentation

bool CompatGetCvsRoot ( UStr & cvsRoot )

Get CVSROOT.

Definition at line 1326 of file CvsRootDlg.cpp.

References CCvsRootDlg::m_cvsroot.

Referenced by CMultilineEntryDlg::ActionFormatCvsRoot(), CRtag_MAIN::OnSelcvsroot(), CLogin_MAIN::OnSelcvsroot(), CCmdLine_MAIN::OnSelcvsroot(), CItemListDlg::OnSelcvsroot(), CInit_MAIN::OnSelcvsroot(), CImport_MAIN::OnSelcvsroot(), and CCheckout_MAIN::OnSelcvsroot().

01327 {
01328     bool userHitOK = false;
01329
01330 #ifdef WIN32
01331     CCvsRootDlg cvsRootDlg(cvsRoot);
01332
01333     if( cvsRootDlg.DoModal() == IDOK )
01334     {
01335         cvsRoot = cvsRootDlg.m_cvsroot;
01336
01337         userHitOK = true;
01338     }
01339 #endif /* WIN32 */
01340
01341 #if qUnix
01342 #endif // qUnix
01343
01344 #ifdef qMacCvsPP
01345 #endif /* qMacCvsPP */
01346
01347     return userHitOK;
01348 }

Generated on Sat Aug 7 22:44:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsSandboxInfo.cpp File Reference

common/CvsSandboxInfo.cpp File Reference

#include "stdafx.h"
#include "getline.h"
#include "wincvs.h"
#include "CvsSandboxInfo.h"
#include <fstream>
#include <strstream>

Include dependency graph for CvsSandboxInfo.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:44:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsSandboxInfo.h File Reference

common/CvsSandboxInfo.h File Reference

#include <string>

Include dependency graph for CvsSandboxInfo.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCvsSandboxInfo
CVS sandbox info. More...

Defines

#define | AFX_CVSSANDBOXINFO_H__06D1CA4F_06C6_4F57_9787_C91C53E372D6__INCLUDED_

Define Documentation

#define AFX_CVSSANDBOXINFO_H__06D1CA4F_06C6_4F57_9787_C91C53E372D6__INCLUDED_

Definition at line 22 of file CvsSandboxInfo.h.

Generated on Sat Aug 7 22:44:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/DiffDlg.cpp File Reference

common/DiffDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "OptionalPropertySheet.h"
#include "wincvs_winutil.h"
#include "DiffDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "UpdateDlg.h"
#include "ItemListDlg.h"
#include "GetPrefs.h"

Include dependency graph for DiffDlg.cpp:

Include dependency graph

Go to the source code of this file.

Classes

struct | _sDiffOptionsItem
Define the diff options list items. More...

Defines

#define | _DIFF_CPP_
#define | STR_DIFFDEFAULT_REV "HEAD"
#define | STR_DIFFDEFAULT_DATE "yesterday"
#define | STR_DIFFOPT_OPTIONDESCRIPTION_FORMAT "[%s]: %s"
#define | STR_DIFFOPT_OPT_A "-a"
#define | STR_DIFFOPT_DESC_A "Treat all files as text and compare them line-by-line, even if they do not seem to be text"
#define | STR_DIFFOPT_OPT_B "-b"
#define | STR_DIFFOPT_DESC_B "Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent"
#define | STR_DIFFOPT_OPT_BB "-B"
#define | STR_DIFFOPT_DESC_BB "Ignore changes that just insert or delete blank lines"
#define | STR_DIFFOPT_OPT_BINARY "--binary"
#define | STR_DIFFOPT_DESC_BINARY "Read and write data in binary mode"
#define | STR_DIFFOPT_OPT_BRIEF "--brief"
#define | STR_DIFFOPT_DESC_BRIEF "Report only whether the files differ, not the details of the differences"
#define | STR_DIFFOPT_OPT_C "-c"
#define | STR_DIFFOPT_DESC_C "Use the context output format"
#define | STR_DIFFOPT_OPT_CC "-C lines"
#define | STR_DIFFOPT_DESC_CC "Use the context output format, showing lines (an integer) lines of context, or three if lines is not given. For proper operation, patch typically needs at least two lines of context"
#define | STR_DIFFOPT_OPT_C_G_F "--changed-group-format=format"
#define | STR_DIFFOPT_DESC_C_G_F "Use format to output a line group containing differing lines from both files in if-then-else format. See CVS manual for line group formats"
#define | STR_DIFFOPT_OPT_D "-d"
#define | STR_DIFFOPT_DESC_D "Change the algorithm to perhaps find a smaller set of changes. This makes diff slower (sometimes much slower)"
#define | STR_DIFFOPT_OPT_E "-e"
#define | STR_DIFFOPT_DESC_E "Make output that is a valid ed script"
#define | STR_DIFFOPT_OPT_E_T "--expand-tabs"
#define | STR_DIFFOPT_DESC_E_T "Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files"
#define | STR_DIFFOPT_OPT_F "-f"
#define | STR_DIFFOPT_DESC_F "Make output that looks vaguely like an ed script but has changes in the order they appear in the file"
#define | STR_DIFFOPT_OPT_FF "-F regexp"
#define | STR_DIFFOPT_DESC_FF "In context and unified format, for each hunk of differences, show some of the last preceding line that matches regexp"
#define | STR_DIFFOPT_OPT_F_E "--forward-ed"
#define | STR_DIFFOPT_DESC_F_E "Make output that looks vaguely like an ed script but has changes in the order they appear in the file"
#define | STR_DIFFOPT_OPT_HH "-H"
#define | STR_DIFFOPT_DESC_HH "Use heuristics to speed handling of large files that have numerous scattered small changes"
#define | STR_DIFFOPT_OPT_H_L "--horizon-lines=lines"
#define | STR_DIFFOPT_DESC_H_L "Do not discard the last lines lines of the common prefix and the first lines lines of the common suffix"
#define | STR_DIFFOPT_OPT_I "-i"
#define | STR_DIFFOPT_DESC_I "Ignore changes in case; consider upper- and lower-case letters equivalent"
#define | STR_DIFFOPT_OPT_II "-I regexp"
#define | STR_DIFFOPT_DESC_II "Ignore changes that just insert or delete lines that match regexp"
#define | STR_DIFFOPT_OPT_IFDEF "--ifdef=name"
#define | STR_DIFFOPT_DESC_IFDEF "Make merged if-then-else output using name"
#define | STR_DIFFOPT_OPT_I_A_S "--ignore-all-space"
#define | STR_DIFFOPT_DESC_I_A_S "Ignore white space when comparing lines"
#define | STR_DIFFOPT_OPT_I_B_L "--ignore-blank-lines"
#define | STR_DIFFOPT_DESC_I_B_L "Ignore changes that just insert or delete blank lines"
#define | STR_DIFFOPT_OPT_I_C "--ignore-case"
#define | STR_DIFFOPT_DESC_I_C "Ignore changes in case; consider upper- and lower-case to be the same"
#define | STR_DIFFOPT_OPT_I_M_L "--ignore-matching-lines=regexp"
#define | STR_DIFFOPT_DESC_I_M_L "Ignore changes that just insert or delete lines that match regexp"
#define | STR_DIFFOPT_OPT_I_S_C "--ignore-space-change"
#define | STR_DIFFOPT_DESC_I_S_C "Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent"
#define | STR_DIFFOPT_OPT_I_T "--initial-tab"
#define | STR_DIFFOPT_DESC_I_T "Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal"
#define | STR_DIFFOPT_OPT_LL "-L label"
#define | STR_DIFFOPT_DESC_LL "Use label instead of the file name in the context format and unified format headers"
#define | STR_DIFFOPT_OPT_LABEL "--label=label"
#define | STR_DIFFOPT_DESC_LABEL "Use label instead of the file name in the context format and unified format headers"
#define | STR_DIFFOPT_OPT_L_C "--left-column"
#define | STR_DIFFOPT_DESC_L_C "Print only the left column of two common lines in side by side format"
#define | STR_DIFFOPT_OPT_L_F "--line-format=format"
#define | STR_DIFFOPT_DESC_L_F "Use format to output all input lines in if-then-else format. See CVS manual for line formats"
#define | STR_DIFFOPT_OPT_MINIMAL "--minimal"
#define | STR_DIFFOPT_DESC_MINIMAL "Change the algorithm to perhaps find a smaller set of changes. This makes diff slower (sometimes much slower)"
#define | STR_DIFFOPT_OPT_N "-n"
#define | STR_DIFFOPT_DESC_N "Output RCS-format diffs; like `-f' except that each command specifies the number of lines affected"
#define | STR_DIFFOPT_OPT_NN "-N"
#define | STR_DIFFOPT_DESC_NN "In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory"
#define | STR_DIFFOPT_OPT_N_G_F "--new-group-format=format"
#define | STR_DIFFOPT_DESC_N_G_F "Use format to output a group of lines taken from just the second file in if-then-else format. See section A.9.1.1 Line group formats"
#define | STR_DIFFOPT_OPT_N_L_F "--new-line-format=format"
#define | STR_DIFFOPT_DESC_N_L_F "Use format to output a line taken from just the second file in if-then-else format. See CVS manual for line formats"
#define | STR_DIFFOPT_OPT_O_G_F "--old-group-format=format"
#define | STR_DIFFOPT_DESC_O_G_F "Use format to output a group of lines taken from just the first file in if-then-else format. See section A.9.1.1 Line group formats"
#define | STR_DIFFOPT_OPT_O_L_F "--old-line-format=format"
#define | STR_DIFFOPT_DESC_O_L_F "Use format to output a line taken from just the first file in if-then-else format. See CVS manual for line formats"
#define | STR_DIFFOPT_OPT_P "-p"
#define | STR_DIFFOPT_DESC_PP "Show which C function each change is in"
#define | STR_DIFFOPT_OPT_RCS "--rcs"
#define | STR_DIFFOPT_DESC_RCS "Output RCS-format diffs; like `-f' except that each command specifies the number of lines affected"
#define | STR_DIFFOPT_OPT_S "-s"
#define | STR_DIFFOPT_DESC_S "Report when two files are the same"
#define | STR_DIFFOPT_OPT_S_C_F "--show-c-function"
#define | STR_DIFFOPT_DESC_S_C_F "Show which C function each change is in"
#define | STR_DIFFOPT_OPT_S_F_L "--show-function-line=regexp"
#define | STR_DIFFOPT_DESC_S_F_L "In context and unified format, for each hunk of differences, show some of the last preceding line that matches regexp"
#define | STR_DIFFOPT_OPT_S_B_S "--side-by-side"
#define | STR_DIFFOPT_DESC_S_B_S "Use the side by side output format"
#define | STR_DIFFOPT_OPT_S_L_F "--speed-large-files"
#define | STR_DIFFOPT_DESC_S_L_F "Use heuristics to speed handling of large files that have numerous scattered small changes"
#define | STR_DIFFOPT_OPT_S_C_L "--suppress-common-lines"
#define | STR_DIFFOPT_DESC_S_C_L "Do not print common lines in side by side format"
#define | STR_DIFFOPT_OPT_T "-t"
#define | STR_DIFFOPT_DESC_T "Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files"
#define | STR_DIFFOPT_OPT_TT "-T"
#define | STR_DIFFOPT_DESC_TT "Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal"
#define | STR_DIFFOPT_OPT_TEXT "--text"
#define | STR_DIFFOPT_DESC_TEXT "Treat all files as text and compare them line-by-line, even if they do not appear to be text"
#define | STR_DIFFOPT_OPT_U "-u"
#define | STR_DIFFOPT_DESC_U "Use the unified output format"
#define | STR_DIFFOPT_OPT_U_G_F "--unchanged-group-format=format"
#define | STR_DIFFOPT_DESC_U_G_F "Use format to output a group of common lines taken from both files in if-then-else format. See section A.9.1.1 Line group formats"
#define | STR_DIFFOPT_OPT_U_L_F "--unchanged-line-format=format"
#define | STR_DIFFOPT_DESC_U_L_F "Use format to output a line common to both files in if-then-else format. See CVS manual for line formats"
#define | STR_DIFFOPT_OPT_UU "-U lines"
#define | STR_DIFFOPT_DESC_UU "Use the unified output format, showing lines (an integer) lines of context, or three if lines is not given. For proper operation, patch typically needs at least two lines of context"
#define | STR_DIFFOPT_OPT_W "-w"
#define | STR_DIFFOPT_DESC_W "Ignore white space when comparing lines"
#define | STR_DIFFOPT_OPT_WW "-W columns"
#define | STR_DIFFOPT_DESC_WW "Use an output width of columns in side by side format"
#define | STR_DIFFOPT_OPT_Y "-y"
#define | STR_DIFFOPT_DESC_Y "Use the side by side output format"

Typedefs

typedef _sDiffOptionsItem | DiffOptionsItem
Define the diff options list items.

Functions

bool | CompatGetDiff (const MultiFiles *mf, kDiffCmdType diffType, bool &noRecurs, bool &isDate1, bool &isDate2, UStr &rev1, UStr &rev2, bool &useExtDiff, UStr &extDiffTool, bool &unifiedDiff, bool &noWhiteSpace, bool &noBlankLines, bool &ignoreCase, UStr &keyword, UStr &diffOptions, bool allowExtDiff)
Get the diff options.

Variables

CMString gDateOrRevNames
CPersistentBool | gUseExtDiff ("P_DiffUseExtDiff", false)
CPersistentBool | gIgnoreCase ("P_IgnoreCase", false)
CPersistentBool | gNoWhiteSpace ("P_NoWhiteSpace", false)
CPersistentBool | gNoBlankLines ("P_NoBlankLines", false)
CPersistentBool | gUnifiedDiff ("P_UnifiedDiff", false)
CMString | gDiffOptions (20,"P_DiffOptions")
DiffOptionsItem sDiffOptions []
Command line diff options and their descriptions.

Define Documentation

#define _DIFF_CPP_

Definition at line 50 of file DiffDlg.cpp.

#define STR_DIFFDEFAULT_DATE "yesterday"

Definition at line 69 of file DiffDlg.cpp.

Referenced by CDiff_MAIN::IsDefaultedRev(), and CDiff_MAIN::SetDefaultInput().

#define STR_DIFFDEFAULT_REV "HEAD"

Definition at line 68 of file DiffDlg.cpp.

Referenced by CDiff_MAIN::IsDefaultedRev(), and CDiff_MAIN::SetDefaultInput().

#define STR_DIFFOPT_DESC_A "Treat all files as text and compare them line-by-line, even if they do not seem to be text"

Definition at line 76 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_B "Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent"

Definition at line 78 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_BB "Ignore changes that just insert or delete blank lines"

Definition at line 80 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_BINARY "Read and write data in binary mode"

Definition at line 82 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_BRIEF "Report only whether the files differ, not the details of the differences"

Definition at line 84 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_C "Use the context output format"

Definition at line 86 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_C_G_F "Use format to output a line group containing differing lines from both files in if-then-else format. See CVS manual for line group formats"

Definition at line 90 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_CC "Use the context output format, showing lines (an integer) lines of context, or three if lines is not given. For proper operation, patch typically needs at least two lines of context"

Definition at line 88 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_D "Change the algorithm to perhaps find a smaller set of changes. This makes diff slower (sometimes much slower)"

Definition at line 92 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_E "Make output that is a valid ed script"

Definition at line 94 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_E_T "Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files"

Definition at line 96 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_F "Make output that looks vaguely like an ed script but has changes in the order they appear in the file"

Definition at line 98 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_F_E "Make output that looks vaguely like an ed script but has changes in the order they appear in the file"

Definition at line 102 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_FF "In context and unified format, for each hunk of differences, show some of the last preceding line that matches regexp"

Definition at line 100 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_H_L "Do not discard the last lines lines of the common prefix and the first lines lines of the common suffix"

Definition at line 106 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_HH "Use heuristics to speed handling of large files that have numerous scattered small changes"

Definition at line 104 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_I "Ignore changes in case; consider upper- and lower-case letters equivalent"

Definition at line 108 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_I_A_S "Ignore white space when comparing lines"

Definition at line 114 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_I_B_L "Ignore changes that just insert or delete blank lines"

Definition at line 116 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_I_C "Ignore changes in case; consider upper- and lower-case to be the same"

Definition at line 118 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_I_M_L "Ignore changes that just insert or delete lines that match regexp"

Definition at line 120 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_I_S_C "Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent"

Definition at line 122 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_I_T "Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal"

Definition at line 124 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_IFDEF "Make merged if-then-else output using name"

Definition at line 112 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_II "Ignore changes that just insert or delete lines that match regexp"

Definition at line 110 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_L_C "Print only the left column of two common lines in side by side format"

Definition at line 130 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_L_F "Use format to output all input lines in if-then-else format. See CVS manual for line formats"

Definition at line 132 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_LABEL "Use label instead of the file name in the context format and unified format headers"

Definition at line 128 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_LL "Use label instead of the file name in the context format and unified format headers"

Definition at line 126 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_MINIMAL "Change the algorithm to perhaps find a smaller set of changes. This makes diff slower (sometimes much slower)"

Definition at line 134 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_N "Output RCS-format diffs; like `-f' except that each command specifies the number of lines affected"

Definition at line 136 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_N_G_F "Use format to output a group of lines taken from just the second file in if-then-else format. See section A.9.1.1 Line group formats"

Definition at line 140 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_N_L_F "Use format to output a line taken from just the second file in if-then-else format. See CVS manual for line formats"

Definition at line 142 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_NN "In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory"

Definition at line 138 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_O_G_F "Use format to output a group of lines taken from just the first file in if-then-else format. See section A.9.1.1 Line group formats"

Definition at line 144 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_O_L_F "Use format to output a line taken from just the first file in if-then-else format. See CVS manual for line formats"

Definition at line 146 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_PP "Show which C function each change is in"

Definition at line 148 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_RCS "Output RCS-format diffs; like `-f' except that each command specifies the number of lines affected"

Definition at line 150 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_S "Report when two files are the same"

Definition at line 152 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_S_B_S "Use the side by side output format"

Definition at line 158 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_S_C_F "Show which C function each change is in"

Definition at line 154 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_S_C_L "Do not print common lines in side by side format"

Definition at line 162 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_S_F_L "In context and unified format, for each hunk of differences, show some of the last preceding line that matches regexp"

Definition at line 156 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_S_L_F "Use heuristics to speed handling of large files that have numerous scattered small changes"

Definition at line 160 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_T "Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files"

Definition at line 164 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_TEXT "Treat all files as text and compare them line-by-line, even if they do not appear to be text"

Definition at line 168 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_TT "Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal"

Definition at line 166 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_U "Use the unified output format"

Definition at line 170 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_U_G_F "Use format to output a group of common lines taken from both files in if-then-else format. See section A.9.1.1 Line group formats"

Definition at line 172 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_U_L_F "Use format to output a line common to both files in if-then-else format. See CVS manual for line formats"

Definition at line 174 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_UU "Use the unified output format, showing lines (an integer) lines of context, or three if lines is not given. For proper operation, patch typically needs at least two lines of context"

Definition at line 176 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_W "Ignore white space when comparing lines"

Definition at line 178 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_WW "Use an output width of columns in side by side format"

Definition at line 180 of file DiffDlg.cpp.

#define STR_DIFFOPT_DESC_Y "Use the side by side output format"

Definition at line 182 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_A "-a"

Definition at line 75 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_B "-b"

Definition at line 77 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_BB "-B"

Definition at line 79 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_BINARY "--binary"

Definition at line 81 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_BRIEF "--brief"

Definition at line 83 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_C "-c"

Definition at line 85 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_C_G_F "--changed-group-format=format"

Definition at line 89 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_CC "-C lines"

Definition at line 87 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_D "-d"

Definition at line 91 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_E "-e"

Definition at line 93 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_E_T "--expand-tabs"

Definition at line 95 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_F "-f"

Definition at line 97 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_F_E "--forward-ed"

Definition at line 101 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_FF "-F regexp"

Definition at line 99 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_H_L "--horizon-lines=lines"

Definition at line 105 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_HH "-H"

Definition at line 103 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_I "-i"

Definition at line 107 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_I_A_S "--ignore-all-space"

Definition at line 113 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_I_B_L "--ignore-blank-lines"

Definition at line 115 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_I_C "--ignore-case"

Definition at line 117 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_I_M_L "--ignore-matching-lines=regexp"

Definition at line 119 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_I_S_C "--ignore-space-change"

Definition at line 121 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_I_T "--initial-tab"

Definition at line 123 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_IFDEF "--ifdef=name"

Definition at line 111 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_II "-I regexp"

Definition at line 109 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_L_C "--left-column"

Definition at line 129 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_L_F "--line-format=format"

Definition at line 131 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_LABEL "--label=label"

Definition at line 127 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_LL "-L label"

Definition at line 125 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_MINIMAL "--minimal"

Definition at line 133 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_N "-n"

Definition at line 135 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_N_G_F "--new-group-format=format"

Definition at line 139 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_N_L_F "--new-line-format=format"

Definition at line 141 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_NN "-N"

Definition at line 137 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_O_G_F "--old-group-format=format"

Definition at line 143 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_O_L_F "--old-line-format=format"

Definition at line 145 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_P "-p"

Definition at line 147 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_RCS "--rcs"

Definition at line 149 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_S "-s"

Definition at line 151 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_S_B_S "--side-by-side"

Definition at line 157 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_S_C_F "--show-c-function"

Definition at line 153 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_S_C_L "--suppress-common-lines"

Definition at line 161 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_S_F_L "--show-function-line=regexp"

Definition at line 155 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_S_L_F "--speed-large-files"

Definition at line 159 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_T "-t"

Definition at line 163 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_TEXT "--text"

Definition at line 167 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_TT "-T"

Definition at line 165 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_U "-u"

Definition at line 169 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_U_G_F "--unchanged-group-format=format"

Definition at line 171 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_U_L_F "--unchanged-line-format=format"

Definition at line 173 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_UU "-U lines"

Definition at line 175 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_W "-w"

Definition at line 177 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_WW "-W columns"

Definition at line 179 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPT_Y "-y"

Definition at line 181 of file DiffDlg.cpp.

#define STR_DIFFOPT_OPTIONDESCRIPTION_FORMAT "[%s]: %s"

Definition at line 72 of file DiffDlg.cpp.

Referenced by CDiff_Options::OnItemchangedOptionslist().

Typedef Documentation

typedef struct _sDiffOptionsItem DiffOptionsItem

Define the diff options list items.

Referenced by CDiff_Options::CompareItems(), and CDiff_Options::OnInitDialog().

Function Documentation

bool CompatGetDiff | ( | const MultiFiles * | mf,
 |  | kDiffCmdType | diffType,
 |  | bool & | noRecurs,
 |  | bool & | isDate1,
 |  | bool & | isDate2,
 |  | UStr & | rev1,
 |  | UStr & | rev2,
 |  | bool & | useExtDiff,
 |  | UStr & | extDiffTool,
 |  | bool & | unifiedDiff,
 |  | bool & | noWhiteSpace,
 |  | bool & | noBlankLines,
 |  | bool & | ignoreCase,
 |  | UStr & | keyword,
 |  | UStr & | diffOptions,
 |  | bool | allowExtDiff
 | ) |

Get the diff options.

Definition at line 1166 of file DiffDlg.cpp.

References CStr, EV_INIT_WIDGET, CvsPrefs::ExtDiff(), gCvsPrefs, gIgnoreCase, gNoBlankLines, gNoWhiteSpace, gUnifiedDiff, gUseExtDiff, CvsPrefs::HideCommandDlgDiff(), kCompareAnotherRev, kCompareSameRev, kCompareTwoRev, kDiffGraph, kUMainWidget, CDiff_MAIN::m_compareType, CDiff_MAIN::m_diffOptions, CDiff_MAIN::m_extDiff, CDiff_MAIN::m_ignoreCase, CDiff_MAIN::m_isDate1, CDiff_MAIN::m_isDate2, CDiff_MAIN::m_keyword, CDiff_MAIN::m_noRecurs, CDiff_MAIN::m_noWhiteSpace, CDiff_MAIN::m_rev1, CDiff_MAIN::m_rev2, CDiff_MAIN::m_unifiedDiff, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgDiff(), CGetPrefs_GLOBALS::StoreValues(), UCreate_DiffDlg(), and UEventSendMessage().

Referenced by CvsCmdDiff().

01172 {
01173     bool userHitOK = false;
01174
01175     static CStr sLastRev1;
01176     static CStr sLastRev2;
01177     static CStr sLastKeyword;
01178     static CStr sLastDiffOptions;
01179
01180     bool hasRev1;
01181     bool hasRev2;
01182     CStr initialRev1, initialRev2;
01183
01184     // Graph view diff supplies initial revisions, so don't override them
01185     if( diffType == kDiffGraph )
01186     {
01187         initialRev1 = rev1;
01188         initialRev2 = rev2;
01189         hasRev1 = !rev1.empty();
01190         hasRev2 = !rev2.empty();
01191     }
01192     else
01193     {
01194         rev1 = "";
01195         rev2 = "";
01196         hasRev1 = false;
01197         hasRev2 = false;
01198         initialRev1 = sLastRev1;
01199         initialRev2 = sLastRev2;
01200     }
01201
01202     noRecurs = false;
01203     isDate1 = false;
01204     isDate2 = false;
01205     useExtDiff = (bool)gUseExtDiff;
01206     noWhiteSpace = (bool)gNoWhiteSpace;
01207     noBlankLines = (bool)gNoBlankLines;
01208     ignoreCase = (bool)gIgnoreCase;
01209     unifiedDiff = (bool)gUnifiedDiff;
01210     extDiffTool = gCvsPrefs.ExtDiff();
01211
01212 //{ Win32 - Part
01213 #ifdef WIN32
01214     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgDiff(), "Diff settings");
01215     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01216
01217     CDiff_MAIN page1(mf, diffType, initialRev1, initialRev2, allowExtDiff, useExtDiff, unifiedDiff, noWhiteSpace, ignoreCase, sLastKeyword, sLastDiffOptions);
01218     CGetPrefs_GLOBALS page2;
01219
01220     pages.AddPage(&page1);
01221     pages.AddPage(&page2);
01222
01223     if( pages.DoModal() == IDOK )
01224     {
01225         noRecurs = page1.m_noRecurs ? true : false;
01226
01227         sLastRev1 = page1.m_rev1;
01228         sLastRev2 = page1.m_rev2;
01229         isDate1 = page1.m_isDate1 ? true : false;
01230         isDate2 = page1.m_isDate2 ? true : false;
01231
01232         gUseExtDiff = page1.m_extDiff ? true : false;
01233
01234         switch( page1.m_compareType )
01235         {
01236         default:
01237             ASSERT(FALSE);  //unknown compare type
01238         case kCompareSameRev:
01239             hasRev1 = hasRev2 = false;
01240             break;
01241         case kCompareAnotherRev:
01242             hasRev1 = true;
01243             hasRev2 = false;
01244             break;
01245         case kCompareTwoRev:
01246             hasRev1 = true;
01247             hasRev2 = true;
01248             break;
01249         }
01250
01251         gUnifiedDiff = page1.m_unifiedDiff ? true : false;
01252         gNoWhiteSpace = page1.m_noWhiteSpace ? true : false;
01253         gIgnoreCase = page1.m_ignoreCase ? true : false;
01254
01255         sLastKeyword = page1.m_keyword;
01256         sLastDiffOptions = page1.m_diffOptions;
01257
01258         page2.StoreValues();
01259         gCvsPrefs.SetHideCommandDlgDiff(pages.GetHideCommandDlg());
01260         userHitOK = true;
01261     }
01262 #endif /* WIN32 */
01263 //} Win32 - Part
01264 //{ Mac - Part
01265 #ifdef qMacCvsPP
01266     StOptionalDialogHandler theHandler(dlg_Diff, gCvsPrefs.HideCommandDlgDiff(), LCommander::GetTopCommander());
01267     LWindow *theDialog = theHandler.GetDialog();
01268     ThrowIfNil_(theDialog);
01269     static UInt16 sRuntimePanel = 1;
01270
01271     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01272         (theDialog->FindPaneByID(item_MultiViewPrefs));
01273     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01274
01275     multiView->SwitchToPanel(2);
01276     DoDataExchange_Globals(theDialog, true);
01277     multiView->SwitchToPanel(1);
01278     DoDataExchange_DiffMain(theDialog, mf, noRecurs, isDate1, isDate2, initialRev1, initialRev2,
01279         hasRev1, hasRev2, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, useExtDiff, allowExtDiff, extDiffTool, true);
01280     if ( diffType == kDiffGraph )
01281     {
01282       // disable label chooser view
01283       LPane   *labelOptionsGroup = theDialog->FindPaneByID(item_DiffLabelOptions);
01284       if ( labelOptionsGroup ) labelOptionsGroup->Disable();
01285     }
01286     groupView->SetValue(sRuntimePanel);
01287     // skip dialog when option key is pressed
01288   MessageT hitMessage;
01289     theHandler.ShowDialog();
01290     while (true)
01291     {       // Let DialogHandler process events
01292         hitMessage = theHandler.DoDialog();
01293
01294         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01295             break;
01296
01297       HandleHitMessage_DiffTool(theDialog, hitMessage);
01298     }
01299     theDialog->Hide();
01300     sRuntimePanel = groupView->GetValue();
01301
01302     if(hitMessage == msg_OK)
01303     {
01304         multiView->SwitchToPanel(1);
01305         DoDataExchange_DiffMain(theDialog, mf, noRecurs, isDate1, isDate2, sLastRev1, sLastRev2,
01306           hasRev1, hasRev2, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, useExtDiff, allowExtDiff, extDiffTool, false);
01307         gNoWhiteSpace   = noWhiteSpace;
01308         gNoBlankLines   = noBlankLines;
01309         gIgnoreCase     = ignoreCase;
01310         gUnifiedDiff    = unifiedDiff;
01311         gUseExtDiff     = useExtDiff;
01312         multiView->SwitchToPanel(2);
01313         DoDataExchange_Globals(theDialog, false);
01314         gCvsPrefs.SetHideCommandDlgDiff(theHandler.GetHideCommandDlg());
01315         userHitOK = true;
01316     }
01317 #endif /* qMacCvsPP */
01318 //} Mac - Part
01319 //{ Unix - Part
01320 #if qUnix
01321     void *wid = UCreate_DiffDlg();
01322
01323     UCvsDiff *dlg = new UCvsDiff();
01324     UCvsDiff_MAIN *tab1 = new UCvsDiff_MAIN(sLastRev1, sLastRev2, allowExtDiff, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase);
01325     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01326     dlg->AddPage(tab1, UCvsDiff::kTabGeneral, 0);
01327
01328     if(dlg->DoModal())
01329     {
01330         noRecurs = tab1->m_norecurs;
01331
01332         gNoWhiteSpace   = tab1->m_noWhiteSpace != 0;
01333         gNoBlankLines   = tab1->m_noBlankLines != 0;
01334         gIgnoreCase     = tab1->m_ignoreCase != 0;
01335         gUnifiedDiff    = tab1->m_unifiedDiff != 0;
01336         gUseExtDiff     = tab1->m_extdiff;
01337
01338         sLastRev1 = tab1->m_rev1;
01339         sLastRev2 = tab1->m_rev2;
01340         isDate1 = tab1->m_check1;
01341         isDate2 = tab1->m_check2;
01342
01343         if(tab1->m_diff == 0)
01344         {
01345             hasRev1 = hasRev2 = false;
01346         }
01347         else if(tab1->m_diff == 1)
01348         {
01349             hasRev1 = true;
01350             hasRev2 = false;
01351         }
01352         else
01353         {
01354             hasRev1 = true;
01355             hasRev2 = true;
01356         }
01357
01358         userHitOK = true;
01359     }
01360
01361     delete dlg;
01362 #endif // qUnix
01363 //} Unix - Part
01364
01365     if( userHitOK )
01366     {
01367         if( hasRev1 )
01368             rev1 = sLastRev1;
01369
01370         if( hasRev2 )
01371             rev2 = sLastRev2;
01372
01373         useExtDiff     = (bool)gUseExtDiff;
01374         noWhiteSpace   = (bool)gNoWhiteSpace;
01375         noBlankLines   = (bool)gNoBlankLines;
01376         unifiedDiff    = (bool)gUnifiedDiff;
01377         ignoreCase     = (bool)gIgnoreCase;
01378
01379         if( !sLastDiffOptions.empty() )
01380         {
01381             diffOptions = sLastDiffOptions;
01382         }
01383
01384         if( !sLastKeyword.empty() )
01385         {
01386             keyword = sLastKeyword;
01387         }
01388
01389         gCvsPrefs.save();
01390     }
01391
01392     return userHitOK;
01393 }

Here is the call graph for this function:

Variable Documentation

CMString gDateOrRevNames

CMString gDiffOptions(20,"P_DiffOptions")

Referenced by CDiff_MAIN::CDiff_MAIN().

CPersistentBool gIgnoreCase("P_IgnoreCase", false) [static]

Referenced by CompatGetDiff().

CPersistentBool gNoBlankLines("P_NoBlankLines", false) [static]

Referenced by CompatGetDiff().

CPersistentBool gNoWhiteSpace("P_NoWhiteSpace", false) [static]

Referenced by CompatGetDiff().

CPersistentBool gUnifiedDiff("P_UnifiedDiff", false) [static]

Referenced by CompatGetDiff().

CPersistentBool gUseExtDiff("P_DiffUseExtDiff", false)

Referenced by CompatGetDiff().

DiffOptionsItem sDiffOptions[] [static]

Command line diff options and their descriptions.

Definition at line 191 of file DiffDlg.cpp.

Referenced by CDiff_Options::OnInitDialog().

Generated on Sat Aug 7 22:44:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/DiffDlg.h File Reference

common/DiffDlg.h File Reference

#include "SmartComboBox.h"
#include "KeywordComboBox.h"
#include "uwidget.h"
#include "CvsCommands.h"
#include "SortHeaderCtrl.h"
#include "HHelpSupport.h"

Include dependency graph for DiffDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CDiff_MAIN
class | CDiff_Options
struct | CDiff_Options::CompareInfo
Structure to hold the sorting settings. More...

Defines

#define | AFX_DIFFDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Enumerations

enum {
kCompareSameRev = 0,
kCompareAnotherRev,
kCompareTwoRev
}
Compare type enum. More...

Functions

bool | CompatGetDiff (const MultiFiles *mf, kDiffCmdType diffType, bool &noRecurs, bool &isDate1, bool &isDate2, UStr &rev1, UStr &rev2, bool &useExtDiff, UStr &extDiffTool, bool &useUnifiedDiff, bool &noWhiteSpace, bool &noBlankLines, bool &ignoreCase, UStr &keyword, UStr &diffOptions, bool allowExtDiff=false)
Get the diff options.

Define Documentation

#define AFX_DIFFDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file DiffDlg.h.

Enumeration Type Documentation

anonymous enum

Compare type enum.

Enumeration values:
kCompareSameRev | Compare local copy against the same remote revision
kCompareAnotherRev | Compare local copy against another revision/tag/branch or date
kCompareTwoRev | Compare two revisions/tags/branches or dates against each other
Definition at line 45 of file DiffDlg.h.
00046 {
00047     kCompareSameRev = 0,
00048     kCompareAnotherRev,
00049     kCompareTwoRev
00050 };

Function Documentation

bool CompatGetDiff | ( | const MultiFiles * | mf,
 |  | kDiffCmdType | diffType,
 |  | bool & | noRecurs,
 |  | bool & | isDate1,
 |  | bool & | isDate2,
 |  | UStr & | rev1,
 |  | UStr & | rev2,
 |  | bool & | useExtDiff,
 |  | UStr & | extDiffTool,
 |  | bool & | useUnifiedDiff,
 |  | bool & | noWhiteSpace,
 |  | bool & | noBlankLines,
 |  | bool & | ignoreCase,
 |  | UStr & | keyword,
 |  | UStr & | diffOptions,
 |  | bool | allowExtDiff = false
 | ) |

Get the diff options.

Definition at line 1166 of file DiffDlg.cpp.

References CStr, EV_INIT_WIDGET, CvsPrefs::ExtDiff(), gCvsPrefs, gIgnoreCase, gNoBlankLines, gNoWhiteSpace, gUnifiedDiff, gUseExtDiff, CvsPrefs::HideCommandDlgDiff(), kCompareAnotherRev, kCompareSameRev, kCompareTwoRev, kDiffGraph, kUMainWidget, CDiff_MAIN::m_compareType, CDiff_MAIN::m_diffOptions, CDiff_MAIN::m_extDiff, CDiff_MAIN::m_ignoreCase, CDiff_MAIN::m_isDate1, CDiff_MAIN::m_isDate2, CDiff_MAIN::m_keyword, CDiff_MAIN::m_noRecurs, CDiff_MAIN::m_noWhiteSpace, CDiff_MAIN::m_rev1, CDiff_MAIN::m_rev2, CDiff_MAIN::m_unifiedDiff, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgDiff(), CGetPrefs_GLOBALS::StoreValues(), UCreate_DiffDlg(), and UEventSendMessage().

Referenced by CvsCmdDiff().

01172 {
01173     bool userHitOK = false;
01174
01175     static CStr sLastRev1;
01176     static CStr sLastRev2;
01177     static CStr sLastKeyword;
01178     static CStr sLastDiffOptions;
01179
01180     bool hasRev1;
01181     bool hasRev2;
01182     CStr initialRev1, initialRev2;
01183
01184     // Graph view diff supplies initial revisions, so don't override them
01185     if( diffType == kDiffGraph )
01186     {
01187         initialRev1 = rev1;
01188         initialRev2 = rev2;
01189         hasRev1 = !rev1.empty();
01190         hasRev2 = !rev2.empty();
01191     }
01192     else
01193     {
01194         rev1 = "";
01195         rev2 = "";
01196         hasRev1 = false;
01197         hasRev2 = false;
01198         initialRev1 = sLastRev1;
01199         initialRev2 = sLastRev2;
01200     }
01201
01202     noRecurs = false;
01203     isDate1 = false;
01204     isDate2 = false;
01205     useExtDiff = (bool)gUseExtDiff;
01206     noWhiteSpace = (bool)gNoWhiteSpace;
01207     noBlankLines = (bool)gNoBlankLines;
01208     ignoreCase = (bool)gIgnoreCase;
01209     unifiedDiff = (bool)gUnifiedDiff;
01210     extDiffTool = gCvsPrefs.ExtDiff();
01211
01212 //{ Win32 - Part
01213 #ifdef WIN32
01214     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgDiff(), "Diff settings");
01215     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01216
01217     CDiff_MAIN page1(mf, diffType, initialRev1, initialRev2, allowExtDiff, useExtDiff, unifiedDiff, noWhiteSpace, ignoreCase, sLastKeyword, sLastDiffOptions);
01218     CGetPrefs_GLOBALS page2;
01219
01220     pages.AddPage(&page1);
01221     pages.AddPage(&page2);
01222
01223     if( pages.DoModal() == IDOK )
01224     {
01225         noRecurs = page1.m_noRecurs ? true : false;
01226
01227         sLastRev1 = page1.m_rev1;
01228         sLastRev2 = page1.m_rev2;
01229         isDate1 = page1.m_isDate1 ? true : false;
01230         isDate2 = page1.m_isDate2 ? true : false;
01231
01232         gUseExtDiff = page1.m_extDiff ? true : false;
01233
01234         switch( page1.m_compareType )
01235         {
01236         default:
01237             ASSERT(FALSE);  //unknown compare type
01238         case kCompareSameRev:
01239             hasRev1 = hasRev2 = false;
01240             break;
01241         case kCompareAnotherRev:
01242             hasRev1 = true;
01243             hasRev2 = false;
01244             break;
01245         case kCompareTwoRev:
01246             hasRev1 = true;
01247             hasRev2 = true;
01248             break;
01249         }
01250
01251         gUnifiedDiff = page1.m_unifiedDiff ? true : false;
01252         gNoWhiteSpace = page1.m_noWhiteSpace ? true : false;
01253         gIgnoreCase = page1.m_ignoreCase ? true : false;
01254
01255         sLastKeyword = page1.m_keyword;
01256         sLastDiffOptions = page1.m_diffOptions;
01257
01258         page2.StoreValues();
01259         gCvsPrefs.SetHideCommandDlgDiff(pages.GetHideCommandDlg());
01260         userHitOK = true;
01261     }
01262 #endif /* WIN32 */
01263 //} Win32 - Part
01264 //{ Mac - Part
01265 #ifdef qMacCvsPP
01266     StOptionalDialogHandler theHandler(dlg_Diff, gCvsPrefs.HideCommandDlgDiff(), LCommander::GetTopCommander());
01267     LWindow *theDialog = theHandler.GetDialog();
01268     ThrowIfNil_(theDialog);
01269     static UInt16 sRuntimePanel = 1;
01270
01271     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01272         (theDialog->FindPaneByID(item_MultiViewPrefs));
01273     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01274
01275     multiView->SwitchToPanel(2);
01276     DoDataExchange_Globals(theDialog, true);
01277     multiView->SwitchToPanel(1);
01278     DoDataExchange_DiffMain(theDialog, mf, noRecurs, isDate1, isDate2, initialRev1, initialRev2,
01279         hasRev1, hasRev2, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, useExtDiff, allowExtDiff, extDiffTool, true);
01280     if ( diffType == kDiffGraph )
01281     {
01282       // disable label chooser view
01283       LPane   *labelOptionsGroup = theDialog->FindPaneByID(item_DiffLabelOptions);
01284       if ( labelOptionsGroup ) labelOptionsGroup->Disable();
01285     }
01286     groupView->SetValue(sRuntimePanel);
01287     // skip dialog when option key is pressed
01288   MessageT hitMessage;
01289     theHandler.ShowDialog();
01290     while (true)
01291     {       // Let DialogHandler process events
01292         hitMessage = theHandler.DoDialog();
01293
01294         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01295             break;
01296
01297       HandleHitMessage_DiffTool(theDialog, hitMessage);
01298     }
01299     theDialog->Hide();
01300     sRuntimePanel = groupView->GetValue();
01301
01302     if(hitMessage == msg_OK)
01303     {
01304         multiView->SwitchToPanel(1);
01305         DoDataExchange_DiffMain(theDialog, mf, noRecurs, isDate1, isDate2, sLastRev1, sLastRev2,
01306           hasRev1, hasRev2, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, useExtDiff, allowExtDiff, extDiffTool, false);
01307         gNoWhiteSpace   = noWhiteSpace;
01308         gNoBlankLines   = noBlankLines;
01309         gIgnoreCase     = ignoreCase;
01310         gUnifiedDiff    = unifiedDiff;
01311         gUseExtDiff     = useExtDiff;
01312         multiView->SwitchToPanel(2);
01313         DoDataExchange_Globals(theDialog, false);
01314         gCvsPrefs.SetHideCommandDlgDiff(theHandler.GetHideCommandDlg());
01315         userHitOK = true;
01316     }
01317 #endif /* qMacCvsPP */
01318 //} Mac - Part
01319 //{ Unix - Part
01320 #if qUnix
01321     void *wid = UCreate_DiffDlg();
01322
01323     UCvsDiff *dlg = new UCvsDiff();
01324     UCvsDiff_MAIN *tab1 = new UCvsDiff_MAIN(sLastRev1, sLastRev2, allowExtDiff, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase);
01325     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01326     dlg->AddPage(tab1, UCvsDiff::kTabGeneral, 0);
01327
01328     if(dlg->DoModal())
01329     {
01330         noRecurs = tab1->m_norecurs;
01331
01332         gNoWhiteSpace   = tab1->m_noWhiteSpace != 0;
01333         gNoBlankLines   = tab1->m_noBlankLines != 0;
01334         gIgnoreCase     = tab1->m_ignoreCase != 0;
01335         gUnifiedDiff    = tab1->m_unifiedDiff != 0;
01336         gUseExtDiff     = tab1->m_extdiff;
01337
01338         sLastRev1 = tab1->m_rev1;
01339         sLastRev2 = tab1->m_rev2;
01340         isDate1 = tab1->m_check1;
01341         isDate2 = tab1->m_check2;
01342
01343         if(tab1->m_diff == 0)
01344         {
01345             hasRev1 = hasRev2 = false;
01346         }
01347         else if(tab1->m_diff == 1)
01348         {
01349             hasRev1 = true;
01350             hasRev2 = false;
01351         }
01352         else
01353         {
01354             hasRev1 = true;
01355             hasRev2 = true;
01356         }
01357
01358         userHitOK = true;
01359     }
01360
01361     delete dlg;
01362 #endif // qUnix
01363 //} Unix - Part
01364
01365     if( userHitOK )
01366     {
01367         if( hasRev1 )
01368             rev1 = sLastRev1;
01369
01370         if( hasRev2 )
01371             rev2 = sLastRev2;
01372
01373         useExtDiff     = (bool)gUseExtDiff;
01374         noWhiteSpace   = (bool)gNoWhiteSpace;
01375         noBlankLines   = (bool)gNoBlankLines;
01376         unifiedDiff    = (bool)gUnifiedDiff;
01377         ignoreCase     = (bool)gIgnoreCase;
01378
01379         if( !sLastDiffOptions.empty() )
01380         {
01381             diffOptions = sLastDiffOptions;
01382         }
01383
01384         if( !sLastKeyword.empty() )
01385         {
01386             keyword = sLastKeyword;
01387         }
01388
01389         gCvsPrefs.save();
01390     }
01391
01392     return userHitOK;
01393 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_garbage.c File Reference

common/dll_garbage.c File Reference

#include <stdio.h>
#include "dll_garbage.h"

Include dependency graph for dll_garbage.c:

Include dependency graph

Go to the source code of this file.

Classes

struct | _frameRec
struct | DYN_LIST
struct | poolRec
struct | garbyRec

Defines

#define | AUTO_INITALIZE 0
#define | qRangeCheck 0
#define | platform_calloc(s1, s2) calloc(s1, s2)
#define | platform_malloc(s) malloc(s)
#define | platform_realloc(p, s) realloc(p, s)
#define | platform_free(p) free(p)
#define | GARBY_DEF_ALLOC 20
#define | GARBY_DEF_POOL 20
#define | MODULE_SIZE 8
#define | garbyFree(ptr) garby_free(ptr)
#define | garbyAlloc(ptr, line, file) garby_alloc(ptr)
#define | garbyRealloc(ptr, NewPtr, line, file) garby_realloc(ptr, NewPtr)

Typedefs

typedef _frameRec | frameRec
typedef DYN_LIST | DYN_LIST
typedef * | poolPtr
typedef * | garbyPtr

Functions

DYN_LIST * | listNew (int sizeOfCell, int numOfDefaultCell)
void | listFree (DYN_LIST *list)
void * | listAddCell (DYN_LIST *list)
int | GARBY_KEY (void *address)
void | garbyNew (void)
void | poolRemove (poolPtr collector, int reallyRemove, int verboseMemoryLeak, int *numLeaks)
void | garbyRemove (int verboseSummary, int verboseMemoryLeak)
void | setModule (char *where, const char *what)
void * | poolAlloc (poolPtr pool, void *ptr)
void * | poolFree (register poolPtr garb, void *ptr)
void * | garby_free (void *ptr)
void * | garby_alloc (void *ptr)
void * | garby_realloc (void *ptr, void *newptr)
void * | shl_malloc (size_t size)
void * | shl_calloc (size_t nmemb, size_t size)
void * | shl_realloc (void *ptr, size_t size)
void | shl_free (void *ptr)

Variables

garbyPtr | gGarbage = NULL

Define Documentation

#define AUTO_INITALIZE 0

Definition at line 46 of file dll_garbage.c.

#define GARBY_DEF_ALLOC 20

Definition at line 261 of file dll_garbage.c.

Referenced by garbyNew().

#define GARBY_DEF_POOL 20

Definition at line 262 of file dll_garbage.c.

Referenced by GARBY_KEY(), garbyNew(), and garbyRemove().

#define garbyAlloc | ( | ptr,
 |  | line,
 |  | file | ) | garby_alloc(ptr)

Definition at line 633 of file dll_garbage.c.

Referenced by shl_calloc(), shl_malloc(), and shl_realloc().

#define garbyFree ( ptr ) garby_free(ptr)

Definition at line 621 of file dll_garbage.c.

Referenced by shl_free(), and shl_realloc().

#define garbyRealloc | ( | ptr,
 |  | NewPtr,
 |  | line,
 |  | file | ) | garby_realloc(ptr, NewPtr)

Definition at line 634 of file dll_garbage.c.

Referenced by shl_realloc().

#define MODULE_SIZE 8

Definition at line 263 of file dll_garbage.c.

Referenced by setModule().

#define platform_calloc | ( | s1,
 |  | s2 | ) | calloc(s1, s2)

Definition at line 93 of file dll_garbage.c.

Referenced by shl_calloc().

#define platform_free ( p ) free(p)

Definition at line 96 of file dll_garbage.c.

Referenced by garbyRemove(), listFree(), poolRemove(), shl_free(), and shl_realloc().

#define platform_malloc ( s ) malloc(s)

Definition at line 94 of file dll_garbage.c.

Referenced by garbyNew(), listAddCell(), listNew(), shl_malloc(), and shl_realloc().

#define platform_realloc | ( | p,
 |  | s | ) | realloc(p, s)

Definition at line 95 of file dll_garbage.c.

Referenced by shl_realloc().

#define qRangeCheck 0

Definition at line 52 of file dll_garbage.c.

Typedef Documentation

typedef struct DYN_LIST DYN_LIST

Referenced by listAddCell(), and listNew().

typedef struct _frameRec frameRec

Referenced by garbyNew(), poolAlloc(), poolFree(), and poolRemove().

typedef * garbyPtr

Referenced by garbyNew().

typedef * poolPtr

Function Documentation

void * garby_alloc ( void * ptr ) [static]

Definition at line 640 of file dll_garbage.c.

References GARBY_KEY(), garbyNew(), gGarbage, NULL, and poolAlloc().

Referenced by garby_realloc().

00642 {
00643 #if AUTO_INITALIZE
00644     if(gGarbage == 0L)
00645         garbyNew();
00646 #endif /* AUTO_INITALIZE */
00647
00648     if(gGarbage == NULL || ptr == NULL)
00649         return ptr;
00650
00651 #if qCvsDebug
00652     return poolAlloc(&gGarbage->pools[GARBY_KEY(ptr)], ptr, line, file);
00653 #else
00654     return poolAlloc(&gGarbage->pools[GARBY_KEY(ptr)], ptr);
00655 #endif
00656 }

Here is the call graph for this function:

void * garby_free ( void * ptr ) [static]

Definition at line 658 of file dll_garbage.c.

References GARBY_KEY(), gGarbage, NULL, and poolFree().

Referenced by garby_realloc().

00659 {
00660     if(gGarbage == NULL || ptr == NULL)
00661         return ptr;
00662
00663     return poolFree(&gGarbage->pools[GARBY_KEY(ptr)], ptr);
00664 }

Here is the call graph for this function:

int GARBY_KEY ( void * address ) [static]

Definition at line 366 of file dll_garbage.c.

References GARBY_DEF_POOL.

Referenced by garby_alloc(), and garby_free().

00367 {
00368     register unsigned long add = (unsigned long)address;
00369
00370     return (add >> 8) % GARBY_DEF_POOL;
00371 }

void * garby_realloc | ( | void * | ptr,
 |  | void * | newptr
 | ) | [static]

Definition at line 669 of file dll_garbage.c.

References garby_alloc(), garby_free(), garbyNew(), and gGarbage.

00671 {
00672 #if AUTO_INITALIZE
00673     if(gGarbage == 0L)
00674         garbyNew();
00675 #endif /* AUTO_INITALIZE */
00676
00677     garby_free(ptr);
00678 #if qCvsDebug
00679     return garby_alloc(newptr, line, file);
00680 #else
00681     return garby_alloc(newptr);
00682 #endif
00683 }

Here is the call graph for this function:

void garbyNew ( void )

Definition at line 374 of file dll_garbage.c.

References exit, frameRec, GARBY_DEF_ALLOC, GARBY_DEF_POOL, garbyPtr, gGarbage, listNew(), NULL, and platform_malloc.

Referenced by __cvs_initialize(), garby_alloc(), and garby_realloc().

00375 {
00376     int i;
00377
00378 #if AUTO_INITALIZE
00379     if(gGarbage != 0L)
00380         return;
00381 #endif /* AUTO_INITALIZE */
00382
00383     gGarbage = (garbyPtr) platform_malloc(sizeof(garbyRec));
00384     if(gGarbage == NULL)
00385     {
00386         fprintf(stderr, "failed to allocate %d bytes\n", sizeof(garbyRec));
00387         exit(-1);
00388     }
00389
00390 #if qRangeCheck
00391     for(i = 0; i < GARBY_DEF_POOL; i++)
00392     {
00393         gGarbage->pools[i].firstentry = NULL;
00394         gGarbage->pools[i].firstfree = NULL;
00395         gGarbage->pools[i].pool = 0L;
00396     }
00397 #endif /* qRangeCheck */
00398     for(i = 0; i < GARBY_DEF_POOL; i++)
00399     {
00400         gGarbage->pools[i].firstentry = NULL;
00401         gGarbage->pools[i].firstfree = NULL;
00402         gGarbage->pools[i].pool = listNew(sizeof(frameRec), GARBY_DEF_ALLOC);
00403     }
00404 }

Here is the call graph for this function:

void garbyRemove | ( | int | verboseSummary,
 |  | int | verboseMemoryLeak
 | ) |

Definition at line 444 of file dll_garbage.c.

References GARBY_DEF_POOL, gGarbage, NULL, platform_free, and poolRemove().

Referenced by __cvs_terminate(), and flush_all().

00445 {
00446     int i;
00447     int numLeaks = 0;
00448     int reallyRemove = !verboseSummary;
00449
00450     if(gGarbage == NULL)
00451         return;
00452
00453     for(i = 0; i < GARBY_DEF_POOL; i++)
00454         poolRemove(&gGarbage->pools[i], reallyRemove, verboseMemoryLeak, &numLeaks);
00455
00456     if(reallyRemove)
00457     {
00458         platform_free(gGarbage);
00459         gGarbage = NULL;
00460     }
00461
00462 #if qCvsDebug
00463     if(verboseSummary)
00464         fprintf(stderr, "\nGarbage collection : purged %d allocations\n", numLeaks);
00465 #endif
00466 }

Here is the call graph for this function:

void* listAddCell ( DYN_LIST * list ) [static]

Definition at line 340 of file dll_garbage.c.

References DYN_LIST::current, DYN_LIST::defaultnumcells, DYN_LIST, exit, DYN_LIST::next, NULL, DYN_LIST::numentries, platform_malloc, DYN_LIST::sizeofcell, and DYN_LIST::totpage.

Referenced by poolAlloc().

00341 {
00342     DYN_LIST *current;
00343
00344     current = list->current;
00345
00346     if(current->numentries == list->defaultnumcells)
00347     {
00348         current->next = (DYN_LIST *)platform_malloc(sizeof(DYN_LIST) + list->sizeofcell * list->defaultnumcells);
00349         if(current->next == NULL)
00350         {
00351             fprintf(stderr, "failed to allocate %d bytes\n", sizeof(DYN_LIST) + list->sizeofcell * list->defaultnumcells);
00352             exit(-1);
00353         }
00354
00355         current = current->next;
00356         current->numentries = 0;
00357         current->next = NULL;
00358         list->current = current;
00359         list->totpage++;
00360     }
00361
00362     return (char *)(current + 1) + current->numentries++ * list->sizeofcell;
00363 }

void listFree ( DYN_LIST * list ) [static]

Definition at line 326 of file dll_garbage.c.

References DYN_LIST::next, NULL, and platform_free.

Referenced by poolRemove().

00327 {
00328     DYN_LIST *ptc1, *ptc2;
00329
00330     ptc1 = list;
00331     while(ptc1 != NULL)
00332     {
00333         ptc2 = ptc1;
00334         ptc1 = ptc1->next;
00335         platform_free(ptc2);
00336     }
00337 }

DYN_LIST* listNew | ( | int | sizeOfCell,
 |  | int | numOfDefaultCell
 | ) | [static]

Definition at line 305 of file dll_garbage.c.

References DYN_LIST::current, DYN_LIST::defaultnumcells, DYN_LIST, exit, DYN_LIST::next, NULL, DYN_LIST::numentries, platform_malloc, DYN_LIST::sizeofcell, and DYN_LIST::totpage.

Referenced by garbyNew().

00306 {
00307     DYN_LIST *result;
00308
00309     result = (DYN_LIST *)platform_malloc(sizeof(DYN_LIST) + sizeOfCell * numOfDefaultCell);
00310     if(result == NULL)
00311     {
00312         fprintf(stderr, "failed to allocate %d bytes\n", sizeof(DYN_LIST) + sizeOfCell * numOfDefaultCell);
00313         exit(-1);
00314     }
00315
00316     result->numentries = result->totpage = 0;
00317     result->defaultnumcells = numOfDefaultCell;
00318     result->sizeofcell = sizeOfCell;
00319     result->next = NULL;
00320     result->current = result;
00321
00322     return result;
00323 }

void* poolAlloc | ( | poolPtr | pool,
 |  | void * | ptr
 | ) | [static]

Definition at line 527 of file dll_garbage.c.

References _frameRec::entry, frameRec, listAddCell(), _frameRec::next, NULL, and setModule().

Referenced by garby_alloc().

00529 {
00530     frameRec *newframe;
00531
00532     if(pool->firstfree != NULL)
00533     {
00534         /*
00535          * there is place already free inside collector
00536          */
00537         newframe = pool->firstfree;
00538         pool->firstfree = newframe->next;
00539     }
00540     else
00541     {
00542         /*
00543          * create a new entry into the pool
00544          */
00545         newframe = (frameRec *)listAddCell(pool->pool);
00546     }
00547
00548     newframe->entry = ptr;
00549     newframe->next = pool->firstentry;
00550     pool->firstentry = newframe;
00551
00552 #if qCvsDebug
00553     setModule(newframe->module, file);
00554     newframe->line = line;
00555 #endif
00556
00557     return ptr;
00558 }

Here is the call graph for this function:

void* poolFree | ( | register poolPtr | garb,
 |  | void * | ptr
 | ) | [static]

Definition at line 560 of file dll_garbage.c.

References _frameRec::entry, frameRec, _frameRec::next, and NULL.

Referenced by garby_free().

00561 {
00562     frameRec *frame, *prev;
00563
00564     /*
00565      * if failed, collector is corrupted
00566      */
00567     frame = garb->firstentry;
00568     if(frame == NULL)
00569     {
00570 #ifdef macintosh
00571         /* only  on mac cause we are sure to intercept every allocations */
00572         fprintf(stderr, "panic ! memory collector is corrupted !\n");
00573         return NULL;
00574 #else /* !macintosh */
00575         return ptr;
00576 #endif /* !macintosh */
00577     }
00578
00579     /*
00580      * - we mark the entry to be free
00581      */
00582     if(frame->entry == ptr)
00583     {
00584         frame = garb->firstentry;
00585         garb->firstentry = frame->next;
00586     }
00587     else
00588     {
00589         prev = NULL;
00590         while(frame->entry != ptr)
00591         {
00592             prev = frame;
00593             frame = frame->next;
00594             /*
00595              * if failed, collector is corrupted
00596              */
00597             if(frame == NULL)
00598             {
00599 #ifdef macintosh
00600                 /* only  on mac cause we are sure to intercept every allocations */
00601                 fprintf(stderr, "panic ! memory collector is corrupted !\n");
00602                 return NULL;
00603 #else /* !macintosh */
00604                 return ptr;
00605 #endif /* !macintosh */
00606             }
00607         }
00608         prev->next = frame->next;
00609     }
00610
00611     /*
00612      * insert frame into free list
00613      */
00614     frame->next = garb->firstfree;
00615     garb->firstfree = frame;
00616
00617     return ptr;
00618 }

void poolRemove | ( | poolPtr | collector,
 |  | int | reallyRemove,
 |  | int | verboseMemoryLeak,
 |  | int * | numLeaks
 | ) | [static]

Definition at line 407 of file dll_garbage.c.

References _frameRec::entry, frameRec, listFree(), _frameRec::next, NULL, and platform_free.

Referenced by garbyRemove().

00408 {
00409     frameRec *frame = collector->firstentry;
00410
00411 #if qRangeCheck
00412     DYN_LIST *pool;
00413     if(reallyRemove)
00414     {
00415         collector->firstentry = 0L;
00416         collector->firstfree = 0L;
00417     }
00418 #endif /* qRangeCheck */
00419
00420     while(frame != NULL)
00421     {
00422 #if qCvsDebug
00423         if(verboseMemoryLeak)
00424             fprintf(stderr, "MEMORY LEAK!: %s line:%d\n", frame->module, frame->line);
00425 #endif
00426         if(reallyRemove)
00427             platform_free(frame->entry);
00428         frame = frame->next;
00429         (*numLeaks)++;
00430     }
00431     if(reallyRemove)
00432     {
00433 #if qRangeCheck
00434         pool = collector->pool;
00435         collector->pool = 0L;
00436         listFree(pool);
00437 #else /* !qRangeCheck */
00438         listFree(collector->pool);
00439 #endif /* !qRangeCheck */
00440     }
00441 }

Here is the call graph for this function:

void setModule | ( | char * | where,
 |  | const char * | what
 | ) | [static]

Definition at line 506 of file dll_garbage.c.

References MODULE_SIZE.

Referenced by poolAlloc().

00507 {
00508     int len, cp;
00509
00510     if(what == 0L)
00511     {
00512         strcpy(where, "Unknown");
00513         return;
00514     }
00515
00516     cp = len = strlen(what);
00517     if(len > (MODULE_SIZE - 1))
00518         cp = MODULE_SIZE - 1;
00519
00520     memcpy(where, what + len - cp, cp * sizeof(char));
00521     where[cp] = '\0';
00522 }

void* shl_calloc | ( | size_t | nmemb,
 |  | size_t | size
 | ) |

Definition at line 703 of file dll_garbage.c.

References garbyAlloc, NULL, and platform_calloc.

00705 {
00706     char *ptr;
00707
00708     if (nmemb == 0 || size == 0)
00709         return NULL;
00710
00711     ptr = (char *)platform_calloc(nmemb, size);
00712     return garbyAlloc(ptr, line, file);
00713 }

void shl_free ( void * ptr )

Definition at line 742 of file dll_garbage.c.

References garbyFree, NULL, and platform_free.

00743 {
00744     if (ptr != NULL)
00745         platform_free (garbyFree(ptr));
00746 }

void* shl_malloc ( size_t size )

Definition at line 688 of file dll_garbage.c.

References garbyAlloc, NULL, and platform_malloc.

00690 {
00691     char *ptr;
00692
00693     if (size == 0)
00694         return NULL;
00695
00696     ptr = (char *)platform_malloc(size);
00697     return garbyAlloc(ptr, line, file);
00698 }

void* shl_realloc | ( | void * | ptr,
 |  | size_t | size
 | ) |

Definition at line 718 of file dll_garbage.c.

References garbyAlloc, garbyFree, garbyRealloc, NULL, platform_free, platform_malloc, and platform_realloc.

00720 {
00721     char *Newptr;
00722
00723     if (ptr == NULL)
00724     {
00725         Newptr = (char *)platform_malloc(size);
00726         return garbyAlloc(Newptr, line, file);
00727     }
00728
00729     if (size == 0)
00730     {
00731         platform_free(garbyFree(ptr));
00732         return NULL;
00733     }
00734
00735     Newptr = (char *)platform_realloc(ptr, size);
00736     if(Newptr == ptr)
00737         return ptr;
00738
00739     return garbyRealloc(ptr, Newptr, line, file);
00740 }

Variable Documentation

garbyPtr gGarbage = NULL [static]

Definition at line 302 of file dll_garbage.c.

Referenced by garby_alloc(), garby_free(), garby_realloc(), garbyNew(), and garbyRemove().

Generated on Sat Aug 7 22:44:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_garbage.h File Reference

common/dll_garbage.h File Reference

#include <stdlib.h>
#include <malloc.h>

Include dependency graph for dll_garbage.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | malloc shl_malloc
#define | calloc shl_calloc
#define | realloc shl_realloc
#define | free shl_free

Functions

void * | shl_calloc (size_t nmemb, size_t size)
void * | shl_malloc (size_t size)
void * | shl_realloc (void *ptr, size_t size)
void | shl_free (void *ptr)
void | garbyNew (void)
void | garbyRemove (int verboseSummary, int verboseMemoryLeak)

Define Documentation

#define calloc shl_calloc

Definition at line 46 of file dll_garbage.h.

Referenced by CCJHexEdit::SelInsert().

#define free shl_free

Definition at line 53 of file dll_garbage.h.

Referenced by UStr::clear(), UPStr::clear(), closedir(), CvsLogParse(), DisposeStr(), FileTraverse(), free_dircontents(), GetNextEntriesLine(), EntnodeFile::GetRelativePath(), CHHelpSupport::InitHTMLHelp(), InitializeInterp(), IsShellType(), LoadSettingsInternal(), UWidget::OnComboAppend(), MacroTraversal::OnFile(), CWincvsView::OnKeyDown(), opendir(), ReadIgnoredFile(), CvsArgs::reset(), CCJHexEdit::SelDelete(), CCJHexEdit::SelInsert(), CCJHexEdit::SetData(), KoFilterMask::SetMask(), Tag_Open(), awidget::~awidget(), CCustInvertTable::~CCustInvertTable(), CStaticAllocT< T >::~CStaticAllocT(), CTCLCvsConsole::~CTCLCvsConsole(), CWincvsView::~CWincvsView(), and UCvsConsole::~UCvsConsole().

#define malloc shl_malloc

Definition at line 45 of file dll_garbage.h.

Referenced by CvsArgs::add(), CStaticAllocT< T >::AdjustSize(), CTCLCvsConsole::CTCLCvsConsole(), getstr(), InitializeInterp(), IsShellType(), mystrdup(), CWincvsView::OnKeyDown(), opendir(), UStr::operator<<(), UStr::operator=(), UPStr::operator=(), CWincvsView::OutConsole(), UCvsConsole::OutConsole(), CvsArgs::reset(), CCJHexEdit::SelDelete(), UStr::set(), UPStr::set(), CCJHexEdit::SetData(), and strdup().

#define realloc shl_realloc

Definition at line 47 of file dll_garbage.h.

Referenced by CvsArgs::add(), CStaticAllocT< T >::AdjustSize(), CTCLCvsConsole::cvs_out(), getstr(), and UPStr::operator<<().

Function Documentation

void garbyNew ( void )

Definition at line 374 of file dll_garbage.c.

References exit, frameRec, GARBY_DEF_ALLOC, GARBY_DEF_POOL, garbyPtr, gGarbage, listNew(), NULL, and platform_malloc.

Referenced by __cvs_initialize(), garby_alloc(), and garby_realloc().

00375 {
00376     int i;
00377
00378 #if AUTO_INITALIZE
00379     if(gGarbage != 0L)
00380         return;
00381 #endif /* AUTO_INITALIZE */
00382
00383     gGarbage = (garbyPtr) platform_malloc(sizeof(garbyRec));
00384     if(gGarbage == NULL)
00385     {
00386         fprintf(stderr, "failed to allocate %d bytes\n", sizeof(garbyRec));
00387         exit(-1);
00388     }
00389
00390 #if qRangeCheck
00391     for(i = 0; i < GARBY_DEF_POOL; i++)
00392     {
00393         gGarbage->pools[i].firstentry = NULL;
00394         gGarbage->pools[i].firstfree = NULL;
00395         gGarbage->pools[i].pool = 0L;
00396     }
00397 #endif /* qRangeCheck */
00398     for(i = 0; i < GARBY_DEF_POOL; i++)
00399     {
00400         gGarbage->pools[i].firstentry = NULL;
00401         gGarbage->pools[i].firstfree = NULL;
00402         gGarbage->pools[i].pool = listNew(sizeof(frameRec), GARBY_DEF_ALLOC);
00403     }
00404 }

Here is the call graph for this function:

void garbyRemove | ( | int | verboseSummary,
 |  | int | verboseMemoryLeak
 | ) |

Definition at line 444 of file dll_garbage.c.

References GARBY_DEF_POOL, gGarbage, NULL, platform_free, and poolRemove().

Referenced by __cvs_terminate(), and flush_all().

00445 {
00446     int i;
00447     int numLeaks = 0;
00448     int reallyRemove = !verboseSummary;
00449
00450     if(gGarbage == NULL)
00451         return;
00452
00453     for(i = 0; i < GARBY_DEF_POOL; i++)
00454         poolRemove(&gGarbage->pools[i], reallyRemove, verboseMemoryLeak, &numLeaks);
00455
00456     if(reallyRemove)
00457     {
00458         platform_free(gGarbage);
00459         gGarbage = NULL;
00460     }
00461
00462 #if qCvsDebug
00463     if(verboseSummary)
00464         fprintf(stderr, "\nGarbage collection : purged %d allocations\n", numLeaks);
00465 #endif
00466 }

Here is the call graph for this function:

void* shl_calloc | ( | size_t | nmemb,
 |  | size_t | size
 | ) |

Definition at line 703 of file dll_garbage.c.

References garbyAlloc, NULL, and platform_calloc.

00705 {
00706     char *ptr;
00707
00708     if (nmemb == 0 || size == 0)
00709         return NULL;
00710
00711     ptr = (char *)platform_calloc(nmemb, size);
00712     return garbyAlloc(ptr, line, file);
00713 }

void shl_free ( void * ptr )

Definition at line 742 of file dll_garbage.c.

References garbyFree, NULL, and platform_free.

00743 {
00744     if (ptr != NULL)
00745         platform_free (garbyFree(ptr));
00746 }

void* shl_malloc ( size_t size )

Definition at line 688 of file dll_garbage.c.

References garbyAlloc, NULL, and platform_malloc.

00690 {
00691     char *ptr;
00692
00693     if (size == 0)
00694         return NULL;
00695
00696     ptr = (char *)platform_malloc(size);
00697     return garbyAlloc(ptr, line, file);
00698 }

void* shl_realloc | ( | void * | ptr,
 |  | size_t | size
 | ) |

Definition at line 718 of file dll_garbage.c.

References garbyAlloc, garbyFree, garbyRealloc, NULL, platform_free, platform_malloc, and platform_realloc.

00720 {
00721     char *Newptr;
00722
00723     if (ptr == NULL)
00724     {
00725         Newptr = (char *)platform_malloc(size);
00726         return garbyAlloc(Newptr, line, file);
00727     }
00728
00729     if (size == 0)
00730     {
00731         platform_free(garbyFree(ptr));
00732         return NULL;
00733     }
00734
00735     Newptr = (char *)platform_realloc(ptr, size);
00736     if(Newptr == ptr)
00737         return ptr;
00738
00739     return garbyRealloc(ptr, Newptr, line, file);
00740 }

Generated on Sat Aug 7 22:44:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_glue.c File Reference

common/dll_glue.c File Reference

#include <unistd.h>
#include <stdio.h>
#include <setjmp.h>
#include <errno.h>
#include "dll_glue.h"
#include "dll_garbage.h"
#include "GUSIMSLSetup.h"

Include dependency graph for dll_glue.c:

Include dependency graph

Go to the source code of this file.

Functions

int | main (int argc, char **argv)
void | dllglue_flushconsole (void)
void | initialize_all (void)
void | flush_all (void)
void | dllglue_exit (int code)
char * | dllglue_getenv (const char *name)
long | dllglue_consoleout (char *buffer, long n)
long | dllglue_consoleerr (char *buffer, long n)
long | dllglue_consolein (char *buffer, long n)
int | dllglue_dispatchevent (EventRecord *userevent)
int | dllglue_main (const char *path, int argc, char **argv)
int | dllglue_decode_file (char *infile)
int | dllglue_setgetenv (UniversalProcPtr agetenv)
int | dllglue_seteventdispatch (UniversalProcPtr aeventdispatch)
int | dllglue_setconsoleout (UniversalProcPtr aconsoleout)
int | dllglue_setconsoleerr (UniversalProcPtr aconsoleerr)
int | dllglue_setconsolein (UniversalProcPtr aconsolein)
pascal OSErr | __initialize (CFragConnectionID connID)
pascal void | __terminate (void)
pascal OSErr | __cvs_initialize (const CFragInitBlock *theInitBlock)
pascal void | __cvs_terminate (void)

Variables

UniversalProcPtr | __glue_getenv = 0L
UniversalProcPtr | __glue_consoleout = 0L
UniversalProcPtr | __glue_consoleerr = 0L
UniversalProcPtr | __glue_consolein = 0L
UniversalProcPtr | __glue_eventdispatch = 0L
int | __glue_exit_code = 0
jmp_buf | _glue_buf
int __no_msl_lf_convert
FSSpec sCvsContainerFileSpec

Function Documentation

pascal OSErr __cvs_initialize ( const CFragInitBlock * theInitBlock )

Definition at line 324 of file dll_glue.c.

References __initialize(), garbyNew(), and sCvsContainerFileSpec.

00325 {
00326     OSErr result = noErr;
00327
00328     if(CFragHasFileLocation(theInitBlock->fragLocator.where) &&
00329         theInitBlock->fragLocator.u.onDisk.fileSpec != 0L)
00330     {
00331         sCvsContainerFileSpec = *theInitBlock->fragLocator.u.onDisk.fileSpec;
00332     }
00333     garbyNew();
00334
00335     result = __initialize(theInitBlock->connectionID);
00336
00337     return result;
00338 }

Here is the call graph for this function:

pascal void __cvs_terminate ( void )

Definition at line 340 of file dll_glue.c.

References __terminate(), and garbyRemove().

00341 {
00342     __terminate();
00343
00344     garbyRemove(false, false);
00345 }

Here is the call graph for this function:

pascal OSErr __initialize ( CFragConnectionID connID )

Referenced by __cvs_initialize().

pascal void __terminate ( void )

Referenced by __cvs_terminate().

long dllglue_consoleerr | ( | char * | buffer,
 |  | long | n
 | ) |

Definition at line 129 of file dll_glue.c.

References __glue_consoleerr.

Referenced by initialize_all().

00130 {
00131 #if !TARGET_API_MAC_CARBON
00132     if(__glue_consoleerr != 0L)
00133     {
00134         return (int)CallUniversalProc(__glue_consoleerr, uppConsoleOutProcInfo, buffer, n);
00135     }
00136 #else
00137     if(__glue_consoleerr != 0L)
00138     {
00139         return __glue_consoleerr(buffer, n);
00140     }
00141 #endif
00142     return 0;
00143 }

long dllglue_consolein | ( | char * | buffer,
 |  | long | n
 | ) |

Definition at line 145 of file dll_glue.c.

References __glue_consolein.

Referenced by initialize_all().

00146 {
00147 #if !TARGET_API_MAC_CARBON
00148     if(__glue_consolein != 0L)
00149     {
00150         return (int)CallUniversalProc(__glue_consolein, uppConsoleInProcInfo, buffer, n);
00151     }
00152 #else
00153     if(__glue_consolein != 0L)
00154     {
00155         return __glue_consolein(buffer, n);
00156     }
00157 #endif
00158     return 0;
00159 }

long dllglue_consoleout | ( | char * | buffer,
 |  | long | n
 | ) |

Definition at line 113 of file dll_glue.c.

References __glue_consoleout.

Referenced by initialize_all().

00114 {
00115 #if !TARGET_API_MAC_CARBON
00116     if(__glue_consoleout != 0L)
00117     {
00118         return (int)CallUniversalProc(__glue_consoleout, uppConsoleOutProcInfo, buffer, n);
00119     }
00120 #else
00121     if(__glue_consoleout != 0L)
00122     {
00123         return __glue_consoleout(buffer, n);
00124     }
00125 #endif
00126     return 0;
00127 }

int dllglue_decode_file ( char * infile )

Definition at line 202 of file dll_glue.c.

References __glue_exit_code, _glue_buf, flush_all(), and initialize_all().

00203 {
00204     if(setjmp(_glue_buf) == 0)
00205     {
00206         initialize_all();
00207
00208         __glue_exit_code = decode_file (infile);
00209     }
00210     else
00211     {
00212     }
00213
00214     flush_all();
00215
00216     return __glue_exit_code;
00217 }

Here is the call graph for this function:

int dllglue_dispatchevent ( EventRecord * userevent )

Definition at line 161 of file dll_glue.c.

References __glue_eventdispatch.

Referenced by initialize_all().

00162 {
00163 #if !TARGET_API_MAC_CARBON
00164     if(__glue_eventdispatch != 0L)
00165     {
00166         return (int)CallUniversalProc(__glue_eventdispatch, uppEventDispatchProcInfo, userevent);
00167     }
00168 #else
00169     if(__glue_eventdispatch != 0L)
00170     {
00171         return __glue_eventdispatch(userevent);
00172     }
00173 #endif
00174     return 0;
00175 }

void dllglue_exit ( int code )

Definition at line 93 of file dll_glue.c.

References __glue_exit_code, and _glue_buf.

00094 {
00095     __glue_exit_code = code;
00096     longjmp(_glue_buf, 1);
00097 }

void dllglue_flushconsole ( void )

Definition at line 60 of file dll_glue.c.

Referenced by flush_all().

00061 {
00062     fflush(stdout);
00063     fflush(stderr);
00064 }

char* dllglue_getenv ( const char * name )

Definition at line 100 of file dll_glue.c.

References __glue_getenv.

00101 {
00102     if(__glue_getenv != 0L)
00103     {
00104 #if !TARGET_API_MAC_CARBON
00105         return (char *)CallUniversalProc(__glue_getenv, uppGetEnvProcInfo, name);
00106 #else /* TARGET_API_MAC_CARBON */
00107         return __glue_getenv(name);
00108 #endif /* TARGET_API_MAC_CARBON */
00109     }
00110     return 0L;
00111 }

int dllglue_main | ( | const char * | path,
 |  | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 178 of file dll_glue.c.

References __glue_exit_code, _glue_buf, exit, flush_all(), initialize_all(), and main().

00179 {
00180     if(setjmp(_glue_buf) == 0)
00181     {
00182         initialize_all();
00183
00184         if(path != 0L && chdir(path) != 0)
00185         {
00186             fprintf(stderr, "Error: Unable to chdir %s (error %d)\n", path, errno);
00187             exit(1);
00188         }
00189
00190         main(argc, argv);
00191     }
00192     else
00193     {
00194     }
00195
00196     flush_all();
00197
00198     return __glue_exit_code;
00199 }

Here is the call graph for this function:

int dllglue_setconsoleerr ( UniversalProcPtr aconsoleerr )

Definition at line 276 of file dll_glue.c.

References __glue_consoleerr, and dllglue_consoleout_func.

Referenced by flush_all().

00280 {
00281     if(__glue_consoleerr != 0L)
00282     {
00283 #if !TARGET_API_MAC_CARBON
00284         DisposeRoutineDescriptor(__glue_consoleerr);
00285 #endif /* !TARGET_API_MAC_CARBON */
00286         __glue_consoleerr = 0L;
00287     }
00288     __glue_consoleerr = aconsoleerr;
00289     return 0;
00290 }

int dllglue_setconsolein ( UniversalProcPtr aconsolein )

Definition at line 294 of file dll_glue.c.

References __glue_consolein, and dllglue_consolein_func.

Referenced by flush_all().

00298 {
00299     if(__glue_consolein != 0L)
00300     {
00301 #if !TARGET_API_MAC_CARBON
00302         DisposeRoutineDescriptor(__glue_consolein);
00303 #endif /* !TARGET_API_MAC_CARBON */
00304         __glue_consolein = 0L;
00305     }
00306     __glue_consolein = aconsolein;
00307     return 0;
00308 }

int dllglue_setconsoleout ( UniversalProcPtr aconsoleout )

Definition at line 258 of file dll_glue.c.

References __glue_consoleout, and dllglue_consoleout_func.

Referenced by flush_all().

00262 {
00263     if(__glue_consoleout != 0L)
00264     {
00265 #if !TARGET_API_MAC_CARBON
00266         DisposeRoutineDescriptor(__glue_consoleout);
00267 #endif /* !TARGET_API_MAC_CARBON */
00268         __glue_consoleout = 0L;
00269     }
00270     __glue_consoleout = aconsoleout;
00271     return 0;
00272 }

int dllglue_seteventdispatch ( UniversalProcPtr aeventdispatch )

Definition at line 239 of file dll_glue.c.

References __glue_eventdispatch.

Referenced by flush_all().

00244 {
00245 #if !TARGET_API_MAC_CARBON
00246     if(__glue_eventdispatch != 0L)
00247     {
00248         DisposeRoutineDescriptor(__glue_eventdispatch);
00249         __glue_eventdispatch = 0L;
00250     }
00251 #endif
00252     __glue_eventdispatch = aeventdispatch;
00253     return 0;
00254 }

int dllglue_setgetenv ( UniversalProcPtr agetenv )

Definition at line 221 of file dll_glue.c.

References __glue_getenv, and dllglue_getenv_func.

Referenced by flush_all().

00225 {
00226     if(__glue_getenv != 0L)
00227     {
00228 #if !TARGET_API_MAC_CARBON
00229         DisposeRoutineDescriptor(__glue_getenv);
00230 #endif /* !TARGET_API_MAC_CARBON */
00231         __glue_getenv = 0L;
00232     }
00233     __glue_getenv = agetenv;
00234     return 0;
00235 }

void flush_all ( void ) [static]

Definition at line 81 of file dll_glue.c.

References dllglue_flushconsole(), dllglue_setconsoleerr(), dllglue_setconsolein(), dllglue_setconsoleout(), dllglue_seteventdispatch(), dllglue_setgetenv(), and garbyRemove().

Referenced by dllglue_decode_file(), and dllglue_main().

00082 {
00083     garbyRemove(true, false);
00084     dllglue_flushconsole();
00085     dllglue_setgetenv(0L);
00086     dllglue_setconsoleout(0L);
00087     dllglue_setconsoleerr(0L);
00088     dllglue_setconsolein(0L);
00089     dllglue_seteventdispatch(0L);
00090 }

Here is the call graph for this function:

void initialize_all ( void ) [static]

Definition at line 66 of file dll_glue.c.

References __no_msl_lf_convert, dllglue_consoleerr(), dllglue_consolein(), dllglue_consoleout(), dllglue_dispatchevent(), getenv, and NULL.

Referenced by dllglue_decode_file(), and dllglue_main().

00067 {
00068     GusiMSLSetWriteConsole(dllglue_consoleout);
00069     GusiMSLSetErrConsole(dllglue_consoleerr);
00070     GusiMSLSetInConsole(dllglue_consolein);
00071     GusiMSLSetHandleEvent(dllglue_dispatchevent);
00072
00073     // create text files with the Unix LF (0x0A)
00074     // the default is CR on Classic/Carbon-CFM
00075     if(getenv("CVSUSEUNIXLF") != NULL)
00076     {
00077         __no_msl_lf_convert = 1;
00078     }
00079 }

Here is the call graph for this function:

int main | ( | int | argc,
 |  | char ** | argv
 | ) |

Referenced by dllglue_main().

Variable Documentation

UniversalProcPtr __glue_consoleerr = 0L [static]

Definition at line 41 of file dll_glue.c.

Referenced by dllglue_consoleerr(), and dllglue_setconsoleerr().

UniversalProcPtr __glue_consolein = 0L [static]

Definition at line 42 of file dll_glue.c.

Referenced by dllglue_consolein(), and dllglue_setconsolein().

UniversalProcPtr __glue_consoleout = 0L [static]

Definition at line 40 of file dll_glue.c.

Referenced by dllglue_consoleout(), and dllglue_setconsoleout().

UniversalProcPtr __glue_eventdispatch = 0L [static]

Definition at line 43 of file dll_glue.c.

Referenced by dllglue_dispatchevent(), and dllglue_seteventdispatch().

int __glue_exit_code = 0 [static]

Definition at line 52 of file dll_glue.c.

Referenced by dllglue_decode_file(), dllglue_exit(), and dllglue_main().

UniversalProcPtr __glue_getenv = 0L [static]

Definition at line 39 of file dll_glue.c.

Referenced by dllglue_getenv(), and dllglue_setgetenv().

int __no_msl_lf_convert

Referenced by initialize_all().

jmp_buf _glue_buf [static]

Definition at line 53 of file dll_glue.c.

Referenced by dllglue_decode_file(), dllglue_exit(), and dllglue_main().

FSSpec sCvsContainerFileSpec

Definition at line 322 of file dll_glue.c.

Referenced by __cvs_initialize().

Generated on Sat Aug 7 22:44:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_glue.h File Reference

common/dll_glue.h File Reference

#include <stdlib.h>
#include "dll_process.h"
#include <Events.h>

Include dependency graph for dll_glue.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | exit dllglue_exit
#define | getenv dllglue_getenv

Functions

int | dllglue_decode_file (char *infile)
int | dllglue_main (const char *path, int argc, char **argv)
int | dllglue_setgetenv (UniversalProcPtr agetenv)
int | dllglue_setconsoleout (UniversalProcPtr aconsoleout)
int | dllglue_setconsoleerr (UniversalProcPtr aconsoleerr)
int | dllglue_setconsolein (UniversalProcPtr aconsolein)
int | dllglue_seteventdispatch (UniversalProcPtr adispatch)
void | dllglue_exit (int code)
char * | dllglue_getenv (const char *)
int | dllglue_dispatchevent (EventRecord *userevent)
long | dllglue_consoleout (char *buffer, long n)
long | dllglue_consoleerr (char *buffer, long n)
long | dllglue_consolein (char *buffer, long n)
void | dllglue_flushconsole (void)

Define Documentation

#define exit dllglue_exit

Definition at line 57 of file dll_glue.h.

Referenced by dllglue_main(), FileTraverse(), garbyNew(), listAddCell(), listNew(), and mystrdup().

#define getenv dllglue_getenv

Definition at line 58 of file dll_glue.h.

Referenced by _getopt_initialize(), glue_getenv(), CvsPrefs::Home(), initialize_all(), and MakeTmpFile().

Function Documentation

long dllglue_consoleerr | ( | char * | buffer,
 |  | long | n
 | ) |

Definition at line 129 of file dll_glue.c.

References __glue_consoleerr.

Referenced by initialize_all().

00130 {
00131 #if !TARGET_API_MAC_CARBON
00132     if(__glue_consoleerr != 0L)
00133     {
00134         return (int)CallUniversalProc(__glue_consoleerr, uppConsoleOutProcInfo, buffer, n);
00135     }
00136 #else
00137     if(__glue_consoleerr != 0L)
00138     {
00139         return __glue_consoleerr(buffer, n);
00140     }
00141 #endif
00142     return 0;
00143 }

long dllglue_consolein | ( | char * | buffer,
 |  | long | n
 | ) |

Definition at line 145 of file dll_glue.c.

References __glue_consolein.

Referenced by initialize_all().

00146 {
00147 #if !TARGET_API_MAC_CARBON
00148     if(__glue_consolein != 0L)
00149     {
00150         return (int)CallUniversalProc(__glue_consolein, uppConsoleInProcInfo, buffer, n);
00151     }
00152 #else
00153     if(__glue_consolein != 0L)
00154     {
00155         return __glue_consolein(buffer, n);
00156     }
00157 #endif
00158     return 0;
00159 }

long dllglue_consoleout | ( | char * | buffer,
 |  | long | n
 | ) |

Definition at line 113 of file dll_glue.c.

References __glue_consoleout.

Referenced by initialize_all().

00114 {
00115 #if !TARGET_API_MAC_CARBON
00116     if(__glue_consoleout != 0L)
00117     {
00118         return (int)CallUniversalProc(__glue_consoleout, uppConsoleOutProcInfo, buffer, n);
00119     }
00120 #else
00121     if(__glue_consoleout != 0L)
00122     {
00123         return __glue_consoleout(buffer, n);
00124     }
00125 #endif
00126     return 0;
00127 }

int dllglue_decode_file ( char * infile )

Definition at line 202 of file dll_glue.c.

References __glue_exit_code, _glue_buf, flush_all(), and initialize_all().

00203 {
00204     if(setjmp(_glue_buf) == 0)
00205     {
00206         initialize_all();
00207
00208         __glue_exit_code = decode_file (infile);
00209     }
00210     else
00211     {
00212     }
00213
00214     flush_all();
00215
00216     return __glue_exit_code;
00217 }

Here is the call graph for this function:

int dllglue_dispatchevent ( EventRecord * userevent )

Definition at line 161 of file dll_glue.c.

References __glue_eventdispatch.

Referenced by initialize_all().

00162 {
00163 #if !TARGET_API_MAC_CARBON
00164     if(__glue_eventdispatch != 0L)
00165     {
00166         return (int)CallUniversalProc(__glue_eventdispatch, uppEventDispatchProcInfo, userevent);
00167     }
00168 #else
00169     if(__glue_eventdispatch != 0L)
00170     {
00171         return __glue_eventdispatch(userevent);
00172     }
00173 #endif
00174     return 0;
00175 }

void dllglue_exit ( int code )

Definition at line 93 of file dll_glue.c.

References __glue_exit_code, and _glue_buf.

00094 {
00095     __glue_exit_code = code;
00096     longjmp(_glue_buf, 1);
00097 }

void dllglue_flushconsole ( void )

Definition at line 60 of file dll_glue.c.

Referenced by flush_all().

00061 {
00062     fflush(stdout);
00063     fflush(stderr);
00064 }

char* dllglue_getenv ( const char * )

Definition at line 100 of file dll_glue.c.

References __glue_getenv.

00101 {
00102     if(__glue_getenv != 0L)
00103     {
00104 #if !TARGET_API_MAC_CARBON
00105         return (char *)CallUniversalProc(__glue_getenv, uppGetEnvProcInfo, name);
00106 #else /* TARGET_API_MAC_CARBON */
00107         return __glue_getenv(name);
00108 #endif /* TARGET_API_MAC_CARBON */
00109     }
00110     return 0L;
00111 }

int dllglue_main | ( | const char * | path,
 |  | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 178 of file dll_glue.c.

References __glue_exit_code, _glue_buf, exit, flush_all(), initialize_all(), and main().

00179 {
00180     if(setjmp(_glue_buf) == 0)
00181     {
00182         initialize_all();
00183
00184         if(path != 0L && chdir(path) != 0)
00185         {
00186             fprintf(stderr, "Error: Unable to chdir %s (error %d)\n", path, errno);
00187             exit(1);
00188         }
00189
00190         main(argc, argv);
00191     }
00192     else
00193     {
00194     }
00195
00196     flush_all();
00197
00198     return __glue_exit_code;
00199 }

Here is the call graph for this function:

int dllglue_setconsoleerr ( UniversalProcPtr aconsoleerr )

Definition at line 276 of file dll_glue.c.

References __glue_consoleerr, and dllglue_consoleout_func.

Referenced by flush_all().

00280 {
00281     if(__glue_consoleerr != 0L)
00282     {
00283 #if !TARGET_API_MAC_CARBON
00284         DisposeRoutineDescriptor(__glue_consoleerr);
00285 #endif /* !TARGET_API_MAC_CARBON */
00286         __glue_consoleerr = 0L;
00287     }
00288     __glue_consoleerr = aconsoleerr;
00289     return 0;
00290 }

int dllglue_setconsolein ( UniversalProcPtr aconsolein )

Definition at line 294 of file dll_glue.c.

References __glue_consolein, and dllglue_consolein_func.

Referenced by flush_all().

00298 {
00299     if(__glue_consolein != 0L)
00300     {
00301 #if !TARGET_API_MAC_CARBON
00302         DisposeRoutineDescriptor(__glue_consolein);
00303 #endif /* !TARGET_API_MAC_CARBON */
00304         __glue_consolein = 0L;
00305     }
00306     __glue_consolein = aconsolein;
00307     return 0;
00308 }

int dllglue_setconsoleout ( UniversalProcPtr aconsoleout )

Definition at line 258 of file dll_glue.c.

References __glue_consoleout, and dllglue_consoleout_func.

Referenced by flush_all().

00262 {
00263     if(__glue_consoleout != 0L)
00264     {
00265 #if !TARGET_API_MAC_CARBON
00266         DisposeRoutineDescriptor(__glue_consoleout);
00267 #endif /* !TARGET_API_MAC_CARBON */
00268         __glue_consoleout = 0L;
00269     }
00270     __glue_consoleout = aconsoleout;
00271     return 0;
00272 }

int dllglue_seteventdispatch ( UniversalProcPtr adispatch )

Definition at line 239 of file dll_glue.c.

References __glue_eventdispatch.

Referenced by flush_all().

00244 {
00245 #if !TARGET_API_MAC_CARBON
00246     if(__glue_eventdispatch != 0L)
00247     {
00248         DisposeRoutineDescriptor(__glue_eventdispatch);
00249         __glue_eventdispatch = 0L;
00250     }
00251 #endif
00252     __glue_eventdispatch = aeventdispatch;
00253     return 0;
00254 }

int dllglue_setgetenv ( UniversalProcPtr agetenv )

Definition at line 221 of file dll_glue.c.

References __glue_getenv, and dllglue_getenv_func.

Referenced by flush_all().

00225 {
00226     if(__glue_getenv != 0L)
00227     {
00228 #if !TARGET_API_MAC_CARBON
00229         DisposeRoutineDescriptor(__glue_getenv);
00230 #endif /* !TARGET_API_MAC_CARBON */
00231         __glue_getenv = 0L;
00232     }
00233     __glue_getenv = agetenv;
00234     return 0;
00235 }

Generated on Sat Aug 7 22:44:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_loader.c File Reference

common/dll_loader.c File Reference

#include <windows.h>
#include <string.h>
#include "dll_loader.h"

Include dependency graph for dll_loader.c:

Include dependency graph

Go to the source code of this file.

Functions

int | CompatLoadLibrary (CompatConnectID *connID, const char *name_dll)
int | CompatCloseLibrary (CompatConnectID *connID)
void * | _CompatCallLibrary (CompatConnectID connID, const char *name_func)

Variables

void * | sCompatProc

Function Documentation

void* _CompatCallLibrary | ( | CompatConnectID | connID,
 |  | const char * | name_func
 | ) |

Call a function in the shared library

Parameters:
connID | The connection ID
name_func | Function name be called
Returns:
The function address
Definition at line 130 of file dll_loader.c.

References CompatConnectID.

00131 {
00132 #ifdef TARGET_OS_MAC
00133     ProcPtr symAddr;
00134     Str255 pname;
00135
00136     c2pstrcpy(pname, name_func);
00137
00138     symAddr = getSymFunction(connID, pname);
00139     return symAddr;
00140 #elif defined(WIN32)
00141     return GetProcAddress(connID, name_func);
00142 #else
00143     return dynl_func(name_func, connID);
00144 #endif
00145 }

int CompatCloseLibrary ( CompatConnectID * connID )

Load the shared library

Parameters:
connID The connection ID, should not be used anymore after this call
Returns:
true on success, false otherwise
Definition at line 106 of file dll_loader.c.

References CompatConnectID.

Referenced by CPython_Interp::IsAvail(), and CTcl_Interp::IsAvail().

00107 {
00108     if( connID == 0L )
00109         return 0;
00110
00111 #ifdef TARGET_OS_MAC
00112     CloseConnection(connID);
00113 #elif defined(WIN32)
00114     FreeLibrary(*connID);
00115     connID = 0L;
00116 #else
00117     dynl_unlink(*connID);
00118     connID = 0L;
00119 #endif
00120
00121     return 1;
00122 }

int CompatLoadLibrary | ( | CompatConnectID * | connID,
 |  | const char * | name_dll
 | ) |

Load the shared library

Parameters:
connID | Return the connection ID
name_dll | Filename of the library (on Mac the fragment name of the shared library)
Returns:
true on success, false otherwise
Definition at line 76 of file dll_loader.c.

References CompatConnectID, and err.

Referenced by CPython_Interp::IsAvail(), and CTcl_Interp::IsAvail().

00077 {
00078     if( connID == 0L )
00079         return 0;
00080
00081 #ifdef TARGET_OS_MAC
00082     {
00083         OSErr err;
00084         Ptr mainAddr;
00085         Str255 errMessage;
00086         Str255 pname;
00087
00088         c2pstrcpy(pname, name_dll);
00089         err = GetSharedLibrary(pname, kPowerPCCFragArch, kPrivateCFragCopy, connID, &mainAddr, errMessage);
00090         return err == noErr;
00091     }
00092 #elif defined(WIN32)
00093     *connID = LoadLibrary(name_dll);
00094     return (*connID) != 0L;
00095 #else
00096     *connID = dynl_link(name_dll);
00097     return (*connID) != 0L;
00098 #endif
00099 }

Variable Documentation

void* sCompatProc

Definition at line 41 of file dll_loader.c.

Generated on Sat Aug 7 22:44:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_loader.h File Reference

common/dll_loader.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | CompatCallLibrary1(ID, res, idf, nf, tf, a1)
#define | CompatCallLibrary2(ID, res, idf, nf, tf, a1, a2)
#define | CompatCallLibrary3(ID, res, idf, nf, tf, a1, a2, a3)
#define | CompatFuncArg(funcInfo, func) func

Typedefs

typedef HINSTANCE | CompatConnectID

Functions

int | CompatLoadLibrary (CompatConnectID *connID, const char *name_dll)
int | CompatCloseLibrary (CompatConnectID *connID)
void * | _CompatCallLibrary (CompatConnectID connID, const char *name_func)

Variables

void * | sCompatProc

Define Documentation

#define CompatCallLibrary1 | ( | ID,
 |  | res,
 |  | idf,
 |  | nf,
 |  | tf,
 |  | a1 | )

Value:

( \
            sCompatProc = _CompatCallLibrary(ID, nf), \
            res = sCompatProc != NULL ? \
                ((tf)sCompatProc)(a1) : res, \
            sCompatProc != NULL \
        )
Call a function
Parameters:
ID | Connection ID
res | Result
idf | macDescInfo (0 if not mac)
nf | Function name
tf | Function prototype
a1 | Argument
Definition at line 57 of file dll_loader.h.

#define CompatCallLibrary2 | ( | ID,
 |  | res,
 |  | idf,
 |  | nf,
 |  | tf,
 |  | a1,
 |  | a2 | )

Value:

( \
            sCompatProc = _CompatCallLibrary(ID, nf), \
            res = sCompatProc != NULL ? \
                ((tf)sCompatProc)(a1, a2) : res, \
            sCompatProc != NULL \
        )
Call a function
Parameters:
ID | Connection ID
res | Result
idf | macDescInfo (0 if not mac)
nf | Function name
tf | Function prototype
a1 | Argument
a2 | Argument
Definition at line 75 of file dll_loader.h.

#define CompatCallLibrary3 | ( | ID,
 |  | res,
 |  | idf,
 |  | nf,
 |  | tf,
 |  | a1,
 |  | a2,
 |  | a3 | )

Value:

( \
            sCompatProc = _CompatCallLibrary(ID, nf), \
            res = sCompatProc != NULL ? \
                ((tf)sCompatProc)(a1, a2, a3) : res, \
            sCompatProc != NULL \
        )
Call a function
Parameters:
ID | Connection ID
res | Result
idf | macDescInfo (0 if not mac)
nf | Function name
tf | Function prototype
a1 | Argument
a2 | Argument
a3 | Argument
Definition at line 94 of file dll_loader.h.

#define CompatFuncArg | ( | funcInfo,
 |  | func | ) | func

Used with CompatCallLibrary when you want to give a function as an argument

Parameters:
funcInfo | For mac preCarbon the desc. of the function arguments, if not 0
func | Function
Definition at line 107 of file dll_loader.h.

Typedef Documentation

typedef HINSTANCE CompatConnectID

Definition at line 32 of file dll_loader.h.

Referenced by _CompatCallLibrary(), CompatCloseLibrary(), CompatLoadLibrary(), CTcl_Interp::IsAvail(), and CPython_Interp::IsAvail().

Function Documentation

void* _CompatCallLibrary | ( | CompatConnectID | connID,
 |  | const char * | name_func
 | ) |

Call a function in the shared library

Parameters:
connID | The connection ID
name_func | Function name be called
Returns:
The function address
Definition at line 130 of file dll_loader.c.

References CompatConnectID.

00131 {
00132 #ifdef TARGET_OS_MAC
00133     ProcPtr symAddr;
00134     Str255 pname;
00135
00136     c2pstrcpy(pname, name_func);
00137
00138     symAddr = getSymFunction(connID, pname);
00139     return symAddr;
00140 #elif defined(WIN32)
00141     return GetProcAddress(connID, name_func);
00142 #else
00143     return dynl_func(name_func, connID);
00144 #endif
00145 }

int CompatCloseLibrary ( CompatConnectID * connID )

Load the shared library

Parameters:
connID The connection ID, should not be used anymore after this call
Returns:
true on success, false otherwise
Definition at line 106 of file dll_loader.c.

References CompatConnectID.

Referenced by CTcl_Interp::IsAvail(), and CPython_Interp::IsAvail().

00107 {
00108     if( connID == 0L )
00109         return 0;
00110
00111 #ifdef TARGET_OS_MAC
00112     CloseConnection(connID);
00113 #elif defined(WIN32)
00114     FreeLibrary(*connID);
00115     connID = 0L;
00116 #else
00117     dynl_unlink(*connID);
00118     connID = 0L;
00119 #endif
00120
00121     return 1;
00122 }

int CompatLoadLibrary | ( | CompatConnectID * | connID,
 |  | const char * | name_dll
 | ) |

Load the shared library

Parameters:
connID | Return the connection ID
name_dll | Filename of the library (on Mac the fragment name of the shared library)
Returns:
true on success, false otherwise
Definition at line 76 of file dll_loader.c.

References CompatConnectID, and err.

Referenced by CTcl_Interp::IsAvail(), and CPython_Interp::IsAvail().

00077 {
00078     if( connID == 0L )
00079         return 0;
00080
00081 #ifdef TARGET_OS_MAC
00082     {
00083         OSErr err;
00084         Ptr mainAddr;
00085         Str255 errMessage;
00086         Str255 pname;
00087
00088         c2pstrcpy(pname, name_dll);
00089         err = GetSharedLibrary(pname, kPowerPCCFragArch, kPrivateCFragCopy, connID, &mainAddr, errMessage);
00090         return err == noErr;
00091     }
00092 #elif defined(WIN32)
00093     *connID = LoadLibrary(name_dll);
00094     return (*connID) != 0L;
00095 #else
00096     *connID = dynl_link(name_dll);
00097     return (*connID) != 0L;
00098 #endif
00099 }

Variable Documentation

void* sCompatProc

Definition at line 41 of file dll_loader.c.

Generated on Sat Aug 7 22:44:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_process.h File Reference

common/dll_process.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Typedefs

typedef char *(* | dllglue_getenv_func )(const char *)
typedef long(* | dllglue_consoleout_func )(char *, long)
typedef long(* | dllglue_consolein_func )(char *, long)
typedef int(* | dllglue_main_func )(const char *, int, char **)
typedef int(* | dllglue_setglue_func )(void *)

Typedef Documentation

typedef long(* dllglue_consolein_func)(char *, long)

Definition at line 39 of file dll_process.h.

Referenced by dllglue_setconsolein().

typedef long(* dllglue_consoleout_func)(char *, long)

Definition at line 38 of file dll_process.h.

Referenced by dllglue_setconsoleerr(), and dllglue_setconsoleout().

typedef char*(* dllglue_getenv_func)(const char *)

Definition at line 37 of file dll_process.h.

Referenced by dllglue_setgetenv().

typedef int(* dllglue_main_func)(const char *, int, char **)

Definition at line 40 of file dll_process.h.

typedef int(* dllglue_setglue_func)(void *)

Definition at line 41 of file dll_process.h.

Generated on Sat Aug 7 22:44:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/EditorMonDlg.cpp File Reference

common/EditorMonDlg.cpp File Reference

#include "stdafx.h"
#include "CvsPrefs.h"
#include "CvsCommands.h"
#include "wincvs.h"
#include "EditorMonDlg.h"
#include "CvsAlert.h"
#include "LaunchHandlers.h"

Include dependency graph for EditorMonDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetEditorMsg (UStr &message)
Launch and monitor editor to get the log message.

Function Documentation

bool CompatGetEditorMsg ( UStr & message )

Launch and monitor editor to get the log message.

Definition at line 129 of file EditorMonDlg.cpp.

References BUTTONTITLE_OK, CStr, gCvsPrefs, kCvsAlertStopIcon, LaunchDefaultEditor(), CEditorMonDlg::m_hProcess, CEditorMonDlg::m_tempFile, MakeTmpFile(), NULL, SplitPath(), and CvsPrefs::Viewer().

Referenced by CMultilineEntryDlg::ActionOpenEditor().

00130 {
00131     bool msgOK = false;
00132
00133     if( gCvsPrefs.Viewer() == 0L )
00134     {
00135         CvsAlert(kCvsAlertStopIcon,
00136             "No default editor specified.", "You need to define a default editor in the preferences",
00137             BUTTONTITLE_OK, NULL).ShowAlert();
00138
00139         return msgOK;
00140     }
00141
00142 #ifdef WIN32
00143     CStr tmpFile;
00144     if( MakeTmpFile(tmpFile, "LogMsg", "tmp", true) )
00145     {
00146         // Launch editor
00147         PROCESS_INFORMATION sProcessInformation;
00148         if( LaunchDefaultEditor(tmpFile, (void*)&sProcessInformation) )
00149         {
00150             // We don't need the thread's handle so close it now
00151             CloseHandle(sProcessInformation.hThread);
00152
00153             // Track the editor until it closes
00154             CStr uppath, folder;
00155             SplitPath(tmpFile, uppath, folder);
00156
00157             CEditorMonDlg editorMonDlg;
00158             editorMonDlg.m_hProcess = sProcessInformation.hProcess;
00159             editorMonDlg.m_tempFile = folder;
00160
00161             if( editorMonDlg.DoModal() == IDOK )
00162             {
00163                 msgOK = true;
00164             }
00165             else
00166             {
00167                 if( PostThreadMessage(sProcessInformation.dwThreadId, WM_QUIT, (WPARAM)EXIT_SUCCESS, 0) )
00168                 {
00169                     WaitForSingleObject(sProcessInformation.hProcess, 500);
00170                 }
00171
00172                 int nStatus = WaitForSingleObject(sProcessInformation.hProcess, 0);
00173                 if( nStatus != WAIT_OBJECT_0 )
00174                 {
00175                     TerminateProcess(sProcessInformation.hProcess, EXIT_SUCCESS);
00176                 }
00177             }
00178
00179             CloseHandle(sProcessInformation.hProcess);
00180         }
00181
00182         // Copy the file into message string
00183         FILE* stream = fopen(tmpFile, "r");
00184         if( stream )
00185         {
00186             char line[100];
00187             while( fgets(line, 100, stream) )
00188             {
00189                 message << line;
00190             }
00191
00192             fclose(stream);
00193         }
00194
00195         // Cleanup
00196         ::DeleteFile(tmpFile);
00197     }
00198
00199 #endif /* WIN32 */
00200
00201 // the code below might help to do stuff on Unix or Mac later on
00202 #if 0
00203     const char * argv[2] = { 0L, 0L };
00204     CStr program;
00205     if(strchr(gCvsPrefs.Viewer(), ' ') != 0L)
00206     {
00207         program << '\"';
00208         program << gCvsPrefs.Viewer();
00209         program << '\"';
00210     }
00211     else
00212         program = gCvsPrefs.Viewer();
00213
00214     argv[0] = program;
00215     int process = _spawnvp(_P_NOWAIT, gCvsPrefs.Viewer(), argv);
00216 #endif
00217
00218
00219 #ifdef qMacCvsPP
00220 #endif /* qMacCvsPP */
00221 #if qUnix
00222 #endif // qUnix
00223
00224     return msgOK;
00225 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/EditorMonDlg.h File Reference

common/EditorMonDlg.h File Reference

#include "HHelpSupport.h"

Include dependency graph for EditorMonDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CEditorMonDlg

Defines

#define | AFX_EDITORMONDLG_H__5146BF16_567B_4017_A1FD_619A7BD07906__INCLUDED_

Functions

bool | CompatGetEditorMsg (UStr &message)
Launch and monitor editor to get the log message.

Define Documentation

#define AFX_EDITORMONDLG_H__5146BF16_567B_4017_A1FD_619A7BD07906__INCLUDED_

Definition at line 26 of file EditorMonDlg.h.

Function Documentation

bool CompatGetEditorMsg ( UStr & message )

Launch and monitor editor to get the log message.

Definition at line 129 of file EditorMonDlg.cpp.

References BUTTONTITLE_OK, CStr, gCvsPrefs, kCvsAlertStopIcon, LaunchDefaultEditor(), CEditorMonDlg::m_hProcess, CEditorMonDlg::m_tempFile, MakeTmpFile(), NULL, SplitPath(), and CvsPrefs::Viewer().

Referenced by CMultilineEntryDlg::ActionOpenEditor().

00130 {
00131     bool msgOK = false;
00132
00133     if( gCvsPrefs.Viewer() == 0L )
00134     {
00135         CvsAlert(kCvsAlertStopIcon,
00136             "No default editor specified.", "You need to define a default editor in the preferences",
00137             BUTTONTITLE_OK, NULL).ShowAlert();
00138
00139         return msgOK;
00140     }
00141
00142 #ifdef WIN32
00143     CStr tmpFile;
00144     if( MakeTmpFile(tmpFile, "LogMsg", "tmp", true) )
00145     {
00146         // Launch editor
00147         PROCESS_INFORMATION sProcessInformation;
00148         if( LaunchDefaultEditor(tmpFile, (void*)&sProcessInformation) )
00149         {
00150             // We don't need the thread's handle so close it now
00151             CloseHandle(sProcessInformation.hThread);
00152
00153             // Track the editor until it closes
00154             CStr uppath, folder;
00155             SplitPath(tmpFile, uppath, folder);
00156
00157             CEditorMonDlg editorMonDlg;
00158             editorMonDlg.m_hProcess = sProcessInformation.hProcess;
00159             editorMonDlg.m_tempFile = folder;
00160
00161             if( editorMonDlg.DoModal() == IDOK )
00162             {
00163                 msgOK = true;
00164             }
00165             else
00166             {
00167                 if( PostThreadMessage(sProcessInformation.dwThreadId, WM_QUIT, (WPARAM)EXIT_SUCCESS, 0) )
00168                 {
00169                     WaitForSingleObject(sProcessInformation.hProcess, 500);
00170                 }
00171
00172                 int nStatus = WaitForSingleObject(sProcessInformation.hProcess, 0);
00173                 if( nStatus != WAIT_OBJECT_0 )
00174                 {
00175                     TerminateProcess(sProcessInformation.hProcess, EXIT_SUCCESS);
00176                 }
00177             }
00178
00179             CloseHandle(sProcessInformation.hProcess);
00180         }
00181
00182         // Copy the file into message string
00183         FILE* stream = fopen(tmpFile, "r");
00184         if( stream )
00185         {
00186             char line[100];
00187             while( fgets(line, 100, stream) )
00188             {
00189                 message << line;
00190             }
00191
00192             fclose(stream);
00193         }
00194
00195         // Cleanup
00196         ::DeleteFile(tmpFile);
00197     }
00198
00199 #endif /* WIN32 */
00200
00201 // the code below might help to do stuff on Unix or Mac later on
00202 #if 0
00203     const char * argv[2] = { 0L, 0L };
00204     CStr program;
00205     if(strchr(gCvsPrefs.Viewer(), ' ') != 0L)
00206     {
00207         program << '\"';
00208         program << gCvsPrefs.Viewer();
00209         program << '\"';
00210     }
00211     else
00212         program = gCvsPrefs.Viewer();
00213
00214     argv[0] = program;
00215     int process = _spawnvp(_P_NOWAIT, gCvsPrefs.Viewer(), argv);
00216 #endif
00217
00218
00219 #ifdef qMacCvsPP
00220 #endif /* qMacCvsPP */
00221 #if qUnix
00222 #endif // qUnix
00223
00224     return msgOK;
00225 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FileActionDlg.cpp File Reference

common/FileActionDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "OptionalPropertySheet.h"
#include "FileActionDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "GetPrefs.h"

Include dependency graph for FileActionDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetFileAction (const MultiFiles *mf, kLaunchType &launchType)
Get the file action options.

Function Documentation

bool CompatGetFileAction | ( | const MultiFiles * | mf,
 |  | kLaunchType & | launchType
 | ) |

Get the file action options.

Definition at line 158 of file FileActionDlg.cpp.

References FILEACTION_TYPE, CvsPrefs::FileActionType(), gCvsPrefs, CFileAction_MAIN::GetLaunchType(), CvsPrefs::HideCommandDlgFileAction(), kLaunchType, CFileAction_MAIN::m_sameActionNextTime, CvsPrefs::save(), CvsPrefs::SetFileActionType(), CvsPrefs::SetHideCommandDlgFileAction(), and CGetPrefs_GLOBALS::StoreValues().

Referenced by CvsCmdFileAction().

00159 {
00160     bool userHitOK = false;
00161
00162     launchType = (kLaunchType)gCvsPrefs.FileActionType();
00163
00164 #ifdef WIN32
00165     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgFileAction(), "File action settings");
00166     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00167
00168     CFileAction_MAIN page1(mf, launchType);
00169     CGetPrefs_GLOBALS page2;
00170
00171     pages.AddPage(&page1);
00172     pages.AddPage(&page2);
00173
00174     if( pages.DoModal() == IDOK )
00175     {
00176         launchType = (kLaunchType)page1.GetLaunchType();
00177
00178         if( page1.m_sameActionNextTime )
00179         {
00180             gCvsPrefs.SetFileActionType((FILEACTION_TYPE)launchType);
00181         }
00182
00183         page2.StoreValues();
00184         gCvsPrefs.SetHideCommandDlgFileAction(pages.GetHideCommandDlg());
00185         userHitOK = true;
00186     }
00187 #endif /* WIN32 */
00188
00189 #ifdef qMacCvsPP
00190     userHitOK = true;
00191 #endif /* qMacCvsPP */
00192
00193 #if qUnix
00194     userHitOK = true;
00195 #endif // qUnix
00196
00197     if( userHitOK )
00198     {
00199         gCvsPrefs.save();
00200     }
00201
00202     return userHitOK;
00203 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FileActionDlg.h File Reference

common/FileActionDlg.h File Reference

#include "SmartComboBox.h"
#include "LaunchHandlers.h"
#include "HHelpSupport.h"

Include dependency graph for FileActionDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CFileAction_MAIN

Defines

#define | AFX_FILEACTIONDLG_H__9C280EEF_16E5_4208_8A31_24AE6290E9D7__INCLUDED_

Functions

bool | CompatGetFileAction (const MultiFiles *mf, kLaunchType &launchType)
Get the file action options.

Define Documentation

#define AFX_FILEACTIONDLG_H__9C280EEF_16E5_4208_8A31_24AE6290E9D7__INCLUDED_

Definition at line 26 of file FileActionDlg.h.

Function Documentation

bool CompatGetFileAction | ( | const MultiFiles * | mf,
 |  | kLaunchType & | launchType
 | ) |

Get the file action options.

Definition at line 158 of file FileActionDlg.cpp.

References FILEACTION_TYPE, CvsPrefs::FileActionType(), gCvsPrefs, CFileAction_MAIN::GetLaunchType(), CvsPrefs::HideCommandDlgFileAction(), kLaunchType, CFileAction_MAIN::m_sameActionNextTime, CvsPrefs::save(), CvsPrefs::SetFileActionType(), CvsPrefs::SetHideCommandDlgFileAction(), and CGetPrefs_GLOBALS::StoreValues().

Referenced by CvsCmdFileAction().

00159 {
00160     bool userHitOK = false;
00161
00162     launchType = (kLaunchType)gCvsPrefs.FileActionType();
00163
00164 #ifdef WIN32
00165     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgFileAction(), "File action settings");
00166     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00167
00168     CFileAction_MAIN page1(mf, launchType);
00169     CGetPrefs_GLOBALS page2;
00170
00171     pages.AddPage(&page1);
00172     pages.AddPage(&page2);
00173
00174     if( pages.DoModal() == IDOK )
00175     {
00176         launchType = (kLaunchType)page1.GetLaunchType();
00177
00178         if( page1.m_sameActionNextTime )
00179         {
00180             gCvsPrefs.SetFileActionType((FILEACTION_TYPE)launchType);
00181         }
00182
00183         page2.StoreValues();
00184         gCvsPrefs.SetHideCommandDlgFileAction(pages.GetHideCommandDlg());
00185         userHitOK = true;
00186     }
00187 #endif /* WIN32 */
00188
00189 #ifdef qMacCvsPP
00190     userHitOK = true;
00191 #endif /* qMacCvsPP */
00192
00193 #if qUnix
00194     userHitOK = true;
00195 #endif // qUnix
00196
00197     if( userHitOK )
00198     {
00199         gCvsPrefs.save();
00200     }
00201
00202     return userHitOK;
00203 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FileTraversal.cpp File Reference

common/FileTraversal.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "FileTraversal.h"
#include "CPStr.h"
#include "umain.h"
#include "AppConsole.h"
#include "wincvsdebug.h"

Include dependency graph for FileTraversal.cpp:

Include dependency graph

Go to the source code of this file.

Functions

kTraversal FileTraverse (const char *path, TraversalReport &report, const FSSpec *macDirSpec)

Function Documentation

kTraversal FileTraverse | ( | const char * | path,
 |  | TraversalReport & | report,
 |  | const FSSpec * | macDirSpec
 | ) |

Traverse given path

Parameters:
path | Path to traverse
report | Return traversal report
macDirSpec | Mac specific
Returns:
kTraversal value to indicate whether to continue the traversing
Definition at line 73 of file FileTraversal.cpp.

References closedir(), CStr, cvs_err(), DIR, TraversalReport::EnterDirectory(), exit, TraversalReport::ExitDirectory(), free, USemaphore::IsEnteredTwice(), kContinueTraversal, kSkipFile, kTraversal, MAX_PATH, NULL, TraversalReport::OnAlias(), TraversalReport::OnDirectory(), TraversalReport::OnError(), TraversalReport::OnFile(), TraversalReport::OnIdle(), opendir(), UCvsApp::PeekPumpAndIdle(), readdir(), UCvsApp::SetStatusBarText(), stat::st_mode, stat, STRUCT_DIRENT, and UFSSpec.

Referenced by AskCreatePersistentSettings(), cvsgui_GetCvsEntries(), GetAllPersistentSettings(), HasPersistentSettings(), list_all_types_recur(), LoadPersistentSettings(), MacrosReloadAll(), TViewFill::OnDirectory(), TBrowserFill::OnDirectory(), CWinCvsBrowser::OnItemexpanding(), UCvsFolders::OnTreeExpanding(), UCvsFolders::ResetBrowser(), CWinCvsBrowser::ResetBrowser(), UCvsFiles::ResetView(), CBrowseFileView::ResetView(), SavePersistentSettings(), tclCvsEntriesProc(), and tclDirProc().

00074 {
00075     kTraversal res = kContinueTraversal;
00076
00077     DIR* dirp = 0L;
00078     STRUCT_DIRENT* dp;
00079     struct stat sb;
00080     CStr fullname, errstr, dirname, tmpname;
00081     const char* tmp;
00082     const UFSSpec *macspec = 0L;
00083
00084 #if defined(WIN32)
00085 #   if ENABLE_WINCVSDEBUG
00086     unsigned long dbg_mask = GetWinCvsDebugMask(false);
00087     CStr tracestr;
00088 #   endif   // ENABLE_WINCVSDEBUG
00089 #endif
00090
00091 #ifdef qUnix
00092     UCvsApp* app = UCvsApp::gApp;
00093 #endif
00094
00095     // Used to restore current directory
00096     static bool getPathFlag = false;
00097     char* originalPath = NULL;
00098
00099     USemaphore policeman(getPathFlag);
00100     USemaphore runstate(TraversalReport::GetRefRunning());
00101
00102     if( !policeman.IsEnteredTwice() )
00103     {
00104         originalPath = getcwd(NULL, MAX_PATH);
00105     }
00106
00107 #if TARGET_OS_MAC
00108     FSRef foldermacspec;
00109
00110     if( macDirSpec != 0L )
00111     {
00112         foldermacspec = *macDirSpec;
00113     }
00114     else if( path != 0L )
00115     {
00116         FSPathMakeRef(posix_to_utf8(path), &foldermacspec, NULL);
00117     }
00118
00119     macspec = &foldermacspec;
00120 #endif
00121
00122     if( path == 0L || (dirp = opendir(path)) == 0L )
00123     {
00124         errstr = "Error while accessing ";
00125         errstr << path;
00126         errstr << " (error " << errno << ')';
00127         res = report.OnError(errstr, errno);
00128         goto exit;
00129     }
00130
00131     tmpname = path;
00132     tmp = tmpname;
00133     const char* next;
00134
00135     tmpname.rtrim (kPathDelimiter);
00136
00137     next = tmp;
00138
00139     while( (tmp = strchr(next, kPathDelimiter)) != 0L )
00140     {
00141         next = ++tmp;
00142     }
00143
00144     dirname = next;
00145
00146     res = report.EnterDirectory(path, dirname, macspec);
00147     if( res != kContinueTraversal )
00148         goto abort;
00149
00150     while( (dp = readdir(dirp)) != NULL )
00151     {
00152         res = report.OnIdle(path);
00153
00154         if( res != kContinueTraversal )
00155             goto abort;
00156
00157         if( strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0 )
00158             continue;
00159
00160         fullname = path;
00161         if( !fullname.endsWith(kPathDelimiter) )
00162             fullname << kPathDelimiter;
00163
00164         fullname << dp->d_name;
00165
00166         macspec = 0L;
00167
00168 #if TARGET_RT_MAC_MACHO
00169         GUSIFileSpec inspec(foldermacspec);
00170         inspec += dp->d_name;
00171         UFSSpec infspec = inspec;
00172         macspec = &infspec;
00173 #else
00174 #   if defined(WIN32)
00175 #       if ENABLE_WINCVSDEBUG
00176         if( (dbg_mask & wcvsdbg_trace_modified_checks) && (dbg_mask & wcvsdbg_verbose) )
00177         {
00178             AppendWinCvsDebugMask(wcvsdbg_trace_dst_checks | wcvsdbg_trace_stat);
00179             tracestr = "Stat(";
00180             tracestr << static_cast<const char*>(fullname);
00181             tracestr << ") ...\n";
00182             cvs_err(tracestr);
00183             OutputDebugString(tracestr);
00184         }
00185 #       endif   // ENABLE_WINCVSDEBUG
00186 #   endif   // defined(WIN32)
00187 #endif
00188
00189         const int statres = stat(fullname, &sb);
00190         if( statres != -1 )
00191         {
00192             if( S_ISDIR(sb.st_mode) )
00193             {
00194                 res = report.OnDirectory(path, fullname, dp->d_name, sb, macspec);
00195
00196                 if( res == kSkipFile )
00197                     continue;
00198
00199                 if( res != kContinueTraversal )
00200                     goto abort;
00201
00202                 res = FileTraverse(fullname, report, macspec);
00203
00204                 if( res != kContinueTraversal )
00205                     goto abort;
00206             }
00207             else if( S_ISREG(sb.st_mode) )
00208             {
00209                 res = report.OnFile(path, fullname, dp->d_name, sb, macspec);
00210
00211                 if( res == kSkipFile )
00212                     continue;
00213
00214                 if( res != kContinueTraversal )
00215                     goto abort;
00216             }
00217 #ifdef S_ISLNK
00218             else if( S_ISLNK(sb.st_mode) )
00219             {
00220                 res = report.OnAlias(path, fullname, dp->d_name, sb, macspec);
00221
00222                 if( res == kSkipFile)
00223                     continue;
00224
00225                 if( res != kContinueTraversal )
00226                     goto abort;
00227             }
00228 #endif /* S_ISLNK */
00229             else
00230             {
00231                 /* TODO : Unix devices */
00232                 errstr = "Error while accessing ";
00233                 errstr << fullname;
00234                 errstr << " (error " << errno << ')';
00235                 res = report.OnError(errstr, errno);
00236                 goto abort;
00237             }
00238         }
00239         else
00240         {
00241             errstr = "Error while accessing ";
00242             errstr << fullname;
00243             errstr << " (error " << errno << ')';
00244             res = report.OnError(errstr, errno);
00245
00246             // no abort, because all
00247             // * files not read yet will be signed as missing and all
00248             // * folder will not be displayed
00249             //goto abort;
00250         }
00251
00252 #ifdef qUnix
00253         app->PeekPumpAndIdle(true);
00254
00255         // print actual folder
00256         app->SetStatusBarText(path);
00257 #endif
00258     }
00259
00260     res = report.ExitDirectory(path);
00261
00262 abort:
00263     closedir(dirp);
00264
00265 exit:
00266     if( NULL != originalPath )
00267     {
00268         chdir(originalPath);
00269         free(originalPath);
00270         originalPath = NULL;
00271     }
00272
00273 #if defined(WIN32)
00274 #   if ENABLE_WINCVSDEBUG
00275     SetWinCvsDebugMask(dbg_mask);
00276 #   endif   // ENABLE_WINCVSDEBUG
00277 #endif  // defined(WIN32)
00278
00279 #ifdef qUnix
00280     // print actual folder
00281     app->SetStatusBarText("");
00282 #endif
00283
00284     return res;
00285 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FileTraversal.h File Reference

common/FileTraversal.h File Reference

#include "TextBinary.h"
#include <sys/stat.h>
#include "ndir.h"
#include <direct.h>

Include dependency graph for FileTraversal.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | TraversalReport
Traverse report base class. More...

Defines

#define | AFX_FILETRAVERSAL_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
#define | MAX_PATH 5000
#define | STRUCT_DIRENT struct direct

Enumerations

enum kTraversal {
kContinueTraversal,
kStopTraversal,
kSkipFile,
kTraversalError
}
Traverse return codes enum. More...

Functions

kTraversal | FileTraverse (const char *path, TraversalReport &report, const FSSpec *macDirSpec=0L)

Define Documentation

#define AFX_FILETRAVERSAL_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file FileTraversal.h.

#define MAX_PATH 5000

Definition at line 64 of file FileTraversal.h.

Referenced by KoPathColumn::Compare(), CompatMakeSurePathExists(), CreateFolder(), FileTraverse(), CCJHyperLink::GetRegKey(), CCJHyperLink::GotoURL(), MakeTmpFile(), CHistComboBoxEx::NewRoot(), CCJHyperLink::SetDefaultCursor(), SplitPath(), TraverseHistory(), and CHistComboBoxEx::WindowProc().

#define STRUCT_DIRENT struct direct

Definition at line 71 of file FileTraversal.h.

Referenced by FileTraverse().

Enumeration Type Documentation

enum kTraversal

Traverse return codes enum.

Enumeration values:
kContinueTraversal | Continue traversing
kStopTraversal | Stop traversing
kSkipFile | Skip file
kTraversalError | Error while traversing
Definition at line 78 of file FileTraversal.h.

Referenced by CompatImportFilter(), TBrowserFill::EnterDirectory(), TBrowserFillDummy::EnterDirectory(), TViewFill::EnterDirectory(), LSReport::EnterDirectory(), CFillTclEntries::EnterDirectory(), CFillPyEntries::EnterDirectory(), ImportReport::EnterDirectory(), TraversalReport::EnterDirectory(), TBrowserFill::ExitDirectory(), TBrowserFillDummy::ExitDirectory(), TViewFill::ExitDirectory(), LSReport::ExitDirectory(), CFillTclEntries::ExitDirectory(), CFillPyEntries::ExitDirectory(), ImportReport::ExitDirectory(), TraversalReport::ExitDirectory(), FileTraverse(), list_all_types_recur(), TViewFill::OnAlias(), CFillTclEntries::OnAlias(), CFillPyEntries::OnAlias(), ImportReport::OnAlias(), TraversalReport::OnAlias(), LSReport::OnAnyDevice(), TraversalReport::OnAnyDevice(), TBrowserFill::OnDirectory(), TBrowserFillDummy::OnDirectory(), TViewFill::OnDirectory(), CFillTclEntries::OnDirectory(), CFillPyEntries::OnDirectory(), ImportReport::OnDirectory(), TraversalReport::OnDirectory(), TBrowserFill::OnError(), TBrowserFillDummy::OnError(), TViewFill::OnError(), LSReport::OnError(), CFillTclEntries::OnError(), CFillPyEntries::OnError(), CFindSettings::OnError(), MacroTraversal::OnError(), ImportReport::OnError(), TraversalReport::OnError(), TViewFill::OnFile(), CFillTclEntries::OnFile(), CFillPyEntries::OnFile(), CFindSettings::OnFile(), MacroTraversal::OnFile(), ImportReport::OnFile(), TraversalReport::OnFile(), TBrowserFill::OnIdle(), TBrowserFillDummy::OnIdle(), TViewFill::OnIdle(), LSReport::OnIdle(), CFillTclEntries::OnIdle(), CFillPyEntries::OnIdle(), ImportReport::OnIdle(), TraversalReport::OnIdle(), CWinCvsBrowser::OnItemexpanding(), CWinCvsBrowser::ResetBrowser(), CBrowseFileView::ResetView(), and tclDirProc().

00079 {
00080     kContinueTraversal,
00081     kStopTraversal,
00082     kSkipFile,
00083     kTraversalError
00084 } kTraversal;

Function Documentation

kTraversal FileTraverse | ( | const char * | path,
 |  | TraversalReport & | report,
 |  | const FSSpec * | macDirSpec
 | ) |

Traverse given path

Parameters:
path | Path to traverse
report | Return traversal report
macDirSpec | Mac specific
Returns:
kTraversal value to indicate whether to continue the traversing
Definition at line 73 of file FileTraversal.cpp.

References closedir(), CStr, cvs_err(), DIR, TraversalReport::EnterDirectory(), exit, TraversalReport::ExitDirectory(), free, USemaphore::IsEnteredTwice(), kContinueTraversal, kSkipFile, kTraversal, MAX_PATH, NULL, TraversalReport::OnAlias(), TraversalReport::OnDirectory(), TraversalReport::OnError(), TraversalReport::OnFile(), TraversalReport::OnIdle(), opendir(), UCvsApp::PeekPumpAndIdle(), readdir(), UCvsApp::SetStatusBarText(), stat::st_mode, stat, STRUCT_DIRENT, and UFSSpec.

Referenced by AskCreatePersistentSettings(), cvsgui_GetCvsEntries(), GetAllPersistentSettings(), HasPersistentSettings(), list_all_types_recur(), LoadPersistentSettings(), MacrosReloadAll(), TBrowserFill::OnDirectory(), TViewFill::OnDirectory(), CWinCvsBrowser::OnItemexpanding(), UCvsFolders::OnTreeExpanding(), CWinCvsBrowser::ResetBrowser(), UCvsFolders::ResetBrowser(), CBrowseFileView::ResetView(), UCvsFiles::ResetView(), SavePersistentSettings(), tclCvsEntriesProc(), and tclDirProc().

00074 {
00075     kTraversal res = kContinueTraversal;
00076
00077     DIR* dirp = 0L;
00078     STRUCT_DIRENT* dp;
00079     struct stat sb;
00080     CStr fullname, errstr, dirname, tmpname;
00081     const char* tmp;
00082     const UFSSpec *macspec = 0L;
00083
00084 #if defined(WIN32)
00085 #   if ENABLE_WINCVSDEBUG
00086     unsigned long dbg_mask = GetWinCvsDebugMask(false);
00087     CStr tracestr;
00088 #   endif   // ENABLE_WINCVSDEBUG
00089 #endif
00090
00091 #ifdef qUnix
00092     UCvsApp* app = UCvsApp::gApp;
00093 #endif
00094
00095     // Used to restore current directory
00096     static bool getPathFlag = false;
00097     char* originalPath = NULL;
00098
00099     USemaphore policeman(getPathFlag);
00100     USemaphore runstate(TraversalReport::GetRefRunning());
00101
00102     if( !policeman.IsEnteredTwice() )
00103     {
00104         originalPath = getcwd(NULL, MAX_PATH);
00105     }
00106
00107 #if TARGET_OS_MAC
00108     FSRef foldermacspec;
00109
00110     if( macDirSpec != 0L )
00111     {
00112         foldermacspec = *macDirSpec;
00113     }
00114     else if( path != 0L )
00115     {
00116         FSPathMakeRef(posix_to_utf8(path), &foldermacspec, NULL);
00117     }
00118
00119     macspec = &foldermacspec;
00120 #endif
00121
00122     if( path == 0L || (dirp = opendir(path)) == 0L )
00123     {
00124         errstr = "Error while accessing ";
00125         errstr << path;
00126         errstr << " (error " << errno << ')';
00127         res = report.OnError(errstr, errno);
00128         goto exit;
00129     }
00130
00131     tmpname = path;
00132     tmp = tmpname;
00133     const char* next;
00134
00135     tmpname.rtrim (kPathDelimiter);
00136
00137     next = tmp;
00138
00139     while( (tmp = strchr(next, kPathDelimiter)) != 0L )
00140     {
00141         next = ++tmp;
00142     }
00143
00144     dirname = next;
00145
00146     res = report.EnterDirectory(path, dirname, macspec);
00147     if( res != kContinueTraversal )
00148         goto abort;
00149
00150     while( (dp = readdir(dirp)) != NULL )
00151     {
00152         res = report.OnIdle(path);
00153
00154         if( res != kContinueTraversal )
00155             goto abort;
00156
00157         if( strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0 )
00158             continue;
00159
00160         fullname = path;
00161         if( !fullname.endsWith(kPathDelimiter) )
00162             fullname << kPathDelimiter;
00163
00164         fullname << dp->d_name;
00165
00166         macspec = 0L;
00167
00168 #if TARGET_RT_MAC_MACHO
00169         GUSIFileSpec inspec(foldermacspec);
00170         inspec += dp->d_name;
00171         UFSSpec infspec = inspec;
00172         macspec = &infspec;
00173 #else
00174 #   if defined(WIN32)
00175 #       if ENABLE_WINCVSDEBUG
00176         if( (dbg_mask & wcvsdbg_trace_modified_checks) && (dbg_mask & wcvsdbg_verbose) )
00177         {
00178             AppendWinCvsDebugMask(wcvsdbg_trace_dst_checks | wcvsdbg_trace_stat);
00179             tracestr = "Stat(";
00180             tracestr << static_cast<const char*>(fullname);
00181             tracestr << ") ...\n";
00182             cvs_err(tracestr);
00183             OutputDebugString(tracestr);
00184         }
00185 #       endif   // ENABLE_WINCVSDEBUG
00186 #   endif   // defined(WIN32)
00187 #endif
00188
00189         const int statres = stat(fullname, &sb);
00190         if( statres != -1 )
00191         {
00192             if( S_ISDIR(sb.st_mode) )
00193             {
00194                 res = report.OnDirectory(path, fullname, dp->d_name, sb, macspec);
00195
00196                 if( res == kSkipFile )
00197                     continue;
00198
00199                 if( res != kContinueTraversal )
00200                     goto abort;
00201
00202                 res = FileTraverse(fullname, report, macspec);
00203
00204                 if( res != kContinueTraversal )
00205                     goto abort;
00206             }
00207             else if( S_ISREG(sb.st_mode) )
00208             {
00209                 res = report.OnFile(path, fullname, dp->d_name, sb, macspec);
00210
00211                 if( res == kSkipFile )
00212                     continue;
00213
00214                 if( res != kContinueTraversal )
00215                     goto abort;
00216             }
00217 #ifdef S_ISLNK
00218             else if( S_ISLNK(sb.st_mode) )
00219             {
00220                 res = report.OnAlias(path, fullname, dp->d_name, sb, macspec);
00221
00222                 if( res == kSkipFile)
00223                     continue;
00224
00225                 if( res != kContinueTraversal )
00226                     goto abort;
00227             }
00228 #endif /* S_ISLNK */
00229             else
00230             {
00231                 /* TODO : Unix devices */
00232                 errstr = "Error while accessing ";
00233                 errstr << fullname;
00234                 errstr << " (error " << errno << ')';
00235                 res = report.OnError(errstr, errno);
00236                 goto abort;
00237             }
00238         }
00239         else
00240         {
00241             errstr = "Error while accessing ";
00242             errstr << fullname;
00243             errstr << " (error " << errno << ')';
00244             res = report.OnError(errstr, errno);
00245
00246             // no abort, because all
00247             // * files not read yet will be signed as missing and all
00248             // * folder will not be displayed
00249             //goto abort;
00250         }
00251
00252 #ifdef qUnix
00253         app->PeekPumpAndIdle(true);
00254
00255         // print actual folder
00256         app->SetStatusBarText(path);
00257 #endif
00258     }
00259
00260     res = report.ExitDirectory(path);
00261
00262 abort:
00263     closedir(dirp);
00264
00265 exit:
00266     if( NULL != originalPath )
00267     {
00268         chdir(originalPath);
00269         free(originalPath);
00270         originalPath = NULL;
00271     }
00272
00273 #if defined(WIN32)
00274 #   if ENABLE_WINCVSDEBUG
00275     SetWinCvsDebugMask(dbg_mask);
00276 #   endif   // ENABLE_WINCVSDEBUG
00277 #endif  // defined(WIN32)
00278
00279 #ifdef qUnix
00280     // print actual folder
00281     app->SetStatusBarText("");
00282 #endif
00283
00284     return res;
00285 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FilterMaskOptDlg.cpp File Reference

common/FilterMaskOptDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "FilterMaskOptDlg.h"

Include dependency graph for FilterMaskOptDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetFilterMaskOptions (int &reactionSpeed)
Get the graph options.

Function Documentation

bool CompatGetFilterMaskOptions ( int & reactionSpeed )

Get the graph options.

Definition at line 141 of file FilterMaskOptDlg.cpp.

References CFilterMaskOptDlg::m_reactionSpeed.

Referenced by CBrowseFileView::OnViewFilterbarOptions().

00142 {
00143     bool userHitOK = false;
00144
00145 #ifdef WIN32
00146     CFilterMaskOptDlg filterMaskOptDlg(reactionSpeed);
00147
00148     if( filterMaskOptDlg.DoModal() == IDOK )
00149     {
00150         reactionSpeed = filterMaskOptDlg.m_reactionSpeed;
00151
00152         userHitOK = true;
00153     }
00154 #endif /* WIN32 */
00155
00156 #ifdef qMacCvsPP
00157 #endif /* qMacCvsPP */
00158
00159 #if qUnix
00160 #endif // qUnix
00161
00162     return userHitOK;
00163 }

Generated on Sat Aug 7 22:44:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FilterMaskOptDlg.h File Reference

common/FilterMaskOptDlg.h File Reference

#include "HHelpSupport.h"

Include dependency graph for FilterMaskOptDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CFilterMaskOptDlg

Defines

#define | AFX_FILTERMASKOPTDLG_H__8560F3E7_6DBF_4EB6_B33E_E438B3020000__INCLUDED_

Functions

bool | CompatGetFilterMaskOptions (int &reactionSpeed)
Get the graph options.

Define Documentation

#define AFX_FILTERMASKOPTDLG_H__8560F3E7_6DBF_4EB6_B33E_E438B3020000__INCLUDED_

Definition at line 26 of file FilterMaskOptDlg.h.

Function Documentation

bool CompatGetFilterMaskOptions ( int & reactionSpeed )

Get the graph options.

Definition at line 141 of file FilterMaskOptDlg.cpp.

References CFilterMaskOptDlg::m_reactionSpeed.

Referenced by CBrowseFileView::OnViewFilterbarOptions().

00142 {
00143     bool userHitOK = false;
00144
00145 #ifdef WIN32
00146     CFilterMaskOptDlg filterMaskOptDlg(reactionSpeed);
00147
00148     if( filterMaskOptDlg.DoModal() == IDOK )
00149     {
00150         reactionSpeed = filterMaskOptDlg.m_reactionSpeed;
00151
00152         userHitOK = true;
00153     }
00154 #endif /* WIN32 */
00155
00156 #ifdef qMacCvsPP
00157 #endif /* qMacCvsPP */
00158
00159 #if qUnix
00160 #endif // qUnix
00161
00162     return userHitOK;
00163 }

Generated on Sat Aug 7 22:44:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FilterSelectionDlg.cpp File Reference

common/FilterSelectionDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "FilterSelectionDlg.h"

Include dependency graph for FilterSelectionDlg.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | PREV_FILTER_SIZE 100
Number of previous filters entries.

Functions

CMString * | GetPrevFilter (const int columnIndex)
bool | CompatGetFilterSelection (const int columnIndex, UStr &filterText)

Variables

CMString | gPrevFilterName (100,"P_PrevFilterName")
CMString | gPrevFilterExtention (100,"P_PrevFilterExtention")
CMString | gPrevFilterRevision (100,"P_PrevFilterRevision")
CMString | gPrevFilterOption (100,"P_PrevFilterOption")
CMString | gPrevFilterState (100,"P_PrevFilterState")
CMString | gPrevFilterEncoding (100,"P_PrevFilterEncoding")
CMString | gPrevFilterStickyTag (100,"P_PrevFilterStickyTag")
CMString | gPrevFilterTimeStamp (100,"P_PrevFilterTimeStamp")
CMString | gPrevFilterConflict (100,"P_PrevFilterConflict")
CMString | gPrevFilterPath (100,"P_PrevFilterPath")

Define Documentation

#define PREV_FILTER_SIZE 100

Number of previous filters entries.

Definition at line 35 of file FilterSelectionDlg.cpp.

Function Documentation

bool CompatGetFilterSelection | ( | const int | columnIndex,
 |  | UStr & | filterText
 | ) |

Get the filter selection

Parameters:
columnIndex | The column index
filterText | Filter text
Returns:
true if user selection was made, false otherwise
Definition at line 250 of file FilterSelectionDlg.cpp.

Referenced by CSortHeaderCtrl::OnFilterBtnClicked().

00251 {
00252     bool userHitOK = false;
00253
00254 #ifdef WIN32
00255     CFilterSelectionDlg filterSelection(columnIndex, filterText.c_str());
00256
00257     if( filterSelection.DoModal() == IDOK )
00258     {
00259         filterText = filterSelection.m_filterText;
00260
00261         userHitOK = true;
00262     }
00263 #endif /* WIN32 */
00264
00265 #ifdef qMacCvsPP
00266 #endif /* qMacCvsPP */
00267
00268 #if qUnix
00269 #endif // qUnix
00270
00271     return userHitOK;
00272 }

CMString* GetPrevFilter ( const int columnIndex )

Get the previous filter for a given column index

Parameters:
columnIndex Column index
Returns:
The previous filter
Definition at line 53 of file FilterSelectionDlg.cpp.

References gPrevFilterConflict, gPrevFilterEncoding, gPrevFilterExtention, gPrevFilterName, gPrevFilterOption, gPrevFilterPath, gPrevFilterRevision, gPrevFilterState, gPrevFilterStickyTag, gPrevFilterTimeStamp, and NULL.

Referenced by CFilterSelectionDlg::DoDataExchange(), CSortHeaderCtrl::OnFilterChanged(), CFilterSelectionDlg::OnInitDialog(), and CFilterSelectionDlg::OnSelchangeContentsCombo().

00054 {
00055     CMString* pRes = NULL;
00056
00057     if( columnIndex >= 0 && columnIndex < ColumnIndex::kEnd )
00058     {
00059         static CMString* prevFilters[ColumnIndex::kEnd] = { 0 };
00060
00061         if( !prevFilters[0] )
00062         {
00063             prevFilters[ColumnIndex::kName     ] = &gPrevFilterName;
00064             prevFilters[ColumnIndex::kExtention] = &gPrevFilterExtention;
00065             prevFilters[ColumnIndex::kRevision ] = &gPrevFilterRevision ;
00066             prevFilters[ColumnIndex::kOption   ] = &gPrevFilterOption;
00067             prevFilters[ColumnIndex::kState    ] = &gPrevFilterState;
00068             prevFilters[ColumnIndex::kEncoding ] = &gPrevFilterEncoding;
00069             prevFilters[ColumnIndex::kStickyTag] = &gPrevFilterStickyTag;
00070             prevFilters[ColumnIndex::kTimeStamp] = &gPrevFilterTimeStamp;
00071             prevFilters[ColumnIndex::kConflict ] = &gPrevFilterConflict;
00072             prevFilters[ColumnIndex::kPath     ] = &gPrevFilterPath;
00073         }
00074
00075         pRes = prevFilters[columnIndex];
00076     }
00077
00078     return pRes;
00079 }

Variable Documentation

CMString gPrevFilterConflict(100,"P_PrevFilterConflict") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterEncoding(100,"P_PrevFilterEncoding") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterExtention(100,"P_PrevFilterExtention") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterName(100,"P_PrevFilterName") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterOption(100,"P_PrevFilterOption") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterPath(100,"P_PrevFilterPath") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterRevision(100,"P_PrevFilterRevision") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterState(100,"P_PrevFilterState") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterStickyTag(100,"P_PrevFilterStickyTag") [static]

Referenced by GetPrevFilter().

CMString gPrevFilterTimeStamp(100,"P_PrevFilterTimeStamp") [static]

Referenced by GetPrevFilter().

Generated on Sat Aug 7 22:44:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FilterSelectionDlg.h File Reference

common/FilterSelectionDlg.h File Reference

#include "CvsEntries.h"
#include "HHelpSupport.h"

Include dependency graph for FilterSelectionDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CFilterSelectionDlg

Defines

#define | AFX_FILTERSELECTIONDLG_H__933ECF3F_C417_4C4E_AD6F_39769CCC4E6F__INCLUDED_

Functions

bool | CompatGetFilterSelection (const int columnIndex, UStr &filterText)
CMString * | GetPrevFilter (const int columnIndex)

Define Documentation

#define AFX_FILTERSELECTIONDLG_H__933ECF3F_C417_4C4E_AD6F_39769CCC4E6F__INCLUDED_

Definition at line 26 of file FilterSelectionDlg.h.

Function Documentation

bool CompatGetFilterSelection | ( | const int | columnIndex,
 |  | UStr & | filterText
 | ) |

Get the filter selection

Parameters:
columnIndex | The column index
filterText | Filter text
Returns:
true if user selection was made, false otherwise
Definition at line 250 of file FilterSelectionDlg.cpp.

Referenced by CSortHeaderCtrl::OnFilterBtnClicked().

00251 {
00252     bool userHitOK = false;
00253
00254 #ifdef WIN32
00255     CFilterSelectionDlg filterSelection(columnIndex, filterText.c_str());
00256
00257     if( filterSelection.DoModal() == IDOK )
00258     {
00259         filterText = filterSelection.m_filterText;
00260
00261         userHitOK = true;
00262     }
00263 #endif /* WIN32 */
00264
00265 #ifdef qMacCvsPP
00266 #endif /* qMacCvsPP */
00267
00268 #if qUnix
00269 #endif // qUnix
00270
00271     return userHitOK;
00272 }

CMString* GetPrevFilter ( const int columnIndex )

Get the previous filter for a given column index

Parameters:
columnIndex Column index
Returns:
The previous filter
Definition at line 53 of file FilterSelectionDlg.cpp.

References gPrevFilterConflict, gPrevFilterEncoding, gPrevFilterExtention, gPrevFilterName, gPrevFilterOption, gPrevFilterPath, gPrevFilterRevision, gPrevFilterState, gPrevFilterStickyTag, gPrevFilterTimeStamp, and NULL.

Referenced by CFilterSelectionDlg::DoDataExchange(), CSortHeaderCtrl::OnFilterChanged(), CFilterSelectionDlg::OnInitDialog(), and CFilterSelectionDlg::OnSelchangeContentsCombo().

00054 {
00055     CMString* pRes = NULL;
00056
00057     if( columnIndex >= 0 && columnIndex < ColumnIndex::kEnd )
00058     {
00059         static CMString* prevFilters[ColumnIndex::kEnd] = { 0 };
00060
00061         if( !prevFilters[0] )
00062         {
00063             prevFilters[ColumnIndex::kName     ] = &gPrevFilterName;
00064             prevFilters[ColumnIndex::kExtention] = &gPrevFilterExtention;
00065             prevFilters[ColumnIndex::kRevision ] = &gPrevFilterRevision ;
00066             prevFilters[ColumnIndex::kOption   ] = &gPrevFilterOption;
00067             prevFilters[ColumnIndex::kState    ] = &gPrevFilterState;
00068             prevFilters[ColumnIndex::kEncoding ] = &gPrevFilterEncoding;
00069             prevFilters[ColumnIndex::kStickyTag] = &gPrevFilterStickyTag;
00070             prevFilters[ColumnIndex::kTimeStamp] = &gPrevFilterTimeStamp;
00071             prevFilters[ColumnIndex::kConflict ] = &gPrevFilterConflict;
00072             prevFilters[ColumnIndex::kPath     ] = &gPrevFilterPath;
00073         }
00074
00075         pRes = prevFilters[columnIndex];
00076     }
00077
00078     return pRes;
00079 }

Generated on Sat Aug 7 22:44:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/fnmatch.c File Reference

common/fnmatch.c File Reference

#include <errno.h>
#include "fnmatch.h"

Include dependency graph for fnmatch.c:

Include dependency graph

Go to the source code of this file.

Functions

int | fnmatch (const char *pattern, const char *string, int flags)

Variables

unsigned char | WNT_filename_classes []

Function Documentation

int fnmatch | ( | const char * | pattern,
 |  | const char * | string,
 |  | int | flags
 | ) |

Definition at line 51 of file fnmatch.c.

References __FNM_FLAGS, FNM_NOESCAPE, FNM_NOMATCH, FNM_PATHNAME, FNM_PERIOD, and FOLD_FN_CHAR.

Referenced by MatchIgnoredList().

00058 {
00059   register const char *p = pattern, *n = string;
00060   register char c;
00061
00062   if ((flags & ~__FNM_FLAGS) != 0)
00063     {
00064       errno = EINVAL;
00065       return -1;
00066     }
00067
00068   while ((c = *p++) != '\0')
00069     {
00070       switch (c)
00071     {
00072     case '?':
00073       if (*n == '\0')
00074         return FNM_NOMATCH;
00075       else if ((flags & FNM_PATHNAME) && *n == '/')
00076         return FNM_NOMATCH;
00077       else if ((flags & FNM_PERIOD) && *n == '.' &&
00078            (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00079         return FNM_NOMATCH;
00080       break;
00081
00082     case '\\':
00083       if (!(flags & FNM_NOESCAPE))
00084         c = *p++;
00085       if (*n != c)
00086         return FNM_NOMATCH;
00087       break;
00088
00089     case '*':
00090       if ((flags & FNM_PERIOD) && *n == '.' &&
00091           (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00092         return FNM_NOMATCH;
00093
00094       for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
00095         if (((flags & FNM_PATHNAME) && *n == '/') ||
00096         (c == '?' && *n == '\0'))
00097           return FNM_NOMATCH;
00098
00099       if (c == '\0')
00100         return 0;
00101
00102       {
00103         char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
00104         for (--p; *n != '\0'; ++n)
00105           if ((c == '[' || *n == c1) &&
00106           fnmatch(p, n, flags & ~FNM_PERIOD) == 0)
00107         return 0;
00108         return FNM_NOMATCH;
00109       }
00110
00111     case '[':
00112       {
00113         /* Nonzero if the sense of the character class is inverted.  */
00114         register int not;
00115
00116         if (*n == '\0')
00117           return FNM_NOMATCH;
00118
00119         if ((flags & FNM_PERIOD) && *n == '.' &&
00120         (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00121           return FNM_NOMATCH;
00122
00123         not = (*p == '!' || *p == '^');
00124         if (not)
00125           ++p;
00126
00127         c = *p++;
00128         for (;;)
00129           {
00130         register char cstart = c, cend = c;
00131
00132         if (!(flags & FNM_NOESCAPE) && c == '\\')
00133           cstart = cend = *p++;
00134
00135         if (c == '\0')
00136           /* [ (unterminated) loses.  */
00137           return FNM_NOMATCH;
00138
00139         c = *p++;
00140
00141         if ((flags & FNM_PATHNAME) && c == '/')
00142           /* [/] can never match.  */
00143           return FNM_NOMATCH;
00144
00145         if (c == '-' && *p != ']')
00146           {
00147             cend = *p++;
00148             if (!(flags & FNM_NOESCAPE) && cend == '\\')
00149               cend = *p++;
00150             if (cend == '\0')
00151               return FNM_NOMATCH;
00152             c = *p++;
00153           }
00154
00155         if (*n >= cstart && *n <= cend)
00156           goto matched;
00157
00158         if (c == ']')
00159           break;
00160           }
00161         if (!not)
00162           return FNM_NOMATCH;
00163         break;
00164
00165       matched:;
00166         /* Skip the rest of the [...] that already matched.  */
00167         while (c != ']')
00168           {
00169         if (c == '\0')
00170           /* [... (unterminated) loses.  */
00171           return FNM_NOMATCH;
00172
00173         c = *p++;
00174         if (!(flags & FNM_NOESCAPE) && c == '\\')
00175           /* 1003.2d11 is unclear if this is right.  %%% */
00176           ++p;
00177           }
00178         if (not)
00179           return FNM_NOMATCH;
00180       }
00181       break;
00182
00183     default:
00184       if (FOLD_FN_CHAR (c) != FOLD_FN_CHAR (*n))
00185         return FNM_NOMATCH;
00186     }
00187
00188       ++n;
00189     }
00190
00191   if (*n == '\0')
00192     return 0;
00193
00194   return FNM_NOMATCH;
00195 }

Variable Documentation

unsigned char WNT_filename_classes[]

Definition at line 224 of file fnmatch.c.

Generated on Sat Aug 7 22:44:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/fnmatch.h File Reference

common/fnmatch.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | _FNMATCH_H 1
#define | FNM_PATHNAME (1 << 0)
#define | FNM_NOESCAPE (1 << 1)
#define | FNM_PERIOD (1 << 2)
#define | __FNM_FLAGS (FNM_PATHNAME|FNM_NOESCAPE|FNM_PERIOD)
#define | FNM_NOMATCH 1
#define | __STDC__ 1
#define | FOLD_FN_CHAR(c) (WNT_filename_classes[(unsigned char) (c)])

Functions

int | fnmatch (const char *pattern, const char *string, int flags)

Variables

unsigned char | WNT_filename_classes []

Define Documentation

#define __FNM_FLAGS (FNM_PATHNAME|FNM_NOESCAPE|FNM_PERIOD)

Definition at line 34 of file fnmatch.h.

Referenced by fnmatch().

#define __STDC__ 1

Definition at line 41 of file fnmatch.h.

#define _FNMATCH_H 1

Definition at line 20 of file fnmatch.h.

#define FNM_NOESCAPE (1 << 1)

Definition at line 30 of file fnmatch.h.

Referenced by fnmatch().

#define FNM_NOMATCH 1

Definition at line 38 of file fnmatch.h.

Referenced by fnmatch().

#define FNM_PATHNAME (1 << 0)

Definition at line 28 of file fnmatch.h.

Referenced by fnmatch().

#define FNM_PERIOD (1 << 2)

Definition at line 32 of file fnmatch.h.

Referenced by fnmatch().

#define FOLD_FN_CHAR ( c ) (WNT_filename_classes[(unsigned char) (c)])

Definition at line 56 of file fnmatch.h.

Referenced by fnmatch().

Function Documentation

int fnmatch | ( | const char * | pattern,
 |  | const char * | string,
 |  | int | flags
 | ) |

Definition at line 51 of file fnmatch.c.

References __FNM_FLAGS, FNM_NOESCAPE, FNM_NOMATCH, FNM_PATHNAME, FNM_PERIOD, and FOLD_FN_CHAR.

Referenced by MatchIgnoredList().

00058 {
00059   register const char *p = pattern, *n = string;
00060   register char c;
00061
00062   if ((flags & ~__FNM_FLAGS) != 0)
00063     {
00064       errno = EINVAL;
00065       return -1;
00066     }
00067
00068   while ((c = *p++) != '\0')
00069     {
00070       switch (c)
00071     {
00072     case '?':
00073       if (*n == '\0')
00074         return FNM_NOMATCH;
00075       else if ((flags & FNM_PATHNAME) && *n == '/')
00076         return FNM_NOMATCH;
00077       else if ((flags & FNM_PERIOD) && *n == '.' &&
00078            (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00079         return FNM_NOMATCH;
00080       break;
00081
00082     case '\\':
00083       if (!(flags & FNM_NOESCAPE))
00084         c = *p++;
00085       if (*n != c)
00086         return FNM_NOMATCH;
00087       break;
00088
00089     case '*':
00090       if ((flags & FNM_PERIOD) && *n == '.' &&
00091           (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00092         return FNM_NOMATCH;
00093
00094       for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
00095         if (((flags & FNM_PATHNAME) && *n == '/') ||
00096         (c == '?' && *n == '\0'))
00097           return FNM_NOMATCH;
00098
00099       if (c == '\0')
00100         return 0;
00101
00102       {
00103         char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
00104         for (--p; *n != '\0'; ++n)
00105           if ((c == '[' || *n == c1) &&
00106           fnmatch(p, n, flags & ~FNM_PERIOD) == 0)
00107         return 0;
00108         return FNM_NOMATCH;
00109       }
00110
00111     case '[':
00112       {
00113         /* Nonzero if the sense of the character class is inverted.  */
00114         register int not;
00115
00116         if (*n == '\0')
00117           return FNM_NOMATCH;
00118
00119         if ((flags & FNM_PERIOD) && *n == '.' &&
00120         (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00121           return FNM_NOMATCH;
00122
00123         not = (*p == '!' || *p == '^');
00124         if (not)
00125           ++p;
00126
00127         c = *p++;
00128         for (;;)
00129           {
00130         register char cstart = c, cend = c;
00131
00132         if (!(flags & FNM_NOESCAPE) && c == '\\')
00133           cstart = cend = *p++;
00134
00135         if (c == '\0')
00136           /* [ (unterminated) loses.  */
00137           return FNM_NOMATCH;
00138
00139         c = *p++;
00140
00141         if ((flags & FNM_PATHNAME) && c == '/')
00142           /* [/] can never match.  */
00143           return FNM_NOMATCH;
00144
00145         if (c == '-' && *p != ']')
00146           {
00147             cend = *p++;
00148             if (!(flags & FNM_NOESCAPE) && cend == '\\')
00149               cend = *p++;
00150             if (cend == '\0')
00151               return FNM_NOMATCH;
00152             c = *p++;
00153           }
00154
00155         if (*n >= cstart && *n <= cend)
00156           goto matched;
00157
00158         if (c == ']')
00159           break;
00160           }
00161         if (!not)
00162           return FNM_NOMATCH;
00163         break;
00164
00165       matched:;
00166         /* Skip the rest of the [...] that already matched.  */
00167         while (c != ']')
00168           {
00169         if (c == '\0')
00170           /* [... (unterminated) loses.  */
00171           return FNM_NOMATCH;
00172
00173         c = *p++;
00174         if (!(flags & FNM_NOESCAPE) && c == '\\')
00175           /* 1003.2d11 is unclear if this is right.  %%% */
00176           ++p;
00177           }
00178         if (not)
00179           return FNM_NOMATCH;
00180       }
00181       break;
00182
00183     default:
00184       if (FOLD_FN_CHAR (c) != FOLD_FN_CHAR (*n))
00185         return FNM_NOMATCH;
00186     }
00187
00188       ++n;
00189     }
00190
00191   if (*n == '\0')
00192     return 0;
00193
00194   return FNM_NOMATCH;
00195 }

Variable Documentation

unsigned char WNT_filename_classes[]

Definition at line 224 of file fnmatch.c.

Generated on Sat Aug 7 22:44:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getline.c File Reference

common/getline.c File Reference

#include <sys/types.h>
#include <stdio.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include "getline.h"

Include dependency graph for getline.c:

Include dependency graph

Go to the source code of this file.

Defines

#define | MIN_CHUNK 64

Functions

int | getstr (char **lineptr, size_t *n, FILE *stream, char terminator, int offset)
int | getline (char **lineptr, size_t *n, FILE *stream)

Define Documentation

#define MIN_CHUNK 64

Definition at line 40 of file getline.c.

Referenced by getstr().

Function Documentation

int getline | ( | char ** | lineptr,
 |  | size_t * | n,
 |  | FILE * | stream
 | ) |

Definition at line 146 of file getline.c.

References getstr().

Referenced by CvsLogParse(), CItemListDlg::DisplayItems(), CCvsRootDlg::DisplayKeywords(), CMfFileDialog::DoModal(), CCvsRootDlg::FillProtocolsComboBox(), GetNextEntriesLine(), LoadSettingsInternal(), CModuleParserConsole::NeedsNormalize(), CModuleParserConsole::Normalize(), MacroTraversal::OnFile(), CInfoParserConsole::Parse(), CProtocolParserConsole::Parse(), CCvsRootParser::Parse(), CTagParserConsole::Parse(), CModuleParserConsole::Parse(), CListParserConsole::Parse(), CCvsSandboxInfo::ReadAdminFile(), ReadIgnoredFile(), CCvsRootParser::SplitCvsRoot(), and Tag_Open().

00147 {
00148   return getstr (lineptr, n, stream, '\n', 0);
00149 }

Here is the call graph for this function:

int getstr | ( | char ** | lineptr,
 |  | size_t * | n,
 |  | FILE * | stream,
 |  | char | terminator,
 |  | int | offset
 | ) |

Definition at line 51 of file getline.c.

References malloc, MIN_CHUNK, and realloc.

Referenced by getline().

00052 {
00053   int nchars_avail;     /* Allocated but unused chars in *LINEPTR.  */
00054   char *read_pos;       /* Where we're reading into *LINEPTR. */
00055   int ret;
00056
00057   if (!lineptr || !n || !stream)
00058     {
00059       errno = EINVAL;
00060       return -1;
00061     }
00062
00063   if (!*lineptr)
00064     {
00065       *n = MIN_CHUNK;
00066       *lineptr = (char *)malloc (*n);
00067       if (!*lineptr)
00068     {
00069       errno = ENOMEM;
00070       return -1;
00071     }
00072     }
00073
00074   nchars_avail = *n - offset;
00075   read_pos = *lineptr + offset;
00076
00077   for (;;)
00078     {
00079       int save_errno;
00080       register int c = getc (stream);
00081
00082       save_errno = errno;
00083
00084       /* We always want at least one char left in the buffer, since we
00085      always (unless we get an error while reading the first char)
00086      NUL-terminate the line buffer.  */
00087
00088       assert((*lineptr + *n) == (read_pos + nchars_avail));
00089       if (nchars_avail < 2)
00090     {
00091       if (*n > MIN_CHUNK)
00092         *n *= 2;
00093       else
00094         *n += MIN_CHUNK;
00095
00096       nchars_avail = *n + *lineptr - read_pos;
00097       *lineptr = (char *)realloc (*lineptr, *n);
00098       if (!*lineptr)
00099         {
00100           errno = ENOMEM;
00101           return -1;
00102         }
00103       read_pos = *n - nchars_avail + *lineptr;
00104       assert((*lineptr + *n) == (read_pos + nchars_avail));
00105     }
00106
00107       if (ferror (stream))
00108     {
00109       /* Might like to return partial line, but there is no
00110          place for us to store errno.  And we don't want to just
00111          lose errno.  */
00112       errno = save_errno;
00113       return -1;
00114     }
00115
00116       if (c == EOF)
00117     {
00118       /* Return partial line, if any.  */
00119       if (read_pos == *lineptr)
00120         return -1;
00121       else
00122         break;
00123     }
00124
00125 #ifdef TARGET_OS_MAC
00126       if (terminator == '\n' && c == '\r')
00127     c = '\n';
00128 #endif
00129
00130       *read_pos++ = c;
00131       nchars_avail--;
00132
00133       if (c == terminator)
00134     /* Return the line.  */
00135     break;
00136    }
00137
00138   /* Done - NUL terminate and return the number of chars read.  */
00139   *read_pos = '\0';
00140
00141   ret = read_pos - (*lineptr + offset);
00142   return ret;
00143 }

Generated on Sat Aug 7 22:44:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getline.h File Reference

common/getline.h File Reference

#include <stdio.h>

Include dependency graph for getline.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | _getline_h_ 1
#define | __PROTO(args) args
#define | __ssize_t int

Functions

int | getline (char **_lineptr, size_t *_n, FILE *_stream)
int | getstr (char **_lineptr, size_t *_n, FILE *_stream, char _terminator, int _offset)

Define Documentation

#define __PROTO ( args ) args

Definition at line 31 of file getline.h.

#define __ssize_t int

Definition at line 37 of file getline.h.

#define _getline_h_ 1

Definition at line 22 of file getline.h.

Function Documentation

int getline | ( | char ** | _lineptr,
 |  | size_t * | _n,
 |  | FILE * | _stream
 | ) |

Definition at line 146 of file getline.c.

References getstr().

Referenced by CvsLogParse(), CItemListDlg::DisplayItems(), CCvsRootDlg::DisplayKeywords(), CMfFileDialog::DoModal(), CCvsRootDlg::FillProtocolsComboBox(), GetNextEntriesLine(), LoadSettingsInternal(), CModuleParserConsole::NeedsNormalize(), CModuleParserConsole::Normalize(), MacroTraversal::OnFile(), CListParserConsole::Parse(), CModuleParserConsole::Parse(), CTagParserConsole::Parse(), CCvsRootParser::Parse(), CProtocolParserConsole::Parse(), CInfoParserConsole::Parse(), CCvsSandboxInfo::ReadAdminFile(), ReadIgnoredFile(), CCvsRootParser::SplitCvsRoot(), and Tag_Open().

00147 {
00148   return getstr (lineptr, n, stream, '\n', 0);
00149 }

Here is the call graph for this function:

int getstr | ( | char ** | _lineptr,
 |  | size_t * | _n,
 |  | FILE * | _stream,
 |  | char | _terminator,
 |  | int | _offset
 | ) |

Definition at line 51 of file getline.c.

References malloc, MIN_CHUNK, and realloc.

Referenced by getline().

00052 {
00053   int nchars_avail;     /* Allocated but unused chars in *LINEPTR.  */
00054   char *read_pos;       /* Where we're reading into *LINEPTR. */
00055   int ret;
00056
00057   if (!lineptr || !n || !stream)
00058     {
00059       errno = EINVAL;
00060       return -1;
00061     }
00062
00063   if (!*lineptr)
00064     {
00065       *n = MIN_CHUNK;
00066       *lineptr = (char *)malloc (*n);
00067       if (!*lineptr)
00068     {
00069       errno = ENOMEM;
00070       return -1;
00071     }
00072     }
00073
00074   nchars_avail = *n - offset;
00075   read_pos = *lineptr + offset;
00076
00077   for (;;)
00078     {
00079       int save_errno;
00080       register int c = getc (stream);
00081
00082       save_errno = errno;
00083
00084       /* We always want at least one char left in the buffer, since we
00085      always (unless we get an error while reading the first char)
00086      NUL-terminate the line buffer.  */
00087
00088       assert((*lineptr + *n) == (read_pos + nchars_avail));
00089       if (nchars_avail < 2)
00090     {
00091       if (*n > MIN_CHUNK)
00092         *n *= 2;
00093       else
00094         *n += MIN_CHUNK;
00095
00096       nchars_avail = *n + *lineptr - read_pos;
00097       *lineptr = (char *)realloc (*lineptr, *n);
00098       if (!*lineptr)
00099         {
00100           errno = ENOMEM;
00101           return -1;
00102         }
00103       read_pos = *n - nchars_avail + *lineptr;
00104       assert((*lineptr + *n) == (read_pos + nchars_avail));
00105     }
00106
00107       if (ferror (stream))
00108     {
00109       /* Might like to return partial line, but there is no
00110          place for us to store errno.  And we don't want to just
00111          lose errno.  */
00112       errno = save_errno;
00113       return -1;
00114     }
00115
00116       if (c == EOF)
00117     {
00118       /* Return partial line, if any.  */
00119       if (read_pos == *lineptr)
00120         return -1;
00121       else
00122         break;
00123     }
00124
00125 #ifdef TARGET_OS_MAC
00126       if (terminator == '\n' && c == '\r')
00127     c = '\n';
00128 #endif
00129
00130       *read_pos++ = c;
00131       nchars_avail--;
00132
00133       if (c == terminator)
00134     /* Return the line.  */
00135     break;
00136    }
00137
00138   /* Done - NUL terminate and return the number of chars read.  */
00139   *read_pos = '\0';
00140
00141   ret = read_pos - (*lineptr + offset);
00142   return ret;
00143 }

Generated on Sat Aug 7 22:44:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getopt.c File Reference

common/getopt.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include "getopt.h"
#include <string.h>

Include dependency graph for getopt.c:

Include dependency graph

Go to the source code of this file.

Defines

#define | my_index strchr

Enumerations

enum {
REQUIRE_ORDER,
PERMUTE,
RETURN_IN_ORDER
}

Functions

void | exchange (char **argv)
char * | _getopt_initialize (char *optstring)
int | _getopt_internal (int argc, char **argv, char *optstring, struct option *longopts, int *longind, int long_only)
int | getopt (int argc, char **argv, char *optstring)

Variables

char * | optarg = NULL
int | optind = 0
char * | nextchar
int | opterr = 1
int optopt = '?'
enum { ... } | ordering
char * | posixly_correct
int first_nonopt
int last_nonopt

Define Documentation

#define my_index strchr

Definition at line 178 of file getopt.c.

Referenced by _getopt_internal().

Enumeration Type Documentation

anonymous enum

Enumeration values:
REQUIRE_ORDER
PERMUTE
RETURN_IN_ORDER
Definition at line 164 of file getopt.c.
00165 {
00166   REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
00167 } ordering;

Function Documentation

char* _getopt_initialize ( char * optstring ) [static]

Definition at line 308 of file getopt.c.

References first_nonopt, getenv, last_nonopt, nextchar, NULL, optind, ordering, PERMUTE, posixly_correct, REQUIRE_ORDER, and RETURN_IN_ORDER.

Referenced by _getopt_internal().

00310 {
00311   /* Start processing options with ARGV-element 1 (since ARGV-element 0
00312      is the program name); the sequence of previously skipped
00313      non-option ARGV-elements is empty.  */
00314
00315   first_nonopt = last_nonopt = optind = 1;
00316
00317   nextchar = NULL;
00318
00319   posixly_correct = getenv ("POSIXLY_CORRECT");
00320
00321   /* Determine how to handle the ordering of options and nonoptions.  */
00322
00323   if (optstring[0] == '-')
00324     {
00325       ordering = RETURN_IN_ORDER;
00326       ++optstring;
00327     }
00328   else if (optstring[0] == '+')
00329     {
00330       ordering = REQUIRE_ORDER;
00331       ++optstring;
00332     }
00333   else if (posixly_correct != NULL)
00334     ordering = REQUIRE_ORDER;
00335   else
00336     ordering = PERMUTE;
00337
00338   return optstring;
00339 }

int _getopt_internal | ( | int | argc,
 |  | char ** | argv,
 |  | char * | optstring,
 |  | struct option * | longopts,
 |  | int * | longind,
 |  | int | long_only
 | ) |

Definition at line 408 of file getopt.c.

References _getopt_initialize(), exchange(), first_nonopt, last_nonopt, my_index, nextchar, NULL, optarg, opterr, optind, optopt, ordering, PERMUTE, posixly_correct, and REQUIRE_ORDER.

00411 {
00412   optarg = NULL;
00413
00414   if (optind == 0)
00415     optstring = _getopt_initialize (optstring);
00416
00417   if (nextchar == NULL || *nextchar == '\0')
00418     {
00419       /* Advance to the next ARGV-element.  */
00420
00421       if (ordering == PERMUTE)
00422     {
00423       /* If we have just processed some options following some non-options,
00424          exchange them so that the options come first.  */
00425
00426       if (first_nonopt != last_nonopt && last_nonopt != optind)
00427         exchange ((char **) argv);
00428       else if (last_nonopt != optind)
00429         first_nonopt = optind;
00430
00431       /* Skip any additional non-options
00432          and extend the range of non-options previously skipped.  */
00433
00434       while (optind < argc
00435          && (argv[optind][0] != '-' || argv[optind][1] == '\0'))
00436         optind++;
00437       last_nonopt = optind;
00438     }
00439
00440       /* The special ARGV-element `--' means premature end of options.
00441      Skip it like a null option,
00442      then exchange with previous non-options as if it were an option,
00443      then skip everything else like a non-option.  */
00444
00445       if (optind != argc && !strcmp (argv[optind], "--"))
00446     {
00447       optind++;
00448
00449       if (first_nonopt != last_nonopt && last_nonopt != optind)
00450         exchange ((char **) argv);
00451       else if (first_nonopt == last_nonopt)
00452         first_nonopt = optind;
00453       last_nonopt = argc;
00454
00455       optind = argc;
00456     }
00457
00458       /* If we have done all the ARGV-elements, stop the scan
00459      and back over any non-options that we skipped and permuted.  */
00460
00461       if (optind == argc)
00462     {
00463       /* Set the next-arg-index to point at the non-options
00464          that we previously skipped, so the caller will digest them.  */
00465       if (first_nonopt != last_nonopt)
00466         optind = first_nonopt;
00467       return EOF;
00468     }
00469
00470       /* If we have come to a non-option and did not permute it,
00471      either stop the scan or describe it to the caller and pass it by.  */
00472
00473       if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
00474     {
00475       if (ordering == REQUIRE_ORDER)
00476         return EOF;
00477       optarg = argv[optind++];
00478       return 1;
00479     }
00480
00481       /* We have found another option-ARGV-element.
00482      Skip the initial punctuation.  */
00483
00484       nextchar = (argv[optind] + 1
00485           + (longopts != NULL && argv[optind][1] == '-'));
00486     }
00487
00488   /* Decode the current option-ARGV-element.  */
00489
00490   /* Check whether the ARGV-element is a long option.
00491
00492      If long_only and the ARGV-element has the form "-f", where f is
00493      a valid short option, don't consider it an abbreviated form of
00494      a long option that starts with f.  Otherwise there would be no
00495      way to give the -f short option.
00496
00497      On the other hand, if there's a long option "fubar" and
00498      the ARGV-element is "-fu", do consider that an abbreviation of
00499      the long option, just like "--fu", and not "-f" with arg "u".
00500
00501      This distinction seems to be the most useful approach.  */
00502
00503   if (longopts != NULL
00504       && (argv[optind][1] == '-'
00505       || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
00506     {
00507       char *nameend;
00508       const struct option *p;
00509       const struct option *pfound = NULL;
00510       int exact = 0;
00511       int ambig = 0;
00512       int indfound;
00513       int option_index;
00514
00515       for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
00516     /* Do nothing.  */ ;
00517
00518       /* Test all long options for either exact match
00519      or abbreviated matches.  */
00520       for (p = longopts, option_index = 0; p->name; p++, option_index++)
00521     if (!strncmp (p->name, nextchar, nameend - nextchar))
00522       {
00523         if (nameend - nextchar == (int) strlen (p->name))
00524           {
00525         /* Exact match found.  */
00526         pfound = p;
00527         indfound = option_index;
00528         exact = 1;
00529         break;
00530           }
00531         else if (pfound == NULL)
00532           {
00533         /* First nonexact match found.  */
00534         pfound = p;
00535         indfound = option_index;
00536           }
00537         else
00538           /* Second or later nonexact match found.  */
00539           ambig = 1;
00540       }
00541
00542       if (ambig && !exact)
00543     {
00544       if (opterr)
00545         fprintf (stderr, "%s: option `%s' is ambiguous\n",
00546              argv[0], argv[optind]);
00547       nextchar += strlen (nextchar);
00548       optind++;
00549       return '?';
00550     }
00551
00552       if (pfound != NULL)
00553     {
00554       option_index = indfound;
00555       optind++;
00556       if (*nameend)
00557         {
00558           /* Don't test has_arg with >, because some C compilers don't
00559          allow it to be used on enums.  */
00560           if (pfound->has_arg)
00561         optarg = nameend + 1;
00562           else
00563         {
00564           if (opterr)
00565             {
00566               if (argv[optind - 1][1] == '-')
00567             /* --option */
00568             fprintf (stderr,
00569                  "%s: option `--%s' doesn't allow an argument\n",
00570                  argv[0], pfound->name);
00571               else
00572             /* +option or -option */
00573             fprintf (stderr,
00574                  "%s: option `%c%s' doesn't allow an argument\n",
00575                  argv[0], argv[optind - 1][0], pfound->name);
00576             }
00577           nextchar += strlen (nextchar);
00578           return '?';
00579         }
00580         }
00581       else if (pfound->has_arg == 1)
00582         {
00583           if (optind < argc)
00584         optarg = argv[optind++];
00585           else
00586         {
00587           if (opterr)
00588             fprintf (stderr, "%s: option `%s' requires an argument\n",
00589                  argv[0], argv[optind - 1]);
00590           nextchar += strlen (nextchar);
00591           return optstring[0] == ':' ? ':' : '?';
00592         }
00593         }
00594       nextchar += strlen (nextchar);
00595       if (longind != NULL)
00596         *longind = option_index;
00597       if (pfound->flag)
00598         {
00599           *(pfound->flag) = pfound->val;
00600           return 0;
00601         }
00602       return pfound->val;
00603     }
00604
00605       /* Can't find it as a long option.  If this is not getopt_long_only,
00606      or the option starts with '--' or is not a valid short
00607      option, then it's an error.
00608      Otherwise interpret it as a short option.  */
00609       if (!long_only || argv[optind][1] == '-'
00610       || my_index (optstring, *nextchar) == NULL)
00611     {
00612       if (opterr)
00613         {
00614           if (argv[optind][1] == '-')
00615         /* --option */
00616         fprintf (stderr, "%s: unrecognized option `--%s'\n",
00617              argv[0], nextchar);
00618           else
00619         /* +option or -option */
00620         fprintf (stderr, "%s: unrecognized option `%c%s'\n",
00621              argv[0], argv[optind][0], nextchar);
00622         }
00623       nextchar = (char *) "";
00624       optind++;
00625       return '?';
00626     }
00627     }
00628
00629   /* Look at and handle the next short option-character.  */
00630
00631   {
00632     char c = *nextchar++;
00633     char *temp = my_index (optstring, c);
00634
00635     /* Increment `optind' when we start to process its last character.  */
00636     if (*nextchar == '\0')
00637       ++optind;
00638
00639     if (temp == NULL || c == ':')
00640       {
00641     if (opterr)
00642       {
00643         if (posixly_correct)
00644           /* 1003.2 specifies the format of this message.  */
00645           fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
00646         else
00647           fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c);
00648       }
00649     optopt = c;
00650     return '?';
00651       }
00652     if (temp[1] == ':')
00653       {
00654     if (temp[2] == ':')
00655       {
00656         /* This is an option that accepts an argument optionally.  */
00657         if (*nextchar != '\0')
00658           {
00659         optarg = nextchar;
00660         optind++;
00661           }
00662         else
00663           optarg = NULL;
00664         nextchar = NULL;
00665       }
00666     else
00667       {
00668         /* This is an option that requires an argument.  */
00669         if (*nextchar != '\0')
00670           {
00671         optarg = nextchar;
00672         /* If we end this ARGV-element by taking the rest as an arg,
00673            we must advance to the next element now.  */
00674         optind++;
00675           }
00676         else if (optind == argc)
00677           {
00678         if (opterr)
00679           {
00680             /* 1003.2 specifies the format of this message.  */
00681             fprintf (stderr, "%s: option requires an argument -- %c\n",
00682                  argv[0], c);
00683           }
00684         optopt = c;
00685         if (optstring[0] == ':')
00686           c = ':';
00687         else
00688           c = '?';
00689           }
00690         else
00691           /* We already incremented `optind' once;
00692          increment it again when taking next ARGV-elt as argument.  */
00693           optarg = argv[optind++];
00694         nextchar = NULL;
00695       }
00696       }
00697     return c;
00698   }
00699 }

Here is the call graph for this function:

void exchange ( char ** argv ) [static]

Definition at line 245 of file getopt.c.

References first_nonopt, last_nonopt, and optind.

Referenced by _getopt_internal().

00247 {
00248   int bottom = first_nonopt;
00249   int middle = last_nonopt;
00250   int top = optind;
00251   char *tem;
00252
00253   /* Exchange the shorter segment with the far end of the longer segment.
00254      That puts the shorter segment into the right place.
00255      It leaves the longer segment in the right place overall,
00256      but it consists of two parts that need to be swapped next.  */
00257
00258   while (top > middle && middle > bottom)
00259     {
00260       if (top - middle > middle - bottom)
00261     {
00262       /* Bottom segment is the short one.  */
00263       int len = middle - bottom;
00264       register int i;
00265
00266       /* Swap it with the top part of the top segment.  */
00267       for (i = 0; i < len; i++)
00268         {
00269           tem = argv[bottom + i];
00270           argv[bottom + i] = argv[top - (middle - bottom) + i];
00271           argv[top - (middle - bottom) + i] = tem;
00272         }
00273       /* Exclude the moved bottom segment from further swapping.  */
00274       top -= len;
00275     }
00276       else
00277     {
00278       /* Top segment is the short one.  */
00279       int len = top - middle;
00280       register int i;
00281
00282       /* Swap it with the bottom part of the bottom segment.  */
00283       for (i = 0; i < len; i++)
00284         {
00285           tem = argv[bottom + i];
00286           argv[bottom + i] = argv[middle + i];
00287           argv[middle + i] = tem;
00288         }
00289       /* Exclude the moved top segment from further swapping.  */
00290       bottom += len;
00291     }
00292     }
00293
00294   /* Update records for the slots the non-options now occupy.  */
00295
00296   first_nonopt += (optind - last_nonopt);
00297   last_nonopt = optind;
00298 }

int getopt | ( | int | argc,
 |  | char ** | argv,
 |  | char * | optstring
 | ) |

Definition at line 708 of file getopt.c.

References _getopt_internal().

00710 {
00711   return _getopt_internal (argc, argv, optstring,
00712                (const struct option *) 0,
00713                (int *) 0,
00714                0);
00715 }

Here is the call graph for this function:

Variable Documentation

int first_nonopt [static]

Definition at line 227 of file getopt.c.

Referenced by _getopt_initialize(), _getopt_internal(), and exchange().

int last_nonopt [static]

Definition at line 228 of file getopt.c.

Referenced by _getopt_initialize(), _getopt_internal(), and exchange().

char* nextchar [static]

Definition at line 122 of file getopt.c.

Referenced by _getopt_initialize(), and _getopt_internal().

char* optarg = NULL

Definition at line 98 of file getopt.c.

Referenced by _getopt_internal(), MacroTraversal::OnFile(), and UCvsApp::UCvsApp().

int opterr = 1

Definition at line 127 of file getopt.c.

Referenced by _getopt_internal().

int optind = 0

Definition at line 113 of file getopt.c.

Referenced by _getopt_initialize(), _getopt_internal(), exchange(), MacroTraversal::OnFile(), and UCvsApp::UCvsApp().

int optopt = '?'

Definition at line 133 of file getopt.c.

Referenced by _getopt_internal().

enum { ... } ordering [static]

Referenced by _getopt_initialize(), and _getopt_internal().

char* posixly_correct [static]

Definition at line 170 of file getopt.c.

Referenced by _getopt_initialize(), and _getopt_internal().

Generated on Sat Aug 7 22:44:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getopt.h File Reference

common/getopt.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | option

Defines

#define | _GETOPT_H 1
#define | __STDC__ 1
#define | __GNU_LIBRARY__ 1
#define | _LIBC 1
#define | no_argument 0
#define | required_argument 1
#define | optional_argument 2

Functions

int | getopt (int argc, char *const *argv, const char *shortopts)
int | getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind)
int | getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind)
int | _getopt_internal (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only)

Variables

char * | optarg
int optind
int opterr
int optopt

Define Documentation

#define __GNU_LIBRARY__ 1

Definition at line 23 of file getopt.h.

#define __STDC__ 1

Definition at line 22 of file getopt.h.

#define _GETOPT_H 1

Definition at line 15 of file getopt.h.

#define _LIBC 1

Definition at line 24 of file getopt.h.

#define no_argument 0

Definition at line 95 of file getopt.h.

Referenced by MacroTraversal::OnFile().

#define optional_argument 2

Definition at line 97 of file getopt.h.

#define required_argument 1

Definition at line 96 of file getopt.h.

Referenced by MacroTraversal::OnFile(), and UCvsApp::UCvsApp().

Function Documentation

int _getopt_internal | ( | int | argc,
 |  | char *const * | argv,
 |  | const char * | shortopts,
 |  | const struct option * | longopts,
 |  | int * | longind,
 |  | int | long_only
 | ) |

Referenced by getopt(), getopt_long(), and getopt_long_only().

int getopt | ( | int | argc,
 |  | char *const * | argv,
 |  | const char * | shortopts
 | ) |

int getopt_long | ( | int | argc,
 |  | char *const * | argv,
 |  | const char * | shortopts,
 |  | const struct option * | longopts,
 |  | int * | longind
 | ) |

Definition at line 71 of file getopt1.c.

References _getopt_internal().

Referenced by MacroTraversal::OnFile(), and UCvsApp::UCvsApp().

00074 {
00075   return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
00076 }

Here is the call graph for this function:

int getopt_long_only | ( | int | argc,
 |  | char *const * | argv,
 |  | const char * | shortopts,
 |  | const struct option * | longopts,
 |  | int * | longind
 | ) |

Definition at line 93 of file getopt1.c.

References _getopt_internal().

00096 {
00097   return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
00098 }

Here is the call graph for this function:

Variable Documentation

char* optarg

Definition at line 98 of file getopt.c.

Referenced by _getopt_internal(), MacroTraversal::OnFile(), and UCvsApp::UCvsApp().

int opterr

Definition at line 127 of file getopt.c.

Referenced by _getopt_internal().

int optind

Definition at line 113 of file getopt.c.

Referenced by _getopt_initialize(), _getopt_internal(), exchange(), MacroTraversal::OnFile(), and UCvsApp::UCvsApp().

int optopt

Definition at line 133 of file getopt.c.

Referenced by _getopt_internal().

Generated on Sat Aug 7 22:44:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getopt1.c File Reference

common/getopt1.c File Reference

#include "getopt.h"
#include <stdio.h>
#include <stdlib.h>

Include dependency graph for getopt1.c:

Include dependency graph

Go to the source code of this file.

Defines

#define | NULL 0

Functions

int | getopt_long (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index)
int | getopt_long_only (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index)

Define Documentation

#define NULL 0

Definition at line 58 of file getopt1.c.

Referenced by CCJReBar::_AddBar(), _AfxRelease(), _CjxChildWindowFromPoint(), _Compare(), _GetComCtlVersion(), _GetDropDownWidth(), _getopt_initialize(), _getopt_internal(), _LoadSysColorBitmap(), _statcore(), CWincvsApp::ActivateBrowserView(), CSubclassWndMap::Add(), addAccel(), CCJReBar::AddBar(), PyMenuMgr::AddButton(), CCJMenu::AddFromToolBar(), PyMenuMgr::AddPulldown(), CCJToolBar::AddReplaceBitmap(), PyMenuMgr::AddSeparator(), PyMenuMgr::AddToggle(), CCJTabCtrlBar::AddToolTip(), CCJTabView::AddView(), CCJTabCtrlBar::AddView(), CCJMemFile::Append(), CCJMenu::AppendMenuW(), CCJMenu::AppendODMenuW(), CCJListView::AutoSaveColumns(), CCJListCtrl::AutoSaveColumns(), CCJHtmlView::BeforeNavigate2(), BrowserGetMultiFiles(), BrowserGetSaveasFile(), CCJSizeDockBar::CalcDynamicLayout(), CCJReBar::CalcFixedLayout(), CCJDockBar::CalcFixedLayout(), CCJToolBar::CalcLayout(), CCJToolBar::CalcSize(), CCJSizeDockBar::CalcSizeBarLayout(), CCVSAlert_MAIN::CalcWndTextSize(), CCJDockContext::CanDockDockBar(), CGfxOutBarCtrl::CBarFolder::CBarFolder(), CGfxOutBarCtrl::CBarItem::CBarItem(), CCJBrowseButton::CCJBrowseButton(), CCJCaption::CCJCaption(), CCJCaptionPopupWnd::CCJCaptionPopupWnd(), CCJColorPicker::CCJColorPicker(), CCJColorPopup::CCJColorPopup(), CCJControlBar::CCJControlBar(), CCJExplorerBar::CCJExplorerBar(), CCJFlatButton::CCJFlatButton(), CCJFlatHeaderCtrl::CCJFlatHeaderCtrl(), CCJFlatTabCtrl::CCJFlatTabCtrl(), CCJHexEdit::CCJHexEdit(), CCJHtmlView::CCJHtmlView(), CCJHyperLink::CCJHyperLink(), CCJListCtrl::CCJListCtrl(), CCJListView::CCJListView(), CCJMDIChildWnd::CCJMDIChildWnd(), CCJMemFile::CCJMemFile(), CCJMenu::CCJMenu(), CCJMenuData::CCJMenuData(), CCJOutlookBar::CCJOutlookBar(), CCJStatusBarPaneControlInfo::CCJStatusBarPaneControlInfo(), CCJToolBar::CCJToolBar(), CCJTreeCtrl::CCJTreeCtrl(), CCJWindowPlacement::CCJWindowPlacement(), CCvsProcessData::CCvsProcessData(), CGfxOutBarCtrl::CGfxOutBarCtrl(), CheckLocationDriveType(), CItemListDlg::CheckSettings(), CKeywordComboBox::CKeywordComboBox(), CPathBuffer::Clear(), CCJTreeCtrl::ClearSelection(), CloneStr(), CCJMemFile::Close(), CMMenuString::CMMenuString(), CMultiLineEditDialogKeyHelper::CMultiLineEditDialogKeyHelper(), CWinLogData::CollectMergePointPairPass1(), CWinLogData::CollectMergePointPairPass2(), CCJSortClass::Compare(), CompatGetEditorMsg(), CompatGetModuleListItem(), CompatGetPassword(), CompatGetTagListItem(), CompatMoveToTrash(), Win32wstring::convert(), copy_list_types(), CopyScreenToBitmap(), PyMenuMgr::Count(), CPathBuffer::CPathBuffer(), CPython_Interp::CPython_Interp(), CSplashWnd::Create(), CMultilineEntryDlg::Create(), CGfxOutBarCtrl::Create(), CCJToolBarCtrl::Create(), CCJToolBar::Create(), CCJReBarCtrl::Create(), CCJReBar::Create(), CCJPagerCtrl::Create(), CCJMenuBar::Create(), CCJHtmlView::Create(), CCJMonthCalCtrl::Create(), CCJDateTimeCtrl::Create(), CCJComboBoxEx::Create(), CCJColorPopup::Create(), CCJCaptionPopupWnd::Create(), CCJCaption::Create(), CCJBrowseButton::Create(), PyPersistent::Create(), PyCmdUI::Create(), PyMenuMgr::Create(), PyColorConsole::Create(), PyCvsEntry::Create(), CreateDIB(), CCJToolBar::CreateEx(), CreateFolder(), CCJFlatTabCtrl::CreateTabFont(), CCJTabCtrlBar::CreateTabView(), CSubclassWnd::CSubclassWnd(), CTipDlg::CTipDlg(), CustGetByKey(), cvs_err(), cvs_errstr(), cvs_out(), cvs_outstr(), CvsAlert::CvsAlert(), CvsArgs::CvsArgs(), CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdFileAction(), CvsCmdImportModule(), CvsCmdLaunch(), CvsCmdLock(), CvsCmdLog(), CvsCmdMoveToTrash(), CvsCmdRelease(), CvsCmdRemove(), CvsCmdRtag(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), cvsgui_GetCvsEntries(), cvsgui_GetFileModTime(), cvsgui_GetHistoryAsXML(), cvsgui_GetMainMenuWidget(), cvsgui_GetSelection(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), cvsgui_LaunchBrowser(), cvsgui_LaunchTclMacro(), cvsgui_PromptEditMessage(), cvsgui_PromptMessage(), cvsgui_RunCvs(), cvsgui_write(), CvsLogParse(), CWincvsApp::CWincvsApp(), CWndRedrawMngr::CWndRedrawMngr(), DDBtoDIB(), DDV_CheckPathExists(), DDV_CJMinMaxDateTime(), DDV_CJMinMaxMonth(), DDV_MinChars(), DDX_CJColorPicker(), DDX_ComboMString(), DeferClientPos(), PyMenuMgr::Delete(), UCvsFolders::DeleteAllItems(), PyMenuMgr::DeleteByCmd(), CCJMenu::DeleteMenu(), CCJTabCtrlBar::DeleteView(), CHistComboBoxEx::DelKeyTest(), CSmartComboBox::DelKeyTest(), CCJMenu::DestroyMenu(), DIBToBitmap(), CItemListDlg::DisplayItems(), CCJMenu::DitherBlt(), DllMain(), CCJMDIFrameWnd::DockSizeBar(), CCJMDIChildWnd::DockSizeBar(), CCJFrameWnd::DockSizeBar(), CCJDockContext::DockSizeBar(), CImport_MAIN::DoDataExchange(), CBrowseFileView::DoDrag(), CHHelpSupport::DoOnHelpInfo(), CCJFlatButton::DrawButtonBitmap(), CPseudoButton::DrawButtonBitmap(), CCJFlatButton::DrawButtonIcon(), CCJCBarButton::DrawButtonIcon(), CCJFlatButton::DrawButtonText(), CCJCaptionButton::DrawButtonText(), CCJCaption::DrawCaptionIcon(), CCJCaption::DrawCaptionText(), CCJColorPopup::DrawCell(), CCJFlatComboBox::DrawCombo(), CCJControlBar::DrawGriperCaption(), CCJMetaFileButton::DrawItem(), CCJMenu::DrawItem(), CCJFlatHeaderCtrl::DrawItem(), CCJFlatButton::DrawItem(), CCJColorPicker::DrawItem(), CCJToolCmdUI::Enable(), PyCmdUI::Enable(), CCJControlBar::EnableDockingOnSizeBar(), CCJMDIFrameWnd::EnableDockingSizeBar(), CCJMDIChildWnd::EnableDockingSizeBar(), CCJFrameWnd::EnableDockingSizeBar(), CCJDockContext::EndDragDockBar(), ENTNODE::ENTNODE(), EntnodeData::EntnodeData(), EntnodeFile::EntnodeFile(), EntnodePath::EntnodePath(), Entries_Open(), Entries_SetVisited(), CCJHtmlView::ExecWB(), CCJMemFile::Extract(), UCvsConsole::FeedThisLine(), FileTraverse(), UStr::find(), CCJToolBar::FindDropDownButton(), FindExtension(), CCJTreeCtrl::FindItem(), CCJMenu::FindMenuList(), CCJMenu::FindMenuOption(), FindNextChildWindow(), FindNextSiblingWindow(), FindPrevSiblingWindow(), FindPrevWindow(), CCJSizeDockBar::FlatBorder(), CProgressDlg::FlushDisplay(), FormatMillisecondTime(), free_list_types(), garby_alloc(), garby_free(), garbyNew(), garbyRemove(), CCJHtmlView::GetAddressBar(), CCJHtmlView::GetApplication(), CWincvsApp::GetAppModule(), CWincvsApp::GetAppVersion(), GetAsSystemTime(), PyCvsEntry::GetAttr(), PyContainer::GetAttr(), CWincvsApp::GetBrowserView(), CCJHtmlView::GetBusy(), CCJToolBar::GetButtonText(), CCJMonthCalCtrl::GetColor(), EntnodeData::GetConflict(), CWincvsApp::GetConsoleView(), CCJHtmlView::GetContainer(), CCJMonthCalCtrl::GetCurSel(), CCJDockContext::GetDockBar(), CWincvsApp::GetDocument(), CWincvsApp::GetExplorerView(), EntnodeData::GetExtension(), CWincvsApp::GetFileView(), CCJTreeCtrl::GetFirstSelectedItem(), CGfxOutBarCtrl::GetFolderChild(), CCJHtmlView::GetFullName(), CCJHtmlView::GetFullScreen(), CCJHtmlView::GetHeight(), CHHelpSupport::GetHelpFilePath(), CCJHtmlView::GetHtmlDocument(), CGfxOutBarCtrl::GetImageList(), CCJReBarCtrl::GetImageList(), CCJComboBoxEx::GetItem(), CCJTreeCtrl::GetLastItem(), CCJHtmlView::GetLeft(), CCJHtmlView::GetLocationName(), CCJHtmlView::GetLocationURL(), CCJMonthCalCtrl::GetMaxSelCount(), CCJHtmlView::GetMenuBar(), GetMenuEntry(), CCJMenu::GetMenuText(), CCJMonthCalCtrl::GetMinReqRect(), CCJMonthCalCtrl::GetMonthDelta(), GetNextEntriesLine(), CCJTreeCtrl::GetNextItem(), GetNextParentWindow(), CCJTreeCtrl::GetNextSelectedItem(), CTipDlg::GetNextTipString(), CCJHtmlView::GetOffline(), CCJStatusBar::GetPanControl(), CCJHtmlView::GetParentBrowser(), GetPrevFilter(), CCJTreeCtrl::GetPrevItem(), GetPrevParentWindow(), CCJTreeCtrl::GetPrevSelectedItem(), CCJHtmlView::GetProperty(), CCJDateTimeCtrl::GetRange(), CCJHtmlView::GetReadyState(), CCJHtmlView::GetRegisterAsBrowser(), CCJHtmlView::GetRegisterAsDropTarget(), CCJHyperLink::GetRegKey(), EntnodeFile::GetRelativePath(), KiSelectionHandler::GetSelection(), CCJMonthCalCtrl::GetSelRange(), CCJHtmlView::GetSilent(), CWincvsApp::GetStatusBar(), CCJHtmlView::GetStatusBar(), GetSubCMenu(), CCJFlatTabCtrl::GetTabWidth(), CCJHtmlView::GetTheaterMode(), CCJDateTimeCtrl::GetTime(), CCJMonthCalCtrl::GetToday(), CCJHtmlView::GetToolBar(), CCJTabCtrlBar::GetToolTip(), CCJHtmlView::GetTop(), CCJHtmlView::GetTopLevelContainer(), GetTopPopupMenu(), CGraphDoc::GetTreeView(), CCJHtmlView::GetType(), PyPersistent::GetValue(), CCJTabView::GetView(), CCJTabCtrlBar::GetView(), CCJTabCtrlBar::GetViewName(), CCJHtmlView::GetVisible(), CCVSAlert_MAIN::GetWndTextExtent(), glue_getenv(), CCJHtmlView::GoBack(), CCJHtmlView::GoForward(), CCJHtmlView::GoHome(), CCJHtmlView::GoSearch(), CCJHyperLink::GotoURL(), CCJFlatSplitterWnd::HideColumn(), CCJFlatSplitterWnd::HideRow(), CGfxOutBarCtrl::HighlightFolder(), CGfxOutBarCtrl::HighlightItem(), CCJSizeDockBar::HitTest(), CCJControlBar::HitTest(), CCJListView::HitTestEx(), CCJListCtrl::HitTestEx(), CSubclassWnd::HookWindow(), CWincvsApp::IdleCvsProgress(), CCJMemFile::Import(), CImport_OPTIONS::ImportFilter(), CRevisionConsole::Init(), CHHelpSupport::InitHTMLHelp(), CCJColorPopup::Initialise(), initialize_all(), CCJFontCombo::InitializeFonts(), InitializeInterp(), CCJMDIFrameWnd::InitializeMenu(), CWincvsApp::InitInstance(), CPython_Interp::InitPythonSupport(), CCJMemFile::Insert(), CCJToolBar::InsertControl(), CCJComboBoxEx::InsertItem(), CCJMenu::InsertMenuW(), CCJMenu::InsertODMenuW(), CSubclassWnd::IsHooked(), CCJSizeDockBar::IsLastControlBar(), KoFilterModel::IsMatch(), IsShellType(), IsValidHandle(), KiSelectionHandler::KiSelectionHandler(), KoFileViewTraversalContext::KoFileViewTraversalContext(), KoFilterModel::KoFilterModel(), KoTraversalContext::KoTraversalContext(), launchCVS(), LaunchCvsRootCommand(), LaunchDefaultEditor(), LaunchDiff(), LaunchEditor(), LaunchHandler(), LaunchItemListCommand(), LaunchViewer(), LayoutRowCol(), listAddCell(), listFree(), listNew(), CCJMemFile::Load(), CPersistent::LoadAll(), CCJToolBar::LoadBitmap(), CCJMenu::LoadCheckmarkBitmap(), LoadDIB(), CMainFrame::LoadDockState(), CCJHtmlView::LoadFromResource(), CCJMenuBar::LoadMenu(), CCJMenu::LoadMenu(), CCJMenu::LoadSysColorBitmap(), CCJToolBar::LoadToolBar(), CCJMenu::LoadToolbar(), CCJWindowPlacement::LoadWindowPos(), CSubclassWndMap::Lookup(), MakeOleVariant(), CCJSizeDockBar::Maximize(), CCJMenu::MeasureItem(), CCJMenu::ModifyODMenuW(), CCJHexEdit::Move(), mystrdup(), myTcl_CreateInterp(), CCJHtmlView::Navigate(), CCJHtmlView::Navigate2(), CCJMDIFrameWnd::NewMenu(), CHistComboBoxEx::NewRoot(), NotificationManager::Node::Node(), CCJSizeDockBar::Normalize(), NormalizeFn(), CWincvsApp::OnAppCredits(), CCJToolBar::OnBarStyleChange(), CMainFrame::OnBroadcastCmdMsg(), CGetPrefs_CVS::OnBtnhome(), CImport_OPTIONS::OnBtnpath(), CCheckout_MAIN::OnBtnPath(), CGetPrefs_WINCVS::OnBtnsettings(), CDiff_MAIN::OnCheck1(), CDiff_MAIN::OnCheck2(), CCJBrowseButton::OnClicked(), CMainFrame::OnClose(), CCJMDIFrameWnd::OnClose(), CCJFrameWnd::OnClose(), CCJHexEdit::OnContextMenu(), CSplashWnd::OnCreate(), CBarConsole::OnCreate(), CCJFlatTabCtrl::OnCreate(), CCJExplorerBar::OnCreate(), CCJControlBar::OnCreate(), CBrowseFileView::OnDestroy(), CDynToolBar::OnDestroy(), CGfxSplitterWnd::OnDrawSplitter(), CCJFlatSplitterWnd::OnDrawSplitter(), CWincvsView::OnDropFiles(), CMainFrame::OnDropFiles(), CCJHexEdit::OnEditPaste(), CMfFileDialog::OnFileNameChange(), CWincvsApp::OnFileNew(), CCJHtmlView::OnFilePrint(), CCJReBar::OnHeightChange(), CWincvsApp::OnHelpCvs(), CImport_OPTIONS::OnImportfilter(), CTipDlg::OnInitDialog(), CCustomizeMenus::OnInitDialog(), CTemplateDlg::OnInitDialog(), CItemListDlg::OnInitDialog(), CEditorMonDlg::OnInitDialog(), CCVSAlert_MAIN::OnInitDialog(), CGraphView::OnInitMenuPopup(), UWidget::OnInitWidget(), CGfxSplitterWnd::OnInvertTracker(), CCJSizeDockBar::OnInvertTracker(), CCJControlBar::OnInvertTracker(), CAnnotate_MAIN::OnIsdate(), CCvsRootDlg::OnItemchangedKeywordlist(), CGraphView::OnKeyDown(), CCJHexEdit::OnKeyDown(), CCJMetaFileButton::OnLButtonDblClk(), CCJFlatButton::OnLButtonDblClk(), CGfxOutBarCtrl::OnLButtonDown(), CCJTreeCtrl::OnLButtonDown(), CCJControlBar::OnLButtonDown(), CCJSizeDockBar::OnLButtonUp(), CWincvsApp::OnLogWindowIsPresent(), CCJMenuBar::OnMenuSelect(), CGfxOutBarCtrl::OnMouseMove(), CCJOutlookBar::OnMouseMove(), CCJHexEdit::OnMouseMove(), CCJFlatComboBox::OnMouseMove(), CCJFlatButton::OnMouseMove(), CCJControlBar::OnMouseMove(), CCJToolBar::OnNcCreate(), CCJReBar::OnNcCreate(), CCJMiniDockFrameWnd::OnNcLButtonDblClk(), CCJMiniDockFrameWnd::OnNcLButtonDown(), CTemplateDlg::OnOK(), CCJFlatTabCtrl::OnPaint(), UCvsFrame::OnQuit(), CGfxOutBarCtrl::OnRButtonDown(), CCJTabCtrl::OnRButtonDown(), CCJFlatHeaderCtrl::OnRButtonDown(), CCJControlBar::OnRButtonDown(), CCJReBar::OnRecalcParent(), CBrowseFileView::OnResetView(), CCmdLine_MAIN::OnSelfolder(), CCJReBar::OnShowBand(), CCJHtmlView::OnSize(), CCJHtmlView::OnStatusTextChange(), CCJToolBar::OnSysColorChange(), CMainFrame::OnTimer(), CCJFlatButton::OnTimer(), CCJToolBar::OnToolHitTest(), CCJReBar::OnToolHitTest(), CCJToolBar::OnUpdateCmdUI(), CCJControlBar::OnUpdateCmdUI(), CWinCvsBrowser::OnUpdateQueryProperties(), CBrowseFileView::OnUpdateViewExplore(), CGraphView::OnViewDiff(), CExploreBar::OnWindowPosChanged(), CCJTabView::OnWindowPosChanged(), CCJTabCtrlBar::OnWindowPosChanged(), CBrowserBar::OnWindowPosChanged(), CCJMemFile::Open(), ENTNODE::operator=(), EntnodeFile::operator[](), EntnodeData::operator[](), UCvsConsole::OutColor(), CCJTabCtrlBar::OverkillAssert(), PathNameFromDirID(), PathNameFromWD(), CWincvsApp::PeekPumpAndIdle(), poolAlloc(), poolFree(), poolRemove(), CCJHyperLink::PositionWindow(), CItemListDlg::PostClickRefresh(), CProgressDlg::PostNcDestroy(), CCJMDIFrameWnd::PreCreateWindow(), CCJFrameWnd::PreCreateWindow(), CCJFlatTabCtrl::PreCreateWindow(), CSplashWnd::PreTranslateAppMessage(), PyColorConsole::Print(), CvsArgs::print(), UCvsFolders::ProcessSelectionCommand(), CCJHtmlView::PutProperty(), PyAutoObject< T >::PyAutoObject(), CWincvsView::QueryAcceptData(), CCJHtmlView::QueryStatusWB(), ReadDIBFile(), ReadDIBRsrc(), ReadIgnoredFile(), UToolbar::RebuildBar(), CCJSizeDockBar::RecalcAllExcept(), CCJMDIFrameWnd::RecalcAllExcept(), CCJMDIChildWnd::RecalcAllExcept(), CCJFrameWnd::RecalcAllExcept(), CGfxSplitterWnd::RecalcLayout(), CCJMDIFrameWnd::RecalcLayout(), CCJMDIChildWnd::RecalcLayout(), CCJFrameWnd::RecalcLayout(), CCJMenuBar::RecomputeMenuLayout(), CCJHtmlView::Refresh(), CCJHtmlView::Refresh2(), PyContainer::RegisterValue(), CSubclassWndMap::RemoveAll(), CCJTabCtrlBar::RemoveAllTabs(), CCJTabCtrlBar::RemoveListItem(), CCJMenu::RemoveMenu(), CCJStatusBar::RemovePane(), CvsArgs::reset(), CBrowseFileView::ResetView(), UCvsFiles::ResetView(), CCVSAlert_MAIN::Resize(), CCJFlatHeaderCtrl::ResizeWindow(), UStr::rfind(), CCJMemFile::Save(), CPersistent::SaveAll(), CWincvsApp::SaveAllModified(), SaveBmpFromDDB(), SaveDIB(), CCJTabView::SetActiveView(), CCJTabCtrlBar::SetActiveView(), CCJHtmlView::SetAddressBar(), CGfxOutBarCtrl::SetAnimSelHighlight(), CCJToolBar::SetBitmap(), CCJToolBar::SetButtons(), CCJToolBar::SetButtonText(), CCJToolCmdUI::SetCheck(), PyCmdUI::SetCheck(), CCJCaption::SetChildWindow(), CCJMonthCalCtrl::SetColor(), CCJMonthCalCtrl::SetCurSel(), CCVSAlert_MAIN::SetDefaultButton(), CCJHyperLink::SetDefaultCursor(), SetEncoding(), CCJMonthCalCtrl::SetFirstDayOfWeek(), CGfxOutBarCtrl::SetFolderImageList(), CGfxOutBarCtrl::SetFolderText(), CCJHtmlView::SetFullScreen(), CCJHtmlView::SetHeight(), CCJToolBar::SetHeight(), CCVSAlert_MAIN::SetIcon(), CGfxOutBarCtrl::SetImageList(), CCJComboBoxEx::SetItem(), CGfxOutBarCtrl::SetItemText(), CCJHtmlView::SetLeft(), CCJHyperLink::SetLinkCursor(), KoFilterModel::SetMask(), KoFilterMask::SetMask(), CCJMonthCalCtrl::SetMaxSelCount(), CCJHtmlView::SetMenuBar(), CCJMonthCalCtrl::SetMonthDelta(), CWinCvsBrowser::SetNewStyle(), CCJHtmlView::SetOffline(), CCJToolBar::SetOwner(), CCJMonthCalCtrl::SetRange(), CCJDateTimeCtrl::SetRange(), CCJHtmlView::SetRegisterAsBrowser(), CCJHtmlView::SetRegisterAsDropTarget(), CCJMonthCalCtrl::SetSelRange(), CCJHtmlView::SetSilent(), CCJFlatHeaderCtrl::SetSortImage(), CCJHtmlView::SetStatusBar(), PyCmdUI::SetText(), CCJHtmlView::SetTheaterMode(), CCJDateTimeCtrl::SetTime(), CCJMonthCalCtrl::SetToday(), CCJHtmlView::SetToolBar(), CCJHtmlView::SetTop(), PyPersistent::SetValue(), CCJTabCtrlBar::SetViewToolTip(), CCJHtmlView::SetVisible(), CCJMenuData::SetWideString(), ShellAction(), shl_calloc(), shl_free(), shl_malloc(), shl_realloc(), CvsAlert::ShowAlert(), CCJFlatSplitterWnd::ShowColumn(), CCJFlatSplitterWnd::ShowRow(), CSplashWnd::ShowSplashScreen(), CWincvsApp::ShowTipAtStartup(), CCJMonthCalCtrl::SizeMinReq(), CCJTabCtrlBar::SizeTabView(), CCJToolBar::SizeToolBar(), split(), stat(), CCJHtmlView::Stop(), CCJMenu::SynchronizeMenu(), Tag_Open(), TestBuffer(), testCVS(), CCJDockContext::ToggleDocking(), CCJDockContext::TrackDockBar(), CCJMenuBar::TrackPopup(), UAppConsole(), PyAutoObject< T >::UnRef(), EntnodeData::UnRef(), EntnodePath::UnRef(), CWinLogData::UnselectAll(), CWincvsApp::UpdateAllDocsView(), CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogRevData::UpdateSelf(), CWinLogHeaderData::UpdateSelf(), UpdateUIMenu(), USmartCombo::USmartCombo(), UWinPseudoWindowProc(), VRef2VolName(), wnt_fstat(), wnt_lstat(), CCJToolBar::WrapToolBar(), CCJHtmlView::~CCJHtmlView(), CCJMemFile::~CCJMemFile(), CCJMenuBarFrameHook::~CCJMenuBarFrameHook(), CSplashWnd::~CSplashWnd(), CSubclassWnd::~CSubclassWnd(), CTipDlg::~CTipDlg(), and ENTNODE::~ENTNODE().

Function Documentation

int getopt_long | ( | int | argc,
 |  | char *const * | argv,
 |  | const char * | options,
 |  | const struct option * | long_options,
 |  | int * | opt_index
 | ) |

Definition at line 71 of file getopt1.c.

References _getopt_internal().

Referenced by MacroTraversal::OnFile(), and UCvsApp::UCvsApp().

00074 {
00075   return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
00076 }

Here is the call graph for this function:

int getopt_long_only | ( | int | argc,
 |  | char *const * | argv,
 |  | const char * | options,
 |  | const struct option * | long_options,
 |  | int * | opt_index
 | ) |

Definition at line 93 of file getopt1.c.

References _getopt_internal().

00096 {
00097   return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
00098 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GetPassword.cpp File Reference

common/GetPassword.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "GetPassword.h"
#include "CvsCommands.h"

Include dependency graph for GetPassword.cpp:

Include dependency graph

Go to the source code of this file.

Functions

char * CompatGetPassword (const char *prompt)
Prompt for a password.

Function Documentation

char* CompatGetPassword ( const char * prompt )

Prompt for a password.

Definition at line 173 of file GetPassword.cpp.

References UStr::c_str(), EV_INIT_WIDGET, GetEnvValue(), kUMainWidget, UStr::length(), GetPassword::m_passwd, NULL, UCreate_PasswdDlg(), and UEventSendMessage().

Referenced by glue_getenv().

00174 {
00175 #ifdef WIN32
00176     static char passwd[255];
00177     GetPassword gp;
00178
00179     if( gp.DoModal() == IDOK )
00180     {
00181         strcpy(passwd, gp.m_passwd);
00182         return passwd;
00183     }
00184
00185     return "";
00186 #endif /* WIN32 */
00187 //{ Mac-Part
00188 #ifdef qMacCvsPP
00189     if(!CMacCvsApp::gApp->IsFrontProcess() && CMacCvsApp::gApp->NotifyUser(0L))
00190     {
00191         while(!CMacCvsApp::gApp->IsFrontProcess())
00192         {
00193             CMacCvsApp::gApp->SpendSomeTime();
00194         }
00195     }
00196
00197     static UStr thepasswd;
00198     KCItemRef theItem               = NULL;
00199
00200     LStr255 pstr;
00201     UStr realPrompt;
00202 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00203     LStr255 phost, puser;
00204     bool doUseKeyChain = false;
00205     OSStatus theStatus;
00206     UStr loopKey;
00207 #endif
00208
00209     if(GetEnvValue(prompt, "prompt", realPrompt))
00210     {
00211         pstr = realPrompt;
00212
00213 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00214         // copied from MacCvsPro::CMacCVSDoc.cpp
00215         UStr host, user, authen;
00216         if(CMacCvsApp::CanUseKeychain() &&
00217             GetEnvValue(prompt, "host", host) &&
00218             GetEnvValue(prompt, "user", user))
00219         {
00220             doUseKeyChain = true;
00221
00222             OSStatus theStatus;
00223             UInt32 theLength;
00224
00225             phost = host;
00226             puser = user;
00227
00228             UStr authen;
00229             if(GetEnvValue(prompt, "authen", authen))
00230             {
00231                 phost += ":";
00232                 phost += authen;
00233             }
00234
00235             UStr dir;
00236             if(GetEnvValue(prompt, "dir", dir))
00237             {
00238                 phost += ":";
00239                 phost += dir;
00240             }
00241
00242             static char ppass[255];
00243
00244             theStatus = KCFindGenericPassword(phost, puser, sizeof(ppass) - 1,
00245                 ppass, &theLength, &theItem);
00246
00247             user = puser;
00248             host = phost;
00249             loopKey = user;
00250             loopKey << '@';
00251             loopKey << host;
00252             // we could have an endless loop is the password is not valid
00253             if (theStatus == noErr && CMacCvsApp::gApp->CheckLoopingPassword(loopKey))
00254             {
00255                 if (theItem != NULL)
00256                     KCReleaseItem(&theItem);
00257
00258                 ppass[theLength] = '\0';
00259
00260                 return ppass;
00261             }
00262         }
00263 #endif
00264     }
00265     else
00266         pstr = prompt;
00267
00268     StDialogHandler theHandler(dlg_Passwd, LCommander::GetTopCommander());
00269     LWindow *theDialog = theHandler.GetDialog();
00270     ThrowIfNil_(theDialog);
00271
00272     LEditText *passwd = dynamic_cast<LEditText*>
00273         (theDialog->FindPaneByID(item_GetPasswd));
00274     LStaticText *promptbox = dynamic_cast<LStaticText*>
00275         (theDialog->FindPaneByID('PROM'));
00276     theDialog->SetLatentSub(passwd);
00277
00278     promptbox->SetText(pstr);
00279
00280     theDialog->Show();
00281     MessageT hitMessage;
00282     while (true)
00283     {       // Let DialogHandler process events
00284         hitMessage = theHandler.DoDialog();
00285
00286         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00287             break;
00288     }
00289     theDialog->Hide();
00290
00291     if(hitMessage == msg_OK)
00292     {
00293         passwd->GetText(pstr);
00294
00295 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00296         if (doUseKeyChain && CMacCvsApp::CanUseKeychain())
00297         {
00298             if (theItem != NULL)
00299             {
00300                 theStatus = KCSetData(theItem, pstr[0], &pstr[1]);
00301
00302                 if (theStatus == noErr)
00303                     theStatus = KCUpdateItem(theItem);
00304             }
00305             else
00306             {
00307                 theStatus = KCAddGenericPassword(phost, puser,
00308                     pstr[0], &pstr[1], &theItem);
00309
00310                 KCAttribute theAttribute;
00311
00312                 if (theStatus == noErr)
00313                 {
00314                     UStr theDescriptionText("MacCVS password");
00315                     theAttribute.tag = kDescriptionKCItemAttr;
00316                     theAttribute.length = theDescriptionText.length();
00317                     theAttribute.data = (void *)(const char *)theDescriptionText;
00318                     theStatus = KCSetAttribute(theItem, &theAttribute);
00319                 }
00320
00321                 OSType theTypeCreator;
00322
00323                 if (theStatus == noErr)
00324                 {
00325                     theTypeCreator = 'mCVS';
00326                     theAttribute.tag = kCreatorKCItemAttr;
00327                     theAttribute.length = sizeof(theTypeCreator);
00328                     theAttribute.data = &theTypeCreator;
00329                     theStatus = KCSetAttribute(theItem, &theAttribute);
00330                 }
00331
00332                 if (theStatus == noErr)
00333                 {
00334                     theTypeCreator = 'APPL';
00335                     theAttribute.tag = kTypeKCItemAttr;
00336                     theStatus = KCSetAttribute(theItem, &theAttribute);
00337                 }
00338
00339                 if (theStatus == noErr)
00340                 {
00341                     Boolean theCustomIcon = true;
00342                     theAttribute.tag = kCustomIconKCItemAttr;
00343                     theAttribute.length = sizeof(theCustomIcon);
00344                     theAttribute.data = &theCustomIcon;
00345                     theStatus = KCSetAttribute(theItem, &theAttribute);
00346                 }
00347
00348                 if (theStatus == noErr)
00349                     theStatus = KCUpdateItem(theItem);
00350             }
00351
00352             if (theItem != NULL)
00353                 KCReleaseItem(&theItem);
00354
00355             CMacCvsApp::gApp->PushValidPassword(loopKey);
00356         }
00357 #endif
00358
00359         thepasswd = pstr;
00360         return thepasswd.length() == 0 ? (char *)"" : (char *)thepasswd.c_str();
00361     }
00362
00363 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00364     if (theItem != NULL)
00365         KCReleaseItem(&theItem);
00366 #endif
00367
00368     return "";
00369 #endif /* qMacCvsPP */
00370 //}
00371 #if qUnix
00372     static char passwd[255];
00373     void *wid = UCreate_PasswdDlg();
00374
00375     UCvsGetPasswd *dlg = new UCvsGetPasswd();
00376     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00377
00378     if(dlg->DoModal())
00379     {
00380         strcpy(passwd, dlg->m_passwd);
00381     }
00382     else
00383         strcpy(passwd, "");
00384
00385     delete dlg;
00386     return passwd;
00387 #endif // qUnix
00388 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GetPassword.h File Reference

common/GetPassword.h File Reference

#include "HHelpSupport.h"

Include dependency graph for GetPassword.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | GetPassword

Defines

#define | AFX_GETPASSWORD_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_

Functions

char * | CompatGetPassword (const char *prompt)
Prompt for a password.

Define Documentation

#define AFX_GETPASSWORD_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_

Definition at line 22 of file GetPassword.h.

Function Documentation

char* CompatGetPassword ( const char * prompt )

Prompt for a password.

Definition at line 173 of file GetPassword.cpp.

References UStr::c_str(), EV_INIT_WIDGET, GetEnvValue(), kUMainWidget, UStr::length(), GetPassword::m_passwd, NULL, UCreate_PasswdDlg(), and UEventSendMessage().

Referenced by glue_getenv().

00174 {
00175 #ifdef WIN32
00176     static char passwd[255];
00177     GetPassword gp;
00178
00179     if( gp.DoModal() == IDOK )
00180     {
00181         strcpy(passwd, gp.m_passwd);
00182         return passwd;
00183     }
00184
00185     return "";
00186 #endif /* WIN32 */
00187 //{ Mac-Part
00188 #ifdef qMacCvsPP
00189     if(!CMacCvsApp::gApp->IsFrontProcess() && CMacCvsApp::gApp->NotifyUser(0L))
00190     {
00191         while(!CMacCvsApp::gApp->IsFrontProcess())
00192         {
00193             CMacCvsApp::gApp->SpendSomeTime();
00194         }
00195     }
00196
00197     static UStr thepasswd;
00198     KCItemRef theItem               = NULL;
00199
00200     LStr255 pstr;
00201     UStr realPrompt;
00202 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00203     LStr255 phost, puser;
00204     bool doUseKeyChain = false;
00205     OSStatus theStatus;
00206     UStr loopKey;
00207 #endif
00208
00209     if(GetEnvValue(prompt, "prompt", realPrompt))
00210     {
00211         pstr = realPrompt;
00212
00213 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00214         // copied from MacCvsPro::CMacCVSDoc.cpp
00215         UStr host, user, authen;
00216         if(CMacCvsApp::CanUseKeychain() &&
00217             GetEnvValue(prompt, "host", host) &&
00218             GetEnvValue(prompt, "user", user))
00219         {
00220             doUseKeyChain = true;
00221
00222             OSStatus theStatus;
00223             UInt32 theLength;
00224
00225             phost = host;
00226             puser = user;
00227
00228             UStr authen;
00229             if(GetEnvValue(prompt, "authen", authen))
00230             {
00231                 phost += ":";
00232                 phost += authen;
00233             }
00234
00235             UStr dir;
00236             if(GetEnvValue(prompt, "dir", dir))
00237             {
00238                 phost += ":";
00239                 phost += dir;
00240             }
00241
00242             static char ppass[255];
00243
00244             theStatus = KCFindGenericPassword(phost, puser, sizeof(ppass) - 1,
00245                 ppass, &theLength, &theItem);
00246
00247             user = puser;
00248             host = phost;
00249             loopKey = user;
00250             loopKey << '@';
00251             loopKey << host;
00252             // we could have an endless loop is the password is not valid
00253             if (theStatus == noErr && CMacCvsApp::gApp->CheckLoopingPassword(loopKey))
00254             {
00255                 if (theItem != NULL)
00256                     KCReleaseItem(&theItem);
00257
00258                 ppass[theLength] = '\0';
00259
00260                 return ppass;
00261             }
00262         }
00263 #endif
00264     }
00265     else
00266         pstr = prompt;
00267
00268     StDialogHandler theHandler(dlg_Passwd, LCommander::GetTopCommander());
00269     LWindow *theDialog = theHandler.GetDialog();
00270     ThrowIfNil_(theDialog);
00271
00272     LEditText *passwd = dynamic_cast<LEditText*>
00273         (theDialog->FindPaneByID(item_GetPasswd));
00274     LStaticText *promptbox = dynamic_cast<LStaticText*>
00275         (theDialog->FindPaneByID('PROM'));
00276     theDialog->SetLatentSub(passwd);
00277
00278     promptbox->SetText(pstr);
00279
00280     theDialog->Show();
00281     MessageT hitMessage;
00282     while (true)
00283     {       // Let DialogHandler process events
00284         hitMessage = theHandler.DoDialog();
00285
00286         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00287             break;
00288     }
00289     theDialog->Hide();
00290
00291     if(hitMessage == msg_OK)
00292     {
00293         passwd->GetText(pstr);
00294
00295 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00296         if (doUseKeyChain && CMacCvsApp::CanUseKeychain())
00297         {
00298             if (theItem != NULL)
00299             {
00300                 theStatus = KCSetData(theItem, pstr[0], &pstr[1]);
00301
00302                 if (theStatus == noErr)
00303                     theStatus = KCUpdateItem(theItem);
00304             }
00305             else
00306             {
00307                 theStatus = KCAddGenericPassword(phost, puser,
00308                     pstr[0], &pstr[1], &theItem);
00309
00310                 KCAttribute theAttribute;
00311
00312                 if (theStatus == noErr)
00313                 {
00314                     UStr theDescriptionText("MacCVS password");
00315                     theAttribute.tag = kDescriptionKCItemAttr;
00316                     theAttribute.length = theDescriptionText.length();
00317                     theAttribute.data = (void *)(const char *)theDescriptionText;
00318                     theStatus = KCSetAttribute(theItem, &theAttribute);
00319                 }
00320
00321                 OSType theTypeCreator;
00322
00323                 if (theStatus == noErr)
00324                 {
00325                     theTypeCreator = 'mCVS';
00326                     theAttribute.tag = kCreatorKCItemAttr;
00327                     theAttribute.length = sizeof(theTypeCreator);
00328                     theAttribute.data = &theTypeCreator;
00329                     theStatus = KCSetAttribute(theItem, &theAttribute);
00330                 }
00331
00332                 if (theStatus == noErr)
00333                 {
00334                     theTypeCreator = 'APPL';
00335                     theAttribute.tag = kTypeKCItemAttr;
00336                     theStatus = KCSetAttribute(theItem, &theAttribute);
00337                 }
00338
00339                 if (theStatus == noErr)
00340                 {
00341                     Boolean theCustomIcon = true;
00342                     theAttribute.tag = kCustomIconKCItemAttr;
00343                     theAttribute.length = sizeof(theCustomIcon);
00344                     theAttribute.data = &theCustomIcon;
00345                     theStatus = KCSetAttribute(theItem, &theAttribute);
00346                 }
00347
00348                 if (theStatus == noErr)
00349                     theStatus = KCUpdateItem(theItem);
00350             }
00351
00352             if (theItem != NULL)
00353                 KCReleaseItem(&theItem);
00354
00355             CMacCvsApp::gApp->PushValidPassword(loopKey);
00356         }
00357 #endif
00358
00359         thepasswd = pstr;
00360         return thepasswd.length() == 0 ? (char *)"" : (char *)thepasswd.c_str();
00361     }
00362
00363 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00364     if (theItem != NULL)
00365         KCReleaseItem(&theItem);
00366 #endif
00367
00368     return "";
00369 #endif /* qMacCvsPP */
00370 //}
00371 #if qUnix
00372     static char passwd[255];
00373     void *wid = UCreate_PasswdDlg();
00374
00375     UCvsGetPasswd *dlg = new UCvsGetPasswd();
00376     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00377
00378     if(dlg->DoModal())
00379     {
00380         strcpy(passwd, dlg->m_passwd);
00381     }
00382     else
00383         strcpy(passwd, "");
00384
00385     delete dlg;
00386     return passwd;
00387 #endif // qUnix
00388 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GetPrefs.cpp File Reference

common/GetPrefs.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "umain.h"
#include <afxdao.h>
#include "wincvs_winutil.h"
#include "BrowseFileView.h"
#include "GetPrefs.h"
#include "CvsPrefs.h"
#include "Authen.h"
#include "AppConsole.h"
#include "AppGlue.h"
#include "PromptFiles.h"
#include "MultiFiles.h"
#include "CvsArgs.h"
#include "FileTraversal.h"
#include "CvsCommands.h"
#include "CvsAlert.h"

Include dependency graph for GetPrefs.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool | BrowseForFile (const char *prompt, const kFilesSelectionType selectionType, UStr &fullpath)
void | CompatGetPrefs (void)
Get the CVSROOT, authentication, and misc options.

Variables

CMString | gPrevAltCvs (20,"P_PrevAltCvs")

Function Documentation

bool BrowseForFile | ( | const char * | prompt,
 |  | const kFilesSelectionType | selectionType,
 |  | UStr & | fullpath
 | ) |

Browse for file

Parameters:
prompt | Caption for the dialog
selectionType | Selection type
fullpath | The initial selection path, return the selected path
Returns:
true if selection was made, false otherwise
Definition at line 74 of file GetPrefs.cpp.

References CvsArgs::Argv(), MultiFiles::begin(), BrowserGetMultiFiles(), CStr, MultiFiles::newdir(), MultiFiles::newfile(), and SplitPath().

Referenced by CGetPrefs_CVS::OnAltcvssel(), CGetPrefs_WINCVS::OnBtnviewer(), CGetPrefs_WINCVS::OnExtdiffsel(), CGetPrefs_WINCVS::OnPythondllsel(), and CGetPrefs_WINCVS::OnTcldllsel().

00075 {
00076     bool res = false;
00077
00078     MultiFiles mf;
00079
00080     if( !fullpath.empty() )
00081     {
00082         if( fullpath.endsWith(kPathDelimiter) )
00083         {
00084             mf.newdir(fullpath);
00085         }
00086         else
00087         {
00088             CStr uppath;
00089             CStr file;
00090
00091             if( SplitPath(fullpath.c_str(), uppath, file) )
00092             {
00093                 mf.newdir(uppath);
00094                 mf.newfile(file);
00095             }
00096         }
00097     }
00098
00099     if( BrowserGetMultiFiles(prompt, mf, true, selectionType) )
00100     {
00101         CvsArgs args(false);
00102
00103         const char* dir = (*mf.begin()).add(args);
00104         char* const* argv = args.Argv();
00105
00106         fullpath = dir;
00107
00108         if( !fullpath.endsWith(kPathDelimiter) )
00109             fullpath << kPathDelimiter;
00110
00111         fullpath << argv[0];
00112
00113         res = true;
00114     }
00115
00116     return res;
00117 }

Here is the call graph for this function:

void CompatGetPrefs ( void )

Get the CVSROOT, authentication, and misc options.

Definition at line 1606 of file GetPrefs.cpp.

References cvs_err(), cvs_out(), EV_INIT_WIDGET, gCvsPrefs, kUMainWidget, MacBinMaps::LoadDefaults(), CvsPrefs::save(), MacBinMaps::SaveDefaults(), CMacBinTable::SetCurrentMap(), CGetPrefs_GLOBALS::StoreValues(), CGetPrefs_CVS::StoreValues(), CGetPrefs_WINCVS::StoreValues(), CGetPrefs_CVSCMD_DIALOGS::StoreValues(), UCreate_gcvs_Settings(), and UEventSendMessage().

Referenced by CWincvsDoc::OnAppPreferences(), and UCvsApp::SayWelcome().

01607 {
01608     bool userHitOK = false;
01609
01610     // Store current CVSROOT
01611 #if INTERNAL_AUTHEN
01612     const UStr prevCvsroot((const char*)gCvsPrefs);
01613     const AuthenKind prevKind = gAuthen.kind();
01614 #endif /* INTERNAL_AUTHEN */
01615
01616 #ifdef WIN32   //{ WIN32
01617     CHHelpPropertySheet pages("WinCvs Preferences");
01618     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01619
01620     CGetPrefs_GLOBALS page1;
01621     CGetPrefs_CVS page2;
01622     CGetPrefs_WINCVS page3;
01623     CGetPrefs_CVSCMD_DIALOGS page4;
01624
01625     pages.AddPage(&page1);
01626     pages.AddPage(&page2);
01627     pages.AddPage(&page3);
01628     pages.AddPage(&page4);
01629
01630     if( pages.DoModal() == IDOK )
01631     {
01632         page1.StoreValues();
01633         page2.StoreValues();
01634         page3.StoreValues();
01635         page4.StoreValues();
01636
01637         userHitOK = true;
01638     }
01639 #endif //} WIN32
01640
01641 #ifdef qMacCvsPP  //{ qMacCvsPP
01642     MacBinMaps maps;
01643     maps.LoadDefaults();
01644     CMacBinTable::SetCurrentMap(&maps);
01645
01646     StDialogHandler theHandler(dlg_Prefs, LCommander::GetTopCommander());
01647     LWindow *theDialog = theHandler.GetDialog();
01648     ThrowIfNil_(theDialog);
01649     static UInt16 sRuntimePanel = 1;
01650
01651     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01652         (theDialog->FindPaneByID(item_MultiViewPrefs));
01653     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01654
01655     UCvsPrefs_CVSROOT *handler = new UCvsPrefs_CVSROOT;
01656     ThrowIfNil_(handler);
01657
01658     UEventSendMessage(handler->GetWidID(), EV_INIT_WIDGET, 0, theDialog);
01659
01660     multiView->SwitchToPanel(5);
01661     DoDataExchange_Fonts(theDialog, true);
01662     multiView->SwitchToPanel(4);
01663     DoDataExchange_BinFiles(theDialog, maps, true);
01664     multiView->SwitchToPanel(3);
01665     DoDataExchange_TextFiles(theDialog, true);
01666     LPushButton *diffbtn = dynamic_cast<LPushButton*>(theDialog->FindPaneByID(item_BrowseExtDiff));
01667     diffbtn->AddListener(&theHandler);
01668     multiView->SwitchToPanel(2);
01669     DoDataExchange_Globals(theDialog, true);
01670     multiView->SwitchToPanel(1);
01671     DoDataExchange_Cvsroot(handler, true);
01672
01673     groupView->SetValue(sRuntimePanel);
01674     theDialog->Show();
01675     MessageT hitMessage;
01676     SInt32    lastDiffToolValue(0);
01677     while (true)
01678     {       // Let DialogHandler process events
01679         hitMessage = theHandler.DoDialog();
01680
01681         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01682             break;
01683
01684     HandleHitMessage_DiffTool(theDialog, hitMessage);
01685     }
01686     theDialog->Hide();
01687     sRuntimePanel = groupView->GetValue();
01688
01689     if(hitMessage == msg_OK)
01690     {
01691         userHitOK = true;
01692
01693         multiView->SwitchToPanel(1);
01694         DoDataExchange_Cvsroot(handler, false);
01695         multiView->SwitchToPanel(2);
01696         DoDataExchange_Globals(theDialog, false);
01697         multiView->SwitchToPanel(3);
01698         DoDataExchange_TextFiles(theDialog, false);
01699         multiView->SwitchToPanel(4);
01700         DoDataExchange_BinFiles(theDialog, maps, false);
01701         multiView->SwitchToPanel(5);
01702         DoDataExchange_Fonts(theDialog, false);
01703
01704         maps.SaveDefaults();
01705     }
01706 #endif //} qMacCvsPP
01707
01708 #if qUnix  //{ Unix-Part
01709     void *wid = UCreate_gcvs_Settings();
01710
01711     UCvsPrefs_MAIN *dlg = new UCvsPrefs_MAIN();
01712     UCvsPrefs_CVSROOT *tab1 = new UCvsPrefs_CVSROOT();
01713     UCvsPrefs_GLOBALS *tab2 = new UCvsPrefs_GLOBALS();
01714     UCvsPrefs_PORTS *tab3 = new UCvsPrefs_PORTS();
01715     UCvsPrefs_PROXY *tab4 = new UCvsPrefs_PROXY();
01716     UCvsPrefs_GCVS *tab5 = new UCvsPrefs_GCVS();
01717     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01718     dlg->AddPage(tab1, UCvsPrefs_MAIN::kTabGeneral, 0);
01719     dlg->AddPage(tab2, UCvsPrefs_MAIN::kTabGeneral, 1);
01720     dlg->AddPage(tab3, UCvsPrefs_MAIN::kTabGeneral, 2);
01721     dlg->AddPage(tab4, UCvsPrefs_MAIN::kTabGeneral, 3);
01722     dlg->AddPage(tab5, UCvsPrefs_MAIN::kTabGeneral, 4);
01723
01724     if(dlg->DoModal())
01725     {
01726         tab1->StoreValues();
01727         tab2->StoreValues();
01728         tab3->StoreValues();
01729         tab4->StoreValues();
01730         tab5->StoreValues();
01731
01732         userHitOK = true;
01733     }
01734     delete dlg;
01735 #endif //} qUnix
01736
01737     if( userHitOK
01738 #if INTERNAL_AUTHEN
01739         && !gCvsPrefs.empty()
01740 #endif /* INTERNAL_AUTHEN */
01741         )
01742     {
01743 #if INTERNAL_AUTHEN
01744         if( prevCvsroot != (const char*)gCvsPrefs || prevKind != gAuthen.kind() )
01745         {
01746             cvs_out("NEW CVSROOT: %s (%s)\n", (const char*)gCvsPrefs, gAuthen.kindstr());
01747             cvs_err("CVSROOT change will only take effect when commands are run from a non-CVS folder.\n"
01748                 "To change the CVSROOT of an existing sandbox please use the ChangeRoot macro.\n");
01749         }
01750         else
01751         {
01752             cvs_out("CVSROOT: %s (%s)\n", (const char*)gCvsPrefs, gAuthen.kindstr());
01753         }
01754 #endif /* INTERNAL_AUTHEN */
01755
01756         gCvsPrefs.save();
01757     }
01758 }

Here is the call graph for this function:

Variable Documentation

CMString gPrevAltCvs(20,"P_PrevAltCvs")

Referenced by CGetPrefs_CVS::CGetPrefs_CVS().

Generated on Sat Aug 7 22:44:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GetPrefs.h File Reference

common/GetPrefs.h File Reference

#include "SmartComboBox.h"
#include "Authen.h"
#include "HHelpSupport.h"

Include dependency graph for GetPrefs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CGetPrefs_GLOBALS
Global preferences property page. More...
class | CGetPrefs_WINCVS
WinCvs preferences property page. More...
class | CGetPrefs_CVS
CVS preferences property page. More...
class | CGetPrefs_CVSCMD_DIALOGS
Command dialogs preferences property page. More...

Defines

#define | AFX_GETPREFS_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

void | CompatGetPrefs (void)
Get the CVSROOT, authentication, and misc options.

Define Documentation

#define AFX_GETPREFS_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 22 of file GetPrefs.h.

Function Documentation

void CompatGetPrefs ( void )

Get the CVSROOT, authentication, and misc options.

Definition at line 1606 of file GetPrefs.cpp.

References cvs_err(), cvs_out(), EV_INIT_WIDGET, gCvsPrefs, kUMainWidget, MacBinMaps::LoadDefaults(), CvsPrefs::save(), MacBinMaps::SaveDefaults(), CMacBinTable::SetCurrentMap(), CGetPrefs_CVSCMD_DIALOGS::StoreValues(), CGetPrefs_WINCVS::StoreValues(), CGetPrefs_CVS::StoreValues(), CGetPrefs_GLOBALS::StoreValues(), UCreate_gcvs_Settings(), and UEventSendMessage().

Referenced by CWincvsDoc::OnAppPreferences(), and UCvsApp::SayWelcome().

01607 {
01608     bool userHitOK = false;
01609
01610     // Store current CVSROOT
01611 #if INTERNAL_AUTHEN
01612     const UStr prevCvsroot((const char*)gCvsPrefs);
01613     const AuthenKind prevKind = gAuthen.kind();
01614 #endif /* INTERNAL_AUTHEN */
01615
01616 #ifdef WIN32   //{ WIN32
01617     CHHelpPropertySheet pages("WinCvs Preferences");
01618     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01619
01620     CGetPrefs_GLOBALS page1;
01621     CGetPrefs_CVS page2;
01622     CGetPrefs_WINCVS page3;
01623     CGetPrefs_CVSCMD_DIALOGS page4;
01624
01625     pages.AddPage(&page1);
01626     pages.AddPage(&page2);
01627     pages.AddPage(&page3);
01628     pages.AddPage(&page4);
01629
01630     if( pages.DoModal() == IDOK )
01631     {
01632         page1.StoreValues();
01633         page2.StoreValues();
01634         page3.StoreValues();
01635         page4.StoreValues();
01636
01637         userHitOK = true;
01638     }
01639 #endif //} WIN32
01640
01641 #ifdef qMacCvsPP  //{ qMacCvsPP
01642     MacBinMaps maps;
01643     maps.LoadDefaults();
01644     CMacBinTable::SetCurrentMap(&maps);
01645
01646     StDialogHandler theHandler(dlg_Prefs, LCommander::GetTopCommander());
01647     LWindow *theDialog = theHandler.GetDialog();
01648     ThrowIfNil_(theDialog);
01649     static UInt16 sRuntimePanel = 1;
01650
01651     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01652         (theDialog->FindPaneByID(item_MultiViewPrefs));
01653     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01654
01655     UCvsPrefs_CVSROOT *handler = new UCvsPrefs_CVSROOT;
01656     ThrowIfNil_(handler);
01657
01658     UEventSendMessage(handler->GetWidID(), EV_INIT_WIDGET, 0, theDialog);
01659
01660     multiView->SwitchToPanel(5);
01661     DoDataExchange_Fonts(theDialog, true);
01662     multiView->SwitchToPanel(4);
01663     DoDataExchange_BinFiles(theDialog, maps, true);
01664     multiView->SwitchToPanel(3);
01665     DoDataExchange_TextFiles(theDialog, true);
01666     LPushButton *diffbtn = dynamic_cast<LPushButton*>(theDialog->FindPaneByID(item_BrowseExtDiff));
01667     diffbtn->AddListener(&theHandler);
01668     multiView->SwitchToPanel(2);
01669     DoDataExchange_Globals(theDialog, true);
01670     multiView->SwitchToPanel(1);
01671     DoDataExchange_Cvsroot(handler, true);
01672
01673     groupView->SetValue(sRuntimePanel);
01674     theDialog->Show();
01675     MessageT hitMessage;
01676     SInt32    lastDiffToolValue(0);
01677     while (true)
01678     {       // Let DialogHandler process events
01679         hitMessage = theHandler.DoDialog();
01680
01681         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01682             break;
01683
01684     HandleHitMessage_DiffTool(theDialog, hitMessage);
01685     }
01686     theDialog->Hide();
01687     sRuntimePanel = groupView->GetValue();
01688
01689     if(hitMessage == msg_OK)
01690     {
01691         userHitOK = true;
01692
01693         multiView->SwitchToPanel(1);
01694         DoDataExchange_Cvsroot(handler, false);
01695         multiView->SwitchToPanel(2);
01696         DoDataExchange_Globals(theDialog, false);
01697         multiView->SwitchToPanel(3);
01698         DoDataExchange_TextFiles(theDialog, false);
01699         multiView->SwitchToPanel(4);
01700         DoDataExchange_BinFiles(theDialog, maps, false);
01701         multiView->SwitchToPanel(5);
01702         DoDataExchange_Fonts(theDialog, false);
01703
01704         maps.SaveDefaults();
01705     }
01706 #endif //} qMacCvsPP
01707
01708 #if qUnix  //{ Unix-Part
01709     void *wid = UCreate_gcvs_Settings();
01710
01711     UCvsPrefs_MAIN *dlg = new UCvsPrefs_MAIN();
01712     UCvsPrefs_CVSROOT *tab1 = new UCvsPrefs_CVSROOT();
01713     UCvsPrefs_GLOBALS *tab2 = new UCvsPrefs_GLOBALS();
01714     UCvsPrefs_PORTS *tab3 = new UCvsPrefs_PORTS();
01715     UCvsPrefs_PROXY *tab4 = new UCvsPrefs_PROXY();
01716     UCvsPrefs_GCVS *tab5 = new UCvsPrefs_GCVS();
01717     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01718     dlg->AddPage(tab1, UCvsPrefs_MAIN::kTabGeneral, 0);
01719     dlg->AddPage(tab2, UCvsPrefs_MAIN::kTabGeneral, 1);
01720     dlg->AddPage(tab3, UCvsPrefs_MAIN::kTabGeneral, 2);
01721     dlg->AddPage(tab4, UCvsPrefs_MAIN::kTabGeneral, 3);
01722     dlg->AddPage(tab5, UCvsPrefs_MAIN::kTabGeneral, 4);
01723
01724     if(dlg->DoModal())
01725     {
01726         tab1->StoreValues();
01727         tab2->StoreValues();
01728         tab3->StoreValues();
01729         tab4->StoreValues();
01730         tab5->StoreValues();
01731
01732         userHitOK = true;
01733     }
01734     delete dlg;
01735 #endif //} qUnix
01736
01737     if( userHitOK
01738 #if INTERNAL_AUTHEN
01739         && !gCvsPrefs.empty()
01740 #endif /* INTERNAL_AUTHEN */
01741         )
01742     {
01743 #if INTERNAL_AUTHEN
01744         if( prevCvsroot != (const char*)gCvsPrefs || prevKind != gAuthen.kind() )
01745         {
01746             cvs_out("NEW CVSROOT: %s (%s)\n", (const char*)gCvsPrefs, gAuthen.kindstr());
01747             cvs_err("CVSROOT change will only take effect when commands are run from a non-CVS folder.\n"
01748                 "To change the CVSROOT of an existing sandbox please use the ChangeRoot macro.\n");
01749         }
01750         else
01751         {
01752             cvs_out("CVSROOT: %s (%s)\n", (const char*)gCvsPrefs, gAuthen.kindstr());
01753         }
01754 #endif /* INTERNAL_AUTHEN */
01755
01756         gCvsPrefs.save();
01757     }
01758 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:44:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GraphOptDlg.cpp File Reference

common/GraphOptDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "MainFrm.h"
#include "GraphView.h"
#include "GraphOptDlg.h"
#include "CvsPrefs.h"

Include dependency graph for GraphOptDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetGraphOptions (CPersistentInt &selColor, CPersistentInt &shadowColor, CPersistentInt &headerColor, CPersistentInt &tagColor, CPersistentInt &branchColor, CPersistentInt &nodeColor, CPersistentInt &deadNodeColor, CPersistentInt &userStateNodeColor, CPersistentInt &mergeColor)
Get the graph options.

Function Documentation

bool CompatGetGraphOptions | ( | CPersistentInt & | selColor,
 |  | CPersistentInt & | shadowColor,
 |  | CPersistentInt & | headerColor,
 |  | CPersistentInt & | tagColor,
 |  | CPersistentInt & | branchColor,
 |  | CPersistentInt & | nodeColor,
 |  | CPersistentInt & | deadNodeColor,
 |  | CPersistentInt & | userStateNodeColor,
 |  | CPersistentInt & | mergeColor
 | ) |

Get the graph options.

Definition at line 297 of file GraphOptDlg.cpp.

Referenced by CGraphView::OnGraphGraphoptions().

00301 {
00302     bool userHitOK = false;
00303
00304 #ifdef WIN32
00305     CGraphOptDlg graphOptDlg(selColor, shadowColor,
00306         headerColor, tagColor, branchColor,
00307         nodeColor, deadNodeColor, userStateNodeColor, mergeColor);
00308
00309     if( graphOptDlg.DoModal() == IDOK )
00310     {
00311         userHitOK = true;
00312     }
00313 #endif /* WIN32 */
00314 #ifdef qMacCvsPP
00315 #endif /* qMacCvsPP */
00316 #if qUnix
00317 #endif // qUnix
00318
00319     return userHitOK;
00320 }

Generated on Sat Aug 7 22:44:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GraphOptDlg.h File Reference

common/GraphOptDlg.h File Reference

#include "ColorStatic.h"
#include "HHelpSupport.h"

Include dependency graph for GraphOptDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CGraphOptDlg

Defines

#define | AFX_GRAPHOPTDLG_H__E05908EC_20A6_43FE_93C7_0964E6ABB6B1__INCLUDED_

Functions

bool | CompatGetGraphOptions (CPersistentInt &selColor, CPersistentInt &shadowColor, CPersistentInt &headerColor, CPersistentInt &tagColor, CPersistentInt &branchColor, CPersistentInt &nodeColor, CPersistentInt &deadNodeColor, CPersistentInt &userStateNodeColor, CPersistentInt &mergeColor)
Get the graph options.

Define Documentation

#define AFX_GRAPHOPTDLG_H__E05908EC_20A6_43FE_93C7_0964E6ABB6B1__INCLUDED_

Definition at line 26 of file GraphOptDlg.h.

Function Documentation

bool CompatGetGraphOptions | ( | CPersistentInt & | selColor,
 |  | CPersistentInt & | shadowColor,
 |  | CPersistentInt & | headerColor,
 |  | CPersistentInt & | tagColor,
 |  | CPersistentInt & | branchColor,
 |  | CPersistentInt & | nodeColor,
 |  | CPersistentInt & | deadNodeColor,
 |  | CPersistentInt & | userStateNodeColor,
 |  | CPersistentInt & | mergeColor
 | ) |

Get the graph options.

Definition at line 297 of file GraphOptDlg.cpp.

Referenced by CGraphView::OnGraphGraphoptions().

00301 {
00302     bool userHitOK = false;
00303
00304 #ifdef WIN32
00305     CGraphOptDlg graphOptDlg(selColor, shadowColor,
00306         headerColor, tagColor, branchColor,
00307         nodeColor, deadNodeColor, userStateNodeColor, mergeColor);
00308
00309     if( graphOptDlg.DoModal() == IDOK )
00310     {
00311         userHitOK = true;
00312     }
00313 #endif /* WIN32 */
00314 #ifdef qMacCvsPP
00315 #endif /* qMacCvsPP */
00316 #if qUnix
00317 #endif // qUnix
00318
00319     return userHitOK;
00320 }

Generated on Sat Aug 7 22:44:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportDlg.cpp File Reference

common/ImportDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "ImportDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "MultiString.h"
#include "PromptFiles.h"
#include "ItemListDlg.h"
#include "CvsCommands.h"
#include "CvsAlert.h"
#include "CvsRootDlg.h"
#include "ImportFilterDlg.h"
#include "GetPrefs.h"

Include dependency graph for ImportDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool | CompatGetImport (const MultiFiles *mf, ReportConflict *&entries, ReportWarning *&warnings, UStr &modname, UStr &logmsg, UStr &vendortag, UStr &reltag, UStr &vendorBranchId, UStr &path, bool &useDefIgnore, bool &useFilesTime, bool &createSandbox, bool &dontCreateVendorTag, bool &overwriteReleaseTags, bool &forceCvsroot, UStr &cvsroot)
Get the import options.

Variables

char * | sDefReleases []
Default release tags.
char * | sDefVendors []
Default vendor tags.
char * | sDefModuleNames []
Default module names.
char * | sDefVendorBranchIds []
Default vendor branch ids.
CMString | gVendorNames (20,"P_VendorNames", sDefVendors)
CMString | gReleasesNames (20,"P_ReleaseNames", sDefReleases)
CMString | gImportModuleNames (20,"P_ImportModuleNames", sDefModuleNames)
CMString | gVendorBranchIds (20,"P_VendorBranchIds", sDefVendorBranchIds)
CMString | gImportLocalFolder (20,"P_ImportLocalFolder")
CMString gCommitLogs

Function Documentation

bool CompatGetImport | ( | const MultiFiles * | mf,
 |  | ReportConflict *& | entries,
 |  | ReportWarning *& | warnings,
 |  | UStr & | modname,
 |  | UStr & | logmsg,
 |  | UStr & | vendortag,
 |  | UStr & | reltag,
 |  | UStr & | vendorBranchId,
 |  | UStr & | path,
 |  | bool & | useDefIgnore,
 |  | bool & | useFilesTime,
 |  | bool & | createSandbox,
 |  | bool & | dontCreateVendorTag,
 |  | bool & | overwriteReleaseTags,
 |  | bool & | forceCvsroot,
 |  | UStr & | cvsroot
 | ) |

Get the import options.

Definition at line 759 of file ImportDlg.cpp.

References BrowserGetDirectory(), CPStr, CStr, EV_INIT_WIDGET, FindBestLastCvsroot(), gCvsPrefs, CImport_MAIN::GetLogMsg(), InsertLastCvsroot(), kUMainWidget, CImport_OPTIONS::m_createSandbox, CImport_MAIN::m_cvsroot, CImport_MAIN::m_dontCreateVendorTag, CImport_MAIN::m_forceRoot, CImport_OPTIONS::m_hasVendorBranch, CImport_MAIN::m_moduleName, CImport_MAIN::m_overwriteReleaseTags, CImport_OPTIONS::m_path, CImport_MAIN::m_rtag, CImport_OPTIONS::m_useDefIgnore, CImport_OPTIONS::m_useFilesTime, CImport_OPTIONS::m_vendorBranch, CImport_MAIN::m_vtag, CvsPrefs::save(), SplitPath(), CGetPrefs_GLOBALS::StoreValues(), UCreate_ImportDlg(), and UEventSendMessage().

Referenced by CvsCmdImportModule().

00766 {
00767     bool userHitOK = false;
00768
00769     modname = "";
00770     logmsg = "";
00771     vendortag = "";
00772     reltag = "";
00773     vendorBranchId = "";
00774     useDefIgnore = false;
00775     useFilesTime = false;
00776     createSandbox = false;
00777     dontCreateVendorTag = false;
00778     overwriteReleaseTags = false;
00779
00780     static CStr sLastModName;   /*Obsolete - remove it and always use sFolder! Get rid after all platforms have combo boxes for recent modules!*/
00781
00782     static CStr sFolder;
00783     static CStr sLastMsg;
00784     static CStr sLastVTag("avendor");
00785     static CStr sLastRTag("arelease");
00786     static bool lastForceCvsroot = true;
00787     static CStr sLastCvsroot("");
00788
00789     bool hasVendorBranchId = false;
00790
00791     // Find out the folder so we can suggest the module name
00792     CStr uppath, folder;
00793     if( SplitPath(path, uppath, folder) )
00794         sFolder = folder;
00795
00796     if( sLastModName.length() == 0L )   /*Obsolete - see above*/
00797     {
00798         sLastModName = folder;
00799     }
00800
00801     FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00802
00803 #ifdef WIN32
00804     CHHelpPropertySheet pages("Import settings");
00805     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00806
00807     CImport_MAIN page1(mf, sLastMsg, sFolder, sLastRTag, sLastVTag, dontCreateVendorTag, overwriteReleaseTags, lastForceCvsroot, sLastCvsroot);
00808     CImport_OPTIONS page2(mf, entries, warnings, path, useDefIgnore, useFilesTime, createSandbox);
00809     CGetPrefs_GLOBALS page3;
00810
00811     pages.AddPage(&page1);
00812     pages.AddPage(&page2);
00813     pages.AddPage(&page3);
00814
00815     if( pages.DoModal() == IDOK )
00816     {
00817         sLastModName = (const char*)page1.m_moduleName;
00818         sLastMsg = (const char*)page1.GetLogMsg();
00819         sLastVTag = (const char*)page1.m_vtag;
00820         sLastRTag = (const char*)page1.m_rtag;
00821         dontCreateVendorTag = page1.m_dontCreateVendorTag != FALSE;
00822         overwriteReleaseTags = page1.m_overwriteReleaseTags != FALSE;
00823         lastForceCvsroot = page1.m_forceRoot == TRUE;
00824         sLastCvsroot = page1.m_cvsroot;
00825
00826         hasVendorBranchId = page2.m_hasVendorBranch != FALSE;
00827         vendorBranchId = (const char*)page2.m_vendorBranch;
00828         path = (const char*)page2.m_path;
00829         useDefIgnore = page2.m_useDefIgnore != FALSE;
00830         useFilesTime = page2.m_useFilesTime != FALSE;
00831         createSandbox = page2.m_createSandbox != FALSE;
00832
00833         page3.StoreValues();
00834
00835         userHitOK = true;
00836     }
00837 #endif /* WIN32 */
00838
00839 #ifdef qMacCvsPP
00840     StDialogHandler theHandler(dlg_Import, LCommander::GetTopCommander());
00841     LWindow *theDialog = theHandler.GetDialog();
00842     ThrowIfNil_(theDialog);
00843     static UInt16 sRuntimePanel = 1;
00844
00845     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00846         (theDialog->FindPaneByID(item_MultiViewPrefs));
00847     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00848
00849     multiView->SwitchToPanel(3);
00850     DoDataExchange_Globals(theDialog, true);
00851     multiView->SwitchToPanel(2);
00852     DoDataExchange (theDialog, item_ImportCvsIgnore, useDefIgnore, true);
00853     DoDataExchange (theDialog, item_ShowPath, path, true);
00854     dynamic_cast<LControl*> (theDialog->FindPaneByID (item_EditPath))->AddListener (&theHandler);
00855
00856     multiView->SwitchToPanel(1);
00857     DoDataExchange_ImportMain(theDialog, sLastModName, sLastMsg, true);
00858     DoDataExchange_ImportTags(theDialog, sLastVTag, sLastRTag, true);
00859
00860
00861     groupView->SetValue(sRuntimePanel);
00862     theDialog->Show();
00863     MessageT hitMessage;
00864     while (true)
00865     {       // Let DialogHandler process events
00866         hitMessage = theHandler.DoDialog();
00867
00868         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00869             break;
00870
00871         if(hitMessage == item_EditPath)
00872         {
00873             CStr dir;
00874             if( BrowserGetDirectory("Select a directory to import from", dir) )
00875             {
00876                 CPStr tmp(dir.c_str());
00877                 theDialog->SetDescriptorForPaneID(item_ShowPath, tmp);
00878             }
00879         }
00880     }
00881     theDialog->Hide();
00882     sRuntimePanel = groupView->GetValue();
00883
00884     if(hitMessage == msg_OK)
00885     {
00886         multiView->SwitchToPanel(1);
00887         DoDataExchange_ImportMain(theDialog, sLastModName, sLastMsg, false);
00888         DoDataExchange_ImportTags(theDialog, sLastVTag, sLastRTag, false);
00889         multiView->SwitchToPanel(2);
00890         DoDataExchange (theDialog, item_ImportCvsIgnore, useDefIgnore, false);
00891         DoDataExchange (theDialog, item_ShowPath, path, false);
00892         multiView->SwitchToPanel(3);
00893         DoDataExchange_Globals(theDialog, false);
00894
00895         Assert_(sLastModName.length() != 0);
00896
00897         userHitOK = true;
00898     }
00899 #endif /* qMacCvsPP */
00900
00901 #if qUnix
00902     void *wid = UCreate_ImportDlg();
00903
00904     UCvsImport *dlg = new UCvsImport();
00905     UCvsImport_MAIN *tab1 = new UCvsImport_MAIN(sLastMsg, sLastModName, sLastRTag, sLastVTag);
00906     UCvsImport_OPTIONS *tab2 = new UCvsImport_OPTIONS(path);
00907     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00908     dlg->AddPage(tab1, UCvsImport::kTabGeneral, 0);
00909     dlg->AddPage(tab2, UCvsImport::kTabGeneral, 1);
00910
00911     if(dlg->DoModal())
00912     {
00913         sLastModName = tab1->m_modname;
00914         sLastMsg = tab1->m_logmsg;
00915         sLastVTag = tab1->m_vtag;
00916         sLastRTag = tab1->m_rtag;
00917         path = tab2->m_path;
00918
00919         userHitOK = true;
00920     }
00921
00922     delete dlg;
00923 #endif // qUnix
00924
00925     if( userHitOK )
00926     {
00927         gCvsPrefs.save();
00928
00929         if( sLastMsg.length() == 0 )
00930             sLastMsg = "no message";
00931
00932         if( sLastVTag.length() == 0 )
00933             sLastVTag = "initial";
00934
00935         if( sLastRTag.length() == 0 )
00936             sLastRTag = "start";
00937
00938         if( !hasVendorBranchId )
00939         {
00940             vendorBranchId = "";
00941         }
00942
00943         modname = sLastModName;
00944         logmsg = sLastMsg;
00945         vendortag = sLastVTag;
00946         reltag = sLastRTag;
00947
00948 #ifdef TARGET_OS_MAC
00949         logmsg.replace('\015', '\012');
00950 #endif /* TARGET_OS_MAC */
00951
00952         forceCvsroot = lastForceCvsroot;
00953         cvsroot = sLastCvsroot;
00954
00955         if( forceCvsroot )
00956         {
00957             InsertLastCvsroot(path, cvsroot);
00958         }
00959
00960         gCvsPrefs.save();
00961     }
00962
00963     return userHitOK;
00964 }

Here is the call graph for this function:

Variable Documentation

CMString gCommitLogs

CMString gImportLocalFolder(20,"P_ImportLocalFolder") [static]

Referenced by CImport_OPTIONS::CImport_OPTIONS().

CMString gImportModuleNames(20,"P_ImportModuleNames", sDefModuleNames) [static]

Referenced by CImport_MAIN::CImport_MAIN().

CMString gReleasesNames(20,"P_ReleaseNames", sDefReleases)

Referenced by CImport_MAIN::CImport_MAIN(), and CUpdateMerge::CUpdateMerge().

CMString gVendorBranchIds(20,"P_VendorBranchIds", sDefVendorBranchIds) [static]

Referenced by CImport_OPTIONS::CImport_OPTIONS().

CMString gVendorNames(20,"P_VendorNames", sDefVendors) [static]

Referenced by CImport_MAIN::CImport_MAIN().

char* sDefModuleNames[] [static]

Initial value:

{
    "Module",
    "Project",
    0L
}
Default module names.

Definition at line 76 of file ImportDlg.cpp.

char* sDefReleases[] [static]

Initial value:

{
    "V10",
    "V101",
    0L
}
Default release tags.

Definition at line 61 of file ImportDlg.cpp.

char* sDefVendorBranchIds[] [static]

Initial value:

{
    "1.1.7",
    "1.1.6",
    "1.1.5",
    "1.1.4",
    "1.1.3",
    "1.1.2",
    "1.1.1",
    0L
}
Default vendor branch ids.

Definition at line 84 of file ImportDlg.cpp.

char* sDefVendors[] [static]

Initial value:

{
    "GNU",
    0L
}
Default vendor tags.

Definition at line 69 of file ImportDlg.cpp.

Generated on Sat Aug 7 22:45:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportDlg.h File Reference

common/ImportDlg.h File Reference

#include "SmartComboBox.h"
#include "MultilineEntryDlg.h"
#include "HHelpSupport.h"

Include dependency graph for ImportDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CImport_MAIN
Import settings property page. More...
class | CImport_OPTIONS
Import options property page. More...

Defines

#define | AFX_IMPORTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

bool | CompatGetImport (const MultiFiles *mf, ReportConflict *&entries, ReportWarning *&warnings, UStr &modname, UStr &logmsg, UStr &vendortag, UStr &reltag, UStr &vendorBranchId, UStr &path, bool &useDefIgnore, bool &useFilesTime, bool &createSandbox, bool &dontCreateVendorTag, bool &overwriteReleaseTags, bool &forceCvsroot, UStr &cvsroot)
Get the import options.

Define Documentation

#define AFX_IMPORTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file ImportDlg.h.

Function Documentation

bool CompatGetImport | ( | const MultiFiles * | mf,
 |  | ReportConflict *& | entries,
 |  | ReportWarning *& | warnings,
 |  | UStr & | modname,
 |  | UStr & | logmsg,
 |  | UStr & | vendortag,
 |  | UStr & | reltag,
 |  | UStr & | vendorBranchId,
 |  | UStr & | path,
 |  | bool & | useDefIgnore,
 |  | bool & | useFilesTime,
 |  | bool & | createSandbox,
 |  | bool & | dontCreateVendorTag,
 |  | bool & | overwriteReleaseTags,
 |  | bool & | forceCvsroot,
 |  | UStr & | cvsroot
 | ) |

Get the import options.

Definition at line 759 of file ImportDlg.cpp.

References BrowserGetDirectory(), CPStr, CStr, EV_INIT_WIDGET, FindBestLastCvsroot(), gCvsPrefs, CImport_MAIN::GetLogMsg(), InsertLastCvsroot(), kUMainWidget, CImport_OPTIONS::m_createSandbox, CImport_MAIN::m_cvsroot, CImport_MAIN::m_dontCreateVendorTag, CImport_MAIN::m_forceRoot, CImport_OPTIONS::m_hasVendorBranch, CImport_MAIN::m_moduleName, CImport_MAIN::m_overwriteReleaseTags, CImport_OPTIONS::m_path, CImport_MAIN::m_rtag, CImport_OPTIONS::m_useDefIgnore, CImport_OPTIONS::m_useFilesTime, CImport_OPTIONS::m_vendorBranch, CImport_MAIN::m_vtag, CvsPrefs::save(), SplitPath(), CGetPrefs_GLOBALS::StoreValues(), UCreate_ImportDlg(), and UEventSendMessage().

Referenced by CvsCmdImportModule().

00766 {
00767     bool userHitOK = false;
00768
00769     modname = "";
00770     logmsg = "";
00771     vendortag = "";
00772     reltag = "";
00773     vendorBranchId = "";
00774     useDefIgnore = false;
00775     useFilesTime = false;
00776     createSandbox = false;
00777     dontCreateVendorTag = false;
00778     overwriteReleaseTags = false;
00779
00780     static CStr sLastModName;   /*Obsolete - remove it and always use sFolder! Get rid after all platforms have combo boxes for recent modules!*/
00781
00782     static CStr sFolder;
00783     static CStr sLastMsg;
00784     static CStr sLastVTag("avendor");
00785     static CStr sLastRTag("arelease");
00786     static bool lastForceCvsroot = true;
00787     static CStr sLastCvsroot("");
00788
00789     bool hasVendorBranchId = false;
00790
00791     // Find out the folder so we can suggest the module name
00792     CStr uppath, folder;
00793     if( SplitPath(path, uppath, folder) )
00794         sFolder = folder;
00795
00796     if( sLastModName.length() == 0L )   /*Obsolete - see above*/
00797     {
00798         sLastModName = folder;
00799     }
00800
00801     FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00802
00803 #ifdef WIN32
00804     CHHelpPropertySheet pages("Import settings");
00805     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00806
00807     CImport_MAIN page1(mf, sLastMsg, sFolder, sLastRTag, sLastVTag, dontCreateVendorTag, overwriteReleaseTags, lastForceCvsroot, sLastCvsroot);
00808     CImport_OPTIONS page2(mf, entries, warnings, path, useDefIgnore, useFilesTime, createSandbox);
00809     CGetPrefs_GLOBALS page3;
00810
00811     pages.AddPage(&page1);
00812     pages.AddPage(&page2);
00813     pages.AddPage(&page3);
00814
00815     if( pages.DoModal() == IDOK )
00816     {
00817         sLastModName = (const char*)page1.m_moduleName;
00818         sLastMsg = (const char*)page1.GetLogMsg();
00819         sLastVTag = (const char*)page1.m_vtag;
00820         sLastRTag = (const char*)page1.m_rtag;
00821         dontCreateVendorTag = page1.m_dontCreateVendorTag != FALSE;
00822         overwriteReleaseTags = page1.m_overwriteReleaseTags != FALSE;
00823         lastForceCvsroot = page1.m_forceRoot == TRUE;
00824         sLastCvsroot = page1.m_cvsroot;
00825
00826         hasVendorBranchId = page2.m_hasVendorBranch != FALSE;
00827         vendorBranchId = (const char*)page2.m_vendorBranch;
00828         path = (const char*)page2.m_path;
00829         useDefIgnore = page2.m_useDefIgnore != FALSE;
00830         useFilesTime = page2.m_useFilesTime != FALSE;
00831         createSandbox = page2.m_createSandbox != FALSE;
00832
00833         page3.StoreValues();
00834
00835         userHitOK = true;
00836     }
00837 #endif /* WIN32 */
00838
00839 #ifdef qMacCvsPP
00840     StDialogHandler theHandler(dlg_Import, LCommander::GetTopCommander());
00841     LWindow *theDialog = theHandler.GetDialog();
00842     ThrowIfNil_(theDialog);
00843     static UInt16 sRuntimePanel = 1;
00844
00845     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00846         (theDialog->FindPaneByID(item_MultiViewPrefs));
00847     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00848
00849     multiView->SwitchToPanel(3);
00850     DoDataExchange_Globals(theDialog, true);
00851     multiView->SwitchToPanel(2);
00852     DoDataExchange (theDialog, item_ImportCvsIgnore, useDefIgnore, true);
00853     DoDataExchange (theDialog, item_ShowPath, path, true);
00854     dynamic_cast<LControl*> (theDialog->FindPaneByID (item_EditPath))->AddListener (&theHandler);
00855
00856     multiView->SwitchToPanel(1);
00857     DoDataExchange_ImportMain(theDialog, sLastModName, sLastMsg, true);
00858     DoDataExchange_ImportTags(theDialog, sLastVTag, sLastRTag, true);
00859
00860
00861     groupView->SetValue(sRuntimePanel);
00862     theDialog->Show();
00863     MessageT hitMessage;
00864     while (true)
00865     {       // Let DialogHandler process events
00866         hitMessage = theHandler.DoDialog();
00867
00868         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00869             break;
00870
00871         if(hitMessage == item_EditPath)
00872         {
00873             CStr dir;
00874             if( BrowserGetDirectory("Select a directory to import from", dir) )
00875             {
00876                 CPStr tmp(dir.c_str());
00877                 theDialog->SetDescriptorForPaneID(item_ShowPath, tmp);
00878             }
00879         }
00880     }
00881     theDialog->Hide();
00882     sRuntimePanel = groupView->GetValue();
00883
00884     if(hitMessage == msg_OK)
00885     {
00886         multiView->SwitchToPanel(1);
00887         DoDataExchange_ImportMain(theDialog, sLastModName, sLastMsg, false);
00888         DoDataExchange_ImportTags(theDialog, sLastVTag, sLastRTag, false);
00889         multiView->SwitchToPanel(2);
00890         DoDataExchange (theDialog, item_ImportCvsIgnore, useDefIgnore, false);
00891         DoDataExchange (theDialog, item_ShowPath, path, false);
00892         multiView->SwitchToPanel(3);
00893         DoDataExchange_Globals(theDialog, false);
00894
00895         Assert_(sLastModName.length() != 0);
00896
00897         userHitOK = true;
00898     }
00899 #endif /* qMacCvsPP */
00900
00901 #if qUnix
00902     void *wid = UCreate_ImportDlg();
00903
00904     UCvsImport *dlg = new UCvsImport();
00905     UCvsImport_MAIN *tab1 = new UCvsImport_MAIN(sLastMsg, sLastModName, sLastRTag, sLastVTag);
00906     UCvsImport_OPTIONS *tab2 = new UCvsImport_OPTIONS(path);
00907     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00908     dlg->AddPage(tab1, UCvsImport::kTabGeneral, 0);
00909     dlg->AddPage(tab2, UCvsImport::kTabGeneral, 1);
00910
00911     if(dlg->DoModal())
00912     {
00913         sLastModName = tab1->m_modname;
00914         sLastMsg = tab1->m_logmsg;
00915         sLastVTag = tab1->m_vtag;
00916         sLastRTag = tab1->m_rtag;
00917         path = tab2->m_path;
00918
00919         userHitOK = true;
00920     }
00921
00922     delete dlg;
00923 #endif // qUnix
00924
00925     if( userHitOK )
00926     {
00927         gCvsPrefs.save();
00928
00929         if( sLastMsg.length() == 0 )
00930             sLastMsg = "no message";
00931
00932         if( sLastVTag.length() == 0 )
00933             sLastVTag = "initial";
00934
00935         if( sLastRTag.length() == 0 )
00936             sLastRTag = "start";
00937
00938         if( !hasVendorBranchId )
00939         {
00940             vendorBranchId = "";
00941         }
00942
00943         modname = sLastModName;
00944         logmsg = sLastMsg;
00945         vendortag = sLastVTag;
00946         reltag = sLastRTag;
00947
00948 #ifdef TARGET_OS_MAC
00949         logmsg.replace('\015', '\012');
00950 #endif /* TARGET_OS_MAC */
00951
00952         forceCvsroot = lastForceCvsroot;
00953         cvsroot = sLastCvsroot;
00954
00955         if( forceCvsroot )
00956         {
00957             InsertLastCvsroot(path, cvsroot);
00958         }
00959
00960         gCvsPrefs.save();
00961     }
00962
00963     return userHitOK;
00964 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportFilter.cpp File Reference

common/ImportFilter.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "ImportFilter.h"
#include "AppConsole.h"
#include "CvsIgnore.h"

Include dependency graph for ImportFilter.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | NEW new
#define | MACSPEC

Functions

void | list_add_warning (ReportWarning *&warnings, kTextBinTYPE warn, const char *sample)
void | list_add_type (ImportReport *impReport, ReportConflict *&conflicts, kFileType fileType, const char *sample, const char *fullname, int mac_type, int mac_creator)
kTraversal | list_all_types_recur (const char *path, ReportWarning *&warnings, ReportConflict *&conflicts)
void | free_list_types (ReportWarning *&warnings, ReportConflict *&conflicts)
void | copy_list_types (const ReportWarning *srcWarnings, const ReportConflict *srcConflicts, ReportWarning *&warnings, ReportConflict *&conflicts)

Variables

const char * | lf = "\r\n"

Define Documentation

#define MACSPEC

Referenced by ImportReport::OnFile().

#define NEW new

Definition at line 72 of file ImportFilter.cpp.

Function Documentation

void copy_list_types | ( | const ReportWarning * | srcWarnings,
 |  | const ReportConflict * | srcConflicts,
 |  | ReportWarning *& | warnings,
 |  | ReportConflict *& | conflicts
 | ) |

Copy warnings and conflicts lists

Parameters:
srcWarnings | Source warnings list
srcConflicts | Source conflicts list
warnings | Warnings list
conflicts | Conflicts list
Definition at line 243 of file ImportFilter.cpp.

References cvs_err(), kFileIsOK, ReportWarning::next, ReportConflict::next, and NULL.

Referenced by CImport_OPTIONS::OnImportfilter().

00244 {
00245     const ReportWarning* warn = srcWarnings;
00246     ReportWarning* lastWarn = NULL;
00247     while( warn != 0L )
00248     {
00249         ReportWarning* neww = new ReportWarning(kFileIsOK);
00250         if( neww == 0L )
00251         {
00252             cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportWarning));
00253             return;
00254         }
00255
00256         *neww = *warn;
00257         neww->next = NULL;
00258
00259         if( warnings == 0L )
00260         {
00261             warnings = neww;
00262         }
00263         else
00264         {
00265             lastWarn->next = neww;
00266         }
00267
00268         lastWarn = neww;
00269         warn = warn->next;
00270     }
00271
00272     const ReportConflict* conf = srcConflicts;
00273     ReportConflict* lastConf = NULL;
00274     while( conf != 0L )
00275     {
00276         ReportConflict* newc = new ReportConflict(0, 0);
00277         if( newc == 0L )
00278         {
00279             cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportConflict));
00280             return;
00281         }
00282
00283         *newc = *conf;
00284         newc->next = NULL;
00285
00286         if( conflicts == 0L )
00287         {
00288             conflicts = newc;
00289         }
00290         else
00291         {
00292             lastConf->next = newc;
00293         }
00294
00295         lastConf = newc;
00296         conf = conf->next;
00297     }
00298 }

Here is the call graph for this function:

void free_list_types | ( | ReportWarning *& | warnings,
 |  | ReportConflict *& | conflicts
 | ) |

Release memory allocated for warnings and conflicts lists

Parameters:
warnings | Warnings list
conflicts | Conflicts list
Definition at line 214 of file ImportFilter.cpp.

References ReportWarning::next, ReportConflict::next, and NULL.

Referenced by CompatImportFilter(), CvsCmdImportModule(), CImport_OPTIONS::ImportFilter(), and CImport_OPTIONS::OnImportfilter().

00215 {
00216     ReportWarning* warn = warnings;
00217     while( warn != 0L )
00218     {
00219         ReportWarning* tmpwarn = warn;
00220         warn = warn->next;
00221         delete tmpwarn;
00222     }
00223
00224     ReportConflict* conf = conflicts;
00225     while( conf != 0L )
00226     {
00227         ReportConflict* tmpconf = conf;
00228         conf = conf->next;
00229         delete tmpconf;
00230     }
00231
00232     warnings = NULL;
00233     conflicts = NULL;
00234 }

void list_add_type | ( | ImportReport * | impReport,
 |  | ReportConflict *& | conflicts,
 |  | kFileType | fileType,
 |  | const char * | sample,
 |  | const char * | fullname,
 |  | int | mac_type,
 |  | int | mac_creator
 | ) | [static]

Add file to a warning/conflict list

Parameters:
impReport | Import report
conflicts | Conflicts list
fileType | File type
sample | Sample
fullname | Full name
mac_type | Mac specific type
mac_creator | Mac specific crator
Note:
When a file is added to the list, it is also processed through ignore filter. If file should be ignored then the initial state is "IGNORE" in import dialog box.
Definition at line 132 of file ImportFilter.cpp.

References ReportConflict::AddPattern(), cvs_err(), ImportReport::GetIgnoreList(), ReportConflict::GetMacCreator(), ReportConflict::GetMacType(), ReportConflict::HasConflict(), ReportConflict::Ignore(), ReportConflict::IsBinary(), ReportConflict::IsUnicode(), kFileTypeBin, kFileTypeUnicode, ReportConflict::Match(), MatchIgnoredList(), NEW, ReportConflict::next, ReportConflict::SetConflict(), and ReportConflict::SetTypeCreatorConflict().

Referenced by ImportReport::OnFile().

00135 {
00136     // Look for a matching entry
00137     ReportConflict* entry = conflicts;
00138     while( entry != 0L )
00139     {
00140         if( entry->Match(sample) )
00141         {
00142             if( entry->HasConflict() )
00143                 return;
00144
00145             if( entry->IsBinary() ^ (kFileTypeBin == fileType) )
00146                 entry->SetConflict(fullname);
00147
00148             if( entry->IsUnicode() ^ (kFileTypeUnicode == fileType) )
00149                 entry->SetConflict(fullname);
00150
00151             // Mac only
00152             if( entry->GetMacType() != mac_type || entry->GetMacCreator() != mac_creator )
00153                 entry->SetTypeCreatorConflict(fullname);
00154
00155             // It matches perfectly
00156             return;
00157         }
00158
00159         entry = entry->next;
00160     }
00161
00162     // Find the extension
00163     const char* tmp = sample, *ext = 0L;
00164
00165     while( (tmp = strchr(tmp, '.')) != 0L )
00166     {
00167         ext = tmp++;
00168     }
00169
00170     // Add a new entry
00171     ReportConflict* newc = NEW ReportConflict(mac_type, mac_creator);
00172     if( newc == 0L )
00173     {
00174         cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportConflict));
00175         return;
00176     }
00177
00178     newc->AddPattern(ext != 0L ? ext : sample, fileType, ext != 0L, fullname);
00179
00180     if( conflicts == 0L )
00181     {
00182         conflicts = newc;
00183     }
00184     else
00185     {
00186         newc->next = conflicts;
00187         conflicts = newc;
00188     }
00189
00190     // MN - Apply ignore filter. If $HOME/.cvsignore tells that
00191     // file should be ignored then set object to ignored state.
00192     if( MatchIgnoredList(sample, impReport->GetIgnoreList()) )
00193         newc->Ignore();
00194 }

Here is the call graph for this function:

void list_add_warning | ( | ReportWarning *& | warnings,
 |  | kTextBinTYPE | warn,
 |  | const char * | sample
 | ) | [static]

Add new warning to the list or add the sample to already existing warning

Parameters:
warnings | Warning list
warn | Warning type
sample | Sample
Definition at line 81 of file ImportFilter.cpp.

References ReportWarning::AddWarning(), cvs_err(), ReportWarning::Kind(), NEW, and ReportWarning::next.

Referenced by ImportReport::OnAlias(), ImportReport::OnError(), and ImportReport::OnFile().

00082 {
00083     // Find if it exists already a same kind of warning
00084     ReportWarning* tmp = warnings;
00085     while( tmp != 0L )
00086     {
00087         if( tmp->Kind() == warn )
00088             break;
00089
00090         tmp = tmp->next;
00091     }
00092
00093     if( tmp != 0L && tmp->Kind() == warn )
00094     {
00095         tmp->AddWarning(sample);
00096         return;
00097     }
00098
00099     // Insert new one
00100     tmp = NEW ReportWarning(warn);
00101     if( tmp == 0L )
00102     {
00103         cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportWarning));
00104         return;
00105     }
00106
00107     tmp->AddWarning(sample);
00108
00109     if( warnings == 0L )
00110     {
00111         warnings = tmp;
00112     }
00113     else
00114     {
00115         tmp->next = warnings;
00116         warnings = tmp;
00117     }
00118 }

Here is the call graph for this function:

kTraversal list_all_types_recur | ( | const char * | path,
 |  | ReportWarning *& | warnings,
 |  | ReportConflict *& | conflicts
 | ) |

Traverse path and add files to the warning and conflict lists

Parameters:
path | Path to traverse
warnings | Warnings list
conflicts | Conflicts list
Returns:
Traverse command as kTraversal
Definition at line 203 of file ImportFilter.cpp.

References FileTraverse(), and kTraversal.

Referenced by CompatImportFilter().

00204 {
00205     ImportReport report(path, warnings, conflicts);
00206     return FileTraverse(path, report);
00207 }

Here is the call graph for this function:

Variable Documentation

const char* lf = "\r\n" [static]

Definition at line 58 of file ImportFilter.cpp.

Referenced by ReportWarning::PrintOut(), and ReportConflict::PrintOut().

Generated on Sat Aug 7 22:45:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportFilter.h File Reference

common/ImportFilter.h File Reference

#include <vector>
#include "CPStr.h"
#include "FileTraversal.h"
#include "ProgressDlg.h"

Include dependency graph for ImportFilter.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | ReportConflict
Class to represent file type and help handle possible import conflicts. More...
class | ReportWarning
Class to represent a warning (wrong line feed, escape characters etc.) and a set of files which illustrates this warning. More...
class | ImportReport
Class to traverse and detect conflicts or warnings for import. More...

Defines

#define | AFX_IMPORTFILTER_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

kTraversal | list_all_types_recur (const char *path, ReportWarning *&warnings, ReportConflict *&conflicts)
void | free_list_types (ReportWarning *&warnings, ReportConflict *&conflicts)
void | copy_list_types (const ReportWarning *srcWarnings, const ReportConflict *srcConflicts, ReportWarning *&warnings, ReportConflict *&conflicts)

Define Documentation

#define AFX_IMPORTFILTER_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file ImportFilter.h.

Function Documentation

void copy_list_types | ( | const ReportWarning * | srcWarnings,
 |  | const ReportConflict * | srcConflicts,
 |  | ReportWarning *& | warnings,
 |  | ReportConflict *& | conflicts
 | ) |

Copy warnings and conflicts lists

Parameters:
srcWarnings | Source warnings list
srcConflicts | Source conflicts list
warnings | Warnings list
conflicts | Conflicts list
Definition at line 243 of file ImportFilter.cpp.

References cvs_err(), kFileIsOK, ReportConflict::next, ReportWarning::next, and NULL.

Referenced by CImport_OPTIONS::OnImportfilter().

00244 {
00245     const ReportWarning* warn = srcWarnings;
00246     ReportWarning* lastWarn = NULL;
00247     while( warn != 0L )
00248     {
00249         ReportWarning* neww = new ReportWarning(kFileIsOK);
00250         if( neww == 0L )
00251         {
00252             cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportWarning));
00253             return;
00254         }
00255
00256         *neww = *warn;
00257         neww->next = NULL;
00258
00259         if( warnings == 0L )
00260         {
00261             warnings = neww;
00262         }
00263         else
00264         {
00265             lastWarn->next = neww;
00266         }
00267
00268         lastWarn = neww;
00269         warn = warn->next;
00270     }
00271
00272     const ReportConflict* conf = srcConflicts;
00273     ReportConflict* lastConf = NULL;
00274     while( conf != 0L )
00275     {
00276         ReportConflict* newc = new ReportConflict(0, 0);
00277         if( newc == 0L )
00278         {
00279             cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportConflict));
00280             return;
00281         }
00282
00283         *newc = *conf;
00284         newc->next = NULL;
00285
00286         if( conflicts == 0L )
00287         {
00288             conflicts = newc;
00289         }
00290         else
00291         {
00292             lastConf->next = newc;
00293         }
00294
00295         lastConf = newc;
00296         conf = conf->next;
00297     }
00298 }

Here is the call graph for this function:

void free_list_types | ( | ReportWarning *& | warnings,
 |  | ReportConflict *& | conflicts
 | ) |

Release memory allocated for warnings and conflicts lists

Parameters:
warnings | Warnings list
conflicts | Conflicts list
Definition at line 214 of file ImportFilter.cpp.

References ReportConflict::next, ReportWarning::next, and NULL.

Referenced by CompatImportFilter(), CvsCmdImportModule(), CImport_OPTIONS::ImportFilter(), and CImport_OPTIONS::OnImportfilter().

00215 {
00216     ReportWarning* warn = warnings;
00217     while( warn != 0L )
00218     {
00219         ReportWarning* tmpwarn = warn;
00220         warn = warn->next;
00221         delete tmpwarn;
00222     }
00223
00224     ReportConflict* conf = conflicts;
00225     while( conf != 0L )
00226     {
00227         ReportConflict* tmpconf = conf;
00228         conf = conf->next;
00229         delete tmpconf;
00230     }
00231
00232     warnings = NULL;
00233     conflicts = NULL;
00234 }

kTraversal list_all_types_recur | ( | const char * | path,
 |  | ReportWarning *& | warnings,
 |  | ReportConflict *& | conflicts
 | ) |

Traverse path and add files to the warning and conflict lists

Parameters:
path | Path to traverse
warnings | Warnings list
conflicts | Conflicts list
Returns:
Traverse command as kTraversal
Definition at line 203 of file ImportFilter.cpp.

References FileTraverse(), and kTraversal.

Referenced by CompatImportFilter().

00204 {
00205     ImportReport report(path, warnings, conflicts);
00206     return FileTraverse(path, report);
00207 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportFilterDlg.cpp File Reference

common/ImportFilterDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "ImportFilterDlg.h"
#include "AppConsole.h"

Include dependency graph for ImportFilterDlg.cpp:

Include dependency graph

Go to the source code of this file.

Enumerations

enum {
COL_STATE = 0,
COL_DESC,
COL_KIND,
COL_NUM
}
Columns enum. More...

Functions

bool | CompatImportFilter (const char *path, ReportConflict *&entries, ReportWarning *&warnings)
Get the import filter options.

Variables

char * | _gszColumnLabel [COL_NUM]
Column labels.
int | _gnColumnWidth [COL_NUM]
Column widths.

Enumeration Type Documentation

anonymous enum

Columns enum.

Enumeration values:
COL_STATE | State
COL_DESC | Description
COL_KIND | Kind
COL_NUM | Number of columns
Definition at line 65 of file ImportFilterDlg.cpp.
00066 {
00067     COL_STATE = 0,
00068     COL_DESC,
00069     COL_KIND,
00070     COL_NUM
00071 };

Function Documentation

bool CompatImportFilter | ( | const char * | path,
 |  | ReportConflict *& | entries,
 |  | ReportWarning *& | warnings
 | ) |

Get the import filter options.

Definition at line 1105 of file ImportFilterDlg.cpp.

References cvs_err(), EV_INIT_WIDGET, free_list_types(), kContinueTraversal, kTraversal, kUMainWidget, list_all_types_recur(), UCreate_ImportFilterDlg(), and UEventSendMessage().

Referenced by CvsCmdImportModule(), CImport_OPTIONS::ImportFilter(), and CImport_OPTIONS::OnImportfilter().

01106 {
01107     bool result = false;
01108
01109     bool searched = false;
01110
01111     if( !entries && !warnings )
01112     {
01113         searched = true;
01114
01115         const kTraversal traversalResult = list_all_types_recur(path, warnings, entries);
01116         if( traversalResult != kContinueTraversal )
01117         {
01118             cvs_err("Import filtering aborted on user's request.\n");
01119
01120             free_list_types(warnings, entries);
01121             entries = 0L;
01122             warnings = 0L;
01123
01124             return false;
01125         }
01126     }
01127
01128     if( entries == 0L && warnings == 0L )
01129     {
01130         cvs_err("Import filtering aborted - nothing to import.\n");
01131         return false;
01132     }
01133
01134 #ifdef WIN32
01135     CImportFilterDlg pages(entries, warnings);
01136     if( pages.DoModal() == IDOK )
01137     {
01138         result = true;
01139     }
01140     else
01141     {
01142         if( searched )
01143         {
01144             cvs_err("Import filtering aborted.\n");
01145         }
01146     }
01147 #endif /* WIN32 */
01148 #ifdef qMacCvsPP
01149     gWarnings = warnings;
01150     gEntries = entries;
01151
01152     StDialogHandler theHandler(dlg_ImpFilter, LCommander::GetTopCommander());
01153     LWindow *theDialog = theHandler.GetDialog();
01154     ThrowIfNil_(theDialog);
01155
01156     theDialog->Show();
01157     MessageT hitMessage;
01158     while (true)
01159     {       // Let DialogHandler process events
01160         hitMessage = theHandler.DoDialog();
01161
01162         if(hitMessage == item_ImpPushEdit)
01163         {
01164             // simulate dbl click
01165             LOutlineTable *tab = dynamic_cast<LOutlineTable*>
01166                 (theDialog->FindPaneByID(item_ImpFilterList));
01167
01168             STableCell  cell = tab->GetFirstSelectedCell();
01169             if(!cell.IsNullCell())
01170             {
01171                 //TableIndexT index;
01172                 //tab->CellToIndex(cell, index);
01173                 CImportItem *item = dynamic_cast<CImportItem*>(tab->FindItemForRow(cell.row));
01174                 Assert_(item != 0L);
01175                 if(item != 0L)
01176                     item->EditImportCell();
01177             }
01178         }
01179
01180         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01181             break;
01182     }
01183     theDialog->Hide();
01184
01185     if(hitMessage == msg_OK)
01186     {
01187         result = true;
01188     }
01189 #endif /* qMacCvsPP */
01190 #if qUnix
01191     void *wid = UCreate_ImportFilterDlg();
01192
01193     UCvsImpFilter *dlg = new UCvsImpFilter(entries, warnings);
01194     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01195
01196     if(dlg->DoModal())
01197     {
01198         result = true;
01199     }
01200
01201     delete dlg;
01202 #endif // qUnix
01203
01204     if( !result && searched )
01205     {
01206         free_list_types(warnings, entries);
01207         entries = 0L;
01208         warnings = 0L;
01209     }
01210
01211     return result;
01212 }

Here is the call graph for this function:

Variable Documentation

int _gnColumnWidth[COL_NUM] [static]

Initial value:

{

    80, 270, 140

}
Column widths.

Definition at line 81 of file ImportFilterDlg.cpp.

Referenced by CImportFilterDlg::OnInitDialog().

char* _gszColumnLabel[COL_NUM] [static]

Initial value:

{
    "Entry state", "Entry description", "Entry kind"
}
Column labels.

Definition at line 75 of file ImportFilterDlg.cpp.

Referenced by CImportFilterDlg::OnInitDialog().

Generated on Sat Aug 7 22:45:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportFilterDlg.h File Reference

common/ImportFilterDlg.h File Reference

#include "ImportFilter.h"
#include "HHelpSupport.h"

Include dependency graph for ImportFilterDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CImportFilterDlg
class | CImportWarning
class | CImportEntry

Defines

#define | AFX_IMPORTFILDERDLG_H__CFB7AA41_BDDB_11D1_B965_0020AF51D9DA__INCLUDED_

Functions

bool | CompatImportFilter (const char *path, ReportConflict *&entries, ReportWarning *&warnings)
Get the import filter options.

Define Documentation

#define AFX_IMPORTFILDERDLG_H__CFB7AA41_BDDB_11D1_B965_0020AF51D9DA__INCLUDED_

Definition at line 26 of file ImportFilterDlg.h.

Function Documentation

bool CompatImportFilter | ( | const char * | path,
 |  | ReportConflict *& | entries,
 |  | ReportWarning *& | warnings
 | ) |

Get the import filter options.

Definition at line 1105 of file ImportFilterDlg.cpp.

References cvs_err(), EV_INIT_WIDGET, free_list_types(), kContinueTraversal, kTraversal, kUMainWidget, list_all_types_recur(), UCreate_ImportFilterDlg(), and UEventSendMessage().

Referenced by CvsCmdImportModule(), CImport_OPTIONS::ImportFilter(), and CImport_OPTIONS::OnImportfilter().

01106 {
01107     bool result = false;
01108
01109     bool searched = false;
01110
01111     if( !entries && !warnings )
01112     {
01113         searched = true;
01114
01115         const kTraversal traversalResult = list_all_types_recur(path, warnings, entries);
01116         if( traversalResult != kContinueTraversal )
01117         {
01118             cvs_err("Import filtering aborted on user's request.\n");
01119
01120             free_list_types(warnings, entries);
01121             entries = 0L;
01122             warnings = 0L;
01123
01124             return false;
01125         }
01126     }
01127
01128     if( entries == 0L && warnings == 0L )
01129     {
01130         cvs_err("Import filtering aborted - nothing to import.\n");
01131         return false;
01132     }
01133
01134 #ifdef WIN32
01135     CImportFilterDlg pages(entries, warnings);
01136     if( pages.DoModal() == IDOK )
01137     {
01138         result = true;
01139     }
01140     else
01141     {
01142         if( searched )
01143         {
01144             cvs_err("Import filtering aborted.\n");
01145         }
01146     }
01147 #endif /* WIN32 */
01148 #ifdef qMacCvsPP
01149     gWarnings = warnings;
01150     gEntries = entries;
01151
01152     StDialogHandler theHandler(dlg_ImpFilter, LCommander::GetTopCommander());
01153     LWindow *theDialog = theHandler.GetDialog();
01154     ThrowIfNil_(theDialog);
01155
01156     theDialog->Show();
01157     MessageT hitMessage;
01158     while (true)
01159     {       // Let DialogHandler process events
01160         hitMessage = theHandler.DoDialog();
01161
01162         if(hitMessage == item_ImpPushEdit)
01163         {
01164             // simulate dbl click
01165             LOutlineTable *tab = dynamic_cast<LOutlineTable*>
01166                 (theDialog->FindPaneByID(item_ImpFilterList));
01167
01168             STableCell  cell = tab->GetFirstSelectedCell();
01169             if(!cell.IsNullCell())
01170             {
01171                 //TableIndexT index;
01172                 //tab->CellToIndex(cell, index);
01173                 CImportItem *item = dynamic_cast<CImportItem*>(tab->FindItemForRow(cell.row));
01174                 Assert_(item != 0L);
01175                 if(item != 0L)
01176                     item->EditImportCell();
01177             }
01178         }
01179
01180         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01181             break;
01182     }
01183     theDialog->Hide();
01184
01185     if(hitMessage == msg_OK)
01186     {
01187         result = true;
01188     }
01189 #endif /* qMacCvsPP */
01190 #if qUnix
01191     void *wid = UCreate_ImportFilterDlg();
01192
01193     UCvsImpFilter *dlg = new UCvsImpFilter(entries, warnings);
01194     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01195
01196     if(dlg->DoModal())
01197     {
01198         result = true;
01199     }
01200
01201     delete dlg;
01202 #endif // qUnix
01203
01204     if( !result && searched )
01205     {
01206         free_list_types(warnings, entries);
01207         entries = 0L;
01208         warnings = 0L;
01209     }
01210
01211     return result;
01212 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/InitDlg.cpp File Reference

common/InitDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "InitDlg.h"
#include "CvsPrefs.h"
#include "CvsRootDlg.h"
#include "GetPrefs.h"
#include "PromptFiles.h"

Include dependency graph for InitDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetInit (bool &forceCvsroot, UStr &cvsroot)
Get the init options.

Function Documentation

bool CompatGetInit | ( | bool & | forceCvsroot,
 |  | UStr & | cvsroot
 | ) |

Get the init options.

Definition at line 146 of file InitDlg.cpp.

References CStr, gCvsPrefs, CInit_MAIN::m_cvsroot, CInit_MAIN::m_forceRoot, CvsPrefs::save(), and CGetPrefs_GLOBALS::StoreValues().

00147 {
00148     bool userHitOK = false;
00149
00150     static bool lastForceCvsroot = true;
00151     static CStr sLastCvsroot("");
00152
00153 #ifdef WIN32
00154     CHHelpPropertySheet pages("Init settings");
00155     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00156
00157     CInit_MAIN page1(lastForceCvsroot, sLastCvsroot);
00158     CGetPrefs_GLOBALS page2;
00159
00160     pages.AddPage(&page1);
00161     pages.AddPage(&page2);
00162
00163     if(pages.DoModal() == IDOK)
00164     {
00165         lastForceCvsroot = page1.m_forceRoot == TRUE;
00166         sLastCvsroot = page1.m_cvsroot;
00167
00168         page2.StoreValues();
00169
00170         userHitOK = true;
00171     }
00172 #endif /* WIN32 */
00173
00174     if( userHitOK )
00175     {
00176         forceCvsroot = lastForceCvsroot;
00177         cvsroot = sLastCvsroot;
00178
00179         gCvsPrefs.save();
00180     }
00181
00182     return userHitOK;
00183 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/InitDlg.h File Reference

common/InitDlg.h File Reference

#include "HHelpSupport.h"

Include dependency graph for InitDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CInit_MAIN

Defines

#define | AFX_INITDLG_H__155D02C3_2323_11D3_B1A6_004095463819__INCLUDED_

Functions

bool | CompatGetInit (bool &forceCvsroot, CStr &cvsroot)

Define Documentation

#define AFX_INITDLG_H__155D02C3_2323_11D3_B1A6_004095463819__INCLUDED_

Definition at line 26 of file InitDlg.h.

Function Documentation

bool CompatGetInit | ( | bool & | forceCvsroot,
 |  | CStr & | cvsroot
 | ) |

Referenced by CvsCmdInit().

Generated on Sat Aug 7 22:45:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ItemListDlg.cpp File Reference

common/ItemListDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvsView.h"
#include "wincvs_winutil.h"
#include "MultiString.h"
#include "ItemListDlg.h"
#include "CvsCommands.h"
#include "CvsArgs.h"
#include "cvsgui_process.h"
#include "AppConsole.h"
#include "CvsEntries.h"
#include "SelectionDetailsDlg.h"
#include "CvsAlert.h"
#include "CvsRootDlg.h"

Include dependency graph for ItemListDlg.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | STR_ITEMLIST_DIR "<Dir>"
#define | STR_ITEMLIST_UP_DIR ".."
#define | STR_ITEMLIST_BRANCH "Branch"
#define | STR_ITEMLIST_REVISION "Revision"

Functions

string | FormatItemDescription (const ItemDescription &itemDesc)
string | FormatListPath (const ListPath &listPath, const char pathDelimiter= '/')
CItemListConsole * | LaunchItemListCommand (kItemListDlg type, bool option, const char *readFrom, bool forceCvsroot, const char *cvsroot, const char *revision, const char *date, const ListPath *listPath=NULL)
bool | CompatGetTagListItem (const MultiFiles *mf, UStr &tagName)
Get Tag item list.
bool | CompatGetModuleListItem (const MultiFiles *mf, UStr &moduleName)
Get Module item list.

Variables

CPersistentBool | gItemListTagRecurse ("P_ItemListTagRecurse", false)
Persistent recurse setting for tag/branch browse.
CPersistentBool | gItemListModuleList ("P_ItemListModuleList", false, kAddSettings)
Persistent list setting for module/directory-file browse.
CPersistentInt | gItemListAutoRefreshTag ("P_ItemListAutoRefreshTag", kAutoRefreshFirstTime)
Persistent auto refresh setting for tag/branch browse.
CPersistentInt | gItemListAutoRefreshModule ("P_ItemListAutoRefreshModule", kAutoRefreshFirstTime)
Persistent auto refresh setting for module/directory-file browse.

Define Documentation

#define STR_ITEMLIST_BRANCH "Branch"

Definition at line 73 of file ItemListDlg.cpp.

Referenced by CItemListDlg::GetImageForItem(), and CTagParserConsole::Parse().

#define STR_ITEMLIST_DIR "<Dir>"

Definition at line 71 of file ItemListDlg.cpp.

Referenced by CItemListDlg::CompareItems(), CItemListDlg::DisplayItems(), CItemListDlg::GetImageForItem(), CItemListDlg::OnDblclkItemlist(), and CListParserConsole::Parse().

#define STR_ITEMLIST_REVISION "Revision"

Definition at line 74 of file ItemListDlg.cpp.

Referenced by CItemListDlg::GetImageForItem(), and CTagParserConsole::Parse().

#define STR_ITEMLIST_UP_DIR ".."

Definition at line 72 of file ItemListDlg.cpp.

Referenced by CItemListDlg::CompareItems(), CItemListDlg::DisplayItems(), CItemListDlg::GetImageForItem(), CItemListDlg::OnDblclkItemlist(), and CItemListDlg::OnItemchangedItemlist().

Function Documentation

bool CompatGetModuleListItem | ( | const MultiFiles * | mf,
 |  | UStr & | moduleName
 | ) |

Get Module item list.

Definition at line 3445 of file ItemListDlg.cpp.

References CStr, EV_INIT_WIDGET, ItemList, kItemListModule, kUMainWidget, ListPath, CItemListDlg::m_cvsroot, CItemListDlg::m_date, CItemListDlg::m_forceRoot, CItemListDlg::m_item, CItemListDlg::m_listPath, CItemListDlg::m_rev, NULL, UCreate_SelTagBranchDlg(), and UEventSendMessage().

Referenced by CMultilineEntryDlg::ActionBrowseModule(), CCheckout_MAIN::OnBrowseModules(), CImport_MAIN::OnBrowseModules(), CRtag_MAIN::OnBrowseModules(), and CItemListDlg::OnBrowseReadfrom().

03447 {
03448     bool userHitOK = false;
03449
03450     static CStr sLastModule;
03451     static ItemList sLastModuleList;
03452     static ListPath sLastListPath;
03453     static bool lastForceCvsroot = false;
03454     static CStr sLastCvsroot("");
03455     static CStr sLastRev;
03456     static CStr sLastDate;
03457
03458 #ifdef WIN32
03459     CItemListDlg itemListDlg(mf,
03460         sLastModule, kItemListModule, sLastModuleList, &sLastListPath,
03461         lastForceCvsroot, sLastCvsroot,
03462         sLastRev, sLastDate);
03463
03464     if( itemListDlg.DoModal() == IDOK )
03465     {
03466         sLastModule = itemListDlg.m_item;
03467         sLastListPath = itemListDlg.m_listPath;
03468         sLastRev = itemListDlg.m_rev;
03469         sLastDate = itemListDlg.m_date;
03470         lastForceCvsroot = itemListDlg.m_forceRoot != 0;
03471         sLastCvsroot = itemListDlg.m_cvsroot;
03472
03473         userHitOK = true;
03474     }
03475 #endif /* WIN32 */
03476
03477 #if qUnix
03478     void *wid = NULL;
03479 #   if qGTK
03480     wid = UCreate_SelTagBranchDlg();
03481 #   endif
03482
03483     UCvsItemListDlg *dlg = new UCvsItemListDlg(mf,
03484         sLastModule, kItemListModule, sLastModuleList, &sLastListPath,
03485         lastForceCvsroot, sLastRev, sLastDate);
03486     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
03487     if(dlg->DoModal())
03488     {
03489         sLastModule = dlg->m_item;
03490         sLastListPath = dlg->m_listPath;
03491         sLastRev = dlg->m_rev;
03492         sLastDate = dlg->m_date;
03493         lastForceCvsroot = dlg->m_forceCvsroot;
03494
03495         userHitOK = true;
03496     }
03497     delete dlg;
03498
03499 #endif // qUnix
03500
03501 #ifdef qMacCvsPP
03502     StDialogHandler theHandler(dlg_Select, LCommander::GetTopCommander());
03503     LWindow *theDialog = theHandler.GetDialog();
03504     ThrowIfNil_(theDialog);
03505
03506     theDialog->Show();
03507     theDialog->SetDescriptor(LStr255("Select module"));
03508
03509     DoDataExchange_Select(theDialog, kItemListModule, sLastModule, lastForceCvsroot, mf, true);
03510
03511     MessageT hitMessage;
03512     while (true)
03513     {       // Let DialogHandler process events
03514         hitMessage = theHandler.DoDialog();
03515
03516         if(hitMessage == 'ENDO')
03517             hitMessage = msg_OK;
03518
03519         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
03520             break;
03521
03522         if(hitMessage == item_Refresh)
03523         {
03524             OnRefresh_Select(theDialog, kItemListModule);
03525         }
03526     }
03527     theDialog->Hide();
03528
03529     if(hitMessage == msg_OK)
03530     {
03531         DoDataExchange_Select(theDialog, kItemListModule, sLastModule, lastForceCvsroot, mf, false);
03532
03533         userHitOK = true;
03534     }
03535 #endif /* qMacCvsPP */
03536
03537     if( userHitOK )
03538     {
03539         moduleName = sLastModule;
03540     }
03541
03542     return userHitOK;
03543 }

Here is the call graph for this function:

bool CompatGetTagListItem | ( | const MultiFiles * | mf,
 |  | UStr & | tagName
 | ) |

Get Tag item list.

Definition at line 3348 of file ItemListDlg.cpp.

References CStr, EV_INIT_WIDGET, ItemList, kItemListTag, kUMainWidget, CItemListDlg::m_date, CItemListDlg::m_forceRoot, CItemListDlg::m_item, CItemListDlg::m_rev, NULL, UCreate_SelTagBranchDlg(), and UEventSendMessage().

Referenced by CMultilineEntryDlg::ActionBrowseTag(), CImport_OPTIONS::OnBrowseBranchid(), CAnnotate_MAIN::OnBrowseTag(), CCommit_OPTIONS::OnBrowseTag(), CItemListDlg::OnBrowseTag(), CLogFilters::OnBrowseTag(), CRtag_MAIN::OnBrowseTag(), CRtag_OPTIONS::OnBrowseTag(), CTag_MAIN::OnBrowseTag(), CUpdateOptions::OnBrowseTag(), CDiff_MAIN::OnBrowseTag1(), CImport_MAIN::OnBrowseTag1(), CUpdateMerge::OnBrowseTag1(), CDiff_MAIN::OnBrowseTag2(), CImport_MAIN::OnBrowseTag2(), and CUpdateMerge::OnBrowseTag2().

03350 {
03351     bool userHitOK = false;
03352
03353     static CStr sLastTag;
03354     static ItemList sTagList;
03355     static bool lastForceCvsroot = false;
03356     static CStr sLastCvsroot("");
03357     static CStr sLastRev;
03358     static CStr sLastDate;
03359
03360 #ifdef WIN32
03361     CItemListDlg itemListDlg(mf,
03362         sLastTag, kItemListTag, sTagList, NULL,
03363         lastForceCvsroot, sLastCvsroot,
03364         sLastRev, sLastDate);
03365
03366     if( itemListDlg.DoModal() == IDOK )
03367     {
03368         sLastTag = itemListDlg.m_item;
03369         sLastRev = itemListDlg.m_rev;
03370         sLastDate = itemListDlg.m_date;
03371         lastForceCvsroot = itemListDlg.m_forceRoot != 0;
03372
03373         userHitOK = true;
03374     }
03375 #endif /* WIN32 */
03376
03377 #if qUnix
03378     void *wid;
03379 #   if qGTK
03380     wid = UCreate_SelTagBranchDlg();
03381 #   endif
03382
03383     UCvsItemListDlg *dlg = new UCvsItemListDlg(mf,
03384         sLastTag, kItemListTag, sTagList, NULL,
03385         lastForceCvsroot, sLastRev, sLastDate);
03386     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
03387     if(dlg->DoModal())
03388     {
03389         sLastTag = dlg->m_item;
03390         sLastRev = dlg->m_rev;
03391         sLastDate = dlg->m_date;
03392         lastForceCvsroot = dlg->m_forceCvsroot;
03393
03394         userHitOK = true;
03395     }
03396     delete dlg;
03397
03398 #endif // qUnix
03399
03400 #ifdef qMacCvsPP
03401     StDialogHandler theHandler(dlg_Select, LCommander::GetTopCommander());
03402     LWindow *theDialog = theHandler.GetDialog();
03403     ThrowIfNil_(theDialog);
03404
03405     theDialog->Show();
03406     theDialog->SetDescriptor(LStr255("Select tag/branch"));
03407
03408     DoDataExchange_Select(theDialog, kItemListTag, sLastTag, lastForceCvsroot, mf, true);
03409
03410     MessageT hitMessage;
03411     while (true)
03412     {       // Let DialogHandler process events
03413         hitMessage = theHandler.DoDialog();
03414
03415         if(hitMessage == 'ENDO')
03416             hitMessage = msg_OK;
03417
03418         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
03419             break;
03420
03421         if(hitMessage == item_Refresh)
03422         {
03423             OnRefresh_Select(theDialog, kItemListTag);
03424         }
03425     }
03426     theDialog->Hide();
03427
03428     if(hitMessage == msg_OK)
03429     {
03430         DoDataExchange_Select(theDialog, kItemListTag, sLastTag, lastForceCvsroot, mf, false);
03431
03432         userHitOK = true;
03433     }
03434 #endif /* qMacCvsPP */
03435
03436     if( userHitOK )
03437     {
03438         tagName = sLastTag;
03439     }
03440
03441     return userHitOK;
03442 }

Here is the call graph for this function:

string FormatItemDescription ( const ItemDescription & itemDesc ) [static]

Format an item's description string given a collection of descriptions

Parameters:
itemDesc collection of descriptions
Returns:
Formatted item's description string
Definition at line 498 of file ItemListDlg.cpp.

References ItemDescription.

Referenced by ItemDisplayInfo::Create().

00499 {
00500     string strRes;
00501
00502     for(ItemDescription::const_iterator it = itemDesc.begin(); it != itemDesc.end(); it++)
00503     {
00504         if( !strRes.empty() )
00505         {
00506             strRes += ", ";
00507         }
00508
00509         strRes += (*it).c_str();
00510     }
00511
00512     return strRes;
00513 }

string FormatListPath | ( | const ListPath & | listPath,
 |  | const char | pathDelimiter = '/'
 | ) | [static]

Build the path string given a list of items

Parameters:
listPath | List of items to be in the path
pathDelimiter | Optional path delimiter to be used
Returns:
The formatted path as string
Note:
Path ends with path delimiter
Definition at line 522 of file ItemListDlg.cpp.

References ListPath.

Referenced by LaunchItemListCommand(), and CItemListDlg::OnItemchangedItemlist().

00523 {
00524     string strRes;
00525
00526     for(ListPath::const_iterator it = listPath.begin(); it != listPath.end(); it++ )
00527     {
00528         strRes += (*it).c_str();
00529         strRes += pathDelimiter;
00530     }
00531
00532     return strRes;
00533 }

CItemListConsole* LaunchItemListCommand | ( | kItemListDlg | type,
 |  | bool | option,
 |  | const char * | readFrom,
 |  | bool | forceCvsroot,
 |  | const char * | cvsroot,
 |  | const char * | revision,
 |  | const char * | date,
 |  | const ListPath * | listPath = NULL
 | ) | [static]

Launch and parse CVS command appropriate to the type and parameters

Parameters:
type | List dialog type
option | Option
readFrom | Location to read from
forceCvsroot | true to force using CVSROOT settings, false otherwise
cvsroot | CVSROOT
revision | Revision
date | Date
listPath | Path as a list
Returns:
The pointer to item list console
Note:
You have to free the memory allocated for the item list console
Definition at line 548 of file ItemListDlg.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), MultiFiles::begin(), CStr, FormatListPath(), kItemListModule, kItemListTag, launchCVS(), ListPath, MultiFiles::newdir(), MultiFiles::newfile(), NULL, CItemListConsole::Parse(), CvsArgs::print(), and SplitPath().

Referenced by CItemListDlg::OnRefresh().

00553 {
00554     CItemListConsole* itemListConsole = NULL;
00555
00556     CvsArgs args;
00557     MultiFiles mf;
00558
00559     if( forceCvsroot )
00560     {
00561 #if INTERNAL_AUTHEN
00562         args.addcvsroot();
00563 #else
00564         args.add("-d");
00565         args.add(cvsroot);
00566 #endif /* INTERNAL_AUTHEN */
00567     }
00568
00569     switch( type )
00570     {
00571     case kItemListTag:
00572         itemListConsole = new CTagParserConsole;
00573
00574         args.add(forceCvsroot ? "rlog" : "log");
00575         args.add("-h");
00576
00577         if( !option )
00578         {
00579             args.add("-l");
00580         }
00581
00582         if( strlen(revision) )
00583         {
00584             string strRevision;
00585
00586             strRevision += "-r";
00587             strRevision += revision;
00588
00589             args.add(strRevision.c_str());
00590         }
00591
00592         if( strlen(date) )
00593         {
00594             args.add("-d");
00595             args.add(date);
00596         }
00597
00598         {
00599             CStr uppath, file;
00600             SplitPath(readFrom, uppath, file, true);
00601
00602             mf.newdir(uppath);
00603
00604             if( !file.empty() )
00605             {
00606                 mf.newfile(file);
00607             }
00608         }
00609         break;
00610     case kItemListModule:
00611         if( option )
00612         {
00613             itemListConsole = new CListParserConsole;
00614
00615             args.add("ls");
00616             args.add("-e");
00617
00618             if( strlen(revision) )
00619             {
00620                 args.add("-r");
00621                 args.add(revision);
00622             }
00623
00624             if( strlen(date) )
00625             {
00626                 args.add("-D");
00627                 args.add(date);
00628             }
00629
00630             if( listPath )
00631             {
00632                 string strListPath = FormatListPath(*listPath);
00633                 if( !strListPath.empty() )
00634                 {
00635                     args.add(strListPath.c_str());
00636                 }
00637                 else
00638                 {
00639                     args.add("/");
00640                 }
00641             }
00642             else
00643             {
00644                 args.add("/");
00645             }
00646         }
00647         else
00648         {
00649             itemListConsole = new CModuleParserConsole;
00650
00651             args.add("checkout");
00652             args.add("-c");
00653         }
00654
00655         mf.newdir(readFrom);
00656         break;
00657     default:
00658 #ifdef WIN32
00659         ASSERT(FALSE);  // unknown option
00660 #endif
00661         break;
00662     }
00663
00664     if( itemListConsole )
00665     {
00666         const char* dir = (*mf.begin()).add(args);
00667
00668         args.print(dir);
00669         const int launchRes = launchCVS(dir, args.Argc(), args.Argv(), itemListConsole);
00670         itemListConsole->Parse(launchRes);
00671     }
00672
00673     return itemListConsole;
00674 }

Here is the call graph for this function:

Variable Documentation

CPersistentInt gItemListAutoRefreshModule("P_ItemListAutoRefreshModule", kAutoRefreshFirstTime)

Persistent auto refresh setting for module/directory-file browse.

Referenced by CItemListDlg::OnInitDialog(), and CItemListDlg::OnSelchangeAutoRefresh().

CPersistentInt gItemListAutoRefreshTag("P_ItemListAutoRefreshTag", kAutoRefreshFirstTime)

Persistent auto refresh setting for tag/branch browse.

Referenced by CItemListDlg::OnInitDialog(), and CItemListDlg::OnSelchangeAutoRefresh().

CPersistentBool gItemListModuleList("P_ItemListModuleList", false, kAddSettings)

Persistent list setting for module/directory-file browse.

Referenced by CItemListDlg::CItemListDlg(), CItemListDlg::InitOptionCtrls(), and CItemListDlg::OnOK().

CPersistentBool gItemListTagRecurse("P_ItemListTagRecurse", false)

Persistent recurse setting for tag/branch browse.

Referenced by CItemListDlg::CItemListDlg(), CItemListDlg::InitOptionCtrls(), and CItemListDlg::OnOK().

Generated on Sat Aug 7 22:45:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ItemListDlg.h File Reference

common/ItemListDlg.h File Reference

#include "MultiFiles.h"
#include "AppGlue.h"
#include "SmartComboBox.h"
#include "SortHeaderCtrl.h"
#include "HHelpSupport.h"
#include <string>
#include <sstream>
#include <set>
#include <list>
#include <map>
#include <algorithm>

Include dependency graph for ItemListDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | ItemRowInfo
Structure to hold item's row information. More...
class | CItemListConsole
Base class for item list console. More...
class | CTagParserConsole
Class to parse tags/branches (obtained using cvs log or cvs rlog). More...
class | CModuleParserConsole
Class to parse modules (obtained using cvs co -c). More...
class | CListParserConsole
Class to parse directories/files (obtained using cvs ls). More...
class | ItemDisplayInfo
Class to hold and support data display (e.g. sorting or storing the result for next display). More...
class | CItemListDlg
struct | CItemListDlg::CompareInfo
Structure to hold the sorting settings. More...

Defines

#define | AFX_ITEMLISTDLG_H__E6D16D27_1A84_4E8A_A926_3B76728E0F73__INCLUDED_

Typedefs

typedef std::set< string > | ItemDescription
Item's description container.
typedef std::map< string,
ItemRowInfo > 		ItemList
Item's rows container.
typedef std::list< string > | ListPath
Path to the list location.

Enumerations

enum kItemListDlg {
kItemListTag,
kItemListModule
}
Enum types of list dialog. More...
enum kItemListAutoRefreshType {
kAutoRefreshDisable,
kAutoRefreshFirstTime,
kAutoRefreshAlways
}
Enum types of item list auto refresh. More...
enum kItemDisplayType {
kItemDisplayWait,
kItemDisplayData,
kItemDisplayInfo
}
Display type enum. More...

Functions

bool | CompatGetTagListItem (const MultiFiles *mf, UStr &tagName)
Get Tag item list.
bool | CompatGetModuleListItem (const MultiFiles *mf, UStr &moduleName)
Get Module item list.

Variables

CMString gRevNames
CMString gDateNames

Define Documentation

#define AFX_ITEMLISTDLG_H__E6D16D27_1A84_4E8A_A926_3B76728E0F73__INCLUDED_

Definition at line 22 of file ItemListDlg.h.

Typedef Documentation

typedef std::set<string> ItemDescription

Item's description container.

Definition at line 71 of file ItemListDlg.h.

Referenced by FormatItemDescription().

typedef std::map<string, ItemRowInfo> ItemList

Item's rows container.

Definition at line 81 of file ItemListDlg.h.

Referenced by CItemListDlg::CItemListDlg(), CompatGetModuleListItem(), CompatGetTagListItem(), CItemListDlg::DisplayItems(), and CItemListConsole::GetItemList().

typedef std::list<string> ListPath

Path to the list location.

Definition at line 84 of file ItemListDlg.h.

Referenced by CItemListDlg::CItemListDlg(), CompatGetModuleListItem(), FormatListPath(), and LaunchItemListCommand().

Enumeration Type Documentation

enum kItemDisplayType

Display type enum.

Enumeration values:
kItemDisplayWait | Display the wait prompt while retrieving the data
kItemDisplayData | Display the data
kItemDisplayInfo | Display the information
Definition at line 160 of file ItemListDlg.h.
00161 {
00162     kItemDisplayWait,
00163     kItemDisplayData,
00164     kItemDisplayInfo
00165 } kItemDisplayType;

enum kItemListAutoRefreshType

Enum types of item list auto refresh.

Enumeration values:
kAutoRefreshDisable | Disable auto refresh
kAutoRefreshFirstTime | First time dialog opens refresh only
kAutoRefreshAlways | Always refresh
Definition at line 63 of file ItemListDlg.h.

Referenced by CItemListDlg::OnInitDialog().

00064 {
00065     kAutoRefreshDisable,
00066     kAutoRefreshFirstTime,
00067     kAutoRefreshAlways
00068 } kItemListAutoRefreshType;

enum kItemListDlg

Enum types of list dialog.

Enumeration values:
kItemListTag | List branches/tags
kItemListModule | List modules/directories & files
Definition at line 56 of file ItemListDlg.h.
00057 {
00058     kItemListTag,
00059     kItemListModule
00060 } kItemListDlg;

Function Documentation

bool CompatGetModuleListItem | ( | const MultiFiles * | mf,
 |  | UStr & | moduleName
 | ) |

Get Module item list.

Definition at line 3445 of file ItemListDlg.cpp.

References CStr, EV_INIT_WIDGET, ItemList, kItemListModule, kUMainWidget, ListPath, CItemListDlg::m_cvsroot, CItemListDlg::m_date, CItemListDlg::m_forceRoot, CItemListDlg::m_item, CItemListDlg::m_listPath, CItemListDlg::m_rev, NULL, UCreate_SelTagBranchDlg(), and UEventSendMessage().

Referenced by CMultilineEntryDlg::ActionBrowseModule(), CRtag_MAIN::OnBrowseModules(), CImport_MAIN::OnBrowseModules(), CCheckout_MAIN::OnBrowseModules(), and CItemListDlg::OnBrowseReadfrom().

03447 {
03448     bool userHitOK = false;
03449
03450     static CStr sLastModule;
03451     static ItemList sLastModuleList;
03452     static ListPath sLastListPath;
03453     static bool lastForceCvsroot = false;
03454     static CStr sLastCvsroot("");
03455     static CStr sLastRev;
03456     static CStr sLastDate;
03457
03458 #ifdef WIN32
03459     CItemListDlg itemListDlg(mf,
03460         sLastModule, kItemListModule, sLastModuleList, &sLastListPath,
03461         lastForceCvsroot, sLastCvsroot,
03462         sLastRev, sLastDate);
03463
03464     if( itemListDlg.DoModal() == IDOK )
03465     {
03466         sLastModule = itemListDlg.m_item;
03467         sLastListPath = itemListDlg.m_listPath;
03468         sLastRev = itemListDlg.m_rev;
03469         sLastDate = itemListDlg.m_date;
03470         lastForceCvsroot = itemListDlg.m_forceRoot != 0;
03471         sLastCvsroot = itemListDlg.m_cvsroot;
03472
03473         userHitOK = true;
03474     }
03475 #endif /* WIN32 */
03476
03477 #if qUnix
03478     void *wid = NULL;
03479 #   if qGTK
03480     wid = UCreate_SelTagBranchDlg();
03481 #   endif
03482
03483     UCvsItemListDlg *dlg = new UCvsItemListDlg(mf,
03484         sLastModule, kItemListModule, sLastModuleList, &sLastListPath,
03485         lastForceCvsroot, sLastRev, sLastDate);
03486     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
03487     if(dlg->DoModal())
03488     {
03489         sLastModule = dlg->m_item;
03490         sLastListPath = dlg->m_listPath;
03491         sLastRev = dlg->m_rev;
03492         sLastDate = dlg->m_date;
03493         lastForceCvsroot = dlg->m_forceCvsroot;
03494
03495         userHitOK = true;
03496     }
03497     delete dlg;
03498
03499 #endif // qUnix
03500
03501 #ifdef qMacCvsPP
03502     StDialogHandler theHandler(dlg_Select, LCommander::GetTopCommander());
03503     LWindow *theDialog = theHandler.GetDialog();
03504     ThrowIfNil_(theDialog);
03505
03506     theDialog->Show();
03507     theDialog->SetDescriptor(LStr255("Select module"));
03508
03509     DoDataExchange_Select(theDialog, kItemListModule, sLastModule, lastForceCvsroot, mf, true);
03510
03511     MessageT hitMessage;
03512     while (true)
03513     {       // Let DialogHandler process events
03514         hitMessage = theHandler.DoDialog();
03515
03516         if(hitMessage == 'ENDO')
03517             hitMessage = msg_OK;
03518
03519         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
03520             break;
03521
03522         if(hitMessage == item_Refresh)
03523         {
03524             OnRefresh_Select(theDialog, kItemListModule);
03525         }
03526     }
03527     theDialog->Hide();
03528
03529     if(hitMessage == msg_OK)
03530     {
03531         DoDataExchange_Select(theDialog, kItemListModule, sLastModule, lastForceCvsroot, mf, false);
03532
03533         userHitOK = true;
03534     }
03535 #endif /* qMacCvsPP */
03536
03537     if( userHitOK )
03538     {
03539         moduleName = sLastModule;
03540     }
03541
03542     return userHitOK;
03543 }

Here is the call graph for this function:

bool CompatGetTagListItem | ( | const MultiFiles * | mf,
 |  | UStr & | tagName
 | ) |

Get Tag item list.

Definition at line 3348 of file ItemListDlg.cpp.

References CStr, EV_INIT_WIDGET, ItemList, kItemListTag, kUMainWidget, CItemListDlg::m_date, CItemListDlg::m_forceRoot, CItemListDlg::m_item, CItemListDlg::m_rev, NULL, UCreate_SelTagBranchDlg(), and UEventSendMessage().

Referenced by CMultilineEntryDlg::ActionBrowseTag(), CImport_OPTIONS::OnBrowseBranchid(), CUpdateOptions::OnBrowseTag(), CTag_MAIN::OnBrowseTag(), CRtag_OPTIONS::OnBrowseTag(), CRtag_MAIN::OnBrowseTag(), CLogFilters::OnBrowseTag(), CItemListDlg::OnBrowseTag(), CCommit_OPTIONS::OnBrowseTag(), CAnnotate_MAIN::OnBrowseTag(), CUpdateMerge::OnBrowseTag1(), CImport_MAIN::OnBrowseTag1(), CDiff_MAIN::OnBrowseTag1(), CUpdateMerge::OnBrowseTag2(), CImport_MAIN::OnBrowseTag2(), and CDiff_MAIN::OnBrowseTag2().

03350 {
03351     bool userHitOK = false;
03352
03353     static CStr sLastTag;
03354     static ItemList sTagList;
03355     static bool lastForceCvsroot = false;
03356     static CStr sLastCvsroot("");
03357     static CStr sLastRev;
03358     static CStr sLastDate;
03359
03360 #ifdef WIN32
03361     CItemListDlg itemListDlg(mf,
03362         sLastTag, kItemListTag, sTagList, NULL,
03363         lastForceCvsroot, sLastCvsroot,
03364         sLastRev, sLastDate);
03365
03366     if( itemListDlg.DoModal() == IDOK )
03367     {
03368         sLastTag = itemListDlg.m_item;
03369         sLastRev = itemListDlg.m_rev;
03370         sLastDate = itemListDlg.m_date;
03371         lastForceCvsroot = itemListDlg.m_forceRoot != 0;
03372
03373         userHitOK = true;
03374     }
03375 #endif /* WIN32 */
03376
03377 #if qUnix
03378     void *wid;
03379 #   if qGTK
03380     wid = UCreate_SelTagBranchDlg();
03381 #   endif
03382
03383     UCvsItemListDlg *dlg = new UCvsItemListDlg(mf,
03384         sLastTag, kItemListTag, sTagList, NULL,
03385         lastForceCvsroot, sLastRev, sLastDate);
03386     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
03387     if(dlg->DoModal())
03388     {
03389         sLastTag = dlg->m_item;
03390         sLastRev = dlg->m_rev;
03391         sLastDate = dlg->m_date;
03392         lastForceCvsroot = dlg->m_forceCvsroot;
03393
03394         userHitOK = true;
03395     }
03396     delete dlg;
03397
03398 #endif // qUnix
03399
03400 #ifdef qMacCvsPP
03401     StDialogHandler theHandler(dlg_Select, LCommander::GetTopCommander());
03402     LWindow *theDialog = theHandler.GetDialog();
03403     ThrowIfNil_(theDialog);
03404
03405     theDialog->Show();
03406     theDialog->SetDescriptor(LStr255("Select tag/branch"));
03407
03408     DoDataExchange_Select(theDialog, kItemListTag, sLastTag, lastForceCvsroot, mf, true);
03409
03410     MessageT hitMessage;
03411     while (true)
03412     {       // Let DialogHandler process events
03413         hitMessage = theHandler.DoDialog();
03414
03415         if(hitMessage == 'ENDO')
03416             hitMessage = msg_OK;
03417
03418         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
03419             break;
03420
03421         if(hitMessage == item_Refresh)
03422         {
03423             OnRefresh_Select(theDialog, kItemListTag);
03424         }
03425     }
03426     theDialog->Hide();
03427
03428     if(hitMessage == msg_OK)
03429     {
03430         DoDataExchange_Select(theDialog, kItemListTag, sLastTag, lastForceCvsroot, mf, false);
03431
03432         userHitOK = true;
03433     }
03434 #endif /* qMacCvsPP */
03435
03436     if( userHitOK )
03437     {
03438         tagName = sLastTag;
03439     }
03440
03441     return userHitOK;
03442 }

Here is the call graph for this function:

Variable Documentation

CMString gDateNames

CMString gRevNames

Generated on Sat Aug 7 22:45:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/KeywordComboBox.cpp File Reference

common/KeywordComboBox.cpp File Reference

#include "stdafx.h"
#include "KeywordComboBox.h"

Include dependency graph for KeywordComboBox.cpp:

Include dependency graph

Go to the source code of this file.

Classes

struct | keywordMode
Structure to hold the keyword modes and their descriptions. More...

Defines

#define | KEYWORD_MODE_COUNT 8

Variables

keywordMode | gKeywordModes [8]
Global array to hold all substitution modes and descriptions.

Define Documentation

#define KEYWORD_MODE_COUNT 8

Definition at line 40 of file KeywordComboBox.cpp.

Referenced by CKeywordComboBox::PreSubclassWindow().

Variable Documentation

struct keywordMode gKeywordModes[8] [static]

Initial value:

 {
    {"",        "Current"},
    {"-kkv",    "Default"},
    {"-kkvl",   "Default with locker's name"},
    {"-kk",     "Only keyword names"},
    {"-ko",     "Disable"},
    {"-kb",     "Binary"},
    {"-ku",     "Unicode"},
    {"-kv",     "Only keyword values"}
}
Global array to hold all substitution modes and descriptions.

Definition at line 43 of file KeywordComboBox.cpp.

Referenced by CKeywordComboBox::PreSubclassWindow(), and CKeywordComboBox::SetDescription().

Generated on Sat Aug 7 22:45:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/KeywordComboBox.h File Reference

common/KeywordComboBox.h File Reference

#include "SmartComboBox.h"

Include dependency graph for KeywordComboBox.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CKeywordComboBox

Defines

#define | AFX_KEYWORDCOMBOBOX_H__F5D656E1_FD93_49A0_A27B_231957D4AAC5__INCLUDED_

Define Documentation

#define AFX_KEYWORDCOMBOBOX_H__F5D656E1_FD93_49A0_A27B_231957D4AAC5__INCLUDED_

Definition at line 22 of file KeywordComboBox.h.

Generated on Sat Aug 7 22:45:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LaunchHandlers.cpp File Reference

common/LaunchHandlers.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "LaunchHandlers.h"
#include "CvsPrefs.h"
#include "AppConsole.h"
#include "CvsCommands.h"
#include "cvsgui_i18n.h"
#include "CvsArgs.h"

Include dependency graph for LaunchHandlers.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | SHELLACTION_SUCCEEDED(shellActionResult) (shellActionResult >= 32)
Generic check of shell action success.

Enumerations

enum kShellActionType {
kShellActionDefault,
kShellActionOpen,
kShellActionEdit,
kShellActionOpenAs,
kShellActionExplore,
kShellActionProperties
}
Shell Action type enum. More...

Functions

const char * | GetLaunchTypeName (const kLaunchType launchType, const bool shortName)
UINT | ShellAction (const kShellActionType actionType, const char *filePath, const char *args=0L, const char *workdir=0L)
bool | LaunchDiff (const char *f1, const char *f2, const char *diffTool, bool unifiedDiff, bool noWhiteSpace, bool noBlankLines, bool ignoreCase)
bool | LaunchHandler (const kLaunchType launchType, const char *filePath)
bool | LaunchViewer (const char *filePath, bool useOpenAs)
bool | LaunchEditor (const char *filePath, bool useDefault)
bool | LaunchDefaultEditor (const char *filePath, void *par)
void | LaunchExplore (const char *path)
void | LaunchNewInst (const char *path)
void | LaunchProperties (const char *path)

Define Documentation

#define SHELLACTION_SUCCEEDED ( shellActionResult ) (shellActionResult >= 32)

Generic check of shell action success.

Definition at line 58 of file LaunchHandlers.cpp.

Referenced by LaunchDiff(), LaunchEditor(), LaunchExplore(), LaunchHandler(), LaunchNewInst(), LaunchProperties(), and LaunchViewer().

Enumeration Type Documentation

enum kShellActionType

Shell Action type enum.

Enumeration values:
kShellActionDefault | Execute OS default action for object
kShellActionOpen | Open object in OS-associated handler application (or execute object itself if it is executable)
kShellActionEdit | Open object in OS-associated editor application
kShellActionOpenAs | Open OS handler selection dialog and open object with selected application
kShellActionExplore | Open folder object in OS file system browser
kShellActionProperties | Open OS file properties dialog
Definition at line 61 of file LaunchHandlers.cpp.
00061             {
00062     kShellActionDefault,
00063     kShellActionOpen,
00064     kShellActionEdit,
00065     kShellActionOpenAs,
00066     kShellActionExplore,
00067     kShellActionProperties
00068 }kShellActionType;

Function Documentation

const char* GetLaunchTypeName | ( | const kLaunchType | launchType,
 |  | const bool | shortName
 | ) |

Get the launch type name

Parameters:
launchType | Launch type
shortName | true to retrieve the short name, false to get the long name
Returns:
The launch type name
Definition at line 76 of file LaunchHandlers.cpp.

References _i18n, kLaunchDefault, kLaunchDefaultEdit, kLaunchEdit, kLaunchOpen, and kLaunchOpenAs.

Referenced by CFileAction_MAIN::OnInitDialog(), CFileAction_MAIN::OnSelchangeAction(), and TLaunchHandler< lauchType >::TLaunchHandler().

00077 {
00078     const char* res = "";
00079
00080     switch( launchType )
00081     {
00082     case kLaunchEdit:
00083         res = shortName ? _i18n("Edit") : _i18n("Edit with the associated editor");
00084         break;
00085     case kLaunchDefaultEdit:
00086         res = shortName ? _i18n("Edit with editor") : _i18n("Edit with the default editor");
00087         break;
00088     case kLaunchOpen:
00089         res = shortName ? _i18n("Open") : _i18n("Open with the associated viewer");
00090         break;
00091     case kLaunchOpenAs:
00092         res = shortName ? _i18n("Open with...") : _i18n("Choose an application to open with");
00093         break;
00094     case kLaunchDefault:
00095         res = shortName ? _i18n("Default") : _i18n("Execute default associated shell action");
00096         break;
00097     default:
00098         break;
00099     }
00100
00101     return res;
00102 }

bool LaunchDefaultEditor | ( | const char * | filePath,
 |  | void * | par
 | ) |

Launch the default editor for a file

Parameters:
filePath | File name
par | Return data parameter to return the info about running editor process
Returns:
true on success, false otherwise
Definition at line 462 of file LaunchHandlers.cpp.

References _i18n, CStr, cvs_err(), err, gCvsPrefs, NULL, and CvsPrefs::Viewer().

Referenced by CompatGetEditorMsg(), CvsCmdAnnotate(), LaunchEditor(), and LaunchHandler().

00463 {
00464     bool res = false;
00465
00466 #ifndef qMacCvsPP
00467     if( gCvsPrefs.Viewer() == 0L )
00468     {
00469         cvs_err(_i18n("You need to define a default editor in the preferences\n"));
00470         return false;
00471     }
00472
00473     CStr program, file;
00474
00475     if( strchr(gCvsPrefs.Viewer(), ' ') != 0L )
00476     {
00477         program << '\"';
00478         program << gCvsPrefs.Viewer();
00479         program << '\"';
00480     }
00481     else
00482         program = gCvsPrefs.Viewer();
00483
00484     if( strchr(filePath, ' ') != 0L )
00485     {
00486         file << '\"';
00487         file << filePath;
00488         file << '\"';
00489     }
00490     else
00491         file = filePath;
00492
00493     CStr command;
00494     command << program;
00495     command << " ";
00496     command << file;
00497 #endif
00498
00499 #ifdef WIN32
00500     STARTUPINFO sStartupInfo = { 0 };
00501     PROCESS_INFORMATION sProcessInformation = { 0 };
00502
00503     // Execute the command with a call to the CreateProcess API call.
00504     sStartupInfo.cb = sizeof(sStartupInfo);
00505     sStartupInfo.dwFlags = STARTF_USESHOWWINDOW;
00506     sStartupInfo.wShowWindow = SW_SHOWNORMAL;
00507
00508     if( !CreateProcess(NULL,
00509         (char*)command.c_str(),
00510         NULL,
00511         NULL,
00512         FALSE,
00513         0,
00514         NULL,
00515         NULL,
00516         &sStartupInfo,
00517         &sProcessInformation) )
00518     {
00519         sProcessInformation.hProcess = INVALID_HANDLE_VALUE;
00520         sProcessInformation.hThread = INVALID_HANDLE_VALUE;
00521     }
00522
00523     if( sProcessInformation.hProcess != INVALID_HANDLE_VALUE )
00524     {
00525         res = true;
00526     }
00527
00528     if( par )
00529     {
00530         *((PROCESS_INFORMATION*)par) = sProcessInformation;
00531     }
00532     else if( res )
00533     {
00534         CloseHandle(sProcessInformation.hProcess);
00535         CloseHandle(sProcessInformation.hThread);
00536     }
00537
00538 #endif /* WIN32 */
00539
00540 #ifdef qMacCvsPP
00541     GUSIFileSpec  f(filePath);
00542     OSStatus      err(-1);
00543     FSRef         application;
00544     bool          gotViewer(false);
00545
00546     if( gCvsPrefs.Viewer() != NULL )
00547     {
00548         // viewer contains creator and/or bundle identifier
00549         if ( strlen(gCvsPrefs.Viewer()) >= 4 )
00550         {
00551             OSType      appCreator;
00552             CFStringRef bundleIdentifier(NULL);
00553
00554             memcpy(&appCreator, gCvsPrefs.Viewer(), 4);
00555             if ( strlen(gCvsPrefs.Viewer()) > 4  &&  gCvsPrefs.Viewer()[4] == ':' )
00556                 bundleIdentifier = CFStringCreateWithCString(NULL, &gCvsPrefs.Viewer()[5], kCFStringEncodingUTF8);
00557             err = LSFindApplicationForInfo(appCreator == '\?\?\?\?' ? kLSUnknownCreator : appCreator, bundleIdentifier, NULL, &application, NULL);
00558             if ( err != noErr )
00559             {
00560                 cvs_err(_i18n("Unable to find your default viewer '%s' (error %ld), will use default text editor.\n"), gCvsPrefs.Viewer(), err);
00561             }
00562         }
00563     }
00564     if ( err != noErr )
00565     {
00566         // use the default text file viewer
00567         err = LSGetApplicationForInfo('TEXT', kLSUnknownCreator, CFSTR("txt"), kLSRolesAll, &application, NULL);
00568     }
00569
00570     if ( err == noErr )
00571     {
00572         LSLaunchFSRefSpec   launchSpec = { &application, 1, f, NULL, kLSLaunchDefaults|kLSLaunchDontAddToRecents, NULL };
00573         err = LSOpenFromRefSpec(&launchSpec, NULL);
00574     }
00575     if ( err != noErr )
00576     {
00577         cvs_err(_i18n("Unable to open '%s' (error %ld) with default editor '%s'.\n"), (char*)filePath, err, gCvsPrefs.Viewer() ? gCvsPrefs.Viewer() : "<default text editor>");
00578     }
00579     else
00580         res = true;
00581 #endif /* qMacCvsPP */
00582
00583 #if qUnix
00584     res = true;
00585 #endif // qUnix
00586
00587     return res;
00588 }

Here is the call graph for this function:

bool LaunchDiff | ( | const char * | f1,
 |  | const char * | f2,
 |  | const char * | diffTool,
 |  | bool | unifiedDiff,
 |  | bool | noWhiteSpace,
 |  | bool | noBlankLines,
 |  | bool | ignoreCase
 | ) |

Launch a diff of two files

Parameters:
f1 | First file name
f2 | Second file name
diffTool | diff tool to launch (optional)
unifiedDiff | if true then use unified diff if possible
noWhiteSpace | if true then ignore extra white space if possible
noBlankLines | if true then ignore blank lines if possible
ignoreCase | if true then ignore case differences if possible
Returns:
true on success, false otherwise
Definition at line 176 of file LaunchHandlers.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CStr, cvs_err(), UCvsApp::Execute(), CvsPrefs::ExtDiff(), gCvsPrefs, kShellActionDefault, NULL, ShellAction(), and SHELLACTION_SUCCEEDED.

Referenced by CvsCmdDiff().

00178 {
00179   if( diffTool == 0L  ||  diffTool[0] == 0 ) diffTool = gCvsPrefs.ExtDiff();
00180     if( diffTool == 0L  ||  diffTool[0] == 0 )
00181     {
00182         cvs_err(_i18n("The external diff program is not defined.\n"));
00183         cvs_err(_i18n("You need to set it in the preferences dialog.\n"));
00184         return false;
00185     }
00186
00187 #ifdef WIN32
00188     CStr args;
00189     CStr program, file1, file2;
00190
00191     if( strchr(diffTool, ' ') != 0L )
00192     {
00193         program << '\"' << diffTool << '\"';
00194     }
00195     else
00196     {
00197         program = diffTool;
00198     }
00199
00200     if( strchr(f1, ' ') != 0L )
00201     {
00202         file1 << '\"' << f1 << '\"';
00203     }
00204     else
00205     {
00206         file1 = f1;
00207     }
00208
00209     if( strchr(f2, ' ') != 0L )
00210     {
00211         file2 << '\"' << f2 << '\"';
00212     }
00213     else
00214     {
00215         file2 = f2;
00216     }
00217
00218     args << file1.c_str() << " " << file2.c_str();
00219
00220     UINT shellRes = ShellAction(kShellActionDefault, diffTool, args.c_str());
00221     if( !SHELLACTION_SUCCEEDED(shellRes) )
00222     {
00223         // ExtDiff app was not found. Let's try to execute it from
00224         // the application path. However, this is done only when ExtDiff
00225         // value doesn't contain absolute path ("c:\subdir\" or "\subdir\").
00226         if( strchr(diffTool, ':') == 0L && (diffTool[0]) != '\\' )
00227         {
00228             CStr appPath;
00229
00230             ((CWincvsApp*)AfxGetApp())->GetAppPath(appPath);
00231             if( !appPath.endsWith(kPathDelimiter) )
00232                 appPath << kPathDelimiter;
00233
00234             appPath << diffTool;
00235
00236             shellRes = ShellAction(kShellActionDefault, appPath, args);
00237         }
00238     }
00239
00240     if( !SHELLACTION_SUCCEEDED(shellRes) )
00241     {
00242         LPVOID lpMsgBuf;
00243         FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
00244             NULL,
00245             GetLastError(),
00246             MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
00247             (LPTSTR)&lpMsgBuf,
00248             0,
00249             NULL);
00250
00251         cvs_err(_i18n("Unable to open '%s' (%s), using console instead\n"), diffTool, (LPCSTR)lpMsgBuf);
00252         // Free the buffer.
00253         LocalFree( lpMsgBuf );
00254         return false;
00255     }
00256
00257     return true;
00258 #elif qUnix
00259     CvsArgs args(false);
00260     args.add(diffTool);
00261     args.add(f1);
00262     args.add(f2);
00263     UCvsApp::gApp->Execute(args.Argc(), args.Argv());
00264     return true;
00265 #elif TARGET_RT_MAC_MACHO
00266     CvsArgs args(false);
00267     args.add(diffTool);
00268     if ( noWhiteSpace ) {
00269       if ( strcmp(diffTool, kDiffTool_CodeWarrior) == 0  ||  strcmp(diffTool, kDiffTool_BBEdit) == 0 ) args.add("-wb");
00270     }
00271     if ( ignoreCase ) {
00272       if ( strcmp(diffTool, kDiffTool_CodeWarrior) == 0  ||  strcmp(diffTool, kDiffTool_BBEdit) == 0 ) args.add("-i");
00273     }
00274     args.add(f1);
00275     args.add(f2);
00276     CMacCvsApp::gApp->Execute(args.Argc(), args.Argv());
00277     return true;
00278 #endif
00279 }

Here is the call graph for this function:

bool LaunchEditor | ( | const char * | filePath,
 |  | bool | useDefault
 | ) |

Launch an editor for file

Parameters:
filePath | Full path to the file
useDefault | true to use OS setup editor, false to use default editor
Returns:
true on success, false otherwise
Definition at line 403 of file LaunchHandlers.cpp.

References _i18n, CStr, cvs_err(), err, kShellActionEdit, LaunchDefaultEditor(), NULL, ShellAction(), SHELLACTION_SUCCEEDED, and SplitPath().

Referenced by LaunchViewer().

00404 {
00405     bool res = false;
00406
00407 #ifdef WIN32
00408     if( !useDefault )
00409     {
00410         CStr folder, file;
00411         SplitPath(filePath, folder, file);
00412
00413         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionEdit, filePath, NULL, folder));
00414     }
00415
00416 #endif /* WIN32 */
00417
00418 #ifdef qMacCvsPP
00419     if ( !useDefault )
00420     {
00421         GUSIFileSpec  f(filePath);
00422         OSStatus      err;
00423         err = LSOpenFSRef(f, NULL);
00424         FSRef         application;
00425
00426         err = LSGetApplicationForItem(f, kLSRolesAll, &application, NULL);
00427         if ( err != noErr )
00428         {
00429             // no luck finding a default binding -> try as text file
00430             err = LSGetApplicationForInfo('TEXT', kLSUnknownCreator, CFSTR("txt"), kLSRolesAll, &application, NULL);
00431         }
00432         if ( err == noErr )
00433         {
00434             LSLaunchFSRefSpec   launchSpec = { &application, 1, f, NULL, kLSLaunchDefaults|kLSLaunchDontAddToRecents, NULL };
00435             err = LSOpenFromRefSpec(&launchSpec, NULL);
00436         }
00437         if ( err != noErr )
00438         {
00439             cvs_err(_i18n("Unable to open '%s' (error %ld), using default editor instead\n"), (char*)filePath, err);
00440         }
00441         else res = true;
00442     }
00443 #endif /* qMacCvsPP */
00444
00445 #if qUnix
00446 #endif // qUnix
00447
00448     if( !res )
00449     {
00450         res = LaunchDefaultEditor(filePath);
00451     }
00452
00453     return res;
00454 }

Here is the call graph for this function:

void LaunchExplore ( const char * path )

Helper function to explore given path

Parameters:
path Path to explore
Definition at line 594 of file LaunchHandlers.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CvsPrefs::Browser(), cvs_err(), UCvsApp::Execute(), gCvsPrefs, kShellActionExplore, ShellAction(), and SHELLACTION_SUCCEEDED.

Referenced by CBrowseFileView::OnViewExplore(), and CWinCvsBrowser::OnViewExplore().

00595 {
00596 #ifdef WIN32
00597     if( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionExplore, path)) )
00598     {
00599         cvs_err("Unable to explore '%s' (error %d)\n", (char*)path, GetLastError());
00600     }
00601 #endif
00602 #ifdef qMacCvsPP
00603   GUSIFileSpec    fileSpec(path);
00604   CBrowserPopup::SendFinderOpenAE(fileSpec, true);
00605 #endif
00606 #ifdef qUnix
00607     CvsArgs args(false);
00608     args.add(gCvsPrefs.Browser());
00609     args.add(path);
00610     UCvsApp::gApp->Execute(args.Argc(), args.Argv());
00611 #endif
00612 }

Here is the call graph for this function:

bool LaunchHandler | ( | const kLaunchType | launchType,
 |  | const char * | filePath
 | ) |

Launch a handler for file

Parameters:
launchType | Type of the requested handler type
filePath | Full path to the file
Returns:
true on success, false otherwise
Definition at line 287 of file LaunchHandlers.cpp.

References _i18n, CStr, cvs_err(), kLaunchDefault, kLaunchDefaultEdit, kLaunchOpen, kLaunchOpenAs, kShellActionDefault, kShellActionEdit, kShellActionOpen, kShellActionOpenAs, LaunchDefaultEditor(), NULL, ShellAction(), SHELLACTION_SUCCEEDED, and SplitPath().

Referenced by CvsCmdFileAction(), CvsCmdLaunch(), CGraphView::OnQueryShellactionDefault(), CGraphView::OnViewEditsel(), CGraphView::OnViewEditseldef(), CGraphView::OnViewOpensel(), and CGraphView::OnViewOpenselas().

00288 {
00289     bool res = false;
00290
00291 #ifdef WIN32
00292     CStr folder, file;
00293     SplitPath(filePath, folder, file);
00294
00295     if( launchType == kLaunchOpen )
00296     {
00297         // Explicitly attempt "open"
00298         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpen, filePath, NULL, folder));
00299         if( !res )
00300         {
00301             // Attempt OS default action for object
00302             res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, filePath, NULL, folder));
00303         }
00304     }
00305
00306     if( !res && (launchType == kLaunchOpen || launchType == kLaunchOpenAs) )
00307     {
00308         // Show OS handler selection dialog
00309         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpenAs, filePath, NULL, folder));
00310         if( !res )
00311         {
00312             cvs_err(_i18n("Unable to open '%s' (error %d), using editor instead\n"), (char*)filePath, GetLastError());
00313         }
00314     }
00315
00316     if( !res && launchType != kLaunchDefaultEdit && launchType != kLaunchDefault )
00317     {
00318         // Attempt "edit" action
00319         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionEdit, filePath, NULL, folder));
00320     }
00321
00322     if( !res && launchType == kLaunchDefault )
00323     {
00324         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, filePath, NULL, folder));
00325     }
00326 #endif
00327
00328     if( !res )
00329     {
00330         // If all else fails, open in default editor
00331         res = LaunchDefaultEditor(filePath);
00332     }
00333
00334     return res;
00335 }

Here is the call graph for this function:

void LaunchNewInst ( const char * path )

Helper function to open given path in a new instance

Parameters:
path Path to open
Definition at line 618 of file LaunchHandlers.cpp.

References cvs_err(), CWincvsApp::GetAppModule(), kShellActionDefault, ShellAction(), and SHELLACTION_SUCCEEDED.

Referenced by CBrowseFileView::OnViewNewInstance(), and CWinCvsBrowser::OnViewNewInstance().

00619 {
00620     UStr appPath;
00621
00622 #ifdef WIN32
00623     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00624     pApp->GetAppModule(appPath);
00625
00626     if ( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, appPath, path)) )
00627     {
00628         cvs_err("Unable to open new instance for '%s' (error %d)\n", (char*)path, GetLastError());
00629     }
00630 #endif
00631 #ifdef qMacCvsPP
00632 #endif
00633 #ifdef qUnix
00634 #endif
00635 }

Here is the call graph for this function:

void LaunchProperties ( const char * path )

Helper function to show the properties of a given path

Parameters:
path Path to show the properties
Definition at line 641 of file LaunchHandlers.cpp.

References cvs_err(), kShellActionProperties, ShellAction(), and SHELLACTION_SUCCEEDED.

Referenced by CBrowseFileView::OnQueryProperties(), and CWinCvsBrowser::OnQueryProperties().

00642 {
00643 #ifdef WIN32
00644     if( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionProperties, path)) )
00645     {
00646         cvs_err("Unable to show the properties '%s' (error %d)\n", (char*)path, GetLastError());
00647     }
00648 #endif
00649 #ifdef qMacCvsPP
00650 #endif
00651 #ifdef qUnix
00652 #endif
00653 }

Here is the call graph for this function:

bool LaunchViewer | ( | const char * | filePath,
 |  | bool | useOpenAs
 | ) |

Launch a viewer for file

Parameters:
filePath | Full path to the file
useOpenAs | true to always show "Open with" dialog, false to only show it if no valid association exists
Returns:
true on success, false otherwise
Definition at line 343 of file LaunchHandlers.cpp.

References _i18n, CStr, cvs_err(), kShellActionOpen, kShellActionOpenAs, LaunchEditor(), NULL, ShellAction(), SHELLACTION_SUCCEEDED, and SplitPath().

Referenced by UCvsFiles::EditSel().

00344 {
00345     bool res = false;
00346
00347 #ifdef WIN32
00348     bool needOpenAs = false;
00349
00350     CStr folder, file;
00351     SplitPath(filePath, folder, file);
00352
00353     if( !useOpenAs )
00354     {
00355         UINT shellRes = ShellAction(kShellActionOpen, filePath, NULL, folder);
00356         if( !SHELLACTION_SUCCEEDED(shellRes))
00357         {
00358             // If it failed because of no valid association and file has an extension then try the "Open with..." dialog instead
00359             needOpenAs = (file.rfind('.') > 0 &&
00360                 (SE_ERR_NOASSOC == shellRes || SE_ERR_ASSOCINCOMPLETE == shellRes));
00361         }
00362         else
00363         {
00364             res = true;
00365         }
00366     }
00367
00368     if( !res && (useOpenAs || needOpenAs) )
00369     {
00370         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpenAs, filePath, NULL, folder));
00371     }
00372
00373     if( !res )
00374     {
00375         cvs_err(_i18n("Unable to open '%s' (error %d), using default editor instead\n"), (char*)filePath, GetLastError());
00376         res = LaunchEditor(filePath);
00377     }
00378
00379 #endif /* WIN32 */
00380
00381 #ifdef qMacCvsPP
00382   // fall thru to calling LaunchEditor below...
00383 #endif /* qMacCvsPP */
00384
00385 #if qUnix
00386       res = true;
00387 #endif // qUnix
00388
00389     if( !res )
00390     {
00391         res = LaunchEditor(filePath);
00392     }
00393
00394     return res;
00395 }

Here is the call graph for this function:

UINT ShellAction | ( | const kShellActionType | actionType,
 |  | const char * | filePath,
 |  | const char * | args = 0L,
 |  | const char * | workdir = 0L
 | ) | [static]

Launch a file, folder or program via the OS' high-level API

Parameters:
actionType | Manner in which the given object is to be launched
filePath | File or folder name to launch (may include full path and arguments)
args | Arguments to pass to the file in case it is an application
workdir | Working directory to launch the file from
Returns:
Returns an OS-specific exit code - use SHELLACTION_SUCCEEDED to test for success
Definition at line 112 of file LaunchHandlers.cpp.

References kShellActionDefault, kShellActionEdit, kShellActionExplore, kShellActionOpen, kShellActionOpenAs, kShellActionProperties, and NULL.

Referenced by LaunchDiff(), LaunchEditor(), LaunchExplore(), LaunchHandler(), LaunchNewInst(), LaunchProperties(), and LaunchViewer().

00113 {
00114     char* verb;
00115
00116     switch( actionType )
00117     {
00118     case kShellActionDefault:
00119         verb = NULL;
00120         break;
00121     case kShellActionOpen:
00122         verb = "open";
00123         break;
00124     case kShellActionEdit:
00125         verb = "edit";
00126         break;
00127     case kShellActionOpenAs:
00128         verb = "openas";
00129         break;
00130     case kShellActionExplore:
00131         verb = "explore";
00132         break;
00133     case kShellActionProperties:
00134         verb = "properties";
00135         break;
00136     }
00137
00138     HWND hParentWnd = AfxGetMainWnd()->GetSafeHwnd();
00139
00140     SHELLEXECUTEINFO seInfo = { 0 };
00141     seInfo.cbSize = sizeof(SHELLEXECUTEINFO);
00142     seInfo.hwnd = hParentWnd;
00143     seInfo.lpVerb = verb;
00144     seInfo.lpFile = filePath;
00145     seInfo.lpParameters = args;
00146     seInfo.lpDirectory = workdir;
00147     seInfo.nShow = SW_SHOWDEFAULT;
00148
00149     if( actionType != kShellActionOpenAs )
00150     {
00151         seInfo.fMask |= SEE_MASK_FLAG_NO_UI;
00152     }
00153
00154     if( actionType == kShellActionProperties )
00155     {
00156         seInfo.fMask |= SEE_MASK_INVOKEIDLIST;
00157     }
00158
00159     ShellExecuteEx(&seInfo);
00160
00161     return (UINT)seInfo.hInstApp;
00162 }

Generated on Sat Aug 7 22:45:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LaunchHandlers.h File Reference

common/LaunchHandlers.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | AFX_LAUNCHHANDLERS_H__26387DB1_9D2A_4909_A7A7_5ACAFA46A57B__INCLUDED_

Enumerations

enum kLaunchType {
kLaunchEdit,
kLaunchDefaultEdit,
kLaunchOpen,
kLaunchOpenAs,
kLaunchDefault,
kLaunchEnd
}
Launch type enum. More...

Functions

const char * | GetLaunchTypeName (const kLaunchType launchType, const bool shortName=true)
bool | LaunchDiff (const char *file1, const char *file2, const char *diffTool=0L, bool unifiedDiff=false, bool noWhiteSpace=false, bool noBlankLines=false, bool ignoreCase=false)
bool | LaunchHandler (const kLaunchType launchType, const char *filePath)
bool | LaunchViewer (const char *filePath, bool useOpenAs=false)
bool | LaunchEditor (const char *filePath, bool useDefault=false)
bool | LaunchDefaultEditor (const char *filePath, void *par=0L)
void | LaunchExplore (const char *path)
void | LaunchNewInst (const char *path)
void | LaunchProperties (const char *path)

Define Documentation

#define AFX_LAUNCHHANDLERS_H__26387DB1_9D2A_4909_A7A7_5ACAFA46A57B__INCLUDED_

Definition at line 26 of file LaunchHandlers.h.

Enumeration Type Documentation

enum kLaunchType

Launch type enum.

Enumeration values:
kLaunchEdit | Launch in associated editor
kLaunchDefaultEdit | Launch in default editor
kLaunchOpen | Launch in associated handler application
kLaunchOpenAs | Launch handler application selection dialog
kLaunchDefault | Launch default associated shell action
kLaunchEnd | End marker
Definition at line 33 of file LaunchHandlers.h.

Referenced by CompatGetFileAction(), CvsCmdFileAction(), CFileAction_MAIN::GetLaunchType(), CFileAction_MAIN::OnInitDialog(), CFileAction_MAIN::OnOK(), and CFileAction_MAIN::OnSelchangeAction().

00033             {
00034     kLaunchEdit,
00035     kLaunchDefaultEdit,
00036     kLaunchOpen,
00037     kLaunchOpenAs,
00038     kLaunchDefault,
00039     kLaunchEnd
00040 }kLaunchType;

Function Documentation

const char* GetLaunchTypeName | ( | const kLaunchType | launchType,
 |  | const bool | shortName
 | ) |

Get the launch type name

Parameters:
launchType | Launch type
shortName | true to retrieve the short name, false to get the long name
Returns:
The launch type name
Definition at line 76 of file LaunchHandlers.cpp.

References _i18n, kLaunchDefault, kLaunchDefaultEdit, kLaunchEdit, kLaunchOpen, and kLaunchOpenAs.

Referenced by CFileAction_MAIN::OnInitDialog(), CFileAction_MAIN::OnSelchangeAction(), and TLaunchHandler< lauchType >::TLaunchHandler().

00077 {
00078     const char* res = "";
00079
00080     switch( launchType )
00081     {
00082     case kLaunchEdit:
00083         res = shortName ? _i18n("Edit") : _i18n("Edit with the associated editor");
00084         break;
00085     case kLaunchDefaultEdit:
00086         res = shortName ? _i18n("Edit with editor") : _i18n("Edit with the default editor");
00087         break;
00088     case kLaunchOpen:
00089         res = shortName ? _i18n("Open") : _i18n("Open with the associated viewer");
00090         break;
00091     case kLaunchOpenAs:
00092         res = shortName ? _i18n("Open with...") : _i18n("Choose an application to open with");
00093         break;
00094     case kLaunchDefault:
00095         res = shortName ? _i18n("Default") : _i18n("Execute default associated shell action");
00096         break;
00097     default:
00098         break;
00099     }
00100
00101     return res;
00102 }

bool LaunchDefaultEditor | ( | const char * | filePath,
 |  | void * | par
 | ) |

Launch the default editor for a file

Parameters:
filePath | File name
par | Return data parameter to return the info about running editor process
Returns:
true on success, false otherwise
Definition at line 462 of file LaunchHandlers.cpp.

References _i18n, CStr, cvs_err(), err, gCvsPrefs, NULL, and CvsPrefs::Viewer().

Referenced by CompatGetEditorMsg(), CvsCmdAnnotate(), LaunchEditor(), and LaunchHandler().

00463 {
00464     bool res = false;
00465
00466 #ifndef qMacCvsPP
00467     if( gCvsPrefs.Viewer() == 0L )
00468     {
00469         cvs_err(_i18n("You need to define a default editor in the preferences\n"));
00470         return false;
00471     }
00472
00473     CStr program, file;
00474
00475     if( strchr(gCvsPrefs.Viewer(), ' ') != 0L )
00476     {
00477         program << '\"';
00478         program << gCvsPrefs.Viewer();
00479         program << '\"';
00480     }
00481     else
00482         program = gCvsPrefs.Viewer();
00483
00484     if( strchr(filePath, ' ') != 0L )
00485     {
00486         file << '\"';
00487         file << filePath;
00488         file << '\"';
00489     }
00490     else
00491         file = filePath;
00492
00493     CStr command;
00494     command << program;
00495     command << " ";
00496     command << file;
00497 #endif
00498
00499 #ifdef WIN32
00500     STARTUPINFO sStartupInfo = { 0 };
00501     PROCESS_INFORMATION sProcessInformation = { 0 };
00502
00503     // Execute the command with a call to the CreateProcess API call.
00504     sStartupInfo.cb = sizeof(sStartupInfo);
00505     sStartupInfo.dwFlags = STARTF_USESHOWWINDOW;
00506     sStartupInfo.wShowWindow = SW_SHOWNORMAL;
00507
00508     if( !CreateProcess(NULL,
00509         (char*)command.c_str(),
00510         NULL,
00511         NULL,
00512         FALSE,
00513         0,
00514         NULL,
00515         NULL,
00516         &sStartupInfo,
00517         &sProcessInformation) )
00518     {
00519         sProcessInformation.hProcess = INVALID_HANDLE_VALUE;
00520         sProcessInformation.hThread = INVALID_HANDLE_VALUE;
00521     }
00522
00523     if( sProcessInformation.hProcess != INVALID_HANDLE_VALUE )
00524     {
00525         res = true;
00526     }
00527
00528     if( par )
00529     {
00530         *((PROCESS_INFORMATION*)par) = sProcessInformation;
00531     }
00532     else if( res )
00533     {
00534         CloseHandle(sProcessInformation.hProcess);
00535         CloseHandle(sProcessInformation.hThread);
00536     }
00537
00538 #endif /* WIN32 */
00539
00540 #ifdef qMacCvsPP
00541     GUSIFileSpec  f(filePath);
00542     OSStatus      err(-1);
00543     FSRef         application;
00544     bool          gotViewer(false);
00545
00546     if( gCvsPrefs.Viewer() != NULL )
00547     {
00548         // viewer contains creator and/or bundle identifier
00549         if ( strlen(gCvsPrefs.Viewer()) >= 4 )
00550         {
00551             OSType      appCreator;
00552             CFStringRef bundleIdentifier(NULL);
00553
00554             memcpy(&appCreator, gCvsPrefs.Viewer(), 4);
00555             if ( strlen(gCvsPrefs.Viewer()) > 4  &&  gCvsPrefs.Viewer()[4] == ':' )
00556                 bundleIdentifier = CFStringCreateWithCString(NULL, &gCvsPrefs.Viewer()[5], kCFStringEncodingUTF8);
00557             err = LSFindApplicationForInfo(appCreator == '\?\?\?\?' ? kLSUnknownCreator : appCreator, bundleIdentifier, NULL, &application, NULL);
00558             if ( err != noErr )
00559             {
00560                 cvs_err(_i18n("Unable to find your default viewer '%s' (error %ld), will use default text editor.\n"), gCvsPrefs.Viewer(), err);
00561             }
00562         }
00563     }
00564     if ( err != noErr )
00565     {
00566         // use the default text file viewer
00567         err = LSGetApplicationForInfo('TEXT', kLSUnknownCreator, CFSTR("txt"), kLSRolesAll, &application, NULL);
00568     }
00569
00570     if ( err == noErr )
00571     {
00572         LSLaunchFSRefSpec   launchSpec = { &application, 1, f, NULL, kLSLaunchDefaults|kLSLaunchDontAddToRecents, NULL };
00573         err = LSOpenFromRefSpec(&launchSpec, NULL);
00574     }
00575     if ( err != noErr )
00576     {
00577         cvs_err(_i18n("Unable to open '%s' (error %ld) with default editor '%s'.\n"), (char*)filePath, err, gCvsPrefs.Viewer() ? gCvsPrefs.Viewer() : "<default text editor>");
00578     }
00579     else
00580         res = true;
00581 #endif /* qMacCvsPP */
00582
00583 #if qUnix
00584     res = true;
00585 #endif // qUnix
00586
00587     return res;
00588 }

Here is the call graph for this function:

bool LaunchDiff | ( | const char * | f1,
 |  | const char * | f2,
 |  | const char * | diffTool,
 |  | bool | unifiedDiff,
 |  | bool | noWhiteSpace,
 |  | bool | noBlankLines,
 |  | bool | ignoreCase
 | ) |

Launch a diff of two files

Parameters:
f1 | First file name
f2 | Second file name
diffTool | diff tool to launch (optional)
unifiedDiff | if true then use unified diff if possible
noWhiteSpace | if true then ignore extra white space if possible
noBlankLines | if true then ignore blank lines if possible
ignoreCase | if true then ignore case differences if possible
Returns:
true on success, false otherwise
Definition at line 176 of file LaunchHandlers.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CStr, cvs_err(), UCvsApp::Execute(), CvsPrefs::ExtDiff(), gCvsPrefs, kShellActionDefault, NULL, ShellAction(), and SHELLACTION_SUCCEEDED.

Referenced by CvsCmdDiff().

00178 {
00179   if( diffTool == 0L  ||  diffTool[0] == 0 ) diffTool = gCvsPrefs.ExtDiff();
00180     if( diffTool == 0L  ||  diffTool[0] == 0 )
00181     {
00182         cvs_err(_i18n("The external diff program is not defined.\n"));
00183         cvs_err(_i18n("You need to set it in the preferences dialog.\n"));
00184         return false;
00185     }
00186
00187 #ifdef WIN32
00188     CStr args;
00189     CStr program, file1, file2;
00190
00191     if( strchr(diffTool, ' ') != 0L )
00192     {
00193         program << '\"' << diffTool << '\"';
00194     }
00195     else
00196     {
00197         program = diffTool;
00198     }
00199
00200     if( strchr(f1, ' ') != 0L )
00201     {
00202         file1 << '\"' << f1 << '\"';
00203     }
00204     else
00205     {
00206         file1 = f1;
00207     }
00208
00209     if( strchr(f2, ' ') != 0L )
00210     {
00211         file2 << '\"' << f2 << '\"';
00212     }
00213     else
00214     {
00215         file2 = f2;
00216     }
00217
00218     args << file1.c_str() << " " << file2.c_str();
00219
00220     UINT shellRes = ShellAction(kShellActionDefault, diffTool, args.c_str());
00221     if( !SHELLACTION_SUCCEEDED(shellRes) )
00222     {
00223         // ExtDiff app was not found. Let's try to execute it from
00224         // the application path. However, this is done only when ExtDiff
00225         // value doesn't contain absolute path ("c:\subdir\" or "\subdir\").
00226         if( strchr(diffTool, ':') == 0L && (diffTool[0]) != '\\' )
00227         {
00228             CStr appPath;
00229
00230             ((CWincvsApp*)AfxGetApp())->GetAppPath(appPath);
00231             if( !appPath.endsWith(kPathDelimiter) )
00232                 appPath << kPathDelimiter;
00233
00234             appPath << diffTool;
00235
00236             shellRes = ShellAction(kShellActionDefault, appPath, args);
00237         }
00238     }
00239
00240     if( !SHELLACTION_SUCCEEDED(shellRes) )
00241     {
00242         LPVOID lpMsgBuf;
00243         FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
00244             NULL,
00245             GetLastError(),
00246             MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
00247             (LPTSTR)&lpMsgBuf,
00248             0,
00249             NULL);
00250
00251         cvs_err(_i18n("Unable to open '%s' (%s), using console instead\n"), diffTool, (LPCSTR)lpMsgBuf);
00252         // Free the buffer.
00253         LocalFree( lpMsgBuf );
00254         return false;
00255     }
00256
00257     return true;
00258 #elif qUnix
00259     CvsArgs args(false);
00260     args.add(diffTool);
00261     args.add(f1);
00262     args.add(f2);
00263     UCvsApp::gApp->Execute(args.Argc(), args.Argv());
00264     return true;
00265 #elif TARGET_RT_MAC_MACHO
00266     CvsArgs args(false);
00267     args.add(diffTool);
00268     if ( noWhiteSpace ) {
00269       if ( strcmp(diffTool, kDiffTool_CodeWarrior) == 0  ||  strcmp(diffTool, kDiffTool_BBEdit) == 0 ) args.add("-wb");
00270     }
00271     if ( ignoreCase ) {
00272       if ( strcmp(diffTool, kDiffTool_CodeWarrior) == 0  ||  strcmp(diffTool, kDiffTool_BBEdit) == 0 ) args.add("-i");
00273     }
00274     args.add(f1);
00275     args.add(f2);
00276     CMacCvsApp::gApp->Execute(args.Argc(), args.Argv());
00277     return true;
00278 #endif
00279 }

Here is the call graph for this function:

bool LaunchEditor | ( | const char * | filePath,
 |  | bool | useDefault
 | ) |

Launch an editor for file

Parameters:
filePath | Full path to the file
useDefault | true to use OS setup editor, false to use default editor
Returns:
true on success, false otherwise
Definition at line 403 of file LaunchHandlers.cpp.

References _i18n, CStr, cvs_err(), err, kShellActionEdit, LaunchDefaultEditor(), NULL, ShellAction(), SHELLACTION_SUCCEEDED, and SplitPath().

Referenced by LaunchViewer().

00404 {
00405     bool res = false;
00406
00407 #ifdef WIN32
00408     if( !useDefault )
00409     {
00410         CStr folder, file;
00411         SplitPath(filePath, folder, file);
00412
00413         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionEdit, filePath, NULL, folder));
00414     }
00415
00416 #endif /* WIN32 */
00417
00418 #ifdef qMacCvsPP
00419     if ( !useDefault )
00420     {
00421         GUSIFileSpec  f(filePath);
00422         OSStatus      err;
00423         err = LSOpenFSRef(f, NULL);
00424         FSRef         application;
00425
00426         err = LSGetApplicationForItem(f, kLSRolesAll, &application, NULL);
00427         if ( err != noErr )
00428         {
00429             // no luck finding a default binding -> try as text file
00430             err = LSGetApplicationForInfo('TEXT', kLSUnknownCreator, CFSTR("txt"), kLSRolesAll, &application, NULL);
00431         }
00432         if ( err == noErr )
00433         {
00434             LSLaunchFSRefSpec   launchSpec = { &application, 1, f, NULL, kLSLaunchDefaults|kLSLaunchDontAddToRecents, NULL };
00435             err = LSOpenFromRefSpec(&launchSpec, NULL);
00436         }
00437         if ( err != noErr )
00438         {
00439             cvs_err(_i18n("Unable to open '%s' (error %ld), using default editor instead\n"), (char*)filePath, err);
00440         }
00441         else res = true;
00442     }
00443 #endif /* qMacCvsPP */
00444
00445 #if qUnix
00446 #endif // qUnix
00447
00448     if( !res )
00449     {
00450         res = LaunchDefaultEditor(filePath);
00451     }
00452
00453     return res;
00454 }

Here is the call graph for this function:

void LaunchExplore ( const char * path )

Helper function to explore given path

Parameters:
path Path to explore
Definition at line 594 of file LaunchHandlers.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CvsPrefs::Browser(), cvs_err(), UCvsApp::Execute(), gCvsPrefs, kShellActionExplore, ShellAction(), and SHELLACTION_SUCCEEDED.

Referenced by CWinCvsBrowser::OnViewExplore(), and CBrowseFileView::OnViewExplore().

00595 {
00596 #ifdef WIN32
00597     if( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionExplore, path)) )
00598     {
00599         cvs_err("Unable to explore '%s' (error %d)\n", (char*)path, GetLastError());
00600     }
00601 #endif
00602 #ifdef qMacCvsPP
00603   GUSIFileSpec    fileSpec(path);
00604   CBrowserPopup::SendFinderOpenAE(fileSpec, true);
00605 #endif
00606 #ifdef qUnix
00607     CvsArgs args(false);
00608     args.add(gCvsPrefs.Browser());
00609     args.add(path);
00610     UCvsApp::gApp->Execute(args.Argc(), args.Argv());
00611 #endif
00612 }

Here is the call graph for this function:

bool LaunchHandler | ( | const kLaunchType | launchType,
 |  | const char * | filePath
 | ) |

Launch a handler for file

Parameters:
launchType | Type of the requested handler type
filePath | Full path to the file
Returns:
true on success, false otherwise
Definition at line 287 of file LaunchHandlers.cpp.

References _i18n, CStr, cvs_err(), kLaunchDefault, kLaunchDefaultEdit, kLaunchOpen, kLaunchOpenAs, kShellActionDefault, kShellActionEdit, kShellActionOpen, kShellActionOpenAs, LaunchDefaultEditor(), NULL, ShellAction(), SHELLACTION_SUCCEEDED, and SplitPath().

Referenced by CvsCmdFileAction(), CvsCmdLaunch(), CGraphView::OnQueryShellactionDefault(), CGraphView::OnViewEditsel(), CGraphView::OnViewEditseldef(), CGraphView::OnViewOpensel(), and CGraphView::OnViewOpenselas().

00288 {
00289     bool res = false;
00290
00291 #ifdef WIN32
00292     CStr folder, file;
00293     SplitPath(filePath, folder, file);
00294
00295     if( launchType == kLaunchOpen )
00296     {
00297         // Explicitly attempt "open"
00298         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpen, filePath, NULL, folder));
00299         if( !res )
00300         {
00301             // Attempt OS default action for object
00302             res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, filePath, NULL, folder));
00303         }
00304     }
00305
00306     if( !res && (launchType == kLaunchOpen || launchType == kLaunchOpenAs) )
00307     {
00308         // Show OS handler selection dialog
00309         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpenAs, filePath, NULL, folder));
00310         if( !res )
00311         {
00312             cvs_err(_i18n("Unable to open '%s' (error %d), using editor instead\n"), (char*)filePath, GetLastError());
00313         }
00314     }
00315
00316     if( !res && launchType != kLaunchDefaultEdit && launchType != kLaunchDefault )
00317     {
00318         // Attempt "edit" action
00319         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionEdit, filePath, NULL, folder));
00320     }
00321
00322     if( !res && launchType == kLaunchDefault )
00323     {
00324         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, filePath, NULL, folder));
00325     }
00326 #endif
00327
00328     if( !res )
00329     {
00330         // If all else fails, open in default editor
00331         res = LaunchDefaultEditor(filePath);
00332     }
00333
00334     return res;
00335 }

Here is the call graph for this function:

void LaunchNewInst ( const char * path )

Helper function to open given path in a new instance

Parameters:
path Path to open
Definition at line 618 of file LaunchHandlers.cpp.

References cvs_err(), CWincvsApp::GetAppModule(), kShellActionDefault, ShellAction(), and SHELLACTION_SUCCEEDED.

Referenced by CWinCvsBrowser::OnViewNewInstance(), and CBrowseFileView::OnViewNewInstance().

00619 {
00620     UStr appPath;
00621
00622 #ifdef WIN32
00623     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00624     pApp->GetAppModule(appPath);
00625
00626     if ( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, appPath, path)) )
00627     {
00628         cvs_err("Unable to open new instance for '%s' (error %d)\n", (char*)path, GetLastError());
00629     }
00630 #endif
00631 #ifdef qMacCvsPP
00632 #endif
00633 #ifdef qUnix
00634 #endif
00635 }

Here is the call graph for this function:

void LaunchProperties ( const char * path )

Helper function to show the properties of a given path

Parameters:
path Path to show the properties
Definition at line 641 of file LaunchHandlers.cpp.

References cvs_err(), kShellActionProperties, ShellAction(), and SHELLACTION_SUCCEEDED.

Referenced by CWinCvsBrowser::OnQueryProperties(), and CBrowseFileView::OnQueryProperties().

00642 {
00643 #ifdef WIN32
00644     if( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionProperties, path)) )
00645     {
00646         cvs_err("Unable to show the properties '%s' (error %d)\n", (char*)path, GetLastError());
00647     }
00648 #endif
00649 #ifdef qMacCvsPP
00650 #endif
00651 #ifdef qUnix
00652 #endif
00653 }

Here is the call graph for this function:

bool LaunchViewer | ( | const char * | filePath,
 |  | bool | useOpenAs
 | ) |

Launch a viewer for file

Parameters:
filePath | Full path to the file
useOpenAs | true to always show "Open with" dialog, false to only show it if no valid association exists
Returns:
true on success, false otherwise
Definition at line 343 of file LaunchHandlers.cpp.

References _i18n, CStr, cvs_err(), kShellActionOpen, kShellActionOpenAs, LaunchEditor(), NULL, ShellAction(), SHELLACTION_SUCCEEDED, and SplitPath().

Referenced by UCvsFiles::EditSel().

00344 {
00345     bool res = false;
00346
00347 #ifdef WIN32
00348     bool needOpenAs = false;
00349
00350     CStr folder, file;
00351     SplitPath(filePath, folder, file);
00352
00353     if( !useOpenAs )
00354     {
00355         UINT shellRes = ShellAction(kShellActionOpen, filePath, NULL, folder);
00356         if( !SHELLACTION_SUCCEEDED(shellRes))
00357         {
00358             // If it failed because of no valid association and file has an extension then try the "Open with..." dialog instead
00359             needOpenAs = (file.rfind('.') > 0 &&
00360                 (SE_ERR_NOASSOC == shellRes || SE_ERR_ASSOCINCOMPLETE == shellRes));
00361         }
00362         else
00363         {
00364             res = true;
00365         }
00366     }
00367
00368     if( !res && (useOpenAs || needOpenAs) )
00369     {
00370         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpenAs, filePath, NULL, folder));
00371     }
00372
00373     if( !res )
00374     {
00375         cvs_err(_i18n("Unable to open '%s' (error %d), using default editor instead\n"), (char*)filePath, GetLastError());
00376         res = LaunchEditor(filePath);
00377     }
00378
00379 #endif /* WIN32 */
00380
00381 #ifdef qMacCvsPP
00382   // fall thru to calling LaunchEditor below...
00383 #endif /* qMacCvsPP */
00384
00385 #if qUnix
00386       res = true;
00387 #endif // qUnix
00388
00389     if( !res )
00390     {
00391         res = LaunchEditor(filePath);
00392     }
00393
00394     return res;
00395 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LineCmd.cpp File Reference

common/LineCmd.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "LineCmd.h"
#include "MultiString.h"
#include "CvsArgs.h"
#include "PromptFiles.h"
#include "CPStr.h"
#include "CvsCommands.h"
#include "MultiFiles.h"
#include "ItemListDlg.h"
#include "CvsRootDlg.h"
#include "GetPrefs.h"
#include "CvsPrefs.h"

Include dependency graph for LineCmd.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool | CompatGetCommand (const MultiFiles *mf, UStr &cmd, UStr &dir, bool &addDefault, bool &addSelection, bool &forceCvsroot, UStr &cvsroot)
Get the command line options.

Variables

char * | sDefPrevCvsCmd []
Default previous commands.
CMString | gPrevCvsCmd (20,"P_PrevCvsCmd", sDefPrevCvsCmd)
CMString | gPrevCvsCmdDir (20,"P_PrevCvsCmdDir")

Function Documentation

bool CompatGetCommand | ( | const MultiFiles * | mf,
 |  | UStr & | cmd,
 |  | UStr & | dir,
 |  | bool & | addDefault,
 |  | bool & | addSelection,
 |  | bool & | forceCvsroot,
 |  | UStr & | cvsroot
 | ) |

Get the command line options.

Definition at line 470 of file LineCmd.cpp.

References _i18n, BrowserGetDirectory(), CPStr, CStr, DEF_CVS_CMD, EV_INIT_WIDGET, FindBestLastCvsroot(), gCvsPrefs, CCmdLine_MAIN::GetCmdLine(), MultiFiles::getdir(), InsertLastCvsroot(), kUMainWidget, CCmdLine_MAIN::m_addDefault, CCmdLine_MAIN::m_addSelection, CCmdLine_MAIN::m_checkPath, CCmdLine_MAIN::m_cvsroot, CCmdLine_MAIN::m_folderLoc, CCmdLine_MAIN::m_forceRoot, MultiFiles::NumDirs(), CvsPrefs::save(), CGetPrefs_GLOBALS::StoreValues(), UCreate_CmdlineDlg(), and UEventSendMessage().

Referenced by CvsCmdCommandLine().

00473 {
00474     bool userHitOK = false;
00475
00476     static CStr sLastCmdline(DEF_CVS_CMD);
00477     static CStr sLastPath("");
00478     static bool sLastHasPath = false;
00479     static bool lastAddDefault = false;
00480     static bool lastAddSelection = false;
00481     static bool lastForceCvsroot = false;
00482     static CStr sLastCvsroot("");
00483
00484     if( mf && mf->NumDirs() > 0 )
00485     {
00486         CStr path;
00487         mf->getdir(0, path);
00488
00489         FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00490     }
00491
00492 #ifdef WIN32
00493     CHHelpPropertySheet pages(_i18n("Command line settings"));
00494     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00495
00496     CCmdLine_MAIN page1(mf, sLastCmdline, sLastHasPath, sLastPath, lastAddDefault, lastAddSelection, lastForceCvsroot, sLastCvsroot);
00497     CGetPrefs_GLOBALS page2;
00498
00499     pages.AddPage(&page1);
00500     pages.AddPage(&page2);
00501
00502     if( pages.DoModal() == IDOK )
00503     {
00504         sLastCmdline = page1.GetCmdLine();
00505         sLastHasPath = page1.m_checkPath == TRUE;
00506         sLastPath = page1.m_folderLoc;
00507         lastAddDefault = page1.m_addDefault ? true : false;
00508         lastAddSelection = page1.m_addSelection ? true : false;
00509         lastForceCvsroot = page1.m_forceRoot ? true : false;
00510         sLastCvsroot = page1.m_cvsroot;
00511
00512         page2.StoreValues();
00513
00514         userHitOK = true;
00515     }
00516 #endif /* WIN32 */
00517
00518 #if qUnix
00519     void *wid = UCreate_CmdlineDlg();
00520
00521     UCvsCmdline *dlg = new UCvsCmdline();
00522     UCvsCmdline_MAIN *tab1 = new UCvsCmdline_MAIN(sLastCmdline, sLastHasPath, sLastPath);
00523     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00524     dlg->AddPage(tab1, UCvsCmdline::kTabGeneral, 0);
00525
00526     if(dlg->DoModal())
00527     {
00528         sLastCmdline = tab1->m_cmdline;
00529         sLastHasPath = tab1->m_checkpath;
00530         sLastPath = tab1->m_folderloc;
00531
00532         userHitOK = true;
00533     }
00534
00535     delete dlg;
00536 #endif // qUnix
00537
00538 #ifdef qMacCvsPP
00539     StDialogHandler theHandler(dlg_Cmdline, LCommander::GetTopCommander());
00540     LWindow *theDialog = theHandler.GetDialog();
00541     ThrowIfNil_(theDialog);
00542     static UInt16 sRuntimePanel = 1;
00543
00544     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00545         (theDialog->FindPaneByID(item_MultiViewPrefs));
00546     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00547
00548     multiView->SwitchToPanel(2);
00549     DoDataExchange_Globals(theDialog, true);
00550     multiView->SwitchToPanel(1);
00551     DoDataExchange_CmdlineMain(theDialog, sLastCmdline, sLastPath, sLastHasPath, true);
00552
00553     LCheckBox *cbox = dynamic_cast<LCheckBox*>
00554         (theDialog->FindPaneByID(item_CheckGroupPath));
00555     LPushButton *epath = dynamic_cast<LPushButton*>
00556         (theDialog->FindPaneByID(item_EditPath));
00557     LEditText *pathDisplay = dynamic_cast<LEditText*>
00558         (theDialog->FindPaneByID(item_ShowPath));
00559     epath->AddListener(&theHandler);
00560     cbox->AddListener(&theHandler);
00561
00562     groupView->SetValue(sRuntimePanel);
00563     theDialog->Show();
00564     MessageT hitMessage;
00565     while (true)
00566     {       // Let DialogHandler process events
00567         hitMessage = theHandler.DoDialog();
00568
00569         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00570             break;
00571
00572         if(hitMessage == item_CheckGroupPath || hitMessage == item_EditPath)
00573         {
00574             cbox = dynamic_cast<LCheckBox*>
00575                 (theDialog->FindPaneByID(item_CheckGroupPath));
00576             pathDisplay = dynamic_cast<LEditText*>
00577                 (theDialog->FindPaneByID(item_ShowPath));
00578             if(cbox->GetValue() == Button_Off)
00579             {
00580                 continue;
00581             }
00582
00583             if( BrowserGetDirectory("Select where to execute", dir) )
00584             {
00585                 CPStr tmp(dir.c_str());
00586                 pathDisplay->SetDescriptor(tmp);
00587             }
00588             else if(hitMessage == item_CheckGroupPath)
00589             {
00590                 cbox->SetValue(Button_Off);
00591             }
00592         }
00593
00594     }
00595     theDialog->Hide();
00596     sRuntimePanel = groupView->GetValue();
00597
00598     if(hitMessage == msg_OK)
00599     {
00600         multiView->SwitchToPanel(1);
00601         DoDataExchange_CmdlineMain(theDialog, sLastCmdline, sLastPath, sLastHasPath, false);
00602         multiView->SwitchToPanel(2);
00603         DoDataExchange_Globals(theDialog, false);
00604         Assert_(sLastCmdline.length() != 0);
00605
00606         userHitOK = true;
00607     }
00608 #endif /* qMacCvsPP */
00609
00610     if( userHitOK )
00611     {
00612         cmd = sLastCmdline;
00613         dir = sLastHasPath ? sLastPath.c_str() : 0L;
00614
00615         addDefault = lastAddDefault;
00616         addSelection = lastAddSelection;
00617
00618         forceCvsroot = lastForceCvsroot;
00619         cvsroot = lastForceCvsroot ? sLastCvsroot.c_str() : 0L;
00620
00621         if( forceCvsroot )
00622         {
00623             CStr path;
00624
00625             if( sLastHasPath )
00626             {
00627                 path = dir;
00628             }
00629             else if( addSelection && mf && mf->NumDirs() > 0)
00630             {
00631                 mf->getdir(0, path);
00632             }
00633
00634             if( !path.empty() )
00635             {
00636                 InsertLastCvsroot(path, cvsroot);
00637             }
00638         }
00639
00640         gCvsPrefs.save();
00641     }
00642
00643     return userHitOK;
00644 }

Here is the call graph for this function:

Variable Documentation

CMString gPrevCvsCmd(20,"P_PrevCvsCmd", sDefPrevCvsCmd) [static]

Referenced by CCmdLine_MAIN::OnInitDialog().

CMString gPrevCvsCmdDir(20,"P_PrevCvsCmdDir") [static]

Referenced by CCmdLine_MAIN::CCmdLine_MAIN().

char* sDefPrevCvsCmd[]

Initial value:

{
    "cvs --help-options",
    "cvs --help-commands",
    "cvs --help-synonyms",
    "cvs -H <cvs_command>",
    0L
}
Default previous commands.

Definition at line 63 of file LineCmd.cpp.

Generated on Sat Aug 7 22:45:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LineCmd.h File Reference

common/LineCmd.h File Reference

#include "SmartComboBox.h"
#include "CPStr.h"
#include "MultilineEntryDlg.h"
#include "HHelpSupport.h"
#include "CvsArgs.h"

Include dependency graph for LineCmd.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCmdLine_MAIN
Command line settings property page. More...

Defines

#define | AFX_LINECMD_H__5946A8C5_8517_11D1_8949_444553540000__INCLUDED_
#define | DEF_CVS_CMD CVS_CMD " "

Functions

bool | CompatGetCommand (const MultiFiles *mf, UStr &cmd, UStr &dir, bool &addDefault, bool &addSelection, bool &forceCvsroot, UStr &cvsroot)
Get the command line options.

Define Documentation

#define AFX_LINECMD_H__5946A8C5_8517_11D1_8949_444553540000__INCLUDED_

Definition at line 22 of file LineCmd.h.

#define DEF_CVS_CMD CVS_CMD " "

Definition at line 40 of file LineCmd.h.

Referenced by CompatGetCommand(), CMultilineEntryDlg::OnSetfocusLogmsg(), and CMultilineEntryDlg::OnSetfocusLogmsgWrap().

Function Documentation

bool CompatGetCommand | ( | const MultiFiles * | mf,
 |  | UStr & | cmd,
 |  | UStr & | dir,
 |  | bool & | addDefault,
 |  | bool & | addSelection,
 |  | bool & | forceCvsroot,
 |  | UStr & | cvsroot
 | ) |

Get the command line options.

Definition at line 470 of file LineCmd.cpp.

References _i18n, BrowserGetDirectory(), CPStr, CStr, DEF_CVS_CMD, EV_INIT_WIDGET, FindBestLastCvsroot(), gCvsPrefs, CCmdLine_MAIN::GetCmdLine(), MultiFiles::getdir(), InsertLastCvsroot(), kUMainWidget, CCmdLine_MAIN::m_addDefault, CCmdLine_MAIN::m_addSelection, CCmdLine_MAIN::m_checkPath, CCmdLine_MAIN::m_cvsroot, CCmdLine_MAIN::m_folderLoc, CCmdLine_MAIN::m_forceRoot, MultiFiles::NumDirs(), CvsPrefs::save(), CGetPrefs_GLOBALS::StoreValues(), UCreate_CmdlineDlg(), and UEventSendMessage().

Referenced by CvsCmdCommandLine().

00473 {
00474     bool userHitOK = false;
00475
00476     static CStr sLastCmdline(DEF_CVS_CMD);
00477     static CStr sLastPath("");
00478     static bool sLastHasPath = false;
00479     static bool lastAddDefault = false;
00480     static bool lastAddSelection = false;
00481     static bool lastForceCvsroot = false;
00482     static CStr sLastCvsroot("");
00483
00484     if( mf && mf->NumDirs() > 0 )
00485     {
00486         CStr path;
00487         mf->getdir(0, path);
00488
00489         FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00490     }
00491
00492 #ifdef WIN32
00493     CHHelpPropertySheet pages(_i18n("Command line settings"));
00494     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00495
00496     CCmdLine_MAIN page1(mf, sLastCmdline, sLastHasPath, sLastPath, lastAddDefault, lastAddSelection, lastForceCvsroot, sLastCvsroot);
00497     CGetPrefs_GLOBALS page2;
00498
00499     pages.AddPage(&page1);
00500     pages.AddPage(&page2);
00501
00502     if( pages.DoModal() == IDOK )
00503     {
00504         sLastCmdline = page1.GetCmdLine();
00505         sLastHasPath = page1.m_checkPath == TRUE;
00506         sLastPath = page1.m_folderLoc;
00507         lastAddDefault = page1.m_addDefault ? true : false;
00508         lastAddSelection = page1.m_addSelection ? true : false;
00509         lastForceCvsroot = page1.m_forceRoot ? true : false;
00510         sLastCvsroot = page1.m_cvsroot;
00511
00512         page2.StoreValues();
00513
00514         userHitOK = true;
00515     }
00516 #endif /* WIN32 */
00517
00518 #if qUnix
00519     void *wid = UCreate_CmdlineDlg();
00520
00521     UCvsCmdline *dlg = new UCvsCmdline();
00522     UCvsCmdline_MAIN *tab1 = new UCvsCmdline_MAIN(sLastCmdline, sLastHasPath, sLastPath);
00523     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00524     dlg->AddPage(tab1, UCvsCmdline::kTabGeneral, 0);
00525
00526     if(dlg->DoModal())
00527     {
00528         sLastCmdline = tab1->m_cmdline;
00529         sLastHasPath = tab1->m_checkpath;
00530         sLastPath = tab1->m_folderloc;
00531
00532         userHitOK = true;
00533     }
00534
00535     delete dlg;
00536 #endif // qUnix
00537
00538 #ifdef qMacCvsPP
00539     StDialogHandler theHandler(dlg_Cmdline, LCommander::GetTopCommander());
00540     LWindow *theDialog = theHandler.GetDialog();
00541     ThrowIfNil_(theDialog);
00542     static UInt16 sRuntimePanel = 1;
00543
00544     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00545         (theDialog->FindPaneByID(item_MultiViewPrefs));
00546     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00547
00548     multiView->SwitchToPanel(2);
00549     DoDataExchange_Globals(theDialog, true);
00550     multiView->SwitchToPanel(1);
00551     DoDataExchange_CmdlineMain(theDialog, sLastCmdline, sLastPath, sLastHasPath, true);
00552
00553     LCheckBox *cbox = dynamic_cast<LCheckBox*>
00554         (theDialog->FindPaneByID(item_CheckGroupPath));
00555     LPushButton *epath = dynamic_cast<LPushButton*>
00556         (theDialog->FindPaneByID(item_EditPath));
00557     LEditText *pathDisplay = dynamic_cast<LEditText*>
00558         (theDialog->FindPaneByID(item_ShowPath));
00559     epath->AddListener(&theHandler);
00560     cbox->AddListener(&theHandler);
00561
00562     groupView->SetValue(sRuntimePanel);
00563     theDialog->Show();
00564     MessageT hitMessage;
00565     while (true)
00566     {       // Let DialogHandler process events
00567         hitMessage = theHandler.DoDialog();
00568
00569         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00570             break;
00571
00572         if(hitMessage == item_CheckGroupPath || hitMessage == item_EditPath)
00573         {
00574             cbox = dynamic_cast<LCheckBox*>
00575                 (theDialog->FindPaneByID(item_CheckGroupPath));
00576             pathDisplay = dynamic_cast<LEditText*>
00577                 (theDialog->FindPaneByID(item_ShowPath));
00578             if(cbox->GetValue() == Button_Off)
00579             {
00580                 continue;
00581             }
00582
00583             if( BrowserGetDirectory("Select where to execute", dir) )
00584             {
00585                 CPStr tmp(dir.c_str());
00586                 pathDisplay->SetDescriptor(tmp);
00587             }
00588             else if(hitMessage == item_CheckGroupPath)
00589             {
00590                 cbox->SetValue(Button_Off);
00591             }
00592         }
00593
00594     }
00595     theDialog->Hide();
00596     sRuntimePanel = groupView->GetValue();
00597
00598     if(hitMessage == msg_OK)
00599     {
00600         multiView->SwitchToPanel(1);
00601         DoDataExchange_CmdlineMain(theDialog, sLastCmdline, sLastPath, sLastHasPath, false);
00602         multiView->SwitchToPanel(2);
00603         DoDataExchange_Globals(theDialog, false);
00604         Assert_(sLastCmdline.length() != 0);
00605
00606         userHitOK = true;
00607     }
00608 #endif /* qMacCvsPP */
00609
00610     if( userHitOK )
00611     {
00612         cmd = sLastCmdline;
00613         dir = sLastHasPath ? sLastPath.c_str() : 0L;
00614
00615         addDefault = lastAddDefault;
00616         addSelection = lastAddSelection;
00617
00618         forceCvsroot = lastForceCvsroot;
00619         cvsroot = lastForceCvsroot ? sLastCvsroot.c_str() : 0L;
00620
00621         if( forceCvsroot )
00622         {
00623             CStr path;
00624
00625             if( sLastHasPath )
00626             {
00627                 path = dir;
00628             }
00629             else if( addSelection && mf && mf->NumDirs() > 0)
00630             {
00631                 mf->getdir(0, path);
00632             }
00633
00634             if( !path.empty() )
00635             {
00636                 InsertLastCvsroot(path, cvsroot);
00637             }
00638         }
00639
00640         gCvsPrefs.save();
00641     }
00642
00643     return userHitOK;
00644 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LogDlg.cpp File Reference

common/LogDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "OptionalPropertySheet.h"
#include "LogDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "MultiString.h"
#include "ItemListDlg.h"
#include "GetPrefs.h"

Include dependency graph for LogDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool | CompatGetLog (const MultiFiles *mf, bool &noRecurs, bool &defBranch, UStr &date, bool &headerOnly, bool &headerDesc, bool &supress, bool &noTags, bool &onlyRCSfile, bool &hasRev, UStr &rev, UStr &states, bool &hasUsers, UStr &users, bool outGraph)
Get the log options.

Variables

char * | sDefLogTagNames []
Default log tag names.
char * | sDefLogDateNames []
Default log date names.
char * | sDefLogStateNames []
Default log state names.
char * | sDefLogUserNames []
Default log user names.
CMString | gLogRevNames (10,"P_LogTagNames", sDefLogTagNames)
CMString | gLogDateNames (10,"P_LogDateNames", sDefLogDateNames)
CMString | gLogStateNames (10,"P_LogStateNames", sDefLogStateNames)
CMString | gLogUserNames (10,"P_LogUserNames", sDefLogUserNames)
CPersistentBool | gLogSupress ("P_LogSupress", false, kAddSettings)

Function Documentation

bool CompatGetLog | ( | const MultiFiles * | mf,
 |  | bool & | noRecurs,
 |  | bool & | defBranch,
 |  | UStr & | date,
 |  | bool & | headerOnly,
 |  | bool & | headerDesc,
 |  | bool & | supress,
 |  | bool & | noTags,
 |  | bool & | onlyRCSfile,
 |  | bool & | hasRev,
 |  | UStr & | rev,
 |  | UStr & | states,
 |  | bool & | hasUsers,
 |  | UStr & | users,
 |  | bool | outGraph
 | ) |

Get the log options.

Definition at line 663 of file LogDlg.cpp.

References CStr, EV_INIT_WIDGET, gCvsPrefs, gLogSupress, CvsPrefs::HideCommandDlgGraph(), CvsPrefs::HideCommandDlgLog(), kUMainWidget, CLogFilters::m_date, CLogMain::m_defBranch, CLogFilters::m_hasDate, CLogFilters::m_hasRev, CLogFilters::m_hasState, CLogFilters::m_hasUser, CLogMain::m_headerDesc, CLogMain::m_headerOnly, CLogMain::m_noRecurs, CLogMain::m_noTags, CLogMain::m_onlyRCS, CLogFilters::m_rev, CLogFilters::m_state, CLogMain::m_supress, CLogFilters::m_user, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgGraph(), CvsPrefs::SetHideCommandDlgLog(), CGetPrefs_GLOBALS::StoreValues(), UCreate_LogDlg(), and UEventSendMessage().

Referenced by CvsCmdLog().

00669 {
00670     bool userHitOK = false;
00671
00672     static CStr sLastDate;
00673     static CStr sLastRev;
00674     static CStr sLastUsers;
00675     static CStr sLastStates;
00676
00677     bool hasDate = false;
00678     bool hasStates = false;
00679
00680     hasRev = false;
00681     hasUsers = false;
00682     date = "";
00683     rev = "";
00684     states = "";
00685     users = "";
00686     noRecurs = false;
00687     defBranch = false;
00688     headerOnly = false;
00689     headerDesc = false;
00690     supress = (bool)gLogSupress;
00691     noTags = false;
00692     onlyRCSfile = false;
00693
00694 #ifdef WIN32
00695     COptionalPropertySheet pages(outGraph ? gCvsPrefs.HideCommandDlgGraph() : gCvsPrefs.HideCommandDlgLog(),
00696         outGraph ? "Graph settings" : "Log settings");
00697     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00698
00699     CLogMain page1(supress);
00700     CLogFilters page2(mf, sLastDate, sLastRev, sLastUsers, sLastStates);
00701     CGetPrefs_GLOBALS page3;
00702
00703     pages.AddPage(&page1);
00704     pages.AddPage(&page2);
00705     pages.AddPage(&page3);
00706
00707     if( pages.DoModal() == IDOK )
00708     {
00709         gLogSupress = page1.m_supress ? true : false;
00710
00711         noRecurs = page1.m_noRecurs == TRUE;
00712         defBranch = page1.m_defBranch == TRUE;
00713         headerOnly = page1.m_headerOnly == TRUE;
00714         headerDesc = page1.m_headerDesc == TRUE;
00715         noTags = page1.m_noTags == TRUE;
00716         onlyRCSfile = page1.m_onlyRCS == TRUE;
00717
00718         sLastDate = page2.m_date;
00719         sLastRev = page2.m_rev;
00720         sLastUsers = page2.m_user;
00721         sLastStates = page2.m_state;
00722
00723         hasRev = page2.m_hasRev == TRUE;
00724         hasUsers = page2.m_hasUser == TRUE;
00725         hasDate = page2.m_hasDate == TRUE;
00726         hasStates = page2.m_hasState == TRUE;
00727
00728         page3.StoreValues();
00729
00730         if( outGraph )
00731         {
00732             gCvsPrefs.SetHideCommandDlgGraph(pages.GetHideCommandDlg());
00733         }
00734         else
00735         {
00736             gCvsPrefs.SetHideCommandDlgLog(pages.GetHideCommandDlg());
00737         }
00738
00739         userHitOK = true;
00740     }
00741 #endif /* WIN32 */
00742 #ifdef qMacCvsPP
00743     StOptionalDialogHandler theHandler(dlg_Log, gCvsPrefs.HideCommandDlgLog(), LCommander::GetTopCommander());
00744     LWindow *theDialog = theHandler.GetDialog();
00745     ThrowIfNil_(theDialog);
00746     static UInt16 sRuntimePanel = 1;
00747     UInt16      msgEncoding(sCommitMsgEncoding);
00748
00749     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00750         (theDialog->FindPaneByID(item_MultiViewPrefs));
00751     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00752
00753     multiView->SwitchToPanel(3);
00754     DoDataExchange_Globals(theDialog, true);
00755     multiView->SwitchToPanel(2);
00756     DoDataExchange_LogFilters(theDialog, hasDate, hasStates, hasRev, hasUsers,
00757         sLastDate, sLastRev, sLastUsers, sLastStates, true);
00758     multiView->SwitchToPanel(1);
00759     DoDataExchange_LogSettings(theDialog, noRecurs, defBranch, headerOnly, noTags, onlyRCSfile, msgEncoding, true);
00760
00761     groupView->SetValue(sRuntimePanel);
00762     theHandler.ShowDialog();
00763     MessageT hitMessage;
00764     while (true)
00765     {       // Let DialogHandler process events
00766         hitMessage = theHandler.DoDialog();
00767
00768         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00769             break;
00770     }
00771     theDialog->Hide();
00772     sRuntimePanel = groupView->GetValue();
00773
00774     if(hitMessage == msg_OK)
00775     {
00776         multiView->SwitchToPanel(1);
00777         DoDataExchange_LogSettings(theDialog, noRecurs, defBranch, headerOnly, noTags, onlyRCSfile, msgEncoding, false);
00778         sCommitMsgEncoding = msgEncoding;
00779         multiView->SwitchToPanel(2);
00780         DoDataExchange_LogFilters(theDialog, hasDate, hasStates, hasRev, hasUsers,
00781         sLastDate, sLastRev, sLastUsers, sLastStates, false);
00782         multiView->SwitchToPanel(3);
00783         DoDataExchange_Globals(theDialog, false);
00784         gCvsPrefs.SetHideCommandDlgLog(theHandler.GetHideCommandDlg());
00785         userHitOK = true;
00786     }
00787 #endif /* qMacCvsPP */
00788 #if qUnix
00789     void *wid = UCreate_LogDlg();
00790
00791     UCvsLog *dlg = new UCvsLog();
00792     UCvsLog_MAIN *tab1 = new UCvsLog_MAIN();
00793     UCvsLog_FILTERS *tab2 = new UCvsLog_FILTERS(sLastDate, sLastRev, sLastUsers, sLastStates);
00794     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00795     dlg->AddPage(tab1, UCvsLog::kTabGeneral, 0);
00796     dlg->AddPage(tab2, UCvsLog::kTabGeneral, 1);
00797
00798     if(dlg->DoModal())
00799     {
00800         noRecurs = tab1->m_norecurs;
00801         defBranch = tab1->m_defbranch;
00802         headerOnly = tab1->m_nousers;
00803         noTags = tab1->m_notags;
00804         onlyRCSfile = tab1->m_onlyrcs;
00805
00806         sLastDate = tab2->m_date;
00807         sLastRev = tab2->m_rev;
00808         sLastUsers = tab2->m_user;
00809         sLastStates = tab2->m_state;
00810
00811         hasRev = tab2->m_hasrev;
00812         hasUsers = tab2->m_hasuser;
00813         hasDate = tab2->m_hasdate;
00814         hasStates = tab2->m_hasstate;
00815
00816         userHitOK = true;
00817     }
00818
00819     delete dlg;
00820 #endif // qUnix
00821
00822     if( userHitOK )
00823     {
00824         supress = (bool)gLogSupress;
00825
00826         if( hasDate && !sLastDate.empty() )
00827             date = sLastDate;
00828
00829         if( hasRev )
00830             rev = sLastRev;
00831
00832         if( hasUsers )
00833             users = sLastUsers;
00834
00835         if( hasStates && !sLastStates.empty() )
00836             states = sLastStates;
00837
00838         gCvsPrefs.save();
00839     }
00840
00841     return userHitOK;
00842 }

Here is the call graph for this function:

Variable Documentation

CMString gLogDateNames(10,"P_LogDateNames", sDefLogDateNames) [static]

Referenced by CLogFilters::CLogFilters().

CMString gLogRevNames(10,"P_LogTagNames", sDefLogTagNames) [static]

Referenced by CLogFilters::CLogFilters().

CMString gLogStateNames(10,"P_LogStateNames", sDefLogStateNames) [static]

Referenced by CLogFilters::CLogFilters().

CPersistentBool gLogSupress("P_LogSupress", false, kAddSettings) [static]

Referenced by CompatGetLog().

CMString gLogUserNames(10,"P_LogUserNames", sDefLogUserNames) [static]

Referenced by CLogFilters::CLogFilters().

char* sDefLogDateNames[]

Initial value:

{
    ">1998-3-24",
    "<1998-1-24",
    "1998-1-24<1998-3-24",
    "<=3-24",
    0L
}
Default log date names.

Definition at line 76 of file LogDlg.cpp.

char* sDefLogStateNames[]

Initial value:

{
    "mystate",
    "dead",
    "exp",
    "mystate,mystate2",
    0L
}
Default log state names.

Definition at line 86 of file LogDlg.cpp.

char* sDefLogTagNames[]

Initial value:

{
    "1.32:1.35",
    "1.32:",
    ":1.35",
    "branch-release1-0",
    "HEAD",
    0L
}
Default log tag names.

Definition at line 65 of file LogDlg.cpp.

char* sDefLogUserNames[]

Initial value:

{
    "johna",
    "garyb",
    "johna,garyb",
    0L
}
Default log user names.

Definition at line 96 of file LogDlg.cpp.

Generated on Sat Aug 7 22:45:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LogDlg.h File Reference

common/LogDlg.h File Reference

#include "SmartComboBox.h"
#include "HHelpSupport.h"

Include dependency graph for LogDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CLogMain
Main log dialog. More...
class | CLogFilters
Filters log dialog. More...

Defines

#define | AFX_LOGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

bool | CompatGetLog (const MultiFiles *mf, bool &noRecurs, bool &defBranch, UStr &date, bool &headerOnly, bool &headerDesc, bool &supress, bool &noTags, bool &onlyRCSfile, bool &hasRev, UStr &rev, UStr &states, bool &hasUser, UStr &users, bool outGraph=false)
Get the log options.

Define Documentation

#define AFX_LOGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file LogDlg.h.

Function Documentation

bool CompatGetLog | ( | const MultiFiles * | mf,
 |  | bool & | noRecurs,
 |  | bool & | defBranch,
 |  | UStr & | date,
 |  | bool & | headerOnly,
 |  | bool & | headerDesc,
 |  | bool & | supress,
 |  | bool & | noTags,
 |  | bool & | onlyRCSfile,
 |  | bool & | hasRev,
 |  | UStr & | rev,
 |  | UStr & | states,
 |  | bool & | hasUser,
 |  | UStr & | users,
 |  | bool | outGraph = false
 | ) |

Get the log options.

Definition at line 663 of file LogDlg.cpp.

References CStr, EV_INIT_WIDGET, gCvsPrefs, gLogSupress, CvsPrefs::HideCommandDlgGraph(), CvsPrefs::HideCommandDlgLog(), kUMainWidget, CLogFilters::m_date, CLogMain::m_defBranch, CLogFilters::m_hasDate, CLogFilters::m_hasRev, CLogFilters::m_hasState, CLogFilters::m_hasUser, CLogMain::m_headerDesc, CLogMain::m_headerOnly, CLogMain::m_noRecurs, CLogMain::m_noTags, CLogMain::m_onlyRCS, CLogFilters::m_rev, CLogFilters::m_state, CLogMain::m_supress, CLogFilters::m_user, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgGraph(), CvsPrefs::SetHideCommandDlgLog(), CGetPrefs_GLOBALS::StoreValues(), UCreate_LogDlg(), and UEventSendMessage().

Referenced by CvsCmdLog().

00669 {
00670     bool userHitOK = false;
00671
00672     static CStr sLastDate;
00673     static CStr sLastRev;
00674     static CStr sLastUsers;
00675     static CStr sLastStates;
00676
00677     bool hasDate = false;
00678     bool hasStates = false;
00679
00680     hasRev = false;
00681     hasUsers = false;
00682     date = "";
00683     rev = "";
00684     states = "";
00685     users = "";
00686     noRecurs = false;
00687     defBranch = false;
00688     headerOnly = false;
00689     headerDesc = false;
00690     supress = (bool)gLogSupress;
00691     noTags = false;
00692     onlyRCSfile = false;
00693
00694 #ifdef WIN32
00695     COptionalPropertySheet pages(outGraph ? gCvsPrefs.HideCommandDlgGraph() : gCvsPrefs.HideCommandDlgLog(),
00696         outGraph ? "Graph settings" : "Log settings");
00697     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00698
00699     CLogMain page1(supress);
00700     CLogFilters page2(mf, sLastDate, sLastRev, sLastUsers, sLastStates);
00701     CGetPrefs_GLOBALS page3;
00702
00703     pages.AddPage(&page1);
00704     pages.AddPage(&page2);
00705     pages.AddPage(&page3);
00706
00707     if( pages.DoModal() == IDOK )
00708     {
00709         gLogSupress = page1.m_supress ? true : false;
00710
00711         noRecurs = page1.m_noRecurs == TRUE;
00712         defBranch = page1.m_defBranch == TRUE;
00713         headerOnly = page1.m_headerOnly == TRUE;
00714         headerDesc = page1.m_headerDesc == TRUE;
00715         noTags = page1.m_noTags == TRUE;
00716         onlyRCSfile = page1.m_onlyRCS == TRUE;
00717
00718         sLastDate = page2.m_date;
00719         sLastRev = page2.m_rev;
00720         sLastUsers = page2.m_user;
00721         sLastStates = page2.m_state;
00722
00723         hasRev = page2.m_hasRev == TRUE;
00724         hasUsers = page2.m_hasUser == TRUE;
00725         hasDate = page2.m_hasDate == TRUE;
00726         hasStates = page2.m_hasState == TRUE;
00727
00728         page3.StoreValues();
00729
00730         if( outGraph )
00731         {
00732             gCvsPrefs.SetHideCommandDlgGraph(pages.GetHideCommandDlg());
00733         }
00734         else
00735         {
00736             gCvsPrefs.SetHideCommandDlgLog(pages.GetHideCommandDlg());
00737         }
00738
00739         userHitOK = true;
00740     }
00741 #endif /* WIN32 */
00742 #ifdef qMacCvsPP
00743     StOptionalDialogHandler theHandler(dlg_Log, gCvsPrefs.HideCommandDlgLog(), LCommander::GetTopCommander());
00744     LWindow *theDialog = theHandler.GetDialog();
00745     ThrowIfNil_(theDialog);
00746     static UInt16 sRuntimePanel = 1;
00747     UInt16      msgEncoding(sCommitMsgEncoding);
00748
00749     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00750         (theDialog->FindPaneByID(item_MultiViewPrefs));
00751     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00752
00753     multiView->SwitchToPanel(3);
00754     DoDataExchange_Globals(theDialog, true);
00755     multiView->SwitchToPanel(2);
00756     DoDataExchange_LogFilters(theDialog, hasDate, hasStates, hasRev, hasUsers,
00757         sLastDate, sLastRev, sLastUsers, sLastStates, true);
00758     multiView->SwitchToPanel(1);
00759     DoDataExchange_LogSettings(theDialog, noRecurs, defBranch, headerOnly, noTags, onlyRCSfile, msgEncoding, true);
00760
00761     groupView->SetValue(sRuntimePanel);
00762     theHandler.ShowDialog();
00763     MessageT hitMessage;
00764     while (true)
00765     {       // Let DialogHandler process events
00766         hitMessage = theHandler.DoDialog();
00767
00768         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00769             break;
00770     }
00771     theDialog->Hide();
00772     sRuntimePanel = groupView->GetValue();
00773
00774     if(hitMessage == msg_OK)
00775     {
00776         multiView->SwitchToPanel(1);
00777         DoDataExchange_LogSettings(theDialog, noRecurs, defBranch, headerOnly, noTags, onlyRCSfile, msgEncoding, false);
00778         sCommitMsgEncoding = msgEncoding;
00779         multiView->SwitchToPanel(2);
00780         DoDataExchange_LogFilters(theDialog, hasDate, hasStates, hasRev, hasUsers,
00781         sLastDate, sLastRev, sLastUsers, sLastStates, false);
00782         multiView->SwitchToPanel(3);
00783         DoDataExchange_Globals(theDialog, false);
00784         gCvsPrefs.SetHideCommandDlgLog(theHandler.GetHideCommandDlg());
00785         userHitOK = true;
00786     }
00787 #endif /* qMacCvsPP */
00788 #if qUnix
00789     void *wid = UCreate_LogDlg();
00790
00791     UCvsLog *dlg = new UCvsLog();
00792     UCvsLog_MAIN *tab1 = new UCvsLog_MAIN();
00793     UCvsLog_FILTERS *tab2 = new UCvsLog_FILTERS(sLastDate, sLastRev, sLastUsers, sLastStates);
00794     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00795     dlg->AddPage(tab1, UCvsLog::kTabGeneral, 0);
00796     dlg->AddPage(tab2, UCvsLog::kTabGeneral, 1);
00797
00798     if(dlg->DoModal())
00799     {
00800         noRecurs = tab1->m_norecurs;
00801         defBranch = tab1->m_defbranch;
00802         headerOnly = tab1->m_nousers;
00803         noTags = tab1->m_notags;
00804         onlyRCSfile = tab1->m_onlyrcs;
00805
00806         sLastDate = tab2->m_date;
00807         sLastRev = tab2->m_rev;
00808         sLastUsers = tab2->m_user;
00809         sLastStates = tab2->m_state;
00810
00811         hasRev = tab2->m_hasrev;
00812         hasUsers = tab2->m_hasuser;
00813         hasDate = tab2->m_hasdate;
00814         hasStates = tab2->m_hasstate;
00815
00816         userHitOK = true;
00817     }
00818
00819     delete dlg;
00820 #endif // qUnix
00821
00822     if( userHitOK )
00823     {
00824         supress = (bool)gLogSupress;
00825
00826         if( hasDate && !sLastDate.empty() )
00827             date = sLastDate;
00828
00829         if( hasRev )
00830             rev = sLastRev;
00831
00832         if( hasUsers )
00833             users = sLastUsers;
00834
00835         if( hasStates && !sLastStates.empty() )
00836             states = sLastStates;
00837
00838         gCvsPrefs.save();
00839     }
00840
00841     return userHitOK;
00842 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LoginDlg.cpp File Reference

common/LoginDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "CvsPrefs.h"
#include "GetPrefs.h"
#include "LoginDlg.h"
#include "CvsRootDlg.h"

Include dependency graph for LoginDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetLogin (bool &forceCvsroot, UStr &cvsroot)
Get the login options.

Function Documentation

bool CompatGetLogin | ( | bool & | forceCvsroot,
 |  | UStr & | cvsroot
 | ) |

Get the login options.

Definition at line 153 of file LoginDlg.cpp.

References CStr, gCvsPrefs, CLogin_MAIN::m_cvsroot, CLogin_MAIN::m_forceRoot, CvsPrefs::save(), and CGetPrefs_GLOBALS::StoreValues().

00154 {
00155     bool userHitOK = false;
00156
00157     static bool lastForceCvsroot = true;
00158     static CStr sLastCvsroot("");
00159
00160 #ifdef WIN32
00161     CHHelpPropertySheet pages("Login settings");
00162     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00163
00164     CLogin_MAIN page1(lastForceCvsroot, sLastCvsroot);
00165     CGetPrefs_GLOBALS page2;
00166
00167     pages.AddPage(&page1);
00168     pages.AddPage(&page2);
00169
00170     if( pages.DoModal() == IDOK )
00171     {
00172         lastForceCvsroot = page1.m_forceRoot == TRUE;
00173         sLastCvsroot = page1.m_cvsroot;
00174
00175         page2.StoreValues();
00176
00177         userHitOK = true;
00178     }
00179 #else
00180   userHitOK = true;
00181 #endif /* WIN32 */
00182
00183     if( userHitOK )
00184     {
00185         forceCvsroot = lastForceCvsroot;
00186         cvsroot = sLastCvsroot;
00187
00188         gCvsPrefs.save();
00189     }
00190
00191     return userHitOK;
00192 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LoginDlg.h File Reference

common/LoginDlg.h File Reference

#include "HHelpSupport.h"

Include dependency graph for LoginDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CLogin_MAIN

Defines

#define | AFX_LOGIN_MAIN_H__CF191044_0332_477E_ABD2_13E56D643C14__INCLUDED_

Functions

bool | CompatGetLogin (bool &forceCvsroot, CStr &cvsroot)

Define Documentation

#define AFX_LOGIN_MAIN_H__CF191044_0332_477E_ABD2_13E56D643C14__INCLUDED_

Definition at line 26 of file LoginDlg.h.

Function Documentation

bool CompatGetLogin | ( | bool & | forceCvsroot,
 |  | CStr & | cvsroot
 | ) |

Referenced by CvsCmdLogin().

Generated on Sat Aug 7 22:45:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LogParse.cpp File Reference

common/LogParse.cpp File Reference

#include "stdafx.h"
#include <errno.h>
#include <stdio.h>
#include "wincvs.h"
#include "GraphDoc.h"
#include "wincvs_winutil.h"
#include "LogParse.h"
#include "CvsArgs.h"
#include "CvsLog.h"
#include "AppGlue.h"
#include "AppConsole.h"
#include "CPStr.h"
#include "getline.h"

Include dependency graph for LogParse.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | print (CColorConsole &out, const CRevFile &rev)
void | print (CColorConsole &out, const CRcsFile &rcs, bool recurse=true)
void | print (CColorConsole &out, const CLogNode *node, UStr &offset)
void | print (CColorConsole &out, const char *prefix, const char *nodeStr, bool separator=true)
void | CvsLogOutput (CColorConsole &out, CLogNode *node)
void | CvsLogParse (const char *dir, const CvsArgs &args, const bool outGraph, void *defWnd)

Function Documentation

void CvsLogOutput | ( | CColorConsole & | out,
 |  | CLogNode * | node
 | ) |

Print a syntax colored of the cvs log node

Parameters:
out | Console
node | Log node
Definition at line 256 of file LogParse.cpp.

References print().

Referenced by UCvsGraph::OnBtnClick(), CGraphView::OnKeyDown(), and CGraphView::OnLButtonDown().

00257 {
00258     switch(node->GetType())
00259     {
00260     case kNodeHeader:
00261         {
00262             CRcsFile& rcs = **(CLogNodeHeader*)node;
00263             print(out, rcs, false);
00264         }
00265         break;
00266     case kNodeBranch:
00267         {
00268             CLogStr& str = **(CLogNodeBranch*)node;
00269             print(out, "Branch", str);
00270         }
00271         break;
00272     case kNodeRev:
00273         {
00274             CRevFile& rev = **(CLogNodeRev*)node;
00275             print(out, rev);
00276         }
00277         break;
00278     case kNodeTag:
00279         {
00280             CLogStr& str = **(CLogNodeTag*)node;
00281             print(out, "Tag", str);
00282         }
00283         break;
00284     }
00285 }

Here is the call graph for this function:

void CvsLogParse | ( | const char * | dir,
 |  | const CvsArgs & | args,
 |  | const bool | outGraph,
 |  | void * | defWnd
 | ) |

Launch a CVS log command, parse the output, output a graph or a syntax colored of the cvs log output

Parameters:
dir | Directory
args | Arguments
outGraph | true if the output is for graph, false if for the log command
defWnd | Default window
Definition at line 294 of file LogParse.cpp.

References CStr, cvs_err(), cvs_outstr(), EV_INIT_WIDGET, EV_SHOW_WIDGET, free, getline(), CWincvsApp::GetLogGraph(), UCmdTarget::GetWidID(), kUMainWidget, launchCVS(), NULL, print(), CGraphDoc::SetNode(), UCreate_GraphWindow(), UEventSendMessage(), UMAKEINT, and wnt_unlink().

Referenced by CvsCmdLog(), cvsgui_GetHistoryAsXML(), and CGraphView::OnViewReload().

00295 {
00296     // Make a stream of the cvs log output
00297     CStr tmpFile;
00298     FILE* output = launchCVS(dir, args, tmpFile);
00299     if( output == 0L )
00300         return;
00301
00302     // Parse
00303     std::vector<CRcsFile>& allRcs = CvsLogParse(output);
00304
00305     // Maybe something went wrong or may be the user
00306     // asked to print only the RCS names, so print the
00307     // output directly without parsing../
00308     if( allRcs.empty() )
00309     {
00310         char* line = 0L;
00311         size_t line_chars_allocated = 0;
00312         int line_length = 0;
00313
00314         fseek(output, SEEK_SET, 0);
00315
00316         while( (line_length = getline(&line, &line_chars_allocated, output)) > 0 )
00317         {
00318             cvs_outstr(line, line_length);
00319             cvs_outstr("\n", 1);
00320         }
00321
00322         if( line_length < 0 && !feof(output) )
00323             cvs_err("Cannot read output file (error %d)\n", errno);
00324
00325         if( line != 0L )
00326             free(line);
00327     }
00328
00329     // Close the temp file
00330     fclose(output);
00331
00332 #ifdef WIN32
00333     if( wnt_unlink(tmpFile) != 0 )
00334 #else
00335     if( unlink(tmpFile) != 0 )
00336 #endif
00337     {
00338         cvs_err("Impossible to delete the file '%s' (error %d)\n", (const char*)tmpFile, errno);
00339     }
00340
00341     if( allRcs.empty() )
00342         return;
00343
00344     // Output the result
00345     CColorConsole out;
00346
00347     std::vector<CRcsFile>::iterator i;
00348     for(i = allRcs.begin(); i != allRcs.end(); ++i)
00349     {
00350         CRcsFile& rcs = *i;
00351
00352         if( !outGraph )
00353         {
00354             print(out, rcs);
00355         }
00356         else
00357         {
00358             CLogNode* node = CvsLogGraph(rcs);
00359             if( node == 0L )
00360             {
00361                 cvs_err("Impossible to create a graph for %s\n", (const char*)rcs.WorkingFile());
00362             }
00363
00364 #ifdef WIN32
00365             CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00366             CGraphDoc* doc;
00367
00368             if( defWnd != 0L )
00369                 doc = (CGraphDoc*)defWnd;
00370             else
00371                 doc = (CGraphDoc*)app->GetLogGraph()->OpenDocumentFile(NULL);
00372
00373             doc->SetNode(node, dir);
00374 #elif qMacCvsPP
00375             if( defWnd != 0L )
00376                 ((CTreeView*)defWnd)->SetNode(node, dir);
00377             else
00378                 CMacCvsApp::gApp->NewLogTree(node, dir);
00379 #elif qUnix
00380             UCvsGraph* graph = new UCvsGraph(node, dir);
00381             void* win = UCreate_GraphWindow();
00382
00383             UEventSendMessage(graph->GetWidID(), EV_INIT_WIDGET, kUMainWidget, win);
00384             UEventSendMessage(graph->GetWidID(), EV_SHOW_WIDGET, UMAKEINT(kUMainWidget, 1), 0L);
00385 #else
00386             CStr offset;
00387             print(out, node, offset);
00388             delete node;
00389 #endif
00390         }
00391     }
00392
00393     // Reset the parser
00394     CvsLogReset();
00395 }

Here is the call graph for this function:

void print | ( | CColorConsole & | out,
 |  | const char * | prefix,
 |  | const char * | nodeStr,
 |  | bool | separator = true
 | ) | [static]

Print the file node string

Parameters:
out | Console
prefix | Node information prefix
nodeStr | Node string
separator | true to print the separator line, false otherwise
Definition at line 241 of file LogParse.cpp.

References kBlue, kBold, kNL, and kNormal.

Referenced by CvsLogOutput(), CvsLogParse(), and print().

00242 {
00243     if( separator )
00244     {
00245         out << kBlue << "----------------------------" << kNormal << kNL;
00246     }
00247
00248     out << prefix << " : " << kBold << nodeStr << kNormal << kNL;
00249 }

void print | ( | CColorConsole & | out,
 |  | const CLogNode * | node,
 |  | UStr & | offset
 | ) | [static]

Print the log node information

Parameters:
out | Console
node | Log node
offset | Offset string
Definition at line 194 of file LogParse.cpp.

References CStr, kBold, kNL, kNormal, kRed, and print().

00195 {
00196     out << offset;
00197     switch(node->GetType())
00198     {
00199     case kNodeHeader :
00200         {
00201             CLogNodeHeader *header = (CLogNodeHeader*)node;
00202             out << offset << "Rcs file : '" << kRed << (**header).RcsFile() << kNormal << '\'' << kNL;
00203         }
00204         break;
00205     case kNodeBranch :
00206         break;
00207     case kNodeRev :
00208         {
00209             CLogNodeRev *rev = (CLogNodeRev*)node;
00210             out << offset << kBold << (**rev).RevNum().c_str() << kNormal << kNL;
00211         }
00212         break;
00213     case kNodeTag :
00214         break;
00215     }
00216
00217     CStr newOffset;
00218     newOffset = offset;
00219     newOffset << "    ";
00220
00221     std::vector<CLogNode *>::const_iterator i;
00222     for(i = node->Childs().begin(); i != node->Childs().end(); ++i)
00223     {
00224         print(out, *i, newOffset);
00225         newOffset << ' ';
00226     }
00227
00228     if( node->Next() != 0L )
00229     {
00230         print(out, node->Next(), offset);
00231     }
00232 }

Here is the call graph for this function:

void print | ( | CColorConsole & | out,
 |  | const CRcsFile & | rcs,
 |  | bool | recurse = true
 | ) | [static]

Print the file RCS information

Parameters:
out | Console
rcs | RCS file
recurse | true for recursive, false otherwise
Definition at line 135 of file LogParse.cpp.

References kBold, kBrown, kGreen, kNL, kNormal, kRed, and print().

00136 {
00137     out << "Rcs file : '" << kRed << rcs.RcsFile() << kNormal << '\'' << kNL;
00138     out << "Working file : '" << kBold << rcs.WorkingFile() << kNormal << '\'' << kNL;
00139     out << "Head revision : " << kBold << kRed << rcs.HeadRev().c_str() << kNormal << kNL;
00140     out << "Branch revision : " << kBold << rcs.BranchRev().c_str() << kNormal << kNL;
00141
00142     out << "Locks :" << kBold << (rcs.LockStrict() ? " strict" : "") << kNormal << kNL;
00143
00144     std::vector<CRevNumber>::const_iterator s;
00145     for(s = rcs.LocksList().begin(); s != rcs.LocksList().end(); ++s)
00146     {
00147         const CRevNumber & lock = *s;
00148         out << '\t' << kBold << lock.c_str() << " : '" << lock.Tag() << '\'' << kNormal << kNL;
00149     }
00150
00151     out << "Access :" << kNL;
00152
00153     std::vector<CLogStr>::const_iterator a;
00154     for(a = rcs.AccessList().begin(); a != rcs.AccessList().end(); ++a)
00155     {
00156         out << "\t'" << kBold << *a << kNormal << '\'' << kNL;
00157     }
00158
00159     if( !rcs.SymbolicList().empty() )
00160     {
00161         out << "Symbolic names :" << kNL;
00162
00163         std::vector<CRevNumber>::const_iterator n;
00164         for(n = rcs.SymbolicList().begin(); n != rcs.SymbolicList().end(); ++n)
00165         {
00166             const CRevNumber & symb = *n;
00167             out << '\t' << kBold << symb.c_str() << " : '" << symb.Tag() << '\'' << kNormal << kNL;
00168         }
00169     }
00170
00171     out << "Keyword substitution : '" << kBold << rcs.KeywordSubst() << kNormal << '\'' << kNL;
00172     out << "Total revisions : " << kBold << rcs.TotRevisions() << kNormal << kNL;
00173     out << "Selected revisions : " << kBold << rcs.SelRevisions() << kNormal << kNL;
00174     out << "Description :" << kNL << kBrown << rcs.DescLog() << kNormal << kNL;
00175
00176     if( recurse )
00177     {
00178         std::vector<CRevFile>::const_iterator i;
00179         for(i = rcs.AllRevs().begin(); i != rcs.AllRevs().end(); ++i)
00180         {
00181             print(out, *i);
00182         }
00183     }
00184
00185     out << kGreen << "===============================================" << kNormal << kNL;
00186 }

Here is the call graph for this function:

void print | ( | CColorConsole & | out,
 |  | const CRevFile & | rev
 | ) | [static]

Print the file revision information

Parameters:
out | Console
rev | File revision
Definition at line 78 of file LogParse.cpp.

References ConvertString(), kBlue, kBold, kBrown, kNL, kNormal, and kRed.

00079 {
00080     out << kBlue << "----------------------------" << kNormal << kNL;
00081     out << "Revision : " << kBold << kRed << rev.RevNum().c_str() << kNormal << kNL;
00082
00083     if( !rev.Locker().empty() )
00084         out << "Locked by : '" << kBold << rev.Locker() << kNormal << '\'' << kNL;
00085
00086     out << "Date : " << kBold <<
00087         (rev.RevTime().tm_year + 1900) << '/' <<
00088         rev.RevTime().tm_mon << '/' <<
00089         rev.RevTime().tm_mday << ' ' <<
00090         rev.RevTime().tm_hour << ':' <<
00091         rev.RevTime().tm_min << ':' <<
00092         rev.RevTime().tm_sec << kNormal << kNL;
00093
00094     out << "Author : '" << kBold << rev.Author() << kNormal << '\'' << kNL;
00095     out << "State : '" << kBold << rev.State() << kNormal << '\'' << kNL;
00096     out << "Lines : +" << kBold << rev.ChgPos() << ' ' << rev.ChgNeg() << kNormal << kNL;
00097
00098     if( !rev.BranchesList().empty() )
00099     {
00100         out << "Branches :" << kNL;
00101
00102         std::vector<CRevNumber>::const_iterator s;
00103         for(s = rev.BranchesList().begin(); s != rev.BranchesList().end(); ++s)
00104         {
00105             const CRevNumber& branch = *s;
00106             out << '\t' << kBold << branch.c_str() << kNormal << kNL;
00107         }
00108     }
00109
00110     if( !rev.KeywordSubst().empty() )
00111         out << "Keyword : '" << kBold << rev.KeywordSubst() << kNormal << '\'' << kNL;
00112
00113     if( !rev.CommitID().empty() )
00114         out << "CommitID : '" << kBold << rev.CommitID() << kNormal << '\'' << kNL;
00115
00116     if( !rev.MergePoint().empty() )
00117         out << "MergePoint : '" << kBold << rev.MergePoint().c_str() << kNormal << '\'' << kNL;
00118
00119     out << "Description :" << kNL << kBrown;
00120 #ifdef qMacCvsPP
00121   if ( sCommitMsgEncoding == kMsgEncodingMacOSRoman ) out << rev.DescLog();
00122   else out << ConvertString(rev.DescLog(), sCommitMsgEncoding == kMsgEncodingUTF8 ? kCFStringEncodingUTF8 : kCFStringEncodingISOLatin1, kCFStringEncodingMacRoman, true);
00123 #else
00124     out << rev.DescLog();
00125 #endif
00126     out << kNormal << kNL;
00127 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LogParse.h File Reference

common/LogParse.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | AFX_LOGPARSE_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

void | CvsLogParse (const char *dir, const CvsArgs &args, const bool outGraph=false, void *defWnd=0L)
void | CvsLogOutput (CColorConsole &out, CLogNode *node)

Define Documentation

#define AFX_LOGPARSE_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file LogParse.h.

Function Documentation

void CvsLogOutput | ( | CColorConsole & | out,
 |  | CLogNode * | node
 | ) |

Print a syntax colored of the cvs log node

Parameters:
out | Console
node | Log node
Definition at line 256 of file LogParse.cpp.

References print().

Referenced by UCvsGraph::OnBtnClick(), CGraphView::OnKeyDown(), and CGraphView::OnLButtonDown().

00257 {
00258     switch(node->GetType())
00259     {
00260     case kNodeHeader:
00261         {
00262             CRcsFile& rcs = **(CLogNodeHeader*)node;
00263             print(out, rcs, false);
00264         }
00265         break;
00266     case kNodeBranch:
00267         {
00268             CLogStr& str = **(CLogNodeBranch*)node;
00269             print(out, "Branch", str);
00270         }
00271         break;
00272     case kNodeRev:
00273         {
00274             CRevFile& rev = **(CLogNodeRev*)node;
00275             print(out, rev);
00276         }
00277         break;
00278     case kNodeTag:
00279         {
00280             CLogStr& str = **(CLogNodeTag*)node;
00281             print(out, "Tag", str);
00282         }
00283         break;
00284     }
00285 }

Here is the call graph for this function:

void CvsLogParse | ( | const char * | dir,
 |  | const CvsArgs & | args,
 |  | const bool | outGraph,
 |  | void * | defWnd
 | ) |

Launch a CVS log command, parse the output, output a graph or a syntax colored of the cvs log output

Parameters:
dir | Directory
args | Arguments
outGraph | true if the output is for graph, false if for the log command
defWnd | Default window
Definition at line 294 of file LogParse.cpp.

References CStr, cvs_err(), cvs_outstr(), EV_INIT_WIDGET, EV_SHOW_WIDGET, free, getline(), CWincvsApp::GetLogGraph(), UCmdTarget::GetWidID(), kUMainWidget, launchCVS(), NULL, print(), CGraphDoc::SetNode(), UCreate_GraphWindow(), UEventSendMessage(), UMAKEINT, and wnt_unlink().

Referenced by CvsCmdLog(), cvsgui_GetHistoryAsXML(), and CGraphView::OnViewReload().

00295 {
00296     // Make a stream of the cvs log output
00297     CStr tmpFile;
00298     FILE* output = launchCVS(dir, args, tmpFile);
00299     if( output == 0L )
00300         return;
00301
00302     // Parse
00303     std::vector<CRcsFile>& allRcs = CvsLogParse(output);
00304
00305     // Maybe something went wrong or may be the user
00306     // asked to print only the RCS names, so print the
00307     // output directly without parsing../
00308     if( allRcs.empty() )
00309     {
00310         char* line = 0L;
00311         size_t line_chars_allocated = 0;
00312         int line_length = 0;
00313
00314         fseek(output, SEEK_SET, 0);
00315
00316         while( (line_length = getline(&line, &line_chars_allocated, output)) > 0 )
00317         {
00318             cvs_outstr(line, line_length);
00319             cvs_outstr("\n", 1);
00320         }
00321
00322         if( line_length < 0 && !feof(output) )
00323             cvs_err("Cannot read output file (error %d)\n", errno);
00324
00325         if( line != 0L )
00326             free(line);
00327     }
00328
00329     // Close the temp file
00330     fclose(output);
00331
00332 #ifdef WIN32
00333     if( wnt_unlink(tmpFile) != 0 )
00334 #else
00335     if( unlink(tmpFile) != 0 )
00336 #endif
00337     {
00338         cvs_err("Impossible to delete the file '%s' (error %d)\n", (const char*)tmpFile, errno);
00339     }
00340
00341     if( allRcs.empty() )
00342         return;
00343
00344     // Output the result
00345     CColorConsole out;
00346
00347     std::vector<CRcsFile>::iterator i;
00348     for(i = allRcs.begin(); i != allRcs.end(); ++i)
00349     {
00350         CRcsFile& rcs = *i;
00351
00352         if( !outGraph )
00353         {
00354             print(out, rcs);
00355         }
00356         else
00357         {
00358             CLogNode* node = CvsLogGraph(rcs);
00359             if( node == 0L )
00360             {
00361                 cvs_err("Impossible to create a graph for %s\n", (const char*)rcs.WorkingFile());
00362             }
00363
00364 #ifdef WIN32
00365             CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00366             CGraphDoc* doc;
00367
00368             if( defWnd != 0L )
00369                 doc = (CGraphDoc*)defWnd;
00370             else
00371                 doc = (CGraphDoc*)app->GetLogGraph()->OpenDocumentFile(NULL);
00372
00373             doc->SetNode(node, dir);
00374 #elif qMacCvsPP
00375             if( defWnd != 0L )
00376                 ((CTreeView*)defWnd)->SetNode(node, dir);
00377             else
00378                 CMacCvsApp::gApp->NewLogTree(node, dir);
00379 #elif qUnix
00380             UCvsGraph* graph = new UCvsGraph(node, dir);
00381             void* win = UCreate_GraphWindow();
00382
00383             UEventSendMessage(graph->GetWidID(), EV_INIT_WIDGET, kUMainWidget, win);
00384             UEventSendMessage(graph->GetWidID(), EV_SHOW_WIDGET, UMAKEINT(kUMainWidget, 1), 0L);
00385 #else
00386             CStr offset;
00387             print(out, node, offset);
00388             delete node;
00389 #endif
00390         }
00391     }
00392
00393     // Reset the parser
00394     CvsLogReset();
00395 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacBinEncoding.cpp File Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

common/MacBinEncoding.cpp File Reference

Go to the source code of this file.

Generated on Sat Aug 7 22:45:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacBinEncoding.h File Reference

common/MacBinEncoding.h File Reference

#include <LOutlineTable.h>
#include <LCommander.h>
#include <LOutlineItem.h>
#include <LString.h>
#include "MacBinMaps.h"

Include dependency graph for MacBinEncoding.h:

Include dependency graph

Go to the source code of this file.

Classes

class | CMacBinTable
class | CMacBinItem

Generated on Sat Aug 7 22:45:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacBinMaps.cpp File Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

common/MacBinMaps.cpp File Reference

Go to the source code of this file.

Generated on Sat Aug 7 22:45:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacBinMaps.h File Reference

common/MacBinMaps.h File Reference

#include "CvsPrefs.h"

Include dependency graph for MacBinMaps.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | MACBINMAP
struct | MACBINMAPENTRIES
class | MacBinMaps

Defines

#define | MAX_MACBIN_DESC 63
#define | MAX_MACBIN_EXTENSION 31
#define | MACBINMAP_COOKIEVALUE 0xc001cafe

Define Documentation

#define MACBINMAP_COOKIEVALUE 0xc001cafe

Definition at line 43 of file MacBinMaps.h.

#define MAX_MACBIN_DESC 63

Definition at line 32 of file MacBinMaps.h.

#define MAX_MACBIN_EXTENSION 31

Definition at line 33 of file MacBinMaps.h.

Generated on Sat Aug 7 22:45:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacMisc.cpp File Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

common/MacMisc.cpp File Reference

Go to the source code of this file.

Generated on Sat Aug 7 22:45:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacMisc.h File Reference

common/MacMisc.h File Reference

#include "TextBinary.h"
#include "ustr.h"
#include <Dialogs.h>

Include dependency graph for MacMisc.h:

Include dependency graph

Go to the source code of this file.

Functions

Handle | GetDItemHdl (DialogPtr dlg, SInt16 Id)
ControlHandle | GetDItemCtrlHdl (DialogPtr dlg, SInt16 Id)
SInt16 | GetDItemMenuSel (DialogPtr dlg, SInt16 Id)
void | SetDItemMenuSel (DialogPtr dlg, SInt16 Id, SInt16 sel)
OSErr | MacGetSpecialFolder (FSSpec &theFolder, UStr &thePath, OSType inType, const char *inDesc, bool createFolder=false)
OSErr | MacGetTempFolder (FSSpec &theFolder, UStr &thePath)
OSErr | MacGetPrefsFolder (FSSpec &theFolder, UStr &thePath)
UStr | ConvertString (const char *inStringToConvert, CFStringEncoding inInputEncoding, CFStringEncoding inOutputEncoding, bool allowLossyConversion=false)
UStr | SysEncoding_to_UTF8 (const char *sysEncodedString, bool allowLossyConversion=false)
UStr | UTF8_to_SysEncoding (const char *utf8EncodedString, bool allowLossyConversion=false)
UStr | LString_to_UTF8 (const LString &inString, bool allowLossyConversion=false)
LStr255 | UTF8_to_LString (const char *inString, bool allowLossyConversion=false)
UStr | CFString_to_UStr (CFStringRef inStringToConvert, CFStringEncoding inRequestedEncoding, bool *outConversionSuccessful=NULL)

Function Documentation

UStr CFString_to_UStr | ( | CFStringRef | inStringToConvert,
 |  | CFStringEncoding | inRequestedEncoding,
 |  | bool * | outConversionSuccessful = NULL
 | ) |

Referenced by CPersistent::LoadAll().

UStr ConvertString | ( | const char * | inStringToConvert,
 |  | CFStringEncoding | inInputEncoding,
 |  | CFStringEncoding | inOutputEncoding,
 |  | bool | allowLossyConversion = false
 | ) |

Referenced by CompatGetCommit(), and print().

ControlHandle GetDItemCtrlHdl | ( | DialogPtr | dlg,
 |  | SInt16 | Id
 | ) |

Handle GetDItemHdl | ( | DialogPtr | dlg,
 |  | SInt16 | Id
 | ) |

SInt16 GetDItemMenuSel | ( | DialogPtr | dlg,
 |  | SInt16 | Id
 | ) |

UStr LString_to_UTF8 | ( | const LString & | inString,
 |  | bool | allowLossyConversion = false
 | ) |

OSErr MacGetPrefsFolder | ( | FSSpec & | theFolder,
 |  | UStr & | thePath
 | ) |

Referenced by BuildIgnoredList().

OSErr MacGetSpecialFolder | ( | FSSpec & | theFolder,
 |  | UStr & | thePath,
 |  | OSType | inType,
 |  | const char * | inDesc,
 |  | bool | createFolder = false
 | ) |

OSErr MacGetTempFolder | ( | FSSpec & | theFolder,
 |  | UStr & | thePath
 | ) |

Referenced by MakeTmpFile().

void SetDItemMenuSel | ( | DialogPtr | dlg,
 |  | SInt16 | Id,
 |  | SInt16 | sel
 | ) |

UStr SysEncoding_to_UTF8 | ( | const char * | sysEncodedString,
 |  | bool | allowLossyConversion = false
 | ) |

LStr255 UTF8_to_LString | ( | const char * | inString,
 |  | bool | allowLossyConversion = false
 | ) |

UStr UTF8_to_SysEncoding | ( | const char * | utf8EncodedString,
 |  | bool | allowLossyConversion = false
 | ) |

Generated on Sat Aug 7 22:45:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacrosSetup.cpp File Reference

common/MacrosSetup.cpp File Reference

#include "stdafx.h"
#include "MacrosSetup.h"
#include "AppConsole.h"
#include "FileTraversal.h"
#include "CvsArgs.h"
#include "CvsCommands.h"
#include "getopt.h"
#include "wincvs.h"
#include "getline.h"

Include dependency graph for MacrosSetup.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | MacroTraversal

Functions

void | getLoc (UStr &path, const char *subFolder)
void | MacrosGetLoc (UStr &path)
void | PythonLibGetLoc (UStr &path)
void | MacrosFlushAll (void)
void | MacrosReloadAll (void)

Variables

CMacroSet gMacrosAdmin
CMacroSet gMacrosSel

Function Documentation

void getLoc | ( | UStr & | path,
 |  | const char * | subFolder
 | ) | [static]

Definition at line 79 of file MacrosSetup.cpp.

References CStr, UStr::empty(), UStr::endsWith(), CWincvsApp::GetAppPath(), SplitPath(), stat::st_mode, and stat.

Referenced by MacrosGetLoc(), and PythonLibGetLoc().

00080 {
00081     path = "";
00082 #ifdef WIN32
00083     CWincvsApp* pApp = (CWincvsApp *)AfxGetApp();
00084     pApp->GetAppPath(path);
00085
00086     CString appPath = path;
00087     // first the macro folder may be ./macro
00088     CString test = appPath;
00089     test.TrimRight('\\');
00090     test += "\\";
00091     test += subFolder;
00092
00093     struct stat sb;
00094     if(stat(test, &sb) != -1 && S_ISDIR(sb.st_mode))
00095     {
00096         path = test;
00097         return;
00098     }
00099
00100     CStr uppath, file;
00101     while(SplitPath(appPath, uppath, file) && !uppath.empty())
00102     {
00103         test = uppath;
00104         test.TrimRight('\\');
00105         test += "\\";
00106         test += subFolder;
00107
00108         if(stat(test, &sb) != -1 && S_ISDIR(sb.st_mode))
00109         {
00110             path = test;
00111             return;
00112         }
00113         appPath = uppath;
00114     }
00115     path = test;
00116 #elif defined(qUnix)
00117     struct stat sb;
00118     path = PACKAGE_DATA_DIR;
00119     if(stat(path, &sb) == -1 || !S_ISDIR(sb.st_mode))
00120     {
00121         path = PACKAGE_SOURCE_DIR;
00122         CStr uppath, folder;
00123         SplitPath(path, uppath, folder);
00124         path = uppath;
00125         if(!path.endsWith(kPathDelimiter))
00126             path << kPathDelimiter;
00127         path << subFolder;
00128     }
00129 #elif qMacCvsPP
00130     UStr appPath = CMacCvsApp::GetAppPath();
00131     if(!appPath.endsWith(kPathDelimiter))
00132         appPath << kPathDelimiter;
00133     UStr test = appPath;
00134     test << subFolder;
00135
00136     struct stat sb;
00137     if(stat(test, &sb) != -1 && S_ISDIR(sb.st_mode))
00138     {
00139         path = test;
00140         return;
00141     }
00142
00143     UStr uppath, file;
00144     while(SplitPath(appPath, uppath, file) && !uppath.empty())
00145     {
00146         test = uppath;
00147         if(!test.endsWith(kPathDelimiter))
00148             test << kPathDelimiter;
00149         test << subFolder;
00150
00151         if(stat(test, &sb) != -1 && S_ISDIR(sb.st_mode))
00152         {
00153             path = test;
00154             return;
00155         }
00156         appPath = uppath;
00157     }
00158     path = test;
00159 #else
00160     if(!path.empty() && !path.endsWith(kPathDelimiter))
00161     {
00162         path << kPathDelimiter;
00163     }
00164     path << subFolder;
00165 #endif
00166 }

Here is the call graph for this function:

void MacrosFlushAll ( void ) [static]

Definition at line 178 of file MacrosSetup.cpp.

References CMacroSet::Flush(), gMacrosAdmin, and gMacrosSel.

Referenced by MacrosReloadAll().

00179 {
00180     gMacrosAdmin.Flush();
00181     gMacrosSel.Flush();
00182 }

Here is the call graph for this function:

void MacrosGetLoc ( UStr & path )

Definition at line 168 of file MacrosSetup.cpp.

References getLoc(), and MACROS_FOLDER.

Referenced by CTcl_Interp::CTcl_Interp(), InitializeInterp(), MacrosReloadAll(), and PyMacrosReloadAll().

00169 {
00170     getLoc(path, MACROS_FOLDER);
00171 }

Here is the call graph for this function:

void MacrosReloadAll ( void )

Definition at line 324 of file MacrosSetup.cpp.

References CStr, FileTraverse(), MacrosFlushAll(), and MacrosGetLoc().

00325 {
00326     MacrosFlushAll();
00327
00328     // get the macro folder
00329     CStr path;
00330     MacrosGetLoc(path);
00331
00332     // traverse the macro folder
00333     MacroTraversal traverse;
00334     FileTraverse(path, traverse);
00335 }

Here is the call graph for this function:

void PythonLibGetLoc ( UStr & path )

Definition at line 173 of file MacrosSetup.cpp.

References getLoc(), and PYTHONLIB_FOLDER.

Referenced by InitializeInterp().

00174 {
00175     getLoc(path, PYTHONLIB_FOLDER);
00176 }

Here is the call graph for this function:

Variable Documentation

CMacroSet gMacrosAdmin

Definition at line 76 of file MacrosSetup.cpp.

Referenced by CreateMainMenubar(), CCustInvertTable::Initialize(), MacrosFlushAll(), UCvsFrame::OnCmdMacroAdmin(), MacroTraversal::OnFile(), CWincvsDoc::OnMacroAdmin(), and CWincvsDoc::OnUpdateMacroAdmin().

CMacroSet gMacrosSel

Definition at line 77 of file MacrosSetup.cpp.

Referenced by CreateMainMenubar(), CCustInvertTable::Initialize(), MacrosFlushAll(), UCvsFolders::OnCmdMacrosSel(), MacroTraversal::OnFile(), and UCvsFiles::OnMacroSel().

Generated on Sat Aug 7 22:45:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacrosSetup.h File Reference

common/MacrosSetup.h File Reference

#include <vector>
#include "CPStr.h"

Include dependency graph for MacrosSetup.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CMacroEntry
class | CMacroSet

Defines

#define | MACROS_FOLDER "Macros"
#define | PYTHONLIB_FOLDER "PythonLib"

Functions

void | MacrosReloadAll (void)
void | MacrosGetLoc (UStr &path)
void | PythonLibGetLoc (UStr &path)

Variables

CMacroSet gMacrosAdmin
CMacroSet gMacrosSel

Define Documentation

#define MACROS_FOLDER "Macros"

Definition at line 35 of file MacrosSetup.h.

Referenced by MacrosGetLoc().

#define PYTHONLIB_FOLDER "PythonLib"

Definition at line 36 of file MacrosSetup.h.

Referenced by PythonLibGetLoc().

Function Documentation

void MacrosGetLoc ( UStr & path )

Definition at line 168 of file MacrosSetup.cpp.

References getLoc(), and MACROS_FOLDER.

Referenced by CTcl_Interp::CTcl_Interp(), InitializeInterp(), MacrosReloadAll(), and PyMacrosReloadAll().

00169 {
00170     getLoc(path, MACROS_FOLDER);
00171 }

Here is the call graph for this function:

void MacrosReloadAll ( void )

Definition at line 324 of file MacrosSetup.cpp.

References CStr, FileTraverse(), MacrosFlushAll(), and MacrosGetLoc().

00325 {
00326     MacrosFlushAll();
00327
00328     // get the macro folder
00329     CStr path;
00330     MacrosGetLoc(path);
00331
00332     // traverse the macro folder
00333     MacroTraversal traverse;
00334     FileTraverse(path, traverse);
00335 }

Here is the call graph for this function:

void PythonLibGetLoc ( UStr & path )

Definition at line 173 of file MacrosSetup.cpp.

References getLoc(), and PYTHONLIB_FOLDER.

Referenced by InitializeInterp().

00174 {
00175     getLoc(path, PYTHONLIB_FOLDER);
00176 }

Here is the call graph for this function:

Variable Documentation

CMacroSet gMacrosAdmin

Definition at line 76 of file MacrosSetup.cpp.

Referenced by CreateMainMenubar(), CCustInvertTable::Initialize(), MacrosFlushAll(), UCvsFrame::OnCmdMacroAdmin(), MacroTraversal::OnFile(), CWincvsDoc::OnMacroAdmin(), and CWincvsDoc::OnUpdateMacroAdmin().

CMacroSet gMacrosSel

Definition at line 77 of file MacrosSetup.cpp.

Referenced by CreateMainMenubar(), CCustInvertTable::Initialize(), MacrosFlushAll(), UCvsFolders::OnCmdMacrosSel(), MacroTraversal::OnFile(), and UCvsFiles::OnMacroSel().

Generated on Sat Aug 7 22:45:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MakeSurePathExists.cpp File Reference

common/MakeSurePathExists.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include <sys\stat.h>
#include <direct.h>
#include <errno.h>
#include "MakeSurePathExists.h"
#include "FileTraversal.h"
#include "CvsAlert.h"

Include dependency graph for MakeSurePathExists.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool | CompatMakeSurePathExists (const char *path, bool promptForCreation)
bool | CreateFolder (const char *fn)

Function Documentation

bool CompatMakeSurePathExists | ( | const char * | path,
 |  | bool | promptForCreation
 | ) |

Check whether the specified path exists and optionally prompt for creation if not existing

Parameters:
path | Path to check
promptForCreation | true to prompt for creation, false to only check existance
Returns:
true if the path exists, false otherwise
Definition at line 48 of file MakeSurePathExists.cpp.

References BUTTONTITLE_NO, BUTTONTITLE_YES, CreateFolder(), kCvsAlertOKButton, kCvsAlertQuestionIcon, MAX_PATH, and CvsAlert::ShowAlert().

Referenced by DDV_CheckPathExists().

00049 {
00050     bool valid = false;
00051
00052 #ifdef WIN32
00053     TCHAR fn[MAX_PATH];
00054     if( _tfullpath(fn, path, MAX_PATH) )
00055     {
00056         struct _tstat dirstat;
00057         if( _tstat(fn, &dirstat) == 0 )
00058         {
00059             if( dirstat.st_mode & _S_IFDIR )
00060             {
00061                 valid = true;
00062             }
00063         }
00064         else
00065         {
00066             // Not found, ask for permission to create
00067             if( promptForCreation )
00068             {
00069                 CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00070                     "Do you want to create folder?", "Folder " + CString(path) + " not found.",
00071                     BUTTONTITLE_YES, BUTTONTITLE_NO);
00072
00073                 if( cvsAlert.ShowAlert() == kCvsAlertOKButton )
00074                 {
00075                     valid = CreateFolder(fn);
00076                 }
00077             }
00078         }
00079     }
00080 #endif
00081
00082     return valid;
00083 }

Here is the call graph for this function:

bool CreateFolder ( const char * fn )

Basic function to create path leading to the folder

Parameters:
fn Folder to create
Returns:
true on success, false otherwise
Definition at line 90 of file MakeSurePathExists.cpp.

References MAX_PATH, and NULL.

Referenced by CompatMakeSurePathExists().

00091 {
00092 #ifdef WIN32
00093     // Remove possible trailing separator
00094     TCHAR folder[MAX_PATH];
00095     _tcscpy(folder, fn);
00096     int len = _tcslen(folder);
00097     if( len > 1 )
00098     {
00099         switch( folder[len - 1] )
00100         {
00101         case _T('\\'):
00102         case _T('/'):
00103             folder[len - 1] = 0;
00104             break;
00105         }
00106     }
00107
00108     // Try to create
00109     if( _tmkdir(folder) == 0 )
00110     {
00111         return true;
00112     }
00113
00114     // If path does not exist, create parent folder and then try again
00115     if( errno == ENOENT )
00116     {
00117         TCHAR drive[_MAX_DRIVE];
00118         TCHAR dir[_MAX_PATH];
00119         TCHAR fname[_MAX_PATH];
00120
00121         _tsplitpath(folder, drive, dir, fname, NULL);
00122         if( !*fname )
00123         {
00124             return false;
00125         }
00126
00127         _tmakepath(fname, drive, dir, NULL, NULL);
00128         if( !CreateFolder(fname) )
00129         {
00130             return false;
00131         }
00132
00133         return _tmkdir(folder) == 0;
00134     }
00135 #endif
00136
00137     // Not possible to create
00138     return false;
00139 }

Generated on Sat Aug 7 22:45:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MakeSurePathExists.h File Reference

common/MakeSurePathExists.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

bool | CreateFolder (const char *fn)
bool | CompatMakeSurePathExists (const char *path, bool promptForCreation=true)

Function Documentation

bool CompatMakeSurePathExists | ( | const char * | path,
 |  | bool | promptForCreation
 | ) |

Check whether the specified path exists and optionally prompt for creation if not existing

Parameters:
path | Path to check
promptForCreation | true to prompt for creation, false to only check existance
Returns:
true if the path exists, false otherwise
Definition at line 48 of file MakeSurePathExists.cpp.

References BUTTONTITLE_NO, BUTTONTITLE_YES, CreateFolder(), kCvsAlertOKButton, kCvsAlertQuestionIcon, MAX_PATH, and CvsAlert::ShowAlert().

Referenced by DDV_CheckPathExists().

00049 {
00050     bool valid = false;
00051
00052 #ifdef WIN32
00053     TCHAR fn[MAX_PATH];
00054     if( _tfullpath(fn, path, MAX_PATH) )
00055     {
00056         struct _tstat dirstat;
00057         if( _tstat(fn, &dirstat) == 0 )
00058         {
00059             if( dirstat.st_mode & _S_IFDIR )
00060             {
00061                 valid = true;
00062             }
00063         }
00064         else
00065         {
00066             // Not found, ask for permission to create
00067             if( promptForCreation )
00068             {
00069                 CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00070                     "Do you want to create folder?", "Folder " + CString(path) + " not found.",
00071                     BUTTONTITLE_YES, BUTTONTITLE_NO);
00072
00073                 if( cvsAlert.ShowAlert() == kCvsAlertOKButton )
00074                 {
00075                     valid = CreateFolder(fn);
00076                 }
00077             }
00078         }
00079     }
00080 #endif
00081
00082     return valid;
00083 }

Here is the call graph for this function:

bool CreateFolder ( const char * fn )

Basic function to create path leading to the folder

Parameters:
fn Folder to create
Returns:
true on success, false otherwise
Definition at line 90 of file MakeSurePathExists.cpp.

References MAX_PATH, and NULL.

Referenced by CompatMakeSurePathExists().

00091 {
00092 #ifdef WIN32
00093     // Remove possible trailing separator
00094     TCHAR folder[MAX_PATH];
00095     _tcscpy(folder, fn);
00096     int len = _tcslen(folder);
00097     if( len > 1 )
00098     {
00099         switch( folder[len - 1] )
00100         {
00101         case _T('\\'):
00102         case _T('/'):
00103             folder[len - 1] = 0;
00104             break;
00105         }
00106     }
00107
00108     // Try to create
00109     if( _tmkdir(folder) == 0 )
00110     {
00111         return true;
00112     }
00113
00114     // If path does not exist, create parent folder and then try again
00115     if( errno == ENOENT )
00116     {
00117         TCHAR drive[_MAX_DRIVE];
00118         TCHAR dir[_MAX_PATH];
00119         TCHAR fname[_MAX_PATH];
00120
00121         _tsplitpath(folder, drive, dir, fname, NULL);
00122         if( !*fname )
00123         {
00124             return false;
00125         }
00126
00127         _tmakepath(fname, drive, dir, NULL, NULL);
00128         if( !CreateFolder(fname) )
00129         {
00130             return false;
00131         }
00132
00133         return _tmkdir(folder) == 0;
00134     }
00135 #endif
00136
00137     // Not possible to create
00138     return false;
00139 }

Generated on Sat Aug 7 22:45:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MoveToTrash.cpp File Reference

common/MoveToTrash.cpp File Reference

#include "stdafx.h"
#include "MoveToTrash.h"
#include "CPStr.h"
#include "FileTraversal.h"
#include "AppConsole.h"
#include <direct.h>

Include dependency graph for MoveToTrash.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | CompatBeginMoveToTrash (void)
void | CompatEndMoveToTrash (void)
bool | CompatMoveToTrash (const char *file, const char *dir, const FSSpec *spec)

Function Documentation

void CompatBeginMoveToTrash ( void )

Definition at line 370 of file MoveToTrash.cpp.

Referenced by CvsCmdMoveToTrash(), and CvsCmdRemove().

00371 {
00372 #ifdef TARGET_OS_MAC
00373     sToTrash.erase(sToTrash.begin(), sToTrash.end());
00374     sTrashRetainer = true;
00375 #endif
00376 }

void CompatEndMoveToTrash ( void )

Definition at line 378 of file MoveToTrash.cpp.

References cvs_err(), cvs_out(), and err.

Referenced by CvsCmdMoveToTrash(), and CvsCmdRemove().

00379 {
00380 #ifdef TARGET_OS_MAC
00381     if(sToTrash.size() > 0)
00382     {
00383         OSErr err;
00384         err = MoveToTrash(sToTrash);
00385         if(err != noErr)
00386             cvs_err("Unable to send files to the trash (Error %d)\n", err);
00387         else
00388             cvs_out("Files has been moved successfully to the trash...\n");
00389     }
00390
00391     sToTrash.erase(sToTrash.begin(), sToTrash.end());
00392     sTrashRetainer = false;
00393 #endif
00394 }

Here is the call graph for this function:

bool CompatMoveToTrash | ( | const char * | file,
 |  | const char * | dir,
 |  | const FSSpec * | spec
 | ) |

Definition at line 396 of file MoveToTrash.cpp.

References CStr, cvs_err(), and NULL.

Referenced by RemoveCvsArgs::addfile(), CvsCmdMoveToTrash(), and tclSafeRemove().

00397 {
00398 #ifdef TARGET_OS_MAC
00399     if(sTrashRetainer)
00400     {
00401         if(spec)
00402             sToTrash.push_back(*spec);
00403         else
00404         {
00405             CStr fullpath(dir);
00406             if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00407             {
00408                 fullpath << kPathDelimiter;
00409             }
00410             fullpath << file;
00411             GUSIFileSpec mspec(fullpath);
00412             if(mspec.Error() != noErr)
00413             {
00414                 errno = mspec.Error();
00415                 return false;
00416             }
00417             sToTrash.push_back(mspec);
00418         }
00419
00420         return true;
00421     }
00422
00423     return spec != NULL ? MoveToTrash(spec) == noErr : false;
00424 #elif defined(WIN32)
00425     SHFILEOPSTRUCT fileop;
00426     CStr fullpath(dir);
00427     if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00428     {
00429         fullpath << kPathDelimiter;
00430     }
00431     fullpath << file;
00432     fullpath << ' ';
00433     fullpath.rtrim(' ');
00434
00435     fileop.hwnd     = *AfxGetMainWnd();
00436     fileop.wFunc    = FO_DELETE;
00437     fileop.pFrom    = fullpath;
00438     fileop.pTo      = 0L;
00439     fileop.fFlags   = FOF_ALLOWUNDO | FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI;
00440
00441     if(SHFileOperation(&fileop) != 0)
00442     {
00443         if(dir != 0L && chdir(dir) != 0)
00444             return false;
00445
00446         cvs_err("Unable to send \'%s\' to the recycle bin (error %d)\n",
00447             file, GetLastError());
00448         cvs_err("Trying now to delete \'%s\' instead\n", file);
00449         return remove(file) == 0;
00450     }
00451     return true;
00452 #else /* !TARGET_OS_MAC && !WIN32 */
00453     CStr fullpath(dir);
00454     if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00455     {
00456         fullpath << kPathDelimiter;
00457     }
00458     fullpath << file;
00459
00460     return remove(fullpath) == 0;
00461 #endif /* !TARGET_OS_MAC && !WIN32 */
00462 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MoveToTrash.h File Reference

common/MoveToTrash.h File Reference

#include "TextBinary.h"

Include dependency graph for MoveToTrash.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

bool | CompatMoveToTrash (const char *file, const char *dir=0L, const FSSpec *spec=0L)
void | CompatBeginMoveToTrash (void)
void | CompatEndMoveToTrash (void)

Function Documentation

void CompatBeginMoveToTrash ( void )

Definition at line 370 of file MoveToTrash.cpp.

Referenced by CvsCmdMoveToTrash(), and CvsCmdRemove().

00371 {
00372 #ifdef TARGET_OS_MAC
00373     sToTrash.erase(sToTrash.begin(), sToTrash.end());
00374     sTrashRetainer = true;
00375 #endif
00376 }

void CompatEndMoveToTrash ( void )

Definition at line 378 of file MoveToTrash.cpp.

References cvs_err(), cvs_out(), and err.

Referenced by CvsCmdMoveToTrash(), and CvsCmdRemove().

00379 {
00380 #ifdef TARGET_OS_MAC
00381     if(sToTrash.size() > 0)
00382     {
00383         OSErr err;
00384         err = MoveToTrash(sToTrash);
00385         if(err != noErr)
00386             cvs_err("Unable to send files to the trash (Error %d)\n", err);
00387         else
00388             cvs_out("Files has been moved successfully to the trash...\n");
00389     }
00390
00391     sToTrash.erase(sToTrash.begin(), sToTrash.end());
00392     sTrashRetainer = false;
00393 #endif
00394 }

Here is the call graph for this function:

bool CompatMoveToTrash | ( | const char * | file,
 |  | const char * | dir = 0L,
 |  | const FSSpec * | spec = 0L
 | ) |

Definition at line 396 of file MoveToTrash.cpp.

References CStr, cvs_err(), and NULL.

Referenced by RemoveCvsArgs::addfile(), CvsCmdMoveToTrash(), and tclSafeRemove().

00397 {
00398 #ifdef TARGET_OS_MAC
00399     if(sTrashRetainer)
00400     {
00401         if(spec)
00402             sToTrash.push_back(*spec);
00403         else
00404         {
00405             CStr fullpath(dir);
00406             if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00407             {
00408                 fullpath << kPathDelimiter;
00409             }
00410             fullpath << file;
00411             GUSIFileSpec mspec(fullpath);
00412             if(mspec.Error() != noErr)
00413             {
00414                 errno = mspec.Error();
00415                 return false;
00416             }
00417             sToTrash.push_back(mspec);
00418         }
00419
00420         return true;
00421     }
00422
00423     return spec != NULL ? MoveToTrash(spec) == noErr : false;
00424 #elif defined(WIN32)
00425     SHFILEOPSTRUCT fileop;
00426     CStr fullpath(dir);
00427     if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00428     {
00429         fullpath << kPathDelimiter;
00430     }
00431     fullpath << file;
00432     fullpath << ' ';
00433     fullpath.rtrim(' ');
00434
00435     fileop.hwnd     = *AfxGetMainWnd();
00436     fileop.wFunc    = FO_DELETE;
00437     fileop.pFrom    = fullpath;
00438     fileop.pTo      = 0L;
00439     fileop.fFlags   = FOF_ALLOWUNDO | FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI;
00440
00441     if(SHFileOperation(&fileop) != 0)
00442     {
00443         if(dir != 0L && chdir(dir) != 0)
00444             return false;
00445
00446         cvs_err("Unable to send \'%s\' to the recycle bin (error %d)\n",
00447             file, GetLastError());
00448         cvs_err("Trying now to delete \'%s\' instead\n", file);
00449         return remove(file) == 0;
00450     }
00451     return true;
00452 #else /* !TARGET_OS_MAC && !WIN32 */
00453     CStr fullpath(dir);
00454     if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00455     {
00456         fullpath << kPathDelimiter;
00457     }
00458     fullpath << file;
00459
00460     return remove(fullpath) == 0;
00461 #endif /* !TARGET_OS_MAC && !WIN32 */
00462 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MultiFiles.cpp File Reference

common/MultiFiles.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <string.h>
#include "MultiFiles.h"
#include "CvsArgs.h"
#include "AppConsole.h"
#include "CPStr.h"
#include "AppGlue.h"
#include <errno.h>
#include <map>
#include <utility>
#include <algorithm>

Include dependency graph for MultiFiles.cpp:

Include dependency graph

Go to the source code of this file.

Classes

struct | match_dir
helper functor to compare MultiFilesEntry by directory path More...

Functions

bool | split (const UStr &inPartialPath, UStr &outPath, UStr &outName)
Split a (potentially) partial path into folder and name.

Function Documentation

bool split | ( | const UStr & | inPartialPath,
 |  | UStr & | outPath,
 |  | UStr & | outName
 | ) | [static]

Split a (potentially) partial path into folder and name.

Definition at line 202 of file MultiFiles.cpp.

References NULL.

Referenced by MultiFiles::Normalize().

00203 {
00204     int     delimiterPos(inPartialPath.rfind(kPathDelimiter));
00205     if ( delimiterPos )
00206     {
00207         outName = inPartialPath.substr(delimiterPos+1, inPartialPath.length()-delimiterPos-1);
00208         outPath = inPartialPath.substr(0, delimiterPos+1); // includes trailing delimiter
00209         return true;
00210     }
00211     else
00212     {
00213         outName = inPartialPath;
00214         outPath = (const char*)NULL;
00215         return false;
00216     }
00217 }

Generated on Sat Aug 7 22:45:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MultiFiles.h File Reference

common/MultiFiles.h File Reference

#include "TextBinary.h"
#include "CPStr.h"
#include <vector>

Include dependency graph for MultiFiles.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | FileEntry
Used internally. More...
class | MultiFilesEntry
Used internally. More...
class | MultiFiles
Store multiple files by directory. More...
class | MultiFilesEntryIndex
A pair of MultiFiles::const_iterator and index allowing to identify the FileEntry. More...

Generated on Sat Aug 7 22:45:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MultiString.cpp File Reference

common/MultiString.cpp File Reference

#include "stdafx.h"
#include "MultiString.h"

Include dependency graph for MultiString.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:45:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MultiString.h File Reference

common/MultiString.h File Reference

#include <vector>
#include "Persistent.h"
#include "CPStr.h"

Include dependency graph for MultiString.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | TMPersistent< T >
Persistent array. More...
class | TMString< T >
class | CMString
CStr specialization of TMString. More...
class | CMPString
CPStr specialization of TMString. More...
class | TKeyString< delimiter >
Multi-string for storing map (e.g. dictionary). More...
class | CKeyString
Dictionary specialization of TKeyString ('@'). More...
class | CMKeyString
Multi-key specialization of TKeyString ('x01'). More...

Defines

#define | NAMESPACE(w) ::

Define Documentation

#define NAMESPACE ( w ) ::

Definition at line 36 of file MultiString.h.

Generated on Sat Aug 7 22:45:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/OptionalPropertySheet.cpp File Reference

common/OptionalPropertySheet.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "OptionalPropertySheet.h"
#include "CvsPrefs.h"
#include "wincvs_winutil.h"

Include dependency graph for OptionalPropertySheet.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:45:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/OptionalPropertySheet.h File Reference

common/OptionalPropertySheet.h File Reference

#include "HHelpSupport.h"

Include dependency graph for OptionalPropertySheet.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | COptionalPropertySheet

Defines

#define | AFX_OPTIONALPROPERTYSHEET_H__F82DC8BB_73CD_4AEA_8635_1A0932F24C7D__INCLUDED_

Define Documentation

#define AFX_OPTIONALPROPERTYSHEET_H__F82DC8BB_73CD_4AEA_8635_1A0932F24C7D__INCLUDED_

Definition at line 22 of file OptionalPropertySheet.h.

Generated on Sat Aug 7 22:45:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/Persistent.cpp File Reference

common/Persistent.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <string.h>
#include <map>
#include <errno.h>
#include "wincvs.h"
#include "Persistent.h"
#include "AppConsole.h"
#include "CPStr.h"
#include "uconsole.h"
#include "uwidget.h"
#include "FileTraversal.h"
#include "Authen.h"
#include "CvsPrefs.h"
#include "getline.h"
#include "CvsAlert.h"
#include "CvsCommands.h"
#include "SaveSettingsDlg.h"

Include dependency graph for Persistent.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CFindSettings

Defines

#define | NEW new

Functions

int | simple_diff (const char *file1, const char *file2)
bool | FormatDefaultSettingsLoc (UStr &path)
bool | SettingsGetLoc (UStr &path)
bool | LoadSettingsInternal (const char *fullname, bool(*func)(const char *token, const char *value, void *data), void *data)
void | getSettingName (const char *fromfile, UStr &res)
bool | GetAllPersistentSettings (std::map< UStr, UStr > &res)
bool | HasPersistentSettings (const char *path)
bool | _loadPersistentSettings (const char *token, const char *value, void *data)
void | LoadPersistentSettings (const char *path, bool quiet)
void | SaveAllSettings (const char *settingFileName, const char *path, bool quiet=false)
void | SaveAsPersistentSettings (const char *name, const char *path)
void | SavePersistentSettings (const char *path, bool quiet)
void | AskCreatePersistentSettings (const char *path)

Define Documentation

#define NEW new

Definition at line 97 of file Persistent.cpp.

Function Documentation

bool _loadPersistentSettings | ( | const char * | token,
 |  | const char * | value,
 |  | void * | data
 | ) | [static]

Definition at line 1268 of file Persistent.cpp.

References cvs_err(), CPersistent::Find(), gCvsPrefs, UObject::IsKindOf(), CPersistent::CPersistentEntry::m_fUniqueName, CPersistent::CPersistentEntry::m_fValue, and URUNTIME_CLASS.

Referenced by LoadPersistentSettings().

01269 {
01270 #if INTERNAL_AUTHEN
01271     if( strcmp(token, "CVSROOT") == 0 )
01272     {
01273         gCvsPrefs = value;
01274     }
01275     else if( strcmp(token, "AUTHENTICATION") == 0 )
01276     {
01277         gAuthen.setkind(Authen::tokenToKind(value));
01278     }
01279     else if( strcmp(token, "PATH") == 0 )
01280     {
01281     }
01282     else
01283 #endif /* INTERNAL_AUTHEN */
01284     {
01285         CPersistent::CPersistentEntry* entry = CPersistent::Find(token);
01286         if( entry == 0L )
01287         {
01288             //cvs_err("Persistent value '%s' is not registered\n", token);
01289         }
01290         else
01291         {
01292             if( entry->m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentBool)) )
01293             {
01294                 CPersistentBool* pbool = (CPersistentBool*)entry->m_fValue;
01295                 if( strcmp(value, "true") == 0 )
01296                     *pbool = true;
01297                 else if( strcmp(value, "false") == 0 )
01298                     *pbool = false;
01299                 else
01300                     cvs_err("Invalid value '%s' for persistent '%s'\n", (const char*)value, entry->m_fUniqueName);
01301             }
01302             else if( entry->m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentInt)) )
01303             {
01304                 CPersistentInt* pint = (CPersistentInt*)entry->m_fValue;
01305                 int aint;
01306                 int check = sscanf(value, "%d", &aint);
01307                 if( check == 1 )
01308                     *pint = aint;
01309                 else
01310                     cvs_err("Invalid value '%s' for persistent '%s'\n", (const char*)value, entry->m_fUniqueName);
01311             }
01312             else if( entry->m_fValue->IsKindOf(URUNTIME_CLASS(PCStr)) )
01313             {
01314                 PCStr* pstr = (PCStr*)entry->m_fValue;
01315                 *pstr = value;
01316             }
01317             else if( entry->m_fValue->IsKindOf(URUNTIME_CLASS(PCPStr)) )
01318             {
01319                 PCPStr* pstr = (PCPStr*)entry->m_fValue;
01320                 *pstr = value;
01321             }
01322             else
01323             {
01324                 cvs_err("Unknown persistent value '%s'\n", entry->m_fUniqueName);
01325             }
01326         }
01327     }
01328
01329     return false;
01330 }

Here is the call graph for this function:

void AskCreatePersistentSettings ( const char * path )

Prompt to create persistent settings

Parameters:
path Path to settings
Definition at line 1416 of file Persistent.cpp.

References BUTTONTITLE_CANCEL, BUTTONTITLE_DELETE, CStr, cvs_err(), UStr::empty(), EV_INIT_WIDGET, FileTraverse(), GetAllPersistentSettings(), getSettingName(), kCvsAlertOKButton, kCvsAlertWarningIcon, kUMainWidget, LoadPersistentSettings(), CSaveSettingsDlg::m_copy, CSaveSettingsDlg::m_copyFrom, CSaveSettingsDlg::m_settingName, CFindSettings::m_settingsFile, NEW, NormalizeFileName(), SaveAsPersistentSettings(), SettingsGetLoc(), CvsAlert::ShowAlert(), UCreate_SettingsDlg(), and UEventSendMessage().

Referenced by UCvsFrame::OnCmdSaveSettings(), CWincvsDoc::OnSavesettings(), UCvsFolders::ResetBrowser(), and CWinCvsBrowser::ResetBrowser().

01417 {
01418     UStr settingsDir;
01419     if( !SettingsGetLoc(settingsDir) )
01420         return;
01421
01422 #ifdef qMacCvsPP
01423     int id = 0;
01424
01425     id = dlg_SaveSettings;
01426 #endif
01427
01428     CFindSettings finder(path);
01429     FileTraverse(settingsDir, finder);
01430
01431     UStr oldName;
01432
01433     if( !finder.m_settingsFile.empty() )
01434     {
01435         getSettingName(finder.m_settingsFile, oldName);
01436     }
01437
01438 #ifdef WIN32
01439     CSaveSettingsDlg saveSettingsDlg(path, oldName);
01440 #else
01441     USaveSettings* dlg = NEW USaveSettings(path, oldName);
01442 #endif
01443
01444 #if qUnix
01445     void* wid;
01446 #   if qGTK
01447     wid = UCreate_SettingsDlg();
01448 #   endif
01449
01450     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01451 #endif
01452
01453 #ifdef WIN32
01454     if( saveSettingsDlg.DoModal() == IDOK )
01455 #else
01456     if( dlg->DoModal() )
01457 #endif
01458     {
01459
01460 #ifdef WIN32
01461         UStr name = saveSettingsDlg.m_settingName;
01462 #else
01463         UStr name = dlg->m_settingName;
01464 #endif
01465         UStr fileToDelete;
01466
01467         if( !name.empty() )
01468         {
01469             if( !oldName.empty() )
01470             {
01471                 if( stricmp(oldName, name) != 0 )
01472                 {
01473                     UStr prompt("The setting '");
01474                     prompt << oldName;
01475                     prompt << "' already points on the same folder. ";
01476                     prompt << "Press 'Delete' if you want to override this setting ";
01477
01478                     CvsAlert cvsAlert(kCvsAlertWarningIcon,
01479                         prompt, "Two settings cannot point on the same location.",
01480                         BUTTONTITLE_DELETE, BUTTONTITLE_CANCEL);
01481
01482                     if( cvsAlert.ShowAlert() != kCvsAlertOKButton )
01483                     {
01484 #ifndef WIN32
01485                         delete dlg;
01486 #endif
01487                         return;
01488                     }
01489
01490                     fileToDelete = finder.m_settingsFile;
01491                 }
01492             }
01493
01494 #ifdef WIN32
01495             if( saveSettingsDlg.m_copy && !saveSettingsDlg.m_copyFrom.IsEmpty() )
01496             {
01497                 std :: map<UStr, UStr> settingsList;
01498                 if( GetAllPersistentSettings(settingsList) )
01499                 {
01500                     UStr what = saveSettingsDlg.m_copyFrom;
01501
01502                     std::map<UStr, UStr>::const_iterator i;
01503                     i = settingsList.find(what);
01504                     if( i != settingsList.end() )
01505                     {
01506                         CStr copyFromPath = (*i).second;
01507                         LoadPersistentSettings(copyFromPath);
01508                     }
01509                 }
01510             }
01511 #else
01512             if( !dlg->m_copyFromPath.empty() )
01513                 LoadPersistentSettings(dlg->m_copyFromPath);
01514 #endif
01515
01516             NormalizeFileName(name);
01517             SaveAsPersistentSettings(name, path);
01518
01519             if( !fileToDelete.empty() )
01520             {
01521                 if( remove(fileToDelete) != 0 )
01522                     cvs_err("Error while deleting '%s' (error %d)\n", (const char*)fileToDelete, errno);
01523             }
01524         }
01525     }
01526
01527 #ifndef WIN32
01528     delete dlg;
01529 #endif
01530 }

Here is the call graph for this function:

bool FormatDefaultSettingsLoc ( UStr & path )

Format the default settings folder string

Parameters:
path Return the formatted settings folder string
Returns:
true on success, false otherwise
Definition at line 840 of file Persistent.cpp.

References cvs_err(), gCvsPrefs, CWincvsApp::GetAppPath(), CvsPrefs::Home(), stat::st_mode, and stat.

Referenced by CGetPrefs_WINCVS::OnAltsettingschk(), and SettingsGetLoc().

00841 {
00842 #ifdef WIN32
00843     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00844     if( !pApp )
00845     {
00846         return false;
00847     }
00848
00849     pApp->GetAppPath(path);
00850
00851 #elif defined(qUnix)
00852     struct stat sb;
00853
00854     path = gCvsPrefs.Home();
00855     if( !path.endsWith(kPathDelimiter) )
00856         path << kPathDelimiter;
00857
00858     path << ".gcvs";
00859
00860     if( stat(path, &sb) != -1 )
00861     {
00862         if( !S_ISDIR(sb.st_mode) )
00863         {
00864             cvs_err("The file '%s' already exists and is not a directory", (const char*)path, errno);
00865             return false;
00866         }
00867     }
00868     else if( mkdir(path, 0750) != 0 )
00869     {
00870         cvs_err("Unable to create the directory '%s' (error %d)", (const char*)path, errno);
00871         return false;
00872     }
00873
00874 #elif defined(qMacCvsPP)
00875     path = CMacCvsApp::GetMacCvsPrefsPath();
00876 #endif
00877
00878     if( !path.empty() && !path.endsWith(kPathDelimiter) )
00879     {
00880         path << kPathDelimiter;
00881     }
00882
00883     path << "Settings";
00884
00885     return true;
00886 }

Here is the call graph for this function:

bool GetAllPersistentSettings ( std::map< UStr, UStr > & res )

Definition at line 1244 of file Persistent.cpp.

References FileTraverse(), and SettingsGetLoc().

Referenced by AskCreatePersistentSettings(), and CSaveSettingsDlg::OnInitDialog().

01245 {
01246     UStr settingsDir;
01247     if( !SettingsGetLoc(settingsDir) )
01248         return false;
01249
01250     CFindSettings finder(res);
01251     FileTraverse(settingsDir, finder);
01252
01253     return !res.empty();
01254 }

Here is the call graph for this function:

void getSettingName | ( | const char * | fromfile,
 |  | UStr & | res
 | ) | [static]

Definition at line 1136 of file Persistent.cpp.

References CStr, GetExtension(), and SplitPath().

Referenced by AskCreatePersistentSettings(), and CFindSettings::searchAllPath().

01137 {
01138     CStr base, ext, uppath, filename;
01139     SplitPath(fromfile, uppath, filename);
01140     GetExtension(filename, base, ext);
01141
01142     if( !base.empty() && stricmp(ext, "txt") == 0 )
01143         res = base;
01144     else
01145         res = filename;
01146 }

Here is the call graph for this function:

bool HasPersistentSettings ( const char * path )

Definition at line 1256 of file Persistent.cpp.

References UStr::empty(), FileTraverse(), CFindSettings::m_settingsFile, and SettingsGetLoc().

Referenced by UCvsFolders::ResetBrowser(), and CWinCvsBrowser::ResetBrowser().

01257 {
01258     UStr settingsDir;
01259     if( !SettingsGetLoc(settingsDir) )
01260         return false;
01261
01262     CFindSettings finder(path);
01263     FileTraverse(settingsDir, finder);
01264
01265     return !finder.m_settingsFile.empty();
01266 }

Here is the call graph for this function:

void LoadPersistentSettings | ( | const char * | path,
 |  | bool | quiet
 | ) |

Load settings

Parameters:
path | Path to load the settings from
quiet | true to prevent displaying the message, false to display the message
Definition at line 1337 of file Persistent.cpp.

References _loadPersistentSettings(), UStr::empty(), FileTraverse(), kBold, kNL, kNormal, kUnderline, LoadSettingsInternal(), CFindSettings::m_settingsFile, and SettingsGetLoc().

Referenced by AskCreatePersistentSettings(), UCvsFolders::ResetBrowser(), and CWinCvsBrowser::ResetBrowser().

01338 {
01339     UStr settingsDir;
01340     if( !SettingsGetLoc(settingsDir) )
01341         return;
01342
01343     CFindSettings finder(path);
01344     FileTraverse(settingsDir, finder);
01345
01346     if( finder.m_settingsFile.empty() )
01347         return;
01348
01349     if( LoadSettingsInternal(finder.m_settingsFile, _loadPersistentSettings, 0L) && !quiet )
01350     {
01351         CColorConsole out;
01352         out << kBold << "Loaded settings for " << kNormal << kUnderline << path << kNormal << kBold << " successfully..." << kNormal << kNL;
01353     }
01354 }

Here is the call graph for this function:

bool LoadSettingsInternal | ( | const char * | fullname,
 |  | bool(* | func)(const char *token, const char *value, void *data),
 |  | void * | data
 | ) | [static]

Definition at line 1063 of file Persistent.cpp.

References cvs_err(), free, getline(), and UStr::set().

Referenced by LoadPersistentSettings(), and CFindSettings::OnFile().

01065 {
01066     bool res = false;
01067     int line_length;
01068     char* line = 0L;
01069     size_t line_chars_allocated = 0;
01070     FILE* fp = fopen(fullname, "r");
01071
01072     if( fp == 0L )
01073     {
01074         cvs_err("Failed to open the setting file '%s' for reading (error %d)", fullname, errno);
01075         goto fail;
01076     }
01077
01078     while( (line_length = getline(&line, &line_chars_allocated, fp)) > 0 )
01079     {
01080         // read each token=value
01081         char* tmp = 0L;
01082
01083         if( (tmp = strchr(line, '\n')) != 0L )
01084             *tmp = '\0';
01085
01086         tmp = line;
01087         while( isspace(*tmp) && *tmp != '\0' )
01088             tmp++;
01089
01090         if( *tmp == '\0' || *tmp == '#' )
01091             continue;
01092
01093         UStr token;
01094         UStr value;
01095         const char* tmp2 = strchr(tmp, '=');
01096         if( tmp2 == 0L || tmp2 == tmp )
01097             continue;
01098
01099         token.set(tmp, tmp2 - tmp);
01100         value = tmp2 + 1;
01101
01102         // check version
01103         if( strcmp(token, "VERSION") == 0 )
01104         {
01105             if( atoi(value) != 1 )
01106             {
01107                 cvs_err("Newer format than expected in the setting file '%s'\n", fullname);
01108                 goto fail;
01109             }
01110
01111             continue;
01112         }
01113
01114         if( func(token, value, data) )
01115             break;
01116     }
01117
01118     if( line_length < 0 && !feof (fp) )
01119     {
01120         cvs_err("Cannot read file (error %d)\n", errno);
01121         goto fail;
01122     }
01123
01124     res = true;
01125
01126 fail:
01127     if( line != 0L )
01128         free(line);
01129
01130     if( fp!= 0L )
01131         fclose(fp);
01132
01133     return res;
01134 }

Here is the call graph for this function:

void SaveAllSettings | ( | const char * | settingFileName,
 |  | const char * | path,
 |  | bool | quiet = false
 | ) | [static]

Save all settings and print the message if the settings we actually saved

Parameters:
settingFileName | File name to save the settings in
path | Path to the file name
quiet | true to prevent displaying the message, false to display the message
Note:
Just a wrapper for CPersistent::SaveAllSettings
Definition at line 1363 of file Persistent.cpp.

References kBold, kNL, kNormal, kUnderline, and CPersistent::SaveAllSettings().

Referenced by SaveAsPersistentSettings(), and SavePersistentSettings().

01364 {
01365     if( CPersistent::SaveAllSettings(settingFileName, path) && !quiet )
01366     {
01367         CColorConsole out;
01368         out << kBold << "Saved settings for " << kNormal << kUnderline << path << kNormal << kBold << " successfully..." << kNormal << kNL;
01369     }
01370 }

Here is the call graph for this function:

void SaveAsPersistentSettings | ( | const char * | name,
 |  | const char * | path
 | ) | [static]

"Save as" settings

Parameters:
name | Settings name
path | Path to settings
Definition at line 1377 of file Persistent.cpp.

References UStr::empty(), UStr::endsWith(), SaveAllSettings(), and SettingsGetLoc().

Referenced by AskCreatePersistentSettings().

01378 {
01379     UStr settingFileName;
01380     if( !SettingsGetLoc(settingFileName) )
01381         return;
01382
01383     if( !settingFileName.empty() && !settingFileName.endsWith(kPathDelimiter) )
01384         settingFileName << kPathDelimiter;
01385
01386     settingFileName << name;
01387     settingFileName << ".txt";
01388
01389     SaveAllSettings(settingFileName, path);
01390 }

Here is the call graph for this function:

void SavePersistentSettings | ( | const char * | path,
 |  | bool | quiet
 | ) |

Save settings

Parameters:
path | Path to settings
quiet | true to prevent displaying the message, false to display the message
Definition at line 1397 of file Persistent.cpp.

References UStr::empty(), FileTraverse(), CFindSettings::m_settingsFile, CFindSettings::m_topfolder, SaveAllSettings(), and SettingsGetLoc().

Referenced by CWinCvsBrowser::ResetBrowser(), and CvsPrefs::save().

01398 {
01399     UStr settingsDir;
01400     if( !SettingsGetLoc(settingsDir) )
01401         return;
01402
01403     CFindSettings finder(path);
01404     FileTraverse(settingsDir, finder);
01405
01406     if( finder.m_settingsFile.empty() )
01407         return;
01408
01409     SaveAllSettings(finder.m_settingsFile, finder.m_topfolder, quiet);
01410 }

Here is the call graph for this function:

bool SettingsGetLoc ( UStr & path ) [static]

Get the settings folder (location)

Parameters:
path Return the settings folder
Returns:
true on success, false otherwise
Definition at line 893 of file Persistent.cpp.

References cvs_err(), FormatDefaultSettingsLoc(), gCvsPrefs, CvsPrefs::SettingsFolder(), stat::st_mode, and stat.

Referenced by AskCreatePersistentSettings(), GetAllPersistentSettings(), HasPersistentSettings(), LoadPersistentSettings(), SaveAsPersistentSettings(), and SavePersistentSettings().

00894 {
00895     struct stat sb;
00896
00897     path = "";
00898
00899     if( gCvsPrefs.SettingsFolder() != 0L )
00900     {
00901         path = gCvsPrefs.SettingsFolder();
00902     }
00903     else
00904     {
00905         if( !FormatDefaultSettingsLoc(path) )
00906         {
00907             return false;
00908         }
00909     }
00910
00911     if( stat(path, &sb) != -1 && S_ISDIR(sb.st_mode) )
00912         return true;
00913
00914 #if qUnix || TARGET_RT_MAC_MACHO
00915     if( mkdir(path, 0750) != 0 )
00916 #else
00917     if( mkdir(path) != 0 )
00918 #endif
00919     {
00920         cvs_err("Failed to create the setting folder '%s' (error %d)", (const char*)path, errno);
00921         return false;
00922     }
00923
00924     return true;
00925 }

Here is the call graph for this function:

int simple_diff | ( | const char * | file1,
 |  | const char * | file2
 | ) | [static]

Simple diff comparing two files

Parameters:
file1 | First file
file2 | Second file
Returns:
0 if files are the same, -1 otherwise
Definition at line 180 of file Persistent.cpp.

Referenced by CPersistent::SaveAllSettings().

00181 {
00182     FILE* f1 = fopen(file1, "rb");
00183     if(f1 == 0L)
00184         return -1;
00185
00186     FILE* f2 = fopen(file2, "rb");
00187     if( f2 == 0L )
00188     {
00189         fclose(f1);
00190         return 1;
00191     }
00192
00193     int res = -1;
00194     char buf1[8000];
00195     char buf2[8000];
00196     size_t num1, num2;
00197
00198     while( !feof(f1) && !feof(f2) && !ferror(f1) && !ferror(f2) )
00199     {
00200         num1 = fread(buf1, sizeof(char), 8000, f1);
00201         num2 = fread(buf2, sizeof(char), 8000, f2);
00202         if( num1 != num2 || (res = memcmp(buf1, buf2, num1 * sizeof(char))) != 0 )
00203             goto fail;
00204     }
00205
00206     if( ferror(f1) || ferror(f2) )
00207         goto fail;
00208
00209     if( feof(f1) ^ feof(f2) )
00210         goto fail;
00211
00212     res = 0;
00213
00214 fail:
00215     fclose(f1);
00216     fclose(f2);
00217
00218     return res;
00219 }

Generated on Sat Aug 7 22:45:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/Persistent.h File Reference

common/Persistent.h File Reference

#include <string.h>
#include <vector>
#include <map>
#include "uobject.h"

Include dependency graph for Persistent.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CPersistent
Abstract class to access the persistent data to load/save. More...
struct | CPersistent::CPersistentEntry
Entry description internal structure. More...
class | CPersistentT< T >
Template class for persistent values. More...
class | CPersistentBool
bool type persistent specialization More...
class | CPersistentInt
int type persistent specialization More...

Defines

#define | INTERNAL_AUTHEN 0
Disable internal authentication model in favor of dynamic CVSROOT string creation using cvs info command.
#define | PROFILE_NAME "CVS settings"
CVS settings profile name.
#define | PERSISTENT_CAST(T)
Casting macro, good for most persistent values.

Enumerations

enum kClassPersistent {
kNoClass = 0x00,
kAddSettings = 0x01
}
Persistent classes enum. More...

Functions

void | LoadPersistentSettings (const char *path, bool quiet=false)
bool | HasPersistentSettings (const char *path)
void | AskCreatePersistentSettings (const char *path)
void | SavePersistentSettings (const char *path, bool quiet=false)
bool | FormatDefaultSettingsLoc (UStr &path)
bool | GetAllPersistentSettings (std::map< UStr, UStr > &res)

Define Documentation

#define INTERNAL_AUTHEN 0

Disable internal authentication model in favor of dynamic CVSROOT string creation using cvs info command.

Definition at line 44 of file Persistent.h.

#define PERSISTENT_CAST ( T )

Value:

inline operator const T&() const {return m_fValue;} \
    inline T& operator=(const T& val) { TouchTimeStamp(); return m_fValue = val;} \
    inline bool operator==(const T& val) const {return m_fValue == val;}
Casting macro, good for most persistent values.

Definition at line 56 of file Persistent.h.

#define PROFILE_NAME "CVS settings"

CVS settings profile name.

Definition at line 52 of file Persistent.h.

Referenced by CvsPrefs::load(), CPersistent::LoadAll(), MigrateCvsrootList(), and CPersistent::SaveAll().

Enumeration Type Documentation

enum kClassPersistent

Persistent classes enum.

Enumeration values:
kNoClass | No class
kAddSettings | Add to the saved settings
Definition at line 63 of file Persistent.h.
00064 {
00065     kNoClass = 0x00,
00066     kAddSettings = 0x01
00067 } kClassPersistent;

Function Documentation

void AskCreatePersistentSettings ( const char * path )

Prompt to create persistent settings

Parameters:
path Path to settings
Definition at line 1416 of file Persistent.cpp.

References BUTTONTITLE_CANCEL, BUTTONTITLE_DELETE, CStr, cvs_err(), UStr::empty(), EV_INIT_WIDGET, FileTraverse(), GetAllPersistentSettings(), getSettingName(), kCvsAlertOKButton, kCvsAlertWarningIcon, kUMainWidget, LoadPersistentSettings(), CSaveSettingsDlg::m_copy, CSaveSettingsDlg::m_copyFrom, CSaveSettingsDlg::m_settingName, CFindSettings::m_settingsFile, NEW, NormalizeFileName(), SaveAsPersistentSettings(), SettingsGetLoc(), CvsAlert::ShowAlert(), UCreate_SettingsDlg(), and UEventSendMessage().

Referenced by UCvsFrame::OnCmdSaveSettings(), CWincvsDoc::OnSavesettings(), CWinCvsBrowser::ResetBrowser(), and UCvsFolders::ResetBrowser().

01417 {
01418     UStr settingsDir;
01419     if( !SettingsGetLoc(settingsDir) )
01420         return;
01421
01422 #ifdef qMacCvsPP
01423     int id = 0;
01424
01425     id = dlg_SaveSettings;
01426 #endif
01427
01428     CFindSettings finder(path);
01429     FileTraverse(settingsDir, finder);
01430
01431     UStr oldName;
01432
01433     if( !finder.m_settingsFile.empty() )
01434     {
01435         getSettingName(finder.m_settingsFile, oldName);
01436     }
01437
01438 #ifdef WIN32
01439     CSaveSettingsDlg saveSettingsDlg(path, oldName);
01440 #else
01441     USaveSettings* dlg = NEW USaveSettings(path, oldName);
01442 #endif
01443
01444 #if qUnix
01445     void* wid;
01446 #   if qGTK
01447     wid = UCreate_SettingsDlg();
01448 #   endif
01449
01450     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01451 #endif
01452
01453 #ifdef WIN32
01454     if( saveSettingsDlg.DoModal() == IDOK )
01455 #else
01456     if( dlg->DoModal() )
01457 #endif
01458     {
01459
01460 #ifdef WIN32
01461         UStr name = saveSettingsDlg.m_settingName;
01462 #else
01463         UStr name = dlg->m_settingName;
01464 #endif
01465         UStr fileToDelete;
01466
01467         if( !name.empty() )
01468         {
01469             if( !oldName.empty() )
01470             {
01471                 if( stricmp(oldName, name) != 0 )
01472                 {
01473                     UStr prompt("The setting '");
01474                     prompt << oldName;
01475                     prompt << "' already points on the same folder. ";
01476                     prompt << "Press 'Delete' if you want to override this setting ";
01477
01478                     CvsAlert cvsAlert(kCvsAlertWarningIcon,
01479                         prompt, "Two settings cannot point on the same location.",
01480                         BUTTONTITLE_DELETE, BUTTONTITLE_CANCEL);
01481
01482                     if( cvsAlert.ShowAlert() != kCvsAlertOKButton )
01483                     {
01484 #ifndef WIN32
01485                         delete dlg;
01486 #endif
01487                         return;
01488                     }
01489
01490                     fileToDelete = finder.m_settingsFile;
01491                 }
01492             }
01493
01494 #ifdef WIN32
01495             if( saveSettingsDlg.m_copy && !saveSettingsDlg.m_copyFrom.IsEmpty() )
01496             {
01497                 std :: map<UStr, UStr> settingsList;
01498                 if( GetAllPersistentSettings(settingsList) )
01499                 {
01500                     UStr what = saveSettingsDlg.m_copyFrom;
01501
01502                     std::map<UStr, UStr>::const_iterator i;
01503                     i = settingsList.find(what);
01504                     if( i != settingsList.end() )
01505                     {
01506                         CStr copyFromPath = (*i).second;
01507                         LoadPersistentSettings(copyFromPath);
01508                     }
01509                 }
01510             }
01511 #else
01512             if( !dlg->m_copyFromPath.empty() )
01513                 LoadPersistentSettings(dlg->m_copyFromPath);
01514 #endif
01515
01516             NormalizeFileName(name);
01517             SaveAsPersistentSettings(name, path);
01518
01519             if( !fileToDelete.empty() )
01520             {
01521                 if( remove(fileToDelete) != 0 )
01522                     cvs_err("Error while deleting '%s' (error %d)\n", (const char*)fileToDelete, errno);
01523             }
01524         }
01525     }
01526
01527 #ifndef WIN32
01528     delete dlg;
01529 #endif
01530 }

Here is the call graph for this function:

bool FormatDefaultSettingsLoc ( UStr & path )

Format the default settings folder string

Parameters:
path Return the formatted settings folder string
Returns:
true on success, false otherwise
Definition at line 840 of file Persistent.cpp.

References cvs_err(), gCvsPrefs, CWincvsApp::GetAppPath(), CvsPrefs::Home(), stat::st_mode, and stat.

Referenced by CGetPrefs_WINCVS::OnAltsettingschk(), and SettingsGetLoc().

00841 {
00842 #ifdef WIN32
00843     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00844     if( !pApp )
00845     {
00846         return false;
00847     }
00848
00849     pApp->GetAppPath(path);
00850
00851 #elif defined(qUnix)
00852     struct stat sb;
00853
00854     path = gCvsPrefs.Home();
00855     if( !path.endsWith(kPathDelimiter) )
00856         path << kPathDelimiter;
00857
00858     path << ".gcvs";
00859
00860     if( stat(path, &sb) != -1 )
00861     {
00862         if( !S_ISDIR(sb.st_mode) )
00863         {
00864             cvs_err("The file '%s' already exists and is not a directory", (const char*)path, errno);
00865             return false;
00866         }
00867     }
00868     else if( mkdir(path, 0750) != 0 )
00869     {
00870         cvs_err("Unable to create the directory '%s' (error %d)", (const char*)path, errno);
00871         return false;
00872     }
00873
00874 #elif defined(qMacCvsPP)
00875     path = CMacCvsApp::GetMacCvsPrefsPath();
00876 #endif
00877
00878     if( !path.empty() && !path.endsWith(kPathDelimiter) )
00879     {
00880         path << kPathDelimiter;
00881     }
00882
00883     path << "Settings";
00884
00885     return true;
00886 }

Here is the call graph for this function:

bool GetAllPersistentSettings ( std::map< UStr, UStr > & res )

Definition at line 1244 of file Persistent.cpp.

References FileTraverse(), and SettingsGetLoc().

Referenced by AskCreatePersistentSettings(), and CSaveSettingsDlg::OnInitDialog().

01245 {
01246     UStr settingsDir;
01247     if( !SettingsGetLoc(settingsDir) )
01248         return false;
01249
01250     CFindSettings finder(res);
01251     FileTraverse(settingsDir, finder);
01252
01253     return !res.empty();
01254 }

Here is the call graph for this function:

bool HasPersistentSettings ( const char * path )

Definition at line 1256 of file Persistent.cpp.

References UStr::empty(), FileTraverse(), CFindSettings::m_settingsFile, and SettingsGetLoc().

Referenced by CWinCvsBrowser::ResetBrowser(), and UCvsFolders::ResetBrowser().

01257 {
01258     UStr settingsDir;
01259     if( !SettingsGetLoc(settingsDir) )
01260         return false;
01261
01262     CFindSettings finder(path);
01263     FileTraverse(settingsDir, finder);
01264
01265     return !finder.m_settingsFile.empty();
01266 }

Here is the call graph for this function:

void LoadPersistentSettings | ( | const char * | path,
 |  | bool | quiet
 | ) |

Load settings

Parameters:
path | Path to load the settings from
quiet | true to prevent displaying the message, false to display the message
Definition at line 1337 of file Persistent.cpp.

References _loadPersistentSettings(), UStr::empty(), FileTraverse(), kBold, kNL, kNormal, kUnderline, LoadSettingsInternal(), CFindSettings::m_settingsFile, and SettingsGetLoc().

Referenced by AskCreatePersistentSettings(), CWinCvsBrowser::ResetBrowser(), and UCvsFolders::ResetBrowser().

01338 {
01339     UStr settingsDir;
01340     if( !SettingsGetLoc(settingsDir) )
01341         return;
01342
01343     CFindSettings finder(path);
01344     FileTraverse(settingsDir, finder);
01345
01346     if( finder.m_settingsFile.empty() )
01347         return;
01348
01349     if( LoadSettingsInternal(finder.m_settingsFile, _loadPersistentSettings, 0L) && !quiet )
01350     {
01351         CColorConsole out;
01352         out << kBold << "Loaded settings for " << kNormal << kUnderline << path << kNormal << kBold << " successfully..." << kNormal << kNL;
01353     }
01354 }

Here is the call graph for this function:

void SavePersistentSettings | ( | const char * | path,
 |  | bool | quiet
 | ) |

Save settings

Parameters:
path | Path to settings
quiet | true to prevent displaying the message, false to display the message
Definition at line 1397 of file Persistent.cpp.

References UStr::empty(), FileTraverse(), CFindSettings::m_settingsFile, CFindSettings::m_topfolder, SaveAllSettings(), and SettingsGetLoc().

Referenced by CWinCvsBrowser::ResetBrowser(), and CvsPrefs::save().

01398 {
01399     UStr settingsDir;
01400     if( !SettingsGetLoc(settingsDir) )
01401         return;
01402
01403     CFindSettings finder(path);
01404     FileTraverse(settingsDir, finder);
01405
01406     if( finder.m_settingsFile.empty() )
01407         return;
01408
01409     SaveAllSettings(finder.m_settingsFile, finder.m_topfolder, quiet);
01410 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ProgressDlg.cpp File Reference

common/ProgressDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "ProgressDlg.h"
#include "AppConsole.h"

Include dependency graph for ProgressDlg.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:45:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ProgressDlg.h File Reference

common/ProgressDlg.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CProgress
Progress indicator wrapper class. More...
class | CProgressDlg
Progress dialog, should be dynamically allocated. More...

Defines

#define | AFX_PROGRESSDLG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_

Enumerations

enum kProgressType {
kProgressBar,
kProgressText,
kProgressFile
}
Progress indicator type enum. More...

Define Documentation

#define AFX_PROGRESSDLG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_

Definition at line 22 of file ProgressDlg.h.

Enumeration Type Documentation

enum kProgressType

Progress indicator type enum.

Enumeration values:
kProgressBar | Progress bar as the progress indicator
kProgressText | Text as the progress indicator
kProgressFile | File name as the progress indicator
Definition at line 31 of file ProgressDlg.h.
00032 {
00033     kProgressBar,
00034     kProgressText,
00035     kProgressFile
00036 } kProgressType;

Generated on Sat Aug 7 22:45:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PromptFiles.cpp File Reference

common/PromptFiles.cpp File Reference

#include "stdafx.h"
#include "PromptFiles.h"
#include "MultiFiles.h"
#include "AppConsole.h"
#include "CvsCommands.h"
#include "CvsArgs.h"
#include "MfFileDialog.h"

Include dependency graph for PromptFiles.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | FILTER_SEPARATOR "|"
#define | FILTER_EXECUTABLE "Executable Files (*.exe)" FILTER_SEPARATOR "*.exe"
#define | FILTER_DLL "DLL Files (*.dll)" FILTER_SEPARATOR "*.dll"
#define | FILTER_ALL "All Files (*.*)" FILTER_SEPARATOR "*.*"
#define | FILTER_END FILTER_SEPARATOR FILTER_SEPARATOR

Functions

bool | BrowserGetDirectory (const char *prompt, UStr &dir, CWnd *pParentWnd)
bool | BrowserGetMultiFiles (const char *prompt, MultiFiles &mf, bool single, const kFilesSelectionType selectionType)
bool | BrowserGetSaveasFile (const char *prompt, const kFilesSelectionType selectionType, UStr &fullpath)

Define Documentation

#define FILTER_ALL "All Files (*.*)" FILTER_SEPARATOR "*.*"

Definition at line 78 of file PromptFiles.cpp.

Referenced by BrowserGetMultiFiles(), and BrowserGetSaveasFile().

#define FILTER_DLL "DLL Files (*.dll)" FILTER_SEPARATOR "*.dll"

Definition at line 77 of file PromptFiles.cpp.

Referenced by BrowserGetMultiFiles(), and BrowserGetSaveasFile().

#define FILTER_END FILTER_SEPARATOR FILTER_SEPARATOR

Definition at line 79 of file PromptFiles.cpp.

Referenced by BrowserGetMultiFiles(), and BrowserGetSaveasFile().

#define FILTER_EXECUTABLE "Executable Files (*.exe)" FILTER_SEPARATOR "*.exe"

Definition at line 76 of file PromptFiles.cpp.

Referenced by BrowserGetMultiFiles(), and BrowserGetSaveasFile().

#define FILTER_SEPARATOR "|"

Definition at line 75 of file PromptFiles.cpp.

Referenced by BrowserGetMultiFiles(), and BrowserGetSaveasFile().

Function Documentation

bool BrowserGetDirectory | ( | const char * | prompt,
 |  | UStr & | dir,
 |  | CWnd * | pParentWnd
 | ) |

Prompts the user for directory selection

Parameters:
prompt | Dialog caption
dir | Pass initial directory, return selected directory if selection done
pParentWnd | Parent for the dialog, important if you call it from within the dialog
Returns:
true if selection was done, false otherwise
Definition at line 154 of file PromptFiles.cpp.

References CStr, FSSpec, SplitPath(), stat::st_mode, and stat.

00155 {
00156     bool result = false;
00157
00158 #ifdef WIN32  //{ Win32 - Part
00159     CCJShell m_shell;
00160     m_shell.m_strTitle = prompt;
00161     m_shell.m_strSelDir = dir;
00162
00163     if( m_shell.BrowseForFolder(pParentWnd != 0L ? pParentWnd : AfxGetMainWnd()) )
00164     {
00165         dir = m_shell.m_strPath;
00166         result = true;
00167     }
00168 #endif //{ WIN32
00169
00170 #ifdef TARGET_OS_MAC   //{ Mac - Part
00171         UNavServicesDialogs::LFileChooser chooser;
00172
00173         FSSpec folderReply;
00174         SInt32 outFolderDirID;
00175         if( chooser.AskChooseFolder(folderReply, outFolderDirID) )
00176         {
00177             GUSIFileSpec dirSpec(folderReply);
00178             dir = dirSpec.FullPath();
00179             result = true;
00180         }
00181 #endif  //{ TARGET_OS_MAC
00182
00183 #ifdef qQT  //{ QT - Part
00184     QFileDialog::Mode mode = QFileDialog::Directory;
00185     QString start(QDir::currentDirPath());
00186     QString filter("*");
00187     QString caption(prompt);
00188
00189     QFileDialog fd(start, filter, 0, 0L, TRUE);
00190     fd.setMode(mode);
00191     fd.setCaption(caption);
00192     fd.setSelection(start);
00193     if( fd.exec() == QDialog::Accepted )
00194     {
00195         dir = fd.dirPath();
00196         result = true;
00197     }
00198 #endif //} qQT
00199
00200 #ifdef qGTK  //{ GTK - Part
00201 extern GtkWidget *MainWindow;
00202     /* Create a new file selection widget */
00203     GtkWidget* filew = gtk_file_selection_new (prompt);
00204     GtkWidget *pp = pParentWnd ? (GtkWidget *)pParentWnd : MainWindow; \
00205     if( filew && pp) gtk_window_set_transient_for (GTK_WINDOW (filew), GTK_WINDOW (pp)); \
00206
00207     gtk_signal_connect(GTK_OBJECT(filew), "delete_event",
00208                        GTK_SIGNAL_FUNC(gtkcancel), 0L);
00209
00210     /* Connect the ok_button to file_ok_sel function */
00211     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
00212                       "clicked", (GtkSignalFunc) file_ok_sel, filew);
00213     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button),
00214                       "clicked", (GtkSignalFunc) file_cancel_sel, filew);
00215     //{ WORKAROUND  Bug #440874
00216     // call 'fileop_c_dir_sel' when file options selected
00217     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->fileop_c_dir),
00218                       "clicked", (GtkSignalFunc) fileop_c_dir_sel, filew);
00219     //}  WORKAROUND  Bug #440874
00220
00221     gtkModalLoop = true;
00222     gtksel = "";
00223     gtk_widget_show(filew);
00224     //{ WORKAROUND Bug 440874: blocks keyboard in create dialog if uncommented
00225     gtk_grab_add(filew);
00226     //} WORKAROUND Bug 440874
00227     while( gtkModalLoop )
00228     {
00229         gtk_main_iteration_do(TRUE);
00230     }
00231
00232     //{ WORKAROUND Bug 440874: blocks keyboard in create dialog if uncommented
00233     gtk_grab_remove (filew);
00234     //} BWORKAROUND Bug 440874
00235
00236     gtk_widget_destroy(filew);
00237
00238     if( !gtksel.empty() )
00239     {
00240         static CStr fname;
00241
00242         fname = gtksel;
00243         if( !fname.empty() )
00244         {
00245             struct stat sb;
00246             if( stat(fname, &sb) != -1 && S_ISREG(sb.st_mode) )
00247             {
00248                 CStr uppath, file;
00249                 SplitPath(fname, uppath, file);
00250                 fname = uppath;
00251             }
00252
00253             fname.rtrim(kPathDelimiter);
00254
00255             dir = fname;
00256             result = true;
00257         }
00258     }
00259 #endif //}  qGTK
00260
00261     return result;
00262 }

Here is the call graph for this function:

bool BrowserGetMultiFiles | ( | const char * | prompt,
 |  | MultiFiles & | mf,
 |  | bool | single,
 |  | const kFilesSelectionType | selectionType
 | ) |

Get the set of files

Parameters:
prompt | Caption for the dialog
mf | Pass the initial file(single file only!) and directory, return the set of files, sorted by directory (class MultiFiles)
single | Set to true to allow the selection of a single file only, false for multi-selection
selectionType | Selection type
Returns:
true on success, false otherwise
Definition at line 272 of file PromptFiles.cpp.

References MultiFiles::begin(), MultiFiles::const_iterator, CStr, cvs_err(), MultiFiles::end(), FILTER_ALL, FILTER_DLL, FILTER_END, FILTER_EXECUTABLE, FILTER_SEPARATOR, kSelectAny, kSelectDll, kSelectExecutable, MultiFiles::newdir(), MultiFiles::newfile(), NULL, MultiFiles::NumDirs(), MultiFiles::reset(), SplitPath(), MultiFiles::TotalNumFiles(), and UFSSpec.

Referenced by BrowseForFile(), and KiSelectionHandler::GetSelection().

00274 {
00275     bool result = false;
00276
00277     // Extract the directory and file to select
00278     CStr selDir;    // Directory to be initially selected (browse starting from that directory)
00279     CStr selFile;   // File to be initially selected
00280
00281     // Check the passed file/directory
00282     if( mf.NumDirs() > 0 )
00283     {
00284         MultiFiles::const_iterator mfi = mf.begin();
00285         if( mfi != mf.end() )
00286         {
00287             CvsArgs args(false);
00288             selDir = mfi->add(args);
00289
00290             // Single file passed - we can select it
00291             if( mf.TotalNumFiles() == 1 )
00292             {
00293                 CStr path;
00294                 CStr fileName;
00295                 CStr currRev;
00296
00297                 if( mfi->get(0, path, fileName, currRev) )
00298                 {
00299                     selFile = fileName;
00300                 }
00301             }
00302         }
00303     }
00304
00305     // Clear the selection object
00306     mf.reset();
00307
00308 #ifdef WIN32  //{ Win32 - Part
00309     const char* lpszFilter = FILTER_ALL FILTER_END;
00310     switch( selectionType )
00311     {
00312     default:
00313     case kSelectAny:
00314         lpszFilter = FILTER_ALL FILTER_END;
00315         break;
00316     case kSelectExecutable:
00317         lpszFilter = FILTER_EXECUTABLE FILTER_SEPARATOR FILTER_ALL FILTER_END;
00318         break;
00319     case kSelectDll:
00320         lpszFilter = FILTER_DLL FILTER_SEPARATOR FILTER_ALL FILTER_END;
00321         break;
00322     }
00323
00324     if( selDir.empty() )
00325     {
00326         // No selection specified, use current directory
00327         TCHAR curDir[_MAX_PATH] = { 0 };
00328         GetCurrentDirectory(_MAX_PATH-1, curDir);
00329         selDir = curDir;
00330     }
00331
00332     DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_FILEMUSTEXIST;
00333     if( !single )
00334     {
00335         dwFlags |= OFN_ALLOWMULTISELECT;
00336     }
00337
00338     CMfFileDialog mfFileDialog(mf, NULL, selFile.c_str(), dwFlags, lpszFilter);
00339
00340     mfFileDialog.m_ofn.lpstrTitle = prompt;
00341     mfFileDialog.m_ofn.lpstrInitialDir = selDir.c_str();
00342
00343     if( mfFileDialog.DoModal() == IDOK )
00344     {
00345         result = true;
00346     }
00347 #endif //{ WIN32
00348
00349 #ifdef TARGET_OS_MAC   //{ Mac - Part
00350     Point apt = {-1, -1};
00351     Str255 pprompt;
00352
00353     c2pstrcpy(pprompt, prompt);
00354
00355     if(!SF_PromptForMFiles(apt, pprompt))
00356         return false;
00357
00358     SF_PFMF_INFO info;
00359     UFSSpec dirSpec;
00360
00361     SF_PFMF_BeginTraversal(&info);
00362     while( 1 )
00363     {
00364         if( !SF_PFMF_GetCurrentDir(&info, &dirSpec) )
00365             break;
00366
00367         char aPath[255];
00368         GUSIFileSpec spec = dirSpec;
00369         char* specPath = spec.FullPath();
00370         if( spec.Error() == noErr )
00371         {
00372           strcpy(aPath, specPath);
00373             mf.newdir(aPath);
00374
00375             if( SF_PFMF_DoTraversal(&info, true, (SF_PFMF_HOOK)MacEnumFiles_hook, &mf) )
00376             {
00377                 result = true;
00378             }
00379         }
00380         else
00381         {
00382             cvs_err("MacCvs: Unable to convert path name\n");
00383         }
00384
00385     }
00386     SF_PFMF_EndTraversal(&info);
00387
00388 #endif  //{ TARGET_OS_MAC
00389
00390 #ifdef qQT  //{ QT - Part
00391     QStringList s = QFileDialog::getOpenFileNames();
00392     vector<CStr> allpaths;
00393     QStringList::Iterator f;
00394     for(f = s.begin(); f != s.end(); f++)
00395     {
00396         allpaths.push_back(CStr(*f));
00397     }
00398
00399     if( allpaths.size() > 0 )
00400     {
00401         qsort(&allpaths[0], allpaths.size(), sizeof(CStr), (int(*)(const void*, const void*))compareCStr);
00402
00403         vector<CStr>::const_iterator i;
00404         CStr uppath, file, oldpath;
00405         for(i = allpaths.begin(); i != allpaths.end(); ++i)
00406         {
00407             SplitPath(*i, uppath, file);
00408             if( strcmp(uppath, oldpath) != 0 )
00409                 mf.newdir(uppath);
00410
00411             oldpath = uppath;
00412             mf.newfile(file);
00413         }
00414
00415         result = true;
00416     }
00417 #endif //} qQT
00418
00419 #ifdef qGTK  //{ GTK - Part
00420     /* Create a new file selection widget */
00421     GtkWidget* filew = gtk_file_selection_new(prompt);
00422
00423     gtk_signal_connect(GTK_OBJECT(filew), "delete_event",
00424         GTK_SIGNAL_FUNC(gtkcancel), 0L);
00425
00426     /* Connect the ok_button to file_ok_sel function */
00427     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
00428         "clicked", (GtkSignalFunc) file_ok_sel, filew);
00429     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button),
00430         "clicked", (GtkSignalFunc) file_cancel_sel, filew);
00431
00432     gtkModalLoop = true;
00433     gtksel = "";
00434     gtk_widget_show(filew);
00435
00436     //{ WORKAROUND Bug 440874: Directory creation is not necessary in this file selection box
00437     gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(filew));
00438     //{ WORKAROUND Bug 440874
00439
00440     gtk_grab_add(filew);
00441     while( gtkModalLoop )
00442     {
00443         gtk_main_iteration_do(TRUE);
00444     }
00445
00446     gtk_grab_remove (filew);
00447     gtk_widget_destroy(filew);
00448
00449     if( !gtksel.empty() )
00450     {
00451         CStr fname = gtksel;
00452         if( !fname.empty() )
00453         {
00454             CStr uppath, file;
00455             SplitPath(fname, uppath, file);
00456             mf.newdir(uppath);
00457             mf.newfile(file);
00458
00459             result = true;
00460         }
00461     }
00462 #endif //}  qGTK
00463
00464     return result;
00465 }

Here is the call graph for this function:

bool BrowserGetSaveasFile | ( | const char * | prompt,
 |  | const kFilesSelectionType | selectionType,
 |  | UStr & | fullpath
 | ) |

Get a file name to save to

Parameters:
prompt | Caption for the dialog
selectionType | Selection type
fullpath | The initial selection path, return the selected path
Returns:
true on success, false otherwise
Definition at line 474 of file PromptFiles.cpp.

References CStr, FILTER_ALL, FILTER_DLL, FILTER_END, FILTER_EXECUTABLE, FILTER_SEPARATOR, kSelectAny, kSelectDll, kSelectExecutable, NULL, and SplitPath().

00476 {
00477     bool result = false;
00478
00479     CStr selDir;    // Directory to be initially selected (browse starting from that directory)
00480     CStr selFile;   // File to be initially selected
00481
00482     SplitPath( fullpath.c_str(), selDir, selFile);
00483
00484 #ifdef WIN32  //{ Win32 - Part
00485     const char* lpszFilter = FILTER_ALL FILTER_END;
00486     switch( selectionType )
00487     {
00488     default:
00489     case kSelectAny:
00490         lpszFilter = FILTER_ALL FILTER_END;
00491         break;
00492     case kSelectExecutable:
00493         lpszFilter = FILTER_EXECUTABLE FILTER_SEPARATOR FILTER_ALL FILTER_END;
00494         break;
00495     case kSelectDll:
00496         lpszFilter = FILTER_DLL FILTER_SEPARATOR FILTER_ALL FILTER_END;
00497         break;
00498     }
00499
00500     DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
00501
00502     CFileDialog fdFileDialog(false, NULL, selFile.c_str(), dwFlags, lpszFilter);
00503     fdFileDialog.m_ofn.lpstrInitialDir = selDir.c_str();
00504     fdFileDialog.m_ofn.lpstrTitle = prompt;
00505
00506     if( fdFileDialog.DoModal() == IDOK )
00507     {
00508         fullpath = fdFileDialog.m_ofn.lpstrFile;
00509         result = true;
00510     }
00511 #endif //{ WIN32
00512
00513 #ifdef TARGET_OS_MAC   //{ Mac - Part
00514 #endif  //{ TARGET_OS_MAC
00515
00516 #ifdef qQT  //{ QT - Part
00517 #endif //} qQT
00518
00519 #ifdef qGTK  //{ GTK - Part
00520 #endif //}  qGTK
00521
00522     return result;
00523
00524 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PromptFiles.h File Reference

common/PromptFiles.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Enumerations

enum kFilesSelectionType {
kSelectAny,
kSelectExecutable,
kSelectDll
}
Get MultiFiles dialog type enum. More...

Functions

bool | BrowserGetDirectory (const char *prompt, CStr &dir, CWnd *pParentWnd=0L)
bool | BrowserGetMultiFiles (const char *prompt, MultiFiles &mf, bool single, const kFilesSelectionType selectionType=kSelectAny)
bool | BrowserGetSaveasFile (const char *prompt, const kFilesSelectionType selectionType, CStr &fullpath)

Enumeration Type Documentation

enum kFilesSelectionType

Get MultiFiles dialog type enum.

Enumeration values:
kSelectAny | Any file can be selected
kSelectExecutable | Executable file can be selected
kSelectDll | DLL file can be selected
Definition at line 33 of file PromptFiles.h.
00034 {
00035     kSelectAny,
00036     kSelectExecutable,
00037     kSelectDll
00038 } kFilesSelectionType;

Function Documentation

bool BrowserGetDirectory | ( | const char * | prompt,
 |  | CStr & | dir,
 |  | CWnd * | pParentWnd = 0L
 | ) |

Referenced by CompatGetCheckout(), CompatGetCommand(), CompatGetImport(), KiSelectionHandler::GetSelection(), glue_getenv(), CWincvsDoc::OnBrowserOpen(), UCvsFrame::OnBrowserPopup(), CGetPrefs_CVS::OnBtnhome(), CImport_OPTIONS::OnBtnpath(), CCheckout_MAIN::OnBtnPath(), CGetPrefs_WINCVS::OnBtnsettings(), and CCmdLine_MAIN::OnSelfolder().

bool BrowserGetMultiFiles | ( | const char * | prompt,
 |  | MultiFiles & | mf,
 |  | bool | single,
 |  | const kFilesSelectionType | selectionType
 | ) |

Get the set of files

Parameters:
prompt | Caption for the dialog
mf | Pass the initial file(single file only!) and directory, return the set of files, sorted by directory (class MultiFiles)
single | Set to true to allow the selection of a single file only, false for multi-selection
selectionType | Selection type
Returns:
true on success, false otherwise
Definition at line 272 of file PromptFiles.cpp.

References MultiFiles::begin(), MultiFiles::const_iterator, CStr, cvs_err(), MultiFiles::end(), FILTER_ALL, FILTER_DLL, FILTER_END, FILTER_EXECUTABLE, FILTER_SEPARATOR, kSelectAny, kSelectDll, kSelectExecutable, MultiFiles::newdir(), MultiFiles::newfile(), NULL, MultiFiles::NumDirs(), MultiFiles::reset(), SplitPath(), MultiFiles::TotalNumFiles(), and UFSSpec.

Referenced by BrowseForFile(), and KiSelectionHandler::GetSelection().

00274 {
00275     bool result = false;
00276
00277     // Extract the directory and file to select
00278     CStr selDir;    // Directory to be initially selected (browse starting from that directory)
00279     CStr selFile;   // File to be initially selected
00280
00281     // Check the passed file/directory
00282     if( mf.NumDirs() > 0 )
00283     {
00284         MultiFiles::const_iterator mfi = mf.begin();
00285         if( mfi != mf.end() )
00286         {
00287             CvsArgs args(false);
00288             selDir = mfi->add(args);
00289
00290             // Single file passed - we can select it
00291             if( mf.TotalNumFiles() == 1 )
00292             {
00293                 CStr path;
00294                 CStr fileName;
00295                 CStr currRev;
00296
00297                 if( mfi->get(0, path, fileName, currRev) )
00298                 {
00299                     selFile = fileName;
00300                 }
00301             }
00302         }
00303     }
00304
00305     // Clear the selection object
00306     mf.reset();
00307
00308 #ifdef WIN32  //{ Win32 - Part
00309     const char* lpszFilter = FILTER_ALL FILTER_END;
00310     switch( selectionType )
00311     {
00312     default:
00313     case kSelectAny:
00314         lpszFilter = FILTER_ALL FILTER_END;
00315         break;
00316     case kSelectExecutable:
00317         lpszFilter = FILTER_EXECUTABLE FILTER_SEPARATOR FILTER_ALL FILTER_END;
00318         break;
00319     case kSelectDll:
00320         lpszFilter = FILTER_DLL FILTER_SEPARATOR FILTER_ALL FILTER_END;
00321         break;
00322     }
00323
00324     if( selDir.empty() )
00325     {
00326         // No selection specified, use current directory
00327         TCHAR curDir[_MAX_PATH] = { 0 };
00328         GetCurrentDirectory(_MAX_PATH-1, curDir);
00329         selDir = curDir;
00330     }
00331
00332     DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_FILEMUSTEXIST;
00333     if( !single )
00334     {
00335         dwFlags |= OFN_ALLOWMULTISELECT;
00336     }
00337
00338     CMfFileDialog mfFileDialog(mf, NULL, selFile.c_str(), dwFlags, lpszFilter);
00339
00340     mfFileDialog.m_ofn.lpstrTitle = prompt;
00341     mfFileDialog.m_ofn.lpstrInitialDir = selDir.c_str();
00342
00343     if( mfFileDialog.DoModal() == IDOK )
00344     {
00345         result = true;
00346     }
00347 #endif //{ WIN32
00348
00349 #ifdef TARGET_OS_MAC   //{ Mac - Part
00350     Point apt = {-1, -1};
00351     Str255 pprompt;
00352
00353     c2pstrcpy(pprompt, prompt);
00354
00355     if(!SF_PromptForMFiles(apt, pprompt))
00356         return false;
00357
00358     SF_PFMF_INFO info;
00359     UFSSpec dirSpec;
00360
00361     SF_PFMF_BeginTraversal(&info);
00362     while( 1 )
00363     {
00364         if( !SF_PFMF_GetCurrentDir(&info, &dirSpec) )
00365             break;
00366
00367         char aPath[255];
00368         GUSIFileSpec spec = dirSpec;
00369         char* specPath = spec.FullPath();
00370         if( spec.Error() == noErr )
00371         {
00372           strcpy(aPath, specPath);
00373             mf.newdir(aPath);
00374
00375             if( SF_PFMF_DoTraversal(&info, true, (SF_PFMF_HOOK)MacEnumFiles_hook, &mf) )
00376             {
00377                 result = true;
00378             }
00379         }
00380         else
00381         {
00382             cvs_err("MacCvs: Unable to convert path name\n");
00383         }
00384
00385     }
00386     SF_PFMF_EndTraversal(&info);
00387
00388 #endif  //{ TARGET_OS_MAC
00389
00390 #ifdef qQT  //{ QT - Part
00391     QStringList s = QFileDialog::getOpenFileNames();
00392     vector<CStr> allpaths;
00393     QStringList::Iterator f;
00394     for(f = s.begin(); f != s.end(); f++)
00395     {
00396         allpaths.push_back(CStr(*f));
00397     }
00398
00399     if( allpaths.size() > 0 )
00400     {
00401         qsort(&allpaths[0], allpaths.size(), sizeof(CStr), (int(*)(const void*, const void*))compareCStr);
00402
00403         vector<CStr>::const_iterator i;
00404         CStr uppath, file, oldpath;
00405         for(i = allpaths.begin(); i != allpaths.end(); ++i)
00406         {
00407             SplitPath(*i, uppath, file);
00408             if( strcmp(uppath, oldpath) != 0 )
00409                 mf.newdir(uppath);
00410
00411             oldpath = uppath;
00412             mf.newfile(file);
00413         }
00414
00415         result = true;
00416     }
00417 #endif //} qQT
00418
00419 #ifdef qGTK  //{ GTK - Part
00420     /* Create a new file selection widget */
00421     GtkWidget* filew = gtk_file_selection_new(prompt);
00422
00423     gtk_signal_connect(GTK_OBJECT(filew), "delete_event",
00424         GTK_SIGNAL_FUNC(gtkcancel), 0L);
00425
00426     /* Connect the ok_button to file_ok_sel function */
00427     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
00428         "clicked", (GtkSignalFunc) file_ok_sel, filew);
00429     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button),
00430         "clicked", (GtkSignalFunc) file_cancel_sel, filew);
00431
00432     gtkModalLoop = true;
00433     gtksel = "";
00434     gtk_widget_show(filew);
00435
00436     //{ WORKAROUND Bug 440874: Directory creation is not necessary in this file selection box
00437     gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(filew));
00438     //{ WORKAROUND Bug 440874
00439
00440     gtk_grab_add(filew);
00441     while( gtkModalLoop )
00442     {
00443         gtk_main_iteration_do(TRUE);
00444     }
00445
00446     gtk_grab_remove (filew);
00447     gtk_widget_destroy(filew);
00448
00449     if( !gtksel.empty() )
00450     {
00451         CStr fname = gtksel;
00452         if( !fname.empty() )
00453         {
00454             CStr uppath, file;
00455             SplitPath(fname, uppath, file);
00456             mf.newdir(uppath);
00457             mf.newfile(file);
00458
00459             result = true;
00460         }
00461     }
00462 #endif //}  qGTK
00463
00464     return result;
00465 }

Here is the call graph for this function:

bool BrowserGetSaveasFile | ( | const char * | prompt,
 |  | const kFilesSelectionType | selectionType,
 |  | CStr & | fullpath
 | ) |

Referenced by CGraphView::SaveSel().

Generated on Sat Aug 7 22:45:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonContainer.cpp File Reference

common/PythonContainer.cpp File Reference

#include "stdafx.h"
#include "PythonContainer.h"
#include <vector>

Include dependency graph for PythonContainer.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | PyHandleCvsguiError (CException *e)
void | PyHandleCvsguiError (const char *msg)

Variables

PyObject * | gCvsguiErr = NULL

Function Documentation

void PyHandleCvsguiError ( const char * msg )

Definition at line 125 of file PythonContainer.cpp.

References gCvsguiErr, and PyErr_SetString.

Referenced by PyCvsEntry::Create(), PyColorConsole::Create(), PyMenuMgr::Create(), PyCmdUI::Create(), PyPersistent::Create(), cvsgui_GetHistoryAsXML(), cvsgui_GetMainMenuWidget(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), cvsgui_PromptEditMessage(), cvsgui_PromptMessage(), cvsgui_RunCvs(), and cvsgui_write().

00126 {
00127     PyErr_SetString(gCvsguiErr, msg);
00128 }

void PyHandleCvsguiError ( CException * e )

Definition at line 110 of file PythonContainer.cpp.

00111 {
00112     char tmp[256];
00113     if(e->GetErrorMessage(tmp, sizeof(tmp)))
00114         PyErr_SetString(gCvsguiErr, tmp);
00115     else
00116         PyErr_SetString(gCvsguiErr, "Unknown error");
00117 }

Variable Documentation

PyObject* gCvsguiErr = NULL

Definition at line 28 of file PythonContainer.cpp.

Referenced by cvsgui_GetFileModTime(), cvsgui_RunCvs(), InitializeInterp(), and PyHandleCvsguiError().

Generated on Sat Aug 7 22:45:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonContainer.h File Reference

common/PythonContainer.h File Reference

#include <Python.h>
#include <exception>
#include <vector>
#include "PythonMacros.h"
#include "PythonGlue.impl.h"

Include dependency graph for PythonContainer.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | PyRegistry
class | PyContainer
class | PyAutoObject< T >

Defines

#define | USE_PYTHON 1
#define | USE_DL_EXPORT

Typedefs

typedef void(* | PyRegistry_InitValues )(PyObject *d)

Variables

PyObject * | gCvsguiErr

Define Documentation

#define USE_DL_EXPORT

Definition at line 30 of file PythonContainer.h.

#define USE_PYTHON 1

Definition at line 25 of file PythonContainer.h.

Typedef Documentation

typedef void(* PyRegistry_InitValues)(PyObject *d)

Definition at line 40 of file PythonContainer.h.

Referenced by PyRegistry::PyRegistry().

Variable Documentation

PyObject* gCvsguiErr

Definition at line 28 of file PythonContainer.cpp.

Referenced by cvsgui_GetFileModTime(), cvsgui_RunCvs(), InitializeInterp(), and PyHandleCvsguiError().

Generated on Sat Aug 7 22:45:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonGlue.cpp File Reference

common/PythonGlue.cpp File Reference

#include "stdafx.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "resource.h"
#include "NoPython.h"
#include "PythonGlue.h"
#include "CvsLog.h"
#include "AppConsole.h"
#include "MacrosSetup.h"
#include "umenu.h"
#include "PythonContainer.h"
#include "PythonImpl.h"
#include "TclGlue.h"
#include "AppGlue.h"
#include "CvsArgs.h"
#include "FileTraversal.h"
#include "AskYesNo.h"
#include "dll_loader.h"
#include "CvsPrefs.h"
#include "CvsAlert.h"
#include <osdefs.h>
#include "wincvs_winutil.h"

Include dependency graph for PythonGlue.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CPyThreadState
class | CFillPyEntries
class | CBuffer
class | CPyCvsConsole

Defines

#define | NEW new
#define | LOAD_CODEFRAG(name)

Enumerations

enum {
_stdout_style = 15,
_stderr_style = 16,
_trace_style = 17
}

Functions

PyObject * | cvsgui_write (PyObject *self, PyObject *args)
PyObject * | cvsgui_GetMainMenuWidget (PyObject *self, PyObject *args)
PyObject * | cvsgui_GetTopMacroSelectionMenu (PyObject *self, PyObject *args)
PyObject * | cvsgui_GetTopMacroAdminMenu (PyObject *self, PyObject *args)
PyObject * | cvsgui_GetSelection (PyObject *self, PyObject *args)
PyObject * | cvsgui_GetCvsEntries (PyObject *self, PyObject *args)
PyObject * | cvsgui_GetFileModTime (PyObject *self, PyObject *args)
PyObject * | cvsgui_LaunchTclMacro (PyObject *self, PyObject *args)
PyObject * | cvsgui_PromptMessage (PyObject *self, PyObject *args)
PyObject * | cvsgui_PromptEditMessage (PyObject *self, PyObject *args)
PyObject * | cvsgui_LaunchBrowser (PyObject *self, PyObject *args)
void | outputXML (FILE *out, CLogNode *node)
PyObject * | cvsgui_GetHistoryAsXML (PyObject *self, PyObject *args)
PyObject * | cvsgui_RunCvs (PyObject *self, PyObject *args)
void | InitializeInterp (PyThreadState *interp)
void | PyMacrosReloadAll (void)
void | PyDoCmdUI (UCmdUI *ucmdui)
void | PyDoPython (int cmd)
bool PyIsUICacheValid ()
void | PyValidUICache ()
void | PyInvalUICache ()
void | PyAppendCache (EntnodeData *data)

Variables

bool | gUICacheValid = false
std::vector< ENTNODE > | gUICache
PyObject * | gUICacheObj = NULL
PyMethodDef | cvsgui_methods []
std::vector< PyMethodDef > | gAllMethods

Define Documentation

#define LOAD_CODEFRAG ( name )

Value:

if( pyAvail ) \
            pyAvail = (*(void **)&name##_glue = \
                _CompatCallLibrary(connID, #name)) != 0L

Referenced by CTcl_Interp::IsAvail(), and CPython_Interp::IsAvail().

#define NEW new

Definition at line 89 of file PythonGlue.cpp.

Enumeration Type Documentation

anonymous enum

Enumeration values:
_stdout_style
_stderr_style
_trace_style
Definition at line 120 of file PythonGlue.cpp.
00121 {
00122     _stdout_style = 15,
00123     _stderr_style = 16,
00124     _trace_style = 17
00125 };

Function Documentation

PyObject* cvsgui_GetCvsEntries | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 396 of file PythonGlue.cpp.

References PyAutoObject< T >::CopyReturn(), ENTNODE::Data(), Entries_SetMissing(), FileTraverse(), CSortList< T >::Get(), PyAutoObject< T >::IsValid(), PyCvsEntry::New(), NULL, CSortList< T >::NumOfElements(), PyArg_ParseTuple, and PyTuple_New.

00397 {
00398     char *path;
00399
00400     if(!PyArg_ParseTuple(args, "s", &path))
00401         return NULL;
00402
00403     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00404     CFillPyEntries traverse(entries);
00405     /*kTraversal res = */FileTraverse(path, traverse);
00406
00407     // add the missing files
00408     Entries_SetMissing(entries);
00409
00410     int numEntries = entries.NumOfElements();
00411     PyObject *obj = PyTuple_New(numEntries);
00412     if(obj == NULL)
00413         return NULL;
00414
00415     for(int i = 0; i < numEntries; i++)
00416     {
00417         const ENTNODE & theNode = entries.Get(i);
00418         EntnodeData *data = theNode.Data();
00419
00420         PyAutoObject<PyCvsEntry::obj_t> res = PyCvsEntry::New();
00421         if (!res.IsValid())
00422             return NULL;
00423
00424         res->m_object = new PyCvsEntry(data);
00425
00426         PyTuple_SET_ITEM(obj, i, res.CopyReturn());
00427     }
00428
00429     return obj;
00430 }

Here is the call graph for this function:

PyObject* cvsgui_GetFileModTime | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 437 of file PythonGlue.cpp.

References gCvsguiErr, NULL, Py_BuildValue, PyArg_ParseTuple, and PyErr_SetString.

00438 {
00439     struct wnt_stat sb;
00440     struct tm * p_utc = NULL;
00441
00442     const char *path;
00443
00444 // PyObject_Length exists only for debugging version (ActiveState Python 2.1)
00445 #if defined(_DEBUG)
00446     int len = PyObject_Length(args);
00447     if (len < 1)
00448     {
00449         char errstr[255];
00450         sprintf(errstr, "Too few arguments (%d, expected 1)", len);
00451         PyErr_SetString(gCvsguiErr, errstr);
00452         return NULL;
00453     }
00454     else if (len > 1)
00455     {
00456         char errstr[255];
00457         sprintf(errstr, "Too many arguments (%d, expected 1)", len);
00458         PyErr_SetString(gCvsguiErr, errstr);
00459         return NULL;
00460     }
00461 #endif
00462
00463     if(!PyArg_ParseTuple(args, "s", &path))
00464         return NULL;
00465
00466     if (wnt_stat(path, &sb) != 0)
00467     {
00468         char errstr[255];
00469         sprintf(errstr, "Could not find file \"%s\"", path);
00470         PyErr_SetString(gCvsguiErr, errstr);
00471         return NULL;
00472     }
00473
00474     p_utc = gmtime(& sb.st_mtime);
00475     return Py_BuildValue("s", asctime(p_utc));
00476 }

PyObject* cvsgui_GetHistoryAsXML | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 762 of file PythonGlue.cpp.

References CvsLogParse(), GetPyFile_Type(), NULL, outputXML(), PyArg_ParseTuple, PyFile_AsFile, PyHandleCvsguiError(), and PyContainer::Void().

00763 {
00764     PyObject *logfile, *xmlfile;
00765
00766     if(!PyArg_ParseTuple(args, "O!O!", GetPyFile_Type(), &logfile,
00767         GetPyFile_Type(), &xmlfile))
00768             return NULL;
00769
00770     TRY
00771     {
00772         std::vector<CRcsFile> & allRcs = CvsLogParse(PyFile_AsFile(logfile));
00773
00774         std::vector<CRcsFile>::iterator i;
00775         FILE *xml = PyFile_AsFile(xmlfile);
00776         fputs("<ROOT>\n", xml);
00777         for(i = allRcs.begin(); i != allRcs.end(); ++i)
00778         {
00779             std::auto_ptr<CLogNode> node(CvsLogGraph(*i));
00780             outputXML(xml, node.get());
00781         }
00782         fputs("</ROOT>\n", xml);
00783
00784         CvsLogReset();
00785     }
00786     CATCH_ALL(e)
00787     {
00788         PyHandleCvsguiError(e);
00789         return NULL;
00790     }
00791     END_CATCH_ALL
00792
00793     return PyContainer::Void();
00794 }

Here is the call graph for this function:

PyObject* cvsgui_GetMainMenuWidget | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 153 of file PythonGlue.cpp.

References UCmdTarget::GetWidID(), kUCvsMenubarID, NULL, PyArg_ParseTuple, PyHandleCvsguiError(), PyInt_FromLong, and UEventQueryWidget().

00154 {
00155     int res = 0;
00156
00157     if(!PyArg_ParseTuple(args, ""))
00158         return NULL;
00159
00160     TRY
00161     {
00162 #ifdef qUnix
00163         UCvsMenubar *menuBar = (UCvsMenubar *)UEventQueryWidget(kUCvsMenubarID);
00164
00165         res = menuBar->GetWidID();
00166 #endif
00167     }
00168     CATCH_ALL(e)
00169     {
00170         PyHandleCvsguiError(e);
00171         return NULL;
00172     }
00173     END_CATCH_ALL
00174
00175     return PyInt_FromLong(res);
00176 }

Here is the call graph for this function:

PyObject* cvsgui_GetSelection | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 294 of file PythonGlue.cpp.

References PyAutoObject< T >::CopyReturn(), gUICache, gUICacheObj, PyAutoObject< T >::IsValid(), PyCvsEntry::New(), NULL, PyArg_ParseTuple, and PyTuple_New.

00295 {
00296     if(!PyArg_ParseTuple(args, ""))
00297         return NULL;
00298
00299     if(gUICacheObj != 0L)
00300     {
00301         Py_INCREF(gUICacheObj);
00302         return gUICacheObj;
00303     }
00304
00305     gUICacheObj = PyTuple_New(gUICache.size());
00306     if(gUICacheObj == NULL)
00307         return NULL;
00308
00309     std::vector<ENTNODE>::const_iterator i;
00310     int cnt;
00311     for(cnt = 0, i = gUICache.begin(); i != gUICache.end(); ++i, ++cnt)
00312     {
00313         PyAutoObject<PyCvsEntry::obj_t> res = PyCvsEntry::New();
00314         if (!res.IsValid())
00315             return NULL;
00316
00317         res->m_object = new PyCvsEntry(*i);
00318
00319         PyTuple_SET_ITEM(gUICacheObj, cnt, res.CopyReturn());
00320     }
00321
00322     Py_INCREF(gUICacheObj);
00323     return gUICacheObj;
00324 }

Here is the call graph for this function:

PyObject* cvsgui_GetTopMacroAdminMenu | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 236 of file PythonGlue.cpp.

References cmdADMINMACROS, PyAutoObject< T >::CopyReturn(), GetMenuEntry(), UWidget::GetWidget(), ID_MACRO_ADMIN, PyAutoObject< T >::IsValid(), kUCvsMenubarID, PyMenuMgr::New(), NULL, PyArg_ParseTuple, PyHandleCvsguiError(), UEventQueryWidget(), UMENU, and UMenuDelete().

00237 {
00238     static UMENU macroMenu = 0L;
00239
00240     if(!PyArg_ParseTuple(args, ""))
00241         return NULL;
00242
00243     PyAutoObject<PyMenuMgr::obj_t> res = PyMenuMgr::New();
00244     if (!res.IsValid())
00245         return NULL;
00246
00247     TRY
00248     {
00249 #ifdef WIN32
00250         int pos;
00251         if(macroMenu == 0L)
00252         {
00253             CMenu *top = GetMenuEntry(ID_MACRO_ADMIN, pos);
00254             if(top)
00255             {
00256                 top->DeleteMenu(pos, MF_BYPOSITION);
00257                 macroMenu = (UMENU)(HMENU)*top;
00258             }
00259         }
00260 #endif
00261 #if qMacCvsPP
00262         if(macroMenu == 0L)
00263         {
00264             LMenuBar *menuBar   = LMenuBar::GetCurrentMenuBar();
00265             LMenu *menu = menuBar->FetchMenu(menu_MacroAdmin);
00266             if(menu)
00267                 macroMenu = menu->GetMenuID();
00268         }
00269 #endif
00270 #if qUnix
00271         if(macroMenu == 0L)
00272         {
00273             UCvsMenubar *menuBar = (UCvsMenubar *)UEventQueryWidget(kUCvsMenubarID);
00274             UMenu *menu = (UMenu *)(menuBar->GetWidget(cmdADMINMACROS));
00275
00276             if(menu) {
00277                 UMenuDelete((UMENU)menu, 0);
00278                 macroMenu = (UMENU)menu;
00279             }
00280         }
00281 #endif
00282         res->m_object = new PyMenuMgr(macroMenu);
00283     }
00284     CATCH_ALL(e)
00285     {
00286         PyHandleCvsguiError(e);
00287         return NULL;
00288     }
00289     END_CATCH_ALL
00290
00291     return res.CopyReturn();
00292 }

Here is the call graph for this function:

PyObject* cvsgui_GetTopMacroSelectionMenu | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 178 of file PythonGlue.cpp.

References cmdMACROS, PyAutoObject< T >::CopyReturn(), GetMenuEntry(), UWidget::GetWidget(), ID_MACRO_SEL, PyAutoObject< T >::IsValid(), kUCvsMenubarID, PyMenuMgr::New(), NULL, PyArg_ParseTuple, PyHandleCvsguiError(), UEventQueryWidget(), UMENU, and UMenuDelete().

00179 {
00180     static UMENU macroMenu = 0L;
00181
00182     if(!PyArg_ParseTuple(args, ""))
00183         return NULL;
00184
00185     PyAutoObject<PyMenuMgr::obj_t> res = PyMenuMgr::New();
00186     if (!res.IsValid())
00187         return NULL;
00188
00189     TRY
00190     {
00191 #ifdef WIN32
00192         int pos;
00193         if(macroMenu == 0L)
00194         {
00195             CMenu *top = GetMenuEntry(ID_MACRO_SEL, pos);
00196             if(top)
00197             {
00198                 top->DeleteMenu(pos, MF_BYPOSITION);
00199                 macroMenu = (UMENU)(HMENU)*top;
00200             }
00201         }
00202 #endif
00203 #if qMacCvsPP
00204         if(macroMenu == 0L)
00205         {
00206             LMenuBar *menuBar   = LMenuBar::GetCurrentMenuBar();
00207             LMenu *menu = menuBar->FetchMenu(menu_MacroSel);
00208             if(menu)
00209                 macroMenu = menu->GetMenuID();
00210         }
00211 #endif
00212 #if qUnix
00213         if(macroMenu == 0L)
00214         {
00215             UCvsMenubar *menuBar = (UCvsMenubar *)UEventQueryWidget(kUCvsMenubarID);
00216             UMenu *menu = (UMenu *)(menuBar->GetWidget(cmdMACROS));
00217
00218             if(menu) {
00219                 UMenuDelete((UMENU)menu, 0);
00220                 macroMenu = (UMENU)menu;
00221             }
00222         }
00223 #endif
00224         res->m_object = new PyMenuMgr(macroMenu);
00225     }
00226     CATCH_ALL(e)
00227     {
00228         PyHandleCvsguiError(e);
00229         return NULL;
00230     }
00231     END_CATCH_ALL
00232
00233     return res.CopyReturn();
00234 }

Here is the call graph for this function:

PyObject* cvsgui_LaunchBrowser | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 631 of file PythonGlue.cpp.

References NULL, PyArg_ParseTuple, and PyContainer::Void().

00632 {
00633     char *url;
00634
00635     if(!PyArg_ParseTuple(args, "s", &url))
00636         return NULL;
00637
00638 #ifdef WIN32
00639     ShellExecute(NULL, "open", url, /*postData*/0L, NULL, SW_SHOWNORMAL);
00640 #endif
00641
00642     return PyContainer::Void();
00643 }

Here is the call graph for this function:

PyObject* cvsgui_LaunchTclMacro | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 479 of file PythonGlue.cpp.

References CStr, CTcl_Interp::DoScriptVar(), gUICache, CTcl_Interp::IsAvail(), NULL, PyArg_ParseTuple, TclBrowserAppend(), TclBrowserReset(), CTcl_Interp::Unixfy(), and PyContainer::Void().

00480 {
00481     char *macroName;
00482
00483     if(!PyArg_ParseTuple(args, "s", &macroName) || !CTcl_Interp::IsAvail())
00484         return NULL;
00485
00486     std::vector<ENTNODE>::const_iterator i;
00487     TclBrowserReset();
00488     for(i = gUICache.begin(); i != gUICache.end(); ++i)
00489     {
00490         EntnodeData *data = *i;
00491         TclBrowserAppend((*data)[EntnodeData::kPath], data);
00492     }
00493
00494     CTcl_Interp interp;
00495     CStr path = macroName;
00496     CTcl_Interp::Unixfy(path);
00497     interp.DoScriptVar("source \"%s\"", (const char *)path);
00498
00499     return PyContainer::Void();
00500 }

Here is the call graph for this function:

PyObject* cvsgui_PromptEditMessage | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 606 of file PythonGlue.cpp.

References UStr::c_str(), UStr::empty(), NULL, PromptEditMessage(), Py_BuildValue, PyArg_ParseTuple, and PyHandleCvsguiError().

00607 {
00608     char *msg, *title, *ok, *cncl, *edit;
00609
00610     if(!PyArg_ParseTuple(args, "sssss", &msg, &edit, &title, &ok, &cncl))
00611         return NULL;
00612
00613     bool res;
00614     UStr ed;
00615
00616     TRY
00617     {
00618         ed = edit;
00619         res = PromptEditMessage(msg, ed, title, ok, cncl);
00620     }
00621     CATCH_ALL(e)
00622     {
00623         PyHandleCvsguiError(e);
00624         return NULL;
00625     }
00626     END_CATCH_ALL
00627
00628     return Py_BuildValue("(is)", res ? 1 : 0, ed.empty() ? "" : ed.c_str());
00629 }

Here is the call graph for this function:

PyObject* cvsgui_PromptMessage | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 575 of file PythonGlue.cpp.

References PyContainer::False(), kCvsAlertOKButton, kCvsAlertQuestionIcon, NULL, PyArg_ParseTuple, PyHandleCvsguiError(), CvsAlert::SetAlertTitle(), CvsAlert::ShowAlert(), and PyContainer::True().

00576 {
00577     char *msg, *title, *ok, *cncl;
00578
00579     if( !PyArg_ParseTuple(args, "ssss", &msg, &title, &ok, &cncl) )
00580         return NULL;
00581
00582     bool res;
00583
00584     TRY
00585     {
00586         CvsAlert cvsAlert(kCvsAlertQuestionIcon, msg, NULL, ok, cncl);
00587         cvsAlert.SetAlertTitle(title);
00588
00589         res = (cvsAlert.ShowAlert() == kCvsAlertOKButton);
00590     }
00591     CATCH_ALL(e)
00592     {
00593         PyHandleCvsguiError(e);
00594         return NULL;
00595     }
00596     END_CATCH_ALL
00597
00598     if( res )
00599     {
00600         return PyContainer::True();
00601     }
00602
00603     return PyContainer::False();
00604 }

Here is the call graph for this function:

PyObject* cvsgui_RunCvs | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 796 of file PythonGlue.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), gCvsguiErr, GetPyTuple_Type(), launchCVS(), CPyCvsConsole::m_err, CPyCvsConsole::m_out, NULL, Py_BuildValue, PyArg_ParseTuple, PyErr_SetString, PyHandleCvsguiError(), PyString_AsString, PyString_Check, PyTuple_Size, UStr::set(), and CBuffer::size().

00797 {
00798     CvsArgs arg;
00799     PyObject *cargs;
00800     int exitOnError = 1;
00801     int exitc;
00802     CPyCvsConsole console;
00803
00804     if(!PyArg_ParseTuple(args, "O!|i", GetPyTuple_Type(), &cargs, &exitOnError))
00805         return NULL;
00806
00807     TRY
00808     {
00809         int argc = PyTuple_Size(cargs);
00810         for(int i = 0; i < argc; i++)
00811         {
00812             PyObject *o = PyTuple_GET_ITEM(cargs, i);
00813             if(!PyString_Check(o))
00814             {
00815                 PyErr_SetString(gCvsguiErr, "Wrong argument type, should be string");
00816                 return NULL;
00817             }
00818
00819             arg.add(PyString_AsString(o));
00820         }
00821
00822         exitc = launchCVS(0L, arg.Argc(), arg.Argv(), &console);
00823
00824         if(exitOnError && exitc != 0)
00825         {
00826             UStr str;
00827             str.set(console.m_err, console.m_err.size());
00828             str << "cvs returned an non-zero error code (";
00829             str << exitc;
00830             str << ")\n";
00831             PyErr_SetString(gCvsguiErr, str);
00832             return NULL;
00833         }
00834     }
00835     CATCH_ALL(e)
00836     {
00837         PyHandleCvsguiError(e);
00838         return NULL;
00839     }
00840     END_CATCH_ALL
00841
00842     return Py_BuildValue("(is#s#)", exitc, (char *)console.m_out, console.m_out.size(),
00843         (char *)console.m_err, console.m_err.size());
00844 }

Here is the call graph for this function:

PyObject* cvsgui_write | ( | PyObject * | self,
 |  | PyObject * | args
 | ) | [static]

Definition at line 127 of file PythonGlue.cpp.

References _stdout_style, cvs_errstr(), cvs_outstr(), NULL, PyArg_ParseTuple, PyHandleCvsguiError(), and PyContainer::Void().

00128 {
00129     char *str;
00130     int style;
00131     PyObject *shell;
00132
00133     if(!PyArg_ParseTuple(args, "siO", &str, &style, &shell))
00134         return NULL;
00135
00136     TRY
00137     {
00138         if(style == _stdout_style)
00139             cvs_outstr(str, strlen(str));
00140         else
00141             cvs_errstr(str, strlen(str));
00142     }
00143     CATCH_ALL(e)
00144     {
00145         PyHandleCvsguiError(e);
00146         return NULL;
00147     }
00148     END_CATCH_ALL
00149
00150     return PyContainer::Void();
00151 }

Here is the call graph for this function:

void InitializeInterp ( PyThreadState * interp ) [static]

Definition at line 868 of file PythonGlue.cpp.

References UStr::c_str(), PyRegistry::CallInitValues(), CStr, cvs_err(), cvsgui_methods, free, gAllMethods, gCvsguiErr, MacrosGetLoc(), malloc, NULL, Py_GetPath, Py_InitModule4, PyDict_SetItemString, PyErr_NewException, PyModule_GetDict, PyRun_SimpleFile, PyRun_SimpleString, PyString_FromString, PySys_SetPath, PythonLibGetLoc(), PyThreadState, and PyRegistry::RegisterAllObjects().

Referenced by CPython_Interp::CPython_Interp(), and CPython_Interp::InitPythonSupport().

00869 {
00870     CPyThreadState lock(interp);
00871
00872     // first time, create the method table for cvsgui module
00873     if(gAllMethods.empty())
00874     {
00875         PyMethodDef *tmp = cvsgui_methods;
00876         while(tmp->ml_name)
00877         {
00878             gAllMethods.push_back(*tmp);
00879             tmp++;
00880         }
00881
00882         PyRegistry::RegisterAllObjects(gAllMethods);
00883     }
00884
00885     // this module contains the glue code functions
00886     PyObject *m = Py_InitModule4("_cvsgui", &gAllMethods[0],
00887         "The cvsgui glue functions", (PyObject*)NULL,PYTHON_API_VERSION);
00888
00889     if(m == NULL)
00890     {
00891         cvs_err("Could not create the Python cvsgui module !\n");
00892         return;
00893     }
00894
00895     // this is the exception we raised when the error comes from us
00896     PyObject *d = PyModule_GetDict(m);
00897     if(gCvsguiErr == NULL)
00898         gCvsguiErr = PyErr_NewException("_cvsgui.error", NULL, NULL);
00899     if (gCvsguiErr != NULL)
00900         PyDict_SetItemString(d, "error", gCvsguiErr);
00901
00902     PyRegistry::CallInitValues(d);
00903
00904     // Ideally we need to use Jonathan's mechanism
00905     PyObject *ver = PyString_FromString("1.3");
00906     if (ver != NULL) {
00907         PyDict_SetItemString(d, "CVSGUI_VERSION", ver);
00908         Py_DECREF(ver);
00909     }
00910
00911 #ifdef WIN32
00912     char *script = NULL;
00913
00914     HINSTANCE hInst = ::AfxGetInstanceHandle();
00915     HRSRC rsrc = FindResource(hInst, "PYSHELL", "PYSCRIPT");
00916
00917     if(rsrc)
00918     {
00919         HGLOBAL h = LoadResource(hInst, rsrc);
00920         if(h)
00921         {
00922             DWORD size = SizeofResource(hInst, rsrc);
00923             script = (char *)malloc(size + 1);
00924             char *ptr = (char *)LockResource(h);
00925
00926             if(script)
00927             {
00928                 char *tmp = script;
00929                 while(size--)
00930                 {
00931                     char c = *ptr++;
00932                     if(c == '\r')
00933                         continue;
00934                     *tmp++ = c;
00935                 }
00936                 *tmp = '\0';
00937             }
00938
00939             FreeResource(h);
00940         }
00941     }
00942
00943 #endif // WIN32
00944 #ifdef qUnix        // Unix
00945     UStr        filename;
00946     CStr        path;
00947     MacrosGetLoc(path);
00948
00949     filename =  path.c_str();
00950     filename += "/cvsgui/Shell.py";
00951 #endif
00952
00953 #if qMacCvsPP
00954   char *script = NULL;
00955
00956   CFURLRef    scriptURL(CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("mfcshell"), CFSTR("py"), NULL));
00957   if ( scriptURL )
00958   {
00959     CFDataRef   scriptData(NULL);
00960     if ( CFURLCreateDataAndPropertiesFromResource(NULL, scriptURL, &scriptData, NULL, NULL, NULL) )
00961     {
00962       CFIndex   size = CFDataGetLength(scriptData);
00963       script = (char *)malloc(size + 1);
00964       memcpy(script, CFDataGetBytePtr(scriptData), size);
00965       script[size] = '\0';
00966       CFRelease(scriptData);
00967     }
00968     CFRelease(scriptURL);
00969   }
00970 #endif // qMacCvsPP
00971
00972     // augment the library path of python with our library
00973     CStr ourLibPath;
00974     PythonLibGetLoc(ourLibPath);
00975
00976     UStr libPath = Py_GetPath();
00977     if(!ourLibPath.empty())
00978     {
00979         libPath << DELIM;
00980         libPath << ourLibPath;
00981         PySys_SetPath((char*)(const char*)libPath);
00982     }
00983
00984 #ifdef qUnix
00985     FILE *f = fopen(filename, "r");
00986     if(f)
00987     {
00988         PyRun_SimpleFile(f, (const char *)filename);
00989         fclose(f);
00990     }
00991     else
00992     {
00993         cvs_err("Could not initialize properly the Python interpreter !\n");
00994     }
00995 #else
00996     // this is the script to setup stdout/stderr and reroute it
00997     // to the console window
00998     if(script)
00999     {
01000         PyRun_SimpleString(script);
01001
01002         free(script);
01003     }
01004     else
01005     {
01006         cvs_err("Could not initialize properly the Python interpreter !\n");
01007     }
01008 #endif
01009 }

Here is the call graph for this function:

void outputXML | ( | FILE * | out,
 |  | CLogNode * | node
 | ) | [static]

Definition at line 645 of file PythonGlue.cpp.

Referenced by cvsgui_GetHistoryAsXML().

00646 {
00647     switch(node->GetType())
00648     {
00649         case kNodeHeader :
00650         {
00651             fputs("<RCS>\n", out);
00652             const CRcsFile rcs = **(CLogNodeHeader *)node;
00653             fprintf(out, "<RCSFILE>%s</RCSFILE>\n", rcs.RcsFile().c_str());
00654             fprintf(out, "<WORKINGFILE>%s</WORKINGFILE>\n", rcs.WorkingFile().c_str());
00655             fprintf(out, "<HEADREV>%s</HEADREV>\n", rcs.HeadRev().c_str());
00656             fprintf(out, "<BRANCHREV>%s</BRANCHREV>\n", rcs.BranchRev().c_str());
00657             fprintf(out, "<KEYWORDSUBST>%s</KEYWORDSUBST>\n", rcs.KeywordSubst().c_str());
00658             fprintf(out, "<DESCRIPTION>%s</DESCRIPTION>\n", rcs.DescLog().c_str());
00659             fprintf(out, "<SELREVISIONS>%d</SELREVISIONS>\n", rcs.SelRevisions());
00660             fprintf(out, "<TOTREVISIONS>%d</TOTREVISIONS>\n", rcs.TotRevisions());
00661             fprintf(out, "<LOCKSTRICT>%d</LOCKSTRICT>\n", rcs.LockStrict() ? 1 : 0);
00662
00663             fputs("<ACCESSLIST>\n", out);
00664             const std::vector<CLogStr> & ac = rcs.AccessList();
00665             std::vector<CLogStr>::const_iterator i;
00666             for(i = ac.begin(); i != ac.end(); ++i)
00667             {
00668                 fprintf(out, "<ACCESS>%s</ACCESS>\n", (*i).c_str());
00669             }
00670             fputs("</ACCESSLIST>\n", out);
00671
00672             fputs("<SYMBOLICLIST>\n", out);
00673             const std::vector<CRevNumber> & sy = rcs.SymbolicList();
00674             std::vector<CRevNumber>::const_iterator j;
00675             for(j = sy.begin(); j != sy.end(); ++j)
00676             {
00677                 fprintf(out, "<SYMBOLIC>%s</SYMBOLIC>\n", (*j).c_str());
00678             }
00679             fputs("</SYMBOLICLIST>\n", out);
00680
00681             fputs("<LOCKLIST>\n", out);
00682             const std::vector<CRevNumber> & lo = rcs.LocksList();
00683             for(j = lo.begin(); j != lo.end(); ++j)
00684             {
00685                 fprintf(out, "<LOCK>%s</LOCK>\n", (*j).c_str());
00686             }
00687             fputs("</LOCKLIST>\n", out);
00688             break;
00689         }
00690         case kNodeRev :
00691         {
00692             const CRevFile & rev = **(CLogNodeRev *)node;
00693             fputs("<REVISION>\n", out);
00694             fprintf(out, "<NUMBER>%s</NUMBER>\n", rev.RevNum().c_str());
00695             const struct tm & tm = rev.RevTime();
00696             fprintf(out, "<DATE>%d/%d/%d %d:%d:%d</DATE>\n", (tm.tm_year + 1900),
00697                 tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
00698             fprintf(out, "<AUTHOR>%s</AUTHOR>\n", rev.Author().c_str());
00699             fprintf(out, "<STATE>%s</STATE>\n", rev.State().c_str());
00700             fprintf(out, "<CHANGES>+%d%d</CHANGES>\n", rev.ChgPos(), rev.ChgNeg());
00701             fprintf(out, "<DESCRIPTION>%s</DESCRIPTION>\n", rev.DescLog().c_str());
00702
00703             fputs("<BRANCHLIST>\n", out);
00704             const std::vector<CRevNumber> & sy = rev.BranchesList();
00705             std::vector<CRevNumber>::const_iterator j;
00706             for(j = sy.begin(); j != sy.end(); ++j)
00707             {
00708                 fprintf(out, "<REVBRANCH>%s</REVBRANCH>\n", (*j).c_str());
00709             }
00710             fputs("</BRANCHLIST>\n", out);
00711             break;
00712         }
00713         case kNodeBranch :
00714         {
00715             fputs("<BRANCH>\n", out);
00716             const CLogStr & branch = **(CLogNodeBranch *)node;
00717             fprintf(out, "<BRANCHNAME>%s</BRANCHNAME>\n", branch.c_str());
00718             break;
00719         }
00720         case kNodeTag :
00721         {
00722             fputs("<TAG>\n", out);
00723             const CLogStr & tag = **(CLogNodeTag *)node;
00724             fprintf(out, "<TAGNAME>%s</TAGNAME>\n", tag.c_str());
00725             break;
00726         }
00727     }
00728
00729     if(node->Childs().size() > 0)
00730     {
00731         fputs("<REVISIONS>\n", out);
00732         std::vector<CLogNode *>::const_iterator i;
00733         for(i = node->Childs().begin(); i != node->Childs().end(); ++i)
00734         {
00735             outputXML(out, *i);
00736         }
00737         fputs("</REVISIONS>\n", out);
00738     }
00739
00740     switch(node->GetType())
00741     {
00742         case kNodeHeader :
00743             fputs("</RCS>\n", out);
00744             break;
00745         case kNodeRev :
00746             fputs("</REVISION>\n", out);
00747             break;
00748         case kNodeBranch :
00749             fputs("</BRANCH>\n", out);
00750             break;
00751         case kNodeTag :
00752             fputs("</TAG>\n", out);
00753             break;
00754     }
00755
00756     if(node->Next() != 0L)
00757     {
00758         outputXML(out, node->Next());
00759     }
00760 }

void PyAppendCache ( EntnodeData * data )

Add node data to the cache

Parameters:
data Node data
Definition at line 1370 of file PythonGlue.cpp.

References gUICache, gUICacheObj, and gUICacheValid.

Referenced by UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), CBrowseFileView::OnUpdateMacro(), and CWinCvsBrowser::OnUpdateMacro().

01371 {
01372 #if USE_PYTHON
01373     Py_XDECREF(gUICacheObj);
01374     gUICacheObj = 0L;
01375     gUICache.push_back(ENTNODE(data));
01376     gUICacheValid = true;
01377 #endif
01378 }

void PyDoCmdUI ( UCmdUI * ucmdui )

Update a menu state (call python)

Parameters:
ucmdui Command UI update object
Definition at line 1307 of file PythonGlue.cpp.

References CPython_Interp::DoScriptVar(), and UCmdUI::m_nID.

Referenced by UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), CBrowseFileView::OnUpdateMacro(), and CWinCvsBrowser::OnUpdateMacro().

01308 {
01309     CPython_Interp interp;
01310     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01311         "from cvsgui.CmdUI import *; "
01312 #if defined(SIZEOF_VOID_P) && (SIZEOF_VOID_P == 8)
01313         "gMacroRegistry.DoCmdUI(CmdUI(%llu), %d)", (long long unsigned)ucmdui, ucmdui->m_nID);
01314 #else
01315         "gMacroRegistry.DoCmdUI(CmdUI(%d), %d)", (long)ucmdui, ucmdui->m_nID);
01316 #endif
01317 }

Here is the call graph for this function:

void PyDoPython ( int cmd )

Call python because a command has been triggered (by the menu or an icon)

Parameters:
cmd Command UI update object
Definition at line 1323 of file PythonGlue.cpp.

References CPython_Interp::DoScriptVar().

Referenced by UCvsFrame::OnCmdMacroAdmin(), UCvsFolders::OnCmdMacrosSel(), CBrowseFileView::OnMacro(), CWinCvsBrowser::OnMacro(), and UCvsFiles::OnMacroSel().

01324 {
01325     CPython_Interp interp;
01326     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01327         "gMacroRegistry.DoCmd(%d)", cmd);
01328 }

Here is the call graph for this function:

void PyInvalUICache ( )

Erase and mark the cache as invalid Definition at line 1356 of file PythonGlue.cpp.

References gUICache, gUICacheObj, and gUICacheValid.

Referenced by CPython_Interp::ClosePythonSupport(), CWincvsApp::PreTranslateMessage(), CWincvsApp::StopScriptEngine(), and UCvsApp::StopScriptEngine().

01357 {
01358 #if USE_PYTHON
01359     gUICache.erase(gUICache.begin(), gUICache.end());
01360     gUICacheValid = false;
01361     Py_XDECREF(gUICacheObj);
01362     gUICacheObj = 0L;
01363 #endif
01364 }

bool PyIsUICacheValid ( )

Check whether the cache is valid

Returns:
true if cache is invalid, false otherwise
Definition at line 1334 of file PythonGlue.cpp.

References gUICacheValid.

Referenced by UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), CWinCvsBrowser::OnUpdateMacro(), and CBrowseFileView::OnUpdateMacro().

01335 {
01336 #if USE_PYTHON
01337     return gUICacheValid;
01338 #else
01339     return false;
01340 #endif
01341 }

void PyMacrosReloadAll ( void )

Reload the available macros Definition at line 1286 of file PythonGlue.cpp.

References UStr::c_str(), CPython_Interp::DoScriptVar(), and MacrosGetLoc().

Referenced by CWincvsApp::StartScriptEngine(), and UCvsApp::StartScriptEngine().

01287 {
01288     // Get the macro folder
01289     UStr path;
01290     MacrosGetLoc(path);
01291
01292 #ifdef WIN32
01293     CString newpath(path);
01294     newpath.Replace("\\", "\\\\");
01295     path = newpath;
01296 #endif
01297
01298     CPython_Interp interp;
01299     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01300         "gMacroRegistry.LoadMacros(\"%s\")", (char*)path.c_str());
01301 }

Here is the call graph for this function:

void PyValidUICache ( )

Mark the cache as valid Definition at line 1346 of file PythonGlue.cpp.

References gUICacheValid.

01347 {
01348 #if USE_PYTHON
01349     gUICacheValid = true;
01350 #endif
01351 }

Variable Documentation

PyMethodDef cvsgui_methods[] [static]

Initial value:

{
    {"write", (PyCFunction)cvsgui_write, METH_VARARGS, ""},
    {"GetMainMenuWidget", (PyCFunction)cvsgui_GetMainMenuWidget, METH_VARARGS, ""},
    {"GetTopMacroSelectionMenu", (PyCFunction)cvsgui_GetTopMacroSelectionMenu, METH_VARARGS, ""},
    {"GetTopMacroAdminMenu", (PyCFunction)cvsgui_GetTopMacroAdminMenu, METH_VARARGS, ""},
    {"GetSelection", (PyCFunction)cvsgui_GetSelection, METH_VARARGS, ""},
    {"GetCvsEntries", (PyCFunction)cvsgui_GetCvsEntries, METH_VARARGS, ""},

    {"GetFileModTime", (PyCFunction)cvsgui_GetFileModTime, METH_VARARGS, ""},

    {"LaunchTclMacro", (PyCFunction)cvsgui_LaunchTclMacro, METH_VARARGS, ""},
    {"RunCvs", (PyCFunction)cvsgui_RunCvs, METH_VARARGS, ""},
    {"PromptMessage", (PyCFunction)cvsgui_PromptMessage, METH_VARARGS, ""},
    {"PromptEditMessage", (PyCFunction)cvsgui_PromptEditMessage, METH_VARARGS, ""},
    {"LaunchBrowser", (PyCFunction)cvsgui_LaunchBrowser, METH_VARARGS, ""},
    {"GetHistoryAsXML", (PyCFunction)cvsgui_GetHistoryAsXML, METH_VARARGS, ""},
    {NULL, NULL}
}
Definition at line 846 of file PythonGlue.cpp.

Referenced by InitializeInterp().

std::vector<PyMethodDef> gAllMethods [static]

Definition at line 866 of file PythonGlue.cpp.

Referenced by InitializeInterp().

std::vector<ENTNODE> gUICache [static]

Definition at line 102 of file PythonGlue.cpp.

Referenced by cvsgui_GetSelection(), cvsgui_LaunchTclMacro(), PyAppendCache(), and PyInvalUICache().

PyObject* gUICacheObj = NULL [static]

Definition at line 103 of file PythonGlue.cpp.

Referenced by cvsgui_GetSelection(), PyAppendCache(), and PyInvalUICache().

bool gUICacheValid = false [static]

Definition at line 101 of file PythonGlue.cpp.

Referenced by PyAppendCache(), PyInvalUICache(), PyIsUICacheValid(), and PyValidUICache().

Generated on Sat Aug 7 22:45:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonGlue.h File Reference

common/PythonGlue.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CPython_Interp
Python interpreter wrapper. More...

Typedefs

typedef _ts | PyThreadState

Functions

void | PyMacrosReloadAll (void)
void | PyDoCmdUI (UCmdUI *ucmdui)
void | PyDoPython (int cmd)
bool PyIsUICacheValid ()
void | PyValidUICache ()
void | PyInvalUICache ()
void | PyAppendCache (EntnodeData *data)

Typedef Documentation

typedef struct _ts PyThreadState

Definition at line 31 of file PythonGlue.h.

Referenced by CPyThreadState::CPyThreadState(), and InitializeInterp().

Function Documentation

void PyAppendCache ( EntnodeData * data )

Add node data to the cache

Parameters:
data Node data
Definition at line 1370 of file PythonGlue.cpp.

References gUICache, gUICacheObj, and gUICacheValid.

Referenced by UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), CWinCvsBrowser::OnUpdateMacro(), and CBrowseFileView::OnUpdateMacro().

01371 {
01372 #if USE_PYTHON
01373     Py_XDECREF(gUICacheObj);
01374     gUICacheObj = 0L;
01375     gUICache.push_back(ENTNODE(data));
01376     gUICacheValid = true;
01377 #endif
01378 }

void PyDoCmdUI ( UCmdUI * ucmdui )

Update a menu state (call python)

Parameters:
ucmdui Command UI update object
Definition at line 1307 of file PythonGlue.cpp.

References CPython_Interp::DoScriptVar(), and UCmdUI::m_nID.

Referenced by UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), CWinCvsBrowser::OnUpdateMacro(), and CBrowseFileView::OnUpdateMacro().

01308 {
01309     CPython_Interp interp;
01310     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01311         "from cvsgui.CmdUI import *; "
01312 #if defined(SIZEOF_VOID_P) && (SIZEOF_VOID_P == 8)
01313         "gMacroRegistry.DoCmdUI(CmdUI(%llu), %d)", (long long unsigned)ucmdui, ucmdui->m_nID);
01314 #else
01315         "gMacroRegistry.DoCmdUI(CmdUI(%d), %d)", (long)ucmdui, ucmdui->m_nID);
01316 #endif
01317 }

Here is the call graph for this function:

void PyDoPython ( int cmd )

Call python because a command has been triggered (by the menu or an icon)

Parameters:
cmd Command UI update object
Definition at line 1323 of file PythonGlue.cpp.

References CPython_Interp::DoScriptVar().

Referenced by UCvsFrame::OnCmdMacroAdmin(), UCvsFolders::OnCmdMacrosSel(), CWinCvsBrowser::OnMacro(), CBrowseFileView::OnMacro(), and UCvsFiles::OnMacroSel().

01324 {
01325     CPython_Interp interp;
01326     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01327         "gMacroRegistry.DoCmd(%d)", cmd);
01328 }

Here is the call graph for this function:

void PyInvalUICache ( )

Erase and mark the cache as invalid Definition at line 1356 of file PythonGlue.cpp.

References gUICache, gUICacheObj, and gUICacheValid.

Referenced by CPython_Interp::ClosePythonSupport(), CWincvsApp::PreTranslateMessage(), UCvsApp::StopScriptEngine(), and CWincvsApp::StopScriptEngine().

01357 {
01358 #if USE_PYTHON
01359     gUICache.erase(gUICache.begin(), gUICache.end());
01360     gUICacheValid = false;
01361     Py_XDECREF(gUICacheObj);
01362     gUICacheObj = 0L;
01363 #endif
01364 }

bool PyIsUICacheValid ( )

Check whether the cache is valid

Returns:
true if cache is invalid, false otherwise
Definition at line 1334 of file PythonGlue.cpp.

References gUICacheValid.

Referenced by UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), CBrowseFileView::OnUpdateMacro(), and CWinCvsBrowser::OnUpdateMacro().

01335 {
01336 #if USE_PYTHON
01337     return gUICacheValid;
01338 #else
01339     return false;
01340 #endif
01341 }

void PyMacrosReloadAll ( void )

Reload the available macros Definition at line 1286 of file PythonGlue.cpp.

References UStr::c_str(), CPython_Interp::DoScriptVar(), and MacrosGetLoc().

Referenced by UCvsApp::StartScriptEngine(), and CWincvsApp::StartScriptEngine().

01287 {
01288     // Get the macro folder
01289     UStr path;
01290     MacrosGetLoc(path);
01291
01292 #ifdef WIN32
01293     CString newpath(path);
01294     newpath.Replace("\\", "\\\\");
01295     path = newpath;
01296 #endif
01297
01298     CPython_Interp interp;
01299     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01300         "gMacroRegistry.LoadMacros(\"%s\")", (char*)path.c_str());
01301 }

Here is the call graph for this function:

void PyValidUICache ( )

Mark the cache as valid Definition at line 1346 of file PythonGlue.cpp.

References gUICacheValid.

01347 {
01348 #if USE_PYTHON
01349     gUICacheValid = true;
01350 #endif
01351 }

Generated on Sat Aug 7 22:45:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonGlue.impl.h File Reference

common/PythonGlue.impl.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | PYTHONGLUE_EXTERN extern
#define | DEC_GLUE(f) (*f##_glue)
#define | VAR_GLUE(f) f##_glue
#define | GLUE_WRAP(f) f##_glue
#define | PyThreadState_Swap GLUE_WRAP(PyThreadState_Swap)
#define | PyDict_SetItemString GLUE_WRAP(PyDict_SetItemString)
#define | PyErr_Clear GLUE_WRAP(PyErr_Clear)
#define | PyInt_FromLong GLUE_WRAP(PyInt_FromLong)
#define | PyErr_SetString GLUE_WRAP(PyErr_SetString)
#define | PyArg_ParseTuple GLUE_WRAP(PyArg_ParseTuple)
#define | PyTuple_New GLUE_WRAP(PyTuple_New)
#define | Py_BuildValue GLUE_WRAP(Py_BuildValue)
#define | PyFile_AsFile GLUE_WRAP(PyFile_AsFile)
#define | PyString_AsString GLUE_WRAP(PyString_AsString)
#define | PyTuple_Size GLUE_WRAP(PyTuple_Size)
#define | PyRun_SimpleString GLUE_WRAP(PyRun_SimpleString)
#define | PyRun_SimpleFile GLUE_WRAP(PyRun_SimpleFile)
#define | Py_SetProgramName GLUE_WRAP(Py_SetProgramName)
#define | Py_Initialize GLUE_WRAP(Py_Initialize)
#define | Py_Finalize GLUE_WRAP(Py_Finalize)
#define | Py_IsInitialized GLUE_WRAP(Py_IsInitialized)
#define | Py_NewInterpreter GLUE_WRAP(Py_NewInterpreter)
#define | Py_EndInterpreter GLUE_WRAP(Py_EndInterpreter)
#define | PyString_FromString GLUE_WRAP(PyString_FromString)
#define | PyErr_NewException GLUE_WRAP(PyErr_NewException)
#define | PyModule_GetDict GLUE_WRAP(PyModule_GetDict)
#define | Py_InitModule4 GLUE_WRAP(Py_InitModule4)
#define | PyEval_InitThreads GLUE_WRAP(PyEval_InitThreads)
#define | Py_FindMethod GLUE_WRAP(Py_FindMethod)
#define | _PyObject_New GLUE_WRAP(_PyObject_New)
#define | PyObject_Free GLUE_WRAP(PyObject_Free)
#define | PySys_SetPath GLUE_WRAP(PySys_SetPath)
#define | Py_GetPath GLUE_WRAP(Py_GetPath)
#define | PyString_Check(op) ((op)->ob_type == GetPyString_Type())
#define | PyTuple_Check(op) ((op)->ob_type == GetPyTuple_Type())
#define | PyInt_Check(op) ((op)->ob_type == GetPyInt_Type())

Functions

PyTypeObject * | GetPyType_Type ()
PyTypeObject * | GetPyFile_Type ()
PyTypeObject * | GetPyString_Type ()
PyTypeObject * | GetPyTuple_Type ()
PyTypeObject * | GetPyInt_Type ()
PyObject * | GetPyNone ()
PyObject * | GetPyTrue ()
PyObject * | GetPyFalse ()

Variables

PyThreadState *(* PyThreadState_Swap_glue )(PyThreadState *)
int(* | PyDict_SetItemString_glue )(PyObject *dp, char *key, PyObject *item)
void(* | PyErr_Clear_glue )(void)
PyObject *(* | PyInt_FromLong_glue )(long)
void(* | PyErr_SetString_glue )(PyObject *, const char *)
int(* | PyArg_ParseTuple_glue )(PyObject *, char *,...)
PyObject *(* | PyTuple_New_glue )(int size)
PyObject *(* | Py_BuildValue_glue )(char *,...)
FILE *(* | PyFile_AsFile_glue )(PyObject *)
char *(* | PyString_AsString_glue )(PyObject *)
int(* | PyTuple_Size_glue )(PyObject *)
int(* | PyRun_SimpleString_glue )(char *)
int(* | PyRun_SimpleFile_glue )(FILE *, char *)
void(* | Py_SetProgramName_glue )(char *)
void(* | Py_Initialize_glue )(void)
void(* | Py_Finalize_glue )(void)
int(* | Py_IsInitialized_glue )(void)
PyThreadState *(* | Py_NewInterpreter_glue )(void)
void(* | Py_EndInterpreter_glue )(PyThreadState *)
PyObject *(* | PyString_FromString_glue )(const char *)
PyObject *(* | PyErr_NewException_glue )(char *name, PyObject *base, PyObject *dict)
PyObject *(* | PyModule_GetDict_glue )(PyObject *)
PyObject *(* | Py_InitModule4_glue )(char *name, PyMethodDef *methods, char *doc, PyObject *self, int apiver)
void(* | PyEval_InitThreads_glue )(void)
PyObject *(* | Py_FindMethod_glue )(PyMethodDef[], PyObject *, char *)
PyObject *(* | _PyObject_New_glue )(PyTypeObject *)
void(* | PyObject_Free_glue )(void *)
void(* | PySys_SetPath_glue )(char *)
char *(* | Py_GetPath_glue )(void)
PyTypeObject * | PyType_Type_glue
PyTypeObject * | PyFile_Type_glue
PyTypeObject * | PyString_Type_glue
PyTypeObject * | PyTuple_Type_glue
PyTypeObject * | PyInt_Type_glue
PyObject * | _Py_NoneStruct_glue
PyObject * | _Py_ZeroStruct_glue
PyObject * | _Py_TrueStruct_glue

Define Documentation

#define _PyObject_New GLUE_WRAP(_PyObject_New)

Definition at line 106 of file PythonGlue.impl.h.

Referenced by CPython_Interp::IsAvail().

#define DEC_GLUE ( f ) (*f##_glue)

Definition at line 33 of file PythonGlue.impl.h.

#define GLUE_WRAP ( f ) f##_glue

Definition at line 79 of file PythonGlue.impl.h.

#define Py_BuildValue GLUE_WRAP(Py_BuildValue)

Definition at line 88 of file PythonGlue.impl.h.

Referenced by cvsgui_GetFileModTime(), cvsgui_PromptEditMessage(), cvsgui_RunCvs(), and CPython_Interp::IsAvail().

#define Py_EndInterpreter GLUE_WRAP(Py_EndInterpreter)

Definition at line 99 of file PythonGlue.impl.h.

Referenced by CPython_Interp::IsAvail(), and CPython_Interp::~CPython_Interp().

#define Py_Finalize GLUE_WRAP(Py_Finalize)

Definition at line 96 of file PythonGlue.impl.h.

Referenced by CPython_Interp::ClosePythonSupport(), and CPython_Interp::IsAvail().

#define Py_FindMethod GLUE_WRAP(Py_FindMethod)

Definition at line 105 of file PythonGlue.impl.h.

Referenced by CPython_Interp::IsAvail().

#define Py_GetPath GLUE_WRAP(Py_GetPath)

Definition at line 113 of file PythonGlue.impl.h.

Referenced by InitializeInterp(), and CPython_Interp::IsAvail().

#define Py_Initialize GLUE_WRAP(Py_Initialize)

Definition at line 95 of file PythonGlue.impl.h.

Referenced by CPython_Interp::InitPythonSupport(), and CPython_Interp::IsAvail().

#define Py_InitModule4 GLUE_WRAP(Py_InitModule4)

Definition at line 103 of file PythonGlue.impl.h.

Referenced by InitializeInterp(), and CPython_Interp::IsAvail().

#define Py_IsInitialized GLUE_WRAP(Py_IsInitialized)

Definition at line 97 of file PythonGlue.impl.h.

Referenced by CPython_Interp::IsAvail().

#define Py_NewInterpreter GLUE_WRAP(Py_NewInterpreter)

Definition at line 98 of file PythonGlue.impl.h.

Referenced by CPython_Interp::CPython_Interp(), and CPython_Interp::IsAvail().

#define Py_SetProgramName GLUE_WRAP(Py_SetProgramName)

Definition at line 94 of file PythonGlue.impl.h.

Referenced by CPython_Interp::InitPythonSupport(), and CPython_Interp::IsAvail().

#define PyArg_ParseTuple GLUE_WRAP(PyArg_ParseTuple)

Definition at line 86 of file PythonGlue.impl.h.

Referenced by PyMenuMgr::AddButton(), PyMenuMgr::AddPulldown(), PyMenuMgr::AddSeparator(), PyMenuMgr::AddToggle(), PyMenuMgr::Count(), PyPersistent::Create(), PyCmdUI::Create(), PyMenuMgr::Create(), PyColorConsole::Create(), PyCvsEntry::Create(), cvsgui_GetCvsEntries(), cvsgui_GetFileModTime(), cvsgui_GetHistoryAsXML(), cvsgui_GetMainMenuWidget(), cvsgui_GetSelection(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), cvsgui_LaunchBrowser(), cvsgui_LaunchTclMacro(), cvsgui_PromptEditMessage(), cvsgui_PromptMessage(), cvsgui_RunCvs(), cvsgui_write(), PyMenuMgr::Delete(), PyMenuMgr::DeleteByCmd(), PyCmdUI::Enable(), PyPersistent::GetValue(), CPython_Interp::IsAvail(), PyColorConsole::Print(), PyCmdUI::SetCheck(), PyCmdUI::SetText(), and PyPersistent::SetValue().

#define PyDict_SetItemString GLUE_WRAP(PyDict_SetItemString)

Definition at line 82 of file PythonGlue.impl.h.

Referenced by InitializeInterp(), CPython_Interp::IsAvail(), and PyContainer::RegisterValue().

#define PyErr_Clear GLUE_WRAP(PyErr_Clear)

Definition at line 83 of file PythonGlue.impl.h.

Referenced by CPython_Interp::IsAvail(), PyColorConsole::Print(), and PyContainer::RegisterValue().

#define PyErr_NewException GLUE_WRAP(PyErr_NewException)

Definition at line 101 of file PythonGlue.impl.h.

Referenced by InitializeInterp(), and CPython_Interp::IsAvail().

#define PyErr_SetString GLUE_WRAP(PyErr_SetString)

Definition at line 85 of file PythonGlue.impl.h.

Referenced by cvsgui_GetFileModTime(), cvsgui_RunCvs(), CPython_Interp::IsAvail(), and PyHandleCvsguiError().

#define PyEval_InitThreads GLUE_WRAP(PyEval_InitThreads)

Definition at line 104 of file PythonGlue.impl.h.

Referenced by CPython_Interp::InitPythonSupport(), and CPython_Interp::IsAvail().

#define PyFile_AsFile GLUE_WRAP(PyFile_AsFile)

Definition at line 89 of file PythonGlue.impl.h.

Referenced by cvsgui_GetHistoryAsXML(), and CPython_Interp::IsAvail().

#define PyInt_Check ( op ) ((op)->ob_type == GetPyInt_Type())

Definition at line 129 of file PythonGlue.impl.h.

#define PyInt_FromLong GLUE_WRAP(PyInt_FromLong)

Definition at line 84 of file PythonGlue.impl.h.

Referenced by PyMenuMgr::Count(), cvsgui_GetMainMenuWidget(), CPython_Interp::IsAvail(), and PyContainer::RegisterValue().

#define PyModule_GetDict GLUE_WRAP(PyModule_GetDict)

Definition at line 102 of file PythonGlue.impl.h.

Referenced by InitializeInterp(), and CPython_Interp::IsAvail().

#define PyObject_Free GLUE_WRAP(PyObject_Free)

Definition at line 110 of file PythonGlue.impl.h.

Referenced by CPython_Interp::IsAvail().

#define PyRun_SimpleFile GLUE_WRAP(PyRun_SimpleFile)

Definition at line 93 of file PythonGlue.impl.h.

Referenced by CPython_Interp::DoFile(), InitializeInterp(), and CPython_Interp::IsAvail().

#define PyRun_SimpleString GLUE_WRAP(PyRun_SimpleString)

Definition at line 92 of file PythonGlue.impl.h.

Referenced by CPython_Interp::DoScript(), InitializeInterp(), and CPython_Interp::IsAvail().

#define PyString_AsString GLUE_WRAP(PyString_AsString)

Definition at line 90 of file PythonGlue.impl.h.

Referenced by cvsgui_RunCvs(), and CPython_Interp::IsAvail().

#define PyString_Check ( op ) ((op)->ob_type == GetPyString_Type())

Definition at line 125 of file PythonGlue.impl.h.

Referenced by cvsgui_RunCvs().

#define PyString_FromString GLUE_WRAP(PyString_FromString)

Definition at line 100 of file PythonGlue.impl.h.

Referenced by PyCvsEntry::GetAttr(), PyPersistent::GetValue(), InitializeInterp(), and CPython_Interp::IsAvail().

#define PySys_SetPath GLUE_WRAP(PySys_SetPath)

Definition at line 112 of file PythonGlue.impl.h.

Referenced by InitializeInterp(), and CPython_Interp::IsAvail().

#define PYTHONGLUE_EXTERN extern

Definition at line 29 of file PythonGlue.impl.h.

#define PyThreadState_Swap GLUE_WRAP(PyThreadState_Swap)

Definition at line 81 of file PythonGlue.impl.h.

Referenced by CPython_Interp::ClosePythonSupport(), CPyThreadState::CPyThreadState(), CPython_Interp::InitPythonSupport(), CPython_Interp::IsAvail(), and CPyThreadState::~CPyThreadState().

#define PyTuple_Check ( op ) ((op)->ob_type == GetPyTuple_Type())

Definition at line 127 of file PythonGlue.impl.h.

#define PyTuple_New GLUE_WRAP(PyTuple_New)

Definition at line 87 of file PythonGlue.impl.h.

Referenced by cvsgui_GetCvsEntries(), cvsgui_GetSelection(), and CPython_Interp::IsAvail().

#define PyTuple_Size GLUE_WRAP(PyTuple_Size)

Definition at line 91 of file PythonGlue.impl.h.

Referenced by cvsgui_RunCvs(), and CPython_Interp::IsAvail().

#define VAR_GLUE ( f ) f##_glue

Definition at line 34 of file PythonGlue.impl.h.

Function Documentation

PyObject* GetPyFalse ( )

Definition at line 509 of file PythonImpl.cpp.

References _Py_ZeroStruct_glue.

Referenced by PyContainer::False().

00510 {
00511     return _Py_ZeroStruct_glue;
00512 }

PyTypeObject* GetPyFile_Type ( )

Definition at line 479 of file PythonImpl.cpp.

References PyFile_Type_glue.

Referenced by cvsgui_GetHistoryAsXML().

00480 {
00481     return PyFile_Type_glue;
00482 }

PyTypeObject* GetPyInt_Type ( )

Definition at line 494 of file PythonImpl.cpp.

References PyInt_Type_glue.

00495 {
00496     return PyInt_Type_glue;
00497 }

PyObject* GetPyNone ( )

Definition at line 499 of file PythonImpl.cpp.

References _Py_NoneStruct_glue.

Referenced by PyContainer::Void().

00500 {
00501     return _Py_NoneStruct_glue;
00502 }

PyTypeObject* GetPyString_Type ( )

Definition at line 484 of file PythonImpl.cpp.

References PyString_Type_glue.

00485 {
00486     return PyString_Type_glue;
00487 }

PyObject* GetPyTrue ( )

Definition at line 504 of file PythonImpl.cpp.

References _Py_TrueStruct_glue.

Referenced by PyContainer::True().

00505 {
00506     return _Py_TrueStruct_glue;
00507 }

PyTypeObject* GetPyTuple_Type ( )

Definition at line 489 of file PythonImpl.cpp.

References PyTuple_Type_glue.

Referenced by cvsgui_RunCvs().

00490 {
00491     return PyTuple_Type_glue;
00492 }

PyTypeObject* GetPyType_Type ( )

Definition at line 474 of file PythonImpl.cpp.

References PyType_Type_glue.

Referenced by PyRegistry::PyRegistry().

00475 {
00476     return PyType_Type_glue;
00477 }

Variable Documentation

PyObject* _Py_NoneStruct_glue

Referenced by GetPyNone().

PyObject* _Py_TrueStruct_glue

Referenced by GetPyTrue().

PyObject* _Py_ZeroStruct_glue

Referenced by GetPyFalse().

PyObject*(* _PyObject_New_glue)(PyTypeObject *)

PyObject*(* Py_BuildValue_glue)(char *,...)

void(* Py_EndInterpreter_glue)(PyThreadState *)

void(* Py_Finalize_glue)(void)

PyObject*(* Py_FindMethod_glue)(PyMethodDef[], PyObject *, char *)

char*(* Py_GetPath_glue)(void)

void(* Py_Initialize_glue)(void)

PyObject*(* Py_InitModule4_glue)(char *name, PyMethodDef *methods, char *doc, PyObject *self, int apiver)

int(* Py_IsInitialized_glue)(void)

PyThreadState*(* Py_NewInterpreter_glue)(void)

void(* Py_SetProgramName_glue)(char *)

int(* PyArg_ParseTuple_glue)(PyObject *, char *,...)

int(* PyDict_SetItemString_glue)(PyObject *dp, char *key, PyObject *item)

void(* PyErr_Clear_glue)(void)

PyObject*(* PyErr_NewException_glue)(char *name, PyObject *base, PyObject *dict)

void(* PyErr_SetString_glue)(PyObject *, const char *)

void(* PyEval_InitThreads_glue)(void)

FILE*(* PyFile_AsFile_glue)(PyObject *)

PyTypeObject* PyFile_Type_glue

Referenced by GetPyFile_Type().

PyObject*(* PyInt_FromLong_glue)(long)

PyTypeObject* PyInt_Type_glue

Referenced by GetPyInt_Type().

PyObject*(* PyModule_GetDict_glue)(PyObject *)

void(* PyObject_Free_glue)(void *)

int(* PyRun_SimpleFile_glue)(FILE *, char *)

int(* PyRun_SimpleString_glue)(char *)

char*(* PyString_AsString_glue)(PyObject *)

PyObject*(* PyString_FromString_glue)(const char *)

PyTypeObject* PyString_Type_glue

Referenced by GetPyString_Type().

void(* PySys_SetPath_glue)(char *)

PyThreadState*(* PyThreadState_Swap_glue)(PyThreadState *)

PyObject*(* PyTuple_New_glue)(int size)

int(* PyTuple_Size_glue)(PyObject *)

PyTypeObject* PyTuple_Type_glue

Referenced by GetPyTuple_Type().

PyTypeObject* PyType_Type_glue

Referenced by GetPyType_Type().

Generated on Sat Aug 7 22:45:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonImpl.cpp File Reference

common/PythonImpl.cpp File Reference

#include "stdafx.h"
#include "PythonImpl.h"
#include "CvsPrefs.h"
#include "umenu.h"
#include "PythonGlue.impl.h"

Include dependency graph for PythonImpl.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | PYTHONGLUE_EXTERN

Functions

int | ParseUMENU (PyObject *v, UMENU *menu)
PyTypeObject * | GetPyType_Type ()
PyTypeObject * | GetPyFile_Type ()
PyTypeObject * | GetPyString_Type ()
PyTypeObject * | GetPyTuple_Type ()
PyTypeObject * | GetPyInt_Type ()
PyObject * | GetPyNone ()
PyObject * | GetPyTrue ()
PyObject * | GetPyFalse ()

Define Documentation

#define PYTHONGLUE_EXTERN

Definition at line 471 of file PythonImpl.cpp.

Function Documentation

PyObject* GetPyFalse ( )

Definition at line 509 of file PythonImpl.cpp.

References _Py_ZeroStruct_glue.

Referenced by PyContainer::False().

00510 {
00511     return _Py_ZeroStruct_glue;
00512 }

PyTypeObject* GetPyFile_Type ( )

Definition at line 479 of file PythonImpl.cpp.

References PyFile_Type_glue.

Referenced by cvsgui_GetHistoryAsXML().

00480 {
00481     return PyFile_Type_glue;
00482 }

PyTypeObject* GetPyInt_Type ( )

Definition at line 494 of file PythonImpl.cpp.

References PyInt_Type_glue.

00495 {
00496     return PyInt_Type_glue;
00497 }

PyObject* GetPyNone ( )

Definition at line 499 of file PythonImpl.cpp.

References _Py_NoneStruct_glue.

Referenced by PyContainer::Void().

00500 {
00501     return _Py_NoneStruct_glue;
00502 }

PyTypeObject* GetPyString_Type ( )

Definition at line 484 of file PythonImpl.cpp.

References PyString_Type_glue.

00485 {
00486     return PyString_Type_glue;
00487 }

PyObject* GetPyTrue ( )

Definition at line 504 of file PythonImpl.cpp.

References _Py_TrueStruct_glue.

Referenced by PyContainer::True().

00505 {
00506     return _Py_TrueStruct_glue;
00507 }

PyTypeObject* GetPyTuple_Type ( )

Definition at line 489 of file PythonImpl.cpp.

References PyTuple_Type_glue.

Referenced by cvsgui_RunCvs().

00490 {
00491     return PyTuple_Type_glue;
00492 }

PyTypeObject* GetPyType_Type ( )

Definition at line 474 of file PythonImpl.cpp.

References PyType_Type_glue.

Referenced by PyRegistry::PyRegistry().

00475 {
00476     return PyType_Type_glue;
00477 }

int ParseUMENU | ( | PyObject * | v,
 |  | UMENU * | menu
 | ) | [static]

Definition at line 198 of file PythonImpl.cpp.

References PyMenuMgr::GetType(), and UMENU.

00199 {
00200     if(v->ob_type == PyMenuMgr::GetType())
00201     {
00202         *menu = *((PyMenuMgr::obj_t*)v)->m_object;
00203         return 1;
00204     }
00205
00206     return 0;
00207 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonImpl.h File Reference

common/PythonImpl.h File Reference

#include "PythonContainer.h"
#include "CvsEntries.h"
#include "AppConsole.h"
#include "CPStr.h"
#include "umain.h"

Include dependency graph for PythonImpl.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | PyCvsEntry
Cvs Entry Python wrapper. More...
struct | PyCvsEntry::obj_t
class | PyColorConsole
Color console Python wrapper. More...
struct | PyColorConsole::obj_t
class | PyMenuMgr
Menu Python wrapper. More...
struct | PyMenuMgr::obj_t
class | PyCmdUI
Cmd UI Python wrapper. More...
struct | PyCmdUI::obj_t
class | PyPersistent
struct | PyPersistent::obj_t

Generated on Sat Aug 7 22:45:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonMacros.h File Reference

common/PythonMacros.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | _COMMON_PY_DECL_CLASS(c)
#define | PY_DECL_CLASS_INHERITED(c, a)
#define | PY_DECL_CLASS(c)
#define | PY_IMPL_CLASS(c, adoc)
#define | PY_DECL_METHOD(c, m)
#define | PY_BEGIN_IMPL_METHOD(c)
#define | PY_IMPL_METHOD(c, m, adoc) {#m, (binaryfunc)Py##c::_##m, METH_VARARGS, (char *)adoc},
#define | PY_END_IMPL_METHOD

Functions

void | PyHandleCvsguiError (CException *e)
void | PyHandleCvsguiError (const char *msg)

Define Documentation

#define _COMMON_PY_DECL_CLASS ( c )

Value:

public: \
    typedef struct \
    { \
        PyObject_HEAD \
        Py##c *m_object; \
    } obj_t; \
    static const char *m_doc; \
    static void dealloc(obj_t *self); \
    static PyObject *getattr(obj_t *self, char *name); \
    static PyAutoObject<obj_t> New(void); \
    static PyMethodDef m_methods[]; \
    static PyRegistry m_registry; \
    static inline PyTypeObject *GetType(void) { return &m_registry.m_type; } \
    static PyObject *Create(PyObject *selfptr, PyObject *args); \
    static void InitValues(PyObject *d);
Definition at line 41 of file PythonMacros.h.

#define PY_BEGIN_IMPL_METHOD ( c )

Value:

PyMethodDef Py##c::m_methods[] = \
    {
Definition at line 136 of file PythonMacros.h.

#define PY_DECL_CLASS ( c )

Value:

_COMMON_PY_DECL_CLASS(c) \
    static PyObject *FindMethod(PyObject *self, char *name) \
    { \
        return Py_FindMethod(m_methods, self, name); \
    }
Definition at line 69 of file PythonMacros.h.

#define PY_DECL_CLASS_INHERITED | ( | c,
 |  | a | )

Value:

_COMMON_PY_DECL_CLASS(c) \
    static PyObject *FindMethod(PyObject *self, char *name) \
    { \
        PyObject *res = Py_FindMethod(m_methods, self, name); \
        if(res != NULL) \
            return res; \
        PyErr_Clear(); \
        return Py##a::FindMethod(self, name); \
    }
Definition at line 58 of file PythonMacros.h.

#define PY_DECL_METHOD | ( | c,
 |  | m | )

Value:

protected: \
    static PyObject *_##m(obj_t *self, PyObject *args) \
    { \
        TRY \
        { \
            if(self->m_object) \
                return self->m_object->m(args); \
        } \
        CATCH_ALL(e) \
        { \
            PyHandleCvsguiError(e); \
            return NULL; \
        } \
        END_CATCH_ALL \
        return NULL; \
    } \
public: \
    PyObject *m(PyObject *args);
Definition at line 116 of file PythonMacros.h.

#define PY_END_IMPL_METHOD

Value:

{NULL, NULL} \
    };
Definition at line 143 of file PythonMacros.h.

#define PY_IMPL_CLASS | ( | c,
 |  | adoc | )

Definition at line 77 of file PythonMacros.h.

#define PY_IMPL_METHOD | ( | c,
 |  | m,
 |  | adoc | ) | {#m, (binaryfunc)Py##c::_##m, METH_VARARGS, (char *)adoc},

Definition at line 140 of file PythonMacros.h.

Function Documentation

void PyHandleCvsguiError ( const char * msg )

Definition at line 125 of file PythonContainer.cpp.

References gCvsguiErr, and PyErr_SetString.

Referenced by PyPersistent::Create(), PyCmdUI::Create(), PyMenuMgr::Create(), PyColorConsole::Create(), PyCvsEntry::Create(), cvsgui_GetHistoryAsXML(), cvsgui_GetMainMenuWidget(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), cvsgui_PromptEditMessage(), cvsgui_PromptMessage(), cvsgui_RunCvs(), and cvsgui_write().

00126 {
00127     PyErr_SetString(gCvsguiErr, msg);
00128 }

void PyHandleCvsguiError ( CException * e )

Definition at line 110 of file PythonContainer.cpp.

References gCvsguiErr, and PyErr_SetString.

00111 {
00112     char tmp[256];
00113     if(e->GetErrorMessage(tmp, sizeof(tmp)))
00114         PyErr_SetString(gCvsguiErr, tmp);
00115     else
00116         PyErr_SetString(gCvsguiErr, "Unknown error");
00117 }

Generated on Sat Aug 7 22:45:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ReleaseDlg.cpp File Reference

common/ReleaseDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "ReleaseDlg.h"
#include "MultiFiles.h"
#include "GetPrefs.h"

Include dependency graph for ReleaseDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetRelease (const MultiFiles *mf, const char *dir, kReleaseDelType &removeDirectoryOption)
Get the release options.

Function Documentation

bool CompatGetRelease | ( | const MultiFiles * | mf,
 |  | const char * | dir,
 |  | kReleaseDelType & | removeDirectoryOption
 | ) |

Get the release options.

Definition at line 136 of file ReleaseDlg.cpp.

References _i18n, CRelease_MAIN::GetRemoveDirectoryOption(), and CGetPrefs_GLOBALS::StoreValues().

Referenced by CvsCmdRelease().

00137 {
00138     bool userHitOK = false;
00139
00140 #ifdef WIN32
00141     CHHelpPropertySheet pages(_i18n("Release settings"));
00142     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00143
00144     CRelease_MAIN page1(dir);
00145     CGetPrefs_GLOBALS page2;
00146     pages.AddPage(&page1);
00147     pages.AddPage(&page2);
00148
00149     if( pages.DoModal() == IDOK )
00150     {
00151         removeDirectoryOption = page1.GetRemoveDirectoryOption();
00152
00153         page2.StoreValues();
00154         userHitOK = true;
00155     }
00156
00157 #endif /* WIN32 */
00158
00159 #ifdef qMacCvsPP
00160     userHitOK = true;
00161 #endif /* qMacCvsPP */
00162
00163 #if qUnix
00164     userHitOK = true;
00165 #endif // qUnix
00166
00167     return userHitOK;
00168 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ReleaseDlg.h File Reference

common/ReleaseDlg.h File Reference

#include "HHelpSupport.h"

Include dependency graph for ReleaseDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CRelease_MAIN

Defines

#define | AFX_RELEASEDLG_H__12B5FA97_703E_4616_B361_F2917D45E54A__INCLUDED_

Enumerations

enum kReleaseDelType {
kReleaseNoDel,
kReleaseDelDir,
kReleaseDelAll,
kReleaseDelCvsInfo
}
Release command delete option enum. More...

Functions

bool | CompatGetRelease (const MultiFiles *mf, const char *dir, kReleaseDelType &removeDirectoryOption)
Get the release options.

Define Documentation

#define AFX_RELEASEDLG_H__12B5FA97_703E_4616_B361_F2917D45E54A__INCLUDED_

Definition at line 26 of file ReleaseDlg.h.

Enumeration Type Documentation

enum kReleaseDelType

Release command delete option enum.

Enumeration values:
kReleaseNoDel | No delete
kReleaseDelDir | Delete directory (-d)
kReleaseDelAll | Delete directory and all files (even non-CVS controlled) (-f)
kReleaseDelCvsInfo | Delete CVS meta-data files (-e)
Definition at line 39 of file ReleaseDlg.h.

Referenced by CvsCmdRelease(), and CRelease_MAIN::GetRemoveDirectoryOption().

00040 {
00041     kReleaseNoDel,
00042     kReleaseDelDir,
00043     kReleaseDelAll,
00044     kReleaseDelCvsInfo
00045 } kReleaseDelType;

Function Documentation

bool CompatGetRelease | ( | const MultiFiles * | mf,
 |  | const char * | dir,
 |  | kReleaseDelType & | removeDirectoryOption
 | ) |

Get the release options.

Definition at line 136 of file ReleaseDlg.cpp.

References _i18n, CRelease_MAIN::GetRemoveDirectoryOption(), and CGetPrefs_GLOBALS::StoreValues().

Referenced by CvsCmdRelease().

00137 {
00138     bool userHitOK = false;
00139
00140 #ifdef WIN32
00141     CHHelpPropertySheet pages(_i18n("Release settings"));
00142     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00143
00144     CRelease_MAIN page1(dir);
00145     CGetPrefs_GLOBALS page2;
00146     pages.AddPage(&page1);
00147     pages.AddPage(&page2);
00148
00149     if( pages.DoModal() == IDOK )
00150     {
00151         removeDirectoryOption = page1.GetRemoveDirectoryOption();
00152
00153         page2.StoreValues();
00154         userHitOK = true;
00155     }
00156
00157 #endif /* WIN32 */
00158
00159 #ifdef qMacCvsPP
00160     userHitOK = true;
00161 #endif /* qMacCvsPP */
00162
00163 #if qUnix
00164     userHitOK = true;
00165 #endif // qUnix
00166
00167     return userHitOK;
00168 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/RtagDlg.cpp File Reference

common/RtagDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "GetPrefs.h"
#include "RtagDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "UpdateDlg.h"
#include "ItemListDlg.h"
#include "CvsRootDlg.h"

Include dependency graph for RtagDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetRtag (const MultiFiles *mf, const kTagCmdType tagType, bool &noRecurs, bool &movDelBranch, bool &overwriteExisting, UStr &tagName, UStr &modName, UStr &date, UStr &rev, bool &useMostRecent, bool &lookAttic, bool &forceCvsroot, UStr &cvsroot)
Get the rtag options.

Function Documentation

bool CompatGetRtag | ( | const MultiFiles * | mf,
 |  | const kTagCmdType | tagType,
 |  | bool & | noRecurs,
 |  | bool & | movDelBranch,
 |  | bool & | overwriteExisting,
 |  | UStr & | tagName,
 |  | UStr & | modName,
 |  | UStr & | date,
 |  | UStr & | rev,
 |  | bool & | useMostRecent,
 |  | bool & | lookAttic,
 |  | bool & | forceCvsroot,
 |  | UStr & | cvsroot
 | ) |

Get the rtag options.

Definition at line 1066 of file RtagDlg.cpp.

References CStr, EV_INIT_WIDGET, FindBestLastCvsroot(), FindBestLastModuleName(), gCvsPrefs, MultiFiles::getdir(), InsertLastCvsroot(), InsertLastModuleName(), kTagBranch, kTagCreate, kTagDelete, kUMainWidget, CRtag_MAIN::m_cvsroot, CRtag_OPTIONS::m_date, CRtag_MAIN::m_forceRoot, CRtag_OPTIONS::m_hasDate, CRtag_OPTIONS::m_hasRev, CRtag_MAIN::m_lookAttic, CRtag_MAIN::m_moduleName, CRtag_MAIN::m_movDelBranch, CRtag_MAIN::m_noRecurs, CRtag_MAIN::m_overwriteExisting, CRtag_OPTIONS::m_rev, CRtag_MAIN::m_tagName, CRtag_OPTIONS::m_useMostRecent, MultiFiles::NumDirs(), CvsPrefs::save(), CGetPrefs_GLOBALS::StoreValues(), UCreate_BranchModDlg(), UCreate_TagModDlg(), UCreate_UntagModDlg(), and UEventSendMessage().

Referenced by CvsCmdRtag().

01072 {
01073     bool userHitOK = false;
01074
01075     static CStr sLastModule;
01076     static CStr sLastTag;
01077     static CStr sLastDate;
01078     static CStr sLastRev;
01079     static bool lastForceCvsroot = true;
01080     static CStr sLastCvsroot;
01081
01082     bool hasDate = false;
01083     bool hasRev = false;
01084
01085     date = "";
01086     rev = "";
01087     tagName = "";
01088     modName = "";
01089     noRecurs = false;
01090     movDelBranch = false;
01091     overwriteExisting = false;
01092     useMostRecent = false;
01093     lookAttic = false;
01094
01095     if( mf && mf->NumDirs() > 0 )
01096     {
01097         CStr path;
01098         mf->getdir(0, path);
01099
01100         FindBestLastCvsroot(path.c_str(), sLastCvsroot);
01101         FindBestLastModuleName(path.c_str(), sLastModule);
01102     }
01103
01104 #ifdef WIN32
01105     const char* title = "Tag settings";
01106
01107     switch( tagType )
01108     {
01109     case kTagCreate:
01110         title = "Create tag settings";
01111         break;
01112     case kTagDelete:
01113         title = "Delete tag settings";
01114         break;
01115     case kTagBranch:
01116         title = "Create branch settings";
01117         break;
01118     default:
01119         break;
01120     }
01121
01122     CHHelpPropertySheet pages(title);
01123     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01124
01125     CRtag_MAIN page1(mf, tagType, sLastModule, sLastTag, noRecurs, movDelBranch, lookAttic, lastForceCvsroot, sLastCvsroot, overwriteExisting);
01126     CRtag_OPTIONS page2(mf, tagType, hasDate, hasRev, sLastDate, sLastRev, useMostRecent);
01127     CGetPrefs_GLOBALS page3;
01128
01129     pages.AddPage(&page1);
01130
01131     if( tagType != kTagDelete )
01132     {
01133         pages.AddPage(&page2);
01134     }
01135
01136     pages.AddPage(&page3);
01137
01138     if( pages.DoModal() == IDOK )
01139     {
01140         sLastModule = page1.m_moduleName;
01141         sLastTag = page1.m_tagName;
01142         noRecurs = page1.m_noRecurs == TRUE;
01143         movDelBranch = page1.m_movDelBranch == TRUE;
01144         overwriteExisting = page1.m_overwriteExisting == TRUE;
01145         lookAttic = page1.m_lookAttic == TRUE;
01146         lastForceCvsroot = page1.m_forceRoot == TRUE;
01147         sLastCvsroot = page1.m_cvsroot;
01148
01149         if( tagType != kTagDelete )
01150         {
01151             sLastDate = page2.m_date;
01152             sLastRev = page2.m_rev;
01153             hasDate = page2.m_hasDate == TRUE;
01154             hasRev = page2.m_hasRev == TRUE;
01155             useMostRecent = page2.m_useMostRecent == TRUE;
01156         }
01157
01158         page3.StoreValues();
01159
01160         userHitOK = true;
01161     }
01162 #endif /* WIN32 */
01163 #if qUnix
01164 //  }
01165     switch( tagType )
01166     {
01167     case kTagCreate:
01168         {
01169             void *wid = UCreate_TagModDlg();
01170
01171             UCvsRtagCreate *dlg = new UCvsRtagCreate();
01172             UCvsRtagCreate_MAIN *tab1 =
01173                 new UCvsRtagCreate_MAIN(sLastModule, sLastTag, hasDate, hasRev,
01174                 sLastDate, sLastRev, noRecurs, overwriteExisting,
01175                 useMostRecent, lookAttic);
01176             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01177             dlg->AddPage(tab1, UCvsRtagCreate::kTabGeneral, 0);
01178
01179             if(dlg->DoModal())
01180             {
01181                 lookAttic = tab1->m_attic;
01182                 sLastDate = tab1->m_date;
01183                 sLastRev = tab1->m_rev;
01184                 hasDate = tab1->m_hasdate;
01185                 hasRev = tab1->m_hasrev;
01186                 noRecurs = tab1->m_norecurs;
01187                 useMostRecent = tab1->m_match;
01188                 sLastModule = tab1->m_modname;
01189                 sLastTag = tab1->m_tagname;
01190                 overwriteExisting = tab1->m_overwrite;
01191
01192                 userHitOK = true;
01193             }
01194
01195             delete dlg;
01196         }
01197         break;
01198     case kTagDelete:
01199         {
01200             void *wid = UCreate_UntagModDlg();
01201
01202             UCvsRtagDel *dlg = new UCvsRtagDel();
01203             UCvsRtagDel_MAIN *tab1 = new UCvsRtagDel_MAIN(sLastModule, sLastTag,
01204                 noRecurs, lookAttic);
01205             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01206             dlg->AddPage(tab1, UCvsRtagDel::kTabGeneral, 0);
01207
01208             if(dlg->DoModal())
01209             {
01210                 lookAttic = tab1->m_attic;
01211                 noRecurs = tab1->m_norecurs;
01212                 sLastModule = tab1->m_modname;
01213                 sLastTag = tab1->m_tagname;
01214
01215                 userHitOK = true;
01216             }
01217
01218             delete dlg;
01219         }
01220         break;
01221     case kTagBranch:
01222         {
01223             void *wid = UCreate_BranchModDlg();
01224
01225             UCvsRtagBranch *dlg = new UCvsRtagBranch();
01226             UCvsRtagBranch_MAIN *tab1 =
01227                 new UCvsRtagBranch_MAIN(sLastModule, sLastTag, hasDate, hasRev,
01228                 sLastDate, sLastRev, noRecurs, useMostRecent,
01229                 lookAttic);
01230             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01231             dlg->AddPage(tab1, UCvsRtagBranch::kTabGeneral, 0);
01232
01233             if(dlg->DoModal())
01234             {
01235                 lookAttic = tab1->m_attic;
01236                 sLastDate = tab1->m_date;
01237                 sLastRev = tab1->m_rev;
01238                 hasDate = tab1->m_hasdate;
01239                 hasRev = tab1->m_hasrev;
01240                 noRecurs = tab1->m_norecurs;
01241                 useMostRecent = tab1->m_match;
01242                 sLastModule = tab1->m_modname;
01243                 sLastTag = tab1->m_tagname;
01244
01245                 userHitOK = true;
01246             }
01247
01248             delete dlg;
01249         }
01250         break;
01251     default:
01252         break;
01253     }
01254
01255 #endif // qUnix
01256 #ifdef qMacCvsPP
01257     switch( tagType )
01258     {
01259     case kTagCreate:
01260         {
01261             StDialogHandler theHandler(dlg_RtagCreate, LCommander::GetTopCommander());
01262             LWindow *theDialog = theHandler.GetDialog();
01263             ThrowIfNil_(theDialog);
01264             static UInt16 sRuntimePanel = 1;
01265
01266             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01267                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01268             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01269
01270             multiView->SwitchToPanel(3);
01271             DoDataExchange_Globals(theDialog, true);
01272             multiView->SwitchToPanel(2);
01273             DoDataExchange_RtagCreateOptions(theDialog, noRecurs, overwriteExisting, true);
01274             multiView->SwitchToPanel(1);
01275             DoDataExchange_RtagCreateMain(theDialog, mf, sLastModule, sLastTag,
01276                 hasDate, hasRev, sLastDate, sLastRev,
01277                 useMostRecent, lookAttic, true);
01278
01279             groupView->SetValue(sRuntimePanel);
01280             theDialog->Show();
01281             MessageT hitMessage;
01282             while (true)
01283             {       // Let DialogHandler process events
01284                 hitMessage = theHandler.DoDialog();
01285
01286                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01287                     break;
01288             }
01289             theDialog->Hide();
01290             sRuntimePanel = groupView->GetValue();
01291
01292             if(hitMessage == msg_OK)
01293             {
01294                 multiView->SwitchToPanel(1);
01295                 DoDataExchange_RtagCreateMain(theDialog, mf, sLastModule, sLastTag,
01296                     hasDate, hasRev, sLastDate, sLastRev,
01297                     useMostRecent, lookAttic, false);
01298                 multiView->SwitchToPanel(2);
01299                 DoDataExchange_RtagCreateOptions(theDialog, noRecurs, overwriteExisting, false);
01300                 multiView->SwitchToPanel(3);
01301                 DoDataExchange_Globals(theDialog, false);
01302                 userHitOK = true;
01303             }
01304         }
01305         break;
01306     case kTagDelete:
01307         {
01308             StDialogHandler theHandler(dlg_RtagDelete, LCommander::GetTopCommander());
01309             LWindow *theDialog = theHandler.GetDialog();
01310             ThrowIfNil_(theDialog);
01311             static UInt16 sRuntimePanel = 1;
01312
01313             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01314                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01315             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01316
01317             multiView->SwitchToPanel(2);
01318             DoDataExchange_Globals(theDialog, true);
01319             multiView->SwitchToPanel(1);
01320             DoDataExchange_RtagDeleteMain(theDialog, mf, sLastModule, sLastTag,
01321                 noRecurs, lookAttic, true);
01322
01323             groupView->SetValue(sRuntimePanel);
01324             theDialog->Show();
01325             MessageT hitMessage;
01326             while (true)
01327             {       // Let DialogHandler process events
01328                 hitMessage = theHandler.DoDialog();
01329
01330                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01331                     break;
01332             }
01333             theDialog->Hide();
01334             sRuntimePanel = groupView->GetValue();
01335
01336             if(hitMessage == msg_OK)
01337             {
01338                 multiView->SwitchToPanel(1);
01339                 DoDataExchange_RtagDeleteMain(theDialog, mf, sLastModule, sLastTag,
01340                     noRecurs, lookAttic, false);
01341                 multiView->SwitchToPanel(2);
01342                 DoDataExchange_Globals(theDialog, false);
01343                 userHitOK = true;
01344             }
01345         }
01346         break;
01347     case kTagBranch:
01348         {
01349             StDialogHandler theHandler(dlg_RtagBranch, LCommander::GetTopCommander());
01350             LWindow *theDialog = theHandler.GetDialog();
01351             ThrowIfNil_(theDialog);
01352             static UInt16 sRuntimePanel = 1;
01353
01354             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01355                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01356             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01357
01358             multiView->SwitchToPanel(3);
01359             DoDataExchange_Globals(theDialog, true);
01360             multiView->SwitchToPanel(2);
01361             DoDataExchange_RtagBranchOptions(theDialog, noRecurs, true);
01362             multiView->SwitchToPanel(1);
01363             DoDataExchange_RtagBranchMain(theDialog, mf, sLastModule, sLastTag,
01364                 hasDate, hasRev, sLastDate, sLastRev,
01365                 useMostRecent, lookAttic, true);
01366
01367             groupView->SetValue(sRuntimePanel);
01368             theDialog->Show();
01369             MessageT hitMessage;
01370             while (true)
01371             {       // Let DialogHandler process events
01372                 hitMessage = theHandler.DoDialog();
01373
01374                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01375                     break;
01376             }
01377             theDialog->Hide();
01378             sRuntimePanel = groupView->GetValue();
01379
01380             if(hitMessage == msg_OK)
01381             {
01382                 multiView->SwitchToPanel(1);
01383                 DoDataExchange_RtagBranchMain(theDialog, mf, sLastModule, sLastTag,
01384                     hasDate, hasRev, sLastDate, sLastRev,
01385                     useMostRecent, lookAttic, false);
01386                 multiView->SwitchToPanel(2);
01387                 DoDataExchange_RtagBranchOptions(theDialog, noRecurs, false);
01388                 multiView->SwitchToPanel(3);
01389                 DoDataExchange_Globals(theDialog, false);
01390                 userHitOK = true;
01391             }
01392         }
01393         break;
01394     default:
01395         break;
01396     }
01397 #endif /* qMacCvsPP */
01398
01399     if( userHitOK )
01400     {
01401         if( tagType != kTagDelete )
01402         {
01403             if( hasDate && !sLastDate.empty() )
01404                 date = sLastDate;
01405
01406             if( hasRev && !sLastRev.empty() )
01407                 rev = sLastRev;
01408         }
01409
01410         tagName = sLastTag;
01411         modName = sLastModule;
01412
01413         forceCvsroot = lastForceCvsroot;
01414         cvsroot = sLastCvsroot;
01415
01416         if( mf && mf->NumDirs() > 0 && forceCvsroot )
01417         {
01418             CStr path;
01419             mf->getdir(0, path);
01420
01421             InsertLastCvsroot(path, cvsroot);
01422             InsertLastModuleName(path, modName);
01423         }
01424
01425         gCvsPrefs.save();
01426     }
01427
01428     return userHitOK;
01429 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/RtagDlg.h File Reference

common/RtagDlg.h File Reference

#include "SmartComboBox.h"
#include "CvsCommands.h"
#include "HHelpSupport.h"

Include dependency graph for RtagDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CRtag_MAIN
class | CRtag_OPTIONS

Defines

#define | AFX_RTAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

bool | CompatGetRtag (const MultiFiles *mf, const kTagCmdType tagType, bool &noRecurs, bool &movDelBranch, bool &overwriteExisting, UStr &tagName, UStr &modName, UStr &date, UStr &rev, bool &useMostRecent, bool &lookAttic, bool &forceCvsroot, UStr &cvsroot)
Get the rtag options.

Variables

CMString gOldModules

Define Documentation

#define AFX_RTAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file RtagDlg.h.

Function Documentation

bool CompatGetRtag | ( | const MultiFiles * | mf,
 |  | const kTagCmdType | tagType,
 |  | bool & | noRecurs,
 |  | bool & | movDelBranch,
 |  | bool & | overwriteExisting,
 |  | UStr & | tagName,
 |  | UStr & | modName,
 |  | UStr & | date,
 |  | UStr & | rev,
 |  | bool & | useMostRecent,
 |  | bool & | lookAttic,
 |  | bool & | forceCvsroot,
 |  | UStr & | cvsroot
 | ) |

Get the rtag options.

Definition at line 1066 of file RtagDlg.cpp.

References CStr, EV_INIT_WIDGET, FindBestLastCvsroot(), FindBestLastModuleName(), gCvsPrefs, MultiFiles::getdir(), InsertLastCvsroot(), InsertLastModuleName(), kTagBranch, kTagCreate, kTagDelete, kUMainWidget, CRtag_MAIN::m_cvsroot, CRtag_OPTIONS::m_date, CRtag_MAIN::m_forceRoot, CRtag_OPTIONS::m_hasDate, CRtag_OPTIONS::m_hasRev, CRtag_MAIN::m_lookAttic, CRtag_MAIN::m_moduleName, CRtag_MAIN::m_movDelBranch, CRtag_MAIN::m_noRecurs, CRtag_MAIN::m_overwriteExisting, CRtag_OPTIONS::m_rev, CRtag_MAIN::m_tagName, CRtag_OPTIONS::m_useMostRecent, MultiFiles::NumDirs(), CvsPrefs::save(), CGetPrefs_GLOBALS::StoreValues(), UCreate_BranchModDlg(), UCreate_TagModDlg(), UCreate_UntagModDlg(), and UEventSendMessage().

Referenced by CvsCmdRtag().

01072 {
01073     bool userHitOK = false;
01074
01075     static CStr sLastModule;
01076     static CStr sLastTag;
01077     static CStr sLastDate;
01078     static CStr sLastRev;
01079     static bool lastForceCvsroot = true;
01080     static CStr sLastCvsroot;
01081
01082     bool hasDate = false;
01083     bool hasRev = false;
01084
01085     date = "";
01086     rev = "";
01087     tagName = "";
01088     modName = "";
01089     noRecurs = false;
01090     movDelBranch = false;
01091     overwriteExisting = false;
01092     useMostRecent = false;
01093     lookAttic = false;
01094
01095     if( mf && mf->NumDirs() > 0 )
01096     {
01097         CStr path;
01098         mf->getdir(0, path);
01099
01100         FindBestLastCvsroot(path.c_str(), sLastCvsroot);
01101         FindBestLastModuleName(path.c_str(), sLastModule);
01102     }
01103
01104 #ifdef WIN32
01105     const char* title = "Tag settings";
01106
01107     switch( tagType )
01108     {
01109     case kTagCreate:
01110         title = "Create tag settings";
01111         break;
01112     case kTagDelete:
01113         title = "Delete tag settings";
01114         break;
01115     case kTagBranch:
01116         title = "Create branch settings";
01117         break;
01118     default:
01119         break;
01120     }
01121
01122     CHHelpPropertySheet pages(title);
01123     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01124
01125     CRtag_MAIN page1(mf, tagType, sLastModule, sLastTag, noRecurs, movDelBranch, lookAttic, lastForceCvsroot, sLastCvsroot, overwriteExisting);
01126     CRtag_OPTIONS page2(mf, tagType, hasDate, hasRev, sLastDate, sLastRev, useMostRecent);
01127     CGetPrefs_GLOBALS page3;
01128
01129     pages.AddPage(&page1);
01130
01131     if( tagType != kTagDelete )
01132     {
01133         pages.AddPage(&page2);
01134     }
01135
01136     pages.AddPage(&page3);
01137
01138     if( pages.DoModal() == IDOK )
01139     {
01140         sLastModule = page1.m_moduleName;
01141         sLastTag = page1.m_tagName;
01142         noRecurs = page1.m_noRecurs == TRUE;
01143         movDelBranch = page1.m_movDelBranch == TRUE;
01144         overwriteExisting = page1.m_overwriteExisting == TRUE;
01145         lookAttic = page1.m_lookAttic == TRUE;
01146         lastForceCvsroot = page1.m_forceRoot == TRUE;
01147         sLastCvsroot = page1.m_cvsroot;
01148
01149         if( tagType != kTagDelete )
01150         {
01151             sLastDate = page2.m_date;
01152             sLastRev = page2.m_rev;
01153             hasDate = page2.m_hasDate == TRUE;
01154             hasRev = page2.m_hasRev == TRUE;
01155             useMostRecent = page2.m_useMostRecent == TRUE;
01156         }
01157
01158         page3.StoreValues();
01159
01160         userHitOK = true;
01161     }
01162 #endif /* WIN32 */
01163 #if qUnix
01164 //  }
01165     switch( tagType )
01166     {
01167     case kTagCreate:
01168         {
01169             void *wid = UCreate_TagModDlg();
01170
01171             UCvsRtagCreate *dlg = new UCvsRtagCreate();
01172             UCvsRtagCreate_MAIN *tab1 =
01173                 new UCvsRtagCreate_MAIN(sLastModule, sLastTag, hasDate, hasRev,
01174                 sLastDate, sLastRev, noRecurs, overwriteExisting,
01175                 useMostRecent, lookAttic);
01176             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01177             dlg->AddPage(tab1, UCvsRtagCreate::kTabGeneral, 0);
01178
01179             if(dlg->DoModal())
01180             {
01181                 lookAttic = tab1->m_attic;
01182                 sLastDate = tab1->m_date;
01183                 sLastRev = tab1->m_rev;
01184                 hasDate = tab1->m_hasdate;
01185                 hasRev = tab1->m_hasrev;
01186                 noRecurs = tab1->m_norecurs;
01187                 useMostRecent = tab1->m_match;
01188                 sLastModule = tab1->m_modname;
01189                 sLastTag = tab1->m_tagname;
01190                 overwriteExisting = tab1->m_overwrite;
01191
01192                 userHitOK = true;
01193             }
01194
01195             delete dlg;
01196         }
01197         break;
01198     case kTagDelete:
01199         {
01200             void *wid = UCreate_UntagModDlg();
01201
01202             UCvsRtagDel *dlg = new UCvsRtagDel();
01203             UCvsRtagDel_MAIN *tab1 = new UCvsRtagDel_MAIN(sLastModule, sLastTag,
01204                 noRecurs, lookAttic);
01205             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01206             dlg->AddPage(tab1, UCvsRtagDel::kTabGeneral, 0);
01207
01208             if(dlg->DoModal())
01209             {
01210                 lookAttic = tab1->m_attic;
01211                 noRecurs = tab1->m_norecurs;
01212                 sLastModule = tab1->m_modname;
01213                 sLastTag = tab1->m_tagname;
01214
01215                 userHitOK = true;
01216             }
01217
01218             delete dlg;
01219         }
01220         break;
01221     case kTagBranch:
01222         {
01223             void *wid = UCreate_BranchModDlg();
01224
01225             UCvsRtagBranch *dlg = new UCvsRtagBranch();
01226             UCvsRtagBranch_MAIN *tab1 =
01227                 new UCvsRtagBranch_MAIN(sLastModule, sLastTag, hasDate, hasRev,
01228                 sLastDate, sLastRev, noRecurs, useMostRecent,
01229                 lookAttic);
01230             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01231             dlg->AddPage(tab1, UCvsRtagBranch::kTabGeneral, 0);
01232
01233             if(dlg->DoModal())
01234             {
01235                 lookAttic = tab1->m_attic;
01236                 sLastDate = tab1->m_date;
01237                 sLastRev = tab1->m_rev;
01238                 hasDate = tab1->m_hasdate;
01239                 hasRev = tab1->m_hasrev;
01240                 noRecurs = tab1->m_norecurs;
01241                 useMostRecent = tab1->m_match;
01242                 sLastModule = tab1->m_modname;
01243                 sLastTag = tab1->m_tagname;
01244
01245                 userHitOK = true;
01246             }
01247
01248             delete dlg;
01249         }
01250         break;
01251     default:
01252         break;
01253     }
01254
01255 #endif // qUnix
01256 #ifdef qMacCvsPP
01257     switch( tagType )
01258     {
01259     case kTagCreate:
01260         {
01261             StDialogHandler theHandler(dlg_RtagCreate, LCommander::GetTopCommander());
01262             LWindow *theDialog = theHandler.GetDialog();
01263             ThrowIfNil_(theDialog);
01264             static UInt16 sRuntimePanel = 1;
01265
01266             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01267                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01268             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01269
01270             multiView->SwitchToPanel(3);
01271             DoDataExchange_Globals(theDialog, true);
01272             multiView->SwitchToPanel(2);
01273             DoDataExchange_RtagCreateOptions(theDialog, noRecurs, overwriteExisting, true);
01274             multiView->SwitchToPanel(1);
01275             DoDataExchange_RtagCreateMain(theDialog, mf, sLastModule, sLastTag,
01276                 hasDate, hasRev, sLastDate, sLastRev,
01277                 useMostRecent, lookAttic, true);
01278
01279             groupView->SetValue(sRuntimePanel);
01280             theDialog->Show();
01281             MessageT hitMessage;
01282             while (true)
01283             {       // Let DialogHandler process events
01284                 hitMessage = theHandler.DoDialog();
01285
01286                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01287                     break;
01288             }
01289             theDialog->Hide();
01290             sRuntimePanel = groupView->GetValue();
01291
01292             if(hitMessage == msg_OK)
01293             {
01294                 multiView->SwitchToPanel(1);
01295                 DoDataExchange_RtagCreateMain(theDialog, mf, sLastModule, sLastTag,
01296                     hasDate, hasRev, sLastDate, sLastRev,
01297                     useMostRecent, lookAttic, false);
01298                 multiView->SwitchToPanel(2);
01299                 DoDataExchange_RtagCreateOptions(theDialog, noRecurs, overwriteExisting, false);
01300                 multiView->SwitchToPanel(3);
01301                 DoDataExchange_Globals(theDialog, false);
01302                 userHitOK = true;
01303             }
01304         }
01305         break;
01306     case kTagDelete:
01307         {
01308             StDialogHandler theHandler(dlg_RtagDelete, LCommander::GetTopCommander());
01309             LWindow *theDialog = theHandler.GetDialog();
01310             ThrowIfNil_(theDialog);
01311             static UInt16 sRuntimePanel = 1;
01312
01313             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01314                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01315             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01316
01317             multiView->SwitchToPanel(2);
01318             DoDataExchange_Globals(theDialog, true);
01319             multiView->SwitchToPanel(1);
01320             DoDataExchange_RtagDeleteMain(theDialog, mf, sLastModule, sLastTag,
01321                 noRecurs, lookAttic, true);
01322
01323             groupView->SetValue(sRuntimePanel);
01324             theDialog->Show();
01325             MessageT hitMessage;
01326             while (true)
01327             {       // Let DialogHandler process events
01328                 hitMessage = theHandler.DoDialog();
01329
01330                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01331                     break;
01332             }
01333             theDialog->Hide();
01334             sRuntimePanel = groupView->GetValue();
01335
01336             if(hitMessage == msg_OK)
01337             {
01338                 multiView->SwitchToPanel(1);
01339                 DoDataExchange_RtagDeleteMain(theDialog, mf, sLastModule, sLastTag,
01340                     noRecurs, lookAttic, false);
01341                 multiView->SwitchToPanel(2);
01342                 DoDataExchange_Globals(theDialog, false);
01343                 userHitOK = true;
01344             }
01345         }
01346         break;
01347     case kTagBranch:
01348         {
01349             StDialogHandler theHandler(dlg_RtagBranch, LCommander::GetTopCommander());
01350             LWindow *theDialog = theHandler.GetDialog();
01351             ThrowIfNil_(theDialog);
01352             static UInt16 sRuntimePanel = 1;
01353
01354             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01355                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01356             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01357
01358             multiView->SwitchToPanel(3);
01359             DoDataExchange_Globals(theDialog, true);
01360             multiView->SwitchToPanel(2);
01361             DoDataExchange_RtagBranchOptions(theDialog, noRecurs, true);
01362             multiView->SwitchToPanel(1);
01363             DoDataExchange_RtagBranchMain(theDialog, mf, sLastModule, sLastTag,
01364                 hasDate, hasRev, sLastDate, sLastRev,
01365                 useMostRecent, lookAttic, true);
01366
01367             groupView->SetValue(sRuntimePanel);
01368             theDialog->Show();
01369             MessageT hitMessage;
01370             while (true)
01371             {       // Let DialogHandler process events
01372                 hitMessage = theHandler.DoDialog();
01373
01374                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01375                     break;
01376             }
01377             theDialog->Hide();
01378             sRuntimePanel = groupView->GetValue();
01379
01380             if(hitMessage == msg_OK)
01381             {
01382                 multiView->SwitchToPanel(1);
01383                 DoDataExchange_RtagBranchMain(theDialog, mf, sLastModule, sLastTag,
01384                     hasDate, hasRev, sLastDate, sLastRev,
01385                     useMostRecent, lookAttic, false);
01386                 multiView->SwitchToPanel(2);
01387                 DoDataExchange_RtagBranchOptions(theDialog, noRecurs, false);
01388                 multiView->SwitchToPanel(3);
01389                 DoDataExchange_Globals(theDialog, false);
01390                 userHitOK = true;
01391             }
01392         }
01393         break;
01394     default:
01395         break;
01396     }
01397 #endif /* qMacCvsPP */
01398
01399     if( userHitOK )
01400     {
01401         if( tagType != kTagDelete )
01402         {
01403             if( hasDate && !sLastDate.empty() )
01404                 date = sLastDate;
01405
01406             if( hasRev && !sLastRev.empty() )
01407                 rev = sLastRev;
01408         }
01409
01410         tagName = sLastTag;
01411         modName = sLastModule;
01412
01413         forceCvsroot = lastForceCvsroot;
01414         cvsroot = sLastCvsroot;
01415
01416         if( mf && mf->NumDirs() > 0 && forceCvsroot )
01417         {
01418             CStr path;
01419             mf->getdir(0, path);
01420
01421             InsertLastCvsroot(path, cvsroot);
01422             InsertLastModuleName(path, modName);
01423         }
01424
01425         gCvsPrefs.save();
01426     }
01427
01428     return userHitOK;
01429 }

Here is the call graph for this function:

Variable Documentation

CMString gOldModules

Referenced by CCheckout_MAIN::CCheckout_MAIN(), and CRtag_MAIN::CRtag_MAIN().

Generated on Sat Aug 7 22:45:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SaveSettingsDlg.cpp File Reference

common/SaveSettingsDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "SaveSettingsDlg.h"

Include dependency graph for SaveSettingsDlg.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:45:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SaveSettingsDlg.h File Reference

common/SaveSettingsDlg.h File Reference

#include "SmartComboBox.h"
#include "HHelpSupport.h"

Include dependency graph for SaveSettingsDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CSaveSettingsDlg

Defines

#define | AFX_SAVESETTINGSDLG_H__73E4731F_7A3E_46B2_835A_056922641479__INCLUDED_

Define Documentation

#define AFX_SAVESETTINGSDLG_H__73E4731F_7A3E_46B2_835A_056922641479__INCLUDED_

Definition at line 22 of file SaveSettingsDlg.h.

Generated on Sat Aug 7 22:45:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SelectionDetailsDlg.cpp File Reference

common/SelectionDetailsDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "SelectionDetailsDlg.h"
#include "CvsEntries.h"

Include dependency graph for SelectionDetailsDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetSelectionDetails (const MultiFiles *mf, kSelDetType &selDetType, UStr &selection)
Get the selection details.

Function Documentation

bool CompatGetSelectionDetails | ( | const MultiFiles * | mf,
 |  | kSelDetType & | selDetType,
 |  | UStr & | selection
 | ) |

Get the selection details.

Definition at line 555 of file SelectionDetailsDlg.cpp.

References EV_INIT_WIDGET, kSelDetType, kUMainWidget, UCreate_SelDetailsDlg(), and UEventSendMessage().

Referenced by CItemListDlg::OnSelection().

00556 {
00557     bool userHitOK = false;
00558
00559 #ifdef WIN32
00560     CSelectionDetailsDlg selectionDetailsDlg(mf, selDetType, selection.c_str());
00561
00562     if( selectionDetailsDlg.DoModal() == IDOK )
00563     {
00564         selection = selectionDetailsDlg.m_selection;
00565         selDetType = (kSelDetType)selectionDetailsDlg.m_selDetType;
00566
00567         userHitOK = true;
00568     }
00569 #endif /* WIN32 */
00570
00571 #if qUnix
00572     void *wid;
00573 #   if qGTK
00574     wid = UCreate_SelDetailsDlg();
00575 #   endif
00576
00577     UCvsSelectionDetailsDlg *dlg = new UCvsSelectionDetailsDlg( mf, selDetType, selection.c_str());
00578     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00579     if(dlg->DoModal())
00580     {
00581         selection = dlg->m_selection;
00582         selDetType = dlg->m_selDetType;
00583
00584         userHitOK = true;
00585     }
00586     delete dlg;
00587
00588 #endif // qUnix
00589
00590 #ifdef qMacCvsPP
00591 #endif /* qMacCvsPP */
00592
00593     return userHitOK;
00594 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SelectionDetailsDlg.h File Reference

common/SelectionDetailsDlg.h File Reference

#include "MultiFiles.h"
#include "SortHeaderCtrl.h"
#include "HHelpSupport.h"

Include dependency graph for SelectionDetailsDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | SelectionDisplayInfo
Class to hold and support data display (e.g. sorting). More...
class | CSelectionDetailsDlg
struct | CSelectionDetailsDlg::CompareInfo
Structure to hold the sorting settings. More...

Defines

#define | AFX_SELECTIONDETAILSDLG_H__42708DEE_6E9B_41FD_BAE6_0224C8EE09D8__INCLUDED_

Enumerations

enum kSelDetType {
kSelDetFile,
kSelDetRevision,
kSelDetPath
}
Enum types of selection details dialog. More...

Functions

bool | CompatGetSelectionDetails (const MultiFiles *mf, kSelDetType &selDetType, UStr &selection)
Get the selection details.

Define Documentation

#define AFX_SELECTIONDETAILSDLG_H__42708DEE_6E9B_41FD_BAE6_0224C8EE09D8__INCLUDED_

Definition at line 22 of file SelectionDetailsDlg.h.

Enumeration Type Documentation

enum kSelDetType

Enum types of selection details dialog.

Enumeration values:
kSelDetFile | Select file
kSelDetRevision | Select revision
kSelDetPath | Select path
Definition at line 38 of file SelectionDetailsDlg.h.

Referenced by CompatGetSelectionDetails(), and CItemListDlg::OnSelection().

00039 {
00040     kSelDetFile,
00041     kSelDetRevision,
00042     kSelDetPath
00043 } kSelDetType;

Function Documentation

bool CompatGetSelectionDetails | ( | const MultiFiles * | mf,
 |  | kSelDetType & | selDetType,
 |  | UStr & | selection
 | ) |

Get the selection details.

Definition at line 555 of file SelectionDetailsDlg.cpp.

References EV_INIT_WIDGET, kSelDetType, kUMainWidget, UCreate_SelDetailsDlg(), and UEventSendMessage().

Referenced by CItemListDlg::OnSelection().

00556 {
00557     bool userHitOK = false;
00558
00559 #ifdef WIN32
00560     CSelectionDetailsDlg selectionDetailsDlg(mf, selDetType, selection.c_str());
00561
00562     if( selectionDetailsDlg.DoModal() == IDOK )
00563     {
00564         selection = selectionDetailsDlg.m_selection;
00565         selDetType = (kSelDetType)selectionDetailsDlg.m_selDetType;
00566
00567         userHitOK = true;
00568     }
00569 #endif /* WIN32 */
00570
00571 #if qUnix
00572     void *wid;
00573 #   if qGTK
00574     wid = UCreate_SelDetailsDlg();
00575 #   endif
00576
00577     UCvsSelectionDetailsDlg *dlg = new UCvsSelectionDetailsDlg( mf, selDetType, selection.c_str());
00578     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00579     if(dlg->DoModal())
00580     {
00581         selection = dlg->m_selection;
00582         selDetType = dlg->m_selDetType;
00583
00584         userHitOK = true;
00585     }
00586     delete dlg;
00587
00588 #endif // qUnix
00589
00590 #ifdef qMacCvsPP
00591 #endif /* qMacCvsPP */
00592
00593     return userHitOK;
00594 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:45:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SmartComboBox.cpp File Reference

common/SmartComboBox.cpp File Reference

#include "stdafx.h"
#include "SmartComboBox.h"
#include "resource.h"
#include "MultiString.h"
#include "CvsAlert.h"

Include dependency graph for SmartComboBox.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:45:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SmartComboBox.h File Reference

common/SmartComboBox.h File Reference

#include "ustr.h"

Include dependency graph for SmartComboBox.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | USmartCombo
class | CSmartComboBox

Defines

#define | AFX_SMARTCOMBOBOX_H__E3F8DAE6_C2EF_49CE_AE52_3AE54F5A629C__INCLUDED_

Enumerations

enum {
WM_SMCB_MIN = WM_APP + 1,
WM_SMCB_SETFEATURE,
WM_SMCB_SETITEMS,
WM_SMCB_SETREADONLY,
WM_SMCB_MAX
}
Private window messages enum. More...

Define Documentation

#define AFX_SMARTCOMBOBOX_H__E3F8DAE6_C2EF_49CE_AE52_3AE54F5A629C__INCLUDED_

Definition at line 22 of file SmartComboBox.h.

Enumeration Type Documentation

anonymous enum

Private window messages enum.

Enumeration values:
WM_SMCB_MIN | Start marker
WM_SMCB_SETFEATURE | Set the features, see CSmartComboBox::OnSetFeature for more details
WM_SMCB_SETITEMS | Set the drop-down list items collection, see CSmartComboBox::OnSetItems for more details
WM_SMCB_SETREADONLY | Set the read-only feature, see CSmartComboBox::OnSetFeature for more details
WM_SMCB_MAX | End marker
Definition at line 90 of file SmartComboBox.h.
00090     {
00091     WM_SMCB_MIN = WM_APP + 1,
00092     WM_SMCB_SETFEATURE,
00093     WM_SMCB_SETITEMS,
00094     WM_SMCB_SETREADONLY,
00095     WM_SMCB_MAX
00096 };

Generated on Sat Aug 7 22:45:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SortList.h File Reference

common/SortList.h File Reference

#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>

Include dependency graph for SortList.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CSortList< T >

Enumerations

enum computeSort {
computeNone,
computeLR
}

Enumeration Type Documentation

enum computeSort

Enumeration values:
computeNone
computeLR
Definition at line 38 of file SortList.h.

Referenced by CSortList< ENTNODE >::Location().

00039 {
00040     computeNone,
00041     computeLR
00042 } computeSort;

Generated on Sat Aug 7 22:45:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/StatusDlg.cpp File Reference

common/StatusDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "OptionalPropertySheet.h"
#include "StatusDlg.h"
#include "MultiFiles.h"
#include "GetPrefs.h"

Include dependency graph for StatusDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetStatus (const MultiFiles *mf, bool &noRecurs, STATUSOUTPUT_TYPE &outputType)
Get the status options.

Function Documentation

bool CompatGetStatus | ( | const MultiFiles * | mf,
 |  | bool & | noRecurs,
 |  | STATUSOUTPUT_TYPE & | outputType
 | ) |

Get the status options.

Definition at line 105 of file StatusDlg.cpp.

References gCvsPrefs, CvsPrefs::HideCommandDlgStatus(), CStatus_MAIN::m_noRecurs, CStatus_MAIN::m_outputType, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgStatus(), CvsPrefs::SetStatusOutputType(), STATUSOUTPUT_TYPE, CvsPrefs::StatusOutputType(), and CGetPrefs_GLOBALS::StoreValues().

Referenced by CvsCmdStatus().

00106 {
00107     bool userHitOK = false;
00108
00109     noRecurs = false;
00110     outputType = gCvsPrefs.StatusOutputType();
00111
00112 #ifdef WIN32
00113     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgStatus(), "Status settings");
00114     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00115     CStatus_MAIN page1(noRecurs, outputType);
00116     CGetPrefs_GLOBALS page2;
00117     pages.AddPage(&page1);
00118     pages.AddPage(&page2);
00119
00120     if( pages.DoModal() == IDOK )
00121     {
00122         noRecurs = page1.m_noRecurs ? true : false;
00123         gCvsPrefs.SetStatusOutputType((STATUSOUTPUT_TYPE)page1.m_outputType);
00124
00125         page2.StoreValues();
00126         gCvsPrefs.SetHideCommandDlgStatus(pages.GetHideCommandDlg());
00127         userHitOK = true;
00128     }
00129 #endif /* WIN32 */
00130
00131 #ifdef qMacCvsPP
00132     userHitOK = true;
00133 #endif /* qMacCvsPP */
00134
00135 #if qUnix
00136     userHitOK = true;
00137 #endif // qUnix
00138
00139     if( userHitOK )
00140     {
00141         outputType = gCvsPrefs.StatusOutputType();
00142
00143         gCvsPrefs.save();
00144     }
00145
00146     return userHitOK;
00147 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/StatusDlg.h File Reference

common/StatusDlg.h File Reference

#include "CvsPrefs.h"
#include "HHelpSupport.h"

Include dependency graph for StatusDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CStatus_MAIN

Defines

#define | AFX_STATUSDLG_H__5EEE9989_6C76_4FD3_83FC_2D90DEA0CE21__INCLUDED_

Functions

bool | CompatGetStatus (const MultiFiles *mf, bool &noRecurs, STATUSOUTPUT_TYPE &outputType)
Get the status options.

Define Documentation

#define AFX_STATUSDLG_H__5EEE9989_6C76_4FD3_83FC_2D90DEA0CE21__INCLUDED_

Definition at line 26 of file StatusDlg.h.

Function Documentation

bool CompatGetStatus | ( | const MultiFiles * | mf,
 |  | bool & | noRecurs,
 |  | STATUSOUTPUT_TYPE & | outputType
 | ) |

Get the status options.

Definition at line 105 of file StatusDlg.cpp.

References gCvsPrefs, CvsPrefs::HideCommandDlgStatus(), CStatus_MAIN::m_noRecurs, CStatus_MAIN::m_outputType, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgStatus(), CvsPrefs::SetStatusOutputType(), STATUSOUTPUT_TYPE, CvsPrefs::StatusOutputType(), and CGetPrefs_GLOBALS::StoreValues().

Referenced by CvsCmdStatus().

00106 {
00107     bool userHitOK = false;
00108
00109     noRecurs = false;
00110     outputType = gCvsPrefs.StatusOutputType();
00111
00112 #ifdef WIN32
00113     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgStatus(), "Status settings");
00114     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00115     CStatus_MAIN page1(noRecurs, outputType);
00116     CGetPrefs_GLOBALS page2;
00117     pages.AddPage(&page1);
00118     pages.AddPage(&page2);
00119
00120     if( pages.DoModal() == IDOK )
00121     {
00122         noRecurs = page1.m_noRecurs ? true : false;
00123         gCvsPrefs.SetStatusOutputType((STATUSOUTPUT_TYPE)page1.m_outputType);
00124
00125         page2.StoreValues();
00126         gCvsPrefs.SetHideCommandDlgStatus(pages.GetHideCommandDlg());
00127         userHitOK = true;
00128     }
00129 #endif /* WIN32 */
00130
00131 #ifdef qMacCvsPP
00132     userHitOK = true;
00133 #endif /* qMacCvsPP */
00134
00135 #if qUnix
00136     userHitOK = true;
00137 #endif // qUnix
00138
00139     if( userHitOK )
00140     {
00141         outputType = gCvsPrefs.StatusOutputType();
00142
00143         gCvsPrefs.save();
00144     }
00145
00146     return userHitOK;
00147 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TagDlg.cpp File Reference

common/TagDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "GetPrefs.h"
#include "TagDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "UpdateDlg.h"
#include "ItemListDlg.h"

Include dependency graph for TagDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetTag (const MultiFiles *mf, const kTagCmdType tagType, bool &noRecurs, bool &movDelBranch, bool &overwriteExisting, UStr &tagName, bool &checkUnmod)
Get the tag options.

Function Documentation

bool CompatGetTag | ( | const MultiFiles * | mf,
 |  | const kTagCmdType | tagType,
 |  | bool & | noRecurs,
 |  | bool & | movDelBranch,
 |  | bool & | overwriteExisting,
 |  | UStr & | tagName,
 |  | bool & | checkUnmod
 | ) |

Get the tag options.

Definition at line 632 of file TagDlg.cpp.

References CStr, EV_INIT_WIDGET, gCvsPrefs, kTagBranch, kTagCreate, kTagDelete, kUMainWidget, CTag_MAIN::m_checkUnmod, CTag_MAIN::m_movDelBranch, CTag_MAIN::m_noRecurs, CTag_MAIN::m_overwriteExisting, CTag_MAIN::m_tagName, CvsPrefs::save(), CGetPrefs_GLOBALS::StoreValues(), UCreate_BranchDlg(), UCreate_TagDlg(), UCreate_UntagDlg(), and UEventSendMessage().

Referenced by CvsCmdTag().

00636 {
00637     bool userHitOK = false;
00638
00639     static CStr sLastTag;
00640
00641     tagName.clear();
00642     noRecurs = false;
00643     movDelBranch = false;
00644     overwriteExisting = false;
00645     checkUnmod = false;
00646
00647 #ifdef WIN32
00648     const char* title = "Tag settings";
00649
00650     switch( tagType )
00651     {
00652     case kTagCreate:
00653         title = "Create tag settings";
00654         break;
00655     case kTagDelete:
00656         title = "Delete tag settings";
00657         break;
00658     case kTagBranch:
00659         title = "Create branch settings";
00660         break;
00661     default:
00662         break;
00663     }
00664
00665     CHHelpPropertySheet pages(title);
00666     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00667
00668     CTag_MAIN page1(mf, tagType, sLastTag, noRecurs, checkUnmod, overwriteExisting);
00669     CGetPrefs_GLOBALS page2;
00670
00671     pages.AddPage(&page1);
00672     pages.AddPage(&page2);
00673
00674     if( pages.DoModal() == IDOK )
00675     {
00676         checkUnmod = page1.m_checkUnmod == TRUE;
00677         noRecurs = page1.m_noRecurs == TRUE;
00678         movDelBranch = page1.m_movDelBranch == TRUE;
00679         sLastTag = page1.m_tagName;
00680         overwriteExisting = page1.m_overwriteExisting == TRUE;
00681
00682         page2.StoreValues();
00683         userHitOK = true;
00684     }
00685 #endif /* WIN32 */
00686 #if qUnix
00687     switch( tagType )
00688     {
00689     case kTagCreate:
00690         {
00691             void *wid = UCreate_TagDlg();
00692
00693             UCvsTagCreate *dlg = new UCvsTagCreate();
00694             UCvsTagCreate_MAIN *tab1 =
00695                 new UCvsTagCreate_MAIN(sLastTag, noRecurs, overwriteExisting, checkUnmod);
00696             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00697             dlg->AddPage(tab1, UCvsTagCreate::kTabGeneral, 0);
00698
00699             if(dlg->DoModal())
00700             {
00701                 checkUnmod = tab1->m_checkunmod;
00702                 noRecurs = tab1->m_norecurs;
00703                 sLastTag = tab1->m_tagname;
00704                 overwriteExisting = tab1->m_overwrite;
00705
00706                 userHitOK = true;
00707             }
00708
00709             delete dlg;
00710         }
00711         break;
00712     case kTagDelete:
00713         {
00714             void *wid = UCreate_UntagDlg();
00715
00716             UCvsTagDel *dlg = new UCvsTagDel();
00717             UCvsTagDel_MAIN *tab1 = new UCvsTagDel_MAIN(sLastTag, noRecurs);
00718             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00719             dlg->AddPage(tab1, UCvsTagDel::kTabGeneral, 0);
00720
00721             if(dlg->DoModal())
00722             {
00723                 noRecurs = tab1->m_norecurs;
00724                 sLastTag = tab1->m_tagname;
00725
00726                 userHitOK = true;
00727             }
00728
00729             delete dlg;
00730         }
00731         break;
00732     case kTagBranch:
00733         {
00734             void *wid = UCreate_BranchDlg();
00735
00736             UCvsTagBranch *dlg = new UCvsTagBranch();
00737             UCvsTagBranch_MAIN *tab1 = new UCvsTagBranch_MAIN(sLastTag, noRecurs, checkUnmod);
00738             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00739             dlg->AddPage(tab1, UCvsTagBranch::kTabGeneral, 0);
00740
00741             if(dlg->DoModal())
00742             {
00743                 checkUnmod = tab1->m_checkunmod;
00744                 noRecurs = tab1->m_norecurs;
00745                 sLastTag = tab1->m_tagname;
00746
00747                 userHitOK = true;
00748             }
00749
00750             delete dlg;
00751         }
00752         break;
00753     default:
00754         break;
00755     }
00756 #endif // qUnix
00757 #ifdef qMacCvsPP
00758     switch( tagType )
00759     {
00760     case kTagCreate:
00761         {
00762             StDialogHandler theHandler(dlg_TagCreate, LCommander::GetTopCommander());
00763             LWindow *theDialog = theHandler.GetDialog();
00764             ThrowIfNil_(theDialog);
00765             static UInt16 sRuntimePanel = 1;
00766
00767             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00768                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00769             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00770
00771             multiView->SwitchToPanel(2);
00772             DoDataExchange_Globals(theDialog, true);
00773             multiView->SwitchToPanel(1);
00774             DoDataExchange_TagCreateMain(theDialog, mf, sLastTag,
00775                 noRecurs, overwriteExisting, checkUnmod, true);
00776
00777             groupView->SetValue(sRuntimePanel);
00778             theDialog->Show();
00779             MessageT hitMessage;
00780             while (true)
00781             {       // Let DialogHandler process events
00782                 hitMessage = theHandler.DoDialog();
00783
00784                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00785                     break;
00786             }
00787             theDialog->Hide();
00788             sRuntimePanel = groupView->GetValue();
00789
00790             if(hitMessage == msg_OK)
00791             {
00792                 multiView->SwitchToPanel(1);
00793                 DoDataExchange_TagCreateMain(theDialog, mf, sLastTag,
00794                     noRecurs, overwriteExisting, checkUnmod, false);
00795                 multiView->SwitchToPanel(2);
00796                 DoDataExchange_Globals(theDialog, false);
00797                 userHitOK = true;
00798             }
00799         }
00800         break;
00801     case kTagDelete:
00802         {
00803             StDialogHandler theHandler(dlg_TagDelete, LCommander::GetTopCommander());
00804             LWindow *theDialog = theHandler.GetDialog();
00805             ThrowIfNil_(theDialog);
00806             static UInt16 sRuntimePanel = 1;
00807
00808             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00809                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00810             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00811
00812             multiView->SwitchToPanel(2);
00813             DoDataExchange_Globals(theDialog, true);
00814             multiView->SwitchToPanel(1);
00815             DoDataExchange_TagDeleteMain(theDialog, mf, sLastTag, noRecurs, true);
00816
00817             groupView->SetValue(sRuntimePanel);
00818             theDialog->Show();
00819             MessageT hitMessage;
00820             while (true)
00821             {       // Let DialogHandler process events
00822                 hitMessage = theHandler.DoDialog();
00823
00824                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00825                     break;
00826             }
00827             theDialog->Hide();
00828             sRuntimePanel = groupView->GetValue();
00829
00830             if(hitMessage == msg_OK)
00831             {
00832                 multiView->SwitchToPanel(1);
00833                 DoDataExchange_TagDeleteMain(theDialog, mf, sLastTag, noRecurs, false);
00834                 multiView->SwitchToPanel(2);
00835                 DoDataExchange_Globals(theDialog, false);
00836                 userHitOK = true;
00837             }
00838         }
00839         break;
00840     case kTagBranch:
00841         {
00842             StDialogHandler theHandler(dlg_TagBranch, LCommander::GetTopCommander());
00843             LWindow *theDialog = theHandler.GetDialog();
00844             ThrowIfNil_(theDialog);
00845             static UInt16 sRuntimePanel = 1;
00846
00847             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00848                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00849             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00850
00851             multiView->SwitchToPanel(2);
00852             DoDataExchange_Globals(theDialog, true);
00853             multiView->SwitchToPanel(1);
00854             DoDataExchange_TagBranchMain(theDialog, mf, sLastTag,
00855                 noRecurs, checkUnmod, true);
00856
00857             groupView->SetValue(sRuntimePanel);
00858             theDialog->Show();
00859             MessageT hitMessage;
00860             while (true)
00861             {       // Let DialogHandler process events
00862                 hitMessage = theHandler.DoDialog();
00863
00864                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00865                     break;
00866             }
00867             theDialog->Hide();
00868             sRuntimePanel = groupView->GetValue();
00869
00870             if(hitMessage == msg_OK)
00871             {
00872                 multiView->SwitchToPanel(1);
00873                 DoDataExchange_TagBranchMain(theDialog, mf, sLastTag,
00874                     noRecurs, checkUnmod, false);
00875                 multiView->SwitchToPanel(2);
00876                 DoDataExchange_Globals(theDialog, false);
00877                 userHitOK = true;
00878             }
00879         }
00880         break;
00881     default:
00882         break;
00883     }
00884 #endif /* qMacCvsPP */
00885
00886     if( userHitOK )
00887     {
00888         tagName = sLastTag;
00889
00890         gCvsPrefs.save();
00891     }
00892
00893     return userHitOK;
00894 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TagDlg.h File Reference

common/TagDlg.h File Reference

#include "SmartComboBox.h"
#include "CvsCommands.h"
#include "HHelpSupport.h"

Include dependency graph for TagDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CTag_MAIN

Defines

#define | AFX_TAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

bool | CompatGetTag (const MultiFiles *mf, const kTagCmdType tagType, bool &noRecurs, bool &movDelBranch, bool &overwriteExisting, UStr &tagName, bool &checkUnmod)
Get the tag options.

Define Documentation

#define AFX_TAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file TagDlg.h.

Function Documentation

bool CompatGetTag | ( | const MultiFiles * | mf,
 |  | const kTagCmdType | tagType,
 |  | bool & | noRecurs,
 |  | bool & | movDelBranch,
 |  | bool & | overwriteExisting,
 |  | UStr & | tagName,
 |  | bool & | checkUnmod
 | ) |

Get the tag options.

Definition at line 632 of file TagDlg.cpp.

References CStr, EV_INIT_WIDGET, gCvsPrefs, kTagBranch, kTagCreate, kTagDelete, kUMainWidget, CTag_MAIN::m_checkUnmod, CTag_MAIN::m_movDelBranch, CTag_MAIN::m_noRecurs, CTag_MAIN::m_overwriteExisting, CTag_MAIN::m_tagName, CvsPrefs::save(), CGetPrefs_GLOBALS::StoreValues(), UCreate_BranchDlg(), UCreate_TagDlg(), UCreate_UntagDlg(), and UEventSendMessage().

Referenced by CvsCmdTag().

00636 {
00637     bool userHitOK = false;
00638
00639     static CStr sLastTag;
00640
00641     tagName.clear();
00642     noRecurs = false;
00643     movDelBranch = false;
00644     overwriteExisting = false;
00645     checkUnmod = false;
00646
00647 #ifdef WIN32
00648     const char* title = "Tag settings";
00649
00650     switch( tagType )
00651     {
00652     case kTagCreate:
00653         title = "Create tag settings";
00654         break;
00655     case kTagDelete:
00656         title = "Delete tag settings";
00657         break;
00658     case kTagBranch:
00659         title = "Create branch settings";
00660         break;
00661     default:
00662         break;
00663     }
00664
00665     CHHelpPropertySheet pages(title);
00666     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00667
00668     CTag_MAIN page1(mf, tagType, sLastTag, noRecurs, checkUnmod, overwriteExisting);
00669     CGetPrefs_GLOBALS page2;
00670
00671     pages.AddPage(&page1);
00672     pages.AddPage(&page2);
00673
00674     if( pages.DoModal() == IDOK )
00675     {
00676         checkUnmod = page1.m_checkUnmod == TRUE;
00677         noRecurs = page1.m_noRecurs == TRUE;
00678         movDelBranch = page1.m_movDelBranch == TRUE;
00679         sLastTag = page1.m_tagName;
00680         overwriteExisting = page1.m_overwriteExisting == TRUE;
00681
00682         page2.StoreValues();
00683         userHitOK = true;
00684     }
00685 #endif /* WIN32 */
00686 #if qUnix
00687     switch( tagType )
00688     {
00689     case kTagCreate:
00690         {
00691             void *wid = UCreate_TagDlg();
00692
00693             UCvsTagCreate *dlg = new UCvsTagCreate();
00694             UCvsTagCreate_MAIN *tab1 =
00695                 new UCvsTagCreate_MAIN(sLastTag, noRecurs, overwriteExisting, checkUnmod);
00696             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00697             dlg->AddPage(tab1, UCvsTagCreate::kTabGeneral, 0);
00698
00699             if(dlg->DoModal())
00700             {
00701                 checkUnmod = tab1->m_checkunmod;
00702                 noRecurs = tab1->m_norecurs;
00703                 sLastTag = tab1->m_tagname;
00704                 overwriteExisting = tab1->m_overwrite;
00705
00706                 userHitOK = true;
00707             }
00708
00709             delete dlg;
00710         }
00711         break;
00712     case kTagDelete:
00713         {
00714             void *wid = UCreate_UntagDlg();
00715
00716             UCvsTagDel *dlg = new UCvsTagDel();
00717             UCvsTagDel_MAIN *tab1 = new UCvsTagDel_MAIN(sLastTag, noRecurs);
00718             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00719             dlg->AddPage(tab1, UCvsTagDel::kTabGeneral, 0);
00720
00721             if(dlg->DoModal())
00722             {
00723                 noRecurs = tab1->m_norecurs;
00724                 sLastTag = tab1->m_tagname;
00725
00726                 userHitOK = true;
00727             }
00728
00729             delete dlg;
00730         }
00731         break;
00732     case kTagBranch:
00733         {
00734             void *wid = UCreate_BranchDlg();
00735
00736             UCvsTagBranch *dlg = new UCvsTagBranch();
00737             UCvsTagBranch_MAIN *tab1 = new UCvsTagBranch_MAIN(sLastTag, noRecurs, checkUnmod);
00738             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00739             dlg->AddPage(tab1, UCvsTagBranch::kTabGeneral, 0);
00740
00741             if(dlg->DoModal())
00742             {
00743                 checkUnmod = tab1->m_checkunmod;
00744                 noRecurs = tab1->m_norecurs;
00745                 sLastTag = tab1->m_tagname;
00746
00747                 userHitOK = true;
00748             }
00749
00750             delete dlg;
00751         }
00752         break;
00753     default:
00754         break;
00755     }
00756 #endif // qUnix
00757 #ifdef qMacCvsPP
00758     switch( tagType )
00759     {
00760     case kTagCreate:
00761         {
00762             StDialogHandler theHandler(dlg_TagCreate, LCommander::GetTopCommander());
00763             LWindow *theDialog = theHandler.GetDialog();
00764             ThrowIfNil_(theDialog);
00765             static UInt16 sRuntimePanel = 1;
00766
00767             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00768                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00769             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00770
00771             multiView->SwitchToPanel(2);
00772             DoDataExchange_Globals(theDialog, true);
00773             multiView->SwitchToPanel(1);
00774             DoDataExchange_TagCreateMain(theDialog, mf, sLastTag,
00775                 noRecurs, overwriteExisting, checkUnmod, true);
00776
00777             groupView->SetValue(sRuntimePanel);
00778             theDialog->Show();
00779             MessageT hitMessage;
00780             while (true)
00781             {       // Let DialogHandler process events
00782                 hitMessage = theHandler.DoDialog();
00783
00784                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00785                     break;
00786             }
00787             theDialog->Hide();
00788             sRuntimePanel = groupView->GetValue();
00789
00790             if(hitMessage == msg_OK)
00791             {
00792                 multiView->SwitchToPanel(1);
00793                 DoDataExchange_TagCreateMain(theDialog, mf, sLastTag,
00794                     noRecurs, overwriteExisting, checkUnmod, false);
00795                 multiView->SwitchToPanel(2);
00796                 DoDataExchange_Globals(theDialog, false);
00797                 userHitOK = true;
00798             }
00799         }
00800         break;
00801     case kTagDelete:
00802         {
00803             StDialogHandler theHandler(dlg_TagDelete, LCommander::GetTopCommander());
00804             LWindow *theDialog = theHandler.GetDialog();
00805             ThrowIfNil_(theDialog);
00806             static UInt16 sRuntimePanel = 1;
00807
00808             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00809                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00810             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00811
00812             multiView->SwitchToPanel(2);
00813             DoDataExchange_Globals(theDialog, true);
00814             multiView->SwitchToPanel(1);
00815             DoDataExchange_TagDeleteMain(theDialog, mf, sLastTag, noRecurs, true);
00816
00817             groupView->SetValue(sRuntimePanel);
00818             theDialog->Show();
00819             MessageT hitMessage;
00820             while (true)
00821             {       // Let DialogHandler process events
00822                 hitMessage = theHandler.DoDialog();
00823
00824                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00825                     break;
00826             }
00827             theDialog->Hide();
00828             sRuntimePanel = groupView->GetValue();
00829
00830             if(hitMessage == msg_OK)
00831             {
00832                 multiView->SwitchToPanel(1);
00833                 DoDataExchange_TagDeleteMain(theDialog, mf, sLastTag, noRecurs, false);
00834                 multiView->SwitchToPanel(2);
00835                 DoDataExchange_Globals(theDialog, false);
00836                 userHitOK = true;
00837             }
00838         }
00839         break;
00840     case kTagBranch:
00841         {
00842             StDialogHandler theHandler(dlg_TagBranch, LCommander::GetTopCommander());
00843             LWindow *theDialog = theHandler.GetDialog();
00844             ThrowIfNil_(theDialog);
00845             static UInt16 sRuntimePanel = 1;
00846
00847             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00848                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00849             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00850
00851             multiView->SwitchToPanel(2);
00852             DoDataExchange_Globals(theDialog, true);
00853             multiView->SwitchToPanel(1);
00854             DoDataExchange_TagBranchMain(theDialog, mf, sLastTag,
00855                 noRecurs, checkUnmod, true);
00856
00857             groupView->SetValue(sRuntimePanel);
00858             theDialog->Show();
00859             MessageT hitMessage;
00860             while (true)
00861             {       // Let DialogHandler process events
00862                 hitMessage = theHandler.DoDialog();
00863
00864                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00865                     break;
00866             }
00867             theDialog->Hide();
00868             sRuntimePanel = groupView->GetValue();
00869
00870             if(hitMessage == msg_OK)
00871             {
00872                 multiView->SwitchToPanel(1);
00873                 DoDataExchange_TagBranchMain(theDialog, mf, sLastTag,
00874                     noRecurs, checkUnmod, false);
00875                 multiView->SwitchToPanel(2);
00876                 DoDataExchange_Globals(theDialog, false);
00877                 userHitOK = true;
00878             }
00879         }
00880         break;
00881     default:
00882         break;
00883     }
00884 #endif /* qMacCvsPP */
00885
00886     if( userHitOK )
00887     {
00888         tagName = sLastTag;
00889
00890         gCvsPrefs.save();
00891     }
00892
00893     return userHitOK;
00894 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TclGlue.cpp File Reference

common/TclGlue.cpp File Reference

#include "stdafx.h"
#include <stdarg.h>
#include <string.h>
#include "tcl.h"
#include "TclGlue.h"
#include "AppConsole.h"
#include "AppGlue.h"
#include "CvsArgs.h"
#include "CvsEntries.h"
#include "dll_loader.h"
#include "FileTraversal.h"
#include "MacrosSetup.h"
#include "MoveToTrash.h"
#include "CvsPrefs.h"
#include "CvsCommands.h"
#include "wincvs.h"
#include "wincvsdebug.h"

Include dependency graph for TclGlue.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CTCLBrowserEnt
The tcl browser class entity. More...
class | CTCLCvsConsole
TCL console. More...
class | CFillTclEntries
class | LSReport

Defines

#define | USE_TCL 1
#define | __STDC__ 1
#define | UNDEF_STDC
#define | __STDC__ 0
#define | NEW new
#define | DECLC
#define | DEC_GLUE(f) (*f##_glue)
#define | GLUE_WRAP(f) f##_glue
#define | Tcl_CreateCommand GLUE_WRAP(Tcl_CreateCommand)
#define | Tcl_CreateInterp GLUE_WRAP(Tcl_CreateInterp)
#define | Tcl_AppendResult GLUE_WRAP(Tcl_AppendResult)
#define | Tcl_SetResult GLUE_WRAP(Tcl_SetResult)
#define | Tcl_DeleteInterp GLUE_WRAP(Tcl_DeleteInterp)
#define | Tcl_Eval GLUE_WRAP(Tcl_Eval)
#define | Tcl_EvalFile GLUE_WRAP(Tcl_EvalFile)
#define | Tcl_Alloc GLUE_WRAP(Tcl_Alloc)
#define | Tcl_Free GLUE_WRAP(Tcl_Free)
#define | Tcl_Realloc GLUE_WRAP(Tcl_Realloc)
#define | Tcl_ExprLong GLUE_WRAP(Tcl_ExprLong)
#define | Tcl_Concat GLUE_WRAP(Tcl_Concat)
#define | Tcl_SetVar2 GLUE_WRAP(Tcl_SetVar2)
#define | Tcl_DStringStartSublist GLUE_WRAP(Tcl_DStringStartSublist)
#define | Tcl_DStringEndSublist GLUE_WRAP(Tcl_DStringEndSublist)
#define | Tcl_DStringFree GLUE_WRAP(Tcl_DStringFree)
#define | Tcl_DStringInit GLUE_WRAP(Tcl_DStringInit)
#define | Tcl_DStringResult GLUE_WRAP(Tcl_DStringResult)
#define | Tcl_DStringAppendElement GLUE_WRAP(Tcl_DStringAppendElement)
#define | TclFreeObj GLUE_WRAP(TclFreeObj)
#define | Tcl_SetObjResult GLUE_WRAP(Tcl_SetObjResult)
#define | Tcl_NewStringObj GLUE_WRAP(Tcl_NewStringObj)
#define | Tcl_NewListObj GLUE_WRAP(Tcl_NewListObj)
#define | Tcl_ListObjAppendElement GLUE_WRAP(Tcl_ListObjAppendElement)
#define | Tcl_SourceRCFile GLUE_WRAP(Tcl_SourceRCFile)
#define | Tcl_Init GLUE_WRAP(Tcl_Init)
#define | Tcl_SetVar GLUE_WRAP(Tcl_SetVar)
#define | Tcl_FindExecutable GLUE_WRAP(Tcl_FindExecutable)
#define | _TCL_CALLBACK(f) f
#define | LOAD_CODEFRAG(name)

Functions

Tcl_Command Tcl_CreateCommand_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc))
Tcl_Interp *Tcl_CreateInterp_glue | _ANSI_ARGS_ ((void))
void Tcl_AppendResult_glue | _ANSI_ARGS_ (TCL_VARARGS(Tcl_Interp *, interp))
void Tcl_SetResult_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, char *string, Tcl_FreeProc *freeProc))
void Tcl_DeleteInterp_glue | _ANSI_ARGS_ ((Tcl_Interp *interp))
int Tcl_Eval_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, char *string))
int Tcl_EvalFile_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, char *fileName))
char *Tcl_Alloc_glue | _ANSI_ARGS_ ((unsigned int size))
void Tcl_Free_glue | _ANSI_ARGS_ ((char *ptr))
char *Tcl_Realloc_glue | _ANSI_ARGS_ ((char *ptr, unsigned int size))
int Tcl_ExprLong_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, char *string, long *ptr))
char *Tcl_Concat_glue | _ANSI_ARGS_ ((int argc, char *const *argv))
char *Tcl_SetVar2_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags))
void Tcl_DStringStartSublist_glue | _ANSI_ARGS_ ((Tcl_DString *dsPtr))
void Tcl_DStringResult_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, Tcl_DString *dsPtr))
char *Tcl_DStringAppendElement_glue | _ANSI_ARGS_ ((Tcl_DString *dsPtr, CONST char *string))
void TclFreeObj_glue | _ANSI_ARGS_ ((Tcl_Obj *objPtr))
void Tcl_SetObjResult_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, Tcl_Obj *resultObjPtr))
Tcl_Obj *Tcl_NewStringObj_glue | _ANSI_ARGS_ ((CONST char *bytes, int length))
Tcl_Obj *Tcl_NewListObj_glue | _ANSI_ARGS_ ((int objc, Tcl_Obj *CONST objv[]))
int Tcl_ListObjAppendElement_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *objPtr))
char *Tcl_SetVar_glue | _ANSI_ARGS_ ((Tcl_Interp *interp, const char *varName, const char *newValue, int flags))
void Tcl_FindExecutable_glue | _ANSI_ARGS_ ((CONST char *argv0))
int | tclCvsProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int | tclHelpProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int | tclCvsOutProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int | tclCvsErrProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int | tclCvsBrowserProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int | tclCvsEntriesProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
void | tclCvsEntriesDeleteProc (ClientData clientData)
int | tclDirProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int | tclCvsExitOnErrorProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int | tclCvsLastErrorCodeProc (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int | tclSafeRemove (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
void | TclBrowserReset (void)
void | TclBrowserAppend (const char *, EntnodeData *data)
Tcl_Interp * | myTcl_CreateInterp (void)

Variables

std::vector< CTCLBrowserEnt > | sTclBrowser

Define Documentation

#define __STDC__ 0

Definition at line 65 of file TclGlue.cpp.

#define __STDC__ 1

Definition at line 65 of file TclGlue.cpp.

#define _TCL_CALLBACK ( f ) f

Definition at line 205 of file TclGlue.cpp.

Referenced by CTcl_Interp::CTcl_Interp(), and tclCvsEntriesProc().

#define DEC_GLUE ( f ) (*f##_glue)

Definition at line 115 of file TclGlue.cpp.

#define DECLC

Definition at line 109 of file TclGlue.cpp.

Referenced by tclCvsBrowserProc(), tclCvsEntriesDeleteProc(), tclCvsEntriesProc(), tclCvsErrProc(), tclCvsExitOnErrorProc(), tclCvsLastErrorCodeProc(), tclCvsOutProc(), tclCvsProc(), tclDirProc(), tclHelpProc(), and tclSafeRemove().

#define GLUE_WRAP ( f ) f##_glue

Definition at line 162 of file TclGlue.cpp.

#define LOAD_CODEFRAG ( name )

Value:

if( tclAvail ) \
            tclAvail = (*(void**)&name##_glue = \
                _CompatCallLibrary(connID, #name)) != 0L

#define NEW new

Definition at line 103 of file TclGlue.cpp.

#define Tcl_Alloc GLUE_WRAP(Tcl_Alloc)

Definition at line 170 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_AppendResult GLUE_WRAP(Tcl_AppendResult)

Definition at line 165 of file TclGlue.cpp.

Referenced by CTCLCvsConsole::cvs_out(), CTcl_Interp::IsAvail(), LSReport::OnAnyDevice(), LSReport::OnError(), tclCvsBrowserProc(), tclCvsEntriesProc(), tclCvsExitOnErrorProc(), tclCvsLastErrorCodeProc(), tclHelpProc(), and tclSafeRemove().

#define Tcl_Concat GLUE_WRAP(Tcl_Concat)

Definition at line 174 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), tclCvsBrowserProc(), and tclCvsExitOnErrorProc().

#define Tcl_CreateCommand GLUE_WRAP(Tcl_CreateCommand)

Definition at line 163 of file TclGlue.cpp.

Referenced by CTcl_Interp::CTcl_Interp(), CTcl_Interp::IsAvail(), and tclCvsEntriesProc().

#define Tcl_CreateInterp GLUE_WRAP(Tcl_CreateInterp)

Definition at line 164 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), and myTcl_CreateInterp().

#define Tcl_DeleteInterp GLUE_WRAP(Tcl_DeleteInterp)

Definition at line 167 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), and CTcl_Interp::~CTcl_Interp().

#define Tcl_DStringAppendElement GLUE_WRAP(Tcl_DStringAppendElement)

Definition at line 181 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_DStringEndSublist GLUE_WRAP(Tcl_DStringEndSublist)

Definition at line 177 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_DStringFree GLUE_WRAP(Tcl_DStringFree)

Definition at line 178 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_DStringInit GLUE_WRAP(Tcl_DStringInit)

Definition at line 179 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_DStringResult GLUE_WRAP(Tcl_DStringResult)

Definition at line 180 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_DStringStartSublist GLUE_WRAP(Tcl_DStringStartSublist)

Definition at line 176 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_Eval GLUE_WRAP(Tcl_Eval)

Definition at line 168 of file TclGlue.cpp.

Referenced by CTcl_Interp::DoScript(), and CTcl_Interp::IsAvail().

#define Tcl_EvalFile GLUE_WRAP(Tcl_EvalFile)

Definition at line 169 of file TclGlue.cpp.

Referenced by CTcl_Interp::DoFile(), and CTcl_Interp::IsAvail().

#define Tcl_ExprLong GLUE_WRAP(Tcl_ExprLong)

Definition at line 173 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_FindExecutable GLUE_WRAP(Tcl_FindExecutable)

Definition at line 190 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), and myTcl_CreateInterp().

#define Tcl_Free GLUE_WRAP(Tcl_Free)

Definition at line 171 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), tclCvsBrowserProc(), and tclCvsExitOnErrorProc().

#define Tcl_Init GLUE_WRAP(Tcl_Init)

Definition at line 188 of file TclGlue.cpp.

Referenced by CTcl_Interp::CTcl_Interp(), and CTcl_Interp::IsAvail().

#define Tcl_ListObjAppendElement GLUE_WRAP(Tcl_ListObjAppendElement)

Definition at line 186 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), and tclCvsBrowserProc().

#define Tcl_NewListObj GLUE_WRAP(Tcl_NewListObj)

Definition at line 185 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), and tclCvsBrowserProc().

#define Tcl_NewStringObj GLUE_WRAP(Tcl_NewStringObj)

Definition at line 184 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), and tclCvsBrowserProc().

#define Tcl_Realloc GLUE_WRAP(Tcl_Realloc)

Definition at line 172 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_SetObjResult GLUE_WRAP(Tcl_SetObjResult)

Definition at line 183 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), and tclCvsBrowserProc().

#define Tcl_SetResult GLUE_WRAP(Tcl_SetResult)

Definition at line 166 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define Tcl_SetVar GLUE_WRAP(Tcl_SetVar)

Definition at line 189 of file TclGlue.cpp.

Referenced by CTcl_Interp::CTcl_Interp(), and CTcl_Interp::IsAvail().

#define Tcl_SetVar2 GLUE_WRAP(Tcl_SetVar2)

Definition at line 175 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail(), and tclCvsBrowserProc().

#define Tcl_SourceRCFile GLUE_WRAP(Tcl_SourceRCFile)

Definition at line 187 of file TclGlue.cpp.

Referenced by CTcl_Interp::CTcl_Interp(), and CTcl_Interp::IsAvail().

#define TclFreeObj GLUE_WRAP(TclFreeObj)

Definition at line 182 of file TclGlue.cpp.

Referenced by CTcl_Interp::IsAvail().

#define UNDEF_STDC

Definition at line 52 of file TclGlue.cpp.

#define USE_TCL 1

Definition at line 35 of file TclGlue.cpp.

Function Documentation

void Tcl_FindExecutable_glue _ANSI_ARGS_ ( (CONST char *argv0) )

char* Tcl_SetVar_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, const char *varName, const char *newValue, int flags) )

int Tcl_ListObjAppendElement_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *objPtr) )

Tcl_Obj* Tcl_NewListObj_glue _ANSI_ARGS_ ( (int objc, Tcl_Obj *CONST objv[]) )

Tcl_Obj* Tcl_NewStringObj_glue _ANSI_ARGS_ ( (CONST char *bytes, int length) )

void Tcl_SetObjResult_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, Tcl_Obj *resultObjPtr) )

void TclFreeObj_glue _ANSI_ARGS_ ( (Tcl_Obj *objPtr) )

char* Tcl_DStringAppendElement_glue _ANSI_ARGS_ ( (Tcl_DString *dsPtr, CONST char *string) )

void Tcl_DStringResult_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, Tcl_DString *dsPtr) )

void Tcl_DStringInit_glue _ANSI_ARGS_ ( (Tcl_DString *dsPtr) )

char* Tcl_SetVar2_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags) )

char* Tcl_Concat_glue _ANSI_ARGS_ ( (int argc, char *const *argv) )

int Tcl_ExprLong_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, char *string, long *ptr) )

char* Tcl_Realloc_glue _ANSI_ARGS_ ( (char *ptr, unsigned int size) )

void Tcl_Free_glue _ANSI_ARGS_ ( (char *ptr) )

char* Tcl_Alloc_glue _ANSI_ARGS_ ( (unsigned int size) )

int Tcl_EvalFile_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, char *fileName) )

int Tcl_Eval_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, char *string) )

int Tcl_Init_glue _ANSI_ARGS_ ( (Tcl_Interp *interp) )

void Tcl_SetResult_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, char *string, Tcl_FreeProc *freeProc) )

void Tcl_AppendResult_glue _ANSI_ARGS_ ( TCL_VARARGS(Tcl_Interp *, interp) )

Tcl_Interp* Tcl_CreateInterp_glue _ANSI_ARGS_ ( (void) )

Tcl_Command Tcl_CreateCommand_glue _ANSI_ARGS_ ( (Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc) )

Tcl_Interp* myTcl_CreateInterp ( void ) [static]

Definition at line 953 of file TclGlue.cpp.

References CStr, CWincvsApp::GetAppModule(), NULL, Tcl_CreateInterp, and Tcl_FindExecutable.

Referenced by CTcl_Interp::CTcl_Interp(), and CTcl_Interp::IsAvail().

00954 {
00955 #if USE_TCL
00956 #   ifdef WIN32
00957     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00958     CStr path;
00959     app->GetAppModule(path);
00960     Tcl_FindExecutable(path);
00961 #   endif
00962 #endif
00963
00964 #   ifdef qMacCvsPP
00965     CStr appPath = CMacCvsApp::GetAppPath();
00966     Tcl_FindExecutable(appPath);
00967 #   endif
00968
00969 #   if USE_TCL
00970     Tcl_Interp* res = Tcl_CreateInterp();
00971     return res;
00972 #   else
00973     return NULL;
00974 #   endif
00975 }

Here is the call graph for this function:

void TclBrowserAppend | ( | const char * | ,
 |  | EntnodeData * | data
 | ) |

Browser filler

Note:
although 'path' is not used here any longer, it makes sense to retain that attribute since it gives you an option to figure out relative filename, relative to 'path' that designates the folder in which the operation takes place
Definition at line 946 of file TclGlue.cpp.

References sTclBrowser.

Referenced by cvsgui_LaunchTclMacro(), UCvsFolders::OnCmdMacrosSel(), and UCvsFiles::OnMacroSel().

00947 {
00948 #if USE_TCL
00949     sTclBrowser.push_back(CTCLBrowserEnt(data));
00950 #endif
00951 }

void TclBrowserReset ( void )

Browser reset Definition at line 933 of file TclGlue.cpp.

References sTclBrowser.

Referenced by cvsgui_LaunchTclMacro(), UCvsFolders::OnCmdMacrosSel(), and UCvsFiles::OnMacroSel().

00934 {
00935 #if USE_TCL
00936     sTclBrowser.erase(sTclBrowser.begin(), sTclBrowser.end());
00937 #endif
00938 }

int tclCvsBrowserProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 400 of file TclGlue.cpp.

References CStr, DECLC, ENT_FILE, EntnodeData::GetType(), sTclBrowser, Tcl_AppendResult, Tcl_Concat, TCL_ERROR, Tcl_Free, Tcl_ListObjAppendElement, Tcl_NewListObj, Tcl_NewStringObj, TCL_OK, Tcl_SetObjResult, Tcl_SetVar2, and CTcl_Interp::Unixfy().

Referenced by CTcl_Interp::CTcl_Interp(), and tclCvsEntriesProc().

00401 {
00402     if( argc < 2 )
00403     {
00404         Tcl_AppendResult(interp, argv[0], " : Missing arguments\n", 0L);
00405         return TCL_ERROR;
00406     }
00407
00408     std::vector<CTCLBrowserEnt> & browser = clientData != 0L ?
00409         *(std::vector<CTCLBrowserEnt>*)clientData : sTclBrowser;
00410
00411     if( strcmp(argv[1], "get") == 0 )
00412     {
00413         if( argc != 2 )
00414         {
00415             char* str = Tcl_Concat(argc, argv);
00416             Tcl_AppendResult(interp, argv[0], " : Too many arguments : '", str, "'\n", 0L);
00417             Tcl_Free(str);
00418
00419             return TCL_ERROR;
00420         }
00421
00422         Tcl_Obj* list = Tcl_NewListObj(0, 0L);
00423         std::vector<CTCLBrowserEnt>::const_iterator i;
00424         for(i = browser.begin(); i != browser.end(); ++i)
00425         {
00426             const std::vector<CTCLBrowserEnt>::const_iterator entry = i;
00427
00428             CStr path;
00429             entry->GetData()->GetFullPathName(path);
00430             CTcl_Interp::Unixfy(path);
00431
00432             Tcl_Obj* obj = Tcl_NewStringObj(path, path.length());
00433             Tcl_ListObjAppendElement(interp, list, obj);
00434             //TclFreeObj(obj);
00435         }
00436
00437         Tcl_SetObjResult(interp, list);
00438         //TclFreeObj(list);
00439     }
00440     else if(strcmp(argv[1], "info") == 0)
00441     {
00442         if( argc != 4 )
00443         {
00444             char* str = Tcl_Concat(argc, argv);
00445             Tcl_AppendResult(interp, argv[0], " : Too many arguments : '", str, "'\n", 0L);
00446             Tcl_Free(str);
00447             return TCL_ERROR;
00448         }
00449
00450         std::vector<CTCLBrowserEnt>::const_iterator i;
00451         for(i = browser.begin(); i != browser.end(); ++i)
00452         {
00453             const std::vector<CTCLBrowserEnt>::const_iterator entry = i;
00454             if( entry->IsSamePath(argv[2]) )
00455             {
00456                 EntnodeData* data = entry->GetData();
00457                 CStr path, fname, value;
00458                 entry->GetNormalized(path, fname);
00459
00460                 const char* res = Tcl_SetVar2(interp, argv[3], "name", fname, 0);
00461                 if( res == 0L )
00462                     goto err1;
00463
00464                 value = data->GetType() == ENT_FILE ? "file" : "folder";
00465                 res = Tcl_SetVar2(interp, argv[3], "kind", value, 0);
00466                 if( res == 0L )
00467                     goto err1;
00468
00469                 res = Tcl_SetVar2(interp, argv[3], "path", path, 0);
00470                 if( res == 0L )
00471                     goto err1;
00472
00473                 value = (*data)[EntnodeData::kState];
00474                 res = Tcl_SetVar2(interp, argv[3], "state", value, 0);
00475                 if( res == 0L )
00476                     goto err1;
00477
00478                 value = data->IsMissing() ? "1" : "0";
00479                 res = Tcl_SetVar2(interp, argv[3], "missing", value, 0);
00480                 if( res == 0L )
00481                     goto err1;
00482
00483                 value = data->IsUnknown() ? "1" : "0";
00484                 res = Tcl_SetVar2(interp, argv[3], "unknown", value, 0);
00485                 if( res == 0L )
00486                     goto err1;
00487
00488                 value = data->IsIgnored() ? "1" : "0";
00489                 res = Tcl_SetVar2(interp, argv[3], "ignored", value, 0);
00490                 if( res == 0L )
00491                     goto err1;
00492
00493                 value = data->IsLocked() ? "1" : "0";
00494                 res = Tcl_SetVar2(interp, argv[3], "locked", value, 0);
00495                 if( res == 0L )
00496                     goto err1;
00497
00498                 value = data->IsUnmodified() ? "0" : "1";
00499                 res = Tcl_SetVar2(interp, argv[3], "modified", value, 0);
00500                 if( res == 0L )
00501                     goto err1;
00502
00503                 value = data->GetState();
00504                 res = Tcl_SetVar2(interp, argv[3], "state", value, 0);
00505                 if( res == 0L )
00506                     goto err1;
00507
00508                 if( data->GetType() == ENT_FILE )
00509                 {
00510                     value = (*data)[EntnodeFile::kVN];
00511                     res = Tcl_SetVar2(interp, argv[3], "revision", value, 0);
00512                     if( res == 0L )
00513                         goto err1;
00514
00515                     value = (*data)[EntnodeFile::kTS];
00516                     res = Tcl_SetVar2(interp, argv[3], "timestamp", value, 0);
00517                     if( res == 0L )
00518                         goto err1;
00519
00520                     value = (*data)[EntnodeFile::kOption];
00521                     res = Tcl_SetVar2(interp, argv[3], "option", value, 0);
00522                     if( res == 0L )
00523                         goto err1;
00524
00525                     value = (*data)[EntnodeFile::kEncoding];
00526                     res = Tcl_SetVar2(interp, argv[3], "encoding", value, 0);
00527                     if( res == 0L )
00528                         goto err1;
00529
00530                     value = (*data)[EntnodeFile::kTag];
00531                     res = Tcl_SetVar2(interp, argv[3], "tag", value, 0);
00532                     if( res == 0L )
00533                         goto err1;
00534
00535                     value = (*data)[EntnodeFile::kConflict];
00536                     res = Tcl_SetVar2(interp, argv[3], "conflict", value, 0);
00537                     if( res == 0L )
00538                         goto err1;
00539                 }
00540
00541                 goto ok1;
00542 err1:
00543                 Tcl_AppendResult(interp, argv[0], " : Error while creating '", argv[3], "'\n", 0L);
00544                 return TCL_ERROR;
00545 ok1:
00546                 break;
00547             }
00548         }
00549     }
00550     else
00551     {
00552         char* str = Tcl_Concat(argc, argv);
00553         Tcl_AppendResult(interp, argv[0], " : Wrong arguments : '", str, "'\n", 0L);
00554         Tcl_Free(str);
00555
00556         return TCL_ERROR;
00557     }
00558
00559     return TCL_OK;
00560 }

Here is the call graph for this function:

void tclCvsEntriesDeleteProc ( ClientData clientData ) [static]

Definition at line 633 of file TclGlue.cpp.

References DECLC.

Referenced by tclCvsEntriesProc().

00634 {
00635     if( clientData != 0L )
00636         delete (std::vector<CTCLBrowserEnt>*)clientData;
00637 }

int tclCvsEntriesProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 639 of file TclGlue.cpp.

References _TCL_CALLBACK, CStr, ENTNODE::Data(), DECLC, CTcl_Interp::Deunixfy(), Entries_SetMissing(), FileTraverse(), CSortList< T >::Get(), NEW, CSortList< T >::NumOfElements(), Tcl_AppendResult, Tcl_CreateCommand, TCL_ERROR, TCL_OK, tclCvsBrowserProc(), and tclCvsEntriesDeleteProc().

Referenced by CTcl_Interp::CTcl_Interp().

00640 {
00641     if( argc != 3 )
00642     {
00643         Tcl_AppendResult(interp, argv[0], " : Wrong # of arguments\n", 0L);
00644         return TCL_ERROR;
00645     }
00646
00647     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00648
00649     // Refetch all items
00650     CFillTclEntries traverse(entries);
00651     CStr path(argv[1]);
00652     CTcl_Interp::Deunixfy(path);
00653     /*kTraversal res = */FileTraverse(path, traverse);
00654
00655     // add the missing files
00656     Entries_SetMissing(entries);
00657
00658     // now make the TCL entries
00659     std::vector<CTCLBrowserEnt>* browser = NEW std::vector<CTCLBrowserEnt>;
00660
00661     int numEntries = entries.NumOfElements();
00662     for(int i = 0; i < numEntries; i++)
00663     {
00664         const ENTNODE& theNode = entries.Get(i);
00665         EntnodeData* data = theNode.Data();
00666         browser->push_back(CTCLBrowserEnt(data));
00667     }
00668
00669     Tcl_Command cmd = Tcl_CreateCommand (interp, argv[2], _TCL_CALLBACK(tclCvsBrowserProc),
00670         (ClientData)browser, tclCvsEntriesDeleteProc);
00671
00672     return cmd != 0L ? TCL_OK : TCL_ERROR;
00673 }

Here is the call graph for this function:

int tclCvsErrProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 390 of file TclGlue.cpp.

References cvs_errstr(), DECLC, and TCL_OK.

Referenced by CTcl_Interp::CTcl_Interp().

00391 {
00392     for(int i = 1; i < argc; i++)
00393     {
00394         cvs_errstr(argv[i], strlen(argv[i]));
00395     }
00396
00397     return TCL_OK;
00398 }

Here is the call graph for this function:

int tclCvsExitOnErrorProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 748 of file TclGlue.cpp.

References DECLC, CTcl_Interp::SetCvsExitOnError(), Tcl_AppendResult, Tcl_Concat, TCL_ERROR, Tcl_Free, and TCL_OK.

Referenced by CTcl_Interp::CTcl_Interp().

00749 {
00750     CTcl_Interp* tcl_interp = (CTcl_Interp*)clientData;
00751
00752     //
00753     // CvsExitOnError command can be used to define whether TCL macro
00754     // is automatically terminated if CVS command returned error (non zero).
00755     //
00756     // CvsExitOnError has following modes:
00757     //   false  = Do not exit automatically. CvsLastErrorCode contains the last error code.
00758     //   true   = Exit TCL script in error (default).
00759     //
00760     if( argc < 2 )
00761     {
00762         Tcl_AppendResult(interp, argv[0], " : Missing argument (true|false)\n", 0L);
00763         return TCL_ERROR;
00764     }
00765
00766     if( strcmp(argv[1], "true") == 0 )
00767         tcl_interp->SetCvsExitOnError(true);
00768     else if( strcmp(argv[1], "false") == 0 )
00769         tcl_interp->SetCvsExitOnError(false);
00770     else
00771     {
00772         char* str = Tcl_Concat(argc, argv);
00773         Tcl_AppendResult(interp, argv[0], " : Wrong argument : '", str, "'\n", 0L);
00774         Tcl_Free(str);
00775
00776         return TCL_ERROR;
00777     }
00778
00779     return TCL_OK;
00780 }

Here is the call graph for this function:

int tclCvsLastErrorCodeProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 782 of file TclGlue.cpp.

References DECLC, CTcl_Interp::GetCvsLastErrorCode(), CTcl_Interp::SetCvsLastErrorCode(), Tcl_AppendResult, and TCL_OK.

Referenced by CTcl_Interp::CTcl_Interp().

00783 {
00784     CTcl_Interp* tcl_interp = (CTcl_Interp*)clientData;
00785
00786     if( argc < 2 )
00787     {
00788         char value[35];
00789
00790         // CvsLastErrorCode called without arguments, so return current value
00791         sprintf(value, "%d", tcl_interp->GetCvsLastErrorCode());
00792         Tcl_AppendResult(interp, value, 0L);
00793     }
00794     else
00795     {
00796         // Set the value of LastErrorCode variable
00797         tcl_interp->SetCvsLastErrorCode(atoi(argv[1]));
00798     }
00799
00800     return TCL_OK;
00801 }

Here is the call graph for this function:

int tclCvsOutProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 380 of file TclGlue.cpp.

References cvs_outstr(), DECLC, and TCL_OK.

Referenced by CTcl_Interp::CTcl_Interp().

00381 {
00382     for(int i = 1; i < argc; i++)
00383     {
00384         cvs_outstr(argv[i], strlen(argv[i]));
00385     }
00386
00387     return TCL_OK;
00388 }

Here is the call graph for this function:

int tclCvsProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 335 of file TclGlue.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), DECLC, CTcl_Interp::GetCvsExitOnError(), launchCVS(), CTcl_Interp::SetCvsLastErrorCode(), TCL_ERROR, and TCL_OK.

Referenced by CTcl_Interp::CTcl_Interp().

00336 {
00337     CTcl_Interp* tcl_interp = (CTcl_Interp*) clientData;
00338     CvsArgs args;
00339
00340     for(int i = 1; i < argc; i++)
00341     {
00342         args.add(argv[i]);
00343     }
00344
00345     CTCLCvsConsole console(interp);
00346     int exitc = launchCVS(0L, args.Argc(), args.Argv(), &console);
00347
00348     //
00349     // Set CvsLastErrorCode value. TCL script can query
00350     // this value using cvslasterrorcode command
00351     //
00352     tcl_interp->SetCvsLastErrorCode(exitc);
00353
00354     //
00355     // If command succeeded then return always TCL_OK and
00356     // proceed with script. If command failed (exitc != 0)
00357     // then exit only if CvsExitOnError is TRUE.
00358     //
00359     if( exitc == 0 )
00360         return TCL_OK;
00361     else
00362         return tcl_interp->GetCvsExitOnError() ? TCL_ERROR : TCL_OK;
00363 }

Here is the call graph for this function:

int tclDirProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 716 of file TclGlue.cpp.

References DECLC, FileTraverse(), LSReport::fState, and kTraversal.

Referenced by CTcl_Interp::CTcl_Interp().

00717 {
00718     LSReport report(interp);
00719     char path[256];
00720     getcwd(path, 256);
00721     kTraversal res = FileTraverse(path, report);
00722     return report.fState;
00723 }

Here is the call graph for this function:

int tclHelpProc | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 365 of file TclGlue.cpp.

References DECLC, Tcl_AppendResult, and TCL_OK.

Referenced by CTcl_Interp::CTcl_Interp().

00366 {
00367     Tcl_AppendResult(interp, "Help :\n", 0L);
00368     Tcl_AppendResult(interp, "   cvs  : the cvs tool.\n", 0L);
00369     Tcl_AppendResult(interp, "   help : this help.\n", 0L);
00370     Tcl_AppendResult(interp, "Others commands :\n", 0L);
00371     Tcl_AppendResult(interp, "   cd   : change directory\n", 0L);
00372     Tcl_AppendResult(interp, "   pwd  : print current directory\n", 0L);
00373     Tcl_AppendResult(interp, "   ls   : list the current directory\n", 0L);
00374     Tcl_AppendResult(interp, "   info ?  : misc. informations\n", 0L);
00375     Tcl_AppendResult(interp, "   info commands : all the TCL commands\n", 0L);
00376
00377     return TCL_OK;
00378 }

int tclSafeRemove | ( | ClientData | clientData,
 |  | Tcl_Interp * | interp,
 |  | int | argc,
 |  | char * | argv[]
 | ) | [static]

Definition at line 726 of file TclGlue.cpp.

References CompatMoveToTrash(), CStr, cvs_err(), DECLC, CTcl_Interp::Deunixfy(), Tcl_AppendResult, TCL_ERROR, and TCL_OK.

Referenced by CTcl_Interp::CTcl_Interp().

00727 {
00728     if( argc < 2 )
00729     {
00730         Tcl_AppendResult(interp, argv[0], " : Missing list of files\n", 0L);
00731         return TCL_ERROR;
00732     }
00733
00734     for(int i = 1; i < argc; i++)
00735     {
00736         CStr fn(argv[i]);
00737         CTcl_Interp::Deunixfy(fn);
00738
00739         if( !CompatMoveToTrash(fn, 0) )  // dir is not needed, TCL profides fully qualified file name
00740         {
00741             cvs_err("Unable to trash '%s'\n", (const char *)fn);
00742         }
00743     }
00744
00745     return TCL_OK;
00746 }

Here is the call graph for this function:

Variable Documentation

std::vector<CTCLBrowserEnt> sTclBrowser [static]

Definition at line 286 of file TclGlue.cpp.

Referenced by TclBrowserAppend(), TclBrowserReset(), and tclCvsBrowserProc().

Generated on Sat Aug 7 22:46:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TclGlue.h File Reference

common/TclGlue.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CTcl_Interp
TCL interpreter wrapper. More...

Defines

#define | TCL_OK 0
#define | TCL_ERROR 1
#define | TCL_RETURN 2
#define | TCL_BREAK 3
#define | TCL_CONTINUE 4
#define | kTCLPathDelimiter '/'

Typedefs

typedef int | kTclRes

Functions

void | TclBrowserReset (void)
void | TclBrowserAppend (const char *path, EntnodeData *data)

Define Documentation

#define kTCLPathDelimiter '/'

Definition at line 41 of file TclGlue.h.

Referenced by CTcl_Interp::Deunixfy(), and CTcl_Interp::Unixfy().

#define TCL_BREAK 3

Definition at line 35 of file TclGlue.h.

#define TCL_CONTINUE 4

Definition at line 36 of file TclGlue.h.

#define TCL_ERROR 1

Definition at line 33 of file TclGlue.h.

Referenced by CTcl_Interp::DoFile(), CTcl_Interp::DoScript(), LSReport::OnError(), tclCvsBrowserProc(), tclCvsEntriesProc(), tclCvsExitOnErrorProc(), tclCvsProc(), and tclSafeRemove().

#define TCL_OK 0

Definition at line 32 of file TclGlue.h.

Referenced by LSReport::LSReport(), tclCvsBrowserProc(), tclCvsEntriesProc(), tclCvsErrProc(), tclCvsExitOnErrorProc(), tclCvsLastErrorCodeProc(), tclCvsOutProc(), tclCvsProc(), tclHelpProc(), and tclSafeRemove().

#define TCL_RETURN 2

Definition at line 34 of file TclGlue.h.

Typedef Documentation

typedef int kTclRes

Definition at line 39 of file TclGlue.h.

Referenced by CTcl_Interp::DoFile(), CTcl_Interp::DoScript(), and CTcl_Interp::DoScriptVar().

Function Documentation

void TclBrowserAppend | ( | const char * | ,
 |  | EntnodeData * | data
 | ) |

Browser filler

Note:
although 'path' is not used here any longer, it makes sense to retain that attribute since it gives you an option to figure out relative filename, relative to 'path' that designates the folder in which the operation takes place
Definition at line 946 of file TclGlue.cpp.

References sTclBrowser.

Referenced by cvsgui_LaunchTclMacro(), UCvsFolders::OnCmdMacrosSel(), and UCvsFiles::OnMacroSel().

00947 {
00948 #if USE_TCL
00949     sTclBrowser.push_back(CTCLBrowserEnt(data));
00950 #endif
00951 }

void TclBrowserReset ( void )

Browser reset Definition at line 933 of file TclGlue.cpp.

References sTclBrowser.

Referenced by cvsgui_LaunchTclMacro(), UCvsFolders::OnCmdMacrosSel(), and UCvsFiles::OnMacroSel().

00934 {
00935 #if USE_TCL
00936     sTclBrowser.erase(sTclBrowser.begin(), sTclBrowser.end());
00937 #endif
00938 }

Generated on Sat Aug 7 22:46:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TclGlue.mac.cpp File Reference

common/TclGlue.mac.cpp File Reference

#include "stdafx.h"

Include dependency graph for TclGlue.mac.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TclGlue.mac.h File Reference

common/TclGlue.mac.h File Reference

#include "dll_loader.h"

Include dependency graph for TclGlue.mac.h:

Include dependency graph

Go to the source code of this file.

Functions

int | CarbonCompatLoadLibrary (CompatConnectID *connID, const char *name_dll)
int | CarbonCompatCloseLibrary (CompatConnectID *connID)
void * | _CarbonCompatCallLibrary (CompatConnectID connID, const char *name_func)
void * | _tcl_cfm_macho (void *func)

Function Documentation

void* _CarbonCompatCallLibrary | ( | CompatConnectID | connID,
 |  | const char * | name_func
 | ) |

void* _tcl_cfm_macho ( void * func )

int CarbonCompatCloseLibrary ( CompatConnectID * connID )

int CarbonCompatLoadLibrary | ( | CompatConnectID * | connID,
 |  | const char * | name_dll
 | ) |

Generated on Sat Aug 7 22:46:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TemplateDlg.cpp File Reference

common/TemplateDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "wincvs_winutil.h"
#include "TemplateDlg.h"
#include "MultiFiles.h"
#include "CvsAlert.h"

Include dependency graph for TemplateDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool CompatGetCvsTemplate (const MultiFiles *mf, UStr &templateText)

Function Documentation

bool CompatGetCvsTemplate | ( | const MultiFiles * | mf,
 |  | UStr & | templateText
 | ) |

Get the CVS template file contents

Parameters:
mf Browser selection
templateText
Definition at line 279 of file TemplateDlg.cpp.

References CTemplateDlg::GetTemplateText().

00280 {
00281     bool userHitOK = false;
00282
00283 #ifdef WIN32
00284     CTemplateDlg templateDlg(mf);
00285
00286     if( templateDlg.DoModal() == IDOK )
00287     {
00288         templateText = templateDlg.GetTemplateText();
00289
00290         userHitOK = true;
00291     }
00292 #endif /* WIN32 */
00293
00294 #ifdef qMacCvsPP
00295 #endif /* qMacCvsPP */
00296
00297 #if qUnix
00298 #endif // qUnix
00299
00300     return userHitOK;
00301 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TemplateDlg.h File Reference

common/TemplateDlg.h File Reference

#include "HHelpSupport.h"

Include dependency graph for TemplateDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CTemplateDlg

Defines

#define | AFX_TEMPLATEDLG_H__FB71138C_D374_42EE_88E8_59890D6DEDE2__INCLUDED_

Functions

bool | CompatGetCvsTemplate (const MultiFiles *mf, CStr &templateText)

Define Documentation

#define AFX_TEMPLATEDLG_H__FB71138C_D374_42EE_88E8_59890D6DEDE2__INCLUDED_

Definition at line 26 of file TemplateDlg.h.

Function Documentation

bool CompatGetCvsTemplate | ( | const MultiFiles * | mf,
 |  | CStr & | templateText
 | ) |

Referenced by CMultilineEntryDlg::ActionOpenTemplate().

Generated on Sat Aug 7 22:46:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TextBinary.cpp File Reference

common/TextBinary.cpp File Reference

#include "stdafx.h"
#include <sys/stat.h>
#include <direct.h>
#include <io.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "TextBinary.h"
#include "FileTraversal.h"
#include "AppConsole.h"
#include "CPStr.h"
#include "CvsPrefs.h"

Include dependency graph for TextBinary.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | MAX_TEST_SIZE 100000

Functions

kTextBinTYPE | FillBuffer (const char *arg, const char *dir, const FSSpec *spec, bool bin)
kTextBinTYPE | TestBuffer (const char *arg, const char *dir, const FSSpec *spec, kFileType expectType)
kTextBinTYPE | TestValidName (const char *filename)
kTextBinTYPE | TestFileIsAlias (const char *arg, const char *dir, const FSSpec *spec)
kTextBinTYPE | FileIsText (const char *arg, const char *dir, const FSSpec *spec)
kTextBinTYPE | FileIsBinary (const char *arg, const char *dir, const FSSpec *spec)
kTextBinTYPE | FileIsUnicode (const char *arg, const char *dir, const FSSpec *spec)

Variables

CStaticAllocT< char > | sBuf
int sBufSize

Define Documentation

#define MAX_TEST_SIZE 100000

Definition at line 64 of file TextBinary.cpp.

Referenced by FillBuffer().

Function Documentation

kTextBinTYPE FileIsBinary | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec
 | ) |

Definition at line 331 of file TextBinary.cpp.

References FillBuffer(), kBinIsText, kFileIsOK, kFileTypeBin, kTextBinTYPE, TestBuffer(), TestFileIsAlias(), and TestValidName().

Referenced by AddBinCvsArgs::FileIsType(), and ImportReport::OnFile().

00332 {
00333     kTextBinTYPE state;
00334
00335     state = FillBuffer(arg, dir, spec, true);
00336     if(state != kFileIsOK)
00337         return state;
00338
00339     state = TestBuffer(arg, dir, spec, kFileTypeBin);
00340
00341 #ifdef TARGET_OS_MAC
00342     kTextBinTYPE sigstate = GetMacSig(arg, dir, spec, true);
00343     if(sigstate != kFileIsOK)
00344         return state;
00345     if(state != kFileIsOK && state != kBinIsText)
00346         return state;
00347 #else /* !TARGET_OS_MAC */
00348     if(state != kFileIsOK)
00349         return state;
00350 #endif /* !TARGET_OS_MAC */
00351
00352     state = TestValidName(arg);
00353     if(state != kFileIsOK)
00354         return state;
00355
00356     state = TestFileIsAlias(arg, dir, spec);
00357     if(state != kFileIsOK)
00358         return state;
00359
00360     return kFileIsOK;
00361 }

Here is the call graph for this function:

kTextBinTYPE FileIsText | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec
 | ) |

Definition at line 299 of file TextBinary.cpp.

References FillBuffer(), kFileIsOK, kFileTypeText, kTextBinTYPE, sBufSize, TestBuffer(), TestFileIsAlias(), and TestValidName().

Referenced by AddCvsArgs::FileIsType(), and ImportReport::OnFile().

00300 {
00301     kTextBinTYPE state;
00302
00303 #ifdef TARGET_OS_MAC
00304     state = GetMacSig(arg, dir, spec, false);
00305     if(state != kFileIsOK)
00306         return state;
00307 #endif /* TARGET_OS_MAC */
00308
00309     state = FillBuffer(arg, dir, spec, false);
00310     if(state != kFileIsOK)
00311         return state;
00312
00313     if(sBufSize == 0)
00314         return kFileIsOK;
00315
00316     state = TestBuffer(arg, dir, spec, kFileTypeText);
00317     if(state != kFileIsOK)
00318         return state;
00319
00320     state = TestValidName(arg);
00321     if(state != kFileIsOK)
00322         return state;
00323
00324     state = TestFileIsAlias(arg, dir, spec);
00325     if(state != kFileIsOK)
00326         return state;
00327
00328     return kFileIsOK;
00329 }

Here is the call graph for this function:

kTextBinTYPE FileIsUnicode | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec
 | ) |

Definition at line 363 of file TextBinary.cpp.

References FillBuffer(), kBinIsText, kFileIsOK, kFileTypeUnicode, kTextBinTYPE, TestBuffer(), TestFileIsAlias(), and TestValidName().

Referenced by AddUnicodeCvsArgs::FileIsType().

00364 {
00365     kTextBinTYPE state;
00366
00367     state = FillBuffer(arg, dir, spec, true);
00368     if(state != kFileIsOK)
00369         return state;
00370
00371     state = TestBuffer(arg, dir, spec, kFileTypeUnicode);
00372
00373 #ifdef TARGET_OS_MAC
00374     kTextBinTYPE sigstate = GetMacSig(arg, dir, spec, true);
00375     if(sigstate != kFileIsOK)
00376         return state;
00377     if(state != kFileIsOK && state != kBinIsText)
00378         return state;
00379 #else /* !TARGET_OS_MAC */
00380     if(state != kFileIsOK)
00381         return state;
00382 #endif /* !TARGET_OS_MAC */
00383
00384     state = TestValidName(arg);
00385     if(state != kFileIsOK)
00386         return state;
00387
00388     state = TestFileIsAlias(arg, dir, spec);
00389     if(state != kFileIsOK)
00390         return state;
00391
00392     return kFileIsOK;
00393 }

Here is the call graph for this function:

kTextBinTYPE FillBuffer | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec,
 |  | bool | bin
 | ) | [static]

Definition at line 77 of file TextBinary.cpp.

References CStaticAllocT< T >::AdjustSize(), cvs_err(), kFileIsOK, kFileMissing, kTextBinTYPE, MAX_TEST_SIZE, sBuf, and sBufSize.

Referenced by FileIsBinary(), FileIsText(), and FileIsUnicode().

00078 {
00079     sBuf.AdjustSize(MAX_TEST_SIZE);
00080
00081     if(chdir(dir) != 0)
00082     {
00083         cvs_err("Unable to chdir to ""%s"" (error %d)\n", dir, errno);
00084         return kFileMissing;
00085     }
00086
00087     FILE *samp = fopen(arg, bin ? "rb" : "r");
00088     if(samp == 0L)
00089     {
00090         return kFileMissing;
00091     }
00092
00093     sBufSize = fread(sBuf, sizeof(char), MAX_TEST_SIZE, samp);
00094     if(sBufSize < 0)
00095     {
00096         cvs_err("Unable to read ""%s"" (error %d)\n", arg, errno);
00097         return kFileMissing;
00098     }
00099
00100     fclose(samp);
00101     return kFileIsOK;
00102 }

Here is the call graph for this function:

kTextBinTYPE TestBuffer | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec,
 |  | kFileType | expectType
 | ) | [static]

Definition at line 104 of file TextBinary.cpp.

References gCvsPrefs, kBinIsText, kBinIsUnicode, kFileIsOK, kFileTypeBin, kFileTypeText, kFileTypeUnicode, kTextBinTYPE, kTextEscapeChar, kTextIsBinary, kTextIsUnicode, kTextWrongLF, kUnicodeIsBinary, kUnicodeIsText, kWin32, NULL, sBuf, sBufSize, and CvsPrefs::WhichVersion().

Referenced by FileIsBinary(), FileIsText(), and FileIsUnicode().

00105 {
00106     if(sBufSize == 0)
00107         return kFileIsOK;
00108
00109     bool isUnicode = false;
00110 #ifdef WIN32
00111     isUnicode = gCvsPrefs.WhichVersion() == kWin32 ? false : IsTextUnicode(sBuf, sBufSize, NULL) == TRUE;
00112 #endif /* WIN32 */
00113
00114     // Windows : fread skips the \r, so we don't care.
00115     // Mac : MSL exchanges when reading the \r and \n,
00116     // so we look for \n
00117     // Others : default to \n
00118
00119     const unsigned char nativeNL = '\n';
00120     const unsigned char nonnativeNL = '\r';
00121
00122     float percent = 0;
00123     int numBinChars = 0;
00124     int numTextChars = 0;
00125
00126     if( !isUnicode )
00127     {
00128         // figure if it is binary
00129         int i;
00130         unsigned char c;
00131         char *tmp;
00132
00133         for(tmp = sBuf, i = 0; i < sBufSize; i++)
00134         {
00135             c = (unsigned char)*tmp++;
00136             if((c < 0x20 && c != nativeNL && c != nonnativeNL && c != '\t') || (c >= 0x80
00137 #ifdef TARGET_OS_MAC
00138                 && c != (unsigned char)'Ñ' && c != (unsigned char)'¥' /* powerplant */
00139 #endif /* TARGET_OS_MAC */
00140                 ))
00141                 numBinChars++;
00142             else
00143                 numTextChars++;
00144         }
00145
00146         percent = (float)numBinChars / (float)sBufSize;
00147     }
00148
00149     // more than 5% binary makes binary
00150     bool isbin = percent >= 0.05;
00151
00152     switch( expectType )
00153     {
00154     case kFileTypeText:
00155         if( isUnicode )
00156         {
00157             return kTextIsUnicode;
00158         }
00159         else if( isbin )
00160         {
00161             return kTextIsBinary;
00162         }
00163         break;
00164     case kFileTypeBin:
00165         if( isUnicode )
00166         {
00167             return kBinIsUnicode;
00168         }
00169         else if( !isbin )
00170         {
00171             return kBinIsText;
00172         }
00173         break;
00174     case kFileTypeUnicode:
00175         if( !isUnicode )
00176         {
00177             return isbin ? kUnicodeIsBinary : kUnicodeIsText;
00178         }
00179         break;
00180     default:
00181 #ifdef WIN32
00182         ASSERT(FALSE); // uknown type
00183 #endif
00184         break;
00185     }
00186
00187     // for the text files, check if the new lines are good
00188     if(kFileTypeText == expectType)
00189     {
00190         int i;
00191         unsigned char c;
00192         char *tmp;
00193         int numNonNative = 0, numNative = 0;
00194         for(tmp = sBuf, i = 0; i < sBufSize; i++)
00195         {
00196             c = (unsigned char)*tmp++;
00197             if(c == nonnativeNL)
00198                 numNonNative++;
00199             else if(c == nativeNL)
00200                 numNative++;
00201         }
00202         if(numNative == 0)
00203         {
00204             if(numNonNative > 0)
00205                 return kTextWrongLF;
00206         }
00207         else
00208         {
00209             percent = (float)numNonNative / (float)numNative;
00210             if(percent >= 0.1)
00211                 return kTextWrongLF;
00212         }
00213
00214         if(numBinChars > 0)
00215             return kTextEscapeChar;
00216     }
00217
00218     return kFileIsOK;
00219 }

Here is the call graph for this function:

kTextBinTYPE TestFileIsAlias | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec
 | ) | [static]

Definition at line 277 of file TextBinary.cpp.

References CPStr, kFileIsAlias, kFileIsOK, kFileMissing, kTextBinTYPE, stat::st_mode, and stat.

Referenced by FileIsBinary(), FileIsText(), and FileIsUnicode().

00278 {
00279     kTextBinTYPE result = kFileIsOK;
00280
00281 #ifdef S_ISLNK
00282     CPStr fullname;
00283     struct stat sb;
00284
00285     fullname = dir;
00286     if(!fullname.endsWith(kPathDelimiter))
00287         fullname << kPathDelimiter;
00288     fullname << arg;
00289
00290     if (stat(fullname, &sb) == -1)
00291         result = kFileMissing;
00292     else if(S_ISLNK(sb.st_mode))
00293         result = kFileIsAlias;
00294 #endif /* S_ISLNK */
00295
00296     return result;
00297 }

kTextBinTYPE TestValidName ( const char * filename ) [static]

Definition at line 256 of file TextBinary.cpp.

References kFileInvalidName, kFileIsOK, and kTextBinTYPE.

Referenced by FileIsBinary(), FileIsText(), and FileIsUnicode().

00257 {
00258     kTextBinTYPE result = kFileIsOK;
00259
00260     if(strchr(filename, '/') != 0L)
00261         result = kFileInvalidName;
00262     if(strchr(filename, '\n') != 0L)
00263         result = kFileInvalidName;
00264
00265 #ifdef TARGET_OS_MAC
00266     if(strchr(filename, '\r') != 0L)
00267         result = kFileInvalidName;
00268     if(strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0)
00269         result = kFileInvalidName;
00270     if(strcmp(filename, "CVS") != 0 && stricmp(filename, "cvs") == 0)
00271         result = kFileInvalidName;
00272 #endif /* !TARGET_OS_MAC */
00273
00274     return result;
00275 }

Variable Documentation

CStaticAllocT<char> sBuf [static]

Definition at line 74 of file TextBinary.cpp.

Referenced by FillBuffer(), and TestBuffer().

int sBufSize [static]

Definition at line 75 of file TextBinary.cpp.

Referenced by FileIsText(), FillBuffer(), and TestBuffer().

Generated on Sat Aug 7 22:46:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TextBinary.h File Reference

common/TextBinary.h File Reference

#include "CPStr.h"

Include dependency graph for TextBinary.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | UFSSpec FSSpec

Typedefs

typedef int | FSSpec

Enumerations

enum kTextBinTYPE {
kFileIsOK,
kFileMissing,
kFileIsAlias,
kFileInvalidName,
kTextWrongLF,
kTextIsBinary,
kTextEscapeChar,
kTextWrongSig,
kTextIsUnicode,
kBinIsText,
kBinWrongSig,
kBinIsUnicode,
kUnicodeIsText,
kUnicodeIsBinary
}
File type enum. More...
enum kFileType {
kFileTypeText,
kFileTypeBin,
kFileTypeUnicode
}
File type enum. More...

Functions

kTextBinTYPE | FileIsText (const char *arg, const char *dir, const FSSpec *spec=0L)
kTextBinTYPE | FileIsBinary (const char *arg, const char *dir, const FSSpec *spec=0L)
kTextBinTYPE | FileIsUnicode (const char *arg, const char *dir, const FSSpec *spec=0L)

Define Documentation

#define UFSSpec FSSpec

Definition at line 39 of file TextBinary.h.

Referenced by BrowserGetMultiFiles(), BuildIgnoredList(), FileTraverse(), MakeTmpFile(), and ImportReport::OnFile().

Typedef Documentation

typedef int FSSpec

Definition at line 38 of file TextBinary.h.

Referenced by BrowserGetDirectory(), TBrowserFill::EnterDirectory(), TBrowserFillDummy::EnterDirectory(), TViewFill::EnterDirectory(), TViewFill::OnAlias(), TBrowserFill::OnDirectory(), TBrowserFillDummy::OnDirectory(), TViewFill::OnDirectory(), and TViewFill::OnFile().

Enumeration Type Documentation

enum kFileType

File type enum.

Enumeration values:
kFileTypeText | Text type
kFileTypeBin | Binary type
kFileTypeUnicode | Unicode type
Definition at line 69 of file TextBinary.h.

Referenced by ImportReport::OnFile().

00070 {
00071     kFileTypeText,
00072     kFileTypeBin,
00073     kFileTypeUnicode
00074 } kFileType;

enum kTextBinTYPE

File type enum.

Enumeration values:
kFileIsOK | good file
kFileMissing | file is missing or unreadable
kFileIsAlias | file is an alias
kFileInvalidName | invalid character ('/')
kTextWrongLF | for example it has Mac \r on Windows
kTextIsBinary | file should be text but seems to be binary
kTextEscapeChar | file has some extras characters (0x00-0x1F, 0x80-0xFF)
kTextWrongSig | file has not the 'TEXT' signature (Mac only)
kTextIsUnicode | file should be text but seems to be unicode file
kBinIsText | binary file seems to be a text file
kBinWrongSig | file should not have the 'TEXT' signature in it (Mac only)
kBinIsUnicode | binary file seems to be unicode file
kUnicodeIsText | unicode file seems to be text file
kUnicodeIsBinary | unicode file seems to be binary
Definition at line 43 of file TextBinary.h.

Referenced by ControlCvsArgs::addfile(), FileIsBinary(), FileIsText(), AddUnicodeCvsArgs::FileIsType(), AddBinCvsArgs::FileIsType(), AddCvsArgs::FileIsType(), FileIsUnicode(), FillBuffer(), ReportWarning::Kind(), ImportReport::OnFile(), TestBuffer(), TestFileIsAlias(), and TestValidName().

00044 {
00045     // text and binary flags
00046     kFileIsOK,
00047     kFileMissing,
00048     kFileIsAlias,
00049     kFileInvalidName,
00051     // text flags
00052     kTextWrongLF,
00053     kTextIsBinary,
00054     kTextEscapeChar,
00055     kTextWrongSig,
00056     kTextIsUnicode,
00058     // binary flags
00059     kBinIsText,
00060     kBinWrongSig,
00061     kBinIsUnicode,
00063     // unicode flags
00064     kUnicodeIsText,
00065     kUnicodeIsBinary
00066 } kTextBinTYPE;

Function Documentation

kTextBinTYPE FileIsBinary | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec = 0L
 | ) |

Definition at line 331 of file TextBinary.cpp.

References FillBuffer(), kBinIsText, kFileIsOK, kFileTypeBin, kTextBinTYPE, TestBuffer(), TestFileIsAlias(), and TestValidName().

Referenced by AddBinCvsArgs::FileIsType(), and ImportReport::OnFile().

00332 {
00333     kTextBinTYPE state;
00334
00335     state = FillBuffer(arg, dir, spec, true);
00336     if(state != kFileIsOK)
00337         return state;
00338
00339     state = TestBuffer(arg, dir, spec, kFileTypeBin);
00340
00341 #ifdef TARGET_OS_MAC
00342     kTextBinTYPE sigstate = GetMacSig(arg, dir, spec, true);
00343     if(sigstate != kFileIsOK)
00344         return state;
00345     if(state != kFileIsOK && state != kBinIsText)
00346         return state;
00347 #else /* !TARGET_OS_MAC */
00348     if(state != kFileIsOK)
00349         return state;
00350 #endif /* !TARGET_OS_MAC */
00351
00352     state = TestValidName(arg);
00353     if(state != kFileIsOK)
00354         return state;
00355
00356     state = TestFileIsAlias(arg, dir, spec);
00357     if(state != kFileIsOK)
00358         return state;
00359
00360     return kFileIsOK;
00361 }

Here is the call graph for this function:

kTextBinTYPE FileIsText | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec = 0L
 | ) |

Definition at line 299 of file TextBinary.cpp.

References FillBuffer(), kFileIsOK, kFileTypeText, kTextBinTYPE, sBufSize, TestBuffer(), TestFileIsAlias(), and TestValidName().

Referenced by AddCvsArgs::FileIsType(), and ImportReport::OnFile().

00300 {
00301     kTextBinTYPE state;
00302
00303 #ifdef TARGET_OS_MAC
00304     state = GetMacSig(arg, dir, spec, false);
00305     if(state != kFileIsOK)
00306         return state;
00307 #endif /* TARGET_OS_MAC */
00308
00309     state = FillBuffer(arg, dir, spec, false);
00310     if(state != kFileIsOK)
00311         return state;
00312
00313     if(sBufSize == 0)
00314         return kFileIsOK;
00315
00316     state = TestBuffer(arg, dir, spec, kFileTypeText);
00317     if(state != kFileIsOK)
00318         return state;
00319
00320     state = TestValidName(arg);
00321     if(state != kFileIsOK)
00322         return state;
00323
00324     state = TestFileIsAlias(arg, dir, spec);
00325     if(state != kFileIsOK)
00326         return state;
00327
00328     return kFileIsOK;
00329 }

Here is the call graph for this function:

kTextBinTYPE FileIsUnicode | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec = 0L
 | ) |

Definition at line 363 of file TextBinary.cpp.

References FillBuffer(), kBinIsText, kFileIsOK, kFileTypeUnicode, kTextBinTYPE, TestBuffer(), TestFileIsAlias(), and TestValidName().

Referenced by AddUnicodeCvsArgs::FileIsType().

00364 {
00365     kTextBinTYPE state;
00366
00367     state = FillBuffer(arg, dir, spec, true);
00368     if(state != kFileIsOK)
00369         return state;
00370
00371     state = TestBuffer(arg, dir, spec, kFileTypeUnicode);
00372
00373 #ifdef TARGET_OS_MAC
00374     kTextBinTYPE sigstate = GetMacSig(arg, dir, spec, true);
00375     if(sigstate != kFileIsOK)
00376         return state;
00377     if(state != kFileIsOK && state != kBinIsText)
00378         return state;
00379 #else /* !TARGET_OS_MAC */
00380     if(state != kFileIsOK)
00381         return state;
00382 #endif /* !TARGET_OS_MAC */
00383
00384     state = TestValidName(arg);
00385     if(state != kFileIsOK)
00386         return state;
00387
00388     state = TestFileIsAlias(arg, dir, spec);
00389     if(state != kFileIsOK)
00390         return state;
00391
00392     return kFileIsOK;
00393 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsApp.cpp File Reference

common/UCvsApp.cpp File Reference

#include "stdafx.h"
#include "UCvsApp.h"
#include "UCvsCommands.h"
#include "UCvsConsole.h"
#include "UCvsFrame.h"
#include "UCvsFolders.h"
#include "UCvsFiles.h"
#include "UCvsStatusbar.h"
#include "TclGlue.h"
#include "GetPrefs.h"
#include "CvsArgs.h"
#include "CvsPrefs.h"
#include "AppConsole.h"
#include "MacrosSetup.h"
#include "Authen.h"
#include "PythonGlue.h"
#include "getopt.h"

Include dependency graph for UCvsApp.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | usage (void)
void * | UCreate_pixmap (UWidget *parent, const char *fileIcon)
bool IsAppEnabled ()

Function Documentation

bool IsAppEnabled ( void )

Definition at line 573 of file UCvsApp.cpp.

References gCvsPrefs, and UCvsApp::IsCvsRunning().

Referenced by UCvsFrame::OnCmdUICvsCmd(), UCvsConsole::OnCmdUIEraseAll(), UCvsFrame::OnCmdUIFilterMask(), UCvsFrame::OnCmdUIHideUnknown(), UCvsFrame::OnCmdUIIgnore(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFrame::OnCmdUIReload(), UCvsFrame::OnCmdUIViewAdded(), UCvsFrame::OnCmdUIViewChanged(), UCvsFrame::OnCmdUIViewConflict(), UCvsFrame::OnCmdUIViewIgnored(), UCvsFrame::OnCmdUIViewMissing(), UCvsFrame::OnCmdUIViewModified(), UCvsFrame::OnCmdUIViewRemoved(), UCvsFrame::OnCmdUIViewUnknown(), CMainFrame::OnUpdateFilterMask(), CMainFrame::OnUpdateHistory(), CMainFrame::OnUpdateViewAdded(), CMainFrame::OnUpdateViewChanged(), CMainFrame::OnUpdateViewClearall(), CMainFrame::OnUpdateViewConflict(), CMainFrame::OnUpdateViewFilterbarClearall(), CMainFrame::OnUpdateViewFilterbarEnable(), CMainFrame::OnUpdateViewFilterbarOptions(), CMainFrame::OnUpdateViewHidemissing(), CMainFrame::OnUpdateViewHideunknown(), CMainFrame::OnUpdateViewIgnore(), CMainFrame::OnUpdateViewMissing(), CMainFrame::OnUpdateViewModified(), CMainFrame::OnUpdateViewRecursive(), CMainFrame::OnUpdateViewRemoved(), and CMainFrame::OnUpdateViewUnknown().

00574 {
00575     UCvsApp *app = UCvsApp::gApp;
00576     return !app->IsCvsRunning() && !gCvsPrefs.empty();
00577 }

Here is the call graph for this function:

void* UCreate_pixmap | ( | UWidget * | parent,
 |  | const char * | fileIcon
 | ) |

Definition at line 563 of file UCvsApp.cpp.

References kUMainWidget.

Referenced by UCvsFiles::OnCreate(), and UCvsFolders::OnCreate().

00564 {
00565 #if qGTK
00566     GtkWidget *wid = (GtkWidget *) parent->GetWidget (kUMainWidget);
00567     return GTK_PIXMAP (create_pixmap (wid, fileIcon));
00568 #else
00569     return 0L;
00570 #endif
00571 }

void usage ( void ) [static]

Definition at line 74 of file UCvsApp.cpp.

Referenced by UCvsApp::UCvsApp().

00075 {
00076     fprintf (stderr, "gcvs [--root=path]\n");
00077 }

Generated on Sat Aug 7 22:46:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsApp.h File Reference

common/UCvsApp.h File Reference

#include "uwidget.h"
#include "cvsgui_process.h"
#include "BrowseViewModel.h"

Include dependency graph for UCvsApp.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | UCvsApp

Functions

bool | IsAppEnabled (void)

Function Documentation

bool IsAppEnabled ( void )

Definition at line 573 of file UCvsApp.cpp.

References gCvsPrefs, and UCvsApp::IsCvsRunning().

Referenced by UCvsFrame::OnCmdUICvsCmd(), UCvsConsole::OnCmdUIEraseAll(), UCvsFrame::OnCmdUIFilterMask(), UCvsFrame::OnCmdUIHideUnknown(), UCvsFrame::OnCmdUIIgnore(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFrame::OnCmdUIReload(), UCvsFrame::OnCmdUIViewAdded(), UCvsFrame::OnCmdUIViewChanged(), UCvsFrame::OnCmdUIViewConflict(), UCvsFrame::OnCmdUIViewIgnored(), UCvsFrame::OnCmdUIViewMissing(), UCvsFrame::OnCmdUIViewModified(), UCvsFrame::OnCmdUIViewRemoved(), UCvsFrame::OnCmdUIViewUnknown(), CMainFrame::OnUpdateFilterMask(), CMainFrame::OnUpdateHistory(), CMainFrame::OnUpdateViewAdded(), CMainFrame::OnUpdateViewChanged(), CMainFrame::OnUpdateViewClearall(), CMainFrame::OnUpdateViewConflict(), CMainFrame::OnUpdateViewFilterbarClearall(), CMainFrame::OnUpdateViewFilterbarEnable(), CMainFrame::OnUpdateViewFilterbarOptions(), CMainFrame::OnUpdateViewHidemissing(), CMainFrame::OnUpdateViewHideunknown(), CMainFrame::OnUpdateViewIgnore(), CMainFrame::OnUpdateViewMissing(), CMainFrame::OnUpdateViewModified(), CMainFrame::OnUpdateViewRecursive(), CMainFrame::OnUpdateViewRemoved(), and CMainFrame::OnUpdateViewUnknown().

00574 {
00575     UCvsApp *app = UCvsApp::gApp;
00576     return !app->IsCvsRunning() && !gCvsPrefs.empty();
00577 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsCommands.h File Reference

common/UCvsCommands.h File Reference

#include "umain.h"

Include dependency graph for UCvsCommands.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Enumerations

enum {
kUCvsFrameID = 1,
kUMainConsoleID,
kUCvsFoldersID,
kUCvsFilesID,
kUCvsToolbarID,
kUCvsBrowseToolbarID,
kUCvsFilterToolbarID,
kUCvsMenubarID,
kUCvsStatusbarID
}
enum {
cmdSAVE = EV_COMMAND_START + 100,
cmdSAVE_AS,
cmdPRINT,
cmdPRINT_PREVIEW,
cmdPRINT_SETUP,
cmdSEND_MAIL,
cmdEXIT,
cmdUNDO,
cmdCUT,
cmdCOPY,
cmdPASTE,
cmdSELECT_ALL,
cmdCLEAR_ALL,
cmdFIND,
cmdREPEAT,
cmdFONT,
cmdSHELL,
cmdUSE_TCLSHELL,
cmdUSE_PYSHELL,
cmdTOOLBAR,
cmdSTATUS_BAR,
cmdBROWSER_BAR,
cmdFILES_BAR,
cmdMULTI_BAR,
cmdTAGS_BAR,
cmdCONSOLE_BAR,
cmdWORKSPACE,
cmdOPEN,
cmdPREFERENCES,
cmdCMDLINE,
cmdLOGIN,
cmdLOGOUT,
cmdSTOPCVS,
cmdINIT,
cmdIMPORT,
cmdCHECKOUT,
cmdRTAGCREATE,
cmdRTAGDELETE,
cmdRTAGBRANCH,
cmdUPDATE,
cmdCOMMIT,
cmdADD,
cmdADDB,
cmdRMV,
cmdTRASH,
cmdTAGNEW,
cmdTAGDELETE,
cmdTAGBRANCH,
cmdEXPLORE,
cmdQUERYUPDATE,
cmdRELOAD,
cmdEDITSEL,
cmdEDITSELDEF,
cmdDIFF,
cmdLOG,
cmdSTATUS,
cmdGRAPH,
cmdLOCKF,
cmdUNLOCKF,
cmdEDIT,
cmdRESEDIT,
cmdUNEDIT,
cmdWATCHON,
cmdWATCHOFF,
cmdRELEASE,
cmdWATCHERS,
cmdEDITORS,
cmdCASCADE,
cmdTILE_HORZ,
cmdARRANGE,
cmdFINDER,
cmdCVS,
cmdCVSCLIENT,
cmdABOUT,
cmdIGNORE,
cmdUPFOLDER,
cmdSAVESETTINGS,
cmdFLAT,
cmdVIEW_ADDED,
cmdVIEW_REMOVED,
cmdVIEW_CHANGED,
cmdHIDE_UNKNOWN,
cmdVIEW_UNKNOWN,
cmdVIEW_MODIFIED,
cmdVIEW_MISSING,
cmdVIEW_CONFLICT,
cmdVIEW_FILEMASK,
cmdMACROS,
cmdSELMACRO,
cmdSELMACROEND = cmdSELMACRO + 30,
cmdADMINMACROS,
cmdMACROADMIN,
cmdMACROADMINEND = cmdMACROADMIN + 20,
cmdCREDITS,
cmdCOPYRIGHTS
}

Enumeration Type Documentation

anonymous enum

Enumeration values:
kUCvsFrameID
kUMainConsoleID
kUCvsFoldersID
kUCvsFilesID
kUCvsToolbarID
kUCvsBrowseToolbarID
kUCvsFilterToolbarID
kUCvsMenubarID
kUCvsStatusbarID
Definition at line 32 of file UCvsCommands.h.
00033 {
00034     kUCvsFrameID = 1,           /* the main frane */
00035     kUMainConsoleID,            /* the pseudo-console */
00036     kUCvsFoldersID,             /* the folder tree */
00037     kUCvsFilesID,               /* the files list */
00038     kUCvsToolbarID,             /* the toolbar */
00039     kUCvsBrowseToolbarID,       /* the browse toolbar */
00040     kUCvsFilterToolbarID,       /* the filter toolbar */
00041     kUCvsMenubarID,             /* the menubar */
00042     kUCvsStatusbarID
00043 };

anonymous enum

Enumeration values:
cmdSAVE
cmdSAVE_AS
cmdPRINT
cmdPRINT_PREVIEW
cmdPRINT_SETUP
cmdSEND_MAIL
cmdEXIT
cmdUNDO
cmdCUT
cmdCOPY
cmdPASTE
cmdSELECT_ALL
cmdCLEAR_ALL
cmdFIND
cmdREPEAT
cmdFONT
cmdSHELL
cmdUSE_TCLSHELL
cmdUSE_PYSHELL
cmdTOOLBAR
cmdSTATUS_BAR
cmdBROWSER_BAR
cmdFILES_BAR
cmdMULTI_BAR
cmdTAGS_BAR
cmdCONSOLE_BAR
cmdWORKSPACE
cmdOPEN
cmdPREFERENCES
cmdCMDLINE
cmdLOGIN
cmdLOGOUT
cmdSTOPCVS
cmdINIT
cmdIMPORT
cmdCHECKOUT
cmdRTAGCREATE
cmdRTAGDELETE
cmdRTAGBRANCH
cmdUPDATE
cmdCOMMIT
cmdADD
cmdADDB
cmdRMV
cmdTRASH
cmdTAGNEW
cmdTAGDELETE
cmdTAGBRANCH
cmdEXPLORE
cmdQUERYUPDATE
cmdRELOAD
cmdEDITSEL
cmdEDITSELDEF
cmdDIFF
cmdLOG
cmdSTATUS
cmdGRAPH
cmdLOCKF
cmdUNLOCKF
cmdEDIT
cmdRESEDIT
cmdUNEDIT
cmdWATCHON
cmdWATCHOFF
cmdRELEASE
cmdWATCHERS
cmdEDITORS
cmdCASCADE
cmdTILE_HORZ
cmdARRANGE
cmdFINDER
cmdCVS
cmdCVSCLIENT
cmdABOUT
cmdIGNORE
cmdUPFOLDER
cmdSAVESETTINGS
cmdFLAT
cmdVIEW_ADDED
cmdVIEW_REMOVED
cmdVIEW_CHANGED
cmdHIDE_UNKNOWN
cmdVIEW_UNKNOWN
cmdVIEW_MODIFIED
cmdVIEW_MISSING
cmdVIEW_CONFLICT
cmdVIEW_FILEMASK
cmdMACROS
cmdSELMACRO
cmdSELMACROEND
cmdADMINMACROS
cmdMACROADMIN
cmdMACROADMINEND
cmdCREDITS
cmdCOPYRIGHTS
Definition at line 47 of file UCvsCommands.h.
00048 {
00049     cmdSAVE = EV_COMMAND_START + 100,
00050     cmdSAVE_AS,
00051     cmdPRINT,
00052     cmdPRINT_PREVIEW,
00053     cmdPRINT_SETUP,
00054     cmdSEND_MAIL,
00055     cmdEXIT,
00056     cmdUNDO,
00057     cmdCUT,
00058     cmdCOPY,
00059     cmdPASTE,
00060     cmdSELECT_ALL,
00061     cmdCLEAR_ALL,
00062     cmdFIND,
00063     cmdREPEAT,
00064     cmdFONT,
00065     cmdSHELL,
00066     cmdUSE_TCLSHELL,
00067     cmdUSE_PYSHELL,
00068     cmdTOOLBAR,
00069     cmdSTATUS_BAR,
00070     cmdBROWSER_BAR,
00071     cmdFILES_BAR,
00072     cmdMULTI_BAR,
00073     cmdTAGS_BAR,
00074     cmdCONSOLE_BAR,
00075     cmdWORKSPACE,
00076     cmdOPEN,
00077     cmdPREFERENCES,
00078     cmdCMDLINE,
00079     cmdLOGIN,
00080     cmdLOGOUT,
00081     cmdSTOPCVS,
00082     cmdINIT,
00083     cmdIMPORT,
00084     cmdCHECKOUT,
00085     cmdRTAGCREATE,
00086     cmdRTAGDELETE,
00087     cmdRTAGBRANCH,
00088     cmdUPDATE,
00089     cmdCOMMIT,
00090     cmdADD,
00091     cmdADDB,
00092     cmdRMV,
00093     cmdTRASH,
00094     cmdTAGNEW,
00095     cmdTAGDELETE,
00096     cmdTAGBRANCH,
00097     cmdEXPLORE,
00098     cmdQUERYUPDATE,
00099     cmdRELOAD,
00100     cmdEDITSEL,
00101     cmdEDITSELDEF,
00102     cmdDIFF,
00103     cmdLOG,
00104     cmdSTATUS,
00105     cmdGRAPH,
00106     cmdLOCKF,
00107     cmdUNLOCKF,
00108     cmdEDIT,
00109     cmdRESEDIT,
00110     cmdUNEDIT,
00111     cmdWATCHON,
00112     cmdWATCHOFF,
00113     cmdRELEASE,
00114     cmdWATCHERS,
00115     cmdEDITORS,
00116     cmdCASCADE,
00117     cmdTILE_HORZ,
00118     cmdARRANGE,
00119     cmdFINDER,
00120     cmdCVS,
00121     cmdCVSCLIENT,
00122     cmdABOUT,
00123     cmdIGNORE,
00124     cmdUPFOLDER,
00125     cmdSAVESETTINGS,
00126     cmdFLAT,
00127     cmdVIEW_ADDED,
00128     cmdVIEW_REMOVED,
00129     cmdVIEW_CHANGED,
00130     cmdHIDE_UNKNOWN,
00131     cmdVIEW_UNKNOWN,
00132     cmdVIEW_MODIFIED,
00133     cmdVIEW_MISSING,
00134     cmdVIEW_CONFLICT,
00135     cmdVIEW_FILEMASK,
00136
00137     cmdMACROS,
00138
00139 #ifndef USE_PYTHON
00140     cmdSELMACRO, // contiguous BEGIN
00141     cmdSELMACROEND = cmdSELMACRO + 30,
00142 #endif
00143
00144     cmdADMINMACROS,
00145     cmdMACROADMIN, // contiguous BEGIN
00146     cmdMACROADMINEND = cmdMACROADMIN + 20,
00147
00148     cmdCREDITS,
00149     cmdCOPYRIGHTS,
00150
00151 #ifdef USE_PYTHON
00152     cmdPyMACROS = 10000,  // contiguous BEGIN
00153     cmdPyMACROSEND = cmdPyMACROS + 100
00154 #endif
00155 };

Generated on Sat Aug 7 22:46:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsConsole.cpp File Reference

common/UCvsConsole.cpp File Reference

#include "stdafx.h"
#include "UCvsApp.h"
#include "UCvsConsole.h"
#include "UCvsCommands.h"
#include "uconsole.h"
#include "CvsPrefs.h"
#include "TclGlue.h"
#include "PythonGlue.h"

Include dependency graph for UCvsConsole.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsConsole.h File Reference

common/UCvsConsole.h File Reference

#include "uwidget.h"
#include "AppConsole.h"
#include <gdk/gdktypes.h>

Include dependency graph for UCvsConsole.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | UCOLOR
class | UCvsConsole

Generated on Sat Aug 7 22:46:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsDialogs.h File Reference

common/UCvsDialogs.h File Reference

#include "uwidget.h"

Include dependency graph for UCvsDialogs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void * | UCreate_pixmap (UWidget *parent, const char *fileIcon)
void * | UCreate_MainWindow (void *Parent=NULL)
void * | UCreate_GraphWindow (void *Parent=NULL)
void * | UCreate_Alert (void *Parent=NULL)
void * | UCreate_gcvs_Settings (void *Parent=NULL)
void * | UCreate_UpdateDlg (void *Parent=NULL)
void * | UCreate_PasswdDlg (void *Parent=NULL)
void * | UCreate_CommitDlg (void *Parent=NULL)
void * | UCreate_DiffDlg (void *Parent=NULL)
void * | UCreate_CheckoutDlg (void *Parent=NULL)
void * | UCreate_LogDlg (void *Parent=NULL)
void * | UCreate_ImportFilterDlg (void *Parent=NULL)
void * | UCreate_ImpWarningDlg (void *Parent=NULL)
void * | UCreate_ImpEntryDlg (void *Parent=NULL)
void * | UCreate_ImportDlg (void *Parent=NULL)
void * | UCreate_CmdlineDlg (void *Parent=NULL)
void * | UCreate_TagModDlg (void *Parent=NULL)
void * | UCreate_UntagModDlg (void *Parent=NULL)
void * | UCreate_BranchModDlg (void *Parent=NULL)
void * | UCreate_TagDlg (void *Parent=NULL)
void * | UCreate_UntagDlg (void *Parent=NULL)
void * | UCreate_BranchDlg (void *Parent=NULL)
void * | UCreate_SettingsDlg (void *Parent=NULL)
void * | UCreate_AboutDlg (void *Parent=NULL)
void * | UCreate_SelTagBranchDlg (void *Parent=NULL)
void * | UCreate_SelDetailsDlg (void *Parent=NULL)
void * | UCreate_AskYesNoDlg (void *Parent=NULL)

Function Documentation

void* UCreate_AboutDlg ( void * Parent = NULL )

Referenced by AboutDialog().

void* UCreate_Alert ( void * Parent = NULL )

void* UCreate_AskYesNoDlg ( void * Parent = NULL )

Referenced by PromptEditMessage().

void* UCreate_BranchDlg ( void * Parent = NULL )

Referenced by CompatGetTag().

void* UCreate_BranchModDlg ( void * Parent = NULL )

Referenced by CompatGetRtag().

void* UCreate_CheckoutDlg ( void * Parent = NULL )

Referenced by CompatGetCheckout().

void* UCreate_CmdlineDlg ( void * Parent = NULL )

Referenced by CompatGetCommand().

void* UCreate_CommitDlg ( void * Parent = NULL )

Referenced by CompatGetCommit().

void* UCreate_DiffDlg ( void * Parent = NULL )

Referenced by CompatGetDiff().

void* UCreate_gcvs_Settings ( void * Parent = NULL )

Referenced by CompatGetPrefs().

void* UCreate_GraphWindow ( void * Parent = NULL )

Referenced by CvsLogParse().

void* UCreate_ImpEntryDlg ( void * Parent = NULL )

void* UCreate_ImportDlg ( void * Parent = NULL )

Referenced by CompatGetImport().

void* UCreate_ImportFilterDlg ( void * Parent = NULL )

Referenced by CompatImportFilter().

void* UCreate_ImpWarningDlg ( void * Parent = NULL )

void* UCreate_LogDlg ( void * Parent = NULL )

Referenced by CompatGetLog().

void* UCreate_MainWindow ( void * Parent = NULL )

void* UCreate_PasswdDlg ( void * Parent = NULL )

Referenced by CompatGetPassword().

void* UCreate_pixmap | ( | UWidget * | parent,
 |  | const char * | fileIcon
 | ) |

Definition at line 563 of file UCvsApp.cpp.

References kUMainWidget.

Referenced by UCvsFolders::OnCreate(), and UCvsFiles::OnCreate().

00564 {
00565 #if qGTK
00566     GtkWidget *wid = (GtkWidget *) parent->GetWidget (kUMainWidget);
00567     return GTK_PIXMAP (create_pixmap (wid, fileIcon));
00568 #else
00569     return 0L;
00570 #endif
00571 }

void* UCreate_SelDetailsDlg ( void * Parent = NULL )

Referenced by CompatGetSelectionDetails().

void* UCreate_SelTagBranchDlg ( void * Parent = NULL )

Referenced by CompatGetModuleListItem(), and CompatGetTagListItem().

void* UCreate_SettingsDlg ( void * Parent = NULL )

Referenced by AskCreatePersistentSettings().

void* UCreate_TagDlg ( void * Parent = NULL )

Referenced by CompatGetTag().

void* UCreate_TagModDlg ( void * Parent = NULL )

Referenced by CompatGetRtag().

void* UCreate_UntagDlg ( void * Parent = NULL )

Referenced by CompatGetTag().

void* UCreate_UntagModDlg ( void * Parent = NULL )

Referenced by CompatGetRtag().

void* UCreate_UpdateDlg ( void * Parent = NULL )

Referenced by CompatGetUpdate().

Generated on Sat Aug 7 22:46:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFiles.cpp File Reference

common/UCvsFiles.cpp File Reference

#include "stdafx.h"
#include <string>
#include "BrowseViewModel.h"
#include "BrowseViewColumn.h"
#include "UCvsFiles.h"
#include "UCvsDialogs.h"
#include "UCvsFolders.h"
#include "UCvsCommands.h"
#include "UCvsFrame.h"
#include "UCvsApp.h"
#include "CvsPrefs.h"
#include "FileTraversal.h"
#include "MultiFiles.h"
#include "CvsCommands.h"
#include "CvsArgs.h"
#include "TclGlue.h"
#include "AppConsole.h"
#include "MoveToTrash.h"
#include "MacrosSetup.h"

Include dependency graph for UCvsFiles.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | KoTraversalContext
class | TViewFill
Fill the view. More...

Defines

#define | NAMESPACE(w) ::
#define | CBrowseFileView UCvsFiles

Enumerations

enum {
kFileIconText = 0,
kFileIconBinary,
kFileIconUnknown,
kFileIconAdded,
kFileIconConflict,
kFileIconMiss,
kFolderIcon,
kFolderIconUnknown,
kFolderIconMiss,
kFileIconTextMod,
kFileIconBinaryMod,
kFileIconIgnored,
kFolderIconIgnored,
kFileIconRemoved
}

Functions

void | onFilteringChanged (CObject *obj)
int | gtkCompareWrap (UWidget *wid, void *data1, void *data2)

Variables

void * | sFileIconTextIcon = NULL
void * | sFileIconBinaryIcon
void * | sFileIconUnknownIcon
void * | sFileIconAddedIcon
void * | sFileIconConflictIcon
void * | sFileIconMissIcon
void * | sFolderIconIcon
void * | sFolderIconUnknownIcon
void * | sFolderIconMissIcon
void * | sFileIconTextModIcon
void * | sFileIconBinaryModIcon
void * | sFileIconIgnoredIcon
void * | sFolderIconIgnoredIcon
void * | sFileIconRemovedIcon
CPersistentInt | gFileViewSort ("P_FileViewSort", EntnodeData::kName)
CPersistentBool | gFileViewSortAsc ("P_FileViewSortAsc", false)
CSortParam * | gSortParam = NULL

Define Documentation

#define CBrowseFileView UCvsFiles

Definition at line 72 of file UCvsFiles.cpp.

#define NAMESPACE ( w ) ::

Definition at line 68 of file UCvsFiles.cpp.

Enumeration Type Documentation

anonymous enum

Enumeration values:
kFileIconText
kFileIconBinary
kFileIconUnknown
kFileIconAdded
kFileIconConflict
kFileIconMiss
kFolderIcon
kFolderIconUnknown
kFolderIconMiss
kFileIconTextMod
kFileIconBinaryMod
kFileIconIgnored
kFolderIconIgnored
kFileIconRemoved
Definition at line 203 of file UCvsFiles.cpp.
00204 {
00205     kFileIconText = 0,
00206     kFileIconBinary,
00207     kFileIconUnknown,
00208     kFileIconAdded,
00209     kFileIconConflict,
00210     kFileIconMiss,
00211     kFolderIcon,
00212     kFolderIconUnknown,
00213     kFolderIconMiss,
00214     kFileIconTextMod,
00215     kFileIconBinaryMod,
00216     kFileIconIgnored,
00217     kFolderIconIgnored,
00218     kFileIconRemoved
00219 };

Function Documentation

int gtkCompareWrap | ( | UWidget * | wid,
 |  | void * | data1,
 |  | void * | data2
 | ) | [static]

Definition at line 1807 of file UCvsFiles.cpp.

References _Compare(), and gSortParam.

Referenced by UCvsFiles::Resort().

01808 {
01809     return _Compare(data1, data2, gSortParam);
01810 }

Here is the call graph for this function:

void onFilteringChanged ( CObject * obj ) [static]

Definition at line 587 of file UCvsFiles.cpp.

Referenced by UCvsFiles::OnCreate().

00588 {
00589         ((UCvsFiles *)obj)->OnFilteringChanged();
00590 }

Variable Documentation

CPersistentInt gFileViewSort("P_FileViewSort", EntnodeData::kName)

Referenced by CBrowseFileView::CBrowseFileView(), UCvsFiles::UCvsFiles(), CBrowseFileView::~CBrowseFileView(), and UCvsFiles::~UCvsFiles().

CPersistentBool gFileViewSortAsc("P_FileViewSortAsc", false)

Referenced by CBrowseFileView::CBrowseFileView(), UCvsFiles::UCvsFiles(), CBrowseFileView::~CBrowseFileView(), and UCvsFiles::~UCvsFiles().

struct CSortParam* gSortParam = NULL [static]

Definition at line 232 of file UCvsFiles.cpp.

Referenced by gtkCompareWrap(), and UCvsFiles::Resort().

void* sFileIconAddedIcon [static]

Definition at line 174 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconBinaryIcon [static]

Definition at line 172 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconBinaryModIcon [static]

Definition at line 181 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconConflictIcon [static]

Definition at line 175 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconIgnoredIcon [static]

Definition at line 182 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconMissIcon [static]

Definition at line 176 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconRemovedIcon [static]

Definition at line 184 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconTextIcon = NULL [static]

Definition at line 171 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconTextModIcon [static]

Definition at line 180 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFileIconUnknownIcon [static]

Definition at line 173 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFolderIconIcon [static]

Definition at line 177 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFolderIconIgnoredIcon [static]

Definition at line 183 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFolderIconMissIcon [static]

Definition at line 179 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

void* sFolderIconUnknownIcon [static]

Definition at line 178 of file UCvsFiles.cpp.

Referenced by UCvsFiles::GetImageForEntry(), and UCvsFiles::OnCreate().

Generated on Sat Aug 7 22:46:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFiles.h File Reference

common/UCvsFiles.h File Reference

#include "uwidget.h"
#include "CvsEntries.h"
#include "BrowseViewHandlers.h"
#include "BrowseViewModel.h"
#include "BrowseViewColumn.h"

Include dependency graph for UCvsFiles.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class UCvsFiles

Generated on Sat Aug 7 22:46:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFolders.cpp File Reference

common/UCvsFolders.cpp File Reference

#include "stdafx.h"
#include "UCvsFolders.h"
#include "UCvsDialogs.h"
#include "UCvsApp.h"
#include "UCvsFiles.h"
#include "UCvsCommands.h"
#include "UCvsFrame.h"
#include "MultiString.h"
#include "FileTraversal.h"
#include "CvsEntries.h"
#include "CvsPrefs.h"
#include "AppConsole.h"
#include "CvsCommands.h"
#include "TclGlue.h"
#include "MacrosSetup.h"
#include "CvsArgs.h"
#include "CvsAlert.h"

Include dependency graph for UCvsFolders.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CTempToggleBool
class | TBrowserFillDummy
Class to create an item with a dummy item inside if and only if the folder is not empty. More...
class | TBrowserFill
Class to create an item with all the subdirectories inside for a given path and a root item. More...

Enumerations

enum {
kIconFolderClosed,
kIconFolderOpened,
kIconFolderCVSClosed,
kIconFolderCVSOpened,
kIconFolderIgnoreClosed,
kIconFolderIgnoreOpened,
kIconFolderIgnoreLost
}

Functions

void * | GetIcon (UCvsFolders *treeCrtl, UTREEITEM item, bool hasCvsInfos, bool expand, EntnodeData *data)

Variables

PCPStr | gOldLoc ("P_BrowserLoc","C:\\")
const char * | gDummyFile = "@@@dummy file@@@"
CMString | gHistoryLocs (100,"P_BrowserLocs")
void * | sFolderIcon
void * | sFolderUnknownIcon
void * | sFolderIgnoredIcon
void * | sFolderMissingIcon
bool | sTemporaryTurnOffNotify = false

Enumeration Type Documentation

anonymous enum

Enumeration values:
kIconFolderClosed
kIconFolderOpened
kIconFolderCVSClosed
kIconFolderCVSOpened
kIconFolderIgnoreClosed
kIconFolderIgnoreOpened
kIconFolderIgnoreLost
Definition at line 72 of file UCvsFolders.cpp.
00073 {
00074     kIconFolderClosed,
00075     kIconFolderOpened,
00076     kIconFolderCVSClosed,
00077     kIconFolderCVSOpened,
00078     kIconFolderIgnoreClosed,
00079     kIconFolderIgnoreOpened,
00080     kIconFolderIgnoreLost
00081 };

Function Documentation

void* GetIcon | ( | UCvsFolders * | treeCrtl,
 |  | UTREEITEM | item,
 |  | bool | hasCvsInfos,
 |  | bool | expand,
 |  | EntnodeData * | data
 | ) | [static]

Definition at line 177 of file UCvsFolders.cpp.

References EntnodeData::IsIgnored(), EntnodeData::IsMissing(), EntnodeData::IsUnknown(), kIconFolderClosed, kIconFolderCVSClosed, kIconFolderCVSOpened, kIconFolderIgnoreClosed, kIconFolderIgnoreLost, kIconFolderIgnoreOpened, kIconFolderOpened, sFolderIcon, sFolderIgnoredIcon, sFolderMissingIcon, sFolderUnknownIcon, and UTREEITEM.

Referenced by CCJFlatButton::DrawButtonIcon(), CCJCBarButton::DrawButtonIcon(), TBrowserFill::ExitDirectory(), TBrowserFillDummy::ExitDirectory(), TBrowserFill::OnDirectory(), CCustomizeMenus::OnRemove(), and UCvsFolders::OnTreeExpanding().

00178 {
00179     int newImage;
00180     void *result = 0L;
00181
00182     if(data == 0L)
00183     {
00184         if(expand)
00185             newImage = hasCvsInfos ? kIconFolderCVSOpened : kIconFolderOpened;
00186         else
00187             newImage = hasCvsInfos ? kIconFolderCVSClosed : kIconFolderClosed;
00188     }
00189     else
00190     {
00191         if(expand)
00192         {
00193             if(data->IsIgnored())
00194                 newImage = kIconFolderIgnoreOpened;
00195             else if(data->IsUnknown())
00196                 newImage = kIconFolderOpened;
00197             else if(data->IsMissing())
00198                 newImage = kIconFolderIgnoreLost;
00199             else
00200                 newImage = kIconFolderCVSOpened;
00201         }
00202         else
00203         {
00204             if(data->IsIgnored())
00205                 newImage = kIconFolderIgnoreClosed;
00206             else if(data->IsUnknown())
00207                 newImage = kIconFolderClosed;
00208             else if(data->IsMissing())
00209                 newImage = kIconFolderIgnoreLost;
00210             else
00211                 newImage = kIconFolderCVSClosed;
00212         }
00213     }
00214
00215 #if qGTK
00216     void *pixmap = 0L;
00217     switch(newImage)
00218     {
00219     case kIconFolderClosed:
00220     case kIconFolderOpened:
00221         pixmap = sFolderUnknownIcon;
00222         break;
00223     case kIconFolderCVSClosed:
00224     case kIconFolderCVSOpened:
00225         pixmap = sFolderIcon;
00226         break;
00227     case kIconFolderIgnoreClosed:
00228     case kIconFolderIgnoreOpened:
00229         pixmap = sFolderIgnoredIcon;
00230         break;
00231     case kIconFolderIgnoreLost:
00232         pixmap = sFolderMissingIcon;
00233         break;
00234     }
00235     if(pixmap != 0L)
00236     {
00237         result = gtk_pixmap_new (GTK_PIXMAP(pixmap)->pixmap, GTK_PIXMAP(pixmap)->mask);
00238     }
00239 #endif
00240
00241     return result;
00242 }

Here is the call graph for this function:

Variable Documentation

const char* gDummyFile = "@@@dummy file@@@" [static]

Definition at line 63 of file UCvsFolders.cpp.

Referenced by TBrowserFillDummy::ExitDirectory().

CMString gHistoryLocs(100,"P_BrowserLocs") [static]

Referenced by UCvsFolders::ResetBrowser().

PCPStr gOldLoc("P_BrowserLoc","C:\\") [static]

Referenced by UCvsFolders::OnCreate(), UCvsFolders::ResetBrowser(), and UCvsFolders::SetDefaultRoot().

void* sFolderIcon [static]

Definition at line 67 of file UCvsFolders.cpp.

Referenced by GetIcon(), and UCvsFolders::OnCreate().

void* sFolderIgnoredIcon [static]

Definition at line 69 of file UCvsFolders.cpp.

Referenced by GetIcon(), and UCvsFolders::OnCreate().

void* sFolderMissingIcon [static]

Definition at line 70 of file UCvsFolders.cpp.

Referenced by GetIcon(), and UCvsFolders::OnCreate().

void* sFolderUnknownIcon [static]

Definition at line 68 of file UCvsFolders.cpp.

Referenced by GetIcon(), and UCvsFolders::OnCreate().

bool sTemporaryTurnOffNotify = false [static]

Definition at line 153 of file UCvsFolders.cpp.

Referenced by UCvsFolders::DeleteAllItems(), UCvsFolders::OnTreeSelecting(), and UCvsFolders::StepToLocation().

Generated on Sat Aug 7 22:46:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFolders.h File Reference

common/UCvsFolders.h File Reference

#include "uwidget.h"
#include "CvsEntries.h"
#include "BrowseViewHandlers.h"

Include dependency graph for UCvsFolders.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class UCvsFolders

Generated on Sat Aug 7 22:46:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFrame.cpp File Reference

common/UCvsFrame.cpp File Reference

#include "stdafx.h"
#include "UCvsFrame.h"
#include "UCvsApp.h"
#include "UCvsCommands.h"
#include "UCvsConsole.h"
#include "UCvsFolders.h"
#include "UCvsFiles.h"
#include "UCvsToolbar.h"
#include "CvsAlert.h"
#include "PromptFiles.h"
#include "CvsPrefs.h"
#include "AppConsole.h"
#include "CvsCommands.h"
#include "TclGlue.h"
#include "MacrosSetup.h"
#include "GetPrefs.h"
#include "UCvsDialogs.h"
#include "BrowseViewHandlers.h"
#include "AboutDlg.h"
#include "MultiString.h"

Include dependency graph for UCvsFrame.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | BLOCK_UPDATE_UI
#define | START_UPDATE_UI
#define | END_UPDATE_UI

Functions

void | onIgnoreChanged (CObject *obj)

Variables

CKeyString | filterFileMasks (20,"P_OldFilterFileMasks")

Define Documentation

#define BLOCK_UPDATE_UI

Definition at line 144 of file UCvsFrame.cpp.

Referenced by UCvsFrame::OnCmdIgnore(), UCvsFrame::OnCmdReload(), UCvsFrame::OnHideUnknown(), UCvsFrame::OnViewAdded(), UCvsFrame::OnViewChanged(), UCvsFrame::OnViewConflict(), UCvsFrame::OnViewIgnored(), UCvsFrame::OnViewMissing(), UCvsFrame::OnViewModified(), UCvsFrame::OnViewRemoved(), and UCvsFrame::OnViewUnknown().

#define END_UPDATE_UI

Definition at line 146 of file UCvsFrame.cpp.

Referenced by UCvsFrame::OnCmdUIFilterMask(), UCvsFrame::OnCmdUIHideUnknown(), UCvsFrame::OnCmdUIIgnore(), UCvsFrame::OnCmdUIReload(), UCvsFrame::OnCmdUIViewAdded(), UCvsFrame::OnCmdUIViewChanged(), UCvsFrame::OnCmdUIViewConflict(), UCvsFrame::OnCmdUIViewIgnored(), UCvsFrame::OnCmdUIViewMissing(), UCvsFrame::OnCmdUIViewModified(), UCvsFrame::OnCmdUIViewRemoved(), and UCvsFrame::OnCmdUIViewUnknown().

#define START_UPDATE_UI

Definition at line 145 of file UCvsFrame.cpp.

Referenced by UCvsFrame::OnCmdUIFilterMask(), UCvsFrame::OnCmdUIHideUnknown(), UCvsFrame::OnCmdUIIgnore(), UCvsFrame::OnCmdUIReload(), UCvsFrame::OnCmdUIViewAdded(), UCvsFrame::OnCmdUIViewChanged(), UCvsFrame::OnCmdUIViewConflict(), UCvsFrame::OnCmdUIViewIgnored(), UCvsFrame::OnCmdUIViewMissing(), UCvsFrame::OnCmdUIViewModified(), UCvsFrame::OnCmdUIViewRemoved(), and UCvsFrame::OnCmdUIViewUnknown().

Function Documentation

void onIgnoreChanged ( CObject * obj )

Definition at line 159 of file UCvsFrame.cpp.

Referenced by UCvsFrame::OnCreate().

00160 {
00161     ((UCvsFrame *)obj)->OnCmdIgnore();
00162 }

Variable Documentation

CKeyString filterFileMasks(20,"P_OldFilterFileMasks")

Referenced by UCvsFrame::FreshenFileMask().

Generated on Sat Aug 7 22:46:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFrame.h File Reference

common/UCvsFrame.h File Reference

#include "uwidget.h"
#include "UCvsCommands.h"
#include "BrowseViewModel.h"

Include dependency graph for UCvsFrame.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | UCvsFrame
class | UWaitCursor

Defines

#define | NUM_FILEMASKS 20

Define Documentation

#define NUM_FILEMASKS 20

Definition at line 32 of file UCvsFrame.h.

Generated on Sat Aug 7 22:46:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsGraph.cpp File Reference

common/UCvsGraph.cpp File Reference

#include "stdafx.h"
#include <sys/stat.h>
#include "UCvsGraph.h"
#include "UCvsFiles.h"
#include "CvsEntries.h"
#include "AppConsole.h"
#include "LogParse.h"

Include dependency graph for UCvsGraph.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | DrawNode (UDC &hdc, const URect &selfB, UCOLORREF contour, UCOLORREF shadowc, bool isRounded, bool issel)

Variables

const int | kVChildSpace = 8
const int | kHChildSpace = 40
const int | kInflateNodeSpace = 8

Function Documentation

void DrawNode | ( | UDC & | hdc,
 |  | const URect & | selfB,
 |  | UCOLORREF | contour,
 |  | UCOLORREF | shadowc,
 |  | bool | isRounded,
 |  | bool | issel
 | ) | [static]

Definition at line 109 of file UCvsGraph.cpp.

References UPen::CreatePen(), UBrush::CreateSolidBrush(), UPen::DeleteObject(), UBrush::DeleteObject(), URect::OffsetRect(), UDC::Rectangle(), UDC::RoundRect(), UDC::SelectObject(), UCOLORREF, UPS_SOLID, and URGB.

00112 {
00113     UPen *pOldPen = 0L;
00114     UBrush *pOldBrush = 0L;
00115     UPen pen, pen2;
00116     UBrush brush;
00117     UCOLORREF selcolor = URGB(160, 160, 160);
00118     UCOLORREF wcolor = URGB(255, 255, 255);
00119
00120     try
00121     {
00122         if(!isRounded)
00123         {
00124             if(!issel)
00125             {
00126                 brush.CreateSolidBrush(wcolor);
00127                 pOldBrush = hdc.SelectObject(&brush);
00128                 pen.CreatePen(UPS_SOLID, 1, contour);
00129                 pOldPen = hdc.SelectObject(&pen);
00130                 hdc.Rectangle(selfB);
00131             }
00132             else
00133             {
00134                 brush.CreateSolidBrush(selcolor);
00135                 pOldBrush = hdc.SelectObject(&brush);
00136                 pen.CreatePen(UPS_SOLID, 1, contour);
00137                 pOldPen = hdc.SelectObject(&pen);
00138                 hdc.Rectangle(selfB);
00139             }
00140         }
00141         else
00142         {
00143             URect shadow;
00144             if(!issel)
00145             {
00146                 brush.CreateSolidBrush(shadowc);
00147                 pOldBrush = hdc.SelectObject(&brush);
00148                 pen.CreatePen(UPS_SOLID, 1, shadowc);
00149                 pOldPen = hdc.SelectObject(&pen);
00150                 shadow = selfB;
00151                 shadow.OffsetRect(UPoint(2, 2));
00152                 hdc.RoundRect(&shadow, UPoint(6, 6));
00153
00154                 brush.DeleteObject();
00155                 brush.CreateSolidBrush(wcolor);
00156                 hdc.SelectObject(&brush);
00157                 pen2.CreatePen(UPS_SOLID, 1, contour);
00158                 hdc.SelectObject(&pen2);
00159                 hdc.RoundRect(selfB, UPoint(6, 6));
00160             }
00161             else
00162             {
00163                 brush.CreateSolidBrush(shadowc);
00164                 pOldBrush = hdc.SelectObject(&brush);
00165                 pen.CreatePen(UPS_SOLID, 1, shadowc);
00166                 pOldPen = hdc.SelectObject(&pen);
00167                 shadow = selfB;
00168                 shadow.OffsetRect(UPoint(2, 2));
00169                 hdc.RoundRect(&shadow, UPoint(6, 6));
00170
00171                 brush.DeleteObject();
00172                 brush.CreateSolidBrush(selcolor);
00173                 hdc.SelectObject(&brush);
00174                 pen2.CreatePen(UPS_SOLID, 1, contour);
00175                 hdc.SelectObject(&pen2);
00176                 hdc.RoundRect(selfB, UPoint(6, 6));
00177             }
00178         }
00179
00180         if (pOldPen != 0L)
00181         {
00182             hdc.SelectObject(pOldPen);
00183             pOldPen = 0L;
00184         }
00185         if (pOldBrush != 0L)
00186         {
00187             hdc.SelectObject(pOldBrush);
00188             pOldBrush = 0L;
00189         }
00190
00191         pen.DeleteObject();
00192         pen2.DeleteObject();
00193         brush.DeleteObject();
00194     }
00195     catch(...)
00196     {
00197         if (pOldPen != 0L)
00198             hdc.SelectObject(pOldPen);
00199         if (pOldBrush != 0L)
00200             hdc.SelectObject(pOldBrush);
00201     }
00202 }

Here is the call graph for this function:

Variable Documentation

const int kHChildSpace = 40

Definition at line 381 of file UCvsGraph.cpp.

Referenced by CWinLogData::ComputeBounds(), and CWinLogData::Update().

const int kInflateNodeSpace = 8

Definition at line 382 of file UCvsGraph.cpp.

Referenced by CWinLogData::ComputeBounds().

const int kVChildSpace = 8

Definition at line 380 of file UCvsGraph.cpp.

Referenced by CWinLogData::ComputeBounds().

Generated on Sat Aug 7 22:46:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsGraph.h File Reference

common/UCvsGraph.h File Reference

#include "uwidget.h"
#include "CvsLog.h"
#include "udraw.h"

Include dependency graph for UCvsGraph.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CScrollView
class | CWinLogData
Windows log data abstract class. More...
class | CWinLogHeaderData
Windows log header node data. More...
class | CWinLogRevData
Windows log revision node data. More...
class | CWinLogTagData
Windows log tag node data. More...
class | CWinLogBranchData
Windows log branch node data. More...
class | UCvsGraph

Generated on Sat Aug 7 22:46:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsMenubar.cpp File Reference

common/UCvsMenubar.cpp File Reference

#include "stdafx.h"
#include "UCvsMenubar.h"
#include "UCvsCommands.h"
#include "MacrosSetup.h"

Include dependency graph for UCvsMenubar.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void CreateMainMenubar (int widid)

Function Documentation

void CreateMainMenubar ( int widid )

Definition at line 55 of file UCvsMenubar.cpp.

References _i18n, cmdABOUT, cmdADD, cmdADDB, cmdADMINMACROS, cmdARRANGE, cmdBROWSER_BAR, cmdCASCADE, cmdCHECKOUT, cmdCLEAR_ALL, cmdCMDLINE, cmdCOMMIT, cmdCONSOLE_BAR, cmdCOPY, cmdCOPYRIGHTS, cmdCREDITS, cmdCUT, cmdCVS, cmdCVSCLIENT, cmdDIFF, cmdEDIT, cmdEDITORS, cmdEDITSEL, cmdEDITSELDEF, cmdEXIT, cmdEXPLORE, cmdFILES_BAR, cmdFIND, cmdFINDER, cmdFONT, cmdGRAPH, cmdIMPORT, cmdINIT, cmdLOCKF, cmdLOG, cmdLOGIN, cmdLOGOUT, cmdMACROADMIN, cmdMACROS, cmdMULTI_BAR, cmdOPEN, cmdPASTE, cmdPREFERENCES, cmdPRINT, cmdPRINT_PREVIEW, cmdPRINT_SETUP, cmdQUERYUPDATE, cmdRELEASE, cmdRELOAD, cmdREPEAT, cmdRESEDIT, cmdRMV, cmdRTAGBRANCH, cmdRTAGCREATE, cmdRTAGDELETE, cmdSAVE, cmdSAVE_AS, cmdSAVESETTINGS, cmdSELECT_ALL, cmdSELMACRO, cmdSEND_MAIL, cmdSHELL, cmdSTATUS, cmdSTATUS_BAR, cmdSTOPCVS, cmdTAGBRANCH, cmdTAGDELETE, cmdTAGNEW, cmdTAGS_BAR, cmdTILE_HORZ, cmdTOOLBAR, cmdTRASH, cmdUNDO, cmdUNEDIT, cmdUNLOCKF, cmdUPDATE, cmdUSE_PYSHELL, cmdUSE_TCLSHELL, cmdWATCHERS, cmdWATCHOFF, cmdWATCHON, cmdWORKSPACE, CMacroSet::entries, gMacrosAdmin, gMacrosSel, UMENU, UMENU_NULL, UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), and UMenuAddSeparator().

00056 {
00057     std::vector<CMacroEntry>::const_iterator i;
00058     int cnt;
00059
00060     UMENU menu = UMenuAddPulldown(widid, _i18n("&File"), UMENU_NULL);
00061     UMenuAddButton(widid, _i18n("&Save\tCtrl+S"), menu, 0L, cmdSAVE);
00062     UMenuAddButton(widid, _i18n("Save &As..."), menu, 0L, cmdSAVE_AS);
00063     UMenuAddSeparator(widid, menu);
00064     UMenuAddButton(widid, _i18n("&Print...\tCtrl+P"), menu, 0L, cmdPRINT);
00065     UMenuAddButton(widid, _i18n("Print Pre&view"), menu, 0L, cmdPRINT_PREVIEW);
00066     UMenuAddButton(widid, _i18n("P&rint Setup..."), menu, 0L, cmdPRINT_SETUP);
00067     UMenuAddSeparator(widid, menu);
00068     UMenuAddButton(widid, _i18n("Sen&d..."), menu, 0L, cmdSEND_MAIL);
00069     UMenuAddSeparator(widid, menu);
00070     UMenuAddButton(widid, _i18n("E&xit\tCtrl+Q"), menu, 0L, cmdEXIT);
00071
00072     menu = UMenuAddPulldown(widid, _i18n("&Edit"), UMENU_NULL);
00073     UMenuAddButton(widid, _i18n("&Undo\tCtrl+Z"), menu, 0L, cmdUNDO);
00074     UMenuAddSeparator(widid, menu);
00075     UMenuAddButton(widid, _i18n("Cu&t\tCtrl+X"), menu, 0L, cmdCUT);
00076     UMenuAddButton(widid, _i18n("&Copy\tCtrl+C"), menu, 0L, cmdCOPY);
00077     UMenuAddButton(widid, _i18n("&Paste\tCtrl+V"), menu, 0L, cmdPASTE);
00078     UMenuAddSeparator(widid, menu);
00079     UMenuAddButton(widid, _i18n("Select &All\tCtrl+A"), menu, 0L, cmdSELECT_ALL);
00080     UMenuAddButton(widid, _i18n("&Erase all"), menu, 0L, cmdCLEAR_ALL);
00081     UMenuAddSeparator(widid, menu);
00082     UMenuAddButton(widid, _i18n("&Find...\tCtrl+F"), menu, 0L, cmdFIND);
00083     UMenuAddButton(widid, _i18n("Find next\tF3"), menu, 0L, cmdREPEAT);
00084     UMenuAddSeparator(widid, menu);
00085     UMenuAddButton(widid, _i18n("F&ont..."), menu, 0L, cmdFONT);
00086     menu = UMenuAddPulldown(widid, _i18n("&Shell"), menu, cmdSHELL);
00087     UMenuAddRadio(widid, _i18n("&Tcl"), menu, 0L, cmdUSE_TCLSHELL);
00088     UMenuAddRadio(widid, _i18n("&Python"), menu, 0L, cmdUSE_PYSHELL);
00089
00090     menu = UMenuAddPulldown(widid, _i18n("&View"), UMENU_NULL);
00091     UMenuAddButton(widid, _i18n("&Toolbar"), menu, 0L, cmdTOOLBAR);
00092     UMenuAddButton(widid, _i18n("&Status Bar"), menu, 0L, cmdSTATUS_BAR);
00093     UMenuAddButton(widid, _i18n("&Browser Bar"), menu, 0L, cmdBROWSER_BAR);
00094     UMenuAddButton(widid, _i18n("&Files Bar"), menu, 0L, cmdFILES_BAR);
00095     UMenuAddButton(widid, _i18n("&Multi-Users Bar"), menu, 0L, cmdMULTI_BAR);
00096     UMenuAddButton(widid, _i18n("T&ags Bar"), menu, 0L, cmdTAGS_BAR);
00097     UMenuAddButton(widid, _i18n("&Console Bar"), menu, 0L, cmdCONSOLE_BAR);
00098     UMenuAddButton(widid, _i18n("&Workspace Bar"), menu, 0L, cmdWORKSPACE);
00099     UMenuAddSeparator(widid, menu);
00100     UMenuAddButton(widid, _i18n("Change browser &location..."), menu, 0L, cmdOPEN);
00101     UMenuAddButton(widid, _i18n("S&ave settings for location..."), menu, 0L, cmdSAVESETTINGS);
00102
00103     menu = UMenuAddPulldown(widid, _i18n("&Admin"), UMENU_NULL);
00104     UMenuAddButton(widid, _i18n("Pr&eferences...\tCtrl+F1"), menu, 0L, cmdPREFERENCES);
00105     UMenuAddButton(widid, _i18n("&Command Line..."), menu, 0L, cmdCMDLINE);
00106     UMenuAddSeparator(widid, menu);
00107     UMenuAddButton(widid, _i18n("&Login..."), menu, 0L, cmdLOGIN);
00108     UMenuAddButton(widid, _i18n("Lo&gout"), menu, 0L, cmdLOGOUT);
00109     UMenuAddSeparator(widid, menu);
00110     UMenuAddButton(widid, _i18n("&Stop cvs"), menu, 0L, cmdSTOPCVS);
00111     menu = UMenuAddPulldown(widid, _i18n("Macros admin"), menu, cmdADMINMACROS);
00112     for(cnt = 0, i = gMacrosAdmin.entries.begin(); i != gMacrosAdmin.entries.end(); ++i, cnt++)
00113     {
00114         UMenuAddButton(widid, (*i).name, menu, 0L, cmdMACROADMIN + cnt);
00115     }
00116
00117     menu = UMenuAddPulldown(widid, _i18n("&Remote"), UMENU_NULL);
00118     UMenuAddButton(widid, _i18n("&Create a new repository..."), menu, 0L, cmdINIT);
00119     UMenuAddSeparator(widid, menu);
00120     UMenuAddButton(widid, _i18n("Import module..."), menu, 0L, cmdIMPORT);
00121     UMenuAddButton(widid, _i18n("Checkout module..."), menu, 0L, cmdCHECKOUT);
00122     UMenuAddSeparator(widid, menu);
00123     UMenuAddButton(widid, _i18n("&Create a tag by module..."), menu, 0L, cmdRTAGCREATE);
00124     UMenuAddButton(widid, _i18n("&Delete a tag by module..."), menu, 0L, cmdRTAGDELETE);
00125     UMenuAddButton(widid, _i18n("Create a &branch by module..."), menu, 0L, cmdRTAGBRANCH);
00126
00127     menu = UMenuAddPulldown(widid, _i18n("&Modify"), UMENU_NULL);
00128     UMenuAddButton(widid, _i18n("&Update selection...\tCtrl+U"), menu, 0L, cmdUPDATE);
00129     UMenuAddButton(widid, _i18n("Co&mmit selection...\tCtrl+M"), menu, 0L, cmdCOMMIT);
00130     UMenuAddSeparator(widid, menu);
00131     UMenuAddButton(widid, _i18n("&Add selection"), menu, 0L, cmdADD);
00132     UMenuAddButton(widid, _i18n("Add selection binar&y"), menu, 0L, cmdADDB);
00133     UMenuAddButton(widid, _i18n("&Remove selection"), menu, 0L, cmdRMV);
00134     UMenuAddSeparator(widid, menu);
00135     UMenuAddButton(widid, _i18n("Erase &selection\tCtrl+Backspace"), menu, 0L, cmdTRASH);
00136     UMenuAddSeparator(widid, menu);
00137     UMenuAddButton(widid, _i18n("&Create a tag on selection..."), menu, 0L, cmdTAGNEW);
00138     UMenuAddButton(widid, _i18n("&Delete a tag on selection..."), menu, 0L, cmdTAGDELETE);
00139     UMenuAddButton(widid, _i18n("Create a &branch on selection..."), menu, 0L, cmdTAGBRANCH);
00140
00141     menu = UMenuAddPulldown(widid, _i18n("&Query"), UMENU_NULL);
00142     UMenuAddButton(widid, _i18n("E&xplore selection\tF2"), menu, 0L, cmdEXPLORE);
00143     UMenuAddButton(widid, _i18n("&Query Update\tF4"), menu, 0L, cmdQUERYUPDATE);
00144     UMenuAddButton(widid, _i18n("R&eload view\tF5"), menu, 0L, cmdRELOAD);
00145     UMenuAddSeparator(widid, menu);
00146     UMenuAddButton(widid, _i18n("View selection\tF7"), menu, 0L, cmdEDITSEL);
00147     UMenuAddButton(widid, _i18n("View default"), menu, 0L, cmdEDITSELDEF);
00148     UMenuAddSeparator(widid, menu);
00149     UMenuAddButton(widid, _i18n("&Diff selection\tCtrl+D"), menu, 0L, cmdDIFF);
00150     UMenuAddButton(widid, _i18n("&Log selection"), menu, 0L, cmdLOG);
00151     UMenuAddButton(widid, _i18n("Status sele&ction"), menu, 0L, cmdSTATUS);
00152     UMenuAddButton(widid, _i18n("Graph selection\tCtrl+G"), menu, 0L, cmdGRAPH);
00153
00154     menu = UMenuAddPulldown(widid, _i18n("&Trace"), UMENU_NULL);
00155     UMenuAddButton(widid, _i18n("Lock selection"), menu, 0L, cmdLOCKF);
00156     UMenuAddButton(widid, _i18n("Unlock selection"), menu, 0L, cmdUNLOCKF);
00157     UMenuAddButton(widid, _i18n("Edit selection"), menu, 0L, cmdEDIT);
00158     UMenuAddButton(widid, _i18n("Reserved edit selection"), menu, 0L, cmdRESEDIT);
00159     UMenuAddButton(widid, _i18n("Unedit selection"), menu, 0L, cmdUNEDIT);
00160     UMenuAddButton(widid, _i18n("Add a Watch on selection"), menu, 0L, cmdWATCHON);
00161     UMenuAddButton(widid, _i18n("Remove a watch from selection"), menu, 0L, cmdWATCHOFF);
00162     UMenuAddSeparator(widid, menu);
00163     UMenuAddButton(widid, _i18n("Release selection"), menu, 0L, cmdRELEASE);
00164     UMenuAddSeparator(widid, menu);
00165     UMenuAddButton(widid, _i18n("Watchers of selection"), menu, 0L, cmdWATCHERS);
00166     UMenuAddButton(widid, _i18n("Editors of selection"), menu, 0L, cmdEDITORS);
00167
00168     menu = UMenuAddPulldown(widid, _i18n("Macro&s"), UMENU_NULL, cmdMACROS);
00169     for(cnt = 0, i = gMacrosSel.entries.begin(); i != gMacrosSel.entries.end(); ++i, cnt++)
00170     {
00171 #ifdef USE_PYTHON
00172         UMenuAddButton(widid, (*i).name, menu, 0L, cmdPyMACROS + cnt);
00173 #else
00174         UMenuAddButton(widid, (*i).name, menu, 0L, cmdSELMACRO + cnt);
00175 #endif
00176     }
00177
00178     menu = UMenuAddPulldown(widid, _i18n("&Window"), UMENU_NULL);
00179     UMenuAddButton(widid, _i18n("&Cascade"), menu, 0L, cmdCASCADE);
00180     UMenuAddButton(widid, _i18n("&Tile"), menu, 0L, cmdTILE_HORZ);
00181     UMenuAddButton(widid, _i18n("&Arrange Icons"), menu, 0L, cmdARRANGE);
00182
00183     menu = UMenuAddPulldown(widid, _i18n("&Help"), UMENU_NULL);
00184     UMenuAddButton(widid, _i18n("&Help Topics"), menu, 0L, cmdFINDER);
00185     UMenuAddButton(widid, _i18n("Help on cvs-1.10"), menu, 0L, cmdCVS);
00186     UMenuAddButton(widid, _i18n("Help on cvs client"), menu, 0L, cmdCVSCLIENT);
00187     UMenuAddSeparator(widid, menu);
00188     UMenuAddButton(widid, _i18n("&Credits"), menu, 0L, cmdCREDITS);
00189     UMenuAddButton(widid, _i18n("C&opyrights"), menu, 0L, cmdCOPYRIGHTS);
00190     UMenuAddSeparator(widid, menu);
00191 #ifdef WIN32
00192     UMenuAddButton(widid, _i18n("&About wincvs..."), menu, 0L, cmdABOUT);
00193 #endif
00194 #ifdef qUnix
00195     UMenuAddButton(widid, _i18n("&About gcvs..."), menu, 0L, cmdABOUT);
00196 #endif
00197 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsMenubar.h File Reference

common/UCvsMenubar.h File Reference

#include "umenu.h"

Include dependency graph for UCvsMenubar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | UCvsMenubar

Functions

void | CreateMainMenubar (int widid)

Function Documentation

void CreateMainMenubar ( int widid )

Definition at line 55 of file UCvsMenubar.cpp.

References _i18n, cmdABOUT, cmdADD, cmdADDB, cmdADMINMACROS, cmdARRANGE, cmdBROWSER_BAR, cmdCASCADE, cmdCHECKOUT, cmdCLEAR_ALL, cmdCMDLINE, cmdCOMMIT, cmdCONSOLE_BAR, cmdCOPY, cmdCOPYRIGHTS, cmdCREDITS, cmdCUT, cmdCVS, cmdCVSCLIENT, cmdDIFF, cmdEDIT, cmdEDITORS, cmdEDITSEL, cmdEDITSELDEF, cmdEXIT, cmdEXPLORE, cmdFILES_BAR, cmdFIND, cmdFINDER, cmdFONT, cmdGRAPH, cmdIMPORT, cmdINIT, cmdLOCKF, cmdLOG, cmdLOGIN, cmdLOGOUT, cmdMACROADMIN, cmdMACROS, cmdMULTI_BAR, cmdOPEN, cmdPASTE, cmdPREFERENCES, cmdPRINT, cmdPRINT_PREVIEW, cmdPRINT_SETUP, cmdQUERYUPDATE, cmdRELEASE, cmdRELOAD, cmdREPEAT, cmdRESEDIT, cmdRMV, cmdRTAGBRANCH, cmdRTAGCREATE, cmdRTAGDELETE, cmdSAVE, cmdSAVE_AS, cmdSAVESETTINGS, cmdSELECT_ALL, cmdSELMACRO, cmdSEND_MAIL, cmdSHELL, cmdSTATUS, cmdSTATUS_BAR, cmdSTOPCVS, cmdTAGBRANCH, cmdTAGDELETE, cmdTAGNEW, cmdTAGS_BAR, cmdTILE_HORZ, cmdTOOLBAR, cmdTRASH, cmdUNDO, cmdUNEDIT, cmdUNLOCKF, cmdUPDATE, cmdUSE_PYSHELL, cmdUSE_TCLSHELL, cmdWATCHERS, cmdWATCHOFF, cmdWATCHON, cmdWORKSPACE, CMacroSet::entries, gMacrosAdmin, gMacrosSel, UMENU, UMENU_NULL, UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), and UMenuAddSeparator().

00056 {
00057     std::vector<CMacroEntry>::const_iterator i;
00058     int cnt;
00059
00060     UMENU menu = UMenuAddPulldown(widid, _i18n("&File"), UMENU_NULL);
00061     UMenuAddButton(widid, _i18n("&Save\tCtrl+S"), menu, 0L, cmdSAVE);
00062     UMenuAddButton(widid, _i18n("Save &As..."), menu, 0L, cmdSAVE_AS);
00063     UMenuAddSeparator(widid, menu);
00064     UMenuAddButton(widid, _i18n("&Print...\tCtrl+P"), menu, 0L, cmdPRINT);
00065     UMenuAddButton(widid, _i18n("Print Pre&view"), menu, 0L, cmdPRINT_PREVIEW);
00066     UMenuAddButton(widid, _i18n("P&rint Setup..."), menu, 0L, cmdPRINT_SETUP);
00067     UMenuAddSeparator(widid, menu);
00068     UMenuAddButton(widid, _i18n("Sen&d..."), menu, 0L, cmdSEND_MAIL);
00069     UMenuAddSeparator(widid, menu);
00070     UMenuAddButton(widid, _i18n("E&xit\tCtrl+Q"), menu, 0L, cmdEXIT);
00071
00072     menu = UMenuAddPulldown(widid, _i18n("&Edit"), UMENU_NULL);
00073     UMenuAddButton(widid, _i18n("&Undo\tCtrl+Z"), menu, 0L, cmdUNDO);
00074     UMenuAddSeparator(widid, menu);
00075     UMenuAddButton(widid, _i18n("Cu&t\tCtrl+X"), menu, 0L, cmdCUT);
00076     UMenuAddButton(widid, _i18n("&Copy\tCtrl+C"), menu, 0L, cmdCOPY);
00077     UMenuAddButton(widid, _i18n("&Paste\tCtrl+V"), menu, 0L, cmdPASTE);
00078     UMenuAddSeparator(widid, menu);
00079     UMenuAddButton(widid, _i18n("Select &All\tCtrl+A"), menu, 0L, cmdSELECT_ALL);
00080     UMenuAddButton(widid, _i18n("&Erase all"), menu, 0L, cmdCLEAR_ALL);
00081     UMenuAddSeparator(widid, menu);
00082     UMenuAddButton(widid, _i18n("&Find...\tCtrl+F"), menu, 0L, cmdFIND);
00083     UMenuAddButton(widid, _i18n("Find next\tF3"), menu, 0L, cmdREPEAT);
00084     UMenuAddSeparator(widid, menu);
00085     UMenuAddButton(widid, _i18n("F&ont..."), menu, 0L, cmdFONT);
00086     menu = UMenuAddPulldown(widid, _i18n("&Shell"), menu, cmdSHELL);
00087     UMenuAddRadio(widid, _i18n("&Tcl"), menu, 0L, cmdUSE_TCLSHELL);
00088     UMenuAddRadio(widid, _i18n("&Python"), menu, 0L, cmdUSE_PYSHELL);
00089
00090     menu = UMenuAddPulldown(widid, _i18n("&View"), UMENU_NULL);
00091     UMenuAddButton(widid, _i18n("&Toolbar"), menu, 0L, cmdTOOLBAR);
00092     UMenuAddButton(widid, _i18n("&Status Bar"), menu, 0L, cmdSTATUS_BAR);
00093     UMenuAddButton(widid, _i18n("&Browser Bar"), menu, 0L, cmdBROWSER_BAR);
00094     UMenuAddButton(widid, _i18n("&Files Bar"), menu, 0L, cmdFILES_BAR);
00095     UMenuAddButton(widid, _i18n("&Multi-Users Bar"), menu, 0L, cmdMULTI_BAR);
00096     UMenuAddButton(widid, _i18n("T&ags Bar"), menu, 0L, cmdTAGS_BAR);
00097     UMenuAddButton(widid, _i18n("&Console Bar"), menu, 0L, cmdCONSOLE_BAR);
00098     UMenuAddButton(widid, _i18n("&Workspace Bar"), menu, 0L, cmdWORKSPACE);
00099     UMenuAddSeparator(widid, menu);
00100     UMenuAddButton(widid, _i18n("Change browser &location..."), menu, 0L, cmdOPEN);
00101     UMenuAddButton(widid, _i18n("S&ave settings for location..."), menu, 0L, cmdSAVESETTINGS);
00102
00103     menu = UMenuAddPulldown(widid, _i18n("&Admin"), UMENU_NULL);
00104     UMenuAddButton(widid, _i18n("Pr&eferences...\tCtrl+F1"), menu, 0L, cmdPREFERENCES);
00105     UMenuAddButton(widid, _i18n("&Command Line..."), menu, 0L, cmdCMDLINE);
00106     UMenuAddSeparator(widid, menu);
00107     UMenuAddButton(widid, _i18n("&Login..."), menu, 0L, cmdLOGIN);
00108     UMenuAddButton(widid, _i18n("Lo&gout"), menu, 0L, cmdLOGOUT);
00109     UMenuAddSeparator(widid, menu);
00110     UMenuAddButton(widid, _i18n("&Stop cvs"), menu, 0L, cmdSTOPCVS);
00111     menu = UMenuAddPulldown(widid, _i18n("Macros admin"), menu, cmdADMINMACROS);
00112     for(cnt = 0, i = gMacrosAdmin.entries.begin(); i != gMacrosAdmin.entries.end(); ++i, cnt++)
00113     {
00114         UMenuAddButton(widid, (*i).name, menu, 0L, cmdMACROADMIN + cnt);
00115     }
00116
00117     menu = UMenuAddPulldown(widid, _i18n("&Remote"), UMENU_NULL);
00118     UMenuAddButton(widid, _i18n("&Create a new repository..."), menu, 0L, cmdINIT);
00119     UMenuAddSeparator(widid, menu);
00120     UMenuAddButton(widid, _i18n("Import module..."), menu, 0L, cmdIMPORT);
00121     UMenuAddButton(widid, _i18n("Checkout module..."), menu, 0L, cmdCHECKOUT);
00122     UMenuAddSeparator(widid, menu);
00123     UMenuAddButton(widid, _i18n("&Create a tag by module..."), menu, 0L, cmdRTAGCREATE);
00124     UMenuAddButton(widid, _i18n("&Delete a tag by module..."), menu, 0L, cmdRTAGDELETE);
00125     UMenuAddButton(widid, _i18n("Create a &branch by module..."), menu, 0L, cmdRTAGBRANCH);
00126
00127     menu = UMenuAddPulldown(widid, _i18n("&Modify"), UMENU_NULL);
00128     UMenuAddButton(widid, _i18n("&Update selection...\tCtrl+U"), menu, 0L, cmdUPDATE);
00129     UMenuAddButton(widid, _i18n("Co&mmit selection...\tCtrl+M"), menu, 0L, cmdCOMMIT);
00130     UMenuAddSeparator(widid, menu);
00131     UMenuAddButton(widid, _i18n("&Add selection"), menu, 0L, cmdADD);
00132     UMenuAddButton(widid, _i18n("Add selection binar&y"), menu, 0L, cmdADDB);
00133     UMenuAddButton(widid, _i18n("&Remove selection"), menu, 0L, cmdRMV);
00134     UMenuAddSeparator(widid, menu);
00135     UMenuAddButton(widid, _i18n("Erase &selection\tCtrl+Backspace"), menu, 0L, cmdTRASH);
00136     UMenuAddSeparator(widid, menu);
00137     UMenuAddButton(widid, _i18n("&Create a tag on selection..."), menu, 0L, cmdTAGNEW);
00138     UMenuAddButton(widid, _i18n("&Delete a tag on selection..."), menu, 0L, cmdTAGDELETE);
00139     UMenuAddButton(widid, _i18n("Create a &branch on selection..."), menu, 0L, cmdTAGBRANCH);
00140
00141     menu = UMenuAddPulldown(widid, _i18n("&Query"), UMENU_NULL);
00142     UMenuAddButton(widid, _i18n("E&xplore selection\tF2"), menu, 0L, cmdEXPLORE);
00143     UMenuAddButton(widid, _i18n("&Query Update\tF4"), menu, 0L, cmdQUERYUPDATE);
00144     UMenuAddButton(widid, _i18n("R&eload view\tF5"), menu, 0L, cmdRELOAD);
00145     UMenuAddSeparator(widid, menu);
00146     UMenuAddButton(widid, _i18n("View selection\tF7"), menu, 0L, cmdEDITSEL);
00147     UMenuAddButton(widid, _i18n("View default"), menu, 0L, cmdEDITSELDEF);
00148     UMenuAddSeparator(widid, menu);
00149     UMenuAddButton(widid, _i18n("&Diff selection\tCtrl+D"), menu, 0L, cmdDIFF);
00150     UMenuAddButton(widid, _i18n("&Log selection"), menu, 0L, cmdLOG);
00151     UMenuAddButton(widid, _i18n("Status sele&ction"), menu, 0L, cmdSTATUS);
00152     UMenuAddButton(widid, _i18n("Graph selection\tCtrl+G"), menu, 0L, cmdGRAPH);
00153
00154     menu = UMenuAddPulldown(widid, _i18n("&Trace"), UMENU_NULL);
00155     UMenuAddButton(widid, _i18n("Lock selection"), menu, 0L, cmdLOCKF);
00156     UMenuAddButton(widid, _i18n("Unlock selection"), menu, 0L, cmdUNLOCKF);
00157     UMenuAddButton(widid, _i18n("Edit selection"), menu, 0L, cmdEDIT);
00158     UMenuAddButton(widid, _i18n("Reserved edit selection"), menu, 0L, cmdRESEDIT);
00159     UMenuAddButton(widid, _i18n("Unedit selection"), menu, 0L, cmdUNEDIT);
00160     UMenuAddButton(widid, _i18n("Add a Watch on selection"), menu, 0L, cmdWATCHON);
00161     UMenuAddButton(widid, _i18n("Remove a watch from selection"), menu, 0L, cmdWATCHOFF);
00162     UMenuAddSeparator(widid, menu);
00163     UMenuAddButton(widid, _i18n("Release selection"), menu, 0L, cmdRELEASE);
00164     UMenuAddSeparator(widid, menu);
00165     UMenuAddButton(widid, _i18n("Watchers of selection"), menu, 0L, cmdWATCHERS);
00166     UMenuAddButton(widid, _i18n("Editors of selection"), menu, 0L, cmdEDITORS);
00167
00168     menu = UMenuAddPulldown(widid, _i18n("Macro&s"), UMENU_NULL, cmdMACROS);
00169     for(cnt = 0, i = gMacrosSel.entries.begin(); i != gMacrosSel.entries.end(); ++i, cnt++)
00170     {
00171 #ifdef USE_PYTHON
00172         UMenuAddButton(widid, (*i).name, menu, 0L, cmdPyMACROS + cnt);
00173 #else
00174         UMenuAddButton(widid, (*i).name, menu, 0L, cmdSELMACRO + cnt);
00175 #endif
00176     }
00177
00178     menu = UMenuAddPulldown(widid, _i18n("&Window"), UMENU_NULL);
00179     UMenuAddButton(widid, _i18n("&Cascade"), menu, 0L, cmdCASCADE);
00180     UMenuAddButton(widid, _i18n("&Tile"), menu, 0L, cmdTILE_HORZ);
00181     UMenuAddButton(widid, _i18n("&Arrange Icons"), menu, 0L, cmdARRANGE);
00182
00183     menu = UMenuAddPulldown(widid, _i18n("&Help"), UMENU_NULL);
00184     UMenuAddButton(widid, _i18n("&Help Topics"), menu, 0L, cmdFINDER);
00185     UMenuAddButton(widid, _i18n("Help on cvs-1.10"), menu, 0L, cmdCVS);
00186     UMenuAddButton(widid, _i18n("Help on cvs client"), menu, 0L, cmdCVSCLIENT);
00187     UMenuAddSeparator(widid, menu);
00188     UMenuAddButton(widid, _i18n("&Credits"), menu, 0L, cmdCREDITS);
00189     UMenuAddButton(widid, _i18n("C&opyrights"), menu, 0L, cmdCOPYRIGHTS);
00190     UMenuAddSeparator(widid, menu);
00191 #ifdef WIN32
00192     UMenuAddButton(widid, _i18n("&About wincvs..."), menu, 0L, cmdABOUT);
00193 #endif
00194 #ifdef qUnix
00195     UMenuAddButton(widid, _i18n("&About gcvs..."), menu, 0L, cmdABOUT);
00196 #endif
00197 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsStatusbar.cpp File Reference

common/UCvsStatusbar.cpp File Reference

#include "stdafx.h"
#include "UCvsStatusbar.h"
#include "UCvsCommands.h"
#include "MacrosSetup.h"

Include dependency graph for UCvsStatusbar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsStatusbar.h File Reference

common/UCvsStatusbar.h File Reference

#include "uwidget.h"

Include dependency graph for UCvsStatusbar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class UCvsStatusbar

Generated on Sat Aug 7 22:46:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsToolbar.cpp File Reference

common/UCvsToolbar.cpp File Reference

#include "stdafx.h"
#include "UCvsToolbar.h"
#include "UCvsCommands.h"

Include dependency graph for UCvsToolbar.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | CreateMainToolbar (void)
void | CreateBrowseToolbar (void)
void | CreateFilterToolbar (void)

Function Documentation

void CreateBrowseToolbar ( void )

Definition at line 269 of file UCvsToolbar.cpp.

References EV_TB_END, EV_TB_INIT, UTB_INIT::heightbtn, kUCvsBrowseToolbarID, UTB_INIT::title, UEventSendMessage(), and UTB_INIT::widthbtn.

00270 {
00271     //  not used yet
00272     return;
00273
00274     UTB_INIT init;
00275     init.widthbtn = 16;
00276     init.heightbtn = 16;
00277     init.title = "Browse Toolbar";
00278     UEventSendMessage(kUCvsBrowseToolbarID, EV_TB_INIT, 0, &init);
00279
00280     UEventSendMessage(kUCvsBrowseToolbarID, EV_TB_END, 0, 0L);
00281 }

Here is the call graph for this function:

void CreateFilterToolbar ( void )

Definition at line 283 of file UCvsToolbar.cpp.

References _i18n, cmdFLAT, cmdHIDE_UNKNOWN, cmdIGNORE, cmdRELOAD, cmdVIEW_ADDED, cmdVIEW_CHANGED, cmdVIEW_CONFLICT, cmdVIEW_FILEMASK, cmdVIEW_MISSING, cmdVIEW_MODIFIED, cmdVIEW_REMOVED, cmdVIEW_UNKNOWN, DDD_NONE, DDV_NONE, EV_TB_BUTTON, EV_TB_CHECKBTN, EV_TB_DROPDOWN, EV_TB_END, EV_TB_INIT, EV_TB_SEPARATOR, UTB_INIT::heightbtn, kUCvsFilterToolbarID, UTB_INIT::title, UEventSendMessage(), and UTB_INIT::widthbtn.

00284 {
00285     UTB_INIT init;
00286     init.widthbtn = 16;
00287     init.heightbtn = 16;
00288     init.title = "Filter Toolbar";
00289     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_INIT, 0, &init);
00290
00291     UTB_BUTTON flatBtn = {
00292         "flat.xpm",
00293         cmdFLAT,
00294         DDV_NONE,
00295         DDD_NONE,
00296         _i18n("view recursive")
00297     };
00298
00299     UTB_DROPDOWN viewFilterDropDown = {
00300         cmdVIEW_FILEMASK,
00301         0x0,
00302         _i18n("Enter file mask(s) of files to display")
00303     };
00304
00305     UTB_BUTTON viewModifiedBtn = {
00306         "viewModified.xpm",
00307         cmdVIEW_MODIFIED,
00308         DDV_NONE,
00309         DDD_NONE,
00310         _i18n("view modified files")
00311     };
00312
00313     UTB_BUTTON viewChangedBtn = {
00314         "viewChanged.xpm",
00315         cmdVIEW_CHANGED,
00316         DDV_NONE,
00317         DDD_NONE,
00318         _i18n("view changed files")
00319     };
00320
00321     UTB_BUTTON viewAddedBtn = {
00322         "viewAdded.xpm",
00323         cmdVIEW_ADDED,
00324         DDV_NONE,
00325         DDD_NONE,
00326         _i18n("view added files")
00327     };
00328
00329     UTB_BUTTON viewRemovedBtn = {
00330         "viewRemove.xpm",
00331         cmdVIEW_REMOVED,
00332         DDV_NONE,
00333         DDD_NONE,
00334         _i18n("view removed files")
00335     };
00336
00337     UTB_BUTTON viewConflictBtn = {
00338         "viewConflict.xpm",
00339         cmdVIEW_CONFLICT,
00340         DDV_NONE,
00341         DDD_NONE,
00342         _i18n("view conflict files")
00343     };
00344
00345     UTB_BUTTON viewUnknownBtn = {
00346         "viewUnknown.xpm",
00347         cmdVIEW_UNKNOWN,
00348         DDV_NONE,
00349         DDD_NONE,
00350         _i18n("view unknown files")
00351     };
00352
00353     UTB_BUTTON hideUnknownBtn = {
00354         "hideUnknown.xpm",
00355         cmdHIDE_UNKNOWN,
00356         DDV_NONE,
00357         DDD_NONE,
00358         _i18n("hide unknown files")
00359     };
00360
00361     UTB_BUTTON viewMissingBtn = {
00362         "viewMissing.xpm",
00363         cmdVIEW_MISSING,
00364         DDV_NONE,
00365         DDD_NONE,
00366         _i18n("view only missing files")
00367     };
00368
00369     UTB_BUTTON viewIgnoredBtn = {
00370         "viewIgnored.xpm",
00371         cmdIGNORE,
00372         DDV_NONE,
00373         DDD_NONE,
00374         _i18n("View or hide the cvs ignored files\nIgnore switch")
00375     };
00376
00377     UTB_BUTTON reloadBtn = {
00378         "reload.xpm",
00379         cmdRELOAD,
00380         DDV_NONE,
00381         DDD_NONE,
00382         _i18n("Refresh the views, updating the contents\nRefresh view")
00383     };
00384
00385     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &flatBtn);
00386     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00387     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_DROPDOWN, 0, &viewFilterDropDown);
00388     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00389     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewModifiedBtn);
00390     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewChangedBtn);
00391     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewAddedBtn);
00392     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewRemovedBtn);
00393     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewConflictBtn);
00394     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00395     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewUnknownBtn);
00396     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &hideUnknownBtn);
00397     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00398     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewMissingBtn);
00399     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewIgnoredBtn);
00400     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00401     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_BUTTON, 0, &reloadBtn);
00402     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_END, 0, 0L);
00403 }

Here is the call graph for this function:

void CreateMainToolbar ( void )

Definition at line 54 of file UCvsToolbar.cpp.

References _i18n, cmdADD, cmdADDB, cmdCOMMIT, cmdDIFF, cmdEDIT, cmdEXPLORE, cmdGRAPH, cmdLOCKF, cmdLOG, cmdRELEASE, cmdRESEDIT, cmdRMV, cmdSTATUS, cmdSTOPCVS, cmdTAGBRANCH, cmdTAGDELETE, cmdTAGNEW, cmdTRASH, cmdUNEDIT, cmdUNLOCKF, cmdUPDATE, cmdUPFOLDER, cmdWATCHOFF, cmdWATCHON, DDD_NONE, DDV_NONE, EV_TB_BUTTON, EV_TB_END, EV_TB_INIT, EV_TB_SEPARATOR, UTB_INIT::heightbtn, kUCvsToolbarID, UTB_INIT::title, UEventSendMessage(), and UTB_INIT::widthbtn.

00055 {
00056     UTB_INIT init;
00057     init.widthbtn = 16;
00058     init.heightbtn = 16;
00059     init.title = "Main Toolbar";
00060     UEventSendMessage(kUCvsToolbarID, EV_TB_INIT, 0, &init);
00061
00062     UTB_BUTTON updtBtn = {
00063         "update.xpm",
00064         cmdUPDATE,
00065         DDV_NONE,
00066         DDD_NONE,
00067         _i18n("Update the selected items, changes your disk only\nUpdate selected")
00068     };
00069     UTB_BUTTON commitBtn = {
00070         "commit.xpm",
00071         cmdCOMMIT,
00072         DDV_NONE,
00073         DDD_NONE,
00074         _i18n("Commit the selected items, changes the remote repository\nCommit selected")
00075     };
00076     UTB_BUTTON stopBtn = {
00077         "stop.xpm",
00078         cmdSTOPCVS,
00079         DDV_NONE,
00080         DDD_NONE,
00081         _i18n("Stop when cvs is running...\nStop cvs...")
00082     };
00083     UTB_BUTTON exploreBtn = {
00084         "explore.xpm",
00085         cmdEXPLORE,
00086         DDV_NONE,
00087         DDD_NONE,
00088         _i18n("Open an explorer window for this selection\nExplore selection")
00089     };
00090     UTB_BUTTON upBtn = {
00091         "upfolder.xpm",
00092         cmdUPFOLDER,
00093         DDV_NONE,
00094         DDD_NONE,
00095         _i18n("Go to the upper folder and refresh\nUp one level")
00096     };
00097     UTB_BUTTON diffBtn = {
00098         "diff.xpm",
00099         cmdDIFF,
00100         DDV_NONE,
00101         DDD_NONE,
00102         _i18n("Print the differences with the CVS remote repository\nDiff selected")
00103     };
00104     UTB_BUTTON logBtn = {
00105         "log.xpm",
00106         cmdLOG,
00107         DDV_NONE,
00108         DDD_NONE,
00109         _i18n("Print the history of the selected files\nLog selected")
00110     };
00111     UTB_BUTTON statusBtn = {
00112         "status.xpm",
00113         cmdSTATUS,
00114         DDV_NONE,
00115         DDD_NONE,
00116         _i18n("Print the current status of the selected files\nStatus selected")
00117     };
00118     UTB_BUTTON graphBtn = {
00119         "graph.xpm",
00120         cmdGRAPH,
00121         DDV_NONE,
00122         DDD_NONE,
00123         _i18n("Print the history as a graph of the selected files\nGraph selected")
00124     };
00125     UTB_BUTTON trashBtn = {
00126         "trash.xpm",
00127         cmdTRASH,
00128         DDV_NONE,
00129         DDD_NONE,
00130         _i18n("Erase the selection from your disk\nErase selected")
00131     };
00132     UTB_BUTTON addBtn = {
00133         "add.xpm",
00134         cmdADD,
00135         DDV_NONE,
00136         DDD_NONE,
00137         _i18n("Add the selected items to the remote CVS repository\nAdd selected")
00138     };
00139     UTB_BUTTON addbBtn = {
00140         "addb.xpm",
00141         cmdADDB,
00142         DDV_NONE,
00143         DDD_NONE,
00144         _i18n("Add the selected binary items to the remote CVS repository\nAdd selected binary")
00145     };
00146     UTB_BUTTON rmvBtn = {
00147         "remove.xpm",
00148         cmdRMV,
00149         DDV_NONE,
00150         DDD_NONE,
00151         _i18n("Remove the selected items to the remote CVS repository\nRemove selected")
00152     };
00153     UTB_BUTTON tagBtn = {
00154         "tag.xpm",
00155         cmdTAGNEW,
00156         DDV_NONE,
00157         DDD_NONE,
00158         _i18n("Create/move a tag on the selection\nTag selection")
00159     };
00160     UTB_BUTTON untagBtn = {
00161         "untag.xpm",
00162         cmdTAGDELETE,
00163         DDV_NONE,
00164         DDD_NONE,
00165         _i18n("Remove a tag on the selection\nUntag selection")
00166     };
00167     UTB_BUTTON branchBtn = {
00168         "branch.xpm",
00169         cmdTAGBRANCH,
00170         DDV_NONE,
00171         DDD_NONE,
00172         _i18n("Open (fork) a branch on the selection\nFork selection")
00173     };
00174     UTB_BUTTON lockBtn = {
00175         "lock.xpm",
00176         cmdLOCKF,
00177         DDV_NONE,
00178         DDD_NONE,
00179         _i18n("Lock the selected file on the remote repository until next commit\nLock selection")
00180     };
00181     UTB_BUTTON unlockBtn = {
00182         "unlock.xpm",
00183         cmdUNLOCKF,
00184         DDV_NONE,
00185         DDD_NONE,
00186         _i18n("Unlock the selected file on the remote repository\nUnlock selection")
00187     };
00188     UTB_BUTTON watchBtn = {
00189         "watch.xpm",
00190         cmdWATCHON,
00191         DDV_NONE,
00192         DDD_NONE,
00193         _i18n("Put a watch on the selected files\nWatch selection")
00194     };
00195     UTB_BUTTON unwatchBtn = {
00196         "unwatch.xpm",
00197         cmdWATCHOFF,
00198         DDV_NONE,
00199         DDD_NONE,
00200         _i18n("Release a watch on the selected files\nRelease watch selection")
00201     };
00202     UTB_BUTTON editBtn = {
00203         "edit.xpm",
00204         cmdEDIT,
00205         DDV_NONE,
00206         DDD_NONE,
00207         _i18n("Edit the selected files\nEdit selection")
00208     };
00209     UTB_BUTTON reseditBtn = {
00210         "res_edit.xpm",
00211         cmdRESEDIT,
00212         DDV_NONE,
00213         DDD_NONE,
00214         _i18n("Reserved edit the selected files\nReserve edit selection")
00215     };
00216     UTB_BUTTON uneditBtn = {
00217         "unedit.xpm",
00218         cmdUNEDIT,
00219         DDV_NONE,
00220         DDD_NONE,
00221         _i18n("Unedit the selected files\nUnedit selection")
00222     };
00223     UTB_BUTTON releaseBtn = {
00224         "release.xpm",
00225         cmdRELEASE,
00226         DDV_NONE,
00227         DDD_NONE,
00228         _i18n("Release the selected files\nRelease selection")
00229     };
00230
00231     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &updtBtn);
00232     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &commitBtn);
00233     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00234     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &stopBtn);
00235     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00236     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &addBtn);
00237     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &addbBtn);
00238     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &rmvBtn);
00239     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00240     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &exploreBtn);
00241     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &upBtn);
00242     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00243     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &diffBtn);
00244     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &logBtn);
00245     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &statusBtn);
00246     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00247     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &graphBtn);
00248     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00249     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &trashBtn);
00250     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00251     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &tagBtn);
00252     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &untagBtn);
00253     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &branchBtn);
00254     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00255     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &lockBtn);
00256     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &unlockBtn);
00257     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00258     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &watchBtn);
00259     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &unwatchBtn);
00260     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00261     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &editBtn);
00262     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &reseditBtn);
00263     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &uneditBtn);
00264     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00265     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &releaseBtn);
00266     UEventSendMessage(kUCvsToolbarID, EV_TB_END, 0, 0L);
00267 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsToolbar.h File Reference

common/UCvsToolbar.h File Reference

#include "utoolbar.h"

Include dependency graph for UCvsToolbar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | UCvsToolbar

Functions

void | CreateMainToolbar (void)
void | CreateBrowseToolbar (void)
void | CreateFilterToolbar (void)

Function Documentation

void CreateBrowseToolbar ( void )

Definition at line 269 of file UCvsToolbar.cpp.

References EV_TB_END, EV_TB_INIT, UTB_INIT::heightbtn, kUCvsBrowseToolbarID, UTB_INIT::title, UEventSendMessage(), and UTB_INIT::widthbtn.

00270 {
00271     //  not used yet
00272     return;
00273
00274     UTB_INIT init;
00275     init.widthbtn = 16;
00276     init.heightbtn = 16;
00277     init.title = "Browse Toolbar";
00278     UEventSendMessage(kUCvsBrowseToolbarID, EV_TB_INIT, 0, &init);
00279
00280     UEventSendMessage(kUCvsBrowseToolbarID, EV_TB_END, 0, 0L);
00281 }

Here is the call graph for this function:

void CreateFilterToolbar ( void )

Definition at line 283 of file UCvsToolbar.cpp.

References _i18n, cmdFLAT, cmdHIDE_UNKNOWN, cmdIGNORE, cmdRELOAD, cmdVIEW_ADDED, cmdVIEW_CHANGED, cmdVIEW_CONFLICT, cmdVIEW_FILEMASK, cmdVIEW_MISSING, cmdVIEW_MODIFIED, cmdVIEW_REMOVED, cmdVIEW_UNKNOWN, DDD_NONE, DDV_NONE, EV_TB_BUTTON, EV_TB_CHECKBTN, EV_TB_DROPDOWN, EV_TB_END, EV_TB_INIT, EV_TB_SEPARATOR, UTB_INIT::heightbtn, kUCvsFilterToolbarID, UTB_INIT::title, UEventSendMessage(), and UTB_INIT::widthbtn.

00284 {
00285     UTB_INIT init;
00286     init.widthbtn = 16;
00287     init.heightbtn = 16;
00288     init.title = "Filter Toolbar";
00289     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_INIT, 0, &init);
00290
00291     UTB_BUTTON flatBtn = {
00292         "flat.xpm",
00293         cmdFLAT,
00294         DDV_NONE,
00295         DDD_NONE,
00296         _i18n("view recursive")
00297     };
00298
00299     UTB_DROPDOWN viewFilterDropDown = {
00300         cmdVIEW_FILEMASK,
00301         0x0,
00302         _i18n("Enter file mask(s) of files to display")
00303     };
00304
00305     UTB_BUTTON viewModifiedBtn = {
00306         "viewModified.xpm",
00307         cmdVIEW_MODIFIED,
00308         DDV_NONE,
00309         DDD_NONE,
00310         _i18n("view modified files")
00311     };
00312
00313     UTB_BUTTON viewChangedBtn = {
00314         "viewChanged.xpm",
00315         cmdVIEW_CHANGED,
00316         DDV_NONE,
00317         DDD_NONE,
00318         _i18n("view changed files")
00319     };
00320
00321     UTB_BUTTON viewAddedBtn = {
00322         "viewAdded.xpm",
00323         cmdVIEW_ADDED,
00324         DDV_NONE,
00325         DDD_NONE,
00326         _i18n("view added files")
00327     };
00328
00329     UTB_BUTTON viewRemovedBtn = {
00330         "viewRemove.xpm",
00331         cmdVIEW_REMOVED,
00332         DDV_NONE,
00333         DDD_NONE,
00334         _i18n("view removed files")
00335     };
00336
00337     UTB_BUTTON viewConflictBtn = {
00338         "viewConflict.xpm",
00339         cmdVIEW_CONFLICT,
00340         DDV_NONE,
00341         DDD_NONE,
00342         _i18n("view conflict files")
00343     };
00344
00345     UTB_BUTTON viewUnknownBtn = {
00346         "viewUnknown.xpm",
00347         cmdVIEW_UNKNOWN,
00348         DDV_NONE,
00349         DDD_NONE,
00350         _i18n("view unknown files")
00351     };
00352
00353     UTB_BUTTON hideUnknownBtn = {
00354         "hideUnknown.xpm",
00355         cmdHIDE_UNKNOWN,
00356         DDV_NONE,
00357         DDD_NONE,
00358         _i18n("hide unknown files")
00359     };
00360
00361     UTB_BUTTON viewMissingBtn = {
00362         "viewMissing.xpm",
00363         cmdVIEW_MISSING,
00364         DDV_NONE,
00365         DDD_NONE,
00366         _i18n("view only missing files")
00367     };
00368
00369     UTB_BUTTON viewIgnoredBtn = {
00370         "viewIgnored.xpm",
00371         cmdIGNORE,
00372         DDV_NONE,
00373         DDD_NONE,
00374         _i18n("View or hide the cvs ignored files\nIgnore switch")
00375     };
00376
00377     UTB_BUTTON reloadBtn = {
00378         "reload.xpm",
00379         cmdRELOAD,
00380         DDV_NONE,
00381         DDD_NONE,
00382         _i18n("Refresh the views, updating the contents\nRefresh view")
00383     };
00384
00385     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &flatBtn);
00386     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00387     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_DROPDOWN, 0, &viewFilterDropDown);
00388     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00389     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewModifiedBtn);
00390     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewChangedBtn);
00391     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewAddedBtn);
00392     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewRemovedBtn);
00393     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewConflictBtn);
00394     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00395     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewUnknownBtn);
00396     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &hideUnknownBtn);
00397     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00398     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewMissingBtn);
00399     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewIgnoredBtn);
00400     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00401     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_BUTTON, 0, &reloadBtn);
00402     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_END, 0, 0L);
00403 }

Here is the call graph for this function:

void CreateMainToolbar ( void )

Definition at line 54 of file UCvsToolbar.cpp.

References _i18n, cmdADD, cmdADDB, cmdCOMMIT, cmdDIFF, cmdEDIT, cmdEXPLORE, cmdGRAPH, cmdLOCKF, cmdLOG, cmdRELEASE, cmdRESEDIT, cmdRMV, cmdSTATUS, cmdSTOPCVS, cmdTAGBRANCH, cmdTAGDELETE, cmdTAGNEW, cmdTRASH, cmdUNEDIT, cmdUNLOCKF, cmdUPDATE, cmdUPFOLDER, cmdWATCHOFF, cmdWATCHON, DDD_NONE, DDV_NONE, EV_TB_BUTTON, EV_TB_END, EV_TB_INIT, EV_TB_SEPARATOR, UTB_INIT::heightbtn, kUCvsToolbarID, UTB_INIT::title, UEventSendMessage(), and UTB_INIT::widthbtn.

00055 {
00056     UTB_INIT init;
00057     init.widthbtn = 16;
00058     init.heightbtn = 16;
00059     init.title = "Main Toolbar";
00060     UEventSendMessage(kUCvsToolbarID, EV_TB_INIT, 0, &init);
00061
00062     UTB_BUTTON updtBtn = {
00063         "update.xpm",
00064         cmdUPDATE,
00065         DDV_NONE,
00066         DDD_NONE,
00067         _i18n("Update the selected items, changes your disk only\nUpdate selected")
00068     };
00069     UTB_BUTTON commitBtn = {
00070         "commit.xpm",
00071         cmdCOMMIT,
00072         DDV_NONE,
00073         DDD_NONE,
00074         _i18n("Commit the selected items, changes the remote repository\nCommit selected")
00075     };
00076     UTB_BUTTON stopBtn = {
00077         "stop.xpm",
00078         cmdSTOPCVS,
00079         DDV_NONE,
00080         DDD_NONE,
00081         _i18n("Stop when cvs is running...\nStop cvs...")
00082     };
00083     UTB_BUTTON exploreBtn = {
00084         "explore.xpm",
00085         cmdEXPLORE,
00086         DDV_NONE,
00087         DDD_NONE,
00088         _i18n("Open an explorer window for this selection\nExplore selection")
00089     };
00090     UTB_BUTTON upBtn = {
00091         "upfolder.xpm",
00092         cmdUPFOLDER,
00093         DDV_NONE,
00094         DDD_NONE,
00095         _i18n("Go to the upper folder and refresh\nUp one level")
00096     };
00097     UTB_BUTTON diffBtn = {
00098         "diff.xpm",
00099         cmdDIFF,
00100         DDV_NONE,
00101         DDD_NONE,
00102         _i18n("Print the differences with the CVS remote repository\nDiff selected")
00103     };
00104     UTB_BUTTON logBtn = {
00105         "log.xpm",
00106         cmdLOG,
00107         DDV_NONE,
00108         DDD_NONE,
00109         _i18n("Print the history of the selected files\nLog selected")
00110     };
00111     UTB_BUTTON statusBtn = {
00112         "status.xpm",
00113         cmdSTATUS,
00114         DDV_NONE,
00115         DDD_NONE,
00116         _i18n("Print the current status of the selected files\nStatus selected")
00117     };
00118     UTB_BUTTON graphBtn = {
00119         "graph.xpm",
00120         cmdGRAPH,
00121         DDV_NONE,
00122         DDD_NONE,
00123         _i18n("Print the history as a graph of the selected files\nGraph selected")
00124     };
00125     UTB_BUTTON trashBtn = {
00126         "trash.xpm",
00127         cmdTRASH,
00128         DDV_NONE,
00129         DDD_NONE,
00130         _i18n("Erase the selection from your disk\nErase selected")
00131     };
00132     UTB_BUTTON addBtn = {
00133         "add.xpm",
00134         cmdADD,
00135         DDV_NONE,
00136         DDD_NONE,
00137         _i18n("Add the selected items to the remote CVS repository\nAdd selected")
00138     };
00139     UTB_BUTTON addbBtn = {
00140         "addb.xpm",
00141         cmdADDB,
00142         DDV_NONE,
00143         DDD_NONE,
00144         _i18n("Add the selected binary items to the remote CVS repository\nAdd selected binary")
00145     };
00146     UTB_BUTTON rmvBtn = {
00147         "remove.xpm",
00148         cmdRMV,
00149         DDV_NONE,
00150         DDD_NONE,
00151         _i18n("Remove the selected items to the remote CVS repository\nRemove selected")
00152     };
00153     UTB_BUTTON tagBtn = {
00154         "tag.xpm",
00155         cmdTAGNEW,
00156         DDV_NONE,
00157         DDD_NONE,
00158         _i18n("Create/move a tag on the selection\nTag selection")
00159     };
00160     UTB_BUTTON untagBtn = {
00161         "untag.xpm",
00162         cmdTAGDELETE,
00163         DDV_NONE,
00164         DDD_NONE,
00165         _i18n("Remove a tag on the selection\nUntag selection")
00166     };
00167     UTB_BUTTON branchBtn = {
00168         "branch.xpm",
00169         cmdTAGBRANCH,
00170         DDV_NONE,
00171         DDD_NONE,
00172         _i18n("Open (fork) a branch on the selection\nFork selection")
00173     };
00174     UTB_BUTTON lockBtn = {
00175         "lock.xpm",
00176         cmdLOCKF,
00177         DDV_NONE,
00178         DDD_NONE,
00179         _i18n("Lock the selected file on the remote repository until next commit\nLock selection")
00180     };
00181     UTB_BUTTON unlockBtn = {
00182         "unlock.xpm",
00183         cmdUNLOCKF,
00184         DDV_NONE,
00185         DDD_NONE,
00186         _i18n("Unlock the selected file on the remote repository\nUnlock selection")
00187     };
00188     UTB_BUTTON watchBtn = {
00189         "watch.xpm",
00190         cmdWATCHON,
00191         DDV_NONE,
00192         DDD_NONE,
00193         _i18n("Put a watch on the selected files\nWatch selection")
00194     };
00195     UTB_BUTTON unwatchBtn = {
00196         "unwatch.xpm",
00197         cmdWATCHOFF,
00198         DDV_NONE,
00199         DDD_NONE,
00200         _i18n("Release a watch on the selected files\nRelease watch selection")
00201     };
00202     UTB_BUTTON editBtn = {
00203         "edit.xpm",
00204         cmdEDIT,
00205         DDV_NONE,
00206         DDD_NONE,
00207         _i18n("Edit the selected files\nEdit selection")
00208     };
00209     UTB_BUTTON reseditBtn = {
00210         "res_edit.xpm",
00211         cmdRESEDIT,
00212         DDV_NONE,
00213         DDD_NONE,
00214         _i18n("Reserved edit the selected files\nReserve edit selection")
00215     };
00216     UTB_BUTTON uneditBtn = {
00217         "unedit.xpm",
00218         cmdUNEDIT,
00219         DDV_NONE,
00220         DDD_NONE,
00221         _i18n("Unedit the selected files\nUnedit selection")
00222     };
00223     UTB_BUTTON releaseBtn = {
00224         "release.xpm",
00225         cmdRELEASE,
00226         DDV_NONE,
00227         DDD_NONE,
00228         _i18n("Release the selected files\nRelease selection")
00229     };
00230
00231     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &updtBtn);
00232     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &commitBtn);
00233     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00234     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &stopBtn);
00235     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00236     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &addBtn);
00237     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &addbBtn);
00238     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &rmvBtn);
00239     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00240     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &exploreBtn);
00241     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &upBtn);
00242     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00243     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &diffBtn);
00244     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &logBtn);
00245     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &statusBtn);
00246     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00247     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &graphBtn);
00248     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00249     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &trashBtn);
00250     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00251     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &tagBtn);
00252     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &untagBtn);
00253     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &branchBtn);
00254     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00255     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &lockBtn);
00256     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &unlockBtn);
00257     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00258     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &watchBtn);
00259     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &unwatchBtn);
00260     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00261     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &editBtn);
00262     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &reseditBtn);
00263     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &uneditBtn);
00264     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00265     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &releaseBtn);
00266     UEventSendMessage(kUCvsToolbarID, EV_TB_END, 0, 0L);
00267 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UpdateDlg.cpp File Reference

common/UpdateDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "OptionalPropertySheet.h"
#include "UpdateDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "ItemListDlg.h"
#include "GetPrefs.h"

Include dependency graph for UpdateDlg.cpp:

Include dependency graph

Go to the source code of this file.

Functions

CMString | gRevNames (20,"P_TagNames", sDefTagNames)
CMString | gDateNames (20,"P_DateNames", sDefDateNames)
CMString | gDateOrRevNames (20,"P_RebDateNames", sDefRevDateNames)
bool | CompatGetUpdate (const MultiFiles *mf, bool &toStdout, bool &noRecurs, bool &resetSticky, UStr &date, UStr &rev, bool &useMostRecent, UStr &rev1, UStr &rev2, bool &branchPointMerge, bool &threeWayConflicts, bool &createMissDir, bool &getCleanCopy, UStr &keyword, bool &caseSensitiveNames, bool &lastCheckinTime)
Get the update options.

Variables

CMString gRevNames
CMString gReleasesNames
CMString gDateNames
CMString gDateOrRevNames
char * | sDefTagNames []
Default tag names.
char * | sDefDateNames []
Default dates.
char * | sDefRevDateNames []
Default dates/revisions.

Function Documentation

bool CompatGetUpdate | ( | const MultiFiles * | mf,
 |  | bool & | toStdout,
 |  | bool & | noRecurs,
 |  | bool & | resetSticky,
 |  | UStr & | date,
 |  | UStr & | rev,
 |  | bool & | useMostRecent,
 |  | UStr & | rev1,
 |  | UStr & | rev2,
 |  | bool & | branchPointMerge,
 |  | bool & | threeWayConflicts,
 |  | bool & | createMissDir,
 |  | bool & | getCleanCopy,
 |  | UStr & | keyword,
 |  | bool & | caseSensitiveNames,
 |  | bool & | lastCheckinTime
 | ) |

Get the update options.

Definition at line 903 of file UpdateDlg.cpp.

References _i18n, CStr, EV_INIT_WIDGET, gCvsPrefs, CvsPrefs::HideCommandDlgUpdate(), kUMainWidget, CUpdateMerge::m_branchPointMerge, CUpdateOptions::m_caseSensitiveNames, CUpdateMain::m_createmissdir, CUpdateOptions::m_date, CUpdateMerge::m_date1, CUpdateMerge::m_date2, CUpdateMain::m_getcleancopy, CUpdateOptions::m_hasDate, CUpdateMerge::m_hasDate1, CUpdateMerge::m_hasDate2, CUpdateOptions::m_hasRev, CUpdateOptions::m_keyword, CUpdateOptions::m_lastCheckinTime, CUpdateOptions::m_match, CUpdateMerge::m_mergeType, CUpdateMain::m_norecurs, CUpdateOptions::m_resetSticky, CUpdateOptions::m_rev, CUpdateMerge::m_rev1, CUpdateMerge::m_rev2, CUpdateOptions::m_stdout, CUpdateMerge::m_threeWayConflicts, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgUpdate(), CvsPrefs::SetUpdateCaseSensitiveNames(), CvsPrefs::SetUpdateLastCheckinTime(), CvsPrefs::SetUpdateThreeWayConflicts(), CGetPrefs_GLOBALS::StoreValues(), UCreate_UpdateDlg(), UEventSendMessage(), CvsPrefs::UpdateCaseSensitiveNames(), CvsPrefs::UpdateLastCheckinTime(), and CvsPrefs::UpdateThreeWayConflicts().

Referenced by CvsCmdUpdate().

00915 {
00916     bool userHitOK = false;
00917
00918     static CStr sLastDate;
00919     static CStr sLastRev;
00920     static CStr sLastRev1;
00921     static CStr sLastRev2;
00922     static CStr sLastDate1;
00923     static CStr sLastDate2;
00924
00925     bool hasDate = false;
00926     bool hasRev = false;
00927     bool merge1 = false;
00928     bool merge2 = false;
00929     bool hasDate1 = false;
00930     bool hasDate2 = false;
00931
00932     date = "";
00933     rev = "";
00934     rev1 = "";
00935     rev2 = "";
00936     branchPointMerge = false;
00937     threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00938     toStdout = false;
00939     noRecurs = false;
00940     resetSticky = false;
00941     useMostRecent = false;
00942     createMissDir = false;
00943     getCleanCopy = false;
00944     keyword = "";
00945     caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00946     lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00947
00948 #ifdef WIN32
00949     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgUpdate(), _i18n("Update settings"));
00950     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00951
00952     CUpdateMain page1;
00953     CUpdateOptions page2(mf, sLastRev, sLastDate, keyword, resetSticky, caseSensitiveNames, lastCheckinTime);
00954     CUpdateMerge page3(mf, false, sLastRev1, sLastRev2, sLastDate1, sLastDate2, threeWayConflicts);
00955     CGetPrefs_GLOBALS page4;
00956
00957     pages.AddPage(&page1);
00958     pages.AddPage(&page2);
00959     pages.AddPage(&page3);
00960     pages.AddPage(&page4);
00961
00962     if( pages.DoModal() == IDOK )
00963     {
00964         noRecurs = page1.m_norecurs == TRUE;
00965         createMissDir = page1.m_createmissdir == TRUE;
00966         getCleanCopy = page1.m_getcleancopy == TRUE;
00967
00968         sLastDate = page2.m_date;
00969         sLastRev = page2.m_rev;
00970         hasDate = page2.m_hasDate == TRUE;
00971         hasRev = page2.m_hasRev == TRUE;
00972         useMostRecent = page2.m_match == TRUE;
00973         keyword = page2.m_keyword;
00974         resetSticky = page2.m_resetSticky == TRUE;
00975         toStdout = page2.m_stdout == TRUE;
00976         gCvsPrefs.SetUpdateCaseSensitiveNames(page2.m_caseSensitiveNames == TRUE);
00977         gCvsPrefs.SetUpdateLastCheckinTime(page2.m_lastCheckinTime == TRUE);
00978
00979         merge1 = page3.m_mergeType >= 1;
00980         merge2 = page3.m_mergeType == 2;
00981         sLastRev1 = page3.m_rev1;
00982         sLastRev2 = page3.m_rev2;
00983         hasDate1 = page3.m_hasDate1 == TRUE;
00984         hasDate2 = page3.m_hasDate2 == TRUE;
00985         sLastDate1 = page3.m_date1;
00986         sLastDate2 = page3.m_date2;
00987         branchPointMerge = page3.m_branchPointMerge == TRUE;
00988         gCvsPrefs.SetUpdateThreeWayConflicts(page3.m_threeWayConflicts == TRUE);
00989
00990         page4.StoreValues();
00991         gCvsPrefs.SetHideCommandDlgUpdate(pages.GetHideCommandDlg());
00992         userHitOK = true;
00993     }
00994 #endif /* WIN32 */
00995 #ifdef qMacCvsPP
00996     StOptionalDialogHandler theHandler(dlg_Update, gCvsPrefs.HideCommandDlgUpdate(), LCommander::GetTopCommander());
00997     LWindow *theDialog = theHandler.GetDialog();
00998     ThrowIfNil_(theDialog);
00999     static UInt16 sRuntimePanel = 1;
01000
01001     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01002         (theDialog->FindPaneByID(item_MultiViewPrefs));
01003     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01004
01005     multiView->SwitchToPanel(4);
01006     DoDataExchange_Globals(theDialog, true);
01007     multiView->SwitchToPanel(3);
01008     DoDataExchange_UpdateMerge(theDialog, mf, merge1, merge2, sLastRev1, sLastRev2, true);
01009     multiView->SwitchToPanel(2);
01010     DoDataExchange_UpdateSticky(theDialog, mf, hasDate, hasRev, sLastDate, sLastRev, useMostRecent, true);
01011     multiView->SwitchToPanel(1);
01012     DoDataExchange_UpdateSettings(theDialog, toStdout, noRecurs, resetSticky, createMissDir, getCleanCopy, true);
01013
01014     groupView->SetValue(sRuntimePanel);
01015
01016     theHandler.ShowDialog();
01017     MessageT hitMessage;
01018     while (true)
01019     {       // Let DialogHandler process events
01020         hitMessage = theHandler.DoDialog();
01021
01022         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01023             break;
01024     }
01025     theDialog->Hide();
01026     sRuntimePanel = groupView->GetValue();
01027
01028     if(hitMessage == msg_OK)
01029     {
01030         multiView->SwitchToPanel(1);
01031         DoDataExchange_UpdateSettings(theDialog, toStdout, noRecurs, resetSticky, createMissDir, getCleanCopy, false);
01032         multiView->SwitchToPanel(2);
01033         DoDataExchange_UpdateSticky(theDialog, mf, hasDate, hasRev, sLastDate, sLastRev, useMostRecent, false);
01034         multiView->SwitchToPanel(3);
01035         DoDataExchange_UpdateMerge(theDialog, mf, merge1, merge2, sLastRev1, sLastRev2, false);
01036         multiView->SwitchToPanel(4);
01037         DoDataExchange_Globals(theDialog, false);
01038         gCvsPrefs.SetHideCommandDlgUpdate(theHandler.GetHideCommandDlg());
01039         userHitOK = true;
01040     }
01041 #endif /* qMacCvsPP */
01042 #if qUnix
01043     void *wid;
01044 #   if qGTK
01045     wid = UCreate_UpdateDlg();
01046 #   endif
01047
01048     UCvsUpdate *dlg = new UCvsUpdate();
01049     UCvsUpdate_MAIN *tab1 = new UCvsUpdate_MAIN();
01050     UCvsUpdate_STICKY *tab2 = new UCvsUpdate_STICKY(sLastRev, sLastDate);
01051     UCvsUpdate_MERGE *tab3 = new UCvsUpdate_MERGE(sLastRev1, sLastRev2);
01052     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01053     dlg->AddPage(tab1, UCvsUpdate::kTabGeneral, 0);
01054     dlg->AddPage(tab2, UCvsUpdate::kTabGeneral, 1);
01055     dlg->AddPage(tab3, UCvsUpdate::kTabGeneral, 2);
01056
01057     if(dlg->DoModal())
01058     {
01059         toStdout = tab1->m_toStdout;
01060         noRecurs = tab1->m_noRecurs;
01061         resetSticky = tab1->m_resetSticky;
01062         createMissDir = tab1->m_createMissDir;
01063         getCleanCopy = tab1->m_getCleanCopy;
01064
01065         sLastDate = tab2->m_date;
01066         sLastRev = tab2->m_rev;
01067         hasDate = tab2->m_hasdate;
01068         hasRev = tab2->m_hasrev;
01069         useMostRecent = tab2->m_match;
01070
01071         merge1 = tab3->m_merge >= 1;
01072         merge2 = tab3->m_merge == 2;
01073         sLastRev1 = tab3->m_rev1;
01074         sLastRev2 = tab3->m_rev2;
01075
01076         userHitOK = true;
01077     }
01078
01079     delete dlg;
01080 #endif // qUnix
01081
01082     if( userHitOK )
01083     {
01084         threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
01085         caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
01086         lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
01087
01088         if( hasDate && !sLastDate.empty() )
01089             date = sLastDate;
01090
01091         if( hasRev && !sLastRev.empty() )
01092             rev = sLastRev;
01093
01094         if( merge1 && merge2 && !sLastRev1.empty() && !sLastRev2.empty() )
01095         {
01096             rev1 = sLastRev1;
01097             rev2 = sLastRev2;
01098
01099             if( hasDate1 )
01100                 rev1 << ":" << sLastDate1;
01101
01102             if( hasDate2 )
01103                 rev2 << ":" << sLastDate2;
01104         }
01105
01106         if( merge1 && !merge2 && !sLastRev1.empty() )
01107         {
01108             rev1 = sLastRev1;
01109
01110             if( hasDate1 )
01111                 rev1 << ":" << sLastDate1;
01112         }
01113
01114         gCvsPrefs.save();
01115     }
01116
01117     return userHitOK;
01118 }

Here is the call graph for this function:

CMString gDateNames | ( | 20 | ,
 |  | "P_DateNames" | ,
 |  | sDefDateNames |
 | ) |

CMString gDateOrRevNames | ( | 20 | ,
 |  | "P_RebDateNames" | ,
 |  | sDefRevDateNames |
 | ) |

CMString gRevNames | ( | 20 | ,
 |  | "P_TagNames" | ,
 |  | sDefTagNames |
 | ) |

Variable Documentation

CMString gDateNames(20,"P_DateNames", sDefDateNames)

CMString gDateOrRevNames(20,"P_RebDateNames", sDefRevDateNames)

CMString gReleasesNames

Referenced by CImport_MAIN::CImport_MAIN(), and CUpdateMerge::CUpdateMerge().

CMString gRevNames(20,"P_TagNames", sDefTagNames)

char* sDefDateNames[]

Initial value:

{
    "1998-3",
    "1998-3-24",
    "1998-3-24 20:55",
    "24 Mar",
    "24 Mar 1998",
    "<=1998-3-24",
    0L
}
Default dates.

Definition at line 78 of file UpdateDlg.cpp.

char* sDefRevDateNames[]

Initial value:

{
    "1.1",
    "1.6.2.4",
    "HEAD",
    "branch-release-1-0",
    "1998-3",
    "1998-3-24",
    "1998-3-24 20:55",
    "24 Mar",
    "24 Mar 1998",
    "<=1998-3-24",
    0L
}
Default dates/revisions.

Definition at line 90 of file UpdateDlg.cpp.

char* sDefTagNames[]

Initial value:

{
    "1.1",
    "1.6.2.4",
    "HEAD",
    "branch-release-1-0",
    0L
}
Default tag names.

Definition at line 68 of file UpdateDlg.cpp.

Generated on Sat Aug 7 22:46:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UpdateDlg.h File Reference

common/UpdateDlg.h File Reference

#include "MultiString.h"
#include "SmartComboBox.h"
#include "KeywordComboBox.h"
#include "HHelpSupport.h"

Include dependency graph for UpdateDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CUpdateMain
Main update page. More...
class | CUpdateOptions
Update options page. More...
class | CUpdateMerge
Merge update page. More...

Defines

#define | AFX_UPDATEDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Functions

bool | CompatGetUpdate (const MultiFiles *mf, bool &toStdout, bool &noRecurs, bool &resetSticky, UStr &date, UStr &rev, bool &useMostRecent, UStr &rev1, UStr &rev2, bool &branchPointMerge, bool &threeWayConflicts, bool &createMissDir, bool &getCleanCopy, UStr &keyword, bool &caseSensitiveNames, bool &lastCheckinTime)
Get the update options.

Define Documentation

#define AFX_UPDATEDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file UpdateDlg.h.

Function Documentation

bool CompatGetUpdate | ( | const MultiFiles * | mf,
 |  | bool & | toStdout,
 |  | bool & | noRecurs,
 |  | bool & | resetSticky,
 |  | UStr & | date,
 |  | UStr & | rev,
 |  | bool & | useMostRecent,
 |  | UStr & | rev1,
 |  | UStr & | rev2,
 |  | bool & | branchPointMerge,
 |  | bool & | threeWayConflicts,
 |  | bool & | createMissDir,
 |  | bool & | getCleanCopy,
 |  | UStr & | keyword,
 |  | bool & | caseSensitiveNames,
 |  | bool & | lastCheckinTime
 | ) |

Get the update options.

Definition at line 903 of file UpdateDlg.cpp.

References _i18n, CStr, EV_INIT_WIDGET, gCvsPrefs, CvsPrefs::HideCommandDlgUpdate(), kUMainWidget, CUpdateMerge::m_branchPointMerge, CUpdateOptions::m_caseSensitiveNames, CUpdateMain::m_createmissdir, CUpdateOptions::m_date, CUpdateMerge::m_date1, CUpdateMerge::m_date2, CUpdateMain::m_getcleancopy, CUpdateOptions::m_hasDate, CUpdateMerge::m_hasDate1, CUpdateMerge::m_hasDate2, CUpdateOptions::m_hasRev, CUpdateOptions::m_keyword, CUpdateOptions::m_lastCheckinTime, CUpdateOptions::m_match, CUpdateMerge::m_mergeType, CUpdateMain::m_norecurs, CUpdateOptions::m_resetSticky, CUpdateOptions::m_rev, CUpdateMerge::m_rev1, CUpdateMerge::m_rev2, CUpdateOptions::m_stdout, CUpdateMerge::m_threeWayConflicts, CvsPrefs::save(), CvsPrefs::SetHideCommandDlgUpdate(), CvsPrefs::SetUpdateCaseSensitiveNames(), CvsPrefs::SetUpdateLastCheckinTime(), CvsPrefs::SetUpdateThreeWayConflicts(), CGetPrefs_GLOBALS::StoreValues(), UCreate_UpdateDlg(), UEventSendMessage(), CvsPrefs::UpdateCaseSensitiveNames(), CvsPrefs::UpdateLastCheckinTime(), and CvsPrefs::UpdateThreeWayConflicts().

Referenced by CvsCmdUpdate().

00915 {
00916     bool userHitOK = false;
00917
00918     static CStr sLastDate;
00919     static CStr sLastRev;
00920     static CStr sLastRev1;
00921     static CStr sLastRev2;
00922     static CStr sLastDate1;
00923     static CStr sLastDate2;
00924
00925     bool hasDate = false;
00926     bool hasRev = false;
00927     bool merge1 = false;
00928     bool merge2 = false;
00929     bool hasDate1 = false;
00930     bool hasDate2 = false;
00931
00932     date = "";
00933     rev = "";
00934     rev1 = "";
00935     rev2 = "";
00936     branchPointMerge = false;
00937     threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00938     toStdout = false;
00939     noRecurs = false;
00940     resetSticky = false;
00941     useMostRecent = false;
00942     createMissDir = false;
00943     getCleanCopy = false;
00944     keyword = "";
00945     caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00946     lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00947
00948 #ifdef WIN32
00949     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgUpdate(), _i18n("Update settings"));
00950     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00951
00952     CUpdateMain page1;
00953     CUpdateOptions page2(mf, sLastRev, sLastDate, keyword, resetSticky, caseSensitiveNames, lastCheckinTime);
00954     CUpdateMerge page3(mf, false, sLastRev1, sLastRev2, sLastDate1, sLastDate2, threeWayConflicts);
00955     CGetPrefs_GLOBALS page4;
00956
00957     pages.AddPage(&page1);
00958     pages.AddPage(&page2);
00959     pages.AddPage(&page3);
00960     pages.AddPage(&page4);
00961
00962     if( pages.DoModal() == IDOK )
00963     {
00964         noRecurs = page1.m_norecurs == TRUE;
00965         createMissDir = page1.m_createmissdir == TRUE;
00966         getCleanCopy = page1.m_getcleancopy == TRUE;
00967
00968         sLastDate = page2.m_date;
00969         sLastRev = page2.m_rev;
00970         hasDate = page2.m_hasDate == TRUE;
00971         hasRev = page2.m_hasRev == TRUE;
00972         useMostRecent = page2.m_match == TRUE;
00973         keyword = page2.m_keyword;
00974         resetSticky = page2.m_resetSticky == TRUE;
00975         toStdout = page2.m_stdout == TRUE;
00976         gCvsPrefs.SetUpdateCaseSensitiveNames(page2.m_caseSensitiveNames == TRUE);
00977         gCvsPrefs.SetUpdateLastCheckinTime(page2.m_lastCheckinTime == TRUE);
00978
00979         merge1 = page3.m_mergeType >= 1;
00980         merge2 = page3.m_mergeType == 2;
00981         sLastRev1 = page3.m_rev1;
00982         sLastRev2 = page3.m_rev2;
00983         hasDate1 = page3.m_hasDate1 == TRUE;
00984         hasDate2 = page3.m_hasDate2 == TRUE;
00985         sLastDate1 = page3.m_date1;
00986         sLastDate2 = page3.m_date2;
00987         branchPointMerge = page3.m_branchPointMerge == TRUE;
00988         gCvsPrefs.SetUpdateThreeWayConflicts(page3.m_threeWayConflicts == TRUE);
00989
00990         page4.StoreValues();
00991         gCvsPrefs.SetHideCommandDlgUpdate(pages.GetHideCommandDlg());
00992         userHitOK = true;
00993     }
00994 #endif /* WIN32 */
00995 #ifdef qMacCvsPP
00996     StOptionalDialogHandler theHandler(dlg_Update, gCvsPrefs.HideCommandDlgUpdate(), LCommander::GetTopCommander());
00997     LWindow *theDialog = theHandler.GetDialog();
00998     ThrowIfNil_(theDialog);
00999     static UInt16 sRuntimePanel = 1;
01000
01001     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01002         (theDialog->FindPaneByID(item_MultiViewPrefs));
01003     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01004
01005     multiView->SwitchToPanel(4);
01006     DoDataExchange_Globals(theDialog, true);
01007     multiView->SwitchToPanel(3);
01008     DoDataExchange_UpdateMerge(theDialog, mf, merge1, merge2, sLastRev1, sLastRev2, true);
01009     multiView->SwitchToPanel(2);
01010     DoDataExchange_UpdateSticky(theDialog, mf, hasDate, hasRev, sLastDate, sLastRev, useMostRecent, true);
01011     multiView->SwitchToPanel(1);
01012     DoDataExchange_UpdateSettings(theDialog, toStdout, noRecurs, resetSticky, createMissDir, getCleanCopy, true);
01013
01014     groupView->SetValue(sRuntimePanel);
01015
01016     theHandler.ShowDialog();
01017     MessageT hitMessage;
01018     while (true)
01019     {       // Let DialogHandler process events
01020         hitMessage = theHandler.DoDialog();
01021
01022         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01023             break;
01024     }
01025     theDialog->Hide();
01026     sRuntimePanel = groupView->GetValue();
01027
01028     if(hitMessage == msg_OK)
01029     {
01030         multiView->SwitchToPanel(1);
01031         DoDataExchange_UpdateSettings(theDialog, toStdout, noRecurs, resetSticky, createMissDir, getCleanCopy, false);
01032         multiView->SwitchToPanel(2);
01033         DoDataExchange_UpdateSticky(theDialog, mf, hasDate, hasRev, sLastDate, sLastRev, useMostRecent, false);
01034         multiView->SwitchToPanel(3);
01035         DoDataExchange_UpdateMerge(theDialog, mf, merge1, merge2, sLastRev1, sLastRev2, false);
01036         multiView->SwitchToPanel(4);
01037         DoDataExchange_Globals(theDialog, false);
01038         gCvsPrefs.SetHideCommandDlgUpdate(theHandler.GetHideCommandDlg());
01039         userHitOK = true;
01040     }
01041 #endif /* qMacCvsPP */
01042 #if qUnix
01043     void *wid;
01044 #   if qGTK
01045     wid = UCreate_UpdateDlg();
01046 #   endif
01047
01048     UCvsUpdate *dlg = new UCvsUpdate();
01049     UCvsUpdate_MAIN *tab1 = new UCvsUpdate_MAIN();
01050     UCvsUpdate_STICKY *tab2 = new UCvsUpdate_STICKY(sLastRev, sLastDate);
01051     UCvsUpdate_MERGE *tab3 = new UCvsUpdate_MERGE(sLastRev1, sLastRev2);
01052     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01053     dlg->AddPage(tab1, UCvsUpdate::kTabGeneral, 0);
01054     dlg->AddPage(tab2, UCvsUpdate::kTabGeneral, 1);
01055     dlg->AddPage(tab3, UCvsUpdate::kTabGeneral, 2);
01056
01057     if(dlg->DoModal())
01058     {
01059         toStdout = tab1->m_toStdout;
01060         noRecurs = tab1->m_noRecurs;
01061         resetSticky = tab1->m_resetSticky;
01062         createMissDir = tab1->m_createMissDir;
01063         getCleanCopy = tab1->m_getCleanCopy;
01064
01065         sLastDate = tab2->m_date;
01066         sLastRev = tab2->m_rev;
01067         hasDate = tab2->m_hasdate;
01068         hasRev = tab2->m_hasrev;
01069         useMostRecent = tab2->m_match;
01070
01071         merge1 = tab3->m_merge >= 1;
01072         merge2 = tab3->m_merge == 2;
01073         sLastRev1 = tab3->m_rev1;
01074         sLastRev2 = tab3->m_rev2;
01075
01076         userHitOK = true;
01077     }
01078
01079     delete dlg;
01080 #endif // qUnix
01081
01082     if( userHitOK )
01083     {
01084         threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
01085         caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
01086         lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
01087
01088         if( hasDate && !sLastDate.empty() )
01089             date = sLastDate;
01090
01091         if( hasRev && !sLastRev.empty() )
01092             rev = sLastRev;
01093
01094         if( merge1 && merge2 && !sLastRev1.empty() && !sLastRev2.empty() )
01095         {
01096             rev1 = sLastRev1;
01097             rev2 = sLastRev2;
01098
01099             if( hasDate1 )
01100                 rev1 << ":" << sLastDate1;
01101
01102             if( hasDate2 )
01103                 rev2 << ":" << sLastDate2;
01104         }
01105
01106         if( merge1 && !merge2 && !sLastRev1.empty() )
01107         {
01108             rev1 = sLastRev1;
01109
01110             if( hasDate1 )
01111                 rev1 << ":" << sLastDate1;
01112         }
01113
01114         gCvsPrefs.save();
01115     }
01116
01117     return userHitOK;
01118 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/VolsPaths.c File Reference

common/VolsPaths.c File Reference

#include "VolsPaths.h"
#include <Types.h>
#include <Files.h>
#include <Resources.h>
#include <errors.h>
#include <Memory.h>
#include <string.h>
#include <strings.h>
#include <TextUtils.h>

Include dependency graph for VolsPaths.c:

Include dependency graph

Go to the source code of this file.

Defines

#define | VOLSPATHS_C

Functions

OSErr | VRef2VolName (short theVRef, StringPtr theVolName)
OSErr | VolName2VRef (StringPtr myPVolName, short *theVRefPtr)
OSErr | PathNameFromDirID (const long aDirID, const short avRefNum, char *aPath)
OSErr | PathNameFromWD (const short avRefNum, char *aPath)

Define Documentation

#define VOLSPATHS_C

Definition at line 39 of file VolsPaths.c.

Function Documentation

OSErr PathNameFromDirID | ( | const long | aDirID,
 |  | const short | avRefNum,
 |  | char * | aPath
 | ) |

Definition at line 158 of file VolsPaths.c.

References NULL.

Referenced by PathNameFromWD().

00161 {
00162     Handle      strHandle = NULL;
00163     OSErr       anError = noErr;
00164     long        currDirID = 0,
00165                 nextDirID = 0;
00166     Size        theLen = 0;     // GetHandleSize
00167     char        tempName[64];   // directory or volume name
00168     CInfoPBRec  aPBblock;
00169
00170     /* create an empty string handle for Munger */
00171     strHandle = NewHandle(0);
00172
00173     if (strHandle == NULL)
00174     {
00175         anError = MemError();
00176     }
00177     else
00178     {
00179         *aPath = '\0';
00180         aPBblock.dirInfo.ioCompletion   = NULL;
00181         aPBblock.dirInfo.ioNamePtr      = (StringPtr)tempName;  // temp destination buffer
00182         nextDirID                       = aDirID;   // start at DirID passed in..
00183
00184         /* walk up the directories, collecting dir names as we go, until we hit the top (volname) */
00185         do {
00186
00187             aPBblock.dirInfo.ioVRefNum      = avRefNum;
00188             aPBblock.dirInfo.ioFDirIndex    = -1; // ignore ioNamePtr input, use ioDirID
00189             aPBblock.dirInfo.ioDrDirID      = nextDirID;
00190
00191             anError = PBGetCatInfoSync(&aPBblock);
00192             currDirID   = aPBblock.dirInfo.ioDrDirID;   // remember current
00193             nextDirID   = aPBblock.dirInfo.ioDrParID;   // find parent for next loop
00194
00195             if (anError != noErr)
00196                 break;
00197
00198             /* Insert a separator in front of the Directory Entry */
00199             Munger(strHandle, 0L, NULL, 0L, ":", 1L);
00200
00201             /* Insert the next directory/volume name into the front of the string */
00202             Munger(strHandle, 0L, NULL, 0L, &(tempName[1]), (long)tempName[0]);
00203
00204             /* NOTE: fsRtDirID is defined in Files.h */
00205         } while (currDirID != fsRtDirID);
00206
00207         /* now move the string into the parameter */
00208         theLen = GetHandleSize(strHandle);
00209         if (!anError && theLen)
00210         {
00211             BlockMove(&(**strHandle), aPath, theLen);
00212             anError = MemError();
00213         }
00214         aPath[theLen] = '\0';   /* set C string length */
00215
00216         /* dispose of temp storage */
00217         DisposeHandle(strHandle);
00218
00219     } /*else NULL*/
00220
00221     return(anError);
00222
00223 } /* PathNameFromDirID */

OSErr PathNameFromWD | ( | const short | avRefNum,
 |  | char * | aPath
 | ) |

Definition at line 247 of file VolsPaths.c.

References NULL, and PathNameFromDirID().

00249 {
00250     WDPBRec aPBblock;
00251     OSErr   anError = noErr;
00252
00253 /*
00254  PBGetWDInfo has a bug under A/UX 1.1.  If vRefNum is a real vRefNum
00255  and not a wdRefNum, then it returns garbage.  Since A/UX has only 1
00256  volume (in the Macintosh sense) and only 1 root directory, this can
00257  occur only when a file has been selected in the root directory (/).
00258  So we look for this and hard code the DirID and vRefNum.
00259  */
00260 #if defined(AUX)
00261     if ((aPathStyle == ePathTypeAUX) && (avRefNum == -1))
00262     {
00263         anError = PathNameFromDirID(fsRtDirID, -1, aPath);
00264     }
00265     else
00266 #endif
00267     {
00268         aPBblock.ioCompletion = NULL;
00269         aPBblock.ioNamePtr = NULL;
00270         aPBblock.ioVRefNum = avRefNum;
00271         aPBblock.ioWDIndex = 0;
00272         aPBblock.ioWDProcID = 0;
00273
00274         /* Change the Working Directory number in vRefnum into a real vRefnum */
00275         /* and DirID. The real vRefnum is returned in ioVRefnum, and the real */
00276         /* DirID is returned in ioWDDirID. */
00277
00278         anError = PBGetWDInfoSync(&aPBblock);
00279         if (anError == noErr)
00280             anError = PathNameFromDirID(aPBblock.ioWDDirID,
00281                                         aPBblock.ioWDVRefNum,
00282                                         aPath);
00283     }
00284
00285     return(anError);
00286
00287 } /* PathNameFromWD */

Here is the call graph for this function:

OSErr VolName2VRef | ( | StringPtr | myPVolName,
 |  | short * | theVRefPtr
 | ) |

Definition at line 90 of file VolsPaths.c.

00091 {
00092     OSErr           anError = noErr;
00093     Boolean         foundIt = false;
00094     short           theDriveNum;
00095     short           theVRefNum;
00096     HParamBlockRec  aParamBlk;
00097     char            myCVolName[32], theCVolName[32];
00098     Str31           theVolName;
00099
00100     // convert passed vol name from P 2 C string for compare
00101     p2cstrcpy(myCVolName, myPVolName);
00102
00103     // loop through all mounted volumes, see if myPVolName matches one
00104     for (theDriveNum = 1; !foundIt && (anError==noErr); theDriveNum++)
00105     {
00106         theVolName[0] = '\0';
00107         aParamBlk.volumeParam.ioNamePtr = (StringPtr)&theVolName;
00108         aParamBlk.volumeParam.ioVolIndex = theDriveNum;
00109
00110         anError = PBHGetVInfoSync((HParmBlkPtr)&aParamBlk);
00111         if (anError == noErr)
00112         {
00113             p2cstrcpy(theCVolName, theVolName);
00114             if (strcmp(theCVolName, myCVolName)==0)
00115             {
00116                 foundIt = true;
00117                 theVRefNum = aParamBlk.volumeParam.ioVRefNum;
00118             }
00119         }
00120     }
00121
00122     if (foundIt)
00123         *theVRefPtr = theVRefNum;
00124     else
00125         *theVRefPtr = 0;
00126
00127     if (anError == nsvErr) // no such vol, just bumped end of volume list
00128         anError = noErr;
00129
00130     return anError;
00131 } // VolName2VRef

OSErr VRef2VolName | ( | short | theVRef,
 |  | StringPtr | theVolName
 | ) |

Definition at line 71 of file VolsPaths.c.

References NULL.

00072 {
00073     OSErr           anError;
00074     HVolumeParam    pbVInfo;
00075
00076     pbVInfo.ioCompletion = NULL;
00077     theVolName[0] = '\0';
00078     pbVInfo.ioNamePtr = theVolName;
00079     pbVInfo.ioVRefNum = theVRef;
00080     pbVInfo.ioVolIndex = 0; // use VRefNum only
00081     anError = PBHGetVInfoSync((HParmBlkPtr)&pbVInfo);
00082
00083     return anError;
00084 } // VRef2VolName

Generated on Sat Aug 7 22:46:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/VolsPaths.h File Reference

common/VolsPaths.h File Reference

#include <MacTypes.h>

Include dependency graph for VolsPaths.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

OSErr | VRef2VolName (short theVRef, StringPtr theVolName)
OSErr | VolName2VRef (StringPtr myPVolName, short *theVRefPtr)
OSErr | PathNameFromDirID (const long aDirID, const short avRefNum, char *aPath)
OSErr | PathNameFromWD (const short avRefNum, char *aPath)

Function Documentation

OSErr PathNameFromDirID | ( | const long | aDirID,
 |  | const short | avRefNum,
 |  | char * | aPath
 | ) |

Definition at line 158 of file VolsPaths.c.

References NULL.

Referenced by PathNameFromWD().

00161 {
00162     Handle      strHandle = NULL;
00163     OSErr       anError = noErr;
00164     long        currDirID = 0,
00165                 nextDirID = 0;
00166     Size        theLen = 0;     // GetHandleSize
00167     char        tempName[64];   // directory or volume name
00168     CInfoPBRec  aPBblock;
00169
00170     /* create an empty string handle for Munger */
00171     strHandle = NewHandle(0);
00172
00173     if (strHandle == NULL)
00174     {
00175         anError = MemError();
00176     }
00177     else
00178     {
00179         *aPath = '\0';
00180         aPBblock.dirInfo.ioCompletion   = NULL;
00181         aPBblock.dirInfo.ioNamePtr      = (StringPtr)tempName;  // temp destination buffer
00182         nextDirID                       = aDirID;   // start at DirID passed in..
00183
00184         /* walk up the directories, collecting dir names as we go, until we hit the top (volname) */
00185         do {
00186
00187             aPBblock.dirInfo.ioVRefNum      = avRefNum;
00188             aPBblock.dirInfo.ioFDirIndex    = -1; // ignore ioNamePtr input, use ioDirID
00189             aPBblock.dirInfo.ioDrDirID      = nextDirID;
00190
00191             anError = PBGetCatInfoSync(&aPBblock);
00192             currDirID   = aPBblock.dirInfo.ioDrDirID;   // remember current
00193             nextDirID   = aPBblock.dirInfo.ioDrParID;   // find parent for next loop
00194
00195             if (anError != noErr)
00196                 break;
00197
00198             /* Insert a separator in front of the Directory Entry */
00199             Munger(strHandle, 0L, NULL, 0L, ":", 1L);
00200
00201             /* Insert the next directory/volume name into the front of the string */
00202             Munger(strHandle, 0L, NULL, 0L, &(tempName[1]), (long)tempName[0]);
00203
00204             /* NOTE: fsRtDirID is defined in Files.h */
00205         } while (currDirID != fsRtDirID);
00206
00207         /* now move the string into the parameter */
00208         theLen = GetHandleSize(strHandle);
00209         if (!anError && theLen)
00210         {
00211             BlockMove(&(**strHandle), aPath, theLen);
00212             anError = MemError();
00213         }
00214         aPath[theLen] = '\0';   /* set C string length */
00215
00216         /* dispose of temp storage */
00217         DisposeHandle(strHandle);
00218
00219     } /*else NULL*/
00220
00221     return(anError);
00222
00223 } /* PathNameFromDirID */

OSErr PathNameFromWD | ( | const short | avRefNum,
 |  | char * | aPath
 | ) |

Definition at line 247 of file VolsPaths.c.

References NULL, and PathNameFromDirID().

00249 {
00250     WDPBRec aPBblock;
00251     OSErr   anError = noErr;
00252
00253 /*
00254  PBGetWDInfo has a bug under A/UX 1.1.  If vRefNum is a real vRefNum
00255  and not a wdRefNum, then it returns garbage.  Since A/UX has only 1
00256  volume (in the Macintosh sense) and only 1 root directory, this can
00257  occur only when a file has been selected in the root directory (/).
00258  So we look for this and hard code the DirID and vRefNum.
00259  */
00260 #if defined(AUX)
00261     if ((aPathStyle == ePathTypeAUX) && (avRefNum == -1))
00262     {
00263         anError = PathNameFromDirID(fsRtDirID, -1, aPath);
00264     }
00265     else
00266 #endif
00267     {
00268         aPBblock.ioCompletion = NULL;
00269         aPBblock.ioNamePtr = NULL;
00270         aPBblock.ioVRefNum = avRefNum;
00271         aPBblock.ioWDIndex = 0;
00272         aPBblock.ioWDProcID = 0;
00273
00274         /* Change the Working Directory number in vRefnum into a real vRefnum */
00275         /* and DirID. The real vRefnum is returned in ioVRefnum, and the real */
00276         /* DirID is returned in ioWDDirID. */
00277
00278         anError = PBGetWDInfoSync(&aPBblock);
00279         if (anError == noErr)
00280             anError = PathNameFromDirID(aPBblock.ioWDDirID,
00281                                         aPBblock.ioWDVRefNum,
00282                                         aPath);
00283     }
00284
00285     return(anError);
00286
00287 } /* PathNameFromWD */

Here is the call graph for this function:

OSErr VolName2VRef | ( | StringPtr | myPVolName,
 |  | short * | theVRefPtr
 | ) |

Definition at line 90 of file VolsPaths.c.

00091 {
00092     OSErr           anError = noErr;
00093     Boolean         foundIt = false;
00094     short           theDriveNum;
00095     short           theVRefNum;
00096     HParamBlockRec  aParamBlk;
00097     char            myCVolName[32], theCVolName[32];
00098     Str31           theVolName;
00099
00100     // convert passed vol name from P 2 C string for compare
00101     p2cstrcpy(myCVolName, myPVolName);
00102
00103     // loop through all mounted volumes, see if myPVolName matches one
00104     for (theDriveNum = 1; !foundIt && (anError==noErr); theDriveNum++)
00105     {
00106         theVolName[0] = '\0';
00107         aParamBlk.volumeParam.ioNamePtr = (StringPtr)&theVolName;
00108         aParamBlk.volumeParam.ioVolIndex = theDriveNum;
00109
00110         anError = PBHGetVInfoSync((HParmBlkPtr)&aParamBlk);
00111         if (anError == noErr)
00112         {
00113             p2cstrcpy(theCVolName, theVolName);
00114             if (strcmp(theCVolName, myCVolName)==0)
00115             {
00116                 foundIt = true;
00117                 theVRefNum = aParamBlk.volumeParam.ioVRefNum;
00118             }
00119         }
00120     }
00121
00122     if (foundIt)
00123         *theVRefPtr = theVRefNum;
00124     else
00125         *theVRefPtr = 0;
00126
00127     if (anError == nsvErr) // no such vol, just bumped end of volume list
00128         anError = noErr;
00129
00130     return anError;
00131 } // VolName2VRef

OSErr VRef2VolName | ( | short | theVRef,
 |  | StringPtr | theVolName
 | ) |

Definition at line 71 of file VolsPaths.c.

References NULL.

00072 {
00073     OSErr           anError;
00074     HVolumeParam    pbVInfo;
00075
00076     pbVInfo.ioCompletion = NULL;
00077     theVolName[0] = '\0';
00078     pbVInfo.ioNamePtr = theVolName;
00079     pbVInfo.ioVRefNum = theVRef;
00080     pbVInfo.ioVolIndex = 0; // use VRefNum only
00081     anError = PBHGetVInfoSync((HParmBlkPtr)&pbVInfo);
00082
00083     return anError;
00084 } // VRef2VolName

Generated on Sat Aug 7 22:46:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uconfig.h File Reference

rf/uconfig.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define UEXPORT

Define Documentation

#define UEXPORT

Definition at line 27 of file uconfig.h.

Referenced by UMakeBitmap().

Generated on Sat Aug 7 22:46:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uconsole.cpp File Reference

rf/uconsole.cpp File Reference

#include "stdafx.h"
#include <stdio.h>
#include <stdarg.h>
#include "uconsole.h"

Include dependency graph for uconsole.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void UAppConsole (const char *format,...)

Function Documentation

void UAppConsole | ( | const char * | format,
 |  |  | ...
 | ) |

Definition at line 42 of file uconsole.cpp.

References NULL, and UASSERT.

Referenced by cvs_err(), cvs_errstr(), cvs_out(), cvs_outstr(), UWidget::DoModal(), UWidget::EndDialog(), UPseudoPageHider::ExecuteSelf(), UCvsConsole::FeedThisLine(), UWidget::GetTooltip(), UWidget::GetWidget(), UToolbar::OnCommands(), UCvsConsole::OnCreate(), UMacAppMenu::OnUpdateUI(), UCvsConsole::OutColor(), CPersistent::Register(), UPStr::set(), UStr::set(), UCmdTarget::UDispatchMessage(), UEventSendMessage(), UEventSendMessageExt(), and CPersistent::UnRegister().

00043 {
00044     va_list args;
00045     char mess[1024] = {'\0'};
00046
00047     UASSERT(format != NULL);
00048
00049     va_start (args, format);
00050     vsprintf (mess, format, args);
00051     va_end (args);
00052
00053 #if qGTK
00054     g_warning(mess);
00055 #elif defined(qUnix)
00056 #elif qMacAPP
00057 #   if qDebug
00058     DebugWarning_AC(1, mess, __FILE__, __LINE__);
00059 #   endif
00060 #elif qMacPP
00061     SignalString_(mess);
00062 #elif defined(WIN32)
00063 #   ifdef _DEBUG
00064     _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, mess);
00065 #   endif
00066 #else
00067     (void)printf(mess);
00068     (void)fflush(stdout);
00069 #endif
00070 }

Generated on Sat Aug 7 22:46:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uconsole.h File Reference

rf/uconsole.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | UTHROW(a) throw a

Functions

void | UAppConsole (const char *format,...)

Define Documentation

#define UTHROW ( a ) throw a

Definition at line 31 of file uconsole.h.

Function Documentation

void UAppConsole | ( | const char * | format,
 |  |  | ...
 | ) |

Definition at line 42 of file uconsole.cpp.

References NULL, and UASSERT.

Referenced by cvs_err(), cvs_errstr(), cvs_out(), cvs_outstr(), UWidget::DoModal(), UWidget::EndDialog(), UPseudoPageHider::ExecuteSelf(), UCvsConsole::FeedThisLine(), UWidget::GetTooltip(), UWidget::GetWidget(), UToolbar::OnCommands(), UCvsConsole::OnCreate(), UMacAppMenu::OnUpdateUI(), UCvsConsole::OutColor(), CPersistent::Register(), UStr::set(), UPStr::set(), UCmdTarget::UDispatchMessage(), UEventSendMessage(), UEventSendMessageExt(), and CPersistent::UnRegister().

00043 {
00044     va_list args;
00045     char mess[1024] = {'\0'};
00046
00047     UASSERT(format != NULL);
00048
00049     va_start (args, format);
00050     vsprintf (mess, format, args);
00051     va_end (args);
00052
00053 #if qGTK
00054     g_warning(mess);
00055 #elif defined(qUnix)
00056 #elif qMacAPP
00057 #   if qDebug
00058     DebugWarning_AC(1, mess, __FILE__, __LINE__);
00059 #   endif
00060 #elif qMacPP
00061     SignalString_(mess);
00062 #elif defined(WIN32)
00063 #   ifdef _DEBUG
00064     _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, mess);
00065 #   endif
00066 #else
00067     (void)printf(mess);
00068     (void)fflush(stdout);
00069 #endif
00070 }

Generated on Sat Aug 7 22:46:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/udraw.cpp File Reference

rf/udraw.cpp File Reference

#include "stdafx.h"
#include "udraw.h"
#include "uwidget.h"

Include dependency graph for udraw.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | MIN(a, b) ((a) < (b) ? (a) : (b))
#define | MAX(a, b) ((a) > (b) ? (a) : (b))

Functions

bool | PtInRect (const URECT *r, UPOINT pt)
void | SetRect (URECT *r, int x1, int y1, int x2, int y2)
void | SetRectEmpty (URECT *r)
bool | EqualRect (const URECT *r1, const URECT *r2)
void | InflateRect (URECT *r, int x, int y)
void | OffsetRect (URECT *r, int x, int y)
bool | IsRectEmpty (const URECT *r)
bool | UnionRect (URECT *dest, const URECT *src1, const URECT *src2)
bool | IntersectRect (URECT *dest, const URECT *src1, const URECT *src2)

Define Documentation

#define MAX | ( | a,
 |  | b | ) | ((a) > (b) ? (a) : (b))

Definition at line 35 of file udraw.cpp.

Referenced by UnionRect().

#define MIN | ( | a,
 |  | b | ) | ((a) < (b) ? (a) : (b))

Definition at line 31 of file udraw.cpp.

Referenced by UnionRect().

Function Documentation

bool EqualRect | ( | const URECT * | r1,
 |  | const URECT * | r2
 | ) |

Definition at line 64 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

Referenced by URect::EqualRect(), and URect::operator==().

00065 {
00066     return r1->left == r2->left && r1->top == r2->top &&
00067         r1->right == r2->right && r1->bottom == r2->bottom;
00068 }

void InflateRect | ( | URECT * | r,
 |  | int | x,
 |  | int | y
 | ) |

Definition at line 69 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

00070 {
00071     r->left += x;
00072     r->top += y;
00073     r->right -= x;
00074     r->bottom -= y;
00075     if(r->left > r->right)
00076         r->left = r->right;
00077     if(r->top > r->bottom)
00078         r->top = r->bottom;
00079 }

bool IntersectRect | ( | URECT * | dest,
 |  | const URECT * | src1,
 |  | const URECT * | src2
 | ) |

Definition at line 113 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

Referenced by URect::IntersectRect().

00114 {
00115     const URECT *temp;
00116     bool return_val = false;
00117
00118     if (src2->left < src1->left)
00119     {
00120         temp = src1;
00121         src1 = src2;
00122         src2 = temp;
00123     }
00124     dest->left = src2->left;
00125
00126     if (src2->left < src1->right)
00127     {
00128         if (src1->right < src2->right)
00129             dest->right = src1->right;
00130         else
00131             dest->right = src2->right;
00132
00133         if (src2->top < src1->top)
00134         {
00135             temp = src1;
00136             src1 = src2;
00137             src2 = temp;
00138         }
00139         dest->top = src2->top;
00140
00141         if (src2->top < src1->bottom)
00142         {
00143             return_val = true;
00144
00145             if (src1->bottom < src2->bottom)
00146                 dest->bottom = src1->bottom;
00147             else
00148                 dest->bottom = src2->bottom;
00149
00150             if (dest->left == dest->right)
00151                 return_val = false;
00152             if (dest->top == dest->bottom)
00153                 return_val = false;
00154         }
00155     }
00156
00157     return return_val;
00158 }

bool IsRectEmpty ( const URECT * r ) [inline]

Definition at line 89 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

Referenced by CopyScreenToBitmap().

00090 {
00091     return r->left == r->right || r->top == r->bottom;
00092 }

void OffsetRect | ( | URECT * | r,
 |  | int | x,
 |  | int | y
 | ) |

Definition at line 81 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

00082 {
00083     r->left += x;
00084     r->right += x;
00085     r->top += y;
00086     r->bottom += y;
00087 }

bool PtInRect | ( | const URECT * | r,
 |  | UPOINT | pt
 | ) |

Definition at line 38 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, URECT::top, UPOINT::x, and UPOINT::y.

Referenced by CPseudoToggle::OnLButtonUp(), and URect::PtInRect().

00039 {
00040     return pt.x >= r->left && pt.x < r->right &&
00041         pt.y >= r->top && pt.y < r->bottom;
00042 }

void SetRect | ( | URECT * | r,
 |  | int | x1,
 |  | int | y1,
 |  | int | x2,
 |  | int | y2
 | ) |

Definition at line 44 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

00045 {
00046     r->left = x1;
00047     r->top = y1;
00048     r->right = x2;
00049     r->bottom = y2;
00050     if(r->left > r->right)
00051         r->left = r->right;
00052     if(r->top > r->bottom)
00053         r->top = r->bottom;
00054 }

void SetRectEmpty ( URECT * r )

Definition at line 56 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

Referenced by CCJToolBar::GetItemRect().

00057 {
00058     r->left = 0;
00059     r->top = 0;
00060     r->right = 0;
00061     r->bottom = 0;
00062 }

bool UnionRect | ( | URECT * | dest,
 |  | const URECT * | src1,
 |  | const URECT * | src2
 | ) |

Definition at line 94 of file udraw.cpp.

References URECT::bottom, URECT::left, MAX, MIN, URECT::right, and URECT::top.

Referenced by URect::UnionRect().

00095 {
00096     if(::IsRectEmpty(src1))
00097     {
00098         *dest = *src2;
00099         return true;
00100     }
00101     if(::IsRectEmpty(src2))
00102     {
00103         *dest = *src1;
00104         return true;
00105     }
00106     dest->left = MIN (src1->left, src2->left);
00107     dest->top = MIN (src1->top, src2->top);
00108     dest->right = MAX (src1->right, src2->right);
00109     dest->bottom = MAX (src1->bottom, src2->bottom);
00110     return true;
00111 }

Generated on Sat Aug 7 22:46:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/udraw.h File Reference

rf/udraw.h File Reference

#include "uconfig.h"
#include "umain.h"

Include dependency graph for udraw.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | USize
class | UPoint
class | URect
class | UPen
class | UBrush
class | UDC

Defines

#define | URGB(r, g, b) ((UCOLORREF)(((unsigned char)(r)|((unsigned short)((unsigned char)(g))<<8))|(((unsigned int)(unsigned char)(b))<<16)))
#define | UGetRValue(rgb) ((unsigned char)(rgb))
#define | UGetGValue(rgb) ((unsigned char)(((unsigned short)(rgb)) >> 8))
#define | UGetBValue(rgb) ((unsigned char)((rgb)>>16))
#define | UPS_SOLID 0

Typedefs

typedef long | UCOLORREF

Functions

bool | PtInRect (const URECT *r, UPOINT pt)
void | SetRect (URECT *r, int x1, int y1, int x2, int y2)
void | SetRectEmpty (URECT *r)
bool | EqualRect (const URECT *r1, const URECT *r2)
void | InflateRect (URECT *r, int x, int y)
void | OffsetRect (URECT *r, int x, int y)
bool | UnionRect (URECT *dest, const URECT *src1, const URECT *src2)
bool | IntersectRect (URECT *dest, const URECT *src1, const URECT *src2)
void | CopyRect (URECT *dst, const URECT *src)

Define Documentation

#define UGetBValue ( rgb ) ((unsigned char)((rgb)>>16))

Definition at line 458 of file udraw.h.

Referenced by UPen::CreatePen(), and UBrush::CreateSolidBrush().

#define UGetGValue ( rgb ) ((unsigned char)(((unsigned short)(rgb)) >> 8))

Definition at line 457 of file udraw.h.

Referenced by UPen::CreatePen(), and UBrush::CreateSolidBrush().

#define UGetRValue ( rgb ) ((unsigned char)(rgb))

Definition at line 456 of file udraw.h.

Referenced by UPen::CreatePen(), and UBrush::CreateSolidBrush().

#define UPS_SOLID 0

Definition at line 460 of file udraw.h.

Referenced by DrawNode(), and CWinLogData::Update().

#define URGB | ( | r,
 |  | g,
 |  | b | ) | ((UCOLORREF)(((unsigned char)(r)|((unsigned short)((unsigned char)(g))<<8))|(((unsigned int)(unsigned char)(b))<<16)))

Definition at line 455 of file udraw.h.

Referenced by DrawNode(), CWinLogData::Update(), CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogRevData::UpdateSelf(), and CWinLogHeaderData::UpdateSelf().

Typedef Documentation

typedef long UCOLORREF

Definition at line 454 of file udraw.h.

Referenced by UPen::CreatePen(), UBrush::CreateSolidBrush(), and DrawNode().

Function Documentation

void CopyRect | ( | URECT * | dst,
 |  | const URECT * | src
 | ) | [inline]

Definition at line 42 of file udraw.h.

00042 { *dst = *src; }

bool EqualRect | ( | const URECT * | r1,
 |  | const URECT * | r2
 | ) |

Definition at line 64 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

Referenced by URect::EqualRect(), and URect::operator==().

00065 {
00066     return r1->left == r2->left && r1->top == r2->top &&
00067         r1->right == r2->right && r1->bottom == r2->bottom;
00068 }

void InflateRect | ( | URECT * | r,
 |  | int | x,
 |  | int | y
 | ) |

Definition at line 69 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

00070 {
00071     r->left += x;
00072     r->top += y;
00073     r->right -= x;
00074     r->bottom -= y;
00075     if(r->left > r->right)
00076         r->left = r->right;
00077     if(r->top > r->bottom)
00078         r->top = r->bottom;
00079 }

bool IntersectRect | ( | URECT * | dest,
 |  | const URECT * | src1,
 |  | const URECT * | src2
 | ) |

Definition at line 113 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

Referenced by URect::IntersectRect().

00114 {
00115     const URECT *temp;
00116     bool return_val = false;
00117
00118     if (src2->left < src1->left)
00119     {
00120         temp = src1;
00121         src1 = src2;
00122         src2 = temp;
00123     }
00124     dest->left = src2->left;
00125
00126     if (src2->left < src1->right)
00127     {
00128         if (src1->right < src2->right)
00129             dest->right = src1->right;
00130         else
00131             dest->right = src2->right;
00132
00133         if (src2->top < src1->top)
00134         {
00135             temp = src1;
00136             src1 = src2;
00137             src2 = temp;
00138         }
00139         dest->top = src2->top;
00140
00141         if (src2->top < src1->bottom)
00142         {
00143             return_val = true;
00144
00145             if (src1->bottom < src2->bottom)
00146                 dest->bottom = src1->bottom;
00147             else
00148                 dest->bottom = src2->bottom;
00149
00150             if (dest->left == dest->right)
00151                 return_val = false;
00152             if (dest->top == dest->bottom)
00153                 return_val = false;
00154         }
00155     }
00156
00157     return return_val;
00158 }

void OffsetRect | ( | URECT * | r,
 |  | int | x,
 |  | int | y
 | ) |

Definition at line 81 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

00082 {
00083     r->left += x;
00084     r->right += x;
00085     r->top += y;
00086     r->bottom += y;
00087 }

bool PtInRect | ( | const URECT * | r,
 |  | UPOINT | pt
 | ) |

Definition at line 38 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, URECT::top, UPOINT::x, and UPOINT::y.

Referenced by CPseudoToggle::OnLButtonUp(), and URect::PtInRect().

00039 {
00040     return pt.x >= r->left && pt.x < r->right &&
00041         pt.y >= r->top && pt.y < r->bottom;
00042 }

void SetRect | ( | URECT * | r,
 |  | int | x1,
 |  | int | y1,
 |  | int | x2,
 |  | int | y2
 | ) |

Definition at line 44 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

00045 {
00046     r->left = x1;
00047     r->top = y1;
00048     r->right = x2;
00049     r->bottom = y2;
00050     if(r->left > r->right)
00051         r->left = r->right;
00052     if(r->top > r->bottom)
00053         r->top = r->bottom;
00054 }

void SetRectEmpty ( URECT * r )

Definition at line 56 of file udraw.cpp.

References URECT::bottom, URECT::left, URECT::right, and URECT::top.

Referenced by CCJToolBar::GetItemRect().

00057 {
00058     r->left = 0;
00059     r->top = 0;
00060     r->right = 0;
00061     r->bottom = 0;
00062 }

bool UnionRect | ( | URECT * | dest,
 |  | const URECT * | src1,
 |  | const URECT * | src2
 | ) |

Definition at line 94 of file udraw.cpp.

References URECT::bottom, URECT::left, MAX, MIN, URECT::right, and URECT::top.

Referenced by URect::UnionRect().

00095 {
00096     if(::IsRectEmpty(src1))
00097     {
00098         *dest = *src2;
00099         return true;
00100     }
00101     if(::IsRectEmpty(src2))
00102     {
00103         *dest = *src1;
00104         return true;
00105     }
00106     dest->left = MIN (src1->left, src2->left);
00107     dest->top = MIN (src1->top, src2->top);
00108     dest->right = MAX (src1->right, src2->right);
00109     dest->bottom = MAX (src1->bottom, src2->bottom);
00110     return true;
00111 }

Generated on Sat Aug 7 22:46:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uevent.cpp File Reference

rf/uevent.cpp File Reference

#include "stdafx.h"
#include <time.h>
#include "umain.h"
#include "uconsole.h"
#include "uwidget.h"
#include <map>
#include "PseudoButton.h"

Include dependency graph for uevent.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CAllTargets
class | CTurnOffDispatching
class | CMsg
union | UMessageMapFunctions

Defines

#define | MIN_IDLE 100
#define | _countof(array) (sizeof(array)/sizeof(array[0]))

Functions

int | UEventSendMessage (int wid, int evt, int arg1, void *arg2)
int | UEventSendMessageExt (int wid, int evt, int arg1, void *arg2, int *handledFlag)
int | UEventPostMessage (int wid, int evt, int arg1, void *arg2)
int | UEventNotifyMessage (int evt, int arg1, void *arg2)
int | UEventGetWidID (void)
UCmdTarget * | UEventQueryWidget (int widid)
void | UEventRemoveWidID (int widid)
void | UEventSetTooltipHandler (void(*handler)(const char *))
void | UEventGiveTime (void)
long | UTickCount (void)
const std::map< int, UCmdTarget * > & | UEventGetTargets (void)

Variables

long | sLastIdle = 0
void(* | sTooltipHandler )(const char *)=0L
CAllTargets sAllTargets
bool | sTurnOffDispatching = false
std::vector< CMsg > | sRetainedMsgs

Define Documentation

#define _countof ( array ) (sizeof(array)/sizeof(array[0]))

Referenced by _LoadSysColorBitmap(), KoRecursiveModel::GetCount(), KoRegularModel::GetCount(), CWincvsApp::InitInstance(), CCJToolBar::OnNcCreate(), UCmdUI::SetTooltip(), and WinInitWidgets().

#define MIN_IDLE 100

minimum idle used by the framework to handle the timers Definition at line 74 of file uevent.cpp.

Referenced by UEventGiveTime().

Function Documentation

const std:: map<int, UCmdTarget *>& UEventGetTargets ( void )

Definition at line 773 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, and STD.

Referenced by LMainPseudoAttachment::ExecuteSelf(), UWidget::HasModal(), UToolbar::OnCommands(), UMenu::OnCommands(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), and UMacAppMenu::OnUpdateUI().

00774 {
00775     return sAllTargets.Get();
00776 }

Here is the call graph for this function:

int UEventGetWidID ( void )

Definition at line 296 of file uevent.cpp.

Referenced by UCvsApp::UCvsApp(), UPPMenu::UPPMenu(), and UPromptMessage::UPromptMessage().

00297 {
00298     static int newid = 100;
00299     return newid++;
00300 }

void UEventGiveTime ( void )

Definition at line 683 of file uevent.cpp.

References UWidget::BeforeUpdateUI(), UWidget::DoValidUI(), EV_TIMER, EV_UPDATEUI, CAllTargets::Get(), UWidget::GetTimers(), UCmdTarget::GetWidID(), UObject::IsKindOf(), UWidget::IsUIValid(), CMsg::m_arg1, CMsg::m_arg2, UTimer::m_cmd, CMsg::m_ev, UTimer::m_lap, UTimer::m_lastlap, CMsg::m_wid, MIN_IDLE, sAllTargets, sLastIdle, sRetainedMsgs, STD, UEventSendMessage(), URUNTIME_CLASS, and UTickCount().

Referenced by UCvsApp::PeekPumpAndIdle().

00684 {
00685     STD map< int, UCmdTarget * >::const_iterator iter;
00686     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00687
00688     // post the retained events
00689     while(!sRetainedMsgs.empty())
00690     {
00691         CMsg msg = *sRetainedMsgs.begin();
00692         sRetainedMsgs.erase(sRetainedMsgs.begin());
00693         UEventSendMessage(msg.m_wid, msg.m_ev, msg.m_arg1, msg.m_arg2);
00694     }
00695
00696     // take care about the EV_UPDATEUI notification
00697     if(!UWidget::IsUIValid())
00698     {
00699         UWidget::DoValidUI(true);
00700
00701         // warn the widget it's going to happen so they can cache
00702         // some informations.
00703         for(iter = targets.begin(); iter != targets.end(); ++iter)
00704         {
00705             UCmdTarget *target = (*iter).second;
00706             if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00707                 continue;
00708
00709             UWidget *wid = (UWidget *)target;
00710             wid->BeforeUpdateUI();
00711         }
00712
00713         for(iter = targets.begin(); iter != targets.end(); ++iter)
00714         {
00715             UCmdTarget *target = (*iter).second;
00716             if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00717                 continue;
00718
00719             UWidget *wid = (UWidget *)target;
00720             UEventSendMessage(wid->GetWidID(), EV_UPDATEUI, 0, 0L);
00721         }
00722     }
00723
00724     long thisIdle = UTickCount();
00725     if((thisIdle - sLastIdle) < MIN_IDLE)
00726         return;
00727
00728     // search the timers
00729     for(iter = targets.begin(); iter != targets.end(); ++iter)
00730     {
00731         UCmdTarget *target = (*iter).second;
00732         if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00733             continue;
00734
00735         UWidget *wid = (UWidget *)target;
00736         std::vector<UTimer> & timers = wid->GetTimers();
00737         std::vector<UTimer>::iterator t;
00738         for(t = timers.begin(); t != timers.end(); ++t)
00739         {
00740             UTimer & timer = *t;
00741             if((thisIdle - timer.m_lastlap) >= timer.m_lap)
00742             {
00743                 // trigger the timer
00744                 timer.m_lastlap = thisIdle;
00745                 UEventSendMessage(wid->GetWidID(), EV_TIMER, timer.m_cmd, (void *)thisIdle);
00746             }
00747         }
00748     }
00749
00750     sLastIdle = thisIdle;
00751 }

Here is the call graph for this function:

int UEventNotifyMessage | ( | int | evt,
 |  | int | arg1,
 |  | void * | arg2
 | ) |

Definition at line 269 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, STD, UASSERT, and UCmdTarget::UDispatchMessage().

Referenced by UPseudoFakePane::ActivateSelf(), UPseudoFakePane::DeactivateSelf(), TPseudoWinBehavior::DoEvent(), TPseudoAppBehavior::DoToolboxEvent(), LMainPseudoAttachment::ExecuteSelf(), and UWidget::OnChgFocus().

00270 {
00271     STD map< int, UCmdTarget * >::const_iterator iter;
00272     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00273     int res = 0;
00274
00275     for(iter = targets.begin(); iter != targets.end(); ++iter)
00276     {
00277         UCmdTarget *target = (*iter).second;
00278         UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00279 #if qDebug
00280         try {
00281 #endif
00282         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00283 #if qDebug
00284         } catch(...) {
00285             UASSERT(0);
00286             throw;
00287         }
00288 #endif
00289         if(res)
00290             break;
00291     }
00292
00293     return res;
00294 }

Here is the call graph for this function:

int UEventPostMessage | ( | int | wid,
 |  | int | evt,
 |  | int | arg1,
 |  | void * | arg2
 | ) |

Definition at line 262 of file uevent.cpp.

References sRetainedMsgs.

00263 {
00264     sRetainedMsgs.push_back(CMsg(wid, evt, arg1, arg2));
00265     return 0;
00266 }

UCmdTarget* UEventQueryWidget ( int widid )

Definition at line 302 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, and STD.

Referenced by cvsgui_GetMainMenuWidget(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), UCvsApp::GetBrowserView(), UCvsApp::GetConsole(), UCvsApp::GetFilesView(), UCvsApp::GetStatusBar(), LPseudoWinAttachment::SearchWidID(), UDC::UDC(), UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), and UMenuAddToggle().

00303 {
00304     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00305     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(widid);
00306     if(iter != targets.end())
00307     {
00308         UCmdTarget *target = (*iter).second;
00309         return target;
00310     }
00311     return 0L;
00312 }

Here is the call graph for this function:

void UEventRemoveWidID ( int widid )

Definition at line 314 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, and STD.

Referenced by UCmdTarget::~UCmdTarget().

00315 {
00316     STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00317     STD map<int, UCmdTarget *>::iterator i = targets.find(widid);
00318     if(i == targets.end())
00319         return;
00320     targets.erase(i);
00321 }

Here is the call graph for this function:

int UEventSendMessage | ( | int | wid,
 |  | int | evt,
 |  | int | arg1,
 |  | void * | arg2
 | ) |

Definition at line 199 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, STD, sTurnOffDispatching, UAppConsole(), UASSERT, and UCmdTarget::UDispatchMessage().

Referenced by AboutDialog(), UWidget::AddPage(), AskCreatePersistentSettings(), LPseudoWinAttachment::CheckWindowSize(), CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetDiff(), CompatGetImport(), CompatGetLog(), CompatGetModuleListItem(), CompatGetPassword(), CompatGetPrefs(), CompatGetRtag(), CompatGetSelectionDetails(), CompatGetTag(), CompatGetTagListItem(), CompatGetUpdate(), CompatImportFilter(), CreateBrowseToolbar(), CreateFilterToolbar(), CreateMainToolbar(), CvsLogParse(), UCvsFolders::DeleteAllItems(), UCvsFiles::DisableGeneric(), UPromptMessage::DoDataExchange(), UEditMessage::DoDataExchange(), TPseudoWinBehavior::DoEvent(), UWidget::DoModal(), UPseudoPlaceHolder::DoRotate(), UPseudoPageHider::DoRotate(), CPseudoItem::DoubleClick(), TPseudoCustomView::Draw(), LPseudoDrawAttachment::ExecuteSelf(), LMainPseudoAttachment::ExecuteSelf(), TBrowserFillDummy::ExitDirectory(), TBrowserFill::ExitDirectory(), UCvsFrame::FreshenFileMask(), UCvsFolders::GetItemByLocation(), UCvsFiles::HideColumns(), TViewFill::InitItem(), LPseudoWinAttachment::ListenToMessage(), macpp_fecthview(), UCvsFiles::OnCmdEditsel(), UCvsFiles::OnCmdEditseldef(), UCvsFiles::OnCmdExplore(), UCvsFolders::OnCmdExplore(), UCvsFolders::OnCmdMacrosSel(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIEditseldef(), UCvsFiles::OnCmdUIExplore(), UCvsFolders::OnCmdUIExplore(), UCvsFiles::OnCmdUIGraph(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), UCvsFiles::OnCmdUIRelease(), UCvsFiles::OnCmdUIRmv(), UCvsFiles::OnCmdUITrash(), UCvsFiles::OnCmdUIUpdate(), UCvsFiles::OnCreate(), UCvsGraph::OnCreate(), UCvsFiles::OnDblClick(), CDynToolBar::OnDestroy(), TBrowserFill::OnDirectory(), UCvsConsole::OnEraseAll(), CPseudoDlg::OnInitDialog(), UWidget::OnInitWidget(), CPseudoList::OnLButtonDblClk(), UCvsFiles::OnMacroSel(), CPseudoDraw::OnPaint(), UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), UToolbar::OnTbDropDown(), UCvsFolders::OnTreeExpanding(), UCvsFolders::OnTreeSelecting(), UCvsFolders::OnUpdateGeneric(), UMacAppMenu::OnUpdateUI(), UMenu::OnUpdateUI(), UToolbar::OnUpdateUI(), UWidget::OnUpdateUI(), UCvsFiles::ProcessSelectionCommand(), UCvsFolders::ProcessSelectionCommand(), PromptEditMessage(), UCvsFolders::ResetBrowser(), UCvsFiles::ResetView(), UCvsFolders::ResetView(), UCvsFiles::Resort(), UCvsFolders::RetrievePath(), CMPString::rtCMPString(), UCvsFiles::Search(), UCvsApp::SetStatusBarText(), UCvsFiles::ShowColumns(), CPseudoItem::SingleClick(), UCvsFolders::StepToLocation(), UCvsFolders::StoreExpanded(), UEventGiveTime(), UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), UMenuAddToggle(), UWaitCursor::UWaitCursor(), UWinPseudoWindowProc(), TPseudoWinAdorner::ViewChangedFrame(), WinInitWidgets(), CPseudoDlg::~CPseudoDlg(), LPseudoWinAttachment::~LPseudoWinAttachment(), TPseudoWinAdorner::~TPseudoWinAdorner(), and UWaitCursor::~UWaitCursor().

00200 {
00201     if(sTurnOffDispatching)
00202         return 0;
00203
00204     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00205     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(wid);
00206     int res = 0;
00207
00208     if(iter != targets.end())
00209     {
00210         UCmdTarget *target = (*iter).second;
00211         UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00212 #if qDebug
00213         try {
00214 #endif
00215         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00216 #if qDebug
00217         } catch(...) {
00218             UASSERT(0);
00219             throw;
00220         }
00221 #endif
00222     }
00223     else
00224     {
00225         UAppConsole("Unknown widget id : %d\n", wid);
00226     }
00227
00228     return res;
00229 }

Here is the call graph for this function:

int UEventSendMessageExt | ( | int | wid,
 |  | int | evt,
 |  | int | arg1,
 |  | void * | arg2,
 |  | int * | handledFlag
 | ) |

Definition at line 231 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, STD, UAppConsole(), UASSERT, and UCmdTarget::UDispatchMessage().

Referenced by TPseudoAppBehavior::DoMenuCommand(), LMainPseudoAttachment::ExecuteSelf(), UMenu::OnCommands(), and UToolbar::OnCommands().

00232 {
00233     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00234     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(wid);
00235     int res = 0;
00236     UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00237
00238     if(iter != targets.end())
00239     {
00240         UCmdTarget *target = (*iter).second;
00241 #if qDebug
00242         try {
00243 #endif
00244         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00245 #if qDebug
00246         } catch(...) {
00247             UASSERT(0);
00248             throw;
00249         }
00250 #endif
00251     }
00252     else
00253     {
00254         UAppConsole("Unknown widget id : %d\n", wid);
00255     }
00256
00257     *handledFlag = (dispatchInfo & UCmdTarget::kUDispatchHandled) != 0;
00258     return res;
00259 }

Here is the call graph for this function:

void UEventSetTooltipHandler ( void(* handler)(const char *) )

Definition at line 678 of file uevent.cpp.

References sTooltipHandler.

00679 {
00680     sTooltipHandler = handler;
00681 }

long UTickCount ( void )

Definition at line 753 of file uevent.cpp.

Referenced by UWidget::AddTimer(), and UEventGiveTime().

00754 {
00755 #ifdef WIN32
00756     return ::GetTickCount();
00757 #elif defined(TARGET_OS_MAC)
00758     long res = ::TickCount();
00759     return res = (float)res * (1000.0 / 60.0);
00760 #else
00761     struct timeval tval;
00762     static long refcount;
00763
00764     gettimeofday(&tval, 0L);
00765
00766     if(refcount == 0)
00767         refcount = tval.tv_sec;
00768
00769     return (tval.tv_sec - refcount) * 1000 + tval.tv_usec / 1000;
00770 #endif
00771 }

Variable Documentation

class CAllTargets sAllTargets

Referenced by UCmdTarget::UCmdTarget(), UEventGetTargets(), UEventGiveTime(), UEventNotifyMessage(), UEventQueryWidget(), UEventRemoveWidID(), UEventSendMessage(), and UEventSendMessageExt().

long sLastIdle = 0 [static]

Definition at line 76 of file uevent.cpp.

Referenced by UEventGiveTime().

std::vector<CMsg> sRetainedMsgs [static]

Definition at line 178 of file uevent.cpp.

Referenced by UEventGiveTime(), and UEventPostMessage().

void(* sTooltipHandler)(const char *)=0L [static]

Definition at line 81 of file uevent.cpp.

Referenced by UCmdUI::SetTooltip(), and UEventSetTooltipHandler().

bool sTurnOffDispatching = false [static]

Definition at line 121 of file uevent.cpp.

Referenced by CTurnOffDispatching::CTurnOffDispatching(), UEventSendMessage(), and CTurnOffDispatching::~CTurnOffDispatching().

Generated on Sat Aug 7 22:46:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/umain.h File Reference

rf/umain.h File Reference

#include "uobject.h"
#include <map>

Include dependency graph for umain.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | UMSGMAP_ENTRY
struct | UMSGMAP
class | UCmdTarget
class | UCmdUI
class | USemaphore
struct | UTB_INIT
struct | UTB_BUTTON
struct | UTB_DROPDOWN
struct | USLIDER
struct | USIZE
struct | UPOINT
struct | URECT
struct | UTREE_INSERT
struct | UTREE_INFO
struct | ULIST_INSERT
struct | ULIST_INFO

Defines

#define | STD std::
#define | ON_UCREATE(baseClass)
#define | ON_UDESTROY(baseClass)
#define | ON_UENTER(baseClass)
#define | ON_ULEAVE(baseClass)
#define | ON_UEXPOSE(baseClass)
#define | ON_UMMOVE(baseClass)
#define | ON_UBTNDOWN(baseClass)
#define | ON_UBTNUP(baseClass)
#define | ON_UBTNDBLDOWN(baseClass)
#define | ON_KEYDOWN(baseClass)
#define | ON_RESIZE(cmd, hook)
#define | ON_SETCURSOR(baseClass)
#define | ON_CHGCURSOR(baseClass, cmdmin, cmdmax)
#define | ON_TB_INIT(baseClass)
#define | ON_TB_END(baseClass)
#define | ON_TB_BUTTON(baseClass)
#define | ON_TB_DROPDOWN(baseClass)
#define | ON_TB_CHECKBTN(baseClass)
#define | ON_TB_GETCOLOR(baseClass)
#define | ON_TB_SEPARATOR(baseClass)
#define | ON_UCOMMAND(cmd, hook)
#define | ON_UCOMMAND_RANGE(cmdmin, cmdmax, hook)
#define | ON_UCOMMAND_RANGEEX(cmdmin, cmdmax, hook)
#define | ON_UUPDATECMD(cmd, hook)
#define | ON_FETCHCMD(baseClass, cmdmin, cmdmax)
#define | ON_UUPDATECMD_RANGE(cmdmin, cmdmax, hook)
#define | ON_USETTOOLTIP(cmdmin, cmdmax, hook)
#define | ON_UGETLLOC(cmdmin, cmdmax, hook)
#define | ON_USETLLOC(cmdmin, cmdmax, hook)
#define | ON_QUERYSTATE(cmdmin, cmdmax, hook)
#define | ON_EDITCHANGE(cmd, hook)
#define | ON_EDITCHANGE_RANGE(cmdmin, cmdmax, hook)
#define | ON_EDITACTIVATE(cmd, hook)
#define | ON_EDITACTIVATE_RANGE(cmdmin, cmdmax, hook)
#define | ON_SCROLLCHANGE(cmd, hook)
#define | ON_SCROLLCHANGE_RANGE(cmdmin, cmdmax, hook)
#define | ON_TIMER(cmd, hook)
#define | ON_UPDATEUI(baseClass)
#define | ON_UPDATEFOCUS(baseClass)
#define | ON_SETSTATE(cmdmin, cmdmax, hook)
#define | ON_ENABLECMD(cmdmin, cmdmax, hook)
#define | ON_CHGFOCUS(baseClass, cmdmin, cmdmax)
#define | ON_SETDEFAULT(baseClass, cmdmin, cmdmax)
#define | ON_INVALIDATE(baseClass, cmdmin, cmdmax)
#define | ON_REDRAW(baseClass, cmdmin, cmdmax)
#define | ON_SHOW_WIDGET(cmd, hook)
#define | ON_PAGE_CHANGED(baseClass, cmdmin, cmdmax)
#define | ON_SHOW_WIDGET_RANGE(cmdmin, cmdmax, hook)
#define | ON_DROPREF(cmdmin, cmdmax, hook)
#define | ON_UNOTIFY(cmd, hook)
#define | ON_INIT_WIDGET(baseClass, cmdmin, cmdmax)
#define | ON_INIT_TAB_WIDGET(baseClass, cmdmin, cmdmax)
#define | ON_SETICON(cmdmin, cmdmax, hook)
#define | ON_SETTEXT(cmdmin, cmdmax, hook)
#define | ON_GETTEXT(cmdmin, cmdmax, hook)
#define | ON_SETFLOAT(baseClass, cmdmin, cmdmax)
#define | ON_GETFLOAT(baseClass, cmdmin, cmdmax)
#define | ON_DRAGQUERY(cmd, hook)
#define | ON_DROPQUERY(cmd, hook)
#define | ON_DROPIT(cmd, hook)
#define | ON_DRAGQUERY_RANGE(cmdmin, cmdmax, hook)
#define | ON_DROPQUERY_RANGE(cmdmin, cmdmax, hook)
#define | ON_DROPIT_RANGE(cmdmin, cmdmax, hook)
#define | ON_DROPQUERY_CMDID(baseClass)
#define | ON_SET_SLIDER(baseClass, cmdmin, cmdmax)
#define | ON_GET_SLIDERPROP(baseClass, cmdmin, cmdmax)
#define | ON_SET_SLIDERPROP(baseClass, cmdmin, cmdmax)
#define | ON_TREE_RESETALL(baseClass, cmdmin, cmdmax)
#define | ON_TREE_INSERT(baseClass, cmdmin, cmdmax)
#define | ON_TREE_GETINFO(baseClass, cmdmin, cmdmax)
#define | ON_TREE_SETDATA(baseClass, cmdmin, cmdmax)
#define | ON_TREE_SETICON(baseClass, cmdmin, cmdmax)
#define | ON_TREE_DELETE(baseClass, cmdmin, cmdmax)
#define | ON_TREE_EXPAND(baseClass, cmdmin, cmdmax)
#define | ON_TREE_SELECT(baseClass, cmdmin, cmdmax)
#define | ON_TREE_GETSEL(baseClass, cmdmin, cmdmax)
#define | ON_TREE_EXPANDING(cmd, hook)
#define | ON_TREE_SELECTING(cmd, hook)
#define | ON_LIST_SELECTING(cmd, hook)
#define | ON_LIST_SELCOLUMN(cmd, hook)
#define | ON_LIST_RESORT(baseClass, cmdmin, cmdmax)
#define | ON_LIST_SETSORTDIR(baseClass, cmdmin, cmdmax)
#define | ON_LIST_DBLCLICK(cmd, hook)
#define | ON_LIST_POPUP(cmd, hook)
#define | ON_LIST_ADDSEL(baseClass, cmdmin, cmdmax)
#define | ON_LIST_DELROW(baseClass, cmdmin, cmdmax)
#define | ON_LIST_RESETALL(baseClass, cmdmin, cmdmax)
#define | ON_LIST_ADDCOLUMNS(baseClass, cmdmin, cmdmax)
#define | ON_LIST_SHOWCOLUMNS(baseClass, cmdmin, cmdmax)
#define | ON_LIST_HIDECOLUMNS(baseClass, cmdmin, cmdmax)
#define | ON_LIST_SETFEEDBACK(baseClass, cmdmin, cmdmax)
#define | ON_LIST_SETCOLTITLE(baseClass, cmdmin, cmdmax)
#define | ON_LIST_SETCOLWIDTH(baseClass, cmdmin, cmdmax)
#define | ON_LIST_NEWROW(baseClass, cmdmin, cmdmax)
#define | ON_LIST_ROWSETDATA(baseClass, cmdmin, cmdmax)
#define | ON_LIST_ROWGETDATA(baseClass, cmdmin, cmdmax)
#define | ON_LIST_INSERT(baseClass, cmdmin, cmdmax)
#define | ON_LIST_GETNEXTSEL(baseClass, cmdmin, cmdmax)
#define | ON_LIST_GETNEXT(baseClass, cmdmin, cmdmax)
#define | ON_LIST_GETINFO(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_RESETALL(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_APPEND(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_SETSEL(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_DELSEL(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_ENABLESEL(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_GETSEL(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_GETMENU(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_GETCOUNT(baseClass, cmdmin, cmdmax)
#define | ON_COMBO_SEL(cmd, hook)
#define | ON_COMBO_SEL_RANGE(cmdmin, cmdmax, hook)
#define | ON_SMARTCOMBO_SETFEATURE(baseClass, cmdmin, cmdmax)
#define | ON_SMARTCOMBO_SETITEMS(baseClass, cmdmin, cmdmax)
#define | ON_SMARTCOMBO_SETREADONLY(baseClass, cmdmin, cmdmax)
#define | ON_CUSTOM_CLICK(cmd, hook)
#define | ON_CUSTOM_DRAW(cmd, hook)
#define | ON_CUSTOM_DRAW_RANGE(cmdmin, cmdmax, hook)
#define | ON_STATUSBAR_TEXT(baseClass, cmdmin, cmdmax)
#define | UDECLARE_MESSAGE_MAP()
#define | UBEGIN_MESSAGE_MAP(theClass, baseClass)
#define | UEND_MESSAGE_MAP()
#define | ev_msg
#define | UMAKEINT(a, b) ((int)(((short)(a)) | ((int)((short)(b))) << 16))
#define | ULOWORD(l) ((short)(l))
#define | UHIWORD(l) ((short)(((int)(l) >> 16) & 0xFFFF))
#define | UK_LBUTTON 0x01
#define | UK_MBUTTON 0x02
#define | UK_RBUTTON 0x04
#define | UK_CONTROL 0x08
#define | UK_SHIFT 0x10
#define | UK_ALT 0x20
#define | UK_CANCEL 0x03
#define | UK_BACK 0x08
#define | UK_TAB 0x09
#define | UK_CLEAR 0x0C
#define | UK_RETURN 0x0D
#define | UK_ESCAPE 0x1B
#define | UK_SPACE 0x20
#define | UK_PRIOR 0x21
#define | UK_NEXT 0x22
#define | UK_END 0x23
#define | UK_HOME 0x24
#define | UK_LEFT 0x25
#define | UK_UP 0x26
#define | UK_RIGHT 0x27
#define | UK_DOWN 0x28
#define | UK_INSERT 0x2D
#define | UK_DELETE 0x2E
#define | UK_HELP 0x2F
#define | UK_PLUS 0x6B
#define | UK_MINUS 0x6D
#define | UK_NUMPAD0 0x60
#define | UK_NUMPAD1 0x61
#define | UK_NUMPAD2 0x62
#define | UK_NUMPAD3 0x63
#define | UK_NUMPAD4 0x64
#define | UK_NUMPAD5 0x65
#define | UK_NUMPAD6 0x66
#define | UK_NUMPAD7 0x67
#define | UK_NUMPAD8 0x68
#define | UK_NUMPAD9 0x69
#define | UK_MULTIPLY 0x6A
#define | UK_ADD 0x6B
#define | UK_SEPARATOR 0x6C
#define | UK_SUBTRACT 0x6D
#define | UK_DECIMAL 0x6E
#define | UK_DIVIDE 0x6F
#define | UK_F1 0x70
#define | UK_F2 0x71
#define | UK_F3 0x72
#define | UK_F4 0x73
#define | UK_F5 0x74
#define | UK_F6 0x75
#define | UK_F7 0x76
#define | UK_F8 0x77
#define | UK_F9 0x78
#define | UK_F10 0x79
#define | UK_F11 0x7A
#define | UK_F12 0x7B
#define | UK_F13 0x7C
#define | UK_F14 0x7D
#define | UK_F15 0x7E
#define | UK_F16 0x7F
#define | UK_F17 0x80
#define | UK_F18 0x81
#define | UK_F19 0x82
#define | UK_F20 0x83
#define | UK_F21 0x84
#define | UK_F22 0x85
#define | UK_F23 0x86
#define | UK_F24 0x87
#define | WINCMD_DLG_START 2000
#define | WINCMD_DLG_END 3000
#define | UCMD_to_WINCMD(cmd) (cmd)
#define | WINCMD_to_UCMD(cmd) (cmd)
#define | UCMD_to_WINCTL(cmd) ((cmd)-EV_COMMAND_START+WINCMD_DLG_START)
#define | WINCTL_to_UCMD(cmd) ((cmd)-WINCMD_DLG_START+EV_COMMAND_START)
#define | UMENU_NULL ((UMENU)0L)
#define | UTB_SEPARATOR (-1)

Typedefs

typedef void(UCmdTarget::* | UPMSG )(void)
typedef long | UMENU
typedef void * | UTREEITEM
typedef int(* | UListSorter )(UWidget *wid, void *data1, void *data2)

Enumerations

enum UEventType {
EV_NONE,
EV_CREATE,
EV_DESTROY,
EV_ENTER,
EV_LEAVE,
EV_EXPOSE,
EV_MMOVE,
EV_BTNDOWN,
EV_BTNUP,
EV_BTNDBLDOWN,
EV_KEYDOWN,
EV_SETCURSOR,
EV_CHGCURSOR,
EV_RESIZE,
EV_GETLOC,
EV_SETLOC,
EV_CMD,
EV_UPDTCMD,
EV_ENABLECMD,
EV_FETCHCMD,
EV_SETTOOLTIP,
EV_QUERYSTATE,
EV_GETINTEGER = EV_QUERYSTATE,
EV_SETSTATE,
EV_SETINTEGER = EV_SETSTATE,
EV_CHGFOCUS,
EV_SETDEFAULT,
EV_INVALIDATE,
EV_REDRAW,
EV_GETTEXT,
EV_SETTEXT,
EV_SETICON,
EV_GETFLOAT,
EV_SETFLOAT,
EV_INIT_WIDGET,
EV_INIT_TAB_WIDGET,
EV_SHOW_WIDGET,
EV_PAGE_CHANGED,
EV_STATUSBAR_TEXT,
EV_NOTIFY,
EV_EDITCHANGE,
EV_EDITACTIVATE,
EV_TIMER,
EV_UPDATEUI,
EV_UPDATEFOCUS,
EV_DRAGQUERY,
EV_DROPQUERY,
EV_DROPIT,
EV_DROPQUERY_CMDID,
EV_DROPREF,
EV_TB_INIT,
EV_TB_END,
EV_TB_BUTTON,
EV_TB_DROPDOWN,
EV_TB_CHECKBTN,
EV_TB_SEPARATOR,
EV_TB_GETCOLOR,
EV_SET_SLIDER,
EV_GET_SLIDERPROP,
EV_SET_SLIDERPROP,
EV_SCROLLCHANGE,
EV_CUSTOM_DRAW,
EV_CUSTOM_CLICK,
EV_TREE_RESETALL,
EV_TREE_INSERT,
EV_TREE_GETINFO,
EV_TREE_SETDATA,
EV_TREE_SETICON,
EV_TREE_DELETE,
EV_TREE_EXPANDING,
EV_TREE_SELECTING,
EV_TREE_EXPAND,
EV_TREE_SELECT,
EV_TREE_GETSEL,
EV_LIST_POPUP,
EV_LIST_SELECTING,
EV_LIST_SELCOLUMN,
EV_LIST_RESORT,
EV_LIST_SETSORTDIR,
EV_LIST_DBLCLICK,
EV_LIST_RESETALL,
EV_LIST_SETFEEDBACK,
EV_LIST_ADDCOLUMNS,
EV_LIST_SHOWCOLUMNS,
EV_LIST_HIDECOLUMNS,
EV_LIST_SETCOLTITLE,
EV_LIST_SETCOLWIDTH,
EV_LIST_NEWROW,
EV_LIST_ROWSETDATA,
EV_LIST_ROWGETDATA,
EV_LIST_INSERT,
EV_LIST_ADDSEL,
EV_LIST_DELROW,
EV_LIST_GETNEXTSEL,
EV_LIST_GETINFO,
EV_LIST_GETNEXT,
EV_COMBO_RESETALL,
EV_COMBO_APPEND,
EV_COMBO_SETSEL,
EV_COMBO_GETSEL,
EV_COMBO_SEL,
EV_COMBO_GETCOUNT,
EV_COMBO_DELSEL,
EV_COMBO_ENABLESEL,
EV_COMBO_GETMENU,
EV_SMARTCOMBO_SETFEATURE,
EV_SMARTCOMBO_SETITEMS,
EV_SMARTCOMBO_SETREADONLY,
EV_COMMAND_START = 1000
}
enum UEventParam {
epNone,
epV_V,
epV_VP,
epV_iVP,
epV_IVP,
epV_i,
epV_I,
epV_ii,
epV_iii,
epV_iiVP,
epi_i,
epi_V,
epi_ii,
epi_iVP,
epi_VP
}
enum UMSG_EXT {
UMSG_NOEXT,
UMSG_RANGE
}
enum | UTB_VAR { DDV_NONE }
enum | UTB_DROP { DDD_NONE = 0x00 }
enum UCURSOR {
uCursArrow,
uCursWatch
}

Functions

int | UEventSendMessage (int wid, int evt, int arg1, void *arg2)
int | UEventSendMessageExt (int wid, int evt, int arg1, void *arg2, int *handledFlag)
int | UEventPostMessage (int wid, int evt, int arg1, void *arg2)
int | UEventNotifyMessage (int evt, int arg1, void *arg2)
int | UEventGetWidID (void)
void | UEventRemoveWidID (int widid)
void | UEventSetTooltipHandler (void(*handler)(const char *))
void | UEventGiveTime (void)
long | UTickCount (void)
UCmdTarget * | UEventQueryWidget (int widid)
const std::map< int, UCmdTarget * > & | UEventGetTargets (void)
HBITMAP | UMakeBitmap (const char *icon)
HBITMAP | UMakeBitmap (char **icon)
HBITMAP | UMakeBitmap (char **icon, int &width, int &height, COLORREF back)

Define Documentation

#define ev_msg

Definition at line 726 of file umain.h.

#define ON_CHGCURSOR | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_CHGCURSOR, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UCURSOR cursor))&baseClass::OnChgCursor },
Definition at line 232 of file umain.h.

#define ON_CHGFOCUS | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_CHGFOCUS, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnChgFocus },
Definition at line 348 of file umain.h.

#define ON_COMBO_APPEND | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_COMBO_APPEND, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, const char *txt))&baseClass::OnComboAppend },
Definition at line 588 of file umain.h.

#define ON_COMBO_DELSEL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_COMBO_DELSEL, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int sel))&baseClass::OnComboDelSel },
Definition at line 596 of file umain.h.

#define ON_COMBO_ENABLESEL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_COMBO_ENABLESEL, epV_iii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int sel, int state))&baseClass::OnComboEnableSel },
Definition at line 600 of file umain.h.

#define ON_COMBO_GETCOUNT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_COMBO_GETCOUNT, epi_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(int (UCmdTarget::*)(int cmd))&baseClass::OnComboGetCount },
Definition at line 612 of file umain.h.

#define ON_COMBO_GETMENU | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_COMBO_GETMENU, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UMENU *menu))&baseClass::OnComboGetMenu },
Definition at line 608 of file umain.h.

#define ON_COMBO_GETSEL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_COMBO_GETSEL, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(int (UCmdTarget::*)(int cmd, UStr *txt))&baseClass::OnComboGetPos },
Definition at line 604 of file umain.h.

#define ON_COMBO_RESETALL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_COMBO_RESETALL, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnComboResetAll },
Definition at line 584 of file umain.h.

#define ON_COMBO_SEL | ( | cmd,
 |  | hook | )

Value:

{ EV_COMBO_SEL, epV_IVP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(int pos, const char *txt))&hook },
Definition at line 616 of file umain.h.

#define ON_COMBO_SEL_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_COMBO_SEL, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int pos, const char *txt))&hook },
Definition at line 620 of file umain.h.

#define ON_COMBO_SETSEL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_COMBO_SETSEL, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int sel))&baseClass::OnComboSetPos },
Definition at line 592 of file umain.h.

#define ON_CUSTOM_CLICK | ( | cmd,
 |  | hook | )

Value:

{ EV_CUSTOM_CLICK, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(void *drawInfo))&hook },
Definition at line 636 of file umain.h.

#define ON_CUSTOM_DRAW | ( | cmd,
 |  | hook | )

Value:

{ EV_CUSTOM_DRAW, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(void *drawInfo))&hook },
Definition at line 639 of file umain.h.

#define ON_CUSTOM_DRAW_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_CUSTOM_DRAW, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, void *drawInfo))&hook },
Definition at line 643 of file umain.h.

#define ON_DRAGQUERY | ( | cmd,
 |  | hook | )

Value:

{ EV_DRAGQUERY, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(UDragable *))&hook },
Definition at line 412 of file umain.h.

#define ON_DRAGQUERY_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_DRAGQUERY, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int, UDragable *))&hook },
Definition at line 424 of file umain.h.

#define ON_DROPIT | ( | cmd,
 |  | hook | )

Value:

{ EV_DROPIT, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(const UDragable *))&hook },
Definition at line 420 of file umain.h.

#define ON_DROPIT_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_DROPIT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int, const UDragable *))&hook },
Definition at line 432 of file umain.h.

#define ON_DROPQUERY | ( | cmd,
 |  | hook | )

Value:

{ EV_DROPQUERY, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(UDropable **))&hook },
Definition at line 416 of file umain.h.

#define ON_DROPQUERY_CMDID ( baseClass )

Value:

{ EV_DROPQUERY_CMDID, epV_iiVP, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(int, int, int *))&baseClass::OnDropQueryCmdID },
Definition at line 436 of file umain.h.

#define ON_DROPQUERY_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_DROPQUERY, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int, UDropable **))&hook },
Definition at line 428 of file umain.h.

#define ON_DROPREF | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_DROPREF, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int numref, long *refs))&hook },
Definition at line 376 of file umain.h.

#define ON_EDITACTIVATE | ( | cmd,
 |  | hook | )

Value:

{ EV_EDITACTIVATE, epV_V, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(void))&hook },
Definition at line 312 of file umain.h.

#define ON_EDITACTIVATE_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_EDITACTIVATE, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&hook },
Definition at line 316 of file umain.h.

#define ON_EDITCHANGE | ( | cmd,
 |  | hook | )

Value:

{ EV_EDITCHANGE, epV_V, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(void))&hook },
Definition at line 304 of file umain.h.

#define ON_EDITCHANGE_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_EDITCHANGE, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&hook },
Definition at line 308 of file umain.h.

#define ON_ENABLECMD | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_ENABLECMD, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int state))&hook },
Definition at line 344 of file umain.h.

#define ON_FETCHCMD | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_FETCHCMD, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(int (UCmdTarget::*)(int cmd, void *widget))&baseClass::OnFetchCmd },
Definition at line 280 of file umain.h.

#define ON_GET_SLIDERPROP | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_GET_SLIDERPROP, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, USLIDER *prop))&baseClass::OnGetSliderProperty },
Definition at line 444 of file umain.h.

#define ON_GETFLOAT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_GETFLOAT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, float *f))&baseClass::OnGetFloat },
Definition at line 408 of file umain.h.

#define ON_GETTEXT | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_GETTEXT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int, UStr *))&hook },
Definition at line 400 of file umain.h.

#define ON_INIT_TAB_WIDGET | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_INIT_TAB_WIDGET, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int, int, void *))&baseClass::OnInitTabWidget },
Definition at line 388 of file umain.h.

#define ON_INIT_WIDGET | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_INIT_WIDGET, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int, void *))&baseClass::OnInitWidget },
Definition at line 384 of file umain.h.

#define ON_INVALIDATE | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_INVALIDATE, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnInvalidate },
Definition at line 356 of file umain.h.

#define ON_KEYDOWN ( baseClass )

Value:

{ EV_KEYDOWN, epV_i, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(int c))&baseClass::OnKeyDown },
Definition at line 220 of file umain.h.

#define ON_LIST_ADDCOLUMNS | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_ADDCOLUMNS, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int num))&baseClass::OnListAddColumns },
Definition at line 532 of file umain.h.

#define ON_LIST_ADDSEL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_ADDSEL, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int entry))&baseClass::OnListAddSel },
Definition at line 520 of file umain.h.

#define ON_LIST_DBLCLICK | ( | cmd,
 |  | hook | )

Value:

{ EV_LIST_DBLCLICK, epV_V, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(void))&hook },
Definition at line 512 of file umain.h.

#define ON_LIST_DELROW | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_DELROW, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int row))&baseClass::OnListDelRow },
Definition at line 524 of file umain.h.

#define ON_LIST_GETINFO | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_GETINFO, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, ULIST_INFO *data))&baseClass::OnListGetInfo },
Definition at line 580 of file umain.h.

#define ON_LIST_GETNEXT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_GETNEXT, epi_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(int (UCmdTarget::*)(int cmd, int whichCell))&baseClass::OnListGetNext },
Definition at line 576 of file umain.h.

#define ON_LIST_GETNEXTSEL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_GETNEXTSEL, epi_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(int (UCmdTarget::*)(int cmd, int selectedCell))&baseClass::OnListGetNextSel },
Definition at line 572 of file umain.h.

#define ON_LIST_HIDECOLUMNS | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_HIDECOLUMNS, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int num))&baseClass::OnListHideColumns },
Definition at line 540 of file umain.h.

#define ON_LIST_INSERT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_INSERT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, ULIST_INSERT *data))&baseClass::OnListInsert },
Definition at line 568 of file umain.h.

#define ON_LIST_NEWROW | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_NEWROW, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int *num))&baseClass::OnListNewRow },
Definition at line 556 of file umain.h.

#define ON_LIST_POPUP | ( | cmd,
 |  | hook | )

Value:

{ EV_LIST_POPUP, epV_IVP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(void))&hook },
Definition at line 516 of file umain.h.

#define ON_LIST_RESETALL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_RESETALL, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnListResetAll },
Definition at line 528 of file umain.h.

#define ON_LIST_RESORT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_RESORT, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int column, UListSorter s))&baseClass::OnListResort },
Definition at line 504 of file umain.h.

#define ON_LIST_ROWGETDATA | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_ROWGETDATA, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int row, void **data))&baseClass::OnListRowGetData },
Definition at line 564 of file umain.h.

#define ON_LIST_ROWSETDATA | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_ROWSETDATA, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int row, void *data))&baseClass::OnListRowSetData },
Definition at line 560 of file umain.h.

#define ON_LIST_SELCOLUMN | ( | cmd,
 |  | hook | )

Value:

{ EV_LIST_SELCOLUMN, epV_I, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(int entry))&hook },
Definition at line 500 of file umain.h.

#define ON_LIST_SELECTING | ( | cmd,
 |  | hook | )

Value:

{ EV_LIST_SELECTING, epV_IVP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(int entry, const char *txt))&hook },
Definition at line 496 of file umain.h.

#define ON_LIST_SETCOLTITLE | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_SETCOLTITLE, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int num, const char *title))&baseClass::OnListSetColTitle },
Definition at line 548 of file umain.h.

#define ON_LIST_SETCOLWIDTH | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_SETCOLWIDTH, epV_iii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int num, int width))&baseClass::OnListSetColWidth },
Definition at line 552 of file umain.h.

#define ON_LIST_SETFEEDBACK | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_SETFEEDBACK, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int turnOn))&baseClass::OnListSetFeedback },
Definition at line 544 of file umain.h.

#define ON_LIST_SETSORTDIR | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_RESORT, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int column, bool dir))&baseClass::OnListSetSortDir },
Definition at line 508 of file umain.h.

#define ON_LIST_SHOWCOLUMNS | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_LIST_SHOWCOLUMNS, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int num))&baseClass::OnListShowColumns },
Definition at line 536 of file umain.h.

#define ON_PAGE_CHANGED | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_PAGE_CHANGED, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int pagenum))&baseClass::OnPageChanged },
Definition at line 368 of file umain.h.

#define ON_QUERYSTATE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_QUERYSTATE, epi_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(int (UCmdTarget::*)(int cmd))&hook },
Definition at line 300 of file umain.h.

#define ON_REDRAW | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_REDRAW, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnRedraw },
Definition at line 360 of file umain.h.

#define ON_RESIZE | ( | cmd,
 |  | hook | )

Value:

{ EV_RESIZE, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(const URECT * r))&hook },
Definition at line 224 of file umain.h.

#define ON_SCROLLCHANGE | ( | cmd,
 |  | hook | )

Value:

{ EV_SCROLLCHANGE, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(int pos))&hook },
Definition at line 320 of file umain.h.

#define ON_SCROLLCHANGE_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_SCROLLCHANGE, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int pos))&hook },
Definition at line 324 of file umain.h.

#define ON_SET_SLIDER | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_SET_SLIDER, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int pos))&baseClass::OnSetSlider },
Definition at line 440 of file umain.h.

#define ON_SET_SLIDERPROP | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_SET_SLIDERPROP, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, const USLIDER *prop))&baseClass::OnSetSliderProperty },
Definition at line 448 of file umain.h.

#define ON_SETCURSOR ( baseClass )

Value:

{ EV_SETCURSOR, epV_V, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnSetCursor },
Definition at line 228 of file umain.h.

#define ON_SETDEFAULT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_SETDEFAULT, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnSetDefault },
Definition at line 352 of file umain.h.

#define ON_SETFLOAT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_SETFLOAT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, const float *f))&baseClass::OnSetFloat },
Definition at line 404 of file umain.h.

#define ON_SETICON | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_SETICON, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int, void *))&hook },
Definition at line 392 of file umain.h.

#define ON_SETSTATE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_SETSTATE, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int state))&hook },
Definition at line 340 of file umain.h.

#define ON_SETTEXT | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_SETTEXT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int, const char *))&hook },
Definition at line 396 of file umain.h.

#define ON_SHOW_WIDGET | ( | cmd,
 |  | hook | )

Value:

{ EV_SHOW_WIDGET, epV_I, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(int state))&hook },
Definition at line 364 of file umain.h.

#define ON_SHOW_WIDGET_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_SHOW_WIDGET, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int state))&hook },
Definition at line 372 of file umain.h.

#define ON_SMARTCOMBO_SETFEATURE | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_SMARTCOMBO_SETFEATURE, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int feature))&baseClass::OnSmartComboSetFeature },
Definition at line 624 of file umain.h.

#define ON_SMARTCOMBO_SETITEMS | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_SMARTCOMBO_SETITEMS, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, CMString* items))&baseClass::OnSmartComboSetItems },
Definition at line 628 of file umain.h.

#define ON_SMARTCOMBO_SETREADONLY | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_SMARTCOMBO_SETREADONLY, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, bool readOnly))&baseClass::OnSmartComboSetReadOnly },
Definition at line 632 of file umain.h.

#define ON_STATUSBAR_TEXT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_STATUSBAR_TEXT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, const char *txt))&baseClass::OnStatusBarText },
Definition at line 647 of file umain.h.

#define ON_TB_BUTTON ( baseClass )

Value:

{ EV_TB_BUTTON, epV_VP, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(UTB_BUTTON *info))&baseClass::OnTbButton },
Definition at line 244 of file umain.h.

#define ON_TB_CHECKBTN ( baseClass )

Value:

{ EV_TB_CHECKBTN, epV_VP, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(UTB_BUTTON *info))&baseClass::OnTbCheckBtn },
Definition at line 252 of file umain.h.

#define ON_TB_DROPDOWN ( baseClass )

Value:

{ EV_TB_DROPDOWN, epV_VP, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(UTB_DROPDOWN *info))&baseClass::OnTbDropDown },
Definition at line 248 of file umain.h.

#define ON_TB_END ( baseClass )

Value:

{ EV_TB_END, epV_V, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnTbEnd },
Definition at line 240 of file umain.h.

#define ON_TB_GETCOLOR ( baseClass )

Value:

{ EV_TB_GETCOLOR, epV_iVP, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, float *color))&baseClass::OnTbGetColor },
Definition at line 256 of file umain.h.

#define ON_TB_INIT ( baseClass )

Value:

{ EV_TB_INIT, epV_VP, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(UTB_INIT *info))&baseClass::OnTbInit },
Definition at line 236 of file umain.h.

#define ON_TB_SEPARATOR ( baseClass )

Value:

{ EV_TB_SEPARATOR, epV_V, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnTbSeparator },
Definition at line 260 of file umain.h.

#define ON_TIMER | ( | cmd,
 |  | hook | )

Value:

{ EV_TIMER, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(long time))&hook },
Definition at line 328 of file umain.h.

#define ON_TREE_DELETE | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_DELETE, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UTREEITEM item))&baseClass::OnTreeDelete },
Definition at line 472 of file umain.h.

#define ON_TREE_EXPAND | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_EXPAND, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int collapse, UTREEITEM item))&baseClass::OnTreeExpand },
Definition at line 476 of file umain.h.

#define ON_TREE_EXPANDING | ( | cmd,
 |  | hook | )

Value:

{ EV_TREE_EXPANDING, epV_IVP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(int collapse, UTREEITEM item))&hook },
Definition at line 488 of file umain.h.

#define ON_TREE_GETINFO | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_GETINFO, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UTREE_INFO *data))&baseClass::OnTreeGetInfo },
Definition at line 460 of file umain.h.

#define ON_TREE_GETSEL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_GETSEL, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UTREEITEM *item))&baseClass::OnTreeGetSel },
Definition at line 484 of file umain.h.

#define ON_TREE_INSERT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_INSERT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UTREE_INSERT *data))&baseClass::OnTreeInsert },
Definition at line 456 of file umain.h.

#define ON_TREE_RESETALL | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_RESETALL, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnTreeResetAll },
Definition at line 452 of file umain.h.

#define ON_TREE_SELECT | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_SELECT, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, int deselect, UTREEITEM item))&baseClass::OnTreeSelect },
Definition at line 480 of file umain.h.

#define ON_TREE_SELECTING | ( | cmd,
 |  | hook | )

Value:

{ EV_TREE_SELECTING, epV_IVP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(int deselect, UTREEITEM item))&hook },
Definition at line 492 of file umain.h.

#define ON_TREE_SETDATA | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_SETDATA, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UTREE_INFO *data))&baseClass::OnTreeSetData },
Definition at line 464 of file umain.h.

#define ON_TREE_SETICON | ( | baseClass,
 |  | cmdmin,
 |  | cmdmax | )

Value:

{ EV_TREE_SETICON, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UTREE_INFO *data))&baseClass::OnTreeSetIcon },
Definition at line 468 of file umain.h.

#define ON_UBTNDBLDOWN ( baseClass )

Value:

{ EV_BTNDBLDOWN, epV_iii, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(int x, int y, int mod))&baseClass::OnBtnDblDown },
Definition at line 216 of file umain.h.

#define ON_UBTNDOWN ( baseClass )

Value:

{ EV_BTNDOWN, epV_iii, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(int x, int y, int mod))&baseClass::OnBtnDown },
Definition at line 208 of file umain.h.

#define ON_UBTNUP ( baseClass )

Value:

{ EV_BTNUP, epV_iii, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(int x, int y, int mod))&baseClass::OnBtnUp },
Definition at line 212 of file umain.h.

#define ON_UCOMMAND | ( | cmd,
 |  | hook | )

Value:

{ EV_CMD, epi_V, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(int (UCmdTarget::*)(void))&hook },
Definition at line 264 of file umain.h.

#define ON_UCOMMAND_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_CMD, epi_i, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(int (UCmdTarget::*)(int cmd))&hook },
Definition at line 268 of file umain.h.

#define ON_UCOMMAND_RANGEEX | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_CMD, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(int (UCmdTarget::*)(int cmd, void *data))&hook },
Definition at line 272 of file umain.h.

#define ON_UCREATE ( baseClass )

Value:

{ EV_CREATE, epV_V, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnCreate },
Definition at line 184 of file umain.h.

#define ON_UDESTROY ( baseClass )

Value:

{ EV_DESTROY, epV_V, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnDestroy },
Definition at line 188 of file umain.h.

#define ON_UENTER ( baseClass )

Value:

{ EV_ENTER, epV_VP, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void *))&baseClass::OnEnter },
Definition at line 192 of file umain.h.

#define ON_UEXPOSE ( baseClass )

Value:

{ EV_EXPOSE, epV_V, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnExpose },
Definition at line 200 of file umain.h.

#define ON_UGETLLOC | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_GETLOC, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, URECT *r))&hook },
Definition at line 292 of file umain.h.

#define ON_ULEAVE ( baseClass )

Value:

{ EV_LEAVE, epV_V, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnLeave },
Definition at line 196 of file umain.h.

#define ON_UMMOVE ( baseClass )

Value:

{ EV_MMOVE, epV_iii, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(int x, int y, int mod))&baseClass::OnMouseMove },
Definition at line 204 of file umain.h.

#define ON_UNOTIFY | ( | cmd,
 |  | hook | )

Value:

{ EV_NOTIFY, epV_V, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(void))&hook },
Definition at line 380 of file umain.h.

#define ON_UPDATEFOCUS ( baseClass )

Value:

{ EV_UPDATEFOCUS, epi_iVP, UMSG_NOEXT, 0, 0, \
        (UPMSG)(int (UCmdTarget::*)(int leave, void *widget))&baseClass::OnUpdateFocus },
Definition at line 336 of file umain.h.

#define ON_UPDATEUI ( baseClass )

Value:

{ EV_UPDATEUI, epV_V, UMSG_NOEXT, 0, 0, \
        (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnUpdateUI },
Definition at line 332 of file umain.h.

#define ON_USETLLOC | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_SETLOC, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, const URECT *r))&hook },
Definition at line 296 of file umain.h.

#define ON_USETTOOLTIP | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_SETTOOLTIP, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UCmdUI *pCmdUI))&hook },
Definition at line 288 of file umain.h.

#define ON_UUPDATECMD | ( | cmd,
 |  | hook | )

Value:

{ EV_UPDTCMD, epV_VP, UMSG_RANGE, cmd, cmd, \
        (UPMSG)(void (UCmdTarget::*)(UCmdUI *pCmdUI))&hook },
Definition at line 276 of file umain.h.

#define ON_UUPDATECMD_RANGE | ( | cmdmin,
 |  | cmdmax,
 |  | hook | )

Value:

{ EV_UPDTCMD, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
        (UPMSG)(void (UCmdTarget::*)(int cmd, UCmdUI *pCmdUI))&hook },
Definition at line 284 of file umain.h.

#define STD std::

Definition at line 174 of file umain.h.

Referenced by LMainPseudoAttachment::ExecuteSelf(), CAllTargets::Get(), UWidget::HasModal(), UToolbar::OnCommands(), UMenu::OnCommands(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), UMacAppMenu::OnUpdateUI(), UEventGetTargets(), UEventGiveTime(), UEventNotifyMessage(), UEventQueryWidget(), UEventRemoveWidID(), UEventSendMessage(), UEventSendMessageExt(), and CAllTargets::~CAllTargets().

#define UBEGIN_MESSAGE_MAP | ( | theClass,
 |  | baseClass | )

Value:

const UMSGMAP* theClass::GetBaseMessageMap() \
        { return baseClass::GetThisMessageMap(); } \
    const UMSGMAP* theClass::GetThisMessageMap() \
        { return &theClass::messageMap; } \
    const UMSGMAP* theClass::GetMessageMap() const \
        { return &theClass::messageMap; } \
    const UMSGMAP theClass::messageMap = \
    { baseClass::GetThisMessageMap(), &theClass::_messageEntries[0] }; \
    const UMSGMAP_ENTRY theClass::_messageEntries[] = \
    { \
Definition at line 706 of file umain.h.

#define UCMD_to_WINCMD ( cmd ) (cmd)

Definition at line 911 of file umain.h.

Referenced by CDynToolBar::OnDropDownButton(), UToolbar::RebuildBar(), UMenuAddButton(), and UMenuAddToggle().

#define UCMD_to_WINCTL ( cmd ) ((cmd)-EV_COMMAND_START+WINCMD_DLG_START)

Definition at line 913 of file umain.h.

Referenced by CPseudoDlg::DoDataExchange().

#define UDECLARE_MESSAGE_MAP ( )

Value:

private: \
    static const UMSGMAP_ENTRY _messageEntries[]; \
protected: \
    static const UMSGMAP messageMap; \
    static const UMSGMAP* GetBaseMessageMap(); \
    static const UMSGMAP* GetThisMessageMap(); \
    virtual const UMSGMAP* GetMessageMap() const; \
Definition at line 694 of file umain.h.

#define UEND_MESSAGE_MAP ( )

Value:

{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 } \
    }; \
Definition at line 721 of file umain.h.

#define UHIWORD ( l ) ((short)(((int)(l) >> 16) & 0xFFFF))

Definition at line 832 of file umain.h.

Referenced by UWidget::DoModal(), UCmdTarget::UDispatchMessage(), and UMenuDeleteByCmd().

#define UK_ADD 0x6B

Definition at line 877 of file umain.h.

#define UK_ALT 0x20

Definition at line 841 of file umain.h.

Referenced by addAccel(), GetMenuTitle(), and UWinToUMod().

#define UK_BACK 0x08

Definition at line 845 of file umain.h.

#define UK_CANCEL 0x03

Definition at line 844 of file umain.h.

#define UK_CLEAR 0x0C

Definition at line 847 of file umain.h.

#define UK_CONTROL 0x08

Definition at line 839 of file umain.h.

Referenced by addAccel(), GetMenuTitle(), and UWinToUMod().

#define UK_DECIMAL 0x6E

Definition at line 880 of file umain.h.

#define UK_DELETE 0x2E

Definition at line 860 of file umain.h.

#define UK_DIVIDE 0x6F

Definition at line 881 of file umain.h.

#define UK_DOWN 0x28

Definition at line 858 of file umain.h.

#define UK_END 0x23

Definition at line 853 of file umain.h.

#define UK_ESCAPE 0x1B

Definition at line 849 of file umain.h.

#define UK_F1 0x70

Definition at line 882 of file umain.h.

#define UK_F10 0x79

Definition at line 891 of file umain.h.

#define UK_F11 0x7A

Definition at line 892 of file umain.h.

#define UK_F12 0x7B

Definition at line 893 of file umain.h.

#define UK_F13 0x7C

Definition at line 894 of file umain.h.

#define UK_F14 0x7D

Definition at line 895 of file umain.h.

#define UK_F15 0x7E

Definition at line 896 of file umain.h.

#define UK_F16 0x7F

Definition at line 897 of file umain.h.

#define UK_F17 0x80

Definition at line 898 of file umain.h.

#define UK_F18 0x81

Definition at line 899 of file umain.h.

#define UK_F19 0x82

Definition at line 900 of file umain.h.

#define UK_F2 0x71

Definition at line 883 of file umain.h.

#define UK_F20 0x83

Definition at line 901 of file umain.h.

#define UK_F21 0x84

Definition at line 902 of file umain.h.

#define UK_F22 0x85

Definition at line 903 of file umain.h.

#define UK_F23 0x86

Definition at line 904 of file umain.h.

#define UK_F24 0x87

Definition at line 905 of file umain.h.

#define UK_F3 0x72

Definition at line 884 of file umain.h.

#define UK_F4 0x73

Definition at line 885 of file umain.h.

#define UK_F5 0x74

Definition at line 886 of file umain.h.

#define UK_F6 0x75

Definition at line 887 of file umain.h.

#define UK_F7 0x76

Definition at line 888 of file umain.h.

#define UK_F8 0x77

Definition at line 889 of file umain.h.

#define UK_F9 0x78

Definition at line 890 of file umain.h.

#define UK_HELP 0x2F

Definition at line 861 of file umain.h.

#define UK_HOME 0x24

Definition at line 854 of file umain.h.

#define UK_INSERT 0x2D

Definition at line 859 of file umain.h.

#define UK_LBUTTON 0x01

Definition at line 836 of file umain.h.

Referenced by UCvsGraph::OnBtnClick().

#define UK_LEFT 0x25

Definition at line 855 of file umain.h.

#define UK_MBUTTON 0x02

Definition at line 837 of file umain.h.

Referenced by UWinToUMod().

#define UK_MINUS 0x6D

Definition at line 864 of file umain.h.

#define UK_MULTIPLY 0x6A

Definition at line 876 of file umain.h.

#define UK_NEXT 0x22

Definition at line 852 of file umain.h.

#define UK_NUMPAD0 0x60

Definition at line 866 of file umain.h.

#define UK_NUMPAD1 0x61

Definition at line 867 of file umain.h.

#define UK_NUMPAD2 0x62

Definition at line 868 of file umain.h.

#define UK_NUMPAD3 0x63

Definition at line 869 of file umain.h.

#define UK_NUMPAD4 0x64

Definition at line 870 of file umain.h.

#define UK_NUMPAD5 0x65

Definition at line 871 of file umain.h.

#define UK_NUMPAD6 0x66

Definition at line 872 of file umain.h.

#define UK_NUMPAD7 0x67

Definition at line 873 of file umain.h.

#define UK_NUMPAD8 0x68

Definition at line 874 of file umain.h.

#define UK_NUMPAD9 0x69

Definition at line 875 of file umain.h.

#define UK_PLUS 0x6B

Definition at line 863 of file umain.h.

#define UK_PRIOR 0x21

Definition at line 851 of file umain.h.

#define UK_RBUTTON 0x04

Definition at line 838 of file umain.h.

Referenced by UWinToUMod().

#define UK_RETURN 0x0D

Definition at line 848 of file umain.h.

#define UK_RIGHT 0x27

Definition at line 857 of file umain.h.

#define UK_SEPARATOR 0x6C

Definition at line 878 of file umain.h.

#define UK_SHIFT 0x10

Definition at line 840 of file umain.h.

Referenced by UWinToUMod().

#define UK_SPACE 0x20

Definition at line 850 of file umain.h.

#define UK_SUBTRACT 0x6D

Definition at line 879 of file umain.h.

#define UK_TAB 0x09

Definition at line 846 of file umain.h.

#define UK_UP 0x26

Definition at line 856 of file umain.h.

#define ULOWORD ( l ) ((short)(l))

Definition at line 831 of file umain.h.

Referenced by UWidget::DoModal(), and UCmdTarget::UDispatchMessage().

#define UMAKEINT | ( | a,
 |  | b | ) | ((int)(((short)(a)) | ((int)((short)(b))) << 16))

Definition at line 830 of file umain.h.

Referenced by UWidget::AddPage(), CvsLogParse(), UCvsFiles::DisableGeneric(), TPseudoWinBehavior::DoEvent(), UWidget::DoModal(), UPseudoPlaceHolder::DoRotate(), CPseudoItem::DoubleClick(), UCvsFiles::HideColumns(), TViewFill::InitItem(), LPseudoWinAttachment::ListenToMessage(), UWidget::OnBlockHandler(), UCvsFiles::OnCmdEditsel(), UCvsFiles::OnCmdEditseldef(), UCvsFiles::OnCmdExplore(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIEditseldef(), UCvsFiles::OnCmdUIExplore(), UCvsFiles::OnCmdUIGraph(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFiles::OnCmdUIRelease(), UCvsFiles::OnCmdUIRmv(), UCvsFiles::OnCmdUITrash(), UCvsFiles::OnCmdUIUpdate(), UWidget::OnComboAppend(), UCvsFiles::OnCreate(), UCvsFiles::OnDblClick(), UWidget::OnInitWidget(), CPseudoList::OnLButtonDblClk(), UCvsFiles::OnMacroSel(), UWidget::OnPageChanged(), UCvsFolders::OnTreeExpanding(), UWidget::OnTreeInsert(), UWidget::OnUnblockHandler(), UCvsFiles::ProcessSelectionCommand(), UCvsFolders::ResetBrowser(), UCvsFolders::ResetView(), UCvsFiles::ResetView(), UCvsFiles::Resort(), UCvsFiles::Search(), UCvsFiles::ShowColumns(), CPseudoItem::SingleClick(), UCvsFolders::StepToLocation(), UWaitCursor::UWaitCursor(), UWinPseudoWindowProc(), and UWaitCursor::~UWaitCursor().

#define UMENU_NULL ((UMENU)0L)

Definition at line 919 of file umain.h.

Referenced by CreateMainMenubar(), UWidget::OnComboGetMenu(), UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), UMenuAddSeparator(), UMenuAddToggle(), UMenuCount(), UMenuDelete(), and UMenuDeleteByCmd().

#define UTB_SEPARATOR (-1)

Definition at line 922 of file umain.h.

Referenced by UToolbar::RebuildBar().

#define WINCMD_DLG_END 3000

Definition at line 910 of file umain.h.

#define WINCMD_DLG_START 2000

Definition at line 909 of file umain.h.

#define WINCMD_to_UCMD ( cmd ) (cmd)

Definition at line 912 of file umain.h.

Referenced by CDynToolBar::OnDropDownButton(), CWinCvsBrowser::OnMacro(), CBrowseFileView::OnMacro(), CWinCvsBrowser::OnUpdateMacro(), and CBrowseFileView::OnUpdateMacro().

#define WINCTL_to_UCMD ( cmd ) ((cmd)-WINCMD_DLG_START+EV_COMMAND_START)

Definition at line 914 of file umain.h.

Referenced by UWinPseudoWindowProc(), and WinInitWidgets().

Typedef Documentation

typedef int(* UListSorter)(UWidget *wid, void *data1, void *data2)

Definition at line 1017 of file umain.h.

Referenced by UWidget::OnListResort().

typedef long UMENU

Definition at line 918 of file umain.h.

Referenced by PyMenuMgr::Create(), CreateMainMenubar(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), UWidget::OnComboGetMenu(), ParseUMENU(), PyMenuMgr::PyMenuMgr(), UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), UMenuAddSeparator(), UMenuAddToggle(), UMenuCount(), UMenuDelete(), and UMenuDeleteByCmd().

typedef void(UCmdTarget::* UPMSG)(void)

Definition at line 182 of file umain.h.

typedef void* UTREEITEM

Definition at line 987 of file umain.h.

Referenced by UCvsFolders::DeleteAllItems(), GetIcon(), UCvsFolders::GetItemByLocation(), UCvsFolders::OnCmdExplore(), UCvsFolders::OnCmdMacrosSel(), UCvsFolders::OnCmdUIExplore(), UCvsFolders::OnCmdUIMacrosSel(), UWidget::OnTreeDelete(), UWidget::OnTreeExpand(), UCvsFolders::OnTreeExpanding(), UWidget::OnTreeGetSel(), UWidget::OnTreeInsert(), UWidget::OnTreeSelect(), UCvsFolders::OnTreeSelecting(), UCvsFolders::OnUpdateGeneric(), UCvsFolders::ProcessSelectionCommand(), UCvsFolders::ResetView(), UCvsFolders::RetrievePath(), UCvsFolders::StepToLocation(), UCvsFolders::StoreExpanded(), TBrowserFill::TBrowserFill(), and TBrowserFillDummy::TBrowserFillDummy().

Enumeration Type Documentation

enum UCURSOR

Enumeration values:
uCursArrow
uCursWatch
Definition at line 966 of file umain.h.
00967 {
00968     uCursArrow,
00969     uCursWatch
00970 } UCURSOR;

enum UEventParam

Enumeration values:
epNone
epV_V
epV_VP
epV_iVP
epV_IVP
epV_i
epV_I
epV_ii
epV_iii
epV_iiVP
epi_i
epi_V
epi_ii
epi_iVP
epi_VP
Definition at line 652 of file umain.h.
00653 {
00654     epNone,
00655     epV_V,      // void (void)
00656     epV_VP,     // void (arg2)
00657     epV_iVP,    // void (arg1, arg2)
00658     epV_IVP,    // void (HI(arg1), arg2)
00659     epV_i,      // void (arg1)
00660     epV_I,      // void (HI(arg1))
00661     epV_ii,     // void (LO(arg1), HI(arg1))
00662     epV_iii,    // void (LO(arg1), HI(arg1), (int)arg2)
00663     epV_iiVP,   // void (LO(arg1), HI(arg1), arg2)
00664     epi_i,      // int (arg1)
00665     epi_V,      // int (void)
00666     epi_ii,     // int (LO(arg1), HI(arg1))
00667     epi_iVP,    // int (arg1, arg2)
00668     epi_VP      // int (arg2)
00669 } UEventParam;

enum UEventType

Enumeration values:
EV_NONE
EV_CREATE
EV_DESTROY
EV_ENTER
EV_LEAVE
EV_EXPOSE
EV_MMOVE
EV_BTNDOWN
EV_BTNUP
EV_BTNDBLDOWN
EV_KEYDOWN
EV_SETCURSOR
EV_CHGCURSOR
EV_RESIZE
EV_GETLOC
EV_SETLOC
EV_CMD
EV_UPDTCMD
EV_ENABLECMD
EV_FETCHCMD
EV_SETTOOLTIP
EV_QUERYSTATE
EV_GETINTEGER
EV_SETSTATE
EV_SETINTEGER
EV_CHGFOCUS
EV_SETDEFAULT
EV_INVALIDATE
EV_REDRAW
EV_GETTEXT
EV_SETTEXT
EV_SETICON
EV_GETFLOAT
EV_SETFLOAT
EV_INIT_WIDGET
EV_INIT_TAB_WIDGET
EV_SHOW_WIDGET
EV_PAGE_CHANGED
EV_STATUSBAR_TEXT
EV_NOTIFY
EV_EDITCHANGE
EV_EDITACTIVATE
EV_TIMER
EV_UPDATEUI
EV_UPDATEFOCUS
EV_DRAGQUERY
EV_DROPQUERY
EV_DROPIT
EV_DROPQUERY_CMDID
EV_DROPREF
EV_TB_INIT
EV_TB_END
EV_TB_BUTTON
EV_TB_DROPDOWN
EV_TB_CHECKBTN
EV_TB_SEPARATOR
EV_TB_GETCOLOR
EV_SET_SLIDER
EV_GET_SLIDERPROP
EV_SET_SLIDERPROP
EV_SCROLLCHANGE
EV_CUSTOM_DRAW
EV_CUSTOM_CLICK
EV_TREE_RESETALL
EV_TREE_INSERT
EV_TREE_GETINFO
EV_TREE_SETDATA
EV_TREE_SETICON
EV_TREE_DELETE
EV_TREE_EXPANDING
EV_TREE_SELECTING
EV_TREE_EXPAND
EV_TREE_SELECT
EV_TREE_GETSEL
EV_LIST_POPUP
EV_LIST_SELECTING
EV_LIST_SELCOLUMN
EV_LIST_RESORT
EV_LIST_SETSORTDIR
EV_LIST_DBLCLICK
EV_LIST_RESETALL
EV_LIST_SETFEEDBACK
EV_LIST_ADDCOLUMNS
EV_LIST_SHOWCOLUMNS
EV_LIST_HIDECOLUMNS
EV_LIST_SETCOLTITLE
EV_LIST_SETCOLWIDTH
EV_LIST_NEWROW
EV_LIST_ROWSETDATA
EV_LIST_ROWGETDATA
EV_LIST_INSERT
EV_LIST_ADDSEL
EV_LIST_DELROW
EV_LIST_GETNEXTSEL
EV_LIST_GETINFO
EV_LIST_GETNEXT
EV_COMBO_RESETALL
EV_COMBO_APPEND
EV_COMBO_SETSEL
EV_COMBO_GETSEL
EV_COMBO_SEL
EV_COMBO_GETCOUNT
EV_COMBO_DELSEL
EV_COMBO_ENABLESEL
EV_COMBO_GETMENU
EV_SMARTCOMBO_SETFEATURE
EV_SMARTCOMBO_SETITEMS
EV_SMARTCOMBO_SETREADONLY
EV_COMMAND_START
Definition at line 33 of file umain.h.
00034 {
00035     EV_NONE,
00036
00037     /* system events */
00038     EV_CREATE,      /* void OnCreate(void) */
00039     EV_DESTROY,     /* void OnDestroy(void) */
00040     EV_ENTER,       /* void OnEnter(void *data) */
00041     EV_LEAVE,       /* void OnLeave(void) */
00042     EV_EXPOSE,      /* void OnExpose(void) */
00043     EV_MMOVE,       /* void OnMouseMove(int x, int y, int mod) */
00044     EV_BTNDOWN,     /* void OnBtnDown(int x, int y, int mod) */
00045     EV_BTNUP,       /* void OnBtnUp(int x, int y, int mod) */
00046     EV_BTNDBLDOWN,  /* void OnBtnDblDown(int x, int y, int mod) */
00047     EV_KEYDOWN,     /* void OnKeyDown(int c) */
00048     EV_SETCURSOR,   /* void OnSetCursor(void) */
00049     EV_CHGCURSOR,   /* void OnChgCursor(int cmd, UCURSOR cursor) */
00050     EV_RESIZE,      /* void OnResize(const URECT * r) */
00051     EV_GETLOC,      /* void OnGetLoc<Cmd>(int cmd, URECT *) */
00052     EV_SETLOC,      /* void OnSetLoc<Cmd>(int cmd, const URECT *) */
00053
00054     /* generic */
00055     EV_CMD,         /* int On<Cmd>(void) */
00056     EV_UPDTCMD,     /* void OnUpdate<Cmd>(UCmdUI *pCmdUI) */
00057     EV_ENABLECMD,   /* void OnEnableCmd<Cmd>(int cmd, int enabled) */
00058     EV_FETCHCMD,    /* int OnFetchCmd(int cmd, void *widget) */
00059     EV_SETTOOLTIP,  /* void OnSetTooltip<Cmd>(int cmd, UCmdUI *pCmdUI) */
00060     EV_QUERYSTATE,  /* int OnQueryState<Cmd>(int cmd) */
00061     EV_GETINTEGER = EV_QUERYSTATE,
00062     EV_SETSTATE,    /* void OnSetState<Cmd>(int cmd, int state) */
00063     EV_SETINTEGER = EV_SETSTATE,
00064     EV_CHGFOCUS,    /* void OnChgFocus(int cmd) */
00065     EV_SETDEFAULT,  /* void OnSetDefault(int cmd) */
00066     EV_INVALIDATE,  /* void OnInvalidate(int cmd) */
00067     EV_REDRAW,      /* void OnRedraw(int cmd) */
00068     EV_GETTEXT,     /* void OnGetText(int cmd, UStr *text); */
00069     EV_SETTEXT,     /* void OnSetText(int cmd, const char *text); */
00070     EV_SETICON,     /* void OnSetIcon(int cmd, void *pixmap); */
00071     EV_GETFLOAT,    /* void OnGetFloat(int cmd, float *f); */
00072     EV_SETFLOAT,    /* void OnSetFloat(int cmd, const float *f); */
00073     EV_INIT_WIDGET, /* void OnInitWidget(int cmd, void *widget); */
00074     EV_INIT_TAB_WIDGET, /* void OnInitTabWidget(int cmd, int page, void *widget); */
00075     EV_SHOW_WIDGET, /* void OnShowWidget<Cmd>(int cmd, int state) */
00076     EV_PAGE_CHANGED,    /* void OnPageChanged<Cmd>(int cmd, int pagenum) */
00077     EV_STATUSBAR_TEXT,  /* void OnStatusBarText(int cmd, const char *text) */
00078
00079
00080     /* notifying */
00081     EV_NOTIFY,          /* void OnNotify<Cmd>(void) */
00082     EV_EDITCHANGE,      /* void OnEditChange<Cmd>(void) */
00083     EV_EDITACTIVATE,    /* void OnEditActivate<Cmd>(void) */
00084     EV_TIMER,           /* void OnTimer<Cmd>(long time) */
00085     EV_UPDATEUI,        /* void OnUpdateUI(void) */
00086     EV_UPDATEFOCUS,     /* int OnUpdateFocus(int leave, void *widget) */
00087
00088     /* drag'n drop */
00089     EV_DRAGQUERY,       /* void OnDragQuery<Cmd>(UDragable *) */
00090     EV_DROPQUERY,       /* void OnDropQuery<Cmd>(UDropable **) */
00091     EV_DROPIT,          /* void OnDropIt<Cmd>(const UDragable *) */
00092     EV_DROPQUERY_CMDID, /* void OnDropQueryCmdID<Cmd>(int x, int y, int *cmdid) */
00093     EV_DROPREF,     /* void OnDropRef<Cmd>(int cmd, int nbref, long *ref) */
00094
00095     /* toolbar manager */
00096     EV_TB_INIT,         /* void OnTbInit(UTB_INIT *info) */
00097     EV_TB_END,          /* void OnTbEnd(void) */
00098     EV_TB_BUTTON,       /* void OnTbButton(UTB_BUTTON *info) */
00099     EV_TB_DROPDOWN,     /* void OnTbDropDown(UTB_DROPDOWN *info) */
00100     EV_TB_CHECKBTN,     /* void OnTbCheckBtn(UTB_BUTTON *info) */
00101     EV_TB_SEPARATOR,    /* void OnTbSeparator(void) */
00102     EV_TB_GETCOLOR,     /* void OnTbGetColor(int cmd, float *color) */
00103
00104     /* slider */
00105     EV_SET_SLIDER,      /* void OnSetSlider(int cmd, int pos) */
00106     EV_GET_SLIDERPROP,  /* void OnGetSliderProperty(int cmd, USLIDER *prop) */
00107     EV_SET_SLIDERPROP,  /* void OnSetSliderProperty(int cmd, const USLIDER *prop) */
00108     EV_SCROLLCHANGE,    /* void OnScrollChange<Cmd>(int pos) */
00109
00110     /* custom drawing */
00111     EV_CUSTOM_DRAW,     /* void OnCustomDraw<Cmd>(void *drawInfo) */
00112     EV_CUSTOM_CLICK,    /* void OnCustimClick<Cmd>(void *drawInfo) */
00113
00114     /* tree */
00115     EV_TREE_RESETALL,   /* void OnTreeResetAll(int cmd) */
00116     EV_TREE_INSERT,     /* void OnTreeInsert(int cmd, UTREE_INSERT *data) */
00117     EV_TREE_GETINFO,    /* void OnTreeGetInfo(int cmd, UTREE_INFO *data) */
00118     EV_TREE_SETDATA,    /* void OnTreeSetData(int cmd, UTREE_INFO *data) */
00119     EV_TREE_SETICON,    /* void OnTreeSetIcon(int cmd, UTREE_INFO *data) */
00120     EV_TREE_DELETE,     /* void OnTreeDelete(int cmd, UTREEITEM item) */
00121     EV_TREE_EXPANDING,  /* void OnTreeExpanding<cmd>(int collapse, UTREEITEM item) */
00122     EV_TREE_SELECTING,  /* void OnTreeSelecting<cmd>(int deselecting, UTREEITEM item) */
00123     EV_TREE_EXPAND,     /* void OnTreeExpand(int cmd, int collapse, UTREEITEM item) */
00124     EV_TREE_SELECT,     /* void OnTreeSelect(int cmd, int deselect, UTREEITEM item) */
00125     EV_TREE_GETSEL,     /* void OnTreeGetSel(int cmd, UTREEITEM *item) */
00126
00127     /* list */
00128     EV_LIST_POPUP,          /* void OnListChange<Cmd>(int entry, const char *txt) */
00129     EV_LIST_SELECTING,      /* void OnListChange<Cmd>(int entry, const char *txt) */
00130     EV_LIST_SELCOLUMN,      /* void OnListSelColumn<Cmd>(int entry) */
00131     EV_LIST_RESORT,         /* void OnListResort(int cmd, int column, UListSorter s) */
00132     EV_LIST_SETSORTDIR,     /* void OnListSetSortDir(int cmd, int column, bool dir) */
00133     EV_LIST_DBLCLICK,       /* void OnListDblClick<Cmd>(void) */
00134     EV_LIST_RESETALL,       /* void OnListResetAll(int cmd) */
00135     EV_LIST_SETFEEDBACK,    /* void OnListSetFeedback(int cmd, int turnOn) */
00136     EV_LIST_ADDCOLUMNS,     /* void OnListAddColumns(int cmd, int num) */
00137     EV_LIST_SHOWCOLUMNS,    /* void OnListShowColumns(int cmd, int num) */
00138     EV_LIST_HIDECOLUMNS,    /* void OnListHideColumns(int cmd, int num) */
00139     EV_LIST_SETCOLTITLE,    /* void OnListSetColTitle(int cmd, int num, const char *title) */
00140     EV_LIST_SETCOLWIDTH,    /* void OnListSetColWidth(int cmd, int num, int width) */
00141     EV_LIST_NEWROW,         /* void OnListNewRow(int cmd, int *num) */
00142     EV_LIST_ROWSETDATA,     /* void OnListRowSetData(int cmd, int row, void *data) */
00143     EV_LIST_ROWGETDATA,     /* void OnListRowGetData(int cmd, int row, void **data) */
00144     EV_LIST_INSERT,         /* void OnListInsert(int cmd, ULIST_INSERT *data) */
00145     EV_LIST_ADDSEL,         /* void OnListAddSel(int cmd, int entry) */
00146     EV_LIST_DELROW,         /* void OnListDelRow(int cmd, int row) */
00147     EV_LIST_GETNEXTSEL,     /* int OnListGetNextSel(int cmd, int selectedCell) */
00148     EV_LIST_GETINFO,        /* void OnListGetInfo(int cmd, ULIST_INFO *data) */
00149     EV_LIST_GETNEXT,        /* int OnListGetNext(int cmd, int whichCell) */
00150
00151     /* combo */
00152     EV_COMBO_RESETALL,  /* void OnComboResetAll(int cmd) */
00153     EV_COMBO_APPEND,    /* void OnComboAppend(int cmd, const char *str) */
00154     EV_COMBO_SETSEL,    /* void OnComboSetPos(int cmd, int pos) */
00155     EV_COMBO_GETSEL,    /* int OnComboGetPos(int cmd, UStr *txt) */
00156     EV_COMBO_SEL,       /* void OnComboSel<Cmd>(int pos, const char *txt) */
00157     EV_COMBO_GETCOUNT,  /* int OnComboGetCount(int cmd) */
00158     EV_COMBO_DELSEL,    /* void OnComboDelSel(int cmd, int pos) */
00159     EV_COMBO_ENABLESEL, /* void OnComboEnableSel(int cmd, int pos, int state) */
00160     EV_COMBO_GETMENU,   /* void OnComboGetMenu(int cmd, UMENU *menu) */
00161
00162     /* smart combo (Win32 only at the moment)*/
00163     EV_SMARTCOMBO_SETFEATURE,   /* void OnSmartComboSetFeature(int cmd, int feature) */
00164     EV_SMARTCOMBO_SETITEMS  ,   /* void OnSmartComboSetItems(int cmd, CMString* items) */
00165     EV_SMARTCOMBO_SETREADONLY,  /* void OnSmartComboSetReadOnly(int cmd, bool readOnly) */
00166
00167     /* user defined */
00168     EV_COMMAND_START = 1000
00169 } UEventType;

enum UMSG_EXT

Enumeration values:
UMSG_NOEXT
UMSG_RANGE
Definition at line 671 of file umain.h.
00672 {
00673     UMSG_NOEXT,
00674     UMSG_RANGE
00675 } UMSG_EXT;

enum UTB_DROP

Enumeration values:
DDD_NONE
Definition at line 937 of file umain.h.
00938 {
00939     DDD_NONE = 0x00
00940 } UTB_DROP;

enum UTB_VAR

Enumeration values:
DDV_NONE
Definition at line 932 of file umain.h.
00933 {
00934     DDV_NONE
00935 } UTB_VAR;

Function Documentation

const std:: map<int, UCmdTarget *>& UEventGetTargets ( void )

Definition at line 773 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, and STD.

Referenced by LMainPseudoAttachment::ExecuteSelf(), UWidget::HasModal(), UMenu::OnCommands(), UToolbar::OnCommands(), UMacAppMenu::OnUpdateUI(), UMenu::OnUpdateUI(), and UToolbar::OnUpdateUI().

00774 {
00775     return sAllTargets.Get();
00776 }

Here is the call graph for this function:

int UEventGetWidID ( void )

Definition at line 296 of file uevent.cpp.

Referenced by UCvsApp::UCvsApp(), UPPMenu::UPPMenu(), and UPromptMessage::UPromptMessage().

00297 {
00298     static int newid = 100;
00299     return newid++;
00300 }

void UEventGiveTime ( void )

Definition at line 683 of file uevent.cpp.

References UWidget::BeforeUpdateUI(), UWidget::DoValidUI(), EV_TIMER, EV_UPDATEUI, CAllTargets::Get(), UWidget::GetTimers(), UCmdTarget::GetWidID(), UObject::IsKindOf(), UWidget::IsUIValid(), CMsg::m_arg1, CMsg::m_arg2, UTimer::m_cmd, CMsg::m_ev, UTimer::m_lap, UTimer::m_lastlap, CMsg::m_wid, MIN_IDLE, sAllTargets, sLastIdle, sRetainedMsgs, STD, UEventSendMessage(), URUNTIME_CLASS, and UTickCount().

Referenced by UCvsApp::PeekPumpAndIdle().

00684 {
00685     STD map< int, UCmdTarget * >::const_iterator iter;
00686     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00687
00688     // post the retained events
00689     while(!sRetainedMsgs.empty())
00690     {
00691         CMsg msg = *sRetainedMsgs.begin();
00692         sRetainedMsgs.erase(sRetainedMsgs.begin());
00693         UEventSendMessage(msg.m_wid, msg.m_ev, msg.m_arg1, msg.m_arg2);
00694     }
00695
00696     // take care about the EV_UPDATEUI notification
00697     if(!UWidget::IsUIValid())
00698     {
00699         UWidget::DoValidUI(true);
00700
00701         // warn the widget it's going to happen so they can cache
00702         // some informations.
00703         for(iter = targets.begin(); iter != targets.end(); ++iter)
00704         {
00705             UCmdTarget *target = (*iter).second;
00706             if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00707                 continue;
00708
00709             UWidget *wid = (UWidget *)target;
00710             wid->BeforeUpdateUI();
00711         }
00712
00713         for(iter = targets.begin(); iter != targets.end(); ++iter)
00714         {
00715             UCmdTarget *target = (*iter).second;
00716             if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00717                 continue;
00718
00719             UWidget *wid = (UWidget *)target;
00720             UEventSendMessage(wid->GetWidID(), EV_UPDATEUI, 0, 0L);
00721         }
00722     }
00723
00724     long thisIdle = UTickCount();
00725     if((thisIdle - sLastIdle) < MIN_IDLE)
00726         return;
00727
00728     // search the timers
00729     for(iter = targets.begin(); iter != targets.end(); ++iter)
00730     {
00731         UCmdTarget *target = (*iter).second;
00732         if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00733             continue;
00734
00735         UWidget *wid = (UWidget *)target;
00736         std::vector<UTimer> & timers = wid->GetTimers();
00737         std::vector<UTimer>::iterator t;
00738         for(t = timers.begin(); t != timers.end(); ++t)
00739         {
00740             UTimer & timer = *t;
00741             if((thisIdle - timer.m_lastlap) >= timer.m_lap)
00742             {
00743                 // trigger the timer
00744                 timer.m_lastlap = thisIdle;
00745                 UEventSendMessage(wid->GetWidID(), EV_TIMER, timer.m_cmd, (void *)thisIdle);
00746             }
00747         }
00748     }
00749
00750     sLastIdle = thisIdle;
00751 }

Here is the call graph for this function:

int UEventNotifyMessage | ( | int | evt,
 |  | int | arg1,
 |  | void * | arg2
 | ) |

Definition at line 269 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, STD, UASSERT, and UCmdTarget::UDispatchMessage().

Referenced by UPseudoFakePane::ActivateSelf(), UPseudoFakePane::DeactivateSelf(), TPseudoWinBehavior::DoEvent(), TPseudoAppBehavior::DoToolboxEvent(), LMainPseudoAttachment::ExecuteSelf(), and UWidget::OnChgFocus().

00270 {
00271     STD map< int, UCmdTarget * >::const_iterator iter;
00272     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00273     int res = 0;
00274
00275     for(iter = targets.begin(); iter != targets.end(); ++iter)
00276     {
00277         UCmdTarget *target = (*iter).second;
00278         UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00279 #if qDebug
00280         try {
00281 #endif
00282         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00283 #if qDebug
00284         } catch(...) {
00285             UASSERT(0);
00286             throw;
00287         }
00288 #endif
00289         if(res)
00290             break;
00291     }
00292
00293     return res;
00294 }

Here is the call graph for this function:

int UEventPostMessage | ( | int | wid,
 |  | int | evt,
 |  | int | arg1,
 |  | void * | arg2
 | ) |

Definition at line 262 of file uevent.cpp.

References sRetainedMsgs.

00263 {
00264     sRetainedMsgs.push_back(CMsg(wid, evt, arg1, arg2));
00265     return 0;
00266 }

UCmdTarget* UEventQueryWidget ( int widid )

Definition at line 302 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, and STD.

Referenced by cvsgui_GetMainMenuWidget(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), UCvsApp::GetBrowserView(), UCvsApp::GetConsole(), UCvsApp::GetFilesView(), UCvsApp::GetStatusBar(), LPseudoWinAttachment::SearchWidID(), UDC::UDC(), UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), and UMenuAddToggle().

00303 {
00304     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00305     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(widid);
00306     if(iter != targets.end())
00307     {
00308         UCmdTarget *target = (*iter).second;
00309         return target;
00310     }
00311     return 0L;
00312 }

Here is the call graph for this function:

void UEventRemoveWidID ( int widid )

Definition at line 314 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, and STD.

Referenced by UCmdTarget::~UCmdTarget().

00315 {
00316     STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00317     STD map<int, UCmdTarget *>::iterator i = targets.find(widid);
00318     if(i == targets.end())
00319         return;
00320     targets.erase(i);
00321 }

Here is the call graph for this function:

int UEventSendMessage | ( | int | wid,
 |  | int | evt,
 |  | int | arg1,
 |  | void * | arg2
 | ) |

Definition at line 199 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, STD, sTurnOffDispatching, UAppConsole(), UASSERT, and UCmdTarget::UDispatchMessage().

Referenced by AboutDialog(), UWidget::AddPage(), AskCreatePersistentSettings(), LPseudoWinAttachment::CheckWindowSize(), CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetDiff(), CompatGetImport(), CompatGetLog(), CompatGetModuleListItem(), CompatGetPassword(), CompatGetPrefs(), CompatGetRtag(), CompatGetSelectionDetails(), CompatGetTag(), CompatGetTagListItem(), CompatGetUpdate(), CompatImportFilter(), CreateBrowseToolbar(), CreateFilterToolbar(), CreateMainToolbar(), CvsLogParse(), UCvsFolders::DeleteAllItems(), UCvsFiles::DisableGeneric(), UEditMessage::DoDataExchange(), UPromptMessage::DoDataExchange(), TPseudoWinBehavior::DoEvent(), UWidget::DoModal(), UPseudoPageHider::DoRotate(), UPseudoPlaceHolder::DoRotate(), CPseudoItem::DoubleClick(), TPseudoCustomView::Draw(), LMainPseudoAttachment::ExecuteSelf(), LPseudoDrawAttachment::ExecuteSelf(), TBrowserFill::ExitDirectory(), TBrowserFillDummy::ExitDirectory(), UCvsFrame::FreshenFileMask(), UCvsFolders::GetItemByLocation(), UCvsFiles::HideColumns(), TViewFill::InitItem(), LPseudoWinAttachment::ListenToMessage(), macpp_fecthview(), UCvsFiles::OnCmdEditsel(), UCvsFiles::OnCmdEditseldef(), UCvsFolders::OnCmdExplore(), UCvsFiles::OnCmdExplore(), UCvsFolders::OnCmdMacrosSel(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIEditseldef(), UCvsFolders::OnCmdUIExplore(), UCvsFiles::OnCmdUIExplore(), UCvsFiles::OnCmdUIGraph(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), UCvsFiles::OnCmdUIRelease(), UCvsFiles::OnCmdUIRmv(), UCvsFiles::OnCmdUITrash(), UCvsFiles::OnCmdUIUpdate(), UCvsGraph::OnCreate(), UCvsFiles::OnCreate(), UCvsFiles::OnDblClick(), CDynToolBar::OnDestroy(), TBrowserFill::OnDirectory(), UCvsConsole::OnEraseAll(), CPseudoDlg::OnInitDialog(), UWidget::OnInitWidget(), CPseudoList::OnLButtonDblClk(), UCvsFiles::OnMacroSel(), CPseudoDraw::OnPaint(), UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), UToolbar::OnTbDropDown(), UCvsFolders::OnTreeExpanding(), UCvsFolders::OnTreeSelecting(), UCvsFolders::OnUpdateGeneric(), UWidget::OnUpdateUI(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), UMacAppMenu::OnUpdateUI(), UCvsFolders::ProcessSelectionCommand(), UCvsFiles::ProcessSelectionCommand(), PromptEditMessage(), UCvsFolders::ResetBrowser(), UCvsFolders::ResetView(), UCvsFiles::ResetView(), UCvsFiles::Resort(), UCvsFolders::RetrievePath(), CMPString::rtCMPString(), UCvsFiles::Search(), UCvsApp::SetStatusBarText(), UCvsFiles::ShowColumns(), CPseudoItem::SingleClick(), UCvsFolders::StepToLocation(), UCvsFolders::StoreExpanded(), UEventGiveTime(), UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), UMenuAddToggle(), UWaitCursor::UWaitCursor(), UWinPseudoWindowProc(), TPseudoWinAdorner::ViewChangedFrame(), WinInitWidgets(), CPseudoDlg::~CPseudoDlg(), LPseudoWinAttachment::~LPseudoWinAttachment(), TPseudoWinAdorner::~TPseudoWinAdorner(), and UWaitCursor::~UWaitCursor().

00200 {
00201     if(sTurnOffDispatching)
00202         return 0;
00203
00204     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00205     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(wid);
00206     int res = 0;
00207
00208     if(iter != targets.end())
00209     {
00210         UCmdTarget *target = (*iter).second;
00211         UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00212 #if qDebug
00213         try {
00214 #endif
00215         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00216 #if qDebug
00217         } catch(...) {
00218             UASSERT(0);
00219             throw;
00220         }
00221 #endif
00222     }
00223     else
00224     {
00225         UAppConsole("Unknown widget id : %d\n", wid);
00226     }
00227
00228     return res;
00229 }

Here is the call graph for this function:

int UEventSendMessageExt | ( | int | wid,
 |  | int | evt,
 |  | int | arg1,
 |  | void * | arg2,
 |  | int * | handledFlag
 | ) |

Definition at line 231 of file uevent.cpp.

References CAllTargets::Get(), sAllTargets, STD, UAppConsole(), UASSERT, and UCmdTarget::UDispatchMessage().

Referenced by TPseudoAppBehavior::DoMenuCommand(), LMainPseudoAttachment::ExecuteSelf(), UToolbar::OnCommands(), and UMenu::OnCommands().

00232 {
00233     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00234     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(wid);
00235     int res = 0;
00236     UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00237
00238     if(iter != targets.end())
00239     {
00240         UCmdTarget *target = (*iter).second;
00241 #if qDebug
00242         try {
00243 #endif
00244         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00245 #if qDebug
00246         } catch(...) {
00247             UASSERT(0);
00248             throw;
00249         }
00250 #endif
00251     }
00252     else
00253     {
00254         UAppConsole("Unknown widget id : %d\n", wid);
00255     }
00256
00257     *handledFlag = (dispatchInfo & UCmdTarget::kUDispatchHandled) != 0;
00258     return res;
00259 }

Here is the call graph for this function:

void UEventSetTooltipHandler ( void(* handler)(const char *) )

Definition at line 678 of file uevent.cpp.

References sTooltipHandler.

00679 {
00680     sTooltipHandler = handler;
00681 }

HBITMAP UMakeBitmap | ( | char ** | icon,
 |  | int & | width,
 |  | int & | height,
 |  | COLORREF | back
 | ) |

Definition at line 97 of file umenu.cpp.

00098 {
00099     BYTE **src = (BYTE **)icon;
00100
00101     // read the header
00102     int w, h, nc, cpp, i, x, y;
00103     if(sscanf((char *)*src++, "%d%d%d%d", &w, &h, &nc, &cpp) != 4)
00104         return 0L;
00105
00106     width = w;
00107     height = h;
00108
00109     HBITMAP hbitmap = CreateDIB(w, h, 8, 0L);
00110     LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00111     BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00112     RGBQUAD *pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00113
00114     // read the colormap
00115     std::map<short, BYTE> colors;
00116     for(i = 0; i < nc; i++)
00117     {
00118         const BYTE *line = *src++;
00119         short aref;
00120         if(cpp == 1)
00121         {
00122             aref = line[0];
00123             line += 4;
00124         }
00125         else if(cpp == 2)
00126         {
00127             aref = ((short)line[1] << 8)  | line[0];
00128             line += 5;
00129         }
00130         else
00131             ASSERT(0);
00132
00133         COLORREF color;
00134
00135         if(strcmp((char *)line, "None") == 0)
00136         {
00137             color = back;
00138         }
00139         else
00140         {
00141             if(*line++ != '#')
00142                 return 0L;
00143
00144             if(strlen((char *)line) < 6)
00145                 return 0L;
00146
00147             int comp[6], c;
00148             int j;
00149             for(j = 0; j < 6; j++)
00150             {
00151                 c = *line++;
00152                 if(c >= '0' && c <= '9')
00153                     comp[j] = c - '0';
00154                 else if(c >= 'a' && c <= 'f')
00155                     comp[j] = c - 'a' + 10;
00156                 else if(c >= 'A' && c <= 'F')
00157                     comp[j] = c - 'A' + 10;
00158                 else
00159                     return 0L;
00160             }
00161
00162             color = RGB(comp[0]*16+comp[1],comp[2]*16+comp[3],comp[4]*16+comp[5]);
00163         }
00164
00165         colors.insert(std::make_pair(aref, i));
00166
00167         pRgb->rgbRed = GetRValue(color);
00168         pRgb->rgbGreen = GetGValue(color);
00169         pRgb->rgbBlue = GetBValue(color);
00170         pRgb->rgbReserved = 0;
00171         pRgb++;
00172     }
00173
00174     if(nc != colors.size() || nc > 256)
00175         return 0L;
00176
00177     // make the bitmap
00178     for(y = 0; y < h; y++)
00179     {
00180         const BYTE *line = *src++;
00181         BYTE *ptr = image + WIDTHBYTES(w * 8) * (h - y - 1);
00182         for(x = 0; x < w; x++)
00183         {
00184             short aref;
00185             if(cpp == 1)
00186             {
00187                 aref = line[0];
00188                 line++;
00189             }
00190             else if(cpp == 2)
00191             {
00192                 aref = ((short)line[1] << 8)  | line[0];
00193                 line += 2;
00194             }
00195             std::map<short, BYTE>::iterator pos = colors.find(aref);
00196             if(pos == colors.end())
00197                 return 0L;
00198             *ptr++ = (*pos).second;
00199         }
00200     }
00201
00202     GlobalUnlock(hbitmap);
00203
00204     HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00205     GlobalFree((HGLOBAL)hbitmap);
00206
00207     return ddbbmap;
00208 }

HBITMAP UMakeBitmap ( char ** icon )

Definition at line 210 of file umenu.cpp.

00211 {
00212     int w, h;
00213     return UMakeBitmap(icon, w, h, ::GetSysColor(COLOR_BTNFACE));
00214 }

HBITMAP UMakeBitmap ( const char * icon )

Definition at line 216 of file umenu.cpp.

00217 {
00218     std::vector<UStr> icstr;
00219     const char *tmp;
00220     while((tmp = strchr(icon, '\n')) != 0L)
00221     {
00222         UStr str;
00223         str.set(icon, tmp - icon);
00224         icon = tmp + 1;
00225         icstr.push_back(str);
00226     }
00227     if(icon[0] != '\0')
00228     {
00229         icstr.push_back(UStr(icon));
00230     }
00231
00232     std::vector<UStr>::const_iterator i;
00233     std::vector<const char *> ic;
00234     for(i = icstr.begin(); i != icstr.end(); ++i)
00235     {
00236         ic.push_back((*i).c_str());
00237     }
00238     return UMakeBitmap((char **)&ic[0]);
00239 }

long UTickCount ( void )

Definition at line 753 of file uevent.cpp.

Referenced by UWidget::AddTimer(), and UEventGiveTime().

00754 {
00755 #ifdef WIN32
00756     return ::GetTickCount();
00757 #elif defined(TARGET_OS_MAC)
00758     long res = ::TickCount();
00759     return res = (float)res * (1000.0 / 60.0);
00760 #else
00761     struct timeval tval;
00762     static long refcount;
00763
00764     gettimeofday(&tval, 0L);
00765
00766     if(refcount == 0)
00767         refcount = tval.tv_sec;
00768
00769     return (tval.tv_sec - refcount) * 1000 + tval.tv_usec / 1000;
00770 #endif
00771 }

Generated on Sat Aug 7 22:46:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/umenu.cpp File Reference

rf/umenu.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <float.h>
#include <vector>
#include <map>
#include "umenu.h"
#include "uconsole.h"
#include "dib.h"

Include dependency graph for umenu.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | CTRLALT_STROKE "Ctrl+Alt+"
#define | CTRL_STROKE "Ctrl+"
#define | ALT_STROKE "Alt+"

Functions

HBITMAP | UMakeBitmap (char **icon, int &width, int &height, COLORREF back)
HBITMAP | UMakeBitmap (char **icon)
HBITMAP | UMakeBitmap (const char *icon)
void | GetMenuTitle (const char *name, UStr &title, int cmd, char &mnemonic, int &mod, int &key)
UMENU | UMenuAddPulldown (int widid, const char *name, UMENU top, int cmd)
void | addAccel (int cmd, int mod, int key)
void | UMenuDelete (UMENU top, int afterIndex)
int | UMenuCount (UMENU top)
void | UMenuDeleteByCmd (UMENU top, int cmd)
UMENU | UMenuAddButton (int widid, const char *name, UMENU top, const void *pixmap, int cmd)
UMENU | UMenuAddToggle (int widid, const char *name, UMENU top, const void *pixmap, int cmd)
UMENU | UMenuAddRadio (int widid, const char *name, UMENU top, const void *pixmap, int cmd)
UMENU | UMenuAddSeparator (int widid, UMENU top)

Define Documentation

#define ALT_STROKE "Alt+"

Definition at line 244 of file umenu.cpp.

Referenced by GetMenuTitle().

#define CTRL_STROKE "Ctrl+"

Definition at line 243 of file umenu.cpp.

Referenced by GetMenuTitle().

#define CTRLALT_STROKE "Ctrl+Alt+"

Definition at line 242 of file umenu.cpp.

Referenced by GetMenuTitle().

Function Documentation

void addAccel | ( | int | cmd,
 |  | int | mod,
 |  | int | key
 | ) | [static]

Definition at line 391 of file umenu.cpp.

References NULL, UK_ALT, and UK_CONTROL.

Referenced by UMenuAddButton(), and UMenuAddToggle().

00392 {
00393     if(key == 0)
00394         return;
00395
00396     // Save the current accelerator table.
00397     CWnd *wnd = AfxGetMainWnd();
00398     CFrameWnd *frame = 0L;
00399     if(wnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))
00400         frame = (CFrameWnd *)wnd;
00401     else
00402         frame = wnd->GetParentFrame();
00403     if(frame == 0L)
00404         return;
00405
00406     HACCEL haccelOld = frame->m_hAccelTable;
00407
00408     // Count the number of entries in the current
00409     // table, allocate a buffer for the table, and
00410     // then copy the table into the buffer.
00411
00412     int cAccelerators = CopyAcceleratorTable(haccelOld, NULL, 0);
00413     LPACCEL lpaccelNew = (LPACCEL) LocalAlloc(LPTR, (cAccelerators + 1) * sizeof(ACCEL));
00414     if (lpaccelNew == NULL)
00415         return;
00416
00417     CopyAcceleratorTable(haccelOld, lpaccelNew, cAccelerators);
00418
00419     // Find the accelerator that the user modified
00420     // and change its flags and virtual-key code
00421     // as appropriate.
00422
00423     for (int i = 0; i < cAccelerators; i++)
00424     {
00425         if(lpaccelNew[i].cmd == cmd)
00426         {
00427             lpaccelNew[i].fVirt = FVIRTKEY;
00428             if(mod & UK_ALT)
00429                 lpaccelNew[i].fVirt |= FALT;
00430             if(mod & UK_CONTROL)
00431                 lpaccelNew[i].fVirt |= FCONTROL;
00432             lpaccelNew[i].key = key;
00433             break;
00434         }
00435     }
00436
00437     if(i == cAccelerators)
00438     {
00439         lpaccelNew[i].cmd = cmd;
00440         lpaccelNew[i].fVirt = FVIRTKEY;
00441         if(mod & UK_ALT)
00442             lpaccelNew[i].fVirt |= FALT;
00443         if(mod & UK_CONTROL)
00444             lpaccelNew[i].fVirt |= FCONTROL;
00445         lpaccelNew[i].key = key;
00446         cAccelerators++;
00447     }
00448
00449     // Create the new accelerator table, and
00450     // destroy the old one.
00451     DestroyAcceleratorTable(haccelOld);
00452     frame->m_hAccelTable = CreateAcceleratorTable(lpaccelNew, cAccelerators);
00453     LocalFree(lpaccelNew);
00454 }

void GetMenuTitle | ( | const char * | name,
 |  | UStr & | title,
 |  | int | cmd,
 |  | char & | mnemonic,
 |  | int & | mod,
 |  | int & | key
 | ) | [static]

Definition at line 246 of file umenu.cpp.

References ALT_STROKE, CTRL_STROKE, CTRLALT_STROKE, UStr::length(), UK_ALT, and UK_CONTROL.

Referenced by UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), and UMenuAddToggle().

00248 {
00249     title = "";
00250     mod = 0;
00251     key = 0;
00252     mnemonic = '\0';
00253
00254     // get the accelerator
00255     UStr copy(name);
00256     char *tmp;
00257     if((tmp = strchr(copy, '\t')) != 0L)
00258     {
00259         *tmp++ = '\0';
00260         if(strncmp(tmp, CTRLALT_STROKE, strlen(CTRLALT_STROKE)) == 0)
00261         {
00262             mod = UK_CONTROL | UK_ALT;
00263             key = tmp[strlen(CTRLALT_STROKE)];
00264         }
00265         else if(strncmp(tmp, CTRL_STROKE, strlen(CTRL_STROKE)) == 0)
00266         {
00267             mod = UK_CONTROL;
00268             key = tmp[strlen(CTRL_STROKE)];
00269         }
00270         else if(strncmp(tmp, ALT_STROKE, strlen(ALT_STROKE)) == 0)
00271         {
00272             mod = UK_ALT;
00273             key = tmp[strlen(ALT_STROKE)];
00274         }
00275         name = copy;
00276     }
00277
00278     title = name;
00279 #ifndef WIN32
00280     if((tmp = strchr(title, '&')) != 0L)
00281     {
00282         size_t l = tmp - (const char *)title;
00283         memmove((char *)&title[l], &title[l + 1], title.length() - l);
00284     }
00285 #endif
00286 }

Here is the call graph for this function:

HBITMAP UMakeBitmap ( const char * icon )

Definition at line 216 of file umenu.cpp.

References UStr::set(), and UEXPORT.

Referenced by CPseudoButton::LoadXPM(), CPseudoRotButton::LoadXPMs(), UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), UToolbar::OnTbDropDown(), UMakeBitmap(), UMenuAddButton(), and UMenuAddToggle().

00217 {
00218     std::vector<UStr> icstr;
00219     const char *tmp;
00220     while((tmp = strchr(icon, '\n')) != 0L)
00221     {
00222         UStr str;
00223         str.set(icon, tmp - icon);
00224         icon = tmp + 1;
00225         icstr.push_back(str);
00226     }
00227     if(icon[0] != '\0')
00228     {
00229         icstr.push_back(UStr(icon));
00230     }
00231
00232     std::vector<UStr>::const_iterator i;
00233     std::vector<const char *> ic;
00234     for(i = icstr.begin(); i != icstr.end(); ++i)
00235     {
00236         ic.push_back((*i).c_str());
00237     }
00238     return UMakeBitmap((char **)&ic[0]);
00239 }

Here is the call graph for this function:

HBITMAP UMakeBitmap ( char ** icon )

Definition at line 210 of file umenu.cpp.

References UMakeBitmap().

00211 {
00212     int w, h;
00213     return UMakeBitmap(icon, w, h, ::GetSysColor(COLOR_BTNFACE));
00214 }

Here is the call graph for this function:

HBITMAP UMakeBitmap | ( | char ** | icon,
 |  | int & | width,
 |  | int & | height,
 |  | COLORREF | back
 | ) |

Definition at line 97 of file umenu.cpp.

References CreateDIB(), DIBToBitmap(), PaletteSize(), and WIDTHBYTES.

00098 {
00099     BYTE **src = (BYTE **)icon;
00100
00101     // read the header
00102     int w, h, nc, cpp, i, x, y;
00103     if(sscanf((char *)*src++, "%d%d%d%d", &w, &h, &nc, &cpp) != 4)
00104         return 0L;
00105
00106     width = w;
00107     height = h;
00108
00109     HBITMAP hbitmap = CreateDIB(w, h, 8, 0L);
00110     LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00111     BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00112     RGBQUAD *pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00113
00114     // read the colormap
00115     std::map<short, BYTE> colors;
00116     for(i = 0; i < nc; i++)
00117     {
00118         const BYTE *line = *src++;
00119         short aref;
00120         if(cpp == 1)
00121         {
00122             aref = line[0];
00123             line += 4;
00124         }
00125         else if(cpp == 2)
00126         {
00127             aref = ((short)line[1] << 8)  | line[0];
00128             line += 5;
00129         }
00130         else
00131             ASSERT(0);
00132
00133         COLORREF color;
00134
00135         if(strcmp((char *)line, "None") == 0)
00136         {
00137             color = back;
00138         }
00139         else
00140         {
00141             if(*line++ != '#')
00142                 return 0L;
00143
00144             if(strlen((char *)line) < 6)
00145                 return 0L;
00146
00147             int comp[6], c;
00148             int j;
00149             for(j = 0; j < 6; j++)
00150             {
00151                 c = *line++;
00152                 if(c >= '0' && c <= '9')
00153                     comp[j] = c - '0';
00154                 else if(c >= 'a' && c <= 'f')
00155                     comp[j] = c - 'a' + 10;
00156                 else if(c >= 'A' && c <= 'F')
00157                     comp[j] = c - 'A' + 10;
00158                 else
00159                     return 0L;
00160             }
00161
00162             color = RGB(comp[0]*16+comp[1],comp[2]*16+comp[3],comp[4]*16+comp[5]);
00163         }
00164
00165         colors.insert(std::make_pair(aref, i));
00166
00167         pRgb->rgbRed = GetRValue(color);
00168         pRgb->rgbGreen = GetGValue(color);
00169         pRgb->rgbBlue = GetBValue(color);
00170         pRgb->rgbReserved = 0;
00171         pRgb++;
00172     }
00173
00174     if(nc != colors.size() || nc > 256)
00175         return 0L;
00176
00177     // make the bitmap
00178     for(y = 0; y < h; y++)
00179     {
00180         const BYTE *line = *src++;
00181         BYTE *ptr = image + WIDTHBYTES(w * 8) * (h - y - 1);
00182         for(x = 0; x < w; x++)
00183         {
00184             short aref;
00185             if(cpp == 1)
00186             {
00187                 aref = line[0];
00188                 line++;
00189             }
00190             else if(cpp == 2)
00191             {
00192                 aref = ((short)line[1] << 8)  | line[0];
00193                 line += 2;
00194             }
00195             std::map<short, BYTE>::iterator pos = colors.find(aref);
00196             if(pos == colors.end())
00197                 return 0L;
00198             *ptr++ = (*pos).second;
00199         }
00200     }
00201
00202     GlobalUnlock(hbitmap);
00203
00204     HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00205     GlobalFree((HGLOBAL)hbitmap);
00206
00207     return ddbbmap;
00208 }

Here is the call graph for this function:

UMENU UMenuAddButton | ( | int | widid,
 |  | const char * | name,
 |  | UMENU | top,
 |  | const void * | pixmap,
 |  | int | cmd
 | ) |

Definition at line 680 of file umenu.cpp.

References addAccel(), EV_INIT_WIDGET, GetMenuTitle(), UObject::IsKindOf(), UASSERT, UCMD_to_WINCMD, UEventQueryWidget(), UEventSendMessage(), UMakeBitmap(), UMENU, UMENU_NULL, and URUNTIME_CLASS.

Referenced by PyMenuMgr::AddButton(), and CreateMainMenubar().

00681 {
00682     UStr title;
00683     int  mod, key;
00684     char mnemonic;
00685     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00686     UASSERT(top != UMENU_NULL);
00687
00688 #ifdef qMacPP
00689     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00690     LMenu *menu = menuBar->FetchMenu(top);
00691     if(menu)
00692     {
00693         LStr255 pstr(title);
00694         menu->InsertCommand(pstr, cmd, max_Int16 - 1);
00695     }
00696     else
00697     {
00698         MenuHandle mhdl = ::GetMenu(top);
00699         if(mhdl != 0L)
00700         {
00701             SInt16  menuLength = ::CountMenuItems(mhdl);
00702             LStr255 pstr(title);
00703             ::MacInsertMenuItem(mhdl, pstr, menuLength);
00704         }
00705     }
00706
00707     return UMENU_NULL;
00708 #endif
00709 #ifdef qMacAPP
00710     MenuRef menu = MAGetMenu(top);
00711     if(menu)
00712     {
00713         CStr255_AC pstr(title);
00714         gDispatcher->DoMakeMenuBarManager();
00715         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), cmd);
00716     }
00717
00718     return UMENU_NULL;
00719 #endif
00720 #ifdef qGTK
00721     UCmdTarget *target = UEventQueryWidget(widid);
00722     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00723         return UMENU_NULL;
00724     UMenu *pmenu = (UMenu *)target;
00725
00726     if(!GTK_IS_MENU_SHELL(top))
00727         return UMENU_NULL;
00728     GtkWidget *parent = (GtkWidget *)top;
00729
00730     GtkWidget *menuitem = gtk_menu_item_new_with_label_pixmap(title, pixmap);
00731     gtk_widget_show (menuitem);
00732     gtk_container_add (GTK_CONTAINER (parent), menuitem);
00733     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00734     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00735     return UMENU_NULL;
00736 #endif
00737 #ifdef WIN32
00738     HMENU menuhdl = (HMENU)top;
00739     CMenu parent;
00740     VERIFY(parent.Attach(menuhdl));
00741
00742     parent.AppendMenu(MF_STRING, UCMD_to_WINCMD(cmd), name);
00743     addAccel(UCMD_to_WINCMD(cmd), mod, key);
00744
00745     if(pixmap != 0L && strlen((const char *)pixmap))
00746     {
00747         HBITMAP bmap = UMakeBitmap((const char *)pixmap);
00748         CBitmap b;
00749         VERIFY(b.Attach(bmap));
00750         parent.SetMenuItemBitmaps(UCMD_to_WINCMD(cmd), MF_BYCOMMAND, &b, &b);
00751         b.Detach();
00752     }
00753
00754     parent.Detach();
00755     return UMENU_NULL;
00756 #endif
00757 }

Here is the call graph for this function:

UMENU UMenuAddPulldown | ( | int | widid,
 |  | const char * | name,
 |  | UMENU | top,
 |  | int | cmd
 | ) |

Definition at line 288 of file umenu.cpp.

References EV_INIT_WIDGET, GetMenuTitle(), UWidget::GetWidget(), UObject::IsKindOf(), kUMainWidget, UEventQueryWidget(), UEventSendMessage(), UMENU, UMENU_NULL, and URUNTIME_CLASS.

Referenced by PyMenuMgr::AddPulldown(), and CreateMainMenubar().

00289 {
00290     UStr title;
00291     int  mod, key;
00292     char mnemonic;
00293     GetMenuTitle(name, title, 0, mnemonic, mod, key);
00294
00295 #ifdef qMacAPP
00296     return UMENU_NULL;
00297 #endif
00298 #ifdef qMacPP
00299     if(top == UMENU_NULL)
00300     {
00301         Assert_(0); // TODO
00302     }
00303     else
00304     {
00305         LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00306         LMenu *menu = menuBar->FetchMenu(top);
00307         if(menu == 0L)
00308             return UMENU_NULL;
00309
00310         LStr255 pstr(name);
00311         LMenu *newMenu = new LMenu(::UniqueID('MENU'), pstr);
00312         menuBar->InstallMenu(newMenu, hierMenu);
00313
00314         menu->InsertCommand(pstr, cmd_UseMenuItem, max_Int16 - 1);
00315         UAppearanceMenus::SetItemHierID(menu->GetMacMenuH(), ::CountMenuItems(menu->GetMacMenuH()),
00316             newMenu->GetMenuID());
00317         return newMenu->GetMenuID();
00318     }
00319     return UMENU_NULL;
00320 #endif
00321 #ifdef qGTK
00322     GtkWidget *parent = 0L;
00323
00324     if(top == UMENU_NULL)
00325     {
00326         // try to find the menubar : the menu bar should be mapped
00327         // to a UMenu object as the main widget
00328         const UCmdTarget *target = UEventQueryWidget(widid);
00329         UMenu *menu = 0L;
00330         if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00331             return UMENU_NULL;
00332
00333         menu = (UMenu *)target;
00334         if(menu == 0L)
00335             return UMENU_NULL;
00336
00337         GtkWidget *wid = (GtkWidget *)menu->GetWidget(kUMainWidget);
00338         if(wid == 0L || !GTK_IS_MENU_SHELL(wid))
00339             return UMENU_NULL;
00340
00341         parent = wid;
00342     }
00343     else
00344     {
00345         if(!GTK_IS_MENU_SHELL(top))
00346             return UMENU_NULL;
00347         parent = (GtkWidget *)top;
00348     }
00349
00350     GtkWidget *menuitem = gtk_menu_item_new_with_label(title);
00351     gtk_widget_show(menuitem);
00352     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00353
00354     GtkWidget *menu = gtk_menu_new();
00355     gtk_menu_item_set_submenu(GTK_MENU_ITEM (menuitem), menu);
00356     gtk_menu_ensure_uline_accel_group (GTK_MENU (menu));
00357     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menu);
00358     return (UMENU)menu;
00359 #endif
00360 #ifdef WIN32
00361     if(top == UMENU_NULL)
00362     {
00363         CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00364         CMenu menu;
00365         menu.CreatePopupMenu();
00366         pTopMenu->AppendMenu(MF_POPUP, (UINT)menu.GetSafeHmenu(), name);
00367
00368         static bool firsttime = true;
00369         if(firsttime)
00370         {
00371             pTopMenu->DeleteMenu(0, MF_BYPOSITION);
00372             firsttime = false;
00373         }
00374         return (UMENU)menu.Detach();
00375     }
00376     else
00377     {
00378         HMENU menuhdl = (HMENU)top;
00379         CMenu parent;
00380         CMenu menu;
00381         menu.CreatePopupMenu();
00382         VERIFY(parent.Attach(menuhdl));
00383         parent.AppendMenu(MF_POPUP, (UINT)menu.GetSafeHmenu(), name);
00384         parent.Detach();
00385         return (UMENU)menu.Detach();
00386     }
00387 #endif
00388 }

Here is the call graph for this function:

UMENU UMenuAddRadio | ( | int | widid,
 |  | const char * | name,
 |  | UMENU | top,
 |  | const void * | pixmap,
 |  | int | cmd
 | ) |

Definition at line 841 of file umenu.cpp.

References EV_INIT_WIDGET, GetMenuTitle(), UObject::IsKindOf(), UEventQueryWidget(), UEventSendMessage(), UMENU, UMENU_NULL, and URUNTIME_CLASS.

Referenced by CreateMainMenubar().

00842 {
00843     UStr title;
00844     int  mod, key;
00845     char mnemonic;
00846     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00847
00848 #ifdef qMacPP
00849     return UMENU_NULL;
00850 #endif
00851 #ifdef qMacAPP
00852     return UMENU_NULL;
00853 #endif
00854 #ifdef qGTK
00855     UCmdTarget *target = UEventQueryWidget(widid);
00856     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00857         return UMENU_NULL;
00858     UMenu *pmenu = (UMenu *)target;
00859
00860     if(!GTK_IS_MENU_SHELL(top))
00861         return UMENU_NULL;
00862     GtkWidget *parent = (GtkWidget *)top;
00863     GSList* group = (GSList*)pmenu->GetRadioGroup();
00864
00865     GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, title);
00866
00867     if(group == 0L) {
00868         group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
00869         pmenu->SetRadioGroup(group);
00870     }
00871
00872     gtk_widget_show(menuitem);
00873     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00874     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00875     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00876
00877     return UMENU_NULL;
00878 #endif
00879 #ifdef WIN32
00880     return UMENU_NULL;
00881 #endif
00882 }

Here is the call graph for this function:

UMENU UMenuAddSeparator | ( | int | widid,
 |  | UMENU | top
 | ) |

Definition at line 884 of file umenu.cpp.

References UASSERT, UMENU, and UMENU_NULL.

Referenced by PyMenuMgr::AddSeparator(), and CreateMainMenubar().

00885 {
00886     UASSERT(top != UMENU_NULL);
00887
00888 #ifdef qMacPP
00889     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00890     LMenu *menu = menuBar->FetchMenu(top);
00891     if(menu)
00892     {
00893         menu->InsertCommand("\p-", 0, max_Int16 - 1);
00894     }
00895     else
00896     {
00897         MenuHandle mhdl = ::GetMenu(top);
00898         if(mhdl != 0L)
00899         {
00900             SInt16  menuLength = ::CountMenuItems(mhdl);
00901             ::MacInsertMenuItem(mhdl, "\p-", menuLength);
00902         }
00903     }
00904
00905     return UMENU_NULL;
00906 #endif
00907 #ifdef qMacAPP
00908     MenuRef menu = MAGetMenu(top);
00909     if(menu)
00910     {
00911         CStr255_AC pstr("-");
00912         gDispatcher->DoMakeMenuBarManager();
00913         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), 0);
00914     }
00915
00916     return UMENU_NULL;
00917 #endif
00918 #ifdef qGTK
00919     if(!GTK_IS_MENU_SHELL(top))
00920         return UMENU_NULL;
00921     GtkWidget *parent = (GtkWidget *)top;
00922
00923     GtkWidget *menuitem = gtk_menu_item_new();
00924     gtk_widget_show(menuitem);
00925     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00926     gtk_widget_set_sensitive(menuitem, FALSE);
00927     return UMENU_NULL;
00928 #endif
00929 #ifdef WIN32
00930     HMENU menuhdl = (HMENU)top;
00931     CMenu parent;
00932     VERIFY(parent.Attach(menuhdl));
00933     parent.AppendMenu(MF_SEPARATOR);
00934     parent.Detach();
00935     return UMENU_NULL;
00936 #endif
00937 }

UMENU UMenuAddToggle | ( | int | widid,
 |  | const char * | name,
 |  | UMENU | top,
 |  | const void * | pixmap,
 |  | int | cmd
 | ) |

Definition at line 759 of file umenu.cpp.

References addAccel(), EV_INIT_WIDGET, GetMenuTitle(), UObject::IsKindOf(), UCMD_to_WINCMD, UEventQueryWidget(), UEventSendMessage(), UMakeBitmap(), UMENU, UMENU_NULL, and URUNTIME_CLASS.

Referenced by PyMenuMgr::AddToggle().

00760 {
00761     UStr title;
00762     int  mod, key;
00763     char mnemonic;
00764     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00765
00766 #ifdef qMacPP
00767     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00768     LMenu *menu = menuBar->FetchMenu(top);
00769     if(menu)
00770     {
00771         LStr255 pstr(title);
00772         menu->InsertCommand(pstr, cmd, max_Int16 - 1);
00773     }
00774     else
00775     {
00776         MenuHandle mhdl = ::GetMenu(top);
00777         if(mhdl != 0L)
00778         {
00779             SInt16  menuLength = ::CountMenuItems(mhdl);
00780             LStr255 pstr(title);
00781             ::MacInsertMenuItem(mhdl, pstr, menuLength);
00782         }
00783     }
00784
00785     return UMENU_NULL;
00786 #endif
00787 #ifdef qMacAPP
00788     MenuRef menu = MAGetMenu(top);
00789     if(menu)
00790     {
00791         CStr255_AC pstr(title);
00792         gDispatcher->DoMakeMenuBarManager();
00793         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), cmd);
00794     }
00795
00796     return UMENU_NULL;
00797 #endif
00798 #ifdef qGTK
00799     UCmdTarget *target = UEventQueryWidget(widid);
00800     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00801         return UMENU_NULL;
00802     UMenu *pmenu = (UMenu *)target;
00803
00804     if(!GTK_IS_MENU_SHELL(top))
00805         return UMENU_NULL;
00806     GtkWidget *parent = (GtkWidget *)top;
00807
00808     GtkWidget *menuitem = gtk_check_menu_item_new_with_label(title);
00809     gtk_widget_show(menuitem);
00810     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00811     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00812 //      gtk_tooltips_set_tip (tooltips, quit1, "Quit the application", NULL);
00813     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00814
00815     return UMENU_NULL;
00816 #endif
00817 #ifdef WIN32
00818     ASSERT(top != UMENU_NULL);
00819
00820     HMENU menuhdl = (HMENU)top;
00821     CMenu parent;
00822     VERIFY(parent.Attach(menuhdl));
00823
00824     parent.AppendMenu(MF_STRING, UCMD_to_WINCMD(cmd), name);
00825     addAccel(UCMD_to_WINCMD(cmd), mod, key);
00826
00827     if(pixmap != 0L && strlen((const char *)pixmap))
00828     {
00829         HBITMAP bmap = UMakeBitmap((const char *)pixmap);
00830         CBitmap b;
00831         VERIFY(b.Attach(bmap));
00832         parent.SetMenuItemBitmaps(UCMD_to_WINCMD(cmd), MF_BYCOMMAND, &b, &b);
00833         b.Detach();
00834     }
00835
00836     parent.Detach();
00837     return UMENU_NULL;
00838 #endif
00839 }

Here is the call graph for this function:

int UMenuCount ( UMENU top )

Definition at line 577 of file umenu.cpp.

References UASSERT, UMENU, and UMENU_NULL.

Referenced by PyMenuMgr::Count().

00578 {
00579     UASSERT(top != UMENU_NULL);
00580
00581 #ifdef qMacAPP
00582     MenuRef menu = MAGetMenu(top);
00583     if(menu)
00584     {
00585         return ::CountMenuItems(menu);
00586     }
00587 #endif
00588 #ifdef qMacPP
00589     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00590     LMenu *menu = menuBar->FetchMenu(top);
00591     if(menu)
00592     {
00593         return ::CountMenuItems(menu->GetMacMenuH());
00594     }
00595     else
00596     {
00597         MenuHandle mhdl = ::GetMenu(top);
00598         if(mhdl != 0L)
00599         {
00600             return ::CountMenuItems(mhdl);
00601         }
00602     }
00603 #endif
00604 #ifdef WIN32
00605     CMenu parent;
00606     HMENU menuhdl = (HMENU)top;
00607     VERIFY(parent.Attach(menuhdl));
00608
00609     UINT numItems = parent.GetMenuItemCount();
00610     parent.Detach();
00611
00612     return numItems;
00613 #endif
00614 #ifdef qUnix
00615     if(!GTK_IS_MENU_SHELL(top))
00616         return 0;
00617
00618     GtkWidget *parent = (GtkWidget *)top;
00619
00620     GList* items = gtk_container_children(GTK_CONTAINER (parent));
00621
00622     return g_list_length(items);
00623 #endif
00624
00625     return 0;
00626 }

void UMenuDelete | ( | UMENU | top,
 |  | int | afterIndex
 | ) |

Definition at line 501 of file umenu.cpp.

References UASSERT, UMENU, and UMENU_NULL.

Referenced by cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), and PyMenuMgr::Delete().

00502 {
00503     UASSERT(top != UMENU_NULL);
00504
00505 #ifdef qMacAPP
00506     MenuRef menu = MAGetMenu(top);
00507     if(menu)
00508     {
00509         short numItems = ::CountMenuItems(menu);
00510         afterIndex++;
00511         while (numItems >= afterIndex)
00512         {
00513             ::DeleteMenuItem(menu, numItems);
00514             --numItems;
00515         }
00516     }
00517 #endif
00518 #ifdef qMacPP
00519     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00520     LMenu *menu = menuBar->FetchMenu(top);
00521     if(menu)
00522     {
00523         short numItems = ::CountMenuItems(menu->GetMacMenuH());
00524         afterIndex++;
00525         while (numItems >= afterIndex)
00526         {
00527             menu->RemoveItem(numItems);
00528             --numItems;
00529         }
00530     }
00531     else
00532     {
00533         MenuHandle mhdl = ::GetMenu(top);
00534         if(mhdl != 0L)
00535         {
00536             short numItems = ::CountMenuItems(mhdl);
00537             afterIndex++;
00538             while (numItems >= afterIndex)
00539             {
00540                 ::DeleteMenuItem(mhdl, numItems);
00541                 --numItems;
00542             }
00543         }
00544     }
00545 #endif
00546 #ifdef WIN32
00547     CMenu parent;
00548     HMENU menuhdl = (HMENU)top;
00549     VERIFY(parent.Attach(menuhdl));
00550
00551     int numItems = (int)parent.GetMenuItemCount() - 1;
00552     while (numItems >= afterIndex)
00553     {
00554         VERIFY(parent.DeleteMenu(numItems, MF_BYPOSITION));
00555         --numItems;
00556     }
00557     parent.Detach();
00558 #endif
00559 #ifdef qUnix
00560     if(!GTK_IS_MENU_SHELL(top))
00561         return;
00562
00563     GtkWidget *parent = (GtkWidget *)top;
00564
00565     GList *list = gtk_container_children(GTK_CONTAINER (parent));
00566     GList *items = g_list_nth(list, afterIndex);
00567
00568     while(items != 0L)
00569     {
00570         GtkWidget *wid = GTK_WIDGET(items->data);
00571         gtk_container_remove(GTK_CONTAINER(parent), wid);
00572         items = (GList *)g_list_next(items);
00573     }
00574 #endif
00575 }

void UMenuDeleteByCmd | ( | UMENU | top,
 |  | int | cmd
 | ) |

Definition at line 628 of file umenu.cpp.

References UASSERT, UHIWORD, UMENU, and UMENU_NULL.

Referenced by PyMenuMgr::DeleteByCmd().

00629 {
00630     UASSERT(top != UMENU_NULL);
00631
00632 #ifdef qMacAPP
00633     MenuID menuNo;
00634     short itemNo;
00635     MenuRef menu = CommandToComponents(cmd, menuNo, itemNo);
00636     if(menu)
00637     {
00638         ::DeleteMenuItem(menu, itemNo);
00639     }
00640 #endif
00641 #ifdef qMacPP
00642     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00643     LMenu *menu = menuBar->FetchMenu(top);
00644     if(menu)
00645     {
00646         menu->RemoveCommand(cmd);
00647     }
00648 #endif
00649 #ifdef WIN32
00650     CMenu parent;
00651     HMENU menuhdl = (HMENU)top;
00652     VERIFY(parent.Attach(menuhdl));
00653
00654     VERIFY(parent.DeleteMenu(cmd, MF_BYCOMMAND));
00655
00656     parent.Detach();
00657 #endif
00658 #ifdef qUnix
00659     if(!GTK_IS_MENU_SHELL(top))
00660         return;
00661
00662     GtkWidget *parent = (GtkWidget *)top;
00663
00664     GList *list = gtk_container_children(GTK_CONTAINER (parent));
00665
00666     while(list != 0L)
00667     {
00668         GtkWidget *wid = GTK_WIDGET(list->data);
00669
00670         if(UHIWORD(gtk_object_get_data(GTK_OBJECT(wid), kUgtkDataToken)) == cmd) {
00671             gtk_container_remove(GTK_CONTAINER(parent), wid);
00672             break;
00673         }
00674
00675         list = (GList *)g_list_next(list);
00676     }
00677 #endif
00678 }

Generated on Sat Aug 7 22:46:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/umenu.h File Reference

rf/umenu.h File Reference

#include "uwidget.h"

Include dependency graph for umenu.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | UMenu

Functions

UMENU | UMenuAddPulldown (int widid, const char *name, UMENU top, int cmd=0)
UMENU | UMenuAddRadio (int widid, const char *name, UMENU top, const void *pixmap, int cmd)
UMENU | UMenuAddToggle (int widid, const char *name, UMENU top, const void *pixmap, int cmd)
UMENU | UMenuAddButton (int widid, const char *name, UMENU top, const void *pixmap, int cmd)
UMENU | UMenuAddSeparator (int widid, UMENU top)
void | UMenuDelete (UMENU top, int afterIndex)
void | UMenuDeleteByCmd (UMENU top, int cmd)
int | UMenuCount (UMENU top)

Function Documentation

UMENU UMenuAddButton | ( | int | widid,
 |  | const char * | name,
 |  | UMENU | top,
 |  | const void * | pixmap,
 |  | int | cmd
 | ) |

Definition at line 680 of file umenu.cpp.

References addAccel(), EV_INIT_WIDGET, GetMenuTitle(), UObject::IsKindOf(), UASSERT, UCMD_to_WINCMD, UEventQueryWidget(), UEventSendMessage(), UMakeBitmap(), UMENU, UMENU_NULL, and URUNTIME_CLASS.

Referenced by PyMenuMgr::AddButton(), and CreateMainMenubar().

00681 {
00682     UStr title;
00683     int  mod, key;
00684     char mnemonic;
00685     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00686     UASSERT(top != UMENU_NULL);
00687
00688 #ifdef qMacPP
00689     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00690     LMenu *menu = menuBar->FetchMenu(top);
00691     if(menu)
00692     {
00693         LStr255 pstr(title);
00694         menu->InsertCommand(pstr, cmd, max_Int16 - 1);
00695     }
00696     else
00697     {
00698         MenuHandle mhdl = ::GetMenu(top);
00699         if(mhdl != 0L)
00700         {
00701             SInt16  menuLength = ::CountMenuItems(mhdl);
00702             LStr255 pstr(title);
00703             ::MacInsertMenuItem(mhdl, pstr, menuLength);
00704         }
00705     }
00706
00707     return UMENU_NULL;
00708 #endif
00709 #ifdef qMacAPP
00710     MenuRef menu = MAGetMenu(top);
00711     if(menu)
00712     {
00713         CStr255_AC pstr(title);
00714         gDispatcher->DoMakeMenuBarManager();
00715         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), cmd);
00716     }
00717
00718     return UMENU_NULL;
00719 #endif
00720 #ifdef qGTK
00721     UCmdTarget *target = UEventQueryWidget(widid);
00722     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00723         return UMENU_NULL;
00724     UMenu *pmenu = (UMenu *)target;
00725
00726     if(!GTK_IS_MENU_SHELL(top))
00727         return UMENU_NULL;
00728     GtkWidget *parent = (GtkWidget *)top;
00729
00730     GtkWidget *menuitem = gtk_menu_item_new_with_label_pixmap(title, pixmap);
00731     gtk_widget_show (menuitem);
00732     gtk_container_add (GTK_CONTAINER (parent), menuitem);
00733     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00734     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00735     return UMENU_NULL;
00736 #endif
00737 #ifdef WIN32
00738     HMENU menuhdl = (HMENU)top;
00739     CMenu parent;
00740     VERIFY(parent.Attach(menuhdl));
00741
00742     parent.AppendMenu(MF_STRING, UCMD_to_WINCMD(cmd), name);
00743     addAccel(UCMD_to_WINCMD(cmd), mod, key);
00744
00745     if(pixmap != 0L && strlen((const char *)pixmap))
00746     {
00747         HBITMAP bmap = UMakeBitmap((const char *)pixmap);
00748         CBitmap b;
00749         VERIFY(b.Attach(bmap));
00750         parent.SetMenuItemBitmaps(UCMD_to_WINCMD(cmd), MF_BYCOMMAND, &b, &b);
00751         b.Detach();
00752     }
00753
00754     parent.Detach();
00755     return UMENU_NULL;
00756 #endif
00757 }

Here is the call graph for this function:

UMENU UMenuAddPulldown | ( | int | widid,
 |  | const char * | name,
 |  | UMENU | top,
 |  | int | cmd = 0
 | ) |

Definition at line 288 of file umenu.cpp.

References EV_INIT_WIDGET, GetMenuTitle(), UWidget::GetWidget(), UObject::IsKindOf(), kUMainWidget, UEventQueryWidget(), UEventSendMessage(), UMENU, UMENU_NULL, and URUNTIME_CLASS.

Referenced by PyMenuMgr::AddPulldown(), and CreateMainMenubar().

00289 {
00290     UStr title;
00291     int  mod, key;
00292     char mnemonic;
00293     GetMenuTitle(name, title, 0, mnemonic, mod, key);
00294
00295 #ifdef qMacAPP
00296     return UMENU_NULL;
00297 #endif
00298 #ifdef qMacPP
00299     if(top == UMENU_NULL)
00300     {
00301         Assert_(0); // TODO
00302     }
00303     else
00304     {
00305         LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00306         LMenu *menu = menuBar->FetchMenu(top);
00307         if(menu == 0L)
00308             return UMENU_NULL;
00309
00310         LStr255 pstr(name);
00311         LMenu *newMenu = new LMenu(::UniqueID('MENU'), pstr);
00312         menuBar->InstallMenu(newMenu, hierMenu);
00313
00314         menu->InsertCommand(pstr, cmd_UseMenuItem, max_Int16 - 1);
00315         UAppearanceMenus::SetItemHierID(menu->GetMacMenuH(), ::CountMenuItems(menu->GetMacMenuH()),
00316             newMenu->GetMenuID());
00317         return newMenu->GetMenuID();
00318     }
00319     return UMENU_NULL;
00320 #endif
00321 #ifdef qGTK
00322     GtkWidget *parent = 0L;
00323
00324     if(top == UMENU_NULL)
00325     {
00326         // try to find the menubar : the menu bar should be mapped
00327         // to a UMenu object as the main widget
00328         const UCmdTarget *target = UEventQueryWidget(widid);
00329         UMenu *menu = 0L;
00330         if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00331             return UMENU_NULL;
00332
00333         menu = (UMenu *)target;
00334         if(menu == 0L)
00335             return UMENU_NULL;
00336
00337         GtkWidget *wid = (GtkWidget *)menu->GetWidget(kUMainWidget);
00338         if(wid == 0L || !GTK_IS_MENU_SHELL(wid))
00339             return UMENU_NULL;
00340
00341         parent = wid;
00342     }
00343     else
00344     {
00345         if(!GTK_IS_MENU_SHELL(top))
00346             return UMENU_NULL;
00347         parent = (GtkWidget *)top;
00348     }
00349
00350     GtkWidget *menuitem = gtk_menu_item_new_with_label(title);
00351     gtk_widget_show(menuitem);
00352     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00353
00354     GtkWidget *menu = gtk_menu_new();
00355     gtk_menu_item_set_submenu(GTK_MENU_ITEM (menuitem), menu);
00356     gtk_menu_ensure_uline_accel_group (GTK_MENU (menu));
00357     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menu);
00358     return (UMENU)menu;
00359 #endif
00360 #ifdef WIN32
00361     if(top == UMENU_NULL)
00362     {
00363         CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00364         CMenu menu;
00365         menu.CreatePopupMenu();
00366         pTopMenu->AppendMenu(MF_POPUP, (UINT)menu.GetSafeHmenu(), name);
00367
00368         static bool firsttime = true;
00369         if(firsttime)
00370         {
00371             pTopMenu->DeleteMenu(0, MF_BYPOSITION);
00372             firsttime = false;
00373         }
00374         return (UMENU)menu.Detach();
00375     }
00376     else
00377     {
00378         HMENU menuhdl = (HMENU)top;
00379         CMenu parent;
00380         CMenu menu;
00381         menu.CreatePopupMenu();
00382         VERIFY(parent.Attach(menuhdl));
00383         parent.AppendMenu(MF_POPUP, (UINT)menu.GetSafeHmenu(), name);
00384         parent.Detach();
00385         return (UMENU)menu.Detach();
00386     }
00387 #endif
00388 }

Here is the call graph for this function:

UMENU UMenuAddRadio | ( | int | widid,
 |  | const char * | name,
 |  | UMENU | top,
 |  | const void * | pixmap,
 |  | int | cmd
 | ) |

Definition at line 841 of file umenu.cpp.

References EV_INIT_WIDGET, GetMenuTitle(), UObject::IsKindOf(), UEventQueryWidget(), UEventSendMessage(), UMENU, UMENU_NULL, and URUNTIME_CLASS.

Referenced by CreateMainMenubar().

00842 {
00843     UStr title;
00844     int  mod, key;
00845     char mnemonic;
00846     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00847
00848 #ifdef qMacPP
00849     return UMENU_NULL;
00850 #endif
00851 #ifdef qMacAPP
00852     return UMENU_NULL;
00853 #endif
00854 #ifdef qGTK
00855     UCmdTarget *target = UEventQueryWidget(widid);
00856     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00857         return UMENU_NULL;
00858     UMenu *pmenu = (UMenu *)target;
00859
00860     if(!GTK_IS_MENU_SHELL(top))
00861         return UMENU_NULL;
00862     GtkWidget *parent = (GtkWidget *)top;
00863     GSList* group = (GSList*)pmenu->GetRadioGroup();
00864
00865     GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, title);
00866
00867     if(group == 0L) {
00868         group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
00869         pmenu->SetRadioGroup(group);
00870     }
00871
00872     gtk_widget_show(menuitem);
00873     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00874     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00875     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00876
00877     return UMENU_NULL;
00878 #endif
00879 #ifdef WIN32
00880     return UMENU_NULL;
00881 #endif
00882 }

Here is the call graph for this function:

UMENU UMenuAddSeparator | ( | int | widid,
 |  | UMENU | top
 | ) |

Definition at line 884 of file umenu.cpp.

References UASSERT, UMENU, and UMENU_NULL.

Referenced by PyMenuMgr::AddSeparator(), and CreateMainMenubar().

00885 {
00886     UASSERT(top != UMENU_NULL);
00887
00888 #ifdef qMacPP
00889     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00890     LMenu *menu = menuBar->FetchMenu(top);
00891     if(menu)
00892     {
00893         menu->InsertCommand("\p-", 0, max_Int16 - 1);
00894     }
00895     else
00896     {
00897         MenuHandle mhdl = ::GetMenu(top);
00898         if(mhdl != 0L)
00899         {
00900             SInt16  menuLength = ::CountMenuItems(mhdl);
00901             ::MacInsertMenuItem(mhdl, "\p-", menuLength);
00902         }
00903     }
00904
00905     return UMENU_NULL;
00906 #endif
00907 #ifdef qMacAPP
00908     MenuRef menu = MAGetMenu(top);
00909     if(menu)
00910     {
00911         CStr255_AC pstr("-");
00912         gDispatcher->DoMakeMenuBarManager();
00913         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), 0);
00914     }
00915
00916     return UMENU_NULL;
00917 #endif
00918 #ifdef qGTK
00919     if(!GTK_IS_MENU_SHELL(top))
00920         return UMENU_NULL;
00921     GtkWidget *parent = (GtkWidget *)top;
00922
00923     GtkWidget *menuitem = gtk_menu_item_new();
00924     gtk_widget_show(menuitem);
00925     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00926     gtk_widget_set_sensitive(menuitem, FALSE);
00927     return UMENU_NULL;
00928 #endif
00929 #ifdef WIN32
00930     HMENU menuhdl = (HMENU)top;
00931     CMenu parent;
00932     VERIFY(parent.Attach(menuhdl));
00933     parent.AppendMenu(MF_SEPARATOR);
00934     parent.Detach();
00935     return UMENU_NULL;
00936 #endif
00937 }

UMENU UMenuAddToggle | ( | int | widid,
 |  | const char * | name,
 |  | UMENU | top,
 |  | const void * | pixmap,
 |  | int | cmd
 | ) |

Definition at line 759 of file umenu.cpp.

References addAccel(), EV_INIT_WIDGET, GetMenuTitle(), UObject::IsKindOf(), UCMD_to_WINCMD, UEventQueryWidget(), UEventSendMessage(), UMakeBitmap(), UMENU, UMENU_NULL, and URUNTIME_CLASS.

Referenced by PyMenuMgr::AddToggle().

00760 {
00761     UStr title;
00762     int  mod, key;
00763     char mnemonic;
00764     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00765
00766 #ifdef qMacPP
00767     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00768     LMenu *menu = menuBar->FetchMenu(top);
00769     if(menu)
00770     {
00771         LStr255 pstr(title);
00772         menu->InsertCommand(pstr, cmd, max_Int16 - 1);
00773     }
00774     else
00775     {
00776         MenuHandle mhdl = ::GetMenu(top);
00777         if(mhdl != 0L)
00778         {
00779             SInt16  menuLength = ::CountMenuItems(mhdl);
00780             LStr255 pstr(title);
00781             ::MacInsertMenuItem(mhdl, pstr, menuLength);
00782         }
00783     }
00784
00785     return UMENU_NULL;
00786 #endif
00787 #ifdef qMacAPP
00788     MenuRef menu = MAGetMenu(top);
00789     if(menu)
00790     {
00791         CStr255_AC pstr(title);
00792         gDispatcher->DoMakeMenuBarManager();
00793         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), cmd);
00794     }
00795
00796     return UMENU_NULL;
00797 #endif
00798 #ifdef qGTK
00799     UCmdTarget *target = UEventQueryWidget(widid);
00800     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00801         return UMENU_NULL;
00802     UMenu *pmenu = (UMenu *)target;
00803
00804     if(!GTK_IS_MENU_SHELL(top))
00805         return UMENU_NULL;
00806     GtkWidget *parent = (GtkWidget *)top;
00807
00808     GtkWidget *menuitem = gtk_check_menu_item_new_with_label(title);
00809     gtk_widget_show(menuitem);
00810     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00811     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00812 //      gtk_tooltips_set_tip (tooltips, quit1, "Quit the application", NULL);
00813     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00814
00815     return UMENU_NULL;
00816 #endif
00817 #ifdef WIN32
00818     ASSERT(top != UMENU_NULL);
00819
00820     HMENU menuhdl = (HMENU)top;
00821     CMenu parent;
00822     VERIFY(parent.Attach(menuhdl));
00823
00824     parent.AppendMenu(MF_STRING, UCMD_to_WINCMD(cmd), name);
00825     addAccel(UCMD_to_WINCMD(cmd), mod, key);
00826
00827     if(pixmap != 0L && strlen((const char *)pixmap))
00828     {
00829         HBITMAP bmap = UMakeBitmap((const char *)pixmap);
00830         CBitmap b;
00831         VERIFY(b.Attach(bmap));
00832         parent.SetMenuItemBitmaps(UCMD_to_WINCMD(cmd), MF_BYCOMMAND, &b, &b);
00833         b.Detach();
00834     }
00835
00836     parent.Detach();
00837     return UMENU_NULL;
00838 #endif
00839 }

Here is the call graph for this function:

int UMenuCount ( UMENU top )

Definition at line 577 of file umenu.cpp.

References UASSERT, UMENU, and UMENU_NULL.

Referenced by PyMenuMgr::Count().

00578 {
00579     UASSERT(top != UMENU_NULL);
00580
00581 #ifdef qMacAPP
00582     MenuRef menu = MAGetMenu(top);
00583     if(menu)
00584     {
00585         return ::CountMenuItems(menu);
00586     }
00587 #endif
00588 #ifdef qMacPP
00589     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00590     LMenu *menu = menuBar->FetchMenu(top);
00591     if(menu)
00592     {
00593         return ::CountMenuItems(menu->GetMacMenuH());
00594     }
00595     else
00596     {
00597         MenuHandle mhdl = ::GetMenu(top);
00598         if(mhdl != 0L)
00599         {
00600             return ::CountMenuItems(mhdl);
00601         }
00602     }
00603 #endif
00604 #ifdef WIN32
00605     CMenu parent;
00606     HMENU menuhdl = (HMENU)top;
00607     VERIFY(parent.Attach(menuhdl));
00608
00609     UINT numItems = parent.GetMenuItemCount();
00610     parent.Detach();
00611
00612     return numItems;
00613 #endif
00614 #ifdef qUnix
00615     if(!GTK_IS_MENU_SHELL(top))
00616         return 0;
00617
00618     GtkWidget *parent = (GtkWidget *)top;
00619
00620     GList* items = gtk_container_children(GTK_CONTAINER (parent));
00621
00622     return g_list_length(items);
00623 #endif
00624
00625     return 0;
00626 }

void UMenuDelete | ( | UMENU | top,
 |  | int | afterIndex
 | ) |

Definition at line 501 of file umenu.cpp.

References UASSERT, UMENU, and UMENU_NULL.

Referenced by cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), and PyMenuMgr::Delete().

00502 {
00503     UASSERT(top != UMENU_NULL);
00504
00505 #ifdef qMacAPP
00506     MenuRef menu = MAGetMenu(top);
00507     if(menu)
00508     {
00509         short numItems = ::CountMenuItems(menu);
00510         afterIndex++;
00511         while (numItems >= afterIndex)
00512         {
00513             ::DeleteMenuItem(menu, numItems);
00514             --numItems;
00515         }
00516     }
00517 #endif
00518 #ifdef qMacPP
00519     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00520     LMenu *menu = menuBar->FetchMenu(top);
00521     if(menu)
00522     {
00523         short numItems = ::CountMenuItems(menu->GetMacMenuH());
00524         afterIndex++;
00525         while (numItems >= afterIndex)
00526         {
00527             menu->RemoveItem(numItems);
00528             --numItems;
00529         }
00530     }
00531     else
00532     {
00533         MenuHandle mhdl = ::GetMenu(top);
00534         if(mhdl != 0L)
00535         {
00536             short numItems = ::CountMenuItems(mhdl);
00537             afterIndex++;
00538             while (numItems >= afterIndex)
00539             {
00540                 ::DeleteMenuItem(mhdl, numItems);
00541                 --numItems;
00542             }
00543         }
00544     }
00545 #endif
00546 #ifdef WIN32
00547     CMenu parent;
00548     HMENU menuhdl = (HMENU)top;
00549     VERIFY(parent.Attach(menuhdl));
00550
00551     int numItems = (int)parent.GetMenuItemCount() - 1;
00552     while (numItems >= afterIndex)
00553     {
00554         VERIFY(parent.DeleteMenu(numItems, MF_BYPOSITION));
00555         --numItems;
00556     }
00557     parent.Detach();
00558 #endif
00559 #ifdef qUnix
00560     if(!GTK_IS_MENU_SHELL(top))
00561         return;
00562
00563     GtkWidget *parent = (GtkWidget *)top;
00564
00565     GList *list = gtk_container_children(GTK_CONTAINER (parent));
00566     GList *items = g_list_nth(list, afterIndex);
00567
00568     while(items != 0L)
00569     {
00570         GtkWidget *wid = GTK_WIDGET(items->data);
00571         gtk_container_remove(GTK_CONTAINER(parent), wid);
00572         items = (GList *)g_list_next(items);
00573     }
00574 #endif
00575 }

void UMenuDeleteByCmd | ( | UMENU | top,
 |  | int | cmd
 | ) |

Definition at line 628 of file umenu.cpp.

References UASSERT, UHIWORD, UMENU, and UMENU_NULL.

Referenced by PyMenuMgr::DeleteByCmd().

00629 {
00630     UASSERT(top != UMENU_NULL);
00631
00632 #ifdef qMacAPP
00633     MenuID menuNo;
00634     short itemNo;
00635     MenuRef menu = CommandToComponents(cmd, menuNo, itemNo);
00636     if(menu)
00637     {
00638         ::DeleteMenuItem(menu, itemNo);
00639     }
00640 #endif
00641 #ifdef qMacPP
00642     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00643     LMenu *menu = menuBar->FetchMenu(top);
00644     if(menu)
00645     {
00646         menu->RemoveCommand(cmd);
00647     }
00648 #endif
00649 #ifdef WIN32
00650     CMenu parent;
00651     HMENU menuhdl = (HMENU)top;
00652     VERIFY(parent.Attach(menuhdl));
00653
00654     VERIFY(parent.DeleteMenu(cmd, MF_BYCOMMAND));
00655
00656     parent.Detach();
00657 #endif
00658 #ifdef qUnix
00659     if(!GTK_IS_MENU_SHELL(top))
00660         return;
00661
00662     GtkWidget *parent = (GtkWidget *)top;
00663
00664     GList *list = gtk_container_children(GTK_CONTAINER (parent));
00665
00666     while(list != 0L)
00667     {
00668         GtkWidget *wid = GTK_WIDGET(list->data);
00669
00670         if(UHIWORD(gtk_object_get_data(GTK_OBJECT(wid), kUgtkDataToken)) == cmd) {
00671             gtk_container_remove(GTK_CONTAINER(parent), wid);
00672             break;
00673         }
00674
00675         list = (GList *)g_list_next(list);
00676     }
00677 #endif
00678 }

Generated on Sat Aug 7 22:46:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uobject.cpp File Reference

rf/uobject.cpp File Reference

#include "stdafx.h"
#include <string.h>
#include "uobject.h"

Include dependency graph for uobject.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uobject.h File Reference

rf/uobject.h File Reference

#include "uconfig.h"

Include dependency graph for uobject.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | URuntimeClass
class | UObject

Defines

#define | URUNTIME_CLASS(class_name) (class_name::rt##class_name())
#define | UDECLARE_DYNAMIC(class_name)
#define | UDECLARE_DYNCREATE(class_name)
#define | UIMPLEMENT_RUNTIMECLASS(class_name, base_class_name, pfnNew)
#define | UIMPLEMENT_DYNAMIC(class_name, base_class_name) UIMPLEMENT_RUNTIMECLASS(class_name, base_class_name, 0L)
#define | UIMPLEMENT_DYNCREATE(class_name, base_class_name)
#define | UDYNAMIC_CAST(TYPE, EXPR) ((TYPE *)((EXPR) == 0L ? 0L : ((EXPR)->IsKindOf(URUNTIME_CLASS(TYPE)) ? (TYPE *)EXPR : 0L)))

Define Documentation

#define UDECLARE_DYNAMIC ( class_name )

Value:

protected: \
    static const URuntimeClass* _GetBaseClass(); \
    static const URuntimeClass class##class_name; \
public: \
    static const URuntimeClass *rt##class_name(void); \
    virtual const URuntimeClass* GetRuntimeClass() const; \
Definition at line 56 of file uobject.h.

#define UDECLARE_DYNCREATE ( class_name )

Value:

UDECLARE_DYNAMIC(class_name) \
    static UObject* CreateObject(); \
Definition at line 65 of file uobject.h.

#define UDYNAMIC_CAST | ( | TYPE,
 |  | EXPR | ) | ((TYPE *)((EXPR) == 0L ? 0L : ((EXPR)->IsKindOf(URUNTIME_CLASS(TYPE)) ? (TYPE *)EXPR : 0L)))

Definition at line 105 of file uobject.h.

Referenced by LPseudoWinAttachment::SearchWidID().

#define UIMPLEMENT_DYNAMIC | ( | class_name,
 |  | base_class_name | ) | UIMPLEMENT_RUNTIMECLASS(class_name, base_class_name, 0L)

Definition at line 80 of file uobject.h.

#define UIMPLEMENT_DYNCREATE | ( | class_name,
 |  | base_class_name | )

Value:

UObject* class_name::CreateObject() \
        { return new class_name; } \
    UIMPLEMENT_RUNTIMECLASS(class_name, base_class_name, \
        class_name::CreateObject)
Definition at line 83 of file uobject.h.

#define UIMPLEMENT_RUNTIMECLASS | ( | class_name,
 |  | base_class_name,
 |  | pfnNew | )

Value:

const URuntimeClass *class_name::rt##class_name(void) \
        { return &class_name::class##class_name; } \
    const URuntimeClass* class_name::_GetBaseClass() \
        { return URUNTIME_CLASS(base_class_name); } \
    const URuntimeClass class_name::class##class_name( \
        #class_name, sizeof(class class_name), pfnNew, \
            &class_name::_GetBaseClass); \
    const URuntimeClass* class_name::GetRuntimeClass() const \
        { return URUNTIME_CLASS(class_name); } \
Definition at line 69 of file uobject.h.

#define URUNTIME_CLASS ( class_name ) (class_name::rt##class_name())

Definition at line 54 of file uobject.h.

Referenced by _loadPersistentSettings(), UCvsApp::GetBrowserView(), UCvsApp::GetConsole(), UCvsApp::GetFilesView(), UObject::GetRuntimeClass(), UWidget::HasModal(), CPersistent::LoadAll(), UCvsFolders::OnTreeSelecting(), CPersistent::SaveAll(), CPersistent::SaveAllSettings(), UDC::UDC(), UEventGiveTime(), UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), and UMenuAddToggle().

Generated on Sat Aug 7 22:46:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/ustr.cpp File Reference

rf/ustr.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
#include <new>
#include <io.h>
#include "cvsgui_i18n.h"
#include "ustr.h"
#include "uconsole.h"
#include "FileTraversal.h"
#include "AppConsole.h"

Include dependency graph for ustr.cpp:

Include dependency graph

Go to the source code of this file.

Functions

char * | CleanupLogMsg (const char *msg)
bool | SplitPath (const char *dir, UStr &uppath, UStr &folder, bool dontSkipDelimiter)
bool | MakeTmpFile (UStr &file, const char *prefix, const char *extension, bool create)
void | GetExtension (const char *file, UStr &base, UStr &ext)
bool | GetEnvValue (const char *cmd, const char *key, UStr &value)
int | StringToArgv (const char *cmdLine, char **argv)
void | FlatenSubFolders (UStr &tmpf)
UStr & | NormalizeFileName (UStr &fileName)
void | StrSafeCopy (char *buffer, const char *value, const int bufferSize)
int | StrOrdICmp (const char *s1, const char *s2)
int | StrPathCmp (const char *s1, const char *s2)

Variables

const unsigned int | kMaxChar = 255

Function Documentation

char* CleanupLogMsg ( const char * msg )

Clean up the log message for the server and put the good line feeds

Parameters:
msg Message to be cleaned
Returns:
The cleaned message
Todo:
mac : ISO conversion
Definition at line 70 of file ustr.cpp.

References CStaticAllocT< T >::AdjustSize().

Referenced by CvsCmdCommit(), CvsCmdImportModule(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), and CGraphView::OnGraphSetstate().

00071 {
00072     static CStaticAllocT<char> buf;
00073
00074     size_t len = strlen(msg);
00075     buf.AdjustSize(len + 1);
00076
00077     char* tmp = buf;
00078     char c;
00079
00080
00081     while( (c = *msg++) != '\0' )
00082     {
00083 #ifdef WIN32
00084         if(c == '\r')
00085             continue;
00086 #endif /* WIN32 */
00087 #ifdef TARGET_OS_MAC
00088         if(c == '\r')
00089             c = '\n';
00090 #endif /* TARGET_OS_MAC */
00091         *tmp++ = c;
00092     }
00093
00094     *tmp++ = '\0';
00095
00096     return buf;
00097 }

Here is the call graph for this function:

void FlatenSubFolders ( UStr & tmpf )

Removes folder separators by replacing them with dots so that temporary file could be created without creating matching subfolders in the temporary file folder

Parameters:
tmpf File with subfolder
Returns:
true on success, false otherwise
Note:
Windows client may provide file names pointing into subfolders
Definition at line 401 of file ustr.cpp.

References UStr::replace().

Referenced by CvsCmdAnnotate(), and CvsCmdDiff().

00402 {
00403     tmpf.replace( kPathDelimiter, '.');
00404 }

Here is the call graph for this function:

bool GetEnvValue | ( | const char * | cmd,
 |  | const char * | key,
 |  | UStr & | value
 | ) |

Parse a command like 'user=whohost=cvs'

Parameters:
cmd | Command
key | Key
value | Return value
Returns:
true on success, false otherwise
Definition at line 289 of file ustr.cpp.

References UStr::set().

Referenced by CompatGetPassword().

00290 {
00291     const char* tmp = strstr(cmd, key);
00292     if( tmp == 0L )
00293         return false;
00294
00295     tmp = strchr(tmp, '=');
00296     if( tmp == 0L )
00297         return false;
00298
00299     tmp++;
00300
00301     const char* tmp2 = strchr(tmp, '&');
00302     if( tmp2 == 0L )
00303         value = tmp;
00304     else
00305         value.set(tmp, tmp2 - tmp);
00306
00307     return true;
00308 }

Here is the call graph for this function:

void GetExtension | ( | const char * | file,
 |  | UStr & | base,
 |  | UStr & | ext
 | ) |

Extract the extension from the filename

Parameters:
file | File name to extract extension from
base | Return the base of the filename
ext | Return the file's extension
Definition at line 265 of file ustr.cpp.

References UStr::substr().

Referenced by CvsCmdAnnotate(), CvsCmdDiff(), getSettingName(), and CGraphView::RetrieveSel().

00266 {
00267     const char* tmp = strrchr(file, '.');
00268
00269     if( tmp == 0L )
00270     {
00271         ext = "";
00272         base = file;
00273     }
00274     else
00275     {
00276         ext = tmp + 1;
00277 //      UStr(file).substr( 0, tmp - file, base); // strange ??
00278         base = UStr(file).substr( 0, tmp - file); // strange ??
00279     }
00280 }

Here is the call graph for this function:

bool MakeTmpFile | ( | UStr & | file,
 |  | const char * | prefix,
 |  | const char * | extension,
 |  | bool | create
 | ) |

Find a unique name for a temporary file

Parameters:
file | Return temporary file name
prefix | Prefix of the filename
extension | Extension of the filename
create | Set to true to create the file
Returns:
true on success, false otherwise
Definition at line 158 of file ustr.cpp.

References _i18n, cvs_err(), UStr::endsWith(), err, getenv, MacGetTempFolder(), MAX_PATH, NormalizeFileName(), stat::st_mode, stat, and UFSSpec.

Referenced by CompatGetEditorMsg(), and launchCVS().

00159 {
00160     static int count = 0;
00161
00162     UStr tmpPath;
00163     UStr ext;
00164     UStr prf;
00165
00166     if( extension != 0L && extension[0] != '\0' )
00167     {
00168         if( extension[0] != '.' )
00169             ext = ".";
00170
00171         ext << extension;
00172     }
00173
00174     if( prefix != 0L && prefix[0] != '\0' )
00175     {
00176         prf = prefix;
00177     }
00178     else
00179     {
00180         prf = "cvsgui";
00181     }
00182
00183 #ifdef WIN32
00184     char* ptr;
00185     ptr = getenv(_T("TMP"));
00186     if( ptr != 0L && _access(ptr, 0) != -1 )
00187     {
00188         tmpPath = ptr;
00189     }
00190     else
00191     {
00192         tmpPath = ".";
00193     }
00194 #endif /* !WIN32 */
00195 #ifdef TARGET_OS_MAC
00196     UFSSpec theFolder;
00197     OSErr err;
00198
00199     if( (err = MacGetTempFolder(theFolder, tmpPath)) != noErr )
00200     {
00201         cvs_err(_i18n("Unable to locate the preferences folder (error %d) !\n"), err);
00202         return 0L;
00203     }
00204 #endif /* !TARGET_OS_MAC */
00205 #if qUnix
00206     tmpPath = "/tmp";
00207 #endif
00208
00209     struct stat sb;
00210     if( stat(tmpPath, &sb) == -1 || !S_ISDIR(sb.st_mode) )
00211     {
00212         cvs_err(_i18n("Unable to access '%s' (error %d) !\n"), (const char*)tmpPath, errno);
00213         return false;
00214     }
00215
00216     if( !tmpPath.endsWith(kPathDelimiter) )
00217         tmpPath << kPathDelimiter;
00218
00219     int maxtry = 10000;
00220     while( true )
00221     {
00222         UStr name;
00223
00224         {
00225             char filename[MAX_PATH];
00226
00227             sprintf(filename, "%s%d%s", (const char*)prf, count++, (const char*)ext);
00228             name = filename;
00229         }
00230
00231         NormalizeFileName(name);
00232         file = tmpPath;
00233         file << name;
00234
00235         if( stat(file, &sb) == -1 && errno == ENOENT )
00236         {
00237             if( create )
00238             {
00239                 FILE* stream = fopen(file, "w");
00240                 if( stream )
00241                 {
00242                     fclose(stream);
00243                 }
00244             }
00245
00246             return true;
00247         }
00248
00249         if( maxtry-- == 0 )
00250         {
00251             cvs_err(_i18n("Time out to access '%s' !\n"), (const char*)tmpPath);
00252             break;
00253         }
00254     }
00255
00256     return false;
00257 }

Here is the call graph for this function:

UStr& NormalizeFileName ( UStr & fileName )

Normalize given file name

Parameters:
fileName Return normalized file name
Returns:
Normalized file name reference
Definition at line 425 of file ustr.cpp.

References UStr::replace().

Referenced by AskCreatePersistentSettings(), and MakeTmpFile().

00426 {
00427     fileName.replace('*', '_');
00428     fileName.replace('?', '_');
00429     fileName.replace(':', '_');
00430     fileName.replace('/', '_');
00431     fileName.replace('\\', '_');
00432     fileName.replace('"', '_');
00433     fileName.replace('$', '_');
00434
00435     return fileName;
00436 }

Here is the call graph for this function:

bool SplitPath | ( | const char * | dir,
 |  | UStr & | uppath,
 |  | UStr & | folder,
 |  | bool | dontSkipDelimiter
 | ) |

Split the path into the up-directory and the folder

Parameters:
dir | Path to be split
uppath | Return up-directory
folder | Return folder or file
dontSkipDelimiter | Set to true to prevent skipping the delimiter if the path to be split ends with one
Returns:
true on success, false otherwise
Note:
Passing NULL is considered an error, passing empty string returns true
Definition at line 108 of file ustr.cpp.

References MAX_PATH.

Referenced by BrowseForFile(), BrowserGetDirectory(), BrowserGetMultiFiles(), BrowserGetSaveasFile(), CompatGetCheckout(), CompatGetEditorMsg(), CompatGetImport(), CSaveSettingsDlg::CSaveSettingsDlg(), CvsCmdAdd(), CvsCmdRelease(), CMfFileDialog::DoModal(), CGraphView::FileAction(), getLoc(), CTCLBrowserEnt::GetNormalized(), getSettingName(), IsCvsDirectory(), LaunchEditor(), LaunchHandler(), LaunchItemListCommand(), LaunchViewer(), UCvsFolders::OnCmdMacrosSel(), UCvsFiles::OnCmdUpone(), CWincvsApp::OnHelpCvs(), CWinCvsBrowser::OnUpdateMacro(), CGraphView::SaveSel(), and CHistComboBoxEx::SetIcon().

00109 {
00110     char newDir[MAX_PATH * 2] = "";
00111     char oldDir[MAX_PATH * 2] = "";
00112     char newFile[MAX_PATH] = "";
00113
00114     if( !dir )
00115     {
00116         // Null pointer
00117         return false;
00118     }
00119
00120     int dirLen = strlen(dir);
00121     if( dirLen > 0 )
00122     {
00123         strcpy(oldDir, dir);
00124
00125         if( !dontSkipDelimiter && (dir[dirLen - 1] == kPathDelimiter) )
00126         {
00127             oldDir[dirLen - 1] = '\0';
00128             --dirLen;
00129         }
00130
00131         const char* tmp = oldDir;
00132         const char* prev = oldDir;
00133
00134         while( (tmp = strchr(tmp, kPathDelimiter)) != 0L )
00135         {
00136             prev = ++tmp;
00137         }
00138
00139         strcpy(newDir, oldDir);
00140         newDir[prev - oldDir] = '\0';
00141         strcpy(newFile, prev);
00142     }
00143
00144     uppath = newDir;
00145     folder = newFile;
00146
00147     return true;
00148 }

int StringToArgv | ( | const char * | cmdLine,
 |  | char ** | argv
 | ) |

Convert a command line (possibly quoted) into regular argc, argv arguments

Parameters:
cmdLine | Command line
argv | Return argv arguments
Returns:
The count of arguments (argc)
Definition at line 316 of file ustr.cpp.

References MAX_ARGS, and MAX_CMD_LEN.

Referenced by CvsCmdCommandLine().

00317 {
00318     int argc = 0;
00319
00320     char Quote = '\0';              /*  Contains the quote character if we are inside "" or '', or \0 otherwise */
00321     const char* walker1 = cmdLine;  /*  walker1 traverses the original command line */
00322     char* walker2;                  /*  walker2 traverses the parsed copy of the commandline */
00323     char theChar;                   /*  theChar is the character we are currently parsing */
00324     char arguments[MAX_CMD_LEN];    /*  Will contain a parsed copy of the command line */
00325
00326     /* Copy into arguments */
00327     walker2 = arguments;
00328
00329     /* Parse command line to \0 */
00330     while( (theChar = *walker1++) != '\0' )
00331     {
00332         /* Skip leading space before an argument */
00333         if( theChar == ' ' )
00334             continue;
00335
00336         /* Set argv to point to the space where we copy the next argument */
00337         argv [argc++] = walker2;
00338
00339         /* If we filled argv, skip the rest */
00340         if( argc > MAX_ARGS)
00341         {
00342             argc--;
00343             break;
00344         }
00345
00346         do
00347         {
00348             /* Parse an argument skip \s */
00349             if( theChar == '\\' && *walker1++ )
00350             {
00351                 theChar = *walker1++;
00352             }
00353             else
00354             {
00355                 /* When we find a quote... */
00356                 if( theChar == '"' || theChar == '\'' )
00357                 {
00358                     /* If we are not inside quotes already, */
00359                     if( Quote == '\0' )
00360                     {
00361                         /* Remember we are inside quotes now */
00362                         Quote = theChar;
00363
00364                         /* Go to the next character */
00365                         continue;
00366                     }
00367
00368                     /* If we are already inside that kind of quotes */
00369                     if( theChar == Quote )
00370                     {
00371                         /* Close quotes */
00372                         Quote = '\0';
00373
00374                         /* Go to the next character */
00375                         continue;
00376                     }
00377                 }
00378             }
00379
00380             /* Copy the character into args */
00381             *walker2++ = theChar;
00382
00383             /* Repeat until we reach the end of arguments or we reach a space that is not inside quotes */
00384         }while( (*walker1 != '\0') && (((theChar = *walker1++) != ' ') || (Quote != '\0')) );
00385
00386         /* Null-terminate the last argument */
00387         *walker2++ = 0;
00388     }
00389
00390     return argc;
00391 }

int StrOrdICmp | ( | const char * | s1,
 |  | const char * | s2
 | ) |

Compare strings without regard to case but assuring the order if only case differs

Parameters:
s1 | First string
s2 | Second string
Returns:
-1, 0 and 1 as appropriate
Definition at line 462 of file ustr.cpp.

Referenced by KoNameColumn::Compare(), and KoPathColumn::Compare().

00463 {
00464     if( int rc = stricmp(s1, s2) )
00465         return rc;
00466
00467     return strcmp(s1, s2);
00468 }

int StrPathCmp | ( | const char * | s1,
 |  | const char * | s2
 | ) |

Compare paths ignoring trailing path delimiter

Parameters:
s1 | First path
s2 | Second path
Returns:
-1, 0 and 1 as appropriate
Definition at line 476 of file ustr.cpp.

References CStr.

Referenced by FindBestLastCvsroot(), and FindBestLastModuleName().

00477 {
00478     CStr str1(s1);
00479     CStr str2(s2);
00480
00481     str1.rtrim(kPathDelimiter);
00482     str2.rtrim(kPathDelimiter);
00483
00484 #ifdef WIN32
00485     return stricmp(str1.c_str(), str2.c_str());
00486 #else
00487     return strcmp(str1.c_str(), str2.c_str());
00488 #endif
00489 }

void StrSafeCopy | ( | char * | buffer,
 |  | const char * | value,
 |  | const int | bufferSize
 | ) |

Make a "safe" copy of the string

Parameters:
buffer | Destination
value | Source
bufferSize | Destination buffer size
Definition at line 444 of file ustr.cpp.

Referenced by KoNameColumn::GetText(), KoExtColumn::GetText(), KoPathColumn::GetText(), KoRevisionColumn::GetText(), KoOptionColumn::GetText(), KoEncodingColumn::GetText(), KoStateColumn::GetText(), KoTagColumn::GetText(), KoDateColumn::GetText(), and KoConflictColumn::GetText().

00445 {
00446     if( value && *value )
00447     {
00448         strncpy(buffer, value, bufferSize);
00449     }
00450     else
00451     {
00452         *buffer = 0;
00453     }
00454 }

Variable Documentation

const unsigned int kMaxChar = 255 [static]

Definition at line 62 of file ustr.cpp.

Referenced by UPStr::operator<<(), UPStr::operator=(), and UPStr::set().

Generated on Sat Aug 7 22:46:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/ustr.h File Reference

rf/ustr.h File Reference

#include <stddef.h>
#include <string.h>
#include "uconfig.h"

Include dependency graph for ustr.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CStaticAllocT< T >
Class to use when fed-up with realloc, malloc... More...
class | UPStr
Up to 255 characters pascal and C string class. More...
class | UStr
C string class. More...

Defines

#define | EGCS_CONST
#define | MAX_ARGS 40
#define | MAX_CMD_LEN 2048
#define | CPStr UPStr
#define | CStr UStr

Functions

bool | SplitPath (const char *dir, UStr &uppath, UStr &folder, bool dontSkipDelimiter=false)
bool | MakeTmpFile (UStr &file, const char *prefix, const char *extension=0L, bool create=false)
void | GetExtension (const char *file, UStr &base, UStr &ext)
bool | GetEnvValue (const char *cmd, const char *key, UStr &value)
void | FlatenSubFolders (UStr &tmpf)
UStr & | NormalizeFileName (UStr &fileName)
char * | CleanupLogMsg (const char *msg)
int | StrOrdICmp (const char *s1, const char *s2)
int | StrPathCmp (const char *s1, const char *s2)
void | StrSafeCopy (char *buffer, const char *value, const int bufferSize)
int | StringToArgv (const char *cmdLine, char **argv)

Variables

const char | kPathDelimiter = '\\'

Define Documentation

#define CPStr UPStr

Definition at line 43 of file ustr.h.

Referenced by CMPString::CMPString(), CompatGetAnnotate(), CompatGetCheckout(), CompatGetCommand(), CompatGetImport(), CvsCmdAnnotate(), CvsCmdImportModule(), PCPStr::GetData(), ReportWarning::GetDesc(), ReportConflict::GetDesc(), ReportConflict::GetKindDesc(), ReportWarning::GetStateDesc(), ReportConflict::GetStateDesc(), CPersistent::LoadAll(), PCPStr::operator const char *(), PCPStr::operator const unsigned char *(), PCPStr::operator=(), PCPStr::PCPStr(), PCPStr::SetData(), and TestFileIsAlias().

#define CStr UStr

Definition at line 44 of file ustr.h.

Referenced by CMultilineEntryDlg::ActionBrowseModule(), CMultilineEntryDlg::ActionBrowseTag(), CMultilineEntryDlg::ActionFormatCvsRoot(), RemoveCvsArgs::addfile(), ReportWarning::AddWarning(), AskCreatePersistentSettings(), BrowseForFile(), BrowserGetDirectory(), BrowserGetMultiFiles(), BrowserGetSaveasFile(), BuildIgnoredList(), CAboutDlg::CAboutDlg(), CheckLocationDriveType(), CImportEntry::CImportEntry(), CImportWarning::CImportWarning(), CMString::CMString(), KoRevisionColumn::CompareRevisions(), CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetDiff(), CompatGetEditorMsg(), CompatGetImport(), CompatGetInit(), CompatGetLog(), CompatGetLogin(), CompatGetModuleListItem(), CompatGetRtag(), CompatGetTag(), CompatGetTagListItem(), CompatGetUpdate(), CompatMoveToTrash(), CWinCvsBrowser::Create(), CTcl_Interp::CTcl_Interp(), CTipDlg::CTipDlg(), CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdImportModule(), CvsCmdInit(), CvsCmdLog(), CvsCmdLogin(), CvsCmdMacrosAdmin(), CvsCmdMoveToTrash(), CvsCmdRelease(), CvsCmdRtag(), CvsCmdTag(), CvsCmdUpdate(), cvsgui_LaunchTclMacro(), CvsLogParse(), DDV_CheckPathExists(), DDX_ComboMString(), CSelectionDetailsDlg::DisplaySelection(), CMfFileDialog::DoModal(), UCvsFiles::EditSel(), Entries_SetVisited(), CGraphView::FileAction(), FileTraverse(), FindBestLastCvsroot(), FindBestLastModuleName(), CWincvsApp::GetAppPath(), PCStr::GetData(), CBrowseFileView::GetEntriesModTime(), CWinCvsBrowser::GetItemByLocation(), UCvsFolders::GetItemByLocation(), USmartCombo::GetKeyword(), getLoc(), CTCLBrowserEnt::GetNormalized(), KiSelectionHandler::GetSelection(), getSettingName(), glue_getenv(), CvsPrefs::Home(), ign_add(), InitializeInterp(), CWincvsApp::InitInstance(), InsertLastCvsroot(), InsertLastModuleName(), IsCvsDirectory(), CTCLBrowserEnt::IsSamePath(), launchCVS(), LaunchDefaultEditor(), LaunchDiff(), LaunchEditor(), LaunchHandler(), LaunchItemListCommand(), LaunchViewer(), CPersistent::LoadAll(), MacrosReloadAll(), MigrateCvsrootList(), myTcl_CreateInterp(), MultiFiles::Normalize(), CWinCvsBrowser::NotifySelectionChange(), CGetPrefs_CVS::OnAltcvssel(), CGetPrefs_WINCVS::OnAltsettingschk(), CWincvsApp::OnAppCredits(), CImport_OPTIONS::OnBrowseBranchid(), CRtag_MAIN::OnBrowseModules(), CImport_MAIN::OnBrowseModules(), CCheckout_MAIN::OnBrowseModules(), CItemListDlg::OnBrowseReadfrom(), CWincvsDoc::OnBrowserOpen(), UCvsFrame::OnBrowserPopup(), CUpdateOptions::OnBrowseTag(), CTag_MAIN::OnBrowseTag(), CRtag_OPTIONS::OnBrowseTag(), CRtag_MAIN::OnBrowseTag(), CLogFilters::OnBrowseTag(), CItemListDlg::OnBrowseTag(), CCommit_OPTIONS::OnBrowseTag(), CAnnotate_MAIN::OnBrowseTag(), CUpdateMerge::OnBrowseTag1(), CImport_MAIN::OnBrowseTag1(), CDiff_MAIN::OnBrowseTag1(), CUpdateMerge::OnBrowseTag2(), CImport_MAIN::OnBrowseTag2(), CDiff_MAIN::OnBrowseTag2(), CGetPrefs_CVS::OnBtnhome(), CImport_OPTIONS::OnBtnpath(), CCheckout_MAIN::OnBtnPath(), CGetPrefs_WINCVS::OnBtnsettings(), CGetPrefs_WINCVS::OnBtnviewer(), CCmdLine_MAIN::OnCheckpath(), UCvsFolders::OnCmdMacrosSel(), UCvsFiles::OnCmdUIEditseldef(), CCommit_MAIN::OnDiff(), TViewFill::OnDirectory(), CGetPrefs_WINCVS::OnExtdiffsel(), MacroTraversal::OnFile(), CSortHeaderCtrl::OnFilterBtnClicked(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CWincvsApp::OnHelpCvs(), CTemplateDlg::OnInitDialog(), CItemListDlg::OnInitDialog(), CBrowseFileView::OnItemchanged(), CTemplateDlg::OnItemchangedTemplateList(), CWinCvsBrowser::OnItemexpanding(), UCvsFiles::OnMacroSel(), CSplashWnd::OnPaint(), CGetPrefs_WINCVS::OnPythondllsel(), CWinCvsBrowser::OnQueryProperties(), CBrowseFileView::OnQueryProperties(), CGraphView::OnQueryShellactionDefault(), CRtag_MAIN::OnSelcvsroot(), CLogin_MAIN::OnSelcvsroot(), CCmdLine_MAIN::OnSelcvsroot(), CItemListDlg::OnSelcvsroot(), CInit_MAIN::OnSelcvsroot(), CImport_MAIN::OnSelcvsroot(), CCheckout_MAIN::OnSelcvsroot(), CItemListDlg::OnSelection(), CCmdLine_MAIN::OnSelfolder(), CGetPrefs_WINCVS::OnTcldllsel(), CWinCvsBrowser::OnUpdateCmd(), CWinCvsBrowser::OnUpdateMacro(), CBrowseFileView::OnUpdateViewAdd(), CBrowseFileView::OnUpdateViewAddB(), CGraphView::OnViewEditsel(), CGraphView::OnViewEditseldef(), CWinCvsBrowser::OnViewExplore(), CWinCvsBrowser::OnViewNewInstance(), CGraphView::OnViewOpensel(), CGraphView::OnViewOpenselas(), CGraphView::OnViewReload(), CGraphView::OnViewUnlockf(), PCStr::operator const char *(), PCStr::operator=(), PCStr::PCStr(), print(), CvsArgs::print(), CWinCvsBrowser::ProcessSelectionCommand(), USmartCombo::RemoveItem(), CvsArgs::reset(), CWinCvsBrowser::ResetBrowser(), UCvsFolders::ResetBrowser(), CWinCvsBrowser::ResetView(), CWinCvsBrowser::RetrievePath(), CGraphView::RetrieveSel(), CPersistent::SaveAll(), CGraphView::SaveSel(), PCStr::SetData(), CHistComboBoxEx::SetIcon(), CGraphDoc::SetNode(), CWinCvsBrowser::StepToLocation(), CWinCvsBrowser::StoreExpanded(), StrPathCmp(), Tag_Open(), tclCvsBrowserProc(), tclCvsEntriesProc(), tclSafeRemove(), and TGraphDelCmd::TraverseNode().

#define EGCS_CONST

Definition at line 31 of file ustr.h.

#define MAX_ARGS 40

Definition at line 34 of file ustr.h.

Referenced by CvsCmdCommandLine(), and StringToArgv().

#define MAX_CMD_LEN 2048

Definition at line 35 of file ustr.h.

Referenced by StringToArgv().

Function Documentation

char* CleanupLogMsg ( const char * msg )

Clean up the log message for the server and put the good line feeds

Parameters:
msg Message to be cleaned
Returns:
The cleaned message
Todo:
mac : ISO conversion
Definition at line 70 of file ustr.cpp.

References CStaticAllocT< T >::AdjustSize().

Referenced by CvsCmdCommit(), CvsCmdImportModule(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), and CGraphView::OnGraphSetstate().

00071 {
00072     static CStaticAllocT<char> buf;
00073
00074     size_t len = strlen(msg);
00075     buf.AdjustSize(len + 1);
00076
00077     char* tmp = buf;
00078     char c;
00079
00080
00081     while( (c = *msg++) != '\0' )
00082     {
00083 #ifdef WIN32
00084         if(c == '\r')
00085             continue;
00086 #endif /* WIN32 */
00087 #ifdef TARGET_OS_MAC
00088         if(c == '\r')
00089             c = '\n';
00090 #endif /* TARGET_OS_MAC */
00091         *tmp++ = c;
00092     }
00093
00094     *tmp++ = '\0';
00095
00096     return buf;
00097 }

Here is the call graph for this function:

void FlatenSubFolders ( UStr & tmpf )

Removes folder separators by replacing them with dots so that temporary file could be created without creating matching subfolders in the temporary file folder

Parameters:
tmpf File with subfolder
Returns:
true on success, false otherwise
Note:
Windows client may provide file names pointing into subfolders
Definition at line 401 of file ustr.cpp.

References UStr::replace().

Referenced by CvsCmdAnnotate(), and CvsCmdDiff().

00402 {
00403     tmpf.replace( kPathDelimiter, '.');
00404 }

Here is the call graph for this function:

bool GetEnvValue | ( | const char * | cmd,
 |  | const char * | key,
 |  | UStr & | value
 | ) |

Parse a command like 'user=whohost=cvs'

Parameters:
cmd | Command
key | Key
value | Return value
Returns:
true on success, false otherwise
Definition at line 289 of file ustr.cpp.

References UStr::set().

Referenced by CompatGetPassword().

00290 {
00291     const char* tmp = strstr(cmd, key);
00292     if( tmp == 0L )
00293         return false;
00294
00295     tmp = strchr(tmp, '=');
00296     if( tmp == 0L )
00297         return false;
00298
00299     tmp++;
00300
00301     const char* tmp2 = strchr(tmp, '&');
00302     if( tmp2 == 0L )
00303         value = tmp;
00304     else
00305         value.set(tmp, tmp2 - tmp);
00306
00307     return true;
00308 }

Here is the call graph for this function:

void GetExtension | ( | const char * | file,
 |  | UStr & | base,
 |  | UStr & | ext
 | ) |

Extract the extension from the filename

Parameters:
file | File name to extract extension from
base | Return the base of the filename
ext | Return the file's extension
Definition at line 265 of file ustr.cpp.

References UStr::substr().

Referenced by CvsCmdAnnotate(), CvsCmdDiff(), getSettingName(), and CGraphView::RetrieveSel().

00266 {
00267     const char* tmp = strrchr(file, '.');
00268
00269     if( tmp == 0L )
00270     {
00271         ext = "";
00272         base = file;
00273     }
00274     else
00275     {
00276         ext = tmp + 1;
00277 //      UStr(file).substr( 0, tmp - file, base); // strange ??
00278         base = UStr(file).substr( 0, tmp - file); // strange ??
00279     }
00280 }

Here is the call graph for this function:

bool MakeTmpFile | ( | UStr & | file,
 |  | const char * | prefix,
 |  | const char * | extension,
 |  | bool | create
 | ) |

Find a unique name for a temporary file

Parameters:
file | Return temporary file name
prefix | Prefix of the filename
extension | Extension of the filename
create | Set to true to create the file
Returns:
true on success, false otherwise
Definition at line 158 of file ustr.cpp.

References _i18n, cvs_err(), UStr::endsWith(), err, getenv, MacGetTempFolder(), MAX_PATH, NormalizeFileName(), stat::st_mode, stat, and UFSSpec.

Referenced by CompatGetEditorMsg(), and launchCVS().

00159 {
00160     static int count = 0;
00161
00162     UStr tmpPath;
00163     UStr ext;
00164     UStr prf;
00165
00166     if( extension != 0L && extension[0] != '\0' )
00167     {
00168         if( extension[0] != '.' )
00169             ext = ".";
00170
00171         ext << extension;
00172     }
00173
00174     if( prefix != 0L && prefix[0] != '\0' )
00175     {
00176         prf = prefix;
00177     }
00178     else
00179     {
00180         prf = "cvsgui";
00181     }
00182
00183 #ifdef WIN32
00184     char* ptr;
00185     ptr = getenv(_T("TMP"));
00186     if( ptr != 0L && _access(ptr, 0) != -1 )
00187     {
00188         tmpPath = ptr;
00189     }
00190     else
00191     {
00192         tmpPath = ".";
00193     }
00194 #endif /* !WIN32 */
00195 #ifdef TARGET_OS_MAC
00196     UFSSpec theFolder;
00197     OSErr err;
00198
00199     if( (err = MacGetTempFolder(theFolder, tmpPath)) != noErr )
00200     {
00201         cvs_err(_i18n("Unable to locate the preferences folder (error %d) !\n"), err);
00202         return 0L;
00203     }
00204 #endif /* !TARGET_OS_MAC */
00205 #if qUnix
00206     tmpPath = "/tmp";
00207 #endif
00208
00209     struct stat sb;
00210     if( stat(tmpPath, &sb) == -1 || !S_ISDIR(sb.st_mode) )
00211     {
00212         cvs_err(_i18n("Unable to access '%s' (error %d) !\n"), (const char*)tmpPath, errno);
00213         return false;
00214     }
00215
00216     if( !tmpPath.endsWith(kPathDelimiter) )
00217         tmpPath << kPathDelimiter;
00218
00219     int maxtry = 10000;
00220     while( true )
00221     {
00222         UStr name;
00223
00224         {
00225             char filename[MAX_PATH];
00226
00227             sprintf(filename, "%s%d%s", (const char*)prf, count++, (const char*)ext);
00228             name = filename;
00229         }
00230
00231         NormalizeFileName(name);
00232         file = tmpPath;
00233         file << name;
00234
00235         if( stat(file, &sb) == -1 && errno == ENOENT )
00236         {
00237             if( create )
00238             {
00239                 FILE* stream = fopen(file, "w");
00240                 if( stream )
00241                 {
00242                     fclose(stream);
00243                 }
00244             }
00245
00246             return true;
00247         }
00248
00249         if( maxtry-- == 0 )
00250         {
00251             cvs_err(_i18n("Time out to access '%s' !\n"), (const char*)tmpPath);
00252             break;
00253         }
00254     }
00255
00256     return false;
00257 }

Here is the call graph for this function:

UStr& NormalizeFileName ( UStr & fileName )

Normalize given file name

Parameters:
fileName Return normalized file name
Returns:
Normalized file name reference
Definition at line 425 of file ustr.cpp.

References UStr::replace().

Referenced by AskCreatePersistentSettings(), and MakeTmpFile().

00426 {
00427     fileName.replace('*', '_');
00428     fileName.replace('?', '_');
00429     fileName.replace(':', '_');
00430     fileName.replace('/', '_');
00431     fileName.replace('\\', '_');
00432     fileName.replace('"', '_');
00433     fileName.replace('$', '_');
00434
00435     return fileName;
00436 }

Here is the call graph for this function:

bool SplitPath | ( | const char * | dir,
 |  | UStr & | uppath,
 |  | UStr & | folder,
 |  | bool | dontSkipDelimiter
 | ) |

Split the path into the up-directory and the folder

Parameters:
dir | Path to be split
uppath | Return up-directory
folder | Return folder or file
dontSkipDelimiter | Set to true to prevent skipping the delimiter if the path to be split ends with one
Returns:
true on success, false otherwise
Note:
Passing NULL is considered an error, passing empty string returns true
Definition at line 108 of file ustr.cpp.

References MAX_PATH.

Referenced by BrowseForFile(), BrowserGetDirectory(), BrowserGetMultiFiles(), BrowserGetSaveasFile(), CompatGetCheckout(), CompatGetEditorMsg(), CompatGetImport(), CSaveSettingsDlg::CSaveSettingsDlg(), CvsCmdAdd(), CvsCmdRelease(), CMfFileDialog::DoModal(), CGraphView::FileAction(), getLoc(), CTCLBrowserEnt::GetNormalized(), getSettingName(), IsCvsDirectory(), LaunchEditor(), LaunchHandler(), LaunchItemListCommand(), LaunchViewer(), UCvsFolders::OnCmdMacrosSel(), UCvsFiles::OnCmdUpone(), CWincvsApp::OnHelpCvs(), CWinCvsBrowser::OnUpdateMacro(), CGraphView::SaveSel(), and CHistComboBoxEx::SetIcon().

00109 {
00110     char newDir[MAX_PATH * 2] = "";
00111     char oldDir[MAX_PATH * 2] = "";
00112     char newFile[MAX_PATH] = "";
00113
00114     if( !dir )
00115     {
00116         // Null pointer
00117         return false;
00118     }
00119
00120     int dirLen = strlen(dir);
00121     if( dirLen > 0 )
00122     {
00123         strcpy(oldDir, dir);
00124
00125         if( !dontSkipDelimiter && (dir[dirLen - 1] == kPathDelimiter) )
00126         {
00127             oldDir[dirLen - 1] = '\0';
00128             --dirLen;
00129         }
00130
00131         const char* tmp = oldDir;
00132         const char* prev = oldDir;
00133
00134         while( (tmp = strchr(tmp, kPathDelimiter)) != 0L )
00135         {
00136             prev = ++tmp;
00137         }
00138
00139         strcpy(newDir, oldDir);
00140         newDir[prev - oldDir] = '\0';
00141         strcpy(newFile, prev);
00142     }
00143
00144     uppath = newDir;
00145     folder = newFile;
00146
00147     return true;
00148 }

int StringToArgv | ( | const char * | cmdLine,
 |  | char ** | argv
 | ) |

Convert a command line (possibly quoted) into regular argc, argv arguments

Parameters:
cmdLine | Command line
argv | Return argv arguments
Returns:
The count of arguments (argc)
Definition at line 316 of file ustr.cpp.

References MAX_ARGS, and MAX_CMD_LEN.

Referenced by CvsCmdCommandLine().

00317 {
00318     int argc = 0;
00319
00320     char Quote = '\0';              /*  Contains the quote character if we are inside "" or '', or \0 otherwise */
00321     const char* walker1 = cmdLine;  /*  walker1 traverses the original command line */
00322     char* walker2;                  /*  walker2 traverses the parsed copy of the commandline */
00323     char theChar;                   /*  theChar is the character we are currently parsing */
00324     char arguments[MAX_CMD_LEN];    /*  Will contain a parsed copy of the command line */
00325
00326     /* Copy into arguments */
00327     walker2 = arguments;
00328
00329     /* Parse command line to \0 */
00330     while( (theChar = *walker1++) != '\0' )
00331     {
00332         /* Skip leading space before an argument */
00333         if( theChar == ' ' )
00334             continue;
00335
00336         /* Set argv to point to the space where we copy the next argument */
00337         argv [argc++] = walker2;
00338
00339         /* If we filled argv, skip the rest */
00340         if( argc > MAX_ARGS)
00341         {
00342             argc--;
00343             break;
00344         }
00345
00346         do
00347         {
00348             /* Parse an argument skip \s */
00349             if( theChar == '\\' && *walker1++ )
00350             {
00351                 theChar = *walker1++;
00352             }
00353             else
00354             {
00355                 /* When we find a quote... */
00356                 if( theChar == '"' || theChar == '\'' )
00357                 {
00358                     /* If we are not inside quotes already, */
00359                     if( Quote == '\0' )
00360                     {
00361                         /* Remember we are inside quotes now */
00362                         Quote = theChar;
00363
00364                         /* Go to the next character */
00365                         continue;
00366                     }
00367
00368                     /* If we are already inside that kind of quotes */
00369                     if( theChar == Quote )
00370                     {
00371                         /* Close quotes */
00372                         Quote = '\0';
00373
00374                         /* Go to the next character */
00375                         continue;
00376                     }
00377                 }
00378             }
00379
00380             /* Copy the character into args */
00381             *walker2++ = theChar;
00382
00383             /* Repeat until we reach the end of arguments or we reach a space that is not inside quotes */
00384         }while( (*walker1 != '\0') && (((theChar = *walker1++) != ' ') || (Quote != '\0')) );
00385
00386         /* Null-terminate the last argument */
00387         *walker2++ = 0;
00388     }
00389
00390     return argc;
00391 }

int StrOrdICmp | ( | const char * | s1,
 |  | const char * | s2
 | ) |

Compare strings without regard to case but assuring the order if only case differs

Parameters:
s1 | First string
s2 | Second string
Returns:
-1, 0 and 1 as appropriate
Definition at line 462 of file ustr.cpp.

Referenced by KoPathColumn::Compare(), and KoNameColumn::Compare().

00463 {
00464     if( int rc = stricmp(s1, s2) )
00465         return rc;
00466
00467     return strcmp(s1, s2);
00468 }

int StrPathCmp | ( | const char * | s1,
 |  | const char * | s2
 | ) |

Compare paths ignoring trailing path delimiter

Parameters:
s1 | First path
s2 | Second path
Returns:
-1, 0 and 1 as appropriate
Definition at line 476 of file ustr.cpp.

References CStr.

Referenced by FindBestLastCvsroot(), and FindBestLastModuleName().

00477 {
00478     CStr str1(s1);
00479     CStr str2(s2);
00480
00481     str1.rtrim(kPathDelimiter);
00482     str2.rtrim(kPathDelimiter);
00483
00484 #ifdef WIN32
00485     return stricmp(str1.c_str(), str2.c_str());
00486 #else
00487     return strcmp(str1.c_str(), str2.c_str());
00488 #endif
00489 }

void StrSafeCopy | ( | char * | buffer,
 |  | const char * | value,
 |  | const int | bufferSize
 | ) |

Make a "safe" copy of the string

Parameters:
buffer | Destination
value | Source
bufferSize | Destination buffer size
Definition at line 444 of file ustr.cpp.

Referenced by KoConflictColumn::GetText(), KoDateColumn::GetText(), KoTagColumn::GetText(), KoStateColumn::GetText(), KoEncodingColumn::GetText(), KoOptionColumn::GetText(), KoRevisionColumn::GetText(), KoPathColumn::GetText(), KoExtColumn::GetText(), and KoNameColumn::GetText().

00445 {
00446     if( value && *value )
00447     {
00448         strncpy(buffer, value, bufferSize);
00449     }
00450     else
00451     {
00452         *buffer = 0;
00453     }
00454 }

Variable Documentation

const char kPathDelimiter = '\\' [static]

Definition at line 38 of file ustr.h.

Generated on Sat Aug 7 22:47:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/utoolbar.cpp File Reference

rf/utoolbar.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <float.h>
#include "utoolbar.h"
#include "uconsole.h"
#include <vector>
#include <map>

Include dependency graph for utoolbar.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | TbEntry
struct | AREF
class | aref
class | awidget
class | TbEntryButton
class | TbEntryChkButton
class | TbEntryDropDown
class | TbEntrySeparator
class | WININFO
class | CColorMenu

Defines

#define | NEW new

Enumerations

enum tbeKind {
tbeDropDown,
tbeButton,
tbeSeparator
}

Define Documentation

#define NEW new

Definition at line 54 of file utoolbar.cpp.

Enumeration Type Documentation

enum tbeKind

Enumeration values:
tbeDropDown
tbeButton
tbeSeparator
Definition at line 72 of file utoolbar.cpp.
00073 {
00074     tbeDropDown,
00075     tbeButton,
00076     tbeSeparator
00077 } tbeKind;

Generated on Sat Aug 7 22:47:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/utoolbar.h File Reference

rf/utoolbar.h File Reference

#include "uwidget.h"

Include dependency graph for utoolbar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CDynToolBar
class | UToolbar

Generated on Sat Aug 7 22:47:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uwidget.cpp File Reference

rf/uwidget.cpp File Reference

#include "stdafx.h"
#include <stdio.h>
#include "uwidget.h"
#include "uconsole.h"
#include "udraw.h"
#include "umenu.h"
#include "SmartComboBox.h"
#include "PseudoDlg.h"
#include "PseudoButton.h"

Include dependency graph for uwidget.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define NEW new

Define Documentation

#define NEW new

Definition at line 80 of file uwidget.cpp.

Generated on Sat Aug 7 22:47:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uwidget.h File Reference

rf/uwidget.h File Reference

#include "umain.h"
#include "udraw.h"
#include "ustr.h"
#include <vector>
#include <map>

Include dependency graph for uwidget.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | UTimer
used by the UWidget class to implement timers/repeaters. More...
struct | UColor
portable color definition More...
class | UWidget
This is the pseudo widget class. More...

Defines

#define | kUMainWidget 0
kUMainWidget the command associated with the main widget.

Functions

LRESULT | UWinPseudoWindowProc (CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam)

Define Documentation

#define kUMainWidget 0

kUMainWidget the command associated with the main widget.

Definition at line 89 of file uwidget.h.

Referenced by AboutDialog(), UWidget::AddPage(), AskCreatePersistentSettings(), LPseudoWinAttachment::CheckWindowSize(), CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetDiff(), CompatGetImport(), CompatGetLog(), CompatGetModuleListItem(), CompatGetPassword(), CompatGetPrefs(), CompatGetRtag(), CompatGetSelectionDetails(), CompatGetTag(), CompatGetTagListItem(), CompatGetUpdate(), CompatImportFilter(), CvsLogParse(), UCvsFolders::DeleteAllItems(), UCvsFiles::DisableGeneric(), CPseudoDlg::DoDataExchange(), UPromptMessage::DoDataExchange(), UWidget::DoModal(), UWidget::EndDialog(), TBrowserFill::ExitDirectory(), TBrowserFillDummy::ExitDirectory(), UCvsConsole::FeedThisLine(), UCvsFolders::GetItemByLocation(), UCvsFiles::HideColumns(), TViewFill::InitItem(), macpp_getattachwindow(), UCvsFiles::OnCmdEditsel(), UCvsFiles::OnCmdEditseldef(), UCvsFolders::OnCmdExplore(), UCvsFiles::OnCmdExplore(), UCvsFolders::OnCmdMacrosSel(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIEditseldef(), UCvsFolders::OnCmdUIExplore(), UCvsFiles::OnCmdUIExplore(), UCvsFiles::OnCmdUIGraph(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), UCvsFiles::OnCmdUIRelease(), UCvsFiles::OnCmdUIRmv(), UCvsFiles::OnCmdUITrash(), UCvsFiles::OnCmdUIUpdate(), UCvsGraph::OnCreate(), UCvsFiles::OnCreate(), UCvsConsole::OnCreate(), UCvsFiles::OnDblClick(), TBrowserFill::OnDirectory(), UCvsConsole::OnEraseAll(), UWidget::OnInitWidget(), UWidget::OnListAddColumns(), UWidget::OnListResetAll(), UWidget::OnListSetColWidth(), UCvsFiles::OnMacroSel(), UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), UToolbar::OnTbDropDown(), UToolbar::OnTbInit(), UToolbar::OnTbSeparator(), UCvsFolders::OnTreeExpanding(), UCvsFolders::OnTreeSelecting(), UCvsFolders::OnUpdateGeneric(), UMenu::OnUpdateUI(), UMacAppMenu::OnUpdateUI(), UCvsConsole::OutColor(), UCvsFolders::ProcessSelectionCommand(), UCvsFiles::ProcessSelectionCommand(), PromptEditMessage(), UCvsFolders::ResetBrowser(), UCvsFolders::ResetView(), UCvsFiles::ResetView(), UCvsFiles::Resort(), UCvsFolders::RetrievePath(), UCvsFiles::Search(), UCvsApp::SetStatusBarText(), UCvsFiles::ShowColumns(), UCvsFolders::StepToLocation(), UCvsFolders::StoreExpanded(), UCreate_pixmap(), UMenuAddPulldown(), UWaitCursor::UWaitCursor(), CPseudoDlg::~CPseudoDlg(), and UWaitCursor::~UWaitCursor().

Function Documentation

LRESULT UWinPseudoWindowProc | ( | CWnd * | wnd,
 |  | UWidget * | wid,
 |  | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) |

Definition at line 212 of file PseudoDlg.cpp.

References UWidget::DoValidUI(), EV_BTNDBLDOWN, EV_BTNDOWN, EV_BTNUP, EV_CMD, EV_COMBO_SEL, EV_EDITCHANGE, EV_KEYDOWN, EV_LIST_SELECTING, EV_MMOVE, EV_RESIZE, EV_SCROLLCHANGE, findIdForWnd(), UWidget::GetWidget(), UWidget::GetWidgets(), UCmdTarget::GetWidID(), IS_PSEUDO_CTL, UWidget::m_noDispatch, NULL, UEventSendMessage(), UMAKEINT, UWinToUMod(), and WINCTL_to_UCMD.

Referenced by CPseudoDlg::WindowProc().

00213 {
00214     bool sentOne = false;
00215
00216     if(wid == 0L)
00217         return 1;
00218
00219     if (message == WM_COMMAND)
00220     {
00221         UINT nID = LOWORD(wParam);
00222         if(!IS_PSEUDO_CTL(nID))
00223             return 1;
00224
00225         int nCode = HIWORD(wParam);
00226         HWND hWndCtrl = (HWND)lParam;
00227         switch(nCode)
00228         {
00229         case BN_CLICKED:
00230             UEventSendMessage(wid->GetWidID(), EV_CMD, WINCTL_to_UCMD(nID), 0L);
00231             sentOne = true;
00232             break;
00233         case CBN_SELCHANGE:
00234         {
00235             ASSERT(::IsWindow(hWndCtrl));
00236             int sel = (int)::SendMessage(hWndCtrl, CB_GETCURSEL, 0, 0);
00237             const char *txt = 0L;
00238             char buf[1024] = {'\0'};
00239             if(sel != -1 && (int)::SendMessage(hWndCtrl, CB_GETLBTEXT, sel, (LPARAM)buf) != CB_ERR)
00240                 txt = buf;
00241             if(strcmp(buf, "-") != 0) // separator
00242                 UEventSendMessage(wid->GetWidID(), EV_COMBO_SEL,
00243                     UMAKEINT(WINCTL_to_UCMD(nID), sel), (void *)txt);
00244             sentOne = true;
00245             break;
00246         }
00247         case EN_CHANGE:
00248             if(wid->m_noDispatch)
00249                 break;
00250
00251             ASSERT(::IsWindow(hWndCtrl));
00252             UEventSendMessage(wid->GetWidID(), EV_EDITCHANGE,
00253                 WINCTL_to_UCMD(nID), 0L);
00254             break;
00255         }
00256     }
00257     else if (message == WM_NOTIFY)
00258     {
00259         NMHDR* pNMHDR = (NMHDR*)lParam;
00260         if (pNMHDR->hwndFrom != NULL)
00261         {
00262             UINT nID = _AfxGetDlgCtrlID(pNMHDR->hwndFrom);
00263             int nCode = pNMHDR->code;
00264             if(!IS_PSEUDO_CTL(nID))
00265                 return 1;
00266
00267             switch(nCode)
00268             {
00269             case LVN_ITEMCHANGED:
00270                 NMLISTVIEW *state = (NMLISTVIEW *)pNMHDR;
00271
00272                 HWND wnd = state->hdr.hwndFrom;
00273                 ASSERT(::IsWindow(wnd));
00274
00275                 int id = state->hdr.idFrom;
00276                 std::map<int, void *>::const_iterator i = wid->GetWidgets().find(WINCTL_to_UCMD(id));
00277                 if(i != wid->GetWidgets().end())
00278                 {
00279                     CWnd *w = (CWnd *)(*i).second;
00280                     if(w->IsKindOf(RUNTIME_CLASS(CListCtrl)))
00281                     {
00282                         CListCtrl *list = (CListCtrl*)w;
00283                         CString s = list->GetItemText(state->iItem, 0);
00284
00285                         UEventSendMessage(wid->GetWidID(), EV_LIST_SELECTING,
00286                             UMAKEINT(WINCTL_to_UCMD(state->hdr.idFrom), state->iItem), (void *)(const char *)s);
00287                         sentOne = true;
00288                     }
00289                 }
00290                 break;
00291             }
00292         }
00293     }
00294     else if (message == WM_SIZE)
00295     {
00296         int id = findIdForWnd(wnd, wid);
00297         if(id != -1)
00298         {
00299             URECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
00300             UEventSendMessage(wid->GetWidID(), EV_RESIZE, id, &r);
00301             sentOne = true;
00302         }
00303     }
00304     else if (message == WM_MOUSEMOVE)
00305     {
00306         int id = findIdForWnd(wnd, wid);
00307         if(id != -1)
00308         {
00309             UEventSendMessage(wid->GetWidID(), EV_MMOVE, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00310                 (void *)UWinToUMod(wParam));
00311             sentOne = true;
00312         }
00313     }
00314     else if (message == WM_LBUTTONDOWN)
00315     {
00316         int id = findIdForWnd(wnd, wid);
00317         if(id != -1)
00318         {
00319             UEventSendMessage(wid->GetWidID(), EV_BTNDOWN, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00320                 (void *)UWinToUMod(wParam));
00321             sentOne = true;
00322         }
00323     }
00324     else if (message == WM_LBUTTONUP)
00325     {
00326         int id = findIdForWnd(wnd, wid);
00327         if(id != -1)
00328         {
00329             UEventSendMessage(wid->GetWidID(), EV_BTNUP, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00330                 (void *)UWinToUMod(wParam));
00331             sentOne = true;
00332         }
00333     }
00334     else if (message == WM_LBUTTONDBLCLK)
00335     {
00336         int id = findIdForWnd(wnd, wid);
00337         if(id != -1)
00338         {
00339             UEventSendMessage(wid->GetWidID(), EV_BTNDBLDOWN, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00340                 (void *)UWinToUMod(wParam));
00341             sentOne = true;
00342         }
00343     }
00344     else if (message == WM_KEYDOWN)
00345     {
00346         int id = findIdForWnd(wnd, wid);
00347         if(id != -1)
00348         {
00349             UEventSendMessage(wid->GetWidID(), EV_KEYDOWN, wParam, 0L);
00350             sentOne = true;
00351         }
00352     }
00353     else if (message == WM_HSCROLL)
00354     {
00355         HWND hwndScrollBar = (HWND) lParam;       // handle to scroll bar
00356         int nID = ::GetDlgCtrlID(hwndScrollBar);
00357         if(!IS_PSEUDO_CTL(nID))
00358             return 1;
00359
00360         int cmd = WINCTL_to_UCMD(nID);
00361         CWnd *wnds = (CWnd *)wid->GetWidget(cmd);
00362         if(wnds == 0L || !wnds->IsKindOf(RUNTIME_CLASS(CScrollBar)))
00363             return 1;
00364
00365         CScrollBar *scroll = (CScrollBar *)wnds;
00366
00367         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
00368         int nPos;
00369         if(nScrollCode == SB_THUMBPOSITION || nScrollCode == SB_THUMBTRACK)
00370         {
00371             nPos = (short int) HIWORD(wParam);   // scroll box position
00372
00373             if(nScrollCode == SB_THUMBPOSITION)
00374                 scroll->SetScrollPos(nPos);
00375         }
00376         else
00377         {
00378             SCROLLINFO info;
00379             VERIFY(scroll->GetScrollInfo(&info));
00380             nPos = info.nPos;
00381
00382             switch(nScrollCode)
00383             {
00384             case SB_ENDSCROLL:
00385                 return 1;
00386                 break;
00387             case SB_LINELEFT:
00388                 nPos -= 1;
00389                 break;
00390             case SB_LINERIGHT:
00391                 nPos += 1;
00392                 break;
00393             case SB_PAGELEFT:
00394                 nPos -= info.nPage;
00395                 break;
00396             case SB_PAGERIGHT:
00397                 nPos += info.nPage;
00398                 break;
00399             case SB_LEFT:
00400                 nPos = info.nMin;
00401                 break;
00402             case SB_RIGHT:
00403                 nPos = info.nMax;
00404                 break;
00405             }
00406
00407             scroll->SetScrollPos(nPos);
00408         }
00409
00410         UEventSendMessage(wid->GetWidID(), EV_SCROLLCHANGE, WINCTL_to_UCMD(nID),
00411             (void *)nPos);
00412         sentOne = true;
00413     }
00414     else if (message == WM_VSCROLL)
00415     {
00416         HWND hwndScrollBar = (HWND) lParam;       // handle to scroll bar
00417         int nID = ::GetDlgCtrlID(hwndScrollBar);
00418         if(!IS_PSEUDO_CTL(nID))
00419             return 1;
00420
00421         int cmd = WINCTL_to_UCMD(nID);
00422         CWnd *wnds = (CWnd *)wid->GetWidget(cmd);
00423         if(wnds == 0L || !wnds->IsKindOf(RUNTIME_CLASS(CScrollBar)))
00424             return 1;
00425
00426         CScrollBar *scroll = (CScrollBar *)wnds;
00427
00428         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
00429         int nPos;
00430         if(nScrollCode == SB_THUMBPOSITION || nScrollCode == SB_THUMBTRACK)
00431         {
00432             nPos = (short int) HIWORD(wParam);   // scroll box position
00433
00434             if(nScrollCode == SB_THUMBPOSITION)
00435                 scroll->SetScrollPos(nPos);
00436         }
00437         else
00438         {
00439             SCROLLINFO info;
00440             VERIFY(scroll->GetScrollInfo(&info));
00441             nPos = info.nPos;
00442
00443             switch(nScrollCode)
00444             {
00445             case SB_ENDSCROLL:
00446                 return 1;
00447                 break;
00448             case SB_LINEUP:
00449                 nPos -= 1;
00450                 break;
00451             case SB_LINEDOWN:
00452                 nPos += 1;
00453                 break;
00454             case SB_PAGEUP:
00455                 nPos -= info.nPage;
00456                 break;
00457             case SB_PAGEDOWN:
00458                 nPos += info.nPage;
00459                 break;
00460             case SB_TOP:
00461                 nPos = info.nMin;
00462                 break;
00463             case SB_BOTTOM:
00464                 nPos = info.nMax;
00465                 break;
00466             }
00467
00468             if(nPos > info.nMax)
00469                 nPos = info.nMax;
00470             else if(nPos < info.nMin)
00471                 nPos = info.nMin;
00472             scroll->SetScrollPos(nPos);
00473         }
00474
00475         UEventSendMessage(wid->GetWidID(), EV_SCROLLCHANGE, WINCTL_to_UCMD(nID),
00476             (void *)nPos);
00477         sentOne = true;
00478     }
00479
00480     if(sentOne)
00481         UWidget::DoValidUI(false);
00482
00483     return 1;
00484 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:47:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/gtk/stdafx.h File Reference

rf/support/gtk/stdafx.h File Reference

#include <gtk/gtk.h>

Include dependency graph for stdafx.h:

Include dependency graph

Go to the source code of this file.

Defines

#define | UASSERT g_assert

Functions

GtkLabel * | getLabelFromContainer (GtkContainer *w)

Define Documentation

#define UASSERT g_assert

Definition at line 7 of file stdafx.h.

Referenced by UCmdUI::Check(), UAppConsole(), UEventNotifyMessage(), UEventSendMessage(), UEventSendMessageExt(), UMenuAddButton(), UMenuAddSeparator(), UMenuCount(), UMenuDelete(), UMenuDeleteByCmd(), and TPseudoRotateIconButton::WriteFields().

Function Documentation

GtkLabel* getLabelFromContainer ( GtkContainer * w )

Referenced by UWidget::OnGetText(), UWidget::OnSetText(), and UCmdUI::SetText().

Generated on Sat Aug 7 22:46:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/macapp/stdafx.h File Reference

rf/support/macapp/stdafx.h File Reference

#include "MacAppTypes.h"

Include dependency graph for stdafx.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | qMacAPP 1
#define | qRangeCheck 0
#define | qReleaseBuild 1
#define | qRelease qReleaseBuild
#define | wantDebugging qDebug
#define | UASSERT(cond)
#define | UTHROW(err) throw CException_AC(mFulErr)

Functions

char * | strdup (const char *str)

Define Documentation

#define qMacAPP 1

Definition at line 4 of file stdafx.h.

#define qRangeCheck 0

Definition at line 10 of file stdafx.h.

#define qRelease qReleaseBuild

Definition at line 15 of file stdafx.h.

#define qReleaseBuild 1

Definition at line 11 of file stdafx.h.

#define UASSERT ( cond )

Definition at line 25 of file stdafx.h.

#define UTHROW ( err ) throw CException_AC(mFulErr)

Definition at line 27 of file stdafx.h.

Referenced by UStr::operator<<(), UStr::operator=(), and UPStr::operator=().

#define wantDebugging qDebug

Definition at line 17 of file stdafx.h.

Function Documentation

char* strdup ( const char * str )

Definition at line 17 of file UPseudoSupport.cpp.

00018 {
00019     if(str == 0L)
00020         return 0L;
00021
00022     size_t len = strlen(str);
00023     char *res = (char *)malloc((len + 1) * sizeof(char));
00024     if(res == 0L)
00025         throw CException_AC(mFulErr);
00026     strcpy(res, str);
00027     return res;
00028 }

Generated on Sat Aug 7 22:46:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/macapp/UPseudoSupport.cpp File Reference

rf/support/macapp/UPseudoSupport.cpp File Reference

#include "stdafx.h"
#include <stdlib.h>
#include <Errors.h>
#include "UPseudoSupport.h"
#include "UPopup.h"
#include "UDialogTEView.h"
#include "UEditText.h"
#include "UWindow.h"
#include "USlider.h"
#include "uconsole.h"

Include dependency graph for UPseudoSupport.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CDummyClass
struct | CViewInfo

Defines

#define | MA_CHECK(cond) Assertion_AC(cond, #cond)
#define | Inherited TBehavior
#define | Inherited TTextListView
#define | Inherited TView
#define | Inherited TEditText
#define | Inherited TBehavior
#define | Inherited TIconButton
#define | Inherited TPopup
#define | Inherited TIconPopup
#define | Inherited TScrollBar
#define | Inherited TPseudoIconButton
#define | Inherited TIconCheckBox
#define | Inherited TAdorner
#define | OFFSET 40

Enumerations

enum {
kHierarchicalMin = 0,
kHierarchicalMax = 235
}

Functions

char * | strdup (const char *str)
MA_DEFINE_CLASS_M1 (TPseudoWinBehavior, TBehavior)
MA_DEFINE_CLASS_M0 (TPseudoTextListView)
MA_DEFINE_CLASS_M1 (TPseudoCustomView, TView)
MA_DEFINE_CLASS_M1 (TPseudoDoubleNumberText, TEditText)
void | NumberToString_US (double n, UStr &s, int decimalPlaces)
MA_DEFINE_CLASS_M1 (TPseudoAppBehavior, TBehavior)
MA_DEFINE_CLASS_M1 (TPseudoIconButton, TIconButton)
MA_DEFINE_CLASS_M1 (TBuggyPopup, TPopup)
MA_DEFINE_CLASS_M1 (TPseudoIconPopup, TIconPopup)
MA_DEFINE_CLASS_M1 (TPseudoScrollBar, TScrollBar)
MA_DEFINE_CLASS_M1 (TPseudoRotateIconButton, TPseudoIconButton)
MA_DEFINE_CLASS_M1 (TPseudoIconCheckBox, TIconCheckBox)
MA_DEFINE_CLASS_M1 (TPseudoWinAdorner, TAdorner)
void | extractInfos (std::vector< CViewInfo > &infos, std::vector< TPopup * > &popups, TView *view)
bool | InBetweenVSide (const CViewRect &popPos, const CViewRect &pos)
int | findmostright (TPopup *popup, const std::vector< CViewInfo > &infos)
void | macapp_workaround_adlib_bug (TView *view)

Variables

CDummyClass sDummyStarter

Define Documentation

#define Inherited TAdorner

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TIconCheckBox

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TPseudoIconButton

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TScrollBar

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TIconPopup

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TPopup

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TIconButton

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TBehavior

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TEditText

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TView

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TTextListView

Definition at line 728 of file UPseudoSupport.cpp.

#define Inherited TBehavior

Definition at line 728 of file UPseudoSupport.cpp.

#define MA_CHECK ( cond ) Assertion_AC(cond, #cond)

Definition at line 15 of file UPseudoSupport.cpp.

Referenced by TPseudoTextListView::DoMouseCommand_SelectCells(), TPseudoTextListView::GetItemText(), and TPseudoTextListView::InsStringBefore().

#define OFFSET 40

Referenced by macapp_workaround_adlib_bug().

Enumeration Type Documentation

anonymous enum

Enumeration values:
kHierarchicalMin
kHierarchicalMax
Definition at line 783 of file UPseudoSupport.cpp.
00784 {
00785     kHierarchicalMin = 0,
00786     kHierarchicalMax = 235
00787 };

Function Documentation

void extractInfos | ( | std::vector< CViewInfo > & | infos,
 |  | std::vector< TPopup * > & | popups,
 |  | TView * | view
 | ) | [static]

Definition at line 893 of file UPseudoSupport.cpp.

References CViewInfo::view.

Referenced by macapp_workaround_adlib_bug().

00894 {
00895     if(view == 0L)
00896         return;
00897
00898     if(MA_MEMBER(view, TPopup) && !MA_MEMBER(view, TIconPopup))
00899     {
00900         popups.push_back((TPopup *)view);
00901     }
00902     else
00903     {
00904         CViewInfo info;
00905         info.view = view;
00906         infos.push_back(info);
00907     }
00908
00909     extractInfos(infos, popups, view->GetNextView());
00910     extractInfos(infos, popups, view->GetSubView());
00911 }

int findmostright | ( | TPopup * | popup,
 |  | const std::vector< CViewInfo > & | infos
 | ) | [static]

Definition at line 921 of file UPseudoSupport.cpp.

References InBetweenVSide().

Referenced by macapp_workaround_adlib_bug().

00922 {
00923     int most_right = popup->GetWindow()->GetExtent().right;
00924     CViewRect popPos = popup->GetFrame();
00925     popPos = popup->GetSuperView()->LocalToRootView(popPos);
00926
00927     std::vector<CViewInfo>::const_iterator i;
00928     for(i = infos.begin(); i != infos.end(); ++i)
00929     {
00930         TView *view = (*i).view;
00931
00932         CViewRect pos = view->GetFrame();
00933         pos = view->GetSuperView()->LocalToRootView(pos);
00934         if(pos.left > popPos.right && InBetweenVSide(popPos, pos))
00935         {
00936             // the top/bottom popup is inside the top/bottom view
00937             if(pos.left < most_right)
00938                 most_right = pos.left;
00939         }
00940     }
00941
00942     return most_right;
00943 }

Here is the call graph for this function:

bool InBetweenVSide | ( | const CViewRect & | popPos,
 |  | const CViewRect & | pos
 | ) | [static]

Definition at line 913 of file UPseudoSupport.cpp.

Referenced by findmostright().

00914 {
00915     return (popPos.top >= pos.top && popPos.top <= pos.bottom) ||
00916         (popPos.bottom >= pos.top && popPos.bottom <= pos.bottom) ||
00917          (pos.top >= popPos.top && pos.top <= popPos.bottom) ||
00918         (pos.bottom >= popPos.top && pos.bottom <= popPos.bottom);
00919 }

MA_DEFINE_CLASS_M0 ( TPseudoTextListView )

MA_DEFINE_CLASS_M1 | ( | TPseudoWinAdorner | ,
 |  | TAdorner |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoIconCheckBox | ,
 |  | TIconCheckBox |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoRotateIconButton | ,
 |  | TPseudoIconButton |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoScrollBar | ,
 |  | TScrollBar |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoIconPopup | ,
 |  | TIconPopup |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TBuggyPopup | ,
 |  | TPopup |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoIconButton | ,
 |  | TIconButton |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoAppBehavior | ,
 |  | TBehavior |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoDoubleNumberText | ,
 |  | TEditText |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoCustomView | ,
 |  | TView |
 | ) |

MA_DEFINE_CLASS_M1 | ( | TPseudoWinBehavior | ,
 |  | TBehavior |
 | ) |

void macapp_workaround_adlib_bug ( TView * view )

Definition at line 945 of file UPseudoSupport.cpp.

References extractInfos(), findmostright(), and OFFSET.

00946 {
00947     std::vector<TPopup *> popups;
00948     std::vector<CViewInfo> infos;
00949     extractInfos(infos, popups, view->GetSubView());
00950 #   define OFFSET 40
00951
00952     std::vector<TPopup *>::iterator p;
00953     for(p = popups.begin(); p != popups.end(); ++p)
00954     {
00955         TPopup *popup = *p;
00956
00957         int most_right = findmostright(popup, infos);
00958         CViewRect oldPos = popup->GetFrame();
00959         oldPos = popup->GetSuperView()->LocalToRootView(oldPos);
00960         if(most_right > (oldPos.right + OFFSET))
00961         {
00962             oldPos.right = most_right - OFFSET;
00963             oldPos = popup->GetSuperView()->RootViewToLocal(oldPos);
00964             popup->SetFrame(oldPos, true);
00965         }
00966     }
00967 }

Here is the call graph for this function:

void NumberToString_US | ( | double | n,
 |  | UStr & | s,
 |  | int | decimalPlaces
 | ) | [static]

Definition at line 406 of file UPseudoSupport.cpp.

Referenced by TPseudoDoubleNumberText::SetValue().

00407 {
00408     char tmp[255];
00409     if(decimalPlaces > 0)
00410         sprintf(tmp, "%0.*f", decimalPlaces, n);
00411     else
00412         sprintf(tmp, "%ld", round(n));
00413     s = tmp;
00414 }

char* strdup ( const char * str )

Definition at line 17 of file UPseudoSupport.cpp.

References malloc.

Referenced by awidget::awidget(), CloneStr(), EntnodeFile::GetRelativePath(), CCustInvertTable::Initialize(), UWidget::OnComboAppend(), awidget::operator=(), and KoFilterMask::SetMask().

00018 {
00019     if(str == 0L)
00020         return 0L;
00021
00022     size_t len = strlen(str);
00023     char *res = (char *)malloc((len + 1) * sizeof(char));
00024     if(res == 0L)
00025         throw CException_AC(mFulErr);
00026     strcpy(res, str);
00027     return res;
00028 }

Variable Documentation

class CDummyClass sDummyStarter

Generated on Sat Aug 7 22:46:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/macapp/UPseudoSupport.h File Reference

rf/support/macapp/UPseudoSupport.h File Reference

#include "uwidget.h"
#include "umenu.h"
#include "UBehavior.h"
#include "UGridView.h"
#include "UEditText.h"
#include "UIconButton.h"
#include <vector>

Include dependency graph for UPseudoSupport.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | TBuggyPopup
class | TPseudoScrollBar
class | TPseudoIconPopup
class | TPseudoIconButton
class | TPseudoRotateIconButton
class | TPseudoIconCheckBox
class | UMacAppMenu
class | TPseudoAppBehavior
class | TPseudoWinBehavior
class | TPseudoWinAdorner
class | TPseudoCustomView
class | TPseudoTextListView
class | TPseudoDoubleNumberText

Functions

void | macapp_workaround_adlib_bug (TView *view)

Function Documentation

void macapp_workaround_adlib_bug ( TView * view )

Definition at line 945 of file UPseudoSupport.cpp.

References extractInfos(), findmostright(), and OFFSET.

00946 {
00947     std::vector<TPopup *> popups;
00948     std::vector<CViewInfo> infos;
00949     extractInfos(infos, popups, view->GetSubView());
00950 #   define OFFSET 40
00951
00952     std::vector<TPopup *>::iterator p;
00953     for(p = popups.begin(); p != popups.end(); ++p)
00954     {
00955         TPopup *popup = *p;
00956
00957         int most_right = findmostright(popup, infos);
00958         CViewRect oldPos = popup->GetFrame();
00959         oldPos = popup->GetSuperView()->LocalToRootView(oldPos);
00960         if(most_right > (oldPos.right + OFFSET))
00961         {
00962             oldPos.right = most_right - OFFSET;
00963             oldPos = popup->GetSuperView()->RootViewToLocal(oldPos);
00964             popup->SetFrame(oldPos, true);
00965         }
00966     }
00967 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/dib.c File Reference

rf/support/mfc/dib.c File Reference

#include <windows.h>
#include <windowsx.h>
#include "dib.h"

Include dependency graph for dib.c:

Include dependency graph

Go to the source code of this file.

Functions

WORD | DibNumColors (VOID FAR *pv)
WORD | DibGetPaletteSize (VOID FAR *pv)
VOID | DibCopyPalette (HBITMAP dst, HBITMAP src)
WORD | PaletteSize (VOID FAR *pv)
VOID | WriteMapFileHeaderandConvertFromDwordAlignToPacked (HFILE fh, LPBITMAPFILEHEADER pbf)
HBITMAP | CreateDIB (DWORD dwWidth, DWORD dwHeight, WORD wBitCount, HPALETTE hPal)
HANDLE | ReadDIBFile (HANDLE hFile)
HBITMAP | LoadDIB (LPSTR lpFileName)
BOOL | SaveBmpFromDDB (HDC hDC, HBITMAP hBmp, PSTR pszFileName)
BOOL | SaveDIB (HBITMAP hDib, LPSTR lpFileName)
HBITMAP | CopyScreenToBitmap (HWND win, LPRECT lpRect)
HBITMAP | DIBToBitmap (HBITMAP hDIB)
HANDLE | DDBtoDIB (HBITMAP hbm, WORD biBits, HPALETTE hPal)
HANDLE | ReadDIBRsrc (HINSTANCE hInst, HRSRC hRsrc)

Function Documentation

HBITMAP CopyScreenToBitmap | ( | HWND | win,
 |  | LPRECT | lpRect
 | ) |

Definition at line 848 of file dib.c.

References IsRectEmpty(), and NULL.

00849 {
00850     HDC         hScrDC, hMemDC;         /*  screen DC and memory DC */
00851     HBITMAP     hBitmap, hOldBitmap;    /*  handles to deice-dependent bitmaps */
00852     int         nX, nY, nX2, nY2;       /*  coordinates of rectangle to grab */
00853     int         nWidth, nHeight;        /*  DIB width and height */
00854     int         xScrn, yScrn;           /*  screen resolution */
00855     /*  check for an empty rectangle */
00856
00857     if (IsRectEmpty(lpRect))
00858       return NULL;
00859
00860     /*  create a DC for the screen and create */
00861     /*  a memory DC compatible to screen DC */
00862
00863     /* hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL); */
00864     /* hMemDC = CreateCompatibleDC(hScrDC); */
00865     hScrDC = GetDC(win);
00866     hMemDC = CreateCompatibleDC (hScrDC);
00867     /*  get points of rectangle to grab */
00868
00869     nX = lpRect->left;
00870     nY = lpRect->top;
00871     nX2 = lpRect->right;
00872     nY2 = lpRect->bottom;
00873
00874     /*  get screen resolution */
00875
00876     xScrn = GetDeviceCaps(hScrDC, HORZRES);
00877     yScrn = GetDeviceCaps(hScrDC, VERTRES);
00878
00879     /* make sure bitmap rectangle is visible */
00880
00881     if (nX < 0)
00882         nX = 0;
00883     if (nY < 0)
00884         nY = 0;
00885     if (nX2 > xScrn)
00886         nX2 = xScrn;
00887     if (nY2 > yScrn)
00888         nY2 = yScrn;
00889
00890     nWidth = nX2 - nX;
00891     nHeight = nY2 - nY;
00892
00893     // create a bitmap compatible with the screen DC
00894     hBitmap = CreateCompatibleBitmap(hScrDC, nWidth, nHeight);
00895
00896     // select new bitmap into memory DC
00897     hOldBitmap = SelectObject(hMemDC, hBitmap);
00898
00899     // bitblt screen DC to memory DC
00900     BitBlt(hMemDC, 0, 0, nWidth, nHeight, hScrDC, nX, nY, SRCCOPY);
00901
00902     // select old bitmap back into memory DC and get handle to
00903     // bitmap of the screen
00904
00905     hBitmap = SelectObject(hMemDC, hOldBitmap);
00906
00907     // clean up
00908
00909     ReleaseDC(win, hScrDC);
00910     DeleteDC(hMemDC);
00911
00912     // return handle to the bitmap
00913
00914     return hBitmap;
00915 }

Here is the call graph for this function:

HBITMAP CreateDIB | ( | DWORD | dwWidth,
 |  | DWORD | dwHeight,
 |  | WORD | wBitCount,
 |  | HPALETTE | hPal
 | ) |

Definition at line 201 of file dib.c.

References NULL, PaletteSize(), and WIDTHBYTES.

Referenced by UMakeBitmap().

00202 {
00203     BITMAPINFOHEADER    bi;             /*  bitmap header */
00204     LPBITMAPINFOHEADER  lpbi;           /*  pointer to BITMAPINFOHEADER */
00205     DWORD               dwLen;          /*  size of memory block */
00206     HBITMAP             hDIB;
00207     DWORD               dwBytesPerLine; /*  Number of bytes per scanline */
00208
00209
00210     /*  Make sure bits per pixel is valid */
00211
00212     if (wBitCount <= 1)
00213         wBitCount = 1;
00214     else if (wBitCount <= 4)
00215         wBitCount = 4;
00216     else if (wBitCount <= 8)
00217         wBitCount = 8;
00218     else if (wBitCount <= 24)
00219         wBitCount = 24;
00220     else
00221         wBitCount = 4;  /*  set default value to 4 if parameter is bogus */
00222
00223     /*  initialize BITMAPINFOHEADER */
00224
00225     bi.biSize = sizeof(BITMAPINFOHEADER);
00226     bi.biWidth = dwWidth;         /*  fill in width from parameter */
00227     bi.biHeight = dwHeight;       /*  fill in height from parameter */
00228     bi.biPlanes = 1;              /*  must be 1 */
00229     bi.biBitCount = wBitCount;    /*  from parameter */
00230     bi.biCompression = BI_RGB;
00231     bi.biSizeImage = 0;           /*  0's here mean "default" */
00232     bi.biXPelsPerMeter = 0;
00233     bi.biYPelsPerMeter = 0;
00234     bi.biClrUsed = 0;
00235     bi.biClrImportant = 0;
00236
00237     /*  calculate size of memory block required to store the DIB.  This */
00238     /*  block should be big enough to hold the BITMAPINFOHEADER, the color */
00239     /*  table, and the bits */
00240
00241     dwBytesPerLine = WIDTHBYTES(wBitCount * dwWidth);
00242     dwLen = bi.biSize + PaletteSize((LPSTR)&bi) + (dwBytesPerLine * dwHeight);
00243
00244     /*  alloc memory block to store our bitmap */
00245
00246     hDIB = GlobalAlloc(GHND, dwLen);
00247
00248     /*  major bummer if we couldn't get memory block */
00249
00250     if (!hDIB)
00251         return NULL;
00252
00253     /*  lock memory and get pointer to it */
00254
00255     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00256
00257     /*  use our bitmap info structure to fill in first part of */
00258     /*  our DIB with the BITMAPINFOHEADER */
00259
00260     *lpbi = bi;
00261
00262     /*
00263      * Copy the palette in the new created image
00264      */
00265     if (wBitCount == 8)
00266     {
00267         PALETTEENTRY pal[256];
00268         RGBQUAD *pRgb;
00269         int i;
00270
00271         GetPaletteEntries(hPal, 0, 256, pal);
00272
00273         pRgb = (RGBQUAD FAR *)((LPSTR)lpbi + (WORD)lpbi->biSize);
00274
00275         /* Fill in the palette entries from the DIB color table and
00276          * create a logical color palette.
00277          */
00278         for (i = 0; i < 256; i++)
00279         {
00280             pRgb[i].rgbRed = pal[i].peRed;
00281             pRgb[i].rgbGreen = pal[i].peGreen;
00282             pRgb[i].rgbBlue = pal[i].peBlue;
00283         }
00284     }
00285
00286     // Since we don't know what the colortable and bits should contain,
00287     // just leave these blank.  Unlock the DIB and return the HDIB.
00288
00289     GlobalUnlock(hDIB);
00290
00291     //return handle to the DIB
00292
00293     return hDIB;
00294 }

Here is the call graph for this function:

HANDLE DDBtoDIB | ( | HBITMAP | hbm,
 |  | WORD | biBits,
 |  | HPALETTE | hPal
 | ) |

Definition at line 962 of file dib.c.

References NULL, PaletteSize(), and WIDTHBYTES.

00966 {
00967     BITMAP               bm;
00968     BITMAPINFOHEADER     bi;
00969     BITMAPINFOHEADER FAR *lpbi;
00970     DWORD                dwLen;
00971     HANDLE               hdib;
00972     HANDLE               h;
00973     HDC                  hdc;
00974     HPALETTE oldPal;
00975
00976     if (!hbm)
00977         return NULL;
00978
00979     GetObject(hbm,sizeof(bm),(LPSTR)&bm);
00980
00981     if (biBits == 0)
00982         biBits =  bm.bmPlanes * bm.bmBitsPixel;
00983
00984     bi.biSize               = sizeof(BITMAPINFOHEADER);
00985     bi.biWidth              = bm.bmWidth;
00986     bi.biHeight             = bm.bmHeight;
00987     bi.biPlanes             = 1;
00988     bi.biBitCount           = biBits;
00989     bi.biCompression        = BI_RGB;
00990     bi.biSizeImage          = 0;
00991     bi.biXPelsPerMeter      = 0;
00992     bi.biYPelsPerMeter      = 0;
00993     bi.biClrUsed            = 0;
00994     bi.biClrImportant       = 0;
00995
00996     dwLen  = bi.biSize + PaletteSize(&bi);
00997
00998     hdc = GetDC(NULL);
00999     oldPal = SelectPalette(hdc, hPal, FALSE);
01000     RealizePalette(hdc);
01001
01002     hdib = GlobalAlloc(GHND,dwLen);
01003
01004     if (!hdib)
01005     {
01006         SelectPalette(hdc, oldPal, FALSE);
01007         ReleaseDC(NULL, hdc);
01008         return NULL;
01009     }
01010
01011     lpbi = (VOID FAR *)GlobalLock(hdib);
01012
01013     *lpbi = bi;
01014
01015     /*  call GetDIBits with a NULL lpBits param, so it will calculate the
01016      *  biSizeImage field for us
01017      */
01018     GetDIBits(hdc, hbm, 0L, (DWORD)bi.biHeight,
01019         (LPBYTE)NULL, (LPBITMAPINFO)lpbi, (DWORD)DIB_RGB_COLORS);
01020
01021     bi = *lpbi;
01022     GlobalUnlock(hdib);
01023
01024     /* If the driver did not fill in the biSizeImage field, make one up */
01025     if (bi.biSizeImage == 0)
01026         bi.biSizeImage = WIDTHBYTES((DWORD)bm.bmWidth * biBits) * bm.bmHeight;
01027
01028     /*  realloc the buffer big enough to hold all the bits */
01029     dwLen = bi.biSize + PaletteSize(&bi) + bi.biSizeImage;
01030
01031     if (h = GlobalReAlloc(hdib,dwLen,0))
01032         hdib = h;
01033     else
01034     {
01035         GlobalFree(hdib);
01036         hdib = NULL;
01037
01038         SelectPalette(hdc, oldPal, FALSE);
01039         ReleaseDC(NULL,hdc);
01040         return hdib;
01041     }
01042
01043     /*  call GetDIBits with a NON-NULL lpBits param, and actualy get the
01044      *  bits this time
01045      */
01046     lpbi = (VOID FAR *)GlobalLock(hdib);
01047
01048     if (GetDIBits( hdc,
01049                    hbm,
01050                    0L,
01051                    (DWORD)bi.biHeight,
01052                    (LPBYTE)lpbi + (WORD)lpbi->biSize + PaletteSize(lpbi),
01053                    (LPBITMAPINFO)lpbi, (DWORD)DIB_RGB_COLORS) == 0)
01054     {
01055          GlobalUnlock(hdib);
01056          hdib = NULL;
01057          SelectPalette(hdc, oldPal, FALSE);
01058          ReleaseDC(NULL,hdc);
01059          return NULL;
01060     }
01061
01062     bi = *lpbi;
01063     GlobalUnlock(hdib);
01064
01065     SelectPalette(hdc, oldPal, FALSE);
01066     ReleaseDC(NULL,hdc);
01067     return hdib;
01068 }

Here is the call graph for this function:

VOID DibCopyPalette | ( | HBITMAP | dst,
 |  | HBITMAP | src
 | ) |

Definition at line 99 of file dib.c.

References DibGetPaletteSize(), and PaletteSize().

00100 {
00101     LPBITMAPINFO src_header, dst_header;
00102     RGBQUAD *src_rgb, *dst_rgb;
00103     WORD colorMode;
00104
00105     src_header = (LPBITMAPINFO) GlobalLock((HGLOBAL)src);
00106     dst_header = (LPBITMAPINFO) GlobalLock((HGLOBAL)dst);
00107
00108     src_rgb = (RGBQUAD FAR *)((LPSTR)src_header + (WORD)src_header->bmiHeader.biSize);
00109     dst_rgb = (RGBQUAD FAR *)((LPSTR)dst_header + (WORD)dst_header->bmiHeader.biSize);
00110
00111     colorMode = DibGetPaletteSize(src_header);
00112     switch(colorMode)
00113     {
00114         case 4:
00115         case 8:
00116             memcpy(dst_rgb, src_rgb,PaletteSize(&src_header->bmiHeader));
00117             break;
00118     }
00119
00120     GlobalUnlock((HGLOBAL)src);
00121     GlobalUnlock((HGLOBAL)dst);
00122 }

Here is the call graph for this function:

WORD DibGetPaletteSize ( VOID FAR * pv )

Definition at line 69 of file dib.c.

Referenced by DibCopyPalette().

00070 {
00071     INT                 bits;
00072     LPBITMAPINFOHEADER  lpbi;
00073     LPBITMAPCOREHEADER  lpbc;
00074
00075     lpbi = ((LPBITMAPINFOHEADER)pv);
00076     lpbc = ((LPBITMAPCOREHEADER)pv);
00077
00078     /*  With the BITMAPINFO format headers, the size of the palette
00079      *  is in biClrUsed, whereas in the BITMAPCORE - style headers, it
00080      *  is dependent on the bits per pixel ( = 2 raised to the power of
00081      *  bits/pixel).
00082      */
00083     if (lpbi->biSize != sizeof(BITMAPCOREHEADER))
00084         bits = lpbi->biBitCount;
00085     else
00086         bits = lpbc->bcBitCount;
00087
00088     return bits;
00089 }

WORD DibNumColors ( VOID FAR * pv )

Definition at line 24 of file dib.c.

Referenced by PaletteSize().

00025 {
00026     INT                 bits;
00027     LPBITMAPINFOHEADER  lpbi;
00028     LPBITMAPCOREHEADER  lpbc;
00029
00030     lpbi = ((LPBITMAPINFOHEADER)pv);
00031     lpbc = ((LPBITMAPCOREHEADER)pv);
00032
00033     /*  With the BITMAPINFO format headers, the size of the palette
00034      *  is in biClrUsed, whereas in the BITMAPCORE - style headers, it
00035      *  is dependent on the bits per pixel ( = 2 raised to the power of
00036      *  bits/pixel).
00037      */
00038     if (lpbi->biSize != sizeof(BITMAPCOREHEADER)){
00039         if (lpbi->biClrUsed != 0)
00040             return (WORD)lpbi->biClrUsed;
00041         bits = lpbi->biBitCount;
00042     }
00043     else
00044         bits = lpbc->bcBitCount;
00045
00046     switch (bits){
00047         case 1:
00048                 return 2;
00049         case 4:
00050                 return 16;
00051         case 8:
00052                 return 256;
00053         default:
00054                 /* A 24 bitcount DIB has no color table */
00055                 return 0;
00056     }
00057 }

HBITMAP DIBToBitmap ( HBITMAP hDIB )

Definition at line 919 of file dib.c.

References NULL, and PaletteSize().

Referenced by UMakeBitmap().

00921 {
00922     LPSTR       lpDIBHdr, lpDIBBits;  // pointer to DIB header, pointer to DIB bits
00923     HBITMAP     hBitmap;            // handle to device-dependent bitmap
00924     HDC         hDC;                    // handle to DC
00925
00926     if (!hDIB)
00927         return NULL;
00928
00929     /* lock memory block and get a pointer to it */
00930     lpDIBHdr = GlobalLock(hDIB);
00931     lpDIBBits = lpDIBHdr + *(LPDWORD)lpDIBHdr + PaletteSize(lpDIBHdr);
00932
00933     /* get a DC */
00934     hDC = GetDC(NULL);
00935     if (!hDC)
00936     {
00937         GlobalUnlock(hDIB);
00938         return NULL;
00939     }
00940
00941     /* create bitmap from DIB info. and bits */
00942     hBitmap = CreateDIBitmap(hDC, (LPBITMAPINFOHEADER)lpDIBHdr, CBM_INIT,
00943             lpDIBBits, (LPBITMAPINFO)lpDIBHdr, DIB_RGB_COLORS);
00944
00945
00946     ReleaseDC(NULL, hDC);
00947     GlobalUnlock(hDIB);
00948     return hBitmap;
00949 }

Here is the call graph for this function:

HBITMAP LoadDIB ( LPSTR lpFileName )

Definition at line 480 of file dib.c.

References NULL, and ReadDIBFile().

00481 {
00482     HBITMAP     hDIB;
00483     HANDLE      hFile;
00484
00485     if ((hFile = CreateFile(lpFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
00486             OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
00487             NULL)) != INVALID_HANDLE_VALUE)
00488     {
00489         hDIB = ReadDIBFile(hFile);
00490         CloseHandle(hFile);
00491         return hDIB;
00492     }
00493     else
00494         return NULL;
00495 }

Here is the call graph for this function:

WORD PaletteSize ( VOID FAR * pv )

Definition at line 136 of file dib.c.

References DibNumColors().

Referenced by CreateDIB(), DDBtoDIB(), DibCopyPalette(), DIBToBitmap(), SaveDIB(), and UMakeBitmap().

00137 {
00138     LPBITMAPINFOHEADER lpbi;
00139     WORD               NumColors;
00140
00141     lpbi      = (LPBITMAPINFOHEADER)pv;
00142     NumColors = DibNumColors(lpbi);
00143
00144     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
00145         return (WORD)(NumColors * sizeof(RGBTRIPLE));
00146     else
00147         return (WORD)(NumColors * sizeof(RGBQUAD));
00148 }

Here is the call graph for this function:

HANDLE ReadDIBFile ( HANDLE hFile )

Definition at line 324 of file dib.c.

References NULL.

Referenced by LoadDIB().

00325 {
00326     BITMAPFILEHEADER    bmfHeader;
00327     DWORD               dwBitsSize;
00328     UINT                nNumColors;   /*  Number of colors in table */
00329     HANDLE              hDIB;
00330     HANDLE              hDIBtmp;      /*  Used for GlobalRealloc() //MPB */
00331     LPBITMAPINFOHEADER  lpbi;
00332     DWORD               offBits;
00333     DWORD               dwRead;
00334
00335     /*  get length of DIB in bytes for use when reading */
00336
00337     dwBitsSize = GetFileSize(hFile, NULL);
00338
00339     /*  Allocate memory for header & color table. We'll enlarge this */
00340     /*  memory as needed. */
00341
00342     hDIB = GlobalAlloc(GMEM_MOVEABLE, (DWORD)(sizeof(BITMAPINFOHEADER) +
00343             256 * sizeof(RGBQUAD)));
00344
00345     if (!hDIB)
00346         return NULL;
00347
00348     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00349
00350     if (!lpbi)
00351     {
00352         GlobalFree(hDIB);
00353         return NULL;
00354     }
00355
00356     /*  read the BITMAPFILEHEADER from our file */
00357
00358     if (!ReadFile(hFile, (LPSTR)&bmfHeader, sizeof (BITMAPFILEHEADER),
00359             &dwRead, NULL))
00360         goto ErrExit;
00361
00362     if (sizeof (BITMAPFILEHEADER) != dwRead)
00363         goto ErrExit;
00364
00365     if (bmfHeader.bfType != 0x4d42)  /*  'BM' */
00366         goto ErrExit;
00367
00368     /*  read the BITMAPINFOHEADER */
00369
00370     if (!ReadFile(hFile, (LPSTR)lpbi, sizeof(BITMAPINFOHEADER), &dwRead,
00371             NULL))
00372         goto ErrExit;
00373
00374     if (sizeof(BITMAPINFOHEADER) != dwRead)
00375         goto ErrExit;
00376
00377     /*  Check to see that it's a Windows DIB -- an OS/2 DIB would cause */
00378     /*  strange problems with the rest of the DIB API since the fields */
00379     /*  in the header are different and the color table entries are */
00380     /*  smaller. */
00381     /*  */
00382     /*  If it's not a Windows DIB (e.g. if biSize is wrong), return NULL. */
00383
00384     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
00385         goto ErrExit;
00386
00387     /*  Now determine the size of the color table and read it.  Since the */
00388     /*  bitmap bits are offset in the file by bfOffBits, we need to do some */
00389     /*  special processing here to make sure the bits directly follow */
00390     /*  the color table (because that's the format we are susposed to pass */
00391     /*  back) */
00392
00393     if (!(nNumColors = (UINT)lpbi->biClrUsed))
00394     {
00395         /*  no color table for 24-bit, default size otherwise */
00396
00397         if (lpbi->biBitCount != 24)
00398             nNumColors = 1 << lpbi->biBitCount; /*  standard size table */
00399     }
00400
00401     /*  fill in some default values if they are zero */
00402
00403     if (lpbi->biClrUsed == 0)
00404         lpbi->biClrUsed = nNumColors;
00405
00406     if (lpbi->biSizeImage == 0)
00407     {
00408         lpbi->biSizeImage = ((((lpbi->biWidth * (DWORD)lpbi->biBitCount) +
00409                 31) & ~31) >> 3) * lpbi->biHeight;
00410     }
00411
00412     /*  get a proper-sized buffer for header, color table and bits */
00413
00414     GlobalUnlock(hDIB);
00415     hDIBtmp = GlobalReAlloc(hDIB, lpbi->biSize + nNumColors *
00416             sizeof(RGBQUAD) + lpbi->biSizeImage, 0);
00417
00418     if (!hDIBtmp) /*  can't resize buffer for loading */
00419         goto ErrExitNoUnlock; /* MPB */
00420     else
00421         hDIB = hDIBtmp;
00422
00423     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00424
00425     /*  read the color table */
00426
00427     ReadFile (hFile, (LPSTR)(lpbi) + lpbi->biSize,
00428             nNumColors * sizeof(RGBQUAD), &dwRead, NULL);
00429
00430     /*  offset to the bits from start of DIB header */
00431
00432     offBits = lpbi->biSize + nNumColors * sizeof(RGBQUAD);
00433
00434     /*  If the bfOffBits field is non-zero, then the bits might *not* be */
00435     /*  directly following the color table in the file.  Use the value in */
00436     /*  bfOffBits to seek the bits. */
00437
00438     if (bmfHeader.bfOffBits != 0L)
00439         SetFilePointer(hFile, bmfHeader.bfOffBits, NULL, FILE_BEGIN);
00440
00441     if (ReadFile(hFile, (LPSTR)lpbi + offBits, lpbi->biSizeImage, &dwRead,
00442             NULL))
00443         goto OKExit;
00444
00445
00446 ErrExit:
00447     GlobalUnlock(hDIB);
00448
00449 ErrExitNoUnlock:
00450     GlobalFree(hDIB);
00451     return NULL;
00452
00453 OKExit:
00454     GlobalUnlock(hDIB);
00455     return hDIB;
00456 }

HANDLE ReadDIBRsrc | ( | HINSTANCE | hInst,
 |  | HRSRC | hRsrc
 | ) |

Definition at line 1098 of file dib.c.

References NULL.

01099 {
01100     BITMAPFILEHEADER    bmfHeader;
01101     DWORD               dwBitsSize;
01102     UINT                nNumColors;   /*  Number of colors in table */
01103     HANDLE              hDIB;
01104     HANDLE              hDIBtmp;      /*  Used for GlobalRealloc() //MPB */
01105     LPBITMAPINFOHEADER  lpbi;
01106     DWORD               offBits;
01107     LPSTR               rsrcptr, beginrsrc;
01108     HGLOBAL             hg;
01109
01110     /*  get length of DIB in bytes for use when reading */
01111
01112     hg = LoadResource(hInst, hRsrc);
01113     if(hg == NULL)
01114         return NULL;
01115
01116     beginrsrc = rsrcptr = LockResource(hg);
01117     dwBitsSize = SizeofResource(hInst, hRsrc);
01118
01119     /*  Allocate memory for header & color table. We'll enlarge this */
01120     /*  memory as needed. */
01121
01122     hDIB = GlobalAlloc(GMEM_MOVEABLE, (DWORD)(sizeof(BITMAPINFOHEADER) +
01123             256 * sizeof(RGBQUAD)));
01124
01125     if (!hDIB)
01126         goto ErrExitRsrc;
01127
01128     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
01129
01130     if (!lpbi)
01131     {
01132         GlobalFree(hDIB);
01133         goto ErrExitRsrc;
01134     }
01135
01136     /*  read the BITMAPFILEHEADER from our file */
01137
01138     memcpy(&bmfHeader, rsrcptr, sizeof (BITMAPFILEHEADER));
01139     rsrcptr += sizeof (BITMAPFILEHEADER);
01140
01141     if (bmfHeader.bfType != 0x4d42)  /*  'BM' */
01142         goto ErrExit;
01143
01144     /*  read the BITMAPINFOHEADER */
01145
01146     memcpy(lpbi, rsrcptr, sizeof(BITMAPINFOHEADER));
01147     rsrcptr += sizeof (BITMAPINFOHEADER);
01148
01149     /*  Check to see that it's a Windows DIB -- an OS/2 DIB would cause */
01150     /*  strange problems with the rest of the DIB API since the fields */
01151     /*  in the header are different and the color table entries are */
01152     /*  smaller. */
01153     /*  */
01154     /*  If it's not a Windows DIB (e.g. if biSize is wrong), return NULL. */
01155
01156     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
01157         goto ErrExit;
01158
01159     /*  Now determine the size of the color table and read it.  Since the */
01160     /*  bitmap bits are offset in the file by bfOffBits, we need to do some */
01161     /*  special processing here to make sure the bits directly follow */
01162     /*  the color table (because that's the format we are susposed to pass */
01163     /*  back) */
01164
01165     if (!(nNumColors = (UINT)lpbi->biClrUsed))
01166     {
01167         /*  no color table for 24-bit, default size otherwise */
01168
01169         if (lpbi->biBitCount != 24)
01170             nNumColors = 1 << lpbi->biBitCount; /*  standard size table */
01171     }
01172
01173     /*  fill in some default values if they are zero */
01174
01175     if (lpbi->biClrUsed == 0)
01176         lpbi->biClrUsed = nNumColors;
01177
01178     if (lpbi->biSizeImage == 0)
01179     {
01180         lpbi->biSizeImage = ((((lpbi->biWidth * (DWORD)lpbi->biBitCount) +
01181                 31) & ~31) >> 3) * lpbi->biHeight;
01182     }
01183
01184     /*  get a proper-sized buffer for header, color table and bits */
01185
01186     GlobalUnlock(hDIB);
01187     hDIBtmp = GlobalReAlloc(hDIB, lpbi->biSize + nNumColors *
01188             sizeof(RGBQUAD) + lpbi->biSizeImage, 0);
01189
01190     if (!hDIBtmp) /*  can't resize buffer for loading */
01191         goto ErrExitNoUnlock; /* MPB */
01192     else
01193         hDIB = hDIBtmp;
01194
01195     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
01196
01197     /*  read the color table */
01198
01199     memcpy((LPSTR)(lpbi) + lpbi->biSize, rsrcptr, nNumColors * sizeof(RGBQUAD));
01200     rsrcptr += nNumColors * sizeof(RGBQUAD);
01201
01202     /*  offset to the bits from start of DIB header */
01203     offBits = lpbi->biSize + nNumColors * sizeof(RGBQUAD);
01204
01205     /*  If the bfOffBits field is non-zero, then the bits might *not* be */
01206     /*  directly following the color table in the file.  Use the value in */
01207     /*  bfOffBits to seek the bits. */
01208
01209     if (bmfHeader.bfOffBits != 0L)
01210         rsrcptr = beginrsrc + bmfHeader.bfOffBits;
01211
01212     memcpy((LPSTR)lpbi + offBits, rsrcptr, lpbi->biSizeImage);
01213     goto OKExit;
01214
01215 ErrExit:
01216     GlobalUnlock(hDIB);
01217
01218 ErrExitNoUnlock:
01219     GlobalFree(hDIB);
01220 ErrExitRsrc:
01221     FreeResource(hg);
01222     return NULL;
01223
01224 OKExit:
01225     FreeResource(hg);
01226     GlobalUnlock(hDIB);
01227     return hDIB;
01228 }

BOOL SaveBmpFromDDB | ( | HDC | hDC,
 |  | HBITMAP | hBmp,
 |  | PSTR | pszFileName
 | ) |

Definition at line 506 of file dib.c.

References NULL.

00507 {
00508     int         hFile;
00509     OFSTRUCT    ofReOpenBuff;
00510     HBITMAP     hTmpBmp, hBmpOld;
00511     BOOL        bSuccess;
00512     BITMAPFILEHEADER    bfh;
00513     PBITMAPINFO pbmi;
00514     PBYTE       pBits;
00515     BITMAPINFO  bmi;
00516     PBYTE pjTmp, pjTmpBmi;
00517     ULONG sizBMI;
00518
00519
00520     bSuccess = TRUE;
00521 #if 0
00522     if (ghPal) {
00523         SelectPalette(hDC, ghPal, FALSE);
00524         RealizePalette(hDC);
00525     }
00526 #endif
00527     if (!hBmp) {
00528         return FALSE;
00529     }
00530
00531     //
00532     // Let the graphics engine to retrieve the dimension of the bitmap for us
00533     // GetDIBits uses the size to determine if it's BITMAPCOREINFO or BITMAPINFO
00534     // if BitCount != 0, color table will be retrieved
00535     //
00536     bmi.bmiHeader.biSize = 0x28;              // GDI need this to work
00537     bmi.bmiHeader.biBitCount = 0;             // don't get the color table
00538     if ((GetDIBits(hDC, hBmp, 0, 0, (LPSTR)NULL, &bmi, DIB_RGB_COLORS)) == 0) {
00539         return FALSE;
00540     }
00541
00542     //
00543     // Now that we know the size of the image, alloc enough memory to retrieve
00544     // the actual bits
00545     //
00546     if ((pBits = (PBYTE)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT,
00547                 bmi.bmiHeader.biSizeImage)) == NULL) {
00548         return FALSE;
00549     }
00550
00551     //
00552     // Note: 24 bits per pixel has no color table.  So, we don't have to
00553     // allocate memory for retrieving that.  Otherwise, we do.
00554     //
00555     pbmi = &bmi;                                      // assume no color table
00556
00557     switch (bmi.bmiHeader.biBitCount) {
00558         case 24:                                      // has color table
00559             sizBMI = sizeof(BITMAPINFOHEADER);
00560             break;
00561         case 16:
00562         case 32:
00563             sizBMI = sizeof(BITMAPINFOHEADER)+sizeof(DWORD)*3;
00564             break;
00565         default:
00566             sizBMI = sizeof(BITMAPINFOHEADER)+sizeof(RGBQUAD)*(1<<bmi.bmiHeader.biBitCount);
00567             break;
00568
00569     }
00570
00571     //
00572     // Allocate memory for color table if it is not 24bpp...
00573     //
00574     if (sizBMI != sizeof(BITMAPINFOHEADER)) {
00575         ULONG       sizTmp;
00576         //
00577         // I need more memory for the color table
00578         //
00579         if ((pbmi = (PBITMAPINFO)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, sizBMI )) == NULL) {
00580             bSuccess = FALSE;
00581             goto ErrExit1;
00582         }
00583         //
00584         // Now that we've a bigger chunk of memory, let's copy the Bitmap
00585         // info header data over
00586         //
00587         pjTmp = (PBYTE)pbmi;
00588         pjTmpBmi = (PBYTE)&bmi;
00589         sizTmp = sizeof(BITMAPINFOHEADER);
00590
00591         while(sizTmp--)
00592         {
00593             *(((PBYTE)pjTmp)++) = *((pjTmpBmi)++);
00594         }
00595     }
00596
00597     //
00598     // Let's open the file and get ready for writing
00599     //
00600     if ((hFile = OpenFile(pszFileName, (LPOFSTRUCT)&ofReOpenBuff,
00601                  OF_CREATE | OF_WRITE)) == -1) {
00602         goto ErrExit2;
00603     }
00604
00605     //
00606     // But first, fill in the info for the BitmapFileHeader
00607     //
00608     bfh.bfType = 0x4D42;                            // 'BM'
00609     bfh.bfSize = sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER)+sizBMI+
00610         pbmi->bmiHeader.biSizeImage;
00611     bfh.bfReserved1 =
00612     bfh.bfReserved2 = 0;
00613     bfh.bfOffBits = sizeof(BITMAPFILEHEADER)+sizBMI;
00614
00615     //
00616     // Write out the file header now
00617     //
00618     if (_lwrite(hFile, (LPSTR)&bfh, sizeof(BITMAPFILEHEADER)) == -1) {
00619         bSuccess = FALSE;
00620         goto ErrExit3;
00621     }
00622
00623     //
00624     // Bitmap can't be selected into a DC when calling GetDIBits
00625     // Assume that the hDC is the DC where the bitmap would have been selected
00626     // if indeed it has been selected
00627     //
00628     if (hTmpBmp = CreateCompatibleBitmap(hDC, pbmi->bmiHeader.biWidth, pbmi->bmiHeader.biHeight)) {
00629         hBmpOld = SelectObject(hDC, hTmpBmp);
00630         if ((GetDIBits(hDC, hBmp, 0, pbmi->bmiHeader.biHeight, (LPSTR)pBits, pbmi, DIB_RGB_COLORS))==0){
00631             bSuccess = FALSE;
00632             goto ErrExit4;
00633         }
00634     } else {
00635         bSuccess = FALSE;
00636         goto ErrExit3;
00637     }
00638
00639     //
00640     // Now write out the BitmapInfoHeader and color table, if any
00641     //
00642     if (_lwrite(hFile, (LPSTR)pbmi, sizBMI) == -1) {
00643         bSuccess = FALSE;
00644         goto ErrExit4;
00645     }
00646
00647     //
00648     // write the bits also
00649     //
00650     if (_lwrite(hFile, (LPSTR)pBits, pbmi->bmiHeader.biSizeImage) == -1) {
00651         bSuccess = FALSE;
00652         goto ErrExit4;
00653     }
00654
00655
00656 ErrExit4:
00657     SelectObject(hDC, hBmpOld);
00658     DeleteObject(hTmpBmp);
00659 ErrExit3:
00660     _lclose(hFile);
00661 ErrExit2:
00662     GlobalFree(pbmi);
00663 ErrExit1:
00664     GlobalFree(pBits);
00665     return bSuccess;
00666 }

BOOL SaveDIB | ( | HBITMAP | hDib,
 |  | LPSTR | lpFileName
 | ) |

Definition at line 702 of file dib.c.

References DIB_HEADER_MARKER, NULL, PaletteSize(), and WIDTHBYTES.

00703 {
00704     BITMAPFILEHEADER    bmfHdr;     /*  Header for Bitmap file */
00705     LPBITMAPINFOHEADER  lpBI;       /*  Pointer to DIB info structure */
00706     HANDLE              fh;         /*  file handle for opened file */
00707     DWORD               dwDIBSize;
00708     DWORD               dwWritten;
00709
00710     if (!hDib)
00711         return FALSE;
00712
00713     fh = CreateFile(lpFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
00714             FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
00715
00716     if (fh == INVALID_HANDLE_VALUE)
00717         return FALSE;
00718
00719     /*  Get a pointer to the DIB memory, the first of which contains */
00720     /*  a BITMAPINFO structure */
00721
00722     lpBI = (LPBITMAPINFOHEADER)GlobalLock(hDib);
00723     if (!lpBI)
00724     {
00725         CloseHandle(fh);
00726         return FALSE;
00727     }
00728
00729     /*  Check to see if we're dealing with an OS/2 DIB.  If so, don't */
00730     /*  save it because our functions aren't written to deal with these */
00731     /*  DIBs. */
00732
00733     if (lpBI->biSize != sizeof(BITMAPINFOHEADER))
00734     {
00735         GlobalUnlock(hDib);
00736         CloseHandle(fh);
00737         return FALSE;
00738     }
00739
00740     /*  Fill in the fields of the file header */
00741
00742     /*  Fill in file type (first 2 bytes must be "BM" for a bitmap) */
00743
00744     bmfHdr.bfType = DIB_HEADER_MARKER;  /*  "BM" */
00745
00746     /*  Calculating the size of the DIB is a bit tricky (if we want to */
00747     /*  do it right).  The easiest way to do this is to call GlobalSize() */
00748     /*  on our global handle, but since the size of our global memory may have */
00749     /*  been padded a few bytes, we may end up writing out a few too */
00750     /*  many bytes to the file (which may cause problems with some apps, */
00751     /*  like HC 3.0). */
00752     /*  */
00753     /*  So, instead let's calculate the size manually. */
00754     /*  */
00755     /*  To do this, find size of header plus size of color table.  Since the */
00756     /*  first DWORD in both BITMAPINFOHEADER and BITMAPCOREHEADER conains */
00757     /*  the size of the structure, let's use this. */
00758
00759     /*  Partial Calculation */
00760
00761     dwDIBSize = *(LPDWORD)lpBI + PaletteSize((LPSTR)lpBI);
00762
00763     /*  Now calculate the size of the image */
00764
00765     /*  It's an RLE bitmap, we can't calculate size, so trust the biSizeImage */
00766     /*  field */
00767
00768     if ((lpBI->biCompression == BI_RLE8) || (lpBI->biCompression == BI_RLE4))
00769         dwDIBSize += lpBI->biSizeImage;
00770     else
00771     {
00772         DWORD dwBmBitsSize;  /*  Size of Bitmap Bits only */
00773
00774         /*  It's not RLE, so size is Width (DWORD aligned) * Height */
00775
00776         dwBmBitsSize = WIDTHBYTES((lpBI->biWidth)*((DWORD)lpBI->biBitCount)) *
00777                 lpBI->biHeight;
00778
00779         dwDIBSize += dwBmBitsSize;
00780
00781         /*  Now, since we have calculated the correct size, why don't we */
00782         /*  fill in the biSizeImage field (this will fix any .BMP files which  */
00783         /*  have this field incorrect). */
00784
00785         lpBI->biSizeImage = dwBmBitsSize;
00786     }
00787
00788
00789     /*  Calculate the file size by adding the DIB size to sizeof(BITMAPFILEHEADER) */
00790
00791     bmfHdr.bfSize = dwDIBSize + sizeof(BITMAPFILEHEADER);
00792     bmfHdr.bfReserved1 = 0;
00793     bmfHdr.bfReserved2 = 0;
00794
00795     /*  Now, calculate the offset the actual bitmap bits will be in */
00796     /*  the file -- It's the Bitmap file header plus the DIB header, */
00797     /*  plus the size of the color table. */
00798
00799     bmfHdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + lpBI->biSize +
00800             PaletteSize((LPSTR)lpBI);
00801
00802     /*  Write the file header */
00803
00804     WriteFile(fh, (LPSTR)&bmfHdr, sizeof(BITMAPFILEHEADER), &dwWritten, NULL);
00805
00806     /*  Write the DIB header and the bits -- use local version of */
00807     /*  MyWrite, so we can write more than 32767 bytes of data */
00808
00809     WriteFile(fh, (LPSTR)lpBI, dwDIBSize, &dwWritten, NULL);
00810
00811     GlobalUnlock(hDib);
00812     CloseHandle(fh);
00813
00814     if (dwWritten == 0)
00815         return FALSE; /*  oops, something happened in the write */
00816     else
00817         return TRUE; /*  Success code */
00818 }

Here is the call graph for this function:

VOID WriteMapFileHeaderandConvertFromDwordAlignToPacked | ( | HFILE | fh,
 |  | LPBITMAPFILEHEADER | pbf
 | ) |

Definition at line 160 of file dib.c.

00161 {
00162
00163         /* write bfType*/
00164     _lwrite(fh, (LPSTR)&pbf->bfType, (UINT)sizeof (WORD));
00165         /* now pass over extra word, and only write next 3 DWORDS!*/
00166         _lwrite(fh, (LPSTR)&pbf->bfSize, sizeof(DWORD) * 3);
00167 }

Generated on Sat Aug 7 22:46:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/dib.h File Reference

rf/support/mfc/dib.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | DIB_HEADER_MARKER ((WORD) ('M' << 8) | 'B')
#define | WIDTHBYTES(i) ((i+31)/32*4)
#define | WIDTHBYTES16(i) ((i+15)/16*2)
#define | WIDTHBYTES8(i) ((i+7)/8)
#define | BM_ALLOC(nb, size) GlobalAllocPtr( GHND, (nb)*(size) )
#define | BM_FREE(ptr) GlobalFreePtr(ptr)
#define | BFT_BITMAP 0x4d42
#define | SIZEOF_BITMAPFILEHEADER_PACKED

Functions

VOID | DibCopyPalette (HBITMAP, HBITMAP)
WORD | PaletteSize (VOID FAR *)
WORD | DibNumColors (VOID FAR *)
WORD | DibGetPaletteSize (VOID FAR *)
VOID | WriteMapFileHeaderandConvertFromDwordAlignToPacked (HFILE, LPBITMAPFILEHEADER)
HANDLE | ReadDIBFile (HANDLE)
HANDLE | ReadDIBRsrc (HINSTANCE, HRSRC)
HBITMAP | LoadDIB (LPSTR)
BOOL | SaveDIB (HBITMAP, LPSTR)
HBITMAP | CreateDIB (DWORD, DWORD, WORD, HPALETTE)
HBITMAP | CopyScreenToBitmap (HWND, LPRECT)
HBITMAP | DIBToBitmap (HBITMAP)
HANDLE | DDBtoDIB (HBITMAP, WORD, HPALETTE)
BOOL | SaveBmpFromDDB (HDC, HBITMAP, PSTR)

Define Documentation

#define BFT_BITMAP 0x4d42

Definition at line 18 of file dib.h.

#define BM_ALLOC | ( | nb,
 |  | size | ) | GlobalAllocPtr( GHND, (nb)*(size) )

Definition at line 15 of file dib.h.

#define BM_FREE ( ptr ) GlobalFreePtr(ptr)

Definition at line 16 of file dib.h.

#define DIB_HEADER_MARKER ((WORD) ('M' << 8) | 'B')

Definition at line 4 of file dib.h.

Referenced by SaveDIB().

#define SIZEOF_BITMAPFILEHEADER_PACKED

Value:

(   \
    sizeof(WORD) +      /* bfType      */   \
    sizeof(DWORD) +     /* bfSize      */   \
    sizeof(WORD) +      /* bfReserved1 */   \
    sizeof(WORD) +      /* bfReserved2 */   \
    sizeof(DWORD))
Definition at line 24 of file dib.h.

#define WIDTHBYTES ( i ) ((i+31)/32*4)

Definition at line 6 of file dib.h.

Referenced by CreateDIB(), DDBtoDIB(), SaveDIB(), and UMakeBitmap().

#define WIDTHBYTES16 ( i ) ((i+15)/16*2)

Definition at line 7 of file dib.h.

#define WIDTHBYTES8 ( i ) ((i+7)/8)

Definition at line 8 of file dib.h.

Referenced by UMakeBitmap().

Function Documentation

HBITMAP CopyScreenToBitmap | ( | HWND | ,
 |  | LPRECT |
 | ) |

Definition at line 848 of file dib.c.

References IsRectEmpty(), and NULL.

00849 {
00850     HDC         hScrDC, hMemDC;         /*  screen DC and memory DC */
00851     HBITMAP     hBitmap, hOldBitmap;    /*  handles to deice-dependent bitmaps */
00852     int         nX, nY, nX2, nY2;       /*  coordinates of rectangle to grab */
00853     int         nWidth, nHeight;        /*  DIB width and height */
00854     int         xScrn, yScrn;           /*  screen resolution */
00855     /*  check for an empty rectangle */
00856
00857     if (IsRectEmpty(lpRect))
00858       return NULL;
00859
00860     /*  create a DC for the screen and create */
00861     /*  a memory DC compatible to screen DC */
00862
00863     /* hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL); */
00864     /* hMemDC = CreateCompatibleDC(hScrDC); */
00865     hScrDC = GetDC(win);
00866     hMemDC = CreateCompatibleDC (hScrDC);
00867     /*  get points of rectangle to grab */
00868
00869     nX = lpRect->left;
00870     nY = lpRect->top;
00871     nX2 = lpRect->right;
00872     nY2 = lpRect->bottom;
00873
00874     /*  get screen resolution */
00875
00876     xScrn = GetDeviceCaps(hScrDC, HORZRES);
00877     yScrn = GetDeviceCaps(hScrDC, VERTRES);
00878
00879     /* make sure bitmap rectangle is visible */
00880
00881     if (nX < 0)
00882         nX = 0;
00883     if (nY < 0)
00884         nY = 0;
00885     if (nX2 > xScrn)
00886         nX2 = xScrn;
00887     if (nY2 > yScrn)
00888         nY2 = yScrn;
00889
00890     nWidth = nX2 - nX;
00891     nHeight = nY2 - nY;
00892
00893     // create a bitmap compatible with the screen DC
00894     hBitmap = CreateCompatibleBitmap(hScrDC, nWidth, nHeight);
00895
00896     // select new bitmap into memory DC
00897     hOldBitmap = SelectObject(hMemDC, hBitmap);
00898
00899     // bitblt screen DC to memory DC
00900     BitBlt(hMemDC, 0, 0, nWidth, nHeight, hScrDC, nX, nY, SRCCOPY);
00901
00902     // select old bitmap back into memory DC and get handle to
00903     // bitmap of the screen
00904
00905     hBitmap = SelectObject(hMemDC, hOldBitmap);
00906
00907     // clean up
00908
00909     ReleaseDC(win, hScrDC);
00910     DeleteDC(hMemDC);
00911
00912     // return handle to the bitmap
00913
00914     return hBitmap;
00915 }

Here is the call graph for this function:

HBITMAP CreateDIB | ( | DWORD | ,
 |  | DWORD | ,
 |  | WORD | ,
 |  | HPALETTE |
 | ) |

Definition at line 201 of file dib.c.

References NULL, PaletteSize(), and WIDTHBYTES.

Referenced by UMakeBitmap().

00202 {
00203     BITMAPINFOHEADER    bi;             /*  bitmap header */
00204     LPBITMAPINFOHEADER  lpbi;           /*  pointer to BITMAPINFOHEADER */
00205     DWORD               dwLen;          /*  size of memory block */
00206     HBITMAP             hDIB;
00207     DWORD               dwBytesPerLine; /*  Number of bytes per scanline */
00208
00209
00210     /*  Make sure bits per pixel is valid */
00211
00212     if (wBitCount <= 1)
00213         wBitCount = 1;
00214     else if (wBitCount <= 4)
00215         wBitCount = 4;
00216     else if (wBitCount <= 8)
00217         wBitCount = 8;
00218     else if (wBitCount <= 24)
00219         wBitCount = 24;
00220     else
00221         wBitCount = 4;  /*  set default value to 4 if parameter is bogus */
00222
00223     /*  initialize BITMAPINFOHEADER */
00224
00225     bi.biSize = sizeof(BITMAPINFOHEADER);
00226     bi.biWidth = dwWidth;         /*  fill in width from parameter */
00227     bi.biHeight = dwHeight;       /*  fill in height from parameter */
00228     bi.biPlanes = 1;              /*  must be 1 */
00229     bi.biBitCount = wBitCount;    /*  from parameter */
00230     bi.biCompression = BI_RGB;
00231     bi.biSizeImage = 0;           /*  0's here mean "default" */
00232     bi.biXPelsPerMeter = 0;
00233     bi.biYPelsPerMeter = 0;
00234     bi.biClrUsed = 0;
00235     bi.biClrImportant = 0;
00236
00237     /*  calculate size of memory block required to store the DIB.  This */
00238     /*  block should be big enough to hold the BITMAPINFOHEADER, the color */
00239     /*  table, and the bits */
00240
00241     dwBytesPerLine = WIDTHBYTES(wBitCount * dwWidth);
00242     dwLen = bi.biSize + PaletteSize((LPSTR)&bi) + (dwBytesPerLine * dwHeight);
00243
00244     /*  alloc memory block to store our bitmap */
00245
00246     hDIB = GlobalAlloc(GHND, dwLen);
00247
00248     /*  major bummer if we couldn't get memory block */
00249
00250     if (!hDIB)
00251         return NULL;
00252
00253     /*  lock memory and get pointer to it */
00254
00255     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00256
00257     /*  use our bitmap info structure to fill in first part of */
00258     /*  our DIB with the BITMAPINFOHEADER */
00259
00260     *lpbi = bi;
00261
00262     /*
00263      * Copy the palette in the new created image
00264      */
00265     if (wBitCount == 8)
00266     {
00267         PALETTEENTRY pal[256];
00268         RGBQUAD *pRgb;
00269         int i;
00270
00271         GetPaletteEntries(hPal, 0, 256, pal);
00272
00273         pRgb = (RGBQUAD FAR *)((LPSTR)lpbi + (WORD)lpbi->biSize);
00274
00275         /* Fill in the palette entries from the DIB color table and
00276          * create a logical color palette.
00277          */
00278         for (i = 0; i < 256; i++)
00279         {
00280             pRgb[i].rgbRed = pal[i].peRed;
00281             pRgb[i].rgbGreen = pal[i].peGreen;
00282             pRgb[i].rgbBlue = pal[i].peBlue;
00283         }
00284     }
00285
00286     // Since we don't know what the colortable and bits should contain,
00287     // just leave these blank.  Unlock the DIB and return the HDIB.
00288
00289     GlobalUnlock(hDIB);
00290
00291     //return handle to the DIB
00292
00293     return hDIB;
00294 }

Here is the call graph for this function:

HANDLE DDBtoDIB | ( | HBITMAP | ,
 |  | WORD | ,
 |  | HPALETTE |
 | ) |

Definition at line 962 of file dib.c.

References NULL, PaletteSize(), and WIDTHBYTES.

00966 {
00967     BITMAP               bm;
00968     BITMAPINFOHEADER     bi;
00969     BITMAPINFOHEADER FAR *lpbi;
00970     DWORD                dwLen;
00971     HANDLE               hdib;
00972     HANDLE               h;
00973     HDC                  hdc;
00974     HPALETTE oldPal;
00975
00976     if (!hbm)
00977         return NULL;
00978
00979     GetObject(hbm,sizeof(bm),(LPSTR)&bm);
00980
00981     if (biBits == 0)
00982         biBits =  bm.bmPlanes * bm.bmBitsPixel;
00983
00984     bi.biSize               = sizeof(BITMAPINFOHEADER);
00985     bi.biWidth              = bm.bmWidth;
00986     bi.biHeight             = bm.bmHeight;
00987     bi.biPlanes             = 1;
00988     bi.biBitCount           = biBits;
00989     bi.biCompression        = BI_RGB;
00990     bi.biSizeImage          = 0;
00991     bi.biXPelsPerMeter      = 0;
00992     bi.biYPelsPerMeter      = 0;
00993     bi.biClrUsed            = 0;
00994     bi.biClrImportant       = 0;
00995
00996     dwLen  = bi.biSize + PaletteSize(&bi);
00997
00998     hdc = GetDC(NULL);
00999     oldPal = SelectPalette(hdc, hPal, FALSE);
01000     RealizePalette(hdc);
01001
01002     hdib = GlobalAlloc(GHND,dwLen);
01003
01004     if (!hdib)
01005     {
01006         SelectPalette(hdc, oldPal, FALSE);
01007         ReleaseDC(NULL, hdc);
01008         return NULL;
01009     }
01010
01011     lpbi = (VOID FAR *)GlobalLock(hdib);
01012
01013     *lpbi = bi;
01014
01015     /*  call GetDIBits with a NULL lpBits param, so it will calculate the
01016      *  biSizeImage field for us
01017      */
01018     GetDIBits(hdc, hbm, 0L, (DWORD)bi.biHeight,
01019         (LPBYTE)NULL, (LPBITMAPINFO)lpbi, (DWORD)DIB_RGB_COLORS);
01020
01021     bi = *lpbi;
01022     GlobalUnlock(hdib);
01023
01024     /* If the driver did not fill in the biSizeImage field, make one up */
01025     if (bi.biSizeImage == 0)
01026         bi.biSizeImage = WIDTHBYTES((DWORD)bm.bmWidth * biBits) * bm.bmHeight;
01027
01028     /*  realloc the buffer big enough to hold all the bits */
01029     dwLen = bi.biSize + PaletteSize(&bi) + bi.biSizeImage;
01030
01031     if (h = GlobalReAlloc(hdib,dwLen,0))
01032         hdib = h;
01033     else
01034     {
01035         GlobalFree(hdib);
01036         hdib = NULL;
01037
01038         SelectPalette(hdc, oldPal, FALSE);
01039         ReleaseDC(NULL,hdc);
01040         return hdib;
01041     }
01042
01043     /*  call GetDIBits with a NON-NULL lpBits param, and actualy get the
01044      *  bits this time
01045      */
01046     lpbi = (VOID FAR *)GlobalLock(hdib);
01047
01048     if (GetDIBits( hdc,
01049                    hbm,
01050                    0L,
01051                    (DWORD)bi.biHeight,
01052                    (LPBYTE)lpbi + (WORD)lpbi->biSize + PaletteSize(lpbi),
01053                    (LPBITMAPINFO)lpbi, (DWORD)DIB_RGB_COLORS) == 0)
01054     {
01055          GlobalUnlock(hdib);
01056          hdib = NULL;
01057          SelectPalette(hdc, oldPal, FALSE);
01058          ReleaseDC(NULL,hdc);
01059          return NULL;
01060     }
01061
01062     bi = *lpbi;
01063     GlobalUnlock(hdib);
01064
01065     SelectPalette(hdc, oldPal, FALSE);
01066     ReleaseDC(NULL,hdc);
01067     return hdib;
01068 }

Here is the call graph for this function:

VOID DibCopyPalette | ( | HBITMAP | ,
 |  | HBITMAP |
 | ) |

Definition at line 99 of file dib.c.

References DibGetPaletteSize(), and PaletteSize().

00100 {
00101     LPBITMAPINFO src_header, dst_header;
00102     RGBQUAD *src_rgb, *dst_rgb;
00103     WORD colorMode;
00104
00105     src_header = (LPBITMAPINFO) GlobalLock((HGLOBAL)src);
00106     dst_header = (LPBITMAPINFO) GlobalLock((HGLOBAL)dst);
00107
00108     src_rgb = (RGBQUAD FAR *)((LPSTR)src_header + (WORD)src_header->bmiHeader.biSize);
00109     dst_rgb = (RGBQUAD FAR *)((LPSTR)dst_header + (WORD)dst_header->bmiHeader.biSize);
00110
00111     colorMode = DibGetPaletteSize(src_header);
00112     switch(colorMode)
00113     {
00114         case 4:
00115         case 8:
00116             memcpy(dst_rgb, src_rgb,PaletteSize(&src_header->bmiHeader));
00117             break;
00118     }
00119
00120     GlobalUnlock((HGLOBAL)src);
00121     GlobalUnlock((HGLOBAL)dst);
00122 }

Here is the call graph for this function:

WORD DibGetPaletteSize ( VOID FAR * )

Definition at line 69 of file dib.c.

Referenced by DibCopyPalette().

00070 {
00071     INT                 bits;
00072     LPBITMAPINFOHEADER  lpbi;
00073     LPBITMAPCOREHEADER  lpbc;
00074
00075     lpbi = ((LPBITMAPINFOHEADER)pv);
00076     lpbc = ((LPBITMAPCOREHEADER)pv);
00077
00078     /*  With the BITMAPINFO format headers, the size of the palette
00079      *  is in biClrUsed, whereas in the BITMAPCORE - style headers, it
00080      *  is dependent on the bits per pixel ( = 2 raised to the power of
00081      *  bits/pixel).
00082      */
00083     if (lpbi->biSize != sizeof(BITMAPCOREHEADER))
00084         bits = lpbi->biBitCount;
00085     else
00086         bits = lpbc->bcBitCount;
00087
00088     return bits;
00089 }

WORD DibNumColors ( VOID FAR * )

Definition at line 24 of file dib.c.

Referenced by PaletteSize().

00025 {
00026     INT                 bits;
00027     LPBITMAPINFOHEADER  lpbi;
00028     LPBITMAPCOREHEADER  lpbc;
00029
00030     lpbi = ((LPBITMAPINFOHEADER)pv);
00031     lpbc = ((LPBITMAPCOREHEADER)pv);
00032
00033     /*  With the BITMAPINFO format headers, the size of the palette
00034      *  is in biClrUsed, whereas in the BITMAPCORE - style headers, it
00035      *  is dependent on the bits per pixel ( = 2 raised to the power of
00036      *  bits/pixel).
00037      */
00038     if (lpbi->biSize != sizeof(BITMAPCOREHEADER)){
00039         if (lpbi->biClrUsed != 0)
00040             return (WORD)lpbi->biClrUsed;
00041         bits = lpbi->biBitCount;
00042     }
00043     else
00044         bits = lpbc->bcBitCount;
00045
00046     switch (bits){
00047         case 1:
00048                 return 2;
00049         case 4:
00050                 return 16;
00051         case 8:
00052                 return 256;
00053         default:
00054                 /* A 24 bitcount DIB has no color table */
00055                 return 0;
00056     }
00057 }

HBITMAP DIBToBitmap ( HBITMAP )

Definition at line 919 of file dib.c.

References NULL, and PaletteSize().

Referenced by UMakeBitmap().

00921 {
00922     LPSTR       lpDIBHdr, lpDIBBits;  // pointer to DIB header, pointer to DIB bits
00923     HBITMAP     hBitmap;            // handle to device-dependent bitmap
00924     HDC         hDC;                    // handle to DC
00925
00926     if (!hDIB)
00927         return NULL;
00928
00929     /* lock memory block and get a pointer to it */
00930     lpDIBHdr = GlobalLock(hDIB);
00931     lpDIBBits = lpDIBHdr + *(LPDWORD)lpDIBHdr + PaletteSize(lpDIBHdr);
00932
00933     /* get a DC */
00934     hDC = GetDC(NULL);
00935     if (!hDC)
00936     {
00937         GlobalUnlock(hDIB);
00938         return NULL;
00939     }
00940
00941     /* create bitmap from DIB info. and bits */
00942     hBitmap = CreateDIBitmap(hDC, (LPBITMAPINFOHEADER)lpDIBHdr, CBM_INIT,
00943             lpDIBBits, (LPBITMAPINFO)lpDIBHdr, DIB_RGB_COLORS);
00944
00945
00946     ReleaseDC(NULL, hDC);
00947     GlobalUnlock(hDIB);
00948     return hBitmap;
00949 }

Here is the call graph for this function:

HBITMAP LoadDIB ( LPSTR )

Definition at line 480 of file dib.c.

References NULL, and ReadDIBFile().

00481 {
00482     HBITMAP     hDIB;
00483     HANDLE      hFile;
00484
00485     if ((hFile = CreateFile(lpFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
00486             OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
00487             NULL)) != INVALID_HANDLE_VALUE)
00488     {
00489         hDIB = ReadDIBFile(hFile);
00490         CloseHandle(hFile);
00491         return hDIB;
00492     }
00493     else
00494         return NULL;
00495 }

Here is the call graph for this function:

WORD PaletteSize ( VOID FAR * )

Definition at line 136 of file dib.c.

References DibNumColors().

Referenced by CreateDIB(), DDBtoDIB(), DibCopyPalette(), DIBToBitmap(), SaveDIB(), and UMakeBitmap().

00137 {
00138     LPBITMAPINFOHEADER lpbi;
00139     WORD               NumColors;
00140
00141     lpbi      = (LPBITMAPINFOHEADER)pv;
00142     NumColors = DibNumColors(lpbi);
00143
00144     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
00145         return (WORD)(NumColors * sizeof(RGBTRIPLE));
00146     else
00147         return (WORD)(NumColors * sizeof(RGBQUAD));
00148 }

Here is the call graph for this function:

HANDLE ReadDIBFile ( HANDLE )

Definition at line 324 of file dib.c.

References NULL.

Referenced by LoadDIB().

00325 {
00326     BITMAPFILEHEADER    bmfHeader;
00327     DWORD               dwBitsSize;
00328     UINT                nNumColors;   /*  Number of colors in table */
00329     HANDLE              hDIB;
00330     HANDLE              hDIBtmp;      /*  Used for GlobalRealloc() //MPB */
00331     LPBITMAPINFOHEADER  lpbi;
00332     DWORD               offBits;
00333     DWORD               dwRead;
00334
00335     /*  get length of DIB in bytes for use when reading */
00336
00337     dwBitsSize = GetFileSize(hFile, NULL);
00338
00339     /*  Allocate memory for header & color table. We'll enlarge this */
00340     /*  memory as needed. */
00341
00342     hDIB = GlobalAlloc(GMEM_MOVEABLE, (DWORD)(sizeof(BITMAPINFOHEADER) +
00343             256 * sizeof(RGBQUAD)));
00344
00345     if (!hDIB)
00346         return NULL;
00347
00348     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00349
00350     if (!lpbi)
00351     {
00352         GlobalFree(hDIB);
00353         return NULL;
00354     }
00355
00356     /*  read the BITMAPFILEHEADER from our file */
00357
00358     if (!ReadFile(hFile, (LPSTR)&bmfHeader, sizeof (BITMAPFILEHEADER),
00359             &dwRead, NULL))
00360         goto ErrExit;
00361
00362     if (sizeof (BITMAPFILEHEADER) != dwRead)
00363         goto ErrExit;
00364
00365     if (bmfHeader.bfType != 0x4d42)  /*  'BM' */
00366         goto ErrExit;
00367
00368     /*  read the BITMAPINFOHEADER */
00369
00370     if (!ReadFile(hFile, (LPSTR)lpbi, sizeof(BITMAPINFOHEADER), &dwRead,
00371             NULL))
00372         goto ErrExit;
00373
00374     if (sizeof(BITMAPINFOHEADER) != dwRead)
00375         goto ErrExit;
00376
00377     /*  Check to see that it's a Windows DIB -- an OS/2 DIB would cause */
00378     /*  strange problems with the rest of the DIB API since the fields */
00379     /*  in the header are different and the color table entries are */
00380     /*  smaller. */
00381     /*  */
00382     /*  If it's not a Windows DIB (e.g. if biSize is wrong), return NULL. */
00383
00384     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
00385         goto ErrExit;
00386
00387     /*  Now determine the size of the color table and read it.  Since the */
00388     /*  bitmap bits are offset in the file by bfOffBits, we need to do some */
00389     /*  special processing here to make sure the bits directly follow */
00390     /*  the color table (because that's the format we are susposed to pass */
00391     /*  back) */
00392
00393     if (!(nNumColors = (UINT)lpbi->biClrUsed))
00394     {
00395         /*  no color table for 24-bit, default size otherwise */
00396
00397         if (lpbi->biBitCount != 24)
00398             nNumColors = 1 << lpbi->biBitCount; /*  standard size table */
00399     }
00400
00401     /*  fill in some default values if they are zero */
00402
00403     if (lpbi->biClrUsed == 0)
00404         lpbi->biClrUsed = nNumColors;
00405
00406     if (lpbi->biSizeImage == 0)
00407     {
00408         lpbi->biSizeImage = ((((lpbi->biWidth * (DWORD)lpbi->biBitCount) +
00409                 31) & ~31) >> 3) * lpbi->biHeight;
00410     }
00411
00412     /*  get a proper-sized buffer for header, color table and bits */
00413
00414     GlobalUnlock(hDIB);
00415     hDIBtmp = GlobalReAlloc(hDIB, lpbi->biSize + nNumColors *
00416             sizeof(RGBQUAD) + lpbi->biSizeImage, 0);
00417
00418     if (!hDIBtmp) /*  can't resize buffer for loading */
00419         goto ErrExitNoUnlock; /* MPB */
00420     else
00421         hDIB = hDIBtmp;
00422
00423     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00424
00425     /*  read the color table */
00426
00427     ReadFile (hFile, (LPSTR)(lpbi) + lpbi->biSize,
00428             nNumColors * sizeof(RGBQUAD), &dwRead, NULL);
00429
00430     /*  offset to the bits from start of DIB header */
00431
00432     offBits = lpbi->biSize + nNumColors * sizeof(RGBQUAD);
00433
00434     /*  If the bfOffBits field is non-zero, then the bits might *not* be */
00435     /*  directly following the color table in the file.  Use the value in */
00436     /*  bfOffBits to seek the bits. */
00437
00438     if (bmfHeader.bfOffBits != 0L)
00439         SetFilePointer(hFile, bmfHeader.bfOffBits, NULL, FILE_BEGIN);
00440
00441     if (ReadFile(hFile, (LPSTR)lpbi + offBits, lpbi->biSizeImage, &dwRead,
00442             NULL))
00443         goto OKExit;
00444
00445
00446 ErrExit:
00447     GlobalUnlock(hDIB);
00448
00449 ErrExitNoUnlock:
00450     GlobalFree(hDIB);
00451     return NULL;
00452
00453 OKExit:
00454     GlobalUnlock(hDIB);
00455     return hDIB;
00456 }

HANDLE ReadDIBRsrc | ( | HINSTANCE | ,
 |  | HRSRC |
 | ) |

Definition at line 1098 of file dib.c.

References NULL.

01099 {
01100     BITMAPFILEHEADER    bmfHeader;
01101     DWORD               dwBitsSize;
01102     UINT                nNumColors;   /*  Number of colors in table */
01103     HANDLE              hDIB;
01104     HANDLE              hDIBtmp;      /*  Used for GlobalRealloc() //MPB */
01105     LPBITMAPINFOHEADER  lpbi;
01106     DWORD               offBits;
01107     LPSTR               rsrcptr, beginrsrc;
01108     HGLOBAL             hg;
01109
01110     /*  get length of DIB in bytes for use when reading */
01111
01112     hg = LoadResource(hInst, hRsrc);
01113     if(hg == NULL)
01114         return NULL;
01115
01116     beginrsrc = rsrcptr = LockResource(hg);
01117     dwBitsSize = SizeofResource(hInst, hRsrc);
01118
01119     /*  Allocate memory for header & color table. We'll enlarge this */
01120     /*  memory as needed. */
01121
01122     hDIB = GlobalAlloc(GMEM_MOVEABLE, (DWORD)(sizeof(BITMAPINFOHEADER) +
01123             256 * sizeof(RGBQUAD)));
01124
01125     if (!hDIB)
01126         goto ErrExitRsrc;
01127
01128     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
01129
01130     if (!lpbi)
01131     {
01132         GlobalFree(hDIB);
01133         goto ErrExitRsrc;
01134     }
01135
01136     /*  read the BITMAPFILEHEADER from our file */
01137
01138     memcpy(&bmfHeader, rsrcptr, sizeof (BITMAPFILEHEADER));
01139     rsrcptr += sizeof (BITMAPFILEHEADER);
01140
01141     if (bmfHeader.bfType != 0x4d42)  /*  'BM' */
01142         goto ErrExit;
01143
01144     /*  read the BITMAPINFOHEADER */
01145
01146     memcpy(lpbi, rsrcptr, sizeof(BITMAPINFOHEADER));
01147     rsrcptr += sizeof (BITMAPINFOHEADER);
01148
01149     /*  Check to see that it's a Windows DIB -- an OS/2 DIB would cause */
01150     /*  strange problems with the rest of the DIB API since the fields */
01151     /*  in the header are different and the color table entries are */
01152     /*  smaller. */
01153     /*  */
01154     /*  If it's not a Windows DIB (e.g. if biSize is wrong), return NULL. */
01155
01156     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
01157         goto ErrExit;
01158
01159     /*  Now determine the size of the color table and read it.  Since the */
01160     /*  bitmap bits are offset in the file by bfOffBits, we need to do some */
01161     /*  special processing here to make sure the bits directly follow */
01162     /*  the color table (because that's the format we are susposed to pass */
01163     /*  back) */
01164
01165     if (!(nNumColors = (UINT)lpbi->biClrUsed))
01166     {
01167         /*  no color table for 24-bit, default size otherwise */
01168
01169         if (lpbi->biBitCount != 24)
01170             nNumColors = 1 << lpbi->biBitCount; /*  standard size table */
01171     }
01172
01173     /*  fill in some default values if they are zero */
01174
01175     if (lpbi->biClrUsed == 0)
01176         lpbi->biClrUsed = nNumColors;
01177
01178     if (lpbi->biSizeImage == 0)
01179     {
01180         lpbi->biSizeImage = ((((lpbi->biWidth * (DWORD)lpbi->biBitCount) +
01181                 31) & ~31) >> 3) * lpbi->biHeight;
01182     }
01183
01184     /*  get a proper-sized buffer for header, color table and bits */
01185
01186     GlobalUnlock(hDIB);
01187     hDIBtmp = GlobalReAlloc(hDIB, lpbi->biSize + nNumColors *
01188             sizeof(RGBQUAD) + lpbi->biSizeImage, 0);
01189
01190     if (!hDIBtmp) /*  can't resize buffer for loading */
01191         goto ErrExitNoUnlock; /* MPB */
01192     else
01193         hDIB = hDIBtmp;
01194
01195     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
01196
01197     /*  read the color table */
01198
01199     memcpy((LPSTR)(lpbi) + lpbi->biSize, rsrcptr, nNumColors * sizeof(RGBQUAD));
01200     rsrcptr += nNumColors * sizeof(RGBQUAD);
01201
01202     /*  offset to the bits from start of DIB header */
01203     offBits = lpbi->biSize + nNumColors * sizeof(RGBQUAD);
01204
01205     /*  If the bfOffBits field is non-zero, then the bits might *not* be */
01206     /*  directly following the color table in the file.  Use the value in */
01207     /*  bfOffBits to seek the bits. */
01208
01209     if (bmfHeader.bfOffBits != 0L)
01210         rsrcptr = beginrsrc + bmfHeader.bfOffBits;
01211
01212     memcpy((LPSTR)lpbi + offBits, rsrcptr, lpbi->biSizeImage);
01213     goto OKExit;
01214
01215 ErrExit:
01216     GlobalUnlock(hDIB);
01217
01218 ErrExitNoUnlock:
01219     GlobalFree(hDIB);
01220 ErrExitRsrc:
01221     FreeResource(hg);
01222     return NULL;
01223
01224 OKExit:
01225     FreeResource(hg);
01226     GlobalUnlock(hDIB);
01227     return hDIB;
01228 }

BOOL SaveBmpFromDDB | ( | HDC | ,
 |  | HBITMAP | ,
 |  | PSTR |
 | ) |

Definition at line 506 of file dib.c.

References NULL.

00507 {
00508     int         hFile;
00509     OFSTRUCT    ofReOpenBuff;
00510     HBITMAP     hTmpBmp, hBmpOld;
00511     BOOL        bSuccess;
00512     BITMAPFILEHEADER    bfh;
00513     PBITMAPINFO pbmi;
00514     PBYTE       pBits;
00515     BITMAPINFO  bmi;
00516     PBYTE pjTmp, pjTmpBmi;
00517     ULONG sizBMI;
00518
00519
00520     bSuccess = TRUE;
00521 #if 0
00522     if (ghPal) {
00523         SelectPalette(hDC, ghPal, FALSE);
00524         RealizePalette(hDC);
00525     }
00526 #endif
00527     if (!hBmp) {
00528         return FALSE;
00529     }
00530
00531     //
00532     // Let the graphics engine to retrieve the dimension of the bitmap for us
00533     // GetDIBits uses the size to determine if it's BITMAPCOREINFO or BITMAPINFO
00534     // if BitCount != 0, color table will be retrieved
00535     //
00536     bmi.bmiHeader.biSize = 0x28;              // GDI need this to work
00537     bmi.bmiHeader.biBitCount = 0;             // don't get the color table
00538     if ((GetDIBits(hDC, hBmp, 0, 0, (LPSTR)NULL, &bmi, DIB_RGB_COLORS)) == 0) {
00539         return FALSE;
00540     }
00541
00542     //
00543     // Now that we know the size of the image, alloc enough memory to retrieve
00544     // the actual bits
00545     //
00546     if ((pBits = (PBYTE)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT,
00547                 bmi.bmiHeader.biSizeImage)) == NULL) {
00548         return FALSE;
00549     }
00550
00551     //
00552     // Note: 24 bits per pixel has no color table.  So, we don't have to
00553     // allocate memory for retrieving that.  Otherwise, we do.
00554     //
00555     pbmi = &bmi;                                      // assume no color table
00556
00557     switch (bmi.bmiHeader.biBitCount) {
00558         case 24:                                      // has color table
00559             sizBMI = sizeof(BITMAPINFOHEADER);
00560             break;
00561         case 16:
00562         case 32:
00563             sizBMI = sizeof(BITMAPINFOHEADER)+sizeof(DWORD)*3;
00564             break;
00565         default:
00566             sizBMI = sizeof(BITMAPINFOHEADER)+sizeof(RGBQUAD)*(1<<bmi.bmiHeader.biBitCount);
00567             break;
00568
00569     }
00570
00571     //
00572     // Allocate memory for color table if it is not 24bpp...
00573     //
00574     if (sizBMI != sizeof(BITMAPINFOHEADER)) {
00575         ULONG       sizTmp;
00576         //
00577         // I need more memory for the color table
00578         //
00579         if ((pbmi = (PBITMAPINFO)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, sizBMI )) == NULL) {
00580             bSuccess = FALSE;
00581             goto ErrExit1;
00582         }
00583         //
00584         // Now that we've a bigger chunk of memory, let's copy the Bitmap
00585         // info header data over
00586         //
00587         pjTmp = (PBYTE)pbmi;
00588         pjTmpBmi = (PBYTE)&bmi;
00589         sizTmp = sizeof(BITMAPINFOHEADER);
00590
00591         while(sizTmp--)
00592         {
00593             *(((PBYTE)pjTmp)++) = *((pjTmpBmi)++);
00594         }
00595     }
00596
00597     //
00598     // Let's open the file and get ready for writing
00599     //
00600     if ((hFile = OpenFile(pszFileName, (LPOFSTRUCT)&ofReOpenBuff,
00601                  OF_CREATE | OF_WRITE)) == -1) {
00602         goto ErrExit2;
00603     }
00604
00605     //
00606     // But first, fill in the info for the BitmapFileHeader
00607     //
00608     bfh.bfType = 0x4D42;                            // 'BM'
00609     bfh.bfSize = sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER)+sizBMI+
00610         pbmi->bmiHeader.biSizeImage;
00611     bfh.bfReserved1 =
00612     bfh.bfReserved2 = 0;
00613     bfh.bfOffBits = sizeof(BITMAPFILEHEADER)+sizBMI;
00614
00615     //
00616     // Write out the file header now
00617     //
00618     if (_lwrite(hFile, (LPSTR)&bfh, sizeof(BITMAPFILEHEADER)) == -1) {
00619         bSuccess = FALSE;
00620         goto ErrExit3;
00621     }
00622
00623     //
00624     // Bitmap can't be selected into a DC when calling GetDIBits
00625     // Assume that the hDC is the DC where the bitmap would have been selected
00626     // if indeed it has been selected
00627     //
00628     if (hTmpBmp = CreateCompatibleBitmap(hDC, pbmi->bmiHeader.biWidth, pbmi->bmiHeader.biHeight)) {
00629         hBmpOld = SelectObject(hDC, hTmpBmp);
00630         if ((GetDIBits(hDC, hBmp, 0, pbmi->bmiHeader.biHeight, (LPSTR)pBits, pbmi, DIB_RGB_COLORS))==0){
00631             bSuccess = FALSE;
00632             goto ErrExit4;
00633         }
00634     } else {
00635         bSuccess = FALSE;
00636         goto ErrExit3;
00637     }
00638
00639     //
00640     // Now write out the BitmapInfoHeader and color table, if any
00641     //
00642     if (_lwrite(hFile, (LPSTR)pbmi, sizBMI) == -1) {
00643         bSuccess = FALSE;
00644         goto ErrExit4;
00645     }
00646
00647     //
00648     // write the bits also
00649     //
00650     if (_lwrite(hFile, (LPSTR)pBits, pbmi->bmiHeader.biSizeImage) == -1) {
00651         bSuccess = FALSE;
00652         goto ErrExit4;
00653     }
00654
00655
00656 ErrExit4:
00657     SelectObject(hDC, hBmpOld);
00658     DeleteObject(hTmpBmp);
00659 ErrExit3:
00660     _lclose(hFile);
00661 ErrExit2:
00662     GlobalFree(pbmi);
00663 ErrExit1:
00664     GlobalFree(pBits);
00665     return bSuccess;
00666 }

BOOL SaveDIB | ( | HBITMAP | ,
 |  | LPSTR |
 | ) |

Definition at line 702 of file dib.c.

References DIB_HEADER_MARKER, NULL, PaletteSize(), and WIDTHBYTES.

00703 {
00704     BITMAPFILEHEADER    bmfHdr;     /*  Header for Bitmap file */
00705     LPBITMAPINFOHEADER  lpBI;       /*  Pointer to DIB info structure */
00706     HANDLE              fh;         /*  file handle for opened file */
00707     DWORD               dwDIBSize;
00708     DWORD               dwWritten;
00709
00710     if (!hDib)
00711         return FALSE;
00712
00713     fh = CreateFile(lpFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
00714             FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
00715
00716     if (fh == INVALID_HANDLE_VALUE)
00717         return FALSE;
00718
00719     /*  Get a pointer to the DIB memory, the first of which contains */
00720     /*  a BITMAPINFO structure */
00721
00722     lpBI = (LPBITMAPINFOHEADER)GlobalLock(hDib);
00723     if (!lpBI)
00724     {
00725         CloseHandle(fh);
00726         return FALSE;
00727     }
00728
00729     /*  Check to see if we're dealing with an OS/2 DIB.  If so, don't */
00730     /*  save it because our functions aren't written to deal with these */
00731     /*  DIBs. */
00732
00733     if (lpBI->biSize != sizeof(BITMAPINFOHEADER))
00734     {
00735         GlobalUnlock(hDib);
00736         CloseHandle(fh);
00737         return FALSE;
00738     }
00739
00740     /*  Fill in the fields of the file header */
00741
00742     /*  Fill in file type (first 2 bytes must be "BM" for a bitmap) */
00743
00744     bmfHdr.bfType = DIB_HEADER_MARKER;  /*  "BM" */
00745
00746     /*  Calculating the size of the DIB is a bit tricky (if we want to */
00747     /*  do it right).  The easiest way to do this is to call GlobalSize() */
00748     /*  on our global handle, but since the size of our global memory may have */
00749     /*  been padded a few bytes, we may end up writing out a few too */
00750     /*  many bytes to the file (which may cause problems with some apps, */
00751     /*  like HC 3.0). */
00752     /*  */
00753     /*  So, instead let's calculate the size manually. */
00754     /*  */
00755     /*  To do this, find size of header plus size of color table.  Since the */
00756     /*  first DWORD in both BITMAPINFOHEADER and BITMAPCOREHEADER conains */
00757     /*  the size of the structure, let's use this. */
00758
00759     /*  Partial Calculation */
00760
00761     dwDIBSize = *(LPDWORD)lpBI + PaletteSize((LPSTR)lpBI);
00762
00763     /*  Now calculate the size of the image */
00764
00765     /*  It's an RLE bitmap, we can't calculate size, so trust the biSizeImage */
00766     /*  field */
00767
00768     if ((lpBI->biCompression == BI_RLE8) || (lpBI->biCompression == BI_RLE4))
00769         dwDIBSize += lpBI->biSizeImage;
00770     else
00771     {
00772         DWORD dwBmBitsSize;  /*  Size of Bitmap Bits only */
00773
00774         /*  It's not RLE, so size is Width (DWORD aligned) * Height */
00775
00776         dwBmBitsSize = WIDTHBYTES((lpBI->biWidth)*((DWORD)lpBI->biBitCount)) *
00777                 lpBI->biHeight;
00778
00779         dwDIBSize += dwBmBitsSize;
00780
00781         /*  Now, since we have calculated the correct size, why don't we */
00782         /*  fill in the biSizeImage field (this will fix any .BMP files which  */
00783         /*  have this field incorrect). */
00784
00785         lpBI->biSizeImage = dwBmBitsSize;
00786     }
00787
00788
00789     /*  Calculate the file size by adding the DIB size to sizeof(BITMAPFILEHEADER) */
00790
00791     bmfHdr.bfSize = dwDIBSize + sizeof(BITMAPFILEHEADER);
00792     bmfHdr.bfReserved1 = 0;
00793     bmfHdr.bfReserved2 = 0;
00794
00795     /*  Now, calculate the offset the actual bitmap bits will be in */
00796     /*  the file -- It's the Bitmap file header plus the DIB header, */
00797     /*  plus the size of the color table. */
00798
00799     bmfHdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + lpBI->biSize +
00800             PaletteSize((LPSTR)lpBI);
00801
00802     /*  Write the file header */
00803
00804     WriteFile(fh, (LPSTR)&bmfHdr, sizeof(BITMAPFILEHEADER), &dwWritten, NULL);
00805
00806     /*  Write the DIB header and the bits -- use local version of */
00807     /*  MyWrite, so we can write more than 32767 bytes of data */
00808
00809     WriteFile(fh, (LPSTR)lpBI, dwDIBSize, &dwWritten, NULL);
00810
00811     GlobalUnlock(hDib);
00812     CloseHandle(fh);
00813
00814     if (dwWritten == 0)
00815         return FALSE; /*  oops, something happened in the write */
00816     else
00817         return TRUE; /*  Success code */
00818 }

Here is the call graph for this function:

VOID WriteMapFileHeaderandConvertFromDwordAlignToPacked | ( | HFILE | ,
 |  | LPBITMAPFILEHEADER |
 | ) |

Definition at line 160 of file dib.c.

00161 {
00162
00163         /* write bfType*/
00164     _lwrite(fh, (LPSTR)&pbf->bfType, (UINT)sizeof (WORD));
00165         /* now pass over extra word, and only write next 3 DWORDS!*/
00166         _lwrite(fh, (LPSTR)&pbf->bfSize, sizeof(DWORD) * 3);
00167 }

Generated on Sat Aug 7 22:46:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoButton.cpp File Reference

rf/support/mfc/PseudoButton.cpp File Reference

#include "stdafx.h"
#include "umain.h"
#include "PseudoButton.h"
#include "dib.h"
#include <map>
#include <string.h>

Include dependency graph for PseudoButton.cpp:

Include dependency graph

Go to the source code of this file.

Functions

const BYTE * | nextLine (const BYTE *src, CString &line)
HBITMAP | UMakeBitmap (const void *icon, int &width, int &height, UTB_KIND kind, COLORREF back, COLORREF fore, bool enabled)
HBITMAP | UMakeBitmap (const void *icon, int width, int height, UTB_KIND kind, bool enabled)

Function Documentation

const BYTE* nextLine | ( | const BYTE * | src,
 |  | CString & | line
 | ) | [static]

Definition at line 285 of file PseudoButton.cpp.

Referenced by UMakeBitmap().

00286 {
00287     const char *tmp = strchr((const char *)src, '\n');
00288     if(tmp == 0L)
00289         return 0L;
00290
00291     line = CString((const char *)src, tmp - (const char *)src - 1);
00292     src = (const BYTE *)tmp + 1;
00293     return src;
00294 }

HBITMAP UMakeBitmap | ( | const void * | icon,
 |  | int | width,
 |  | int | height,
 |  | UTB_KIND | kind,
 |  | bool | enabled
 | ) |

Definition at line 542 of file PseudoButton.cpp.

00543 {
00544     return UMakeBitmap(icon, width, height, kind,
00545         ::GetSysColor(COLOR_BTNFACE), ::GetSysColor(COLOR_BTNTEXT), enabled);
00546 }

HBITMAP UMakeBitmap | ( | const void * | icon,
 |  | int & | width,
 |  | int & | height,
 |  | UTB_KIND | kind,
 |  | COLORREF | back,
 |  | COLORREF | fore,
 |  | bool | enabled
 | ) |

Definition at line 296 of file PseudoButton.cpp.

00298 {
00299     if( kind == DD_BMAP)
00300     {
00301         HBITMAP hbitmap;
00302         LPBITMAPINFO header;
00303         BYTE *image, *src = (BYTE *)icon, c, k;
00304         RGBQUAD *pRgb;
00305
00306         hbitmap = CreateDIB(width, height, 1, 0L);
00307         header = (LPBITMAPINFO)GlobalLock(hbitmap);
00308         image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00309         pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00310
00311         pRgb->rgbRed = GetRValue(back);
00312         pRgb->rgbGreen = GetGValue(back);
00313         pRgb->rgbBlue = GetBValue(back);
00314         pRgb->rgbReserved = 0;
00315         pRgb++;
00316         pRgb->rgbRed = GetRValue(fore);
00317         pRgb->rgbGreen = GetGValue(fore);
00318         pRgb->rgbBlue = GetBValue(fore);
00319         pRgb->rgbReserved = 0;
00320
00321         int row = WIDTHBYTES(width * 1);
00322         int row2 = WIDTHBYTES8(width * 1);
00323         for(int y = 0; y < height; y++)
00324         {
00325             BYTE *ptr = image + row * (height - y - 1);
00326             for(int x = 0; x < row2; x++)
00327             {
00328                 c = *src++;
00329                 k = 0;
00330                 int n = 8;
00331                 while(n--)
00332                 {
00333                     if(c & 1)
00334                         k |= 1 << n;
00335                     c = c >> 1;
00336                 }
00337                 *ptr++ = k;
00338             }
00339         }
00340
00341         GlobalUnlock(hbitmap);
00342
00343         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00344         GlobalFree((HGLOBAL)hbitmap);
00345
00346         return ddbbmap;
00347     }
00348     else if(kind == DD_PIXMAP)
00349     {
00350         const BYTE *src = (BYTE *)icon;
00351         CString aline;
00352
00353         src = nextLine(src, aline);
00354         if(src == 0L)
00355             return 0L;
00356
00357         // read the header
00358         int w, h, nc, cpp, i, x, y;
00359         if(sscanf(aline, "%d%d%d%d", &w, &h, &nc, &cpp) != 4)
00360             return 0L;
00361
00362         width = w;
00363         height = h;
00364
00365         HBITMAP hbitmap = CreateDIB(w, h, 8, 0L);
00366         LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00367         BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00368         RGBQUAD *pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00369
00370         // read the colormap
00371         std::map<short, BYTE> colors;
00372         for(i = 0; i < nc; i++)
00373         {
00374             src = nextLine(src, aline);
00375             if(src == 0L)
00376                 return 0L;
00377
00378             const BYTE *line = (const BYTE *)(const char *)aline;
00379             short aref;
00380             if(cpp == 1)
00381             {
00382                 aref = line[0];
00383                 line += 1;
00384             }
00385             else if(cpp == 2)
00386             {
00387                 aref = ((short)line[1] << 8)  | line[0];
00388                 line += 2;
00389             }
00390             else
00391             {
00392                 ASSERT(0);
00393                 return 0L;
00394             }
00395
00396             while(isspace(*line) && *line)
00397                 line++;
00398             if(*line++ != 'c')
00399                 return 0L;
00400
00401             while(isspace(*line) && *line)
00402                 line++;
00403             if(*line == '\0')
00404                 return 0L;
00405
00406             if(*line == '#')
00407             {
00408                 line++;
00409
00410                 if(strlen((char *)line) < 6)
00411                     return 0L;
00412
00413                 int comp[6], c;
00414                 int j;
00415                 for(j = 0; j < 6; j++)
00416                 {
00417                     c = *line++;
00418                     if(c >= '0' && c <= '9')
00419                         comp[j] = c - '0';
00420                     else if(c >= 'a' && c <= 'f')
00421                         comp[j] = c - 'a' + 10;
00422                     else if(c >= 'A' && c <= 'F')
00423                         comp[j] = c - 'A' + 10;
00424                     else
00425                         return 0L;
00426                 }
00427
00428                 colors.insert(std::make_pair(aref, i));
00429
00430                 if(i == 0)
00431                 {
00432                     COLORREF bk = back;
00433                     pRgb->rgbRed = GetRValue(bk);
00434                     pRgb->rgbGreen = GetGValue(bk);
00435                     pRgb->rgbBlue = GetBValue(bk);
00436                     pRgb->rgbReserved = 0;
00437                 }
00438                 else
00439                 {
00440                     COLORREF color = RGB(comp[0]*16+comp[1],comp[2]*16+comp[3],comp[4]*16+comp[5]);
00441                     if(!enabled)
00442                         color = fore;
00443                     pRgb->rgbRed = GetRValue(color);
00444                     pRgb->rgbGreen = GetGValue(color);
00445                     pRgb->rgbBlue = GetBValue(color);
00446                     pRgb->rgbReserved = 0;
00447                 }
00448             }
00449             else if(strcmp((char *)line, "None") == 0)
00450             {
00451                 colors.insert(std::make_pair(aref, i));
00452                 COLORREF bk = back;
00453                 pRgb->rgbRed = GetRValue(bk);
00454                 pRgb->rgbGreen = GetGValue(bk);
00455                 pRgb->rgbBlue = GetBValue(bk);
00456                 pRgb->rgbReserved = 0;
00457             }
00458             else
00459                 return 0L;
00460             pRgb++;
00461         }
00462
00463         if(nc != colors.size() || nc > 256)
00464             return 0L;
00465
00466         // make the bitmap
00467         for(y = 0; y < h; y++)
00468         {
00469             src = nextLine(src, aline);
00470             if(src == 0L)
00471                 return 0L;
00472
00473             const BYTE *line = (const BYTE *)(const char *)aline;
00474             BYTE *ptr = image + WIDTHBYTES(w * 8) * (h - y - 1);
00475             for(x = 0; x < w; x++)
00476             {
00477                 short aref;
00478                 if(cpp == 1)
00479                 {
00480                     aref = line[0];
00481                     line++;
00482                 }
00483                 else if(cpp == 2)
00484                 {
00485                     aref = ((short)line[1] << 8)  | line[0];
00486                     line += 2;
00487                 }
00488                 std::map<short, BYTE>::iterator pos = colors.find(aref);
00489                 if(pos == colors.end())
00490                     return 0L;
00491                 *ptr++ = (*pos).second;
00492             }
00493         }
00494
00495         GlobalUnlock(hbitmap);
00496
00497         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00498         GlobalFree((HGLOBAL)hbitmap);
00499
00500         return ddbbmap;
00501     }
00502     else if(kind == DD_RGB)
00503     {
00504         BYTE *src = (BYTE *)icon;
00505
00506         // read the header
00507         int w = width, h = height, x, y;
00508
00509         HBITMAP hbitmap = CreateDIB(w, h, 24, 0L);
00510         LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00511         BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00512
00513         // make the bitmap
00514         for(y = 0; y < h; y++)
00515         {
00516 #if 0
00517             BYTE *ptr = image + WIDTHBYTES(w * 24) * (h - y - 1);
00518 #else
00519             BYTE *ptr = image + WIDTHBYTES(w * 24) * y;
00520 #endif
00521             for(x = 0; x < w; x++)
00522             {
00523                 ptr[2] = *src++;
00524                 ptr[1] = *src++;
00525                 ptr[0] = *src++;
00526                 ptr += 3;
00527                 src++;
00528             }
00529         }
00530
00531         GlobalUnlock(hbitmap);
00532
00533         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00534         GlobalFree((HGLOBAL)hbitmap);
00535
00536         return ddbbmap;
00537     }
00538
00539     return 0L;
00540 }

Generated on Sat Aug 7 22:46:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoButton.h File Reference

rf/support/mfc/PseudoButton.h File Reference

#include <vector>

Include dependency graph for PseudoButton.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CPseudoButton
class | CPseudoRotButton
class | CPseudoToggle

Enumerations

enum UTB_KIND {
DD_END,
DD_PIXMAP,
DD_BMAP,
DD_RGB
}

Functions

HBITMAP | UMakeBitmap (const void *icon, int &width, int &height, UTB_KIND kind, COLORREF back, COLORREF fore, bool enabled=true)
HBITMAP | UMakeBitmap (const void *icon, int width, int height, UTB_KIND kind, bool enabled=true)

Enumeration Type Documentation

enum UTB_KIND

Enumeration values:
DD_END
DD_PIXMAP
DD_BMAP
DD_RGB
Definition at line 28 of file PseudoButton.h.
00029 {
00030     DD_END,
00031     DD_PIXMAP,  /* X11 pixmap (color indexed) */
00032     DD_BMAP,    /* X11 bitmap (B&W) */
00033     DD_RGB      /* RGB / char */
00034 } UTB_KIND;

Function Documentation

HBITMAP UMakeBitmap | ( | const void * | icon,
 |  | int | width,
 |  | int | height,
 |  | UTB_KIND | kind,
 |  | bool | enabled = true
 | ) |

Definition at line 542 of file PseudoButton.cpp.

References UMakeBitmap().

00543 {
00544     return UMakeBitmap(icon, width, height, kind,
00545         ::GetSysColor(COLOR_BTNFACE), ::GetSysColor(COLOR_BTNTEXT), enabled);
00546 }

Here is the call graph for this function:

HBITMAP UMakeBitmap | ( | const void * | icon,
 |  | int & | width,
 |  | int & | height,
 |  | UTB_KIND | kind,
 |  | COLORREF | back,
 |  | COLORREF | fore,
 |  | bool | enabled = true
 | ) |

Definition at line 296 of file PseudoButton.cpp.

References CreateDIB(), DD_BMAP, DD_PIXMAP, DD_RGB, DIBToBitmap(), nextLine(), PaletteSize(), WIDTHBYTES, and WIDTHBYTES8.

00298 {
00299     if( kind == DD_BMAP)
00300     {
00301         HBITMAP hbitmap;
00302         LPBITMAPINFO header;
00303         BYTE *image, *src = (BYTE *)icon, c, k;
00304         RGBQUAD *pRgb;
00305
00306         hbitmap = CreateDIB(width, height, 1, 0L);
00307         header = (LPBITMAPINFO)GlobalLock(hbitmap);
00308         image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00309         pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00310
00311         pRgb->rgbRed = GetRValue(back);
00312         pRgb->rgbGreen = GetGValue(back);
00313         pRgb->rgbBlue = GetBValue(back);
00314         pRgb->rgbReserved = 0;
00315         pRgb++;
00316         pRgb->rgbRed = GetRValue(fore);
00317         pRgb->rgbGreen = GetGValue(fore);
00318         pRgb->rgbBlue = GetBValue(fore);
00319         pRgb->rgbReserved = 0;
00320
00321         int row = WIDTHBYTES(width * 1);
00322         int row2 = WIDTHBYTES8(width * 1);
00323         for(int y = 0; y < height; y++)
00324         {
00325             BYTE *ptr = image + row * (height - y - 1);
00326             for(int x = 0; x < row2; x++)
00327             {
00328                 c = *src++;
00329                 k = 0;
00330                 int n = 8;
00331                 while(n--)
00332                 {
00333                     if(c & 1)
00334                         k |= 1 << n;
00335                     c = c >> 1;
00336                 }
00337                 *ptr++ = k;
00338             }
00339         }
00340
00341         GlobalUnlock(hbitmap);
00342
00343         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00344         GlobalFree((HGLOBAL)hbitmap);
00345
00346         return ddbbmap;
00347     }
00348     else if(kind == DD_PIXMAP)
00349     {
00350         const BYTE *src = (BYTE *)icon;
00351         CString aline;
00352
00353         src = nextLine(src, aline);
00354         if(src == 0L)
00355             return 0L;
00356
00357         // read the header
00358         int w, h, nc, cpp, i, x, y;
00359         if(sscanf(aline, "%d%d%d%d", &w, &h, &nc, &cpp) != 4)
00360             return 0L;
00361
00362         width = w;
00363         height = h;
00364
00365         HBITMAP hbitmap = CreateDIB(w, h, 8, 0L);
00366         LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00367         BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00368         RGBQUAD *pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00369
00370         // read the colormap
00371         std::map<short, BYTE> colors;
00372         for(i = 0; i < nc; i++)
00373         {
00374             src = nextLine(src, aline);
00375             if(src == 0L)
00376                 return 0L;
00377
00378             const BYTE *line = (const BYTE *)(const char *)aline;
00379             short aref;
00380             if(cpp == 1)
00381             {
00382                 aref = line[0];
00383                 line += 1;
00384             }
00385             else if(cpp == 2)
00386             {
00387                 aref = ((short)line[1] << 8)  | line[0];
00388                 line += 2;
00389             }
00390             else
00391             {
00392                 ASSERT(0);
00393                 return 0L;
00394             }
00395
00396             while(isspace(*line) && *line)
00397                 line++;
00398             if(*line++ != 'c')
00399                 return 0L;
00400
00401             while(isspace(*line) && *line)
00402                 line++;
00403             if(*line == '\0')
00404                 return 0L;
00405
00406             if(*line == '#')
00407             {
00408                 line++;
00409
00410                 if(strlen((char *)line) < 6)
00411                     return 0L;
00412
00413                 int comp[6], c;
00414                 int j;
00415                 for(j = 0; j < 6; j++)
00416                 {
00417                     c = *line++;
00418                     if(c >= '0' && c <= '9')
00419                         comp[j] = c - '0';
00420                     else if(c >= 'a' && c <= 'f')
00421                         comp[j] = c - 'a' + 10;
00422                     else if(c >= 'A' && c <= 'F')
00423                         comp[j] = c - 'A' + 10;
00424                     else
00425                         return 0L;
00426                 }
00427
00428                 colors.insert(std::make_pair(aref, i));
00429
00430                 if(i == 0)
00431                 {
00432                     COLORREF bk = back;
00433                     pRgb->rgbRed = GetRValue(bk);
00434                     pRgb->rgbGreen = GetGValue(bk);
00435                     pRgb->rgbBlue = GetBValue(bk);
00436                     pRgb->rgbReserved = 0;
00437                 }
00438                 else
00439                 {
00440                     COLORREF color = RGB(comp[0]*16+comp[1],comp[2]*16+comp[3],comp[4]*16+comp[5]);
00441                     if(!enabled)
00442                         color = fore;
00443                     pRgb->rgbRed = GetRValue(color);
00444                     pRgb->rgbGreen = GetGValue(color);
00445                     pRgb->rgbBlue = GetBValue(color);
00446                     pRgb->rgbReserved = 0;
00447                 }
00448             }
00449             else if(strcmp((char *)line, "None") == 0)
00450             {
00451                 colors.insert(std::make_pair(aref, i));
00452                 COLORREF bk = back;
00453                 pRgb->rgbRed = GetRValue(bk);
00454                 pRgb->rgbGreen = GetGValue(bk);
00455                 pRgb->rgbBlue = GetBValue(bk);
00456                 pRgb->rgbReserved = 0;
00457             }
00458             else
00459                 return 0L;
00460             pRgb++;
00461         }
00462
00463         if(nc != colors.size() || nc > 256)
00464             return 0L;
00465
00466         // make the bitmap
00467         for(y = 0; y < h; y++)
00468         {
00469             src = nextLine(src, aline);
00470             if(src == 0L)
00471                 return 0L;
00472
00473             const BYTE *line = (const BYTE *)(const char *)aline;
00474             BYTE *ptr = image + WIDTHBYTES(w * 8) * (h - y - 1);
00475             for(x = 0; x < w; x++)
00476             {
00477                 short aref;
00478                 if(cpp == 1)
00479                 {
00480                     aref = line[0];
00481                     line++;
00482                 }
00483                 else if(cpp == 2)
00484                 {
00485                     aref = ((short)line[1] << 8)  | line[0];
00486                     line += 2;
00487                 }
00488                 std::map<short, BYTE>::iterator pos = colors.find(aref);
00489                 if(pos == colors.end())
00490                     return 0L;
00491                 *ptr++ = (*pos).second;
00492             }
00493         }
00494
00495         GlobalUnlock(hbitmap);
00496
00497         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00498         GlobalFree((HGLOBAL)hbitmap);
00499
00500         return ddbbmap;
00501     }
00502     else if(kind == DD_RGB)
00503     {
00504         BYTE *src = (BYTE *)icon;
00505
00506         // read the header
00507         int w = width, h = height, x, y;
00508
00509         HBITMAP hbitmap = CreateDIB(w, h, 24, 0L);
00510         LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00511         BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00512
00513         // make the bitmap
00514         for(y = 0; y < h; y++)
00515         {
00516 #if 0
00517             BYTE *ptr = image + WIDTHBYTES(w * 24) * (h - y - 1);
00518 #else
00519             BYTE *ptr = image + WIDTHBYTES(w * 24) * y;
00520 #endif
00521             for(x = 0; x < w; x++)
00522             {
00523                 ptr[2] = *src++;
00524                 ptr[1] = *src++;
00525                 ptr[0] = *src++;
00526                 ptr += 3;
00527                 src++;
00528             }
00529         }
00530
00531         GlobalUnlock(hbitmap);
00532
00533         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00534         GlobalFree((HGLOBAL)hbitmap);
00535
00536         return ddbbmap;
00537     }
00538
00539     return 0L;
00540 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoDlg.cpp File Reference

rf/support/mfc/PseudoDlg.cpp File Reference

#include "stdafx.h"
#include "uwidget.h"
#include "PseudoDlg.h"
#include "PseudoDraw.h"
#include "PseudoList.h"
#include "SmartComboBox.h"

Include dependency graph for PseudoDlg.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | IS_PSEUDO_CTL(id) ((id) >= WINCMD_DLG_START && (id) < WINCMD_DLG_END)

Functions

void | WinInitWidgets (CWnd *wnd, UWidget *pseudo)
int | findIdForWnd (CWnd *wnd, UWidget *wid)
int | UWinToUMod (UINT nFlags)
LRESULT | UWinPseudoWindowProc (CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam)

Define Documentation

#define IS_PSEUDO_CTL ( id ) ((id) >= WINCMD_DLG_START && (id) < WINCMD_DLG_END)

Definition at line 37 of file PseudoDlg.cpp.

Referenced by UWinPseudoWindowProc(), and WinInitWidgets().

Function Documentation

int findIdForWnd | ( | CWnd * | wnd,
 |  | UWidget * | wid
 | ) | [static]

Definition at line 181 of file PseudoDlg.cpp.

References UWidget::GetWidgets().

Referenced by UWinPseudoWindowProc().

00182 {
00183     const std::map<int, void *> & allWids = wid->GetWidgets();
00184     std::map<int, void *>::const_iterator i;
00185     for(i = allWids.begin(); i != allWids.end(); ++i)
00186     {
00187         if(wnd == (CWnd *)(*i).second)
00188             return (*i).first;
00189     }
00190     return -1;
00191 }

Here is the call graph for this function:

LRESULT UWinPseudoWindowProc | ( | CWnd * | wnd,
 |  | UWidget * | wid,
 |  | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) |

Definition at line 212 of file PseudoDlg.cpp.

References UWidget::DoValidUI(), EV_BTNDBLDOWN, EV_BTNDOWN, EV_BTNUP, EV_CMD, EV_COMBO_SEL, EV_EDITCHANGE, EV_KEYDOWN, EV_LIST_SELECTING, EV_MMOVE, EV_RESIZE, EV_SCROLLCHANGE, findIdForWnd(), UWidget::GetWidget(), UWidget::GetWidgets(), UCmdTarget::GetWidID(), IS_PSEUDO_CTL, UWidget::m_noDispatch, NULL, UEventSendMessage(), UMAKEINT, UWinToUMod(), and WINCTL_to_UCMD.

Referenced by CPseudoDlg::WindowProc().

00213 {
00214     bool sentOne = false;
00215
00216     if(wid == 0L)
00217         return 1;
00218
00219     if (message == WM_COMMAND)
00220     {
00221         UINT nID = LOWORD(wParam);
00222         if(!IS_PSEUDO_CTL(nID))
00223             return 1;
00224
00225         int nCode = HIWORD(wParam);
00226         HWND hWndCtrl = (HWND)lParam;
00227         switch(nCode)
00228         {
00229         case BN_CLICKED:
00230             UEventSendMessage(wid->GetWidID(), EV_CMD, WINCTL_to_UCMD(nID), 0L);
00231             sentOne = true;
00232             break;
00233         case CBN_SELCHANGE:
00234         {
00235             ASSERT(::IsWindow(hWndCtrl));
00236             int sel = (int)::SendMessage(hWndCtrl, CB_GETCURSEL, 0, 0);
00237             const char *txt = 0L;
00238             char buf[1024] = {'\0'};
00239             if(sel != -1 && (int)::SendMessage(hWndCtrl, CB_GETLBTEXT, sel, (LPARAM)buf) != CB_ERR)
00240                 txt = buf;
00241             if(strcmp(buf, "-") != 0) // separator
00242                 UEventSendMessage(wid->GetWidID(), EV_COMBO_SEL,
00243                     UMAKEINT(WINCTL_to_UCMD(nID), sel), (void *)txt);
00244             sentOne = true;
00245             break;
00246         }
00247         case EN_CHANGE:
00248             if(wid->m_noDispatch)
00249                 break;
00250
00251             ASSERT(::IsWindow(hWndCtrl));
00252             UEventSendMessage(wid->GetWidID(), EV_EDITCHANGE,
00253                 WINCTL_to_UCMD(nID), 0L);
00254             break;
00255         }
00256     }
00257     else if (message == WM_NOTIFY)
00258     {
00259         NMHDR* pNMHDR = (NMHDR*)lParam;
00260         if (pNMHDR->hwndFrom != NULL)
00261         {
00262             UINT nID = _AfxGetDlgCtrlID(pNMHDR->hwndFrom);
00263             int nCode = pNMHDR->code;
00264             if(!IS_PSEUDO_CTL(nID))
00265                 return 1;
00266
00267             switch(nCode)
00268             {
00269             case LVN_ITEMCHANGED:
00270                 NMLISTVIEW *state = (NMLISTVIEW *)pNMHDR;
00271
00272                 HWND wnd = state->hdr.hwndFrom;
00273                 ASSERT(::IsWindow(wnd));
00274
00275                 int id = state->hdr.idFrom;
00276                 std::map<int, void *>::const_iterator i = wid->GetWidgets().find(WINCTL_to_UCMD(id));
00277                 if(i != wid->GetWidgets().end())
00278                 {
00279                     CWnd *w = (CWnd *)(*i).second;
00280                     if(w->IsKindOf(RUNTIME_CLASS(CListCtrl)))
00281                     {
00282                         CListCtrl *list = (CListCtrl*)w;
00283                         CString s = list->GetItemText(state->iItem, 0);
00284
00285                         UEventSendMessage(wid->GetWidID(), EV_LIST_SELECTING,
00286                             UMAKEINT(WINCTL_to_UCMD(state->hdr.idFrom), state->iItem), (void *)(const char *)s);
00287                         sentOne = true;
00288                     }
00289                 }
00290                 break;
00291             }
00292         }
00293     }
00294     else if (message == WM_SIZE)
00295     {
00296         int id = findIdForWnd(wnd, wid);
00297         if(id != -1)
00298         {
00299             URECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
00300             UEventSendMessage(wid->GetWidID(), EV_RESIZE, id, &r);
00301             sentOne = true;
00302         }
00303     }
00304     else if (message == WM_MOUSEMOVE)
00305     {
00306         int id = findIdForWnd(wnd, wid);
00307         if(id != -1)
00308         {
00309             UEventSendMessage(wid->GetWidID(), EV_MMOVE, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00310                 (void *)UWinToUMod(wParam));
00311             sentOne = true;
00312         }
00313     }
00314     else if (message == WM_LBUTTONDOWN)
00315     {
00316         int id = findIdForWnd(wnd, wid);
00317         if(id != -1)
00318         {
00319             UEventSendMessage(wid->GetWidID(), EV_BTNDOWN, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00320                 (void *)UWinToUMod(wParam));
00321             sentOne = true;
00322         }
00323     }
00324     else if (message == WM_LBUTTONUP)
00325     {
00326         int id = findIdForWnd(wnd, wid);
00327         if(id != -1)
00328         {
00329             UEventSendMessage(wid->GetWidID(), EV_BTNUP, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00330                 (void *)UWinToUMod(wParam));
00331             sentOne = true;
00332         }
00333     }
00334     else if (message == WM_LBUTTONDBLCLK)
00335     {
00336         int id = findIdForWnd(wnd, wid);
00337         if(id != -1)
00338         {
00339             UEventSendMessage(wid->GetWidID(), EV_BTNDBLDOWN, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00340                 (void *)UWinToUMod(wParam));
00341             sentOne = true;
00342         }
00343     }
00344     else if (message == WM_KEYDOWN)
00345     {
00346         int id = findIdForWnd(wnd, wid);
00347         if(id != -1)
00348         {
00349             UEventSendMessage(wid->GetWidID(), EV_KEYDOWN, wParam, 0L);
00350             sentOne = true;
00351         }
00352     }
00353     else if (message == WM_HSCROLL)
00354     {
00355         HWND hwndScrollBar = (HWND) lParam;       // handle to scroll bar
00356         int nID = ::GetDlgCtrlID(hwndScrollBar);
00357         if(!IS_PSEUDO_CTL(nID))
00358             return 1;
00359
00360         int cmd = WINCTL_to_UCMD(nID);
00361         CWnd *wnds = (CWnd *)wid->GetWidget(cmd);
00362         if(wnds == 0L || !wnds->IsKindOf(RUNTIME_CLASS(CScrollBar)))
00363             return 1;
00364
00365         CScrollBar *scroll = (CScrollBar *)wnds;
00366
00367         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
00368         int nPos;
00369         if(nScrollCode == SB_THUMBPOSITION || nScrollCode == SB_THUMBTRACK)
00370         {
00371             nPos = (short int) HIWORD(wParam);   // scroll box position
00372
00373             if(nScrollCode == SB_THUMBPOSITION)
00374                 scroll->SetScrollPos(nPos);
00375         }
00376         else
00377         {
00378             SCROLLINFO info;
00379             VERIFY(scroll->GetScrollInfo(&info));
00380             nPos = info.nPos;
00381
00382             switch(nScrollCode)
00383             {
00384             case SB_ENDSCROLL:
00385                 return 1;
00386                 break;
00387             case SB_LINELEFT:
00388                 nPos -= 1;
00389                 break;
00390             case SB_LINERIGHT:
00391                 nPos += 1;
00392                 break;
00393             case SB_PAGELEFT:
00394                 nPos -= info.nPage;
00395                 break;
00396             case SB_PAGERIGHT:
00397                 nPos += info.nPage;
00398                 break;
00399             case SB_LEFT:
00400                 nPos = info.nMin;
00401                 break;
00402             case SB_RIGHT:
00403                 nPos = info.nMax;
00404                 break;
00405             }
00406
00407             scroll->SetScrollPos(nPos);
00408         }
00409
00410         UEventSendMessage(wid->GetWidID(), EV_SCROLLCHANGE, WINCTL_to_UCMD(nID),
00411             (void *)nPos);
00412         sentOne = true;
00413     }
00414     else if (message == WM_VSCROLL)
00415     {
00416         HWND hwndScrollBar = (HWND) lParam;       // handle to scroll bar
00417         int nID = ::GetDlgCtrlID(hwndScrollBar);
00418         if(!IS_PSEUDO_CTL(nID))
00419             return 1;
00420
00421         int cmd = WINCTL_to_UCMD(nID);
00422         CWnd *wnds = (CWnd *)wid->GetWidget(cmd);
00423         if(wnds == 0L || !wnds->IsKindOf(RUNTIME_CLASS(CScrollBar)))
00424             return 1;
00425
00426         CScrollBar *scroll = (CScrollBar *)wnds;
00427
00428         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
00429         int nPos;
00430         if(nScrollCode == SB_THUMBPOSITION || nScrollCode == SB_THUMBTRACK)
00431         {
00432             nPos = (short int) HIWORD(wParam);   // scroll box position
00433
00434             if(nScrollCode == SB_THUMBPOSITION)
00435                 scroll->SetScrollPos(nPos);
00436         }
00437         else
00438         {
00439             SCROLLINFO info;
00440             VERIFY(scroll->GetScrollInfo(&info));
00441             nPos = info.nPos;
00442
00443             switch(nScrollCode)
00444             {
00445             case SB_ENDSCROLL:
00446                 return 1;
00447                 break;
00448             case SB_LINEUP:
00449                 nPos -= 1;
00450                 break;
00451             case SB_LINEDOWN:
00452                 nPos += 1;
00453                 break;
00454             case SB_PAGEUP:
00455                 nPos -= info.nPage;
00456                 break;
00457             case SB_PAGEDOWN:
00458                 nPos += info.nPage;
00459                 break;
00460             case SB_TOP:
00461                 nPos = info.nMin;
00462                 break;
00463             case SB_BOTTOM:
00464                 nPos = info.nMax;
00465                 break;
00466             }
00467
00468             if(nPos > info.nMax)
00469                 nPos = info.nMax;
00470             else if(nPos < info.nMin)
00471                 nPos = info.nMin;
00472             scroll->SetScrollPos(nPos);
00473         }
00474
00475         UEventSendMessage(wid->GetWidID(), EV_SCROLLCHANGE, WINCTL_to_UCMD(nID),
00476             (void *)nPos);
00477         sentOne = true;
00478     }
00479
00480     if(sentOne)
00481         UWidget::DoValidUI(false);
00482
00483     return 1;
00484 }

Here is the call graph for this function:

int UWinToUMod ( UINT nFlags ) [static]

Definition at line 193 of file PseudoDlg.cpp.

References UK_ALT, UK_CONTROL, UK_MBUTTON, UK_RBUTTON, and UK_SHIFT.

Referenced by UWinPseudoWindowProc().

00194 {
00195     int res = 0;
00196     if(nFlags & MK_LBUTTON)
00197         res |= VK_LBUTTON;
00198     if(nFlags & MK_RBUTTON)
00199         res |= UK_RBUTTON;
00200     if(nFlags & MK_SHIFT)
00201         res |= UK_SHIFT;
00202     if(nFlags & MK_CONTROL)
00203         res |= UK_CONTROL;
00204     if(nFlags & MK_MBUTTON)
00205         res |= UK_MBUTTON;
00206     if ((GetKeyState(VK_MENU) & 0x8000) != 0)
00207         res |= UK_ALT;
00208
00209     return res;
00210 }

void WinInitWidgets | ( | CWnd * | wnd,
 |  | UWidget * | pseudo
 | ) |

Definition at line 92 of file PseudoDlg.cpp.

References _countof, EV_INIT_WIDGET, IS_PSEUDO_CTL, stat, UEventSendMessage(), and WINCTL_to_UCMD.

Referenced by CPseudoDlg::OnInitDialog().

00093 {
00094     CWnd* pWndStart = 0L;
00095     pWndStart = wnd->GetTopWindow();
00096     while(pWndStart != 0L)
00097     {
00098         HWND hwnd = *pWndStart;
00099         int id = ::GetDlgCtrlID(*pWndStart);
00100         CWnd *res = 0L;
00101         if(IS_PSEUDO_CTL(id))
00102         {
00103             TCHAR szCompare[100];
00104             ::GetClassName(hwnd, szCompare, _countof(szCompare));
00105             DWORD style = (DWORD)GetWindowLong(hwnd, GWL_STYLE);
00106
00107             // check overided widgets
00108             std::map<int, CRuntimeClass *> & list = pseudo->GetOverideList();
00109             std::map<int, CRuntimeClass *>::const_iterator i = list.find(WINCTL_to_UCMD(id));
00110             if(i != list.end())
00111             {
00112                 CRuntimeClass *clss = (*i).second;
00113                 if(clss->IsDerivedFrom(RUNTIME_CLASS(CWnd)))
00114                 {
00115                     res = (CWnd *)clss->CreateObject();
00116                 }
00117             }
00118
00119             if(res == 0L)
00120             {
00121                 if(stricmp(szCompare, "BUTTON") == 0)
00122                 {
00123                     CButton *btn = new CButton();
00124                     res = btn;
00125                 }
00126                 else if(stricmp(szCompare, "Static") == 0)
00127                 {
00128                     if(style & SS_ETCHEDFRAME)
00129                     {
00130                         CPseudoDraw *draw = new CPseudoDraw(pseudo, WINCTL_to_UCMD(id));
00131                         res = draw;
00132                     }
00133                     else
00134                     {
00135                         CStatic *stat = new CStatic();
00136                         res = stat;
00137                     }
00138                 }
00139                 else if(stricmp(szCompare, "ComboBox") == 0)
00140                 {
00141                     CComboBox *combo = new CSmartComboBox(USmartCombo::AutoDropWidth);
00142                     res = combo;
00143                 }
00144                 else if(stricmp(szCompare, WC_LISTVIEW) == 0)
00145                 {
00146                     CPseudoList *list = new CPseudoList(pseudo->GetWidID(), WINCTL_to_UCMD(id));
00147                     res = list;
00148                 }
00149                 else
00150                 {
00151                     res = new CWnd();
00152                 }
00153             }
00154
00155             UEventSendMessage(pseudo->GetWidID(), EV_INIT_WIDGET, WINCTL_to_UCMD(id), res);
00156         }
00157         pWndStart = pWndStart->GetNextWindow();
00158     }
00159
00160     std::map<int, CRuntimeClass *> & list = pseudo->GetOverideList();
00161     list.erase(list.begin(), list.end());
00162 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoDlg.h File Reference

rf/support/mfc/PseudoDlg.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CPseudoDlg

Defines

#define | AFX_PSEUDODLG_H__9EDC5FE5_21FD_4ACE_9AEB_7A521350A2EE__INCLUDED_

Define Documentation

#define AFX_PSEUDODLG_H__9EDC5FE5_21FD_4ACE_9AEB_7A521350A2EE__INCLUDED_

Definition at line 22 of file PseudoDlg.h.

Generated on Sat Aug 7 22:46:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoDraw.cpp File Reference

rf/support/mfc/PseudoDraw.cpp File Reference

#include "stdafx.h"
#include "PseudoDraw.h"
#include "uwidget.h"

Include dependency graph for PseudoDraw.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoDraw.h File Reference

rf/support/mfc/PseudoDraw.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CPseudoDraw

Defines

#define | AFX_STATICDRAW_H__8DCC3165_D42E_4FAA_BCCF_F4328685535E__INCLUDED_

Define Documentation

#define AFX_STATICDRAW_H__8DCC3165_D42E_4FAA_BCCF_F4328685535E__INCLUDED_

Definition at line 22 of file PseudoDraw.h.

Generated on Sat Aug 7 22:46:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoList.cpp File Reference

rf/support/mfc/PseudoList.cpp File Reference

#include "stdafx.h"
#include "PseudoList.h"
#include "umain.h"

Include dependency graph for PseudoList.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/pseudolist.h File Reference

rf/support/mfc/pseudolist.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CPseudoList

Defines

#define | AFX_PSEUDOLIST_H__49AF86B3_E6AB_4885_843C_1CE5AC8C4980__INCLUDED_

Define Documentation

#define AFX_PSEUDOLIST_H__49AF86B3_E6AB_4885_843C_1CE5AC8C4980__INCLUDED_

Definition at line 22 of file pseudolist.h.

Generated on Sat Aug 7 22:46:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/StdAfx.cpp File Reference

rf/support/mfc/StdAfx.cpp File Reference

#include "stdafx.h"

Include dependency graph for StdAfx.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/StdAfx.h File Reference

rf/support/mfc/StdAfx.h File Reference

#include <afx.h>
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include "CJLibrary.h"

Include dependency graph for StdAfx.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | AFX_STDAFX_H__EDF5958A_92F6_11D3_9365_00C0F00AE104__INCLUDED_
#define | VC_EXTRALEAN
#define | qDebug 0
#define | UASSERT ASSERT

Define Documentation

#define AFX_STDAFX_H__EDF5958A_92F6_11D3_9365_00C0F00AE104__INCLUDED_

Definition at line 7 of file StdAfx.h.

#define qDebug 0

Definition at line 29 of file StdAfx.h.

#define UASSERT ASSERT

Definition at line 32 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 15 of file StdAfx.h.

Generated on Sat Aug 7 22:46:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/powerplant/stdafx.h File Reference

rf/support/powerplant/stdafx.h File Reference

#include <PP_ClassHeaders.cp>

Include dependency graph for stdafx.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | qMacPP 1
#define | UASSERT Assert_
#define | UTHROW(err) Throw_Err(mFulErr)

Functions

char * | strdup (const char *str)

Define Documentation

#define qMacPP 1

Definition at line 4 of file stdafx.h.

Referenced by UCmdUI::UCmdUI(), and UWidget::UWidget().

#define UASSERT Assert_

Definition at line 13 of file stdafx.h.

#define UTHROW ( err ) Throw_Err(mFulErr)

Definition at line 14 of file stdafx.h.

Function Documentation

char* strdup ( const char * str )

Definition at line 17 of file UPseudoSupport.cpp.

References malloc.

Referenced by awidget::awidget(), CloneStr(), EntnodeFile::GetRelativePath(), CCustInvertTable::Initialize(), UWidget::OnComboAppend(), awidget::operator=(), and KoFilterMask::SetMask().

00018 {
00019     if(str == 0L)
00020         return 0L;
00021
00022     size_t len = strlen(str);
00023     char *res = (char *)malloc((len + 1) * sizeof(char));
00024     if(res == 0L)
00025         throw CException_AC(mFulErr);
00026     strcpy(res, str);
00027     return res;
00028 }

Generated on Sat Aug 7 22:46:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/powerplant/UPseudoSupport.cpp File Reference

rf/support/powerplant/UPseudoSupport.cpp File Reference

#include "stdafx.h"
#include "UPseudoSupport.h"
#include "uconsole.h"
#include "udraw.h"
#include "umenu.h"
#include <stdio.h>
#include <stdlib.h>
#include <UGAColorRamp.h>
#include <LTableMonoGeometry.h>
#include <LTableMultiGeometry.h>
#include <LTableSingleSelector.h>
#include <LOutlineKeySelector.h>
#include <LOutlineTable.h>
#include <LTextTableView.h>
#include <LCellSizeToFit.h>
#include <LTableArrayStorage.h>
#include <LTextArray.h>
#include <LTableSingleRowSelector.h>
#include <LEditText.h>
#include <LPopupButton.h>
#include <LScrollBar.h>
#include <LPageController.h>
#include <LTabsControl.h>
#include <LSlider.h>
#include <LLittleArrows.h>
#include <LCheckBoxGroupBox.h>

Include dependency graph for UPseudoSupport.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | UPPMenu
class | LPseudoDrawAttachment
class | CDummyClass

Defines

#define | NEW new

Functions

bool | macpp_getcmdid (LPane *view, int &cmdid)
bool | macpp_getcmdid (PaneIDT atype, int &cmdid)
LPseudoWinAttachment * | macpp_getattachwindow (UWidget *wid)
LPseudoWinAttachment * | macpp_getattachwindow (LWindow *wind)
void | macpp_fecthview (int widid, LPane *pane)
void | macpp_linkbroadcasters (LPane *pane, LListener *listener)
void | macpp_preparetable (LOutlineTable *table)
void | macpp_preparetable (void *win, LTextTableView *table)
LWindow * | macpp_findwindow (LPane *pane)

Variables

bool | gTurnOffBroadcast = false
CDummyClass sDummyStarter

Define Documentation

#define NEW new

Definition at line 32 of file UPseudoSupport.cpp.

Referenced by aref::aref(), AskCreatePersistentSettings(), Entries_SetVisited(), LMainPseudoAttachment::ExecuteSelf(), GetNextEntriesLine(), list_add_type(), list_add_warning(), macpp_fecthview(), macpp_preparetable(), UWidget::OnInitWidget(), UWidget::OnListNewRow(), UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), UToolbar::OnTbDropDown(), UToolbar::OnTbInit(), UToolbar::OnTbSeparator(), CPersistent::Register(), tclCvsEntriesProc(), and UWidget::UWidget().

Function Documentation

void macpp_fecthview | ( | int | widid,
 |  | LPane * | pane
 | ) |

Definition at line 135 of file UPseudoSupport.cpp.

References EV_INIT_WIDGET, macpp_getcmdid(), NEW, UPseudoPageHider::SetWidID(), UPseudoPlaceHolder::SetWidID(), and UEventSendMessage().

Referenced by UWidget::OnInitWidget(), and UWidget::OnPageChanged().

00136 {
00137     int cmdid;
00138     if(macpp_getcmdid(pane, cmdid))
00139     {
00140         UEventSendMessage(widid, EV_INIT_WIDGET, cmdid, pane);
00141
00142         // look for any attachement we know of
00143         const TArray<LAttachment*>* theAttachments = pane->GetAttachmentsList();
00144         if (theAttachments != nil)
00145         {
00146             TArrayIterator<LAttachment*> iterate(*theAttachments);
00147
00148             LAttachment*    theAttach;
00149             while (iterate.Next(theAttach))
00150             {
00151                 UPseudoPageHider *hider = dynamic_cast<UPseudoPageHider*>(theAttach);
00152                 if(hider != 0L)
00153                     hider->SetWidID(widid);
00154             }
00155         }
00156
00157         // for any control, set the broadcast message to be the Pane ID
00158         LControl *control = dynamic_cast<LControl*>(pane);
00159         if(control != 0L && control->GetValueMessage() == 0)
00160         {
00161             control->SetValueMessage(pane->GetPaneID());
00162         }
00163
00164         // idem
00165         LCheckBoxGroupBox *groupbox = dynamic_cast<LCheckBoxGroupBox*>(pane);
00166         if(groupbox != 0L && groupbox->GetValueMessage() == 0)
00167         {
00168             groupbox->SetValueMessage(pane->GetPaneID());
00169         }
00170
00171         // set the widget id for some custom controls
00172         UPseudoPlaceHolder *holder = dynamic_cast<UPseudoPlaceHolder*>(pane);
00173         if(holder != 0L)
00174         {
00175             holder->SetWidID(widid);
00176             return; // don't fetch inside, it'll be owned by another pseudo widget
00177         }
00178
00179         // this attachment let us fire a EV_CUSTOM_DRAW event when painting
00180         if(typeid(*pane) == typeid(LView))
00181         {
00182             LPseudoDrawAttachment *attach = NEW LPseudoDrawAttachment(widid, cmdid);
00183             pane->AddAttachment(attach);
00184         }
00185     }
00186
00187     // menus with an unspecified menu id need to be created if we want to use
00188     // later on the EV_COMBO_APPEND message on it.
00189     LPopupButton *controler = dynamic_cast<LPopupButton*>(pane);
00190     if(controler != 0L)
00191     {
00192         if(controler->GetMenuID() == MENU_Unspecified && controler->GetMacMenuH() == 0L)
00193             controler->SetMacMenuH(::NewMenu(::UniqueID('MENU'), "\p"), true);
00194     }
00195
00196     // recurse
00197     LView *view = dynamic_cast<LView*>(pane);
00198     if(view == 0L)
00199         return;
00200
00201     TArrayIterator<LPane*> iterator(view->GetSubPanes());
00202     LPane   *theSub;
00203     while (iterator.Next(theSub))
00204     {
00205         macpp_fecthview(widid, theSub);
00206     }
00207 }

Here is the call graph for this function:

LWindow* macpp_findwindow ( LPane * pane ) [static]

Definition at line 264 of file UPseudoSupport.cpp.

Referenced by UPseudoPageHider::DoRotate(), UPseudoPlaceHolder::DoRotate(), and UPseudoPlaceHolder::FinishCreateSelf().

00265 {
00266     LPane *topView = 0L;
00267     while(pane != 0L)
00268     {
00269         topView = pane;
00270         pane = pane->GetSuperView();
00271     }
00272     return dynamic_cast<LWindow *>(topView);
00273 }

LPseudoWinAttachment* macpp_getattachwindow ( LWindow * wind )

Definition at line 111 of file UPseudoSupport.cpp.

Referenced by macpp_getattachwindow(), UWidget::OnGetSliderProperty(), UWidget::OnPageChanged(), and UWidget::OnSetSliderProperty().

00112 {
00113     if(wind != 0L)
00114     {
00115         const TArray<LAttachment*>* theAttachments = wind->GetAttachmentsList();
00116
00117         if (theAttachments != nil)
00118         {
00119             TArrayIterator<LAttachment*> iterate(*theAttachments);
00120
00121             LAttachment*    theAttach;
00122             while (iterate.Next(theAttach))
00123             {
00124                 LPseudoWinAttachment*   theWinAttach = dynamic_cast<LPseudoWinAttachment*>(theAttach);
00125                 if (theWinAttach != nil)
00126                 {
00127                     return theWinAttach;
00128                 }
00129             }
00130         }
00131     }
00132     return 0L;
00133 }

LPseudoWinAttachment* macpp_getattachwindow ( UWidget * wid )

Definition at line 99 of file UPseudoSupport.cpp.

00100 {
00101     LPane *win = (LPane *)wid->GetWidget(kUMainWidget);
00102     LWindow *wind = dynamic_cast<LWindow *>((LPane *)win);
00103
00104     if(wind != 0L)
00105     {
00106         return macpp_getattachwindow(wind);
00107     }
00108     return 0L;
00109 }

bool macpp_getcmdid | ( | PaneIDT | atype,
 |  | int & | cmdid
 | ) | [static]

Definition at line 85 of file UPseudoSupport.cpp.

References EV_COMMAND_START.

Referenced by UPseudoPageHider::DoRotate(), UPseudoPlaceHolder::DoRotate(), LPseudoWinAttachment::ListenToMessage(), and macpp_fecthview().

00086 {
00087     const char *atypestr = (char *)&atype;
00088     if(atypestr[0] != 'p' && atypestr[1] != 's')
00089         return false;
00090
00091     if(atypestr[2] < '0' || atypestr[2] > '9')
00092         return false;
00093     if(atypestr[3] < '0' || atypestr[3] > '9')
00094         return false;
00095     cmdid = (int)(atypestr[2] - '0') * 10 + (int)(atypestr[3] - '0') + EV_COMMAND_START;
00096     return true;
00097 }

bool macpp_getcmdid | ( | LPane * | view,
 |  | int & | cmdid
 | ) | [static]

Definition at line 70 of file UPseudoSupport.cpp.

References EV_COMMAND_START.

00071 {
00072     PaneIDT atype = view->GetPaneID();
00073     const char *atypestr = (char *)&atype;
00074     if(atypestr[0] != 'p' && atypestr[1] != 's')
00075         return false;
00076
00077     if(atypestr[2] < '0' || atypestr[2] > '9')
00078         return false;
00079     if(atypestr[3] < '0' || atypestr[3] > '9')
00080         return false;
00081     cmdid = (int)(atypestr[2] - '0') * 10 + (int)(atypestr[3] - '0') + EV_COMMAND_START;
00082     return true;
00083 }

void macpp_linkbroadcasters | ( | LPane * | pane,
 |  | LListener * | listener
 | ) |

Definition at line 209 of file UPseudoSupport.cpp.

Referenced by UWidget::OnInitWidget(), and UWidget::OnPageChanged().

00210 {
00211     LBroadcaster *broadcaster = dynamic_cast<LBroadcaster *>(pane);
00212     if(broadcaster != 0L && !broadcaster->HasListener(listener))
00213         broadcaster->AddListener(listener);
00214
00215     LView *view = dynamic_cast<LView*>(pane);
00216     if(view == 0L)
00217         return;
00218
00219     TArrayIterator<LPane*> iterator(view->GetSubPanes());
00220     LPane   *theSub;
00221     while (iterator.Next(theSub))
00222     {
00223         macpp_linkbroadcasters(theSub, listener);
00224     }
00225 }

void macpp_preparetable | ( | void * | win,
 |  | LTextTableView * | table
 | ) |

Definition at line 246 of file UPseudoSupport.cpp.

References NEW, UTextTableView_DoubleClick, and UTextTableView_SingleClick.

Referenced by UWidget::OnListAddColumns(), UWidget::OnListResetAll(), and UWidget::OnListSetColWidth().

00247 {
00248     if(table->GetTableGeometry() != 0L)
00249         return;
00250
00251     SDimension16    tableSize;
00252     table->SetCellSizer(NEW LCellSizeToFit());
00253     table->GetFrameSize(tableSize);
00254     table->SetTableGeometry(NEW LTableMonoGeometry(table,
00255         tableSize.width/1 /* col width = width/num Cols */,
00256         12  /* row height */));
00257     table->SetTableSelector(NEW LTableSingleRowSelector( table ));
00258     table->SetTableStorage(NEW LTableArrayStorage(table, (UInt32)0));
00259     table->SetDoubleClickMessage(UTextTableView_DoubleClick);
00260     table->SetSingleClickMessage(UTextTableView_SingleClick);
00261     table->SetCustomHilite(true); // cause there is a hilite bug if we don't
00262 }

void macpp_preparetable ( LOutlineTable * table )

Definition at line 227 of file UPseudoSupport.cpp.

00228 {
00229     if(table->GetTableGeometry() != 0L)
00230         return;
00231
00232     // try to guess a good height for the geometry
00233     int height = 20;
00234     TextTraitsH traitsH = UTextTraits::LoadTextTraits(table->GetTextTraits());
00235     if(traitsH != 0L)
00236         height = ((**traitsH).size * 6) / 4;
00237
00238     LTableMultiGeometry *geom = NEW LTableMultiGeometry(table, 50, height);
00239     if(geom != 0L)
00240         table->SetTableGeometry(geom);
00241     table->SetTableSelector(NEW LTableSingleRowSelector( table ));
00242     table->AddAttachment(NEW LOutlineKeySelector(table, msg_AnyMessage));
00243     table->AddAttachment(NEW LKeyScrollAttachment(table));
00244 }

Variable Documentation

bool gTurnOffBroadcast = false

Definition at line 45 of file UPseudoSupport.cpp.

Referenced by UCmdUI::Check(), UPseudoPlaceHolder::DoRotate(), LPseudoWinAttachment::ListenToMessage(), UWidget::OnComboAppend(), UWidget::OnComboDelSel(), UWidget::OnComboResetAll(), UWidget::OnComboSetPos(), UWidget::OnSetFloat(), UWidget::OnSetSlider(), UWidget::OnSetSliderProperty(), UWidget::OnSetState(), and UWidget::OnSetText().

class CDummyClass sDummyStarter

Generated on Sat Aug 7 22:46:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/powerplant/UPseudoSupport.h File Reference

rf/support/powerplant/UPseudoSupport.h File Reference

#include "uwidget.h"
#include <LOutlineItem.h>
#include <LCmdBevelButton.h>
#include <LPlaceHolder.h>
#include <map>
#include <vector>

Include dependency graph for UPseudoSupport.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | UPseudoCmdStatusWrapper
class | UPseudoRotButton
class | UPseudoPlaceHolder
class | UPseudoPageHider
class | LMainPseudoAttachment
class | LPseudoWinAttachment
class | UPseudoFakePane
class | CPseudoItem

Defines

#define | UTextTableView_SingleClick FOUR_CHAR_CODE('UTVS')
#define | UTextTableView_DoubleClick FOUR_CHAR_CODE('UTVD')

Functions

void | macpp_fecthview (int widid, LPane *view)
void | macpp_linkbroadcasters (LPane *view, LListener *listener)
void | macpp_preparetable (LOutlineTable *table)
void | macpp_preparetable (void *win, LTextTableView *table)
LPseudoWinAttachment * | macpp_getattachwindow (UWidget *wid)
LPseudoWinAttachment * | macpp_getattachwindow (LWindow *wind)

Variables

bool gTurnOffBroadcast

Define Documentation

#define UTextTableView_DoubleClick FOUR_CHAR_CODE('UTVD')

Definition at line 201 of file UPseudoSupport.h.

Referenced by LPseudoWinAttachment::ListenToMessage(), and macpp_preparetable().

#define UTextTableView_SingleClick FOUR_CHAR_CODE('UTVS')

Definition at line 200 of file UPseudoSupport.h.

Referenced by LPseudoWinAttachment::ListenToMessage(), and macpp_preparetable().

Function Documentation

void macpp_fecthview | ( | int | widid,
 |  | LPane * | view
 | ) |

Definition at line 135 of file UPseudoSupport.cpp.

References EV_INIT_WIDGET, macpp_getcmdid(), NEW, UPseudoPlaceHolder::SetWidID(), UPseudoPageHider::SetWidID(), and UEventSendMessage().

Referenced by UWidget::OnInitWidget(), and UWidget::OnPageChanged().

00136 {
00137     int cmdid;
00138     if(macpp_getcmdid(pane, cmdid))
00139     {
00140         UEventSendMessage(widid, EV_INIT_WIDGET, cmdid, pane);
00141
00142         // look for any attachement we know of
00143         const TArray<LAttachment*>* theAttachments = pane->GetAttachmentsList();
00144         if (theAttachments != nil)
00145         {
00146             TArrayIterator<LAttachment*> iterate(*theAttachments);
00147
00148             LAttachment*    theAttach;
00149             while (iterate.Next(theAttach))
00150             {
00151                 UPseudoPageHider *hider = dynamic_cast<UPseudoPageHider*>(theAttach);
00152                 if(hider != 0L)
00153                     hider->SetWidID(widid);
00154             }
00155         }
00156
00157         // for any control, set the broadcast message to be the Pane ID
00158         LControl *control = dynamic_cast<LControl*>(pane);
00159         if(control != 0L && control->GetValueMessage() == 0)
00160         {
00161             control->SetValueMessage(pane->GetPaneID());
00162         }
00163
00164         // idem
00165         LCheckBoxGroupBox *groupbox = dynamic_cast<LCheckBoxGroupBox*>(pane);
00166         if(groupbox != 0L && groupbox->GetValueMessage() == 0)
00167         {
00168             groupbox->SetValueMessage(pane->GetPaneID());
00169         }
00170
00171         // set the widget id for some custom controls
00172         UPseudoPlaceHolder *holder = dynamic_cast<UPseudoPlaceHolder*>(pane);
00173         if(holder != 0L)
00174         {
00175             holder->SetWidID(widid);
00176             return; // don't fetch inside, it'll be owned by another pseudo widget
00177         }
00178
00179         // this attachment let us fire a EV_CUSTOM_DRAW event when painting
00180         if(typeid(*pane) == typeid(LView))
00181         {
00182             LPseudoDrawAttachment *attach = NEW LPseudoDrawAttachment(widid, cmdid);
00183             pane->AddAttachment(attach);
00184         }
00185     }
00186
00187     // menus with an unspecified menu id need to be created if we want to use
00188     // later on the EV_COMBO_APPEND message on it.
00189     LPopupButton *controler = dynamic_cast<LPopupButton*>(pane);
00190     if(controler != 0L)
00191     {
00192         if(controler->GetMenuID() == MENU_Unspecified && controler->GetMacMenuH() == 0L)
00193             controler->SetMacMenuH(::NewMenu(::UniqueID('MENU'), "\p"), true);
00194     }
00195
00196     // recurse
00197     LView *view = dynamic_cast<LView*>(pane);
00198     if(view == 0L)
00199         return;
00200
00201     TArrayIterator<LPane*> iterator(view->GetSubPanes());
00202     LPane   *theSub;
00203     while (iterator.Next(theSub))
00204     {
00205         macpp_fecthview(widid, theSub);
00206     }
00207 }

Here is the call graph for this function:

LPseudoWinAttachment* macpp_getattachwindow ( LWindow * wind )

Definition at line 111 of file UPseudoSupport.cpp.

Referenced by macpp_getattachwindow(), UWidget::OnGetSliderProperty(), UWidget::OnPageChanged(), and UWidget::OnSetSliderProperty().

00112 {
00113     if(wind != 0L)
00114     {
00115         const TArray<LAttachment*>* theAttachments = wind->GetAttachmentsList();
00116
00117         if (theAttachments != nil)
00118         {
00119             TArrayIterator<LAttachment*> iterate(*theAttachments);
00120
00121             LAttachment*    theAttach;
00122             while (iterate.Next(theAttach))
00123             {
00124                 LPseudoWinAttachment*   theWinAttach = dynamic_cast<LPseudoWinAttachment*>(theAttach);
00125                 if (theWinAttach != nil)
00126                 {
00127                     return theWinAttach;
00128                 }
00129             }
00130         }
00131     }
00132     return 0L;
00133 }

LPseudoWinAttachment* macpp_getattachwindow ( UWidget * wid )

Definition at line 99 of file UPseudoSupport.cpp.

References UWidget::GetWidget(), kUMainWidget, and macpp_getattachwindow().

00100 {
00101     LPane *win = (LPane *)wid->GetWidget(kUMainWidget);
00102     LWindow *wind = dynamic_cast<LWindow *>((LPane *)win);
00103
00104     if(wind != 0L)
00105     {
00106         return macpp_getattachwindow(wind);
00107     }
00108     return 0L;
00109 }

Here is the call graph for this function:

void macpp_linkbroadcasters | ( | LPane * | view,
 |  | LListener * | listener
 | ) |

Definition at line 209 of file UPseudoSupport.cpp.

Referenced by UWidget::OnInitWidget(), and UWidget::OnPageChanged().

00210 {
00211     LBroadcaster *broadcaster = dynamic_cast<LBroadcaster *>(pane);
00212     if(broadcaster != 0L && !broadcaster->HasListener(listener))
00213         broadcaster->AddListener(listener);
00214
00215     LView *view = dynamic_cast<LView*>(pane);
00216     if(view == 0L)
00217         return;
00218
00219     TArrayIterator<LPane*> iterator(view->GetSubPanes());
00220     LPane   *theSub;
00221     while (iterator.Next(theSub))
00222     {
00223         macpp_linkbroadcasters(theSub, listener);
00224     }
00225 }

void macpp_preparetable | ( | void * | win,
 |  | LTextTableView * | table
 | ) |

Definition at line 246 of file UPseudoSupport.cpp.

References NEW, UTextTableView_DoubleClick, and UTextTableView_SingleClick.

Referenced by UWidget::OnListAddColumns(), UWidget::OnListResetAll(), and UWidget::OnListSetColWidth().

00247 {
00248     if(table->GetTableGeometry() != 0L)
00249         return;
00250
00251     SDimension16    tableSize;
00252     table->SetCellSizer(NEW LCellSizeToFit());
00253     table->GetFrameSize(tableSize);
00254     table->SetTableGeometry(NEW LTableMonoGeometry(table,
00255         tableSize.width/1 /* col width = width/num Cols */,
00256         12  /* row height */));
00257     table->SetTableSelector(NEW LTableSingleRowSelector( table ));
00258     table->SetTableStorage(NEW LTableArrayStorage(table, (UInt32)0));
00259     table->SetDoubleClickMessage(UTextTableView_DoubleClick);
00260     table->SetSingleClickMessage(UTextTableView_SingleClick);
00261     table->SetCustomHilite(true); // cause there is a hilite bug if we don't
00262 }

void macpp_preparetable ( LOutlineTable * table )

Definition at line 227 of file UPseudoSupport.cpp.

References NEW.

00228 {
00229     if(table->GetTableGeometry() != 0L)
00230         return;
00231
00232     // try to guess a good height for the geometry
00233     int height = 20;
00234     TextTraitsH traitsH = UTextTraits::LoadTextTraits(table->GetTextTraits());
00235     if(traitsH != 0L)
00236         height = ((**traitsH).size * 6) / 4;
00237
00238     LTableMultiGeometry *geom = NEW LTableMultiGeometry(table, 50, height);
00239     if(geom != 0L)
00240         table->SetTableGeometry(geom);
00241     table->SetTableSelector(NEW LTableSingleRowSelector( table ));
00242     table->AddAttachment(NEW LOutlineKeySelector(table, msg_AnyMessage));
00243     table->AddAttachment(NEW LKeyScrollAttachment(table));
00244 }

Variable Documentation

bool gTurnOffBroadcast

Definition at line 45 of file UPseudoSupport.cpp.

Referenced by UCmdUI::Check(), UPseudoPlaceHolder::DoRotate(), LPseudoWinAttachment::ListenToMessage(), UWidget::OnComboAppend(), UWidget::OnComboDelSel(), UWidget::OnComboResetAll(), UWidget::OnComboSetPos(), UWidget::OnSetFloat(), UWidget::OnSetSlider(), UWidget::OnSetSliderProperty(), UWidget::OnSetState(), and UWidget::OnSetText().

Generated on Sat Aug 7 22:46:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/BrowseFileView.cpp File Reference

WinCvs/BrowseFileView.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include <process.h>
#include <vector>
#include <IO.h>
#include "BrowseFileView.h"
#include "CvsCommands.h"
#include "MultiFiles.h"
#include "CvsArgs.h"
#include "AppConsole.h"
#include "CvsPrefs.h"
#include "CvsIgnore.h"
#include "TclGlue.h"
#include "MacrosSetup.h"
#include "MoveToTrash.h"
#include "WinCvsBrowser.h"
#include "MainFrm.h"
#include "wincvs_winutil.h"
#include "BrowseViewModel.h"
#include "BrowseViewHandlers.h"
#include "FileViewWatcher.h"
#include "BrowseViewColumn.h"
#include "PythonGlue.h"
#include "FilterMaskOptDlg.h"
#include "LaunchHandlers.h"
#include "CustomizeMenus.h"
#include "umain.h"

Include dependency graph for BrowseFileView.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | OnFilteringChanged (CObject *obj)
void | OnFilterBarChanged (CObject *obj)

Variables

const int | FILECHANGE_TIMER = 999
Default value for file change detection timer.
const int | kSpc = 3
Extra space for printed text.
const int | WM_RESETVIEW = WM_APP + 12
Application message to reset the view.
CPersistentInt | gFileViewSort ("P_FileViewSort", EntnodeData::kName)
CPersistentBool | gFileViewSortAsc ("P_FileViewSortAsc", false)
CPersistentInt | gFileViewFilterMasksReactionSpeed ("P_FileViewFilterMasksReactionSpeed", 60 *1000)

Function Documentation

void OnFilterBarChanged ( CObject * obj ) [static]

Filter Bar changed notification function

Parameters:
obj Browse file view to be notified
Definition at line 91 of file BrowseFileView.cpp.
00092 {
00093     ((CBrowseFileView*)obj)->OnFilterBarChanged();
00094 }

void OnFilteringChanged ( CObject * obj ) [static]

Filtering changed notification function

Parameters:
obj Browse file view to be notified
Definition at line 82 of file BrowseFileView.cpp.
00083 {
00084     ((CBrowseFileView*)obj)->OnFilteringChanged();
00085 }

Variable Documentation

const int FILECHANGE_TIMER = 999 [static]

Default value for file change detection timer.

Definition at line 64 of file BrowseFileView.cpp.

Referenced by CBrowseFileView::OnInitialUpdate().

CPersistentInt gFileViewFilterMasksReactionSpeed("P_FileViewFilterMasksReactionSpeed", 60 *1000)

Referenced by CBrowseFileView::OnInitialUpdate(), CBrowseFileView::OnViewFilterbarEnable(), CBrowseFileView::OnViewFilterbarOptions(), and CBrowseFileView::ResetView().

CPersistentInt gFileViewSort("P_FileViewSort", EntnodeData::kName)

CPersistentBool gFileViewSortAsc("P_FileViewSortAsc", false)

const int kSpc = 3 [static]

Extra space for printed text.

Definition at line 67 of file BrowseFileView.cpp.

Referenced by CBrowseFileView::OnPrint().

const int WM_RESETVIEW = WM_APP + 12 [static]

Application message to reset the view.

Definition at line 70 of file BrowseFileView.cpp.

Referenced by CBrowseFileView::OnFilterBarChanged(), CBrowseFileView::OnFilteringChanged(), and CBrowseFileView::OnViewFilterbarEnable().

Generated on Sat Aug 7 22:47:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/BrowseFileView.h File Reference

WinCvs/BrowseFileView.h File Reference

#include "CvsEntries.h"
#include "CPStr.h"
#include "SortHeaderCtrl.h"
#include "FileTraversal.h"

Include dependency graph for BrowseFileView.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CRecursionLock
Class to prevent the recursive calls. More...
class | KoFileViewTraversalContext
Context for traversing. More...
class | TViewFill
Fill the view. More...
class | CBrowseFileView

Defines

#define | AFX_BROWSEFILEVIEW_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
#define | STR_FILEDETAILVIEW_COLUMN_SECTION "FileDetailView"
#define | STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH "Column Widths"
#define | STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER "Column Order"
#define | CHR_FILEDETAILVIEW_COLUMN_DATASEP ','
#define | STR_FILEDETAILVIEW_COLUMN_PREFIX_REG "Regular "
#define | STR_FILEDETAILVIEW_COLUMN_PREFIX_FLAT "Flat "

Enumerations

enum {
kFileIconText = 0,
kFileIconBinary,
kFileIconUnknown,
kFileIconAdded,
kFileIconConflict,
kFileIconMiss,
kFolderIcon,
kFolderIconUnknown,
kFolderIconMiss,
kFileIconTextMod,
kFileIconBinaryMod,
kFileIconIgnored,
kFolderIconIgnored,
kFileIconRemoved,
kFileIconBinaryAdded,
kFileIconUnicode,
kFileIconUnicodeMod,
kFileIconUnicodeAdded
}
File/folder icons enum. More...

Define Documentation

#define AFX_BROWSEFILEVIEW_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 28 of file BrowseFileView.h.

#define CHR_FILEDETAILVIEW_COLUMN_DATASEP ','

Definition at line 42 of file BrowseFileView.h.

Referenced by CBrowseFileView::LoadColumns(), and CBrowseFileView::SaveColumns().

#define STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER "Column Order"

Definition at line 41 of file BrowseFileView.h.

Referenced by CBrowseFileView::LoadColumns(), and CBrowseFileView::SaveColumns().

#define STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH "Column Widths"

Definition at line 40 of file BrowseFileView.h.

Referenced by CBrowseFileView::LoadColumns(), and CBrowseFileView::SaveColumns().

#define STR_FILEDETAILVIEW_COLUMN_PREFIX_FLAT "Flat "

Definition at line 44 of file BrowseFileView.h.

Referenced by CBrowseFileView::FormatEntrryPrefix().

#define STR_FILEDETAILVIEW_COLUMN_PREFIX_REG "Regular "

Definition at line 43 of file BrowseFileView.h.

Referenced by CBrowseFileView::FormatEntrryPrefix().

#define STR_FILEDETAILVIEW_COLUMN_SECTION "FileDetailView"

Definition at line 39 of file BrowseFileView.h.

Referenced by CBrowseFileView::LoadColumns(), and CBrowseFileView::SaveColumns().

Enumeration Type Documentation

anonymous enum

File/folder icons enum.

Enumeration values:
kFileIconText | Text file
kFileIconBinary | Binary file
kFileIconUnknown | Unknown file
kFileIconAdded | Added file
kFileIconConflict | Conflict file
kFileIconMiss | Missing file
kFolderIcon | Folder
kFolderIconUnknown | Unknown folder
kFolderIconMiss | Missing folder
kFileIconTextMod | Modified text file
kFileIconBinaryMod | Modified binary file
kFileIconIgnored | Ignored file
kFolderIconIgnored | Ignored folder
kFileIconRemoved | Removed file
kFileIconBinaryAdded | Added binary file
kFileIconUnicode | Unicode file
kFileIconUnicodeMod | Modified unicode file
kFileIconUnicodeAdded | Added unicode file
Definition at line 54 of file BrowseFileView.h.
00055 {
00056     kFileIconText = 0,
00057     kFileIconBinary,
00058     kFileIconUnknown,
00059     kFileIconAdded,
00060     kFileIconConflict,
00061     kFileIconMiss,
00062     kFolderIcon,
00063     kFolderIconUnknown,
00064     kFolderIconMiss,
00065     kFileIconTextMod,
00066     kFileIconBinaryMod,
00067     kFileIconIgnored,
00068     kFolderIconIgnored,
00069     kFileIconRemoved,
00070     kFileIconBinaryAdded,
00071     kFileIconUnicode,
00072     kFileIconUnicodeMod,
00073     kFileIconUnicodeAdded
00074 };

Generated on Sat Aug 7 22:47:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/BrowserBar.cpp File Reference

WinCvs/BrowserBar.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "BrowserBar.h"

Include dependency graph for BrowserBar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/BrowserBar.h File Reference

WinCvs/BrowserBar.h File Reference

#include "WinCvsBrowser.h"

Include dependency graph for BrowserBar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CBrowserBar

Defines

#define | AFX_BROWSERBAR_H__64721953_F9A8_11D2_BDEC_000000000000__INCLUDED_

Define Documentation

#define AFX_BROWSERBAR_H__64721953_F9A8_11D2_BDEC_000000000000__INCLUDED_

Definition at line 22 of file BrowserBar.h.

Generated on Sat Aug 7 22:47:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ColorStatic.cpp File Reference

WinCvs/ColorStatic.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "ColorStatic.h"

Include dependency graph for ColorStatic.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ColorStatic.h File Reference

WinCvs/ColorStatic.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CColorStatic

Defines

#define | AFX_COLORSTATIC_H__4D2B055E_F042_428F_A662_09ABEA902DCE__INCLUDED_

Define Documentation

#define AFX_COLORSTATIC_H__4D2B055E_F042_428F_A662_09ABEA902DCE__INCLUDED_

Definition at line 26 of file ColorStatic.h.

Generated on Sat Aug 7 22:47:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ConsoleBar.cpp File Reference

WinCvs/ConsoleBar.cpp File Reference

#include "stdafx.h"
#include "ConsoleBar.h"
#include "wincvsView.h"
#include "resource.h"

Include dependency graph for ConsoleBar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ConsoleBar.h File Reference

WinCvs/ConsoleBar.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CBarConsole

Generated on Sat Aug 7 22:47:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CustomizeMenus.cpp File Reference

WinCvs/CustomizeMenus.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "CustomizeMenus.h"
#include "MacrosSetup.h"
#include "wincvs_winutil.h"
#include "MMenuString.h"
#include "CvsPrefs.h"

Include dependency graph for CustomizeMenus.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CCustInvertTable
Custom menu object. More...

Defines

#define | INVTAB(msg, e) {msg, #e, e}
Helper macro to construct custom menu table.

Functions

const CustInvertTable * | CustGetByKey (const char *entry)
CMenu * | GetCustomMenu (int whichmenu, CView *pThis)
Return the custom menu.
void | CustomizeMenus (int whichmenu)
Ask to customize the menus.
char * | GetInvString (const CustInvertTable *entry)
bool | IsInInvertList (const CustInvertTable *entry, const std::vector< UStr > &list)
int CALLBACK | CustMenuCompare (LPARAM data1, LPARAM data2, LPARAM data)
Compare callback function.

Variables

char * | sDefBrowserMenu []
Browser default menu.
char * | sDefFilesMenu []
Files default menu.
CMMenuString | gFilesMenu (99,"P_FilesMenu", sDefFilesMenu)
CMMenuString | gBrowserMenu (99,"P_BrowserMenu", sDefBrowserMenu)
CustInvertTable sInitInvTable []
Custom menu items table.
CCustInvertTable sInvTable
Custom menu object.

Define Documentation

#define INVTAB | ( | msg,
 |  | e | ) | {msg, #e, e}

Helper macro to construct custom menu table.

Definition at line 39 of file CustomizeMenus.cpp.

Function Documentation

const CustInvertTable* CustGetByKey ( const char * entry )

Get custom menu item for a given key

Parameters:
entry Entry key
Returns:
Custom menu item, NULL if not found
Definition at line 158 of file CustomizeMenus.cpp.

References CCustInvertTable::Initialize(), NULL, and sInvTable.

Referenced by GetCustomMenu(), IsInInvertList(), and CCustomizeMenus::OnInitDialog().

00159 {
00160     std::vector<CustInvertTable>::const_iterator tmp;
00161     sInvTable.Initialize();
00162
00163     for(tmp = sInvTable.begin(); tmp != sInvTable.end(); ++tmp)
00164     {
00165         if( strcmp(entry, (*tmp).key) == 0 )
00166             return &*tmp;
00167     }
00168
00169     return NULL;
00170 }

Here is the call graph for this function:

int CALLBACK CustMenuCompare | ( | LPARAM | data1,
 |  | LPARAM | data2,
 |  | LPARAM | data
 | ) | [static]

Compare callback function.

Definition at line 302 of file CustomizeMenus.cpp.

References CustInvertTable::cmd, and GetInvString().

Referenced by CCustomizeMenus::OnInitDialog().

00303 {
00304     CustInvertTable* d1 = (CustInvertTable*)data1;
00305     CustInvertTable* d2 = (CustInvertTable*)data2;
00306
00307     CString s1(GetInvString(d1));
00308     CString s2(GetInvString(d2));
00309
00310     int cmp = strcmp(s1, s2);
00311     if( cmp == 0 )
00312         return 0;
00313
00314     if( d1->cmd == ID_SEPARATOR )
00315         return -1;
00316
00317     if( d2->cmd == ID_SEPARATOR )
00318         return 1;
00319
00320     return cmp;
00321 }

Here is the call graph for this function:

void CustomizeMenus ( int whichmenu )

Ask to customize the menus.

Definition at line 236 of file CustomizeMenus.cpp.

References gBrowserMenu, gCvsPrefs, gFilesMenu, kCustomBrowserMenu, kCustomFilesMenu, and CvsPrefs::save().

Referenced by CBrowseFileView::OnCustomize(), and CWinCvsBrowser::OnCustomize().

00237 {
00238     CMMenuString *multiMenu;
00239
00240     switch( whichmenu )
00241     {
00242     case kCustomBrowserMenu:
00243         multiMenu = &gBrowserMenu;
00244         break;
00245     case kCustomFilesMenu:
00246         multiMenu = &gFilesMenu;
00247         break;
00248     default:
00249         ASSERT(FALSE);
00250         return;
00251     }
00252
00253     CCustomizeMenus custom(multiMenu);
00254     if( custom.DoModal() == IDOK )
00255     {
00256         gCvsPrefs.save();
00257     }
00258 }

Here is the call graph for this function:

CMenu* GetCustomMenu | ( | int | whichmenu,
 |  | CView * | pThis
 | ) |

Return the custom menu.

Definition at line 173 of file CustomizeMenus.cpp.

References CustInvertTable::cmd, CustGetByKey(), gBrowserMenu, CMMenuString::GetList(), gFilesMenu, ID_CUST_FILES_MENU, ID_CUST_FOLDER_MENU, kCustomBrowserMenu, kCustomFilesMenu, CustInvertTable::title, and UpdateUIMenu().

Referenced by CBrowseFileView::OnContextMenu(), and CWinCvsBrowser::OnContextMenu().

00174 {
00175     CMMenuString* multiMenu;
00176
00177     switch(whichmenu)
00178     {
00179     case kCustomBrowserMenu:
00180         multiMenu = &gBrowserMenu;
00181         break;
00182     case kCustomFilesMenu:
00183         multiMenu = &gFilesMenu;
00184         break;
00185     default:
00186         ASSERT(0);
00187         return 0L;
00188     }
00189
00190     CMenu* res = new CMenu;
00191     VERIFY(res->CreatePopupMenu());
00192
00193     std::vector<UStr>& list = multiMenu->GetList();
00194     std::vector<UStr>::iterator i = list.begin();
00195
00196     while( i != list.end() )
00197     {
00198         const CustInvertTable* tab = CustGetByKey(*i);
00199         if( tab == 0L )
00200         {
00201             TRACE1("Removing old command(%s)\n", (const char*)*i);
00202
00203             list.erase(i);
00204             i = list.begin();
00205             continue;
00206         }
00207
00208         i++;
00209     }
00210
00211     for(i = list.begin(); i != list.end(); ++i)
00212     {
00213         const CustInvertTable* tab = CustGetByKey(*i);
00214         if( tab )
00215         {
00216             if( tab->cmd == ID_SEPARATOR )
00217             {
00218                 res->AppendMenu(MF_SEPARATOR);
00219             }
00220             else
00221             {
00222                 res->AppendMenu(MF_STRING, tab->cmd, tab->title);
00223             }
00224         }
00225     }
00226
00227     res->AppendMenu(MF_SEPARATOR);
00228     res->AppendMenu(MF_STRING, whichmenu == kCustomFilesMenu ? ID_CUST_FILES_MENU : ID_CUST_FOLDER_MENU, CString("Customize this menu..."));
00229
00230     UpdateUIMenu(res, pThis);
00231
00232     return res;
00233 }

Here is the call graph for this function:

char* GetInvString ( const CustInvertTable * entry ) [static]

Get custom menu item string

Parameters:
entry Custom menu item
Returns:
Custom menu item string
Definition at line 265 of file CustomizeMenus.cpp.

References CustInvertTable::title.

Referenced by CustMenuCompare(), CCustomizeMenus::OnAdd(), CCustomizeMenus::OnInitDialog(), CCustomizeMenus::OnMove(), and CCustomizeMenus::OnRemove().

00266 {
00267     static CString res;
00268     res = entry->title;
00269
00270     int ind;
00271     if( (ind = res.Find('&')) != -1 )
00272         res.Delete(ind);
00273
00274     if( (ind = res.Find('\t')) != -1 )
00275         res = res.Left(ind);
00276
00277     return (char*)(const char*)res;
00278 }

bool IsInInvertList | ( | const CustInvertTable * | entry,
 |  | const std::vector< UStr > & | list
 | ) | [static]

Check whether the menu item entry is in the list

Parameters:
entry | Entry
list | List
Returns:
true if menu item found, false otherwise
Definition at line 286 of file CustomizeMenus.cpp.

References CustGetByKey(), and CustInvertTable::key.

Referenced by CCustomizeMenus::OnInitDialog().

00287 {
00288     for(std::vector<UStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00289     {
00290         const CustInvertTable* tab = CustGetByKey(*i);
00291         if( tab == 0L )
00292             continue;
00293
00294         if( strcmp(entry->key, tab->key) == 0 )
00295             return true;
00296     }
00297
00298     return false;
00299 }

Here is the call graph for this function:

Variable Documentation

CMMenuString gBrowserMenu(99,"P_BrowserMenu", sDefBrowserMenu) [static]

Referenced by CustomizeMenus(), and GetCustomMenu().

CMMenuString gFilesMenu(99,"P_FilesMenu", sDefFilesMenu) [static]

Referenced by CustomizeMenus(), and GetCustomMenu().

char* sDefBrowserMenu[]

Initial value:

{
    "ID_VIEW_UPDATE",
    "ID_VIEW_COMMIT",
    "ID_SEPARATOR",
    "ID_VIEW_EXPLORE",
    "ID_VIEW_NEWINSTANCE",
    "ID_VIEW_QUERYUPDATE",
    "ID_VIEW_RELOAD",
    "ID_SEPARATOR",
    "ID_VIEW_IMPORT",
    "ID_VIEW_CHECKOUT",
    0L
}
Browser default menu.

Definition at line 42 of file CustomizeMenus.cpp.

char* sDefFilesMenu[]

Initial value:

{
    "ID_VIEW_UPDATE",
    "ID_VIEW_COMMIT",
    "ID_SEPARATOR",
    "ID_VIEW_EXPLORE",
    "ID_VIEW_NEWINSTANCE",
    "ID_VIEW_QUERYUPDATE",
    "ID_VIEW_RELOAD",
    "ID_SEPARATOR",
    "ID_VIEW_EDITSEL",
    "ID_VIEW_EDITSELDEF",
    "ID_VIEW_OPENSEL",
    "ID_VIEW_OPENSELAS",
    "ID_SEPARATOR",
    "ID_VIEW_DIFF",
    "ID_VIEW_LOG",
    "ID_VIEW_STATUS",
    "ID_VIEW_GRAPH",
    "ID_QUERY_ANNOTATE",
    0L
}
Files default menu.

Definition at line 58 of file CustomizeMenus.cpp.

CustInvertTable sInitInvTable[] [static]

Custom menu items table.

Definition at line 85 of file CustomizeMenus.cpp.

Referenced by CCustInvertTable::CCustInvertTable().

CCustInvertTable sInvTable

Custom menu object.

Referenced by CustGetByKey(), and CCustomizeMenus::OnInitDialog().

Generated on Sat Aug 7 22:47:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CustomizeMenus.h File Reference

WinCvs/CustomizeMenus.h File Reference

#include "Persistent.h"
#include "HHelpSupport.h"

Include dependency graph for CustomizeMenus.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | CustInvertTable
Custom menu item. More...
class | CCustomizeMenus

Defines

#define | AFX_CUSTOMIZEMENUS_H__28A6AE7E_C54B_47A5_A8F5_A127E2E9F3BF__INCLUDED_

Functions

const CustInvertTable * | CustGetByKey (const char *entry)
CMenu * | GetCustomMenu (int whichmenu, CView *pThis)
Return the custom menu.
void | CustomizeMenus (int whichmenu)
Ask to customize the menus.

Define Documentation

#define AFX_CUSTOMIZEMENUS_H__28A6AE7E_C54B_47A5_A8F5_A127E2E9F3BF__INCLUDED_

Definition at line 22 of file CustomizeMenus.h.

Function Documentation

const CustInvertTable* CustGetByKey ( const char * entry )

Get custom menu item for a given key

Parameters:
entry Entry key
Returns:
Custom menu item, NULL if not found
Definition at line 158 of file CustomizeMenus.cpp.

References CCustInvertTable::Initialize(), NULL, and sInvTable.

Referenced by GetCustomMenu(), IsInInvertList(), and CCustomizeMenus::OnInitDialog().

00159 {
00160     std::vector<CustInvertTable>::const_iterator tmp;
00161     sInvTable.Initialize();
00162
00163     for(tmp = sInvTable.begin(); tmp != sInvTable.end(); ++tmp)
00164     {
00165         if( strcmp(entry, (*tmp).key) == 0 )
00166             return &*tmp;
00167     }
00168
00169     return NULL;
00170 }

Here is the call graph for this function:

void CustomizeMenus ( int whichmenu )

Ask to customize the menus.

Definition at line 236 of file CustomizeMenus.cpp.

References gBrowserMenu, gCvsPrefs, gFilesMenu, kCustomBrowserMenu, kCustomFilesMenu, and CvsPrefs::save().

Referenced by CWinCvsBrowser::OnCustomize(), and CBrowseFileView::OnCustomize().

00237 {
00238     CMMenuString *multiMenu;
00239
00240     switch( whichmenu )
00241     {
00242     case kCustomBrowserMenu:
00243         multiMenu = &gBrowserMenu;
00244         break;
00245     case kCustomFilesMenu:
00246         multiMenu = &gFilesMenu;
00247         break;
00248     default:
00249         ASSERT(FALSE);
00250         return;
00251     }
00252
00253     CCustomizeMenus custom(multiMenu);
00254     if( custom.DoModal() == IDOK )
00255     {
00256         gCvsPrefs.save();
00257     }
00258 }

Here is the call graph for this function:

CMenu* GetCustomMenu | ( | int | whichmenu,
 |  | CView * | pThis
 | ) |

Return the custom menu.

Definition at line 173 of file CustomizeMenus.cpp.

References CustInvertTable::cmd, CustGetByKey(), gBrowserMenu, CMMenuString::GetList(), gFilesMenu, ID_CUST_FILES_MENU, ID_CUST_FOLDER_MENU, kCustomBrowserMenu, kCustomFilesMenu, CustInvertTable::title, and UpdateUIMenu().

Referenced by CWinCvsBrowser::OnContextMenu(), and CBrowseFileView::OnContextMenu().

00174 {
00175     CMMenuString* multiMenu;
00176
00177     switch(whichmenu)
00178     {
00179     case kCustomBrowserMenu:
00180         multiMenu = &gBrowserMenu;
00181         break;
00182     case kCustomFilesMenu:
00183         multiMenu = &gFilesMenu;
00184         break;
00185     default:
00186         ASSERT(0);
00187         return 0L;
00188     }
00189
00190     CMenu* res = new CMenu;
00191     VERIFY(res->CreatePopupMenu());
00192
00193     std::vector<UStr>& list = multiMenu->GetList();
00194     std::vector<UStr>::iterator i = list.begin();
00195
00196     while( i != list.end() )
00197     {
00198         const CustInvertTable* tab = CustGetByKey(*i);
00199         if( tab == 0L )
00200         {
00201             TRACE1("Removing old command(%s)\n", (const char*)*i);
00202
00203             list.erase(i);
00204             i = list.begin();
00205             continue;
00206         }
00207
00208         i++;
00209     }
00210
00211     for(i = list.begin(); i != list.end(); ++i)
00212     {
00213         const CustInvertTable* tab = CustGetByKey(*i);
00214         if( tab )
00215         {
00216             if( tab->cmd == ID_SEPARATOR )
00217             {
00218                 res->AppendMenu(MF_SEPARATOR);
00219             }
00220             else
00221             {
00222                 res->AppendMenu(MF_STRING, tab->cmd, tab->title);
00223             }
00224         }
00225     }
00226
00227     res->AppendMenu(MF_SEPARATOR);
00228     res->AppendMenu(MF_STRING, whichmenu == kCustomFilesMenu ? ID_CUST_FILES_MENU : ID_CUST_FOLDER_MENU, CString("Customize this menu..."));
00229
00230     UpdateUIMenu(res, pThis);
00231
00232     return res;
00233 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:47:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CvsStatusBar.cpp File Reference

WinCvs/CvsStatusBar.cpp File Reference

#include "stdafx.h"
#include <math.h>
#include "wincvs.h"
#include "CvsStatusBar.h"
#include "CvsPrefs.h"
#include "CvsSandboxInfo.h"
#include "AppConsole.h"

Include dependency graph for CvsStatusBar.cpp:

Include dependency graph

Go to the source code of this file.

Variables

UINT indicators []
Status bar indicators array.

Variable Documentation

UINT indicators[] [static]

Initial value:

{
    ID_SEPARATOR,
    ID_SEPARATOR,
    ID_SEPARATOR,
    ID_SEPARATOR,
    ID_INDICATOR_CAPS,
    ID_INDICATOR_NUM,
    ID_INDICATOR_SCRL,
}
Status bar indicators array.

Definition at line 39 of file CvsStatusBar.cpp.

Referenced by CCvsStatusBar::SetIndicators().

Generated on Sat Aug 7 22:47:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CvsStatusBar.h File Reference

WinCvs/CvsStatusBar.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCvsStatusBar

Defines

#define | AFX_CVSSTATUSBAR_H__F549ACF2_ECFE_4933_A05D_5FC8248C3CD4__INCLUDED_

Enumerations

enum kStatusPaneId {
kStatusMain,
kStatusCVSROOT,
kStatusRepository,
kStatusThrobber
}
Status bar pane id enum. More...

Define Documentation

#define AFX_CVSSTATUSBAR_H__F549ACF2_ECFE_4933_A05D_5FC8248C3CD4__INCLUDED_

Definition at line 22 of file CvsStatusBar.h.

Enumeration Type Documentation

enum kStatusPaneId

Status bar pane id enum.

Enumeration values:
kStatusMain | Main pane
kStatusCVSROOT | CVSROOT as per CVS/Root
kStatusRepository | Repository location as per CVS/Repository
kStatusThrobber | Running command (animation) indicator
Definition at line 31 of file CvsStatusBar.h.
00031             {
00032     kStatusMain,
00033     kStatusCVSROOT,
00034     kStatusRepository,
00035     kStatusThrobber
00036 }kStatusPaneId;

Generated on Sat Aug 7 22:47:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ExploreBar.cpp File Reference

WinCvs/ExploreBar.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "MainFrm.h"
#include "ExploreBar.h"
#include "BrowseFileView.h"
#include "FileTraversal.h"
#include "CvsCommands.h"
#include "CvsPrefs.h"
#include "BrowseViewHandlers.h"

Include dependency graph for ExploreBar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ExploreBar.h File Reference

WinCvs/ExploreBar.h File Reference

#include "CJShellTree.h"

Include dependency graph for ExploreBar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CMyShellTree
class | CExploreBar

Defines

#define | AFX_EXPLOREBAR_H__A132A164_1A90_11D3_B1A1_004095463819__INCLUDED_

Define Documentation

#define AFX_EXPLOREBAR_H__A132A164_1A90_11D3_B1A1_004095463819__INCLUDED_

Definition at line 22 of file ExploreBar.h.

Generated on Sat Aug 7 22:47:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/FileViewWatcher.cpp File Reference

WinCvs/FileViewWatcher.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "FileViewWatcher.h"

Include dependency graph for FileViewWatcher.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | WATCHER_FOREGROUND_TIMEOUT 1000
Foreground timeout period - fast notifications.
#define | WATCHER_BACKGROUND_TIMEOUT 5000
Background timeout period - slow notifications.
#define | WATCHER_IGNORE_FACTOR 0.8f
Factor to ignore the notifications for.
#define | WATCHER_RAPID_FACTOR 1.2f
Factor to detect rapid notifications.
#define | WATCHER_RAPID_THRESHOLD 5
Threshold to reduce rapid notifications.

Define Documentation

#define WATCHER_BACKGROUND_TIMEOUT 5000

Background timeout period - slow notifications.

Definition at line 39 of file FileViewWatcher.cpp.

Referenced by KoWatcher::GetTimeout(), and KoWatcher::Run().

#define WATCHER_FOREGROUND_TIMEOUT 1000

Foreground timeout period - fast notifications.

Definition at line 36 of file FileViewWatcher.cpp.

Referenced by KoWatcher::GetTimeout(), and KoWatcher::Notify().

#define WATCHER_IGNORE_FACTOR 0.8f

Factor to ignore the notifications for.

Definition at line 42 of file FileViewWatcher.cpp.

Referenced by KoWatcher::GetTimeout().

#define WATCHER_RAPID_FACTOR 1.2f

Factor to detect rapid notifications.

Definition at line 45 of file FileViewWatcher.cpp.

Referenced by KoWatcher::Notify().

#define WATCHER_RAPID_THRESHOLD 5

Threshold to reduce rapid notifications.

Definition at line 48 of file FileViewWatcher.cpp.

Referenced by KoWatcher::GetTimeout().

Generated on Sat Aug 7 22:47:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/FileViewWatcher.h File Reference

WinCvs/FileViewWatcher.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class KoWatcher
File modification watcher thread. More...

Generated on Sat Aug 7 22:47:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphDoc.cpp File Reference

WinCvs/GraphDoc.cpp File Reference

#include "stdafx.h"
#include <direct.h>
#include <sys/stat.h>
#include "Wincvs.h"
#include "GraphDoc.h"
#include "CvsLog.h"
#include "WinCvsView.h"
#include "GraphView.h"
#include "CvsEntries.h"

Include dependency graph for GraphDoc.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | NormalizeFn (const char *folder, const char *fn, char *dir, char *name)

Variables

const IID | IID_ITest

Function Documentation

void NormalizeFn | ( | const char * | folder,
 |  | const char * | fn,
 |  | char * | dir,
 |  | char * | name
 | ) | [static]

Normalize folder/fname since the latter can be a path relative to folder

Parameters:
folder | Input folder
fn | Input file name
dir | Normalized folder
name | Normalized file name
Definition at line 50 of file GraphDoc.cpp.

References NULL.

Referenced by CGraphDoc::SetNode().

00051 {
00052     char buffer[_MAX_PATH];
00053     char dirBuffer[_MAX_PATH];
00054     char nameBuffer[_MAX_PATH];
00055     char drive[_MAX_PATH];
00056     char ext[_MAX_EXT];
00057
00058     _makepath(buffer, NULL, folder, fn, NULL);
00059     _splitpath(buffer, drive, dirBuffer, nameBuffer, ext);
00060     _makepath(dir, drive, dirBuffer, NULL, NULL);
00061     _makepath(name, NULL, NULL, nameBuffer, ext);
00062 }

Variable Documentation

const IID IID_ITest [static]

Initial value:

{ 0x9f456b5, 0x18, 0x11d2, { 0xbc, 0xaa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }
Definition at line 89 of file GraphDoc.cpp.

Generated on Sat Aug 7 22:47:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphDoc.h File Reference

WinCvs/GraphDoc.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CGraphDoc
Graph document class. More...

Defines

#define | AFX_GRAPHDOC_H__09F456C1_0018_11D2_BCAA_000000000000__INCLUDED_

Define Documentation

#define AFX_GRAPHDOC_H__09F456C1_0018_11D2_BCAA_000000000000__INCLUDED_

Definition at line 26 of file GraphDoc.h.

Generated on Sat Aug 7 22:47:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphFrm.cpp File Reference

WinCvs/GraphFrm.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "GraphFrm.h"
#include "GraphView.h"
#include "WinCvsView.h"
#include "MainFrm.h"

Include dependency graph for GraphFrm.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphFrm.h File Reference

WinCvs/GraphFrm.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CGraphFrame

Defines

#define | AFX_GRAPHFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_

Define Documentation

#define AFX_GRAPHFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_

Definition at line 26 of file GraphFrm.h.

Generated on Sat Aug 7 22:47:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphView.cpp File Reference

WinCvs/GraphView.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "GraphView.h"
#include "GraphDoc.h"
#include "AppConsole.h"
#include "LogParse.h"
#include "CvsEntries.h"
#include "BrowseFileView.h"
#include "WinCvsBrowser.h"
#include "CvsArgs.h"
#include "WincvsView.h"
#include "CvsPrefs.h"
#include "PromptFiles.h"
#include "FileTraversal.h"
#include "ProgressDlg.h"
#include "GraphOptDlg.h"
#include "AdminOptionDlg.h"
#include "CvsAlert.h"
#include "CvsCommands.h"
#include "MultiFiles.h"
#include "BrowseViewHandlers.h"
#include "wincvs_winutil.h"
#include "LaunchHandlers.h"

Include dependency graph for GraphView.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | TGraphCurSelector

Functions

void | DrawOctangle (CDC &dc, const CRect &selfB)
void | DrawNode (CDC &dc, const CRect &selfB, COLORREF contour, kNodeShape shape, bool isSel, int penStyle=PS_SOLID)

Variables

CPersistentInt | gGraphSelColor ("P_GraphSelColor", RGB(160, 160, 160))
CPersistentInt | gGraphShadowColor ("P_GraphShadowColor", RGB(128, 128, 128))
CPersistentInt | gGraphHeaderColor ("P_GraphHeaderColor", RGB(255, 0, 0))
CPersistentInt | gGraphTagColor ("P_GraphTagColor", RGB(0, 0, 0))
CPersistentInt | gGraphBranchColor ("P_GraphBranchColor", RGB(0, 0, 255))
CPersistentInt | gGraphNodeColor ("P_GraphNodeColor", RGB(0, 0, 255))
CPersistentInt | gGraphDeadNodeColor ("P_GraphDeadNodeColor", RGB(255, 0, 0))
CPersistentInt | gGraphUserStateNodeColor ("P_GraphUserStateNodeColor", RGB(0, 128, 64))
CPersistentInt | gGraphMergeColor ("P_GraphMergeColor", RGB(255, 0, 0))
const int | kVChildSpace = 8
const int | kHChildSpace = 40
const int | kInflateNodeSpace = 8

Function Documentation

void DrawNode | ( | CDC & | dc,
 |  | const CRect & | selfB,
 |  | COLORREF | contour,
 |  | kNodeShape | shape,
 |  | bool | isSel,
 |  | int | penStyle = PS_SOLID
 | ) | [static]

Helper function used to draw the node

Parameters:
dc | Device context
selfB | Bounds
contour | Contour color
shape | Shape
isSel | true if it's selected, false if not selected
penStyle | Pen style
Definition at line 103 of file GraphView.cpp.

References DrawOctangle(), gGraphSelColor, gGraphShadowColor, kOctangle, kRectangle, kRoundRect, ROUND_RECT_PT, and SHADOW_OFFSET_PT.

00106 {
00107     CPen* pOldPen = 0L;
00108     CBrush* pOldBrush = 0L;
00109     CPen pen, pen2;
00110     CBrush brush;
00111     COLORREF selcolor = gGraphSelColor;
00112     COLORREF shadowc = gGraphShadowColor;
00113
00114     TRY
00115     {
00116         // Prepare the shadow
00117         CRect shadow = selfB;
00118         shadow.OffsetRect(SHADOW_OFFSET_PT);
00119
00120         brush.CreateSolidBrush(shadowc);
00121         pOldBrush = dc.SelectObject(&brush);
00122         pen.CreatePen(penStyle, 1, shadowc);
00123         pOldPen = dc.SelectObject(&pen);
00124
00125         // Draw the shadow
00126         switch( shape )
00127         {
00128         case kRectangle:
00129             dc.Rectangle(shadow);
00130             break;
00131         case kRoundRect:
00132             dc.RoundRect(shadow, ROUND_RECT_PT);
00133             break;
00134         case kOctangle:
00135             DrawOctangle(dc, shadow);
00136             break;
00137         default:
00138             ASSERT(FALSE);  //unknown type
00139             return;
00140         }
00141
00142         // Prepare selection
00143         if( isSel )
00144         {
00145             brush.DeleteObject();
00146             brush.CreateSolidBrush(selcolor);
00147             dc.SelectObject(&brush);
00148         }
00149         else
00150         {
00151             dc.SelectObject(pOldBrush);
00152             pOldBrush = 0L;
00153         }
00154
00155         pen2.CreatePen(penStyle, 1, contour);
00156         dc.SelectObject(&pen2);
00157
00158         // Draw the main shape
00159         switch( shape )
00160         {
00161         case kRectangle:
00162             dc.Rectangle(selfB);
00163             break;
00164         case kRoundRect:
00165             dc.RoundRect(selfB, ROUND_RECT_PT);
00166             break;
00167         case kOctangle:
00168             DrawOctangle(dc, selfB);
00169             break;
00170         default:
00171             ASSERT(FALSE);  //unknown type
00172             return;
00173         }
00174
00175         // Cleanup
00176         if( pOldPen != 0L )
00177         {
00178             dc.SelectObject(pOldPen);
00179             pOldPen = 0L;
00180         }
00181
00182         if( pOldBrush != 0L )
00183         {
00184             dc.SelectObject(pOldBrush);
00185             pOldBrush = 0L;
00186         }
00187
00188         pen.DeleteObject();
00189         pen2.DeleteObject();
00190         brush.DeleteObject();
00191     }
00192     CATCH_ALL(e)
00193     {
00194         if( pOldPen != 0L )
00195             dc.SelectObject(pOldPen);
00196
00197         if( pOldBrush != 0L )
00198             dc.SelectObject(pOldBrush);
00199     }
00200     END_CATCH_ALL
00201 }

Here is the call graph for this function:

void DrawOctangle | ( | CDC & | dc,
 |  | const CRect & | selfB
 | ) | [static]

Helper function to draw the figure used for branch tag representation

Parameters:
dc | Device context
selfB | Bounds
Definition at line 70 of file GraphView.cpp.

References OCTANGLE_COUNT.

Referenced by DrawNode().

00071 {
00072     int cutLen = selfB.Height() / 4;
00073     CPoint point1(selfB.left, selfB.top + cutLen);
00074     CPoint point2(selfB.left + cutLen, selfB.top);
00075     CPoint point3(selfB.right - cutLen, selfB.top);
00076     CPoint point4(selfB.right, selfB.top + cutLen);
00077     CPoint point5(selfB.right, selfB.bottom - cutLen);
00078     CPoint point6(selfB.right - cutLen, selfB.bottom);
00079     CPoint point7(selfB.left + cutLen, selfB.bottom);
00080     CPoint point8(selfB.left, selfB.bottom - cutLen);
00081     CPoint arrPoints[OCTANGLE_COUNT] = {
00082         point1,
00083         point2,
00084         point3,
00085         point4,
00086         point5,
00087         point6,
00088         point7,
00089         point8};
00090
00091     dc.Polygon(arrPoints, OCTANGLE_COUNT);
00092 }

Variable Documentation

CPersistentInt gGraphBranchColor("P_GraphBranchColor", RGB(0, 0, 255))

Referenced by CGraphView::OnGraphGraphoptions(), and CWinLogBranchData::UpdateSelf().

CPersistentInt gGraphDeadNodeColor("P_GraphDeadNodeColor", RGB(255, 0, 0))

Referenced by CGraphView::OnGraphGraphoptions(), and CWinLogRevData::UpdateSelf().

CPersistentInt gGraphHeaderColor("P_GraphHeaderColor", RGB(255, 0, 0))

Referenced by CGraphView::OnGraphGraphoptions(), and CWinLogHeaderData::UpdateSelf().

CPersistentInt gGraphMergeColor("P_GraphMergeColor", RGB(255, 0, 0))

Referenced by CGraphView::OnGraphGraphoptions(), and CWinLogData::UpdateMergePoints().

CPersistentInt gGraphNodeColor("P_GraphNodeColor", RGB(0, 0, 255))

Referenced by CGraphView::OnGraphGraphoptions(), and CWinLogRevData::UpdateSelf().

CPersistentInt gGraphSelColor("P_GraphSelColor", RGB(160, 160, 160))

Referenced by DrawNode(), and CGraphView::OnGraphGraphoptions().

CPersistentInt gGraphShadowColor("P_GraphShadowColor", RGB(128, 128, 128))

Referenced by DrawNode(), and CGraphView::OnGraphGraphoptions().

CPersistentInt gGraphTagColor("P_GraphTagColor", RGB(0, 0, 0))

Referenced by CGraphView::OnGraphGraphoptions(), and CWinLogTagData::UpdateSelf().

CPersistentInt gGraphUserStateNodeColor("P_GraphUserStateNodeColor", RGB(0, 128, 64))

Referenced by CGraphView::OnGraphGraphoptions(), and CWinLogRevData::UpdateSelf().

const int kHChildSpace = 40

Horizontal child spacing Definition at line 62 of file GraphView.cpp.

const int kInflateNodeSpace = 8

Inflate node spacing Definition at line 63 of file GraphView.cpp.

const int kVChildSpace = 8

Vertical child spacing Definition at line 61 of file GraphView.cpp.

Generated on Sat Aug 7 22:47:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphView.h File Reference

WinCvs/GraphView.h File Reference

#include "CvsLog.h"
#include "AppGlue.h"

Include dependency graph for GraphView.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CWinLogData
Windows log data abstract class. More...
class | CWinLogHeaderData
Windows log header node data. More...
class | CWinLogRevData
Windows log revision node data. More...
class | CWinLogTagData
Windows log tag node data. More...
class | CWinLogBranchData
Windows log branch node data. More...
class | TGraph
Base traverse class. More...
class | TGraphRectSelect
Graph traverse class. More...
class | TGraphCmdStatus
Graph command status class. More...
class | CGraphConsole
Graph console. More...
class | TGraphDelCmd
Graph command delete revisions class. More...
class | TGraphSelNonSig
Select non-significant revisions. More...
class | CRevisionConsole
Console used to retrieve a specific revision. More...
class | CGraphRectTracker
Graph rectangle tracker. More...
class | CGraphView
Graph view class. More...

Defines

#define | AFX_GRAPHVIEW_H__7A07C311_03F9_11D2_BCB2_000000000000__INCLUDED_
#define | STARTPOINT_PT (CPoint(5, 5))
#define | SHADOW_OFFSET_PT (CPoint(4, 4))
#define | ROUND_RECT_PT (CPoint(6, 6))
#define | OCTANGLE_COUNT 8
#define | RGB_DEF_SEL RGB(160, 160, 160)
#define | RGB_DEF_SHADOW RGB(128, 128, 128)
#define | RGB_DEF_HEADER RGB(255, 0, 0)
#define | RGB_DEF_TAG RGB(0, 0, 0)
#define | RGB_DEF_BRANCH RGB(0, 0, 255)
#define | RGB_DEF_NODE RGB(0, 0, 255)
#define | RGB_DEF_DEADNODE RGB(255, 0, 0)
#define | RGB_DEF_USERSTATENODE RGB(0, 128, 64)
#define | RGB_DEF_MERGE RGB(255, 0, 0)
#define | STYLE_DEADNODE PS_DOT
#define | STYLE_USERSTATENODE PS_DASH

Enumerations

enum kNodeShape {
kRectangle,
kRoundRect,
kOctangle
}
Node shape type enum. More...
enum kTGraph {
kTContinue,
kTGetDown,
kTStop
}
Traverse result enum. More...

Define Documentation

#define AFX_GRAPHVIEW_H__7A07C311_03F9_11D2_BCB2_000000000000__INCLUDED_

Definition at line 18 of file GraphView.h.

#define OCTANGLE_COUNT 8

Definition at line 33 of file GraphView.h.

Referenced by DrawOctangle().

#define RGB_DEF_BRANCH RGB(0, 0, 255)

Definition at line 39 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define RGB_DEF_DEADNODE RGB(255, 0, 0)

Definition at line 41 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define RGB_DEF_HEADER RGB(255, 0, 0)

Definition at line 37 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define RGB_DEF_MERGE RGB(255, 0, 0)

Definition at line 43 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define RGB_DEF_NODE RGB(0, 0, 255)

Definition at line 40 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define RGB_DEF_SEL RGB(160, 160, 160)

Definition at line 35 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define RGB_DEF_SHADOW RGB(128, 128, 128)

Definition at line 36 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define RGB_DEF_TAG RGB(0, 0, 0)

Definition at line 38 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define RGB_DEF_USERSTATENODE RGB(0, 128, 64)

Definition at line 42 of file GraphView.h.

Referenced by CGraphOptDlg::OnReset().

#define ROUND_RECT_PT (CPoint(6, 6))

Definition at line 31 of file GraphView.h.

Referenced by DrawNode().

#define SHADOW_OFFSET_PT (CPoint(4, 4))

Definition at line 30 of file GraphView.h.

Referenced by CGraphView::CalcImageSize(), and DrawNode().

#define STARTPOINT_PT (CPoint(5, 5))

Definition at line 29 of file GraphView.h.

Referenced by CGraphView::CalcImageSize(), and CGraphView::OnContextMenu().

#define STYLE_DEADNODE PS_DOT

Definition at line 44 of file GraphView.h.

Referenced by CWinLogRevData::UpdateSelf().

#define STYLE_USERSTATENODE PS_DASH

Definition at line 45 of file GraphView.h.

Referenced by CWinLogRevData::UpdateSelf().

Enumeration Type Documentation

enum kNodeShape

Node shape type enum.

Enumeration values:
kRectangle | Rectangle
kRoundRect | Rectangle with round corners
kOctangle | Octal
Definition at line 48 of file GraphView.h.
00049 {
00050     kRectangle,
00051     kRoundRect,
00052     kOctangle
00053 } kNodeShape;

enum kTGraph

Traverse result enum.

Enumeration values:
kTContinue | Continue traverse
kTGetDown | Get down
kTStop | Stop
Definition at line 56 of file GraphView.h.

Referenced by TGraph::TraverseGraph(), TGraphCurSelector::TraverseNode(), TGraphSelNonSig::TraverseNode(), TGraphDelCmd::TraverseNode(), TGraphCmdStatus::TraverseNode(), and TGraphRectSelect::TraverseNode().

00057 {
00058     kTContinue,
00059     kTGetDown,
00060     kTStop
00061 } kTGraph;

Generated on Sat Aug 7 22:47:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HHelpSupport.cpp File Reference

WinCvs/HHelpSupport.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "HHelpSupport.h"
#include <algorithm>

Include dependency graph for HHelpSupport.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HHelpSupport.h File Reference

WinCvs/HHelpSupport.h File Reference

#include <functional>
#include "HHelp\wincvs.h"

Include dependency graph for HHelpSupport.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CHHelpSupport
HTML help support class. More...
class | CHHelpPropertySheet
HTML Help property sheet. More...
class | CHHelpPropertyPage
HTML Help property page. More...
class | CHHelpDialog
HTML Help dialog. More...

Defines

#define | AFX_HHELPSUPPORT_H__E97D92A1_F935_41B3_9748_8000F0A1A76C__INCLUDED_

Variables

const DWORD | helpTopicIgnore = -1
Use to specify any control ID that doesn't have help topic.
const DWORD | helpTopicEnd = 0
Use to mark control-topic array mapping end.

Define Documentation

#define AFX_HHELPSUPPORT_H__E97D92A1_F935_41B3_9748_8000F0A1A76C__INCLUDED_

Definition at line 22 of file HHelpSupport.h.

Variable Documentation

const DWORD helpTopicEnd = 0

Use to mark control-topic array mapping end.

Definition at line 37 of file HHelpSupport.h.

Referenced by CHHelpSupport::CreateHelpIDsData().

const DWORD helpTopicIgnore = -1

Use to specify any control ID that doesn't have help topic.

Definition at line 34 of file HHelpSupport.h.

Referenced by CMultilineEntryDlg::InitHelpID(), CCommit_MAIN::InitHelpID(), CHHelpSupport::IsIgnoredCtrl(), and CHHelpSupport::SetCtrlHelpID().

Generated on Sat Aug 7 22:47:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HistComboBoxEx.cpp File Reference

WinCvs/HistComboBoxEx.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "HistComboBoxEx.h"
#include "FileTraversal.h"
#include "CvsEntries.h"
#include "MainFrm.h"
#include "CvsAlert.h"
#include "CvsCommands.h"

Include dependency graph for HistComboBoxEx.cpp:

Include dependency graph

Go to the source code of this file.

Functions

int | TraverseHistory (CHistComboBoxEx &browseHist)

Variables

PCPStr | gOldLoc ("P_BrowserLoc","C:\\")
Browse location.

Function Documentation

int TraverseHistory ( CHistComboBoxEx & browseHist )

Traverse browse location history items

Parameters:
browseHist Browse location combo box
Returns:
The number of browse history combo box items
Definition at line 48 of file HistComboBoxEx.cpp.

References MAX_PATH, and CHistComboBoxEx::SetIcon().

Referenced by CHistComboBoxEx::OnDropdown().

00049 {
00050     CWaitCursor waitCursor;
00051
00052     char szPath[MAX_PATH] = "";
00053     for(int nIndex = 0; nIndex < browseHist.GetCount(); nIndex++)
00054     {
00055         COMBOBOXEXITEM cbi = { 0 };
00056         cbi.mask = CBEIF_TEXT;
00057         cbi.iItem = nIndex;
00058         cbi.pszText = szPath;
00059         cbi.cchTextMax = MAX_PATH - 1;
00060
00061         browseHist.GetItem(&cbi);
00062         browseHist.SetIcon(cbi, true);
00063     }
00064
00065     return nIndex;
00066 }

Here is the call graph for this function:

Variable Documentation

PCPStr gOldLoc("P_BrowserLoc","C:\\")

Browse location.

Referenced by CHistComboBoxEx::GetOldLoc(), CHistComboBoxEx::NewRoot(), and CvsPrefs::save().

Generated on Sat Aug 7 22:47:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HistComboBoxEx.h File Reference

WinCvs/HistComboBoxEx.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CHistComboBoxEx
Browse location history combo box class. More...

Defines

#define | AFX_HISTCOMBOBOXEX_H__E330E7B9_8C79_44CB_8F07_01D395975365__INCLUDED_
#define | HISTLOC_IMAGE_CX 16
#define | HISTLOC_VISIBLEITEMS 8

Enumerations

enum {
kLocationIconUnknown = 0,
kLocationIcon,
kLocationIconIgnored,
kLocationIconMissing,
kLocationIconErased
}
Browse location status icons. More...

Define Documentation

#define AFX_HISTCOMBOBOXEX_H__E330E7B9_8C79_44CB_8F07_01D395975365__INCLUDED_

Definition at line 22 of file HistComboBoxEx.h.

#define HISTLOC_IMAGE_CX 16

Definition at line 30 of file HistComboBoxEx.h.

Referenced by CHistComboBoxEx::CalcDroppedWidth(), CMainFrame::CreateLocationCombo(), and CHistComboBoxEx::SetIcon().

#define HISTLOC_VISIBLEITEMS 8

Definition at line 31 of file HistComboBoxEx.h.

Referenced by CMainFrame::CreateLocationCombo().

Enumeration Type Documentation

anonymous enum

Browse location status icons.

Enumeration values:
kLocationIconUnknown | Unknown icon
kLocationIcon | CVS folder icon
kLocationIconIgnored | Ignored icon
kLocationIconMissing | Missing icon
kLocationIconErased | Erased icon
Definition at line 34 of file HistComboBoxEx.h.
00035 {
00036     kLocationIconUnknown = 0,
00037     kLocationIcon,
00038     kLocationIconIgnored,
00039     kLocationIconMissing,
00040     kLocationIconErased
00041 };

Generated on Sat Aug 7 22:47:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/LogFrm.cpp File Reference

WinCvs/LogFrm.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "LogFrm.h"
#include "WinCvsBrowser.h"
#include "BrowseFileView.h"
#include "WincvsView.h"
#include "MainFrm.h"
#include "wincvs_winutil.h"

Include dependency graph for LogFrm.cpp:

Include dependency graph

Go to the source code of this file.

Functions

BOOL IsKeyMovingFocus (MSG *pMsg)

Function Documentation

BOOL IsKeyMovingFocus ( MSG * pMsg ) [inline]

Definition at line 44 of file LogFrm.cpp.

00045 {
00046      return ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_TAB) &&
00047          (!(0x8000 & GetKeyState(VK_CONTROL)))
00048          );
00049 }

Generated on Sat Aug 7 22:47:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/LogFrm.h File Reference

WinCvs/LogFrm.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CLogFrame

Defines

#define | AFX_CHILDFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_

Define Documentation

#define AFX_CHILDFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_

Definition at line 26 of file LogFrm.h.

Generated on Sat Aug 7 22:47:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MainFrm.cpp File Reference

WinCvs/MainFrm.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "MainFrm.h"
#include "WinCvsBrowser.h"
#include "BrowseFileView.h"
#include "WincvsView.h"
#include "Persistent.h"
#include "AppConsole.h"
#include "Splash.h"
#include "BrowserBar.h"
#include "ExploreBar.h"
#include "CvsPrefs.h"
#include "AppGlue.h"
#include "wincvs_winutil.h"
#include "CvsAlert.h"

Include dependency graph for MainFrm.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | NOEXPLOREVIEW
Define to disable the "Explore" view.

Functions

CSemaphore | sGetEnv (0)
bool IsAppEnabled ()

Variables

CMString | gHistoryLocs (100,"P_BrowserLocs")
CWinPlacement | gMainPlacement ("P_MainPlacement")
bool sAskingMainThread
UStr sGetEnvResult

Define Documentation

#define NOEXPLOREVIEW

Define to disable the "Explore" view.

Definition at line 48 of file MainFrm.cpp.

Function Documentation

bool IsAppEnabled ( void ) [static]

Check whether to enable commands

Returns:
true if commands can be enabled, false otherwise
Definition at line 62 of file MainFrm.cpp.

References CWincvsApp::IsCvsRunning().

00063 {
00064     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00065     return !app->IsCvsRunning();
00066 }

Here is the call graph for this function:

CSemaphore sGetEnv ( 0 ) [static]

Referenced by CMainFrame::GetEnvMainThread(), and CMainFrame::OnTimer().

Variable Documentation

CMString gHistoryLocs(100,"P_BrowserLocs")

Referenced by CMainFrame::CreateLocationCombo(), and CWincvsApp::InitInstance().

CWinPlacement gMainPlacement("P_MainPlacement") [static]

Referenced by CMainFrame::InitialShowWindow(), and CMainFrame::OnClose().

bool sAskingMainThread [static]

Definition at line 53 of file MainFrm.cpp.

Referenced by CMainFrame::GetEnvMainThread(), and CMainFrame::OnTimer().

UStr sGetEnvResult [static]

Definition at line 54 of file MainFrm.cpp.

Referenced by CMainFrame::GetEnvMainThread(), and CMainFrame::OnTimer().

Generated on Sat Aug 7 22:47:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MainFrm.h File Reference

WinCvs/MainFrm.h File Reference

#include "ConsoleBar.h"
#include "CvsStatusBar.h"
#include "HistComboBoxEx.h"
#include "SortHeaderCtrl.h"
#include "BrowseViewModel.h"
#include "BrowseViewColumn.h"

Include dependency graph for MainFrm.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CWinPlacement
Persistent window placement class. More...
class | CMainFrame
Main frame class. More...

Defines

#define | AFX_MAINFRM_H__D2D77DCC_8299_11D1_8949_444553540000__INCLUDED_

Define Documentation

#define AFX_MAINFRM_H__D2D77DCC_8299_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file MainFrm.h.

Generated on Sat Aug 7 22:47:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MfFileDialog.cpp File Reference

WinCvs/MfFileDialog.cpp File Reference

#include "stdafx.h"
#include "MfFileDialog.h"
#include "MultiFiles.h"
#include "CvsCommands.h"
#include <cderr.h>
#include <sstream>

Include dependency graph for MfFileDialog.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MfFileDialog.h File Reference

WinCvs/MfFileDialog.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CPathBuffer
Support class to handle the selection buffer. More...
class | CMfFileDialog
Multi-selection file dialog wrapper class. More...

Defines

#define | AFX_MFFILEDIALOG_H__66684391_7914_4A0D_9848_022A6CA7573C__INCLUDED_

Define Documentation

#define AFX_MFFILEDIALOG_H__66684391_7914_4A0D_9848_022A6CA7573C__INCLUDED_

Definition at line 26 of file MfFileDialog.h.

Generated on Sat Aug 7 22:47:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MMenuString.cpp File Reference

WinCvs/MMenuString.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "MMenuString.h"

Include dependency graph for MMenuString.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MMenuString.h File Reference

WinCvs/MMenuString.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CMMenuString
Menu string. More...

Defines

#define | AFX_MMENUSTRING_H__6C55ACE9_20FB_42DE_B678_7EA6A3AF99B3__INCLUDED_

Define Documentation

#define AFX_MMENUSTRING_H__6C55ACE9_20FB_42DE_B678_7EA6A3AF99B3__INCLUDED_

Definition at line 26 of file MMenuString.h.

Generated on Sat Aug 7 22:47:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MultilineEntryDlg.cpp File Reference

WinCvs/MultilineEntryDlg.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include <process.h>
#include "MultilineEntryDlg.h"
#include "CvsPrefs.h"
#include "MultiFiles.h"
#include "getline.h"
#include "MultiString.h"
#include "CvsCommands.h"
#include "EditorMonDlg.h"
#include "ItemListDlg.h"
#include "BrowseViewHandlers.h"
#include "GetPrefs.h"
#include "TemplateDlg.h"
#include "LineCmd.h"
#include "CvsRootDlg.h"

Include dependency graph for MultilineEntryDlg.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | ENTRY_LOGMESSAGE_DESC_FORMAT "Enter the log &message (%s):"
#define | ENTRY_CMDLINE_DESC_FORMAT "Enter the &command line (%s):"
#define | ENTRY_STATE_DESC_FORMAT "Enter the &state (%s):"
#define | ENTRY_DESCRIPTION_DESC_FORMAT "Enter the &description (%s):"

Define Documentation

#define ENTRY_CMDLINE_DESC_FORMAT "Enter the &command line (%s):"

Definition at line 50 of file MultilineEntryDlg.cpp.

Referenced by CMultilineEntryDlg::SetEntryDescription().

#define ENTRY_DESCRIPTION_DESC_FORMAT "Enter the &description (%s):"

Definition at line 52 of file MultilineEntryDlg.cpp.

Referenced by CMultilineEntryDlg::SetEntryDescription().

#define ENTRY_LOGMESSAGE_DESC_FORMAT "Enter the log &message (%s):"

Definition at line 49 of file MultilineEntryDlg.cpp.

Referenced by CMultilineEntryDlg::SetEntryDescription().

#define ENTRY_STATE_DESC_FORMAT "Enter the &state (%s):"

Definition at line 51 of file MultilineEntryDlg.cpp.

Referenced by CMultilineEntryDlg::SetEntryDescription().

Generated on Sat Aug 7 22:47:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MultilineEntryDlg.h File Reference

WinCvs/MultilineEntryDlg.h File Reference

#include "SmartComboBox.h"
#include "wincvs_winutil.h"
#include "HHelpSupport.h"

Include dependency graph for MultilineEntryDlg.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CMultiLineEditDialogKeyHelper
Helper class to process dialog messages for dialogs containing multi-line edit control. More...
class | CMultilineEntryDlg
Multiline entry controls complex. More...

Defines

#define | AFX_MULTILINEENTRYDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Enumerations

enum kMultilineEntryType {
kMultilineLogMessage = 0,
kMultilineCmdLine,
kMultilineState,
kMultilineDescription
}
Multiline entry type enum. More...
enum kActionType {
kActionOpenEditor = 0,
kActionOpenTemplate,
kActionBrowseTag,
kActionBrowseModule,
kActionFormatCvsRoot
}
Action enum. More...

Variables

CMString gRevNames

Define Documentation

#define AFX_MULTILINEENTRYDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file MultilineEntryDlg.h.

Enumeration Type Documentation

enum kActionType

Action enum.

Enumeration values:
kActionOpenEditor | Open external editor
kActionOpenTemplate | Open CVS template
kActionBrowseTag | Browse repository for tag
kActionBrowseModule | Browse repository for module
kActionFormatCvsRoot | Format CVSROOT
Definition at line 52 of file MultilineEntryDlg.h.

Referenced by CMultilineEntryDlg::OnActionGo().

00052              {
00053     kActionOpenEditor = 0,
00054     kActionOpenTemplate,
00055     kActionBrowseTag,
00056     kActionBrowseModule,
00057     kActionFormatCvsRoot
00058 }kActionType;

enum kMultilineEntryType

Multiline entry type enum.

Enumeration values:
kMultilineLogMessage | Log message
kMultilineCmdLine | Command line
kMultilineState | State
kMultilineDescription | Description
Definition at line 44 of file MultilineEntryDlg.h.

Referenced by CAdminOption_MAIN::SetMultilineEntry().

00044              {
00045     kMultilineLogMessage = 0,
00046     kMultilineCmdLine,
00047     kMultilineState,
00048     kMultilineDescription,
00049 }kMultilineEntryType;

Variable Documentation

CMString gRevNames

Generated on Sat Aug 7 22:47:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ndir.c File Reference

WinCvs/ndir.c File Reference

#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dos.h>
#include <ndir.h>

Include dependency graph for ndir.c:

Include dependency graph

Go to the source code of this file.

Defines

#define | ATTRIBUTES (_A_RDONLY | _A_HIDDEN | _A_SYSTEM | _A_SUBDIR)

Functions

void | free_dircontents (struct _dircontents *)
DIR * | opendir (const char *name)
void | closedir (DIR *dirp)
direct * | readdir (DIR *dirp)
void | seekdir (DIR *dirp, long off)
long | telldir (DIR *dirp)

Define Documentation

#define ATTRIBUTES (_A_RDONLY | _A_HIDDEN | _A_SYSTEM | _A_SUBDIR)

Definition at line 38 of file ndir.c.

Function Documentation

void closedir ( DIR * dirp )

Definition at line 116 of file ndir.c.

References _dirdesc::dd_contents, DIR, free, and free_dircontents().

Referenced by FileTraverse().

00117 {
00118   free_dircontents (dirp->dd_contents);
00119   free ((char *) dirp);
00120 }

Here is the call graph for this function:

void free_dircontents ( struct _dircontents * ) [static]

Definition at line 168 of file ndir.c.

References _dircontents::_d_entry, _dircontents::_d_next, and free.

Referenced by closedir(), and opendir().

00169 {
00170   struct _dircontents *odp;
00171
00172   while (dp)
00173     {
00174       if (dp->_d_entry)
00175     free (dp->_d_entry);
00176       dp = (odp = dp)->_d_next;
00177       free (odp);
00178     }
00179 }

DIR* opendir ( const char * name )

Definition at line 43 of file ndir.c.

References DIR, free, free_dircontents(), and malloc.

Referenced by FileTraverse().

00044 {
00045   struct _finddata_t find_buf;
00046   DIR *dirp;
00047   struct _dircontents *dp;
00048   char name_buf[_MAX_PATH + 1];
00049   char *slash = "";
00050   long hFile;
00051
00052   if (!name)
00053     name = "";
00054   else if (*name)
00055     {
00056       const char *s;
00057       int l = strlen (name);
00058
00059       s = name + l - 1;
00060       if ( !(l == 2 && *s == ':') && *s != '\\' && *s != '/')
00061     slash = "/";    /* save to insert slash between path and "*.*" */
00062     }
00063
00064   strcat (strcat (strcpy (name_buf, name), slash), "*.*");
00065
00066   dirp = (DIR *) malloc (sizeof (DIR));
00067   if (dirp == (DIR *)0)
00068     return (DIR *)0;
00069
00070   dirp->dd_loc = 0;
00071   dirp->dd_contents = dirp->dd_cp = (struct _dircontents *) 0;
00072
00073   if ((hFile = _findfirst (name_buf, &find_buf)) < 0)
00074     {
00075       free (dirp);
00076       return (DIR *)0;
00077     }
00078
00079   do
00080     {
00081       dp = (struct _dircontents *) malloc (sizeof (struct _dircontents));
00082       if (dp == (struct _dircontents *)0)
00083     {
00084       free_dircontents (dirp->dd_contents);
00085       return (DIR *)0;
00086     }
00087
00088       dp->_d_entry = malloc (strlen (find_buf.name) + 1);
00089       if (dp->_d_entry == (char *)0)
00090     {
00091       free (dp);
00092       free_dircontents (dirp->dd_contents);
00093       return (DIR *)0;
00094     }
00095
00096       if (dirp->dd_contents)
00097     dirp->dd_cp = dirp->dd_cp->_d_next = dp;
00098       else
00099     dirp->dd_contents = dirp->dd_cp = dp;
00100
00101       strcpy (dp->_d_entry, find_buf.name);
00102
00103       dp->_d_next = (struct _dircontents *)0;
00104
00105     } while (!_findnext (hFile, &find_buf));
00106
00107   dirp->dd_cp = dirp->dd_contents;
00108
00109   _findclose(hFile);
00110
00111   return dirp;
00112 }

Here is the call graph for this function:

struct direct* readdir ( DIR * dirp )

Definition at line 124 of file ndir.c.

References _dircontents::_d_entry, _dircontents::_d_next, direct::d_ino, direct::d_name, direct::d_namlen, direct::d_reclen, _dirdesc::dd_cp, _dirdesc::dd_loc, and DIR.

Referenced by FileTraverse().

00125 {
00126   static struct direct dp;
00127
00128   if (dirp->dd_cp == (struct _dircontents *)0)
00129     return (struct direct *)0;
00130   dp.d_namlen = dp.d_reclen =
00131     strlen (strcpy (dp.d_name, dirp->dd_cp->_d_entry));
00132 #if 0 /* JB */
00133   strlwr (dp.d_name);       /* JF */
00134 #endif
00135   dp.d_ino = 0;
00136   dirp->dd_cp = dirp->dd_cp->_d_next;
00137   dirp->dd_loc++;
00138
00139   return &dp;
00140 }

void seekdir | ( | DIR * | dirp,
 |  | long | off
 | ) |

Definition at line 144 of file ndir.c.

References _dircontents::_d_next, _dirdesc::dd_contents, _dirdesc::dd_cp, _dirdesc::dd_loc, and DIR.

00145 {
00146   long i = off;
00147   struct _dircontents *dp;
00148
00149   if (off < 0)
00150     return;
00151   for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next)
00152     ;
00153   dirp->dd_loc = off - (i + 1);
00154   dirp->dd_cp = dp;
00155 }

long telldir ( DIR * dirp )

Definition at line 159 of file ndir.c.

References _dirdesc::dd_loc, and DIR.

00160 {
00161   return dirp->dd_loc;
00162 }

Generated on Sat Aug 7 22:47:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ndir.h File Reference

WinCvs/ndir.h File Reference

#include <sys/types.h>

Include dependency graph for ndir.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | direct
struct | _dircontents
struct | _dirdesc

Defines

#define | rewinddir(dirp) seekdir(dirp, 0L)
#define | MAXNAMLEN 255

Typedefs

typedef _dirdesc | DIR

Functions

void | seekdir (DIR *, long)
long | telldir (DIR *)
DIR * | opendir (const char *)
void | closedir (DIR *)
direct * readdir (DIR *)

Define Documentation

#define MAXNAMLEN 255

Definition at line 37 of file ndir.h.

#define rewinddir ( dirp ) seekdir(dirp, 0L)

Definition at line 32 of file ndir.h.

Typedef Documentation

typedef struct _dirdesc DIR

Referenced by closedir(), FileTraverse(), opendir(), readdir(), seekdir(), and telldir().

Function Documentation

void closedir ( DIR * )

Definition at line 116 of file ndir.c.

References _dirdesc::dd_contents, DIR, free, and free_dircontents().

Referenced by FileTraverse().

00117 {
00118   free_dircontents (dirp->dd_contents);
00119   free ((char *) dirp);
00120 }

Here is the call graph for this function:

DIR* opendir ( const char * )

Definition at line 43 of file ndir.c.

References DIR, free, free_dircontents(), and malloc.

Referenced by FileTraverse().

00044 {
00045   struct _finddata_t find_buf;
00046   DIR *dirp;
00047   struct _dircontents *dp;
00048   char name_buf[_MAX_PATH + 1];
00049   char *slash = "";
00050   long hFile;
00051
00052   if (!name)
00053     name = "";
00054   else if (*name)
00055     {
00056       const char *s;
00057       int l = strlen (name);
00058
00059       s = name + l - 1;
00060       if ( !(l == 2 && *s == ':') && *s != '\\' && *s != '/')
00061     slash = "/";    /* save to insert slash between path and "*.*" */
00062     }
00063
00064   strcat (strcat (strcpy (name_buf, name), slash), "*.*");
00065
00066   dirp = (DIR *) malloc (sizeof (DIR));
00067   if (dirp == (DIR *)0)
00068     return (DIR *)0;
00069
00070   dirp->dd_loc = 0;
00071   dirp->dd_contents = dirp->dd_cp = (struct _dircontents *) 0;
00072
00073   if ((hFile = _findfirst (name_buf, &find_buf)) < 0)
00074     {
00075       free (dirp);
00076       return (DIR *)0;
00077     }
00078
00079   do
00080     {
00081       dp = (struct _dircontents *) malloc (sizeof (struct _dircontents));
00082       if (dp == (struct _dircontents *)0)
00083     {
00084       free_dircontents (dirp->dd_contents);
00085       return (DIR *)0;
00086     }
00087
00088       dp->_d_entry = malloc (strlen (find_buf.name) + 1);
00089       if (dp->_d_entry == (char *)0)
00090     {
00091       free (dp);
00092       free_dircontents (dirp->dd_contents);
00093       return (DIR *)0;
00094     }
00095
00096       if (dirp->dd_contents)
00097     dirp->dd_cp = dirp->dd_cp->_d_next = dp;
00098       else
00099     dirp->dd_contents = dirp->dd_cp = dp;
00100
00101       strcpy (dp->_d_entry, find_buf.name);
00102
00103       dp->_d_next = (struct _dircontents *)0;
00104
00105     } while (!_findnext (hFile, &find_buf));
00106
00107   dirp->dd_cp = dirp->dd_contents;
00108
00109   _findclose(hFile);
00110
00111   return dirp;
00112 }

Here is the call graph for this function:

struct direct* readdir ( DIR * )

Definition at line 124 of file ndir.c.

References _dircontents::_d_entry, _dircontents::_d_next, direct::d_ino, direct::d_name, direct::d_namlen, direct::d_reclen, _dirdesc::dd_cp, _dirdesc::dd_loc, and DIR.

Referenced by FileTraverse().

00125 {
00126   static struct direct dp;
00127
00128   if (dirp->dd_cp == (struct _dircontents *)0)
00129     return (struct direct *)0;
00130   dp.d_namlen = dp.d_reclen =
00131     strlen (strcpy (dp.d_name, dirp->dd_cp->_d_entry));
00132 #if 0 /* JB */
00133   strlwr (dp.d_name);       /* JF */
00134 #endif
00135   dp.d_ino = 0;
00136   dirp->dd_cp = dirp->dd_cp->_d_next;
00137   dirp->dd_loc++;
00138
00139   return &dp;
00140 }

void seekdir | ( | DIR * | ,
 |  | long |
 | ) |

Definition at line 144 of file ndir.c.

References _dircontents::_d_next, _dirdesc::dd_contents, _dirdesc::dd_cp, _dirdesc::dd_loc, and DIR.

00145 {
00146   long i = off;
00147   struct _dircontents *dp;
00148
00149   if (off < 0)
00150     return;
00151   for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next)
00152     ;
00153   dirp->dd_loc = off - (i + 1);
00154   dirp->dd_cp = dp;
00155 }

long telldir ( DIR * )

Definition at line 159 of file ndir.c.

References _dirdesc::dd_loc, and DIR.

00160 {
00161   return dirp->dd_loc;
00162 }

Generated on Sat Aug 7 22:47:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/NoPython.cpp File Reference

WinCvs/NoPython.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "NoPython.h"
#include "Persistent.h"
#include "Splash.h"

Include dependency graph for NoPython.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | WarnNoPython (void)

Variables

CPersistentBool | gWarnPython ("P_WarnPython", true)

Function Documentation

void WarnNoPython ( void )

Display the warning about missing Python installation Definition at line 97 of file NoPython.cpp.

References gWarnPython, and CNoPython::m_remind.

Referenced by CPython_Interp::IsAvail().

00098 {
00099     if( (bool)gWarnPython )
00100     {
00101         CNoPython dlg;
00102         dlg.DoModal();
00103
00104         if( !dlg.m_remind )
00105             gWarnPython = false;
00106     }
00107 }

Variable Documentation

CPersistentBool gWarnPython("P_WarnPython", true) [static]

Referenced by WarnNoPython().

Generated on Sat Aug 7 22:47:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/NoPython.h File Reference

WinCvs/NoPython.h File Reference

#include "HHelpSupport.h"

Include dependency graph for NoPython.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CNoPython

Defines

#define | AFX_NOPYTHON_H__F675DE42_0FA7_4785_8946_E8FC861BBA57__INCLUDED_

Functions

void | WarnNoPython (void)

Define Documentation

#define AFX_NOPYTHON_H__F675DE42_0FA7_4785_8946_E8FC861BBA57__INCLUDED_

Definition at line 22 of file NoPython.h.

Function Documentation

void WarnNoPython ( void )

Display the warning about missing Python installation Definition at line 97 of file NoPython.cpp.

References gWarnPython, and CNoPython::m_remind.

Referenced by CPython_Interp::IsAvail().

00098 {
00099     if( (bool)gWarnPython )
00100     {
00101         CNoPython dlg;
00102         dlg.DoModal();
00103
00104         if( !dlg.m_remind )
00105             gWarnPython = false;
00106     }
00107 }

Generated on Sat Aug 7 22:47:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/resource.h File Reference

WinCvs/resource.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | IDR_CNTR_INPLACE 6
#define | IDD_ABOUTBOX 100
#define | IDP_OLE_INIT_FAILED 100
#define | IDP_FAILED_TO_CREATE 102
#define | IDB_LIGHTBULB 103
#define | IDP_SOCKETS_INIT_FAILED 104
#define | IDD_TIP 105
#define | CG_IDS_TIPOFTHEDAY 106
#define | CG_IDS_TIPOFTHEDAYMENU 107
#define | CG_IDS_DIDYOUKNOW 108
#define | CG_IDS_FILE_ABSENT 109
#define | CG_IDP_FILE_CORRUPT 110
#define | CG_IDS_TIPOFTHEDAYHELP 111
#define | IDB_SPLASH 112
#define | IDC_OPTIONCHECK_BUTTON 113
#define | IDR_MAINFRAME 128
#define | IDR_WINCVSTYPE 129
#define | IDS_DEFFONT 129
#define | IDR_BROWSER 129
#define | IDD_PASSWRD 132
#define | IDD_ALERT 134
#define | IDD_PREFS_GLOBALS 136
#define | IDD_CHECKOUT_MAIN 137
#define | IDD_COMMIT_MAIN 138
#define | IDD_IMPORT_MAIN 139
#define | IDD_IMPORT_OPTIONS 140
#define | IDD_CMDLINE_MAIN 142
#define | IDD_IMPORTFILTER 143
#define | IDD_WARNINGDESC 145
#define | IDD_ENTRYDESC 146
#define | IDD_UPDATE_MAIN 147
#define | IDD_UPDATE_MERGE 149
#define | IDD_LOG_MAIN 150
#define | IDD_LOG_FILTERS 152
#define | IDB_SMALLICONS 152
#define | IDD_DIFF_OPTIONS 153
#define | IDD_DIFF_MAIN 154
#define | IDD_UPDATE_OPTIONS 155
#define | IDD_PREFS_WINCVS 156
#define | IDR_FILELIST 157
#define | IDR_MULTIUSER 158
#define | IDR_GRAPH 161
#define | IDR_STATEICONS 164
#define | IDR_TAGS 165
#define | IDD_INIT_MAIN 165
#define | IDR_WORKSPACE 173
#define | IDB_LOCATE 176
#define | IDD_PROGRESS 177
#define | IDB_ABOUT 180
#define | IDD_CUSTOMIZE 181
#define | IDR_CUSTMENUS 182
#define | IDB_PYTHON 183
#define | IDD_SAVESETTINGS 184
#define | IDB_IDLE 185
#define | IDR_FILTER 186
#define | IDD_COMMIT_OPTIONS 186
#define | IDB_HISTLOC 187
#define | IDD_PREFS_CVSCMD_DIALOGS 191
#define | IDD_ANNOTATE_MAIN 192
#define | IDD_GRAPH_OPTIONS 193
#define | IDD_EDITMESSAGE 195
#define | IDD_ADMINOPTION 196
#define | IDD_EDITORMON 197
#define | IDD_NOPYTHON 198
#define | IDD_TAG_MAIN 199
#define | IDD_RTAG_MAIN 200
#define | IDD_RTAG_OPTIONS 201
#define | IDD_STATUS_MAIN 203
#define | IDD_ITEM_LIST 205
#define | IDD_LOGIN_MAIN 206
#define | IDR_ITEMLIST 207
#define | IDD_PREFS_CVS 207
#define | IDB_MODULES 208
#define | IDD_RELEASE_MAIN 208
#define | IDB_IMPORT 209
#define | IDD_SELECTION_DETAILS 209
#define | IDD_FILTERBAR_OPTIONS 212
#define | IDD_FILTER_SELECTION 213
#define | IDD_MULTILINE_ENTRY 214
#define | IDD_CVSTEMPLATE 218
#define | IDD_OPEN_MAIN 219
#define | IDI_MB_STOP 220
#define | IDI_MB_INFORMATION 221
#define | IDI_MB_QUESTION 222
#define | IDI_MB_EXCLAMATION 223
#define | IDD_CVSROOT 224
#define | IDD_EDITKEYWORD 226
#define | IDC_CVSROOT 1000
#define | IDC_BULB 1001
#define | IDC_CHECKOUT_READ_ONLY 1002
#define | IDC_STARTUP 1003
#define | IDC_HAS_COMPRESSION 1004
#define | IDC_NEXTTIP 1005
#define | IDC_PRUNE_EMPTY_DIR 1006
#define | IDC_TIPSTRING 1007
#define | IDC_ENCRYPTION 1008
#define | IDC_UNIX_LF 1009
#define | IDC_NO_SPLASH_SCREEN 1011
#define | IDC_QUIET 1012
#define | IDC_CONTROL_ADDED_FILES 1013
#define | IDC_FILEPATH 1014
#define | IDC_PROMPTEDIT 1015
#define | IDC_ALWAYSROOT 1017
#define | IDC_PASSWORD 1018
#define | IDC_AUTO_LOGOUT 1019
#define | IDC_SPIN_AUTO_LOGOUT_TIME 1020
#define | IDC_MATCH_ENTRIES_CASE 1021
#define | IDC_BROWSE_CVSROOT 1024
#define | IDC_MULTILINE_ENTRY 1025
#define | IDC_STDOUT 1027
#define | IDC_MODNAME 1028
#define | IDC_BROWSE_PATH 1029
#define | IDC_TAGNAME 1030
#define | IDC_NORECURS 1031
#define | IDC_PATH 1032
#define | IDC_FORCE_HEAD_REV 1033
#define | IDC_ENTRY 1034
#define | IDC_OVERWRITE 1035
#define | IDC_HAS_REV 1036
#define | IDC_MULTILINE_ENTRY_WRAP 1037
#define | IDC_RESET_STICKY 1038
#define | IDC_CREATE_MISSING_DIR 1039
#define | IDC_GET_CLEAN_COPY 1040
#define | IDC_ENTRIES_LIST 1048
#define | IDC_CONFLICT_DESC 1049
#define | IDC_ENTRY_EDIT 1050
#define | IDC_WARNING_DESC 1051
#define | IDC_ENTRYSTATE_NO_CHANGE 1052
#define | IDC_HAS_DATE 1053
#define | IDC_ENTRYSTATE_FORCE_TEXT 1054
#define | IDC_ENTRYSTATE_IGNORE 1055
#define | IDC_REV_TAG 1056
#define | IDC_ENTRYSTATE_NO_EXPANSION 1057
#define | IDC_DATE1 1059
#define | IDC_STATES 1061
#define | IDC_DATE2 1062
#define | IDC_REV_TAG2 1063
#define | IDC_HAS_USERS 1065
#define | IDC_NOTAGS 1066
#define | IDC_HEADERS 1068
#define | IDC_SUPRESS_HEADER 1069
#define | IDC_HAS_PATH 1070
#define | IDC_HEADERS_DESC 1071
#define | IDC_ADD_SELECTION 1073
#define | IDC_HOME 1074
#define | IDC_ADD_DEFAULT 1075
#define | IDC_ENTRYSTATE_FORCE_BINARY 1076
#define | IDC_DATE 1077
#define | IDC_ENTRYSTATE_FORCE_UNICODE 1078
#define | IDC_USERS 1081
#define | IDC_DEFAULT_BRANCH 1082
#define | IDC_COLOR_STATE 1083
#define | IDC_RCS_FILENAMES_ONLY 1084
#define | IDC_ISDATE1 1085
#define | IDC_ISDATE2 1086
#define | IDC_REV_TAG1 1087
#define | IDC_BROWSE_EXTERNAL_EDITOR 1088
#define | IDC_RELEASE_TAG 1089
#define | IDC_EXTERNAL_EDITOR 1090
#define | IDC_BAR_TREE 1091
#define | IDC_USE_EXTERNAL_DIFF 1092
#define | IDC_BROWSE_ALTERNATE_SETTINGS 1093
#define | IDC_ATTIC 1094
#define | IDC_HAS_EXTERNAL_DIFF 1095
#define | IDC_BROWSE_EXTERNAL_DIFF 1096
#define | IDC_EXTERNAL_DIFF 1097
#define | IDC_CHECK_UNMODIFIED 1098
#define | IDC_MULTILINE_POSITION 1099
#define | IDC_HAS_ALTERNATE_CVS 1100
#define | IDC_PYTHONDLL 1101
#define | IDC_ALTERNATE_CVS 1102
#define | IDC_BROWSE_PYTHONDLL 1103
#define | IDC_MULTILINE_PREV_ENTRY 1104
#define | IDC_BROWSE_FILENAME 1105
#define | IDC_TCLDLL 1106
#define | IDC_WINCVSVER 1107
#define | IDC_BROWSE_TCLDLL 1108
#define | IDC_AUTO_LOGOUT_TIME 1110
#define | IDC_FORCE_CVSROOT 1114
#define | IDC_EXPORT 1115
#define | IDC_HELP_INIT 1116
#define | IDC_PROGRESS 1118
#define | IDC_COMPRESSION 1119
#define | IDC_SPIN_COMPRESSION 1120
#define | IDC_WINCVSURL 1121
#define | IDC_ALLCMDS 1122
#define | IDC_CVSGUISFURL 1123
#define | IDC_ADD 1125
#define | IDC_REMOVE 1126
#define | IDC_UP 1127
#define | IDC_DELETE_ALL_FILES 1128
#define | IDC_DOWN 1129
#define | IDC_DELETE_CVS_INFO 1130
#define | IDC_MENULIST 1131
#define | IDC_MULTILINE_WORDWRAP 1133
#define | IDC_IGNOREWHITESPACE 1135
#define | IDC_IGNORECASE 1136
#define | IDC_UNIFIEDDIFF 1138
#define | IDC_CHECKOUT_DIR 1139
#define | IDC_OVERRIDE_CHECKOUT_DIR 1140
#define | IDC_DEFAULT_CVSIGNORE 1141
#define | IDC_FORCE_COMMIT 1142
#define | IDC_FILES_MODIFICATION_TIME 1143
#define | IDC_FORCE_RECURSE 1144
#define | IDC_CREATE_SANDBOX 1145
#define | IDC_FORCE_REVISION 1146
#define | IDC_NO_MODULE_PROGRAM 1147
#define | IDC_VENDOR_TAG 1148
#define | IDC_CHECK_VALID_EDITS 1149
#define | IDC_REPOSITORY_PATH 1150
#define | IDC_ALTERNATE_SETTINGS 1153
#define | IDC_COLOR_SELECTION 1154
#define | IDC_SKIP_UPDATE 1155
#define | IDC_SKIP_DIFF 1156
#define | IDC_SKIP_GRAPH 1157
#define | IDC_SKIP_LOG 1158
#define | IDC_FORCE_KEY_SHIFT 1159
#define | IDC_FORCE_KEY_CTRL 1160
#define | IDC_CONSOLE 1161
#define | IDC_ISDATE 1162
#define | IDC_SKIP_ANNOTATE 1163
#define | IDC_REV_TAG_DATE 1164
#define | IDC_SKIP_STATUS 1165
#define | IDC_DIFF 1166
#define | IDC_SKIP_FILEACTION 1167
#define | IDC_FILETODIFF 1168
#define | IDC_COLOR_MERGE 1169
#define | IDC_RESET_COLORS 1170
#define | IDC_COLOR_HEADER 1171
#define | IDC_COLOR_TAG 1172
#define | IDC_RGB_HEADER 1173
#define | IDC_RGB_TAG 1174
#define | IDC_RGB_BRANCH 1175
#define | IDC_RGB_NODE 1176
#define | IDC_RGB_DEAD 1177
#define | IDC_RGB_STATE 1178
#define | IDC_COLOR_BRANCH 1179
#define | IDC_COLOR_NODE 1180
#define | IDC_SELECTION 1181
#define | IDC_COLOR_SHADOW 1182
#define | IDC_COLOR_DEAD 1183
#define | IDC_RGB_SELECTION 1184
#define | IDC_RGB_SHADOW 1185
#define | IDC_RGB_MERGE 1186
#define | IDC_TEMPFILE 1187
#define | IDC_REMIND 1188
#define | IDC_PYTHON_URL 1189
#define | IDC_PREVIEWINFO 1190
#define | IDC_HAS_DATE1 1192
#define | IDC_HAS_DATE2 1193
#define | IDC_GRPBOX_TEXT 1194
#define | IDC_TAGDESC_TEXT 1195
#define | IDC_MODULEDESC_TEXT 1196
#define | IDC_OUTPUT_QUICK 1197
#define | IDC_OUTPUT_VERBOSE 1198
#define | IDC_BROWSE_TAG 1199
#define | IDC_OUTPUT_STANDARD 1200
#define | IDC_BROWSE_READ_FROM 1201
#define | IDC_BROWSE_TAG1 1202
#define | IDC_BROWSE_TAG2 1203
#define | IDC_BROWSE_MODNAME 1205
#define | IDC_ITEM_LIST 1206
#define | IDC_REFRESH_ITEMS 1207
#define | IDC_READ_FROM 1209
#define | IDC_ITEM 1210
#define | IDC_ITEM_LABEL 1211
#define | IDC_ITEM_LIST_OPTION 1212
#define | IDC_GROUP_OPTIONS 1215
#define | IDC_HELPLOGIN 1216
#define | IDC_COMPARE_TYPE 1217
#define | IDC_KEYWORD_OPT 1218
#define | IDC_KEYWORD_DESC 1219
#define | IDC_DIFFOPTIONS 1220
#define | IDC_BROWSE_DIFFOPTIONS 1221
#define | IDC_HAS_ALTERNATE_SETTINGS 1222
#define | IDC_BROWSE_SELECTION 1223
#define | IDC_DELETE_DIRECTORY 1224
#define | IDC_PROGRESS_TEXT 1225
#define | IDC_SELECTION_LIST 1226
#define | IDC_FILENAME 1227
#define | IDC_REVISION_SPIN 1228
#define | IDC_REVISION 1229
#define | IDC_AUTO_REFRESH 1230
#define | IDC_HAS_BRANCHID 1231
#define | IDC_BRANCHID 1232
#define | IDC_BROWSE_BRANCHID 1233
#define | IDC_MOVDEL_BRANCH 1234
#define | IDC_DONT_SHORTEN_PATHS 1235
#define | IDC_REACTION_SPEED 1236
#define | IDC_REACTION_SPEED_SPIN 1237
#define | IDC_FILTER_CONTENTS 1238
#define | IDC_FILTER 1239
#define | IDC_REACTION_SPEED_SECONDS 1240
#define | IDC_CTRL_PRESSED_ON_OK 1241
#define | IDC_MULTILINE_TYPE 1242
#define | IDC_NO_VENDOR_RELEASE_TAGS 1243
#define | IDC_MULTILINE_ENTRY_STATIC 1244
#define | IDC_MULTILINE_GO_ACTION 1245
#define | IDC_OTHER_BUTTON 1246
#define | IDC_MULTILINE_ACTION 1247
#define | IDC_TEMPLATE_LIST 1248
#define | IDC_TEMPLATE_PREVIEW 1249
#define | IDC_ICON_STATIC 1250
#define | IDC_MESSAGE_DETAILS 1251
#define | IDC_ALERT_MESSAGE 1252
#define | IDC_SHOW_CVS_METHOD 1253
#define | IDC_ACTION 1254
#define | IDC_ACTION_DESC 1255
#define | IDC_SAME_ACTION_NEXT_TIME 1256
#define | IDC_PROTOCOL_DESC 1257
#define | IDC_PROTOCOL 1258
#define | IDC_KEYWORDLIST 1259
#define | IDC_CLEAR_KEYWORD 1260
#define | IDC_KEYWORDLIST_DESC 1261
#define | IDC_EDIT_KEYWORD 1262
#define | IDC_PROTOCOL_KEYWORD 1263
#define | IDC_KEYWORD_DESCRIPTION 1264
#define | IDC_KEYWORD_VALUE 1265
#define | IDC_OVERWRITE_RELEASE_TAGS 1266
#define | IDC_IMPORT_FILTER 1267
#define | IDC_CURRENT_DIFF_OPTIONS 1268
#define | IDC_DIFF_OPTION_LIST 1269
#define | IDC_DIFF_OPTION_DESCRIPTION 1270
#define | IDC_STATICGROUP_SELECTOPTIONS 1271
#define | IDC_STATIC_CURRENTOPTIONS 1272
#define | IDC_STATIC_OPTDESC 1273
#define | IDC_APPLY 1274
#define | IDC_SETTINGS_NAME 1275
#define | IDC_COPY_SETTINGS 1276
#define | IDC_COPY_SETTINGS_NAME 1277
#define | IDC_PREVIEW_CVSROOT 1278
#define | IDC_RANGE_REV_TAG 1279
#define | IDC_RANGE_DATE 1280
#define | IDC_HAS_STATES 1281
#define | IDC_LAST_CHECKIN_TIME 1282
#define | IDC_CASE_SENSITIVE_NAMES 1283
#define | IDC_THREE_WAY_CONFLICTS 1284
#define | IDC_BRANCHPOINT_MERGE 1285
#define | IDC_MERGE_TYPE 1286
#define | ID_CANCEL_EDIT_CNTR 32768
#define | ID_APP_PREFERENCES 32775
#define | ID_APP_CMDLINE 32776
#define | ID_APP_LOGIN 32779
#define | ID_STOPCVS 32795
#define | ID_BROWSER_OPEN 32797
#define | ID_VIEW_BROWSER_BAR 32798
#define | ID_UPDATEBF 32799
#define | ID_COMMITBF 32800
#define | ID_ADDBF 32801
#define | ID_VIEW_SMALLICONS 32802
#define | ID_VIEW_FULLLIST 32803
#define | ID_VIEW_ROWDETAILS 32804
#define | ID_VIEW_FILES_BAR 32805
#define | ID_VIEW_UPDATE 32806
#define | ID_VIEW_COMMIT 32807
#define | ID_VIEW_ADD 32808
#define | ID_VIEW_WORKSPACE 32809
#define | ID_MENUBAR 32810
#define | ID_VIEW_ADDB 32811
#define | ID_VIEW_RMV 32812
#define | IDS_COMBOBROWSER 32813
#define | ID_VIEW_RELOAD 32814
#define | ID_VIEW_UPONE 32826
#define | ID_VIEW_TRASH 32830
#define | ID_VIEW_DIFF 32833
#define | ID_VIEW_LOG 32834
#define | ID_VIEW_STATUS 32835
#define | ID_VIEW_LOCKF 32836
#define | ID_VIEW_UNLOCKF 32837
#define | ID_VIEW_MULTI_BAR 32838
#define | ID_MENUITEM32840 32840
#define | ID_VIEW_WATCHON 32843
#define | ID_VIEW_WATCHOFF 32844
#define | ID_VIEW_EDIT 32845
#define | ID_VIEW_UNEDIT 32846
#define | ID_VIEW_RELEASE 32847
#define | ID_VIEW_WATCHERS 32857
#define | ID_VIEW_EDITORS 32858
#define | ID_CUST_FILES_MENU 32859
#define | ID_CUST_FOLDER_MENU 32860
#define | ID_APP_CREDITS 32872
#define | ID_APP_COPYRIGHTS 32873
#define | ID_GRAPH_CLOSE 32874
#define | ID_VIEW_GRAPH 32875
#define | ID_APP_RTAGCREATE 32881
#define | ID_APP_RTAGDELETE 32882
#define | ID_APP_RTAGBRANCH 32883
#define | ID_VIEW_TAG 32884
#define | ID_VIEW_TAGNEW 32886
#define | ID_VIEW_TAGDELETE 32887
#define | ID_VIEW_TAGBRANCH 32888
#define | ID_VIEW_TAGS_BAR 32889
#define | ID_VIEW_CONSOLE_BAR 32898
#define | ID_VIEW_EXPLORE 32899
#define | ID_HISTORYBROWSE 32900
#define | ID_VIEW_QUERYUPDATE 32901
#define | ID_VIEW_IGNORE 32902
#define | ID_APP_LOGOUT 32906
#define | ID_VIEW_EDITSEL 32908
#define | ID_VIEW_EDITSELDEF 32909
#define | ID_ACCEL32911 32911
#define | ID_VIEWW_INIT 32912
#define | ID_VIEW_IMPORT 32913
#define | ID_VIEW_INIT 32914
#define | ID_VIEW_CHECKOUT 32915
#define | ID_VIEW_DELREV 32916
#define | ID_VIEW_SELNONSIG 32917
#define | ID_BUTTON32918 32918
#define | ID_BUTTON32919 32919
#define | ID_BUTTON32920 32920
#define | ID_BUTTON32921 32921
#define | ID_SAVESETTINGS 32922
#define | ID_VIEW_RETRIEVE 32923
#define | ID_VIEW_RECURSIVE 32924
#define | ID_VIEW_FILTER_BAR 32925
#define | ID_VIEW_MODIFIED 32927
#define | ID_FILTERMASK 32928
#define | ID_VIEW_CONFLICT 32929
#define | ID_VIEW_UNKNOWN 32931
#define | ID_VIEW_MISSING 32932
#define | ID_VIEW_ADDED 32935
#define | ID_VIEW_REMOVED 32936
#define | ID_VIEW_CHANGED 32937
#define | ID_VIEW_HIDEUNKNOWN 32938
#define | ID_VIEW_CLEARALL 32939
#define | ID_BUTTON32940 32940
#define | ID_QUERY_ANNOTATE 32941
#define | ID_VIEW_BROWSELOCATION_REMOVEUNWANTED 32943
#define | ID_USE_TCLSHELL 32944
#define | ID_USE_PYSHELL 32945
#define | ID_GRAPH_GRAPHOPTIONS 32946
#define | ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE 32950
#define | ID_GRAPH_ADMINOPTIONS_SETSTATE 32951
#define | ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION 32952
#define | ID_VIEW_RESERVEDEDIT 32957
#define | ID_VIEW_FORCEEDIT 32958
#define | ID_VIEW_ADDU 32960
#define | ID_VIEW_HIDEMISSING 32975
#define | ID_VIEW_FILTERBAR_ENABLE 32976
#define | ID_VIEW_FILTERBAR_CLEARALL 32977
#define | ID_VIEW_FILTERBAR_OPTIONS 32978
#define | ID_VIEW_RETRIEVEAS 32982
#define | ID_VIEW_OPENSEL 32983
#define | ID_VIEW_OPENSELAS 32984
#define | ID_QUERY_SHELLACTION_DEFAULT 32986
#define | ID_HELP_CVS 32987
#define | ID_QUERY_PROPERTIES 32988
#define | ID_VIEW_NEWINSTANCE 32989
#define | ID_MACRO_START 34000
#define | ID_MACRO_SEL 34100
#define | ID_MACRO_ADMIN 34200
#define | ID_MACRO_END 34200

Define Documentation

#define CG_IDP_FILE_CORRUPT 110

Definition at line 16 of file resource.h.

Referenced by CTipDlg::CTipDlg(), and CTipDlg::GetNextTipString().

#define CG_IDS_DIDYOUKNOW 108

Definition at line 14 of file resource.h.

Referenced by CTipDlg::OnPaint().

#define CG_IDS_FILE_ABSENT 109

Definition at line 15 of file resource.h.

Referenced by CTipDlg::CTipDlg().

#define CG_IDS_TIPOFTHEDAY 106

Definition at line 12 of file resource.h.

#define CG_IDS_TIPOFTHEDAYHELP 111

Definition at line 17 of file resource.h.

#define CG_IDS_TIPOFTHEDAYMENU 107

Definition at line 13 of file resource.h.

#define ID_ACCEL32911 32911

Definition at line 405 of file resource.h.

#define ID_ADDBF 32801

Definition at line 353 of file resource.h.

#define ID_APP_CMDLINE 32776

Definition at line 346 of file resource.h.

#define ID_APP_COPYRIGHTS 32873

Definition at line 386 of file resource.h.

#define ID_APP_CREDITS 32872

Definition at line 385 of file resource.h.

#define ID_APP_LOGIN 32779

Definition at line 347 of file resource.h.

#define ID_APP_LOGOUT 32906

Definition at line 402 of file resource.h.

#define ID_APP_PREFERENCES 32775

Definition at line 345 of file resource.h.

#define ID_APP_RTAGBRANCH 32883

Definition at line 391 of file resource.h.

#define ID_APP_RTAGCREATE 32881

Definition at line 389 of file resource.h.

#define ID_APP_RTAGDELETE 32882

Definition at line 390 of file resource.h.

#define ID_BROWSER_OPEN 32797

Definition at line 349 of file resource.h.

#define ID_BUTTON32918 32918

Definition at line 412 of file resource.h.

#define ID_BUTTON32919 32919

Definition at line 413 of file resource.h.

#define ID_BUTTON32920 32920

Definition at line 414 of file resource.h.

#define ID_BUTTON32921 32921

Definition at line 415 of file resource.h.

#define ID_BUTTON32940 32940

Definition at line 430 of file resource.h.

#define ID_CANCEL_EDIT_CNTR 32768

Definition at line 344 of file resource.h.

#define ID_COMMITBF 32800

Definition at line 352 of file resource.h.

#define ID_CUST_FILES_MENU 32859

Definition at line 383 of file resource.h.

Referenced by GetCustomMenu(), CWinCvsBrowser::OnCustomize(), and CBrowseFileView::OnCustomize().

#define ID_CUST_FOLDER_MENU 32860

Definition at line 384 of file resource.h.

Referenced by GetCustomMenu().

#define ID_FILTERMASK 32928

Definition at line 421 of file resource.h.

#define ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE 32950

Definition at line 436 of file resource.h.

#define ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION 32952

Definition at line 438 of file resource.h.

#define ID_GRAPH_ADMINOPTIONS_SETSTATE 32951

Definition at line 437 of file resource.h.

#define ID_GRAPH_CLOSE 32874

Definition at line 387 of file resource.h.

#define ID_GRAPH_GRAPHOPTIONS 32946

Definition at line 435 of file resource.h.

#define ID_HELP_CVS 32987

Definition at line 450 of file resource.h.

#define ID_HISTORYBROWSE 32900

Definition at line 399 of file resource.h.

Referenced by CMainFrame::CreateLocationCombo().

#define ID_MACRO_ADMIN 34200

Definition at line 455 of file resource.h.

Referenced by cvsgui_GetTopMacroAdminMenu(), CCustomizeMenus::GetIcon(), CCustInvertTable::Initialize(), and CWincvsDoc::OnMacroAdmin().

#define ID_MACRO_END 34200

Definition at line 456 of file resource.h.

#define ID_MACRO_SEL 34100

Definition at line 454 of file resource.h.

Referenced by cvsgui_GetTopMacroSelectionMenu(), CCustomizeMenus::GetIcon(), and CCustInvertTable::Initialize().

#define ID_MACRO_START 34000

Definition at line 453 of file resource.h.

#define ID_MENUBAR 32810

Definition at line 362 of file resource.h.

#define ID_MENUITEM32840 32840

Definition at line 375 of file resource.h.

#define ID_QUERY_ANNOTATE 32941

Definition at line 431 of file resource.h.

#define ID_QUERY_PROPERTIES 32988

Definition at line 451 of file resource.h.

#define ID_QUERY_SHELLACTION_DEFAULT 32986

Definition at line 449 of file resource.h.

#define ID_SAVESETTINGS 32922

Definition at line 416 of file resource.h.

#define ID_STOPCVS 32795

Definition at line 348 of file resource.h.

#define ID_UPDATEBF 32799

Definition at line 351 of file resource.h.

#define ID_USE_PYSHELL 32945

Definition at line 434 of file resource.h.

#define ID_USE_TCLSHELL 32944

Definition at line 433 of file resource.h.

#define ID_VIEW_ADD 32808

Definition at line 360 of file resource.h.

#define ID_VIEW_ADDB 32811

Definition at line 363 of file resource.h.

#define ID_VIEW_ADDED 32935

Definition at line 425 of file resource.h.

#define ID_VIEW_ADDU 32960

Definition at line 441 of file resource.h.

#define ID_VIEW_BROWSELOCATION_REMOVEUNWANTED 32943

Definition at line 432 of file resource.h.

#define ID_VIEW_BROWSER_BAR 32798

Definition at line 350 of file resource.h.

Referenced by CMainFrame::OnCreate().

#define ID_VIEW_CHANGED 32937

Definition at line 427 of file resource.h.

#define ID_VIEW_CHECKOUT 32915

Definition at line 409 of file resource.h.

#define ID_VIEW_CLEARALL 32939

Definition at line 429 of file resource.h.

#define ID_VIEW_COMMIT 32807

Definition at line 359 of file resource.h.

#define ID_VIEW_CONFLICT 32929

Definition at line 422 of file resource.h.

#define ID_VIEW_CONSOLE_BAR 32898

Definition at line 397 of file resource.h.

Referenced by CMainFrame::InitializeDockingWindows().

#define ID_VIEW_DELREV 32916

Definition at line 410 of file resource.h.

#define ID_VIEW_DIFF 32833

Definition at line 369 of file resource.h.

#define ID_VIEW_EDIT 32845

Definition at line 378 of file resource.h.

#define ID_VIEW_EDITORS 32858

Definition at line 382 of file resource.h.

#define ID_VIEW_EDITSEL 32908

Definition at line 403 of file resource.h.

#define ID_VIEW_EDITSELDEF 32909

Definition at line 404 of file resource.h.

#define ID_VIEW_EXPLORE 32899

Definition at line 398 of file resource.h.

#define ID_VIEW_FILES_BAR 32805

Definition at line 357 of file resource.h.

Referenced by CMainFrame::OnCreate().

#define ID_VIEW_FILTER_BAR 32925

Definition at line 419 of file resource.h.

Referenced by CMainFrame::OnCreate().

#define ID_VIEW_FILTERBAR_CLEARALL 32977

Definition at line 444 of file resource.h.

#define ID_VIEW_FILTERBAR_ENABLE 32976

Definition at line 443 of file resource.h.

#define ID_VIEW_FILTERBAR_OPTIONS 32978

Definition at line 445 of file resource.h.

#define ID_VIEW_FORCEEDIT 32958

Definition at line 440 of file resource.h.

#define ID_VIEW_FULLLIST 32803

Definition at line 355 of file resource.h.

#define ID_VIEW_GRAPH 32875

Definition at line 388 of file resource.h.

#define ID_VIEW_HIDEMISSING 32975

Definition at line 442 of file resource.h.

#define ID_VIEW_HIDEUNKNOWN 32938

Definition at line 428 of file resource.h.

#define ID_VIEW_IGNORE 32902

Definition at line 401 of file resource.h.

#define ID_VIEW_IMPORT 32913

Definition at line 407 of file resource.h.

#define ID_VIEW_INIT 32914

Definition at line 408 of file resource.h.

#define ID_VIEW_LOCKF 32836

Definition at line 372 of file resource.h.

#define ID_VIEW_LOG 32834

Definition at line 370 of file resource.h.

#define ID_VIEW_MISSING 32932

Definition at line 424 of file resource.h.

#define ID_VIEW_MODIFIED 32927

Definition at line 420 of file resource.h.

#define ID_VIEW_MULTI_BAR 32838

Definition at line 374 of file resource.h.

Referenced by CMainFrame::OnCreate().

#define ID_VIEW_NEWINSTANCE 32989

Definition at line 452 of file resource.h.

#define ID_VIEW_OPENSEL 32983

Definition at line 447 of file resource.h.

#define ID_VIEW_OPENSELAS 32984

Definition at line 448 of file resource.h.

#define ID_VIEW_QUERYUPDATE 32901

Definition at line 400 of file resource.h.

#define ID_VIEW_RECURSIVE 32924

Definition at line 418 of file resource.h.

#define ID_VIEW_RELEASE 32847

Definition at line 380 of file resource.h.

#define ID_VIEW_RELOAD 32814

Definition at line 366 of file resource.h.

Referenced by CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), and CGraphView::OnViewUpdate().

#define ID_VIEW_REMOVED 32936

Definition at line 426 of file resource.h.

#define ID_VIEW_RESERVEDEDIT 32957

Definition at line 439 of file resource.h.

#define ID_VIEW_RETRIEVE 32923

Definition at line 417 of file resource.h.

#define ID_VIEW_RETRIEVEAS 32982

Definition at line 446 of file resource.h.

#define ID_VIEW_RMV 32812

Definition at line 364 of file resource.h.

#define ID_VIEW_ROWDETAILS 32804

Definition at line 356 of file resource.h.

#define ID_VIEW_SELNONSIG 32917

Definition at line 411 of file resource.h.

#define ID_VIEW_SMALLICONS 32802

Definition at line 354 of file resource.h.

#define ID_VIEW_STATUS 32835

Definition at line 371 of file resource.h.

#define ID_VIEW_TAG 32884

Definition at line 392 of file resource.h.

#define ID_VIEW_TAGBRANCH 32888

Definition at line 395 of file resource.h.

#define ID_VIEW_TAGDELETE 32887

Definition at line 394 of file resource.h.

#define ID_VIEW_TAGNEW 32886

Definition at line 393 of file resource.h.

#define ID_VIEW_TAGS_BAR 32889

Definition at line 396 of file resource.h.

Referenced by CMainFrame::OnCreate().

#define ID_VIEW_TRASH 32830

Definition at line 368 of file resource.h.

#define ID_VIEW_UNEDIT 32846

Definition at line 379 of file resource.h.

#define ID_VIEW_UNKNOWN 32931

Definition at line 423 of file resource.h.

#define ID_VIEW_UNLOCKF 32837

Definition at line 373 of file resource.h.

#define ID_VIEW_UPDATE 32806

Definition at line 358 of file resource.h.

#define ID_VIEW_UPONE 32826

Definition at line 367 of file resource.h.

#define ID_VIEW_WATCHERS 32857

Definition at line 381 of file resource.h.

#define ID_VIEW_WATCHOFF 32844

Definition at line 377 of file resource.h.

#define ID_VIEW_WATCHON 32843

Definition at line 376 of file resource.h.

#define ID_VIEW_WORKSPACE 32809

Definition at line 361 of file resource.h.

Referenced by CMainFrame::InitializeDockingWindows().

#define ID_VIEWW_INIT 32912

Definition at line 406 of file resource.h.

#define IDB_ABOUT 180

Definition at line 53 of file resource.h.

#define IDB_HISTLOC 187

Definition at line 61 of file resource.h.

Referenced by CHistComboBoxEx::SetIcon().

#define IDB_IDLE 185

Definition at line 58 of file resource.h.

Referenced by CCvsStatusBar::CCvsStatusBar().

#define IDB_IMPORT 209

Definition at line 79 of file resource.h.

Referenced by CImportFilterDlg::OnInitDialog().

#define IDB_LIGHTBULB 103

Definition at line 9 of file resource.h.

Referenced by CTipDlg::OnPaint().

#define IDB_LOCATE 176

Definition at line 51 of file resource.h.

#define IDB_MODULES 208

Definition at line 77 of file resource.h.

Referenced by CWinCvsBrowser::Create().

#define IDB_PYTHON 183

Definition at line 56 of file resource.h.

#define IDB_SMALLICONS 152

Definition at line 39 of file resource.h.

Referenced by CGraphView::CGraphView(), and CBrowseFileView::OnInitialUpdate().

#define IDB_SPLASH 112

Definition at line 18 of file resource.h.

Referenced by CSplashWnd::Create().

#define IDC_ACTION 1254

Definition at line 311 of file resource.h.

Referenced by CFileAction_MAIN::DoDataExchange(), and CFileAction_MAIN::InitHelpID().

#define IDC_ACTION_DESC 1255

Definition at line 312 of file resource.h.

Referenced by CFileAction_MAIN::DoDataExchange(), and CFileAction_MAIN::InitHelpID().

#define IDC_ADD 1125

Definition at line 192 of file resource.h.

Referenced by CCustomizeMenus::DoDataExchange(), and CCustomizeMenus::InitHelpID().

#define IDC_ADD_DEFAULT 1075

Definition at line 150 of file resource.h.

Referenced by CCmdLine_MAIN::DoDataExchange(), and CCmdLine_MAIN::InitHelpID().

#define IDC_ADD_SELECTION 1073

Definition at line 148 of file resource.h.

Referenced by CCmdLine_MAIN::DoDataExchange(), and CCmdLine_MAIN::InitHelpID().

#define IDC_ALERT_MESSAGE 1252

Definition at line 309 of file resource.h.

Referenced by CCVSAlert_MAIN::DoDataExchange().

#define IDC_ALLCMDS 1122

Definition at line 190 of file resource.h.

Referenced by CCustomizeMenus::DoDataExchange(), and CCustomizeMenus::InitHelpID().

#define IDC_ALTERNATE_CVS 1102

Definition at line 175 of file resource.h.

Referenced by CGetPrefs_CVS::DoDataExchange(), and CGetPrefs_CVS::InitHelpID().

#define IDC_ALTERNATE_SETTINGS 1153

Definition at line 215 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_ALWAYSROOT 1017

Definition at line 107 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange().

#define IDC_APPLY 1274

Definition at line 331 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_ATTIC 1094

Definition at line 167 of file resource.h.

Referenced by CRtag_MAIN::DoDataExchange(), and CRtag_MAIN::InitHelpID().

#define IDC_AUTO_LOGOUT 1019

Definition at line 109 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_AUTO_LOGOUT_TIME 1110

Definition at line 182 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_AUTO_REFRESH 1230

Definition at line 287 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), and CItemListDlg::InitHelpID().

#define IDC_BAR_TREE 1091

Definition at line 164 of file resource.h.

Referenced by CExploreBar::Create().

#define IDC_BRANCHID 1232

Definition at line 289 of file resource.h.

Referenced by CImport_OPTIONS::DoDataExchange(), and CImport_OPTIONS::InitHelpID().

#define IDC_BRANCHPOINT_MERGE 1285

Definition at line 342 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), and CUpdateMerge::InitHelpID().

#define IDC_BROWSE_ALTERNATE_SETTINGS 1093

Definition at line 166 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_BROWSE_BRANCHID 1233

Definition at line 290 of file resource.h.

Referenced by CImport_OPTIONS::DoDataExchange(), and CImport_OPTIONS::InitHelpID().

#define IDC_BROWSE_CVSROOT 1024

Definition at line 112 of file resource.h.

Referenced by CRtag_MAIN::DoDataExchange(), CLogin_MAIN::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CItemListDlg::DoDataExchange(), CInit_MAIN::DoDataExchange(), CImport_MAIN::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CRtag_MAIN::InitHelpID(), CLogin_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CItemListDlg::InitHelpID(), CInit_MAIN::InitHelpID(), CImport_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDC_BROWSE_DIFFOPTIONS 1221

Definition at line 278 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_BROWSE_EXTERNAL_DIFF 1096

Definition at line 169 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_BROWSE_EXTERNAL_EDITOR 1088

Definition at line 161 of file resource.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDC_BROWSE_FILENAME 1105

Definition at line 178 of file resource.h.

Referenced by CGetPrefs_CVS::DoDataExchange(), and CGetPrefs_CVS::InitHelpID().

#define IDC_BROWSE_MODNAME 1205

Definition at line 265 of file resource.h.

Referenced by CRtag_MAIN::InitHelpID(), CImport_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDC_BROWSE_PATH 1029

Definition at line 116 of file resource.h.

Referenced by CCmdLine_MAIN::DoDataExchange(), CCmdLine_MAIN::InitHelpID(), CImport_OPTIONS::InitHelpID(), CGetPrefs_CVS::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDC_BROWSE_PYTHONDLL 1103

Definition at line 176 of file resource.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDC_BROWSE_READ_FROM 1201

Definition at line 262 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), and CItemListDlg::InitHelpID().

#define IDC_BROWSE_SELECTION 1223

Definition at line 280 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), and CItemListDlg::InitHelpID().

#define IDC_BROWSE_TAG 1199

Definition at line 260 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CLogFilters::DoDataExchange(), CItemListDlg::DoDataExchange(), CAnnotate_MAIN::DoDataExchange(), CUpdateOptions::InitHelpID(), CTag_MAIN::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CRtag_MAIN::InitHelpID(), CLogFilters::InitHelpID(), CItemListDlg::InitHelpID(), CCommit_OPTIONS::InitHelpID(), CAnnotate_MAIN::InitHelpID(), and CCommit_OPTIONS::OnForcerevision().

#define IDC_BROWSE_TAG1 1202

Definition at line 263 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), CImport_MAIN::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CUpdateMerge::InitHelpID(), CImport_MAIN::InitHelpID(), and CDiff_MAIN::InitHelpID().

#define IDC_BROWSE_TAG2 1203

Definition at line 264 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), CImport_MAIN::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CUpdateMerge::InitHelpID(), CImport_MAIN::InitHelpID(), and CDiff_MAIN::InitHelpID().

#define IDC_BROWSE_TCLDLL 1108

Definition at line 181 of file resource.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDC_BULB 1001

Definition at line 93 of file resource.h.

Referenced by CTipDlg::OnPaint().

#define IDC_CASE_SENSITIVE_NAMES 1283

Definition at line 340 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), and CUpdateOptions::InitHelpID().

#define IDC_CHECK_UNMODIFIED 1098

Definition at line 171 of file resource.h.

Referenced by CTag_MAIN::DoDataExchange(), and CTag_MAIN::InitHelpID().

#define IDC_CHECK_VALID_EDITS 1149

Definition at line 213 of file resource.h.

Referenced by CCommit_OPTIONS::DoDataExchange(), and CCommit_OPTIONS::InitHelpID().

#define IDC_CHECKOUT_DIR 1139

Definition at line 203 of file resource.h.

Referenced by CCheckout_MAIN::DoDataExchange(), and CCheckout_MAIN::InitHelpID().

#define IDC_CHECKOUT_READ_ONLY 1002

Definition at line 94 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_CLEAR_KEYWORD 1260

Definition at line 317 of file resource.h.

Referenced by CCvsRootDlg::DoDataExchange(), and CCvsRootDlg::InitHelpID().

#define IDC_COLOR_BRANCH 1179

Definition at line 241 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COLOR_DEAD 1183

Definition at line 245 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COLOR_HEADER 1171

Definition at line 233 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COLOR_MERGE 1169

Definition at line 231 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COLOR_NODE 1180

Definition at line 242 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COLOR_SELECTION 1154

Definition at line 216 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COLOR_SHADOW 1182

Definition at line 244 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COLOR_STATE 1083

Definition at line 156 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COLOR_TAG 1172

Definition at line 234 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_COMPARE_TYPE 1217

Definition at line 274 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_COMPRESSION 1119

Definition at line 187 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_CONFLICT_DESC 1049

Definition at line 129 of file resource.h.

Referenced by CImportEntry::DoDataExchange(), and CImportEntry::InitHelpID().

#define IDC_CONSOLE 1161

Definition at line 223 of file resource.h.

Referenced by CGetPrefs_CVS::DoDataExchange(), and CGetPrefs_CVS::InitHelpID().

#define IDC_CONTROL_ADDED_FILES 1013

Definition at line 104 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_COPY_SETTINGS 1276

Definition at line 333 of file resource.h.

Referenced by CSaveSettingsDlg::DoDataExchange(), and CSaveSettingsDlg::InitHelpID().

#define IDC_COPY_SETTINGS_NAME 1277

Definition at line 334 of file resource.h.

Referenced by CSaveSettingsDlg::DoDataExchange(), and CSaveSettingsDlg::InitHelpID().

#define IDC_CREATE_MISSING_DIR 1039

Definition at line 126 of file resource.h.

Referenced by CUpdateMain::DoDataExchange(), and CUpdateMain::InitHelpID().

#define IDC_CREATE_SANDBOX 1145

Definition at line 209 of file resource.h.

Referenced by CImport_OPTIONS::DoDataExchange(), and CImport_OPTIONS::InitHelpID().

#define IDC_CTRL_PRESSED_ON_OK 1241

Definition at line 298 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_CURRENT_DIFF_OPTIONS 1268

Definition at line 325 of file resource.h.

Referenced by CDiff_Options::DoDataExchange(), and CDiff_Options::InitHelpID().

#define IDC_CVSGUISFURL 1123

Definition at line 191 of file resource.h.

Referenced by CAboutDlg::DoDataExchange(), and CAboutDlg::InitHelpID().

#define IDC_CVSROOT 1000

Definition at line 92 of file resource.h.

Referenced by CRtag_MAIN::DoDataExchange(), CLogin_MAIN::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CItemListDlg::DoDataExchange(), CInit_MAIN::DoDataExchange(), CImport_MAIN::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CRtag_MAIN::InitHelpID(), CLogin_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CItemListDlg::InitHelpID(), CInit_MAIN::InitHelpID(), CImport_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDC_DATE 1077

Definition at line 152 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CItemListDlg::DoDataExchange(), CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), and CItemListDlg::InitHelpID().

#define IDC_DATE1 1059

Definition at line 138 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), and CUpdateMerge::InitHelpID().

#define IDC_DATE2 1062

Definition at line 140 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), and CUpdateMerge::InitHelpID().

#define IDC_DEFAULT_BRANCH 1082

Definition at line 155 of file resource.h.

Referenced by CLogMain::DoDataExchange(), and CLogMain::InitHelpID().

#define IDC_DEFAULT_CVSIGNORE 1141

Definition at line 205 of file resource.h.

Referenced by CImport_OPTIONS::DoDataExchange(), and CImport_OPTIONS::InitHelpID().

#define IDC_DELETE_ALL_FILES 1128

Definition at line 195 of file resource.h.

Referenced by CRelease_MAIN::DoDataExchange(), and CRelease_MAIN::InitHelpID().

#define IDC_DELETE_CVS_INFO 1130

Definition at line 197 of file resource.h.

Referenced by CRelease_MAIN::DoDataExchange(), and CRelease_MAIN::InitHelpID().

#define IDC_DELETE_DIRECTORY 1224

Definition at line 281 of file resource.h.

Referenced by CRelease_MAIN::DoDataExchange(), and CRelease_MAIN::InitHelpID().

#define IDC_DIFF 1166

Definition at line 228 of file resource.h.

Referenced by CCommit_MAIN::InitHelpID(), and CCommit_MAIN::OnInitDialog().

#define IDC_DIFF_OPTION_DESCRIPTION 1270

Definition at line 327 of file resource.h.

Referenced by CDiff_Options::InitHelpID(), and CDiff_Options::OnItemchangedOptionslist().

#define IDC_DIFF_OPTION_LIST 1269

Definition at line 326 of file resource.h.

Referenced by CDiff_Options::DoDataExchange(), and CDiff_Options::InitHelpID().

#define IDC_DIFFOPTIONS 1220

Definition at line 277 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_DONT_SHORTEN_PATHS 1235

Definition at line 292 of file resource.h.

Referenced by CCheckout_MAIN::DoDataExchange(), and CCheckout_MAIN::InitHelpID().

#define IDC_DOWN 1129

Definition at line 196 of file resource.h.

Referenced by CCustomizeMenus::DoDataExchange(), and CCustomizeMenus::InitHelpID().

#define IDC_EDIT_KEYWORD 1262

Definition at line 319 of file resource.h.

Referenced by CCvsRootDlg::DoDataExchange(), and CCvsRootDlg::InitHelpID().

#define IDC_ENCRYPTION 1008

Definition at line 100 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_ENTRIES_LIST 1048

Definition at line 128 of file resource.h.

Referenced by CImportFilterDlg::DoDataExchange(), and CImportFilterDlg::InitHelpID().

#define IDC_ENTRY 1034

Definition at line 121 of file resource.h.

#define IDC_ENTRY_EDIT 1050

Definition at line 130 of file resource.h.

Referenced by CImportFilterDlg::DoDataExchange(), and CImportFilterDlg::InitHelpID().

#define IDC_ENTRYSTATE_FORCE_BINARY 1076

Definition at line 151 of file resource.h.

Referenced by CImportEntry::InitHelpID().

#define IDC_ENTRYSTATE_FORCE_TEXT 1054

Definition at line 134 of file resource.h.

Referenced by CImportEntry::InitHelpID().

#define IDC_ENTRYSTATE_FORCE_UNICODE 1078

Definition at line 153 of file resource.h.

Referenced by CImportEntry::InitHelpID().

#define IDC_ENTRYSTATE_IGNORE 1055

Definition at line 135 of file resource.h.

Referenced by CImportEntry::InitHelpID().

#define IDC_ENTRYSTATE_NO_CHANGE 1052

Definition at line 132 of file resource.h.

Referenced by CImportEntry::DoDataExchange(), and CImportEntry::InitHelpID().

#define IDC_ENTRYSTATE_NO_EXPANSION 1057

Definition at line 137 of file resource.h.

Referenced by CImportEntry::InitHelpID().

#define IDC_EXPORT 1115

Definition at line 184 of file resource.h.

Referenced by CCheckout_MAIN::DoDataExchange(), and CCheckout_MAIN::InitHelpID().

#define IDC_EXTERNAL_DIFF 1097

Definition at line 170 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_EXTERNAL_EDITOR 1090

Definition at line 163 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_FILENAME 1227

Definition at line 284 of file resource.h.

Referenced by CSelectionDetailsDlg::DoDataExchange(), and CSelectionDetailsDlg::InitHelpID().

#define IDC_FILEPATH 1014

Definition at line 105 of file resource.h.

Referenced by CSelectionDetailsDlg::DoDataExchange(), and CSelectionDetailsDlg::InitHelpID().

#define IDC_FILES_MODIFICATION_TIME 1143

Definition at line 207 of file resource.h.

Referenced by CImport_OPTIONS::DoDataExchange(), and CImport_OPTIONS::InitHelpID().

#define IDC_FILETODIFF 1168

Definition at line 230 of file resource.h.

Referenced by CCommit_MAIN::DoDataExchange(), and CCommit_MAIN::InitHelpID().

#define IDC_FILTER 1239

Definition at line 296 of file resource.h.

Referenced by CFilterSelectionDlg::DoDataExchange(), and CFilterSelectionDlg::InitHelpID().

#define IDC_FILTER_CONTENTS 1238

Definition at line 295 of file resource.h.

Referenced by CFilterSelectionDlg::DoDataExchange(), and CFilterSelectionDlg::InitHelpID().

#define IDC_FORCE_COMMIT 1142

Definition at line 206 of file resource.h.

Referenced by CCommit_OPTIONS::DoDataExchange(), and CCommit_OPTIONS::InitHelpID().

#define IDC_FORCE_CVSROOT 1114

Definition at line 183 of file resource.h.

Referenced by CRtag_MAIN::DoDataExchange(), CLogin_MAIN::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CItemListDlg::DoDataExchange(), CInit_MAIN::DoDataExchange(), CImport_MAIN::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CRtag_MAIN::InitHelpID(), CLogin_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CItemListDlg::InitHelpID(), CInit_MAIN::InitHelpID(), CImport_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDC_FORCE_HEAD_REV 1033

Definition at line 120 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CAnnotate_MAIN::DoDataExchange(), CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDC_FORCE_KEY_CTRL 1160

Definition at line 222 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_FORCE_KEY_SHIFT 1159

Definition at line 221 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_FORCE_RECURSE 1144

Definition at line 208 of file resource.h.

Referenced by CCommit_OPTIONS::DoDataExchange(), and CCommit_OPTIONS::InitHelpID().

#define IDC_FORCE_REVISION 1146

Definition at line 210 of file resource.h.

Referenced by CCommit_OPTIONS::DoDataExchange(), CCommit_OPTIONS::InitHelpID(), and CCommit_OPTIONS::OnForcerevision().

#define IDC_GET_CLEAN_COPY 1040

Definition at line 127 of file resource.h.

Referenced by CUpdateMain::DoDataExchange(), and CUpdateMain::InitHelpID().

#define IDC_GROUP_OPTIONS 1215

Definition at line 272 of file resource.h.

Referenced by CItemListDlg::InitHelpID().

#define IDC_GRPBOX_TEXT 1194

Definition at line 255 of file resource.h.

Referenced by CTag_MAIN::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), and CRtag_MAIN::DoDataExchange().

#define IDC_HAS_ALTERNATE_CVS 1100

Definition at line 173 of file resource.h.

Referenced by CGetPrefs_CVS::DoDataExchange(), and CGetPrefs_CVS::InitHelpID().

#define IDC_HAS_ALTERNATE_SETTINGS 1222

Definition at line 279 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_HAS_BRANCHID 1231

Definition at line 288 of file resource.h.

Referenced by CImport_OPTIONS::DoDataExchange(), and CImport_OPTIONS::InitHelpID().

#define IDC_HAS_COMPRESSION 1004

Definition at line 96 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_HAS_DATE 1053

Definition at line 133 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CLogFilters::DoDataExchange(), CItemListDlg::DoDataExchange(), CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CLogFilters::InitHelpID(), and CItemListDlg::InitHelpID().

#define IDC_HAS_DATE1 1192

Definition at line 253 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), and CUpdateMerge::InitHelpID().

#define IDC_HAS_DATE2 1193

Definition at line 254 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), and CUpdateMerge::InitHelpID().

#define IDC_HAS_EXTERNAL_DIFF 1095

Definition at line 168 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_HAS_PATH 1070

Definition at line 146 of file resource.h.

Referenced by CCmdLine_MAIN::DoDataExchange(), and CCmdLine_MAIN::InitHelpID().

#define IDC_HAS_REV 1036

Definition at line 123 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CLogFilters::DoDataExchange(), CItemListDlg::DoDataExchange(), CAnnotate_MAIN::DoDataExchange(), CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CLogFilters::InitHelpID(), CItemListDlg::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDC_HAS_STATES 1281

Definition at line 338 of file resource.h.

Referenced by CLogFilters::DoDataExchange(), and CLogFilters::InitHelpID().

#define IDC_HAS_USERS 1065

Definition at line 142 of file resource.h.

Referenced by CLogFilters::DoDataExchange(), and CLogFilters::InitHelpID().

#define IDC_HEADERS 1068

Definition at line 144 of file resource.h.

Referenced by CLogMain::DoDataExchange(), and CLogMain::InitHelpID().

#define IDC_HEADERS_DESC 1071

Definition at line 147 of file resource.h.

Referenced by CLogMain::DoDataExchange(), and CLogMain::InitHelpID().

#define IDC_HELP_INIT 1116

Definition at line 185 of file resource.h.

Referenced by CInit_MAIN::DoDataExchange(), and CInit_MAIN::InitHelpID().

#define IDC_HELPLOGIN 1216

Definition at line 273 of file resource.h.

Referenced by CLogin_MAIN::DoDataExchange(), and CLogin_MAIN::InitHelpID().

#define IDC_HOME 1074

Definition at line 149 of file resource.h.

Referenced by CGetPrefs_CVS::DoDataExchange(), and CGetPrefs_CVS::InitHelpID().

#define IDC_ICON_STATIC 1250

Definition at line 307 of file resource.h.

Referenced by CCVSAlert_MAIN::DoDataExchange().

#define IDC_IGNORECASE 1136

Definition at line 201 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_IGNOREWHITESPACE 1135

Definition at line 200 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_IMPORT_FILTER 1267

Definition at line 324 of file resource.h.

Referenced by CImport_OPTIONS::InitHelpID().

#define IDC_ISDATE 1162

Definition at line 224 of file resource.h.

Referenced by CAnnotate_MAIN::DoDataExchange(), and CAnnotate_MAIN::InitHelpID().

#define IDC_ISDATE1 1085

Definition at line 158 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_ISDATE2 1086

Definition at line 159 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_ITEM 1210

Definition at line 269 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), and CItemListDlg::InitHelpID().

#define IDC_ITEM_LABEL 1211

Definition at line 270 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), and CItemListDlg::InitHelpID().

#define IDC_ITEM_LIST 1206

Definition at line 266 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), and CItemListDlg::InitHelpID().

#define IDC_ITEM_LIST_OPTION 1212

Definition at line 271 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), and CItemListDlg::InitHelpID().

#define IDC_KEYWORD_DESC 1219

Definition at line 276 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CUpdateOptions::InitHelpID(), and CDiff_MAIN::InitHelpID().

#define IDC_KEYWORD_DESCRIPTION 1264

Definition at line 321 of file resource.h.

Referenced by CEditKeywordDlg::DoDataExchange(), and CEditKeywordDlg::InitHelpID().

#define IDC_KEYWORD_OPT 1218

Definition at line 275 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CUpdateOptions::InitHelpID(), and CDiff_MAIN::InitHelpID().

#define IDC_KEYWORD_VALUE 1265

Definition at line 322 of file resource.h.

Referenced by CEditKeywordDlg::DoDataExchange(), and CEditKeywordDlg::InitHelpID().

#define IDC_KEYWORDLIST 1259

Definition at line 316 of file resource.h.

Referenced by CCvsRootDlg::DoDataExchange(), and CCvsRootDlg::InitHelpID().

#define IDC_KEYWORDLIST_DESC 1261

Definition at line 318 of file resource.h.

Referenced by CCvsRootDlg::DoDataExchange(), and CCvsRootDlg::InitHelpID().

#define IDC_LAST_CHECKIN_TIME 1282

Definition at line 339 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), and CUpdateOptions::InitHelpID().

#define IDC_MATCH_ENTRIES_CASE 1021

Definition at line 111 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_MENULIST 1131

Definition at line 198 of file resource.h.

Referenced by CCustomizeMenus::DoDataExchange(), and CCustomizeMenus::InitHelpID().

#define IDC_MERGE_TYPE 1286

Definition at line 343 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), and CUpdateMerge::InitHelpID().

#define IDC_MESSAGE_DETAILS 1251

Definition at line 308 of file resource.h.

Referenced by CCVSAlert_MAIN::DoDataExchange().

#define IDC_MODNAME 1028

Definition at line 115 of file resource.h.

Referenced by CRtag_MAIN::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CRtag_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDC_MODULEDESC_TEXT 1196

Definition at line 257 of file resource.h.

Referenced by CRtag_MAIN::DoDataExchange().

#define IDC_MOVDEL_BRANCH 1234

Definition at line 291 of file resource.h.

Referenced by CTag_MAIN::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CTag_MAIN::InitHelpID(), and CRtag_MAIN::InitHelpID().

#define IDC_MULTILINE_ACTION 1247

Definition at line 304 of file resource.h.

Referenced by CMultilineEntryDlg::DoDataExchange(), and CMultilineEntryDlg::InitHelpID().

#define IDC_MULTILINE_ENTRY 1025

Definition at line 113 of file resource.h.

Referenced by CMultilineEntryDlg::DoDataExchange(), CMultilineEntryDlg::GetEntryTextID(), and CMultilineEntryDlg::InitHelpID().

#define IDC_MULTILINE_ENTRY_STATIC 1244

Definition at line 301 of file resource.h.

Referenced by CCmdLine_MAIN::DoDataExchange(), CImport_MAIN::DoDataExchange(), CCommit_MAIN::DoDataExchange(), and CAdminOption_MAIN::DoDataExchange().

#define IDC_MULTILINE_ENTRY_WRAP 1037

Definition at line 124 of file resource.h.

Referenced by CMultilineEntryDlg::DoDataExchange(), CMultilineEntryDlg::GetEntryTextID(), and CMultilineEntryDlg::InitHelpID().

#define IDC_MULTILINE_GO_ACTION 1245

Definition at line 302 of file resource.h.

Referenced by CMultilineEntryDlg::InitHelpID().

#define IDC_MULTILINE_POSITION 1099

Definition at line 172 of file resource.h.

Referenced by CMultilineEntryDlg::DoDataExchange(), and CMultilineEntryDlg::InitHelpID().

#define IDC_MULTILINE_PREV_ENTRY 1104

Definition at line 177 of file resource.h.

Referenced by CMultilineEntryDlg::DoDataExchange(), and CMultilineEntryDlg::InitHelpID().

#define IDC_MULTILINE_TYPE 1242

Definition at line 299 of file resource.h.

Referenced by CMultilineEntryDlg::DoDataExchange(), and CMultilineEntryDlg::InitHelpID().

#define IDC_MULTILINE_WORDWRAP 1133

Definition at line 199 of file resource.h.

Referenced by CMultilineEntryDlg::DoDataExchange(), and CMultilineEntryDlg::InitHelpID().

#define IDC_NEXTTIP 1005

Definition at line 97 of file resource.h.

Referenced by CTipDlg::OnInitDialog().

#define IDC_NO_MODULE_PROGRAM 1147

Definition at line 211 of file resource.h.

Referenced by CCommit_OPTIONS::DoDataExchange(), and CCommit_OPTIONS::InitHelpID().

#define IDC_NO_SPLASH_SCREEN 1011

Definition at line 102 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_NO_VENDOR_RELEASE_TAGS 1243

Definition at line 300 of file resource.h.

Referenced by CImport_MAIN::DoDataExchange(), and CImport_MAIN::InitHelpID().

#define IDC_NORECURS 1031

Definition at line 118 of file resource.h.

Referenced by CUpdateMain::DoDataExchange(), CTag_MAIN::DoDataExchange(), CStatus_MAIN::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CLogMain::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CCommit_OPTIONS::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CAnnotate_MAIN::DoDataExchange(), CUpdateMain::InitHelpID(), CTag_MAIN::InitHelpID(), CStatus_MAIN::InitHelpID(), CRtag_MAIN::InitHelpID(), CLogMain::InitHelpID(), CDiff_MAIN::InitHelpID(), CCommit_OPTIONS::InitHelpID(), CCheckout_MAIN::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDC_NOTAGS 1066

Definition at line 143 of file resource.h.

Referenced by CLogMain::DoDataExchange(), and CLogMain::InitHelpID().

#define IDC_OPTIONCHECK_BUTTON 113

Definition at line 19 of file resource.h.

Referenced by COptionalPropertySheet::InitHelpID(), and COptionalPropertySheet::OnInitDialog().

#define IDC_OTHER_BUTTON 1246

Definition at line 303 of file resource.h.

Referenced by CCVSAlert_MAIN::DoDataExchange().

#define IDC_OUTPUT_QUICK 1197

Definition at line 258 of file resource.h.

Referenced by CStatus_MAIN::InitHelpID().

#define IDC_OUTPUT_STANDARD 1200

Definition at line 261 of file resource.h.

Referenced by CStatus_MAIN::DoDataExchange(), and CStatus_MAIN::InitHelpID().

#define IDC_OUTPUT_VERBOSE 1198

Definition at line 259 of file resource.h.

Referenced by CStatus_MAIN::InitHelpID().

#define IDC_OVERRIDE_CHECKOUT_DIR 1140

Definition at line 204 of file resource.h.

Referenced by CCheckout_MAIN::DoDataExchange(), and CCheckout_MAIN::InitHelpID().

#define IDC_OVERWRITE 1035

Definition at line 122 of file resource.h.

Referenced by CTag_MAIN::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CTag_MAIN::InitHelpID(), and CRtag_MAIN::InitHelpID().

#define IDC_OVERWRITE_RELEASE_TAGS 1266

Definition at line 323 of file resource.h.

Referenced by CImport_MAIN::DoDataExchange(), and CImport_MAIN::InitHelpID().

#define IDC_PASSWORD 1018

Definition at line 108 of file resource.h.

Referenced by GetPassword::DoDataExchange(), and GetPassword::InitHelpID().

#define IDC_PATH 1032

Definition at line 119 of file resource.h.

Referenced by CSaveSettingsDlg::DoDataExchange(), CRelease_MAIN::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CImport_OPTIONS::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CSaveSettingsDlg::InitHelpID(), CRelease_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CImport_OPTIONS::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDC_PREVIEW_CVSROOT 1278

Definition at line 335 of file resource.h.

Referenced by CCvsRootDlg::DoDataExchange(), and CCvsRootDlg::InitHelpID().

#define IDC_PREVIEWINFO 1190

Definition at line 252 of file resource.h.

Referenced by CCommit_MAIN::DoDataExchange(), and CCommit_MAIN::InitHelpID().

#define IDC_PROGRESS 1118

Definition at line 186 of file resource.h.

Referenced by CProgressDlg::DoDataExchange().

#define IDC_PROGRESS_TEXT 1225

Definition at line 282 of file resource.h.

Referenced by CProgressDlg::DoDataExchange().

#define IDC_PROMPTEDIT 1015

Definition at line 106 of file resource.h.

#define IDC_PROTOCOL 1258

Definition at line 315 of file resource.h.

Referenced by CCvsRootDlg::DoDataExchange(), and CCvsRootDlg::InitHelpID().

#define IDC_PROTOCOL_DESC 1257

Definition at line 314 of file resource.h.

Referenced by CCvsRootDlg::DoDataExchange(), and CCvsRootDlg::InitHelpID().

#define IDC_PROTOCOL_KEYWORD 1263

Definition at line 320 of file resource.h.

Referenced by CEditKeywordDlg::DoDataExchange(), and CEditKeywordDlg::InitHelpID().

#define IDC_PRUNE_EMPTY_DIR 1006

Definition at line 98 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_PYTHON_URL 1189

Definition at line 251 of file resource.h.

Referenced by CNoPython::DoDataExchange(), and CNoPython::InitHelpID().

#define IDC_PYTHONDLL 1101

Definition at line 174 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_QUIET 1012

Definition at line 103 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_RANGE_DATE 1280

Definition at line 337 of file resource.h.

Referenced by CLogFilters::DoDataExchange(), and CLogFilters::InitHelpID().

#define IDC_RANGE_REV_TAG 1279

Definition at line 336 of file resource.h.

Referenced by CLogFilters::DoDataExchange(), and CLogFilters::InitHelpID().

#define IDC_RCS_FILENAMES_ONLY 1084

Definition at line 157 of file resource.h.

Referenced by CLogMain::DoDataExchange(), and CLogMain::InitHelpID().

#define IDC_REACTION_SPEED 1236

Definition at line 293 of file resource.h.

Referenced by CFilterMaskOptDlg::DoDataExchange(), CFilterMaskOptDlg::InitHelpID(), and CFilterMaskOptDlg::UpdateReactionSpeedInfo().

#define IDC_REACTION_SPEED_SECONDS 1240

Definition at line 297 of file resource.h.

Referenced by CFilterMaskOptDlg::DoDataExchange(), and CFilterMaskOptDlg::InitHelpID().

#define IDC_REACTION_SPEED_SPIN 1237

Definition at line 294 of file resource.h.

Referenced by CFilterMaskOptDlg::DoDataExchange(), and CFilterMaskOptDlg::InitHelpID().

#define IDC_READ_FROM 1209

Definition at line 268 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), and CItemListDlg::InitHelpID().

#define IDC_REFRESH_ITEMS 1207

Definition at line 267 of file resource.h.

Referenced by CItemListDlg::DoDataExchange(), CItemListDlg::InitHelpID(), and CItemListDlg::PostClickRefresh().

#define IDC_RELEASE_TAG 1089

Definition at line 162 of file resource.h.

Referenced by CImport_MAIN::DoDataExchange(), and CImport_MAIN::InitHelpID().

#define IDC_REMIND 1188

Definition at line 250 of file resource.h.

Referenced by CNoPython::DoDataExchange(), and CNoPython::InitHelpID().

#define IDC_REMOVE 1126

Definition at line 193 of file resource.h.

Referenced by CCustomizeMenus::DoDataExchange(), and CCustomizeMenus::InitHelpID().

#define IDC_REPOSITORY_PATH 1150

Definition at line 214 of file resource.h.

Referenced by CImport_MAIN::DoDataExchange(), CCvsRootDlg::DoDataExchange(), CImport_MAIN::InitHelpID(), and CCvsRootDlg::InitHelpID().

#define IDC_RESET_COLORS 1170

Definition at line 232 of file resource.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDC_RESET_STICKY 1038

Definition at line 125 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), and CUpdateOptions::InitHelpID().

#define IDC_REV_TAG 1056

Definition at line 136 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), CUpdateOptions::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CItemListDlg::DoDataExchange(), CCommit_OPTIONS::DoDataExchange(), CUpdateMerge::InitHelpID(), CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CItemListDlg::InitHelpID(), CCommit_OPTIONS::InitHelpID(), and CCommit_OPTIONS::OnForcerevision().

#define IDC_REV_TAG1 1087

Definition at line 160 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), CDiff_MAIN::InitHelpID(), and CDiff_MAIN::OnCheck1().

#define IDC_REV_TAG2 1063

Definition at line 141 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CUpdateMerge::InitHelpID(), CDiff_MAIN::InitHelpID(), and CDiff_MAIN::OnCheck2().

#define IDC_REV_TAG_DATE 1164

Definition at line 226 of file resource.h.

Referenced by CAnnotate_MAIN::DoDataExchange(), CAnnotate_MAIN::InitHelpID(), and CAnnotate_MAIN::OnIsdate().

#define IDC_REVISION 1229

Definition at line 286 of file resource.h.

Referenced by CSelectionDetailsDlg::DoDataExchange(), and CSelectionDetailsDlg::InitHelpID().

#define IDC_REVISION_SPIN 1228

Definition at line 285 of file resource.h.

Referenced by CSelectionDetailsDlg::DoDataExchange(), and CSelectionDetailsDlg::InitHelpID().

#define IDC_RGB_BRANCH 1175

Definition at line 237 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_RGB_DEAD 1177

Definition at line 239 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_RGB_HEADER 1173

Definition at line 235 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_RGB_MERGE 1186

Definition at line 248 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_RGB_NODE 1176

Definition at line 238 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_RGB_SELECTION 1184

Definition at line 246 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_RGB_SHADOW 1185

Definition at line 247 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_RGB_STATE 1178

Definition at line 240 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_RGB_TAG 1174

Definition at line 236 of file resource.h.

Referenced by CGraphOptDlg::DoDataExchange(), and CGraphOptDlg::InitHelpID().

#define IDC_SAME_ACTION_NEXT_TIME 1256

Definition at line 313 of file resource.h.

Referenced by CFileAction_MAIN::DoDataExchange(), and CFileAction_MAIN::InitHelpID().

#define IDC_SELECTION 1181

Definition at line 243 of file resource.h.

Referenced by CSelectionDetailsDlg::DoDataExchange(), and CSelectionDetailsDlg::InitHelpID().

#define IDC_SELECTION_LIST 1226

Definition at line 283 of file resource.h.

Referenced by CSelectionDetailsDlg::DoDataExchange(), and CSelectionDetailsDlg::InitHelpID().

#define IDC_SETTINGS_NAME 1275

Definition at line 332 of file resource.h.

Referenced by CSaveSettingsDlg::DoDataExchange(), and CSaveSettingsDlg::InitHelpID().

#define IDC_SHOW_CVS_METHOD 1253

Definition at line 310 of file resource.h.

Referenced by CGetPrefs_CVS::DoDataExchange(), and CGetPrefs_CVS::InitHelpID().

#define IDC_SKIP_ANNOTATE 1163

Definition at line 225 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_SKIP_DIFF 1156

Definition at line 218 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_SKIP_FILEACTION 1167

Definition at line 229 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_SKIP_GRAPH 1157

Definition at line 219 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_SKIP_LOG 1158

Definition at line 220 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_SKIP_STATUS 1165

Definition at line 227 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_SKIP_UPDATE 1155

Definition at line 217 of file resource.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), and CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDC_SPIN_AUTO_LOGOUT_TIME 1020

Definition at line 110 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_SPIN_COMPRESSION 1120

Definition at line 188 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_STARTUP 1003

Definition at line 95 of file resource.h.

Referenced by CTipDlg::DoDataExchange().

#define IDC_STATES 1061

Definition at line 139 of file resource.h.

Referenced by CLogFilters::DoDataExchange(), and CLogFilters::InitHelpID().

#define IDC_STATIC_CURRENTOPTIONS 1272

Definition at line 329 of file resource.h.

#define IDC_STATIC_OPTDESC 1273

Definition at line 330 of file resource.h.

#define IDC_STATICGROUP_SELECTOPTIONS 1271

Definition at line 328 of file resource.h.

#define IDC_STDOUT 1027

Definition at line 114 of file resource.h.

Referenced by CUpdateOptions::DoDataExchange(), and CUpdateOptions::InitHelpID().

#define IDC_SUPRESS_HEADER 1069

Definition at line 145 of file resource.h.

Referenced by CLogMain::DoDataExchange(), and CLogMain::InitHelpID().

#define IDC_TAGDESC_TEXT 1195

Definition at line 256 of file resource.h.

Referenced by CTag_MAIN::DoDataExchange(), and CRtag_MAIN::DoDataExchange().

#define IDC_TAGNAME 1030

Definition at line 117 of file resource.h.

Referenced by CTag_MAIN::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CTag_MAIN::InitHelpID(), and CRtag_MAIN::InitHelpID().

#define IDC_TCLDLL 1106

Definition at line 179 of file resource.h.

Referenced by CGetPrefs_WINCVS::DoDataExchange(), and CGetPrefs_WINCVS::InitHelpID().

#define IDC_TEMPFILE 1187

Definition at line 249 of file resource.h.

Referenced by CEditorMonDlg::DoDataExchange(), and CEditorMonDlg::InitHelpID().

#define IDC_TEMPLATE_LIST 1248

Definition at line 305 of file resource.h.

Referenced by CTemplateDlg::DoDataExchange(), and CTemplateDlg::InitHelpID().

#define IDC_TEMPLATE_PREVIEW 1249

Definition at line 306 of file resource.h.

Referenced by CTemplateDlg::DoDataExchange(), and CTemplateDlg::InitHelpID().

#define IDC_THREE_WAY_CONFLICTS 1284

Definition at line 341 of file resource.h.

Referenced by CUpdateMerge::DoDataExchange(), and CUpdateMerge::InitHelpID().

#define IDC_TIPSTRING 1007

Definition at line 99 of file resource.h.

Referenced by CTipDlg::DoDataExchange(), and CTipDlg::OnCtlColor().

#define IDC_UNIFIEDDIFF 1138

Definition at line 202 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_UNIX_LF 1009

Definition at line 101 of file resource.h.

Referenced by CGetPrefs_GLOBALS::DoDataExchange(), and CGetPrefs_GLOBALS::InitHelpID().

#define IDC_UP 1127

Definition at line 194 of file resource.h.

Referenced by CCustomizeMenus::DoDataExchange(), and CCustomizeMenus::InitHelpID().

#define IDC_USE_EXTERNAL_DIFF 1092

Definition at line 165 of file resource.h.

Referenced by CDiff_MAIN::DoDataExchange(), and CDiff_MAIN::InitHelpID().

#define IDC_USERS 1081

Definition at line 154 of file resource.h.

Referenced by CLogFilters::DoDataExchange(), and CLogFilters::InitHelpID().

#define IDC_VENDOR_TAG 1148

Definition at line 212 of file resource.h.

Referenced by CImport_MAIN::DoDataExchange(), and CImport_MAIN::InitHelpID().

#define IDC_WARNING_DESC 1051

Definition at line 131 of file resource.h.

Referenced by CImportWarning::DoDataExchange(), and CImportWarning::InitHelpID().

#define IDC_WINCVSURL 1121

Definition at line 189 of file resource.h.

Referenced by CAboutDlg::DoDataExchange(), and CAboutDlg::InitHelpID().

#define IDC_WINCVSVER 1107

Definition at line 180 of file resource.h.

Referenced by CAboutDlg::DoDataExchange(), and CAboutDlg::InitHelpID().

#define IDD_ABOUTBOX 100

Definition at line 6 of file resource.h.

#define IDD_ADMINOPTION 196

Definition at line 66 of file resource.h.

#define IDD_ALERT 134

Definition at line 25 of file resource.h.

#define IDD_ANNOTATE_MAIN 192

Definition at line 63 of file resource.h.

#define IDD_CHECKOUT_MAIN 137

Definition at line 27 of file resource.h.

#define IDD_CMDLINE_MAIN 142

Definition at line 31 of file resource.h.

#define IDD_COMMIT_MAIN 138

Definition at line 28 of file resource.h.

#define IDD_COMMIT_OPTIONS 186

Definition at line 60 of file resource.h.

#define IDD_CUSTOMIZE 181

Definition at line 54 of file resource.h.

#define IDD_CVSROOT 224

Definition at line 90 of file resource.h.

#define IDD_CVSTEMPLATE 218

Definition at line 84 of file resource.h.

#define IDD_DIFF_MAIN 154

Definition at line 41 of file resource.h.

#define IDD_DIFF_OPTIONS 153

Definition at line 40 of file resource.h.

#define IDD_EDITKEYWORD 226

Definition at line 91 of file resource.h.

#define IDD_EDITMESSAGE 195

Definition at line 65 of file resource.h.

Referenced by PromptEditMessage().

#define IDD_EDITORMON 197

Definition at line 67 of file resource.h.

#define IDD_ENTRYDESC 146

Definition at line 34 of file resource.h.

#define IDD_FILTER_SELECTION 213

Definition at line 82 of file resource.h.

#define IDD_FILTERBAR_OPTIONS 212

Definition at line 81 of file resource.h.

#define IDD_GRAPH_OPTIONS 193

Definition at line 64 of file resource.h.

#define IDD_IMPORT_MAIN 139

Definition at line 29 of file resource.h.

#define IDD_IMPORT_OPTIONS 140

Definition at line 30 of file resource.h.

#define IDD_IMPORTFILTER 143

Definition at line 32 of file resource.h.

#define IDD_INIT_MAIN 165

Definition at line 49 of file resource.h.

#define IDD_ITEM_LIST 205

Definition at line 73 of file resource.h.

#define IDD_LOG_FILTERS 152

Definition at line 38 of file resource.h.

#define IDD_LOG_MAIN 150

Definition at line 37 of file resource.h.

#define IDD_LOGIN_MAIN 206

Definition at line 74 of file resource.h.

#define IDD_MULTILINE_ENTRY 214

Definition at line 83 of file resource.h.

#define IDD_NOPYTHON 198

Definition at line 68 of file resource.h.

#define IDD_OPEN_MAIN 219

Definition at line 85 of file resource.h.

#define IDD_PASSWRD 132

Definition at line 24 of file resource.h.

#define IDD_PREFS_CVS 207

Definition at line 76 of file resource.h.

#define IDD_PREFS_CVSCMD_DIALOGS 191

Definition at line 62 of file resource.h.

#define IDD_PREFS_GLOBALS 136

Definition at line 26 of file resource.h.

#define IDD_PREFS_WINCVS 156

Definition at line 43 of file resource.h.

#define IDD_PROGRESS 177

Definition at line 52 of file resource.h.

#define IDD_RELEASE_MAIN 208

Definition at line 78 of file resource.h.

#define IDD_RTAG_MAIN 200

Definition at line 70 of file resource.h.

#define IDD_RTAG_OPTIONS 201

Definition at line 71 of file resource.h.

#define IDD_SAVESETTINGS 184

Definition at line 57 of file resource.h.

#define IDD_SELECTION_DETAILS 209

Definition at line 80 of file resource.h.

#define IDD_STATUS_MAIN 203

Definition at line 72 of file resource.h.

#define IDD_TAG_MAIN 199

Definition at line 69 of file resource.h.

#define IDD_TIP 105

Definition at line 11 of file resource.h.

Referenced by CTipDlg::CTipDlg().

#define IDD_UPDATE_MAIN 147

Definition at line 35 of file resource.h.

#define IDD_UPDATE_MERGE 149

Definition at line 36 of file resource.h.

#define IDD_UPDATE_OPTIONS 155

Definition at line 42 of file resource.h.

#define IDD_WARNINGDESC 145

Definition at line 33 of file resource.h.

#define IDI_MB_EXCLAMATION 223

Definition at line 89 of file resource.h.

Referenced by CCVSAlert_MAIN::SetIcon().

#define IDI_MB_INFORMATION 221

Definition at line 87 of file resource.h.

Referenced by CCVSAlert_MAIN::SetIcon().

#define IDI_MB_QUESTION 222

Definition at line 88 of file resource.h.

Referenced by CCVSAlert_MAIN::SetIcon().

#define IDI_MB_STOP 220

Definition at line 86 of file resource.h.

Referenced by CCVSAlert_MAIN::SetIcon().

#define IDP_FAILED_TO_CREATE 102

Definition at line 8 of file resource.h.

#define IDP_OLE_INIT_FAILED 100

Definition at line 7 of file resource.h.

#define IDP_SOCKETS_INIT_FAILED 104

Definition at line 10 of file resource.h.

Referenced by CWincvsApp::InitInstance().

#define IDR_BROWSER 129

Definition at line 23 of file resource.h.

Referenced by CWincvsApp::InitInstance(), and CMainFrame::OnCreate().

#define IDR_CNTR_INPLACE 6

Definition at line 5 of file resource.h.

Referenced by CWincvsApp::InitInstance().

#define IDR_CUSTMENUS 182

Definition at line 55 of file resource.h.

Referenced by CCustomizeMenus::OnInitDialog().

#define IDR_FILELIST 157

Definition at line 44 of file resource.h.

Referenced by CWincvsApp::InitInstance(), and CMainFrame::OnCreate().

#define IDR_FILTER 186

Definition at line 59 of file resource.h.

Referenced by CWincvsApp::InitInstance(), and CMainFrame::OnCreate().

#define IDR_GRAPH 161

Definition at line 46 of file resource.h.

Referenced by CWincvsApp::InitInstance().

#define IDR_ITEMLIST 207

Definition at line 75 of file resource.h.

Referenced by CItemListDlg::OnInitDialog().

#define IDR_MAINFRAME 128

Definition at line 20 of file resource.h.

Referenced by CWincvsApp::InitInstance(), and CMainFrame::OnCreate().

#define IDR_MULTIUSER 158

Definition at line 45 of file resource.h.

Referenced by CWincvsApp::InitInstance(), and CMainFrame::OnCreate().

#define IDR_STATEICONS 164

Definition at line 47 of file resource.h.

Referenced by CBrowseFileView::OnInitialUpdate().

#define IDR_TAGS 165

Definition at line 48 of file resource.h.

Referenced by CWincvsApp::InitInstance(), and CMainFrame::OnCreate().

#define IDR_WINCVSTYPE 129

Definition at line 21 of file resource.h.

#define IDR_WORKSPACE 173

Definition at line 50 of file resource.h.

Referenced by CMainFrame::InitializeDockingWindows().

#define IDS_COMBOBROWSER 32813

Definition at line 365 of file resource.h.

#define IDS_DEFFONT 129

Definition at line 22 of file resource.h.

Generated on Sat Aug 7 22:47:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/SortHeaderCtrl.cpp File Reference

WinCvs/SortHeaderCtrl.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "SortHeaderCtrl.h"
#include "AppConsole.h"
#include "FilterSelectionDlg.h"
#include "BrowseFileView.h"
#include "BrowseViewColumn.h"

Include dependency graph for SortHeaderCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | GETITEM_BUFFER_SIZE 256
Buffer size for GetItem call.
#define | DEFAULT_FILTERCHANGETIMEOUT (5 * 60 * 1000)

Define Documentation

#define DEFAULT_FILTERCHANGETIMEOUT (5 * 60 * 1000)

Definition at line 33 of file SortHeaderCtrl.cpp.

Referenced by CSortHeaderCtrl::EnableHeaderFilters().

#define GETITEM_BUFFER_SIZE 256

Buffer size for GetItem call.

Definition at line 30 of file SortHeaderCtrl.cpp.

Referenced by CSortHeaderCtrl::DrawItem(), CSortHeaderCtrl::GetFilterText(), and CSortHeaderCtrl::SetFilterText().

Generated on Sat Aug 7 22:47:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/SortHeaderCtrl.h File Reference

WinCvs/SortHeaderCtrl.h File Reference

#include "BrowseViewModel.h"

Include dependency graph for SortHeaderCtrl.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CSortHeaderCtrl
Sort header control. More...

Generated on Sat Aug 7 22:47:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/Splash.cpp File Reference

WinCvs/Splash.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include "Splash.h"
#include "wincvs.h"
#include "CPStr.h"

Include dependency graph for Splash.cpp:

Include dependency graph

Go to the source code of this file.

Functions

const int gc_nBitmapRightMargin (519-491)

Function Documentation

const int gc_nBitmapRightMargin ( 519- 491 ) [static]

Referenced by CSplashWnd::OnPaint().

Generated on Sat Aug 7 22:47:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/Splash.h File Reference

WinCvs/Splash.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CSplashWnd

Generated on Sat Aug 7 22:47:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/Stat.cpp File Reference

WinCvs/Stat.cpp File Reference

#include <stdafx.h>
#include <errno.h>
#include <io.h>
#include "AppConsole.h"
#include "wincvsdebug.h"

Include dependency graph for Stat.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void | _dosmaperr (DWORD dwErr)
BOOL | IsLeapYear (WORD year)
int | CompareTargetDate (const SYSTEMTIME *p_test_date, const SYSTEMTIME *p_target_date)
int | GetTimeZoneBias (const SYSTEMTIME *pst)
bool | IsDST (const SYSTEMTIME *pst)
void | LocalSystemTimeToUtcSystemTime (const SYSTEMTIME *p_local, SYSTEMTIME *p_utc)
BOOL | FileTimeToUnixTime (const FILETIME *pft, time_t *put, BOOL local_time)
int | _statcore (HANDLE hFile, const char *filename, struct stat *buf)
int | stat (const char *name, struct stat *buf)
int | wnt_fstat (int fildes, struct stat *buf)
int | wnt_lstat (const char *name, struct stat *buf)

Variables

struct {
DWORD err
int dos
} errors []
const WORD | month_len [12]
const char * | month_names [12]
const ULONGLONG | systemtime_second = 10000000L

Function Documentation

void _dosmaperr ( DWORD dwErr ) [static]

Definition at line 103 of file Stat.cpp.

References errors.

Referenced by _statcore().

00104 {
00105     int n;
00106     for(n=0; n<sizeof(errors)/sizeof(errors[0]); n++)
00107     {
00108         if(errors[n].err==dwErr)
00109         {
00110             errno=errors[n].dos;
00111             return;
00112         }
00113     }
00114     errno=EFAULT;
00115 }

int _statcore | ( | HANDLE | hFile,
 |  | const char * | filename,
 |  | struct stat * | buf
 | ) | [static]

Definition at line 433 of file Stat.cpp.

References _dosmaperr(), FileTimeToUnixTime(), NULL, stat::st_atime, stat::st_ctime, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, and stat::st_uid.

Referenced by stat(), wnt_fstat(), and wnt_lstat().

00434 {
00435     BY_HANDLE_FILE_INFORMATION bhfi;
00436     int isdev;
00437     char szFs[32];
00438     int is_gmt_fs = -1;
00439
00440     if(hFile)
00441     {
00442         /* Find out what kind of handle underlies filedes
00443         */
00444         isdev = GetFileType(hFile) & ~FILE_TYPE_REMOTE;
00445
00446         if ( isdev != FILE_TYPE_DISK )
00447         {
00448             /* not a disk file. probably a device or pipe
00449              */
00450             if ( (isdev == FILE_TYPE_CHAR) || (isdev == FILE_TYPE_PIPE) )
00451             {
00452                 /* treat pipes and devices similarly. no further info is
00453                  * available from any API, so set the fields as reasonably
00454                  * as possible and return.
00455                  */
00456                 if ( isdev == FILE_TYPE_CHAR )
00457                     buf->st_mode = _S_IFCHR;
00458                 else
00459                     buf->st_mode = _S_IFIFO;
00460
00461                 buf->st_rdev = buf->st_dev = (_dev_t)hFile;
00462                 buf->st_nlink = 1;
00463                 buf->st_uid = buf->st_gid = buf->st_ino = 0;
00464                 buf->st_atime = buf->st_mtime = buf->st_ctime = 0;
00465                 if ( isdev == FILE_TYPE_CHAR )
00466                     buf->st_size = 0;
00467                 else
00468                 {
00469                     unsigned long ulAvail;
00470                     int rc;
00471                     rc = PeekNamedPipe(hFile,NULL,0,NULL,&ulAvail,NULL);
00472                     if (rc)
00473                         buf->st_size = (_off_t)ulAvail;
00474                     else
00475                         buf->st_size = (_off_t)0;
00476                 }
00477
00478                 return 0;
00479             }
00480             else if ( isdev == FILE_TYPE_UNKNOWN )
00481             {
00482                 // Network device
00483                 errno = EBADF;
00484                 return -1;
00485             }
00486         }
00487     }
00488
00489     /* set the common fields
00490      */
00491     buf->st_ino = buf->st_uid = buf->st_gid = buf->st_mode = 0;
00492     buf->st_nlink = 1;
00493
00494     if(hFile)
00495     {
00496         /* use the file handle to get all the info about the file
00497          */
00498         if ( !GetFileInformationByHandle(hFile, &bhfi) )
00499         {
00500             _dosmaperr(GetLastError());
00501             return -1;
00502         }
00503     }
00504     else
00505     {
00506         WIN32_FIND_DATA fd;
00507         HANDLE hFind;
00508
00509         if(strlen(filename)==3 && !stricmp(filename+1,":\\"))
00510         {
00511             // Can't do anything about the root directory...
00512             // Win2k and Win98 can return info, but Win95 can't, so
00513             // it's best to do nothing.
00514             memset(&bhfi,0,sizeof(bhfi));
00515             bhfi.dwFileAttributes=GetFileAttributes(filename);
00516             if(bhfi.dwFileAttributes==0xFFFFFFFF)
00517             {
00518                 _dosmaperr(GetLastError());
00519                 return -1;
00520             }
00521             bhfi.nNumberOfLinks=1;
00522         }
00523         else
00524         {
00525             hFind=FindFirstFile(filename,&fd);
00526             if(hFind==INVALID_HANDLE_VALUE)
00527             {
00528                 _dosmaperr(GetLastError());
00529                 return -1;
00530             }
00531             FindClose(hFind);
00532             memset(&bhfi,0,sizeof(bhfi));
00533             bhfi.dwFileAttributes=fd.dwFileAttributes;
00534             bhfi.ftCreationTime=fd.ftCreationTime;
00535             bhfi.ftLastAccessTime=fd.ftLastAccessTime;
00536             bhfi.ftLastWriteTime=fd.ftLastWriteTime;
00537             bhfi.nFileSizeLow=fd.nFileSizeLow;
00538             bhfi.nFileSizeHigh=fd.nFileSizeHigh;
00539             bhfi.nNumberOfLinks=1;
00540         }
00541     }
00542
00543     if ( bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY )
00544         buf->st_mode |= (_S_IREAD + (_S_IREAD >> 3) + (_S_IREAD >> 6));
00545     else
00546         buf->st_mode |= ((_S_IREAD|_S_IWRITE) + ((_S_IREAD|_S_IWRITE) >> 3)
00547           + ((_S_IREAD|_S_IWRITE) >> 6));
00548     if (bhfi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
00549         buf->st_mode |= (_S_IEXEC + (_S_IEXEC >> 3) + (_S_IEXEC >> 6));
00550
00551     // Potential, but unlikely problem... casting DWORD to short.
00552     // Reported by Jerzy Kaczorowski, addressed by Jonathan Gilligan
00553     // if the number of links is greater than 0x7FFF
00554     // there would be an overflow problem.
00555     // This is a problem inherent in the struct stat, and hence
00556     // in the design of the C library.
00557     ASSERT(bhfi.nNumberOfLinks <= SHRT_MAX);
00558     if (bhfi.nNumberOfLinks > SHRT_MAX) {
00559         buf->st_nlink = SHRT_MAX;
00560         }
00561     else {
00562         buf->st_nlink= static_cast<short>(bhfi.nNumberOfLinks);
00563         }
00564
00565     if(!filename)
00566     {
00567         // We have to assume here that the repository doesn't span drives, so the
00568         // current directory is correct.
00569         *szFs='\0';
00570         GetVolumeInformation(NULL,NULL,0,NULL,NULL,NULL,szFs,32);
00571         if(!stricmp(szFs,"NTFS"))
00572             is_gmt_fs = 1;
00573         else
00574             is_gmt_fs = 0;
00575     }
00576     else
00577     {
00578         if(filename[1]!=':')
00579         {
00580             if((filename[0]=='\\' || filename[0]=='/') && (filename[1]=='\\' || filename[1]=='/'))
00581             {
00582                 // UNC pathname, assumed to be on an NTFS server.  No way to
00583                 // check, actually (GVI doesn't return anything useful).
00584                 is_gmt_fs = 1;
00585             }
00586             else
00587             {
00588                 // Relative path, treat as local
00589                 GetVolumeInformation(NULL,NULL,0,NULL,NULL,NULL,szFs,sizeof(szFs));
00590                 if(!stricmp(szFs,"NTFS"))
00591                     is_gmt_fs = 1;
00592                 else
00593                     is_gmt_fs = 0;
00594             }
00595         }
00596         else
00597         {
00598             // Drive specified...
00599             char szRootPath[4] = "?:\\";
00600             szRootPath[0]=filename[0];
00601             *szFs='\0';
00602             GetVolumeInformation(szRootPath,NULL,0,NULL,NULL,NULL,szFs,sizeof(szFs));
00603             if(!stricmp(szFs,"NTFS") || !stricmp(szFs,"HPFS"))
00604                 is_gmt_fs = 1;
00605             else
00606                 is_gmt_fs = 0;
00607         }
00608     }
00609
00610     if(is_gmt_fs) // NTFS - everything is in GMT already
00611     {
00612         FileTimeToUnixTime ( &bhfi.ftLastAccessTime, &buf->st_atime, FALSE );
00613         FileTimeToUnixTime ( &bhfi.ftLastWriteTime, &buf->st_mtime, FALSE );
00614         FileTimeToUnixTime ( &bhfi.ftCreationTime, &buf->st_ctime, FALSE );
00615     }
00616     else
00617     {
00618         // FAT - timestamps are in incorrectly translated local time.
00619         // translate them back and let FileTimeToUnixTime() do the
00620         // job properly.
00621
00622         FILETIME At,Wt,Ct;
00623
00624         FileTimeToLocalFileTime ( &bhfi.ftLastAccessTime, &At );
00625         FileTimeToLocalFileTime ( &bhfi.ftLastWriteTime, &Wt );
00626         FileTimeToLocalFileTime ( &bhfi.ftCreationTime, &Ct );
00627         FileTimeToUnixTime ( &At, &buf->st_atime, TRUE );
00628         FileTimeToUnixTime ( &Wt, &buf->st_mtime, TRUE );
00629         FileTimeToUnixTime ( &Ct, &buf->st_ctime, TRUE );
00630     }
00631
00632     buf->st_size = bhfi.nFileSizeLow;
00633     if(bhfi.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
00634         buf->st_mode |= _S_IFDIR;
00635     else
00636         buf->st_mode |= _S_IFREG;
00637
00638     /* On DOS, this field contains the drive number, but
00639      * the drive number is not available on this platform.
00640      * Also, for UNC network names, there is no drive number.
00641      */
00642     buf->st_rdev = buf->st_dev = 0;
00643     return 0;
00644 }

Here is the call graph for this function:

int CompareTargetDate | ( | const SYSTEMTIME * | p_test_date,
 |  | const SYSTEMTIME * | p_target_date
 | ) | [static]

Definition at line 169 of file Stat.cpp.

References IsLeapYear(), and month_len.

Referenced by GetTimeZoneBias(), and IsDST().

00173 {
00174     WORD first_day_of_month; /* day of week of the first. Sunday = 0 */
00175     WORD end_of_month;       /* last day of month */
00176     WORD temp_date;
00177     int test_milliseconds, target_milliseconds;
00178
00179     /* Check that p_target_date is in the correct foramt: */
00180     ASSERT(p_target_date->wYear==0 && p_test_date->wYear != 0);
00181     if (p_target_date->wYear != 0 || p_test_date->wYear == 0)
00182         return 0;
00183
00184     /* Don't waste time calculating if we can shortcut the comparison... */
00185     if (p_test_date->wMonth != p_target_date->wMonth)
00186     {
00187         return (p_test_date->wMonth > p_target_date->wMonth) ? 4 : -4;
00188     }
00189
00190     /* Months equal. Now we neet to do some calculation.
00191      * If we know that y is the day of the week for some arbitrary date x,
00192      * then the day of the week of the first of the month is given by
00193      * (1 + y - x) mod 7.
00194      *
00195      * For instance, if the 19th is a Wednesday (day of week = 3), then
00196      * the date of the first Wednesday of the month is (19 mod 7) = 5.
00197      * If the 5th is a Wednesday (3), then the first of the month is
00198      * four days earlier (it's the first, not the zeroth):
00199      * (3 - 4) = -1; -1 mod 7 = 6. The first is a Saturday.
00200      *
00201      * Check ourselves: The 19th falls on a (6 + 19 - 1) mod 7
00202      * = 24 mod 7 = 3: Wednesday, as it should be.
00203      */
00204     first_day_of_month = (WORD)( (1u + p_test_date->wDayOfWeek - p_test_date->wDay) % 7u);
00205
00206     /* If the first of the month comes on day y, then the first day of week z falls on
00207      * (z - y + 1) mod 7.
00208      *
00209      * For instance, if the first is a Saturday (6), then the first Tuesday (2) falls on a
00210      * (2 - 6 + 1) mod 7 = -3 mod 7 = 4: The fourth. This is correct (see above).
00211      *
00212      * temp_date gets the first <target day of week> in the month.
00213      */
00214     temp_date = (WORD)( (1u + p_target_date->wDayOfWeek - first_day_of_month) % 7u);
00215     /* If we're looking for the third Tuesday in the month, find the date of the first
00216      * Tuesday and add (3 - 1) * 7. In the example, it's the 4 + 14 = 18th.
00217      *
00218      * temp_date now should hold the date for the wDay'th wDayOfWeek of the month.
00219      * we only need to handle the special case of the last <DayOfWeek> of the month.
00220      */
00221     temp_date = (WORD)( temp_date + 7 * p_target_date->wDay );
00222
00223     /* what's the last day of the month? */
00224     end_of_month = month_len [p_target_date->wMonth - 1];
00225     /* Correct if it's February of a leap year? */
00226     if ( p_test_date->wMonth == 2 && IsLeapYear(p_test_date->wYear) )
00227     {
00228         ++ end_of_month;
00229     }
00230
00231     /* if we tried to calculate the fifth Tuesday of the month
00232      * we may well have overshot. Correct for that case.
00233      */
00234     while ( temp_date > end_of_month)
00235         temp_date -= 7;
00236
00237     /* At long last, we're ready to do the comparison. */
00238     if ( p_test_date->wDay != temp_date )
00239     {
00240         return (p_test_date->wDay > temp_date) ? 2 : -2;
00241     }
00242     else
00243     {
00244         test_milliseconds = ((p_test_date->wHour * 60 + p_test_date->wMinute) * 60
00245                                 + p_test_date->wSecond) * 1000 + p_test_date->wMilliseconds;
00246         target_milliseconds = ((p_target_date->wHour * 60 + p_target_date->wMinute) * 60
00247                                 + p_target_date->wSecond) * 1000 + p_target_date->wMilliseconds;
00248         test_milliseconds -= target_milliseconds;
00249         return (test_milliseconds > 0) ? 1 : (test_milliseconds < 0) ? -1 : 0;
00250     }
00251
00252 }

Here is the call graph for this function:

BOOL FileTimeToUnixTime | ( | const FILETIME * | pft,
 |  | time_t * | put,
 |  | BOOL | local_time
 | ) | [static]

Definition at line 354 of file Stat.cpp.

References cvs_err(), GetTimeZoneBias(), IsDST(), month_names, and systemtime_second.

Referenced by _statcore().

00355 {
00356     BOOL success = FALSE;
00357
00358    /* FILETIME = number of 100-nanosecond ticks since midnight
00359     * 1 Jan 1601 UTC. time_t = number of 1-second ticks since
00360     * midnight 1 Jan 1970 UTC. To translate, we subtract a
00361     * FILETIME representation of midnight, 1 Jan 1970 from the
00362     * time in question and divide by the number of 100-ns ticks
00363     * in one second.
00364     */
00365
00366
00367     SYSTEMTIME base_st =
00368     {
00369         1970,   /* wYear            */
00370         1,      /* wMonth           */
00371         0,      /* wDayOfWeek       */
00372         1,      /* wDay             */
00373         0,      /* wHour            */
00374         0,      /* wMinute          */
00375         0,      /* wSecond          */
00376         0       /* wMilliseconds    */
00377     };
00378
00379     ULARGE_INTEGER itime;
00380     FILETIME base_ft;
00381     int bias = 0;
00382
00383     if (local_time)
00384     {
00385         SYSTEMTIME temp_st;
00386         success = FileTimeToSystemTime(pft, & temp_st);
00387         bias =  GetTimeZoneBias(& temp_st);
00388     }
00389
00390     success = SystemTimeToFileTime ( &base_st, &base_ft );
00391     if (success)
00392     {
00393         itime.QuadPart = ((ULARGE_INTEGER *)pft)->QuadPart;
00394
00395         itime.QuadPart -= ((ULARGE_INTEGER *)&base_ft)->QuadPart;
00396         itime.QuadPart /= systemtime_second;    // itime is now in seconds.
00397         itime.QuadPart += bias * 60;    // bias is in minutes.
00398
00399         *put = itime.LowPart;
00400     }
00401
00402     if (!success)
00403     {
00404         *put = -1;   /* error value used by mktime() */
00405     }
00406
00407 #if ENABLE_WINCVSDEBUG
00408     if (GetWinCvsDebugMaskBit(wcvsdbg_trace_stat_bit))
00409     {
00410             char scratch[128];
00411             SYSTEMTIME temp_st;
00412             struct tm gmt;
00413             bool bDst;
00414             FileTimeToSystemTime(pft, &temp_st);
00415             bDst = IsDST(& temp_st);
00416             gmt = *gmtime(put);
00417             _snprintf(scratch, 128,
00418                 "Converting file time (%s, bias = %d): %s %02d %02d:%02d:%02d.%03d %4d --> %s\n",
00419                 local_time ? (bDst ? "Daylight" : "Standard") : "UTC", bias,
00420                 month_names[temp_st.wMonth - 1], temp_st.wDay,
00421                 temp_st.wHour, temp_st.wMinute, temp_st.wSecond, temp_st.wMilliseconds,
00422                 temp_st.wYear,
00423                 asctime(& gmt) );
00424
00425             cvs_err(scratch);
00426             OutputDebugString(scratch);
00427     }
00428 #endif  // ENABLE_WINCVSDEBUG
00429
00430     return success;
00431 }

Here is the call graph for this function:

int GetTimeZoneBias ( const SYSTEMTIME * pst ) [static]

Definition at line 259 of file Stat.cpp.

References CompareTargetDate().

Referenced by FileTimeToUnixTime(), and LocalSystemTimeToUtcSystemTime().

00260 {
00261     TIME_ZONE_INFORMATION tz;
00262     int n, bias;
00263
00264     GetTimeZoneInformation ( &tz );
00265
00266     /*  I only deal with cases where we look at
00267      *  a "last sunday" kind of thing.
00268      */
00269     ASSERT(tz.DaylightDate.wYear == 0 && tz.StandardDate.wYear == 0);
00270
00271     bias = tz.Bias;
00272
00273     n = CompareTargetDate ( pst, & tz.DaylightDate );
00274     if (n < 0)
00275         bias += tz.StandardBias;
00276     else
00277     {
00278         n = CompareTargetDate ( pst, & tz.StandardDate );
00279         if (n < 0)
00280             bias += tz.DaylightBias;
00281         else
00282             bias += tz.StandardBias;
00283     }
00284     return bias;
00285 }

Here is the call graph for this function:

bool IsDST ( const SYSTEMTIME * pst ) [static]

Definition at line 290 of file Stat.cpp.

References CompareTargetDate().

Referenced by FileTimeToUnixTime().

00291 {
00292     TIME_ZONE_INFORMATION tz;
00293
00294     GetTimeZoneInformation ( &tz );
00295
00296     /*  I only deal with cases where we look at
00297      *  a "last sunday" kind of thing.
00298      */
00299     ASSERT(tz.DaylightDate.wYear == 0 && tz.StandardDate.wYear == 0);
00300
00301     return (CompareTargetDate ( pst, & tz.DaylightDate ) >= 0)
00302             && (CompareTargetDate ( pst, & tz.StandardDate ) < 0);
00303 }

Here is the call graph for this function:

BOOL IsLeapYear ( WORD year )

Definition at line 126 of file Stat.cpp.

Referenced by CompareTargetDate().

00127 {
00128     return ( (year & 3u == 0)
00129             && ( (year % 100u == 0)
00130                 || (year % 400u == 0) ));
00131 }

void LocalSystemTimeToUtcSystemTime | ( | const SYSTEMTIME * | p_local,
 |  | SYSTEMTIME * | p_utc
 | ) |

Definition at line 321 of file Stat.cpp.

References GetTimeZoneBias(), and systemtime_second.

00322 {
00323     FILETIME ft;
00324     ULARGE_INTEGER itime, delta;
00325     int bias = GetTimeZoneBias(p_local);
00326
00327     // delta = bias correction: bias minutes.
00328     SystemTimeToFileTime(p_local, & ft);
00329     itime.QuadPart = ((ULARGE_INTEGER *) &ft)->QuadPart;
00330     delta.QuadPart = systemtime_second * 60 * bias;   // bias in minutes...
00331     itime.QuadPart += delta.QuadPart;
00332
00333     ((ULARGE_INTEGER *) & ft)->QuadPart = itime.QuadPart;
00334     FileTimeToSystemTime(& ft, p_utc);
00335 }

Here is the call graph for this function:

int stat | ( | const char * | name,
 |  | struct stat * | buf
 | ) |

Definition at line 646 of file Stat.cpp.

References _statcore(), and NULL.

00647 {
00648     if(stricmp(name,"Entries") && stricmp(name,"Entries.log"))
00649         name=name;
00650     return _statcore(NULL,name,buf);
00651 }

Here is the call graph for this function:

int wnt_fstat | ( | int | fildes,
 |  | struct stat * | buf
 | ) |

Definition at line 653 of file Stat.cpp.

References _statcore(), and NULL.

00654 {
00655     return _statcore((HANDLE)_get_osfhandle(fildes),NULL,buf);
00656 }

Here is the call graph for this function:

int wnt_lstat | ( | const char * | name,
 |  | struct stat * | buf
 | ) |

Definition at line 658 of file Stat.cpp.

References _statcore(), and NULL.

00659 {
00660     return _statcore(NULL,name,buf);
00661 }

Here is the call graph for this function:

Variable Documentation

int dos

Definition at line 27 of file Stat.cpp.

DWORD err

Definition at line 27 of file Stat.cpp.

Referenced by CompatEndMoveToTrash(), CompatLoadLibrary(), LaunchDefaultEditor(), LaunchEditor(), CPersistent::LoadAll(), MakeTmpFile(), TBrowserFillDummy::OnError(), LSReport::OnError(), CFindSettings::OnError(), MacroTraversal::OnError(), and ImportReport::OnError().

struct { ... } errors[] [static]

Referenced by _dosmaperr().

const WORD month_len[12] [static]

Initial value:

{
    31,
    28,
    31,
    30,
    31,
    30,
    31,
    31,
    30,
    31,
    30,
    31
}
Definition at line 76 of file Stat.cpp.

Referenced by CompareTargetDate().

const char* month_names[12] [static]

Initial value:

{
    "Jan", "Feb", "Mar", "Apr",
    "May", "Jun", "Jul", "Aug",
    "Sep", "Oct", "Nov", "Dec"
}
Definition at line 92 of file Stat.cpp.

Referenced by FileTimeToUnixTime().

const ULONGLONG systemtime_second = 10000000L [static]

Definition at line 100 of file Stat.cpp.

Referenced by FileTimeToUnixTime(), and LocalSystemTimeToUtcSystemTime().

Generated on Sat Aug 7 22:47:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/StdAfx.cpp File Reference

WinCvs/StdAfx.cpp File Reference

#include "stdafx.h"

Include dependency graph for StdAfx.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/StdAfx.h File Reference

WinCvs/StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxdisp.h>
#include <afxcmn.h>
#include <afxsock.h>
#include <afxmt.h>
#include <HtmlHelp.h>
#include <shlwapi.h>
#include "cvsgui_i18n.h"
#include "CJLibrary.h"
#include "TipDlg.h"
#include <vector>
#include <map>
#include <string>
#include <afxrich.h>
#include <afxcview.h>
#include <sys/stat.h>

Include dependency graph for StdAfx.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | stat

Defines

#define | AFX_STDAFX_H__D2D77DCA_8299_11D1_8949_444553540000__INCLUDED_
#define | VC_EXTRALEAN
#define | qCvsDebug 0
#define | UASSERT ASSERT
#define | fstat wnt_fstat
#define | lstat wnt_lstat
#define | stat wnt_stat

Functions

int | stat (const char *name, struct stat *buf)
int | wnt_fstat (int fildes, struct stat *buf)
int | wnt_lstat (const char *name, struct stat *buf)

Define Documentation

#define AFX_STDAFX_H__D2D77DCA_8299_11D1_8949_444553540000__INCLUDED_

Definition at line 7 of file StdAfx.h.

#define fstat wnt_fstat

Definition at line 94 of file StdAfx.h.

#define lstat wnt_lstat

Definition at line 95 of file StdAfx.h.

#define qCvsDebug 0

Definition at line 41 of file StdAfx.h.

#define stat wnt_stat

Definition at line 96 of file StdAfx.h.

Referenced by RemoveCvsArgs::addfile(), BrowserGetDirectory(), BuildIgnoredList(), CBrowseFileView::EnterFolder(), Entries_SetVisited(), FileTraverse(), FormatDefaultSettingsLoc(), CBrowseFileView::GetEntriesModTime(), UCvsFiles::GetEntriesModTime(), getLoc(), IsCvsDirectory(), launchCVS(), MakeTmpFile(), UWidget::OnGetFloat(), UWidget::OnGetState(), UWidget::OnSetFloat(), UWidget::OnSetState(), CWinCvsBrowser::OnUpdateCmd(), UCvsFolders::OnUpdateGeneric(), CWinCvsBrowser::ResetBrowser(), UCvsFolders::ResetBrowser(), UCvsFolders::SetDefaultRoot(), CHistComboBoxEx::SetIcon(), CGraphDoc::SetNode(), UCmdUI::SetText(), SettingsGetLoc(), TestFileIsAlias(), UCvsGraph::UCvsGraph(), CvsPrefs::WhichCvs(), and WinInitWidgets().

#define UASSERT ASSERT

Definition at line 44 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 13 of file StdAfx.h.

Function Documentation

int stat | ( | const char * | name,
 |  | struct stat * | buf
 | ) |

Definition at line 646 of file Stat.cpp.

References _statcore(), and NULL.

00647 {
00648     if(stricmp(name,"Entries") && stricmp(name,"Entries.log"))
00649         name=name;
00650     return _statcore(NULL,name,buf);
00651 }

Here is the call graph for this function:

int wnt_fstat | ( | int | fildes,
 |  | struct stat * | buf
 | ) |

Definition at line 653 of file Stat.cpp.

References _statcore(), and NULL.

00654 {
00655     return _statcore((HANDLE)_get_osfhandle(fildes),NULL,buf);
00656 }

Here is the call graph for this function:

int wnt_lstat | ( | const char * | name,
 |  | struct stat * | buf
 | ) |

Definition at line 658 of file Stat.cpp.

References _statcore(), and NULL.

00659 {
00660     return _statcore(NULL,name,buf);
00661 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:46:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/TipDlg.cpp File Reference

WinCvs/TipDlg.cpp File Reference

#include "stdafx.h"
#include "resource.h"
#include <winreg.h>
#include <sys\stat.h>
#include <sys\types.h>
#include "wincvs.h"
#include "CPStr.h"
#include "CvsAlert.h"

Include dependency graph for TipDlg.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | MAX_BUFLEN 1000

Variables

const TCHAR | szSection [] = _T("Tip")
const TCHAR | szIntFilePos [] = _T("FilePos")
const TCHAR | szTimeStamp [] = _T("TimeStamp")
const TCHAR | szIntStartup [] = _T("StartUp")

Define Documentation

#define MAX_BUFLEN 1000

Definition at line 42 of file TipDlg.cpp.

Referenced by CTipDlg::GetNextTipString().

Variable Documentation

const TCHAR szIntFilePos[] = _T("FilePos") [static]

Definition at line 45 of file TipDlg.cpp.

Referenced by CTipDlg::CTipDlg(), and CTipDlg::~CTipDlg().

const TCHAR szIntStartup[] = _T("StartUp") [static]

Definition at line 47 of file TipDlg.cpp.

Referenced by CTipDlg::CTipDlg(), and CTipDlg::OnOK().

const TCHAR szSection[] = _T("Tip") [static]

Definition at line 44 of file TipDlg.cpp.

Referenced by CTipDlg::CTipDlg(), CTipDlg::OnOK(), and CTipDlg::~CTipDlg().

const TCHAR szTimeStamp[] = _T("TimeStamp") [static]

Definition at line 46 of file TipDlg.cpp.

Referenced by CTipDlg::CTipDlg().

Generated on Sat Aug 7 22:47:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/TipDlg.h File Reference

WinCvs/TipDlg.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CTipDlg

Defines

#define | TIPDLG_H_INCLUDED_

Define Documentation

#define TIPDLG_H_INCLUDED_

Definition at line 22 of file TipDlg.h.

Generated on Sat Aug 7 22:47:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/version_fu.h File Reference

WinCvs/version_fu.h File Reference

Go to the source code of this file.

Defines

#define | PP_PASTE(x) #x
#define | PP_STRINGIZE(x) PP_PASTE(x)
#define | WINCVS_FILEVERSION WINCVS_FILE_MAJOR,WINCVS_FILE_MINOR,WINCVS_FILE_PATCHLEVEL,WINCVS_BUILD
#define | WINCVS_PRODUCTVERSION WINCVS_PRODUCT_MAJOR,WINCVS_PRODUCT_MINOR,WINCVS_PRODUCT_PATCHLEVEL,WINCVS_BUILD
#define | WCVS_UNICODE_BUILD_STRING_PREFIX
#define | WCVS_PATCHED_FLAG 0
#define | WCVS_SPECIAL_BUILD_STRING_PREFIX
#define | WCVS_SPECIAL_BUILD_STRING
#define | WCVS_SPECIAL_BUILD_FLAG 0
#define | WCVS_PRIVATE_BUILD_STRING_PREFIX "Local "
#define | WCVS_PRIVATE_BUILD_STRING WCVS_PRIVATE_BUILD_STRING_PREFIX "build"
#define | WCVS_PRIVATE_BUILD_FLAG VS_FF_PRIVATEBUILD
#define | WCVS_PRERELEASE_BUILD_STRING_PREFIX "Prerelease "
#define | WCVS_PRERELEASE_FLAG VS_FF_PRERELEASE
#define | WCVS_DEBUG_BUILD_STRING_PREFIX
#define | WCVS_DEBUG_FLAG 0
#define | WINCVS_FILEVERSION_STRING PP_STRINGIZE(WINCVS_FILE_MAJOR.WINCVS_FILE_MINOR.WINCVS_FILE_PATCHLEVEL.WINCVS_BUILD) " " WCVS_PRERELEASE_BUILD_STRING_PREFIX "(" WCVS_PRIVATE_BUILD_STRING_PREFIX WCVS_SPECIAL_BUILD_STRING_PREFIX WCVS_UNICODE_BUILD_STRING_PREFIX WCVS_DEBUG_BUILD_STRING_PREFIX PP_STRINGIZE(Build WINCVS_BUILD) ")"
#define | WINCVS_PRODUCTVERSION_STRING PP_STRINGIZE(WINCVS_FILE_MAJOR.WINCVS_FILE_MINOR.WINCVS_FILE_PATCHLEVEL.WINCVS_BUILD) " " WCVS_PRERELEASE_BUILD_STRING_PREFIX "(" WCVS_PRIVATE_BUILD_STRING_PREFIX WCVS_SPECIAL_BUILD_STRING_PREFIX WCVS_UNICODE_BUILD_STRING_PREFIX WCVS_DEBUG_BUILD_STRING_PREFIX PP_STRINGIZE(Build WINCVS_BUILD) ")"

Define Documentation

#define PP_PASTE ( x ) #x

Definition at line 207 of file version_fu.h.

#define PP_STRINGIZE ( x ) PP_PASTE(x)

Definition at line 208 of file version_fu.h.

#define WCVS_DEBUG_BUILD_STRING_PREFIX

Definition at line 280 of file version_fu.h.

#define WCVS_DEBUG_FLAG 0

Definition at line 281 of file version_fu.h.

#define WCVS_PATCHED_FLAG 0

Definition at line 222 of file version_fu.h.

#define WCVS_PRERELEASE_BUILD_STRING_PREFIX "Prerelease "

Definition at line 271 of file version_fu.h.

#define WCVS_PRERELEASE_FLAG VS_FF_PRERELEASE

Definition at line 273 of file version_fu.h.

#define WCVS_PRIVATE_BUILD_FLAG VS_FF_PRIVATEBUILD

Definition at line 246 of file version_fu.h.

#define WCVS_PRIVATE_BUILD_STRING WCVS_PRIVATE_BUILD_STRING_PREFIX "build"

Definition at line 245 of file version_fu.h.

#define WCVS_PRIVATE_BUILD_STRING_PREFIX "Local "

Definition at line 243 of file version_fu.h.

#define WCVS_SPECIAL_BUILD_FLAG 0

Definition at line 232 of file version_fu.h.

#define WCVS_SPECIAL_BUILD_STRING

Definition at line 231 of file version_fu.h.

#define WCVS_SPECIAL_BUILD_STRING_PREFIX

Definition at line 230 of file version_fu.h.

#define WCVS_UNICODE_BUILD_STRING_PREFIX

Definition at line 216 of file version_fu.h.

#define WINCVS_FILEVERSION WINCVS_FILE_MAJOR,WINCVS_FILE_MINOR,WINCVS_FILE_PATCHLEVEL,WINCVS_BUILD

Definition at line 210 of file version_fu.h.

#define WINCVS_FILEVERSION_STRING PP_STRINGIZE(WINCVS_FILE_MAJOR.WINCVS_FILE_MINOR.WINCVS_FILE_PATCHLEVEL.WINCVS_BUILD) " " WCVS_PRERELEASE_BUILD_STRING_PREFIX "(" WCVS_PRIVATE_BUILD_STRING_PREFIX WCVS_SPECIAL_BUILD_STRING_PREFIX WCVS_UNICODE_BUILD_STRING_PREFIX WCVS_DEBUG_BUILD_STRING_PREFIX PP_STRINGIZE(Build WINCVS_BUILD) ")"

Definition at line 287 of file version_fu.h.

#define WINCVS_PRODUCTVERSION WINCVS_PRODUCT_MAJOR,WINCVS_PRODUCT_MINOR,WINCVS_PRODUCT_PATCHLEVEL,WINCVS_BUILD

Definition at line 211 of file version_fu.h.

#define WINCVS_PRODUCTVERSION_STRING PP_STRINGIZE(WINCVS_FILE_MAJOR.WINCVS_FILE_MINOR.WINCVS_FILE_PATCHLEVEL.WINCVS_BUILD) " " WCVS_PRERELEASE_BUILD_STRING_PREFIX "(" WCVS_PRIVATE_BUILD_STRING_PREFIX WCVS_SPECIAL_BUILD_STRING_PREFIX WCVS_UNICODE_BUILD_STRING_PREFIX WCVS_DEBUG_BUILD_STRING_PREFIX PP_STRINGIZE(Build WINCVS_BUILD) ")"

Definition at line 289 of file version_fu.h.

Generated on Sat Aug 7 22:47:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/version_no.h File Reference

WinCvs/version_no.h File Reference

Go to the source code of this file.

Defines

#define | WINCVS_PRODUCT_MAJOR 1
#define | WINCVS_PRODUCT_MINOR 3
#define | WINCVS_PRODUCT_PATCHLEVEL 20
#define | WINCVS_FILE_MAJOR WINCVS_PRODUCT_MAJOR
#define | WINCVS_FILE_MINOR WINCVS_PRODUCT_MINOR
#define | WINCVS_FILE_PATCHLEVEL WINCVS_PRODUCT_PATCHLEVEL
#define | WINCVS_BUILD 1
#define | WINCVS_BETA_RELEASE
#define | WINCVS_PRIVATE_BUILD "Local"
#define | WINCVS_OFFICIAL_DISTRIBUTION

Define Documentation

#define WINCVS_BETA_RELEASE

Definition at line 53 of file version_no.h.

#define WINCVS_BUILD 1

Definition at line 40 of file version_no.h.

#define WINCVS_FILE_MAJOR WINCVS_PRODUCT_MAJOR

Definition at line 33 of file version_no.h.

#define WINCVS_FILE_MINOR WINCVS_PRODUCT_MINOR

Definition at line 34 of file version_no.h.

#define WINCVS_FILE_PATCHLEVEL WINCVS_PRODUCT_PATCHLEVEL

Definition at line 35 of file version_no.h.

#define WINCVS_OFFICIAL_DISTRIBUTION

Definition at line 56 of file version_no.h.

#define WINCVS_PRIVATE_BUILD "Local"

Definition at line 54 of file version_no.h.

#define WINCVS_PRODUCT_MAJOR 1

Definition at line 29 of file version_no.h.

#define WINCVS_PRODUCT_MINOR 3

Definition at line 30 of file version_no.h.

#define WINCVS_PRODUCT_PATCHLEVEL 20

Definition at line 31 of file version_no.h.

Generated on Sat Aug 7 22:47:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/Win32wstring.hpp File Reference

WinCvs/Win32wstring.hpp File Reference

#include <string>
#include <windows.h>

Include dependency graph for Win32wstring.hpp:

Include dependency graph

Go to the source code of this file.

Classes

class Win32wstring

Generated on Sat Aug 7 22:47:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs.cpp File Reference

WinCvs/wincvs.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "MainFrm.h"
#include "wincvsDoc.h"
#include "GraphDoc.h"
#include "LogFrm.h"
#include "GraphFrm.h"
#include "GraphView.h"
#include "WinCvsBrowser.h"
#include "BrowseFileView.h"
#include "AppGlue.h"
#include "CvsPrefs.h"
#include "AppConsole.h"
#include "Splash.h"
#include "MacrosSetup.h"
#include "MultiString.h"
#include "CvsCommands.h"
#include "Authen.h"
#include "TclGlue.h"
#include "PythonGlue.h"
#include "BrowserBar.h"
#include "FileTraversal.h"
#include "MakeSurePathExists.h"
#include "cvsgui_process.h"
#include "wincvs_winutil.h"
#include "CvsAlert.h"
#include "HHelpSupport.h"
#include <algorithm>
#include <sstream>
#include <string>

Include dependency graph for wincvs.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CLogoutThread
Class to handle auto-logout. More...
class | CAboutDlg

Functions

IMPLEMENT_DYNAMIC (CLogoutThread, CWinThread)
bool | IsValidHandle (HANDLE handle)
void AFXAPI | DDV_CheckPathExists (CDataExchange *pDX, int nIDC, CString &value, bool promptForCreation)
Check the path is valid and prompt to create if not (depending on the promptForCreation parameter).
void AFXAPI | DDV_CheckCVSROOT (CDataExchange *pDX, CString &value)
Check whether the CVSROOT entered is valid, correct if not...
void AFXAPI | DDX_ComboMString (CDataExchange *pDX, int nIDC, CSmartComboBox &combo)
void AFXAPI | DDV_MinChars (CDataExchange *pDX, CString const &value, int nChars)
Verify the entry has at least nChars characters.

Variables

const char * | gAuthors []
Array of authors names.
CLogoutThread * | gLogoutThread = NULL
Logout thread pointer.
CWincvsApp theApp
const CLSID | clsid

Function Documentation

void AFXAPI DDV_CheckCVSROOT | ( | CDataExchange * | pDX,
 |  | CString & | value
 | ) |

Check whether the CVSROOT entered is valid, correct if not...

Definition at line 825 of file wincvs.cpp.

References BUTTONTITLE_NO, BUTTONTITLE_YES, kCvsAlertOKButton, kCvsAlertQuestionIcon, and CvsAlert::ShowAlert().

00826 {
00827     // Check after the trailing white spaces - often an unwanted result of copy-paste
00828     if( pDX->m_bSaveAndValidate )
00829     {
00830         CString trimmedValue(value);
00831         trimmedValue.TrimRight();
00832
00833         if( trimmedValue.GetLength() != value.GetLength() )
00834         {
00835             CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00836                 "Do you want to trim trailing spaces?", "The CVSROOT value contains the trailing spaces.",
00837                 BUTTONTITLE_YES, BUTTONTITLE_NO);
00838
00839             if( cvsAlert.ShowAlert() == kCvsAlertOKButton )
00840             {
00841                 value = trimmedValue;
00842             }
00843         }
00844     }
00845 }

Here is the call graph for this function:

void AFXAPI DDV_CheckPathExists | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CString & | value,
 |  | bool | promptForCreation
 | ) |

Check the path is valid and prompt to create if not (depending on the promptForCreation parameter).

Definition at line 800 of file wincvs.cpp.

References BUTTONTITLE_OK, CompatMakeSurePathExists(), CStr, kCvsAlertWarningIcon, and NULL.

Referenced by CCheckout_MAIN::DoDataExchange(), CGetPrefs_WINCVS::DoDataExchange(), CGetPrefs_CVS::DoDataExchange(), CImport_OPTIONS::DoDataExchange(), and CCmdLine_MAIN::DoDataExchange().

00801 {
00802     if( pDX->m_bSaveAndValidate )
00803     {
00804         if( !CompatMakeSurePathExists(value, false) )
00805         {
00806             if( CStr(value).endsWith(kPathDelimiter) )
00807             {
00808                 value.TrimRight(kPathDelimiter);
00809             }
00810
00811             if( !CompatMakeSurePathExists(value, promptForCreation) )
00812             {
00813                 CvsAlert(kCvsAlertWarningIcon,
00814                     "Cannot find folder: " + value, NULL,
00815                     BUTTONTITLE_OK, NULL).ShowAlert();
00816
00817                 pDX->PrepareEditCtrl(nIDC);
00818                 pDX->Fail();
00819             }
00820         }
00821     }
00822 }

Here is the call graph for this function:

void AFXAPI DDV_MinChars | ( | CDataExchange * | pDX,
 |  | CString const & | value,
 |  | int | nChars
 | ) |

Verify the entry has at least nChars characters.

Definition at line 961 of file wincvs.cpp.

References BUTTONTITLE_OK, kCvsAlertStopIcon, and NULL.

Referenced by CAnnotate_MAIN::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CCommit_OPTIONS::DoDataExchange(), CEditKeywordDlg::DoDataExchange(), CCvsRootDlg::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CGetPrefs_WINCVS::DoDataExchange(), CGetPrefs_CVS::DoDataExchange(), CImport_MAIN::DoDataExchange(), CInit_MAIN::DoDataExchange(), CItemListDlg::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CLogFilters::DoDataExchange(), CLogin_MAIN::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CTag_MAIN::DoDataExchange(), CUpdateOptions::DoDataExchange(), and CUpdateMerge::DoDataExchange().

00962 {
00963     ASSERT(nChars > 0); // allow them something
00964
00965     if( pDX->m_bSaveAndValidate && value.GetLength() < nChars )
00966     {
00967         CString errorMsg;
00968         errorMsg.Format("Please enter more than %d character%s.", nChars, nChars > 1 ? "s" : "");
00969
00970         CvsAlert(kCvsAlertStopIcon,
00971             errorMsg, NULL,
00972             BUTTONTITLE_OK, NULL).ShowAlert();
00973
00974         pDX->Fail();
00975     }
00976 }

void AFXAPI DDX_ComboMString | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CSmartComboBox & | combo
 | ) |

Smart combo box DDX routine

Parameters:
pDX | Date exchange
nIDC | Control ID
combo | Smart combo box
Returns:
true on success, false otherwise
Note:
If pDX passed as NULL then the combo is populated
Definition at line 855 of file wincvs.cpp.

References TKeyString< delimiter >::Concatenate(), CStr, USmartCombo::GetItems(), USmartCombo::GetKeyword(), TMString< T >::GetList(), CSmartComboBox::GetWindowText(), USmartCombo::HasFeature(), TMString< T >::Insert(), NULL, and TKeyString< delimiter >::Split().

Referenced by CAnnotate_MAIN::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CCommit_OPTIONS::DoDataExchange(), CEditKeywordDlg::DoDataExchange(), CCvsRootDlg::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CFilterSelectionDlg::DoDataExchange(), CGetPrefs_CVS::DoDataExchange(), CImport_MAIN::DoDataExchange(), CImport_OPTIONS::DoDataExchange(), CInit_MAIN::DoDataExchange(), CItemListDlg::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CLogFilters::DoDataExchange(), CLogin_MAIN::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CTag_MAIN::DoDataExchange(), CUpdateOptions::DoDataExchange(), CUpdateMerge::DoDataExchange(), CMultilineEntryDlg::DoDataExchange(), CDiff_MAIN::OnCheck1(), CDiff_MAIN::OnCheck2(), and CAnnotate_MAIN::OnIsdate().

00856 {
00857     CMString* mstr = combo.GetItems();
00858     ASSERT(mstr != NULL);
00859
00860     if( mstr )
00861     {
00862         if( !pDX || !pDX->m_bSaveAndValidate )
00863         {
00864             CString strOldText;
00865             combo.GetWindowText(strOldText);
00866
00867             combo.ResetContent();
00868
00869             const vector<CStr>& list = mstr->GetList();
00870             for(vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00871             {
00872                 if( combo.HasFeature(CSmartComboBox::Feature::Keyword) )
00873                 {
00874                     CMKeyString* pMKeyString = dynamic_cast<CMKeyString*>(combo.GetItems());
00875                     if( pMKeyString )
00876                     {
00877                         CStr key;
00878                         CStr value;
00879
00880                         pMKeyString->Split((*i).c_str(), key, value);
00881                         if( key.compare(combo.GetKeyword()) == 0 )
00882                         {
00883                             combo.AddString(value);
00884                         }
00885                     }
00886                     else
00887                     {
00888                         CKeyString* pKeyString = dynamic_cast<CKeyString*>(combo.GetItems());
00889                         if( pKeyString )
00890                         {
00891                             CStr key;
00892                             CStr value;
00893
00894                             pKeyString->Split((*i).c_str(), key, value);
00895                             if( !value.empty() )
00896                             {
00897                                 if( combo.FindStringExact(-1, value) < 0 )
00898                                 {
00899                                     combo.AddString(value);
00900                                 }
00901                             }
00902                         }
00903                     }
00904                 }
00905                 else
00906                 {
00907                     combo.AddString(*i);
00908                 }
00909             }
00910
00911             combo.SetWindowText(strOldText);
00912         }
00913         else
00914         {
00915             CString editValue;
00916             CString value;
00917
00918             DDX_CBString(pDX, nIDC, editValue);
00919
00920             if( !editValue.IsEmpty() )
00921             {
00922                 if( combo.HasFeature(CSmartComboBox::Feature::Keyword) )
00923                 {
00924                     CMKeyString* pMKeyString = dynamic_cast<CMKeyString*>(combo.GetItems());
00925                     if( pMKeyString )
00926                     {
00927                         CStr mapValue;
00928                         pMKeyString->Concatenate(mapValue, combo.GetKeyword(), editValue);
00929
00930                         value = mapValue;
00931                     }
00932                     else
00933                     {
00934                         CKeyString* pKeyString = dynamic_cast<CKeyString*>(combo.GetItems());
00935                         if( pKeyString )
00936                         {
00937                             CStr mapValue;
00938                             pKeyString->Concatenate(mapValue, combo.GetKeyword(), editValue);
00939
00940                             value = mapValue;
00941                         }
00942                     }
00943                 }
00944                 else
00945                 {
00946                     value = editValue;
00947                 }
00948
00949                 const vector<CStr>& list = mstr->GetList();
00950                 if( !(std::find(list.begin(), list.end(), CStr(value)) != list.end()) )
00951                 {
00952                     mstr->Insert(value);
00953                     combo.AddString(editValue);
00954                 }
00955             }
00956         }
00957     }
00958 }

Here is the call graph for this function:

IMPLEMENT_DYNAMIC | ( | CLogoutThread | ,
 |  | CWinThread |
 | ) |

bool IsValidHandle ( HANDLE handle )

Definition at line 235 of file wincvs.cpp.

References NULL.

Referenced by CWincvsApp::InitInstance().

00236 {
00237     HANDLE dupedHandle = NULL;
00238
00239     /*
00240      * GetFileType() returns FILE_TYPE_UNKNOWN for invalid handles.
00241      */
00242
00243     if( GetFileType(handle) == FILE_TYPE_UNKNOWN )
00244     {
00245         if( !DuplicateHandle(GetCurrentProcess(),
00246             handle,
00247             GetCurrentProcess(),
00248             &dupedHandle,
00249             0,
00250             FALSE,
00251             DUPLICATE_SAME_ACCESS) )
00252         {
00253             /*
00254             * Unable to make a duplicate. It's definately invalid at this point
00255             */
00256
00257             return false;
00258         }
00259
00260         /*
00261         * Use structured exception handling (Win32 SEH) to protect the close
00262         * of this duped handle which might throw EXCEPTION_INVALID_HANDLE.
00263         */
00264         __try
00265         {
00266             CloseHandle(dupedHandle);
00267         }
00268         __except(EXCEPTION_EXECUTE_HANDLER)
00269         {
00270             /*
00271             * Definately an invalid handle.  So, therefore, the original
00272             * is invalid also.
00273             */
00274
00275             return false;
00276         }
00277     }
00278
00279     return true;
00280 }

Variable Documentation

const CLSID clsid [static]

Initial value:

{ 0xd2d77dc2, 0x8299, 0x11d1, { 0x89, 0x49, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 } }
Definition at line 221 of file wincvs.cpp.

const char* gAuthors[]

Initial value:

{
    "Alexandre Parenteau <aubonbeurre@hotmail.com>",
    "Jens Miltner <jum@mac.com>",
    "Jerzy Kaczorowski <kaczoroj@hotmail.com>",
    "Karl-Heinz Bruenen <gcvs@bruenen-net.de>",
    "Oliver Giesen <ogware@gmx.net>"
}
Array of authors names.

Definition at line 64 of file wincvs.cpp.

Referenced by CWincvsApp::OnAppCredits().

CLogoutThread* gLogoutThread = NULL [static]

Logout thread pointer.

Definition at line 173 of file wincvs.cpp.

Referenced by CWincvsApp::InitInstance(), and CWincvsApp::SaveAllModified().

CWincvsApp theApp

Definition at line 215 of file wincvs.cpp.

Generated on Sat Aug 7 22:47:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs.h File Reference

WinCvs/wincvs.h File Reference

#include "resource.h"
#include "MultiString.h"
#include "SmartComboBox.h"
#include "cvsgui_process.h"

Include dependency graph for wincvs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CWincvsApp

Defines

#define | AFX_WINCVS_H__D2D77DC7_8299_11D1_8949_444553540000__INCLUDED_

Functions

void AFXAPI | DDV_CheckPathExists (CDataExchange *pDX, int nIDC, CString &value, bool promptForCreation=true)
Check the path is valid and prompt to create if not (depending on the promptForCreation parameter).
void AFXAPI | DDV_MinChars (CDataExchange *pDX, CString const &value, int nChars)
Verify the entry has at least nChars characters.
void AFXAPI | DDV_CheckCVSROOT (CDataExchange *pDX, CString &value)
Check whether the CVSROOT entered is valid, correct if not...
void AFXAPI | DDX_ComboMString (CDataExchange *pDX, int nIDC, CSmartComboBox &combo)

Define Documentation

#define AFX_WINCVS_H__D2D77DC7_8299_11D1_8949_444553540000__INCLUDED_

Definition at line 25 of file wincvs.h.

Function Documentation

void AFXAPI DDV_CheckCVSROOT | ( | CDataExchange * | pDX,
 |  | CString & | value
 | ) |

Check whether the CVSROOT entered is valid, correct if not...

Definition at line 825 of file wincvs.cpp.

References BUTTONTITLE_NO, BUTTONTITLE_YES, kCvsAlertOKButton, kCvsAlertQuestionIcon, and CvsAlert::ShowAlert().

00826 {
00827     // Check after the trailing white spaces - often an unwanted result of copy-paste
00828     if( pDX->m_bSaveAndValidate )
00829     {
00830         CString trimmedValue(value);
00831         trimmedValue.TrimRight();
00832
00833         if( trimmedValue.GetLength() != value.GetLength() )
00834         {
00835             CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00836                 "Do you want to trim trailing spaces?", "The CVSROOT value contains the trailing spaces.",
00837                 BUTTONTITLE_YES, BUTTONTITLE_NO);
00838
00839             if( cvsAlert.ShowAlert() == kCvsAlertOKButton )
00840             {
00841                 value = trimmedValue;
00842             }
00843         }
00844     }
00845 }

Here is the call graph for this function:

void AFXAPI DDV_CheckPathExists | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CString & | value,
 |  | bool | promptForCreation = true
 | ) |

Check the path is valid and prompt to create if not (depending on the promptForCreation parameter).

Definition at line 800 of file wincvs.cpp.

References BUTTONTITLE_OK, CompatMakeSurePathExists(), CStr, kCvsAlertWarningIcon, and NULL.

Referenced by CCmdLine_MAIN::DoDataExchange(), CImport_OPTIONS::DoDataExchange(), CGetPrefs_CVS::DoDataExchange(), CGetPrefs_WINCVS::DoDataExchange(), and CCheckout_MAIN::DoDataExchange().

00801 {
00802     if( pDX->m_bSaveAndValidate )
00803     {
00804         if( !CompatMakeSurePathExists(value, false) )
00805         {
00806             if( CStr(value).endsWith(kPathDelimiter) )
00807             {
00808                 value.TrimRight(kPathDelimiter);
00809             }
00810
00811             if( !CompatMakeSurePathExists(value, promptForCreation) )
00812             {
00813                 CvsAlert(kCvsAlertWarningIcon,
00814                     "Cannot find folder: " + value, NULL,
00815                     BUTTONTITLE_OK, NULL).ShowAlert();
00816
00817                 pDX->PrepareEditCtrl(nIDC);
00818                 pDX->Fail();
00819             }
00820         }
00821     }
00822 }

Here is the call graph for this function:

void AFXAPI DDV_MinChars | ( | CDataExchange * | pDX,
 |  | CString const & | value,
 |  | int | nChars
 | ) |

Verify the entry has at least nChars characters.

Definition at line 961 of file wincvs.cpp.

References BUTTONTITLE_OK, kCvsAlertStopIcon, and NULL.

Referenced by CUpdateMerge::DoDataExchange(), CUpdateOptions::DoDataExchange(), CTag_MAIN::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CLogin_MAIN::DoDataExchange(), CLogFilters::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CItemListDlg::DoDataExchange(), CInit_MAIN::DoDataExchange(), CImport_MAIN::DoDataExchange(), CGetPrefs_CVS::DoDataExchange(), CGetPrefs_WINCVS::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CCvsRootDlg::DoDataExchange(), CEditKeywordDlg::DoDataExchange(), CCommit_OPTIONS::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), and CAnnotate_MAIN::DoDataExchange().

00962 {
00963     ASSERT(nChars > 0); // allow them something
00964
00965     if( pDX->m_bSaveAndValidate && value.GetLength() < nChars )
00966     {
00967         CString errorMsg;
00968         errorMsg.Format("Please enter more than %d character%s.", nChars, nChars > 1 ? "s" : "");
00969
00970         CvsAlert(kCvsAlertStopIcon,
00971             errorMsg, NULL,
00972             BUTTONTITLE_OK, NULL).ShowAlert();
00973
00974         pDX->Fail();
00975     }
00976 }

void AFXAPI DDX_ComboMString | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CSmartComboBox & | combo
 | ) |

Smart combo box DDX routine

Parameters:
pDX | Date exchange
nIDC | Control ID
combo | Smart combo box
Returns:
true on success, false otherwise
Note:
If pDX passed as NULL then the combo is populated
Definition at line 855 of file wincvs.cpp.

References TKeyString< delimiter >::Concatenate(), CStr, USmartCombo::GetItems(), USmartCombo::GetKeyword(), TMString< T >::GetList(), CSmartComboBox::GetWindowText(), USmartCombo::HasFeature(), TMString< T >::Insert(), NULL, and TKeyString< delimiter >::Split().

Referenced by CMultilineEntryDlg::DoDataExchange(), CUpdateMerge::DoDataExchange(), CUpdateOptions::DoDataExchange(), CTag_MAIN::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CLogin_MAIN::DoDataExchange(), CLogFilters::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CItemListDlg::DoDataExchange(), CInit_MAIN::DoDataExchange(), CImport_OPTIONS::DoDataExchange(), CImport_MAIN::DoDataExchange(), CGetPrefs_CVS::DoDataExchange(), CFilterSelectionDlg::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CCvsRootDlg::DoDataExchange(), CEditKeywordDlg::DoDataExchange(), CCommit_OPTIONS::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CAnnotate_MAIN::DoDataExchange(), CDiff_MAIN::OnCheck1(), CDiff_MAIN::OnCheck2(), and CAnnotate_MAIN::OnIsdate().

00856 {
00857     CMString* mstr = combo.GetItems();
00858     ASSERT(mstr != NULL);
00859
00860     if( mstr )
00861     {
00862         if( !pDX || !pDX->m_bSaveAndValidate )
00863         {
00864             CString strOldText;
00865             combo.GetWindowText(strOldText);
00866
00867             combo.ResetContent();
00868
00869             const vector<CStr>& list = mstr->GetList();
00870             for(vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00871             {
00872                 if( combo.HasFeature(CSmartComboBox::Feature::Keyword) )
00873                 {
00874                     CMKeyString* pMKeyString = dynamic_cast<CMKeyString*>(combo.GetItems());
00875                     if( pMKeyString )
00876                     {
00877                         CStr key;
00878                         CStr value;
00879
00880                         pMKeyString->Split((*i).c_str(), key, value);
00881                         if( key.compare(combo.GetKeyword()) == 0 )
00882                         {
00883                             combo.AddString(value);
00884                         }
00885                     }
00886                     else
00887                     {
00888                         CKeyString* pKeyString = dynamic_cast<CKeyString*>(combo.GetItems());
00889                         if( pKeyString )
00890                         {
00891                             CStr key;
00892                             CStr value;
00893
00894                             pKeyString->Split((*i).c_str(), key, value);
00895                             if( !value.empty() )
00896                             {
00897                                 if( combo.FindStringExact(-1, value) < 0 )
00898                                 {
00899                                     combo.AddString(value);
00900                                 }
00901                             }
00902                         }
00903                     }
00904                 }
00905                 else
00906                 {
00907                     combo.AddString(*i);
00908                 }
00909             }
00910
00911             combo.SetWindowText(strOldText);
00912         }
00913         else
00914         {
00915             CString editValue;
00916             CString value;
00917
00918             DDX_CBString(pDX, nIDC, editValue);
00919
00920             if( !editValue.IsEmpty() )
00921             {
00922                 if( combo.HasFeature(CSmartComboBox::Feature::Keyword) )
00923                 {
00924                     CMKeyString* pMKeyString = dynamic_cast<CMKeyString*>(combo.GetItems());
00925                     if( pMKeyString )
00926                     {
00927                         CStr mapValue;
00928                         pMKeyString->Concatenate(mapValue, combo.GetKeyword(), editValue);
00929
00930                         value = mapValue;
00931                     }
00932                     else
00933                     {
00934                         CKeyString* pKeyString = dynamic_cast<CKeyString*>(combo.GetItems());
00935                         if( pKeyString )
00936                         {
00937                             CStr mapValue;
00938                             pKeyString->Concatenate(mapValue, combo.GetKeyword(), editValue);
00939
00940                             value = mapValue;
00941                         }
00942                     }
00943                 }
00944                 else
00945                 {
00946                     value = editValue;
00947                 }
00948
00949                 const vector<CStr>& list = mstr->GetList();
00950                 if( !(std::find(list.begin(), list.end(), CStr(value)) != list.end()) )
00951                 {
00952                     mstr->Insert(value);
00953                     combo.AddString(editValue);
00954                 }
00955             }
00956         }
00957     }
00958 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:47:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs.odl File Reference

WinCvs/wincvs.odl File Reference

Go to the source code of this file.

Namespaces

namespace | Wincvs

Classes

interface | Wincvs::IWincvs
class | Wincvs::Document

Functions

importlib ("stdole32.tlb")

Function Documentation

importlib ( "stdole32.tlb" )

Generated on Sat Aug 7 22:47:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs_winutil.cpp File Reference

WinCvs/wincvs_winutil.cpp File Reference

#include "stdafx.h"
#include "wincvs_winutil.h"
#include "MultiString.h"
#include "wincvs.h"
#include "MainFrm.h"
#include "CustomizeMenus.h"
#include "CvsPrefs.h"
#include "CvsCommands.h"
#include "AppConsole.h"

Include dependency graph for wincvs_winutil.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | MAX_UNLINK_RETRY 50
Maximum retry number for fixed unlink function.

Functions

CWnd * | FindNextSiblingWindow (CWnd *pWnd, BOOL CheckTabStop)
CWnd * | FindNextChildWindow (CWnd *pWnd, BOOL CheckTabStop)
CWnd * | GetNextParentWindow (CWnd *pWnd)
CWnd * | FindPrevSiblingWindow (CWnd *pWnd, BOOL CheckTabStop)
CWnd * | GetPrevParentWindow (CWnd *pWnd)
CWnd * | GetEndOfDecendantWindow (CWnd *pWnd)
BOOL | IsTargetWindow (CWnd *pWnd, BOOL CheckTabStop)
CWnd * | FindNextWindow (CWnd *pWnd, BOOL CheckTabStop)
CWnd * | FindPrevWindow (CWnd *pWnd, BOOL CheckTabStop)
void | UpdateUIMenu (CMenu *pMyMenu, CView *pThis)
CMenu * | GetSubCMenu (int nStartId, CView *pThis)
Return the menu which has the cmd nStartId.
CMenu * | _GetMenuEntryRecurs (CMenu *menu, int nStartId, int &pos)
CMenu * | GetMenuEntry (int nStartId, int &pos)
Return the menu and position of a cmd.
CMenu * | GetTopPopupMenu (const char *menuString)
Get the popup menu given the popup menu string.
bool IsLargeFonts ()
bool IsHideCommandKeyPressed ()
DWORD | SetListCtrlExtendedStyle (CListCtrl *pListCtrl, const DWORD dwExtendedStyle)
BOOL | EnableEditAutoComplete (CEdit *pWnd, const DWORD dwFlags)
void | PostGotoDlgCtrl (CDialog *pDlg, CWnd *pWndCtrl)
bool | CheckLocationDriveType (const char *locationPath, const bool quiet)
CString | FormatMillisecondTime ()
CString | FormatMillisecondTime (LPSYSTEMTIME lpSystemTime)
int | wnt_unlink (const char *filename)

Define Documentation

#define MAX_UNLINK_RETRY 50

Maximum retry number for fixed unlink function.

Definition at line 34 of file wincvs_winutil.cpp.

Referenced by wnt_unlink().

Function Documentation

CMenu* _GetMenuEntryRecurs | ( | CMenu * | menu,
 |  | int | nStartId,
 |  | int & | pos
 | ) |

Definition at line 302 of file wincvs_winutil.cpp.

Referenced by GetMenuEntry().

00303 {
00304     if( menu == 0L )
00305         return 0l;
00306
00307     for(UINT iPos = 0; iPos < menu->GetMenuItemCount(); iPos++)
00308     {
00309         UINT id = menu->GetMenuItemID(iPos);
00310         if( id == (UINT)nStartId )
00311         {
00312             pos = iPos;
00313             return menu;
00314         }
00315
00316         if( id == (UINT)-1 )
00317         {
00318             CMenu* res = _GetMenuEntryRecurs(menu->GetSubMenu(iPos), nStartId, pos);
00319             if( res != 0L )
00320                 return res;
00321         }
00322     }
00323
00324     return 0L;
00325 }

bool CheckLocationDriveType | ( | const char * | locationPath,
 |  | const bool | quiet
 | ) |

Check the sandbox drive type and optionally print the warning if it's not a fixed local drive

Parameters:
locationPath | Location path to check
quiet | true to prevent error logging, false to report warnings
Returns:
true if location drive is acceptable, false otherwise
Definition at line 447 of file wincvs_winutil.cpp.

References CStr, kBlue, kBold, kNL, kNormal, kRed, and NULL.

Referenced by CMainFrame::ChangeLocation(), CWincvsApp::InitInstance(), and CWincvsDoc::OnBrowserOpen().

00448 {
00449     bool res = false;
00450
00451     char drive[_MAX_DRIVE] = { 0 };
00452     const char* warningMessage = "";
00453
00454     _splitpath(locationPath, drive, NULL, NULL, NULL);
00455
00456     if( strlen(drive) )
00457     {
00458         CStr rootPathName = drive;
00459         if( !rootPathName.endsWith(kPathDelimiter) )
00460         {
00461             rootPathName << kPathDelimiter;
00462         }
00463
00464         const UINT driveType = GetDriveType(rootPathName.c_str());
00465         switch( driveType )
00466         {
00467         case DRIVE_FIXED:
00468             res = true;
00469             break;
00470         default:
00471             ASSERT(FALSE); // Incorrect return
00472         case DRIVE_UNKNOWN:
00473             warningMessage = "Warning: Unable to detect drive type";
00474             break;
00475         case DRIVE_NO_ROOT_DIR:
00476             warningMessage = "Warning: Invalid drive root path, there might be no volume mounted at the path";
00477             break;
00478         case DRIVE_REMOVABLE:
00479             warningMessage = "Warning: Using removable drive may cause performance decrease";
00480             break;
00481         case DRIVE_REMOTE:
00482             warningMessage = "Warning: Using remote (network) drive may cause file system errors and performance decrease";
00483             break;
00484         case DRIVE_CDROM:
00485             warningMessage = "Warning: Using CD-ROM drive may cause performance decrease";
00486             break;
00487         case DRIVE_RAMDISK:
00488             warningMessage = "Warning: Using RAM disk drive may cause file(s) loss";
00489             break;
00490         }
00491     }
00492     else
00493     {
00494         // UNC path
00495         if( strlen(locationPath) >= 2 &&
00496             locationPath[0] == '\\' && locationPath[1] == '\\' )
00497         {
00498             warningMessage = "Warning: Using remote (network) drive may cause file system errors and performance decrease";
00499         }
00500     }
00501
00502     if( !res && !quiet && strlen(warningMessage) )
00503     {
00504         CColorConsole out;
00505         out << kRed << kBold << warningMessage << kNormal << kNL;
00506         out << kBlue << kBold << "Use local fixed drives for best safety and high performance" << kNormal << kNL;
00507     }
00508
00509     return res;
00510 }

BOOL EnableEditAutoComplete | ( | CEdit * | pWnd,
 |  | const DWORD | dwFlags
 | ) |

Enable the autocomplete

Parameters:
pWnd | Edit control
dwFlags | Flag for autocomplete
Returns:
TRUE on success, FALSE otherwise
Definition at line 423 of file wincvs_winutil.cpp.

Referenced by CCheckout_MAIN::OnInitDialog(), CGetPrefs_WINCVS::OnInitDialog(), CGetPrefs_CVS::OnInitDialog(), and CCmdLine_MAIN::OnInitDialog().

00424 {
00425     return SUCCEEDED(SHAutoComplete(pWnd->GetSafeHwnd(), dwFlags));
00426 }

CWnd * FindNextChildWindow | ( | CWnd * | pWnd,
 |  | BOOL | CheckTabStop
 | ) |

Definition at line 130 of file wincvs_winutil.cpp.

References FindNextSiblingWindow(), IsTargetWindow(), and NULL.

Referenced by FindNextSiblingWindow(), and FindNextWindow().

00131 {
00132     if (pWnd)
00133     {
00134         CWnd* pChildWnd = pWnd->GetTopWindow();
00135         while (pChildWnd)
00136         {
00137             if (IsTargetWindow(pChildWnd, CheckTabStop))
00138                 return pChildWnd;
00139             CWnd* pSiblingWnd = FindNextSiblingWindow(pChildWnd, CheckTabStop);
00140             if (pSiblingWnd)
00141                 return pSiblingWnd;
00142             pChildWnd = pChildWnd->GetTopWindow();
00143         }
00144     }
00145     return NULL;
00146 }

Here is the call graph for this function:

CWnd * FindNextSiblingWindow | ( | CWnd * | pWnd,
 |  | BOOL | CheckTabStop
 | ) |

Definition at line 112 of file wincvs_winutil.cpp.

References FindNextChildWindow(), IsTargetWindow(), and NULL.

Referenced by FindNextChildWindow(), and FindNextWindow().

00113 {
00114     if (pWnd)
00115     {
00116         CWnd* pSiblingWnd = pWnd->GetNextWindow();
00117         while (pSiblingWnd)
00118         {
00119             if (IsTargetWindow(pSiblingWnd, CheckTabStop))
00120                 return pSiblingWnd;
00121             CWnd* pChildWnd = FindNextChildWindow(pSiblingWnd, CheckTabStop);
00122             if (pChildWnd)
00123                 return pChildWnd;
00124             pSiblingWnd = pSiblingWnd->GetNextWindow();
00125         }
00126     }
00127     return NULL;
00128 }

Here is the call graph for this function:

CWnd* FindNextWindow | ( | CWnd * | pWnd,
 |  | BOOL | CheckTabStop
 | ) |

Definition at line 59 of file wincvs_winutil.cpp.

References FindNextChildWindow(), FindNextSiblingWindow(), and GetNextParentWindow().

00060 {
00061     ASSERT_VALID(pWnd);
00062     if (pWnd)
00063     {
00064         CWnd* pNextWnd;
00065         pNextWnd = FindNextChildWindow(pWnd, CheckTabStop);
00066         if (pNextWnd)
00067             return pNextWnd;
00068
00069         pNextWnd = FindNextSiblingWindow(pWnd, CheckTabStop);
00070         if (pNextWnd)
00071             return pNextWnd;
00072
00073         CWnd* pParentWnd = GetNextParentWindow(pWnd);
00074         while ((pParentWnd) && (pNextWnd != pWnd))
00075         {
00076             pNextWnd = FindNextChildWindow(pParentWnd, CheckTabStop);
00077             if (pNextWnd)
00078                 return pNextWnd;
00079             pParentWnd = GetNextParentWindow(pParentWnd);
00080         }
00081     }
00082     return pWnd;
00083 }

Here is the call graph for this function:

CWnd * FindPrevSiblingWindow | ( | CWnd * | pWnd,
 |  | BOOL | CheckTabStop
 | ) |

Definition at line 187 of file wincvs_winutil.cpp.

References IsTargetWindow(), and NULL.

Referenced by FindPrevWindow().

00188 {
00189     if (pWnd)
00190     {
00191         CWnd* pSiblingWnd = pWnd->GetWindow(GW_HWNDPREV);
00192         while (pSiblingWnd)
00193         {
00194             if (IsTargetWindow(pSiblingWnd, CheckTabStop))
00195                 return pSiblingWnd;
00196             pSiblingWnd = pSiblingWnd->GetWindow(GW_HWNDPREV);
00197         }
00198     }
00199     return NULL;
00200 }

Here is the call graph for this function:

CWnd* FindPrevWindow | ( | CWnd * | pWnd,
 |  | BOOL | CheckTabStop
 | ) |

Definition at line 148 of file wincvs_winutil.cpp.

References FindPrevSiblingWindow(), GetEndOfDecendantWindow(), GetPrevParentWindow(), IsTargetWindow(), and NULL.

00149 {
00150     ASSERT_VALID(pWnd);
00151     if (pWnd)
00152     {
00153         CWnd* pWndCrntLevel = pWnd;
00154         while (TRUE)
00155         {
00156             CWnd* pFoundWnd;
00157             pFoundWnd = FindPrevSiblingWindow(pWndCrntLevel, CheckTabStop);
00158             if (pFoundWnd)
00159                 return pFoundWnd;
00160             pWndCrntLevel = GetPrevParentWindow(pWndCrntLevel);
00161             if (!pWndCrntLevel)
00162             {
00163                 pFoundWnd = GetEndOfDecendantWindow(pWnd->GetParentFrame());
00164                 if (IsTargetWindow(pFoundWnd, CheckTabStop))
00165                     return pFoundWnd;
00166                 pWndCrntLevel = pFoundWnd;
00167             }
00168         }
00169     }
00170     return NULL;
00171 }

Here is the call graph for this function:

CString FormatMillisecondTime ( LPSYSTEMTIME lpSystemTime )

Format time string with millisecond precision

Parameters:
lpSystemTime Optional parameter to format the time for, if NULL the local time will be used
Returns:
Formatted time string
Definition at line 535 of file wincvs_winutil.cpp.

References NULL.

00536 {
00537     CString res;
00538
00539     ASSERT(lpSystemTime != NULL); // Invalid pointer
00540
00541     res.Format("%02d:%02d:%02d.%03d",
00542         lpSystemTime->wHour, lpSystemTime->wMinute, lpSystemTime->wSecond, lpSystemTime->wMilliseconds);
00543
00544     return res;
00545 }

CString FormatMillisecondTime ( )

Format time string with millisecond precision

Returns:
Formatted time string
Note:
Local time obtained using GetLocalTime API
Definition at line 517 of file wincvs_winutil.cpp.
00518 {
00519     CString res;
00520
00521     SYSTEMTIME systemTime = { 0 };
00522     GetLocalTime(&systemTime);
00523
00524     res.Format("%02d:%02d:%02d.%03d",
00525         systemTime.wHour, systemTime.wMinute, systemTime.wSecond, systemTime.wMilliseconds);
00526
00527     return res;
00528 }

CWnd * GetEndOfDecendantWindow ( CWnd * pWnd )

Definition at line 202 of file wincvs_winutil.cpp.

Referenced by FindPrevWindow().

00203 {
00204     CWnd* pTmpWnd = pWnd;
00205     CWnd* pPreTmpWnd;
00206     while (pTmpWnd)
00207     {
00208         pPreTmpWnd = pTmpWnd;
00209         pTmpWnd = pTmpWnd->GetWindow(GW_CHILD);
00210         if (pTmpWnd)
00211         {
00212             pPreTmpWnd = pTmpWnd;
00213             pTmpWnd = pTmpWnd->GetWindow(GW_HWNDLAST);
00214         }
00215     }
00216     return pPreTmpWnd;
00217 }

CMenu* GetMenuEntry | ( | int | nStartId,
 |  | int & | pos
 | ) |

Return the menu and position of a cmd.

Definition at line 328 of file wincvs_winutil.cpp.

References _GetMenuEntryRecurs(), and NULL.

Referenced by cvsgui_GetTopMacroAdminMenu(), and cvsgui_GetTopMacroSelectionMenu().

00329 {
00330     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00331     ASSERT(pTopMenu != NULL);
00332
00333     return _GetMenuEntryRecurs(pTopMenu, nStartId, pos);
00334 }

Here is the call graph for this function:

CWnd * GetNextParentWindow ( CWnd * pWnd )

Definition at line 85 of file wincvs_winutil.cpp.

References NULL.

Referenced by FindNextWindow().

00086 {
00087     if (pWnd)
00088     {
00089         if (pWnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))
00090             return pWnd->GetTopWindow();
00091
00092         CFrameWnd* pFrameWnd = pWnd->GetParentFrame();
00093         ASSERT_VALID(pFrameWnd);
00094         CWnd* pParentWnd = pWnd->GetParent();
00095         ASSERT_VALID(pParentWnd);
00096
00097         CWnd* pCrntWnd;
00098         BOOL bFound = FALSE;
00099         while ((!bFound) && (pParentWnd != pFrameWnd))
00100         {
00101             pCrntWnd = pParentWnd->GetNextWindow();
00102             if (pCrntWnd)
00103                 bFound = TRUE;
00104             else
00105                 pParentWnd = pParentWnd->GetParent();
00106         }
00107         return (bFound) ? pCrntWnd : pParentWnd->GetTopWindow();
00108     }
00109     return NULL;
00110 }

CWnd * GetPrevParentWindow ( CWnd * pWnd )

Definition at line 173 of file wincvs_winutil.cpp.

References NULL.

Referenced by FindPrevWindow().

00174 {
00175     if (pWnd)
00176     {
00177         if (!pWnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))
00178         {
00179             CWnd* pParentWnd = pWnd->GetParent();
00180             ASSERT_VALID(pParentWnd);
00181             return pParentWnd;
00182         }
00183     }
00184     return NULL;
00185 }

CMenu* GetSubCMenu | ( | int | nStartId,
 |  | CView * | pThis
 | ) |

Return the menu which has the cmd nStartId.

Definition at line 275 of file wincvs_winutil.cpp.

References NULL, and UpdateUIMenu().

00276 {
00277     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00278     ASSERT(pTopMenu != 0L);
00279     if( pTopMenu == 0L )
00280         return NULL;
00281
00282     CMenu* pMyMenu=NULL;
00283     for(int iPos = pTopMenu->GetMenuItemCount()-1; iPos >= 0; iPos--)
00284     {
00285         CMenu* pMenu = pTopMenu->GetSubMenu(iPos);
00286         if( pMenu && pMenu->GetMenuItemID(0) == (UINT)nStartId )
00287         {
00288             pMyMenu = pMenu;
00289             break;
00290         }
00291     }
00292
00293     ASSERT(pMyMenu != 0L);
00294     if( pMyMenu == 0L )
00295         return NULL;
00296
00297     UpdateUIMenu(pMyMenu, pThis);
00298
00299     return pMyMenu;
00300 }

Here is the call graph for this function:

CMenu* GetTopPopupMenu ( const char * menuString )

Get the popup menu given the popup menu string.

Definition at line 337 of file wincvs_winutil.cpp.

References NULL.

Referenced by CGraphView::OnContextMenu().

00338 {
00339     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00340     if( pTopMenu == 0L )
00341     {
00342         ASSERT(FALSE);  // No top level menu
00343         return NULL;
00344     }
00345
00346     const int topMenuItemCount = (int)pTopMenu->GetMenuItemCount();
00347     CString popupString;
00348
00349     for(int nIndex = 0; nIndex < topMenuItemCount; nIndex++)
00350     {
00351         pTopMenu->GetMenuString(nIndex, popupString, MF_BYPOSITION);
00352         if( menuString == popupString )
00353         {
00354             // Found
00355             return pTopMenu->GetSubMenu(nIndex);
00356         }
00357     }
00358
00359     // Not found
00360     return NULL;
00361 }

bool IsHideCommandKeyPressed ( )

Check whether the hide command dialog key is pressed

Returns:
true if hiding key pressed, false otherwise
Note:
The hiding key is determined in the preferences and it can be either Shift or Ctrl
Definition at line 395 of file wincvs_winutil.cpp.

References gCvsPrefs, and CvsPrefs::HideCommandDlgUseShift().

Referenced by COptionalPropertySheet::DoModal().

00396 {
00397     return ::GetKeyState(gCvsPrefs.HideCommandDlgUseShift() ? VK_SHIFT : VK_CONTROL) < 0;
00398 }

Here is the call graph for this function:

bool IsLargeFonts ( )

Check whether Large Fonts are set in the display settings

Returns:
true if Large Fonts are set, false otherwise
Note:
The actual testing is only done once, but since OS requires a reboot after font's size change it should not be a problem
Definition at line 369 of file wincvs_winutil.cpp.

Referenced by COptionalPropertySheet::GetOptionCheckRect(), and KoDateColumn::GetSetupData().

00370 {
00371     static bool bLargeFonts = false;
00372     static bool defined = false;
00373
00374     if( !defined )
00375     {
00376         defined = true;
00377
00378         HWND hDesktop = ::GetDesktopWindow();
00379         HDC hDesktopDC = ::GetDC(hDesktop);
00380         short nLogPixels = ::GetDeviceCaps(hDesktopDC, LOGPIXELSX);
00381
00382         ::ReleaseDC(hDesktop, hDesktopDC);
00383
00384         bLargeFonts = (nLogPixels > 96);
00385     }
00386
00387     return bLargeFonts;
00388 }

BOOL IsTargetWindow | ( | CWnd * | pWnd,
 |  | BOOL | CheckTabStop
 | ) | [inline]

Definition at line 51 of file wincvs_winutil.cpp.

Referenced by FindNextChildWindow(), FindNextSiblingWindow(), FindPrevSiblingWindow(), and FindPrevWindow().

00052 {
00053     return ((!CheckTabStop) || (WS_TABSTOP & pWnd->GetStyle()));
00054 }

void PostGotoDlgCtrl | ( | CDialog * | pDlg,
 |  | CWnd * | pWndCtrl
 | ) |

Post the message to set the focus in the dialog to given control window

Parameters:
pDlg | Dialog to post the message to
pWndCtrl | Control to set the focus
Returns:
true on success, false otherwise
Definition at line 434 of file wincvs_winutil.cpp.

Referenced by CInit_MAIN::OnInitDialog(), and CLogin_MAIN::OnInitDialog().

00435 {
00436     ASSERT(::IsWindow(pDlg->GetSafeHwnd()));
00437
00438     ::PostMessage(pDlg->GetSafeHwnd(), WM_NEXTDLGCTL, (WPARAM)pWndCtrl->GetSafeHwnd(), 1L);
00439 }

DWORD SetListCtrlExtendedStyle | ( | CListCtrl * | pListCtrl,
 |  | const DWORD | dwExtendedStyle
 | ) |

Set the extended style for the list control

Parameters:
pListCtrl List control to set the style for
dwExtendedStyle
Returns:
The previous extended style of the list control
Definition at line 406 of file wincvs_winutil.cpp.

Referenced by CCvsRootDlg::OnInitDialog(), CDiff_Options::OnInitDialog(), CImportFilterDlg::OnInitDialog(), CItemListDlg::OnInitDialog(), CSelectionDetailsDlg::OnInitDialog(), CTemplateDlg::OnInitDialog(), CCustomizeMenus::OnInitDialog(), and CBrowseFileView::OnInitialUpdate().

00407 {
00408     if( !pListCtrl )
00409     {
00410         ASSERT(FALSE);  // bad pointer
00411         return 0;
00412     }
00413
00414     return pListCtrl->SetExtendedStyle(pListCtrl->GetExtendedStyle() | dwExtendedStyle);
00415 }

void UpdateUIMenu | ( | CMenu * | pMyMenu,
 |  | CView * | pThis
 | ) |

Definition at line 219 of file wincvs_winutil.cpp.

References NULL.

Referenced by GetCustomMenu(), and GetSubCMenu().

00220 {
00221     CCmdUI state;
00222
00223     state.m_pMenu = pMyMenu;
00224     state.m_nIndexMax = pMyMenu->GetMenuItemCount();
00225
00226     for(state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax; state.m_nIndex++)
00227     {
00228         state.m_nID = pMyMenu->GetMenuItemID(state.m_nIndex);
00229         if( state.m_nID == 0 )
00230             continue; // menu separator or invalid cmd - ignore it
00231
00232         ASSERT(state.m_pOther == NULL);
00233         ASSERT(state.m_pMenu != NULL);
00234         if( state.m_nID == (UINT)-1 )
00235         {
00236             // possibly a popup menu, route to first item of that popup
00237             state.m_pSubMenu = pMyMenu->GetSubMenu(state.m_nIndex);
00238             if( state.m_pSubMenu == NULL ||
00239                 (state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
00240                 state.m_nID == (UINT)-1 )
00241             {
00242                 continue;       // first item of popup can't be routed to
00243             }
00244
00245             state.DoUpdate(pThis, FALSE);    // popups are never auto disabled
00246         }
00247         else
00248         {
00249             // normal menu item
00250             // Auto enable/disable if frame window has 'm_bAutoMenuEnable'
00251             //    set and command is _not_ a system command.
00252             state.m_pSubMenu = NULL;
00253             state.DoUpdate(pThis, TRUE);
00254         }
00255
00256 #   if 0 /* ??? */
00257         // adjust for menu deletions and additions
00258         UINT nCount = pMyMenu->GetMenuItemCount();
00259         if( nCount < state.m_nIndexMax )
00260         {
00261             state.m_nIndex -= (state.m_nIndexMax - nCount);
00262
00263             while( state.m_nIndex < nCount && pMyMenu->GetMenuItemID(state.m_nIndex) == state.m_nID )
00264             {
00265                 state.m_nIndex++;
00266             }
00267         }
00268
00269         state.m_nIndexMax = nCount;
00270 #   endif
00271     }
00272 }

int wnt_unlink ( const char * filename )

Fixed version of unlink for WIN32

Parameters:
filename File name
Returns:
0 on success, -1 otherwise
Definition at line 552 of file wincvs_winutil.cpp.

References MAX_UNLINK_RETRY.

Referenced by CvsLogParse(), and CTmpFiles::~CTmpFiles().

00553 {
00554     int res = -1;
00555
00556     for(int nIndex = 0; nIndex < MAX_UNLINK_RETRY; nIndex++)
00557     {
00558         res = unlink(filename);
00559         if( res == 0 )
00560         {
00561             break;
00562         }
00563         else if( EACCES != errno )
00564         {
00565             return -1;
00566         }
00567
00568         Sleep(60);
00569     }
00570
00571     return res;
00572 }

Generated on Sat Aug 7 22:48:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs_winutil.h File Reference

WinCvs/wincvs_winutil.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CWndRedrawMngr
Class to support efficient drawing of CWnd based windows by managing window's redraw. More...
class | CWndAutoCommand

Defines

#define | AUTOCOMPLETE_DEFFLAGS (SHACF_FILESYSTEM | SHACF_AUTOAPPEND_FORCE_ON | SHACF_AUTOAPPEND_FORCE_ON | SHACF_USETAB)
Default flag for the autocomplete enabled edit control.

Enumerations

enum {
kCustomBrowserMenu,
kCustomFilesMenu
}
Custom menu enum. More...

Functions

CWnd * | FindNextWindow (CWnd *pWnd, BOOL CheckTabStop=TRUE)
CWnd * | FindPrevWindow (CWnd *pWnd, BOOL CheckTabStop=TRUE)
CMenu * | GetSubCMenu (int nStartId, CView *pThis)
Return the menu which has the cmd nStartId.
CMenu * | GetMenuEntry (int nStartId, int &pos)
Return the menu and position of a cmd.
CMenu * | GetTopPopupMenu (const char *menuString)
Get the popup menu given the popup menu string.
void | UpdateUIMenu (CMenu *pMyMenu, CView *pThis)
bool IsLargeFonts ()
bool IsHideCommandKeyPressed ()
DWORD | SetListCtrlExtendedStyle (CListCtrl *pListCtrl, const DWORD dwExtendedStyle)
BOOL | EnableEditAutoComplete (CEdit *pWnd, const DWORD dwFlags=(SHACF_FILESYSTEM|SHACF_AUTOAPPEND_FORCE_ON|SHACF_AUTOAPPEND_FORCE_ON|SHACF_USETAB))
void | PostGotoDlgCtrl (CDialog *pDlg, CWnd *pWndCtrl)
bool | CheckLocationDriveType (const char *locationPath, const bool quiet=false)
CString | FormatMillisecondTime ()
CString | FormatMillisecondTime (LPSYSTEMTIME lpSystemTime)
int | wnt_unlink (const char *filename)

Define Documentation

#define AUTOCOMPLETE_DEFFLAGS (SHACF_FILESYSTEM | SHACF_AUTOAPPEND_FORCE_ON | SHACF_AUTOAPPEND_FORCE_ON | SHACF_USETAB)

Default flag for the autocomplete enabled edit control.

Definition at line 25 of file wincvs_winutil.h.

Enumeration Type Documentation

anonymous enum

Custom menu enum.

Enumeration values:
kCustomBrowserMenu | Folders browser menu
kCustomFilesMenu | Files browser menu
Definition at line 28 of file wincvs_winutil.h.
00029 {
00030     kCustomBrowserMenu,
00031     kCustomFilesMenu
00032 };

Function Documentation

bool CheckLocationDriveType | ( | const char * | locationPath,
 |  | const bool | quiet
 | ) |

Check the sandbox drive type and optionally print the warning if it's not a fixed local drive

Parameters:
locationPath | Location path to check
quiet | true to prevent error logging, false to report warnings
Returns:
true if location drive is acceptable, false otherwise
Definition at line 447 of file wincvs_winutil.cpp.

References CStr, kBlue, kBold, kNL, kNormal, kRed, and NULL.

Referenced by CMainFrame::ChangeLocation(), CWincvsApp::InitInstance(), and CWincvsDoc::OnBrowserOpen().

00448 {
00449     bool res = false;
00450
00451     char drive[_MAX_DRIVE] = { 0 };
00452     const char* warningMessage = "";
00453
00454     _splitpath(locationPath, drive, NULL, NULL, NULL);
00455
00456     if( strlen(drive) )
00457     {
00458         CStr rootPathName = drive;
00459         if( !rootPathName.endsWith(kPathDelimiter) )
00460         {
00461             rootPathName << kPathDelimiter;
00462         }
00463
00464         const UINT driveType = GetDriveType(rootPathName.c_str());
00465         switch( driveType )
00466         {
00467         case DRIVE_FIXED:
00468             res = true;
00469             break;
00470         default:
00471             ASSERT(FALSE); // Incorrect return
00472         case DRIVE_UNKNOWN:
00473             warningMessage = "Warning: Unable to detect drive type";
00474             break;
00475         case DRIVE_NO_ROOT_DIR:
00476             warningMessage = "Warning: Invalid drive root path, there might be no volume mounted at the path";
00477             break;
00478         case DRIVE_REMOVABLE:
00479             warningMessage = "Warning: Using removable drive may cause performance decrease";
00480             break;
00481         case DRIVE_REMOTE:
00482             warningMessage = "Warning: Using remote (network) drive may cause file system errors and performance decrease";
00483             break;
00484         case DRIVE_CDROM:
00485             warningMessage = "Warning: Using CD-ROM drive may cause performance decrease";
00486             break;
00487         case DRIVE_RAMDISK:
00488             warningMessage = "Warning: Using RAM disk drive may cause file(s) loss";
00489             break;
00490         }
00491     }
00492     else
00493     {
00494         // UNC path
00495         if( strlen(locationPath) >= 2 &&
00496             locationPath[0] == '\\' && locationPath[1] == '\\' )
00497         {
00498             warningMessage = "Warning: Using remote (network) drive may cause file system errors and performance decrease";
00499         }
00500     }
00501
00502     if( !res && !quiet && strlen(warningMessage) )
00503     {
00504         CColorConsole out;
00505         out << kRed << kBold << warningMessage << kNormal << kNL;
00506         out << kBlue << kBold << "Use local fixed drives for best safety and high performance" << kNormal << kNL;
00507     }
00508
00509     return res;
00510 }

BOOL EnableEditAutoComplete | ( | CEdit * | pWnd,
 |  | const DWORD | dwFlags
 | ) |

Enable the autocomplete

Parameters:
pWnd | Edit control
dwFlags | Flag for autocomplete
Returns:
TRUE on success, FALSE otherwise
Definition at line 423 of file wincvs_winutil.cpp.

Referenced by CCmdLine_MAIN::OnInitDialog(), CGetPrefs_CVS::OnInitDialog(), CGetPrefs_WINCVS::OnInitDialog(), and CCheckout_MAIN::OnInitDialog().

00424 {
00425     return SUCCEEDED(SHAutoComplete(pWnd->GetSafeHwnd(), dwFlags));
00426 }

CWnd* FindNextWindow | ( | CWnd * | pWnd,
 |  | BOOL | CheckTabStop = TRUE
 | ) |

Definition at line 59 of file wincvs_winutil.cpp.

References FindNextChildWindow(), FindNextSiblingWindow(), and GetNextParentWindow().

00060 {
00061     ASSERT_VALID(pWnd);
00062     if (pWnd)
00063     {
00064         CWnd* pNextWnd;
00065         pNextWnd = FindNextChildWindow(pWnd, CheckTabStop);
00066         if (pNextWnd)
00067             return pNextWnd;
00068
00069         pNextWnd = FindNextSiblingWindow(pWnd, CheckTabStop);
00070         if (pNextWnd)
00071             return pNextWnd;
00072
00073         CWnd* pParentWnd = GetNextParentWindow(pWnd);
00074         while ((pParentWnd) && (pNextWnd != pWnd))
00075         {
00076             pNextWnd = FindNextChildWindow(pParentWnd, CheckTabStop);
00077             if (pNextWnd)
00078                 return pNextWnd;
00079             pParentWnd = GetNextParentWindow(pParentWnd);
00080         }
00081     }
00082     return pWnd;
00083 }

Here is the call graph for this function:

CWnd* FindPrevWindow | ( | CWnd * | pWnd,
 |  | BOOL | CheckTabStop = TRUE
 | ) |

Definition at line 148 of file wincvs_winutil.cpp.

References FindPrevSiblingWindow(), GetEndOfDecendantWindow(), GetPrevParentWindow(), IsTargetWindow(), and NULL.

00149 {
00150     ASSERT_VALID(pWnd);
00151     if (pWnd)
00152     {
00153         CWnd* pWndCrntLevel = pWnd;
00154         while (TRUE)
00155         {
00156             CWnd* pFoundWnd;
00157             pFoundWnd = FindPrevSiblingWindow(pWndCrntLevel, CheckTabStop);
00158             if (pFoundWnd)
00159                 return pFoundWnd;
00160             pWndCrntLevel = GetPrevParentWindow(pWndCrntLevel);
00161             if (!pWndCrntLevel)
00162             {
00163                 pFoundWnd = GetEndOfDecendantWindow(pWnd->GetParentFrame());
00164                 if (IsTargetWindow(pFoundWnd, CheckTabStop))
00165                     return pFoundWnd;
00166                 pWndCrntLevel = pFoundWnd;
00167             }
00168         }
00169     }
00170     return NULL;
00171 }

Here is the call graph for this function:

CString FormatMillisecondTime ( LPSYSTEMTIME lpSystemTime )

Format time string with millisecond precision

Parameters:
lpSystemTime Optional parameter to format the time for, if NULL the local time will be used
Returns:
Formatted time string
Definition at line 535 of file wincvs_winutil.cpp.

References NULL.

00536 {
00537     CString res;
00538
00539     ASSERT(lpSystemTime != NULL); // Invalid pointer
00540
00541     res.Format("%02d:%02d:%02d.%03d",
00542         lpSystemTime->wHour, lpSystemTime->wMinute, lpSystemTime->wSecond, lpSystemTime->wMilliseconds);
00543
00544     return res;
00545 }

CString FormatMillisecondTime ( )

Format time string with millisecond precision

Returns:
Formatted time string
Note:
Local time obtained using GetLocalTime API
Definition at line 517 of file wincvs_winutil.cpp.
00518 {
00519     CString res;
00520
00521     SYSTEMTIME systemTime = { 0 };
00522     GetLocalTime(&systemTime);
00523
00524     res.Format("%02d:%02d:%02d.%03d",
00525         systemTime.wHour, systemTime.wMinute, systemTime.wSecond, systemTime.wMilliseconds);
00526
00527     return res;
00528 }

CMenu* GetMenuEntry | ( | int | nStartId,
 |  | int & | pos
 | ) |

Return the menu and position of a cmd.

Definition at line 328 of file wincvs_winutil.cpp.

References _GetMenuEntryRecurs(), and NULL.

Referenced by cvsgui_GetTopMacroAdminMenu(), and cvsgui_GetTopMacroSelectionMenu().

00329 {
00330     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00331     ASSERT(pTopMenu != NULL);
00332
00333     return _GetMenuEntryRecurs(pTopMenu, nStartId, pos);
00334 }

Here is the call graph for this function:

CMenu* GetSubCMenu | ( | int | nStartId,
 |  | CView * | pThis
 | ) |

Return the menu which has the cmd nStartId.

Definition at line 275 of file wincvs_winutil.cpp.

References NULL, and UpdateUIMenu().

00276 {
00277     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00278     ASSERT(pTopMenu != 0L);
00279     if( pTopMenu == 0L )
00280         return NULL;
00281
00282     CMenu* pMyMenu=NULL;
00283     for(int iPos = pTopMenu->GetMenuItemCount()-1; iPos >= 0; iPos--)
00284     {
00285         CMenu* pMenu = pTopMenu->GetSubMenu(iPos);
00286         if( pMenu && pMenu->GetMenuItemID(0) == (UINT)nStartId )
00287         {
00288             pMyMenu = pMenu;
00289             break;
00290         }
00291     }
00292
00293     ASSERT(pMyMenu != 0L);
00294     if( pMyMenu == 0L )
00295         return NULL;
00296
00297     UpdateUIMenu(pMyMenu, pThis);
00298
00299     return pMyMenu;
00300 }

Here is the call graph for this function:

CMenu* GetTopPopupMenu ( const char * menuString )

Get the popup menu given the popup menu string.

Definition at line 337 of file wincvs_winutil.cpp.

References NULL.

Referenced by CGraphView::OnContextMenu().

00338 {
00339     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00340     if( pTopMenu == 0L )
00341     {
00342         ASSERT(FALSE);  // No top level menu
00343         return NULL;
00344     }
00345
00346     const int topMenuItemCount = (int)pTopMenu->GetMenuItemCount();
00347     CString popupString;
00348
00349     for(int nIndex = 0; nIndex < topMenuItemCount; nIndex++)
00350     {
00351         pTopMenu->GetMenuString(nIndex, popupString, MF_BYPOSITION);
00352         if( menuString == popupString )
00353         {
00354             // Found
00355             return pTopMenu->GetSubMenu(nIndex);
00356         }
00357     }
00358
00359     // Not found
00360     return NULL;
00361 }

bool IsHideCommandKeyPressed ( )

Check whether the hide command dialog key is pressed

Returns:
true if hiding key pressed, false otherwise
Note:
The hiding key is determined in the preferences and it can be either Shift or Ctrl
Definition at line 395 of file wincvs_winutil.cpp.

References gCvsPrefs, and CvsPrefs::HideCommandDlgUseShift().

Referenced by COptionalPropertySheet::DoModal().

00396 {
00397     return ::GetKeyState(gCvsPrefs.HideCommandDlgUseShift() ? VK_SHIFT : VK_CONTROL) < 0;
00398 }

Here is the call graph for this function:

bool IsLargeFonts ( )

Check whether Large Fonts are set in the display settings

Returns:
true if Large Fonts are set, false otherwise
Note:
The actual testing is only done once, but since OS requires a reboot after font's size change it should not be a problem
Definition at line 369 of file wincvs_winutil.cpp.

Referenced by COptionalPropertySheet::GetOptionCheckRect(), and KoDateColumn::GetSetupData().

00370 {
00371     static bool bLargeFonts = false;
00372     static bool defined = false;
00373
00374     if( !defined )
00375     {
00376         defined = true;
00377
00378         HWND hDesktop = ::GetDesktopWindow();
00379         HDC hDesktopDC = ::GetDC(hDesktop);
00380         short nLogPixels = ::GetDeviceCaps(hDesktopDC, LOGPIXELSX);
00381
00382         ::ReleaseDC(hDesktop, hDesktopDC);
00383
00384         bLargeFonts = (nLogPixels > 96);
00385     }
00386
00387     return bLargeFonts;
00388 }

void PostGotoDlgCtrl | ( | CDialog * | pDlg,
 |  | CWnd * | pWndCtrl
 | ) |

Post the message to set the focus in the dialog to given control window

Parameters:
pDlg | Dialog to post the message to
pWndCtrl | Control to set the focus
Returns:
true on success, false otherwise
Definition at line 434 of file wincvs_winutil.cpp.

Referenced by CLogin_MAIN::OnInitDialog(), and CInit_MAIN::OnInitDialog().

00435 {
00436     ASSERT(::IsWindow(pDlg->GetSafeHwnd()));
00437
00438     ::PostMessage(pDlg->GetSafeHwnd(), WM_NEXTDLGCTL, (WPARAM)pWndCtrl->GetSafeHwnd(), 1L);
00439 }

DWORD SetListCtrlExtendedStyle | ( | CListCtrl * | pListCtrl,
 |  | const DWORD | dwExtendedStyle
 | ) |

Set the extended style for the list control

Parameters:
pListCtrl List control to set the style for
dwExtendedStyle
Returns:
The previous extended style of the list control
Definition at line 406 of file wincvs_winutil.cpp.

Referenced by CCustomizeMenus::OnInitDialog(), CTemplateDlg::OnInitDialog(), CSelectionDetailsDlg::OnInitDialog(), CItemListDlg::OnInitDialog(), CImportFilterDlg::OnInitDialog(), CDiff_Options::OnInitDialog(), CCvsRootDlg::OnInitDialog(), and CBrowseFileView::OnInitialUpdate().

00407 {
00408     if( !pListCtrl )
00409     {
00410         ASSERT(FALSE);  // bad pointer
00411         return 0;
00412     }
00413
00414     return pListCtrl->SetExtendedStyle(pListCtrl->GetExtendedStyle() | dwExtendedStyle);
00415 }

void UpdateUIMenu | ( | CMenu * | pMyMenu,
 |  | CView * | pThis
 | ) |

Definition at line 219 of file wincvs_winutil.cpp.

References NULL.

Referenced by GetCustomMenu(), and GetSubCMenu().

00220 {
00221     CCmdUI state;
00222
00223     state.m_pMenu = pMyMenu;
00224     state.m_nIndexMax = pMyMenu->GetMenuItemCount();
00225
00226     for(state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax; state.m_nIndex++)
00227     {
00228         state.m_nID = pMyMenu->GetMenuItemID(state.m_nIndex);
00229         if( state.m_nID == 0 )
00230             continue; // menu separator or invalid cmd - ignore it
00231
00232         ASSERT(state.m_pOther == NULL);
00233         ASSERT(state.m_pMenu != NULL);
00234         if( state.m_nID == (UINT)-1 )
00235         {
00236             // possibly a popup menu, route to first item of that popup
00237             state.m_pSubMenu = pMyMenu->GetSubMenu(state.m_nIndex);
00238             if( state.m_pSubMenu == NULL ||
00239                 (state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
00240                 state.m_nID == (UINT)-1 )
00241             {
00242                 continue;       // first item of popup can't be routed to
00243             }
00244
00245             state.DoUpdate(pThis, FALSE);    // popups are never auto disabled
00246         }
00247         else
00248         {
00249             // normal menu item
00250             // Auto enable/disable if frame window has 'm_bAutoMenuEnable'
00251             //    set and command is _not_ a system command.
00252             state.m_pSubMenu = NULL;
00253             state.DoUpdate(pThis, TRUE);
00254         }
00255
00256 #   if 0 /* ??? */
00257         // adjust for menu deletions and additions
00258         UINT nCount = pMyMenu->GetMenuItemCount();
00259         if( nCount < state.m_nIndexMax )
00260         {
00261             state.m_nIndex -= (state.m_nIndexMax - nCount);
00262
00263             while( state.m_nIndex < nCount && pMyMenu->GetMenuItemID(state.m_nIndex) == state.m_nID )
00264             {
00265                 state.m_nIndex++;
00266             }
00267         }
00268
00269         state.m_nIndexMax = nCount;
00270 #   endif
00271     }
00272 }

int wnt_unlink ( const char * filename )

Fixed version of unlink for WIN32

Parameters:
filename File name
Returns:
0 on success, -1 otherwise
Definition at line 552 of file wincvs_winutil.cpp.

References MAX_UNLINK_RETRY.

Referenced by CvsLogParse(), and CTmpFiles::~CTmpFiles().

00553 {
00554     int res = -1;
00555
00556     for(int nIndex = 0; nIndex < MAX_UNLINK_RETRY; nIndex++)
00557     {
00558         res = unlink(filename);
00559         if( res == 0 )
00560         {
00561             break;
00562         }
00563         else if( EACCES != errno )
00564         {
00565             return -1;
00566         }
00567
00568         Sleep(60);
00569     }
00570
00571     return res;
00572 }

Generated on Sat Aug 7 22:48:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/WinCvsBrowser.cpp File Reference

WinCvs/WinCvsBrowser.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include "MainFrm.h"
#include "WinCvsBrowser.h"
#include "AppConsole.h"
#include "CvsPrefs.h"
#include "CvsCommands.h"
#include "TclGlue.h"
#include "MacrosSetup.h"
#include "wincvs_winutil.h"
#include "PythonGlue.h"
#include "BrowseViewHandlers.h"
#include "CustomizeMenus.h"
#include "umain.h"
#include "resource.h"

Include dependency graph for WinCvsBrowser.cpp:

Include dependency graph

Go to the source code of this file.

Enumerations

enum {
kIconFolderClosed,
kIconFolderOpened,
kIconFolderCVSClosed,
kIconFolderCVSOpened,
kIconFolderIgnoreClosed,
kIconFolderIgnoreOpened,
kIconFolderLost
}
Folder icons enum. More...

Functions

void | SetIcon (CTreeCtrl &treeCtrl, HTREEITEM item, bool hasCvsInfos, bool expand, EntnodeData *data=0L)
void | OnIgnoreChanged (CObject *obj)
void | OnFilteringChanged (CObject *obj)

Variables

const int | WM_RESETVIEW = WM_APP + 12
Application message to reset the view.
const char * | gDummyFile = "@@@dummy file@@@"
Dummy item text.

Enumeration Type Documentation

anonymous enum

Folder icons enum.

Enumeration values:
kIconFolderClosed | Closed folder
kIconFolderOpened | Opened folder
kIconFolderCVSClosed | Closed CVS folder
kIconFolderCVSOpened | Opened CVS folder
kIconFolderIgnoreClosed | Closed ignored folder
kIconFolderIgnoreOpened | Opened ignored folder
kIconFolderLost | Missing CVS folder
Definition at line 51 of file WinCvsBrowser.cpp.
00052 {
00053     kIconFolderClosed,
00054     kIconFolderOpened,
00055     kIconFolderCVSClosed,
00056     kIconFolderCVSOpened,
00057     kIconFolderIgnoreClosed,
00058     kIconFolderIgnoreOpened,
00059     kIconFolderLost
00060 };

Function Documentation

void OnFilteringChanged ( CObject * obj ) [static]

Filtering changed notification function

Parameters:
obj Browse file view to be notified
Definition at line 136 of file WinCvsBrowser.cpp.
00137 {
00138     ((CWinCvsBrowser*)obj)->OnFilteringChanged();
00139 }

void OnIgnoreChanged ( CObject * obj ) [static]

Ignore changed notification function

Parameters:
obj Browser view to be notified
Definition at line 127 of file WinCvsBrowser.cpp.
00128 {
00129     ((CWinCvsBrowser*)obj)->OnIgnoreChanged();
00130 }

void SetIcon | ( | CTreeCtrl & | treeCtrl,
 |  | HTREEITEM | item,
 |  | bool | hasCvsInfos,
 |  | bool | expand,
 |  | EntnodeData * | data = 0L
 | ) | [static]

Helper method to set the appropriate icon for a given node

Parameters:
treeCtrl | Tree control to set the icon
item | Item handle to set the icon
hasCvsInfos | true for CVS folder, false otherwise
expand | true for expanded folder, false otherwise
data | Node data
Returns:
true on success, false otherwise
Definition at line 77 of file WinCvsBrowser.cpp.

References kIconFolderClosed, kIconFolderCVSClosed, kIconFolderCVSOpened, kIconFolderIgnoreClosed, kIconFolderIgnoreOpened, and kIconFolderOpened.

Referenced by CCJBrowseButton::Create(), CCVSAlert_MAIN::OnInitDialog(), and CCJFlatButton::SetIcon().

00078 {
00079     TV_ITEM pItem;
00080     pItem.hItem = item;
00081     pItem.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
00082     VERIFY(treeCtrl.GetItem(&pItem));
00083
00084     int newImage;
00085     if( data == 0L )
00086     {
00087         if( expand )
00088             newImage = hasCvsInfos ? kIconFolderCVSOpened : kIconFolderOpened;
00089         else
00090             newImage = hasCvsInfos ? kIconFolderCVSClosed : kIconFolderClosed;
00091     }
00092     else
00093     {
00094         if( expand )
00095         {
00096             if( data->IsIgnored() )
00097                 newImage = kIconFolderIgnoreOpened;
00098             else if( data->IsUnknown() )
00099                 newImage = kIconFolderOpened;
00100             else
00101                 newImage = kIconFolderCVSOpened;
00102         }
00103         else
00104         {
00105             if( data->IsIgnored() )
00106                 newImage = kIconFolderIgnoreClosed;
00107             else if( data->IsUnknown() )
00108                 newImage = kIconFolderClosed;
00109             else
00110                 newImage = kIconFolderCVSClosed;
00111         }
00112     }
00113
00114     if( pItem.iImage != newImage )
00115     {
00116         pItem.iImage = newImage;
00117         pItem.iSelectedImage = newImage;
00118         pItem.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
00119         treeCtrl.SetItem(&pItem);
00120     }
00121 }

Variable Documentation

const char* gDummyFile = "@@@dummy file@@@" [static]

Dummy item text.

Definition at line 66 of file WinCvsBrowser.cpp.

const int WM_RESETVIEW = WM_APP + 12 [static]

Application message to reset the view.

Definition at line 63 of file WinCvsBrowser.cpp.

Referenced by CWinCvsBrowser::OnFilteringChanged(), and CWinCvsBrowser::OnIgnoreChanged().

Generated on Sat Aug 7 22:48:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/WinCvsBrowser.h File Reference

WinCvs/WinCvsBrowser.h File Reference

#include <afxcview.h>
#include "CPStr.h"
#include "FileTraversal.h"
#include "BrowseFileView.h"

Include dependency graph for WinCvsBrowser.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CSelectionChangeNotifier
class | TBrowserFillDummy
Class to create an item with a dummy item inside if and only if the folder is not empty. More...
class | TBrowserFill
Class to create an item with all the subdirectories inside for a given path and a root item. More...
class | CWinCvsBrowser

Defines

#define | AFX_WINCVSBROWSER_H__144A4971_CAB4_11D1_BC80_000000000000__INCLUDED_

Define Documentation

#define AFX_WINCVSBROWSER_H__144A4971_CAB4_11D1_BC80_000000000000__INCLUDED_

Definition at line 22 of file WinCvsBrowser.h.

Generated on Sat Aug 7 22:48:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/WinCvsDebug.cpp File Reference

WinCvs/WinCvsDebug.cpp File Reference

#include "stdafx.h"
#include "WinCvsDebug.h"

Include dependency graph for WinCvsDebug.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:48:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/WinCvsDebug.h File Reference

WinCvs/WinCvsDebug.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | WINCVSDEBUG_H_INCLUDED
#define | ENABLE_WINCVSDEBUG 0
WinCvs debugging disabled by default.

Define Documentation

#define ENABLE_WINCVSDEBUG 0

WinCvs debugging disabled by default.

Definition at line 33 of file WinCvsDebug.h.

#define WINCVSDEBUG_H_INCLUDED

Definition at line 28 of file WinCvsDebug.h.

Generated on Sat Aug 7 22:48:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvsDoc.cpp File Reference

WinCvs/wincvsDoc.cpp File Reference

#include "stdafx.h"
#include "wincvs.h"
#include <afxrich.h>
#include "wincvsDoc.h"
#include "CvsCommands.h"
#include "GetPrefs.h"
#include "Authen.h"
#include "CvsPrefs.h"
#include "AppConsole.h"
#include "PromptFiles.h"
#include "WinCvsBrowser.h"
#include "TclGlue.h"
#include "PythonGlue.h"
#include "MacrosSetup.h"
#include "cvsgui_process.h"
#include "Appglue.h"
#include "BrowseViewHandlers.h"
#include "wincvs_winutil.h"
#include "CvsAlert.h"
#include "wincvsView.h"

Include dependency graph for wincvsDoc.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | _afxRichEditCookie

Functions

DWORD CALLBACK | EditStreamCallBack (DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)

Variables

const IID | IID_IWincvs

Function Documentation

DWORD CALLBACK EditStreamCallBack | ( | DWORD | dwCookie,
 |  | LPBYTE | pbBuff,
 |  | LONG | cb,
 |  | LONG * | pcb
 | ) |

Definition at line 153 of file wincvsDoc.cpp.

References _afxRichEditCookie::m_ar, and _afxRichEditCookie::m_dwError.

Referenced by CWincvsDoc::Serialize().

00154 {
00155     _afxRichEditCookie* pCookie = (_afxRichEditCookie*)dwCookie;
00156     CArchive& ar = pCookie->m_ar;
00157     ar.Flush();
00158     DWORD dw = 0;
00159     *pcb = cb;
00160     TRY
00161     {
00162         if (ar.IsStoring())
00163             ar.GetFile()->Write(pbBuff, cb);
00164         else
00165             *pcb = ar.GetFile()->Read(pbBuff, cb);
00166     }
00167     CATCH(CFileException, e)
00168     {
00169         *pcb = 0;
00170         pCookie->m_dwError = (DWORD)e->m_cause;
00171         dw = 1;
00172     }
00173     AND_CATCH_ALL(e)
00174     {
00175         *pcb = 0;
00176         pCookie->m_dwError = (DWORD)CFileException::generic;
00177         dw = 1;
00178     }
00179     END_CATCH_ALL
00180     return dw;
00181 }

Variable Documentation

const IID IID_IWincvs [static]

Initial value:

{ 0xd2d77dc4, 0x8299, 0x11d1, { 0x89, 0x49, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 } }
Definition at line 105 of file wincvsDoc.cpp.

Generated on Sat Aug 7 22:48:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvsDoc.h File Reference

WinCvs/wincvsDoc.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CWincvsDoc

Defines

#define | AFX_WINCVSDOC_H__D2D77DCE_8299_11D1_8949_444553540000__INCLUDED_

Define Documentation

#define AFX_WINCVSDOC_H__D2D77DCE_8299_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file wincvsDoc.h.

Generated on Sat Aug 7 22:48:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvsView.cpp File Reference

WinCvs/wincvsView.cpp File Reference

#include "stdafx.h"
#include <atlconv.h>
#include "wincvs.h"
#include "wincvsDoc.h"
#include "wincvsView.h"
#include "wincvs_winutil.h"
#include "MainFrm.h"
#include "Persistent.h"
#include "CvsPrefs.h"
#include "AppGlue.h"
#include "TclGlue.h"
#include "PythonGlue.h"

Include dependency graph for wincvsView.cpp:

Include dependency graph

Go to the source code of this file.

Variables

CPersistentT< CCharFormat > gViewFont ("P_ViewFont", CCharFormat(), kNoClass)

Variable Documentation

CPersistentT<CCharFormat> gViewFont("P_ViewFont", CCharFormat(), kNoClass) [static]

Referenced by CWincvsView::OnEditClearAll(), CWincvsView::OnInitialUpdate(), and CWincvsView::OnMyFormatFont().

Generated on Sat Aug 7 22:48:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvsView.h File Reference

WinCvs/wincvsView.h File Reference

#include <afxrich.h>
#include "AppConsole.h"

Include dependency graph for wincvsView.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCharFormat
Character format wrapper class. More...
class | CWincvsView
Console window class. More...

Defines

#define | AFX_WINCVSVIEW_H__D2D77DD0_8299_11D1_8949_444553540000__INCLUDED_
#define | WCHARFORMAT CHARFORMAT
#define | MAX_CHAR_BY_LINE 1024
Max character count in the line.

Define Documentation

#define AFX_WINCVSVIEW_H__D2D77DD0_8299_11D1_8949_444553540000__INCLUDED_

Definition at line 26 of file wincvsView.h.

#define MAX_CHAR_BY_LINE 1024

Max character count in the line.

Definition at line 42 of file wincvsView.h.

Referenced by CWincvsView::OutConsole(), and UCvsConsole::OutConsole().

#define WCHARFORMAT CHARFORMAT

Definition at line 38 of file wincvsView.h.

Generated on Sat Aug 7 22:48:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJBrowseEdit.cpp File Reference

WinCvs/CJLib/CJLibrary/CJBrowseEdit.cpp File Reference

#include "stdafx.h"
#include "CJBrowseEdit.h"
#include "CJShell.h"
#include "CJMenu.h"
#include "CJResource.h"

Include dependency graph for CJBrowseEdit.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJCaption.cpp File Reference

WinCvs/CJLib/CJLibrary/CJCaption.cpp File Reference

#include "StdAfx.h"
#include "CJResource.h"
#include "CJCaption.h"
#include "CJCaptionPopupWnd.h"

Include dependency graph for CJCaption.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJCaptionPopupWnd.cpp File Reference

WinCvs/CJLib/CJLibrary/CJCaptionPopupWnd.cpp File Reference

#include "stdafx.h"
#include "CJResource.h"
#include "CJCaptionPopupWnd.h"

Include dependency graph for CJCaptionPopupWnd.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJColorPicker.cpp File Reference

WinCvs/CJLib/CJLibrary/CJColorPicker.cpp File Reference

#include "stdafx.h"
#include "CJColorPopup.h"
#include "CJColorPicker.h"
#include "CJResource.h"

Include dependency graph for CJColorPicker.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void AFXAPI DDX_CJColorPicker (CDataExchange *pDX, int nIDC, COLORREF &crColor)

Function Documentation

void AFXAPI DDX_CJColorPicker | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | COLORREF & | crColor
 | ) |

Definition at line 80 of file CJColorPicker.cpp.

References CCJColorPicker::GetColor(), NULL, and CCJColorPicker::SetColor().

00081 {
00082     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
00083     ASSERT (hWndCtrl != NULL);
00084
00085     CCJColorPicker* pColorPicker = (CCJColorPicker*) CWnd::FromHandle(hWndCtrl);
00086     if (pDX->m_bSaveAndValidate)
00087     {
00088         crColor = pColorPicker->GetColor();
00089     }
00090     else // initializing
00091     {
00092         pColorPicker->SetColor(crColor);
00093     }
00094 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:47:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJColorPopup.cpp File Reference

WinCvs/CJLib/CJLibrary/CJColorPopup.cpp File Reference

#include "stdafx.h"
#include <math.h>
#include "CJColorPicker.h"
#include "CJColorPopup.h"
#include "CJResource.h"

Include dependency graph for CJColorPopup.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | DEFAULT_BOX_VALUE -3
#define | CUSTOM_BOX_VALUE -2
#define | INVALID_Color -1
#define | MAX_ColorS 100
#define | NUM_COLUMNS 10

Define Documentation

#define CUSTOM_BOX_VALUE -2

Definition at line 76 of file CJColorPopup.cpp.

Referenced by CCJColorPopup::ChangeSelection(), CCJColorPopup::DrawCell(), CCJColorPopup::EndSelection(), CCJColorPopup::FindCellFromColor(), CCJColorPopup::GetCellRect(), CCJColorPopup::GetColumn(), CCJColorPopup::GetIndex(), CCJColorPopup::GetRow(), CCJColorPopup::OnKeyDown(), CCJColorPopup::OnMouseMove(), and CCJColorPopup::OnPaint().

#define DEFAULT_BOX_VALUE -3

Definition at line 75 of file CJColorPopup.cpp.

Referenced by CCJColorPopup::ChangeSelection(), CCJColorPopup::DrawCell(), CCJColorPopup::FindCellFromColor(), CCJColorPopup::GetCellRect(), CCJColorPopup::GetColumn(), CCJColorPopup::GetIndex(), CCJColorPopup::GetRow(), CCJColorPopup::OnKeyDown(), CCJColorPopup::OnMouseMove(), and CCJColorPopup::OnPaint().

#define INVALID_Color -1

Definition at line 77 of file CJColorPopup.cpp.

Referenced by CCJColorPopup::ChangeSelection(), CCJColorPopup::FindCellFromColor(), CCJColorPopup::GetColumn(), CCJColorPopup::GetIndex(), CCJColorPopup::GetRow(), CCJColorPopup::Initialise(), CCJColorPopup::OnKeyDown(), and CCJColorPopup::OnMouseMove().

#define MAX_ColorS 100

Definition at line 79 of file CJColorPopup.cpp.

Referenced by CCJColorPopup::Initialise().

#define NUM_COLUMNS 10

Definition at line 80 of file CJColorPopup.cpp.

Referenced by CCJColorPopup::SetWindowSize().

Generated on Sat Aug 7 22:47:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJComboBoxEx.cpp File Reference

WinCvs/CJLib/CJLibrary/CJComboBoxEx.cpp File Reference

#include "stdafx.h"
#include "CJComboBoxEx.h"

Include dependency graph for CJComboBoxEx.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJControlBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJControlBar.cpp File Reference

#include "stdafx.h"
#include "CJControlBar.h"
#include "CJDockContext.h"
#include "CJSizeDockBar.h"
#include "CJResource.h"

Include dependency graph for CJControlBar.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | GRIP_INTRASPACING 1
#define | GRIP_SIZE 3
#define | GRIP_START 8
#define | TRACK_BORDER_SIZE 4
#define | COLOR_WHITE RGB(255,255,255)
#define | COLOR_BLACK RGB(0,0,0)
#define | NCOLORSHADES 64

Define Documentation

#define COLOR_BLACK RGB(0,0,0)

Definition at line 1121 of file CJControlBar.cpp.

#define COLOR_WHITE RGB(255,255,255)

Definition at line 1120 of file CJControlBar.cpp.

#define GRIP_INTRASPACING 1

Definition at line 210 of file CJControlBar.cpp.

Referenced by CCJControlBar::GetMinExt().

#define GRIP_SIZE 3

Definition at line 211 of file CJControlBar.cpp.

Referenced by CCJControlBar::GetMinExt().

#define GRIP_START 8

Definition at line 212 of file CJControlBar.cpp.

Referenced by CCJControlBar::GetMinExt().

#define NCOLORSHADES 64

Definition at line 1122 of file CJControlBar.cpp.

Referenced by CCJControlBar::DrawGriperCaption().

#define TRACK_BORDER_SIZE 4

Definition at line 213 of file CJControlBar.cpp.

Referenced by CCJSizeDockBar::DrawBorders(), CCJControlBar::DrawBorders(), CCJControlBar::GetChildRect(), CCJControlBar::GetMinExt(), CCJSizeDockBar::HitTest(), CCJControlBar::HitTest(), CCJControlBar::OnLButtonDown(), CCJSizeDockBar::OnLButtonUp(), CCJSizeDockBar::OnMouseMove(), CCJSizeDockBar::OnNcCalcSize(), CCJSizeDockBar::OnNcLButtonDown(), and CCJControlBar::SaveBarState().

Generated on Sat Aug 7 22:47:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJDateTimeCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJDateTimeCtrl.cpp File Reference

#include "stdafx.h"
#include "CJDateTimeCtrl.h"
#include <math.h>

Include dependency graph for CJDateTimeCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | MAX_TIME_BUFFER_SIZE 128
#define | MIN_DATE (-657434L)
#define | MAX_DATE 2958465L
#define | HALF_SECOND (1.0/172800.0)

Functions

BOOL | GetAsSystemTime (const CTime &tm, SYSTEMTIME &timeDest)
BOOL | GetAsSystemTime (const CTime *ptm, SYSTEMTIME &timeDest)
BOOL | TmFromOleDate (DATE dtSrc, struct tm &tmDest)
BOOL | GetAsSystemTime (const COleDateTime &dtm, SYSTEMTIME &sysTime)
BOOL | GetAsSystemTime (const COleDateTime *pdtm, SYSTEMTIME &sysTime)
void AFXAPI | DDX_CJDateTimeCtrl (CDataExchange *pDX, int nIDC, COleDateTime &value)
void AFXAPI | DDX_CJDateTimeCtrl (CDataExchange *pDX, int nIDC, CTime &value)
void AFXAPI | DDX_CJMonthCalCtrl (CDataExchange *pDX, int nIDC, COleDateTime &value)
void AFXAPI | DDX_CJMonthCalCtrl (CDataExchange *pDX, int nIDC, CTime &value)
void AFXAPI | DDV_CJMinMaxDateTime (CDataExchange *pDX, CTime &refValue, const CTime *pMinRange, const CTime *pMaxRange)
void AFXAPI | DDV_CJMinMaxDateTime (CDataExchange *pDX, COleDateTime &refValue, const COleDateTime *pMinRange, const COleDateTime *pMaxRange)
void AFXAPI | DDV_CJMinMaxMonth (CDataExchange *pDX, CTime &refValue, const CTime *pMinRange, const CTime *pMaxRange)
void AFXAPI | DDV_CJMinMaxMonth (CDataExchange *pDX, COleDateTime &refValue, const COleDateTime *pMinRange, const COleDateTime *pMaxRange)

Variables

int | nMonthDays [13]

Define Documentation

#define HALF_SECOND (1.0/172800.0)

Definition at line 84 of file CJDateTimeCtrl.cpp.

Referenced by TmFromOleDate().

#define MAX_DATE 2958465L

Definition at line 81 of file CJDateTimeCtrl.cpp.

Referenced by TmFromOleDate().

#define MAX_TIME_BUFFER_SIZE 128

Definition at line 79 of file CJDateTimeCtrl.cpp.

#define MIN_DATE (-657434L)

Definition at line 80 of file CJDateTimeCtrl.cpp.

Referenced by TmFromOleDate().

Function Documentation

void AFXAPI DDV_CJMinMaxDateTime | ( | CDataExchange * | pDX,
 |  | COleDateTime & | refValue,
 |  | const COleDateTime * | pMinRange,
 |  | const COleDateTime * | pMaxRange
 | ) |

Definition at line 1076 of file CJDateTimeCtrl.cpp.

References NULL, and CCJDateTimeCtrl::SetRange().

01078 {
01079     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01080     CCJDateTimeCtrl* pWnd =
01081 #if _MFC_VER >= 0x700
01082         (CCJDateTimeCtrl*) pDX->m_pDlgWnd;
01083 #else
01084         (CCJDateTimeCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01085 #endif
01086
01087     if (!pDX->m_bSaveAndValidate)
01088     {
01089         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01090               (pMaxRange != NULL && *pMaxRange < refValue))
01091         {
01092 #if _MFC_VER >= 0x700
01093             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01094 #else
01095             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01096 #endif
01097             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01098             return;     // don't stop now
01099         }
01100     }
01101
01102     pWnd->SetRange(pMinRange, pMaxRange);
01103 }

Here is the call graph for this function:

void AFXAPI DDV_CJMinMaxDateTime | ( | CDataExchange * | pDX,
 |  | CTime & | refValue,
 |  | const CTime * | pMinRange,
 |  | const CTime * | pMaxRange
 | ) |

Definition at line 1044 of file CJDateTimeCtrl.cpp.

01046 {
01047     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01048
01049     CCJDateTimeCtrl* pWnd =
01050 #if _MFC_VER >= 0x700
01051         (CCJDateTimeCtrl*) pDX->m_pDlgWnd;
01052 #else
01053         (CCJDateTimeCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01054 #endif
01055
01056     if (!pDX->m_bSaveAndValidate)
01057     {
01058         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01059               (pMaxRange != NULL && *pMaxRange < refValue))
01060         {
01061 #ifdef _DEBUG
01062 #if _MFC_VER >= 0x700
01063             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01064 #else
01065             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01066 #endif
01067             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01068 #endif
01069             return;     // don't stop now
01070         }
01071     }
01072
01073     pWnd->SetRange(pMinRange, pMaxRange);
01074 }

void AFXAPI DDV_CJMinMaxMonth | ( | CDataExchange * | pDX,
 |  | COleDateTime & | refValue,
 |  | const COleDateTime * | pMinRange,
 |  | const COleDateTime * | pMaxRange
 | ) |

Definition at line 1136 of file CJDateTimeCtrl.cpp.

References NULL, and CCJMonthCalCtrl::SetRange().

01138 {
01139     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01140     CCJMonthCalCtrl* pWnd =
01141 #if _MFC_VER >= 0x700
01142         (CCJMonthCalCtrl*) pDX->m_pDlgWnd;
01143 #else
01144         (CCJMonthCalCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01145 #endif
01146
01147     if (!pDX->m_bSaveAndValidate)
01148     {
01149         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01150               (pMaxRange != NULL && *pMaxRange < refValue))
01151         {
01152 #ifdef _DEBUG
01153 #if _MFC_VER >= 0x700
01154             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01155 #else
01156             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01157 #endif
01158             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01159 #endif
01160             return;     // don't stop now
01161         }
01162     }
01163
01164     pWnd->SetRange(pMinRange, pMaxRange);
01165 }

Here is the call graph for this function:

void AFXAPI DDV_CJMinMaxMonth | ( | CDataExchange * | pDX,
 |  | CTime & | refValue,
 |  | const CTime * | pMinRange,
 |  | const CTime * | pMaxRange
 | ) |

Definition at line 1105 of file CJDateTimeCtrl.cpp.

01107 {
01108     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01109     CCJMonthCalCtrl* pWnd =
01110 #if _MFC_VER >= 0x700
01111         (CCJMonthCalCtrl*) pDX->m_pDlgWnd;
01112 #else
01113         (CCJMonthCalCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01114 #endif
01115
01116     if (!pDX->m_bSaveAndValidate)
01117     {
01118         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01119               (pMaxRange != NULL && *pMaxRange < refValue))
01120         {
01121 #ifdef _DEBUG
01122 #if _MFC_VER >= 0x700
01123             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01124 #else
01125             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01126 #endif
01127             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01128 #endif
01129             return;     // don't stop now
01130         }
01131     }
01132
01133     pWnd->SetRange(pMinRange, pMaxRange);
01134 }

void AFXAPI DDX_CJDateTimeCtrl | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CTime & | value
 | ) |

Definition at line 1010 of file CJDateTimeCtrl.cpp.

References CCJDateTimeCtrl::GetTime(), and CCJDateTimeCtrl::SetTime().

01011 {
01012     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01013     CCJDateTimeCtrl* pWnd = (CCJDateTimeCtrl*) CWnd::FromHandle(hWndCtrl);
01014
01015     if (pDX->m_bSaveAndValidate)
01016         pWnd->GetTime(value);
01017     else
01018         pWnd->SetTime(&value);
01019 }

Here is the call graph for this function:

void AFXAPI DDX_CJDateTimeCtrl | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | COleDateTime & | value
 | ) |

Definition at line 999 of file CJDateTimeCtrl.cpp.

01000 {
01001     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01002     CCJDateTimeCtrl* pWnd = (CCJDateTimeCtrl*) CWnd::FromHandle(hWndCtrl);
01003
01004     if (pDX->m_bSaveAndValidate)
01005         pWnd->GetTime(value);
01006     else
01007         pWnd->SetTime(value);
01008 }

void AFXAPI DDX_CJMonthCalCtrl | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CTime & | value
 | ) |

Definition at line 1033 of file CJDateTimeCtrl.cpp.

References CCJMonthCalCtrl::GetCurSel(), and CCJMonthCalCtrl::SetCurSel().

01034 {
01035     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01036     CCJMonthCalCtrl* pWnd = (CCJMonthCalCtrl*) CWnd::FromHandle(hWndCtrl);
01037
01038     if (pDX->m_bSaveAndValidate)
01039         pWnd->GetCurSel(value);
01040     else
01041         pWnd->SetCurSel(value);
01042 }

Here is the call graph for this function:

void AFXAPI DDX_CJMonthCalCtrl | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | COleDateTime & | value
 | ) |

Definition at line 1021 of file CJDateTimeCtrl.cpp.

01023 {
01024     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01025     CCJMonthCalCtrl* pWnd = (CCJMonthCalCtrl*) CWnd::FromHandle(hWndCtrl);
01026
01027     if (pDX->m_bSaveAndValidate)
01028         pWnd->GetCurSel(value);
01029     else
01030         pWnd->SetCurSel(value);
01031 }

BOOL GetAsSystemTime | ( | const COleDateTime * | pdtm,
 |  | SYSTEMTIME & | sysTime
 | ) | [static]

Definition at line 242 of file CJDateTimeCtrl.cpp.

Referenced by GetAsSystemTime(), CCJMonthCalCtrl::SetCurSel(), CCJMonthCalCtrl::SetRange(), CCJDateTimeCtrl::SetRange(), CCJMonthCalCtrl::SetSelRange(), CCJDateTimeCtrl::SetTime(), and CCJMonthCalCtrl::SetToday().

00243 {
00244     return GetAsSystemTime(*pdtm, sysTime);
00245 }

BOOL GetAsSystemTime | ( | const COleDateTime & | dtm,
 |  | SYSTEMTIME & | sysTime
 | ) | [static]

Definition at line 218 of file CJDateTimeCtrl.cpp.

References TmFromOleDate().

00219 {
00220     BOOL bRetVal = FALSE;
00221     if (dtm.GetStatus() == COleDateTime::valid)
00222     {
00223         struct tm tmTemp;
00224         if (TmFromOleDate(dtm, tmTemp))
00225         {
00226             sysTime.wYear = (WORD) tmTemp.tm_year;
00227             sysTime.wMonth = (WORD) tmTemp.tm_mon;
00228             sysTime.wDayOfWeek = (WORD) tmTemp.tm_wday;
00229             sysTime.wDay = (WORD) tmTemp.tm_mday;
00230             sysTime.wHour = (WORD) tmTemp.tm_hour;
00231             sysTime.wMinute = (WORD) tmTemp.tm_min;
00232             sysTime.wSecond = (WORD) tmTemp.tm_sec;
00233             sysTime.wMilliseconds = 0;
00234
00235             bRetVal = TRUE;
00236         }
00237     }
00238
00239     return bRetVal;
00240 }

Here is the call graph for this function:

BOOL GetAsSystemTime | ( | const CTime * | ptm,
 |  | SYSTEMTIME & | timeDest
 | ) | [static]

Definition at line 73 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime().

00074 {
00075     return GetAsSystemTime(*ptm, timeDest);
00076 }

Here is the call graph for this function:

BOOL GetAsSystemTime | ( | const CTime & | tm,
 |  | SYSTEMTIME & | timeDest
 | ) | [static]

Definition at line 56 of file CJDateTimeCtrl.cpp.

References NULL.

00057 {
00058     struct tm* ptm = tm.GetLocalTm(NULL);
00059     if (ptm == NULL)
00060         return FALSE;
00061
00062     timeDest.wYear = (WORD) (1900 + ptm->tm_year);
00063     timeDest.wMonth = (WORD) (1 + ptm->tm_mon);
00064     timeDest.wDay = (WORD) ptm->tm_mday;
00065     timeDest.wHour = (WORD) ptm->tm_hour;
00066     timeDest.wMinute = (WORD) ptm->tm_min;
00067     timeDest.wSecond = (WORD) ptm->tm_sec;
00068     timeDest.wMilliseconds = 0;
00069
00070     return TRUE;
00071 }

BOOL TmFromOleDate | ( | DATE | dtSrc,
 |  | struct tm & | tmDest
 | ) | [static]

Definition at line 90 of file CJDateTimeCtrl.cpp.

References HALF_SECOND, MAX_DATE, MIN_DATE, and nMonthDays.

Referenced by GetAsSystemTime().

00091 {
00092     // The legal range does not actually span year 0 to 9999.
00093     if (dtSrc > MAX_DATE || dtSrc < MIN_DATE) // about year 100 to about 9999
00094         return FALSE;
00095
00096     long nDays;             // Number of days since Dec. 30, 1899
00097     long nDaysAbsolute;     // Number of days since 1/1/0
00098     long nSecsInDay;        // Time in seconds since midnight
00099     long nMinutesInDay;     // Minutes in day
00100
00101     long n400Years;         // Number of 400 year increments since 1/1/0
00102     long n400Century;       // Century within 400 year block (0,1,2 or 3)
00103     long n4Years;           // Number of 4 year increments since 1/1/0
00104     long n4Day;             // Day within 4 year block
00105     //  (0 is 1/1/yr1, 1460 is 12/31/yr4)
00106     long n4Yr;              // Year within 4 year block (0,1,2 or 3)
00107     BOOL bLeap4 = TRUE;     // TRUE if 4 year block includes leap year
00108
00109     double dblDate = dtSrc; // tempory serial date
00110
00111     // If a valid date, then this conversion should not overflow
00112     nDays = (long)dblDate;
00113
00114     // Round to the second
00115     dblDate += ((dtSrc > 0.0) ? HALF_SECOND : -HALF_SECOND);
00116
00117     nDaysAbsolute = (long)dblDate + 693959L; // Add days from 1/1/0 to 12/30/1899
00118
00119     dblDate = fabs(dblDate);
00120     nSecsInDay = (long)((dblDate - floor(dblDate)) * 86400.);
00121
00122     // Calculate the day of week (sun=1, mon=2...)
00123     //   -1 because 1/1/0 is Sat.  +1 because we want 1-based
00124     tmDest.tm_wday = (int)((nDaysAbsolute - 1) % 7L) + 1;
00125
00126     // Leap years every 4 yrs except centuries not multiples of 400.
00127     n400Years = (long)(nDaysAbsolute / 146097L);
00128
00129     // Set nDaysAbsolute to day within 400-year block
00130     nDaysAbsolute %= 146097L;
00131
00132     // -1 because first century has extra day
00133     n400Century = (long)((nDaysAbsolute - 1) / 36524L);
00134
00135     // Non-leap century
00136     if (n400Century != 0)
00137     {
00138         // Set nDaysAbsolute to day within century
00139         nDaysAbsolute = (nDaysAbsolute - 1) % 36524L;
00140
00141         // +1 because 1st 4 year increment has 1460 days
00142         n4Years = (long)((nDaysAbsolute + 1) / 1461L);
00143
00144         if (n4Years != 0)
00145             n4Day = (long)((nDaysAbsolute + 1) % 1461L);
00146         else
00147         {
00148             bLeap4 = FALSE;
00149             n4Day = (long)nDaysAbsolute;
00150         }
00151     }
00152     else
00153     {
00154         // Leap century - not special case!
00155         n4Years = (long)(nDaysAbsolute / 1461L);
00156         n4Day = (long)(nDaysAbsolute % 1461L);
00157     }
00158
00159     if (bLeap4)
00160     {
00161         // -1 because first year has 366 days
00162         n4Yr = (n4Day - 1) / 365;
00163
00164         if (n4Yr != 0)
00165             n4Day = (n4Day - 1) % 365;
00166     }
00167     else
00168     {
00169         n4Yr = n4Day / 365;
00170         n4Day %= 365;
00171     }
00172
00173     // n4Day is now 0-based day of year. Save 1-based day of year, year number
00174     tmDest.tm_yday = (int)n4Day + 1;
00175     tmDest.tm_year = n400Years * 400 + n400Century * 100 + n4Years * 4 + n4Yr;
00176
00177     // Handle leap year: before, on, and after Feb. 29.
00178     if (n4Yr == 0 && bLeap4)
00179     {
00180         // Leap Year
00181         if (n4Day == 59)
00182         {
00183             /* Feb. 29 */
00184             tmDest.tm_mon = 2;
00185             tmDest.tm_mday = 29;
00186             goto DoTime;
00187         }
00188
00189         // Pretend it's not a leap year for month/day comp.
00190         if (n4Day >= 60)
00191             --n4Day;
00192     }
00193
00194     // Make n4DaY a 1-based day of non-leap year and compute
00195     //  month/day for everything but Feb. 29.
00196     ++n4Day;
00197
00198     // Month number always >= n/32, so save some loop time */
00199     for (tmDest.tm_mon = (n4Day >> 5) + 1;
00200     n4Day > nMonthDays[tmDest.tm_mon]; tmDest.tm_mon++);
00201
00202     tmDest.tm_mday = (int)(n4Day - nMonthDays[tmDest.tm_mon-1]);
00203
00204 DoTime:
00205     if (nSecsInDay == 0)
00206         tmDest.tm_hour = tmDest.tm_min = tmDest.tm_sec = 0;
00207     else
00208     {
00209         tmDest.tm_sec = (int)nSecsInDay % 60L;
00210         nMinutesInDay = nSecsInDay / 60L;
00211         tmDest.tm_min = (int)nMinutesInDay % 60;
00212         tmDest.tm_hour = (int)nMinutesInDay / 60;
00213     }
00214
00215     return TRUE;
00216 }

Variable Documentation

int nMonthDays[13] [static]

Initial value:

{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}
Definition at line 87 of file CJDateTimeCtrl.cpp.

Referenced by TmFromOleDate().

Generated on Sat Aug 7 22:47:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJDockBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJDockBar.cpp File Reference

#include "stdafx.h"
#include "CJDockBar.h"
#include "CJToolBar.h"

Include dependency graph for CJDockBar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJDockContext.cpp File Reference

WinCvs/CJLib/CJLibrary/CJDockContext.cpp File Reference

#include "stdafx.h"
#include "CJDockContext.h"
#include "CJControlBar.h"
#include "CJSizeDockBar.h"

Include dependency graph for CJDockContext.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | HORZF(dw) (dw & CBRS_ORIENT_HORZ)
#define | VERTF(dw) (dw & CBRS_ORIENT_VERT)
#define | m_rectRequestedSize m_rectDragHorz
#define | m_rectActualSize m_rectDragVert
#define | m_rectActualFrameSize m_rectFrameDragHorz
#define | m_rectFrameBorders m_rectFrameDragVert

Functions

void | AdjustRectangle (CRect &rect, CPoint pt)

Define Documentation

#define HORZF ( dw ) (dw & CBRS_ORIENT_HORZ)

Definition at line 91 of file CJDockContext.cpp.

Referenced by CCJDockContext::CanDockDockBar(), CCJDockContext::EndDragDockBar(), CCJDockContext::GetDockBar(), and CCJDockContext::StartDragDockBar().

#define m_rectActualFrameSize m_rectFrameDragHorz

Definition at line 512 of file CJDockContext.cpp.

Referenced by CCJDockContext::StartResize(), and CCJDockContext::Stretch().

#define m_rectActualSize m_rectDragVert

Definition at line 511 of file CJDockContext.cpp.

Referenced by CCJDockContext::StartResize(), and CCJDockContext::Stretch().

#define m_rectFrameBorders m_rectFrameDragVert

Definition at line 513 of file CJDockContext.cpp.

Referenced by CCJDockContext::StartResize(), and CCJDockContext::Stretch().

#define m_rectRequestedSize m_rectDragHorz

Definition at line 510 of file CJDockContext.cpp.

Referenced by CCJDockContext::StartResize(), and CCJDockContext::Stretch().

#define VERTF ( dw ) (dw & CBRS_ORIENT_VERT)

Definition at line 92 of file CJDockContext.cpp.

Referenced by CCJDockContext::CanDockDockBar(), CCJDockContext::EndDragDockBar(), and CCJDockContext::GetDockBar().

Function Documentation

void AdjustRectangle | ( | CRect & | rect,
 |  | CPoint | pt
 | ) | [static]

Definition at line 94 of file CJDockContext.cpp.

Referenced by CCJDockContext::StartDragDockBar().

00095 {
00096     int nXOffset = (pt.x < rect.left) ? (pt.x - rect.left) :
00097                     (pt.x > rect.right) ? (pt.x - rect.right) : 0;
00098     int nYOffset = (pt.y < rect.top) ? (pt.y - rect.top) :
00099                     (pt.y > rect.bottom) ? (pt.y - rect.bottom) : 0;
00100     rect.OffsetRect(nXOffset, nYOffset);
00101 }

Generated on Sat Aug 7 22:47:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJExplorerBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJExplorerBar.cpp File Reference

#include "stdafx.h"
#include "CJResource.h"
#include "CJExplorerBar.h"

Include dependency graph for CJExplorerBar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatButton.cpp File Reference

WinCvs/CJLib/CJLibrary/CJFlatButton.cpp File Reference

#include "stdafx.h"
#include "CJFlatButton.h"
#include "CJResource.h"

Include dependency graph for CJFlatButton.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatComboBox.cpp File Reference

WinCvs/CJLib/CJLibrary/CJFlatComboBox.cpp File Reference

#include "stdafx.h"
#include "CJFlatComboBox.h"

Include dependency graph for CJFlatComboBox.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatHeaderCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJFlatHeaderCtrl.cpp File Reference

#include "stdafx.h"
#include "CJFlatHeaderCtrl.h"

Include dependency graph for CJFlatHeaderCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatSplitterWnd.cpp File Reference

WinCvs/CJLib/CJLibrary/CJFlatSplitterWnd.cpp File Reference

#include "StdAfx.h"
#include "CJFlatSplitterWnd.h"

Include dependency graph for CJFlatSplitterWnd.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatTabCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJFlatTabCtrl.cpp File Reference

#include "stdafx.h"
#include "CJResource.h"
#include "CJFlatTabCtrl.h"

Include dependency graph for CJFlatTabCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFontCombo.cpp File Reference

WinCvs/CJLib/CJLibrary/CJFontCombo.cpp File Reference

#include "stdafx.h"
#include "CJFontCombo.h"

Include dependency graph for CJFontCombo.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFrameWnd.cpp File Reference

WinCvs/CJLib/CJLibrary/CJFrameWnd.cpp File Reference

#include "stdafx.h"
#include "CJFrameWnd.h"
#include "CJDockBar.h"
#include "CJSizeDockBar.h"
#include "CJControlBar.h"
#include "CJMiniDockFrameWnd.h"
#include "CJToolBar.h"

Include dependency graph for CJFrameWnd.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJHexEdit.cpp File Reference

WinCvs/CJLib/CJLibrary/CJHexEdit.cpp File Reference

#include "StdAfx.h"
#include "CJResource.h"
#include "CJHexEdit.h"
#include <ctype.h>
#include <afxole.h>
#include <afxdisp.h>

Include dependency graph for CJHexEdit.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | TOHEX(a, b) {*b++ = hextable[a >> 4];*b++ = hextable[a&0xf];}

Variables

char | hextable [16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}

Define Documentation

#define TOHEX | ( | a,
 |  | b | ) | {*b++ = hextable[a >> 4];*b++ = hextable[a&0xf];}

Definition at line 42 of file CJHexEdit.cpp.

Referenced by CCJHexEdit::OnEditCopy(), and CCJHexEdit::OnPaint().

Variable Documentation

char hextable[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}

Definition at line 41 of file CJHexEdit.cpp.

Generated on Sat Aug 7 22:47:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJHtmlView.cpp File Reference

WinCvs/CJLib/CJLibrary/CJHtmlView.cpp File Reference

#include "StdAfx.h"
#include "CJHtmlView.h"

Include dependency graph for CJHtmlView.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | RELEASE(lpUnk) _AfxRelease((LPUNKNOWN*)&lpUnk)

Functions

DWORD AFXAPI | _AfxRelease (LPUNKNOWN *lplpUnknown)
void | MakeOleVariant (COleVariant &ov, LPCITEMIDLIST pidl)

Define Documentation

#define RELEASE ( lpUnk ) _AfxRelease((LPUNKNOWN*)&lpUnk)

Definition at line 79 of file CJHtmlView.cpp.

Referenced by CCJHtmlView::OnDestroy().

Function Documentation

DWORD AFXAPI _AfxRelease ( LPUNKNOWN * plpUnknown )

Definition at line 63 of file CJHtmlView.cpp.

References NULL.

00064 {
00065     ASSERT(lplpUnknown != NULL);
00066     if (*lplpUnknown != NULL)
00067     {
00068         DWORD dwRef = (*lplpUnknown)->Release();
00069         *lplpUnknown = NULL;
00070         return dwRef;
00071     }
00072     return 0;
00073 }

void MakeOleVariant | ( | COleVariant & | ov,
 |  | LPCITEMIDLIST | pidl
 | ) |

Definition at line 567 of file CJHtmlView.cpp.

References NULL.

Referenced by CCJHtmlView::Navigate2().

00568 {
00569     AfxVariantInit(&ov);
00570
00571     if (pidl != NULL)
00572     {
00573         // walk through entries in the list and accumulate their size
00574
00575         UINT cbTotal = 0;
00576         SAFEARRAY *psa = NULL;
00577         LPCITEMIDLIST pidlWalker = pidl;
00578
00579         while (pidlWalker->mkid.cb)
00580         {
00581             cbTotal += pidlWalker->mkid.cb;
00582             pidlWalker = (LPCITEMIDLIST)
00583                 (((LPBYTE)pidlWalker) + pidlWalker->mkid.cb);
00584         }
00585
00586         // add the base structure size
00587         cbTotal += sizeof(ITEMIDLIST);
00588
00589         // get a safe array for them
00590         psa = SafeArrayCreateVector(VT_UI1, 0, cbTotal);
00591
00592         // copy it and set members
00593         if (psa != NULL)
00594         {
00595             memcpy(psa->pvData, (LPBYTE) pidl, cbTotal);
00596             ov.vt = VT_ARRAY | VT_UI1;
00597             ov.parray = psa;
00598         }
00599     }
00600 }

Generated on Sat Aug 7 22:47:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJHyperLink.cpp File Reference

WinCvs/CJLib/CJLibrary/CJHyperLink.cpp File Reference

#include "stdafx.h"
#include "CJHyperLink.h"

Include dependency graph for CJHyperLink.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define TOOLTIP_ID 1

Define Documentation

#define TOOLTIP_ID 1

Definition at line 50 of file CJHyperLink.cpp.

Referenced by CCJHyperLink::PreSubclassWindow(), and CCJHyperLink::SetURL().

Generated on Sat Aug 7 22:47:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJLibrary.cpp File Reference

WinCvs/CJLib/CJLibrary/CJLibrary.cpp File Reference

#include "stdafx.h"
#include <afxdllx.h>
#include "CJToolBar.h"

Include dependency graph for CJLibrary.cpp:

Include dependency graph

Go to the source code of this file.

Functions

int APIENTRY | DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)

Variables

AFX_EXTENSION_MODULE | CJLibraryDLL = { NULL, NULL }

Function Documentation

int APIENTRY DllMain | ( | HINSTANCE | hInstance,
 |  | DWORD | dwReason,
 |  | LPVOID | lpReserved
 | ) |

Definition at line 42 of file CJLibrary.cpp.

References _ComCtlVersion, _GetComCtlVersion(), CJLibraryDLL, NULL, and VERSION_IE4.

00043 {
00044     // Remove this if you use lpReserved
00045     UNREFERENCED_PARAMETER(lpReserved);
00046
00047     if (dwReason == DLL_PROCESS_ATTACH)
00048     {
00049         TRACE0("CJLIBRARY.DLL Initializing!\n");
00050
00051         // Extension DLL one-time initialization
00052         if (!AfxInitExtensionModule(CJLibraryDLL, hInstance))
00053             return 0;
00054
00055         // see what version of the common control we are using.
00056         _GetComCtlVersion();
00057         if (_ComCtlVersion < VERSION_IE4) {
00058             ::MessageBox(NULL, _T("Invalid Common Control DLL!\nYou need version 4.70 or higher to use CJLibrary...\nAborting!\n\nCopyright © 1999 CodeJock.com and Copyright © 1998-1999 Kirk W. Stowell, All Rights Reserved\nmailto:kstowell@codejock.com\nhttp://www.codejock.com"), _T("Invalid COMCTL32.DLL"), MB_ICONSTOP);
00059             return 0;
00060         }
00061
00062         // Insert this DLL into the resource chain
00063         // NOTE: If this Extension DLL is being implicitly linked to by
00064         //  an MFC Regular DLL (such as an ActiveX Control)
00065         //  instead of an MFC application, then you will want to
00066         //  remove this line from DllMain and put it in a separate
00067         //  function exported from this Extension DLL.  The Regular DLL
00068         //  that uses this Extension DLL should then explicitly call that
00069         //  function to initialize this Extension DLL.  Otherwise,
00070         //  the CDynLinkLibrary object will not be attached to the
00071         //  Regular DLL's resource chain, and serious problems will
00072         //  result.
00073
00074         new CDynLinkLibrary(CJLibraryDLL);
00075     }
00076     else if (dwReason == DLL_PROCESS_DETACH)
00077     {
00078         TRACE0("CJLIBRARY.DLL Terminating!\n");
00079         // Terminate the library before destructors are called
00080         AfxTermExtensionModule(CJLibraryDLL);
00081     }
00082     return 1;   // ok
00083 }

Here is the call graph for this function:

Variable Documentation

AFX_EXTENSION_MODULE CJLibraryDLL = { NULL, NULL } [static]

Definition at line 39 of file CJLibrary.cpp.

Referenced by DllMain().

Generated on Sat Aug 7 22:47:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJListBox.cpp File Reference

WinCvs/CJLib/CJLibrary/CJListBox.cpp File Reference

#include "StdAfx.h"
#include "CJListBox.h"

Include dependency graph for CJListBox.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJListCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJListCtrl.cpp File Reference

#include "stdafx.h"
#include "CJListCtrl.h"
#include "CJFlatHeaderCtrl.h"
#include "CJResource.h"

Include dependency graph for CJListCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJListView.cpp File Reference

WinCvs/CJLib/CJLibrary/CJListView.cpp File Reference

#include "stdafx.h"
#include "CJListView.h"
#include "CJFlatHeaderCtrl.h"
#include "CJResource.h"

Include dependency graph for CJListView.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJLogoPane.cpp File Reference

WinCvs/CJLib/CJLibrary/CJLogoPane.cpp File Reference

#include "StdAfx.h"
#include "CJLogoPane.h"

Include dependency graph for CJLogoPane.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMaskEdit.cpp File Reference

WinCvs/CJLib/CJLibrary/CJMaskEdit.cpp File Reference

#include "StdAfx.h"
#include "CJMaskEdit.h"

Include dependency graph for CJMaskEdit.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void AFXAPI DDX_OleDateTime (CDataExchange *pDX, int nIDC, CCJDateEdit &rControl, COleDateTime &rDateTime)

Function Documentation

void AFXAPI DDX_OleDateTime | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CCJDateEdit & | rControl,
 |  | COleDateTime & | rDateTime
 | ) |

Definition at line 391 of file CJMaskEdit.cpp.

References CCJDateEdit::GetDateTime(), and CCJDateEdit::SetDateTime().

00392 {
00393     DDX_Control( pDX, nIDC, rControl );
00394
00395     if( pDX->m_bSaveAndValidate ) {
00396         rDateTime = rControl.GetDateTime();
00397     }
00398     else {
00399         rControl.SetDateTime( rDateTime );
00400     }
00401 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:47:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMDIChildWnd.cpp File Reference

WinCvs/CJLib/CJLibrary/CJMDIChildWnd.cpp File Reference

#include "stdafx.h"
#include "CJMDIChildWnd.h"
#include "CJDockBar.h"
#include "CJSizeDockBar.h"
#include "CJControlBar.h"
#include "CJMiniDockFrameWnd.h"
#include "CJToolBar.h"
#include "CJMDIFrameWnd.h"

Include dependency graph for CJMDIChildWnd.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMDIFrameWnd.cpp File Reference

WinCvs/CJLib/CJLibrary/CJMDIFrameWnd.cpp File Reference

#include "stdafx.h"
#include "CJMDIFrameWnd.h"
#include "CJDockBar.h"
#include "CJSizeDockBar.h"
#include "CJControlBar.h"
#include "CJMiniDockFrameWnd.h"
#include "CJToolBar.h"

Include dependency graph for CJMDIFrameWnd.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMemFile.cpp File Reference

WinCvs/CJLib/CJLibrary/CJMemFile.cpp File Reference

#include "stdafx.h"
#include "CJMemFile.h"

Include dependency graph for CJMemFile.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMenu.cpp File Reference

WinCvs/CJLib/CJLibrary/CJMenu.cpp File Reference

#include "stdafx.h"
#include "CJMenu.h"
#include <afxpriv.h>

Include dependency graph for CJMenu.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | GAP 1
#define | OBM_CHECK 32760

Enumerations

enum Win32Type {
Win32s,
Windoze95,
WinNT3,
WinNT4orHigher
}

Functions

Win32Type IsShellType ()

Variables

CPINFO | CPInfo
Win32Type | g_Shell = IsShellType()

Define Documentation

#define GAP 1

Definition at line 49 of file CJMenu.cpp.

Referenced by CCJMenu::DrawItem(), and CCJMenu::MeasureItem().

#define OBM_CHECK 32760

Definition at line 51 of file CJMenu.cpp.

Enumeration Type Documentation

enum Win32Type

Enumeration values:
Win32s
Windoze95
WinNT3
WinNT4orHigher
Definition at line 60 of file CJMenu.cpp.

Referenced by IsShellType().

00060               {
00061     Win32s,
00062     Windoze95,
00063     WinNT3,
00064     WinNT4orHigher
00065 };

Function Documentation

Win32Type IsShellType ( )

Definition at line 68 of file CJMenu.cpp.

References free, malloc, NULL, Win32s, Win32Type, Windoze95, WinNT3, and WinNT4orHigher.

00069 {
00070     Win32Type  ShellType;
00071     DWORD winVer;
00072     OSVERSIONINFO *osvi;
00073
00074     winVer=GetVersion();
00075     if(winVer<0x80000000){/*NT */
00076         ShellType=WinNT3;
00077         osvi= (OSVERSIONINFO *)malloc(sizeof(OSVERSIONINFO));
00078         if (osvi!=NULL){
00079             memset(osvi,0,sizeof(OSVERSIONINFO));
00080             osvi->dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
00081             GetVersionEx(osvi);
00082             if (osvi->dwMajorVersion>=4L)
00083                 ShellType=WinNT4orHigher;//yup, it is NT 4 or higher!
00084             free(osvi);
00085         }
00086     }
00087     else if  (LOBYTE(LOWORD(winVer))<4)
00088         ShellType=Win32s;/*Win32s*/
00089     else
00090         ShellType=Windoze95;/*Windoze95*/
00091     return ShellType;
00092 }

Variable Documentation

CPINFO CPInfo [static]

Definition at line 58 of file CJMenu.cpp.

Referenced by CCJMenu::CCJMenu().

Win32Type g_Shell = IsShellType() [static]

Definition at line 94 of file CJMenu.cpp.

Referenced by CCJMenu::IsNewShell(), and CCJMenu::MeasureItem().

Generated on Sat Aug 7 22:47:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMenuBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJMenuBar.cpp File Reference

#include "stdafx.h"
#include "CJMenuBar.h"
#include "CJMenu.h"

Include dependency graph for CJMenuBar.cpp:

Include dependency graph

Go to the source code of this file.

Variables

CCJMenuBar * | g_pMenuBar = NULL
HHOOK | g_hMsgHook = NULL

Variable Documentation

HHOOK g_hMsgHook = NULL [static]

Definition at line 431 of file CJMenuBar.cpp.

Referenced by CCJMenuBar::MenuInputFilter(), and CCJMenuBar::TrackPopup().

CCJMenuBar* g_pMenuBar = NULL [static]

Definition at line 430 of file CJMenuBar.cpp.

Referenced by CCJMenuBar::MenuInputFilter(), and CCJMenuBar::TrackPopup().

Generated on Sat Aug 7 22:47:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMetaFileButton.cpp File Reference

WinCvs/CJLib/CJLibrary/CJMetaFileButton.cpp File Reference

#include "stdafx.h"
#include "CJResource.h"
#include "CJMetaFileButton.h"

Include dependency graph for CJMetaFileButton.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMiniDockFrameWnd.cpp File Reference

WinCvs/CJLib/CJLibrary/CJMiniDockFrameWnd.cpp File Reference

#include "stdafx.h"
#include "CJMiniDockFrameWnd.h"
#include "CJDockContext.h"
#include "CJSizeDockBar.h"
#include "CJControlBar.h"

Include dependency graph for CJMiniDockFrameWnd.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJOutlookBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJOutlookBar.cpp File Reference

#include "stdafx.h"
#include "CJOutlookBar.h"

Include dependency graph for CJOutlookBar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJPagerCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJPagerCtrl.cpp File Reference

#include "stdafx.h"
#include "CJPagerCtrl.h"

Include dependency graph for CJPagerCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJReBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJReBar.cpp File Reference

#include "stdafx.h"
#include "CJReBar.h"
#include "CJToolBar.h"

Include dependency graph for CJReBar.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | _CjxGetDlgCtrlID(hWnd) ((UINT)(WORD)::GetDlgCtrlID(hWnd))

Functions

HWND | _CjxChildWindowFromPoint (HWND hWnd, POINT pt)

Define Documentation

#define _CjxGetDlgCtrlID ( hWnd ) ((UINT)(WORD)::GetDlgCtrlID(hWnd))

Definition at line 62 of file CJReBar.cpp.

Referenced by _CjxChildWindowFromPoint().

Function Documentation

HWND _CjxChildWindowFromPoint | ( | HWND | hWnd,
 |  | POINT | pt
 | ) | [static]

Definition at line 64 of file CJReBar.cpp.

References _CjxGetDlgCtrlID, and NULL.

Referenced by CCJReBar::OnToolHitTest().

00065 {
00066   ASSERT(hWnd != NULL);
00067
00068   // check child windows
00069   ::ClientToScreen(hWnd, &pt);
00070   HWND hWndChild = ::GetWindow(hWnd, GW_CHILD);
00071   for (; hWndChild != NULL; hWndChild = ::GetWindow(hWndChild, GW_HWNDNEXT))
00072   {
00073     if (_CjxGetDlgCtrlID(hWndChild) != (WORD)-1 &&
00074       (::GetWindowLong(hWndChild, GWL_STYLE) & WS_VISIBLE))
00075     {
00076       // see if point hits the child window
00077       CRect rect;
00078       ::GetWindowRect(hWndChild, rect);
00079       if (rect.PtInRect(pt))
00080         return hWndChild;
00081     }
00082   }
00083
00084   return NULL;    // not found
00085 }

Generated on Sat Aug 7 22:47:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJReBarCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJReBarCtrl.cpp File Reference

#include "stdafx.h"
#include "CJReBarCtrl.h"

Include dependency graph for CJReBarCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJShell.cpp File Reference

WinCvs/CJLib/CJLibrary/CJShell.cpp File Reference

#include "StdAfx.h"
#include "CJShell.h"

Include dependency graph for CJShell.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJShellList.cpp File Reference

WinCvs/CJLib/CJLibrary/CJShellList.cpp File Reference

#include "stdafx.h"
#include "CJResource.h"
#include "CJShellTree.h"
#include "CJShellList.h"
#include "CJSortClass.h"

Include dependency graph for CJShellList.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJShellTree.cpp File Reference

WinCvs/CJLib/CJLibrary/CJShellTree.cpp File Reference

#include "stdafx.h"
#include "CJShellTree.h"
#include "CJShellList.h"
#include "CJShell.h"
#include "CJFlatComboBox.h"
#include <direct.h>

Include dependency graph for CJShellTree.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJSizeDockBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJSizeDockBar.cpp File Reference

#include "stdafx.h"
#include "CJSizeDockBar.h"
#include "CJControlBar.h"
#include "CJToolBar.h"
#include "CJResource.h"

Include dependency graph for CJSizeDockBar.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define TRACK_BORDER_SIZE 4

Define Documentation

#define TRACK_BORDER_SIZE 4

Definition at line 104 of file CJSizeDockBar.cpp.

Generated on Sat Aug 7 22:47:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJSortClass.cpp File Reference

WinCvs/CJLib/CJLibrary/CJSortClass.cpp File Reference

#include "stdafx.h"
#include "CJSortClass.h"

Include dependency graph for CJSortClass.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJStatusBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJStatusBar.cpp File Reference

#include "StdAfx.h"
#include "CJStatusBar.h"

Include dependency graph for CJStatusBar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJTabCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJTabCtrl.cpp File Reference

#include "StdAfx.h"
#include "CJTabCtrl.h"

Include dependency graph for CJTabCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJTabCtrlBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJTabCtrlBar.cpp File Reference

#include "stdafx.h"
#include "CJTabCtrlBar.h"
#include "CJResource.h"

Include dependency graph for CJTabCtrlBar.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJTabView.cpp File Reference

WinCvs/CJLib/CJLibrary/CJTabView.cpp File Reference

#include "stdafx.h"
#include "CJTabView.h"

Include dependency graph for CJTabView.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJToolBar.cpp File Reference

WinCvs/CJLib/CJLibrary/CJToolBar.cpp File Reference

#include "stdafx.h"
#include "CJToolBar.h"
#include "CJFlatComboBox.h"
#include "CJComboBoxEx.h"
#include "CJFontCombo.h"
#include "CJMenu.h"

Include dependency graph for CJToolBar.cpp:

Include dependency graph

Go to the source code of this file.

Classes

struct | CJX_COLORMAP
struct | AFX_DLLVERSIONINFO
struct | CJX_CONTROLPOS
struct | CToolBarData
class | CCJToolCmdUI

Defines

#define | IDC_CUSTOMIZE_BAR 0xFF
#define | _RGB_TO_RGBQUAD(r, g, b) (RGB(b,g,r))
#define | _CLR_TO_RGBQUAD(clr) (RGB(GetBValue(clr), GetGValue(clr), GetRValue(clr)))
#define | CX_OVERLAP 0

Typedefs

typedef HRESULT(CALLBACK * | AFX_DLLGETVERSIONPROC )(AFX_DLLVERSIONINFO *)

Functions

HBITMAP AFXAPI | _LoadSysColorBitmap (HINSTANCE hInst, HRSRC hRsrc, BOOL bMono)
DWORD AFXAPI | _GetComCtlVersion ()
int AFXAPI | _GetDropDownWidth ()

Variables

const CJX_COLORMAP | _sysColorMap []
int | _ComCtlVersion = -1
int | _dropDownWidth = -1

Define Documentation

#define _CLR_TO_RGBQUAD ( clr ) (RGB(GetBValue(clr), GetGValue(clr), GetRValue(clr)))

Definition at line 122 of file CJToolBar.cpp.

Referenced by _LoadSysColorBitmap().

#define _RGB_TO_RGBQUAD | ( | r,
 |  | g,
 |  | b | ) | (RGB(b,g,r))

Definition at line 121 of file CJToolBar.cpp.

Referenced by _LoadSysColorBitmap().

#define CX_OVERLAP 0

Definition at line 1368 of file CJToolBar.cpp.

Referenced by CCJToolBar::CalcSize(), and CCJToolBar::WrapToolBar().

#define IDC_CUSTOMIZE_BAR 0xFF

Definition at line 111 of file CJToolBar.cpp.

Referenced by CCJToolBar::OnRButtonDown().

Typedef Documentation

typedef HRESULT(CALLBACK* AFX_DLLGETVERSIONPROC)(AFX_DLLVERSIONINFO *)

Definition at line 225 of file CJToolBar.cpp.

Referenced by _GetComCtlVersion().

Function Documentation

DWORD AFXAPI _GetComCtlVersion ( )

Definition at line 229 of file CJToolBar.cpp.

References _ComCtlVersion, AFX_DLLGETVERSIONPROC, NULL, and VERSION_WIN4.

Referenced by CCJReBar::Create(), CCJToolBar::CreateEx(), and DllMain().

00230 {
00231     // return cached version if already determined...
00232     if (_ComCtlVersion != -1)
00233         return _ComCtlVersion;
00234
00235     // otherwise determine comctl32.dll version via DllGetVersion
00236     HINSTANCE hInst = ::GetModuleHandleA("COMCTL32.DLL");
00237     ASSERT(hInst != NULL);
00238     AFX_DLLGETVERSIONPROC pfn;
00239     pfn = (AFX_DLLGETVERSIONPROC)GetProcAddress(hInst, "DllGetVersion");
00240     DWORD dwVersion = VERSION_WIN4;
00241     if (pfn != NULL)
00242     {
00243         AFX_DLLVERSIONINFO dvi;
00244         memset(&dvi, 0, sizeof(dvi));
00245         dvi.cbSize = sizeof(dvi);
00246         HRESULT hr = (*pfn)(&dvi);
00247         if (SUCCEEDED(hr))
00248         {
00249             ASSERT(dvi.dwMajorVersion <= 0xFFFF);
00250             ASSERT(dvi.dwMinorVersion <= 0xFFFF);
00251             dwVersion = MAKELONG(dvi.dwMinorVersion, dvi.dwMajorVersion);
00252         }
00253     }
00254     _ComCtlVersion = dwVersion;
00255     return dwVersion;
00256 }

int AFXAPI _GetDropDownWidth ( )

Definition at line 266 of file CJToolBar.cpp.

References _dropDownWidth, and NULL.

Referenced by CCJToolBar::CreateEx().

00267 {
00268     // return cached version if already determined...
00269     if (_dropDownWidth != -1)
00270         return _dropDownWidth;
00271
00272     // otherwise calculate it...
00273     HDC hDC = GetDC(NULL);
00274     ASSERT(hDC != NULL);
00275     HFONT hFont;
00276     if ((hFont = ::CreateFont(GetSystemMetrics(SM_CYMENUCHECK), 0, 0, 0,
00277         FW_NORMAL, 0, 0, 0, SYMBOL_CHARSET, 0, 0, 0, 0, _T("Marlett"))) != NULL)
00278     {
00279         HFONT hOldFont = (HFONT)::SelectObject(hDC, hFont);
00280
00281         VERIFY(GetCharWidth(hDC, '6', '6', &_dropDownWidth));
00282
00283         // fix potential resource leak - KStowell - 10-21-99
00284         if (hFont != NULL) {
00285             ::SelectObject(hDC, hOldFont);
00286             ::DeleteObject(hFont);
00287         }
00288     }
00289
00290     ::ReleaseDC(NULL, hDC);
00291     ASSERT(_dropDownWidth != -1);
00292     return _dropDownWidth;
00293 }

HBITMAP AFXAPI _LoadSysColorBitmap | ( | HINSTANCE | hInst,
 |  | HRSRC | hRsrc,
 |  | BOOL | bMono
 | ) |

Definition at line 141 of file CJToolBar.cpp.

References _CLR_TO_RGBQUAD, _countof, _RGB_TO_RGBQUAD, _sysColorMap, CJX_COLORMAP::iSysColorTo, NULL, and CJX_COLORMAP::rgbqFrom.

Referenced by CCJToolBar::LoadBitmap(), and CCJToolBar::OnSysColorChange().

00142 {
00143     HGLOBAL hglb;
00144     if ((hglb = LoadResource(hInst, hRsrc)) == NULL)
00145         return NULL;
00146
00147     LPBITMAPINFOHEADER lpBitmap = (LPBITMAPINFOHEADER)LockResource(hglb);
00148     if (lpBitmap == NULL)
00149         return NULL;
00150
00151     // make copy of BITMAPINFOHEADER so we can modify the color table
00152     const int nColorTableSize = 16;
00153     UINT nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
00154     LPBITMAPINFOHEADER lpBitmapInfo = (LPBITMAPINFOHEADER)::malloc(nSize);
00155     if (lpBitmapInfo == NULL)
00156         return NULL;
00157     memcpy(lpBitmapInfo, lpBitmap, nSize);
00158
00159     // color table is in RGBQUAD DIB format
00160     DWORD* pColorTable =
00161         (DWORD*)(((LPBYTE)lpBitmapInfo) + (UINT)lpBitmapInfo->biSize);
00162
00163     for (int iColor = 0; iColor < nColorTableSize; iColor++)
00164     {
00165         // look for matching RGBQUAD color in original
00166         for (int i = 0; i < _countof(_sysColorMap); i++)
00167         {
00168             if (pColorTable[iColor] == _sysColorMap[i].rgbqFrom)
00169             {
00170                 if (bMono)
00171                 {
00172                     // all colors except text become white
00173                     if (_sysColorMap[i].iSysColorTo != COLOR_BTNTEXT)
00174                         pColorTable[iColor] = _RGB_TO_RGBQUAD(255, 255, 255);
00175                 }
00176                 else
00177                     pColorTable[iColor] =
00178                     _CLR_TO_RGBQUAD(::GetSysColor(_sysColorMap[i].iSysColorTo));
00179                 break;
00180             }
00181         }
00182     }
00183
00184     int nWidth = (int)lpBitmapInfo->biWidth;
00185     int nHeight = (int)lpBitmapInfo->biHeight;
00186     HDC hDCScreen = ::GetDC(NULL);
00187     HBITMAP hbm = ::CreateCompatibleBitmap(hDCScreen, nWidth, nHeight);
00188
00189     if (hbm != NULL)
00190     {
00191         HDC hDCGlyphs = ::CreateCompatibleDC(hDCScreen);
00192         HBITMAP hbmOld = (HBITMAP)::SelectObject(hDCGlyphs, hbm);
00193
00194         LPBYTE lpBits;
00195         lpBits = (LPBYTE)(lpBitmap + 1);
00196         lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD);
00197
00198         StretchDIBits(hDCGlyphs, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
00199             lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS, SRCCOPY);
00200         SelectObject(hDCGlyphs, hbmOld);
00201         ::DeleteDC(hDCGlyphs);
00202     }
00203     ::ReleaseDC(NULL, hDCScreen);
00204
00205     // free copy of bitmap info struct and resource itself
00206     ::free(lpBitmapInfo);
00207     ::FreeResource(hglb);
00208
00209     return hbm;
00210 }

Variable Documentation

int _ComCtlVersion = -1

Definition at line 227 of file CJToolBar.cpp.

Referenced by _GetComCtlVersion(), CCJReBar::Create(), CCJToolBar::CreateEx(), DllMain(), CCJToolBar::GetButtonSize(), CCJToolBar::OnNcCalcSize(), CCJToolBar::OnPreserveZeroBorderHelper(), CCJToolBar::OnSetSizeHelper(), and CCJToolBar::SetButtons().

int _dropDownWidth = -1

Definition at line 264 of file CJToolBar.cpp.

Referenced by _GetDropDownWidth(), and CCJToolBar::CreateEx().

const CJX_COLORMAP _sysColorMap[]

Initial value:

{

    { (RGB( 0x00 , 0x00 , 0x00 )),  COLOR_BTNTEXT },
    { (RGB( 0x80 , 0x80 , 0x80 )),  COLOR_BTNSHADOW },
    { (RGB( 0xC0 , 0xC0 , 0xC0 )),  COLOR_BTNFACE },
    { (RGB( 0xFF , 0xFF , 0xFF )),  COLOR_BTNHIGHLIGHT }
}
Definition at line 131 of file CJToolBar.cpp.

Referenced by _LoadSysColorBitmap().

Generated on Sat Aug 7 22:47:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJToolBarBase.cpp File Reference

WinCvs/CJLib/CJLibrary/CJToolBarBase.cpp File Reference

#include "stdafx.h"
#include "CJToolBarBase.h"

Include dependency graph for CJToolBarBase.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | CX_GRIPPER 3
#define | CY_GRIPPER 3
#define | CX_BORDER_GRIPPER 2
#define | CY_BORDER_GRIPPER 2

Define Documentation

#define CX_BORDER_GRIPPER 2

Definition at line 314 of file CJToolBarBase.cpp.

Referenced by CCJToolBarBase::CalcInsideRect(), and CCJToolBarBase::DrawGripper().

#define CX_GRIPPER 3

Definition at line 312 of file CJToolBarBase.cpp.

Referenced by CCJToolBarBase::CalcInsideRect(), and CCJToolBarBase::DrawGripper().

#define CY_BORDER_GRIPPER 2

Definition at line 315 of file CJToolBarBase.cpp.

Referenced by CCJToolBarBase::CalcInsideRect(), and CCJToolBarBase::DrawGripper().

#define CY_GRIPPER 3

Definition at line 313 of file CJToolBarBase.cpp.

Referenced by CCJToolBarBase::CalcInsideRect(), and CCJToolBarBase::DrawGripper().

Generated on Sat Aug 7 22:47:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJToolBarCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJToolBarCtrl.cpp File Reference

#include "stdafx.h"
#include "CJToolBarCtrl.h"

Include dependency graph for CJToolBarCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJTreeCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/CJTreeCtrl.cpp File Reference

#include "stdafx.h"
#include "CJResource.h"
#include "CJTreeCtrl.h"

Include dependency graph for CJTreeCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJWindowPlacement.cpp File Reference

WinCvs/CJLib/CJLibrary/CJWindowPlacement.cpp File Reference

#include "StdAfx.h"
#include "CJResource.h"
#include "CJWindowPlacement.h"

Include dependency graph for CJWindowPlacement.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/GfxGroupEdit.cpp File Reference

WinCvs/CJLib/CJLibrary/GfxGroupEdit.cpp File Reference

#include "stdafx.h"
#include "GfxGroupEdit.h"
#include "GfxOutBarCtrl.h"

Include dependency graph for GfxGroupEdit.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/GfxOutBarCtrl.cpp File Reference

WinCvs/CJLib/CJLibrary/GfxOutBarCtrl.cpp File Reference

#include "stdafx.h"
#include "CJResource.h"
#include "GfxOutBarCtrl.h"
#include "GfxGroupEdit.h"
#include "CJMenu.h"

Include dependency graph for GfxOutBarCtrl.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/GfxSplitterWnd.cpp File Reference

WinCvs/CJLib/CJLibrary/GfxSplitterWnd.cpp File Reference

#include "stdafx.h"
#include "GfxSplitterWnd.h"
#include <afxpriv.h>

Include dependency graph for GfxSplitterWnd.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define | CX_BORDER 1
#define | CY_BORDER 1

Functions

void AFXAPI | DeferClientPos (AFX_SIZEPARENTPARAMS *lpLayout, CWnd *pWnd, int x, int y, int cx, int cy, BOOL bScrollBar)
void AFXAPI | LayoutRowCol (CSplitterWnd::CRowColInfo *pInfoArray, int nMax, int nSize, int nSizeSplitter)

Variables

BOOL | bNotWin4

Define Documentation

#define CX_BORDER 1

Definition at line 44 of file GfxSplitterWnd.cpp.

Referenced by DeferClientPos(), CCJToolBarBase::DrawBorders(), LayoutRowCol(), CGfxSplitterWnd::OnDrawSplitter(), and CCJFlatSplitterWnd::OnDrawSplitter().

#define CY_BORDER 1

Definition at line 45 of file GfxSplitterWnd.cpp.

Referenced by DeferClientPos(), CCJToolBarBase::DrawBorders(), LayoutRowCol(), CGfxSplitterWnd::OnDrawSplitter(), and CCJFlatSplitterWnd::OnDrawSplitter().

Function Documentation

void AFXAPI DeferClientPos | ( | AFX_SIZEPARENTPARAMS * | lpLayout,
 |  | CWnd * | pWnd,
 |  | int | x,
 |  | int | y,
 |  | int | cx,
 |  | int | cy,
 |  | BOOL | bScrollBar
 | ) | [static]

Definition at line 133 of file GfxSplitterWnd.cpp.

References CX_BORDER, CY_BORDER, and NULL.

Referenced by CGfxSplitterWnd::RecalcLayout().

00135 {
00136     ASSERT(pWnd != NULL);
00137     ASSERT(pWnd->m_hWnd != NULL);
00138
00139     if (bScrollBar)
00140     {
00141         // if there is enough room, draw scroll bar without border
00142         // if there is not enough room, set the WS_BORDER bit so that
00143         //   we will at least get a proper border drawn
00144         BOOL bNeedBorder = (cx <= CX_BORDER || cy <= CY_BORDER);
00145         pWnd->ModifyStyle(bNeedBorder ? 0 : WS_BORDER,
00146             bNeedBorder ? WS_BORDER : 0);
00147     }
00148     CRect rect(x, y, x+cx, y+cy);
00149
00150     // adjust for border size (even if zero client size)
00151
00152     // adjust for 3d border (splitter windows have implied border)
00153     if ((pWnd->GetExStyle() & WS_EX_CLIENTEDGE) ||
00154           pWnd->IsKindOf(RUNTIME_CLASS(CSplitterWnd)))
00155         rect.InflateRect(CX_BORDER*2, CY_BORDER*2);
00156
00157     // first check if the new rectangle is the same as the current
00158     CRect rectOld;
00159     pWnd->GetWindowRect(rectOld);
00160     pWnd->GetParent()->ScreenToClient(&rectOld);
00161     if (rect != rectOld)
00162         AfxRepositionWindow(lpLayout, pWnd->m_hWnd, rect);
00163 }

void AFXAPI LayoutRowCol | ( | CSplitterWnd::CRowColInfo * | pInfoArray,
 |  | int | nMax,
 |  | int | nSize,
 |  | int | nSizeSplitter
 | ) | [static]

Definition at line 166 of file GfxSplitterWnd.cpp.

References CX_BORDER, CY_BORDER, and NULL.

Referenced by CGfxSplitterWnd::RecalcLayout().

00168 {
00169     ASSERT(pInfoArray != NULL);
00170     ASSERT(nMax > 0);
00171     ASSERT(nSizeSplitter > 0);
00172
00173     CSplitterWnd::CRowColInfo* pInfo;
00174     int i;
00175
00176     if (nSize < 0)
00177         nSize = 0;  // if really too small, layout as zero size
00178
00179     // start with ideal sizes
00180     for (i = 0, pInfo = pInfoArray; i < nMax-1; i++, pInfo++)
00181     {
00182         if (pInfo->nIdealSize < pInfo->nMinSize)
00183             pInfo->nIdealSize = 0;      // too small to see
00184         pInfo->nCurSize = pInfo->nIdealSize;
00185     }
00186     pInfo->nCurSize = INT_MAX;  // last row/column takes the rest
00187
00188     for (i = 0, pInfo = pInfoArray; i < nMax; i++, pInfo++)
00189     {
00190         ASSERT(nSize >= 0);
00191         if (nSize == 0)
00192         {
00193             // no more room (set pane to be invisible)
00194             pInfo->nCurSize = 0;
00195             continue;       // don't worry about splitters
00196         }
00197         else if (nSize < pInfo->nMinSize && i != 0)
00198         {
00199             // additional panes below the recommended minimum size
00200             //   aren't shown and the size goes to the previous pane
00201             pInfo->nCurSize = 0;
00202
00203             // previous pane already has room for splitter + border
00204             //   add remaining size and remove the extra border
00205             ASSERT(CX_BORDER*2 == CY_BORDER*2);
00206             (pInfo-1)->nCurSize += nSize + CX_BORDER*2;
00207             nSize = 0;
00208         }
00209         else
00210         {
00211             // otherwise we can add the second pane
00212             ASSERT(nSize > 0);
00213             if (pInfo->nCurSize == 0)
00214             {
00215                 // too small to see
00216                 if (i != 0)
00217                     pInfo->nCurSize = 0;
00218             }
00219             else if (nSize < pInfo->nCurSize)
00220             {
00221                 // this row/col won't fit completely - make as small as possible
00222                 pInfo->nCurSize = nSize;
00223                 nSize = 0;
00224             }
00225             else
00226             {
00227                 // can fit everything
00228                 nSize -= pInfo->nCurSize;
00229             }
00230         }
00231
00232         // see if we should add a splitter
00233         ASSERT(nSize >= 0);
00234         if (i != nMax - 1)
00235         {
00236             // should have a splitter
00237             if (nSize > nSizeSplitter)
00238             {
00239                 nSize -= nSizeSplitter; // leave room for splitter + border
00240                 ASSERT(nSize > 0);
00241             }
00242             else
00243             {
00244                 // not enough room - add left over less splitter size
00245                 ASSERT(CX_BORDER*2 == CY_BORDER*2);
00246                 pInfo->nCurSize += nSize;
00247                 if (pInfo->nCurSize > (nSizeSplitter - CX_BORDER*2))
00248                     pInfo->nCurSize -= (nSizeSplitter - CY_BORDER*2);
00249                 nSize = 0;
00250             }
00251         }
00252     }
00253     ASSERT(nSize == 0); // all space should be allocated
00254 }

Variable Documentation

BOOL bNotWin4 [static]

Definition at line 49 of file GfxSplitterWnd.cpp.

Referenced by CGfxSplitterWnd::CGfxSplitterWnd(), and CGfxSplitterWnd::RecalcLayout().

Generated on Sat Aug 7 22:47:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/Resource.h File Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WinCvs/CJLib/CJLibrary/Resource.h File Reference

Go to the source code of this file.

Generated on Sat Aug 7 22:47:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/StdAfx.cpp File Reference

WinCvs/CJLib/CJLibrary/StdAfx.cpp File Reference

#include "stdafx.h"

Include dependency graph for StdAfx.cpp:

Include dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:46:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/StdAfx.h File Reference

WinCvs/CJLib/CJLibrary/StdAfx.h File Reference

#include <afxwin.h>
#include <afxext.h>
#include <afxole.h>
#include <afxodlgs.h>
#include <afxdisp.h>
#include <afxdb.h>
#include <afxdao.h>
#include <afxcmn.h>
#include <afxtempl.h>
#include <afxpriv.h>
#include <..\src\afximpl.h>

Include dependency graph for StdAfx.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | AFX_STDAFX_H__F235A078_2921_11D3_8733_000000000000__INCLUDED_
#define | VC_EXTRALEAN
#define | _VC_VERSION_5
#define | _CJXLIB_INLINE inline
#define | _CJX_EXT_CLASS
#define | _delete(p) {if(p){delete p;p=NULL;}}
#define | _destroyIcon(h) {if(h){::DestroyIcon(h);h=NULL;}}

Define Documentation

#define _CJX_EXT_CLASS

Definition at line 77 of file StdAfx.h.

#define _CJXLIB_INLINE inline

Definition at line 70 of file StdAfx.h.

Referenced by CCJToolBar::AddButtons(), CCJComboBoxEx::AddString(), CCJToolBar::AddStrings(), CCJToolBar::AutoSize(), CCJReBarCtrl::BeginDrag(), CCJComboBoxEx::CCJComboBoxEx(), CCJDateTimeCtrl::CCJDateTimeCtrl(), CCJMonthCalCtrl::CCJMonthCalCtrl(), CContentItems::CContentItems(), CCJToolBar::CheckButton(), CCJSortClass::CSortItem::CSortItem(), CCJToolBar::Customize(), CCJReBarCtrl::DeleteBand(), CCJToolBar::DeleteButton(), CCJComboBoxEx::Dir(), CCJListView::DisableColumnSizing(), CCJListCtrl::DisableColumnSizing(), CCJFlatButton::DisableFlatLook(), CCJFlatSplitterWnd::DisableFlatStyle(), CCJReBarCtrl::DragMove(), CCJFlatComboBox::EnableAutoCompletion(), CCJToolBar::EnableButton(), CCJTreeCtrl::EnableMultiSelect(), CCJControlBar::EnableSaveState(), CCJReBarCtrl::EndDrag(), CCJComboBoxEx::FindString(), CCJSizeDockBar::FlatBorder(), CCJPagerCtrl::ForwardMouse(), CCJTabView::GetActiveView(), CCJTabCtrlBar::GetActiveView(), CCJToolBarCtrl::GetAnchorHighlight(), CCJReBarCtrl::GetBandBorders(), CCJReBarCtrl::GetBandCount(), CCJReBarCtrl::GetBandInfo(), CCJReBarCtrl::GetBarHeight(), CCJReBarCtrl::GetBarInfo(), CCJToolBar::GetBitmap(), CCJToolBar::GetBitmapFlags(), CCJReBarCtrl::GetBkColor(), CCJPagerCtrl::GetBkColor(), CCJPagerCtrl::GetBorder(), CCJToolBar::GetButtonCount(), CCJToolBarCtrl::GetButtonInfo(), CCJToolBarCtrl::GetButtonSize(), CCJPagerCtrl::GetButtonSize(), CCJPagerCtrl::GetButtonState(), CCJMonthCalCtrl::GetColor(), CCJComboBoxEx::GetComboBoxCtrl(), CCJMonthCalCtrl::GetCurSel(), CCJHexEdit::GetData(), CCJToolBarCtrl::GetDisabledImageList(), CCJReBarCtrl::GetDropTarget(), CCJPagerCtrl::GetDropTarget(), CCJComboBoxEx::GetEditCtrl(), CCJToolBarCtrl::GetExtendedStyle(), CCJComboBoxEx::GetExtendedStyle(), CCJControlBar::GetHorzSize(), CCJToolBarCtrl::GetHotImageList(), CCJToolBarCtrl::GetHotItem(), CCJToolBar::GetHotItem(), CContentItems::GetImageID(), CCJToolBarCtrl::GetImageList(), CCJToolBar::GetImageList(), CCJComboBoxEx::GetImageList(), CCJToolBarCtrl::GetInsertMark(), CCJToolBarCtrl::GetInsertMarkColor(), CCJLogoPane::GetLogoText(), CCJMonthCalCtrl::GetMaxSelCount(), CCJToolBarCtrl::GetMaxSize(), CCJToolBarCtrl::GetMaxTextRows(), CCJMenuBar::GetMenu(), CCJTabCtrl::GetMenuID(), CCJMDIChildWnd::GetMenuID(), CCJFlatHeaderCtrl::GetMenuID(), CCJControlBar::GetMenuID(), CCJMonthCalCtrl::GetMinReqRect(), CCJDateTimeCtrl::GetMonthCalColor(), CCJDateTimeCtrl::GetMonthCalCtrl(), CCJDateTimeCtrl::GetMonthCalFont(), CCJMonthCalCtrl::GetMonthDelta(), CCJBrowseButton::GetNextID(), CCJTreeCtrl::GetNextItem(), CCJToolBar::GetPadding(), CCJReBarCtrl::GetPalette(), CCJPagerCtrl::GetPos(), CCJReBar::GetReBarCtrl(), CCJToolBar::GetRect(), CCJReBarCtrl::GetRect(), CCJReBarCtrl::GetRowCount(), CCJReBarCtrl::GetRowHeight(), CCJToolBar::GetRows(), CCJHexEdit::GetSel(), CCJToolBar::GetState(), CCJToolBarCtrl::GetStyle(), CCJTabView::GetTabCtrl(), CContentItems::GetText(), CCJReBarCtrl::GetTextColor(), CCJDateTimeCtrl::GetTime(), CCJMonthCalCtrl::GetToday(), CCJMDIChildWnd::GetToolBarID(), CCJMDIChildWnd::GetToolBarIDs(), CCJToolBar::GetToolbarStyle(), CCJToolBar::GetToolTips(), CCJReBarCtrl::GetToolTips(), CCJMenuBar::GetTrackingState(), CCJControlBar::GetVertSize(), CCJHtmlView::GoBack(), CCJHtmlView::GoForward(), CCJHtmlView::GoHome(), CCJHtmlView::GoSearch(), CCJComboBoxEx::HasEditChanged(), CCJToolBar::HideButton(), CCJToolBarCtrl::HitTest(), CCJToolBar::HitTest(), CCJReBarCtrl::HitTest(), CCJMonthCalCtrl::HitTest(), CCJReBarCtrl::IDToIndex(), CCJToolBar::Indeterminate(), CCJReBarCtrl::InsertBand(), CCJToolBar::InsertButton(), CCJToolBarCtrl::InsertMarkHitTest(), CCJComboBoxEx::InsertString(), CCJControlBar::IsBottomDocked(), CCJToolBar::IsButtonChecked(), CCJToolBar::IsButtonEnabled(), CCJToolBar::IsButtonHidden(), CCJToolBarCtrl::IsButtonHighlighted(), CCJToolBar::IsButtonIndeterminate(), CCJToolBar::IsButtonPressed(), CCJSizeDockBar::IsDockSizeBar(), CCJControlBar::IsFloating(), CCJControlBar::IsHorzDocked(), CCJControlBar::IsLeftDocked(), CCJControlBar::IsRightDocked(), CCJHexEdit::IsSelected(), CCJControlBar::IsTopDocked(), CCJControlBar::IsVertDocked(), CCJToolBar::LoadBitmap(), CCJToolBar::LoadToolBar(), CCJToolBarCtrl::MapAccelerator(), CCJToolBar::MapAccelerator(), CCJToolBarCtrl::MarkButton(), CCJReBarCtrl::MaximizeBand(), CCJReBarCtrl::MinimizeBand(), CCJTabCtrlBar::ModifyTabStyle(), CCJReBarCtrl::MoveBand(), CCJToolBarCtrl::MoveButton(), CCJHexEdit::OnGetDlgCode(), CContentItems::operator=(), CCJFlatComboBox::PointInRect(), CCJToolBar::PressButton(), CCJHtmlView::PutProperty(), CCJPagerCtrl::RecalcSize(), CCJHtmlView::Refresh(), CCJHtmlView::Refresh2(), CCJToolBar::SendMessageC(), CCJSizeDockBar::SetActualSize(), CCJHtmlView::SetAddressBar(), CCJToolBarCtrl::SetAnchorHighlight(), CCJReBarCtrl::SetBandInfo(), CCJReBarCtrl::SetBarInfo(), CCJToolBar::SetBitmapSize(), CCJReBarCtrl::SetBkColor(), CCJPagerCtrl::SetBkColor(), CCJPagerCtrl::SetBorder(), CCJToolBarBase::SetBorders(), CCJHexEdit::SetBPR(), CCJFlatButton::SetButtonFont(), CCJToolBarCtrl::SetButtonInfo(), CCJToolBar::SetButtonSize(), CCJPagerCtrl::SetButtonSize(), CCJToolBar::SetButtonStructSize(), CCJToolBarCtrl::SetButtonWidth(), CCJCaption::SetCaptionColors(), CCJPagerCtrl::SetChild(), CCJControlBar::SetChild(), CCJToolBar::SetCmdID(), CCJMonthCalCtrl::SetColor(), CCJMonthCalCtrl::SetCurSel(), CCJToolBarCtrl::SetDisabledImageList(), CCJBrowseEdit::SetDlgDefExt(), CCJBrowseEdit::SetDlgFileName(), CCJBrowseEdit::SetDlgFilter(), CCJBrowseEdit::SetDlgOpenFile(), CCJBrowseEdit::SetDlgOwner(), CCJBrowseEdit::SetDlgStyle(), CCJBrowseEdit::SetDlgTitle(), CCJToolBarCtrl::SetDrawTextFlags(), CCJComboBoxEx::SetEditSel(), CCJToolBarCtrl::SetExtendedStyle(), CCJToolBar::SetExtendedStyle(), CCJListView::SetExtendedStyle(), CCJListCtrl::SetExtendedStyle(), CCJComboBoxEx::SetExtendedStyle(), CCJFlatHeaderCtrl::SetFontBold(), CCJDateTimeCtrl::SetFormat(), CCJHtmlView::SetFullScreen(), CCJHtmlView::SetHeight(), CCJFontCombo::SetHilightColors(), CCJToolBarCtrl::SetHotImageList(), CCJToolBarCtrl::SetHotItem(), CCJToolBar::SetHotItem(), CCJFlatButton::SetIcon(), CCJToolBarCtrl::SetImageList(), CCJToolBar::SetImageList(), CCJComboBoxEx::SetImageList(), CCJOutlookBar::SetImageLists(), CCJToolBarCtrl::SetIndent(), CCJToolBar::SetIndent(), CCJToolBarCtrl::SetInsertMark(), CCJToolBarCtrl::SetInsertMarkColor(), CCJOutlookBar::SetItems(), CCJHtmlView::SetLeft(), CCJLogoPane::SetLogoText(), CCJMonthCalCtrl::SetMaxSelCount(), CCJToolBarCtrl::SetMaxTextRows(), CCJHtmlView::SetMenuBar(), CCJTabCtrl::SetMenuID(), CCJControlBar::SetMenuID(), CCJListView::SetMinimumColSize(), CCJListCtrl::SetMinimumColSize(), CCJDateTimeCtrl::SetMonthCalColor(), CCJDateTimeCtrl::SetMonthCalFont(), CCJMonthCalCtrl::SetMonthDelta(), CCJFontCombo::SetNormalColors(), CCJControlBar::SetNormalSize(), CCJHtmlView::SetOffline(), CCJHexEdit::SetOptions(), CCJReBarCtrl::SetOwner(), CCJOutlookBar::SetOwner(), CCJToolBar::SetPadding(), CCJReBarCtrl::SetPalette(), CCJPagerCtrl::SetPos(), CCJHtmlView::SetRegisterAsDropTarget(), CCJMDIChildWnd::SetResourceIDs(), CCJListView::SetRowColors(), CCJListCtrl::SetRowColors(), CCJToolBar::SetRows(), CCJPagerCtrl::SetScrollArea(), CCJBrowseEdit::SetSearchType(), CCJHtmlView::SetSilent(), CCJToolBar::SetState(), CCJHtmlView::SetStatusBar(), CCJToolBarCtrl::SetStyle(), CCJTabCtrlBar::SetTabImageList(), CCJTabCtrlBar::SetTabMenuID(), CCJReBarCtrl::SetTextColor(), CCJCaption::SetTextStyle(), CCJHtmlView::SetTheaterMode(), CCJMonthCalCtrl::SetToday(), CCJHtmlView::SetToolBar(), CCJToolBar::SetToolbarStyle(), CCJToolBar::SetToolTips(), CCJReBarCtrl::SetToolTips(), CCJHtmlView::SetTop(), CCJHtmlView::SetVisible(), CCJReBarCtrl::ShowBand(), CCJControlBar::ShowFrameControls(), CCJReBarCtrl::SizeToRect(), and CCJHtmlView::Stop().

#define _delete ( p ) {if(p){delete p;p=NULL;}}

Definition at line 95 of file StdAfx.h.

Referenced by CCJFlatTabCtrl::DeleteAllItems(), CCJFlatTabCtrl::DeleteItem(), CCJCaption::KillChildWindow(), CCJCaption::OnCaptButton(), CCJFontCombo::OnDestroy(), CCJCaption::OnPushPinCancel(), CCJTabCtrlBar::RemoveListItem(), CCJFlatTabCtrl::~CCJFlatTabCtrl(), CCJListCtrl::~CCJListCtrl(), CCJListView::~CCJListView(), CCJMDIFrameWnd::~CCJMDIFrameWnd(), CCJTabCtrlBar::~CCJTabCtrlBar(), and CCJTabView::~CCJTabView().

#define _destroyIcon ( h ) {if(h){::DestroyIcon(h);h=NULL;}}

Definition at line 96 of file StdAfx.h.

Referenced by CCJControlBar::OnUpdateCmdUI(), CCJBrowseButton::~CCJBrowseButton(), CCJCaptionPopupWnd::~CCJCaptionPopupWnd(), CCJControlBar::~CCJControlBar(), and CCJExplorerBar::~CCJExplorerBar().

#define _VC_VERSION_5

Definition at line 66 of file StdAfx.h.

#define AFX_STDAFX_H__F235A078_2921_11D3_8733_000000000000__INCLUDED_

Definition at line 30 of file StdAfx.h.

#define VC_EXTRALEAN

Definition at line 36 of file StdAfx.h.

Generated on Sat Aug 7 22:46:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/Subclass.cpp File Reference

WinCvs/CJLib/CJLibrary/Subclass.cpp File Reference

#include "StdAfx.h"
#include "Subclass.h"

Include dependency graph for Subclass.cpp:

Include dependency graph

Go to the source code of this file.

Classes

class | CSubclassWndMap

Defines

#define | theHookMap (CSubclassWndMap::GetHookMap())

Functions

IMPLEMENT_DYNAMIC (CSubclassWnd, CWnd)
LRESULT CALLBACK | HookWndProc (HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)

Define Documentation

#define theHookMap (CSubclassWndMap::GetHookMap())

Definition at line 55 of file Subclass.cpp.

Referenced by CSubclassWnd::HookWindow(), and HookWndProc().

Function Documentation

LRESULT CALLBACK HookWndProc | ( | HWND | hwnd,
 |  | UINT | msg,
 |  | WPARAM | wp,
 |  | LPARAM | lp
 | ) |

Definition at line 150 of file Subclass.cpp.

References CSubclassWnd::m_pOldWndProc, theHookMap, and CSubclassWnd::WindowProc().

Referenced by CSubclassWndMap::Add().

00151 {
00152 #ifdef _USRDLL
00153     // If this is a DLL, need to set up MFC state
00154     AFX_MANAGE_STATE(AfxGetStaticModuleState());
00155 #endif
00156
00157     // Set up MFC message state just in case anyone wants it
00158     // This is just like AfxCallWindowProc, but we can't use that because
00159     // a CSubclassWnd is not a CWnd.
00160     //
00161     MSG& curMsg = AfxGetThreadState()->m_lastSentMsg;
00162     MSG  oldMsg = curMsg;   // save for nesting
00163     curMsg.hwnd     = hwnd;
00164     curMsg.message = msg;
00165     curMsg.wParam  = wp;
00166     curMsg.lParam  = lp;
00167
00168     // Get hook object for this window. Get from hook map
00169     CSubclassWnd* pSubclassWnd = theHookMap.Lookup(hwnd);
00170     ASSERT(pSubclassWnd);
00171
00172     LRESULT lr;
00173     if (msg==WM_NCDESTROY) {
00174         // Window is being destroyed: unhook all hooks (for this window)
00175         // and pass msg to orginal window proc
00176         //
00177         WNDPROC wndproc = pSubclassWnd->m_pOldWndProc;
00178         theHookMap.RemoveAll(hwnd);
00179         lr = ::CallWindowProc(wndproc, hwnd, msg, wp, lp);
00180
00181     } else {
00182         // pass to msg hook
00183         lr = pSubclassWnd->WindowProc(msg, wp, lp);
00184     }
00185     curMsg = oldMsg;            // pop state
00186     return lr;
00187 }

Here is the call graph for this function:

IMPLEMENT_DYNAMIC | ( | CSubclassWnd | ,
 |  | CWnd |
 | ) |

Generated on Sat Aug 7 22:47:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJBrowseEdit.h File Reference

WinCvs/CJLib/Include/CJBrowseEdit.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJBrowseButton
class | CCJBrowseEdit

Enumerations

enum BROWSE_TYPE {
BT_DIRECTORY = 1,
BT_FILE = 2,
BT_POPUPMENU = 3
}

Enumeration Type Documentation

enum BROWSE_TYPE

Enumeration values:
BT_DIRECTORY
BT_FILE
BT_POPUPMENU
Definition at line 74 of file CJBrowseEdit.h.
00074                          {
00075     BT_DIRECTORY = 1,
00076     BT_FILE      = 2,
00077     BT_POPUPMENU = 3
00078 };

Generated on Sat Aug 7 22:47:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJCaption.h File Reference

WinCvs/CJLib/Include/CJCaption.h File Reference

#include "CJFlatButton.h"

Include dependency graph for CJCaption.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJCaptionButton
class | CCJCaption

Defines

#define | WS_EX_FLATEDGE 0x01

Define Documentation

#define WS_EX_FLATEDGE 0x01

Definition at line 127 of file CJCaption.h.

Referenced by CCJCaptionPopupWnd::Create(), CCJCaption::Create(), and CCJCaption::DrawCaptionBack().

Generated on Sat Aug 7 22:47:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJCaptionPopupWnd.h File Reference

WinCvs/CJLib/Include/CJCaptionPopupWnd.h File Reference

#include "CJCaption.h"
#include "CJFlatButton.h"

Include dependency graph for CJCaptionPopupWnd.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJCaptionPopupWnd

Defines

#define | CM_ONPUSHPINBUTTON WM_USER + 1001
#define | CM_ONPUSHPINCANCEL WM_USER + 1002

Define Documentation

#define CM_ONPUSHPINBUTTON WM_USER + 1001

Definition at line 58 of file CJCaptionPopupWnd.h.

Referenced by CCJCaptionPopupWnd::OnCaptButton(), and CCJCaption::OnPushPinButton().

#define CM_ONPUSHPINCANCEL WM_USER + 1002

Definition at line 59 of file CJCaptionPopupWnd.h.

Referenced by CCJCaption::OnPushPinCancel(), and CCJCaptionPopupWnd::OnTimer().

Generated on Sat Aug 7 22:47:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJColorPicker.h File Reference

WinCvs/CJLib/Include/CJColorPicker.h File Reference

#include "CJColorPopup.h"

Include dependency graph for CJColorPicker.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJColorPicker

Defines

#define | CP_MODE_TEXT 1
#define | CP_MODE_BK 2

Functions

void AFXAPI | DDX_CJColorPicker (CDataExchange *pDX, int nIDC, COLORREF &crColor)

Define Documentation

#define CP_MODE_BK 2

Definition at line 73 of file CJColorPicker.h.

Referenced by CCJColorPicker::CCJColorPicker().

#define CP_MODE_TEXT 1

Definition at line 72 of file CJColorPicker.h.

Referenced by CCJColorPicker::GetColor(), and CCJColorPicker::SetColor().

Function Documentation

void AFXAPI DDX_CJColorPicker | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | COLORREF & | crColor
 | ) |

Definition at line 80 of file CJColorPicker.cpp.

References CCJColorPicker::GetColor(), NULL, and CCJColorPicker::SetColor().

00081 {
00082     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
00083     ASSERT (hWndCtrl != NULL);
00084
00085     CCJColorPicker* pColorPicker = (CCJColorPicker*) CWnd::FromHandle(hWndCtrl);
00086     if (pDX->m_bSaveAndValidate)
00087     {
00088         crColor = pColorPicker->GetColor();
00089     }
00090     else // initializing
00091     {
00092         pColorPicker->SetColor(crColor);
00093     }
00094 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:47:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJColorPopup.h File Reference

WinCvs/CJLib/Include/CJColorPopup.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | ColorTableEntry
class | CCJColorPopup

Defines

#define | CPN_SELCHANGE WM_USER + 1001
#define | CPN_DROPDOWN WM_USER + 1002
#define | CPN_CLOSEUP WM_USER + 1003
#define | CPN_SELENDOK WM_USER + 1004
#define | CPN_SELENDCANCEL WM_USER + 1005

Define Documentation

#define CPN_CLOSEUP WM_USER + 1003

Definition at line 57 of file CJColorPopup.h.

Referenced by CCJColorPicker::OnSelEndCancel(), and CCJColorPicker::OnSelEndOK().

#define CPN_DROPDOWN WM_USER + 1002

Definition at line 56 of file CJColorPopup.h.

Referenced by CCJColorPicker::OnClicked().

#define CPN_SELCHANGE WM_USER + 1001

Definition at line 55 of file CJColorPopup.h.

Referenced by CCJColorPopup::ChangeSelection(), CCJColorPicker::OnSelChange(), and CCJColorPicker::OnSelEndOK().

#define CPN_SELENDCANCEL WM_USER + 1005

Definition at line 59 of file CJColorPopup.h.

Referenced by CCJColorPopup::EndSelection(), CCJColorPopup::OnActivateApp(), CCJColorPopup::OnKeyDown(), CCJColorPopup::OnLButtonUp(), and CCJColorPicker::OnSelEndCancel().

#define CPN_SELENDOK WM_USER + 1004

Definition at line 58 of file CJColorPopup.h.

Referenced by CCJColorPopup::OnKeyDown(), CCJColorPopup::OnLButtonUp(), and CCJColorPicker::OnSelEndOK().

Generated on Sat Aug 7 22:47:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJComboBoxEx.h File Reference

WinCvs/CJLib/Include/CJComboBoxEx.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJComboBoxEx

Generated on Sat Aug 7 22:47:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJControlBar.h File Reference

WinCvs/CJLib/Include/CJControlBar.h File Reference

#include "CJFlatButton.h"
#include "CJMenu.h"

Include dependency graph for CJControlBar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJCBarButton
class | CCJControlBar

Defines

#define | AFX_IDW_SIZEBAR_LEFT AFX_IDW_DOCKBAR_LEFT + 4
#define | AFX_IDW_SIZEBAR_RIGHT AFX_IDW_DOCKBAR_RIGHT + 5
#define | AFX_IDW_SIZEBAR_TOP AFX_IDW_DOCKBAR_TOP + 6
#define | AFX_IDW_SIZEBAR_BOTTOM AFX_IDW_DOCKBAR_BOTTOM + 7

Enumerations

enum BTN_IMG_INDEX {
HIDE_CONTRLBAR,
MAXI_H_DISABLE,
MAXI_H_ENABLED,
MAXI_V_DISABLE,
MAXI_V_ENABLED,
NORM_H_DISABLE,
NORM_H_ENABLED,
NORM_V_DISABLE,
NORM_V_ENABLED
}
enum CHILD_BORDER {
NONE,
OUTLINE,
SUNKEN,
RAISED
}

Variables

const DWORD | dwSizeBarMap [4][2]

Define Documentation

#define AFX_IDW_SIZEBAR_BOTTOM AFX_IDW_DOCKBAR_BOTTOM + 7

Definition at line 522 of file CJControlBar.h.

Referenced by CCJSizeDockBar::DrawBorders(), CCJControlBar::IsBottomDocked(), CCJSizeDockBar::OnLButtonUp(), CCJSizeDockBar::OnMouseMove(), CCJSizeDockBar::OnNcCalcSize(), CCJSizeDockBar::OnNcLButtonDown(), and CCJDockContext::ToggleDocking().

#define AFX_IDW_SIZEBAR_LEFT AFX_IDW_DOCKBAR_LEFT + 4

Definition at line 519 of file CJControlBar.h.

Referenced by CCJSizeDockBar::DrawBorders(), CCJSizeDockBar::HitTest(), CCJControlBar::IsLeftDocked(), CCJSizeDockBar::OnLButtonUp(), CCJSizeDockBar::OnMouseMove(), CCJSizeDockBar::OnNcCalcSize(), and CCJSizeDockBar::OnNcLButtonDown().

#define AFX_IDW_SIZEBAR_RIGHT AFX_IDW_DOCKBAR_RIGHT + 5

Definition at line 520 of file CJControlBar.h.

Referenced by CCJSizeDockBar::DrawBorders(), CCJSizeDockBar::HitTest(), CCJControlBar::IsRightDocked(), CCJSizeDockBar::OnLButtonUp(), CCJSizeDockBar::OnMouseMove(), CCJSizeDockBar::OnNcCalcSize(), and CCJSizeDockBar::OnNcLButtonDown().

#define AFX_IDW_SIZEBAR_TOP AFX_IDW_DOCKBAR_TOP + 6

Definition at line 521 of file CJControlBar.h.

Referenced by CCJSizeDockBar::DrawBorders(), CCJSizeDockBar::HitTest(), CCJControlBar::IsTopDocked(), CCJSizeDockBar::OnLButtonUp(), CCJSizeDockBar::OnMouseMove(), CCJSizeDockBar::OnNcCalcSize(), and CCJSizeDockBar::OnNcLButtonDown().

Enumeration Type Documentation

enum BTN_IMG_INDEX

Enumeration values:
HIDE_CONTRLBAR
MAXI_H_DISABLE
MAXI_H_ENABLED
MAXI_V_DISABLE
MAXI_V_ENABLED
NORM_H_DISABLE
NORM_H_ENABLED
NORM_V_DISABLE
NORM_V_ENABLED
Definition at line 198 of file CJControlBar.h.

Referenced by CCJControlBar::OnUpdateCmdUI().

00198              { HIDE_CONTRLBAR,
00199     MAXI_H_DISABLE, MAXI_H_ENABLED, MAXI_V_DISABLE, MAXI_V_ENABLED,
00200     NORM_H_DISABLE, NORM_H_ENABLED, NORM_V_DISABLE, NORM_V_ENABLED
00201 } BTN_IMG_INDEX;

enum CHILD_BORDER

Enumeration values:
NONE
OUTLINE
SUNKEN
RAISED
Definition at line 203 of file CJControlBar.h.
00203 { NONE, OUTLINE, SUNKEN, RAISED } CHILD_BORDER;

Variable Documentation

const DWORD dwSizeBarMap[4][2]

Initial value:

{
    {  AFX_IDW_DOCKBAR_TOP + 6 ,      CBRS_TOP    },
    {  AFX_IDW_DOCKBAR_BOTTOM + 7 ,   CBRS_BOTTOM },
    {  AFX_IDW_DOCKBAR_LEFT + 4 ,     CBRS_LEFT   },
    {  AFX_IDW_DOCKBAR_RIGHT + 5 ,    CBRS_RIGHT  },
}
Definition at line 524 of file CJControlBar.h.

Referenced by CCJMDIFrameWnd::DockSizeBar(), CCJMDIChildWnd::DockSizeBar(), CCJFrameWnd::DockSizeBar(), CCJDockContext::DockSizeBar(), CCJMDIFrameWnd::EnableDockingSizeBar(), CCJMDIChildWnd::EnableDockingSizeBar(), CCJFrameWnd::EnableDockingSizeBar(), CCJSizeDockBar::RecalcAllExcept(), CCJMDIFrameWnd::RecalcAllExcept(), CCJMDIChildWnd::RecalcAllExcept(), and CCJFrameWnd::RecalcAllExcept().

Generated on Sat Aug 7 22:47:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJDateTimeCtrl.h File Reference

WinCvs/CJLib/Include/CJDateTimeCtrl.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJDateTimeCtrl
class | CCJMonthCalCtrl

Functions

void AFXAPI | DDX_CJDateTimeCtrl (CDataExchange *pDX, int nIDC, COleDateTime &value)
void AFXAPI | DDX_CJDateTimeCtrl (CDataExchange *pDX, int nIDC, CTime &value)
void AFXAPI | DDX_CJMonthCalCtrl (CDataExchange *pDX, int nIDC, COleDateTime &value)
void AFXAPI | DDX_CJMonthCalCtrl (CDataExchange *pDX, int nIDC, CTime &value)
void AFXAPI | DDV_CJMinMaxDateTime (CDataExchange *pDX, CTime &refValue, const CTime *pMinRange, const CTime *pMaxRange)
void AFXAPI | DDV_CJMinMaxDateTime (CDataExchange *pDX, COleDateTime &refValue, const COleDateTime *pMinRange, const COleDateTime *pMaxRange)
void AFXAPI | DDV_CJMinMaxMonth (CDataExchange *pDX, CTime &refValue, const CTime *pMinRange, const CTime *pMaxRange)
void AFXAPI | DDV_CJMinMaxMonth (CDataExchange *pDX, COleDateTime &refValue, const COleDateTime *pMinRange, const COleDateTime *pMaxRange)

Function Documentation

void AFXAPI DDV_CJMinMaxDateTime | ( | CDataExchange * | pDX,
 |  | COleDateTime & | refValue,
 |  | const COleDateTime * | pMinRange,
 |  | const COleDateTime * | pMaxRange
 | ) |

Definition at line 1076 of file CJDateTimeCtrl.cpp.

References NULL, and CCJDateTimeCtrl::SetRange().

01078 {
01079     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01080     CCJDateTimeCtrl* pWnd =
01081 #if _MFC_VER >= 0x700
01082         (CCJDateTimeCtrl*) pDX->m_pDlgWnd;
01083 #else
01084         (CCJDateTimeCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01085 #endif
01086
01087     if (!pDX->m_bSaveAndValidate)
01088     {
01089         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01090               (pMaxRange != NULL && *pMaxRange < refValue))
01091         {
01092 #if _MFC_VER >= 0x700
01093             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01094 #else
01095             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01096 #endif
01097             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01098             return;     // don't stop now
01099         }
01100     }
01101
01102     pWnd->SetRange(pMinRange, pMaxRange);
01103 }

Here is the call graph for this function:

void AFXAPI DDV_CJMinMaxDateTime | ( | CDataExchange * | pDX,
 |  | CTime & | refValue,
 |  | const CTime * | pMinRange,
 |  | const CTime * | pMaxRange
 | ) |

Definition at line 1044 of file CJDateTimeCtrl.cpp.

References NULL, and CCJDateTimeCtrl::SetRange().

01046 {
01047     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01048
01049     CCJDateTimeCtrl* pWnd =
01050 #if _MFC_VER >= 0x700
01051         (CCJDateTimeCtrl*) pDX->m_pDlgWnd;
01052 #else
01053         (CCJDateTimeCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01054 #endif
01055
01056     if (!pDX->m_bSaveAndValidate)
01057     {
01058         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01059               (pMaxRange != NULL && *pMaxRange < refValue))
01060         {
01061 #ifdef _DEBUG
01062 #if _MFC_VER >= 0x700
01063             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01064 #else
01065             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01066 #endif
01067             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01068 #endif
01069             return;     // don't stop now
01070         }
01071     }
01072
01073     pWnd->SetRange(pMinRange, pMaxRange);
01074 }

Here is the call graph for this function:

void AFXAPI DDV_CJMinMaxMonth | ( | CDataExchange * | pDX,
 |  | COleDateTime & | refValue,
 |  | const COleDateTime * | pMinRange,
 |  | const COleDateTime * | pMaxRange
 | ) |

Definition at line 1136 of file CJDateTimeCtrl.cpp.

References NULL, and CCJMonthCalCtrl::SetRange().

01138 {
01139     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01140     CCJMonthCalCtrl* pWnd =
01141 #if _MFC_VER >= 0x700
01142         (CCJMonthCalCtrl*) pDX->m_pDlgWnd;
01143 #else
01144         (CCJMonthCalCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01145 #endif
01146
01147     if (!pDX->m_bSaveAndValidate)
01148     {
01149         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01150               (pMaxRange != NULL && *pMaxRange < refValue))
01151         {
01152 #ifdef _DEBUG
01153 #if _MFC_VER >= 0x700
01154             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01155 #else
01156             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01157 #endif
01158             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01159 #endif
01160             return;     // don't stop now
01161         }
01162     }
01163
01164     pWnd->SetRange(pMinRange, pMaxRange);
01165 }

Here is the call graph for this function:

void AFXAPI DDV_CJMinMaxMonth | ( | CDataExchange * | pDX,
 |  | CTime & | refValue,
 |  | const CTime * | pMinRange,
 |  | const CTime * | pMaxRange
 | ) |

Definition at line 1105 of file CJDateTimeCtrl.cpp.

References NULL, and CCJMonthCalCtrl::SetRange().

01107 {
01108     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01109     CCJMonthCalCtrl* pWnd =
01110 #if _MFC_VER >= 0x700
01111         (CCJMonthCalCtrl*) pDX->m_pDlgWnd;
01112 #else
01113         (CCJMonthCalCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01114 #endif
01115
01116     if (!pDX->m_bSaveAndValidate)
01117     {
01118         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01119               (pMaxRange != NULL && *pMaxRange < refValue))
01120         {
01121 #ifdef _DEBUG
01122 #if _MFC_VER >= 0x700
01123             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01124 #else
01125             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01126 #endif
01127             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01128 #endif
01129             return;     // don't stop now
01130         }
01131     }
01132
01133     pWnd->SetRange(pMinRange, pMaxRange);
01134 }

Here is the call graph for this function:

void AFXAPI DDX_CJDateTimeCtrl | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CTime & | value
 | ) |

Definition at line 1010 of file CJDateTimeCtrl.cpp.

References CCJDateTimeCtrl::GetTime(), and CCJDateTimeCtrl::SetTime().

01011 {
01012     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01013     CCJDateTimeCtrl* pWnd = (CCJDateTimeCtrl*) CWnd::FromHandle(hWndCtrl);
01014
01015     if (pDX->m_bSaveAndValidate)
01016         pWnd->GetTime(value);
01017     else
01018         pWnd->SetTime(&value);
01019 }

Here is the call graph for this function:

void AFXAPI DDX_CJDateTimeCtrl | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | COleDateTime & | value
 | ) |

Definition at line 999 of file CJDateTimeCtrl.cpp.

References CCJDateTimeCtrl::GetTime(), and CCJDateTimeCtrl::SetTime().

01000 {
01001     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01002     CCJDateTimeCtrl* pWnd = (CCJDateTimeCtrl*) CWnd::FromHandle(hWndCtrl);
01003
01004     if (pDX->m_bSaveAndValidate)
01005         pWnd->GetTime(value);
01006     else
01007         pWnd->SetTime(value);
01008 }

Here is the call graph for this function:

void AFXAPI DDX_CJMonthCalCtrl | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CTime & | value
 | ) |

Definition at line 1033 of file CJDateTimeCtrl.cpp.

References CCJMonthCalCtrl::GetCurSel(), and CCJMonthCalCtrl::SetCurSel().

01034 {
01035     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01036     CCJMonthCalCtrl* pWnd = (CCJMonthCalCtrl*) CWnd::FromHandle(hWndCtrl);
01037
01038     if (pDX->m_bSaveAndValidate)
01039         pWnd->GetCurSel(value);
01040     else
01041         pWnd->SetCurSel(value);
01042 }

Here is the call graph for this function:

void AFXAPI DDX_CJMonthCalCtrl | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | COleDateTime & | value
 | ) |

Definition at line 1021 of file CJDateTimeCtrl.cpp.

References CCJMonthCalCtrl::GetCurSel(), and CCJMonthCalCtrl::SetCurSel().

01023 {
01024     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01025     CCJMonthCalCtrl* pWnd = (CCJMonthCalCtrl*) CWnd::FromHandle(hWndCtrl);
01026
01027     if (pDX->m_bSaveAndValidate)
01028         pWnd->GetCurSel(value);
01029     else
01030         pWnd->SetCurSel(value);
01031 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:47:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJDockBar.h File Reference

WinCvs/CJLib/Include/CJDockBar.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJDockBar

Generated on Sat Aug 7 22:47:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJDockContext.h File Reference

WinCvs/CJLib/Include/CJDockContext.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJDockContext

Generated on Sat Aug 7 22:47:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJExplorerBar.h File Reference

WinCvs/CJLib/Include/CJExplorerBar.h File Reference

#include "CJControlBar.h"
#include "CJCaption.h"

Include dependency graph for CJExplorerBar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJExplorerBar

Generated on Sat Aug 7 22:47:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatButton.h File Reference

WinCvs/CJLib/Include/CJFlatButton.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJFlatButton

Generated on Sat Aug 7 22:47:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatComboBox.h File Reference

WinCvs/CJLib/Include/CJFlatComboBox.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJFlatComboBox

Generated on Sat Aug 7 22:47:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatHeaderCtrl.h File Reference

WinCvs/CJLib/Include/CJFlatHeaderCtrl.h File Reference

#include "CJMenu.h"

Include dependency graph for CJFlatHeaderCtrl.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJFlatHeaderCtrl

Generated on Sat Aug 7 22:47:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatSplitterWnd.h File Reference

WinCvs/CJLib/Include/CJFlatSplitterWnd.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJFlatSplitterWnd

Generated on Sat Aug 7 22:47:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatTabCtrl.h File Reference

WinCvs/CJLib/Include/CJFlatTabCtrl.h File Reference

#include <afxtempl.h>
#include "CJMetaFileButton.h"

Include dependency graph for CJFlatTabCtrl.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJFlatTabCtrl

Defines

#define | FTS_BOTTOM 0x0002
#define | FTS_HASARROWS 0x0004
#define | FTS_HASHOMEEND 0x0008

Typedefs

typedef CList< CString *,
CString * > 		CTabList

Define Documentation

#define FTS_BOTTOM 0x0002

Definition at line 68 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl::OnCreate().

#define FTS_HASARROWS 0x0004

Definition at line 69 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl::OnCreate().

#define FTS_HASHOMEEND 0x0008

Definition at line 70 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl::OnCreate().

Typedef Documentation

typedef CList<CString*, CString*> CTabList

Definition at line 72 of file CJFlatTabCtrl.h.

Generated on Sat Aug 7 22:47:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFontCombo.h File Reference

WinCvs/CJLib/Include/CJFontCombo.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJFontCombo

Generated on Sat Aug 7 22:47:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFrameWnd.h File Reference

WinCvs/CJLib/Include/CJFrameWnd.h File Reference

#include "CJMenuBar.h"
#include "CJMenu.h"

Include dependency graph for CJFrameWnd.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJFrameWnd

Generated on Sat Aug 7 22:47:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJHexEdit.h File Reference

WinCvs/CJLib/Include/CJHexEdit.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJHexEdit

Generated on Sat Aug 7 22:47:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJHtmlView.h File Reference

WinCvs/CJLib/Include/CJHtmlView.h File Reference

#include <docobj.h>
#include <shlobj.h>
#include <exdisp.h>
#include <afxconv.h>

Include dependency graph for CJHtmlView.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJHtmlView

Generated on Sat Aug 7 22:47:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJHyperLink.h File Reference

WinCvs/CJLib/Include/CJHyperLink.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJHyperLink

Generated on Sat Aug 7 22:47:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJLibrary.h File Reference

WinCvs/CJLib/Include/CJLibrary.h File Reference

#include <afxtempl.h>
#include <afxpriv.h>
#include <..\src\afximpl.h>
#include "CJBrowseEdit.h"
#include "CJCaption.h"
#include "CJCaptionPopupWnd.h"
#include "CJColorPicker.h"
#include "CJComboBoxEx.h"
#include "CJControlBar.h"
#include "CJDateTimeCtrl.h"
#include "CJDockBar.h"
#include "CJDockContext.h"
#include "CJExplorerBar.h"
#include "CJFlatComboBox.h"
#include "CJFlatHeaderCtrl.h"
#include "CJFlatSplitterWnd.h"
#include "CJFlatTabCtrl.h"
#include "CJFontCombo.h"
#include "CJFrameWnd.h"
#include "CJHexEdit.h"
#include "CJHtmlView.h"
#include "CJHyperLink.h"
#include "CJListBox.h"
#include "CJListCtrl.h"
#include "CJListView.h"
#include "CJLogoPane.h"
#include "CJMaskEdit.h"
#include "CJMDIChildWnd.h"
#include "CJMDIFrameWnd.h"
#include "CJMemFile.h"
#include "CJMiniDockFrameWnd.h"
#include "CJOutlookBar.h"
#include "CJPagerCtrl.h"
#include "CJReBar.h"
#include "CJReBarCtrl.h"
#include "CJShell.h"
#include "CJShellList.h"
#include "CJShellTree.h"
#include "CJSizeDockBar.h"
#include "CJSortClass.h"
#include "CJStatusBar.h"
#include "CJTabCtrl.h"
#include "CJTabCtrlBar.h"
#include "CJTabView.h"
#include "CJTreeCtrl.h"
#include "CJWindowPlacement.h"
#include "GfxGroupEdit.h"
#include "GfxOutBarCtrl.h"
#include "GfxSplitterWnd.h"

Include dependency graph for CJLibrary.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | _VC_VERSION_5
#define | _CJX_EXT_CLASS
#define | _CJXLIB_INLINE inline
#define | _delete(p) {if(p){delete p;p=NULL;}}
#define | _CJX_COMMENT "CJ609LibStatic.lib"
#define | _CJX_MESSAGE "Automatically linking with CJ609LibStatic.lib"

Define Documentation

#define _CJX_COMMENT "CJ609LibStatic.lib"

Definition at line 369 of file CJLibrary.h.

#define _CJX_EXT_CLASS

Definition at line 97 of file CJLibrary.h.

#define _CJX_MESSAGE "Automatically linking with CJ609LibStatic.lib"

Definition at line 370 of file CJLibrary.h.

#define _CJXLIB_INLINE inline

Definition at line 102 of file CJLibrary.h.

#define _delete ( p ) {if(p){delete p;p=NULL;}}

Definition at line 335 of file CJLibrary.h.

#define _VC_VERSION_5

Definition at line 90 of file CJLibrary.h.

Generated on Sat Aug 7 22:47:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJListBox.h File Reference

WinCvs/CJLib/Include/CJListBox.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJListBox

Generated on Sat Aug 7 22:47:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJListCtrl.h File Reference

WinCvs/CJLib/Include/CJListCtrl.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJListCtrl

Generated on Sat Aug 7 22:47:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJListView.h File Reference

WinCvs/CJLib/Include/CJListView.h File Reference

#include <afxcview.h>

Include dependency graph for CJListView.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJListView

Generated on Sat Aug 7 22:47:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJLogoPane.h File Reference

WinCvs/CJLib/Include/CJLogoPane.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJLogoPane

Generated on Sat Aug 7 22:47:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMaskEdit.h File Reference

WinCvs/CJLib/Include/CJMaskEdit.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJMaskEdit
class | CCJDateEdit
class | CCJTimeEdit

Functions

void AFXAPI | DDX_OleDateTime (CDataExchange *pDX, int nIDC, CCJDateEdit &rControl, COleDateTime &rDateTime)

Function Documentation

void AFXAPI DDX_OleDateTime | ( | CDataExchange * | pDX,
 |  | int | nIDC,
 |  | CCJDateEdit & | rControl,
 |  | COleDateTime & | rDateTime
 | ) |

Definition at line 391 of file CJMaskEdit.cpp.

References CCJDateEdit::GetDateTime(), and CCJDateEdit::SetDateTime().

00392 {
00393     DDX_Control( pDX, nIDC, rControl );
00394
00395     if( pDX->m_bSaveAndValidate ) {
00396         rDateTime = rControl.GetDateTime();
00397     }
00398     else {
00399         rControl.SetDateTime( rDateTime );
00400     }
00401 }

Here is the call graph for this function:

Generated on Sat Aug 7 22:47:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMDIChildWnd.h File Reference

WinCvs/CJLib/Include/CJMDIChildWnd.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJMDIChildWnd

Generated on Sat Aug 7 22:47:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMDIFrameWnd.h File Reference

WinCvs/CJLib/Include/CJMDIFrameWnd.h File Reference

#include "CJMenuBar.h"
#include "CJMenu.h"

Include dependency graph for CJMDIFrameWnd.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJMDIFrameWnd

Typedefs

typedef CList< CCJMenu *,
CCJMenu * > 		CMDIMenuList

Typedef Documentation

typedef CList<CCJMenu*, CCJMenu*> CMDIMenuList

Definition at line 141 of file CJMDIFrameWnd.h.

Referenced by CMainFrame::GetMenuList().

Generated on Sat Aug 7 22:47:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMemFile.h File Reference

WinCvs/CJLib/Include/CJMemFile.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJMemFile

Generated on Sat Aug 7 22:47:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMenu.h File Reference

WinCvs/CJLib/Include/CJMenu.h File Reference

#include <afxtempl.h>

Include dependency graph for CJMenu.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJMenuData
struct | CMenuItemInfo
class | CCJMenu

Defines

#define | AppendMenu AppendMenuA
#define | InsertMenu InsertMenuA
#define | InsertODMenu InsertODMenuA
#define | AppendODMenu AppendODMenuA
#define | AppendODPopupMenu AppendODPopupMenuA
#define | ModifyODMenu ModifyODMenuA

Enumerations

enum HIGHLIGHTSTYLE {
Normal,
TextOnly
}

Define Documentation

#define AppendMenu AppendMenuA

Definition at line 81 of file CJMenu.h.

Referenced by CColorMenu::AppendColorMenuItem(), CCJMenu::AppendMenuA(), and CCJMenu::AppendODMenuW().

#define AppendODMenu AppendODMenuA

Definition at line 84 of file CJMenu.h.

#define AppendODPopupMenu AppendODPopupMenuA

Definition at line 85 of file CJMenu.h.

#define InsertMenu InsertMenuA

Definition at line 82 of file CJMenu.h.

Referenced by CCJMenu::InsertODMenuW().

#define InsertODMenu InsertODMenuA

Definition at line 83 of file CJMenu.h.

#define ModifyODMenu ModifyODMenuA

Definition at line 86 of file CJMenu.h.

Referenced by CCJMenu::LoadToolbar().

Enumeration Type Documentation

enum HIGHLIGHTSTYLE

Enumeration values:
Normal
TextOnly
Definition at line 78 of file CJMenu.h.
00078 {Normal,TextOnly} HIGHLIGHTSTYLE;

Generated on Sat Aug 7 22:47:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMenuBar.h File Reference

WinCvs/CJLib/Include/CJMenuBar.h File Reference

#include "CJToolBar.h"
#include "CJMenu.h"
#include "Subclass.h"

Include dependency graph for CJMenuBar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJMenuBarFrameHook
class | CCJMenuBar

Enumerations

enum TRACKINGSTATE {
TRACK_NONE = 0,
TRACK_BUTTON,
TRACK_POPUP
}

Enumeration Type Documentation

enum TRACKINGSTATE

Enumeration values:
TRACK_NONE
TRACK_BUTTON
TRACK_POPUP
Definition at line 71 of file CJMenuBar.h.

Referenced by CCJMenuBar::GetTrackingState().

00071                            { // menubar has three states:
00072     TRACK_NONE = 0,   // * normal, not tracking anything
00073     TRACK_BUTTON,     // * tracking buttons (F10/Alt mode)
00074     TRACK_POPUP       // * tracking popups
00075 };

Generated on Sat Aug 7 22:47:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMetaFileButton.h File Reference

WinCvs/CJLib/Include/CJMetaFileButton.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJMetaFileButton

Generated on Sat Aug 7 22:47:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMiniDockFrameWnd.h File Reference

WinCvs/CJLib/Include/CJMiniDockFrameWnd.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJMiniDockFrameWnd

Generated on Sat Aug 7 22:47:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJOutlookBar.h File Reference

WinCvs/CJLib/Include/CJOutlookBar.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CContentItems
class | CCJOutlookBar

Defines

#define | OBN_SELENDOK (WM_USER + 1)
#define | OB_CYBUTTON 70

Define Documentation

#define OB_CYBUTTON 70

Definition at line 220 of file CJOutlookBar.h.

#define OBN_SELENDOK (WM_USER + 1)

Definition at line 219 of file CJOutlookBar.h.

Referenced by CCJOutlookBar::OnLButtonUp().

Generated on Sat Aug 7 22:47:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJPagerCtrl.h File Reference

WinCvs/CJLib/Include/CJPagerCtrl.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJPagerCtrl

Generated on Sat Aug 7 22:47:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJReBar.h File Reference

WinCvs/CJLib/Include/CJReBar.h File Reference

#include "CJToolBarBase.h"

Include dependency graph for CJReBar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJReBar

Generated on Sat Aug 7 22:47:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJReBarCtrl.h File Reference

WinCvs/CJLib/Include/CJReBarCtrl.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJReBarCtrl

Generated on Sat Aug 7 22:47:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJResource.h File Reference

WinCvs/CJLib/Include/CJResource.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | IDR_POPUP_HEX_EDIT 103
#define | IDS_HIDE 5000
#define | IDC_NODRAGGING 5001
#define | IDS_NAME 5001
#define | IDS_EXPAND 5002
#define | IDC_DRAGGING 5003
#define | IDS_SIZE 5003
#define | IDS_CONTRACT 5004
#define | IDC_HANDCUR 5005
#define | IDS_TYPE 5005
#define | IDB_BUTTON_IMAGES 5006
#define | IDS_MODIFIED 5006
#define | IDC_TAB_CONTROL 5007
#define | IDS_REGKEY 5007
#define | IDR_CBAR_POPUP 5008
#define | IDS_INVALID_VER 5008
#define | IDC_URL_CODEJOCKEY 5009
#define | IDS_WIN_PLACEMENT 5009
#define | IDB_BTN_EXPLORER 5010
#define | IDS_COLOR_AUTO 5010
#define | IDM_CBAR_MENU 5011
#define | IDS_COLOR_CUST 5011
#define | IDC_BUTTON_HIDE 5012
#define | IDS_SECTION 5012
#define | IDC_BUTTON_MINI 5013
#define | IDS_ENTRY 5013
#define | IDC_BAR_BUTTON 5014
#define | IDS_REMOVEITEM 5014
#define | IDC_BAR_CAPTION 5015
#define | IDS_RENAMEITEM 5015
#define | IDB_BTN_ARROW 5016
#define | ID_GFX_LARGEICON 5017
#define | ID_GFX_SMALLICON 5018
#define | ID_GFX_REMOVEITEM 5019
#define | IDC_VSPLITBAR 5020
#define | ID_GFX_RENAMEITEM 5021
#define | IDC_HSPLITBAR 5022
#define | IDR_GFXOUTBAR 5023
#define | IDR_POPUP_TOOLBAR 5024
#define | IDS_SETTINGS 5025
#define | IDS_TBAR_SETTINGS 5026
#define | ID_POPUP_CUSTOMIZE 5027
#define | IDS_WNDPOS 5028
#define | IDC_CAPT_BUTTON 5029
#define | IDB_PUSHPIN 5030
#define | IDC_LEFTBUTTON 5031
#define | IDC_RIGHTBUTTON 5032
#define | IDC_HOMEBUTTON 5033
#define | IDC_ENDBUTTON 5034

Define Documentation

#define ID_GFX_LARGEICON 5017

Definition at line 36 of file CJResource.h.

#define ID_GFX_REMOVEITEM 5019

Definition at line 38 of file CJResource.h.

Referenced by CGfxOutBarCtrl::OnRButtonDown().

#define ID_GFX_RENAMEITEM 5021

Definition at line 40 of file CJResource.h.

Referenced by CGfxOutBarCtrl::OnRButtonDown().

#define ID_GFX_SMALLICON 5018

Definition at line 37 of file CJResource.h.

#define ID_POPUP_CUSTOMIZE 5027

Definition at line 46 of file CJResource.h.

#define IDB_BTN_ARROW 5016

Definition at line 35 of file CJResource.h.

Referenced by CCJBrowseButton::Create().

#define IDB_BTN_EXPLORER 5010

Definition at line 23 of file CJResource.h.

#define IDB_BUTTON_IMAGES 5006

Definition at line 15 of file CJResource.h.

Referenced by CCJControlBar::CCJControlBar().

#define IDB_PUSHPIN 5030

Definition at line 49 of file CJResource.h.

Referenced by CCJCaptionPopupWnd::Create(), and CCJExplorerBar::OnCreate().

#define IDC_BAR_BUTTON 5014

Definition at line 31 of file CJResource.h.

Referenced by CCJExplorerBar::OnCreate().

#define IDC_BAR_CAPTION 5015

Definition at line 33 of file CJResource.h.

#define IDC_BUTTON_HIDE 5012

Definition at line 27 of file CJResource.h.

Referenced by CCJControlBar::OnCreate().

#define IDC_BUTTON_MINI 5013

Definition at line 29 of file CJResource.h.

Referenced by CCJControlBar::OnCreate().

#define IDC_CAPT_BUTTON 5029

Definition at line 48 of file CJResource.h.

Referenced by CCJCaptionPopupWnd::Create(), and CCJCaption::Create().

#define IDC_DRAGGING 5003

Definition at line 10 of file CJResource.h.

Referenced by CGfxOutBarCtrl::CGfxOutBarCtrl().

#define IDC_ENDBUTTON 5034

Definition at line 53 of file CJResource.h.

Referenced by CCJFlatTabCtrl::OnCreate().

#define IDC_HANDCUR 5005

Definition at line 13 of file CJResource.h.

Referenced by CCJFlatButton::CCJFlatButton(), and CGfxOutBarCtrl::CGfxOutBarCtrl().

#define IDC_HOMEBUTTON 5033

Definition at line 52 of file CJResource.h.

Referenced by CCJFlatTabCtrl::OnCreate().

#define IDC_HSPLITBAR 5022

Definition at line 41 of file CJResource.h.

Referenced by CCJSizeDockBar::HitTest(), and CCJControlBar::HitTest().

#define IDC_LEFTBUTTON 5031

Definition at line 50 of file CJResource.h.

Referenced by CCJFlatTabCtrl::OnCreate().

#define IDC_NODRAGGING 5001

Definition at line 7 of file CJResource.h.

Referenced by CGfxOutBarCtrl::CGfxOutBarCtrl().

#define IDC_RIGHTBUTTON 5032

Definition at line 51 of file CJResource.h.

Referenced by CCJFlatTabCtrl::OnCreate().

#define IDC_TAB_CONTROL 5007

Definition at line 17 of file CJResource.h.

Referenced by CCJTabCtrlBar::OnCreate().

#define IDC_URL_CODEJOCKEY 5009

Definition at line 21 of file CJResource.h.

#define IDC_VSPLITBAR 5020

Definition at line 39 of file CJResource.h.

Referenced by CCJSizeDockBar::HitTest(), and CCJControlBar::HitTest().

#define IDM_CBAR_MENU 5011

Definition at line 25 of file CJResource.h.

#define IDR_CBAR_POPUP 5008

Definition at line 19 of file CJResource.h.

#define IDR_GFXOUTBAR 5023

Definition at line 42 of file CJResource.h.

Referenced by CGfxOutBarCtrl::OnRButtonDown().

#define IDR_POPUP_HEX_EDIT 103

Definition at line 5 of file CJResource.h.

Referenced by CCJHexEdit::OnContextMenu().

#define IDR_POPUP_TOOLBAR 5024

Definition at line 43 of file CJResource.h.

#define IDS_COLOR_AUTO 5010

Definition at line 24 of file CJResource.h.

Referenced by CCJColorPicker::CCJColorPicker(), and CCJColorPopup::CCJColorPopup().

#define IDS_COLOR_CUST 5011

Definition at line 26 of file CJResource.h.

Referenced by CCJColorPicker::CCJColorPicker(), and CCJColorPopup::CCJColorPopup().

#define IDS_CONTRACT 5004

Definition at line 12 of file CJResource.h.

Referenced by CCJControlBar::OnUpdateCmdUI().

#define IDS_ENTRY 5013

Definition at line 30 of file CJResource.h.

#define IDS_EXPAND 5002

Definition at line 9 of file CJResource.h.

Referenced by CCJControlBar::OnCreate(), and CCJControlBar::OnUpdateCmdUI().

#define IDS_HIDE 5000

Definition at line 6 of file CJResource.h.

Referenced by CCJControlBar::OnCreate().

#define IDS_INVALID_VER 5008

Definition at line 20 of file CJResource.h.

#define IDS_MODIFIED 5006

Definition at line 16 of file CJResource.h.

#define IDS_NAME 5001

Definition at line 8 of file CJResource.h.

#define IDS_REGKEY 5007

Definition at line 18 of file CJResource.h.

#define IDS_REMOVEITEM 5014

Definition at line 32 of file CJResource.h.

Referenced by CGfxOutBarCtrl::CGfxOutBarCtrl().

#define IDS_RENAMEITEM 5015

Definition at line 34 of file CJResource.h.

Referenced by CGfxOutBarCtrl::CGfxOutBarCtrl().

#define IDS_SECTION 5012

Definition at line 28 of file CJResource.h.

#define IDS_SETTINGS 5025

Definition at line 44 of file CJResource.h.

Referenced by CCJWindowPlacement::LoadWindowPos().

#define IDS_SIZE 5003

Definition at line 11 of file CJResource.h.

#define IDS_TBAR_SETTINGS 5026

Definition at line 45 of file CJResource.h.

#define IDS_TYPE 5005

Definition at line 14 of file CJResource.h.

#define IDS_WIN_PLACEMENT 5009

Definition at line 22 of file CJResource.h.

Referenced by CCJWindowPlacement::LoadWindowPos().

#define IDS_WNDPOS 5028

Definition at line 47 of file CJResource.h.

Referenced by CCJWindowPlacement::LoadWindowPos().

Generated on Sat Aug 7 22:47:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJShell.h File Reference

WinCvs/CJLib/Include/CJShell.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJShellList.h File Reference

WinCvs/CJLib/Include/CJShellList.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJShellTree.h File Reference

WinCvs/CJLib/Include/CJShellTree.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Generated on Sat Aug 7 22:47:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJSizeDockBar.h File Reference

WinCvs/CJLib/Include/CJSizeDockBar.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJSizeDockBar

Generated on Sat Aug 7 22:47:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJSortClass.h File Reference

WinCvs/CJLib/Include/CJSortClass.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJSortClass
struct | CCJSortClass::CSortItem

Enumerations

enum DATA_TYPE {
DT_INT = 1,
DT_STRING,
DT_DATETIME,
DT_DEC
}

Enumeration Type Documentation

enum DATA_TYPE

Enumeration values:
DT_INT
DT_STRING
DT_DATETIME
DT_DEC
Definition at line 38 of file CJSortClass.h.

Referenced by CCJSortClass::Compare().

00039 {
00040     DT_INT = 1,     // sort type int
00041     DT_STRING,      // sort type string
00042     DT_DATETIME,    // sort type date / time
00043     DT_DEC          // sort type decimal
00044 };

Generated on Sat Aug 7 22:47:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJStatusBar.h File Reference

WinCvs/CJLib/Include/CJStatusBar.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJStatusBarPaneControlInfo
class | CCJStatusBarPane
class | CCJStatusBar

Generated on Sat Aug 7 22:47:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJTabCtrl.h File Reference

WinCvs/CJLib/Include/CJTabCtrl.h File Reference

#include "CJMenu.h"

Include dependency graph for CJTabCtrl.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJTabCtrl

Generated on Sat Aug 7 22:47:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJTabCtrlBar.h File Reference

WinCvs/CJLib/Include/CJTabCtrlBar.h File Reference

#include <afxtempl.h>
#include "CJControlBar.h"
#include "CJTabCtrl.h"

Include dependency graph for CJTabCtrlBar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | tagTCB_ITEM
class | CCJTabCtrlBar

Typedefs

typedef tagTCB_ITEM | TCB_ITEM
typedef CList< TCB_ITEM *,
TCB_ITEM * > 		CTabViews

Typedef Documentation

typedef CList<TCB_ITEM *,TCB_ITEM *> CTabViews

Definition at line 179 of file CJTabCtrlBar.h.

typedef struct tagTCB_ITEM TCB_ITEM

Referenced by CCJTabCtrlBar::AddToolTip(), CCJTabCtrlBar::CreateTabListItem(), CCJTabCtrlBar::DeleteView(), CCJTabCtrlBar::GetView(), CCJTabCtrlBar::GetViewName(), CCJTabCtrlBar::OnWindowPosChanged(), CCJTabCtrlBar::RemoveListItem(), CCJTabCtrlBar::ResetToolTips(), CCJTabCtrlBar::SetActiveView(), CCJTabCtrlBar::SetViewToolTip(), and CCJTabCtrlBar::~CCJTabCtrlBar().

Generated on Sat Aug 7 22:47:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJTabView.h File Reference

WinCvs/CJLib/Include/CJTabView.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | tagCTV_ITEM
class | CCJTabView

Defines

#define | TABVIEW_BORDER 3

Typedefs

typedef tagCTV_ITEM | CTV_ITEM
typedef CList< CTV_ITEM *,
CTV_ITEM * > 		CListViews

Define Documentation

#define TABVIEW_BORDER 3

Definition at line 52 of file CJTabView.h.

Referenced by CCJTabView::CalcViewRect().

Typedef Documentation

typedef CList<CTV_ITEM*, CTV_ITEM *> CListViews

Definition at line 55 of file CJTabView.h.

typedef struct tagCTV_ITEM CTV_ITEM

Referenced by CCJTabView::AddView(), CCJTabView::GetView(), CCJTabView::OnWindowPosChanged(), CCJTabView::SetActiveView(), and CCJTabView::~CCJTabView().

Generated on Sat Aug 7 22:47:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJToolBar.h File Reference

WinCvs/CJLib/Include/CJToolBar.h File Reference

#include "CJToolBarBase.h"
#include "CJToolBarCtrl.h"

Include dependency graph for CJToolBar.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | DROPDOWNBUTTON
struct | TOOLBARINFO
class | CCJToolBar

Defines

#define | VERSION_WIN4 MAKELONG(0, 4)
#define | VERSION_IE3 MAKELONG(70, 4)
#define | VERSION_IE4 MAKELONG(71, 4)
#define | VERSION_IE401 MAKELONG(72, 4)
#define | TBBS_BUTTON MAKELONG(TBSTYLE_BUTTON, 0)
#define | TBBS_SEPARATOR MAKELONG(TBSTYLE_SEP, 0)
#define | TBBS_CHECKBOX MAKELONG(TBSTYLE_CHECK, 0)
#define | TBBS_GROUP MAKELONG(TBSTYLE_GROUP, 0)
#define | TBBS_CHECKGROUP (TBBS_GROUP|TBBS_CHECKBOX)
#define | TBBS_DROPDOWN MAKELONG(TBSTYLE_DROPDOWN, 0)
#define | TBBS_AUTOSIZE MAKELONG(TBSTYLE_AUTOSIZE, 0)
#define | TBBS_NOPREFIX MAKELONG(TBSTYLE_NOPREFIX, 0)
#define | TBBS_CHECKED MAKELONG(0, TBSTATE_CHECKED)
#define | TBBS_PRESSED MAKELONG(0, TBSTATE_PRESSED)
#define | TBBS_DISABLED MAKELONG(0, TBSTATE_ENABLED)
#define | TBBS_INDETERMINATE MAKELONG(0, TBSTATE_INDETERMINATE)
#define | TBBS_HIDDEN MAKELONG(0, TBSTATE_HIDDEN)
#define | TBBS_WRAPPED MAKELONG(0, TBSTATE_WRAP)
#define | TBBS_ELLIPSES MAKELONG(0, TBSTATE_ELIPSES)
#define | TBBS_MARKED MAKELONG(0, TBSTATE_MARKED)

Functions

DWORD AFXAPI | _GetComCtlVersion ()
HBITMAP AFXAPI | _LoadSysColorBitmap (HINSTANCE hInst, HRSRC hRsrc, BOOL bMono=FALSE)

Variables

int _ComCtlVersion

Define Documentation

#define TBBS_AUTOSIZE MAKELONG(TBSTYLE_AUTOSIZE, 0)

Definition at line 501 of file CJToolBar.h.

#define TBBS_BUTTON MAKELONG(TBSTYLE_BUTTON, 0)

Definition at line 495 of file CJToolBar.h.

Referenced by UToolbar::RebuildBar().

#define TBBS_CHECKBOX MAKELONG(TBSTYLE_CHECK, 0)

Definition at line 497 of file CJToolBar.h.

Referenced by UToolbar::RebuildBar(), and CCJToolCmdUI::SetCheck().

#define TBBS_CHECKED MAKELONG(0, TBSTATE_CHECKED)

Definition at line 505 of file CJToolBar.h.

Referenced by CCJToolCmdUI::SetCheck().

#define TBBS_CHECKGROUP (TBBS_GROUP|TBBS_CHECKBOX)

Definition at line 499 of file CJToolBar.h.

#define TBBS_DISABLED MAKELONG(0, TBSTATE_ENABLED)

Definition at line 507 of file CJToolBar.h.

Referenced by CCJToolCmdUI::Enable().

#define TBBS_DROPDOWN MAKELONG(TBSTYLE_DROPDOWN, 0)

Definition at line 500 of file CJToolBar.h.

#define TBBS_ELLIPSES MAKELONG(0, TBSTATE_ELIPSES)

Definition at line 511 of file CJToolBar.h.

#define TBBS_GROUP MAKELONG(TBSTYLE_GROUP, 0)

Definition at line 498 of file CJToolBar.h.

#define TBBS_HIDDEN MAKELONG(0, TBSTATE_HIDDEN)

Definition at line 509 of file CJToolBar.h.

#define TBBS_INDETERMINATE MAKELONG(0, TBSTATE_INDETERMINATE)

Definition at line 508 of file CJToolBar.h.

Referenced by CCJToolCmdUI::SetCheck().

#define TBBS_MARKED MAKELONG(0, TBSTATE_MARKED)

Definition at line 512 of file CJToolBar.h.

#define TBBS_NOPREFIX MAKELONG(TBSTYLE_NOPREFIX, 0)

Definition at line 502 of file CJToolBar.h.

#define TBBS_PRESSED MAKELONG(0, TBSTATE_PRESSED)

Definition at line 506 of file CJToolBar.h.

Referenced by CCJToolCmdUI::Enable().

#define TBBS_SEPARATOR MAKELONG(TBSTYLE_SEP, 0)

Definition at line 496 of file CJToolBar.h.

Referenced by CMainFrame::CreateLocationCombo(), CCJToolCmdUI::Enable(), CCJToolBar::InsertControl(), UToolbar::RebuildBar(), and CCJToolCmdUI::SetCheck().

#define TBBS_WRAPPED MAKELONG(0, TBSTATE_WRAP)

Definition at line 510 of file CJToolBar.h.

#define VERSION_IE3 MAKELONG(70, 4)

Definition at line 78 of file CJToolBar.h.

Referenced by CCJToolBar::GetButtonSize().

#define VERSION_IE4 MAKELONG(71, 4)

Definition at line 79 of file CJToolBar.h.

Referenced by DllMain(), CCJToolBar::GetButtonSize(), CCJToolBar::OnNcCalcSize(), CCJToolBar::OnPreserveZeroBorderHelper(), CCJToolBar::OnSetSizeHelper(), and CCJToolBar::SetButtons().

#define VERSION_IE401 MAKELONG(72, 4)

Definition at line 80 of file CJToolBar.h.

#define VERSION_WIN4 MAKELONG(0, 4)

Definition at line 77 of file CJToolBar.h.

Referenced by _GetComCtlVersion().

Function Documentation

DWORD AFXAPI _GetComCtlVersion ( )

Definition at line 229 of file CJToolBar.cpp.

References _ComCtlVersion, AFX_DLLGETVERSIONPROC, NULL, and VERSION_WIN4.

Referenced by CCJReBar::Create(), CCJToolBar::CreateEx(), and DllMain().

00230 {
00231     // return cached version if already determined...
00232     if (_ComCtlVersion != -1)
00233         return _ComCtlVersion;
00234
00235     // otherwise determine comctl32.dll version via DllGetVersion
00236     HINSTANCE hInst = ::GetModuleHandleA("COMCTL32.DLL");
00237     ASSERT(hInst != NULL);
00238     AFX_DLLGETVERSIONPROC pfn;
00239     pfn = (AFX_DLLGETVERSIONPROC)GetProcAddress(hInst, "DllGetVersion");
00240     DWORD dwVersion = VERSION_WIN4;
00241     if (pfn != NULL)
00242     {
00243         AFX_DLLVERSIONINFO dvi;
00244         memset(&dvi, 0, sizeof(dvi));
00245         dvi.cbSize = sizeof(dvi);
00246         HRESULT hr = (*pfn)(&dvi);
00247         if (SUCCEEDED(hr))
00248         {
00249             ASSERT(dvi.dwMajorVersion <= 0xFFFF);
00250             ASSERT(dvi.dwMinorVersion <= 0xFFFF);
00251             dwVersion = MAKELONG(dvi.dwMinorVersion, dvi.dwMajorVersion);
00252         }
00253     }
00254     _ComCtlVersion = dwVersion;
00255     return dwVersion;
00256 }

HBITMAP AFXAPI _LoadSysColorBitmap | ( | HINSTANCE | hInst,
 |  | HRSRC | hRsrc,
 |  | BOOL | bMono = FALSE
 | ) |

Definition at line 141 of file CJToolBar.cpp.

References _CLR_TO_RGBQUAD, _countof, _RGB_TO_RGBQUAD, _sysColorMap, CJX_COLORMAP::iSysColorTo, NULL, and CJX_COLORMAP::rgbqFrom.

Referenced by CCJToolBar::LoadBitmap(), and CCJToolBar::OnSysColorChange().

00142 {
00143     HGLOBAL hglb;
00144     if ((hglb = LoadResource(hInst, hRsrc)) == NULL)
00145         return NULL;
00146
00147     LPBITMAPINFOHEADER lpBitmap = (LPBITMAPINFOHEADER)LockResource(hglb);
00148     if (lpBitmap == NULL)
00149         return NULL;
00150
00151     // make copy of BITMAPINFOHEADER so we can modify the color table
00152     const int nColorTableSize = 16;
00153     UINT nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
00154     LPBITMAPINFOHEADER lpBitmapInfo = (LPBITMAPINFOHEADER)::malloc(nSize);
00155     if (lpBitmapInfo == NULL)
00156         return NULL;
00157     memcpy(lpBitmapInfo, lpBitmap, nSize);
00158
00159     // color table is in RGBQUAD DIB format
00160     DWORD* pColorTable =
00161         (DWORD*)(((LPBYTE)lpBitmapInfo) + (UINT)lpBitmapInfo->biSize);
00162
00163     for (int iColor = 0; iColor < nColorTableSize; iColor++)
00164     {
00165         // look for matching RGBQUAD color in original
00166         for (int i = 0; i < _countof(_sysColorMap); i++)
00167         {
00168             if (pColorTable[iColor] == _sysColorMap[i].rgbqFrom)
00169             {
00170                 if (bMono)
00171                 {
00172                     // all colors except text become white
00173                     if (_sysColorMap[i].iSysColorTo != COLOR_BTNTEXT)
00174                         pColorTable[iColor] = _RGB_TO_RGBQUAD(255, 255, 255);
00175                 }
00176                 else
00177                     pColorTable[iColor] =
00178                     _CLR_TO_RGBQUAD(::GetSysColor(_sysColorMap[i].iSysColorTo));
00179                 break;
00180             }
00181         }
00182     }
00183
00184     int nWidth = (int)lpBitmapInfo->biWidth;
00185     int nHeight = (int)lpBitmapInfo->biHeight;
00186     HDC hDCScreen = ::GetDC(NULL);
00187     HBITMAP hbm = ::CreateCompatibleBitmap(hDCScreen, nWidth, nHeight);
00188
00189     if (hbm != NULL)
00190     {
00191         HDC hDCGlyphs = ::CreateCompatibleDC(hDCScreen);
00192         HBITMAP hbmOld = (HBITMAP)::SelectObject(hDCGlyphs, hbm);
00193
00194         LPBYTE lpBits;
00195         lpBits = (LPBYTE)(lpBitmap + 1);
00196         lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD);
00197
00198         StretchDIBits(hDCGlyphs, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
00199             lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS, SRCCOPY);
00200         SelectObject(hDCGlyphs, hbmOld);
00201         ::DeleteDC(hDCGlyphs);
00202     }
00203     ::ReleaseDC(NULL, hDCScreen);
00204
00205     // free copy of bitmap info struct and resource itself
00206     ::free(lpBitmapInfo);
00207     ::FreeResource(hglb);
00208
00209     return hbm;
00210 }

Variable Documentation

int _ComCtlVersion

Definition at line 227 of file CJToolBar.cpp.

Referenced by _GetComCtlVersion(), CCJReBar::Create(), CCJToolBar::CreateEx(), DllMain(), CCJToolBar::GetButtonSize(), CCJToolBar::OnNcCalcSize(), CCJToolBar::OnPreserveZeroBorderHelper(), CCJToolBar::OnSetSizeHelper(), and CCJToolBar::SetButtons().

Generated on Sat Aug 7 22:47:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJToolBarBase.h File Reference

WinCvs/CJLib/Include/CJToolBarBase.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJToolBarBase

Generated on Sat Aug 7 22:47:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJToolBarCtrl.h File Reference

WinCvs/CJLib/Include/CJToolBarCtrl.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJToolBarCtrl

Generated on Sat Aug 7 22:47:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJTreeCtrl.h File Reference

WinCvs/CJLib/Include/CJTreeCtrl.h File Reference

#include <afxtempl.h>

Include dependency graph for CJTreeCtrl.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class | CCJTreeCtrl
struct | CCJTreeCtrl::Color_Font

Generated on Sat Aug 7 22:47:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJWindowPlacement.h File Reference

WinCvs/CJLib/Include/CJWindowPlacement.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CCJWindowPlacement

Generated on Sat Aug 7 22:47:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/GfxGroupEdit.h File Reference

WinCvs/CJLib/Include/GfxGroupEdit.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CGfxGroupEdit

Generated on Sat Aug 7 22:47:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/GfxOutBarCtrl.h File Reference

WinCvs/CJLib/Include/GfxOutBarCtrl.h File Reference

#include <afxcoll.h>
#include "CJMenu.h"

Include dependency graph for GfxOutBarCtrl.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct | OUTBAR_INFO
class | CGfxOutBarCtrl
class | CGfxOutBarCtrl::CBarItem
class | CGfxOutBarCtrl::CBarFolder

Defines

#define | WM_OUTBAR_NOTIFY WM_USER + 1
#define | NM_OB_ITEMCLICK 1
#define | NM_OB_ONLABELENDEDIT 2
#define | NM_OB_ONGROUPENDEDIT 3
#define | NM_OB_DRAGITEM 4
#define | NM_FOLDERCHANGE 5
#define | NM_OB_ITEMHOVER 6

Define Documentation

#define NM_FOLDERCHANGE 5

Definition at line 47 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::SetSelFolder().

#define NM_OB_DRAGITEM 4

Definition at line 46 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::OnLButtonDown().

#define NM_OB_ITEMCLICK 1

Definition at line 43 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::OnLButtonDown().

#define NM_OB_ITEMHOVER 6

Definition at line 48 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::HighlightItem().

#define NM_OB_ONGROUPENDEDIT 3

Definition at line 45 of file GfxOutBarCtrl.h.

Referenced by CGfxGroupEdit::CGfxGroupEdit(), CGfxGroupEdit::OnChar(), CGfxOutBarCtrl::OnEndLabelEdit(), and CGfxOutBarCtrl::StartGroupEdit().

#define NM_OB_ONLABELENDEDIT 2

Definition at line 44 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::OnEndLabelEdit(), and CGfxOutBarCtrl::StartItemEdit().

#define WM_OUTBAR_NOTIFY WM_USER + 1

Definition at line 42 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::HighlightItem(), CGfxOutBarCtrl::OnEndLabelEdit(), CGfxGroupEdit::OnKillFocus(), CGfxOutBarCtrl::OnLButtonDown(), and CGfxOutBarCtrl::SetSelFolder().

Generated on Sat Aug 7 22:47:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/GfxSplitterWnd.h File Reference

WinCvs/CJLib/Include/GfxSplitterWnd.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CGfxSplitterWnd

Generated on Sat Aug 7 22:47:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/Subclass.h File Reference

WinCvs/CJLib/Include/Subclass.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class CSubclassWnd

Generated on Sat Aug 7 22:47:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HHelp/wincvs.h File Reference

WinCvs/HHelp/wincvs.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define | IDH_ID_CANCEL_EDIT_CNTR 0x18000
#define | IDH_ID_APP_PREFERENCES 0x18007
#define | IDH_ID_APP_CMDLINE 0x18008
#define | IDH_ID_APP_LOGIN 0x1800B
#define | IDH_ID_STOPCVS 0x1801B
#define | IDH_ID_BROWSER_OPEN 0x1801D
#define | IDH_ID_VIEW_BROWSER_BAR 0x1801E
#define | IDH_ID_UPDATEBF 0x1801F
#define | IDH_ID_COMMITBF 0x18020
#define | IDH_ID_ADDBF 0x18021
#define | IDH_ID_VIEW_SMALLICONS 0x18022
#define | IDH_ID_VIEW_FULLLIST 0x18023
#define | IDH_ID_VIEW_ROWDETAILS 0x18024
#define | IDH_ID_VIEW_FILES_BAR 0x18025
#define | IDH_ID_VIEW_UPDATE 0x18026
#define | IDH_ID_VIEW_COMMIT 0x18027
#define | IDH_ID_VIEW_ADD 0x18028
#define | IDH_ID_VIEW_WORKSPACE 0x18029
#define | IDH_ID_MENUBAR 0x1802A
#define | IDH_ID_VIEW_ADDB 0x1802B
#define | IDH_ID_VIEW_RMV 0x1802C
#define | IDH_ID_VIEW_RELOAD 0x1802E
#define | IDH_ID_VIEW_UPONE 0x1803A
#define | IDH_ID_VIEW_TRASH 0x1803E
#define | IDH_ID_VIEW_DIFF 0x18041
#define | IDH_ID_VIEW_LOG 0x18042
#define | IDH_ID_VIEW_STATUS 0x18043
#define | IDH_ID_VIEW_LOCKF 0x18044
#define | IDH_ID_VIEW_UNLOCKF 0x18045
#define | IDH_ID_VIEW_MULTI_BAR 0x18046
#define | IDH_ID_MENUITEM32840 0x18048
#define | IDH_ID_VIEW_WATCHON 0x1804B
#define | IDH_ID_VIEW_WATCHOFF 0x1804C
#define | IDH_ID_VIEW_EDIT 0x1804D
#define | IDH_ID_VIEW_UNEDIT 0x1804E
#define | IDH_ID_VIEW_RELEASE 0x1804F
#define | IDH_ID_VIEW_WATCHERS 0x18059
#define | IDH_ID_VIEW_EDITORS 0x1805A
#define | IDH_ID_CUST_FILES_MENU 0x1805B
#define | IDH_ID_CUST_FOLDER_MENU 0x1805C
#define | IDH_ID_APP_CREDITS 0x18068
#define | IDH_ID_APP_COPYRIGHTS 0x18069
#define | IDH_ID_GRAPH_CLOSE 0x1806A
#define | IDH_ID_VIEW_GRAPH 0x1806B
#define | IDH_ID_APP_RTAGCREATE 0x18071
#define | IDH_ID_APP_RTAGDELETE 0x18072
#define | IDH_ID_APP_RTAGBRANCH 0x18073
#define | IDH_ID_VIEW_TAG 0x18074
#define | IDH_ID_VIEW_TAGNEW 0x18076
#define | IDH_ID_VIEW_TAGDELETE 0x18077
#define | IDH_ID_VIEW_TAGBRANCH 0x18078
#define | IDH_ID_VIEW_TAGS_BAR 0x18079
#define | IDH_ID_VIEW_CONSOLE_BAR 0x18082
#define | IDH_ID_VIEW_EXPLORE 0x18083
#define | IDH_ID_HISTORYBROWSE 0x18084
#define | IDH_ID_VIEW_QUERYUPDATE 0x18085
#define | IDH_ID_VIEW_IGNORE 0x18086
#define | IDH_ID_APP_LOGOUT 0x1808A
#define | IDH_ID_VIEW_EDITSEL 0x1808C
#define | IDH_ID_VIEW_EDITSELDEF 0x1808D
#define | IDH_ID_ACCEL32911 0x1808F
#define | IDH_ID_VIEWW_INIT 0x18090
#define | IDH_ID_VIEW_IMPORT 0x18091
#define | IDH_ID_VIEW_INIT 0x18092
#define | IDH_ID_VIEW_CHECKOUT 0x18093
#define | IDH_ID_VIEW_DELREV 0x18094
#define | IDH_ID_VIEW_SELNONSIG 0x18095
#define | IDH_ID_BUTTON32918 0x18096
#define | IDH_ID_BUTTON32919 0x18097
#define | IDH_ID_BUTTON32920 0x18098
#define | IDH_ID_BUTTON32921 0x18099
#define | IDH_ID_SAVESETTINGS 0x1809A
#define | IDH_ID_VIEW_RETRIEVE 0x1809B
#define | IDH_ID_VIEW_RECURSIVE 0x1809C
#define | IDH_ID_VIEW_FILTER_BAR 0x1809D
#define | IDH_ID_VIEW_MODIFIED 0x1809F
#define | IDH_ID_FILTERMASK 0x180A0
#define | IDH_ID_VIEW_CONFLICT 0x180A1
#define | IDH_ID_VIEW_UNKNOWN 0x180A3
#define | IDH_ID_VIEW_MISSING 0x180A4
#define | IDH_ID_VIEW_ADDED 0x180A7
#define | IDH_ID_VIEW_REMOVED 0x180A8
#define | IDH_ID_VIEW_CHANGED 0x180A9
#define | IDH_ID_VIEW_HIDEUNKNOWN 0x180AA
#define | IDH_ID_VIEW_CLEARALL 0x180AB
#define | IDH_ID_BUTTON32940 0x180AC
#define | IDH_ID_QUERY_ANNOTATE 0x180AD
#define | IDH_ID_VIEW_BROWSELOCATION_REMOVEUNWANTED 0x180AF
#define | IDH_ID_USE_TCLSHELL 0x180B0
#define | IDH_ID_USE_PYSHELL 0x180B1
#define | IDH_ID_GRAPH_GRAPHOPTIONS 0x180B2
#define | IDH_ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE 0x180B6
#define | IDH_ID_GRAPH_ADMINOPTIONS_SETSTATE 0x180B7
#define | IDH_ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION 0x180B8
#define | IDH_ID_VIEW_RESERVEDEDIT 0x180BD
#define | IDH_ID_VIEW_FORCEEDIT 0x180BE
#define | IDH_ID_VIEW_ADDU 0x180C0
#define | IDH_ID_VIEW_HIDEMISSING 0x180CF
#define | IDH_ID_VIEW_FILTERBAR_ENABLE 0x180D0
#define | IDH_ID_VIEW_FILTERBAR_CLEARALL 0x180D1
#define | IDH_ID_VIEW_FILTERBAR_OPTIONS 0x180D2
#define | IDH_ID_VIEW_RETRIEVEAS 0x180D6
#define | IDH_ID_VIEW_OPENSEL 0x180D7
#define | IDH_ID_VIEW_OPENSELAS 0x180D8
#define | IDH_ID_QUERY_SHELLACTION_DEFAULT 0x180DA
#define | IDH_ID_HELP_CVS 0x180DB
#define | IDH_ID_QUERY_PROPERTIES 0x180DC
#define | IDH_ID_VIEW_NEWINSTANCE 0x180DD
#define | IDH_ID_MACRO_START 0x184D0
#define | IDH_ID_MACRO_SEL 0x18534
#define | IDH_ID_MACRO_ADMIN 0x18598
#define | IDH_ID_MACRO_END 0x18598
#define | IDH_IDP_OLE_INIT_FAILED 0x30064
#define | IDH_IDP_FAILED_TO_CREATE 0x30066
#define | IDH_IDP_SOCKETS_INIT_FAILED 0x30068
#define | IDH_IDR_CNTR_INPLACE 0x20006
#define | IDH_IDR_MAINFRAME 0x20080
#define | IDH_IDR_WINCVSTYPE 0x20081
#define | IDH_IDR_BROWSER 0x20081
#define | IDH_IDR_FILELIST 0x2009D
#define | IDH_IDR_MULTIUSER 0x2009E
#define | IDH_IDR_GRAPH 0x200A1
#define | IDH_IDR_STATEICONS 0x200A4
#define | IDH_IDR_TAGS 0x200A5
#define | IDH_IDR_WORKSPACE 0x200AD
#define | IDH_IDR_CUSTMENUS 0x200B6
#define | IDH_IDR_FILTER 0x200BA
#define | IDH_IDR_ITEMLIST 0x200CF
#define | IDH_IDD_ABOUTBOX 0x20064
#define | IDH_IDD_TIP 0x20069
#define | IDH_IDD_PASSWRD 0x20084
#define | IDH_IDD_ALERT 0x20086
#define | IDH_IDD_PREFS_GLOBALS 0x20088
#define | IDH_IDD_CHECKOUT_MAIN 0x20089
#define | IDH_IDD_COMMIT_MAIN 0x2008A
#define | IDH_IDD_IMPORT_MAIN 0x2008B
#define | IDH_IDD_IMPORT_OPTIONS 0x2008C
#define | IDH_IDD_CMDLINE_MAIN 0x2008E
#define | IDH_IDD_IMPORTFILTER 0x2008F
#define | IDH_IDD_WARNINGDESC 0x20091
#define | IDH_IDD_ENTRYDESC 0x20092
#define | IDH_IDD_UPDATE_MAIN 0x20093
#define | IDH_IDD_UPDATE_MERGE 0x20095
#define | IDH_IDD_LOG_MAIN 0x20096
#define | IDH_IDD_LOG_FILTERS 0x20098
#define | IDH_IDD_DIFF_OPTIONS 0x20099
#define | IDH_IDD_DIFF_MAIN 0x2009A
#define | IDH_IDD_UPDATE_OPTIONS 0x2009B
#define | IDH_IDD_PREFS_WINCVS 0x2009C
#define | IDH_IDD_INIT_MAIN 0x200A5
#define | IDH_IDD_PROGRESS 0x200B1
#define | IDH_IDD_CUSTOMIZE 0x200B5
#define | IDH_IDD_SAVESETTINGS 0x200B8
#define | IDH_IDD_COMMIT_OPTIONS 0x200BA
#define | IDH_IDD_PREFS_CVSCMD_DIALOGS 0x200BF
#define | IDH_IDD_ANNOTATE_MAIN 0x200C0
#define | IDH_IDD_GRAPH_OPTIONS 0x200C1
#define | IDH_IDD_EDITMESSAGE 0x200C3
#define | IDH_IDD_ADMINOPTION 0x200C4
#define | IDH_IDD_EDITORMON 0x200C5
#define | IDH_IDD_NOPYTHON 0x200C6
#define | IDH_IDD_TAG_MAIN 0x200C7
#define | IDH_IDD_RTAG_MAIN 0x200C8
#define | IDH_IDD_RTAG_OPTIONS 0x200C9
#define | IDH_IDD_STATUS_MAIN 0x200CB
#define | IDH_IDD_ITEM_LIST 0x200CD
#define | IDH_IDD_LOGIN_MAIN 0x200CE
#define | IDH_IDD_PREFS_CVS 0x200CF
#define | IDH_IDD_RELEASE_MAIN 0x200D0
#define | IDH_IDD_SELECTION_DETAILS 0x200D1
#define | IDH_IDD_FILTERBAR_OPTIONS 0x200D4
#define | IDH_IDD_FILTER_SELECTION 0x200D5
#define | IDH_IDD_MULTILINE_ENTRY 0x200D6
#define | IDH_IDD_CVSTEMPLATE 0x200DA
#define | IDH_IDD_OPEN_MAIN 0x200DB
#define | IDH_IDD_CVSROOT 0x200E0
#define | IDH_IDD_EDITKEYWORD 0x200E2
#define | IDH_IDC_OPTIONCHECK_BUTTON 0x71
#define | IDH_IDC_CVSROOT 0x3E8
#define | IDH_IDC_BULB 0x3E9
#define | IDH_IDC_CHECKOUT_READ_ONLY 0x3EA
#define | IDH_IDC_STARTUP 0x3EB
#define | IDH_IDC_HAS_COMPRESSION 0x3EC
#define | IDH_IDC_NEXTTIP 0x3ED
#define | IDH_IDC_PRUNE_EMPTY_DIR 0x3EE
#define | IDH_IDC_TIPSTRING 0x3EF
#define | IDH_IDC_ENCRYPTION 0x3F0
#define | IDH_IDC_UNIX_LF 0x3F1
#define | IDH_IDC_NO_SPLASH_SCREEN 0x3F3
#define | IDH_IDC_QUIET 0x3F4
#define | IDH_IDC_CONTROL_ADDED_FILES 0x3F5
#define | IDH_IDC_FILEPATH 0x3F6
#define | IDH_IDC_PROMPTEDIT 0x3F7
#define | IDH_IDC_ALWAYSROOT 0x3F9
#define | IDH_IDC_PASSWORD 0x3FA
#define | IDH_IDC_AUTO_LOGOUT 0x3FB
#define | IDH_IDC_SPIN_AUTO_LOGOUT_TIME 0x3FC
#define | IDH_IDC_MATCH_ENTRIES_CASE 0x3FD
#define | IDH_IDC_BROWSE_CVSROOT 0x400
#define | IDH_IDC_MULTILINE_ENTRY 0x401
#define | IDH_IDC_STDOUT 0x403
#define | IDH_IDC_MODNAME 0x404
#define | IDH_IDC_BROWSE_PATH 0x405
#define | IDH_IDC_TAGNAME 0x406
#define | IDH_IDC_NORECURS 0x407
#define | IDH_IDC_PATH 0x408
#define | IDH_IDC_FORCE_HEAD_REV 0x409
#define | IDH_IDC_ENTRY 0x40A
#define | IDH_IDC_OVERWRITE 0x40B
#define | IDH_IDC_HAS_REV 0x40C
#define | IDH_IDC_MULTILINE_ENTRY_WRAP 0x40D
#define | IDH_IDC_RESET_STICKY 0x40E
#define | IDH_IDC_CREATE_MISSING_DIR 0x40F
#define | IDH_IDC_GET_CLEAN_COPY 0x410
#define | IDH_IDC_ENTRIES_LIST 0x418
#define | IDH_IDC_CONFLICT_DESC 0x419
#define | IDH_IDC_ENTRY_EDIT 0x41A
#define | IDH_IDC_WARNING_DESC 0x41B
#define | IDH_IDC_ENTRYSTATE_NO_CHANGE 0x41C
#define | IDH_IDC_HAS_DATE 0x41D
#define | IDH_IDC_ENTRYSTATE_FORCE_TEXT 0x41E
#define | IDH_IDC_ENTRYSTATE_IGNORE 0x41F
#define | IDH_IDC_REV_TAG 0x420
#define | IDH_IDC_ENTRYSTATE_NO_EXPANSION 0x421
#define | IDH_IDC_DATE1 0x423
#define | IDH_IDC_STATES 0x425
#define | IDH_IDC_DATE2 0x426
#define | IDH_IDC_REV_TAG2 0x427
#define | IDH_IDC_HAS_USERS 0x429
#define | IDH_IDC_NOTAGS 0x42A
#define | IDH_IDC_HEADERS 0x42C
#define | IDH_IDC_SUPRESS_HEADER 0x42D
#define | IDH_IDC_HAS_PATH 0x42E
#define | IDH_IDC_HEADERS_DESC 0x42F
#define | IDH_IDC_ADD_SELECTION 0x431
#define | IDH_IDC_HOME 0x432
#define | IDH_IDC_ADD_DEFAULT 0x433
#define | IDH_IDC_ENTRYSTATE_FORCE_BINARY 0x434
#define | IDH_IDC_DATE 0x435
#define | IDH_IDC_ENTRYSTATE_FORCE_UNICODE 0x436
#define | IDH_IDC_USERS 0x439
#define | IDH_IDC_DEFAULT_BRANCH 0x43A
#define | IDH_IDC_COLOR_STATE 0x43B
#define | IDH_IDC_RCS_FILENAMES_ONLY 0x43C
#define | IDH_IDC_ISDATE1 0x43D
#define | IDH_IDC_ISDATE2 0x43E
#define | IDH_IDC_REV_TAG1 0x43F
#define | IDH_IDC_BROWSE_EXTERNAL_EDITOR 0x440
#define | IDH_IDC_RELEASE_TAG 0x441
#define | IDH_IDC_EXTERNAL_EDITOR 0x442
#define | IDH_IDC_BAR_TREE 0x443
#define | IDH_IDC_USE_EXTERNAL_DIFF 0x444
#define | IDH_IDC_BROWSE_ALTERNATE_SETTINGS 0x445
#define | IDH_IDC_ATTIC 0x446
#define | IDH_IDC_HAS_EXTERNAL_DIFF 0x447
#define | IDH_IDC_BROWSE_EXTERNAL_DIFF 0x448
#define | IDH_IDC_EXTERNAL_DIFF 0x449
#define | IDH_IDC_CHECK_UNMODIFIED 0x44A
#define | IDH_IDC_MULTILINE_POSITION 0x44B
#define | IDH_IDC_HAS_ALTERNATE_CVS 0x44C
#define | IDH_IDC_PYTHONDLL 0x44D
#define | IDH_IDC_ALTERNATE_CVS 0x44E
#define | IDH_IDC_BROWSE_PYTHONDLL 0x44F
#define | IDH_IDC_MULTILINE_PREV_ENTRY 0x450
#define | IDH_IDC_BROWSE_FILENAME 0x451
#define | IDH_IDC_TCLDLL 0x452
#define | IDH_IDC_WINCVSVER 0x453
#define | IDH_IDC_BROWSE_TCLDLL 0x454
#define | IDH_IDC_AUTO_LOGOUT_TIME 0x456
#define | IDH_IDC_FORCE_CVSROOT 0x45A
#define | IDH_IDC_EXPORT 0x45B
#define | IDH_IDC_HELP_INIT 0x45C
#define | IDH_IDC_PROGRESS 0x45E
#define | IDH_IDC_COMPRESSION 0x45F
#define | IDH_IDC_SPIN_COMPRESSION 0x460
#define | IDH_IDC_WINCVSURL 0x461
#define | IDH_IDC_ALLCMDS 0x462
#define | IDH_IDC_CVSGUISFURL 0x463
#define | IDH_IDC_ADD 0x465
#define | IDH_IDC_REMOVE 0x466
#define | IDH_IDC_UP 0x467
#define | IDH_IDC_DELETE_ALL_FILES 0x468
#define | IDH_IDC_DOWN 0x469
#define | IDH_IDC_DELETE_CVS_INFO 0x46A
#define | IDH_IDC_MENULIST 0x46B
#define | IDH_IDC_MULTILINE_WORDWRAP 0x46D
#define | IDH_IDC_IGNOREWHITESPACE 0x46F
#define | IDH_IDC_IGNORECASE 0x470
#define | IDH_IDC_UNIFIEDDIFF 0x472
#define | IDH_IDC_CHECKOUT_DIR 0x473
#define | IDH_IDC_OVERRIDE_CHECKOUT_DIR 0x474
#define | IDH_IDC_DEFAULT_CVSIGNORE 0x475
#define | IDH_IDC_FORCE_COMMIT 0x476
#define | IDH_IDC_FILES_MODIFICATION_TIME 0x477
#define | IDH_IDC_FORCE_RECURSE 0x478
#define | IDH_IDC_CREATE_SANDBOX 0x479
#define | IDH_IDC_FORCE_REVISION 0x47A
#define | IDH_IDC_NO_MODULE_PROGRAM 0x47B
#define | IDH_IDC_VENDOR_TAG 0x47C
#define | IDH_IDC_CHECK_VALID_EDITS 0x47D
#define | IDH_IDC_REPOSITORY_PATH 0x47E
#define | IDH_IDC_ALTERNATE_SETTINGS 0x481
#define | IDH_IDC_COLOR_SELECTION 0x482
#define | IDH_IDC_SKIP_UPDATE 0x483
#define | IDH_IDC_SKIP_DIFF 0x484
#define | IDH_IDC_SKIP_GRAPH 0x485
#define | IDH_IDC_SKIP_LOG 0x486
#define | IDH_IDC_FORCE_KEY_SHIFT 0x487
#define | IDH_IDC_FORCE_KEY_CTRL 0x488
#define | IDH_IDC_CONSOLE 0x489
#define | IDH_IDC_ISDATE 0x48A
#define | IDH_IDC_SKIP_ANNOTATE 0x48B
#define | IDH_IDC_REV_TAG_DATE 0x48C
#define | IDH_IDC_SKIP_STATUS 0x48D
#define | IDH_IDC_DIFF 0x48E
#define | IDH_IDC_SKIP_FILEACTION 0x48F
#define | IDH_IDC_FILETODIFF 0x490
#define | IDH_IDC_COLOR_MERGE 0x491
#define | IDH_IDC_RESET_COLORS 0x492
#define | IDH_IDC_COLOR_HEADER 0x493
#define | IDH_IDC_COLOR_TAG 0x494
#define | IDH_IDC_RGB_HEADER 0x495
#define | IDH_IDC_RGB_TAG 0x496
#define | IDH_IDC_RGB_BRANCH 0x497
#define | IDH_IDC_RGB_NODE 0x498
#define | IDH_IDC_RGB_DEAD 0x499
#define | IDH_IDC_RGB_STATE 0x49A
#define | IDH_IDC_COLOR_BRANCH 0x49B
#define | IDH_IDC_COLOR_NODE 0x49C
#define | IDH_IDC_SELECTION 0x49D
#define | IDH_IDC_COLOR_SHADOW 0x49E
#define | IDH_IDC_COLOR_DEAD 0x49F
#define | IDH_IDC_RGB_SELECTION 0x4A0
#define | IDH_IDC_RGB_SHADOW 0x4A1
#define | IDH_IDC_RGB_MERGE 0x4A2
#define | IDH_IDC_TEMPFILE 0x4A3
#define | IDH_IDC_REMIND 0x4A4
#define | IDH_IDC_PYTHON_URL 0x4A5
#define | IDH_IDC_PREVIEWINFO 0x4A6
#define | IDH_IDC_HAS_DATE1 0x4A8
#define | IDH_IDC_HAS_DATE2 0x4A9
#define | IDH_IDC_GRPBOX_TEXT 0x4AA
#define | IDH_IDC_TAGDESC_TEXT 0x4AB
#define | IDH_IDC_MODULEDESC_TEXT 0x4AC
#define | IDH_IDC_OUTPUT_QUICK 0x4AD
#define | IDH_IDC_OUTPUT_VERBOSE 0x4AE
#define | IDH_IDC_BROWSE_TAG 0x4AF
#define | IDH_IDC_OUTPUT_STANDARD 0x4B0
#define | IDH_IDC_BROWSE_READ_FROM 0x4B1
#define | IDH_IDC_BROWSE_TAG1 0x4B2
#define | IDH_IDC_BROWSE_TAG2 0x4B3
#define | IDH_IDC_BROWSE_MODNAME 0x4B5
#define | IDH_IDC_ITEM_LIST 0x4B6
#define | IDH_IDC_REFRESH_ITEMS 0x4B7
#define | IDH_IDC_READ_FROM 0x4B9
#define | IDH_IDC_ITEM 0x4BA
#define | IDH_IDC_ITEM_LABEL 0x4BB
#define | IDH_IDC_ITEM_LIST_OPTION 0x4BC
#define | IDH_IDC_GROUP_OPTIONS 0x4BF
#define | IDH_IDC_HELPLOGIN 0x4C0
#define | IDH_IDC_COMPARE_TYPE 0x4C1
#define | IDH_IDC_KEYWORD_OPT 0x4C2
#define | IDH_IDC_KEYWORD_DESC 0x4C3
#define | IDH_IDC_DIFFOPTIONS 0x4C4
#define | IDH_IDC_BROWSE_DIFFOPTIONS 0x4C5
#define | IDH_IDC_HAS_ALTERNATE_SETTINGS 0x4C6
#define | IDH_IDC_BROWSE_SELECTION 0x4C7
#define | IDH_IDC_DELETE_DIRECTORY 0x4C8
#define | IDH_IDC_PROGRESS_TEXT 0x4C9
#define | IDH_IDC_SELECTION_LIST 0x4CA
#define | IDH_IDC_FILENAME 0x4CB
#define | IDH_IDC_REVISION_SPIN 0x4CC
#define | IDH_IDC_REVISION 0x4CD
#define | IDH_IDC_AUTO_REFRESH 0x4CE
#define | IDH_IDC_HAS_BRANCHID 0x4CF
#define | IDH_IDC_BRANCHID 0x4D0
#define | IDH_IDC_BROWSE_BRANCHID 0x4D1
#define | IDH_IDC_MOVDEL_BRANCH 0x4D2
#define | IDH_IDC_DONT_SHORTEN_PATHS 0x4D3
#define | IDH_IDC_REACTION_SPEED 0x4D4
#define | IDH_IDC_REACTION_SPEED_SPIN 0x4D5
#define | IDH_IDC_FILTER_CONTENTS 0x4D6
#define | IDH_IDC_FILTER 0x4D7
#define | IDH_IDC_REACTION_SPEED_SECONDS 0x4D8
#define | IDH_IDC_CTRL_PRESSED_ON_OK 0x4D9
#define | IDH_IDC_MULTILINE_TYPE 0x4DA
#define | IDH_IDC_NO_VENDOR_RELEASE_TAGS 0x4DB
#define | IDH_IDC_MULTILINE_ENTRY_STATIC 0x4DC
#define | IDH_IDC_MULTILINE_GO_ACTION 0x4DD
#define | IDH_IDC_OTHER_BUTTON 0x4DE
#define | IDH_IDC_MULTILINE_ACTION 0x4DF
#define | IDH_IDC_TEMPLATE_LIST 0x4E0
#define | IDH_IDC_TEMPLATE_PREVIEW 0x4E1
#define | IDH_IDC_ICON_STATIC 0x4E2
#define | IDH_IDC_MESSAGE_DETAILS 0x4E3
#define | IDH_IDC_ALERT_MESSAGE 0x4E4
#define | IDH_IDC_SHOW_CVS_METHOD 0x4E5
#define | IDH_IDC_ACTION 0x4E6
#define | IDH_IDC_ACTION_DESC 0x4E7
#define | IDH_IDC_SAME_ACTION_NEXT_TIME 0x4E8
#define | IDH_IDC_PROTOCOL_DESC 0x4E9
#define | IDH_IDC_PROTOCOL 0x4EA
#define | IDH_IDC_KEYWORDLIST 0x4EB
#define | IDH_IDC_CLEAR_KEYWORD 0x4EC
#define | IDH_IDC_KEYWORDLIST_DESC 0x4ED
#define | IDH_IDC_EDIT_KEYWORD 0x4EE
#define | IDH_IDC_PROTOCOL_KEYWORD 0x4EF
#define | IDH_IDC_KEYWORD_DESCRIPTION 0x4F0
#define | IDH_IDC_KEYWORD_VALUE 0x4F1
#define | IDH_IDC_OVERWRITE_RELEASE_TAGS 0x4F2
#define | IDH_IDC_IMPORT_FILTER 0x4F3
#define | IDH_IDC_CURRENT_DIFF_OPTIONS 0x4F4
#define | IDH_IDC_DIFF_OPTION_LIST 0x4F5
#define | IDH_IDC_DIFF_OPTION_DESCRIPTION 0x4F6
#define | IDH_IDC_STATICGROUP_SELECTOPTIONS 0x4F7
#define | IDH_IDC_STATIC_CURRENTOPTIONS 0x4F8
#define | IDH_IDC_STATIC_OPTDESC 0x4F9
#define | IDH_IDC_APPLY 0x4FA
#define | IDH_IDC_SETTINGS_NAME 0x4FB
#define | IDH_IDC_COPY_SETTINGS 0x4FC
#define | IDH_IDC_COPY_SETTINGS_NAME 0x4FD
#define | IDH_IDC_PREVIEW_CVSROOT 0x4FE
#define | IDH_IDC_RANGE_REV_TAG 0x4FF
#define | IDH_IDC_RANGE_DATE 0x500
#define | IDH_IDC_HAS_STATES 0x501
#define | IDH_IDC_LAST_CHECKIN_TIME 0x502
#define | IDH_IDC_CASE_SENSITIVE_NAMES 0x503
#define | IDH_IDC_THREE_WAY_CONFLICTS 0x504
#define | IDH_IDC_BRANCHPOINT_MERGE 0x505
#define | IDH_IDC_MERGE_TYPE 0x506

Define Documentation

#define IDH_ID_ACCEL32911 0x1808F

Definition at line 63 of file wincvs.h.

#define IDH_ID_ADDBF 0x18021

Definition at line 12 of file wincvs.h.

#define IDH_ID_APP_CMDLINE 0x18008

Definition at line 5 of file wincvs.h.

#define IDH_ID_APP_COPYRIGHTS 0x18069

Definition at line 44 of file wincvs.h.

#define IDH_ID_APP_CREDITS 0x18068

Definition at line 43 of file wincvs.h.

#define IDH_ID_APP_LOGIN 0x1800B

Definition at line 6 of file wincvs.h.

#define IDH_ID_APP_LOGOUT 0x1808A

Definition at line 60 of file wincvs.h.

#define IDH_ID_APP_PREFERENCES 0x18007

Definition at line 4 of file wincvs.h.

#define IDH_ID_APP_RTAGBRANCH 0x18073

Definition at line 49 of file wincvs.h.

#define IDH_ID_APP_RTAGCREATE 0x18071

Definition at line 47 of file wincvs.h.

#define IDH_ID_APP_RTAGDELETE 0x18072

Definition at line 48 of file wincvs.h.

#define IDH_ID_BROWSER_OPEN 0x1801D

Definition at line 8 of file wincvs.h.

#define IDH_ID_BUTTON32918 0x18096

Definition at line 70 of file wincvs.h.

#define IDH_ID_BUTTON32919 0x18097

Definition at line 71 of file wincvs.h.

#define IDH_ID_BUTTON32920 0x18098

Definition at line 72 of file wincvs.h.

#define IDH_ID_BUTTON32921 0x18099

Definition at line 73 of file wincvs.h.

#define IDH_ID_BUTTON32940 0x180AC

Definition at line 88 of file wincvs.h.

#define IDH_ID_CANCEL_EDIT_CNTR 0x18000

Definition at line 3 of file wincvs.h.

#define IDH_ID_COMMITBF 0x18020

Definition at line 11 of file wincvs.h.

#define IDH_ID_CUST_FILES_MENU 0x1805B

Definition at line 41 of file wincvs.h.

#define IDH_ID_CUST_FOLDER_MENU 0x1805C

Definition at line 42 of file wincvs.h.

#define IDH_ID_FILTERMASK 0x180A0

Definition at line 79 of file wincvs.h.

#define IDH_ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE 0x180B6

Definition at line 94 of file wincvs.h.

#define IDH_ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION 0x180B8

Definition at line 96 of file wincvs.h.

#define IDH_ID_GRAPH_ADMINOPTIONS_SETSTATE 0x180B7

Definition at line 95 of file wincvs.h.

#define IDH_ID_GRAPH_CLOSE 0x1806A

Definition at line 45 of file wincvs.h.

#define IDH_ID_GRAPH_GRAPHOPTIONS 0x180B2

Definition at line 93 of file wincvs.h.

#define IDH_ID_HELP_CVS 0x180DB

Definition at line 108 of file wincvs.h.

#define IDH_ID_HISTORYBROWSE 0x18084

Definition at line 57 of file wincvs.h.

#define IDH_ID_MACRO_ADMIN 0x18598

Definition at line 113 of file wincvs.h.

#define IDH_ID_MACRO_END 0x18598

Definition at line 114 of file wincvs.h.

#define IDH_ID_MACRO_SEL 0x18534

Definition at line 112 of file wincvs.h.

#define IDH_ID_MACRO_START 0x184D0

Definition at line 111 of file wincvs.h.

#define IDH_ID_MENUBAR 0x1802A

Definition at line 21 of file wincvs.h.

#define IDH_ID_MENUITEM32840 0x18048

Definition at line 33 of file wincvs.h.

#define IDH_ID_QUERY_ANNOTATE 0x180AD

Definition at line 89 of file wincvs.h.

#define IDH_ID_QUERY_PROPERTIES 0x180DC

Definition at line 109 of file wincvs.h.

#define IDH_ID_QUERY_SHELLACTION_DEFAULT 0x180DA

Definition at line 107 of file wincvs.h.

#define IDH_ID_SAVESETTINGS 0x1809A

Definition at line 74 of file wincvs.h.

#define IDH_ID_STOPCVS 0x1801B

Definition at line 7 of file wincvs.h.

#define IDH_ID_UPDATEBF 0x1801F

Definition at line 10 of file wincvs.h.

#define IDH_ID_USE_PYSHELL 0x180B1

Definition at line 92 of file wincvs.h.

#define IDH_ID_USE_TCLSHELL 0x180B0

Definition at line 91 of file wincvs.h.

#define IDH_ID_VIEW_ADD 0x18028

Definition at line 19 of file wincvs.h.

#define IDH_ID_VIEW_ADDB 0x1802B

Definition at line 22 of file wincvs.h.

#define IDH_ID_VIEW_ADDED 0x180A7

Definition at line 83 of file wincvs.h.

#define IDH_ID_VIEW_ADDU 0x180C0

Definition at line 99 of file wincvs.h.

#define IDH_ID_VIEW_BROWSELOCATION_REMOVEUNWANTED 0x180AF

Definition at line 90 of file wincvs.h.

#define IDH_ID_VIEW_BROWSER_BAR 0x1801E

Definition at line 9 of file wincvs.h.

#define IDH_ID_VIEW_CHANGED 0x180A9

Definition at line 85 of file wincvs.h.

#define IDH_ID_VIEW_CHECKOUT 0x18093

Definition at line 67 of file wincvs.h.

#define IDH_ID_VIEW_CLEARALL 0x180AB

Definition at line 87 of file wincvs.h.

#define IDH_ID_VIEW_COMMIT 0x18027

Definition at line 18 of file wincvs.h.

#define IDH_ID_VIEW_CONFLICT 0x180A1

Definition at line 80 of file wincvs.h.

#define IDH_ID_VIEW_CONSOLE_BAR 0x18082

Definition at line 55 of file wincvs.h.

#define IDH_ID_VIEW_DELREV 0x18094

Definition at line 68 of file wincvs.h.

#define IDH_ID_VIEW_DIFF 0x18041

Definition at line 27 of file wincvs.h.

#define IDH_ID_VIEW_EDIT 0x1804D

Definition at line 36 of file wincvs.h.

#define IDH_ID_VIEW_EDITORS 0x1805A

Definition at line 40 of file wincvs.h.

#define IDH_ID_VIEW_EDITSEL 0x1808C

Definition at line 61 of file wincvs.h.

#define IDH_ID_VIEW_EDITSELDEF 0x1808D

Definition at line 62 of file wincvs.h.

#define IDH_ID_VIEW_EXPLORE 0x18083

Definition at line 56 of file wincvs.h.

#define IDH_ID_VIEW_FILES_BAR 0x18025

Definition at line 16 of file wincvs.h.

#define IDH_ID_VIEW_FILTER_BAR 0x1809D

Definition at line 77 of file wincvs.h.

#define IDH_ID_VIEW_FILTERBAR_CLEARALL 0x180D1

Definition at line 102 of file wincvs.h.

#define IDH_ID_VIEW_FILTERBAR_ENABLE 0x180D0

Definition at line 101 of file wincvs.h.

#define IDH_ID_VIEW_FILTERBAR_OPTIONS 0x180D2

Definition at line 103 of file wincvs.h.

#define IDH_ID_VIEW_FORCEEDIT 0x180BE

Definition at line 98 of file wincvs.h.

#define IDH_ID_VIEW_FULLLIST 0x18023

Definition at line 14 of file wincvs.h.

#define IDH_ID_VIEW_GRAPH 0x1806B

Definition at line 46 of file wincvs.h.

#define IDH_ID_VIEW_HIDEMISSING 0x180CF

Definition at line 100 of file wincvs.h.

#define IDH_ID_VIEW_HIDEUNKNOWN 0x180AA

Definition at line 86 of file wincvs.h.

#define IDH_ID_VIEW_IGNORE 0x18086

Definition at line 59 of file wincvs.h.

#define IDH_ID_VIEW_IMPORT 0x18091

Definition at line 65 of file wincvs.h.

#define IDH_ID_VIEW_INIT 0x18092

Definition at line 66 of file wincvs.h.

#define IDH_ID_VIEW_LOCKF 0x18044

Definition at line 30 of file wincvs.h.

#define IDH_ID_VIEW_LOG 0x18042

Definition at line 28 of file wincvs.h.

#define IDH_ID_VIEW_MISSING 0x180A4

Definition at line 82 of file wincvs.h.

#define IDH_ID_VIEW_MODIFIED 0x1809F

Definition at line 78 of file wincvs.h.

#define IDH_ID_VIEW_MULTI_BAR 0x18046

Definition at line 32 of file wincvs.h.

#define IDH_ID_VIEW_NEWINSTANCE 0x180DD

Definition at line 110 of file wincvs.h.

#define IDH_ID_VIEW_OPENSEL 0x180D7

Definition at line 105 of file wincvs.h.

#define IDH_ID_VIEW_OPENSELAS 0x180D8

Definition at line 106 of file wincvs.h.

#define IDH_ID_VIEW_QUERYUPDATE 0x18085

Definition at line 58 of file wincvs.h.

#define IDH_ID_VIEW_RECURSIVE 0x1809C

Definition at line 76 of file wincvs.h.

#define IDH_ID_VIEW_RELEASE 0x1804F

Definition at line 38 of file wincvs.h.

#define IDH_ID_VIEW_RELOAD 0x1802E

Definition at line 24 of file wincvs.h.

#define IDH_ID_VIEW_REMOVED 0x180A8

Definition at line 84 of file wincvs.h.

#define IDH_ID_VIEW_RESERVEDEDIT 0x180BD

Definition at line 97 of file wincvs.h.

#define IDH_ID_VIEW_RETRIEVE 0x1809B

Definition at line 75 of file wincvs.h.

#define IDH_ID_VIEW_RETRIEVEAS 0x180D6

Definition at line 104 of file wincvs.h.

#define IDH_ID_VIEW_RMV 0x1802C

Definition at line 23 of file wincvs.h.

#define IDH_ID_VIEW_ROWDETAILS 0x18024

Definition at line 15 of file wincvs.h.

#define IDH_ID_VIEW_SELNONSIG 0x18095

Definition at line 69 of file wincvs.h.

#define IDH_ID_VIEW_SMALLICONS 0x18022

Definition at line 13 of file wincvs.h.

#define IDH_ID_VIEW_STATUS 0x18043

Definition at line 29 of file wincvs.h.

#define IDH_ID_VIEW_TAG 0x18074

Definition at line 50 of file wincvs.h.

#define IDH_ID_VIEW_TAGBRANCH 0x18078

Definition at line 53 of file wincvs.h.

#define IDH_ID_VIEW_TAGDELETE 0x18077

Definition at line 52 of file wincvs.h.

#define IDH_ID_VIEW_TAGNEW 0x18076

Definition at line 51 of file wincvs.h.

#define IDH_ID_VIEW_TAGS_BAR 0x18079

Definition at line 54 of file wincvs.h.

#define IDH_ID_VIEW_TRASH 0x1803E

Definition at line 26 of file wincvs.h.

#define IDH_ID_VIEW_UNEDIT 0x1804E

Definition at line 37 of file wincvs.h.

#define IDH_ID_VIEW_UNKNOWN 0x180A3

Definition at line 81 of file wincvs.h.

#define IDH_ID_VIEW_UNLOCKF 0x18045

Definition at line 31 of file wincvs.h.

#define IDH_ID_VIEW_UPDATE 0x18026

Definition at line 17 of file wincvs.h.

#define IDH_ID_VIEW_UPONE 0x1803A

Definition at line 25 of file wincvs.h.

#define IDH_ID_VIEW_WATCHERS 0x18059

Definition at line 39 of file wincvs.h.

#define IDH_ID_VIEW_WATCHOFF 0x1804C

Definition at line 35 of file wincvs.h.

#define IDH_ID_VIEW_WATCHON 0x1804B

Definition at line 34 of file wincvs.h.

#define IDH_ID_VIEW_WORKSPACE 0x18029

Definition at line 20 of file wincvs.h.

#define IDH_ID_VIEWW_INIT 0x18090

Definition at line 64 of file wincvs.h.

#define IDH_IDC_ACTION 0x4E6

Definition at line 410 of file wincvs.h.

Referenced by CFileAction_MAIN::InitHelpID().

#define IDH_IDC_ACTION_DESC 0x4E7

Definition at line 411 of file wincvs.h.

Referenced by CFileAction_MAIN::InitHelpID().

#define IDH_IDC_ADD 0x465

Definition at line 291 of file wincvs.h.

Referenced by CCustomizeMenus::InitHelpID().

#define IDH_IDC_ADD_DEFAULT 0x433

Definition at line 249 of file wincvs.h.

Referenced by CCmdLine_MAIN::InitHelpID().

#define IDH_IDC_ADD_SELECTION 0x431

Definition at line 247 of file wincvs.h.

Referenced by CCmdLine_MAIN::InitHelpID().

#define IDH_IDC_ALERT_MESSAGE 0x4E4

Definition at line 408 of file wincvs.h.

#define IDH_IDC_ALLCMDS 0x462

Definition at line 289 of file wincvs.h.

Referenced by CCustomizeMenus::InitHelpID().

#define IDH_IDC_ALTERNATE_CVS 0x44E

Definition at line 274 of file wincvs.h.

Referenced by CGetPrefs_CVS::InitHelpID().

#define IDH_IDC_ALTERNATE_SETTINGS 0x481

Definition at line 314 of file wincvs.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDH_IDC_ALWAYSROOT 0x3F9

Definition at line 206 of file wincvs.h.

#define IDH_IDC_APPLY 0x4FA

Definition at line 430 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_ATTIC 0x446

Definition at line 266 of file wincvs.h.

Referenced by CRtag_MAIN::InitHelpID().

#define IDH_IDC_AUTO_LOGOUT 0x3FB

Definition at line 208 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_AUTO_LOGOUT_TIME 0x456

Definition at line 281 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_AUTO_REFRESH 0x4CE

Definition at line 386 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_BAR_TREE 0x443

Definition at line 263 of file wincvs.h.

#define IDH_IDC_BRANCHID 0x4D0

Definition at line 388 of file wincvs.h.

Referenced by CImport_OPTIONS::InitHelpID().

#define IDH_IDC_BRANCHPOINT_MERGE 0x505

Definition at line 441 of file wincvs.h.

Referenced by CUpdateMerge::InitHelpID().

#define IDH_IDC_BROWSE_ALTERNATE_SETTINGS 0x445

Definition at line 265 of file wincvs.h.

#define IDH_IDC_BROWSE_BRANCHID 0x4D1

Definition at line 389 of file wincvs.h.

Referenced by CImport_OPTIONS::InitHelpID().

#define IDH_IDC_BROWSE_CVSROOT 0x400

Definition at line 211 of file wincvs.h.

Referenced by CRtag_MAIN::InitHelpID(), CLogin_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CItemListDlg::InitHelpID(), CInit_MAIN::InitHelpID(), CImport_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDH_IDC_BROWSE_DIFFOPTIONS 0x4C5

Definition at line 377 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID().

#define IDH_IDC_BROWSE_EXTERNAL_DIFF 0x448

Definition at line 268 of file wincvs.h.

#define IDH_IDC_BROWSE_EXTERNAL_EDITOR 0x440

Definition at line 260 of file wincvs.h.

#define IDH_IDC_BROWSE_FILENAME 0x451

Definition at line 277 of file wincvs.h.

Referenced by CGetPrefs_CVS::InitHelpID(), and CGetPrefs_WINCVS::InitHelpID().

#define IDH_IDC_BROWSE_MODNAME 0x4B5

Definition at line 364 of file wincvs.h.

Referenced by CRtag_MAIN::InitHelpID(), CImport_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDH_IDC_BROWSE_PATH 0x405

Definition at line 215 of file wincvs.h.

Referenced by CCmdLine_MAIN::InitHelpID(), CImport_OPTIONS::InitHelpID(), CGetPrefs_CVS::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDH_IDC_BROWSE_PYTHONDLL 0x44F

Definition at line 275 of file wincvs.h.

#define IDH_IDC_BROWSE_READ_FROM 0x4B1

Definition at line 361 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_BROWSE_SELECTION 0x4C7

Definition at line 379 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_BROWSE_TAG 0x4AF

Definition at line 359 of file wincvs.h.

Referenced by CUpdateMerge::InitHelpID(), CUpdateOptions::InitHelpID(), CTag_MAIN::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CRtag_MAIN::InitHelpID(), CLogFilters::InitHelpID(), CItemListDlg::InitHelpID(), CImport_MAIN::InitHelpID(), CDiff_MAIN::InitHelpID(), CCommit_OPTIONS::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDH_IDC_BROWSE_TAG1 0x4B2

Definition at line 362 of file wincvs.h.

#define IDH_IDC_BROWSE_TAG2 0x4B3

Definition at line 363 of file wincvs.h.

#define IDH_IDC_BROWSE_TCLDLL 0x454

Definition at line 280 of file wincvs.h.

#define IDH_IDC_BULB 0x3E9

Definition at line 192 of file wincvs.h.

#define IDH_IDC_CASE_SENSITIVE_NAMES 0x503

Definition at line 439 of file wincvs.h.

Referenced by CUpdateOptions::InitHelpID().

#define IDH_IDC_CHECK_UNMODIFIED 0x44A

Definition at line 270 of file wincvs.h.

Referenced by CTag_MAIN::InitHelpID().

#define IDH_IDC_CHECK_VALID_EDITS 0x47D

Definition at line 312 of file wincvs.h.

Referenced by CCommit_OPTIONS::InitHelpID().

#define IDH_IDC_CHECKOUT_DIR 0x473

Definition at line 302 of file wincvs.h.

Referenced by CCheckout_MAIN::InitHelpID().

#define IDH_IDC_CHECKOUT_READ_ONLY 0x3EA

Definition at line 193 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_CLEAR_KEYWORD 0x4EC

Definition at line 416 of file wincvs.h.

Referenced by CCvsRootDlg::InitHelpID().

#define IDH_IDC_COLOR_BRANCH 0x49B

Definition at line 340 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COLOR_DEAD 0x49F

Definition at line 344 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COLOR_HEADER 0x493

Definition at line 332 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COLOR_MERGE 0x491

Definition at line 330 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COLOR_NODE 0x49C

Definition at line 341 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COLOR_SELECTION 0x482

Definition at line 315 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COLOR_SHADOW 0x49E

Definition at line 343 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COLOR_STATE 0x43B

Definition at line 255 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COLOR_TAG 0x494

Definition at line 333 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_COMPARE_TYPE 0x4C1

Definition at line 373 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID().

#define IDH_IDC_COMPRESSION 0x45F

Definition at line 286 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_CONFLICT_DESC 0x419

Definition at line 228 of file wincvs.h.

Referenced by CImportEntry::InitHelpID().

#define IDH_IDC_CONSOLE 0x489

Definition at line 322 of file wincvs.h.

Referenced by CGetPrefs_CVS::InitHelpID().

#define IDH_IDC_CONTROL_ADDED_FILES 0x3F5

Definition at line 203 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_COPY_SETTINGS 0x4FC

Definition at line 432 of file wincvs.h.

Referenced by CSaveSettingsDlg::InitHelpID().

#define IDH_IDC_COPY_SETTINGS_NAME 0x4FD

Definition at line 433 of file wincvs.h.

Referenced by CSaveSettingsDlg::InitHelpID().

#define IDH_IDC_CREATE_MISSING_DIR 0x40F

Definition at line 225 of file wincvs.h.

Referenced by CUpdateMain::InitHelpID().

#define IDH_IDC_CREATE_SANDBOX 0x479

Definition at line 308 of file wincvs.h.

Referenced by CImport_OPTIONS::InitHelpID().

#define IDH_IDC_CTRL_PRESSED_ON_OK 0x4D9

Definition at line 397 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_CURRENT_DIFF_OPTIONS 0x4F4

Definition at line 424 of file wincvs.h.

Referenced by CDiff_Options::InitHelpID().

#define IDH_IDC_CVSGUISFURL 0x463

Definition at line 290 of file wincvs.h.

Referenced by CAboutDlg::InitHelpID().

#define IDH_IDC_CVSROOT 0x3E8

Definition at line 191 of file wincvs.h.

Referenced by CRtag_MAIN::InitHelpID(), CLogin_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CItemListDlg::InitHelpID(), CInit_MAIN::InitHelpID(), CImport_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDH_IDC_DATE 0x435

Definition at line 251 of file wincvs.h.

Referenced by CUpdateMerge::InitHelpID(), CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), and CItemListDlg::InitHelpID().

#define IDH_IDC_DATE1 0x423

Definition at line 237 of file wincvs.h.

#define IDH_IDC_DATE2 0x426

Definition at line 239 of file wincvs.h.

#define IDH_IDC_DEFAULT_BRANCH 0x43A

Definition at line 254 of file wincvs.h.

Referenced by CLogMain::InitHelpID().

#define IDH_IDC_DEFAULT_CVSIGNORE 0x475

Definition at line 304 of file wincvs.h.

Referenced by CImport_OPTIONS::InitHelpID().

#define IDH_IDC_DELETE_ALL_FILES 0x468

Definition at line 294 of file wincvs.h.

Referenced by CRelease_MAIN::InitHelpID().

#define IDH_IDC_DELETE_CVS_INFO 0x46A

Definition at line 296 of file wincvs.h.

Referenced by CRelease_MAIN::InitHelpID().

#define IDH_IDC_DELETE_DIRECTORY 0x4C8

Definition at line 380 of file wincvs.h.

Referenced by CRelease_MAIN::InitHelpID().

#define IDH_IDC_DIFF 0x48E

Definition at line 327 of file wincvs.h.

Referenced by CCommit_MAIN::InitHelpID().

#define IDH_IDC_DIFF_OPTION_DESCRIPTION 0x4F6

Definition at line 426 of file wincvs.h.

Referenced by CDiff_Options::InitHelpID().

#define IDH_IDC_DIFF_OPTION_LIST 0x4F5

Definition at line 425 of file wincvs.h.

Referenced by CDiff_Options::InitHelpID().

#define IDH_IDC_DIFFOPTIONS 0x4C4

Definition at line 376 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID().

#define IDH_IDC_DONT_SHORTEN_PATHS 0x4D3

Definition at line 391 of file wincvs.h.

Referenced by CCheckout_MAIN::InitHelpID().

#define IDH_IDC_DOWN 0x469

Definition at line 295 of file wincvs.h.

Referenced by CCustomizeMenus::InitHelpID().

#define IDH_IDC_EDIT_KEYWORD 0x4EE

Definition at line 418 of file wincvs.h.

Referenced by CCvsRootDlg::InitHelpID().

#define IDH_IDC_ENCRYPTION 0x3F0

Definition at line 199 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_ENTRIES_LIST 0x418

Definition at line 227 of file wincvs.h.

Referenced by CImportFilterDlg::InitHelpID().

#define IDH_IDC_ENTRY 0x40A

Definition at line 220 of file wincvs.h.

#define IDH_IDC_ENTRY_EDIT 0x41A

Definition at line 229 of file wincvs.h.

Referenced by CImportFilterDlg::InitHelpID().

#define IDH_IDC_ENTRYSTATE_FORCE_BINARY 0x434

Definition at line 250 of file wincvs.h.

Referenced by CImportEntry::InitHelpID().

#define IDH_IDC_ENTRYSTATE_FORCE_TEXT 0x41E

Definition at line 233 of file wincvs.h.

Referenced by CImportEntry::InitHelpID().

#define IDH_IDC_ENTRYSTATE_FORCE_UNICODE 0x436

Definition at line 252 of file wincvs.h.

Referenced by CImportEntry::InitHelpID().

#define IDH_IDC_ENTRYSTATE_IGNORE 0x41F

Definition at line 234 of file wincvs.h.

Referenced by CImportEntry::InitHelpID().

#define IDH_IDC_ENTRYSTATE_NO_CHANGE 0x41C

Definition at line 231 of file wincvs.h.

Referenced by CImportEntry::InitHelpID().

#define IDH_IDC_ENTRYSTATE_NO_EXPANSION 0x421

Definition at line 236 of file wincvs.h.

Referenced by CImportEntry::InitHelpID().

#define IDH_IDC_EXPORT 0x45B

Definition at line 283 of file wincvs.h.

Referenced by CCheckout_MAIN::InitHelpID().

#define IDH_IDC_EXTERNAL_DIFF 0x449

Definition at line 269 of file wincvs.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDH_IDC_EXTERNAL_EDITOR 0x442

Definition at line 262 of file wincvs.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDH_IDC_FILENAME 0x4CB

Definition at line 383 of file wincvs.h.

Referenced by CSelectionDetailsDlg::InitHelpID().

#define IDH_IDC_FILEPATH 0x3F6

Definition at line 204 of file wincvs.h.

Referenced by CSelectionDetailsDlg::InitHelpID().

#define IDH_IDC_FILES_MODIFICATION_TIME 0x477

Definition at line 306 of file wincvs.h.

Referenced by CImport_OPTIONS::InitHelpID().

#define IDH_IDC_FILETODIFF 0x490

Definition at line 329 of file wincvs.h.

Referenced by CCommit_MAIN::InitHelpID().

#define IDH_IDC_FILTER 0x4D7

Definition at line 395 of file wincvs.h.

Referenced by CFilterSelectionDlg::InitHelpID().

#define IDH_IDC_FILTER_CONTENTS 0x4D6

Definition at line 394 of file wincvs.h.

Referenced by CFilterSelectionDlg::InitHelpID().

#define IDH_IDC_FORCE_COMMIT 0x476

Definition at line 305 of file wincvs.h.

Referenced by CCommit_OPTIONS::InitHelpID().

#define IDH_IDC_FORCE_CVSROOT 0x45A

Definition at line 282 of file wincvs.h.

Referenced by CRtag_MAIN::InitHelpID(), CLogin_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CItemListDlg::InitHelpID(), CInit_MAIN::InitHelpID(), CImport_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDH_IDC_FORCE_HEAD_REV 0x409

Definition at line 219 of file wincvs.h.

Referenced by CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDH_IDC_FORCE_KEY_CTRL 0x488

Definition at line 321 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_FORCE_KEY_SHIFT 0x487

Definition at line 320 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_FORCE_RECURSE 0x478

Definition at line 307 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID(), and CCommit_OPTIONS::InitHelpID().

#define IDH_IDC_FORCE_REVISION 0x47A

Definition at line 309 of file wincvs.h.

#define IDH_IDC_GET_CLEAN_COPY 0x410

Definition at line 226 of file wincvs.h.

Referenced by CUpdateMain::InitHelpID().

#define IDH_IDC_GROUP_OPTIONS 0x4BF

Definition at line 371 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_GRPBOX_TEXT 0x4AA

Definition at line 354 of file wincvs.h.

#define IDH_IDC_HAS_ALTERNATE_CVS 0x44C

Definition at line 272 of file wincvs.h.

Referenced by CGetPrefs_CVS::InitHelpID().

#define IDH_IDC_HAS_ALTERNATE_SETTINGS 0x4C6

Definition at line 378 of file wincvs.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDH_IDC_HAS_BRANCHID 0x4CF

Definition at line 387 of file wincvs.h.

Referenced by CImport_OPTIONS::InitHelpID().

#define IDH_IDC_HAS_COMPRESSION 0x3EC

Definition at line 195 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_HAS_DATE 0x41D

Definition at line 232 of file wincvs.h.

Referenced by CUpdateMerge::InitHelpID(), CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CLogFilters::InitHelpID(), and CItemListDlg::InitHelpID().

#define IDH_IDC_HAS_DATE1 0x4A8

Definition at line 352 of file wincvs.h.

#define IDH_IDC_HAS_DATE2 0x4A9

Definition at line 353 of file wincvs.h.

#define IDH_IDC_HAS_EXTERNAL_DIFF 0x447

Definition at line 267 of file wincvs.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDH_IDC_HAS_PATH 0x42E

Definition at line 245 of file wincvs.h.

Referenced by CCmdLine_MAIN::InitHelpID().

#define IDH_IDC_HAS_REV 0x40C

Definition at line 222 of file wincvs.h.

Referenced by CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CLogFilters::InitHelpID(), CItemListDlg::InitHelpID(), CCommit_OPTIONS::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDH_IDC_HAS_STATES 0x501

Definition at line 437 of file wincvs.h.

Referenced by CLogFilters::InitHelpID().

#define IDH_IDC_HAS_USERS 0x429

Definition at line 241 of file wincvs.h.

Referenced by CLogFilters::InitHelpID().

#define IDH_IDC_HEADERS 0x42C

Definition at line 243 of file wincvs.h.

Referenced by CLogMain::InitHelpID().

#define IDH_IDC_HEADERS_DESC 0x42F

Definition at line 246 of file wincvs.h.

Referenced by CLogMain::InitHelpID().

#define IDH_IDC_HELP_INIT 0x45C

Definition at line 284 of file wincvs.h.

Referenced by CInit_MAIN::InitHelpID().

#define IDH_IDC_HELPLOGIN 0x4C0

Definition at line 372 of file wincvs.h.

Referenced by CLogin_MAIN::InitHelpID().

#define IDH_IDC_HOME 0x432

Definition at line 248 of file wincvs.h.

Referenced by CGetPrefs_CVS::InitHelpID().

#define IDH_IDC_ICON_STATIC 0x4E2

Definition at line 406 of file wincvs.h.

#define IDH_IDC_IGNORECASE 0x470

Definition at line 300 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID().

#define IDH_IDC_IGNOREWHITESPACE 0x46F

Definition at line 299 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID().

#define IDH_IDC_IMPORT_FILTER 0x4F3

Definition at line 423 of file wincvs.h.

Referenced by CImport_OPTIONS::InitHelpID().

#define IDH_IDC_ISDATE 0x48A

Definition at line 323 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDH_IDC_ISDATE1 0x43D

Definition at line 257 of file wincvs.h.

#define IDH_IDC_ISDATE2 0x43E

Definition at line 258 of file wincvs.h.

#define IDH_IDC_ITEM 0x4BA

Definition at line 368 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_ITEM_LABEL 0x4BB

Definition at line 369 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_ITEM_LIST 0x4B6

Definition at line 365 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_ITEM_LIST_OPTION 0x4BC

Definition at line 370 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_KEYWORD_DESC 0x4C3

Definition at line 375 of file wincvs.h.

Referenced by CUpdateOptions::InitHelpID(), and CDiff_MAIN::InitHelpID().

#define IDH_IDC_KEYWORD_DESCRIPTION 0x4F0

Definition at line 420 of file wincvs.h.

Referenced by CEditKeywordDlg::InitHelpID().

#define IDH_IDC_KEYWORD_OPT 0x4C2

Definition at line 374 of file wincvs.h.

Referenced by CUpdateOptions::InitHelpID(), and CDiff_MAIN::InitHelpID().

#define IDH_IDC_KEYWORD_VALUE 0x4F1

Definition at line 421 of file wincvs.h.

Referenced by CEditKeywordDlg::InitHelpID().

#define IDH_IDC_KEYWORDLIST 0x4EB

Definition at line 415 of file wincvs.h.

Referenced by CCvsRootDlg::InitHelpID().

#define IDH_IDC_KEYWORDLIST_DESC 0x4ED

Definition at line 417 of file wincvs.h.

Referenced by CCvsRootDlg::InitHelpID().

#define IDH_IDC_LAST_CHECKIN_TIME 0x502

Definition at line 438 of file wincvs.h.

Referenced by CUpdateOptions::InitHelpID().

#define IDH_IDC_MATCH_ENTRIES_CASE 0x3FD

Definition at line 210 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_MENULIST 0x46B

Definition at line 297 of file wincvs.h.

Referenced by CCustomizeMenus::InitHelpID().

#define IDH_IDC_MERGE_TYPE 0x506

Definition at line 442 of file wincvs.h.

Referenced by CUpdateMerge::InitHelpID().

#define IDH_IDC_MESSAGE_DETAILS 0x4E3

Definition at line 407 of file wincvs.h.

#define IDH_IDC_MODNAME 0x404

Definition at line 214 of file wincvs.h.

Referenced by CRtag_MAIN::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDH_IDC_MODULEDESC_TEXT 0x4AC

Definition at line 356 of file wincvs.h.

#define IDH_IDC_MOVDEL_BRANCH 0x4D2

Definition at line 390 of file wincvs.h.

Referenced by CTag_MAIN::InitHelpID(), and CRtag_MAIN::InitHelpID().

#define IDH_IDC_MULTILINE_ACTION 0x4DF

Definition at line 403 of file wincvs.h.

Referenced by CMultilineEntryDlg::InitHelpID().

#define IDH_IDC_MULTILINE_ENTRY 0x401

Definition at line 212 of file wincvs.h.

Referenced by CMultilineEntryDlg::InitHelpID().

#define IDH_IDC_MULTILINE_ENTRY_STATIC 0x4DC

Definition at line 400 of file wincvs.h.

#define IDH_IDC_MULTILINE_ENTRY_WRAP 0x40D

Definition at line 223 of file wincvs.h.

Referenced by CMultilineEntryDlg::InitHelpID().

#define IDH_IDC_MULTILINE_GO_ACTION 0x4DD

Definition at line 401 of file wincvs.h.

Referenced by CMultilineEntryDlg::InitHelpID().

#define IDH_IDC_MULTILINE_POSITION 0x44B

Definition at line 271 of file wincvs.h.

Referenced by CMultilineEntryDlg::InitHelpID().

#define IDH_IDC_MULTILINE_PREV_ENTRY 0x450

Definition at line 276 of file wincvs.h.

Referenced by CMultilineEntryDlg::InitHelpID().

#define IDH_IDC_MULTILINE_TYPE 0x4DA

Definition at line 398 of file wincvs.h.

#define IDH_IDC_MULTILINE_WORDWRAP 0x46D

Definition at line 298 of file wincvs.h.

Referenced by CMultilineEntryDlg::InitHelpID().

#define IDH_IDC_NEXTTIP 0x3ED

Definition at line 196 of file wincvs.h.

#define IDH_IDC_NO_MODULE_PROGRAM 0x47B

Definition at line 310 of file wincvs.h.

Referenced by CCommit_OPTIONS::InitHelpID().

#define IDH_IDC_NO_SPLASH_SCREEN 0x3F3

Definition at line 201 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_NO_VENDOR_RELEASE_TAGS 0x4DB

Definition at line 399 of file wincvs.h.

Referenced by CImport_MAIN::InitHelpID().

#define IDH_IDC_NORECURS 0x407

Definition at line 217 of file wincvs.h.

Referenced by CUpdateMain::InitHelpID(), CTag_MAIN::InitHelpID(), CStatus_MAIN::InitHelpID(), CRtag_MAIN::InitHelpID(), CLogMain::InitHelpID(), CDiff_MAIN::InitHelpID(), CCommit_OPTIONS::InitHelpID(), CCheckout_MAIN::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDH_IDC_NOTAGS 0x42A

Definition at line 242 of file wincvs.h.

Referenced by CLogMain::InitHelpID().

#define IDH_IDC_OPTIONCHECK_BUTTON 0x71

Definition at line 190 of file wincvs.h.

Referenced by COptionalPropertySheet::InitHelpID().

#define IDH_IDC_OTHER_BUTTON 0x4DE

Definition at line 402 of file wincvs.h.

#define IDH_IDC_OUTPUT_QUICK 0x4AD

Definition at line 357 of file wincvs.h.

Referenced by CStatus_MAIN::InitHelpID().

#define IDH_IDC_OUTPUT_STANDARD 0x4B0

Definition at line 360 of file wincvs.h.

Referenced by CStatus_MAIN::InitHelpID().

#define IDH_IDC_OUTPUT_VERBOSE 0x4AE

Definition at line 358 of file wincvs.h.

Referenced by CStatus_MAIN::InitHelpID().

#define IDH_IDC_OVERRIDE_CHECKOUT_DIR 0x474

Definition at line 303 of file wincvs.h.

Referenced by CCheckout_MAIN::InitHelpID().

#define IDH_IDC_OVERWRITE 0x40B

Definition at line 221 of file wincvs.h.

Referenced by CTag_MAIN::InitHelpID(), and CRtag_MAIN::InitHelpID().

#define IDH_IDC_OVERWRITE_RELEASE_TAGS 0x4F2

Definition at line 422 of file wincvs.h.

Referenced by CImport_MAIN::InitHelpID().

#define IDH_IDC_PASSWORD 0x3FA

Definition at line 207 of file wincvs.h.

Referenced by GetPassword::InitHelpID().

#define IDH_IDC_PATH 0x408

Definition at line 218 of file wincvs.h.

Referenced by CSaveSettingsDlg::InitHelpID(), CRelease_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CImport_OPTIONS::InitHelpID(), and CCheckout_MAIN::InitHelpID().

#define IDH_IDC_PREVIEW_CVSROOT 0x4FE

Definition at line 434 of file wincvs.h.

Referenced by CCvsRootDlg::InitHelpID().

#define IDH_IDC_PREVIEWINFO 0x4A6

Definition at line 351 of file wincvs.h.

#define IDH_IDC_PROGRESS 0x45E

Definition at line 285 of file wincvs.h.

#define IDH_IDC_PROGRESS_TEXT 0x4C9

Definition at line 381 of file wincvs.h.

#define IDH_IDC_PROMPTEDIT 0x3F7

Definition at line 205 of file wincvs.h.

#define IDH_IDC_PROTOCOL 0x4EA

Definition at line 414 of file wincvs.h.

Referenced by CCvsRootDlg::InitHelpID().

#define IDH_IDC_PROTOCOL_DESC 0x4E9

Definition at line 413 of file wincvs.h.

Referenced by CCvsRootDlg::InitHelpID().

#define IDH_IDC_PROTOCOL_KEYWORD 0x4EF

Definition at line 419 of file wincvs.h.

Referenced by CEditKeywordDlg::InitHelpID().

#define IDH_IDC_PRUNE_EMPTY_DIR 0x3EE

Definition at line 197 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_PYTHON_URL 0x4A5

Definition at line 350 of file wincvs.h.

Referenced by CNoPython::InitHelpID().

#define IDH_IDC_PYTHONDLL 0x44D

Definition at line 273 of file wincvs.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDH_IDC_QUIET 0x3F4

Definition at line 202 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_RANGE_DATE 0x500

Definition at line 436 of file wincvs.h.

Referenced by CLogFilters::InitHelpID().

#define IDH_IDC_RANGE_REV_TAG 0x4FF

Definition at line 435 of file wincvs.h.

Referenced by CLogFilters::InitHelpID().

#define IDH_IDC_RCS_FILENAMES_ONLY 0x43C

Definition at line 256 of file wincvs.h.

Referenced by CLogMain::InitHelpID().

#define IDH_IDC_REACTION_SPEED 0x4D4

Definition at line 392 of file wincvs.h.

Referenced by CFilterMaskOptDlg::InitHelpID().

#define IDH_IDC_REACTION_SPEED_SECONDS 0x4D8

Definition at line 396 of file wincvs.h.

Referenced by CFilterMaskOptDlg::InitHelpID().

#define IDH_IDC_REACTION_SPEED_SPIN 0x4D5

Definition at line 393 of file wincvs.h.

Referenced by CFilterMaskOptDlg::InitHelpID().

#define IDH_IDC_READ_FROM 0x4B9

Definition at line 367 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_REFRESH_ITEMS 0x4B7

Definition at line 366 of file wincvs.h.

Referenced by CItemListDlg::InitHelpID().

#define IDH_IDC_RELEASE_TAG 0x441

Definition at line 261 of file wincvs.h.

Referenced by CImport_MAIN::InitHelpID().

#define IDH_IDC_REMIND 0x4A4

Definition at line 349 of file wincvs.h.

Referenced by CNoPython::InitHelpID().

#define IDH_IDC_REMOVE 0x466

Definition at line 292 of file wincvs.h.

Referenced by CCustomizeMenus::InitHelpID().

#define IDH_IDC_REPOSITORY_PATH 0x47E

Definition at line 313 of file wincvs.h.

Referenced by CImport_MAIN::InitHelpID(), and CCvsRootDlg::InitHelpID().

#define IDH_IDC_RESET_COLORS 0x492

Definition at line 331 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RESET_STICKY 0x40E

Definition at line 224 of file wincvs.h.

Referenced by CUpdateOptions::InitHelpID().

#define IDH_IDC_REV_TAG 0x420

Definition at line 235 of file wincvs.h.

Referenced by CUpdateMerge::InitHelpID(), CUpdateOptions::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CItemListDlg::InitHelpID(), and CCommit_OPTIONS::InitHelpID().

#define IDH_IDC_REV_TAG1 0x43F

Definition at line 259 of file wincvs.h.

#define IDH_IDC_REV_TAG2 0x427

Definition at line 240 of file wincvs.h.

#define IDH_IDC_REV_TAG_DATE 0x48C

Definition at line 325 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

#define IDH_IDC_REVISION 0x4CD

Definition at line 385 of file wincvs.h.

Referenced by CSelectionDetailsDlg::InitHelpID().

#define IDH_IDC_REVISION_SPIN 0x4CC

Definition at line 384 of file wincvs.h.

Referenced by CSelectionDetailsDlg::InitHelpID().

#define IDH_IDC_RGB_BRANCH 0x497

Definition at line 336 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RGB_DEAD 0x499

Definition at line 338 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RGB_HEADER 0x495

Definition at line 334 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RGB_MERGE 0x4A2

Definition at line 347 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RGB_NODE 0x498

Definition at line 337 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RGB_SELECTION 0x4A0

Definition at line 345 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RGB_SHADOW 0x4A1

Definition at line 346 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RGB_STATE 0x49A

Definition at line 339 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_RGB_TAG 0x496

Definition at line 335 of file wincvs.h.

Referenced by CGraphOptDlg::InitHelpID().

#define IDH_IDC_SAME_ACTION_NEXT_TIME 0x4E8

Definition at line 412 of file wincvs.h.

Referenced by CFileAction_MAIN::InitHelpID().

#define IDH_IDC_SELECTION 0x49D

Definition at line 342 of file wincvs.h.

Referenced by CSelectionDetailsDlg::InitHelpID().

#define IDH_IDC_SELECTION_LIST 0x4CA

Definition at line 382 of file wincvs.h.

Referenced by CSelectionDetailsDlg::InitHelpID().

#define IDH_IDC_SETTINGS_NAME 0x4FB

Definition at line 431 of file wincvs.h.

Referenced by CSaveSettingsDlg::InitHelpID().

#define IDH_IDC_SHOW_CVS_METHOD 0x4E5

Definition at line 409 of file wincvs.h.

Referenced by CGetPrefs_CVS::InitHelpID().

#define IDH_IDC_SKIP_ANNOTATE 0x48B

Definition at line 324 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_SKIP_DIFF 0x484

Definition at line 317 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_SKIP_FILEACTION 0x48F

Definition at line 328 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_SKIP_GRAPH 0x485

Definition at line 318 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_SKIP_LOG 0x486

Definition at line 319 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_SKIP_STATUS 0x48D

Definition at line 326 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_SKIP_UPDATE 0x483

Definition at line 316 of file wincvs.h.

Referenced by CGetPrefs_CVSCMD_DIALOGS::InitHelpID().

#define IDH_IDC_SPIN_AUTO_LOGOUT_TIME 0x3FC

Definition at line 209 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_SPIN_COMPRESSION 0x460

Definition at line 287 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_STARTUP 0x3EB

Definition at line 194 of file wincvs.h.

#define IDH_IDC_STATES 0x425

Definition at line 238 of file wincvs.h.

Referenced by CLogFilters::InitHelpID().

#define IDH_IDC_STATIC_CURRENTOPTIONS 0x4F8

Definition at line 428 of file wincvs.h.

#define IDH_IDC_STATIC_OPTDESC 0x4F9

Definition at line 429 of file wincvs.h.

#define IDH_IDC_STATICGROUP_SELECTOPTIONS 0x4F7

Definition at line 427 of file wincvs.h.

#define IDH_IDC_STDOUT 0x403

Definition at line 213 of file wincvs.h.

Referenced by CUpdateOptions::InitHelpID().

#define IDH_IDC_SUPRESS_HEADER 0x42D

Definition at line 244 of file wincvs.h.

Referenced by CLogMain::InitHelpID().

#define IDH_IDC_TAGDESC_TEXT 0x4AB

Definition at line 355 of file wincvs.h.

#define IDH_IDC_TAGNAME 0x406

Definition at line 216 of file wincvs.h.

Referenced by CTag_MAIN::InitHelpID(), and CRtag_MAIN::InitHelpID().

#define IDH_IDC_TCLDLL 0x452

Definition at line 278 of file wincvs.h.

Referenced by CGetPrefs_WINCVS::InitHelpID().

#define IDH_IDC_TEMPFILE 0x4A3

Definition at line 348 of file wincvs.h.

Referenced by CEditorMonDlg::InitHelpID().

#define IDH_IDC_TEMPLATE_LIST 0x4E0

Definition at line 404 of file wincvs.h.

Referenced by CTemplateDlg::InitHelpID().

#define IDH_IDC_TEMPLATE_PREVIEW 0x4E1

Definition at line 405 of file wincvs.h.

Referenced by CTemplateDlg::InitHelpID().

#define IDH_IDC_THREE_WAY_CONFLICTS 0x504

Definition at line 440 of file wincvs.h.

Referenced by CUpdateMerge::InitHelpID().

#define IDH_IDC_TIPSTRING 0x3EF

Definition at line 198 of file wincvs.h.

#define IDH_IDC_UNIFIEDDIFF 0x472

Definition at line 301 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID().

#define IDH_IDC_UNIX_LF 0x3F1

Definition at line 200 of file wincvs.h.

Referenced by CGetPrefs_GLOBALS::InitHelpID().

#define IDH_IDC_UP 0x467

Definition at line 293 of file wincvs.h.

Referenced by CCustomizeMenus::InitHelpID().

#define IDH_IDC_USE_EXTERNAL_DIFF 0x444

Definition at line 264 of file wincvs.h.

Referenced by CDiff_MAIN::InitHelpID().

#define IDH_IDC_USERS 0x439

Definition at line 253 of file wincvs.h.

Referenced by CLogFilters::InitHelpID().

#define IDH_IDC_VENDOR_TAG 0x47C

Definition at line 311 of file wincvs.h.

Referenced by CImport_MAIN::InitHelpID().

#define IDH_IDC_WARNING_DESC 0x41B

Definition at line 230 of file wincvs.h.

Referenced by CImportWarning::InitHelpID().

#define IDH_IDC_WINCVSURL 0x461

Definition at line 288 of file wincvs.h.

Referenced by CAboutDlg::InitHelpID().

#define IDH_IDC_WINCVSVER 0x453

Definition at line 279 of file wincvs.h.

Referenced by CAboutDlg::InitHelpID().

#define IDH_IDD_ABOUTBOX 0x20064

Definition at line 137 of file wincvs.h.

#define IDH_IDD_ADMINOPTION 0x200C4

Definition at line 167 of file wincvs.h.

#define IDH_IDD_ALERT 0x20086

Definition at line 140 of file wincvs.h.

#define IDH_IDD_ANNOTATE_MAIN 0x200C0

Definition at line 164 of file wincvs.h.

#define IDH_IDD_CHECKOUT_MAIN 0x20089

Definition at line 142 of file wincvs.h.

#define IDH_IDD_CMDLINE_MAIN 0x2008E

Definition at line 146 of file wincvs.h.

#define IDH_IDD_COMMIT_MAIN 0x2008A

Definition at line 143 of file wincvs.h.

#define IDH_IDD_COMMIT_OPTIONS 0x200BA

Definition at line 162 of file wincvs.h.

#define IDH_IDD_CUSTOMIZE 0x200B5

Definition at line 160 of file wincvs.h.

#define IDH_IDD_CVSROOT 0x200E0

Definition at line 184 of file wincvs.h.

#define IDH_IDD_CVSTEMPLATE 0x200DA

Definition at line 182 of file wincvs.h.

#define IDH_IDD_DIFF_MAIN 0x2009A

Definition at line 155 of file wincvs.h.

#define IDH_IDD_DIFF_OPTIONS 0x20099

Definition at line 154 of file wincvs.h.

#define IDH_IDD_EDITKEYWORD 0x200E2

Definition at line 185 of file wincvs.h.

#define IDH_IDD_EDITMESSAGE 0x200C3

Definition at line 166 of file wincvs.h.

#define IDH_IDD_EDITORMON 0x200C5

Definition at line 168 of file wincvs.h.

#define IDH_IDD_ENTRYDESC 0x20092

Definition at line 149 of file wincvs.h.

#define IDH_IDD_FILTER_SELECTION 0x200D5

Definition at line 180 of file wincvs.h.

#define IDH_IDD_FILTERBAR_OPTIONS 0x200D4

Definition at line 179 of file wincvs.h.

#define IDH_IDD_GRAPH_OPTIONS 0x200C1

Definition at line 165 of file wincvs.h.

#define IDH_IDD_IMPORT_MAIN 0x2008B

Definition at line 144 of file wincvs.h.

#define IDH_IDD_IMPORT_OPTIONS 0x2008C

Definition at line 145 of file wincvs.h.

#define IDH_IDD_IMPORTFILTER 0x2008F

Definition at line 147 of file wincvs.h.

#define IDH_IDD_INIT_MAIN 0x200A5

Definition at line 158 of file wincvs.h.

#define IDH_IDD_ITEM_LIST 0x200CD

Definition at line 174 of file wincvs.h.

#define IDH_IDD_LOG_FILTERS 0x20098

Definition at line 153 of file wincvs.h.

#define IDH_IDD_LOG_MAIN 0x20096

Definition at line 152 of file wincvs.h.

#define IDH_IDD_LOGIN_MAIN 0x200CE

Definition at line 175 of file wincvs.h.

#define IDH_IDD_MULTILINE_ENTRY 0x200D6

Definition at line 181 of file wincvs.h.

#define IDH_IDD_NOPYTHON 0x200C6

Definition at line 169 of file wincvs.h.

#define IDH_IDD_OPEN_MAIN 0x200DB

Definition at line 183 of file wincvs.h.

#define IDH_IDD_PASSWRD 0x20084

Definition at line 139 of file wincvs.h.

#define IDH_IDD_PREFS_CVS 0x200CF

Definition at line 176 of file wincvs.h.

#define IDH_IDD_PREFS_CVSCMD_DIALOGS 0x200BF

Definition at line 163 of file wincvs.h.

#define IDH_IDD_PREFS_GLOBALS 0x20088

Definition at line 141 of file wincvs.h.

#define IDH_IDD_PREFS_WINCVS 0x2009C

Definition at line 157 of file wincvs.h.

#define IDH_IDD_PROGRESS 0x200B1

Definition at line 159 of file wincvs.h.

#define IDH_IDD_RELEASE_MAIN 0x200D0

Definition at line 177 of file wincvs.h.

#define IDH_IDD_RTAG_MAIN 0x200C8

Definition at line 171 of file wincvs.h.

#define IDH_IDD_RTAG_OPTIONS 0x200C9

Definition at line 172 of file wincvs.h.

#define IDH_IDD_SAVESETTINGS 0x200B8

Definition at line 161 of file wincvs.h.

#define IDH_IDD_SELECTION_DETAILS 0x200D1

Definition at line 178 of file wincvs.h.

#define IDH_IDD_STATUS_MAIN 0x200CB

Definition at line 173 of file wincvs.h.

#define IDH_IDD_TAG_MAIN 0x200C7

Definition at line 170 of file wincvs.h.

#define IDH_IDD_TIP 0x20069

Definition at line 138 of file wincvs.h.

#define IDH_IDD_UPDATE_MAIN 0x20093

Definition at line 150 of file wincvs.h.

#define IDH_IDD_UPDATE_MERGE 0x20095

Definition at line 151 of file wincvs.h.

#define IDH_IDD_UPDATE_OPTIONS 0x2009B

Definition at line 156 of file wincvs.h.

#define IDH_IDD_WARNINGDESC 0x20091

Definition at line 148 of file wincvs.h.

#define IDH_IDP_FAILED_TO_CREATE 0x30066

Definition at line 118 of file wincvs.h.

#define IDH_IDP_OLE_INIT_FAILED 0x30064

Definition at line 117 of file wincvs.h.

#define IDH_IDP_SOCKETS_INIT_FAILED 0x30068

Definition at line 119 of file wincvs.h.

#define IDH_IDR_BROWSER 0x20081

Definition at line 125 of file wincvs.h.

#define IDH_IDR_CNTR_INPLACE 0x20006

Definition at line 122 of file wincvs.h.

#define IDH_IDR_CUSTMENUS 0x200B6

Definition at line 132 of file wincvs.h.

#define IDH_IDR_FILELIST 0x2009D

Definition at line 126 of file wincvs.h.

#define IDH_IDR_FILTER 0x200BA

Definition at line 133 of file wincvs.h.

#define IDH_IDR_GRAPH 0x200A1

Definition at line 128 of file wincvs.h.

#define IDH_IDR_ITEMLIST 0x200CF

Definition at line 134 of file wincvs.h.

#define IDH_IDR_MAINFRAME 0x20080

Definition at line 123 of file wincvs.h.

#define IDH_IDR_MULTIUSER 0x2009E

Definition at line 127 of file wincvs.h.

#define IDH_IDR_STATEICONS 0x200A4

Definition at line 129 of file wincvs.h.

#define IDH_IDR_TAGS 0x200A5

Definition at line 130 of file wincvs.h.

#define IDH_IDR_WINCVSTYPE 0x20081

Definition at line 124 of file wincvs.h.

#define IDH_IDR_WORKSPACE 0x200AD

Definition at line 131 of file wincvs.h.

Generated on Sat Aug 7 22:47:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/res/resrc1.h File Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WinCvs/res/resrc1.h File Reference

Go to the source code of this file.

Generated on Sat Aug 7 22:47:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class List

WinCvs Source Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
_afxRichEditCookie |
_dircontents |
_dirdesc |
_frameRec |
_sDiffOptionsItem | Define the diff options list items
CAboutDlg |
AddBinCvsArgs | Class to add binary files
AddCvsArgs | Class to add files
AddUnicodeCvsArgs | Class to add Unicode files
CAdminOption_MAIN |
AFX_DLLVERSIONINFO |
CAllTargets |
CAnnotate_MAIN |
ansiAttrCvt |
ansiAttrCvt::AnsiSeq |
AREF |
aref |
awidget |
CBarConsole |
CBrowseFileView |
CBrowserBar |
UBrush |
CBuffer |
CButton |
CButton |
CButton |
CButton |
CCharFormat | Character format wrapper class
CCheckout_MAIN | Main checkout page
CCJBrowseButton |
CCJBrowseEdit |
CCJCaption |
CCJCaptionButton |
CCJCaptionPopupWnd |
CCJCBarButton |
CCJColorPicker |
CCJColorPopup |
CCJComboBoxEx |
CCJControlBar |
CCJDateEdit |
CCJDateTimeCtrl |
CCJDockBar |
CCJDockContext |
CCJExplorerBar |
CCJFlatButton |
CCJFlatComboBox |
CCJFlatHeaderCtrl |
CCJFlatSplitterWnd |
CCJFlatTabCtrl |
CCJFontCombo |
CCJFrameWnd |
CCJHexEdit |
CCJHtmlView |
CCJHyperLink |
CCJListBox |
CCJListCtrl |
CCJListView |
CCJLogoPane |
CCJMaskEdit |
CCJMDIChildWnd |
CCJMDIFrameWnd |
CCJMemFile |
CCJMenu |
CCJMenuBar |
CCJMenuBarFrameHook |
CCJMenuData |
CCJMetaFileButton |
CCJMiniDockFrameWnd |
CCJMonthCalCtrl |
CCJOutlookBar |
CCJPagerCtrl |
CCJReBar |
CCJReBarCtrl |
CCJShellTree |
CCJSizeDockBar |
CCJSortClass |
CCJSortClass::CSortItem |
CCJStatusBar |
CCJStatusBarPane |
CCJStatusBarPaneControlInfo |
CCJTabCtrl |
CCJTabCtrlBar |
CCJTabView |
CCJTimeEdit |
CCJToolBar |
CCJToolBarBase |
CCJToolBarCtrl |
CCJToolCmdUI |
CCJTreeCtrl |
CCJTreeCtrl::Color_Font |
CCJWindowPlacement |
CCmdLine_MAIN | Command line settings property page
UCmdTarget |
CCmdUI |
UCmdUI |
UCOLOR |
UColor | Portable color definition
CColorConsole |
CColorMenu |
CColorStatic |
CComboBox |
CComboBoxEx |
CCommit_MAIN |
CCommit_OPTIONS |
CContentItems |
CControlBar |
CCtrlView |
CCustInvertTable | Custom menu object
CCustomizeMenus |
CCVSAlert_MAIN |
UCvsApp |
UCvsConsole |
CCvsConsole | Abstract base class for CVS process console
UCvsFiles |
UCvsFolders |
UCvsFrame |
UCvsGraph |
UCvsMenubar |
CCvsProcessData | Application data holder passed to the cvsgui protocol callbacks
CCvsRootConsole | Base class for cvsRoot list console
CCvsRootDlg |
CCvsRootParser | Class to parse CVS root string
CCvsSandboxInfo | CVS sandbox info
UCvsStatusbar |
CCvsStatusBar |
CCvsStreamConsole | Base class for CVS stream console
UCvsToolbar |
UDC |
CDialog |
CDiff_MAIN |
CDiff_Options |
CDiff_Options::CompareInfo | Structure to hold the sorting settings
direct |
CDockBar |
CDockContext |
Wincvs::Document |
CDocument |
DROPDOWNBUTTON |
CDummyClass |
DYN_LIST |
CDynToolBar |
CEdit |
CEdit |
CEdit |
CEdit |
CEditKeywordDlg |
UEditMessage |
CEditorMonDlg |
ENTNODE | Allow reference of a file or a folder node
EntnodeData |
EntnodeFile |
EntnodeFolder |
EntnodePath |
CExploreBar |
CFileAction_MAIN |
CFileDialog |
FileEntry | Used internally
CFillPyEntries |
CFillTclEntries |
CFilterMaskOptDlg |
CFilterSelectionDlg |
CFindSettings |
CFormView |
CFrameWnd |
garbyRec |
GetPassword |
CGetPrefs_CVS | CVS preferences property page
CGetPrefs_CVSCMD_DIALOGS | Command dialogs preferences property page
CGetPrefs_GLOBALS | Global preferences property page
CGetPrefs_WINCVS | WinCvs preferences property page
CGfxGroupEdit |
CGfxOutBarCtrl |
CGfxOutBarCtrl::CBarFolder |
CGfxOutBarCtrl::CBarItem |
CGfxSplitterWnd |
CGraphConsole | Graph console
CGraphDoc | Graph document class
CGraphFrame |
CGraphOptDlg |
CGraphRectTracker | Graph rectangle tracker
CGraphView | Graph view class
CHARFORMAT |
CHeaderCtrl |
CHHelpDialog | HTML Help dialog
CHHelpPropertyPage | HTML Help property page
CHHelpPropertySheet | HTML Help property sheet
CHHelpSupport | HTML help support class
CHistComboBoxEx | Browse location history combo box class
CImport_MAIN | Import settings property page
CImport_OPTIONS | Import options property page
CImportEntry |
CImportFilterDlg |
ImportReport | Class to traverse and detect conflicts or warnings for import
CImportWarning |
CInfoParserConsole | Class to parse protocols available (obtained using cvs info)
CInit_MAIN |
irciiAttrCvt |
ItemDisplayInfo | Class to hold and support data display (e.g. sorting or storing the result for next display)
CItemListConsole | Base class for item list console
CItemListDlg |
CItemListDlg::CompareInfo | Structure to hold the sorting settings
ItemRowInfo | Structure to hold item's row information
Wincvs::IWincvs |
CJX_COLORMAP |
CJX_CONTROLPOS |
CKeyString | Dictionary specialization of TKeyString ('@')
CKeywordComboBox |
KeywordDisplayInfo | Class to hold and support data display
KeywordInfo | Structure to hold protocol row information
keywordMode | Structure to hold the keyword modes and their descriptions
KiColumn | Column descriptor abstract class
KiColumnModel | Columnar model of the data
KiFilterBase | Filter's base class
KiFilterModel | Interface to filtering entries
KiIgnoreModel | Interface to recursive display of entries
KiRecursionModel | Interface to recursive display of entries
KiSelectionHandler | Interface describing a handler to process a selection-related command
KoAddBinaryHandler | Handles binary addition of the selected items
KoAddHandler | Handles addition of the selected items
KoAddUnicodeHandler | Handles unicode addition of the selected items
KoAnnotateHandler | Handles annotate on the selected items
KoCancelChangesHandler | Handles cancel changes on the selected items
KoCheckoutHandler | Handles Checkout
KoColumnContext | Context in which a column is accessed
KoCommandLineHandler | Handles Command Line
KoCommitHandler | Handles commits of the selected items
KoConflictColumn | Conflict column
KoDateColumn | Date column
KoDiffHandler | Handles diffing on the selected items
KoEditorsHandler | Handles editors on the selected items
KoEncodingColumn | Encoding column
KoExtColumn | Extension column
KoFileActionHandler | Handles file action
KoFileRemoveHandler | Handles file remove requests
KoFileViewTraversalContext | Context for traversing
KoFilterMask | Filter mask item
KoFilterModel | Interface to filtering entries
KoGraphAnnotateHandler | Handles annotate on the selected graph items
KoGraphDiffHandler | Handles diffing on the selected items
KoGraphHandler | Handles graph log queries on the selected items
KoIgnoreModel | Interface for ignored entries
KoImportHandler | Handles Import
KoLockHandler | Handles locking on the selected items
KoLogHandler | Handles log queries on the selected items
KoMoveToTrashHandler | Handles moving files to trash
KoNameColumn | Name column
KoOptionColumn | Option column
KoPathColumn | Path column
KoQueryUpdateHandler | Handles query updates on the selected items
KoRecursionModel | Interface to recursive display of entries
KoRecursiveModel | Recursive columnar model
KoRegularModel | Regular columnar model
KoReleaseHandler | Handles releasing on the selected items
KoRevisionColumn | Revision column
KoStateColumn | State column
KoStatusHandler | Handles status queries on the selected items
KoTagColumn | Tag column
KoTraversalContext |
KoUneditHandler | Handles edit stop request on the selected items
KoUnlockHandler | Handles unlocking on the selected items
KoUpdateHandler | Handles updates on the selected items
KoUpdateMoveToTrashHandler | Handles figuring out if moving files to trash is enabled
KoWatcher | File modification watcher thread
KoWatchersHandler | Handles watchers on the selected items
KoWatchOffHandler | Handles watch off on the selected items
KoWatchOnHandler | Handles watch on on the selected items
LAttachment |
LBevelButton |
LCommander |
ULIST_INFO |
ULIST_INSERT |
CListBox |
CListCtrl |
CListCtrl |
CListParserConsole | Class to parse directories/files (obtained using cvs ls)
CListView |
LListener |
LMainPseudoAttachment |
CLogFilters | Filters log dialog
CLogFrame |
CLogin_MAIN |
CLogMain | Main log dialog
CLogNodeData |
CLogoutThread | Class to handle auto-logout
LOutlineItem |
LOutlineTable |
LPane |
LPeriodical |
LPlaceHolder |
LPseudoDrawAttachment |
LPseudoWinAttachment |
LSReport |
UMacAppMenu |
CMacBinItem |
MACBINMAP |
MACBINMAPENTRIES |
MacBinMaps |
CMacBinTable |
CMacroEntry |
CMacroSet |
MacroTraversal |
CMainFrame | Main frame class
CMapPtrToPtr |
match_dir | Helper functor to compare MultiFilesEntry by directory path
CMDIChildWnd |
CMDIFrameWnd |
CMemFile |
UMenu |
CMenu |
CMenuItemInfo |
UMessageMapFunctions |
CMfFileDialog | Multi-selection file dialog wrapper class
CMiniDockFrameWnd |
mircAttrCvt |
CMKeyString | Multi-key specialization of TKeyString ('x01')
CMMenuString | Menu string
CModuleParserConsole | Class to parse modules (obtained using cvs co -c)
CMPString | CPStr specialization of TMString
CMsg |
UMSGMAP |
UMSGMAP_ENTRY |
CMString | CStr specialization of TMString
MultiFiles | Store multiple files by directory
MultiFilesEntry | Used internally
MultiFilesEntryIndex | A pair of MultiFiles::const_iterator and index allowing to identify the FileEntry
CMultiLineEditDialogKeyHelper | Helper class to process dialog messages for dialogs containing multi-line edit control
CMultilineEntryDlg | Multiline entry controls complex
CMyShellTree |
CNoPython |
NotificationManager | Notification manager
NotificationManager::Node | Node describing observer registration
CObject |
UObject |
ColorTableEntry |
ColumnIndex | Column index class
ControlCvsArgs | Base class for control arguments used by add commands (added files are tested appropriate)
option |
COptionalPropertySheet |
OUTBAR_INFO |
CPathBuffer | Support class to handle the selection buffer
PCPStr | Persistent P string
PCStr | Persistent C string
UPen |
CPersistent | Abstract class to access the persistent data to load/save
CPersistent::CPersistentEntry | Entry description internal structure
CPersistentBool | bool type persistent specialization
CPersistentInt | int type persistent specialization
CPersistentT< T > | Template class for persistent values
UPoint |
UPOINT |
poolRec |
UPPMenu |
CProgress | Progress indicator wrapper class
CProgressDlg | Progress dialog, should be dynamically allocated
UPromptMessage |
CPropertyPage |
CPropertySheet |
CProtocolParserConsole | Class to parse protocol info (obtained using cvs info protocol)
CPseudoButton |
UPseudoCmdStatusWrapper |
CPseudoDlg |
CPseudoDraw |
UPseudoFakePane |
CPseudoItem |
CPseudoList |
UPseudoPageHider |
UPseudoPlaceHolder |
CPseudoRotButton |
UPseudoRotButton |
CPseudoToggle |
UPStr | Up to 255 characters pascal and C string class
PyAutoObject< T > |
PyCmdUI | Cmd UI Python wrapper
PyCmdUI::obj_t |
PyColorConsole | Color console Python wrapper
PyColorConsole::obj_t |
PyContainer |
CPyCvsConsole |
PyCvsEntry | Cvs Entry Python wrapper
PyCvsEntry::obj_t |
PyMenuMgr | Menu Python wrapper
PyMenuMgr::obj_t |
PyPersistent |
PyPersistent::obj_t |
PyRegistry |
CPython_Interp | Python interpreter wrapper
CPyThreadState |
URect |
URECT |
CRectTracker |
CRecursionLock | Class to prevent the recursive calls
CRelease_MAIN |
RemoveCvsArgs | Class to remove files
ReportConflict | Class to represent file type and help handle possible import conflicts
ReportWarning | Class to represent a warning (wrong line feed, escape characters etc.) and a set of files which illustrates this warning
CRevisionConsole | Console used to retrieve a specific revision
CRichEditView |
CRtag_MAIN |
CRtag_OPTIONS |
URuntimeClass |
CSaveSettingsDlg |
CScrollView |
CSelectionChangeNotifier |
CSelectionDetailsDlg |
CSelectionDetailsDlg::CompareInfo | Structure to hold the sorting settings
SelectionDisplayInfo | Class to hold and support data display (e.g. sorting)
USemaphore |
USize |
USIZE |
USLIDER |
USmartCombo |
CSmartComboBox |
CSortHeaderCtrl | Sort header control
CSortList< T > |
CSortParam | Sort parameters
CSplashWnd |
CSplitterWnd |
stat |
CStatic |
CStatic |
CStatic |
CStatic |
CStaticAllocT< T > | Class to use when fed-up with realloc, malloc..
CStatus_MAIN |
CStatusBar |
UStr | C string class
CStreamConsole | Class to implement stream console
CSubclassWnd |
CSubclassWndMap |
CTabCtrl |
TAdorner |
CTag_MAIN |
tagCTV_ITEM |
tagMENUITEMINFOA |
CTagParserConsole | Class to parse tags/branches (obtained using cvs log or cvs rlog)
tagTCB_ITEM |
UTB_BUTTON |
UTB_DROPDOWN |
UTB_INIT |
TBehavior |
TbEntry |
TbEntryButton |
TbEntryChkButton |
TbEntryDropDown |
TbEntrySeparator |
TBrowserFill | Class to create an item with all the subdirectories inside for a given path and a root item
TBrowserFillDummy | Class to create an item with a dummy item inside if and only if the folder is not empty
TBuggyPopup |
CTcl_Interp | TCL interpreter wrapper
CTCLBrowserEnt | The tcl browser class entity
CTCLCvsConsole | TCL console
CTCP2Parse |
CTCP2Parse::RGBColor |
TEditHandler< editType > | Handles edit command
TEditText |
CTemplateDlg |
CTempToggleBool |
TGraph | Base traverse class
TGraphCmdStatus | Graph command status class
TGraphCurSelector |
TGraphDelCmd | Graph command delete revisions class
TGraphRectSelect | Graph traverse class
TGraphSelNonSig | Select non-significant revisions
TIconButton |
TIconCheckBox |
TIconPopup |
UTimer | Used by the UWidget class to implement timers/repeaters
CTipDlg |
TKeyString< delimiter > | Multi-string for storing map (e.g. dictionary)
TLaunchHandler< lauchType > | Handles shell action launch
TMPersistent< T > | Persistent array
CTmpFiles | Class to support the clean up of any temporary files created
TMString< T > |
UToolbar |
CToolBarCtrl |
CToolBarData |
TOOLBARINFO |
TPopup |
TPseudoAppBehavior |
TPseudoCustomView |
TPseudoDoubleNumberText |
TPseudoIconButton |
TPseudoIconCheckBox |
TPseudoIconPopup |
TPseudoRotateIconButton |
TPseudoScrollBar |
TPseudoTextListView |
TPseudoWinAdorner |
TPseudoWinBehavior |
TraversalReport | Traverse report base class
UTREE_INFO |
UTREE_INSERT |
CTreeCtrl |
CTreeView |
TRtagHandler< tagType > | Handles rtag command
TScrollBar |
TTagHandler< tagType > | Handles tag command
TTextListView |
CTurnOffDispatching |
TView |
TViewFill | Fill the view
CUpdateMain | Main update page
CUpdateMerge | Merge update page
CUpdateOptions | Update options page
CustInvertTable | Custom menu item
vector |
CView |
CViewInfo |
CvsAlert | CVS Alert class
CvsArgs | Class to handle cvs arguments, append "cvs" and misc options defined by preferences ("-z9" for example)
CvsPrefs |
UWaitCursor |
UWidget | This is the pseudo widget class
Win32wstring |
CWinApp |
CWincvsApp |
CWinCvsBrowser |
CWincvsDoc |
CWincvsView | Console window class
WINDOWPLACEMENT |
WININFO |
CWinLogBranchData | Windows log branch node data
CWinLogData | Windows log data abstract class
CWinLogHeaderData | Windows log header node data
CWinLogRevData | Windows log revision node data
CWinLogTagData | Windows log tag node data
CWinPlacement | Persistent window placement class
CWinThread |
CWnd |
CWnd |
CWnd |
CWnd |
CWnd |
CWnd |
CWnd |
CWnd |
CWnd |
CWnd |
CWndAutoCommand |
CWndRedrawMngr | Class to support efficient drawing of CWnd based windows by managing window's redraw
wstring |
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: _afxRichEditCookie Class Reference

_afxRichEditCookie Class Reference

Collaboration diagram for _afxRichEditCookie:

[legend]
List of all members.

Public Member Functions

_afxRichEditCookie (CArchive &ar)

Public Attributes

CArchive & | m_ar
DWORD | m_dwError

Constructor & Destructor Documentation

_afxRichEditCookie::_afxRichEditCookie ( CArchive & ar ) [inline]

Definition at line 149 of file wincvsDoc.cpp.

References m_ar, and m_dwError.

00149 : m_ar(ar) {m_dwError=0;}

Member Data Documentation

CArchive& _afxRichEditCookie::m_ar

Definition at line 147 of file wincvsDoc.cpp.

Referenced by _afxRichEditCookie(), and EditStreamCallBack().

DWORD _afxRichEditCookie::m_dwError

Definition at line 148 of file wincvsDoc.cpp.

Referenced by _afxRichEditCookie(), and EditStreamCallBack().

The documentation for this class was generated from the following file:
  • WinCvs/wincvsDoc.cpp
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: _dircontents Struct Reference

_dircontents Struct Reference

#include <ndir.h>

Collaboration diagram for _dircontents:

[legend]
List of all members.

Public Attributes

char * _d_entry
_dircontents * _d_next

Member Data Documentation

char* _dircontents::_d_entry

Definition at line 49 of file ndir.h.

Referenced by free_dircontents(), and readdir().

struct _dircontents* _dircontents::_d_next

Definition at line 50 of file ndir.h.

Referenced by free_dircontents(), readdir(), and seekdir().

The documentation for this struct was generated from the following file:
  • WinCvs/ndir.h
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: _dirdesc Struct Reference

_dirdesc Struct Reference

#include <ndir.h>

Collaboration diagram for _dirdesc:

[legend]
List of all members.

Public Attributes

int dd_id
long dd_loc
_dircontents * dd_contents
_dircontents * dd_cp

Member Data Documentation

struct _dircontents* _dirdesc::dd_contents

Definition at line 57 of file ndir.h.

Referenced by closedir(), and seekdir().

struct _dircontents* _dirdesc::dd_cp

Definition at line 58 of file ndir.h.

Referenced by readdir(), and seekdir().

int _dirdesc::dd_id

Definition at line 55 of file ndir.h.

long _dirdesc::dd_loc

Definition at line 56 of file ndir.h.

Referenced by readdir(), seekdir(), and telldir().

The documentation for this struct was generated from the following file:
  • WinCvs/ndir.h
Generated on Sat Aug 7 22:48:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: _frameRec Struct Reference

_frameRec Struct Reference

Collaboration diagram for _frameRec:

[legend]
List of all members.

Public Attributes

void * entry
_frameRec * next

Member Data Documentation

void* _frameRec::entry

Definition at line 267 of file dll_garbage.c.

Referenced by poolAlloc(), poolFree(), and poolRemove().

struct _frameRec* _frameRec::next

Definition at line 272 of file dll_garbage.c.

Referenced by poolAlloc(), poolFree(), and poolRemove().

The documentation for this struct was generated from the following file:
  • common/dll_garbage.c
Generated on Sat Aug 7 22:48:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: _sDiffOptionsItem Struct Reference

_sDiffOptionsItem Struct Reference

Define the diff options list items. More...

Collaboration diagram for _sDiffOptionsItem:

[legend]
List of all members.

Public Attributes

const char * | option
Option.
const char * | description
Option description.

Detailed Description

Define the diff options list items.

Definition at line 185 of file DiffDlg.cpp.

Member Data Documentation

const char* _sDiffOptionsItem::description

Option description.

Definition at line 187 of file DiffDlg.cpp.

Referenced by CDiff_Options::CompareItems().

const char* _sDiffOptionsItem::option

Option.

Definition at line 186 of file DiffDlg.cpp.

Referenced by CDiff_Options::CompareItems(), and CDiff_Options::OnInitDialog().

The documentation for this struct was generated from the following file:
  • common/DiffDlg.cpp
Generated on Sat Aug 7 22:48:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CAboutDlg Class Reference

CAboutDlg Class Reference

Inheritance diagram for CAboutDlg:

[legend]
Collaboration diagram for CAboutDlg:

[legend]
List of all members.

Public Types

enum | { IDD = 100 }

Public Member Functions

CAboutDlg ()

Public Attributes

CCJHyperLink m_CvsGuiSfUrl
CCJHyperLink m_WinCvsUrl
CString | m_vers

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 578 of file wincvs.cpp.
00578 { IDD = IDD_ABOUTBOX };

Constructor & Destructor Documentation

CAboutDlg::CAboutDlg ( )

Definition at line 601 of file wincvs.cpp.

References CStr, CWincvsApp::GetAppVersion(), and m_vers.

00601                      : CHHelpDialog(CAboutDlg::IDD)
00602 {
00603     //{{AFX_DATA_INIT(CAboutDlg)
00604     m_vers = _T("WinCvs ");
00605     //}}AFX_DATA_INIT
00606
00607     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00608     CStr vers;
00609
00610     if( app->GetAppVersion(vers) )
00611     {
00612         m_vers = vers;
00613     }
00614 }

Here is the call graph for this function:

Member Function Documentation

void CAboutDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 615 of file wincvs.cpp.

References CHHelpDialog::DoDataExchange(), IDC_CVSGUISFURL, IDC_WINCVSURL, IDC_WINCVSVER, m_CvsGuiSfUrl, m_vers, and m_WinCvsUrl.

00616 {
00617     CHHelpDialog::DoDataExchange(pDX);
00618     //{{AFX_DATA_MAP(CAboutDlg)
00619     DDX_Control(pDX, IDC_CVSGUISFURL, m_CvsGuiSfUrl);
00620     DDX_Control(pDX, IDC_WINCVSURL, m_WinCvsUrl);
00621     DDX_Text(pDX, IDC_WINCVSVER, m_vers);
00622     //}}AFX_DATA_MAP
00623 }

Here is the call graph for this function:

void CAboutDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 644 of file wincvs.cpp.

References IDC_CVSGUISFURL, IDC_WINCVSURL, IDC_WINCVSVER, IDH_IDC_CVSGUISFURL, IDH_IDC_WINCVSURL, IDH_IDC_WINCVSVER, and CHHelpSupport::SetCtrlHelpID().

00645 {
00646     SetCtrlHelpID(IDC_WINCVSVER,    IDH_IDC_WINCVSVER);
00647     SetCtrlHelpID(IDC_WINCVSURL,    IDH_IDC_WINCVSURL);
00648     SetCtrlHelpID(IDC_CVSGUISFURL,  IDH_IDC_CVSGUISFURL);
00649 }

Here is the call graph for this function:

BOOL CAboutDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls.

Reimplemented from CHHelpDialog.

Definition at line 632 of file wincvs.cpp.

References CHHelpDialog::OnInitDialog().

00633 {
00634     CHHelpDialog::OnInitDialog();
00635
00636     // Extra initialization
00637     m_WinCvsUrl.SetURL(_T("http://www.wincvs.org"));
00638     m_CvsGuiSfUrl.SetURL(_T("http://cvsgui.sourceforge.net/"));
00639
00640     return TRUE;  // return TRUE unless you set the focus to a control
00641                   // EXCEPTION: OCX Property Pages should return FALSE
00642 }

Here is the call graph for this function:

Member Data Documentation

CCJHyperLink CAboutDlg::m_CvsGuiSfUrl

Definition at line 579 of file wincvs.cpp.

Referenced by DoDataExchange().

CString CAboutDlg::m_vers

Definition at line 581 of file wincvs.cpp.

Referenced by CAboutDlg(), and DoDataExchange().

CCJHyperLink CAboutDlg::m_WinCvsUrl

Definition at line 580 of file wincvs.cpp.

Referenced by DoDataExchange().

The documentation for this class was generated from the following file:
  • WinCvs/wincvs.cpp
Generated on Sat Aug 7 22:48:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: AddBinCvsArgs Class Reference

AddBinCvsArgs Class Reference

Class to add binary files. More...

#include <CvsArgs.h>

Inheritance diagram for AddBinCvsArgs:

[legend]
Collaboration diagram for AddBinCvsArgs:

[legend]
List of all members.

Protected Member Functions

virtual kTextBinTYPE | FileIsType (const char *arg, const char *dir, const FSSpec *spec=0L)
Virtual override to test the file type.
virtual const char * | TypeDesc ()
Virtual override to get the type description.

Detailed Description

Class to add binary files.

Definition at line 112 of file CvsArgs.h.

Member Function Documentation

virtual kTextBinTYPE AddBinCvsArgs::FileIsType | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec = 0L
 | ) | [inline, protected, virtual]

Virtual override to test the file type.

Implements ControlCvsArgs.

Definition at line 115 of file CvsArgs.h.

References FileIsBinary(), and kTextBinTYPE.

00116     {
00117         return FileIsBinary(arg, dir, spec);
00118     }

Here is the call graph for this function:

virtual const char* AddBinCvsArgs::TypeDesc ( ) [inline, protected, virtual]

Virtual override to get the type description.

Implements ControlCvsArgs.

Definition at line 120 of file CvsArgs.h.

00121     {
00122         return "binary";
00123     }

The documentation for this class was generated from the following file:
  • common/CvsArgs.h
Generated on Sat Aug 7 22:48:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: AddCvsArgs Class Reference

AddCvsArgs Class Reference

Class to add files. More...

#include <CvsArgs.h>

Inheritance diagram for AddCvsArgs:

[legend]
Collaboration diagram for AddCvsArgs:

[legend]
List of all members.

Protected Member Functions

virtual kTextBinTYPE | FileIsType (const char *arg, const char *dir, const FSSpec *spec=0L)
Virtual override to test the file type.
virtual const char * | TypeDesc ()
Virtual override to get the type description.

Detailed Description

Class to add files.

Definition at line 94 of file CvsArgs.h.

Member Function Documentation

virtual kTextBinTYPE AddCvsArgs::FileIsType | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec = 0L
 | ) | [inline, protected, virtual]

Virtual override to test the file type.

Implements ControlCvsArgs.

Definition at line 97 of file CvsArgs.h.

References FileIsText(), and kTextBinTYPE.

00098     {
00099         return FileIsText(arg, dir, spec);
00100     }

Here is the call graph for this function:

virtual const char* AddCvsArgs::TypeDesc ( ) [inline, protected, virtual]

Virtual override to get the type description.

Implements ControlCvsArgs.

Definition at line 102 of file CvsArgs.h.

00103     {
00104         return "TEXT";
00105     }

The documentation for this class was generated from the following file:
  • common/CvsArgs.h
Generated on Sat Aug 7 22:48:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: AddUnicodeCvsArgs Class Reference

AddUnicodeCvsArgs Class Reference

Class to add Unicode files. More...

#include <CvsArgs.h>

Inheritance diagram for AddUnicodeCvsArgs:

[legend]
Collaboration diagram for AddUnicodeCvsArgs:

[legend]
List of all members.

Protected Member Functions

virtual kTextBinTYPE | FileIsType (const char *arg, const char *dir, const FSSpec *spec=0L)
Virtual override to test the file type.
virtual const char * | TypeDesc ()
Virtual override to get the type description.

Detailed Description

Class to add Unicode files.

Definition at line 130 of file CvsArgs.h.

Member Function Documentation

virtual kTextBinTYPE AddUnicodeCvsArgs::FileIsType | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec = 0L
 | ) | [inline, protected, virtual]

Virtual override to test the file type.

Implements ControlCvsArgs.

Definition at line 133 of file CvsArgs.h.

References FileIsUnicode(), and kTextBinTYPE.

00134     {
00135         return FileIsUnicode(arg, dir, spec);
00136     }

Here is the call graph for this function:

virtual const char* AddUnicodeCvsArgs::TypeDesc ( ) [inline, protected, virtual]

Virtual override to get the type description.

Implements ControlCvsArgs.

Definition at line 138 of file CvsArgs.h.

00139     {
00140         return "Unicode";
00141     }

The documentation for this class was generated from the following file:
  • common/CvsArgs.h
Generated on Sat Aug 7 22:48:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CAdminOption_MAIN Class Reference

CAdminOption_MAIN Class Reference

#include <AdminOptionDlg.h>

Inheritance diagram for CAdminOption_MAIN:

[legend]
Collaboration diagram for CAdminOption_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_ADMINOPTION }

Public Member Functions

CAdminOption_MAIN (const MultiFiles *mf, kAdminOptionDlgType type, const char *optionString, CWnd *pParent=NULL)
CString | GetOptionString () const

Public Attributes

CStatic | m_multilineEntryPlaceholder

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable window context help.

Private Member Functions

virtual void | InitHelpID ()
void | SetMultilineEntry ()

Private Attributes

kAdminOptionDlgType m_type
CString | m_optionString
CMultilineEntryDlg m_multilineEntryDlg

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 63 of file AdminOptionDlg.h.
00063 { IDD = IDD_ADMINOPTION };

Constructor & Destructor Documentation

CAdminOption_MAIN::CAdminOption_MAIN | ( | const MultiFiles * | mf,
 |  | kAdminOptionDlgType | type,
 |  | const char * | optionString,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 57 of file AdminOptionDlg.cpp.

References kChangeLog, kSetDescription, kSetState, m_optionString, and m_type.

00059     : m_multilineEntryDlg(mf), CHHelpPropertyPage(CAdminOption_MAIN::IDD)
00060 {
00061     //{{AFX_DATA_INIT(CAdminOption_MAIN)
00062     //}}AFX_DATA_INIT
00063
00064     m_type = type;
00065     m_optionString = optionString;
00066
00067     // Trim trailing white spaces and fix the line endings
00068     m_optionString.TrimRight();
00069     m_optionString.Replace("\n", "\r\n");
00070
00071     // Set the page title
00072     m_psp.dwFlags |= PSP_USETITLE;
00073
00074     switch( m_type )
00075     {
00076     case kChangeLog:
00077         m_psp.pszTitle = "Log message";
00078         break;
00079     case kSetState:
00080         m_psp.pszTitle = "State";
00081         break;
00082     case kSetDescription:
00083         m_psp.pszTitle = "Description";
00084         break;
00085     default:
00086         ASSERT(FALSE); //unknown type
00087         break;
00088     }
00089 }

Member Function Documentation

void CAdminOption_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 92 of file AdminOptionDlg.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryDlg, m_multilineEntryPlaceholder, m_optionString, and CMultilineEntryDlg::UpdateData().

00093 {
00094     CHHelpPropertyPage::DoDataExchange(pDX);
00095     //{{AFX_DATA_MAP(CAdminOption_MAIN)
00096     DDX_Control(pDX, IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryPlaceholder);
00097     //}}AFX_DATA_MAP
00098
00099     m_multilineEntryDlg.UpdateData(pDX->m_bSaveAndValidate, m_optionString);
00100 }

Here is the call graph for this function:

CString CAdminOption_MAIN::GetOptionString ( ) const

Get the option string

Returns:
The option string
Definition at line 159 of file AdminOptionDlg.cpp.

References m_optionString.

00160 {
00161     return m_optionString;
00162 }

void CAdminOption_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 122 of file AdminOptionDlg.cpp.

00123 {
00124     // Nothing to do, it's all in multiline entry control
00125 }

BOOL CAdminOption_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable window context help.

Reimplemented from CHHelpPropertyPage.

Definition at line 111 of file AdminOptionDlg.cpp.

References CHHelpPropertyPage::OnInitDialog().

00112 {
00113     CHHelpPropertyPage::OnInitDialog();
00114
00115     // Extra initialization
00116     SetMultilineEntry();
00117
00118     return TRUE;  // return TRUE unless you set the focus to a control
00119                   // EXCEPTION: OCX Property Pages should return FALSE
00120 }

Here is the call graph for this function:

void CAdminOption_MAIN::SetMultilineEntry ( ) [private]

Create multiline entry Definition at line 130 of file AdminOptionDlg.cpp.

References CMultilineEntryDlg::Create(), gCommitLogs, gPrevStates, kChangeLog, kMultilineDescription, kMultilineEntryType, kMultilineLogMessage, kMultilineState, kSetDescription, kSetState, m_multilineEntryDlg, m_multilineEntryPlaceholder, and m_type.

00131 {
00132     kMultilineEntryType multilineEntryType = kMultilineLogMessage;
00133     CMString* pPreviousEntries = &gCommitLogs;
00134
00135     switch( m_type )
00136     {
00137     case kChangeLog:
00138         multilineEntryType = kMultilineLogMessage;
00139         break;
00140     case kSetState:
00141         multilineEntryType = kMultilineState;
00142         pPreviousEntries = &gPrevStates;
00143         break;
00144     case kSetDescription:
00145         multilineEntryType = kMultilineDescription;
00146         break;
00147     default:
00148         ASSERT(FALSE); //unknown type
00149         break;
00150     }
00151
00152     m_multilineEntryDlg.Create(multilineEntryType, pPreviousEntries, &m_multilineEntryPlaceholder, this);
00153 }

Here is the call graph for this function:

Member Data Documentation

CMultilineEntryDlg CAdminOption_MAIN::m_multilineEntryDlg [private]

Multiline entry child dialog Definition at line 88 of file AdminOptionDlg.h.

Referenced by DoDataExchange(), and SetMultilineEntry().

CStatic CAdminOption_MAIN::m_multilineEntryPlaceholder

Definition at line 64 of file AdminOptionDlg.h.

Referenced by DoDataExchange(), and SetMultilineEntry().

CString CAdminOption_MAIN::m_optionString [private]

Option string Definition at line 86 of file AdminOptionDlg.h.

Referenced by CAdminOption_MAIN(), DoDataExchange(), and GetOptionString().

kAdminOptionDlgType CAdminOption_MAIN::m_type [private]

Option type Definition at line 85 of file AdminOptionDlg.h.

Referenced by CAdminOption_MAIN(), and SetMultilineEntry().

The documentation for this class was generated from the following files:
  • common/AdminOptionDlg.h
  • common/AdminOptionDlg.cpp
Generated on Sat Aug 7 22:48:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: AFX_DLLVERSIONINFO Struct Reference

AFX_DLLVERSIONINFO Struct Reference

Collaboration diagram for AFX_DLLVERSIONINFO:

[legend]
List of all members.

Public Attributes

DWORD | cbSize
DWORD | dwMajorVersion
DWORD | dwMinorVersion
DWORD | dwBuildNumber
DWORD | dwPlatformID

Member Data Documentation

DWORD AFX_DLLVERSIONINFO::cbSize

Definition at line 218 of file CJToolBar.cpp.

DWORD AFX_DLLVERSIONINFO::dwBuildNumber

Definition at line 221 of file CJToolBar.cpp.

DWORD AFX_DLLVERSIONINFO::dwMajorVersion

Definition at line 219 of file CJToolBar.cpp.

DWORD AFX_DLLVERSIONINFO::dwMinorVersion

Definition at line 220 of file CJToolBar.cpp.

DWORD AFX_DLLVERSIONINFO::dwPlatformID

Definition at line 222 of file CJToolBar.cpp.

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/CJLibrary/CJToolBar.cpp
Generated on Sat Aug 7 22:48:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CAllTargets Class Reference

CAllTargets Class Reference

Collaboration diagram for CAllTargets:

[legend]
List of all members.

Public Member Functions

CAllTargets ()
~CAllTargets ()
std::map< int, UCmdTarget * > & | Get (void)
const std::map< int, UCmdTarget * > & | Get (void) const

Protected Attributes

std::map< int, UCmdTarget * > | targets

Constructor & Destructor Documentation

CAllTargets::CAllTargets ( ) [inline]

Definition at line 88 of file uevent.cpp.

00088 {}

CAllTargets::~CAllTargets ( ) [inline]

Definition at line 89 of file uevent.cpp.

References STD, and targets.

00090     {
00091         // delete the remaining widgets at exit.
00092         // we don't make a loop because the widget gets
00093         // removed from the map when calling the destructor.
00094         STD map<int, UCmdTarget *>::iterator i;
00095         while(targets.size() != 0)
00096         {
00097             i = targets.begin();
00098             delete (*i).second;
00099         }
00100     }

Member Function Documentation

const std:: map<int, UCmdTarget *>& CAllTargets::Get ( void ) const [inline]

Definition at line 103 of file uevent.cpp.

References STD, and targets.

00103 { return targets; }

std:: map<int, UCmdTarget *>& CAllTargets::Get ( void ) [inline]

Definition at line 102 of file uevent.cpp.

References STD, and targets.

Referenced by UCmdTarget::UCmdTarget(), UEventGetTargets(), UEventGiveTime(), UEventNotifyMessage(), UEventQueryWidget(), UEventRemoveWidID(), UEventSendMessage(), and UEventSendMessageExt().

00102 { return targets; }

Member Data Documentation

std:: map<int, UCmdTarget *> CAllTargets::targets [protected]

Definition at line 105 of file uevent.cpp.

Referenced by Get(), and ~CAllTargets().

The documentation for this class was generated from the following file:
  • rf/uevent.cpp
Generated on Sat Aug 7 22:48:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CAnnotate_MAIN Class Reference

CAnnotate_MAIN Class Reference

#include <AnnotateDlg.h>

Inheritance diagram for CAnnotate_MAIN:

[legend]
Collaboration diagram for CAnnotate_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_ANNOTATE_MAIN }

Public Member Functions

CAnnotate_MAIN (const MultiFiles *mf, kAnnotateCmdType annotateType, const char *rev, bool isDate)
~CAnnotate_MAIN ()

Public Attributes

CButton | m_forceCheck
CButton | m_noRecurseCheck
CButton | m_hasRevCheck
CButton | m_browseTagButton
CButton | m_isDateCheck
CSmartComboBox m_revCombo
BOOL | m_hasRev
BOOL | m_isDate
BOOL | m_force
BOOL | m_noRecurse
CString | m_rev

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnSpecifyRev ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnIsdate ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnBrowseTag ()
BN_CLICKED message handler, display browse tag/branch dialog.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize the controls.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf
kAnnotateCmdType m_annotateType

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 65 of file AnnotateDlg.h.
00065 { IDD = IDD_ANNOTATE_MAIN };

Constructor & Destructor Documentation

CAnnotate_MAIN::CAnnotate_MAIN | ( | const MultiFiles * | mf,
 |  | kAnnotateCmdType | annotateType,
 |  | const char * | rev,
 |  | bool | isDate
 | ) |

Definition at line 68 of file AnnotateDlg.cpp.

References UStr::c_str(), MultiFiles::const_iterator, gDateNames, gRevNames, and kAnnotateGraph.

00070                                : m_mf(mf), m_annotateType(annotateType), CHHelpPropertyPage(CAnnotate_MAIN::IDD)
00071 {
00072     m_hasRev = FALSE;
00073     m_isDate = isDate;
00074     m_rev = rev;
00075     m_force = FALSE;
00076     m_noRecurse = FALSE;
00077
00078     if( kAnnotateGraph != m_annotateType )
00079     {
00080         m_revCombo.SetItems(m_isDate ? &gDateNames : &gRevNames);
00081     }
00082     else
00083     {
00084         m_revCombo.SetFeature(USmartCombo::AutoDropWidth | USmartCombo::ReadOnly);
00085
00086         if( m_mf && m_mf->TotalNumFiles() )
00087         {
00088             MultiFiles::const_iterator mfi = m_mf->begin();
00089             if( mfi != m_mf->end() && mfi->NumFiles() )
00090             {
00091                 UStr path;
00092                 UStr fileName;
00093                 UStr currRev;
00094
00095                 mfi->get(0, path, fileName, currRev);
00096                 m_rev = currRev.c_str();
00097             }
00098         }
00099     }
00100 }

Here is the call graph for this function:

CAnnotate_MAIN::~CAnnotate_MAIN ( )

Definition at line 102 of file AnnotateDlg.cpp.

00103 {
00104 }

Member Function Documentation

void CAnnotate_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 106 of file AnnotateDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BROWSE_TAG, IDC_FORCE_HEAD_REV, IDC_HAS_REV, IDC_ISDATE, IDC_NORECURS, IDC_REV_TAG_DATE, kAnnotateGraph, m_annotateType, m_browseTagButton, m_force, m_forceCheck, m_hasRev, m_hasRevCheck, m_isDate, m_isDateCheck, m_noRecurse, m_noRecurseCheck, m_rev, m_revCombo, and OnSpecifyRev().

00107 {
00108     CHHelpPropertyPage::DoDataExchange(pDX);
00109     //{{AFX_DATA_MAP(CAnnotate_MAIN)
00110     DDX_Control(pDX, IDC_FORCE_HEAD_REV, m_forceCheck);
00111     DDX_Control(pDX, IDC_NORECURS, m_noRecurseCheck);
00112     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00113     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00114     DDX_Control(pDX, IDC_ISDATE, m_isDateCheck);
00115     DDX_Control(pDX, IDC_REV_TAG_DATE, m_revCombo);
00116     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00117     DDX_Check(pDX, IDC_ISDATE, m_isDate);
00118     DDX_Check(pDX, IDC_FORCE_HEAD_REV, m_force);
00119     DDX_Check(pDX, IDC_NORECURS, m_noRecurse);
00120     DDX_CBString(pDX, IDC_REV_TAG_DATE, m_rev);
00121     //}}AFX_DATA_MAP
00122
00123     if( kAnnotateGraph != m_annotateType )
00124     {
00125         if( m_hasRev )
00126         {
00127             DDV_MinChars(pDX, m_rev, 1);
00128         }
00129
00130         DDX_ComboMString(pDX, IDC_REV_TAG_DATE, m_revCombo);
00131
00132         if( !pDX->m_bSaveAndValidate )
00133         {
00134             OnSpecifyRev();
00135         }
00136     }
00137 }

Here is the call graph for this function:

void CAnnotate_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 185 of file AnnotateDlg.cpp.

References IDC_BROWSE_TAG, IDC_FORCE_HEAD_REV, IDC_HAS_REV, IDC_ISDATE, IDC_NORECURS, IDC_REV_TAG_DATE, IDH_IDC_BROWSE_TAG, IDH_IDC_FORCE_HEAD_REV, IDH_IDC_HAS_REV, IDH_IDC_ISDATE, IDH_IDC_NORECURS, IDH_IDC_REV_TAG_DATE, and CHHelpSupport::SetCtrlHelpID().

00186 {
00187     SetCtrlHelpID(IDC_HAS_REV,          IDH_IDC_HAS_REV);
00188     SetCtrlHelpID(IDC_ISDATE,           IDH_IDC_ISDATE);
00189     SetCtrlHelpID(IDC_REV_TAG_DATE,     IDH_IDC_REV_TAG_DATE);
00190     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00191     SetCtrlHelpID(IDC_FORCE_HEAD_REV,   IDH_IDC_FORCE_HEAD_REV);
00192     SetCtrlHelpID(IDC_NORECURS,         IDH_IDC_NORECURS);
00193 }

Here is the call graph for this function:

void CAnnotate_MAIN::OnBrowseTag ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 218 of file AnnotateDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev, and m_revCombo.

00219 {
00220     CStr tagName;
00221     if( CompatGetTagListItem(m_mf, tagName) )
00222     {
00223         m_rev = (const char*)tagName;
00224         m_revCombo.SetWindowText(m_rev);
00225     }
00226 }

Here is the call graph for this function:

BOOL CAnnotate_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize the controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 152 of file AnnotateDlg.cpp.

References kAnnotateGraph, and CHHelpPropertyPage::OnInitDialog().

00153 {
00154     CHHelpPropertyPage::OnInitDialog();
00155
00156     // Extra initialization
00157
00158     // Special setup for the diff invoked using the graph view
00159     if( kAnnotateGraph == m_annotateType )
00160     {
00161         m_hasRevCheck.EnableWindow(FALSE);
00162         m_hasRevCheck.SetCheck(1);
00163
00164         m_browseTagButton.EnableWindow(FALSE);
00165
00166         m_isDateCheck.EnableWindow(FALSE);
00167
00168         m_revCombo.SetReadOnly(TRUE);
00169         m_revCombo.ResetContent();
00170
00171         if( !m_rev.IsEmpty() )
00172         {
00173             m_revCombo.AddString(m_rev);
00174             m_revCombo.SetWindowText(m_rev);
00175         }
00176
00177         m_noRecurseCheck.EnableWindow(FALSE);
00178         m_forceCheck.EnableWindow(FALSE);
00179     }
00180
00181     return TRUE;  // return TRUE unless you set the focus to a control
00182     // EXCEPTION: OCX Property Pages should return FALSE
00183 }

Here is the call graph for this function:

void CAnnotate_MAIN::OnIsdate ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 207 of file AnnotateDlg.cpp.

References DDX_ComboMString(), gDateNames, gRevNames, IDC_REV_TAG_DATE, m_browseTagButton, m_isDateCheck, m_revCombo, NULL, and USmartCombo::SetItems().

00208 {
00209     const BOOL isDate = m_isDateCheck.GetCheck();
00210
00211     m_revCombo.SetItems(isDate ? &gDateNames : &gRevNames);
00212     DDX_ComboMString(NULL, IDC_REV_TAG_DATE, m_revCombo);
00213
00214     m_browseTagButton.EnableWindow(!isDate);
00215 }

Here is the call graph for this function:

void CAnnotate_MAIN::OnSpecifyRev ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 196 of file AnnotateDlg.cpp.

References m_browseTagButton, m_forceCheck, m_hasRevCheck, m_isDateCheck, and m_revCombo.

Referenced by DoDataExchange().

00197 {
00198     const BOOL bEnable = m_hasRevCheck.GetCheck();
00199
00200     m_isDateCheck.EnableWindow(bEnable);
00201     m_revCombo.EnableWindow(bEnable);
00202     m_forceCheck.EnableWindow(bEnable);
00203     m_browseTagButton.EnableWindow(bEnable && !m_isDateCheck.GetCheck());
00204 }

Member Data Documentation

kAnnotateCmdType CAnnotate_MAIN::m_annotateType [private]

Definition at line 100 of file AnnotateDlg.h.

Referenced by DoDataExchange().

CButton CAnnotate_MAIN::m_browseTagButton

Definition at line 69 of file AnnotateDlg.h.

Referenced by DoDataExchange(), OnIsdate(), and OnSpecifyRev().

BOOL CAnnotate_MAIN::m_force

Definition at line 74 of file AnnotateDlg.h.

Referenced by CompatGetAnnotate(), and DoDataExchange().

CButton CAnnotate_MAIN::m_forceCheck

Definition at line 66 of file AnnotateDlg.h.

Referenced by DoDataExchange(), and OnSpecifyRev().

BOOL CAnnotate_MAIN::m_hasRev

Definition at line 72 of file AnnotateDlg.h.

Referenced by CompatGetAnnotate(), and DoDataExchange().

CButton CAnnotate_MAIN::m_hasRevCheck

Definition at line 68 of file AnnotateDlg.h.

Referenced by DoDataExchange(), and OnSpecifyRev().

BOOL CAnnotate_MAIN::m_isDate

Definition at line 73 of file AnnotateDlg.h.

Referenced by CompatGetAnnotate(), and DoDataExchange().

CButton CAnnotate_MAIN::m_isDateCheck

Definition at line 70 of file AnnotateDlg.h.

Referenced by DoDataExchange(), OnIsdate(), and OnSpecifyRev().

const MultiFiles* CAnnotate_MAIN::m_mf [private]

Definition at line 99 of file AnnotateDlg.h.

Referenced by OnBrowseTag().

BOOL CAnnotate_MAIN::m_noRecurse

Definition at line 75 of file AnnotateDlg.h.

Referenced by CompatGetAnnotate(), and DoDataExchange().

CButton CAnnotate_MAIN::m_noRecurseCheck

Definition at line 67 of file AnnotateDlg.h.

Referenced by DoDataExchange().

CString CAnnotate_MAIN::m_rev

Definition at line 76 of file AnnotateDlg.h.

Referenced by CompatGetAnnotate(), DoDataExchange(), and OnBrowseTag().

CSmartComboBox CAnnotate_MAIN::m_revCombo

Definition at line 71 of file AnnotateDlg.h.

Referenced by DoDataExchange(), OnBrowseTag(), OnIsdate(), and OnSpecifyRev().

The documentation for this class was generated from the following files:
  • common/AnnotateDlg.h
  • common/AnnotateDlg.cpp
Generated on Sat Aug 7 22:48:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ansiAttrCvt Class Reference

ansiAttrCvt Class Reference

#include <CTCP2Parse.hpp>

Inheritance diagram for ansiAttrCvt:

[legend]
Collaboration diagram for ansiAttrCvt:

[legend]
List of all members.

Public Member Functions

void | ansi2ctcp (std::string *in)

Private Member Functions

void | do_m ()
void | do_C ()

Private Attributes

int pos
int bold
int underline
int reverse
int blink
int italic
std::string * | _in
AnsiSeq * _seq

Static Private Attributes

const char * | escSeq = "\033\133"
const char * | fgColorMap [16]
const char * | bgColorMap [8]

Member Function Documentation

void ansiAttrCvt::ansi2ctcp ( std::string * in )

Definition at line 636 of file CTCP2Parse.cpp.

References _in, _seq, blink, bold, do_C(), do_m(), escSeq, INVALID_SEQUENCE, italic, pos, reverse, ansiAttrCvt::AnsiSeq::seq(), underline, and ansiAttrCvt::AnsiSeq::verb().

Referenced by CTCP2Parse::ParseIt().

00637 {
00638     bold = underline = reverse = blink = italic = 0;
00639     _in = in;
00640
00641     pos = in->find(escSeq);
00642
00643     while (pos != std::string::npos)
00644     {
00645         _seq = new AnsiSeq(in, pos);
00646
00647         switch (_seq->verb())
00648         {
00649         case INVALID_SEQUENCE:
00650             break;
00651
00652         case 'm':       // set graphic mode
00653             do_m();
00654             break;
00655         case 'C':       // move cursor right
00656             do_C();
00657             break;
00658         case 'f':       // move to cursor position
00659         case 'H':       //          "
00660         case 'A':       // move cursor up
00661         case 'B':       // move cursor down
00662         case 'D':       // move cursor left
00663         case 's':       // save cursor position
00664         case 'u':       // restore cursor position
00665         case 'J':       // erase display and goto home
00666         case 'K':       // erase line
00667         case 'h':       // set display mode
00668         case 'l':       // reset display mode
00669         default:
00670             std::string errmsg(std::string ("[ansi error: '") + _seq->seq() +
00671                 "' sequence unsupported]");
00672             in->insert(pos, errmsg);
00673             pos += errmsg.length();
00674         }
00675         delete _seq;
00676         pos = in->find(escSeq, pos);
00677     }
00678 };

Here is the call graph for this function:

void ansiAttrCvt::do_C ( ) [private]

Definition at line 868 of file CTCP2Parse.cpp.

References _in, _seq, ansiAttrCvt::AnsiSeq::param(), ansiAttrCvt::AnsiSeq::paramc(), and pos.

Referenced by ansi2ctcp().

00869 {
00870     for (int i = 0; i < _seq->param(_seq->paramc() - 1); i++)
00871         _in->insert(pos++, " ");
00872 }

Here is the call graph for this function:

void ansiAttrCvt::do_m ( ) [private]

Definition at line 711 of file CTCP2Parse.cpp.

References _in, _seq, ANSI_SGM_BC_BLK, ANSI_SGM_BC_BLU, ANSI_SGM_BC_CYN, ANSI_SGM_BC_DEFAULT, ANSI_SGM_BC_GRN, ANSI_SGM_BC_MAG, ANSI_SGM_BC_RED, ANSI_SGM_BC_WHT, ANSI_SGM_BC_YEL, ANSI_SGM_FC_BLK, ANSI_SGM_FC_BLU, ANSI_SGM_FC_CYN, ANSI_SGM_FC_DEFAULT, ANSI_SGM_FC_GRN, ANSI_SGM_FC_MAG, ANSI_SGM_FC_RED, ANSI_SGM_FC_WHT, ANSI_SGM_FC_YEL, ANSI_SGM_TA_BLINK, ANSI_SGM_TA_BLINK_OFF, ANSI_SGM_TA_BOLD, ANSI_SGM_TA_CONSEAL, ANSI_SGM_TA_FAINT, ANSI_SGM_TA_ITALIC, ANSI_SGM_TA_ITALIC_OFF, ANSI_SGM_TA_NORMAL, ANSI_SGM_TA_RESET, ANSI_SGM_TA_REV, ANSI_SGM_TA_REV_OFF, ANSI_SGM_TA_ULINE, ANSI_SGM_TA_ULINE_OFF, bgColorMap, blink, bold, CCTCP2, fgColorMap, italic, ansiAttrCvt::AnsiSeq::param(), ansiAttrCvt::AnsiSeq::paramc(), pos, reverse, and underline.

Referenced by ansi2ctcp().

00712 {
00713     int i;
00714     for (i = 0; i < _seq->paramc(); i++)
00715     {
00716         switch (_seq->param(i))
00717         {
00718         // reset
00719         case ANSI_SGM_TA_RESET:
00720             bold = underline = reverse = blink = 0;
00721             _in->insert(pos, std::string("") + CCTCP2 + 'N' + CCTCP2);
00722             pos += 3;
00723             break;
00724
00725         // bold intensity
00726         case ANSI_SGM_TA_BOLD:
00727             if (!bold) bold = 1;
00728             break;
00729
00730         // bold intensity
00731         case ANSI_SGM_TA_FAINT:
00732             // TODO: what do I do for this ???
00733             break;
00734
00735         // bold + faint off (normal intensity)
00736         case ANSI_SGM_TA_NORMAL:
00737             if (bold) bold = 0;
00738             break;
00739
00740         // standout (italic)
00741         case ANSI_SGM_TA_ITALIC:
00742             if (!italic)
00743             {
00744                 italic = 1;
00745                 _in->insert(pos, std::string("") + CCTCP2 + "I+" + CCTCP2);
00746                 pos += 4;       // consume the additions
00747             }
00748             break;
00749
00750         // standout (italic) off
00751         case ANSI_SGM_TA_ITALIC_OFF:
00752             if (italic)
00753             {
00754                 italic = 0;
00755                 _in->insert(pos, std::string("") + CCTCP2 + "I-" + CCTCP2);
00756                 pos += 4;       // consume the additions
00757             }
00758             break;
00759
00760         // underline
00761         case ANSI_SGM_TA_ULINE:
00762             if (!underline)
00763             {
00764                 underline = 1;
00765                 _in->insert(pos, std::string("") + CCTCP2 + "U+" + CCTCP2);
00766                 pos += 4;       // consume the additions
00767             }
00768             break;
00769
00770         // underline off
00771         case ANSI_SGM_TA_ULINE_OFF:
00772             if (underline)
00773             {
00774                 underline = 0;
00775                 _in->insert(pos, std::string("") + CCTCP2 + "U-" + CCTCP2);
00776                 pos += 4;       // consume the additions
00777             }
00778             break;
00779
00780         // blink
00781         case ANSI_SGM_TA_BLINK:
00782             if (!blink)
00783             {
00784                 blink = 1;
00785                 _in->insert(pos, std::string("") + CCTCP2 + "K+" + CCTCP2);
00786                 pos += 4;   // consume additions.
00787             }
00788             break;
00789
00790         // blink off
00791         case ANSI_SGM_TA_BLINK_OFF:
00792             if (blink)
00793             {
00794                 blink = 0;
00795                 _in->insert(pos, std::string("") + CCTCP2 + "K-" + CCTCP2);
00796                 pos += 4;   // consume additions.
00797             }
00798             break;
00799
00800         // reverse
00801         case ANSI_SGM_TA_REV:
00802             if (!reverse)
00803             {
00804                 reverse = 1;
00805                 _in->insert(pos, std::string("") + CCTCP2 + "V+" + CCTCP2);
00806                 pos += 4;   // consume the additions
00807             }
00808             break;
00809
00810         // reverse off
00811         case ANSI_SGM_TA_REV_OFF:
00812             if (reverse)
00813             {
00814                 reverse = 0;
00815                 _in->insert(pos, std::string("") + CCTCP2 + "V-" + CCTCP2);
00816                 pos += 4;   // consume the additions
00817             }
00818             break;
00819
00820         // concealed
00821         case ANSI_SGM_TA_CONSEAL:
00822             // TODO: wtf is this?  make foreground same color as back?
00823             break;
00824
00825         case ANSI_SGM_FC_BLK:
00826         case ANSI_SGM_FC_RED:
00827         case ANSI_SGM_FC_GRN:
00828         case ANSI_SGM_FC_YEL:
00829         case ANSI_SGM_FC_BLU:
00830         case ANSI_SGM_FC_MAG:
00831         case ANSI_SGM_FC_CYN:
00832         case ANSI_SGM_FC_WHT:
00833             _in->insert(pos, std::string("") + CCTCP2 +
00834                 fgColorMap[_seq->param(i) - 30 + (bold ? 8 : 0)] +
00835                 CCTCP2);
00836             pos += 5;       // consume the additions
00837             break;
00838
00839         case ANSI_SGM_FC_DEFAULT:
00840             _in->insert(pos, std::string("") + CCTCP2 + "C.-" + CCTCP2);
00841             pos += 5;       // consume the additions
00842             break;
00843
00844         case ANSI_SGM_BC_BLK:
00845         case ANSI_SGM_BC_RED:
00846         case ANSI_SGM_BC_GRN:
00847         case ANSI_SGM_BC_YEL:
00848         case ANSI_SGM_BC_BLU:
00849         case ANSI_SGM_BC_MAG:
00850         case ANSI_SGM_BC_CYN:
00851         case ANSI_SGM_BC_WHT:
00852             _in->insert(pos, std::string("") +
00853                 CCTCP2 + bgColorMap[_seq->param(i) - 40] + CCTCP2);
00854             pos += 5;       // consume the additions
00855             break;
00856
00857         case ANSI_SGM_BC_DEFAULT:
00858             _in->insert(pos, std::string("") + CCTCP2 + "C-." + CCTCP2);
00859             pos += 5;       // consume the additions
00860             break;
00861
00862         }
00863     }
00864 }

Here is the call graph for this function:

Member Data Documentation

std::string* ansiAttrCvt::_in [private]

Definition at line 74 of file CTCP2Parse.hpp.

Referenced by ansi2ctcp(), do_C(), and do_m().

AnsiSeq* ansiAttrCvt::_seq [private]

Definition at line 94 of file CTCP2Parse.hpp.

Referenced by ansi2ctcp(), do_C(), and do_m().

const char * ansiAttrCvt::bgColorMap [static, private]

Initial value:

 {
    "C-0",
    "C-4",
    "C-2",
    "C-6",
    "C-1",
    "C-5",
    "C-3",
    "C-7"
}
Definition at line 699 of file CTCP2Parse.cpp.

Referenced by do_m().

int ansiAttrCvt::blink [private]

Definition at line 72 of file CTCP2Parse.hpp.

Referenced by ansi2ctcp(), and do_m().

int ansiAttrCvt::bold [private]

Definition at line 72 of file CTCP2Parse.hpp.

Referenced by ansi2ctcp(), and do_m().

const char * ansiAttrCvt::escSeq = "\033\133" [static, private]

Definition at line 633 of file CTCP2Parse.cpp.

Referenced by ansi2ctcp().

const char * ansiAttrCvt::fgColorMap [static, private]

Initial value:

 {
    "C0-",
    "C4-",
    "C2-",
    "C6-",
    "C1-",
    "C5-",
    "C3-",
    "C7-",
    "C8-",
    "CC-",
    "CA-",
    "CE-",
    "C9-",
    "CD-",
    "CB-",
    "CF-"
}
Definition at line 680 of file CTCP2Parse.cpp.

Referenced by do_m().

int ansiAttrCvt::italic [private]

Definition at line 72 of file CTCP2Parse.hpp.

Referenced by ansi2ctcp(), and do_m().

int ansiAttrCvt::pos [private]

Definition at line 71 of file CTCP2Parse.hpp.

Referenced by ansi2ctcp(), do_C(), and do_m().

int ansiAttrCvt::reverse [private]

Definition at line 72 of file CTCP2Parse.hpp.

Referenced by ansi2ctcp(), and do_m().

int ansiAttrCvt::underline [private]

Definition at line 72 of file CTCP2Parse.hpp.

Referenced by ansi2ctcp(), and do_m().

The documentation for this class was generated from the following files:
  • common/CTCP2Parse.hpp
  • common/CTCP2Parse.cpp
Generated on Sat Aug 7 22:48:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ansiAttrCvt::AnsiSeq Class Reference

ansiAttrCvt::AnsiSeq Class Reference

Collaboration diagram for ansiAttrCvt::AnsiSeq:

[legend]
List of all members.

Public Member Functions

AnsiSeq (std::string *in, int pos)
~AnsiSeq ()
char | verb ()
const char * | seq ()
int paramc ()
int | param (int index)

Private Attributes

std::string * | _seq
std::vector< int > | _params
char | _verb

Static Private Attributes

const char * | _notOf = "1234567890=;"

Constructor & Destructor Documentation

ansiAttrCvt::AnsiSeq::AnsiSeq | ( | std::string * | in,
 |  | int | pos
 | ) |

Definition at line 555 of file CTCP2Parse.cpp.

References _notOf, _params, _seq, _verb, and INVALID_SEQUENCE.

00556     : _seq(0), _verb(0)
00557 {
00558     int verbPos;
00559     int seqLen;
00560     int pos1, pos2;
00561
00562     verbPos = in->find_first_not_of(_notOf, pos + 2);
00563
00564     if (verbPos == std::string::npos || in->at(verbPos) == '\033')
00565     {
00566         _verb = INVALID_SEQUENCE;
00567         in->replace(pos, 2, "");
00568         return;
00569     }
00570
00571     seqLen = verbPos - pos - 1;
00572
00573     // get a copy of the ansi sequence without the "esc["
00574     _seq = new std::string(in->substr(pos + 2, seqLen));
00575
00576     // remove it from the original, now that we have the needed info
00577     in->replace(pos, verbPos - pos + 1, "");
00578
00579     // set the verb
00580     _verb = _seq->at(seqLen - 1);
00581
00582     for (pos1 = 0, pos2 = 0; pos2 < seqLen; pos2++)
00583     {
00584         if (_seq->at(pos2) != ';' && pos2 < (seqLen - 1)) continue;
00585         _params.push_back(atoi(_seq->substr(pos1, pos2 - pos1).c_str()));
00586         pos1 = pos2 + 1;
00587     }
00588
00589 }

ansiAttrCvt::AnsiSeq::~AnsiSeq ( )

Definition at line 592 of file CTCP2Parse.cpp.

References _seq.

00593 {
00594     if (_seq) delete _seq;
00595 }

Member Function Documentation

int ansiAttrCvt::AnsiSeq::param ( int index ) [inline]

Definition at line 91 of file CTCP2Parse.hpp.

References _params.

Referenced by ansiAttrCvt::do_C(), and ansiAttrCvt::do_m().

00091 { return _params[index]; }

int ansiAttrCvt::AnsiSeq::paramc ( ) [inline]

Definition at line 90 of file CTCP2Parse.hpp.

References _params.

Referenced by ansiAttrCvt::do_C(), and ansiAttrCvt::do_m().

00090 { return _params.size(); }

const char* ansiAttrCvt::AnsiSeq::seq ( ) [inline]

Definition at line 89 of file CTCP2Parse.hpp.

References _seq.

Referenced by ansiAttrCvt::ansi2ctcp().

00089 { return _seq->c_str(); }

char ansiAttrCvt::AnsiSeq::verb ( ) [inline]

Definition at line 88 of file CTCP2Parse.hpp.

References _verb.

Referenced by ansiAttrCvt::ansi2ctcp().

00088 { return _verb; }

Member Data Documentation

const char * ansiAttrCvt::AnsiSeq::_notOf = "1234567890=;" [static, private]

Definition at line 553 of file CTCP2Parse.cpp.

Referenced by AnsiSeq().

std::vector<int> ansiAttrCvt::AnsiSeq::_params [private]

Definition at line 80 of file CTCP2Parse.hpp.

Referenced by AnsiSeq(), param(), and paramc().

std::string* ansiAttrCvt::AnsiSeq::_seq [private]

Definition at line 79 of file CTCP2Parse.hpp.

Referenced by AnsiSeq(), seq(), and ~AnsiSeq().

char ansiAttrCvt::AnsiSeq::_verb [private]

Definition at line 81 of file CTCP2Parse.hpp.

Referenced by AnsiSeq(), and verb().

The documentation for this class was generated from the following files:
  • common/CTCP2Parse.hpp
  • common/CTCP2Parse.cpp
Generated on Sat Aug 7 22:48:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: AREF Struct Reference

AREF Struct Reference

Collaboration diagram for AREF:

[legend]
List of all members.

Public Attributes

int cnt
HBITMAP bitmap

Member Data Documentation

HBITMAP AREF::bitmap

Definition at line 95 of file utoolbar.cpp.

Referenced by aref::aref(), aref::operator HBITMAP(), and aref::UnRef().

int AREF::cnt

Definition at line 94 of file utoolbar.cpp.

Referenced by aref::aref(), aref::Ref(), and aref::UnRef().

The documentation for this struct was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:48:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: aref Class Reference

aref Class Reference

Collaboration diagram for aref:

[legend]
List of all members.

Public Member Functions

aref ()
aref (HBITMAP b)
aref (const aref &src)
virtual | ~aref ()
AREF * | Ref (void) const
AREF * | UnRef (void) const
aref & | operator= (const aref &src)
operator HBITMAP ()

Protected Attributes

AREF * ref

Constructor & Destructor Documentation

aref::aref ( ) [inline]

Definition at line 101 of file utoolbar.cpp.

References ref.

00101            : ref(0L)
00102     {
00103     }

aref::aref ( HBITMAP b ) [inline]

Definition at line 104 of file utoolbar.cpp.

References AREF::bitmap, AREF::cnt, NEW, and ref.

00105     {
00106         ref = NEW AREF;
00107         ref->cnt = 1;
00108         ref->bitmap = b;
00109     }

aref::aref ( const aref & src ) [inline]

Definition at line 110 of file utoolbar.cpp.

References Ref(), and ref.

00111     {
00112         ref = src.Ref();
00113     }

Here is the call graph for this function:

virtual aref::~aref ( ) [inline, virtual]

Definition at line 114 of file utoolbar.cpp.

References UnRef().

00115     {
00116         UnRef();
00117     }

Here is the call graph for this function:

Member Function Documentation

aref::operator HBITMAP ( ) [inline]

Definition at line 143 of file utoolbar.cpp.

References AREF::bitmap, and ref.

00144     {
00145         return ref != 0L ? ref->bitmap : 0L;
00146     }

aref& aref::operator= ( const aref & src ) [inline]

Definition at line 137 of file utoolbar.cpp.

References Ref(), ref, and UnRef().

00138     {
00139         UnRef();
00140         ref = src.Ref();
00141         return *this;
00142     }

Here is the call graph for this function:

AREF* aref::Ref ( void ) const [inline]

Definition at line 118 of file utoolbar.cpp.

References AREF::cnt, and ref.

Referenced by aref(), and operator=().

00119     {
00120         if(ref != 0L)
00121             ref->cnt++;
00122         return ref;
00123     }

AREF* aref::UnRef ( void ) const [inline]

Definition at line 124 of file utoolbar.cpp.

References AREF::bitmap, AREF::cnt, and ref.

Referenced by operator=(), and ~aref().

00125     {
00126         if(ref != 0L && --ref->cnt == 0)
00127         {
00128 #ifdef WIN32
00129             if(ref->bitmap != 0L)
00130                 ::DeleteObject(ref->bitmap);
00131 #endif
00132             delete ref;
00133             ((aref *)this)->ref = 0L;
00134         }
00135         return ref;
00136     }

Member Data Documentation

AREF* aref::ref [protected]

Definition at line 148 of file utoolbar.cpp.

Referenced by aref(), operator HBITMAP(), operator=(), Ref(), and UnRef().

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:48:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: awidget Class Reference

awidget Class Reference

Collaboration diagram for awidget:

[legend]
List of all members.

Public Member Functions

awidget (HBITMAP b, int c, const char *t, UTB_VAR v)
awidget ()
awidget (const awidget &src)
virtual | ~awidget ()
awidget & | operator= (const awidget &src)

Public Attributes

aref bitmap
int cmd
char * | tooltip
UTB_VAR var

Constructor & Destructor Documentation

awidget::awidget | ( | HBITMAP | b,
 |  | int | c,
 |  | const char * | t,
 |  | UTB_VAR | v
 | ) | [inline]

Definition at line 154 of file utoolbar.cpp.

References bitmap, cmd, strdup(), tooltip, and var.

00154                                                         :
00155         bitmap(b), cmd(c), tooltip(0L), var(v)
00156     {
00157         if(t != 0L)
00158             tooltip = strdup(t);
00159     }
    awidget() : bitmap(0L), cmd(0), tooltip(0L)

Here is the call graph for this function:

awidget::awidget ( ) [inline]

Definition at line 160 of file utoolbar.cpp.

References bitmap, cmd, and tooltip.

00160               : bitmap(0L), cmd(0), tooltip(0L)
00161     {
00162     }

awidget::awidget ( const awidget & src ) [inline]

Definition at line 163 of file utoolbar.cpp.

00164     {
00165         *this = src;
00166     }

virtual awidget::~awidget ( ) [inline, virtual]

Definition at line 168 of file utoolbar.cpp.

References free, and tooltip.

00169     {
00170         if(tooltip != 0L)
00171             free(tooltip);
00172     }

Member Function Documentation

awidget& awidget::operator= ( const awidget & src ) [inline]

Definition at line 174 of file utoolbar.cpp.

References bitmap, cmd, strdup(), tooltip, and var.

00175     {
00176         bitmap = src.bitmap;
00177         cmd = src.cmd;
00178         var = src.var;
00179         tooltip = src.tooltip != 0L ? strdup(src.tooltip) : 0L;
00180
00181         return *this;
00182     }

Here is the call graph for this function:

Member Data Documentation

aref awidget::bitmap

Definition at line 183 of file utoolbar.cpp.

Referenced by awidget(), CColorMenu::DrawItem(), operator=(), and UToolbar::RebuildBar().

int awidget::cmd

Definition at line 184 of file utoolbar.cpp.

Referenced by awidget(), UToolbar::OnUpdateUI(), operator=(), UToolbar::RebuildBar(), and WININFO::Search().

char* awidget::tooltip

Definition at line 185 of file utoolbar.cpp.

Referenced by awidget(), UToolbar::OnSetTooltip(), operator=(), and ~awidget().

UTB_VAR awidget::var

Definition at line 186 of file utoolbar.cpp.

Referenced by awidget(), operator=(), and UToolbar::RebuildBar().

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:48:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CBarConsole Class Reference

CBarConsole Class Reference

#include <ConsoleBar.h>

Inheritance diagram for CBarConsole:

[legend]
Collaboration diagram for CBarConsole:

[legend]
List of all members.

Public Member Functions

CBarConsole ()
virtual | ~CBarConsole ()

Public Attributes

CWincvsView * m_view

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Constructor & Destructor Documentation

CBarConsole::CBarConsole ( )

Definition at line 39 of file ConsoleBar.cpp.

00039                          : m_view(0L)
00040 {
00041     // TODO: add construction code here.
00042 }

CBarConsole::~CBarConsole ( ) [virtual]

Definition at line 44 of file ConsoleBar.cpp.

00045 {
00046     // TODO: add destruction code here.
00047 }

Member Function Documentation

int CBarConsole::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Reimplemented from CCJControlBar.

Definition at line 58 of file ConsoleBar.cpp.

References NULL, and CCJControlBar::OnCreate().

00059 {
00060     if (CCJControlBar::OnCreate(lpCreateStruct) == -1)
00061         return -1;
00062
00063     m_view = (CWincvsView *)RUNTIME_CLASS(CWincvsView)->CreateObject();
00064     if(m_view == 0L)
00065     {
00066         TRACE0("Failed to create view for CBarConsole\n");
00067         return -1;
00068     }
00069
00070     // TODO: Add your specialized creation code here
00071     if (!m_view->Create(NULL, "",WS_CHILD | WS_VISIBLE | WS_BORDER,
00072         CRect(0,0,0,0), this, 0/*IDC_LIST_CTRL_2*/))
00073     {
00074         TRACE0("Failed to create view for CMyBarLeft\n");
00075         return -1;
00076     }
00077
00078     SetChild(m_view);
00079
00080     return 0;
00081 }

Here is the call graph for this function:

Member Data Documentation

CWincvsView* CBarConsole::m_view

Definition at line 45 of file ConsoleBar.h.

Referenced by CMainFrame::GetConsoleView().

The documentation for this class was generated from the following files:
  • WinCvs/ConsoleBar.h
  • WinCvs/ConsoleBar.cpp
Generated on Sat Aug 7 22:48:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CBrowseFileView Class Reference

CBrowseFileView Class Reference

#include <BrowseFileView.h>

Inheritance diagram for CBrowseFileView:

[legend]
Collaboration diagram for CBrowseFileView:

[legend]
List of all members.

Public Member Functions

virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
PreCreateWindow virtual override, modify the window style.
virtual | ~CBrowseFileView ()
const UStr & | GetPath () const
Get the current path.
KiColumnModel * | GetColumnModel () const
Get the columnar model of the data.
void | CheckChanges (void)
Force the checking for changes after CVS command ends.
void | OnFilteringChanged ()
void | OnFilterBarChanged ()
void | ResetView (bool notifyBrowser=false, const char *selectFile=0L)
void | ResetView (const char *path, bool notifyBrowser=false, const char *selectFile=0L)

Static Public Member Functions

int | GetImageForEntry (EntnodeData *data)

Protected Member Functions

CBrowseFileView ()
virtual void | OnInitialUpdate ()
OnInitialUpdate virtual override, initialize list control and start the refresh timer.
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
OnBeginPrinting virtual override.
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
OnPreparePrinting virtual override.
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
OnPrint virtual override.
afx_msg void | OnViewSmallIcons ()
afx_msg void | OnViewList ()
afx_msg void | OnViewFullRowDetails ()
afx_msg void | OnUpdateViewSmallIcons (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewAdd (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewAddB (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewUpdate (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewRelease (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewRmv (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewGraph (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewList (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewEditseldef (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewFullRowDetails (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
WM_LBUTTONDBLCLK message handler, edit the selection.
afx_msg void | OnColumnclick (NMHDR *pNMHDR, LRESULT *pResult)
LVN_COLUMNCLICK notification handler, sort items.
afx_msg void | OnViewAdd ()
WM_COMMAND message handler, cvs add selection.
afx_msg void | OnViewAddb ()
WM_COMMAND message handler, cvs add -kb selection.
afx_msg void | OnViewCommit ()
WM_COMMAND message handler, cvs commit selection.
afx_msg void | OnViewRmv ()
WM_COMMAND message handler, cvs remove selection.
afx_msg void | OnViewUpdate ()
WM_COMMAND message handler, cvs update selection.
afx_msg void | OnViewQueryUpdate ()
WM_COMMAND message handler, cvs -n update selection.
afx_msg void | OnUpdateViewReload (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewReload ()
WM_COMMAND message handler, refresh view.
afx_msg void | OnKeydown (NMHDR *pNMHDR, LRESULT *pResult)
LVN_KEYDOWN notification handler, handle selected keys.
afx_msg void | OnViewUpone ()
WM_COMMAND message handler, go up one directory level unless we are at the root already.
afx_msg void | OnUpdateViewUpone (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewTrash ()
WM_COMMAND message handler, move the selection to trash.
afx_msg void | OnUpdateViewTrash (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewDiff ()
WM_COMMAND message handler, [cvs] diff selection.
afx_msg void | OnViewLog ()
WM_COMMAND message handler, cvs log selection.
afx_msg void | OnViewGraph ()
WM_COMMAND message handler, graph selection.
afx_msg void | OnViewStatus ()
WM_COMMAND message handler, cvs status selection.
afx_msg void | OnViewUnlock ()
WM_COMMAND message handler, cvs admin -u selection.
afx_msg void | OnViewWatchOn ()
WM_COMMAND message handler, cvs watch add selection.
afx_msg void | OnViewWatchOff ()
WM_COMMAND message handler, cvs watch remove selection.
afx_msg void | OnViewEdit ()
WM_COMMAND message handler, cvs edit selection.
afx_msg void | OnViewUnedit ()
WM_COMMAND message handler, cvs unedit selection.
afx_msg void | OnViewWatchers ()
WM_COMMAND message handler, cvs watchers selection.
afx_msg void | OnViewEditors ()
WM_COMMAND message handler, cvs editors selection.
afx_msg void | OnViewRelease ()
WM_COMMAND message handler, cvs release selection.
afx_msg void | OnViewTagNew ()
WM_COMMAND message handler, cvs tag selection.
afx_msg void | OnViewTagDelete ()
WM_COMMAND message handler, cvs tag -d selection.
afx_msg void | OnViewTagBranch ()
WM_COMMAND message handler, cvs tag -b selection.
afx_msg void | OnViewExplore ()
WM_COMMAND message handler, explore the selection.
afx_msg void | OnUpdateViewExplore (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewNewInstance ()
WM_COMMAND message handler, open the selection in new instance.
afx_msg void | OnTimer (UINT nIDEvent)
WM_TIMER message handler, check for the file changes.
afx_msg void | OnViewEditsel ()
WM_COMMAND message handler, edit selection.
afx_msg void | OnViewEditseldef ()
WM_COMMAND message handler, edit selection.
afx_msg void | OnViewOpensel ()
WM_COMMAND message handler, open selection.
afx_msg void | OnViewOpenselas ()
WM_COMMAND message handler, open selection using Open With... dialog.
afx_msg void | OnViewCheckout ()
WM_COMMAND message handler, cvs co.
afx_msg void | OnUpdateViewCheckout (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewImport ()
WM_COMMAND message handler, cvs import selection.
afx_msg void | OnUpdateViewImport (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnBegindrag (NMHDR *pNMHDR, LRESULT *pResult)
LVN_BEGINDRAG notification handler.
afx_msg void | OnBeginrdrag (NMHDR *pNMHDR, LRESULT *pResult)
LVN_BEGINRDRAG notification handler.
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
WM_SETCURSOR message handler, set the hourglass cursor when cvs command is running.
afx_msg void | OnDeleteitem (NMHDR *pNMHDR, LRESULT *pResult)
LVN_DELETEITEM notification handler.
afx_msg void | OnDestroy ()
WM_DESTROY message handler, save settings, unregister change notifications and kill timers.
afx_msg void | OnUpdateViewAnnotate (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnAnnotate ()
WM_COMMAND message handler, cvs annotate selection.
afx_msg void | OnEditSelectAll ()
WM_COMMAND message handler, select all file items.
afx_msg void | OnViewReservededit ()
WM_COMMAND message handler, cvs edit -c selection.
afx_msg void | OnViewForceedit ()
WM_COMMAND message handler, cvs edit -f selection.
afx_msg void | OnViewAddu ()
WM_COMMAND message handler, cvs add -ku selection.
afx_msg void | OnAppCmdline ()
WM_COMMAND message handler, display command line dialog.
afx_msg void | OnUpdateCvsCmd (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnAppRtagbranch ()
WM_COMMAND message handler, cvs rtag -b selection.
afx_msg void | OnAppRtagcreate ()
WM_COMMAND message handler, cvs rtag selection.
afx_msg void | OnAppRtagdelete ()
WM_COMMAND message handler, cvs rtag -d selection.
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
WM_CONTEXTMENU message handler, display the custom menu.
afx_msg void | OnViewFilterbarEnable ()
WM_COMMAND message handler, enable/disable filter bar.
afx_msg void | OnViewFilterbarClearall ()
WM_COMMAND message handler, clear all filter bar filters.
afx_msg void | OnViewFilterbarOptions ()
WM_COMMAND message handler, clear all filter bar filters.
afx_msg void | OnItemchanged (NMHDR *pNMHDR, LRESULT *pResult)
LVN_ITEMCHANGED notification handler, report selected items.
afx_msg void | OnDeleteallitems (NMHDR *pNMHDR, LRESULT *pResult)
LVN_DELETEALLITEMS notification handler, reset status bar text.
afx_msg void | OnQueryShellactionDefault ()
WM_COMMAND message handler, launch default associated shell action.
afx_msg void | OnQueryProperties ()
WM_COMMAND message handler, show the selection properties.
afx_msg void | OnUpdateQueryProperties (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateMacro (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg BOOL | OnMacro (UINT nID)
WM_COMMAND message handler, call the macro on selection.
afx_msg void | OnUpdateCustomize (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg BOOL | OnCustomize (UINT nID)
WM_COMMAND message handler, customize menus.
afx_msg LRESULT | OnFileChange (WPARAM, LPARAM)
KoWatcher::WM_FILECHANGE message handler, mark the files change.
afx_msg LRESULT | OnResetView (WPARAM, LPARAM)
WM_RESETVIEW message handler, reset view.

Private Member Functions

void | Resort (void)
BOOL | SetViewType (DWORD dwViewType)
DWORD | GetViewType () const
void | GetEntriesModTime (time_t &newEntriesMod, time_t &newEntriesLogMod)
void | EnterFolder (const char *fullpath)
void | DoDrag ()
void | SetRecursive (bool isRecursive)
bool | ProcessSelectionCommand (KiSelectionHandler *handler)
bool | DisableCommon (bool bCheckSelection=true)
CString | FormatEntrryPrefix (bool isRecursive) const
void | SaveColumns (bool isRecursive)
bool | LoadColumns (bool isRecursive)
void | AddColumns ()
void | DeleteColumns ()
int | GetPathLength (LPCTSTR path)
bool | IsSamePath (LPCTSTR path1, LPCTSTR path2)

Private Attributes

UStr m_path
int m_numberOfLines
int m_numberByPages
int m_numberOfPages
int m_heightOfLines
bool m_isRecursive
bool m_isResetViewLocked
bool m_isResetViewPending
bool m_checkChanges
KoWatcher * m_watch
time_t | m_entriesMod
time_t | m_entriesLogMod
bool m_isFilesChange
UINT | m_uiFilechangeTimer
CSortHeaderCtrl m_ctrlHeader
int m_sort
bool m_ascendant
KiColumnModel * m_modelColumns
std::map< int, std::string > | m_filterBarFilters

Static Private Attributes

CImageList | m_smallImageList
CImageList | m_stateImageList

Constructor & Destructor Documentation

CBrowseFileView::CBrowseFileView ( ) [protected]

Definition at line 519 of file BrowseFileView.cpp.

References gFileViewSort, and gFileViewSortAsc.

00520     : m_checkChanges(false), m_watch(NULL), m_isResetViewLocked(false), m_isFilesChange(false),
00521     m_isResetViewPending(false), m_uiFilechangeTimer(0)
00522 {
00523     m_sort = (int)gFileViewSort;
00524
00525     SetRecursive(false);
00526
00527     m_ascendant = (bool)gFileViewSortAsc;
00528     m_entriesMod = 0;
00529     m_entriesLogMod = 0;
00530 }

CBrowseFileView::~CBrowseFileView ( ) [virtual]

Definition at line 532 of file BrowseFileView.cpp.

References gFileViewSort, gFileViewSortAsc, m_ascendant, and m_sort.

00533 {
00534     gFileViewSortAsc = m_ascendant;
00535     gFileViewSort = m_sort;
00536 }

Member Function Documentation

void CBrowseFileView::AddColumns ( ) [private]

Add columns to view Definition at line 688 of file BrowseFileView.cpp.

References KiColumnModel::GetAt(), GetColumnModel(), KiColumnModel::GetCount(), and KiColumn::GetSetupData().

Referenced by OnInitialUpdate(), and ResetView().

00689 {
00690     KiColumnModel* model = GetColumnModel();
00691     const int columnCount = model->GetCount();
00692     CListCtrl& listCtrl = GetListCtrl();
00693
00694     // Add columns
00695     for(int i = 0; i < columnCount; i++)
00696     {
00697         LV_COLUMN lvc;
00698
00699         model->GetAt(i)->GetSetupData(&lvc);
00700         lvc.iSubItem = i;
00701         lvc.mask |= LVCF_SUBITEM;
00702         listCtrl.InsertColumn(i,&lvc);
00703     }
00704 }

Here is the call graph for this function:

void CBrowseFileView::CheckChanges ( void ) [inline]

Force the checking for changes after CVS command ends.

Definition at line 372 of file BrowseFileView.h.

References m_checkChanges.

Referenced by CWincvsApp::IdleCvsProgress().

00373 {
00374     m_checkChanges = true;
00375 }

void CBrowseFileView::DeleteColumns ( ) [private]

Delete all columns Definition at line 709 of file BrowseFileView.cpp.

References GetColumnModel(), m_ctrlHeader, and CMainFrame::SetFilterBarMask().

Referenced by ResetView().

00710 {
00711     // Clear the filters
00712     if( m_ctrlHeader.GetSafeHwnd() )
00713     {
00714         Header_ClearAllFilters(m_ctrlHeader.GetSafeHwnd());
00715
00716         CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
00717         if( pMainFrame->GetSafeHwnd() )
00718         {
00719             pMainFrame->SetFilterBarMask(m_ctrlHeader, GetColumnModel());
00720         }
00721     }
00722
00723     CListCtrl& listCtrl = GetListCtrl();
00724     const int nCount = listCtrl.GetHeaderCtrl()->GetItemCount();
00725
00726     // Delete columns
00727     for(int nIndex = 0; nIndex < nCount; nIndex++)
00728     {
00729         listCtrl.DeleteColumn(0);
00730     }
00731 }

Here is the call graph for this function:

bool CBrowseFileView::DisableCommon ( bool bCheckSelection = true ) [private]

Check whether the commands should be disabled

Parameters:
bCheckSelection true if selection should be taken into consideration
Returns:
true if commands should be disabled, false otherwise
Definition at line 1182 of file BrowseFileView.cpp.

References CWincvsApp::IsCvsRunning().

Referenced by OnContextMenu(), OnUpdateMacro(), OnUpdateViewAdd(), OnUpdateViewAddB(), OnUpdateViewAnnotate(), OnUpdateViewCheckout(), OnUpdateViewEditseldef(), OnUpdateViewExplore(), OnUpdateViewGraph(), OnUpdateViewImport(), OnUpdateViewRelease(), OnUpdateViewRmv(), OnUpdateViewTrash(), and OnUpdateViewUpdate().

01183 {
01184     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01185     CListCtrl& ListCtrl = GetListCtrl();
01186
01187     const bool bCommon = app->IsCvsRunning();
01188     const bool bSelection = ListCtrl.GetSelectedCount() == 0 || this != CWnd::GetFocus();
01189
01190     return bCheckSelection ? bCommon || bSelection : bCommon;
01191 }

Here is the call graph for this function:

void CBrowseFileView::DoDrag ( ) [private]

Drag and drop

Note:
Implemented by Nikita Jorniak <nikita@tanner.com> Directories are intentionally left out This works to drag files from WinCVS and drop them to any external viewer/editor which supports Windows Shell standard CF_HDROP Clipboard style
Definition at line 2351 of file BrowseFileView.cpp.

References ENT_SUBDIR, EntnodeData::GetFullPathName(), EntnodeData::GetType(), and NULL.

Referenced by OnBegindrag(), and OnBeginrdrag().

02352 {
02353     CListCtrl& ListCtrl = GetListCtrl();
02354     int nItem=-1;
02355     int nSize = 0;
02356
02357     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02358     {
02359         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02360         if( data->GetType() != ENT_SUBDIR )
02361         {
02362             UStr buf;
02363             const char* fullpath = data->GetFullPathName(buf);
02364             nSize += strlen(fullpath) + 1;
02365         }
02366     }
02367
02368     if( nSize > 0 )
02369     {
02370         HGLOBAL hMem = GlobalAlloc(GMEM_FIXED, sizeof(DROPFILES)+nSize+1);
02371         if( hMem != NULL )
02372         {
02373             DROPFILES& df = *reinterpret_cast<DROPFILES*>(hMem);
02374             df.pFiles = sizeof(DROPFILES);
02375             df.fNC = FALSE;
02376             df.pt.x = df.pt.y = 0;
02377             df.fWide = FALSE;
02378
02379             nItem=-1;
02380             int Offset = sizeof(DROPFILES);
02381             while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02382             {
02383                 EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02384                 if( data->GetType() != ENT_SUBDIR)
02385                 {
02386                     UStr buf;
02387                     const char* fullpath = data->GetFullPathName(buf);
02388                     int len = strlen(fullpath) + 1;
02389                     memcpy(reinterpret_cast<BYTE*>(hMem)+Offset, fullpath, len);
02390                     Offset+=len;
02391                 }
02392             }
02393
02394             reinterpret_cast<BYTE*>(hMem)[Offset]=0;
02395
02396             COleDataSource ds;
02397             ds.CacheGlobalData( CF_HDROP, hMem );
02398             ds.DoDragDrop( DROPEFFECT_COPY );
02399         }
02400     }
02401 }

Here is the call graph for this function:

void CBrowseFileView::EnterFolder ( const char * fullpath ) [private]

Enter the folder if it exists

Parameters:
fullpath Full path of the folder to enter
Definition at line 1130 of file BrowseFileView.cpp.

References cvs_err(), gCvsPrefs, ResetView(), CvsPrefs::SetLastWorkingDir(), and stat.

Referenced by OnKeydown(), and OnLButtonDblClk().

01131 {
01132     struct stat st;
01133     if( stat(fullpath, &st) != 0 && errno == ENOENT )
01134     {
01135         // Assume we're looking at directory previously in CVS,
01136         // but not currently in the file system.
01137         // If we ever run across another case (permissions perhaps)
01138         // then you might want to add code here.
01139         cvs_err("'%s' is not accessible\n", (char*)fullpath);
01140     }
01141     else
01142     {
01143         ResetView(fullpath, true);
01144         gCvsPrefs.SetLastWorkingDir(fullpath);
01145     }
01146 }

Here is the call graph for this function:

CString CBrowseFileView::FormatEntrryPrefix ( bool isRecursive ) const [private]

Format the entry prefix

Parameters:
isRecursive Recursive state
Returns:
Formatted entry prefix
Definition at line 2454 of file BrowseFileView.cpp.

References STR_FILEDETAILVIEW_COLUMN_PREFIX_FLAT, and STR_FILEDETAILVIEW_COLUMN_PREFIX_REG.

Referenced by LoadColumns(), and SaveColumns().

02455 {
02456     return isRecursive ? STR_FILEDETAILVIEW_COLUMN_PREFIX_FLAT : STR_FILEDETAILVIEW_COLUMN_PREFIX_REG;
02457 }

KiColumnModel * CBrowseFileView::GetColumnModel ( ) const [inline]

Get the columnar model of the data.

Definition at line 366 of file BrowseFileView.h.

References m_modelColumns.

Referenced by AddColumns(), DeleteColumns(), OnColumnclick(), OnFilterBarChanged(), CSortHeaderCtrl::OnFilterBtnClicked(), CSortHeaderCtrl::OnFilterChanged(), OnPrint(), ResetView(), and Resort().

00367 {
00368     return m_modelColumns;
00369 }

void CBrowseFileView::GetEntriesModTime | ( | time_t & | newEntriesMod,
 |  | time_t & | newEntriesLogMod
 | ) | [private]

Get the modification time of the CVS/Entries and CVS/Entries.log files

Parameters:
newEntriesMod | Return the modification time of the CVS/Entries file
newEntriesLogMod | Return the modification time of the CVS/Entries.log file
Definition at line 738 of file BrowseFileView.cpp.

References UStr::c_str(), CStr, m_path, stat::st_mtime, and stat.

Referenced by OnTimer(), and ResetView().

00739 {
00740     CStr entriesPath(m_path.c_str());
00741
00742     if( !entriesPath.endsWith(kPathDelimiter) )
00743         entriesPath << kPathDelimiter;
00744
00745     entriesPath << "CVS";
00746     entriesPath << kPathDelimiter;
00747     entriesPath << "Entries";
00748
00749     struct stat sb;
00750     if( stat(entriesPath, &sb) != -1 )
00751         newEntriesMod = sb.st_mtime;
00752
00753     entriesPath << ".log";
00754
00755     if( stat(entriesPath, &sb) != -1 )
00756         newEntriesLogMod = sb.st_mtime;
00757 }

Here is the call graph for this function:

int CBrowseFileView::GetImageForEntry ( EntnodeData * data ) [static]

Get the ID of the image which reflects the state of the file/directory

Parameters:
data Node data to get the image for
Returns:
The ID of the image
Definition at line 552 of file BrowseFileView.cpp.

References ENT_FILE, EntnodeData::GetConflict(), EntnodeData::GetType(), EntnodeData::IsIgnored(), EntnodeData::IsRemoved(), EntnodeData::IsUnknown(), kFileIconAdded, kFileIconBinary, kFileIconBinaryAdded, kFileIconBinaryMod, kFileIconConflict, kFileIconIgnored, kFileIconRemoved, kFileIconText, kFileIconTextMod, kFileIconUnicode, kFileIconUnicodeAdded, kFileIconUnicodeMod, kFileIconUnknown, kFolderIcon, kFolderIconIgnored, and kFolderIconUnknown.

00553 {
00554     int result = -1;
00555
00556     if( data->GetType() == ENT_FILE )
00557     {
00558         const char* info = 0L;
00559         if( data->IsIgnored() )
00560         {
00561             result = kFileIconIgnored;
00562         }
00563         else if( data->IsUnknown() )
00564         {
00565             result = kFileIconUnknown;
00566         }
00567         else if( data->GetConflict() != 0L )
00568         {
00569             result = kFileIconConflict;
00570         }
00571         else if( data->IsRemoved() )
00572         {
00573             result = kFileIconRemoved;
00574         }
00575         else if( (info = (*data)[EntnodeFile::kOption]) != 0L && (strcmp(info, "-kb") == 0 || strcmp(info, "-kB") == 0) )
00576         {
00577             const char* vn = (*data)[EntnodeFile::kVN];
00578             bool isAdded = vn && (strcmp(vn, "0") == 0);
00579
00580             result = data->IsUnmodified() ? kFileIconBinary :
00581                 isAdded ? kFileIconBinaryAdded : kFileIconBinaryMod;
00582         }
00583         else if( (info = (*data)[EntnodeFile::kOption]) != 0L && strcmp(info, "-ku") == 0 )
00584         {
00585             const char* vn = (*data)[EntnodeFile::kVN];
00586             bool isAdded = vn && (strcmp(vn, "0") == 0);
00587
00588             result = data->IsUnmodified() ? kFileIconUnicode :
00589                 isAdded ? kFileIconUnicodeAdded : kFileIconUnicodeMod;
00590         }
00591         else
00592         {
00593             const char* vn = (*data)[EntnodeFile::kVN];
00594             bool isAdded = vn && (strcmp(vn, "0") == 0);
00595
00596             result = data->IsUnmodified() ? kFileIconText :
00597                 isAdded ? kFileIconAdded : kFileIconTextMod;
00598         }
00599     }
00600     else
00601     {
00602         if( data->IsIgnored() )
00603         {
00604             result = kFolderIconIgnored;
00605         }
00606         else if( data->IsUnknown() )
00607         {
00608             result = kFolderIconUnknown;
00609         }
00610         else
00611         {
00612             result = kFolderIcon;
00613         }
00614     }
00615
00616     return result;
00617 }

Here is the call graph for this function:

const UStr & CBrowseFileView::GetPath ( ) const [inline]

Get the current path.

Definition at line 360 of file BrowseFileView.h.

Referenced by CWincvsApp::InitInstance(), OnPrint(), ProcessSelectionCommand(), and Resort().

00361 {
00362     return m_path;
00363 }

int CBrowseFileView::GetPathLength ( LPCTSTR path ) [private]

Get the path length

Parameters:
path The path to get the length for
Returns:
true on success, false otherwise
Note:
Takes the ending path delimiter into consideration
Definition at line 1628 of file BrowseFileView.cpp.

Referenced by IsSamePath().

01629 {
01630     int len = _tcslen(path);
01631     return (len > 0 && path[len - 1] == kPathDelimiter) ? (len - 1) : len;
01632 }

DWORD CBrowseFileView::GetViewType ( ) const [private]

Get the view type

Returns:
The view type
Definition at line 1076 of file BrowseFileView.cpp.

Referenced by OnUpdateViewFullRowDetails(), OnUpdateViewList(), OnUpdateViewSmallIcons(), OnViewFullRowDetails(), OnViewList(), and OnViewSmallIcons().

01077 {
01078     return GetStyle() & LVS_TYPEMASK;
01079 }

bool CBrowseFileView::IsSamePath | ( | LPCTSTR | path1,
 |  | LPCTSTR | path2
 | ) | [private]

Compare two paths

Parameters:
path1 | First path
path2 | Seconds path
Returns:
true if paths are same, false otherwise
Definition at line 1640 of file BrowseFileView.cpp.

References GetPathLength().

Referenced by OnUpdateViewUpone(), and OnViewUpone().

01641 {
01642     int len1 = GetPathLength(path1);
01643     int len2 = GetPathLength(path2);
01644     return len1 == len2 && _tcsicmp(path1, path2) == 0;
01645 }

Here is the call graph for this function:

bool CBrowseFileView::LoadColumns ( bool isRecursive ) [private]

Load column state

Parameters:
isRecursive Recursive state
Returns:
true on success, false otherwise
Definition at line 2510 of file BrowseFileView.cpp.

References CHR_FILEDETAILVIEW_COLUMN_DATASEP, FormatEntrryPrefix(), m_ctrlHeader, STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER, STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH, and STR_FILEDETAILVIEW_COLUMN_SECTION.

Referenced by OnInitialUpdate(), and ResetView().

02511 {
02512     CString columnsWidth = AfxGetApp()->GetProfileString(STR_FILEDETAILVIEW_COLUMN_SECTION,
02513         FormatEntrryPrefix(isRecursive) + STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH);
02514
02515     CString columnsOrder = AfxGetApp()->GetProfileString(STR_FILEDETAILVIEW_COLUMN_SECTION,
02516         FormatEntrryPrefix(isRecursive) + STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER);
02517
02518     if( columnsWidth.IsEmpty() || columnsOrder.IsEmpty() )
02519     {
02520         return false;
02521     }
02522
02523     const int columnCount = m_ctrlHeader.GetItemCount();
02524
02525     int* orderArray = new int[columnCount];
02526     if( orderArray )
02527     {
02528         CString strSubString;
02529
02530         for(int nIndex = 0; nIndex < columnCount; nIndex++)
02531         {
02532             AfxExtractSubString(strSubString, columnsWidth, nIndex, CHR_FILEDETAILVIEW_COLUMN_DATASEP);
02533             GetListCtrl().SetColumnWidth(nIndex, atoi(strSubString));
02534
02535             AfxExtractSubString(strSubString, columnsOrder, nIndex, CHR_FILEDETAILVIEW_COLUMN_DATASEP);
02536             orderArray[nIndex] = atoi(strSubString);
02537         }
02538
02539         m_ctrlHeader.SetOrderArray(columnCount, orderArray);
02540
02541         delete [] orderArray;
02542     }
02543
02544     return true;
02545 }

Here is the call graph for this function:

void CBrowseFileView::OnAnnotate ( ) [protected]

WM_COMMAND message handler, cvs annotate selection.

Definition at line 2639 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

02640 {
02641     KoAnnotateHandler handler;
02642     ProcessSelectionCommand(&handler);
02643 }

Here is the call graph for this function:

void CBrowseFileView::OnAppCmdline ( ) [protected]

WM_COMMAND message handler, display command line dialog.

Definition at line 2666 of file BrowseFileView.cpp.

References m_path, KoCommandLineHandler::OnFolder(), and ProcessSelectionCommand().

02667 {
02668     KoCommandLineHandler handler;
02669
02670     if( !ProcessSelectionCommand(&handler) )
02671     {
02672         handler.OnFolder(m_path);
02673     }
02674 }

Here is the call graph for this function:

void CBrowseFileView::OnAppRtagbranch ( ) [protected]

WM_COMMAND message handler, cvs rtag -b selection.

Definition at line 2684 of file BrowseFileView.cpp.

References KoRtagBranchHandler, m_path, TRtagHandler< tagType >::OnFolder(), and ProcessSelectionCommand().

02685 {
02686     KoRtagBranchHandler handler;
02687
02688     if( !ProcessSelectionCommand(&handler) )
02689     {
02690         handler.OnFolder(m_path);
02691     }
02692 }

Here is the call graph for this function:

void CBrowseFileView::OnAppRtagcreate ( ) [protected]

WM_COMMAND message handler, cvs rtag selection.

Definition at line 2695 of file BrowseFileView.cpp.

References KoRtagCreateHandler, m_path, TRtagHandler< tagType >::OnFolder(), and ProcessSelectionCommand().

02696 {
02697     KoRtagCreateHandler handler;
02698
02699     if( !ProcessSelectionCommand(&handler) )
02700     {
02701         handler.OnFolder(m_path);
02702     }
02703 }

Here is the call graph for this function:

void CBrowseFileView::OnAppRtagdelete ( ) [protected]

WM_COMMAND message handler, cvs rtag -d selection.

Definition at line 2706 of file BrowseFileView.cpp.

References KoRtagDeleteHandler, m_path, TRtagHandler< tagType >::OnFolder(), and ProcessSelectionCommand().

02707 {
02708     KoRtagDeleteHandler handler;
02709
02710     if( !ProcessSelectionCommand(&handler) )
02711     {
02712         handler.OnFolder(m_path);
02713     }
02714 }

Here is the call graph for this function:

void CBrowseFileView::OnBegindrag | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_BEGINDRAG notification handler.

Definition at line 2404 of file BrowseFileView.cpp.

References DoDrag().

02405 {
02406     DoDrag();
02407     *pResult = 0;
02408 }

Here is the call graph for this function:

void CBrowseFileView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo
 | ) | [protected, virtual]

OnBeginPrinting virtual override.

Definition at line 2113 of file BrowseFileView.cpp.

References m_heightOfLines, m_numberByPages, m_numberOfLines, and m_numberOfPages.

02114 {
02115     CListView::OnBeginPrinting(pDC, pInfo);
02116
02117     int nPageHeight = pDC->GetDeviceCaps(VERTRES);
02118     TEXTMETRIC tm;
02119     pDC->GetTextMetrics(&tm);
02120
02121     // compute the bounds
02122     CListCtrl& ListCtrl = GetListCtrl();
02123     m_numberOfLines = ListCtrl.GetItemCount();
02124     m_heightOfLines = 2 * tm.tmHeight;
02125     m_numberByPages = nPageHeight / m_heightOfLines;
02126     m_numberOfPages = m_numberOfLines / m_numberByPages + 1;
02127
02128     pInfo->SetMaxPage(m_numberOfPages);
02129 }

void CBrowseFileView::OnBeginrdrag | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_BEGINRDRAG notification handler.

Definition at line 2411 of file BrowseFileView.cpp.

References DoDrag().

02412 {
02413     DoDrag();
02414     *pResult = 0;
02415 }

Here is the call graph for this function:

void CBrowseFileView::OnColumnclick | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_COLUMNCLICK notification handler, sort items.

Definition at line 1449 of file BrowseFileView.cpp.

References KiColumnModel::GetAt(), GetColumnModel(), KiColumn::IsDefaultAscending(), m_ascendant, m_sort, and Resort().

01450 {
01451     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01452     CListCtrl& ListCtrl = GetListCtrl();
01453
01454     if( pNMListView->iSubItem == m_sort )
01455     {
01456         m_ascendant = !m_ascendant;
01457     }
01458     else
01459     {
01460         m_ascendant = true;
01461         m_sort = pNMListView->iSubItem;
01462         KiColumnModel* model = GetColumnModel();
01463         m_ascendant = model->GetAt(m_sort)->IsDefaultAscending();
01464     }
01465
01466     Resort();
01467
01468     *pResult = 0;
01469 }

Here is the call graph for this function:

void CBrowseFileView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point
 | ) | [protected]

WM_CONTEXTMENU message handler, display the custom menu.

Definition at line 1791 of file BrowseFileView.cpp.

References DisableCommon(), GetCustomMenu(), and kCustomFilesMenu.

01792 {
01793     if( DisableCommon() )
01794     {
01795         return;
01796     }
01797
01798     CListCtrl& listCtrl = GetListCtrl();
01799     if( listCtrl.GetSelectedCount() > 0 )
01800     {
01801         // Try to find a selected and focused item
01802         int item = listCtrl.GetNextItem(-1, LVNI_SELECTED | LVNI_FOCUSED);
01803         if( item == -1 )
01804         {
01805             // Get the first selected item then
01806             item = listCtrl.GetNextItem(-1, LVNI_SELECTED);
01807         }
01808
01809         if( item > -1 )
01810         {
01811             // Set the track point in case it's not the mouse click
01812             if( -1 == point.x && -1 == point.y )
01813             {
01814                 // Get the icon's rectangle
01815                 CRect rectItem;
01816                 if( listCtrl.GetItemRect(item, &rectItem, LVIR_ICON) )
01817                 {
01818                     point = rectItem.CenterPoint();
01819                     ClientToScreen(&point);
01820                 }
01821             }
01822
01823             // Display the pop-up menu
01824             std::auto_ptr<CMenu> pCustomMenu(::GetCustomMenu(kCustomFilesMenu, this));
01825             if( pCustomMenu.get() )
01826             {
01827                 pCustomMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, this);
01828             }
01829         }
01830     }
01831 }

Here is the call graph for this function:

BOOL CBrowseFileView::OnCustomize ( UINT nID ) [protected]

WM_COMMAND message handler, customize menus.

Definition at line 1855 of file BrowseFileView.cpp.

References CustomizeMenus(), ID_CUST_FILES_MENU, kCustomBrowserMenu, and kCustomFilesMenu.

01856 {
01857     CustomizeMenus(nID == ID_CUST_FILES_MENU ? kCustomFilesMenu : kCustomBrowserMenu);
01858     return TRUE;
01859 }

Here is the call graph for this function:

void CBrowseFileView::OnDeleteallitems | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_DELETEALLITEMS notification handler, reset status bar text.

Definition at line 2778 of file BrowseFileView.cpp.

References CMainFrame::GetStatusBar().

02779 {
02780     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
02781
02782     CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
02783     if( pMainFrame )
02784     {
02785         CString strIdleString;
02786         strIdleString.LoadString(AFX_IDS_IDLEMESSAGE);
02787
02788         pMainFrame->GetStatusBar()->SetWindowText(strIdleString);
02789     }
02790
02791     *pResult = 0;
02792 }

Here is the call graph for this function:

void CBrowseFileView::OnDeleteitem | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_DELETEITEM notification handler.

Definition at line 2592 of file BrowseFileView.cpp.

References EntnodeData::UnRef().

02593 {
02594     NM_LISTVIEW* p = (NM_LISTVIEW*)pNMHDR;
02595     if( p->lParam )
02596     {
02597         EntnodeData* data = (EntnodeData*)(LPVOID)p->lParam;
02598         data->UnRef();
02599     }
02600
02601     *pResult = 0;
02602 }

Here is the call graph for this function:

void CBrowseFileView::OnDestroy ( ) [protected]

WM_DESTROY message handler, save settings, unregister change notifications and kill timers.

Definition at line 2418 of file BrowseFileView.cpp.

References NotificationManager::CheckOut(), CWincvsApp::GetFilterModel(), CWincvsApp::GetIgnoreModel(), CSortHeaderCtrl::GetNotificationManager(), KiFilterBase::GetNotificationManager(), CWincvsApp::GetRecursionModel(), m_ctrlHeader, m_isRecursive, m_uiFilechangeTimer, m_watch, NULL, SaveColumns(), and KoWatcher::SignalTerminate().

02419 {
02420     // Kill the timer
02421     if( m_uiFilechangeTimer )
02422     {
02423         KillTimer(m_uiFilechangeTimer);
02424     }
02425
02426     // Stop file watch
02427     if( m_watch )
02428     {
02429         m_watch->SignalTerminate();
02430         m_watch = NULL;
02431     }
02432
02433     // Save settings
02434     SaveColumns(m_isRecursive);
02435
02436     // Unregister notifications
02437     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
02438     {
02439         app->GetFilterModel()->GetNotificationManager()->CheckOut(this);
02440         app->GetRecursionModel()->GetNotificationManager()->CheckOut(this);
02441         app->GetIgnoreModel()->GetNotificationManager()->CheckOut(this);
02442     }
02443
02444     m_ctrlHeader.GetNotificationManager()->CheckOut(this);
02445
02446     CListView::OnDestroy();
02447 }

Here is the call graph for this function:

void CBrowseFileView::OnEditSelectAll ( ) [protected]

WM_COMMAND message handler, select all file items.

Definition at line 2646 of file BrowseFileView.cpp.

References ENT_FILE, and EntnodeData::GetType().

02647 {
02648     CListCtrl& ListCtrl = GetListCtrl();
02649
02650     for( int nIndex = 0; nIndex < ListCtrl.GetItemCount(); nIndex++ )
02651     {
02652         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nIndex);
02653         if( data->GetType() == ENT_FILE )
02654         {
02655             ListCtrl.SetItemState(nIndex, LVIS_SELECTED, LVIS_SELECTED);
02656         }
02657     }
02658
02659     if( ListCtrl.GetSelectedCount() )
02660     {
02661         ListCtrl.SetFocus();
02662     }
02663 }

Here is the call graph for this function:

LRESULT CBrowseFileView::OnFileChange | ( | WPARAM | ,
 |  | LPARAM |
 | ) | [protected]

KoWatcher::WM_FILECHANGE message handler, mark the files change.

Definition at line 2105 of file BrowseFileView.cpp.

References m_isFilesChange.

02106 {
02107     m_isFilesChange = true;
02108
02109     return 0;
02110 }

void CBrowseFileView::OnFilterBarChanged ( )

Notify the view that app's filtering has changed Definition at line 2575 of file BrowseFileView.cpp.

References GetColumnModel(), m_ctrlHeader, m_isResetViewPending, CMainFrame::SetFilterBarMask(), and WM_RESETVIEW.

Referenced by OnInitialUpdate().

02576 {
02577     if( !m_isResetViewPending )
02578     {
02579         m_isResetViewPending = true;
02580
02581         CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
02582         if( pMainFrame->GetSafeHwnd() )
02583         {
02584             pMainFrame->SetFilterBarMask(m_ctrlHeader, GetColumnModel());
02585         }
02586
02587         PostMessage(WM_RESETVIEW);
02588     }
02589 }

Here is the call graph for this function:

void CBrowseFileView::OnFilteringChanged ( )

Notify the view that app's filtering has changed Definition at line 2563 of file BrowseFileView.cpp.

References m_isResetViewPending, and WM_RESETVIEW.

Referenced by OnInitialUpdate().

02564 {
02565     if( !m_isResetViewPending )
02566     {
02567         m_isResetViewPending = true;
02568         PostMessage(WM_RESETVIEW);
02569     }
02570 }

void CBrowseFileView::OnInitialUpdate ( ) [protected, virtual]

OnInitialUpdate virtual override, initialize list control and start the refresh timer.

Definition at line 630 of file BrowseFileView.cpp.

References AddColumns(), NotificationManager::CheckIn(), cvs_err(), CSortHeaderCtrl::EnableHeaderFilters(), FILECHANGE_TIMER, CWincvsApp::GetFilterModel(), CWincvsApp::GetIgnoreModel(), KiFilterBase::GetNotificationManager(), CSortHeaderCtrl::GetNotificationManager(), CWincvsApp::GetRecursionModel(), gFileViewFilterMasksReactionSpeed, IDB_SMALLICONS, IDR_STATEICONS, CMainFrame::IsFilterMasksEnable(), KoFileViewTraversalContext::IsRecursive(), LoadColumns(), m_ctrlHeader, m_smallImageList, m_stateImageList, m_uiFilechangeTimer, OnFilterBarChanged(), OnFilteringChanged(), CSortHeaderCtrl::SetFilterChangeTimeout(), SetListCtrlExtendedStyle(), and SetRecursive().

00631 {
00632     CListView::OnInitialUpdate();
00633
00634     CListCtrl& ListCtrl = GetListCtrl();
00635
00636     // Replace standard header with sort header
00637     if( HWND hWnd = ListView_GetHeader(ListCtrl.m_hWnd) )
00638     {
00639         m_ctrlHeader.SubclassWindow(hWnd);
00640
00641         CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
00642         if( pMainFrame->GetSafeHwnd() )
00643         {
00644             m_ctrlHeader.EnableHeaderFilters(pMainFrame->IsFilterMasksEnable());
00645             m_ctrlHeader.SetFilterChangeTimeout(gFileViewFilterMasksReactionSpeed);
00646         }
00647
00648         m_ctrlHeader.GetNotificationManager()->CheckIn(this, ::OnFilterBarChanged);
00649     }
00650
00651     SetListCtrlExtendedStyle(&ListCtrl, LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP | LVS_EX_LABELTIP);
00652
00653     // Set image lists
00654     if( !m_smallImageList.m_hImageList )
00655         m_smallImageList.Create(IDB_SMALLICONS, 16, 1, RGB(255, 255, 255));
00656
00657     if( !m_stateImageList.m_hImageList )
00658         m_stateImageList.Create(IDR_STATEICONS, 16, 1, RGB(255, 0, 0));
00659
00660     ListCtrl.SetImageList(&m_smallImageList, LVSIL_SMALL);
00661     ListCtrl.SetImageList(&m_stateImageList, LVSIL_STATE);
00662
00663     KoFileViewTraversalContext context(this);
00664     SetRecursive(context.IsRecursive());
00665
00666     AddColumns();
00667
00668     LoadColumns(context.IsRecursive());
00669
00670     // Register for notifications on filter change
00671     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
00672     {
00673         app->GetFilterModel()->GetNotificationManager()->CheckIn(this, ::OnFilteringChanged);
00674         app->GetRecursionModel()->GetNotificationManager()->CheckIn(this, ::OnFilteringChanged);
00675         app->GetIgnoreModel()->GetNotificationManager()->CheckIn(this, ::OnFilteringChanged);
00676     }
00677
00678     m_uiFilechangeTimer = SetTimer(FILECHANGE_TIMER, 200, 0L);
00679     if( 0L == m_uiFilechangeTimer )
00680     {
00681         cvs_err("Can't start the file change notification timer.\n");
00682     }
00683 }

Here is the call graph for this function:

void CBrowseFileView::OnItemchanged | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_ITEMCHANGED notification handler, report selected items.

Definition at line 2752 of file BrowseFileView.cpp.

References CStr, and CMainFrame::GetStatusBar().

02753 {
02754     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
02755
02756     if( pNMListView->uChanged & LVIF_STATE &&
02757         (pNMListView->uNewState & LVIS_SELECTED || pNMListView->uOldState & LVIS_SELECTED) )
02758     {
02759         CStr str;
02760
02761         const UINT cnt = GetListCtrl().GetSelectedCount();
02762         if( cnt > 0 )
02763         {
02764             str << (int)cnt << (cnt == 1 ? " object " : " objects") << " selected";
02765         }
02766
02767         CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
02768         if( pMainFrame )
02769         {
02770             pMainFrame->GetStatusBar()->SetWindowText(str);
02771         }
02772     }
02773
02774     *pResult = 0;
02775 }

Here is the call graph for this function:

void CBrowseFileView::OnKeydown | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_KEYDOWN notification handler, handle selected keys.

Definition at line 1587 of file BrowseFileView.cpp.

References ENT_SUBDIR, EnterFolder(), EntnodeData::GetFullPathName(), EntnodeData::GetType(), CWincvsApp::IsCvsRunning(), OnViewUpone(), and ProcessSelectionCommand().

01588 {
01589     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01590     if( app->IsCvsRunning() )
01591         return;
01592
01593     CListCtrl& ListCtrl = GetListCtrl();
01594     LV_KEYDOWN* pLVKeyDow = (LV_KEYDOWN*)pNMHDR;
01595
01596     if( pLVKeyDow->wVKey == VK_BACK )
01597     {
01598         OnViewUpone();
01599     }
01600     else if( pLVKeyDow->wVKey == VK_RETURN && ListCtrl.GetSelectedCount() == 1 )
01601     {
01602         int nItem = -1;
01603         if( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01604         {
01605             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01606             if( data->GetType() == ENT_SUBDIR )
01607             {
01608                 UStr buf;
01609                 EnterFolder(data->GetFullPathName(buf));
01610             }
01611             else
01612             {
01613                 KoFileActionHandler handler;
01614                 ProcessSelectionCommand(&handler);
01615             }
01616         }
01617     }
01618
01619     *pResult = 0;
01620 }

Here is the call graph for this function:

void CBrowseFileView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

WM_LBUTTONDBLCLK message handler, edit the selection.

Definition at line 1149 of file BrowseFileView.cpp.

References ENT_SUBDIR, EnterFolder(), EntnodeData::GetFullPathName(), EntnodeData::GetType(), CWincvsApp::IsCvsRunning(), and ProcessSelectionCommand().

01150 {
01151     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01152     if( app->IsCvsRunning() )
01153         return;
01154
01155     CListCtrl& ListCtrl = GetListCtrl();
01156
01157     UINT pFlags;
01158     int nItem = ListCtrl.HitTest(point, &pFlags);
01159     if( nItem != -1 )
01160     {
01161         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01162         if( data->GetType() == ENT_SUBDIR )
01163         {
01164             UStr buf;
01165             EnterFolder(data->GetFullPathName(buf));
01166         }
01167         else
01168         {
01169             KoFileActionHandler handler;
01170             ProcessSelectionCommand(&handler);
01171         }
01172     }
01173
01174     CListView::OnLButtonDblClk(nFlags, point);
01175 }

Here is the call graph for this function:

BOOL CBrowseFileView::OnMacro ( UINT nID ) [protected]

WM_COMMAND message handler, call the macro on selection.

Definition at line 1868 of file BrowseFileView.cpp.

References PyDoPython(), and WINCMD_to_UCMD.

01869 {
01870     PyDoPython(WINCMD_to_UCMD(nID));
01871
01872     return 1;
01873 }

Here is the call graph for this function:

BOOL CBrowseFileView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

OnPreparePrinting virtual override.

Definition at line 2132 of file BrowseFileView.cpp.

02133 {
02134     BOOL res = DoPreparePrinting(pInfo);
02135     if( !res )
02136         return res;
02137
02138     return TRUE;
02139 }

void CBrowseFileView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo
 | ) | [protected, virtual]

OnPrint virtual override.

Definition at line 2142 of file BrowseFileView.cpp.

References KiColumnModel::GetAt(), GetColumnModel(), KiColumnModel::GetCount(), GetPath(), KiColumn::GetText(), kSpc, m_heightOfLines, and m_numberByPages.

02143 {
02144     if( !pDC->IsPrinting() )
02145         return;
02146
02147     // Now compute the first item to draw
02148     CListCtrl& ListCtrl = GetListCtrl();
02149     int nFirstItem = -1;
02150     int numToIgnore = m_numberByPages * (pInfo->m_nCurPage - 1);
02151
02152     while( numToIgnore-- && (nFirstItem = ListCtrl.GetNextItem(nFirstItem, LVNI_ALL)) != -1 )
02153     {
02154     }
02155
02156     TEXTMETRIC tm;
02157     pDC->GetTextMetrics(&tm);
02158
02159     int nItem = nFirstItem, n = 0;
02160     int horz = pInfo->m_rectDraw.Width();
02161     int vert = pInfo->m_rectDraw.Height();
02162
02163     // Measure for each column
02164     KiColumnModel* model = GetColumnModel();
02165     int columnCount = model->GetCount();
02166     std::vector<int> widths(columnCount, 0);
02167     int totalwidth = 0;
02168     int j;
02169
02170     KoColumnContext context(GetPath());
02171     while( n++ < m_numberByPages && (nItem = ListCtrl.GetNextItem(nItem, LVNI_ALL)) != -1 )
02172     {
02173         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02174         for(j = 0; j < columnCount; j++)
02175         {
02176             TCHAR buffer[256];
02177             model->GetAt(j)->GetText(&context, data, buffer, 256);
02178             int width = pDC->GetTextExtent(buffer, _tcslen(buffer)).cx + kSpc;
02179             widths[j] = max(widths[j], width);
02180         }
02181     }
02182
02183     for(j = 0; j < columnCount; j++)
02184     {
02185         totalwidth += widths[j];
02186     }
02187
02188     for(j = 0; j < columnCount; j++)
02189     {
02190         widths[j] += (horz - totalwidth) / columnCount;
02191     }
02192
02193     // Compute the margins
02194     for(j = columnCount - 1; j >= 0; j--)
02195     {
02196         int margin = 0;
02197         for(int i = j - 1; i >= 0; i--)
02198         {
02199             margin += widths[i];
02200         }
02201
02202         widths[j] = margin;
02203     }
02204
02205     // Now print
02206     nItem = nFirstItem;
02207     n = 0;
02208     CPoint off = pInfo->m_rectDraw.TopLeft();
02209
02210     while( n++ < m_numberByPages && (nItem = ListCtrl.GetNextItem(nItem, LVNI_ALL)) != -1 )
02211     {
02212         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02213         for(j = 0; j < columnCount; j++)
02214         {
02215             const char* info = (*data)[j];
02216             if( info == 0L )
02217                 continue;
02218
02219             CPoint where = off;
02220             where.x += widths[j];
02221             CString s(info);
02222             CRect r(0,0,0,0);
02223
02224             pDC->DrawText(s, -1, &r, DT_CALCRECT);
02225             r.OffsetRect(where);
02226
02227             pDC->DrawText(s, -1, &r, DT_CENTER);
02228         }
02229
02230         off += CPoint(0, m_heightOfLines);
02231     }
02232
02233     //CListView::OnPrint(pDC, pInfo);
02234 }

Here is the call graph for this function:

void CBrowseFileView::OnQueryProperties ( ) [protected]

WM_COMMAND message handler, show the selection properties.

Definition at line 2013 of file BrowseFileView.cpp.

References CStr, EntnodeData::GetFullPathName(), EntnodeData::IsMissing(), and LaunchProperties().

02014 {
02015     CListCtrl& listCtrl = GetListCtrl();
02016
02017     if( listCtrl.GetSelectedCount() )
02018     {
02019         int nItem = -1;
02020
02021         while( (nItem = listCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02022         {
02023             EntnodeData* data = (EntnodeData*)listCtrl.GetItemData(nItem);
02024             if( data->IsMissing() )
02025             {
02026                 continue;
02027             }
02028
02029             CStr path;
02030             data->GetFullPathName(path);
02031
02032             LaunchProperties(path.c_str());
02033         }
02034     }
02035 }

Here is the call graph for this function:

void CBrowseFileView::OnQueryShellactionDefault ( ) [protected]

WM_COMMAND message handler, launch default associated shell action.

Definition at line 2265 of file BrowseFileView.cpp.

References KoLaunchDefaultHandler, and ProcessSelectionCommand().

02266 {
02267     KoLaunchDefaultHandler handler;
02268     ProcessSelectionCommand(&handler);
02269 }

Here is the call graph for this function:

LRESULT CBrowseFileView::OnResetView | ( | WPARAM | ,
 |  | LPARAM |
 | ) | [protected]

WM_RESETVIEW message handler, reset view.

Definition at line 2605 of file BrowseFileView.cpp.

References NULL, and ResetView().

02606 {
02607     ResetView(false, NULL);
02608     return 0;
02609 }

Here is the call graph for this function:

BOOL CBrowseFileView::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message
 | ) | [protected]

WM_SETCURSOR message handler, set the hourglass cursor when cvs command is running.

Definition at line 2548 of file BrowseFileView.cpp.

References CWincvsApp::IsCvsRunning().

02549 {
02550     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
02551     if( app->IsCvsRunning() )
02552     {
02553         SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
02554         return TRUE;
02555     }
02556
02557     return CListView::OnSetCursor(pWnd, nHitTest, message);
02558 }

Here is the call graph for this function:

void CBrowseFileView::OnTimer ( UINT nIDEvent ) [protected]

WM_TIMER message handler, check for the file changes.

Definition at line 2063 of file BrowseFileView.cpp.

References GetEntriesModTime(), CWincvsApp::IsCvsRunning(), m_checkChanges, m_entriesLogMod, m_entriesMod, m_isFilesChange, m_uiFilechangeTimer, and ResetView().

02064 {
02065     if( nIDEvent == m_uiFilechangeTimer )
02066     {
02067         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
02068         if( !app->IsCvsRunning() )
02069         {
02070             // cvs command finished
02071             if( m_checkChanges )
02072             {
02073                 // Refresh the directory tree and file view
02074                 m_checkChanges = false;
02075                 ResetView(true);
02076
02077                 return;
02078             }
02079
02080             // file change
02081             if( m_isFilesChange )
02082             {
02083                 ResetView();
02084             }
02085
02086             // check if we need to reload
02087             time_t newEntriesMod = m_entriesMod;
02088             time_t newEntriesLogMod = m_entriesLogMod;
02089
02090             GetEntriesModTime(newEntriesMod, newEntriesLogMod);
02091
02092             if( m_entriesMod != newEntriesMod || m_entriesLogMod != newEntriesLogMod )
02093             {
02094                 ResetView();
02095             }
02096         }
02097
02098         return;
02099     }
02100
02101     CListView::OnTimer(nIDEvent);
02102 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateCustomize ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1862 of file BrowseFileView.cpp.

01863 {
01864     pCmdUI->Enable(TRUE);
01865 }

void CBrowseFileView::OnUpdateCvsCmd ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 2677 of file BrowseFileView.cpp.

References CWincvsApp::IsCvsRunning().

02678 {
02679     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
02680     pCmdUI->Enable(app->IsCvsRunning() ? FALSE : TRUE);
02681 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateMacro ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1876 of file BrowseFileView.cpp.

References DisableCommon(), PyAppendCache(), PyDoCmdUI(), PyIsUICacheValid(), and WINCMD_to_UCMD.

01877 {
01878     if( DisableCommon(false) )
01879     {
01880         pCmdUI->Enable(FALSE);
01881         return;
01882     }
01883
01884     // Fill the cache with current selection
01885     if( !PyIsUICacheValid() )
01886     {
01887         CListCtrl& ListCtrl = GetListCtrl();
01888         int nItem = -1;
01889         while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01890         {
01891             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01892             PyAppendCache(data);
01893         }
01894     }
01895
01896     UCmdUI ucmdui(WINCMD_to_UCMD(pCmdUI->m_nID));
01897     ucmdui.pCmdUI = pCmdUI;
01898     PyDoCmdUI(&ucmdui);
01899 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateQueryProperties ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 2038 of file BrowseFileView.cpp.

References EntnodeData::IsMissing().

02039 {
02040     bool enable = false;
02041
02042     CListCtrl& listCtrl = GetListCtrl();
02043
02044     if( listCtrl.GetSelectedCount() )
02045     {
02046         int nItem = -1;
02047
02048         while( (nItem = listCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02049         {
02050             EntnodeData* data = (EntnodeData*)listCtrl.GetItemData(nItem);
02051             if( !data->IsMissing() )
02052             {
02053                 enable = true;
02054                 break;
02055             }
02056         }
02057     }
02058
02059     pCmdUI->Enable(enable);
02060 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewAdd ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1231 of file BrowseFileView.cpp.

References CStr, DisableCommon(), ENT_FILE, EntnodeData::GetFolderPath(), EntnodeData::GetType(), EntnodeData::IsMissing(), EntnodeData::IsRemoved(), and EntnodeData::IsUnknown().

01232 {
01233     if( DisableCommon() )
01234     {
01235         pCmdUI->Enable(FALSE);
01236         return;
01237     }
01238
01239     CListCtrl& ListCtrl = GetListCtrl();
01240
01241     int nItem = -1;
01242     BOOL res = TRUE;
01243     int numFiles = 0;
01244     int numFolders = 0;
01245
01246     CStr strPath;
01247
01248     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01249     {
01250         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01251         if( !(data->IsUnknown() || (data->IsRemoved() && data->IsMissing())) )
01252         {
01253             res = FALSE;
01254             break;
01255         }
01256
01257         if( data->GetType() == ENT_FILE )
01258         {
01259             numFiles++;
01260
01261             if( strPath.empty() )
01262             {
01263                 strPath = data->GetFolderPath();
01264             }
01265             else
01266             {
01267                 if( strPath != data->GetFolderPath() )
01268                 {
01269                     res = FALSE;
01270                     break;
01271                 }
01272             }
01273         }
01274         else
01275         {
01276             numFolders++;
01277         }
01278
01279         if( (numFiles != 0 && numFolders != 0) || numFolders > 1 )
01280         {
01281             res = FALSE;
01282             break;
01283         }
01284     }
01285
01286     pCmdUI->Enable(res);
01287 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewAddB ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1290 of file BrowseFileView.cpp.

References CStr, DisableCommon(), ENT_FILE, EntnodeData::GetFolderPath(), EntnodeData::GetType(), EntnodeData::IsMissing(), EntnodeData::IsRemoved(), and EntnodeData::IsUnknown().

01291 {
01292     if( DisableCommon() )
01293     {
01294         pCmdUI->Enable(FALSE);
01295         return;
01296     }
01297
01298     CListCtrl& ListCtrl = GetListCtrl();
01299
01300     int nItem = -1;
01301     BOOL res = TRUE;
01302
01303     CStr strPath;
01304
01305     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01306     {
01307         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01308         if( data->GetType() == ENT_FILE )
01309         {
01310             if( strPath.empty() )
01311             {
01312                 strPath = data->GetFolderPath();
01313             }
01314             else
01315             {
01316                 if( strPath != data->GetFolderPath() )
01317                 {
01318                     res = FALSE;
01319                     break;
01320                 }
01321             }
01322         }
01323         else
01324         {
01325             res = FALSE;
01326             break;
01327         }
01328
01329         if( !(data->IsUnknown() || (data->IsRemoved() && data->IsMissing())) )
01330         {
01331             res = FALSE;
01332             break;
01333         }
01334     }
01335
01336     pCmdUI->Enable(res);
01337 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewAnnotate ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 2612 of file BrowseFileView.cpp.

References DisableCommon(), ENT_SUBDIR, EntnodeData::GetType(), and EntnodeData::IsUnknown().

02613 {
02614     if( DisableCommon() )
02615     {
02616         pCmdUI->Enable(FALSE);
02617         return;
02618     }
02619
02620     CListCtrl& ListCtrl = GetListCtrl();
02621
02622     int nItem = -1;
02623     BOOL res = TRUE;
02624
02625     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02626     {
02627         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02628         if( data->IsUnknown() || data->GetType() == ENT_SUBDIR )
02629         {
02630             res = FALSE;
02631             break;
02632         }
02633     }
02634
02635     pCmdUI->Enable(res);
02636 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewCheckout ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 2309 of file BrowseFileView.cpp.

References DisableCommon().

02310 {
02311     if( DisableCommon(false) )
02312     {
02313         pCmdUI->Enable(FALSE);
02314         return;
02315     }
02316
02317     pCmdUI->Enable(TRUE);
02318     pCmdUI->SetText("Chec&kout module...");
02319 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewEditseldef ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 2272 of file BrowseFileView.cpp.

References DisableCommon(), ENT_SUBDIR, EntnodeData::GetType(), and EntnodeData::IsMissing().

02273 {
02274     if( DisableCommon() )
02275     {
02276         pCmdUI->Enable(FALSE);
02277         return;
02278     }
02279
02280     CListCtrl& ListCtrl = GetListCtrl();
02281     int nItem = -1;
02282     BOOL res = TRUE;
02283
02284     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02285     {
02286         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02287         if( data->GetType() == ENT_SUBDIR || data->IsMissing() )
02288         {
02289             res = FALSE;
02290             break;
02291         }
02292     }
02293
02294     pCmdUI->Enable(res);
02295 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewExplore ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1946 of file BrowseFileView.cpp.

References DisableCommon(), EntnodeData::IsMissing(), and NULL.

01947 {
01948     if( DisableCommon() )
01949     {
01950         pCmdUI->Enable(FALSE);
01951         return;
01952     }
01953
01954     bool enable = false;
01955
01956     CListCtrl& listCtrl = GetListCtrl();
01957     int nItem = -1;
01958
01959     if( listCtrl.GetSelectedCount() )
01960     {
01961         while( (nItem = listCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01962         {
01963             EntnodeData* data = (EntnodeData*)listCtrl.GetItemData(nItem);
01964             if( !data->IsMissing() )
01965             {
01966                 enable = true;
01967                 break;
01968             }
01969         }
01970     }
01971     else
01972     {
01973         CWinApp* app = AfxGetApp();
01974         CWinCvsBrowser* browser = ((CWincvsApp*)app)->GetBrowserView();
01975
01976         enable = browser->GetTreeCtrl().GetRootItem() != NULL;
01977     }
01978
01979     pCmdUI->Enable(enable);
01980 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewFullRowDetails ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1121 of file BrowseFileView.cpp.

References GetViewType().

01122 {
01123     pCmdUI->SetCheck(GetViewType() == LVS_REPORT);
01124 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewGraph ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1380 of file BrowseFileView.cpp.

References DisableCommon(), ENT_SUBDIR, EntnodeData::GetType(), and EntnodeData::IsUnknown().

01381 {
01382     if( DisableCommon() )
01383     {
01384         pCmdUI->Enable(FALSE);
01385         return;
01386     }
01387
01388     CListCtrl& ListCtrl = GetListCtrl();
01389
01390     int nItem = -1;
01391     BOOL res = TRUE;
01392
01393     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01394     {
01395         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01396         if( data->IsUnknown() || data->GetType() == ENT_SUBDIR )
01397         {
01398             res = FALSE;
01399             break;
01400         }
01401     }
01402
01403     pCmdUI->Enable(res);
01404 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewImport ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 2333 of file BrowseFileView.cpp.

References DisableCommon().

02334 {
02335     if( DisableCommon(false) )
02336     {
02337         pCmdUI->Enable(FALSE);
02338         return;
02339     }
02340
02341     pCmdUI->Enable(TRUE);
02342     pCmdUI->SetText("&Import module...");
02343 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewList ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1115 of file BrowseFileView.cpp.

References GetViewType().

01116 {
01117     pCmdUI->SetCheck(GetViewType() == LVS_LIST);
01118 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewRelease ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1194 of file BrowseFileView.cpp.

References DisableCommon(), ENT_SUBDIR, EntnodeData::GetType(), and EntnodeData::IsUnknown().

01195 {
01196     if( DisableCommon() )
01197     {
01198         pCmdUI->Enable(FALSE);
01199         return;
01200     }
01201
01202     CListCtrl& ListCtrl = GetListCtrl();
01203
01204     int nItem = -1;
01205     BOOL res = TRUE;
01206     int numFiles = 0;
01207     int numFolders = 0;
01208
01209     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01210     {
01211         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01212         if( data->IsUnknown() || data->GetType() != ENT_SUBDIR )
01213         {
01214             res = FALSE;
01215             break;
01216         }
01217
01218         numFolders++;
01219
01220         if( numFolders > 1 )
01221         {
01222             res = FALSE;
01223             break;
01224         }
01225     }
01226
01227     pCmdUI->Enable(res);
01228 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewReload ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1574 of file BrowseFileView.cpp.

References CWincvsApp::IsCvsRunning().

01575 {
01576     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01577     pCmdUI->Enable(!app->IsCvsRunning());
01578 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewRmv ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1407 of file BrowseFileView.cpp.

References DisableCommon(), ENT_SUBDIR, EntnodeData::GetType(), EntnodeData::IsRemoved(), and EntnodeData::IsUnknown().

01408 {
01409     if( DisableCommon() )
01410     {
01411         pCmdUI->Enable(FALSE);
01412         return;
01413     }
01414
01415     CListCtrl& ListCtrl = GetListCtrl();
01416
01417     int nItem = -1;
01418     BOOL res = TRUE;
01419
01420     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01421     {
01422         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01423         if( data->IsUnknown() || data->IsRemoved() || data->GetType() == ENT_SUBDIR )
01424         {
01425             res = FALSE;
01426             break;
01427         }
01428     }
01429
01430     pCmdUI->Enable(res);
01431 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewSmallIcons ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1109 of file BrowseFileView.cpp.

References GetViewType().

01110 {
01111     pCmdUI->SetCheck(GetViewType() == LVS_SMALLICON);
01112 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewTrash ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1679 of file BrowseFileView.cpp.

References DisableCommon(), KoUpdateMoveToTrashHandler::IsEnabled(), and ProcessSelectionCommand().

01680 {
01681     bool enabled = !DisableCommon();
01682     if( enabled )
01683     {
01684         KoUpdateMoveToTrashHandler handler;
01685         ProcessSelectionCommand(&handler);
01686         enabled = handler.IsEnabled();
01687     }
01688
01689     pCmdUI->Enable(enabled);
01690 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewUpdate ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1340 of file BrowseFileView.cpp.

References DisableCommon(), ENT_FILE, EntnodeData::GetType(), and EntnodeData::IsUnknown().

01341 {
01342     if( DisableCommon() )
01343     {
01344         pCmdUI->Enable(FALSE);
01345         return;
01346     }
01347
01348     CListCtrl& ListCtrl = GetListCtrl();
01349
01350     int nItem = -1;
01351     BOOL res = TRUE;
01352     int numFiles = 0;
01353     int numFolders = 0;
01354
01355     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01356     {
01357         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01358         if( data->IsUnknown() )
01359         {
01360             res = FALSE;
01361             break;
01362         }
01363
01364         if( data->GetType() == ENT_FILE )
01365             numFiles++;
01366         else
01367             numFolders++;
01368
01369         if( (numFiles != 0 && numFolders != 0) || numFolders > 1 )
01370         {
01371             res = FALSE;
01372             break;
01373         }
01374     }
01375
01376     pCmdUI->Enable(res);
01377 }

Here is the call graph for this function:

void CBrowseFileView::OnUpdateViewUpone ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1665 of file BrowseFileView.cpp.

References CWincvsApp::GetRoot(), CWincvsApp::IsCvsRunning(), IsSamePath(), and m_path.

01666 {
01667     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01668     pCmdUI->Enable(!app->IsCvsRunning() && !IsSamePath(m_path, app->GetRoot()));
01669 }

Here is the call graph for this function:

void CBrowseFileView::OnViewAdd ( ) [protected]

WM_COMMAND message handler, cvs add selection.

Definition at line 1525 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01526 {
01527     KoAddHandler handler;
01528     ProcessSelectionCommand(&handler);
01529 }

Here is the call graph for this function:

void CBrowseFileView::OnViewAddb ( ) [protected]

WM_COMMAND message handler, cvs add -kb selection.

Definition at line 1532 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01533 {
01534     KoAddBinaryHandler handler;
01535     ProcessSelectionCommand(&handler);
01536 }

Here is the call graph for this function:

void CBrowseFileView::OnViewAddu ( ) [protected]

WM_COMMAND message handler, cvs add -ku selection.

Definition at line 1539 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01540 {
01541     KoAddUnicodeHandler handler;
01542     ProcessSelectionCommand(&handler);
01543 }

Here is the call graph for this function:

void CBrowseFileView::OnViewCheckout ( ) [protected]

WM_COMMAND message handler, cvs co.

Definition at line 2298 of file BrowseFileView.cpp.

References m_path, KoCheckoutHandler::OnFolder(), and ProcessSelectionCommand().

02299 {
02300     KoCheckoutHandler handler;
02301
02302     if( !ProcessSelectionCommand(&handler) )
02303     {
02304         handler.OnFolder(m_path);
02305     }
02306 }

Here is the call graph for this function:

void CBrowseFileView::OnViewCommit ( ) [protected]

WM_COMMAND message handler, cvs commit selection.

Definition at line 1546 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01547 {
01548     KoCommitHandler handler;
01549     ProcessSelectionCommand(&handler);
01550 }

Here is the call graph for this function:

void CBrowseFileView::OnViewDiff ( ) [protected]

WM_COMMAND message handler, [cvs] diff selection.

Definition at line 1693 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01694 {
01695     KoDiffHandler handler;
01696     ProcessSelectionCommand(&handler);
01697 }

Here is the call graph for this function:

void CBrowseFileView::OnViewEdit ( ) [protected]

WM_COMMAND message handler, cvs edit selection.

Definition at line 1742 of file BrowseFileView.cpp.

References KoEditHandler, and ProcessSelectionCommand().

01743 {
01744     KoEditHandler handler;
01745     ProcessSelectionCommand(&handler);
01746 }

Here is the call graph for this function:

void CBrowseFileView::OnViewEditors ( ) [protected]

WM_COMMAND message handler, cvs editors selection.

Definition at line 1784 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01785 {
01786     KoEditorsHandler handler;
01787     ProcessSelectionCommand(&handler);
01788 }

Here is the call graph for this function:

void CBrowseFileView::OnViewEditsel ( ) [protected]

WM_COMMAND message handler, edit selection.

Definition at line 2237 of file BrowseFileView.cpp.

References KoLaunchEditHandler, and ProcessSelectionCommand().

02238 {
02239     KoLaunchEditHandler handler;
02240     ProcessSelectionCommand(&handler);
02241 }

Here is the call graph for this function:

void CBrowseFileView::OnViewEditseldef ( ) [protected]

WM_COMMAND message handler, edit selection.

Definition at line 2244 of file BrowseFileView.cpp.

References KoLaunchDefaultEditHandler, and ProcessSelectionCommand().

02245 {
02246     KoLaunchDefaultEditHandler handler;
02247     ProcessSelectionCommand(&handler);
02248 }

Here is the call graph for this function:

void CBrowseFileView::OnViewExplore ( ) [protected]

WM_COMMAND message handler, explore the selection.

Definition at line 1902 of file BrowseFileView.cpp.

References ENT_SUBDIR, EntnodeData::GetFullPathName(), EntnodeData::GetType(), EntnodeData::IsMissing(), LaunchExplore(), m_path, and UStr::rtrim().

01903 {
01904     CListCtrl& ListCtrl = GetListCtrl();
01905     bool pathExplore = false;
01906
01907     if( ListCtrl.GetSelectedCount() )
01908     {
01909         int nItem = -1;
01910
01911         while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01912         {
01913             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01914             if( data->IsMissing() )
01915             {
01916                 continue;
01917             }
01918
01919             if( data->GetType() == ENT_SUBDIR )
01920             {
01921                 UStr path;
01922                 data->GetFullPathName(path);
01923
01924                 path.rtrim(kPathDelimiter);
01925
01926                 LaunchExplore(path);
01927             }
01928             else if( !pathExplore )
01929             {
01930                 pathExplore = true;
01931             }
01932         }
01933
01934         if( pathExplore )
01935         {
01936             LaunchExplore(m_path);
01937         }
01938     }
01939     else
01940     {
01941         LaunchExplore(m_path);
01942     }
01943 }

Here is the call graph for this function:

void CBrowseFileView::OnViewFilterbarClearall ( ) [protected]

WM_COMMAND message handler, clear all filter bar filters.

Definition at line 2731 of file BrowseFileView.cpp.

References m_ctrlHeader.

02732 {
02733     if( m_ctrlHeader.GetSafeHwnd() )
02734     {
02735         Header_ClearAllFilters(m_ctrlHeader.GetSafeHwnd());
02736     }
02737 }

void CBrowseFileView::OnViewFilterbarEnable ( ) [protected]

WM_COMMAND message handler, enable/disable filter bar.

Definition at line 2717 of file BrowseFileView.cpp.

References CSortHeaderCtrl::EnableHeaderFilters(), gFileViewFilterMasksReactionSpeed, CMainFrame::IsFilterMasksEnable(), m_ctrlHeader, CSortHeaderCtrl::SetFilterChangeTimeout(), CMainFrame::ToggleFilterMasksEnable(), and WM_RESETVIEW.

02718 {
02719     CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
02720     if( pMainFrame->GetSafeHwnd() )
02721     {
02722         pMainFrame->ToggleFilterMasksEnable();
02723         m_ctrlHeader.EnableHeaderFilters(pMainFrame->IsFilterMasksEnable());
02724         m_ctrlHeader.SetFilterChangeTimeout(gFileViewFilterMasksReactionSpeed);
02725     }
02726
02727     PostMessage(WM_RESETVIEW);
02728 }

Here is the call graph for this function:

void CBrowseFileView::OnViewFilterbarOptions ( ) [protected]

WM_COMMAND message handler, clear all filter bar filters.

Definition at line 2740 of file BrowseFileView.cpp.

References CompatGetFilterMaskOptions(), gFileViewFilterMasksReactionSpeed, m_ctrlHeader, and CSortHeaderCtrl::SetFilterChangeTimeout().

02741 {
02742     int reactionSpeed = gFileViewFilterMasksReactionSpeed;
02743
02744     if( CompatGetFilterMaskOptions(reactionSpeed) )
02745     {
02746         gFileViewFilterMasksReactionSpeed = reactionSpeed;
02747         m_ctrlHeader.SetFilterChangeTimeout(gFileViewFilterMasksReactionSpeed);
02748     }
02749 }

Here is the call graph for this function:

void CBrowseFileView::OnViewForceedit ( ) [protected]

WM_COMMAND message handler, cvs edit -f selection.

Definition at line 1756 of file BrowseFileView.cpp.

References KoForceEditHandler, and ProcessSelectionCommand().

01757 {
01758     KoForceEditHandler handler;
01759     ProcessSelectionCommand(&handler);
01760 }

Here is the call graph for this function:

void CBrowseFileView::OnViewFullRowDetails ( ) [protected]

Set the full row details view Definition at line 1102 of file BrowseFileView.cpp.

References GetViewType(), and SetViewType().

01103 {
01104     if( GetViewType() != LVS_REPORT )
01105         SetViewType(LVS_REPORT);
01106 }

Here is the call graph for this function:

void CBrowseFileView::OnViewGraph ( ) [protected]

WM_COMMAND message handler, graph selection.

Definition at line 1707 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01708 {
01709     KoGraphHandler handler;
01710     ProcessSelectionCommand(&handler);
01711 }

Here is the call graph for this function:

void CBrowseFileView::OnViewImport ( ) [protected]

WM_COMMAND message handler, cvs import selection.

Definition at line 2322 of file BrowseFileView.cpp.

References m_path, KoImportHandler::OnFolder(), and ProcessSelectionCommand().

02323 {
02324     KoImportHandler handler;
02325
02326     if( !ProcessSelectionCommand(&handler) )
02327     {
02328         handler.OnFolder(m_path);
02329     }
02330 }

Here is the call graph for this function:

void CBrowseFileView::OnViewList ( ) [protected]

Set the list view Definition at line 1093 of file BrowseFileView.cpp.

References GetViewType(), and SetViewType().

01094 {
01095     if( GetViewType() != LVS_LIST )
01096         SetViewType(LVS_LIST);
01097 }

Here is the call graph for this function:

void CBrowseFileView::OnViewLog ( ) [protected]

WM_COMMAND message handler, cvs log selection.

Definition at line 1700 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01701 {
01702     KoLogHandler handler;
01703     ProcessSelectionCommand(&handler);
01704 }

Here is the call graph for this function:

void CBrowseFileView::OnViewNewInstance ( ) [protected]

WM_COMMAND message handler, open the selection in new instance.

Definition at line 1984 of file BrowseFileView.cpp.

References EntnodeData::GetFullPathName(), EntnodeData::IsMissing(), LaunchNewInst(), and m_path.

01985 {
01986     CListCtrl& ListCtrl = GetListCtrl();
01987
01988     if( ListCtrl.GetSelectedCount() )
01989     {
01990         int nItem = -1;
01991
01992         while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01993         {
01994             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01995             if( data->IsMissing() )
01996             {
01997                 continue;
01998             }
01999
02000             UStr path;
02001             data->GetFullPathName(path);
02002
02003             LaunchNewInst(path);
02004         }
02005     }
02006     else
02007     {
02008         LaunchNewInst(m_path);
02009     }
02010 }

Here is the call graph for this function:

void CBrowseFileView::OnViewOpensel ( ) [protected]

WM_COMMAND message handler, open selection.

Definition at line 2251 of file BrowseFileView.cpp.

References KoLaunchOpenHandler, and ProcessSelectionCommand().

02252 {
02253     KoLaunchOpenHandler handler;
02254     ProcessSelectionCommand(&handler);
02255 }

Here is the call graph for this function:

void CBrowseFileView::OnViewOpenselas ( ) [protected]

WM_COMMAND message handler, open selection using Open With... dialog.

Definition at line 2258 of file BrowseFileView.cpp.

References KoLaunchOpenAsHandler, and ProcessSelectionCommand().

02259 {
02260     KoLaunchOpenAsHandler handler;
02261     ProcessSelectionCommand(&handler);
02262 }

Here is the call graph for this function:

void CBrowseFileView::OnViewQueryUpdate ( ) [protected]

WM_COMMAND message handler, cvs -n update selection.

Definition at line 1567 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01568 {
01569     KoQueryUpdateHandler handler;
01570     ProcessSelectionCommand(&handler);
01571 }

Here is the call graph for this function:

void CBrowseFileView::OnViewRelease ( ) [protected]

WM_COMMAND message handler, cvs release selection.

Definition at line 1770 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01771 {
01772     KoReleaseHandler handler;
01773     ProcessSelectionCommand(&handler);
01774 }

Here is the call graph for this function:

void CBrowseFileView::OnViewReload ( ) [protected]

WM_COMMAND message handler, refresh view.

Definition at line 1581 of file BrowseFileView.cpp.

References ResetView().

01582 {
01583     ResetView(true);
01584 }

Here is the call graph for this function:

void CBrowseFileView::OnViewReservededit ( ) [protected]

WM_COMMAND message handler, cvs edit -c selection.

Definition at line 1749 of file BrowseFileView.cpp.

References KoReservedEditHandler, and ProcessSelectionCommand().

01750 {
01751     KoReservedEditHandler handler;
01752     ProcessSelectionCommand(&handler);
01753 }

Here is the call graph for this function:

void CBrowseFileView::OnViewRmv ( ) [protected]

WM_COMMAND message handler, cvs remove selection.

Definition at line 1553 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01554 {
01555     KoFileRemoveHandler handler;
01556     ProcessSelectionCommand(&handler);
01557 }

Here is the call graph for this function:

void CBrowseFileView::OnViewSmallIcons ( ) [protected]

Set the small icons view Definition at line 1084 of file BrowseFileView.cpp.

References GetViewType(), and SetViewType().

01085 {
01086     if( GetViewType() != LVS_SMALLICON )
01087         SetViewType(LVS_SMALLICON);
01088 }

Here is the call graph for this function:

void CBrowseFileView::OnViewStatus ( ) [protected]

WM_COMMAND message handler, cvs status selection.

Definition at line 1714 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01715 {
01716     KoStatusHandler handler;
01717     ProcessSelectionCommand(&handler);
01718 }

Here is the call graph for this function:

void CBrowseFileView::OnViewTagBranch ( ) [protected]

WM_COMMAND message handler, cvs tag -b selection.

Definition at line 1848 of file BrowseFileView.cpp.

References KoBranchTagHandler, and ProcessSelectionCommand().

01849 {
01850     KoBranchTagHandler handler;
01851     ProcessSelectionCommand(&handler);
01852 }

Here is the call graph for this function:

void CBrowseFileView::OnViewTagDelete ( ) [protected]

WM_COMMAND message handler, cvs tag -d selection.

Definition at line 1841 of file BrowseFileView.cpp.

References KoDeleteTagHandler, and ProcessSelectionCommand().

01842 {
01843     KoDeleteTagHandler handler;
01844     ProcessSelectionCommand(&handler);
01845 }

Here is the call graph for this function:

void CBrowseFileView::OnViewTagNew ( ) [protected]

WM_COMMAND message handler, cvs tag selection.

Definition at line 1834 of file BrowseFileView.cpp.

References KoCreateTagHandler, and ProcessSelectionCommand().

01835 {
01836     KoCreateTagHandler handler;
01837     ProcessSelectionCommand(&handler);
01838 }

Here is the call graph for this function:

void CBrowseFileView::OnViewTrash ( ) [protected]

WM_COMMAND message handler, move the selection to trash.

Definition at line 1672 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01673 {
01674     KoMoveToTrashHandler handler;
01675     ProcessSelectionCommand(&handler);
01676 }

Here is the call graph for this function:

void CBrowseFileView::OnViewUnedit ( ) [protected]

WM_COMMAND message handler, cvs unedit selection.

Definition at line 1763 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01764 {
01765     KoUneditHandler handler;
01766     ProcessSelectionCommand(&handler);
01767 }

Here is the call graph for this function:

void CBrowseFileView::OnViewUnlock ( ) [protected]

WM_COMMAND message handler, cvs admin -u selection.

Definition at line 1721 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01722 {
01723     KoUnlockHandler handler;
01724     ProcessSelectionCommand(&handler);
01725 }

Here is the call graph for this function:

void CBrowseFileView::OnViewUpdate ( ) [protected]

WM_COMMAND message handler, cvs update selection.

Definition at line 1560 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01561 {
01562     KoUpdateHandler handler;
01563     ProcessSelectionCommand(&handler);
01564 }

Here is the call graph for this function:

void CBrowseFileView::OnViewUpone ( ) [protected]

WM_COMMAND message handler, go up one directory level unless we are at the root already.

Definition at line 1648 of file BrowseFileView.cpp.

References CWincvsApp::GetRoot(), IsSamePath(), m_path, and ResetView().

Referenced by OnKeydown().

01649 {
01650     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01651     if( !IsSamePath(m_path, app->GetRoot()) && chdir(m_path) == 0 && chdir("..") == 0 )
01652     {
01653         char newpath[1024];
01654         getcwd(newpath, 1023);
01655
01656         ResetView(newpath, true);
01657     }
01658     else
01659     {
01660         MessageBeep(MB_ICONHAND);
01661     }
01662 }

Here is the call graph for this function:

void CBrowseFileView::OnViewWatchers ( ) [protected]

WM_COMMAND message handler, cvs watchers selection.

Definition at line 1777 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01778 {
01779     KoWatchersHandler handler;
01780     ProcessSelectionCommand(&handler);
01781 }

Here is the call graph for this function:

void CBrowseFileView::OnViewWatchOff ( ) [protected]

WM_COMMAND message handler, cvs watch remove selection.

Definition at line 1735 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01736 {
01737     KoWatchOffHandler handler;
01738     ProcessSelectionCommand(&handler);
01739 }

Here is the call graph for this function:

void CBrowseFileView::OnViewWatchOn ( ) [protected]

WM_COMMAND message handler, cvs watch add selection.

Definition at line 1728 of file BrowseFileView.cpp.

References ProcessSelectionCommand().

01729 {
01730     KoWatchOnHandler handler;
01731     ProcessSelectionCommand(&handler);
01732 }

Here is the call graph for this function:

BOOL CBrowseFileView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

PreCreateWindow virtual override, modify the window style.

Definition at line 539 of file BrowseFileView.cpp.

00540 {
00541     cs.style |= WS_TABSTOP | LVS_SHOWSELALWAYS | LVS_REPORT;
00542     cs.dwExStyle |= LVS_EX_FULLROWSELECT;
00543
00544     return CListView::PreCreateWindow(cs);
00545 }

bool CBrowseFileView::ProcessSelectionCommand ( KiSelectionHandler * handler ) [private]

Process the selection handler command

Parameters:
handler Command selection handler
Returns:
true if the command was processed, false otherwise
Definition at line 1476 of file BrowseFileView.cpp.

References ENT_SUBDIR, EntnodeData::GetFullPathName(), GetPath(), EntnodeData::GetType(), UStr::length(), MultiFiles::newdir(), MultiFiles::newfile(), KiSelectionHandler::OnFiles(), KiSelectionHandler::OnFolder(), and MultiFiles::TotalNumFiles().

Referenced by OnAnnotate(), OnAppCmdline(), OnAppRtagbranch(), OnAppRtagcreate(), OnAppRtagdelete(), OnKeydown(), OnLButtonDblClk(), OnQueryShellactionDefault(), OnUpdateViewTrash(), OnViewAdd(), OnViewAddb(), OnViewAddu(), OnViewCheckout(), OnViewCommit(), OnViewDiff(), OnViewEdit(), OnViewEditors(), OnViewEditsel(), OnViewEditseldef(), OnViewForceedit(), OnViewGraph(), OnViewImport(), OnViewLog(), OnViewOpensel(), OnViewOpenselas(), OnViewQueryUpdate(), OnViewRelease(), OnViewReservededit(), OnViewRmv(), OnViewStatus(), OnViewTagBranch(), OnViewTagDelete(), OnViewTagNew(), OnViewTrash(), OnViewUnedit(), OnViewUnlock(), OnViewUpdate(), OnViewWatchers(), OnViewWatchOff(), and OnViewWatchOn().

01477 {
01478     bool res = false;
01479
01480     CListCtrl& ListCtrl = GetListCtrl();
01481     int nItem = -1;
01482     int pathLen = GetPath().length();
01483
01484     MultiFiles mf;
01485
01486     // First add the folders
01487     mf.newdir(GetPath());
01488
01489     // Process selection
01490     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01491     {
01492         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01493         UStr buf;
01494         const char* fullpath = data->GetFullPathName(buf);
01495
01496         if( data->GetType() == ENT_SUBDIR )
01497         {
01498             handler->OnFolder(fullpath);
01499             res = true;
01500
01501             break;
01502         }
01503         else
01504         {
01505             const char* fn = data->GetFullPathName(buf) + pathLen;
01506             if( *fn == '\\' )
01507             {
01508                 fn++;
01509             }
01510
01511             mf.newfile(fn, 0, (*data)[EntnodeFile::kVN]);
01512         }
01513     }
01514
01515     if( mf.TotalNumFiles() != 0 )
01516     {
01517         handler->OnFiles(&mf);
01518         res = true;
01519     }
01520
01521     return res;
01522 }

Here is the call graph for this function:

void CBrowseFileView::ResetView | ( | const char * | path,
 |  | bool | notifyBrowser = false,
 |  | const char * | selectFile = 0L
 | ) |

Reset the view to the given path

Parameters:
path | Path to reset the view
notifyBrowser | true to notify the directories tree
selectFile | If specified place the selection on this file
Definition at line 1006 of file BrowseFileView.cpp.

References CSortHeaderCtrl::EnableHeaderFilters(), CWincvsApp::GetBrowserView(), CWincvsApp::GetDocument(), CMainFrame::GetStatusBar(), gFileViewFilterMasksReactionSpeed, CMainFrame::IsFilterMasksEnable(), m_ctrlHeader, m_path, ResetView(), CMainFrame::SetContext(), CSortHeaderCtrl::SetFilterChangeTimeout(), CWinCvsBrowser::StepToLocation(), and CCvsStatusBar::UpdatePathInfo().

01007 {
01008     m_path = path;
01009
01010     CWnd* pWnd = AfxGetMainWnd();
01011     if( pWnd )
01012     {
01013         CMainFrame* pMainFrame = (CMainFrame*)pWnd;
01014
01015         if( pMainFrame->GetSafeHwnd() )
01016         {
01017             KoColumnContext context(m_path);
01018
01019             // Update the column context
01020             pMainFrame->SetContext(&context);
01021
01022             // Update the filter bar display
01023             m_ctrlHeader.EnableHeaderFilters(pMainFrame->IsFilterMasksEnable());
01024             m_ctrlHeader.SetFilterChangeTimeout(gFileViewFilterMasksReactionSpeed);
01025
01026             // Update the Status bar
01027             CCvsStatusBar *pStatusBar = (CCvsStatusBar*)pMainFrame->GetStatusBar();
01028             pStatusBar->UpdatePathInfo(path);
01029         }
01030     }
01031
01032     ResetView(false, selectFile);
01033
01034     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01035     if( app )
01036     {
01037         app->GetDocument()->SetTitle(m_path);
01038
01039         if( notifyBrowser )
01040         {
01041             // Notify the dir tree
01042             app->GetBrowserView()->StepToLocation(path);
01043         }
01044     }
01045 }

Here is the call graph for this function:

void CBrowseFileView::ResetView | ( | bool | notifyBrowser = false,
 |  | const char * | selectFile = 0L
 | ) |

Reload and check for changes

Parameters:
notifyBrowser | true to notify the directories tree
selectFile | If specified place the selection on this file
Note:
Should not be called from another thread
Definition at line 765 of file BrowseFileView.cpp.

References CvsArgs::add(), AddColumns(), CvsArgs::Argc(), CvsArgs::Argv(), DeleteColumns(), ENT_SUBDIR, FileTraverse(), KiColumnModel::GetAt(), CWincvsApp::GetBrowserView(), GetColumnModel(), KiColumnModel::GetCount(), GetEntriesModTime(), CSortHeaderCtrl::GetFilterText(), EntnodeData::GetFullPathName(), EntnodeData::GetType(), KiColumnModel::GetType(), KoFileViewTraversalContext::IsRecursive(), kTraversal, LoadColumns(), m_ctrlHeader, m_entriesLogMod, m_entriesMod, m_filterBarFilters, m_isFilesChange, m_isRecursive, m_isResetViewLocked, m_isResetViewPending, m_path, m_sort, m_watch, NULL, CvsArgs::reset(), CWinCvsBrowser::ResetView(), Resort(), SaveColumns(), CMainFrame::SetFilterBarMask(), CSortHeaderCtrl::SetFilterText(), SetRecursive(), and KoWatcher::SignalStartWatch().

Referenced by EnterFolder(), CWincvsApp::InitInstance(), CWinCvsBrowser::NotifySelectionChange(), CMainFrame::OnDropFiles(), OnResetView(), CMyShellTree::OnSelchanged(), OnTimer(), OnViewReload(), OnViewUpone(), CWinCvsBrowser::ResetBrowser(), CWinCvsBrowser::ResetView(), ResetView(), and CGetPrefs_GLOBALS::StoreValues().

00766 {
00767     // No outstanding request to reset the view any more
00768     m_isResetViewPending = false;
00769
00770     if( m_isResetViewLocked )
00771     {
00772         // No recursion
00773         return;
00774     }
00775
00776     CRecursionLock recursionLock(m_isResetViewLocked);
00777
00778     CWndRedrawMngr redrawMngr(this);
00779
00780     // Reset dirty indicators
00781     m_isFilesChange = false;
00782     m_entriesMod = 0;
00783     m_entriesLogMod = 0;
00784
00785     GetEntriesModTime(m_entriesMod, m_entriesLogMod);
00786
00787     CWaitCursor doWait;
00788
00789     bool bPartialOK = true;
00790
00791     CListCtrl& ListCtrl = GetListCtrl();
00792
00793     // Get the selection to later try to restore it
00794     CvsArgs selection(false);
00795
00796     if( !selectFile )
00797     {
00798         int nItem = -1;
00799         UStr buf;
00800
00801         while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
00802         {
00803             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
00804             selection.add(data->GetFullPathName(buf));
00805         }
00806     }
00807
00808     // Delete all items
00809     VERIFY(ListCtrl.DeleteAllItems());
00810
00811     // Make sure columns are preserved after the flat/recursive mode switch
00812     KoFileViewTraversalContext context(this);
00813     if( (context.IsRecursive() && !m_isRecursive) || (!context.IsRecursive() && m_isRecursive) )
00814     {
00815         KiColumnModel* oldModel = GetColumnModel();
00816         const int oldCount = oldModel->GetCount();
00817
00818         // Preserve the sort column
00819         const KiColumn* oldColumn = (0 <= m_sort && m_sort < oldCount) ? oldModel->GetAt(m_sort) : NULL;
00820
00821         // Preserve any filter bar text
00822         for(int nIndex = 0; nIndex < oldCount; nIndex++)
00823         {
00824             const std::string filterText = m_ctrlHeader.GetFilterText(nIndex);
00825             const int filterType = oldModel->GetType(nIndex);
00826
00827             if( m_filterBarFilters.find(filterType) != m_filterBarFilters.end() )
00828             {
00829                 m_filterBarFilters.erase(filterType);
00830             }
00831
00832             if( !filterText.empty() )
00833             {
00834                 m_filterBarFilters.insert(std::make_pair(filterType, filterText));
00835             }
00836         }
00837
00838         // Save and delete columns
00839         SaveColumns(m_isRecursive);
00840         DeleteColumns();
00841
00842         // Add and load new columns
00843         SetRecursive(context.IsRecursive());
00844
00845         AddColumns();
00846         LoadColumns(m_isRecursive);
00847
00848         // Set the sort mark
00849         if( oldColumn == NULL )
00850         {
00851             m_sort = 0;
00852         }
00853         else
00854         {
00855             KiColumnModel* newModel = GetColumnModel();
00856             const int newCount = newModel->GetCount();
00857             int sort = -1;
00858
00859             for(int pos = 0; pos < newCount && sort == -1; pos++)
00860             {
00861                 if( newModel->GetAt(pos) == oldColumn )
00862                 {
00863                     sort = pos;
00864                     break;
00865                 }
00866             }
00867
00868             m_sort = (sort >= 0) ? sort : 0;
00869         }
00870
00871         // Set any preserved filter bar text
00872         if( !m_filterBarFilters.empty() )
00873         {
00874             KiColumnModel* newModel = GetColumnModel();
00875             const int newCount = newModel->GetCount();
00876
00877             for(std::map<int, std::string>::const_iterator i = m_filterBarFilters.begin(); i != m_filterBarFilters.end(); ++i)
00878             {
00879                 const int filterType = (*i).first;
00880
00881                 for(int pos = 0; pos < newCount; pos++)
00882                 {
00883                     if( filterType == newModel->GetType(pos) )
00884                     {
00885                         m_ctrlHeader.SetFilterText(pos, (*i).second.c_str());
00886                         break;
00887                     }
00888                 }
00889             }
00890
00891             CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
00892             if( pMainFrame->GetSafeHwnd() )
00893             {
00894                 pMainFrame->SetFilterBarMask(m_ctrlHeader, GetColumnModel());
00895             }
00896         }
00897     }
00898
00899     // Re-fetch all items
00900     TViewFill traverse(&context);
00901     kTraversal res = FileTraverse(m_path, traverse);
00902
00903     // Find the file for selection
00904     if( selectFile != 0L )
00905     {
00906         int count = ListCtrl.GetItemCount();
00907         for(int i = 0; i < count; i++)
00908         {
00909             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(i);
00910
00911             // Files only
00912             if( data->GetType() == ENT_SUBDIR )
00913                 continue;
00914
00915             UStr buf;
00916             const char* currentFile = data->GetFullPathName(buf);
00917             if( stricmp(selectFile, currentFile) == 0 )
00918             {
00919                 selection.reset(false); //we don't want any other selection
00920                 selection.add(currentFile);
00921
00922                 bPartialOK = FALSE;
00923                 break;
00924             }
00925         }
00926     }
00927
00928     Resort();
00929
00930     // Now restore the selection
00931     int argc = selection.Argc();
00932     char* const* argv = selection.Argv();
00933     bool isFirst = true;
00934     bool focusSet = false;
00935     int count = ListCtrl.GetItemCount();
00936
00937     // If there are no selections, then skip the looping
00938     if( argc )
00939     {
00940         for(int nItem = 0; nItem < count; nItem++)
00941         {
00942             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
00943
00944             UStr buf;
00945             const char* currentFile = data->GetFullPathName(buf);
00946
00947             for(int i = 0; i < argc; i++)
00948             {
00949                 const char* fn = argv[i];
00950                 if( stricmp(fn, currentFile) == 0 )
00951                 {
00952                     VERIFY(ListCtrl.SetItemState(nItem, LVIS_SELECTED, LVIS_SELECTED));
00953                     if( isFirst )
00954                     {
00955                         isFirst = false;
00956                         if( !bPartialOK )
00957                         {
00958                             // Move to the bottom first, so the selection will be on top
00959                             ListCtrl.EnsureVisible(ListCtrl.GetItemCount()-1 , bPartialOK);
00960                         }
00961
00962                         // Make sure the first selected file is visible
00963                         VERIFY(ListCtrl.EnsureVisible(nItem, bPartialOK/*TRUE*/));
00964                         VERIFY(focusSet = (ListCtrl.SetItemState(nItem, LVIS_FOCUSED, LVIS_FOCUSED) !=0 ));
00965                     }
00966
00967                     break;
00968                 }
00969             }
00970         }
00971     }
00972
00973     if( !focusSet && ListCtrl.GetItemCount() )
00974     {
00975         VERIFY(focusSet = (ListCtrl.SetItemState(0, LVIS_FOCUSED, LVIS_FOCUSED) !=0 ));
00976     }
00977
00978     if( notifyBrowser )
00979     {
00980         // Notify the tree
00981         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00982         if( app )
00983         {
00984             app->GetBrowserView()->ResetView(true);
00985         }
00986     }
00987
00988     // Start monitoring file changes
00989     if( !m_watch )
00990     {
00991         m_watch = new KoWatcher(m_hWnd);
00992     }
00993
00994     m_watch->SignalStartWatch(m_path, m_isRecursive);
00995
00996     // FIXME -> temporary fix for PWD problems
00997     chdir(m_path);
00998 }

Here is the call graph for this function:

void CBrowseFileView::Resort ( void ) [private]

Resort according to the current key Definition at line 1436 of file BrowseFileView.cpp.

References _Compare(), KiColumnModel::GetAt(), GetColumnModel(), GetPath(), m_ascendant, m_ctrlHeader, m_sort, and CSortHeaderCtrl::SetSortImage().

Referenced by OnColumnclick(), and ResetView().

01437 {
01438     CListCtrl& ListCtrl = GetListCtrl();
01439     KoColumnContext context(GetPath());
01440     KiColumnModel* model = GetColumnModel();
01441
01442     CSortParam sortParam(m_ascendant, true, model->GetAt(m_sort), model->GetAt(0), &context);
01443     m_ctrlHeader.SetSortImage(m_sort, m_ascendant);
01444
01445     ListCtrl.SortItems(_Compare, (LPARAM)&sortParam);
01446 }

Here is the call graph for this function:

void CBrowseFileView::SaveColumns ( bool isRecursive ) [private]

Save column state

Parameters:
isRecursive Recursive state
Definition at line 2463 of file BrowseFileView.cpp.

References CHR_FILEDETAILVIEW_COLUMN_DATASEP, FormatEntrryPrefix(), m_ctrlHeader, STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER, STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH, and STR_FILEDETAILVIEW_COLUMN_SECTION.

Referenced by OnDestroy(), and ResetView().

02464 {
02465     const int columnCount = m_ctrlHeader.GetItemCount();
02466
02467     CString columnsWidth;
02468     CString columnsOrder;
02469
02470     CString strNum;
02471
02472     for(int nIndex = 0; nIndex < columnCount; nIndex++)
02473     {
02474         HDITEM headerItem = { 0 };
02475         headerItem.mask = HDI_WIDTH;
02476
02477         m_ctrlHeader.GetItem(nIndex, &headerItem);
02478
02479         strNum.Format("%d", headerItem.cxy);
02480         columnsWidth += strNum + CHR_FILEDETAILVIEW_COLUMN_DATASEP;
02481     }
02482
02483     int* orderArray = new int[columnCount];
02484
02485     if( orderArray && m_ctrlHeader.GetOrderArray(orderArray, columnCount) )
02486     {
02487         for(int nIndex = 0; nIndex < columnCount; nIndex++)
02488         {
02489             strNum.Format("%d", orderArray[nIndex]);
02490             columnsOrder += strNum + CHR_FILEDETAILVIEW_COLUMN_DATASEP;
02491         }
02492
02493         delete [] orderArray;
02494     }
02495
02496     AfxGetApp()->WriteProfileString(STR_FILEDETAILVIEW_COLUMN_SECTION,
02497         FormatEntrryPrefix(isRecursive) + STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH,
02498         columnsWidth);
02499
02500     AfxGetApp()->WriteProfileString(STR_FILEDETAILVIEW_COLUMN_SECTION,
02501         FormatEntrryPrefix(isRecursive) + STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER,
02502         columnsOrder);
02503 }

Here is the call graph for this function:

void CBrowseFileView::SetRecursive ( bool isRecursive ) [private]

Set the recursive flag and model

Parameters:
isRecursive New recursive state
Definition at line 623 of file BrowseFileView.cpp.

References KiColumnModel::GetRecursiveModel(), KiColumnModel::GetRegularModel(), m_isRecursive, and m_modelColumns.

Referenced by OnInitialUpdate(), and ResetView().

00624 {
00625     m_isRecursive = isRecursive;
00626     m_modelColumns = m_isRecursive ? KiColumnModel::GetRecursiveModel() : KiColumnModel::GetRegularModel();
00627 }

Here is the call graph for this function:

BOOL CBrowseFileView::SetViewType ( DWORD dwViewType ) [private]

Set the view type

Parameters:
dwViewType New view type
Returns:
TRUE on success, FALSE otherwise
Definition at line 1067 of file BrowseFileView.cpp.

Referenced by OnViewFullRowDetails(), OnViewList(), and OnViewSmallIcons().

01068 {
01069     return ModifyStyle(LVS_TYPEMASK, dwViewType & LVS_TYPEMASK);
01070 }

Member Data Documentation

bool CBrowseFileView::m_ascendant [private]

Sort flag Definition at line 306 of file BrowseFileView.h.

Referenced by OnColumnclick(), Resort(), and ~CBrowseFileView().

bool CBrowseFileView::m_checkChanges [private]

Flag to force checking the changes Definition at line 297 of file BrowseFileView.h.

Referenced by CheckChanges(), and OnTimer().

CSortHeaderCtrl CBrowseFileView::m_ctrlHeader [private]

Sort header control Definition at line 304 of file BrowseFileView.h.

Referenced by DeleteColumns(), LoadColumns(), OnDestroy(), OnFilterBarChanged(), OnInitialUpdate(), OnViewFilterbarClearall(), OnViewFilterbarEnable(), OnViewFilterbarOptions(), ResetView(), Resort(), and SaveColumns().

time_t CBrowseFileView::m_entriesLogMod [private]

CVS/Entries.log Definition at line 300 of file BrowseFileView.h.

Referenced by OnTimer(), and ResetView().

time_t CBrowseFileView::m_entriesMod [private]

Time stamp of CVS/Entries Definition at line 299 of file BrowseFileView.h.

Referenced by OnTimer(), and ResetView().

std::map<int, std::string> CBrowseFileView::m_filterBarFilters [private]

Cache of filter bar column filters text Definition at line 309 of file BrowseFileView.h.

Referenced by ResetView().

int CBrowseFileView::m_heightOfLines [private]

Height of lines (for printing) Definition at line 291 of file BrowseFileView.h.

Referenced by OnBeginPrinting(), and OnPrint().

bool CBrowseFileView::m_isFilesChange [private]

Flag to indicate whether a file change notification is pending Definition at line 301 of file BrowseFileView.h.

Referenced by OnFileChange(), OnTimer(), and ResetView().

bool CBrowseFileView::m_isRecursive [private]

true if displaying recursively Definition at line 293 of file BrowseFileView.h.

Referenced by OnDestroy(), ResetView(), and SetRecursive().

bool CBrowseFileView::m_isResetViewLocked [private]

Flag to lock out recursion into ResetView() Definition at line 294 of file BrowseFileView.h.

Referenced by ResetView().

bool CBrowseFileView::m_isResetViewPending [private]

Flag to indicate whether there is an outstanding request to refresh the view contents Definition at line 295 of file BrowseFileView.h.

Referenced by OnFilterBarChanged(), OnFilteringChanged(), and ResetView().

KiColumnModel* CBrowseFileView::m_modelColumns [private]

Columnar model in use Definition at line 308 of file BrowseFileView.h.

Referenced by GetColumnModel(), and SetRecursive().

int CBrowseFileView::m_numberByPages [private]

Number by pages (for printing) Definition at line 289 of file BrowseFileView.h.

Referenced by OnBeginPrinting(), and OnPrint().

int CBrowseFileView::m_numberOfLines [private]

Number of lines (for printing) Definition at line 288 of file BrowseFileView.h.

Referenced by OnBeginPrinting().

int CBrowseFileView::m_numberOfPages [private]

Number of pages (for printing) Definition at line 290 of file BrowseFileView.h.

Referenced by OnBeginPrinting().

UStr CBrowseFileView::m_path [private]

Current path Definition at line 286 of file BrowseFileView.h.

Referenced by GetEntriesModTime(), OnAppCmdline(), OnAppRtagbranch(), OnAppRtagcreate(), OnAppRtagdelete(), OnUpdateViewUpone(), OnViewCheckout(), OnViewExplore(), OnViewImport(), OnViewNewInstance(), OnViewUpone(), and ResetView().

CImageList CBrowseFileView::m_smallImageList [static, private]

File/folder image list Definition at line 392 of file BrowseFileView.cpp.

Referenced by OnInitialUpdate().

int CBrowseFileView::m_sort [private]

Sort key Definition at line 305 of file BrowseFileView.h.

Referenced by OnColumnclick(), ResetView(), Resort(), and ~CBrowseFileView().

CImageList CBrowseFileView::m_stateImageList [static, private]

File state image list Definition at line 393 of file BrowseFileView.cpp.

Referenced by OnInitialUpdate().

UINT CBrowseFileView::m_uiFilechangeTimer [private]

Stores the timer event for file's change notification, default to FILECHANGE_TIMER Definition at line 302 of file BrowseFileView.h.

Referenced by OnDestroy(), OnInitialUpdate(), and OnTimer().

KoWatcher* CBrowseFileView::m_watch [private]

Thread to monitor file change notifications Definition at line 298 of file BrowseFileView.h.

Referenced by OnDestroy(), and ResetView().

The documentation for this class was generated from the following files:
  • WinCvs/BrowseFileView.h
  • WinCvs/BrowseFileView.cpp
Generated on Sat Aug 7 22:48:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CBrowserBar Class Reference

CBrowserBar Class Reference

#include <BrowserBar.h>

Inheritance diagram for CBrowserBar:

[legend]
Collaboration diagram for CBrowserBar:

[legend]
List of all members.

Public Member Functions

virtual | ~CBrowserBar ()
CWinCvsBrowser * GetBrowserView ()
virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)

Protected Member Functions

CBrowserBar ()
virtual void | OnDraw (CDC *pDC)
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg void | OnDestroy ()
afx_msg void | OnPaint ()

Protected Attributes

CWinCvsBrowser * m_browser

Constructor & Destructor Documentation

CBrowserBar::~CBrowserBar ( ) [virtual]

Definition at line 43 of file BrowserBar.cpp.

00044 {
00045 }

CBrowserBar::CBrowserBar ( ) [protected]

Definition at line 39 of file BrowserBar.cpp.

00039                          : m_browser(0L)
00040 {
00041 }

Member Function Documentation

BOOL CBrowserBar::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL
 | ) | [virtual]

Definition at line 82 of file BrowserBar.cpp.

References CWinCvsBrowser::Create(), and m_browser.

00083 {
00084     BOOL res = CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
00085     if(!res)
00086         return FALSE;
00087
00088     m_browser = (CWinCvsBrowser *)RUNTIME_CLASS(CWinCvsBrowser)->CreateObject();
00089     VERIFY(m_browser->Create(0L, "", WS_CHILD | WS_VISIBLE | WS_TABSTOP, CRect(0,0,0,0), this, 0));
00090
00091     return TRUE;
00092 }

Here is the call graph for this function:

CWinCvsBrowser* CBrowserBar::GetBrowserView ( void ) [inline]

Definition at line 49 of file BrowserBar.h.

References m_browser.

Referenced by CMainFrame::GetBrowserView().

00049 { return m_browser; }

void CBrowserBar::OnDestroy ( ) [protected]

Definition at line 105 of file BrowserBar.cpp.

References m_browser.

00106 {
00107     if(m_browser)
00108         m_browser->DestroyWindow();
00109
00110     CView::OnDestroy();
00111 }

void CBrowserBar::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 77 of file BrowserBar.cpp.

00078 {
00079     CDocument* pDoc = GetDocument();
00080 }

void CBrowserBar::OnPaint ( ) [protected]

Definition at line 113 of file BrowserBar.cpp.

00114 {
00115     CPaintDC dc(this); // device context for painting
00116
00117     CRect r;
00118     GetClientRect(&r);
00119     CBrush brush(GetSysColor(COLOR_WINDOW));
00120     dc.FillRect(r, &brush);
00121 }

void CBrowserBar::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 94 of file BrowserBar.cpp.

References m_browser, and NULL.

00095 {
00096     CView::OnWindowPosChanged(wp);
00097
00098     //m_browser->SetWindowPos(NULL, wp->x, wp->y, wp->cx, wp->cy, SWP_NOZORDER);
00099     CRect r;
00100     GetClientRect(&r);
00101     if(m_browser != 0L)
00102         m_browser->SetWindowPos(NULL, r.left, r.top, r.Width(), r.Height(), SWP_NOZORDER);
00103 }

Member Data Documentation

CWinCvsBrowser* CBrowserBar::m_browser [protected]

Definition at line 67 of file BrowserBar.h.

Referenced by Create(), GetBrowserView(), OnDestroy(), and OnWindowPosChanged().

The documentation for this class was generated from the following files:
  • WinCvs/BrowserBar.h
  • WinCvs/BrowserBar.cpp
Generated on Sat Aug 7 22:48:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UBrush Class Reference

UBrush Class Reference

#include <udraw.h>

List of all members.

Public Member Functions

UBrush ()
~UBrush ()
bool | DeleteObject (void)
bool | CreateSolidBrush (UCOLORREF crColor)

Constructor & Destructor Documentation

UBrush::UBrush ( )

Definition at line 437 of file udraw.cpp.

00439     : m_set(false)
00440 #endif
00441 {
00442 }

UBrush::~UBrush ( )

Definition at line 444 of file udraw.cpp.

References DeleteObject().

00445 {
00446     DeleteObject();
00447 }

Here is the call graph for this function:

Member Function Documentation

bool UBrush::CreateSolidBrush ( UCOLORREF crColor )

Definition at line 469 of file udraw.cpp.

References DeleteObject(), UCOLORREF, UGetBValue, UGetGValue, and UGetRValue.

Referenced by DrawNode().

00470 {
00471     bool res = false;
00472
00473 #if qGTK
00474     DeleteObject();
00475     GdkColormap *cmap = gdk_colormap_get_system();
00476     if(cmap != 0L)
00477     {
00478         m_col.red = UGetRValue(crColor) << 8;
00479         m_col.green = UGetGValue(crColor) << 8;
00480         m_col.blue = UGetBValue(crColor) << 8;
00481         if(gdk_color_alloc(cmap, &m_col))
00482             m_set = true;
00483     }
00484     res = m_set;
00485 #endif
00486     return res;
00487 }

Here is the call graph for this function:

bool UBrush::DeleteObject ( void )

Definition at line 449 of file udraw.cpp.

Referenced by CreateSolidBrush(), DrawNode(), and ~UBrush().

00450 {
00451     bool res = false;
00452 #if qGTK
00453     if(m_set)
00454     {
00455         m_set = false;
00456         GdkColormap *cmap = gdk_colormap_get_system();
00457         if(cmap != 0L)
00458         {
00459             gdk_colormap_free_colors(cmap, &m_col, 1);
00460             res = true;
00461         }
00462     }
00463     else
00464         res = true;
00465 #endif
00466     return res;
00467 }

The documentation for this class was generated from the following files:
  • rf/udraw.h
  • rf/udraw.cpp
Generated on Sat Aug 7 22:48:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CBuffer Class Reference

CBuffer Class Reference

Collaboration diagram for CBuffer:

[legend]
List of all members.

Public Member Functions

CBuffer ()
void | append (const char *ptr, size_t s)
size_t | size () const
operator char * (void) const

Protected Attributes

size_t m_curSize
CStaticAllocT< char > | m_buf

Constructor & Destructor Documentation

CBuffer::CBuffer ( ) [inline]

Definition at line 505 of file PythonGlue.cpp.

References m_curSize.

00505               : m_curSize(0)
00506     {
00507     }

Member Function Documentation

void CBuffer::append | ( | const char * | ptr,
 |  | size_t | s
 | ) | [inline]

Definition at line 509 of file PythonGlue.cpp.

References CStaticAllocT< T >::AdjustSize(), m_buf, m_curSize, and CStaticAllocT< T >::size().

Referenced by CPyCvsConsole::cvs_err(), and CPyCvsConsole::cvs_out().

00510     {
00511         if((s + m_curSize) > m_buf.size())
00512         {
00513             size_t step = s > 1024 ? s : 1024;
00514             m_buf.AdjustSize(m_buf.size() + step);
00515         }
00516 #ifdef WIN32
00517         char *tmp = (char *)m_buf + m_curSize;
00518         size_t incs = 0;
00519         while(s--)
00520         {
00521             char c = *ptr++;
00522             if(c == '\r')
00523                 continue;
00524             *tmp++ = c;
00525             incs++;
00526         }
00527         m_curSize += incs;
00528 #elif defined(TARGET_OS_MAC)
00529         char *tmp = (char *)m_buf + m_curSize;
00530         size_t cnt = s;
00531         while(cnt--)
00532         {
00533             char c = *ptr++;
00534             if(c == '\r')
00535                 c = '\n';
00536             *tmp++ = c;
00537         }
00538         m_curSize += s;
00539 #else
00540         memcpy((char *)m_buf + m_curSize, ptr, s * sizeof(char));
00541         m_curSize += s;
00542 #endif
00543     }

Here is the call graph for this function:

CBuffer::operator char * ( void ) const [inline]

Definition at line 546 of file PythonGlue.cpp.

References m_buf.

00546 { return m_buf; }

size_t CBuffer::size ( ) const [inline]

Definition at line 545 of file PythonGlue.cpp.

References m_curSize.

Referenced by cvsgui_RunCvs().

00545 { return m_curSize; }

Member Data Documentation

CStaticAllocT<char> CBuffer::m_buf [protected]

Definition at line 550 of file PythonGlue.cpp.

Referenced by append(), and operator char *().

size_t CBuffer::m_curSize [protected]

Definition at line 549 of file PythonGlue.cpp.

Referenced by append(), CBuffer(), and size().

The documentation for this class was generated from the following file:
  • common/PythonGlue.cpp
Generated on Sat Aug 7 22:48:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CButton Class Reference

CButton Class Reference

Inheritance diagram for CButton:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJFlatButton.h
Generated on Sat Aug 7 22:48:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCharFormat Class Reference

CCharFormat Class Reference

Character format wrapper class. More...

#include <wincvsView.h>

Inheritance diagram for CCharFormat:

[legend]
Collaboration diagram for CCharFormat:

[legend]
List of all members.

Public Member Functions

CCharFormat ()
CCharFormat (const CHARFORMAT &newf)
operator CHARFORMAT & ()
WCHARFORMAT& operator.

Detailed Description

Character format wrapper class.

Definition at line 47 of file wincvsView.h.

Constructor & Destructor Documentation

CCharFormat::CCharFormat ( ) [inline]

Definition at line 51 of file wincvsView.h.

References WCHARFORMAT.

00052     {
00053         USES_CONVERSION;
00054
00055         CString strDefFont = _T("Courier New");
00056         //VERIFY(strDefFont.LoadString(IDS_DEFFONT));
00057
00058         cbSize = sizeof(WCHARFORMAT);
00059         dwMask = CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT | CFM_SIZE | CFM_COLOR | CFM_OFFSET | CFM_PROTECTED;
00060         dwEffects = CFE_AUTOCOLOR;
00061         yHeight = 200; //10pt
00062         yOffset = 0;
00063         crTextColor = RGB(0, 0, 0);
00064         bCharSet = 0;
00065         bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
00066
00067         ASSERT(strDefFont.GetLength() < LF_FACESIZE);
00068
00069         lstrcpynA(szFaceName, T2A((LPTSTR)(LPCTSTR)strDefFont), LF_FACESIZE);
00070         dwMask |= CFM_FACE;
00071     }

CCharFormat::CCharFormat ( const CHARFORMAT & newf ) [inline]

Definition at line 73 of file wincvsView.h.

References WCHARFORMAT.

00074     {
00075         *(WCHARFORMAT*)this = newf;
00076     }

Member Function Documentation

CCharFormat::operator CHARFORMAT & ( ) [inline]

WCHARFORMAT& operator.

Definition at line 82 of file wincvsView.h.

References WCHARFORMAT.

00083     {
00084         return *(WCHARFORMAT*)this;
00085     }

The documentation for this class was generated from the following file:
  • WinCvs/wincvsView.h
Generated on Sat Aug 7 22:48:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCheckout_MAIN Class Reference

CCheckout_MAIN Class Reference

Main checkout page. More...

#include <CheckoutDlg.h>

Inheritance diagram for CCheckout_MAIN:

[legend]
Collaboration diagram for CCheckout_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_CHECKOUT_MAIN }

Public Member Functions

CCheckout_MAIN (const MultiFiles *mf, const char *modname, const char *path, const bool dontShortenPaths, bool forceRoot, const char *cvsroot)
~CCheckout_MAIN ()

Public Attributes

CButton | m_selCvsrootButton
CButton | m_forceRootCheck
CSmartComboBox m_cvsrootCombo
CButton | m_dontShortenPathsCheck
CEdit | m_checkoutDirEdit
CButton | m_overrideCoDirCheck
CEdit | m_pathEdit
CSmartComboBox m_moduleCombo
CString | m_moduleName
CString | m_path
BOOL | m_noRecurse
BOOL | m_overrideCoDir
CString | m_checkoutDir
BOOL | m_dontShortenPaths
CString | m_cvsroot
BOOL | m_forceRoot
BOOL | m_export

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnBtnPath ()
BN_CLICKED message handler, browse for checkout directory.
afx_msg void | OnCheckOverridecheckoutdir ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnBrowseModules ()
BN_CLICKED message handler, browse for file/directory.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, setup autocomplete.
afx_msg void | OnForceroot ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnSelcvsroot ()
BN_CLICKED message handler, select CVSROOT.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf

Detailed Description

Main checkout page.

Definition at line 63 of file CheckoutDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 76 of file CheckoutDlg.h.
00076 { IDD = IDD_CHECKOUT_MAIN };

Constructor & Destructor Documentation

CCheckout_MAIN::CCheckout_MAIN | ( | const MultiFiles * | mf,
 |  | const char * | modname,
 |  | const char * | path,
 |  | const bool | dontShortenPaths,
 |  | bool | forceRoot,
 |  | const char * | cvsroot
 | ) |

Definition at line 116 of file CheckoutDlg.cpp.

References CWincvsApp::GetRoot(), gOldCvsroots, and gOldModules.

00119     : m_mf(mf), CHHelpPropertyPage(CCheckout_MAIN::IDD)
00120 {
00121     //{{AFX_DATA_INIT(CCheckout_MAIN)
00122     m_noRecurse = FALSE;
00123     m_overrideCoDir = FALSE;
00124     m_checkoutDir = _T("");
00125     m_dontShortenPaths = FALSE;
00126     m_cvsroot = cvsroot;
00127     m_forceRoot = forceRoot;
00128     m_export = FALSE;
00129     //}}AFX_DATA_INIT
00130
00131     m_moduleName = modname;
00132     m_path = path;
00133     if( m_path.IsEmpty() )
00134     {
00135         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00136         if( 0L != app )
00137             m_path = app->GetRoot();
00138     }
00139
00140     m_dontShortenPaths = dontShortenPaths;
00141
00142     m_moduleCombo.SetItems(&gOldModules);
00143     m_cvsrootCombo.SetItems(&gOldCvsroots);
00144 }

Here is the call graph for this function:

CCheckout_MAIN::~CCheckout_MAIN ( )

Definition at line 146 of file CheckoutDlg.cpp.

00147 {
00148 }

Member Function Documentation

void CCheckout_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 150 of file CheckoutDlg.cpp.

References DDV_CheckPathExists(), DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BROWSE_CVSROOT, IDC_CHECKOUT_DIR, IDC_CVSROOT, IDC_DONT_SHORTEN_PATHS, IDC_EXPORT, IDC_FORCE_CVSROOT, IDC_MODNAME, IDC_NORECURS, IDC_OVERRIDE_CHECKOUT_DIR, IDC_PATH, m_checkoutDir, m_checkoutDirEdit, m_cvsroot, m_cvsrootCombo, m_dontShortenPaths, m_dontShortenPathsCheck, m_export, m_forceRoot, m_forceRootCheck, m_moduleCombo, m_moduleName, m_noRecurse, m_overrideCoDir, m_overrideCoDirCheck, m_path, m_pathEdit, m_selCvsrootButton, and OnCheckOverridecheckoutdir().

00151 {
00152     CHHelpPropertyPage::DoDataExchange(pDX);
00153
00154     //{{AFX_DATA_MAP(CCheckout_MAIN)
00155     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00156     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00157     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00158     DDX_Control(pDX, IDC_DONT_SHORTEN_PATHS, m_dontShortenPathsCheck);
00159     DDX_Control(pDX, IDC_CHECKOUT_DIR, m_checkoutDirEdit);
00160     DDX_Control(pDX, IDC_OVERRIDE_CHECKOUT_DIR, m_overrideCoDirCheck);
00161     DDX_Control(pDX, IDC_PATH, m_pathEdit);
00162     DDX_Control(pDX, IDC_MODNAME, m_moduleCombo);
00163     DDX_Text(pDX, IDC_MODNAME, m_moduleName);
00164     DDX_Text(pDX, IDC_PATH, m_path);
00165     DDX_Check(pDX, IDC_NORECURS, m_noRecurse);
00166     DDX_Check(pDX, IDC_OVERRIDE_CHECKOUT_DIR, m_overrideCoDir);
00167     DDX_Text(pDX, IDC_CHECKOUT_DIR, m_checkoutDir);
00168     DDX_Check(pDX, IDC_DONT_SHORTEN_PATHS, m_dontShortenPaths);
00169     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00170     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00171     DDX_Check(pDX, IDC_EXPORT, m_export);
00172     //}}AFX_DATA_MAP
00173
00174     DDV_MinChars(pDX, m_moduleName, 1);
00175     DDX_ComboMString(pDX, IDC_MODNAME, m_moduleCombo);
00176     DDV_CheckPathExists(pDX, IDC_PATH, m_path);
00177
00178     if( !pDX->m_bSaveAndValidate )
00179     {
00180         //see if we are overriding the checkout directory
00181         OnCheckOverridecheckoutdir();
00182     }
00183
00184     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00185
00186     if( m_forceRoot )
00187     {
00188         DDV_MinChars(pDX, m_cvsroot, 1);
00189     }
00190
00191     if( !pDX->m_bSaveAndValidate )
00192     {
00193         m_selCvsrootButton.EnableWindow(m_forceRoot);
00194     }
00195 }

Here is the call graph for this function:

void CCheckout_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 225 of file CheckoutDlg.cpp.

References IDC_BROWSE_CVSROOT, IDC_BROWSE_MODNAME, IDC_BROWSE_PATH, IDC_CHECKOUT_DIR, IDC_CVSROOT, IDC_DONT_SHORTEN_PATHS, IDC_EXPORT, IDC_FORCE_CVSROOT, IDC_MODNAME, IDC_NORECURS, IDC_OVERRIDE_CHECKOUT_DIR, IDC_PATH, IDH_IDC_BROWSE_CVSROOT, IDH_IDC_BROWSE_MODNAME, IDH_IDC_BROWSE_PATH, IDH_IDC_CHECKOUT_DIR, IDH_IDC_CVSROOT, IDH_IDC_DONT_SHORTEN_PATHS, IDH_IDC_EXPORT, IDH_IDC_FORCE_CVSROOT, IDH_IDC_MODNAME, IDH_IDC_NORECURS, IDH_IDC_OVERRIDE_CHECKOUT_DIR, IDH_IDC_PATH, and CHHelpSupport::SetCtrlHelpID().

00226 {
00227     SetCtrlHelpID(IDC_MODNAME,                  IDH_IDC_MODNAME);
00228     SetCtrlHelpID(IDC_BROWSE_MODNAME,           IDH_IDC_BROWSE_MODNAME);
00229     SetCtrlHelpID(IDC_OVERRIDE_CHECKOUT_DIR,    IDH_IDC_OVERRIDE_CHECKOUT_DIR);
00230     SetCtrlHelpID(IDC_CHECKOUT_DIR,             IDH_IDC_CHECKOUT_DIR);
00231     SetCtrlHelpID(IDC_DONT_SHORTEN_PATHS,       IDH_IDC_DONT_SHORTEN_PATHS);
00232     SetCtrlHelpID(IDC_PATH,                     IDH_IDC_PATH);
00233     SetCtrlHelpID(IDC_BROWSE_PATH,              IDH_IDC_BROWSE_PATH);
00234     SetCtrlHelpID(IDC_FORCE_CVSROOT,            IDH_IDC_FORCE_CVSROOT);
00235     SetCtrlHelpID(IDC_CVSROOT,                  IDH_IDC_CVSROOT);
00236     SetCtrlHelpID(IDC_BROWSE_CVSROOT,           IDH_IDC_BROWSE_CVSROOT);
00237     SetCtrlHelpID(IDC_NORECURS,                 IDH_IDC_NORECURS);
00238     SetCtrlHelpID(IDC_EXPORT,                   IDH_IDC_EXPORT);
00239 }

Here is the call graph for this function:

void CCheckout_MAIN::OnBrowseModules ( ) [protected]

BN_CLICKED message handler, browse for file/directory.

Definition at line 281 of file CheckoutDlg.cpp.

References CompatGetModuleListItem(), CStr, m_mf, m_moduleCombo, and m_moduleName.

00282 {
00283     CStr moduleName;
00284     if( CompatGetModuleListItem(m_mf, moduleName) )
00285     {
00286         m_moduleName = (const char*)moduleName;
00287         m_moduleCombo.SetWindowText(m_moduleName);
00288     }
00289 }

Here is the call graph for this function:

void CCheckout_MAIN::OnBtnPath ( ) [protected]

BN_CLICKED message handler, browse for checkout directory.

Definition at line 242 of file CheckoutDlg.cpp.

References BrowserGetDirectory(), CStr, m_pathEdit, and NULL.

00243 {
00244     CString strPath;
00245     m_pathEdit.GetWindowText(strPath);
00246
00247     CStr path(strPath);
00248     if( BrowserGetDirectory("Select a directory to checkout to", path, IsWindow(m_hWnd) ? this : NULL) )
00249     {
00250         m_pathEdit.SetWindowText(path);
00251     }
00252 }

Here is the call graph for this function:

void CCheckout_MAIN::OnCheckOverridecheckoutdir ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 255 of file CheckoutDlg.cpp.

References CSmartComboBox::GetWindowText(), m_checkoutDirEdit, m_dontShortenPathsCheck, m_moduleCombo, and m_overrideCoDirCheck.

Referenced by DoDataExchange().

00256 {
00257     BOOL enableCheckoutDir = m_overrideCoDirCheck.GetCheck() != 0;
00258
00259     m_checkoutDirEdit.EnableWindow(enableCheckoutDir);
00260     m_dontShortenPathsCheck.EnableWindow(enableCheckoutDir);
00261
00262     if( enableCheckoutDir )
00263     {
00264         CString strCheckoutDir;
00265         m_checkoutDirEdit.GetWindowText(strCheckoutDir);
00266         if( strCheckoutDir.IsEmpty() )
00267         {
00268             CString strModuleName;
00269             m_moduleCombo.GetWindowText(strModuleName);
00270
00271             if( !strModuleName.IsEmpty() )
00272             {
00273                 m_checkoutDirEdit.SetWindowText(strModuleName);
00274                 GotoDlgCtrl(&m_checkoutDirEdit);
00275             }
00276         }
00277     }
00278 }

Here is the call graph for this function:

void CCheckout_MAIN::OnForceroot ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 292 of file CheckoutDlg.cpp.

References m_cvsrootCombo, m_forceRootCheck, and m_selCvsrootButton.

00293 {
00294     const BOOL enable = m_forceRootCheck.GetCheck();
00295
00296     m_selCvsrootButton.EnableWindow(enable);
00297     m_cvsrootCombo.EnableWindow(enable);
00298 }

BOOL CCheckout_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, setup autocomplete.

Reimplemented from CHHelpPropertyPage.

Definition at line 212 of file CheckoutDlg.cpp.

References EnableEditAutoComplete(), and CHHelpPropertyPage::OnInitDialog().

00213 {
00214     CHHelpPropertyPage::OnInitDialog();
00215
00216     // Extra initialization
00217     EnableEditAutoComplete(&m_pathEdit);
00218
00219     OnForceroot();
00220
00221     return TRUE;  // return TRUE unless you set the focus to a control
00222     // EXCEPTION: OCX Property Pages should return FALSE
00223 }

Here is the call graph for this function:

void CCheckout_MAIN::OnSelcvsroot ( ) [protected]

BN_CLICKED message handler, select CVSROOT.

Definition at line 301 of file CheckoutDlg.cpp.

References CompatGetCvsRoot(), CStr, CSmartComboBox::GetWindowText(), and m_cvsrootCombo.

00302 {
00303     CString strCvsroot;
00304     m_cvsrootCombo.GetWindowText(strCvsroot);
00305
00306     CStr cvsroot(strCvsroot);
00307     if( CompatGetCvsRoot(cvsroot) )
00308     {
00309         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00310     }
00311 }

Here is the call graph for this function:

Member Data Documentation

CString CCheckout_MAIN::m_checkoutDir

Definition at line 89 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), and DoDataExchange().

CEdit CCheckout_MAIN::m_checkoutDirEdit

Definition at line 81 of file CheckoutDlg.h.

Referenced by DoDataExchange(), and OnCheckOverridecheckoutdir().

CString CCheckout_MAIN::m_cvsroot

Definition at line 91 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), and DoDataExchange().

CSmartComboBox CCheckout_MAIN::m_cvsrootCombo

Definition at line 79 of file CheckoutDlg.h.

Referenced by DoDataExchange(), OnForceroot(), and OnSelcvsroot().

BOOL CCheckout_MAIN::m_dontShortenPaths

Definition at line 90 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), and DoDataExchange().

CButton CCheckout_MAIN::m_dontShortenPathsCheck

Definition at line 80 of file CheckoutDlg.h.

Referenced by DoDataExchange(), and OnCheckOverridecheckoutdir().

BOOL CCheckout_MAIN::m_export

Definition at line 93 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), and DoDataExchange().

BOOL CCheckout_MAIN::m_forceRoot

Definition at line 92 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), and DoDataExchange().

CButton CCheckout_MAIN::m_forceRootCheck

Definition at line 78 of file CheckoutDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

const MultiFiles* CCheckout_MAIN::m_mf [private]

Definition at line 118 of file CheckoutDlg.h.

Referenced by OnBrowseModules().

CSmartComboBox CCheckout_MAIN::m_moduleCombo

Definition at line 84 of file CheckoutDlg.h.

Referenced by DoDataExchange(), OnBrowseModules(), and OnCheckOverridecheckoutdir().

CString CCheckout_MAIN::m_moduleName

Definition at line 85 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), DoDataExchange(), and OnBrowseModules().

BOOL CCheckout_MAIN::m_noRecurse

Definition at line 87 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), and DoDataExchange().

BOOL CCheckout_MAIN::m_overrideCoDir

Definition at line 88 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), and DoDataExchange().

CButton CCheckout_MAIN::m_overrideCoDirCheck

Definition at line 82 of file CheckoutDlg.h.

Referenced by DoDataExchange(), and OnCheckOverridecheckoutdir().

CString CCheckout_MAIN::m_path

Definition at line 86 of file CheckoutDlg.h.

Referenced by CompatGetCheckout(), and DoDataExchange().

CEdit CCheckout_MAIN::m_pathEdit

Definition at line 83 of file CheckoutDlg.h.

Referenced by DoDataExchange(), and OnBtnPath().

CButton CCheckout_MAIN::m_selCvsrootButton

Definition at line 77 of file CheckoutDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

The documentation for this class was generated from the following files:
  • common/CheckoutDlg.h
  • common/CheckoutDlg.cpp
Generated on Sat Aug 7 22:48:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJBrowseButton Class Reference

CCJBrowseButton Class Reference

#include <CJBrowseEdit.h>

Inheritance diagram for CCJBrowseButton:

[legend]
Collaboration diagram for CCJBrowseButton:

[legend]
List of all members.

Public Member Functions

CCJBrowseButton ()
virtual | ~CCJBrowseButton ()
virtual void | UpdateFont ()
virtual UINT | GetNextID (CWnd *pWnd) const
virtual BOOL | Create (CWnd *pWnd, BROWSE_TYPE eType, UINT nMenu, UINT nSubMenuIndx)

Public Attributes

BOOL | m_bOpenFileDialog
CString | m_strDefExt
CString | m_strFileName
DWORD | m_dwFlags
CString | m_strFilter
CString | m_strTitle
CWnd * | m_pParentWnd

Protected Member Functions

afx_msg void | OnClicked ()

Protected Attributes

UINT | m_nID
CWnd * | m_pEditWnd
CFont | m_Font
BROWSE_TYPE m_eType
UINT | m_nMenu
UINT | m_nSubMenuIndx
HICON | m_hIcon

Constructor & Destructor Documentation

CCJBrowseButton::CCJBrowseButton ( )

Definition at line 105 of file CJBrowseEdit.cpp.

References m_hIcon, m_pEditWnd, m_pParentWnd, and NULL.

00106 {
00107     m_pParentWnd = NULL;
00108     m_pEditWnd   = NULL;
00109     m_hIcon      = NULL;
00110 }

CCJBrowseButton::~CCJBrowseButton ( ) [virtual]

Definition at line 112 of file CJBrowseEdit.cpp.

References _destroyIcon, m_Font, and m_hIcon.

00113 {
00114     // fix potential resource leak - KStowell - 10-22-99.
00115     m_Font.DeleteObject();
00116     _destroyIcon(m_hIcon);
00117 }

Member Function Documentation

BOOL CCJBrowseButton::Create | ( | CWnd * | pWnd,
 |  | BROWSE_TYPE | eType,
 |  | UINT | nMenu,
 |  | UINT | nSubMenuIndx
 | ) | [virtual]

Definition at line 125 of file CJBrowseEdit.cpp.

References BT_DIRECTORY, BT_FILE, BT_POPUPMENU, IDB_BTN_ARROW, NULL, and SetIcon().

Referenced by CCJBrowseEdit::InitializeControl().

00126 {
00127     ASSERT( eType );
00128     ASSERT_VALID( pWnd );
00129     ASSERT_VALID( pWnd->GetParent() );
00130
00131     m_pEditWnd      = pWnd;
00132     m_pParentWnd    = m_pEditWnd->GetParent();
00133     m_eType         = eType;
00134     m_nMenu         = nMenu;
00135     m_nSubMenuIndx  = nSubMenuIndx;
00136
00137     CRect rc;
00138     m_pEditWnd->GetWindowRect( &rc );
00139     m_pEditWnd->SetWindowPos( NULL, 0, 0, rc.Width()-23, rc.Height(), SWP_NOZORDER|SWP_NOMOVE );
00140     m_pParentWnd->ScreenToClient( &rc );
00141     rc.left = rc.right-18;
00142
00143     DWORD dwStyle = WS_VISIBLE|WS_CHILD|WS_TABSTOP|BS_CENTER|BS_VCENTER;
00144
00145     // if this is a browse for directory or file edit control.
00146     if(( m_eType == BT_DIRECTORY ) || ( m_eType == BT_FILE ))
00147     {
00148         if( !CButton::Create(_T("..."), dwStyle, rc, m_pParentWnd, GetNextID( m_pParentWnd )))
00149         {
00150             TRACE0( "Failed to create browse edit browse button.\n" );
00151             return FALSE;
00152         }
00153
00154         // set the tab order and font, enable the window based on parent's state.
00155         SetWindowPos( m_pEditWnd, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );
00156         EnableWindow( m_pEditWnd->IsWindowEnabled( ));
00157         UpdateFont();
00158
00159         return TRUE;
00160     }
00161
00162     // if this is a popup menu edit control.
00163     else if( m_eType == BT_POPUPMENU )
00164     {
00165         if( !CButton::Create( NULL, dwStyle|BS_ICON, rc, m_pParentWnd, GetNextID( m_pParentWnd )))
00166         {
00167             TRACE0( "Failed to create browse edit browse button.\n" );
00168             return FALSE;
00169         }
00170
00171         // set the tab order and font, enable the window based on parent's state.
00172         SetWindowPos( m_pEditWnd, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );
00173         EnableWindow( m_pEditWnd->IsWindowEnabled( ));
00174         UpdateFont();
00175
00176         // create the icon arrow that is displayed on the button.
00177         CImageList imageList;
00178         CBitmap    bitmap;
00179
00180         bitmap.LoadBitmap( IDB_BTN_ARROW );
00181         imageList.Create( 15, 17, ILC_COLORDDB|ILC_MASK, 1, 1 );
00182         imageList.Add( &bitmap, RGB( 255,0,255 ));
00183
00184         // set the icon and free resources.
00185         // fix potential resource leak - KStowell - 10-22-99.
00186         m_hIcon = imageList.ExtractIcon( 0 );
00187         SetIcon(m_hIcon);
00188         imageList.Detach();
00189         bitmap.DeleteObject();
00190
00191         return TRUE;
00192     }
00193
00194     return FALSE;
00195 }

Here is the call graph for this function:

_CJXLIB_INLINE UINT CCJBrowseButton::GetNextID ( CWnd * pWnd ) const [virtual]

Definition at line 239 of file CJBrowseEdit.h.

References _CJXLIB_INLINE.

00240     { for(UINT nID=32767; nID!=1; --nID){if(!pWnd->GetDlgItem(nID)){return nID;}}return 0; }

void CCJBrowseButton::OnClicked ( ) [protected]

Definition at line 197 of file CJBrowseEdit.cpp.

References BT_DIRECTORY, BT_FILE, BT_POPUPMENU, m_bOpenFileDialog, m_dwFlags, m_eType, m_nMenu, m_nSubMenuIndx, m_pEditWnd, m_pParentWnd, m_strDefExt, m_strFileName, m_strFilter, m_strTitle, and NULL.

00198 {
00199     if( m_eType == BT_DIRECTORY )
00200     {
00201         CCJShell sfi;
00202         sfi.m_strTitle = m_strTitle;
00203
00204         if( sfi.BrowseForFolder( m_pParentWnd ) == IDOK ) {
00205             m_pEditWnd->SetWindowText( sfi.m_strPath );
00206         }
00207     }
00208
00209     else if( m_eType == BT_FILE )
00210     {
00211         CFileDialog dlg( m_bOpenFileDialog, m_strDefExt, m_strFileName,
00212             m_dwFlags, m_strFilter, m_pParentWnd );
00213
00214         if( dlg.DoModal() == IDOK ) {
00215             m_pEditWnd->SetWindowText( dlg.GetPathName( ));
00216         }
00217     }
00218
00219     else if( m_eType == BT_POPUPMENU )
00220     {
00221         ASSERT( m_nMenu != 0 );
00222         SetState( true );
00223
00224         CRect rc;
00225         GetWindowRect( &rc );
00226
00227         CMenu menu;
00228         VERIFY( menu.LoadMenu( m_nMenu ));
00229
00230         CCJMenu* pPopup = (CCJMenu*)menu.GetSubMenu( m_nSubMenuIndx );
00231         ASSERT( pPopup != NULL );
00232
00233         pPopup->TrackPopupMenu( TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_VERTICAL,
00234             rc.right, rc.top, m_pParentWnd, &rc );
00235
00236         // Return the button state to normal.
00237         SetState( false );
00238     }
00239 }

void CCJBrowseButton::UpdateFont ( ) [virtual]

Definition at line 241 of file CJBrowseEdit.cpp.

References m_Font.

00242 {
00243     m_Font.DeleteObject();
00244     NONCLIENTMETRICS ncm;
00245     ncm.cbSize = sizeof(ncm);
00246     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00247     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00248     SetFont(&m_Font);
00249 }

Member Data Documentation

BOOL CCJBrowseButton::m_bOpenFileDialog

Definition at line 97 of file CJBrowseEdit.h.

Referenced by OnClicked(), and CCJBrowseEdit::SetDlgOpenFile().

DWORD CCJBrowseButton::m_dwFlags

Definition at line 101 of file CJBrowseEdit.h.

Referenced by OnClicked(), and CCJBrowseEdit::SetDlgStyle().

BROWSE_TYPE CCJBrowseButton::m_eType [protected]

Definition at line 111 of file CJBrowseEdit.h.

Referenced by OnClicked().

CFont CCJBrowseButton::m_Font [protected]

Definition at line 110 of file CJBrowseEdit.h.

Referenced by UpdateFont(), and ~CCJBrowseButton().

HICON CCJBrowseButton::m_hIcon [protected]

Definition at line 114 of file CJBrowseEdit.h.

Referenced by CCJBrowseButton(), and ~CCJBrowseButton().

UINT CCJBrowseButton::m_nID [protected]

Definition at line 108 of file CJBrowseEdit.h.

UINT CCJBrowseButton::m_nMenu [protected]

Definition at line 112 of file CJBrowseEdit.h.

Referenced by OnClicked().

UINT CCJBrowseButton::m_nSubMenuIndx [protected]

Definition at line 113 of file CJBrowseEdit.h.

Referenced by OnClicked().

CWnd* CCJBrowseButton::m_pEditWnd [protected]

Definition at line 109 of file CJBrowseEdit.h.

Referenced by CCJBrowseButton(), and OnClicked().

CWnd* CCJBrowseButton::m_pParentWnd

Definition at line 104 of file CJBrowseEdit.h.

Referenced by CCJBrowseButton(), OnClicked(), and CCJBrowseEdit::SetDlgOwner().

CString CCJBrowseButton::m_strDefExt

Definition at line 99 of file CJBrowseEdit.h.

Referenced by OnClicked(), and CCJBrowseEdit::SetDlgDefExt().

CString CCJBrowseButton::m_strFileName

Definition at line 100 of file CJBrowseEdit.h.

Referenced by OnClicked(), and CCJBrowseEdit::SetDlgFileName().

CString CCJBrowseButton::m_strFilter

Definition at line 102 of file CJBrowseEdit.h.

Referenced by OnClicked(), and CCJBrowseEdit::SetDlgFilter().

CString CCJBrowseButton::m_strTitle

Definition at line 103 of file CJBrowseEdit.h.

Referenced by OnClicked(), and CCJBrowseEdit::SetDlgTitle().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJBrowseEdit.h
  • WinCvs/CJLib/CJLibrary/CJBrowseEdit.cpp
Generated on Sat Aug 7 22:48:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJBrowseEdit Class Reference

CCJBrowseEdit Class Reference

#include <CJBrowseEdit.h>

Inheritance diagram for CCJBrowseEdit:

[legend]
Collaboration diagram for CCJBrowseEdit:

[legend]
List of all members.

Public Member Functions

CCJBrowseEdit ()
virtual | ~CCJBrowseEdit ()
virtual void | InitializeControl ()
virtual void | SetDlgOpenFile (BOOL bOpenFileDialog)
virtual void | SetDlgDefExt (LPCTSTR strDefExt)
virtual void | SetDlgFileName (LPCTSTR strFileName)
virtual void | SetDlgStyle (DWORD dwFlags)
virtual void | SetDlgFilter (LPCTSTR strFilter)
virtual void | SetDlgOwner (CWnd *pParentWnd)
virtual void | SetDlgTitle (LPCTSTR strTitle)
virtual void | SetSearchType (BROWSE_TYPE eType, UINT nMenu=0, int nSubMenuIndx=0)

Protected Member Functions

virtual void | PreSubclassWindow ()
afx_msg void | OnEnable (BOOL bEnable)
afx_msg void | OnShowWindow (BOOL bShow, UINT nStatus)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Protected Attributes

CCJBrowseButton m_btnBrowse
BROWSE_TYPE m_eType
UINT | m_nMenu
UINT | m_nSubMenuIndx

Constructor & Destructor Documentation

CCJBrowseEdit::CCJBrowseEdit ( )

Definition at line 254 of file CJBrowseEdit.cpp.

References BT_DIRECTORY.

00254                              : m_eType( BT_DIRECTORY ), m_nMenu( (UINT)-1 )
00255 {
00256
00257 }

CCJBrowseEdit::~CCJBrowseEdit ( ) [virtual]

Definition at line 259 of file CJBrowseEdit.cpp.

00260 {
00261 }

Member Function Documentation

void CCJBrowseEdit::InitializeControl ( ) [virtual]

Definition at line 305 of file CJBrowseEdit.cpp.

References CCJBrowseButton::Create(), m_btnBrowse, m_eType, m_nMenu, m_nSubMenuIndx, SetDlgDefExt(), SetDlgFileName(), SetDlgFilter(), SetDlgOpenFile(), SetDlgOwner(), SetDlgStyle(), and SetDlgTitle().

Referenced by OnCreate(), and PreSubclassWindow().

00306 {
00307     // create the browse button associated with this control.
00308     if( m_btnBrowse.Create( this, m_eType, m_nMenu, m_nSubMenuIndx ))
00309     {
00310         // initialize some defaults
00311         SetDlgOpenFile();
00312         SetDlgDefExt( _T( "*.*" ));
00313         SetDlgFileName();
00314         SetDlgStyle( OFN_HIDEREADONLY|OFN_FILEMUSTEXIST|OFN_EXPLORER );
00315         SetDlgFilter( _T( "All Files (*.*)|*.*||" ));
00316         SetDlgOwner( GetParent( ));
00317         SetDlgTitle( _T( "Select Folder" ));
00318     }
00319 }

Here is the call graph for this function:

int CCJBrowseEdit::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 294 of file CJBrowseEdit.cpp.

References InitializeControl().

00295 {
00296     if (CEdit::OnCreate(lpCreateStruct) == -1)
00297         return -1;
00298
00299     // initialize control to defaults.
00300     InitializeControl();
00301
00302     return 0;
00303 }

Here is the call graph for this function:

void CCJBrowseEdit::OnEnable ( BOOL bEnable ) [protected]

Definition at line 274 of file CJBrowseEdit.cpp.

00275 {
00276     CEdit::OnEnable(bEnable);
00277     m_btnBrowse.EnableWindow(bEnable);
00278 }

void CCJBrowseEdit::OnShowWindow | ( | BOOL | bShow,
 |  | UINT | nStatus
 | ) | [protected]

Definition at line 280 of file CJBrowseEdit.cpp.

References m_btnBrowse.

00281 {
00282     CEdit::OnShowWindow( bShow, nStatus );
00283     m_btnBrowse.ShowWindow( bShow?SW_SHOW:SW_HIDE );
00284 }

void CCJBrowseEdit::PreSubclassWindow ( ) [protected, virtual]

Definition at line 286 of file CJBrowseEdit.cpp.

References InitializeControl().

00287 {
00288     CEdit::PreSubclassWindow();
00289
00290     // initialize control to defaults.
00291     InitializeControl();
00292 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJBrowseEdit::SetDlgDefExt ( LPCTSTR strDefExt ) [virtual]

Definition at line 245 of file CJBrowseEdit.h.

References _CJXLIB_INLINE, m_btnBrowse, and CCJBrowseButton::m_strDefExt.

Referenced by InitializeControl().

00246     { m_btnBrowse.m_strDefExt = strDefExt; }

_CJXLIB_INLINE void CCJBrowseEdit::SetDlgFileName ( LPCTSTR strFileName ) [virtual]

Definition at line 248 of file CJBrowseEdit.h.

References _CJXLIB_INLINE, m_btnBrowse, and CCJBrowseButton::m_strFileName.

Referenced by InitializeControl().

00249     { m_btnBrowse.m_strFileName = strFileName; }

_CJXLIB_INLINE void CCJBrowseEdit::SetDlgFilter ( LPCTSTR strFilter ) [virtual]

Definition at line 254 of file CJBrowseEdit.h.

References _CJXLIB_INLINE, m_btnBrowse, and CCJBrowseButton::m_strFilter.

Referenced by InitializeControl().

00255     { m_btnBrowse.m_strFilter = strFilter; }

_CJXLIB_INLINE void CCJBrowseEdit::SetDlgOpenFile ( BOOL bOpenFileDialog ) [virtual]

Definition at line 242 of file CJBrowseEdit.h.

References _CJXLIB_INLINE, CCJBrowseButton::m_bOpenFileDialog, and m_btnBrowse.

Referenced by InitializeControl().

00243     { m_btnBrowse.m_bOpenFileDialog = bOpenFileDialog; }

_CJXLIB_INLINE void CCJBrowseEdit::SetDlgOwner ( CWnd * pParentWnd ) [virtual]

Definition at line 257 of file CJBrowseEdit.h.

References _CJXLIB_INLINE, m_btnBrowse, and CCJBrowseButton::m_pParentWnd.

Referenced by InitializeControl().

00258     { m_btnBrowse.m_pParentWnd = pParentWnd; }

_CJXLIB_INLINE void CCJBrowseEdit::SetDlgStyle ( DWORD dwFlags ) [virtual]

Definition at line 251 of file CJBrowseEdit.h.

References _CJXLIB_INLINE, m_btnBrowse, and CCJBrowseButton::m_dwFlags.

Referenced by InitializeControl().

00252     { m_btnBrowse.m_dwFlags = dwFlags; }

_CJXLIB_INLINE void CCJBrowseEdit::SetDlgTitle ( LPCTSTR strTitle ) [virtual]

Definition at line 260 of file CJBrowseEdit.h.

References _CJXLIB_INLINE, m_btnBrowse, and CCJBrowseButton::m_strTitle.

Referenced by InitializeControl().

00261     { m_btnBrowse.m_strTitle = strTitle; }

_CJXLIB_INLINE void CCJBrowseEdit::SetSearchType | ( | BROWSE_TYPE | eType,
 |  | UINT | nMenu = 0,
 |  | int | nSubMenuIndx = 0
 | ) | [virtual]

Definition at line 263 of file CJBrowseEdit.h.

References _CJXLIB_INLINE, m_eType, m_nMenu, and m_nSubMenuIndx.

00264     { m_eType = eType; m_nMenu = nMenu; m_nSubMenuIndx = nSubMenuIndx; }

Member Data Documentation

CCJBrowseButton CCJBrowseEdit::m_btnBrowse [protected]

Definition at line 159 of file CJBrowseEdit.h.

Referenced by InitializeControl(), OnShowWindow(), SetDlgDefExt(), SetDlgFileName(), SetDlgFilter(), SetDlgOpenFile(), SetDlgOwner(), SetDlgStyle(), and SetDlgTitle().

BROWSE_TYPE CCJBrowseEdit::m_eType [protected]

Definition at line 160 of file CJBrowseEdit.h.

Referenced by InitializeControl(), and SetSearchType().

UINT CCJBrowseEdit::m_nMenu [protected]

Definition at line 161 of file CJBrowseEdit.h.

Referenced by InitializeControl(), and SetSearchType().

UINT CCJBrowseEdit::m_nSubMenuIndx [protected]

Definition at line 162 of file CJBrowseEdit.h.

Referenced by InitializeControl(), and SetSearchType().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJBrowseEdit.h
  • WinCvs/CJLib/CJLibrary/CJBrowseEdit.cpp
Generated on Sat Aug 7 22:48:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJCaption Class Reference

CCJCaption Class Reference

#include <CJCaption.h>

Inheritance diagram for CCJCaption:

[legend]
Collaboration diagram for CCJCaption:

[legend]
List of all members.

Public Member Functions

CCJCaption ()
virtual | ~CCJCaption ()
virtual void | SetCaptionColors (COLORREF clrBorder, COLORREF clrBackground, COLORREF clrFont)
virtual void | ModifyCaptionStyle (int nBorderSize, CFont *pFont=NULL, LPCTSTR lpszWindText=NULL, HICON hIcon=NULL)
virtual void | SetChildWindow (CWnd *pChild, CWnd *pNotifyWnd)
virtual void | KillChildWindow ()
virtual void | DrawCaptionBack (CDC *pDC, CRect &rcItem)
virtual void | DrawCaptionText (CDC *pDC, CRect &rcItem)
virtual void | DrawCaptionIcon (CDC *pDC, CRect &rcItem)
virtual void | UpdateFont ()
virtual void | UpdateCaption (LPCTSTR lpszWindowText, HICON hIcon)
virtual void | UpdateCaptionBack (CDC *pDC, CRect &rcItem)
virtual void | UpdateCaptionText (CDC *pDC, CRect &rcItem)
virtual void | SetTextStyle (DWORD dwStyle)
virtual BOOL | Create (CWnd *pParentWnd, LPCTSTR lpszWindowName, DWORD dwExStyle=0x01, DWORD dwStyle=WS_VISIBLE|SS_CENTER|SS_CENTERIMAGE, const CRect &rect=CRect(0, 0, 0, 0), UINT nID=0xffff)

Protected Member Functions

afx_msg void | OnPaint ()
afx_msg void | OnSysColorChange ()
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnCaptButton ()
afx_msg LRESULT | OnPushPinButton (UINT lParam, LONG wParam)
afx_msg LRESULT | OnPushPinCancel (UINT lParam, LONG wParam)

Protected Attributes

COLORREF | m_clrBtnHilite
COLORREF | m_clrBtnShadow
COLORREF | m_clrBtnFace
COLORREF | m_clrBorder
COLORREF | m_clrBackgnd
COLORREF | m_clrFont
int m_nBorder
CFont * | m_pFont
CFont | m_Font
HICON | m_hIcon
CString | m_strWindText
int m_cx
int m_cy
int m_nOffset
CWnd * | m_pChildWnd
CWnd * | m_pNotifyWnd
CCJCaptionButton m_CaptionButton
CCJCaptionPopupWnd * m_pWndPopDown
CRect | m_rcChild
DWORD | m_dwExStyle
CRect | m_rcClient
DWORD | m_dwTextStyle

Constructor & Destructor Documentation

CCJCaption::CCJCaption ( )

Definition at line 193 of file CJCaption.cpp.

References m_clrBackgnd, m_clrBorder, m_clrBtnFace, m_clrBtnHilite, m_clrBtnShadow, m_clrFont, m_cx, m_cy, m_hIcon, m_nBorder, m_pChildWnd, m_pFont, m_pNotifyWnd, m_pWndPopDown, m_strWindText, NULL, and SetTextStyle().

00194 {
00195     m_strWindText   = _T("");
00196     m_pNotifyWnd    = NULL;
00197     m_pWndPopDown   = NULL;
00198     m_pChildWnd     = NULL;
00199     m_cx            = ::GetSystemMetrics(SM_CXSMICON);
00200     m_cy            = ::GetSystemMetrics(SM_CYSMICON);
00201     m_clrBtnHilite  = ::GetSysColor(COLOR_BTNHILIGHT);
00202     m_clrBtnShadow  = ::GetSysColor(COLOR_BTNSHADOW);
00203     m_clrBtnFace    = ::GetSysColor(COLOR_BTNFACE);
00204     m_clrFont       = ::GetSysColor(COLOR_WINDOWTEXT);
00205     m_clrBorder     = ::GetSysColor(COLOR_BTNFACE);
00206     m_clrBackgnd    = ::GetSysColor(COLOR_BTNFACE);
00207     m_nBorder       = 0;
00208     m_pFont         = NULL;
00209     m_hIcon         = NULL;
00210
00211     SetTextStyle( DT_SINGLELINE|DT_END_ELLIPSIS );
00212 }

Here is the call graph for this function:

CCJCaption::~CCJCaption ( ) [virtual]

Definition at line 214 of file CJCaption.cpp.

References m_Font.

00215 {
00216     // fix potential resource leak - KStowell - 10-22-99.
00217     m_Font.DeleteObject();
00218 }

Member Function Documentation

BOOL CCJCaption::Create | ( | CWnd * | pParentWnd,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwExStyle = 0x01,
 |  | DWORD | dwStyle = WS_VISIBLE|SS_CENTER|SS_CENTERIMAGE,
 |  | const CRect & | rect = CRect(0, 0, 0, 0),
 |  | UINT | nID = 0xffff
 | ) | [virtual]

Definition at line 355 of file CJCaption.cpp.

References IDC_CAPT_BUTTON, m_CaptionButton, m_clrBackgnd, m_clrFont, m_dwExStyle, m_pFont, m_strWindText, NULL, CCJCaptionButton::SetButtonStyle(), UpdateFont(), and WS_EX_FLATEDGE.

Referenced by CCJExplorerBar::OnCreate().

00356 {
00357     // Let the base class create the control.
00358     if( !CStatic::Create( NULL, dwStyle, rect, pParentWnd, nID ))
00359     {
00360         TRACE(_T("Unable to create caption.\n"));
00361         return FALSE;
00362     }
00363
00364     UpdateFont();
00365
00366     // save the style.
00367     if( dwExStyle & WS_EX_FLATEDGE ) {
00368         m_dwExStyle = dwExStyle;
00369     }
00370
00371     else {
00372         ModifyStyleEx( 0, dwExStyle );
00373     }
00374
00375     // Save the window text.
00376     m_strWindText = lpszWindowName;
00377
00378     // Create the button to be used with child window.
00379     if( !m_CaptionButton.Create( m_strWindText, BS_ICON|BS_OWNERDRAW|BS_VCENTER,
00380         CRect(0,0,0,0), this, IDC_CAPT_BUTTON ))
00381     {
00382         TRACE0( "Unable to create caption button.\n" );
00383         return FALSE;
00384     }
00385
00386     // set the button font and colors.
00387     m_CaptionButton.SetButtonStyle( m_pFont, m_clrBackgnd, m_clrFont );
00388
00389     return TRUE;
00390 }

Here is the call graph for this function:

void CCJCaption::DrawCaptionBack | ( | CDC * | pDC,
 |  | CRect & | rcItem
 | ) | [virtual]

Definition at line 270 of file CJCaption.cpp.

References m_clrBackgnd, m_clrBtnFace, m_clrBtnHilite, m_clrBtnShadow, m_dwExStyle, m_nBorder, and WS_EX_FLATEDGE.

00271 {
00272     CRect rc = rcItem;
00273
00274     // Set the background mode to transparent.
00275     pDC->SetBkMode( TRANSPARENT );
00276
00277     // repaint the background.
00278     pDC->FillSolidRect( rc, m_clrBtnFace );
00279
00280     // draw the caption border.
00281     if( m_dwExStyle & WS_EX_FLATEDGE ) {
00282         pDC->Draw3dRect(rc, m_clrBtnHilite, m_clrBtnShadow);
00283     }
00284
00285     // draw the caption banner border.
00286     if( m_nBorder != 0 ) {
00287         rc.DeflateRect( m_nBorder, m_nBorder );
00288         pDC->FillSolidRect(rc, m_clrBackgnd);
00289     }
00290 }

void CCJCaption::DrawCaptionIcon | ( | CDC * | pDC,
 |  | CRect & | rcItem
 | ) | [virtual]

Definition at line 320 of file CJCaption.cpp.

References m_cx, m_cy, m_hIcon, m_nBorder, and NULL.

Referenced by UpdateCaption().

00321 {
00322     // If no icon was defined, just return.
00323     if( m_hIcon == NULL )
00324         return;
00325
00326     CRect rc = rcItem;
00327     rc.left = ( rc.right - m_cx )-( m_nBorder + 2 );
00328
00329     // stop the icon at the left hand border
00330     if (rc.left < m_nBorder) {
00331         rc.left = m_nBorder;
00332     }
00333
00334     rc.top = ( rcItem.Height() - m_cy )/2;
00335     rc.right = rc.left + m_cx;
00336     rc.bottom = rc.top + m_cy;
00337
00338     // Only draw the icon if it will fit into the space between the borders
00339     if (rc.right < rcItem.right - m_nBorder) {
00340         // draw the icon associated with the caption.
00341         ::DrawIconEx( pDC->GetSafeHdc(), rc.left, rc.top, m_hIcon,
00342             rc.Width(), rc.Height(), NULL, (HBRUSH)NULL, DI_NORMAL);
00343     }
00344 }

void CCJCaption::DrawCaptionText | ( | CDC * | pDC,
 |  | CRect & | rcItem
 | ) | [virtual]

Definition at line 292 of file CJCaption.cpp.

References m_clrFont, m_cx, m_dwTextStyle, m_Font, m_nBorder, m_pFont, m_strWindText, and NULL.

Referenced by UpdateCaptionText().

00293 {
00294     // if the caption text is empty, return.
00295     if( m_strWindText.IsEmpty( ))
00296         return;
00297
00298     if( m_pFont == NULL ) {
00299         m_pFont = &m_Font;
00300     }
00301
00302     CRect rc = rcItem;
00303     rc.OffsetRect( 10,0 );
00304
00305     // Set the text color and select the caption font.
00306     pDC->SetTextColor( m_clrFont );
00307     CFont* oldFont = pDC->SelectObject( m_pFont );
00308
00309     // get the height of the text to be displayed.
00310     int cy = pDC->DrawText( m_strWindText, -1, rc, DT_SINGLELINE|DT_CALCRECT );
00311     rc.top = (rcItem.Height()-cy)/2;
00312     rc.bottom = rc.top+cy;
00313     rc.right  = rcItem.right-(m_cx + m_nBorder);
00314
00315     // draw the text, and select the original font.
00316     pDC->DrawText( m_strWindText, rc, m_dwTextStyle );
00317     pDC->SelectObject( oldFont );
00318 }

void CCJCaption::KillChildWindow ( ) [virtual]

Definition at line 436 of file CJCaption.cpp.

References _delete, m_CaptionButton, and m_pWndPopDown.

Referenced by OnPushPinButton().

00437 {
00438     m_CaptionButton.SetState(FALSE);
00439     m_CaptionButton.ModifyStyle( WS_VISIBLE, 0 );
00440     m_pWndPopDown->DestroyWindow();
00441     _delete( m_pWndPopDown );
00442 }

void CCJCaption::ModifyCaptionStyle | ( | int | nBorderSize,
 |  | CFont * | pFont = NULL,
 |  | LPCTSTR | lpszWindText = NULL,
 |  | HICON | hIcon = NULL
 | ) | [virtual]

Definition at line 392 of file CJCaption.cpp.

References m_CaptionButton, m_clrBackgnd, m_clrFont, m_hIcon, m_nBorder, m_pFont, m_strWindText, and CCJCaptionButton::SetButtonStyle().

00393 {
00394     ASSERT(::IsWindow(m_hWnd));
00395
00396     if( nBorderSize ) {
00397         m_nBorder = nBorderSize;
00398     }
00399
00400     if( pFont ) {
00401         m_pFont = pFont;
00402         m_CaptionButton.SetButtonStyle( m_pFont, m_clrBackgnd, m_clrFont );
00403     }
00404
00405     if( lpszWindText ) {
00406         m_strWindText = lpszWindText;
00407     }
00408
00409     if( hIcon ) {
00410         m_hIcon = hIcon;
00411     }
00412
00413     Invalidate();
00414 }

Here is the call graph for this function:

void CCJCaption::OnCaptButton ( ) [protected]

Definition at line 467 of file CJCaption.cpp.

References _delete, CCJCaptionPopupWnd::Create(), m_CaptionButton, m_pChildWnd, m_pWndPopDown, and m_rcChild.

00468 {
00469     CRect rc;
00470     m_CaptionButton.GetWindowRect(&rc);
00471     rc.right  = rc.left + m_rcChild.Width();
00472     rc.top    = rc.bottom;
00473     rc.bottom = rc.top + m_rcChild.Height();
00474
00475     //if window is already present delete it
00476     _delete( m_pWndPopDown );
00477
00478     // Get the class name and create the window
00479     m_pWndPopDown = new CCJCaptionPopupWnd;
00480     m_pWndPopDown->Create( rc, this, m_pChildWnd );
00481     m_pChildWnd->ShowWindow(SW_SHOW);
00482     m_CaptionButton.SetState(TRUE);
00483 }

Here is the call graph for this function:

BOOL CCJCaption::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 588 of file CJCaption.cpp.

00589 {
00590     // KStowell - overridden for flicker-free drawing.
00591     UNUSED_ALWAYS(pDC);
00592     return TRUE;
00593 }

void CCJCaption::OnPaint ( ) [protected]

Definition at line 235 of file CJCaption.cpp.

00236 {
00237     CPaintDC dc(this); // device context for painting
00238
00239     // KStowell - Get the client rect.
00240     CRect rcClient;
00241     GetClientRect( &rcClient );
00242
00243     // KStowell - Create a memory device-context. This is done to help reduce
00244     // screen flicker, since we will paint the entire control to the
00245     // off screen device context first.
00246     CDC memDC;
00247     CBitmap bitmap;
00248     memDC.CreateCompatibleDC(&dc);
00249     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00250     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00251     memDC.FillSolidRect( rcClient, m_clrBtnFace );
00252
00253     // First let the control do its default drawing.
00254     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00255
00256     // draw the backgound, text and icon.
00257     DrawCaptionBack( &memDC, rcClient );
00258     DrawCaptionText( &memDC, rcClient );
00259     DrawCaptionIcon( &memDC, rcClient );
00260
00261     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00262     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00263
00264     // KStowell - Cleanup resources.
00265     memDC.SelectObject(pOldBitmap);
00266     memDC.DeleteDC();
00267     bitmap.DeleteObject();
00268 }

LRESULT CCJCaption::OnPushPinButton | ( | UINT | lParam,
 |  | LONG | wParam
 | ) | [protected]

Definition at line 485 of file CJCaption.cpp.

References CM_ONPUSHPINBUTTON, KillChildWindow(), m_nOffset, m_pChildWnd, m_pNotifyWnd, and m_rcChild.

00486 {
00487     UNUSED_ALWAYS( lParam );
00488     UNUSED_ALWAYS( wParam );
00489
00490     KillChildWindow();
00491     m_pNotifyWnd->SendMessage(CM_ONPUSHPINBUTTON, 0, 0);
00492     m_pChildWnd->GetParent()->GetClientRect(&m_rcChild);
00493     if(m_nOffset>0) {
00494         m_rcChild.top += m_nOffset;
00495     }
00496     m_pChildWnd->MoveWindow(m_rcChild);
00497     Invalidate();
00498
00499     return 0;
00500 }

Here is the call graph for this function:

LRESULT CCJCaption::OnPushPinCancel | ( | UINT | lParam,
 |  | LONG | wParam
 | ) | [protected]

Definition at line 502 of file CJCaption.cpp.

References _delete, CM_ONPUSHPINCANCEL, m_CaptionButton, m_pNotifyWnd, and m_pWndPopDown.

00503 {
00504     UNUSED_ALWAYS( lParam );
00505     UNUSED_ALWAYS( wParam );
00506
00507     m_CaptionButton.SetState(FALSE);
00508     m_pWndPopDown->DestroyWindow();
00509
00510     _delete( m_pWndPopDown );
00511
00512     m_pNotifyWnd->SendMessage(CM_ONPUSHPINCANCEL, 0, 0);
00513
00514     return 0;
00515 }

void CCJCaption::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy
 | ) | [protected]

Definition at line 444 of file CJCaption.cpp.

References m_CaptionButton, m_nBorder, m_pFont, and m_strWindText.

00445 {
00446     CStatic::OnSize(nType, cx, cy);
00447
00448     if( m_CaptionButton.GetSafeHwnd())
00449     {
00450         CDC* pDC = GetDC();
00451         CFont* pOldFont = pDC->SelectObject(m_pFont);
00452
00453         TEXTMETRIC tm;
00454         pDC->GetTextMetrics(&tm);
00455
00456         CSize size = pDC->GetTextExtent(m_strWindText, m_strWindText.GetLength());
00457         size.cx += tm.tmAveCharWidth+21;
00458         pDC->SelectObject(pOldFont);
00459         ReleaseDC(pDC);
00460
00461         CRect rc( 0, 0, size.cx, cy );
00462         rc.DeflateRect(m_nBorder+1, m_nBorder+1);
00463         m_CaptionButton.MoveWindow(rc);
00464     }
00465 }

void CCJCaption::OnSysColorChange ( ) [protected]

Definition at line 346 of file CJCaption.cpp.

References m_clrBtnFace, m_clrBtnHilite, and m_clrBtnShadow.

00347 {
00348     CStatic::OnSysColorChange();
00349
00350     m_clrBtnHilite = ::GetSysColor(COLOR_BTNHILIGHT);
00351     m_clrBtnShadow = ::GetSysColor(COLOR_BTNSHADOW);
00352     m_clrBtnFace   = ::GetSysColor(COLOR_BTNFACE);
00353 }

_CJXLIB_INLINE void CCJCaption::SetCaptionColors | ( | COLORREF | clrBorder,
 |  | COLORREF | clrBackground,
 |  | COLORREF | clrFont
 | ) | [virtual]

Definition at line 240 of file CJCaption.h.

References _CJXLIB_INLINE, m_clrBackgnd, m_clrBorder, and m_clrFont.

00241     { ASSERT(::IsWindow(m_hWnd)); m_clrBorder = clrBorder; m_clrBackgnd = clrBackground; m_clrFont = clrFont; }

void CCJCaption::SetChildWindow | ( | CWnd * | pChild,
 |  | CWnd * | pNotifyWnd
 | ) | [virtual]

Definition at line 416 of file CJCaption.cpp.

References m_CaptionButton, m_nOffset, m_pChildWnd, m_pNotifyWnd, m_rcChild, and NULL.

00417 {
00418     ASSERT( pChild != NULL );       // must be valid.
00419     ASSERT( pNotifyWnd != NULL );   // must be valid.
00420
00421     // save window pointers, and show caption button.
00422     m_pChildWnd  = pChild;
00423     m_pNotifyWnd = pNotifyWnd;
00424
00425     // set the size of the child window.
00426     m_pChildWnd->GetWindowRect(&m_rcChild);
00427
00428     CRect rcClient;
00429     m_pChildWnd->GetParent()->GetClientRect(&rcClient);
00430     m_nOffset = rcClient.Height()-m_rcChild.Height();
00431
00432     m_CaptionButton.ModifyStyle( 0, WS_VISIBLE );
00433     Invalidate();
00434 }

_CJXLIB_INLINE void CCJCaption::SetTextStyle ( DWORD dwStyle ) [virtual]

Definition at line 237 of file CJCaption.h.

References _CJXLIB_INLINE, and m_dwTextStyle.

Referenced by CCJCaption().

00238     { m_dwTextStyle = dwStyle; }

void CCJCaption::UpdateCaption | ( | LPCTSTR | lpszWindowText,
 |  | HICON | hIcon
 | ) | [virtual]

Definition at line 517 of file CJCaption.cpp.

References DrawCaptionIcon(), m_hIcon, m_strWindText, UpdateCaptionBack(), and UpdateCaptionText().

00518 {
00519     ASSERT(::IsWindow(m_hWnd));
00520
00521     CRect rcClient;
00522     GetClientRect(&rcClient);
00523     CDC* pDC = GetDC();
00524
00525     UpdateCaptionBack(pDC, rcClient);
00526
00527     if( lpszWindowText )
00528     {
00529         m_strWindText = lpszWindowText;
00530         UpdateCaptionText(pDC, rcClient);
00531     }
00532
00533     if( hIcon ) {
00534         m_hIcon = hIcon;
00535         DrawCaptionIcon( pDC, rcClient );
00536     }
00537
00538     ReleaseDC(pDC);
00539 }

Here is the call graph for this function:

void CCJCaption::UpdateCaptionBack | ( | CDC * | pDC,
 |  | CRect & | rcItem
 | ) | [virtual]

Definition at line 541 of file CJCaption.cpp.

References m_clrBackgnd, m_clrBtnFace, and m_nBorder.

Referenced by UpdateCaption().

00542 {
00543     CRect rc = rcItem;
00544
00545     // Set the background mode to transparent.
00546     pDC->SetBkMode( TRANSPARENT );
00547
00548     rc.DeflateRect(1,1);
00549     // repaint the background.
00550     pDC->FillSolidRect( rc, m_clrBtnFace );
00551
00552     // draw the caption banner border.
00553     if( m_nBorder != 0 ) {
00554         rc.DeflateRect( m_nBorder-1, m_nBorder-1 );
00555         pDC->FillSolidRect(rc, m_clrBackgnd);
00556     }
00557 }

void CCJCaption::UpdateCaptionText | ( | CDC * | pDC,
 |  | CRect & | rcItem
 | ) | [virtual]

Definition at line 559 of file CJCaption.cpp.

References DrawCaptionText(), m_CaptionButton, m_nBorder, m_pFont, and m_strWindText.

Referenced by UpdateCaption().

00560 {
00561     CFont* pOldFont = pDC->SelectObject(m_pFont);
00562
00563     TEXTMETRIC tm;
00564     pDC->GetTextMetrics(&tm);
00565
00566     CSize size = pDC->GetTextExtent(m_strWindText, m_strWindText.GetLength());
00567     size.cx += tm.tmAveCharWidth+21;
00568     pDC->SelectObject(pOldFont);
00569
00570     CRect rc( 0, 0, size.cx, rcItem.Height() );
00571     rc.DeflateRect(m_nBorder+1, m_nBorder+1);
00572     m_CaptionButton.MoveWindow(rc);
00573     m_CaptionButton.SetWindowText(m_strWindText);
00574
00575     DrawCaptionText( pDC, rcItem );
00576 }

Here is the call graph for this function:

void CCJCaption::UpdateFont ( ) [virtual]

Definition at line 578 of file CJCaption.cpp.

References m_Font, and m_pFont.

Referenced by Create().

00579 {
00580     m_Font.DeleteObject();
00581     NONCLIENTMETRICS ncm;
00582     ncm.cbSize = sizeof(ncm);
00583     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00584     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00585     m_pFont = &m_Font;
00586 }

Member Data Documentation

CCJCaptionButton CCJCaption::m_CaptionButton [protected]

Definition at line 162 of file CJCaption.h.

Referenced by Create(), KillChildWindow(), ModifyCaptionStyle(), OnCaptButton(), OnPushPinCancel(), OnSize(), SetChildWindow(), and UpdateCaptionText().

COLORREF CCJCaption::m_clrBackgnd [protected]

Definition at line 149 of file CJCaption.h.

Referenced by CCJCaption(), Create(), DrawCaptionBack(), ModifyCaptionStyle(), SetCaptionColors(), and UpdateCaptionBack().

COLORREF CCJCaption::m_clrBorder [protected]

Definition at line 148 of file CJCaption.h.

Referenced by CCJCaption(), and SetCaptionColors().

COLORREF CCJCaption::m_clrBtnFace [protected]

Definition at line 147 of file CJCaption.h.

Referenced by CCJCaption(), DrawCaptionBack(), OnSysColorChange(), and UpdateCaptionBack().

COLORREF CCJCaption::m_clrBtnHilite [protected]

Definition at line 145 of file CJCaption.h.

Referenced by CCJCaption(), DrawCaptionBack(), and OnSysColorChange().

COLORREF CCJCaption::m_clrBtnShadow [protected]

Definition at line 146 of file CJCaption.h.

Referenced by CCJCaption(), DrawCaptionBack(), and OnSysColorChange().

COLORREF CCJCaption::m_clrFont [protected]

Definition at line 150 of file CJCaption.h.

Referenced by CCJCaption(), Create(), DrawCaptionText(), ModifyCaptionStyle(), and SetCaptionColors().

int CCJCaption::m_cx [protected]

Definition at line 156 of file CJCaption.h.

Referenced by CCJCaption(), DrawCaptionIcon(), and DrawCaptionText().

int CCJCaption::m_cy [protected]

Definition at line 157 of file CJCaption.h.

Referenced by CCJCaption(), and DrawCaptionIcon().

DWORD CCJCaption::m_dwExStyle [protected]

Definition at line 165 of file CJCaption.h.

Referenced by Create(), and DrawCaptionBack().

DWORD CCJCaption::m_dwTextStyle [protected]

Definition at line 167 of file CJCaption.h.

Referenced by DrawCaptionText(), and SetTextStyle().

CFont CCJCaption::m_Font [protected]

Definition at line 153 of file CJCaption.h.

Referenced by DrawCaptionText(), UpdateFont(), and ~CCJCaption().

HICON CCJCaption::m_hIcon [protected]

Definition at line 154 of file CJCaption.h.

Referenced by CCJCaption(), DrawCaptionIcon(), ModifyCaptionStyle(), and UpdateCaption().

int CCJCaption::m_nBorder [protected]

Definition at line 151 of file CJCaption.h.

Referenced by CCJCaption(), DrawCaptionBack(), DrawCaptionIcon(), DrawCaptionText(), ModifyCaptionStyle(), OnSize(), UpdateCaptionBack(), and UpdateCaptionText().

int CCJCaption::m_nOffset [protected]

Definition at line 158 of file CJCaption.h.

Referenced by OnPushPinButton(), and SetChildWindow().

CWnd* CCJCaption::m_pChildWnd [protected]

Definition at line 160 of file CJCaption.h.

Referenced by CCJCaption(), OnCaptButton(), OnPushPinButton(), and SetChildWindow().

CFont* CCJCaption::m_pFont [protected]

Definition at line 152 of file CJCaption.h.

Referenced by CCJCaption(), Create(), DrawCaptionText(), ModifyCaptionStyle(), OnSize(), UpdateCaptionText(), and UpdateFont().

CWnd* CCJCaption::m_pNotifyWnd [protected]

Definition at line 161 of file CJCaption.h.

Referenced by CCJCaption(), OnPushPinButton(), OnPushPinCancel(), and SetChildWindow().

CCJCaptionPopupWnd* CCJCaption::m_pWndPopDown [protected]

Definition at line 163 of file CJCaption.h.

Referenced by CCJCaption(), KillChildWindow(), OnCaptButton(), and OnPushPinCancel().

CRect CCJCaption::m_rcChild [protected]

Definition at line 164 of file CJCaption.h.

Referenced by OnCaptButton(), OnPushPinButton(), and SetChildWindow().

CRect CCJCaption::m_rcClient [protected]

Definition at line 166 of file CJCaption.h.

CString CCJCaption::m_strWindText [protected]

Definition at line 155 of file CJCaption.h.

Referenced by CCJCaption(), Create(), DrawCaptionText(), ModifyCaptionStyle(), OnSize(), UpdateCaption(), and UpdateCaptionText().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJCaption.h
  • WinCvs/CJLib/CJLibrary/CJCaption.cpp
Generated on Sat Aug 7 22:48:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJCaptionButton Class Reference

CCJCaptionButton Class Reference

#include <CJCaption.h>

Inheritance diagram for CCJCaptionButton:

[legend]
Collaboration diagram for CCJCaptionButton:

[legend]
List of all members.

Public Member Functions

virtual BOOL | SetButtonStyle (CFont *pFont, COLORREF clrBackground, COLORREF clrFont)
virtual void | DrawButtonText (CDC *pDC, UINT nState, CRect &rcItem)

Protected Member Functions

afx_msg void | OnSysColorChange ()

Member Function Documentation

void CCJCaptionButton::DrawButtonText | ( | CDC * | pDC,
 |  | UINT | nState,
 |  | CRect & | rcItem
 | ) | [virtual]

Reimplemented from CCJFlatButton.

Definition at line 135 of file CJCaption.cpp.

References NULL.

00136 {
00137     // Get the window text, return if empty.
00138     CString strWindowText; GetWindowText(strWindowText);
00139     if( strWindowText.IsEmpty( ))
00140         return;
00141
00142     if( m_pFont == NULL ) {
00143         m_pFont = &m_Font;
00144     }
00145
00146     CRect rc = rcItem;
00147     rc.DeflateRect( 5,0 );
00148
00149     // Set the text color and select the button font.
00150     pDC->SetTextColor(( nState & ODS_DISABLED )?m_clrTextGy:m_clrTextNm);
00151     CFont *oldFont = pDC->SelectObject( m_pFont );
00152
00153     // get the height of the text to be displayed.
00154     int cy = pDC->DrawText( strWindowText, -1, rc, DT_SINGLELINE|DT_CALCRECT );
00155     rc.top = (rcItem.Height()-cy)/2;
00156
00157     // draw the text, and select the original font.
00158     pDC->DrawState( rc.TopLeft(), strWindowText.GetLength(), strWindowText,
00159         ( nState & ODS_DISABLED )?DSS_DISABLED:DSS_NORMAL, TRUE, 0, (HBRUSH)NULL );
00160
00161     // Set up pen to use for drawing the triangle
00162     CPen pen(PS_SOLID, 1, m_clrTextNm);
00163     CPen *pOldPen = pDC->SelectObject( &pen );
00164
00165     // get the client rect.
00166     CRect rcWnd;
00167     GetClientRect(&rcWnd);
00168
00169     // initialize coordinates for triangle.
00170     int x1 = rcWnd.right-11;
00171     int x2 = rcWnd.right-6;
00172     int y1 = rcWnd.bottom-7;
00173     int y2 = rcWnd.bottom-5;
00174
00175     // draw the triangle.
00176     pDC->MoveTo( x1, y1 );
00177     pDC->LineTo( x2, y1 );
00178     pDC->MoveTo( x1+1, y1+1 );
00179     pDC->LineTo( x2-1, y1+1 );
00180     pDC->SetPixel( x1+2, y2, m_clrTextNm );
00181
00182     // restore old pen and font.
00183     pDC->SelectObject( oldFont );
00184     pDC->SelectObject( pOldPen );
00185
00186     // fix potential resource leak - KStowell - 10-21-99
00187     pen.DeleteObject();
00188 }

afx_msg void CCJCaptionButton::OnSysColorChange ( ) [protected]

Reimplemented from CCJFlatButton.

BOOL CCJCaptionButton::SetButtonStyle | ( | CFont * | pFont,
 |  | COLORREF | clrBackground,
 |  | COLORREF | clrFont
 | ) | [virtual]

Definition at line 128 of file CJCaption.cpp.

Referenced by CCJCaption::Create(), and CCJCaption::ModifyCaptionStyle().

00129 {
00130     m_pFont = pFont;
00131     SetAlternateColors(clrBackground, m_clrHilite, m_clrDkShad, clrFont);
00132     return TRUE;
00133 }

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJCaption.h
  • WinCvs/CJLib/CJLibrary/CJCaption.cpp
Generated on Sat Aug 7 22:48:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJCaptionPopupWnd Class Reference

CCJCaptionPopupWnd Class Reference

#include <CJCaptionPopupWnd.h>

Inheritance diagram for CCJCaptionPopupWnd:

[legend]
Collaboration diagram for CCJCaptionPopupWnd:

[legend]
List of all members.

Public Member Functions

CCJCaptionPopupWnd ()
virtual BOOL | Create (const CRect &rect, CWnd *pParentWnd, CWnd *pChildWnd)
virtual | ~CCJCaptionPopupWnd ()

Public Attributes

CWnd * | m_pParentWnd
CWnd * | m_pChildWnd
CWnd * | m_pChildParent

Protected Member Functions

afx_msg void | OnDestroy ()
afx_msg void | OnCaptButton ()
afx_msg void | OnPaint ()
afx_msg void | OnTimer (UINT nIDEvent)

Protected Attributes

CCJCaption m_Caption
CCJFlatButton m_CaptionButton
HICON | m_hIconOn
HICON | m_hIconOff

Constructor & Destructor Documentation

CCJCaptionPopupWnd::CCJCaptionPopupWnd ( )

Definition at line 60 of file CJCaptionPopupWnd.cpp.

References m_hIconOff, m_hIconOn, m_pChildParent, m_pChildWnd, m_pParentWnd, and NULL.

00061 {
00062     m_pChildWnd     = NULL;
00063     m_pChildParent  = NULL;
00064     m_pParentWnd    = NULL;
00065     m_hIconOn       = NULL;
00066     m_hIconOff      = NULL;
00067 }

CCJCaptionPopupWnd::~CCJCaptionPopupWnd ( ) [virtual]

Definition at line 69 of file CJCaptionPopupWnd.cpp.

References _destroyIcon, m_hIconOff, and m_hIconOn.

00070 {
00071     // fix potential resource leak - KStowell - 10-22-99.
00072     _destroyIcon(m_hIconOn);
00073     _destroyIcon(m_hIconOff);
00074     DestroyWindow();
00075 }

Member Function Documentation

BOOL CCJCaptionPopupWnd::Create | ( | const CRect & | rect,
 |  | CWnd * | pParentWnd,
 |  | CWnd * | pChildWnd
 | ) | [virtual]

Definition at line 89 of file CJCaptionPopupWnd.cpp.

References IDB_PUSHPIN, IDC_CAPT_BUTTON, NULL, and WS_EX_FLATEDGE.

Referenced by CCJCaption::OnCaptButton().

00090 {
00091     ASSERT(pParentWnd != NULL); // must be valid.
00092     m_pParentWnd = pParentWnd;
00093
00094     ASSERT(pChildWnd  != NULL); // must be valid.
00095     m_pChildWnd = pChildWnd;
00096
00097     // register the wnd class.
00098     CString wndClass = ::AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW,
00099         0, ::GetSysColorBrush(COLOR_BTNFACE));
00100
00101     // define the styles for this window.
00102     DWORD dwStyleEx = WS_EX_TOOLWINDOW;
00103     DWORD dwStyle   = WS_VISIBLE|WS_POPUP|WS_DLGFRAME;
00104
00105     // call the base class for creation.
00106     if( !CWnd::CreateEx( dwStyleEx, wndClass, _T(""), dwStyle, rect.left, rect.top,
00107         rect.Width(), rect.Height(), pParentWnd->GetSafeHwnd(), 0, NULL ))
00108     {
00109         TRACE0( "Failed to create caption popdown window.\n" );
00110         return FALSE;
00111     }
00112
00113     // set the child windows parent to this popup window, save
00114     // the previous parent, since we need to reset this when the
00115     // window is destroyed.
00116     m_pChildParent = m_pChildWnd->SetParent(this);
00117     ASSERT(m_pChildParent != NULL);
00118
00119     // define the caption and client rect.
00120     CRect rcClient;
00121     GetClientRect(&rcClient);
00122     rcClient.DeflateRect(2,2);
00123     CRect rcCapt( rcClient );
00124
00125     // move the window to fit the client area of this window.
00126     rcClient.top += 19;
00127     m_pChildWnd->MoveWindow(rcClient);
00128
00129     // define the size for the push pin caption.
00130     rcCapt.bottom = rcCapt.top + 19;
00131
00132     // Create the caption.
00133     if( !m_Caption.Create( this, _T( "Click push pin to keep open" ), WS_EX_FLATEDGE,
00134         WS_VISIBLE|SS_CENTER|SS_CENTERIMAGE, rcCapt ))
00135     {
00136         TRACE0( "Unable to create caption.\n" );
00137         return FALSE;
00138     }
00139
00140     // define the size for the caption button.
00141     CRect rcButton( rcCapt );
00142     rcButton.DeflateRect(2,2);
00143     rcButton.left = rcButton.right - 16;
00144
00145     // Create the caption button.
00146     if( !m_CaptionButton.Create( NULL, WS_VISIBLE|BS_ICON|BS_OWNERDRAW|BS_CENTER|BS_VCENTER,
00147         rcButton, this, IDC_CAPT_BUTTON ))
00148     {
00149         TRACE0( "Unable to create caption button.\n" );
00150         return FALSE;
00151     }
00152
00153     CImageList imageList;
00154     imageList.Create(IDB_PUSHPIN, 16, 1, RGB(255,0,255));
00155
00156     // Associate the button icon
00157     m_hIconOff = imageList.ExtractIcon(0);
00158     m_hIconOn  = imageList.ExtractIcon(1);
00159     m_CaptionButton.SetIcon(m_hIconOff, m_hIconOn, CSize(16,15));
00160     imageList.DeleteImageList();
00161
00162     // start the timer after everything has been initialized.
00163     SetTimer(1, 10, NULL);
00164
00165     return TRUE;
00166 }

void CCJCaptionPopupWnd::OnCaptButton ( ) [protected]

Definition at line 175 of file CJCaptionPopupWnd.cpp.

References CM_ONPUSHPINBUTTON, and m_pParentWnd.

00176 {
00177     // send message to parent control that push pin button was pressed.
00178     m_pParentWnd->SendMessage(CM_ONPUSHPINBUTTON, 0, 0);
00179 }

void CCJCaptionPopupWnd::OnDestroy ( ) [protected]

Definition at line 168 of file CJCaptionPopupWnd.cpp.

References m_pChildParent, and m_pChildWnd.

00169 {
00170     // set the child window's parent back it's original parent.
00171     m_pChildWnd->SetParent(m_pChildParent);
00172     CWnd::OnDestroy();
00173 }

void CCJCaptionPopupWnd::OnPaint ( ) [protected]

Definition at line 181 of file CJCaptionPopupWnd.cpp.

00182 {
00183     CPaintDC dc(this); // device context for painting
00184
00185     CRect rc;
00186     GetClientRect(&rc);
00187     rc.DeflateRect(1,1);
00188
00189     // draw a border for the client area.
00190     dc.Draw3dRect( rc, ::GetSysColor(COLOR_BTNSHADOW),
00191         ::GetSysColor(COLOR_BTNHILIGHT));
00192 }

void CCJCaptionPopupWnd::OnTimer ( UINT nIDEvent ) [protected]

Definition at line 194 of file CJCaptionPopupWnd.cpp.

References CM_ONPUSHPINCANCEL, m_Caption, m_CaptionButton, m_pChildWnd, and m_pParentWnd.

00195 {
00196     UNUSED_ALWAYS( nIDEvent );
00197
00198     // get a handle to the window which currently
00199     // has the input focus...
00200     HWND hWnd_HasFocus      = GetFocus()->GetSafeHwnd();
00201
00202     // get a handle to the caption, caption button, child window
00203     // and popup window...
00204     HWND hWnd_Caption       = m_Caption.GetSafeHwnd();
00205     HWND hWnd_CaptionButton = m_CaptionButton.GetSafeHwnd();
00206     HWND hWnd_Popup         = GetSafeHwnd();
00207     HWND hWnd_PopupChild    = m_pChildWnd->GetSafeHwnd();
00208
00209     // check to see if the window that has input focus is part
00210     // of the caption popup window, if not, send a message
00211     // to the parent control.
00212     if(( hWnd_HasFocus != hWnd_Caption ) &&
00213        ( hWnd_HasFocus != hWnd_CaptionButton ) &&
00214        ( hWnd_HasFocus != hWnd_Popup ) &&
00215        ( hWnd_HasFocus != hWnd_PopupChild ))
00216     {
00217         // send message to parent control that our popup window
00218         // has lost input focus.
00219         m_pParentWnd->SendMessage(CM_ONPUSHPINCANCEL, 0, 0);
00220     }
00221 }

Member Data Documentation

CCJCaption CCJCaptionPopupWnd::m_Caption [protected]

Definition at line 75 of file CJCaptionPopupWnd.h.

Referenced by OnTimer().

CCJFlatButton CCJCaptionPopupWnd::m_CaptionButton [protected]

Definition at line 76 of file CJCaptionPopupWnd.h.

Referenced by OnTimer().

HICON CCJCaptionPopupWnd::m_hIconOff [protected]

Definition at line 78 of file CJCaptionPopupWnd.h.

Referenced by CCJCaptionPopupWnd(), and ~CCJCaptionPopupWnd().

HICON CCJCaptionPopupWnd::m_hIconOn [protected]

Definition at line 77 of file CJCaptionPopupWnd.h.

Referenced by CCJCaptionPopupWnd(), and ~CCJCaptionPopupWnd().

CWnd* CCJCaptionPopupWnd::m_pChildParent

Definition at line 73 of file CJCaptionPopupWnd.h.

Referenced by CCJCaptionPopupWnd(), and OnDestroy().

CWnd* CCJCaptionPopupWnd::m_pChildWnd

Definition at line 72 of file CJCaptionPopupWnd.h.

Referenced by CCJCaptionPopupWnd(), OnDestroy(), and OnTimer().

CWnd* CCJCaptionPopupWnd::m_pParentWnd

Definition at line 71 of file CJCaptionPopupWnd.h.

Referenced by CCJCaptionPopupWnd(), OnCaptButton(), and OnTimer().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJCaptionPopupWnd.h
  • WinCvs/CJLib/CJLibrary/CJCaptionPopupWnd.cpp
Generated on Sat Aug 7 22:48:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJCBarButton Class Reference

CCJCBarButton Class Reference

#include <CJControlBar.h>

Inheritance diagram for CCJCBarButton:

[legend]
Collaboration diagram for CCJCBarButton:

[legend]
List of all members.

Protected Member Functions

virtual void DrawButtonIcon (CDC *pDC, UINT nState, CRect &rcItem)

Member Function Documentation

void CCJCBarButton::DrawButtonIcon | ( | CDC * | pDC,
 |  | UINT | nState,
 |  | CRect & | rcItem
 | ) | [protected, virtual]

Reimplemented from CCJFlatButton.

Definition at line 215 of file CJControlBar.cpp.

References GetIcon(), and NULL.

00216 {
00217     UNUSED_ALWAYS( rcItem );
00218
00219     // get the handle to the icon (if any) associated
00220     // with this button.
00221     HICON hIcon = GetIcon();
00222     if( hIcon == NULL ) {
00223         return;
00224     }
00225
00226     CRect rcWnd;
00227     GetWindowRect(&rcWnd);
00228
00229     int left   = (rcWnd.Width()-m_sizeIcon.cx)/2;
00230     int right  = left+m_sizeIcon.cx;
00231     int top    = (rcWnd.Height()-m_sizeIcon.cy)/2;
00232     int bottom = top+m_sizeIcon.cy;
00233
00234     // determine the size of the icon to be drawn.
00235     CRect rc(left,top,right,bottom);
00236
00237     // if the button is selected.
00238     if( nState & ODS_SELECTED )
00239     {
00240         if( m_hPushed ) {
00241             hIcon = m_hPushed;
00242         }
00243         else {
00244             rc.OffsetRect(1,1);
00245         }
00246     }
00247
00248     // draw the icon associated with this button.
00249     pDC->DrawState( rc.TopLeft(), rc.Size(), hIcon, DSS_NORMAL, (HBRUSH)NULL );
00250 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJControlBar.h
  • WinCvs/CJLib/CJLibrary/CJControlBar.cpp
Generated on Sat Aug 7 22:48:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJColorPicker Class Reference

CCJColorPicker Class Reference

#include <CJColorPicker.h>

Inheritance diagram for CCJColorPicker:

[legend]
Collaboration diagram for CCJColorPicker:

[legend]
List of all members.

Public Member Functions

CCJColorPicker ()
DECLARE_DYNCREATE (CCJColorPicker)
virtual COLORREF | GetColor ()
virtual void | SetColor (COLORREF crColor)
virtual void | SetDefaultText (LPCTSTR szDefaultText)
virtual void | SetCustomText (LPCTSTR szCustomText)
virtual void | SetTrackSelection (BOOL bTracking=TRUE)
virtual BOOL | GetTrackSelection ()
virtual void | SetSelectionMode (UINT nMode)
virtual UINT | GetSelectionMode ()
virtual void | SetBkColor (COLORREF crColorBk)
virtual COLORREF | GetBkColor ()
virtual void | SetTextColor (COLORREF crColorText)
virtual COLORREF | GetTextColor ()
virtual void | CheckTextColor (COLORREF crColor)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual | ~CCJColorPicker ()

Protected Member Functions

virtual void | PreSubclassWindow ()
void | SetWindowSize ()
afx_msg BOOL | OnClicked ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()
afx_msg LONG | OnSelEndOK (UINT lParam, LONG wParam)
afx_msg LONG | OnSelEndCancel (UINT lParam, LONG wParam)
afx_msg LONG | OnSelChange (UINT lParam, LONG wParam)

Protected Attributes

BOOL | m_bActive
BOOL | m_bTrackSelection
COLORREF | m_crColorBk
COLORREF | m_crColorText
UINT | m_nSelectionMode
CRect | m_ArrowRect
CString | m_strDefaultText
CString | m_strCustomText
bool m_bLBtnDown
CWnd * | m_pParentWnd

Constructor & Destructor Documentation

CCJColorPicker::CCJColorPicker ( )

Definition at line 99 of file CJColorPicker.cpp.

References CP_MODE_BK, IDS_COLOR_AUTO, IDS_COLOR_CUST, m_bActive, m_bTrackSelection, m_nSelectionMode, m_pParentWnd, m_strCustomText, m_strDefaultText, NULL, SetBkColor(), and SetTextColor().

00100 {
00101     SetBkColor(GetSysColor(COLOR_3DFACE));
00102     SetTextColor(GetSysColor(COLOR_BTNTEXT));
00103
00104     m_bTrackSelection = FALSE;
00105     m_nSelectionMode = CP_MODE_BK;
00106     m_bActive = FALSE;
00107
00108 // 1999-06-11 begin mods KStowell
00109     m_strDefaultText.LoadString( IDS_COLOR_AUTO );
00110     m_strCustomText.LoadString( IDS_COLOR_CUST );
00111 // 1999-06-11 end mods KStowell
00112
00113 // 10-14-1999 - Kirk Stowell
00114     m_pParentWnd = NULL;
00115 }

Here is the call graph for this function:

CCJColorPicker::~CCJColorPicker ( ) [virtual]

Definition at line 117 of file CJColorPicker.cpp.

00118 {
00119 }

Member Function Documentation

void CCJColorPicker::CheckTextColor ( COLORREF crColor ) [virtual]

Definition at line 420 of file CJColorPicker.cpp.

References SetTextColor().

Referenced by OnSelChange(), OnSelEndCancel(), and SetBkColor().

00421 {
00422     int R = GetRValue(crColor);
00423     int G = GetGValue(crColor);
00424     int B = GetBValue(crColor);
00425
00426     double Intensity = .299 * R + .587 * G + .114 * B ;
00427
00428     if ( Intensity >= 127 ) {
00429         SetTextColor(RGB(0,0,0));
00430     } else {
00431         SetTextColor(RGB(255,255,255));
00432     }
00433 }

Here is the call graph for this function:

CCJColorPicker::DECLARE_DYNCREATE ( CCJColorPicker )

void CCJColorPicker::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Definition at line 230 of file CJColorPicker.cpp.

References m_bActive, m_crColorBk, m_crColorText, and NULL.

00231 {
00232     ASSERT(lpDrawItemStruct != NULL);
00233
00234     // define some temporary variables.
00235     CDC*    pDC         = CDC::FromHandle( lpDrawItemStruct->hDC );
00236     CRect   rcItem      = lpDrawItemStruct->rcItem;
00237     int     nState      = lpDrawItemStruct->itemState;
00238     DWORD   dwState     = EDGE_RAISED;
00239     DWORD   dwArrow     = DFCS_SCROLLDOWN;
00240
00241     // Paint the background.
00242     pDC->FillSolidRect(rcItem, ::GetSysColor(COLOR_3DFACE));
00243
00244     // set display flags based on state.
00245     if((nState & ODS_SELECTED) || (m_bActive == TRUE)) {
00246         dwState = EDGE_SUNKEN;
00247         dwArrow = DFCS_SCROLLDOWN|DFCS_PUSHED;
00248     }
00249     if(nState & ODS_DISABLED) {
00250         dwArrow = DFCS_SCROLLDOWN|DFCS_INACTIVE;
00251     }
00252
00253     // Draw the drop arrow.
00254     CRect rcArrow( rcItem );
00255     rcArrow.left = rcArrow.Width()-::GetSystemMetrics( SM_CXHTHUMB );
00256     pDC->DrawFrameControl( &rcArrow, DFC_SCROLL, dwArrow );
00257     pDC->Draw3dRect( rcArrow, ::GetSysColor( COLOR_3DFACE ), ::GetSysColor( COLOR_3DFACE ));
00258     rcArrow.DeflateRect( 1,1 );
00259     pDC->Draw3dRect( rcArrow, ::GetSysColor( COLOR_3DFACE ), ::GetSysColor( COLOR_3DFACE ));
00260
00261     if((nState & ODS_SELECTED) || (m_bActive == TRUE))
00262         rcArrow.OffsetRect( 1,1 );
00263
00264     // draw the seperator line.
00265     CPen penShadow( PS_SOLID, 1, ::GetSysColor( COLOR_3DSHADOW  ));
00266     CPen* pOldPen = pDC->SelectObject( &penShadow );
00267     pDC->MoveTo( rcArrow.left-1, rcArrow.top+2 );
00268     pDC->LineTo( rcArrow.left-1, rcArrow.bottom-2 );
00269
00270     CPen penHilite( PS_SOLID, 1, ::GetSysColor( COLOR_3DHILIGHT ));
00271     pDC->SelectObject( &penHilite );
00272     pDC->MoveTo( rcArrow.left, rcArrow.top+2 );
00273     pDC->LineTo( rcArrow.left, rcArrow.bottom-2 );
00274
00275     // draw the control border.
00276     pDC->DrawEdge( rcItem, dwState, BF_RECT );
00277
00278     // draw the focus rect.
00279     rcItem.DeflateRect( 2, 2 );
00280     pDC->Draw3dRect( rcItem, ::GetSysColor( COLOR_3DFACE ), ::GetSysColor( COLOR_3DFACE ) );
00281     if( nState & ODS_FOCUS ) {
00282         pDC->DrawFocusRect( rcItem );
00283     }
00284
00285     // draw the color box.
00286     if((nState & ODS_SELECTED) || (m_bActive == TRUE))
00287         rcItem.OffsetRect( 1,1 );
00288
00289     rcItem.DeflateRect( 2, 2 );
00290     rcItem.right = rcArrow.left-4;
00291
00292     CBrush brush( ((nState & ODS_DISABLED) || m_crColorBk == CLR_DEFAULT)?
00293         ::GetSysColor(COLOR_3DFACE) : m_crColorBk);
00294     CBrush* pOldBrush = (CBrush*)pDC->SelectObject( &brush );
00295     pDC->SelectStockObject(( nState & ODS_DISABLED )?WHITE_PEN:BLACK_PEN );
00296     pDC->Rectangle( rcItem );
00297
00298     // Draw the window text (if any)
00299     CString strText;
00300     GetWindowText(strText);
00301     if (strText.GetLength())
00302     {
00303         pDC->SetBkMode(TRANSPARENT);
00304         if (nState & ODS_DISABLED)
00305         {
00306             rcItem.OffsetRect(1,1);
00307             pDC->SetTextColor(::GetSysColor(COLOR_3DHILIGHT));
00308             pDC->DrawText(strText, rcItem, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
00309             rcItem.OffsetRect(-1,-1);
00310             pDC->SetTextColor(::GetSysColor(COLOR_3DSHADOW));
00311             pDC->DrawText(strText, rcItem, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
00312         }
00313         else
00314         {
00315             pDC->SetTextColor((m_crColorText == CLR_DEFAULT)? 0 : m_crColorText);
00316             pDC->DrawText(strText, rcItem, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
00317         }
00318     }
00319
00320     // fix potential resource leak - KStowell - 10-21-99
00321     pDC->SelectObject( pOldPen );
00322     pDC->SelectObject( pOldBrush );
00323     brush.DeleteObject();
00324     penHilite.DeleteObject();
00325     penHilite.DeleteObject();
00326 }

virtual COLORREF CCJColorPicker::GetBkColor ( ) [inline, virtual]

Definition at line 97 of file CJColorPicker.h.

Referenced by GetColor().

00097 { return m_crColorBk; }

COLORREF CCJColorPicker::GetColor ( ) [virtual]

Definition at line 342 of file CJColorPicker.cpp.

References CP_MODE_TEXT, GetBkColor(), GetTextColor(), and m_nSelectionMode.

Referenced by DDX_CJColorPicker(), and OnClicked().

00343 {
00344     return (m_nSelectionMode == CP_MODE_TEXT)?
00345         GetTextColor(): GetBkColor();
00346 }

Here is the call graph for this function:

virtual UINT CCJColorPicker::GetSelectionMode ( ) [inline, virtual]

Definition at line 94 of file CJColorPicker.h.

00094 { return m_nSelectionMode; };

virtual COLORREF CCJColorPicker::GetTextColor ( ) [inline, virtual]

Definition at line 100 of file CJColorPicker.h.

Referenced by GetColor().

00100 { return m_crColorText;}

virtual BOOL CCJColorPicker::GetTrackSelection ( ) [inline, virtual]

Definition at line 91 of file CJColorPicker.h.

00091 { return m_bTrackSelection; }

BOOL CCJColorPicker::OnClicked ( ) [protected]

Definition at line 206 of file CJColorPicker.cpp.

References CPN_DROPDOWN, GetColor(), m_bActive, m_pParentWnd, m_strCustomText, and m_strDefaultText.

00207 {
00208     m_bActive = TRUE;
00209
00210     CRect rect;
00211     GetWindowRect(rect);
00212     new CCJColorPopup(CPoint(rect.left, rect.bottom),    // Point to display popup
00213                      GetColor(),                       // Selected Color
00214                      this,                              // parent
00215                      m_strDefaultText,                  // "Default" text area
00216                      m_strCustomText);                  // Custom Text
00217
00218     // 10-14-1999 - Kirk Stowell - Removed redundant calls to GetParent().
00219     if (m_pParentWnd) {
00220         m_pParentWnd->SendMessage(CPN_DROPDOWN, (LPARAM)GetColor(), (WPARAM) GetDlgCtrlID());
00221     }
00222
00223     // Docs say I should return FALSE to stop the parent also getting the message.
00224     // HA! What a joke.
00225
00226     return TRUE;
00227 }

Here is the call graph for this function:

int CCJColorPicker::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 196 of file CJColorPicker.cpp.

References SetWindowSize().

00197 {
00198     if (CButton::OnCreate(lpCreateStruct) == -1)
00199         return -1;
00200
00201     SetWindowSize();    // resize appropriately
00202     return 0;
00203 }

Here is the call graph for this function:

BOOL CCJColorPicker::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 435 of file CJColorPicker.cpp.

00436 {
00437     // overridden for flicker-free drawing.
00438     UNUSED_ALWAYS(pDC);
00439     return TRUE;
00440 }

void CCJColorPicker::OnPaint ( ) [protected]

Definition at line 442 of file CJColorPicker.cpp.

00443 {
00444     CPaintDC dc(this); // device context for painting
00445
00446     // KStowell - Get the client rect.
00447     CRect rcClient, rcClip;
00448     dc.GetClipBox( &rcClip );
00449     GetClientRect( &rcClient );
00450
00451     // KStowell - Create a memory device-context. This is done to help reduce
00452     // screen flicker, since we will paint the entire control to the
00453     // off screen device context first.
00454     CDC memDC;
00455     CBitmap bitmap;
00456     memDC.CreateCompatibleDC(&dc);
00457     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00458     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00459
00460     // KStowell - Repaint the background.
00461     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00462
00463     // let the control do its default drawing.
00464     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00465
00466     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00467     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00468         rcClip.left, rcClip.top, SRCCOPY );
00469
00470     // KStowell - Cleanup resources.
00471     memDC.SelectObject(pOldBitmap);
00472     memDC.DeleteDC();
00473     bitmap.DeleteObject();
00474 }

LONG CCJColorPicker::OnSelChange | ( | UINT | lParam,
 |  | LONG | wParam
 | ) | [protected]

Definition at line 179 of file CJColorPicker.cpp.

References CheckTextColor(), CPN_SELCHANGE, m_bTrackSelection, m_pParentWnd, and SetColor().

00180 {
00181     if (m_bTrackSelection) {
00182         SetColor((COLORREF) lParam);
00183         //BEGIN SRO
00184         CheckTextColor((COLORREF) lParam);
00185         //END SRO
00186     }
00187
00188     // 10-14-1999 - Kirk Stowell - Removed redundant calls to GetParent().
00189     if (m_pParentWnd) {
00190         m_pParentWnd->SendMessage(CPN_SELCHANGE, lParam, (WPARAM) GetDlgCtrlID());
00191     }
00192
00193     return TRUE;
00194 }

Here is the call graph for this function:

LONG CCJColorPicker::OnSelEndCancel | ( | UINT | lParam,
 |  | LONG | wParam
 | ) | [protected]

Definition at line 162 of file CJColorPicker.cpp.

References CheckTextColor(), CPN_CLOSEUP, CPN_SELENDCANCEL, m_bActive, m_pParentWnd, and SetColor().

00163 {
00164     m_bActive = FALSE;
00165     SetColor((COLORREF) lParam);
00166     //BEGIN SRO
00167     CheckTextColor((COLORREF) lParam);
00168     //END SRO
00169
00170     // 10-14-1999 - Kirk Stowell - Removed redundant calls to GetParent().
00171     if (m_pParentWnd) {
00172         m_pParentWnd->SendMessage(CPN_CLOSEUP, lParam, (WPARAM) GetDlgCtrlID());
00173         m_pParentWnd->SendMessage(CPN_SELENDCANCEL, lParam, (WPARAM) GetDlgCtrlID());
00174     }
00175
00176     return TRUE;
00177 }

Here is the call graph for this function:

LONG CCJColorPicker::OnSelEndOK | ( | UINT | lParam,
 |  | LONG | wParam
 | ) | [protected]

Definition at line 138 of file CJColorPicker.cpp.

References CPN_CLOSEUP, CPN_SELCHANGE, and CPN_SELENDOK.

00139 {
00140     COLORREF crNewColor = (COLORREF) lParam;
00141     m_bActive = FALSE;
00142     SetColor(crNewColor);
00143     //BEGIN SRO
00144     CheckTextColor(crNewColor);
00145     //END SRO
00146
00147     // 10-14-1999 - Kirk Stowell - Removed redundant calls to GetParent().
00148     if (m_pParentWnd) {
00149         m_pParentWnd->SendMessage(CPN_CLOSEUP, lParam, (WPARAM) GetDlgCtrlID());
00150         m_pParentWnd->SendMessage(CPN_SELENDOK, lParam, (WPARAM) GetDlgCtrlID());
00151     }
00152
00153     if (crNewColor != GetColor()) {
00154         if (m_pParentWnd) {
00155             m_pParentWnd->SendMessage(CPN_SELCHANGE, lParam, (WPARAM) GetDlgCtrlID());
00156         }
00157     }
00158
00159     return TRUE;
00160 }

void CCJColorPicker::PreSubclassWindow ( ) [protected, virtual]

Definition at line 332 of file CJColorPicker.cpp.

References SetWindowSize().

00333 {
00334     ModifyStyle(0, BS_OWNERDRAW);        // Make it owner drawn
00335     CButton::PreSubclassWindow();
00336     SetWindowSize();                     // resize appropriately
00337 }

Here is the call graph for this function:

void CCJColorPicker::SetBkColor ( COLORREF crColorBk ) [virtual]

Definition at line 354 of file CJColorPicker.cpp.

References CheckTextColor(), and m_crColorBk.

Referenced by CCJColorPicker(), and SetColor().

00355 {
00356     m_crColorBk = crColorBk;
00357
00358     //BEGIN SRO
00359     CheckTextColor(crColorBk);
00360     //END SRO
00361
00362     if (IsWindow(m_hWnd)) RedrawWindow();
00363 }

Here is the call graph for this function:

void CCJColorPicker::SetColor ( COLORREF crColor ) [virtual]

Definition at line 348 of file CJColorPicker.cpp.

References CP_MODE_TEXT, m_nSelectionMode, SetBkColor(), and SetTextColor().

Referenced by DDX_CJColorPicker(), OnSelChange(), and OnSelEndCancel().

00349 {
00350     (m_nSelectionMode == CP_MODE_TEXT)?
00351         SetTextColor(crColor): SetBkColor(crColor);
00352 }

Here is the call graph for this function:

void CCJColorPicker::SetCustomText ( LPCTSTR szCustomText ) [virtual]

Definition at line 376 of file CJColorPicker.cpp.

References m_strCustomText.

00377 {
00378     m_strCustomText = (szCustomText)? szCustomText : _T("");
00379 }

void CCJColorPicker::SetDefaultText ( LPCTSTR szDefaultText ) [virtual]

Definition at line 371 of file CJColorPicker.cpp.

References m_strDefaultText.

00372 {
00373     m_strDefaultText = (szDefaultText)? szDefaultText : _T("");
00374 }

virtual void CCJColorPicker::SetSelectionMode ( UINT nMode ) [inline, virtual]

Definition at line 93 of file CJColorPicker.h.

00093 { m_nSelectionMode = nMode; }

void CCJColorPicker::SetTextColor ( COLORREF crColorText ) [virtual]

Definition at line 365 of file CJColorPicker.cpp.

References m_crColorText.

Referenced by CCJColorPicker(), CheckTextColor(), and SetColor().

00366 {
00367     m_crColorText = crColorText;
00368     if (IsWindow(m_hWnd)) RedrawWindow();
00369 }

virtual void CCJColorPicker::SetTrackSelection ( BOOL bTracking = TRUE ) [inline, virtual]

Definition at line 90 of file CJColorPicker.h.

00090 { m_bTrackSelection = bTracking; }

void CCJColorPicker::SetWindowSize ( ) [protected]

Definition at line 384 of file CJColorPicker.cpp.

References m_ArrowRect, and m_pParentWnd.

Referenced by OnCreate(), and PreSubclassWindow().

00385 {
00386     // 10-14-1999 - Kirk Stowell - Added to help reduce flicker, we only need to make
00387     // a call to GetParent() once at initialization.
00388     m_pParentWnd = GetParent();
00389
00390     // Get size dimensions of edges
00391     CSize MarginSize(::GetSystemMetrics(SM_CXEDGE), ::GetSystemMetrics(SM_CYEDGE));
00392
00393     // Get size of dropdown arrow
00394     int nArrowWidth = max(::GetSystemMetrics(SM_CXHTHUMB), 5*MarginSize.cx);
00395     int nArrowHeight = max(::GetSystemMetrics(SM_CYVTHUMB), 5*MarginSize.cy);
00396     CSize ArrowSize(max(nArrowWidth, nArrowHeight), max(nArrowWidth, nArrowHeight));
00397
00398     // Get window size
00399     CRect rect;
00400     GetWindowRect(rect);
00401
00402     if (m_pParentWnd) {
00403         m_pParentWnd->ScreenToClient(rect);
00404     }
00405
00406     // Set window size at least as wide as 2 arrows, and as high as arrow + margins
00407     int nWidth = max(rect.Width(), 2*ArrowSize.cx + 2*MarginSize.cx);
00408     MoveWindow(rect.left, rect.top, nWidth, ArrowSize.cy+2*MarginSize.cy, TRUE);
00409
00410     // Get the new coords of this window
00411     GetWindowRect(rect);
00412     ScreenToClient(rect);
00413
00414     // Get the rect where the arrow goes, and convert to client coords.
00415     m_ArrowRect.SetRect(rect.right - ArrowSize.cx - MarginSize.cx,
00416                         rect.top + MarginSize.cy, rect.right - MarginSize.cx,
00417                         rect.bottom - MarginSize.cy);
00418 }

Member Data Documentation

CRect CCJColorPicker::m_ArrowRect [protected]

Definition at line 130 of file CJColorPicker.h.

Referenced by SetWindowSize().

BOOL CCJColorPicker::m_bActive [protected]

Definition at line 125 of file CJColorPicker.h.

Referenced by CCJColorPicker(), DrawItem(), OnClicked(), and OnSelEndCancel().

bool CCJColorPicker::m_bLBtnDown [protected]

Definition at line 133 of file CJColorPicker.h.

BOOL CCJColorPicker::m_bTrackSelection [protected]

Definition at line 125 of file CJColorPicker.h.

Referenced by CCJColorPicker(), and OnSelChange().

COLORREF CCJColorPicker::m_crColorBk [protected]

Definition at line 127 of file CJColorPicker.h.

Referenced by DrawItem(), and SetBkColor().

COLORREF CCJColorPicker::m_crColorText [protected]

Definition at line 128 of file CJColorPicker.h.

Referenced by DrawItem(), and SetTextColor().

UINT CCJColorPicker::m_nSelectionMode [protected]

Definition at line 129 of file CJColorPicker.h.

Referenced by CCJColorPicker(), GetColor(), and SetColor().

CWnd* CCJColorPicker::m_pParentWnd [protected]

Definition at line 134 of file CJColorPicker.h.

Referenced by CCJColorPicker(), OnClicked(), OnSelChange(), OnSelEndCancel(), and SetWindowSize().

CString CCJColorPicker::m_strCustomText [protected]

Definition at line 132 of file CJColorPicker.h.

Referenced by CCJColorPicker(), OnClicked(), and SetCustomText().

CString CCJColorPicker::m_strDefaultText [protected]

Definition at line 131 of file CJColorPicker.h.

Referenced by CCJColorPicker(), OnClicked(), and SetDefaultText().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJColorPicker.h
  • WinCvs/CJLib/CJLibrary/CJColorPicker.cpp
Generated on Sat Aug 7 22:48:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJColorPopup Class Reference

CCJColorPopup Class Reference

#include <CJColorPopup.h>

Inheritance diagram for CCJColorPopup:

[legend]
Collaboration diagram for CCJColorPopup:

[legend]
List of all members.

Public Member Functions

CCJColorPopup ()
CCJColorPopup (CPoint p, COLORREF crColor, CWnd *pParentWnd, LPCTSTR szDefaultText=NULL, LPCTSTR szCustomText=NULL)
virtual void | Initialise ()
virtual BOOL | Create (CPoint p, COLORREF crColor, CWnd *pParentWnd, LPCTSTR szDefaultText=NULL, LPCTSTR szCustomText=NULL)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
virtual void | UpdateFont ()
virtual | ~CCJColorPopup ()

Protected Member Functions

virtual BOOL | GetCellRect (int nIndex, const LPRECT &rect)
virtual void | FindCellFromColor (COLORREF crColor)
virtual void | SetWindowSize ()
virtual void | CreateToolTips ()
virtual void | ChangeSelection (int nIndex)
virtual void | EndSelection (int nMessage)
virtual void | DrawCell (CDC *pDC, int nIndex)
virtual COLORREF | GetColor (int nIndex)
virtual LPCTSTR | GetColorName (int nIndex)
virtual int | GetIndex (int row, int col) const
virtual int | GetRow (int nIndex) const
virtual int | GetColumn (int nIndex) const
afx_msg void | OnNcDestroy ()
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnPaint ()
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg BOOL | OnQueryNewPalette ()
afx_msg void | OnPaletteChanged (CWnd *pFocusWnd)
afx_msg void | OnKillFocus (CWnd *pNewWnd)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnActivateApp (BOOL bActive, HTASK hTask)

Protected Attributes

int m_nNumColors
int m_nNumColumns
int m_nNumRows
int m_nBoxSize
int m_nMargin
int m_nCurrentSel
int m_nChosenColorSel
CString | m_strDefaultText
CString | m_strCustomText
CRect | m_CustomTextRect
CRect | m_DefaultTextRect
CRect | m_WindowRect
CFont | m_Font
CPalette | m_Palette
COLORREF | m_crInitialColor
COLORREF | m_crColor
CToolTipCtrl | m_ToolTip
CWnd * | m_pParent

Static Protected Attributes

ColorTableEntry m_crColors []

Constructor & Destructor Documentation

CCJColorPopup::CCJColorPopup ( )

Definition at line 133 of file CJColorPopup.cpp.

References Initialise().

00134 {
00135     Initialise();
00136 }

Here is the call graph for this function:

CCJColorPopup::CCJColorPopup | ( | CPoint | p,
 |  | COLORREF | crColor,
 |  | CWnd * | pParentWnd,
 |  | LPCTSTR | szDefaultText = NULL,
 |  | LPCTSTR | szCustomText = NULL
 | ) |

Definition at line 138 of file CJColorPopup.cpp.

References Create(), IDS_COLOR_AUTO, IDS_COLOR_CUST, Initialise(), m_crColor, m_crInitialColor, m_pParent, m_strCustomText, m_strDefaultText, and NULL.

00141 {
00142     Initialise();
00143
00144     m_crColor       = m_crInitialColor = crColor;
00145     m_pParent        = pParentWnd;
00146
00147 // 1999-06-11 begin mods KStowell
00148     if( szDefaultText == NULL )
00149         m_strDefaultText.LoadString( IDS_COLOR_AUTO );
00150     else
00151         m_strDefaultText = szDefaultText;
00152
00153     if( szCustomText == NULL )
00154         m_strCustomText.LoadString( IDS_COLOR_CUST );
00155     else
00156         m_strCustomText = szCustomText;
00157 // 1999-06-11 end mods KStowell
00158
00159     CCJColorPopup::Create(p, crColor, pParentWnd, szDefaultText, szCustomText);
00160 }

Here is the call graph for this function:

CCJColorPopup::~CCJColorPopup ( ) [virtual]

Definition at line 202 of file CJColorPopup.cpp.

References m_Font, and m_Palette.

00203 {
00204     m_Font.DeleteObject();
00205     m_Palette.DeleteObject();
00206 }

Member Function Documentation

void CCJColorPopup::ChangeSelection ( int nIndex ) [protected, virtual]

Definition at line 743 of file CJColorPopup.cpp.

References CPN_SELCHANGE, CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, DrawCell(), GetColor(), INVALID_Color, m_crColor, m_crInitialColor, m_nCurrentSel, m_nNumColors, and m_pParent.

Referenced by OnKeyDown(), and OnMouseMove().

00744 {
00745     CClientDC dc(this);        // device context for drawing
00746
00747     if (nIndex > m_nNumColors)
00748         nIndex = CUSTOM_BOX_VALUE;
00749
00750     if ((m_nCurrentSel >= 0 && m_nCurrentSel < m_nNumColors) ||
00751         m_nCurrentSel == CUSTOM_BOX_VALUE || m_nCurrentSel == DEFAULT_BOX_VALUE)
00752     {
00753         // Set Current selection as invalid and redraw old selection (this way
00754         // the old selection will be drawn unselected)
00755         int OldSel = m_nCurrentSel;
00756         m_nCurrentSel = INVALID_Color;
00757         DrawCell(&dc, OldSel);
00758     }
00759
00760     // Set the current selection as row/col and draw (it will be drawn selected)
00761     m_nCurrentSel = nIndex;
00762     DrawCell(&dc, m_nCurrentSel);
00763
00764     // Store the current Color
00765     if (m_nCurrentSel == CUSTOM_BOX_VALUE)
00766         m_pParent->SendMessage(CPN_SELCHANGE, (WPARAM) m_crInitialColor, 0);
00767     else if (m_nCurrentSel == DEFAULT_BOX_VALUE)
00768     {
00769         m_crColor = CLR_DEFAULT;
00770         m_pParent->SendMessage(CPN_SELCHANGE, (WPARAM) CLR_DEFAULT, 0);
00771     }
00772     else
00773     {
00774         m_crColor = GetColor(m_nCurrentSel);
00775         m_pParent->SendMessage(CPN_SELCHANGE, (WPARAM) m_crColor, 0);
00776     }
00777 }

Here is the call graph for this function:

BOOL CCJColorPopup::Create | ( | CPoint | p,
 |  | COLORREF | crColor,
 |  | CWnd * | pParentWnd,
 |  | LPCTSTR | szDefaultText = NULL,
 |  | LPCTSTR | szCustomText = NULL
 | ) | [virtual]

Definition at line 208 of file CJColorPopup.cpp.

References CreateToolTips(), FindCellFromColor(), m_crColor, m_crInitialColor, m_pParent, m_strCustomText, m_strDefaultText, NULL, SetWindowSize(), and UpdateFont().

Referenced by CCJColorPopup().

00211 {
00212     ASSERT(pParentWnd && ::IsWindow(pParentWnd->GetSafeHwnd()));
00213     ASSERT(pParentWnd->IsKindOf(RUNTIME_CLASS(CCJColorPicker)));
00214
00215     m_pParent  = pParentWnd;
00216     m_crColor = m_crInitialColor = crColor;
00217
00218     // Get the class name and create the window
00219     CString szClassName = AfxRegisterWndClass(CS_CLASSDC|CS_SAVEBITS|CS_HREDRAW|CS_VREDRAW,
00220                                               0,
00221                                               (HBRUSH) (COLOR_BTNFACE+1),
00222                                               0);
00223
00224     if (!CWnd::CreateEx(0, szClassName, _T(""), WS_VISIBLE|WS_POPUP,
00225                         p.x, p.y, 100, 100, // size updated soon
00226                         pParentWnd->GetSafeHwnd(), 0, NULL))
00227         return FALSE;
00228
00229     UpdateFont();
00230
00231     // Store the Custom text
00232     if (szCustomText != NULL)
00233         m_strCustomText = szCustomText;
00234
00235     // Store the Default Area text
00236     if (szDefaultText != NULL)
00237         m_strDefaultText = szDefaultText;
00238
00239     // Set the window size
00240     SetWindowSize();
00241
00242     // Create the tooltips
00243     CreateToolTips();
00244
00245     // Find which cell (if any) corresponds to the initial Color
00246     FindCellFromColor(crColor);
00247
00248     // Capture all mouse events for the life of this window
00249     SetCapture();
00250
00251     return TRUE;
00252 }

Here is the call graph for this function:

void CCJColorPopup::CreateToolTips ( ) [protected, virtual]

Definition at line 729 of file CJColorPopup.cpp.

References GetCellRect(), GetColorName(), m_nNumColors, and m_ToolTip.

Referenced by Create().

00730 {
00731     // Create the tool tip
00732     if (!m_ToolTip.Create(this)) return;
00733
00734     // Add a tool for each cell
00735     for (int i = 0; i < m_nNumColors; i++)
00736     {
00737         CRect rect;
00738         if (!GetCellRect(i, rect)) continue;
00739             m_ToolTip.AddTool(this, GetColorName(i), rect, 1);
00740     }
00741 }

Here is the call graph for this function:

void CCJColorPopup::DrawCell | ( | CDC * | pDC,
 |  | int | nIndex
 | ) | [protected, virtual]

Definition at line 802 of file CJColorPopup.cpp.

References CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, GetCellRect(), GetColor(), m_CustomTextRect, m_DefaultTextRect, m_Font, m_nChosenColorSel, m_nCurrentSel, m_nMargin, m_Palette, m_strCustomText, m_strDefaultText, and NULL.

Referenced by ChangeSelection(), and OnPaint().

00803 {
00804     // For the Custom Text area
00805     if (m_strCustomText.GetLength() && nIndex == CUSTOM_BOX_VALUE)
00806     {
00807         // The extent of the actual text button
00808         CRect TextButtonRect = m_CustomTextRect;
00809         TextButtonRect.top += 2*m_nMargin;
00810
00811         // Fill background
00812         pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DFACE));
00813
00814         // Draw horizontal line
00815         pDC->FillSolidRect(m_CustomTextRect.left+2*m_nMargin, m_CustomTextRect.top,
00816                            m_CustomTextRect.Width()-4*m_nMargin, 1, ::GetSysColor(COLOR_3DSHADOW));
00817         pDC->FillSolidRect(m_CustomTextRect.left+2*m_nMargin, m_CustomTextRect.top+1,
00818                            m_CustomTextRect.Width()-4*m_nMargin, 1, ::GetSysColor(COLOR_3DHILIGHT));
00819
00820         TextButtonRect.DeflateRect(1,1);
00821
00822         // fill background
00823         if (m_nChosenColorSel == nIndex && m_nCurrentSel != nIndex)
00824             pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DLIGHT));
00825         else
00826             pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DFACE));
00827
00828         // Draw button
00829         if (m_nCurrentSel == nIndex)
00830             pDC->DrawEdge(TextButtonRect, BDR_RAISEDINNER, BF_RECT);
00831         else if (m_nChosenColorSel == nIndex)
00832             pDC->DrawEdge(TextButtonRect, BDR_SUNKENOUTER, BF_RECT);
00833
00834         // Draw custom text
00835         CFont *pOldFont = (CFont*) pDC->SelectObject(&m_Font);
00836         pDC->SetBkMode(TRANSPARENT);
00837         pDC->DrawText(m_strCustomText, TextButtonRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
00838         pDC->SelectObject(pOldFont);
00839
00840         return;
00841     }
00842
00843     // For the Default Text area
00844     if (m_strDefaultText.GetLength() && nIndex == DEFAULT_BOX_VALUE)
00845     {
00846         // Fill background
00847         pDC->FillSolidRect(m_DefaultTextRect, ::GetSysColor(COLOR_3DFACE));
00848
00849         // The extent of the actual text button
00850         CRect TextButtonRect = m_DefaultTextRect;
00851         TextButtonRect.DeflateRect(1,1);
00852
00853         // fill background
00854         if (m_nChosenColorSel == nIndex && m_nCurrentSel != nIndex)
00855             pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DLIGHT));
00856         else
00857             pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DFACE));
00858
00859         // Draw thin line around text
00860         CRect LineRect = TextButtonRect;
00861         LineRect.DeflateRect(2*m_nMargin,2*m_nMargin);
00862         CPen pen(PS_SOLID, 1, ::GetSysColor(COLOR_3DSHADOW));
00863         CPen* pOldPen = pDC->SelectObject(&pen);
00864         pDC->SelectStockObject(NULL_BRUSH);
00865         pDC->Rectangle(LineRect);
00866         pDC->SelectObject(pOldPen);
00867
00868         // Draw button
00869         if (m_nCurrentSel == nIndex)
00870             pDC->DrawEdge(TextButtonRect, BDR_RAISEDINNER, BF_RECT);
00871         else if (m_nChosenColorSel == nIndex)
00872             pDC->DrawEdge(TextButtonRect, BDR_SUNKENOUTER, BF_RECT);
00873
00874         // Draw custom text
00875         CFont *pOldFont = (CFont*) pDC->SelectObject(&m_Font);
00876         pDC->SetBkMode(TRANSPARENT);
00877         pDC->DrawText(m_strDefaultText, TextButtonRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
00878         pDC->SelectObject(pOldFont);
00879
00880         // fix potential resource leak - KStowell - 10-21-99
00881         pen.DeleteObject();
00882         return;
00883     }
00884
00885     CRect rect;
00886     if (!GetCellRect(nIndex, rect)) return;
00887
00888     // Select and realize the palette
00889     CPalette* pOldPalette = NULL;
00890     if (pDC->GetDeviceCaps(RASTERCAPS) & RC_PALETTE)
00891     {
00892         pOldPalette = pDC->SelectPalette(&m_Palette, FALSE);
00893         pDC->RealizePalette();
00894     }
00895
00896     // fill background
00897     if (m_nChosenColorSel == nIndex && m_nCurrentSel != nIndex)
00898         pDC->FillSolidRect(rect, ::GetSysColor(COLOR_3DHILIGHT));
00899     else
00900         pDC->FillSolidRect(rect, ::GetSysColor(COLOR_3DFACE));
00901
00902     // Draw button
00903     if (m_nCurrentSel == nIndex)
00904         pDC->DrawEdge(rect, BDR_RAISEDINNER, BF_RECT);
00905     else if (m_nChosenColorSel == nIndex)
00906         pDC->DrawEdge(rect, BDR_SUNKENOUTER, BF_RECT);
00907
00908     CBrush brush(PALETTERGB(GetRValue(GetColor(nIndex)),
00909                             GetGValue(GetColor(nIndex)),
00910                             GetBValue(GetColor(nIndex)) ));
00911     CPen   pen;
00912     pen.CreatePen(PS_SOLID, 1, ::GetSysColor(COLOR_3DSHADOW));
00913
00914     CBrush* pOldBrush = (CBrush*) pDC->SelectObject(&brush);
00915     CPen*   pOldPen   = (CPen*)   pDC->SelectObject(&pen);
00916
00917     // Draw the cell Color
00918     rect.DeflateRect(m_nMargin+1, m_nMargin+1);
00919     pDC->Rectangle(rect);
00920
00921     // restore DC and cleanup
00922     pDC->SelectObject(pOldBrush);
00923     pDC->SelectObject(pOldPen);
00924     brush.DeleteObject();
00925     pen.DeleteObject();
00926
00927     if (pOldPalette && pDC->GetDeviceCaps(RASTERCAPS) & RC_PALETTE)
00928         pDC->SelectPalette(pOldPalette, FALSE);
00929 }

Here is the call graph for this function:

void CCJColorPopup::EndSelection ( int nMessage ) [protected, virtual]

Definition at line 779 of file CJColorPopup.cpp.

References CPN_SELENDCANCEL, CUSTOM_BOX_VALUE, m_crColor, m_crInitialColor, m_nCurrentSel, and m_pParent.

Referenced by OnKeyDown(), and OnLButtonUp().

00780 {
00781     ReleaseCapture();
00782
00783     // If custom text selected, perform a custom Color selection
00784     if (nMessage != CPN_SELENDCANCEL && m_nCurrentSel == CUSTOM_BOX_VALUE)
00785     {
00786         CColorDialog dlg(m_crInitialColor, CC_FULLOPEN | CC_ANYCOLOR, this);
00787
00788         if (dlg.DoModal() == IDOK)
00789             m_crColor = dlg.GetColor();
00790         else
00791             nMessage = CPN_SELENDCANCEL;
00792     }
00793
00794     if (nMessage == CPN_SELENDCANCEL)
00795         m_crColor = m_crInitialColor;
00796
00797     m_pParent->SendMessage(nMessage, (WPARAM) m_crColor, 0);
00798
00799     DestroyWindow();
00800 }

void CCJColorPopup::FindCellFromColor ( COLORREF crColor ) [protected, virtual]

Definition at line 577 of file CJColorPopup.cpp.

References CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, GetColor(), INVALID_Color, m_nChosenColorSel, m_nNumColors, m_strCustomText, and m_strDefaultText.

Referenced by Create().

00578 {
00579     if (crColor == CLR_DEFAULT && m_strDefaultText.GetLength())
00580     {
00581         m_nChosenColorSel = DEFAULT_BOX_VALUE;
00582         return;
00583     }
00584
00585     for (int i = 0; i < m_nNumColors; i++)
00586     {
00587         if (GetColor(i) == crColor)
00588         {
00589             m_nChosenColorSel = i;
00590             return;
00591         }
00592     }
00593
00594     if (m_strCustomText.GetLength())
00595         m_nChosenColorSel = CUSTOM_BOX_VALUE;
00596     else
00597         m_nChosenColorSel = INVALID_Color;
00598 }

Here is the call graph for this function:

BOOL CCJColorPopup::GetCellRect | ( | int | nIndex,
 |  | const LPRECT & | rect
 | ) | [protected, virtual]

Definition at line 601 of file CJColorPopup.cpp.

References CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, GetColumn(), GetRow(), m_CustomTextRect, m_DefaultTextRect, m_nBoxSize, m_nMargin, m_nNumColors, and m_strDefaultText.

Referenced by CreateToolTips(), and DrawCell().

00602 {
00603     if (nIndex == CUSTOM_BOX_VALUE)
00604     {
00605         ::SetRect(rect,
00606                   m_CustomTextRect.left,  m_CustomTextRect.top,
00607                   m_CustomTextRect.right, m_CustomTextRect.bottom);
00608         return TRUE;
00609     }
00610     else if (nIndex == DEFAULT_BOX_VALUE)
00611     {
00612         ::SetRect(rect,
00613                   m_DefaultTextRect.left,  m_DefaultTextRect.top,
00614                   m_DefaultTextRect.right, m_DefaultTextRect.bottom);
00615         return TRUE;
00616     }
00617
00618     if (nIndex < 0 || nIndex >= m_nNumColors)
00619         return FALSE;
00620
00621     rect->left = GetColumn(nIndex) * m_nBoxSize + m_nMargin;
00622     rect->top  = GetRow(nIndex) * m_nBoxSize + m_nMargin;
00623
00624     // Move everything down if we are displaying a default text area
00625     if (m_strDefaultText.GetLength())
00626         rect->top += (m_nMargin + m_DefaultTextRect.Height());
00627
00628     rect->right = rect->left + m_nBoxSize;
00629     rect->bottom = rect->top + m_nBoxSize;
00630
00631     return TRUE;
00632 }

Here is the call graph for this function:

virtual COLORREF CCJColorPopup::GetColor ( int nIndex ) [inline, protected, virtual]

Definition at line 111 of file CJColorPopup.h.

Referenced by ChangeSelection(), DrawCell(), and FindCellFromColor().

00111 { return m_crColors[nIndex].crColor; }

virtual LPCTSTR CCJColorPopup::GetColorName ( int nIndex ) [inline, protected, virtual]

Definition at line 112 of file CJColorPopup.h.

Referenced by CreateToolTips().

00112 { return m_crColors[nIndex].szName; }

int CCJColorPopup::GetColumn ( int nIndex ) const [protected, virtual]

Definition at line 565 of file CJColorPopup.cpp.

References CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, INVALID_Color, m_nNumColors, m_nNumColumns, m_strCustomText, and m_strDefaultText.

Referenced by GetCellRect(), and OnKeyDown().

00566 {
00567     if (nIndex == CUSTOM_BOX_VALUE && m_strCustomText.GetLength())
00568         return CUSTOM_BOX_VALUE;
00569     else if (nIndex == DEFAULT_BOX_VALUE && m_strDefaultText.GetLength())
00570         return DEFAULT_BOX_VALUE;
00571     else if (nIndex < 0 || nIndex >= m_nNumColors)
00572         return INVALID_Color;
00573     else
00574         return nIndex % m_nNumColumns;
00575 }

int CCJColorPopup::GetIndex | ( | int | row,
 |  | int | col
 | ) | const [protected, virtual]

Definition at line 536 of file CJColorPopup.cpp.

References CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, INVALID_Color, m_nNumColors, m_nNumColumns, m_nNumRows, m_strCustomText, and m_strDefaultText.

Referenced by OnKeyDown(), and OnMouseMove().

00537 {
00538     if ((row == CUSTOM_BOX_VALUE || col == CUSTOM_BOX_VALUE) && m_strCustomText.GetLength())
00539         return CUSTOM_BOX_VALUE;
00540     else if ((row == DEFAULT_BOX_VALUE || col == DEFAULT_BOX_VALUE) && m_strDefaultText.GetLength())
00541         return DEFAULT_BOX_VALUE;
00542     else if (row < 0 || col < 0 || row >= m_nNumRows || col >= m_nNumColumns)
00543         return INVALID_Color;
00544     else
00545     {
00546         if (row*m_nNumColumns + col >= m_nNumColors)
00547             return INVALID_Color;
00548         else
00549             return row*m_nNumColumns + col;
00550     }
00551 }

int CCJColorPopup::GetRow ( int nIndex ) const [protected, virtual]

Definition at line 553 of file CJColorPopup.cpp.

References CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, INVALID_Color, m_nNumColors, m_nNumColumns, m_strCustomText, and m_strDefaultText.

Referenced by GetCellRect(), and OnKeyDown().

00554 {
00555     if (nIndex == CUSTOM_BOX_VALUE && m_strCustomText.GetLength())
00556         return CUSTOM_BOX_VALUE;
00557     else if (nIndex == DEFAULT_BOX_VALUE && m_strDefaultText.GetLength())
00558         return DEFAULT_BOX_VALUE;
00559     else if (nIndex < 0 || nIndex >= m_nNumColors)
00560         return INVALID_Color;
00561     else
00562         return nIndex / m_nNumColumns;
00563 }

void CCJColorPopup::Initialise ( ) [virtual]

Definition at line 162 of file CJColorPopup.cpp.

References INVALID_Color, m_crColor, m_crColors, m_crInitialColor, m_nBoxSize, m_nChosenColorSel, m_nCurrentSel, m_nMargin, m_nNumColors, m_nNumColumns, m_nNumRows, m_Palette, m_pParent, MAX_ColorS, and NULL.

Referenced by CCJColorPopup().

00163 {
00164     m_nNumColors       = sizeof(m_crColors)/sizeof(ColorTableEntry);
00165     ASSERT(m_nNumColors <= MAX_ColorS);
00166     if (m_nNumColors > MAX_ColorS)
00167         m_nNumColors = MAX_ColorS;
00168
00169     m_nNumColumns       = 0;
00170     m_nNumRows          = 0;
00171     m_nBoxSize          = 18;
00172     m_nMargin           = ::GetSystemMetrics(SM_CXEDGE);
00173     m_nCurrentSel       = INVALID_Color;
00174     m_nChosenColorSel  = INVALID_Color;
00175     m_pParent           = NULL;
00176     m_crColor          = m_crInitialColor = RGB(0,0,0);
00177
00178     // Idiot check: Make sure the Color square is at least 5 x 5;
00179     if (m_nBoxSize - 2*m_nMargin - 2 < 5) m_nBoxSize = 5 + 2*m_nMargin + 2;
00180
00181     // Create the palette
00182     struct {
00183         LOGPALETTE    LogPalette;
00184         PALETTEENTRY  PalEntry[MAX_ColorS];
00185     } pal;
00186
00187     LOGPALETTE* pLogPalette = (LOGPALETTE*) &pal;
00188     pLogPalette->palVersion    = 0x300;
00189     pLogPalette->palNumEntries = (WORD) m_nNumColors;
00190
00191     for (int i = 0; i < m_nNumColors; i++)
00192     {
00193         pLogPalette->palPalEntry[i].peRed   = GetRValue(m_crColors[i].crColor);
00194         pLogPalette->palPalEntry[i].peGreen = GetGValue(m_crColors[i].crColor);
00195         pLogPalette->palPalEntry[i].peBlue  = GetBValue(m_crColors[i].crColor);
00196         pLogPalette->palPalEntry[i].peFlags = 0;
00197     }
00198
00199     m_Palette.CreatePalette(pLogPalette);
00200 }

void CCJColorPopup::OnActivateApp | ( | BOOL | bActive,
 |  | HTASK | hTask
 | ) | [protected]

Definition at line 955 of file CJColorPopup.cpp.

References CPN_SELENDCANCEL.

00959 {
00960     CWnd::OnActivateApp(bActive, hTask);
00961
00962     // If Deactivating App, cancel this selection
00963     if (!bActive)
00964          EndSelection(CPN_SELENDCANCEL);
00965 }

BOOL CCJColorPopup::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 977 of file CJColorPopup.cpp.

00978 {
00979     // KStowell - overridden for flicker-free drawing.
00980     UNUSED_ALWAYS(pDC);
00981     return TRUE;
00982 }

void CCJColorPopup::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

Definition at line 280 of file CJColorPopup.cpp.

References ChangeSelection(), CPN_SELENDCANCEL, CPN_SELENDOK, CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, EndSelection(), GetColumn(), GetIndex(), GetRow(), INVALID_Color, m_crColor, m_crInitialColor, m_nCurrentSel, m_nNumColors, m_nNumColumns, m_strCustomText, and m_strDefaultText.

00281 {
00282     int row = GetRow(m_nCurrentSel),
00283         col = GetColumn(m_nCurrentSel);
00284
00285     if (nChar == VK_DOWN)
00286     {
00287         if (row == DEFAULT_BOX_VALUE)
00288             row = col = 0;
00289         else if (row == CUSTOM_BOX_VALUE)
00290         {
00291             if (m_strDefaultText.GetLength())
00292                 row = col = DEFAULT_BOX_VALUE;
00293             else
00294                 row = col = 0;
00295         }
00296         else
00297         {
00298             row++;
00299             if (GetIndex(row,col) < 0)
00300             {
00301                 if (m_strCustomText.GetLength())
00302                     row = col = CUSTOM_BOX_VALUE;
00303                 else if (m_strDefaultText.GetLength())
00304                     row = col = DEFAULT_BOX_VALUE;
00305                 else
00306                     row = col = 0;
00307             }
00308         }
00309         ChangeSelection(GetIndex(row, col));
00310     }
00311
00312     if (nChar == VK_UP)
00313     {
00314         if (row == DEFAULT_BOX_VALUE)
00315         {
00316             if (m_strCustomText.GetLength())
00317                 row = col = CUSTOM_BOX_VALUE;
00318             else
00319            {
00320                 row = GetRow(m_nNumColors-1);
00321                 col = GetColumn(m_nNumColors-1);
00322             }
00323         }
00324         else if (row == CUSTOM_BOX_VALUE)
00325         {
00326             row = GetRow(m_nNumColors-1);
00327             col = GetColumn(m_nNumColors-1);
00328         }
00329         else if (row > 0) row--;
00330         else /* row == 0 */
00331         {
00332             if (m_strDefaultText.GetLength())
00333                 row = col = DEFAULT_BOX_VALUE;
00334             else if (m_strCustomText.GetLength())
00335                 row = col = CUSTOM_BOX_VALUE;
00336             else
00337             {
00338                 row = GetRow(m_nNumColors-1);
00339                 col = GetColumn(m_nNumColors-1);
00340             }
00341         }
00342         ChangeSelection(GetIndex(row, col));
00343     }
00344
00345     if (nChar == VK_RIGHT)
00346     {
00347         if (row == DEFAULT_BOX_VALUE)
00348             row = col = 0;
00349         else if (row == CUSTOM_BOX_VALUE)
00350         {
00351             if (m_strDefaultText.GetLength())
00352                 row = col = DEFAULT_BOX_VALUE;
00353             else
00354                 row = col = 0;
00355         }
00356         else if (col < m_nNumColumns-1)
00357             col++;
00358         else
00359         {
00360             col = 0; row++;
00361         }
00362
00363         if (GetIndex(row,col) == INVALID_Color)
00364         {
00365             if (m_strCustomText.GetLength())
00366                 row = col = CUSTOM_BOX_VALUE;
00367             else if (m_strDefaultText.GetLength())
00368                 row = col = DEFAULT_BOX_VALUE;
00369             else
00370                 row = col = 0;
00371         }
00372
00373         ChangeSelection(GetIndex(row, col));
00374     }
00375
00376     if (nChar == VK_LEFT)
00377     {
00378         if (row == DEFAULT_BOX_VALUE)
00379         {
00380             if (m_strCustomText.GetLength())
00381                 row = col = CUSTOM_BOX_VALUE;
00382             else
00383            {
00384                 row = GetRow(m_nNumColors-1);
00385                 col = GetColumn(m_nNumColors-1);
00386             }
00387         }
00388         else if (row == CUSTOM_BOX_VALUE)
00389         {
00390             row = GetRow(m_nNumColors-1);
00391             col = GetColumn(m_nNumColors-1);
00392         }
00393         else if (col > 0) col--;
00394         else /* col == 0 */
00395         {
00396             if (row > 0) { row--; col = m_nNumColumns-1; }
00397             else
00398             {
00399                 if (m_strDefaultText.GetLength())
00400                     row = col = DEFAULT_BOX_VALUE;
00401                 else if (m_strCustomText.GetLength())
00402                     row = col = CUSTOM_BOX_VALUE;
00403                 else
00404                 {
00405                     row = GetRow(m_nNumColors-1);
00406                     col = GetColumn(m_nNumColors-1);
00407                 }
00408             }
00409         }
00410         ChangeSelection(GetIndex(row, col));
00411     }
00412
00413     if (nChar == VK_ESCAPE)
00414     {
00415         m_crColor = m_crInitialColor;
00416         EndSelection(CPN_SELENDCANCEL);
00417         return;
00418     }
00419
00420     if (nChar == VK_RETURN || nChar == VK_SPACE)
00421     {
00422         EndSelection(CPN_SELENDOK);
00423         return;
00424     }
00425
00426     CWnd::OnKeyDown(nChar, nRepCnt, nFlags);
00427 }

Here is the call graph for this function:

void CCJColorPopup::OnKillFocus ( CWnd * pNewWnd ) [protected]

Definition at line 945 of file CJColorPopup.cpp.

00946 {
00947     CWnd::OnKillFocus(pNewWnd);
00948
00949     ReleaseCapture();
00950     //DestroyWindow(); - causes crash when Custom Color dialog appears.
00951 }

void CCJColorPopup::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 520 of file CJColorPopup.cpp.

References CPN_SELENDCANCEL, CPN_SELENDOK, EndSelection(), and m_WindowRect.

00521 {
00522     CWnd::OnLButtonUp(nFlags, point);
00523
00524     DWORD pos = GetMessagePos();
00525     point = CPoint(LOWORD(pos), HIWORD(pos));
00526
00527     if (m_WindowRect.PtInRect(point))
00528         EndSelection(CPN_SELENDOK);
00529     else
00530         EndSelection(CPN_SELENDCANCEL);
00531 }

Here is the call graph for this function:

void CCJColorPopup::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 481 of file CJColorPopup.cpp.

References ChangeSelection(), CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, GetIndex(), INVALID_Color, m_CustomTextRect, m_DefaultTextRect, m_nBoxSize, m_nCurrentSel, m_nMargin, m_nNumColors, m_strCustomText, and m_strDefaultText.

00482 {
00483     int nNewSelection = INVALID_Color;
00484
00485     // Translate points to be relative raised window edge
00486     point.x -= m_nMargin;
00487     point.y -= m_nMargin;
00488
00489     // First check we aren't in text box
00490     if (m_strCustomText.GetLength() && m_CustomTextRect.PtInRect(point))
00491         nNewSelection = CUSTOM_BOX_VALUE;
00492     else if (m_strDefaultText.GetLength() && m_DefaultTextRect.PtInRect(point))
00493         nNewSelection = DEFAULT_BOX_VALUE;
00494     else
00495     {
00496         // Take into account text box
00497         if (m_strDefaultText.GetLength())
00498             point.y -= m_DefaultTextRect.Height();
00499
00500         // Get the row and column
00501         nNewSelection = GetIndex(point.y / m_nBoxSize, point.x / m_nBoxSize);
00502
00503         // In range? If not, default and exit
00504         if (nNewSelection < 0 || nNewSelection >= m_nNumColors)
00505         {
00506             CWnd::OnMouseMove(nFlags, point);
00507             return;
00508         }
00509     }
00510
00511     // OK - we have the row and column of the current selection (may be CUSTOM_BOX_VALUE)
00512     // Has the row/col selection changed? If yes, then redraw old and new cells.
00513     if (nNewSelection != m_nCurrentSel)
00514         ChangeSelection(nNewSelection);
00515
00516     CWnd::OnMouseMove(nFlags, point);
00517 }

Here is the call graph for this function:

void CCJColorPopup::OnNcDestroy ( ) [protected]

Definition at line 430 of file CJColorPopup.cpp.

00431 {
00432     CWnd::OnNcDestroy();
00433     delete this;
00434 }

void CCJColorPopup::OnPaint ( ) [protected]

Definition at line 436 of file CJColorPopup.cpp.

References CUSTOM_BOX_VALUE, DEFAULT_BOX_VALUE, DrawCell(), m_nNumColors, m_strCustomText, and m_strDefaultText.

00437 {
00438     CPaintDC dc(this); // device context for painting
00439
00440     // KStowell - Get the client rect for this control.
00441     CRect rcClient;
00442     GetClientRect(&rcClient);
00443
00444     // KStowell - Create a memory device-context. This is done to help reduce
00445     // screen flicker, since we will paint the entire control to the
00446     // off screen device context first.
00447     CDC memDC;
00448     memDC.CreateCompatibleDC(&dc);
00449     CBitmap bitmap;
00450     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00451     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00452     memDC.FillSolidRect(rcClient, ::GetSysColor(COLOR_BTNFACE));
00453
00454     // Draw the Default Area text
00455     if (m_strDefaultText.GetLength())
00456         DrawCell(&memDC, DEFAULT_BOX_VALUE);
00457
00458     // Draw Color cells
00459     for (int i = 0; i < m_nNumColors; i++)
00460         DrawCell(&memDC, i);
00461
00462     // Draw custom text
00463     if (m_strCustomText.GetLength())
00464         DrawCell(&memDC, CUSTOM_BOX_VALUE);
00465
00466     // Draw raised window edge (ex-window style WS_EX_WINDOWEDGE is sposed to do this,
00467     // but for some reason isn't
00468     CRect rect;
00469     GetClientRect(rect);
00470     memDC.DrawEdge(rect, EDGE_RAISED, BF_RECT);
00471
00472     // KStowell - copy the memory device context back into the original DC via BitBlt().
00473     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00474
00475     // KStowell - cleanup.
00476     memDC.SelectObject(pOldBitmap);
00477     memDC.DeleteDC();
00478     bitmap.DeleteObject();
00479 }

Here is the call graph for this function:

void CCJColorPopup::OnPaletteChanged ( CWnd * pFocusWnd ) [protected]

Definition at line 937 of file CJColorPopup.cpp.

00938 {
00939     CWnd::OnPaletteChanged(pFocusWnd);
00940
00941     if (pFocusWnd->GetSafeHwnd() != GetSafeHwnd())
00942         Invalidate();
00943 }

BOOL CCJColorPopup::OnQueryNewPalette ( ) [protected]

Definition at line 931 of file CJColorPopup.cpp.

00932 {
00933     Invalidate();
00934     return CWnd::OnQueryNewPalette();
00935 }

BOOL CCJColorPopup::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 273 of file CJColorPopup.cpp.

00274 {
00275     m_ToolTip.RelayEvent(pMsg);
00276     return CWnd::PreTranslateMessage(pMsg);
00277 }

void CCJColorPopup::SetWindowSize ( ) [protected, virtual]

Definition at line 635 of file CJColorPopup.cpp.

References m_CustomTextRect, m_DefaultTextRect, m_Font, m_nBoxSize, m_nMargin, m_nNumColors, m_nNumColumns, m_nNumRows, m_pParent, m_strCustomText, m_strDefaultText, m_WindowRect, and NUM_COLUMNS.

Referenced by Create().

00636 {
00637     CSize TextSize;
00638
00639     // If we are showing a custom or default text area, get the font and text size.
00640     if (m_strCustomText.GetLength() || m_strDefaultText.GetLength())
00641     {
00642         CClientDC dc(this);
00643         CFont* pOldFont = (CFont*) dc.SelectObject(&m_Font);
00644
00645         // Get the size of the custom text (if there IS custom text)
00646         TextSize = CSize(0,0);
00647         if (m_strCustomText.GetLength())
00648             TextSize = dc.GetTextExtent(m_strCustomText);
00649
00650         // Get the size of the default text (if there IS default text)
00651         if (m_strDefaultText.GetLength())
00652         {
00653             CSize DefaultSize = dc.GetTextExtent(m_strDefaultText);
00654             if (DefaultSize.cx > TextSize.cx) TextSize.cx = DefaultSize.cx;
00655             if (DefaultSize.cy > TextSize.cy) TextSize.cy = DefaultSize.cy;
00656         }
00657
00658         dc.SelectObject(pOldFont);
00659         TextSize += CSize(2*m_nMargin,2*m_nMargin);
00660
00661         // Add even more space to draw the horizontal line
00662         TextSize.cy += 2*m_nMargin + 2;
00663     }
00664
00665     // Get the number of columns and rows
00666     //m_nNumColumns = (int) sqrt((double)m_nNumColors);    // for a square window (yuk)
00667     m_nNumColumns = NUM_COLUMNS;
00668     m_nNumRows = m_nNumColors / m_nNumColumns;
00669     if (m_nNumColors % m_nNumColumns) m_nNumRows++;
00670
00671     // Get the current window position, and set the new size
00672     CRect rect;
00673     GetWindowRect(rect);
00674
00675     m_WindowRect.SetRect(rect.left, rect.top,
00676                          rect.left + m_nNumColumns*m_nBoxSize + 2*m_nMargin,
00677                          rect.top  + m_nNumRows*m_nBoxSize + 2*m_nMargin);
00678
00679     // if custom text, then expand window if necessary, and set text width as
00680     // window width
00681     if (m_strDefaultText.GetLength())
00682     {
00683         if (TextSize.cx > m_WindowRect.Width())
00684             m_WindowRect.right = m_WindowRect.left + TextSize.cx;
00685         TextSize.cx = m_WindowRect.Width()-2*m_nMargin;
00686
00687         // Work out the text area
00688         m_DefaultTextRect.SetRect(m_nMargin, m_nMargin,
00689                                   m_nMargin+TextSize.cx, 2*m_nMargin+TextSize.cy);
00690         m_WindowRect.bottom += m_DefaultTextRect.Height() + 2*m_nMargin;
00691     }
00692
00693     // if custom text, then expand window if necessary, and set text width as
00694     // window width
00695     if (m_strCustomText.GetLength())
00696     {
00697         if (TextSize.cx > m_WindowRect.Width())
00698             m_WindowRect.right = m_WindowRect.left + TextSize.cx;
00699         TextSize.cx = m_WindowRect.Width()-2*m_nMargin;
00700
00701         // Work out the text area
00702         m_CustomTextRect.SetRect(m_nMargin, m_WindowRect.Height(),
00703                                  m_nMargin+TextSize.cx,
00704                                  m_WindowRect.Height()+m_nMargin+TextSize.cy);
00705         m_WindowRect.bottom += m_CustomTextRect.Height() + 2*m_nMargin;
00706    }
00707
00708     // Need to check it'll fit on screen: Too far right?
00709     CSize ScreenSize(::GetSystemMetrics(SM_CXSCREEN), ::GetSystemMetrics(SM_CYSCREEN));
00710     if (m_WindowRect.right > ScreenSize.cx)
00711         m_WindowRect.OffsetRect(-(m_WindowRect.right - ScreenSize.cx), 0);
00712
00713     // Too far left?
00714     if (m_WindowRect.left < 0)
00715         m_WindowRect.OffsetRect( -m_WindowRect.left, 0);
00716
00717     // Bottom falling out of screen?
00718     if (m_WindowRect.bottom > ScreenSize.cy)
00719     {
00720         CRect ParentRect;
00721         m_pParent->GetWindowRect(ParentRect);
00722         m_WindowRect.OffsetRect(0, -(ParentRect.Height() + m_WindowRect.Height()));
00723     }
00724
00725     // Set the window size and position
00726     MoveWindow(m_WindowRect, TRUE);
00727 }

void CCJColorPopup::UpdateFont ( ) [virtual]

Definition at line 967 of file CJColorPopup.cpp.

References m_Font.

Referenced by Create().

00968 {
00969     m_Font.DeleteObject();
00970     NONCLIENTMETRICS ncm;
00971     ncm.cbSize = sizeof(ncm);
00972     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00973     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00974     SetFont(&m_Font);
00975 }

Member Data Documentation

COLORREF CCJColorPopup::m_crColor [protected]

Definition at line 130 of file CJColorPopup.h.

Referenced by CCJColorPopup(), ChangeSelection(), Create(), EndSelection(), Initialise(), and OnKeyDown().

ColorTableEntry CCJColorPopup::m_crColors [static, protected]

Definition at line 82 of file CJColorPopup.cpp.

Referenced by Initialise().

COLORREF CCJColorPopup::m_crInitialColor [protected]

Definition at line 130 of file CJColorPopup.h.

Referenced by CCJColorPopup(), ChangeSelection(), Create(), EndSelection(), Initialise(), and OnKeyDown().

CRect CCJColorPopup::m_CustomTextRect [protected]

Definition at line 127 of file CJColorPopup.h.

Referenced by DrawCell(), GetCellRect(), OnMouseMove(), and SetWindowSize().

CRect CCJColorPopup::m_DefaultTextRect [protected]

Definition at line 127 of file CJColorPopup.h.

Referenced by DrawCell(), GetCellRect(), OnMouseMove(), and SetWindowSize().

CFont CCJColorPopup::m_Font [protected]

Definition at line 128 of file CJColorPopup.h.

Referenced by DrawCell(), SetWindowSize(), UpdateFont(), and ~CCJColorPopup().

int CCJColorPopup::m_nBoxSize [protected]

Definition at line 122 of file CJColorPopup.h.

Referenced by GetCellRect(), Initialise(), OnMouseMove(), and SetWindowSize().

int CCJColorPopup::m_nChosenColorSel [protected]

Definition at line 124 of file CJColorPopup.h.

Referenced by DrawCell(), FindCellFromColor(), and Initialise().

int CCJColorPopup::m_nCurrentSel [protected]

Definition at line 123 of file CJColorPopup.h.

Referenced by ChangeSelection(), DrawCell(), EndSelection(), Initialise(), OnKeyDown(), and OnMouseMove().

int CCJColorPopup::m_nMargin [protected]

Definition at line 122 of file CJColorPopup.h.

Referenced by DrawCell(), GetCellRect(), Initialise(), OnMouseMove(), and SetWindowSize().

int CCJColorPopup::m_nNumColors [protected]

Definition at line 120 of file CJColorPopup.h.

Referenced by ChangeSelection(), CreateToolTips(), FindCellFromColor(), GetCellRect(), GetColumn(), GetIndex(), GetRow(), Initialise(), OnKeyDown(), OnMouseMove(), OnPaint(), and SetWindowSize().

int CCJColorPopup::m_nNumColumns [protected]

Definition at line 121 of file CJColorPopup.h.

Referenced by GetColumn(), GetIndex(), GetRow(), Initialise(), OnKeyDown(), and SetWindowSize().

int CCJColorPopup::m_nNumRows [protected]

Definition at line 121 of file CJColorPopup.h.

Referenced by GetIndex(), Initialise(), and SetWindowSize().

CPalette CCJColorPopup::m_Palette [protected]

Definition at line 129 of file CJColorPopup.h.

Referenced by DrawCell(), Initialise(), and ~CCJColorPopup().

CWnd* CCJColorPopup::m_pParent [protected]

Definition at line 132 of file CJColorPopup.h.

Referenced by CCJColorPopup(), ChangeSelection(), Create(), EndSelection(), Initialise(), and SetWindowSize().

CString CCJColorPopup::m_strCustomText [protected]

Definition at line 126 of file CJColorPopup.h.

Referenced by CCJColorPopup(), Create(), DrawCell(), FindCellFromColor(), GetColumn(), GetIndex(), GetRow(), OnKeyDown(), OnMouseMove(), OnPaint(), and SetWindowSize().

CString CCJColorPopup::m_strDefaultText [protected]

Definition at line 125 of file CJColorPopup.h.

Referenced by CCJColorPopup(), Create(), DrawCell(), FindCellFromColor(), GetCellRect(), GetColumn(), GetIndex(), GetRow(), OnKeyDown(), OnMouseMove(), OnPaint(), and SetWindowSize().

CToolTipCtrl CCJColorPopup::m_ToolTip [protected]

Definition at line 131 of file CJColorPopup.h.

Referenced by CreateToolTips().

CRect CCJColorPopup::m_WindowRect [protected]

Definition at line 127 of file CJColorPopup.h.

Referenced by OnLButtonUp(), and SetWindowSize().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJColorPopup.h
  • WinCvs/CJLib/CJLibrary/CJColorPopup.cpp
Generated on Sat Aug 7 22:48:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJComboBoxEx Class Reference

CCJComboBoxEx Class Reference

#include <CJComboBoxEx.h>

Inheritance diagram for CCJComboBoxEx:

[legend]
Collaboration diagram for CCJComboBoxEx:

[legend]
List of all members.

Public Member Functions

CCJComboBoxEx ()
virtual | ~CCJComboBoxEx ()
BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)
int | DeleteItem (int iIndex)
BOOL | GetItem (COMBOBOXEXITEM *pCBItem)
int | InsertItem (const COMBOBOXEXITEM *pCBItem)
int | InsertItem (int iItem, UINT nStringID, int iIndent=0, int iImage=0, int iSelectedImage=0, UINT mask=CBEIF_TEXT|CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_INDENT)
int | InsertItem (int iItem, LPCTSTR lpszItem, int iIndent=0, int iImage=0, int iSelectedImage=0, UINT mask=CBEIF_TEXT|CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_INDENT)
BOOL | SetItem (const COMBOBOXEXITEM *pCBItem)
DWORD | GetExtendedStyle () const
DWORD | SetExtendedStyle (DWORD dwExMask, DWORD dwExStyles)
BOOL | HasEditChanged ()
CEdit * | GetEditCtrl ()
CComboBox * GetComboBoxCtrl ()
CImageList * | GetImageList () const
CImageList * | SetImageList (CImageList *pImageList)
int | Dir (UINT attr, LPCTSTR lpszWildCard)
int | FindString (int nIndexStart, LPCTSTR lpszFind) const
int | AddString (LPCTSTR lpszString)
BOOL | SetEditSel (int nStartChar, int nEndChar)
int | InsertString (int nIndex, LPCTSTR lpszString)

Constructor & Destructor Documentation

_CJXLIB_INLINE CCJComboBoxEx::CCJComboBoxEx ( )

Definition at line 243 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00244     { }

CCJComboBoxEx::~CCJComboBoxEx ( ) [virtual]

Definition at line 126 of file CJComboBoxEx.cpp.

00127 {
00128     DestroyWindow();
00129 }

Member Function Documentation

_CJXLIB_INLINE int CCJComboBoxEx::AddString ( LPCTSTR lpszString )

Definition at line 267 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00268     { UNUSED_ALWAYS(lpszString); ASSERT(FALSE); return CB_ERR; }

BOOL CCJComboBoxEx::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) |

Definition at line 55 of file CJComboBoxEx.cpp.

References NULL.

00057 {
00058   // initialize common controls
00059 #ifdef _VC_VERSION_5
00060     INITCOMMONCONTROLSEX icex;
00061     icex.dwSize = sizeof(icex);
00062     icex.dwICC = ICC_USEREX_CLASSES;
00063     VERIFY(InitCommonControlsEx(&icex));
00064 #else
00065     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_USEREX_REG));
00066 #endif
00067
00068     CWnd* pWnd = this;
00069     return pWnd->Create(WC_COMBOBOXEX, NULL, dwStyle, rect, pParentWnd, nID);
00070 }

int CCJComboBoxEx::DeleteItem ( int iIndex )

Definition at line 72 of file CJComboBoxEx.cpp.

00073 {
00074     ASSERT(::IsWindow(m_hWnd));
00075     return (int) ::SendMessage(m_hWnd, CBEM_DELETEITEM, (WPARAM) iIndex, 0);
00076 }

_CJXLIB_INLINE int CCJComboBoxEx::Dir | ( | UINT | attr,
 |  | LPCTSTR | lpszWildCard
 | ) |

Definition at line 263 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00264     { UNUSED_ALWAYS(attr); UNUSED_ALWAYS(lpszWildCard); ASSERT(FALSE); return CB_ERR; }

_CJXLIB_INLINE int CCJComboBoxEx::FindString | ( | int | nIndexStart,
 |  | LPCTSTR | lpszFind
 | ) | const

Definition at line 265 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00266     { UNUSED_ALWAYS(nIndexStart); UNUSED_ALWAYS(lpszFind); ASSERT(FALSE); return CB_ERR; }

_CJXLIB_INLINE CComboBox * CCJComboBoxEx::GetComboBoxCtrl ( )

Definition at line 253 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00254     { ASSERT(::IsWindow(m_hWnd)); return (CComboBox*) CComboBox::FromHandle((HWND) ::SendMessage(m_hWnd, CBEM_GETCOMBOCONTROL, 0, 0)); }

_CJXLIB_INLINE CEdit * CCJComboBoxEx::GetEditCtrl ( )

Definition at line 251 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00252     { ASSERT(::IsWindow(m_hWnd)); return (CEdit*) CEdit::FromHandle((HWND) ::SendMessage(m_hWnd, CBEM_GETEDITCONTROL, 0, 0)); }

_CJXLIB_INLINE DWORD CCJComboBoxEx::GetExtendedStyle ( ) const

Definition at line 245 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00246     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, CBEM_GETEXTENDEDSTYLE, 0, 0); }

_CJXLIB_INLINE CImageList * CCJComboBoxEx::GetImageList ( ) const

Definition at line 257 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00258     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, CBEM_GETIMAGELIST, 0, 0)); }

BOOL CCJComboBoxEx::GetItem ( COMBOBOXEXITEM * pCBItem )

Definition at line 78 of file CJComboBoxEx.cpp.

References NULL.

00079 {
00080     ASSERT(::IsWindow(m_hWnd));
00081     ASSERT(pCBItem != NULL);
00082     ASSERT(AfxIsValidAddress(pCBItem, sizeof(COMBOBOXEXITEM)));
00083
00084     return (int) ::SendMessage(m_hWnd, CBEM_GETITEM, 0, (LPARAM) pCBItem);
00085 }

_CJXLIB_INLINE BOOL CCJComboBoxEx::HasEditChanged ( )

Definition at line 249 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00250     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, CBEM_HASEDITCHANGED, 0, 0); }

int CCJComboBoxEx::InsertItem | ( | int | iItem,
 |  | LPCTSTR | lpszItem,
 |  | int | iIndent = 0,
 |  | int | iImage = 0,
 |  | int | iSelectedImage = 0,
 |  | UINT | mask = CBEIF_TEXT|CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_INDENT
 | ) |

Definition at line 103 of file CJComboBoxEx.cpp.

References InsertItem().

00104 {
00105     COMBOBOXEXITEM cbItem;
00106
00107     cbItem.mask             = mask;
00108     cbItem.iItem            = iItem;
00109     cbItem.pszText          = const_cast<LPTSTR>(lpszItem);
00110     cbItem.iImage           = iImage;
00111     cbItem.iSelectedImage   = iSelectedImage;
00112     cbItem.iIndent          = iIndent;
00113
00114     return InsertItem(&cbItem);
00115 }

Here is the call graph for this function:

int CCJComboBoxEx::InsertItem | ( | int | iItem,
 |  | UINT | nStringID,
 |  | int | iIndent = 0,
 |  | int | iImage = 0,
 |  | int | iSelectedImage = 0,
 |  | UINT | mask = CBEIF_TEXT|CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_INDENT
 | ) |

Definition at line 96 of file CJComboBoxEx.cpp.

References InsertItem().

00097 {
00098     CString strItem;
00099     strItem.LoadString(nStringID);
00100     return InsertItem(iItem, strItem, iIndent, iImage, iSelectedImage, mask);
00101 }

Here is the call graph for this function:

int CCJComboBoxEx::InsertItem ( const COMBOBOXEXITEM * pCBItem )

Definition at line 87 of file CJComboBoxEx.cpp.

References NULL.

Referenced by InsertItem().

00088 {
00089     ASSERT(::IsWindow(m_hWnd));
00090     ASSERT(pCBItem != NULL);
00091     ASSERT(AfxIsValidAddress(pCBItem, sizeof(COMBOBOXEXITEM), FALSE));
00092
00093     return (int) ::SendMessage(m_hWnd, CBEM_INSERTITEM, 0, (LPARAM) pCBItem);
00094 }

_CJXLIB_INLINE int CCJComboBoxEx::InsertString | ( | int | nIndex,
 |  | LPCTSTR | lpszString
 | ) |

Definition at line 271 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00272     { UNUSED_ALWAYS(nIndex); UNUSED_ALWAYS(lpszString); ASSERT(FALSE); return CB_ERR; }

_CJXLIB_INLINE BOOL CCJComboBoxEx::SetEditSel | ( | int | nStartChar,
 |  | int | nEndChar
 | ) |

Definition at line 269 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00270     { UNUSED_ALWAYS(nStartChar); UNUSED_ALWAYS(nEndChar); ASSERT(FALSE); return FALSE; }

_CJXLIB_INLINE DWORD CCJComboBoxEx::SetExtendedStyle | ( | DWORD | dwExMask,
 |  | DWORD | dwExStyles
 | ) |

Definition at line 247 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00248     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, CBEM_SETEXTENDEDSTYLE, (DWORD) dwExMask, (LPARAM) dwExStyles); }

_CJXLIB_INLINE CImageList * CCJComboBoxEx::SetImageList ( CImageList * pImageList )

Definition at line 255 of file CJComboBoxEx.h.

References _CJXLIB_INLINE.

00256     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, CBEM_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }

BOOL CCJComboBoxEx::SetItem ( const COMBOBOXEXITEM * pCBItem )

Definition at line 117 of file CJComboBoxEx.cpp.

References NULL.

00118 {
00119     ASSERT(::IsWindow(m_hWnd));
00120     ASSERT(pCBItem != NULL);
00121     ASSERT(AfxIsValidAddress(pCBItem, sizeof(COMBOBOXEXITEM), FALSE));
00122
00123     return (int) ::SendMessage(m_hWnd, CBEM_SETITEM, 0, (LPARAM) pCBItem);
00124 }

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJComboBoxEx.h
  • WinCvs/CJLib/CJLibrary/CJComboBoxEx.cpp
Generated on Sat Aug 7 22:48:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJControlBar Class Reference

CCJControlBar Class Reference

#include <CJControlBar.h>

Inheritance diagram for CCJControlBar:

[legend]
Collaboration diagram for CCJControlBar:

[legend]
List of all members.

Public Member Functions

CCJControlBar ()
virtual | ~CCJControlBar ()
virtual void | EnableSaveState (bool bAutoSave=true)
virtual BOOL | Create (CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName=NULL, CSize sizeDefault=CSize(200, 100), DWORD dwStyle=CBRS_LEFT, BOOL bFlatBorders=FALSE)
virtual void | GetChildRect (CRect &rect)
virtual int | GetMinExt ()
virtual BOOL | IsLeftDocked () const
virtual BOOL | IsRightDocked () const
virtual BOOL | IsTopDocked () const
virtual BOOL | IsBottomDocked () const
virtual BOOL | IsHorzDocked () const
virtual BOOL | IsVertDocked () const
virtual BOOL | IsFloating () const
virtual void | SetNormalSize (const CSize &cs)
virtual void | Normalize ()
virtual void | Minimize ()
virtual void | Maximize (int size)
virtual void | EnableDockingOnSizeBar (DWORD dwDockStyle)
virtual void | ShowFrameControls (BOOL bGripper=TRUE, BOOL bButtons=TRUE)
virtual void | SetMenuID (UINT popupMenuID, UINT popToolbarID=0, int nPos=0)
virtual UINT | GetMenuID ()
virtual void | EnableFlatLook (BOOL bFlat=TRUE)
virtual void | EnableFlatLook (BOOL bGripper, BOOL bBorder, BOOL bButtons)
virtual int | GetVertSize ()
virtual int | GetHorzSize ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHndler)
virtual CSize | CalcDynamicLayout (int nLength, DWORD nMode)

Public Attributes

BOOL | m_bUnique
BOOL | m_bToFit
CHILD_BORDER m_eChildBorder

Protected Member Functions

virtual CRect | GetGripperRect ()
virtual CRect | GetButtonRect ()
virtual void | DrawGripper (CDC *pDC)
virtual void | SetChild (CWnd *pWnd)
virtual void | OnInvertTracker (const CRect &rect)
virtual void | HitTest (CPoint &point)
virtual void | DrawBorders (CDC *pDC, CRect &rect)
virtual void | EraseNonClient ()
virtual void | DrawGriperCaption (CDC *pDC, LPRECT pRect)
virtual void | LoadBarState (CSize &size, int nID)
virtual void | SaveBarState (CSize &size)
afx_msg void | OnNcPaint ()
afx_msg void | OnPaint ()
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg UINT | OnNcHitTest (CPoint point)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnButtonClose ()
afx_msg void | OnUpdateButtonClose (CCmdUI *pCmdUI)
afx_msg void | OnButtonMinimize ()
afx_msg void | OnUpdateButtonMinimize (CCmdUI *pCmdUI)
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
afx_msg LRESULT | OnMenuChar (UINT nChar, UINT nFlags, CMenu *pMenu)
afx_msg void | OnInitMenuPopup (CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Protected Attributes

int m_cxOffset
int m_cyOffset
BTN_IMG_INDEX m_eAuxIndex
UINT | m_popToolbarID
UINT | m_popupMenuID
CCJMenu m_popupMenu
int m_nPos
BOOL | m_bOkToDrag
BOOL | m_bMaximized
BOOL | m_bDragging
BOOL | m_bButtons
CRect | m_rcTrack
CSize | m_sizeDesired
CSize | m_sizeNormal
CSize | m_sizeVert
CSize | m_sizeHorz
CSize | m_sizeFloat
CPoint | m_ptCurDrag
CPoint | m_ptStartDrag
CWnd * | m_pChildWnd
CImageList | m_ImageList
CCJCBarButton m_btnClose
CCJCBarButton m_btnMinim
CToolTipCtrl | m_ToolTip
BOOL | m_bGripper
BOOL | m_bFlatGripper
BOOL | m_bFlatBorder
CString | m_strSection
bool m_bAutoSave
HICON | m_hIcon
HICON | m_hAuxIcon
int m_nID
BOOL | m_bFloating

Constructor & Destructor Documentation

CCJControlBar::CCJControlBar ( )

Definition at line 255 of file CJControlBar.cpp.

References HIDE_CONTRLBAR, IDB_BUTTON_IMAGES, m_bAutoSave, m_bButtons, m_bDragging, m_bFlatBorder, m_bFlatGripper, m_bFloating, m_bGripper, m_bMaximized, m_bOkToDrag, m_bToFit, m_bUnique, m_cxOffset, m_cyOffset, m_eAuxIndex, m_eChildBorder, m_hAuxIcon, m_hIcon, m_ImageList, m_nID, m_nPos, m_pChildWnd, m_popToolbarID, m_popupMenuID, m_sizeDesired, m_sizeFloat, m_sizeHorz, m_sizeNormal, m_sizeVert, m_strSection, NONE, and NULL.

00256 {
00257     m_popupMenuID       = 0;
00258     m_popToolbarID      = 0;
00259     m_nPos              = 0;
00260     m_bToFit            = FALSE;
00261     m_bOkToDrag         = FALSE;
00262     m_bDragging         = FALSE;
00263     m_bMaximized        = FALSE;
00264     m_bUnique           = FALSE;
00265     m_bGripper          = TRUE;
00266     m_bButtons          = TRUE;
00267     m_bFlatGripper      = FALSE;            // Yiannhs Ver 6.06 Start Up With Flat Gripper
00268     m_bFlatBorder       = FALSE;            // Yiannhs Start Up With Flat Border
00269     m_bAutoSave         = TRUE;
00270     m_sizeVert          = CSize(200,100);   // Yiannhs to test different rectangles
00271     m_sizeHorz          = CSize(200,100);
00272     m_sizeFloat         = CSize(200,100);
00273     m_sizeDesired       = CSize(200,100);
00274     m_sizeNormal        = CSize(200,100);
00275     m_cxOffset          = 5;
00276     m_cyOffset          = 3;
00277     m_pChildWnd         = NULL;
00278     m_strSection        = _T("");
00279     m_eAuxIndex         = HIDE_CONTRLBAR;
00280     m_hIcon             = NULL;
00281     m_hAuxIcon          = NULL;
00282     m_eChildBorder      = NONE;
00283     m_nID               = 0;
00284     m_bFloating         = FALSE;
00285
00286     // Create the image list used by frame buttons.
00287     m_ImageList.Create(IDB_BUTTON_IMAGES,
00288         10, 1, RGB(255,255,255));
00289 }

CCJControlBar::~CCJControlBar ( ) [virtual]

Definition at line 291 of file CJControlBar.cpp.

References _destroyIcon, m_hAuxIcon, m_hIcon, and m_ImageList.

00292 {
00293     // fix potential resource leak - KStowell - 10-22-99.
00294     m_ImageList.DeleteImageList();
00295     _destroyIcon(m_hIcon);
00296     _destroyIcon(m_hAuxIcon);
00297 }

Member Function Documentation

CSize CCJControlBar::CalcDynamicLayout | ( | int | nLength,
 |  | DWORD | nMode
 | ) | [virtual]

Definition at line 444 of file CJControlBar.cpp.

References IsFloating(), IsHorzDocked(), IsVertDocked(), m_sizeDesired, m_sizeFloat, m_sizeHorz, and m_sizeVert.

Referenced by CCJSizeDockBar::CalcSizeBarLayout().

00445 {
00446     CSize sizeResult = m_sizeDesired;
00447
00448     //1999-05-19 Yiannhs. Since We Get Here from different Places do some more calculations.
00449     //                    Give Visual Feedback to user.
00450
00451     if( !nLength )
00452     {
00453         CRect rect;
00454         GetWindowRect( rect );
00455         sizeResult = rect.Size();
00456
00457         if( nMode & LM_HORZDOCK )
00458         {
00459             if( !IsHorzDocked() ) {
00460                 sizeResult = m_sizeHorz;
00461             }
00462             else if( nMode & LM_VERTDOCK )
00463             {
00464                 if( !IsVertDocked() ) {
00465                     sizeResult = m_sizeVert;
00466                 }
00467                 else {
00468                     sizeResult = m_sizeFloat;           //Do not check if it is floating. Do it
00469                 }
00470                 return( sizeResult );                   //do not go on
00471             }
00472         }
00473     }
00474     //1999-05-19    Yiannhs
00475
00476     if( IsFloating( ))
00477     {
00478         if (nMode == LM_HORZ) {
00479             if (nLength < 50)
00480                 nLength = 50;
00481             m_sizeDesired.cx = nLength;
00482         }
00483
00484         if (nMode == (LM_LENGTHY | LM_HORZ)) {
00485             if (nLength < 50)
00486                 nLength = 50;
00487             m_sizeDesired.cy = nLength;
00488         }
00489
00490         sizeResult = m_sizeDesired;
00491
00492     }
00493
00494     return sizeResult;
00495 }

Here is the call graph for this function:

BOOL CCJControlBar::Create | ( | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | LPCTSTR | lpszWindowName = NULL,
 |  | CSize | sizeDefault = CSize(200, 100),
 |  | DWORD | dwStyle = CBRS_LEFT,
 |  | BOOL | bFlatBorders = FALSE
 | ) | [virtual]

Definition at line 342 of file CJControlBar.cpp.

References LoadBarState(), m_bAutoSave, m_bFlatBorder, m_bFlatGripper, m_sizeDesired, m_sizeFloat, m_sizeHorz, m_sizeNormal, and m_sizeVert.

Referenced by CCJExplorerBar::Create(), and CMainFrame::InitializeDockingWindows().

00343 {
00344     ASSERT_VALID(pParentWnd);   // must have a parent
00345
00346     // If autosave is enabled, get the previous settings from the registry.
00347     if( m_bAutoSave ) {
00348         LoadBarState(sizeDefault, nID);
00349     }
00350
00351     // Set initial control bar style.
00352     SetBarStyle(dwStyle & CBRS_ALL|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC|CBRS_FLOAT_MULTI);
00353
00354     dwStyle &= ~CBRS_ALL;
00355     dwStyle |= WS_VISIBLE|WS_CHILD|WS_CLIPSIBLINGS|WS_CLIPCHILDREN;
00356
00357     m_sizeDesired = m_sizeNormal = sizeDefault;
00358     m_sizeHorz = m_sizeVert = m_sizeFloat = sizeDefault; // Yiannhs : Setup the new sizes as well
00359
00360     // Set flat control bar style.
00361     m_bFlatGripper = m_bFlatBorder = bFlatBorders;
00362
00363     // Yiannhs this seems a better way than mine, to register the double clicks class.
00364     // I have just added the redraw flags i was using in ver 6.06
00365     CString wndClass = ::AfxRegisterWndClass(
00366         CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW, 0, ::GetSysColorBrush(COLOR_BTNFACE));
00367
00368     CRect rect( 0, 0, sizeDefault.cx, sizeDefault.cy );
00369     return CWnd::Create( wndClass, lpszWindowName, dwStyle, rect, pParentWnd, nID );
00370 }

Here is the call graph for this function:

void CCJControlBar::DrawBorders | ( | CDC * | pDC,
 |  | CRect & | rect
 | ) | [protected, virtual]

Definition at line 1027 of file CJControlBar.cpp.

References DrawGripper(), IsHorzDocked(), IsVertDocked(), m_bFlatBorder, m_bToFit, and TRACK_BORDER_SIZE.

Referenced by OnPaint().

01028 {
01029     CRect rc;
01030     rc.CopyRect(&rect);
01031
01032     CRect rcTrack;
01033     rcTrack.CopyRect(&rc);
01034
01035     if(IsVertDocked())
01036     {
01037         if (!m_bToFit) {
01038             rcTrack.top = rc.bottom - TRACK_BORDER_SIZE;
01039             rcTrack.top-=2;
01040             rcTrack.bottom-=1;
01041
01042             //Yiannhs flat interface style
01043             if( !m_bFlatBorder )
01044                 pDC->Draw3dRect(rcTrack, afxData.clrBtnHilite, afxData.clrBtnShadow);
01045             else
01046                 pDC->FillSolidRect(rcTrack, afxData.clrBtnFace);
01047         }
01048     }
01049
01050     else if (IsHorzDocked())
01051     {
01052         if (!m_bToFit) {
01053             rcTrack.left = rc.right - TRACK_BORDER_SIZE;
01054             rcTrack.left-=2;
01055             rcTrack.right-=1;
01056
01057             //Yiannhs flat interface style
01058             if( !m_bFlatBorder )
01059                 pDC->Draw3dRect(rcTrack, afxData.clrBtnHilite, afxData.clrBtnShadow);
01060             else
01061                 pDC->FillSolidRect(rcTrack, afxData.clrBtnFace);
01062         }
01063     }
01064
01065     DrawGripper(pDC);
01066 }

Here is the call graph for this function:

void CCJControlBar::DrawGriperCaption | ( | CDC * | pDC,
 |  | LPRECT | pRect
 | ) | [protected, virtual]

Definition at line 1124 of file CJControlBar.cpp.

References IsFloating(), IsHorzDocked(), m_bGripper, NCOLORSHADES, and NULL.

Referenced by DrawGripper().

01125 {
01126     ASSERT( pDC );
01127     ASSERT( pRect );
01128     if (!IsFloating() && m_bGripper)
01129     {
01130         BOOL m_bIsHorz = IsHorzDocked();
01131         CRect TheRect( pRect );
01132         COLORREF clrBG = GetSysColor(COLOR_ACTIVECAPTION); // background color
01133         int cxCap = 0;
01134         int cyCap = 0;
01135         int rx = TheRect.left;
01136         int ry = TheRect.top;
01137         if( !m_bIsHorz ) {
01138             cxCap = TheRect.Width();
01139             cyCap = TheRect.Height();
01140         } else {
01141             cxCap = TheRect.Height();
01142             cyCap = TheRect.Width();
01143             //            rx = TheRect.top;
01144             //            ry = TheRect.left;
01145         }
01146
01147         int r = GetRValue(clrBG);               // red..
01148         int g = GetGValue(clrBG);               // ..green
01149         int b = GetBValue(clrBG);               // ..blue color vals
01150         int w = cxCap;                          // width of area to shade
01151         int xDelta= max(w/NCOLORSHADES,1);      // width of one shade band
01152         int x = xDelta;
01153         CBrush* pOldBrush = NULL;
01154         {
01155             CBrush brush(RGB(0,0,0));
01156             pOldBrush = pDC->SelectObject(&brush);
01157             if( !m_bIsHorz ) {
01158                 pDC->PatBlt(rx, ry, x, cyCap, PATCOPY);
01159             } else {
01160                 pDC->PatBlt(rx, ry, cyCap, x, PATCOPY);
01161             }
01162             pDC->SelectObject(pOldBrush);
01163
01164             // fix potential resource leak - KStowell - 10-21-99
01165             brush.DeleteObject();
01166         }
01167         int w2  = w*w;                                              // w squared
01168         while( x < cxCap ) {                                       // paint bands right to left
01169             //x += xDelta;                                            // next band
01170             int wmx2 = (w-x)*(w-x);                                 // w minus x squared
01171             COLORREF clr = RGB( r-(r*wmx2)/w2, g-(g*wmx2)/w2, b-(b*wmx2)/w2 );
01172             {
01173                 CBrush brush(clr);
01174                 pDC->SelectObject(&brush);
01175                 if( !m_bIsHorz ) {
01176                     pDC->PatBlt(rx+x, ry, xDelta, cyCap, PATCOPY);
01177                 } else {
01178                     pDC->PatBlt(rx, ry+x, cyCap, xDelta, PATCOPY);
01179                 }
01180                 pDC->SelectObject(pOldBrush);
01181
01182                 // fix potential resource leak - KStowell - 10-21-99
01183                 brush.DeleteObject();
01184             }
01185             x += xDelta;
01186         }
01187         {
01188             CBrush brush(clrBG);
01189             pDC->SelectObject(&brush);
01190             if( !m_bIsHorz ) {
01191                 pDC->PatBlt(rx+x, ry, cxCap-x, cyCap, PATCOPY);
01192             }
01193             else {
01194                 pDC->PatBlt(rx, ry+x, cyCap, cxCap-x, PATCOPY);
01195             }
01196
01197             // fix potential resource leak - KStowell - 10-21-99
01198             brush.DeleteObject();
01199         }
01200         pDC->SelectObject(pOldBrush);
01201     }
01202 }//yiannhs new method ends

Here is the call graph for this function:

void CCJControlBar::DrawGripper ( CDC * pDC ) [protected, virtual]

Definition at line 1204 of file CJControlBar.cpp.

References DrawGriperCaption(), GetGripperRect(), IsFloating(), IsHorzDocked(), m_bFlatGripper, and m_bGripper.

Referenced by DrawBorders().

01205 {
01206     //Yiannhs. changed to make evaluations on top. Replaced with flat gradient caption
01207     if (!IsFloating() && m_bGripper)
01208     {
01209         // draw the gripper.
01210         CRect pRect(GetGripperRect());
01211
01212         //Yiannhs New Lines
01213         CRect SecondGrip;
01214         SecondGrip.CopyRect( pRect );
01215         //Yiannhs: use the original beveled style gripper
01216         if (IsHorzDocked()) {
01217             SecondGrip.OffsetRect(4,0);
01218         } else {
01219             SecondGrip.OffsetRect(0,4);
01220         }
01221
01222         //Yiannhs Selective Gripper look
01223         if( !m_bFlatGripper ) {
01224
01225             //Yiannhs: also updated to use AfxData
01226             pDC->FillSolidRect( pRect, afxData.clrBtnShadow  );
01227             pDC->Draw3dRect( pRect, afxData.clrBtnHilite, afxData.clrBtnShadow );
01228
01229             pDC->FillSolidRect( SecondGrip, afxData.clrBtnShadow );
01230             pDC->Draw3dRect( SecondGrip, afxData.clrBtnHilite, afxData.clrBtnShadow );
01231
01232         } else {    //Yiannhs: Use Flat Gripper
01233
01234             CRect FlatRect( pRect.left, pRect.top, SecondGrip.right, SecondGrip.bottom);
01235             if (IsHorzDocked()) {
01236                 FlatRect.DeflateRect(-2,0);
01237             } else {
01238                 FlatRect.DeflateRect(0,-2);
01239             }
01240             DrawGriperCaption( pDC, FlatRect );
01241         }
01242     }
01243 }

Here is the call graph for this function:

void CCJControlBar::EnableDockingOnSizeBar ( DWORD dwDockStyle ) [virtual]

Definition at line 910 of file CJControlBar.cpp.

References NULL.

Referenced by CMainFrame::InitializeDockingWindows().

00911 {
00912     ASSERT(m_pDockContext == NULL);
00913     m_dwDockStyle = dwDockStyle;
00914
00915     if (m_pDockContext == NULL)
00916         m_pDockContext = new CCJDockContext(this);
00917
00918     if (m_hWndOwner == NULL)
00919         m_hWndOwner = ::GetParent(m_hWnd);
00920 }

void CCJControlBar::EnableFlatLook | ( | BOOL | bGripper,
 |  | BOOL | bBorder,
 |  | BOOL | bButtons
 | ) | [virtual]

Definition at line 332 of file CJControlBar.cpp.

References CCJFlatButton::DisableFlatLook(), m_bFlatBorder, m_bFlatGripper, m_btnClose, and m_btnMinim.

00333 {
00334     ASSERT(::IsWindow(m_hWnd));
00335     m_bFlatGripper = bGripper;
00336     m_bFlatBorder  = bBorder;
00337     m_btnClose.DisableFlatLook( bButtons );
00338     m_btnMinim.DisableFlatLook( bButtons );
00339     Invalidate();
00340 }

Here is the call graph for this function:

void CCJControlBar::EnableFlatLook ( BOOL bFlat = TRUE ) [virtual]

Definition at line 327 of file CJControlBar.cpp.

00328 {
00329     EnableFlatLook(bFlat, bFlat, bFlat);
00330 }

_CJXLIB_INLINE void CCJControlBar::EnableSaveState ( bool bAutoSave = true ) [virtual]

Definition at line 536 of file CJControlBar.h.

References _CJXLIB_INLINE, and m_bAutoSave.

00537     { ASSERT(::IsWindow(m_hWnd)); m_bAutoSave = bAutoSave; }

void CCJControlBar::EraseNonClient ( ) [protected, virtual]

Definition at line 1012 of file CJControlBar.cpp.

Referenced by OnNcPaint().

01013 {
01014     CWindowDC dc(this);
01015
01016     CRect rectClient;
01017     GetClientRect(rectClient);
01018     CRect rectWindow;
01019     GetWindowRect(rectWindow);
01020     ScreenToClient(rectWindow);
01021     rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);
01022
01023     dc.ExcludeClipRect(rectClient);
01024     rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);
01025 }

CRect CCJControlBar::GetButtonRect ( ) [protected, virtual]

Definition at line 1245 of file CJControlBar.cpp.

References IsHorzDocked().

Referenced by OnWindowPosChanged().

01246 {
01247     CRect rect;
01248     GetClientRect(&rect);
01249     rect.OffsetRect(-rect.left,-rect.top);
01250
01251     if (IsHorzDocked()) {
01252         rect.top     += 3;
01253         rect.bottom = rect.top+12;
01254         rect.left  += 2;
01255         rect.right  = rect.left+12;
01256     }
01257
01258     else {
01259         rect.right -= 19;
01260         rect.left   = rect.right-12;
01261         rect.top   += 3;
01262         rect.bottom = rect.top+12;
01263     }
01264
01265     return rect;
01266 }

Here is the call graph for this function:

void CCJControlBar::GetChildRect ( CRect & rect ) [virtual]

Reimplemented in CCJExplorerBar, and CCJTabCtrlBar.

Definition at line 980 of file CJControlBar.cpp.

References GetMinExt(), IsFloating(), IsVertDocked(), m_bToFit, m_cxOffset, and TRACK_BORDER_SIZE.

Referenced by CCJTabCtrlBar::GetChildRect(), OnPaint(), and OnWindowPosChanged().

00981 {
00982     GetClientRect(&rect);
00983
00984     if (IsFloating()) {
00985         rect.DeflateRect(3,3);
00986     } else {
00987         if (IsVertDocked()) {
00988             rect.DeflateRect(m_cxOffset, 0);
00989             rect.top += (GetMinExt()-5);
00990             //Yiannhs: if it is the last bar inside a dockbar, cover the whole space
00991             if( !m_bToFit ) {
00992                 rect.bottom -= (TRACK_BORDER_SIZE + 4);
00993             } else {
00994                 rect.bottom -= 4;
00995             }
00996         } else {
00997             rect.left   += (GetMinExt()-5);
00998             //Yiannhs: if it is the last bar inside a dockbar, cover the whole space
00999             if( !m_bToFit ) {
01000                 rect.right  -= (TRACK_BORDER_SIZE + 4);
01001             } else {
01002                 rect.right  -= 4;
01003             }
01004             rect.DeflateRect(0, m_cxOffset);
01005         }
01006
01007         if( rect.left > rect.right || rect.top > rect.bottom )
01008             rect = CRect(0,0,0,0);
01009     }
01010 }

Here is the call graph for this function:

CRect CCJControlBar::GetGripperRect ( ) [protected, virtual]

Definition at line 1268 of file CJControlBar.cpp.

References IsHorzDocked(), and m_bButtons.

Referenced by DrawGripper().

01269 {
01270     CRect rect;
01271     GetClientRect(&rect);
01272     rect.OffsetRect(-rect.left,-rect.top);
01273
01274     if (IsHorzDocked()) {
01275         rect.DeflateRect(3,3);
01276         rect.left   += 1;
01277         rect.right  = rect.left+3;
01278         rect.bottom -= 1;
01279         rect.top    += m_bButtons?30:1;
01280     }
01281
01282     else {
01283         rect.DeflateRect(4,4);
01284         rect.top     += 2;
01285         rect.bottom  = rect.top+3;
01286         rect.right   -= m_bButtons?30:2;
01287     }
01288
01289     return rect;
01290 }

Here is the call graph for this function:

_CJXLIB_INLINE int CCJControlBar::GetHorzSize ( ) [virtual]

Definition at line 542 of file CJControlBar.h.

References _CJXLIB_INLINE, and m_sizeDesired.

00543     { ASSERT(::IsWindow(m_hWnd)); return m_sizeDesired.cy; }

_CJXLIB_INLINE UINT CCJControlBar::GetMenuID ( ) [virtual]

Definition at line 545 of file CJControlBar.h.

References _CJXLIB_INLINE, and m_popupMenuID.

00546     { ASSERT(::IsWindow(m_hWnd)); return m_popupMenuID; }

int CCJControlBar::GetMinExt ( ) [virtual]

Definition at line 964 of file CJControlBar.cpp.

References GRIP_INTRASPACING, GRIP_SIZE, GRIP_START, m_bButtons, m_bGripper, and TRACK_BORDER_SIZE.

Referenced by GetChildRect(), CCJSizeDockBar::Maximize(), Minimize(), and OnLButtonUp().

00965 {
00966     int nRet = TRACK_BORDER_SIZE;
00967
00968     if (m_bGripper || m_bButtons) {
00969         nRet += GRIP_START;
00970         nRet += GRIP_SIZE*2;
00971         nRet += GRIP_INTRASPACING*3+2;
00972     }
00973
00974     else
00975         nRet += 2;
00976
00977     return nRet;
00978 }

_CJXLIB_INLINE int CCJControlBar::GetVertSize ( ) [virtual]

Definition at line 539 of file CJControlBar.h.

References _CJXLIB_INLINE, and m_sizeDesired.

00540     { ASSERT(::IsWindow(m_hWnd)); return m_sizeDesired.cx; }

void CCJControlBar::HitTest ( CPoint & point ) [protected, virtual]

Definition at line 1068 of file CJControlBar.cpp.

References IDC_HSPLITBAR, IDC_VSPLITBAR, IsHorzDocked(), IsVertDocked(), m_bDragging, m_bOkToDrag, m_bToFit, NULL, and TRACK_BORDER_SIZE.

Referenced by OnMouseMove().

01069 {
01070     CRect rcWin;
01071     GetClientRect(&rcWin);
01072     HCURSOR hCur = ::LoadCursor(NULL,IDC_ARROW);
01073
01074     if( !m_bDragging )
01075     {
01076         if (IsVertDocked()) {
01077             rcWin.top = rcWin.bottom - TRACK_BORDER_SIZE;
01078             m_bOkToDrag = (rcWin.PtInRect(point) && !m_bToFit);
01079             if(m_bOkToDrag) {
01080                 hCur = AfxGetApp()->LoadCursor(IDC_VSPLITBAR);
01081             }
01082         }
01083
01084         else if (IsHorzDocked()) {
01085             rcWin.left = rcWin.right - TRACK_BORDER_SIZE;
01086             m_bOkToDrag = (rcWin.PtInRect(point) && !m_bToFit);
01087             if(m_bOkToDrag) {
01088                 hCur = AfxGetApp()->LoadCursor(IDC_HSPLITBAR);
01089             }
01090         }
01091
01092         SetCursor(hCur);
01093     }
01094 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJControlBar::IsBottomDocked ( ) const [virtual]

Definition at line 563 of file CJControlBar.h.

References _CJXLIB_INLINE, and AFX_IDW_SIZEBAR_BOTTOM.

Referenced by IsHorzDocked(), and CCJSizeDockBar::Maximize().

00564     { ASSERT(::IsWindow(m_hWnd)); return (GetParent()->GetDlgCtrlID()==AFX_IDW_SIZEBAR_BOTTOM); }

_CJXLIB_INLINE BOOL CCJControlBar::IsFloating ( ) const [virtual]

Definition at line 575 of file CJControlBar.h.

References _CJXLIB_INLINE, IsHorzDocked(), and IsVertDocked().

Referenced by CalcDynamicLayout(), DrawGriperCaption(), DrawGripper(), CCJTabCtrlBar::GetChildRect(), CCJExplorerBar::GetChildRect(), GetChildRect(), OnLButtonDown(), OnRButtonDown(), OnUpdateCmdUI(), CCJExplorerBar::OnWindowPosChanged(), OnWindowPosChanged(), and SaveBarState().

00576     { ASSERT(::IsWindow(m_hWnd)); return (!IsHorzDocked() && !IsVertDocked()); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJControlBar::IsHorzDocked ( ) const [virtual]

Definition at line 560 of file CJControlBar.h.

References _CJXLIB_INLINE, IsBottomDocked(), and IsTopDocked().

Referenced by CalcDynamicLayout(), DrawBorders(), DrawGriperCaption(), DrawGripper(), GetButtonRect(), GetGripperRect(), HitTest(), IsFloating(), Maximize(), Minimize(), Normalize(), OnLButtonUp(), OnMouseMove(), OnUpdateCmdUI(), OnWindowPosChanged(), and SaveBarState().

00561     { ASSERT(::IsWindow(m_hWnd)); return (IsTopDocked() || IsBottomDocked()); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJControlBar::IsLeftDocked ( ) const [virtual]

Definition at line 572 of file CJControlBar.h.

References _CJXLIB_INLINE, and AFX_IDW_SIZEBAR_LEFT.

Referenced by IsVertDocked(), and CCJSizeDockBar::Maximize().

00573     { ASSERT(::IsWindow(m_hWnd)); return (GetParent()->GetDlgCtrlID()==AFX_IDW_SIZEBAR_LEFT); }

_CJXLIB_INLINE BOOL CCJControlBar::IsRightDocked ( ) const [virtual]

Definition at line 569 of file CJControlBar.h.

References _CJXLIB_INLINE, and AFX_IDW_SIZEBAR_RIGHT.

Referenced by IsVertDocked(), and CCJSizeDockBar::Maximize().

00570     { ASSERT(::IsWindow(m_hWnd)); return (GetParent()->GetDlgCtrlID()==AFX_IDW_SIZEBAR_RIGHT); }

_CJXLIB_INLINE BOOL CCJControlBar::IsTopDocked ( ) const [virtual]

Definition at line 566 of file CJControlBar.h.

References _CJXLIB_INLINE, and AFX_IDW_SIZEBAR_TOP.

Referenced by IsHorzDocked(), and CCJSizeDockBar::Maximize().

00567     { ASSERT(::IsWindow(m_hWnd)); return (GetParent()->GetDlgCtrlID()==AFX_IDW_SIZEBAR_TOP); }

_CJXLIB_INLINE BOOL CCJControlBar::IsVertDocked ( ) const [virtual]

Definition at line 557 of file CJControlBar.h.

References _CJXLIB_INLINE, IsLeftDocked(), and IsRightDocked().

Referenced by CalcDynamicLayout(), DrawBorders(), CCJExplorerBar::GetChildRect(), GetChildRect(), HitTest(), IsFloating(), Maximize(), Minimize(), Normalize(), CCJExplorerBar::OnEraseBkgnd(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), and CCJExplorerBar::OnWindowPosChanged().

00558     { ASSERT(::IsWindow(m_hWnd)); return (IsLeftDocked() || IsRightDocked()); }

Here is the call graph for this function:

void CCJControlBar::LoadBarState | ( | CSize & | size,
 |  | int | nID
 | ) | [protected, virtual]

Definition at line 1420 of file CJControlBar.cpp.

References m_bFloating, m_nID, and m_strSection.

Referenced by Create().

01421 {
01422     m_nID = nID;
01423     int nIndex = 0;
01424     CWinApp* pApp = AfxGetApp();
01425
01426     // attempt to loop through all of the defaults stored in the
01427     // system until we find our control id.
01428     while( TRUE )
01429     {
01430         // start at 0 and search for a match to our control bars
01431         // resource id. If one was not found, return.
01432         m_strSection.Format(_T("Bar State-Bar%d"), nIndex);
01433         int nBarID = pApp->GetProfileInt( m_strSection, _T("BarID"), -1 );
01434
01435         // couldn't find a match, just bail...
01436         if( nBarID == -1 ) {
01437             TRACE1( "Warning: Could not find registry information for control bar ID %d\n", m_nID );
01438             return;
01439         }
01440
01441         // we have a match, read the information that was stored, and
01442         // update the CRect object that was passed in.
01443         if( nBarID == m_nID ) {
01444             //m_strSection += _T("\\CodeJock"); //JK - removed to fix the Bar savings, replaced by the code below... The fix taken from CodeJock Website Discussion board
01445             m_strSection.Format ( _T("CodeJock Bar State-Bar%d"), nIndex ) ;    //JK
01446
01447             size.cx     = pApp->GetProfileInt( m_strSection, _T("MRUDesiredCX"), size.cx );
01448             size.cy     = pApp->GetProfileInt( m_strSection, _T("MRUDesiredCY"), size.cy );
01449             m_bFloating = pApp->GetProfileInt( m_strSection, _T("MRUFloating" ), m_bFloating );
01450             return;
01451         }
01452
01453         // increment count.
01454         ++nIndex;
01455     }
01456 }

void CCJControlBar::Maximize ( int size ) [virtual]

Definition at line 922 of file CJControlBar.cpp.

References IsHorzDocked(), IsVertDocked(), m_bMaximized, m_sizeDesired, and m_sizeNormal.

Referenced by CCJSizeDockBar::Maximize().

00923 {
00924     m_sizeNormal = m_sizeDesired;
00925     if (IsHorzDocked()) {
00926         m_sizeDesired.cx = size;
00927     }
00928
00929     else if (IsVertDocked()) {
00930         m_sizeDesired.cy = size;
00931     }
00932
00933     m_bMaximized = TRUE;
00934 }

Here is the call graph for this function:

void CCJControlBar::Minimize ( ) [virtual]

Definition at line 936 of file CJControlBar.cpp.

References GetMinExt(), IsHorzDocked(), IsVertDocked(), m_bMaximized, m_sizeDesired, and m_sizeNormal.

Referenced by CCJSizeDockBar::Maximize().

00937 {
00938     m_sizeNormal = m_sizeDesired;
00939
00940     if (IsHorzDocked()) {
00941         m_sizeDesired.cx = GetMinExt();
00942     }
00943
00944     else if (IsVertDocked()) {
00945         m_sizeDesired.cy = GetMinExt();
00946     }
00947
00948     m_bMaximized = FALSE;
00949 }

Here is the call graph for this function:

void CCJControlBar::Normalize ( ) [virtual]

Definition at line 951 of file CJControlBar.cpp.

References IsHorzDocked(), IsVertDocked(), m_bMaximized, m_sizeDesired, and m_sizeNormal.

Referenced by CCJSizeDockBar::Normalize().

00952 {
00953     if (IsHorzDocked()) {
00954         m_sizeDesired.cx = m_sizeNormal.cx;
00955     }
00956
00957     else if (IsVertDocked()) {
00958         m_sizeDesired.cy = m_sizeNormal.cy;
00959     }
00960
00961     m_bMaximized = FALSE;
00962 }

Here is the call graph for this function:

void CCJControlBar::OnButtonClose ( ) [protected]

Reimplemented in CCJExplorerBar.

Definition at line 879 of file CJControlBar.cpp.

00880 {
00881     GetDockingFrame()->ShowControlBar(this,FALSE,FALSE);
00882 }

void CCJControlBar::OnButtonMinimize ( ) [protected]

Definition at line 889 of file CJControlBar.cpp.

References m_bMaximized.

00890 {
00891     if (!m_bMaximized) {
00892         ((CCJSizeDockBar *)GetParent())->Maximize(this);
00893         m_bMaximized = TRUE;
00894     }
00895
00896     else {
00897         ((CCJSizeDockBar *)GetParent())->Normalize(this);
00898         m_bMaximized = FALSE;
00899     }
00900 }

int CCJControlBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Reimplemented in CCJExplorerBar, CCJTabCtrlBar, and CBarConsole.

Definition at line 688 of file CJControlBar.cpp.

References CCJFlatButton::DisableFlatLook(), IDC_BUTTON_HIDE, IDC_BUTTON_MINI, IDS_EXPAND, IDS_HIDE, m_bButtons, m_bFlatBorder, m_bFlatGripper, m_btnClose, m_btnMinim, m_hIcon, m_ImageList, m_ToolTip, NULL, and CCJFlatButton::SetIcon().

Referenced by CBarConsole::OnCreate(), CCJTabCtrlBar::OnCreate(), and CCJExplorerBar::OnCreate().

00689 {
00690     if (CControlBar::OnCreate(lpCreateStruct) == -1)
00691         return -1;
00692
00693     if (m_bButtons)
00694     {
00695         if(!m_btnClose.Create(NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
00696             BS_NOTIFY | BS_OWNERDRAW | BS_ICON,
00697             CRect(0,0,0,0), this, IDC_BUTTON_HIDE ))
00698         {
00699             TRACE0( "Unable to create close button\n" );
00700             return -1;
00701         }
00702
00703
00704         if(!m_btnMinim.Create(NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
00705             BS_NOTIFY | BS_OWNERDRAW | BS_ICON,
00706             CRect(0,0,0,0), this, IDC_BUTTON_MINI ))
00707         {
00708             TRACE0( "Unable to create minimize button\n" );
00709             return -1;
00710         }
00711
00712         // Yiannhs Selective flat style interface. The difference is in adding the if statement
00713         if( !m_bFlatBorder && !m_bFlatGripper ) {
00714             m_btnClose.DisableFlatLook();
00715             m_btnMinim.DisableFlatLook();
00716         }
00717
00718         m_hIcon = m_ImageList.ExtractIcon(0);
00719         m_btnClose.SetIcon(m_hIcon, CSize(10,10));
00720
00721         // Create the ToolTip control.
00722         m_ToolTip.Create(this);
00723         m_ToolTip.Activate(TRUE);
00724         m_ToolTip.AddTool (&m_btnClose, IDS_HIDE);
00725         m_ToolTip.AddTool (&m_btnMinim, IDS_EXPAND);
00726     }
00727
00728     return 0;
00729 }

Here is the call graph for this function:

BOOL CCJControlBar::OnEraseBkgnd ( CDC * pDC ) [protected]

Reimplemented in CCJExplorerBar.

Definition at line 681 of file CJControlBar.cpp.

00682 {
00683     // KStowell - overridden for flicker-free drawing.
00684     UNUSED_ALWAYS(pDC);
00685     return TRUE;
00686 }

void CCJControlBar::OnInitMenuPopup | ( | CMenu * | pPopupMenu,
 |  | UINT | nIndex,
 |  | BOOL | bSysMenu
 | ) | [protected]

Definition at line 1363 of file CJControlBar.cpp.

References CCJMenu::IsMenu(), m_popupMenu, and CCJMenu::UpdateMenu().

01364 {
01365     CControlBar::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
01366
01367     if(!bSysMenu) {
01368         if (m_popupMenu.IsMenu(pPopupMenu)) {
01369             CCJMenu::UpdateMenu(pPopupMenu);
01370         }
01371     }
01372 }

Here is the call graph for this function:

void CCJControlBar::OnInvertTracker ( const CRect & rect ) [protected, virtual]

Definition at line 1096 of file CJControlBar.cpp.

References NULL.

Referenced by OnLButtonDown(), OnLButtonUp(), and OnMouseMove().

01097 {
01098     ASSERT_VALID(this);
01099     ASSERT(!rect.IsRectEmpty());
01100
01101     CDC* pDC = GetDockingFrame()->GetDC();
01102     CBrush* pBrush = CDC::GetHalftoneBrush();
01103     CBrush* pOldBrush = NULL;
01104
01105     if (pBrush != NULL) {
01106         pOldBrush = pDC->SelectObject(pBrush);
01107     }
01108
01109     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATINVERT);
01110
01111     if (pOldBrush != NULL) {
01112         pDC->SelectObject(pOldBrush);
01113     }
01114     GetDockingFrame()->ReleaseDC(pDC);
01115 }

void CCJControlBar::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Reimplemented in CCJExplorerBar.

Definition at line 795 of file CJControlBar.cpp.

References IsFloating(), IsVertDocked(), m_bDragging, m_bOkToDrag, m_ptCurDrag, m_ptStartDrag, m_rcTrack, NULL, OnInvertTracker(), and TRACK_BORDER_SIZE.

00796 {
00797     // Yiannhs. When the bar is inside a mdiframe window, and click on area
00798     // the inner child does not cover, the whole area is grayed!!!
00799
00800     if( IsFloating( )) //see Tab ControlBar
00801     {
00802         // If the window is floating, we want to
00803         // bring it up to the top.
00804         SetFocus();
00805         SetWindowPos( NULL, 0,0,0,0,
00806             SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW );
00807         return;
00808     }
00809
00810     if (m_bOkToDrag)
00811     {
00812         CFrameWnd *pFrame=GetDockingFrame();
00813         GetClientRect(m_rcTrack);
00814
00815         if (IsVertDocked()) {
00816             // Yiannhs
00817             m_rcTrack.top = m_rcTrack.bottom - TRACK_BORDER_SIZE -2;
00818             m_rcTrack.bottom-=2;
00819         }
00820 //1999-05-19 Yiannhs. do not call one more function
00821         else { //if (IsHorzDocked()) {
00822             // Yiannhs
00823             m_rcTrack.left = m_rcTrack.right - TRACK_BORDER_SIZE -2;
00824             m_rcTrack.right-=2;
00825         }
00826
00827         ClientToScreen(&m_rcTrack);
00828         pFrame->ScreenToClient(&m_rcTrack);
00829         ClientToScreen(&point);
00830         pFrame->ScreenToClient(&point);
00831
00832         m_ptStartDrag = point;
00833         m_ptCurDrag = point;
00834
00835         SetCapture();
00836         m_bDragging = TRUE;
00837         OnInvertTracker(m_rcTrack);
00838     }
00839
00840     else if (m_pDockBar) {
00841         if (OnToolHitTest(point, NULL) == -1) {
00842             ClientToScreen(&point);
00843 //1999-05-26 Yiannhs
00844 //          Handle the message loop before CDockContext
00845             MSG msg;
00846             ValidateRect( NULL );   //Make sure this control bar will not ask for Paint messages later
00847             HWND    hwnd = NULL;
00848             while (::PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE))
00849             {   //ask for messages in any window of the application, and remove those
00850                 DispatchMessage( &msg );
00851                 if( msg.hwnd != this->m_hWnd ) {
00852                     hwnd = msg.hwnd;    //keep the window which receives paint messages
00853                     break;              //exit the loop
00854                 }
00855             }
00856
00857             if( hwnd ) {    //if a window is getting Paint messages work on it
00858                 ::ValidateRect( hwnd, NULL );   //the window does not need painting
00859                 ::ValidateRect( ::GetParent( hwnd ), NULL );    //Its parent window as well
00860                 while (::PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE)) {
00861                     //work on the Paint messages once more
00862                     ::TranslateMessage( &msg );
00863                     ::DispatchMessage( &msg );
00864                 }
00865             }
00866
00867 //1999-05-26 Yiannhs
00868
00869             ((CCJDockContext*)m_pDockContext)->StartDragDockBar(point);
00870         }
00871     }
00872
00873     // Yiannhs
00874     else {
00875         CControlBar::OnLButtonDown(nFlags, point);
00876     }
00877 }

Here is the call graph for this function:

void CCJControlBar::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Reimplemented in CCJExplorerBar.

Definition at line 611 of file CJControlBar.cpp.

References GetMinExt(), IsHorzDocked(), IsVertDocked(), m_bDragging, m_ptCurDrag, m_ptStartDrag, m_rcTrack, m_sizeDesired, m_sizeHorz, m_sizeNormal, m_sizeVert, and OnInvertTracker().

00612 {
00613     if( m_bDragging )
00614     {
00615         ReleaseCapture();
00616         OnInvertTracker(m_rcTrack);
00617 //1999-05-19 Yiannhs. Moved the statement below
00618         //m_bDragging = FALSE;
00619
00620         // Yiannhs: reduce unnessesary actions. Ok It works
00621  //1999-05-19 Yiannhs. Changed according to the statement above
00622         if( m_ptCurDrag == m_ptStartDrag ) {
00623             m_bDragging = FALSE;
00624             return;
00625         }
00626
00627         if(IsVertDocked()) {
00628             int newHeight = m_rcTrack.top-m_ptStartDrag.y;
00629             m_sizeDesired.cy += newHeight;
00630             m_sizeDesired.cy = m_sizeDesired.cy > GetMinExt() ? m_sizeDesired.cy : GetMinExt();
00631             // Yiannhs: there is a comment in the previous version for change. This is the Line
00632             // This is probably for sizing with many control bars in dock bar
00633             // m_sizeDesired.cy = m_sizeDesired.cy > rectAvail.Height() ? rectAvail.Height() : m_sizeDesired.cy;
00634
00635 //1999-05-19 Yiannhs. Assign unused sizes
00636             m_sizeVert = m_sizeDesired;
00637         }
00638
00639         else { //if (IsHorzDocked()) {  //1999-05-19. Floating control bars do not receive this message
00640
00641             int newWidth = m_rcTrack.left-m_ptStartDrag.x;
00642             m_sizeDesired.cx += newWidth;
00643             m_sizeDesired.cx = m_sizeDesired.cx > GetMinExt() ? m_sizeDesired.cx : GetMinExt();
00644             // Yiannhs: there is a comment in the previous version for change. This is the Line
00645             // This is probably for sizing with many control bars in dock bar
00646             // m_sizeDesired.cx = m_sizeDesired.cx > rectAvail.Width() ? rectAvail.Width() : m_sizeDesired.cx;
00647
00648 //1999-05-19 Yiannhs. Assign unused sizes
00649             m_sizeHorz = m_sizeDesired;
00650         }
00651
00652 //1999-05-19    Yiannhs
00653         //((CCJSizeDockBar *)GetParent())->CalcSizeBarLayout();
00654         //resizing a control bar, means, that the DockBar should be normalized.
00655         //and normalize does the layout
00656         m_sizeNormal = m_sizeDesired;       //set the new normal size here
00657         ((CCJSizeDockBar *)GetParent())->Normalize( this );
00658         m_bDragging = FALSE;        //flag off the drag action now. The movement has been complited
00659                                     //so as I can check it on change position
00660         CRect rc;                   // Now Use The Size of the control bar to fill the right sizes.
00661         GetWindowRect( rc );
00662         if( IsHorzDocked() )
00663             m_sizeNormal.cy = m_sizeHorz.cy = m_sizeDesired.cy = rc.Height();
00664         else
00665             m_sizeNormal.cx = m_sizeVert.cx = m_sizeDesired.cx = rc.Width();
00666 //1999-05-19    Yiannhs
00667
00668     }
00669
00670     else {
00671         // Yiannhs: again don't go to default handler if we have already handled the message
00672         CControlBar::OnLButtonUp(nFlags, point);
00673     }
00674 }

Here is the call graph for this function:

void CCJControlBar::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct
 | ) | [protected]

Definition at line 1337 of file CJControlBar.cpp.

References CCJMenu::IsMenu(), m_popupMenu, and CCJMenu::MeasureItem().

01338 {
01339     if (lpMeasureItemStruct->CtlType == ODT_MENU)
01340     {
01341         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
01342             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
01343
01344             if (m_popupMenu.IsMenu(pMenu)) {
01345                 m_popupMenu.MeasureItem(lpMeasureItemStruct);
01346                 return;
01347             }
01348         }
01349     }
01350
01351     CControlBar::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
01352 }

Here is the call graph for this function:

LRESULT CCJControlBar::OnMenuChar | ( | UINT | nChar,
 |  | UINT | nFlags,
 |  | CMenu * | pMenu
 | ) | [protected]

Definition at line 1354 of file CJControlBar.cpp.

References CCJMenu::FindKeyboardShortcut(), CCJMenu::IsMenu(), and m_popupMenu.

01355 {
01356     if (m_popupMenu.IsMenu(pMenu)) {
01357         return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
01358     }
01359
01360     return CControlBar::OnMenuChar(nChar, nFlags, pMenu);
01361 }

Here is the call graph for this function:

void CCJControlBar::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 556 of file CJControlBar.cpp.

References HitTest(), IsHorzDocked(), IsVertDocked(), m_bDragging, m_ptCurDrag, m_rcTrack, NULL, and OnInvertTracker().

00557 {
00558     HitTest(point);
00559     CRect rectDock;
00560     if( m_bDragging )
00561     {
00562         ASSERT(GetParent() != NULL);
00563
00564         GetParent()->GetClientRect(&rectDock);
00565         ClientToScreen(&rectDock);
00566         ClientToScreen(&point);
00567
00568         CFrameWnd *pFrame=GetDockingFrame();
00569         ASSERT(pFrame != NULL);
00570
00571         pFrame -> ScreenToClient(&point);
00572         pFrame->ScreenToClient(&rectDock);
00573
00574         point.x = point.x>rectDock.right ? rectDock.right:point.x;
00575         point.x = point.x<rectDock.left ? rectDock.left:point.x;
00576         point.y = point.y>rectDock.bottom ? rectDock.bottom:point.y;
00577         point.y = point.y<rectDock.top ? rectDock.top:point.y;
00578
00579         OnInvertTracker(m_rcTrack);
00580         int deltaX = point.x-m_ptCurDrag.x;
00581         int deltaY = point.y-m_ptCurDrag.y;
00582
00583         if(IsVertDocked()) {
00584             m_rcTrack.top += deltaY;
00585             m_rcTrack.bottom += deltaY;
00586         }
00587
00588         else if (IsHorzDocked()) {
00589             m_rcTrack.left += deltaX;
00590             m_rcTrack.right += deltaX;
00591         }
00592
00593         OnInvertTracker(m_rcTrack);
00594         m_ptCurDrag = point;
00595     }
00596
00597     else {
00598         // Yiannhs: Do not let default handler go on, if we have worked with the message
00599         CControlBar::OnMouseMove(nFlags, point);
00600     }
00601 }

Here is the call graph for this function:

UINT CCJControlBar::OnNcHitTest ( CPoint point ) [protected]

Definition at line 676 of file CJControlBar.cpp.

00677 {
00678     return HTCLIENT;
00679 }

void CCJControlBar::OnNcPaint ( ) [protected]

Definition at line 500 of file CJControlBar.cpp.

References EraseNonClient().

00501 {
00502     EraseNonClient();
00503 }

Here is the call graph for this function:

void CCJControlBar::OnPaint ( ) [protected]

Definition at line 505 of file CJControlBar.cpp.

References DrawBorders(), GetChildRect(), m_eChildBorder, NONE, OUTLINE, RAISED, and SUNKEN.

00506 {
00507     CPaintDC dc(this); // device context for painting
00508
00509     // Get the client rect.
00510     CRect rcClient;
00511     GetClientRect( &rcClient );
00512
00513     // Create a memory device-context. This is done to help reduce
00514     // screen flicker, since we will paint the entire control to the
00515     // off screen device context first.
00516     CDC memDC;
00517     CBitmap bitmap;
00518     memDC.CreateCompatibleDC(&dc);
00519     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00520     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00521
00522     // repaint the background.
00523     memDC.FillSolidRect( rcClient, afxData.clrBtnFace );
00524     DrawBorders(&memDC, rcClient);
00525
00526     // draw a border around the child area.
00527     if( m_eChildBorder != NONE )
00528     {
00529         CRect rect;
00530         GetChildRect(rect);
00531
00532         if( m_eChildBorder == OUTLINE ) {
00533             memDC.Draw3dRect(rect, afxData.clrWindowFrame, afxData.clrWindowFrame);
00534         } else if( m_eChildBorder == SUNKEN ) {
00535             rect.InflateRect(1,1);
00536             memDC.Draw3dRect(rect, afxData.clrBtnShadow, afxData.clrBtnHilite);
00537             rect.DeflateRect(1,1);
00538             memDC.Draw3dRect(rect, afxData.clrWindowFrame, afxData.clrBtnFace);
00539         } else if( m_eChildBorder == RAISED ) {
00540             rect.InflateRect(1,1);
00541             memDC.Draw3dRect(rect, afxData.clrBtnHilite, afxData.clrWindowFrame);
00542             rect.DeflateRect(1,1);
00543             memDC.Draw3dRect(rect, afxData.clrBtnFace, afxData.clrBtnShadow);
00544         }
00545     }
00546
00547     // copy the memory device context back into the original DC via BitBlt().
00548     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00549
00550     // cleanup resources.
00551     memDC.SelectObject(pOldBitmap);
00552     memDC.DeleteDC();
00553     bitmap.DeleteObject();
00554 }

Here is the call graph for this function:

void CCJControlBar::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 1292 of file CJControlBar.cpp.

References CCJMenu::DestroyMenu(), IsFloating(), CCJMenu::LoadMenu(), CCJMenu::LoadToolbar(), m_nPos, m_popToolbarID, m_popupMenu, m_popupMenuID, and NULL.

01293 {
01294     // No menu was defined...
01295     if (!m_popupMenuID) {
01296         TRACE0( "Warning: No menu resource was associated with CCJControlBar.\n" );
01297     }
01298
01299     else
01300     {
01301         SetCapture();
01302
01303         // Since we are using the main window as the
01304         // parent, we need to convert the point to screen
01305         // coordinates...
01306         CPoint pt = point;
01307         ClientToScreen(&pt);
01308
01309         // Load the popup menu.
01310         VERIFY(m_popupMenu.LoadMenu(m_popupMenuID));
01311         CCJMenu* pPopup = (CCJMenu*)m_popupMenu.GetSubMenu(m_nPos);
01312         ASSERT(pPopup != NULL);
01313
01314         // Load toolbar resource if any for menu icons.
01315         if (m_popToolbarID) {
01316             pPopup->LoadToolbar(m_popToolbarID);
01317         }
01318
01319         //Yiannhs: When right clicking on a floating controlbar, the menu is inactive,
01320         //         this is due to the MiniFrame  apart from being a child is also
01321         //          a Frame Window. and only the main window handles the Bitmap menus
01322         //pWndPopupOwner = GetParentFrame();
01323         CWnd* pWndPopupOwner = GetParentFrame();    //this;
01324         if( IsFloating() )
01325             pWndPopupOwner = pWndPopupOwner->GetParentFrame();
01326
01327         // Display the popup menu, use the main window as its parent.
01328         pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
01329             pt.x, pt.y, pWndPopupOwner);
01330
01331         m_popupMenu.DestroyMenu();
01332
01333         ReleaseCapture();
01334     }
01335 }

Here is the call graph for this function:

BOOL CCJControlBar::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message
 | ) | [protected]

Definition at line 603 of file CJControlBar.cpp.

References m_bDragging, and m_bOkToDrag.

00604 {
00605     return (!m_bOkToDrag && !m_bDragging)?
00606         CControlBar::OnSetCursor(pWnd, nHitTest, message):FALSE;
00607 }

void CCJControlBar::OnUpdateButtonClose ( CCmdUI * pCmdUI ) [protected]

Reimplemented in CCJExplorerBar.

Definition at line 884 of file CJControlBar.cpp.

00885 {
00886     pCmdUI->Enable();
00887 }

void CCJControlBar::OnUpdateButtonMinimize ( CCmdUI * pCmdUI ) [protected]

Definition at line 902 of file CJControlBar.cpp.

00903 {
00904     pCmdUI->Enable();
00905 }

void CCJControlBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget,
 |  | BOOL | bDisableIfNoHndler
 | ) | [virtual]

Definition at line 381 of file CJControlBar.cpp.

References _destroyIcon, BTN_IMG_INDEX, IDS_CONTRACT, IDS_EXPAND, IsFloating(), IsHorzDocked(), m_bButtons, m_bMaximized, m_btnMinim, m_bUnique, m_eAuxIndex, m_hAuxIcon, m_ImageList, m_ToolTip, MAXI_H_DISABLE, MAXI_H_ENABLED, MAXI_V_DISABLE, MAXI_V_ENABLED, NORM_H_ENABLED, NORM_V_ENABLED, NULL, and CCJFlatButton::SetIcon().

00382 {
00383     UNUSED_ALWAYS(pTarget);
00384     UNUSED_ALWAYS(bDisableIfNoHndler);
00385
00386     if((m_bButtons == FALSE) || IsFloating()) {
00387         return;
00388     }
00389
00390     BOOL            bEnable     = FALSE;
00391     UINT            uIDText     = NULL;
00392     BTN_IMG_INDEX   eAuxIndex   = m_eAuxIndex;
00393
00394     if (IsHorzDocked()) {
00395         if (m_bUnique) {
00396             uIDText   = IDS_EXPAND;
00397             eAuxIndex = MAXI_H_DISABLE;
00398             bEnable   = FALSE;
00399         } else if (!m_bMaximized) {
00400             uIDText   = IDS_EXPAND;
00401             eAuxIndex = MAXI_H_ENABLED;
00402             bEnable   = TRUE;
00403         } else {
00404             uIDText   = IDS_CONTRACT;
00405             eAuxIndex = NORM_H_ENABLED;
00406             bEnable   = TRUE;
00407         }
00408     } else {
00409         if (m_bUnique) {
00410             uIDText   = IDS_EXPAND;
00411             eAuxIndex = MAXI_V_DISABLE;
00412             bEnable   = FALSE;
00413         } else if (!m_bMaximized) {
00414             uIDText   = IDS_EXPAND;
00415             eAuxIndex = MAXI_V_ENABLED;
00416             bEnable   = TRUE;
00417         } else {
00418             uIDText   = IDS_CONTRACT;
00419             eAuxIndex = NORM_V_ENABLED;
00420             bEnable   = TRUE;
00421         }
00422     }
00423
00424     // we are only concerned if the image index has changed.
00425     if(eAuxIndex != m_eAuxIndex) {
00426         m_eAuxIndex = eAuxIndex;
00427
00428         // if the button is a valid window, set the new icon.
00429         if(m_btnMinim.GetSafeHwnd()) {
00430             // fix potential resource leak - KStowell - 10-22-99.
00431             _destroyIcon(m_hAuxIcon);
00432             m_hAuxIcon = m_ImageList.ExtractIcon((int)eAuxIndex);
00433             m_btnMinim.SetIcon(m_hAuxIcon, CSize(10,10));
00434             m_btnMinim.EnableWindow(bEnable);
00435
00436             // if the tooltip control is valid, update the tip text.
00437             if(m_ToolTip.GetSafeHwnd()) {
00438                 m_ToolTip.UpdateTipText(uIDText, &m_btnMinim);
00439             }
00440         }
00441     }
00442 }

Here is the call graph for this function:

void CCJControlBar::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]

Reimplemented in CCJExplorerBar, and CCJTabCtrlBar.

Definition at line 731 of file CJControlBar.cpp.

References GetButtonRect(), GetChildRect(), IsFloating(), IsHorzDocked(), m_bAutoSave, m_bButtons, m_bDragging, m_btnClose, m_btnMinim, m_pChildWnd, m_sizeFloat, m_sizeHorz, m_sizeVert, and SaveBarState().

Referenced by CCJTabCtrlBar::OnWindowPosChanged().

00732 {
00733     CControlBar::OnWindowPosChanged(lpwndpos);
00734
00735     if (m_bButtons)
00736     {
00737         if (IsFloating())
00738         {
00739             m_btnClose.ShowWindow(SW_HIDE);
00740             m_btnMinim.ShowWindow(SW_HIDE);
00741         }
00742
00743         else
00744         {
00745             m_btnClose.ShowWindow(SW_SHOW);
00746             m_btnMinim.ShowWindow(SW_SHOW);
00747
00748             CRect rcClose(GetButtonRect());
00749             CRect rcMinim(GetButtonRect());
00750
00751             if (IsHorzDocked()) {
00752                 rcMinim.OffsetRect(0,14);
00753             }
00754
00755             else {
00756                 rcClose.OffsetRect(14,0);
00757             }
00758
00759             m_btnClose.MoveWindow(rcClose);
00760             m_btnMinim.MoveWindow(rcMinim);
00761         }
00762     }
00763
00764     //1999-05-19 Yiannhs
00765     //Calculate Extra Size variables
00766     CSize sizeTemp( lpwndpos->cx, lpwndpos->cy );
00767
00768     // save the current size to the registry.
00769     if( m_bAutoSave ) {
00770         SaveBarState(sizeTemp);
00771     }
00772
00773     if( IsFloating() ) {
00774         m_sizeFloat = sizeTemp;
00775     }
00776
00777     else if( !m_bDragging )
00778     {
00779         if( IsHorzDocked() ) {
00780             m_sizeHorz = sizeTemp;
00781         } else {
00782             m_sizeVert = sizeTemp;
00783         }
00784     }
00785
00786     if( m_pChildWnd->GetSafeHwnd( )) {
00787         CRect rc;
00788         GetChildRect(rc);
00789         rc.DeflateRect(1,1);
00790         m_pChildWnd->MoveWindow(rc);
00791     }
00792 }

Here is the call graph for this function:

BOOL CCJControlBar::PreTranslateMessage ( MSG * pMsg ) [virtual]

Reimplemented in CCJTabCtrlBar.

Definition at line 372 of file CJControlBar.cpp.

References m_bButtons, and m_ToolTip.

Referenced by CCJTabCtrlBar::PreTranslateMessage().

00373 {
00374     // *** GK/ISC
00375     if (m_bButtons && m_ToolTip.GetSafeHwnd()) {
00376         m_ToolTip.RelayEvent(pMsg);
00377     }
00378     return CControlBar::PreTranslateMessage(pMsg);
00379 }

void CCJControlBar::SaveBarState ( CSize & size ) [protected, virtual]

Definition at line 1374 of file CJControlBar.cpp.

References IsFloating(), IsHorzDocked(), m_nID, m_strSection, and TRACK_BORDER_SIZE.

Referenced by OnWindowPosChanged().

01375 {
01376     int nIndex = 0;
01377     CWinApp* pApp = AfxGetApp();
01378
01379     // attempt to loop through all of the defaults stored in the
01380     // system until we find our control id.
01381     while( TRUE )
01382     {
01383         // start at 0 and search for a match to our control bars
01384         // resource id. If one was not found, return.
01385         m_strSection.Format(_T("Bar State-Bar%d"), nIndex);
01386         int nBarID = pApp->GetProfileInt( m_strSection, _T("BarID"), -1 );
01387
01388         // couldn't find a match, just bail...
01389         if( nBarID == -1 ) {
01390             TRACE1( "Warning: Could not find registry information for control bar ID %d\n", m_nID );
01391             return;
01392         }
01393
01394         // we have a match, read the information that was stored, and
01395         // update the cx and cy variables passed in.
01396         if( nBarID == m_nID )
01397         {
01398             if(IsHorzDocked()) {
01399                 size.cy += TRACK_BORDER_SIZE+2;
01400             } else {
01401                 size.cx += TRACK_BORDER_SIZE;
01402             }
01403             //m_strSection += _T("\\CodeJock"); //JK - removed to fix the Bar savings, replaced by the code below... The fix taken from CodeJock Website Discussion board
01404             m_strSection.Format ( _T("CodeJock Bar State-Bar%d"), nIndex ); //JK
01405
01406             // Write the BarID here in case it needs to be matched up in later revisions    //JK
01407             pApp->WriteProfileInt( m_strSection, _T("BarID"), m_nID );  //JK
01408
01409             pApp->WriteProfileInt( m_strSection, _T("MRUDesiredCX"), size.cx );
01410             pApp->WriteProfileInt( m_strSection, _T("MRUDesiredCY"), size.cy );
01411             pApp->WriteProfileInt( m_strSection, _T("MRUFloating" ), IsFloating() );
01412             return;
01413         }
01414
01415         // increment count.
01416         ++nIndex;
01417     }
01418 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJControlBar::SetChild ( CWnd * pWnd ) [protected, virtual]

Definition at line 578 of file CJControlBar.h.

References _CJXLIB_INLINE, and m_pChildWnd.

Referenced by CCJTabCtrlBar::OnCreate().

00579     { ASSERT(::IsWindow(m_hWnd)); m_pChildWnd=pWnd; }

_CJXLIB_INLINE void CCJControlBar::SetMenuID | ( | UINT | popupMenuID,
 |  | UINT | popToolbarID = 0,
 |  | int | nPos = 0
 | ) | [virtual]

Definition at line 548 of file CJControlBar.h.

References _CJXLIB_INLINE, m_nPos, m_popToolbarID, and m_popupMenuID.

00549     { ASSERT(::IsWindow(m_hWnd)); m_popupMenuID=popupMenuID; m_popToolbarID=popToolbarID; m_nPos=nPos; }

_CJXLIB_INLINE void CCJControlBar::SetNormalSize ( const CSize & cs ) [virtual]

Definition at line 554 of file CJControlBar.h.

References _CJXLIB_INLINE, m_sizeDesired, and m_sizeNormal.

00555     { ASSERT(::IsWindow(m_hWnd)); m_sizeDesired=m_sizeNormal=cs; }

_CJXLIB_INLINE void CCJControlBar::ShowFrameControls | ( | BOOL | bGripper = TRUE,
 |  | BOOL | bButtons = TRUE
 | ) | [virtual]

Definition at line 551 of file CJControlBar.h.

References _CJXLIB_INLINE, m_bButtons, and m_bGripper.

00552     { ASSERT(::IsWindow(m_hWnd)); m_bGripper=bGripper; m_bButtons=bButtons; }

Member Data Documentation

bool CCJControlBar::m_bAutoSave [protected]

Definition at line 291 of file CJControlBar.h.

Referenced by CCJControlBar(), Create(), EnableSaveState(), and OnWindowPosChanged().

BOOL CCJControlBar::m_bButtons [protected]

Definition at line 262 of file CJControlBar.h.

Referenced by CCJControlBar(), GetGripperRect(), GetMinExt(), OnCreate(), OnUpdateCmdUI(), OnWindowPosChanged(), PreTranslateMessage(), and ShowFrameControls().

BOOL CCJControlBar::m_bDragging [protected]

Definition at line 258 of file CJControlBar.h.

Referenced by CCJControlBar(), HitTest(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), OnSetCursor(), and OnWindowPosChanged().

BOOL CCJControlBar::m_bFlatBorder [protected]

Definition at line 288 of file CJControlBar.h.

Referenced by CCJControlBar(), Create(), DrawBorders(), EnableFlatLook(), and OnCreate().

BOOL CCJControlBar::m_bFlatGripper [protected]

Definition at line 286 of file CJControlBar.h.

Referenced by CCJControlBar(), Create(), DrawGripper(), EnableFlatLook(), and OnCreate().

BOOL CCJControlBar::m_bFloating [protected]

Definition at line 295 of file CJControlBar.h.

Referenced by CCJControlBar(), and LoadBarState().

BOOL CCJControlBar::m_bGripper [protected]

Definition at line 283 of file CJControlBar.h.

Referenced by CCJControlBar(), DrawGriperCaption(), DrawGripper(), GetMinExt(), and ShowFrameControls().

BOOL CCJControlBar::m_bMaximized [protected]

Definition at line 255 of file CJControlBar.h.

Referenced by CCJControlBar(), Maximize(), Minimize(), Normalize(), OnButtonMinimize(), and OnUpdateCmdUI().

BOOL CCJControlBar::m_bOkToDrag [protected]

Definition at line 252 of file CJControlBar.h.

Referenced by CCJControlBar(), HitTest(), OnLButtonDown(), and OnSetCursor().

CCJCBarButton CCJControlBar::m_btnClose [protected]

Definition at line 279 of file CJControlBar.h.

Referenced by EnableFlatLook(), OnCreate(), and OnWindowPosChanged().

CCJCBarButton CCJControlBar::m_btnMinim [protected]

Definition at line 280 of file CJControlBar.h.

Referenced by EnableFlatLook(), OnCreate(), OnUpdateCmdUI(), and OnWindowPosChanged().

BOOL CCJControlBar::m_bToFit

Definition at line 227 of file CJControlBar.h.

Referenced by CCJSizeDockBar::CalcSizeBarLayout(), CCJControlBar(), DrawBorders(), GetChildRect(), and HitTest().

BOOL CCJControlBar::m_bUnique

Definition at line 223 of file CJControlBar.h.

Referenced by CCJSizeDockBar::CalcSizeBarLayout(), CCJControlBar(), and OnUpdateCmdUI().

int CCJControlBar::m_cxOffset [protected]

Definition at line 235 of file CJControlBar.h.

Referenced by CCJControlBar(), and GetChildRect().

int CCJControlBar::m_cyOffset [protected]

Definition at line 238 of file CJControlBar.h.

Referenced by CCJControlBar().

BTN_IMG_INDEX CCJControlBar::m_eAuxIndex [protected]

Definition at line 241 of file CJControlBar.h.

Referenced by CCJControlBar(), and OnUpdateCmdUI().

CHILD_BORDER CCJControlBar::m_eChildBorder

Definition at line 231 of file CJControlBar.h.

Referenced by CCJControlBar(), and OnPaint().

HICON CCJControlBar::m_hAuxIcon [protected]

Definition at line 293 of file CJControlBar.h.

Referenced by CCJControlBar(), OnUpdateCmdUI(), and ~CCJControlBar().

HICON CCJControlBar::m_hIcon [protected]

Reimplemented in CCJExplorerBar.

Definition at line 292 of file CJControlBar.h.

Referenced by CCJControlBar(), OnCreate(), and ~CCJControlBar().

CImageList CCJControlBar::m_ImageList [protected]

Definition at line 278 of file CJControlBar.h.

Referenced by CCJControlBar(), OnCreate(), OnUpdateCmdUI(), and ~CCJControlBar().

int CCJControlBar::m_nID [protected]

Definition at line 294 of file CJControlBar.h.

Referenced by CCJControlBar(), LoadBarState(), and SaveBarState().

int CCJControlBar::m_nPos [protected]

Definition at line 250 of file CJControlBar.h.

Referenced by CCJControlBar(), OnRButtonDown(), and SetMenuID().

CWnd* CCJControlBar::m_pChildWnd [protected]

Definition at line 274 of file CJControlBar.h.

Referenced by CCJControlBar(), OnWindowPosChanged(), and SetChild().

UINT CCJControlBar::m_popToolbarID [protected]

Definition at line 245 of file CJControlBar.h.

Referenced by CCJControlBar(), OnRButtonDown(), and SetMenuID().

CCJMenu CCJControlBar::m_popupMenu [protected]

Definition at line 249 of file CJControlBar.h.

Referenced by OnInitMenuPopup(), OnMeasureItem(), OnMenuChar(), and OnRButtonDown().

UINT CCJControlBar::m_popupMenuID [protected]

Definition at line 248 of file CJControlBar.h.

Referenced by CCJControlBar(), GetMenuID(), OnRButtonDown(), and SetMenuID().

CPoint CCJControlBar::m_ptCurDrag [protected]

Definition at line 271 of file CJControlBar.h.

Referenced by OnLButtonDown(), OnLButtonUp(), and OnMouseMove().

CPoint CCJControlBar::m_ptStartDrag [protected]

Definition at line 272 of file CJControlBar.h.

Referenced by OnLButtonDown(), and OnLButtonUp().

CRect CCJControlBar::m_rcTrack [protected]

Definition at line 265 of file CJControlBar.h.

Referenced by OnLButtonDown(), OnLButtonUp(), and OnMouseMove().

CSize CCJControlBar::m_sizeDesired [protected]

Definition at line 266 of file CJControlBar.h.

Referenced by CalcDynamicLayout(), CCJControlBar(), Create(), GetHorzSize(), GetVertSize(), Maximize(), Minimize(), Normalize(), OnLButtonUp(), and SetNormalSize().

CSize CCJControlBar::m_sizeFloat [protected]

Definition at line 270 of file CJControlBar.h.

Referenced by CalcDynamicLayout(), CCJControlBar(), Create(), and OnWindowPosChanged().

CSize CCJControlBar::m_sizeHorz [protected]

Definition at line 269 of file CJControlBar.h.

Referenced by CalcDynamicLayout(), CCJControlBar(), Create(), OnLButtonUp(), and OnWindowPosChanged().

CSize CCJControlBar::m_sizeNormal [protected]

Definition at line 267 of file CJControlBar.h.

Referenced by CCJControlBar(), Create(), Maximize(), Minimize(), Normalize(), OnLButtonUp(), and SetNormalSize().

CSize CCJControlBar::m_sizeVert [protected]

Definition at line 268 of file CJControlBar.h.

Referenced by CalcDynamicLayout(), CCJControlBar(), Create(), OnLButtonUp(), and OnWindowPosChanged().

CString CCJControlBar::m_strSection [protected]

Definition at line 290 of file CJControlBar.h.

Referenced by CCJControlBar(), LoadBarState(), and SaveBarState().

CToolTipCtrl CCJControlBar::m_ToolTip [protected]

Definition at line 281 of file CJControlBar.h.

Referenced by OnCreate(), OnUpdateCmdUI(), and PreTranslateMessage().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJControlBar.h
  • WinCvs/CJLib/CJLibrary/CJControlBar.cpp
Generated on Sat Aug 7 22:49:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJDateEdit Class Reference

CCJDateEdit Class Reference

#include <CJMaskEdit.h>

Inheritance diagram for CCJDateEdit:

[legend]
Collaboration diagram for CCJDateEdit:

[legend]
List of all members.

Public Member Functions

CCJDateEdit ()
virtual void | SetDateTime (COleDateTime &dt)
virtual void | SetDateTime (CString strDate)
virtual COleDateTime | GetDateTime ()
virtual CString | GetWindowDateTime ()
virtual COleDateTime | ReadOleDateTime (LPCTSTR lpszData)
virtual bool | ProcessMask (UINT nChar, int nEndPos)
virtual void | FormatOleDateTime (CString &strData, COleDateTime dt)

Constructor & Destructor Documentation

CCJDateEdit::CCJDateEdit ( )

Definition at line 408 of file CJMaskEdit.cpp.

00409 {
00410     m_bUseMask      = true;
00411     m_strMask       = _T("00/00/0000");
00412     m_strLiteral    = _T("__/__/____");
00413 }

Member Function Documentation

void CCJDateEdit::FormatOleDateTime | ( | CString & | strData,
 |  | COleDateTime | dt
 | ) | [virtual]

Reimplemented in CCJTimeEdit.

Definition at line 422 of file CJMaskEdit.cpp.

Referenced by SetDateTime().

00423 {
00424     strData = dt.Format( _T("%d/%m/%Y"));
00425 }

COleDateTime CCJDateEdit::GetDateTime ( ) [virtual]

Definition at line 441 of file CJMaskEdit.cpp.

References ReadOleDateTime().

Referenced by DDX_OleDateTime().

00442 {
00443     CString strText;
00444     GetWindowText(strText);
00445     return ReadOleDateTime(strText);
00446 }

Here is the call graph for this function:

CString CCJDateEdit::GetWindowDateTime ( ) [virtual]

Definition at line 448 of file CJMaskEdit.cpp.

00449 {
00450     CString strText;
00451     GetWindowText(strText);
00452     return strText;
00453 }

bool CCJDateEdit::ProcessMask | ( | UINT | nChar,
 |  | int | nEndPos
 | ) | [virtual]

Reimplemented from CCJMaskEdit.

Reimplemented in CCJTimeEdit.

Definition at line 455 of file CJMaskEdit.cpp.

00456 {
00457     // check the key against the mask
00458     switch( m_strMask.GetAt( nEndPos ))
00459     {
00460     case '0':       // digit only //completely changed this
00461         {
00462             bool bReturn = true;
00463
00464             if( isdigit( nChar ))
00465             {
00466                 if( nEndPos == 0 )
00467                 {
00468                     if( nChar > '3' ) {
00469                         bReturn = false;
00470                     }
00471                 }
00472                 else if( nEndPos == 1 )
00473                 {
00474                     if( m_strWindowText.GetAt(0) == '3' )
00475                     {
00476                         if( nChar > '1' ) {
00477                             bReturn = false;
00478                         }
00479                     }
00480                 }
00481                 else if( nEndPos == 3 )
00482                 {
00483                     if( nChar > '1' ) {
00484                         bReturn = false;
00485                     }
00486                 }
00487                 else if( nEndPos == 4 )
00488                 {
00489                     if( m_strWindowText.GetAt(3) == '1' )
00490                     {
00491                         if( nChar > '2') {
00492                             bReturn = false;
00493                         }
00494                     }
00495                 }
00496                 return bReturn;
00497             }
00498             break;
00499         }
00500     }
00501
00502     MessageBeep((UINT)-1);
00503     return false;
00504 }

COleDateTime CCJDateEdit::ReadOleDateTime ( LPCTSTR lpszData ) [virtual]

Definition at line 415 of file CJMaskEdit.cpp.

Referenced by GetDateTime().

00416 {
00417     COleDateTime dt;
00418     dt.ParseDateTime(lpszData);
00419     return dt;
00420 }

void CCJDateEdit::SetDateTime ( CString strDate ) [virtual]

Definition at line 435 of file CJMaskEdit.cpp.

00436 {
00437     m_strWindowText = m_strMaskLiteral = strDate;
00438     SetWindowText(strDate);
00439 }

void CCJDateEdit::SetDateTime ( COleDateTime & dt ) [virtual]

Definition at line 427 of file CJMaskEdit.cpp.

References FormatOleDateTime().

Referenced by DDX_OleDateTime().

00428 {
00429     CString strText;
00430     FormatOleDateTime(strText, dt);
00431     m_strWindowText = m_strMaskLiteral = strText;
00432     SetWindowText(strText);
00433 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMaskEdit.h
  • WinCvs/CJLib/CJLibrary/CJMaskEdit.cpp
Generated on Sat Aug 7 22:49:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJDateTimeCtrl Class Reference

CCJDateTimeCtrl Class Reference

#include <CJDateTimeCtrl.h>

Inheritance diagram for CCJDateTimeCtrl:

[legend]
Collaboration diagram for CCJDateTimeCtrl:

[legend]
List of all members.

Public Member Functions

CCJDateTimeCtrl ()
virtual | ~CCJDateTimeCtrl ()
BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)
COLORREF | GetMonthCalColor (int iColor) const
COLORREF | SetMonthCalColor (int iColor, COLORREF ref)
BOOL | SetFormat (LPCTSTR pstrFormat)
CCJMonthCalCtrl * | GetMonthCalCtrl () const
CFont * | GetMonthCalFont () const
void | SetMonthCalFont (HFONT hFont, BOOL bRedraw=TRUE)
BOOL | SetRange (const COleDateTime *pMinRange, const COleDateTime *pMaxRange)
BOOL | SetRange (const CTime *pMinRange, const CTime *pMaxRange)
DWORD | GetRange (COleDateTime *pMinRange, COleDateTime *pMaxRange) const
DWORD | GetRange (CTime *pMinRange, CTime *pMaxRange) const
BOOL | SetTime (const CTime *pTimeNew)
BOOL | SetTime (const COleDateTime &timeNew)
BOOL | SetTime (LPSYSTEMTIME pTimeNew=NULL)
DWORD | GetTime (CTime &timeDest) const
BOOL | GetTime (COleDateTime &timeDest) const
DWORD | GetTime (LPSYSTEMTIME pTimeDest) const

Constructor & Destructor Documentation

_CJXLIB_INLINE CCJDateTimeCtrl::CCJDateTimeCtrl ( )

Definition at line 763 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00764     { }

CCJDateTimeCtrl::~CCJDateTimeCtrl ( ) [virtual]

Definition at line 443 of file CJDateTimeCtrl.cpp.

00444 {
00445     DestroyWindow();
00446 }

Member Function Documentation

BOOL CCJDateTimeCtrl::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) |

Definition at line 250 of file CJDateTimeCtrl.cpp.

References NULL.

00252 {
00253    // initialize common controls
00254 #ifdef _VC_VERSION_5
00255     INITCOMMONCONTROLSEX icex;
00256     icex.dwSize = sizeof(icex);
00257     icex.dwICC = ICC_DATE_CLASSES;
00258     VERIFY(InitCommonControlsEx(&icex));
00259 #else
00260     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_DATE_REG));
00261 #endif
00262
00263     CWnd* pWnd = this;
00264     return pWnd->Create(DATETIMEPICK_CLASS, NULL, dwStyle, rect, pParentWnd, nID);
00265 }

_CJXLIB_INLINE COLORREF CCJDateTimeCtrl::GetMonthCalColor ( int iColor ) const

Definition at line 775 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00776     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, DTM_GETMCCOLOR, (WPARAM) iColor, 0); }

_CJXLIB_INLINE CCJMonthCalCtrl * CCJDateTimeCtrl::GetMonthCalCtrl ( ) const

Definition at line 767 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00768     { ASSERT(::IsWindow(m_hWnd)); return (CCJMonthCalCtrl*) CWnd::FromHandle((HWND) ::SendMessage(m_hWnd, DTM_GETMONTHCAL, 0, 0)); }

_CJXLIB_INLINE CFont * CCJDateTimeCtrl::GetMonthCalFont ( ) const

Definition at line 765 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00766     { ASSERT(::IsWindow(m_hWnd)); return CFont::FromHandle((HFONT) ::SendMessage(m_hWnd, DTM_GETMCFONT, 0, 0)); }

DWORD CCJDateTimeCtrl::GetRange | ( | CTime * | pMinRange,
 |  | CTime * | pMaxRange
 | ) | const

Definition at line 267 of file CJDateTimeCtrl.cpp.

References NULL.

00268 {
00269     ASSERT(::IsWindow(m_hWnd));
00270     SYSTEMTIME sysTimes[2];
00271     memset(sysTimes, 0, sizeof(sysTimes));
00272
00273     DWORD dwResult = ::SendMessage(m_hWnd, DTM_GETRANGE, 0, (LPARAM) &sysTimes);
00274
00275     if (pMinTime != NULL)
00276     {
00277         if (dwResult & GDTR_MIN)
00278             *pMinTime = CTime(sysTimes[0]);
00279     }
00280
00281     if (pMaxTime != NULL)
00282     {
00283         if (dwResult & GDTR_MAX)
00284             *pMaxTime = CTime(sysTimes[1]);
00285     }
00286
00287     return dwResult;
00288
00289 }

DWORD CCJDateTimeCtrl::GetRange | ( | COleDateTime * | pMinRange,
 |  | COleDateTime * | pMaxRange
 | ) | const

Definition at line 291 of file CJDateTimeCtrl.cpp.

References NULL.

00293 {
00294     ASSERT(::IsWindow(m_hWnd));
00295
00296     SYSTEMTIME sysTimes[2];
00297     memset(sysTimes, 0, sizeof(sysTimes));
00298
00299     DWORD dwResult = ::SendMessage(m_hWnd, DTM_GETRANGE, 0, (LPARAM) &sysTimes);
00300     if (pMinTime != NULL)
00301     {
00302         if (dwResult & GDTR_MIN)
00303             *pMinTime = COleDateTime(sysTimes[0]);
00304         else
00305             pMinTime->SetStatus(COleDateTime::null);
00306     }
00307
00308     if (pMaxTime != NULL)
00309     {
00310         if (dwResult & GDTR_MAX)
00311             *pMaxTime = COleDateTime(sysTimes[1]);
00312         else
00313             pMaxTime->SetStatus(COleDateTime::null);
00314     }
00315
00316     return dwResult;
00317 }

_CJXLIB_INLINE DWORD CCJDateTimeCtrl::GetTime ( LPSYSTEMTIME pTimeDest ) const

Definition at line 773 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00774     { ASSERT(::IsWindow(m_hWnd)); ASSERT(pTimeDest != NULL); return (DWORD) ::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM) pTimeDest); }

BOOL CCJDateTimeCtrl::GetTime ( COleDateTime & timeDest ) const

Definition at line 409 of file CJDateTimeCtrl.cpp.

00410 {
00411     SYSTEMTIME sysTime;
00412     BOOL bRetVal = TRUE;
00413
00414     LRESULT result = ::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM) &sysTime);
00415     if (result == GDT_VALID)
00416     {
00417         timeDest = COleDateTime(sysTime);
00418         bRetVal = TRUE;
00419         ASSERT(timeDest.GetStatus() == COleDateTime::valid);
00420     }
00421     else if (result == GDT_NONE)
00422     {
00423         timeDest.SetStatus(COleDateTime::null);
00424         bRetVal = TRUE;
00425     }
00426     else
00427         timeDest.SetStatus(COleDateTime::invalid);
00428     return bRetVal;
00429 }

DWORD CCJDateTimeCtrl::GetTime ( CTime & timeDest ) const

Definition at line 431 of file CJDateTimeCtrl.cpp.

Referenced by DDX_CJDateTimeCtrl().

00432 {
00433     SYSTEMTIME sysTime;
00434     DWORD dwResult = (DWORD)
00435         ::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM) &sysTime);
00436
00437     if (dwResult == GDT_VALID)
00438         timeDest = CTime(sysTime);
00439
00440     return dwResult;
00441 }

_CJXLIB_INLINE BOOL CCJDateTimeCtrl::SetFormat ( LPCTSTR pstrFormat )

Definition at line 777 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00778     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, DTM_SETFORMAT, 0, (LPARAM) pstrFormat); }

_CJXLIB_INLINE COLORREF CCJDateTimeCtrl::SetMonthCalColor | ( | int | iColor,
 |  | COLORREF | ref
 | ) |

Definition at line 771 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00772     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, DTM_SETMCCOLOR, (WPARAM) iColor, (LPARAM) ref); }

_CJXLIB_INLINE void CCJDateTimeCtrl::SetMonthCalFont | ( | HFONT | hFont,
 |  | BOOL | bRedraw = TRUE
 | ) |

Definition at line 769 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00770     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, DTM_SETMCFONT, (WPARAM) hFont, MAKELONG(bRedraw, 0)); }

BOOL CCJDateTimeCtrl::SetRange | ( | const CTime * | pMinRange,
 |  | const CTime * | pMaxRange
 | ) |

Definition at line 319 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime(), and NULL.

00320 {
00321     ASSERT(::IsWindow(m_hWnd));
00322
00323     SYSTEMTIME sysTimes[2];
00324
00325     WPARAM wFlags = 0;
00326     if (pMinTime != NULL && GetAsSystemTime(pMinTime, sysTimes[0]))
00327         wFlags |= GDTR_MIN;
00328
00329     if (pMaxTime != NULL && GetAsSystemTime(pMaxTime, sysTimes[1]))
00330         wFlags |= GDTR_MAX;
00331
00332     return (BOOL) ::SendMessage(m_hWnd, DTM_SETRANGE, wFlags, (LPARAM) &sysTimes);
00333 }

Here is the call graph for this function:

BOOL CCJDateTimeCtrl::SetRange | ( | const COleDateTime * | pMinRange,
 |  | const COleDateTime * | pMaxRange
 | ) |

Definition at line 335 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime(), and NULL.

Referenced by DDV_CJMinMaxDateTime().

00336 {
00337     ASSERT(::IsWindow(m_hWnd));
00338     ASSERT(pMinTime == NULL || pMinTime->GetStatus() != COleDateTime::invalid);
00339     ASSERT(pMaxTime == NULL || pMaxTime->GetStatus() != COleDateTime::invalid);
00340
00341     SYSTEMTIME sysTime[2];
00342
00343     WPARAM wFlags = 0;
00344     if (pMinTime != NULL && pMinTime->GetStatus() != COleDateTime::null)
00345     {
00346         if (GetAsSystemTime(pMinTime, sysTime[0]))
00347             wFlags |= GDTR_MIN;
00348     }
00349
00350     if (pMaxTime != NULL && pMaxTime->GetStatus() != COleDateTime::null)
00351     {
00352         if (GetAsSystemTime(pMaxTime, sysTime[1]))
00353             wFlags |= GDTR_MAX;
00354     }
00355
00356     return (BOOL) ::SendMessage(m_hWnd, DTM_SETRANGE, wFlags, (LPARAM) &sysTime);
00357 }

Here is the call graph for this function:

BOOL CCJDateTimeCtrl::SetTime ( LPSYSTEMTIME pTimeNew = NULL )

Definition at line 359 of file CJDateTimeCtrl.cpp.

References NULL.

00360 {
00361     ASSERT(::IsWindow(m_hWnd));
00362     WPARAM wParam = (pTimeNew == NULL) ? GDT_NONE : GDT_VALID;
00363     return (BOOL) ::SendMessage(m_hWnd, DTM_SETSYSTEMTIME,
00364         wParam, (LPARAM) pTimeNew);
00365 }

BOOL CCJDateTimeCtrl::SetTime ( const COleDateTime & timeNew )

Definition at line 367 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime().

00368 {
00369     BOOL bRetVal = FALSE;
00370
00371     // make sure the time isn't invalid
00372     ASSERT(timeNew.GetStatus() != COleDateTime::invalid);
00373     ASSERT(::IsWindow(m_hWnd));
00374
00375     SYSTEMTIME sysTime;
00376     WPARAM wParam = GDT_NONE;
00377     if (timeNew.GetStatus() == COleDateTime::valid &&
00378         GetAsSystemTime(timeNew, sysTime))
00379     {
00380         wParam = GDT_VALID;
00381     }
00382
00383     bRetVal = (BOOL) ::SendMessage(m_hWnd,
00384             DTM_SETSYSTEMTIME, wParam, (LPARAM) &sysTime);
00385
00386     return bRetVal;
00387 }

Here is the call graph for this function:

BOOL CCJDateTimeCtrl::SetTime ( const CTime * pTimeNew )

Definition at line 389 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime(), and NULL.

Referenced by DDX_CJDateTimeCtrl().

00390 {
00391     BOOL bRetVal = FALSE;
00392
00393     // make sure the time isn't invalid
00394     ASSERT(::IsWindow(m_hWnd));
00395
00396     SYSTEMTIME sysTime;
00397     WPARAM wParam = GDT_NONE;
00398     if (pTimeNew != NULL && GetAsSystemTime(pTimeNew, sysTime))
00399     {
00400         wParam = GDT_VALID;
00401     }
00402
00403     bRetVal = (BOOL) ::SendMessage(m_hWnd,
00404             DTM_SETSYSTEMTIME, wParam, (LPARAM) &sysTime);
00405
00406     return bRetVal;
00407 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJDateTimeCtrl.h
  • WinCvs/CJLib/CJLibrary/CJDateTimeCtrl.cpp
Generated on Sat Aug 7 22:49:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJDockBar Class Reference

CCJDockBar Class Reference

#include <CJDockBar.h>

Inheritance diagram for CCJDockBar:

[legend]
Collaboration diagram for CCJDockBar:

[legend]
List of all members.

Public Member Functions

CCJDockBar ()
virtual | ~CCJDockBar ()
virtual CSize | CalcFixedLayout (BOOL bStretch, BOOL bHorz)

Constructor & Destructor Documentation

CCJDockBar::CCJDockBar ( )

Definition at line 57 of file CJDockBar.cpp.

00058 {
00059     // TODO: add construction code here.
00060 }

CCJDockBar::~CCJDockBar ( ) [virtual]

Definition at line 62 of file CJDockBar.cpp.

00063 {
00064     // TODO: add destruction code here.
00065 }

Member Function Documentation

CSize CCJDockBar::CalcFixedLayout | ( | BOOL | bStretch,
 |  | BOOL | bHorz
 | ) | [virtual]

Definition at line 79 of file CJDockBar.cpp.

References NULL.

00080 {
00081     ASSERT_VALID(this);
00082
00083     CSize sizeFixed = CControlBar::CalcFixedLayout(bStretch, bHorz);
00084
00085     // get max size
00086     CSize sizeMax;
00087     if (!m_rectLayout.IsRectEmpty())
00088         sizeMax = m_rectLayout.Size();
00089     else
00090     {
00091         CRect rectFrame;
00092         CFrameWnd* pFrame = GetParentFrame();
00093         pFrame->GetClientRect(&rectFrame);
00094         sizeMax = rectFrame.Size();
00095     }
00096
00097     const int NormalcxBorder2=GetSystemMetrics(SM_CYBORDER)*2;
00098     const int NormalcyBorder2=2;
00099     const int AltcxBorder2=0;
00100     const int AltcyBorder2=0;
00101     int cxBorder2=0;
00102     int cyBorder2=0;
00103
00104     // prepare for layout
00105     AFX_SIZEPARENTPARAMS layout;
00106     layout.hDWP = m_bLayoutQuery ?
00107         NULL : ::BeginDeferWindowPos(m_arrBars.GetSize());
00108     CPoint pt(-cxBorder2, -NormalcyBorder2);
00109     int nWidth = 0;
00110
00111     BOOL bWrapped = FALSE;
00112
00113     // layout all the control bars
00114     for (int nPos = 0; nPos < m_arrBars.GetSize(); nPos++)
00115     {
00116         CControlBar* pBar = GetDockedControlBar(nPos);
00117         void* pVoid = m_arrBars[nPos];
00118
00119         if (pBar != NULL)
00120         {
00121             if (pBar->IsVisible())
00122             {
00123                 if(pBar->IsKindOf(RUNTIME_CLASS(CCJToolBar)))
00124                 {
00125                     cxBorder2=AltcxBorder2;
00126                     cyBorder2=AltcyBorder2;
00127                 }
00128                 else
00129                 {
00130                     cxBorder2=NormalcxBorder2;
00131                     cyBorder2=NormalcyBorder2;
00132                 }
00133                 // get ideal rect for bar
00134                 DWORD dwMode = 0;
00135                 if ((pBar->m_dwStyle & CBRS_SIZE_DYNAMIC) &&
00136                     (pBar->m_dwStyle & CBRS_FLOATING))
00137                     dwMode |= LM_HORZ | LM_MRUWIDTH;
00138                 else if (pBar->m_dwStyle & CBRS_ORIENT_HORZ)
00139                     dwMode |= LM_HORZ | LM_HORZDOCK;
00140                 else
00141                     dwMode |=  LM_VERTDOCK;
00142
00143                 CSize sizeBar = pBar->CalcDynamicLayout(-1, dwMode);
00144
00145                 CRect rect(pt, sizeBar);
00146
00147                 // get current rect for bar
00148                 CRect rectBar;
00149                 pBar->GetWindowRect(&rectBar);
00150                 ScreenToClient(&rectBar);
00151
00152                 if (bHorz)
00153                 {
00154                     // Offset Calculated Rect out to Actual
00155                     if (rectBar.left > rect.left && !m_bFloating)
00156                         rect.OffsetRect(rectBar.left - rect.left, 0);
00157
00158                     // If ControlBar goes off the right, then right justify
00159                     if (rect.right > sizeMax.cx && !m_bFloating)
00160                     {
00161                         int x = rect.Width() - cxBorder2;
00162                         x = max(sizeMax.cx - x, pt.x);
00163                         rect.OffsetRect(x - rect.left, 0);
00164                     }
00165
00166                     // If ControlBar has been wrapped, then left justify
00167                     if (bWrapped)
00168                     {
00169                         bWrapped = FALSE;
00170                         rect.OffsetRect(-(rect.left + cxBorder2), 0);
00171                     }
00172                     // If ControlBar is completely invisible, then wrap it
00173                     else if ((rect.left >= (sizeMax.cx - cxBorder2)) &&
00174                         (nPos > 0) && (m_arrBars[nPos - 1] != NULL))
00175                     {
00176                         m_arrBars.InsertAt(nPos, (CObject*)NULL);
00177                         pBar = NULL; pVoid = NULL;
00178                         bWrapped = TRUE;
00179                     }
00180                     if (!bWrapped)
00181                     {
00182                         if (rect != rectBar)
00183                         {
00184                             if (!m_bLayoutQuery &&
00185                                 !(pBar->m_dwStyle & CBRS_FLOATING))
00186                             {
00187                                 pBar->m_pDockContext->m_rectMRUDockPos = rect;
00188                             }
00189                             AfxRepositionWindow(&layout, pBar->m_hWnd, &rect);
00190                         }
00191                         pt.x = rect.left + sizeBar.cx - cxBorder2;
00192                         nWidth = max(nWidth, sizeBar.cy);
00193                     }
00194                 }
00195                 else
00196                 {
00197                     // Offset Calculated Rect out to Actual
00198                     if (rectBar.top > rect.top && !m_bFloating)
00199                         rect.OffsetRect(0, rectBar.top - rect.top);
00200
00201                     // If ControlBar goes off the bottom, then bottom justify
00202                     if (rect.bottom > sizeMax.cy && !m_bFloating)
00203                     {
00204                         int y = rect.Height() - cyBorder2;
00205                         y = max(sizeMax.cy - y, pt.y);
00206                         rect.OffsetRect(0, y - rect.top);
00207                     }
00208
00209                     // If ControlBar has been wrapped, then top justify
00210                     if (bWrapped)
00211                     {
00212                         bWrapped = FALSE;
00213                         rect.OffsetRect(0, -(rect.top + cyBorder2));
00214                     }
00215                     // If ControlBar is completely invisible, then wrap it
00216                     else if ((rect.top >= (sizeMax.cy - cyBorder2)) &&
00217                         (nPos > 0) && (m_arrBars[nPos - 1] != NULL))
00218                     {
00219                         m_arrBars.InsertAt(nPos, (CObject*)NULL);
00220                         pBar = NULL; pVoid = NULL;
00221                         bWrapped = TRUE;
00222                     }
00223                     if (!bWrapped)
00224                     {
00225                         if (rect != rectBar)
00226                         {
00227                             if (!m_bLayoutQuery &&
00228                                 !(pBar->m_dwStyle & CBRS_FLOATING))
00229                             {
00230                                 pBar->m_pDockContext->m_rectMRUDockPos = rect;
00231                             }
00232                             AfxRepositionWindow(&layout, pBar->m_hWnd, &rect);
00233                         }
00234                         pt.y = rect.top + sizeBar.cy - cyBorder2;
00235                         nWidth = max(nWidth, sizeBar.cx);
00236                     }
00237                 }
00238             }
00239             if (!bWrapped)
00240             {
00241                 // handle any delay/show hide for the bar
00242                 pBar->RecalcDelayShow(&layout);
00243             }
00244         }
00245         if (pBar == NULL && pVoid == NULL && nWidth != 0)
00246         {
00247             // end of row because pBar == NULL
00248             if (bHorz)
00249             {
00250                 pt.y += nWidth - cyBorder2;
00251                 sizeFixed.cx = max(sizeFixed.cx, pt.x);
00252                 sizeFixed.cy = max(sizeFixed.cy, pt.y);
00253                 pt.x = -cxBorder2;
00254             }
00255             else
00256             {
00257                 pt.x += nWidth - cxBorder2;
00258                 sizeFixed.cx = max(sizeFixed.cx, pt.x);
00259                 sizeFixed.cy = max(sizeFixed.cy, pt.y);
00260                 pt.y = -cyBorder2;
00261             }
00262             nWidth = 0;
00263         }
00264     }
00265     if (!m_bLayoutQuery)
00266     {
00267         // move and resize all the windows at once!
00268         if (layout.hDWP == NULL || !::EndDeferWindowPos(layout.hDWP))
00269             TRACE0("Warning: DeferWindowPos failed - low system resources.\n");
00270     }
00271
00272     // adjust size for borders on the dock bar itself
00273     CRect rect;
00274     rect.SetRectEmpty();
00275     CalcInsideRect(rect, bHorz);
00276
00277     if ((!bStretch || !bHorz) && sizeFixed.cx != 0)
00278         sizeFixed.cx += -rect.right + rect.left;
00279     if ((!bStretch || bHorz) && sizeFixed.cy != 0)
00280         sizeFixed.cy += -rect.bottom + rect.top;
00281
00282     return sizeFixed;
00283 }

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJDockBar.h
  • WinCvs/CJLib/CJLibrary/CJDockBar.cpp
Generated on Sat Aug 7 22:49:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJDockContext Class Reference

CCJDockContext Class Reference

#include <CJDockContext.h>

Inheritance diagram for CCJDockContext:

[legend]
Collaboration diagram for CCJDockContext:

[legend]
List of all members.

Public Member Functions

CCJDockContext (CControlBar *pBar)
virtual | ~CCJDockContext ()
void | EndDragDockBar ()
void | MoveDockBar (CPoint pt)
void | StartDragDockBar (CPoint pt)
DWORD | CanDockDockBar ()
DWORD | CanDockDockBar (CRect rect, DWORD dwDockStyle, CDockBar **ppDockBar=NULL)
BOOL | TrackDockBar ()
CCJSizeDockBar * | GetDockBar (DWORD dwOverDockStyle)
void | DockSizeBar (CControlBar *, CCJSizeDockBar *=NULL, LPRECT=NULL)
virtual void | ToggleDocking ()
void | Stretch (CPoint pt)
virtual void | StartResize (int nHitTest, CPoint pt)

Public Attributes

CPoint | m_ptOrig

Constructor & Destructor Documentation

CCJDockContext::CCJDockContext ( CControlBar * pBar )

Definition at line 106 of file CJDockContext.cpp.

00106                                                 : CDockContext(pBar)
00107 {
00108     // TODO: add construction code here.
00109 }

CCJDockContext::~CCJDockContext ( ) [virtual]

Definition at line 111 of file CJDockContext.cpp.

00112 {
00113     // TODO: add destruction code here.
00114 }

Member Function Documentation

DWORD CCJDockContext::CanDockDockBar | ( | CRect | rect,
 |  | DWORD | dwDockStyle,
 |  | CDockBar ** | ppDockBar = NULL
 | ) |

Definition at line 257 of file CJDockContext.cpp.

References CCJSizeDockBar::IsDockSizeBar(), and NULL.

00258 {
00259     CFrameWnd *pFrame = (CFrameWnd*)m_pDockSite;
00260     ASSERT_VALID(pFrame);
00261
00262     dwDockStyle &= CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI;
00263
00264     if (ppDockBar != NULL)
00265         *ppDockBar = NULL;
00266     POSITION pos = pFrame->m_listControlBars.GetHeadPosition();
00267     while (pos != NULL)
00268     {
00269         CCJSizeDockBar* pDockBar = (CCJSizeDockBar*)pFrame->m_listControlBars.GetNext(pos);
00270         if( !pDockBar->IsKindOf(RUNTIME_CLASS(CCJSizeDockBar)) )
00271             continue;
00272         if (pDockBar->IsDockSizeBar() && pDockBar->IsWindowVisible() &&
00273             (pDockBar->m_dwStyle & dwDockStyle & CBRS_ALIGN_ANY) &&
00274             (!pDockBar->m_bFloating ||
00275                 (dwDockStyle & pDockBar->m_dwStyle & CBRS_FLOAT_MULTI)))
00276         {
00277             CRect rectBar;
00278             pDockBar->GetWindowRect(&rectBar);
00279             if (rectBar.Width() == 0)
00280                 rectBar.right++;
00281             if (rectBar.Height() == 0)
00282                 rectBar.bottom++;
00283             if (rectBar.IntersectRect(rectBar, rect))
00284             {
00285                 if (ppDockBar != NULL)
00286                     *ppDockBar = pDockBar;
00287                 return pDockBar->m_dwStyle & dwDockStyle;
00288             }
00289         }
00290     }
00291     return 0;
00292 }

Here is the call graph for this function:

DWORD CCJDockContext::CanDockDockBar ( )

Definition at line 209 of file CJDockContext.cpp.

References HORZF, and VERTF.

Referenced by GetDockBar(), MoveDockBar(), and StartDragDockBar().

00210 {
00211     BOOL bStyleHorz;
00212     DWORD dwDock = 0;
00213     DWORD dwCurr = 0;
00214
00215     ASSERT(m_dwStyle != 0);
00216     ASSERT_KINDOF(CFrameWnd, m_pDockSite);
00217
00218     bStyleHorz = HORZF(m_dwStyle);
00219     bStyleHorz = m_bFlip ? !bStyleHorz : bStyleHorz;
00220
00221     if (bStyleHorz && HORZF(m_dwDockStyle))
00222     {
00223         dwDock = CanDockDockBar(m_rectDragHorz,
00224             m_dwDockStyle & ~CBRS_ORIENT_VERT);
00225     }
00226
00227     else if (VERTF(m_dwDockStyle))
00228     {
00229         dwDock = CanDockDockBar(m_rectDragVert,
00230             m_dwDockStyle & ~CBRS_ORIENT_HORZ);
00231     }
00232
00233     if (!m_bFlip)
00234     {
00235         if (dwDock == 0 && HORZF(m_dwDockStyle))
00236         {
00237             dwCurr = CanDockDockBar(m_rectDragVert,
00238                 m_dwDockStyle & ~CBRS_ORIENT_VERT);
00239             dwDock = CanDockDockBar(m_rectDragHorz,
00240                 m_dwDockStyle & ~CBRS_ORIENT_VERT);
00241             dwDock = (dwDock == dwCurr) ? dwDock : 0;
00242         }
00243
00244         if (dwDock == 0 && VERTF(m_dwDockStyle))
00245         {
00246             dwCurr = CanDockDockBar(m_rectDragHorz,
00247                 m_dwDockStyle & ~CBRS_ORIENT_HORZ);
00248             dwDock = CanDockDockBar(m_rectDragVert,
00249                 m_dwDockStyle & ~CBRS_ORIENT_HORZ);
00250             dwDock = (dwDock == dwCurr) ? dwDock : 0;
00251         }
00252     }
00253
00254     return dwDock;
00255 }

void CCJDockContext::DockSizeBar | ( | CControlBar * | ,
 |  | CCJSizeDockBar * | = NULL,
 |  | LPRECT | = NULL
 | ) |

Definition at line 440 of file CJDockContext.cpp.

References dwSizeBarMap, and NULL.

Referenced by EndDragDockBar(), and ToggleDocking().

00441 {
00442     CFrameWnd *pFrame = (CFrameWnd*)m_pDockSite;
00443     ASSERT_VALID(pFrame);
00444
00445     ASSERT(pBar != NULL);
00446     ASSERT(pBar->m_pDockContext != NULL);
00447
00448     if( pDockBar == NULL )
00449     {
00450         for (int i = 0; i < 4; i++)
00451         {
00452             if ((dwSizeBarMap[i][1] & CBRS_ALIGN_ANY) ==
00453                 (pBar->m_dwStyle & CBRS_ALIGN_ANY))
00454             {
00455                 pDockBar = (CCJSizeDockBar*)pFrame->GetControlBar(dwSizeBarMap[i][0]);
00456                 ASSERT(pDockBar != NULL);
00457                 break;
00458             }
00459         }
00460     }
00461
00462     ASSERT(pDockBar != NULL);
00463     ASSERT(pFrame->m_listControlBars.Find(pBar) != NULL);
00464     ASSERT(pBar->m_pDockSite == pFrame);
00465     ((CCJControlBar*)pBar)->Normalize();
00466     pDockBar->DockControlBar(pBar, lpRect);
00467 }

void CCJDockContext::EndDragDockBar ( )

Definition at line 352 of file CJDockContext.cpp.

References DockSizeBar(), GetDockBar(), HORZF, m_ptOrig, NULL, and VERTF.

Referenced by TrackDockBar().

00353 {
00354     CancelLoop();
00355     //Yiannhs: reduce some more flickering, and unexpected behaviour in floating bars
00356     //         ok did the expected.
00357     if( m_ptLast == m_ptOrig )
00358         return;
00359
00360     if (m_dwOverDockStyle != 0)
00361     {
00362         CCJSizeDockBar* pDockBar = GetDockBar(m_dwOverDockStyle);
00363         if( pDockBar == NULL ) // John Armstrong
00364             return;
00365
00366         CRect rect = (m_dwOverDockStyle & CBRS_ORIENT_VERT) ?
00367             m_rectDragVert : m_rectDragHorz;
00368
00369         UINT uID = _AfxGetDlgCtrlID(pDockBar->m_hWnd);
00370         m_uMRUDockID = uID;
00371         m_rectMRUDockPos = rect;
00372         pDockBar->ScreenToClient(&m_rectMRUDockPos);
00373         DockSizeBar(m_pBar, pDockBar, &rect);
00374
00375         //yiannhs. after testing the posibilities I think this is the best way
00376         m_pDockSite->RecalcLayout( FALSE );
00377     }
00378
00379     else if ((m_dwStyle & CBRS_SIZE_DYNAMIC) || (HORZF(m_dwStyle) && !m_bFlip) ||
00380         (VERTF(m_dwStyle) && m_bFlip))
00381     {
00382         m_dwMRUFloatStyle = CBRS_ALIGN_TOP | (m_dwDockStyle & CBRS_FLOAT_MULTI);
00383         m_ptMRUFloatPos = m_rectFrameDragHorz.TopLeft();
00384         m_pDockSite->FloatControlBar(m_pBar, m_ptMRUFloatPos, m_dwMRUFloatStyle);
00385
00386         //yiannhs. after testing the posibilities I think this is the best way
00387         m_pDockSite->RecalcLayout( FALSE );
00388     }
00389
00390     else
00391     {
00392         m_dwMRUFloatStyle = CBRS_ALIGN_LEFT | (m_dwDockStyle & CBRS_FLOAT_MULTI);
00393         m_ptMRUFloatPos = m_rectFrameDragVert.TopLeft();
00394         m_pDockSite->FloatControlBar(m_pBar, m_ptMRUFloatPos, m_dwMRUFloatStyle);
00395
00396         //yiannhs. after testing the posibilities I think this is the best way
00397         m_pDockSite->RecalcLayout( FALSE );
00398     }
00399 }

Here is the call graph for this function:

CCJSizeDockBar * CCJDockContext::GetDockBar ( DWORD dwOverDockStyle )

Definition at line 401 of file CJDockContext.cpp.

References CanDockDockBar(), HORZF, NULL, and VERTF.

Referenced by EndDragDockBar().

00402 {
00403     DWORD dw = 0;
00404     CDockBar* pBar;
00405     if (HORZF(dwOverDockStyle))
00406     {
00407         ASSERT_KINDOF(CFrameWnd, m_pDockSite);
00408         dw = CanDockDockBar(m_rectDragHorz,
00409             dwOverDockStyle & ~CBRS_ORIENT_VERT, &pBar);
00410         ASSERT(dw != 0);
00411         ASSERT(pBar != NULL);
00412         return (CCJSizeDockBar*)pBar;
00413     }
00414
00415     if (VERTF(dwOverDockStyle))
00416     {
00417         dw = CanDockDockBar(m_rectDragVert,
00418             dwOverDockStyle & ~CBRS_ORIENT_HORZ, &pBar);
00419         ASSERT(dw != 0);
00420         ASSERT(pBar != NULL);
00421         return (CCJSizeDockBar*)pBar;
00422     }
00423
00424     return NULL;
00425 }

Here is the call graph for this function:

void CCJDockContext::MoveDockBar ( CPoint pt )

Definition at line 427 of file CJDockContext.cpp.

References CanDockDockBar().

Referenced by StartDragDockBar(), and TrackDockBar().

00428 {
00429     CPoint ptOffset = pt - m_ptLast;
00430
00431     m_rectDragHorz.OffsetRect(ptOffset);
00432     m_rectFrameDragHorz.OffsetRect(ptOffset);
00433     m_rectDragVert.OffsetRect(ptOffset);
00434     m_rectFrameDragVert.OffsetRect(ptOffset);
00435     m_ptLast = pt;
00436     m_dwOverDockStyle = m_bForceFrame ? 0 : CanDockDockBar();
00437     DrawFocusRect();
00438 }

Here is the call graph for this function:

void CCJDockContext::StartDragDockBar ( CPoint pt )

Definition at line 119 of file CJDockContext.cpp.

References AdjustRectangle(), CanDockDockBar(), HORZF, m_ptOrig, MoveDockBar(), and TrackDockBar().

00120 {
00121     ASSERT_VALID(m_pBar);
00122     m_bDragging = TRUE;
00123
00124     InitLoop();
00125
00126     if (m_pBar->m_dwStyle & CBRS_SIZE_DYNAMIC)
00127     {
00128         CRect rect;
00129         m_pBar->GetWindowRect(rect);
00130         // Yiannhs setup and the new member
00131         m_ptOrig = m_ptLast = pt;
00132         CSize sizeHorz = m_pBar->CalcDynamicLayout(0, LM_HORZ | LM_HORZDOCK);
00133         CSize sizeVert = m_pBar->CalcDynamicLayout(0, LM_VERTDOCK);
00134         CSize sizeFloat = m_pBar->CalcDynamicLayout(0, LM_HORZ | LM_MRUWIDTH);
00135
00136         m_rectDragHorz = CRect(rect.TopLeft(), sizeHorz);
00137         m_rectDragVert = CRect(rect.TopLeft(), sizeVert);
00138
00139         // calculate frame dragging rectangle
00140         m_rectFrameDragHorz = CRect(rect.TopLeft(), sizeFloat);
00141         m_rectFrameDragVert = CRect(rect.TopLeft(), sizeFloat);
00142
00143         CMiniFrameWnd::CalcBorders(&m_rectFrameDragHorz);
00144         CMiniFrameWnd::CalcBorders(&m_rectFrameDragVert);
00145
00146         m_rectFrameDragHorz.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00147         m_rectFrameDragVert.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00148     }
00149
00150     else if (m_pBar->m_dwStyle & CBRS_SIZE_FIXED)
00151     {
00152         CRect rect;
00153         m_pBar->GetWindowRect(rect);
00154         //Yiannhs setup and the new member
00155         m_ptOrig = m_ptLast = pt;
00156         CSize sizeHorz = m_pBar->CalcDynamicLayout(-1, LM_HORZ | LM_HORZDOCK);
00157         CSize sizeVert = m_pBar->CalcDynamicLayout(-1, LM_VERTDOCK);
00158
00159         m_rectFrameDragHorz = m_rectDragHorz = CRect(rect.TopLeft(), sizeHorz);
00160         m_rectFrameDragVert = m_rectDragVert = CRect(rect.TopLeft(), sizeVert);
00161
00162         CMiniFrameWnd::CalcBorders(&m_rectFrameDragHorz);
00163         CMiniFrameWnd::CalcBorders(&m_rectFrameDragVert);
00164         m_rectFrameDragHorz.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00165         m_rectFrameDragVert.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00166     }
00167
00168     else
00169     {
00170         CRect rect;
00171         m_pBar->GetWindowRect(rect);
00172         //Yiannhs setup and the new member
00173         m_ptOrig = m_ptLast = pt;
00174         BOOL bHorz = HORZF(m_dwStyle);
00175         DWORD dwMode = !bHorz ? (LM_HORZ | LM_HORZDOCK) : LM_VERTDOCK;
00176         CSize size = m_pBar->CalcDynamicLayout(-1, dwMode);
00177
00178         if (bHorz)
00179         {
00180             m_rectDragHorz = rect;
00181             m_rectDragVert = CRect(CPoint(pt.x - rect.Height()/2, rect.top), size);
00182         }
00183
00184         else
00185         {
00186             m_rectDragVert = rect;
00187             m_rectDragHorz = CRect(CPoint(rect.left, pt.y - rect.Width()/2), size);
00188         }
00189
00190         m_rectFrameDragHorz = m_rectDragHorz;
00191         m_rectFrameDragVert = m_rectDragVert;
00192
00193         CMiniFrameWnd::CalcBorders(&m_rectFrameDragHorz);
00194         CMiniFrameWnd::CalcBorders(&m_rectFrameDragVert);
00195         m_rectFrameDragHorz.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00196         m_rectFrameDragVert.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00197     }
00198
00199     AdjustRectangle(m_rectDragHorz, pt);
00200     AdjustRectangle(m_rectDragVert, pt);
00201     AdjustRectangle(m_rectFrameDragHorz, pt);
00202     AdjustRectangle(m_rectFrameDragVert, pt);
00203
00204     m_dwOverDockStyle = CanDockDockBar();
00205     MoveDockBar(pt);
00206     TrackDockBar();
00207 }

Here is the call graph for this function:

void CCJDockContext::StartResize | ( | int | nHitTest,
 |  | CPoint | pt
 | ) | [virtual]

Definition at line 515 of file CJDockContext.cpp.

References m_rectActualFrameSize, m_rectActualSize, m_rectFrameBorders, m_rectRequestedSize, Stretch(), and TrackDockBar().

00516 {
00517     ASSERT_VALID(m_pBar);
00518     ASSERT(m_pBar->m_dwStyle & CBRS_SIZE_DYNAMIC);
00519     m_bDragging = FALSE;
00520
00521     InitLoop();
00522
00523     // GetWindowRect returns screen coordinates(not mirrored)
00524     // So if the desktop is mirrored then turn off mirroring
00525     // for the desktop dc so that we draw correct focus rect
00526 #ifndef _VC_VERSION_5
00527
00529 #ifndef LAYOUT_LTR
00530 #define LAYOUT_LTR 0x00000000
00531 #endif
00532
00533     if (m_pDC->GetLayout() & LAYOUT_RTL)
00534         m_pDC->SetLayout(LAYOUT_LTR);
00535 #endif // _VC_VERSION_5
00536
00537     // get true bar size (including borders)
00538     CRect rect;
00539     m_pBar->GetWindowRect(rect);
00540     m_ptLast = pt;
00541     m_nHitTest = nHitTest;
00542
00543     CSize size = m_pBar->CalcDynamicLayout(0, LM_HORZ | LM_MRUWIDTH);
00544     m_rectRequestedSize = CRect(rect.TopLeft(), size);
00545     m_rectActualSize = CRect(rect.TopLeft(), size);
00546     m_rectActualFrameSize = CRect(rect.TopLeft(), size);
00547
00548     // calculate frame rectangle
00549     CMiniFrameWnd::CalcBorders(&m_rectActualFrameSize);
00550     m_rectActualFrameSize.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00551
00552     m_rectFrameBorders = CRect(CPoint(0,0),
00553         m_rectActualFrameSize.Size() - m_rectActualSize.Size());
00554
00555     // initialize tracking state and enter tracking loop
00556     m_dwOverDockStyle = 0;
00557     Stretch(pt);   // call it here to handle special keys
00558     TrackDockBar();
00559 }

Here is the call graph for this function:

void CCJDockContext::Stretch ( CPoint pt )

Definition at line 561 of file CJDockContext.cpp.

References m_rectActualFrameSize, m_rectActualSize, m_rectFrameBorders, and m_rectRequestedSize.

Referenced by StartResize(), and TrackDockBar().

00562 {
00563     CPoint ptOffset = pt - m_ptLast;
00564     CSize size;
00565
00566     // offset all drag rects to new position
00567     if (m_nHitTest != HTTOP && m_nHitTest != HTBOTTOM)
00568     {
00569         if (m_nHitTest == HTLEFT || m_nHitTest == HTTOPLEFT || m_nHitTest == HTBOTTOMLEFT)
00570             m_rectRequestedSize.left += ptOffset.x;
00571         else
00572             m_rectRequestedSize.right += ptOffset.x;
00573         size = m_pBar->CalcDynamicLayout(m_rectRequestedSize.Width(), LM_HORZ);
00574     }
00575
00576     if (m_nHitTest != HTLEFT && m_nHitTest != HTRIGHT)
00577     {
00578         if (m_nHitTest == HTTOP || m_nHitTest == HTTOPLEFT || m_nHitTest == HTTOPRIGHT)
00579             m_rectRequestedSize.top += ptOffset.y;
00580         else
00581             m_rectRequestedSize.bottom += ptOffset.y;
00582         size = m_pBar->CalcDynamicLayout(m_rectRequestedSize.Height(), LM_HORZ|LM_LENGTHY);
00583     }
00584
00585     CRect rectDesk;
00586     HWND hWndDesk = ::GetDesktopWindow();
00587     ::GetWindowRect(hWndDesk, &rectDesk);
00588     CRect rectTemp = m_rectActualFrameSize;
00589
00590     // left, top, top left
00591     if (m_nHitTest == HTLEFT || m_nHitTest == HTTOP || m_nHitTest == HTTOPLEFT)
00592     {
00593         rectTemp.left = rectTemp.right -
00594             (size.cx + m_rectFrameBorders.Width());
00595         rectTemp.top = rectTemp.bottom -
00596             (size.cy + m_rectFrameBorders.Height());
00597         CRect rect;
00598         if (rect.IntersectRect(rectDesk, rectTemp))
00599         {
00600             m_rectActualSize.left = m_rectActualSize.right - size.cx;
00601             m_rectActualSize.top = m_rectActualSize.bottom - size.cy;
00602             m_rectActualFrameSize.left = rectTemp.left;
00603             m_rectActualFrameSize.top = rectTemp.top;
00604         }
00605     } else if (m_nHitTest == HTTOPRIGHT) // top right
00606     {
00607         rectTemp.top = rectTemp.bottom -
00608             (size.cy + m_rectFrameBorders.Height());
00609         rectTemp.right = rectTemp.left +
00610             (size.cx + m_rectFrameBorders.Width());
00611         CRect rect;
00612         if (rect.IntersectRect(rectDesk, rectTemp))
00613         {
00614             m_rectActualSize.left = m_rectActualSize.right - size.cx;
00615             m_rectActualSize.bottom = m_rectActualSize.top + size.cy;
00616             m_rectActualFrameSize.right = rectTemp.right;
00617             m_rectActualFrameSize.top = rectTemp.top;
00618         }
00619     } else if (m_nHitTest == HTBOTTOMLEFT) // bottom left
00620     {
00621         rectTemp.bottom = rectTemp.top +
00622             (size.cy + m_rectFrameBorders.Height());
00623         rectTemp.left = rectTemp.right -
00624             (size.cx + m_rectFrameBorders.Width());
00625         CRect rect;
00626         if (rect.IntersectRect(rectDesk, rectTemp))
00627         {
00628             m_rectActualSize.right = m_rectActualSize.left + size.cx;
00629             m_rectActualSize.top = m_rectActualSize.bottom - size.cy;
00630             m_rectActualFrameSize.left = rectTemp.left;
00631             m_rectActualFrameSize.bottom = rectTemp.bottom;
00632         }
00633     } else// bottom, right, bottom right
00634     {
00635         rectTemp.right = rectTemp.left +
00636             (size.cx + m_rectFrameBorders.Width());
00637         rectTemp.bottom = rectTemp.top +
00638             (size.cy + m_rectFrameBorders.Height());
00639         CRect rect;
00640         if (rect.IntersectRect(rectDesk, rectTemp))
00641         {
00642             m_rectActualSize.right = m_rectActualSize.left + size.cx;
00643             m_rectActualSize.bottom = m_rectActualSize.top + size.cy;
00644             m_rectActualFrameSize.right = rectTemp.right;
00645             m_rectActualFrameSize.bottom = rectTemp.bottom;
00646         }
00647     }
00648     m_ptLast = pt;
00649
00650     // update feedback
00651     DrawFocusRect();
00652 }

void CCJDockContext::ToggleDocking ( ) [virtual]

Definition at line 469 of file CJDockContext.cpp.

References AFX_IDW_SIZEBAR_BOTTOM, DockSizeBar(), and NULL.

00470 {
00471     if (m_pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar)))
00472     {
00473         if (m_pBar->IsFloating())
00474         {
00475             // Dock it only if is allowed to be docked
00476             if (m_pBar->m_dwDockStyle & CBRS_ALIGN_ANY)
00477             {
00478                 ASSERT((m_uMRUDockID >= AFX_IDW_DOCKBAR_TOP && m_uMRUDockID <= AFX_IDW_SIZEBAR_BOTTOM) ||
00479                     m_uMRUDockID == 0);
00480
00481                 CRect rect = m_rectMRUDockPos;
00482                 CCJSizeDockBar* pDockBar = NULL;
00483                 if (m_uMRUDockID != 0)
00484                 {
00485                     pDockBar = (CCJSizeDockBar*)m_pDockSite->GetControlBar(m_uMRUDockID);
00486                     pDockBar->ClientToScreen(&rect);
00487                 }
00488
00489                 // dock it at the specified position, RecalcLayout will snap
00490                 DockSizeBar(m_pBar, pDockBar, &rect);
00491                 m_pDockSite->RecalcLayout();
00492             }
00493         }
00494         else
00495         {
00496             CPoint ptFloat = m_ptMRUFloatPos;
00497             if (ptFloat.x < 0 || ptFloat.y < 0)
00498             {
00499                 ptFloat = m_rectMRUDockPos.TopLeft();
00500                 m_pBar->GetParent()->ClientToScreen(&ptFloat);
00501             }
00502             m_pDockSite->FloatControlBar(m_pBar, ptFloat, m_dwMRUFloatStyle);
00503         }
00504     }
00505 }

Here is the call graph for this function:

BOOL CCJDockContext::TrackDockBar ( )

Definition at line 294 of file CJDockContext.cpp.

References EndDragDockBar(), MoveDockBar(), NULL, and Stretch().

Referenced by StartDragDockBar(), and StartResize().

00295 {
00296     if (::GetCapture() != NULL)
00297         return FALSE;
00298     m_pBar->SetCapture();
00299     ASSERT(m_pBar == CWnd::GetCapture());
00300
00301     while (CWnd::GetCapture() == m_pBar)
00302     {
00303         MSG msg;
00304         if (!::GetMessage(&msg, NULL, 0, 0))
00305         {
00306             AfxPostQuitMessage(msg.wParam);
00307             break;
00308         }
00309
00310         switch (msg.message)
00311         {
00312         case WM_LBUTTONUP:
00313             if (m_bDragging)
00314                 EndDragDockBar();
00315             else
00316                 EndResize();
00317             return TRUE;
00318         case WM_MOUSEMOVE:
00319             if (m_bDragging)
00320                 MoveDockBar(msg.pt);
00321             else
00322                 Stretch(msg.pt);
00323             break;
00324         case WM_KEYUP:
00325             if (m_bDragging)
00326                 OnKey((int)msg.wParam, FALSE);
00327             break;
00328         case WM_KEYDOWN:
00329             if (m_bDragging)
00330                 OnKey((int)msg.wParam, TRUE);
00331             if (msg.wParam == VK_ESCAPE)
00332             {
00333                 CancelLoop();
00334                 return FALSE;
00335             }
00336             break;
00337         case WM_RBUTTONDOWN:
00338             CancelLoop();
00339             return FALSE;
00340
00341             // just dispatch rest of the messages
00342         default:
00343             DispatchMessage(&msg);
00344             break;
00345         }
00346     }
00347
00348     CancelLoop();
00349     return FALSE;
00350 }

Here is the call graph for this function:

Member Data Documentation

CPoint CCJDockContext::m_ptOrig

Definition at line 103 of file CJDockContext.h.

Referenced by EndDragDockBar(), and StartDragDockBar().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJDockContext.h
  • WinCvs/CJLib/CJLibrary/CJDockContext.cpp
Generated on Sat Aug 7 22:49:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJExplorerBar Class Reference

CCJExplorerBar Class Reference

#include <CJExplorerBar.h>

Inheritance diagram for CCJExplorerBar:

[legend]
Collaboration diagram for CCJExplorerBar:

[legend]
List of all members.

Public Member Functions

CCJExplorerBar ()
virtual | ~CCJExplorerBar ()
virtual BOOL | Create (CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName=NULL, CSize sizeDefault=CSize(200, 100), DWORD dwStyle=CBRS_LEFT)
virtual void | GetChildRect (CRect &rect)

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnButtonClose ()
afx_msg void | OnUpdateButtonClose (CCmdUI *pCmdUI)
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)

Protected Attributes

CCJCaption m_Caption
CCJFlatButton m_CaptionButton
CString | m_strCaption
HICON | m_hIcon

Constructor & Destructor Documentation

CCJExplorerBar::CCJExplorerBar ( )

Definition at line 99 of file CJExplorerBar.cpp.

References m_hIcon, m_strCaption, and NULL.

00100 {
00101     m_hIcon = NULL;
00102     m_strCaption = _T("");
00103 }

CCJExplorerBar::~CCJExplorerBar ( ) [virtual]

Definition at line 105 of file CJExplorerBar.cpp.

References _destroyIcon, and m_hIcon.

00106 {
00107     // fix potential resource leak - KStowell - 10-22-99.
00108     _destroyIcon(m_hIcon);
00109 }

Member Function Documentation

BOOL CCJExplorerBar::Create | ( | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | LPCTSTR | lpszWindowName = NULL,
 |  | CSize | sizeDefault = CSize(200, 100),
 |  | DWORD | dwStyle = CBRS_LEFT
 | ) | [virtual]

Definition at line 128 of file CJExplorerBar.cpp.

References CCJControlBar::Create().

00129 {
00130     m_strCaption = lpszWindowName;
00131
00132     if(!CCJControlBar::Create(pParentWnd, nID, lpszWindowName, sizeDefault, dwStyle)) {
00133         return FALSE;
00134     }
00135
00136     ShowFrameControls(FALSE, FALSE);
00137     return TRUE;
00138 }

Here is the call graph for this function:

void CCJExplorerBar::GetChildRect ( CRect & rect ) [virtual]

Reimplemented from CCJControlBar.

Definition at line 182 of file CJExplorerBar.cpp.

References CCJControlBar::IsFloating(), and CCJControlBar::IsVertDocked().

Referenced by OnWindowPosChanged().

00183 {
00184     GetClientRect(&rect);
00185
00186     if (!IsFloating())
00187     {
00188         rect.left   += 1;
00189         rect.right  -= 1;
00190         rect.top    += (IsVertDocked()?26:22);
00191     }
00192
00193     else
00194         rect.DeflateRect(2,2);
00195 }

Here is the call graph for this function:

void CCJExplorerBar::OnButtonClose ( ) [protected]

Reimplemented from CCJControlBar.

Definition at line 172 of file CJExplorerBar.cpp.

00173 {
00174     GetDockingFrame()->ShowControlBar(this, FALSE, FALSE);
00175 }

int CCJExplorerBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Reimplemented from CCJControlBar.

Definition at line 140 of file CJExplorerBar.cpp.

References CCJCaption::Create(), IDB_PUSHPIN, IDC_BAR_BUTTON, m_Caption, m_CaptionButton, m_hIcon, m_strCaption, NULL, CCJControlBar::OnCreate(), and CCJFlatButton::SetIcon().

00141 {
00142     if (CCJControlBar::OnCreate(lpCreateStruct) == -1)
00143         return -1;
00144
00145     // Create the caption.
00146     if (!m_Caption.Create(this, m_strCaption))
00147     {
00148         TRACE0( "Unable to create caption.\n" );
00149         return -1;
00150     }
00151
00152     // Create the caption button.
00153     if (!m_CaptionButton.Create(NULL, WS_VISIBLE|BS_ICON|BS_OWNERDRAW|BS_CENTER|BS_VCENTER,
00154         CRect(0,0,0,0), this, IDC_BAR_BUTTON))
00155     {
00156         TRACE0( "Unable to create caption button.\n" );
00157         return -1;
00158     }
00159
00160     // Create the image list used by frame buttons.
00161     CImageList imageList;
00162     imageList.Create(IDB_PUSHPIN, 16, 1, RGB(255,0,255));
00163     m_hIcon = imageList.ExtractIcon(2);
00164
00165     // Associate the button icon
00166     m_CaptionButton.SetIcon(m_hIcon, CSize(16,15));
00167     imageList.DeleteImageList();
00168
00169     return 0;
00170 }

Here is the call graph for this function:

BOOL CCJExplorerBar::OnEraseBkgnd ( CDC * pDC ) [protected]

Reimplemented from CCJControlBar.

Definition at line 229 of file CJExplorerBar.cpp.

References CCJControlBar::IsVertDocked().

00230 {
00231     int result = CControlBar::OnEraseBkgnd(pDC);
00232
00233     CRect rect;
00234     GetClientRect(rect);
00235     rect.top+=(IsVertDocked()?3:-1);
00236     rect.bottom += 1;
00237     //Yiannhs This was a side effect of removing the variables
00238     pDC->Draw3dRect(rect, afxData.clrBtnShadow, afxData.clrBtnShadow);
00239     //pDC->Draw3dRect(rect, m_clrBtnShadow, m_clrBtnShadow);
00240     return result;
00241 }

Here is the call graph for this function:

void CCJExplorerBar::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Reimplemented from CCJControlBar.

Definition at line 243 of file CJExplorerBar.cpp.

00244 {
00245     // bypass CCJControlBar.
00246 }

void CCJExplorerBar::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Reimplemented from CCJControlBar.

Definition at line 248 of file CJExplorerBar.cpp.

00249 {
00250     // bypass CCJControlBar.
00251 }

void CCJExplorerBar::OnUpdateButtonClose ( CCmdUI * pCmdUI ) [protected]

Reimplemented from CCJControlBar.

Definition at line 177 of file CJExplorerBar.cpp.

00178 {
00179     pCmdUI->Enable(TRUE);
00180 }

void CCJExplorerBar::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]

Reimplemented from CCJControlBar.

Definition at line 197 of file CJExplorerBar.cpp.

References GetChildRect(), CCJControlBar::IsFloating(), CCJControlBar::IsVertDocked(), m_Caption, and m_CaptionButton.

00198 {
00199     CControlBar::OnWindowPosChanged(lpwndpos);
00200
00201     int nCmdShow = IsFloating() ? SW_HIDE:SW_SHOW;
00202     m_Caption.ShowWindow(nCmdShow);
00203     m_CaptionButton.ShowWindow(nCmdShow);
00204
00205     if (!IsFloating())
00206     {
00207         if (IsVertDocked())
00208         {
00209             m_Caption.MoveWindow(1,4,lpwndpos->cx-1,22);
00210             m_CaptionButton.MoveWindow(CRect(lpwndpos->cx-25,
00211                 7, lpwndpos->cx-5, 24));
00212         }
00213         else
00214         {
00215             m_Caption.MoveWindow(1,0,lpwndpos->cx-1,22);
00216             m_CaptionButton.MoveWindow(CRect(lpwndpos->cx-25,
00217                 3, lpwndpos->cx-5, 20));
00218         }
00219     }
00220
00221     if (m_pChildWnd->GetSafeHwnd())
00222     {
00223         CRect rc;
00224         GetChildRect(rc);
00225         m_pChildWnd->MoveWindow(rc);
00226     }
00227 }

Here is the call graph for this function:

Member Data Documentation

CCJCaption CCJExplorerBar::m_Caption [protected]

Definition at line 85 of file CJExplorerBar.h.

Referenced by OnCreate(), and OnWindowPosChanged().

CCJFlatButton CCJExplorerBar::m_CaptionButton [protected]

Definition at line 86 of file CJExplorerBar.h.

Referenced by OnCreate(), and OnWindowPosChanged().

HICON CCJExplorerBar::m_hIcon [protected]

Reimplemented from CCJControlBar.

Definition at line 88 of file CJExplorerBar.h.

Referenced by CCJExplorerBar(), OnCreate(), and ~CCJExplorerBar().

CString CCJExplorerBar::m_strCaption [protected]

Definition at line 87 of file CJExplorerBar.h.

Referenced by CCJExplorerBar(), and OnCreate().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJExplorerBar.h
  • WinCvs/CJLib/CJLibrary/CJExplorerBar.cpp
Generated on Sat Aug 7 22:49:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJFlatButton Class Reference

CCJFlatButton Class Reference

#include <CJFlatButton.h>

Inheritance diagram for CCJFlatButton:

[legend]
Collaboration diagram for CCJFlatButton:

[legend]
List of all members.

Public Member Functions

CCJFlatButton ()
virtual | ~CCJFlatButton ()
virtual void | SetButtonFont (CFont *pFont)
virtual void | SetAlternateColors (COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm)
virtual void | DisableFlatLook (BOOL bDisable=FALSE)
virtual void | SetIcon (HICON hIcon, CSize size)
virtual void | SetIcon (HICON hIcon, HICON hPushed, CSize size)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)

Protected Member Functions

virtual void | DrawButtonIcon (CDC *pDC, UINT nState, CRect &rcItem)
virtual void | DrawButtonText (CDC *pDC, UINT nState, CRect &rcItem)
virtual void | DrawButtonBitmap (CDC *pDC, UINT nState, CRect &rcItem)
virtual void | UpdateFont ()
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnTimer (UINT nIDEvent)
afx_msg void | OnSysColorChange ()
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Protected Attributes

BOOL | m_bMouseOver
BOOL | m_bLBtnDown
BOOL | m_bFlatLook
CSize | m_sizeIcon
COLORREF | m_clrHilite
COLORREF | m_clrShadow
COLORREF | m_clrDkShad
COLORREF | m_clrNormal
COLORREF | m_clrTextGy
COLORREF | m_clrTextNm
COLORREF | m_clrAltNormal
COLORREF | m_clrAltHilite
COLORREF | m_clrAltShadow
COLORREF | m_clrAltTextNm
BOOL | m_bAltColor
BOOL | m_bPainted
HICON | m_hPushed
CFont * | m_pFont
CFont | m_Font
HCURSOR | m_hCursor

Constructor & Destructor Documentation

CCJFlatButton::CCJFlatButton ( )

Definition at line 146 of file CJFlatButton.cpp.

References IDC_HANDCUR, and NULL.

00147 {
00148     m_pFont     = NULL;
00149     m_hPushed   = NULL;
00150     m_bLBtnDown = FALSE;
00151     m_bFlatLook = TRUE;
00152     m_bPainted  = FALSE;
00153     m_bAltColor = FALSE;
00154
00155     m_clrHilite = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00156     m_clrShadow = ::GetSysColor(COLOR_BTNSHADOW);
00157     m_clrDkShad = ::GetSysColor(COLOR_3DDKSHADOW);
00158     m_clrNormal = ::GetSysColor(COLOR_BTNFACE);
00159     m_clrTextGy = ::GetSysColor(COLOR_GRAYTEXT);
00160     m_clrTextNm = ::GetSysColor(COLOR_BTNTEXT);
00161
00162     m_hCursor   = AfxGetApp()->LoadCursor( IDC_HANDCUR );
00163     UpdateFont();
00164 }

CCJFlatButton::~CCJFlatButton ( ) [virtual]

Definition at line 166 of file CJFlatButton.cpp.

References m_Font.

00167 {
00168     // fix potential resource leak - KStowell - 10-21-99
00169     m_Font.DeleteObject();
00170 }

Member Function Documentation

_CJXLIB_INLINE void CCJFlatButton::DisableFlatLook ( BOOL bDisable = FALSE ) [virtual]

Definition at line 247 of file CJFlatButton.h.

References _CJXLIB_INLINE, and m_bFlatLook.

Referenced by CCJControlBar::EnableFlatLook(), and CCJControlBar::OnCreate().

00248     { ASSERT(::IsWindow(m_hWnd)); m_bFlatLook = bDisable; Invalidate(); }

void CCJFlatButton::DrawButtonBitmap | ( | CDC * | pDC,
 |  | UINT | nState,
 |  | CRect & | rcItem
 | ) | [protected, virtual]

Reimplemented in CPseudoButton.

Definition at line 368 of file CJFlatButton.cpp.

References NULL.

Referenced by DrawItem().

00369 {
00370     // get the handle to the bitmap (if any) associated
00371     // with this button.
00372     HBITMAP hBitmap = GetBitmap();
00373     if( hBitmap == NULL ) {
00374         return;
00375     }
00376
00377     CRect rc = rcItem;
00378
00379     // if the button is selected.
00380     if( nState & ODS_SELECTED ) {
00381         rcItem.OffsetRect(1,1);
00382     }
00383
00384     // draw the bitmap associated with this button.
00385     pDC->DrawState( rc.TopLeft(), rc.Size(), hBitmap,
00386         ( nState & ODS_DISABLED )?DSS_DISABLED:DSS_NORMAL, (HBRUSH)NULL );
00387 }

void CCJFlatButton::DrawButtonIcon | ( | CDC * | pDC,
 |  | UINT | nState,
 |  | CRect & | rcItem
 | ) | [protected, virtual]

Reimplemented in CCJCBarButton.

Definition at line 330 of file CJFlatButton.cpp.

References GetIcon(), m_hPushed, m_sizeIcon, and NULL.

Referenced by DrawItem().

00331 {
00332     UNUSED_ALWAYS( rcItem );
00333
00334     // get the handle to the icon (if any) associated
00335     // with this button.
00336     HICON hIcon = GetIcon();
00337     if( hIcon == NULL ) {
00338         return;
00339     }
00340
00341     CRect rcWnd;
00342     GetWindowRect(&rcWnd);
00343
00344     int left   = (rcWnd.Width()-m_sizeIcon.cx)/2;
00345     int right  = left+m_sizeIcon.cx;
00346     int top    = (rcWnd.Height()-m_sizeIcon.cy)/2;
00347     int bottom = top+m_sizeIcon.cy;
00348
00349     // determine the size of the icon to be drawn.
00350     CRect rc(left,top,right,bottom);
00351
00352     // if the button is selected.
00353     if( nState & ODS_SELECTED )
00354     {
00355         if( m_hPushed ) {
00356             hIcon = m_hPushed;
00357         }
00358         else {
00359             rc.OffsetRect(1,1);
00360         }
00361     }
00362
00363     // draw the icon associated with this button.
00364     pDC->DrawState( rc.TopLeft(), rc.Size(), hIcon,
00365         ( nState & ODS_DISABLED )?DSS_DISABLED:DSS_NORMAL, (HBRUSH)NULL );
00366 }

Here is the call graph for this function:

void CCJFlatButton::DrawButtonText | ( | CDC * | pDC,
 |  | UINT | nState,
 |  | CRect & | rcItem
 | ) | [protected, virtual]

Reimplemented in CCJCaptionButton.

Definition at line 302 of file CJFlatButton.cpp.

References m_Font, m_pFont, and NULL.

Referenced by DrawItem().

00303 {
00304     // Get the window text, return if empty.
00305     CString strWindowText; GetWindowText(strWindowText);
00306     if( strWindowText.IsEmpty( ))
00307         return;
00308
00309     if( m_pFont == NULL ) {
00310         m_pFont = &m_Font;
00311     }
00312
00313     CRect rc = rcItem;
00314     rc.DeflateRect( 2,0 );
00315
00316     // Set the text color and select the button font.
00317     pDC->SetTextColor(( nState & ODS_DISABLED )?m_clrTextGy:m_clrTextNm);
00318     CFont *oldFont = pDC->SelectObject( m_pFont );
00319
00320     // if the button is selected.
00321     if( nState & ODS_SELECTED ) {
00322         rc.OffsetRect(1,1);
00323     }
00324
00325     // draw the text, and select the original font.
00326     pDC->DrawText( strWindowText, -1, rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE );
00327     pDC->SelectObject( oldFont );
00328 }

void CCJFlatButton::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Reimplemented in CPseudoButton, and CPseudoToggle.

Definition at line 266 of file CJFlatButton.cpp.

References DrawButtonBitmap(), DrawButtonIcon(), DrawButtonText(), m_bFlatLook, m_clrNormal, and NULL.

Referenced by CPseudoButton::DrawItem().

00267 {
00268     ASSERT(lpDrawItemStruct != NULL);
00269
00270     // define some temporary variables.
00271     CDC*  pDC    = CDC::FromHandle( lpDrawItemStruct->hDC );
00272     CRect rcItem = lpDrawItemStruct->rcItem;
00273     int   nState = lpDrawItemStruct->itemState;
00274
00275     // Paint the background.
00276     pDC->FillSolidRect( rcItem, m_clrNormal );
00277
00278     // Draw flat button border.
00279     if( m_bFlatLook ) {
00280         pDC->Draw3dRect( rcItem, (nState & ODS_SELECTED)?m_clrShadow:m_clrNormal,
00281             (nState & ODS_SELECTED)?m_clrHilite:m_clrNormal );
00282     }
00283
00284     // Draw normal border.
00285     else {
00286         pDC->Draw3dRect( rcItem, (nState & ODS_SELECTED)?m_clrDkShad:m_clrHilite,
00287             (nState & ODS_SELECTED)?m_clrHilite:m_clrDkShad);
00288         rcItem.DeflateRect(1,1);
00289         pDC->Draw3dRect( rcItem, (nState & ODS_SELECTED)?m_clrShadow:m_clrNormal,
00290             (nState & ODS_SELECTED)?m_clrNormal:m_clrShadow);
00291     }
00292
00293     // Set the background mode to transparent.
00294     pDC->SetBkMode( TRANSPARENT );
00295
00296     // draw the button text, icon or bitmap.
00297     DrawButtonText(pDC, nState, rcItem);
00298     DrawButtonIcon(pDC, nState, rcItem);
00299     DrawButtonBitmap(pDC, nState, rcItem);
00300 }

Here is the call graph for this function:

BOOL CCJFlatButton::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 421 of file CJFlatButton.cpp.

00422 {
00423     // KStowell - overridden for flicker-free drawing.
00424     UNUSED_ALWAYS(pDC);
00425     return TRUE;
00426 }

void CCJFlatButton::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 410 of file CJFlatButton.cpp.

References NULL.

00411 {
00412     POINT pt;
00413
00414     ::GetCursorPos(&pt);
00415     ::MapWindowPoints(NULL,(HWND)(m_hWnd),&pt,1);
00416     ::SendMessage((HWND)(m_hWnd),WM_LBUTTONDOWN,0,MAKELPARAM(pt.x,pt.y));
00417
00418     CButton::OnLButtonDblClk(nFlags, point);
00419 }

void CCJFlatButton::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 201 of file CJFlatButton.cpp.

References m_bLBtnDown.

00202 {
00203     m_bLBtnDown = TRUE;
00204     CButton::OnLButtonDown(nFlags, point);
00205 }

void CCJFlatButton::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Reimplemented in CPseudoToggle.

Definition at line 207 of file CJFlatButton.cpp.

References m_bLBtnDown.

Referenced by CPseudoToggle::OnLButtonUp().

00208 {
00209     m_bLBtnDown = FALSE;
00210     CButton::OnLButtonUp(nFlags, point);
00211 }

void CCJFlatButton::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 190 of file CJFlatButton.cpp.

References NULL.

00191 {
00192     if (m_bFlatLook)
00193     {
00194         SetTimer(1, 10, NULL);
00195         OnTimer(1);
00196     }
00197
00198     CButton::OnMouseMove(nFlags, point);
00199 }

void CCJFlatButton::OnPaint ( ) [protected]

Definition at line 428 of file CJFlatButton.cpp.

References m_clrNormal.

00429 {
00430     CPaintDC dc(this); // device context for painting
00431
00432     // KStowell - Get the client rect.
00433     CRect rcClient, rcClip;
00434     dc.GetClipBox( &rcClip );
00435     GetClientRect( &rcClient );
00436
00437     // KStowell - Create a memory device-context. This is done to help reduce
00438     // screen flicker, since we will paint the entire control to the
00439     // off screen device context first.
00440     CDC memDC;
00441     CBitmap bitmap;
00442     memDC.CreateCompatibleDC(&dc);
00443     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00444     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00445
00446     // KStowell - Repaint the background.
00447     memDC.FillSolidRect(rcClient, m_clrNormal);
00448
00449     // let the control do its default drawing.
00450     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00451
00452     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00453     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00454         rcClip.left, rcClip.top, SRCCOPY );
00455
00456     // KStowell - Cleanup resources.
00457     memDC.SelectObject(pOldBitmap);
00458     memDC.DeleteDC();
00459     bitmap.DeleteObject();
00460 }

BOOL CCJFlatButton::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message
 | ) | [protected]

Definition at line 390 of file CJFlatButton.cpp.

References m_hCursor.

00391 {
00392     UNUSED_ALWAYS( pWnd );
00393     UNUSED_ALWAYS( nHitTest );
00394     UNUSED_ALWAYS( message );
00395
00396     ::SetCursor( m_hCursor );
00397
00398     return TRUE;
00399 }

void CCJFlatButton::OnSysColorChange ( ) [protected]

Reimplemented in CCJCaptionButton.

Definition at line 245 of file CJFlatButton.cpp.

References m_bAltColor, m_clrAltHilite, m_clrAltNormal, m_clrAltShadow, m_clrAltTextNm, m_clrDkShad, m_clrHilite, m_clrNormal, m_clrShadow, m_clrTextGy, and m_clrTextNm.

00246 {
00247     CButton::OnSysColorChange();
00248
00249     m_clrDkShad = ::GetSysColor(COLOR_3DDKSHADOW);
00250     m_clrTextGy = ::GetSysColor(COLOR_GRAYTEXT);
00251     m_clrTextNm = (m_bAltColor ? m_clrAltTextNm : ::GetSysColor(COLOR_BTNTEXT));
00252     m_clrNormal = (m_bAltColor ? m_clrAltNormal : ::GetSysColor(COLOR_BTNFACE));
00253     m_clrHilite = (m_bAltColor ? m_clrAltHilite : ::GetSysColor(COLOR_BTNHIGHLIGHT));
00254     m_clrShadow = (m_bAltColor ? m_clrAltShadow : ::GetSysColor(COLOR_BTNSHADOW));
00255 }

void CCJFlatButton::OnTimer ( UINT nIDEvent ) [protected]

Definition at line 213 of file CJFlatButton.cpp.

References m_bFlatLook, m_bLBtnDown, m_bPainted, m_clrHilite, m_clrShadow, and NULL.

00214 {
00215     CRect rcItem;
00216     GetWindowRect(rcItem);
00217
00218     CPoint ptCursor;
00219     GetCursorPos(&ptCursor);
00220
00221     if(( m_bLBtnDown == TRUE ) || ( !rcItem.PtInRect( ptCursor )))
00222     {
00223         KillTimer(1);
00224
00225         if (m_bPainted == TRUE) {
00226             InvalidateRect (NULL);
00227         }
00228
00229         m_bPainted = FALSE;
00230         return;
00231     }
00232
00233     // On mouse over, show raised button.
00234     else if(( m_bFlatLook ) && ( !m_bPainted )) {
00235         CDC* pDC = GetDC();
00236         GetClientRect(rcItem);
00237         pDC->Draw3dRect( rcItem, m_clrHilite, m_clrShadow );
00238         m_bPainted = TRUE;
00239         ReleaseDC(pDC);
00240     }
00241
00242     CButton::OnTimer(nIDEvent);
00243 }

void CCJFlatButton::SetAlternateColors | ( | COLORREF | clrAltNormal,
 |  | COLORREF | clrAltHilite,
 |  | COLORREF | clrAltShadow,
 |  | COLORREF | clrAltTextNm
 | ) | [virtual]

Definition at line 257 of file CJFlatButton.cpp.

References m_bAltColor, m_clrAltHilite, m_clrAltNormal, m_clrAltShadow, m_clrAltTextNm, m_clrHilite, m_clrNormal, m_clrShadow, and m_clrTextNm.

00258 {
00259     m_clrNormal = m_clrAltNormal = clrAltNormal;
00260     m_clrHilite = m_clrAltHilite = clrAltHilite;
00261     m_clrShadow = m_clrAltShadow = clrAltShadow;
00262     m_clrTextNm = m_clrAltTextNm = clrAltTextNm;
00263     m_bAltColor = TRUE;
00264 }

_CJXLIB_INLINE void CCJFlatButton::SetButtonFont ( CFont * pFont ) [virtual]

Definition at line 256 of file CJFlatButton.h.

References _CJXLIB_INLINE, and m_pFont.

00257     { ASSERT(::IsWindow(m_hWnd)); m_pFont = pFont; }

_CJXLIB_INLINE void CCJFlatButton::SetIcon | ( | HICON | hIcon,
 |  | HICON | hPushed,
 |  | CSize | size
 | ) | [virtual]

Definition at line 253 of file CJFlatButton.h.

References _CJXLIB_INLINE, m_hPushed, and SetIcon().

00254     { ASSERT(::IsWindow(m_hWnd)); m_hPushed = hPushed; SetIcon(hIcon, size); }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJFlatButton::SetIcon | ( | HICON | hIcon,
 |  | CSize | size
 | ) | [virtual]

Definition at line 250 of file CJFlatButton.h.

References _CJXLIB_INLINE, m_sizeIcon, and SetIcon().

Referenced by CCJExplorerBar::OnCreate(), CCJControlBar::OnCreate(), CCJControlBar::OnUpdateCmdUI(), and SetIcon().

00251     { ASSERT(::IsWindow(m_hWnd)); m_sizeIcon = size; CButton::SetIcon(hIcon); }

Here is the call graph for this function:

void CCJFlatButton::UpdateFont ( ) [protected, virtual]

Definition at line 401 of file CJFlatButton.cpp.

References m_Font.

00402 {
00403     m_Font.DeleteObject();
00404     NONCLIENTMETRICS ncm;
00405     ncm.cbSize = sizeof(ncm);
00406     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00407     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00408 }

Member Data Documentation

BOOL CCJFlatButton::m_bAltColor [protected]

Definition at line 161 of file CJFlatButton.h.

Referenced by OnSysColorChange(), and SetAlternateColors().

BOOL CCJFlatButton::m_bFlatLook [protected]

Definition at line 149 of file CJFlatButton.h.

Referenced by DisableFlatLook(), DrawItem(), and OnTimer().

BOOL CCJFlatButton::m_bLBtnDown [protected]

Definition at line 148 of file CJFlatButton.h.

Referenced by OnLButtonDown(), OnLButtonUp(), and OnTimer().

BOOL CCJFlatButton::m_bMouseOver [protected]

Definition at line 147 of file CJFlatButton.h.

BOOL CCJFlatButton::m_bPainted [protected]

Definition at line 162 of file CJFlatButton.h.

Referenced by OnTimer().

COLORREF CCJFlatButton::m_clrAltHilite [protected]

Definition at line 158 of file CJFlatButton.h.

Referenced by OnSysColorChange(), and SetAlternateColors().

COLORREF CCJFlatButton::m_clrAltNormal [protected]

Definition at line 157 of file CJFlatButton.h.

Referenced by OnSysColorChange(), and SetAlternateColors().

COLORREF CCJFlatButton::m_clrAltShadow [protected]

Definition at line 159 of file CJFlatButton.h.

Referenced by OnSysColorChange(), and SetAlternateColors().

COLORREF CCJFlatButton::m_clrAltTextNm [protected]

Definition at line 160 of file CJFlatButton.h.

Referenced by OnSysColorChange(), and SetAlternateColors().

COLORREF CCJFlatButton::m_clrDkShad [protected]

Definition at line 153 of file CJFlatButton.h.

Referenced by OnSysColorChange().

COLORREF CCJFlatButton::m_clrHilite [protected]

Definition at line 151 of file CJFlatButton.h.

Referenced by OnSysColorChange(), OnTimer(), and SetAlternateColors().

COLORREF CCJFlatButton::m_clrNormal [protected]

Definition at line 154 of file CJFlatButton.h.

Referenced by DrawItem(), OnPaint(), OnSysColorChange(), and SetAlternateColors().

COLORREF CCJFlatButton::m_clrShadow [protected]

Definition at line 152 of file CJFlatButton.h.

Referenced by OnSysColorChange(), OnTimer(), and SetAlternateColors().

COLORREF CCJFlatButton::m_clrTextGy [protected]

Definition at line 155 of file CJFlatButton.h.

Referenced by OnSysColorChange().

COLORREF CCJFlatButton::m_clrTextNm [protected]

Definition at line 156 of file CJFlatButton.h.

Referenced by OnSysColorChange(), and SetAlternateColors().

CFont CCJFlatButton::m_Font [protected]

Definition at line 165 of file CJFlatButton.h.

Referenced by DrawButtonText(), UpdateFont(), and ~CCJFlatButton().

HCURSOR CCJFlatButton::m_hCursor [protected]

Definition at line 166 of file CJFlatButton.h.

Referenced by OnSetCursor().

HICON CCJFlatButton::m_hPushed [protected]

Definition at line 163 of file CJFlatButton.h.

Referenced by DrawButtonIcon(), and SetIcon().

CFont* CCJFlatButton::m_pFont [protected]

Definition at line 164 of file CJFlatButton.h.

Referenced by DrawButtonText(), and SetButtonFont().

CSize CCJFlatButton::m_sizeIcon [protected]

Definition at line 150 of file CJFlatButton.h.

Referenced by DrawButtonIcon(), and SetIcon().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJFlatButton.h
  • WinCvs/CJLib/CJLibrary/CJFlatButton.cpp
Generated on Sat Aug 7 22:49:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJFlatComboBox Class Reference

CCJFlatComboBox Class Reference

#include <CJFlatComboBox.h>

Inheritance diagram for CCJFlatComboBox:

[legend]
Collaboration diagram for CCJFlatComboBox:

[legend]
List of all members.

Public Member Functions

CCJFlatComboBox ()
virtual | ~CCJFlatComboBox ()
BOOL | IsWin95 ()
virtual void | EnableAutoCompletion (BOOL bEnable=TRUE)
virtual BOOL | PointInRect ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Types

enum STATE {
NORMAL = 1,
RAISED = 2,
PRESSED = 3
}

Protected Member Functions

virtual void | DrawCombo (STATE eState, COLORREF clrTopLeft, COLORREF clrBottomRight, CDC *pDC=NULL)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnTimer (UINT nIDEvent)
afx_msg void | OnPaint ()
afx_msg void | OnSetFocus ()
afx_msg void | OnKillFocus ()
afx_msg void | OnEditUpdate ()
afx_msg void | OnSysColorChange ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Protected Attributes

BOOL | m_bLBtnDown
BOOL | m_bPainted
BOOL | m_bHasFocus
BOOL | m_bAutoComp
COLORREF | m_clrHilite
COLORREF | m_clrShadow
COLORREF | m_clrNormal

Member Enumeration Documentation

enum CCJFlatComboBox::STATE [protected]

Enumeration values:
NORMAL
RAISED
PRESSED
Definition at line 150 of file CJFlatComboBox.h.
00150 { NORMAL = 1, RAISED = 2, PRESSED = 3 };

Constructor & Destructor Documentation

CCJFlatComboBox::CCJFlatComboBox ( )

Definition at line 126 of file CJFlatComboBox.cpp.

References m_bAutoComp, m_bHasFocus, m_bLBtnDown, m_bPainted, m_clrHilite, m_clrNormal, and m_clrShadow.

00127 {
00128     m_bLBtnDown     = FALSE;
00129     m_bPainted      = FALSE;
00130     m_bHasFocus     = FALSE;
00131     m_bAutoComp     = FALSE;
00132     m_clrHilite     = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00133     m_clrShadow     = ::GetSysColor(COLOR_BTNSHADOW);
00134     m_clrNormal     = ::GetSysColor(COLOR_BTNFACE);
00135 }

CCJFlatComboBox::~CCJFlatComboBox ( ) [virtual]

Definition at line 137 of file CJFlatComboBox.cpp.

00138 {
00139 }

Member Function Documentation

void CCJFlatComboBox::DrawCombo | ( | STATE | eState,
 |  | COLORREF | clrTopLeft,
 |  | COLORREF | clrBottomRight,
 |  | CDC * | pDC = NULL
 | ) | [protected, virtual]

Definition at line 245 of file CJFlatComboBox.cpp.

References m_clrHilite, m_clrNormal, m_clrShadow, NORMAL, NULL, PRESSED, and RAISED.

Referenced by OnKillFocus(), OnPaint(), OnSetFocus(), and OnTimer().

00246 {
00247     CRect rcItem;
00248     GetClientRect(&rcItem);
00249     bool bRelease = false;
00250
00251     // if no device context was passed in, get the device context
00252     // for the CWnd client area ...
00253     if(pDC == NULL) {
00254         pDC = GetDC();
00255         bRelease = true;
00256     }
00257
00258     // Cover up dark 3D shadow.
00259     pDC->Draw3dRect(rcItem, clrTopLeft, clrBottomRight);
00260     rcItem.DeflateRect(1,1);
00261
00262     if (!IsWindowEnabled()) {
00263         pDC->Draw3dRect(rcItem, m_clrHilite, m_clrHilite);
00264     } else {
00265         pDC->Draw3dRect(rcItem, m_clrNormal, m_clrNormal);
00266     }
00267
00268     // Cover up dark 3D shadow on drop arrow.
00269     rcItem.DeflateRect(1,1);
00270     rcItem.left = rcItem.right-::GetSystemMetrics(SM_CXHTHUMB);;
00271     pDC->Draw3dRect(rcItem, m_clrNormal, m_clrNormal);
00272
00273     // Cover up NORMAL 3D shadow on drop arrow.
00274     rcItem.DeflateRect(1,1);
00275     pDC->Draw3dRect(rcItem, m_clrNormal, m_clrNormal);
00276
00277     if (!IsWindowEnabled()) {
00278         if(bRelease == true) {
00279             ReleaseDC(pDC);
00280         }
00281         return;
00282     }
00283
00284     rcItem.InflateRect(0,1);
00285     switch (eState)
00286     {
00287     case NORMAL:
00288         pDC->Draw3dRect(rcItem, m_clrHilite, m_clrHilite);
00289         rcItem.left -= 1;
00290         pDC->Draw3dRect(rcItem, m_clrHilite, m_clrHilite);
00291         break;
00292
00293     case RAISED:
00294         pDC->Draw3dRect(rcItem, m_clrHilite, m_clrShadow);
00295         break;
00296
00297     case PRESSED:
00298         rcItem.OffsetRect(1,1);
00299         pDC->Draw3dRect(rcItem, m_clrShadow, m_clrHilite);
00300         break;
00301     }
00302
00303     // KStowell - cleanup.
00304     if(bRelease == true) {
00305         ReleaseDC(pDC);
00306     }
00307 }

_CJXLIB_INLINE void CCJFlatComboBox::EnableAutoCompletion ( BOOL bEnable = TRUE ) [virtual]

Definition at line 208 of file CJFlatComboBox.h.

References _CJXLIB_INLINE, and m_bAutoComp.

00209     { ASSERT(::IsWindow(m_hWnd)); m_bAutoComp = bEnable; }

BOOL CCJFlatComboBox::IsWin95 ( )

Definition at line 374 of file CJFlatComboBox.cpp.

Referenced by PreTranslateMessage().

00375 {
00376     OSVERSIONINFO info;
00377     info.dwOSVersionInfoSize = sizeof(info);
00378     GetVersionEx( &info );
00379     return ((VER_PLATFORM_WIN32_WINDOWS == info.dwPlatformId) && (info.dwMinorVersion == 0));
00380 }

void CCJFlatComboBox::OnEditUpdate ( ) [protected]

Definition at line 342 of file CJFlatComboBox.cpp.

References m_bAutoComp.

00343 {
00344     // if we are not to auto update the text, get outta here
00345     if (!m_bAutoComp)
00346         return;
00347
00348     // Get the text in the edit box
00349     CString str;
00350     GetWindowText(str);
00351     int nLength = str.GetLength();
00352
00353     // Currently selected range
00354     DWORD dwCurSel = GetEditSel();
00355     WORD dStart = LOWORD(dwCurSel);
00356     WORD dEnd   = HIWORD(dwCurSel);
00357
00358     // Search for, and select in, and string in the combo box that is prefixed
00359     // by the text in the edit box
00360     if (SelectString(-1, str) == CB_ERR)
00361     {
00362         SetWindowText(str);     // No text selected, so restore what was there before
00363         if (dwCurSel != CB_ERR)
00364             SetEditSel(dStart, dEnd);   //restore cursor postion
00365     }
00366
00367     // Set the text selection as the additional text that we have added
00368     if (dEnd < nLength && dwCurSel != CB_ERR)
00369         SetEditSel(dStart, dEnd);
00370     else
00371         SetEditSel(nLength, -1);
00372 }

BOOL CCJFlatComboBox::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 391 of file CJFlatComboBox.cpp.

00392 {
00393     // KStowell - overridden for flicker-free drawing.
00394     UNUSED_ALWAYS(pDC);
00395     return TRUE;
00396 }

void CCJFlatComboBox::OnKillFocus ( ) [protected]

Definition at line 315 of file CJFlatComboBox.cpp.

References DrawCombo(), m_bHasFocus, m_clrNormal, and NORMAL.

00316 {
00317     m_bHasFocus = FALSE;
00318     DrawCombo(NORMAL, m_clrNormal, m_clrNormal);
00319 }

Here is the call graph for this function:

void CCJFlatComboBox::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 168 of file CJFlatComboBox.cpp.

References m_bLBtnDown.

00169 {
00170     m_bLBtnDown = TRUE;
00171     CComboBox::OnLButtonDown(nFlags, point);
00172 }

void CCJFlatComboBox::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 174 of file CJFlatComboBox.cpp.

References m_bLBtnDown.

00175 {
00176     m_bLBtnDown = FALSE;
00177     Invalidate();
00178     CComboBox::OnLButtonUp(nFlags, point);
00179 }

void CCJFlatComboBox::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 161 of file CJFlatComboBox.cpp.

References NULL.

00162 {
00163     SetTimer(1,10,NULL);
00164     OnTimer(1);
00165     CComboBox::OnMouseMove(nFlags, point);
00166 }

void CCJFlatComboBox::OnPaint ( ) [protected]

Definition at line 207 of file CJFlatComboBox.cpp.

References DrawCombo(), m_bHasFocus, m_clrHilite, m_clrNormal, m_clrShadow, NORMAL, PointInRect(), and RAISED.

00208 {
00209     ModifyStyleEx (WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE,
00210         0, SWP_FRAMECHANGED);
00211
00212     CPaintDC dc(this);
00213
00214     // KStowell - Get the client rect.
00215     CRect rcClient;
00216     GetClientRect( &rcClient );
00217
00218     // KStowell - Create a memory device-context. This is done to help reduce
00219     // screen flicker, since we will paint the entire control to the
00220     // off screen device context first.
00221     CDC memDC;
00222     CBitmap bitmap;
00223     memDC.CreateCompatibleDC(&dc);
00224     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00225     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00226
00227     // let the control do its default drawing.
00228     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00229
00230     if (PointInRect() || m_bHasFocus) {
00231         DrawCombo(RAISED, m_clrShadow, m_clrHilite, &memDC);
00232     } else {
00233         DrawCombo(NORMAL, m_clrNormal, m_clrNormal, &memDC);
00234     }
00235
00236     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00237     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00238
00239     // KStowell - Cleanup resources.
00240     memDC.SelectObject(pOldBitmap);
00241     memDC.DeleteDC();
00242     bitmap.DeleteObject();
00243 }

Here is the call graph for this function:

void CCJFlatComboBox::OnSetFocus ( ) [protected]

Definition at line 309 of file CJFlatComboBox.cpp.

References DrawCombo(), m_bHasFocus, m_clrHilite, m_clrShadow, and RAISED.

00310 {
00311     m_bHasFocus = TRUE;
00312     DrawCombo(RAISED, m_clrShadow, m_clrHilite);
00313 }

Here is the call graph for this function:

void CCJFlatComboBox::OnSysColorChange ( ) [protected]

Definition at line 382 of file CJFlatComboBox.cpp.

References m_clrHilite, m_clrNormal, and m_clrShadow.

00383 {
00384     CComboBox::OnSysColorChange();
00385
00386     m_clrHilite = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00387     m_clrShadow = ::GetSysColor(COLOR_BTNSHADOW);
00388     m_clrNormal = ::GetSysColor(COLOR_BTNFACE);
00389 }

void CCJFlatComboBox::OnTimer ( UINT nIDEvent ) [protected]

Definition at line 181 of file CJFlatComboBox.cpp.

References DrawCombo(), m_bHasFocus, m_bLBtnDown, m_bPainted, m_clrHilite, m_clrNormal, m_clrShadow, NORMAL, PointInRect(), PRESSED, and RAISED.

00182 {
00183     UNUSED_ALWAYS(nIDEvent);
00184
00185     if (m_bLBtnDown==TRUE) { // OnLButtonDown, show PRESSED.
00186         KillTimer (1);
00187         if (m_bPainted == TRUE) {
00188             DrawCombo(PRESSED, m_clrShadow, m_clrHilite);
00189             m_bPainted = FALSE;
00190         }
00191     } else if (!PointInRect() && !m_bHasFocus) { // If mouse leaves, show flat.
00192         KillTimer (1);
00193         if (m_bPainted == TRUE) {
00194             DrawCombo(NORMAL, m_clrNormal, m_clrNormal);
00195             m_bPainted = FALSE;
00196         }
00197     } else { // On mouse over, show RAISED.
00198         if (m_bPainted == TRUE) {
00199             return;
00200         } else {
00201             m_bPainted = TRUE;
00202             DrawCombo(RAISED, m_clrShadow, m_clrHilite);
00203         }
00204     }
00205 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJFlatComboBox::PointInRect ( ) [virtual]

Definition at line 211 of file CJFlatComboBox.h.

References _CJXLIB_INLINE.

Referenced by OnPaint(), and OnTimer().

00212     { ASSERT(::IsWindow(m_hWnd)); CPoint pt; GetCursorPos(&pt); CRect rcItem; GetWindowRect(&rcItem); return rcItem.PtInRect(pt); }

BOOL CCJFlatComboBox::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 321 of file CJFlatComboBox.cpp.

References IsWin95().

00322 {
00323     if(IsWin95()) // alexander Golde [alex@viona.de]
00324     {
00325         // Make sure that the keystrokes continue to the appropriate handlers
00326         if (pMsg->message == WM_KEYDOWN || pMsg->message==WM_KEYUP)
00327         {
00328             ::TranslateMessage(pMsg);
00329             ::DispatchMessage(pMsg);
00330             return TRUE;
00331         }
00332
00333         // Catch the Alt key so we don't choke if focus
00334         // is going to an owner drawn button
00335         if (pMsg->message == WM_SYSCHAR)
00336             return TRUE;
00337     }
00338
00339     return CComboBox::PreTranslateMessage(pMsg);
00340 }

Here is the call graph for this function:

Member Data Documentation

BOOL CCJFlatComboBox::m_bAutoComp [protected]

Definition at line 155 of file CJFlatComboBox.h.

Referenced by CCJFlatComboBox(), EnableAutoCompletion(), and OnEditUpdate().

BOOL CCJFlatComboBox::m_bHasFocus [protected]

Definition at line 154 of file CJFlatComboBox.h.

Referenced by CCJFlatComboBox(), OnKillFocus(), OnPaint(), OnSetFocus(), and OnTimer().

BOOL CCJFlatComboBox::m_bLBtnDown [protected]

Definition at line 152 of file CJFlatComboBox.h.

Referenced by CCJFlatComboBox(), OnLButtonDown(), OnLButtonUp(), and OnTimer().

BOOL CCJFlatComboBox::m_bPainted [protected]

Definition at line 153 of file CJFlatComboBox.h.

Referenced by CCJFlatComboBox(), and OnTimer().

COLORREF CCJFlatComboBox::m_clrHilite [protected]

Definition at line 156 of file CJFlatComboBox.h.

Referenced by CCJFlatComboBox(), DrawCombo(), OnPaint(), OnSetFocus(), OnSysColorChange(), and OnTimer().

COLORREF CCJFlatComboBox::m_clrNormal [protected]

Definition at line 158 of file CJFlatComboBox.h.

Referenced by CCJFlatComboBox(), DrawCombo(), OnKillFocus(), OnPaint(), OnSysColorChange(), and OnTimer().

COLORREF CCJFlatComboBox::m_clrShadow [protected]

Definition at line 157 of file CJFlatComboBox.h.

Referenced by CCJFlatComboBox(), DrawCombo(), OnPaint(), OnSetFocus(), OnSysColorChange(), and OnTimer().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJFlatComboBox.h
  • WinCvs/CJLib/CJLibrary/CJFlatComboBox.cpp
Generated on Sat Aug 7 22:49:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJFlatHeaderCtrl Class Reference

CCJFlatHeaderCtrl Class Reference

#include <CJFlatHeaderCtrl.h>

Inheritance diagram for CCJFlatHeaderCtrl:

[legend]
Collaboration diagram for CCJFlatHeaderCtrl:

[legend]
List of all members.

Public Member Functions

CCJFlatHeaderCtrl ()
virtual | ~CCJFlatHeaderCtrl ()
virtual void | SetMenuID (UINT popupMenuID, UINT popToolbarID=0, int nPos=0)
virtual UINT | GetMenuID ()
virtual void | InitializeHeader (bool bBoldFont)
virtual void | SetFontBold (BOOL bBoldFont=TRUE)
virtual int | SetSortImage (int nCol, BOOL bAsc)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)

Protected Member Functions

virtual void | DrawFlatBorder (CDC *pDC)
virtual void | ResizeWindow ()
virtual void | PreSubclassWindow ()
afx_msg void | OnPaint ()
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
afx_msg LRESULT | OnMenuChar (UINT nChar, UINT nFlags, CMenu *pMenu)
afx_msg void | OnInitMenuPopup (CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Protected Attributes

UINT | m_popToolbarID
UINT | m_popupMenuID
CCJMenu m_popupMenu
int m_nPos
BOOL | m_bBoldFont
BOOL | m_bLBtnDown
BOOL | m_bSortAsc
CFont | m_Font
int m_nOffset
int m_nSortCol
CWnd * | m_pParentWnd
CRect | m_rcOldSize

Constructor & Destructor Documentation

CCJFlatHeaderCtrl::CCJFlatHeaderCtrl ( )

Definition at line 139 of file CJFlatHeaderCtrl.cpp.

References m_bBoldFont, m_bLBtnDown, m_nOffset, m_nPos, m_nSortCol, m_popToolbarID, m_popupMenuID, m_pParentWnd, and NULL.

00140 {
00141     m_nSortCol      = -1;
00142     m_bBoldFont     = FALSE;
00143     m_nOffset       = 6;
00144     m_bLBtnDown     = FALSE;
00145     m_popupMenuID   = 0;
00146     m_popToolbarID  = 0;
00147     m_nPos          = 0;
00148     m_pParentWnd    = NULL;
00149 }

CCJFlatHeaderCtrl::~CCJFlatHeaderCtrl ( ) [virtual]

Definition at line 151 of file CJFlatHeaderCtrl.cpp.

References m_Font.

00152 {
00153     // fix potential resource leak - KStowell - 10-22-99.
00154     m_Font.DeleteObject();
00155 }

Member Function Documentation

void CCJFlatHeaderCtrl::DrawFlatBorder ( CDC * pDC ) [protected, virtual]

Definition at line 358 of file CJFlatHeaderCtrl.cpp.

Referenced by OnPaint().

00359 {
00360     CRect rci;
00361     GetWindowRect(&rci);
00362     ScreenToClient(&rci);
00363
00364     // Cover up thick 3D border.
00365     pDC->Draw3dRect(rci, afxData.clrBtnFace, afxData.clrBtnFace);
00366     rci.DeflateRect(1,1);
00367     pDC->Draw3dRect(rci, afxData.clrBtnFace, afxData.clrBtnFace);
00368
00369     // Draw flat style border around entire header.
00370     rci.InflateRect(1,1);
00371     pDC->Draw3dRect(rci, afxData.clrBtnHilite, afxData.clrBtnShadow);
00372
00373     // Create the pens for further cover-up.
00374     CPen penLite(PS_SOLID, 1, afxData.clrBtnHilite);
00375     CPen penShad(PS_SOLID, 1, afxData.clrBtnShadow);
00376     CPen penFace(PS_SOLID, 1, afxData.clrBtnFace);
00377     CPen *pOldPen = pDC->SelectObject( &penLite );
00378
00379     // Set up the header item struct.
00380     HD_ITEM hdi;
00381     memset (&hdi, 0, sizeof(HD_ITEM));
00382     hdi.fmt  = HDF_STRING | HDF_LEFT | HDF_OWNERDRAW;
00383     hdi.mask = HDI_WIDTH | HDI_TEXT | HDI_FORMAT | HDI_ORDER; // Yiannhs :1999-10-19
00384     int cx = 0;
00385
00386     long j = GetItemCount();    //Yiannhs
00387     long i = 0;                 //Yiannhs
00388
00389     long * ItemOrders = new long[j];    //Yiannhs :1999-10-19
00390     for( i=0; i<j; i++ ) {              //Yiannhs :1999-10-19
00391         GetItem(i, &hdi);               //Yiannhs :1999-10-19
00392         ItemOrders[hdi.iOrder] = i;     //Yiannhs :1999-10-19
00393     }
00394
00395     hdi.fmt  = HDF_STRING | HDF_LEFT | HDF_OWNERDRAW;   //Yiannhs :1999-10-19
00396     hdi.mask = HDI_WIDTH | HDI_TEXT | HDI_FORMAT;       //Yiannhs :1999-10-19
00397
00398     // For each header item found, do further cover up.
00399     for (i = 0; i < j; ++i)
00400     {
00401         GetItem( ItemOrders[i], &hdi);
00402         cx += hdi.cxy;
00403
00404         pDC->SelectObject(&penShad);
00405         pDC->MoveTo(cx, 2);
00406         pDC->LineTo(cx, rci.bottom-2);
00407
00408         pDC->SelectObject(&penLite);
00409         pDC->MoveTo(cx+1, 2);
00410         pDC->LineTo(cx+1, rci.bottom-2);
00411
00412         pDC->SelectObject(&penFace);
00413         pDC->MoveTo(cx-1, 2);
00414         pDC->LineTo(cx-1, rci.bottom-2);
00415
00416         pDC->SelectObject(&penFace);
00417         pDC->MoveTo(cx-2, 2);
00418         pDC->LineTo(cx-2, rci.bottom-2);
00419     }
00420
00421     delete [] ItemOrders; //Yiannhs :1999-10-19
00422
00423     // Restore the pen and release device context.
00424     pDC->SelectObject( pOldPen );
00425
00426     // fix potential resource leak - KStowell - 10-21-99
00427     penLite.DeleteObject();
00428     penShad.DeleteObject();
00429     penFace.DeleteObject();
00430 }

void CCJFlatHeaderCtrl::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Definition at line 211 of file CJFlatHeaderCtrl.cpp.

References m_bBoldFont, m_bSortAsc, m_Font, m_nOffset, m_nSortCol, and NULL.

00212 {
00213     ASSERT(lpDrawItemStruct != NULL);
00214
00215     // define some temporary variables.
00216     CDC*    pDC         = CDC::FromHandle( lpDrawItemStruct->hDC );
00217     CRect   rcItem      = lpDrawItemStruct->rcItem;
00218     CRect   rcIcon      = lpDrawItemStruct->rcItem;
00219     int     nState      = lpDrawItemStruct->itemState;
00220     int     nItemID     = lpDrawItemStruct->itemID;
00221     int     nSavedDC    = pDC->SaveDC();
00222
00223     // Paint the background.
00224     pDC->FillSolidRect(rcItem, afxData.clrBtnFace);
00225     pDC->SetBkMode(TRANSPARENT);
00226
00227     // Set clipping region to limit drawing within column
00228     CRgn rgn;
00229     rgn.CreateRectRgnIndirect( &rcItem );
00230     pDC->SelectObject( &rgn );
00231     rgn.DeleteObject();
00232
00233     // Get the column text and format
00234     TCHAR buf[256];
00235     HD_ITEM hditem;
00236
00237     hditem.mask = HDI_TEXT | HDI_FORMAT;
00238     hditem.pszText = buf;
00239     hditem.cchTextMax = 255;
00240
00241     GetItem( nItemID, &hditem );
00242
00243     // Determine format for drawing column label
00244     UINT uFormat = DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP
00245         | DT_VCENTER | DT_END_ELLIPSIS ;
00246
00247     if( hditem.fmt & HDF_CENTER) {
00248         uFormat |= DT_CENTER;
00249     } else if( hditem.fmt & HDF_RIGHT) {
00250         uFormat |= DT_RIGHT;
00251     } else {
00252         uFormat |= DT_LEFT;
00253     }
00254
00255     // Adjust the rect if the mouse button is pressed on it
00256     if( nState == ODS_SELECTED ) {
00257         rcItem.left++;
00258         rcItem.top += 2;
00259         rcItem.right++;
00260     }
00261
00262     // Adjust the rect further if Sort arrow is to be displayed
00263     if( nItemID == m_nSortCol ) {
00264         rcItem.right -= 3 * m_nOffset;
00265     }
00266
00267     rcItem.left += m_nOffset;
00268     rcItem.right -= m_nOffset;
00269
00270     // Draw column label
00271     if( rcItem.left < rcItem.right ) {
00272         if (m_bBoldFont) {
00273             CFont* pOldFont = pDC->SelectObject(&m_Font);
00274             pDC->DrawText(buf,-1,rcItem, uFormat);
00275             pDC->SelectObject(pOldFont);
00276         } else {
00277             pDC->DrawText(buf,-1,rcItem, uFormat);
00278         }
00279     }
00280
00281     // Draw the Sort arrow
00282     if( nItemID == m_nSortCol )
00283     {
00284         // Set up pens to use for drawing the triangle
00285         CPen penLite(PS_SOLID, 1, afxData.clrBtnHilite);
00286         CPen penShad(PS_SOLID, 1, afxData.clrBtnShadow);
00287         CPen *pOldPen = pDC->SelectObject( &penLite );
00288
00289         if( m_bSortAsc )
00290         {
00291             // Draw triangle pointing upwards
00292             pDC->MoveTo( rcIcon.right - 2*m_nOffset, m_nOffset-1);
00293             pDC->LineTo( rcIcon.right - 3*m_nOffset/2, rcIcon.bottom - m_nOffset );
00294             pDC->LineTo( rcIcon.right - 5*m_nOffset/2-2, rcIcon.bottom - m_nOffset );
00295             pDC->MoveTo( rcIcon.right - 5*m_nOffset/2-1, rcIcon.bottom - m_nOffset-1 );
00296
00297             pDC->SelectObject( &penShad );
00298             pDC->LineTo( rcIcon.right - 2*m_nOffset, m_nOffset-2);
00299         }
00300         else
00301         {
00302             // Draw triangle pointing downwords
00303             pDC->MoveTo( rcIcon.right - 3*m_nOffset/2, m_nOffset-1);
00304             pDC->LineTo( rcIcon.right - 2*m_nOffset-1, rcIcon.bottom - m_nOffset + 1 );
00305             pDC->MoveTo( rcIcon.right - 2*m_nOffset-1, rcIcon.bottom - m_nOffset );
00306
00307             pDC->SelectObject( &penShad );
00308             pDC->LineTo( rcIcon.right - 5*m_nOffset/2-1, m_nOffset -1 );
00309             pDC->LineTo( rcIcon.right - 3*m_nOffset/2, m_nOffset -1);
00310         }
00311
00312         // Restore the pen
00313         pDC->SelectObject( pOldPen );
00314
00315         // fix potential resource leak - KStowell - 10-21-99
00316         penLite.DeleteObject();
00317         penShad.DeleteObject();
00318     }
00319
00320     // restore the device context
00321     pDC->RestoreDC(nSavedDC);
00322 }

_CJXLIB_INLINE UINT CCJFlatHeaderCtrl::GetMenuID ( ) [virtual]

Definition at line 217 of file CJFlatHeaderCtrl.h.

References _CJXLIB_INLINE, and m_popupMenuID.

00218     { ASSERT(::IsWindow(m_hWnd)); return m_popupMenuID; }

void CCJFlatHeaderCtrl::InitializeHeader ( bool bBoldFont ) [virtual]

Definition at line 173 of file CJFlatHeaderCtrl.cpp.

Referenced by CCJListView::SubclassHeader(), and CCJListCtrl::SubclassHeader().

00174 {
00175     m_Font.DeleteObject();
00176     NONCLIENTMETRICS ncm;
00177     ncm.cbSize = sizeof(ncm);
00178     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00179     if(bBoldFont)
00180         ncm.lfMessageFont.lfWeight = 700;
00181     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00182     SetFont(&m_Font);
00183
00184     m_bBoldFont = bBoldFont;
00185 }

int CCJFlatHeaderCtrl::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 533 of file CJFlatHeaderCtrl.cpp.

References m_pParentWnd, and ResizeWindow().

00534 {
00535     if (CHeaderCtrl::OnCreate(lpCreateStruct) == -1)
00536         return -1;
00537
00538     m_pParentWnd = CWnd::FromHandle(lpCreateStruct->hwndParent);
00539     ASSERT(m_pParentWnd);
00540
00541     ResizeWindow();
00542     return 0;
00543 }

Here is the call graph for this function:

BOOL CCJFlatHeaderCtrl::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 571 of file CJFlatHeaderCtrl.cpp.

00572 {
00573     // KStowell - overridden for flicker-free drawing.
00574     UNUSED_ALWAYS(pDC);
00575     return TRUE;
00576 }

void CCJFlatHeaderCtrl::OnInitMenuPopup | ( | CMenu * | pPopupMenu,
 |  | UINT | nIndex,
 |  | BOOL | bSysMenu
 | ) | [protected]

Definition at line 489 of file CJFlatHeaderCtrl.cpp.

References CCJMenu::IsMenu(), m_popupMenu, and CCJMenu::UpdateMenu().

00490 {
00491     CHeaderCtrl::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
00492
00493     if(!bSysMenu) {
00494         if (m_popupMenu.IsMenu(pPopupMenu)) {
00495             CCJMenu::UpdateMenu(pPopupMenu);
00496         }
00497     }
00498 }

Here is the call graph for this function:

void CCJFlatHeaderCtrl::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct
 | ) | [protected]

Definition at line 463 of file CJFlatHeaderCtrl.cpp.

References CCJMenu::IsMenu(), m_popupMenu, and CCJMenu::MeasureItem().

00464 {
00465     if (lpMeasureItemStruct->CtlType == ODT_MENU)
00466     {
00467         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
00468             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
00469
00470             if (m_popupMenu.IsMenu(pMenu)) {
00471                 m_popupMenu.MeasureItem(lpMeasureItemStruct);
00472                 return;
00473             }
00474         }
00475     }
00476
00477     CHeaderCtrl::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
00478 }

Here is the call graph for this function:

LRESULT CCJFlatHeaderCtrl::OnMenuChar | ( | UINT | nChar,
 |  | UINT | nFlags,
 |  | CMenu * | pMenu
 | ) | [protected]

Definition at line 480 of file CJFlatHeaderCtrl.cpp.

References CCJMenu::FindKeyboardShortcut(), CCJMenu::IsMenu(), and m_popupMenu.

00481 {
00482     if (m_popupMenu.IsMenu(pMenu)) {
00483         return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
00484     }
00485
00486     return CHeaderCtrl::OnMenuChar(nChar, nFlags, pMenu);
00487 }

Here is the call graph for this function:

void CCJFlatHeaderCtrl::OnPaint ( ) [protected]

Definition at line 324 of file CJFlatHeaderCtrl.cpp.

References DrawFlatBorder().

00325 {
00326     CPaintDC dc(this); // device context for painting
00327
00328     // KStowell - Get the client rect.
00329     CRect rcClient;
00330     GetClientRect( &rcClient );
00331
00332     // KStowell - Create a memory device-context. This is done to help reduce
00333     // screen flicker, since we will paint the entire control to the
00334     // off screen device context first.
00335     CDC memDC;
00336     CBitmap bitmap;
00337     memDC.CreateCompatibleDC(&dc);
00338     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00339     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00340     memDC.FillSolidRect(rcClient, afxData.clrBtnFace);
00341
00342     // First let the control do its default drawing.
00343     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00344
00345     // KStowell - Repaint the background.
00346     DrawFlatBorder(&memDC);
00347
00348     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00349     dc.BitBlt( rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC,
00350         rcClient.left, rcClient.top, SRCCOPY );
00351
00352     // KStowell - Cleanup resources.
00353     memDC.SelectObject(pOldBitmap);
00354     memDC.DeleteDC();
00355     bitmap.DeleteObject();
00356 }

Here is the call graph for this function:

void CCJFlatHeaderCtrl::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 432 of file CJFlatHeaderCtrl.cpp.

References CCJMenu::DestroyMenu(), CCJMenu::LoadMenu(), CCJMenu::LoadToolbar(), m_nPos, m_popToolbarID, m_popupMenu, m_popupMenuID, and NULL.

00433 {
00434     // No menu was defined...
00435     if (!m_popupMenuID) {
00436         TRACE0( "Warning: No menu resource was associated with CCJTabCtrl.\n" );
00437         return;
00438     }
00439
00440     // Since we are using the main window as the
00441     // parent, we need to convert the point to screen
00442     // coordinates...
00443     CPoint pt = point;
00444     ClientToScreen(&pt);
00445
00446     // Load the popup menu.
00447     VERIFY(m_popupMenu.LoadMenu(m_popupMenuID));
00448     CCJMenu* pPopup = (CCJMenu*)m_popupMenu.GetSubMenu(m_nPos);
00449     ASSERT(pPopup != NULL);
00450
00451     // Load toolbar resource if any for menu icons.
00452     if (m_popToolbarID) {
00453         pPopup->LoadToolbar(m_popToolbarID);
00454     }
00455
00456     // Display the popup menu, use the main window as its parent.
00457     pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
00458         pt.x, pt.y, AfxGetMainWnd());
00459
00460     m_popupMenu.DestroyMenu();
00461 }

Here is the call graph for this function:

void CCJFlatHeaderCtrl::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 545 of file CJFlatHeaderCtrl.cpp.

References ResizeWindow().

00546 {
00547     CHeaderCtrl::OnWindowPosChanged(lpwndpos);
00548     ResizeWindow();
00549 }

Here is the call graph for this function:

void CCJFlatHeaderCtrl::PreSubclassWindow ( ) [protected, virtual]

Definition at line 523 of file CJFlatHeaderCtrl.cpp.

References m_pParentWnd, and ResizeWindow().

00524 {
00525     CHeaderCtrl::PreSubclassWindow();
00526
00527     m_pParentWnd = GetParent();
00528     ASSERT(m_pParentWnd);
00529
00530     ResizeWindow();
00531 }

Here is the call graph for this function:

void CCJFlatHeaderCtrl::ResizeWindow ( ) [protected, virtual]

Definition at line 551 of file CJFlatHeaderCtrl.cpp.

References m_pParentWnd, and NULL.

Referenced by OnCreate(), OnWindowPosChanged(), and PreSubclassWindow().

00552 {
00553     ASSERT_VALID(this);
00554     ASSERT_VALID(m_pParentWnd);
00555
00556     // Get the client size of the parent window, this will give us the
00557     // actual width of the header we are looking for.
00558     CRect rcParent;
00559     m_pParentWnd->GetClientRect(&rcParent);
00560
00561     // Get the size of the header control, we will need this for the
00562     // height of the header.
00563     CRect rcWnd;
00564     GetWindowRect(&rcWnd);
00565
00566     // Now, resize the window.
00567     SetWindowPos(NULL, 0, 0, rcParent.Width(), rcWnd.Height(),
00568         SWP_NOMOVE|SWP_FRAMECHANGED);
00569 }

_CJXLIB_INLINE void CCJFlatHeaderCtrl::SetFontBold ( BOOL bBoldFont = TRUE ) [virtual]

Definition at line 220 of file CJFlatHeaderCtrl.h.

References _CJXLIB_INLINE, and m_bBoldFont.

00221     { ASSERT(::IsWindow(m_hWnd)); m_bBoldFont = bBoldFont; }

_CJXLIB_INLINE void CCJFlatHeaderCtrl::SetMenuID | ( | UINT | popupMenuID,
 |  | UINT | popToolbarID = 0,
 |  | int | nPos = 0
 | ) | [virtual]

Definition at line 214 of file CJFlatHeaderCtrl.h.

00215     { ASSERT(::IsWindow(m_hWnd)); m_popupMenuID=popupMenuID; m_popToolbarID=popToolbarID; m_nPos=nPos; }

int CCJFlatHeaderCtrl::SetSortImage | ( | int | nCol,
 |  | BOOL | bAsc
 | ) | [virtual]

Definition at line 187 of file CJFlatHeaderCtrl.cpp.

References m_bSortAsc, m_nSortCol, and NULL.

Referenced by CCJListView::OnNotify(), and CCJListCtrl::OnNotify().

00188 {
00189     int nPrevCol = m_nSortCol;
00190
00191     m_nSortCol = nCol;
00192     m_bSortAsc = bAsc;
00193
00194     // Change the item to ownder drawn
00195     HD_ITEM hditem;
00196
00197     hditem.mask = HDI_BITMAP | HDI_FORMAT;
00198     GetItem( nCol, &hditem );
00199     if (hditem.hbm == NULL)
00200     {
00201         hditem.fmt |= HDF_OWNERDRAW;
00202         SetItem( nCol, &hditem );
00203
00204         // Invalidate header control so that it gets redrawn
00205         Invalidate();
00206     }
00207
00208     return nPrevCol;
00209 }

Member Data Documentation

BOOL CCJFlatHeaderCtrl::m_bBoldFont [protected]

Definition at line 133 of file CJFlatHeaderCtrl.h.

Referenced by CCJFlatHeaderCtrl(), DrawItem(), and SetFontBold().

BOOL CCJFlatHeaderCtrl::m_bLBtnDown [protected]

Definition at line 134 of file CJFlatHeaderCtrl.h.

Referenced by CCJFlatHeaderCtrl().

BOOL CCJFlatHeaderCtrl::m_bSortAsc [protected]

Definition at line 135 of file CJFlatHeaderCtrl.h.

Referenced by DrawItem(), and SetSortImage().

CFont CCJFlatHeaderCtrl::m_Font [protected]

Definition at line 136 of file CJFlatHeaderCtrl.h.

Referenced by DrawItem(), and ~CCJFlatHeaderCtrl().

int CCJFlatHeaderCtrl::m_nOffset [protected]

Definition at line 137 of file CJFlatHeaderCtrl.h.

Referenced by CCJFlatHeaderCtrl(), and DrawItem().

int CCJFlatHeaderCtrl::m_nPos [protected]

Definition at line 132 of file CJFlatHeaderCtrl.h.

Referenced by CCJFlatHeaderCtrl(), and OnRButtonDown().

int CCJFlatHeaderCtrl::m_nSortCol [protected]

Definition at line 138 of file CJFlatHeaderCtrl.h.

Referenced by CCJFlatHeaderCtrl(), DrawItem(), and SetSortImage().

UINT CCJFlatHeaderCtrl::m_popToolbarID [protected]

Definition at line 127 of file CJFlatHeaderCtrl.h.

Referenced by CCJFlatHeaderCtrl(), and OnRButtonDown().

CCJMenu CCJFlatHeaderCtrl::m_popupMenu [protected]

Definition at line 131 of file CJFlatHeaderCtrl.h.

Referenced by OnInitMenuPopup(), OnMeasureItem(), OnMenuChar(), and OnRButtonDown().

UINT CCJFlatHeaderCtrl::m_popupMenuID [protected]

Definition at line 130 of file CJFlatHeaderCtrl.h.

Referenced by CCJFlatHeaderCtrl(), GetMenuID(), and OnRButtonDown().

CWnd* CCJFlatHeaderCtrl::m_pParentWnd [protected]

Definition at line 139 of file CJFlatHeaderCtrl.h.

Referenced by CCJFlatHeaderCtrl(), OnCreate(), PreSubclassWindow(), and ResizeWindow().

CRect CCJFlatHeaderCtrl::m_rcOldSize [protected]

Definition at line 140 of file CJFlatHeaderCtrl.h.

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJFlatHeaderCtrl.h
  • WinCvs/CJLib/CJLibrary/CJFlatHeaderCtrl.cpp
Generated on Sat Aug 7 22:49:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJFlatSplitterWnd Class Reference

CCJFlatSplitterWnd Class Reference

#include <CJFlatSplitterWnd.h>

Inheritance diagram for CCJFlatSplitterWnd:

[legend]
Collaboration diagram for CCJFlatSplitterWnd:

[legend]
List of all members.

Public Member Functions

CCJFlatSplitterWnd ()
virtual | ~CCJFlatSplitterWnd ()
virtual void | DisableFlatStyle (BOOL bDisable=TRUE)
virtual BOOL | SwitchView (int nRow, int nCol, CView *pNewView)
virtual BOOL | ReplaceView (int nRow, int nCol, CRuntimeClass *pViewClass)
virtual void | ShowColumn ()
virtual void | HideColumn (int nColHide)
virtual void | ShowRow ()
virtual void | HideRow (int nRowHide)
virtual void | OnDrawSplitter (CDC *pDC, ESplitType nType, const CRect &rect)

Protected Member Functions

afx_msg void | OnPaint ()

Protected Attributes

int m_nHiddenCol
int m_nHiddenRow
BOOL | m_bFlatSplitter

Constructor & Destructor Documentation

CCJFlatSplitterWnd::CCJFlatSplitterWnd ( )

Definition at line 66 of file CJFlatSplitterWnd.cpp.

References m_bFlatSplitter, m_nHiddenCol, and m_nHiddenRow.

00067 {
00068     m_bFlatSplitter = TRUE;
00069     m_nHiddenCol    = -1;
00070     m_nHiddenRow    = -1;
00071 }

CCJFlatSplitterWnd::~CCJFlatSplitterWnd ( ) [virtual]

Definition at line 73 of file CJFlatSplitterWnd.cpp.

00074 {
00075
00076 }

Member Function Documentation

_CJXLIB_INLINE void CCJFlatSplitterWnd::DisableFlatStyle ( BOOL bDisable = TRUE ) [virtual]

Definition at line 125 of file CJFlatSplitterWnd.h.

References _CJXLIB_INLINE, and m_bFlatSplitter.

00126     { m_bFlatSplitter = !bDisable; }

void CCJFlatSplitterWnd::HideColumn ( int nColHide ) [virtual]

Definition at line 296 of file CJFlatSplitterWnd.cpp.

References m_nHiddenCol, and NULL.

00297 {
00298     ASSERT_VALID( this );
00299     ASSERT( m_nCols > 1 );
00300     ASSERT( nColHide < m_nCols );
00301     ASSERT( m_nHiddenCol == -1 );
00302     m_nHiddenCol = nColHide;
00303
00304     // if the column has an active window -- change it
00305     int nActiveRow, nActiveCol;
00306     if( GetActivePane( &nActiveRow, &nActiveCol ) != NULL )
00307     {
00308         if( nActiveCol == nColHide )
00309         {
00310             if( ++nActiveCol >= m_nCols )
00311                 nActiveCol = 0;
00312             SetActivePane( nActiveRow, nActiveCol );
00313         }
00314     }
00315
00316     // hide all column panes
00317     for( int nRow = 0; nRow < m_nRows; nRow++)
00318     {
00319         CWnd* pPaneHide = GetPane(nRow, nColHide);
00320         ASSERT( pPaneHide != NULL );
00321
00322         pPaneHide->ShowWindow(SW_HIDE);
00323         pPaneHide->SetDlgCtrlID( AFX_IDW_PANE_FIRST+m_nCols + 16*nRow );
00324
00325         for( int nCol = nColHide + 1; nCol < m_nCols; nCol++ )
00326         {
00327             CWnd* pPane = GetPane( nRow, nCol );
00328             ASSERT( pPane != NULL );
00329
00330             pPane->SetDlgCtrlID( IdFromRowCol( nRow, nCol - 1 ));
00331         }
00332     }
00333
00334     m_nCols--;
00335     m_pColInfo[m_nCols].nCurSize = m_pColInfo[nColHide].nCurSize;
00336     RecalcLayout();
00337 }

void CCJFlatSplitterWnd::HideRow ( int nRowHide ) [virtual]

Definition at line 211 of file CJFlatSplitterWnd.cpp.

References m_nHiddenRow, and NULL.

00212 {
00213     ASSERT_VALID( this );
00214     ASSERT( m_nRows > 1 );
00215     ASSERT( nRowHide < m_nRows );
00216     ASSERT( m_nHiddenRow == -1 );
00217     m_nHiddenRow = nRowHide;
00218
00219     int nActiveRow, nActiveCol;
00220
00221     // if the nRow has an active window -- change it
00222     if( GetActivePane( &nActiveRow, &nActiveCol ) != NULL )
00223     {
00224         if( nActiveRow == nRowHide )
00225         {
00226             if( ++nActiveRow >= m_nRows )
00227                 nActiveRow = 0;
00228             SetActivePane( nActiveRow, nActiveCol );
00229         }
00230     }
00231
00232     // hide all nRow panes.
00233     for( int nCol = 0; nCol < m_nCols; ++nCol )
00234     {
00235         CWnd* pPaneHide = GetPane( nRowHide, nCol );
00236         ASSERT( pPaneHide != NULL );
00237
00238         pPaneHide->ShowWindow( SW_HIDE );
00239         pPaneHide->SetDlgCtrlID( AFX_IDW_PANE_FIRST+nCol + 16*m_nRows );
00240
00241         for( int nRow = nRowHide+1; nRow < m_nRows; ++nRow )
00242         {
00243             CWnd* pPane = GetPane( nRow, nCol );
00244             ASSERT( pPane != NULL );
00245
00246             pPane->SetDlgCtrlID( IdFromRowCol( nRow-1, nCol ));
00247         }
00248     }
00249
00250     m_nRows--;
00251     m_pRowInfo[m_nRows].nCurSize = m_pRowInfo[nRowHide].nCurSize;
00252     RecalcLayout();
00253 }

void CCJFlatSplitterWnd::OnDrawSplitter | ( | CDC * | pDC,
 |  | ESplitType | nType,
 |  | const CRect & | rect
 | ) | [virtual]

Definition at line 87 of file CJFlatSplitterWnd.cpp.

References CX_BORDER, CY_BORDER, and NULL.

Referenced by OnPaint().

00089 {
00090     if( m_bFlatSplitter )
00091     {
00092         // if pDC == NULL, then just invalidate
00093         if (pDC == NULL)
00094         {
00095             RedrawWindow(rectArg, NULL, RDW_INVALIDATE|RDW_NOCHILDREN);
00096             return;
00097         }
00098         ASSERT_VALID(pDC);
00099
00100         // otherwise, actually draw
00101         CRect rect = rectArg;
00102         switch (nType)
00103         {
00104         case splitBorder:
00105 #if _MFC_VER < 0x700
00106             ASSERT(afxData.bWin4);
00107 #endif
00108             pDC->Draw3dRect(rect, afxData.clrBtnFace, afxData.clrBtnFace);
00109             rect.InflateRect(-CX_BORDER, -CY_BORDER);
00110             pDC->Draw3dRect(rect, afxData.clrBtnShadow, afxData.clrBtnHilite);
00111             return;
00112
00113         case splitIntersection:
00114 #if _MFC_VER < 0x700
00115             ASSERT(!afxData.bWin4);
00116 #endif
00117             break;
00118
00119         case splitBox:
00120 #if _MFC_VER < 0x700
00121             if (afxData.bWin4)
00122 #endif
00123             {
00124                 pDC->Draw3dRect(rect, afxData.clrBtnFace, afxData.clrWindowFrame);
00125                 rect.InflateRect(-CX_BORDER, -CY_BORDER);
00126                 pDC->Draw3dRect(rect, afxData.clrBtnHilite, afxData.clrBtnShadow);
00127                 rect.InflateRect(-CX_BORDER, -CY_BORDER);
00128                 break;
00129             }
00130             // fall through...
00131         case splitBar:
00132 #if _MFC_VER < 0x700
00133             if (!afxData.bWin4)
00134 #endif
00135             {
00136                 pDC->Draw3dRect(rect, afxData.clrBtnHilite, afxData.clrBtnShadow);
00137                 rect.InflateRect(-CX_BORDER, -CY_BORDER);
00138             }
00139             break;
00140
00141         default:
00142             ASSERT(FALSE);  // unknown splitter type
00143         }
00144
00145         // fill the middle
00146         pDC->FillSolidRect(rect, afxData.clrBtnFace);
00147     }
00148
00149     else {
00150         CSplitterWnd::OnDrawSplitter(pDC, nType, rectArg);
00151     }
00152 }

void CCJFlatSplitterWnd::OnPaint ( ) [protected]

Definition at line 154 of file CJFlatSplitterWnd.cpp.

References m_bFlatSplitter, and OnDrawSplitter().

00155 {
00156     if( m_bFlatSplitter )
00157     {
00158         ASSERT_VALID(this);
00159         CPaintDC dc(this);
00160
00161         CRect rectClient;
00162         GetClientRect(&rectClient);
00163
00164         CRect rectInside;
00165         GetInsideRect(rectInside);
00166         rectInside.InflateRect(4,4);
00167
00168         // draw the splitter boxes
00169         if (m_bHasVScroll && m_nRows < m_nMaxRows)
00170         {
00171             OnDrawSplitter(&dc, splitBox,
00172                 CRect(rectInside.right, rectClient.top,
00173                 rectClient.right, rectClient.top + m_cySplitter));
00174         }
00175
00176         if (m_bHasHScroll && m_nCols < m_nMaxCols)
00177         {
00178             OnDrawSplitter(&dc, splitBox,
00179                 CRect(rectClient.left, rectInside.bottom,
00180                 rectClient.left + m_cxSplitter, rectClient.bottom));
00181         }
00182
00183         // extend split bars to window border (past margins)
00184         DrawAllSplitBars(&dc, rectInside.right, rectInside.bottom);
00185
00186         // draw splitter intersections (inside only)
00187         GetInsideRect(rectInside);
00188         dc.IntersectClipRect(rectInside);
00189         CRect rect;
00190         rect.top = rectInside.top;
00191         for (int row = 0; row < m_nRows - 1; row++)
00192         {
00193             rect.top += m_pRowInfo[row].nCurSize + m_cyBorderShare;
00194             rect.bottom = rect.top + m_cySplitter;
00195             rect.left = rectInside.left;
00196             for (int col = 0; col < m_nCols - 1; col++)
00197             {
00198                 rect.left += m_pColInfo[col].nCurSize + m_cxBorderShare;
00199                 rect.right = rect.left + m_cxSplitter;
00200                 OnDrawSplitter(&dc, splitIntersection, rect);
00201                 rect.left = rect.right + m_cxBorderShare;
00202             }
00203             rect.top = rect.bottom + m_cxBorderShare;
00204         }
00205     }
00206     else {
00207         CSplitterWnd::OnPaint();
00208     }
00209 }

Here is the call graph for this function:

BOOL CCJFlatSplitterWnd::ReplaceView | ( | int | nRow,
 |  | int | nCol,
 |  | CRuntimeClass * | pViewClass
 | ) | [virtual]

Definition at line 380 of file CJFlatSplitterWnd.cpp.

00381 {
00382     CView *pView = DYNAMIC_DOWNCAST( CView, GetPane( nRow, nCol ));
00383     ASSERT_KINDOF( CView, pView );
00384
00385     if( pView->IsKindOf( pViewClass ))
00386         return FALSE;
00387
00388     // Get pointer to CDocument object so that it can be used in the creation
00389     // process of the new view
00390     CDocument *pDoc = pView->GetDocument();
00391
00392     int nID = pView->GetDlgCtrlID();
00393     int nWidth, nHeight, nMinWidth, nMinHeight;
00394
00395     GetRowInfo( nRow, nWidth, nMinWidth );
00396     GetColumnInfo( nCol, nHeight, nMinHeight );
00397
00398     // Delete existing view
00399     DeleteView(nRow, nCol);
00400
00401     // Create new view
00402     CCreateContext context;
00403     context.m_pCurrentDoc = pDoc;
00404     CreateView( nRow, nCol, pViewClass, CSize( nWidth, nHeight ), &context );
00405     pView = DYNAMIC_DOWNCAST( CView, GetPane( nRow, nCol ));
00406     ASSERT_KINDOF( CView, pView );
00407
00408     pView->SetDlgCtrlID( nID );
00409
00410     SetRowInfo( nRow, nWidth, nMinWidth );
00411     SetColumnInfo( nCol, nHeight, nMinHeight );
00412     RecalcLayout();
00413
00414     return TRUE;
00415 }

void CCJFlatSplitterWnd::ShowColumn ( ) [virtual]

Definition at line 339 of file CJFlatSplitterWnd.cpp.

References m_nHiddenCol, and NULL.

00340 {
00341     ASSERT_VALID( this );
00342     ASSERT( m_nCols < m_nMaxCols );
00343     ASSERT( m_nHiddenCol != -1 );
00344
00345     int nShowCol = m_nHiddenCol;
00346     m_nHiddenCol = -1;
00347
00348     int cxNew = m_pColInfo[m_nCols].nCurSize;
00349     m_nCols++;  // add a column
00350
00351     ASSERT( m_nCols == m_nMaxCols );
00352
00353     int nCol;
00354
00355     // Show the hidden column
00356     for( int nRow = 0; nRow < m_nRows; ++nRow )
00357     {
00358         CWnd* pPaneShow = GetDlgItem( AFX_IDW_PANE_FIRST+m_nCols + 16*nRow );
00359         ASSERT( pPaneShow != NULL );
00360         pPaneShow->ShowWindow( SW_SHOWNA );
00361
00362         for( nCol = m_nCols - 2; nCol >= nShowCol; --nCol )
00363         {
00364             CWnd* pPane = GetPane( nRow, nCol );
00365             ASSERT( pPane != NULL );
00366             pPane->SetDlgCtrlID( IdFromRowCol( nRow, nCol + 1 ));
00367         }
00368
00369         pPaneShow->SetDlgCtrlID( IdFromRowCol( nRow, nShowCol ));
00370     }
00371
00372     // new panes have been created -- recalculate layout
00373     for( nCol = nShowCol+1; nCol < m_nCols; nCol++ )
00374         m_pColInfo[nCol].nIdealSize = m_pColInfo[nCol - 1].nCurSize;
00375
00376     m_pColInfo[nShowCol].nIdealSize = cxNew;
00377     RecalcLayout();
00378 }

void CCJFlatSplitterWnd::ShowRow ( ) [virtual]

Definition at line 255 of file CJFlatSplitterWnd.cpp.

References m_nHiddenRow, and NULL.

00256 {
00257     ASSERT_VALID( this );
00258     ASSERT( m_nRows < m_nMaxRows );
00259     ASSERT( m_nHiddenRow != -1 );
00260
00261     int nShowRow = m_nHiddenRow;
00262     m_nHiddenRow = -1;
00263
00264     int cyNew = m_pRowInfo[m_nRows].nCurSize;
00265     m_nRows++;  // add a nRow
00266
00267     ASSERT( m_nRows == m_nMaxRows );
00268
00269     int nRow;
00270
00271     // Show the hidden nRow
00272     for( int nCol = 0; nCol < m_nCols; ++nCol )
00273     {
00274         CWnd* pPaneShow = GetDlgItem( AFX_IDW_PANE_FIRST+nCol + 16*m_nRows );
00275         ASSERT( pPaneShow != NULL );
00276         pPaneShow->ShowWindow( SW_SHOWNA );
00277
00278         for( nRow = m_nRows - 2; nRow >= nShowRow; --nRow )
00279         {
00280             CWnd* pPane = GetPane( nRow, nCol );
00281             ASSERT( pPane != NULL );
00282             pPane->SetDlgCtrlID( IdFromRowCol( nRow + 1, nCol ));
00283         }
00284
00285         pPaneShow->SetDlgCtrlID( IdFromRowCol( nShowRow, nCol ));
00286     }
00287
00288     // new panes have been created -- recalculate layout
00289     for( nRow = nShowRow+1; nRow < m_nRows; nRow++ )
00290         m_pRowInfo[nRow].nIdealSize = m_pRowInfo[nRow - 1].nCurSize;
00291
00292     m_pRowInfo[nShowRow].nIdealSize = cyNew;
00293     RecalcLayout();
00294 }

BOOL CCJFlatSplitterWnd::SwitchView | ( | int | nRow,
 |  | int | nCol,
 |  | CView * | pNewView
 | ) | [virtual]

Definition at line 417 of file CJFlatSplitterWnd.cpp.

00418 {
00419     CView *pOldView = DYNAMIC_DOWNCAST( CView, GetPane( nRow, nCol ));
00420     ASSERT_KINDOF( CView, pOldView );
00421
00422     if( pOldView == pNewView )
00423         return FALSE;
00424
00425     int nOldID, nNewID;
00426
00427     nOldID = pOldView->GetDlgCtrlID();
00428     nNewID = pNewView->GetDlgCtrlID();
00429
00430     pOldView->ShowWindow(SW_HIDE);
00431     pNewView->ShowWindow(SW_SHOW);
00432
00433     pOldView->SetDlgCtrlID(nNewID);
00434     pNewView->SetDlgCtrlID(nOldID);
00435
00436     RecalcLayout();
00437
00438     return TRUE;
00439 }

Member Data Documentation

BOOL CCJFlatSplitterWnd::m_bFlatSplitter [protected]

Definition at line 73 of file CJFlatSplitterWnd.h.

Referenced by CCJFlatSplitterWnd(), DisableFlatStyle(), and OnPaint().

int CCJFlatSplitterWnd::m_nHiddenCol [protected]

Definition at line 71 of file CJFlatSplitterWnd.h.

Referenced by CCJFlatSplitterWnd(), HideColumn(), and ShowColumn().

int CCJFlatSplitterWnd::m_nHiddenRow [protected]

Definition at line 72 of file CJFlatSplitterWnd.h.

Referenced by CCJFlatSplitterWnd(), HideRow(), and ShowRow().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJFlatSplitterWnd.h
  • WinCvs/CJLib/CJLibrary/CJFlatSplitterWnd.cpp
Generated on Sat Aug 7 22:49:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJFlatTabCtrl Class Reference

CCJFlatTabCtrl Class Reference

#include <CJFlatTabCtrl.h>

Inheritance diagram for CCJFlatTabCtrl:

[legend]
Collaboration diagram for CCJFlatTabCtrl:

[legend]
List of all members.

Public Member Functions

CCJFlatTabCtrl ()
virtual BOOL | InsertItem (const int nItem, LPCTSTR lpszItem)
virtual BOOL | DeleteItem (int nItem)
virtual BOOL | DeleteAllItems ()
virtual BOOL | GetItemRect (int nItem, LPRECT lpRect)
virtual int | HitTest (TCHITTESTINFO *pHitTestInfo) const
virtual int | GetCurSel () const
virtual int | SetCurSel (int nItem)
virtual int | GetItemCount () const
virtual void | SetTipText (int nItem, LPCTSTR lpszTabTip)
virtual CString | GetTipText (int nItem)
virtual void | Home ()
virtual | ~CCJFlatTabCtrl ()

Protected Member Functions

virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
afx_msg void | OnPaint ()
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnLeftArrow ()
afx_msg void | OnRightArrow ()
afx_msg void | OnHomeArrow ()
afx_msg void | OnEndArrow ()

Private Member Functions

void | CreateTabFont (const int iTabHeight)
int | GetTabWidth (const int nItem) const
int | GetTotalArrowWidth (void) const
int | GetTotalTabWidth (void) const
void | InvalidateTabs (void)
void | EnableButtons (void)
int | DrawTab (CDC &dc, const int x, const int y, const int iHeight, bool bSelected, bool bBottom, LPCTSTR lpszTab) const

Private Attributes

bool m_bHasArrows
bool m_bHasHomeEnd
bool m_bTabsOnBottom
int m_iCurSel
int m_iClientWidth
int m_iClientHeight
int m_iTotalTabWidth
int m_iXOffset
CTabList m_TabList
CTabList m_TabTipList
CFont | m_Font
CFont | m_BoldFont
CCJMetaFileButton * m_pLeftButton
CCJMetaFileButton * m_pRightButton
CCJMetaFileButton * m_pHomeButton
CCJMetaFileButton * m_pEndButton
HENHMETAFILE | m_hLeftArrow
HENHMETAFILE | m_hLeftArrowDisabled
HENHMETAFILE | m_hRightArrow
HENHMETAFILE | m_hRightArrowDisabled
HENHMETAFILE | m_hHomeArrow
HENHMETAFILE | m_hHomeArrowDisabled
HENHMETAFILE | m_hEndArrow
HENHMETAFILE | m_hEndArrowDisabled
CToolTipCtrl | m_ToolTip

Constructor & Destructor Documentation

CCJFlatTabCtrl::CCJFlatTabCtrl ( )

Definition at line 83 of file CJFlatTabCtrl.cpp.

References m_bHasArrows, m_bHasHomeEnd, m_bTabsOnBottom, m_hEndArrow, m_hEndArrowDisabled, m_hHomeArrow, m_hHomeArrowDisabled, m_hLeftArrow, m_hLeftArrowDisabled, m_hRightArrow, m_hRightArrowDisabled, m_iCurSel, m_iXOffset, m_pEndButton, m_pHomeButton, m_pLeftButton, m_pRightButton, and NULL.

00084 {
00085     m_bHasArrows          = false;
00086     m_bHasHomeEnd         = false;
00087     m_bTabsOnBottom       = false;
00088     m_iCurSel             = -1;
00089     m_pLeftButton         = NULL;
00090     m_pRightButton        = NULL;
00091     m_pHomeButton         = NULL;
00092     m_pEndButton          = NULL;
00093     m_hLeftArrow          = NULL;
00094     m_hLeftArrowDisabled  = NULL;
00095     m_hRightArrow         = NULL;
00096     m_hRightArrowDisabled = NULL;
00097     m_hHomeArrow          = NULL;
00098     m_hHomeArrowDisabled  = NULL;
00099     m_hEndArrow           = NULL;
00100     m_hEndArrowDisabled   = NULL;
00101     m_iXOffset            = 0;
00102 }

CCJFlatTabCtrl::~CCJFlatTabCtrl ( ) [virtual]

Definition at line 104 of file CJFlatTabCtrl.cpp.

References _delete, m_BoldFont, m_Font, m_hEndArrow, m_hEndArrowDisabled, m_hHomeArrow, m_hHomeArrowDisabled, m_hLeftArrow, m_hLeftArrowDisabled, m_hRightArrow, m_hRightArrowDisabled, m_pEndButton, m_pHomeButton, m_pLeftButton, m_pRightButton, m_TabList, and m_TabTipList.

00105 {
00106     _delete(m_pLeftButton);
00107     _delete(m_pRightButton);
00108     _delete(m_pHomeButton);
00109     _delete(m_pEndButton);
00110
00111     // free HENHMETAFILE handles.
00112     if(m_hLeftArrow) {
00113         ::DeleteEnhMetaFile(m_hLeftArrow);
00114     }
00115     if(m_hLeftArrowDisabled) {
00116         ::DeleteEnhMetaFile(m_hLeftArrowDisabled);
00117     }
00118     if(m_hRightArrow) {
00119         ::DeleteEnhMetaFile(m_hRightArrow);
00120     }
00121     if(m_hRightArrowDisabled) {
00122         ::DeleteEnhMetaFile(m_hRightArrowDisabled);
00123     }
00124     if(m_hHomeArrow) {
00125         ::DeleteEnhMetaFile(m_hHomeArrow);
00126     }
00127     if(m_hHomeArrowDisabled) {
00128         ::DeleteEnhMetaFile(m_hHomeArrowDisabled);
00129     }
00130     if(m_hEndArrow) {
00131         ::DeleteEnhMetaFile(m_hEndArrow);
00132     }
00133     if(m_hEndArrowDisabled) {
00134         ::DeleteEnhMetaFile(m_hEndArrowDisabled);
00135     }
00136     while(!m_TabList.IsEmpty()) {
00137         CString* pItem = m_TabList.RemoveTail();
00138         _delete(pItem);
00139     }
00140     while(!m_TabTipList.IsEmpty()) {
00141         CString* pItem = m_TabTipList.RemoveTail();
00142         _delete(pItem);
00143     }
00144
00145     // fix potential resource leak - KStowell - 10-21-99
00146     m_Font.DeleteObject();
00147     m_BoldFont.DeleteObject();
00148 }

Member Function Documentation

void CCJFlatTabCtrl::CreateTabFont ( const int iTabHeight ) [private]

Definition at line 150 of file CJFlatTabCtrl.cpp.

References m_BoldFont, m_Font, and NULL.

Referenced by OnSize().

00151 {
00152     int iHeight = -(iTabHeight - 6);
00153
00154     m_Font.DeleteObject();
00155     m_Font.CreateFont(iHeight, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
00156         OUT_STROKE_PRECIS, CLIP_STROKE_PRECIS, PROOF_QUALITY, FF_SWISS, NULL);
00157
00158     m_BoldFont.DeleteObject();
00159     m_BoldFont.CreateFont(iHeight, 0, 0, 0, FW_EXTRABOLD, FALSE, FALSE, FALSE, ANSI_CHARSET,
00160         OUT_STROKE_PRECIS, CLIP_STROKE_PRECIS, PROOF_QUALITY, FF_SWISS, NULL);
00161 }

BOOL CCJFlatTabCtrl::DeleteAllItems ( ) [virtual]

Definition at line 393 of file CJFlatTabCtrl.cpp.

References _delete, EnableButtons(), GetTotalTabWidth(), InvalidateTabs(), m_iCurSel, m_iTotalTabWidth, m_TabList, and m_TabTipList.

00394 {
00395     while(!m_TabList.IsEmpty()) {
00396         CString* pItem = m_TabList.RemoveTail();
00397         _delete(pItem);
00398     }
00399
00400     while(!m_TabTipList.IsEmpty()) {
00401         CString* pItem = m_TabTipList.RemoveTail();
00402         _delete(pItem);
00403     }
00404
00405     m_iCurSel = -1;                             // PGB - Reset the currently selected tab to -1 as we have no tabs in our list now.
00406
00407     m_iTotalTabWidth = GetTotalTabWidth();      // PGB - Recalculate the total tab width now we have deleted all items
00408
00409     EnableButtons();
00410     InvalidateTabs();
00411
00412     return TRUE;
00413 }

Here is the call graph for this function:

BOOL CCJFlatTabCtrl::DeleteItem ( int nItem ) [virtual]

Definition at line 348 of file CJFlatTabCtrl.cpp.

References _delete, EnableButtons(), GetTotalTabWidth(), InvalidateTabs(), m_iCurSel, m_iTotalTabWidth, m_TabList, and SetCurSel().

00349 {
00350     if (nItem < 0 || nItem >= m_TabList.GetCount())
00351         return FALSE;
00352
00353     POSITION pos = m_TabList.FindIndex(nItem);
00354     ASSERT(pos);
00355
00356     CString* pItem = m_TabList.GetAt(pos);
00357     m_TabList.RemoveAt(pos);
00358     _delete(pItem);
00359
00360     // PGB - Stole the following code from the OnLButtonDown() function
00361     // in order to cause the tab control to show the newly selected item
00362     // after deleting an item from the list
00363
00364     // warn parent that the selection is about to change
00365     int id = GetDlgCtrlID();
00366     NMHDR hdr;
00367     hdr.hwndFrom = m_hWnd;
00368     hdr.idFrom = id;
00369     hdr.code = TCN_SELCHANGING;
00370     if (GetParent()->SendMessage(WM_NOTIFY, id, (LPARAM)&hdr) == 0)
00371     {
00372         if (m_iCurSel >= m_TabList.GetCount())
00373         {
00374             SetCurSel(m_TabList.GetCount() - 1); // PGB - Reset the currently selected tab to the last one in the list
00375             InvalidateTabs();
00376         }
00377
00378         // notify parent that the selection has changed
00379         hdr.hwndFrom = m_hWnd;
00380         hdr.idFrom = id;
00381         hdr.code = TCN_SELCHANGE;
00382         GetParent()->SendMessage(WM_NOTIFY, id, (LPARAM)&hdr);
00383     }
00384
00385     m_iTotalTabWidth = GetTotalTabWidth();      // PGB - Recalculate the total tab width now we have deleted an item
00386
00387     EnableButtons();
00388     InvalidateTabs();
00389
00390     return TRUE;
00391 }

Here is the call graph for this function:

int CCJFlatTabCtrl::DrawTab | ( | CDC & | dc,
 |  | const int | x,
 |  | const int | y,
 |  | const int | iHeight,
 |  | bool | bSelected,
 |  | bool | bBottom,
 |  | LPCTSTR | lpszTab
 | ) | const [private]

Definition at line 240 of file CJFlatTabCtrl.cpp.

References m_BoldFont, and m_Font.

Referenced by OnPaint().

00241 {
00242     CFont* pOldFont = dc.SelectObject((CFont*)&m_BoldFont);
00243     CSize size(dc.GetTextExtent(lpszTab));
00244     CRect rcText;
00245     rcText.left = iHeight + x - 4;
00246     rcText.top = 2 + y;
00247     rcText.right = size.cx + iHeight + x - 4;
00248     rcText.bottom = size.cy + 2 + y;
00249
00250     int iHalf = iHeight / 2;
00251     int iWidth = iHeight + iHalf;
00252
00253     COLORREF crBack;
00254     COLORREF crFore;
00255     if (bSelected) {
00256         crBack = GetSysColor(COLOR_WINDOW);
00257         crFore = GetSysColor(COLOR_WINDOWTEXT);
00258     } else {
00259         crBack = GetSysColor(COLOR_3DFACE);
00260         crFore = GetSysColor(COLOR_BTNTEXT);
00261     }
00262
00263     CPen penOutline(PS_SOLID, 1, GetSysColor(COLOR_BTNTEXT));
00264     CPen penShadow(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW));
00265     CBrush brush;
00266     brush.CreateSolidBrush(crBack);
00267
00268     POINT points[4];
00269     points[0].x = x;                     points[0].y = iHeight + y - 1;
00270     points[1].x = iHalf + x;             points[1].y = y;
00271     points[2].x = size.cx + iHeight + x; points[2].y = y;
00272     points[3].x = size.cx + iWidth + x;  points[3].y = iHeight + y - 1;
00273
00274     if (bBottom) {
00275         // swap vertical coordinates
00276         points[0].y = points[1].y;
00277         points[2].y = points[3].y;
00278         points[1].y = points[2].y;
00279         points[3].y = points[0].y;
00280     }
00281
00282     CPen* pOldPen = dc.SelectObject(&penOutline);
00283     dc.SetBkColor(crBack);
00284     CBrush* pOldBrush = dc.SelectObject(&brush);
00285     dc.Polygon(points, 4);
00286     dc.SelectObject(bSelected ? (CFont*)&m_BoldFont : (CFont*)&m_Font);
00287     dc.SetTextColor(crFore);
00288     dc.DrawText(lpszTab, rcText, DT_CENTER);
00289     dc.SelectObject(&penShadow);
00290
00291     if (bSelected) {
00292         dc.MoveTo(iHalf + x + 1, points[1].y);
00293         dc.LineTo(size.cx + iHeight + x, points[1].y);
00294         CPen penBack(PS_SOLID, 1, crBack);
00295         dc.SelectObject(&penBack);
00296         dc.MoveTo(x + 1, points[0].y);
00297         dc.LineTo(size.cx + iWidth + x, points[0].y);
00298     } else {
00299         dc.MoveTo(iHalf + x + 1, points[1].y);
00300         dc.LineTo(size.cx + iHeight + x - 1, points[1].y);
00301         dc.LineTo(size.cx + iWidth + x - 1, points[0].y);
00302     }
00303
00304     // fix potential resource leak - KStowell - 10-21-99
00305     dc.SelectObject(pOldFont);
00306     dc.SelectObject(pOldPen);
00307     dc.SelectObject(pOldBrush);
00308     penOutline.DeleteObject();
00309     penShadow.DeleteObject();
00310     brush.DeleteObject();
00311
00312     return size.cx + iWidth;
00313 }

void CCJFlatTabCtrl::EnableButtons ( void ) [private]

Definition at line 223 of file CJFlatTabCtrl.cpp.

References GetTotalArrowWidth(), m_bHasArrows, m_bHasHomeEnd, m_iClientWidth, m_iTotalTabWidth, m_iXOffset, m_pEndButton, m_pHomeButton, m_pLeftButton, and m_pRightButton.

Referenced by DeleteAllItems(), DeleteItem(), InsertItem(), OnEndArrow(), OnHomeArrow(), OnLeftArrow(), OnRightArrow(), OnSize(), and SetCurSel().

00224 {
00225     if (m_bHasArrows)  //TCC: ADDED to handle situations where ther are no arrows
00226     {
00227         m_pLeftButton->EnableWindow(m_iXOffset);
00228         if (m_iClientWidth + m_iXOffset < m_iTotalTabWidth + GetTotalArrowWidth() + 1)
00229             m_pRightButton->EnableWindow(true);
00230         else
00231             m_pRightButton->EnableWindow(false);
00232         if (m_bHasHomeEnd)
00233         {
00234             m_pHomeButton->EnableWindow(m_iXOffset);
00235             m_pEndButton->EnableWindow(m_pRightButton->IsWindowEnabled());
00236         }
00237     }
00238 }

Here is the call graph for this function:

virtual int CCJFlatTabCtrl::GetCurSel ( ) const [inline, virtual]

Definition at line 94 of file CJFlatTabCtrl.h.

00094 {return m_iCurSel;}

virtual int CCJFlatTabCtrl::GetItemCount ( ) const [inline, virtual]

Definition at line 96 of file CJFlatTabCtrl.h.

00096 { return m_TabList.GetCount(); }

BOOL CCJFlatTabCtrl::GetItemRect | ( | int | nItem,
 |  | LPRECT | lpRect
 | ) | [virtual]

Definition at line 415 of file CJFlatTabCtrl.cpp.

References GetTabWidth(), GetTotalArrowWidth(), m_iClientHeight, m_iXOffset, and m_TabList.

Referenced by OnLeftArrow(), OnRightArrow(), and SetCurSel().

00416 {
00417     if (nItem < 0 || nItem >= m_TabList.GetCount())
00418         return FALSE;
00419
00420     int x = GetTotalArrowWidth();
00421     for (int i = 0; i < nItem; i++)
00422     {
00423         x += GetTabWidth(i);
00424         if (i != m_TabList.GetCount())
00425             x -= (m_iClientHeight / 2) + 2;
00426     }
00427     lpRect->left = x - m_iXOffset;
00428     lpRect->top = 0;
00429     lpRect->right = lpRect->left + GetTabWidth(nItem);
00430     lpRect->bottom = m_iClientHeight;
00431     return TRUE;
00432 }

Here is the call graph for this function:

int CCJFlatTabCtrl::GetTabWidth ( const int nItem ) const [private]

Definition at line 163 of file CJFlatTabCtrl.cpp.

References m_BoldFont, m_iClientHeight, m_TabList, and NULL.

Referenced by GetItemRect(), GetTotalTabWidth(), HitTest(), and OnPaint().

00164 {
00165     CDC dc;
00166     dc.CreateCompatibleDC(NULL);
00167     CFont* pOldFont = dc.SelectObject((CFont*)&m_BoldFont);
00168     CSize size(dc.GetTextExtent(*m_TabList.GetAt(m_TabList.FindIndex(nItem))));
00169
00170     // fix potential resource leak - KStowell - 10-20-99.
00171     dc.SelectObject(pOldFont);
00172     dc.DeleteDC();
00173
00174     return size.cx + m_iClientHeight + (m_iClientHeight / 2);
00175 }

CString CCJFlatTabCtrl::GetTipText ( int nItem ) [virtual]

Definition at line 945 of file CJFlatTabCtrl.cpp.

References m_TabList, and m_TabTipList.

00946 {
00947     CString strText;
00948
00949     if (nItem < m_TabList.GetCount())
00950     {
00951         for (int i = 0; i < m_TabList.GetCount(); i++)
00952         {
00953             if (i == nItem)
00954             {
00955                 strText = *m_TabTipList.GetAt(m_TabTipList.FindIndex(nItem));
00956                 break;
00957             }
00958         }
00959     }
00960
00961     return strText;
00962 }

int CCJFlatTabCtrl::GetTotalArrowWidth ( void ) const [private]

Definition at line 190 of file CJFlatTabCtrl.cpp.

References m_bHasArrows, and m_bHasHomeEnd.

Referenced by EnableButtons(), GetItemRect(), HitTest(), InvalidateTabs(), OnEndArrow(), OnLeftArrow(), OnPaint(), OnRightArrow(), and SetCurSel().

00191 {
00192     int iWidth = 1;
00193     if (m_bHasArrows)
00194         iWidth += 32;
00195     if (m_bHasHomeEnd)
00196         iWidth += 32;
00197     return iWidth;
00198 }

int CCJFlatTabCtrl::GetTotalTabWidth ( void ) const [private]

Definition at line 177 of file CJFlatTabCtrl.cpp.

References GetTabWidth(), m_iClientHeight, and m_TabList.

Referenced by DeleteAllItems(), DeleteItem(), InsertItem(), and OnSize().

00178 {
00179     int iWidth = 0;
00180     for (int i = 0; i < m_TabList.GetCount(); i++)
00181     {
00182         iWidth += GetTabWidth(i);
00183         if (i != m_TabList.GetCount()-1) {
00184             iWidth -= (m_iClientHeight / 2);
00185         }
00186     }
00187     return iWidth + 2;
00188 }

Here is the call graph for this function:

int CCJFlatTabCtrl::HitTest ( TCHITTESTINFO * pHitTestInfo ) const [virtual]

Definition at line 434 of file CJFlatTabCtrl.cpp.

References GetTabWidth(), GetTotalArrowWidth(), m_iClientHeight, m_iXOffset, and m_TabList.

Referenced by OnLButtonDown(), OnLeftArrow(), OnRightArrow(), and PreTranslateMessage().

00435 {
00436     // ignore hits on the buttons
00437     int iHitX = pHitTestInfo->pt.x;
00438     if (iHitX < GetTotalArrowWidth())
00439         return -1;
00440
00441     // check if any tabs were hit
00442     int x = GetTotalArrowWidth() - m_iXOffset;
00443     for (int i = 0; i < m_TabList.GetCount(); i++)
00444     {
00445         int iTabWidth = GetTabWidth(i);
00446         if (i != m_TabList.GetCount())
00447             iTabWidth -= (m_iClientHeight / 2) + 2;
00448         if ((x <= iHitX) && (iHitX <= x + iTabWidth))
00449             return i;
00450         x += iTabWidth;
00451     }
00452
00453     // hit point is right of rightmost tab
00454     return -1;
00455 }

Here is the call graph for this function:

void CCJFlatTabCtrl::Home ( ) [virtual]

Definition at line 964 of file CJFlatTabCtrl.cpp.

References OnHomeArrow().

00965 {
00966     OnHomeArrow();
00967 }

Here is the call graph for this function:

BOOL CCJFlatTabCtrl::InsertItem | ( | const int | nItem,
 |  | LPCTSTR | lpszItem
 | ) | [virtual]

Definition at line 315 of file CJFlatTabCtrl.cpp.

References EnableButtons(), GetTotalTabWidth(), InvalidateTabs(), m_iCurSel, m_iTotalTabWidth, m_TabList, and m_TabTipList.

00316 {
00317     if (nItem < 0 || nItem > m_TabList.GetCount())
00318         return -1;
00319
00320     // add tab to our list
00321     CString* pItem = new CString;
00322     ASSERT(pItem);
00323
00324     *pItem = lpszItem;
00325     m_TabList.AddTail(pItem);
00326
00327     // PGB - Add the tabs tip text to the list
00328
00329     CString* pTipItem = new CString;
00330     ASSERT(pTipItem);
00331
00332     *pTipItem = lpszItem;
00333     m_TabTipList.AddTail(pTipItem);
00334
00335     //
00336
00337     if (m_TabList.GetCount() == 1)
00338         m_iCurSel = 0;
00339
00340     m_iTotalTabWidth = GetTotalTabWidth();      // PGB - Recalculate the total tab width now we have added a new item
00341
00342     EnableButtons();
00343     InvalidateTabs();
00344
00345     return nItem;
00346 }

Here is the call graph for this function:

void CCJFlatTabCtrl::InvalidateTabs ( void ) [private]

Definition at line 200 of file CJFlatTabCtrl.cpp.

References GetTotalArrowWidth(), m_iClientHeight, m_iClientWidth, m_iTotalTabWidth, and m_iXOffset.

Referenced by DeleteAllItems(), DeleteItem(), InsertItem(), OnEndArrow(), OnHomeArrow(), OnLButtonDown(), OnLeftArrow(), OnRightArrow(), and SetCurSel().

00201 {
00202     if (GetSafeHwnd())
00203     {
00204         // invalidate the visible tab area
00205         // to minimise flicker - don't erase the background
00206         CRect rcTabs;
00207
00208         rcTabs.left = GetTotalArrowWidth();
00209         rcTabs.top = 0;
00210         rcTabs.right = rcTabs.left + (m_iTotalTabWidth - m_iXOffset);
00211         rcTabs.bottom = m_iClientHeight;
00212         InvalidateRect(&rcTabs, false);
00213         // invalidate the blank area to the right of the tabs
00214         if (rcTabs.right < m_iClientWidth)
00215         {
00216             rcTabs.left = rcTabs.right;
00217             rcTabs.right = m_iClientWidth;
00218             InvalidateRect(&rcTabs, true);
00219         }
00220     }
00221 }

Here is the call graph for this function:

int CCJFlatTabCtrl::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 675 of file CJFlatTabCtrl.cpp.

References FTS_BOTTOM, FTS_HASARROWS, FTS_HASHOMEEND, IDC_ENDBUTTON, IDC_HOMEBUTTON, IDC_LEFTBUTTON, IDC_RIGHTBUTTON, m_bHasArrows, m_bHasHomeEnd, m_bTabsOnBottom, m_hEndArrow, m_hEndArrowDisabled, m_hHomeArrow, m_hHomeArrowDisabled, m_hLeftArrow, m_hLeftArrowDisabled, m_hRightArrow, m_hRightArrowDisabled, m_pEndButton, m_pHomeButton, m_pLeftButton, m_pRightButton, m_ToolTip, NULL, and CCJMetaFileButton::SetMetaFiles().

00676 {
00677     if (CWnd::OnCreate(lpCreateStruct) == -1)
00678         return -1;
00679
00680     // TODO: Add your specialized creation code here
00681     if (lpCreateStruct->style & FTS_BOTTOM) {
00682         m_bTabsOnBottom = true;
00683     }
00684
00685     if (lpCreateStruct->style & TCS_TOOLTIPS) {
00686         m_ToolTip.Create(this);
00687         m_ToolTip.Activate(TRUE);
00688         m_ToolTip.AddTool(this, _T("Flat Tab Tool Tip"));
00689         m_ToolTip.SendMessage(TTM_SETMAXTIPWIDTH, 0, SHRT_MAX); // Allow multiline tooltips
00690     }
00691
00692     if (lpCreateStruct->style & FTS_HASARROWS)
00693     {
00694         m_bHasArrows = true;
00695         POINT points[4];
00696         points[0].x = 100; points[0].y = 0;
00697         points[1].x = 0;   points[1].y = 50;
00698         points[2].x = 100; points[2].y = 100;
00699         points[3].x = 100; points[3].y = 0;
00700
00702         // This portion of the code was re-written to help eliminate a nasty resource
00703         // leak. It would seem that the CMetaFileDC was not freeing the GDI resources
00704         // completely whenever CMetaFileDC::CloseEnhanced() was called. This may be due
00705         // to a BUG in MFC or perhaps this class, in any event, this seems to resolve
00706         // the issue. - KStowell - 10-23-99.
00708         HPEN   hPen           = ::CreatePen( PS_SOLID, 1, RGB( 0,0,0 ));
00709         HPEN   hPenDisabled   = ::CreatePen( PS_SOLID, 1, RGB( 128,128,128 ));
00710         HBRUSH hBrush         = ::CreateSolidBrush( RGB( 0,0,0 ));
00711         HBRUSH hBrushDisabled = ::CreateSolidBrush( RGB( 128,128,128 ));;
00712
00713         // create left arrow metafile
00714         HDC hMetaDC      = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00715         HPEN hOldPen     = (HPEN)::SelectObject( hMetaDC, hPen );
00716         HBRUSH hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrush );
00717         ::Polygon( hMetaDC, points, 4 );
00718         ::SelectObject( hMetaDC, hOldPen );
00719         ::SelectObject( hMetaDC, hOldBrush );
00720         m_hLeftArrow = ::CloseEnhMetaFile( hMetaDC );
00721
00722         // create disabled left arrow metafile
00723         hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00724         hOldPen   = (HPEN)::SelectObject( hMetaDC, hPenDisabled );
00725         hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrushDisabled );
00726         ::Polygon( hMetaDC, points, 4 );
00727         ::SelectObject( hMetaDC, hOldPen );
00728         ::SelectObject( hMetaDC, hOldBrush );
00729         m_hLeftArrowDisabled = ::CloseEnhMetaFile( hMetaDC );
00730
00731         points[0].x = 0;   points[0].y = 0;
00732         points[1].x = 100; points[1].y = 50;
00733         points[2].x = 0;   points[2].y = 100;
00734         points[3].x = 0;   points[3].y = 0;
00735
00736         // create right arrow metafile
00737         hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00738         hOldPen   = (HPEN)::SelectObject( hMetaDC, hPen );
00739         hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrush );
00740         ::Polygon( hMetaDC, points, 4 );
00741         ::SelectObject( hMetaDC, hOldPen );
00742         ::SelectObject( hMetaDC, hOldBrush );
00743         m_hRightArrow = ::CloseEnhMetaFile( hMetaDC );
00744
00745         // create disabled right arrow metafile
00746         hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00747         hOldPen   = (HPEN)::SelectObject( hMetaDC, hPenDisabled );
00748         hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrushDisabled );
00749         ::Polygon( hMetaDC, points, 4 );
00750         ::SelectObject( hMetaDC, hOldPen );
00751         ::SelectObject( hMetaDC, hOldBrush );
00752         m_hRightArrowDisabled = ::CloseEnhMetaFile( hMetaDC );
00753
00754         CRect rcButton(0, 0, 16, 16);
00755         m_pLeftButton = new CCJMetaFileButton;
00756         m_pLeftButton->Create(NULL, WS_CHILD | WS_VISIBLE | WS_DISABLED | BS_OWNERDRAW, rcButton, this, IDC_LEFTBUTTON);
00757         m_pLeftButton->SetMetaFiles(m_hLeftArrow, 0, 0, m_hLeftArrowDisabled);
00758
00759         m_pRightButton = new CCJMetaFileButton;
00760         m_pRightButton->Create(NULL, WS_CHILD | WS_VISIBLE | WS_DISABLED | BS_OWNERDRAW, rcButton, this, IDC_RIGHTBUTTON);
00761         m_pRightButton->SetMetaFiles(m_hRightArrow, 0, 0, m_hRightArrowDisabled);
00762
00763         if (lpCreateStruct->style & FTS_HASHOMEEND)
00764         {
00765             m_bHasHomeEnd = true;
00766
00767             // Setup the Home arrow button
00768             points[0].x = 100;   points[0].y = 0;
00769             points[1].x = 0;     points[1].y = 50;
00770             points[2].x = 100;   points[2].y = 100;
00771             points[3].x = 100;   points[3].y = 0;
00772
00773             // create right arrow metafile
00774             HDC hMetaDC      = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00775             HPEN hOldPen     = (HPEN)::SelectObject( hMetaDC, hPen );
00776             HBRUSH hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrush );
00777             ::Polygon( hMetaDC, points, 4 );
00778             ::MoveToEx( hMetaDC, 0, 0, NULL );
00779             ::LineTo( hMetaDC, 0, 100 );
00780             ::SelectObject( hMetaDC, hOldPen );
00781             ::SelectObject( hMetaDC, hOldBrush );
00782             m_hHomeArrow = ::CloseEnhMetaFile( hMetaDC );
00783
00784             // create disabled right arrow metafile
00785             hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00786             hOldPen   = (HPEN)::SelectObject( hMetaDC, hPenDisabled );
00787             hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrushDisabled );
00788             ::Polygon( hMetaDC, points, 4 );
00789             ::MoveToEx( hMetaDC, 0, 0, NULL );
00790             ::LineTo( hMetaDC, 0, 100 );
00791             ::SelectObject( hMetaDC, hOldPen );
00792             ::SelectObject( hMetaDC, hOldBrush );
00793             m_hHomeArrowDisabled = ::CloseEnhMetaFile( hMetaDC );
00794
00795             m_pHomeButton = new CCJMetaFileButton;
00796             m_pHomeButton->Create(NULL, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, rcButton, this, IDC_HOMEBUTTON);
00797             m_pHomeButton->SetMetaFiles(m_hHomeArrow, 0, 0, m_hHomeArrowDisabled);
00798
00799             // Setup the End arrow button
00800             points[0].x = 0;   points[0].y = 0;
00801             points[1].x = 100; points[1].y = 50;
00802             points[2].x = 0;   points[2].y = 100;
00803             points[3].x = 0;   points[3].y = 0;
00804
00805             // create right arrow metafile
00806             hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00807             hOldPen   = (HPEN)::SelectObject( hMetaDC, hPen );
00808             hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrush );
00809             ::Polygon( hMetaDC, points, 4 );
00810             ::MoveToEx( hMetaDC, 100, 0, NULL );
00811             ::LineTo( hMetaDC, 100, 100 );
00812             ::SelectObject( hMetaDC, hOldPen );
00813             ::SelectObject( hMetaDC, hOldBrush );
00814             m_hEndArrow = ::CloseEnhMetaFile( hMetaDC );
00815
00816             // create disabled right arrow metafile
00817             hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00818             hOldPen   = (HPEN)::SelectObject( hMetaDC, hPenDisabled );
00819             hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrushDisabled );
00820             ::Polygon( hMetaDC, points, 4 );
00821             ::MoveToEx( hMetaDC, 100, 0, NULL );
00822             ::LineTo( hMetaDC, 100, 100 );
00823             ::SelectObject( hMetaDC, hOldPen );
00824             ::SelectObject( hMetaDC, hOldBrush );
00825             m_hEndArrowDisabled = ::CloseEnhMetaFile( hMetaDC );
00826
00827             m_pEndButton = new CCJMetaFileButton;
00828             m_pEndButton->Create(NULL, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, rcButton, this, IDC_ENDBUTTON);
00829             m_pEndButton->SetMetaFiles(m_hEndArrow, 0, 0, m_hEndArrowDisabled);
00830
00831             m_pHomeButton->MoveWindow(1, 0, 16, 16);
00832             m_pLeftButton->MoveWindow(17, 0, 16, 16);
00833             m_pRightButton->MoveWindow(33, 0, 16, 16);
00834             m_pEndButton->MoveWindow(49, 0, 16, 16);
00835
00836         } else {
00837             m_pLeftButton->MoveWindow(1, 0, 16, 16);
00838             m_pRightButton->MoveWindow(17, 0, 16, 16);
00839         }
00840
00841         // fix potential resource leak - KStowell - 10-23-99
00842         ::DeleteObject(hPen);
00843         ::DeleteObject(hPenDisabled);
00844         ::DeleteObject(hBrush);
00845         ::DeleteObject(hBrushDisabled);
00846     }
00847
00848     return 0;
00849 }

Here is the call graph for this function:

void CCJFlatTabCtrl::OnEndArrow ( ) [protected]

Definition at line 917 of file CJFlatTabCtrl.cpp.

References EnableButtons(), GetTotalArrowWidth(), InvalidateTabs(), m_iClientWidth, m_iTotalTabWidth, and m_iXOffset.

00918 {
00919     // TODO: Add your control notification handler code here
00920     m_iXOffset = m_iTotalTabWidth + GetTotalArrowWidth() - m_iClientWidth + 1;
00921     EnableButtons();
00922     InvalidateTabs();
00923 }

Here is the call graph for this function:

void CCJFlatTabCtrl::OnHomeArrow ( ) [protected]

Definition at line 909 of file CJFlatTabCtrl.cpp.

References EnableButtons(), InvalidateTabs(), and m_iXOffset.

Referenced by Home().

00910 {
00911     // TODO: Add your control notification handler code here
00912     m_iXOffset = 0;
00913     EnableButtons();
00914     InvalidateTabs();
00915 }

Here is the call graph for this function:

void CCJFlatTabCtrl::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 618 of file CJFlatTabCtrl.cpp.

References HitTest(), InvalidateTabs(), m_iCurSel, and SetCurSel().

00619 {
00620     // TODO: Add your message handler code here and/or call default
00621     TCHITTESTINFO test;
00622     test.pt = point;
00623     int iTab = HitTest(&test);
00624     if ((iTab != -1) && (iTab != m_iCurSel))
00625     {
00626         // warn parent that the selection is about to change
00627         int id = GetDlgCtrlID();
00628         NMHDR hdr;
00629         hdr.hwndFrom = m_hWnd;
00630         hdr.idFrom = id;
00631         hdr.code = TCN_SELCHANGING;
00632         if (GetParent()->SendMessage(WM_NOTIFY, id, (LPARAM)&hdr) == 0)
00633         {
00634             // parent has given permission for the selection to change
00635             SetCurSel(iTab);
00636             InvalidateTabs();
00637
00638             // notify parent that the selection has changed
00639             hdr.hwndFrom = m_hWnd;
00640             hdr.idFrom = id;
00641             hdr.code = TCN_SELCHANGE;
00642             GetParent()->SendMessage(WM_NOTIFY, id, (LPARAM)&hdr);
00643         }
00644     }
00645
00646     CWnd::OnLButtonDown(nFlags, point);
00647 }

Here is the call graph for this function:

void CCJFlatTabCtrl::OnLeftArrow ( ) [protected]

Definition at line 851 of file CJFlatTabCtrl.cpp.

References EnableButtons(), GetItemRect(), GetTotalArrowWidth(), HitTest(), InvalidateTabs(), and m_iXOffset.

00852 {
00853     // Move the tabs right, ensuring that we move right by one
00854     // whole tab each time ala Microsoft Access
00855
00856     CPoint Point(GetTotalArrowWidth()+1, 1);
00857
00858     TCHITTESTINFO test;
00859     test.pt = Point;
00860     int iTab = HitTest(&test);
00861
00862     if (iTab != -1)
00863     {
00864         m_iXOffset = 0;
00865         for (int iLoop = 0; iLoop <= iTab - 1; iLoop++)
00866         {
00867             RECT rect;
00868             if (GetItemRect(iLoop, &rect))
00869             {
00870                 m_iXOffset += rect.left;
00871             }
00872         }
00873         m_iXOffset -= GetTotalArrowWidth();
00874
00875         EnableButtons();
00876         InvalidateTabs();
00877     }
00878 }

Here is the call graph for this function:

void CCJFlatTabCtrl::OnPaint ( ) [protected]

Definition at line 555 of file CJFlatTabCtrl.cpp.

References DrawTab(), GetTabWidth(), GetTotalArrowWidth(), m_bTabsOnBottom, m_iClientHeight, m_iClientWidth, m_iCurSel, m_iTotalTabWidth, m_iXOffset, m_TabList, and NULL.

00556 {
00557     CPaintDC dc(this); // device context for painting
00558
00559     CBrush brush;
00560     brush.CreateSysColorBrush(COLOR_3DFACE);
00561     CPen penBlack(PS_SOLID, 1, RGB(0,0,0));
00562
00563     // draw the black line along the left of the control
00564     CPen* pOldPen = dc.SelectObject(&penBlack);
00565     dc.MoveTo(0, 0);
00566     dc.LineTo(0, m_iClientHeight);
00567
00568     // draw the black line along the top/bottom of the control
00569     int iTotalArrowWidth = GetTotalArrowWidth();
00570     int iEndOfTab = iTotalArrowWidth + m_iTotalTabWidth - m_iXOffset;
00571     dc.MoveTo(iEndOfTab, m_bTabsOnBottom ? 0 : m_iClientHeight - 1);
00572     dc.LineTo(m_iClientWidth, m_bTabsOnBottom ? 0 : m_iClientHeight - 1);
00573
00574     // fill the empty background area
00575     int iFillHeight = m_iClientHeight - (m_bTabsOnBottom ? 0 : 1);
00576     CRect rcBack(iEndOfTab, m_bTabsOnBottom ? 1 : 0, m_iClientWidth, iFillHeight);
00577     dc.FillRect(rcBack, &brush);
00578
00579     // create a bitmap of all the tabs
00580     CDC dcMem;
00581     dcMem.CreateCompatibleDC(NULL);
00582     CBitmap bitmap;
00583     bitmap.CreateCompatibleBitmap(&dc, m_iTotalTabWidth, m_iClientHeight);
00584     CBitmap* pOldBitmap = dcMem.SelectObject(&bitmap);
00585     CBrush* pOldBrush = dcMem.SelectObject(&brush);
00586     CRect rc(0, m_bTabsOnBottom ? 1 : 0, m_iTotalTabWidth, iFillHeight);
00587     dcMem.FillRect(rc, &brush);
00588
00589     int iOverlap = (m_iClientHeight / 2) + 2;
00590     int x = 0;
00591     int iSelX = 0;
00592     for (int i = 0; i < m_TabList.GetCount(); i++)
00593     {
00594         if (i != m_iCurSel)
00595             x += DrawTab(dcMem, x, 0, m_iClientHeight, false, m_bTabsOnBottom, *m_TabList.GetAt(m_TabList.FindIndex(i))) - iOverlap;
00596         else
00597         {
00598             iSelX = x;
00599             x += GetTabWidth(i) - iOverlap;
00600         }
00601     }
00602     if (m_iCurSel >= 0)
00603         DrawTab(dcMem, iSelX, 0, m_iClientHeight, true, m_bTabsOnBottom, *m_TabList.GetAt(m_TabList.FindIndex(m_iCurSel)));
00604
00605     // blit the bitmap onto the control
00606     dc.BitBlt(iTotalArrowWidth, 0, m_iClientWidth - iTotalArrowWidth, m_iClientHeight, &dcMem, m_iXOffset, 0, SRCCOPY);
00607
00608     // fix potential resource leak - KStowell - 10-21-99.
00609     dcMem.SelectObject(pOldPen);
00610     dcMem.SelectObject(pOldBitmap);
00611     dcMem.SelectObject(pOldBrush);
00612     dcMem.DeleteDC();
00613     brush.DeleteObject();
00614     penBlack.DeleteObject();
00615     bitmap.DeleteObject();
00616 }

Here is the call graph for this function:

void CCJFlatTabCtrl::OnRightArrow ( ) [protected]

Definition at line 880 of file CJFlatTabCtrl.cpp.

References EnableButtons(), GetItemRect(), GetTotalArrowWidth(), HitTest(), InvalidateTabs(), and m_iXOffset.

00881 {
00882     // Move the tabs left, ensuring that we move left by one
00883     // whole tab each time ala Microsoft Access
00884
00885     CPoint Point(GetTotalArrowWidth()+1, 1);
00886
00887     TCHITTESTINFO test;
00888     test.pt = Point;
00889     int iTab = HitTest(&test);
00890
00891     if (iTab != -1)
00892     {
00893         m_iXOffset = 0;
00894         for (int iLoop = 0; iLoop <= iTab + 1; iLoop++)
00895         {
00896             RECT rect;
00897             if (GetItemRect(iLoop, &rect))
00898             {
00899                 m_iXOffset += rect.left;
00900             }
00901         }
00902         m_iXOffset -= GetTotalArrowWidth();
00903
00904         EnableButtons();
00905         InvalidateTabs();
00906     }
00907 }

Here is the call graph for this function:

void CCJFlatTabCtrl::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy
 | ) | [protected]

Definition at line 649 of file CJFlatTabCtrl.cpp.

References CreateTabFont(), EnableButtons(), GetTotalTabWidth(), m_bHasArrows, m_bHasHomeEnd, m_iClientHeight, m_iClientWidth, m_iTotalTabWidth, m_pEndButton, m_pHomeButton, m_pLeftButton, and m_pRightButton.

00650 {
00651     CWnd::OnSize(nType, cx, cy);
00652
00653     // TODO: Add your message handler code here
00654     if (m_bHasHomeEnd) {
00655         m_pHomeButton->MoveWindow(1, 0, 16, cy);
00656         m_pLeftButton->MoveWindow(17, 0, 16, cy);
00657         m_pRightButton->MoveWindow(33, 0, 16, cy);
00658         m_pEndButton->MoveWindow(49, 0, 16, cy);
00659     } else {
00660         if (m_bHasArrows) { //TCC: ADDED to handle situations where ther are no arrows
00661             m_pLeftButton->MoveWindow(1, 0, 16, cy);
00662             m_pRightButton->MoveWindow(17, 0, 16, cy);
00663         }
00664     }
00665
00666     m_iClientWidth  = cx;
00667     m_iClientHeight = cy;
00668
00669     CreateTabFont(cy);
00670
00671     m_iTotalTabWidth = GetTotalTabWidth();
00672     EnableButtons();
00673 }

Here is the call graph for this function:

BOOL CCJFlatTabCtrl::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 506 of file CJFlatTabCtrl.cpp.

References NULL.

00507 {
00508     if (!CWnd::PreCreateWindow(cs))
00509         return FALSE;
00510
00511     cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,
00512             ::LoadCursor(NULL, IDC_ARROW), NULL, NULL);
00513
00514     return TRUE;
00515 }

BOOL CCJFlatTabCtrl::PreTranslateMessage ( MSG * pMsg ) [protected, virtual]

Definition at line 517 of file CJFlatTabCtrl.cpp.

References HitTest(), m_TabTipList, and m_ToolTip.

00518 {
00519     ASSERT_VALID(this);
00520
00521     if (::IsWindow(m_ToolTip.m_hWnd))
00522                                                                                                                                                                                                                                                                                                                                                                                                                            {
00523         if(pMsg->message == WM_MOUSEMOVE && pMsg->hwnd == m_hWnd)
00524         {
00525             CPoint Point(LOWORD(pMsg->lParam), HIWORD(pMsg->lParam));
00526
00527             TCHITTESTINFO test;
00528             test.pt = Point;
00529             int iTab = HitTest(&test);
00530
00531             if (iTab >= 0)
00532             {
00533                 CString strText;
00534
00535                 strText = (LPCTSTR) *m_TabTipList.GetAt(m_TabTipList.FindIndex(iTab));
00536
00537                 TRACE2("Mouse over tab %d : %s\n", iTab, strText);
00538
00539                 m_ToolTip.UpdateTipText(strText, this);
00540                 m_ToolTip.RelayEvent(pMsg);
00541             } else  {
00542                 // VC5 compatibility - Kirk Stowell - 10-21-99
00543                 ::SendMessage(m_ToolTip.m_hWnd, TTM_POP, 0, 0L);
00544             }
00545         }
00546         else {
00547             // VC5 compatibility - Kirk Stowell - 10-21-99
00548             ::SendMessage(m_ToolTip.m_hWnd, TTM_POP, 0, 0L);
00549         }
00550     }
00551
00552     return CWnd::PreTranslateMessage(pMsg);
00553 }

Here is the call graph for this function:

int CCJFlatTabCtrl::SetCurSel ( int nItem ) [virtual]

Definition at line 457 of file CJFlatTabCtrl.cpp.

References EnableButtons(), GetItemRect(), GetTotalArrowWidth(), InvalidateTabs(), m_iClientWidth, m_iCurSel, m_iXOffset, and m_TabList.

Referenced by DeleteItem(), and OnLButtonDown().

00458 {
00459     if (nItem < 0 || nItem >= m_TabList.GetCount())
00460         return -1;
00461
00462     int iPrevSel = m_iCurSel;
00463     m_iCurSel = nItem;
00464
00465     // test if we need to center on the selected tab
00466     CRect rcItem;
00467     if (GetItemRect(nItem, &rcItem))
00468     {
00469         // test if the tab is off on the left
00470         int iTotalArrowWidth = GetTotalArrowWidth();
00471         rcItem.left -= iTotalArrowWidth;
00472         if (rcItem.left < 0)
00473             m_iXOffset += rcItem.left;
00474         else
00475         {
00476             // test if the tab is off on the right
00477             rcItem.right -= iTotalArrowWidth;
00478             int iTabAreaWidth = m_iClientWidth - iTotalArrowWidth;
00479             if (rcItem.right > iTabAreaWidth)
00480                 m_iXOffset += (rcItem.right - iTabAreaWidth);
00481         }
00482     }
00483
00484     EnableButtons();
00485     InvalidateTabs();
00486
00487     return iPrevSel;
00488 }

Here is the call graph for this function:

void CCJFlatTabCtrl::SetTipText | ( | int | nItem,
 |  | LPCTSTR | lpszTabTip
 | ) | [virtual]

Definition at line 925 of file CJFlatTabCtrl.cpp.

References m_TabList, and m_TabTipList.

00926 {
00927     if (nItem < m_TabList.GetCount())
00928     {
00929         for (int i = 0; i < m_TabList.GetCount(); i++)
00930         {
00931             if (i == nItem)
00932             {
00933                 CString *pTipItem = m_TabTipList.GetAt(m_TabTipList.FindIndex(nItem));
00934
00935                 *pTipItem = lpszTabTip;
00936
00937                 break;
00938             }
00939         }
00940     }
00941
00942     return;
00943 }

Member Data Documentation

bool CCJFlatTabCtrl::m_bHasArrows [private]

Definition at line 137 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), EnableButtons(), GetTotalArrowWidth(), OnCreate(), and OnSize().

bool CCJFlatTabCtrl::m_bHasHomeEnd [private]

Definition at line 138 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), EnableButtons(), GetTotalArrowWidth(), OnCreate(), and OnSize().

CFont CCJFlatTabCtrl::m_BoldFont [private]

Definition at line 148 of file CJFlatTabCtrl.h.

Referenced by CreateTabFont(), DrawTab(), GetTabWidth(), and ~CCJFlatTabCtrl().

bool CCJFlatTabCtrl::m_bTabsOnBottom [private]

Definition at line 139 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and OnPaint().

CFont CCJFlatTabCtrl::m_Font [private]

Definition at line 147 of file CJFlatTabCtrl.h.

Referenced by CreateTabFont(), DrawTab(), and ~CCJFlatTabCtrl().

HENHMETAFILE CCJFlatTabCtrl::m_hEndArrow [private]

Definition at line 159 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and ~CCJFlatTabCtrl().

HENHMETAFILE CCJFlatTabCtrl::m_hEndArrowDisabled [private]

Definition at line 160 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and ~CCJFlatTabCtrl().

HENHMETAFILE CCJFlatTabCtrl::m_hHomeArrow [private]

Definition at line 157 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and ~CCJFlatTabCtrl().

HENHMETAFILE CCJFlatTabCtrl::m_hHomeArrowDisabled [private]

Definition at line 158 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and ~CCJFlatTabCtrl().

HENHMETAFILE CCJFlatTabCtrl::m_hLeftArrow [private]

Definition at line 153 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and ~CCJFlatTabCtrl().

HENHMETAFILE CCJFlatTabCtrl::m_hLeftArrowDisabled [private]

Definition at line 154 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and ~CCJFlatTabCtrl().

HENHMETAFILE CCJFlatTabCtrl::m_hRightArrow [private]

Definition at line 155 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and ~CCJFlatTabCtrl().

HENHMETAFILE CCJFlatTabCtrl::m_hRightArrowDisabled [private]

Definition at line 156 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), OnCreate(), and ~CCJFlatTabCtrl().

int CCJFlatTabCtrl::m_iClientHeight [private]

Definition at line 142 of file CJFlatTabCtrl.h.

Referenced by GetItemRect(), GetTabWidth(), GetTotalTabWidth(), HitTest(), InvalidateTabs(), OnPaint(), and OnSize().

int CCJFlatTabCtrl::m_iClientWidth [private]

Definition at line 141 of file CJFlatTabCtrl.h.

Referenced by EnableButtons(), InvalidateTabs(), OnEndArrow(), OnPaint(), OnSize(), and SetCurSel().

int CCJFlatTabCtrl::m_iCurSel [private]

Definition at line 140 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), DeleteAllItems(), DeleteItem(), InsertItem(), OnLButtonDown(), OnPaint(), and SetCurSel().

int CCJFlatTabCtrl::m_iTotalTabWidth [private]

Definition at line 143 of file CJFlatTabCtrl.h.

Referenced by DeleteAllItems(), DeleteItem(), EnableButtons(), InsertItem(), InvalidateTabs(), OnEndArrow(), OnPaint(), and OnSize().

int CCJFlatTabCtrl::m_iXOffset [private]

Definition at line 144 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), EnableButtons(), GetItemRect(), HitTest(), InvalidateTabs(), OnEndArrow(), OnHomeArrow(), OnLeftArrow(), OnPaint(), OnRightArrow(), and SetCurSel().

CCJMetaFileButton* CCJFlatTabCtrl::m_pEndButton [private]

Definition at line 152 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), EnableButtons(), OnCreate(), OnSize(), and ~CCJFlatTabCtrl().

CCJMetaFileButton* CCJFlatTabCtrl::m_pHomeButton [private]

Definition at line 151 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), EnableButtons(), OnCreate(), OnSize(), and ~CCJFlatTabCtrl().

CCJMetaFileButton* CCJFlatTabCtrl::m_pLeftButton [private]

Definition at line 149 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), EnableButtons(), OnCreate(), OnSize(), and ~CCJFlatTabCtrl().

CCJMetaFileButton* CCJFlatTabCtrl::m_pRightButton [private]

Definition at line 150 of file CJFlatTabCtrl.h.

Referenced by CCJFlatTabCtrl(), EnableButtons(), OnCreate(), OnSize(), and ~CCJFlatTabCtrl().

CTabList CCJFlatTabCtrl::m_TabList [private]

Definition at line 145 of file CJFlatTabCtrl.h.

Referenced by DeleteAllItems(), DeleteItem(), GetItemRect(), GetTabWidth(), GetTipText(), GetTotalTabWidth(), HitTest(), InsertItem(), OnPaint(), SetCurSel(), SetTipText(), and ~CCJFlatTabCtrl().

CTabList CCJFlatTabCtrl::m_TabTipList [private]

Definition at line 146 of file CJFlatTabCtrl.h.

Referenced by DeleteAllItems(), GetTipText(), InsertItem(), PreTranslateMessage(), SetTipText(), and ~CCJFlatTabCtrl().

CToolTipCtrl CCJFlatTabCtrl::m_ToolTip [private]

Definition at line 162 of file CJFlatTabCtrl.h.

Referenced by OnCreate(), and PreTranslateMessage().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJFlatTabCtrl.h
  • WinCvs/CJLib/CJLibrary/CJFlatTabCtrl.cpp
Generated on Sat Aug 7 22:49:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJFontCombo Class Reference

CCJFontCombo Class Reference

#include <CJFontCombo.h>

Inheritance diagram for CCJFontCombo:

[legend]
Collaboration diagram for CCJFontCombo:

[legend]
List of all members.

Public Member Functions

CCJFontCombo ()
virtual int | GetSelFont (LOGFONT &logFont)
virtual void | SetHilightColors (COLORREF clrHilight, COLORREF clrHilightText)
virtual void | SetNormalColors (COLORREF clrBkgnd, COLORREF clrNormalText)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMeasureItemStruct)
virtual | ~CCJFontCombo ()

Static Public Member Functions

BOOL CALLBACK | EnumFontProc (LPLOGFONT lpLogFont, LPTEXTMETRIC lpTextMetric, short nFontType, LPHANDLE lpData)

Protected Member Functions

virtual void | InitializeFonts ()
virtual void | PreSubclassWindow ()
afx_msg void | OnDestroy ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Protected Attributes

COLORREF | m_clrHilight
COLORREF | m_clrNormalText
COLORREF | m_clrHilightText
COLORREF | m_clrBkgnd

Constructor & Destructor Documentation

CCJFontCombo::CCJFontCombo ( )

Definition at line 64 of file CJFontCombo.cpp.

References m_clrBkgnd, m_clrHilight, m_clrHilightText, and m_clrNormalText.

00065 {
00066      m_clrHilight       = ::GetSysColor(COLOR_HIGHLIGHT);
00067      m_clrNormalText    = ::GetSysColor(COLOR_WINDOWTEXT);
00068      m_clrHilightText   = ::GetSysColor(COLOR_HIGHLIGHTTEXT);
00069      m_clrBkgnd         = ::GetSysColor(COLOR_WINDOW);
00070 }

CCJFontCombo::~CCJFontCombo ( ) [virtual]

Definition at line 72 of file CJFontCombo.cpp.

00073 {
00074 }

Member Function Documentation

void CCJFontCombo::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Definition at line 90 of file CJFontCombo.cpp.

00091 {
00092     CDC*      pDC      = CDC::FromHandle(lpDrawItemStruct->hDC);
00093     CRect     rect     = lpDrawItemStruct->rcItem;
00094     int       nState   = lpDrawItemStruct->itemState;
00095     int       nItem    = lpDrawItemStruct->itemID;
00096     LPLOGFONT pLogFont = (LPLOGFONT)lpDrawItemStruct->itemData;
00097
00098     pDC->SetBkMode( TRANSPARENT );
00099
00100     if( nState & ODS_SELECTED ) {
00101         pDC->FillSolidRect( rect, m_clrHilight );
00102         pDC->SetTextColor( m_clrHilightText );
00103     }
00104     else {
00105         pDC->FillSolidRect( rect, m_clrBkgnd );
00106         pDC->SetTextColor( m_clrNormalText );
00107     }
00108
00109     if( nItem >= 0 )
00110     {
00111         CString strText;
00112         GetLBText( nItem, strText );
00113
00114         CFont newFont;
00115         pLogFont->lfHeight = 90; //9 point size
00116         pLogFont->lfWidth  = 0;
00117         newFont.CreatePointFontIndirect( pLogFont );
00118
00119         CFont *pOldFont = pDC->SelectObject( &newFont );
00120         pDC->DrawText(strText, rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
00121         pDC->SelectObject( pOldFont );
00122         newFont.DeleteObject();
00123     }
00124 }

BOOL CALLBACK CCJFontCombo::EnumFontProc | ( | LPLOGFONT | lpLogFont,
 |  | LPTEXTMETRIC | lpTextMetric,
 |  | short | nFontType,
 |  | LPHANDLE | lpData
 | ) | [static]

Definition at line 141 of file CJFontCombo.cpp.

Referenced by InitializeFonts().

00142 {
00143     UNUSED_ALWAYS( lpTextMetric );
00144
00145     if((nFontType == TRUETYPE_FONTTYPE) && (lpLogFont->lfCharSet != SYMBOL_CHARSET))
00146      {
00147          CCJFontCombo* pCombo = (CCJFontCombo*)lpData;
00148          ASSERT(pCombo);
00149
00150          int nIndex = pCombo->AddString(lpLogFont->lfFaceName);
00151          LPLOGFONT pLogFont = new LOGFONT;
00152
00153          ::CopyMemory((PVOID)pLogFont, (CONST VOID*)lpLogFont, (DWORD)sizeof( LOGFONT ));
00154          pCombo->SetItemData( nIndex, (DWORD)pLogFont );
00155      }
00156
00157      return TRUE;
00158 }

int CCJFontCombo::GetSelFont ( LOGFONT & logFont ) [virtual]

Definition at line 170 of file CJFontCombo.cpp.

00171 {
00172      int nIndex = GetCurSel ();
00173      if(nIndex != LB_ERR)
00174      {
00175         LPLOGFONT pLogFont = (LPLOGFONT)GetItemData(nIndex);
00176         ::CopyMemory((PVOID)&logFont, (CONST VOID*)pLogFont, sizeof(LOGFONT));
00177         return nIndex;
00178      }
00179
00180      return LB_ERR;
00181 }

void CCJFontCombo::InitializeFonts ( ) [protected, virtual]

Definition at line 131 of file CJFontCombo.cpp.

References EnumFontProc(), and NULL.

Referenced by OnCreate(), and PreSubclassWindow().

00132 {
00133     // Clear the combobox.
00134      ResetContent();
00135
00136      HDC hDC  = ::GetDC(m_hWnd);
00137      ::EnumFonts( hDC, NULL, (FONTENUMPROC)EnumFontProc, (LPARAM)this );//Enumerate
00138      ::ReleaseDC(m_hWnd, hDC);
00139 }

Here is the call graph for this function:

void CCJFontCombo::MeasureItem ( LPMEASUREITEMSTRUCT lpMeasureItemStruct ) [virtual]

Definition at line 126 of file CJFontCombo.cpp.

00127 {
00128     UNUSED_ALWAYS( lpMeasureItemStruct );
00129 }

int CCJFontCombo::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 183 of file CJFontCombo.cpp.

References InitializeFonts().

00184 {
00185     if (CComboBox::OnCreate(lpCreateStruct) == -1)
00186         return -1;
00187
00188     InitializeFonts();
00189     return 0;
00190 }

Here is the call graph for this function:

void CCJFontCombo::OnDestroy ( ) [protected]

Definition at line 160 of file CJFontCombo.cpp.

References _delete.

00161 {
00162     for( int nIndex = 0; nIndex <  GetCount(); ++nIndex ) {
00163         LPLOGFONT pLogFont = (LPLOGFONT)GetItemData(nIndex);
00164         _delete( pLogFont );
00165     }
00166
00167      CComboBox::OnDestroy();
00168 }

BOOL CCJFontCombo::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 198 of file CJFontCombo.cpp.

00199 {
00200     // KStowell - overridden for flicker-free drawing.
00201     UNUSED_ALWAYS(pDC);
00202     return TRUE;
00203 }

void CCJFontCombo::OnPaint ( ) [protected]

Definition at line 205 of file CJFontCombo.cpp.

00206 {
00207     CPaintDC dc(this); // device context for painting
00208
00209     // KStowell - Get the client rect.
00210     CRect rcClient, rcClip;
00211     dc.GetClipBox( &rcClip );
00212     GetClientRect( &rcClient );
00213
00214     // KStowell - Create a memory device-context. This is done to help reduce
00215     // screen flicker, since we will paint the entire control to the
00216     // off screen device context first.
00217     CDC memDC;
00218     CBitmap bitmap;
00219     memDC.CreateCompatibleDC(&dc);
00220     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00221     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00222
00223     // KStowell - Repaint the background.
00224     memDC.FillSolidRect(rcClient, ::GetSysColor(COLOR_WINDOW));
00225
00226     // let the control do its default drawing.
00227     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00228
00229     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00230     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00231         rcClip.left, rcClip.top, SRCCOPY );
00232
00233     // KStowell - Cleanup resources.
00234     memDC.SelectObject(pOldBitmap);
00235     memDC.DeleteDC();
00236     bitmap.DeleteObject();
00237 }

void CCJFontCombo::PreSubclassWindow ( ) [protected, virtual]

Definition at line 192 of file CJFontCombo.cpp.

References InitializeFonts().

00193 {
00194     CComboBox::PreSubclassWindow();
00195     InitializeFonts();
00196 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJFontCombo::SetHilightColors | ( | COLORREF | clrHilight,
 |  | COLORREF | clrHilightText
 | ) | [virtual]

Definition at line 109 of file CJFontCombo.h.

References _CJXLIB_INLINE, m_clrHilight, and m_clrHilightText.

00110     { m_clrHilight = clrHilight; m_clrHilightText = clrHilightText; };

_CJXLIB_INLINE void CCJFontCombo::SetNormalColors | ( | COLORREF | clrBkgnd,
 |  | COLORREF | clrNormalText
 | ) | [virtual]

Definition at line 112 of file CJFontCombo.h.

References _CJXLIB_INLINE, m_clrBkgnd, and m_clrNormalText.

00113     { m_clrNormalText = clrNormalText; m_clrBkgnd = clrBkgnd; };

Member Data Documentation

COLORREF CCJFontCombo::m_clrBkgnd [protected]

Definition at line 65 of file CJFontCombo.h.

Referenced by CCJFontCombo(), and SetNormalColors().

COLORREF CCJFontCombo::m_clrHilight [protected]

Definition at line 62 of file CJFontCombo.h.

Referenced by CCJFontCombo(), and SetHilightColors().

COLORREF CCJFontCombo::m_clrHilightText [protected]

Definition at line 64 of file CJFontCombo.h.

Referenced by CCJFontCombo(), and SetHilightColors().

COLORREF CCJFontCombo::m_clrNormalText [protected]

Definition at line 63 of file CJFontCombo.h.

Referenced by CCJFontCombo(), and SetNormalColors().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJFontCombo.h
  • WinCvs/CJLib/CJLibrary/CJFontCombo.cpp
Generated on Sat Aug 7 22:49:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJFrameWnd Class Reference

CCJFrameWnd Class Reference

#include <CJFrameWnd.h>

Inheritance diagram for CCJFrameWnd:

[legend]
Collaboration diagram for CCJFrameWnd:

[legend]
List of all members.

Public Member Functions

CCJFrameWnd ()
virtual | ~CCJFrameWnd ()
virtual void | LoadBarState (LPCTSTR lpszProfileName)
virtual void | SaveBarState (LPCTSTR lpszProfileName) const
virtual BOOL | InitializeMenu (UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0)
virtual BOOL | InitializeMenu (UINT nMenuID, UINT nToolbarID=NULL)
virtual void | RecalcAllExcept (CCJSizeDockBar *pBar)
virtual void | EnableDocking (DWORD dwDockStyle)
virtual void | EnableDockingSizeBar (DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised)
virtual void | DockSizeBar (CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL)
virtual void | DockControlBarLeftOf (CControlBar *Bar, CControlBar *LeftOf)
virtual void | RecalcLayout (BOOL bNotify=TRUE)
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Types

enum DockFlatBorders {
brdrAllRaised = 0x0000,
brdrFlatTop = 0x0001,
brdrFlatBottom = 0x0002,
brdrFlatLeft = 0x0004,
brdrFlatRight = 0x0008,
brdrFlatVertical = 0x0003,
brdrFlatHorizontal = 0x000C,
brdrFlatAll = 0x000F
}

Protected Member Functions

virtual HMENU | NewMenu (UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0)
virtual HMENU | NewMenu (UINT nMenuID, UINT nToolbarID=NULL)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs, UINT nIconID)
afx_msg void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
afx_msg LRESULT | OnMenuChar (UINT nChar, UINT nFlags, CMenu *pMenu)
afx_msg void | OnInitMenuPopup (CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu)
afx_msg void | OnClose ()

Protected Attributes

CCJMenu m_menu
CCJMenuBar m_wndMenuBar

Static Protected Attributes

DWORD | dwDockBarMap [4][2]

Member Enumeration Documentation

enum CCJFrameWnd::DockFlatBorders [protected]

Enumeration values:
brdrAllRaised
brdrFlatTop
brdrFlatBottom
brdrFlatLeft
brdrFlatRight
brdrFlatVertical
brdrFlatHorizontal
brdrFlatAll
Definition at line 154 of file CJFrameWnd.h.
00154                          {
00155         brdrAllRaised       = 0x0000,
00156         brdrFlatTop         = 0x0001,
00157         brdrFlatBottom      = 0x0002,
00158         brdrFlatLeft        = 0x0004,
00159         brdrFlatRight       = 0x0008,
00160         brdrFlatVertical    = 0x0003,
00161         brdrFlatHorizontal  = 0x000C,
00162         brdrFlatAll         = 0x000F
00163     };

Constructor & Destructor Documentation

CCJFrameWnd::CCJFrameWnd ( )

Definition at line 133 of file CJFrameWnd.cpp.

00134 {
00135
00136 }

CCJFrameWnd::~CCJFrameWnd ( ) [virtual]

Definition at line 138 of file CJFrameWnd.cpp.

00139 {
00140 }

Member Function Documentation

void CCJFrameWnd::DockControlBarLeftOf | ( | CControlBar * | Bar,
 |  | CControlBar * | LeftOf
 | ) | [virtual]

Definition at line 165 of file CJFrameWnd.cpp.

References RecalcLayout().

00166 {
00167     CRect rect;
00168     DWORD dw;
00169     UINT n;
00170
00171     // get MFC to adjust the dimensions of all docked ToolBars
00172     // so that GetWindowRect will be accurate
00173     RecalcLayout(TRUE);
00174
00175     LeftOf->GetWindowRect(&rect);
00176     rect.OffsetRect(1,0);
00177     dw=LeftOf->GetBarStyle();
00178     n = 0;
00179     n = (dw&CBRS_ALIGN_TOP)              ? AFX_IDW_DOCKBAR_TOP      : n;
00180     n = (dw&CBRS_ALIGN_BOTTOM   && n==0) ? AFX_IDW_DOCKBAR_BOTTOM   : n;
00181     n = (dw&CBRS_ALIGN_LEFT     && n==0) ? AFX_IDW_DOCKBAR_LEFT     : n;
00182     n = (dw&CBRS_ALIGN_RIGHT    && n==0) ? AFX_IDW_DOCKBAR_RIGHT    : n;
00183
00184     // When we take the default parameters on rect, DockControlBar will dock
00185     // each Toolbar on a seperate line. By calculating a rectangle, we in effect
00186     // are simulating a Toolbar being dragged to that location and docked.
00187     DockControlBar(Bar,n,&rect);
00188 }

Here is the call graph for this function:

void CCJFrameWnd::DockSizeBar | ( | CControlBar * | pBar,
 |  | CCJSizeDockBar * | pDockBar = NULL,
 |  | LPRECT | lpRect = NULL
 | ) | [virtual]

Definition at line 270 of file CJFrameWnd.cpp.

References dwSizeBarMap, NULL, and CCJSizeDockBar::SetActualSize().

00271 {
00272     ASSERT(pBar != NULL);
00273     ASSERT(pBar->m_pDockContext != NULL);
00274
00275     if( pDockBar == NULL )
00276     {
00277         for (int i = 0; i < 4; i++)
00278         {
00279             if ((dwSizeBarMap[i][1] & CBRS_ALIGN_ANY) == (pBar->m_dwStyle & CBRS_ALIGN_ANY))
00280             {
00281                 pDockBar = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00282                 ASSERT(pDockBar != NULL);
00283
00284                 int nSize = 0;
00285
00286                 switch(i)
00287                 {
00288                 case 0: // horizontal dock
00289                 case 1:
00290                     nSize = ((CCJControlBar*)pBar)->GetHorzSize();
00291                     break;
00292                 case 2: // vertical dock
00293                 case 3:
00294                     nSize = ((CCJControlBar*)pBar)->GetVertSize();
00295                     break;
00296                 }
00297
00298                 pDockBar->SetActualSize( nSize );
00299                 break;
00300             }
00301         }
00302     }
00303
00304     ASSERT(pDockBar != NULL);
00305     ASSERT(m_listControlBars.Find(pBar) != NULL);
00306     ASSERT(pBar->m_pDockSite == this);
00307     ((CCJControlBar*)pBar)->Normalize();
00308     pDockBar->DockControlBar(pBar, lpRect);
00309 }

Here is the call graph for this function:

void CCJFrameWnd::EnableDocking ( DWORD dwDockStyle ) [virtual]

Definition at line 190 of file CJFrameWnd.cpp.

References dwDockBarMap.

00191 {
00192     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00193     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00194     CFrameWnd::EnableDocking(dwDockStyle);
00195
00196     for (int i = 0; i < 4; i++) {
00197         if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) {
00198             CDockBar* pDock = (CDockBar*)GetControlBar(dwDockBarMap[i][0]);
00199
00200             // make sure the dock bar is of correct type
00201             if( pDock || !pDock->IsKindOf(RUNTIME_CLASS(CCJDockBar)) ) {
00202                 BOOL bNeedDelete = ! pDock->m_bAutoDelete;
00203                 pDock->m_pDockSite->RemoveControlBar(pDock);
00204                 pDock->m_pDockSite = 0; // avoid problems in destroying the dockbar
00205                 pDock->DestroyWindow();
00206                 if( bNeedDelete )
00207                     delete pDock;
00208                 pDock = 0;
00209             }
00210
00211             if( pDock == 0 ) {
00212                 pDock = new CCJDockBar;
00213                 if (!pDock->Create(this,
00214                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00215                     dwDockBarMap[i][1], dwDockBarMap[i][0])) {
00216                     AfxThrowResourceException();
00217                 }
00218             }
00219         }
00220     }
00221 }

void CCJFrameWnd::EnableDockingSizeBar | ( | DWORD | dwDockStyle,
 |  | DockFlatBorders | FlatFlags = brdrAllRaised
 | ) | [virtual]

Definition at line 230 of file CJFrameWnd.cpp.

References dwSizeBarMap, CCJSizeDockBar::FlatBorder(), and NULL.

00231 {
00232     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00233     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00234
00235     m_pFloatingFrameClass = RUNTIME_CLASS(CCJMiniDockFrameWnd);
00236     for (int i = 0; i < 4; i++)
00237     {
00238         if (dwSizeBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY)
00239         {
00240             CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00241             if (pDock == NULL)
00242             {
00243                 pDock = new CCJSizeDockBar;
00244
00245                 if (!pDock->Create(this,
00246                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00247                         dwSizeBarMap[i][1], dwSizeBarMap[i][0]))
00248                 {
00249                     AfxThrowResourceException();
00250                 }
00251                 //Yiannhs enable Flat Borders For dock Bars
00252                 pDock->FlatBorder( (FlatFlags >> i) & 0x0001 );
00253             }
00254         }
00255     }
00256 }

Here is the call graph for this function:

BOOL CCJFrameWnd::InitializeMenu | ( | UINT | nMenuID,
 |  | UINT | nToolbarID = NULL
 | ) | [virtual]

Definition at line 335 of file CJFrameWnd.cpp.

References NewMenu().

00336 {
00337     ASSERT(nMenuID);     // must be valid.
00338
00339     // Get a pointer to the existing menu, and destroy it.
00340     CMenu* pMenu = GetMenu();
00341     ASSERT_VALID(pMenu);
00342     pMenu->DestroyMenu();
00343
00344     // Set the default menu with the newly created Menu.
00345     m_hMenuDefault = NewMenu(nMenuID, nToolBarID);
00346     SetMenu(CMenu::FromHandle(m_hMenuDefault));
00347
00348     return TRUE;
00349 }

Here is the call graph for this function:

BOOL CCJFrameWnd::InitializeMenu | ( | UINT | nMenuID,
 |  | UINT * | nToolbarIDs = NULL,
 |  | int | nSize = 0
 | ) | [virtual]

Definition at line 351 of file CJFrameWnd.cpp.

References NewMenu().

00352 {
00353     ASSERT(nMenuID);     // must be valid.
00354
00355     // Get a pointer to the existing menu, and destroy it.
00356     CMenu* pMenu = GetMenu();
00357     ASSERT_VALID(pMenu);
00358     pMenu->DestroyMenu();
00359
00360     // Set the default menu with the newly created Menu.
00361     m_hMenuDefault = NewMenu(nMenuID, nToolbarIDs, nSize);
00362     SetMenu(CMenu::FromHandle(m_hMenuDefault));
00363
00364     return TRUE;
00365 }

Here is the call graph for this function:

void CCJFrameWnd::LoadBarState ( LPCTSTR lpszProfileName ) [virtual]

Definition at line 416 of file CJFrameWnd.cpp.

00417 {
00418     CCJSizeDockBar::m_bIsDockBar = true;
00419     CFrameWnd::LoadBarState(lpszProfileName);
00420     CCJSizeDockBar::m_bIsDockBar = false;
00421 }

HMENU CCJFrameWnd::NewMenu | ( | UINT | nMenuID,
 |  | UINT | nToolbarID = NULL
 | ) | [protected, virtual]

Definition at line 311 of file CJFrameWnd.cpp.

References CCJMenu::LoadMenu(), CCJMenu::LoadToolbar(), and m_menu.

00312 {
00313     // Load the menu and toolbar resource.
00314     m_menu.LoadMenu(nMenuID);
00315     if (nToolbarID) {
00316         m_menu.LoadToolbar(nToolbarID);
00317     }
00318
00319     // Detach the menu.
00320     return(m_menu.Detach());
00321 }

Here is the call graph for this function:

HMENU CCJFrameWnd::NewMenu | ( | UINT | nMenuID,
 |  | UINT * | nToolbarIDs = NULL,
 |  | int | nSize = 0
 | ) | [protected, virtual]

Definition at line 323 of file CJFrameWnd.cpp.

References CCJMenu::LoadMenu(), CCJMenu::LoadToolbars(), and m_menu.

Referenced by InitializeMenu().

00324 {
00325     // Load the menu and toolbar resources.
00326     m_menu.LoadMenu(nMenuID);
00327     if (nToolbarIDs) {
00328         m_menu.LoadToolbars(nToolbarIDs, nSize);
00329     }
00330
00331     // Detach the menu.
00332     return(m_menu.Detach());
00333 }

Here is the call graph for this function:

void CCJFrameWnd::OnClose ( ) [protected]

Definition at line 430 of file CJFrameWnd.cpp.

References NULL.

00431 {
00432     // Clear active view before close
00433     SetActiveView (NULL);
00434     CFrameWnd::OnClose();
00435 }

void CCJFrameWnd::OnInitMenuPopup | ( | CMenu * | pPopupMenu,
 |  | UINT | nIndex,
 |  | BOOL | bSysMenu
 | ) | [protected]

Definition at line 393 of file CJFrameWnd.cpp.

References CCJMenu::IsMenu(), m_menu, and CCJMenu::UpdateMenu().

00394 {
00395     CFrameWnd::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
00396
00397     if(!bSysMenu)
00398     {
00399         if(m_menu.IsMenu(pPopupMenu)) {
00400             CCJMenu::UpdateMenu(pPopupMenu);
00401         }
00402     }
00403 }

Here is the call graph for this function:

void CCJFrameWnd::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct
 | ) | [protected]

Definition at line 367 of file CJFrameWnd.cpp.

References CCJMenu::IsMenu(), m_menu, and CCJMenu::MeasureItem().

00368 {
00369     if (lpMeasureItemStruct->CtlType == ODT_MENU)
00370     {
00371         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
00372             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
00373
00374             if(m_menu.IsMenu(pMenu)) {
00375                 m_menu.MeasureItem(lpMeasureItemStruct);
00376                 return;
00377             }
00378         }
00379     }
00380
00381     CFrameWnd::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
00382 }

Here is the call graph for this function:

LRESULT CCJFrameWnd::OnMenuChar | ( | UINT | nChar,
 |  | UINT | nFlags,
 |  | CMenu * | pMenu
 | ) | [protected]

Definition at line 384 of file CJFrameWnd.cpp.

References CCJMenu::FindKeyboardShortcut(), CCJMenu::IsMenu(), and m_menu.

00385 {
00386     if(m_menu.IsMenu(pMenu)) {
00387         return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
00388     }
00389
00390     return CFrameWnd::OnMenuChar(nChar, nFlags, pMenu);
00391 }

Here is the call graph for this function:

BOOL CCJFrameWnd::PreCreateWindow | ( | CREATESTRUCT & | cs,
 |  | UINT | nIconID
 | ) | [protected, virtual]

Definition at line 448 of file CJFrameWnd.cpp.

References NULL.

00449 {
00450     // Register wnd class with no redraw, cursor (use default), background
00451     // brush and load your apps icon resource.
00452     cs.lpszClass = AfxRegisterWndClass( 0, NULL, NULL,
00453         AfxGetApp()->LoadIcon(nIconID));
00454     ASSERT(cs.lpszClass);
00455
00456     return CFrameWnd::PreCreateWindow(cs);
00457 }

BOOL CCJFrameWnd::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 438 of file CJFrameWnd.cpp.

00439 {
00440     return CFrameWnd::PreCreateWindow(cs);
00441 }

BOOL CCJFrameWnd::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 405 of file CJFrameWnd.cpp.

References m_wndMenuBar, and CCJMenuBar::TranslateFrameMessage().

00406 {
00407     if( m_wndMenuBar.GetSafeHwnd()) {
00408         if( m_wndMenuBar.TranslateFrameMessage(pMsg)) {
00409             return TRUE;
00410         }
00411     }
00412
00413     return CFrameWnd::PreTranslateMessage(pMsg);
00414 }

Here is the call graph for this function:

void CCJFrameWnd::RecalcAllExcept ( CCJSizeDockBar * pBar ) [virtual]

Definition at line 258 of file CJFrameWnd.cpp.

References CCJSizeDockBar::CalcSizeBarLayout(), dwSizeBarMap, and NULL.

Referenced by RecalcLayout().

00259 {
00260     for (int i = 0; i < 4; i++)
00261     {
00262         CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00263         if (pDock != NULL && pDock != pBar)
00264         {
00265             pDock->CalcSizeBarLayout();
00266         }
00267     }
00268 }

Here is the call graph for this function:

void CCJFrameWnd::RecalcLayout ( BOOL bNotify = TRUE ) [virtual]

Definition at line 223 of file CJFrameWnd.cpp.

References NULL, and RecalcAllExcept().

Referenced by DockControlBarLeftOf().

00224 {
00225     CFrameWnd::RecalcLayout(bNotify);
00226     RecalcAllExcept(NULL);
00227 }

Here is the call graph for this function:

void CCJFrameWnd::SaveBarState ( LPCTSTR lpszProfileName ) const [virtual]

Definition at line 423 of file CJFrameWnd.cpp.

00424 {
00425     CCJSizeDockBar::m_bIsDockBar = true;
00426     CFrameWnd::SaveBarState(lpszProfileName);
00427     CCJSizeDockBar::m_bIsDockBar = false;
00428 }

Member Data Documentation

DWORD CCJFrameWnd::dwDockBarMap [static, protected]

Initial value:

{
    { AFX_IDW_DOCKBAR_TOP,      CBRS_TOP    },
    { AFX_IDW_DOCKBAR_BOTTOM,   CBRS_BOTTOM },
    { AFX_IDW_DOCKBAR_LEFT,     CBRS_LEFT   },
    { AFX_IDW_DOCKBAR_RIGHT,    CBRS_RIGHT  },
}
Definition at line 157 of file CJFrameWnd.cpp.

Referenced by EnableDocking().

CCJMenu CCJFrameWnd::m_menu [protected]

Definition at line 150 of file CJFrameWnd.h.

Referenced by NewMenu(), OnInitMenuPopup(), OnMeasureItem(), and OnMenuChar().

CCJMenuBar CCJFrameWnd::m_wndMenuBar [protected]

Definition at line 151 of file CJFrameWnd.h.

Referenced by PreTranslateMessage().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJFrameWnd.h
  • WinCvs/CJLib/CJLibrary/CJFrameWnd.cpp
Generated on Sat Aug 7 22:49:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJHexEdit Class Reference

CCJHexEdit Class Reference

#include <CJHexEdit.h>

Inheritance diagram for CCJHexEdit:

[legend]
Collaboration diagram for CCJHexEdit:

[legend]
List of all members.

Public Types

enum EDITMODE {
EDIT_NONE,
EDIT_ASCII,
EDIT_HIGH,
EDIT_LOW
}

Public Member Functions

CCJHexEdit ()
virtual int | GetData (LPBYTE p, int len)
virtual void | SetData (LPBYTE p, int len)
virtual CSize | GetSel (void)
virtual void | SetSel (int s, int e)
virtual void | SetBPR (int bpr)
virtual void | SetOptions (BOOL a, BOOL h, BOOL c, BOOL w)
virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)
virtual | ~CCJHexEdit ()

Public Attributes

LPBYTE | m_pData
int m_length
int m_topindex
int m_currentAddress
EDITMODE m_currentMode
int m_selStart
int m_selEnd
int m_bpr
int m_lpp
BOOL | m_bShowAddress
BOOL | m_bShowAscii
BOOL | m_bShowHex
BOOL | m_bAddressIsWide
BOOL | m_bNoAddressChange
BOOL | m_bHalfPage
CFont | m_Font
int m_lineHeight
int m_nullWidth
BOOL | m_bUpdate
int m_offHex
int m_offAscii
int m_offAddress
CPoint | m_editPos

Protected Member Functions

virtual void | ScrollIntoView (int p)
virtual void | RepositionCaret (int p)
virtual void | Move (int x, int y)
virtual BOOL | IsSelected (void)
virtual void | UpdateScrollbars (void)
virtual void | CreateEditCaret (void)
virtual void | CreateAddressCaret (void)
virtual CPoint | CalcPos (int x, int y)
virtual void | SelInsert (int s, int l)
virtual void | SelDelete (int s, int e)
virtual void | NormalizeSel (void)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
afx_msg void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnKillFocus (CWnd *pNewWnd)
afx_msg void | OnPaint ()
afx_msg void | OnSetFocus (CWnd *pOldWnd)
afx_msg void | OnVScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg UINT | OnGetDlgCode ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnEditClear ()
afx_msg void | OnEditCopy ()
afx_msg void | OnEditCut ()
afx_msg void | OnEditPaste ()
afx_msg void | OnEditSelectAll ()
afx_msg void | OnEditUndo ()
afx_msg void | OnContextMenu (CWnd *, CPoint point)
afx_msg void | OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)

Member Enumeration Documentation

enum CCJHexEdit::EDITMODE

Enumeration values:
EDIT_NONE
EDIT_ASCII
EDIT_HIGH
EDIT_LOW
Definition at line 44 of file CJHexEdit.h.
00044 { EDIT_NONE, EDIT_ASCII, EDIT_HIGH, EDIT_LOW } ;

Constructor & Destructor Documentation

CCJHexEdit::CCJHexEdit ( )

Definition at line 47 of file CJHexEdit.cpp.

References EDIT_NONE, m_bAddressIsWide, m_bHalfPage, m_bNoAddressChange, m_bpr, m_bShowAddress, m_bShowAscii, m_bShowHex, m_bUpdate, m_currentAddress, m_currentMode, m_editPos, m_Font, m_length, m_lpp, m_offAddress, m_offAscii, m_offHex, m_pData, m_selEnd, m_selStart, m_topindex, and NULL.

00048 {
00049     m_pData         = NULL;     // pointer to data
00050     m_length        = 0;        // length of data
00051     m_length        = 0x40;
00052     m_topindex      = 0;
00053     m_bpr           = 8;        // byte per row
00054     m_lpp           = 1;
00055
00056     m_bShowHex      = TRUE;
00057     m_bShowAscii    = TRUE;
00058     m_bShowAddress  = TRUE;
00059     m_bAddressIsWide= TRUE;     // 4/8 byte address
00060
00061     m_offAddress    = 0;
00062     m_offHex        = 0;
00063     m_offAscii      = 0;
00064
00065     m_bUpdate = TRUE;           // update font info
00066     m_bNoAddressChange = FALSE;
00067     m_currentMode = EDIT_NONE;
00068
00069     m_editPos.x = m_editPos.y = 0;
00070     m_currentAddress = 0;
00071     m_bHalfPage = TRUE;
00072
00073     m_selStart  = 0xffffffff;
00074     m_selEnd    = 0xffffffff;
00075
00076     m_Font.CreateFont(-12, 0,0,0,0,0,0,0,0,0,0,0,0, _T("Courier New"));
00077
00078     AfxOleInit();
00079 }

CCJHexEdit::~CCJHexEdit ( ) [virtual]

Definition at line 81 of file CJHexEdit.cpp.

References m_Font.

00082 {
00083     m_Font.DeleteObject();
00084 }

Member Function Documentation

CPoint CCJHexEdit::CalcPos | ( | int | x,
 |  | int | y
 | ) | [protected, virtual]

Definition at line 538 of file CJHexEdit.cpp.

References EDIT_ASCII, EDIT_HIGH, EDIT_LOW, EDIT_NONE, m_bAddressIsWide, m_bpr, m_bShowAddress, m_bShowAscii, m_bShowHex, m_currentAddress, m_currentMode, m_length, m_lineHeight, m_lpp, m_nullWidth, m_offAscii, m_offHex, and m_topindex.

Referenced by OnLButtonDown(), and OnMouseMove().

00539 {
00540     y /= m_lineHeight;
00541     if(y < 0 || y > m_lpp)
00542         return CPoint(-1, -1);
00543
00544     if(y * m_bpr > m_length)
00545         return CPoint(-1, -1);
00546
00547     x += m_nullWidth;
00548     x /= m_nullWidth;
00549
00550     int xp;
00551
00552     if(m_bShowAddress && x <= (m_bAddressIsWide ? 8 : 4))
00553     {
00554         m_currentAddress = m_topindex + (m_bpr * y);
00555         m_currentMode = EDIT_NONE;
00556         return CPoint(0, y);
00557     }
00558
00559     xp = (m_offHex  / m_nullWidth) + m_bpr * 3;
00560     if(m_bShowHex && x < xp)
00561     {
00562         if(x%3)
00563             x--;
00564         m_currentAddress = m_topindex + (m_bpr * y) + (x - (m_offHex  / m_nullWidth)) / 3;
00565         m_currentMode =  ((x%3) & 0x01) ? EDIT_LOW : EDIT_HIGH;
00566         return CPoint(x, y);
00567     }
00568
00569     xp = (m_offAscii  / m_nullWidth) + m_bpr;
00570     if(m_bShowAscii && x < xp)
00571     {
00572         m_currentAddress = m_topindex + (m_bpr * y) + (x - (m_offAscii  / m_nullWidth));
00573         m_currentMode = EDIT_ASCII;
00574         return CPoint(x, y);
00575     }
00576
00577     return CPoint(-1,-1);
00578 }

BOOL CCJHexEdit::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL
 | ) | [virtual]

Definition at line 466 of file CJHexEdit.cpp.

References m_Font.

00467 {
00468     if(!CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext)) {
00469         return FALSE;
00470     }
00471
00472     SetFont(&m_Font);
00473     return TRUE;
00474 }

void CCJHexEdit::CreateAddressCaret ( void ) [protected, virtual]

Definition at line 580 of file CJHexEdit.cpp.

References m_bAddressIsWide, m_lineHeight, and m_nullWidth.

Referenced by OnLButtonDown(), OnSetFocus(), RepositionCaret(), and SetSel().

00581 {
00582     DestroyCaret();
00583     CreateSolidCaret(m_nullWidth * (m_bAddressIsWide ? 8 : 4), m_lineHeight);
00584 }

void CCJHexEdit::CreateEditCaret ( void ) [protected, virtual]

Definition at line 586 of file CJHexEdit.cpp.

References m_lineHeight, and m_nullWidth.

Referenced by OnLButtonDown(), OnSetFocus(), RepositionCaret(), and SetSel().

00587 {
00588     DestroyCaret();
00589     CreateSolidCaret(m_nullWidth, m_lineHeight);
00590 }

_CJXLIB_INLINE int CCJHexEdit::GetData | ( | LPBYTE | p,
 |  | int | len
 | ) | [virtual]

Definition at line 153 of file CJHexEdit.h.

References _CJXLIB_INLINE, m_length, and m_pData.

00154     { memcpy(p, m_pData, min(len, m_length)); return m_length; }

_CJXLIB_INLINE CSize CCJHexEdit::GetSel ( void ) [virtual]

Definition at line 150 of file CJHexEdit.h.

References _CJXLIB_INLINE, m_selEnd, and m_selStart.

00151     { return CSize(m_selStart, m_selEnd); }

_CJXLIB_INLINE BOOL CCJHexEdit::IsSelected ( void ) [protected, virtual]

Definition at line 147 of file CJHexEdit.h.

References _CJXLIB_INLINE, and m_selStart.

Referenced by OnChar(), OnContextMenu(), OnKeyDown(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), and OnSetFocus().

00148     { return m_selStart != 0xffffffff; }

void CCJHexEdit::Move | ( | int | x,
 |  | int | y
 | ) | [protected, virtual]

Definition at line 976 of file CJHexEdit.cpp.

References EDIT_ASCII, EDIT_HIGH, EDIT_LOW, EDIT_NONE, m_bNoAddressChange, m_bpr, m_currentAddress, m_currentMode, m_length, m_lpp, m_topindex, NULL, OnVScroll(), and RepositionCaret().

Referenced by OnChar(), and OnKeyDown().

00977 {
00978     switch(m_currentMode)
00979     {
00980         case EDIT_NONE:
00981             return;
00982         case EDIT_HIGH:
00983             if(x != 0)
00984                 m_currentMode = EDIT_LOW;
00985             if(x == -1)
00986                 m_currentAddress --;
00987             m_currentAddress += y* m_bpr;
00988             break;
00989         case EDIT_LOW:
00990             if(x != 0)
00991                 m_currentMode = EDIT_HIGH;
00992             if(x == 1)
00993                 m_currentAddress++;
00994             m_currentAddress += y* m_bpr;
00995             break;
00996         case EDIT_ASCII:
00997             {
00998                 m_currentAddress += x;
00999                 m_currentAddress += y*m_bpr;
01000             }
01001             break;
01002     }
01003     if(m_currentAddress < 0)
01004         m_currentAddress = 0;
01005
01006     if(m_currentAddress >= m_length)
01007     {
01008         m_currentAddress -= x;
01009         m_currentAddress -= y*m_bpr;
01010     }
01011     m_bNoAddressChange = TRUE;
01012     if(m_currentAddress < m_topindex)
01013     {
01014         OnVScroll(SB_LINEUP, 0, NULL);
01015     }
01016     if(m_currentAddress >= m_topindex + m_lpp*m_bpr)
01017     {
01018         OnVScroll(SB_LINEDOWN, 0, NULL);
01019     }
01020     m_bNoAddressChange = FALSE;
01021     //ScrollIntoView(m_currentAddress);
01022     RepositionCaret(m_currentAddress);
01023 }

Here is the call graph for this function:

void CCJHexEdit::NormalizeSel ( void ) [protected, virtual]

Definition at line 1269 of file CJHexEdit.cpp.

References m_selEnd, and m_selStart.

Referenced by OnEditPaste().

01270 {
01271     if(m_selStart > m_selEnd)
01272         m_selStart ^= m_selEnd ^= m_selStart ^= m_selEnd;
01273 }

void CCJHexEdit::OnChar | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

Definition at line 671 of file CJHexEdit.cpp.

References EDIT_ASCII, EDIT_HIGH, EDIT_LOW, EDIT_NONE, IsSelected(), m_currentAddress, m_currentMode, m_pData, Move(), OnEditCopy(), OnEditCut(), OnEditPaste(), OnEditUndo(), RepositionCaret(), SelDelete(), and SetSel().

00672 {
00673     nFlags;nRepCnt;
00674     if(!m_pData)
00675         return;
00676     if(nChar == '\t')
00677         return;
00678     if(GetKeyState(VK_CONTROL) & 0x80000000)
00679     {
00680         switch(nChar)
00681         {
00682             case 0x03:
00683                 if(IsSelected())
00684                     OnEditCopy();
00685                 return;
00686             case 0x16:
00687                 OnEditPaste();
00688                 return;
00689             case 0x18:
00690                 if(IsSelected())
00691                     OnEditCut();
00692                 return;
00693             case 0x1a:
00694                 OnEditUndo();
00695                 return;
00696         }
00697     }
00698
00699     if(nChar == 0x08)
00700     {
00701         if(m_currentAddress > 0)
00702         {
00703             m_currentAddress--;
00704             SelDelete(m_currentAddress, m_currentAddress+1);
00705             RepositionCaret(m_currentAddress);
00706             RedrawWindow();
00707         }
00708         return;
00709     }
00710
00711     SetSel(-1, -1);
00712     switch(m_currentMode)
00713     {
00714         case EDIT_NONE:
00715             return;
00716         case EDIT_HIGH:
00717         case EDIT_LOW:
00718             if((nChar >= '0' && nChar <= '9') || (nChar >= 'a' && nChar <= 'f'))
00719             {
00720                 UINT b = nChar - '0';
00721                 if(b > 9)
00722                     b = 10 + nChar - 'a';
00723
00724                 if(m_currentMode == EDIT_HIGH)
00725                 {
00726                     m_pData[m_currentAddress] = (unsigned char)((m_pData[m_currentAddress] & 0x0f) | (b << 4));
00727                 }
00728                 else
00729                 {
00730                     m_pData[m_currentAddress] = (unsigned char)((m_pData[m_currentAddress] & 0xf0) | b);
00731                 }
00732                 Move(1,0);
00733             }
00734             break;
00735         case EDIT_ASCII:
00736             m_pData[m_currentAddress] = (unsigned char)nChar;
00737             Move(1,0);
00738             break;
00739     }
00740     RedrawWindow();
00741 }

Here is the call graph for this function:

void CCJHexEdit::OnContextMenu | ( | CWnd * | ,
 |  | CPoint | point
 | ) | [protected]

Definition at line 1094 of file CJHexEdit.cpp.

References IDR_POPUP_HEX_EDIT, IsSelected(), and NULL.

01095 {
01096     if (point.x == -1 && point.y == -1)
01097     {
01098         //keystroke invocation
01099         CRect rect;
01100         GetClientRect(rect);
01101         ClientToScreen(rect);
01102
01103         point = rect.TopLeft();
01104         point.Offset(5, 5);
01105     }
01106
01107     CMenu menu;
01108     VERIFY(menu.LoadMenu(IDR_POPUP_HEX_EDIT));
01109
01110     CMenu* pPopup = menu.GetSubMenu(0);
01111     ASSERT(pPopup != NULL);
01112
01113     pPopup->EnableMenuItem(ID_EDIT_UNDO, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01114     if(!IsSelected())
01115     {
01116         pPopup->EnableMenuItem(ID_EDIT_CLEAR, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01117         pPopup->EnableMenuItem(ID_EDIT_CUT, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01118         pPopup->EnableMenuItem(ID_EDIT_COPY, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01119     }
01120     {
01121         COleDataObject  obj;
01122         if (obj.AttachClipboard())
01123         {
01124             if(
01125                 !obj.IsDataAvailable(CF_TEXT) && !obj.IsDataAvailable((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData"))))
01126                 pPopup->EnableMenuItem(ID_EDIT_PASTE, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01127         }
01128     }
01129
01130     pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
01131         this);
01132 }

Here is the call graph for this function:

void CCJHexEdit::OnEditClear ( ) [protected]

Definition at line 1134 of file CJHexEdit.cpp.

References m_currentAddress, m_selEnd, m_selStart, RepositionCaret(), and SelDelete().

Referenced by OnKeyDown().

01135 {
01136     m_currentAddress = m_selStart;
01137     SelDelete(m_selStart, m_selEnd);
01138     RepositionCaret(m_currentAddress);
01139     RedrawWindow();
01140 }

Here is the call graph for this function:

void CCJHexEdit::OnEditCopy ( ) [protected]

Definition at line 1142 of file CJHexEdit.cpp.

References EDIT_ASCII, m_currentMode, m_pData, m_selEnd, m_selStart, and TOHEX.

Referenced by OnChar(), and OnEditCut().

01143 {
01144     COleDataSource*     pSource = new COleDataSource();
01145     EmptyClipboard();
01146     if(m_currentMode != EDIT_ASCII)
01147     {
01148         int         dwLen = (m_selEnd-m_selStart);
01149         HGLOBAL     hMemb = ::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE|GMEM_ZEROINIT, m_selEnd-m_selStart);
01150         HGLOBAL     hMema = ::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE|GMEM_ZEROINIT, (dwLen) * 3);
01151
01152         if (!hMema)
01153             return;
01154
01155         // copy binary
01156         LPBYTE  p = (BYTE*)::GlobalLock(hMemb);
01157         memcpy(p, m_pData+m_selStart, dwLen);
01158         ::GlobalUnlock(hMemb);
01159
01160         // copy ascii
01161         p = (BYTE*)::GlobalLock(hMema);
01162         for(int  i = 0; i < dwLen;)
01163         {
01164             TOHEX(m_pData[m_selStart+i], p);
01165             *p++ = ' ';
01166             i++;
01167         }
01168
01169         ::GlobalUnlock(hMema);
01170
01171         pSource->CacheGlobalData((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData")), hMemb);
01172         pSource->CacheGlobalData(CF_TEXT, hMema);
01173     }
01174     else
01175     {
01176         HGLOBAL             hMemb = ::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE|GMEM_ZEROINIT, m_selEnd-m_selStart);
01177         HGLOBAL             hMema = ::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE|GMEM_ZEROINIT, m_selEnd-m_selStart);
01178         if (!hMemb || !hMema)
01179             return;
01180
01181         // copy binary
01182         LPBYTE  p = (BYTE*)::GlobalLock(hMemb);
01183         int     dwLen = m_selEnd-m_selStart;
01184
01185         memcpy(p, m_pData+m_selStart, dwLen);
01186         ::GlobalUnlock(hMemb);
01187
01188         // copy ascii
01189         p = (BYTE*)::GlobalLock(hMema);
01190         memcpy(p, m_pData+m_selStart, dwLen);
01191         for(int i = 0; i < dwLen; p++, i++)
01192             if(!isprint(*p))
01193                 *p = '.';
01194         ::GlobalUnlock(hMema);
01195
01196         pSource->CacheGlobalData((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData")), hMemb);
01197         pSource->CacheGlobalData(CF_TEXT, hMema);
01198     }
01199     pSource->SetClipboard();
01200 }

void CCJHexEdit::OnEditCut ( ) [protected]

Definition at line 1202 of file CJHexEdit.cpp.

References m_selEnd, m_selStart, OnEditCopy(), and SelDelete().

Referenced by OnChar().

01203 {
01204     OnEditCopy();
01205     SelDelete(m_selStart, m_selEnd);
01206     RedrawWindow();
01207 }

Here is the call graph for this function:

void CCJHexEdit::OnEditPaste ( ) [protected]

Definition at line 1209 of file CJHexEdit.cpp.

References EDIT_LOW, m_currentAddress, m_currentMode, m_pData, m_selEnd, m_selStart, NormalizeSel(), NULL, SelDelete(), SelInsert(), and SetSel().

Referenced by OnChar().

01210 {
01211     COleDataObject  obj;
01212     if (obj.AttachClipboard())
01213     {
01214         HGLOBAL hmem = NULL;
01215         if (obj.IsDataAvailable((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData"))))
01216         {
01217             hmem = obj.GetGlobalData((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData")));
01218         }
01219         else if (obj.IsDataAvailable(CF_TEXT))
01220         {
01221             hmem = obj.GetGlobalData(CF_TEXT);
01222         }
01223         if(hmem)
01224         {
01225             LPBYTE  p = (BYTE*)::GlobalLock(hmem);
01226             DWORD   dwLen = ::GlobalSize(hmem);
01227             int     insert;
01228             int     oa = m_currentAddress;
01229
01230             NormalizeSel();
01231             if(m_selStart == 0xffffffff)
01232             {
01233                 if(m_currentMode == EDIT_LOW)
01234                     m_currentAddress++;
01235                 insert = m_currentAddress;
01236                 SelInsert(m_currentAddress, dwLen);
01237             }
01238             else
01239             {
01240                 insert = m_selStart;
01241                 SelDelete(m_selStart, m_selEnd);
01242                 SelInsert(insert, dwLen);
01243                 SetSel(-1, -1);
01244             }
01245
01246             memcpy(m_pData+insert, p, dwLen);
01247
01248             m_currentAddress = oa;
01249             RedrawWindow();
01250             ::GlobalUnlock(hmem);
01251         }
01252     }
01253 }

Here is the call graph for this function:

void CCJHexEdit::OnEditSelectAll ( ) [protected]

Definition at line 1255 of file CJHexEdit.cpp.

References m_length, m_selEnd, and m_selStart.

01256 {
01257     m_selStart = 0;
01258     m_selEnd = m_length;
01259     DestroyCaret();
01260     RedrawWindow();
01261 }

void CCJHexEdit::OnEditUndo ( ) [protected]

Definition at line 1263 of file CJHexEdit.cpp.

Referenced by OnChar().

01264 {
01265     // TODO: Add your command handler code here
01266
01267 }

BOOL CCJHexEdit::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 476 of file CJHexEdit.cpp.

00477 {
00478     // KStowell - overridden for flicker-free drawing.
00479     UNUSED_ALWAYS(pDC);
00480     return TRUE;
00481 }

_CJXLIB_INLINE UINT CCJHexEdit::OnGetDlgCode ( ) [protected]

Definition at line 138 of file CJHexEdit.h.

References _CJXLIB_INLINE.

00139     { return DLGC_WANTALLKEYS; }

void CCJHexEdit::OnHScroll | ( | UINT | nSBCode,
 |  | UINT | nPos,
 |  | CScrollBar * | pScrollBar
 | ) | [protected]

Definition at line 1322 of file CJHexEdit.cpp.

01323 {
01324     UNUSED_ALWAYS(nSBCode);
01325     UNUSED_ALWAYS(nPos);
01326     UNUSED_ALWAYS(pScrollBar);
01327 }

void CCJHexEdit::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

Definition at line 743 of file CJHexEdit.cpp.

References EDIT_ASCII, EDIT_HIGH, EDIT_LOW, EDIT_NONE, IsSelected(), m_bHalfPage, m_bNoAddressChange, m_bpr, m_currentAddress, m_currentMode, m_length, m_lpp, m_selEnd, m_selStart, Move(), NULL, OnEditClear(), OnVScroll(), SelDelete(), SelInsert(), and SetSel().

00744 {
00745     nFlags; nRepCnt;
00746
00747     BOOL bShift = GetKeyState(VK_SHIFT) & 0x80000000;
00748     BOOL bac = m_bNoAddressChange;
00749     m_bNoAddressChange = TRUE;
00750     switch(nChar)
00751     {
00752         case VK_DOWN:
00753             if(bShift)
00754             {
00755                 if(!IsSelected())
00756                 {
00757                     m_selStart = m_currentAddress;
00758                 }
00759                 Move(0,1);
00760                 m_selEnd   = m_currentAddress;
00761                 if(m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW)
00762                     m_selEnd++;
00763                 RedrawWindow();
00764                 break;
00765             }
00766             else
00767                 SetSel(-1, -1);
00768             Move(0,1);
00769             break;
00770         case VK_UP:
00771             if(bShift)
00772             {
00773                 if(!IsSelected())
00774                 {
00775                     m_selStart = m_currentAddress;
00776                 }
00777                 Move(0,-1);
00778                 m_selEnd   = m_currentAddress;
00779                 RedrawWindow();
00780                 break;
00781             }
00782             else
00783                 SetSel(-1, -1);
00784             Move(0,-1);
00785             break;
00786         case VK_LEFT:
00787             if(bShift)
00788             {
00789                 if(!IsSelected())
00790                 {
00791                     m_selStart = m_currentAddress;
00792                 }
00793                 Move(-1,0);
00794                 m_selEnd   = m_currentAddress;
00795                 RedrawWindow();
00796                 break;
00797             }
00798             else
00799                 SetSel(-1, -1);
00800             Move(-1,0);
00801             break;
00802         case VK_RIGHT:
00803             if(bShift)
00804             {
00805                 if(!IsSelected())
00806                 {
00807                     m_selStart = m_currentAddress;
00808                 }
00809                 Move(1,0);
00810                 m_selEnd   = m_currentAddress;
00811                 if(m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW)
00812                     m_selEnd++;
00813                 RedrawWindow();
00814                 break;
00815             }
00816             else
00817                 SetSel(-1, -1);
00818             Move(1,0);
00819             break;
00820         case VK_PRIOR:
00821             if(bShift)
00822             {
00823                 if(!IsSelected())
00824                 {
00825                     m_selStart = m_currentAddress;
00826                 }
00827                 OnVScroll(SB_PAGEUP, 0, NULL);
00828                 Move(0,0);
00829                 m_selEnd   = m_currentAddress;
00830                 RedrawWindow();
00831                 break;
00832             }
00833             else
00834                 SetSel(-1, -1);
00835             OnVScroll(SB_PAGEUP, 0, NULL);
00836             Move(0,0);
00837             break;
00838         case VK_NEXT:
00839             if(bShift)
00840             {
00841                 if(!IsSelected())
00842                 {
00843                     m_selStart = m_currentAddress;
00844                 }
00845                 OnVScroll(SB_PAGEDOWN, 0, NULL);
00846                 Move(0,0);
00847                 m_selEnd   = m_currentAddress;
00848                 RedrawWindow();
00849                 break;
00850             }
00851             else
00852                 SetSel(-1, -1);
00853             OnVScroll(SB_PAGEDOWN, 0, NULL);
00854             Move(0,0);
00855             break;
00856         case VK_HOME:
00857             if(bShift)
00858             {
00859                 if(!IsSelected())
00860                 {
00861                     m_selStart = m_currentAddress;
00862                 }
00863                 if(GetKeyState(VK_CONTROL) & 0x80000000)
00864                 {
00865                     OnVScroll(SB_THUMBTRACK, 0, NULL);
00866                     Move(0,0);
00867                 }
00868                 else
00869                 {
00870                     m_currentAddress /= m_bpr;
00871                     m_currentAddress *= m_bpr;
00872                     Move(0,0);
00873                 }
00874                 m_selEnd   = m_currentAddress;
00875                 RedrawWindow();
00876                 break;
00877             }
00878             else
00879                 SetSel(-1, -1);
00880             if(GetKeyState(VK_CONTROL) & 0x80000000)
00881             {
00882                 OnVScroll(SB_THUMBTRACK, 0, NULL);
00883                 m_currentAddress = 0;
00884                 Move(0,0);
00885             }
00886             else
00887             {
00888                 m_currentAddress /= m_bpr;
00889                 m_currentAddress *= m_bpr;
00890                 Move(0,0);
00891             }
00892             break;
00893         case VK_END:
00894             if(bShift)
00895             {
00896                 if(!IsSelected())
00897                 {
00898                     m_selStart = m_currentAddress;
00899                 }
00900                 if(GetKeyState(VK_CONTROL) & 0x80000000)
00901                 {
00902                     m_currentAddress = m_length-1;
00903                     OnVScroll(SB_THUMBTRACK, ((m_length+(m_bpr/2)) / m_bpr) - m_lpp, NULL);
00904                     Move(0,0);
00905                 }
00906                 else
00907                 {
00908                     m_currentAddress /= m_bpr;
00909                     m_currentAddress *= m_bpr;
00910                     m_currentAddress += m_bpr - 1;
00911                     if(m_currentAddress > m_length)
00912                         m_currentAddress = m_length-1;
00913                     Move(0,0);
00914                 }
00915                 m_selEnd   = m_currentAddress;
00916                 RedrawWindow();
00917                 break;
00918             }
00919             else
00920                 SetSel(-1, -1);
00921             if(GetKeyState(VK_CONTROL) & 0x80000000)
00922             {
00923                 m_currentAddress = m_length-1;
00924                 if(m_bHalfPage)
00925                     OnVScroll(SB_THUMBTRACK, 0, NULL);
00926                 else
00927                     OnVScroll(SB_THUMBTRACK, ((m_length+(m_bpr/2)) / m_bpr) - m_lpp, NULL);
00928                 Move(0,0);
00929             }
00930             else
00931             {
00932                 m_currentAddress /= m_bpr;
00933                 m_currentAddress *= m_bpr;
00934                 m_currentAddress += m_bpr - 1;
00935                 if(m_currentAddress > m_length)
00936                     m_currentAddress = m_length-1;
00937                 Move(0,0);
00938             }
00939             break;
00940         case VK_INSERT:
00941             SelInsert(m_currentAddress, max(1, m_selEnd-m_selStart));
00942             RedrawWindow();
00943             break;
00944         case VK_DELETE:
00945             if(IsSelected())
00946             {
00947                 OnEditClear();
00948             }
00949             else
00950             {
00951                 SelDelete(m_currentAddress, m_currentAddress+1);
00952                 RedrawWindow();
00953             }
00954             break;
00955         case '\t':
00956             switch(m_currentMode)
00957             {
00958                 case EDIT_NONE:
00959                     m_currentMode = EDIT_HIGH;
00960                     break;
00961                 case EDIT_HIGH:
00962                 case EDIT_LOW:
00963                     m_currentMode = EDIT_ASCII;
00964                     break;
00965                 case EDIT_ASCII:
00966                     m_currentMode = EDIT_HIGH;
00967                     break;
00968             }
00969             Move(0,0);
00970             break;
00971
00972     }
00973     m_bNoAddressChange = bac;
00974 }

Here is the call graph for this function:

void CCJHexEdit::OnKillFocus ( CWnd * pNewWnd ) [protected]

Definition at line 392 of file CJHexEdit.cpp.

00393 {
00394     DestroyCaret();
00395     CWnd::OnKillFocus(pNewWnd);
00396 }

void CCJHexEdit::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 1329 of file CJHexEdit.cpp.

01330 {
01331     UNUSED_ALWAYS(nFlags);
01332     UNUSED_ALWAYS(point);
01333 }

void CCJHexEdit::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 483 of file CJHexEdit.cpp.

References CalcPos(), CreateAddressCaret(), CreateEditCaret(), EDIT_HIGH, EDIT_LOW, IsSelected(), m_bShowAddress, m_currentAddress, m_currentMode, m_editPos, m_lineHeight, m_nullWidth, m_pData, m_selEnd, and m_selStart.

00484 {
00485     SetFocus();
00486     if(!m_pData)
00487         return;
00488
00489     if(nFlags & MK_SHIFT)
00490     {
00491         m_selStart = m_currentAddress;
00492     }
00493     CPoint pt = CalcPos(point.x, point.y);
00494     if(pt.x > -1)
00495     {
00496         m_editPos = pt;
00497         pt.x *= m_nullWidth;
00498         pt.y *= m_lineHeight;
00499
00500         if(pt.x == 0 && m_bShowAddress)
00501             CreateAddressCaret();
00502         else
00503             CreateEditCaret();
00504
00505         SetCaretPos(pt);
00506         if(nFlags & MK_SHIFT)
00507         {
00508             m_selEnd = m_currentAddress;
00509             if(m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW)
00510                 m_selEnd++;
00511             RedrawWindow();
00512         }
00513     }
00514     if(!(nFlags & MK_SHIFT))
00515     {
00516         if(::DragDetect(this->m_hWnd, point))
00517         {
00518             m_selStart = m_currentAddress;
00519             m_selEnd   = m_selStart;
00520             SetCapture();
00521         }
00522         else
00523         {
00524             BOOL bsel = m_selStart != 0xffffffff;
00525
00526             m_selStart = 0xffffffff;
00527             m_selEnd   = 0xffffffff;
00528             if(bsel)
00529                 RedrawWindow();
00530         }
00531     }
00532     if(!IsSelected())
00533     {
00534         ShowCaret();
00535     }
00536 }

Here is the call graph for this function:

void CCJHexEdit::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 662 of file CJHexEdit.cpp.

References IsSelected().

00663 {
00664     if(IsSelected()) {
00665         ReleaseCapture();
00666     }
00667
00668     CWnd::OnLButtonUp(nFlags, point);
00669 }

Here is the call graph for this function:

void CCJHexEdit::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 592 of file CJHexEdit.cpp.

References CalcPos(), EDIT_HIGH, EDIT_LOW, IsSelected(), m_currentAddress, m_currentMode, m_pData, m_selEnd, m_selStart, NULL, and OnVScroll().

00593 {
00594     if(!m_pData) {
00595         return;
00596     }
00597
00598     if(nFlags & MK_LBUTTON && m_selStart != 0xffffffff)
00599     {
00600         CRect rc;
00601         GetClientRect(&rc);
00602         if(!rc.PtInRect(point))
00603         {
00604             if(point.y < 0)
00605             {
00606                 OnVScroll(SB_LINEUP, 0, NULL);
00607                 point.y = 0;
00608             }
00609             else if(point.y > rc.Height())
00610             {
00611                 OnVScroll(SB_LINEDOWN, 0, NULL);
00612                 point.y = rc.Height() -1;
00613             }
00614         }
00615
00616         //
00617         // we are selecting
00618         //
00619         int  seo = m_selEnd;
00620         CPoint pt = CalcPos(point.x, point.y);
00621         if(pt.x > -1)
00622         {
00623             m_selEnd = m_currentAddress;
00624             if(m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW)
00625                 m_selEnd++;
00626         }
00627         if(IsSelected())
00628             DestroyCaret();
00629
00630         if(seo != m_selEnd)
00631             RedrawWindow();
00632     }
00633 }

Here is the call graph for this function:

void CCJHexEdit::OnPaint ( ) [protected]

Definition at line 116 of file CJHexEdit.cpp.

References TOHEX.

00117 {
00118     CPaintDC dc(this); // device context for painting
00119
00120     // KStowell - Get the client rect.
00121     CRect rcClient;
00122     GetClientRect( &rcClient );
00123
00124     // KStowell - Create a memory device-context. This is done to help reduce
00125     // screen flicker, since we will paint the entire control to the
00126     // off screen device context first.
00127     CDC memDC;
00128     CBitmap bitmap;
00129     memDC.CreateCompatibleDC(&dc);
00130     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00131     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00132
00133     // KStowell - Repaint the background.
00134     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00135
00136     ASSERT(m_currentAddress >= 0);
00137     ASSERT(m_topindex >= 0);
00138
00139     CFont* pOldFont = memDC.SelectObject(&m_Font);
00140     int     height      = 0;
00141     int     x,y;
00142     TCHAR   buf[256];
00143
00144     x = rcClient.TopLeft().x;
00145     y = rcClient.TopLeft().y;
00146
00147     memDC.SetBoundsRect(&rcClient, DCB_DISABLE);
00148
00149     if(m_pData)
00150     {
00151         //
00152         // get char dimensions
00153         //
00154         if(m_bUpdate)
00155         {
00156             memDC.GetCharWidth('0', '0', &m_nullWidth);
00157             CSize sz = memDC.GetTextExtent(_T("0"), 1);
00158             m_lineHeight = sz.cy;
00159
00160             m_offHex    = m_bShowAddress ? (m_bAddressIsWide ? m_nullWidth * 9 : m_nullWidth * 5) : 0;
00161             m_offAscii  = m_bShowAddress ? (m_bAddressIsWide ? m_nullWidth * 9 : m_nullWidth * 5) : 0;
00162             m_offAscii += m_bShowHex     ? (m_bpr * 3 * m_nullWidth) : 0;
00163
00164             m_lpp = rcClient.Height() / m_lineHeight;
00165             m_bHalfPage = FALSE;
00166             if(m_lpp * m_bpr > m_length)
00167             {
00168                 m_lpp = (m_length + (m_bpr/2)) / m_bpr ;
00169                 if(m_length % m_bpr != 0)
00170                 {
00171                     m_bHalfPage = TRUE;
00172                     m_lpp++;
00173                 }
00174             }
00175             m_bUpdate = FALSE;
00176             UpdateScrollbars();
00177         }
00178
00179         height = rcClient.Height() / m_lineHeight;
00180         height *= m_lineHeight;
00181
00182         if(m_bShowAddress)
00183         {
00184             TCHAR fmt[8] = {'%','0','8','l','X'};
00185             fmt[2] = m_bAddressIsWide ? '8' : '4';
00186             int w = m_bAddressIsWide ? 8 : 4;
00187             y = 0;
00188             CRect rcd = rcClient;
00189             rcd.TopLeft().x = m_offAddress;
00190             for(int  i = m_topindex; (i < m_length) && (rcd.TopLeft().y < height); i+= m_bpr)
00191             {
00192                 _stprintf(buf, fmt, i);
00193                 memDC.DrawText(buf, w, rcd, DT_LEFT|DT_TOP|DT_SINGLELINE|DT_NOPREFIX);
00194                 rcd.TopLeft().y += m_lineHeight;
00195             }
00196         }
00197         if(m_bShowHex)
00198         {
00199             y = 0;
00200             CRect rcd = rcClient;
00201             rcd.TopLeft().x = x = m_offHex;
00202
00203             if(m_selStart != 0xffffffff && (m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW))
00204             {
00205                 int  i;
00206                 int  n = 0;
00207                 int  selStart = m_selStart, selEnd = m_selEnd;
00208                 if(selStart > selEnd)
00209                     selStart ^= selEnd ^= selStart ^= selEnd;
00210
00211                 for(i = m_topindex; (i < selStart) && (y < height); i++)
00212                 {
00213                     LPTSTR p = &buf[0];
00214
00215                     TOHEX(m_pData[i], p);
00216
00217                     *p++ = ' ';
00218                     memDC.TextOut(x, y, buf, 3);
00219                     x += m_nullWidth * 3;
00220                     n++;
00221                     if(n == m_bpr)
00222                     {
00223                         n = 0;
00224                         x = m_offHex;
00225                         y += m_lineHeight;
00226                     }
00227                 }
00228
00229                 memDC.SetTextColor(GetSysColor(COLOR_HIGHLIGHTTEXT));
00230                 memDC.SetBkColor(GetSysColor(COLOR_HIGHLIGHT));
00231                 for(; (i < selEnd) && (i < m_length) && (y < height); i++)
00232                 {
00233                     LPTSTR p = &buf[0];
00234
00235                     TOHEX(m_pData[i], p);
00236
00237                     *p++ = ' ';
00238                     memDC.TextOut(x, y, buf, 3);
00239                     x += m_nullWidth * 3;
00240                     n++;
00241                     if(n == m_bpr)
00242                     {
00243                         n = 0;
00244                         x = m_offHex;
00245                         y += m_lineHeight;
00246                     }
00247                 }
00248                 memDC.SetTextColor(GetSysColor(COLOR_WINDOWTEXT));
00249                 memDC.SetBkColor(GetSysColor(COLOR_WINDOW));
00250                 for(; (i < m_length) && (y < height); i++)
00251                 {
00252                     LPTSTR p = &buf[0];
00253
00254                     TOHEX(m_pData[i], p);
00255
00256                     *p++ = ' ';
00257                     memDC.TextOut(x, y, buf, 3);
00258                     x += m_nullWidth * 3;
00259                     n++;
00260                     if(n == m_bpr)
00261                     {
00262                         n = 0;
00263                         x = m_offHex;
00264                         y += m_lineHeight;
00265                     }
00266                 }
00267             }
00268             else
00269             {
00270                 for(int  i = m_topindex; (i < m_length) && (rcd.TopLeft().y < height);)
00271                 {
00272                     LPTSTR p = &buf[0];
00273
00274                     for(int  n = 0; (n < m_bpr) && (i < m_length); n++)
00275                     {
00276                         TOHEX(m_pData[i], p);
00277                         *p++ = ' ';
00278                         i++;
00279                     }
00280
00281                     while(n < m_bpr)
00282                     {
00283                         *p++ = ' '; *p++ = ' '; *p++ = ' ';
00284                         n++;
00285                     }
00286
00287                     memDC.DrawText(buf, m_bpr*3, rcd, DT_LEFT|DT_TOP|DT_SINGLELINE|DT_NOPREFIX);
00288                     rcd.TopLeft().y += m_lineHeight;
00289                 }
00290             }
00291         }
00292         if(m_bShowAscii)
00293         {
00294             y = 0;
00295             CRect rcd = rcClient;
00296             rcd.TopLeft().x = x = m_offAscii;
00297             if(m_selStart != 0xffffffff && m_currentMode == EDIT_ASCII)
00298             {
00299                 int  i;
00300                 int  n = 0;
00301                 int  selStart = m_selStart, selEnd = m_selEnd;
00302                 if(selStart > selEnd)
00303                     selStart ^= selEnd ^= selStart ^= selEnd;
00304
00305                 for(i = m_topindex; (i < selStart) && (y < height); i++)
00306                 {
00307                     buf[0] = isprint(m_pData[i]) ? m_pData[i] : '.';
00308                     memDC.TextOut(x, y, buf, 1);
00309                     x += m_nullWidth;
00310                     n++;
00311                     if(n == m_bpr)
00312                     {
00313                         n = 0;
00314                         x = m_offAscii;
00315                         y += m_lineHeight;
00316                     }
00317                 }
00318                 memDC.SetTextColor(GetSysColor(COLOR_HIGHLIGHTTEXT));
00319                 memDC.SetBkColor(GetSysColor(COLOR_HIGHLIGHT));
00320                 for(; (i < selEnd) && (y < height); i++)
00321                 {
00322                     buf[0] = isprint(m_pData[i]) ? m_pData[i] : '.';
00323                     memDC.TextOut(x, y, buf, 1);
00324                     x += m_nullWidth;
00325                     n++;
00326                     if(n == m_bpr)
00327                     {
00328                         n = 0;
00329                         x = m_offAscii;
00330                         y += m_lineHeight;
00331                     }
00332                 }
00333                 memDC.SetTextColor(GetSysColor(COLOR_WINDOWTEXT));
00334                 memDC.SetBkColor(GetSysColor(COLOR_WINDOW));
00335                 for(; (i < m_length) && y < height; i++)
00336                 {
00337                     buf[0] = isprint(m_pData[i]) ? m_pData[i] : '.';
00338                     memDC.TextOut(x, y, buf, 1);
00339                     x += m_nullWidth;
00340                     n++;
00341                     if(n == m_bpr)
00342                     {
00343                         n = 0;
00344                         x = m_offAscii;
00345                         y += m_lineHeight;
00346                     }
00347                 }
00348             }
00349             else
00350             {
00351                 for(int  i = m_topindex; (i < m_length) && (rcd.TopLeft().y < height);)
00352                 {
00353                     LPTSTR p = &buf[0];
00354
00355                     for(int  n = 0; (n < m_bpr) && (i < m_length); n++)
00356                     {
00357                         *p++ = isprint(m_pData[i]) ? m_pData[i] : '.';
00358                         i++;
00359                     }
00360
00361                     memDC.DrawText(buf, n, rcd, DT_LEFT|DT_TOP|DT_SINGLELINE|DT_NOPREFIX);
00362                     rcd.TopLeft().y += m_lineHeight;
00363                 }
00364             }
00365         }
00366     }
00367
00368     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00369     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00370
00371     // KStowell - Cleanup resources.
00372     memDC.SelectObject(pOldBitmap);
00373     memDC.SelectObject(pOldFont);
00374     memDC.DeleteDC();
00375     bitmap.DeleteObject();
00376 }

void CCJHexEdit::OnSetFocus ( CWnd * pOldWnd ) [protected]

Definition at line 378 of file CJHexEdit.cpp.

References CreateAddressCaret(), CreateEditCaret(), IsSelected(), m_bShowAddress, m_editPos, and m_pData.

00379 {
00380     if(m_pData && !IsSelected())
00381     {
00382         if(m_editPos.x == 0 && m_bShowAddress)
00383             CreateAddressCaret();
00384         else
00385             CreateEditCaret();
00386         SetCaretPos(m_editPos);
00387         ShowCaret();
00388     }
00389     CWnd::OnSetFocus(pOldWnd);
00390 }

Here is the call graph for this function:

void CCJHexEdit::OnVScroll | ( | UINT | nSBCode,
 |  | UINT | nPos,
 |  | CScrollBar * | pScrollBar
 | ) | [protected]

Definition at line 398 of file CJHexEdit.cpp.

References m_bNoAddressChange, m_bpr, m_currentAddress, m_length, m_lpp, m_pData, m_topindex, and RepositionCaret().

Referenced by Move(), OnKeyDown(), and OnMouseMove().

00399 {
00400     UNUSED_ALWAYS(pScrollBar);
00401
00402     if(!m_pData) {
00403         return;
00404     }
00405
00406     int oa = m_topindex;
00407     switch(nSBCode)
00408     {
00409         case SB_LINEDOWN:
00410             if(m_topindex < m_length - m_lpp*m_bpr)
00411             {
00412                 m_topindex += m_bpr;
00413                 RedrawWindow();
00414             }
00415             break;
00416
00417         case SB_LINEUP:
00418             if(m_topindex > 0)
00419             {
00420                 m_topindex -= m_bpr;
00421                 RedrawWindow();
00422             }
00423             break;
00424
00425         case SB_PAGEDOWN:
00426             if(m_topindex < m_length - m_lpp*m_bpr)
00427             {
00428                 m_topindex += m_bpr * m_lpp;
00429                 if(m_topindex > m_length - m_lpp*m_bpr)
00430                     m_topindex = m_length - m_lpp*m_bpr;
00431                 RedrawWindow();
00432             }
00433             break;
00434
00435         case SB_PAGEUP:
00436             if(m_topindex > 0)
00437             {
00438                 m_topindex -= m_bpr * m_lpp;
00439                 if(m_topindex < 0)
00440                     m_topindex = 0;
00441                 RedrawWindow();
00442             }
00443             break;
00444
00445         case SB_THUMBTRACK:
00446             m_topindex = nPos * m_bpr;
00447             RedrawWindow();
00448             break;
00449     }
00450     ::SetScrollPos(this->m_hWnd, SB_VERT, m_topindex / m_bpr, TRUE);
00451     if(!m_bNoAddressChange)
00452         m_currentAddress += (m_topindex - oa);
00453     RepositionCaret(m_currentAddress);
00454 }

Here is the call graph for this function:

BOOL CCJHexEdit::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 456 of file CJHexEdit.cpp.

00457 {
00458     if(!CEdit::PreCreateWindow(cs)) {
00459         return FALSE;
00460     }
00461
00462     cs.style |= WS_HSCROLL|WS_VSCROLL;
00463     return TRUE;
00464 }

void CCJHexEdit::RepositionCaret ( int p ) [protected, virtual]

Definition at line 1039 of file CJHexEdit.cpp.

References CreateAddressCaret(), CreateEditCaret(), EDIT_ASCII, EDIT_HIGH, EDIT_LOW, EDIT_NONE, m_bpr, m_currentMode, m_editPos, m_lineHeight, m_nullWidth, m_offAscii, m_offHex, and m_topindex.

Referenced by Move(), OnChar(), OnEditClear(), OnVScroll(), and SelDelete().

01040 {
01041     int x, y;
01042
01043     y = (p - m_topindex) / m_bpr;
01044     x = (p - m_topindex) % m_bpr;
01045
01046     switch(m_currentMode)
01047     {
01048         case EDIT_NONE:
01049             CreateAddressCaret();
01050             x = 0;
01051             break;
01052         case EDIT_HIGH:
01053             CreateEditCaret();
01054             x *= m_nullWidth*3;
01055             x += m_offHex;
01056             break;
01057         case EDIT_LOW:
01058             CreateEditCaret();
01059             x *= m_nullWidth*3;
01060             x += m_nullWidth;
01061             x += m_offHex;
01062             break;
01063         case EDIT_ASCII:
01064             CreateEditCaret();
01065             x *= m_nullWidth;
01066             x += m_offAscii;
01067             break;
01068     }
01069     m_editPos.x = x;
01070     m_editPos.y = y*m_lineHeight;
01071     CRect rc;
01072     GetClientRect(&rc);
01073     if(rc.PtInRect(m_editPos))
01074     {
01075         SetCaretPos(m_editPos);
01076         ShowCaret();
01077     }
01078 }

Here is the call graph for this function:

void CCJHexEdit::ScrollIntoView ( int p ) [protected, virtual]

Definition at line 1080 of file CJHexEdit.cpp.

References m_bpr, m_lpp, m_topindex, and UpdateScrollbars().

01081 {
01082     if(p < m_topindex || p > m_topindex + m_lpp*m_bpr)
01083     {
01084         m_topindex = (p/m_bpr) * m_bpr;
01085         m_topindex -= (m_lpp / 3) * m_bpr;
01086         if(m_topindex < 0)
01087             m_topindex = 0;
01088
01089         UpdateScrollbars();
01090         RedrawWindow();
01091     }
01092 }

Here is the call graph for this function:

void CCJHexEdit::SelDelete | ( | int | s,
 |  | int | e
 | ) | [protected, virtual]

Definition at line 1275 of file CJHexEdit.cpp.

References free, m_bUpdate, m_currentAddress, m_length, m_pData, malloc, RepositionCaret(), and SetSel().

Referenced by OnChar(), OnEditClear(), OnEditCut(), OnEditPaste(), and OnKeyDown().

01276 {
01277     LPBYTE p = (LPBYTE) malloc(m_length - (e-s)+1);
01278     memcpy(p, m_pData, s);
01279     if(s < m_length-(e-s))
01280         memcpy(p+s, m_pData+e, (m_length -e));
01281
01282     free(m_pData);
01283     SetSel(-1, -1);
01284     m_pData = p;
01285     m_length = m_length-(e-s);
01286     if(m_currentAddress > m_length)
01287     {
01288         m_currentAddress = m_length;
01289         RepositionCaret(m_currentAddress);
01290     }
01291     m_bUpdate = TRUE;
01292 }

Here is the call graph for this function:

void CCJHexEdit::SelInsert | ( | int | s,
 |  | int | l
 | ) | [protected, virtual]

Definition at line 1294 of file CJHexEdit.cpp.

References calloc, free, m_bUpdate, m_length, m_pData, and SetSel().

Referenced by OnEditPaste(), and OnKeyDown().

01295 {
01296     LPBYTE p = (LPBYTE) calloc(m_length + l, 1);
01297     memcpy(p, m_pData, s);
01298     memcpy(p+s+l, m_pData+s, (m_length-s));
01299     free(m_pData);
01300     SetSel(-1, -1);
01301     m_pData = p;
01302     m_length = m_length+l;
01303     m_bUpdate = TRUE;
01304 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJHexEdit::SetBPR ( int bpr ) [virtual]

Definition at line 144 of file CJHexEdit.h.

References _CJXLIB_INLINE, m_bpr, and m_bUpdate.

00145     { m_bpr = bpr; m_bUpdate = TRUE; }

void CCJHexEdit::SetData | ( | LPBYTE | p,
 |  | int | len
 | ) | [virtual]

Definition at line 1306 of file CJHexEdit.cpp.

References EDIT_HIGH, free, m_bUpdate, m_currentAddress, m_currentMode, m_editPos, m_length, m_pData, m_topindex, malloc, and SetSel().

01307 {
01308     free(m_pData);
01309
01310     m_pData = (LPBYTE) malloc(len);
01311     memcpy(m_pData, p, len);
01312
01313     SetSel(-1, -1);
01314     m_length = len;
01315     m_currentAddress = 0;
01316     m_editPos.x = m_editPos.y = 0;
01317     m_currentMode = EDIT_HIGH;
01318     m_topindex = 0;
01319     m_bUpdate = TRUE;
01320 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJHexEdit::SetOptions | ( | BOOL | a,
 |  | BOOL | h,
 |  | BOOL | c,
 |  | BOOL | w
 | ) | [virtual]

Definition at line 141 of file CJHexEdit.h.

References _CJXLIB_INLINE, m_bAddressIsWide, m_bShowAddress, m_bShowAscii, m_bShowHex, and m_bUpdate.

00142     { m_bShowHex = h; m_bShowAscii = c; m_bShowAddress = a; m_bAddressIsWide = w; m_bUpdate = TRUE; }

void CCJHexEdit::SetSel | ( | int | s,
 |  | int | e
 | ) | [virtual]

Definition at line 1025 of file CJHexEdit.cpp.

References CreateAddressCaret(), CreateEditCaret(), m_bShowAddress, m_editPos, m_selEnd, and m_selStart.

Referenced by OnChar(), OnEditPaste(), OnKeyDown(), SelDelete(), SelInsert(), and SetData().

01026 {
01027     DestroyCaret();
01028     m_selStart = s;
01029     m_selEnd = e;
01030     RedrawWindow();
01031     if(m_editPos.x == 0 && m_bShowAddress)
01032         CreateAddressCaret();
01033     else
01034         CreateEditCaret();
01035     SetCaretPos(m_editPos);
01036     ShowCaret();
01037 }

Here is the call graph for this function:

void CCJHexEdit::UpdateScrollbars ( void ) [protected, virtual]

Definition at line 635 of file CJHexEdit.cpp.

References m_bAddressIsWide, m_bpr, m_bShowAddress, m_bShowAscii, m_bShowHex, m_length, m_lpp, m_nullWidth, and m_topindex.

Referenced by ScrollIntoView().

00636 {
00637     SCROLLINFO si;
00638
00639     si.cbSize = sizeof(SCROLLINFO);
00640     si.fMask = SIF_ALL;
00641     si.nMin = 0;
00642     si.nMax = (m_length / m_bpr) - 1;
00643     si.nPage = m_lpp;
00644     si.nPos = m_topindex / m_bpr;
00645
00646     ::SetScrollInfo(this->m_hWnd, SB_VERT, &si, TRUE);
00647     if(si.nMax > (int)si.nPage)
00648         ::EnableScrollBar(this->m_hWnd, SB_VERT, ESB_ENABLE_BOTH);
00649
00650     CRect rc;
00651     GetClientRect(&rc);
00652
00653     si.nMin = 0;
00654     si.nMax =((m_bShowAddress ? (m_bAddressIsWide ? 8 : 4) : 0) +
00655               (m_bShowHex ? m_bpr * 3 : 0) +
00656               (m_bShowAscii ? m_bpr : 0) ) * m_nullWidth;
00657     si.nPage = 1;
00658     si.nPos = 0;
00659     ::SetScrollInfo(this->m_hWnd, SB_HORZ, &si, TRUE);
00660 }

Member Data Documentation

BOOL CCJHexEdit::m_bAddressIsWide

Definition at line 58 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), CreateAddressCaret(), SetOptions(), and UpdateScrollbars().

BOOL CCJHexEdit::m_bHalfPage

Definition at line 60 of file CJHexEdit.h.

Referenced by CCJHexEdit(), and OnKeyDown().

BOOL CCJHexEdit::m_bNoAddressChange

Definition at line 59 of file CJHexEdit.h.

Referenced by CCJHexEdit(), Move(), OnKeyDown(), and OnVScroll().

int CCJHexEdit::m_bpr

Definition at line 53 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), Move(), OnKeyDown(), OnVScroll(), RepositionCaret(), ScrollIntoView(), SetBPR(), and UpdateScrollbars().

BOOL CCJHexEdit::m_bShowAddress

Definition at line 55 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), OnLButtonDown(), OnSetFocus(), SetOptions(), SetSel(), and UpdateScrollbars().

BOOL CCJHexEdit::m_bShowAscii

Definition at line 56 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), SetOptions(), and UpdateScrollbars().

BOOL CCJHexEdit::m_bShowHex

Definition at line 57 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), SetOptions(), and UpdateScrollbars().

BOOL CCJHexEdit::m_bUpdate

Definition at line 64 of file CJHexEdit.h.

Referenced by CCJHexEdit(), SelDelete(), SelInsert(), SetBPR(), SetData(), and SetOptions().

int CCJHexEdit::m_currentAddress

Definition at line 49 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), Move(), OnChar(), OnEditClear(), OnEditPaste(), OnKeyDown(), OnLButtonDown(), OnMouseMove(), OnVScroll(), SelDelete(), and SetData().

EDITMODE CCJHexEdit::m_currentMode

Definition at line 50 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), Move(), OnChar(), OnEditCopy(), OnEditPaste(), OnKeyDown(), OnLButtonDown(), OnMouseMove(), RepositionCaret(), and SetData().

CPoint CCJHexEdit::m_editPos

Definition at line 68 of file CJHexEdit.h.

Referenced by CCJHexEdit(), OnLButtonDown(), OnSetFocus(), RepositionCaret(), SetData(), and SetSel().

CFont CCJHexEdit::m_Font

Definition at line 61 of file CJHexEdit.h.

Referenced by CCJHexEdit(), Create(), and ~CCJHexEdit().

int CCJHexEdit::m_length

Definition at line 47 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), GetData(), Move(), OnEditSelectAll(), OnKeyDown(), OnVScroll(), SelDelete(), SelInsert(), SetData(), and UpdateScrollbars().

int CCJHexEdit::m_lineHeight

Definition at line 62 of file CJHexEdit.h.

Referenced by CalcPos(), CreateAddressCaret(), CreateEditCaret(), OnLButtonDown(), and RepositionCaret().

int CCJHexEdit::m_lpp

Definition at line 54 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), Move(), OnKeyDown(), OnVScroll(), ScrollIntoView(), and UpdateScrollbars().

int CCJHexEdit::m_nullWidth

Definition at line 63 of file CJHexEdit.h.

Referenced by CalcPos(), CreateAddressCaret(), CreateEditCaret(), OnLButtonDown(), RepositionCaret(), and UpdateScrollbars().

int CCJHexEdit::m_offAddress

Definition at line 67 of file CJHexEdit.h.

Referenced by CCJHexEdit().

int CCJHexEdit::m_offAscii

Definition at line 66 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), and RepositionCaret().

int CCJHexEdit::m_offHex

Definition at line 65 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), and RepositionCaret().

LPBYTE CCJHexEdit::m_pData

Definition at line 46 of file CJHexEdit.h.

Referenced by CCJHexEdit(), GetData(), OnChar(), OnEditCopy(), OnEditPaste(), OnLButtonDown(), OnMouseMove(), OnSetFocus(), OnVScroll(), SelDelete(), SelInsert(), and SetData().

int CCJHexEdit::m_selEnd

Definition at line 52 of file CJHexEdit.h.

Referenced by CCJHexEdit(), GetSel(), NormalizeSel(), OnEditClear(), OnEditCopy(), OnEditCut(), OnEditPaste(), OnEditSelectAll(), OnKeyDown(), OnLButtonDown(), OnMouseMove(), and SetSel().

int CCJHexEdit::m_selStart

Definition at line 51 of file CJHexEdit.h.

Referenced by CCJHexEdit(), GetSel(), IsSelected(), NormalizeSel(), OnEditClear(), OnEditCopy(), OnEditCut(), OnEditPaste(), OnEditSelectAll(), OnKeyDown(), OnLButtonDown(), OnMouseMove(), and SetSel().

int CCJHexEdit::m_topindex

Definition at line 48 of file CJHexEdit.h.

Referenced by CalcPos(), CCJHexEdit(), Move(), OnVScroll(), RepositionCaret(), ScrollIntoView(), SetData(), and UpdateScrollbars().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJHexEdit.h
  • WinCvs/CJLib/CJLibrary/CJHexEdit.cpp
Generated on Sat Aug 7 22:49:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJHtmlView Class Reference

CCJHtmlView Class Reference

#include <CJHtmlView.h>

Inheritance diagram for CCJHtmlView:

[legend]
Collaboration diagram for CCJHtmlView:

[legend]
List of all members.

Public Member Functions

CString | GetType () const
long | GetLeft () const
void | SetLeft (long nNewValue)
long | GetTop () const
void | SetTop (long nNewValue)
long | GetHeight () const
void | SetHeight (long nNewValue)
void | SetVisible (BOOL bNewValue)
BOOL | GetVisible () const
CString | GetLocationName () const
READYSTATE | GetReadyState () const
BOOL | GetOffline () const
void | SetOffline (BOOL bNewValue)
BOOL | GetSilent () const
void | SetSilent (BOOL bNewValue)
BOOL | GetTopLevelContainer () const
CString | GetLocationURL () const
BOOL | GetBusy () const
LPDISPATCH | GetApplication () const
LPDISPATCH | GetParentBrowser () const
LPDISPATCH | GetContainer () const
LPDISPATCH | GetHtmlDocument () const
CString | GetFullName () const
int | GetToolBar () const
void | SetToolBar (int nNewValue)
BOOL | GetMenuBar () const
void | SetMenuBar (BOOL bNewValue)
BOOL | GetFullScreen () const
void | SetFullScreen (BOOL bNewValue)
OLECMDF | QueryStatusWB (OLECMDID cmdID) const
BOOL | GetRegisterAsBrowser () const
void | SetRegisterAsBrowser (BOOL bNewValue)
BOOL | GetRegisterAsDropTarget () const
void | SetRegisterAsDropTarget (BOOL bNewValue)
BOOL | GetTheaterMode () const
void | SetTheaterMode (BOOL bNewValue)
BOOL | GetAddressBar () const
void | SetAddressBar (BOOL bNewValue)
BOOL | GetStatusBar () const
void | SetStatusBar (BOOL bNewValue)
void | GoBack ()
void | GoForward ()
void | GoHome ()
void | GoSearch ()
void | Navigate (LPCTSTR URL, DWORD dwFlags=0, LPCTSTR lpszTargetFrameName=NULL, LPCTSTR lpszHeaders=NULL, LPVOID lpvPostData=NULL, DWORD dwPostDataLen=0)
void | Navigate2 (LPITEMIDLIST pIDL, DWORD dwFlags=0, LPCTSTR lpszTargetFrameName=NULL)
void | Navigate2 (LPCTSTR lpszURL, DWORD dwFlags=0, LPCTSTR lpszTargetFrameName=NULL, LPCTSTR lpszHeaders=NULL, LPVOID lpvPostData=NULL, DWORD dwPostDataLen=0)
void | Navigate2 (LPCTSTR lpszURL, DWORD dwFlags, CByteArray &baPostedData, LPCTSTR lpszTargetFrameName=NULL, LPCTSTR lpszHeader=NULL)
void | Refresh ()
void | Refresh2 (int nLevel)
void | Stop ()
void | PutProperty (LPCTSTR lpszProperty, const VARIANT &vtValue)
void | PutProperty (LPCTSTR lpszPropertyName, double dValue)
void | PutProperty (LPCTSTR lpszPropertyName, LPCTSTR lpszValue)
void | PutProperty (LPCTSTR lpszPropertyName, long lValue)
void | PutProperty (LPCTSTR lpszPropertyName, short nValue)
BOOL | GetProperty (LPCTSTR lpszProperty, CString &strValue)
COleVariant | GetProperty (LPCTSTR lpszProperty)
void | ExecWB (OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
BOOL | LoadFromResource (LPCTSTR lpszResource)
BOOL | LoadFromResource (UINT nRes)
virtual void | OnDraw (CDC *pDC)
virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)
virtual void | OnNavigateComplete2 (LPCTSTR strURL)
virtual void | OnBeforeNavigate2 (LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray &baPostedData, LPCTSTR lpszHeaders, BOOL *pbCancel)
virtual void | OnStatusTextChange (LPCTSTR lpszText)
virtual void | OnProgressChange (long nProgress, long nProgressMax)
virtual void | OnCommandStateChange (long nCommand, BOOL bEnable)
virtual void | OnDownloadBegin ()
virtual void | OnDownloadComplete ()
virtual void | OnTitleChange (LPCTSTR lpszText)
virtual void | OnPropertyChange (LPCTSTR lpszProperty)
virtual void | OnNewWindow2 (LPDISPATCH *ppDisp, BOOL *Cancel)
virtual void | OnDocumentComplete (LPCTSTR lpszURL)
virtual void | OnQuit ()
virtual void | OnVisible (BOOL bVisible)
virtual void | OnToolBar (BOOL bToolBar)
virtual void | OnMenuBar (BOOL bMenuBar)
virtual void | OnStatusBar (BOOL bStatusBar)
virtual void | OnFullScreen (BOOL bFullScreen)
virtual void | OnTheaterMode (BOOL bTheaterMode)

Public Attributes

CWnd | m_wndBrowser

Protected Member Functions

CCJHtmlView ()
virtual | ~CCJHtmlView ()
virtual void | NavigateComplete2 (LPDISPATCH pDisp, VARIANT *URL)
virtual void | BeforeNavigate2 (LPDISPATCH pDisp, VARIANT *URL, VARIANT *Flags, VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers, BOOL *Cancel)
virtual void | DocumentComplete (LPDISPATCH pDisp, VARIANT *URL)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnPaint ()
afx_msg void | OnDestroy ()
afx_msg void | OnFilePrint ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Protected Attributes

IWebBrowser2 * | m_pBrowserApp

Constructor & Destructor Documentation

CCJHtmlView::CCJHtmlView ( ) [protected]

Definition at line 123 of file CJHtmlView.cpp.

References NULL.

00124     : CFormView((LPCTSTR) NULL)
00125 {
00126     m_pBrowserApp = NULL;
00127 }

CCJHtmlView::~CCJHtmlView ( ) [protected, virtual]

Definition at line 129 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00130 {
00131     if (m_pBrowserApp != NULL)
00132         m_pBrowserApp->Release();
00133 }

Member Function Documentation

void CCJHtmlView::BeforeNavigate2 | ( | LPDISPATCH | pDisp,
 |  | VARIANT * | URL,
 |  | VARIANT * | Flags,
 |  | VARIANT * | TargetFrameName,
 |  | VARIANT * | PostData,
 |  | VARIANT * | Headers,
 |  | BOOL * | Cancel
 | ) | [protected, virtual]

Definition at line 733 of file CJHtmlView.cpp.

References NULL, and OnBeforeNavigate2().

00736 {
00737     ASSERT(V_VT(URL) == VT_BSTR);
00738     ASSERT(V_VT(TargetFrameName) == VT_BSTR);
00739     ASSERT(V_VT(PostData) == (VT_VARIANT | VT_BYREF));
00740     ASSERT(V_VT(Headers) == VT_BSTR);
00741     ASSERT(Cancel != NULL);
00742
00743     USES_CONVERSION;
00744
00745     VARIANT* vtPostedData = V_VARIANTREF(PostData);
00746     CByteArray array;
00747     if (V_VT(vtPostedData) & VT_ARRAY)
00748     {
00749         // must be a vector of bytes
00750         ASSERT(vtPostedData->parray->cDims == 1 && vtPostedData->parray->cbElements == 1);
00751
00752         vtPostedData->vt |= VT_UI1;
00753         COleSafeArray safe(vtPostedData);
00754
00755         DWORD dwSize = safe.GetOneDimSize();
00756         LPVOID pVoid;
00757         safe.AccessData(&pVoid);
00758
00759         array.SetSize(dwSize);
00760         LPBYTE lpByte = array.GetData();
00761
00762         memcpy(lpByte, pVoid, dwSize);
00763         safe.UnaccessData();
00764     }
00765     // make real parameters out of the notification
00766
00767     CString strTargetFrameName(V_BSTR(TargetFrameName));
00768     CString strURL = V_BSTR(URL);
00769     CString strHeaders = V_BSTR(Headers);
00770     DWORD nFlags = V_I4(Flags);
00771
00772     // notify the user's class
00773     OnBeforeNavigate2(strURL, nFlags, strTargetFrameName,
00774         array, strHeaders, Cancel);
00775 }

Here is the call graph for this function:

BOOL CCJHtmlView::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL
 | ) | [virtual]

Definition at line 220 of file CJHtmlView.cpp.

References m_pBrowserApp, m_wndBrowser, and NULL.

00223 {
00224     // create the view window itself
00225     m_pCreateContext = pContext;
00226     if (!CView::Create(lpszClassName, lpszWindowName,
00227                 dwStyle, rect, pParentWnd,  nID, pContext))
00228     {
00229         return FALSE;
00230     }
00231
00232     AfxEnableControlContainer();
00233
00234     RECT rectClient;
00235     GetClientRect(&rectClient);
00236
00237     // create the control window
00238     // AFX_IDW_PANE_FIRST is a safe but arbitrary ID
00239     if (!m_wndBrowser.CreateControl(CLSID_WebBrowser, lpszWindowName,
00240                 WS_VISIBLE | WS_CHILD, rectClient, this, AFX_IDW_PANE_FIRST))
00241     {
00242         DestroyWindow();
00243         return FALSE;
00244     }
00245
00246     LPUNKNOWN lpUnk = m_wndBrowser.GetControlUnknown();
00247     HRESULT hr = lpUnk->QueryInterface(IID_IWebBrowser2, (void**) &m_pBrowserApp);
00248     if (!SUCCEEDED(hr))
00249     {
00250         m_pBrowserApp = NULL;
00251         m_wndBrowser.DestroyWindow();
00252         DestroyWindow();
00253         return FALSE;
00254     }
00255
00256     return TRUE;
00257 }

void CCJHtmlView::DocumentComplete | ( | LPDISPATCH | pDisp,
 |  | VARIANT * | URL
 | ) | [protected, virtual]

Definition at line 777 of file CJHtmlView.cpp.

References OnDocumentComplete().

00778 {
00779     UNUSED_ALWAYS(pDisp);
00780     ASSERT(V_VT(URL) == VT_BSTR);
00781
00782     CString str(V_BSTR(URL));
00783     OnDocumentComplete(str);
00784 }

Here is the call graph for this function:

void CCJHtmlView::ExecWB | ( | OLECMDID | cmdID,
 |  | OLECMDEXECOPT | cmdexecopt,
 |  | VARIANT * | pvaIn,
 |  | VARIANT * | pvaOut
 | ) |

Definition at line 453 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00455 {
00456     ASSERT(m_pBrowserApp != NULL);
00457
00458     m_pBrowserApp->ExecWB(cmdID, cmdexecopt, pvaIn, pvaOut);
00459 }

BOOL CCJHtmlView::GetAddressBar ( ) const

Definition at line 488 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00489 {
00490     ASSERT(m_pBrowserApp != NULL);
00491
00492     VARIANT_BOOL result;
00493     m_pBrowserApp->get_AddressBar(&result);
00494     return result;
00495 }

LPDISPATCH CCJHtmlView::GetApplication ( ) const

Definition at line 371 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00372 {
00373     ASSERT(m_pBrowserApp != NULL);
00374
00375     LPDISPATCH result;
00376     m_pBrowserApp->get_Application(&result);
00377     return result;
00378 }

BOOL CCJHtmlView::GetBusy ( ) const

Definition at line 335 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00336 {
00337     ASSERT(m_pBrowserApp != NULL);
00338
00339     VARIANT_BOOL result;
00340     m_pBrowserApp->get_Busy(&result);
00341     return result;
00342 }

LPDISPATCH CCJHtmlView::GetContainer ( ) const

Definition at line 390 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00391 {
00392     ASSERT(m_pBrowserApp != NULL);
00393
00394     LPDISPATCH result;
00395     m_pBrowserApp->get_Container(&result);
00396     return result;
00397 }

CString CCJHtmlView::GetFullName ( ) const

Definition at line 710 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00711 {
00712     ASSERT(m_pBrowserApp != NULL);
00713
00714     BSTR bstr;
00715     m_pBrowserApp->get_FullName(&bstr);
00716     CString retVal(bstr);
00717     return retVal;
00718 }

BOOL CCJHtmlView::GetFullScreen ( ) const

Definition at line 426 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00427 {
00428     ASSERT(m_pBrowserApp != NULL);
00429
00430     VARIANT_BOOL result;
00431     m_pBrowserApp->get_FullScreen(&result);
00432     return result;
00433 }

long CCJHtmlView::GetHeight ( ) const

Definition at line 298 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00299 {
00300     ASSERT(m_pBrowserApp != NULL);
00301     long result;
00302     m_pBrowserApp->get_Height(&result);
00303     return result;
00304 }

LPDISPATCH CCJHtmlView::GetHtmlDocument ( ) const

Definition at line 399 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

Referenced by OnFilePrint().

00400 {
00401     ASSERT(m_pBrowserApp != NULL);
00402
00403     LPDISPATCH result;
00404     m_pBrowserApp->get_Document(&result);
00405     return result;
00406 }

long CCJHtmlView::GetLeft ( ) const

Definition at line 272 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00273 {
00274     ASSERT(m_pBrowserApp != NULL);
00275
00276     long result;
00277     m_pBrowserApp->get_Left(&result);
00278     return result;
00279 }

CString CCJHtmlView::GetLocationName ( ) const

Definition at line 315 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00316 {
00317     ASSERT(m_pBrowserApp != NULL);
00318
00319     BSTR bstr;
00320     m_pBrowserApp->get_LocationName(&bstr);
00321     CString retVal(bstr);
00322     return retVal;
00323 }

CString CCJHtmlView::GetLocationURL ( ) const

Definition at line 325 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00326 {
00327     ASSERT(m_pBrowserApp != NULL);
00328
00329     BSTR bstr;
00330     m_pBrowserApp->get_LocationURL(&bstr);
00331     CString retVal(bstr);
00332     return retVal;
00333 }

BOOL CCJHtmlView::GetMenuBar ( ) const

Definition at line 417 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00418 {
00419     ASSERT(m_pBrowserApp != NULL);
00420
00421     VARIANT_BOOL result;
00422     m_pBrowserApp->get_MenuBar(&result);
00423     return result;
00424 }

BOOL CCJHtmlView::GetOffline ( ) const

Definition at line 353 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00354 {
00355     ASSERT(m_pBrowserApp != NULL);
00356
00357     VARIANT_BOOL result;
00358     m_pBrowserApp->get_Offline(&result);
00359     return result;
00360 }

LPDISPATCH CCJHtmlView::GetParentBrowser ( ) const

Definition at line 381 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00382 {
00383     ASSERT(m_pBrowserApp != NULL);
00384
00385     LPDISPATCH result;
00386     m_pBrowserApp->get_Parent(&result);
00387     return result;
00388 }

COleVariant CCJHtmlView::GetProperty ( LPCTSTR lpszProperty )

Definition at line 698 of file CJHtmlView.cpp.

References m_wndBrowser.

00699 {
00700     COleVariant result;
00701
00702     static BYTE parms[] =
00703         VTS_BSTR;
00704     m_wndBrowser.InvokeHelper(0x12f, DISPATCH_METHOD,
00705         VT_VARIANT, (void*)&result, parms, lpszProperty);
00706
00707     return result;
00708 }

BOOL CCJHtmlView::GetProperty | ( | LPCTSTR | lpszProperty,
 |  | CString & | strValue
 | ) |

Definition at line 675 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00676 {
00677     ASSERT(m_pBrowserApp != NULL);
00678
00679     CString strProperty(lpszProperty);
00680     BSTR bstrProperty = strProperty.AllocSysString();
00681
00682     BOOL bResult = FALSE;
00683     VARIANT vReturn;
00684     vReturn.vt = VT_BSTR;
00685     vReturn.bstrVal = NULL;
00686     HRESULT hr = m_pBrowserApp->GetProperty(bstrProperty, &vReturn);
00687
00688     if (SUCCEEDED(hr))
00689     {
00690         strValue = CString(vReturn.bstrVal);
00691         bResult = TRUE;
00692     }
00693
00694     ::SysFreeString(bstrProperty);
00695     return bResult;
00696 }

READYSTATE CCJHtmlView::GetReadyState ( ) const

Definition at line 344 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00345 {
00346     ASSERT(m_pBrowserApp != NULL);
00347
00348     READYSTATE result;
00349     m_pBrowserApp->get_ReadyState(&result);
00350     return result;
00351 }

BOOL CCJHtmlView::GetRegisterAsBrowser ( ) const

Definition at line 461 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00462 {
00463     ASSERT(m_pBrowserApp != NULL);
00464
00465     VARIANT_BOOL result;
00466     m_pBrowserApp->get_RegisterAsBrowser(&result);
00467     return result;
00468 }

BOOL CCJHtmlView::GetRegisterAsDropTarget ( ) const

Definition at line 470 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00471 {
00472     ASSERT(m_pBrowserApp != NULL);
00473
00474     VARIANT_BOOL result;
00475     m_pBrowserApp->get_RegisterAsDropTarget(&result);
00476     return result;
00477 }

BOOL CCJHtmlView::GetSilent ( ) const

Definition at line 362 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00363 {
00364     ASSERT(m_pBrowserApp != NULL);
00365
00366     VARIANT_BOOL result;
00367     m_pBrowserApp->get_Silent(&result);
00368     return result;
00369 }

BOOL CCJHtmlView::GetStatusBar ( ) const

Definition at line 435 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00436 {
00437     ASSERT(m_pBrowserApp != NULL);
00438
00439     VARIANT_BOOL result;
00440     m_pBrowserApp->get_StatusBar(&result);
00441     return result;
00442 }

BOOL CCJHtmlView::GetTheaterMode ( ) const

Definition at line 479 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00480 {
00481     ASSERT(m_pBrowserApp != NULL);
00482
00483     VARIANT_BOOL result;
00484     m_pBrowserApp->get_TheaterMode(&result);
00485     return result;
00486 }

int CCJHtmlView::GetToolBar ( ) const

Definition at line 290 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00291 {
00292     ASSERT(m_pBrowserApp != NULL);
00293     int result;
00294     m_pBrowserApp->get_ToolBar(&result);
00295     return result;
00296 }

long CCJHtmlView::GetTop ( ) const

Definition at line 282 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00283 {
00284     ASSERT(m_pBrowserApp != NULL);
00285     long result;
00286     m_pBrowserApp->get_Top(&result);
00287     return result;
00288 }

BOOL CCJHtmlView::GetTopLevelContainer ( ) const

Definition at line 408 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00409 {
00410     ASSERT(m_pBrowserApp != NULL);
00411
00412     VARIANT_BOOL result;
00413     m_pBrowserApp->get_TopLevelContainer(&result);
00414     return result;
00415 }

CString CCJHtmlView::GetType ( ) const

Definition at line 262 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00263 {
00264     ASSERT(m_pBrowserApp != NULL);
00265
00266     BSTR bstr;
00267     m_pBrowserApp->get_Type(&bstr);
00268     CString retVal(bstr);
00269     return retVal;
00270 }

BOOL CCJHtmlView::GetVisible ( ) const

Definition at line 306 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00307 {
00308     ASSERT(m_pBrowserApp != NULL);
00309
00310     VARIANT_BOOL result;
00311     m_pBrowserApp->get_Visible(&result);
00312     return result;
00313 }

_CJXLIB_INLINE void CCJHtmlView::GoBack ( )

Definition at line 251 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00252     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoBack(); }

_CJXLIB_INLINE void CCJHtmlView::GoForward ( )

Definition at line 254 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00255     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoForward(); }

_CJXLIB_INLINE void CCJHtmlView::GoHome ( )

Definition at line 257 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00258     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoHome(); }

_CJXLIB_INLINE void CCJHtmlView::GoSearch ( )

Definition at line 260 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00261     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoSearch(); }

BOOL CCJHtmlView::LoadFromResource ( UINT nRes )

Definition at line 521 of file CJHtmlView.cpp.

References Navigate(), and NULL.

00522 {
00523     HINSTANCE hInstance = AfxGetResourceHandle();
00524     ASSERT(hInstance != NULL);
00525
00526     CString strResourceURL;
00527     BOOL bRetVal = TRUE;
00528     LPTSTR lpszModule = new TCHAR[_MAX_PATH];
00529
00530     if (GetModuleFileName(hInstance, lpszModule, _MAX_PATH))
00531     {
00532         strResourceURL.Format(_T("res://%s/%d"), lpszModule, nRes);
00533         Navigate(strResourceURL, 0, 0, 0);
00534     }
00535     else
00536         bRetVal = FALSE;
00537
00538     delete [] lpszModule;
00539     return bRetVal;
00540 }

Here is the call graph for this function:

BOOL CCJHtmlView::LoadFromResource ( LPCTSTR lpszResource )

Definition at line 500 of file CJHtmlView.cpp.

References Navigate(), and NULL.

00501 {
00502     HINSTANCE hInstance = AfxGetResourceHandle();
00503     ASSERT(hInstance != NULL);
00504
00505     CString strResourceURL;
00506     BOOL bRetVal = TRUE;
00507     LPTSTR lpszModule = new TCHAR[_MAX_PATH];
00508
00509     if (GetModuleFileName(hInstance, lpszModule, _MAX_PATH))
00510     {
00511         strResourceURL.Format(_T("res://%s/%s"), lpszModule, lpszResource);
00512         Navigate(strResourceURL, 0, 0, 0);
00513     }
00514     else
00515         bRetVal = FALSE;
00516
00517     delete [] lpszModule;
00518     return bRetVal;
00519 }

Here is the call graph for this function:

void CCJHtmlView::Navigate | ( | LPCTSTR | URL,
 |  | DWORD | dwFlags = 0,
 |  | LPCTSTR | lpszTargetFrameName = NULL,
 |  | LPCTSTR | lpszHeaders = NULL,
 |  | LPVOID | lpvPostData = NULL,
 |  | DWORD | dwPostDataLen = 0
 | ) |

Definition at line 542 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

Referenced by LoadFromResource().

00546 {
00547     CString strURL(lpszURL);
00548     BSTR bstrURL = strURL.AllocSysString();
00549
00550     COleSafeArray vPostData;
00551     if (lpvPostData != NULL)
00552     {
00553         if (dwPostDataLen == 0)
00554             dwPostDataLen = lstrlen((LPCTSTR) lpvPostData);
00555
00556         vPostData.CreateOneDim(VT_UI1, dwPostDataLen, lpvPostData);
00557     }
00558
00559     m_pBrowserApp->Navigate(bstrURL,
00560         COleVariant((long) dwFlags, VT_I4),
00561         COleVariant(lpszTargetFrameName, VT_BSTR),
00562         vPostData,
00563         COleVariant(lpszHeaders, VT_BSTR));
00564 }

void CCJHtmlView::Navigate2 | ( | LPCTSTR | lpszURL,
 |  | DWORD | dwFlags,
 |  | CByteArray & | baPostedData,
 |  | LPCTSTR | lpszTargetFrameName = NULL,
 |  | LPCTSTR | lpszHeader = NULL
 | ) |

Definition at line 647 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00650 {
00651     ASSERT(m_pBrowserApp != NULL);
00652
00653     COleVariant vPostData = baPostData;
00654     COleVariant vURL(lpszURL, VT_BSTR);
00655     COleVariant vHeaders(lpszHeaders, VT_BSTR);
00656     COleVariant vTargetFrameName(lpszTargetFrameName, VT_BSTR);
00657     COleVariant vFlags((long) dwFlags, VT_I4);
00658
00659     ASSERT(m_pBrowserApp != NULL);
00660
00661     m_pBrowserApp->Navigate2(vURL, vFlags, vTargetFrameName,
00662         vPostData, vHeaders);
00663 }

void CCJHtmlView::Navigate2 | ( | LPCTSTR | lpszURL,
 |  | DWORD | dwFlags = 0,
 |  | LPCTSTR | lpszTargetFrameName = NULL,
 |  | LPCTSTR | lpszHeaders = NULL,
 |  | LPVOID | lpvPostData = NULL,
 |  | DWORD | dwPostDataLen = 0
 | ) |

Definition at line 622 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00626 {
00627     ASSERT(m_pBrowserApp != NULL);
00628
00629     COleSafeArray vPostData;
00630     if (lpvPostData != NULL)
00631     {
00632         if (dwPostDataLen == 0)
00633             dwPostDataLen = lstrlen((LPCTSTR) lpvPostData);
00634
00635         vPostData.CreateOneDim(VT_UI1, dwPostDataLen, lpvPostData);
00636     }
00637
00638     COleVariant vURL(lpszURL, VT_BSTR);
00639     COleVariant vHeaders(lpszHeaders, VT_BSTR);
00640     COleVariant vTargetFrameName(lpszTargetFrameName, VT_BSTR);
00641     COleVariant vFlags((long) dwFlags, VT_I4);
00642
00643     m_pBrowserApp->Navigate2(vURL,
00644         vFlags, vTargetFrameName, vPostData, vHeaders);
00645 }

void CCJHtmlView::Navigate2 | ( | LPITEMIDLIST | pIDL,
 |  | DWORD | dwFlags = 0,
 |  | LPCTSTR | lpszTargetFrameName = NULL
 | ) |

Definition at line 603 of file CJHtmlView.cpp.

References m_pBrowserApp, MakeOleVariant(), and NULL.

00605 {
00606     ASSERT(m_pBrowserApp != NULL);
00607
00608 #ifdef _VC_VERSION_5
00609     COleVariant vPIDL;
00610     MakeOleVariant(vPIDL, pIDL);
00611 #else
00612     COleVariant vPIDL(pIDL);
00613 #endif
00614     COleVariant empty;
00615
00616     m_pBrowserApp->Navigate2(vPIDL,
00617         COleVariant((long) dwFlags, VT_I4),
00618         COleVariant(lpszTargetFrameName, VT_BSTR),
00619         empty, empty);
00620 }

Here is the call graph for this function:

void CCJHtmlView::NavigateComplete2 | ( | LPDISPATCH | pDisp,
 |  | VARIANT * | URL
 | ) | [protected, virtual]

Definition at line 723 of file CJHtmlView.cpp.

References OnNavigateComplete2().

00724 {
00725     ASSERT(V_VT(URL) == VT_BSTR);
00726
00727     USES_CONVERSION;
00728
00729     CString str = OLE2T(V_BSTR(URL));
00730     OnNavigateComplete2(str);
00731 }

Here is the call graph for this function:

void CCJHtmlView::OnBeforeNavigate2 | ( | LPCTSTR | lpszURL,
 |  | DWORD | nFlags,
 |  | LPCTSTR | lpszTargetFrameName,
 |  | CByteArray & | baPostedData,
 |  | LPCTSTR | lpszHeaders,
 |  | BOOL * | pbCancel
 | ) | [virtual]

Definition at line 887 of file CJHtmlView.cpp.

Referenced by BeforeNavigate2().

00890 {
00891     // default to continuing
00892     bCancel = FALSE;
00893
00894     // user will override to handle this notification
00895     UNUSED_ALWAYS(lpszURL);
00896     UNUSED_ALWAYS(nFlags);
00897     UNUSED_ALWAYS(lpszTargetFrameName);
00898     UNUSED_ALWAYS(baPostData);
00899     UNUSED_ALWAYS(lpszHeaders);
00900 }

void CCJHtmlView::OnCommandStateChange | ( | long | nCommand,
 |  | BOOL | bEnable
 | ) | [virtual]

Definition at line 796 of file CJHtmlView.cpp.

00797 {
00798     // user will override to handle this notification
00799     UNUSED_ALWAYS(lCommand);
00800     UNUSED_ALWAYS(bEnable);
00801 }

void CCJHtmlView::OnDestroy ( ) [protected]

Definition at line 191 of file CJHtmlView.cpp.

References m_pBrowserApp, and RELEASE.

00192 {
00193     RELEASE(m_pBrowserApp);
00194 }

void CCJHtmlView::OnDocumentComplete ( LPCTSTR lpszURL ) [virtual]

Definition at line 834 of file CJHtmlView.cpp.

Referenced by DocumentComplete().

00835 {
00836     // user will override to handle this notification
00837     UNUSED_ALWAYS(lpszURL);
00838 }

void CCJHtmlView::OnDownloadBegin ( ) [virtual]

Definition at line 803 of file CJHtmlView.cpp.

00804 {
00805     // user will override to handle this notification
00806 }

void CCJHtmlView::OnDownloadComplete ( ) [virtual]

Definition at line 808 of file CJHtmlView.cpp.

00809 {
00810     // user will override to handle this notification
00811 }

void CCJHtmlView::OnDraw ( CDC * pDC ) [virtual]

Definition at line 138 of file CJHtmlView.cpp.

00139 {
00140     // this class should never do its own drawing;
00141     // the browser control should handle everything
00142
00143     ASSERT(FALSE);
00144 }

BOOL CCJHtmlView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 914 of file CJHtmlView.cpp.

00915 {
00916     CRect rectClient;
00917     GetClientRect( &rectClient );
00918     pDC->ExcludeClipRect( &rectClient );
00919     return CFormView::OnEraseBkgnd(pDC);
00920 }

void CCJHtmlView::OnFilePrint ( ) [protected]

Definition at line 149 of file CJHtmlView.cpp.

References GetHtmlDocument(), m_pBrowserApp, and NULL.

00150 {
00151     // get the HTMLDocument
00152
00153     if (m_pBrowserApp != NULL)
00154     {
00155         LPOLECOMMANDTARGET lpTarget = NULL;
00156         LPDISPATCH lpDisp = GetHtmlDocument();
00157
00158         if (lpDisp != NULL)
00159         {
00160             // the control will handle all printing UI
00161
00162             if (SUCCEEDED(lpDisp->QueryInterface(IID_IOleCommandTarget,
00163                     (LPVOID*) &lpTarget)))
00164             {
00165                 lpTarget->Exec(NULL, OLECMDID_PRINT, 0, NULL, NULL);
00166                 lpTarget->Release();
00167             }
00168             lpDisp->Release();
00169         }
00170     }
00171 }

Here is the call graph for this function:

void CCJHtmlView::OnFullScreen ( BOOL bFullScreen ) [virtual]

Definition at line 869 of file CJHtmlView.cpp.

00870 {
00871     // user will override to handle this notification
00872     UNUSED_ALWAYS(bFullScreen);
00873 }

void CCJHtmlView::OnMenuBar ( BOOL bMenuBar ) [virtual]

Definition at line 857 of file CJHtmlView.cpp.

00858 {
00859     // user will override to handle this notification
00860     UNUSED_ALWAYS(bMenuBar);
00861 }

void CCJHtmlView::OnNavigateComplete2 ( LPCTSTR strURL ) [virtual]

Definition at line 881 of file CJHtmlView.cpp.

Referenced by NavigateComplete2().

00882 {
00883     // user will override to handle this notification
00884     UNUSED_ALWAYS(lpszURL);
00885 }

void CCJHtmlView::OnNewWindow2 | ( | LPDISPATCH * | ppDisp,
 |  | BOOL * | Cancel
 | ) | [virtual]

Definition at line 825 of file CJHtmlView.cpp.

00826 {
00827     // default to continuing
00828     bCancel = FALSE;
00829
00830     // user will override to handle this notification
00831     UNUSED_ALWAYS(ppDisp);
00832 }

void CCJHtmlView::OnPaint ( ) [protected]

Definition at line 212 of file CJHtmlView.cpp.

00213 {
00214     Default();
00215 }

void CCJHtmlView::OnProgressChange | ( | long | nProgress,
 |  | long | nProgressMax
 | ) | [virtual]

Definition at line 789 of file CJHtmlView.cpp.

00790 {
00791     // user will override to handle this notification
00792     UNUSED_ALWAYS(lProgress);
00793     UNUSED_ALWAYS(lProgressMax);
00794 }

void CCJHtmlView::OnPropertyChange ( LPCTSTR lpszProperty ) [virtual]

Definition at line 819 of file CJHtmlView.cpp.

00820 {
00821     // user will override to handle this notification
00822     UNUSED_ALWAYS(lpszProperty);
00823 }

void CCJHtmlView::OnQuit ( ) [virtual]

Definition at line 840 of file CJHtmlView.cpp.

00841 {
00842     // user will override to handle this notification
00843 }

void CCJHtmlView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy
 | ) | [protected]

Definition at line 196 of file CJHtmlView.cpp.

References m_wndBrowser, and NULL.

00197 {
00198     CFormView::OnSize(nType, cx, cy);
00199
00200     if (::IsWindow(m_wndBrowser.m_hWnd))
00201     {
00202         // need to push non-client borders out of the client area
00203         CRect rect;
00204         GetClientRect(rect);
00205         ::AdjustWindowRectEx(rect,
00206             m_wndBrowser.GetStyle(), FALSE, WS_EX_CLIENTEDGE);
00207         m_wndBrowser.SetWindowPos(NULL, rect.left, rect.top,
00208             rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
00209     }
00210 }

void CCJHtmlView::OnStatusBar ( BOOL bStatusBar ) [virtual]

Definition at line 863 of file CJHtmlView.cpp.

00864 {
00865     // user will override to handle this notification
00866     UNUSED_ALWAYS(bStatusBar);
00867 }

void CCJHtmlView::OnStatusTextChange ( LPCTSTR lpszText ) [virtual]

Definition at line 902 of file CJHtmlView.cpp.

References NULL.

00903 {
00904     // try to set the status bar text via the frame
00905
00906     CFrameWnd* pFrame = GetParentFrame();
00907     if (pFrame != NULL)
00908         pFrame->SetMessageText(pszText);
00909 }

void CCJHtmlView::OnTheaterMode ( BOOL bTheaterMode ) [virtual]

Definition at line 875 of file CJHtmlView.cpp.

00876 {
00877     // user will override to handle this notification
00878     UNUSED_ALWAYS(bTheaterMode);
00879 }

void CCJHtmlView::OnTitleChange ( LPCTSTR lpszText ) [virtual]

Definition at line 813 of file CJHtmlView.cpp.

00814 {
00815     // user will override to handle this notification
00816     UNUSED_ALWAYS(lpszText);
00817 }

void CCJHtmlView::OnToolBar ( BOOL bToolBar ) [virtual]

Definition at line 851 of file CJHtmlView.cpp.

00852 {
00853     // user will override to handle this notification
00854     UNUSED_ALWAYS(bToolBar);
00855 }

void CCJHtmlView::OnVisible ( BOOL bVisible ) [virtual]

Definition at line 845 of file CJHtmlView.cpp.

00846 {
00847     // user will override to handle this notification
00848     UNUSED_ALWAYS(bVisible);
00849 }

_CJXLIB_INLINE void CCJHtmlView::PutProperty | ( | LPCTSTR | lpszPropertyName,
 |  | short | nValue
 | ) |

Definition at line 284 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, NULL, and PutProperty().

00285     { ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(nValue, VT_UI2)); }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJHtmlView::PutProperty | ( | LPCTSTR | lpszPropertyName,
 |  | long | lValue
 | ) |

Definition at line 281 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, NULL, and PutProperty().

00282     { ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(lValue, VT_UI4)); }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJHtmlView::PutProperty | ( | LPCTSTR | lpszPropertyName,
 |  | LPCTSTR | lpszValue
 | ) |

Definition at line 287 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, NULL, and PutProperty().

00288     { ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(lpszValue, VT_BSTR)); }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJHtmlView::PutProperty | ( | LPCTSTR | lpszPropertyName,
 |  | double | dValue
 | ) |

Definition at line 290 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, NULL, and PutProperty().

00291     { ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(dValue)); }

Here is the call graph for this function:

void CCJHtmlView::PutProperty | ( | LPCTSTR | lpszProperty,
 |  | const VARIANT & | vtValue
 | ) |

Definition at line 665 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

Referenced by PutProperty().

00666 {
00667     ASSERT(m_pBrowserApp != NULL);
00668
00669     CString strProp(lpszProperty);
00670     BSTR bstrProp = strProp.AllocSysString();
00671     m_pBrowserApp->PutProperty(bstrProp, vtValue);
00672     ::SysFreeString(bstrProp);
00673 }

OLECMDF CCJHtmlView::QueryStatusWB ( OLECMDID cmdID ) const

Definition at line 444 of file CJHtmlView.cpp.

References m_pBrowserApp, and NULL.

00445 {
00446     ASSERT(m_pBrowserApp != NULL);
00447
00448     OLECMDF result;
00449     m_pBrowserApp->QueryStatusWB(cmdID, &result);
00450     return result;
00451 }

_CJXLIB_INLINE void CCJHtmlView::Refresh ( )

Definition at line 263 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00264     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Refresh(); }

_CJXLIB_INLINE void CCJHtmlView::Refresh2 ( int nLevel )

Definition at line 266 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00267     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Refresh2(COleVariant((long) nLevel, VT_I4)); }

_CJXLIB_INLINE void CCJHtmlView::SetAddressBar ( BOOL bNewValue )

Definition at line 275 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00276     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_AddressBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetFullScreen ( BOOL bNewValue )

Definition at line 272 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00273     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_FullScreen((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetHeight ( long nNewValue )

Definition at line 278 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00279     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Height(nNewValue); }

_CJXLIB_INLINE void CCJHtmlView::SetLeft ( long nNewValue )

Definition at line 296 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00297     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Left(nNewValue); }

_CJXLIB_INLINE void CCJHtmlView::SetMenuBar ( BOOL bNewValue )

Definition at line 239 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00240     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_MenuBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetOffline ( BOOL bNewValue )

Definition at line 245 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00246     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Offline((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetRegisterAsBrowser ( BOOL bNewValue )

Definition at line 227 of file CJHtmlView.h.

References NULL.

00228     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_RegisterAsBrowser((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetRegisterAsDropTarget ( BOOL bNewValue )

Definition at line 230 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00231     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_RegisterAsDropTarget((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetSilent ( BOOL bNewValue )

Definition at line 248 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00249     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Silent((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetStatusBar ( BOOL bNewValue )

Definition at line 299 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00300     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_StatusBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetTheaterMode ( BOOL bNewValue )

Definition at line 233 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00234     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_TheaterMode((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::SetToolBar ( int nNewValue )

Definition at line 242 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00243     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_ToolBar(nNewValue); }

_CJXLIB_INLINE void CCJHtmlView::SetTop ( long nNewValue )

Definition at line 293 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00294     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Top(nNewValue); }

_CJXLIB_INLINE void CCJHtmlView::SetVisible ( BOOL bNewValue )

Definition at line 236 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00237     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Visible((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }

_CJXLIB_INLINE void CCJHtmlView::Stop ( )

Definition at line 269 of file CJHtmlView.h.

References _CJXLIB_INLINE, m_pBrowserApp, and NULL.

00270     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Stop(); }

Member Data Documentation

IWebBrowser2* CCJHtmlView::m_pBrowserApp [protected]

Definition at line 209 of file CJHtmlView.h.

Referenced by Create(), ExecWB(), GetAddressBar(), GetApplication(), GetBusy(), GetContainer(), GetFullName(), GetFullScreen(), GetHeight(), GetHtmlDocument(), GetLeft(), GetLocationName(), GetLocationURL(), GetMenuBar(), GetOffline(), GetParentBrowser(), GetProperty(), GetReadyState(), GetRegisterAsBrowser(), GetRegisterAsDropTarget(), GetSilent(), GetStatusBar(), GetTheaterMode(), GetToolBar(), GetTop(), GetTopLevelContainer(), GetType(), GetVisible(), GoBack(), GoForward(), GoHome(), GoSearch(), Navigate(), Navigate2(), OnDestroy(), OnFilePrint(), PutProperty(), QueryStatusWB(), Refresh(), Refresh2(), SetAddressBar(), SetFullScreen(), SetHeight(), SetLeft(), SetMenuBar(), SetOffline(), SetRegisterAsDropTarget(), SetSilent(), SetStatusBar(), SetTheaterMode(), SetToolBar(), SetTop(), SetVisible(), Stop(), and ~CCJHtmlView().

CWnd CCJHtmlView::m_wndBrowser

Definition at line 200 of file CJHtmlView.h.

Referenced by Create(), GetProperty(), and OnSize().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJHtmlView.h
  • WinCvs/CJLib/CJLibrary/CJHtmlView.cpp
Generated on Sat Aug 7 22:49:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJHyperLink Class Reference

CCJHyperLink Class Reference

#include <CJHyperLink.h>

Inheritance diagram for CCJHyperLink:

[legend]
Collaboration diagram for CCJHyperLink:

[legend]
List of all members.

Public Member Functions

CCJHyperLink ()
virtual | ~CCJHyperLink ()
virtual void | SetURL (CString strURL)
virtual CString | GetURL () const
virtual void | SetColors (COLORREF crLinkColor, COLORREF crVisitedColor, COLORREF crHoverColor=-1)
virtual COLORREF | GetLinkColor () const
virtual COLORREF | GetVisitedColor () const
virtual COLORREF | GetHoverColor () const
virtual void | SetVisited (BOOL bVisited=TRUE)
virtual BOOL | GetVisited () const
virtual void | SetLinkCursor (HCURSOR hCursor)
virtual HCURSOR | GetLinkCursor () const
virtual void | SetUnderline (BOOL bUnderline=TRUE)
virtual BOOL | GetUnderline () const
virtual void | SetAutoSize (BOOL bAutoSize=TRUE)
virtual BOOL | GetAutoSize () const
virtual HINSTANCE | GotoURL (LPCTSTR url, int showcmd)
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Member Functions

virtual void | PreSubclassWindow ()
virtual void | ReportError (int nError)
virtual LONG | GetRegKey (HKEY key, LPCTSTR subkey, LPTSTR retdata)
virtual void | PositionWindow ()
virtual void | SetDefaultCursor ()
afx_msg HBRUSH | CtlColor (CDC *pDC, UINT nCtlColor)
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnClicked ()

Protected Attributes

COLORREF | m_crLinkColor
COLORREF | m_crVisitedColor
COLORREF | m_crHoverColor
BOOL | m_bOverControl
BOOL | m_bVisited
BOOL | m_bUnderline
BOOL | m_bAdjustToFit
CString | m_strURL
CFont | m_Font
HCURSOR | m_hLinkCursor
CToolTipCtrl | m_ToolTip

Constructor & Destructor Documentation

CCJHyperLink::CCJHyperLink ( )

Definition at line 55 of file CJHyperLink.cpp.

References m_bAdjustToFit, m_bOverControl, m_bUnderline, m_bVisited, m_crHoverColor, m_crLinkColor, m_crVisitedColor, m_hLinkCursor, m_strURL, and NULL.

00056 {
00057     m_hLinkCursor       = NULL;                 // No cursor as yet
00058     m_crLinkColor      = RGB(  0,   0, 238);   // Blue
00059     m_crVisitedColor   = RGB( 85,  26, 139);   // Purple
00060     m_crHoverColor     = ::GetSysColor(COLOR_HIGHLIGHT);
00061     m_bOverControl      = FALSE;                // Cursor not yet over control
00062     m_bVisited          = FALSE;                // Hasn't been visited yet.
00063     m_bUnderline        = TRUE;                 // Underline the link?
00064     m_bAdjustToFit      = TRUE;                 // Resize the window to fit the text?
00065     m_strURL.Empty();
00066 }

CCJHyperLink::~CCJHyperLink ( ) [virtual]

Definition at line 68 of file CJHyperLink.cpp.

References m_Font, and m_hLinkCursor.

00069 {
00070     m_Font.DeleteObject();
00071     if (m_hLinkCursor) {
00072         DestroyCursor(m_hLinkCursor);
00073     }
00074 }

Member Function Documentation

HBRUSH CCJHyperLink::CtlColor | ( | CDC * | pDC,
 |  | UINT | nCtlColor
 | ) | [protected]

Definition at line 105 of file CJHyperLink.cpp.

References m_bOverControl, m_bVisited, m_crHoverColor, m_crLinkColor, and m_crVisitedColor.

00106 {
00107 #ifdef _DEBUG
00108     ASSERT(nCtlColor == CTLCOLOR_STATIC);
00109 #else
00110     UNUSED_ALWAYS( nCtlColor );
00111 #endif
00112
00113     if (m_bOverControl)
00114         pDC->SetTextColor(m_crHoverColor);
00115     else if (m_bVisited)
00116         pDC->SetTextColor(m_crVisitedColor);
00117     else
00118         pDC->SetTextColor(m_crLinkColor);
00119
00120     // transparent text.
00121     pDC->SetBkMode(TRANSPARENT);
00122     return (HBRUSH)GetStockObject(NULL_BRUSH);
00123 }

BOOL CCJHyperLink::GetAutoSize ( ) const [virtual]

Definition at line 301 of file CJHyperLink.cpp.

References m_bAdjustToFit.

00302 {
00303     return m_bAdjustToFit;
00304 }

COLORREF CCJHyperLink::GetHoverColor ( ) const [virtual]

Definition at line 240 of file CJHyperLink.cpp.

References m_crHoverColor.

00241 {
00242     return m_crHoverColor;
00243 }

COLORREF CCJHyperLink::GetLinkColor ( ) const [virtual]

Definition at line 230 of file CJHyperLink.cpp.

References m_crLinkColor.

00231 {
00232     return m_crLinkColor;
00233 }

HCURSOR CCJHyperLink::GetLinkCursor ( ) const [virtual]

Definition at line 265 of file CJHyperLink.cpp.

References m_hLinkCursor.

00266 {
00267     return m_hLinkCursor;
00268 }

LONG CCJHyperLink::GetRegKey | ( | HKEY | key,
 |  | LPCTSTR | subkey,
 |  | LPTSTR | retdata
 | ) | [protected, virtual]

Definition at line 384 of file CJHyperLink.cpp.

References MAX_PATH, and NULL.

Referenced by GotoURL().

00385 {
00386     HKEY hkey;
00387     LONG retval = RegOpenKeyEx(key, subkey, 0, KEY_QUERY_VALUE, &hkey);
00388
00389     if (retval == ERROR_SUCCESS) {
00390         long datasize = MAX_PATH;
00391         TCHAR data[MAX_PATH];
00392         RegQueryValue(hkey, NULL, data, &datasize);
00393         _tcscpy(retdata,data);
00394         RegCloseKey(hkey);
00395     }
00396
00397     return retval;
00398 }

BOOL CCJHyperLink::GetUnderline ( ) const [virtual]

Definition at line 288 of file CJHyperLink.cpp.

References m_bUnderline.

00289 {
00290     return m_bUnderline;
00291 }

CString CCJHyperLink::GetURL ( ) const [virtual]

Definition at line 210 of file CJHyperLink.cpp.

References m_strURL.

00211 {
00212     return m_strURL;
00213 }

BOOL CCJHyperLink::GetVisited ( ) const [virtual]

Definition at line 253 of file CJHyperLink.cpp.

References m_bVisited.

00254 {
00255     return m_bVisited;
00256 }

COLORREF CCJHyperLink::GetVisitedColor ( ) const [virtual]

Definition at line 235 of file CJHyperLink.cpp.

References m_crVisitedColor.

00236 {
00237     return m_crVisitedColor;
00238 }

HINSTANCE CCJHyperLink::GotoURL | ( | LPCTSTR | url,
 |  | int | showcmd
 | ) | [virtual]

Definition at line 423 of file CJHyperLink.cpp.

References GetRegKey(), MAX_PATH, and NULL.

Referenced by OnClicked().

00424 {
00425     TCHAR key[MAX_PATH + MAX_PATH];
00426
00427     // First try ShellExecute()
00428     HINSTANCE result = ShellExecute( NULL, _T("open"), url, NULL, NULL, showcmd );
00429
00430     // If it failed, get the .htm regkey and lookup the program
00431     if((UINT)result <= HINSTANCE_ERROR)
00432     {
00433         if( GetRegKey( HKEY_CLASSES_ROOT, _T(".htm"), key ) == ERROR_SUCCESS )
00434         {
00435             lstrcat( key, _T("\\shell\\open\\command"));
00436
00437             if( GetRegKey( HKEY_CLASSES_ROOT, key, key ) == ERROR_SUCCESS )
00438             {
00439                 LPTSTR pos;
00440
00441                 pos = _tcsstr(key, _T("\"%1\""));
00442
00443                 if( pos == NULL )                       // No quotes found
00444                 {
00445                     pos = _tcsstr( key, _T("%1"));      // Check for %1, without quotes
00446
00447                     if( pos == NULL )                   // No parameter at all...
00448                     {
00449                         pos = key + _tcslen( key ) - 1;
00450                     }
00451                     else
00452                     {
00453                         *pos = _T('\0');                // Remove the parameter
00454                     }
00455                 }
00456                 else
00457                 {
00458                     *pos = _T('\0');                    // Remove the parameter
00459                 }
00460
00461                 lstrcat( pos, _T(" "));
00462                 lstrcat( pos, url );
00463
00464                 PROCESS_INFORMATION pi;
00465
00466                 STARTUPINFO         si;
00467
00468                 ::ZeroMemory( &si, sizeof( si ));
00469
00470                 si.cb = sizeof( si );
00471
00472                 if( ::CreateProcess( NULL,
00473                                      pos,
00474                                      NULL,
00475                                      NULL,
00476                                      FALSE,
00477                                      0,
00478                                      NULL,
00479                                      NULL,
00480                                      &si,
00481                                     &pi ) == FALSE )
00482                 {
00483                     return NULL;
00484                 }
00485
00486                 result = (HINSTANCE) pi.hProcess;
00487             }
00488         }
00489     }
00490
00491     return result;
00492 }

Here is the call graph for this function:

void CCJHyperLink::OnClicked ( ) [protected]

Definition at line 94 of file CJHyperLink.cpp.

References GotoURL(), m_bVisited, m_strURL, ReportError(), and SetVisited().

00095 {
00096     int result = (int)GotoURL(m_strURL, SW_SHOW);
00097     m_bVisited = (result > HINSTANCE_ERROR);
00098     if (!m_bVisited) {
00099         MessageBeep(MB_ICONEXCLAMATION);     // Unable to follow link
00100         ReportError(result);
00101     } else
00102         SetVisited();                        // Repaint to show visited Color
00103 }

Here is the call graph for this function:

void CCJHyperLink::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 125 of file CJHyperLink.cpp.

References m_bOverControl.

00126 {
00127     CStatic::OnMouseMove(nFlags, point);
00128
00129     if (m_bOverControl)        // Cursor is currently over control
00130     {
00131         CRect rect;
00132         GetClientRect(rect);
00133
00134         if (!rect.PtInRect(point))
00135         {
00136             m_bOverControl = FALSE;
00137             ReleaseCapture();
00138             RedrawWindow();
00139             return;
00140         }
00141     }
00142     else                      // Cursor has just moved over control
00143     {
00144         m_bOverControl = TRUE;
00145         RedrawWindow();
00146         SetCapture();
00147     }
00148 }

BOOL CCJHyperLink::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message
 | ) | [protected]

Definition at line 150 of file CJHyperLink.cpp.

References m_hLinkCursor.

00151 {
00152     if (m_hLinkCursor)
00153     {
00154         ::SetCursor(m_hLinkCursor);
00155         return TRUE;
00156     }
00157     return FALSE;
00158 }

void CCJHyperLink::PositionWindow ( ) [protected, virtual]

Definition at line 315 of file CJHyperLink.cpp.

References m_bAdjustToFit, m_Font, and NULL.

Referenced by PreSubclassWindow(), SetAutoSize(), and SetURL().

00316 {
00317     if (!::IsWindow(GetSafeHwnd()) || !m_bAdjustToFit)
00318         return;
00319
00320     // Get the current window position
00321     CRect rect;
00322     GetWindowRect(rect);
00323
00324     CWnd* pParent = GetParent();
00325     if (pParent)
00326         pParent->ScreenToClient(rect);
00327
00328     // Get the size of the window text
00329     CString strWndText;
00330     GetWindowText(strWndText);
00331
00332     CDC* pDC = GetDC();
00333     CFont* pOldFont = pDC->SelectObject(&m_Font);
00334     CSize Extent = pDC->GetTextExtent(strWndText);
00335     pDC->SelectObject(pOldFont);
00336     ReleaseDC(pDC);
00337
00338     // Get the text justification via the window style
00339     DWORD dwStyle = GetStyle();
00340
00341     // Recalc the window size and position based on the text justification
00342     if (dwStyle & SS_CENTERIMAGE)
00343         rect.DeflateRect(0, (rect.Height() - Extent.cy)/2);
00344     else
00345         rect.bottom = rect.top + Extent.cy;
00346
00347     if (dwStyle & SS_CENTER)
00348         rect.DeflateRect((rect.Width() - Extent.cx)/2, 0);
00349     else if (dwStyle & SS_RIGHT)
00350         rect.left  = rect.right - Extent.cx;
00351     else // SS_LEFT = 0, so we can't test for it explicitly
00352         rect.right = rect.left + Extent.cx;
00353
00354     // Move the window
00355     SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOZORDER);
00356 }

void CCJHyperLink::PreSubclassWindow ( ) [protected, virtual]

Definition at line 160 of file CJHyperLink.cpp.

References m_bUnderline, m_Font, m_strURL, m_ToolTip, PositionWindow(), SetDefaultCursor(), and TOOLTIP_ID.

00161 {
00162     // We want to get mouse clicks via STN_CLICKED
00163     DWORD dwStyle = GetStyle();
00164     ::SetWindowLong(GetSafeHwnd(), GWL_STYLE, dwStyle | SS_NOTIFY);
00165
00166     // Set the URL as the window text
00167     if (m_strURL.IsEmpty())
00168         GetWindowText(m_strURL);
00169
00170     // Check that the window text isn't empty. If it is, set it as the URL.
00171     CString strWndText;
00172     GetWindowText(strWndText);
00173     if (strWndText.IsEmpty()) {
00174         ASSERT(!m_strURL.IsEmpty());    // Window and URL both NULL. DUH!
00175         SetWindowText(m_strURL);
00176     }
00177
00178     // Create the font
00179     LOGFONT lf;
00180     GetFont()->GetLogFont(&lf);
00181     lf.lfUnderline = (char)m_bUnderline;
00182     m_Font.CreateFontIndirect(&lf);
00183     SetFont(&m_Font);
00184
00185     PositionWindow();        // Adjust size of window to fit URL if necessary
00186     SetDefaultCursor();      // Try and load up a "hand" cursor
00187
00188     // Create the tooltip
00189     CRect rect;
00190     GetClientRect(rect);
00191     m_ToolTip.Create(this);
00192     m_ToolTip.AddTool(this, m_strURL, rect, TOOLTIP_ID);
00193
00194     CStatic::PreSubclassWindow();
00195 }

Here is the call graph for this function:

BOOL CCJHyperLink::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 88 of file CJHyperLink.cpp.

00089 {
00090     m_ToolTip.RelayEvent(pMsg);
00091     return CStatic::PreTranslateMessage(pMsg);
00092 }

void CCJHyperLink::ReportError ( int nError ) [protected, virtual]

Definition at line 400 of file CJHyperLink.cpp.

Referenced by OnClicked().

00401 {
00402     CString str;
00403     switch (nError) {
00404         case 0:                       str = _T("The operating system is out\nof memory or resources."); break;
00405         case SE_ERR_PNF:              str = _T("The specified path was not found."); break;
00406         case SE_ERR_FNF:              str = _T("The specified file was not found."); break;
00407         case ERROR_BAD_FORMAT:        str = _T("The .EXE file is invalid\n(non-Win32 .EXE or error in .EXE image)."); break;
00408         case SE_ERR_ACCESSDENIED:     str = _T("The operating system denied\naccess to the specified file."); break;
00409         case SE_ERR_ASSOCINCOMPLETE:  str = _T("The filename association is\nincomplete or invalid."); break;
00410         case SE_ERR_DDEBUSY:          str = _T("The DDE transaction could not\nbe completed because other DDE transactions\nwere being processed."); break;
00411         case SE_ERR_DDEFAIL:          str = _T("The DDE transaction failed."); break;
00412         case SE_ERR_DDETIMEOUT:       str = _T("The DDE transaction could not\nbe completed because the request timed out."); break;
00413         case SE_ERR_DLLNOTFOUND:      str = _T("The specified dynamic-link library was not found."); break;
00414         case SE_ERR_NOASSOC:          str = _T("There is no application associated\nwith the given filename extension."); break;
00415         case SE_ERR_OOM:              str = _T("There was not enough memory to complete the operation."); break;
00416         case SE_ERR_SHARE:            str = _T("A sharing violation occurred. ");
00417         default:                      str.Format(_T("Unknown Error (%d) occurred."), nError); break;
00418     }
00419     str = _T("Unable to open hyperlink:\n\n") + str;
00420     AfxMessageBox(str, MB_ICONEXCLAMATION | MB_OK);
00421 }

void CCJHyperLink::SetAutoSize ( BOOL bAutoSize = TRUE ) [virtual]

Definition at line 293 of file CJHyperLink.cpp.

References m_bAdjustToFit, and PositionWindow().

00294 {
00295     m_bAdjustToFit = bAutoSize;
00296
00297     if (::IsWindow(GetSafeHwnd()))
00298         PositionWindow();
00299 }

Here is the call graph for this function:

void CCJHyperLink::SetColors | ( | COLORREF | crLinkColor,
 |  | COLORREF | crVisitedColor,
 |  | COLORREF | crHoverColor = -1
 | ) | [virtual]

Definition at line 215 of file CJHyperLink.cpp.

References m_crHoverColor, m_crLinkColor, and m_crVisitedColor.

00217 {
00218     m_crLinkColor    = crLinkColor;
00219     m_crVisitedColor = crVisitedColor;
00220
00221     if (crHoverColor == -1)
00222         m_crHoverColor = ::GetSysColor(COLOR_HIGHLIGHT);
00223     else
00224         m_crHoverColor = crHoverColor;
00225
00226     if (::IsWindow(m_hWnd))
00227         Invalidate();
00228 }

void CCJHyperLink::SetDefaultCursor ( ) [protected, virtual]

Definition at line 363 of file CJHyperLink.cpp.

References m_hLinkCursor, MAX_PATH, and NULL.

Referenced by PreSubclassWindow(), and SetLinkCursor().

00364 {
00365     if (m_hLinkCursor == NULL)                // No cursor handle - load our own
00366     {
00367         // Get the windows directory
00368         CString strWndDir;
00369         GetWindowsDirectory(strWndDir.GetBuffer(MAX_PATH), MAX_PATH);
00370         strWndDir.ReleaseBuffer();
00371
00372         strWndDir += _T("\\winhlp32.exe");
00373         // This retrieves cursor #106 from winhlp32.exe, which is a hand pointer
00374         HMODULE hModule = LoadLibrary(strWndDir);
00375         if (hModule) {
00376             HCURSOR hHandCursor = ::LoadCursor(hModule, MAKEINTRESOURCE(106));
00377             if (hHandCursor)
00378                 m_hLinkCursor = CopyCursor(hHandCursor);
00379         }
00380         FreeLibrary(hModule);
00381     }
00382 }

void CCJHyperLink::SetLinkCursor ( HCURSOR hCursor ) [virtual]

Definition at line 258 of file CJHyperLink.cpp.

References m_hLinkCursor, NULL, and SetDefaultCursor().

00259 {
00260     m_hLinkCursor = hCursor;
00261     if (m_hLinkCursor == NULL)
00262         SetDefaultCursor();
00263 }

Here is the call graph for this function:

void CCJHyperLink::SetUnderline ( BOOL bUnderline = TRUE ) [virtual]

Definition at line 270 of file CJHyperLink.cpp.

References m_bUnderline, and m_Font.

00271 {
00272     m_bUnderline = bUnderline;
00273
00274     if (::IsWindow(GetSafeHwnd()))
00275     {
00276         LOGFONT lf;
00277         GetFont()->GetLogFont(&lf);
00278         lf.lfUnderline = (char)m_bUnderline;
00279
00280         m_Font.DeleteObject();
00281         m_Font.CreateFontIndirect(&lf);
00282         SetFont(&m_Font);
00283
00284         Invalidate();
00285     }
00286 }

void CCJHyperLink::SetURL ( CString strURL ) [virtual]

Definition at line 200 of file CJHyperLink.cpp.

References m_strURL, m_ToolTip, PositionWindow(), and TOOLTIP_ID.

00201 {
00202     m_strURL = strURL;
00203
00204     if (::IsWindow(GetSafeHwnd())) {
00205         PositionWindow();
00206         m_ToolTip.UpdateTipText(strURL, this, TOOLTIP_ID);
00207     }
00208 }

Here is the call graph for this function:

void CCJHyperLink::SetVisited ( BOOL bVisited = TRUE ) [virtual]

Definition at line 245 of file CJHyperLink.cpp.

References m_bVisited.

Referenced by OnClicked().

00246 {
00247     m_bVisited = bVisited;
00248
00249     if (::IsWindow(GetSafeHwnd()))
00250         Invalidate();
00251 }

Member Data Documentation

BOOL CCJHyperLink::m_bAdjustToFit [protected]

Definition at line 99 of file CJHyperLink.h.

Referenced by CCJHyperLink(), GetAutoSize(), PositionWindow(), and SetAutoSize().

BOOL CCJHyperLink::m_bOverControl [protected]

Definition at line 96 of file CJHyperLink.h.

Referenced by CCJHyperLink(), CtlColor(), and OnMouseMove().

BOOL CCJHyperLink::m_bUnderline [protected]

Definition at line 98 of file CJHyperLink.h.

Referenced by CCJHyperLink(), GetUnderline(), PreSubclassWindow(), and SetUnderline().

BOOL CCJHyperLink::m_bVisited [protected]

Definition at line 97 of file CJHyperLink.h.

Referenced by CCJHyperLink(), CtlColor(), GetVisited(), OnClicked(), and SetVisited().

COLORREF CCJHyperLink::m_crHoverColor [protected]

Definition at line 95 of file CJHyperLink.h.

Referenced by CCJHyperLink(), CtlColor(), GetHoverColor(), and SetColors().

COLORREF CCJHyperLink::m_crLinkColor [protected]

Definition at line 94 of file CJHyperLink.h.

Referenced by CCJHyperLink(), CtlColor(), GetLinkColor(), and SetColors().

COLORREF CCJHyperLink::m_crVisitedColor [protected]

Definition at line 94 of file CJHyperLink.h.

Referenced by CCJHyperLink(), CtlColor(), GetVisitedColor(), and SetColors().

CFont CCJHyperLink::m_Font [protected]

Definition at line 101 of file CJHyperLink.h.

Referenced by PositionWindow(), PreSubclassWindow(), SetUnderline(), and ~CCJHyperLink().

HCURSOR CCJHyperLink::m_hLinkCursor [protected]

Definition at line 102 of file CJHyperLink.h.

Referenced by CCJHyperLink(), GetLinkCursor(), OnSetCursor(), SetDefaultCursor(), SetLinkCursor(), and ~CCJHyperLink().

CString CCJHyperLink::m_strURL [protected]

Definition at line 100 of file CJHyperLink.h.

Referenced by CCJHyperLink(), GetURL(), OnClicked(), PreSubclassWindow(), and SetURL().

CToolTipCtrl CCJHyperLink::m_ToolTip [protected]

Definition at line 103 of file CJHyperLink.h.

Referenced by PreSubclassWindow(), and SetURL().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJHyperLink.h
  • WinCvs/CJLib/CJLibrary/CJHyperLink.cpp
Generated on Sat Aug 7 22:49:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJListBox Class Reference

CCJListBox Class Reference

#include <CJListBox.h>

Inheritance diagram for CCJListBox:

[legend]
Collaboration diagram for CCJListBox:

[legend]
List of all members.

Public Member Functions

CCJListBox ()
virtual | ~CCJListBox ()

Protected Member Functions

afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Constructor & Destructor Documentation

CCJListBox::CCJListBox ( )

Definition at line 33 of file CJListBox.cpp.

00034 {
00035     // TODO: add construction code here.
00036 }

CCJListBox::~CCJListBox ( ) [virtual]

Definition at line 38 of file CJListBox.cpp.

00039 {
00040     // TODO: add destruction code here.
00041 }

Member Function Documentation

BOOL CCJListBox::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 55 of file CJListBox.cpp.

00056 {
00057     // KStowell - overridden for flicker-free drawing.
00058     UNUSED_ALWAYS(pDC);
00059     return TRUE;
00060 }

void CCJListBox::OnPaint ( ) [protected]

Definition at line 62 of file CJListBox.cpp.

00063 {
00064     CPaintDC dc(this); // device context for painting
00065
00066     // KStowell - Get the client rect.
00067     CRect rcClient, rcClip;
00068     dc.GetClipBox( &rcClip );
00069     GetClientRect( &rcClient );
00070
00071     // KStowell - Create a memory device-context. This is done to help reduce
00072     // screen flicker, since we will paint the entire control to the
00073     // off screen device context first.
00074     CDC memDC;
00075     CBitmap bitmap;
00076     memDC.CreateCompatibleDC(&dc);
00077     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00078     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00079
00080     // KStowell - Repaint the background.
00081     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00082
00083     // let the control do its default drawing.
00084     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00085
00086     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00087     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00088         rcClip.left, rcClip.top, SRCCOPY );
00089
00090     // KStowell - Cleanup resources.
00091     memDC.SelectObject(pOldBitmap);
00092     memDC.DeleteDC();
00093     bitmap.DeleteObject();
00094 }

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJListBox.h
  • WinCvs/CJLib/CJLibrary/CJListBox.cpp
Generated on Sat Aug 7 22:49:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJListCtrl Class Reference

CCJListCtrl Class Reference

#include <CJListCtrl.h>

Inheritance diagram for CCJListCtrl:

[legend]
Collaboration diagram for CCJListCtrl:

[legend]
List of all members.

Public Member Functions

CCJListCtrl ()
virtual | ~CCJListCtrl ()
virtual int | GetStoredWidth (int nCol)
virtual void | AutoSizeColumn (int nCol=-1)
virtual void | SetColumnWidth (int nCol)
virtual void | LoadColumnWidths ()
virtual void | SaveColumnWidths ()
virtual void | AutoSaveColumns (LPCTSTR lpszSection=NULL, LPCTSTR lpszEntry=NULL, LPCTSTR lpszDefault=NULL)
virtual bool | SubclassHeader (bool bBoldFont=false)
virtual bool | SortList (int nCol, bool bAscending)
virtual void | SetExtendedStyle (DWORD dwExStyle)
virtual DWORD | GetExtendedStyle ()
virtual void | DisableColumnSizing (bool bDisable)
virtual void | SetMinimumColSize (int nSize)
virtual int | HitTestEx (CPoint &point, int *col) const
virtual int | AddColumn (LPCTSTR lpszColHeading, int nWidth=-1, int nFormat=LVCFMT_LEFT)
virtual bool | BuildColumns (int nCols, int *nWidth, CString *strColString)
virtual bool | BuildColumns (int nCols, int *nWidth, int *nColString)
virtual void | SetRowColors (COLORREF clrText, COLORREF clrTextBk)
virtual int | GetColumnCount () const
virtual bool | CopyRow (int nFrom, int nTo)
virtual bool | MoveRow (int nFrom, int nTo)

Protected Member Functions

virtual BOOL | OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult)
afx_msg void | OnCustomDraw (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnDestroy ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Protected Attributes

int m_nMinColWidth
int m_nMaxColWidth
int m_nSortedCol
CCJFlatHeaderCtrl * m_pHeaderCtrl
CString | m_strSection
CString | m_strEntry
CString | m_strDefault
CListCtrl * | m_pListCtrl
COLORREF | m_clrText
COLORREF | m_clrTextBk
bool m_bNoColSizing
int m_nMinSize
bool m_bAscending

Private Attributes

bool m_bAutoSave

Constructor & Destructor Documentation

CCJListCtrl::CCJListCtrl ( )

Definition at line 88 of file CJListCtrl.cpp.

References m_bAscending, m_bAutoSave, m_bNoColSizing, m_clrText, m_clrTextBk, m_nMaxColWidth, m_nMinColWidth, m_nMinSize, m_nSortedCol, m_pHeaderCtrl, and NULL.

00089 {
00090     m_nMinSize      = 0;
00091     m_nMinColWidth  = 50;
00092     m_nMaxColWidth  = 500;
00093     m_nSortedCol    = -1;
00094     m_bAscending    = true;
00095     m_bAutoSave     = false;
00096     m_bNoColSizing  = false;
00097     m_pHeaderCtrl   = NULL;
00098     m_clrText       = ::GetSysColor(COLOR_WINDOWTEXT);
00099     m_clrTextBk     = ::GetSysColor(COLOR_WINDOW);
00100 }

CCJListCtrl::~CCJListCtrl ( ) [virtual]

Definition at line 102 of file CJListCtrl.cpp.

References _delete, and m_pHeaderCtrl.

00103 {
00104     _delete( m_pHeaderCtrl );
00105 }

Member Function Documentation

int CCJListCtrl::AddColumn | ( | LPCTSTR | lpszColHeading,
 |  | int | nWidth = -1,
 |  | int | nFormat = LVCFMT_LEFT
 | ) | [virtual]

Definition at line 291 of file CJListCtrl.cpp.

Referenced by BuildColumns().

00292 {
00293     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00294     int nColumnCount = pHeader->GetItemCount();
00295
00296     if( nWidth == -1 )
00297     {
00298         // The line below return zero for ICON views
00299         //nWidth = GetColumnWidth( nColumnCount - 1 );
00300
00301         // Get the column width of the previous column from header control
00302         HD_ITEM hd_item;
00303         hd_item.mask = HDI_WIDTH;               //indicate that we want the width
00304         pHeader->GetItem( nColumnCount - 1, &hd_item );
00305         nWidth = hd_item.cxy;
00306     }
00307     return InsertColumn( nColumnCount, lpszColHeading, nFormat, nWidth, nColumnCount );
00308 }

void CCJListCtrl::AutoSaveColumns | ( | LPCTSTR | lpszSection = NULL,
 |  | LPCTSTR | lpszEntry = NULL,
 |  | LPCTSTR | lpszDefault = NULL
 | ) | [virtual]

Definition at line 405 of file CJListCtrl.cpp.

References LoadColumnWidths(), m_bAutoSave, m_strDefault, m_strEntry, m_strSection, and NULL.

00406 {
00407     m_bAutoSave = true;
00408
00409     // initialize registry strings.
00410     if( lpszSection == NULL ) m_strSection = _T("Settings");
00411     else m_strSection = lpszSection;
00412
00413     if( lpszEntry == NULL ) m_strEntry = _T("Column Info");
00414     else m_strEntry = lpszEntry;
00415
00416     if( lpszDefault == NULL ) m_strDefault = _T("");
00417     else m_strDefault = lpszDefault;
00418
00419     LoadColumnWidths();
00420 }

Here is the call graph for this function:

void CCJListCtrl::AutoSizeColumn ( int nCol = -1 ) [virtual]

Definition at line 481 of file CJListCtrl.cpp.

References GetColumnCount(), m_nMaxColWidth, and m_nMinColWidth.

Referenced by SetColumnWidth().

00482 {
00483     // Call this after your list control is filled
00484     SetRedraw( false );
00485
00486     int nMinCol = nCol < 0 ? 0 : nCol;
00487     int nMaxCol = nCol < 0 ? GetColumnCount()-1 : nCol;
00488
00489     for (nCol = nMinCol; nCol <= nMaxCol; nCol++)
00490     {
00491         CListCtrl::SetColumnWidth( nCol, LVSCW_AUTOSIZE );
00492         int wc1 = GetColumnWidth( nCol );
00493
00494         CListCtrl::SetColumnWidth( nCol, LVSCW_AUTOSIZE_USEHEADER );
00495         int wc2 = GetColumnWidth( nCol );
00496         int wc = max( m_nMinColWidth, max( wc1, wc2 ));
00497
00498         if( wc > m_nMaxColWidth )
00499             wc = m_nMaxColWidth;
00500
00501         // set the column width.
00502         CListCtrl::SetColumnWidth( nCol,wc );
00503     }
00504
00505     SetRedraw();
00506 }

Here is the call graph for this function:

bool CCJListCtrl::BuildColumns | ( | int | nCols,
 |  | int * | nWidth,
 |  | int * | nColString
 | ) | [virtual]

Definition at line 310 of file CJListCtrl.cpp.

References AddColumn().

00311 {
00312     for( int i = 0; i < nCols; ++i ) {
00313         CString strTemp; strTemp.LoadString( nColString[i] );
00314         if(AddColumn(strTemp, nWidth[i])==-1)
00315             return false;
00316     }
00317
00318     return true;
00319 }

Here is the call graph for this function:

bool CCJListCtrl::BuildColumns | ( | int | nCols,
 |  | int * | nWidth,
 |  | CString * | strColString
 | ) | [virtual]

Definition at line 321 of file CJListCtrl.cpp.

References AddColumn().

00322 {
00323     for( int i = 0; i < nCols; ++i ) {
00324         if(AddColumn(strColString[i], nWidth[i])==-1)
00325             return false;
00326     }
00327
00328     return true;
00329 }

Here is the call graph for this function:

bool CCJListCtrl::CopyRow | ( | int | nFrom,
 |  | int | nTo
 | ) | [virtual]

Definition at line 148 of file CJListCtrl.cpp.

References GetColumnCount().

00149 {
00150     //Can't move to the same place, or from or to a negative index
00151     if(nFrom == nTo || nFrom < 0 || nTo < 0)
00152         return false;
00153
00154     //Copy the row to the new index
00155     InsertItem(nTo, GetItemText(nFrom, 0));
00156
00157     //If row has been inserted before original
00158     //increment the original
00159     if(nFrom > nTo)
00160         nFrom++;
00161
00162     //Loop through subitems
00163     for(int i = 1; i < GetColumnCount(); i++)
00164     {
00165         SetItemText(nTo, i, GetItemText(nFrom, i));
00166     }
00167
00168     return true;
00169 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJListCtrl::DisableColumnSizing ( bool bDisable ) [virtual]

Definition at line 276 of file CJListCtrl.h.

References _CJXLIB_INLINE, and m_bNoColSizing.

00277     { m_bNoColSizing = bDisable; }

int CCJListCtrl::GetColumnCount ( ) const [virtual]

Definition at line 173 of file CJListCtrl.cpp.

Referenced by AutoSizeColumn(), and CopyRow().

00174 {
00175     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00176     return pHeader->GetItemCount();
00177 }

_CJXLIB_INLINE DWORD CCJListCtrl::GetExtendedStyle ( ) [virtual]

Definition at line 264 of file CJListCtrl.h.

Referenced by SetExtendedStyle().

00265     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); }

int CCJListCtrl::GetStoredWidth ( int nCol ) [virtual]

Definition at line 458 of file CJListCtrl.cpp.

References m_strDefault, m_strEntry, and m_strSection.

Referenced by SetColumnWidth().

00459 {
00460     // get the value from the registry.
00461     CString strValue = AfxGetApp()->GetProfileString(
00462         m_strSection, m_strEntry, m_strDefault );
00463
00464     // extract the sub string to get the column width.
00465     CString strSubString;
00466     AfxExtractSubString( strSubString, strValue, nCol, _T(','));
00467
00468     // return the width from the registry.
00469     return _ttoi( strSubString );
00470 }

int CCJListCtrl::HitTestEx | ( | CPoint & | point,
 |  | int * | col
 | ) | const [virtual]

Definition at line 338 of file CJListCtrl.cpp.

References NULL.

00339 {
00340     int colnum = 0;
00341     int row = HitTest( point, NULL );
00342
00343     if( nCol ) *nCol = 0;
00344
00345     // Make sure that the ListView is in LVS_REPORT
00346     if( (GetWindowLong(m_hWnd, GWL_STYLE) & LVS_TYPEMASK) != LVS_REPORT )
00347         return row;
00348
00349     // Get the top and bottom row visible
00350     row = GetTopIndex();
00351     int bottom = row + GetCountPerPage();
00352     if( bottom > GetItemCount() )
00353         bottom = GetItemCount();
00354
00355     // Get the number of columns
00356     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00357     int nColumnCount = pHeader->GetItemCount();
00358
00359     // Loop through the visible rows
00360     for( ;row <= bottom;row++)
00361     {
00362         // Get bounding rect of item and check whether point falls in it.
00363         CRect rect;
00364         GetItemRect( row, &rect, LVIR_BOUNDS );
00365         if( rect.PtInRect(point) )
00366         {
00367             // Now find the column
00368             for( colnum = 0; colnum < nColumnCount; colnum++ )
00369             {
00370                 int colwidth = GetColumnWidth(colnum);
00371                 if( point.x >= rect.left
00372                     && point.x <= (rect.left + colwidth ) )
00373                 {
00374                     if( nCol ) *nCol = colnum;
00375                     return row;
00376                 }
00377                 rect.left += colwidth;
00378             }
00379         }
00380     }
00381     return -1;
00382 }

void CCJListCtrl::LoadColumnWidths ( ) [virtual]

Definition at line 439 of file CJListCtrl.cpp.

References SetColumnWidth().

Referenced by AutoSaveColumns().

00440 {
00441     // get a pointer to the header control.
00442     CHeaderCtrl* pHeader = DYNAMIC_DOWNCAST(CHeaderCtrl, GetDlgItem(0));
00443     ASSERT_KINDOF( CHeaderCtrl, pHeader );
00444
00445     for( int i = 0; i < pHeader->GetItemCount(); ++i )
00446         SetColumnWidth(i);
00447 }

Here is the call graph for this function:

bool CCJListCtrl::MoveRow | ( | int | nFrom,
 |  | int | nTo
 | ) | [virtual]

Definition at line 123 of file CJListCtrl.cpp.

00124 {
00125     //Can't move to the same place, or from or to a negative index
00126     if(nFrom == nTo || nFrom < 0 || nTo < 0)
00127         return false;
00128
00129     //First Copy the row to the new location
00130     if(CopyRow(nFrom, nTo))
00131     {
00132         //If we have just inserted a row before
00133         //this one in the list, we need to increment
00134         //our index.
00135         if(nFrom > nTo)
00136             DeleteItem(nFrom + 1);
00137         else
00138             DeleteItem(nFrom);
00139
00140         return true;
00141     }
00142     else
00143         return false;
00144 }

void CCJListCtrl::OnCustomDraw | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 181 of file CJListCtrl.cpp.

References m_clrText, and m_clrTextBk.

00182 {
00183     LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pNMHDR;
00184
00185     switch(lplvcd->nmcd.dwDrawStage)
00186     {
00187     case CDDS_PREPAINT:
00188         // Request prepaint notifications for each item.
00189         *pResult = CDRF_NOTIFYITEMDRAW;
00190         break;
00191
00192     case CDDS_ITEMPREPAINT: // Requested notification
00193         if(lplvcd->nmcd.dwItemSpec % 2)
00194         {
00195             lplvcd->clrText   = m_clrText;
00196             lplvcd->clrTextBk = m_clrTextBk;
00197         }
00198         *pResult = CDRF_DODEFAULT;
00199         break;
00200     }
00201 }

void CCJListCtrl::OnDestroy ( ) [protected]

Definition at line 472 of file CJListCtrl.cpp.

References m_bAutoSave, and SaveColumnWidths().

00473 {
00474     if( m_bAutoSave ) SaveColumnWidths();
00475     CListCtrl::OnDestroy();
00476 }

Here is the call graph for this function:

BOOL CCJListCtrl::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 508 of file CJListCtrl.cpp.

00509 {
00510     // KStowell - overridden for flicker-free drawing.
00511     UNUSED_ALWAYS(pDC);
00512     return TRUE;
00513 }

BOOL CCJListCtrl::OnNotify | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pResult
 | ) | [protected, virtual]

Definition at line 203 of file CJListCtrl.cpp.

References m_bAscending, m_bNoColSizing, m_nMinSize, m_nSortedCol, m_pHeaderCtrl, CCJFlatHeaderCtrl::SetSortImage(), and SortList().

00204 {
00205     HD_NOTIFY *pHDNotify = (HD_NOTIFY*)lParam;
00206
00207     switch( pHDNotify->hdr.code )
00208     {
00209     // Sorting the list when user clicks on column header by Zafir Anjum.
00210     // http://www.codeguru.com/listview/sort_on_col_click.shtml
00211     case HDN_ITEMCLICKA:
00212     case HDN_ITEMCLICKW:
00213         {
00214             if( pHDNotify->iButton == 0 )
00215             {
00216                 // set the sort order.
00217                 if( pHDNotify->iItem == m_nSortedCol )
00218                     m_bAscending = !m_bAscending;
00219                 else
00220                     m_bAscending = true;
00221
00222                 // save the column index.
00223                 m_nSortedCol = pHDNotify->iItem;
00224
00225                 // virtual call to sort list.
00226                 SortList( m_nSortedCol, m_bAscending );
00227
00228                 // set the sort image in the header control.
00229                 if( m_pHeaderCtrl && m_pHeaderCtrl->GetSafeHwnd( ))
00230                     m_pHeaderCtrl->SetSortImage( m_nSortedCol, m_bAscending );
00231             }
00232         }
00233         break;
00234
00235     // How to force a minimum column width Cees Mechielsen.
00236     // http://www.codeguru.com/mfc/comments/866.shtml
00237     case HDN_ITEMCHANGINGA:
00238     case HDN_ITEMCHANGINGW:
00239     case HDN_ENDTRACK:
00240         {
00241             if( pHDNotify->pitem->mask & HDI_WIDTH &&
00242                 pHDNotify->pitem->cxy < m_nMinSize &&
00243                 pHDNotify->pitem->cxy >= 0 )
00244             {
00245                 pHDNotify->pitem->cxy = m_nMinSize; // Set the column width
00246             }
00247         }
00248         break;
00249
00250     // Prevent CListCtrl column resizing by Zafir Anjum.
00251     // http://www.codeguru.com/listview/no_col_resize.shtml
00252     case HDN_DIVIDERDBLCLICKA:
00253     case HDN_DIVIDERDBLCLICKW:
00254     case HDN_BEGINTRACKW:
00255     case HDN_BEGINTRACKA:
00256         {
00257             if(m_bNoColSizing)
00258             {
00259                 *pResult = TRUE;                // disable tracking
00260                 return TRUE;                    // Processed message
00261             }
00262             break;
00263         }
00264     }
00265
00266     return CListCtrl::OnNotify(wParam, lParam, pResult);
00267 }

Here is the call graph for this function:

void CCJListCtrl::OnPaint ( ) [protected]

Definition at line 515 of file CJListCtrl.cpp.

00516 {
00517     CPaintDC dc(this); // device context for painting
00518
00519     // KStowell - Get the client rect.
00520     CRect rcClient, rcClip;
00521     dc.GetClipBox( &rcClip );
00522     GetClientRect( &rcClient );
00523
00524     // Exclude the header control from being painted over.
00525     CWnd* pWnd = GetDlgItem(0);
00526     if(pWnd && pWnd->IsWindowVisible()) {
00527         CRect rcItem;
00528         pWnd->GetClientRect(&rcItem);
00529         dc.ExcludeClipRect(&rcItem);
00530     }
00531
00532     // KStowell - Create a memory device-context. This is done to help reduce
00533     // screen flicker, since we will paint the entire control to the
00534     // off screen device context first.
00535     CDC memDC;
00536     CBitmap bitmap;
00537     memDC.CreateCompatibleDC(&dc);
00538     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00539     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00540
00541     // KStowell - Repaint the background.
00542     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00543
00544     // let the control do its default drawing.
00545     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00546
00547     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00548     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00549         rcClip.left, rcClip.top, SRCCOPY );
00550
00551     // KStowell - Cleanup resources.
00552     memDC.SelectObject(pOldBitmap);
00553     memDC.DeleteDC();
00554     bitmap.DeleteObject();
00555 }

void CCJListCtrl::SaveColumnWidths ( ) [virtual]

Definition at line 422 of file CJListCtrl.cpp.

References m_strEntry, and m_strSection.

Referenced by OnDestroy().

00423 {
00424     // get a pointer to the header control.
00425     CHeaderCtrl* pHeader = DYNAMIC_DOWNCAST(CHeaderCtrl, GetDlgItem(0));
00426     ASSERT_KINDOF( CHeaderCtrl, pHeader );
00427
00428     CString strValue;
00429     for( int i = 0; i < pHeader->GetItemCount(); ++i )
00430     {
00431         CString strTemp;
00432         strTemp.Format(_T("%d,"), GetColumnWidth( i ));
00433         strValue += strTemp;
00434     }
00435
00436     AfxGetApp()->WriteProfileString( m_strSection, m_strEntry, strValue );
00437 }

void CCJListCtrl::SetColumnWidth ( int nCol ) [virtual]

Definition at line 449 of file CJListCtrl.cpp.

References AutoSizeColumn(), GetStoredWidth(), and m_nMinColWidth.

Referenced by LoadColumnWidths().

00450 {
00451     int nWidth = GetStoredWidth( nCol );
00452     if( nWidth > m_nMinColWidth )
00453         CListCtrl::SetColumnWidth( nCol, nWidth );
00454     else
00455         AutoSizeColumn( nCol );
00456 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJListCtrl::SetExtendedStyle ( DWORD dwExStyle ) [virtual]

Definition at line 267 of file CJListCtrl.h.

References _CJXLIB_INLINE, and GetExtendedStyle().

00268     { ASSERT(::IsWindow(m_hWnd)); SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, GetExtendedStyle()|dwExStyle); }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJListCtrl::SetMinimumColSize ( int nSize ) [virtual]

Definition at line 273 of file CJListCtrl.h.

References _CJXLIB_INLINE, and m_nMinSize.

00274     { m_nMinSize = nSize; }

_CJXLIB_INLINE void CCJListCtrl::SetRowColors | ( | COLORREF | clrText,
 |  | COLORREF | clrTextBk
 | ) | [virtual]

Definition at line 270 of file CJListCtrl.h.

References _CJXLIB_INLINE, m_clrText, and m_clrTextBk.

00271     { m_clrText = clrText; m_clrTextBk = clrTextBk; }

bool CCJListCtrl::SortList | ( | int | nCol,
 |  | bool | bAscending
 | ) | [virtual]

Definition at line 269 of file CJListCtrl.cpp.

Referenced by OnNotify().

00270 {
00271 #ifdef _DEBUG
00272     TRACE2("Column sort on column index %d, ascending=%d", nCol, bAscending);
00273 #else
00274     UNUSED_ALWAYS( nCol );
00275     UNUSED_ALWAYS( bAscending );
00276 #endif
00277
00278     return true;
00279 }

bool CCJListCtrl::SubclassHeader ( bool bBoldFont = false ) [virtual]

Definition at line 384 of file CJListCtrl.cpp.

References CCJFlatHeaderCtrl::InitializeHeader(), and m_pHeaderCtrl.

00385 {
00386     // allocate memory for the flat header.
00387     m_pHeaderCtrl = new CCJFlatHeaderCtrl;
00388     ASSERT( m_pHeaderCtrl );
00389
00390     // get the window handle to the existing header
00391     // control.
00392     HWND hWnd = GetDlgItem(0)->GetSafeHwnd();
00393     ASSERT( hWnd );
00394
00395     // subclass the flat header control.
00396     if( !m_pHeaderCtrl->SubclassWindow( hWnd ))
00397         return false;
00398
00399     // finish header initialization.
00400     m_pHeaderCtrl->InitializeHeader( bBoldFont );
00401
00402     return true;
00403 }

Here is the call graph for this function:

Member Data Documentation

bool CCJListCtrl::m_bAscending [protected]

Definition at line 112 of file CJListCtrl.h.

Referenced by CCJListCtrl(), and OnNotify().

bool CCJListCtrl::m_bAutoSave [private]

Definition at line 116 of file CJListCtrl.h.

Referenced by AutoSaveColumns(), CCJListCtrl(), and OnDestroy().

bool CCJListCtrl::m_bNoColSizing [protected]

Definition at line 110 of file CJListCtrl.h.

Referenced by CCJListCtrl(), DisableColumnSizing(), and OnNotify().

COLORREF CCJListCtrl::m_clrText [protected]

Definition at line 108 of file CJListCtrl.h.

Referenced by CCJListCtrl(), OnCustomDraw(), and SetRowColors().

COLORREF CCJListCtrl::m_clrTextBk [protected]

Definition at line 109 of file CJListCtrl.h.

Referenced by CCJListCtrl(), OnCustomDraw(), and SetRowColors().

int CCJListCtrl::m_nMaxColWidth [protected]

Definition at line 101 of file CJListCtrl.h.

Referenced by AutoSizeColumn(), and CCJListCtrl().

int CCJListCtrl::m_nMinColWidth [protected]

Definition at line 100 of file CJListCtrl.h.

Referenced by AutoSizeColumn(), CCJListCtrl(), and SetColumnWidth().

int CCJListCtrl::m_nMinSize [protected]

Definition at line 111 of file CJListCtrl.h.

Referenced by CCJListCtrl(), OnNotify(), and SetMinimumColSize().

int CCJListCtrl::m_nSortedCol [protected]

Definition at line 102 of file CJListCtrl.h.

Referenced by CCJListCtrl(), and OnNotify().

CCJFlatHeaderCtrl* CCJListCtrl::m_pHeaderCtrl [protected]

Definition at line 103 of file CJListCtrl.h.

Referenced by CCJListCtrl(), OnNotify(), SubclassHeader(), and ~CCJListCtrl().

CListCtrl* CCJListCtrl::m_pListCtrl [protected]

Definition at line 107 of file CJListCtrl.h.

CString CCJListCtrl::m_strDefault [protected]

Definition at line 106 of file CJListCtrl.h.

Referenced by AutoSaveColumns(), and GetStoredWidth().

CString CCJListCtrl::m_strEntry [protected]

Definition at line 105 of file CJListCtrl.h.

Referenced by AutoSaveColumns(), GetStoredWidth(), and SaveColumnWidths().

CString CCJListCtrl::m_strSection [protected]

Definition at line 104 of file CJListCtrl.h.

Referenced by AutoSaveColumns(), GetStoredWidth(), and SaveColumnWidths().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJListCtrl.h
  • WinCvs/CJLib/CJLibrary/CJListCtrl.cpp
Generated on Sat Aug 7 22:49:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJListView Class Reference

CCJListView Class Reference

#include <CJListView.h>

Inheritance diagram for CCJListView:

[legend]
Collaboration diagram for CCJListView:

[legend]
List of all members.

Public Member Functions

CCJListView ()
virtual | ~CCJListView ()
virtual int | GetStoredWidth (int nCol)
virtual void | AutoSizeColumn (int nCol=-1)
virtual void | SetColumnWidth (int nCol)
virtual void | LoadColumnWidths ()
virtual void | SaveColumnWidths ()
virtual void | AutoSaveColumns (LPCTSTR lpszSection=NULL, LPCTSTR lpszEntry=NULL, LPCTSTR lpszDefault=NULL)
virtual bool | SubclassHeader (bool bBoldFont=false)
virtual bool | SortList (int nCol, bool bAscending)
virtual void | SetExtendedStyle (DWORD dwExStyle)
virtual DWORD | GetExtendedStyle ()
virtual void | DisableColumnSizing (bool bDisable)
virtual void | SetMinimumColSize (int nSize)
virtual int | HitTestEx (CPoint &point, int *col) const
virtual int | AddColumn (LPCTSTR lpszColHeading, int nWidth=-1, int nFormat=LVCFMT_LEFT)
virtual bool | BuildColumns (int nCols, int *nWidth, CString *strColString)
virtual bool | BuildColumns (int nCols, int *nWidth, int *nColString)
virtual void | SetRowColors (COLORREF clrText, COLORREF clrTextBk)
virtual int | GetColumnCount () const
virtual bool | CopyRow (int nFrom, int nTo)
virtual bool | MoveRow (int nFrom, int nTo)
virtual void | OnInitialUpdate ()

Protected Member Functions

virtual void | OnDraw (CDC *pDC)
virtual BOOL | OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult)
afx_msg void | OnCustomDraw (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnDestroy ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Protected Attributes

int m_nMinColWidth
int m_nMaxColWidth
int m_nSortedCol
CCJFlatHeaderCtrl * m_pHeaderCtrl
CString | m_strSection
CString | m_strEntry
CString | m_strDefault
CListCtrl * | m_pListCtrl
COLORREF | m_clrText
COLORREF | m_clrTextBk
bool m_bNoColSizing
int m_nMinSize

Private Attributes

bool m_bAutoSave
bool m_bAscending

Constructor & Destructor Documentation

CCJListView::CCJListView ( )

Definition at line 84 of file CJListView.cpp.

References NULL.

00085 {
00086     m_nMinSize      = 0;
00087     m_nMinColWidth  = 50;
00088     m_nMaxColWidth  = 500;
00089     m_nSortedCol    = -1;
00090     m_bAscending    = true;
00091     m_bAutoSave     = false;
00092     m_bNoColSizing  = false;
00093     m_pHeaderCtrl   = NULL;
00094     m_pListCtrl     = NULL;
00095     m_clrText       = ::GetSysColor(COLOR_WINDOWTEXT);
00096     m_clrTextBk     = ::GetSysColor(COLOR_WINDOW);
00097 }

CCJListView::~CCJListView ( ) [virtual]

Definition at line 99 of file CJListView.cpp.

References _delete, and m_pHeaderCtrl.

00100 {
00101     _delete( m_pHeaderCtrl );
00102 }

Member Function Documentation

int CCJListView::AddColumn | ( | LPCTSTR | lpszColHeading,
 |  | int | nWidth = -1,
 |  | int | nFormat = LVCFMT_LEFT
 | ) | [virtual]

Definition at line 317 of file CJListView.cpp.

References m_pListCtrl.

Referenced by BuildColumns().

00318 {
00319     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00320     int nColumnCount = pHeader->GetItemCount();
00321
00322     if( nWidth == -1 )
00323     {
00324         // The line below return zero for ICON views
00325         //nWidth = GetColumnWidth( nColumnCount - 1 );
00326
00327         // Get the column width of the previous column from header control
00328         HD_ITEM hd_item;
00329         hd_item.mask = HDI_WIDTH;               //indicate that we want the width
00330         pHeader->GetItem( nColumnCount - 1, &hd_item );
00331         nWidth = hd_item.cxy;
00332     }
00333     return m_pListCtrl->InsertColumn( nColumnCount, lpszColHeading, nFormat, nWidth, nColumnCount );
00334 }

void CCJListView::AutoSaveColumns | ( | LPCTSTR | lpszSection = NULL,
 |  | LPCTSTR | lpszEntry = NULL,
 |  | LPCTSTR | lpszDefault = NULL
 | ) | [virtual]

Definition at line 431 of file CJListView.cpp.

References LoadColumnWidths(), m_bAutoSave, m_strDefault, m_strEntry, m_strSection, and NULL.

00432 {
00433     m_bAutoSave = true;
00434
00435     // initialize registry strings.
00436     if( lpszSection == NULL ) m_strSection = _T("Settings");
00437     else m_strSection = lpszSection;
00438
00439     if( lpszEntry == NULL ) m_strEntry = _T("Column Info");
00440     else m_strEntry = lpszEntry;
00441
00442     if( lpszDefault == NULL ) m_strDefault = _T("");
00443     else m_strDefault = lpszDefault;
00444
00445     LoadColumnWidths();
00446 }

Here is the call graph for this function:

void CCJListView::AutoSizeColumn ( int nCol = -1 ) [virtual]

Definition at line 507 of file CJListView.cpp.

References GetColumnCount(), m_nMaxColWidth, m_nMinColWidth, and m_pListCtrl.

Referenced by SetColumnWidth().

00508 {
00509     // Call this after your list control is filled
00510     SetRedraw( false );
00511
00512     int nMinCol = nCol < 0 ? 0 : nCol;
00513     int nMaxCol = nCol < 0 ? GetColumnCount()-1 : nCol;
00514
00515     for (nCol = nMinCol; nCol <= nMaxCol; nCol++)
00516     {
00517         m_pListCtrl->SetColumnWidth( nCol, LVSCW_AUTOSIZE );
00518         int wc1 = m_pListCtrl->GetColumnWidth( nCol );
00519
00520         m_pListCtrl->SetColumnWidth( nCol, LVSCW_AUTOSIZE_USEHEADER );
00521         int wc2 = m_pListCtrl->GetColumnWidth( nCol );
00522         int wc = max( m_nMinColWidth, max( wc1, wc2 ));
00523
00524         if( wc > m_nMaxColWidth )
00525             wc = m_nMaxColWidth;
00526
00527         // set the column width.
00528         m_pListCtrl->SetColumnWidth( nCol,wc );
00529     }
00530
00531     SetRedraw();
00532 }

Here is the call graph for this function:

bool CCJListView::BuildColumns | ( | int | nCols,
 |  | int * | nWidth,
 |  | int * | nColString
 | ) | [virtual]

Definition at line 336 of file CJListView.cpp.

References AddColumn().

00337 {
00338     for( int i = 0; i < nCols; ++i ) {
00339         CString strTemp; strTemp.LoadString( nColString[i] );
00340         if(AddColumn(strTemp, nWidth[i])==-1)
00341             return false;
00342     }
00343
00344     return true;
00345 }

Here is the call graph for this function:

bool CCJListView::BuildColumns | ( | int | nCols,
 |  | int * | nWidth,
 |  | CString * | strColString
 | ) | [virtual]

Definition at line 347 of file CJListView.cpp.

References AddColumn().

00348 {
00349     for( int i = 0; i < nCols; ++i ) {
00350         if(AddColumn(strColString[i], nWidth[i])==-1)
00351             return false;
00352     }
00353
00354     return true;
00355 }

Here is the call graph for this function:

bool CCJListView::CopyRow | ( | int | nFrom,
 |  | int | nTo
 | ) | [virtual]

Definition at line 174 of file CJListView.cpp.

References GetColumnCount(), and m_pListCtrl.

Referenced by MoveRow().

00175 {
00176     //Can't move to the same place, or from or to a negative index
00177     if(nFrom == nTo || nFrom < 0 || nTo < 0)
00178         return false;
00179
00180     //Copy the row to the new index
00181     m_pListCtrl->InsertItem(nTo, m_pListCtrl->GetItemText(nFrom, 0));
00182
00183     //If row has been inserted before original
00184     //increment the original
00185     if(nFrom > nTo)
00186         nFrom++;
00187
00188     //Loop through subitems
00189     for(int i = 1; i < GetColumnCount(); i++)
00190     {
00191         m_pListCtrl->SetItemText(nTo, i, m_pListCtrl->GetItemText(nFrom, i));
00192     }
00193
00194     return true;
00195 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJListView::DisableColumnSizing ( bool bDisable ) [virtual]

Definition at line 283 of file CJListView.h.

References _CJXLIB_INLINE, and m_bNoColSizing.

00284     { m_bNoColSizing = bDisable; }

int CCJListView::GetColumnCount ( ) const [virtual]

Definition at line 199 of file CJListView.cpp.

References m_pListCtrl.

Referenced by AutoSizeColumn(), and CopyRow().

00200 {
00201     CHeaderCtrl* pHeader = (CHeaderCtrl*)m_pListCtrl->GetDlgItem(0);
00202     return pHeader->GetItemCount();
00203 }

_CJXLIB_INLINE DWORD CCJListView::GetExtendedStyle ( ) [virtual]

Definition at line 271 of file CJListView.h.

Referenced by SetExtendedStyle().

00272     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); }

int CCJListView::GetStoredWidth ( int nCol ) [virtual]

Definition at line 484 of file CJListView.cpp.

References m_strDefault, m_strEntry, and m_strSection.

Referenced by SetColumnWidth().

00485 {
00486     // get the value from the registry.
00487     CString strValue = AfxGetApp()->GetProfileString(
00488         m_strSection, m_strEntry, m_strDefault );
00489
00490     // extract the sub string to get the column width.
00491     CString strSubString;
00492     AfxExtractSubString( strSubString, strValue, nCol, _T(','));
00493
00494     // return the width from the registry.
00495     return _ttoi( strSubString );
00496 }

int CCJListView::HitTestEx | ( | CPoint & | point,
 |  | int * | col
 | ) | const [virtual]

Definition at line 364 of file CJListView.cpp.

References m_pListCtrl, and NULL.

00365 {
00366     int colnum = 0;
00367     int row = m_pListCtrl->HitTest( point, NULL );
00368
00369     if( nCol ) *nCol = 0;
00370
00371     // Make sure that the ListView is in LVS_REPORT
00372     if( (GetWindowLong(m_hWnd, GWL_STYLE) & LVS_TYPEMASK) != LVS_REPORT )
00373         return row;
00374
00375     // Get the top and bottom row visible
00376     row = m_pListCtrl->GetTopIndex();
00377     int bottom = row + m_pListCtrl->GetCountPerPage();
00378     if( bottom > m_pListCtrl->GetItemCount() )
00379         bottom = m_pListCtrl->GetItemCount();
00380
00381     // Get the number of columns
00382     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00383     int nColumnCount = pHeader->GetItemCount();
00384
00385     // Loop through the visible rows
00386     for( ;row <= bottom;row++)
00387     {
00388         // Get bounding rect of item and check whether point falls in it.
00389         CRect rect;
00390         m_pListCtrl->GetItemRect( row, &rect, LVIR_BOUNDS );
00391         if( rect.PtInRect(point) )
00392         {
00393             // Now find the column
00394             for( colnum = 0; colnum < nColumnCount; colnum++ )
00395             {
00396                 int colwidth = m_pListCtrl->GetColumnWidth(colnum);
00397                 if( point.x >= rect.left
00398                     && point.x <= (rect.left + colwidth ) )
00399                 {
00400                     if( nCol ) *nCol = colnum;
00401                     return row;
00402                 }
00403                 rect.left += colwidth;
00404             }
00405         }
00406     }
00407     return -1;
00408 }

void CCJListView::LoadColumnWidths ( ) [virtual]

Definition at line 465 of file CJListView.cpp.

References SetColumnWidth().

Referenced by AutoSaveColumns().

00466 {
00467     // get a pointer to the header control.
00468     CHeaderCtrl* pHeader = DYNAMIC_DOWNCAST(CHeaderCtrl, GetDlgItem(0));
00469     ASSERT_KINDOF( CHeaderCtrl, pHeader );
00470
00471     for( int i = 0; i < pHeader->GetItemCount(); ++i )
00472         SetColumnWidth(i);
00473 }

Here is the call graph for this function:

bool CCJListView::MoveRow | ( | int | nFrom,
 |  | int | nTo
 | ) | [virtual]

Definition at line 149 of file CJListView.cpp.

References CopyRow(), and m_pListCtrl.

00150 {
00151     //Can't move to the same place, or from or to a negative index
00152     if(nFrom == nTo || nFrom < 0 || nTo < 0)
00153         return false;
00154
00155     //First Copy the row to the new location
00156     if(CopyRow(nFrom, nTo))
00157     {
00158         //If we have just inserted a row before
00159         //this one in the list, we need to increment
00160         //our index.
00161         if(nFrom > nTo)
00162             m_pListCtrl->DeleteItem(nFrom + 1);
00163         else
00164             m_pListCtrl->DeleteItem(nFrom);
00165
00166         return true;
00167     }
00168     else
00169         return false;
00170 }

Here is the call graph for this function:

void CCJListView::OnCustomDraw | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 207 of file CJListView.cpp.

References m_clrText, and m_clrTextBk.

00208 {
00209     LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pNMHDR;
00210
00211     switch(lplvcd->nmcd.dwDrawStage)
00212     {
00213     case CDDS_PREPAINT:
00214         // Request prepaint notifications for each item.
00215         *pResult = CDRF_NOTIFYITEMDRAW;
00216         break;
00217
00218     case CDDS_ITEMPREPAINT: // Requested notification
00219         if(lplvcd->nmcd.dwItemSpec % 2)
00220         {
00221             lplvcd->clrText   = m_clrText;
00222             lplvcd->clrTextBk = m_clrTextBk;
00223         }
00224         *pResult = CDRF_DODEFAULT;
00225         break;
00226     }
00227 }

void CCJListView::OnDestroy ( ) [protected]

Definition at line 498 of file CJListView.cpp.

References m_bAutoSave, and SaveColumnWidths().

00499 {
00500     if( m_bAutoSave ) SaveColumnWidths();
00501     CListView::OnDestroy();
00502 }

Here is the call graph for this function:

void CCJListView::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 116 of file CJListView.cpp.

00117 {
00118     UNUSED_ALWAYS( pDC );
00119 }

BOOL CCJListView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 534 of file CJListView.cpp.

00535 {
00536     CRect rectClient;
00537     GetClientRect( &rectClient );
00538     pDC->ExcludeClipRect( &rectClient );
00539     return CListView::OnEraseBkgnd(pDC);
00540 }

void CCJListView::OnInitialUpdate ( ) [virtual]

Definition at line 139 of file CJListView.cpp.

References m_pListCtrl.

00140 {
00141     CListView::OnInitialUpdate();
00142
00143     // Set a pointer to the list control.
00144     m_pListCtrl = &GetListCtrl();
00145 }

BOOL CCJListView::OnNotify | ( | WPARAM | wParam,
 |  | LPARAM | lParam,
 |  | LRESULT * | pResult
 | ) | [protected, virtual]

Definition at line 229 of file CJListView.cpp.

References m_bAscending, m_bNoColSizing, m_nMinSize, m_nSortedCol, m_pHeaderCtrl, CCJFlatHeaderCtrl::SetSortImage(), and SortList().

00230 {
00231     HD_NOTIFY *pHDNotify = (HD_NOTIFY*)lParam;
00232
00233     switch( pHDNotify->hdr.code )
00234     {
00235     // Sorting the list when user clicks on column header by Zafir Anjum.
00236     // http://www.codeguru.com/listview/sort_on_col_click.shtml
00237     case HDN_ITEMCLICKA:
00238     case HDN_ITEMCLICKW:
00239         {
00240             if( pHDNotify->iButton == 0 )
00241             {
00242                 // set the sort order.
00243                 if( pHDNotify->iItem == m_nSortedCol )
00244                     m_bAscending = !m_bAscending;
00245                 else
00246                     m_bAscending = true;
00247
00248                 // save the column index.
00249                 m_nSortedCol = pHDNotify->iItem;
00250
00251                 // virtual call to sort list.
00252                 SortList( m_nSortedCol, m_bAscending );
00253
00254                 // set the sort image in the header control.
00255                 if( m_pHeaderCtrl && m_pHeaderCtrl->GetSafeHwnd( ))
00256                     m_pHeaderCtrl->SetSortImage( m_nSortedCol, m_bAscending );
00257             }
00258         }
00259         break;
00260
00261     // How to force a minimum column width Cees Mechielsen.
00262     // http://www.codeguru.com/mfc/comments/866.shtml
00263     case HDN_ITEMCHANGINGA:
00264     case HDN_ITEMCHANGINGW:
00265     case HDN_ENDTRACK:
00266         {
00267             if( pHDNotify->pitem->mask & HDI_WIDTH &&
00268                 pHDNotify->pitem->cxy < m_nMinSize &&
00269                 pHDNotify->pitem->cxy >= 0 )
00270             {
00271                 pHDNotify->pitem->cxy = m_nMinSize; // Set the column width
00272             }
00273         }
00274         break;
00275
00276     // Prevent CListCtrl column resizing by Zafir Anjum.
00277     // http://www.codeguru.com/listview/no_col_resize.shtml
00278     case HDN_DIVIDERDBLCLICKA:
00279     case HDN_DIVIDERDBLCLICKW:
00280     case HDN_BEGINTRACKW:
00281     case HDN_BEGINTRACKA:
00282         {
00283             if(m_bNoColSizing)
00284             {
00285                 *pResult = TRUE;                // disable tracking
00286                 return TRUE;                    // Processed message
00287             }
00288             break;
00289         }
00290     }
00291
00292     return CListView::OnNotify(wParam, lParam, pResult);
00293 }

Here is the call graph for this function:

void CCJListView::SaveColumnWidths ( ) [virtual]

Definition at line 448 of file CJListView.cpp.

References m_pListCtrl, m_strEntry, and m_strSection.

Referenced by OnDestroy().

00449 {
00450     // get a pointer to the header control.
00451     CHeaderCtrl* pHeader = DYNAMIC_DOWNCAST(CHeaderCtrl, GetDlgItem(0));
00452     ASSERT_KINDOF( CHeaderCtrl, pHeader );
00453
00454     CString strValue;
00455     for( int i = 0; i < pHeader->GetItemCount(); ++i )
00456     {
00457         CString strTemp;
00458         strTemp.Format(_T("%d,"), m_pListCtrl->GetColumnWidth( i ));
00459         strValue += strTemp;
00460     }
00461
00462     AfxGetApp()->WriteProfileString( m_strSection, m_strEntry, strValue );
00463 }

void CCJListView::SetColumnWidth ( int nCol ) [virtual]

Definition at line 475 of file CJListView.cpp.

References AutoSizeColumn(), GetStoredWidth(), m_nMinColWidth, and m_pListCtrl.

Referenced by LoadColumnWidths().

00476 {
00477     int nWidth = GetStoredWidth( nCol );
00478     if( nWidth > m_nMinColWidth )
00479         m_pListCtrl->SetColumnWidth( nCol, nWidth );
00480     else
00481         AutoSizeColumn( nCol );
00482 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJListView::SetExtendedStyle ( DWORD dwExStyle ) [virtual]

Definition at line 274 of file CJListView.h.

References _CJXLIB_INLINE, and GetExtendedStyle().

00275     { ASSERT(::IsWindow(m_hWnd)); SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, GetExtendedStyle()|dwExStyle); }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJListView::SetMinimumColSize ( int nSize ) [virtual]

Definition at line 280 of file CJListView.h.

References _CJXLIB_INLINE, and m_nMinSize.

00281     { m_nMinSize = nSize; }

_CJXLIB_INLINE void CCJListView::SetRowColors | ( | COLORREF | clrText,
 |  | COLORREF | clrTextBk
 | ) | [virtual]

Definition at line 277 of file CJListView.h.

References _CJXLIB_INLINE, m_clrText, and m_clrTextBk.

00278     { m_clrText = clrText; m_clrTextBk = clrTextBk; }

bool CCJListView::SortList | ( | int | nCol,
 |  | bool | bAscending
 | ) | [virtual]

Definition at line 295 of file CJListView.cpp.

Referenced by OnNotify().

00296 {
00297 #ifdef _DEBUG
00298     TRACE2("Column sort on column index %d, ascending=%d", nCol, bAscending);
00299 #else
00300     UNUSED_ALWAYS( nCol );
00301     UNUSED_ALWAYS( bAscending );
00302 #endif
00303
00304     return true;
00305 }

bool CCJListView::SubclassHeader ( bool bBoldFont = false ) [virtual]

Definition at line 410 of file CJListView.cpp.

References CCJFlatHeaderCtrl::InitializeHeader(), and m_pHeaderCtrl.

00411 {
00412     // allocate memory for the flat header.
00413     m_pHeaderCtrl = new CCJFlatHeaderCtrl;
00414     ASSERT( m_pHeaderCtrl );
00415
00416     // get the window handle to the existing header
00417     // control.
00418     HWND hWnd = GetDlgItem(0)->GetSafeHwnd();
00419     ASSERT( hWnd );
00420
00421     // subclass the flat header control.
00422     if( !m_pHeaderCtrl->SubclassWindow( hWnd ))
00423         return false;
00424
00425     // finish header initialization.
00426     m_pHeaderCtrl->InitializeHeader( bBoldFont );
00427
00428     return true;
00429 }

Here is the call graph for this function:

Member Data Documentation

bool CCJListView::m_bAscending [private]

Definition at line 115 of file CJListView.h.

Referenced by OnNotify().

bool CCJListView::m_bAutoSave [private]

Definition at line 114 of file CJListView.h.

Referenced by AutoSaveColumns(), and OnDestroy().

bool CCJListView::m_bNoColSizing [protected]

Definition at line 109 of file CJListView.h.

Referenced by DisableColumnSizing(), and OnNotify().

COLORREF CCJListView::m_clrText [protected]

Definition at line 107 of file CJListView.h.

Referenced by OnCustomDraw(), and SetRowColors().

COLORREF CCJListView::m_clrTextBk [protected]

Definition at line 108 of file CJListView.h.

Referenced by OnCustomDraw(), and SetRowColors().

int CCJListView::m_nMaxColWidth [protected]

Definition at line 100 of file CJListView.h.

Referenced by AutoSizeColumn().

int CCJListView::m_nMinColWidth [protected]

Definition at line 99 of file CJListView.h.

Referenced by AutoSizeColumn(), and SetColumnWidth().

int CCJListView::m_nMinSize [protected]

Definition at line 110 of file CJListView.h.

Referenced by OnNotify(), and SetMinimumColSize().

int CCJListView::m_nSortedCol [protected]

Definition at line 101 of file CJListView.h.

Referenced by OnNotify().

CCJFlatHeaderCtrl* CCJListView::m_pHeaderCtrl [protected]

Definition at line 102 of file CJListView.h.

Referenced by OnNotify(), SubclassHeader(), and ~CCJListView().

CListCtrl* CCJListView::m_pListCtrl [protected]

Definition at line 106 of file CJListView.h.

Referenced by AddColumn(), AutoSizeColumn(), CopyRow(), GetColumnCount(), HitTestEx(), MoveRow(), OnInitialUpdate(), SaveColumnWidths(), and SetColumnWidth().

CString CCJListView::m_strDefault [protected]

Definition at line 105 of file CJListView.h.

Referenced by AutoSaveColumns(), and GetStoredWidth().

CString CCJListView::m_strEntry [protected]

Definition at line 104 of file CJListView.h.

Referenced by AutoSaveColumns(), GetStoredWidth(), and SaveColumnWidths().

CString CCJListView::m_strSection [protected]

Definition at line 103 of file CJListView.h.

Referenced by AutoSaveColumns(), GetStoredWidth(), and SaveColumnWidths().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJListView.h
  • WinCvs/CJLib/CJLibrary/CJListView.cpp
Generated on Sat Aug 7 22:49:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJLogoPane Class Reference

CCJLogoPane Class Reference

#include <CJLogoPane.h>

Inheritance diagram for CCJLogoPane:

[legend]
Collaboration diagram for CCJLogoPane:

[legend]
List of all members.

Public Member Functions

CCJLogoPane ()
virtual void | SetLogoText (LPCTSTR lpszLogoText)
virtual CString | GetLogoText ()
virtual void | SetLogoFont (LPCTSTR lpszFontName, int nHeight=24, int nWeight=FW_BOLD, BOOL bItalic=TRUE, BOOL bUnderline=FALSE)
virtual BOOL | Create (LPCTSTR lpszWindowName, DWORD dwStyle, CWnd *pParentWnd, UINT nID)
virtual | ~CCJLogoPane ()

Public Attributes

CString | m_strLogoText
CFont | m_Font

Protected Member Functions

afx_msg void | OnPaint ()

Constructor & Destructor Documentation

CCJLogoPane::CCJLogoPane ( )

Definition at line 33 of file CJLogoPane.cpp.

References SetLogoFont().

00034 {
00035     SetLogoFont(_T("Arial"));
00036 }

Here is the call graph for this function:

CCJLogoPane::~CCJLogoPane ( ) [virtual]

Definition at line 38 of file CJLogoPane.cpp.

References m_Font.

00039 {
00040     m_Font.DeleteObject();
00041 }

Member Function Documentation

BOOL CCJLogoPane::Create | ( | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) | [virtual]

Definition at line 93 of file CJLogoPane.cpp.

References m_strLogoText.

00094 {
00095     CString wndClass = ::AfxRegisterWndClass(CS_BYTEALIGNCLIENT);
00096
00097     if(!CWnd::Create(wndClass, lpszWindowName, dwStyle, CRect(0,0,0,0), pParentWnd, nID)) {
00098         return FALSE;
00099     }
00100
00101     m_strLogoText = lpszWindowName;
00102     return TRUE;
00103 }

_CJXLIB_INLINE CString CCJLogoPane::GetLogoText ( ) [virtual]

Definition at line 76 of file CJLogoPane.h.

References _CJXLIB_INLINE, and m_strLogoText.

00077     { return m_strLogoText; }

void CCJLogoPane::OnPaint ( ) [protected]

Definition at line 64 of file CJLogoPane.cpp.

References m_Font, and m_strLogoText.

00065 {
00066     CPaintDC dc(this); // device context for painting
00067
00068     CRect rect;
00069     GetWindowRect(rect);
00070
00071     dc.SetBkMode(TRANSPARENT);
00072
00073     CFont * OldFont = dc.SelectObject(&m_Font);
00074
00075     // draw text in DC
00076     COLORREF OldColor = dc.SetTextColor(::GetSysColor( COLOR_3DHILIGHT));
00077
00078     rect.right  = rect.Width();
00079     rect.bottom = rect.Height();
00080     rect.left   = rect.top = 0;
00081     dc.FillSolidRect(rect, ::GetSysColor(COLOR_3DFACE));
00082
00083     dc.DrawText( m_strLogoText, rect + CPoint(1,1), DT_SINGLELINE | DT_LEFT | DT_VCENTER);
00084     dc.SetTextColor( ::GetSysColor( COLOR_3DSHADOW));
00085     dc.DrawText( m_strLogoText, rect, DT_SINGLELINE | DT_LEFT | DT_VCENTER);
00086
00087     // restore old text color
00088     dc.SetTextColor( OldColor);
00089     // restore old font
00090     dc.SelectObject(OldFont);
00091 }

void CCJLogoPane::SetLogoFont | ( | LPCTSTR | lpszFontName,
 |  | int | nHeight = 24,
 |  | int | nWeight = FW_BOLD,
 |  | BOOL | bItalic = TRUE,
 |  | BOOL | bUnderline = FALSE
 | ) | [virtual]

Definition at line 54 of file CJLogoPane.cpp.

Referenced by CCJLogoPane().

00056 {
00057     if(m_Font.m_hObject) {
00058         m_Font.DeleteObject();
00059     }
00060
00061     m_Font.CreateFont(nHeight, 0, 0, 0, nWeight, (BYTE)bItalic, (BYTE)bUnderline, 0,0,0,0,0,0, lpszFontName);
00062 }

_CJXLIB_INLINE void CCJLogoPane::SetLogoText ( LPCTSTR lpszLogoText ) [virtual]

Definition at line 73 of file CJLogoPane.h.

References _CJXLIB_INLINE, and m_strLogoText.

00074     { m_strLogoText = lpszLogoText; }

Member Data Documentation

CFont CCJLogoPane::m_Font

Definition at line 42 of file CJLogoPane.h.

Referenced by OnPaint(), and ~CCJLogoPane().

CString CCJLogoPane::m_strLogoText

Definition at line 41 of file CJLogoPane.h.

Referenced by Create(), GetLogoText(), OnPaint(), and SetLogoText().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJLogoPane.h
  • WinCvs/CJLib/CJLibrary/CJLogoPane.cpp
Generated on Sat Aug 7 22:49:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMaskEdit Class Reference

CCJMaskEdit Class Reference

#include <CJMaskEdit.h>

Inheritance diagram for CCJMaskEdit:

[legend]
Collaboration diagram for CCJMaskEdit:

[legend]
List of all members.

Public Member Functions

CCJMaskEdit ()
virtual void | SetEditMask (LPCTSTR lpszMask, LPCTSTR lpszLiteral, LPCTSTR lpszWindowText)
virtual void | SendChar (UINT nChar)
virtual bool | CheckChar (UINT nChar)
virtual bool | ProcessMask (UINT nChar, int nEndPos)
virtual void | UpdateFont ()
virtual | ~CCJMaskEdit ()

Public Attributes

bool m_bUseMask
bool m_bMaskKeyInProgress
CString | m_strWindowText
CString | m_strMask
CString | m_strLiteral
CString | m_strValid
CString | m_strMaskLiteral
CFont | m_Font

Protected Member Functions

afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Constructor & Destructor Documentation

CCJMaskEdit::CCJMaskEdit ( )

Definition at line 84 of file CJMaskEdit.cpp.

References m_bMaskKeyInProgress, m_bUseMask, m_strLiteral, m_strMask, m_strMaskLiteral, m_strValid, and m_strWindowText.

00085 {
00086     m_bUseMask              = true;
00087     m_bMaskKeyInProgress    = false;
00088     m_strWindowText         = _T("");
00089     m_strMask               = _T("");
00090     m_strLiteral            = _T("");
00091     m_strValid              = _T("");
00092     m_strMaskLiteral        = _T("");
00093 }

CCJMaskEdit::~CCJMaskEdit ( ) [virtual]

Definition at line 95 of file CJMaskEdit.cpp.

References m_Font.

00096 {
00097     // fix potential resource leak - KStowell - 10-22-99.
00098     m_Font.DeleteObject();
00099 }

Member Function Documentation

bool CCJMaskEdit::CheckChar ( UINT nChar ) [virtual]

Definition at line 205 of file CJMaskEdit.cpp.

References m_bUseMask, m_strLiteral, m_strMask, m_strValid, ProcessMask(), and SendChar().

Referenced by OnChar().

00206 {
00207     // do not use mask
00208     if( !m_bUseMask ) {
00209         return true;
00210     }
00211
00212     // control character, OK
00213     if( !isprint( nChar )) {
00214         return true;
00215     }
00216
00217     // unselect all selections, if any
00218     int nStartPos, nEndPos;
00219     GetSel( nStartPos, nEndPos );
00220     SetSel( -1, 0 );
00221
00222     // advance to the first character input position.
00223     for( nStartPos; nStartPos < m_strLiteral.GetLength(); ++nStartPos )
00224     {
00225         if( m_strLiteral.GetAt( nStartPos ) == '_' ) {
00226             SetSel( nStartPos, nStartPos );
00227             break;
00228         }
00229     }
00230
00231     // check the key against the mask
00232     GetSel( nStartPos, nEndPos );
00233
00234     // make sure the string is not longer than the mask
00235     if( nEndPos >= m_strMask.GetLength( )) {
00236         MessageBeep((UINT)-1);
00237         return false;
00238     }
00239
00240     // check to see if a literal is in this position
00241     UINT c = '_';
00242     if( !m_strLiteral.IsEmpty( )) {
00243         c = m_strLiteral.GetAt( nEndPos );
00244     }
00245
00246     if( c != '_' ) {
00247         SendChar( c );
00248         GetSel( nStartPos, nEndPos );
00249     }
00250
00251     // check the valid string character
00252     if( m_strValid.Find( static_cast<TCHAR>(nChar)) != -1 ) {
00253         return true;
00254     }
00255
00256     if( ProcessMask( nChar, nEndPos ))
00257         return true;
00258
00259     MessageBeep((UINT)-1);
00260     return false;
00261 }

Here is the call graph for this function:

void CCJMaskEdit::OnChar | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

Definition at line 129 of file CJMaskEdit.cpp.

References CheckChar(), m_bMaskKeyInProgress, m_bUseMask, m_strLiteral, m_strMaskLiteral, m_strWindowText, and SendChar().

00130 {
00131     if( !m_bMaskKeyInProgress ) {
00132         if( !CheckChar( nChar )) {
00133             return;
00134         }
00135     }
00136
00137     if( m_bUseMask )
00138     {
00139         int nStartPos;
00140         int nEndPos;
00141         GetSel( nStartPos, nEndPos );
00142
00143         if( isprint( nChar ))
00144         {
00145             SetSel( nStartPos, nEndPos+1 );
00146
00147             Clear();
00148
00149             m_strWindowText.SetAt( nEndPos, static_cast<TCHAR>(nChar));
00150         }
00151         else if( nChar == VK_BACK )
00152         {
00153             if(( nStartPos == nEndPos ) &&
00154                ( nStartPos >= 1 ) &&
00155                ( nStartPos <= m_strWindowText.GetLength( )))
00156             {
00157                 UINT c = 0x20;
00158
00159                 // get the masked literal representation.
00160                 if( m_strMaskLiteral.IsEmpty() == FALSE )
00161                 {
00162                     c = m_strMaskLiteral[ nStartPos - 1 ];
00163                 }
00164
00165                 // backspace the cursor.
00166                 SendMessage( WM_KEYDOWN, VK_LEFT, 0 );
00167
00168                 if( m_strMaskLiteral.IsEmpty() == FALSE )
00169                 {
00170                     // update the char backspacing over.
00171                     SendChar( c );
00172
00173                     // backspace the cursor again.
00174                     SendMessage( WM_KEYDOWN, VK_LEFT, 0 );
00175                 }
00176             }
00177             else
00178             {
00179                 MessageBeep((UINT)-1);
00180             }
00181
00182             return;
00183         }
00184     }
00185
00186     CEdit::OnChar(nChar, nRepCnt, nFlags);
00187
00188     if( !m_bMaskKeyInProgress && m_bUseMask && !m_strLiteral.IsEmpty( ))
00189     {
00190         int nStartPos;
00191         int nEndPos;
00192         GetSel( nStartPos, nEndPos );
00193
00194         // make sure the string is not longer than the mask
00195         if( nEndPos < m_strLiteral.GetLength( ))
00196         {
00197             UINT c = m_strLiteral.GetAt( nEndPos );
00198             if (c != '_') {
00199                 SetSel( nEndPos+1, nEndPos+1 );
00200             }
00201         }
00202     }
00203 }

Here is the call graph for this function:

BOOL CCJMaskEdit::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 601 of file CJMaskEdit.cpp.

00602 {
00603     // KStowell - overridden for flicker-free drawing.
00604     UNUSED_ALWAYS(pDC);
00605     return TRUE;
00606 }

void CCJMaskEdit::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

Definition at line 115 of file CJMaskEdit.cpp.

00116 {
00117     if( m_bUseMask )
00118     {
00119         switch( nChar )
00120         {
00121         case VK_DELETE:
00122         case VK_INSERT: return;
00123         }
00124     }
00125
00126     CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
00127 }

void CCJMaskEdit::OnPaint ( ) [protected]

Definition at line 608 of file CJMaskEdit.cpp.

00609 {
00610     // Use a "Offscreen" DC to fill rect and send to DefWindowProc...
00611     CClientDC memDC(this);
00612
00613     CRect rcClip;
00614     GetClientRect(&rcClip);
00615     memDC.FillSolidRect(rcClip, ::GetSysColor(COLOR_WINDOW));
00616     DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, (LPARAM)0 );
00617
00618     // Default is called for cleanup.
00619     Default();
00620 }

bool CCJMaskEdit::ProcessMask | ( | UINT | nChar,
 |  | int | nEndPos
 | ) | [virtual]

Reimplemented in CCJDateEdit, and CCJTimeEdit.

Definition at line 274 of file CJMaskEdit.cpp.

References m_strMask.

Referenced by CheckChar().

00275 {
00276     // check the key against the mask
00277     switch( m_strMask.GetAt( nEndPos ))
00278     {
00279     case '0':       // digit only //completely changed this
00280         {
00281             if( isdigit( nChar )) {
00282                 return true;
00283             }
00284             break;
00285         }
00286     case '9':       // digit or space
00287         {
00288             if( isdigit( nChar )) {
00289                 return true;
00290             }
00291             if( nChar == VK_SPACE ) {
00292                 return true;
00293             }
00294             break;
00295         }
00296     case '#':       // digit or space or '+' or '-'
00297         {
00298             if( isdigit( nChar )) {
00299                 return true;
00300             }
00301             if( nChar == VK_SPACE || nChar == VK_ADD || nChar == VK_SUBTRACT ) {
00302                 return true;
00303             }
00304             break;
00305         }
00306     case 'L':       // alpha only
00307         {
00308             if( isalpha( nChar )) {
00309                 return true;
00310             }
00311             break;
00312         }
00313     case '?':       // alpha or space
00314         {
00315             if( isalpha( nChar )) {
00316                 return true;
00317             }
00318             if( nChar == VK_SPACE ) {
00319                 return true;
00320             }
00321             break;
00322         }
00323     case 'A':       // alpha numeric only
00324         {
00325             if( isalnum( nChar )) {
00326                 return true;
00327             }
00328             break;
00329         }
00330     case 'a':       // alpha numeric or space
00331         {
00332             if( isalnum( nChar )) {
00333                 return true;
00334             }
00335             if( nChar == VK_SPACE ) {
00336                 return true;
00337             }
00338             break;
00339         }
00340     case '&':       // all print character only
00341         {
00342             if( isprint( nChar )) {
00343                 return true;
00344             }
00345             break;
00346         }
00347     case 'H':       // hex digit
00348         {
00349             if( isxdigit( nChar )) {
00350                 return true;
00351             }
00352             break;
00353         }
00354     case 'X':       // hex digit or space
00355         {
00356             if( isxdigit( nChar )) {
00357                 return true;
00358             }
00359             if( nChar == VK_SPACE ) {
00360                 return true;
00361             }
00362             break;
00363         }
00364     }
00365
00366     return false;
00367 }

void CCJMaskEdit::SendChar ( UINT nChar ) [virtual]

Definition at line 263 of file CJMaskEdit.cpp.

References m_bMaskKeyInProgress.

Referenced by CheckChar(), and OnChar().

00264 {
00265     m_bMaskKeyInProgress = true;
00266 #ifdef WIN32
00267     AfxCallWndProc(this, m_hWnd, WM_CHAR, nChar, 1);
00268 #else
00269     SendMessage(WM_CHAR, nChar, 1);
00270 #endif
00271     m_bMaskKeyInProgress = false;
00272 }

void CCJMaskEdit::SetEditMask | ( | LPCTSTR | lpszMask,
 |  | LPCTSTR | lpszLiteral,
 |  | LPCTSTR | lpszWindowText
 | ) | [virtual]

Definition at line 369 of file CJMaskEdit.cpp.

References m_strLiteral, m_strMask, m_strMaskLiteral, m_strWindowText, and UpdateFont().

00370 {
00371     ASSERT(lpszMask);
00372     ASSERT(lpszLiteral);
00373     ASSERT(lpszWindowText);
00374
00375     // initialize the mask for the control.
00376     m_strMask        = lpszMask;
00377     m_strLiteral     = lpszLiteral;
00378     m_strWindowText  = lpszWindowText;
00379     m_strMaskLiteral = m_strWindowText;
00380
00381     // set the window text for the control.
00382     SetWindowText( lpszWindowText );
00383
00384     // initialize the font used by the control.
00385     UpdateFont();
00386 }

Here is the call graph for this function:

void CCJMaskEdit::UpdateFont ( ) [virtual]

Definition at line 591 of file CJMaskEdit.cpp.

References m_Font.

Referenced by SetEditMask().

00592 {
00593     m_Font.DeleteObject();
00594     NONCLIENTMETRICS ncm;
00595     ncm.cbSize = sizeof(ncm);
00596     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00597     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00598     SetFont(&m_Font);
00599 }

Member Data Documentation

bool CCJMaskEdit::m_bMaskKeyInProgress

Definition at line 73 of file CJMaskEdit.h.

Referenced by CCJMaskEdit(), OnChar(), and SendChar().

bool CCJMaskEdit::m_bUseMask

Definition at line 72 of file CJMaskEdit.h.

Referenced by CCJMaskEdit(), CheckChar(), and OnChar().

CFont CCJMaskEdit::m_Font

Definition at line 79 of file CJMaskEdit.h.

Referenced by UpdateFont(), and ~CCJMaskEdit().

CString CCJMaskEdit::m_strLiteral

Definition at line 76 of file CJMaskEdit.h.

Referenced by CCJMaskEdit(), CheckChar(), OnChar(), and SetEditMask().

CString CCJMaskEdit::m_strMask

Definition at line 75 of file CJMaskEdit.h.

Referenced by CCJMaskEdit(), CheckChar(), ProcessMask(), and SetEditMask().

CString CCJMaskEdit::m_strMaskLiteral

Definition at line 78 of file CJMaskEdit.h.

Referenced by CCJMaskEdit(), OnChar(), and SetEditMask().

CString CCJMaskEdit::m_strValid

Definition at line 77 of file CJMaskEdit.h.

Referenced by CCJMaskEdit(), and CheckChar().

CString CCJMaskEdit::m_strWindowText

Definition at line 74 of file CJMaskEdit.h.

Referenced by CCJMaskEdit(), OnChar(), and SetEditMask().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMaskEdit.h
  • WinCvs/CJLib/CJLibrary/CJMaskEdit.cpp
Generated on Sat Aug 7 22:49:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMDIChildWnd Class Reference

CCJMDIChildWnd Class Reference

#include <CJMDIChildWnd.h>

Inheritance diagram for CCJMDIChildWnd:

[legend]
Collaboration diagram for CCJMDIChildWnd:

[legend]
List of all members.

Public Member Functions

CCJMDIChildWnd ()
virtual | ~CCJMDIChildWnd ()
virtual HMENU | GetInitializedMenu (UINT nMenuID, UINT nToolBarID)
virtual HMENU | GetInitializedMenu (UINT nMenuID, UINT *nToolbarIDs, int nSize)
virtual UINT | GetMenuID ()
virtual UINT | GetToolBarID ()
virtual UINT * | GetToolBarIDs (int &nCount)
virtual void | SetResourceIDs (UINT nMenuID, UINT nToolBarID)
virtual void | SetResourceIDs (UINT nMenuID, UINT *nToolBarIDs, int nCount)
virtual void | RecalcLayout (BOOL bNotify=TRUE)

Protected Types

enum DockFlatBorders {
brdrAllRaised = 0x0000,
brdrFlatTop = 0x0001,
brdrFlatBottom = 0x0002,
brdrFlatLeft = 0x0004,
brdrFlatRight = 0x0008,
brdrFlatVertical = 0x0003,
brdrFlatHorizontal = 0x000C,
brdrFlatAll = 0x000F
}

Protected Member Functions

virtual void | RecalcAllExcept (CCJSizeDockBar *pBar)
virtual void | EnableDocking (DWORD dwDockStyle)
virtual void | EnableDockingSizeBar (DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised)
virtual void | DockSizeBar (CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL)
virtual void | DockControlBarLeftOf (CControlBar *Bar, CControlBar *LeftOf)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Protected Attributes

HMENU | m_hMenu
UINT | m_nMenuID
UINT | m_nToolBarID
UINT * | m_nToolBarIDs
int m_nCount

Static Protected Attributes

DWORD | dwDockBarMap [4][2]

Member Enumeration Documentation

enum CCJMDIChildWnd::DockFlatBorders [protected]

Enumeration values:
brdrAllRaised
brdrFlatTop
brdrFlatBottom
brdrFlatLeft
brdrFlatRight
brdrFlatVertical
brdrFlatHorizontal
brdrFlatAll
Definition at line 112 of file CJMDIChildWnd.h.
00112                          {
00113         brdrAllRaised       = 0x0000,
00114         brdrFlatTop         = 0x0001,
00115         brdrFlatBottom      = 0x0002,
00116         brdrFlatLeft        = 0x0004,
00117         brdrFlatRight       = 0x0008,
00118         brdrFlatVertical    = 0x0003,
00119         brdrFlatHorizontal  = 0x000C,
00120         brdrFlatAll         = 0x000F
00121     };

Constructor & Destructor Documentation

CCJMDIChildWnd::CCJMDIChildWnd ( )

Definition at line 72 of file CJMDIChildWnd.cpp.

References NULL.

00073 {
00074     m_hMenu       = NULL;
00075     m_nToolBarIDs = NULL;
00076     m_nMenuID     = 0;
00077     m_nToolBarID  = 0;
00078     m_nCount      = 0;
00079 }

CCJMDIChildWnd::~CCJMDIChildWnd ( ) [virtual]

Definition at line 81 of file CJMDIChildWnd.cpp.

00082 {
00083 }

Member Function Documentation

void CCJMDIChildWnd::DockControlBarLeftOf | ( | CControlBar * | Bar,
 |  | CControlBar * | LeftOf
 | ) | [protected, virtual]

Definition at line 104 of file CJMDIChildWnd.cpp.

References RecalcLayout().

00105 {
00106     CRect rect;
00107     DWORD dw;
00108     UINT n;
00109
00110     // get MFC to adjust the dimensions of all docked ToolBars
00111     // so that GetWindowRect will be accurate
00112     RecalcLayout(TRUE);
00113
00114     LeftOf->GetWindowRect(&rect);
00115     rect.OffsetRect(1,0);
00116     dw=LeftOf->GetBarStyle();
00117     n = 0;
00118     n = (dw&CBRS_ALIGN_TOP)              ? AFX_IDW_DOCKBAR_TOP      : n;
00119     n = (dw&CBRS_ALIGN_BOTTOM   && n==0) ? AFX_IDW_DOCKBAR_BOTTOM   : n;
00120     n = (dw&CBRS_ALIGN_LEFT     && n==0) ? AFX_IDW_DOCKBAR_LEFT     : n;
00121     n = (dw&CBRS_ALIGN_RIGHT    && n==0) ? AFX_IDW_DOCKBAR_RIGHT    : n;
00122
00123     // When we take the default parameters on rect, DockControlBar will dock
00124     // each Toolbar on a seperate line. By calculating a rectangle, we in effect
00125     // are simulating a Toolbar being dragged to that location and docked.
00126     DockControlBar(Bar,n,&rect);
00127 }

Here is the call graph for this function:

void CCJMDIChildWnd::DockSizeBar | ( | CControlBar * | pBar,
 |  | CCJSizeDockBar * | pDockBar = NULL,
 |  | LPRECT | lpRect = NULL
 | ) | [protected, virtual]

Definition at line 209 of file CJMDIChildWnd.cpp.

References dwSizeBarMap, NULL, and CCJSizeDockBar::SetActualSize().

00210 {
00211     ASSERT(pBar != NULL);
00212     ASSERT(pBar->m_pDockContext != NULL);
00213
00214     if( pDockBar == NULL )
00215     {
00216         for (int i = 0; i < 4; i++)
00217         {
00218             if ((dwSizeBarMap[i][1] & CBRS_ALIGN_ANY) == (pBar->m_dwStyle & CBRS_ALIGN_ANY))
00219             {
00220                 pDockBar = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00221                 ASSERT(pDockBar != NULL);
00222
00223                 int nSize = 0;
00224
00225                 switch(i)
00226                 {
00227                 case 0: // horizontal dock
00228                 case 1:
00229                     nSize = ((CCJControlBar*)pBar)->GetHorzSize();
00230                     break;
00231                 case 2: // vertical dock
00232                 case 3:
00233                     nSize = ((CCJControlBar*)pBar)->GetVertSize();
00234                     break;
00235                 }
00236
00237                 pDockBar->SetActualSize( nSize );
00238                 break;
00239             }
00240         }
00241     }
00242
00243     ASSERT(pDockBar != NULL);
00244     ASSERT(m_listControlBars.Find(pBar) != NULL);
00245     ASSERT(pBar->m_pDockSite == this);
00246     ((CCJControlBar*)pBar)->Normalize();
00247     pDockBar->DockControlBar(pBar, lpRect);
00248 }

Here is the call graph for this function:

void CCJMDIChildWnd::EnableDocking ( DWORD dwDockStyle ) [protected, virtual]

Definition at line 129 of file CJMDIChildWnd.cpp.

References dwDockBarMap.

00130 {
00131     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00132     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00133     CMDIChildWnd::EnableDocking(dwDockStyle);
00134
00135     for (int i = 0; i < 4; i++) {
00136         if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) {
00137             CDockBar* pDock = (CDockBar*)GetControlBar(dwDockBarMap[i][0]);
00138
00139             // make sure the dock bar is of correct type
00140             if( pDock || !pDock->IsKindOf(RUNTIME_CLASS(CCJDockBar)) ) {
00141                 BOOL bNeedDelete = ! pDock->m_bAutoDelete;
00142                 pDock->m_pDockSite->RemoveControlBar(pDock);
00143                 pDock->m_pDockSite = 0; // avoid problems in destroying the dockbar
00144                 pDock->DestroyWindow();
00145                 if( bNeedDelete )
00146                     delete pDock;
00147                 pDock = 0;
00148             }
00149
00150             if( pDock == 0 ) {
00151                 pDock = new CCJDockBar;
00152                 if (!pDock->Create(this,
00153                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00154                     dwDockBarMap[i][1], dwDockBarMap[i][0])) {
00155                     AfxThrowResourceException();
00156                 }
00157             }
00158         }
00159     }
00160 }

void CCJMDIChildWnd::EnableDockingSizeBar | ( | DWORD | dwDockStyle,
 |  | DockFlatBorders | FlatFlags = brdrAllRaised
 | ) | [protected, virtual]

Definition at line 169 of file CJMDIChildWnd.cpp.

References dwSizeBarMap, CCJSizeDockBar::FlatBorder(), and NULL.

00170 {
00171     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00172     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00173
00174     m_pFloatingFrameClass = RUNTIME_CLASS(CCJMiniDockFrameWnd);
00175     for (int i = 0; i < 4; i++)
00176     {
00177         if (dwSizeBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY)
00178         {
00179             CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00180             if (pDock == NULL)
00181             {
00182                 pDock = new CCJSizeDockBar;
00183
00184                 if (!pDock->Create(this,
00185                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00186                         dwSizeBarMap[i][1], dwSizeBarMap[i][0]))
00187                 {
00188                     AfxThrowResourceException();
00189                 }
00190                 //Yiannhs enable Flat Borders For dock Bars
00191                 pDock->FlatBorder( (FlatFlags >> i) & 0x0001 );
00192             }
00193         }
00194     }
00195 }

Here is the call graph for this function:

HMENU CCJMDIChildWnd::GetInitializedMenu | ( | UINT | nMenuID,
 |  | UINT * | nToolbarIDs,
 |  | int | nSize
 | ) | [virtual]

Definition at line 266 of file CJMDIChildWnd.cpp.

References CCJMDIFrameWnd::InitializeMenu(), m_hMenu, m_nCount, m_nMenuID, and m_nToolBarIDs.

00267 {
00268     if( m_hMenu ) {
00269         return m_hMenu;
00270     }
00271
00272     CCJMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CCJMDIFrameWnd, GetParentFrame());
00273     if( pMainFrame ) {
00274         pMainFrame->InitializeMenu( &m_hMenu, nMenuID, nToolbarIDs, nSize);
00275         m_nMenuID     = nMenuID;
00276         m_nToolBarIDs = nToolbarIDs;
00277         m_nCount      = nSize;
00278     }
00279
00280     return m_hMenu;
00281 }

Here is the call graph for this function:

HMENU CCJMDIChildWnd::GetInitializedMenu | ( | UINT | nMenuID,
 |  | UINT | nToolBarID
 | ) | [virtual]

Definition at line 250 of file CJMDIChildWnd.cpp.

References CCJMDIFrameWnd::InitializeMenu(), m_hMenu, m_nMenuID, and m_nToolBarID.

00251 {
00252     if( m_hMenu ) {
00253         return m_hMenu;
00254     }
00255
00256     CCJMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CCJMDIFrameWnd, GetParentFrame());
00257     if( pMainFrame ) {
00258         pMainFrame->InitializeMenu( &m_hMenu, nMenuID, nToolBarID );
00259         m_nMenuID     = nMenuID;
00260         m_nToolBarID  = nToolBarID;
00261     }
00262
00263     return m_hMenu;
00264 }

Here is the call graph for this function:

_CJXLIB_INLINE UINT CCJMDIChildWnd::GetMenuID ( ) [virtual]

Definition at line 188 of file CJMDIChildWnd.h.

References _CJXLIB_INLINE, and m_nMenuID.

00189     { return m_nMenuID; }

_CJXLIB_INLINE UINT CCJMDIChildWnd::GetToolBarID ( ) [virtual]

Definition at line 191 of file CJMDIChildWnd.h.

References _CJXLIB_INLINE, and m_nToolBarID.

00192     { return m_nToolBarID; }

_CJXLIB_INLINE UINT * CCJMDIChildWnd::GetToolBarIDs ( int & nCount ) [virtual]

Definition at line 194 of file CJMDIChildWnd.h.

References _CJXLIB_INLINE, m_nCount, and m_nToolBarIDs.

00195     { nCount = m_nCount; return m_nToolBarIDs; }

BOOL CCJMDIChildWnd::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 283 of file CJMDIChildWnd.cpp.

00284 {
00285     CRect rect;
00286     GetClientRect(&rect);
00287     pDC->ExcludeClipRect(rect);
00288
00289     return CMDIChildWnd::OnEraseBkgnd(pDC);
00290 }

void CCJMDIChildWnd::RecalcAllExcept ( CCJSizeDockBar * pBar ) [protected, virtual]

Definition at line 197 of file CJMDIChildWnd.cpp.

References CCJSizeDockBar::CalcSizeBarLayout(), dwSizeBarMap, and NULL.

Referenced by RecalcLayout().

00198 {
00199     for (int i = 0; i < 4; i++)
00200     {
00201         CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00202         if (pDock != NULL && pDock != pBar)
00203         {
00204             pDock->CalcSizeBarLayout();
00205         }
00206     }
00207 }

Here is the call graph for this function:

void CCJMDIChildWnd::RecalcLayout ( BOOL bNotify = TRUE ) [virtual]

Definition at line 162 of file CJMDIChildWnd.cpp.

References NULL, and RecalcAllExcept().

Referenced by DockControlBarLeftOf().

00163 {
00164     CMDIChildWnd::RecalcLayout(bNotify);
00165     RecalcAllExcept(NULL);
00166 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJMDIChildWnd::SetResourceIDs | ( | UINT | nMenuID,
 |  | UINT * | nToolBarIDs,
 |  | int | nCount
 | ) | [virtual]

Definition at line 200 of file CJMDIChildWnd.h.

References _CJXLIB_INLINE, m_nCount, m_nMenuID, and m_nToolBarIDs.

00201     { m_nMenuID = nMenuID; m_nToolBarIDs = nToolBarIDs; m_nCount = nCount; }

_CJXLIB_INLINE void CCJMDIChildWnd::SetResourceIDs | ( | UINT | nMenuID,
 |  | UINT | nToolBarID
 | ) | [virtual]

Definition at line 197 of file CJMDIChildWnd.h.

References _CJXLIB_INLINE, m_nMenuID, and m_nToolBarID.

00198     { m_nMenuID = nMenuID; m_nToolBarID = nToolBarID; }

Member Data Documentation

DWORD CCJMDIChildWnd::dwDockBarMap [static, protected]

Initial value:

{
    { AFX_IDW_DOCKBAR_TOP,      CBRS_TOP    },
    { AFX_IDW_DOCKBAR_BOTTOM,   CBRS_BOTTOM },
    { AFX_IDW_DOCKBAR_LEFT,     CBRS_LEFT   },
    { AFX_IDW_DOCKBAR_RIGHT,    CBRS_RIGHT  },
}
Definition at line 96 of file CJMDIChildWnd.cpp.

Referenced by EnableDocking().

HMENU CCJMDIChildWnd::m_hMenu [protected]

Definition at line 103 of file CJMDIChildWnd.h.

Referenced by GetInitializedMenu().

int CCJMDIChildWnd::m_nCount [protected]

Definition at line 107 of file CJMDIChildWnd.h.

Referenced by GetInitializedMenu(), GetToolBarIDs(), and SetResourceIDs().

UINT CCJMDIChildWnd::m_nMenuID [protected]

Definition at line 104 of file CJMDIChildWnd.h.

Referenced by GetInitializedMenu(), GetMenuID(), and SetResourceIDs().

UINT CCJMDIChildWnd::m_nToolBarID [protected]

Definition at line 105 of file CJMDIChildWnd.h.

Referenced by GetInitializedMenu(), GetToolBarID(), and SetResourceIDs().

UINT* CCJMDIChildWnd::m_nToolBarIDs [protected]

Definition at line 106 of file CJMDIChildWnd.h.

Referenced by GetInitializedMenu(), GetToolBarIDs(), and SetResourceIDs().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMDIChildWnd.h
  • WinCvs/CJLib/CJLibrary/CJMDIChildWnd.cpp
Generated on Sat Aug 7 22:49:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMDIFrameWnd Class Reference

CCJMDIFrameWnd Class Reference

#include <CJMDIFrameWnd.h>

Inheritance diagram for CCJMDIFrameWnd:

[legend]
Collaboration diagram for CCJMDIFrameWnd:

[legend]
List of all members.

Public Member Functions

CCJMDIFrameWnd ()
virtual | ~CCJMDIFrameWnd ()
virtual void | LoadBarState (LPCTSTR lpszProfileName)
virtual void | SaveBarState (LPCTSTR lpszProfileName) const
virtual BOOL | InitializeMenu (CMultiDocTemplate *pDocTemplate, UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0, UINT nDefaultMenuID=NULL)
virtual BOOL | InitializeMenu (CMultiDocTemplate *pDocTemplate, UINT nMenuID, UINT nToolbarID=NULL, UINT nDefaultMenuID=NULL)
virtual BOOL | InitializeMenu (HMENU *phMenu, UINT nMenuID, UINT nToolbarID=NULL)
virtual BOOL | InitializeMenu (HMENU *phMenu, UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=NULL)
virtual void | RecalcAllExcept (CCJSizeDockBar *pBar)
virtual void | EnableDocking (DWORD dwDockStyle)
virtual void | EnableDockingSizeBar (DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised)
virtual void | DockSizeBar (CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL)
virtual void | DockControlBarLeftOf (CControlBar *Bar, CControlBar *LeftOf)
virtual void | RecalcLayout (BOOL bNotify=TRUE)

Protected Types

enum DockFlatBorders {
brdrAllRaised = 0x0000,
brdrFlatTop = 0x0001,
brdrFlatBottom = 0x0002,
brdrFlatLeft = 0x0004,
brdrFlatRight = 0x0008,
brdrFlatVertical = 0x0003,
brdrFlatHorizontal = 0x000C,
brdrFlatAll = 0x000F
}

Protected Member Functions

virtual HMENU | NewMenu (UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0)
virtual HMENU | NewMenu (UINT nMenuID, UINT nToolbarID=NULL)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs, UINT nIconID)
afx_msg void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
afx_msg LRESULT | OnMenuChar (UINT nChar, UINT nFlags, CMenu *pMenu)
afx_msg void | OnInitMenuPopup (CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu)
afx_msg void | OnClose ()

Protected Attributes

CMDIMenuList m_menuList
CCJMenuBar m_wndMenuBar

Static Protected Attributes

DWORD | dwDockBarMap [4][2]

Member Enumeration Documentation

enum CCJMDIFrameWnd::DockFlatBorders [protected]

Enumeration values:
brdrAllRaised
brdrFlatTop
brdrFlatBottom
brdrFlatLeft
brdrFlatRight
brdrFlatVertical
brdrFlatHorizontal
brdrFlatAll
Definition at line 170 of file CJMDIFrameWnd.h.
00170                          {
00171         brdrAllRaised       = 0x0000,
00172         brdrFlatTop         = 0x0001,
00173         brdrFlatBottom      = 0x0002,
00174         brdrFlatLeft        = 0x0004,
00175         brdrFlatRight       = 0x0008,
00176         brdrFlatVertical    = 0x0003,
00177         brdrFlatHorizontal  = 0x000C,
00178         brdrFlatAll         = 0x000F
00179     };

Constructor & Destructor Documentation

CCJMDIFrameWnd::CCJMDIFrameWnd ( )

Definition at line 148 of file CJMDIFrameWnd.cpp.

00149 {
00150
00151 }

CCJMDIFrameWnd::~CCJMDIFrameWnd ( ) [virtual]

Definition at line 153 of file CJMDIFrameWnd.cpp.

References _delete, and m_menuList.

00154 {
00155     // Free up any allocated memory.
00156     while (!m_menuList.IsEmpty()) {
00157         CCJMenu* pMenu = m_menuList.RemoveTail();
00158         _delete(pMenu);
00159     }
00160 }

Member Function Documentation

void CCJMDIFrameWnd::DockControlBarLeftOf | ( | CControlBar * | Bar,
 |  | CControlBar * | LeftOf
 | ) | [virtual]

Definition at line 185 of file CJMDIFrameWnd.cpp.

References RecalcLayout().

00186 {
00187     CRect rect;
00188     DWORD dw;
00189     UINT n;
00190
00191     // get MFC to adjust the dimensions of all docked ToolBars
00192     // so that GetWindowRect will be accurate
00193     RecalcLayout(TRUE);
00194
00195     LeftOf->GetWindowRect(&rect);
00196     rect.OffsetRect(1,0);
00197     dw=LeftOf->GetBarStyle();
00198     n = 0;
00199     n = (dw&CBRS_ALIGN_TOP)              ? AFX_IDW_DOCKBAR_TOP      : n;
00200     n = (dw&CBRS_ALIGN_BOTTOM   && n==0) ? AFX_IDW_DOCKBAR_BOTTOM   : n;
00201     n = (dw&CBRS_ALIGN_LEFT     && n==0) ? AFX_IDW_DOCKBAR_LEFT     : n;
00202     n = (dw&CBRS_ALIGN_RIGHT    && n==0) ? AFX_IDW_DOCKBAR_RIGHT    : n;
00203
00204     // When we take the default parameters on rect, DockControlBar will dock
00205     // each Toolbar on a seperate line. By calculating a rectangle, we in effect
00206     // are simulating a Toolbar being dragged to that location and docked.
00207     DockControlBar(Bar,n,&rect);
00208 }

Here is the call graph for this function:

void CCJMDIFrameWnd::DockSizeBar | ( | CControlBar * | pBar,
 |  | CCJSizeDockBar * | pDockBar = NULL,
 |  | LPRECT | lpRect = NULL
 | ) | [virtual]

Definition at line 290 of file CJMDIFrameWnd.cpp.

References dwSizeBarMap, NULL, and CCJSizeDockBar::SetActualSize().

Referenced by CMainFrame::InitializeDockingWindows().

00291 {
00292     ASSERT(pBar != NULL);
00293     ASSERT(pBar->m_pDockContext != NULL);
00294
00295     if( pDockBar == NULL )
00296     {
00297         for (int i = 0; i < 4; i++)
00298         {
00299             if ((dwSizeBarMap[i][1] & CBRS_ALIGN_ANY) == (pBar->m_dwStyle & CBRS_ALIGN_ANY))
00300             {
00301                 pDockBar = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00302                 ASSERT(pDockBar != NULL);
00303
00304                 int nSize = 0;
00305
00306                 switch(i)
00307                 {
00308                 case 0: // horizontal dock
00309                 case 1:
00310                     nSize = ((CCJControlBar*)pBar)->GetHorzSize();
00311                     break;
00312                 case 2: // vertical dock
00313                 case 3:
00314                     nSize = ((CCJControlBar*)pBar)->GetVertSize();
00315                     break;
00316                 }
00317
00318                 pDockBar->SetActualSize( nSize );
00319                 break;
00320             }
00321         }
00322     }
00323
00324     ASSERT(pDockBar != NULL);
00325     ASSERT(m_listControlBars.Find(pBar) != NULL);
00326     ASSERT(pBar->m_pDockSite == this);
00327     ((CCJControlBar*)pBar)->Normalize();
00328     pDockBar->DockControlBar(pBar, lpRect);
00329 }

Here is the call graph for this function:

void CCJMDIFrameWnd::EnableDocking ( DWORD dwDockStyle ) [virtual]

Definition at line 210 of file CJMDIFrameWnd.cpp.

References dwDockBarMap.

Referenced by CMainFrame::OnCreate().

00211 {
00212     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00213     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00214     CMDIFrameWnd::EnableDocking(dwDockStyle);
00215
00216     for (int i = 0; i < 4; i++) {
00217         if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) {
00218             CDockBar* pDock = (CDockBar*)GetControlBar(dwDockBarMap[i][0]);
00219
00220             // make sure the dock bar is of correct type
00221             if( pDock || !pDock->IsKindOf(RUNTIME_CLASS(CCJDockBar)) ) {
00222                 BOOL bNeedDelete = ! pDock->m_bAutoDelete;
00223                 pDock->m_pDockSite->RemoveControlBar(pDock);
00224                 pDock->m_pDockSite = 0; // avoid problems in destroying the dockbar
00225                 pDock->DestroyWindow();
00226                 if( bNeedDelete )
00227                     delete pDock;
00228                 pDock = 0;
00229             }
00230
00231             if( pDock == 0 ) {
00232                 pDock = new CCJDockBar;
00233                 if (!pDock->Create(this,
00234                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00235                     dwDockBarMap[i][1], dwDockBarMap[i][0])) {
00236                     AfxThrowResourceException();
00237                 }
00238             }
00239         }
00240     }
00241 }

void CCJMDIFrameWnd::EnableDockingSizeBar | ( | DWORD | dwDockStyle,
 |  | DockFlatBorders | FlatFlags = brdrAllRaised
 | ) | [virtual]

Definition at line 250 of file CJMDIFrameWnd.cpp.

References dwSizeBarMap, CCJSizeDockBar::FlatBorder(), and NULL.

Referenced by CMainFrame::InitializeDockingWindows().

00251 {
00252     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00253     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00254
00255     m_pFloatingFrameClass = RUNTIME_CLASS(CCJMiniDockFrameWnd);
00256     for (int i = 0; i < 4; i++)
00257     {
00258         if (dwSizeBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY)
00259         {
00260             CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00261             if (pDock == NULL)
00262             {
00263                 pDock = new CCJSizeDockBar;
00264
00265                 if (!pDock->Create(this,
00266                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00267                         dwSizeBarMap[i][1], dwSizeBarMap[i][0]))
00268                 {
00269                     AfxThrowResourceException();
00270                 }
00271                 //Yiannhs enable Flat Borders For dock Bars
00272                 pDock->FlatBorder( (FlatFlags >> i) & 0x0001 );
00273             }
00274         }
00275     }
00276 }

Here is the call graph for this function:

BOOL CCJMDIFrameWnd::InitializeMenu | ( | HMENU * | phMenu,
 |  | UINT | nMenuID,
 |  | UINT * | nToolbarIDs = NULL,
 |  | int | nSize = NULL
 | ) | [virtual]

Definition at line 426 of file CJMDIFrameWnd.cpp.

References NewMenu(), and NULL.

00427 {
00428     if( !phMenu ) {
00429         return FALSE;
00430     }
00431
00432     ASSERT(nMenuID);            // must be valid.
00433     *phMenu = NewMenu(nMenuID, nToolbarIDs, nSize);
00434
00435     return (BOOL)(*phMenu != NULL);
00436 }

Here is the call graph for this function:

BOOL CCJMDIFrameWnd::InitializeMenu | ( | HMENU * | phMenu,
 |  | UINT | nMenuID,
 |  | UINT | nToolbarID = NULL
 | ) | [virtual]

Definition at line 414 of file CJMDIFrameWnd.cpp.

References NewMenu(), and NULL.

00415 {
00416     if( !phMenu ) {
00417         return FALSE;
00418     }
00419
00420     ASSERT(nMenuID);            // must be valid.
00421     *phMenu = NewMenu( nMenuID, nToolbarID );
00422
00423     return (BOOL)(*phMenu != NULL);
00424 }

Here is the call graph for this function:

BOOL CCJMDIFrameWnd::InitializeMenu | ( | CMultiDocTemplate * | pDocTemplate,
 |  | UINT | nMenuID,
 |  | UINT | nToolbarID = NULL,
 |  | UINT | nDefaultMenuID = NULL
 | ) | [virtual]

Definition at line 373 of file CJMDIFrameWnd.cpp.

References m_menuList, and NewMenu().

00374 {
00375     ASSERT(nMenuID);            // must be valid.
00376
00377     // If no menus have been created yet, set the frame default,
00378     // this is the menu that is displayed when no views are active.
00379     if (m_menuList.IsEmpty()) {
00380         ASSERT(nDefaultMenuID != 0);
00381         m_hMenuDefault = NewMenu(nDefaultMenuID, nToolBarID);
00382         OnUpdateFrameMenu(m_hMenuDefault);
00383     }
00384     // Create the Doc/View menu. ONLY if there is a template passed.
00385     if( pDocTemplate )
00386     {
00387         ASSERT_VALID(pDocTemplate); // must be valid.
00388         pDocTemplate->m_hMenuShared = NewMenu(nMenuID, nToolBarID);
00389     }
00390     return TRUE;
00391 }

Here is the call graph for this function:

BOOL CCJMDIFrameWnd::InitializeMenu | ( | CMultiDocTemplate * | pDocTemplate,
 |  | UINT | nMenuID,
 |  | UINT * | nToolbarIDs = NULL,
 |  | int | nSize = 0,
 |  | UINT | nDefaultMenuID = NULL
 | ) | [virtual]

Definition at line 393 of file CJMDIFrameWnd.cpp.

References m_menuList, and NewMenu().

Referenced by CCJMDIChildWnd::GetInitializedMenu().

00394 {
00395     ASSERT(nMenuID);            // must be valid.
00396
00397     // If no menus have been created yet, set the frame default,
00398     // this is the menu that is displayed when no views are active.
00399     if (m_menuList.IsEmpty()) {
00400         ASSERT(nDefaultMenuID != 0);
00401         m_hMenuDefault = NewMenu(nDefaultMenuID, nToolbarIDs, nSize);
00402         OnUpdateFrameMenu(m_hMenuDefault);
00403     }
00404     // Create the Doc/View menu. ONLY if there is a template passed.
00405     if( pDocTemplate )
00406     {
00407         ASSERT_VALID(pDocTemplate); // must be valid.
00408         pDocTemplate->m_hMenuShared = NewMenu(nMenuID, nToolbarIDs, nSize);
00409     }
00410
00411     return TRUE;
00412 }

Here is the call graph for this function:

void CCJMDIFrameWnd::LoadBarState ( LPCTSTR lpszProfileName ) [virtual]

Definition at line 495 of file CJMDIFrameWnd.cpp.

Referenced by CMainFrame::LoadDockState().

00496 {
00497     CCJSizeDockBar::m_bIsDockBar = true;
00498     CFrameWnd::LoadBarState(lpszProfileName);
00499     CCJSizeDockBar::m_bIsDockBar = false;
00500 }

HMENU CCJMDIFrameWnd::NewMenu | ( | UINT | nMenuID,
 |  | UINT | nToolbarID = NULL
 | ) | [protected, virtual]

Definition at line 331 of file CJMDIFrameWnd.cpp.

References CCJMenu::LoadMenu(), CCJMenu::LoadToolbar(), m_menuList, and NULL.

00332 {
00333     // Allocate a new CCJMenu object.
00334     CCJMenu* pMenu = new CCJMenu;
00335     if( pMenu == NULL ) {
00336         return NULL;
00337     }
00338
00339     // Load the menu and toolbar resource.
00340     pMenu->LoadMenu(nMenuID);
00341     if (nToolbarID) {
00342         pMenu->LoadToolbar(nToolbarID);
00343     }
00344
00345     // Add the menu to the CList object.
00346     m_menuList.AddTail(pMenu);
00347
00348     // Detach the menu.
00349     return(pMenu->Detach());
00350 }

Here is the call graph for this function:

HMENU CCJMDIFrameWnd::NewMenu | ( | UINT | nMenuID,
 |  | UINT * | nToolbarIDs = NULL,
 |  | int | nSize = 0
 | ) | [protected, virtual]

Definition at line 352 of file CJMDIFrameWnd.cpp.

References CCJMenu::LoadMenu(), CCJMenu::LoadToolbars(), m_menuList, and NULL.

Referenced by InitializeMenu().

00353 {
00354     // Allocate a new CCJMenu object.
00355     CCJMenu* pMenu = new CCJMenu;
00356     if( pMenu == NULL ) {
00357         return NULL;
00358     }
00359
00360     // Load the menu and toolbar resources.
00361     pMenu->LoadMenu(nMenuID);
00362     if (nToolbarIDs) {
00363         pMenu->LoadToolbars(nToolbarIDs, nSize);
00364     }
00365
00366     // Add the menu to the CList object.
00367     m_menuList.AddTail(pMenu);
00368
00369     // Detach the menu.
00370     return(pMenu->Detach());
00371 }

Here is the call graph for this function:

void CCJMDIFrameWnd::OnClose ( ) [protected]

Reimplemented in CMainFrame.

Definition at line 509 of file CJMDIFrameWnd.cpp.

References NULL.

Referenced by CMainFrame::OnClose().

00510 {
00511     // Clear active view before close
00512     SetActiveView (NULL);
00513     CMDIFrameWnd::OnClose();
00514 }

void CCJMDIFrameWnd::OnInitMenuPopup | ( | CMenu * | pPopupMenu,
 |  | UINT | nIndex,
 |  | BOOL | bSysMenu
 | ) | [protected]

Definition at line 476 of file CJMDIFrameWnd.cpp.

References CCJMenu::IsMenu(), m_menuList, and CCJMenu::UpdateMenu().

00477 {
00478     CMDIFrameWnd::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
00479
00480     if(!bSysMenu)
00481     {
00482         // Loop through all menus in list.
00483         for (POSITION pos = m_menuList.GetHeadPosition(); pos; m_menuList.GetNext(pos))
00484         {
00485             CCJMenu* pListMenu = m_menuList.GetAt(pos);
00486
00487             if(pListMenu->IsMenu(pPopupMenu)) {
00488                 CCJMenu::UpdateMenu(pPopupMenu);
00489                 break;
00490             }
00491         }
00492     }
00493 }

Here is the call graph for this function:

void CCJMDIFrameWnd::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct
 | ) | [protected]

Definition at line 438 of file CJMDIFrameWnd.cpp.

References CCJMenu::IsMenu(), m_menuList, and CCJMenu::MeasureItem().

00439 {
00440     if (lpMeasureItemStruct->CtlType == ODT_MENU)
00441     {
00442         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
00443             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
00444
00445             // Loop through all menus in list.
00446             for (POSITION pos = m_menuList.GetHeadPosition(); pos; m_menuList.GetNext(pos))
00447             {
00448                 CCJMenu* pListMenu = m_menuList.GetAt(pos);
00449
00450                 if(pListMenu->IsMenu(pMenu)) {
00451                     pListMenu->MeasureItem(lpMeasureItemStruct);
00452                     return;
00453                 }
00454             }
00455         }
00456     }
00457
00458     CMDIFrameWnd::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
00459 }

Here is the call graph for this function:

LRESULT CCJMDIFrameWnd::OnMenuChar | ( | UINT | nChar,
 |  | UINT | nFlags,
 |  | CMenu * | pMenu
 | ) | [protected]

Definition at line 461 of file CJMDIFrameWnd.cpp.

References CCJMenu::FindKeyboardShortcut(), CCJMenu::IsMenu(), and m_menuList.

00462 {
00463     // Loop through all menus in list.
00464     for (POSITION pos = m_menuList.GetHeadPosition(); pos; m_menuList.GetNext(pos))
00465     {
00466         CCJMenu* pListMenu = m_menuList.GetAt(pos);
00467
00468         if(pListMenu->IsMenu(pMenu)) {
00469             return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
00470         }
00471     }
00472
00473     return CMDIFrameWnd::OnMenuChar(nChar, nFlags, pMenu);
00474 }

Here is the call graph for this function:

BOOL CCJMDIFrameWnd::PreCreateWindow | ( | CREATESTRUCT & | cs,
 |  | UINT | nIconID
 | ) | [protected, virtual]

Definition at line 527 of file CJMDIFrameWnd.cpp.

References NULL.

00528 {
00529     // Register wnd class with no redraw, cursor (use default), background
00530     // brush and load your apps icon resource.
00531     cs.lpszClass = AfxRegisterWndClass( 0, NULL, NULL,
00532         AfxGetApp()->LoadIcon(nIconID));
00533     ASSERT(cs.lpszClass);
00534
00535     return CMDIFrameWnd::PreCreateWindow(cs);
00536 }

BOOL CCJMDIFrameWnd::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Reimplemented in CMainFrame.

Definition at line 517 of file CJMDIFrameWnd.cpp.

Referenced by CMainFrame::PreCreateWindow().

00518 {
00519     return CMDIFrameWnd::PreCreateWindow(cs);
00520 }

void CCJMDIFrameWnd::RecalcAllExcept ( CCJSizeDockBar * pBar ) [virtual]

Definition at line 278 of file CJMDIFrameWnd.cpp.

References CCJSizeDockBar::CalcSizeBarLayout(), dwSizeBarMap, and NULL.

Referenced by RecalcLayout().

00279 {
00280     for (int i = 0; i < 4; i++)
00281     {
00282         CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00283         if (pDock != NULL && pDock != pBar)
00284         {
00285             pDock->CalcSizeBarLayout();
00286         }
00287     }
00288 }

Here is the call graph for this function:

void CCJMDIFrameWnd::RecalcLayout ( BOOL bNotify = TRUE ) [virtual]

Definition at line 243 of file CJMDIFrameWnd.cpp.

References NULL, and RecalcAllExcept().

Referenced by CMainFrame::DockControlBarLeftOf(), and DockControlBarLeftOf().

00244 {
00245     CMDIFrameWnd::RecalcLayout(bNotify);
00246     RecalcAllExcept(NULL);
00247 }

Here is the call graph for this function:

void CCJMDIFrameWnd::SaveBarState ( LPCTSTR lpszProfileName ) const [virtual]

Definition at line 502 of file CJMDIFrameWnd.cpp.

Referenced by CMainFrame::OnClose().

00503 {
00504     CCJSizeDockBar::m_bIsDockBar = true;
00505     CFrameWnd::SaveBarState(lpszProfileName);
00506     CCJSizeDockBar::m_bIsDockBar = false;
00507 }

Member Data Documentation

DWORD CCJMDIFrameWnd::dwDockBarMap [static, protected]

Initial value:

{
    { AFX_IDW_DOCKBAR_TOP,      CBRS_TOP    },
    { AFX_IDW_DOCKBAR_BOTTOM,   CBRS_BOTTOM },
    { AFX_IDW_DOCKBAR_LEFT,     CBRS_LEFT   },
    { AFX_IDW_DOCKBAR_RIGHT,    CBRS_RIGHT  },
}
Definition at line 177 of file CJMDIFrameWnd.cpp.

Referenced by EnableDocking().

CMDIMenuList CCJMDIFrameWnd::m_menuList [protected]

Definition at line 166 of file CJMDIFrameWnd.h.

Referenced by InitializeMenu(), NewMenu(), OnInitMenuPopup(), OnMeasureItem(), OnMenuChar(), and ~CCJMDIFrameWnd().

CCJMenuBar CCJMDIFrameWnd::m_wndMenuBar [protected]

Definition at line 167 of file CJMDIFrameWnd.h.

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMDIFrameWnd.h
  • WinCvs/CJLib/CJLibrary/CJMDIFrameWnd.cpp
Generated on Sat Aug 7 22:49:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMemFile Class Reference

CCJMemFile Class Reference

#include <CJMemFile.h>

Inheritance diagram for CCJMemFile:

[legend]
Collaboration diagram for CCJMemFile:

[legend]
List of all members.

Public Member Functions

CCJMemFile (UINT nGrowBytes=1024)
CCJMemFile (BYTE *lpBuffer, UINT nBufferSize, UINT nGrowBytes=0)
CCJMemFile (LPCTSTR lpstFilename, UINT uiOpenFlags)
virtual | ~CCJMemFile ()
virtual void | Flush ()
virtual bool | Open (CString strFilename, UINT uiOpenFlags, CFileException *pError=NULL)
virtual void | Close ()
virtual BOOL | ReadString (CString &rString)
virtual void | WriteString (LPCTSTR lpsz)
virtual bool | Duplicate (CFile *fDuplicate)
virtual bool | Duplicate (CString strDup)
virtual bool | Discard ()
virtual DWORD | Insert (CFile *fSrc, DWORD dwSourcePos, DWORD dwDestPos, DWORD dwBytes)
virtual DWORD | Insert (CString strSrc, DWORD dwSourcePos, DWORD dwDestPos, DWORD dwBytes)
virtual DWORD | Extract (CFile *fDest, DWORD dwStartPos, DWORD dwBytes)
virtual DWORD | Extract (CString strDest, DWORD dwStartPos, DWORD dwBytes)
LONG | FindData (void *pData, DWORD dwDataLen, LONG lStartPos)
void | operator= (CFile *fDup)
void | operator= (CString strDup)
void | operator= (DWORD dwFilePos)
void | operator+= (CFile *fApp)
void | operator+= (CString strApp)
BYTE | operator[] (DWORD dwFilePos)

Protected Member Functions

virtual bool | Load ()
virtual bool | Save ()
virtual bool | Import (CFile *fImp)
virtual bool | Append (CFile *fApp)

Private Attributes

CFileException * | m_pError
CFile | m_File
UINT | m_uiOpenFlags
bool m_bOpen

Constructor & Destructor Documentation

CCJMemFile::CCJMemFile ( UINT nGrowBytes = 1024 )

Definition at line 55 of file CJMemFile.cpp.

References m_bOpen, m_File, m_uiOpenFlags, and NULL.

00056 {
00057     // Modified default constructor
00058
00059     m_File.m_hFile = NULL;
00060     m_bOpen = false;
00061     m_uiOpenFlags = 0;
00062     CMemFile::CMemFile(nGrowBytes);
00063 }

CCJMemFile::CCJMemFile | ( | BYTE * | lpBuffer,
 |  | UINT | nBufferSize,
 |  | UINT | nGrowBytes = 0
 | ) |

Definition at line 65 of file CJMemFile.cpp.

References m_bOpen, m_File, m_uiOpenFlags, and NULL.

00066 {
00067     // Modified default constructor
00068
00069     m_File.m_hFile = NULL;
00070     m_bOpen = false;
00071     m_uiOpenFlags = 0;
00072     CMemFile::CMemFile(lpBuffer,nBufferSize, nGrowBytes );
00073 }

CCJMemFile::CCJMemFile | ( | LPCTSTR | lpstFilename,
 |  | UINT | uiOpenFlags
 | ) |

Definition at line 75 of file CJMemFile.cpp.

References m_bOpen, m_File, m_uiOpenFlags, NULL, and Open().

00076 {
00077     // CFile compatible constructor
00078
00079     m_File.m_hFile = NULL;
00080     m_bOpen = false;
00081     m_uiOpenFlags = uiOpenFlags;
00082     Open(lpszFilename,uiOpenFlags);
00083 }

Here is the call graph for this function:

CCJMemFile::~CCJMemFile ( ) [virtual]

Definition at line 85 of file CJMemFile.cpp.

References Close(), m_bOpen, m_File, m_uiOpenFlags, and NULL.

00086 {
00087     if (m_bOpen)
00088         Close();
00089     m_File.m_hFile = NULL;
00090     m_uiOpenFlags = 0;
00091     CMemFile::~CMemFile();
00092 }

Here is the call graph for this function:

Member Function Documentation

bool CCJMemFile::Append ( CFile * fApp ) [protected, virtual]

Definition at line 293 of file CJMemFile.cpp.

References NULL.

Referenced by operator+=().

00294 {
00295     if ((fApp == NULL) || (fApp->m_hFile == NULL))
00296         return false;
00297
00298     DWORD dwLength = 1024;
00299     BYTE *pData = new BYTE[dwLength];
00300     if (pData == NULL)
00301         return false;
00302     SeekToEnd();
00303     fApp->SeekToBegin();
00304     while (fApp->GetPosition() < fApp->GetLength())
00305     {
00306         DWORD dwRead = fApp->Read(pData,dwLength);
00307         Write(pData,dwRead);
00308     }
00309
00310     delete pData;
00311     return true;
00312 }

void CCJMemFile::Close ( ) [virtual]

Definition at line 249 of file CJMemFile.cpp.

References m_bOpen, m_File, NULL, and Save().

Referenced by ~CCJMemFile().

00250 {
00251     if ((m_File.m_hFile != NULL) && m_bOpen)
00252     {
00253         m_bOpen = false;
00254         Save();
00255         m_File.Close();
00256         m_File.m_hFile = NULL;
00257     }
00258 }

Here is the call graph for this function:

bool CCJMemFile::Discard ( ) [virtual]

Definition at line 266 of file CJMemFile.cpp.

References Load().

00267 {
00268     return Load();
00269 }

Here is the call graph for this function:

bool CCJMemFile::Duplicate ( CString strDup ) [virtual]

Definition at line 165 of file CJMemFile.cpp.

References Duplicate().

00166 {
00167     // Duplicate With CString compatibility
00168
00169     CFile file(strDup,CFile::modeCreate | CFile::modeWrite);
00170     bool bResult = Duplicate(&file);
00171     file.Close();
00172     return bResult;
00173 }

Here is the call graph for this function:

bool CCJMemFile::Duplicate ( CFile * fDuplicate ) [virtual]

Definition at line 143 of file CJMemFile.cpp.

Referenced by Duplicate().

00144 {
00145     // Standard Copy Routine
00146
00147     BYTE *pbData = new BYTE[1024];
00148 #if _MFC_VER < 0x700
00149     DWORD dwPos = GetPosition();
00150 #else
00151     ULONGLONG dwPos = GetPosition();
00152 #endif
00153     SeekToBegin();
00154     fDuplicate->SetLength(0);
00155     while (GetPosition() < GetLength())
00156     {
00157         DWORD dwRead = Read(pbData,1024);
00158         fDuplicate->Write(pbData,dwRead);
00159     }
00160     Seek(dwPos,fDuplicate->begin);
00161     delete pbData;
00162     return true;
00163 }

DWORD CCJMemFile::Extract | ( | CString | strDest,
 |  | DWORD | dwStartPos,
 |  | DWORD | dwBytes
 | ) | [virtual]

Definition at line 396 of file CJMemFile.cpp.

References Extract().

00397 {
00398     CFile file(strDest,CFile::modeCreate | CFile::modeWrite);
00399     DWORD dwResult = Extract(&file,dwStartPos,dwBytes);
00400     file.Close();
00401     return dwResult;
00402 }

Here is the call graph for this function:

DWORD CCJMemFile::Extract | ( | CFile * | fDest,
 |  | DWORD | dwStartPos,
 |  | DWORD | dwBytes
 | ) | [virtual]

Definition at line 365 of file CJMemFile.cpp.

References NULL.

Referenced by Extract(), and Insert().

00366 {
00367     if (dwBytes == 0)
00368         return 0;
00369 #if _MFC_VER < 0x700
00370     DWORD dwPos = GetPosition();
00371 #else
00372     ULONGLONG dwPos = GetPosition();
00373 #endif
00374     DWORD dwLength = 1024;
00375     DWORD dwCounter = 0;
00376     BYTE *pData = new BYTE[dwLength];
00377     if (pData == NULL)
00378         return 0;
00379     Seek(dwStartPos,begin);
00380
00381     while (((GetPosition() - dwStartPos) < dwBytes) && (GetPosition() < GetLength()) )
00382     {
00383         DWORD dwRead = Read(pData,dwLength);
00384         if (dwCounter + dwRead > dwStartPos + dwBytes)
00385             dwRead = dwBytes - dwCounter;
00386         fDest->Write(pData,dwRead);
00387         dwCounter += dwRead;
00388     }
00389     Seek(dwPos,begin);
00390     delete pData;
00391     fDest->Flush();
00392     return dwCounter;
00393
00394 }

LONG CCJMemFile::FindData | ( | void * | pData,
 |  | DWORD | dwDataLen,
 |  | LONG | lStartPos
 | ) |

Definition at line 455 of file CJMemFile.cpp.

00456 {
00457     BYTE* pBytes = (BYTE*)pData;
00458
00459
00460     Seek(lStartPos,begin);
00461
00462     bool bFoundAll = false;
00463     LONG lPos = -1;
00464
00465     while ((!bFoundAll) && (GetPosition() < GetLength()))
00466     {
00467         bool bFoundFirst = false;
00468
00469         while ((!bFoundFirst) && (GetPosition() < GetLength()))
00470         {
00471             lPos = GetPosition();
00472             BYTE read;
00473             Read(&read,1);
00474             if (read != pBytes[0])
00475                 continue;
00476
00477             bFoundFirst = true;
00478             break;
00479         }
00480
00481         //Hier Die Restlichen Bytes (dwDataLen -1) vergleichen
00482
00483         DWORD i = 1;
00484         bool bFound = true;
00485
00486         while ((i < dwDataLen) && (GetPosition() < GetLength()) && bFoundFirst)
00487         {
00488             BYTE read;
00489             Read(&read,1);
00490             if (read == pBytes[i++])
00491                 continue;
00492
00493             bFound = false;
00494             Seek(lPos+1,begin);
00495             break;
00496         }
00497
00498         bFoundAll = bFound && bFoundFirst;
00499     }
00500
00501     lPos = bFoundAll ? lPos : -1;
00502 //  while (bFound && (iPos < strSeek.GetLength())
00503 //  {
00504 //  }
00505     return lPos;
00506 }

void CCJMemFile::Flush ( ) [virtual]

Definition at line 260 of file CJMemFile.cpp.

References Save().

00261 {
00262     CMemFile::Flush();
00263     Save();
00264 }

Here is the call graph for this function:

bool CCJMemFile::Import ( CFile * fImp ) [protected, virtual]

Definition at line 271 of file CJMemFile.cpp.

References NULL.

Referenced by operator=().

00272 {
00273     if ((fImp == NULL) || (fImp->m_hFile == NULL))
00274         return false;
00275
00276     DWORD dwLength = 1024;
00277     BYTE *pData = new BYTE[dwLength];
00278     if (pData == NULL)
00279         return false;
00280     SeekToBegin();
00281     SetLength(0);
00282     fImp->SeekToBegin();
00283     while (fImp->GetPosition() < fImp->GetLength())
00284     {
00285         DWORD dwRead = fImp->Read(pData,dwLength);
00286         Write(pData,dwRead);
00287     }
00288
00289     delete pData;
00290     return true;
00291 }

DWORD CCJMemFile::Insert | ( | CString | strSrc,
 |  | DWORD | dwSourcePos,
 |  | DWORD | dwDestPos,
 |  | DWORD | dwBytes
 | ) | [virtual]

Definition at line 357 of file CJMemFile.cpp.

References Insert().

00358 {
00359     CFile file(strSrc,CFile::modeRead);
00360     DWORD dwResult = Insert(&file, dwSourcePos, dwDestPos, dwBytes);
00361     file.Close();
00362     return dwResult;
00363 }

Here is the call graph for this function:

DWORD CCJMemFile::Insert | ( | CFile * | fSrc,
 |  | DWORD | dwSourcePos,
 |  | DWORD | dwDestPos,
 |  | DWORD | dwBytes
 | ) | [virtual]

Definition at line 314 of file CJMemFile.cpp.

References Extract(), and NULL.

Referenced by Insert().

00315 {
00316     if (dwBytes == 0)
00317         return 0;
00318
00319     CCJMemFile fPreIns;
00320     CCJMemFile fIns;
00321     CCJMemFile fPostIns;
00322     CCJMemFile fComplete;
00323
00324     Extract(&fPreIns,0,dwDestPos); // Extract Data BEFORE insertion point
00325     Extract(&fPostIns,dwDestPos,GetLength() - dwDestPos); // Extract Data AFTER intertion point
00326
00327     // Extract the "to be inserted" Data from the (fSrc) Source file
00328     {
00329         DWORD dwLength = 1024;
00330         DWORD dwCounter = 0;
00331         BYTE *pData = new BYTE[dwLength];
00332         if (pData == NULL)
00333             return 0;
00334         fSrc->Seek(dwSourcePos,begin);
00335
00336         while (((fSrc->GetPosition() - dwSourcePos) < dwBytes) && (fSrc->GetPosition() < fSrc->GetLength()) )
00337         {
00338             DWORD dwRead = fSrc->Read(pData,dwLength);
00339             if (dwCounter + dwRead > dwSourcePos + dwBytes)
00340                 dwRead = dwBytes - dwCounter;
00341             fIns.Write(pData,dwRead);
00342             dwCounter += dwRead;
00343         }
00344         delete pData;
00345     } // Finished Extraction
00346
00347
00348     fComplete += &fPreIns; // Append BEFORE Data
00349     fComplete += &fIns; // Append the "to be inserted" Data
00350     fComplete += &fPostIns;  // Append the AFTER Data
00351
00352     *this = &fComplete; // Copy completed File
00353
00354     return fIns.GetLength();
00355 }

Here is the call graph for this function:

bool CCJMemFile::Load ( ) [protected, virtual]

Definition at line 226 of file CJMemFile.cpp.

References m_File, and NULL.

Referenced by Discard(), and Open().

00227 {
00228     if (m_File.m_hFile == NULL)
00229         return false;
00230
00231     DWORD dwLength = 1024;
00232     BYTE *pData = new BYTE[dwLength];
00233     if (pData == NULL)
00234         return false;
00235     SeekToBegin();
00236     SetLength(0);
00237     m_File.SeekToBegin();
00238     while (m_File.GetPosition() < m_File.GetLength())
00239     {
00240         DWORD dwRead = m_File.Read(pData,dwLength);
00241         Write(pData,dwRead);
00242     }
00243
00244     delete pData;
00245     return true;
00246 }

bool CCJMemFile::Open | ( | CString | strFilename,
 |  | UINT | uiOpenFlags,
 |  | CFileException * | pError = NULL
 | ) | [virtual]

Definition at line 175 of file CJMemFile.cpp.

References Load(), m_bOpen, m_File, m_uiOpenFlags, and NULL.

Referenced by CCJMemFile().

00176 {
00177     // CFile compatible Open
00178
00179     if (m_File.m_hFile != NULL)
00180         return false;
00181     if (m_File.Open(strFilename,uiOpenFlags,pError))
00182     {
00183         m_uiOpenFlags = uiOpenFlags;
00184         Load();
00185         m_bOpen = true;
00186         return true;
00187     }
00188     else
00189         return false;
00190 }

Here is the call graph for this function:

void CCJMemFile::operator+= ( CString strApp )

Definition at line 432 of file CJMemFile.cpp.

References Append().

00433 {
00434     CFile file;
00435     if (file.Open(strApp,CFile::modeRead))
00436     {
00437         Append(&file);
00438         file.Close();
00439     }
00440 }

Here is the call graph for this function:

void CCJMemFile::operator+= ( CFile * fApp )

Definition at line 427 of file CJMemFile.cpp.

References Append().

00428 {
00429     Append(fApp);
00430 }

Here is the call graph for this function:

void CCJMemFile::operator= ( DWORD dwFilePos )

Definition at line 421 of file CJMemFile.cpp.

00422 {
00423     Seek(dwFilePos,begin);
00424 }

void CCJMemFile::operator= ( CString strDup )

Definition at line 411 of file CJMemFile.cpp.

References Import().

00412 {
00413     CFile file;
00414     if (file.Open(strDup,CFile::modeRead))
00415     {
00416         Import(&file);
00417         file.Close();
00418     }
00419 }

Here is the call graph for this function:

void CCJMemFile::operator= ( CFile * fDup )

Definition at line 406 of file CJMemFile.cpp.

References Import().

00407 {
00408     Import(fDup);
00409 }

Here is the call graph for this function:

BYTE CCJMemFile::operator[] ( DWORD dwFilePos )

Definition at line 444 of file CJMemFile.cpp.

00445 {
00446     if (dwFilePos > GetLength() -1)
00447         return 0;
00448
00449     BYTE bTemp;
00450     Seek(dwFilePos,begin);
00451     Read(&bTemp,sizeof(BYTE));
00452     return bTemp;
00453 }

BOOL CCJMemFile::ReadString ( CString & rString ) [virtual]

Definition at line 96 of file CJMemFile.cpp.

00097 {
00098     // Readstring Beta Version
00099
00100     rString.Empty();
00101     char ch;
00102
00103     bool bFound = false;
00104     while (GetPosition() < GetLength())
00105     {
00106         Read(&ch,1);
00107
00108         bFound = (ch == '\x0D');
00109         if (bFound || (ch == '\x0'))
00110             break;
00111         else
00112             rString = rString + ch;
00113     }
00114     if (bFound)
00115     {
00116         Read(&ch,1);
00117         if (ch != '\x0A')
00118             Seek(-1,current);
00119     }
00120
00121     if (rString.GetLength() > 0)
00122         return true;
00123     return false;
00124 }

bool CCJMemFile::Save ( ) [protected, virtual]

Definition at line 192 of file CJMemFile.cpp.

References m_File, m_uiOpenFlags, and NULL.

Referenced by Close(), and Flush().

00193 {
00194     if (m_File.m_hFile == NULL)
00195         return false;
00196     CString str;
00197
00198     // Check if the physical file has write access
00199     if (!(m_uiOpenFlags & modeWrite) && !(m_uiOpenFlags & modeReadWrite))
00200     {
00201         return false;
00202     }
00203
00204 #if _MFC_VER < 0x700
00205     DWORD dwPos = GetPosition();
00206 #else
00207     ULONGLONG dwPos = GetPosition();
00208 #endif
00209     DWORD dwLength = 1024;
00210     BYTE *pData = new BYTE[dwLength];
00211     if (pData == NULL)
00212         return false;
00213     SeekToBegin();
00214     m_File.SetLength(0);
00215     while (GetPosition() < GetLength())
00216     {
00217         DWORD dwRead = Read(pData,dwLength);
00218         m_File.Write(pData,dwRead);
00219     }
00220     Seek(dwPos,begin);
00221     delete pData;
00222     m_File.Flush();
00223     return true;
00224 }

void CCJMemFile::WriteString ( LPCTSTR lpsz ) [virtual]

Definition at line 126 of file CJMemFile.cpp.

00127 {
00128     // WriteString Beta Version
00129
00130     if (_tcslen(lpsz) > 0)
00131     {
00132         for (UINT iCount = 0; iCount < _tcslen(lpsz); iCount++)
00133             if ((lpsz[iCount] != '\x0D') && (lpsz[iCount] != '\x00'))
00134                 Write(&lpsz[iCount],1);
00135     }
00136     char ch = '\x0D';
00137     Write(&ch,1);
00138     ch = '\x0A';
00139     Write(&ch,1);
00140
00141 }

Member Data Documentation

bool CCJMemFile::m_bOpen [private]

Definition at line 50 of file CJMemFile.h.

Referenced by CCJMemFile(), Close(), Open(), and ~CCJMemFile().

CFile CCJMemFile::m_File [private]

Definition at line 48 of file CJMemFile.h.

Referenced by CCJMemFile(), Close(), Load(), Open(), Save(), and ~CCJMemFile().

CFileException* CCJMemFile::m_pError [private]

Definition at line 47 of file CJMemFile.h.

UINT CCJMemFile::m_uiOpenFlags [private]

Definition at line 49 of file CJMemFile.h.

Referenced by CCJMemFile(), Open(), Save(), and ~CCJMemFile().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMemFile.h
  • WinCvs/CJLib/CJLibrary/CJMemFile.cpp
Generated on Sat Aug 7 22:49:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMenu Class Reference

CCJMenu Class Reference

#include <CJMenu.h>

Inheritance diagram for CCJMenu:

[legend]
Collaboration diagram for CCJMenu:

[legend]
List of all members.

Public Member Functions

CCJMenu ()
void | SetBitmapBackground (COLORREF color)
void | SetDisableOldStyle (void)
void | UnSetDisableOldStyle (void)
BOOL | GetDisableOldStyle (void)
void | UnSetBitmapBackground (void)
BOOL | AddBitmapToImageList (CImageList *list, UINT nResourceID)
BOOL | LoadFromToolBar (UINT nID, UINT nToolBar, int &xoffset)
void | InsertSpaces (void)
void | DrawCheckMark (CDC *pDC, int x, int y, COLORREF color)
void | DrawRadioDot (CDC *pDC, int x, int y, COLORREF color)
CCJMenu * | FindMenuOption (int nId, int &nLoc)
CCJMenuData * | FindMenuOption (wchar_t *lpstrText)
BOOL | GetMenuText (UINT id, CString &string, UINT nFlags=MF_BYPOSITION)
void | LoadCheckmarkBitmap (int unselect, int select)
void | DitherBlt (HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HBITMAP hbm, int nXSrc, int nYSrc)
void | DitherBlt2 (CDC *drawdc, int nXDest, int nYDest, int nWidth, int nHeight, CBitmap &bmp, int nXSrc, int nYSrc)
BOOL | GetBitmapFromImageList (CDC *pDC, CImageList *imglist, int nIndex, CBitmap &bmp)
virtual | ~CCJMenu ()
virtual void | DrawItem (LPDRAWITEMSTRUCT)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT)
void | SetIconSize (int, int)
BOOL | AppendODMenuA (LPCSTR lpstrText, UINT nFlags=MF_OWNERDRAW, UINT nID=0, int nIconNormal=-1)
BOOL | AppendODMenuW (wchar_t *lpstrText, UINT nFlags=MF_OWNERDRAW, UINT nID=0, int nIconNormal=-1)
BOOL | AppendODMenuA (LPCSTR lpstrText, UINT nFlags, UINT nID, CImageList *il, int xoffset)
BOOL | AppendODMenuW (wchar_t *lpstrText, UINT nFlags, UINT nID, CImageList *il, int xoffset)
BOOL | AppendMenuA (UINT nFlags, UINT nIDNewItem=0, LPCTSTR lpszNewItem=NULL)
BOOL | AppendMenuA (UINT nFlags, UINT nIDNewItem, const CBitmap *pBmp)
BOOL | InsertODMenuA (UINT nPosition, LPCSTR lpstrText, UINT nFlags=MF_OWNERDRAW, UINT nID=0, int nIconNormal=-1)
BOOL | InsertODMenuW (UINT nPosition, wchar_t *lpstrText, UINT nFlags=MF_OWNERDRAW, UINT nID=0, int nIconNormal=-1)
BOOL | InsertODMenuA (UINT nPosition, LPCSTR lpstrText, UINT nFlags, UINT nID, CImageList *il, int xoffset)
BOOL | InsertODMenuW (UINT nPosition, wchar_t *lpstrText, UINT nFlags, UINT nID, CImageList *il, int xoffset)
BOOL | ModifyODMenuA (const char *lpstrText, UINT nID=0, int nIconNormal=-1)
BOOL | ModifyODMenuA (const char *lpstrText, UINT nID, CImageList *il, int xoffset)
BOOL | ModifyODMenuA (const char *lpstrText, UINT nID, CBitmap *bmp)
BOOL | ModifyODMenuA (const char *lpstrText, const char *OptionText, int nIconNormal)
BOOL | ModifyODMenuW (wchar_t *lpstrText, UINT nID=0, int nIconNormal=-1)
BOOL | ModifyODMenuW (wchar_t *lpstrText, UINT nID, CImageList *il, int xoffset)
BOOL | ModifyODMenuW (wchar_t *lpstrText, UINT nID, CBitmap *bmp)
BOOL | ModifyODMenuW (wchar_t *lpstrText, wchar_t *OptionText, int nIconNormal)
CCJMenuData * | NewODMenu (UINT pos, UINT nFlags, UINT nID, CString string)
void | SynchronizeMenu (void)
void | InitializeMenuList (int value)
void | DeleteMenuList (void)
CCJMenuData * | FindMenuList (UINT nID)
virtual BOOL | LoadMenu (LPCTSTR lpszResourceName)
virtual BOOL | LoadMenu (int nResource)
void | AddFromToolBar (CToolBar *pToolBar, int nResourceID)
BOOL | Draw3DCheckmark (CDC *dc, const CRect &rc, BOOL bSelected, HBITMAP hbmCheck)
BOOL | LoadToolbar (UINT nToolBar)
BOOL | LoadToolbars (const UINT *arID, int n)
BOOL | RemoveMenu (UINT uiId, UINT nFlags)
BOOL | DeleteMenu (UINT uiId, UINT nFlags)
BOOL | AppendMenuA (UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, int nIconNormal=-1)
BOOL | AppendMenuA (UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, CImageList *il, int xoffset)
BOOL | AppendMenuA (UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, CBitmap *bmp)
BOOL | AppendMenuW (UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, int nIconNormal=-1)
BOOL | AppendMenuW (UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, CImageList *il, int xoffset)
BOOL | AppendMenuW (UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, CBitmap *bmp)
BOOL | InsertMenuA (UINT nPosition, UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, int nIconNormal=-1)
BOOL | InsertMenuA (UINT nPosition, UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, CImageList *il, int xoffset)
BOOL | InsertMenuA (UINT nPosition, UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, CBitmap *bmp)
BOOL | InsertMenuW (UINT nPosition, UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, int nIconNormal=-1)
BOOL | InsertMenuW (UINT nPosition, UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, CImageList *il, int xoffset)
BOOL | InsertMenuW (UINT nPosition, UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, CBitmap *bmp)
CCJMenu * | AppendODPopupMenuA (LPCSTR lpstrText)
CCJMenu * | AppendODPopupMenuW (wchar_t *lpstrText)
virtual BOOL | DestroyMenu ()

Static Public Member Functions

BOOL | IsNewShell (void)
LRESULT | FindKeyboardShortcut (UINT nChar, UINT nFlags, CMenu *pMenu)
void | UpdateMenu (CMenu *pmenu)
BOOL | IsMenu (CMenu *submenu)
BOOL | IsMenu (HMENU submenu)
HBITMAP | LoadSysColorBitmap (int nResourceId)

Public Attributes

CImageList * | checkmaps
BOOL | checkmapsshare
int m_selectcheck
int m_unselectcheck

Protected Attributes

CTypedPtrArray< CPtrArray,
CCJMenuData * > 		m_MenuList
CTypedPtrArray< CPtrArray,
HMENU > 		m_SubMenus
int m_iconX
int m_iconY
COLORREF | m_bitmapBackground
BOOL | m_bitmapBackgroundFlag
BOOL | disable_old_style

Static Protected Attributes

CTypedPtrArray< CPtrArray,
HMENU > 		m_AllSubMenus

Constructor & Destructor Documentation

CCJMenu::CCJMenu ( )

Definition at line 128 of file CJMenu.cpp.

References checkmaps, checkmapsshare, CPInfo, disable_old_style, m_bitmapBackground, m_bitmapBackgroundFlag, m_iconX, m_iconY, m_selectcheck, m_unselectcheck, and NULL.

00129 {
00130     disable_old_style=FALSE;
00131     m_iconX = 16;            // Icon sizes default to 16 x 16
00132     m_iconY = 15;            // ...
00133     m_selectcheck = -1;
00134     m_unselectcheck = -1;
00135     checkmaps=NULL;
00136     checkmapsshare=FALSE;
00137     // set the color used for the transparent background in all bitmaps
00138     m_bitmapBackground=RGB(192,192,192); //gray
00139     m_bitmapBackgroundFlag=FALSE;
00140     GetCPInfo(CP_ACP,&CPInfo);
00141 }

CCJMenu::~CCJMenu ( ) [virtual]

Definition at line 144 of file CJMenu.cpp.

References DestroyMenu().

00145 {
00146     DestroyMenu();
00147 }

Here is the call graph for this function:

Member Function Documentation

BOOL CCJMenu::AddBitmapToImageList | ( | CImageList * | list,
 |  | UINT | nResourceID
 | ) |

Definition at line 1523 of file CJMenu.cpp.

References LoadSysColorBitmap(), m_bitmapBackground, and m_bitmapBackgroundFlag.

Referenced by AddFromToolBar(), AppendODMenuW(), InsertODMenuW(), LoadCheckmarkBitmap(), and ModifyODMenuW().

01524 {
01525     BOOL bReturn=TRUE;
01526
01527     HBITMAP hbmp=LoadSysColorBitmap(nResourceID);
01528     if(hbmp){
01529         CBitmap bmp;
01530         bmp.Attach(hbmp);
01531         if(m_bitmapBackgroundFlag) bmplist->Add(&bmp,m_bitmapBackground);
01532         else bmplist->Add(&bmp,GetSysColor(COLOR_3DFACE));
01533         bmp.Detach();
01534         DeleteObject(hbmp);
01535         bReturn=TRUE;
01536     }
01537     else bReturn = FALSE;
01538     return(bReturn);
01539 }

Here is the call graph for this function:

void CCJMenu::AddFromToolBar | ( | CToolBar * | pToolBar,
 |  | int | nResourceID
 | ) |

Definition at line 1555 of file CJMenu.cpp.

References AddBitmapToImageList(), CCJMenuData::bitmap, FindMenuOption(), m_iconX, m_iconY, m_MenuList, CCJMenuData::menuIconNormal, CCJMenuData::nFlags, CCJMenuData::nID, NULL, and CCJMenuData::xoffset.

01556 {
01557     for (int i = 0; i < pToolBar->GetCount(); i++) {
01558         UINT nID = pToolBar->GetItemID(i);
01559         // See if this toolbar option
01560         // appears as a command on this
01561         // menu or is a separator
01562         if (nID == 0 || GetMenuState(nID, MF_BYCOMMAND) == 0xFFFFFFFF)
01563             continue; // Item doesn't exist
01564         UINT nStyle;
01565         int nImage;
01566         // Get the toolbar button info
01567         pToolBar->GetButtonInfo(i, nID, nStyle, nImage);
01568         // OK, we have the command ID of the toolbar
01569         // option, and the tollbar bitmap offset
01570         int nLoc;
01571         CCJMenuData* pData;
01572         CCJMenu *pSubMenu = FindMenuOption(nID, nLoc);
01573         if (pSubMenu && nLoc >= 0)pData = pSubMenu->m_MenuList[nLoc];
01574         else {
01575             // Create a new CCJMenuData structure
01576             pData = new CCJMenuData;
01577             m_MenuList.Add(pData);
01578         }
01579         // Set some default structure members
01580         pData->menuIconNormal = nResourceID;
01581         pData->nID = nID;
01582         pData->nFlags =  MF_BYCOMMAND | MF_OWNERDRAW;
01583         pData->xoffset = nImage;
01584         if (pData->bitmap)pData->bitmap->DeleteImageList();
01585         else pData->bitmap = new CImageList;
01586         pData->bitmap->Create(m_iconX, m_iconY,ILC_COLORDDB|ILC_MASK, 1, 1);
01587
01588         if(!AddBitmapToImageList(pData->bitmap, nResourceID)){
01589             pData->bitmap->DeleteImageList();
01590             delete pData->bitmap;
01591             pData->bitmap=NULL;
01592             pData->menuIconNormal = -1;
01593             pData->xoffset = -1;
01594         }
01595
01596         // Modify our menu
01597         ModifyMenu(nID,pData->nFlags,nID,(LPCTSTR)pData);
01598     }
01599 }

Here is the call graph for this function:

BOOL CCJMenu::AppendMenuA | ( | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | const char * | lpszNewItem,
 |  | CBitmap * | bmp
 | ) |

Definition at line 1806 of file CJMenu.cpp.

References AppendMenuW().

01807 {
01808     USES_CONVERSION;
01809     return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),bmp);
01810 }

Here is the call graph for this function:

BOOL CCJMenu::AppendMenuA | ( | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | const char * | lpszNewItem,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 1795 of file CJMenu.cpp.

References AppendMenuW().

01796 {
01797     USES_CONVERSION;
01798     return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),il,xoffset);
01799 }

Here is the call graph for this function:

BOOL CCJMenu::AppendMenuA | ( | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | const char * | lpszNewItem,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 1784 of file CJMenu.cpp.

References AppendMenuW().

01785 {
01786     USES_CONVERSION;
01787     return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),nIconNormal);
01788 }

Here is the call graph for this function:

BOOL CCJMenu::AppendMenuA | ( | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | const CBitmap * | pBmp
 | ) | [inline]

Definition at line 186 of file CJMenu.h.

References AppendMenu.

00187         { return CMenu::AppendMenu( nFlags, nIDNewItem, pBmp ); }

BOOL CCJMenu::AppendMenuA | ( | UINT | nFlags,
 |  | UINT | nIDNewItem = 0,
 |  | LPCTSTR | lpszNewItem = NULL
 | ) | [inline]

Definition at line 183 of file CJMenu.h.

References AppendMenu.

00184         { return CMenu::AppendMenu( nFlags, nIDNewItem, lpszNewItem ); }

BOOL CCJMenu::AppendMenuW | ( | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | wchar_t * | lpszNewItem,
 |  | CBitmap * | bmp
 | ) |

Definition at line 1812 of file CJMenu.cpp.

References AppendODMenuW(), m_bitmapBackground, m_bitmapBackgroundFlag, m_iconX, m_iconY, and NULL.

01813 {
01814     if(bmp){
01815         CImageList temp;
01816         temp.Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
01817         if(m_bitmapBackgroundFlag)temp.Add(bmp,m_bitmapBackground);
01818         else temp.Add(bmp,GetSysColor(COLOR_3DFACE));
01819         return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,&temp,0);
01820     }
01821     return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,NULL,0);
01822 }

Here is the call graph for this function:

BOOL CCJMenu::AppendMenuW | ( | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | wchar_t * | lpszNewItem,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 1801 of file CJMenu.cpp.

References AppendODMenuW().

01802 {
01803     return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,il,xoffset);
01804 }

Here is the call graph for this function:

BOOL CCJMenu::AppendMenuW | ( | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | wchar_t * | lpszNewItem,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 1790 of file CJMenu.cpp.

References AppendODMenuW().

Referenced by AppendMenuA().

01791 {
01792     return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,nIconNormal);
01793 }

Here is the call graph for this function:

BOOL CCJMenu::AppendODMenuA | ( | LPCSTR | lpstrText,
 |  | UINT | nFlags,
 |  | UINT | nID,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 654 of file CJMenu.cpp.

References AppendODMenuW().

00656 {
00657     USES_CONVERSION;
00658     return AppendODMenuW(A2W(lpstrText),nFlags,nID,il,xoffset);
00659 }

Here is the call graph for this function:

BOOL CCJMenu::AppendODMenuA | ( | LPCSTR | lpstrText,
 |  | UINT | nFlags = MF_OWNERDRAW,
 |  | UINT | nID = 0,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 609 of file CJMenu.cpp.

References AppendODMenuW().

00611 {
00612     USES_CONVERSION;
00613     return AppendODMenuW(A2W(lpstrText),nFlags,nID,nIconNormal);//SK: See MFC Tech Note 059
00614 }

Here is the call graph for this function:

BOOL CCJMenu::AppendODMenuW | ( | wchar_t * | lpstrText,
 |  | UINT | nFlags,
 |  | UINT | nID,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 661 of file CJMenu.cpp.

References AppendMenu, CCJMenuData::bitmap, m_AllSubMenus, m_MenuList, m_SubMenus, CCJMenuData::menuIconNormal, CCJMenuData::nFlags, CCJMenuData::nID, CCJMenuData::SetWideString(), and CCJMenuData::xoffset.

00663 {
00664     // Add the MF_OWNERDRAW flag if not specified:
00665     if(!nID)nFlags=MF_SEPARATOR|MF_OWNERDRAW;
00666     else if(!(nFlags & MF_OWNERDRAW))nFlags |= MF_OWNERDRAW;
00667
00668     if(nFlags & MF_POPUP){
00669         m_AllSubMenus.Add((HMENU)nID);
00670         m_SubMenus.Add((HMENU)nID);
00671     }
00672
00673     CCJMenuData *mdata = new CCJMenuData;
00674     m_MenuList.Add(mdata);
00675     mdata->SetWideString(lpstrText);    //SK: modified for dynamic allocation
00676
00677     if(il){
00678         mdata->menuIconNormal = 0;
00679         mdata->xoffset=xoffset;
00680         if(mdata->bitmap)mdata->bitmap->Detach();
00681         else mdata->bitmap=new(CImageList);
00682         mdata->bitmap->Attach(ImageList_Duplicate(il->m_hImageList));
00683     }
00684     else{
00685         mdata->menuIconNormal = -1;
00686         mdata->xoffset = -1;
00687     }
00688     mdata->nFlags = nFlags;
00689     mdata->nID = nID;
00690     return(CMenu::AppendMenu(nFlags, nID, (LPCTSTR)mdata));
00691 }

Here is the call graph for this function:

BOOL CCJMenu::AppendODMenuW | ( | wchar_t * | lpstrText,
 |  | UINT | nFlags = MF_OWNERDRAW,
 |  | UINT | nID = 0,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 617 of file CJMenu.cpp.

References AddBitmapToImageList(), AppendMenu, CCJMenuData::bitmap, LoadFromToolBar(), m_AllSubMenus, m_iconX, m_iconY, m_MenuList, m_SubMenus, CCJMenuData::menuIconNormal, CCJMenuData::nFlags, CCJMenuData::nID, NULL, CCJMenuData::SetWideString(), and CCJMenuData::xoffset.

Referenced by AppendMenuW(), AppendODMenuA(), and AppendODPopupMenuW().

00619 {
00620     // Add the MF_OWNERDRAW flag if not specified:
00621     if(!nID)nFlags=MF_SEPARATOR|MF_OWNERDRAW;
00622     else if(!(nFlags & MF_OWNERDRAW))nFlags |= MF_OWNERDRAW;
00623
00624     if(nFlags & MF_POPUP){
00625         m_AllSubMenus.Add((HMENU)nID);
00626         m_SubMenus.Add((HMENU)nID);
00627     }
00628
00629     CCJMenuData *mdata = new CCJMenuData;
00630     m_MenuList.Add(mdata);
00631     mdata->SetWideString(lpstrText);    //SK: modified for dynamic allocation
00632
00633     mdata->menuIconNormal = nIconNormal;
00634     mdata->xoffset=-1;
00635     if(nIconNormal>=0){
00636         mdata->xoffset=0;
00637         LoadFromToolBar(nID,nIconNormal,mdata->xoffset);
00638         if(mdata->bitmap)mdata->bitmap->DeleteImageList();
00639         else mdata->bitmap=new(CImageList);
00640         mdata->bitmap->Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00641         if(!AddBitmapToImageList(mdata->bitmap,nIconNormal)){
00642             mdata->bitmap->DeleteImageList();
00643             delete mdata->bitmap;
00644             mdata->bitmap=NULL;
00645             mdata->menuIconNormal = nIconNormal = -1;
00646             mdata->xoffset = -1;
00647         }
00648     }
00649     mdata->nFlags = nFlags;
00650     mdata->nID = nID;
00651     return(CMenu::AppendMenu(nFlags, nID, (LPCTSTR)mdata));
00652 }

Here is the call graph for this function:

CCJMenu * CCJMenu::AppendODPopupMenuA ( LPCSTR lpstrText )

Definition at line 1880 of file CJMenu.cpp.

References AppendODPopupMenuW().

01881 {
01882     USES_CONVERSION;
01883     return AppendODPopupMenuW(A2W(lpstrText));
01884 }

Here is the call graph for this function:

CCJMenu * CCJMenu::AppendODPopupMenuW ( wchar_t * lpstrText )

Definition at line 1866 of file CJMenu.cpp.

References AppendODMenuW(), checkmaps, checkmapsshare, m_selectcheck, and m_unselectcheck.

Referenced by AppendODPopupMenuA().

01867 {
01868     CCJMenu* pSubMenu = new CCJMenu;
01869     pSubMenu->m_unselectcheck=m_unselectcheck;
01870     pSubMenu->m_selectcheck=m_selectcheck;
01871     pSubMenu->checkmaps=checkmaps;
01872     pSubMenu->checkmapsshare=TRUE;
01873     pSubMenu->CreatePopupMenu();
01874     AppendODMenuW(lpstrText,MF_POPUP,(UINT)pSubMenu->m_hMenu, -1);
01875     return pSubMenu;
01876 }

Here is the call graph for this function:

BOOL CCJMenu::DeleteMenu | ( | UINT | uiId,
 |  | UINT | nFlags
 | ) |

Definition at line 1738 of file CJMenu.cpp.

References FindMenuOption(), m_AllSubMenus, m_MenuList, m_SubMenus, and NULL.

01739 {
01740     if(MF_BYPOSITION&nFlags){
01741         CCJMenu* pSubMenu = (CCJMenu*) GetSubMenu(uiId);
01742         if(NULL==pSubMenu){
01743             UINT uiCommandId = GetMenuItemID(uiId);
01744             for(int i=0;i<m_MenuList.GetSize(); i++){
01745                 if(m_MenuList[i]->nID==uiCommandId){
01746                     delete m_MenuList.GetAt(i);
01747                     m_MenuList.RemoveAt(i);
01748                     break;
01749                 }
01750             }
01751         }
01752         else{
01753             int numSubMenus = m_SubMenus.GetUpperBound();
01754             for(int m = numSubMenus; m >= 0; m--){
01755                 if(m_SubMenus[m]==pSubMenu->m_hMenu){
01756                     int numAllSubMenus = m_AllSubMenus.GetUpperBound();
01757                     for(int n = numAllSubMenus; n>= 0; n--){
01758                         if(m_AllSubMenus[n]==m_SubMenus[m])m_AllSubMenus.RemoveAt(n);
01759                     }
01760                     m_SubMenus.RemoveAt(m);
01761                 }
01762             }
01763             int num = pSubMenu->GetMenuItemCount();
01764             for(int i=num-1;i>=0;--i)pSubMenu->DeleteMenu(i,MF_BYPOSITION);
01765             for(i=m_MenuList.GetUpperBound();i>=0;i--){
01766                 if(m_MenuList[i]->nID==(UINT)pSubMenu->m_hMenu){
01767                     delete m_MenuList.GetAt(i);
01768                     m_MenuList.RemoveAt(i);
01769                     break;
01770                 }
01771             }
01772             delete pSubMenu;
01773         }
01774     }
01775     else{
01776         int iPosition =0;
01777         CCJMenu* pMenu = FindMenuOption(uiId,iPosition);
01778         if(pMenu)pMenu->DeleteMenu(iPosition,MF_BYPOSITION);
01779     }
01780     return CMenu::DeleteMenu(uiId,nFlags);
01781 }

Here is the call graph for this function:

void CCJMenu::DeleteMenuList ( void )

Definition at line 1339 of file CJMenu.cpp.

References m_MenuList.

Referenced by SynchronizeMenu().

01340 {
01341     for(int i=0;i<=m_MenuList.GetUpperBound();++i){
01342         if(!m_MenuList[i]->syncflag){
01343             delete m_MenuList[i];
01344         }
01345     }
01346 }

BOOL CCJMenu::DestroyMenu ( ) [virtual]

Definition at line 198 of file CJMenu.cpp.

References checkmaps, checkmapsshare, m_AllSubMenus, m_MenuList, m_SubMenus, and NULL.

Referenced by CGfxOutBarCtrl::OnRButtonDown(), CCJFlatHeaderCtrl::OnRButtonDown(), CCJControlBar::OnRButtonDown(), CCJMenuBar::TrackPopup(), and ~CCJMenu().

00199 {
00200     // Destroy Sub menus:
00201     int m,n;
00202     int numAllSubMenus = m_AllSubMenus.GetUpperBound();
00203     for(n = numAllSubMenus; n>= 0; n--){
00204         if(m_AllSubMenus[n]==this->m_hMenu)m_AllSubMenus.RemoveAt(n);
00205     }
00206     int numSubMenus = m_SubMenus.GetUpperBound();
00207     for(m = numSubMenus; m >= 0; m--){
00208         numAllSubMenus = m_AllSubMenus.GetUpperBound();
00209         for(n = numAllSubMenus; n>= 0; n--){
00210             if(m_AllSubMenus[n]==m_SubMenus[m])m_AllSubMenus.RemoveAt(n);
00211         }
00212         delete((CCJMenu *)FromHandle(m_SubMenus[m]));
00213     }
00214     m_SubMenus.RemoveAll();
00215     // Destroy menu data
00216     int numItems = m_MenuList.GetUpperBound();
00217     for(m = 0; m <= numItems; m++)delete(m_MenuList[m]);
00218     m_MenuList.RemoveAll();
00219     if(checkmaps&&!checkmapsshare){
00220         delete checkmaps;
00221         checkmaps=NULL;
00222     }
00223     // Call base-class implementation last:
00224     return(CMenu::DestroyMenu());
00225 };

void CCJMenu::DitherBlt | ( | HDC | hdcDest,
 |  | int | nXDest,
 |  | int | nYDest,
 |  | int | nWidth,
 |  | int | nHeight,
 |  | HBITMAP | hbm,
 |  | int | nXSrc,
 |  | int | nYSrc
 | ) |

Definition at line 1440 of file CJMenu.cpp.

References IsNewShell(), and NULL.

Referenced by DrawItem().

01442 {
01443     ASSERT(hdcDest && hbm);
01444     ASSERT(nWidth > 0 && nHeight > 0);
01445
01446     // Create a generic DC for all BitBlts
01447     HDC hDC = CreateCompatibleDC(hdcDest);
01448     ASSERT(hDC);
01449
01450     if (hDC)
01451     {
01452         // Create a DC for the monochrome DIB section
01453         HDC bwDC = CreateCompatibleDC(hDC);
01454         ASSERT(bwDC);
01455
01456         if (bwDC)
01457         {
01458             // Create the monochrome DIB section with a black and white palette
01459             struct {
01460                 BITMAPINFOHEADER bmiHeader;
01461                 RGBQUAD      bmiColors[2];
01462             } RGBBWBITMAPINFO = {
01463
01464                 {    // a BITMAPINFOHEADER
01465                     sizeof(BITMAPINFOHEADER),  // biSize
01466                         nWidth,         // biWidth;
01467                         nHeight,        // biHeight;
01468                         1,            // biPlanes;
01469                         1,            // biBitCount
01470                         BI_RGB,         // biCompression;
01471                         0,            // biSizeImage;
01472                         0,            // biXPelsPerMeter;
01473                         0,            // biYPelsPerMeter;
01474                         0,            // biClrUsed;
01475                         0            // biClrImportant;
01476                 },
01477                 {
01478                     { 0x00, 0x00, 0x00, 0x00 }, { 0xFF, 0xFF, 0xFF, 0x00 }
01479                     }
01480             };
01481             VOID *pbitsBW;
01482             HBITMAP hbmBW = CreateDIBSection(bwDC,
01483                 (LPBITMAPINFO)&RGBBWBITMAPINFO, DIB_RGB_COLORS, &pbitsBW, NULL, 0);
01484             ASSERT(hbmBW);
01485
01486             if (hbmBW)
01487             {
01488                 // Attach the monochrome DIB section and the bitmap to the DCs
01489                 HBITMAP olddib = (HBITMAP)SelectObject(bwDC, hbmBW);
01490                 HBITMAP hdcolddib = (HBITMAP)SelectObject(hDC, hbm);
01491
01492                 // BitBlt the bitmap into the monochrome DIB section
01493                 BitBlt(bwDC, 0, 0, nWidth, nHeight, hDC, nXSrc, nYSrc, SRCCOPY);
01494
01495                 // Paint the destination rectangle in gray
01496                 FillRect(hdcDest, CRect(nXDest, nYDest, nXDest + nWidth, nYDest +
01497                     nHeight), GetSysColorBrush((IsNewShell())?COLOR_3DFACE:COLOR_MENU));
01498                 //SK: looks better on the old shell
01499                 // BitBlt the black bits in the monochrome bitmap into COLOR_3DHILIGHT
01500                 // bits in the destination DC
01501                 // The magic ROP comes from the Charles Petzold's book
01502                 HBRUSH hb = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT));
01503                 HBRUSH oldBrush = (HBRUSH)SelectObject(hdcDest, hb);
01504                 BitBlt(hdcDest,nXDest+1,nYDest+1,nWidth,nHeight,bwDC,0,0,0xB8074A);
01505
01506                 // BitBlt the black bits in the monochrome bitmap into COLOR_3DSHADOW
01507                 // bits in the destination DC
01508                 hb = CreateSolidBrush(GetSysColor(COLOR_3DSHADOW));
01509                 DeleteObject(SelectObject(hdcDest, hb));
01510                 BitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight,bwDC,0,0,0xB8074A);
01511                 DeleteObject(SelectObject(hdcDest, oldBrush));
01512                 VERIFY(DeleteObject(SelectObject(bwDC, olddib)));
01513                 SelectObject(hDC, hdcolddib);
01514             }
01515
01516             VERIFY(DeleteDC(bwDC));
01517         }
01518
01519         VERIFY(DeleteDC(hDC));
01520     }
01521 }

Here is the call graph for this function:

void CCJMenu::DitherBlt2 | ( | CDC * | drawdc,
 |  | int | nXDest,
 |  | int | nYDest,
 |  | int | nWidth,
 |  | int | nHeight,
 |  | CBitmap & | bmp,
 |  | int | nXSrc,
 |  | int | nYSrc
 | ) |

Definition at line 1617 of file CJMenu.cpp.

References IsNewShell().

Referenced by DrawItem().

01619 {
01620     // create a monochrome memory DC
01621     CDC ddc;
01622     ddc.CreateCompatibleDC(0);
01623     CBitmap bwbmp;
01624     bwbmp.CreateCompatibleBitmap(&ddc, nWidth, nHeight);
01625     CBitmap * pddcOldBmp = ddc.SelectObject(&bwbmp);
01626
01627     CDC dc;
01628     dc.CreateCompatibleDC(0);
01629     CBitmap * pdcOldBmp = dc.SelectObject(&bmp);
01630
01631     // build a mask
01632     ddc.PatBlt(0, 0, nWidth, nHeight, WHITENESS);
01633     dc.SetBkColor(GetSysColor(COLOR_BTNFACE));
01634     ddc.BitBlt(0, 0, nWidth, nHeight, &dc, nXSrc,nYSrc, SRCCOPY);
01635     dc.SetBkColor(GetSysColor(COLOR_BTNHILIGHT));
01636     ddc.BitBlt(0, 0, nWidth, nHeight, &dc, nXSrc,nYSrc, SRCPAINT);
01637
01638     // Copy the image from the toolbar into the memory DC
01639     // and draw it (grayed) back into the toolbar.
01640     dc.FillSolidRect(0,0, nWidth, nHeight, GetSysColor((IsNewShell())?COLOR_3DFACE:COLOR_MENU));
01641     //SK: Looks better on the old shell
01642     dc.SetBkColor(RGB(0, 0, 0));
01643     dc.SetTextColor(RGB(255, 255, 255));
01644     CBrush brShadow, brHilight;
01645     brHilight.CreateSolidBrush(GetSysColor(COLOR_BTNHILIGHT));
01646     brShadow.CreateSolidBrush(GetSysColor(COLOR_BTNSHADOW));
01647     CBrush * pOldBrush = dc.SelectObject(&brHilight);
01648     dc.BitBlt(0,0, nWidth, nHeight, &ddc, 0, 0, 0x00E20746L);
01649     drawdc->BitBlt(nXDest+1,nYDest+1,nWidth, nHeight, &dc,0,0,SRCCOPY);
01650     dc.BitBlt(1,1, nWidth, nHeight, &ddc, 0, 0, 0x00E20746L);
01651     dc.SelectObject(&brShadow);
01652     dc.BitBlt(0,0, nWidth, nHeight, &ddc, 0, 0, 0x00E20746L);
01653     drawdc->BitBlt(nXDest,nYDest,nWidth, nHeight, &dc,0,0,SRCCOPY);
01654     // reset DCs
01655     ddc.SelectObject(pddcOldBmp);
01656     ddc.DeleteDC();
01657     dc.SelectObject(pOldBrush);
01658     dc.SelectObject(pdcOldBmp);
01659     dc.DeleteDC();
01660
01661     brShadow.DeleteObject();
01662     brHilight.DeleteObject();
01663     bwbmp.DeleteObject();
01664 }

Here is the call graph for this function:

BOOL CCJMenu::Draw3DCheckmark | ( | CDC * | dc,
 |  | const CRect & | rc,
 |  | BOOL | bSelected,
 |  | HBITMAP | hbmCheck
 | ) |

Definition at line 1601 of file CJMenu.cpp.

References DrawCheckMark(), DrawRadioDot(), and IsNewShell().

Referenced by DrawItem().

01603 {
01604     CRect rcDest = rc;
01605     CBrush brush;
01606     COLORREF col=GetSysColor((bSelected||!IsNewShell())?COLOR_MENU:COLOR_3DLIGHT);//SK: Looks better on the old shell
01607     brush.CreateSolidBrush(col);
01608     dc->FillRect(rcDest,&brush);
01609     brush.DeleteObject();
01610     if (IsNewShell()) //SK: looks better on the old shell
01611         dc->DrawEdge(&rcDest, BDR_SUNKENOUTER, BF_RECT);
01612     if (!hbmCheck)DrawCheckMark(dc,rc.left+4,rc.top+4,GetSysColor(COLOR_MENUTEXT));
01613     else DrawRadioDot(dc,rc.left+5,rc.top+4,GetSysColor(COLOR_MENUTEXT));
01614     return TRUE;
01615 }

Here is the call graph for this function:

void CCJMenu::DrawCheckMark | ( | CDC * | pDC,
 |  | int | x,
 |  | int | y,
 |  | COLORREF | color
 | ) |

Definition at line 1291 of file CJMenu.cpp.

Referenced by Draw3DCheckmark().

01292 {
01293     pDC->SetPixel(x,y+2,color);
01294     pDC->SetPixel(x,y+3,color);
01295     pDC->SetPixel(x,y+4,color);
01296
01297     pDC->SetPixel(x+1,y+3,color);
01298     pDC->SetPixel(x+1,y+4,color);
01299     pDC->SetPixel(x+1,y+5,color);
01300
01301     pDC->SetPixel(x+2,y+4,color);
01302     pDC->SetPixel(x+2,y+5,color);
01303     pDC->SetPixel(x+2,y+6,color);
01304
01305     pDC->SetPixel(x+3,y+3,color);
01306     pDC->SetPixel(x+3,y+4,color);
01307     pDC->SetPixel(x+3,y+5,color);
01308
01309     pDC->SetPixel(x+4,y+2,color);
01310     pDC->SetPixel(x+4,y+3,color);
01311     pDC->SetPixel(x+4,y+4,color);
01312
01313     pDC->SetPixel(x+5,y+1,color);
01314     pDC->SetPixel(x+5,y+2,color);
01315     pDC->SetPixel(x+5,y+3,color);
01316
01317     pDC->SetPixel(x+6,y,color);
01318     pDC->SetPixel(x+6,y+1,color);
01319     pDC->SetPixel(x+6,y+2,color);
01320 }

void CCJMenu::DrawItem ( LPDRAWITEMSTRUCT ) [virtual]

Definition at line 245 of file CJMenu.cpp.

References checkmaps, disable_old_style, DitherBlt(), DitherBlt2(), Draw3DCheckmark(), GAP, GetBitmapFromImageList(), IsNewShell(), m_iconX, m_iconY, m_selectcheck, m_unselectcheck, and NULL.

00246 {
00247     ASSERT(lpDIS != NULL);
00248     CDC* pDC = CDC::FromHandle(lpDIS->hDC);
00249     CRect rect;
00250     UINT state = (((CCJMenuData*)(lpDIS->itemData))->nFlags);
00251     if(state & MF_SEPARATOR){
00252         rect.CopyRect(&lpDIS->rcItem);
00253         rect.top+=rect.Height()>>1;
00254         pDC->DrawEdge(&rect,EDGE_ETCHED,BF_TOP);
00255     }
00256     else{
00257         CRect rect2;
00258         BOOL standardflag=FALSE,selectedflag=FALSE,disableflag=FALSE;
00259         BOOL checkflag=FALSE;
00260         COLORREF crText = GetSysColor(COLOR_MENUTEXT);
00261         COLORREF m_clrBack=GetSysColor(COLOR_MENU);
00262         CBrush m_brBackground,m_brSelect;
00263         CPen m_penBack;
00264         int x0,y0,dy;
00265         int nIconNormal=-1,xoffset=-1;
00266         CImageList *bitmap=NULL;
00267         CFont m_fontMenu;
00268         LOGFONT m_lf;
00269
00270         // set some colors and the font
00271         m_penBack.CreatePen (PS_SOLID,0,GetSysColor(COLOR_MENU));
00272         m_brBackground.CreateSolidBrush(GetSysColor(COLOR_MENU));
00273         m_brSelect.CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT));
00274         ZeroMemory ((PVOID) &m_lf,sizeof (LOGFONT));
00275         NONCLIENTMETRICS nm;
00276         nm.cbSize = sizeof (NONCLIENTMETRICS);
00277         VERIFY (SystemParametersInfo(SPI_GETNONCLIENTMETRICS,nm.cbSize,&nm,0));
00278         m_lf =  nm.lfMenuFont;
00279         m_fontMenu.CreateFontIndirect (&m_lf);
00280
00281         // draw the colored rectangle portion
00282
00283         rect.CopyRect(&lpDIS->rcItem);
00284         rect2=rect;
00285
00286         // draw the up/down/focused/disabled state
00287
00288         UINT action = lpDIS->itemAction;
00289         UINT state = lpDIS->itemState;
00290         CString strText;
00291         LOGFONT lf;
00292         lf = m_lf;
00293
00294         CFont dispFont;
00295         CFont *pFont=NULL;
00296
00297         if(lpDIS->itemData != NULL){
00298             nIconNormal = (((CCJMenuData*)(lpDIS->itemData))->menuIconNormal);
00299             xoffset = (((CCJMenuData*)(lpDIS->itemData))->xoffset);
00300             bitmap = (((CCJMenuData*)(lpDIS->itemData))->bitmap);
00301             strText = ((CCJMenuData*) (lpDIS->itemData))->GetString();
00302
00303             if(state&ODS_CHECKED && nIconNormal<0){
00304                 if(state&ODS_SELECTED && m_selectcheck>0)checkflag=TRUE;
00305                 else if(m_unselectcheck>0) checkflag=TRUE;
00306             }
00307             else if(nIconNormal != -1){
00308                 standardflag=TRUE;
00309                 if(state&ODS_SELECTED && !(state&ODS_GRAYED))selectedflag=TRUE;
00310                 else if(state&ODS_GRAYED) disableflag=TRUE;
00311             }
00312         }
00313         else{
00314             strText.Empty();
00315         }
00316
00317         if(state&ODS_SELECTED){ // draw the down edges
00318
00319             CPen *pOldPen = pDC->SelectObject (&m_penBack);
00320
00321             // You need only Text highlight and thats what you get
00322
00323             if(checkflag||standardflag||selectedflag||disableflag||state&ODS_CHECKED)
00324                 rect2.SetRect(rect.left+m_iconX+4+GAP,rect.top,rect.right,rect.bottom);
00325             pDC->FillRect (rect2,&m_brSelect);
00326
00327             pDC->SelectObject (pOldPen);
00328             if((HFONT)dispFont != NULL)dispFont.DeleteObject ();
00329             dispFont.CreateFontIndirect (&lf);
00330             crText = GetSysColor(COLOR_HIGHLIGHTTEXT);
00331         }
00332         else {
00333             CPen *pOldPen = pDC->SelectObject (&m_penBack);
00334             pDC->FillRect (rect,&m_brBackground);
00335             pDC->SelectObject (pOldPen);
00336
00337             // draw the up edges
00338
00339             pDC->Draw3dRect (rect,m_clrBack,m_clrBack);
00340             if ((HFONT)dispFont != NULL) dispFont.DeleteObject ();
00341             dispFont.CreateFontIndirect (&lf); //Normal
00342         }
00343
00344         // draw the text if there is any
00345         //We have to paint the text only if the image is nonexistant
00346
00347         dy = (rect.Height()-4-m_iconY)/2;
00348         dy = dy<0 ? 0 : dy;
00349
00350         if(checkflag||standardflag||selectedflag||disableflag){
00351             rect2.SetRect(rect.left+1,rect.top+1+dy,rect.left+m_iconX+3,
00352                 rect.top+m_iconY+3+dy);
00353             pDC->Draw3dRect (rect2,m_clrBack,m_clrBack);
00354             if(checkflag && checkmaps){
00355                 pDC->FillRect (rect2,&m_brBackground);
00356                 rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00357                     rect.top+m_iconY+4+dy);
00358
00359                 pDC->Draw3dRect (rect2,m_clrBack,m_clrBack);
00360                 CPoint ptImage(rect.left+2,rect.top+2+dy);
00361
00362                 if(state&ODS_SELECTED)checkmaps->Draw(pDC,1,ptImage,ILD_TRANSPARENT);
00363                 else checkmaps->Draw(pDC,0,ptImage,ILD_TRANSPARENT);
00364             }
00365             else if(disableflag){
00366                 if(!selectedflag){
00367                     CBitmap bitmapstandard;
00368                     GetBitmapFromImageList(pDC,bitmap,xoffset,bitmapstandard);
00369                     rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00370                         rect.top+m_iconY+4+dy);
00371                     pDC->Draw3dRect (rect2,m_clrBack,m_clrBack);
00372                     if(disable_old_style)
00373                         DitherBlt(lpDIS->hDC,rect.left+2,rect.top+2+dy,m_iconX,m_iconY,
00374                         (HBITMAP)(bitmapstandard),0,0);
00375                     else
00376                         DitherBlt2(pDC,rect.left+2,rect.top+2+dy,m_iconX,m_iconY,
00377                         bitmapstandard,0,0);
00378                     bitmapstandard.DeleteObject();
00379                 }
00380             }
00381             else if(selectedflag){
00382                 pDC->FillRect (rect2,&m_brBackground);
00383                 rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00384                     rect.top+m_iconY+4+dy);
00385                 if (IsNewShell()){
00386                     if(state&ODS_CHECKED)
00387                         pDC->Draw3dRect(rect2,GetSysColor(COLOR_3DSHADOW),
00388                         GetSysColor(COLOR_3DHILIGHT));
00389                     else
00390                         pDC->Draw3dRect(rect2,GetSysColor(COLOR_3DHILIGHT),
00391                         GetSysColor(COLOR_3DSHADOW));
00392                 }
00393                 CPoint ptImage(rect.left+2,rect.top+2+dy);
00394                 if(bitmap)bitmap->Draw(pDC,xoffset,ptImage,ILD_TRANSPARENT);
00395             }
00396             else{
00397                 if(state&ODS_CHECKED){
00398                     CBrush brush;
00399                     COLORREF col =GetSysColor(COLOR_3DLIGHT);
00400                     brush.CreateSolidBrush(col);
00401                     pDC->FillRect(rect2,&brush);
00402                     brush.DeleteObject();
00403                     rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00404                         rect.top+m_iconY+4+dy);
00405                     if (IsNewShell())
00406                         pDC->Draw3dRect(rect2,GetSysColor(COLOR_3DSHADOW),
00407                         GetSysColor(COLOR_3DHILIGHT));
00408                 }
00409                 else{
00410                     pDC->FillRect (rect2,&m_brBackground);
00411                     rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00412                         rect.top+m_iconY+4+dy);
00413                     pDC->Draw3dRect (rect2,m_clrBack,m_clrBack);
00414                 }
00415                 CPoint ptImage(rect.left+2,rect.top+2+dy);
00416                 if(bitmap)bitmap->Draw(pDC,xoffset,ptImage,ILD_TRANSPARENT);
00417             }
00418         }
00419         if(nIconNormal<0 && state&ODS_CHECKED && !checkflag){
00420             rect2.SetRect(rect.left+1,rect.top+2+dy,rect.left+m_iconX+1,
00421                 rect.top+m_iconY+2+dy);
00422             CMenuItemInfo info;
00423             info.fMask = MIIM_CHECKMARKS;
00424             ::GetMenuItemInfo((HMENU)lpDIS->hwndItem,lpDIS->itemID,
00425                 MF_BYCOMMAND, &info);
00426             if(state&ODS_CHECKED || info.hbmpUnchecked) {
00427                 Draw3DCheckmark(pDC, rect2, state&ODS_SELECTED,
00428                     state&ODS_CHECKED ? info.hbmpChecked :
00429                 info.hbmpUnchecked);
00430             }
00431         }
00432
00433         //This is needed always so that we can have the space for check marks
00434
00435         x0=rect.left;y0=rect.top;
00436         rect.left = rect.left + m_iconX + 8 + GAP;
00437
00438         if(!strText.IsEmpty()){
00439
00440             CRect rectt(rect.left,rect.top-1,rect.right,rect.bottom-1);
00441
00442             //   Find tabs
00443
00444             CString leftStr,rightStr;
00445             leftStr.Empty();rightStr.Empty();
00446             int tablocr=strText.ReverseFind(_T('\t'));
00447             if(tablocr!=-1){
00448                 rightStr=strText.Mid(tablocr+1);
00449                 leftStr=strText.Left(strText.Find(_T('\t')));
00450                 rectt.right-=m_iconX;
00451             }
00452             else leftStr=strText;
00453
00454             int iOldMode = pDC->GetBkMode();
00455             pDC->SetBkMode( TRANSPARENT);
00456
00457             // Draw the text in the correct colour:
00458
00459             UINT nFormat  = DT_LEFT|DT_SINGLELINE|DT_VCENTER;
00460             UINT nFormatr = DT_RIGHT|DT_SINGLELINE|DT_VCENTER;
00461             if(!(lpDIS->itemState & ODS_GRAYED)){
00462                 pDC->SetTextColor(crText);
00463                 pDC->DrawText (leftStr,rectt,nFormat);
00464                 if(tablocr!=-1) pDC->DrawText (rightStr,rectt,nFormatr);
00465             }
00466             else{
00467
00468                 // Draw the disabled text
00469                 if(!(state & ODS_SELECTED)){
00470                     RECT offset = *rectt;
00471                     offset.left+=1;
00472                     offset.right+=1;
00473                     offset.top+=1;
00474                     offset.bottom+=1;
00475                     pDC->SetTextColor(GetSysColor(COLOR_BTNHILIGHT));
00476                     pDC->DrawText(leftStr,&offset, nFormat);
00477                     if(tablocr!=-1) pDC->DrawText (rightStr,&offset,nFormatr);
00478                     pDC->SetTextColor(GetSysColor(COLOR_GRAYTEXT));
00479                     pDC->DrawText(leftStr,rectt, nFormat);
00480                     if(tablocr!=-1) pDC->DrawText (rightStr,rectt,nFormatr);
00481                 }
00482                 else{
00483                     // And the standard Grey text:
00484                     pDC->SetTextColor(m_clrBack);
00485                     pDC->DrawText(leftStr,rectt, nFormat);
00486                     if(tablocr!=-1) pDC->DrawText (rightStr,rectt,nFormatr);
00487                 }
00488             }
00489             pFont = pDC->SelectObject (&dispFont);
00490             pDC->SetBkMode( iOldMode );
00491             pDC->SelectObject (pFont); //set it to the old font
00492         }
00493
00494         m_penBack.DeleteObject();
00495         m_brBackground.DeleteObject();
00496         m_fontMenu.DeleteObject();
00497         m_brSelect.DeleteObject();
00498         dispFont.DeleteObject ();
00499   }
00500 }

Here is the call graph for this function:

void CCJMenu::DrawRadioDot | ( | CDC * | pDC,
 |  | int | x,
 |  | int | y,
 |  | COLORREF | color
 | ) |

Definition at line 1275 of file CJMenu.cpp.

Referenced by Draw3DCheckmark().

01276 {
01277     CRect rcDot(x,y,x+6,y+6);
01278     CBrush brush;
01279     CPen pen;
01280     brush.CreateSolidBrush(color);
01281     pen.CreatePen(PS_SOLID,0,color);
01282     CBrush *pOldBrush=pDC->SelectObject(&brush);
01283     CPen *pOldPen=pDC->SelectObject(&pen);
01284     pDC->Ellipse(&rcDot);
01285     pDC->SelectObject(pOldBrush);
01286     pDC->SelectObject(pOldPen);
01287     pen.DeleteObject();
01288     brush.DeleteObject();
01289 }

LRESULT CCJMenu::FindKeyboardShortcut | ( | UINT | nChar,
 |  | UINT | nFlags,
 |  | CMenu * | pMenu
 | ) | [static]

Definition at line 1414 of file CJMenu.cpp.

References GetMenuText(), m_MenuList, and SynchronizeMenu().

Referenced by CCJTabCtrl::OnMenuChar(), CCJMDIFrameWnd::OnMenuChar(), CCJFrameWnd::OnMenuChar(), CCJFlatHeaderCtrl::OnMenuChar(), and CCJControlBar::OnMenuChar().

01416 {
01417 #ifdef _CPPRTTI
01418     CCJMenu *pCCJMenu = dynamic_cast<CCJMenu *>(pMenu);
01419 #else
01420     CCJMenu *pCCJMenu = (CCJMenu *)pMenu;
01421 #endif
01422     if(pCCJMenu && nFlags&MF_POPUP){
01423         CString key(_T('&'),2);//SK: modified for Unicode correctness
01424         key.SetAt(1,(TCHAR)nChar);
01425         key.MakeLower();
01426         CString menutext;
01427         int menusize = (int)pCCJMenu->GetMenuItemCount();
01428         if(menusize!=(pCCJMenu->m_MenuList.GetUpperBound()+1))
01429             pCCJMenu->SynchronizeMenu();
01430         for(int i=0;i<menusize;++i){
01431             if(pCCJMenu->GetMenuText(i,menutext)){
01432                 menutext.MakeLower();
01433                 if(menutext.Find(key)>=0)return(MAKELRESULT(i,2));
01434             }
01435         }
01436     }
01437     return(0);
01438 }

Here is the call graph for this function:

CCJMenuData * CCJMenu::FindMenuList ( UINT nID )

Definition at line 1322 of file CJMenu.cpp.

References m_MenuList, and NULL.

Referenced by SynchronizeMenu().

01323 {
01324     for(int i=0;i<=m_MenuList.GetUpperBound();++i){
01325         if(m_MenuList[i]->nID==nID && !m_MenuList[i]->syncflag){
01326             m_MenuList[i]->syncflag=1;
01327             return(m_MenuList[i]);
01328         }
01329     }
01330     return(NULL);
01331 }

CCJMenuData * CCJMenu::FindMenuOption ( wchar_t * lpstrText )

Definition at line 1023 of file CJMenu.cpp.

References FindMenuOption(), m_MenuList, and NULL.

01024 {
01025     int i,j;
01026     CCJMenu *psubmenu;
01027     CCJMenuData *pmenulist;
01028
01029     for(i=0;i<(int)(GetMenuItemCount());++i){
01030 #ifdef _CPPRTTI
01031         psubmenu=dynamic_cast<CCJMenu *>(GetSubMenu(i));
01032 #else
01033         psubmenu=(CCJMenu *)GetSubMenu(i);
01034 #endif
01035         if(psubmenu){
01036             pmenulist=psubmenu->FindMenuOption(lpstrText);
01037             if(pmenulist)return(pmenulist);
01038         }
01039         else{
01040             const wchar_t *szWide;//SK: we use const to prevent misuse of this Ptr
01041             for(j=0;j<=m_MenuList.GetUpperBound();++j){
01042                 szWide = m_MenuList[j]->GetWideString ();
01043                 if(szWide && !wcscmp(lpstrText,szWide))//SK: modified for dynamic allocation
01044                     return(m_MenuList[j]);
01045             }
01046         }
01047     }
01048     return(NULL);
01049 }

Here is the call graph for this function:

CCJMenu * CCJMenu::FindMenuOption | ( | int | nId,
 |  | int & | nLoc
 | ) |

Definition at line 999 of file CJMenu.cpp.

References NULL.

Referenced by AddFromToolBar(), DeleteMenu(), FindMenuOption(), GetMenuText(), ModifyODMenuW(), and RemoveMenu().

01000 {
01001     int i;
01002     CCJMenu *psubmenu,*pgoodmenu;
01003
01004     for(i=0;i<(int)(GetMenuItemCount());++i){
01005 #ifdef _CPPRTTI
01006         psubmenu=dynamic_cast<CCJMenu *>(GetSubMenu(i));
01007 #else
01008         psubmenu=(CCJMenu *)GetSubMenu(i);
01009 #endif
01010         if(psubmenu){
01011             pgoodmenu=psubmenu->FindMenuOption(nId,nLoc);
01012             if(pgoodmenu)return(pgoodmenu);
01013         }
01014         else if(nId==(int)GetMenuItemID(i)){
01015             nLoc=i;
01016             return(this);
01017         }
01018     }
01019     nLoc = -1;
01020     return(NULL);
01021 }

BOOL CCJMenu::GetBitmapFromImageList | ( | CDC * | pDC,
 |  | CImageList * | imglist,
 |  | int | nIndex,
 |  | CBitmap & | bmp
 | ) |

Definition at line 502 of file CJMenu.cpp.

References m_iconX, and m_iconY.

Referenced by DrawItem().

00503 {
00504     HICON hIcon = imglist->ExtractIcon(nIndex);
00505     CDC dc;
00506     dc.CreateCompatibleDC(pDC);
00507     bmp.CreateCompatibleBitmap(pDC,m_iconX,m_iconY);
00508     CBitmap* pOldBmp = dc.SelectObject(&bmp);
00509     CBrush brush ;
00510     brush.CreateSolidBrush(GetSysColor(COLOR_MENU));
00511     ::DrawIconEx(
00512         dc.GetSafeHdc(),
00513         0,
00514         0,
00515         hIcon,
00516         m_iconX,
00517         m_iconY,
00518         0,
00519         (HBRUSH)brush,
00520         DI_NORMAL
00521         );
00522     dc.SelectObject( pOldBmp );
00523     dc.DeleteDC();
00524     // the icon is not longer needed
00525     DestroyIcon(hIcon);
00526     return(TRUE);
00527 }

BOOL CCJMenu::GetDisableOldStyle ( void )

Definition at line 1676 of file CJMenu.cpp.

References disable_old_style.

01677 {
01678     return(disable_old_style);
01679 }

BOOL CCJMenu::GetMenuText | ( | UINT | id,
 |  | CString & | string,
 |  | UINT | nFlags = MF_BYPOSITION
 | ) |

Definition at line 1255 of file CJMenu.cpp.

References FindMenuOption(), m_MenuList, and NULL.

Referenced by FindKeyboardShortcut().

01256 {
01257     BOOL returnflag=FALSE;
01258
01259     if(MF_BYPOSITION&nFlags){
01260         UINT numMenuItems = m_MenuList.GetUpperBound();
01261         if(id<=numMenuItems){
01262             string=m_MenuList[id]->GetString();
01263             returnflag=TRUE;
01264         }
01265     }
01266     else{
01267         int uiLoc;
01268         CCJMenu* pMenu = FindMenuOption(id,uiLoc);
01269         if(NULL!=pMenu) returnflag = pMenu->GetMenuText(uiLoc,string);
01270     }
01271     return(returnflag);
01272 }

Here is the call graph for this function:

void CCJMenu::InitializeMenuList ( int value )

Definition at line 1333 of file CJMenu.cpp.

References m_MenuList.

Referenced by SynchronizeMenu().

01334 {
01335     for(int i=0;i<=m_MenuList.GetUpperBound();++i)
01336         m_MenuList[i]->syncflag=value;
01337 }

BOOL CCJMenu::InsertMenuA | ( | UINT | nPosition,
 |  | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | const char * | lpszNewItem,
 |  | CBitmap * | bmp
 | ) |

Definition at line 1846 of file CJMenu.cpp.

References InsertMenuW().

01847 {
01848     USES_CONVERSION;
01849     return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),bmp);
01850 }

Here is the call graph for this function:

BOOL CCJMenu::InsertMenuA | ( | UINT | nPosition,
 |  | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | const char * | lpszNewItem,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 1835 of file CJMenu.cpp.

References InsertMenuW().

01836 {
01837     USES_CONVERSION;
01838     return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),il,xoffset);
01839 }

Here is the call graph for this function:

BOOL CCJMenu::InsertMenuA | ( | UINT | nPosition,
 |  | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | const char * | lpszNewItem,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 1824 of file CJMenu.cpp.

References InsertMenuW().

01825 {
01826     USES_CONVERSION;
01827     return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),nIconNormal);
01828 }

Here is the call graph for this function:

BOOL CCJMenu::InsertMenuW | ( | UINT | nPosition,
 |  | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | wchar_t * | lpszNewItem,
 |  | CBitmap * | bmp
 | ) |

Definition at line 1852 of file CJMenu.cpp.

References InsertODMenuW(), m_bitmapBackground, m_bitmapBackgroundFlag, m_iconX, m_iconY, and NULL.

01853 {
01854     if(bmp){
01855         CImageList temp;
01856         temp.Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
01857         if(m_bitmapBackgroundFlag)temp.Add(bmp,m_bitmapBackground);
01858         else temp.Add(bmp,GetSysColor(COLOR_3DFACE));
01859         return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,&temp,0);
01860     }
01861     return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,NULL,0);
01862 }

Here is the call graph for this function:

BOOL CCJMenu::InsertMenuW | ( | UINT | nPosition,
 |  | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | wchar_t * | lpszNewItem,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 1841 of file CJMenu.cpp.

References InsertODMenuW().

01842 {
01843     return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,il,xoffset);
01844 }

Here is the call graph for this function:

BOOL CCJMenu::InsertMenuW | ( | UINT | nPosition,
 |  | UINT | nFlags,
 |  | UINT | nIDNewItem,
 |  | wchar_t * | lpszNewItem,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 1830 of file CJMenu.cpp.

References InsertODMenuW().

Referenced by InsertMenuA().

01831 {
01832     return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,nIconNormal);
01833 }

Here is the call graph for this function:

BOOL CCJMenu::InsertODMenuA | ( | UINT | nPosition,
 |  | LPCSTR | lpstrText,
 |  | UINT | nFlags,
 |  | UINT | nID,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 738 of file CJMenu.cpp.

References InsertODMenuW().

00740 {
00741     USES_CONVERSION;
00742     return InsertODMenuW(nPosition,A2W(lpstrText),nFlags,nID,il,xoffset);
00743 }

Here is the call graph for this function:

BOOL CCJMenu::InsertODMenuA | ( | UINT | nPosition,
 |  | LPCSTR | lpstrText,
 |  | UINT | nFlags = MF_OWNERDRAW,
 |  | UINT | nID = 0,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 693 of file CJMenu.cpp.

References InsertODMenuW().

00695 {
00696     USES_CONVERSION;
00697     return InsertODMenuW(nPosition,A2W(lpstrText),nFlags,nID,nIconNormal);
00698 }

Here is the call graph for this function:

BOOL CCJMenu::InsertODMenuW | ( | UINT | nPosition,
 |  | wchar_t * | lpstrText,
 |  | UINT | nFlags,
 |  | UINT | nID,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 745 of file CJMenu.cpp.

References CCJMenuData::bitmap, InsertMenu, m_AllSubMenus, m_MenuList, m_SubMenus, CCJMenuData::menuIconNormal, CCJMenuData::nFlags, CCJMenuData::nID, CCJMenuData::SetWideString(), and CCJMenuData::xoffset.

00747 {
00748     // Add the MF_OWNERDRAW flag if not specified:
00749     if(!nID)nFlags=MF_SEPARATOR|MF_OWNERDRAW;
00750     else if(!(nFlags & MF_OWNERDRAW))nFlags |= MF_OWNERDRAW;
00751
00752     if(nFlags & MF_POPUP){
00753         m_AllSubMenus.Add((HMENU)nID);
00754         m_SubMenus.InsertAt(nPosition,(HMENU)nID);
00755     }
00756
00757     CCJMenuData *mdata = new CCJMenuData;
00758     m_MenuList.InsertAt(nPosition,mdata);
00759     mdata->SetWideString(lpstrText);    //SK: modified for dynamic allocation
00760
00761     if(il){
00762         mdata->menuIconNormal = 0;
00763         mdata->xoffset=xoffset;
00764         if(mdata->bitmap)mdata->bitmap->Detach();
00765         else mdata->bitmap=new(CImageList);
00766         mdata->bitmap->Attach(ImageList_Duplicate(il->m_hImageList));
00767     }
00768     else{
00769         mdata->menuIconNormal = -1;
00770         mdata->xoffset = -1;
00771     }
00772     mdata->nFlags = nFlags;
00773     mdata->nID = nID;
00774     return(CMenu::InsertMenu(nPosition,nFlags,nID,(LPCTSTR)mdata));
00775 }

Here is the call graph for this function:

BOOL CCJMenu::InsertODMenuW | ( | UINT | nPosition,
 |  | wchar_t * | lpstrText,
 |  | UINT | nFlags = MF_OWNERDRAW,
 |  | UINT | nID = 0,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 701 of file CJMenu.cpp.

References AddBitmapToImageList(), CCJMenuData::bitmap, InsertMenu, LoadFromToolBar(), m_AllSubMenus, m_iconX, m_iconY, m_MenuList, m_SubMenus, CCJMenuData::menuIconNormal, CCJMenuData::nFlags, CCJMenuData::nID, NULL, CCJMenuData::SetWideString(), and CCJMenuData::xoffset.

Referenced by InsertMenuW(), and InsertODMenuA().

00703 {
00704     // Add the MF_OWNERDRAW flag if not specified:
00705     if(!nID)nFlags=MF_SEPARATOR|MF_OWNERDRAW;
00706     else if(!(nFlags & MF_OWNERDRAW))nFlags |= MF_OWNERDRAW;
00707
00708     if(nFlags & MF_POPUP){
00709         m_AllSubMenus.Add((HMENU)nID);
00710         m_SubMenus.InsertAt(nPosition,(HMENU)nID);
00711     }
00712
00713     CCJMenuData *mdata = new CCJMenuData;
00714     m_MenuList.InsertAt(nPosition,mdata);
00715     mdata->SetWideString(lpstrText);    //SK: modified for dynamic allocation
00716
00717     mdata->menuIconNormal = nIconNormal;
00718     mdata->xoffset=-1;
00719     if(nIconNormal>=0){
00720         mdata->xoffset=0;
00721         LoadFromToolBar(nID,nIconNormal,mdata->xoffset);
00722         if(mdata->bitmap)mdata->bitmap->DeleteImageList();
00723         else mdata->bitmap=new(CImageList);
00724         mdata->bitmap->Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00725         if(!AddBitmapToImageList(mdata->bitmap,nIconNormal)){
00726             mdata->bitmap->DeleteImageList();
00727             delete mdata->bitmap;
00728             mdata->bitmap=NULL;
00729             mdata->menuIconNormal = nIconNormal = -1;
00730             mdata->xoffset = -1;
00731         }
00732     }
00733     mdata->nFlags = nFlags;
00734     mdata->nID = nID;
00735     return(CMenu::InsertMenu(nPosition,nFlags,nID,(LPCTSTR)mdata));
00736 }

Here is the call graph for this function:

void CCJMenu::InsertSpaces ( void )

Definition at line 1177 of file CJMenu.cpp.

References m_MenuList.

01178 {
01179     int i,j,numitems,maxlength;
01180     CString string,newstring;
01181     CSize t;
01182     CFont m_fontMenu;
01183     LOGFONT m_lf;
01184
01185     ZeroMemory ((PVOID) &m_lf,sizeof (LOGFONT));
01186     NONCLIENTMETRICS nm;
01187     nm.cbSize = sizeof (NONCLIENTMETRICS);
01188     VERIFY (SystemParametersInfo (SPI_GETNONCLIENTMETRICS,nm.cbSize,&nm,0));
01189     m_lf =  nm.lfMenuFont;
01190     m_fontMenu.CreateFontIndirect (&m_lf);
01191
01192     CWnd *pWnd = AfxGetMainWnd();
01193     CDC *pDC = pWnd->GetDC();
01194     CFont* pFont = pDC->SelectObject (&m_fontMenu);
01195
01196     numitems=GetMenuItemCount();
01197     maxlength = -1;
01198     for(i=0;i<numitems;++i){
01199         string=m_MenuList[i]->GetString();
01200         j=string.Find((char)9);
01201         newstring.Empty();
01202         if(j!=-1)newstring=string.Left(j);
01203         else newstring=string;
01204         newstring+=_T(" ");//SK: modified for Unicode correctness.
01205         LPCTSTR lpstrText = (LPCTSTR)newstring;
01206         t=pDC->GetTextExtent(lpstrText,_tcslen(lpstrText));
01207         if(t.cx>maxlength)maxlength = t.cx;
01208     }
01209     for(i=0;i<numitems;++i){
01210         string=m_MenuList[i]->GetString();
01211         j=string.Find((char)9);
01212         if(j!=-1){
01213             newstring.Empty();
01214             newstring=string.Left(j);
01215             LPCTSTR lpstrText = (LPCTSTR)(newstring);
01216             t=pDC->GetTextExtent(lpstrText,_tcslen(lpstrText));
01217             while(t.cx<maxlength){
01218                 newstring+=_T(' ');//SK: modified for Unicode correctness
01219                 LPCTSTR lpstrText = (LPCTSTR)(newstring);
01220                 t=pDC->GetTextExtent(lpstrText,_tcslen(lpstrText));
01221             }
01222             newstring+=string.Mid(j);
01223 #ifdef UNICODE
01224             m_MenuList[i]->SetWideString(newstring);//SK: modified for dynamic allocation
01225 #else
01226             m_MenuList[i]->SetAnsiString(newstring);
01227 #endif
01228         }
01229     }
01230     pDC->SelectObject (pFont);              // Select old font in
01231     AfxGetMainWnd()->ReleaseDC(pDC);       // Release the DC
01232     m_fontMenu.DeleteObject();
01233 }

BOOL CCJMenu::IsMenu ( HMENU submenu ) [static]

Definition at line 188 of file CJMenu.cpp.

References m_AllSubMenus.

00189 {
00190     int m;
00191     int numSubMenus = m_AllSubMenus.GetUpperBound();
00192     for(m=0;m<=numSubMenus;++m){
00193         if(submenu==m_AllSubMenus[m])return(TRUE);
00194     }
00195     return(FALSE);
00196 }

BOOL CCJMenu::IsMenu ( CMenu * submenu ) [static]

Definition at line 178 of file CJMenu.cpp.

References m_AllSubMenus.

Referenced by CCJTabCtrl::OnInitMenuPopup(), CCJMDIFrameWnd::OnInitMenuPopup(), CCJFrameWnd::OnInitMenuPopup(), CCJFlatHeaderCtrl::OnInitMenuPopup(), CCJControlBar::OnInitMenuPopup(), CCJTabCtrl::OnMeasureItem(), CCJMDIFrameWnd::OnMeasureItem(), CCJFrameWnd::OnMeasureItem(), CCJFlatHeaderCtrl::OnMeasureItem(), CCJControlBar::OnMeasureItem(), CCJTabCtrl::OnMenuChar(), CCJMDIFrameWnd::OnMenuChar(), CCJFrameWnd::OnMenuChar(), CCJFlatHeaderCtrl::OnMenuChar(), and CCJControlBar::OnMenuChar().

00179 {
00180     int m;
00181     int numSubMenus = m_AllSubMenus.GetUpperBound();
00182     for(m=0;m<=numSubMenus;++m){
00183         if(submenu->m_hMenu==m_AllSubMenus[m])return(TRUE);
00184     }
00185     return(FALSE);
00186 }

BOOL CCJMenu::IsNewShell ( void ) [static]

Definition at line 149 of file CJMenu.cpp.

References g_Shell, Windoze95, and WinNT4orHigher.

Referenced by DitherBlt(), DitherBlt2(), Draw3DCheckmark(), DrawItem(), and MeasureItem().

00150 {
00151     return (Windoze95==g_Shell || WinNT4orHigher==g_Shell);
00152 }

void CCJMenu::LoadCheckmarkBitmap | ( | int | unselect,
 |  | int | select
 | ) |

Definition at line 1235 of file CJMenu.cpp.

References AddBitmapToImageList(), checkmaps, m_iconX, m_iconY, m_selectcheck, m_unselectcheck, and NULL.

01236 {
01237     if(unselect>0 && select>0){
01238         m_selectcheck=select;
01239         m_unselectcheck=unselect;
01240         if(checkmaps)checkmaps->DeleteImageList();
01241         else checkmaps=new(CImageList);
01242         checkmaps->Create(m_iconX,m_iconY,ILC_MASK,2,1);
01243         BOOL flag1=AddBitmapToImageList(checkmaps,unselect);
01244         BOOL flag2=AddBitmapToImageList(checkmaps,select);
01245         if(!flag1||!flag2){
01246             checkmaps->DeleteImageList();
01247             delete checkmaps;
01248             checkmaps=NULL;
01249         }
01250     }
01251 }

Here is the call graph for this function:

BOOL CCJMenu::LoadFromToolBar | ( | UINT | nID,
 |  | UINT | nToolBar,
 |  | int & | xoffset
 | ) |

Definition at line 980 of file CJMenu.cpp.

Referenced by AppendODMenuW(), InsertODMenuW(), and ModifyODMenuW().

00981 {
00982     int xset,offset;
00983     UINT nStyle;
00984     BOOL returnflag=FALSE;
00985     CToolBar bar;
00986
00987     bar.Create(AfxGetMainWnd());
00988     if(bar.LoadToolBar(nToolBar)){
00989         offset=bar.CommandToIndex(nID);
00990         if(offset>=0){
00991             bar.GetButtonInfo(offset,nID,nStyle,xset);
00992             if(xset>0)xoffset=xset;
00993             returnflag=TRUE;
00994         }
00995     }
00996     return(returnflag);
00997 }

BOOL CCJMenu::LoadMenu ( int nResource ) [virtual]

Definition at line 1052 of file CJMenu.cpp.

References LoadMenu().

01053 {
01054     return(CCJMenu::LoadMenu(MAKEINTRESOURCE(nResource)));
01055 };

Here is the call graph for this function:

BOOL CCJMenu::LoadMenu ( LPCTSTR lpszResourceName ) [virtual]

Definition at line 1057 of file CJMenu.cpp.

References checkmaps, checkmapsshare, m_MenuList, m_selectcheck, m_unselectcheck, and NULL.

Referenced by LoadMenu(), CCJMDIFrameWnd::NewMenu(), CCJFrameWnd::NewMenu(), CCJToolBar::OnDropDownButton(), CGfxOutBarCtrl::OnRButtonDown(), CCJFlatHeaderCtrl::OnRButtonDown(), CCJControlBar::OnRButtonDown(), and CCJMenuBar::TrackPopup().

01058 {
01059     TRACE(_T(
01060         "IMPORTANT:Use CCJMenu::DestroyMenu to destroy Loaded Menu's\n"));
01061     ASSERT_VALID(this);
01062     ASSERT(lpszResourceName != NULL);
01063
01064     // Find the Menu Resource:
01065     HINSTANCE m_hInst = AfxFindResourceHandle(lpszResourceName,RT_MENU);
01066     HRSRC hRsrc = ::FindResource(m_hInst,lpszResourceName,RT_MENU);
01067     if(hRsrc == NULL)return FALSE;
01068
01069     // Get size of resource:
01070
01071     DWORD dwSize = SizeofResource(NULL, hRsrc);
01072
01073     // Load the Menu Resource:
01074
01075     HGLOBAL hGlobal = LoadResource(m_hInst, hRsrc);
01076     if(hGlobal == NULL)return FALSE;
01077
01078     // Attempt to create us as a menu...
01079
01080     if(!CMenu::CreateMenu())return FALSE;
01081
01082     // Get Item template Header, and calculate offset of MENUITEMTEMPLATES
01083
01084     MENUITEMTEMPLATEHEADER *pTpHdr=
01085         (MENUITEMTEMPLATEHEADER*)LockResource(hGlobal);
01086     BYTE* pTp=(BYTE*)pTpHdr +
01087         (sizeof(MENUITEMTEMPLATEHEADER) + pTpHdr->offset);
01088
01089
01090     // Variables needed during processing of Menu Item Templates:
01091
01092     int j=0;
01093     CCJMenuData*  pData = NULL;              // New OD Menu Item Data
01094     WORD    dwFlags = 0;              // Flags of the Menu Item
01095     WORD    dwID  = 0;              // ID of the Menu Item
01096     UINT    uFlags;                  // Actual Flags.
01097     wchar_t *szCaption=NULL;
01098     int      nLen   = 0;                // Length of caption
01099     CTypedPtrArray<CPtrArray, CCJMenu*>  m_Stack;    // Popup menu stack
01100     CArray<BOOL,BOOL>  m_StackEnd;    // Popup menu stack
01101     m_Stack.Add(this);                  // Add it to this...
01102     m_StackEnd.Add(FALSE);
01103
01104     do{
01105         // Obtain Flags and (if necessary), the ID...
01106         memcpy(&dwFlags, pTp, sizeof(WORD));pTp+=sizeof(WORD);// Obtain Flags
01107         if(!(dwFlags & MF_POPUP)){
01108             memcpy(&dwID, pTp, sizeof(WORD)); // Obtain ID
01109             pTp+=sizeof(WORD);
01110         }
01111         else dwID = 0;
01112
01113         uFlags = (UINT)dwFlags; // Remove MF_END from the flags that will
01114         if(uFlags & MF_END) // be passed to the Append(OD)Menu functions.
01115             uFlags -= MF_END;
01116
01117         // Obtain Caption (and length)
01118
01119         nLen = 0;
01120         char *ch = (char*)pTp;
01121         szCaption=new wchar_t[wcslen((wchar_t *)pTp)+1];
01122         wcscpy(szCaption,(wchar_t *)pTp);
01123         pTp=&pTp[(wcslen((wchar_t *)pTp)+1)*sizeof(wchar_t)];//modified SK
01124
01125         // Handle popup menus first....
01126
01127         //WideCharToMultiByte
01128         if(dwFlags & MF_POPUP){
01129             if(dwFlags & MF_END)m_StackEnd.SetAt(m_Stack.GetUpperBound(),TRUE);
01130             CCJMenu* pSubMenu = new CCJMenu;
01131             pSubMenu->m_unselectcheck=m_unselectcheck;
01132             pSubMenu->m_selectcheck=m_selectcheck;
01133             pSubMenu->checkmaps=checkmaps;
01134             pSubMenu->checkmapsshare=TRUE;
01135             pSubMenu->CreatePopupMenu();
01136
01137             // Append it to the top of the stack:
01138
01139             m_Stack[m_Stack.GetUpperBound()]->AppendODMenuW(szCaption,uFlags,
01140                 (UINT)pSubMenu->m_hMenu, -1);
01141             m_Stack.Add(pSubMenu);
01142             m_StackEnd.Add(FALSE);
01143         }
01144         else {
01145             m_Stack[m_Stack.GetUpperBound()]->AppendODMenuW(szCaption, uFlags,
01146                 dwID, -1);
01147             if(dwFlags & MF_END)m_StackEnd.SetAt(m_Stack.GetUpperBound(),TRUE);
01148             j = m_Stack.GetUpperBound();
01149             while(j>=0 && m_StackEnd.GetAt(j)){
01150                 m_Stack[m_Stack.GetUpperBound()]->InsertSpaces();
01151                 m_Stack.RemoveAt(j);
01152                 m_StackEnd.RemoveAt(j);
01153                 --j;
01154             }
01155         }
01156
01157         delete[] szCaption;
01158     }while(m_Stack.GetUpperBound() != -1);
01159
01160     for(int i=0;i<(int)GetMenuItemCount();++i){
01161         CString str=m_MenuList[i]->GetString();
01162
01163         if(GetSubMenu(i)){
01164             m_MenuList[i]->nFlags=MF_POPUP|MF_BYPOSITION;
01165             ModifyMenu(i,MF_POPUP|MF_BYPOSITION,
01166                 (UINT)GetSubMenu(i)->m_hMenu,str);
01167         }
01168         else{
01169             m_MenuList[i]->nFlags=MF_STRING|MF_BYPOSITION;
01170             ModifyMenu(i,MF_STRING|MF_BYPOSITION,m_MenuList[i]->nID,str);
01171         }
01172     }
01173
01174     return(TRUE);
01175 }

HBITMAP CCJMenu::LoadSysColorBitmap ( int nResourceId ) [static]

Definition at line 1682 of file CJMenu.cpp.

References NULL.

Referenced by AddBitmapToImageList().

01683 {
01684     HINSTANCE hInst =
01685         AfxFindResourceHandle(MAKEINTRESOURCE(nResourceId),RT_BITMAP);
01686     HRSRC hRsrc =
01687         ::FindResource(hInst,MAKEINTRESOURCE(nResourceId),RT_BITMAP);
01688     if (hRsrc == NULL)
01689         return NULL;
01690     return AfxLoadSysColorBitmap(hInst, hRsrc, FALSE);
01691 }

BOOL CCJMenu::LoadToolbar ( UINT nToolBar )

Definition at line 960 of file CJMenu.cpp.

References ModifyODMenu, and NULL.

Referenced by LoadToolbars(), CCJMDIFrameWnd::NewMenu(), CCJFrameWnd::NewMenu(), CGfxOutBarCtrl::OnRButtonDown(), CCJTabCtrl::OnRButtonDown(), CCJFlatHeaderCtrl::OnRButtonDown(), CCJControlBar::OnRButtonDown(), and CCJMenuBar::TrackPopup().

00961 {
00962     UINT nID;
00963     BOOL returnflag=FALSE;
00964     CToolBar bar;
00965
00966     bar.Create(AfxGetMainWnd());
00967     if(bar.LoadToolBar(nToolBar)){
00968         for(int i=0;i<bar.GetCount();++i){
00969             nID = bar.GetItemID(i);
00970             if(nID && GetMenuState(nID, MF_BYCOMMAND)
00971                 !=0xFFFFFFFF){
00972                 ModifyODMenu(NULL,nID,nToolBar);
00973             }
00974         }
00975         returnflag=TRUE;
00976     }
00977     return(returnflag);
00978 }

BOOL CCJMenu::LoadToolbars | ( | const UINT * | arID,
 |  | int | n
 | ) |

Definition at line 950 of file CJMenu.cpp.

References LoadToolbar().

Referenced by CCJMDIFrameWnd::NewMenu(), and CCJFrameWnd::NewMenu().

00951 {
00952     ASSERT(arID);
00953     BOOL returnflag=TRUE;
00954     for(int i=0;i<n;++i){
00955         if(!LoadToolbar(arID[i]))returnflag=FALSE;
00956     }
00957     return(returnflag);
00958 }

Here is the call graph for this function:

void CCJMenu::MeasureItem ( LPMEASUREITEMSTRUCT ) [virtual]

Definition at line 541 of file CJMenu.cpp.

References g_Shell, GAP, IsNewShell(), m_iconX, m_iconY, NULL, and Win32s.

Referenced by CCJTabCtrl::OnMeasureItem(), CCJMDIFrameWnd::OnMeasureItem(), CCJFrameWnd::OnMeasureItem(), CCJFlatHeaderCtrl::OnMeasureItem(), and CCJControlBar::OnMeasureItem().

00542 {
00543     UINT state = (((CCJMenuData*)(lpMIS->itemData))->nFlags);
00544     if(state & MF_SEPARATOR){
00545         lpMIS->itemWidth = 0;
00546         lpMIS->itemHeight = GetSystemMetrics(SM_CYMENU)>>1;
00547     }
00548     else{
00549         CFont m_fontMenu;
00550         LOGFONT m_lf;
00551         ZeroMemory ((PVOID) &m_lf,sizeof (LOGFONT));
00552         NONCLIENTMETRICS nm;
00553         nm.cbSize = sizeof (NONCLIENTMETRICS);
00554         VERIFY(SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
00555             nm.cbSize,&nm,0));
00556         m_lf =  nm.lfMenuFont;
00557         m_fontMenu.CreateFontIndirect (&m_lf);
00558
00559         // Obtain the width of the text:
00560         CWnd *pWnd = AfxGetMainWnd();            // Get main window
00561         CDC *pDC = pWnd->GetDC();              // Get device context
00562         CFont* pFont=NULL;    // Select menu font in...
00563
00564         if (IsNewShell())
00565             pFont = pDC->SelectObject (&m_fontMenu);// Select menu font in...
00566
00567         //Get pointer to text SK
00568         const wchar_t *lpstrText = ((CCJMenuData*)(lpMIS->itemData))->GetWideString();//SK: we use const to prevent misuse
00569
00570
00571         SIZE size;
00572
00573         if (Win32s!=g_Shell)
00574             VERIFY(::GetTextExtentPoint32W(pDC->m_hDC,lpstrText,
00575             wcslen(lpstrText),&size)); //SK should also work on 95
00576 #ifndef UNICODE //can't be UNICODE for Win32s
00577         else{//it's Win32suckx
00578             RECT rect;
00579             rect.left=rect.top=0;
00580             size.cy=DrawText(pDC->m_hDC,(LPCTSTR)lpstrText,
00581                 wcslen(lpstrText),&rect,
00582                 DT_SINGLELINE|DT_LEFT|DT_VCENTER|DT_CALCRECT);
00583             //+3 makes at least three pixels space to the menu border
00584             size.cx=rect.right-rect.left+3;
00585             size.cx += 3*(size.cx/wcslen(lpstrText));
00586         }
00587 #endif
00588
00589         CSize t = CSize(size);
00590         if(IsNewShell())
00591             pDC->SelectObject (pFont);  // Select old font in
00592         AfxGetMainWnd()->ReleaseDC(pDC);  // Release the DC
00593
00594         // Set width and height:
00595
00596         lpMIS->itemWidth = m_iconX + t.cx + m_iconX + GAP;
00597         int temp = GetSystemMetrics(SM_CYMENU);
00598         lpMIS->itemHeight = temp>m_iconY+4 ? temp : m_iconY+4;
00599         m_fontMenu.DeleteObject();
00600     }
00601 }

Here is the call graph for this function:

BOOL CCJMenu::ModifyODMenuA | ( | const char * | lpstrText,
 |  | const char * | OptionText,
 |  | int | nIconNormal
 | ) |

Definition at line 879 of file CJMenu.cpp.

References ModifyODMenuW().

00881 {
00882     USES_CONVERSION;
00883     return ModifyODMenuW(A2W(lpstrText),A2W(OptionText),nIconNormal);//SK: see MFC  Tech Note 059
00884 }

Here is the call graph for this function:

BOOL CCJMenu::ModifyODMenuA | ( | const char * | lpstrText,
 |  | UINT | nID,
 |  | CBitmap * | bmp
 | ) |

Definition at line 860 of file CJMenu.cpp.

References ModifyODMenuW().

00861 {
00862     USES_CONVERSION;
00863     return ModifyODMenuW(A2W(lpstrText),nID,bmp);
00864 }

Here is the call graph for this function:

BOOL CCJMenu::ModifyODMenuA | ( | const char * | lpstrText,
 |  | UINT | nID,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 821 of file CJMenu.cpp.

References ModifyODMenuW().

00822 {
00823     USES_CONVERSION;
00824     return ModifyODMenuW(A2W(lpstrText),nID,il,xoffset);
00825 }

Here is the call graph for this function:

BOOL CCJMenu::ModifyODMenuA | ( | const char * | lpstrText,
 |  | UINT | nID = 0,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 777 of file CJMenu.cpp.

References ModifyODMenuW().

00778 {
00779     USES_CONVERSION;
00780     return ModifyODMenuW(A2W(lpstrText),nID,nIconNormal);//SK: see MFC Tech Note 059
00781 }

Here is the call graph for this function:

BOOL CCJMenu::ModifyODMenuW | ( | wchar_t * | lpstrText,
 |  | wchar_t * | OptionText,
 |  | int | nIconNormal
 | ) |

Definition at line 886 of file CJMenu.cpp.

References AddBitmapToImageList(), CCJMenuData::bitmap, FindMenuOption(), m_iconX, m_iconY, CCJMenuData::menuIconNormal, NULL, CCJMenuData::SetWideString(), and CCJMenuData::xoffset.

00888 {
00889     CCJMenuData *mdata;
00890
00891     // Find the old CCJMenuData structure:
00892     CString junk=OptionText;
00893     mdata=FindMenuOption(OptionText);
00894     if(mdata){
00895         if(lpstrText)
00896             mdata->SetWideString(lpstrText);//SK: modified for dynamic allocation
00897         mdata->menuIconNormal = nIconNormal;
00898         mdata->xoffset=-1;
00899         if(nIconNormal>=0){
00900             mdata->xoffset=0;
00901             if(mdata->bitmap)mdata->bitmap->DeleteImageList();
00902             else mdata->bitmap=new(CImageList);
00903             mdata->bitmap->Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00904             if(!AddBitmapToImageList(mdata->bitmap,nIconNormal)){
00905                 mdata->bitmap->DeleteImageList();
00906                 delete mdata->bitmap;
00907                 mdata->bitmap=NULL;
00908                 mdata->menuIconNormal = nIconNormal = -1;
00909                 mdata->xoffset = -1;
00910             }
00911         }
00912         return(TRUE);
00913     }
00914     return(FALSE);
00915 }

Here is the call graph for this function:

BOOL CCJMenu::ModifyODMenuW | ( | wchar_t * | lpstrText,
 |  | UINT | nID,
 |  | CBitmap * | bmp
 | ) |

Definition at line 866 of file CJMenu.cpp.

References m_bitmapBackground, m_bitmapBackgroundFlag, m_iconX, m_iconY, ModifyODMenuW(), and NULL.

00867 {
00868     if(bmp){
00869         CImageList temp;
00870         temp.Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00871         if(m_bitmapBackgroundFlag)temp.Add(bmp,m_bitmapBackground);
00872         else temp.Add(bmp,GetSysColor(COLOR_3DFACE));
00873         return ModifyODMenuW(lpstrText,nID,&temp,0);
00874     }
00875     return ModifyODMenuW(lpstrText,nID,NULL,0);
00876 }

Here is the call graph for this function:

BOOL CCJMenu::ModifyODMenuW | ( | wchar_t * | lpstrText,
 |  | UINT | nID,
 |  | CImageList * | il,
 |  | int | xoffset
 | ) |

Definition at line 827 of file CJMenu.cpp.

References CCJMenuData::bitmap, FindMenuOption(), m_MenuList, CCJMenuData::menuIconNormal, CCJMenuData::nFlags, CCJMenuData::nID, CCJMenuData::SetWideString(), and CCJMenuData::xoffset.

00828 {
00829     int nLoc;
00830     CCJMenuData *mdata;
00831
00832     // Find the old CCJMenuData structure:
00833     CCJMenu *psubmenu = FindMenuOption(nID,nLoc);
00834     if(psubmenu && nLoc>=0)mdata = psubmenu->m_MenuList[nLoc];
00835     else{
00836         // Create a new CCJMenuData structure:
00837         mdata = new CCJMenuData;
00838         m_MenuList.Add(mdata);
00839     }
00840
00841     ASSERT(mdata);
00842     if(lpstrText)
00843         mdata->SetWideString(lpstrText);  //SK: modified for dynamic allocation
00844     if(il){
00845         mdata->menuIconNormal = 0;
00846         mdata->xoffset=xoffset;
00847         if(mdata->bitmap)mdata->bitmap->Detach();
00848         else mdata->bitmap=new(CImageList);
00849         mdata->bitmap->Attach(ImageList_Duplicate(il->m_hImageList));
00850     }
00851     else{
00852         mdata->menuIconNormal = -1;
00853         mdata->xoffset = -1;
00854     }
00855     mdata->nFlags = MF_BYCOMMAND | MF_OWNERDRAW;
00856     mdata->nID = nID;
00857     return (CMenu::ModifyMenu(nID,mdata->nFlags,nID,(LPCTSTR)mdata));
00858 }

Here is the call graph for this function:

BOOL CCJMenu::ModifyODMenuW | ( | wchar_t * | lpstrText,
 |  | UINT | nID = 0,
 |  | int | nIconNormal = -1
 | ) |

Definition at line 783 of file CJMenu.cpp.

References AddBitmapToImageList(), CCJMenuData::bitmap, FindMenuOption(), LoadFromToolBar(), m_iconX, m_iconY, m_MenuList, CCJMenuData::menuIconNormal, CCJMenuData::nFlags, CCJMenuData::nID, NULL, CCJMenuData::SetWideString(), and CCJMenuData::xoffset.

Referenced by ModifyODMenuA(), and ModifyODMenuW().

00784 {
00785     int nLoc;
00786     CCJMenuData *mdata;
00787
00788     // Find the old CCJMenuData structure:
00789     CCJMenu *psubmenu = FindMenuOption(nID,nLoc);
00790     if(psubmenu && nLoc>=0)mdata = psubmenu->m_MenuList[nLoc];
00791     else{
00792         // Create a new CCJMenuData structure:
00793         mdata = new CCJMenuData;
00794         m_MenuList.Add(mdata);
00795     }
00796
00797     ASSERT(mdata);
00798     if(lpstrText)
00799         mdata->SetWideString(lpstrText);  //SK: modified for dynamic allocation
00800     mdata->menuIconNormal = nIconNormal;
00801     mdata->xoffset=-1;
00802     if(nIconNormal>=0){
00803         mdata->xoffset=0;
00804         LoadFromToolBar(nID,nIconNormal,mdata->xoffset);
00805         if(mdata->bitmap)mdata->bitmap->DeleteImageList();
00806         else mdata->bitmap=new CImageList;
00807         mdata->bitmap->Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00808         if(!AddBitmapToImageList(mdata->bitmap,nIconNormal)){
00809             mdata->bitmap->DeleteImageList();
00810             delete mdata->bitmap;
00811             mdata->bitmap=NULL;
00812             mdata->menuIconNormal = nIconNormal = -1;
00813             mdata->xoffset = -1;
00814         }
00815     }
00816     mdata->nFlags = MF_BYCOMMAND | MF_OWNERDRAW;
00817     mdata->nID = nID;
00818     return (CMenu::ModifyMenu(nID,mdata->nFlags,nID,(LPCTSTR)mdata));
00819 }

Here is the call graph for this function:

CCJMenuData * CCJMenu::NewODMenu | ( | UINT | pos,
 |  | UINT | nFlags,
 |  | UINT | nID,
 |  | CString | string
 | ) |

Definition at line 917 of file CJMenu.cpp.

References CCJMenuData::GetString(), m_AllSubMenus, CCJMenuData::menuIconNormal, CCJMenuData::nFlags, CCJMenuData::nID, CCJMenuData::SetAnsiString(), CCJMenuData::SetWideString(), and CCJMenuData::xoffset.

Referenced by SynchronizeMenu().

00918 {
00919     CCJMenuData *mdata;
00920
00921     mdata = new CCJMenuData;
00922     mdata->menuIconNormal = -1;
00923     mdata->xoffset=-1;
00924 #ifdef UNICODE
00925     mdata->SetWideString((LPCTSTR)string);//SK: modified for dynamic allocation
00926 #else
00927     mdata->SetAnsiString(string);
00928 #endif
00929     mdata->nFlags = nFlags;
00930     mdata->nID = nID;
00931
00932     if(nFlags & MF_POPUP)m_AllSubMenus.Add((HMENU)nID);
00933
00934     if (nFlags&MF_OWNERDRAW){
00935         ASSERT(!(nFlags&MF_STRING));
00936         ModifyMenu(pos,nFlags,nID,(LPCTSTR)mdata);
00937     }
00938     else if (nFlags&MF_STRING){
00939         ASSERT(!(nFlags&MF_OWNERDRAW));
00940         ModifyMenu(pos,nFlags,nID,mdata->GetString());
00941     }
00942     else{
00943         ASSERT(nFlags&MF_SEPARATOR);
00944         ModifyMenu(pos,nFlags,nID);
00945     }
00946
00947     return(mdata);
00948 };

Here is the call graph for this function:

BOOL CCJMenu::RemoveMenu | ( | UINT | uiId,
 |  | UINT | nFlags
 | ) |

Definition at line 1693 of file CJMenu.cpp.

References FindMenuOption(), m_AllSubMenus, m_MenuList, m_SubMenus, and NULL.

01694 {
01695     if(MF_BYPOSITION&nFlags){
01696         CCJMenu* pSubMenu = (CCJMenu*) GetSubMenu(uiId);
01697         if(NULL==pSubMenu){
01698             UINT uiCommandId = GetMenuItemID(uiId);
01699             for(int i=0;i<m_MenuList.GetSize(); i++){
01700                 if(m_MenuList[i]->nID==uiCommandId){
01701                     delete m_MenuList.GetAt(i);
01702                     m_MenuList.RemoveAt(i);
01703                     break;
01704                 }
01705             }
01706         }
01707         else{
01708             int numSubMenus = m_SubMenus.GetUpperBound();
01709             for(int m = numSubMenus; m >= 0; m--){
01710                 if(m_SubMenus[m]==pSubMenu->m_hMenu){
01711                     int numAllSubMenus = m_AllSubMenus.GetUpperBound();
01712                     for(int n = numAllSubMenus; n>= 0; n--){
01713                         if(m_AllSubMenus[n]==m_SubMenus[m])m_AllSubMenus.RemoveAt(n);
01714                     }
01715                     m_SubMenus.RemoveAt(m);
01716                 }
01717             }
01718             int num = pSubMenu->GetMenuItemCount();
01719             for(int i=num-1;i>=0;--i)pSubMenu->RemoveMenu(i,MF_BYPOSITION);
01720             for(i=m_MenuList.GetUpperBound();i>=0;i--){
01721                 if(m_MenuList[i]->nID==(UINT)pSubMenu->m_hMenu){
01722                     delete m_MenuList.GetAt(i);
01723                     m_MenuList.RemoveAt(i);
01724                     break;
01725                 }
01726             }
01727             delete pSubMenu;
01728         }
01729     }
01730     else{
01731         int iPosition =0;
01732         CCJMenu* pMenu = FindMenuOption(uiId,iPosition);
01733         if(pMenu)pMenu->RemoveMenu(iPosition,MF_BYPOSITION);
01734     }
01735     return CMenu::RemoveMenu(uiId,nFlags);
01736 }

Here is the call graph for this function:

void CCJMenu::SetBitmapBackground ( COLORREF color )

Definition at line 1541 of file CJMenu.cpp.

References m_bitmapBackground, and m_bitmapBackgroundFlag.

01542 {
01543     m_bitmapBackground=color;
01544     m_bitmapBackgroundFlag=TRUE;
01545 }

void CCJMenu::SetDisableOldStyle ( void )

Definition at line 1666 of file CJMenu.cpp.

References disable_old_style.

01667 {
01668     disable_old_style=TRUE;
01669 }

void CCJMenu::SetIconSize | ( | int | ,
 |  | int |
 | ) |

Definition at line 603 of file CJMenu.cpp.

References m_iconX, and m_iconY.

00604 {
00605     m_iconX = width;
00606     m_iconY = height;
00607 }

void CCJMenu::SynchronizeMenu ( void )

Definition at line 1348 of file CJMenu.cpp.

References DeleteMenuList(), FindMenuList(), InitializeMenuList(), m_MenuList, NewODMenu(), CCJMenuData::nFlags, NULL, CCJMenuData::SetAnsiString(), and CCJMenuData::SetWideString().

Referenced by FindKeyboardShortcut(), and UpdateMenu().

01349 {
01350     CTypedPtrArray<CPtrArray, CCJMenuData*> temp;
01351     CCJMenuData *mdata;
01352     CString string;
01353     UINT submenu,nID=0,state,j;
01354
01355     InitializeMenuList(0);
01356     for(j=0;j<GetMenuItemCount();++j){
01357         mdata=NULL;
01358         state=GetMenuState(j,MF_BYPOSITION);
01359         if(state&MF_POPUP){
01360             submenu=(UINT)GetSubMenu(j)->m_hMenu;
01361             mdata=FindMenuList(submenu);
01362             GetMenuString(j,string,MF_BYPOSITION);
01363             if(!mdata)mdata=NewODMenu(j,
01364                 (state&0xFF)|MF_BYPOSITION|MF_POPUP|MF_OWNERDRAW,submenu,string);
01365             else if(string.GetLength()>0)
01366 #ifdef UNICODE
01367                 mdata->SetWideString(string);  //SK: modified for dynamic allocation
01368 #else
01369             mdata->SetAnsiString(string);
01370 #endif
01371         }
01372         else if(state&MF_SEPARATOR){
01373             mdata=FindMenuList(0);
01374             if(!mdata)mdata=NewODMenu(j,
01375                 state|MF_BYPOSITION|MF_SEPARATOR|MF_OWNERDRAW,0,_T(""));//SK: modified for Unicode correctness
01376             else ModifyMenu(j,mdata->nFlags,nID,(LPCTSTR)mdata);
01377         }
01378         else{
01379             nID=GetMenuItemID(j);
01380             mdata=FindMenuList(nID);
01381             GetMenuString(j,string,MF_BYPOSITION);
01382             if(!mdata)mdata=NewODMenu(j,state|MF_BYPOSITION|MF_OWNERDRAW,
01383                 nID,string);
01384             else{
01385                 mdata->nFlags=state|MF_BYPOSITION|MF_OWNERDRAW;
01386                 if(string.GetLength()>0)
01387 #ifdef UNICODE
01388                     mdata->SetWideString(string);//SK: modified for dynamic allocation
01389 #else
01390                 mdata->SetAnsiString(string);
01391 #endif
01392
01393                 ModifyMenu(j,mdata->nFlags,nID,(LPCTSTR)mdata);
01394             }
01395         }
01396         if(mdata)temp.Add(mdata);
01397     }
01398     DeleteMenuList();
01399     m_MenuList.RemoveAll();
01400     m_MenuList.Append(temp);
01401     temp.RemoveAll();
01402 }

Here is the call graph for this function:

void CCJMenu::UnSetBitmapBackground ( void )

Definition at line 1547 of file CJMenu.cpp.

References m_bitmapBackgroundFlag.

01548 {
01549     m_bitmapBackgroundFlag=FALSE;
01550 }

void CCJMenu::UnSetDisableOldStyle ( void )

Definition at line 1671 of file CJMenu.cpp.

References disable_old_style.

01672 {
01673     disable_old_style=FALSE;
01674 }

void CCJMenu::UpdateMenu ( CMenu * pmenu ) [static]

Definition at line 1404 of file CJMenu.cpp.

References SynchronizeMenu().

Referenced by CCJTabCtrl::OnInitMenuPopup(), CCJMDIFrameWnd::OnInitMenuPopup(), CCJFrameWnd::OnInitMenuPopup(), CCJFlatHeaderCtrl::OnInitMenuPopup(), and CCJControlBar::OnInitMenuPopup().

01405 {
01406 #ifdef _CPPRTTI
01407     CCJMenu *psubmenu = dynamic_cast<CCJMenu *>(pmenu);
01408 #else
01409     CCJMenu *psubmenu = (CCJMenu *)pmenu;
01410 #endif
01411     if(psubmenu)psubmenu->SynchronizeMenu();
01412 }

Here is the call graph for this function:

Member Data Documentation

CImageList* CCJMenu::checkmaps

Definition at line 140 of file CJMenu.h.

Referenced by AppendODPopupMenuW(), CCJMenu(), DestroyMenu(), DrawItem(), LoadCheckmarkBitmap(), and LoadMenu().

BOOL CCJMenu::checkmapsshare

Definition at line 141 of file CJMenu.h.

Referenced by AppendODPopupMenuW(), CCJMenu(), DestroyMenu(), and LoadMenu().

BOOL CCJMenu::disable_old_style [protected]

Definition at line 263 of file CJMenu.h.

Referenced by CCJMenu(), DrawItem(), GetDisableOldStyle(), SetDisableOldStyle(), and UnSetDisableOldStyle().

CTypedPtrArray< CPtrArray, HMENU > CCJMenu::m_AllSubMenus [static, protected]

Definition at line 118 of file CJMenu.cpp.

Referenced by AppendODMenuW(), DeleteMenu(), DestroyMenu(), InsertODMenuW(), IsMenu(), NewODMenu(), and RemoveMenu().

COLORREF CCJMenu::m_bitmapBackground [protected]

Definition at line 261 of file CJMenu.h.

Referenced by AddBitmapToImageList(), AppendMenuW(), CCJMenu(), InsertMenuW(), ModifyODMenuW(), and SetBitmapBackground().

BOOL CCJMenu::m_bitmapBackgroundFlag [protected]

Definition at line 262 of file CJMenu.h.

Referenced by AddBitmapToImageList(), AppendMenuW(), CCJMenu(), InsertMenuW(), ModifyODMenuW(), SetBitmapBackground(), and UnSetBitmapBackground().

int CCJMenu::m_iconX [protected]

Definition at line 260 of file CJMenu.h.

Referenced by AddFromToolBar(), AppendMenuW(), AppendODMenuW(), CCJMenu(), DrawItem(), GetBitmapFromImageList(), InsertMenuW(), InsertODMenuW(), LoadCheckmarkBitmap(), MeasureItem(), ModifyODMenuW(), and SetIconSize().

int CCJMenu::m_iconY [protected]

Definition at line 260 of file CJMenu.h.

Referenced by AddFromToolBar(), AppendMenuW(), AppendODMenuW(), CCJMenu(), DrawItem(), GetBitmapFromImageList(), InsertMenuW(), InsertODMenuW(), LoadCheckmarkBitmap(), MeasureItem(), ModifyODMenuW(), and SetIconSize().

CTypedPtrArray<CPtrArray, CCJMenuData*> CCJMenu::m_MenuList [protected]

Definition at line 104 of file CJMenu.h.

Referenced by AddFromToolBar(), AppendODMenuW(), DeleteMenu(), DeleteMenuList(), DestroyMenu(), FindKeyboardShortcut(), FindMenuList(), FindMenuOption(), GetMenuText(), InitializeMenuList(), InsertODMenuW(), InsertSpaces(), LoadMenu(), ModifyODMenuW(), RemoveMenu(), and SynchronizeMenu().

int CCJMenu::m_selectcheck

Definition at line 142 of file CJMenu.h.

Referenced by AppendODPopupMenuW(), CCJMenu(), DrawItem(), LoadCheckmarkBitmap(), and LoadMenu().

CTypedPtrArray<CPtrArray, HMENU> CCJMenu::m_SubMenus [protected]

Definition at line 109 of file CJMenu.h.

Referenced by AppendODMenuW(), DeleteMenu(), DestroyMenu(), InsertODMenuW(), and RemoveMenu().

int CCJMenu::m_unselectcheck

Definition at line 143 of file CJMenu.h.

Referenced by AppendODPopupMenuW(), CCJMenu(), DrawItem(), LoadCheckmarkBitmap(), and LoadMenu().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMenu.h
  • WinCvs/CJLib/CJLibrary/CJMenu.cpp
Generated on Sat Aug 7 22:49:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMenuBar Class Reference

CCJMenuBar Class Reference

#include <CJMenuBar.h>

Inheritance diagram for CCJMenuBar:

[legend]
Collaboration diagram for CCJMenuBar:

[legend]
List of all members.

Public Member Functions

CCJMenuBar ()
virtual | ~CCJMenuBar ()
virtual BOOL | Create (CWnd *pParentWnd, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_TOP, UINT nID=AFX_IDW_TOOLBAR)
virtual BOOL | CreateEx (CWnd *pParentWnd, DWORD dwCtrlStyle=TBSTYLE_FLAT, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP, CRect rcBorders=CRect(0, 0, 0, 0), UINT nID=AFX_IDW_TOOLBAR)
BOOL | LoadMenu (UINT nID)
CCJMenu * GetMenu ()
TRACKINGSTATE | GetTrackingState (int &iPopup)
virtual BOOL | TranslateFrameMessage (MSG *pMsg)

Public Attributes

BOOL | m_bAutoRemoveFrameMenu

Static Public Attributes

BOOL | bTRACE

Protected Member Functions

void | RecomputeToolbarSize ()
void | RecomputeMenuLayout ()
void | UpdateFont ()
int | GetNextOrPrevButton (int iButton, BOOL bPrev)
void | SetTrackingState (TRACKINGSTATE iState, int iButton=-1)
void | TrackPopup (int iButton)
void | ToggleTrackButtonMode ()
void | CancelMenuAndTrackNewOne (int iButton)
void | OnMenuSelect (HMENU hmenu, UINT nItemID)
CPoint | ComputeMenuTrackPoint (const CRect &rcButn, TPMPARAMS &tpm)
BOOL | IsValidButton (int iButton) const
int | HitTest (CPoint p) const
virtual BOOL | OnMenuInput (MSG &m)
virtual void | OnBarStyleChange (DWORD dwOldStyle, DWORD dwNewStyle)
virtual CSize | CalcFixedLayout (BOOL bStretch, BOOL bHorz)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnUpdateMenuButton (CCmdUI *pCmdUI)

Static Protected Member Functions

LRESULT CALLBACK | MenuInputFilter (int code, WPARAM wp, LPARAM lp)

Protected Attributes

CCJMenuBarFrameHook m_frameHook
CStringArray | m_arStrings
int m_nMenuID
CCJMenu m_popupMenu
int m_iPopupTracking
int m_iNewPopup
BOOL | m_bProcessRightArrow
BOOL | m_bProcessLeftArrow
BOOL | m_bEscapeWasPressed
CPoint | m_ptMouse
HMENU | m_hMenuTracking
CFont | m_Font
TRACKINGSTATE m_iTrackingState

Constructor & Destructor Documentation

CCJMenuBar::CCJMenuBar ( )

Definition at line 86 of file CJMenuBar.cpp.

References m_bAutoRemoveFrameMenu, m_iNewPopup, m_iPopupTracking, m_iTrackingState, and TRACK_NONE.

00087 {
00088     m_iTrackingState        = TRACK_NONE;   // initial state: not tracking
00089     m_iPopupTracking        = -1;
00090     m_iNewPopup             = -1;           // invalid
00091     m_bAutoRemoveFrameMenu  = TRUE;         // set frame's menu to NULL
00092 }

CCJMenuBar::~CCJMenuBar ( ) [virtual]

Definition at line 94 of file CJMenuBar.cpp.

References m_Font.

00095 {
00096     // fix potential resource leak - KStowell - 10-15-99
00097     m_Font.DeleteObject();
00098 }

Member Function Documentation

CSize CCJMenuBar::CalcFixedLayout | ( | BOOL | bStretch,
 |  | BOOL | bHorz
 | ) | [protected, virtual]

Reimplemented from CCJToolBar.

Definition at line 131 of file CJMenuBar.cpp.

References CCJToolBar::CalcFixedLayout().

00132 {
00133     if( m_bInReBar ) {
00134         return CCJToolBar::CalcFixedLayout(bStretch, bHorz);
00135     }
00136
00137     else
00138     {
00139         CSize size = CCJToolBar::CalcFixedLayout(bStretch, bHorz);
00140         CRect rcClient;
00141         GetParentFrame()->GetClientRect(&rcClient);
00142
00143         if( bHorz ) {
00144             size.cx = rcClient.Width();
00145         }
00146         else {
00147             size.cy = rcClient.Height();
00148         }
00149
00150         return size;
00151     }
00152 }

Here is the call graph for this function:

void CCJMenuBar::CancelMenuAndTrackNewOne ( int iButton ) [protected]

Definition at line 500 of file CJMenuBar.cpp.

References m_iNewPopup, and m_iPopupTracking.

Referenced by OnMenuInput().

00501 {
00502     ASSERT_VALID(this);
00503     if (iNewPopup != m_iPopupTracking) {
00504         GetParentFrame()->PostMessage(WM_CANCELMODE); // quit menu loop
00505         m_iNewPopup = iNewPopup;                     // go to this popup (-1 = quit)
00506     }
00507 }

CPoint CCJMenuBar::ComputeMenuTrackPoint | ( | const CRect & | rcButn,
 |  | TPMPARAMS & | tpm
 | ) | [protected]

Definition at line 585 of file CJMenuBar.cpp.

Referenced by TrackPopup().

00586 {
00587     tpm.cbSize = sizeof(tpm);
00588     DWORD dwStyle = m_dwStyle;
00589     CPoint pt;
00590     CRect& rcExclude = (CRect&)tpm.rcExclude;
00591     rcExclude = rcButn;
00592     ::GetWindowRect(::GetDesktopWindow(), &rcExclude);
00593
00594     switch (dwStyle & CBRS_ALIGN_ANY) {
00595     case CBRS_ALIGN_BOTTOM:
00596         pt = CPoint(rcButn.left, rcButn.top);
00597         rcExclude.top = rcButn.top;
00598         break;
00599
00600     case CBRS_ALIGN_LEFT:
00601         pt = CPoint(rcButn.right, rcButn.top);
00602         rcExclude.right = rcButn.right;
00603         break;
00604
00605     case CBRS_ALIGN_RIGHT:
00606         pt = CPoint(rcButn.left, rcButn.top);
00607         rcExclude.left = rcButn.left;
00608         break;
00609
00610     default: // case CBRS_ALIGN_TOP:
00611         pt = CPoint(rcButn.left, rcButn.bottom);
00612         break;
00613     }
00614     return pt;
00615 }

BOOL CCJMenuBar::Create | ( | CWnd * | pParentWnd,
 |  | DWORD | dwStyle = WS_CHILD|WS_VISIBLE|CBRS_TOP,
 |  | UINT | nID = AFX_IDW_TOOLBAR
 | ) | [virtual]

Reimplemented from CCJToolBar.

Definition at line 111 of file CJMenuBar.cpp.

References NULL.

00112 {
00113     return CreateEx(pParentWnd, NULL, dwStyle,
00114         CRect(m_cxLeftBorder, m_cyTopBorder, m_cxRightBorder, m_cyBottomBorder), nID);
00115 }

BOOL CCJMenuBar::CreateEx | ( | CWnd * | pParentWnd,
 |  | DWORD | dwCtrlStyle = TBSTYLE_FLAT,
 |  | DWORD | dwStyle = WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP,
 |  | CRect | rcBorders = CRect(0, 0, 0, 0),
 |  | UINT | nID = AFX_IDW_TOOLBAR
 | ) | [virtual]

Reimplemented from CCJToolBar.

Definition at line 117 of file CJMenuBar.cpp.

References CCJToolBar::CreateEx(), CCJMenuBarFrameHook::Install(), m_frameHook, and UpdateFont().

00118 {
00119     if( !CCJToolBar::CreateEx( pParentWnd, dwCtrlStyle, dwStyle, rcBorders, nID))
00120         return FALSE;
00121
00122     UpdateFont();
00123     m_frameHook.Install(this, *pParentWnd);
00124
00125     SetWindowText(_T("Menu Bar"));
00126     return TRUE;
00127 }

Here is the call graph for this function:

_CJXLIB_INLINE CCJMenu * CCJMenuBar::GetMenu ( )

Definition at line 195 of file CJMenuBar.h.

References _CJXLIB_INLINE, and m_popupMenu.

00196     { return &m_popupMenu; }

int CCJMenuBar::GetNextOrPrevButton | ( | int | iButton,
 |  | BOOL | bPrev
 | ) | [protected]

Definition at line 243 of file CJMenuBar.cpp.

References CCJToolBar::GetButtonCount().

Referenced by OnMenuInput(), and TranslateFrameMessage().

00244 {
00245     ASSERT_VALID(this);
00246     if (bPrev) {
00247         iButton--;
00248         if (iButton <0)
00249             iButton = GetButtonCount() - 1;
00250     } else {
00251         iButton++;
00252         if (iButton >= GetButtonCount())
00253             iButton = 0;
00254     }
00255     return iButton;
00256 }

Here is the call graph for this function:

_CJXLIB_INLINE TRACKINGSTATE CCJMenuBar::GetTrackingState ( int & iPopup )

Definition at line 198 of file CJMenuBar.h.

References _CJXLIB_INLINE, m_iPopupTracking, m_iTrackingState, and TRACKINGSTATE.

00199     { iPopup = m_iPopupTracking; return m_iTrackingState; }

int CCJMenuBar::HitTest ( CPoint p ) const [protected]

Reimplemented from CCJToolBar.

Definition at line 263 of file CJMenuBar.cpp.

References CCJToolBar::HitTest().

Referenced by OnLButtonDown(), OnMenuInput(), and OnMouseMove().

00264 {
00265     int iHit = CCJToolBar::HitTest(p);
00266     if (iHit>0) {
00267         CRect rc;
00268         GetClientRect(&rc);
00269         if (!rc.PtInRect(p)) // if point is outside window
00270             iHit = -1;          // can't be a hit!
00271     }
00272     return iHit;
00273 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJMenuBar::IsValidButton ( int iButton ) const [protected]

Definition at line 192 of file CJMenuBar.h.

References CCJToolBar::GetButtonCount().

Referenced by OnMenuInput(), OnMouseMove(), and OnUpdateMenuButton().

00193     { return 0 <= iButton && iButton < GetButtonCount(); }

Here is the call graph for this function:

BOOL CCJMenuBar::LoadMenu ( UINT nID )

Definition at line 279 of file CJMenuBar.cpp.

References CCJToolBar::AddButtons(), CCJToolBar::AddStrings(), CCJToolBar::AutoSize(), CCJToolBar::DeleteButton(), CCJToolBar::GetButtonCount(), m_arStrings, m_nMenuID, NULL, RecomputeToolbarSize(), and CCJToolBar::SetImageList().

00280 {
00281     CFrameWnd* pFrame = GetParentFrame();
00282     ASSERT_VALID(pFrame);
00283
00284     pFrame->GetMenu()->DestroyMenu();
00285     pFrame->SetMenu(NULL);
00286
00287     CMenu menu;
00288     menu.LoadMenu(nID);
00289     m_nMenuID = nID;
00290
00291     // delete existing buttons
00292     int nCount = GetButtonCount();
00293     while (nCount--) {
00294         VERIFY(DeleteButton(0));
00295     }
00296
00297     DWORD dwStyle = GetStyle();
00298     BOOL bModifyStyle = ModifyStyle(0, TBSTYLE_FLAT|TBSTYLE_TRANSPARENT);
00299
00300     SetImageList(NULL);
00301     UINT nMenuItems = menu.GetMenuItemCount();
00302
00303     for( UINT i = 0; i < nMenuItems; i++ )
00304     {
00305         CString strName;
00306         if( menu.GetMenuString(i, strName, MF_BYPOSITION ))
00307         {
00308             TBBUTTON tbb;
00309             memset( &tbb, 0, sizeof( TBBUTTON ));
00310             tbb.idCommand = menu.GetMenuItemID(i);
00311
00312             // Because the toolbar is too brain-damaged to know if it already has
00313             // a string, and is also too brain-dead to even let you delete strings,
00314             // I have to determine if each string has been added already. Otherwise
00315             // in a MDI app, as the menus are repeatedly switched between doc and
00316             // no-doc menus, I will keep adding strings until somebody runs out of
00317             // memory. Sheesh!
00318             //
00319             int iString = -1;
00320             for (int j=0; j<m_arStrings.GetSize(); j++) {
00321                 if (m_arStrings[j] == strName) {
00322                     iString = j; // found it
00323                     break;
00324                 }
00325             }
00326             if (iString <0) {
00327                 // string not found: add it
00328                 iString = AddStrings(strName);
00329                 m_arStrings.SetAtGrow(iString, strName);
00330             }
00331
00332             tbb.iString = iString;
00333             tbb.fsState = TBSTATE_ENABLED;
00334             tbb.fsStyle = TBSTYLE_AUTOSIZE;
00335             tbb.iBitmap = -1;
00336             tbb.idCommand = i;
00337             VERIFY(AddButtons(1, &tbb));
00338         }
00339     }
00340
00341     if( bModifyStyle ) {
00342         SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
00343     }
00344
00345     if( ::IsMenu( menu )) {
00346         AutoSize();                              // size buttons
00347         RecomputeToolbarSize();              // and menubar itself
00348     }
00349
00350     menu.DestroyMenu();
00351     return TRUE;
00352 }

Here is the call graph for this function:

LRESULT CALLBACK CCJMenuBar::MenuInputFilter | ( | int | code,
 |  | WPARAM | wp,
 |  | LPARAM | lp
 | ) | [static, protected]

Definition at line 437 of file CJMenuBar.cpp.

References g_hMsgHook, g_pMenuBar, and OnMenuInput().

Referenced by TrackPopup().

00438 {
00439     return (code==MSGF_MENU && g_pMenuBar &&
00440         g_pMenuBar->OnMenuInput(*((MSG*)lp))) ? TRUE
00441         : CallNextHookEx(g_hMsgHook, code, wp, lp);
00442 }

Here is the call graph for this function:

void CCJMenuBar::OnBarStyleChange | ( | DWORD | dwOldStyle,
 |  | DWORD | dwNewStyle
 | ) | [protected, virtual]

Reimplemented from CCJToolBar.

Definition at line 407 of file CJMenuBar.cpp.

References CCJToolBar::OnBarStyleChange(), and RecomputeMenuLayout().

00408 {
00409     CCJToolBar::OnBarStyleChange(dwOldStyle, dwNewStyle);
00410     RecomputeMenuLayout();
00411 }

Here is the call graph for this function:

void CCJMenuBar::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 358 of file CJMenuBar.cpp.

References CCJToolBar::GetButtonCount(), HitTest(), and TrackPopup().

00359 {
00360     ASSERT_VALID(this);
00361     int iButton = HitTest(pt);
00362     if (iButton >= 0 && iButton<GetButtonCount()) // if mouse is over a button:
00363         TrackPopup(iButton);                                 //   track it
00364     else                                                         // otherwise:
00365         CCJToolBar::OnLButtonDown(nFlags, pt);   //   pass it on...
00366 }

Here is the call graph for this function:

BOOL CCJMenuBar::OnMenuInput ( MSG & m ) [protected, virtual]

Definition at line 449 of file CJMenuBar.cpp.

References CancelMenuAndTrackNewOne(), GetNextOrPrevButton(), HitTest(), IsValidButton(), m_bEscapeWasPressed, m_bProcessLeftArrow, m_bProcessRightArrow, m_iPopupTracking, m_iTrackingState, m_ptMouse, and TRACK_POPUP.

Referenced by MenuInputFilter().

00450 {
00451     ASSERT_VALID(this);
00452     ASSERT(m_iTrackingState == TRACK_POPUP); // sanity check
00453     int msg = m.message;
00454
00455     if (msg==WM_KEYDOWN) {
00456         // handle left/right-arow.
00457         TCHAR vkey = static_cast<TCHAR>(m.wParam);
00458
00459         if ((vkey == VK_LEFT  && m_bProcessLeftArrow) ||
00460             (vkey == VK_RIGHT && m_bProcessRightArrow)) {
00461
00462             CancelMenuAndTrackNewOne(
00463                 GetNextOrPrevButton(m_iPopupTracking, vkey==VK_LEFT));
00464             return TRUE; // eat it
00465
00466         } else if (vkey == VK_ESCAPE) {
00467             m_bEscapeWasPressed = TRUE;  // (menu will abort itself)
00468         }
00469
00470     } else if (msg==WM_MOUSEMOVE || msg==WM_LBUTTONDOWN) {
00471         // handle mouse move or click
00472         CPoint pt = m.lParam;
00473         ScreenToClient(&pt);
00474
00475         if (msg == WM_MOUSEMOVE) {
00476             if (pt != m_ptMouse) {
00477                 int iButton = HitTest(pt);
00478                 if (IsValidButton(iButton) && iButton != m_iPopupTracking) {
00479                     // user moved mouse over a different button: track its popup
00480                     CancelMenuAndTrackNewOne(iButton);
00481                 }
00482                 m_ptMouse = pt;
00483             }
00484
00485         } else if (msg == WM_LBUTTONDOWN) {
00486             if (HitTest(pt) == m_iPopupTracking) {
00487                 // user clicked on same button I am tracking: cancel menu
00488                 CancelMenuAndTrackNewOne(-1);
00489                 return TRUE; // eat it
00490             }
00491         }
00492     }
00493     return FALSE; // not handled
00494 }

Here is the call graph for this function:

void CCJMenuBar::OnMenuSelect | ( | HMENU | hmenu,
 |  | UINT | nItemID
 | ) | [protected]

Definition at line 418 of file CJMenuBar.cpp.

References m_bProcessLeftArrow, m_bProcessRightArrow, m_iTrackingState, and NULL.

Referenced by CCJMenuBarFrameHook::WindowProc().

00419 {
00420     if (m_iTrackingState > 0) {
00421         // process right-arrow if item is NOT a submenu
00422         m_bProcessRightArrow = (::GetSubMenu(hmenu, iItem) == NULL);
00423         // process left-arrow if curent menu is one I'm tracking
00424         m_bProcessLeftArrow = TRUE;
00425     }
00426 }

void CCJMenuBar::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 371 of file CJMenuBar.cpp.

References HitTest(), IsValidButton(), m_iTrackingState, m_ptMouse, CCJToolBar::SetHotItem(), and TRACK_BUTTON.

00372 {
00373     ASSERT_VALID(this);
00374
00375     if (m_iTrackingState==TRACK_BUTTON) {
00376
00377         // In button-tracking state, ignore mouse-over to non-button area.
00378         // Normally, the toolbar would de-select the hot item in this case.
00379         //
00380         // Only change the hot item if the mouse has actually moved.
00381         // This is necessary to avoid a bug where the user moves to a different
00382         // button from the one the mouse is over, and presses arrow-down to get
00383         // the menu, then Esc to cancel it. Without this code, the button will
00384         // jump to wherever the mouse is--not right.
00385
00386         int iHot = HitTest(pt);
00387         if (IsValidButton(iHot) && pt != m_ptMouse)
00388             SetHotItem(iHot);
00389         return;          // don't let toolbar get it
00390     }
00391     m_ptMouse = pt; // remember point
00392     CCJToolBar::OnMouseMove(nFlags, pt);
00393 }

Here is the call graph for this function:

void CCJMenuBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy
 | ) | [protected]

Definition at line 398 of file CJMenuBar.cpp.

References RecomputeMenuLayout().

00399 {
00400     CCJToolBar::OnSize(nType, cx, cy);
00401     RecomputeMenuLayout();
00402 }

Here is the call graph for this function:

void CCJMenuBar::OnUpdateMenuButton ( CCmdUI * pCmdUI ) [protected]

Definition at line 172 of file CJMenuBar.cpp.

References IsValidButton().

00173 {
00174     ASSERT_VALID(this);
00175     if (IsValidButton(pCmdUI->m_nID))
00176         pCmdUI->Enable(TRUE);
00177 }

Here is the call graph for this function:

void CCJMenuBar::RecomputeMenuLayout ( ) [protected]

Definition at line 182 of file CJMenuBar.cpp.

References NULL.

Referenced by OnBarStyleChange(), and OnSize().

00183 {
00184     SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE |
00185         SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
00186 }

void CCJMenuBar::RecomputeToolbarSize ( ) [protected]

Definition at line 191 of file CJMenuBar.cpp.

Referenced by LoadMenu().

00192 {
00193     // Force toolbar to recompute size
00194     CFrameWnd* pFrame = (CFrameWnd*)GetParentFrame();
00195     ASSERT_VALID(pFrame);
00196     ASSERT(pFrame->IsFrameWnd());
00197     pFrame->RecalcLayout();
00198
00199     // floating frame
00200     pFrame = GetParentFrame();
00201     if (pFrame->IsKindOf(RUNTIME_CLASS(CMiniFrameWnd)))
00202         pFrame->RecalcLayout();
00203 }

void CCJMenuBar::SetTrackingState | ( | TRACKINGSTATE | iState,
 |  | int | iButton = -1
 | ) | [protected]

Definition at line 208 of file CJMenuBar.cpp.

References m_bEscapeWasPressed, m_bProcessLeftArrow, m_bProcessRightArrow, m_iPopupTracking, m_iTrackingState, CCJToolBar::SetHotItem(), TRACK_NONE, and TRACK_POPUP.

Referenced by ToggleTrackButtonMode(), TrackPopup(), and TranslateFrameMessage().

00209 {
00210     ASSERT_VALID(this);
00211     if (iState != m_iTrackingState) {
00212         if (iState == TRACK_NONE)
00213             iButton = -1;
00214
00215         SetHotItem(iButton);                     // could be none (-1)
00216
00217         if (iState==TRACK_POPUP) {
00218             // set related state stuff
00219             m_bEscapeWasPressed = FALSE;     // assume Esc key not pressed
00220             m_bProcessRightArrow =           // assume left/right arrow..
00221                 m_bProcessLeftArrow = TRUE; // ..will move to prev/next popup
00222             m_iPopupTracking = iButton;  // which popup I'm tracking
00223         }
00224         m_iTrackingState = iState;
00225     }
00226 }

Here is the call graph for this function:

void CCJMenuBar::ToggleTrackButtonMode ( ) [protected]

Definition at line 231 of file CJMenuBar.cpp.

References m_iTrackingState, SetTrackingState(), TRACK_BUTTON, and TRACK_NONE.

Referenced by TranslateFrameMessage().

00232 {
00233     ASSERT_VALID(this);
00234     if (m_iTrackingState == TRACK_NONE || m_iTrackingState == TRACK_BUTTON) {
00235         SetTrackingState(m_iTrackingState == TRACK_NONE ?
00236             TRACK_BUTTON : TRACK_NONE, 0);
00237     }
00238 }

Here is the call graph for this function:

void CCJMenuBar::TrackPopup ( int iButton ) [protected]

Definition at line 514 of file CJMenuBar.cpp.

References ComputeMenuTrackPoint(), CCJMenu::DestroyMenu(), g_hMsgHook, g_pMenuBar, CCJToolBar::GetRect(), CCJMenu::LoadMenu(), CCJMenu::LoadToolbar(), m_bEscapeWasPressed, m_iNewPopup, m_nMenuID, m_popupMenu, MenuInputFilter(), NULL, CCJToolBar::PressButton(), SetTrackingState(), TRACK_BUTTON, TRACK_NONE, and TRACK_POPUP.

Referenced by OnLButtonDown(), and TranslateFrameMessage().

00515 {
00516     ASSERT_VALID(this);
00517
00518     m_popupMenu.LoadMenu(m_nMenuID);
00519     m_popupMenu.LoadToolbar(m_nMenuID);
00520     ASSERT(::IsMenu(m_popupMenu));
00521
00522     while (iButton >= 0) {                   // while user selects another menu
00523
00524         m_iNewPopup = -1;                        // assume quit after this
00525         PressButton(iButton, TRUE);      // press the button
00526         UpdateWindow();                      // and force repaint now
00527
00528         // post a simulated arrow-down into the message stream
00529         // so TrackPopupMenu will read it and move to the first item
00530         GetParentFrame()->PostMessage(WM_KEYDOWN, VK_DOWN, 1);
00531         GetParentFrame()->PostMessage(WM_KEYUP, VK_DOWN, 1);
00532
00533         SetTrackingState(TRACK_POPUP, iButton); // enter tracking state
00534
00535         // Need to install a hook to trap menu input in order to make
00536         // left/right-arrow keys and "hot" mouse tracking work.
00537         //
00538         ASSERT(g_pMenuBar == NULL);
00539         g_pMenuBar = this;
00540         ASSERT(g_hMsgHook == NULL);
00541         g_hMsgHook = SetWindowsHookEx(WH_MSGFILTER,
00542             MenuInputFilter, NULL, ::GetCurrentThreadId());
00543
00544         // get submenu and display it beneath button
00545         TPMPARAMS tpm;
00546         CRect rcButton;
00547         GetRect(iButton, rcButton);
00548         ClientToScreen(&rcButton);
00549         CPoint pt = ComputeMenuTrackPoint(rcButton, tpm);
00550
00551         CCJMenu* pPopupMenu = (CCJMenu*)m_popupMenu.GetSubMenu(iButton);
00552         pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,
00553             pt.x, pt.y, GetParentFrame());
00554
00555         // uninstall hook.
00556         ::UnhookWindowsHookEx(g_hMsgHook);
00557         g_hMsgHook = NULL;
00558         g_pMenuBar = NULL;
00559
00560         PressButton(iButton, FALSE);     // un-press button
00561         UpdateWindow();                  // and force repaint now
00562
00563         // If the user exited the menu loop by pressing Escape,
00564         // return to track-button state; otherwise normal non-tracking state.
00565         SetTrackingState(m_bEscapeWasPressed ?
00566             TRACK_BUTTON : TRACK_NONE, iButton);
00567
00568         // If the user moved mouse to a new top-level popup (eg from File to
00569         // Edit button), I will have posted a WM_CANCELMODE to quit
00570         // the first popup, and set m_iNewPopup to the new menu to show.
00571         // Otherwise, m_iNewPopup will be -1 as set above.
00572         // So just set iButton to the next popup menu and keep looping...
00573         iButton = m_iNewPopup;
00574     }
00575
00576     // fix potential resource leak - KStowell - 10-15-99
00577     m_popupMenu.DestroyMenu();
00578 }

Here is the call graph for this function:

BOOL CCJMenuBar::TranslateFrameMessage ( MSG * pMsg ) [virtual]

Definition at line 621 of file CJMenuBar.cpp.

References CCJToolBar::GetHotItem(), GetNextOrPrevButton(), m_iTrackingState, CCJToolBar::MapAccelerator(), CCJToolBar::SetHotItem(), SetTrackingState(), ToggleTrackButtonMode(), TRACK_BUTTON, TRACK_NONE, and TrackPopup().

Referenced by CCJFrameWnd::PreTranslateMessage().

00622 {
00623     ASSERT_VALID(this);
00624     ASSERT(pMsg);
00625     UINT msg = pMsg->message;
00626     if (WM_LBUTTONDOWN <= msg && msg <= WM_MOUSELAST) {
00627         if (pMsg->hwnd != m_hWnd && m_iTrackingState > 0) {
00628             // user clicked outside menu bar: exit tracking mode
00629             SetTrackingState(TRACK_NONE);
00630         }
00631
00632     } else if (msg==WM_SYSKEYDOWN || msg==WM_SYSKEYUP || msg==WM_KEYDOWN) {
00633
00634         TCHAR vkey = static_cast<TCHAR>(pMsg->wParam);  // get virt key
00635
00636         BOOL  bAlt = HIWORD(pMsg->lParam) & KF_ALTDOWN;     // Alt key down
00637
00638         if (vkey==VK_MENU ||
00639             (vkey==VK_F10 && !((GetKeyState(VK_SHIFT) & 0x80000000) ||
00640                                (GetKeyState(VK_CONTROL) & 0x80000000) || bAlt))) {
00641
00642             // key is VK_MENU or F10 with no alt/ctrl/shift: toggle menu mode
00643             if (msg==WM_SYSKEYUP) {
00644                 ToggleTrackButtonMode();
00645             }
00646             return TRUE;
00647
00648         } else if ((msg==WM_SYSKEYDOWN || msg==WM_KEYDOWN)) {
00649             if (m_iTrackingState == TRACK_BUTTON) {
00650                 // I am tracking: handle left/right/up/down/space/Esc
00651                 switch (vkey) {
00652                 case VK_LEFT:
00653                 case VK_RIGHT:
00654                     // left or right-arrow: change hot button if tracking buttons
00655                     SetHotItem(GetNextOrPrevButton(GetHotItem(), vkey==VK_LEFT));
00656                     return TRUE;
00657
00658                 case VK_SPACE:  // (personally, I like SPACE to enter menu too)
00659                 case VK_UP:
00660                 case VK_DOWN:
00661                     // up or down-arrow: move into current menu, if any
00662                     TrackPopup(GetHotItem());
00663                     return TRUE;
00664
00665                 case VK_ESCAPE:
00666                     // escape key: exit tracking mode
00667                     SetTrackingState(TRACK_NONE);
00668                     return TRUE;
00669                 }
00670             }
00671
00672             // Handle alphanumeric key: invoke menu. Note that Alt-X
00673             // chars come through as WM_SYSKEYDOWN, plain X as WM_KEYDOWN.
00674             if ((bAlt || m_iTrackingState == TRACK_BUTTON) && isalnum(vkey)) {
00675                 // Alt-X, or else X while in tracking mode
00676                 UINT nID;
00677                 if (MapAccelerator(vkey, nID)) {
00678                     TrackPopup(nID);     // found menu mnemonic: track it
00679                     return TRUE;         // handled
00680                 } else if (m_iTrackingState==TRACK_BUTTON && !bAlt) {
00681                     MessageBeep(0);
00682                     return TRUE;
00683                 }
00684             }
00685
00686             // Default for any key not handled so far: return to no-menu state
00687             if (m_iTrackingState > 0) {
00688                 SetTrackingState(TRACK_NONE);
00689             }
00690         }
00691     }
00692     return FALSE; // not handled, pass along
00693 }

Here is the call graph for this function:

void CCJMenuBar::UpdateFont ( ) [protected]

Definition at line 157 of file CJMenuBar.cpp.

References m_Font.

Referenced by CreateEx(), and CCJMenuBarFrameHook::WindowProc().

00158 {
00159     m_Font.DeleteObject();
00160     NONCLIENTMETRICS ncm;
00161     ncm.cbSize = sizeof(ncm);
00162     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00163     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMenuFont));
00164     SetFont(&m_Font);
00165 }

Member Data Documentation

BOOL CCJMenuBar::bTRACE [static]

Definition at line 137 of file CJMenuBar.h.

CStringArray CCJMenuBar::m_arStrings [protected]

Definition at line 115 of file CJMenuBar.h.

Referenced by LoadMenu().

BOOL CCJMenuBar::m_bAutoRemoveFrameMenu

Definition at line 108 of file CJMenuBar.h.

Referenced by CCJMenuBar().

BOOL CCJMenuBar::m_bEscapeWasPressed [protected]

Definition at line 124 of file CJMenuBar.h.

Referenced by OnMenuInput(), SetTrackingState(), and TrackPopup().

BOOL CCJMenuBar::m_bProcessLeftArrow [protected]

Definition at line 123 of file CJMenuBar.h.

Referenced by OnMenuInput(), OnMenuSelect(), and SetTrackingState().

BOOL CCJMenuBar::m_bProcessRightArrow [protected]

Definition at line 122 of file CJMenuBar.h.

Referenced by OnMenuInput(), OnMenuSelect(), and SetTrackingState().

CFont CCJMenuBar::m_Font [protected]

Definition at line 127 of file CJMenuBar.h.

Referenced by UpdateFont(), and ~CCJMenuBar().

CCJMenuBarFrameHook CCJMenuBar::m_frameHook [protected]

Definition at line 114 of file CJMenuBar.h.

Referenced by CreateEx().

HMENU CCJMenuBar::m_hMenuTracking [protected]

Definition at line 126 of file CJMenuBar.h.

int CCJMenuBar::m_iNewPopup [protected]

Definition at line 121 of file CJMenuBar.h.

Referenced by CancelMenuAndTrackNewOne(), CCJMenuBar(), and TrackPopup().

int CCJMenuBar::m_iPopupTracking [protected]

Definition at line 120 of file CJMenuBar.h.

Referenced by CancelMenuAndTrackNewOne(), CCJMenuBar(), GetTrackingState(), OnMenuInput(), and SetTrackingState().

TRACKINGSTATE CCJMenuBar::m_iTrackingState [protected]

Definition at line 129 of file CJMenuBar.h.

Referenced by CCJMenuBar(), GetTrackingState(), OnMenuInput(), OnMenuSelect(), OnMouseMove(), SetTrackingState(), ToggleTrackButtonMode(), and TranslateFrameMessage().

int CCJMenuBar::m_nMenuID [protected]

Definition at line 116 of file CJMenuBar.h.

Referenced by LoadMenu(), and TrackPopup().

CCJMenu CCJMenuBar::m_popupMenu [protected]

Definition at line 117 of file CJMenuBar.h.

Referenced by GetMenu(), and TrackPopup().

CPoint CCJMenuBar::m_ptMouse [protected]

Definition at line 125 of file CJMenuBar.h.

Referenced by OnMenuInput(), and OnMouseMove().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMenuBar.h
  • WinCvs/CJLib/CJLibrary/CJMenuBar.cpp
Generated on Sat Aug 7 22:49:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMenuBarFrameHook Class Reference

CCJMenuBarFrameHook Class Reference

#include <CJMenuBar.h>

Inheritance diagram for CCJMenuBarFrameHook:

[legend]
Collaboration diagram for CCJMenuBarFrameHook:

[legend]
List of all members.

Protected Member Functions

CCJMenuBarFrameHook ()
~CCJMenuBarFrameHook ()
BOOL | Install (CCJMenuBar *pMenuBar, HWND hWndToHook)
virtual LRESULT | WindowProc (UINT msg, WPARAM wp, LPARAM lp)

Protected Attributes

CCJMenuBar * m_pMenuBar

Constructor & Destructor Documentation

CCJMenuBarFrameHook::CCJMenuBarFrameHook ( ) [protected]

Definition at line 717 of file CJMenuBar.cpp.

00718 {
00719 }

CCJMenuBarFrameHook::~CCJMenuBarFrameHook ( ) [protected]

Definition at line 721 of file CJMenuBar.cpp.

References CSubclassWnd::HookWindow(), and NULL.

00722 {
00723     HookWindow((HWND)NULL); // (unhook)
00724 }

Here is the call graph for this function:

Member Function Documentation

BOOL CCJMenuBarFrameHook::Install | ( | CCJMenuBar * | pMenuBar,
 |  | HWND | hWndToHook
 | ) | [protected]

Definition at line 729 of file CJMenuBar.cpp.

References CSubclassWnd::HookWindow(), and m_pMenuBar.

Referenced by CCJMenuBar::CreateEx().

00730 {
00731     ASSERT_VALID(pMenuBar);
00732     m_pMenuBar = pMenuBar;
00733     return HookWindow(hWndToHook);
00734 }

Here is the call graph for this function:

LRESULT CCJMenuBarFrameHook::WindowProc | ( | UINT | msg,
 |  | WPARAM | wp,
 |  | LPARAM | lp
 | ) | [protected, virtual]

Reimplemented from CSubclassWnd.

Definition at line 739 of file CJMenuBar.cpp.

References m_pMenuBar, CCJMenuBar::OnMenuSelect(), CCJMenuBar::UpdateFont(), and CSubclassWnd::WindowProc().

00740 {
00741     CCJMenuBar& mb = *m_pMenuBar;
00742
00743     switch (msg) {
00744     // The following messages are trapped for the frame window
00745     case WM_SYSCOLORCHANGE:
00746         mb.UpdateFont();
00747         break;
00748
00749     case WM_MENUSELECT:
00750         mb.OnMenuSelect((HMENU)lp, (UINT)LOWORD(wp));
00751         break;
00752     }
00753     return CSubclassWnd::WindowProc(msg, wp, lp);
00754 }

Here is the call graph for this function:

Member Data Documentation

CCJMenuBar* CCJMenuBarFrameHook::m_pMenuBar [protected]

Definition at line 64 of file CJMenuBar.h.

Referenced by Install(), and WindowProc().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMenuBar.h
  • WinCvs/CJLib/CJLibrary/CJMenuBar.cpp
Generated on Sat Aug 7 22:49:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMenuData Class Reference

CCJMenuData Class Reference

#include <CJMenu.h>

Collaboration diagram for CCJMenuData:

[legend]
List of all members.

Public Member Functions

CCJMenuData ()
void | SetAnsiString (LPCSTR szAnsiString)
void | SetWideString (const wchar_t *szWideString)
const wchar_t * | GetWideString (void)
~CCJMenuData ()
CString | GetString (void)

Public Attributes

int xoffset
int menuIconNormal
UINT | nFlags
UINT | nID
UINT | syncflag
CImageList * | bitmap

Private Attributes

wchar_t * | m_szMenuText

Constructor & Destructor Documentation

CCJMenuData::CCJMenuData ( ) [inline]

Definition at line 50 of file CJMenu.h.

References NULL.

00050                    {menuIconNormal=-1;xoffset=-1;bitmap=NULL;
00051     nFlags=0;nID=0;syncflag=0;m_szMenuText=NULL;};

CCJMenuData::~CCJMenuData ( )

Definition at line 155 of file CJMenu.cpp.

References bitmap, and m_szMenuText.

00156 {
00157     if(bitmap)
00158         delete(bitmap);
00159
00160     delete[] m_szMenuText; //Need not check for NULL because ANSI X3J16 allows "delete NULL"
00161 }

Member Function Documentation

CString CCJMenuData::GetString ( void )

Definition at line 102 of file CJMenu.cpp.

References m_szMenuText.

Referenced by CCJMenu::NewODMenu().

00104 {
00105     CString strText;
00106     if (m_szMenuText)
00107     {
00108 #ifdef UNICODE
00109         strText = m_szMenuText;
00110 #else
00111         USES_CONVERSION;
00112         strText=W2A(m_szMenuText);     //SK:  see MFC Tech Note 059
00113 #endif
00114     }
00115     return strText;
00116 }

const wchar_t* CCJMenuData::GetWideString ( void ) [inline]

Definition at line 54 of file CJMenu.h.

00054 {return m_szMenuText;};

void CCJMenuData::SetAnsiString ( LPCSTR szAnsiString )

Definition at line 96 of file CJMenu.cpp.

References SetWideString().

Referenced by CCJMenu::NewODMenu(), and CCJMenu::SynchronizeMenu().

00097 {
00098     USES_CONVERSION;
00099     SetWideString(A2W(szAnsiString));  //SK:  see MFC Tech Note 059
00100 }

Here is the call graph for this function:

void CCJMenuData::SetWideString ( const wchar_t * szWideString )

Definition at line 164 of file CJMenu.cpp.

References m_szMenuText, and NULL.

Referenced by CCJMenu::AppendODMenuW(), CCJMenu::InsertODMenuW(), CCJMenu::ModifyODMenuW(), CCJMenu::NewODMenu(), SetAnsiString(), and CCJMenu::SynchronizeMenu().

00165 {
00166     delete[] m_szMenuText;//Need not check for NULL because ANSI X3J16 allows "delete NULL"
00167
00168     if (szWideString)
00169     {
00170         m_szMenuText = new wchar_t[sizeof(wchar_t)*(wcslen(szWideString)+1)];
00171         if (m_szMenuText)
00172             wcscpy(m_szMenuText,szWideString);
00173     }
00174     else
00175         m_szMenuText=NULL;//set to NULL so we need not bother about dangling non-NULL Ptrs
00176 }

Member Data Documentation

CImageList* CCJMenuData::bitmap

Definition at line 60 of file CJMenu.h.

Referenced by CCJMenu::AddFromToolBar(), CCJMenu::AppendODMenuW(), CCJMenu::InsertODMenuW(), CCJMenu::ModifyODMenuW(), and ~CCJMenuData().

wchar_t* CCJMenuData::m_szMenuText [private]

Definition at line 48 of file CJMenu.h.

Referenced by GetString(), SetWideString(), and ~CCJMenuData().

int CCJMenuData::menuIconNormal

Definition at line 58 of file CJMenu.h.

Referenced by CCJMenu::AddFromToolBar(), CCJMenu::AppendODMenuW(), CCJMenu::InsertODMenuW(), CCJMenu::ModifyODMenuW(), and CCJMenu::NewODMenu().

UINT CCJMenuData::nFlags

Definition at line 59 of file CJMenu.h.

Referenced by CCJMenu::AddFromToolBar(), CCJMenu::AppendODMenuW(), CCJMenu::InsertODMenuW(), CCJMenu::ModifyODMenuW(), CCJMenu::NewODMenu(), and CCJMenu::SynchronizeMenu().

UINT CCJMenuData::nID

Definition at line 59 of file CJMenu.h.

Referenced by CCJMenu::AddFromToolBar(), CCJMenu::AppendODMenuW(), CCJMenu::InsertODMenuW(), CCJMenu::ModifyODMenuW(), and CCJMenu::NewODMenu().

UINT CCJMenuData::syncflag

Definition at line 59 of file CJMenu.h.

int CCJMenuData::xoffset

Definition at line 57 of file CJMenu.h.

Referenced by CCJMenu::AddFromToolBar(), CCJMenu::AppendODMenuW(), CCJMenu::InsertODMenuW(), CCJMenu::ModifyODMenuW(), and CCJMenu::NewODMenu().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMenu.h
  • WinCvs/CJLib/CJLibrary/CJMenu.cpp
Generated on Sat Aug 7 22:49:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMetaFileButton Class Reference

CCJMetaFileButton Class Reference

#include <CJMetaFileButton.h>

Inheritance diagram for CCJMetaFileButton:

[legend]
Collaboration diagram for CCJMetaFileButton:

[legend]
List of all members.

Public Member Functions

CCJMetaFileButton ()
virtual void | SetMetaFiles (HENHMETAFILE hMetaFile, HENHMETAFILE hMetaFileSel=NULL, HENHMETAFILE hMetaFileFocus=NULL, HENHMETAFILE hMetaFileDisabled=NULL)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual | ~CCJMetaFileButton ()

Protected Member Functions

afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Private Attributes

HENHMETAFILE | m_hEnhMetaFile
HENHMETAFILE | m_hEnhMetaFileSel
HENHMETAFILE | m_hEnhMetaFileFocus
HENHMETAFILE | m_hEnhMetaFileDisabled

Constructor & Destructor Documentation

CCJMetaFileButton::CCJMetaFileButton ( )

Definition at line 61 of file CJMetaFileButton.cpp.

00062 {
00063 }

CCJMetaFileButton::~CCJMetaFileButton ( ) [virtual]

Definition at line 65 of file CJMetaFileButton.cpp.

00066 {
00067 }

Member Function Documentation

void CCJMetaFileButton::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Definition at line 100 of file CJMetaFileButton.cpp.

References m_hEnhMetaFile, m_hEnhMetaFileDisabled, m_hEnhMetaFileFocus, m_hEnhMetaFileSel, and NULL.

00101 {
00102     ASSERT(lpDrawItemStruct != NULL);
00103
00104     // define some temporary variables.
00105     CDC*  pDC    = CDC::FromHandle( lpDrawItemStruct->hDC );
00106     CRect rcItem = lpDrawItemStruct->rcItem;
00107     int   nState = lpDrawItemStruct->itemState;
00108
00109     // Paint the background.
00110     pDC->FillSolidRect(rcItem, ::GetSysColor(COLOR_3DFACE));
00111
00112     // draw 3D button outline
00113     CPen penOutline(PS_SOLID, 1, GetSysColor(COLOR_BTNTEXT));
00114     CPen penLight(PS_SOLID, 1, GetSysColor(COLOR_BTNHIGHLIGHT));
00115     CPen penDark(PS_SOLID, 1, GetSysColor(COLOR_BTNSHADOW));
00116     CPen* pOldPen = NULL;
00117
00118     if (nState & ODS_SELECTED)
00119     {
00120         pOldPen = pDC->SelectObject(&penDark);
00121         pDC->MoveTo(0, rcItem.bottom - 1);
00122         pDC->LineTo(0, 1);
00123         pDC->LineTo(rcItem.right - 1, 1);
00124     }
00125     else
00126     {
00127         pOldPen = pDC->SelectObject(&penLight);
00128         pDC->MoveTo(0, rcItem.bottom - 2);
00129         pDC->LineTo(0, 1);
00130         pDC->LineTo(rcItem.right - 2, 1);
00131         pDC->SelectObject(&penDark);
00132         pDC->MoveTo(0, rcItem.bottom - 1);
00133         pDC->LineTo(rcItem.right - 2, rcItem.bottom - 1);
00134         pDC->LineTo(rcItem.right - 2, 0);
00135         pDC->MoveTo(1, rcItem.bottom - 2);
00136         pDC->LineTo(rcItem.right - 3, rcItem.bottom - 2);
00137         pDC->LineTo(rcItem.right - 3, 1);
00138     }
00139     pDC->SelectObject(&penOutline);
00140     pDC->MoveTo(0, 0);
00141     pDC->LineTo(rcItem.right - 1, 0);
00142     pDC->LineTo(rcItem.right - 1, rcItem.bottom);
00143
00144     HENHMETAFILE hMetaFile = m_hEnhMetaFile;
00145     if ((nState & ODS_SELECTED) && m_hEnhMetaFileSel != NULL)
00146         hMetaFile = m_hEnhMetaFileSel;
00147     else if ((nState & ODS_FOCUS) && m_hEnhMetaFileFocus != NULL)
00148         hMetaFile = m_hEnhMetaFileFocus;   // third image for focused
00149     else if ((nState & ODS_DISABLED) && m_hEnhMetaFileDisabled != NULL)
00150         hMetaFile = m_hEnhMetaFileDisabled;   // last image for disabled
00151
00152     ASSERT(hMetaFile != NULL);
00153
00154     CRect rcBounds(5,4,0,0);
00155     int iButtonHeight = rcItem.Height();
00156     if (iButtonHeight > 15)
00157         iButtonHeight = 15;
00158     else if (iButtonHeight < 11)
00159         iButtonHeight = 11;
00160     int iArrowWidth = (iButtonHeight / 2) - 3;
00161     rcBounds.right = rcBounds.left + iArrowWidth - 1;
00162     rcBounds.bottom = rcBounds.top + (iArrowWidth * 2) - 2;
00163
00164     if (nState & ODS_SELECTED)
00165         rcBounds += CPoint(1, 1);
00166     pDC->PlayMetaFile(hMetaFile, rcBounds);
00167
00168     // fix potential resource leak - KStowell - 10-21-99
00169     pDC->SelectObject(pOldPen);
00170     penOutline.DeleteObject();
00171     penLight.DeleteObject();
00172     penDark.DeleteObject();
00173 }

BOOL CCJMetaFileButton::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 175 of file CJMetaFileButton.cpp.

00176 {
00177     // KStowell - overridden for flicker-free drawing.
00178     UNUSED_ALWAYS(pDC);
00179     return TRUE;
00180 }

void CCJMetaFileButton::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 90 of file CJMetaFileButton.cpp.

References NULL.

00091 {
00092     // Fix for the double click problem with owner drawn buttons
00093     POINT pt;
00094     ::GetCursorPos(&pt);
00095     ::MapWindowPoints(NULL, (HWND)(m_hWnd), &pt, 1);
00096     ::SendMessage((HWND)(m_hWnd), WM_LBUTTONDOWN, 0, MAKELPARAM(pt.x, pt.y));
00097     CButton::OnLButtonDblClk(nFlags, point);
00098 }

void CCJMetaFileButton::OnPaint ( ) [protected]

Definition at line 182 of file CJMetaFileButton.cpp.

00183 {
00184     CPaintDC dc(this); // device context for painting
00185
00186     // KStowell - Get the client rect.
00187     CRect rcClient, rcClip;
00188     dc.GetClipBox( &rcClip );
00189     GetClientRect( &rcClient );
00190
00191     // KStowell - Create a memory device-context. This is done to help reduce
00192     // screen flicker, since we will paint the entire control to the
00193     // off screen device context first.
00194     CDC memDC;
00195     CBitmap bitmap;
00196     memDC.CreateCompatibleDC(&dc);
00197     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00198     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00199
00200     // KStowell - Repaint the background.
00201     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00202
00203     // let the control do its default drawing.
00204     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00205
00206     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00207     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00208         rcClip.left, rcClip.top, SRCCOPY );
00209
00210     // KStowell - Cleanup resources.
00211     memDC.SelectObject(pOldBitmap);
00212     memDC.DeleteDC();
00213     bitmap.DeleteObject();
00214 }

void CCJMetaFileButton::SetMetaFiles | ( | HENHMETAFILE | hMetaFile,
 |  | HENHMETAFILE | hMetaFileSel = NULL,
 |  | HENHMETAFILE | hMetaFileFocus = NULL,
 |  | HENHMETAFILE | hMetaFileDisabled = NULL
 | ) | [virtual]

Definition at line 69 of file CJMetaFileButton.cpp.

References m_hEnhMetaFile, m_hEnhMetaFileDisabled, m_hEnhMetaFileFocus, and m_hEnhMetaFileSel.

Referenced by CCJFlatTabCtrl::OnCreate().

00071 {
00072     m_hEnhMetaFile         = hMetaFile;
00073     m_hEnhMetaFileSel      = hMetaFileSel;
00074     m_hEnhMetaFileFocus    = hMetaFileFocus;
00075     m_hEnhMetaFileDisabled = hMetaFileDisabled;
00076 }

Member Data Documentation

HENHMETAFILE CCJMetaFileButton::m_hEnhMetaFile [private]

Definition at line 90 of file CJMetaFileButton.h.

Referenced by DrawItem(), and SetMetaFiles().

HENHMETAFILE CCJMetaFileButton::m_hEnhMetaFileDisabled [private]

Definition at line 93 of file CJMetaFileButton.h.

Referenced by DrawItem(), and SetMetaFiles().

HENHMETAFILE CCJMetaFileButton::m_hEnhMetaFileFocus [private]

Definition at line 92 of file CJMetaFileButton.h.

Referenced by DrawItem(), and SetMetaFiles().

HENHMETAFILE CCJMetaFileButton::m_hEnhMetaFileSel [private]

Definition at line 91 of file CJMetaFileButton.h.

Referenced by DrawItem(), and SetMetaFiles().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMetaFileButton.h
  • WinCvs/CJLib/CJLibrary/CJMetaFileButton.cpp
Generated on Sat Aug 7 22:49:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMiniDockFrameWnd Class Reference

CCJMiniDockFrameWnd Class Reference

#include <CJMiniDockFrameWnd.h>

Inheritance diagram for CCJMiniDockFrameWnd:

[legend]
Collaboration diagram for CCJMiniDockFrameWnd:

[legend]
List of all members.

Public Member Functions

CCJMiniDockFrameWnd ()
virtual | ~CCJMiniDockFrameWnd ()
virtual BOOL | Create (CWnd *pParent, DWORD dwBarStyle)

Protected Member Functions

afx_msg void | OnNcLButtonDown (UINT nHitTest, CPoint point)
afx_msg void | OnNcLButtonDblClk (UINT nHitTest, CPoint point)

Constructor & Destructor Documentation

CCJMiniDockFrameWnd::CCJMiniDockFrameWnd ( )

Definition at line 75 of file CJMiniDockFrameWnd.cpp.

00076 {
00077     // TODO: add construction code here.
00078 }

CCJMiniDockFrameWnd::~CCJMiniDockFrameWnd ( ) [virtual]

Definition at line 80 of file CJMiniDockFrameWnd.cpp.

00081 {
00082     // TODO: add destruction code here.
00083 }

Member Function Documentation

BOOL CCJMiniDockFrameWnd::Create | ( | CWnd * | pParent,
 |  | DWORD | dwBarStyle
 | ) | [virtual]

Definition at line 183 of file CJMiniDockFrameWnd.cpp.

00184 {
00185     // Let the base class do all the work.
00186     if (!CMiniDockFrameWnd::Create(pParent, dwBarStyle))
00187         return FALSE;
00188
00189     // remove the MFS_4THICKFRAME style to allow diagonal
00190     // resizing.
00191     ModifyStyle(MFS_4THICKFRAME, 0);
00192
00193     return TRUE;
00194 }

void CCJMiniDockFrameWnd::OnNcLButtonDblClk | ( | UINT | nHitTest,
 |  | CPoint | point
 | ) | [protected]

Definition at line 157 of file CJMiniDockFrameWnd.cpp.

References CCJSizeDockBar::GetDockedSizeBar(), and NULL.

00158 {
00159     if (nHitTest == HTCAPTION)
00160     {
00161         ActivateTopParent();
00162         CCJSizeDockBar * m_pSizeBar = (CCJSizeDockBar *)&m_wndDockBar;
00163
00164         if ((m_pSizeBar->m_dwStyle & CBRS_FLOAT_MULTI) == 0)
00165         {
00166             int nPos = 1;
00167             CControlBar* pBar = NULL;
00168             while(pBar == NULL && nPos < m_pSizeBar->m_arrBars.GetSize())
00169                 pBar = m_pSizeBar->GetDockedSizeBar(nPos++);
00170
00171             ASSERT(pBar != NULL);
00172             ASSERT_KINDOF(CControlBar, pBar);
00173             ASSERT(pBar->m_pDockContext != NULL);
00174
00175             if (pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar)))
00176                 pBar->m_pDockContext->ToggleDocking();
00177
00178             return;
00179         }
00180     }
00181 }

Here is the call graph for this function:

void CCJMiniDockFrameWnd::OnNcLButtonDown | ( | UINT | nHitTest,
 |  | CPoint | point
 | ) | [protected]

Definition at line 99 of file CJMiniDockFrameWnd.cpp.

References CCJSizeDockBar::GetDockedSizeBar(), and NULL.

00100 {
00101     CCJSizeDockBar *pSizeBar = (CCJSizeDockBar*)&m_wndDockBar;
00102
00103     if (nHitTest == HTCAPTION)
00104     {
00105         ActivateTopParent();
00106         if ((m_wndDockBar.m_dwStyle & CBRS_FLOAT_MULTI) == 0)
00107         {
00108             int nPos = 1;
00109             CControlBar* pBar = NULL;
00110             while(pBar == NULL && nPos < m_wndDockBar.m_arrBars.GetSize())
00111                 pBar = pSizeBar->GetDockedSizeBar(nPos++);
00112             ASSERT(pBar != NULL);
00113             ASSERT_KINDOF(CControlBar, pBar);
00114             ASSERT(pBar->m_pDockContext != NULL);
00115
00116             if (!pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar))) {
00117                 CMiniDockFrameWnd::OnNcLButtonDown(nHitTest,point);
00118                 return;
00119             }
00120
00121             //Yiannhs: This has to be fixed!! when the bar is floating
00122             //         and is over a visible dockbar, it arranges it inside
00123             //         the dock bar and does not drag, by just clicking on the caption
00124             ((CCJDockContext *)pBar->m_pDockContext)->StartDragDockBar(point);
00125             pBar->SetFocus();
00126             return;
00127         }
00128     }
00129
00130     else if (nHitTest >= HTSIZEFIRST && nHitTest <= HTSIZELAST)
00131     {
00132         ActivateTopParent();
00133         int nPos = 1;
00134         CControlBar* pBar = NULL;
00135         while(pBar == NULL && nPos < m_wndDockBar.m_arrBars.GetSize())
00136             pBar = pSizeBar->GetDockedSizeBar(nPos++);
00137
00138         ASSERT(pBar != NULL);
00139         ASSERT_KINDOF(CControlBar, pBar);
00140         ASSERT(pBar->m_pDockContext != NULL);
00141         ASSERT((m_wndDockBar.m_dwStyle & CBRS_FLOAT_MULTI) == 0);
00142
00143         if (!pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar))) {
00144             CMiniDockFrameWnd::OnNcLButtonDown(nHitTest,point);
00145             return;
00146         }
00147
00148         pBar->m_pDockContext->StartResize(nHitTest, point);
00149         return;
00150     }
00151
00152     else {  //Yiannhs
00153         CMiniFrameWnd::OnNcLButtonDown(nHitTest, point);
00154     }
00155 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMiniDockFrameWnd.h
  • WinCvs/CJLib/CJLibrary/CJMiniDockFrameWnd.cpp
Generated on Sat Aug 7 22:49:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJMonthCalCtrl Class Reference

CCJMonthCalCtrl Class Reference

#include <CJDateTimeCtrl.h>

Inheritance diagram for CCJMonthCalCtrl:

[legend]
Collaboration diagram for CCJMonthCalCtrl:

[legend]
List of all members.

Public Member Functions

CCJMonthCalCtrl ()
virtual | ~CCJMonthCalCtrl ()
BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)
BOOL | Create (DWORD dwStyle, const POINT &pt, CWnd *pParentWnd, UINT nID)
BOOL | GetMinReqRect (RECT *pRect) const
int | SetMonthDelta (int iDelta)
int | GetMonthDelta () const
BOOL | SetFirstDayOfWeek (int iDay, int *lpnOld=NULL)
int | GetFirstDayOfWeek (BOOL *pbLocal=NULL) const
COLORREF | GetColor (int nRegion) const
COLORREF | SetColor (int nRegion, COLORREF ref)
BOOL | SizeMinReq (BOOL bRepaint=TRUE)
void | SetToday (const COleDateTime &refDateTime)
void | SetToday (const CTime *pDateTime)
void | SetToday (const LPSYSTEMTIME pDateTime)
BOOL | GetToday (CTime &refTime) const
BOOL | GetToday (COleDateTime &refDateTime) const
BOOL | GetToday (LPSYSTEMTIME pDateTime) const
BOOL | GetCurSel (LPSYSTEMTIME pDateTime) const
BOOL | GetCurSel (CTime &refDateTime) const
BOOL | GetCurSel (COleDateTime &refDateTime) const
BOOL | SetCurSel (const LPSYSTEMTIME pDateTime)
BOOL | SetCurSel (const CTime &refDateTime)
BOOL | SetCurSel (const COleDateTime &refDateTime)
BOOL | SetDayState (int nMonths, LPMONTHDAYSTATE pStates)
BOOL | SetMaxSelCount (int nMax)
int | GetMaxSelCount () const
BOOL | SetRange (const COleDateTime *pMinRange, const COleDateTime *pMaxRange)
BOOL | SetRange (const CTime *pMinRange, const CTime *pMaxRange)
BOOL | SetRange (const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange)
DWORD | GetRange (COleDateTime *pMinRange, COleDateTime *pMaxRange) const
DWORD | GetRange (CTime *pMinRange, CTime *pMaxRange) const
DWORD | GetRange (LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const
int | GetMonthRange (COleDateTime &refMinRange, COleDateTime &refMaxRange, DWORD dwFlags) const
int | GetMonthRange (CTime &refMinRange, CTime &refMaxRange, DWORD dwFlags) const
int | GetMonthRange (LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange, DWORD dwFlags) const
BOOL | SetSelRange (const COleDateTime &pMinRange, const COleDateTime &pMaxRange)
BOOL | SetSelRange (const CTime &pMinRange, const CTime &pMaxRange)
BOOL | SetSelRange (const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange)
BOOL | GetSelRange (COleDateTime &refMinRange, COleDateTime &refMaxRange) const
BOOL | GetSelRange (CTime &refMinRange, CTime &refMaxRange) const
BOOL | GetSelRange (LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const
DWORD | HitTest (PMCHITTESTINFO pMCHitTest)

Constructor & Destructor Documentation

_CJXLIB_INLINE CCJMonthCalCtrl::CCJMonthCalCtrl ( )

Definition at line 781 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00782     { }

CCJMonthCalCtrl::~CCJMonthCalCtrl ( ) [virtual]

Definition at line 659 of file CJDateTimeCtrl.cpp.

00660 {
00661     DestroyWindow();
00662 }

Member Function Documentation

BOOL CCJMonthCalCtrl::Create | ( | DWORD | dwStyle,
 |  | const POINT & | pt,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) |

Definition at line 468 of file CJDateTimeCtrl.cpp.

References Create(), and SizeMinReq().

00470 {
00471     BOOL bWasVisible = (dwStyle & WS_VISIBLE);
00472     dwStyle &= ~WS_VISIBLE;
00473
00474     CRect rect(pt.x, pt.y, 0, 0);
00475
00476     BOOL bRetVal = FALSE;
00477    if (Create(dwStyle, rect, pParentWnd, nID))
00478     {
00479         if (SizeMinReq())
00480         {
00481             if (bWasVisible)
00482                 ShowWindow(SW_SHOWNA);
00483             bRetVal = TRUE;
00484         }
00485         else
00486             DestroyWindow();
00487     }
00488
00489     return bRetVal;
00490 }

Here is the call graph for this function:

BOOL CCJMonthCalCtrl::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) |

Definition at line 451 of file CJDateTimeCtrl.cpp.

References NULL.

Referenced by Create().

00453 {
00454     // initialize common controls
00455 #ifdef _VC_VERSION_5
00456     INITCOMMONCONTROLSEX icex;
00457     icex.dwSize = sizeof(icex);
00458     icex.dwICC = ICC_DATE_CLASSES;
00459     VERIFY(InitCommonControlsEx(&icex));
00460 #else
00461     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_DATE_REG));
00462 #endif
00463
00464     CWnd* pWnd = this;
00465     return pWnd->Create(MONTHCAL_CLASS, NULL, dwStyle, rect, pParentWnd, nID);
00466 }

_CJXLIB_INLINE COLORREF CCJMonthCalCtrl::GetColor ( int nRegion ) const

Definition at line 791 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00792     { ASSERT(m_hWnd != NULL); return (COLORREF) ::SendMessage(m_hWnd, MCM_GETCOLOR, (WPARAM) nRegion, 0); }

BOOL CCJMonthCalCtrl::GetCurSel ( COleDateTime & refDateTime ) const

Definition at line 591 of file CJDateTimeCtrl.cpp.

00592 {
00593     ASSERT(::IsWindow(m_hWnd));
00594
00595     // can't use this method on multiple selection controls
00596     ASSERT(!(GetStyle() & MCS_MULTISELECT));
00597
00598     SYSTEMTIME sysTime;
00599     BOOL bResult = (BOOL)
00600         ::SendMessage(m_hWnd, MCM_GETCURSEL, 0, (LPARAM) &sysTime);
00601
00602     if (bResult)
00603         refTime = COleDateTime(sysTime);
00604
00605     return bResult;
00606 }

BOOL CCJMonthCalCtrl::GetCurSel ( CTime & refDateTime ) const

Definition at line 625 of file CJDateTimeCtrl.cpp.

00626 {
00627     ASSERT(::IsWindow(m_hWnd));
00628
00629     // can't use this method on multiple selection controls
00630     ASSERT(!(GetStyle() & MCS_MULTISELECT));
00631
00632     SYSTEMTIME sysTime;
00633     BOOL bResult = (BOOL)
00634         ::SendMessage(m_hWnd, MCM_GETCURSEL, 0, (LPARAM) &sysTime);
00635
00636     if (bResult)
00637         refTime = CTime(sysTime);
00638
00639     return bResult;
00640 }

_CJXLIB_INLINE BOOL CCJMonthCalCtrl::GetCurSel ( LPSYSTEMTIME pDateTime ) const

Definition at line 805 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

Referenced by DDX_CJMonthCalCtrl().

00806     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETCURSEL, 0, (LPARAM) pDateTime); }

int CCJMonthCalCtrl::GetFirstDayOfWeek ( BOOL * pbLocal = NULL ) const

Definition at line 664 of file CJDateTimeCtrl.cpp.

00665 {
00666     ASSERT(::IsWindow(m_hWnd));
00667     DWORD dwResult;
00668     dwResult = (DWORD) ::SendMessage(m_hWnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
00669
00670     // set *pbLocal to reflect if the first day of week
00671     // matches current locale setting
00672
00673     if (pbLocal)
00674         *pbLocal = HIWORD(dwResult);
00675     return LOWORD(dwResult);
00676 }

_CJXLIB_INLINE int CCJMonthCalCtrl::GetMaxSelCount ( ) const

Definition at line 797 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00798     { ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_GETMAXSELCOUNT, 0, 0); }

_CJXLIB_INLINE BOOL CCJMonthCalCtrl::GetMinReqRect ( RECT * pRect ) const

Definition at line 785 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

Referenced by SizeMinReq().

00786     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETMINREQRECT, 0, (LPARAM) pRect); }

_CJXLIB_INLINE int CCJMonthCalCtrl::GetMonthDelta ( ) const

Definition at line 789 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00790     { ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_GETMONTHDELTA, 0, 0); }

int CCJMonthCalCtrl::GetMonthRange | ( | LPSYSTEMTIME | pMinRange,
 |  | LPSYSTEMTIME | pMaxRange,
 |  | DWORD | dwFlags
 | ) | const

Definition at line 839 of file CJDateTimeCtrl.cpp.

00841 {
00842     ASSERT(::IsWindow(m_hWnd));
00843     ASSERT_POINTER(pMinRange, SYSTEMTIME);
00844     ASSERT_POINTER(pMaxRange, SYSTEMTIME);
00845
00846     SYSTEMTIME sysTimes[2];
00847
00848     int nCount = (int) ::SendMessage(m_hWnd, MCM_GETMONTHRANGE,
00849         (WPARAM) dwFlags, (LPARAM) &sysTimes);
00850
00851     memcpy(pMinRange, &sysTimes[0], sizeof(SYSTEMTIME));
00852     memcpy(pMaxRange, &sysTimes[1], sizeof(SYSTEMTIME));
00853
00854     return nCount;
00855 }

int CCJMonthCalCtrl::GetMonthRange | ( | CTime & | refMinRange,
 |  | CTime & | refMaxRange,
 |  | DWORD | dwFlags
 | ) | const

Definition at line 857 of file CJDateTimeCtrl.cpp.

00859 {
00860     ASSERT(::IsWindow(m_hWnd));
00861     ASSERT(dwFlags == GMR_DAYSTATE || dwFlags == GMR_VISIBLE);
00862
00863     SYSTEMTIME sysTimes[2];
00864     memset(sysTimes, 0, sizeof(sysTimes));
00865     int nCount = (int) ::SendMessage(m_hWnd, MCM_GETMONTHRANGE,
00866         (WPARAM) dwFlags,   (LPARAM) &sysTimes);
00867
00868     refMinRange = CTime(sysTimes[0]);
00869     refMaxRange = CTime(sysTimes[1]);
00870
00871     return nCount;
00872 }

int CCJMonthCalCtrl::GetMonthRange | ( | COleDateTime & | refMinRange,
 |  | COleDateTime & | refMaxRange,
 |  | DWORD | dwFlags
 | ) | const

Definition at line 822 of file CJDateTimeCtrl.cpp.

00824 {
00825     ASSERT(::IsWindow(m_hWnd));
00826     ASSERT(dwFlags == GMR_DAYSTATE || dwFlags == GMR_VISIBLE);
00827
00828     SYSTEMTIME sysTimes[2];
00829     memset(sysTimes, 0, sizeof(sysTimes));
00830     int nCount = (int) ::SendMessage(m_hWnd, MCM_GETMONTHRANGE,
00831         (WPARAM) dwFlags, (LPARAM) &sysTimes);
00832
00833     refMinRange = COleDateTime(sysTimes[0]);
00834     refMaxRange = COleDateTime(sysTimes[1]);
00835
00836     return nCount;
00837 }

DWORD CCJMonthCalCtrl::GetRange | ( | LPSYSTEMTIME | pMinRange,
 |  | LPSYSTEMTIME | pMaxRange
 | ) | const

Definition at line 767 of file CJDateTimeCtrl.cpp.

00769 {
00770     ASSERT(::IsWindow(m_hWnd));
00771
00772     SYSTEMTIME sysTimes[2];
00773     memset(sysTimes, 0, sizeof(sysTimes));
00774
00775     DWORD dwRanges = (DWORD)
00776         ::SendMessage(m_hWnd, MCM_GETRANGE, 0, (LPARAM) &sysTimes);
00777
00778     if (dwRanges & GDTR_MIN && pMinRange)
00779         memcpy(pMinRange, &sysTimes[0], sizeof(SYSTEMTIME));
00780
00781     if (dwRanges & GDTR_MAX && pMaxRange)
00782         memcpy(pMaxRange, &sysTimes[1], sizeof(SYSTEMTIME));
00783
00784     return dwRanges;
00785 }

DWORD CCJMonthCalCtrl::GetRange | ( | CTime * | pMinRange,
 |  | CTime * | pMaxRange
 | ) | const

Definition at line 803 of file CJDateTimeCtrl.cpp.

00804 {
00805     ASSERT(::IsWindow(m_hWnd));
00806
00807     SYSTEMTIME sysTimes[2];
00808     memset(sysTimes, 0, sizeof(sysTimes));
00809
00810     DWORD dwRanges = (DWORD)
00811         ::SendMessage(m_hWnd, MCM_GETRANGE, 0, (LPARAM) &sysTimes);
00812
00813     if (dwRanges & GDTR_MIN && pMinRange)
00814         *pMinRange = CTime(sysTimes[0]);
00815
00816     if (dwRanges & GDTR_MAX && pMaxRange)
00817         *pMaxRange = CTime(sysTimes[1]);
00818
00819     return dwRanges;
00820 }

DWORD CCJMonthCalCtrl::GetRange | ( | COleDateTime * | pMinRange,
 |  | COleDateTime * | pMaxRange
 | ) | const

Definition at line 747 of file CJDateTimeCtrl.cpp.

00749 {
00750     ASSERT(::IsWindow(m_hWnd));
00751
00752     SYSTEMTIME sysTimes[2];
00753     memset(sysTimes, 0, sizeof(sysTimes));
00754
00755     DWORD dwRanges = (DWORD)
00756         ::SendMessage(m_hWnd, MCM_GETRANGE, 0, (LPARAM) &sysTimes);
00757
00758     if (dwRanges & GDTR_MIN && pMinRange)
00759         *pMinRange = COleDateTime(sysTimes[0]);
00760
00761     if (dwRanges & GDTR_MAX && pMaxRange)
00762         *pMaxRange = COleDateTime(sysTimes[1]);
00763
00764     return dwRanges;
00765 }

BOOL CCJMonthCalCtrl::GetSelRange | ( | LPSYSTEMTIME | pMinRange,
 |  | LPSYSTEMTIME | pMaxRange
 | ) | const

Definition at line 874 of file CJDateTimeCtrl.cpp.

References NULL.

00876 {
00877     ASSERT(m_hWnd != NULL);
00878     ASSERT((GetStyle() & MCS_MULTISELECT));
00879
00880     ASSERT_POINTER(pMinRange, SYSTEMTIME);
00881     ASSERT_POINTER(pMaxRange, SYSTEMTIME);
00882
00883     SYSTEMTIME sysTimes[2];
00884     BOOL bReturn = (BOOL) ::SendMessage(m_hWnd, MCM_GETSELRANGE,
00885                                         0, (LPARAM) &sysTimes);
00886
00887     if (bReturn)
00888     {
00889         memcpy(pMinRange, &sysTimes[0], sizeof(SYSTEMTIME));
00890         memcpy(pMaxRange, &sysTimes[1], sizeof(SYSTEMTIME));
00891     }
00892
00893     return bReturn;
00894 }

BOOL CCJMonthCalCtrl::GetSelRange | ( | CTime & | refMinRange,
 |  | CTime & | refMaxRange
 | ) | const

Definition at line 977 of file CJDateTimeCtrl.cpp.

00978 {
00979     // control must have multiple select
00980     ASSERT((GetStyle() & MCS_MULTISELECT));
00981     ASSERT(::IsWindow(m_hWnd));
00982
00983     SYSTEMTIME sysTimes[2];
00984     memset(sysTimes, 0, sizeof(sysTimes));
00985     BOOL bResult = (BOOL)
00986         ::SendMessage(m_hWnd, MCM_GETSELRANGE, 0, (LPARAM) &sysTimes);
00987
00988     if (bResult)
00989     {
00990         refMinRange = CTime(sysTimes[0]);
00991         refMaxRange = CTime(sysTimes[1]);
00992     }
00993     return bResult;
00994 }

BOOL CCJMonthCalCtrl::GetSelRange | ( | COleDateTime & | refMinRange,
 |  | COleDateTime & | refMaxRange
 | ) | const

Definition at line 937 of file CJDateTimeCtrl.cpp.

00939 {
00940     // control must have multiple select
00941     ASSERT((GetStyle() & MCS_MULTISELECT));
00942     ASSERT(::IsWindow(m_hWnd));
00943
00944     SYSTEMTIME sysTimes[2];
00945     memset(sysTimes, 0, sizeof(sysTimes));
00946     BOOL bResult = (BOOL)
00947         ::SendMessage(m_hWnd, MCM_GETSELRANGE, 0, (LPARAM) &sysTimes);
00948
00949     if (bResult)
00950     {
00951         refMinRange = COleDateTime(sysTimes[0]);
00952         refMaxRange = COleDateTime(sysTimes[1]);
00953     }
00954     return bResult;
00955 }

_CJXLIB_INLINE BOOL CCJMonthCalCtrl::GetToday ( LPSYSTEMTIME pDateTime ) const

Definition at line 801 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00802     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETTODAY, 0, (LPARAM) pDateTime); }

BOOL CCJMonthCalCtrl::GetToday ( COleDateTime & refDateTime ) const

Definition at line 608 of file CJDateTimeCtrl.cpp.

00609 {
00610     ASSERT(::IsWindow(m_hWnd));
00611
00612     // can't use this method on multiple selection controls
00613     ASSERT(!(GetStyle() & MCS_MULTISELECT));
00614
00615     SYSTEMTIME sysTime;
00616     BOOL bResult = (BOOL)
00617         ::SendMessage(m_hWnd, MCM_GETTODAY, 0, (LPARAM) &sysTime);
00618
00619     if (bResult)
00620         refTime = COleDateTime(sysTime);
00621
00622     return bResult;
00623 }

BOOL CCJMonthCalCtrl::GetToday ( CTime & refTime ) const

Definition at line 642 of file CJDateTimeCtrl.cpp.

00643 {
00644     ASSERT(::IsWindow(m_hWnd));
00645
00646     // can't use this method on multiple selection controls
00647     ASSERT(!(GetStyle() & MCS_MULTISELECT));
00648
00649     SYSTEMTIME sysTime;
00650     BOOL bResult = (BOOL)
00651         ::SendMessage(m_hWnd, MCM_GETTODAY, 0, (LPARAM) &sysTime);
00652
00653     if (bResult)
00654         refTime = CTime(sysTime);
00655
00656     return bResult;
00657 }

_CJXLIB_INLINE DWORD CCJMonthCalCtrl::HitTest ( PMCHITTESTINFO pMCHitTest )

Definition at line 783 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE.

00784     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, MCM_HITTEST, 0, (LPARAM) pMCHitTest); }

_CJXLIB_INLINE COLORREF CCJMonthCalCtrl::SetColor | ( | int | nRegion,
 |  | COLORREF | ref
 | ) |

Definition at line 793 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00794     { ASSERT(m_hWnd != NULL); return (COLORREF) ::SendMessage(m_hWnd, MCM_SETCOLOR, (WPARAM) nRegion, (LPARAM) ref); }

BOOL CCJMonthCalCtrl::SetCurSel ( const COleDateTime & refDateTime )

Definition at line 555 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime().

00556 {
00557     ASSERT(::IsWindow(m_hWnd));
00558
00559     SYSTEMTIME sysTime;
00560     BOOL bRetVal = FALSE;
00561
00562     // if the passed time is null or out of range,
00563     // we'll set the control to NULL
00564
00565     if (GetAsSystemTime(refTime, sysTime) &&
00566         refTime.GetStatus() == COleDateTime::valid)
00567     {
00568         bRetVal = (BOOL)
00569             ::SendMessage(m_hWnd, MCM_SETCURSEL, 0, (LPARAM) &sysTime);
00570     }
00571
00572     return bRetVal;
00573 }

Here is the call graph for this function:

BOOL CCJMonthCalCtrl::SetCurSel ( const CTime & refDateTime )

Definition at line 575 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime().

00576 {
00577     ASSERT(::IsWindow(m_hWnd));
00578
00579     SYSTEMTIME sysTime;
00580     BOOL bRetVal = FALSE;
00581
00582     if (GetAsSystemTime(refTime, sysTime))
00583     {
00584         bRetVal = (BOOL)
00585             ::SendMessage(m_hWnd, MCM_SETCURSEL, 0, (LPARAM) &sysTime);
00586     }
00587
00588     return bRetVal;
00589 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJMonthCalCtrl::SetCurSel ( const LPSYSTEMTIME pDateTime )

Definition at line 803 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

Referenced by DDX_CJMonthCalCtrl().

00804     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_SETCURSEL, 0, (LPARAM) pDateTime); }

BOOL CCJMonthCalCtrl::SetDayState | ( | int | nMonths,
 |  | LPMONTHDAYSTATE | pStates
 | ) |

Definition at line 690 of file CJDateTimeCtrl.cpp.

00691 {
00692     ASSERT(::IsWindow(m_hWnd));
00693     ASSERT(AfxIsValidAddress(pStates, nMonths * sizeof(MONTHDAYSTATE), FALSE));
00694     return (BOOL) ::SendMessage(m_hWnd, MCM_SETDAYSTATE, (WPARAM) nMonths, (LPARAM) pStates);
00695 }

BOOL CCJMonthCalCtrl::SetFirstDayOfWeek | ( | int | iDay,
 |  | int * | lpnOld = NULL
 | ) |

Definition at line 678 of file CJDateTimeCtrl.cpp.

References NULL.

00679 {
00680     ASSERT(::IsWindow(m_hWnd));
00681     DWORD dwResult;
00682     dwResult = (DWORD) ::SendMessage(m_hWnd, MCM_SETFIRSTDAYOFWEEK, 0, (WPARAM) iDay);
00683
00684     if (lpnOld != NULL)
00685         *lpnOld = LOWORD(dwResult);
00686
00687     return (BOOL) HIWORD(dwResult);
00688 }

_CJXLIB_INLINE BOOL CCJMonthCalCtrl::SetMaxSelCount ( int nMax )

Definition at line 795 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00796     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_SETMAXSELCOUNT, nMax, 0); }

_CJXLIB_INLINE int CCJMonthCalCtrl::SetMonthDelta ( int iDelta )

Definition at line 787 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00788     { ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_SETMONTHDELTA, (WPARAM) iDelta, 0); }

BOOL CCJMonthCalCtrl::SetRange | ( | const LPSYSTEMTIME | pMinRange,
 |  | const LPSYSTEMTIME | pMaxRange
 | ) |

Definition at line 723 of file CJDateTimeCtrl.cpp.

References NULL.

00725 {
00726     ASSERT(::IsWindow(m_hWnd));
00727
00728     SYSTEMTIME sysTimes[2];
00729     WPARAM wFlags = 0;
00730
00731     if (pMinRange != NULL)
00732     {
00733         memcpy(&sysTimes[0], pMinRange, sizeof(SYSTEMTIME));
00734         wFlags |= GDTR_MIN;
00735     }
00736
00737     if (pMaxRange != NULL)
00738     {
00739         memcpy(&sysTimes[1], pMaxRange, sizeof(SYSTEMTIME));
00740         wFlags |= GDTR_MAX;
00741     }
00742
00743     return (BOOL)
00744         ::SendMessage(m_hWnd, MCM_SETRANGE, wFlags, (LPARAM) &sysTimes);
00745 }

BOOL CCJMonthCalCtrl::SetRange | ( | const CTime * | pMinRange,
 |  | const CTime * | pMaxRange
 | ) |

Definition at line 787 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime(), and NULL.

00788 {
00789     ASSERT(::IsWindow(m_hWnd));
00790
00791     SYSTEMTIME sysTimes[2];
00792     WPARAM wFlags = 0;
00793     if (pMinRange != NULL && GetAsSystemTime(pMinRange, sysTimes[0]))
00794         wFlags |= GDTR_MIN;
00795
00796     if (pMaxRange != NULL && GetAsSystemTime(pMaxRange, sysTimes[1]))
00797         wFlags |= GDTR_MAX;
00798
00799     return (BOOL)
00800         ::SendMessage(m_hWnd, MCM_SETRANGE, wFlags, (LPARAM) &sysTimes);
00801 }

Here is the call graph for this function:

BOOL CCJMonthCalCtrl::SetRange | ( | const COleDateTime * | pMinRange,
 |  | const COleDateTime * | pMaxRange
 | ) |

Definition at line 697 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime(), and NULL.

Referenced by DDV_CJMinMaxMonth().

00699 {
00700     ASSERT(::IsWindow(m_hWnd));
00701     ASSERT(pMinRange == NULL || pMinRange->GetStatus() != COleDateTime::invalid);
00702     ASSERT(pMaxRange == NULL || pMaxRange->GetStatus() != COleDateTime::invalid);
00703
00704     SYSTEMTIME sysTimes[2];
00705     WPARAM wFlags = 0;
00706
00707     if (pMinRange != NULL && pMinRange->GetStatus() != COleDateTime::null)
00708     {
00709         if (GetAsSystemTime(pMinRange, sysTimes[0]))
00710             wFlags |= GDTR_MIN;
00711     }
00712
00713     if (pMaxRange != NULL && pMaxRange->GetStatus() != COleDateTime::null)
00714     {
00715         if (GetAsSystemTime(pMaxRange, sysTimes[1]))
00716             wFlags |= GDTR_MAX;
00717     }
00718
00719     return (BOOL)
00720         ::SendMessage(m_hWnd, MCM_SETRANGE, wFlags, (LPARAM) &sysTimes);
00721 }

Here is the call graph for this function:

BOOL CCJMonthCalCtrl::SetSelRange | ( | const LPSYSTEMTIME | pMinRange,
 |  | const LPSYSTEMTIME | pMaxRange
 | ) |

Definition at line 896 of file CJDateTimeCtrl.cpp.

References NULL.

00898 {
00899     ASSERT(m_hWnd != NULL);
00900     ASSERT((GetStyle() & MCS_MULTISELECT));
00901
00902     ASSERT_POINTER(pMinRange, SYSTEMTIME);
00903     ASSERT_POINTER(pMaxRange, SYSTEMTIME);
00904
00905     SYSTEMTIME sysTimes[2];
00906     memcpy(&sysTimes[0], pMinRange, sizeof(SYSTEMTIME));
00907     memcpy(&sysTimes[1], pMaxRange, sizeof(SYSTEMTIME));
00908
00909     return (BOOL) ::SendMessage(m_hWnd, MCM_SETSELRANGE,
00910         0, (LPARAM) &sysTimes);
00911 }

BOOL CCJMonthCalCtrl::SetSelRange | ( | const CTime & | pMinRange,
 |  | const CTime & | pMaxRange
 | ) |

Definition at line 957 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime().

00959 {
00960     // control must have multiple select
00961     ASSERT((GetStyle() & MCS_MULTISELECT));
00962     ASSERT(::IsWindow(m_hWnd));
00963
00964     SYSTEMTIME sysTimes[2];
00965     BOOL bResult = FALSE;
00966
00967     if (GetAsSystemTime(refMinRange, sysTimes[0]) &&
00968         GetAsSystemTime(refMaxRange, sysTimes[1]))
00969     {
00970         bResult = (BOOL)
00971             ::SendMessage(m_hWnd, MCM_SETSELRANGE, 0, (LPARAM)sysTimes);
00972     }
00973
00974     return bResult;
00975 }

Here is the call graph for this function:

BOOL CCJMonthCalCtrl::SetSelRange | ( | const COleDateTime & | pMinRange,
 |  | const COleDateTime & | pMaxRange
 | ) |

Definition at line 913 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime().

00915 {
00916     // control must have multiple select
00917     ASSERT((GetStyle() & MCS_MULTISELECT));
00918     ASSERT(::IsWindow(m_hWnd));
00919
00920     SYSTEMTIME sysTimes[2];
00921     BOOL bResult = FALSE;
00922
00923     if (refMinRange.GetStatus() == COleDateTime::valid &&
00924         refMinRange.GetStatus() == COleDateTime::valid)
00925     {
00926         if (GetAsSystemTime(refMinRange, sysTimes[0]) &&
00927             GetAsSystemTime(refMaxRange, sysTimes[1]))
00928         {
00929             bResult = (BOOL)
00930                 ::SendMessage(m_hWnd, MCM_SETSELRANGE, 0, (LPARAM)sysTimes);
00931         }
00932     }
00933
00934     return bResult;
00935 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJMonthCalCtrl::SetToday ( const LPSYSTEMTIME pDateTime )

Definition at line 799 of file CJDateTimeCtrl.h.

References _CJXLIB_INLINE, and NULL.

00800     { ASSERT(m_hWnd != NULL); ::SendMessage(m_hWnd, MCM_SETTODAY, 0, (LPARAM) pDateTime); }

void CCJMonthCalCtrl::SetToday ( const CTime * pDateTime )

Definition at line 533 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime(), and NULL.

00534 {
00535     ASSERT(::IsWindow(m_hWnd));
00536     ASSERT_VALID(this);
00537
00538     // if the passed time is NULL, we'll set the
00539     // control to NULL
00540
00541     WPARAM wParam = GDT_NONE;
00542     LPSYSTEMTIME pSysTime = NULL;
00543     SYSTEMTIME sysTime;
00544
00545     if (pDateTime != NULL && GetAsSystemTime(pDateTime, sysTime))
00546     {
00547         wParam = GDT_VALID;
00548         pSysTime = &sysTime;
00549     }
00550
00551     if (::IsWindow(m_hWnd))
00552         ::SendMessage(m_hWnd, MCM_SETTODAY, wParam, (LPARAM) pSysTime);
00553 }

Here is the call graph for this function:

void CCJMonthCalCtrl::SetToday ( const COleDateTime & refDateTime )

Definition at line 508 of file CJDateTimeCtrl.cpp.

References GetAsSystemTime(), and NULL.

00509 {
00510     ASSERT_VALID(this);
00511
00512     // make sure the time isn't invalid
00513     ASSERT(refTime.GetStatus() != COleDateTime::invalid);
00514     ASSERT(::IsWindow(m_hWnd));
00515
00516     SYSTEMTIME sysTime;
00517     LPSYSTEMTIME pSysTime = NULL;
00518     WPARAM wParam = GDT_NONE;
00519
00520     // if the passed time is null or out of range,
00521     // we'll set the control to NULL
00522
00523     if (GetAsSystemTime(refTime, sysTime))
00524     {
00525         pSysTime = &sysTime;
00526         wParam = GDT_VALID;
00527     }
00528
00529     if (::IsWindow(m_hWnd))
00530         ::SendMessage(m_hWnd, MCM_SETTODAY, wParam, (LPARAM) pSysTime);
00531 }

Here is the call graph for this function:

BOOL CCJMonthCalCtrl::SizeMinReq ( BOOL bRepaint = TRUE )

Definition at line 492 of file CJDateTimeCtrl.cpp.

References GetMinReqRect(), and NULL.

Referenced by Create().

00493 {
00494     CRect rect;
00495     BOOL bRetVal = FALSE;
00496     if (GetMinReqRect(rect))
00497     {
00498         DWORD dwFlags = SWP_NOZORDER | SWP_NOREPOSITION | SWP_NOMOVE | SWP_NOACTIVATE;
00499         if (!bRepaint)
00500             dwFlags |= SWP_NOREDRAW;
00501         SetWindowPos(NULL, 0, 0, rect.Width(), rect.Height(), dwFlags);
00502         bRetVal = TRUE;
00503     }
00504
00505     return bRetVal;
00506 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJDateTimeCtrl.h
  • WinCvs/CJLib/CJLibrary/CJDateTimeCtrl.cpp
Generated on Sat Aug 7 22:49:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJOutlookBar Class Reference

CCJOutlookBar Class Reference

#include <CJOutlookBar.h>

Inheritance diagram for CCJOutlookBar:

[legend]
Collaboration diagram for CCJOutlookBar:

[legend]
List of all members.

Public Member Functions

CCJOutlookBar ()
virtual | ~CCJOutlookBar ()
virtual void | SetImageLists (CImageList *pImageListSmall=NULL, CImageList *pImageListLarge=NULL)
virtual void | SetItems (CContentItems *pItems, int nNumItems)
virtual void | SetOwner (CWnd *pWnd)
virtual void | UpdateFont ()
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMeasureItemStruct)

Protected Member Functions

afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnTimer (UINT nIDEvent)
afx_msg void | OnPaint ()
afx_msg void | OnSysColorChange ()

Protected Attributes

CWnd * | m_pOwner
CPoint | m_point
CImageList * | m_pImageListLarge
CImageList * | m_pImageListSmall
CContentItems * m_pContents
int m_nNumItems
int m_nIndex
bool m_bHilight
bool m_bLBDown
CFont | m_Font
COLORREF | m_clrHilite
COLORREF | m_clrShadow
COLORREF | m_clrDkShad
COLORREF | m_clrNormal
COLORREF | m_clrTextNm

Constructor & Destructor Documentation

CCJOutlookBar::CCJOutlookBar ( )

Definition at line 84 of file CJOutlookBar.cpp.

References m_bHilight, m_bLBDown, m_clrDkShad, m_clrHilite, m_clrNormal, m_clrShadow, m_clrTextNm, m_pImageListLarge, m_pImageListSmall, m_pOwner, NULL, and UpdateFont().

00085 {
00086     m_bLBDown           = false;
00087     m_bHilight          = true;
00088     m_pImageListLarge   = NULL;
00089     m_pImageListSmall   = NULL;
00090     m_pOwner            = NULL;
00091     m_clrHilite         = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00092     m_clrShadow         = ::GetSysColor(COLOR_BTNSHADOW);
00093     m_clrDkShad         = ::GetSysColor(COLOR_3DDKSHADOW);
00094     m_clrNormal         = ::GetSysColor(COLOR_BTNFACE);
00095     m_clrTextNm         = ::GetSysColor(COLOR_WINDOW);
00096
00097     UpdateFont();
00098 }

Here is the call graph for this function:

CCJOutlookBar::~CCJOutlookBar ( ) [virtual]

Definition at line 100 of file CJOutlookBar.cpp.

References m_Font.

00101 {
00102     // fix potential resource leak - KStowell - 10-22-99.
00103     m_Font.DeleteObject();
00104 }

Member Function Documentation

void CCJOutlookBar::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Definition at line 194 of file CJOutlookBar.cpp.

References CContentItems::GetImageID(), CContentItems::GetText(), m_bHilight, m_bLBDown, m_clrDkShad, m_clrNormal, m_clrShadow, m_clrTextNm, m_Font, m_pContents, and m_pImageListLarge.

00195 {
00196     CDC*            pDC = CDC::FromHandle( lpDrawItemStruct->hDC );
00197     CRect           rcItem(lpDrawItemStruct->rcItem);
00198     CRect           rClient(rcItem);
00199     CRect           rText;
00200     CPoint          Pt(((rcItem.Width() - 32) /2 ), rcItem.top + 15);
00201     CContentItems   pContents = m_pContents[ lpDrawItemStruct->itemID ];
00202     HICON           hIcon = m_pImageListLarge->ExtractIcon( pContents.GetImageID());
00203
00204     pDC->SetBkColor(m_clrShadow);
00205
00206     // deflate the client rect, and set up item and
00207     // text rect's.
00208     rClient.DeflateRect( 8, 5 );
00209     rcItem.CopyRect( rClient );
00210     rText.CopyRect( rClient );
00211     rText.top += 45;
00212     rText.bottom += 10;
00213
00214     // set the text color to white, and background mode
00215     // to transparent.
00216     pDC->SetTextColor( m_clrTextNm );
00217     pDC->SetBkMode( TRANSPARENT );
00218     CFont* pOldFont = pDC->SelectObject(&m_Font);
00219
00220     // draw the button icon and text.
00221     if( lpDrawItemStruct->itemAction& ODA_DRAWENTIRE ) {
00222         pDC->DrawIcon( Pt, hIcon );
00223         pDC->DrawText( pContents.GetText(), rText, DT_CENTER | DT_WORDBREAK );
00224     }
00225
00226     // if the left mouse button is pressed, offset
00227     // the button icon.
00228     if( m_bLBDown ) {
00229         Pt.x += 2;
00230         Pt.y += 2;
00231         rcItem.OffsetRect( 2, 2 );
00232     }
00233
00234     // deflate the button rect, and move up.
00235     rcItem.DeflateRect( 4, 16 );
00236     rcItem.top -= 8;
00237
00238     // Draw the button icon and text, if the mouse is over the
00239     // button, draw the 3d rect, either pressed,
00240     // or not pressed depending on left mouse button.
00241     if(( lpDrawItemStruct->itemState& ODS_SELECTED ) &&
00242         ( lpDrawItemStruct->itemAction& ( ODA_SELECT | ODA_DRAWENTIRE ))) {
00243
00244         rcItem.left = ( rcItem.Width()/2 )-5;
00245         rcItem.right = rcItem.left+37;
00246
00247         if( m_bHilight ) {
00248             if( m_bLBDown ) {
00249               pDC->Draw3dRect( rcItem, m_clrDkShad, m_clrNormal );
00250             } else {
00251               pDC->Draw3dRect( rcItem, m_clrNormal, m_clrDkShad );
00252             }
00253         }
00254
00255         pDC->DrawIcon( Pt, hIcon );
00256         pDC->DrawText( pContents.GetText(), rText, DT_CENTER | DT_WORDBREAK );
00257     }
00258
00259     if( !( lpDrawItemStruct->itemState& ODS_SELECTED ) &&
00260         ( lpDrawItemStruct->itemAction& ODA_SELECT )) {
00261         pDC->FillSolidRect( rClient, m_clrShadow );
00262         pDC->DrawIcon(Pt, hIcon);
00263         pDC->DrawText(pContents.GetText(), rText, DT_CENTER|DT_WORDBREAK);
00264     }
00265
00266     // To avoid ugly resource leaks that will
00267     // eventually TRASH the system, call DestroyIcon().
00268     // To reproduce bug, try resizing the window for a
00269     // good minute. Christopher Brown
00270
00271     ::DestroyIcon( hIcon );
00272     pDC->SelectObject(pOldFont);
00273 }

Here is the call graph for this function:

void CCJOutlookBar::MeasureItem ( LPMEASUREITEMSTRUCT lpMeasureItemStruct ) [virtual]

Definition at line 278 of file CJOutlookBar.cpp.

00279 {
00280     lpMeasureItemStruct->itemHeight = 70;
00281 }

BOOL CCJOutlookBar::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 286 of file CJOutlookBar.cpp.

00287 {
00288     // KStowell - overridden for flicker-free drawing.
00289     UNUSED_ALWAYS(pDC);
00290     return TRUE;
00291 }

void CCJOutlookBar::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 132 of file CJOutlookBar.cpp.

References m_bLBDown.

00133 {
00134     m_bLBDown = true;
00135     SetCurSel(GetCurSel());
00136     CListBox::OnLButtonDown(nFlags, point);
00137 }

void CCJOutlookBar::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 140 of file CJOutlookBar.cpp.

References m_bLBDown, m_pOwner, and OBN_SELENDOK.

00141 {
00142     m_bLBDown = false;
00143     int nIndex = GetCurSel();
00144     SetCurSel(nIndex);
00145
00146     ASSERT(m_pOwner);
00147     m_pOwner->SendMessage(OBN_SELENDOK, (LPARAM)nIndex, (WPARAM)GetDlgCtrlID());
00148
00149     CListBox::OnLButtonUp(nFlags, point);
00150 }

void CCJOutlookBar::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 124 of file CJOutlookBar.cpp.

References NULL.

00125 {
00126     m_point = point;
00127     SetTimer (1, 10, NULL);
00128     CListBox::OnMouseMove(nFlags, point);
00129 }

void CCJOutlookBar::OnPaint ( ) [protected]

Definition at line 293 of file CJOutlookBar.cpp.

References m_clrShadow.

00294 {
00295     // Christopher Brown
00296     // Use a "Offscreen" DC to fill rect and
00297     // send to DefWindowProc...
00298     CClientDC memDC(this); // Henrik E. Rasmussen
00299
00300     CRect rcClip;
00301     memDC.GetClipBox(&rcClip);
00302     memDC.FillSolidRect(rcClip, m_clrShadow);
00303     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, (LPARAM)0 );
00304
00305     // Default is called for cleanup.
00306     Default();
00307 }

void CCJOutlookBar::OnSysColorChange ( ) [protected]

Definition at line 318 of file CJOutlookBar.cpp.

References m_clrDkShad, m_clrHilite, m_clrNormal, m_clrShadow, and m_clrTextNm.

00319 {
00320     CListBox::OnSysColorChange();
00321
00322     m_clrHilite = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00323     m_clrShadow = ::GetSysColor(COLOR_BTNSHADOW);
00324     m_clrDkShad = ::GetSysColor(COLOR_3DDKSHADOW);
00325     m_clrNormal = ::GetSysColor(COLOR_BTNFACE);
00326     m_clrTextNm = ::GetSysColor(COLOR_WINDOW);
00327 }

void CCJOutlookBar::OnTimer ( UINT nIDEvent ) [protected]

Definition at line 153 of file CJOutlookBar.cpp.

References m_bHilight, m_bLBDown, and m_point.

00154 {
00155     BOOL   bOutSide;
00156     CRect  rItem;
00157     CRect  rWindow;
00158     CPoint pt;
00159     int    nIndex;
00160
00161     // Get the rect of the current window,
00162     // get the current cursor position.
00163     GetWindowRect (rWindow);
00164     GetCursorPos (&pt);
00165
00166     // If the mouse is in the rect of this window,
00167     // set hilite flag to true, get the item that
00168     // the mouse is over.
00169     if (rWindow.PtInRect (pt)) {
00170         m_bHilight = true;
00171         nIndex = ItemFromPoint (m_point, bOutSide);
00172
00173         if (nIndex != GetCurSel() && !bOutSide) {
00174             SetCurSel( nIndex );
00175         }
00176     }
00177
00178     // If the mouse is not in the rect of
00179     // this window, kill the timer, set hilite flag
00180     // to false, and return.
00181     else {
00182         m_bHilight = false;
00183         if( !m_bLBDown ) {
00184           SetCurSel (-1);
00185         }
00186         KillTimer(1);
00187     }
00188 }

_CJXLIB_INLINE void CCJOutlookBar::SetImageLists | ( | CImageList * | pImageListSmall = NULL,
 |  | CImageList * | pImageListLarge = NULL
 | ) | [virtual]

Definition at line 210 of file CJOutlookBar.h.

References _CJXLIB_INLINE, m_pImageListLarge, and m_pImageListSmall.

00211     { m_pImageListLarge = pImageListLarge; m_pImageListSmall = pImageListSmall; }

_CJXLIB_INLINE void CCJOutlookBar::SetItems | ( | CContentItems * | pItems,
 |  | int | nNumItems
 | ) | [virtual]

Definition at line 213 of file CJOutlookBar.h.

References _CJXLIB_INLINE, m_nNumItems, and m_pContents.

00214     { m_pContents = pItems; m_nNumItems = nNumItems; ResetContent(); for (int i = 0; i < nNumItems; ++i) AddString(m_pContents[i].GetText()); }

_CJXLIB_INLINE void CCJOutlookBar::SetOwner ( CWnd * pWnd ) [virtual]

Definition at line 216 of file CJOutlookBar.h.

References _CJXLIB_INLINE, and m_pOwner.

00217     { m_pOwner = pWnd; }

void CCJOutlookBar::UpdateFont ( ) [virtual]

Definition at line 309 of file CJOutlookBar.cpp.

References m_Font.

Referenced by CCJOutlookBar().

00310 {
00311     m_Font.DeleteObject();
00312     NONCLIENTMETRICS ncm;
00313     ncm.cbSize = sizeof(ncm);
00314     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00315     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00316 }

Member Data Documentation

bool CCJOutlookBar::m_bHilight [protected]

Definition at line 139 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), DrawItem(), and OnTimer().

bool CCJOutlookBar::m_bLBDown [protected]

Definition at line 140 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), DrawItem(), OnLButtonDown(), OnLButtonUp(), and OnTimer().

COLORREF CCJOutlookBar::m_clrDkShad [protected]

Definition at line 144 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), DrawItem(), and OnSysColorChange().

COLORREF CCJOutlookBar::m_clrHilite [protected]

Definition at line 142 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), and OnSysColorChange().

COLORREF CCJOutlookBar::m_clrNormal [protected]

Definition at line 145 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), DrawItem(), and OnSysColorChange().

COLORREF CCJOutlookBar::m_clrShadow [protected]

Definition at line 143 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), DrawItem(), OnPaint(), and OnSysColorChange().

COLORREF CCJOutlookBar::m_clrTextNm [protected]

Definition at line 146 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), DrawItem(), and OnSysColorChange().

CFont CCJOutlookBar::m_Font [protected]

Definition at line 141 of file CJOutlookBar.h.

Referenced by DrawItem(), UpdateFont(), and ~CCJOutlookBar().

int CCJOutlookBar::m_nIndex [protected]

Definition at line 138 of file CJOutlookBar.h.

int CCJOutlookBar::m_nNumItems [protected]

Definition at line 137 of file CJOutlookBar.h.

Referenced by SetItems().

CContentItems* CCJOutlookBar::m_pContents [protected]

Definition at line 136 of file CJOutlookBar.h.

Referenced by DrawItem(), and SetItems().

CImageList* CCJOutlookBar::m_pImageListLarge [protected]

Definition at line 134 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), DrawItem(), and SetImageLists().

CImageList* CCJOutlookBar::m_pImageListSmall [protected]

Definition at line 135 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), and SetImageLists().

CPoint CCJOutlookBar::m_point [protected]

Definition at line 133 of file CJOutlookBar.h.

Referenced by OnTimer().

CWnd* CCJOutlookBar::m_pOwner [protected]

Definition at line 132 of file CJOutlookBar.h.

Referenced by CCJOutlookBar(), OnLButtonUp(), and SetOwner().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJOutlookBar.h
  • WinCvs/CJLib/CJLibrary/CJOutlookBar.cpp
Generated on Sat Aug 7 22:49:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJPagerCtrl Class Reference

CCJPagerCtrl Class Reference

#include <CJPagerCtrl.h>

Inheritance diagram for CCJPagerCtrl:

[legend]
Collaboration diagram for CCJPagerCtrl:

[legend]
List of all members.

Public Member Functions

CCJPagerCtrl ()
virtual | ~CCJPagerCtrl ()
void | SetScrollArea (int nWidth, int nHeight)
void | SetChild (HWND hwndChild)
void | RecalcSize ()
void | ForwardMouse (BOOL bForward)
COLORREF | SetBkColor (COLORREF clr)
COLORREF | GetBkColor ()
int | SetBorder (int iBorder)
int GetBorder ()
int | SetPos (int iPos)
int GetPos ()
int | SetButtonSize (int iSize)
int GetButtonSize ()
DWORD | GetButtonState (int iButton)
void | GetDropTarget (IDropTarget **ppdt)
virtual BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)

Protected Member Functions

virtual BOOL | OnPagerScroll (NMHDR *pNMPGScroll, LRESULT *pResult)
virtual BOOL | OnPagerCalcSize (NMHDR *pNMPGCalcSize, LRESULT *pResult)

Protected Attributes

int m_nWidth
int m_nHeight

Constructor & Destructor Documentation

CCJPagerCtrl::CCJPagerCtrl ( )

Definition at line 62 of file CJPagerCtrl.cpp.

00063 {
00064    // initialize common controls
00065     INITCOMMONCONTROLSEX icex;
00066     icex.dwSize = sizeof(icex);
00067     icex.dwICC = ICC_PAGESCROLLER_CLASS;
00068     VERIFY(InitCommonControlsEx(&icex));
00069 }

CCJPagerCtrl::~CCJPagerCtrl ( ) [virtual]

Definition at line 71 of file CJPagerCtrl.cpp.

00072 {
00073 }

Member Function Documentation

BOOL CCJPagerCtrl::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) | [virtual]

Definition at line 84 of file CJPagerCtrl.cpp.

References NULL.

00085 {
00086     CWnd* pWnd = this;
00087     return pWnd->Create(WC_PAGESCROLLER, NULL, dwStyle, rect, pParentWnd, nID);
00088 }

_CJXLIB_INLINE void CCJPagerCtrl::ForwardMouse ( BOOL bForward )

Definition at line 192 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00193     { ASSERT(::IsWindow(m_hWnd)); Pager_ForwardMouse(m_hWnd, bForward); }

_CJXLIB_INLINE COLORREF CCJPagerCtrl::GetBkColor ( )

Definition at line 198 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00199     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetBkColor(m_hWnd); }

_CJXLIB_INLINE int CCJPagerCtrl::GetBorder ( )

Definition at line 204 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00205     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetBorder(m_hWnd); }

_CJXLIB_INLINE int CCJPagerCtrl::GetButtonSize ( )

Definition at line 216 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00217     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetButtonSize(m_hWnd); }

_CJXLIB_INLINE DWORD CCJPagerCtrl::GetButtonState ( int iButton )

Definition at line 219 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00220     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetButtonState(m_hWnd, iButton); }

_CJXLIB_INLINE void CCJPagerCtrl::GetDropTarget ( IDropTarget ** ppdt )

Definition at line 222 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00223     { ASSERT(::IsWindow(m_hWnd)); Pager_GetDropTarget(m_hWnd, ppdt); }

_CJXLIB_INLINE int CCJPagerCtrl::GetPos ( )

Definition at line 210 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00211     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetPos(m_hWnd); }

BOOL CCJPagerCtrl::OnPagerCalcSize | ( | NMHDR * | pNMPGCalcSize,
 |  | LRESULT * | pResult
 | ) | [protected, virtual]

Definition at line 93 of file CJPagerCtrl.cpp.

References m_nHeight, and m_nWidth.

00094 {
00095     NMPGCALCSIZE* pNMPGCalcSize = reinterpret_cast<NMPGCALCSIZE*>(pNMPG);
00096     switch(pNMPGCalcSize->dwFlag)
00097     {
00098     case PGF_CALCWIDTH:
00099         pNMPGCalcSize->iWidth = m_nWidth;
00100         break;
00101
00102     case PGF_CALCHEIGHT:
00103         pNMPGCalcSize->iHeight = m_nHeight;
00104         break;
00105     }
00106
00107     *pResult = 0;
00108     return FALSE;   // Let parent handle message
00109 }

BOOL CCJPagerCtrl::OnPagerScroll | ( | NMHDR * | pNMPGScroll,
 |  | LRESULT * | pResult
 | ) | [protected, virtual]

Definition at line 111 of file CJPagerCtrl.cpp.

00112 {
00113     *pResult = 0;
00114     return FALSE;   // Let parent handle message
00115 }

_CJXLIB_INLINE void CCJPagerCtrl::RecalcSize ( )

Definition at line 189 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00190     { ASSERT(::IsWindow(m_hWnd)); Pager_RecalcSize(m_hWnd); }

_CJXLIB_INLINE COLORREF CCJPagerCtrl::SetBkColor ( COLORREF clr )

Definition at line 195 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00196     { ASSERT(::IsWindow(m_hWnd)); return Pager_SetBkColor(m_hWnd, clr); }

_CJXLIB_INLINE int CCJPagerCtrl::SetBorder ( int iBorder )

Definition at line 201 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00202     { ASSERT(::IsWindow(m_hWnd)); return Pager_SetBorder(m_hWnd, iBorder); }

_CJXLIB_INLINE int CCJPagerCtrl::SetButtonSize ( int iSize )

Definition at line 213 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00214     { ASSERT(::IsWindow(m_hWnd)); return Pager_SetButtonSize(m_hWnd, iSize); }

_CJXLIB_INLINE void CCJPagerCtrl::SetChild ( HWND hwndChild )

Definition at line 186 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00187     { ASSERT(::IsWindow(m_hWnd)); Pager_SetChild(m_hWnd, hwndChild); }

_CJXLIB_INLINE int CCJPagerCtrl::SetPos ( int iPos )

Definition at line 207 of file CJPagerCtrl.h.

References _CJXLIB_INLINE.

00208     { ASSERT(::IsWindow(m_hWnd)); return Pager_SetPos(m_hWnd, iPos); }

_CJXLIB_INLINE void CCJPagerCtrl::SetScrollArea | ( | int | nWidth,
 |  | int | nHeight
 | ) |

Definition at line 183 of file CJPagerCtrl.h.

References _CJXLIB_INLINE, m_nHeight, and m_nWidth.

00184     { ASSERT(::IsWindow(m_hWnd)); m_nWidth  = nWidth; m_nHeight = nHeight; }

Member Data Documentation

int CCJPagerCtrl::m_nHeight [protected]

Definition at line 76 of file CJPagerCtrl.h.

Referenced by OnPagerCalcSize(), and SetScrollArea().

int CCJPagerCtrl::m_nWidth [protected]

Definition at line 75 of file CJPagerCtrl.h.

Referenced by OnPagerCalcSize(), and SetScrollArea().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJPagerCtrl.h
  • WinCvs/CJLib/CJLibrary/CJPagerCtrl.cpp
Generated on Sat Aug 7 22:49:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJReBar Class Reference

CCJReBar Class Reference

#include <CJReBar.h>

Inheritance diagram for CCJReBar:

[legend]
Collaboration diagram for CCJReBar:

[legend]
List of all members.

Public Member Functions

CCJReBar ()
BOOL | Create (CWnd *pParentWnd, DWORD dwCtrlStyle=RBS_BANDBORDERS, DWORD dwStyle=WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|CBRS_TOP, UINT nID=AFX_IDW_REBAR)
CCJReBarCtrl & | GetReBarCtrl () const
BOOL | AddBar (CWnd *pBar, LPCTSTR pszText=NULL, CBitmap *pbmp=NULL, DWORD dwStyle=RBBS_GRIPPERALWAYS|RBBS_FIXEDBMP)
BOOL | AddBar (CWnd *pBar, COLORREF clrFore, COLORREF clrBack, LPCTSTR pszText=NULL, DWORD dwStyle=RBBS_GRIPPERALWAYS)
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHndler)
virtual int | OnToolHitTest (CPoint point, TOOLINFO *pTI) const
virtual CSize | CalcFixedLayout (BOOL bStretch, BOOL bHorz)
virtual CSize | CalcDynamicLayout (int nLength, DWORD nMode)

Protected Member Functions

virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam)
BOOL | _AddBar (CWnd *pBar, REBARBANDINFO *pRBBI)
afx_msg BOOL | OnNcCreate (LPCREATESTRUCT)
afx_msg void | OnPaint ()
afx_msg void | OnHeightChange (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnNcPaint ()
afx_msg void | OnNcCalcSize (BOOL, NCCALCSIZE_PARAMS *)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg LRESULT | OnShowBand (WPARAM wParam, LPARAM lParam)
afx_msg void | OnRecalcParent ()

Constructor & Destructor Documentation

CCJReBar::CCJReBar ( )

Definition at line 104 of file CJReBar.cpp.

00105 {
00106     SetBorders();
00107 }

Member Function Documentation

BOOL CCJReBar::_AddBar | ( | CWnd * | pBar,
 |  | REBARBANDINFO * | pRBBI
 | ) | [protected]

Definition at line 147 of file CJReBar.cpp.

References CCJToolBarBase::m_bInReBar, and NULL.

Referenced by AddBar().

00148 {
00149     ASSERT_VALID(this);
00150     ASSERT(::IsWindow(m_hWnd));
00151     ASSERT(pBar != NULL);
00152     ASSERT(::IsWindow(pBar->m_hWnd));
00153
00154     pRBBI->cbSize = sizeof(REBARBANDINFO);
00155     pRBBI->fMask |= RBBIM_CHILD | RBBIM_CHILDSIZE;
00156     pRBBI->hwndChild = pBar->m_hWnd;
00157
00158     CSize size;
00159     CCJToolBarBase* pTemp = DYNAMIC_DOWNCAST(CCJToolBarBase, pBar);
00160     if (pTemp != NULL)
00161     {
00162         pTemp->m_bInReBar = true;
00163         size = pTemp->CalcFixedLayout(FALSE, m_dwStyle & CBRS_ORIENT_HORZ);
00164     }
00165     else
00166     {
00167         CRect rect;
00168         pBar->GetWindowRect(&rect);
00169         size = rect.Size();
00170     }
00171     //WINBUG: COMCTL32.DLL is off by 4 pixels in its sizing logic.  Whatever
00172     //  is specified as the minimum size, the system rebar will allow that band
00173     //  to be 4 actual pixels smaller!  That's why we add 4 to the size here.
00174     pRBBI->cxMinChild = size.cx + 4;
00175     pRBBI->cyMinChild = size.cy;
00176     BOOL bResult = (BOOL)DefWindowProc(RB_INSERTBAND, (WPARAM)-1, (LPARAM)pRBBI);
00177
00178     CFrameWnd* pFrameWnd = GetParentFrame();
00179     if (pFrameWnd != NULL)
00180         pFrameWnd->RecalcLayout();
00181
00182     return bResult;
00183 }

BOOL CCJReBar::AddBar | ( | CWnd * | pBar,
 |  | COLORREF | clrFore,
 |  | COLORREF | clrBack,
 |  | LPCTSTR | pszText = NULL,
 |  | DWORD | dwStyle = RBBS_GRIPPERALWAYS
 | ) |

Definition at line 203 of file CJReBar.cpp.

References _AddBar(), and NULL.

00204 {
00205     REBARBANDINFO rbBand;
00206     rbBand.fMask = RBBIM_STYLE | RBBIM_COLORS;
00207     rbBand.fStyle = dwStyle;
00208     rbBand.clrFore = clrFore;
00209     rbBand.clrBack = clrBack;
00210     if (pszText != NULL)
00211     {
00212         rbBand.fMask |= RBBIM_TEXT;
00213         rbBand.lpText = const_cast<LPTSTR>(pszText);
00214     }
00215     return _AddBar(pBar, &rbBand);
00216 }

Here is the call graph for this function:

BOOL CCJReBar::AddBar | ( | CWnd * | pBar,
 |  | LPCTSTR | pszText = NULL,
 |  | CBitmap * | pbmp = NULL,
 |  | DWORD | dwStyle = RBBS_GRIPPERALWAYS|RBBS_FIXEDBMP
 | ) |

Definition at line 185 of file CJReBar.cpp.

References _AddBar(), and NULL.

00186 {
00187     REBARBANDINFO rbBand;
00188     rbBand.fMask = RBBIM_STYLE;
00189     rbBand.fStyle = dwStyle;
00190     if (pszText != NULL)
00191     {
00192         rbBand.fMask |= RBBIM_TEXT;
00193         rbBand.lpText = const_cast<LPTSTR>(pszText);
00194     }
00195     if (pbmp != NULL)
00196     {
00197         rbBand.fMask |= RBBIM_BACKGROUND;
00198         rbBand.hbmBack = (HBITMAP)*pbmp;
00199     }
00200     return _AddBar(pBar, &rbBand);
00201 }

Here is the call graph for this function:

CSize CCJReBar::CalcDynamicLayout | ( | int | nLength,
 |  | DWORD | nMode
 | ) | [virtual]

Definition at line 272 of file CJReBar.cpp.

References CalcFixedLayout().

00273 {
00274     if (dwMode & LM_HORZDOCK)
00275         ASSERT(dwMode & LM_HORZ);
00276     return CalcFixedLayout(dwMode & LM_STRETCH, dwMode & LM_HORZ);
00277 }

Here is the call graph for this function:

CSize CCJReBar::CalcFixedLayout | ( | BOOL | bStretch,
 |  | BOOL | bHorz
 | ) | [virtual]

Definition at line 218 of file CJReBar.cpp.

References CCJToolBarBase::CalcInsideRect(), and NULL.

Referenced by CalcDynamicLayout().

00219 {
00220     ASSERT_VALID(this);
00221     ASSERT(::IsWindow(m_hWnd));
00222
00223     // the union of the band rectangles is the total bounding rect
00224     int nCount = DefWindowProc(RB_GETBANDCOUNT, 0, 0);
00225     REBARBANDINFO rbBand;
00226     rbBand.cbSize = sizeof(rbBand);
00227     int nTemp;
00228
00229     // sync up hidden state of the bands
00230     for (nTemp = nCount; nTemp--; )
00231     {
00232         rbBand.fMask = RBBIM_CHILD|RBBIM_STYLE;
00233         VERIFY(DefWindowProc(RB_GETBANDINFO, nTemp, (LPARAM)&rbBand));
00234         CCJToolBarBase* pBar = DYNAMIC_DOWNCAST(CCJToolBarBase, CWnd::FromHandlePermanent(rbBand.hwndChild));
00235         BOOL bWindowVisible;
00236         if (pBar != NULL)
00237             bWindowVisible = pBar->IsVisible();
00238         else
00239             bWindowVisible =  (::GetWindowLong(rbBand.hwndChild, GWL_STYLE) & WS_VISIBLE) != 0;
00240         BOOL bBandVisible = (rbBand.fStyle & RBBS_HIDDEN) == 0;
00241         if (bWindowVisible != bBandVisible)
00242             VERIFY(DefWindowProc(RB_SHOWBAND, nTemp, bWindowVisible));
00243     }
00244
00245     // determine bounding rect of all visible bands
00246     CRect rectBound; rectBound.SetRectEmpty();
00247     for (nTemp = nCount; nTemp--; )
00248     {
00249         rbBand.fMask = RBBIM_STYLE;
00250         VERIFY(DefWindowProc(RB_GETBANDINFO, nTemp, (LPARAM)&rbBand));
00251         if ((rbBand.fStyle & RBBS_HIDDEN) == 0)
00252         {
00253             CRect rect;
00254             VERIFY(DefWindowProc(RB_GETRECT, nTemp, (LPARAM)&rect));
00255             rectBound |= rect;
00256         }
00257     }
00258
00259     // add borders as part of bounding rect
00260     if (!rectBound.IsRectEmpty())
00261     {
00262         CRect rect; rect.SetRectEmpty();
00263         CalcInsideRect(rect, bHorz);
00264         rectBound.right -= rect.Width();
00265         rectBound.bottom -= rect.Height();
00266     }
00267
00268     return CSize((bHorz && bStretch) ? 32767 : rectBound.Width(),
00269         (!bHorz && bStretch) ? 32767 : rectBound.Height());
00270 }

Here is the call graph for this function:

BOOL CCJReBar::Create | ( | CWnd * | pParentWnd,
 |  | DWORD | dwCtrlStyle = RBS_BANDBORDERS,
 |  | DWORD | dwStyle = WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|CBRS_TOP,
 |  | UINT | nID = AFX_IDW_REBAR
 | ) |

Definition at line 279 of file CJReBar.cpp.

References _ComCtlVersion, _GetComCtlVersion(), and NULL.

00280 {
00281     ASSERT_VALID(pParentWnd);   // must have a parent
00282     ASSERT (!((dwStyle & CBRS_SIZE_FIXED) && (dwStyle & CBRS_SIZE_DYNAMIC)));
00283
00284     // save the style
00285     m_dwStyle = (dwStyle & CBRS_ALL);
00286     if (nID == AFX_IDW_REBAR)
00287         m_dwStyle |= CBRS_HIDE_INPLACE;
00288
00289     dwStyle &= ~CBRS_ALL;
00290     dwStyle |= CCS_NOPARENTALIGN|CCS_NOMOVEY|CCS_NODIVIDER|CCS_NORESIZE|RBS_VARHEIGHT;
00291     dwStyle |= dwCtrlStyle;
00292
00293     // initialize common controls
00294 #if _MSC_VER >= 1200
00295     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_COOL_REG));
00296 #else
00297     INITCOMMONCONTROLSEX icex;
00298     icex.dwSize = sizeof(icex);
00299     icex.dwICC = ICC_COOL_CLASSES;
00300     VERIFY(InitCommonControlsEx(&icex));
00301 #endif
00302
00303     _GetComCtlVersion();
00304     ASSERT(_ComCtlVersion != -1);
00305
00306     // create the HWND
00307     CRect rect; rect.SetRectEmpty();
00308     if (!CWnd::Create(REBARCLASSNAME, NULL, dwStyle, rect, pParentWnd, nID))
00309         return FALSE;
00310
00311     // Note: Parent must resize itself for control bar to be resized
00312     m_bInReBar = true;
00313
00314     return TRUE;
00315 }

Here is the call graph for this function:

_CJXLIB_INLINE CCJReBarCtrl & CCJReBar::GetReBarCtrl ( ) const

Definition at line 123 of file CJReBar.h.

References _CJXLIB_INLINE.

00124     { return *(CCJReBarCtrl*)this; }

BOOL CCJReBar::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 334 of file CJReBar.cpp.

00335 {
00336     return (BOOL)Default();
00337 }

void CCJReBar::OnHeightChange | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 116 of file CJReBar.cpp.

References NULL.

00117 {
00118     CFrameWnd* pFrameWnd = GetParentFrame();
00119     if (pFrameWnd != NULL)
00120         pFrameWnd->RecalcLayout();
00121     *pResult = 0;
00122 }

void CCJReBar::OnNcCalcSize | ( | BOOL | ,
 |  | NCCALCSIZE_PARAMS * |
 | ) | [protected]

Definition at line 339 of file CJReBar.cpp.

References CCJToolBarBase::CalcInsideRect().

00340 {
00341     // calculate border space (will add to top/bottom, subtract from right/bottom)
00342     CRect rect; rect.SetRectEmpty();
00343     BOOL bHorz = (m_dwStyle & CBRS_ORIENT_HORZ) != 0;
00344     CCJToolBarBase::CalcInsideRect(rect, bHorz);
00345
00346     // adjust non-client area for border space
00347     lpncsp->rgrc[0].left += rect.left;
00348     lpncsp->rgrc[0].top += rect.top;
00349     lpncsp->rgrc[0].right += rect.right;
00350     lpncsp->rgrc[0].bottom += rect.bottom;
00351 }

Here is the call graph for this function:

BOOL CCJReBar::OnNcCreate ( LPCREATESTRUCT ) [protected]

Definition at line 322 of file CJReBar.cpp.

References NULL.

00323 {
00324     if (!CCJToolBarBase::OnNcCreate(lpCreateStruct))
00325         return FALSE;
00326
00327     // if the owner was set before the rebar was created, set it now
00328     if (m_hWndOwner != NULL)
00329         DefWindowProc(RB_SETPARENT, (WPARAM)m_hWndOwner, 0);
00330
00331     return TRUE;
00332 }

void CCJReBar::OnNcPaint ( ) [protected]

Definition at line 353 of file CJReBar.cpp.

References CCJToolBarBase::EraseNonClient().

00354 {
00355     EraseNonClient();
00356 }

Here is the call graph for this function:

void CCJReBar::OnPaint ( ) [protected]

Reimplemented from CCJToolBarBase.

Definition at line 358 of file CJReBar.cpp.

00359 {
00360     Default();
00361 }

void CCJReBar::OnRecalcParent ( ) [protected]

Definition at line 109 of file CJReBar.cpp.

References NULL.

00110 {
00111     CFrameWnd* pFrameWnd = GetParentFrame();
00112     ASSERT(pFrameWnd != NULL);
00113     pFrameWnd->RecalcLayout();
00114 }

LRESULT CCJReBar::OnShowBand | ( | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected]

Definition at line 124 of file CJReBar.cpp.

References NULL.

00125 {
00126     LRESULT lResult = Default();
00127     if (lResult)
00128     {
00129         // keep window visible state in sync with band visible state
00130         REBARBANDINFO rbBand;
00131         rbBand.cbSize = sizeof(rbBand);
00132         rbBand.fMask = RBBIM_CHILD|RBBIM_STYLE;
00133         VERIFY(DefWindowProc(RB_GETBANDINFO, wParam, (LPARAM)&rbBand));
00134         CCJToolBarBase* pBar = DYNAMIC_DOWNCAST(CCJToolBarBase, CWnd::FromHandlePermanent(rbBand.hwndChild));
00135         BOOL bWindowVisible;
00136         if (pBar != NULL)
00137             bWindowVisible = pBar->IsVisible();
00138         else
00139             bWindowVisible =  (::GetWindowLong(rbBand.hwndChild, GWL_STYLE) & WS_VISIBLE) != 0;
00140         BOOL bBandVisible = (rbBand.fStyle & RBBS_HIDDEN) == 0;
00141         if (bWindowVisible != bBandVisible)
00142             VERIFY(::ShowWindow(rbBand.hwndChild, bBandVisible ? SW_SHOW : SW_HIDE));
00143     }
00144     return lResult;
00145 }

int CCJReBar::OnToolHitTest | ( | CPoint | point,
 |  | TOOLINFO * | pTI
 | ) | const [virtual]

Definition at line 363 of file CJReBar.cpp.

References _CjxChildWindowFromPoint(), and NULL.

00364 {
00365     ASSERT_VALID(this);
00366     ASSERT(::IsWindow(m_hWnd));
00367
00368     HWND hWndChild = _CjxChildWindowFromPoint(m_hWnd, point);
00369     CWnd* pWnd = CWnd::FromHandlePermanent(hWndChild);
00370     if (pWnd == NULL)
00371         return CCJToolBarBase::OnToolHitTest(point, pTI);
00372
00373     ASSERT(pWnd->m_hWnd == hWndChild);
00374     return pWnd->OnToolHitTest(point, pTI);
00375 }

Here is the call graph for this function:

void CCJReBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget,
 |  | BOOL | bDisableIfNoHndler
 | ) | [virtual]

Definition at line 317 of file CJReBar.cpp.

00318 {
00319     UpdateDialogControls(pTarget, bDisableIfNoHandler);
00320 }

LRESULT CCJReBar::WindowProc | ( | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected, virtual]

Reimplemented from CCJToolBarBase.

Definition at line 377 of file CJReBar.cpp.

References CCJToolBarBase::WindowProc().

00378 {
00379     // special handling for certain messages (forwarding to owner/parent)
00380     switch (message)
00381     {
00382     case WM_POPMESSAGESTRING:
00383     case WM_SETMESSAGESTRING:
00384         return GetOwner()->SendMessage(message, wParam, lParam);
00385     }
00386     return CCJToolBarBase::WindowProc(message, wParam, lParam);
00387 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJReBar.h
  • WinCvs/CJLib/CJLibrary/CJReBar.cpp
Generated on Sat Aug 7 22:49:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJReBarCtrl Class Reference

CCJReBarCtrl Class Reference

#include <CJReBarCtrl.h>

Inheritance diagram for CCJReBarCtrl:

[legend]
Collaboration diagram for CCJReBarCtrl:

[legend]
List of all members.

Public Member Functions

CCJReBarCtrl ()
BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)
UINT | GetBandCount () const
BOOL | GetBandInfo (UINT uBand, REBARBANDINFO *prbbi) const
UINT | GetBarHeight () const
BOOL | GetBarInfo (REBARINFO *prbi) const
COLORREF | GetBkColor () const
IDropTarget * | GetDropTarget () const
BOOL | GetRect (UINT uBand, LPRECT prc) const
UINT | GetRowCount () const
UINT | GetRowHeight (UINT uRow) const
COLORREF | GetTextColor () const
CToolTipCtrl * | GetToolTips () const
int | IDToIndex (UINT uBandID) const
BOOL | SetBandInfo (UINT uBand, REBARBANDINFO *prbbi)
BOOL | SetBarInfo (REBARINFO *prbi)
COLORREF | SetBkColor (COLORREF clr)
CWnd * | SetOwner (CWnd *pWnd)
COLORREF | SetTextColor (COLORREF clr)
void | SetToolTips (CToolTipCtrl *pToolTip)
CImageList * | GetImageList () const
BOOL | SetImageList (CImageList *pImageList)
void | GetBandBorders (UINT uBand, LPRECT prc) const
CPalette * | GetPalette () const
CPalette * | SetPalette (HPALETTE hPal)
BOOL | GetColorScheme (COLORSCHEME *lpcs)
void | SetColorScheme (const COLORSCHEME *lpcs)
void | BeginDrag (UINT uBand, DWORD dwPos=(DWORD)-1)
BOOL | DeleteBand (UINT uBand)
void | DragMove (DWORD dwPos=(DWORD)-1)
void | EndDrag ()
int | HitTest (RBHITTESTINFO *prbht)
BOOL | InsertBand (UINT uIndex, REBARBANDINFO *prbbi)
void | MaximizeBand (UINT uBand)
void | MinimizeBand (UINT uBand)
BOOL | ShowBand (UINT uBand, BOOL fShow=TRUE)
BOOL | SizeToRect (CRect &rect)
BOOL | MoveBand (UINT uFrom, UINT uTo)

Constructor & Destructor Documentation

CCJReBarCtrl::CCJReBarCtrl ( )

Definition at line 56 of file CJReBarCtrl.cpp.

00057 {
00058 }

Member Function Documentation

_CJXLIB_INLINE void CCJReBarCtrl::BeginDrag | ( | UINT | uBand,
 |  | DWORD | dwPos = (DWORD)-1
 | ) |

Definition at line 181 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00182     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_BEGINDRAG, uBand, dwPos); }

BOOL CCJReBarCtrl::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) |

Definition at line 60 of file CJReBarCtrl.cpp.

References NULL.

00062 {
00063     // initialize common controls
00064 #if _MSC_VER >= 1200
00065     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_COOL_REG));
00066 #else
00067     INITCOMMONCONTROLSEX icex;
00068     icex.dwSize = sizeof(icex);
00069     icex.dwICC = ICC_COOL_CLASSES;
00070     VERIFY(InitCommonControlsEx(&icex));
00071 #endif
00072
00073     CWnd* pWnd = this;
00074     return pWnd->Create(REBARCLASSNAME, NULL, dwStyle, rect, pParentWnd, nID);
00075 }

_CJXLIB_INLINE BOOL CCJReBarCtrl::DeleteBand ( UINT uBand )

Definition at line 184 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00185     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_DELETEBAND, uBand, 0L); }

_CJXLIB_INLINE void CCJReBarCtrl::DragMove ( DWORD dwPos = (DWORD)-1 )

Definition at line 187 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00188     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_DRAGMOVE, 0, dwPos); }

_CJXLIB_INLINE void CCJReBarCtrl::EndDrag ( )

Definition at line 190 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00191     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_ENDDRAG, 0, 0L); }

_CJXLIB_INLINE void CCJReBarCtrl::GetBandBorders | ( | UINT | uBand,
 |  | LPRECT | prc
 | ) | const

Definition at line 172 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00173     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_GETBANDBORDERS, uBand, (LPARAM)prc); }

_CJXLIB_INLINE UINT CCJReBarCtrl::GetBandCount ( ) const

Definition at line 118 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00119     { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETBANDCOUNT, 0, 0L); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::GetBandInfo | ( | UINT | uBand,
 |  | REBARBANDINFO * | prbbi
 | ) | const

Definition at line 121 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00122     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETBANDINFO, uBand, (LPARAM)prbbi); }

_CJXLIB_INLINE UINT CCJReBarCtrl::GetBarHeight ( ) const

Definition at line 124 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00125     { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETBARHEIGHT, 0, 0L); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::GetBarInfo ( REBARINFO * prbi ) const

Definition at line 127 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

Referenced by GetImageList().

00128     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETBARINFO, 0, (LPARAM)prbi); }

_CJXLIB_INLINE COLORREF CCJReBarCtrl::GetBkColor ( ) const

Definition at line 130 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00131     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_GETBKCOLOR, 0, 0L); }

BOOL CCJReBarCtrl::GetColorScheme ( COLORSCHEME * lpcs )

Definition at line 94 of file CJReBarCtrl.cpp.

00095 {
00096   lpcs->dwSize = sizeof(COLORSCHEME);
00097   return SendMessage(RB_GETCOLORSCHEME, 0, (LPARAM)lpcs);
00098 }

_CJXLIB_INLINE IDropTarget * CCJReBarCtrl::GetDropTarget ( ) const

Definition at line 133 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00134     { ASSERT(::IsWindow(m_hWnd)); IDropTarget* pdt; ::SendMessage(m_hWnd, RB_GETDROPTARGET, 0, (LPARAM)&pdt); return pdt; }

CImageList * CCJReBarCtrl::GetImageList ( ) const

Definition at line 77 of file CJReBarCtrl.cpp.

References GetBarInfo(), and NULL.

00078 {
00079   REBARINFO rbi;
00080   rbi.cbSize = sizeof(rbi);
00081   rbi.fMask = RBIM_IMAGELIST;
00082   return GetBarInfo(&rbi) ? CImageList::FromHandle(rbi.himl) : NULL;
00083 }

Here is the call graph for this function:

_CJXLIB_INLINE CPalette * CCJReBarCtrl::GetPalette ( ) const

Definition at line 175 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00176     { ASSERT(::IsWindow(m_hWnd)); return CPalette::FromHandle((HPALETTE)::SendMessage(m_hWnd, RB_GETPALETTE, 0, 0L)); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::GetRect | ( | UINT | uBand,
 |  | LPRECT | prc
 | ) | const

Definition at line 136 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00137     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETRECT, uBand, (LPARAM)prc); }

_CJXLIB_INLINE UINT CCJReBarCtrl::GetRowCount ( ) const

Definition at line 139 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00140     { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETROWCOUNT, 0, 0L); }

_CJXLIB_INLINE UINT CCJReBarCtrl::GetRowHeight ( UINT uRow ) const

Definition at line 142 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00143     { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETROWHEIGHT, uRow, 0L); }

_CJXLIB_INLINE COLORREF CCJReBarCtrl::GetTextColor ( ) const

Definition at line 145 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00146     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_GETTEXTCOLOR, 0, 0L); }

_CJXLIB_INLINE CToolTipCtrl * CCJReBarCtrl::GetToolTips ( ) const

Definition at line 148 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00149     { ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, RB_GETTOOLTIPS, 0, 0L)); }

_CJXLIB_INLINE int CCJReBarCtrl::HitTest ( RBHITTESTINFO * prbht )

Definition at line 193 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00194     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, RB_HITTEST, 0, (LPARAM)prbht); }

_CJXLIB_INLINE int CCJReBarCtrl::IDToIndex ( UINT uBandID ) const

Definition at line 151 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00152     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, RB_IDTOINDEX, uBandID, 0L); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::InsertBand | ( | UINT | uIndex,
 |  | REBARBANDINFO * | prbbi
 | ) |

Definition at line 196 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00197     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_INSERTBAND, uIndex, (LPARAM)prbbi); }

_CJXLIB_INLINE void CCJReBarCtrl::MaximizeBand ( UINT uBand )

Definition at line 199 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00200     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_MAXIMIZEBAND, uBand, 0L); }

_CJXLIB_INLINE void CCJReBarCtrl::MinimizeBand ( UINT uBand )

Definition at line 202 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00203     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_MINIMIZEBAND, uBand, 0L); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::MoveBand | ( | UINT | uFrom,
 |  | UINT | uTo
 | ) |

Definition at line 211 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00212     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_MOVEBAND, uFrom, uTo); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::SetBandInfo | ( | UINT | uBand,
 |  | REBARBANDINFO * | prbbi
 | ) |

Definition at line 154 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00155     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SETBANDINFO, uBand, (LPARAM)prbbi); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::SetBarInfo ( REBARINFO * prbi )

Definition at line 157 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

Referenced by SetImageList().

00158     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SETBARINFO, 0, (LPARAM)prbi); }

_CJXLIB_INLINE COLORREF CCJReBarCtrl::SetBkColor ( COLORREF clr )

Definition at line 160 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00161     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_SETBKCOLOR, 0, (LPARAM)clr); }

void CCJReBarCtrl::SetColorScheme ( const COLORSCHEME * lpcs )

Definition at line 100 of file CJReBarCtrl.cpp.

00101 {
00102   ((COLORSCHEME*)lpcs)->dwSize = sizeof(COLORSCHEME);
00103   SendMessage(RB_SETCOLORSCHEME, 0, (LPARAM)lpcs);
00104 }

BOOL CCJReBarCtrl::SetImageList ( CImageList * pImageList )

Definition at line 85 of file CJReBarCtrl.cpp.

References SetBarInfo().

00086 {
00087   REBARINFO rbi;
00088   rbi.cbSize = sizeof(rbi);
00089   rbi.fMask = RBIM_IMAGELIST;
00090   rbi.himl = (HIMAGELIST)pImageList->GetSafeHandle();
00091   return SetBarInfo(&rbi);
00092 }

Here is the call graph for this function:

_CJXLIB_INLINE CWnd * CCJReBarCtrl::SetOwner ( CWnd * pWnd )

Definition at line 163 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00164     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle((HWND)::SendMessage(m_hWnd, RB_SETPARENT, (WPARAM)pWnd->m_hWnd, 0L)); }

_CJXLIB_INLINE CPalette * CCJReBarCtrl::SetPalette ( HPALETTE hPal )

Definition at line 178 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00179     { ASSERT(::IsWindow(m_hWnd)); return CPalette::FromHandle((HPALETTE)::SendMessage(m_hWnd, RB_SETPALETTE, 0, (LPARAM)hPal)); }

_CJXLIB_INLINE COLORREF CCJReBarCtrl::SetTextColor ( COLORREF clr )

Definition at line 166 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00167     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_SETTEXTCOLOR, 0, (LPARAM)clr); }

_CJXLIB_INLINE void CCJReBarCtrl::SetToolTips ( CToolTipCtrl * pToolTip )

Definition at line 169 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00170     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_SETTOOLTIPS, (WPARAM)pToolTip->m_hWnd, 0L); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::ShowBand | ( | UINT | uBand,
 |  | BOOL | fShow = TRUE
 | ) |

Definition at line 205 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00206     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SHOWBAND, uBand, fShow); }

_CJXLIB_INLINE BOOL CCJReBarCtrl::SizeToRect ( CRect & rect )

Definition at line 208 of file CJReBarCtrl.h.

References _CJXLIB_INLINE.

00209     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SIZETORECT, 0, (LPARAM)&rect); }

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJReBarCtrl.h
  • WinCvs/CJLib/CJLibrary/CJReBarCtrl.cpp
Generated on Sat Aug 7 22:50:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJShellTree Class Reference

CCJShellTree Class Reference

Inheritance diagram for CCJShellTree:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/ExploreBar.h
Generated on Sat Aug 7 22:50:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJSizeDockBar Class Reference

CCJSizeDockBar Class Reference

#include <CJSizeDockBar.h>

Inheritance diagram for CCJSizeDockBar:

[legend]
Collaboration diagram for CCJSizeDockBar:

[legend]
List of all members.

Public Member Functions

CCJSizeDockBar ()
virtual | ~CCJSizeDockBar ()
void | Normalize (CCJControlBar *)
void | Maximize (CCJControlBar *)
void | CalcSizeBarLayout ()
void | SetActualSize (int iSize)
void | EraseNonClient ()
void | DrawBorders (CDC *pDC, CRect &rect)
void | RecalcAllExcept (CCJSizeDockBar *pBar)
CCJControlBar * | GetDockedSizeBar (int nPos)
void | FlatBorder (BOOL bFlat=TRUE)
virtual CSize | CalcDynamicLayout (int nLength, DWORD nMode)
virtual void | DoPaint (CDC *pDC)
virtual BOOL | IsDockBar () const
virtual BOOL | IsDockSizeBar () const
virtual void | OnInvertTracker (const CRect &)
virtual void | HitTest (const CPoint &point)

Static Public Attributes

bool | m_bIsDockBar = false

Protected Member Functions

BOOL | IsLastControlBar (int index)
void | GetAvailableRect (CRect &rect)
afx_msg void | OnNcPaint ()
afx_msg void | OnNcCalcSize (BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR *lpncsp)
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg UINT | OnNcHitTest (CPoint point)
afx_msg void | OnNcLButtonDown (UINT nHitTest, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)

Protected Attributes

int m_iSafeSpace
int m_iActualSize
BOOL | m_bDragging
BOOL | m_bOkToDrag
CRect | m_rcTrack
CPoint | m_ptCurDrag
CPoint | m_ptStartDrag
HCURSOR | m_curHSplitBar
HCURSOR | m_curVSplitBar
BOOL | m_bFlatBorder
CPoint | m_ptCurrent

Constructor & Destructor Documentation

CCJSizeDockBar::CCJSizeDockBar ( )

Definition at line 111 of file CJSizeDockBar.cpp.

References m_bDragging, m_bFlatBorder, m_bOkToDrag, m_iActualSize, m_iSafeSpace, and m_ptCurrent.

00112 {
00113     m_cxLeftBorder      = 0;
00114     m_cyTopBorder       = 0;
00115     m_cxRightBorder     = 0;
00116     m_cyBottomBorder    = 0;
00117     m_iActualSize       = 100;
00118     m_iSafeSpace        = 25;
00119     m_bOkToDrag         = FALSE;
00120     m_bDragging         = FALSE;
00121     m_bAutoDelete       = TRUE;
00122     m_bFlatBorder       = TRUE;     //Yiannhs v6.06 for Docking bar flat border
00123     m_ptCurrent         = CPoint(0,0);
00124 }

CCJSizeDockBar::~CCJSizeDockBar ( ) [virtual]

Definition at line 126 of file CJSizeDockBar.cpp.

00127 {
00128     // TODO: add destruction code here.
00129 }

Member Function Documentation

CSize CCJSizeDockBar::CalcDynamicLayout | ( | int | nLength,
 |  | DWORD | nMode
 | ) | [virtual]

Definition at line 148 of file CJSizeDockBar.cpp.

References NULL.

00149 {
00150     int ActualSize = 0;
00151     for(int i=0;i<= m_arrBars.GetUpperBound();++i)
00152     {
00153         CCJControlBar *pBar = (CCJControlBar *)GetDockedControlBar(i);
00154         if (pBar != NULL && pBar->IsVisible())
00155         {
00156             ActualSize = m_iActualSize;
00157             break;
00158         }
00159     }
00160
00161     int cx=0,cy=0;
00162     if (nMode & LM_VERTDOCK) {
00163         cx = ActualSize ;
00164         cy = 32767;
00165     }
00166
00167     if (nMode & LM_HORZDOCK) {
00168         cx= 32767;
00169         cy = ActualSize;
00170     }
00171
00172     //Yiannhs. Use selective layout. Since the dock bar does not calculate the bar sizes yet
00173     if( !m_bLayoutQuery )
00174         CalcSizeBarLayout();
00175
00176     return CSize(cx,cy);
00177 }

void CCJSizeDockBar::CalcSizeBarLayout ( )

Definition at line 594 of file CJSizeDockBar.cpp.

References CCJControlBar::CalcDynamicLayout(), IsLastControlBar(), CCJControlBar::m_bToFit, CCJControlBar::m_bUnique, and NULL.

Referenced by Maximize(), Normalize(), RecalcAllExcept(), CCJMDIFrameWnd::RecalcAllExcept(), CCJMDIChildWnd::RecalcAllExcept(), and CCJFrameWnd::RecalcAllExcept().

00595 {
00596     //Yiannhs: It is necessary to set all Control bars in one row.
00597     //         till now multiple rows are not handled
00598     int VisCount = GetDockedVisibleCount();
00599     if( !VisCount )
00600         return;      //Yiannhs v6.07 moved this on top
00601
00602     AFX_SIZEPARENTPARAMS layout;
00603     layout.hDWP = ::BeginDeferWindowPos( m_arrBars.GetSize( ));
00604     CRect rectAvail;
00605     GetClientRect(&rectAvail);
00606
00607     int nCount = 0;
00608     int lastLeft = 0;
00609     int lastTop = 0;
00610
00611     for (int i = 0; i < m_arrBars.GetSize(); i++)
00612     {
00613         CCJControlBar* pBar = STATIC_DOWNCAST(CCJControlBar, (CObject*)GetDockedControlBar(i));
00614         if (pBar != NULL && pBar->IsVisible())
00615         {
00616             if(!pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar)))
00617                 continue;
00618
00619             CRect rectBar;
00620             ++nCount;
00621             pBar->GetWindowRect(&rectBar);
00622             pBar->m_bUnique = FALSE;        //Yiannhs ok in Ver 6.07
00623             ScreenToClient(&rectBar);
00624             CSize sizeIdeal = pBar->CalcDynamicLayout(-1, 0);
00625
00626             //Yiannhs  moved [if] code at the begining. It helps make these calculations near the top
00627             //         for checking the size of the last control bars
00628             int bIsLast = IsLastControlBar(i+1);
00629             pBar->m_bToFit = bIsLast;           //check fitting is setup here
00630             if( bIsLast && nCount == 1 ) {
00631                 pBar->m_bUnique = TRUE;
00632             }
00633
00635             //  so it is not completely hidden
00636             if( rectBar.right >= rectAvail.right && !bIsLast )
00637                 sizeIdeal.cx -= (sizeIdeal.cx / 4);
00638             if( rectBar.bottom >= rectAvail.bottom && !bIsLast )
00639                 sizeIdeal.cy -= (sizeIdeal.cy / 4);
00640
00641             //Yiannhs: The Dock bar is either horizontally or vertically docked itself.
00642             //         So are the ControlBars enclosed inside it. Since the control bars
00643             //         are docked, and Sizing dockbar does not derive from CCJControlBar
00644             //         we may be a bit more clever.
00645             if( m_dwStyle & CBRS_ORIENT_HORZ ) {//use some default data members
00646                 //horizontal;
00647                 rectBar.left = lastLeft;
00648                 rectBar.top = 0;
00649                 rectBar.bottom = rectAvail.Height();
00650                 rectBar.right = rectBar.left + sizeIdeal.cx;
00651
00652                 if( rectBar.left > lastLeft )
00653                     rectBar.left = lastLeft;
00654
00655                 lastLeft = rectBar.right;
00656                 if ( bIsLast ) {    //Yiannhs
00657                     rectBar.right = rectAvail.right;
00658                 }
00659
00660             } else if( m_dwStyle & CBRS_ORIENT_VERT ) {
00661                 //Vertical
00662                 rectBar.top = lastTop;
00663                 rectBar.left = 0;
00664                 rectBar.right = rectAvail.Width();
00665                 rectBar.bottom = rectBar.top + sizeIdeal.cy;
00666
00667                 if (rectBar.top > lastTop)
00668                     rectBar.top = lastTop;
00669
00670                 lastTop = rectBar.bottom;
00671                 if ( bIsLast ) {    //Yiannhs
00672                     rectBar.bottom = rectAvail.bottom;
00673                 }
00674             }
00675
00676             AfxRepositionWindow( &layout, pBar->m_hWnd, &rectBar );
00677         }
00678     }
00679
00680     // move and resize all the windows at once!
00681     if( layout.hDWP == NULL || !::EndDeferWindowPos( layout.hDWP ))
00682         TRACE0("Warning: DeferWindowPos failed - low system resources.\n");
00683 }

Here is the call graph for this function:

void CCJSizeDockBar::DoPaint ( CDC * pDC ) [virtual]

Definition at line 179 of file CJSizeDockBar.cpp.

00180 {
00181     CDockBar::DoPaint(pDC);
00182 }

void CCJSizeDockBar::DrawBorders | ( | CDC * | pDC,
 |  | CRect & | rect
 | ) |

Definition at line 495 of file CJSizeDockBar.cpp.

References AFX_IDW_SIZEBAR_BOTTOM, AFX_IDW_SIZEBAR_LEFT, AFX_IDW_SIZEBAR_RIGHT, AFX_IDW_SIZEBAR_TOP, m_bFlatBorder, and TRACK_BORDER_SIZE.

Referenced by EraseNonClient().

00496 {
00497     int cxBorderLeft    = 0;
00498     int cxBorderRight   = 0;
00499     int cyBorderTop     = 0;
00500     int cyBorderBottom  = 0;
00501
00502     CRect rc;
00503     rc.CopyRect(&rect);
00504
00505     //Yiannhs: i've replaced color variables with the afxdata ones.
00506     if (m_dwStyle & CBRS_BORDER_TOP) {
00507         pDC->FillSolidRect(rc.left, rc.top, rc.Width(), 1, afxData.clrBtnShadow);
00508         pDC->FillSolidRect(rc.left, rc.top+1, rc.Width(), 1, afxData.clrBtnHilite);
00509         cyBorderTop+=2;
00510     }
00511
00512     if (m_dwStyle & CBRS_BORDER_BOTTOM) {
00513         pDC->FillSolidRect(rc.left, rc.bottom-1, rc.Width(), 1, afxData.clrBtnHilite);
00514         pDC->FillSolidRect(rc.left, rc.bottom-2, rc.Width(), 1, afxData.clrBtnShadow);
00515         cyBorderBottom+=2;
00516     }
00517
00518     if (m_dwStyle & CBRS_BORDER_LEFT) {
00519         pDC->FillSolidRect(rc.left, rc.top, 1, rc.Height(), afxData.clrBtnShadow);
00520         pDC->FillSolidRect(rc.left+1, rc.top, 1, rc.Height(), afxData.clrBtnHilite);
00521         cxBorderLeft+=2;
00522     }
00523
00524     if (m_dwStyle & CBRS_BORDER_RIGHT) {
00525         pDC->FillSolidRect(rc.right-2, rc.top, 1, rc.Height(), afxData.clrBtnShadow);
00526         pDC->FillSolidRect(rc.right-1, rc.top, 1, rc.Height(), afxData.clrBtnHilite);
00527         cxBorderRight+=2;
00528     }
00529
00530     UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00531
00532     CRect rcTrack;
00533     rcTrack.CopyRect(&rc);
00534
00535     if (nID == AFX_IDW_SIZEBAR_LEFT) {
00536         rcTrack.left    = rc.right - TRACK_BORDER_SIZE;
00537         rcTrack.right  += 1;
00538         rcTrack.top    += 1;
00539         rcTrack.bottom -= 1;
00540         //Yiannhs moved below
00541         cxBorderRight = TRACK_BORDER_SIZE;
00542     }
00543
00544     else if (nID == AFX_IDW_SIZEBAR_TOP) {
00545         rcTrack.top = rc.bottom - TRACK_BORDER_SIZE;
00546         rcTrack.bottom+=1;
00547         //Yiannhs moved below
00548         cyBorderBottom = TRACK_BORDER_SIZE;
00549     }
00550
00551     else if (nID == AFX_IDW_SIZEBAR_RIGHT) {
00552         rcTrack.right   = rc.left + TRACK_BORDER_SIZE;
00553         rcTrack.left   -= 1;
00554         rcTrack.top    += 1;
00555         rcTrack.bottom -= 1;
00556         //Yiannhs moved below
00557         cxBorderLeft = TRACK_BORDER_SIZE;
00558     }
00559
00560     else if (nID == AFX_IDW_SIZEBAR_BOTTOM) {
00561         rcTrack.bottom = rc.top + TRACK_BORDER_SIZE;
00562         rcTrack.top-=1;
00563         //Yiannhs moved below
00564         cyBorderTop = TRACK_BORDER_SIZE;
00565     }
00566
00567     //Yiannhs Moved these here. in one place. The optimizer may do this, but lets help it.
00568     pDC->FillSolidRect(rcTrack, afxData.clrBtnFace);
00569     if( !m_bFlatBorder )    //Yiannhs handle flat borders
00570         pDC->Draw3dRect(rcTrack, afxData.clrBtnHilite, afxData.clrBtnShadow);
00571
00572     rect.left   += cxBorderLeft;
00573     rect.right  -= cxBorderRight;
00574     rect.top    += cyBorderTop;
00575     rect.bottom -= cyBorderBottom;
00576 }

void CCJSizeDockBar::EraseNonClient ( )

Definition at line 578 of file CJSizeDockBar.cpp.

References DrawBorders().

Referenced by OnNcPaint().

00579 {
00580     CWindowDC dc(this);
00581     CRect rectClient;
00582     GetClientRect(rectClient);
00583     CRect rectWindow;
00584     GetWindowRect(rectWindow);
00585     ScreenToClient(rectWindow);
00586     rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);
00587     dc.ExcludeClipRect(rectClient);
00588     rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);
00589     DrawBorders(&dc, rectWindow);
00590 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJSizeDockBar::FlatBorder ( BOOL bFlat = TRUE )

Definition at line 242 of file CJSizeDockBar.h.

References _CJXLIB_INLINE, m_bFlatBorder, and NULL.

Referenced by CCJMDIFrameWnd::EnableDockingSizeBar(), CCJMDIChildWnd::EnableDockingSizeBar(), and CCJFrameWnd::EnableDockingSizeBar().

00243     { if(m_bFlatBorder!=bFlat){m_bFlatBorder=bFlat;InvalidateRect(NULL,FALSE);UpdateWindow();}}

void CCJSizeDockBar::GetAvailableRect ( CRect & rect ) [protected]

Definition at line 455 of file CJSizeDockBar.cpp.

Referenced by OnLButtonUp(), and OnMouseMove().

00456 {
00457     GetDockingFrame()->GetClientRect(&rect);
00458     GetDockingFrame()->RepositionBars(0xffff, 0xffff, AFX_IDW_PANE_FIRST,reposQuery,
00459         &rect, &rect, TRUE);
00460 }

CCJControlBar * CCJSizeDockBar::GetDockedSizeBar ( int nPos )

Definition at line 476 of file CJSizeDockBar.cpp.

Referenced by CCJMiniDockFrameWnd::OnNcLButtonDblClk(), and CCJMiniDockFrameWnd::OnNcLButtonDown().

00477 {
00478     return (CCJControlBar*)GetDockedControlBar(nPos);
00479 }

void CCJSizeDockBar::HitTest ( const CPoint & point ) [virtual]

Definition at line 205 of file CJSizeDockBar.cpp.

References AFX_IDW_SIZEBAR_LEFT, AFX_IDW_SIZEBAR_RIGHT, AFX_IDW_SIZEBAR_TOP, IDC_HSPLITBAR, IDC_VSPLITBAR, m_bOkToDrag, NULL, and TRACK_BORDER_SIZE.

Referenced by OnNcHitTest().

00206 {
00207     UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00208     CRect rcWin;
00209     GetWindowRect(&rcWin);
00210     HCURSOR hCur = NULL;
00211
00212     //Yiannhs: Check the if statements, and change of variable TRackBorder size
00213     if (nID == AFX_IDW_SIZEBAR_LEFT || nID == AFX_IDW_SIZEBAR_RIGHT ) {
00214         //we are sure the DOCK bar is vertical
00215         if( nID == AFX_IDW_SIZEBAR_LEFT )
00216             rcWin.left = rcWin.right - TRACK_BORDER_SIZE;
00217         else
00218             rcWin.right = rcWin.left + TRACK_BORDER_SIZE;
00219
00220         if( rcWin.PtInRect(point) )
00221             hCur = AfxGetApp()->LoadCursor(IDC_HSPLITBAR);
00222
00223     } else {
00224         //The DOCK bar is horizontal
00225         if (nID == AFX_IDW_SIZEBAR_TOP)
00226             rcWin.top = rcWin.bottom - TRACK_BORDER_SIZE;
00227         else
00228             rcWin.bottom = rcWin.top + TRACK_BORDER_SIZE;
00229
00230         if( rcWin.PtInRect(point) )
00231             hCur = AfxGetApp()->LoadCursor(IDC_VSPLITBAR);
00232     }
00233
00234     if( hCur )
00235         SetCursor(hCur);
00236
00237     m_bOkToDrag = BOOL((long)hCur);
00238 }

_CJXLIB_INLINE BOOL CCJSizeDockBar::IsDockBar ( ) const [virtual]

Definition at line 233 of file CJSizeDockBar.h.

00234     { return m_bIsDockBar; }

_CJXLIB_INLINE BOOL CCJSizeDockBar::IsDockSizeBar ( ) const [virtual]

Definition at line 236 of file CJSizeDockBar.h.

References _CJXLIB_INLINE.

Referenced by CCJDockContext::CanDockDockBar().

00237     { return TRUE; }

BOOL CCJSizeDockBar::IsLastControlBar ( int index ) [protected]

Definition at line 462 of file CJSizeDockBar.cpp.

References NULL.

Referenced by CalcSizeBarLayout().

00463 {
00464     for( int i=index; i<m_arrBars.GetSize(); ++i)
00465     {
00466         CCJControlBar *pOther = (CCJControlBar *)GetDockedControlBar(i);
00467         if (pOther != NULL && pOther->IsVisible())
00468         {
00469             return FALSE;
00470         }
00471     }
00472
00473     return TRUE;
00474 }

void CCJSizeDockBar::Maximize ( CCJControlBar * )

Definition at line 685 of file CJSizeDockBar.cpp.

References CalcSizeBarLayout(), CCJControlBar::GetMinExt(), CCJControlBar::IsBottomDocked(), CCJControlBar::IsLeftDocked(), CCJControlBar::IsRightDocked(), CCJControlBar::IsTopDocked(), CCJControlBar::Maximize(), CCJControlBar::Minimize(), and NULL.

00686 {
00687     int iExt=0;
00688     CRect rectAvail;
00689     GetClientRect(rectAvail);
00690
00691     for (int i=0; i<m_arrBars.GetSize(); ++i)
00692     {
00693         CCJControlBar *pBarDock = (CCJControlBar *)GetDockedControlBar(i);
00694         if (pBarDock && pBarDock->IsVisible() && pBarDock != pBar) {
00695             pBarDock->Minimize();
00696             iExt += pBarDock->GetMinExt();
00697         }
00698     }
00699
00700     if (pBar->IsLeftDocked() || pBar->IsRightDocked()) {
00701         iExt = rectAvail.Height()-iExt;
00702     }
00703
00704     if (pBar->IsTopDocked() || pBar->IsBottomDocked()) {
00705         iExt = rectAvail.Width()-iExt;
00706     }
00707
00708     pBar->Maximize(iExt);
00709
00710     //1999-05-26 Yiannhs
00711     //do not care too much about flickering when maximizing controlbars
00712     CalcSizeBarLayout();
00713
00714     for (i=0; i<m_arrBars.GetSize(); ++i)
00715     {
00716         CCJControlBar *pBarDock = (CCJControlBar *)GetDockedControlBar(i);
00717         if (pBarDock && pBarDock->IsVisible() ) {
00718             pBarDock->InvalidateRect(NULL, TRUE);
00719             pBarDock->UpdateWindow();
00720         }
00721     }
00722     //1999-05-26 Yiannhs
00723 }

Here is the call graph for this function:

void CCJSizeDockBar::Normalize ( CCJControlBar * )

Definition at line 725 of file CJSizeDockBar.cpp.

References CalcSizeBarLayout(), CCJControlBar::Normalize(), and NULL.

00726 {
00727     for( int i=0; i<m_arrBars.GetSize(); ++i) {
00728         CCJControlBar *pBarDock = (CCJControlBar*)GetDockedControlBar(i);
00729         if (pBarDock && pBarDock->IsVisible())
00730             pBarDock->Normalize();
00731     }
00732
00733
00734     //1999-05-26 Yiannhs
00735     //do not care too much about flickering when maximizing controlbars
00736
00737     CalcSizeBarLayout();
00738
00739     for (i=0; i<m_arrBars.GetSize(); ++i)
00740     {
00741         CCJControlBar *pBarDock = (CCJControlBar *)GetDockedControlBar(i);
00742         if (pBarDock && pBarDock->IsVisible() ) {
00743             pBarDock->InvalidateRect(NULL, TRUE);
00744             pBarDock->UpdateWindow();
00745         }
00746     }
00747     //1999-05-26 Yiannhs
00748 }

Here is the call graph for this function:

void CCJSizeDockBar::OnInvertTracker ( const CRect & ) [virtual]

Definition at line 184 of file CJSizeDockBar.cpp.

References NULL.

Referenced by OnLButtonUp(), OnMouseMove(), and OnNcLButtonDown().

00185 {
00186     ASSERT_VALID(this);
00187     ASSERT(!rect.IsRectEmpty());
00188
00189     CDC* pDC = GetDockingFrame()->GetDC();
00190     CBrush* pBrush = CDC::GetHalftoneBrush();
00191     CBrush* pOldBrush = NULL;
00192
00193     if (pBrush != NULL) {
00194         pOldBrush = pDC->SelectObject(pBrush);
00195     }
00196
00197     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATINVERT);
00198
00199     if (pOldBrush != NULL) {
00200         pDC->SelectObject(pOldBrush);
00201     }
00202     GetDockingFrame()->ReleaseDC(pDC);
00203 }

void CCJSizeDockBar::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 330 of file CJSizeDockBar.cpp.

References AFX_IDW_SIZEBAR_BOTTOM, AFX_IDW_SIZEBAR_LEFT, AFX_IDW_SIZEBAR_RIGHT, AFX_IDW_SIZEBAR_TOP, GetAvailableRect(), m_bDragging, m_iActualSize, m_iSafeSpace, m_ptCurrent, m_ptStartDrag, m_rcTrack, NULL, OnInvertTracker(), RecalcAllExcept(), and TRACK_BORDER_SIZE.

00331 {
00332     if( m_ptCurrent == point ) {
00333         ReleaseCapture();
00334         m_bDragging = FALSE;
00335         OnInvertTracker(m_rcTrack);
00336         CDockBar::OnLButtonUp(nFlags, point);
00337     }
00338
00339     else if( m_bDragging )
00340     {
00341         CRect rectWin;
00342         CRect rectAvail;
00343         GetWindowRect(&rectWin);
00344         ReleaseCapture();
00345         m_bDragging = FALSE;
00346         OnInvertTracker(m_rcTrack);
00347         GetAvailableRect(rectAvail);
00348         UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00349
00350         if (nID == AFX_IDW_SIZEBAR_LEFT ) {
00351             int maxWidth = rectAvail.Width()-m_iSafeSpace;
00352             int newWidth = m_rcTrack.left-m_ptStartDrag.x;
00353             m_iActualSize = newWidth>maxWidth ? maxWidth: newWidth;
00354             m_iActualSize += rectWin.Width();
00355         }
00356
00357         else if (nID == AFX_IDW_SIZEBAR_TOP) {
00358             int maxHeight = rectAvail.Height()-m_iSafeSpace;
00359             int newHeight = m_rcTrack.top-m_ptStartDrag.y;
00360             m_iActualSize = newHeight>maxHeight ? maxHeight : newHeight;
00361             m_iActualSize += rectWin.Height();
00362         }
00363
00364         else if (nID == AFX_IDW_SIZEBAR_RIGHT) {
00365             int maxWidth = rectAvail.Width()-m_iSafeSpace;
00366             int newWidth = m_ptStartDrag.x-m_rcTrack.left;
00367             m_iActualSize = newWidth>maxWidth ? maxWidth: newWidth;
00368             m_iActualSize += rectWin.Width();
00369         }
00370
00371         else if (nID == AFX_IDW_SIZEBAR_BOTTOM) {
00372             int maxHeight = rectAvail.Height()-m_iSafeSpace;
00373             int newHeight = m_ptStartDrag.y-m_rcTrack.top;
00374             m_iActualSize = newHeight>maxHeight ? maxHeight : newHeight;
00375             m_iActualSize += rectWin.Height();
00376         }
00377
00378         if(m_iActualSize< TRACK_BORDER_SIZE )
00379             m_iActualSize = TRACK_BORDER_SIZE;
00380
00381         GetDockingFrame()->RecalcLayout();
00382         RecalcAllExcept(NULL);
00383
00384     } else {
00385         //Yiannhs
00386         CDockBar::OnLButtonUp(nFlags, point);
00387     }
00388 }

Here is the call graph for this function:

void CCJSizeDockBar::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 390 of file CJSizeDockBar.cpp.

References AFX_IDW_SIZEBAR_BOTTOM, AFX_IDW_SIZEBAR_LEFT, AFX_IDW_SIZEBAR_RIGHT, AFX_IDW_SIZEBAR_TOP, GetAvailableRect(), m_bDragging, m_iActualSize, m_ptCurDrag, m_rcTrack, OnInvertTracker(), and TRACK_BORDER_SIZE.

00391 {
00392     if( m_bDragging )
00393     {
00394         CRect rectWin;
00395         GetWindowRect(&rectWin);
00396         CRect rectAvail;
00397         GetAvailableRect(rectAvail);
00398         CFrameWnd *pFrame=GetDockingFrame();
00399         ClientToScreen(&point);
00400         pFrame->ScreenToClient(&point);
00401         UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00402
00403         if (nID == AFX_IDW_SIZEBAR_LEFT) {
00404             point.x = point.x > rectAvail.right ? rectAvail.right : point.x;
00405             point.x = point.x < TRACK_BORDER_SIZE ? TRACK_BORDER_SIZE : point.x;
00406         }
00407
00408         else if (nID == AFX_IDW_SIZEBAR_TOP) {
00409             point.y = point.y > rectAvail.bottom ? rectAvail.bottom : point.y;
00410             point.y = point.y < TRACK_BORDER_SIZE ? TRACK_BORDER_SIZE : point.y;
00411         }
00412
00413         else if (nID == AFX_IDW_SIZEBAR_RIGHT) {
00414             point.x = point.x < rectAvail.left ? rectAvail.left:point.x;
00415             point.x = point.x > rectAvail.right + m_iActualSize - TRACK_BORDER_SIZE ?
00416                                 rectAvail.right - TRACK_BORDER_SIZE + m_iActualSize : point.x;
00417         }
00418
00419         else if (nID == AFX_IDW_SIZEBAR_BOTTOM) {
00420             point.y = point.y < rectAvail.top ? rectAvail.top : point.y;
00421             point.y = point.y > rectAvail.bottom + m_iActualSize - TRACK_BORDER_SIZE ?
00422                                 rectAvail.bottom - TRACK_BORDER_SIZE + m_iActualSize : point.y;
00423         }
00424
00425         int deltaX = point.x - m_ptCurDrag.x;
00426         int deltaY = point.y - m_ptCurDrag.y;
00427
00428         m_ptCurDrag = point;
00429
00430         if (nID == AFX_IDW_SIZEBAR_LEFT || nID == AFX_IDW_SIZEBAR_RIGHT && deltaX)
00431         {
00432             OnInvertTracker(m_rcTrack);
00433             m_rcTrack.left+=deltaX;
00434             m_rcTrack.right+=deltaX;
00435             OnInvertTracker(m_rcTrack);
00436         }
00437
00438         else if( nID == AFX_IDW_SIZEBAR_TOP || nID == AFX_IDW_SIZEBAR_BOTTOM && deltaY)
00439         {
00440             OnInvertTracker(m_rcTrack);
00441             m_rcTrack.top+=deltaY;
00442             m_rcTrack.bottom+=deltaY;
00443             OnInvertTracker(m_rcTrack);
00444         }
00445
00446     } else {
00447         //Yiannhs
00448         CDockBar::OnMouseMove(nFlags, point);
00449     }
00450 }

Here is the call graph for this function:

void CCJSizeDockBar::OnNcCalcSize | ( | BOOL | bCalcValidRects,
 |  | NCCALCSIZE_PARAMS FAR * | lpncsp
 | ) | [protected]

Definition at line 248 of file CJSizeDockBar.cpp.

References AFX_IDW_SIZEBAR_BOTTOM, AFX_IDW_SIZEBAR_LEFT, AFX_IDW_SIZEBAR_RIGHT, AFX_IDW_SIZEBAR_TOP, and TRACK_BORDER_SIZE.

00249 {
00250     UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00251     //Yiannhs changed the tracksize variable
00252     if (nID == AFX_IDW_SIZEBAR_LEFT) {
00253         m_cyBottomBorder += TRACK_BORDER_SIZE;
00254         CDockBar::OnNcCalcSize(bCalcValidRects, lpncsp);
00255         m_cyBottomBorder -= TRACK_BORDER_SIZE;
00256     }
00257
00258     else if (nID == AFX_IDW_SIZEBAR_TOP) {
00259         m_cyBottomBorder += TRACK_BORDER_SIZE;
00260         CDockBar::OnNcCalcSize(bCalcValidRects, lpncsp);
00261         m_cyBottomBorder -= TRACK_BORDER_SIZE;
00262     }
00263
00264     else if (nID == AFX_IDW_SIZEBAR_RIGHT) {
00265         m_cyTopBorder += TRACK_BORDER_SIZE;
00266         CDockBar::OnNcCalcSize(bCalcValidRects, lpncsp);
00267         m_cyTopBorder -= TRACK_BORDER_SIZE;
00268     }
00269
00270     else if (nID == AFX_IDW_SIZEBAR_BOTTOM) {
00271         m_cyTopBorder += TRACK_BORDER_SIZE;
00272         CDockBar::OnNcCalcSize(bCalcValidRects, lpncsp);
00273         m_cyTopBorder -= TRACK_BORDER_SIZE;
00274     }
00275 }

UINT CCJSizeDockBar::OnNcHitTest ( CPoint point ) [protected]

Definition at line 283 of file CJSizeDockBar.cpp.

References HitTest(), and m_bOkToDrag.

00284 {
00285     HitTest(point);
00286     return (m_bOkToDrag)?HTBORDER:CDockBar::OnNcHitTest(point);
00287 }

Here is the call graph for this function:

void CCJSizeDockBar::OnNcLButtonDown | ( | UINT | nHitTest,
 |  | CPoint | point
 | ) | [protected]

Definition at line 289 of file CJSizeDockBar.cpp.

References AFX_IDW_SIZEBAR_BOTTOM, AFX_IDW_SIZEBAR_LEFT, AFX_IDW_SIZEBAR_RIGHT, AFX_IDW_SIZEBAR_TOP, m_bDragging, m_bOkToDrag, m_ptCurDrag, m_ptCurrent, m_ptStartDrag, m_rcTrack, OnInvertTracker(), and TRACK_BORDER_SIZE.

00290 {
00291     // save the current cursor postion.
00292     m_ptCurrent = point;
00293     ScreenToClient(&m_ptCurrent);
00294
00295     if( m_bOkToDrag )
00296     {
00297         UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00298         CFrameWnd *pFrame=GetDockingFrame();
00299         GetWindowRect(m_rcTrack);
00300
00301         //Yiannhs changed tracsize variable
00302         if (nID == AFX_IDW_SIZEBAR_LEFT)
00303             m_rcTrack.left = m_rcTrack.right - TRACK_BORDER_SIZE;
00304
00305         else if (nID == AFX_IDW_SIZEBAR_TOP)
00306             m_rcTrack.top = m_rcTrack.bottom - TRACK_BORDER_SIZE;
00307
00308         else if (nID == AFX_IDW_SIZEBAR_RIGHT)
00309             m_rcTrack.right = m_rcTrack.left + TRACK_BORDER_SIZE;
00310
00311         else if (nID == AFX_IDW_SIZEBAR_BOTTOM)
00312             m_rcTrack.bottom = m_rcTrack.top + TRACK_BORDER_SIZE;
00313
00314         pFrame->ScreenToClient(&m_rcTrack);
00315         pFrame->ScreenToClient(&point);
00316
00317         m_ptStartDrag = point;
00318         m_ptCurDrag = point;
00319
00320         SetCapture();
00321         m_bDragging = TRUE;
00322         OnInvertTracker(m_rcTrack);
00323
00324     } else {
00325         //Yiannhs
00326         CDockBar::OnNcLButtonDown(nHitTest, point);
00327     }
00328 }

Here is the call graph for this function:

void CCJSizeDockBar::OnNcPaint ( ) [protected]

Definition at line 243 of file CJSizeDockBar.cpp.

References EraseNonClient().

00244 {
00245     EraseNonClient();
00246 }

Here is the call graph for this function:

BOOL CCJSizeDockBar::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message
 | ) | [protected]

Definition at line 277 of file CJSizeDockBar.cpp.

00278 {
00279     return (nHitTest == HTCLIENT)?
00280         CDockBar::OnSetCursor(pWnd, nHitTest, message):FALSE;
00281 }

void CCJSizeDockBar::RecalcAllExcept ( CCJSizeDockBar * pBar )

Definition at line 481 of file CJSizeDockBar.cpp.

References CalcSizeBarLayout(), dwSizeBarMap, and NULL.

Referenced by OnLButtonUp().

00482 {
00483     CFrameWnd *pFrame = GetParentFrame();
00484     ASSERT_VALID(pFrame);
00485
00486     for (int i = 0; i < 4; i++)
00487     {
00488         CCJSizeDockBar* pDock = (CCJSizeDockBar*)pFrame->GetControlBar(dwSizeBarMap[i][0]);
00489         if (pDock != NULL && pDock != pBar) {
00490             pDock->CalcSizeBarLayout();
00491         }
00492     }
00493 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJSizeDockBar::SetActualSize ( int iSize )

Definition at line 239 of file CJSizeDockBar.h.

References _CJXLIB_INLINE, and m_iActualSize.

Referenced by CCJMDIFrameWnd::DockSizeBar(), CCJMDIChildWnd::DockSizeBar(), and CCJFrameWnd::DockSizeBar().

00240     { m_iActualSize=iSize; }

Member Data Documentation

BOOL CCJSizeDockBar::m_bDragging [protected]

Definition at line 126 of file CJSizeDockBar.h.

Referenced by CCJSizeDockBar(), OnLButtonUp(), OnMouseMove(), and OnNcLButtonDown().

BOOL CCJSizeDockBar::m_bFlatBorder [protected]

Definition at line 142 of file CJSizeDockBar.h.

Referenced by CCJSizeDockBar(), DrawBorders(), and FlatBorder().

bool CCJSizeDockBar::m_bIsDockBar = false [static]

Definition at line 106 of file CJSizeDockBar.cpp.

BOOL CCJSizeDockBar::m_bOkToDrag [protected]

Definition at line 129 of file CJSizeDockBar.h.

Referenced by CCJSizeDockBar(), HitTest(), OnNcHitTest(), and OnNcLButtonDown().

HCURSOR CCJSizeDockBar::m_curHSplitBar [protected]

Definition at line 136 of file CJSizeDockBar.h.

HCURSOR CCJSizeDockBar::m_curVSplitBar [protected]

Definition at line 139 of file CJSizeDockBar.h.

int CCJSizeDockBar::m_iActualSize [protected]

Definition at line 124 of file CJSizeDockBar.h.

Referenced by CCJSizeDockBar(), OnLButtonUp(), OnMouseMove(), and SetActualSize().

int CCJSizeDockBar::m_iSafeSpace [protected]

Definition at line 122 of file CJSizeDockBar.h.

Referenced by CCJSizeDockBar(), and OnLButtonUp().

CPoint CCJSizeDockBar::m_ptCurDrag [protected]

Definition at line 133 of file CJSizeDockBar.h.

Referenced by OnMouseMove(), and OnNcLButtonDown().

CPoint CCJSizeDockBar::m_ptCurrent [protected]

Definition at line 143 of file CJSizeDockBar.h.

Referenced by CCJSizeDockBar(), OnLButtonUp(), and OnNcLButtonDown().

CPoint CCJSizeDockBar::m_ptStartDrag [protected]

Definition at line 134 of file CJSizeDockBar.h.

Referenced by OnLButtonUp(), and OnNcLButtonDown().

CRect CCJSizeDockBar::m_rcTrack [protected]

Definition at line 132 of file CJSizeDockBar.h.

Referenced by OnLButtonUp(), OnMouseMove(), and OnNcLButtonDown().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJSizeDockBar.h
  • WinCvs/CJLib/CJLibrary/CJSizeDockBar.cpp
Generated on Sat Aug 7 22:50:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJSortClass Class Reference

CCJSortClass Class Reference

#include <CJSortClass.h>

Collaboration diagram for CCJSortClass:

[legend]
List of all members.

Public Member Functions

CCJSortClass (CListCtrl *pWnd, const int nCol)
virtual | ~CCJSortClass ()
virtual void | Sort (bool bAsc, DATA_TYPE eType)

Static Protected Member Functions

int CALLBACK | Compare (LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)

Protected Attributes

CListCtrl * | m_pWnd

Constructor & Destructor Documentation

CCJSortClass::CCJSortClass | ( | CListCtrl * | pWnd,
 |  | const int | nCol
 | ) |

Definition at line 38 of file CJSortClass.cpp.

References m_pWnd.

00039 {
00040     ASSERT(pWnd);
00041     m_pWnd = pWnd;
00042
00043     int nCount = m_pWnd->GetItemCount();
00044     DWORD dwData;
00045     CString strItemText;
00046
00047     // replace Item data with pointer to CSortItem structure
00048     for (int i = 0; i < nCount; i++)
00049     {
00050         dwData = m_pWnd->GetItemData(i); // save current data to restore it later
00051         strItemText = m_pWnd->GetItemText(i, nCol);
00052         m_pWnd->SetItemData(i, (DWORD) new CSortItem(dwData, strItemText));
00053     }
00054 }

CCJSortClass::~CCJSortClass ( ) [virtual]

Definition at line 56 of file CJSortClass.cpp.

References CCJSortClass::CSortItem::m_dwData, and m_pWnd.

00057 {
00058     ASSERT(m_pWnd);
00059     int nCount = m_pWnd->GetItemCount();
00060     CSortItem * pItem;
00061     for (int i = 0; i < nCount; i++)
00062     {
00063         pItem = (CSortItem *) m_pWnd->GetItemData(i);
00064         ASSERT(pItem);
00065         m_pWnd->SetItemData(i, pItem->m_dwData);
00066         delete pItem;
00067     }
00068 }

Member Function Documentation

int CALLBACK CCJSortClass::Compare | ( | LPARAM | lParam1,
 |  | LPARAM | lParam2,
 |  | LPARAM | lParamSort
 | ) | [static, protected]

Definition at line 81 of file CJSortClass.cpp.

References DATA_TYPE, DT_DATETIME, DT_DEC, DT_INT, DT_STRING, CCJSortClass::CSortItem::m_strItemText, and NULL.

Referenced by Sort().

00082 {
00083     CSortItem* item1 = (CSortItem *) lParam1;
00084     CSortItem* item2 = (CSortItem *) lParam2;
00085
00086     ASSERT(item1 && item2);
00087
00088     // restore data type and sort order from lParamSort
00089     // if lParamSort positive - ascending sort order, negative - descending
00090     short     sOrder = lParamSort < 0 ? (short) -1 : (short) 1;
00091
00092     DATA_TYPE eType  = (DATA_TYPE) (lParamSort * sOrder); // get rid of sign
00093
00094     // declare typed buffers
00095     COleDateTime t1, t2;
00096
00097     switch (eType)
00098     {
00099     case DT_INT:
00100         return ( _ttol( item1->m_strItemText ) - _ttol( item2->m_strItemText )) * sOrder;
00101
00102     case DT_DEC:
00103 #ifdef _UNICODE
00104         {
00105             char szText1[ 256 ];
00106             char szText2[ 256 ];
00107
00108             WideCharToMultiByte( CP_ACP,
00109                                  0,
00110                                  item1->m_strItemText,
00111                                  -1,
00112                                  szText1,
00113                                  255,
00114                                  NULL,
00115                                  NULL );
00116
00117             WideCharToMultiByte( CP_ACP,
00118                                  0,
00119                                  item2->m_strItemText,
00120                                  -1,
00121                                  szText2,
00122                                  255,
00123                                  NULL,
00124                                  NULL );
00125
00126
00127             return ( atof( szText1 ) < atof( szText2 ) ? -1 : 1) * sOrder;
00128         }
00129 #else
00130         return ( atof ( item1->m_strItemText ) < atof( item2->m_strItemText ) ? -1 : 1) * sOrder;
00131 #endif
00132
00133     case DT_DATETIME:
00134         if( t1.ParseDateTime( item1->m_strItemText ) && t2.ParseDateTime( item2->m_strItemText ))
00135         {
00136             return (t1 < t2 ? -1 : 1 ) * sOrder;
00137         }
00138         return 0;
00139
00140     case DT_STRING:
00141         return item1->m_strItemText.CompareNoCase( item2->m_strItemText ) * sOrder;
00142
00143     default:
00144         ASSERT("Error: attempt to sort a column without type.");
00145         return 0;
00146     }
00147 }

void CCJSortClass::Sort | ( | bool | bAsc,
 |  | DATA_TYPE | eType
 | ) | [virtual]

Definition at line 70 of file CJSortClass.cpp.

References Compare(), and m_pWnd.

00071 {
00072     long lParamSort = eType;
00073
00074     // if lParamSort positive - ascending sort order, negative - descending
00075     if (!bAsc)
00076         lParamSort *= -1;
00077
00078     m_pWnd->SortItems(Compare, lParamSort);
00079 }

Here is the call graph for this function:

Member Data Documentation

CListCtrl* CCJSortClass::m_pWnd [protected]

Definition at line 70 of file CJSortClass.h.

Referenced by CCJSortClass(), Sort(), and ~CCJSortClass().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJSortClass.h
  • WinCvs/CJLib/CJLibrary/CJSortClass.cpp
Generated on Sat Aug 7 22:50:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJSortClass::CSortItem Struct Reference

CCJSortClass::CSortItem Struct Reference

#include <CJSortClass.h>

Collaboration diagram for CCJSortClass::CSortItem:

[legend]
List of all members.

Public Member Functions

CSortItem (const DWORD dwData, const CString &strItemText)

Public Attributes

DWORD | m_dwData
CString | m_strItemText

Constructor & Destructor Documentation

_CJXLIB_INLINE CCJSortClass::CSortItem::CSortItem | ( | const DWORD | dwData,
 |  | const CString & | strItemText
 | ) |

Definition at line 91 of file CJSortClass.h.

References _CJXLIB_INLINE, m_dwData, and m_strItemText.

00092     { m_dwData  = dwData; m_strItemText = strItemText; }

Member Data Documentation

DWORD CCJSortClass::CSortItem::m_dwData

Definition at line 82 of file CJSortClass.h.

Referenced by CSortItem(), and CCJSortClass::~CCJSortClass().

CString CCJSortClass::CSortItem::m_strItemText

Definition at line 83 of file CJSortClass.h.

Referenced by CCJSortClass::Compare(), and CSortItem().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/CJSortClass.h
Generated on Sat Aug 7 22:50:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJStatusBar Class Reference

CCJStatusBar Class Reference

#include <CJStatusBar.h>

Inheritance diagram for CCJStatusBar:

[legend]
Collaboration diagram for CCJStatusBar:

[legend]
List of all members.

Public Member Functions

CCJStatusBar ()
virtual | ~CCJStatusBar ()
virtual void | PositionControls ()
virtual CCJStatusBarPaneControlInfo * | GetPanControl (int nPaneID)
virtual BOOL | AddControl (CWnd *pWnd, int nPaneID, BOOL bAutodeleteControl=TRUE)
virtual void | SetPaneWidth (int index, int cxWidth)
virtual BOOL | AddIndicator (int position, UINT paneID)
virtual BOOL | GetStatusPane (int nIndex, CCJStatusBarPane &xfxpane)
virtual void | RemovePane (int nPaneID)

Protected Member Functions

afx_msg void | OnSize (UINT nType, int cx, int cy)

Private Attributes

CArray< CCJStatusBarPaneControlInfo *,
CCJStatusBarPaneControlInfo * > 		m_aPans

Constructor & Destructor Documentation

CCJStatusBar::CCJStatusBar ( )

Definition at line 87 of file CJStatusBar.cpp.

00088 {
00089     // TODO: add construction code here.
00090 }

CCJStatusBar::~CCJStatusBar ( ) [virtual]

Definition at line 92 of file CJStatusBar.cpp.

References m_aPans.

00093 {
00094     for( int i = 0; i < m_aPans.GetSize(); i++ )
00095     {
00096         if( m_aPans[i]->m_pWnd && ::IsWindow(m_aPans[i]->m_pWnd->m_hWnd) )
00097             m_aPans[i]->m_pWnd->CloseWindow();
00098         if( m_aPans[i]->m_bAutodelete )
00099         {
00100             delete m_aPans[i]->m_pWnd;
00101         }
00102         delete m_aPans[i];
00103     }
00104 }

Member Function Documentation

BOOL CCJStatusBar::AddControl | ( | CWnd * | pWnd,
 |  | int | nPaneID,
 |  | BOOL | bAutodeleteControl = TRUE
 | ) | [virtual]

Definition at line 159 of file CJStatusBar.cpp.

References GetPanControl(), m_aPans, CCJStatusBarPaneControlInfo::m_bAutodelete, CCJStatusBarPaneControlInfo::m_nPaneID, CCJStatusBarPaneControlInfo::m_pWnd, and PositionControls().

00160 {
00161
00162     CCJStatusBarPaneControlInfo * pPanInfo = GetPanControl(paneID);
00163     if( pPanInfo )
00164         return FALSE;
00165
00166     int idx = CommandToIndex( paneID ) ;
00167     if( idx == -1 )
00168         return FALSE;
00169
00170     CCJStatusBarPaneControlInfo * pPan = new CCJStatusBarPaneControlInfo;
00171     pPan->m_nPaneID =  paneID;
00172     pPan->m_pWnd    =  pWnd;
00173     pPan->m_bAutodelete = bAutodeleteControl;
00174
00175     m_aPans.Add(pPan);
00176     PositionControls();
00177     Invalidate(TRUE);
00178     return TRUE;
00179 }

Here is the call graph for this function:

BOOL CCJStatusBar::AddIndicator | ( | int | position,
 |  | UINT | paneID
 | ) | [virtual]

Definition at line 200 of file CJStatusBar.cpp.

References GetStatusPane(), CCJStatusBarPane::m_nID, PositionControls(), and SetPaneWidth().

00201 {
00202     CArray<CCJStatusBarPane,CCJStatusBarPane> arPanes;
00203
00204     CCJStatusBarPane statusPane;
00205     int i;
00206
00207     i = 0;
00208     while( GetStatusPane(i,statusPane) )
00209     {
00210         arPanes.Add( statusPane );
00211         i++;
00212     }
00213     if( position < 0 )
00214         position = 0;
00215     if( position > arPanes.GetSize() )
00216         position = arPanes.GetSize()-1;
00217
00218     for(i = 0; i < arPanes.GetSize(); i ++ )
00219     {
00220         if( paneID == arPanes[i].m_nID )
00221         {
00222             TRACE0( "CCJStatusBar::AddIndicator(): Pane ID already exists \n" );
00223             return FALSE;
00224         }
00225     }
00226
00227     CCJStatusBarPane new_statusPane;
00228     new_statusPane.m_nID = paneID;
00229     if( arPanes.GetSize() )
00230         arPanes.InsertAt(position,new_statusPane);
00231     else
00232         arPanes.Add(new_statusPane);
00233
00234     UINT * pIndicators = new UINT[arPanes.GetSize()];
00235     for(i=0;i<arPanes.GetSize();i++)
00236         pIndicators[i]=arPanes[i].m_nID;
00237
00238     SetRedraw(FALSE);
00239     SetIndicators(pIndicators,arPanes.GetSize());
00240
00241     // Replace infos of indicators ..
00242     for(i = 0; i < arPanes.GetSize(); i++ )
00243     {
00244         if( arPanes[i].m_nID != paneID )
00245         {
00246             SetPaneInfo(i,arPanes[i].m_nID,arPanes[i].m_nStyle,arPanes[i].m_cxText);
00247             SetPaneText(i,arPanes[i].m_strText);
00248         }
00249         else
00250         {
00251             SetPaneWidth(i,50);
00252             SetPaneText(i,arPanes[i].m_strText);
00253         }
00254
00255     }
00256
00257     delete [] pIndicators;
00258     SetRedraw(TRUE);
00259     PositionControls();
00260     Invalidate(TRUE);
00261     return TRUE;
00262 }

Here is the call graph for this function:

CCJStatusBarPaneControlInfo * CCJStatusBar::GetPanControl ( int nPaneID ) [virtual]

Definition at line 149 of file CJStatusBar.cpp.

References m_aPans, and NULL.

Referenced by AddControl().

00150 {
00151     for(int i = 0; i < m_aPans.GetSize(); i++ )
00152     {
00153         if( m_aPans[i]->m_nPaneID == nPaneID )
00154             return m_aPans[i];
00155     }
00156     return NULL;
00157 }

BOOL CCJStatusBar::GetStatusPane | ( | int | nIndex,
 |  | CCJStatusBarPane & | xfxpane
 | ) | [virtual]

Definition at line 189 of file CJStatusBar.cpp.

References CCJStatusBarPane::m_cxText, CCJStatusBarPane::m_nID, CCJStatusBarPane::m_nStyle, and CCJStatusBarPane::m_strText.

Referenced by AddIndicator(), and RemovePane().

00190 {
00191     if( nIndex < m_nCount  && nIndex >= 0 )
00192     {
00193         GetPaneInfo( nIndex,  rPane.m_nID, rPane.m_nStyle, rPane.m_cxText ) ;
00194         GetPaneText( nIndex , rPane.m_strText );
00195         return TRUE;
00196     }
00197     return FALSE;
00198 }

void CCJStatusBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy
 | ) | [protected]

Definition at line 117 of file CJStatusBar.cpp.

00118 {
00119     CStatusBar::OnSize(nType, cx, cy);
00120     PositionControls();
00121 }

void CCJStatusBar::PositionControls ( ) [virtual]

Definition at line 123 of file CJStatusBar.cpp.

References m_aPans.

Referenced by AddControl(), AddIndicator(), and RemovePane().

00124 {
00125     int h,v,s;
00126     GetStatusBarCtrl( ).GetBorders( h, v, s ) ;
00127
00128
00129     for(int i = 0; i < m_aPans.GetSize(); i++ )
00130     {
00131         CRect rect;
00132
00133         int index = CommandToIndex( m_aPans[i]->m_nPaneID );
00134         GetItemRect(index,rect);
00135         if( (GetPaneStyle(index) & SBPS_NOBORDERS) == SBPS_NOBORDERS)
00136             m_aPans[i]->m_pWnd->MoveWindow(rect);
00137         else
00138         {
00139             rect.top+=v;
00140             rect.bottom-=v;
00141             rect.left+=h+s;
00142             rect.right-=(h+s);
00143             m_aPans[i]->m_pWnd->MoveWindow(rect);
00144         }
00145
00146     }
00147 }

void CCJStatusBar::RemovePane ( int nPaneID ) [virtual]

Definition at line 264 of file CJStatusBar.cpp.

References GetStatusPane(), m_aPans, CCJStatusBarPane::m_nID, NULL, and PositionControls().

00265 {
00266     SetRedraw(FALSE);
00267     CWnd * pwnd = NULL;
00268     for( int i = 0; i < m_aPans.GetSize(); i++ )
00269     {
00270         if( m_aPans[i]->m_nPaneID == nPaneID )
00271         {
00272             if( m_aPans[i]->m_bAutodelete )
00273                 pwnd = m_aPans[i]->m_pWnd;
00274             delete m_aPans[i];
00275             m_aPans.RemoveAt(i);
00276             break;
00277         }
00278     }
00279     if( pwnd )
00280     {
00281         pwnd->DestroyWindow();
00282         delete pwnd;
00283     }
00284
00285     CArray<CCJStatusBarPane,CCJStatusBarPane> arPanes;
00286     CCJStatusBarPane statusPane;
00287     i = 0;
00288     while( GetStatusPane(i,statusPane) )
00289     {
00290         if( statusPane.m_nID != (UINT)nPaneID )
00291             arPanes.Add( statusPane );
00292         i++;
00293     }
00294     // Now remove the indicator
00295     UINT * pIndicators = new UINT[arPanes.GetSize()];
00296     for(i=0;i<arPanes.GetSize();i++)
00297         pIndicators[i]=arPanes[i].m_nID;
00298     SetIndicators(pIndicators,arPanes.GetSize());
00299
00300     // Replace infos of indicators ..
00301     for(i = 0; i < arPanes.GetSize(); i++ )
00302     {
00303         SetPaneInfo(i,arPanes[i].m_nID,arPanes[i].m_nStyle,arPanes[i].m_cxText);
00304         SetPaneText(i,arPanes[i].m_strText);
00305     }
00306
00307     delete [] pIndicators;
00308     SetRedraw(TRUE);
00309     PositionControls();
00310     Invalidate(TRUE);
00311 }

Here is the call graph for this function:

void CCJStatusBar::SetPaneWidth | ( | int | index,
 |  | int | cxWidth
 | ) | [virtual]

Definition at line 181 of file CJStatusBar.cpp.

Referenced by AddIndicator().

00182 {
00183     UINT nID,nStyle;
00184     int width;
00185     GetPaneInfo(index,nID,nStyle,width);
00186     SetPaneInfo(index,nID,nStyle,cxWidth);
00187 }

Member Data Documentation

CArray<CCJStatusBarPaneControlInfo*, CCJStatusBarPaneControlInfo*> CCJStatusBar::m_aPans [private]

Definition at line 85 of file CJStatusBar.h.

Referenced by AddControl(), GetPanControl(), PositionControls(), RemovePane(), and ~CCJStatusBar().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJStatusBar.h
  • WinCvs/CJLib/CJLibrary/CJStatusBar.cpp
Generated on Sat Aug 7 22:50:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJStatusBarPane Class Reference

CCJStatusBarPane Class Reference

#include <CJStatusBar.h>

Inheritance diagram for CCJStatusBarPane:

[legend]
Collaboration diagram for CCJStatusBarPane:

[legend]
List of all members.

Public Member Functions

CCJStatusBarPane ()
CCJStatusBarPane (CCJStatusBarPane &rPane)
virtual | ~CCJStatusBarPane ()
CCJStatusBarPane & | operator= (CCJStatusBarPane &rPane)

Public Attributes

UINT | m_nID
int m_cxText
UINT | m_nStyle
UINT | m_nFlags
CString | m_strText

Constructor & Destructor Documentation

CCJStatusBarPane::CCJStatusBarPane ( )

Definition at line 55 of file CJStatusBar.cpp.

00056 {
00057     // TODO: add construction code here.
00058 }

CCJStatusBarPane::CCJStatusBarPane ( CCJStatusBarPane & rPane )

Definition at line 60 of file CJStatusBar.cpp.

References m_cxText, m_nFlags, m_nID, m_nStyle, and m_strText.

00061 {
00062     m_nID     = rPane.m_nID;
00063     m_cxText  = rPane.m_cxText;
00064     m_nStyle  = rPane.m_nStyle;
00065     m_nFlags  = rPane.m_nFlags;
00066     m_strText = rPane.m_strText;
00067 }

CCJStatusBarPane::~CCJStatusBarPane ( ) [virtual]

Definition at line 69 of file CJStatusBar.cpp.

00070 {
00071     // TODO: add destruction code here.
00072 }

Member Function Documentation

CCJStatusBarPane & CCJStatusBarPane::operator= ( CCJStatusBarPane & rPane )

Definition at line 74 of file CJStatusBar.cpp.

References m_cxText, m_nFlags, m_nID, m_nStyle, and m_strText.

00075 {
00076     m_nID     = rPane.m_nID;
00077     m_cxText  = rPane.m_cxText;
00078     m_nStyle  = rPane.m_nStyle;
00079     m_nFlags  = rPane.m_nFlags;
00080     m_strText = rPane.m_strText;
00081     return *this;
00082 }

Member Data Documentation

int CCJStatusBarPane::m_cxText

Definition at line 61 of file CJStatusBar.h.

Referenced by CCJStatusBarPane(), CCJStatusBar::GetStatusPane(), and operator=().

UINT CCJStatusBarPane::m_nFlags

Definition at line 63 of file CJStatusBar.h.

Referenced by CCJStatusBarPane(), and operator=().

UINT CCJStatusBarPane::m_nID

Definition at line 60 of file CJStatusBar.h.

Referenced by CCJStatusBar::AddIndicator(), CCJStatusBarPane(), CCJStatusBar::GetStatusPane(), operator=(), and CCJStatusBar::RemovePane().

UINT CCJStatusBarPane::m_nStyle

Definition at line 62 of file CJStatusBar.h.

Referenced by CCJStatusBarPane(), CCJStatusBar::GetStatusPane(), and operator=().

CString CCJStatusBarPane::m_strText

Definition at line 64 of file CJStatusBar.h.

Referenced by CCJStatusBarPane(), CCJStatusBar::GetStatusPane(), and operator=().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJStatusBar.h
  • WinCvs/CJLib/CJLibrary/CJStatusBar.cpp
Generated on Sat Aug 7 22:50:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJStatusBarPaneControlInfo Class Reference

CCJStatusBarPaneControlInfo Class Reference

#include <CJStatusBar.h>

Inheritance diagram for CCJStatusBarPaneControlInfo:

[legend]
Collaboration diagram for CCJStatusBarPaneControlInfo:

[legend]
List of all members.

Public Member Functions

CCJStatusBarPaneControlInfo ()
virtual | ~CCJStatusBarPaneControlInfo ()

Public Attributes

CWnd * | m_pWnd
int m_nPaneID
BOOL | m_bAutodelete

Constructor & Destructor Documentation

CCJStatusBarPaneControlInfo::CCJStatusBarPaneControlInfo ( )

Definition at line 38 of file CJStatusBar.cpp.

References m_bAutodelete, m_nPaneID, m_pWnd, and NULL.

00039 {
00040     m_pWnd        = NULL;
00041     m_bAutodelete = TRUE;
00042     m_nPaneID     = 0;
00043 }

CCJStatusBarPaneControlInfo::~CCJStatusBarPaneControlInfo ( ) [virtual]

Definition at line 45 of file CJStatusBar.cpp.

00046 {
00047     // TODO: add destruction code here.
00048 }

Member Data Documentation

BOOL CCJStatusBarPaneControlInfo::m_bAutodelete

Definition at line 44 of file CJStatusBar.h.

Referenced by CCJStatusBar::AddControl(), and CCJStatusBarPaneControlInfo().

int CCJStatusBarPaneControlInfo::m_nPaneID

Definition at line 43 of file CJStatusBar.h.

Referenced by CCJStatusBar::AddControl(), and CCJStatusBarPaneControlInfo().

CWnd* CCJStatusBarPaneControlInfo::m_pWnd

Definition at line 42 of file CJStatusBar.h.

Referenced by CCJStatusBar::AddControl(), and CCJStatusBarPaneControlInfo().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJStatusBar.h
  • WinCvs/CJLib/CJLibrary/CJStatusBar.cpp
Generated on Sat Aug 7 22:50:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJTabCtrl Class Reference

CCJTabCtrl Class Reference

#include <CJTabCtrl.h>

Inheritance diagram for CCJTabCtrl:

[legend]
Collaboration diagram for CCJTabCtrl:

[legend]
List of all members.

Public Member Functions

CCJTabCtrl ()
virtual | ~CCJTabCtrl ()
virtual void | UpdateFont ()
virtual void | SetMenuID (UINT popupMenuID, UINT popToolbarID=0, int nPos=0)
virtual UINT | GetMenuID ()
virtual BOOL | Create (CWnd *pParentWnd, UINT nID=AFX_IDC_TAB_CONTROL, DWORD dwStyle=WS_VISIBLE|WS_CHILD|TCS_BOTTOM|TCS_TOOLTIPS|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, const CRect &rect=CRect(0, 0, 0, 0))

Public Attributes

UINT | m_popToolbarID
UINT | m_popupMenuID
CCJMenu m_popupMenu
int m_nPos
CFont | m_Font

Protected Member Functions

afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnMeasureItem (int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
afx_msg LRESULT | OnMenuChar (UINT nChar, UINT nFlags, CMenu *pMenu)
afx_msg void | OnInitMenuPopup (CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Constructor & Destructor Documentation

CCJTabCtrl::CCJTabCtrl ( )

Definition at line 110 of file CJTabCtrl.cpp.

References m_nPos, m_popToolbarID, and m_popupMenuID.

00111 {
00112     m_popupMenuID   = 0;
00113     m_popToolbarID  = 0;
00114     m_nPos          = 0;
00115 }

CCJTabCtrl::~CCJTabCtrl ( ) [virtual]

Definition at line 117 of file CJTabCtrl.cpp.

References m_Font.

00118 {
00119     // fix potential resource leak - KStowell - 10-22-99.
00120     m_Font.DeleteObject();
00121 }

Member Function Documentation

BOOL CCJTabCtrl::Create | ( | CWnd * | pParentWnd,
 |  | UINT | nID = AFX_IDC_TAB_CONTROL,
 |  | DWORD | dwStyle = WS_VISIBLE|WS_CHILD|TCS_BOTTOM|TCS_TOOLTIPS|WS_CLIPSIBLINGS|WS_CLIPCHILDREN,
 |  | const CRect & | rect = CRect(0, 0, 0, 0)
 | ) | [virtual]

Definition at line 209 of file CJTabCtrl.cpp.

References UpdateFont().

Referenced by CCJTabCtrlBar::OnCreate().

00210 {
00211     if (!CTabCtrl::Create(dwStyle, rect, pParentWnd, nID))
00212         return FALSE;
00213
00214     UpdateFont();
00215     return TRUE;
00216 }

Here is the call graph for this function:

_CJXLIB_INLINE UINT CCJTabCtrl::GetMenuID ( ) [virtual]

Definition at line 155 of file CJTabCtrl.h.

References _CJXLIB_INLINE, and m_popupMenuID.

00156     { return m_popupMenuID; }

BOOL CCJTabCtrl::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 218 of file CJTabCtrl.cpp.

00219 {
00220     // KStowell - overridden for flicker-free drawing.
00221     UNUSED_ALWAYS(pDC);
00222     return TRUE;
00223 }

void CCJTabCtrl::OnInitMenuPopup | ( | CMenu * | pPopupMenu,
 |  | UINT | nIndex,
 |  | BOOL | bSysMenu
 | ) | [protected]

Definition at line 198 of file CJTabCtrl.cpp.

References CCJMenu::IsMenu(), m_popupMenu, and CCJMenu::UpdateMenu().

00199 {
00200     CTabCtrl::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
00201
00202     if(!bSysMenu) {
00203         if (m_popupMenu.IsMenu(pPopupMenu)) {
00204             CCJMenu::UpdateMenu(pPopupMenu);
00205         }
00206     }
00207 }

Here is the call graph for this function:

void CCJTabCtrl::OnMeasureItem | ( | int | nIDCtl,
 |  | LPMEASUREITEMSTRUCT | lpMeasureItemStruct
 | ) | [protected]

Definition at line 172 of file CJTabCtrl.cpp.

References CCJMenu::IsMenu(), m_popupMenu, and CCJMenu::MeasureItem().

00173 {
00174     if (lpMeasureItemStruct->CtlType == ODT_MENU)
00175     {
00176         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
00177             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
00178
00179             if (m_popupMenu.IsMenu(pMenu)) {
00180                 m_popupMenu.MeasureItem(lpMeasureItemStruct);
00181                 return;
00182             }
00183         }
00184     }
00185
00186     CTabCtrl::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
00187 }

Here is the call graph for this function:

LRESULT CCJTabCtrl::OnMenuChar | ( | UINT | nChar,
 |  | UINT | nFlags,
 |  | CMenu * | pMenu
 | ) | [protected]

Definition at line 189 of file CJTabCtrl.cpp.

References CCJMenu::FindKeyboardShortcut(), CCJMenu::IsMenu(), and m_popupMenu.

00190 {
00191     if (m_popupMenu.IsMenu(pMenu)) {
00192         return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
00193     }
00194
00195     return CTabCtrl::OnMenuChar(nChar, nFlags, pMenu);
00196 }

Here is the call graph for this function:

void CCJTabCtrl::OnPaint ( ) [protected]

Definition at line 235 of file CJTabCtrl.cpp.

00236 {
00237     CPaintDC dc(this); // device context for painting
00238
00239
00240     // KStowell - Get the client rect.
00241     CRect rcClient;
00242     GetClientRect( &rcClient );
00243
00244     // KStowell - Create a memory device-context. This is done to help reduce
00245     // screen flicker, since we will paint the entire control to the
00246     // off screen device context first.
00247     CDC memDC;
00248     CBitmap bitmap;
00249     memDC.CreateCompatibleDC(&dc);
00250     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00251     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00252
00253     // KStowell - Repaint the background.
00254     memDC.FillSolidRect( rcClient, afxData.clrBtnFace );
00255
00256     // let the control do its default drawing.
00257     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00258
00259     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00260     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00261
00262     // KStowell - Cleanup resources.
00263     memDC.SelectObject(pOldBitmap);
00264     memDC.DeleteDC();
00265     bitmap.DeleteObject();
00266 }

void CCJTabCtrl::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 139 of file CJTabCtrl.cpp.

References CCJMenu::LoadToolbar(), and NULL.

00140 {
00141     // No menu was defined...
00142     if (!m_popupMenuID) {
00143         TRACE0( "Warning: No menu resource was associated with CCJTabCtrl.\n" );
00144     }
00145
00146     else
00147     {
00148         // Since we are using the main window as the
00149         // parent, we need to convert the point to screen
00150         // coordinates...
00151         CPoint pt = point;
00152         ClientToScreen(&pt);
00153
00154         // Load the popup menu.
00155         VERIFY(m_popupMenu.LoadMenu(m_popupMenuID));
00156         CCJMenu* pPopup = (CCJMenu*)m_popupMenu.GetSubMenu(m_nPos);
00157         ASSERT(pPopup != NULL);
00158
00159         // Load toolbar resource if any for menu icons.
00160         if (m_popToolbarID) {
00161             pPopup->LoadToolbar(m_popToolbarID);
00162         }
00163
00164         // Display the popup menu, use the main window as its parent.
00165         pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
00166             pt.x, pt.y, AfxGetMainWnd());
00167
00168         m_popupMenu.DestroyMenu();
00169     }
00170 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJTabCtrl::SetMenuID | ( | UINT | popupMenuID,
 |  | UINT | popToolbarID = 0,
 |  | int | nPos = 0
 | ) | [virtual]

Definition at line 152 of file CJTabCtrl.h.

References _CJXLIB_INLINE, m_nPos, m_popToolbarID, and m_popupMenuID.

Referenced by CCJTabCtrlBar::SetTabMenuID().

00153     { m_popupMenuID = popupMenuID; m_popToolbarID = popToolbarID; m_nPos = nPos; }

void CCJTabCtrl::UpdateFont ( ) [virtual]

Definition at line 225 of file CJTabCtrl.cpp.

References m_Font.

Referenced by Create().

00226 {
00227     m_Font.DeleteObject();
00228     NONCLIENTMETRICS ncm;
00229     ncm.cbSize = sizeof(ncm);
00230     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00231     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00232     SetFont(&m_Font);
00233 }

Member Data Documentation

CFont CCJTabCtrl::m_Font

Definition at line 113 of file CJTabCtrl.h.

Referenced by UpdateFont(), and ~CCJTabCtrl().

int CCJTabCtrl::m_nPos

Definition at line 112 of file CJTabCtrl.h.

Referenced by CCJTabCtrl(), and SetMenuID().

UINT CCJTabCtrl::m_popToolbarID

Definition at line 107 of file CJTabCtrl.h.

Referenced by CCJTabCtrl(), and SetMenuID().

CCJMenu CCJTabCtrl::m_popupMenu

Definition at line 111 of file CJTabCtrl.h.

Referenced by OnInitMenuPopup(), OnMeasureItem(), and OnMenuChar().

UINT CCJTabCtrl::m_popupMenuID

Definition at line 110 of file CJTabCtrl.h.

Referenced by CCJTabCtrl(), GetMenuID(), and SetMenuID().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJTabCtrl.h
  • WinCvs/CJLib/CJLibrary/CJTabCtrl.cpp
Generated on Sat Aug 7 22:50:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJTabCtrlBar Class Reference

CCJTabCtrlBar Class Reference

#include <CJTabCtrlBar.h>

Inheritance diagram for CCJTabCtrlBar:

[legend]
Collaboration diagram for CCJTabCtrlBar:

[legend]
List of all members.

Public Member Functions

CCJTabCtrlBar ()
virtual | ~CCJTabCtrlBar ()
virtual BOOL | AddView (LPCTSTR lpszLabel, CRuntimeClass *pViewClass, CDocument *pDoc=NULL, UINT nIndex=-1, CCreateContext *pContext=NULL)
virtual void | RemoveView (int nView)
virtual void | SetActiveView (int nView)
virtual void | SetActiveView (CRuntimeClass *pViewClass)
virtual CView * | GetActiveView ()
virtual CView * | GetView (int nView)
virtual CView * | GetView (CRuntimeClass *pViewClass)
virtual CImageList * | SetTabImageList (CImageList *pImageList)
virtual BOOL | ModifyTabStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
virtual LPCTSTR | GetViewName (int nView)
virtual LPCTSTR | GetViewName (CRuntimeClass *pViewClass)
virtual void | DeleteView (int nView)
virtual void | DeleteView (CRuntimeClass *pViewClass)
virtual void | SetViewToolTip (int nView, LPCTSTR lpszLabel)
virtual void | SetViewToolTip (CRuntimeClass *pViewClass, LPCTSTR lpszLabel)
virtual void | GetChildRect (CRect &rect)
virtual void | SetTabMenuID (UINT popupMenuID, UINT popToolbarID=0, int nPos=0)
virtual void | SetActiveView (CView *pUserView)
virtual void | AssociateImageIndexWithRuntimeClass (int nIndex, CRuntimeClass *pRuntimeClass)
void | AssociateImageIndexWithRuntimeClass (int nIndex, LPCTSTR lpszRuntimeClassName)
virtual BOOL | RemoveAllTabs ()
virtual int | GetTabFromPoint (CPoint point=CPoint(0, 0))
virtual BOOL | PreTranslateMessage (MSG *pMsg)

Protected Member Functions

virtual short | GetImageIndexFromRuntimeClass (CRuntimeClass *pRuntimeClass)
virtual void | RemoveListItem (POSITION pos)
virtual void | OverkillAssert (CRuntimeClass *pViewClass)
virtual void | SizeTabView (CWnd *pWnd)
virtual CToolTipCtrl * | GetToolTip ()
virtual void | AddToolTip (TCB_ITEM *pMember, LPCTSTR lpszLabel)
virtual void | ResetToolTips (CToolTipCtrl *pToolTip)
virtual TCB_ITEM * | CreateTabListItem (LPCTSTR lpszLabel)
virtual BOOL | CreateTabView (CRuntimeClass *pViewClass, CDocument *pDocument, CCreateContext *pContext)
virtual BOOL | EnableToolTips (BOOL bEnable)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg void | OnTabSelChange (NMHDR *pNMHDR, LRESULT *pResult)

Protected Attributes

int m_nPointTab
int m_nActiveTab
int m_nNextToolTipId
CView * m_pActiveView
CTabViews m_viewList
CCJTabCtrl m_TabCtrl
CMapStringToPtr | m_ClassNameToImageIndexMap
BOOL | m_bToolTipsEnabled

Constructor & Destructor Documentation

CCJTabCtrlBar::CCJTabCtrlBar ( )

Definition at line 198 of file CJTabCtrlBar.cpp.

References m_bToolTipsEnabled, m_nActiveTab, and m_nNextToolTipId.

00199 {
00200     m_nActiveTab        = 0;
00201     m_nNextToolTipId    = 0;
00202     m_bToolTipsEnabled  = TRUE;
00203 }

CCJTabCtrlBar::~CCJTabCtrlBar ( ) [virtual]

Definition at line 205 of file CJTabCtrlBar.cpp.

References _delete, m_viewList, and TCB_ITEM.

00206 {
00207     while(!m_viewList.IsEmpty())
00208     {
00209         TCB_ITEM *pMember = m_viewList.RemoveHead();
00210         _delete(pMember);
00211     }
00212 }

Member Function Documentation

void CCJTabCtrlBar::AddToolTip | ( | TCB_ITEM * | pMember,
 |  | LPCTSTR | lpszLabel
 | ) | [protected, virtual]

Definition at line 392 of file CJTabCtrlBar.cpp.

References GetToolTip(), m_TabCtrl, NULL, TCB_ITEM, and tagTCB_ITEM::uiToolTipId.

Referenced by CreateTabListItem().

00393 {
00394     // Get the tool tips for the tab control.
00395     CToolTipCtrl* pToolTip = GetToolTip();
00396
00397     // Add the tool tip.
00398     if( pMember->uiToolTipId == 0 ) {
00399         pToolTip->AddTool( &m_TabCtrl, lpszLabel,
00400             NULL, pMember->uiToolTipId );
00401     }
00402     else {
00403         pToolTip->AddTool( &m_TabCtrl, lpszLabel,
00404             CRect(0,0,0,0), pMember->uiToolTipId );
00405     }
00406 }

Here is the call graph for this function:

BOOL CCJTabCtrlBar::AddView | ( | LPCTSTR | lpszLabel,
 |  | CRuntimeClass * | pViewClass,
 |  | CDocument * | pDoc = NULL,
 |  | UINT | nIndex = -1,
 |  | CCreateContext * | pContext = NULL
 | ) | [virtual]

Definition at line 431 of file CJTabCtrlBar.cpp.

References CreateTabListItem(), CreateTabView(), GetToolTip(), m_pActiveView, m_TabCtrl, m_viewList, NULL, OverkillAssert(), ResetToolTips(), and SizeTabView().

Referenced by CMainFrame::InitializeDockingWindows().

00433 {
00434     OverkillAssert(pViewClass);
00435
00436     // Create the view to be associate with tab.
00437     if (!CreateTabView(pViewClass, pDoc, pContext))
00438         return FALSE;
00439
00440     // Create the tab list item.
00441     if (CreateTabListItem(lpszLabel) == NULL)
00442         return FALSE;
00443
00444     // Since the tool tip count has changed,
00445     // re-initialize the tooltips.
00446     ResetToolTips(GetToolTip());
00447
00448     int nViews = ( nIndex == -1 )?m_viewList.GetCount():nIndex;
00449     if( nViews != 1 ) {
00450         m_pActiveView->EnableWindow(FALSE);
00451         m_pActiveView->ShowWindow(SW_HIDE);
00452     }
00453
00454     // Insert the new tab item.
00455     TC_ITEM tci;
00456     tci.mask    = TCIF_TEXT | TCIF_IMAGE;
00457     tci.pszText = (LPTSTR)(LPCTSTR)lpszLabel;
00458     tci.iImage  = nViews-1;
00459     m_TabCtrl.InsertItem(m_viewList.GetCount()-1, &tci);
00460
00461     // Resize the tab view.
00462     SizeTabView(m_pActiveView);
00463
00464     return TRUE;
00465 }

Here is the call graph for this function:

void CCJTabCtrlBar::AssociateImageIndexWithRuntimeClass | ( | int | nIndex,
 |  | LPCTSTR | lpszRuntimeClassName
 | ) |

Definition at line 791 of file CJTabCtrlBar.cpp.

References m_ClassNameToImageIndexMap.

00792 {
00793     CString szClassName(lpszRuntimeClassName);
00794     m_ClassNameToImageIndexMap[szClassName] = (short*)nIndex;
00795 }

void CCJTabCtrlBar::AssociateImageIndexWithRuntimeClass | ( | int | nIndex,
 |  | CRuntimeClass * | pRuntimeClass
 | ) | [virtual]

Definition at line 785 of file CJTabCtrlBar.cpp.

References m_ClassNameToImageIndexMap.

00786 {
00787     CString szClassName(pRuntimeClass->m_lpszClassName);
00788     m_ClassNameToImageIndexMap[szClassName] = (short*)nIndex;
00789 }

TCB_ITEM * CCJTabCtrlBar::CreateTabListItem ( LPCTSTR lpszLabel ) [protected, virtual]

Definition at line 359 of file CJTabCtrlBar.cpp.

References AddToolTip(), m_nNextToolTipId, m_pActiveView, m_viewList, tagTCB_ITEM::pWnd, tagTCB_ITEM::szTabLabel, tagTCB_ITEM::szToolTipLabel, TCB_ITEM, and tagTCB_ITEM::uiToolTipId.

Referenced by AddView().

00360 {
00361     // Allocate a new TCB_ITEM object.
00362     TCB_ITEM* pMember = new TCB_ITEM;
00363
00364     pMember->pWnd           = m_pActiveView;
00365     pMember->szTabLabel     = lpszLabel;
00366     pMember->szToolTipLabel = lpszLabel;
00367     pMember->uiToolTipId    = m_nNextToolTipId++;
00368
00369     // Add the new TCB_ITEM to the tab item list.
00370     m_viewList.AddTail(pMember);
00371
00372     // Create the ToolTip for the tab.
00373     AddToolTip(pMember, lpszLabel);
00374
00375     return pMember;
00376 }

Here is the call graph for this function:

BOOL CCJTabCtrlBar::CreateTabView | ( | CRuntimeClass * | pViewClass,
 |  | CDocument * | pDocument,
 |  | CCreateContext * | pContext
 | ) | [protected, virtual]

Definition at line 301 of file CJTabCtrlBar.cpp.

References m_pActiveView, and NULL.

Referenced by AddView().

00302 {
00303     CWnd* pWnd = NULL;
00304
00305     // if no context specified, generate one
00306     // from the currently selected client if possible...
00307     if (pContext == NULL)
00308     {
00309         CCreateContext context;
00310
00311         context.m_pNewViewClass     = pViewClass;
00312         context.m_pCurrentDoc       = pDocument;
00313         context.m_pNewDocTemplate   = pDocument?pDocument->GetDocTemplate() : NULL;
00314         context.m_pLastView         = GetParentFrame()->GetActiveView();
00315         context.m_pCurrentFrame     = GetParentFrame();
00316
00317         pContext = &context;
00318     }
00319
00320     TRY
00321     {
00322         // Create the object.
00323         pWnd = DYNAMIC_DOWNCAST(CWnd, pViewClass->CreateObject());
00324         if (!pWnd) AfxThrowMemoryException();
00325     }
00326     CATCH_ALL(e)
00327     {
00328         TRACE0( "Out of memory creating a view.\n" );
00329         // Note: DELETE_EXCEPTION(e) not required
00330         return FALSE;
00331     }
00332     END_CATCH_ALL
00333
00334     ASSERT_KINDOF(CWnd, pWnd);
00335     ASSERT(pWnd->m_hWnd == NULL); // not yet created.
00336
00337     // Create with the right size and position
00338     if (!pWnd->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
00339         CRect(0,0,0,0), this, 0, pContext))
00340     {
00341         TRACE0( "Warning: couldn't create client pane for view.\n" );
00342         // pWnd will be cleaned up by PostNcDestroy
00343         return FALSE;
00344     }
00345
00346     // Set the newly create view as the active view.
00347     m_pActiveView = DYNAMIC_DOWNCAST(CView, pWnd);
00348     ASSERT_KINDOF(CView, m_pActiveView);
00349
00350     // If we were floating last, call OnInitialUpdate for the view
00351     // since CMiniDockFrameWnd does not do this for us.
00352     if( m_bFloating && m_pActiveView ) {
00353         m_pActiveView->OnInitialUpdate();
00354     }
00355
00356     return TRUE;
00357 }

void CCJTabCtrlBar::DeleteView ( CRuntimeClass * pViewClass ) [virtual]

Definition at line 559 of file CJTabCtrlBar.cpp.

References DeleteView(), m_viewList, OverkillAssert(), tagTCB_ITEM::pWnd, and TCB_ITEM.

00560 {
00561     OverkillAssert(pViewClass);
00562
00563     int nIndex = 0;
00564     for( POSITION pos = m_viewList.GetHeadPosition(); pos; m_viewList.GetNext( pos ))
00565     {
00566         TCB_ITEM *pMember = m_viewList.GetAt(pos);
00567         ASSERT(pMember);
00568
00569         if (pMember->pWnd->IsKindOf(pViewClass)) {
00570             DeleteView(nIndex);
00571             return;
00572         }
00573         nIndex++;
00574     }
00575 }

Here is the call graph for this function:

void CCJTabCtrlBar::DeleteView ( int nView ) [virtual]

Definition at line 514 of file CJTabCtrlBar.cpp.

References GetToolTip(), m_nActiveTab, m_pActiveView, m_TabCtrl, m_viewList, NULL, RemoveListItem(), ResetToolTips(), and SetActiveView().

Referenced by DeleteView().

00515 {
00516     ASSERT_VALID( this );
00517     ASSERT(( nView >= 0 ) && (m_TabCtrl.GetItemCount() > nView));
00518
00519     TRACE2("***DeleteView: %d ( /%d )\n", nView,m_viewList.GetCount());
00520
00521     // Now find the view we want to delete and remove it
00522     POSITION pos = m_viewList.FindIndex(nView);
00523     if( pos != NULL )
00524     {
00525         CView *pOldActiveView;
00526         pOldActiveView = m_pActiveView;
00527
00528         // Ensure that we get no dangling pointers
00529         // DO NOT (RE-)MOVE THIS CODE ! Gero Kuehn [gero.kuehn@isc-soft.de]
00530         if(GetParentFrame()->GetActiveView() == DYNAMIC_DOWNCAST( CView, m_viewList.GetAt(pos)->pWnd))
00531             GetParentFrame()->SetActiveView( NULL , FALSE);
00532
00533         // Remove item from list, and free memory.
00534         RemoveListItem( pos );
00535
00536         // Remove it from the tab control
00537         m_TabCtrl.DeleteItem(nView);
00538
00539         // Finally, if we have just deleted the active view, reset the
00540         // active tab to be the first view in the list
00541         if (nView == m_nActiveTab)
00542         {
00543             m_nActiveTab = -1;
00544             m_pActiveView = NULL; // Gero Kuehn [gero.kuehn@isc-soft.de]
00545         }
00546         else
00547         {
00548             // ** GK/ISC
00549             if((m_nActiveTab - 1)>=0) {
00550                 SetActiveView(m_nActiveTab - 1);
00551             }
00552         }
00553
00554         // Reset the tooltips for the views we have left...
00555         ResetToolTips(GetToolTip());
00556     }
00557 }

Here is the call graph for this function:

BOOL CCJTabCtrlBar::EnableToolTips ( BOOL bEnable ) [protected, virtual]

Definition at line 849 of file CJTabCtrlBar.cpp.

References GetToolTip(), and m_bToolTipsEnabled.

00850 {
00851     BOOL bPrev = m_bToolTipsEnabled;
00852
00853     m_bToolTipsEnabled = bEnable;
00854
00855     // Get the tool tips for the tab control.
00856     CToolTipCtrl* pToolTip = GetToolTip();
00857
00858     if (pToolTip)
00859         pToolTip->Activate(m_bToolTipsEnabled);
00860     else
00861         m_bToolTipsEnabled = bPrev;
00862
00863     return bPrev;
00864 }

Here is the call graph for this function:

_CJXLIB_INLINE CView * CCJTabCtrlBar::GetActiveView ( ) [virtual]

Definition at line 412 of file CJTabCtrlBar.h.

References _CJXLIB_INLINE, and m_pActiveView.

00413     { return m_pActiveView; }

void CCJTabCtrlBar::GetChildRect ( CRect & rect ) [virtual]

Reimplemented from CCJControlBar.

Definition at line 292 of file CJTabCtrlBar.cpp.

References CCJControlBar::GetChildRect(), and CCJControlBar::IsFloating().

Referenced by SizeTabView().

00293 {
00294     CCJControlBar::GetChildRect(rect);
00295
00296     if (IsFloating()) {
00297         rect.DeflateRect(2,2);
00298     }
00299 }

Here is the call graph for this function:

short CCJTabCtrlBar::GetImageIndexFromRuntimeClass ( CRuntimeClass * pRuntimeClass ) [protected, virtual]

Definition at line 797 of file CJTabCtrlBar.cpp.

References m_ClassNameToImageIndexMap.

00798 {
00799     ASSERT(m_ClassNameToImageIndexMap.GetCount() > 0);
00800     CString szClassName(pRuntimeClass->m_lpszClassName);
00801
00802     // Look for class name
00803     short* psValue;
00804     if (FALSE == m_ClassNameToImageIndexMap.Lookup(szClassName, (void*&)psValue))
00805         return -1;
00806
00807     // return the de-referenced pointer.
00808     return *psValue;
00809
00810 }

int CCJTabCtrlBar::GetTabFromPoint ( CPoint point = CPoint(0, 0) ) [virtual]

Definition at line 826 of file CJTabCtrlBar.cpp.

References m_nPointTab, and m_TabCtrl.

00827 {
00828     TCHITTESTINFO tch;
00829     memset(&tch, 0, sizeof(TCHITTESTINFO));
00830
00831     if( point == CPoint(0,0) ) {
00832         CPoint pt;
00833         GetCursorPos(&pt);
00834         ScreenToClient(&pt);
00835         tch.pt = pt;
00836     } else {
00837         tch.pt = point;
00838     }
00839
00840     int iTab = m_TabCtrl.HitTest(&tch);
00841
00842     if( iTab != -1 ) {
00843         m_nPointTab = iTab ;
00844     }
00845
00846     return iTab;
00847 }

CToolTipCtrl * CCJTabCtrlBar::GetToolTip ( ) [protected, virtual]

Definition at line 378 of file CJTabCtrlBar.cpp.

References m_TabCtrl, and NULL.

Referenced by AddToolTip(), AddView(), DeleteView(), EnableToolTips(), and SetViewToolTip().

00379 {
00380     // Get a pointer to the tab control's CToolTipCtrl.
00381 #ifdef _VC_VERSION_5
00382     CToolTipCtrl* pToolTip = m_TabCtrl.GetTooltips();
00383     ASSERT(pToolTip != NULL);
00384 #else
00385     CToolTipCtrl* pToolTip = m_TabCtrl.GetToolTips();
00386     ASSERT(pToolTip != NULL);
00387 #endif // _VC_VERSION_5
00388
00389     return pToolTip;
00390 }

CView * CCJTabCtrlBar::GetView ( CRuntimeClass * pViewClass ) [virtual]

Definition at line 644 of file CJTabCtrlBar.cpp.

References m_viewList, NULL, OverkillAssert(), tagTCB_ITEM::pWnd, and TCB_ITEM.

00645 {
00646     OverkillAssert(pViewClass);
00647
00648     for( POSITION pos = m_viewList.GetHeadPosition(); pos; m_viewList.GetNext( pos ))
00649     {
00650         TCB_ITEM *pMember = m_viewList.GetAt( pos );
00651         if( pMember->pWnd->IsKindOf( pViewClass )) {
00652             return (CView*)pMember->pWnd;
00653         }
00654     }
00655     return NULL;
00656 }

Here is the call graph for this function:

CView * CCJTabCtrlBar::GetView ( int nView ) [virtual]

Definition at line 624 of file CJTabCtrlBar.cpp.

References m_TabCtrl, m_viewList, NULL, tagTCB_ITEM::pWnd, and TCB_ITEM.

Referenced by CMainFrame::GetBrowserView(), and CMainFrame::GetExplorerView().

00625 {
00626     ASSERT_VALID(this);
00627     ASSERT(( nView >= 0 ) && ( m_TabCtrl.GetItemCount() > nView ));
00628
00629     if( nView != -1 )
00630     {
00631         POSITION pos = m_viewList.FindIndex( nView );
00632         if( pos != NULL )
00633         {
00634             TCB_ITEM* pMember = m_viewList.GetAt( pos );
00635             return ( pMember )?(CView*)pMember->pWnd:NULL;
00636         }
00637
00638         return NULL;
00639     }
00640
00641     return NULL;
00642 }

LPCTSTR CCJTabCtrlBar::GetViewName ( CRuntimeClass * pViewClass ) [virtual]

Definition at line 678 of file CJTabCtrlBar.cpp.

References m_viewList, NULL, OverkillAssert(), tagTCB_ITEM::pWnd, tagTCB_ITEM::szTabLabel, and TCB_ITEM.

00679 {
00680     OverkillAssert(pViewClass);
00681
00682     for( POSITION pos = m_viewList.GetHeadPosition(); pos; m_viewList.GetNext( pos ))
00683     {
00684         TCB_ITEM *pMember = m_viewList.GetAt( pos );
00685         if( pMember->pWnd->IsKindOf( pViewClass )) {
00686             return (LPCTSTR)pMember->szTabLabel;
00687         }
00688     }
00689     return NULL;
00690 }

Here is the call graph for this function:

LPCTSTR CCJTabCtrlBar::GetViewName ( int nView ) [virtual]

Definition at line 658 of file CJTabCtrlBar.cpp.

References m_TabCtrl, m_viewList, NULL, tagTCB_ITEM::szTabLabel, and TCB_ITEM.

00659 {
00660     ASSERT_VALID(this);
00661     ASSERT(( nView >= 0 ) && ( m_TabCtrl.GetItemCount() > nView ));
00662
00663     if( nView != -1 )
00664     {
00665         POSITION pos = m_viewList.FindIndex( nView );
00666         if( pos != NULL )
00667         {
00668             TCB_ITEM* pMember = m_viewList.GetAt( pos );
00669             return ( pMember )?(LPCTSTR)pMember->szTabLabel:NULL;
00670         }
00671
00672         return NULL;
00673     }
00674
00675     return NULL;
00676 }

_CJXLIB_INLINE BOOL CCJTabCtrlBar::ModifyTabStyle | ( | DWORD | dwRemove,
 |  | DWORD | dwAdd,
 |  | UINT | nFlags = 0
 | ) | [virtual]

Definition at line 418 of file CJTabCtrlBar.h.

References _CJXLIB_INLINE, and m_TabCtrl.

00419     { return m_TabCtrl.ModifyStyle(dwRemove, dwAdd, nFlags); }

int CCJTabCtrlBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Reimplemented from CCJControlBar.

Definition at line 253 of file CJTabCtrlBar.cpp.

References CCJTabCtrl::Create(), IDC_TAB_CONTROL, m_TabCtrl, CCJControlBar::OnCreate(), and CCJControlBar::SetChild().

00254 {
00255     if (CCJControlBar::OnCreate(lpCreateStruct) == -1)
00256         return -1;
00257
00258     // Create the Tab Control
00259     if (!m_TabCtrl.Create(this, IDC_TAB_CONTROL))
00260     {
00261         TRACE0( "Unable to create tab control bar\n" );
00262         return -1;
00263     }
00264
00265     // Associate the child window.
00266     SetChild(&m_TabCtrl);
00267
00268     return 0;
00269 }

Here is the call graph for this function:

void CCJTabCtrlBar::OnTabSelChange | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 287 of file CJTabCtrlBar.cpp.

References m_TabCtrl, and SetActiveView().

00288 {
00289     SetActiveView(m_TabCtrl.GetCurSel());
00290 }

Here is the call graph for this function:

void CCJTabCtrlBar::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]

Reimplemented from CCJControlBar.

Definition at line 227 of file CJTabCtrlBar.cpp.

References NULL, CCJControlBar::OnWindowPosChanged(), tagTCB_ITEM::pWnd, and TCB_ITEM.

00228 {
00229     // Get a pointer to the parent frame.
00230     CFrameWnd* pFrame = GetParentFrame();
00231     ASSERT(pFrame != NULL);
00232
00233     POSITION pos = m_viewList.GetHeadPosition();
00234     while( pos != NULL )
00235     {
00236         // Get the item for this position.
00237         TCB_ITEM *pItem = (TCB_ITEM*)m_viewList.GetNext(pos);
00238         ASSERT(pItem != NULL);
00239
00240         // To avoid mainwindow freezing, we must
00241         // deativate the view, it's not visible now.
00242         if (pFrame->GetActiveView() == pItem->pWnd) {
00243             pFrame->SetActiveView(NULL);
00244         }
00245
00246         // Resize the tab view.
00247         SizeTabView(pItem->pWnd);
00248     }
00249
00250     CCJControlBar::OnWindowPosChanged(lpwndpos);
00251 }

Here is the call graph for this function:

void CCJTabCtrlBar::OverkillAssert ( CRuntimeClass * pViewClass ) [protected, virtual]

Definition at line 481 of file CJTabCtrlBar.cpp.

References NULL.

Referenced by AddView(), DeleteView(), GetView(), GetViewName(), SetActiveView(), and SetViewToolTip().

00482 {
00483 #ifdef _DEBUG
00484     ASSERT_VALID(this);
00485     ASSERT(pViewClass != NULL);
00486     ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CWnd)));
00487     ASSERT(AfxIsValidAddress(pViewClass, sizeof(CRuntimeClass), FALSE));
00488 #else
00489     UNUSED_ALWAYS( pViewClass );
00490 #endif
00491 }

BOOL CCJTabCtrlBar::PreTranslateMessage ( MSG * pMsg ) [virtual]

Reimplemented from CCJControlBar.

Definition at line 271 of file CJTabCtrlBar.cpp.

References m_pActiveView, and CCJControlBar::PreTranslateMessage().

00272 {
00273     if (pMsg->message == WM_KEYDOWN)
00274     {
00275         switch (pMsg->wParam)
00276         {
00277         case VK_RETURN:
00278             m_pActiveView->SendMessage(pMsg->message,
00279                 pMsg->wParam, pMsg->lParam);
00280             return TRUE;
00281         }
00282     }
00283
00284     return CCJControlBar::PreTranslateMessage(pMsg);
00285 }

Here is the call graph for this function:

BOOL CCJTabCtrlBar::RemoveAllTabs ( ) [virtual]

Definition at line 812 of file CJTabCtrlBar.cpp.

References m_pActiveView, m_TabCtrl, m_viewList, NULL, and RemoveView().

00813 {
00814     // Itterate the tab views
00815     while(!m_viewList.IsEmpty())
00816     {
00817         RemoveView(0);  // Remove the view from the bar
00818         m_TabCtrl.DeleteItem(0);
00819     }
00820     m_pActiveView = NULL;
00821     ((CFrameWnd *)GetParent())->SetActiveView(NULL);
00822     Invalidate();
00823     return TRUE;
00824 }

Here is the call graph for this function:

void CCJTabCtrlBar::RemoveListItem ( POSITION pos ) [protected, virtual]

Definition at line 493 of file CJTabCtrlBar.cpp.

References _delete, m_viewList, NULL, tagTCB_ITEM::pWnd, and TCB_ITEM.

Referenced by DeleteView(), and RemoveView().

00494 {
00495     if( pos != NULL )
00496     {
00497         // remove the page from internal list
00498         TCB_ITEM *pMember = m_viewList.GetAt(pos);
00499         ASSERT(pMember);
00500
00501         // And delete the member window, freeing our stored
00502         // values relating to it
00503         if (pMember->pWnd != NULL) {
00504             pMember->pWnd->DestroyWindow();
00505             pMember->pWnd = NULL;
00506         }
00507
00508         // Remove from list and free memory.
00509         m_viewList.RemoveAt(pos);
00510         _delete(pMember);
00511     }
00512 }

void CCJTabCtrlBar::RemoveView ( int nView ) [virtual]

Definition at line 577 of file CJTabCtrlBar.cpp.

References m_TabCtrl, m_viewList, and RemoveListItem().

Referenced by RemoveAllTabs().

00578 {
00579     ASSERT_VALID( this );
00580     ASSERT(( nView >= 0 ) && (m_TabCtrl.GetItemCount() > nView));
00581     RemoveListItem( m_viewList.FindIndex( nView ));
00582 }

Here is the call graph for this function:

void CCJTabCtrlBar::ResetToolTips ( CToolTipCtrl * pToolTip ) [protected, virtual]

Definition at line 408 of file CJTabCtrlBar.cpp.

References m_nNextToolTipId, m_TabCtrl, m_viewList, tagTCB_ITEM::szToolTipLabel, TCB_ITEM, and tagTCB_ITEM::uiToolTipId.

Referenced by AddView(), and DeleteView().

00409 {
00410     if (pToolTip)
00411     {
00412         int nIndex = 0;
00413         POSITION pos;
00414         for( pos = m_viewList.GetHeadPosition(); pos; m_viewList.GetNext(pos) )
00415         {
00416             // Get the next item in the list.
00417             TCB_ITEM* pMember = m_viewList.GetAt( pos );
00418
00419             // Update the tooltip for the view
00420             pMember->uiToolTipId = nIndex;
00421             pToolTip->UpdateTipText( pMember->szToolTipLabel, &m_TabCtrl,
00422                 pMember->uiToolTipId );
00423
00424             nIndex++;
00425         }
00426
00427         m_nNextToolTipId = ( nIndex == 0 )?1:nIndex;
00428     }
00429 }

void CCJTabCtrlBar::SetActiveView ( CView * pUserView ) [virtual]

Definition at line 767 of file CJTabCtrlBar.cpp.

References m_pActiveView, and m_viewList.

00768 {
00769     // Walk through the tabs
00770     for (POSITION pos=m_viewList.GetHeadPosition(); pos; m_viewList.GetNext(pos))
00771     {
00772         // Get the tab's view
00773         CView* pTabView = (CView *)(m_viewList.GetAt(pos)->pWnd);
00774
00775         // Does the tab view match the requested view?
00776         if (pTabView == pUserView)
00777         {
00778             // Change the active view
00779             m_pActiveView = pTabView;
00780             ((CFrameWnd *)GetParent())->SetActiveView((CView *)m_pActiveView);
00781         }
00782     }
00783 }

void CCJTabCtrlBar::SetActiveView ( CRuntimeClass * pViewClass ) [virtual]

Definition at line 734 of file CJTabCtrlBar.cpp.

References m_nActiveTab, m_pActiveView, m_TabCtrl, m_viewList, OverkillAssert(), tagTCB_ITEM::pWnd, and TCB_ITEM.

00735 {
00736     OverkillAssert(pViewClass);
00737
00738     int nView = 0;
00739     for (POSITION pos=m_viewList.GetHeadPosition(); pos; m_viewList.GetNext(pos))
00740     {
00741         TCB_ITEM *pMember=m_viewList.GetAt(pos);
00742         if (pMember->pWnd->IsKindOf(pViewClass))
00743         {
00744             //first hide old first view
00745             m_pActiveView->EnableWindow(FALSE);
00746             m_pActiveView->ShowWindow(SW_HIDE);
00747
00748             // set new active view
00749             m_pActiveView = (CView*)pMember->pWnd;
00750
00751             // enable, show, set focus to new view
00752             m_pActiveView->EnableWindow(TRUE);
00753             m_pActiveView->ShowWindow(SW_SHOW);
00754             m_pActiveView->SetFocus();
00755
00756             m_nActiveTab = nView;
00757
00758             // select the tab
00759             m_TabCtrl.SetCurSel(m_nActiveTab);
00760
00761             break;
00762         }
00763         nView++;
00764     }
00765 }

Here is the call graph for this function:

void CCJTabCtrlBar::SetActiveView ( int nView ) [virtual]

Definition at line 692 of file CJTabCtrlBar.cpp.

References m_nActiveTab, m_pActiveView, m_TabCtrl, m_viewList, NULL, tagTCB_ITEM::pWnd, and TCB_ITEM.

Referenced by CWincvsApp::ActivateBrowserView(), DeleteView(), CMainFrame::InitializeDockingWindows(), and OnTabSelChange().

00693 {
00694     ASSERT_VALID(this);
00695     ASSERT(( nView >= 0 ) && ( m_TabCtrl.GetItemCount() > nView ));
00696
00697     if(( nView != -1 ) && ( nView != m_nActiveTab ))
00698     {
00699         POSITION pos = m_viewList.FindIndex( nView );
00700         if( pos != NULL )
00701         {
00702             // Hide the old view we are changing.
00703             // GK/ISC
00704             POSITION oldPos = NULL;
00705             if( m_nActiveTab >= 0) {
00706                 oldPos = m_viewList.FindIndex( m_nActiveTab );
00707             }
00708
00709             if( oldPos )
00710             {
00711                 TCB_ITEM* pOldItem = m_viewList.GetAt( oldPos );
00712                 pOldItem->pWnd->EnableWindow(FALSE);
00713                 pOldItem->pWnd->ShowWindow(SW_HIDE);
00714             }
00715
00716             // Show the newly selected view.
00717             TCB_ITEM* pMember = m_viewList.GetAt( pos );
00718             pMember->pWnd->EnableWindow(TRUE);
00719             pMember->pWnd->ShowWindow(SW_SHOW);
00720             pMember->pWnd->SetFocus();
00721
00722             // select the tab (if tab programmatically changed)
00723             m_nActiveTab = nView;
00724             m_TabCtrl.SetCurSel( m_nActiveTab );
00725
00726             // Set the active view.
00727             m_pActiveView = DYNAMIC_DOWNCAST( CView, pMember->pWnd );
00728             ASSERT_KINDOF( CView, m_pActiveView );
00729             GetParentFrame()->SetActiveView( m_pActiveView );
00730         }
00731     }
00732 }

_CJXLIB_INLINE CImageList * CCJTabCtrlBar::SetTabImageList ( CImageList * pImageList ) [virtual]

Definition at line 415 of file CJTabCtrlBar.h.

References _CJXLIB_INLINE, and m_TabCtrl.

Referenced by CMainFrame::InitializeDockingWindows().

00416     { return m_TabCtrl.SetImageList (pImageList); }

_CJXLIB_INLINE void CCJTabCtrlBar::SetTabMenuID | ( | UINT | popupMenuID,
 |  | UINT | popToolbarID = 0,
 |  | int | nPos = 0
 | ) | [virtual]

Definition at line 409 of file CJTabCtrlBar.h.

References _CJXLIB_INLINE, m_TabCtrl, and CCJTabCtrl::SetMenuID().

00410     { m_TabCtrl.SetMenuID(popupMenuID, popToolbarID, nPos); }

Here is the call graph for this function:

void CCJTabCtrlBar::SetViewToolTip | ( | CRuntimeClass * | pViewClass,
 |  | LPCTSTR | lpszLabel
 | ) | [virtual]

Definition at line 606 of file CJTabCtrlBar.cpp.

References m_viewList, OverkillAssert(), tagTCB_ITEM::pWnd, SetViewToolTip(), and TCB_ITEM.

00607 {
00608     OverkillAssert(pViewClass);
00609
00610     int nIndex=0;
00611     for (POSITION pos=m_viewList.GetHeadPosition(); pos; m_viewList.GetNext(pos))
00612     {
00613         TCB_ITEM *pMember=m_viewList.GetAt(pos);
00614         if (pMember->pWnd->IsKindOf(pViewClass))
00615         {
00616             SetViewToolTip(nIndex, lpszLabel);
00617             break;
00618         }
00619         nIndex++;
00620     }
00621     return;
00622 }

Here is the call graph for this function:

void CCJTabCtrlBar::SetViewToolTip | ( | int | nView,
 |  | LPCTSTR | lpszLabel
 | ) | [virtual]

Definition at line 584 of file CJTabCtrlBar.cpp.

References GetToolTip(), m_TabCtrl, m_viewList, NULL, tagTCB_ITEM::szToolTipLabel, TCB_ITEM, and tagTCB_ITEM::uiToolTipId.

Referenced by SetViewToolTip().

00585 {
00586     ASSERT_VALID(this);
00587     ASSERT(( nView >= 0 ) && (m_TabCtrl.GetItemCount() > nView));
00588
00589     // Find the view we want to change the tooltip for and
00590     // reset its tooltip text
00591     POSITION pos = m_viewList.FindIndex( nView );
00592     if( pos != NULL )
00593     {
00594         // Get the private data for the view
00595         TCB_ITEM *pMember = m_viewList.GetAt(pos);
00596
00597         // Reset the tooltip text to the new value
00598         pMember->szToolTipLabel = lpszLabel;
00599
00600         // Update the tooltip for the view
00601         GetToolTip()->UpdateTipText( pMember->szToolTipLabel,
00602             &m_TabCtrl, pMember->uiToolTipId );
00603     }
00604 }

Here is the call graph for this function:

void CCJTabCtrlBar::SizeTabView ( CWnd * pWnd ) [protected, virtual]

Definition at line 467 of file CJTabCtrlBar.cpp.

References GetChildRect(), m_TabCtrl, and NULL.

Referenced by AddView().

00468 {
00469     // Get the new window size.
00470     CRect rcChild;
00471     GetChildRect(rcChild);
00472     rcChild.DeflateRect(3,3);
00473     rcChild.bottom -= (21 * m_TabCtrl.GetRowCount());
00474
00475     // Resize the window.
00476     pWnd->MoveWindow(rcChild);
00477     pWnd->SetWindowPos(NULL, 0,0,0,0,
00478         SWP_NOSIZE|SWP_NOMOVE);
00479 }

Here is the call graph for this function:

Member Data Documentation

BOOL CCJTabCtrlBar::m_bToolTipsEnabled [protected]

Definition at line 206 of file CJTabCtrlBar.h.

Referenced by CCJTabCtrlBar(), and EnableToolTips().

CMapStringToPtr CCJTabCtrlBar::m_ClassNameToImageIndexMap [protected]

Definition at line 205 of file CJTabCtrlBar.h.

Referenced by AssociateImageIndexWithRuntimeClass(), and GetImageIndexFromRuntimeClass().

int CCJTabCtrlBar::m_nActiveTab [protected]

Definition at line 200 of file CJTabCtrlBar.h.

Referenced by CCJTabCtrlBar(), DeleteView(), and SetActiveView().

int CCJTabCtrlBar::m_nNextToolTipId [protected]

Definition at line 201 of file CJTabCtrlBar.h.

Referenced by CCJTabCtrlBar(), CreateTabListItem(), and ResetToolTips().

int CCJTabCtrlBar::m_nPointTab [protected]

Definition at line 199 of file CJTabCtrlBar.h.

Referenced by GetTabFromPoint().

CView* CCJTabCtrlBar::m_pActiveView [protected]

Definition at line 202 of file CJTabCtrlBar.h.

Referenced by AddView(), CreateTabListItem(), CreateTabView(), DeleteView(), GetActiveView(), PreTranslateMessage(), RemoveAllTabs(), and SetActiveView().

CCJTabCtrl CCJTabCtrlBar::m_TabCtrl [protected]

Definition at line 204 of file CJTabCtrlBar.h.

Referenced by AddToolTip(), AddView(), DeleteView(), GetTabFromPoint(), GetToolTip(), GetView(), GetViewName(), ModifyTabStyle(), OnCreate(), OnTabSelChange(), RemoveAllTabs(), RemoveView(), ResetToolTips(), SetActiveView(), SetTabImageList(), SetTabMenuID(), SetViewToolTip(), and SizeTabView().

CTabViews CCJTabCtrlBar::m_viewList [protected]

Definition at line 203 of file CJTabCtrlBar.h.

Referenced by AddView(), CreateTabListItem(), DeleteView(), GetView(), GetViewName(), RemoveAllTabs(), RemoveListItem(), RemoveView(), ResetToolTips(), SetActiveView(), SetViewToolTip(), and ~CCJTabCtrlBar().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJTabCtrlBar.h
  • WinCvs/CJLib/CJLibrary/CJTabCtrlBar.cpp
Generated on Sat Aug 7 22:50:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJTabView Class Reference

CCJTabView Class Reference

#include <CJTabView.h>

Inheritance diagram for CCJTabView:

[legend]
Collaboration diagram for CCJTabView:

[legend]
List of all members.

Public Member Functions

virtual BOOL | AddView (LPCTSTR lpszLabel, CRuntimeClass *pViewClass, CDocument *pDoc=NULL, CCreateContext *pContext=NULL)
virtual BOOL | ModifyTabStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
virtual void | SetActiveView (CRuntimeClass *pViewClass)
virtual void | SetActiveView (int nNewTab)
virtual void | RemoveView (int nView)
virtual CView * | GetView (CRuntimeClass *pViewClass)
virtual CView * | GetView (int nView)
virtual CView * | GetActiveView ()
virtual CImageList * | SetTabImageList (CImageList *pImageList)
virtual CTabCtrl * | GetTabCtrl ()
virtual void | GetChildRect (CRect &rect)

Protected Member Functions

CCJTabView ()
virtual | ~CCJTabView ()
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg void | OnSelchange (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Protected Attributes

CView * m_pActiveView
int m_nActiveTab
CTabCtrl * m_pTabCtrl
CToolTipCtrl * | m_pToolTip
CFont | m_TabFont
CListViews m_views

Private Member Functions

void | CalcViewRect (CRect *pRect)

Constructor & Destructor Documentation

CCJTabView::CCJTabView ( ) [protected]

Definition at line 50 of file CJTabView.cpp.

00050                        : CCtrlView(_T("SysTabControl32"),
00051     TCS_TOOLTIPS | WS_VISIBLE | WS_CHILD | WS_BORDER)
00052 {
00053     m_pTabCtrl = (CTabCtrl*) this;
00054     m_nActiveTab = 0;
00055 }

CCJTabView::~CCJTabView ( ) [protected, virtual]

Definition at line 57 of file CJTabView.cpp.

References _delete, CTV_ITEM, m_TabFont, and m_views.

00058 {
00059     while(!m_views.IsEmpty()) {
00060         CTV_ITEM *pMember=m_views.RemoveTail();
00061         _delete(pMember);
00062     }
00063
00064     // fix potential resource leak - KStowell - 10-22-99.
00065     m_TabFont.DeleteObject();
00066 }

Member Function Documentation

BOOL CCJTabView::AddView | ( | LPCTSTR | lpszLabel,
 |  | CRuntimeClass * | pViewClass,
 |  | CDocument * | pDoc = NULL,
 |  | CCreateContext * | pContext = NULL
 | ) | [virtual]

Definition at line 287 of file CJTabView.cpp.

References CalcViewRect(), CTV_ITEM, m_pActiveView, m_pTabCtrl, m_pToolTip, m_views, NULL, tagCTV_ITEM::pWnd, and tagCTV_ITEM::szLabel.

00288 {
00289
00290 #ifdef _DEBUG
00291     ASSERT_VALID(this);
00292     ASSERT(pViewClass != NULL);
00293     ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CWnd)));
00294     ASSERT(AfxIsValidAddress(pViewClass, sizeof(CRuntimeClass), FALSE));
00295 #endif
00296
00297     CCreateContext context;
00298     if (pContext == NULL)
00299     {
00300         context.m_pCurrentDoc       = pDoc;
00301         context.m_pCurrentFrame     = GetParentFrame();
00302         context.m_pLastView         = NULL;
00303         context.m_pNewDocTemplate   = NULL;
00304         context.m_pNewViewClass     = pViewClass;
00305         pContext = &context;
00306     }
00307
00308     CWnd* pWnd;
00309     TRY {
00310         pWnd = (CWnd*)pViewClass->CreateObject();
00311         if (pWnd == NULL)
00312             AfxThrowMemoryException();
00313     }
00314     CATCH_ALL(e) {
00315         TRACE0( "Out of memory creating a view.\n" );
00316         // Note: DELETE_EXCEPTION(e) not required
00317         return FALSE;
00318     }
00319     END_CATCH_ALL
00320
00321     ASSERT_KINDOF(CWnd, pWnd);
00322     ASSERT(pWnd->m_hWnd == NULL);       // not yet created
00323
00324     DWORD dwStyle = AFX_WS_DEFAULT_VIEW;
00325     CRect rect;
00326
00327     // Create with the right size and position
00328     if (!pWnd->Create(NULL, NULL, dwStyle, rect, this, 0, pContext))
00329     {
00330         TRACE0( "Warning: couldn't create client pane for view.\n" );
00331         // pWnd will be cleaned up by PostNcDestroy
00332         return FALSE;
00333     }
00334     m_pActiveView = (CView*) pWnd;
00335
00336     CTV_ITEM* pMember = new CTV_ITEM;
00337
00338     pMember->pWnd = pWnd;
00339
00340     _tcscpy( pMember->szLabel, lpszLabel );
00341
00342     m_views.AddTail(pMember);
00343
00344     // ToolTip support for tabs.
00345     if((m_views.GetCount()-1)==0) {
00346         m_pToolTip->AddTool( m_pTabCtrl, lpszLabel,
00347             NULL, m_views.GetCount()-1 );
00348     }
00349     else {
00350         m_pToolTip->AddTool( m_pTabCtrl, lpszLabel,
00351             CRect(0,0,0,0), m_views.GetCount()-1 );
00352     }
00353
00354     int nViews = m_views.GetCount();
00355     if (nViews != 1) {
00356         pWnd->EnableWindow(FALSE);
00357         pWnd->ShowWindow(SW_HIDE);
00358     }
00359
00360     TC_ITEM tci;
00361     tci.mask = TCIF_TEXT | TCIF_IMAGE;
00362     tci.pszText = (LPTSTR)(LPCTSTR)lpszLabel;
00363     tci.iImage = nViews-1;
00364     m_pTabCtrl->InsertItem(nViews, &tci);
00365
00366     CRect rcChild;
00367     CalcViewRect(&rcChild);
00368     m_pActiveView->MoveWindow(rcChild);
00369
00370     return TRUE;
00371 }

Here is the call graph for this function:

void CCJTabView::CalcViewRect ( CRect * pRect ) [private]

Definition at line 151 of file CJTabView.cpp.

References GetChildRect(), and TABVIEW_BORDER.

Referenced by AddView(), and OnWindowPosChanged().

00152 {
00153     GetChildRect((*pRect));
00154     DWORD dwStyle = GetStyle();
00155
00156     if ((dwStyle & TCS_BOTTOM) && !(dwStyle & TCS_VERTICAL)) {      // Bottom
00157         (*pRect).top    += TABVIEW_BORDER;
00158         (*pRect).left   += TABVIEW_BORDER;
00159         (*pRect).right  -= TABVIEW_BORDER;
00160         (*pRect).bottom -= 26;
00161     }
00162     else if ((dwStyle & TCS_RIGHT) && (dwStyle & TCS_VERTICAL)) {   // Right
00163         (*pRect).top    += TABVIEW_BORDER;
00164         (*pRect).left   += TABVIEW_BORDER;
00165         (*pRect).right  -= 26;
00166         (*pRect).bottom -= TABVIEW_BORDER;
00167     }
00168     else if (dwStyle & TCS_VERTICAL) {                              // Left
00169         (*pRect).top    += TABVIEW_BORDER;
00170         (*pRect).left   += 26;
00171         (*pRect).right  -= TABVIEW_BORDER;
00172         (*pRect).bottom -= TABVIEW_BORDER;
00173     }
00174     else {                                                          // Top
00175         (*pRect).top    += 26;
00176         (*pRect).left   += TABVIEW_BORDER;
00177         (*pRect).right  -= TABVIEW_BORDER;
00178         (*pRect).bottom -= TABVIEW_BORDER;
00179     }
00180 }

Here is the call graph for this function:

_CJXLIB_INLINE CView * CCJTabView::GetActiveView ( ) [virtual]

Definition at line 176 of file CJTabView.h.

References _CJXLIB_INLINE, and m_pActiveView.

Referenced by OnEraseBkgnd().

00177     { return m_pActiveView; }

void CCJTabView::GetChildRect ( CRect & rect ) [virtual]

Definition at line 80 of file CJTabView.cpp.

Referenced by CalcViewRect().

00081 {
00082     m_pTabCtrl->GetClientRect(&rect);
00083 }

_CJXLIB_INLINE CTabCtrl * CCJTabView::GetTabCtrl ( ) [virtual]

Definition at line 173 of file CJTabView.h.

References _CJXLIB_INLINE, and m_pTabCtrl.

00174     { return m_pTabCtrl; }

CView * CCJTabView::GetView ( int nView ) [virtual]

Definition at line 85 of file CJTabView.cpp.

References CTV_ITEM, m_views, NULL, and tagCTV_ITEM::pWnd.

00086 {
00087     ASSERT_VALID(this);
00088     ASSERT(nView >= 0);
00089
00090     if (nView!=-1) {
00091         CTV_ITEM *pMember=m_views.GetAt(m_views.FindIndex(nView));
00092         return (CView*)pMember->pWnd;
00093     }
00094     else
00095         return NULL;
00096 }

CView * CCJTabView::GetView ( CRuntimeClass * pViewClass ) [virtual]

Definition at line 98 of file CJTabView.cpp.

References CTV_ITEM, m_views, NULL, and tagCTV_ITEM::pWnd.

00099 {
00100     ASSERT_VALID(this);
00101     ASSERT(pViewClass != NULL);
00102     ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CWnd)));
00103     ASSERT(AfxIsValidAddress(pViewClass, sizeof(CRuntimeClass), FALSE));
00104
00105     for (POSITION pos=m_views.GetHeadPosition(); pos; m_views.GetNext(pos)) {
00106         CTV_ITEM *pMember=m_views.GetAt(pos);
00107         if (pMember->pWnd->IsKindOf(pViewClass)) {
00108             return (CView*)pMember->pWnd;
00109         }
00110     }
00111     return NULL;
00112 }

BOOL CCJTabView::ModifyTabStyle | ( | DWORD | dwRemove,
 |  | DWORD | dwAdd,
 |  | UINT | nFlags = 0
 | ) | [virtual]

Definition at line 114 of file CJTabView.cpp.

References m_pTabCtrl, and m_TabFont.

00115 {
00116     DWORD dwCurrentStyle = GetStyle();
00117
00118     // We are in horizontal mode...go vertical
00119     if ((dwAdd & TCS_VERTICAL) && !(dwCurrentStyle & TCS_VERTICAL)) {
00120         // Get the log font.
00121         NONCLIENTMETRICS ncm;
00122         ncm.cbSize = sizeof(NONCLIENTMETRICS);
00123         VERIFY(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
00124             sizeof(NONCLIENTMETRICS), &ncm, 0));
00125         // fix potential resource leak - KStowell - 10-22-99.
00126         m_TabFont.DeleteObject();
00127         ncm.lfMessageFont.lfOrientation = (dwAdd & TCS_RIGHT) ? 2700 : 900;
00128         ncm.lfMessageFont.lfEscapement  = (dwAdd & TCS_RIGHT) ? 2700 : 900;
00129         m_TabFont.CreateFontIndirect(&ncm.lfMessageFont);
00130         m_pTabCtrl->SetFont(&m_TabFont);
00131     }
00132     // We are in vertical mode....go horizontal
00133     else if ((dwCurrentStyle & TCS_VERTICAL) && !(dwAdd & TCS_VERTICAL)) {
00134         // Get the log font.
00135         NONCLIENTMETRICS ncm;
00136         ncm.cbSize = sizeof(NONCLIENTMETRICS);
00137         VERIFY(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
00138             sizeof(NONCLIENTMETRICS), &ncm, 0));
00139         // fix potential resource leak - KStowell - 10-22-99.
00140         m_TabFont.DeleteObject();
00141         ncm.lfMessageFont.lfOrientation = 0;
00142         ncm.lfMessageFont.lfEscapement  = 0;
00143         m_TabFont.CreateFontIndirect(&ncm.lfMessageFont);
00144         m_pTabCtrl->SetFont(&m_TabFont);
00145     }
00146
00147     return m_pTabCtrl->ModifyStyle(dwRemove, dwAdd, nFlags);
00148 }

int CCJTabView::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 381 of file CJTabView.cpp.

References m_pTabCtrl, m_pToolTip, and m_TabFont.

00382 {
00383     if (CCtrlView::OnCreate(lpCreateStruct) == -1)
00384         return -1;
00385
00386     ASSERT(m_pTabCtrl);         // Should already be constructed
00387
00389     // Fixed bug with set parent and modifystyle which would cause the
00390     // application to lock up. - Kevin [klussier@redcreek.com].
00392     m_pTabCtrl->SetParent(CWnd::FromHandle(lpCreateStruct->hwndParent));
00393     m_pTabCtrl->ModifyStyleEx(WS_EX_NOPARENTNOTIFY, 0);
00394
00395     // Get the log font.
00396     NONCLIENTMETRICS ncm;
00397     ncm.cbSize = sizeof(NONCLIENTMETRICS);
00398     VERIFY(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
00399         sizeof(NONCLIENTMETRICS), &ncm, 0));
00400     m_TabFont.CreateFontIndirect(&ncm.lfMessageFont);
00401     m_pTabCtrl->SetFont(&m_TabFont);
00402
00403 #ifdef _VC_VERSION_5
00404     m_pToolTip = m_pTabCtrl->GetTooltips();
00405     m_pTabCtrl->SetTooltips(m_pToolTip);
00406 #else
00407     m_pToolTip = m_pTabCtrl->GetToolTips();
00408     m_pTabCtrl->SetToolTips(m_pToolTip);
00409 #endif // _VC_VERSION_5
00410
00411     return 0;
00412 }

BOOL CCJTabView::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 414 of file CJTabView.cpp.

References GetActiveView().

00415 {
00416     CView *pView = GetActiveView();
00417     if ( pView )
00418     {
00419         // Exclude the embedded views
00420         // area from the erase - Andy
00421         CRect rectClient;
00422         pView->GetWindowRect( &rectClient );
00423         ScreenToClient( &rectClient );
00424         pDC->ExcludeClipRect( &rectClient );
00425     }
00426     return CCtrlView::OnEraseBkgnd(pDC);
00427 }

Here is the call graph for this function:

void CCJTabView::OnSelchange | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 374 of file CJTabView.cpp.

References m_pTabCtrl, and SetActiveView().

00375 {
00376     SetActiveView(m_pTabCtrl->GetCurSel());
00377
00378     *pResult = 0;
00379 }

Here is the call graph for this function:

void CCJTabView::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 182 of file CJTabView.cpp.

References CalcViewRect(), CTV_ITEM, m_views, NULL, and tagCTV_ITEM::pWnd.

00183 {
00184     CRect rcChild;
00185     CWnd *pWnd;
00186
00187     CalcViewRect(&rcChild);
00188     for (POSITION pos=m_views.GetHeadPosition(); pos; m_views.GetNext(pos)) {
00189         pWnd = m_views.GetAt(pos)->pWnd;
00190         pWnd->MoveWindow(rcChild);
00191     }
00192
00193     // *** LiangYiBin.Donald
00194     if( lpwndpos->flags & SWP_HIDEWINDOW ) {
00195         CFrameWnd* pFrame = GetParentFrame();
00196         POSITION pos = m_views.GetHeadPosition();
00197         while ( pos != NULL ) {
00198             // check whether the views in the controlbar are focused
00199             CTV_ITEM *pItem = (CTV_ITEM *) m_views.GetNext(pos);
00200             if ( pFrame != NULL && pFrame->GetActiveView() == pItem->pWnd ) {
00201                 // To avoid mainwindow freezing, we must deativate the view,
00202                 // because it's not visible now.
00203                 pFrame->SetActiveView(NULL);
00204             }
00205         }
00206     }
00207
00208     CCtrlView::OnWindowPosChanged(lpwndpos);
00209 }

Here is the call graph for this function:

void CCJTabView::RemoveView ( int nView ) [virtual]

Definition at line 211 of file CJTabView.cpp.

References m_views.

00212 {
00213     ASSERT_VALID(this);
00214     ASSERT(nView >= 0);
00215
00216     // remove the page from internal list
00217     m_views.RemoveAt(m_views.FindIndex(nView));
00218 }

void CCJTabView::SetActiveView ( int nNewTab ) [virtual]

Definition at line 256 of file CJTabView.cpp.

References CTV_ITEM, m_nActiveTab, m_pActiveView, m_pTabCtrl, m_views, NULL, and tagCTV_ITEM::pWnd.

00257 {
00258     ASSERT_VALID(this);
00259     ASSERT(nNewTab >= 0);
00260
00261     if (nNewTab!=-1 && nNewTab!=m_nActiveTab) {
00262         CTV_ITEM *newMember=m_views.GetAt(m_views.FindIndex(nNewTab));
00263         CTV_ITEM *oldMember=NULL;
00264
00265         if (m_nActiveTab!=-1) {
00266             oldMember=m_views.GetAt(m_views.FindIndex(m_nActiveTab));
00267             oldMember->pWnd->EnableWindow(FALSE);
00268             oldMember->pWnd->ShowWindow(SW_HIDE);
00269         }
00270         newMember->pWnd->EnableWindow(TRUE);
00271         newMember->pWnd->ShowWindow(SW_SHOW);
00272         newMember->pWnd->SetFocus();
00273
00274         m_pActiveView = (CView *)newMember->pWnd;
00275
00276         m_nActiveTab = nNewTab;
00277         // select the tab (if tab programmatically changed)
00278         m_pTabCtrl->SetCurSel(m_nActiveTab);
00279     }
00280 }

void CCJTabView::SetActiveView ( CRuntimeClass * pViewClass ) [virtual]

Definition at line 220 of file CJTabView.cpp.

References CTV_ITEM, m_nActiveTab, m_pActiveView, m_pTabCtrl, m_views, NULL, and tagCTV_ITEM::pWnd.

Referenced by OnSelchange().

00221 {
00222     ASSERT_VALID(this);
00223     ASSERT(pViewClass != NULL);
00224     ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CWnd)));
00225     ASSERT(AfxIsValidAddress(pViewClass, sizeof(CRuntimeClass), FALSE));
00226
00227     int nNewTab = 0;
00228     for (POSITION pos=m_views.GetHeadPosition(); pos; m_views.GetNext(pos)) {
00229         CTV_ITEM *pMember=m_views.GetAt(pos);
00230         if (pMember->pWnd->IsKindOf(pViewClass)) {
00231             //first hide old first view
00232             m_pActiveView->EnableWindow(FALSE);
00233             m_pActiveView->ShowWindow(SW_HIDE);
00234
00235             // set new active view
00236             m_pActiveView = (CView*)pMember->pWnd;
00237             // enable, show, set focus to new view
00238             m_pActiveView->EnableWindow(TRUE);
00239             m_pActiveView->ShowWindow(SW_SHOW);
00240             m_pActiveView->SetFocus();
00241
00242             // *** LiangYiBin.Donald
00243             //((CFrameWnd *)GetParent())->SetActiveView(m_pActiveView);
00244             //GetParentFrame()->SetActiveView(m_pActiveView);
00245
00246             m_nActiveTab = nNewTab;
00247             // select the tab
00248             m_pTabCtrl->SetCurSel(m_nActiveTab);
00249
00250             break;
00251         }
00252         nNewTab++;
00253     }
00254 }

CImageList * CCJTabView::SetTabImageList ( CImageList * pImageList ) [virtual]

Definition at line 282 of file CJTabView.cpp.

References m_pTabCtrl.

00283 {
00284     return m_pTabCtrl->SetImageList (pImageList);
00285 }

Member Data Documentation

int CCJTabView::m_nActiveTab [protected]

Definition at line 76 of file CJTabView.h.

Referenced by SetActiveView().

CView* CCJTabView::m_pActiveView [protected]

Definition at line 75 of file CJTabView.h.

Referenced by AddView(), GetActiveView(), and SetActiveView().

CTabCtrl* CCJTabView::m_pTabCtrl [protected]

Definition at line 77 of file CJTabView.h.

Referenced by AddView(), GetTabCtrl(), ModifyTabStyle(), OnCreate(), OnSelchange(), SetActiveView(), and SetTabImageList().

CToolTipCtrl* CCJTabView::m_pToolTip [protected]

Definition at line 78 of file CJTabView.h.

Referenced by AddView(), and OnCreate().

CFont CCJTabView::m_TabFont [protected]

Definition at line 79 of file CJTabView.h.

Referenced by ModifyTabStyle(), OnCreate(), and ~CCJTabView().

CListViews CCJTabView::m_views [protected]

Definition at line 80 of file CJTabView.h.

Referenced by AddView(), GetView(), OnWindowPosChanged(), RemoveView(), SetActiveView(), and ~CCJTabView().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJTabView.h
  • WinCvs/CJLib/CJLibrary/CJTabView.cpp
Generated on Sat Aug 7 22:50:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJTimeEdit Class Reference

CCJTimeEdit Class Reference

#include <CJMaskEdit.h>

Inheritance diagram for CCJTimeEdit:

[legend]
Collaboration diagram for CCJTimeEdit:

[legend]
List of all members.

Public Member Functions

CCJTimeEdit ()
virtual void | SetHours (int nHours)
virtual void | SetMins (int nMins)
virtual bool | ProcessMask (UINT nChar, int nEndPos)
virtual void | FormatOleDateTime (CString &strData, COleDateTime dt)

Public Attributes

CString | m_strHours
CString | m_strMins

Constructor & Destructor Documentation

CCJTimeEdit::CCJTimeEdit ( )

Definition at line 511 of file CJMaskEdit.cpp.

00512 {
00513     m_bUseMask      = true;
00514     m_strMask       = _T("00:00");
00515     m_strLiteral    = _T("__:__");
00516     m_strHours      = _T("47");
00517     m_strMins       = _T("59");
00518 }

Member Function Documentation

void CCJTimeEdit::FormatOleDateTime | ( | CString & | strData,
 |  | COleDateTime | dt
 | ) | [virtual]

Reimplemented from CCJDateEdit.

Definition at line 520 of file CJMaskEdit.cpp.

00521 {
00522     if( dt.m_dt == 0 ) {
00523         strData = "00:00";
00524     }
00525     else {
00526         strData = dt.Format( _T("%H:%M"));
00527     }
00528 }

bool CCJTimeEdit::ProcessMask | ( | UINT | nChar,
 |  | int | nEndPos
 | ) | [virtual]

Reimplemented from CCJDateEdit.

Definition at line 530 of file CJMaskEdit.cpp.

References m_strHours, and m_strMins.

00531 {
00532     // check the key against the mask
00533     switch( m_strMask.GetAt( nEndPos ))
00534     {
00535     case '0':       // digit only //completely changed this
00536         {
00537             bool bReturn = true;
00538
00539             if( isdigit( nChar ))
00540             {
00541                 if( nEndPos == 0 )
00542                 {
00543                     if(nChar > (UINT)m_strHours[0]) {
00544                         bReturn = false;
00545                     }
00546                 }
00547                 else if( nEndPos == 1 )
00548                 {
00549                     if(m_strWindowText.GetAt(0) == m_strHours[0])
00550                     {
00551                         if( nChar > (UINT)m_strHours[1] ) {
00552                             bReturn = false;
00553                         }
00554                     }
00555                 }
00556                 else if( nEndPos == 3 )
00557                 {
00558                     if( nChar > (UINT)m_strMins[0] ) {
00559                         bReturn = false;
00560                     }
00561                 }
00562                 else if( nEndPos == 4 )
00563                 {
00564                     if( m_strWindowText.GetAt(3) == m_strMins[0] )
00565                     {
00566                         if( nChar > (UINT)m_strMins[1] ) {
00567                             bReturn = false;
00568                         }
00569                     }
00570                 }
00571                 return bReturn;
00572             }
00573             break;
00574         }
00575     }
00576
00577     MessageBeep((UINT)-1);
00578     return false;
00579 }

void CCJTimeEdit::SetHours ( int nHours ) [virtual]

Definition at line 581 of file CJMaskEdit.cpp.

References m_strHours.

00582 {
00583     m_strHours.Format( _T("%d"), nHours);
00584 }

void CCJTimeEdit::SetMins ( int nMins ) [virtual]

Definition at line 586 of file CJMaskEdit.cpp.

References m_strMins.

00587 {
00588     m_strMins.Format( _T("%d"), nMins);
00589 }

Member Data Documentation

CString CCJTimeEdit::m_strHours

Definition at line 142 of file CJMaskEdit.h.

Referenced by ProcessMask(), and SetHours().

CString CCJTimeEdit::m_strMins

Definition at line 143 of file CJMaskEdit.h.

Referenced by ProcessMask(), and SetMins().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJMaskEdit.h
  • WinCvs/CJLib/CJLibrary/CJMaskEdit.cpp
Generated on Sat Aug 7 22:50:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJToolBar Class Reference

CCJToolBar Class Reference

#include <CJToolBar.h>

Inheritance diagram for CCJToolBar:

[legend]
Collaboration diagram for CCJToolBar:

[legend]
List of all members.

Public Member Functions

CCJToolBar ()
virtual | ~CCJToolBar ()
virtual BOOL | Create (CWnd *pParentWnd, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_TOP, UINT nID=AFX_IDW_TOOLBAR)
virtual BOOL | CreateEx (CWnd *pParentWnd, DWORD dwCtrlStyle=TBSTYLE_FLAT, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP, CRect rcBorders=CRect(0, 0, 0, 0), UINT nID=AFX_IDW_TOOLBAR)
CWnd * | InsertControl (CRuntimeClass *pClass, LPCTSTR lpszWindowName, CRect &rect, UINT nID, DWORD dwStyle)
CWnd * | InsertControl (CWnd *pCtrl, CRect &rect, UINT nID)
BOOL | AddDropDownButton (UINT nIDButton, UINT nIDMenu, BOOL bArrow=TRUE)
DROPDOWNBUTTON * | FindDropDownButton (UINT nID)
LRESULT | SendMessageC (UINT m, WPARAM wp=0, LPARAM lp=0) const
void | SetSizes (SIZE sizeButton, SIZE sizeImage)
void | SetHeight (int cyHeight)
BOOL | LoadToolBar (LPCTSTR lpszResourceName, TOOLBARINFO *pBarInfo=NULL)
BOOL | LoadToolBar (UINT nIDResource, TOOLBARINFO *pBarInfo=NULL)
BOOL | LoadBitmap (LPCTSTR lpszResourceName)
BOOL | LoadBitmap (UINT nIDResource)
BOOL | SetBitmap (HBITMAP hbmImageWell)
BOOL | SetButtons (const UINT *lpIDArray, int nIDCount)
int | CommandToIndex (UINT nIDFind) const
UINT | GetItemID (int nIndex) const
UINT | GetButtonStyle (int nIndex) const
void | SetButtonStyle (int nIndex, UINT nStyle)
void | SaveState ()
void | RestoreState ()
void | GetButtonInfo (int nIndex, UINT &nID, UINT &nStyle, int &iImage) const
void | SetButtonInfo (int nIndex, UINT nID, UINT nStyle, int iImage)
BOOL | SetButtonText (int nIndex, LPCTSTR lpszText)
CString | GetButtonText (int nIndex) const
void | GetButtonText (int nIndex, CString &rString) const
CCJToolBarCtrl & | GetToolBarCtrl () const
void | SetOwner (CWnd *pOwnerWnd)
BOOL | AddReplaceBitmap (HBITMAP hbmImageWell)
void | GetButton (int nIndex, TBBUTTON *pButton) const
void | SetButton (int nIndex, TBBUTTON *pButton)
BOOL | EnableButton (int nID, BOOL bEnable)
BOOL | CheckButton (int nID, BOOL bCheck)
BOOL | PressButton (int nID, BOOL bPress)
BOOL | HideButton (int nID, BOOL bHide)
BOOL | Indeterminate (int nID, BOOL bIndeterminate)
BOOL | IsButtonEnabled (int nID) const
BOOL | IsButtonChecked (int nID) const
BOOL | IsButtonPressed (int nID) const
BOOL | IsButtonHidden (int nID) const
BOOL | IsButtonIndeterminate (int nID) const
BOOL | SetState (int nID, UINT nState)
int | GetState (int nID) const
BOOL | AddButtons (int nNumButtons, LPTBBUTTON lpButtons)
BOOL | InsertButton (int nIndex, LPTBBUTTON lpButton)
BOOL | DeleteButton (int nIndex)
int | GetButtonCount () const
void | Customize ()
int | AddStrings (LPCTSTR lpszStrings)
void | SetButtonStructSize (int nSize)
BOOL | SetButtonSize (CSize sz)
BOOL | SetBitmapSize (CSize sz)
void | AutoSize ()
CToolTipCtrl * | GetToolTips () const
void | SetToolTips (CToolTipCtrl *pTip)
void | SetRows (int nRows, BOOL bLarger, LPRECT lpRect)
int | GetRows () const
BOOL | SetCmdID (int nIndex, UINT nID)
UINT | GetBitmapFlags () const
BOOL | SetIndent (int indent)
HIMAGELIST | GetImageList () const
HIMAGELIST | SetImageList (HIMAGELIST hImgList)
int | GetBitmap (UINT nIdButton) const
DWORD | SetExtendedStyle (DWORD dwStyle)
BOOL | GetRect (UINT nIdButton, RECT &rc) const
DWORD | GetToolbarStyle () const
void | SetToolbarStyle (DWORD dwStyle)
int | HitTest (CPoint p) const
int | GetHotItem () const
void | SetHotItem (int iHot)
BOOL | MapAccelerator (TCHAR ch, UINT &nID) const
CSize | GetPadding () const
CSize | SetPadding (CSize sz)
virtual CSize | CalcFixedLayout (BOOL bStretch, BOOL bHorz)
virtual CSize | CalcDynamicLayout (int nLength, DWORD nMode)
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHndler)
virtual void | OnBarStyleChange (DWORD dwOldStyle, DWORD dwNewStyle)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
virtual int | OnToolHitTest (CPoint point, TOOLINFO *pTI) const
virtual void | GetItemRect (int nIndex, LPRECT lpRect) const
virtual void | InvalidateOldPos (const CRect &rcInvalid)
virtual CSize | GetButtonSize (TBBUTTON *pData, int iButton)
virtual void | OnDropDownButton (const NMTOOLBAR &nmtb, UINT nID, CRect rc)

Protected Member Functions

CSize | CalcLayout (DWORD nMode, int nLength=-1)
CSize | CalcSize (TBBUTTON *pData, int nCount)
int | WrapToolBar (TBBUTTON *pData, int nCount, int nWidth)
void | SizeToolBar (TBBUTTON *pData, int nCount, int nLength, BOOL bVert=FALSE)
void | Layout ()
LRESULT | OnSetSizeHelper (CSize &size, LPARAM lParam)
afx_msg UINT | OnNcHitTest (CPoint)
afx_msg void | OnNcPaint ()
afx_msg void | OnPaint ()
afx_msg void | OnNcCalcSize (BOOL, NCCALCSIZE_PARAMS *)
afx_msg void | OnWindowPosChanging (LPWINDOWPOS)
afx_msg void | OnWindowPosChanged (WINDOWPOS *lpwndpos)
afx_msg void | OnSysColorChange ()
afx_msg LRESULT | OnSetButtonSize (WPARAM, LPARAM)
afx_msg LRESULT | OnSetBitmapSize (WPARAM, LPARAM)
afx_msg BOOL | OnNcCreate (LPCREATESTRUCT)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnDestroy ()
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnToolBarBtnDropDown (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarQueryDelete (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarQueryInsert (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarChange (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarBeginDrag (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarEndDrag (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarBeginAdjust (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarCustomHelp (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarEndAdjust (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarGetButtonInfo (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnToolBarReset (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg LRESULT | OnPreserveZeroBorderHelper (WPARAM, LPARAM)

Protected Attributes

TOOLBARINFO * m_pBarInfo
CObList * | m_pControls
bool m_bShowDropArrow
HRSRC | m_hRsrcImageWell
HINSTANCE | m_hInstImageWell
HBITMAP | m_hbmImageWell
BOOL | m_bDelayedButtonLayout
CRect | m_rcOldPos
int m_nButtons
HKEY | m_hKeyRoot
CString | m_strSubKey
CString | m_strValueName
CSize | m_sizeImage
CSize | m_sizeButton
DROPDOWNBUTTON * m_pDropButtons
CMapStringToPtr * | m_pStringMap

Static Protected Attributes

int | m_nBarNumber = 0

Constructor & Destructor Documentation

CCJToolBar::CCJToolBar ( )

Definition at line 300 of file CJToolBar.cpp.

References m_bDelayedButtonLayout, m_bShowDropArrow, m_hbmImageWell, m_hInstImageWell, m_hKeyRoot, m_hRsrcImageWell, m_nBarNumber, m_nButtons, m_pBarInfo, m_pControls, m_pDropButtons, m_pStringMap, m_sizeButton, m_sizeImage, m_strSubKey, m_strValueName, and NULL.

00301 {
00302     m_bShowDropArrow = false;
00303     m_pControls      = NULL;
00304     m_pDropButtons   = NULL;        // list of drop-down buttons
00305     m_nButtons       = 0;
00306     m_pBarInfo       = NULL;
00307     m_hKeyRoot       = HKEY_CURRENT_USER;
00308
00309     // get a pointer to the application.
00310     CWinApp* pApp = AfxGetApp();
00311     ASSERT( pApp );
00312
00313     ++m_nBarNumber;
00314     m_strValueName.Format( _T("CJToolBar %d"), m_nBarNumber );
00315     m_strSubKey.Format( _T("Software\\%s\\%s\\Settings"),
00316         pApp->m_pszRegistryKey, pApp->m_pszProfileName );
00317
00318     // initialize state
00319     m_pStringMap = NULL;
00320     m_hRsrcImageWell = NULL;
00321     m_hInstImageWell = NULL;
00322     m_hbmImageWell = NULL;
00323     m_bDelayedButtonLayout = TRUE;
00324
00325     // default image sizes
00326     m_sizeImage.cx = 16;
00327     m_sizeImage.cy = 15;
00328
00329     // default button sizes
00330     m_sizeButton.cx = 23;
00331     m_sizeButton.cy = 22;
00332
00333     // top and bottom borders are 1 larger than default for ease of grabbing
00334     m_cyTopBorder = 3;
00335     m_cyBottomBorder = 3;
00336     m_bExStyle = false;
00337 }

CCJToolBar::~CCJToolBar ( ) [virtual]

Definition at line 339 of file CJToolBar.cpp.

References m_hbmImageWell, m_pControls, m_pDropButtons, m_pStringMap, and DROPDOWNBUTTON::next.

00340 {
00341     AfxDeleteObject((HGDIOBJ*)&m_hbmImageWell);
00342     delete m_pStringMap;
00343
00344     m_nCount = 0;
00345
00346     while (m_pDropButtons)
00347     {
00348         DROPDOWNBUTTON* pnext = m_pDropButtons->next;
00349         delete m_pDropButtons;
00350         m_pDropButtons = pnext;
00351     }
00352
00353     if( m_pControls ) {
00354         for( POSITION pos = m_pControls->GetHeadPosition() ; pos ; ) {
00355             delete m_pControls->GetNext(pos);
00356         }
00357         delete m_pControls;
00358     }
00359 }

Member Function Documentation

_CJXLIB_INLINE BOOL CCJToolBar::AddButtons | ( | int | nNumButtons,
 |  | LPTBBUTTON | lpButtons
 | ) |

Definition at line 403 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by CCJMenuBar::LoadMenu().

00404     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_ADDBUTTONS, nNumButtons, (LPARAM)lpButtons); }

BOOL CCJToolBar::AddDropDownButton | ( | UINT | nIDButton,
 |  | UINT | nIDMenu,
 |  | BOOL | bArrow = TRUE
 | ) |

Definition at line 580 of file CJToolBar.cpp.

References CommandToIndex(), FindDropDownButton(), GetButtonStyle(), DROPDOWNBUTTON::idButton, DROPDOWNBUTTON::idMenu, m_pDropButtons, DROPDOWNBUTTON::next, SetButtonStyle(), and SetExtendedStyle().

Referenced by UToolbar::RebuildBar().

00581 {
00582     ASSERT_VALID(this);
00583
00584     DROPDOWNBUTTON* pb = FindDropDownButton(nIDButton);
00585     if (!pb) {
00586         pb = new DROPDOWNBUTTON;
00587         ASSERT(pb);
00588         pb->next = m_pDropButtons;
00589         m_pDropButtons = pb;
00590     }
00591     pb->idButton = nIDButton;
00592     pb->idMenu   = nIDMenu;
00593
00594     int iButton = CommandToIndex(nIDButton);
00595
00596     DWORD dwStyle = GetButtonStyle(iButton);
00597     dwStyle |= TBSTYLE_DROPDOWN;
00598     SetButtonStyle(iButton, dwStyle);
00599
00600     if (bArrow)
00601         SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS);
00602
00603     return TRUE;
00604 }

Here is the call graph for this function:

BOOL CCJToolBar::AddReplaceBitmap ( HBITMAP hbmImageWell )

Definition at line 1141 of file CJToolBar.cpp.

References m_hbmImageWell, m_sizeImage, and NULL.

Referenced by LoadBitmap(), OnSysColorChange(), and SetBitmap().

01142 {
01143     // need complete bitmap size to determine number of images
01144     BITMAP bitmap;
01145     VERIFY(::GetObject(hbmImageWell, sizeof(BITMAP), &bitmap));
01146
01147     // add the bitmap to the common control toolbar
01148     BOOL bResult;
01149     if (m_hbmImageWell == NULL)
01150     {
01151         TBADDBITMAP addBitmap;
01152         addBitmap.hInst = NULL; // makes TBADDBITMAP::nID behave a HBITMAP
01153         addBitmap.nID = (UINT)hbmImageWell;
01154         bResult =  DefWindowProc(TB_ADDBITMAP,
01155             bitmap.bmWidth / m_sizeImage.cx, (LPARAM)&addBitmap) == 0;
01156     }
01157     else
01158     {
01159         TBREPLACEBITMAP replaceBitmap;
01160         replaceBitmap.hInstOld = NULL;
01161         replaceBitmap.nIDOld = (UINT)m_hbmImageWell;
01162         replaceBitmap.hInstNew = NULL;
01163         replaceBitmap.nIDNew = (UINT)hbmImageWell;
01164         replaceBitmap.nButtons = bitmap.bmWidth / m_sizeImage.cx;
01165         bResult = (BOOL)DefWindowProc(TB_REPLACEBITMAP, 0,
01166             (LPARAM)&replaceBitmap);
01167     }
01168     // remove old bitmap, if present
01169     if (bResult)
01170     {
01171         AfxDeleteObject((HGDIOBJ*)&m_hbmImageWell);
01172         m_hbmImageWell = hbmImageWell;
01173     }
01174
01175     return bResult;
01176 }

_CJXLIB_INLINE int CCJToolBar::AddStrings ( LPCTSTR lpszStrings )

Definition at line 418 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by CCJMenuBar::LoadMenu().

00419     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_ADDSTRING, 0, (LPARAM)lpszStrings); }

_CJXLIB_INLINE void CCJToolBar::AutoSize ( )

Definition at line 430 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by CCJMenuBar::LoadMenu().

00431     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_AUTOSIZE); }

CSize CCJToolBar::CalcDynamicLayout | ( | int | nLength,
 |  | DWORD | nMode
 | ) | [virtual]

Definition at line 1687 of file CJToolBar.cpp.

References CalcFixedLayout(), and CalcLayout().

Referenced by OnBarStyleChange().

01688 {
01689     if ((nLength == -1) && !(dwMode & LM_MRUWIDTH) && !(dwMode & LM_COMMIT) &&
01690         ((dwMode & LM_HORZDOCK) || (dwMode & LM_VERTDOCK)))
01691     {
01692         return CalcFixedLayout(dwMode & LM_STRETCH, dwMode & LM_HORZDOCK);
01693     }
01694     return CalcLayout(dwMode, nLength);
01695 }

Here is the call graph for this function:

CSize CCJToolBar::CalcFixedLayout | ( | BOOL | bStretch,
 |  | BOOL | bHorz
 | ) | [virtual]

Reimplemented in CCJMenuBar.

Definition at line 1679 of file CJToolBar.cpp.

References CalcLayout().

Referenced by CalcDynamicLayout(), and CCJMenuBar::CalcFixedLayout().

01680 {
01681     DWORD dwMode = bStretch ? LM_STRETCH : 0;
01682     dwMode |= bHorz ? LM_HORZ : 0;
01683
01684     return CalcLayout(dwMode);
01685 }

Here is the call graph for this function:

CSize CCJToolBar::CalcLayout | ( | DWORD | nMode,
 |  | int | nLength = -1
 | ) | [protected]

Definition at line 1553 of file CJToolBar.cpp.

References CCJToolBarBase::CalcInsideRect(), CalcSize(), GetButton(), GetItemRect(), m_bDelayedButtonLayout, CJX_CONTROLPOS::nID, CJX_CONTROLPOS::nIndex, NULL, CJX_CONTROLPOS::rectOldPos, SetButton(), and SizeToolBar().

Referenced by CalcDynamicLayout(), and CalcFixedLayout().

01554 {
01555     ASSERT_VALID(this);
01556     ASSERT(::IsWindow(m_hWnd));
01557     if (dwMode & LM_HORZDOCK)
01558         ASSERT(dwMode & LM_HORZ);
01559
01560     int nCount;
01561     TBBUTTON* pData = NULL;
01562     CSize sizeResult(0,0);
01563
01564     //BLOCK: Load Buttons
01565     {
01566         nCount = DefWindowProc(TB_BUTTONCOUNT, 0, 0);
01567         if (nCount != 0)
01568         {
01569             int i;
01570             pData = new TBBUTTON[nCount];
01571             for (i = 0; i < nCount; i++)
01572                 GetButton(i, &pData[i]);
01573         }
01574     }
01575
01576     if (nCount > 0)
01577     {
01578         if (!(m_dwStyle & CBRS_SIZE_FIXED))
01579         {
01580             BOOL bDynamic = m_dwStyle & CBRS_SIZE_DYNAMIC;
01581
01582             if (bDynamic && (dwMode & LM_MRUWIDTH))
01583                 SizeToolBar(pData, nCount, m_nMRUWidth);
01584             else if (bDynamic && (dwMode & LM_HORZDOCK))
01585                 SizeToolBar(pData, nCount, 32767);
01586             else if (bDynamic && (dwMode & LM_VERTDOCK))
01587                 SizeToolBar(pData, nCount, 0);
01588             else if (bDynamic && (nLength != -1))
01589             {
01590                 CRect rect; rect.SetRectEmpty();
01591                 CalcInsideRect(rect, (dwMode & LM_HORZ));
01592                 BOOL bVert = (dwMode & LM_LENGTHY);
01593                 int nLen = nLength + (bVert ? rect.Height() : rect.Width());
01594
01595                 SizeToolBar(pData, nCount, nLen, bVert);
01596             }
01597             else if (bDynamic && (m_dwStyle & CBRS_FLOATING))
01598                 SizeToolBar(pData, nCount, m_nMRUWidth);
01599             else
01600                 SizeToolBar(pData, nCount, (dwMode & LM_HORZ) ? 32767 : 0);
01601         }
01602
01603         sizeResult = CalcSize(pData, nCount);
01604
01605         if (dwMode & LM_COMMIT)
01606         {
01607             CJX_CONTROLPOS* pControl = NULL;
01608             int nControlCount = 0;
01609             BOOL bIsDelayed = m_bDelayedButtonLayout;
01610             m_bDelayedButtonLayout = FALSE;
01611
01612             for (int i = 0; i < nCount; i++)
01613                 if ((pData[i].fsStyle & TBSTYLE_SEP) && (pData[i].idCommand != 0))
01614                     nControlCount++;
01615
01616             if (nControlCount > 0)
01617             {
01618                 pControl = new CJX_CONTROLPOS[nControlCount];
01619                 nControlCount = 0;
01620
01621                 for(int i = 0; i < nCount; i++)
01622                 {
01623                     if ((pData[i].fsStyle & TBSTYLE_SEP) && (pData[i].idCommand != 0))
01624                     {
01625                         pControl[nControlCount].nIndex = i;
01626                         pControl[nControlCount].nID = pData[i].idCommand;
01627
01628                         CRect rect;
01629                         GetItemRect(i, &rect);
01630                         ClientToScreen(&rect);
01631                         pControl[nControlCount].rectOldPos = rect;
01632
01633                         nControlCount++;
01634                     }
01635                 }
01636             }
01637
01638             if ((m_dwStyle & CBRS_FLOATING) && (m_dwStyle & CBRS_SIZE_DYNAMIC))
01639                 m_nMRUWidth = sizeResult.cx;
01640             for (i = 0; i < nCount; i++)
01641                 SetButton(i, &pData[i]);
01642
01643             if (nControlCount > 0)
01644             {
01645                 for (int i = 0; i < nControlCount; i++)
01646                 {
01647                     CWnd* pWnd = GetDlgItem(pControl[i].nID);
01648                     if (pWnd != NULL)
01649                     {
01650                         CRect rect;
01651                         pWnd->GetWindowRect(&rect);
01652                         CPoint pt = rect.TopLeft() - pControl[i].rectOldPos.TopLeft();
01653                         GetItemRect(pControl[i].nIndex, &rect);
01654                         pt = rect.TopLeft() + pt;
01655                         pWnd->SetWindowPos(NULL, pt.x, pt.y, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
01656                     }
01657                 }
01658                 delete[] pControl;
01659             }
01660             m_bDelayedButtonLayout = bIsDelayed;
01661         }
01662         delete[] pData;
01663     }
01664
01665     //BLOCK: Adjust Margins
01666     {
01667         CRect rect; rect.SetRectEmpty();
01668         CalcInsideRect(rect, (dwMode & LM_HORZ));
01669         sizeResult.cy -= rect.Height();
01670         sizeResult.cx -= rect.Width();
01671
01672         CSize size = CCJToolBarBase::CalcFixedLayout((dwMode & LM_STRETCH), (dwMode & LM_HORZ));
01673         sizeResult.cx = max(sizeResult.cx, size.cx);
01674         sizeResult.cy = max(sizeResult.cy, size.cy);
01675     }
01676     return sizeResult;
01677 }

Here is the call graph for this function:

CSize CCJToolBar::CalcSize | ( | TBBUTTON * | pData,
 |  | int | nCount
 | ) | [protected]

Definition at line 1370 of file CJToolBar.cpp.

References CX_OVERLAP, GetButtonSize(), m_sizeButton, and NULL.

Referenced by CalcLayout(), and SizeToolBar().

01371 {
01372     ASSERT(pData != NULL && nCount > 0);
01373
01374     CPoint cur(0,0);
01375     CSize sizeResult(0,0);
01376     int cyTallestOnRow = 0;
01377
01378     for (int i = 0; i < nCount; i++)
01379     {
01380         if (pData[i].fsState & TBSTATE_HIDDEN)
01381             continue;
01382
01383         // **PD**
01384         // Load actual size of button into a local variable
01385         // called m_sizeButton. C++ will use this instead of
01386         // CToolBar::m_sizeButton.
01387         //
01388         CSize m_sizeButton = GetButtonSize(pData, i);
01389
01390         // **PD**
01391         // I also changed the logic below to be more correct.
01392         cyTallestOnRow = max(cyTallestOnRow, m_sizeButton.cy);
01393         sizeResult.cx = max(cur.x + m_sizeButton.cx, sizeResult.cx);
01394         sizeResult.cy = max(cur.y + m_sizeButton.cy, sizeResult.cy);
01395
01396         cur.x += m_sizeButton.cx - CX_OVERLAP;
01397
01398         if (pData[i].fsState & TBSTATE_WRAP)
01399         {
01400             cur.x = 0;
01401             cur.y += cyTallestOnRow;
01402             cyTallestOnRow = 0;
01403             if (pData[i].fsStyle & TBSTYLE_SEP)
01404                 cur.y += m_sizeButton.cy;
01405         }
01406     }
01407     return sizeResult;
01408 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::CheckButton | ( | int | nID,
 |  | BOOL | bCheck
 | ) |

Definition at line 370 of file CJToolBar.h.

References _CJXLIB_INLINE.

00371     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_CHECKBUTTON, nID, MAKELPARAM(bCheck, 0)); }

int CCJToolBar::CommandToIndex ( UINT nIDFind ) const

Definition at line 1293 of file CJToolBar.cpp.

Referenced by AddDropDownButton(), and InsertControl().

01294 {
01295     ASSERT_VALID(this);
01296     ASSERT(::IsWindow(m_hWnd));
01297
01298     CCJToolBar* pBar = (CCJToolBar*)this;
01299     return (int)pBar->DefWindowProc(TB_COMMANDTOINDEX, nIDFind, 0);
01300 }

BOOL CCJToolBar::Create | ( | CWnd * | pParentWnd,
 |  | DWORD | dwStyle = WS_CHILD|WS_VISIBLE|CBRS_TOP,
 |  | UINT | nID = AFX_IDW_TOOLBAR
 | ) | [virtual]

Reimplemented in CCJMenuBar.

Definition at line 361 of file CJToolBar.cpp.

References CreateEx(), and NULL.

Referenced by UToolbar::OnTbInit().

00362 {
00363     return CreateEx(pParentWnd, NULL, dwStyle,
00364         CRect(m_cxLeftBorder, m_cyTopBorder, m_cxRightBorder, m_cyBottomBorder), nID);
00365 }

Here is the call graph for this function:

BOOL CCJToolBar::CreateEx | ( | CWnd * | pParentWnd,
 |  | DWORD | dwCtrlStyle = TBSTYLE_FLAT,
 |  | DWORD | dwStyle = WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP,
 |  | CRect | rcBorders = CRect(0, 0, 0, 0),
 |  | UINT | nID = AFX_IDW_TOOLBAR
 | ) | [virtual]

Reimplemented in CCJMenuBar.

Definition at line 367 of file CJToolBar.cpp.

References _ComCtlVersion, _dropDownWidth, _GetComCtlVersion(), _GetDropDownWidth(), m_sizeButton, m_sizeImage, NULL, CCJToolBarBase::SetBorders(), and SetSizes().

Referenced by Create(), and CCJMenuBar::CreateEx().

00368 {
00369     ASSERT_VALID(pParentWnd);   // must have a parent
00370     ASSERT (!((dwStyle & CBRS_SIZE_FIXED) && (dwStyle & CBRS_SIZE_DYNAMIC)));
00371
00372     // KStowell - bool for drawing office style gripper.
00373     if( dwCtrlStyle != NULL )
00374         m_bExStyle = true;
00375
00376     SetBorders(rcBorders);
00377
00378     // save the style
00379     m_dwStyle = (dwStyle & CBRS_ALL)|( dwStyle & CBRS_GRIPPER );
00380     if (nID == AFX_IDW_TOOLBAR)
00381         m_dwStyle |= CBRS_HIDE_INPLACE;
00382
00383     dwStyle &= ~CBRS_ALL;
00384     dwStyle |= CCS_NOPARENTALIGN|CCS_NOMOVEY|CCS_NODIVIDER|CCS_NORESIZE;
00385     dwStyle |= dwCtrlStyle;
00386
00387     // initialize common controls
00388
00389 #ifdef _VC_VERSION_5
00390
00391     INITCOMMONCONTROLSEX icex;
00392     icex.dwSize = sizeof(icex);
00393     icex.dwICC = ICC_BAR_CLASSES;
00394     VERIFY(InitCommonControlsEx(&icex));
00395
00396 #else
00397
00398     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_BAR_REG));
00399
00400 #endif
00401
00402     _GetComCtlVersion();
00403     ASSERT(_ComCtlVersion != -1);
00404     _GetDropDownWidth();
00405     ASSERT(_dropDownWidth != -1);
00406
00407     // create the HWND
00408     CRect rect; rect.SetRectEmpty();
00409     if (!CWnd::Create(TOOLBARCLASSNAME, NULL, dwStyle, rect, pParentWnd, nID))
00410         return FALSE;
00411
00412     // sync up the sizes
00413     SetSizes(m_sizeButton, m_sizeImage);
00414
00415     // Note: Parent must resize itself for control bar to be resized
00416
00417     return TRUE;
00418 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJToolBar::Customize ( )

Definition at line 415 of file CJToolBar.h.

References _CJXLIB_INLINE.

00416     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_CUSTOMIZE, 0, 0L); }

_CJXLIB_INLINE BOOL CCJToolBar::DeleteButton ( int nIndex )

Definition at line 409 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by CCJMenuBar::LoadMenu().

00410     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_DELETEBUTTON, nIndex); }

_CJXLIB_INLINE BOOL CCJToolBar::EnableButton | ( | int | nID,
 |  | BOOL | bEnable
 | ) |

Definition at line 367 of file CJToolBar.h.

References _CJXLIB_INLINE.

00368     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_ENABLEBUTTON, nID, MAKELPARAM(bEnable, 0)); }

DROPDOWNBUTTON * CCJToolBar::FindDropDownButton ( UINT nID )

Definition at line 610 of file CJToolBar.cpp.

References DROPDOWNBUTTON::idButton, m_pDropButtons, DROPDOWNBUTTON::next, and NULL.

Referenced by AddDropDownButton(), and OnDropDownButton().

00611 {
00612     for (DROPDOWNBUTTON* pb = m_pDropButtons; pb; pb = pb->next) {
00613         if (pb->idButton == nID)
00614             return pb;
00615     }
00616     return NULL;
00617 }

_CJXLIB_INLINE int CCJToolBar::GetBitmap ( UINT nIdButton ) const

Definition at line 461 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00462     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETBITMAP, nIdButton); }

Here is the call graph for this function:

_CJXLIB_INLINE UINT CCJToolBar::GetBitmapFlags ( ) const

Definition at line 448 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00449     { ASSERT(::IsWindow(m_hWnd)); return (UINT) SendMessageC(TB_GETBITMAPFLAGS); }

Here is the call graph for this function:

void CCJToolBar::GetButton | ( | int | nIndex,
 |  | TBBUTTON * | pButton
 | ) | const

Definition at line 1244 of file CJToolBar.cpp.

Referenced by CalcLayout(), GetButtonInfo(), GetButtonStyle(), GetButtonText(), GetItemID(), OnUpdateCmdUI(), SetButtonInfo(), SetButtonStyle(), and SetButtonText().

01245 {
01246     CCJToolBar* pBar = (CCJToolBar*)this;
01247     VERIFY(pBar->DefWindowProc(TB_GETBUTTON, nIndex, (LPARAM)pButton));
01248     // TBSTATE_ENABLED == TBBS_DISABLED so invert it
01249     pButton->fsState ^= TBSTATE_ENABLED;
01250 }

_CJXLIB_INLINE int CCJToolBar::GetButtonCount ( ) const

Definition at line 412 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

Referenced by CCJMenuBar::GetNextOrPrevButton(), CCJMenuBar::IsValidButton(), CCJMenuBar::LoadMenu(), and CCJMenuBar::OnLButtonDown().

00413     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_BUTTONCOUNT); }

Here is the call graph for this function:

void CCJToolBar::GetButtonInfo | ( | int | nIndex,
 |  | UINT & | nID,
 |  | UINT & | nStyle,
 |  | int & | iImage
 | ) | const

Definition at line 1697 of file CJToolBar.cpp.

References GetButton().

01698 {
01699     ASSERT_VALID(this);
01700     ASSERT(::IsWindow(m_hWnd));
01701
01702     TBBUTTON button;
01703     GetButton(nIndex, &button);
01704     nID = button.idCommand;
01705     nStyle = MAKELONG(button.fsStyle, button.fsState);
01706     iImage = button.iBitmap;
01707 }

Here is the call graph for this function:

CSize CCJToolBar::GetButtonSize | ( | TBBUTTON * | pData,
 |  | int | iButton
 | ) | [virtual]

Definition at line 718 of file CJToolBar.cpp.

References _ComCtlVersion, m_bShowDropArrow, VERSION_IE3, and VERSION_IE4.

Referenced by CalcSize(), and WrapToolBar().

00719 {
00720     ASSERT(_ComCtlVersion > 0);
00721
00722     // Get the actual size of the button, not what's in m_sizeButton.
00723     // Make sure to do SendMessage instead of calling MFC's GetItemRect,
00724     // which has all sorts of bad side-effects! (Go ahead, take a look at it.)
00725     //
00726     CRect rc;
00727     SendMessage(TB_GETITEMRECT, iButton, (LPARAM)&rc);
00728     CSize sz = rc.Size();
00729
00731     // Now must do special case for various versions of comctl32.dll,
00732     //
00733     DWORD dwStyle = pData[iButton].fsStyle;
00734     if ((pData[iButton].fsState & TBSTATE_WRAP)) {
00735         if (dwStyle & TBSTYLE_SEP) {
00736             // this is the last separator in the row (eg vertically docked)
00737             // fudge the height, and ignore the width. TB_GETITEMRECT will return
00738             // size = (8 x 22) even for a separator in vertical toolbar
00739             //
00740             if (_ComCtlVersion <= VERSION_IE3)
00741                 sz.cy -= 3;     // empircally good fudge factor
00742             else if (_ComCtlVersion != VERSION_IE4)
00743                 sz.cy = sz.cx;
00744             sz.cx = 0;          // separator takes no width if it's the last one
00745
00746         } else if (dwStyle & TBSTYLE_DROPDOWN && ( m_bShowDropArrow == false )) {
00747             // ignore width of dropdown
00748             sz.cx = 0;
00749         }
00750     }
00751     return sz;
00752 }

UINT CCJToolBar::GetButtonStyle ( int nIndex ) const

Definition at line 1342 of file CJToolBar.cpp.

References GetButton().

Referenced by AddDropDownButton(), CCJToolCmdUI::Enable(), and UToolbar::RebuildBar().

01343 {
01344     ASSERT_VALID(this);
01345     ASSERT(::IsWindow(m_hWnd));
01346
01347     TBBUTTON button;
01348     GetButton(nIndex, &button);
01349     return MAKELONG(button.fsStyle, button.fsState);
01350 }

Here is the call graph for this function:

void CCJToolBar::GetButtonText | ( | int | nIndex,
 |  | CString & | rString
 | ) | const

Definition at line 1811 of file CJToolBar.cpp.

References GetButton(), m_pStringMap, and NULL.

01812 {
01813     if (m_pStringMap != NULL)
01814     {
01815         // get button information (need button.iString)
01816         TBBUTTON button;
01817         GetButton(nIndex, &button);
01818
01819         // look in map for matching iString
01820         POSITION pos = m_pStringMap->GetStartPosition();
01821         CString str; void* p;
01822         while (pos)
01823         {
01824             m_pStringMap->GetNextAssoc(pos, str, p);
01825             if ((int)p == button.iString)
01826             {
01827                 rString = str;
01828                 return;
01829             }
01830         }
01831     }
01832     rString.Empty();
01833 }

Here is the call graph for this function:

CString CCJToolBar::GetButtonText ( int nIndex ) const

Definition at line 1804 of file CJToolBar.cpp.

01805 {
01806     CString strResult;
01807     GetButtonText(nIndex, strResult);
01808     return strResult;
01809 }

_CJXLIB_INLINE int CCJToolBar::GetHotItem ( ) const

Definition at line 479 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

Referenced by CCJMenuBar::TranslateFrameMessage().

00480     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETHOTITEM); }

Here is the call graph for this function:

_CJXLIB_INLINE HIMAGELIST CCJToolBar::GetImageList ( ) const

Definition at line 455 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00456     { ASSERT(::IsWindow(m_hWnd)); return (HIMAGELIST)SendMessageC(TB_GETIMAGELIST); }

Here is the call graph for this function:

UINT CCJToolBar::GetItemID ( int nIndex ) const

Definition at line 1302 of file CJToolBar.cpp.

References GetButton().

Referenced by OnToolHitTest().

01303 {
01304     ASSERT_VALID(this);
01305     ASSERT(::IsWindow(m_hWnd));
01306
01307     TBBUTTON button;
01308     GetButton(nIndex, &button);
01309     return button.idCommand;
01310 }

Here is the call graph for this function:

void CCJToolBar::GetItemRect | ( | int | nIndex,
 |  | LPRECT | lpRect
 | ) | const [virtual]

Definition at line 1312 of file CJToolBar.cpp.

References m_bDelayedButtonLayout, and SetRectEmpty().

Referenced by CalcLayout(), InsertControl(), and UToolbar::RebuildBar().

01313 {
01314     ASSERT_VALID(this);
01315     ASSERT(::IsWindow(m_hWnd));
01316
01317     // handle any delayed layout
01318     if (m_bDelayedButtonLayout)
01319         ((CCJToolBar*)this)->Layout();
01320
01321     // now it is safe to get the item rectangle
01322     CCJToolBar* pBar = (CCJToolBar*)this;
01323     if (!pBar->DefWindowProc(TB_GETITEMRECT, nIndex, (LPARAM)lpRect))
01324         SetRectEmpty(lpRect);
01325 }

Here is the call graph for this function:

_CJXLIB_INLINE CSize CCJToolBar::GetPadding ( ) const

Definition at line 488 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00489     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETPADDING); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::GetRect | ( | UINT | nIdButton,
 |  | RECT & | rc
 | ) | const

Definition at line 467 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

Referenced by OnToolBarBtnDropDown(), and CCJMenuBar::TrackPopup().

00468     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETRECT, nIdButton, (LPARAM)&rc); }

Here is the call graph for this function:

_CJXLIB_INLINE int CCJToolBar::GetRows ( ) const

Definition at line 442 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00443     { ASSERT(::IsWindow(m_hWnd)); return (int) SendMessageC(TB_GETROWS); }

Here is the call graph for this function:

_CJXLIB_INLINE int CCJToolBar::GetState ( int nID ) const

Definition at line 400 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00401     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETSTATE, nID); }

Here is the call graph for this function:

_CJXLIB_INLINE CCJToolBarCtrl & CCJToolBar::GetToolBarCtrl ( ) const

Definition at line 355 of file CJToolBar.h.

Referenced by LoadToolBar(), OnRButtonDown(), RestoreState(), and SaveState().

00356     { ASSERT(::IsWindow(m_hWnd)); return *(CCJToolBarCtrl*)this; }

_CJXLIB_INLINE DWORD CCJToolBar::GetToolbarStyle ( ) const

Definition at line 470 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00471     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETSTYLE); }

Here is the call graph for this function:

_CJXLIB_INLINE CToolTipCtrl * CCJToolBar::GetToolTips ( ) const

Definition at line 433 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00434     { ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)SendMessageC(TB_GETTOOLTIPS)); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::HideButton | ( | int | nID,
 |  | BOOL | bHide
 | ) |

Definition at line 376 of file CJToolBar.h.

References _CJXLIB_INLINE.

00377     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_HIDEBUTTON, nID, MAKELPARAM(bHide, 0)); }

_CJXLIB_INLINE int CCJToolBar::HitTest ( CPoint p ) const

Reimplemented in CCJMenuBar.

Definition at line 476 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

Referenced by CCJMenuBar::HitTest().

00477     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_HITTEST, 0, (LPARAM)&p); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::Indeterminate | ( | int | nID,
 |  | BOOL | bIndeterminate
 | ) |

Definition at line 379 of file CJToolBar.h.

References _CJXLIB_INLINE.

00380     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_INDETERMINATE, nID, MAKELPARAM(bIndeterminate, 0)); }

_CJXLIB_INLINE BOOL CCJToolBar::InsertButton | ( | int | nIndex,
 |  | LPTBBUTTON | lpButton
 | ) |

Definition at line 406 of file CJToolBar.h.

References _CJXLIB_INLINE.

00407     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_INSERTBUTTON, nIndex, (LPARAM)lpButton); }

CWnd * CCJToolBar::InsertControl | ( | CWnd * | pCtrl,
 |  | CRect & | rect,
 |  | UINT | nID
 | ) |

Definition at line 557 of file CJToolBar.cpp.

References CommandToIndex(), GetItemRect(), SetButtonInfo(), and TBBS_SEPARATOR.

00558 {
00559     ASSERT_VALID( pCtrl );
00560
00561     // make sure the id is valid, and set the button
00562     // style for a seperator.
00563     ASSERT( CommandToIndex( nID ) >= 0 );
00564     SetButtonInfo( CommandToIndex( nID ), nID, TBBS_SEPARATOR, rect.Width());
00565
00566     // insert the control into the toolbar.
00567     GetItemRect( CommandToIndex(nID), &rect );
00568     pCtrl->SetWindowPos(0, rect.left, rect.top, 0, 0,
00569         SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOCOPYBITS );
00570     pCtrl->SetFont( GetFont( ));
00571     pCtrl->ShowWindow( SW_SHOW );
00572
00573     return pCtrl;
00574 }

Here is the call graph for this function:

CWnd * CCJToolBar::InsertControl | ( | CRuntimeClass * | pClass,
 |  | LPCTSTR | lpszWindowName,
 |  | CRect & | rect,
 |  | UINT | nID,
 |  | DWORD | dwStyle
 | ) |

Definition at line 433 of file CJToolBar.cpp.

References m_pControls, and NULL.

00434 {
00435     CWnd *pCtrl = NULL;
00436
00437     if( pClass->IsDerivedFrom( RUNTIME_CLASS( CCJComboBoxEx ))) // CCJComboBoxEx control.
00438     {
00439         pCtrl = new CCJComboBoxEx;
00440
00441         ASSERT_VALID( pCtrl );
00442
00443         if(((CCJComboBoxEx*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00444         {
00445             delete pCtrl;
00446             return NULL;
00447         }
00448     }
00449     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CCJFlatComboBox )))  // CCJFlatComboBox control.
00450     {
00451         pCtrl = new CCJFlatComboBox;
00452
00453         ASSERT_VALID( pCtrl );
00454
00455         if(((CCJFlatComboBox*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00456         {
00457             delete pCtrl;
00458             return NULL;
00459         }
00460     }
00461     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CCJFontCombo ))) // CCJFontCombo control.
00462     {
00463         pCtrl = new CCJFontCombo;
00464
00465         ASSERT_VALID( pCtrl );
00466
00467         if(((CCJFontCombo*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00468         {
00469             delete pCtrl;
00470             return NULL;
00471         }
00472     }
00473     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CComboBox )))    // CComboBox control.
00474     {
00475         pCtrl = new CComboBox;
00476
00477         ASSERT_VALID( pCtrl );
00478
00479         if(((CComboBox*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00480         {
00481             delete pCtrl;
00482             return NULL;
00483         }
00484     }
00485     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CEdit )))        // CEdit control.
00486     {
00487         pCtrl = new CEdit;
00488
00489         ASSERT_VALID( pCtrl );
00490
00491         if(((CEdit*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00492         {
00493             delete pCtrl;
00494             return NULL;
00495         }
00496     }
00497     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CButton )))      // CButton control.
00498     {
00499         pCtrl = new CButton;
00500
00501         ASSERT_VALID( pCtrl );
00502
00503         if(((CButton*)pCtrl)->Create( lpszWindowName, WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00504         {
00505             delete pCtrl;
00506             return NULL;
00507         }
00508     }
00509     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CWnd )))         // CWnd object.
00510     {
00511         pCtrl = new CWnd;
00512
00513         ASSERT_VALID( pCtrl );
00514
00515 #ifdef _UNICODE
00516         TCHAR szClassName[ 256 ];
00517
00518         MultiByteToWideChar( CP_ACP,
00519                              MB_PRECOMPOSED,
00520                              pClass->m_lpszClassName,
00521                              -1,
00522                              szClassName,
00523                              255 );
00524
00525         if(((CWnd*)pCtrl)->Create( szClassName, lpszWindowName, WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00526         {
00527             delete pCtrl;
00528             return NULL;
00529         }
00530 #else
00531         if(((CWnd*)pCtrl)->Create( pClass->m_lpszClassName, lpszWindowName, WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00532         {
00533             delete pCtrl;
00534             return NULL;
00535         }
00536 #endif
00537     }
00538     else                                                            // An invalid object was passed in
00539     {
00540         ASSERT( FALSE );
00541         return NULL;
00542     }
00543
00544     // if our object list has not been allocated, do it now...
00545     if( m_pControls == NULL )
00546     {
00547         m_pControls = new CObList();
00548         ASSERT( m_pControls );
00549     }
00550
00551     // we have to remember this control, so we can delete it later
00552     m_pControls->AddTail( pCtrl );
00553
00554     return InsertControl( pCtrl, rect, nID );
00555 }

void CCJToolBar::InvalidateOldPos ( const CRect & rcInvalid ) [virtual]

Definition at line 688 of file CJToolBar.cpp.

Referenced by OnWindowPosChanged().

00689 {
00690     // make parent paint the area beneath rectangle
00691     CWnd* pParent = GetParent();        // parent (dock bar/frame) window
00692     ASSERT_VALID(pParent);              // check
00693     CRect rc( rcInvalid );              // copy rectangle
00694     pParent->ScreenToClient(&rc);       // convert to parent client coords
00695     pParent->InvalidateRect(&rc);       // invalidate
00696
00697     // now do same for each sibling too
00698     for (CWnd* pSib = pParent->GetWindow(GW_CHILD);
00699           pSib;
00700           pSib=pSib->GetNextWindow(GW_HWNDNEXT)) {
00701
00702         CRect rc;                                       // window rect of sibling
00703         pSib->GetWindowRect(&rc);                   // ...
00704         if (rc.IntersectRect(rc, rcInvalid)) {  // if intersects invalid rect
00705             pSib->ScreenToClient(&rc);              // convert to sibling coords
00706             pSib->InvalidateRect(&rc);              // invalidate
00707             pSib->SendMessage(WM_NCPAINT);      // nonclient area too!
00708         }
00709     }
00710 }

_CJXLIB_INLINE BOOL CCJToolBar::IsButtonChecked ( int nID ) const

Definition at line 385 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00386     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONCHECKED, nID); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::IsButtonEnabled ( int nID ) const

Definition at line 382 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00383     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONENABLED, nID); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::IsButtonHidden ( int nID ) const

Definition at line 391 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00392     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONHIDDEN, nID); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::IsButtonIndeterminate ( int nID ) const

Definition at line 394 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00395     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONINDETERMINATE, nID); }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::IsButtonPressed ( int nID ) const

Definition at line 388 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

00389     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONPRESSED, nID); }

Here is the call graph for this function:

void CCJToolBar::Layout ( ) [protected]

Definition at line 1327 of file CJToolBar.cpp.

References m_bDelayedButtonLayout.

Referenced by OnPaint().

01328 {
01329     ASSERT(m_bDelayedButtonLayout);
01330
01331     m_bDelayedButtonLayout = FALSE;
01332
01333     BOOL bHorz = (m_dwStyle & CBRS_ORIENT_HORZ) != 0;
01334     if ((m_dwStyle & CBRS_FLOATING) && (m_dwStyle & CBRS_SIZE_DYNAMIC))
01335         ((CCJToolBar*)this)->CalcDynamicLayout(0, LM_HORZ | LM_MRUWIDTH | LM_COMMIT);
01336     else if (bHorz)
01337         ((CCJToolBar*)this)->CalcDynamicLayout(0, LM_HORZ | LM_HORZDOCK | LM_COMMIT);
01338     else
01339         ((CCJToolBar*)this)->CalcDynamicLayout(0, LM_VERTDOCK | LM_COMMIT);
01340 }

_CJXLIB_INLINE BOOL CCJToolBar::LoadBitmap ( UINT nIDResource )

Definition at line 358 of file CJToolBar.h.

References _CJXLIB_INLINE, and LoadBitmap().

00359     { return LoadBitmap(MAKEINTRESOURCE(nIDResource)); }

Here is the call graph for this function:

BOOL CCJToolBar::LoadBitmap ( LPCTSTR lpszResourceName )

Definition at line 1103 of file CJToolBar.cpp.

References _LoadSysColorBitmap(), AddReplaceBitmap(), m_hInstImageWell, m_hRsrcImageWell, and NULL.

Referenced by LoadBitmap(), and LoadToolBar().

01104 {
01105     ASSERT_VALID(this);
01106     ASSERT(lpszResourceName != NULL);
01107
01108     // determine location of the bitmap in resource fork
01109     HINSTANCE hInstImageWell = AfxFindResourceHandle(lpszResourceName, RT_BITMAP);
01110     HRSRC hRsrcImageWell = ::FindResource(hInstImageWell, lpszResourceName, RT_BITMAP);
01111     if (hRsrcImageWell == NULL)
01112         return FALSE;
01113
01114     // load the bitmap
01115     HBITMAP hbmImageWell;
01116     hbmImageWell = _LoadSysColorBitmap(hInstImageWell, hRsrcImageWell);
01117
01118     // tell common control toolbar about the new bitmap
01119     if (!AddReplaceBitmap(hbmImageWell))
01120         return FALSE;
01121
01122     // remember the resource handles so the bitmap can be recolored if necessary
01123     m_hInstImageWell = hInstImageWell;
01124     m_hRsrcImageWell = hRsrcImageWell;
01125     return TRUE;
01126 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::LoadToolBar | ( | UINT | nIDResource,
 |  | TOOLBARINFO * | pBarInfo = NULL
 | ) |

Definition at line 361 of file CJToolBar.h.

References _CJXLIB_INLINE, and LoadToolBar().

00362     { return LoadToolBar(MAKEINTRESOURCE(nIDResource), pBarInfo); }

Here is the call graph for this function:

BOOL CCJToolBar::LoadToolBar | ( | LPCTSTR | lpszResourceName,
 |  | TOOLBARINFO * | pBarInfo = NULL
 | ) |

Definition at line 1049 of file CJToolBar.cpp.

References GetToolBarCtrl(), CToolBarData::items(), LoadBitmap(), m_nButtons, m_pBarInfo, NULL, RestoreState(), SetButtons(), SetSizes(), CToolBarData::wHeight, CToolBarData::wItemCount, CToolBarData::wVersion, and CToolBarData::wWidth.

Referenced by LoadToolBar().

01050 {
01051     ASSERT_VALID(this);
01052     ASSERT(lpszResourceName != NULL);
01053
01054     // determine location of the bitmap in resource fork
01055     HINSTANCE hInst = AfxFindResourceHandle(lpszResourceName, RT_TOOLBAR);
01056     HRSRC hRsrc = ::FindResource(hInst, lpszResourceName, RT_TOOLBAR);
01057     if (hRsrc == NULL)
01058         return FALSE;
01059
01060     HGLOBAL hGlobal = LoadResource(hInst, hRsrc);
01061     if (hGlobal == NULL)
01062         return FALSE;
01063
01064     CToolBarData* pData = (CToolBarData*)LockResource(hGlobal);
01065     if (pData == NULL)
01066         return FALSE;
01067     ASSERT(pData->wVersion == 1);
01068
01069     UINT* pItems = new UINT[pData->wItemCount];
01070     for (int i = 0; i < pData->wItemCount; i++)
01071         pItems[i] = pData->items()[i];
01072     BOOL bResult = SetButtons(pItems, pData->wItemCount);
01073     delete[] pItems;
01074
01075     if (bResult)
01076     {
01077         // set new sizes of the buttons
01078         CSize sizeImage(pData->wWidth, pData->wHeight);
01079         CSize sizeButton(pData->wWidth + 7, pData->wHeight + 7);
01080         SetSizes(sizeButton, sizeImage);
01081
01082         // load bitmap now that sizes are known by the toolbar control
01083         bResult = LoadBitmap(lpszResourceName);
01084     }
01085
01086     UnlockResource(hGlobal);
01087     FreeResource(hGlobal);
01088
01089     // is the toolbar is customizable?
01090     if(( pBarInfo ) && ( bResult )) {
01091         m_pBarInfo = pBarInfo;
01092         m_nButtons = GetToolBarCtrl().GetButtonCount();
01093
01094         // modify the style to include adjustable
01095         ModifyStyle(0, CCS_ADJUSTABLE);
01096         RestoreState();
01097     }
01098
01099
01100     return bResult;
01101 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::MapAccelerator | ( | TCHAR | ch,
 |  | UINT & | nID
 | ) | const

Definition at line 485 of file CJToolBar.h.

References _CJXLIB_INLINE, and SendMessageC().

Referenced by CCJMenuBar::TranslateFrameMessage().

00486     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_MAPACCELERATOR, (WPARAM)ch, (LPARAM)&nID); }

Here is the call graph for this function:

void CCJToolBar::OnBarStyleChange | ( | DWORD | dwOldStyle,
 |  | DWORD | dwNewStyle
 | ) | [virtual]

Reimplemented in CCJMenuBar.

Definition at line 1911 of file CJToolBar.cpp.

References CalcDynamicLayout(), m_bDelayedButtonLayout, and NULL.

Referenced by CCJMenuBar::OnBarStyleChange().

01912 {
01913     // a dynamically resizeable toolbar can not have the CBRS_FLOAT_MULTI
01914     ASSERT(!((dwNewStyle & CBRS_SIZE_DYNAMIC) &&
01915         (m_dwDockStyle & CBRS_FLOAT_MULTI)));
01916
01917     // a toolbar can not be both dynamic and fixed in size
01918     ASSERT (!((dwNewStyle & CBRS_SIZE_FIXED) &&
01919         (dwNewStyle & CBRS_SIZE_DYNAMIC)));
01920
01921     // CBRS_SIZE_DYNAMIC can not be disabled once it has been enabled
01922     ASSERT (((dwOldStyle & CBRS_SIZE_DYNAMIC) == 0) ||
01923         ((dwNewStyle & CBRS_SIZE_DYNAMIC) != 0));
01924
01925     if (m_hWnd != NULL &&
01926         ((dwOldStyle & CBRS_BORDER_ANY) != (dwNewStyle & CBRS_BORDER_ANY)))
01927     {
01928         // recalc non-client area when border styles change
01929         SetWindowPos(NULL, 0, 0, 0, 0,
01930             SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DRAWFRAME);
01931     }
01932     m_bDelayedButtonLayout = TRUE;
01933
01934     if (dwOldStyle != dwNewStyle) {
01935         DWORD dwMode = 0;
01936         if ((dwNewStyle & CBRS_SIZE_DYNAMIC) && (dwNewStyle & CBRS_FLOATING))
01937             dwMode = LM_HORZ | LM_MRUWIDTH;
01938         else if (dwNewStyle & CBRS_ORIENT_HORZ)
01939             dwMode = LM_HORZ | LM_HORZDOCK;
01940         else
01941             dwMode =  LM_VERTDOCK;
01942
01943         CalcDynamicLayout(-1, dwMode | LM_COMMIT);
01944     }
01945 }

Here is the call graph for this function:

void CCJToolBar::OnDestroy ( ) [protected]

Reimplemented in CDynToolBar.

Definition at line 899 of file CJToolBar.cpp.

References SaveState().

Referenced by CDynToolBar::OnDestroy().

00900 {
00901     // save the current state of the toolbar
00902     SaveState();
00903
00904     CCJToolBarBase::OnDestroy();
00905 }

Here is the call graph for this function:

void CCJToolBar::OnDropDownButton | ( | const NMTOOLBAR & | nmtb,
 |  | UINT | nID,
 |  | CRect | rc
 | ) | [virtual]

Reimplemented in CDynToolBar.

Definition at line 649 of file CJToolBar.cpp.

References FindDropDownButton(), DROPDOWNBUTTON::idMenu, and CCJMenu::LoadMenu().

Referenced by OnToolBarBtnDropDown().

00650 {
00651     UNUSED_ALWAYS( nID );
00652
00653     DROPDOWNBUTTON* pb = FindDropDownButton(nmtb.iItem);
00654     if (pb && pb->idMenu) {
00655
00656         // load and display popup menu
00657         CCJMenu menu;
00658         VERIFY(menu.LoadMenu(pb->idMenu));
00659         CCJMenu* pPopup = (CCJMenu*)menu.GetSubMenu(0);
00660         ASSERT(pPopup);
00661         pPopup->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,
00662             rc.left, rc.bottom, GetParentFrame(), &rc);
00663     }
00664 }

Here is the call graph for this function:

BOOL CCJToolBar::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 1872 of file CJToolBar.cpp.

01873 {
01874     return (BOOL)Default();
01875 }

void CCJToolBar::OnNcCalcSize | ( | BOOL | ,
 |  | NCCALCSIZE_PARAMS * |
 | ) | [protected]

Definition at line 1885 of file CJToolBar.cpp.

References _ComCtlVersion, CCJToolBarBase::CalcInsideRect(), and VERSION_IE4.

01886 {
01887     // calculate border space (will add to top/bottom, subtract from right/bottom)
01888     CRect rect; rect.SetRectEmpty();
01889     BOOL bHorz = (m_dwStyle & CBRS_ORIENT_HORZ) != 0;
01890     CCJToolBarBase::CalcInsideRect(rect, bHorz);
01891     ASSERT(_ComCtlVersion != -1);
01892     ASSERT(_ComCtlVersion >= VERSION_IE4 || rect.top >= 2);
01893
01894     // adjust non-client area for border space
01895     lpncsp->rgrc[0].left += rect.left;
01896     lpncsp->rgrc[0].top += rect.top;
01897     // previous versions of COMCTL32.DLL had a built-in 2 pixel border
01898     if (_ComCtlVersion < VERSION_IE4)
01899         lpncsp->rgrc[0].top -= 2;
01900     lpncsp->rgrc[0].right += rect.right;
01901     lpncsp->rgrc[0].bottom += rect.bottom;
01902 }

Here is the call graph for this function:

BOOL CCJToolBar::OnNcCreate ( LPCREATESTRUCT ) [protected]

Definition at line 942 of file CJToolBar.cpp.

References _countof, NULL, and SetOwner().

00943 {
00944     // If the toolbar is inside a ReBar, we need to make the parent frame
00945     // the owner so it will get notifications.
00946     CWnd* pParent = GetParent();
00947     ASSERT(pParent);
00948     TCHAR classname[64];
00949     GetClassName(pParent->m_hWnd, classname, _countof(classname));
00950     if (_tcscmp(classname, REBARCLASSNAME)==0)
00951     {
00952         CFrameWnd* pFrame = GetParentFrame();
00953         ASSERT_VALID(pFrame);
00954         SetOwner(pFrame);
00955         m_bInReBar = true;
00956         m_bExStyle = false;
00957     }
00958
00959     if (!CCJToolBarBase::OnNcCreate(lpCreateStruct))
00960         return FALSE;
00961
00962     // if the owner was set before the toolbar was created, set it now
00963     if (m_hWndOwner != NULL)
00964         DefWindowProc(TB_SETPARENT, (WPARAM)m_hWndOwner, 0);
00965
00966     DefWindowProc(TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);
00967     return TRUE;
00968 }

Here is the call graph for this function:

UINT CCJToolBar::OnNcHitTest ( CPoint ) [protected]

Definition at line 1877 of file CJToolBar.cpp.

01878 {
01879     return HTCLIENT;
01880 }

void CCJToolBar::OnNcPaint ( ) [protected]

Definition at line 1947 of file CJToolBar.cpp.

References CCJToolBarBase::EraseNonClient().

01948 {
01949     EraseNonClient();
01950 }

Here is the call graph for this function:

void CCJToolBar::OnPaint ( ) [protected]

Reimplemented from CCJToolBarBase.

Definition at line 1961 of file CJToolBar.cpp.

References Layout(), and m_bDelayedButtonLayout.

01962 {
01963     if (m_bDelayedButtonLayout)
01964         Layout();
01965
01966     Default();
01967 }

Here is the call graph for this function:

LRESULT CCJToolBar::OnPreserveZeroBorderHelper | ( | WPARAM | ,
 |  | LPARAM |
 | ) | [protected]

Definition at line 2009 of file CJToolBar.cpp.

References _ComCtlVersion, and VERSION_IE4.

02010 {
02011     UNUSED_ALWAYS( lParam );
02012
02013     BOOL bModify = FALSE;
02014     ASSERT(_ComCtlVersion != -1);
02015     DWORD dwStyle = 0;
02016     if (_ComCtlVersion >= VERSION_IE4)
02017     {
02018         dwStyle = GetStyle();
02019         bModify = ModifyStyle(0, TBSTYLE_TRANSPARENT|TBSTYLE_FLAT);
02020     }
02021
02022     LRESULT lResult = Default();
02023
02024     if (bModify)
02025         SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
02026
02027     return lResult;
02028 }

void CCJToolBar::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 907 of file CJToolBar.cpp.

References GetToolBarCtrl(), IDC_CUSTOMIZE_BAR, and m_pBarInfo.

00908 {
00909     if( m_pBarInfo )
00910     {
00911         CPoint pt( point );
00912         ClientToScreen( &pt );
00913
00914         // load and display popup menu
00915         CCJMenu popupMenu;
00916         VERIFY(popupMenu.CreatePopupMenu( ));
00917         popupMenu.InsertMenu(0, MF_BYPOSITION, IDC_CUSTOMIZE_BAR, _T("&Customize..."));
00918         int nResult = popupMenu.TrackPopupMenu(
00919             TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL|TPM_RETURNCMD,
00920             pt.x, pt.y, this );
00921
00922         if( nResult == IDC_CUSTOMIZE_BAR )
00923         {
00924             // open the customization dialog.
00925             GetToolBarCtrl().Customize();
00926         }
00927     }
00928
00929     else {
00930         CCJToolBarBase::OnRButtonDown(nFlags, point);
00931     }
00932 }

Here is the call graph for this function:

LRESULT CCJToolBar::OnSetBitmapSize | ( | WPARAM | ,
 |  | LPARAM |
 | ) | [protected]

Definition at line 1974 of file CJToolBar.cpp.

References m_sizeImage, and OnSetSizeHelper().

01975 {
01976     return OnSetSizeHelper(m_sizeImage, lParam);
01977 }

Here is the call graph for this function:

LRESULT CCJToolBar::OnSetButtonSize | ( | WPARAM | ,
 |  | LPARAM |
 | ) | [protected]

Definition at line 1969 of file CJToolBar.cpp.

References m_sizeButton, and OnSetSizeHelper().

01970 {
01971     return OnSetSizeHelper(m_sizeButton, lParam);
01972 }

Here is the call graph for this function:

LRESULT CCJToolBar::OnSetSizeHelper | ( | CSize & | size,
 |  | LPARAM | lParam
 | ) | [protected]

Definition at line 1979 of file CJToolBar.cpp.

References _ComCtlVersion, and VERSION_IE4.

Referenced by OnSetBitmapSize(), and OnSetButtonSize().

01980 {
01981     //WINBUG: The IE4 version of COMCTL32.DLL supports a zero border, but
01982     //  only if TBSTYLE_TRANSPARENT is on during the the TB_SETBITMAPSIZE
01983     //  and/or TB_SETBUTTONSIZE messages.  In order to enable this feature
01984     //  all the time (so we get consistent border behavior, dependent only
01985     //  on the version of COMCTL32.DLL) we turn on TBSTYLE_TRANSPARENT
01986     //  whenever these messages go through.  It would be nice that in a
01987     //  future version, the system toolbar would just allow you to set
01988     //  the top and left borders to anything you please.
01989
01990     BOOL bModify = FALSE;
01991     ASSERT(_ComCtlVersion != -1);
01992     DWORD dwStyle = 0;
01993     if (_ComCtlVersion >= VERSION_IE4)
01994     {
01995         dwStyle = GetStyle();
01996         bModify = ModifyStyle(0, TBSTYLE_TRANSPARENT|TBSTYLE_FLAT);
01997     }
01998
01999     LRESULT lResult = Default();
02000     if (lResult)
02001         size = lParam;
02002
02003     if (bModify)
02004         SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
02005
02006     return lResult;
02007 }

void CCJToolBar::OnSysColorChange ( ) [protected]

Definition at line 2030 of file CJToolBar.cpp.

References _LoadSysColorBitmap(), AddReplaceBitmap(), m_hbmImageWell, m_hInstImageWell, m_hRsrcImageWell, and NULL.

02031 {
02032     // re-color bitmap for toolbar
02033     if (m_hInstImageWell != NULL && m_hbmImageWell != NULL)
02034     {
02035         HBITMAP hbmNew;
02036         hbmNew = _LoadSysColorBitmap(m_hInstImageWell, m_hRsrcImageWell);
02037         if (hbmNew != NULL)
02038             AddReplaceBitmap(hbmNew);
02039     }
02040 }

Here is the call graph for this function:

void CCJToolBar::OnToolBarBeginAdjust | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 832 of file CJToolBar.cpp.

00833 {
00834     UNUSED_ALWAYS( pNMHDR );
00835     UNUSED_ALWAYS( pResult );
00836 }

void CCJToolBar::OnToolBarBeginDrag | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 817 of file CJToolBar.cpp.

00818 {
00819     UNUSED_ALWAYS( pNMHDR );
00820     UNUSED_ALWAYS( pResult );
00821 }

void CCJToolBar::OnToolBarBtnDropDown | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 629 of file CJToolBar.cpp.

References GetRect(), and OnDropDownButton().

00630 {
00631     UNUSED_ALWAYS( pRes );
00632
00633     const NMTOOLBAR& nmtb = *(NMTOOLBAR*)pNMHDR;
00634
00635     // get location of button
00636     CRect rc;
00637     GetRect(nmtb.iItem, rc);
00638     ClientToScreen(&rc);
00639
00640     // call virtual function to display dropdown menu
00641     OnDropDownButton(nmtb, nmtb.iItem, rc);
00642 }

Here is the call graph for this function:

void CCJToolBar::OnToolBarChange | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 807 of file CJToolBar.cpp.

00808 {
00809     UNUSED_ALWAYS( pNMHDR );
00810     UNUSED_ALWAYS( pResult );
00811
00812     // force the frame window to recalculate the size
00813     GetParentFrame()->RecalcLayout();
00814 }

void CCJToolBar::OnToolBarCustomHelp | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 840 of file CJToolBar.cpp.

00841 {
00842     UNUSED_ALWAYS( pNMHDR );
00843     UNUSED_ALWAYS( pResult );
00844 }

void CCJToolBar::OnToolBarEndAdjust | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 848 of file CJToolBar.cpp.

References SaveState().

00849 {
00850     UNUSED_ALWAYS( pNMHDR );
00851     UNUSED_ALWAYS( pResult );
00852
00853     // save the state of the toolbar for reinitialization
00854     SaveState();
00855 }

Here is the call graph for this function:

void CCJToolBar::OnToolBarEndDrag | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 824 of file CJToolBar.cpp.

00825 {
00826     UNUSED_ALWAYS( pNMHDR );
00827     UNUSED_ALWAYS( pResult );
00828 }

void CCJToolBar::OnToolBarGetButtonInfo | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 859 of file CJToolBar.cpp.

References TOOLBARINFO::btnText, m_nButtons, m_pBarInfo, and TOOLBARINFO::tbButton.

00860 {
00861     UNUSED_ALWAYS( pResult );
00862
00863     TBNOTIFY* tbStruct;     // data needed by customize dialog box
00864
00865     // init the pointer
00866     tbStruct = (TBNOTIFY *)pNMHDR;
00867
00868     // if the index is valid
00869     if (0 <= tbStruct->iItem && tbStruct->iItem < m_nButtons)
00870     {
00871         // copy the stored button structure
00872         tbStruct->tbButton = m_pBarInfo[tbStruct->iItem].tbButton;
00873
00874         // copy the text for the button label in the dialog
00875         _tcscpy( tbStruct->pszText, m_pBarInfo[tbStruct->iItem].btnText );
00876
00877         // indicate valid data was sent
00878         *pResult = TRUE;
00879     }
00880
00881     // else there is no button for this index
00882     else
00883     {
00884         *pResult = FALSE;
00885     }
00886 }

void CCJToolBar::OnToolBarQueryDelete | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 783 of file CJToolBar.cpp.

00784 {
00785     UNUSED_ALWAYS( pNMHDR );
00786
00787     // if we're not floating - user can delete anything
00788     *pResult = !IsFloating();
00789 }

void CCJToolBar::OnToolBarQueryInsert | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 796 of file CJToolBar.cpp.

00797 {
00798     UNUSED_ALWAYS( pNMHDR );
00799
00800     // if we're not floating - user can insert anywhere
00801     *pResult = !IsFloating();
00802 }

void CCJToolBar::OnToolBarReset | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 890 of file CJToolBar.cpp.

References RestoreState().

00891 {
00892     UNUSED_ALWAYS( pNMHDR );
00893     UNUSED_ALWAYS( pResult );
00894
00895     // restore the toolbar to the way it was before entering customization
00896     RestoreState();
00897 }

Here is the call graph for this function:

int CCJToolBar::OnToolHitTest | ( | CPoint | point,
 |  | TOOLINFO * | pTI
 | ) | const [virtual]

Definition at line 1728 of file CJToolBar.cpp.

References GetItemID(), and NULL.

01729 {
01730     ASSERT_VALID(this);
01731     ASSERT(::IsWindow(m_hWnd));
01732
01733     // check child windows first by calling CCJToolBarBase
01734     int nHit = CCJToolBarBase::OnToolHitTest(point, pTI);
01735     if (nHit != -1)
01736         return nHit;
01737
01738     // now hit test against CCJToolBar buttons
01739     CCJToolBar* pBar = (CCJToolBar*)this;
01740     int nButtons = (int)pBar->DefWindowProc(TB_BUTTONCOUNT, 0, 0);
01741     for (int i = 0; i < nButtons; i++)
01742     {
01743         CRect rect;
01744         TBBUTTON button;
01745         if (pBar->DefWindowProc(TB_GETITEMRECT, i, (LPARAM)&rect))
01746         {
01747             ++rect.bottom;
01748             ++rect.right;
01749             if (rect.PtInRect(point) &&
01750                 pBar->DefWindowProc(TB_GETBUTTON, i, (LPARAM)&button) &&
01751                 !(button.fsStyle & TBSTYLE_SEP))
01752             {
01753                 int nHit = GetItemID(i);
01754                 if (pTI != NULL && pTI->cbSize >= sizeof(AFX_OLDTOOLINFO))
01755                 {
01756                     pTI->hwnd = m_hWnd;
01757                     pTI->rect = rect;
01758                     pTI->uId = nHit;
01759                     pTI->lpszText = LPSTR_TEXTCALLBACK;
01760                 }
01761                 // found matching rect, return the ID of the button
01762                 return nHit != 0 ? nHit : -1;
01763             }
01764         }
01765     }
01766     return -1;
01767 }

Here is the call graph for this function:

void CCJToolBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget,
 |  | BOOL | bDisableIfNoHndler
 | ) | [virtual]

Definition at line 2098 of file CJToolBar.cpp.

References GetButton(), and NULL.

02099 {
02100     CCJToolCmdUI state;
02101     state.m_pOther = this;
02102
02103     state.m_nIndexMax = (UINT)DefWindowProc(TB_BUTTONCOUNT, 0, 0);
02104     for (state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax; state.m_nIndex++)
02105     {
02106         // get buttons state
02107         TBBUTTON button;
02108         GetButton(state.m_nIndex, &button);
02109         state.m_nID = button.idCommand;
02110
02111         // ignore separators
02112         if (!(button.fsStyle & TBSTYLE_SEP))
02113         {
02114             // allow reflections
02115             if (CWnd::OnCmdMsg(0,
02116                 MAKELONG((int)CN_UPDATE_COMMAND_UI, WM_COMMAND+WM_REFLECT_BASE),
02117                 &state, NULL))
02118                 continue;
02119
02120             // allow the toolbar itself to have update handlers
02121             if (CWnd::OnCmdMsg(state.m_nID, CN_UPDATE_COMMAND_UI, &state, NULL))
02122                 continue;
02123
02124             // allow the owner to process the update
02125             state.DoUpdate(pTarget, bDisableIfNoHndler);
02126         }
02127     }
02128
02129     // update the dialog controls added to the toolbar
02130     UpdateDialogControls(pTarget, bDisableIfNoHndler);
02131 }

Here is the call graph for this function:

void CCJToolBar::OnWindowPosChanged ( WINDOWPOS * lpwndpos ) [protected]

Definition at line 670 of file CJToolBar.cpp.

References InvalidateOldPos(), and m_rcOldPos.

00671 {
00672     CCJToolBarBase::OnWindowPosChanged(lpwndpos);
00673     if (!(lpwndpos->flags & SWP_NOMOVE)) {   // if moved:
00674         InvalidateOldPos(m_rcOldPos);        // invalidate area of old position
00675
00676         // Now paint my non-client area at the new location.
00677         // Without this, you will still have a partial display bug (try it!)
00678         SendMessage(WM_NCPAINT);
00679     }
00680 }

Here is the call graph for this function:

void CCJToolBar::OnWindowPosChanging ( LPWINDOWPOS ) [protected]

Reimplemented from CCJToolBarBase.

Definition at line 1952 of file CJToolBar.cpp.

References CCJToolBarBase::OnWindowPosChanging().

01953 {
01954     // not necessary to invalidate the borders
01955     DWORD dwStyle = m_dwStyle;
01956     m_dwStyle &= ~(CBRS_BORDER_ANY);
01957     CCJToolBarBase::OnWindowPosChanging(lpwndpos);
01958     m_dwStyle = dwStyle;
01959 }

Here is the call graph for this function:

BOOL CCJToolBar::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

Definition at line 420 of file CJToolBar.cpp.

00421 {
00422     if( !CCJToolBarBase::PreCreateWindow(cs))
00423         return FALSE;
00424
00425     cs.style |= TBSTYLE_TRANSPARENT|TBSTYLE_FLAT;
00426
00427     return TRUE;
00428 }

_CJXLIB_INLINE BOOL CCJToolBar::PressButton | ( | int | nID,
 |  | BOOL | bPress
 | ) |

Definition at line 373 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by CCJMenuBar::TrackPopup().

00374     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_PRESSBUTTON, nID, MAKELPARAM(bPress, 0)); }

void CCJToolBar::RestoreState ( )

Definition at line 768 of file CJToolBar.cpp.

References GetToolBarCtrl(), m_hKeyRoot, m_strSubKey, and m_strValueName.

Referenced by LoadToolBar(), and OnToolBarReset().

00769 {
00770     // if there is an associated registry subkey
00771     if (m_strSubKey.GetLength())
00772     {
00773         // restore the toolbar state from the registry
00774         GetToolBarCtrl().RestoreState( m_hKeyRoot, m_strSubKey, m_strValueName );
00775     }
00776 }

Here is the call graph for this function:

void CCJToolBar::SaveState ( )

Definition at line 756 of file CJToolBar.cpp.

References GetToolBarCtrl(), m_hKeyRoot, m_strSubKey, and m_strValueName.

Referenced by OnDestroy(), and OnToolBarEndAdjust().

00757 {
00758     // if there is an associated registry subkey
00759     if (m_strSubKey.GetLength())
00760     {
00761         // save the toolbar state to the registry
00762         GetToolBarCtrl().SaveState( m_hKeyRoot, m_strSubKey, m_strValueName );
00763     }
00764 }

Here is the call graph for this function:

_CJXLIB_INLINE LRESULT CCJToolBar::SendMessageC | ( | UINT | m,
 |  | WPARAM | wp = 0,
 |  | LPARAM | lp = 0
 | ) | const

Definition at line 364 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by GetBitmap(), GetBitmapFlags(), GetButtonCount(), GetHotItem(), GetImageList(), GetPadding(), GetRect(), GetRows(), GetState(), GetToolbarStyle(), GetToolTips(), HitTest(), IsButtonChecked(), IsButtonEnabled(), IsButtonHidden(), IsButtonIndeterminate(), IsButtonPressed(), and MapAccelerator().

00365     { ASSERT(::IsWindow(m_hWnd)); return ((CCJToolBar*)this)->SendMessage(m, wp, lp); }

BOOL CCJToolBar::SetBitmap ( HBITMAP hbmImageWell )

Definition at line 1128 of file CJToolBar.cpp.

References AddReplaceBitmap(), m_hInstImageWell, m_hRsrcImageWell, and NULL.

Referenced by UToolbar::RebuildBar().

01129 {
01130     ASSERT_VALID(this);
01131     ASSERT(hbmImageWell != NULL);
01132
01133     // the caller must manage changing system colors
01134     m_hInstImageWell = NULL;
01135     m_hRsrcImageWell = NULL;
01136
01137     // tell common control toolbar about the new bitmap
01138     return AddReplaceBitmap(hbmImageWell);
01139 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::SetBitmapSize ( CSize sz )

Definition at line 427 of file CJToolBar.h.

References _CJXLIB_INLINE.

00428     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETBITMAPSIZE, 0, MAKELPARAM(sz.cx, sz.cy)); }

void CCJToolBar::SetButton | ( | int | nIndex,
 |  | TBBUTTON * | pButton
 | ) |

Definition at line 1252 of file CJToolBar.cpp.

Referenced by CalcLayout(), SetButtonInfo(), SetButtonStyle(), and SetButtonText().

01253 {
01254     // get original button state
01255     TBBUTTON button;
01256     VERIFY(DefWindowProc(TB_GETBUTTON, nIndex, (LPARAM)&button));
01257
01258     // prepare for old/new button comparsion
01259     button.bReserved[0] = 0;
01260     button.bReserved[1] = 0;
01261     // TBSTATE_ENABLED == TBBS_DISABLED so invert it
01262     pButton->fsState ^= TBSTATE_ENABLED;
01263     pButton->bReserved[0] = 0;
01264     pButton->bReserved[1] = 0;
01265
01266     // nothing to do if they are the same
01267     if (memcmp(pButton, &button, sizeof(TBBUTTON)) != 0)
01268     {
01269         // don't redraw everything while setting the button
01270         DWORD dwStyle = GetStyle();
01271         ModifyStyle(WS_VISIBLE, 0);
01272         VERIFY(DefWindowProc(TB_DELETEBUTTON, nIndex, 0));
01273         VERIFY(DefWindowProc(TB_INSERTBUTTON, nIndex, (LPARAM)pButton));
01274         ModifyStyle(0, dwStyle & WS_VISIBLE);
01275
01276         // invalidate appropriate parts
01277         if (((pButton->fsStyle ^ button.fsStyle) & TBSTYLE_SEP) ||
01278             ((pButton->fsStyle & TBSTYLE_SEP) && pButton->iBitmap != button.iBitmap))
01279         {
01280             // changing a separator
01281             Invalidate();
01282         }
01283         else
01284         {
01285             // invalidate just the button
01286             CRect rect;
01287             if (DefWindowProc(TB_GETITEMRECT, nIndex, (LPARAM)&rect))
01288                 InvalidateRect(rect);
01289         }
01290     }
01291 }

void CCJToolBar::SetButtonInfo | ( | int | nIndex,
 |  | UINT | nID,
 |  | UINT | nStyle,
 |  | int | iImage
 | ) |

Definition at line 1709 of file CJToolBar.cpp.

References GetButton(), m_bDelayedButtonLayout, and SetButton().

Referenced by InsertControl(), and UToolbar::RebuildBar().

01710 {
01711     ASSERT_VALID(this);
01712
01713     TBBUTTON button;
01714     GetButton(nIndex, &button);
01715     TBBUTTON save;
01716     memcpy(&save, &button, sizeof(save));
01717     button.idCommand = nID;
01718     button.iBitmap = iImage;
01719     button.fsStyle = (BYTE)LOWORD(nStyle);
01720     button.fsState = (BYTE)HIWORD(nStyle);
01721     if (memcmp(&save, &button, sizeof(save)) != 0)
01722     {
01723         SetButton(nIndex, &button);
01724         m_bDelayedButtonLayout = TRUE;
01725     }
01726 }

Here is the call graph for this function:

BOOL CCJToolBar::SetButtons | ( | const UINT * | lpIDArray,
 |  | int | nIDCount
 | ) |

Definition at line 1178 of file CJToolBar.cpp.

References _ComCtlVersion, m_bDelayedButtonLayout, NULL, and VERSION_IE4.

Referenced by LoadToolBar(), and UToolbar::RebuildBar().

01179 {
01180     ASSERT_VALID(this);
01181     ASSERT(nIDCount >= 1);  // must be at least one of them
01182     ASSERT(lpIDArray == NULL ||
01183         AfxIsValidAddress(lpIDArray, sizeof(UINT) * nIDCount, FALSE));
01184
01185     // delete all existing buttons
01186     int nCount = (int)DefWindowProc(TB_BUTTONCOUNT, 0, 0);
01187     while (nCount--)
01188         VERIFY(DefWindowProc(TB_DELETEBUTTON, 0, 0));
01189
01190     TBBUTTON button; memset(&button, 0, sizeof(TBBUTTON));
01191     button.iString = -1;
01192     if (lpIDArray != NULL)
01193     {
01194         // add new buttons to the common control
01195         int iImage = 0;
01196         for (int i = 0; i < nIDCount; i++)
01197         {
01198             button.fsState = TBSTATE_ENABLED;
01199             if ((button.idCommand = *lpIDArray++) == 0)
01200             {
01201                 // separator
01202                 button.fsStyle = TBSTYLE_SEP;
01203                 // width of separator includes 8 pixel overlap
01204                 ASSERT(_ComCtlVersion != -1);
01205                 if ((GetStyle() & TBSTYLE_FLAT) || _ComCtlVersion == VERSION_IE4)
01206                     button.iBitmap = 6;
01207                 else
01208                     button.iBitmap = 8;
01209             }
01210             else
01211             {
01212                 // a command button with image
01213                 button.fsStyle = TBSTYLE_BUTTON;
01214                 button.iBitmap = iImage++;
01215             }
01216             if (!DefWindowProc(TB_ADDBUTTONS, 1, (LPARAM)&button))
01217                 return FALSE;
01218         }
01219     }
01220     else
01221     {
01222         // add 'blank' buttons
01223         button.fsState = TBSTATE_ENABLED;
01224         for (int i = 0; i < nIDCount; i++)
01225         {
01226             ASSERT(button.fsStyle == TBSTYLE_BUTTON);
01227             if (!DefWindowProc(TB_ADDBUTTONS, 1, (LPARAM)&button))
01228                 return FALSE;
01229         }
01230     }
01231     m_nCount = (int)DefWindowProc(TB_BUTTONCOUNT, 0, 0);
01232     m_bDelayedButtonLayout = TRUE;
01233
01234     return TRUE;
01235 }

_CJXLIB_INLINE BOOL CCJToolBar::SetButtonSize ( CSize sz )

Definition at line 424 of file CJToolBar.h.

References _CJXLIB_INLINE.

00425     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETBUTTONSIZE, 0, MAKELPARAM(sz.cx, sz.cy)); }

_CJXLIB_INLINE void CCJToolBar::SetButtonStructSize ( int nSize )

Definition at line 421 of file CJToolBar.h.

References _CJXLIB_INLINE.

00422     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_BUTTONSTRUCTSIZE, nSize); }

void CCJToolBar::SetButtonStyle | ( | int | nIndex,
 |  | UINT | nStyle
 | ) |

Definition at line 1352 of file CJToolBar.cpp.

References GetButton(), m_bDelayedButtonLayout, and SetButton().

Referenced by AddDropDownButton(), and CCJToolCmdUI::Enable().

01353 {
01354     ASSERT_VALID(this);
01355     ASSERT(::IsWindow(m_hWnd));
01356
01357     TBBUTTON button;
01358     GetButton(nIndex, &button);
01359     if (button.fsStyle != (BYTE)LOWORD(nStyle) || button.fsState != (BYTE)HIWORD(nStyle))
01360     {
01361         button.fsStyle = (BYTE)LOWORD(nStyle);
01362         button.fsState = (BYTE)HIWORD(nStyle);
01363         SetButton(nIndex, &button);
01364         m_bDelayedButtonLayout = TRUE;
01365     }
01366 }

Here is the call graph for this function:

BOOL CCJToolBar::SetButtonText | ( | int | nIndex,
 |  | LPCTSTR | lpszText
 | ) |

Definition at line 1769 of file CJToolBar.cpp.

References GetButton(), m_pStringMap, NULL, and SetButton().

01770 {
01771     // attempt to lookup string index in map
01772     int nString = -1;
01773     void* p;
01774     if (m_pStringMap != NULL && m_pStringMap->Lookup(lpszText, p))
01775         nString = (int)p;
01776
01777     // add new string if not already in map
01778     if (nString == -1)
01779     {
01780         // initialize map if necessary
01781         if (m_pStringMap == NULL)
01782             m_pStringMap = new CMapStringToPtr;
01783
01784         // add new string to toolbar list
01785         CString strTemp(lpszText, lstrlen(lpszText)+1);
01786         nString = (int)DefWindowProc(TB_ADDSTRING, 0, (LPARAM)(LPCTSTR)strTemp);
01787         if (nString == -1)
01788             return FALSE;
01789
01790         // cache string away in string map
01791         m_pStringMap->SetAt(lpszText, (void*)nString);
01792         ASSERT(m_pStringMap->Lookup(lpszText, p));
01793     }
01794
01795     // change the toolbar button description
01796     TBBUTTON button;
01797     GetButton(nIndex, &button);
01798     button.iString = nString;
01799     SetButton(nIndex, &button);
01800
01801     return TRUE;
01802 }

Here is the call graph for this function:

_CJXLIB_INLINE BOOL CCJToolBar::SetCmdID | ( | int | nIndex,
 |  | UINT | nID
 | ) |

Definition at line 445 of file CJToolBar.h.

References _CJXLIB_INLINE.

00446     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETCMDID, nIndex, nID); }

_CJXLIB_INLINE DWORD CCJToolBar::SetExtendedStyle ( DWORD dwStyle )

Definition at line 464 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by AddDropDownButton().

00465     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETEXTENDEDSTYLE, 0, dwStyle); }

void CCJToolBar::SetHeight ( int cyHeight )

Definition at line 1011 of file CJToolBar.cpp.

References m_sizeButton, and NULL.

01012 {
01013     ASSERT_VALID(this);
01014
01015     int nHeight = cyHeight;
01016     if (m_dwStyle & CBRS_BORDER_TOP)
01017         cyHeight -= afxData.cyBorder2;
01018     if (m_dwStyle & CBRS_BORDER_BOTTOM)
01019         cyHeight -= afxData.cyBorder2;
01020     m_cyBottomBorder = (cyHeight - m_sizeButton.cy) / 2;
01021     // if there is an extra pixel, m_cyTopBorder will get it
01022     m_cyTopBorder = cyHeight - m_sizeButton.cy - m_cyBottomBorder;
01023     if (m_cyTopBorder < 0)
01024     {
01025         TRACE1("Warning: CCJToolBar::SetHeight(%d) is smaller than button.\n",
01026             nHeight);
01027         m_cyBottomBorder += m_cyTopBorder;
01028         m_cyTopBorder = 0;  // will clip at bottom
01029     }
01030
01031     // recalculate the non-client region
01032     SetWindowPos(NULL, 0, 0, 0, 0,
01033         SWP_DRAWFRAME|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER);
01034     Invalidate();   // just to be nice if called when toolbar is visible
01035 }

_CJXLIB_INLINE void CCJToolBar::SetHotItem ( int iHot )

Definition at line 482 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by CCJMenuBar::OnMouseMove(), CCJMenuBar::SetTrackingState(), and CCJMenuBar::TranslateFrameMessage().

00483     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_SETHOTITEM, iHot); }

_CJXLIB_INLINE HIMAGELIST CCJToolBar::SetImageList ( HIMAGELIST hImgList )

Definition at line 458 of file CJToolBar.h.

References _CJXLIB_INLINE.

Referenced by CCJMenuBar::LoadMenu().

00459     { ASSERT(::IsWindow(m_hWnd)); return (HIMAGELIST)SendMessage(TB_SETIMAGELIST, 0, (LPARAM)hImgList); }

_CJXLIB_INLINE BOOL CCJToolBar::SetIndent ( int indent )

Definition at line 452 of file CJToolBar.h.

References _CJXLIB_INLINE.

00453     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETINDENT, indent); }

void CCJToolBar::SetOwner ( CWnd * pOwnerWnd )

Definition at line 970 of file CJToolBar.cpp.

References NULL.

Referenced by OnNcCreate().

00971 {
00972     ASSERT_VALID(this);
00973     if (m_hWnd != NULL)
00974     {
00975         ASSERT(::IsWindow(m_hWnd));
00976         DefWindowProc(TB_SETPARENT, (WPARAM)pOwnerWnd->GetSafeHwnd(), 0);
00977     }
00978     CCJToolBarBase::SetOwner(pOwnerWnd);
00979 }

_CJXLIB_INLINE CSize CCJToolBar::SetPadding ( CSize sz )

Definition at line 491 of file CJToolBar.h.

References _CJXLIB_INLINE.

00492     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETPADDING, 0, MAKELPARAM(sz.cx,sz.cy)); }

_CJXLIB_INLINE void CCJToolBar::SetRows | ( | int | nRows,
 |  | BOOL | bLarger,
 |  | LPRECT | lpRect
 | ) |

Definition at line 439 of file CJToolBar.h.

References _CJXLIB_INLINE.

00440     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_SETROWS, MAKELPARAM(nRows, bLarger), (LPARAM)lpRect); }

void CCJToolBar::SetSizes | ( | SIZE | sizeButton,
 |  | SIZE | sizeImage
 | ) |

Definition at line 981 of file CJToolBar.cpp.

References m_sizeButton, and m_sizeImage.

Referenced by CreateEx(), LoadToolBar(), and UToolbar::OnTbInit().

00982 {
00983     ASSERT_VALID(this);
00984
00985     // sizes must be non-zero and positive
00986     ASSERT(sizeButton.cx > 0 && sizeButton.cy > 0);
00987     ASSERT(sizeImage.cx > 0 && sizeImage.cy > 0);
00988
00989     // button must be big enough to hold image
00990     //   + 7 pixels on x
00991     //   + 6 pixels on y
00992     ASSERT(sizeButton.cx >= sizeImage.cx + 7);
00993     ASSERT(sizeButton.cy >= sizeImage.cy + 6);
00994
00995     if (::IsWindow(m_hWnd))
00996     {
00997         // set the sizes via TB_SETBITMAPSIZE and TB_SETBUTTONSIZE
00998         VERIFY(SendMessage(TB_SETBITMAPSIZE, 0, MAKELONG(sizeImage.cx, sizeImage.cy)));
00999         VERIFY(SendMessage(TB_SETBUTTONSIZE, 0, MAKELONG(sizeButton.cx, sizeButton.cy)));
01000
01001         Invalidate();   // just to be nice if called when toolbar is visible
01002     }
01003     else
01004     {
01005         // just set our internal values for later
01006         m_sizeButton = sizeButton;
01007         m_sizeImage = sizeImage;
01008     }
01009 }

_CJXLIB_INLINE BOOL CCJToolBar::SetState | ( | int | nID,
 |  | UINT | nState
 | ) |

Definition at line 397 of file CJToolBar.h.

References _CJXLIB_INLINE.

00398     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETSTATE, nID, MAKELPARAM(nState, 0)); }

_CJXLIB_INLINE void CCJToolBar::SetToolbarStyle ( DWORD dwStyle )

Definition at line 473 of file CJToolBar.h.

References _CJXLIB_INLINE.

00474     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_SETSTYLE, 0, dwStyle); }

_CJXLIB_INLINE void CCJToolBar::SetToolTips ( CToolTipCtrl * pTip )

Definition at line 436 of file CJToolBar.h.

References _CJXLIB_INLINE.

00437     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_SETTOOLTIPS, (WPARAM)pTip->m_hWnd); }

void CCJToolBar::SizeToolBar | ( | TBBUTTON * | pData,
 |  | int | nCount,
 |  | int | nLength,
 |  | BOOL | bVert = FALSE
 | ) | [protected]

Definition at line 1479 of file CJToolBar.cpp.

References CalcSize(), NULL, and WrapToolBar().

Referenced by CalcLayout().

01480 {
01481     ASSERT(pData != NULL && nCount > 0);
01482
01483     if (!bVert)
01484     {
01485         int nMin, nMax, nTarget, nCurrent, nMid;
01486
01487         // Wrap ToolBar as specified
01488         nMax = nLength;
01489         nTarget = WrapToolBar(pData, nCount, nMax);
01490
01491         // Wrap ToolBar vertically
01492         nMin = 0;
01493         nCurrent = WrapToolBar(pData, nCount, nMin);
01494
01495         if (nCurrent != nTarget)
01496         {
01497             while (nMin < nMax)
01498             {
01499                 nMid = (nMin + nMax) / 2;
01500                 nCurrent = WrapToolBar(pData, nCount, nMid);
01501
01502                 if (nCurrent == nTarget)
01503                     nMax = nMid;
01504                 else
01505                 {
01506                     if (nMin == nMid)
01507                     {
01508                         WrapToolBar(pData, nCount, nMax);
01509                         break;
01510                     }
01511                     nMin = nMid;
01512                 }
01513             }
01514         }
01515         CSize size = CalcSize(pData, nCount);
01516         WrapToolBar(pData, nCount, size.cx);
01517     }
01518     else
01519     {
01520         CSize sizeMax, sizeMin, sizeMid;
01521
01522         // Wrap ToolBar vertically
01523         WrapToolBar(pData, nCount, 0);
01524         sizeMin = CalcSize(pData, nCount);
01525
01526         // Wrap ToolBar horizontally
01527         WrapToolBar(pData, nCount, 32767);
01528         sizeMax = CalcSize(pData, nCount);
01529
01530         while (sizeMin.cx < sizeMax.cx)
01531         {
01532             sizeMid.cx = (sizeMin.cx + sizeMax.cx) / 2;
01533             WrapToolBar(pData, nCount, sizeMid.cx);
01534             sizeMid = CalcSize(pData, nCount);
01535
01536             if (nLength < sizeMid.cy)
01537             {
01538                 if (sizeMin == sizeMid)
01539                 {
01540                     WrapToolBar(pData, nCount, sizeMax.cx);
01541                     return;
01542                 }
01543                 sizeMin = sizeMid;
01544             }
01545             else if (nLength > sizeMid.cy)
01546                 sizeMax = sizeMid;
01547             else
01548                 return;
01549         }
01550     }
01551 }

Here is the call graph for this function:

int CCJToolBar::WrapToolBar | ( | TBBUTTON * | pData,
 |  | int | nCount,
 |  | int | nWidth
 | ) | [protected]

Definition at line 1410 of file CJToolBar.cpp.

References CX_OVERLAP, GetButtonSize(), m_sizeButton, and NULL.

Referenced by SizeToolBar().

01411 {
01412     ASSERT(pData != NULL && nCount > 0);
01413
01414     int nResult = 0;
01415     int x = 0;
01416     for (int i = 0; i < nCount; i++)
01417     {
01418         pData[i].fsState &= ~TBSTATE_WRAP;
01419
01420         if (pData[i].fsState & TBSTATE_HIDDEN)
01421             continue;
01422
01423         int dx, dxNext;
01424
01425         // **PD**
01426         // Load actual size of button into a local variable
01427         // called m_sizeButton. C++ will use this instead of
01428         // CToolBar::m_sizeButton.
01429         //
01430         CSize m_sizeButton = GetButtonSize(pData, i);
01431
01432         dx = m_sizeButton.cx;
01433         dxNext = dx - CX_OVERLAP;
01434
01435         if (x + dx > nWidth)
01436         {
01437             BOOL bFound = FALSE;
01438             for (int j = i; j >= 0  &&  !(pData[j].fsState & TBSTATE_WRAP); j--)
01439             {
01440                 // Find last separator that isn't hidden
01441                 // a separator that has a command ID is not
01442                 // a separator, but a custom control.
01443                 if ((pData[j].fsStyle & TBSTYLE_SEP) &&
01444                     (pData[j].idCommand == 0) &&
01445                     !(pData[j].fsState & TBSTATE_HIDDEN))
01446                 {
01447                     bFound = TRUE; i = j; x = 0;
01448                     pData[j].fsState |= TBSTATE_WRAP;
01449                     nResult++;
01450                     break;
01451                 }
01452             }
01453             if (!bFound)
01454             {
01455                 for (int j = i - 1; j >= 0 && !(pData[j].fsState & TBSTATE_WRAP); j--)
01456                 {
01457                     // Never wrap anything that is hidden,
01458                     // or any custom controls
01459                     if ((pData[j].fsState & TBSTATE_HIDDEN) ||
01460                         ((pData[j].fsStyle & TBSTYLE_SEP) &&
01461                         (pData[j].idCommand != 0)))
01462                         continue;
01463
01464                     bFound = TRUE; i = j; x = 0;
01465                     pData[j].fsState |= TBSTATE_WRAP;
01466                     nResult++;
01467                     break;
01468                 }
01469                 if (!bFound)
01470                     x += dxNext;
01471             }
01472         }
01473         else
01474             x += dxNext;
01475     }
01476     return nResult + 1;
01477 }

Here is the call graph for this function:

Member Data Documentation

BOOL CCJToolBar::m_bDelayedButtonLayout [protected]

Definition at line 125 of file CJToolBar.h.

Referenced by CalcLayout(), CCJToolBar(), GetItemRect(), Layout(), OnBarStyleChange(), OnPaint(), SetButtonInfo(), SetButtons(), and SetButtonStyle().

bool CCJToolBar::m_bShowDropArrow [protected]

Definition at line 121 of file CJToolBar.h.

Referenced by CCJToolBar(), and GetButtonSize().

HBITMAP CCJToolBar::m_hbmImageWell [protected]

Definition at line 124 of file CJToolBar.h.

Referenced by AddReplaceBitmap(), CCJToolBar(), OnSysColorChange(), and ~CCJToolBar().

HINSTANCE CCJToolBar::m_hInstImageWell [protected]

Definition at line 123 of file CJToolBar.h.

Referenced by CCJToolBar(), LoadBitmap(), OnSysColorChange(), and SetBitmap().

HKEY CCJToolBar::m_hKeyRoot [protected]

Definition at line 128 of file CJToolBar.h.

Referenced by CCJToolBar(), RestoreState(), and SaveState().

HRSRC CCJToolBar::m_hRsrcImageWell [protected]

Definition at line 122 of file CJToolBar.h.

Referenced by CCJToolBar(), LoadBitmap(), OnSysColorChange(), and SetBitmap().

int CCJToolBar::m_nBarNumber = 0 [static, protected]

Definition at line 298 of file CJToolBar.cpp.

Referenced by CCJToolBar().

int CCJToolBar::m_nButtons [protected]

Definition at line 127 of file CJToolBar.h.

Referenced by CCJToolBar(), LoadToolBar(), and OnToolBarGetButtonInfo().

TOOLBARINFO* CCJToolBar::m_pBarInfo [protected]

Definition at line 119 of file CJToolBar.h.

Referenced by CCJToolBar(), LoadToolBar(), OnRButtonDown(), and OnToolBarGetButtonInfo().

CObList* CCJToolBar::m_pControls [protected]

Definition at line 120 of file CJToolBar.h.

Referenced by CCJToolBar(), InsertControl(), and ~CCJToolBar().

DROPDOWNBUTTON* CCJToolBar::m_pDropButtons [protected]

Definition at line 134 of file CJToolBar.h.

Referenced by AddDropDownButton(), CCJToolBar(), FindDropDownButton(), and ~CCJToolBar().

CMapStringToPtr* CCJToolBar::m_pStringMap [protected]

Definition at line 135 of file CJToolBar.h.

Referenced by CCJToolBar(), GetButtonText(), SetButtonText(), and ~CCJToolBar().

CRect CCJToolBar::m_rcOldPos [protected]

Definition at line 126 of file CJToolBar.h.

Referenced by OnWindowPosChanged().

CSize CCJToolBar::m_sizeButton [protected]

Definition at line 133 of file CJToolBar.h.

Referenced by CalcSize(), CCJToolBar(), CreateEx(), OnSetButtonSize(), SetHeight(), SetSizes(), and WrapToolBar().

CSize CCJToolBar::m_sizeImage [protected]

Definition at line 132 of file CJToolBar.h.

Referenced by AddReplaceBitmap(), CCJToolBar(), CreateEx(), OnSetBitmapSize(), and SetSizes().

CString CCJToolBar::m_strSubKey [protected]

Definition at line 129 of file CJToolBar.h.

Referenced by CCJToolBar(), RestoreState(), and SaveState().

CString CCJToolBar::m_strValueName [protected]

Definition at line 130 of file CJToolBar.h.

Referenced by CCJToolBar(), RestoreState(), and SaveState().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJToolBar.h
  • WinCvs/CJLib/CJLibrary/CJToolBar.cpp
Generated on Sat Aug 7 22:50:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJToolBarBase Class Reference

CCJToolBarBase Class Reference

#include <CJToolBarBase.h>

Inheritance diagram for CCJToolBarBase:

[legend]
Collaboration diagram for CCJToolBarBase:

[legend]
List of all members.

Public Member Functions

virtual | ~CCJToolBarBase ()
virtual void | DoPaint (CDC *pDC)
void | DrawGripper (CDC *pDC, const CRect &rect)
virtual LRESULT | WindowProc (UINT nMsg, WPARAM wParam, LPARAM lParam)
void | CalcInsideRect (CRect &rect, BOOL bHorz) const
void | EraseNonClient ()
void | DrawBorders (CDC *pDC, CRect &rect)
afx_msg void | OnPaint ()
afx_msg void | OnWindowPosChanging (LPWINDOWPOS lpWndPos)

Public Attributes

bool m_bInReBar
bool m_bExStyle

Protected Member Functions

CCJToolBarBase ()
void | SetBorders (LPCRECT lpRect)
void | SetBorders (int cxLeft=0, int cyTop=0, int cxRight=0, int cyBottom=0)
CRect | GetBorders () const

Constructor & Destructor Documentation

CCJToolBarBase::CCJToolBarBase ( ) [protected]

Definition at line 56 of file CJToolBarBase.cpp.

References m_bExStyle, and m_bInReBar.

00057 {
00058     m_bInReBar = false;
00059     m_bExStyle = false;
00060 }

CCJToolBarBase::~CCJToolBarBase ( ) [virtual]

Definition at line 62 of file CJToolBarBase.cpp.

00063 {
00064
00065 }

Member Function Documentation

void CCJToolBarBase::CalcInsideRect | ( | CRect & | rect,
 |  | BOOL | bHorz
 | ) | const

Definition at line 418 of file CJToolBarBase.cpp.

References CX_BORDER_GRIPPER, CX_GRIPPER, CY_BORDER_GRIPPER, CY_GRIPPER, m_bExStyle, and m_bInReBar.

Referenced by CCJReBar::CalcFixedLayout(), CCJToolBar::CalcLayout(), CCJToolBar::OnNcCalcSize(), and CCJReBar::OnNcCalcSize().

00419 {
00420     ASSERT_VALID(this);
00421     DWORD dwStyle = m_dwStyle;
00422
00423     if (dwStyle & CBRS_BORDER_LEFT)
00424         rect.left += afxData.cxBorder2;
00425     if (dwStyle & CBRS_BORDER_TOP)
00426         rect.top += afxData.cyBorder2;
00427     if (dwStyle & CBRS_BORDER_RIGHT)
00428         rect.right -= afxData.cxBorder2;
00429     if (dwStyle & CBRS_BORDER_BOTTOM)
00430         rect.bottom -= afxData.cyBorder2;
00431
00432     // inset the top and bottom.
00433     if (bHorz)
00434     {
00435         rect.left += m_cxLeftBorder;
00436         rect.top += m_cyTopBorder;
00437         rect.right -= m_cxRightBorder;
00438         rect.bottom -= m_cyBottomBorder;
00439         if ((m_dwStyle & (CBRS_GRIPPER|CBRS_FLOATING)) == CBRS_GRIPPER)
00440         {
00441             rect.left += CX_BORDER_GRIPPER+CX_GRIPPER+CX_BORDER_GRIPPER;
00442
00443             if( m_bExStyle == true ) {
00444                 rect.left += CX_GRIPPER;
00445             }
00446
00447             if(( m_bExStyle == false ) && ( m_bInReBar == false )) {
00448                 rect.left -= CX_BORDER_GRIPPER+CX_GRIPPER;
00449             }
00450         }
00451     }
00452     else
00453     {
00454         rect.left += m_cyTopBorder;
00455         rect.top += m_cxLeftBorder;
00456         rect.right -= m_cyBottomBorder;
00457         rect.bottom -= m_cxRightBorder;
00458         if ((m_dwStyle & (CBRS_GRIPPER|CBRS_FLOATING)) == CBRS_GRIPPER)
00459         {
00460             rect.top += CY_BORDER_GRIPPER+CY_GRIPPER+CY_BORDER_GRIPPER;
00461
00462             if( m_bExStyle == true ) {
00463                 rect.top += CY_GRIPPER;
00464             }
00465
00466             if(( m_bExStyle == false ) && ( m_bInReBar == false )) {
00467                 rect.top -= CY_BORDER_GRIPPER+CY_GRIPPER;
00468             }
00469         }
00470     }
00471 }

void CCJToolBarBase::DoPaint ( CDC * pDC ) [virtual]

Definition at line 206 of file CJToolBarBase.cpp.

References DrawBorders(), and DrawGripper().

Referenced by OnPaint().

00207 {
00208     ASSERT_VALID(this);
00209     ASSERT_VALID(pDC);
00210
00211     // paint inside client area
00212     CRect rect;
00213     GetClientRect(rect);
00214     DrawBorders(pDC, rect);
00215     DrawGripper(pDC, rect);
00216 }

Here is the call graph for this function:

void CCJToolBarBase::DrawBorders | ( | CDC * | pDC,
 |  | CRect & | rect
 | ) |

Definition at line 218 of file CJToolBarBase.cpp.

References CX_BORDER, CY_BORDER, and m_bInReBar.

Referenced by DoPaint(), and EraseNonClient().

00219 {
00220     ASSERT_VALID(this);
00221     ASSERT_VALID(pDC);
00222
00223     DWORD dwStyle = m_dwStyle;
00224     if (!(dwStyle & CBRS_BORDER_ANY))
00225         return;
00226
00227     // prepare for dark lines
00228     ASSERT(rect.top == 0 && rect.left == 0);
00229     if(m_bInReBar)
00230     {
00231         CRect rect1, rect2;
00232         rect1 = rect;
00233         rect2 = rect;
00234
00235 #if _MFC_VER >= 0x700
00236         COLORREF clr = afxData.clrBtnShadow;
00237 #else
00238         COLORREF clr = afxData.bWin4 ? afxData.clrBtnShadow : afxData.clrWindowFrame;
00239 #endif
00240
00241         // draw dark line one pixel back/up
00242         if (dwStyle & CBRS_BORDER_3D)
00243         {
00244             rect1.right -= CX_BORDER;
00245             rect1.bottom -= CY_BORDER;
00246         }
00247         if (dwStyle & CBRS_BORDER_TOP)
00248             rect2.top += afxData.cyBorder2;
00249         if (dwStyle & CBRS_BORDER_BOTTOM)
00250             rect2.bottom -= afxData.cyBorder2;
00251
00252         // draw left and top
00253         if (dwStyle & CBRS_BORDER_LEFT)
00254             pDC->FillSolidRect(0, rect2.top, CX_BORDER, rect2.Height(), clr);
00255         if (dwStyle & CBRS_BORDER_TOP)
00256             pDC->FillSolidRect(0, 0, rect.right, CY_BORDER, clr);
00257
00258         // draw right and bottom
00259         if (dwStyle & CBRS_BORDER_RIGHT)
00260             pDC->FillSolidRect(rect1.right, rect2.top, -CX_BORDER, rect2.Height(), clr);
00261         if (dwStyle & CBRS_BORDER_BOTTOM)
00262             pDC->FillSolidRect(0, rect1.bottom, rect.right, -CY_BORDER, clr);
00263
00264         if (dwStyle & CBRS_BORDER_3D)
00265         {
00266             // prepare for hilite lines
00267             clr = afxData.clrBtnHilite;
00268
00269             // draw left and top
00270             if (dwStyle & CBRS_BORDER_LEFT)
00271                 pDC->FillSolidRect(1, rect2.top, CX_BORDER, rect2.Height(), clr);
00272             if (dwStyle & CBRS_BORDER_TOP)
00273                 pDC->FillSolidRect(0, 1, rect.right, CY_BORDER, clr);
00274
00275             // draw right and bottom
00276             if (dwStyle & CBRS_BORDER_RIGHT)
00277                 pDC->FillSolidRect(rect.right, rect2.top, -CX_BORDER, rect2.Height(), clr);
00278             if (dwStyle & CBRS_BORDER_BOTTOM)
00279                 pDC->FillSolidRect(0, rect.bottom, rect.right, -CY_BORDER, clr);
00280         }
00281
00282         if (dwStyle & CBRS_BORDER_LEFT)
00283             rect.left += afxData.cxBorder2;
00284         if (dwStyle & CBRS_BORDER_TOP)
00285             rect.top += afxData.cyBorder2;
00286         if (dwStyle & CBRS_BORDER_RIGHT)
00287             rect.right -= afxData.cxBorder2;
00288         if (dwStyle & CBRS_BORDER_BOTTOM)
00289             rect.bottom -= afxData.cyBorder2;
00290     }
00291     else
00292     {
00293         if(dwStyle & CBRS_BORDER_RIGHT) {
00294             pDC->FillSolidRect(rect.right-1, 0, rect.right, rect.bottom, afxData.clrBtnShadow);
00295             rect.right--;
00296         }
00297         if(dwStyle & CBRS_BORDER_BOTTOM) {
00298             pDC->FillSolidRect(0, rect.bottom-1, rect.right, rect.bottom, afxData.clrBtnShadow);
00299             rect.bottom--;
00300         }
00301         if(dwStyle & CBRS_BORDER_TOP) {
00302             pDC->FillSolidRect(0, 0, rect.right, 1, afxData.clrBtnHilite);
00303             rect.top++;
00304         }
00305         if(dwStyle & CBRS_BORDER_LEFT) {
00306             pDC->FillSolidRect(0, 0, 1, rect.bottom, afxData.clrBtnHilite);
00307             rect.left++;
00308         }
00309     }
00310 }

void CCJToolBarBase::DrawGripper | ( | CDC * | pDC,
 |  | const CRect & | rect
 | ) |

Definition at line 317 of file CJToolBarBase.cpp.

References CX_BORDER_GRIPPER, CX_GRIPPER, CY_BORDER_GRIPPER, CY_GRIPPER, m_bExStyle, and m_bInReBar.

Referenced by DoPaint(), and EraseNonClient().

00318 {
00319     // if we are floating return.
00320     if( m_dwStyle & CBRS_FLOATING ) {
00321         return;
00322     }
00323
00324     // if we are to draw the extended "office" style gripper.
00325     if(( m_dwStyle & CBRS_GRIPPER ) && ( m_bExStyle == true ))
00326     {
00327         // draw the gripper in the border
00328         if (m_dwStyle & CBRS_ORIENT_HORZ)
00329         {
00330             // Draw the first gripper.
00331             pDC->Draw3dRect( rect.left+3, rect.top+2, 3, rect.Height()-4,
00332                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00333
00334             pDC->SetPixel( rect.left+3, rect.top+2+rect.Height()-5,
00335                 afxData.clrBtnHilite);
00336
00337             // Draw the second gripper.
00338             pDC->Draw3dRect( rect.left+6, rect.top+2, 3, rect.Height()-4,
00339                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00340
00341             pDC->SetPixel( rect.left+6, rect.top+2+rect.Height()-5,
00342                 afxData.clrBtnHilite);
00343         }
00344         else
00345         {
00346             // Draw the first gripper.
00347             pDC->Draw3dRect( rect.left+2, rect.top+3, rect.Width()-4, 3,
00348                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00349
00350             pDC->SetPixel( rect.left+2+rect.Width()-5, rect.top+3,
00351                 afxData.clrBtnHilite);
00352
00353             // Draw the second gripper.
00354             pDC->Draw3dRect( rect.left+2, rect.top+6, rect.Width()-4, 3,
00355                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00356
00357             pDC->SetPixel( rect.left+2+rect.Width()-5, rect.top+6,
00358                 afxData.clrBtnHilite);
00359         }
00360
00361         GdiFlush();
00362     }
00363
00364     // if we are to draw the "ReBar" style gripper.
00365     else
00366     if(( m_dwStyle & CBRS_GRIPPER ) && ( m_bInReBar == true ))
00367     {
00368         // draw the gripper in the border
00369         if (m_dwStyle & CBRS_ORIENT_HORZ)
00370         {
00371             // Draw the first gripper.
00372             pDC->Draw3dRect( rect.left+CX_BORDER_GRIPPER, rect.top+m_cyTopBorder,
00373                 CX_GRIPPER, rect.Height()-m_cyTopBorder-m_cyBottomBorder,
00374                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00375         }
00376         else
00377         {
00378             // Draw the first gripper.
00379             pDC->Draw3dRect( rect.left+m_cyTopBorder, rect.top+CY_BORDER_GRIPPER,
00380                 rect.Width()-m_cyTopBorder-m_cyBottomBorder, CY_GRIPPER,
00381                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00382         }
00383
00384         GdiFlush();
00385     }
00386
00387     // by default, we will draw the "visual studio" style gripper.
00388     else
00389     if( m_dwStyle & CBRS_GRIPPER )
00390     {
00391         // draw the gripper in the border
00392         if (m_dwStyle & CBRS_ORIENT_HORZ)
00393         {
00394             // Draw the first gripper.
00395             pDC->Draw3dRect( rect.left+1, rect.top+2, 3, rect.Height()-4,
00396                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00397
00398             // Draw the second gripper.
00399             pDC->Draw3dRect( rect.left+5, rect.top+2, 3, rect.Height()-4,
00400                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00401         }
00402         else
00403         {
00404             // Draw the first gripper.
00405             pDC->Draw3dRect( rect.left+2, rect.top+1, rect.Width()-4, 3,
00406                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00407
00408             // Draw the second gripper.
00409             pDC->Draw3dRect( rect.left+2, rect.top+5, rect.Width()-4, 3,
00410                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00411         }
00412
00413         GdiFlush();
00414     }
00415 }

void CCJToolBarBase::EraseNonClient ( )

Definition at line 182 of file CJToolBarBase.cpp.

References DrawBorders(), and DrawGripper().

Referenced by CCJToolBar::OnNcPaint(), and CCJReBar::OnNcPaint().

00183 {
00184     // get window DC that is clipped to the non-client area
00185     CWindowDC dc(this);
00186     CRect rectClient;
00187     GetClientRect(rectClient);
00188     CRect rectWindow;
00189     GetWindowRect(rectWindow);
00190     ScreenToClient(rectWindow);
00191     rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);
00192     dc.ExcludeClipRect(rectClient);
00193
00194     // draw borders in non-client area
00195     rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);
00196     DrawBorders(&dc, rectWindow);
00197
00198     // erase parts not drawn
00199     dc.IntersectClipRect(rectWindow);
00200     SendMessage(WM_ERASEBKGND, (WPARAM)dc.m_hDC);
00201
00202     // draw gripper in non-client area
00203     DrawGripper(&dc, rectWindow);
00204 }

Here is the call graph for this function:

CRect CCJToolBarBase::GetBorders ( ) const [protected]

void CCJToolBarBase::OnPaint ( )

Reimplemented in CCJReBar, and CCJToolBar.

Definition at line 172 of file CJToolBarBase.cpp.

References DoPaint().

00173 {
00174     // background is already filled in gray
00175     CPaintDC dc(this);
00176
00177     // erase background now
00178     if (IsVisible())
00179         DoPaint(&dc);       // delegate to paint helper
00180 }

Here is the call graph for this function:

void CCJToolBarBase::OnWindowPosChanging ( LPWINDOWPOS lpWndPos )

Reimplemented in CCJToolBar.

Definition at line 135 of file CJToolBarBase.cpp.

Referenced by CCJToolBar::OnWindowPosChanging().

00136 {
00137     // WINBUG: We call DefWindowProc here instead of CWnd::OnWindowPosChanging
00138     //  (which calls CWnd::Default, which calls through the super wndproc)
00139     //  because certain control bars that are system implemented (such as
00140     //  CToolBar with TBSTYLE_FLAT) do not implement WM_WINDOWPOSCHANGING
00141     //  correctly, causing repaint problems.  This code bypasses that whole
00142     //  mess.
00143     ::DefWindowProc(m_hWnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)lpWndPos);
00144
00145     if (lpWndPos->flags & SWP_NOSIZE)
00146         return;
00147
00148     // invalidate borders on the right
00149     CRect rect;
00150     GetWindowRect(&rect);
00151     CSize sizePrev = rect.Size();
00152     int cx = lpWndPos->cx;
00153     int cy = lpWndPos->cy;
00154     if (cx != sizePrev.cx && (m_dwStyle & CBRS_BORDER_RIGHT))
00155     {
00156         rect.SetRect(cx-afxData.cxBorder2, 0, cx, cy);
00157         InvalidateRect(&rect);
00158         rect.SetRect(sizePrev.cx-afxData.cxBorder2, 0, sizePrev.cx, cy);
00159         InvalidateRect(&rect);
00160     }
00161
00162     // invalidate borders on the bottom
00163     if (cy != sizePrev.cy && (m_dwStyle & CBRS_BORDER_BOTTOM))
00164     {
00165         rect.SetRect(0, cy-afxData.cyBorder2, cx, cy);
00166         InvalidateRect(&rect);
00167         rect.SetRect(0, sizePrev.cy-afxData.cyBorder2, cx, sizePrev.cy);
00168         InvalidateRect(&rect);
00169     }
00170 }

void CCJToolBarBase::SetBorders | ( | int | cxLeft = 0,
 |  | int | cyTop = 0,
 |  | int | cxRight = 0,
 |  | int | cyBottom = 0
 | ) | [protected]

Definition at line 74 of file CJToolBarBase.cpp.

00075 {
00076     ASSERT(cxLeft >= 0);
00077     ASSERT(cyTop >= 0);
00078     ASSERT(cxRight >= 0);
00079     ASSERT(cyBottom >= 0);
00080
00081     m_cxLeftBorder = cxLeft;
00082     m_cyTopBorder = cyTop;
00083     m_cxRightBorder = cxRight;
00084     m_cyBottomBorder = cyBottom;
00085 }

_CJXLIB_INLINE void CCJToolBarBase::SetBorders ( LPCRECT lpRect ) [protected]

Definition at line 113 of file CJToolBarBase.h.

References _CJXLIB_INLINE.

Referenced by CCJToolBar::CreateEx().

00114     { SetBorders(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); }

LRESULT CCJToolBarBase::WindowProc | ( | UINT | nMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual]

Reimplemented in CCJReBar.

Definition at line 87 of file CJToolBarBase.cpp.

Referenced by CCJReBar::WindowProc().

00088 {
00089     ASSERT_VALID(this);
00090
00091     LRESULT lResult;
00092     switch (nMsg)
00093     {
00094     case WM_NOTIFY:
00095     case WM_COMMAND:
00096     case WM_DRAWITEM:
00097     case WM_MEASUREITEM:
00098     case WM_DELETEITEM:
00099     case WM_COMPAREITEM:
00100     case WM_VKEYTOITEM:
00101     case WM_CHARTOITEM:
00102         // send these messages to the owner if not handled
00103         if (OnWndMsg(nMsg, wParam, lParam, &lResult))
00104             return lResult;
00105         else
00106         {
00107             // try owner next
00108             lResult = GetOwner()->SendMessage(nMsg, wParam, lParam);
00109
00110             // special case for TTN_NEEDTEXTA and TTN_NEEDTEXTW
00111             if(nMsg == WM_NOTIFY)
00112             {
00113                 NMHDR* pNMHDR = (NMHDR*)lParam;
00114                 if (pNMHDR->code == TTN_NEEDTEXTA || pNMHDR->code == TTN_NEEDTEXTW)
00115                 {
00116                     TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
00117                     TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
00118                     if ((pNMHDR->code == TTN_NEEDTEXTA && (!pTTTA->lpszText || !*pTTTA->lpszText)) ||
00119                         (pNMHDR->code == TTN_NEEDTEXTW && (!pTTTW->lpszText || !*pTTTW->lpszText)))
00120                     {
00121                         // not handled by owner, so let bar itself handle it
00122                         lResult = CWnd::WindowProc(nMsg, wParam, lParam);
00123                     }
00124                 }
00125             }
00126             return lResult;
00127         }
00128     }
00129
00130     // otherwise, just handle in default way
00131     lResult = CWnd::WindowProc(nMsg, wParam, lParam);
00132     return lResult;
00133 }

Member Data Documentation

bool CCJToolBarBase::m_bExStyle

Definition at line 90 of file CJToolBarBase.h.

Referenced by CalcInsideRect(), CCJToolBarBase(), and DrawGripper().

bool CCJToolBarBase::m_bInReBar

Definition at line 89 of file CJToolBarBase.h.

Referenced by CCJReBar::_AddBar(), CalcInsideRect(), CCJToolBarBase(), DrawBorders(), and DrawGripper().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJToolBarBase.h
  • WinCvs/CJLib/CJLibrary/CJToolBarBase.cpp
Generated on Sat Aug 7 22:50:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJToolBarCtrl Class Reference

CCJToolBarCtrl Class Reference

#include <CJToolBarCtrl.h>

Inheritance diagram for CCJToolBarCtrl:

[legend]
Collaboration diagram for CCJToolBarCtrl:

[legend]
List of all members.

Public Member Functions

CCJToolBarCtrl ()
BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID)
DWORD | GetButtonSize () const
CImageList * | GetDisabledImageList () const
CImageList * | GetHotImageList () const
CImageList * | GetImageList () const
DWORD | GetStyle () const
int | GetMaxTextRows () const
BOOL | IsButtonHighlighted (int nID) const
BOOL | SetButtonWidth (int cxMin, int cxMax)
CImageList * | SetDisabledImageList (CImageList *pImageList)
CImageList * | SetHotImageList (CImageList *pImageList)
CImageList * | SetImageList (CImageList *pImageList)
HRESULT | GetDropTarget (IDropTarget **ppDropTarget) const
BOOL | SetIndent (int iIndent)
BOOL | SetMaxTextRows (int iMaxRows)
void | SetStyle (DWORD dwStyle)
BOOL | GetButtonInfo (int nID, TBBUTTONINFO *ptbbi) const
BOOL | SetButtonInfo (int nID, TBBUTTONINFO *ptbbi)
DWORD | SetDrawTextFlags (DWORD dwMask, DWORD dwDTFlags)
BOOL | GetAnchorHighlight () const
BOOL | SetAnchorHighlight (BOOL fAnchor=TRUE)
int | GetHotItem () const
int | SetHotItem (int nHot)
void | GetInsertMark (TBINSERTMARK *ptbim) const
void | SetInsertMark (TBINSERTMARK *ptbim)
BOOL | GetMaxSize (LPSIZE pSize) const
BOOL | InsertMarkHitTest (LPPOINT ppt, LPTBINSERTMARK ptbim) const
DWORD | GetExtendedStyle () const
DWORD | SetExtendedStyle (DWORD dwExStyle)
COLORREF | GetInsertMarkColor () const
COLORREF | SetInsertMarkColor (COLORREF clrNew)
BOOL | MapAccelerator (TCHAR chAccel, UINT *pIDBtn)
BOOL | MarkButton (int nID, BOOL bHighlight=TRUE)
BOOL | MoveButton (UINT nOldPos, UINT nNewPos)
int | HitTest (LPPOINT ppt) const
virtual | ~CCJToolBarCtrl ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)

Constructor & Destructor Documentation

CCJToolBarCtrl::CCJToolBarCtrl ( )

Definition at line 71 of file CJToolBarCtrl.cpp.

00072 {
00073   // initialize common controls
00074   INITCOMMONCONTROLSEX icex;
00075   icex.dwSize = sizeof(icex);
00076   icex.dwICC = ICC_BAR_CLASSES;
00077   VERIFY(InitCommonControlsEx(&icex));
00078 }

CCJToolBarCtrl::~CCJToolBarCtrl ( ) [virtual]

Definition at line 56 of file CJToolBarCtrl.cpp.

00057 {
00058   DestroyWindow();
00059 }

Member Function Documentation

BOOL CCJToolBarCtrl::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID
 | ) |

Definition at line 80 of file CJToolBarCtrl.cpp.

References NULL.

00082 {
00083   CWnd* pWnd = this;
00084   BOOL bCreated = pWnd->Create(TOOLBARCLASSNAME, NULL, dwStyle, rect, pParentWnd, nID);
00085
00086   return bCreated;
00087 }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::GetAnchorHighlight ( ) const

Definition at line 179 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00180     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETANCHORHIGHLIGHT, 0, 0); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::GetButtonInfo | ( | int | nID,
 |  | TBBUTTONINFO * | ptbbi
 | ) | const

Definition at line 170 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00171     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETBUTTONINFO, nID, (LPARAM)ptbbi); }

_CJXLIB_INLINE DWORD CCJToolBarCtrl::GetButtonSize ( ) const

Definition at line 128 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00129     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETBUTTONSIZE, 0, 0L); }

_CJXLIB_INLINE CImageList * CCJToolBarCtrl::GetDisabledImageList ( ) const

Definition at line 131 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00132     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETDISABLEDIMAGELIST, 0, 0)); }

HRESULT CCJToolBarCtrl::GetDropTarget ( IDropTarget ** ppDropTarget ) const

Definition at line 97 of file CJToolBarCtrl.cpp.

00098 {
00099   ASSERT(::IsWindow(m_hWnd));
00100   ASSERT(ppDropTarget);
00101   return (HRESULT) ::SendMessage(m_hWnd, TB_GETOBJECT, (WPARAM)&IID_IDropTarget, (LPARAM)ppDropTarget);
00102 }

_CJXLIB_INLINE DWORD CCJToolBarCtrl::GetExtendedStyle ( ) const

Definition at line 203 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00204     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETEXTENDEDSTYLE, 0, 0L); }

_CJXLIB_INLINE CImageList * CCJToolBarCtrl::GetHotImageList ( ) const

Definition at line 134 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00135     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETHOTIMAGELIST, 0, 0)); }

_CJXLIB_INLINE int CCJToolBarCtrl::GetHotItem ( ) const

Definition at line 185 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00186     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_GETHOTITEM, 0, 0); }

_CJXLIB_INLINE CImageList * CCJToolBarCtrl::GetImageList ( ) const

Definition at line 137 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00138     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETIMAGELIST, 0, 0)); }

_CJXLIB_INLINE void CCJToolBarCtrl::GetInsertMark ( TBINSERTMARK * ptbim ) const

Definition at line 191 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00192     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_GETINSERTMARK, 0, (LPARAM)ptbim); }

_CJXLIB_INLINE COLORREF CCJToolBarCtrl::GetInsertMarkColor ( ) const

Definition at line 209 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00210     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TB_GETINSERTMARKCOLOR, 0, 0); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::GetMaxSize ( LPSIZE pSize ) const

Definition at line 197 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00198     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETMAXSIZE, 0, (LPARAM)pSize); }

_CJXLIB_INLINE int CCJToolBarCtrl::GetMaxTextRows ( ) const

Definition at line 143 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00144     { ASSERT(::IsWindow(m_hWnd)); return (INT) ::SendMessage(m_hWnd, TB_GETTEXTROWS, 0, 0L); }

_CJXLIB_INLINE DWORD CCJToolBarCtrl::GetStyle ( ) const

Definition at line 140 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00141     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETSTYLE, 0, 0L); }

_CJXLIB_INLINE int CCJToolBarCtrl::HitTest ( LPPOINT ppt ) const

Definition at line 224 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00225     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_HITTEST, 0, (LPARAM)ppt); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::InsertMarkHitTest | ( | LPPOINT | ppt,
 |  | LPTBINSERTMARK | ptbim
 | ) | const

Definition at line 200 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00201     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_INSERTMARKHITTEST, (WPARAM)ppt, (LPARAM)ptbim); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::IsButtonHighlighted ( int nID ) const

Definition at line 146 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00147     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONHIGHLIGHTED, nID, 0); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::MapAccelerator | ( | TCHAR | chAccel,
 |  | UINT * | pIDBtn
 | ) |

Definition at line 215 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00216     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MAPACCELERATOR, (WPARAM)chAccel, (LPARAM)pIDBtn); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::MarkButton | ( | int | nID,
 |  | BOOL | bHighlight = TRUE
 | ) |

Definition at line 218 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00219     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MARKBUTTON, nID, MAKELPARAM(bHighlight, 0)); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::MoveButton | ( | UINT | nOldPos,
 |  | UINT | nNewPos
 | ) |

Definition at line 221 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00222     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MOVEBUTTON, nOldPos, nNewPos); }

int CCJToolBarCtrl::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 89 of file CJToolBarCtrl.cpp.

00090 {
00091   if (CWnd::OnCreate(lpcs) == -1)
00092     return -1;
00093   SetButtonStructSize(sizeof(TBBUTTON));
00094   return 0;
00095 }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::SetAnchorHighlight ( BOOL fAnchor = TRUE )

Definition at line 182 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00183     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETANCHORHIGHLIGHT, fAnchor, 0); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::SetButtonInfo | ( | int | nID,
 |  | TBBUTTONINFO * | ptbbi
 | ) |

Definition at line 173 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00174     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONINFO, nID, (LPARAM)ptbbi); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::SetButtonWidth | ( | int | cxMin,
 |  | int | cxMax
 | ) |

Definition at line 149 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00150     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONWIDTH, 0, MAKELPARAM(cxMin, cxMax)); }

_CJXLIB_INLINE CImageList * CCJToolBarCtrl::SetDisabledImageList ( CImageList * pImageList )

Definition at line 152 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00153     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETDISABLEDIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }

_CJXLIB_INLINE DWORD CCJToolBarCtrl::SetDrawTextFlags | ( | DWORD | dwMask,
 |  | DWORD | dwDTFlags
 | ) |

Definition at line 176 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00177     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_SETDRAWTEXTFLAGS, dwMask, dwDTFlags); }

_CJXLIB_INLINE DWORD CCJToolBarCtrl::SetExtendedStyle ( DWORD dwExStyle )

Definition at line 206 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00207     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_SETEXTENDEDSTYLE, 0, dwExStyle); }

_CJXLIB_INLINE CImageList * CCJToolBarCtrl::SetHotImageList ( CImageList * pImageList )

Definition at line 155 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00156     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETHOTIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }

_CJXLIB_INLINE int CCJToolBarCtrl::SetHotItem ( int nHot )

Definition at line 188 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00189     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_SETHOTITEM, nHot, 0); }

_CJXLIB_INLINE CImageList * CCJToolBarCtrl::SetImageList ( CImageList * pImageList )

Definition at line 158 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00159     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::SetIndent ( int iIndent )

Definition at line 161 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00162     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETINDENT, iIndent, 0L); }

_CJXLIB_INLINE void CCJToolBarCtrl::SetInsertMark ( TBINSERTMARK * ptbim )

Definition at line 194 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00195     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETINSERTMARK, 0, (LPARAM)ptbim); }

_CJXLIB_INLINE COLORREF CCJToolBarCtrl::SetInsertMarkColor ( COLORREF clrNew )

Definition at line 212 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00213     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TB_SETINSERTMARKCOLOR, 0, (LPARAM) clrNew); }

_CJXLIB_INLINE BOOL CCJToolBarCtrl::SetMaxTextRows ( int iMaxRows )

Definition at line 164 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00165     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETMAXTEXTROWS, iMaxRows, 0L); }

_CJXLIB_INLINE void CCJToolBarCtrl::SetStyle ( DWORD dwStyle )

Definition at line 167 of file CJToolBarCtrl.h.

References _CJXLIB_INLINE.

00168     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETSTYLE, 0, dwStyle); }

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJToolBarCtrl.h
  • WinCvs/CJLib/CJLibrary/CJToolBarCtrl.cpp
Generated on Sat Aug 7 22:50:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJToolCmdUI Class Reference

CCJToolCmdUI Class Reference

Inheritance diagram for CCJToolCmdUI:

[legend]
Collaboration diagram for CCJToolCmdUI:

[legend]
List of all members.

Public Member Functions

virtual void | Enable (BOOL bOn)
virtual void | SetCheck (int nCheck)
virtual void | SetText (LPCTSTR lpszText)

Member Function Documentation

void CCJToolCmdUI::Enable ( BOOL bOn ) [virtual]

Definition at line 2053 of file CJToolBar.cpp.

References CCJToolBar::GetButtonStyle(), NULL, CCJToolBar::SetButtonStyle(), TBBS_DISABLED, TBBS_PRESSED, and TBBS_SEPARATOR.

02054 {
02055     m_bEnableChanged = TRUE;
02056     CCJToolBar* pToolBar = (CCJToolBar*)m_pOther;
02057     ASSERT(pToolBar != NULL);
02058     ASSERT_KINDOF(CCJToolBar, pToolBar);
02059     ASSERT(m_nIndex < m_nIndexMax);
02060
02061     UINT nNewStyle = pToolBar->GetButtonStyle(m_nIndex) & ~TBBS_DISABLED;
02062     if (!bOn)
02063     {
02064         nNewStyle |= TBBS_DISABLED;
02065         // WINBUG: If a button is currently pressed and then is disabled
02066         // COMCTL32.DLL does not unpress the button, even after the mouse
02067         // button goes up!  We work around this bug by forcing TBBS_PRESSED
02068         // off when a button is disabled.
02069         nNewStyle &= ~TBBS_PRESSED;
02070     }
02071     ASSERT(!(nNewStyle & TBBS_SEPARATOR));
02072     pToolBar->SetButtonStyle(m_nIndex, nNewStyle);
02073 }

Here is the call graph for this function:

void CCJToolCmdUI::SetCheck ( int nCheck ) [virtual]

Definition at line 2075 of file CJToolBar.cpp.

References NULL, TBBS_CHECKBOX, TBBS_CHECKED, TBBS_INDETERMINATE, and TBBS_SEPARATOR.

02076 {
02077     ASSERT(nCheck >= 0 && nCheck <= 2); // 0=>off, 1=>on, 2=>indeterminate
02078     CCJToolBar* pToolBar = (CCJToolBar*)m_pOther;
02079     ASSERT(pToolBar != NULL);
02080     ASSERT_KINDOF(CCJToolBar, pToolBar);
02081     ASSERT(m_nIndex < m_nIndexMax);
02082
02083     UINT nNewStyle = pToolBar->GetButtonStyle(m_nIndex) &
02084                 ~(TBBS_CHECKED | TBBS_INDETERMINATE);
02085     if (nCheck == 1)
02086         nNewStyle |= TBBS_CHECKED;
02087     else if (nCheck == 2)
02088         nNewStyle |= TBBS_INDETERMINATE;
02089     ASSERT(!(nNewStyle & TBBS_SEPARATOR));
02090     pToolBar->SetButtonStyle(m_nIndex, nNewStyle | TBBS_CHECKBOX);
02091 }

void CCJToolCmdUI::SetText ( LPCTSTR lpszText ) [virtual]

Definition at line 2093 of file CJToolBar.cpp.

02094 {
02095     // ignore it
02096 }

The documentation for this class was generated from the following file:
  • WinCvs/CJLib/CJLibrary/CJToolBar.cpp
Generated on Sat Aug 7 22:50:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJTreeCtrl Class Reference

CCJTreeCtrl Class Reference

#include <CJTreeCtrl.h>

Inheritance diagram for CCJTreeCtrl:

[legend]
Collaboration diagram for CCJTreeCtrl:

[legend]
List of all members.

Public Member Functions

CCJTreeCtrl ()
virtual | ~CCJTreeCtrl ()
virtual HTREEITEM | GetNextItem (HTREEITEM hItem, UINT nCode)
virtual HTREEITEM | GetNextItem (HTREEITEM hItem)
virtual HTREEITEM | GetPrevItem (HTREEITEM hItem)
virtual HTREEITEM | GetLastItem (HTREEITEM hItem)
virtual HTREEITEM | GetPrevSelectedItem (HTREEITEM hItem)
virtual HTREEITEM | GetNextSelectedItem (HTREEITEM hItem)
virtual HTREEITEM | GetFirstSelectedItem ()
virtual COLORREF | GetItemColor (HTREEITEM hItem)
virtual void | ClearSelection ()
virtual void | SetItemFont (HTREEITEM hItem, LOGFONT &logfont)
virtual void | SetItemBold (HTREEITEM hItem, BOOL bBold=TRUE)
virtual void | SetItemColor (HTREEITEM hItem, COLORREF color)
virtual void | EnableMultiSelect (BOOL bMultiSelect=TRUE)
virtual BOOL | GetItemFont (HTREEITEM hItem, LOGFONT *plogfont)
virtual BOOL | GetItemBold (HTREEITEM hItem)
virtual BOOL | SelectItems (HTREEITEM hItemFrom, HTREEITEM hItemTo)
virtual HTREEITEM | FindItem (LPCTSTR lpszSearch, BOOL bCaseSensitive=FALSE, BOOL bDownDir=TRUE, BOOL bWholeWord=FALSE, HTREEITEM hItem=NULL)

Protected Member Functions

virtual BOOL | IsFindValid (HTREEITEM hti)
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
afx_msg void | OnPaint ()
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)

Protected Attributes

HTREEITEM | m_hItemFirstSel
DWORD | m_dwDragStart
BOOL | m_bMultiSelect
CMap< void *, void *, Color_Font,
Color_Font & > 		m_mapColorFont

Constructor & Destructor Documentation

CCJTreeCtrl::CCJTreeCtrl ( )

Definition at line 63 of file CJTreeCtrl.cpp.

References m_bMultiSelect, m_dwDragStart, m_hItemFirstSel, and NULL.

00064 {
00065     m_hItemFirstSel = NULL;
00066     m_dwDragStart   = NULL;
00067     m_bMultiSelect = FALSE;
00068 }

CCJTreeCtrl::~CCJTreeCtrl ( ) [virtual]

Definition at line 70 of file CJTreeCtrl.cpp.

00071 {
00072 }

Member Function Documentation

void CCJTreeCtrl::ClearSelection ( ) [virtual]

Definition at line 503 of file CJTreeCtrl.cpp.

References GetNextItem(), m_bMultiSelect, and NULL.

Referenced by OnLButtonDown().

00504 {
00505     if(m_bMultiSelect)
00506     {
00507         // This can be time consuming for very large trees
00508         // and is called every time the user does a normal selection
00509         // If performance is an issue, it may be better to maintain
00510         // a list of selected items
00511         for ( HTREEITEM hItem=GetRootItem(); hItem!=NULL; hItem=GetNextItem( hItem ) )
00512             if ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED )
00513                 SetItemState( hItem, 0, TVIS_SELECTED );
00514     }
00515 }

Here is the call graph for this function:

_CJXLIB_INLINE void CCJTreeCtrl::EnableMultiSelect ( BOOL bMultiSelect = TRUE ) [virtual]

Definition at line 250 of file CJTreeCtrl.h.

References _CJXLIB_INLINE, and m_bMultiSelect.

00251     { m_bMultiSelect = bMultiSelect; }

HTREEITEM CCJTreeCtrl::FindItem | ( | LPCTSTR | lpszSearch,
 |  | BOOL | bCaseSensitive = FALSE,
 |  | BOOL | bDownDir = TRUE,
 |  | BOOL | bWholeWord = FALSE,
 |  | HTREEITEM | hItem = NULL
 | ) | [virtual]

Definition at line 168 of file CJTreeCtrl.cpp.

References GetLastItem(), GetNextItem(), GetPrevItem(), IsFindValid(), and NULL.

00173 {
00174     CString str = lpszSearch;
00175
00176     int lenSearchStr = str.GetLength();
00177     if( lenSearchStr == 0 ) return NULL;
00178
00179     // For the first pass, set the current item equal to the selection
00180     HTREEITEM htiSel = hItem ? hItem : GetSelectedItem();
00181     HTREEITEM htiCur = htiSel;
00182     CString sSearch = str;
00183
00184     // make sure it ends if we started with no selection
00185     if(( htiCur == NULL ) && ( htiSel != NULL ))
00186     {
00187         if( bDownDir )
00188             htiCur = GetRootItem();
00189         else
00190             htiCur = GetLastItem( NULL );
00191     }
00192
00193     if( !bCaseSensitive )
00194         sSearch.MakeLower();
00195
00196     // For the first pass only, we check to see if it
00197     // is the item we're looking for.
00198     BOOL bFirstPass = TRUE;
00199
00200     while( htiCur && (htiCur != htiSel || bFirstPass) )
00201     {
00202         bFirstPass = FALSE;
00203
00204         CString sItemText = GetItemText( htiCur );
00205         if( !bCaseSensitive )
00206             sItemText.MakeLower();
00207
00208         int n;
00209         while( (n = sItemText.Find( sSearch )) != -1 )
00210         {
00211             // Search string found
00212             if( bWholeWord )
00213             {
00214                 // Check preceding char
00215                 if( n != 0 )
00216                 {
00217                     if( isalpha(sItemText[n-1]) ||
00218                             sItemText[n-1] == '_' ){
00219                         // Not whole word
00220                         sItemText = sItemText.Right(
00221                             sItemText.GetLength() - n -
00222                             lenSearchStr );
00223                         continue;
00224                     }
00225                 }
00226
00227                 // Check succeeding char
00228                 if( sItemText.GetLength() > n + lenSearchStr
00229                     && ( isalpha(sItemText[n+lenSearchStr]) ||
00230                     sItemText[n+lenSearchStr] == '_' ) )
00231                 {
00232                     // Not whole word
00233                     sItemText = sItemText.Right( sItemText.GetLength()
00234                             - n - sSearch.GetLength() );
00235                     continue;
00236                 }
00237             }
00238
00239             if( IsFindValid( htiCur ) )
00240                 return htiCur;
00241             else break;
00242         }
00243
00244
00245         htiCur = bDownDir ? GetNextItem( htiCur ) : GetPrevItem( htiCur );
00246         if( htiCur == NULL )
00247         {
00248             if( bDownDir )  htiCur = GetRootItem();
00249             else htiCur = GetLastItem( NULL );
00250         }
00251     }
00252     return NULL;
00253 }

Here is the call graph for this function:

HTREEITEM CCJTreeCtrl::GetFirstSelectedItem ( ) [virtual]

Definition at line 569 of file CJTreeCtrl.cpp.

References GetNextItem(), m_bMultiSelect, and NULL.

00570 {
00571     if(m_bMultiSelect)
00572     {
00573         for ( HTREEITEM hItem = GetRootItem(); hItem!=NULL; hItem = GetNextItem( hItem ) )
00574             if ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED )
00575                 return hItem;
00576     }
00577
00578     return NULL;
00579 }

Here is the call graph for this function:

BOOL CCJTreeCtrl::GetItemBold ( HTREEITEM hItem ) [virtual]

Definition at line 315 of file CJTreeCtrl.cpp.

Referenced by OnPaint().

00316 {
00317     return GetItemState( hItem, TVIS_BOLD ) & TVIS_BOLD;
00318 }

COLORREF CCJTreeCtrl::GetItemColor ( HTREEITEM hItem ) [virtual]

Definition at line 320 of file CJTreeCtrl.cpp.

References CCJTreeCtrl::Color_Font::color, and m_mapColorFont.

00321 {
00322     // Returns (COLORREF)-1 if color was not set
00323     Color_Font cf;
00324     if( !m_mapColorFont.Lookup( hItem, cf ) )
00325         return (COLORREF)-1;
00326     return cf.color;
00327
00328 }

BOOL CCJTreeCtrl::GetItemFont | ( | HTREEITEM | hItem,
 |  | LOGFONT * | plogfont
 | ) | [virtual]

Definition at line 303 of file CJTreeCtrl.cpp.

References CCJTreeCtrl::Color_Font::logfont, and m_mapColorFont.

00304 {
00305     Color_Font cf;
00306     if( !m_mapColorFont.Lookup( hItem, cf ) )
00307         return FALSE;
00308     if( cf.logfont.lfFaceName[0] == '\0' )
00309         return FALSE;
00310     *plogfont = cf.logfont;
00311     return TRUE;
00312
00313 }

HTREEITEM CCJTreeCtrl::GetLastItem ( HTREEITEM hItem ) [virtual]

Definition at line 134 of file CJTreeCtrl.cpp.

References NULL.

Referenced by FindItem(), and GetPrevItem().

00135 {
00136     //  Temporary used variable
00137     HTREEITEM   htiNext;
00138
00139     if( hItem == NULL ) {
00140         // Get the last item at the top level
00141         hItem = GetRootItem();
00142     }
00143
00144     while( ItemHasChildren( hItem ) != NULL ) {
00145         //  Find the last child of hItem
00146         htiNext = GetChildItem( hItem );
00147         while( htiNext != NULL ) {
00148             hItem = htiNext;
00149             htiNext = GetNextSiblingItem( htiNext );
00150         }
00151     }
00152
00153     return hItem;
00154
00155 }

HTREEITEM CCJTreeCtrl::GetNextItem ( HTREEITEM hItem ) [virtual]

Definition at line 93 of file CJTreeCtrl.cpp.

References NULL.

00094 {
00095     HTREEITEM hti = NULL;
00096
00097     if (ItemHasChildren(hItem))
00098         hti = GetChildItem(hItem);
00099
00100     if (hti == NULL) {
00101         while ((hti = GetNextSiblingItem(hItem)) == NULL) {
00102             if ((hItem = GetParentItem(hItem)) == NULL)
00103                 return NULL;
00104         }
00105     }
00106     return hti;
00107 }

_CJXLIB_INLINE HTREEITEM CCJTreeCtrl::GetNextItem | ( | HTREEITEM | hItem,
 |  | UINT | nCode
 | ) | [virtual]

Definition at line 247 of file CJTreeCtrl.h.

References _CJXLIB_INLINE.

Referenced by ClearSelection(), FindItem(), GetFirstSelectedItem(), and GetNextSelectedItem().

00248     { return CTreeCtrl::GetNextItem( hItem, nCode ); }

HTREEITEM CCJTreeCtrl::GetNextSelectedItem ( HTREEITEM hItem ) [virtual]

Definition at line 581 of file CJTreeCtrl.cpp.

References GetNextItem(), m_bMultiSelect, and NULL.

00582 {
00583     if(m_bMultiSelect)
00584     {
00585         for ( hItem = GetNextItem( hItem ); hItem!=NULL; hItem = GetNextItem( hItem ) )
00586             if ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED )
00587                 return hItem;
00588     }
00589
00590     return NULL;
00591 }

Here is the call graph for this function:

HTREEITEM CCJTreeCtrl::GetPrevItem ( HTREEITEM hItem ) [virtual]

Definition at line 115 of file CJTreeCtrl.cpp.

References GetLastItem(), and NULL.

Referenced by FindItem(), and GetPrevSelectedItem().

00116 {
00117     HTREEITEM       hti;
00118
00119     hti = GetPrevSiblingItem(hItem);
00120     if( hti == NULL )
00121         hti = GetParentItem(hItem);
00122     else
00123         hti = GetLastItem(hti);
00124     return hti;
00125 }

Here is the call graph for this function:

HTREEITEM CCJTreeCtrl::GetPrevSelectedItem ( HTREEITEM hItem ) [virtual]

Definition at line 593 of file CJTreeCtrl.cpp.

References GetPrevItem(), m_bMultiSelect, and NULL.

00594 {
00595     if(m_bMultiSelect)
00596     {
00597         for ( hItem = GetPrevItem( hItem ); hItem!=NULL; hItem = GetPrevItem( hItem ) )
00598             if ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED )
00599                 return hItem;
00600     }
00601
00602     return NULL;
00603 }

Here is the call graph for this function:

BOOL CCJTreeCtrl::IsFindValid ( HTREEITEM hti ) [protected, virtual]

Definition at line 262 of file CJTreeCtrl.cpp.

Referenced by FindItem().

00263 {
00264     return TRUE;
00265 }

BOOL CCJTreeCtrl::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 605 of file CJTreeCtrl.cpp.

00606 {
00607     // KStowell - overridden for flicker-free drawing.
00608     UNUSED_ALWAYS(pDC);
00609     return TRUE;
00610 }

void CCJTreeCtrl::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 427 of file CJTreeCtrl.cpp.

References ClearSelection(), m_bMultiSelect, m_dwDragStart, m_hItemFirstSel, NULL, and SelectItems().

00428 {
00429     if(m_bMultiSelect)
00430     {
00431         // Set focus to control if key strokes are needed.
00432         // Focus is not automatically given to control on lbuttondown
00433
00434         m_dwDragStart = GetTickCount();
00435
00436         if(nFlags & MK_CONTROL )
00437         {
00438             // Control key is down
00439             UINT flag;
00440             HTREEITEM hItem = HitTest( point, &flag );
00441             if( hItem )
00442             {
00443                 // Toggle selection state
00444                 UINT uNewSelState =
00445                     GetItemState(hItem, TVIS_SELECTED) & TVIS_SELECTED ?
00446                     0 : TVIS_SELECTED;
00447
00448                 // Get old selected (focus) item and state
00449                 HTREEITEM hItemOld = GetSelectedItem();
00450                 UINT uOldSelState  = hItemOld ?
00451                     GetItemState(hItemOld, TVIS_SELECTED) : 0;
00452
00453                 // Select new item
00454                 if( GetSelectedItem() == hItem )
00455                     SelectItem( NULL );     // to prevent edit
00456                 CTreeCtrl::OnLButtonDown(nFlags, point);
00457
00458                 // Set proper selection (highlight) state for new item
00459                 SetItemState(hItem, uNewSelState,  TVIS_SELECTED);
00460
00461                 // Restore state of old selected item
00462                 if (hItemOld && hItemOld != hItem)
00463                     SetItemState(hItemOld, uOldSelState, TVIS_SELECTED);
00464
00465                 m_hItemFirstSel = NULL;
00466
00467                 return;
00468             }
00469         }
00470         else if(nFlags & MK_SHIFT)
00471         {
00472             // Shift key is down
00473             UINT flag;
00474             HTREEITEM hItem = HitTest( point, &flag );
00475
00476             // Initialize the reference item if this is the first shift selection
00477             if( !m_hItemFirstSel )
00478                 m_hItemFirstSel = GetSelectedItem();
00479
00480             // Select new item
00481             if( GetSelectedItem() == hItem )
00482                 SelectItem( NULL );         // to prevent edit
00483             CTreeCtrl::OnLButtonDown(nFlags, point);
00484
00485             if( m_hItemFirstSel )
00486             {
00487                 SelectItems( m_hItemFirstSel, hItem );
00488                 return;
00489             }
00490         }
00491         else
00492         {
00493             // Normal - remove all selection and let default
00494             // handler do the rest
00495             ClearSelection();
00496             m_hItemFirstSel = NULL;
00497         }
00498     }
00499
00500     CTreeCtrl::OnLButtonDown(nFlags, point);
00501 }

Here is the call graph for this function:

void CCJTreeCtrl::OnPaint ( ) [protected]

Definition at line 330 of file CJTreeCtrl.cpp.

References CCJTreeCtrl::Color_Font::color, GetItemBold(), CCJTreeCtrl::Color_Font::logfont, and m_mapColorFont.

00331 {
00332     CPaintDC dc(this);
00333
00334     // Create a memory DC compatible with the paint DC
00335     CDC memDC;
00336     memDC.CreateCompatibleDC( &dc );
00337
00338     CRect rcClip, rcClient;
00339     dc.GetClipBox( &rcClip );
00340     GetClientRect(&rcClient);
00341
00342     // Select a compatible bitmap into the memory DC
00343     CBitmap bitmap;
00344     bitmap.CreateCompatibleBitmap( &dc, rcClient.Width(), rcClient.Height() );
00345     CBitmap* pOldBitmap = memDC.SelectObject( &bitmap );
00346
00347     // Set clip region to be same as that in paint DC
00348     CRgn rgn;
00349     rgn.CreateRectRgnIndirect( &rcClip );
00350     memDC.SelectClipRgn(&rgn);
00351     rgn.DeleteObject();
00352
00353     // First let the control do its default drawing.
00354     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00355
00356     HTREEITEM hItem = GetFirstVisibleItem();
00357
00358     int n = GetVisibleCount()+1;
00359     while( hItem && n--)
00360     {
00361         CRect rect;
00362
00363         // Do not meddle with selected items or drop highlighted items
00364         UINT selflag = TVIS_DROPHILITED | TVIS_SELECTED;
00365         Color_Font cf;
00366
00367         if ( !(GetItemState( hItem, selflag ) & selflag )
00368             && m_mapColorFont.Lookup( hItem, cf ))
00369         {
00370             CFont *pFontDC;
00371             CFont fontDC;
00372             LOGFONT logfont;
00373
00374             if( cf.logfont.lfFaceName[0] != '\0' )
00375             {
00376                 logfont = cf.logfont;
00377             }
00378             else
00379             {
00380                 // No font specified, so use window font
00381                 CFont *pFont = GetFont();
00382                 pFont->GetLogFont( &logfont );
00383             }
00384
00385             CString sItem = GetItemText( hItem );
00386             GetItemRect( hItem, &rect, TRUE );
00387
00388             // cover up over old font.
00389             CFont* pOldFont = memDC.SelectObject(GetFont());
00390             memDC.SetTextColor(::GetSysColor( COLOR_WINDOW ));
00391             memDC.SetBkColor( GetSysColor( COLOR_WINDOW ) );
00392             memDC.TextOut( rect.left+2, rect.top+1, sItem );
00393             memDC.SelectObject(pOldFont);
00394
00395             if( GetItemBold( hItem ) )
00396                 logfont.lfWeight = 700;
00397             fontDC.CreateFontIndirect( &logfont );
00398             pFontDC = memDC.SelectObject( &fontDC );
00399
00400             if( cf.color != (COLORREF)-1 )
00401                 memDC.SetTextColor( cf.color );
00402
00403             memDC.SetBkColor( GetSysColor( COLOR_WINDOW ) );
00404             memDC.TextOut( rect.left+2, rect.top+1, sItem );
00405
00406             memDC.SelectObject( pFontDC );
00407
00408             // fix potential resource leak - KStowell - 10-22-99.
00409             fontDC.DeleteObject();
00410         }
00411         hItem = GetNextVisibleItem( hItem );
00412     }
00413
00414
00415     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00416         rcClip.left, rcClip.top, SRCCOPY );
00417
00418     // fix potential resource leak - KStowell - 10-21-99
00419     memDC.SelectObject( pOldBitmap );
00420     memDC.DeleteDC();
00421     bitmap.DeleteObject();
00422 }

Here is the call graph for this function:

BOOL CCJTreeCtrl::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

Definition at line 267 of file CJTreeCtrl.cpp.

00268 {
00269     if( !CTreeCtrl::PreCreateWindow(cs))
00270         return FALSE;
00271
00272     cs.style |= TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS;
00273
00274     return TRUE;
00275 }

BOOL CCJTreeCtrl::SelectItems | ( | HTREEITEM | hItemFrom,
 |  | HTREEITEM | hItemTo
 | ) | [virtual]

Definition at line 522 of file CJTreeCtrl.cpp.

References m_bMultiSelect.

Referenced by OnLButtonDown().

00523 {
00524     if(m_bMultiSelect)
00525     {
00526         HTREEITEM hItem = GetRootItem();
00527
00528         // Clear selection upto the first item
00529         while ( hItem && hItem!=hItemFrom && hItem!=hItemTo )
00530         {
00531             hItem = GetNextVisibleItem( hItem );
00532             SetItemState( hItem, 0, TVIS_SELECTED );
00533         }
00534
00535         if ( !hItem )
00536             return FALSE;   // Item is not visible
00537
00538         SelectItem( hItemTo );
00539
00540         // Rearrange hItemFrom and hItemTo so that hItemFirst is at top
00541         if( hItem == hItemTo )
00542         {
00543             hItemTo = hItemFrom;
00544             hItemFrom = hItem;
00545         }
00546
00547
00548         // Go through remaining visible items
00549         BOOL bSelect = TRUE;
00550         while ( hItem )
00551         {
00552             // Select or remove selection depending on whether item
00553             // is still within the range.
00554             SetItemState( hItem, bSelect ? TVIS_SELECTED : 0, TVIS_SELECTED );
00555
00556             // Do we need to start removing items from selection
00557             if( hItem == hItemTo )
00558                 bSelect = FALSE;
00559
00560             hItem = GetNextVisibleItem( hItem );
00561         }
00562
00563         return TRUE;
00564     }
00565
00566     return FALSE;
00567 }

void CCJTreeCtrl::SetItemBold | ( | HTREEITEM | hItem,
 |  | BOOL | bBold = TRUE
 | ) | [virtual]

Definition at line 289 of file CJTreeCtrl.cpp.

00290 {
00291     SetItemState( hItem, bBold ? TVIS_BOLD: 0, TVIS_BOLD );
00292 }

void CCJTreeCtrl::SetItemColor | ( | HTREEITEM | hItem,
 |  | COLORREF | color
 | ) | [virtual]

Definition at line 294 of file CJTreeCtrl.cpp.

References CCJTreeCtrl::Color_Font::color, CCJTreeCtrl::Color_Font::logfont, and m_mapColorFont.

00295 {
00296     Color_Font cf;
00297     if( !m_mapColorFont.Lookup( hItem, cf ) )
00298         cf.logfont.lfFaceName[0] = '\0';
00299     cf.color = color;
00300     m_mapColorFont[hItem] = cf;
00301 }

void CCJTreeCtrl::SetItemFont | ( | HTREEITEM | hItem,
 |  | LOGFONT & | logfont
 | ) | [virtual]

Definition at line 280 of file CJTreeCtrl.cpp.

References CCJTreeCtrl::Color_Font::color, CCJTreeCtrl::Color_Font::logfont, and m_mapColorFont.

00281 {
00282     Color_Font cf;
00283     if( !m_mapColorFont.Lookup( hItem, cf ) )
00284         cf.color = (COLORREF)-1;
00285     cf.logfont = logfont;
00286     m_mapColorFont[hItem] = cf;
00287 }

Member Data Documentation

BOOL CCJTreeCtrl::m_bMultiSelect [protected]

Definition at line 75 of file CJTreeCtrl.h.

Referenced by CCJTreeCtrl(), ClearSelection(), EnableMultiSelect(), GetFirstSelectedItem(), GetNextSelectedItem(), GetPrevSelectedItem(), OnLButtonDown(), and SelectItems().

DWORD CCJTreeCtrl::m_dwDragStart [protected]

Definition at line 74 of file CJTreeCtrl.h.

Referenced by CCJTreeCtrl(), and OnLButtonDown().

HTREEITEM CCJTreeCtrl::m_hItemFirstSel [protected]

Definition at line 73 of file CJTreeCtrl.h.

Referenced by CCJTreeCtrl(), and OnLButtonDown().

CMap< void*, void*, Color_Font, Color_Font& > CCJTreeCtrl::m_mapColorFont [protected]

Definition at line 78 of file CJTreeCtrl.h.

Referenced by GetItemColor(), GetItemFont(), OnPaint(), SetItemColor(), and SetItemFont().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJTreeCtrl.h
  • WinCvs/CJLib/CJLibrary/CJTreeCtrl.cpp
Generated on Sat Aug 7 22:50:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJTreeCtrl::Color_Font Struct Reference

CCJTreeCtrl::Color_Font Struct Reference

#include <CJTreeCtrl.h>

Collaboration diagram for CCJTreeCtrl::Color_Font:

[legend]
List of all members.

Public Attributes

COLORREF | color
LOGFONT | logfont

Member Data Documentation

COLORREF CCJTreeCtrl::Color_Font::color

Definition at line 77 of file CJTreeCtrl.h.

Referenced by CCJTreeCtrl::GetItemColor(), CCJTreeCtrl::OnPaint(), CCJTreeCtrl::SetItemColor(), and CCJTreeCtrl::SetItemFont().

LOGFONT CCJTreeCtrl::Color_Font::logfont

Definition at line 77 of file CJTreeCtrl.h.

Referenced by CCJTreeCtrl::GetItemFont(), CCJTreeCtrl::OnPaint(), CCJTreeCtrl::SetItemColor(), and CCJTreeCtrl::SetItemFont().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/CJTreeCtrl.h
Generated on Sat Aug 7 22:50:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCJWindowPlacement Class Reference

CCJWindowPlacement Class Reference

#include <CJWindowPlacement.h>

Inheritance diagram for CCJWindowPlacement:

[legend]
Collaboration diagram for CCJWindowPlacement:

[legend]
List of all members.

Public Member Functions

CCJWindowPlacement ()
virtual | ~CCJWindowPlacement ()
virtual BOOL | LoadWindowPos (CFrameWnd *pFrameWnd, LPCTSTR lpszFormat=NULL, LPCTSTR lpszSection=NULL, LPCTSTR lpszWndPos=NULL)
virtual void | SaveWindowPos (CFrameWnd *pFrameWnd)

Private Attributes

CString | m_strFormat
CString | m_strSection
CString | m_strWndPos

Constructor & Destructor Documentation

CCJWindowPlacement::CCJWindowPlacement ( )

Definition at line 60 of file CJWindowPlacement.cpp.

References NULL.

00061 {
00062     length                  = sizeof( WINDOWPLACEMENT );
00063     flags                   = NULL;
00064     showCmd                 = SW_SHOWMAXIMIZED;
00065     ptMinPosition.x         = 0;
00066     ptMinPosition.y         = 0;
00067     ptMaxPosition.x         = 0;
00068     ptMaxPosition.y         = 0;
00069     rcNormalPosition.left   = 0;
00070     rcNormalPosition.top    = 0;
00071     rcNormalPosition.right  = 0;
00072     rcNormalPosition.bottom = 0;
00073 }

CCJWindowPlacement::~CCJWindowPlacement ( ) [virtual]

Definition at line 75 of file CJWindowPlacement.cpp.

00076 {
00077 }

Member Function Documentation

BOOL CCJWindowPlacement::LoadWindowPos | ( | CFrameWnd * | pFrameWnd,
 |  | LPCTSTR | lpszFormat = NULL,
 |  | LPCTSTR | lpszSection = NULL,
 |  | LPCTSTR | lpszWndPos = NULL
 | ) | [virtual]

Definition at line 105 of file CJWindowPlacement.cpp.

References IDS_SETTINGS, IDS_WIN_PLACEMENT, IDS_WNDPOS, m_strFormat, m_strSection, m_strWndPos, and NULL.

Referenced by CMainFrame::LoadDockState().

00106 {
00107     ASSERT_VALID( pFrameWnd ); // must be valid.
00108
00109     // load the strings for the registry.
00110     if( lpszFormat == NULL )
00111         m_strFormat.LoadString( IDS_WIN_PLACEMENT );
00112     else
00113         m_strFormat = lpszFormat;
00114
00115     if( lpszSection == NULL )
00116         m_strSection.LoadString( IDS_SETTINGS );
00117     else
00118         m_strSection = lpszSection;
00119
00120     if( lpszWndPos == NULL )
00121         m_strWndPos.LoadString( IDS_WNDPOS  );
00122     else
00123         m_strWndPos = lpszWndPos;
00124
00125     // Load the previous window placement settings.
00126     CString strBuffer = AfxGetApp()->GetProfileString( m_strSection, m_strWndPos, NULL );
00127
00128     int nRead = _stscanf( strBuffer, m_strFormat,
00129         &flags,
00130         &showCmd,
00131         &ptMinPosition.x,
00132         &ptMinPosition.y,
00133         &ptMaxPosition.x,
00134         &ptMaxPosition.y,
00135         &rcNormalPosition.left,
00136         &rcNormalPosition.top,
00137         &rcNormalPosition.right,
00138         &rcNormalPosition.bottom);
00139
00140     // Set the window position.
00141     if( nRead == 10 )
00142     {
00143         pFrameWnd->SetWindowPlacement( this );
00144         pFrameWnd->ShowWindow( showCmd );
00145         pFrameWnd->UpdateWindow();
00146         return TRUE;
00147     }
00148
00149     return FALSE;
00150 }

void CCJWindowPlacement::SaveWindowPos ( CFrameWnd * pFrameWnd ) [virtual]

Definition at line 81 of file CJWindowPlacement.cpp.

References m_strFormat, m_strSection, and m_strWndPos.

Referenced by CMainFrame::OnClose().

00082 {
00083     ASSERT_VALID( pFrameWnd ); // must be valid.
00084
00085     // Get the current window position.
00086     pFrameWnd->GetWindowPlacement( this );
00087
00088     // Save position to registry.
00089     CString strBuffer;
00090     strBuffer.Format( m_strFormat,
00091         flags,
00092         showCmd,
00093         ptMinPosition.x,
00094         ptMinPosition.y,
00095         ptMaxPosition.x,
00096         ptMaxPosition.y,
00097         rcNormalPosition.left,
00098         rcNormalPosition.top,
00099         rcNormalPosition.right,
00100         rcNormalPosition.bottom);
00101
00102     AfxGetApp()->WriteProfileString( m_strSection, m_strWndPos, strBuffer );
00103 }

Member Data Documentation

CString CCJWindowPlacement::m_strFormat [private]

Definition at line 71 of file CJWindowPlacement.h.

Referenced by LoadWindowPos(), and SaveWindowPos().

CString CCJWindowPlacement::m_strSection [private]

Definition at line 72 of file CJWindowPlacement.h.

Referenced by LoadWindowPos(), and SaveWindowPos().

CString CCJWindowPlacement::m_strWndPos [private]

Definition at line 73 of file CJWindowPlacement.h.

Referenced by LoadWindowPos(), and SaveWindowPos().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/CJWindowPlacement.h
  • WinCvs/CJLib/CJLibrary/CJWindowPlacement.cpp
Generated on Sat Aug 7 22:50:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCmdLine_MAIN Class Reference

CCmdLine_MAIN Class Reference

Command line settings property page. More...

#include <LineCmd.h>

Inheritance diagram for CCmdLine_MAIN:

[legend]
Collaboration diagram for CCmdLine_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_CMDLINE_MAIN }

Public Member Functions

CCmdLine_MAIN (const MultiFiles *mf, const char *lastcmd, bool hasPath, const char *lastpath, bool addDefault, bool addSelection, bool forceRoot, const char *cvsroot)
~CCmdLine_MAIN ()
CString | GetCmdLine () const

Public Attributes

CButton | m_selCvsrootButton
CSmartComboBox m_cvsrootCombo
CButton | m_forceRootCheck
CStatic | m_multilineEntryPlaceholder
CSmartComboBox m_folderLocCombo
CButton | m_addSelectionCheck
CButton | m_checkPathCheck
CButton | m_selFolderButton
BOOL | m_checkPath
CString | m_folderLoc
BOOL | m_addDefault
BOOL | m_addSelection
BOOL | m_forceRoot
CString | m_cvsroot

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnCheckpath ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnSelfolder ()
BN_CLICKED message handler, select folder to execute command.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable controls and setup autocomplete.
afx_msg void | OnAddSelection ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnForceroot ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnSelcvsroot ()
BN_CLICKED message handler, select CVSROOT.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf
bool m_hasSelection
CString | m_cmdLine
CMultilineEntryDlg m_multilineEntryDlg

Detailed Description

Command line settings property page.

Definition at line 52 of file LineCmd.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 66 of file LineCmd.h.
00066 { IDD = IDD_CMDLINE_MAIN };

Constructor & Destructor Documentation

CCmdLine_MAIN::CCmdLine_MAIN | ( | const MultiFiles * | mf,
 |  | const char * | lastcmd,
 |  | bool | hasPath,
 |  | const char * | lastpath,
 |  | bool | addDefault,
 |  | bool | addSelection,
 |  | bool | forceRoot,
 |  | const char * | cvsroot
 | ) |

Definition at line 130 of file LineCmd.cpp.

References gOldCvsroots, and gPrevCvsCmdDir.

00134                              : m_mf(mf), m_multilineEntryDlg(mf), CHHelpPropertyPage(CCmdLine_MAIN::IDD)
00135 {
00136     //{{AFX_DATA_INIT(CCmdLine_MAIN)
00137     m_checkPath = hasPath;
00138     m_folderLoc = lastpath;
00139     m_addDefault = addDefault;
00140     m_addSelection = addSelection;
00141     m_forceRoot = forceRoot;
00142     m_cvsroot = cvsroot;
00143     //}}AFX_DATA_INIT
00144
00145     m_cmdLine = lastcmd;
00146
00147     m_hasSelection = m_mf->NumDirs() > 0;
00148
00149     m_folderLocCombo.SetItems(&gPrevCvsCmdDir);
00150     m_cvsrootCombo.SetItems(&gOldCvsroots);
00151 }

CCmdLine_MAIN::~CCmdLine_MAIN ( )

Definition at line 153 of file LineCmd.cpp.

00154 {
00155 }

Member Function Documentation

void CCmdLine_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 157 of file LineCmd.cpp.

References DDV_CheckPathExists(), DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_ADD_DEFAULT, IDC_ADD_SELECTION, IDC_BROWSE_CVSROOT, IDC_BROWSE_PATH, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_HAS_PATH, IDC_MULTILINE_ENTRY_STATIC, IDC_PATH, m_addDefault, m_addSelection, m_addSelectionCheck, m_checkPath, m_checkPathCheck, m_cmdLine, m_cvsroot, m_cvsrootCombo, m_folderLoc, m_folderLocCombo, m_forceRoot, m_forceRootCheck, m_multilineEntryDlg, m_multilineEntryPlaceholder, m_selCvsrootButton, m_selFolderButton, and CMultilineEntryDlg::UpdateData().

00158 {
00159     CHHelpPropertyPage::DoDataExchange(pDX);
00160     //{{AFX_DATA_MAP(CCmdLine_MAIN)
00161     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00162     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00163     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00164     DDX_Control(pDX, IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryPlaceholder);
00165     DDX_Control(pDX, IDC_PATH, m_folderLocCombo);
00166     DDX_Control(pDX, IDC_ADD_SELECTION, m_addSelectionCheck);
00167     DDX_Control(pDX, IDC_HAS_PATH, m_checkPathCheck);
00168     DDX_Control(pDX, IDC_BROWSE_PATH, m_selFolderButton);
00169     DDX_Check(pDX, IDC_HAS_PATH, m_checkPath);
00170     DDX_Text(pDX, IDC_PATH, m_folderLoc);
00171     DDX_Check(pDX, IDC_ADD_DEFAULT, m_addDefault);
00172     DDX_Check(pDX, IDC_ADD_SELECTION, m_addSelection);
00173     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00174     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00175     //}}AFX_DATA_MAP
00176
00177     DDX_ComboMString(pDX, IDC_PATH, m_folderLocCombo);
00178     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00179
00180     if( m_checkPath )
00181     {
00182         DDV_MinChars(pDX, m_folderLoc, 1);
00183         DDV_CheckPathExists(pDX, IDC_PATH, m_folderLoc);
00184     }
00185
00186     if( m_forceRoot )
00187     {
00188         DDV_MinChars(pDX, m_cvsroot, 1);
00189     }
00190
00191     if( !pDX->m_bSaveAndValidate )
00192     {
00193         m_selFolderButton.EnableWindow(m_checkPath);
00194         m_selCvsrootButton.EnableWindow(m_forceRoot);
00195     }
00196
00197     m_multilineEntryDlg.UpdateData(pDX->m_bSaveAndValidate, m_cmdLine);
00198 }

Here is the call graph for this function:

CString CCmdLine_MAIN::GetCmdLine ( ) const

Get the entered command line

Returns:
The entered command line
Definition at line 306 of file LineCmd.cpp.

References m_cmdLine.

Referenced by CompatGetCommand().

00307 {
00308     return m_cmdLine;
00309 }

void CCmdLine_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 270 of file LineCmd.cpp.

References IDC_ADD_DEFAULT, IDC_ADD_SELECTION, IDC_BROWSE_CVSROOT, IDC_BROWSE_PATH, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_HAS_PATH, IDC_PATH, IDH_IDC_ADD_DEFAULT, IDH_IDC_ADD_SELECTION, IDH_IDC_BROWSE_CVSROOT, IDH_IDC_BROWSE_PATH, IDH_IDC_CVSROOT, IDH_IDC_FORCE_CVSROOT, IDH_IDC_HAS_PATH, IDH_IDC_PATH, and CHHelpSupport::SetCtrlHelpID().

00271 {
00272     SetCtrlHelpID(IDC_ADD_DEFAULT,      IDH_IDC_ADD_DEFAULT);
00273     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
00274     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
00275     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
00276     SetCtrlHelpID(IDC_HAS_PATH,         IDH_IDC_HAS_PATH);
00277     SetCtrlHelpID(IDC_ADD_SELECTION,    IDH_IDC_ADD_SELECTION);
00278     SetCtrlHelpID(IDC_PATH,             IDH_IDC_PATH);
00279     SetCtrlHelpID(IDC_BROWSE_PATH,      IDH_IDC_BROWSE_PATH);
00280 }

Here is the call graph for this function:

void CCmdLine_MAIN::OnAddSelection ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 283 of file LineCmd.cpp.

References m_addSelectionCheck, m_checkPathCheck, m_folderLocCombo, m_selFolderButton, and OnCheckpath().

Referenced by OnInitDialog().

00284 {
00285     if( m_addSelectionCheck.IsWindowEnabled() )
00286     {
00287         const BOOL enable = m_addSelectionCheck.GetCheck() ? false : true;
00288
00289         OnCheckpath();
00290
00291         m_checkPathCheck.EnableWindow(enable);
00292         m_selFolderButton.EnableWindow(enable);
00293         m_folderLocCombo.EnableWindow(enable);
00294
00295         if( enable )
00296         {
00297             OnCheckpath();
00298         }
00299     }
00300 }

Here is the call graph for this function:

void CCmdLine_MAIN::OnCheckpath ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 215 of file LineCmd.cpp.

References CStr.

Referenced by OnAddSelection(), and OnInitDialog().

00216 {
00217     const BOOL enable = m_checkPathCheck.GetCheck();
00218
00219     m_selFolderButton.EnableWindow(enable);
00220     m_folderLocCombo.EnableWindow(enable);
00221     m_addSelectionCheck.EnableWindow(!enable && m_hasSelection);
00222
00223     if( enable && m_hasSelection && m_mf )
00224     {
00225         CString strFolderLoc;
00226         m_folderLocCombo.GetWindowText(strFolderLoc);
00227
00228         if( strFolderLoc.IsEmpty() )
00229         {
00230             CStr path;
00231             if( m_mf->getdir(0, path) )
00232             {
00233                 m_folderLocCombo.SetWindowText(path.c_str());
00234             }
00235         }
00236     }
00237 }

void CCmdLine_MAIN::OnForceroot ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 312 of file LineCmd.cpp.

References m_cvsrootCombo, m_forceRootCheck, and m_selCvsrootButton.

Referenced by OnInitDialog().

00313 {
00314     const BOOL enable = m_forceRootCheck.GetCheck();
00315
00316     m_selCvsrootButton.EnableWindow(enable);
00317     m_cvsrootCombo.EnableWindow(enable);
00318 }

BOOL CCmdLine_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable controls and setup autocomplete.

Reimplemented from CHHelpPropertyPage.

Definition at line 253 of file LineCmd.cpp.

References CMultilineEntryDlg::Create(), EnableEditAutoComplete(), CSmartComboBox::GetEditCtrl(), gPrevCvsCmd, kMultilineCmdLine, m_folderLocCombo, m_multilineEntryDlg, m_multilineEntryPlaceholder, OnAddSelection(), OnCheckpath(), OnForceroot(), and CHHelpPropertyPage::OnInitDialog().

00254 {
00255     CHHelpPropertyPage::OnInitDialog();
00256
00257     // Extra initialization
00258     m_multilineEntryDlg.Create(kMultilineCmdLine, &gPrevCvsCmd, &m_multilineEntryPlaceholder, this);
00259
00260     EnableEditAutoComplete(m_folderLocCombo.GetEditCtrl());
00261
00262     OnCheckpath();
00263     OnAddSelection();
00264     OnForceroot();
00265
00266     return TRUE;  // return TRUE unless you set the focus to a control
00267                   // EXCEPTION: OCX Property Pages should return FALSE
00268 }

Here is the call graph for this function:

void CCmdLine_MAIN::OnSelcvsroot ( ) [protected]

BN_CLICKED message handler, select CVSROOT.

Definition at line 321 of file LineCmd.cpp.

References CompatGetCvsRoot(), CStr, CSmartComboBox::GetWindowText(), and m_cvsrootCombo.

00322 {
00323     CString strCvsroot;
00324     m_cvsrootCombo.GetWindowText(strCvsroot);
00325
00326     CStr cvsroot(strCvsroot);
00327     if( CompatGetCvsRoot(cvsroot) )
00328     {
00329         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00330     }
00331 }

Here is the call graph for this function:

void CCmdLine_MAIN::OnSelfolder ( ) [protected]

BN_CLICKED message handler, select folder to execute command.

Definition at line 240 of file LineCmd.cpp.

References BrowserGetDirectory(), CStr, CSmartComboBox::GetWindowText(), m_folderLocCombo, and NULL.

00241 {
00242     CString strFolderLoc;
00243     m_folderLocCombo.GetWindowText(strFolderLoc);
00244
00245     CStr folderLoc(strFolderLoc);
00246     if( BrowserGetDirectory("Select where to execute", folderLoc, IsWindow(m_hWnd) ? this : NULL) )
00247     {
00248         m_folderLocCombo.SetWindowText(folderLoc);
00249     }
00250 }

Here is the call graph for this function:

Member Data Documentation

BOOL CCmdLine_MAIN::m_addDefault

Definition at line 77 of file LineCmd.h.

Referenced by CompatGetCommand(), and DoDataExchange().

BOOL CCmdLine_MAIN::m_addSelection

Definition at line 78 of file LineCmd.h.

Referenced by CompatGetCommand(), and DoDataExchange().

CButton CCmdLine_MAIN::m_addSelectionCheck

Definition at line 72 of file LineCmd.h.

Referenced by DoDataExchange(), and OnAddSelection().

BOOL CCmdLine_MAIN::m_checkPath

Definition at line 75 of file LineCmd.h.

Referenced by CompatGetCommand(), and DoDataExchange().

CButton CCmdLine_MAIN::m_checkPathCheck

Definition at line 73 of file LineCmd.h.

Referenced by DoDataExchange(), and OnAddSelection().

CString CCmdLine_MAIN::m_cmdLine [private]

Entered command line Definition at line 109 of file LineCmd.h.

Referenced by DoDataExchange(), and GetCmdLine().

CString CCmdLine_MAIN::m_cvsroot

Definition at line 80 of file LineCmd.h.

Referenced by CompatGetCommand(), and DoDataExchange().

CSmartComboBox CCmdLine_MAIN::m_cvsrootCombo

Definition at line 68 of file LineCmd.h.

Referenced by DoDataExchange(), OnForceroot(), and OnSelcvsroot().

CString CCmdLine_MAIN::m_folderLoc

Definition at line 76 of file LineCmd.h.

Referenced by CompatGetCommand(), and DoDataExchange().

CSmartComboBox CCmdLine_MAIN::m_folderLocCombo

Definition at line 71 of file LineCmd.h.

Referenced by DoDataExchange(), OnAddSelection(), OnInitDialog(), and OnSelfolder().

BOOL CCmdLine_MAIN::m_forceRoot

Definition at line 79 of file LineCmd.h.

Referenced by CompatGetCommand(), and DoDataExchange().

CButton CCmdLine_MAIN::m_forceRootCheck

Definition at line 69 of file LineCmd.h.

Referenced by DoDataExchange(), and OnForceroot().

bool CCmdLine_MAIN::m_hasSelection [private]

Flag to indicate there is a selection in the GUI Definition at line 107 of file LineCmd.h.

const MultiFiles* CCmdLine_MAIN::m_mf [private]

Browser selection Definition at line 106 of file LineCmd.h.

CMultilineEntryDlg CCmdLine_MAIN::m_multilineEntryDlg [private]

Multiline entry child dialog Definition at line 111 of file LineCmd.h.

Referenced by DoDataExchange(), and OnInitDialog().

CStatic CCmdLine_MAIN::m_multilineEntryPlaceholder

Definition at line 70 of file LineCmd.h.

Referenced by DoDataExchange(), and OnInitDialog().

CButton CCmdLine_MAIN::m_selCvsrootButton

Definition at line 67 of file LineCmd.h.

Referenced by DoDataExchange(), and OnForceroot().

CButton CCmdLine_MAIN::m_selFolderButton

Definition at line 74 of file LineCmd.h.

Referenced by DoDataExchange(), and OnAddSelection().

The documentation for this class was generated from the following files:
  • common/LineCmd.h
  • common/LineCmd.cpp
Generated on Sat Aug 7 22:50:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCmdTarget Class Reference

UCmdTarget Class Reference

#include <umain.h>

Inheritance diagram for UCmdTarget:

[legend]
Collaboration diagram for UCmdTarget:

[legend]
List of all members.

Public Types

enum UDispatchInfo {
kUNoDispatchInfo,
kUDispatchHandled = 0x01
}

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCmdTarget (int widid)
virtual | ~UCmdTarget ()
virtual int | UDispatchMessage (int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo)
dispatch an event using the static message table.
int | GetWidID (void) const

Static Public Member Functions

const URuntimeClass * | rtUCmdTarget (void)

Protected Member Functions

virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Static Protected Attributes

const URuntimeClass | classUCmdTarget
const UMSGMAP | messageMap

Private Attributes

int m_widid

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Member Enumeration Documentation

enum UCmdTarget::UDispatchInfo

Enumeration values:
kUNoDispatchInfo
kUDispatchHandled
Definition at line 735 of file umain.h.

Referenced by UDispatchMessage().

00736     {
00737         kUNoDispatchInfo,
00738         kUDispatchHandled = 0x01
00739     } UDispatchInfo;

Constructor & Destructor Documentation

UCmdTarget::UCmdTarget ( int widid )

Definition at line 406 of file uevent.cpp.

References CAllTargets::Get(), and sAllTargets.

00406                                 : m_widid(widid)
00407 {
00408     std::map<int, UCmdTarget *>::value_type val(widid, this);
00409     sAllTargets.Get().insert(val);
00410 }

Here is the call graph for this function:

UCmdTarget::~UCmdTarget ( ) [virtual]

Definition at line 412 of file uevent.cpp.

References m_widid, and UEventRemoveWidID().

00413 {
00414     UEventRemoveWidID(m_widid);
00415 }

Here is the call graph for this function:

Member Function Documentation

const URuntimeClass * UCmdTarget::_GetBaseClass ( ) [static, protected]

Reimplemented from UObject.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 144 of file uevent.cpp.

00148 {

const UMSGMAP * UCmdTarget::GetBaseMessageMap ( ) [static, protected]

Reimplemented in UMacAppMenu, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 108 of file uevent.cpp.

00109     { return 0L; }

const UMSGMAP * UCmdTarget::GetMessageMap ( ) const [protected, virtual]

Reimplemented in UMacAppMenu, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 112 of file uevent.cpp.

References messageMap.

Referenced by UDispatchMessage().

00113     { return &UCmdTarget::messageMap; }

const URuntimeClass * UCmdTarget::GetRuntimeClass ( ) const [virtual]

Reimplemented from UObject.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 144 of file uevent.cpp.

00148 {

const UMSGMAP * UCmdTarget::GetThisMessageMap ( ) [static, protected]

Reimplemented in UMacAppMenu, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 110 of file uevent.cpp.

References messageMap.

00111     { return &UCmdTarget::messageMap; }

int UCmdTarget::GetWidID ( void ) const [inline]

Definition at line 744 of file umain.h.

Referenced by UWidget::AddPage(), UCvsGraph::CalcImageSize(), cvsgui_GetMainMenuWidget(), CvsLogParse(), UCvsFolders::DeleteAllItems(), UCvsFiles::DisableGeneric(), UEditMessage::DoDataExchange(), UPromptMessage::DoDataExchange(), UWidget::DoModal(), TBrowserFill::ExitDirectory(), TBrowserFillDummy::ExitDirectory(), UCvsFrame::FreshenFileMask(), UCvsFolders::GetItemByLocation(), TViewFill::GetListCtrl(), UWidget::HasFocus(), UCvsFiles::HideColumns(), UWidget::OnBlockHandler(), UCvsGraph::OnBtnClick(), UCvsFiles::OnCmdEditsel(), UCvsFiles::OnCmdEditseldef(), UCvsFolders::OnCmdExplore(), UCvsFiles::OnCmdExplore(), UCvsFolders::OnCmdMacrosSel(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIEditseldef(), UCvsFolders::OnCmdUIExplore(), UCvsFiles::OnCmdUIExplore(), UCvsFiles::OnCmdUIGraph(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), UCvsFiles::OnCmdUIRelease(), UCvsFiles::OnCmdUIRmv(), UCvsFiles::OnCmdUITrash(), UCvsFiles::OnCmdUIUpdate(), UWidget::OnComboAppend(), UToolbar::OnCommands(), UMenu::OnCommands(), UCvsGraph::OnCreate(), UCvsFiles::OnCreate(), UCvsFiles::OnDblClick(), TBrowserFill::OnDirectory(), UCvsGraph::OnDrawing(), UCvsConsole::OnEraseAll(), CPseudoDlg::OnInitDialog(), UWidget::OnInitTabWidget(), UWidget::OnInitWidget(), UWidget::OnListNewRow(), UCvsFiles::OnMacroSel(), UWidget::OnPageChanged(), UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), UToolbar::OnTbDropDown(), UToolbar::OnTbInit(), UCvsFolders::OnTreeExpanding(), UWidget::OnTreeInsert(), UCvsFolders::OnTreeSelecting(), UWidget::OnUnblockHandler(), UWidget::OnUpdateFocus(), UCvsFolders::OnUpdateGeneric(), UWidget::OnUpdateUI(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), UMacAppMenu::OnUpdateUI(), UCvsFolders::ProcessSelectionCommand(), UCvsFiles::ProcessSelectionCommand(), PromptEditMessage(), UCvsFolders::ResetBrowser(), UCvsFolders::ResetView(), UCvsFiles::ResetView(), UCvsFiles::Resort(), UCvsFolders::RetrievePath(), UCvsFiles::Search(), LPseudoWinAttachment::SearchWidID(), UCvsApp::SetStatusBarText(), UCvsFiles::ShowColumns(), UCvsFolders::StepToLocation(), UCvsFolders::StoreExpanded(), UEventGiveTime(), UPPMenu::UPPMenu(), UWinPseudoWindowProc(), and CPseudoDlg::~CPseudoDlg().

00744 { return m_widid; }

const URuntimeClass * UCmdTarget::rtUCmdTarget ( void ) [static]

Definition at line 144 of file uevent.cpp.

00148 {

int UCmdTarget::UDispatchMessage | ( | int | evt,
 |  | int | arg1,
 |  | void * | arg2,
 |  | UDispatchInfo & | dispatchInfo
 | ) | [virtual]

dispatch an event using the static message table.

Reimplemented in UToolbar, and UWidget.

Definition at line 323 of file uevent.cpp.

References epi_i, epi_ii, epi_iVP, epi_V, epi_VP, epV_I, epV_i, epV_ii, epV_iii, epV_iiVP, epV_IVP, epV_iVP, epV_V, epV_VP, EV_NONE, UMSGMAP_ENTRY::ext, UMSGMAP_ENTRY::ext1, UMSGMAP_ENTRY::ext2, GetMessageMap(), kUDispatchHandled, UMSGMAP::lpEntries, UMSGMAP_ENTRY::nMessage, UMSGMAP_ENTRY::nSig, UMSGMAP::pBaseMap, UMSGMAP_ENTRY::pfn, UMessageMapFunctions::pfn, UMessageMapFunctions::pfni_i, UMessageMapFunctions::pfni_ii, UMessageMapFunctions::pfni_iVP, UMessageMapFunctions::pfni_V, UMessageMapFunctions::pfni_VP, UMessageMapFunctions::pfnV_i, UMessageMapFunctions::pfnV_ii, UMessageMapFunctions::pfnV_iii, UMessageMapFunctions::pfnV_iiVP, UMessageMapFunctions::pfnV_iVP, UMessageMapFunctions::pfnV_V, UMessageMapFunctions::pfnV_VP, UAppConsole(), UDispatchInfo, UHIWORD, ULOWORD, and UMSG_RANGE.

Referenced by UWidget::UDispatchMessage(), UEventNotifyMessage(), UEventSendMessage(), and UEventSendMessageExt().

00324 {
00325     const UMSGMAP* themap;
00326     const UMSGMAP_ENTRY *entries;
00327     for(themap = GetMessageMap(); themap != 0L; themap = themap->pBaseMap)
00328     {
00329         entries = themap->lpEntries;
00330         while(entries->nMessage != EV_NONE)
00331         {
00332             if(entries->ext == UMSG_RANGE)
00333             {
00334                 int cmd = (unsigned short)ULOWORD(arg1);
00335                 if(evt == entries->nMessage &&
00336                     cmd >= entries->ext1 &&
00337                     cmd <= entries->ext2)
00338                         goto dispatch;
00339             }
00340             else if(entries->nMessage == evt)
00341                 goto dispatch;
00342             entries++;
00343         }
00344     }
00345     return 0;
00346
00347 dispatch:
00348     union UMessageMapFunctions mmf;
00349     mmf.pfn = entries->pfn;
00350     int res = 0;
00351
00352     dispatchInfo = UDispatchInfo((int)dispatchInfo | UCmdTarget::kUDispatchHandled);
00353
00354     switch(entries->nSig)
00355     {
00356     case epV_V:
00357         (this->*mmf.pfnV_V)();
00358         break;
00359     case epV_VP:
00360         (this->*mmf.pfnV_VP)(arg2);
00361         break;
00362     case epV_iVP:
00363         (this->*mmf.pfnV_iVP)(arg1, arg2);
00364         break;
00365     case epV_IVP:
00366         (this->*mmf.pfnV_iVP)(UHIWORD(arg1), arg2);
00367         break;
00368     case epV_i:
00369         (this->*mmf.pfnV_i)(arg1);
00370         break;
00371     case epV_I:
00372         (this->*mmf.pfnV_i)(UHIWORD(arg1));
00373         break;
00374     case epV_ii:
00375         (this->*mmf.pfnV_ii)(ULOWORD(arg1), UHIWORD(arg1));
00376         break;
00377     case epV_iii:
00378         (this->*mmf.pfnV_iii)(ULOWORD(arg1), UHIWORD(arg1), (int)arg2);
00379         break;
00380     case epV_iiVP:
00381         (this->*mmf.pfnV_iiVP)(ULOWORD(arg1), UHIWORD(arg1), arg2);
00382         break;
00383     case epi_ii:
00384         res = (this->*mmf.pfni_ii)(ULOWORD(arg1), UHIWORD(arg1));
00385         break;
00386     case epi_i:
00387         res = (this->*mmf.pfni_i)(arg1);
00388         break;
00389     case epi_V:
00390         res = (this->*mmf.pfni_V)();
00391         break;
00392     case epi_iVP:
00393         res = (this->*mmf.pfni_iVP)(arg1, arg2);
00394         break;
00395     case epi_VP:
00396         res = (this->*mmf.pfni_VP)(arg2);
00397         break;
00398     default:
00399         UAppConsole("Unknown event cast : %d\n", entries->nSig);
00400         break;
00401     }
00402
00403     return res;
00404 }

Here is the call graph for this function:

Member Data Documentation

const UMSGMAP_ENTRY UCmdTarget::_messageEntries [static, private]

Initial value:

{
    {EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }
}

Reimplemented in UMacAppMenu, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 116 of file uevent.cpp.

const URuntimeClass UCmdTarget::classUCmdTarget [static, protected]

int UCmdTarget::m_widid [private]

Definition at line 746 of file umain.h.

Referenced by ~UCmdTarget().

const UMSGMAP UCmdTarget::messageMap [static, protected]

Initial value:

{ 0L, &UCmdTarget::_messageEntries[0] }

Reimplemented in UMacAppMenu, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 114 of file uevent.cpp.

Referenced by GetMessageMap(), and GetThisMessageMap().

The documentation for this class was generated from the following files:
  • rf/umain.h
  • rf/uevent.cpp
Generated on Sat Aug 7 22:50:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCmdUI Class Reference

CCmdUI Class Reference

Inheritance diagram for CCmdUI:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/CJLibrary/CJToolBar.cpp
Generated on Sat Aug 7 22:50:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCmdUI Class Reference

UCmdUI Class Reference

#include <umain.h>

Collaboration diagram for UCmdUI:

[legend]
List of all members.

Public Member Functions

UCmdUI (int id)
virtual | ~UCmdUI ()
virtual void | Enable (bool bOn=true)
virtual void | Check (bool bOn=true)
virtual void | SetText (const char *title)
void | SetContinue (bool state)
bool | CanContinue (void)
virtual void | SetTooltip (const char *tooltip)

Public Attributes

int m_nID
CCmdUI * pCmdUI
void * | pNMHDR
void * | m_widget
bool m_continue

Constructor & Destructor Documentation

UCmdUI::UCmdUI ( int id ) [inline]

Definition at line 756 of file umain.h.

References m_continue, m_nID, m_widget, pCmdUI, pNMHDR, and qMacPP.

00756                    : m_nID(id)
00757 #ifdef qUnix
00758     , pCmdUI(0L)
00759 #endif
00760 #ifdef WIN32
00761     , pCmdUI(0L)
00762     , pNMHDR(0L)
00763 #endif
00764 #ifdef qMacPP
00765     , m_wrapper(0L)
00766 #endif
00767     , m_widget(0L)
00768     , m_continue(true)
00769         {}

virtual UCmdUI::~UCmdUI ( ) [inline, virtual]

Definition at line 770 of file umain.h.

00770 {}

Member Function Documentation

bool UCmdUI::CanContinue ( void ) [inline]

Definition at line 782 of file umain.h.

References m_continue.

Referenced by LMainPseudoAttachment::ExecuteSelf(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), and UMacAppMenu::OnUpdateUI().

00782 { return m_continue; }

void UCmdUI::Check ( bool bOn = true ) [virtual]

Definition at line 487 of file uevent.cpp.

References gTurnOffBroadcast, m_continue, m_nID, m_widget, pCmdUI, CPseudoToggle::SetState(), and UASSERT.

Referenced by UCvsFrame::OnCmdUIHideUnknown(), UCvsFrame::OnCmdUIIgnore(), UCvsFrame::OnCmdUIViewAdded(), UCvsFrame::OnCmdUIViewChanged(), UCvsFrame::OnCmdUIViewConflict(), UCvsFrame::OnCmdUIViewIgnored(), UCvsFrame::OnCmdUIViewMissing(), UCvsFrame::OnCmdUIViewModified(), UCvsFiles::OnCmdUIViewRecursive(), UCvsFrame::OnCmdUIViewRemoved(), UCvsFrame::OnCmdUIViewUnknown(), and PyCmdUI::SetCheck().

00488 {
00489     m_continue = false;
00490
00491 #ifdef qMacAPP
00492     if((long)m_widget <= 2L)
00493     {
00494         // this is a menu
00495         if(m_widget == 0L)
00496         {
00497             UASSERT("You need to call UCmdUI::Enable before UCmdUI::Check !\n");
00498         }
00499         else
00500         {
00501             ::EnableCheck(m_nID, m_widget == (void *)1L, bOn);
00502         }
00503     }
00504     else
00505     {
00506         TView *view = (TView *)m_widget;
00507         if(MA_MEMBER(view, TCheckBox))
00508         {
00509             ((TCheckBox *)view)->SetState(bOn, kRedraw);
00510         }
00511         else if(MA_MEMBER(view, TRadio))
00512         {
00513             ((TRadio *)view)->SetState(bOn, kRedraw);
00514         }
00515     }
00516 #endif
00517 #ifdef qMacPP
00518     if(m_wrapper != 0L)
00519     {
00520         // this is a menu
00521         *m_wrapper->outUsesMark = true;
00522         *m_wrapper->outMark = bOn ? checkMark : noMark;
00523     }
00524     else
00525     {
00526         LPane *view = (LPane *)m_widget;
00527         if(dynamic_cast<LCheckBox*>(view) != 0L ||
00528             dynamic_cast<LRadioButton*>(view) != 0L ||
00529             dynamic_cast<LCheckBoxGroupBox*>(view) != 0L ||
00530             dynamic_cast<LBevelButton*>(view) != 0L)
00531         {
00532             USemaphore policeman(gTurnOffBroadcast);
00533
00534             view->SetValue(bOn ? Button_On : Button_Off);
00535         }
00536     }
00537 #endif
00538 #ifdef WIN32
00539     if(pCmdUI != 0L)
00540     {
00541         // this is a menu
00542         pCmdUI->SetCheck(bOn ? 1 : 0);
00543     }
00544     else if(m_widget)
00545     {
00546         CWnd *wnd = (CWnd *)m_widget;
00547         if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoToggle)))
00548         {
00549             CPseudoToggle *btn = (CPseudoToggle *)wnd;
00550             btn->SetState(bOn);
00551         }
00552         else if(wnd->IsKindOf(RUNTIME_CLASS(CButton)))
00553         {
00554             CButton *btn = (CButton *)wnd;
00555             btn->SetCheck(bOn ? BST_CHECKED : BST_UNCHECKED);
00556         }
00557     }
00558 #endif
00559 #ifdef qGTK
00560     if(m_widget != 0L)
00561     {
00562         if(GTK_IS_TOGGLE_BUTTON(m_widget))
00563         {
00564             gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_widget), bOn);
00565         }
00566         else if(GTK_IS_RADIO_MENU_ITEM(m_widget))
00567         {
00568             if(bOn) {
00569                 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(m_widget), bOn);
00570             }
00571         }
00572     }
00573 #endif
00574 }

Here is the call graph for this function:

void UCmdUI::Enable ( bool bOn = true ) [virtual]

Definition at line 417 of file uevent.cpp.

References m_continue, m_nID, m_widget, and pCmdUI.

Referenced by PyCmdUI::Enable(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFrame::OnCmdUIAnytime(), UCvsFolders::OnCmdUICheckout(), UCvsFrame::OnCmdUICvsCmd(), UCvsFiles::OnCmdUIEditseldef(), UCvsConsole::OnCmdUIEraseAll(), UCvsFolders::OnCmdUIExplore(), UCvsFiles::OnCmdUIExplore(), UCvsFrame::OnCmdUIFilterMask(), UCvsFiles::OnCmdUIGraph(), UCvsFrame::OnCmdUIHideUnknown(), UCvsFrame::OnCmdUIIgnore(), UCvsFolders::OnCmdUIImport(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), UCvsFrame::OnCmdUIQuit(), UCvsFiles::OnCmdUIRelease(), UCvsFrame::OnCmdUIReload(), UCvsFiles::OnCmdUIRmv(), UCvsFrame::OnCmdUIStopcvs(), UCvsFiles::OnCmdUITrash(), UCvsFiles::OnCmdUIUpdate(), UCvsFiles::OnCmdUIUpone(), UCvsFrame::OnCmdUIViewAdded(), UCvsFrame::OnCmdUIViewChanged(), UCvsFrame::OnCmdUIViewConflict(), UCvsFrame::OnCmdUIViewIgnored(), UCvsFrame::OnCmdUIViewMissing(), UCvsFrame::OnCmdUIViewModified(), UCvsFiles::OnCmdUIViewRecursive(), UCvsFrame::OnCmdUIViewRemoved(), UCvsFrame::OnCmdUIViewUnknown(), UCvsFolders::OnUpdateGeneric(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), and UMacAppMenu::OnUpdateUI().

00418 {
00419     m_continue = false;
00420
00421 #ifdef qMacAPP
00422     if((long)m_widget <= 2L)
00423     {
00424         // this is a menu
00425         ::Enable(m_nID, bOn);
00426         m_widget = (void *)(bOn ? 1L : 2L);
00427             // see UCmdUI::Check
00428     }
00429     else
00430     {
00431         TView *view = (TView *)m_widget;
00432         if(MA_MEMBER(view, TView))
00433         {
00434             view->SetActiveState(bOn, kRedraw);
00435         }
00436     }
00437 #endif
00438 #ifdef qMacPP
00439     if(m_wrapper != 0L)
00440     {
00441         // this is a menu
00442         *m_wrapper->outEnabled = bOn;
00443     }
00444     else
00445     {
00446         LPane *view = (LPane *)m_widget;
00447         if(view != 0L)
00448         {
00449             if(bOn)
00450                 view->Enable();
00451             else
00452                 view->Disable();
00453         }
00454     }
00455 #endif
00456 #ifdef WIN32
00457     if(pCmdUI != 0L)
00458     {
00459         // this is a menu
00460         pCmdUI->Enable(bOn);
00461     }
00462     else if(m_widget)
00463     {
00464         // this something else
00465         CWnd *wid = (CWnd *)m_widget;
00466         BOOL state = bOn;
00467         if(state != wid->IsWindowEnabled())
00468             wid->EnableWindow(state);
00469     }
00470 #endif
00471 #ifdef qGTK
00472     if(pCmdUI != 0L)
00473     {
00474         // this is a menu
00475         pCmdUI->Enable(bOn);
00476     }
00477     else if(m_widget != 0L)
00478     {
00479         if(GTK_IS_WIDGET(m_widget))
00480         {
00481             gtk_widget_set_sensitive(GTK_WIDGET(m_widget), bOn);
00482         }
00483     }
00484 #endif
00485 }

void UCmdUI::SetContinue ( bool state ) [inline]

Definition at line 781 of file umain.h.

References m_continue.

00781 { m_continue = state; }

void UCmdUI::SetText ( const char * title ) [virtual]

Definition at line 576 of file uevent.cpp.

References getLabelFromContainer(), m_continue, m_nID, m_widget, pCmdUI, and stat.

Referenced by UCvsFiles::OnCmdUIEditseldef(), and PyCmdUI::SetText().

00577 {
00578     m_continue = false;
00579
00580 #ifdef qMacAPP
00581     if((long)m_widget <= 2L)
00582     {
00583         // this is a menu
00584         CStr255_AC pstr(title);
00585         SetCommandName(m_nID, pstr);
00586     }
00587     else
00588     {
00589         TCtlMgr *view = (TCtlMgr *)m_widget;
00590         if(MA_MEMBER(view, TCtlMgr))
00591         {
00592             view->SetText(CStr255_AC(title), kRedraw);
00593         }
00594     }
00595 #endif
00596 #ifdef qGTK
00597     if(m_widget != 0L)
00598     {
00599         if(GTK_IS_TOGGLE_BUTTON(m_widget))
00600         {
00601             GtkLabel *label = getLabelFromContainer(GTK_CONTAINER(m_widget));
00602             if(label != 0L)
00603                 gtk_label_set_text(label, title);
00604         }
00605     }
00606 #endif
00607 #ifdef qMacPP
00608     if(m_wrapper != 0L)
00609     {
00610         // this is a menu
00611         LStr255 pstr(title);
00612         LString::CopyPStr(pstr, m_wrapper->outName);
00613     }
00614     else
00615     {
00616         LPane *view = (LPane *)m_widget;
00617         LEditText *edit;
00618         LStaticText *stat;
00619         if((edit = dynamic_cast<LEditText*>(view)) != 0L)
00620         {
00621             edit->SetText((Ptr)title, strlen(title));
00622         }
00623         else if((stat = dynamic_cast<LStaticText*>(view)) != 0L)
00624         {
00625             stat->SetText((Ptr)title, strlen(title));
00626         }
00627     }
00628 #endif
00629 #ifdef WIN32
00630     if(pCmdUI != 0L)
00631     {
00632         // this is a menu
00633         if(title != 0L && *title != '\0')
00634             pCmdUI->SetText(title);
00635     }
00636 #endif
00637 }

Here is the call graph for this function:

void UCmdUI::SetTooltip ( const char * tooltip ) [virtual]

Definition at line 639 of file uevent.cpp.

References _countof, pNMHDR, and sTooltipHandler.

Referenced by UWidget::OnSetTooltip(), and UToolbar::OnSetTooltip().

00640 {
00641     if(tooltip == 0L)
00642         return;
00643
00644     char status[256] = {'\0'};
00645     char prompt[256] = {'\0'};
00646
00647     strcpy(status, tooltip);
00648     char *cr = strchr(status, '\n');
00649     if(cr != 0L)
00650     {
00651         strcpy(prompt, cr + 1);
00652         *cr = '\0';
00653     }
00654 #ifdef WIN32
00655 #   define _countof(array) (sizeof(array)/sizeof(array[0]))
00656     NMHDR *hdr = (NMHDR *)pNMHDR;
00657     ASSERT(hdr->code == TTN_NEEDTEXTA || hdr->code == TTN_NEEDTEXTW);
00658
00659     TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)hdr;
00660     TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)hdr;
00661 #   ifndef _UNICODE
00662     if (hdr->code == TTN_NEEDTEXTA)
00663         lstrcpyn(pTTTA->szText, prompt, _countof(pTTTA->szText));
00664     else
00665         _mbstowcsz(pTTTW->szText, prompt, _countof(pTTTW->szText));
00666 #   else
00667     if (hdr->code == TTN_NEEDTEXTA)
00668         _wcstombsz(pTTTA->szText, prompt, _countof(pTTTA->szText));
00669     else
00670         lstrcpyn(pTTTW->szText, prompt, _countof(pTTTW->szText));
00671 #   endif
00672 #endif
00673
00674     if(sTooltipHandler != 0L)
00675         sTooltipHandler(status);
00676 }

Member Data Documentation

bool UCmdUI::m_continue

Definition at line 797 of file umain.h.

Referenced by CanContinue(), Check(), Enable(), SetContinue(), SetText(), and UCmdUI().

int UCmdUI::m_nID

Definition at line 773 of file umain.h.

Referenced by Check(), Enable(), LMainPseudoAttachment::ExecuteSelf(), UCvsFrame::OnCmdUIMacroAdmin(), UCvsFiles::OnCmdUIMacroSel(), UCvsFolders::OnCmdUIMacrosSel(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), UMacAppMenu::OnUpdateUI(), PyDoCmdUI(), SetText(), and UCmdUI().

void* UCmdUI::m_widget

Definition at line 796 of file umain.h.

Referenced by Check(), Enable(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), SetText(), and UCmdUI().

class CCmdUI* UCmdUI::pCmdUI

Definition at line 790 of file umain.h.

Referenced by Check(), Enable(), SetText(), and UCmdUI().

void* UCmdUI::pNMHDR

Definition at line 791 of file umain.h.

Referenced by SetTooltip(), and UCmdUI().

The documentation for this class was generated from the following files:
  • rf/umain.h
  • rf/uevent.cpp
Generated on Sat Aug 7 22:50:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCOLOR Struct Reference

UCOLOR Struct Reference

#include <UCvsConsole.h>

Collaboration diagram for UCOLOR:

[legend]
List of all members.

Public Member Functions

UCOLOR ()
UCOLOR (char _r, char _g, char _b)

Public Attributes

unsigned char | r
unsigned char | g
unsigned char | b

Constructor & Destructor Documentation

UCOLOR::UCOLOR ( ) [inline]

Definition at line 34 of file UCvsConsole.h.

00034 {}

UCOLOR::UCOLOR | ( | char | _r,
 |  | char | _g,
 |  | char | _b
 | ) | [inline]

Definition at line 35 of file UCvsConsole.h.

References b, g, and r.

00035 : r(_r), g(_g), b(_b) {}

Member Data Documentation

unsigned char UCOLOR::b

Definition at line 39 of file UCvsConsole.h.

Referenced by UCvsConsole::FeedThisLine(), and UCOLOR().

unsigned char UCOLOR::g

Definition at line 38 of file UCvsConsole.h.

Referenced by UCvsConsole::FeedThisLine(), and UCOLOR().

unsigned char UCOLOR::r

Definition at line 37 of file UCvsConsole.h.

Referenced by UCvsConsole::FeedThisLine(), and UCOLOR().

The documentation for this struct was generated from the following file:
  • common/UCvsConsole.h
Generated on Sat Aug 7 22:50:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UColor Struct Reference

UColor Struct Reference

portable color definition More...

#include <uwidget.h>

Collaboration diagram for UColor:

[legend]
List of all members.

Public Attributes

unsigned char | r
unsigned char | g
unsigned char | b

Detailed Description

portable color definition

Definition at line 83 of file uwidget.h.

Member Data Documentation

unsigned char UColor::b

Definition at line 85 of file uwidget.h.

unsigned char UColor::g

Definition at line 85 of file uwidget.h.

unsigned char UColor::r

Definition at line 85 of file uwidget.h.

The documentation for this struct was generated from the following file:
  • rf/uwidget.h
Generated on Sat Aug 7 22:50:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CColorConsole Class Reference

CColorConsole Class Reference

#include <AppConsole.h>

Collaboration diagram for CColorConsole:

[legend]
List of all members.

Public Member Functions

CColorConsole ()
virtual | ~CColorConsole ()
CColorConsole & | operator<< (char c)
CColorConsole & | operator<< (kConsoleColor color)
CColorConsole & | operator<< (const char *str)
CColorConsole & | operator<< (int value)
CColorConsole (CWincvsView *aview)

Protected Member Functions

CWincvsView * GetView ()

Protected Attributes

CWincvsView * fView
CHARFORMAT | oldFormat

Constructor & Destructor Documentation

CColorConsole::CColorConsole ( )

Definition at line 195 of file AppConsole.cpp.

References fView, CWincvsView::GetCurFormat(), GetView(), kNormal, and oldFormat.

00196 {
00197 #ifdef WIN32
00198     fView = 0L;
00199     CWincvsView *view = GetView();
00200     if(view == 0L)
00201         return;
00202
00203     oldFormat = view->GetCurFormat();
00204 #else /* !WIN32 */
00205     *this << kNormal;
00206 #endif /* !WIN32 */
00207 }

Here is the call graph for this function:

CColorConsole::~CColorConsole ( ) [virtual]

Definition at line 221 of file AppConsole.cpp.

References kNormal.

00222 {
00223     *this << kNormal;
00224 }

CColorConsole::CColorConsole ( CWincvsView * aview )

Definition at line 210 of file AppConsole.cpp.

References fView, CWincvsView::GetCurFormat(), GetView(), and oldFormat.

00211 {
00212     fView = aview;
00213     CWincvsView *view = GetView();
00214     if(view == 0L)
00215         return;
00216
00217     oldFormat = view->GetCurFormat();
00218 }

Here is the call graph for this function:

Member Function Documentation

CWincvsView * CColorConsole::GetView ( ) [protected]

Definition at line 185 of file AppConsole.cpp.

References fView.

Referenced by CColorConsole(), and operator<<().

00186 {
00187     CWinApp* app = AfxGetApp();
00188     CWincvsView *view = fView != 0L ? fView : ((CWincvsApp *)app)->GetConsoleView();
00189     if(view && view->m_hWnd == 0L)
00190         view = 0L;
00191     return view;
00192 }

CColorConsole & CColorConsole::operator<< ( int value )

Definition at line 330 of file AppConsole.cpp.

References GetView(), kUMainConsoleID, UCvsConsole::OutColor(), and CWincvsView::OutColor().

00331 {
00332 #ifdef WIN32
00333     CWincvsView *view = GetView();
00334     if(view == 0L)
00335         return *this;
00336
00337     char tmp[20] = {'\0'};
00338     sprintf(tmp, "%d", value);
00339     view->OutColor(tmp, strlen(tmp));
00340 #endif /* WIN32 */
00341 #ifdef qMacCvsPP
00342     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00343     if(log == 0L)
00344         return *this;
00345
00346     char tmp[20] = {'\0'};
00347     sprintf(tmp, "%d", value);
00348     log->OutColor(tmp, strlen(tmp));
00349 #endif /* qMacCvsPP */
00350 #ifdef qUnix
00351     UCvsConsole *log = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00352     if(log == 0L)
00353         return *this;
00354
00355     char tmp[20] = {'\0'};
00356     sprintf(tmp, "%d", value);
00357     log->OutColor(tmp, strlen(tmp));
00358 #endif /* qUnix */
00359
00360     return *this;
00361 }

Here is the call graph for this function:

CColorConsole & CColorConsole::operator<< ( const char * str )

Definition at line 303 of file AppConsole.cpp.

References GetView(), kUMainConsoleID, UCvsConsole::OutColor(), and CWincvsView::OutColor().

00304 {
00305 #ifdef WIN32
00306     CWincvsView *view = GetView();
00307     if(view == 0L)
00308         return *this;
00309
00310     view->OutColor(str, strlen(str));
00311 #endif /* WIN32 */
00312 #ifdef qMacCvsPP
00313     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00314     if(log == 0L)
00315         return *this;
00316
00317     log->OutColor(str, strlen(str));
00318 #endif /* qMacCvsPP */
00319 #ifdef qUnix
00320     UCvsConsole *log = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00321     if(log == 0L)
00322         return *this;
00323
00324     log->OutColor(str, strlen(str));
00325 #endif /* qUnix */
00326
00327     return *this;
00328 }

Here is the call graph for this function:

CColorConsole & CColorConsole::operator<< ( kConsoleColor color )

Definition at line 253 of file AppConsole.cpp.

References GetView(), kNL, kNormal, kUMainConsoleID, oldFormat, UCvsConsole::OutColor(), and CWincvsView::OutColor().

00254 {
00255 #ifdef WIN32
00256     CWincvsView *view = GetView();
00257     if(view == 0L)
00258         return *this;
00259
00260     if(color == kNL)
00261     {
00262         char tmp[2] = {0x0a};
00263         view->OutColor(tmp, 1);
00264     }
00265     else if(color == kNormal)
00266     {
00267         oldFormat.dwMask = CFM_COLOR | CFM_BOLD | CFM_ITALIC | CFE_UNDERLINE;
00268         view->OutColor(oldFormat);
00269     }
00270     else
00271         view->OutColor(color);
00272 #endif /* WIN32 */
00273 #ifdef qMacCvsPP
00274     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00275     if(log == 0L)
00276         return *this;
00277
00278     if(color == kNL)
00279     {
00280         char tmp[1] = {0x0d};
00281         log->OutColor(tmp, 1);
00282     }
00283     else
00284         log->OutColor(color);
00285 #endif /* qMacCvsPP */
00286 #ifdef qUnix
00287     UCvsConsole *log = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00288     if(log == 0L)
00289         return *this;
00290
00291     if(color == kNL)
00292     {
00293         char tmp[1] = {0x0a};
00294         log->OutColor(tmp, 1);
00295     }
00296     else
00297         log->OutColor(color);
00298 #endif /* qUnix */
00299
00300     return *this;
00301 }

Here is the call graph for this function:

CColorConsole & CColorConsole::operator<< ( char c )

Definition at line 226 of file AppConsole.cpp.

References GetView(), kUMainConsoleID, UCvsConsole::OutColor(), and CWincvsView::OutColor().

00227 {
00228 #ifdef WIN32
00229     CWincvsView *view = GetView();
00230     if(view == 0L)
00231         return *this;
00232
00233     view->OutColor(&c, 1);
00234 #endif /* WIN32 */
00235 #ifdef qMacCvsPP
00236     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00237     if(log == 0L)
00238         return *this;
00239
00240     log->OutColor(&c, 1);
00241 #endif /* qMacCvsPP */
00242 #ifdef qUnix
00243     UCvsConsole *log = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00244     if(log == 0L)
00245         return *this;
00246
00247     log->OutColor(&c, 1);
00248 #endif /* qUnix */
00249
00250     return *this;
00251 }

Here is the call graph for this function:

Member Data Documentation

CWincvsView* CColorConsole::fView [protected]

Definition at line 70 of file AppConsole.h.

Referenced by CColorConsole(), and GetView().

CHARFORMAT CColorConsole::oldFormat [protected]

Definition at line 72 of file AppConsole.h.

Referenced by CColorConsole(), and operator<<().

The documentation for this class was generated from the following files:
  • common/AppConsole.h
  • common/AppConsole.cpp
Generated on Sat Aug 7 22:50:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CColorMenu Class Reference

CColorMenu Class Reference

Inheritance diagram for CColorMenu:

[legend]
Collaboration diagram for CColorMenu:

[legend]
List of all members.

Public Member Functions

void | AppendColorMenuItem (UINT nID, awidget *what)
virtual void | MeasureItem (LPMEASUREITEMSTRUCT lpMIS)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDIS)
CColorMenu (int width, int height)
virtual | ~CColorMenu ()

Public Attributes

int m_width
int m_height

Constructor & Destructor Documentation

CColorMenu::CColorMenu | ( | int | width,
 |  | int | height
 | ) |

Definition at line 304 of file utoolbar.cpp.

00304                                             : m_width(width), m_height(height)
00305 {
00306     VERIFY(CreatePopupMenu());
00307 }

CColorMenu::~CColorMenu ( ) [virtual]

Definition at line 309 of file utoolbar.cpp.

00310 {
00311 }

Member Function Documentation

void CColorMenu::AppendColorMenuItem | ( | UINT | nID,
 |  | awidget * | what
 | ) |

Definition at line 313 of file utoolbar.cpp.

References AppendMenu.

00314 {
00315     VERIFY(AppendMenu(MF_ENABLED | MF_OWNERDRAW, nID, (LPCTSTR)what));
00316 }

void CColorMenu::DrawItem ( LPDRAWITEMSTRUCT lpDIS ) [virtual]

Definition at line 325 of file utoolbar.cpp.

References awidget::bitmap, m_height, and m_width.

00326 {
00327     CDC* pDC = CDC::FromHandle(lpDIS->hDC);
00328     awidget *what = (awidget *)lpDIS->itemData;
00329
00330     if (!(lpDIS->itemState & ODS_SELECTED) &&
00331         (lpDIS->itemAction & ODA_SELECT))
00332     {
00333         COLORREF crHilite = ::GetSysColor(COLOR_MENU);
00334         CBrush br(crHilite);
00335         CRect r(lpDIS->rcItem);
00336         r.DeflateRect(1, 1);
00337         pDC->FrameRect(&r, &br);
00338     }
00339
00340     if (lpDIS->itemAction & ODA_DRAWENTIRE)
00341     {
00342         // Paint the color item in the color requested
00343         CRect r(lpDIS->rcItem);
00344         r.OffsetRect((r.Width() - m_width) / 2, (r.Height() - m_height) / 2);
00345         CDC memdc;
00346         memdc.CreateCompatibleDC(pDC);
00347         CBitmap bmap;
00348         VERIFY(bmap.Attach(what->bitmap));
00349         CBitmap *old = memdc.SelectObject(&bmap);
00350         pDC->BitBlt(r.left, r.top, r.Width(), r.Height(), &memdc, 0, 0, SRCCOPY);
00351         memdc.SelectObject(old);
00352         bmap.Detach();
00353         VERIFY(memdc.DeleteDC());
00354     }
00355
00356     if ((lpDIS->itemState & ODS_SELECTED) &&
00357         (lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)))
00358     {
00359         // item has been selected - hilite frame
00360         COLORREF crHilite = ::GetSysColor(COLOR_HIGHLIGHT);
00361         CBrush br(crHilite);
00362         CRect r(lpDIS->rcItem);
00363         r.DeflateRect(1, 1);
00364         pDC->FrameRect(&r, &br);
00365     }
00366 }

void CColorMenu::MeasureItem ( LPMEASUREITEMSTRUCT lpMIS ) [virtual]

Definition at line 318 of file utoolbar.cpp.

References m_height, and m_width.

00319 {
00320     // all items are of fixed size
00321     lpMIS->itemWidth = m_width + 4;
00322     lpMIS->itemHeight = m_height + 4;
00323 }

Member Data Documentation

int CColorMenu::m_height

Definition at line 301 of file utoolbar.cpp.

Referenced by DrawItem(), and MeasureItem().

int CColorMenu::m_width

Definition at line 300 of file utoolbar.cpp.

Referenced by DrawItem(), and MeasureItem().

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:50:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CColorStatic Class Reference

CColorStatic Class Reference

#include <ColorStatic.h>

Inheritance diagram for CColorStatic:

[legend]
Collaboration diagram for CColorStatic:

[legend]
List of all members.

Public Member Functions

CColorStatic ()
COLORREF | GetColor ()
void | SetColor (COLORREF color)
virtual | ~CColorStatic ()

Protected Member Functions

afx_msg void | OnPaint ()

Private Attributes

COLORREF | m_color

Constructor & Destructor Documentation

CColorStatic::CColorStatic ( )

Definition at line 38 of file ColorStatic.cpp.

References m_color.

00039 {
00040     m_color = RGB(255, 255, 255);
00041 }

CColorStatic::~CColorStatic ( ) [virtual]

Definition at line 43 of file ColorStatic.cpp.

00044 {
00045 }

Member Function Documentation

COLORREF CColorStatic::GetColor ( )

Definition at line 66 of file ColorStatic.cpp.

References m_color.

Referenced by CGraphOptDlg::GetAllColors(), and CGraphOptDlg::PromptForColor().

00067 {
00068     return m_color;
00069 }

void CColorStatic::OnPaint ( ) [protected]

Definition at line 71 of file ColorStatic.cpp.

References m_color.

00072 {
00073     CPaintDC dc(this); // device context for painting
00074
00075     CRect rect;
00076     GetClientRect(rect);
00077     dc.FillSolidRect(rect, m_color);
00078
00079     // Do not call CStatic::OnPaint() for painting messages
00080 }

void CColorStatic::SetColor ( COLORREF color )

Definition at line 57 of file ColorStatic.cpp.

Referenced by CGraphOptDlg::CGraphOptDlg(), CGraphOptDlg::OnReset(), and CGraphOptDlg::PromptForColor().

00058 {
00059     m_color = color;
00060     if( IsWindow(m_hWnd) )
00061     {
00062         RedrawWindow();
00063     }
00064 }

Member Data Documentation

COLORREF CColorStatic::m_color [private]

Definition at line 68 of file ColorStatic.h.

Referenced by CColorStatic(), GetColor(), and OnPaint().

The documentation for this class was generated from the following files:
  • WinCvs/ColorStatic.h
  • WinCvs/ColorStatic.cpp
Generated on Sat Aug 7 22:50:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CComboBox Class Reference

CComboBox Class Reference

Inheritance diagram for CComboBox:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJFlatComboBox.h
Generated on Sat Aug 7 22:50:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CComboBoxEx Class Reference

CComboBoxEx Class Reference

Inheritance diagram for CComboBoxEx:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/HistComboBoxEx.h
Generated on Sat Aug 7 22:50:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCommit_MAIN Class Reference

CCommit_MAIN Class Reference

#include <CommitDlg.h>

Inheritance diagram for CCommit_MAIN:

[legend]
Collaboration diagram for CCommit_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_COMMIT_MAIN }

Public Member Functions

CCommit_MAIN (const MultiFiles *mf, const char *logMsg)
~CCommit_MAIN ()
CString | GetLogMsg () const

Public Attributes

CStatic | m_multilineEntryPlaceholder
CButton | m_previewInfo
CSmartComboBox m_fileToDiffCombo

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls.
afx_msg void | OnDiff ()
BN_CLICKED message handler, launch external diff to preview the changes.
afx_msg void | OnSelchangeFiletodiff ()
CBN_SELCHANGE message handler, update preview file info.
afx_msg void | OnDestroy ()
WM_DESTROY message handler, release allocated memory.

Private Member Functions

virtual void | InitHelpID ()
void | UpdatePreviewInfo ()
Display preview file info.

Private Attributes

const MultiFiles * | m_mf
CString | m_logMsg
CMultilineEntryDlg m_multilineEntryDlg

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 64 of file CommitDlg.h.
00064 { IDD = IDD_COMMIT_MAIN };

Constructor & Destructor Documentation

CCommit_MAIN::CCommit_MAIN | ( | const MultiFiles * | mf,
 |  | const char * | logMsg
 | ) |

Definition at line 111 of file CommitDlg.cpp.

00112     : m_mf(mf), m_multilineEntryDlg(mf), m_fileToDiffCombo(USmartCombo::AutoDropWidth | USmartCombo::ReadOnly),
00113     CHHelpPropertyPage(CCommit_MAIN::IDD)
00114 {
00115     //{{AFX_DATA_INIT(CCommit_MAIN)
00116     m_logMsg = logMsg;
00117     //}}AFX_DATA_INIT
00118 }

CCommit_MAIN::~CCommit_MAIN ( )

Definition at line 120 of file CommitDlg.cpp.

00121 {
00122 }

Member Function Documentation

void CCommit_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 124 of file CommitDlg.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_FILETODIFF, IDC_MULTILINE_ENTRY_STATIC, IDC_PREVIEWINFO, m_fileToDiffCombo, m_logMsg, m_multilineEntryDlg, m_multilineEntryPlaceholder, m_previewInfo, and CMultilineEntryDlg::UpdateData().

00125 {
00126     CHHelpPropertyPage::DoDataExchange(pDX);
00127     //{{AFX_DATA_MAP(CCommit_MAIN)
00128     DDX_Control(pDX, IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryPlaceholder);
00129     DDX_Control(pDX, IDC_PREVIEWINFO, m_previewInfo);
00130     DDX_Control(pDX, IDC_FILETODIFF, m_fileToDiffCombo);
00131     //}}AFX_DATA_MAP
00132
00133     m_multilineEntryDlg.UpdateData(pDX->m_bSaveAndValidate, m_logMsg);
00134 }

Here is the call graph for this function:

CString CCommit_MAIN::GetLogMsg ( ) const

Get the log message

Returns:
The log message
Definition at line 268 of file CommitDlg.cpp.

References m_logMsg.

Referenced by CompatGetCommit().

00269 {
00270     return m_logMsg;
00271 }

void CCommit_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 244 of file CommitDlg.cpp.

References helpTopicIgnore, IDC_DIFF, IDC_FILETODIFF, IDC_PREVIEWINFO, IDH_IDC_DIFF, IDH_IDC_FILETODIFF, and CHHelpSupport::SetCtrlHelpID().

00245 {
00246     SetCtrlHelpID(IDC_PREVIEWINFO,  helpTopicIgnore);
00247     SetCtrlHelpID(IDC_FILETODIFF,   IDH_IDC_FILETODIFF);
00248     SetCtrlHelpID(IDC_DIFF,         IDH_IDC_DIFF);
00249 }

Here is the call graph for this function:

void CCommit_MAIN::OnDestroy ( ) [protected]

WM_DESTROY message handler, release allocated memory.

Definition at line 252 of file CommitDlg.cpp.

References m_fileToDiffCombo.

00253 {
00254     const int count = m_fileToDiffCombo.GetCount();
00255     for(int nIndex = 0; nIndex < count; nIndex++)
00256     {
00257         MultiFilesEntryIndex* entryIndex = (MultiFilesEntryIndex*)m_fileToDiffCombo.GetItemData(nIndex);
00258         delete entryIndex;
00259     }
00260
00261     CHHelpPropertyPage::OnDestroy();
00262 }

void CCommit_MAIN::OnDiff ( ) [protected]

BN_CLICKED message handler, launch external diff to preview the changes.

Definition at line 169 of file CommitDlg.cpp.

References CStr, MultiFilesEntryIndex::GetIndex(), MultiFilesEntryIndex::GetIterator(), m_fileToDiffCombo, MultiFiles::newdir(), MultiFiles::newfile(), and KoDiffHandler::OnFiles().

00170 {
00171     const int nComboIndex = m_fileToDiffCombo.GetCurSel();
00172     if( nComboIndex > CB_ERR )
00173     {
00174         MultiFilesEntryIndex* entryIndex = (MultiFilesEntryIndex*)m_fileToDiffCombo.GetItemData(nComboIndex);
00175         CStr path;
00176         CStr fileName;
00177         CStr currRev;
00178
00179         if( entryIndex && entryIndex->GetIterator()->get(entryIndex->GetIndex(), path, fileName, currRev) )
00180         {
00181             MultiFiles mf;
00182             mf.newdir(path);
00183             mf.newfile(fileName, 0, currRev);
00184
00185             KoDiffHandler handler;
00186             handler.OnFiles(&mf);
00187         }
00188     }
00189 }

Here is the call graph for this function:

BOOL CCommit_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 192 of file CommitDlg.cpp.

References MultiFiles::begin(), MultiFiles::const_iterator, CMultilineEntryDlg::Create(), UStr::empty(), MultiFiles::end(), UStr::endsWith(), gCommitLogs, IDC_DIFF, kMultilineLogMessage, m_fileToDiffCombo, m_mf, m_multilineEntryDlg, m_multilineEntryPlaceholder, CHHelpPropertyPage::OnInitDialog(), MultiFiles::TotalNumFiles(), and UpdatePreviewInfo().

00193 {
00194     CHHelpPropertyPage::OnInitDialog();
00195
00196     // Extra initialization here
00197     m_multilineEntryDlg.Create(kMultilineLogMessage, &gCommitLogs, &m_multilineEntryPlaceholder, this);
00198
00199     if( m_mf && m_mf->TotalNumFiles() )
00200     {
00201         MultiFiles::const_iterator mfi;
00202         for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
00203         {
00204             for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
00205             {
00206                 UStr path;
00207                 UStr fileName;
00208                 UStr currRev;
00209
00210                 mfi->get(nIndex, path, fileName, currRev);
00211                 if( !path.empty() && !path.endsWith(kPathDelimiter) )
00212                     path << kPathDelimiter;
00213
00214                 path << fileName;
00215
00216                 const int nComboIndex = m_fileToDiffCombo.AddString(path);
00217
00218                 MultiFilesEntryIndex* entryIndex = new MultiFilesEntryIndex(nComboIndex, mfi);
00219                 m_fileToDiffCombo.SetItemData(nComboIndex, (DWORD)entryIndex);
00220             }
00221         }
00222     }
00223
00224     if( m_fileToDiffCombo.GetCount() )
00225     {
00226         m_fileToDiffCombo.SetCurSel(0);
00227     }
00228     else
00229     {
00230         m_fileToDiffCombo.EnableWindow(FALSE);
00231         CWnd* pButton = GetDlgItem(IDC_DIFF);
00232         if( pButton )
00233         {
00234             pButton->EnableWindow(FALSE);
00235         }
00236     }
00237
00238     UpdatePreviewInfo();
00239
00240     return TRUE;  // return TRUE unless you set the focus to a control
00241                   // EXCEPTION: OCX Property Pages should return FALSE
00242 }

Here is the call graph for this function:

void CCommit_MAIN::OnSelchangeFiletodiff ( ) [protected]

CBN_SELCHANGE message handler, update preview file info.

Definition at line 163 of file CommitDlg.cpp.

References UpdatePreviewInfo().

00164 {
00165     UpdatePreviewInfo();
00166 }

Here is the call graph for this function:

void CCommit_MAIN::UpdatePreviewInfo ( ) [private]

Display preview file info.

Definition at line 145 of file CommitDlg.cpp.

Referenced by OnInitDialog(), and OnSelchangeFiletodiff().

00146 {
00147     CString strPreviewInfo;
00148     int nSelInfo = m_fileToDiffCombo.GetCurSel();
00149     if( nSelInfo < 0 || !m_fileToDiffCombo.GetCount() )
00150     {
00151         nSelInfo = 0;
00152     }
00153     else
00154     {
00155         nSelInfo++;
00156     }
00157
00158     strPreviewInfo.Format("Preview file changes (%d/%d):", nSelInfo, m_fileToDiffCombo.GetCount());
00159     m_previewInfo.SetWindowText(strPreviewInfo);
00160 }

Member Data Documentation

CSmartComboBox CCommit_MAIN::m_fileToDiffCombo

Definition at line 67 of file CommitDlg.h.

Referenced by DoDataExchange(), OnDestroy(), OnDiff(), and OnInitDialog().

CString CCommit_MAIN::m_logMsg [private]

Selected message Definition at line 91 of file CommitDlg.h.

Referenced by DoDataExchange(), and GetLogMsg().

const MultiFiles* CCommit_MAIN::m_mf [private]

Browser selection Definition at line 90 of file CommitDlg.h.

Referenced by OnInitDialog().

CMultilineEntryDlg CCommit_MAIN::m_multilineEntryDlg [private]

Multiline entry child dialog Definition at line 93 of file CommitDlg.h.

Referenced by DoDataExchange(), and OnInitDialog().

CStatic CCommit_MAIN::m_multilineEntryPlaceholder

Definition at line 65 of file CommitDlg.h.

Referenced by DoDataExchange(), and OnInitDialog().

CButton CCommit_MAIN::m_previewInfo

Definition at line 66 of file CommitDlg.h.

Referenced by DoDataExchange().

The documentation for this class was generated from the following files:
  • common/CommitDlg.h
  • common/CommitDlg.cpp
Generated on Sat Aug 7 22:50:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCommit_OPTIONS Class Reference

CCommit_OPTIONS Class Reference

#include <CommitDlg.h>

Inheritance diagram for CCommit_OPTIONS:

[legend]
Collaboration diagram for CCommit_OPTIONS:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_COMMIT_OPTIONS }

Public Member Functions

CCommit_OPTIONS (const MultiFiles *mf)
~CCommit_OPTIONS ()

Public Attributes

CSmartComboBox m_revCombo
BOOL | m_forceCommit
CString | m_rev
BOOL | m_forceRecurse
BOOL | m_forceRevision
BOOL | m_noModuleProgram
BOOL | m_noRecurse
BOOL | m_checkValidEdits

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnForcerevision ()
BN_CLICKED message handler, enable controls for force revision option.
afx_msg void | OnBrowseTag ()
BN_CLICKED message handler, display browse tag/branch dialog.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 119 of file CommitDlg.h.
00119 { IDD = IDD_COMMIT_OPTIONS };

Constructor & Destructor Documentation

CCommit_OPTIONS::CCommit_OPTIONS ( const MultiFiles * mf )

Definition at line 278 of file CommitDlg.cpp.

References gCheckValidEdits, and gRevNames.

00279     : m_mf(mf), CHHelpPropertyPage(CCommit_OPTIONS::IDD)
00280 {
00281     //{{AFX_DATA_INIT(CCommit_OPTIONS)
00282     m_forceCommit = FALSE;
00283     m_rev = _T("");
00284     m_forceRecurse = FALSE;
00285     m_forceRevision = FALSE;
00286     m_noModuleProgram = FALSE;
00287     m_noRecurse = FALSE;
00288     m_checkValidEdits = FALSE;
00289     //}}AFX_DATA_INIT
00290
00291     m_checkValidEdits = (bool)gCheckValidEdits;
00292     m_revCombo.SetItems(&gRevNames);
00293 }

CCommit_OPTIONS::~CCommit_OPTIONS ( )

Definition at line 295 of file CommitDlg.cpp.

00296 {
00297 }

Member Function Documentation

void CCommit_OPTIONS::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 299 of file CommitDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_CHECK_VALID_EDITS, IDC_FORCE_COMMIT, IDC_FORCE_RECURSE, IDC_FORCE_REVISION, IDC_NO_MODULE_PROGRAM, IDC_NORECURS, IDC_REV_TAG, m_checkValidEdits, m_forceCommit, m_forceRecurse, m_forceRevision, m_noModuleProgram, m_noRecurse, m_rev, m_revCombo, and OnForcerevision().

00300 {
00301     CHHelpPropertyPage::DoDataExchange(pDX);
00302     //{{AFX_DATA_MAP(CCommit_OPTIONS)
00303     DDX_Control(pDX, IDC_REV_TAG, m_revCombo);
00304     DDX_Check(pDX, IDC_FORCE_COMMIT, m_forceCommit);
00305     DDX_CBString(pDX, IDC_REV_TAG, m_rev);
00306     DDX_Check(pDX, IDC_FORCE_RECURSE, m_forceRecurse);
00307     DDX_Check(pDX, IDC_FORCE_REVISION, m_forceRevision);
00308     DDX_Check(pDX, IDC_NO_MODULE_PROGRAM, m_noModuleProgram);
00309     DDX_Check(pDX, IDC_NORECURS, m_noRecurse);
00310     DDX_Check(pDX, IDC_CHECK_VALID_EDITS, m_checkValidEdits);
00311     //}}AFX_DATA_MAP
00312
00313     if( m_forceRevision )
00314     {
00315         DDV_MinChars(pDX, m_rev, 1);
00316     }
00317
00318     if( !pDX->m_bSaveAndValidate )
00319     {
00320         OnForcerevision();
00321     }
00322
00323     DDX_ComboMString(pDX, IDC_REV_TAG, m_revCombo);
00324 }

Here is the call graph for this function:

void CCommit_OPTIONS::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 337 of file CommitDlg.cpp.

References IDC_BROWSE_TAG, IDC_CHECK_VALID_EDITS, IDC_FORCE_COMMIT, IDC_FORCE_RECURSE, IDC_FORCE_REVISION, IDC_NO_MODULE_PROGRAM, IDC_NORECURS, IDC_REV_TAG, IDH_IDC_BROWSE_TAG, IDH_IDC_CHECK_VALID_EDITS, IDH_IDC_FORCE_COMMIT, IDH_IDC_FORCE_RECURSE, IDH_IDC_HAS_REV, IDH_IDC_NO_MODULE_PROGRAM, IDH_IDC_NORECURS, and IDH_IDC_REV_TAG.

00338 {
00339     SetCtrlHelpID(IDC_NORECURS,             IDH_IDC_NORECURS);
00340     SetCtrlHelpID(IDC_FORCE_COMMIT,         IDH_IDC_FORCE_COMMIT);
00341     SetCtrlHelpID(IDC_FORCE_REVISION,       IDH_IDC_HAS_REV);
00342     SetCtrlHelpID(IDC_REV_TAG,              IDH_IDC_REV_TAG);
00343     SetCtrlHelpID(IDC_BROWSE_TAG,           IDH_IDC_BROWSE_TAG);
00344     SetCtrlHelpID(IDC_FORCE_RECURSE,        IDH_IDC_FORCE_RECURSE);
00345     SetCtrlHelpID(IDC_NO_MODULE_PROGRAM,    IDH_IDC_NO_MODULE_PROGRAM);
00346     SetCtrlHelpID(IDC_CHECK_VALID_EDITS,    IDH_IDC_CHECK_VALID_EDITS);
00347 }

void CCommit_OPTIONS::OnBrowseTag ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 368 of file CommitDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev, and m_revCombo.

00369 {
00370     CStr tagName;
00371     if( CompatGetTagListItem(m_mf, tagName) )
00372     {
00373         m_rev = (const char*)tagName;
00374         m_revCombo.SetWindowText(m_rev);
00375     }
00376 }

Here is the call graph for this function:

void CCommit_OPTIONS::OnForcerevision ( ) [protected]

BN_CLICKED message handler, enable controls for force revision option.

Definition at line 350 of file CommitDlg.cpp.

References IDC_BROWSE_TAG, IDC_FORCE_REVISION, and IDC_REV_TAG.

Referenced by DoDataExchange().

00351 {
00352     CButton* but = (CButton*)GetDlgItem(IDC_FORCE_REVISION);
00353
00354     CWnd* wnd = GetDlgItem(IDC_REV_TAG);
00355     if( wnd )
00356     {
00357         wnd->EnableWindow(but->GetCheck());
00358     }
00359
00360     wnd = GetDlgItem(IDC_BROWSE_TAG);
00361     if( wnd )
00362     {
00363         wnd->EnableWindow(but->GetCheck());
00364     }
00365 }

Member Data Documentation

BOOL CCommit_OPTIONS::m_checkValidEdits

Definition at line 127 of file CommitDlg.h.

Referenced by CompatGetCommit(), and DoDataExchange().

BOOL CCommit_OPTIONS::m_forceCommit

Definition at line 121 of file CommitDlg.h.

Referenced by CompatGetCommit(), and DoDataExchange().

BOOL CCommit_OPTIONS::m_forceRecurse

Definition at line 123 of file CommitDlg.h.

Referenced by CompatGetCommit(), and DoDataExchange().

BOOL CCommit_OPTIONS::m_forceRevision

Definition at line 124 of file CommitDlg.h.

Referenced by CompatGetCommit(), and DoDataExchange().

const MultiFiles* CCommit_OPTIONS::m_mf [private]

Definition at line 148 of file CommitDlg.h.

Referenced by OnBrowseTag().

BOOL CCommit_OPTIONS::m_noModuleProgram

Definition at line 125 of file CommitDlg.h.

Referenced by CompatGetCommit(), and DoDataExchange().

BOOL CCommit_OPTIONS::m_noRecurse

Definition at line 126 of file CommitDlg.h.

Referenced by CompatGetCommit(), and DoDataExchange().

CString CCommit_OPTIONS::m_rev

Definition at line 122 of file CommitDlg.h.

Referenced by CompatGetCommit(), DoDataExchange(), and OnBrowseTag().

CSmartComboBox CCommit_OPTIONS::m_revCombo

Definition at line 120 of file CommitDlg.h.

Referenced by DoDataExchange(), and OnBrowseTag().

The documentation for this class was generated from the following files:
  • common/CommitDlg.h
  • common/CommitDlg.cpp
Generated on Sat Aug 7 22:50:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CContentItems Class Reference

CContentItems Class Reference

#include <CJOutlookBar.h>

Collaboration diagram for CContentItems:

[legend]
List of all members.

Public Member Functions

CContentItems (UINT nID, CString str)
void | operator= (CContentItems &pItems)
virtual UINT | GetImageID ()
virtual CString | GetText ()

Protected Attributes

UINT | m_nImageID
CString | m_csText

Constructor & Destructor Documentation

_CJXLIB_INLINE CContentItems::CContentItems | ( | UINT | nID,
 |  | CString | str
 | ) |

Definition at line 194 of file CJOutlookBar.h.

References _CJXLIB_INLINE, m_csText, and m_nImageID.

00195     { m_nImageID = nID; m_csText = str; }

Member Function Documentation

_CJXLIB_INLINE UINT CContentItems::GetImageID ( ) [virtual]

Definition at line 200 of file CJOutlookBar.h.

References _CJXLIB_INLINE, and m_nImageID.

Referenced by CCJOutlookBar::DrawItem().

00201     { return m_nImageID; }

_CJXLIB_INLINE CString CContentItems::GetText ( ) [virtual]

Definition at line 197 of file CJOutlookBar.h.

References _CJXLIB_INLINE, and m_csText.

Referenced by CCJOutlookBar::DrawItem().

00198     { return m_csText; }

_CJXLIB_INLINE void CContentItems::operator= ( CContentItems & pItems )

Definition at line 203 of file CJOutlookBar.h.

References _CJXLIB_INLINE, m_csText, and m_nImageID.

00204     { m_nImageID = pItems.m_nImageID; m_csText = pItems.m_csText; }

Member Data Documentation

CString CContentItems::m_csText [protected]

Definition at line 96 of file CJOutlookBar.h.

Referenced by CContentItems(), GetText(), and operator=().

UINT CContentItems::m_nImageID [protected]

Definition at line 95 of file CJOutlookBar.h.

Referenced by CContentItems(), GetImageID(), and operator=().

The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJOutlookBar.h
Generated on Sat Aug 7 22:50:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CControlBar Class Reference

CControlBar Class Reference

Inheritance diagram for CControlBar:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJToolBarBase.h
Generated on Sat Aug 7 22:50:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCtrlView Class Reference

CCtrlView Class Reference

Inheritance diagram for CCtrlView:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJTabView.h
Generated on Sat Aug 7 22:50:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCustInvertTable Class Reference

CCustInvertTable Class Reference

Custom menu object. More...

Inheritance diagram for CCustInvertTable:

[legend]
Collaboration diagram for CCustInvertTable:

[legend]
List of all members.

Public Member Functions

CCustInvertTable ()
virtual | ~CCustInvertTable ()
void | Initialize ()

Protected Attributes

std::vector< char * > | m_garbage

Detailed Description

Custom menu object.

Definition at line 138 of file CustomizeMenus.cpp.

Constructor & Destructor Documentation

CCustInvertTable::CCustInvertTable ( )

Definition at line 323 of file CustomizeMenus.cpp.

References CustInvertTable::key, and sInitInvTable.

00324 {
00325     // Init the cmd table with the static MFC commands
00326     const CustInvertTable* tmp = sInitInvTable;
00327     CustInvertTable newEntry;
00328
00329     while( tmp->key != 0L )
00330     {
00331         newEntry = *tmp;
00332         push_back(newEntry);
00333         tmp++;
00334     }
00335 }

CCustInvertTable::~CCustInvertTable ( ) [virtual]

Definition at line 337 of file CustomizeMenus.cpp.

References free, and m_garbage.

00338 {
00339     std::vector<char *>::iterator i;
00340     for(i = m_garbage.begin(); i != m_garbage.end(); ++i)
00341     {
00342         free(*i);
00343     }
00344 }

Member Function Documentation

void CCustInvertTable::Initialize ( )

Get the macro inside the persistent cmd table Definition at line 349 of file CustomizeMenus.cpp.

References CustInvertTable::cmd, CMacroSet::entries, gMacrosAdmin, gMacrosSel, ID_MACRO_ADMIN, ID_MACRO_SEL, CustInvertTable::key, m_garbage, strdup(), and CustInvertTable::title.

Referenced by CustGetByKey(), and CCustomizeMenus::OnInitDialog().

00350 {
00351     if( m_garbage.size() != 0 )
00352         return;
00353
00354 #if 0 // fix me, Python
00355     vector<CMacroEntry>::const_iterator i;
00356     int cnt;
00357     CustInvertTable newEntry;
00358     for(cnt = 0, i = gMacrosAdmin.entries.begin(); i != gMacrosAdmin.entries.end(); ++i, cnt++)
00359     {
00360         newEntry.cmd = ID_MACRO_ADMIN + cnt;
00361         char *name = strdup((*i).name);
00362         m_garbage.push_back(name);
00363         newEntry.key = name;
00364         newEntry.title = name;
00365         push_back(newEntry);
00366     }
00367     for(cnt = 0, i = gMacrosSel.entries.begin(); i != gMacrosSel.entries.end(); ++i, cnt++)
00368     {
00369         newEntry.cmd = ID_MACRO_SEL + cnt;
00370         char *name = strdup((*i).name);
00371         m_garbage.push_back(name);
00372         newEntry.key = name;
00373         newEntry.title = name;
00374         push_back(newEntry);
00375     }
00376 #endif
00377 }

Here is the call graph for this function:

Member Data Documentation

std::vector<char*> CCustInvertTable::m_garbage [protected]

Definition at line 150 of file CustomizeMenus.cpp.

Referenced by Initialize(), and ~CCustInvertTable().

The documentation for this class was generated from the following file:
  • WinCvs/CustomizeMenus.cpp
Generated on Sat Aug 7 22:50:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCustomizeMenus Class Reference

CCustomizeMenus Class Reference

#include <CustomizeMenus.h>

Inheritance diagram for CCustomizeMenus:

[legend]
Collaboration diagram for CCustomizeMenus:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_CUSTOMIZE }

Public Member Functions

CCustomizeMenus (CMMenuString *fromMenu, CWnd *pParent=NULL)

Public Attributes

CListCtrl | m_menuList
CListCtrl | m_cmdsList
CButton | m_upbtn
CButton | m_removebtn
CButton | m_downbtn
CButton | m_addbtn

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnRemove ()
BN_CLICKED message handler, remove item.
afx_msg void | OnAdd ()
BN_CLICKED message handler, add item.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls.
virtual void | OnOK ()
OnOK virtual override, store the selected commands list.
afx_msg void | OnItemchangedAllcmds (NMHDR *pNMHDR, LRESULT *pResult)
LVN_ITEMCHANGED notification handler, enable buttons.
afx_msg void | OnDblclkMenulist (NMHDR *pNMHDR, LRESULT *pResult)
NM_DBLCLK notification handler, remove item.
afx_msg void | OnDblclkAllcmds (NMHDR *pNMHDR, LRESULT *pResult)
NM_DBLCLK notification handler, add item.
afx_msg void | OnItemchangedMenulist (NMHDR *pNMHDR, LRESULT *pResult)
LVN_ITEMCHANGED notification handler, enable buttons.
afx_msg void | OnDown ()
BN_CLICKED message handler, move item down.
afx_msg void | OnUp ()
BN_CLICKED message handler, move item up.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()
void | OnMove (int offset)
int | GetIcon (const CustInvertTable *entry)

Private Attributes

CMMenuString * m_Menu
CImageList | m_SmallImageList

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 59 of file CustomizeMenus.h.
00059 { IDD = IDD_CUSTOMIZE };

Constructor & Destructor Documentation

CCustomizeMenus::CCustomizeMenus | ( | CMMenuString * | fromMenu,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 383 of file CustomizeMenus.cpp.

00384     : CHHelpDialog(CCustomizeMenus::IDD, pParent), m_Menu(fromMenu)
00385 {
00386     //{{AFX_DATA_INIT(CCustomizeMenus)
00387     //}}AFX_DATA_INIT
00388 }

Member Function Documentation

void CCustomizeMenus::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 391 of file CustomizeMenus.cpp.

References CHHelpDialog::DoDataExchange(), IDC_ADD, IDC_ALLCMDS, IDC_DOWN, IDC_MENULIST, IDC_REMOVE, IDC_UP, m_addbtn, m_cmdsList, m_downbtn, m_menuList, m_removebtn, and m_upbtn.

00392 {
00393     CHHelpDialog::DoDataExchange(pDX);
00394     //{{AFX_DATA_MAP(CCustomizeMenus)
00395     DDX_Control(pDX, IDC_MENULIST, m_menuList);
00396     DDX_Control(pDX, IDC_ALLCMDS, m_cmdsList);
00397     DDX_Control(pDX, IDC_UP, m_upbtn);
00398     DDX_Control(pDX, IDC_REMOVE, m_removebtn);
00399     DDX_Control(pDX, IDC_DOWN, m_downbtn);
00400     DDX_Control(pDX, IDC_ADD, m_addbtn);
00401     //}}AFX_DATA_MAP
00402 }

Here is the call graph for this function:

int CCustomizeMenus::GetIcon ( const CustInvertTable * entry ) [private]

Get the icon for the menu item entry

Parameters:
entry Menu item entry
Returns:
Icon for the menu item entry
Definition at line 698 of file CustomizeMenus.cpp.

References CustInvertTable::cmd, ID_MACRO_ADMIN, and ID_MACRO_SEL.

Referenced by OnAdd(), OnInitDialog(), and OnMove().

00699 {
00700     if( entry->cmd == ID_SEPARATOR )
00701         return 0;
00702
00703     if( entry->cmd >= ID_MACRO_SEL && entry->cmd < (ID_MACRO_SEL + 100) )
00704         return 2;
00705
00706     if( entry->cmd >= ID_MACRO_ADMIN && entry->cmd < (ID_MACRO_ADMIN + 100) )
00707         return 2;
00708
00709     return 1;
00710 }

void CCustomizeMenus::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 578 of file CustomizeMenus.cpp.

References IDC_ADD, IDC_ALLCMDS, IDC_DOWN, IDC_MENULIST, IDC_REMOVE, IDC_UP, IDH_IDC_ADD, IDH_IDC_ALLCMDS, IDH_IDC_DOWN, IDH_IDC_MENULIST, IDH_IDC_REMOVE, IDH_IDC_UP, and CHHelpSupport::SetCtrlHelpID().

00579 {
00580     SetCtrlHelpID(IDC_ALLCMDS,  IDH_IDC_ALLCMDS);
00581     SetCtrlHelpID(IDC_MENULIST, IDH_IDC_MENULIST);
00582     SetCtrlHelpID(IDC_ADD,      IDH_IDC_ADD);
00583     SetCtrlHelpID(IDC_REMOVE,   IDH_IDC_REMOVE);
00584     SetCtrlHelpID(IDC_UP,       IDH_IDC_UP);
00585     SetCtrlHelpID(IDC_DOWN,     IDH_IDC_DOWN);
00586 }

Here is the call graph for this function:

void CCustomizeMenus::OnAdd ( ) [protected]

BN_CLICKED message handler, add item.

Definition at line 453 of file CustomizeMenus.cpp.

References CustInvertTable::cmd, GetIcon(), GetInvString(), m_cmdsList, and m_menuList.

Referenced by OnDblclkAllcmds().

00454 {
00455     const int nItem = m_cmdsList.GetNextItem(-1, LVNI_SELECTED);
00456     if( nItem == -1 )
00457         return;
00458
00459     const CustInvertTable* data = (const CustInvertTable*)m_cmdsList.GetItemData(nItem);
00460
00461     LV_ITEM lvi;
00462     lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00463     lvi.iItem = m_menuList.GetItemCount();
00464     lvi.iSubItem = 0;
00465     lvi.lParam = (DWORD)data;
00466     lvi.pszText = GetInvString(data);
00467     lvi.iImage = GetIcon(data);
00468
00469     const int newItem = m_menuList.InsertItem(&lvi);
00470     if( newItem > -1 )
00471     {
00472         m_menuList.EnsureVisible(newItem, TRUE);
00473         m_menuList.SetItemState(newItem, LVIS_SELECTED, LVIS_SELECTED);
00474     }
00475
00476     if( data->cmd != ID_SEPARATOR )
00477     {
00478         m_cmdsList.DeleteItem(nItem);
00479     }
00480 }

Here is the call graph for this function:

void CCustomizeMenus::OnDblclkAllcmds | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

NM_DBLCLK notification handler, add item.

Definition at line 607 of file CustomizeMenus.cpp.

References OnAdd().

00608 {
00609     OnAdd();
00610
00611     *pResult = 0;
00612 }

Here is the call graph for this function:

void CCustomizeMenus::OnDblclkMenulist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

NM_DBLCLK notification handler, remove item.

Definition at line 599 of file CustomizeMenus.cpp.

References OnRemove().

00600 {
00601     OnRemove();
00602
00603     *pResult = 0;
00604 }

Here is the call graph for this function:

void CCustomizeMenus::OnDown ( ) [protected]

BN_CLICKED message handler, move item down.

Definition at line 682 of file CustomizeMenus.cpp.

References OnMove().

00683 {
00684     OnMove(1);
00685 }

Here is the call graph for this function:

void CCustomizeMenus::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 713 of file CustomizeMenus.cpp.

References CHHelpSupport::ShowHelp().

00714 {
00715     ShowHelp();
00716 }

Here is the call graph for this function:

BOOL CCustomizeMenus::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls.

Reimplemented from CHHelpDialog.

Definition at line 499 of file CustomizeMenus.cpp.

References CustInvertTable::cmd, CustGetByKey(), CustMenuCompare(), GetIcon(), GetInvString(), CMMenuString::GetList(), IDR_CUSTMENUS, CCustInvertTable::Initialize(), IsInInvertList(), m_addbtn, m_cmdsList, m_downbtn, m_Menu, m_menuList, m_removebtn, m_SmallImageList, m_upbtn, NULL, CHHelpDialog::OnInitDialog(), SetListCtrlExtendedStyle(), and sInvTable.

00500 {
00501     CHHelpDialog::OnInitDialog();
00502
00503     // Extra initialization
00504     sInvTable.Initialize();
00505
00506     // Initialize the buttons
00507     m_upbtn.EnableWindow(FALSE);
00508     m_downbtn.EnableWindow(FALSE);
00509     m_addbtn.EnableWindow(FALSE);
00510     m_removebtn.EnableWindow(FALSE);
00511
00512     SetListCtrlExtendedStyle(&m_cmdsList, LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
00513     SetListCtrlExtendedStyle(&m_menuList, LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
00514
00515     m_SmallImageList.Create(IDR_CUSTMENUS, 16, 1, RGB(255, 255, 255));
00516     m_cmdsList.SetImageList(&m_SmallImageList, LVSIL_SMALL);
00517     m_menuList.SetImageList(&m_SmallImageList, LVSIL_SMALL);
00518
00519     int cnt;
00520     const std::vector<UStr> & list = m_Menu->GetList();
00521
00522     // Get the client rect of the list view control
00523     CRect rect;
00524     m_cmdsList.GetClientRect(&rect);
00525
00526     // Make the width of the column to the width of the client area minus the width of a scroll bar
00527     int nWidth = rect.right - ::GetSystemMetrics(SM_CXVSCROLL);
00528
00529     // First the left list
00530     m_cmdsList.InsertColumn(0, "Available commands", LVCFMT_LEFT, nWidth);
00531
00532     std::vector<CustInvertTable>::const_iterator table;
00533     for(cnt = 0, table = sInvTable.begin(); table != sInvTable.end(); ++table, cnt++)
00534     {
00535         const CustInvertTable& tablEntry = *table;
00536         if( table->cmd != ID_SEPARATOR && IsInInvertList(&tablEntry, list) )
00537             continue;
00538
00539         LV_ITEM lvi;
00540         lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00541         lvi.iItem = cnt;
00542         lvi.iSubItem = 0;
00543         lvi.lParam = (DWORD)&tablEntry;
00544         lvi.pszText = GetInvString(&tablEntry);
00545         lvi.iImage = GetIcon(&table[0]);
00546
00547         m_cmdsList.InsertItem(&lvi);
00548     }
00549
00550     m_cmdsList.SortItems(CustMenuCompare, 0L);
00551
00552     // Then the right one
00553     m_menuList.InsertColumn(0, "Selected commands", LVCFMT_LEFT, nWidth);
00554
00555     std::vector<UStr>::const_iterator i;
00556
00557     for(cnt = 0, i = list.begin(); i != list.end(); ++i, cnt++)
00558     {
00559         const CustInvertTable* tab = CustGetByKey(*i);
00560         if( tab == NULL )
00561             continue;
00562
00563         LV_ITEM lvi;
00564         lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00565         lvi.iItem = cnt;
00566         lvi.iSubItem = 0;
00567         lvi.lParam = (DWORD)tab;
00568         lvi.pszText = GetInvString(tab);
00569         lvi.iImage = GetIcon(tab);
00570
00571         m_menuList.InsertItem(&lvi);
00572     }
00573
00574     return TRUE;  // return TRUE unless you set the focus to a control
00575                   // EXCEPTION: OCX Property Pages should return FALSE
00576 }

Here is the call graph for this function:

void CCustomizeMenus::OnItemchangedAllcmds | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_ITEMCHANGED notification handler, enable buttons.

Definition at line 589 of file CustomizeMenus.cpp.

References m_addbtn, and m_cmdsList.

00590 {
00591     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00592
00593     *pResult = 0;
00594
00595     m_addbtn.EnableWindow(m_cmdsList.GetNextItem(-1, LVNI_SELECTED) != -1);
00596 }

void CCustomizeMenus::OnItemchangedMenulist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_ITEMCHANGED notification handler, enable buttons.

Definition at line 615 of file CustomizeMenus.cpp.

References m_downbtn, m_menuList, m_removebtn, and m_upbtn.

00616 {
00617     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00618
00619     *pResult = 0;
00620
00621     const int nItem = m_menuList.GetNextItem(-1, LVNI_SELECTED);
00622
00623     m_removebtn.EnableWindow(nItem != -1);
00624
00625     if( nItem == -1 )
00626     {
00627         m_upbtn.EnableWindow(FALSE);
00628         m_downbtn.EnableWindow(FALSE);
00629     }
00630     else if( nItem == 0 )
00631     {
00632         m_upbtn.EnableWindow(FALSE);
00633         m_downbtn.EnableWindow(m_menuList.GetItemCount() > 1 ? TRUE : FALSE);
00634     }
00635     else if( nItem == m_menuList.GetItemCount() - 1 )
00636     {
00637         m_upbtn.EnableWindow(TRUE);
00638         m_downbtn.EnableWindow(FALSE);
00639     }
00640     else
00641     {
00642         m_upbtn.EnableWindow(TRUE);
00643         m_downbtn.EnableWindow(TRUE);
00644     }
00645 }

void CCustomizeMenus::OnMove ( int offset ) [private]

Move item

Parameters:
offset Offset to move item
Definition at line 651 of file CustomizeMenus.cpp.

References GetIcon(), GetInvString(), and m_menuList.

Referenced by OnDown(), and OnUp().

00652 {
00653     const int nItem = m_menuList.GetNextItem(-1, LVNI_SELECTED);
00654     if( nItem == -1 )
00655         return;
00656
00657     const CustInvertTable* data = (const CustInvertTable*)m_menuList.GetItemData(nItem);
00658
00659     const int newPos = nItem + offset;
00660     if( newPos < 0 || newPos > m_menuList.GetItemCount() )
00661         return;
00662
00663     VERIFY(m_menuList.DeleteItem(nItem));
00664
00665     LV_ITEM lvi;
00666     lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00667     lvi.iItem = newPos;
00668     lvi.iSubItem = 0;
00669     lvi.lParam = (DWORD)data;
00670     lvi.pszText = GetInvString(data);
00671     lvi.iImage = GetIcon(data);
00672
00673     const int newItem = m_menuList.InsertItem(&lvi);
00674     if( newItem > -1 )
00675     {
00676         m_menuList.EnsureVisible(newItem, TRUE);
00677         m_menuList.SetItemState(newItem, LVIS_SELECTED, LVIS_SELECTED);
00678     }
00679 }

Here is the call graph for this function:

void CCustomizeMenus::OnOK ( ) [protected, virtual]

OnOK virtual override, store the selected commands list.

Definition at line 483 of file CustomizeMenus.cpp.

References CMMenuString::GetList(), CustInvertTable::key, m_Menu, and m_menuList.

00484 {
00485     std::vector<UStr>& list = m_Menu->GetList();
00486     list.erase(list.begin(), list.end());
00487
00488     int nItem = -1;
00489     while( (nItem = m_menuList.GetNextItem(nItem, LVNI_ALL)) != -1 )
00490     {
00491         const CustInvertTable* data = (const CustInvertTable*)m_menuList.GetItemData(nItem);
00492         list.push_back(data->key);
00493     }
00494
00495     CHHelpDialog::OnOK();
00496 }

Here is the call graph for this function:

void CCustomizeMenus::OnRemove ( ) [protected]

BN_CLICKED message handler, remove item.

Definition at line 423 of file CustomizeMenus.cpp.

References CustInvertTable::cmd, GetIcon(), and GetInvString().

Referenced by OnDblclkMenulist().

00424 {
00425     const int nItem = m_menuList.GetNextItem(-1, LVNI_SELECTED);
00426     if( nItem == -1 )
00427         return;
00428
00429     const CustInvertTable* data = (const CustInvertTable*)m_menuList.GetItemData(nItem);
00430
00431     if( data->cmd != ID_SEPARATOR )
00432     {
00433         LV_ITEM lvi;
00434         lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00435         lvi.iItem = m_cmdsList.GetItemCount();
00436         lvi.iSubItem = 0;
00437         lvi.lParam = (DWORD)data;
00438         lvi.pszText = GetInvString(data);
00439         lvi.iImage = GetIcon(data);
00440
00441         const int newItem = m_cmdsList.InsertItem(&lvi);
00442         if( newItem > -1 )
00443         {
00444             m_cmdsList.EnsureVisible(newItem, TRUE);
00445             m_cmdsList.SetItemState(newItem, LVIS_SELECTED, LVIS_SELECTED);
00446         }
00447     }
00448
00449     m_menuList.DeleteItem(nItem);
00450 }

Here is the call graph for this function:

void CCustomizeMenus::OnUp ( ) [protected]

BN_CLICKED message handler, move item up.

Definition at line 688 of file CustomizeMenus.cpp.

References OnMove().

00689 {
00690     OnMove(-1);
00691 }

Here is the call graph for this function:

Member Data Documentation

CButton CCustomizeMenus::m_addbtn

Definition at line 65 of file CustomizeMenus.h.

Referenced by DoDataExchange(), OnInitDialog(), and OnItemchangedAllcmds().

CListCtrl CCustomizeMenus::m_cmdsList

Definition at line 61 of file CustomizeMenus.h.

Referenced by DoDataExchange(), OnAdd(), OnInitDialog(), and OnItemchangedAllcmds().

CButton CCustomizeMenus::m_downbtn

Definition at line 64 of file CustomizeMenus.h.

Referenced by DoDataExchange(), OnInitDialog(), and OnItemchangedMenulist().

CMMenuString* CCustomizeMenus::m_Menu [private]

Definition at line 96 of file CustomizeMenus.h.

Referenced by OnInitDialog(), and OnOK().

CListCtrl CCustomizeMenus::m_menuList

Definition at line 60 of file CustomizeMenus.h.

Referenced by DoDataExchange(), OnAdd(), OnInitDialog(), OnItemchangedMenulist(), OnMove(), and OnOK().

CButton CCustomizeMenus::m_removebtn

Definition at line 63 of file CustomizeMenus.h.

Referenced by DoDataExchange(), OnInitDialog(), and OnItemchangedMenulist().

CImageList CCustomizeMenus::m_SmallImageList [private]

Definition at line 97 of file CustomizeMenus.h.

Referenced by OnInitDialog().

CButton CCustomizeMenus::m_upbtn

Definition at line 62 of file CustomizeMenus.h.

Referenced by DoDataExchange(), OnInitDialog(), and OnItemchangedMenulist().

The documentation for this class was generated from the following files:
  • WinCvs/CustomizeMenus.h
  • WinCvs/CustomizeMenus.cpp
Generated on Sat Aug 7 22:50:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCVSAlert_MAIN Class Reference

CCVSAlert_MAIN Class Reference

#include <CvsAlert.h>

Inheritance diagram for CCVSAlert_MAIN:

[legend]
Collaboration diagram for CCVSAlert_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_ALERT }

Public Member Functions

CCVSAlert_MAIN (const CvsAlert *pcvsAlert, const kCvsAlertButtonType defaultButton, CWnd *pParent=NULL)

Public Attributes

CEdit | m_alertMessageEdit
CEdit | m_messageDetailsEdit
CButton | m_okButton
CButton | m_cancelButton
CButton | m_otherButton
CStatic | m_iconStatic
CString | m_messageDetails
CString | m_alertMessage

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, arrange buttons.
afx_msg void | OnOtherButton ()
BN_CLICKED message handler, set the return value.
virtual void | OnOK ()
OnOK virtual override, set the return value.
virtual void | OnCancel ()
OnCancel virtual override, set the return value.

Private Member Functions

void | SetIcon ()
void | SetTitle ()
void | SetMessages ()
void | Resize ()
void | SetButtonTitles ()
void | SetAccelerators ()
void | SetDefaultButton ()

Static Private Member Functions

void | SetButtonAccelerator (CButton &button)
CSize | GetWndTextExtent (CWnd *wnd, const char *text)
CSize | CalcWndTextSize (CWnd *wnd, const char *text, const int width)

Private Attributes

const CvsAlert * | m_pcvsAlert
kCvsAlertButtonType m_defaultButton
CFont | m_alertMessageFont

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 125 of file CvsAlert.h.
00125 { IDD = IDD_ALERT };

Constructor & Destructor Documentation

CCVSAlert_MAIN::CCVSAlert_MAIN | ( | const CvsAlert * | pcvsAlert,
 |  | const kCvsAlertButtonType | defaultButton,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 346 of file CvsAlert.cpp.

References m_alertMessage, m_defaultButton, and m_messageDetails.

00347     : m_pcvsAlert(pcvsAlert), CDialog(CCVSAlert_MAIN::IDD, pParent)
00348 {
00349     //{{AFX_DATA_INIT(CCVSAlert_MAIN)
00350     m_messageDetails = "";
00351     m_alertMessage = "";
00352     //}}AFX_DATA_INIT
00353
00354     m_defaultButton = defaultButton;
00355 }

Member Function Documentation

CSize CCVSAlert_MAIN::CalcWndTextSize | ( | CWnd * | wnd,
 |  | const char * | text,
 |  | const int | width
 | ) | [static, private]

Calculate the window text size

Parameters:
wnd | Window
text | Text
width | The width of the window rectangle
Returns:
The window text size as CSize
Note:
Current window font is taken into account
Definition at line 517 of file CvsAlert.cpp.

References NULL.

Referenced by Resize().

00518 {
00519     CSize res(0, 0);
00520
00521     CDC* pDC = wnd->GetDC();
00522     ASSERT(pDC != NULL); // Invalid device context
00523
00524     if( pDC )
00525     {
00526         CFont* pOldFond = pDC->SelectObject(wnd->GetFont());
00527         CRect rect;
00528
00529         wnd->GetClientRect(rect);
00530         rect.right += width - rect.Width();
00531
00532         pDC->DrawText(text, -1, rect, DT_CALCRECT | DT_EXPANDTABS | DT_NOPREFIX | DT_WORDBREAK);
00533         res = rect.Size();
00534
00535         if( pOldFond )
00536         {
00537             pDC->SelectObject(pOldFond);
00538         }
00539     }
00540
00541     return res;
00542 }

void CCVSAlert_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 358 of file CvsAlert.cpp.

References IDC_ALERT_MESSAGE, IDC_ICON_STATIC, IDC_MESSAGE_DETAILS, IDC_OTHER_BUTTON, m_alertMessage, m_alertMessageEdit, m_cancelButton, m_iconStatic, m_messageDetails, m_messageDetailsEdit, m_okButton, and m_otherButton.

00359 {
00360     CDialog::DoDataExchange(pDX);
00361     //{{AFX_DATA_MAP(CCVSAlert_MAIN)
00362     DDX_Control(pDX, IDC_ALERT_MESSAGE, m_alertMessageEdit);
00363     DDX_Control(pDX, IDC_MESSAGE_DETAILS, m_messageDetailsEdit);
00364     DDX_Control(pDX, IDOK, m_okButton);
00365     DDX_Control(pDX, IDCANCEL, m_cancelButton);
00366     DDX_Control(pDX, IDC_OTHER_BUTTON, m_otherButton);
00367     DDX_Control(pDX, IDC_ICON_STATIC, m_iconStatic);
00368     DDX_Text(pDX, IDC_MESSAGE_DETAILS, m_messageDetails);
00369     DDX_Text(pDX, IDC_ALERT_MESSAGE, m_alertMessage);
00370     //}}AFX_DATA_MAP
00371 }

CSize CCVSAlert_MAIN::GetWndTextExtent | ( | CWnd * | wnd,
 |  | const char * | text
 | ) | [static, private]

Get the window text extent

Parameters:
wnd | Window
text | Text
Returns:
The window text extent as CSize
Note:
Current window font and fonts metrics are taken into account
Definition at line 484 of file CvsAlert.cpp.

References NULL.

Referenced by Resize().

00485 {
00486     CSize res(0, 0);
00487
00488     CDC* pDC = wnd->GetDC();
00489     ASSERT(pDC != NULL); // Invalid device context
00490
00491     if( pDC )
00492     {
00493         CFont* pOldFond = pDC->SelectObject(wnd->GetFont());
00494         TEXTMETRIC textMetric = { 0 };
00495
00496         pDC->GetTextMetrics(&textMetric);
00497         res = pDC->GetTextExtent(text);
00498         res.cx += textMetric.tmOverhang;
00499
00500         if( pOldFond )
00501         {
00502             pDC->SelectObject(pOldFond);
00503         }
00504     }
00505
00506     return res;
00507 }

void CCVSAlert_MAIN::OnCancel ( ) [protected, virtual]

OnCancel virtual override, set the return value.

Definition at line 751 of file CvsAlert.cpp.

References kCvsAlertCancelButton.

00752 {
00753     CDialog::OnCancel();
00754
00755     EndDialog(kCvsAlertCancelButton);
00756 }

BOOL CCVSAlert_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, arrange buttons.

Definition at line 383 of file CvsAlert.cpp.

References NULL, and SetIcon().

00384 {
00385     CDialog::OnInitDialog();
00386
00387     // Extra initialization
00388     ASSERT(m_pcvsAlert != NULL); // No alert info class
00389
00390     if( m_pcvsAlert )
00391     {
00392         SetIcon();
00393         SetTitle();
00394         SetMessages();
00395         Resize();
00396         SetButtonTitles();
00397         SetAccelerators();
00398         SetDefaultButton();
00399
00400         UpdateData(FALSE);
00401     }
00402
00403     return TRUE;  // return TRUE unless you set the focus to a control
00404     // EXCEPTION: OCX Property Pages should return FALSE
00405 }

Here is the call graph for this function:

void CCVSAlert_MAIN::OnOK ( ) [protected, virtual]

OnOK virtual override, set the return value.

Definition at line 743 of file CvsAlert.cpp.

References kCvsAlertOKButton.

00744 {
00745     CDialog::OnOK();
00746
00747     EndDialog(kCvsAlertOKButton);
00748 }

void CCVSAlert_MAIN::OnOtherButton ( ) [protected]

BN_CLICKED message handler, set the return value.

Definition at line 759 of file CvsAlert.cpp.

References kCvsAlertOtherButton.

00760 {
00761     EndDialog(kCvsAlertOtherButton);
00762 }

void CCVSAlert_MAIN::Resize ( ) [private]

Resize the dialog to fit the alert message if necessary Definition at line 547 of file CvsAlert.cpp.

References CalcWndTextSize(), CvsAlert::GetMessage(), CvsAlert::GetMessageDetails(), GetWndTextExtent(), m_alertMessageEdit, m_cancelButton, m_messageDetailsEdit, m_okButton, m_otherButton, m_pcvsAlert, and NULL.

00548 {
00549     int horizAdj = 0;
00550     int vertAdj = 0;
00551
00552     // Calculate adjustments
00553     {
00554         // Horizontal
00555         const CSize alertSize = GetWndTextExtent(&m_alertMessageEdit, m_pcvsAlert->GetMessage().c_str());
00556
00557         CRect alertWndRect;
00558         m_alertMessageEdit.GetWindowRect(alertWndRect);
00559
00560         if( alertSize.cx > alertWndRect.Width() )
00561         {
00562             horizAdj = alertSize.cx - alertWndRect.Width();
00563         }
00564
00565         // Vertical
00566         CRect messageDetailsWndRect;
00567         m_messageDetailsEdit.GetClientRect(messageDetailsWndRect);
00568
00569         if( !m_pcvsAlert->GetMessageDetails().empty() )
00570         {
00571             const CSize messageDetailsSize = CalcWndTextSize(&m_messageDetailsEdit,
00572                 m_pcvsAlert->GetMessageDetails().c_str(),
00573                 messageDetailsWndRect.Width() + horizAdj);
00574
00575             if( messageDetailsSize.cy > messageDetailsWndRect.Height() )
00576             {
00577                 vertAdj = messageDetailsSize.cy - messageDetailsWndRect.Height();
00578             }
00579         }
00580         else
00581         {
00582             // Reducing message details to zero and moving all controls up
00583             vertAdj -= messageDetailsWndRect.Height();
00584         }
00585     }
00586
00587     // Resize dialog and controls
00588     CRect rect;
00589
00590     // Resize the alert message
00591     m_alertMessageEdit.GetWindowRect(rect);
00592     m_alertMessageEdit.SetWindowPos(NULL, 0, 0, rect.Width() + horizAdj, rect.Height(), SWP_NOMOVE | SWP_NOZORDER);
00593
00594     // Resize the message details
00595     m_messageDetailsEdit.GetWindowRect(rect);
00596     m_messageDetailsEdit.SetWindowPos(NULL, 0, 0, rect.Width() + horizAdj, rect.Height() + vertAdj, SWP_NOMOVE | SWP_NOZORDER);
00597
00598     // Resize the dialog
00599     GetWindowRect(rect);
00600     SetWindowPos(NULL, 0, 0, rect.Width() + horizAdj, rect.Height() + vertAdj, SWP_NOMOVE | SWP_NOZORDER);
00601
00602     // Move the OK button
00603     m_okButton.GetWindowRect(rect);
00604     ScreenToClient(rect);
00605     m_okButton.SetWindowPos(NULL, rect.left + horizAdj, rect.top + vertAdj, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
00606
00607     // Move the Other button
00608     m_otherButton.GetWindowRect(rect);
00609     ScreenToClient(rect);
00610     m_otherButton.SetWindowPos(NULL, rect.left + horizAdj, rect.top + vertAdj, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
00611
00612     // Move the Cancel button
00613     m_cancelButton.GetWindowRect(rect);
00614     ScreenToClient(rect);
00615     m_cancelButton.SetWindowPos(NULL, rect.left + horizAdj, rect.top + vertAdj, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
00616 }

Here is the call graph for this function:

void CCVSAlert_MAIN::SetAccelerators ( ) [private]

Set the accelerators Definition at line 672 of file CvsAlert.cpp.

References m_cancelButton, m_okButton, m_otherButton, and SetButtonAccelerator().

00673 {
00674     SetButtonAccelerator(m_okButton);
00675     SetButtonAccelerator(m_otherButton);
00676     SetButtonAccelerator(m_cancelButton);
00677 }

Here is the call graph for this function:

void CCVSAlert_MAIN::SetButtonAccelerator ( CButton & button ) [static, private]

Set the button accelerator

Parameters:
button Button to set the accelerator for
Definition at line 730 of file CvsAlert.cpp.

References BUTTONTITLE_CANCEL, and BUTTONTITLE_OK.

Referenced by SetAccelerators().

00731 {
00732     CString buttonTitle;
00733     button.GetWindowText(buttonTitle);
00734
00735     if( buttonTitle.CompareNoCase(BUTTONTITLE_OK) && buttonTitle.CompareNoCase(BUTTONTITLE_CANCEL) )
00736     {
00737         buttonTitle = "&" + buttonTitle;
00738         button.SetWindowText(buttonTitle);
00739     }
00740 }

void CCVSAlert_MAIN::SetButtonTitles ( ) [private]

Set the buttons titles and layout Definition at line 621 of file CvsAlert.cpp.

References CvsAlert::GetButtonTitle(), kCvsAlertCancelButton, kCvsAlertOKButton, kCvsAlertOtherButton, m_cancelButton, m_okButton, m_otherButton, and m_pcvsAlert.

00622 {
00623     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertOKButton).empty() )
00624     {
00625         m_okButton.SetWindowText(m_pcvsAlert->GetButtonTitle(kCvsAlertOKButton).c_str());
00626     }
00627
00628     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertCancelButton).empty() )
00629     {
00630         m_cancelButton.SetWindowText(m_pcvsAlert->GetButtonTitle(kCvsAlertCancelButton).c_str());
00631     }
00632     else
00633     {
00634         // Hide the Cancel button (but keep it enabled so OnCancel can be called)
00635         //m_cancelButton.EnableWindow(FALSE);
00636         m_cancelButton.ShowWindow(SW_HIDE);
00637
00638         CRect rect;
00639
00640         // Move the Other button to fill in the gap
00641         m_cancelButton.GetWindowRect(rect);
00642         ScreenToClient(rect);
00643         m_otherButton.MoveWindow(rect);
00644
00645         // Move the OK button to fill in the gap
00646         m_otherButton.GetWindowRect(rect);
00647         ScreenToClient(rect);
00648         m_okButton.MoveWindow(rect);
00649     }
00650
00651     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertOtherButton).empty() )
00652     {
00653         m_otherButton.SetWindowText(m_pcvsAlert->GetButtonTitle(kCvsAlertOtherButton).c_str());
00654     }
00655     else
00656     {
00657         // Hide the extra button
00658         m_otherButton.EnableWindow(FALSE);
00659         m_otherButton.ShowWindow(SW_HIDE);
00660
00661         // Move the OK button to fill in the gap
00662         CRect rect;
00663         m_otherButton.GetWindowRect(rect);
00664         ScreenToClient(rect);
00665         m_okButton.MoveWindow(rect);
00666     }
00667 }

Here is the call graph for this function:

void CCVSAlert_MAIN::SetDefaultButton ( ) [private]

Set the default and initially focused button Definition at line 682 of file CvsAlert.cpp.

References kCvsAlertCancelButton, kCvsAlertOKButton, kCvsAlertOtherButton, m_cancelButton, m_defaultButton, m_okButton, m_otherButton, and NULL.

00683 {
00684     UINT defID = 0;
00685     HWND defHwnd = NULL;
00686
00687     switch( m_defaultButton )
00688     {
00689     case kCvsAlertOKButton:
00690         if( m_okButton.IsWindowEnabled() )
00691         {
00692             defID = m_okButton.GetDlgCtrlID();
00693             defHwnd = m_okButton.GetSafeHwnd();
00694         }
00695         break;
00696     case kCvsAlertCancelButton:
00697         if( m_cancelButton.IsWindowEnabled() )
00698         {
00699             defID = m_cancelButton.GetDlgCtrlID();
00700             defHwnd = m_cancelButton.GetSafeHwnd();
00701         }
00702         break;
00703     case kCvsAlertOtherButton:
00704         if( m_otherButton.IsWindowEnabled() )
00705         {
00706             defID = m_otherButton.GetDlgCtrlID();
00707             defHwnd = m_otherButton.GetSafeHwnd();
00708         }
00709         break;
00710     default:
00711         ASSERT(FALSE); // Incorrect button type
00712         break;
00713     }
00714
00715     if( defID )
00716     {
00717         SetDefID(defID);
00718     }
00719
00720     if( defHwnd )
00721     {
00722         PostMessage(WM_NEXTDLGCTL, (WPARAM)defHwnd, (LPARAM)TRUE);
00723     }
00724 }

void CCVSAlert_MAIN::SetIcon ( ) [private]

Set the icon Definition at line 410 of file CvsAlert.cpp.

References CvsAlert::GetIcon(), IDI_MB_EXCLAMATION, IDI_MB_INFORMATION, IDI_MB_QUESTION, IDI_MB_STOP, kCvsAlertNoteIcon, kCvsAlertQuestionIcon, kCvsAlertStopIcon, kCvsAlertWarningIcon, m_iconStatic, m_pcvsAlert, and NULL.

00411 {
00412     ASSERT(m_pcvsAlert != NULL); // Bad pointer
00413
00414     switch( m_pcvsAlert->GetIcon() )
00415     {
00416     case kCvsAlertStopIcon:
00417         m_iconStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MB_STOP));
00418         break;
00419     case kCvsAlertNoteIcon:
00420         m_iconStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MB_INFORMATION));
00421         break;
00422     default:
00423         // Fall thru
00424     case kCvsAlertWarningIcon:
00425         m_iconStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MB_EXCLAMATION));
00426         break;
00427     case kCvsAlertQuestionIcon:
00428         m_iconStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MB_QUESTION));
00429         break;
00430     }
00431 }

Here is the call graph for this function:

void CCVSAlert_MAIN::SetMessages ( ) [private]

Set the message and message details Definition at line 447 of file CvsAlert.cpp.

References CvsAlert::GetMessage(), CvsAlert::GetMessageDetails(), m_alertMessage, m_alertMessageEdit, m_alertMessageFont, m_messageDetails, m_messageDetailsEdit, and m_pcvsAlert.

00448 {
00449     // Change the font to Bold for alert message control
00450     CFont* pFont = m_alertMessageEdit.GetFont();
00451     LOGFONT logFont = { 0 };
00452
00453     pFont->GetLogFont(&logFont);
00454     logFont.lfWeight = FW_BOLD;
00455     m_alertMessageFont.CreateFontIndirect(&logFont);
00456
00457     m_alertMessageEdit.SetFont(&m_alertMessageFont);
00458
00459     // Set messages
00460     m_alertMessage = m_pcvsAlert->GetMessage().c_str();
00461
00462     if( !m_pcvsAlert->GetMessageDetails().empty() )
00463     {
00464         m_messageDetails += m_pcvsAlert->GetMessageDetails().c_str();
00465     }
00466     else
00467     {
00468         m_messageDetailsEdit.EnableWindow(FALSE);
00469         m_messageDetailsEdit.ShowWindow(SW_HIDE);
00470     }
00471
00472     // Fix the newline characters
00473     m_alertMessage.Replace("\n", "\r\n");
00474     m_messageDetails.Replace("\n", "\r\n");
00475 }

Here is the call graph for this function:

void CCVSAlert_MAIN::SetTitle ( ) [private]

Set dialog title Definition at line 436 of file CvsAlert.cpp.

References CvsAlert::GetAlertTitle(), and m_pcvsAlert.

00437 {
00438     if( !m_pcvsAlert->GetAlertTitle().empty() )
00439     {
00440         SetWindowText(m_pcvsAlert->GetAlertTitle().c_str());
00441     }
00442 }

Here is the call graph for this function:

Member Data Documentation

CString CCVSAlert_MAIN::m_alertMessage

Definition at line 133 of file CvsAlert.h.

Referenced by CCVSAlert_MAIN(), DoDataExchange(), and SetMessages().

CEdit CCVSAlert_MAIN::m_alertMessageEdit

Definition at line 126 of file CvsAlert.h.

Referenced by DoDataExchange(), Resize(), and SetMessages().

CFont CCVSAlert_MAIN::m_alertMessageFont [private]

Alert message font Definition at line 159 of file CvsAlert.h.

Referenced by SetMessages().

CButton CCVSAlert_MAIN::m_cancelButton

Definition at line 129 of file CvsAlert.h.

Referenced by DoDataExchange(), Resize(), SetAccelerators(), SetButtonTitles(), and SetDefaultButton().

kCvsAlertButtonType CCVSAlert_MAIN::m_defaultButton [private]

Default button Definition at line 157 of file CvsAlert.h.

Referenced by CCVSAlert_MAIN(), and SetDefaultButton().

CStatic CCVSAlert_MAIN::m_iconStatic

Definition at line 131 of file CvsAlert.h.

Referenced by DoDataExchange(), and SetIcon().

CString CCVSAlert_MAIN::m_messageDetails

Definition at line 132 of file CvsAlert.h.

Referenced by CCVSAlert_MAIN(), DoDataExchange(), and SetMessages().

CEdit CCVSAlert_MAIN::m_messageDetailsEdit

Definition at line 127 of file CvsAlert.h.

Referenced by DoDataExchange(), Resize(), and SetMessages().

CButton CCVSAlert_MAIN::m_okButton

Definition at line 128 of file CvsAlert.h.

Referenced by DoDataExchange(), Resize(), SetAccelerators(), SetButtonTitles(), and SetDefaultButton().

CButton CCVSAlert_MAIN::m_otherButton

Definition at line 130 of file CvsAlert.h.

Referenced by DoDataExchange(), Resize(), SetAccelerators(), SetButtonTitles(), and SetDefaultButton().

const CvsAlert* CCVSAlert_MAIN::m_pcvsAlert [private]

Alert data Definition at line 156 of file CvsAlert.h.

Referenced by Resize(), SetButtonTitles(), SetIcon(), SetMessages(), and SetTitle().

The documentation for this class was generated from the following files:
  • common/CvsAlert.h
  • common/CvsAlert.cpp
Generated on Sat Aug 7 22:50:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsApp Class Reference

UCvsApp Class Reference

#include <UCvsApp.h>

Inheritance diagram for UCvsApp:

[legend]
Collaboration diagram for UCvsApp:

[legend]
List of all members.

Public Types

enum | { kProcessTimer = EV_COMMAND_START }

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsApp (int argc, char **argv)
virtual | ~UCvsApp ()
void | SayWelcome (void)
void | SetCvsProcess (CvsProcess *proc)
CvsProcess * | GetCvsProcess (void)
void | SetCvsRunning (bool state)
bool | IsCvsRunning (void)
void | SetCvsStopping (bool state)
bool | IsCvsStopping (void)
void | SetStatusBarText (const char *)
UCvsStatusbar * | GetStatusBar (void)
UCvsFolders * | GetBrowserView (void)
UCvsFiles * | GetFilesView (void)
UCvsConsole * | GetConsole (void)
const char * | GetAppName (void) const
const char * | GetAppLibFolder (void) const
const char * | GetAppVersion (void) const
void | Execute (int argc, char *const *argv)
void | PeekPumpAndIdle (bool)
KiFilterModel * | GetFilterModel () const
KiRecursionModel * | GetRecursionModel () const
KiIgnoreModel * | GetIgnoreModel () const
UCvsFrame * | GetMainFrame (void)
void | StartScriptEngine (const bool forceReload=false)
void | StopScriptEngine ()
void | RestartScriptEngine ()

Static Public Member Functions

const URuntimeClass * | rtUCvsApp (void)

Static Public Attributes

UCvsApp * | gApp = 0L

Protected Member Functions

void | OnMainTimer (long time)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

UCvsFrame * m_mainFrame
bool gCvsRunning
bool gCvsStopping
bool m_hasTCL
bool m_hasPY

Static Protected Attributes

const URuntimeClass | classUCvsApp
CvsProcess * | gCvsProcess = 0L
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UCvsApp ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Member Enumeration Documentation

anonymous enum

Enumeration values:
kProcessTimer
Definition at line 108 of file UCvsApp.h.
00109     {
00110         kProcessTimer = EV_COMMAND_START
00111     };

Constructor & Destructor Documentation

UCvsApp::UCvsApp | ( | int | argc,
 |  | char ** | argv
 | ) |

Definition at line 79 of file UCvsApp.cpp.

References UWidget::AddTimer(), cvs_err(), gApp, gCvsPrefs, getopt_long(), kProcessTimer, CvsPrefs::load(), m_mainFrame, optarg, optind, required_argument, UCvsFolders::SetDefaultRoot(), UEventGetWidID(), and usage().

00079                                       :
00080 UWidget (::UEventGetWidID ()),
00081 gCvsRunning (false),
00082 gCvsStopping (false)
00083 {
00084     gApp = this;
00085
00086 #if qGTK
00087 # ifdef DEBUG
00088     add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps");
00089 # endif
00090     add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps");
00091     add_pixmap_directory (PACKAGE_PIXMAPS_DIR);
00092 #endif
00093
00094     // load the persistent values (i.e. preferences) and the locate the macros
00095     gCvsPrefs.load ();
00096
00097     AddTimer (50, kProcessTimer);
00098
00099     m_mainFrame = new UCvsFrame();
00100
00101     if (argc > 0)
00102     {
00103         static struct option long_options[] = {
00104             {"root", required_argument, 0L, 1},
00105             {0, 0, 0, 0}
00106         };
00107         optind = 0;
00108         int option_index = 0, c;
00109         while ((c = getopt_long
00110             (argc, argv, "+", long_options,
00111              &option_index)) != EOF)
00112         {
00113             switch (c)
00114             {
00115             case 1:
00116                 UCvsFolders::SetDefaultRoot (optarg);
00117                 break;
00118             default:
00119                 cvs_err (_("Warning : unknown option\n"));
00120                 usage ();
00121                 break;
00122             }
00123         }
00124
00125     }
00126 }

Here is the call graph for this function:

UCvsApp::~UCvsApp ( ) [virtual]

Definition at line 128 of file UCvsApp.cpp.

00129 {
00130 }

Member Function Documentation

const URuntimeClass * UCvsApp::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 67 of file UCvsApp.cpp.

void UCvsApp::Execute | ( | int | argc,
 |  | char *const * | argv
 | ) |

Definition at line 490 of file UCvsApp.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), gCvsPrefs, and CvsPrefs::Home().

Referenced by UCvsFiles::EditSel(), LaunchDiff(), LaunchExplore(), UCvsFolders::OnCmdExplore(), and UCvsFiles::OnCmdExplore().

00491 {
00492 #if qUnix
00493     // The Authentication code (AnthenModel) nulls home
00494     // after a CVS call so rather that mess with it (somebody
00495     // apparently meant to do it) we will make sure HOME is set
00496     // for our child process here.
00497     CvsArgs args(false);
00498     UStr home;
00499     home = "HOME=";
00500     home << gCvsPrefs.Home();
00501     args.add(home);
00502
00503     gnome_execute_async_with_env_fds (0L, argc, argv, args.Argc(), args.Argv(), true);
00504 #endif
00505 }

Here is the call graph for this function:

const char* UCvsApp::GetAppLibFolder ( void ) const

const char * UCvsApp::GetAppName ( void ) const

Definition at line 214 of file UCvsApp.cpp.

Referenced by AboutDialog(), UCvsFrame::OnCopyrights(), and UCvsFrame::OnCredits().

00215 {
00216 #ifdef macintosh
00217     return "MacCvs";
00218 #elif defined(WIN32)
00219     return "WinCvs";
00220 #elif defined(qUnix)
00221     return PACKAGE;
00222 #endif
00223 }

const char * UCvsApp::GetAppVersion ( void ) const

Definition at line 226 of file UCvsApp.cpp.

Referenced by UCvsFrame::OnCredits().

00227 {
00228 #ifdef macintosh
00229
00230 #elif defined(WIN32)
00231
00232 #elif defined(qUnix)
00233     return VERSION;
00234 #endif
00235 }

const UMSGMAP * UCvsApp::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 68 of file UCvsApp.cpp.

UCvsFolders * UCvsApp::GetBrowserView ( void )

Definition at line 184 of file UCvsApp.cpp.

References UObject::IsKindOf(), kUCvsFoldersID, UEventQueryWidget(), and URUNTIME_CLASS.

Referenced by UCvsFrame::OnBrowserPopup(), UCvsFrame::OnCmdIgnore(), UCvsFrame::OnCmdSaveSettings(), UCvsFrame::OnComboSelDir(), UCvsFiles::ResetView(), and CvsPrefs::save().

00185 {
00186     UCmdTarget *cmd = UEventQueryWidget (kUCvsFoldersID);
00187     if (cmd != 0L && cmd->IsKindOf (URUNTIME_CLASS (UCvsFolders)))
00188         return (UCvsFolders *) cmd;
00189
00190     return 0L;
00191 }

Here is the call graph for this function:

UCvsConsole * UCvsApp::GetConsole ( void )

Definition at line 204 of file UCvsApp.cpp.

References UObject::IsKindOf(), kUMainConsoleID, UEventQueryWidget(), and URUNTIME_CLASS.

00205 {
00206     UCmdTarget *cmd = UEventQueryWidget (kUMainConsoleID);
00207     if (cmd != 0L && cmd->IsKindOf (URUNTIME_CLASS (UCvsConsole)))
00208         return (UCvsConsole *) cmd;
00209
00210     return 0L;
00211 }

Here is the call graph for this function:

CvsProcess* UCvsApp::GetCvsProcess ( void ) [inline]

Definition at line 52 of file UCvsApp.h.

References CvsProcess, and gCvsProcess.

Referenced by UCvsFrame::OnCmdStopcvs().

00052 { return gCvsProcess; }

UCvsFiles * UCvsApp::GetFilesView ( void )

Definition at line 194 of file UCvsApp.cpp.

References UObject::IsKindOf(), kUCvsFilesID, UEventQueryWidget(), and URUNTIME_CLASS.

Referenced by OnMainTimer(), UCvsFolders::OnTreeSelecting(), UCvsFolders::ResetBrowser(), and UCvsFolders::ResetView().

00195 {
00196     UCmdTarget *cmd = UEventQueryWidget (kUCvsFilesID);
00197     if (cmd != 0L && cmd->IsKindOf (URUNTIME_CLASS (UCvsFiles)))
00198         return (UCvsFiles *) cmd;
00199
00200     return 0L;
00201 }

Here is the call graph for this function:

KiFilterModel * UCvsApp::GetFilterModel ( ) const

Definition at line 303 of file UCvsApp.cpp.

References UCvsFrame::GetFilterModel(), and m_mainFrame.

Referenced by UCvsFiles::OnCreate(), and UCvsFiles::OnDestroy().

00304 {
00305         return m_mainFrame->GetFilterModel();
00306 }

Here is the call graph for this function:

KiIgnoreModel * UCvsApp::GetIgnoreModel ( ) const

Definition at line 314 of file UCvsApp.cpp.

References UCvsFrame::GetIgnoreModel(), and m_mainFrame.

Referenced by UCvsFrame::OnCmdIgnore(), UCvsFrame::OnCmdUIIgnore(), UCvsFrame::OnCreate(), UCvsFiles::OnCreate(), UCvsFrame::OnDestroy(), UCvsFiles::OnDestroy(), and TBrowserFill::TBrowserFill().

00315 {
00316         return m_mainFrame->GetIgnoreModel();
00317 }

Here is the call graph for this function:

UCvsFrame* UCvsApp::GetMainFrame ( void ) [inline]

Definition at line 96 of file UCvsApp.h.

References m_mainFrame.

Referenced by UCvsFiles::OnViewRecursive().

00096 { return m_mainFrame; }

const UMSGMAP * UCvsApp::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Definition at line 68 of file UCvsApp.cpp.

KiRecursionModel * UCvsApp::GetRecursionModel ( ) const

Definition at line 309 of file UCvsApp.cpp.

References UCvsFrame::GetRecursionModel(), and m_mainFrame.

Referenced by UCvsFiles::OnCmdUIViewRecursive(), UCvsFiles::OnCreate(), UCvsFiles::OnDestroy(), and UCvsFiles::OnViewRecursive().

00310 {
00311         return m_mainFrame->GetRecursionModel();
00312 }

Here is the call graph for this function:

const URuntimeClass * UCvsApp::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Definition at line 67 of file UCvsApp.cpp.

UCvsStatusbar * UCvsApp::GetStatusBar ( void )

Definition at line 165 of file UCvsApp.cpp.

References kUCvsStatusbarID, and UEventQueryWidget().

Referenced by SetStatusBarText().

00166 {
00167     UCmdTarget *cmd = UEventQueryWidget (kUCvsStatusbarID);
00168     if (cmd != 0L)
00169         return (UCvsStatusbar *) cmd;
00170
00171     return 0L;
00172 }

Here is the call graph for this function:

const UMSGMAP * UCvsApp::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 68 of file UCvsApp.cpp.

bool UCvsApp::IsCvsRunning ( void ) [inline]

Definition at line 56 of file UCvsApp.h.

References gCvsRunning.

Referenced by UCvsFolders::DisableGeneric(), UCvsFiles::DisableGeneric(), IsAppEnabled(), UCvsFolders::OnCmdUICheckout(), UCvsFolders::OnCmdUIImport(), and UCvsFrame::OnQuit().

00056 { return gCvsRunning; }

bool UCvsApp::IsCvsStopping ( void ) [inline]

Definition at line 60 of file UCvsApp.h.

References gCvsStopping.

00060 { return gCvsStopping; }

void UCvsApp::OnMainTimer ( long time ) [protected]

Definition at line 508 of file UCvsApp.cpp.

References CvsProcess, UWidget::DoValidUI(), gCvsProcess, GetFilesView(), UCvsFiles::ResetView(), SetCvsProcess(), and SetCvsRunning().

00509 {
00510     if (gCvsProcess != 0L)
00511     {
00512         cvs_process_give_time ();
00513         if (!cvs_process_is_active (gCvsProcess))
00514         {
00515             SetCvsRunning (false);
00516             SetCvsProcess((CvsProcess*)0L);
00517             DoValidUI (false);
00518             GetFilesView()->ResetView (false, false);
00519 //          fprintf(stderr, "Update\n");
00520         }
00521 //  fprintf(stderr, "Update2\n");
00522     }
00523 }

Here is the call graph for this function:

void UCvsApp::PeekPumpAndIdle ( bool )

Definition at line 238 of file UCvsApp.cpp.

References UEventGiveTime().

Referenced by FileTraverse().

00239 {
00240     while (gtk_events_pending())
00241         gtk_main_iteration();
00242
00243     UEventGiveTime();
00244     if(doIdle) {
00245         // nothing to do on idle time yet
00246         /*long lIdle = 0;
00247
00248         while( OnIdle(lIdle++) )
00249             ; */
00250     }
00251 }

Here is the call graph for this function:

void UCvsApp::RestartScriptEngine ( )

Definition at line 253 of file UCvsApp.cpp.

References StartScriptEngine(), and StopScriptEngine().

00254 {
00255     StopScriptEngine();
00256     StartScriptEngine(true);
00257 }

Here is the call graph for this function:

const URuntimeClass * UCvsApp::rtUCvsApp ( void ) [static]

Definition at line 67 of file UCvsApp.cpp.

void UCvsApp::SayWelcome ( void )

Definition at line 133 of file UCvsApp.cpp.

References CompatGetPrefs(), cvs_out(), gCvsPrefs, and StartScriptEngine().

00134 {
00135     // say hello from the application, optionnaly prompt for the CVSROOT
00136     cvs_out (_("Welcome to %s %s\n"), PACKAGE, VERSION);
00137     if (gCvsPrefs.empty ())
00138         CompatGetPrefs ();
00139     else
00140         cvs_out ("CVSROOT: %s (%s)\n", (const char *) gCvsPrefs,
00141              gAuthen.kindstr ());
00142
00143     StartScriptEngine();
00144 }

Here is the call graph for this function:

void UCvsApp::SetCvsProcess ( CvsProcess * proc ) [inline]

Definition at line 51 of file UCvsApp.h.

References CvsProcess, and gCvsProcess.

Referenced by OnMainTimer().

00051 { gCvsProcess = proc; };

void UCvsApp::SetCvsRunning ( bool state )

Definition at line 147 of file UCvsApp.cpp.

References gCvsRunning.

Referenced by OnMainTimer().

00148 {
00149     if (state ^ gCvsRunning)
00150     {
00151         gCvsRunning = state;
00152     }
00153 }

void UCvsApp::SetCvsStopping ( bool state )

Definition at line 156 of file UCvsApp.cpp.

References gCvsStopping.

Referenced by UCvsFrame::OnCmdStopcvs().

00157 {
00158     if (state ^ gCvsStopping)
00159     {
00160         gCvsStopping = state;
00161     }
00162 }

void UCvsApp::SetStatusBarText ( const char * )

Definition at line 175 of file UCvsApp.cpp.

References EV_STATUSBAR_TEXT, GetStatusBar(), UCmdTarget::GetWidID(), kUMainWidget, and UEventSendMessage().

Referenced by FileTraverse().

00176 {
00177     UCvsStatusbar* statusBar = GetStatusBar();
00178     if(statusBar != 0L) {
00179         UEventSendMessage(GetStatusBar()->GetWidID(), EV_STATUSBAR_TEXT, kUMainWidget, (void*)text);
00180     }
00181 }

Here is the call graph for this function:

void UCvsApp::StartScriptEngine ( const bool forceReload = false )

Start the script engine Definition at line 262 of file UCvsApp.cpp.

References cvs_err(), cvs_out(), gCvsPrefs, CvsPrefs::GetUseShell(), CPython_Interp::InitPythonSupport(), CPython_Interp::IsAvail(), CTcl_Interp::IsAvail(), m_hasPY, m_hasTCL, PyMacrosReloadAll(), CvsPrefs::SetUseShell(), SHELL_PYTHON, and SHELL_TCL.

Referenced by RestartScriptEngine(), and SayWelcome().

00263 {
00264     CPython_Interp::InitPythonSupport(forceReload);
00265
00266     //MacrosReloadAll();
00267     PyMacrosReloadAll();
00268
00269     m_hasTCL = CTcl_Interp::IsAvail(forceReload);
00270     m_hasPY = CPython_Interp::IsAvail();
00271
00272     if( gCvsPrefs.GetUseShell() == SHELL_PYTHON && !m_hasPY && m_hasTCL )
00273     {
00274         cvs_out("Python is not available, switching the shell to TCL\n");
00275         gCvsPrefs.SetUseShell(SHELL_TCL);
00276     }
00277     else if( gCvsPrefs.GetUseShell() == SHELL_TCL && m_hasPY && !m_hasTCL )
00278     {
00279         cvs_out("TCL is not available, switching the shell to Python\n");
00280         gCvsPrefs.SetUseShell(SHELL_PYTHON);
00281     }
00282
00283     if( gCvsPrefs.GetUseShell() == SHELL_TCL && m_hasTCL )
00284     {
00285         cvs_out("TCL is available, shell is enabled : help (select and press enter)\n");
00286     }
00287
00288     if( !m_hasTCL && !m_hasPY )
00289     {
00290         cvs_err("TCL or Python are not available, shell is disabled\n");
00291     }
00292 }

Here is the call graph for this function:

void UCvsApp::StopScriptEngine ( )

Stop the script engine Definition at line 297 of file UCvsApp.cpp.

References CPython_Interp::ClosePythonSupport(), and PyInvalUICache().

Referenced by RestartScriptEngine().

00298 {
00299     PyInvalUICache();
00300     CPython_Interp::ClosePythonSupport();
00301 }

Here is the call graph for this function:

Member Data Documentation

const UMSGMAP_ENTRY UCvsApp::_messageEntries [static, private]

Initial value:

   {
{ EV_TIMER, epV_VP, UMSG_RANGE,  UCvsApp::kProcessTimer ,  UCvsApp::kProcessTimer ,   (UPMSG)(void (UCmdTarget::*)(long time))& UCvsApp::OnMainTimer  },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UWidget.

Definition at line 68 of file UCvsApp.cpp.

const URuntimeClass UCvsApp::classUCvsApp [static, protected]

UCvsApp * UCvsApp::gApp = 0L [static]

Definition at line 71 of file UCvsApp.cpp.

Referenced by UCvsApp().

CvsProcess * UCvsApp::gCvsProcess = 0L [static, protected]

Definition at line 72 of file UCvsApp.cpp.

Referenced by GetCvsProcess(), OnMainTimer(), and SetCvsProcess().

bool UCvsApp::gCvsRunning [protected]

Definition at line 117 of file UCvsApp.h.

Referenced by IsCvsRunning(), and SetCvsRunning().

bool UCvsApp::gCvsStopping [protected]

Definition at line 118 of file UCvsApp.h.

Referenced by IsCvsStopping(), and SetCvsStopping().

bool UCvsApp::m_hasPY [protected]

Flag indicating whether the Python library is loaded Definition at line 121 of file UCvsApp.h.

Referenced by StartScriptEngine().

bool UCvsApp::m_hasTCL [protected]

Flag indicating whether the TCL library is loaded Definition at line 120 of file UCvsApp.h.

Referenced by StartScriptEngine().

UCvsFrame* UCvsApp::m_mainFrame [protected]

Definition at line 114 of file UCvsApp.h.

Referenced by GetFilterModel(), GetIgnoreModel(), GetMainFrame(), GetRecursionModel(), and UCvsApp().

const UMSGMAP UCvsApp::messageMap = { UWidget ::GetThisMessageMap(), & UCvsApp ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Definition at line 68 of file UCvsApp.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsApp.h
  • common/UCvsApp.cpp
Generated on Sat Aug 7 22:50:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsConsole Class Reference

UCvsConsole Class Reference

#include <UCvsConsole.h>

Inheritance diagram for UCvsConsole:

[legend]
Collaboration diagram for UCvsConsole:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsConsole ()
virtual | ~UCvsConsole ()
void | setFont (const char *fontName)
void | OutConsole (const char *txt, size_t len, bool isStderr=false)
void | OutColor (const char *txt, long len)
void | OutColor (kConsoleColor color)

Static Public Member Functions

const URuntimeClass * | rtUCvsConsole (void)

Protected Types

enum | { MAX_CHAR_BY_LINE = 1024 }

Protected Member Functions

void | FeedThisLine (const char *buf, size_t numbuf, bool isStderr)
void | OnDestroy ()
void | OnCreate ()
void | OnEraseAll ()
void | OnCmdUIEraseAll (UCmdUI *pCmdUI)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

char * | m_buf
size_t m_numbuf
GdkFont * | m_font
struct {
UCOLOR col
bool bold
bool italic
bool underline
} out

Static Protected Attributes

const URuntimeClass | classUCvsConsole
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UCvsConsole ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Member Enumeration Documentation

anonymous enum [protected]

Enumeration values:
MAX_CHAR_BY_LINE
Definition at line 59 of file UCvsConsole.h.
00060     {
00061         MAX_CHAR_BY_LINE = 1024
00062     };

Constructor & Destructor Documentation

UCvsConsole::UCvsConsole ( )

Definition at line 50 of file UCvsConsole.cpp.

00050                          : UWidget(kUMainConsoleID), m_buf(0L), m_numbuf(0)
00051 {
00052     out.col = UCOLOR(0, 0, 0);
00053     out.bold = false;
00054     out.italic = false;
00055     out.underline = false;
00056 }

UCvsConsole::~UCvsConsole ( ) [virtual]

Definition at line 58 of file UCvsConsole.cpp.

References free, m_buf, and m_numbuf.

00059 {
00060     m_numbuf = 0;
00061     if(m_buf != 0L)
00062     {
00063         free(m_buf);
00064         m_buf = 0L;
00065     }
00066 }

Member Function Documentation

const URuntimeClass * UCvsConsole::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 41 of file UCvsConsole.cpp.

void UCvsConsole::FeedThisLine | ( | const char * | buf,
 |  | size_t | numbuf,
 |  | bool | isStderr
 | ) | [protected]

Definition at line 68 of file UCvsConsole.cpp.

References UCOLOR::b, col, UCOLOR::g, UWidget::GetWidget(), kUMainWidget, UStr::length(), m_font, NULL, UCOLOR::r, UStr::set(), and UAppConsole().

Referenced by OutConsole().

00069 {
00070     void *wid = GetWidget(kUMainWidget);
00071     if(wid == 0L)
00072     {
00073         UAppConsole("The console is not here !\n");
00074         return;
00075     }
00076
00077 #if qGTK
00078     if(!GTK_IS_TEXT(wid))
00079     {
00080         g_warning("The pseudo-console is not here !\n");
00081         return;
00082     }
00083
00084     GtkText *w = GTK_TEXT(wid);
00085     gtk_text_set_point(w, gtk_text_get_length(w));
00086 #endif
00087
00088     UCOLOR color(0, 0, 0);
00089     bool colorChanged = false;
00090     UStr s;
00091     s.set(buf, numbuf);
00092
00093     if(s.length() >= 5 && s[1] == ' ' &&
00094         (s[0] == 'M' || s[0] == 'C' || s[0] == 'U' ||
00095         s[0] == 'P' || s[0] == 'N' || s[0] == 'A' ||
00096         s[0] == 'R' || s[0] == 'I' || s[0] == '?' ||
00097         s[0] == '<' || s[0] == '>'))
00098     {
00099         colorChanged = true;
00100         switch(s[0])
00101         {
00102         default:
00103         case '?' :
00104         case 'I' :
00105             color = UCOLOR(0x80, 0x80, 0x00);
00106             break;
00107         case 'U' :
00108         case 'N' :
00109             color = UCOLOR(0x00, 0xA0, 0x00);
00110             break;
00111         case 'M' :
00112         case 'A' :
00113         case 'R' :
00114             color = UCOLOR(0xFF, 0x00, 0xFF);
00115             break;
00116         case 'C' :
00117         case '<' :
00118             color = UCOLOR(0xFF, 0x00, 0x00);
00119             break;
00120         case '>' :
00121         case 'P' :
00122             color = UCOLOR(0x00, 0x00, 0xFF);
00123             break;
00124         }
00125     }
00126     else if(isStderr)
00127     {
00128         colorChanged = true;
00129         color = UCOLOR(0xFF, 0x80, 0x00);
00130     }
00131
00132 #if qGTK
00133     GdkColormap *cmap;
00134     GdkColor col;
00135     cmap = gdk_colormap_get_system();
00136     col.red = ((unsigned int)color.r) << 8;
00137     col.green = ((unsigned int)color.g) << 8;
00138     col.blue = ((unsigned int)color.b) << 8;
00139     if(color.r != 0 || color.g != 0 || color.b != 0)
00140     {
00141         if (!gdk_color_alloc(cmap, &col)) {
00142             g_error("Couldn't allocate color\n");
00143         }
00144         gtk_text_insert(w, m_font, &col, NULL, s, -1);
00145     }
00146     else
00147         gtk_text_insert(w, m_font, &GTK_WIDGET(w)->style->black, NULL, s, -1);
00148 #endif
00149 }

Here is the call graph for this function:

const UMSGMAP * UCvsConsole::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 43 of file UCvsConsole.cpp.

const UMSGMAP * UCvsConsole::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Definition at line 43 of file UCvsConsole.cpp.

const URuntimeClass * UCvsConsole::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Definition at line 41 of file UCvsConsole.cpp.

const UMSGMAP * UCvsConsole::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 43 of file UCvsConsole.cpp.

void UCvsConsole::OnCmdUIEraseAll ( UCmdUI * pCmdUI ) [protected]

Definition at line 377 of file UCvsConsole.cpp.

References UCmdUI::Enable(), and IsAppEnabled().

00378 {
00379     pCmdUI->Enable(IsAppEnabled());
00380 }

Here is the call graph for this function:

void UCvsConsole::OnCreate ( ) [protected]

Definition at line 275 of file UCvsConsole.cpp.

References CvsPrefs::ConsoleFont(), gCvsPrefs, UWidget::GetWidget(), kUMainWidget, setFont(), and UAppConsole().

00276 {
00277     void *wid = GetWidget(kUMainWidget);
00278     if(wid == 0L)
00279     {
00280         UAppConsole("The console is not here !\n");
00281         return;
00282     }
00283
00284 #if qGTK
00285     setFont( gCvsPrefs.ConsoleFont() );
00286
00287     gtk_signal_connect (GTK_OBJECT (wid), "key_press_event",
00288                         GTK_SIGNAL_FUNC(gtkkeypress), (gpointer)this);
00289 #endif
00290 }

Here is the call graph for this function:

void UCvsConsole::OnDestroy ( ) [protected]

Definition at line 187 of file UCvsConsole.cpp.

00188 {
00189     delete this;
00190 }

void UCvsConsole::OnEraseAll ( ) [protected]

Definition at line 372 of file UCvsConsole.cpp.

References EV_SETTEXT, UCmdTarget::GetWidID(), kUMainWidget, and UEventSendMessage().

00373 {
00374     UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, 0L);
00375 }

Here is the call graph for this function:

void UCvsConsole::OutColor ( kConsoleColor color )

Definition at line 334 of file UCvsConsole.cpp.

References kBlue, kBold, kBrown, kGreen, kItalic, kMagenta, kNL, kNormal, kRed, kUnderline, and out.

00335 {
00336     switch(color)
00337     {
00338     case kBrown :
00339         out.col = UCOLOR(0x80, 0x80, 0x00);
00340         break;
00341     case kGreen :
00342         out.col = UCOLOR(0x00, 0xA0, 0x00);
00343         break;
00344     case kMagenta :
00345         out.col = UCOLOR(0xFF, 0x00, 0xFF);
00346         break;
00347     case kRed :
00348         out.col = UCOLOR(0xFF, 0x00, 0x00);
00349         break;
00350     case kBlue :
00351         out.col = UCOLOR(0x00, 0x00, 0xFF);
00352         break;
00353     case kBold :
00354         out.bold = true;
00355         break;
00356     case kItalic :
00357         out.italic = true;
00358         break;
00359     case kUnderline :
00360         out.underline = true;
00361         break;
00362     case kNormal:
00363         out.col = UCOLOR(0, 0, 0);
00364         out.bold = false;
00365         out.italic = false;
00366         out.underline = false;
00367         break;
00368     case kNL :
00369         break;
00370     }
00371 }

void UCvsConsole::OutColor | ( | const char * | txt,
 |  | long | len
 | ) |

Definition at line 297 of file UCvsConsole.cpp.

References col, UWidget::GetWidget(), kUMainWidget, m_font, NULL, out, and UAppConsole().

Referenced by CColorConsole::operator<<().

00298 {
00299     void *wid = GetWidget(kUMainWidget);
00300     if(wid == 0L)
00301     {
00302         UAppConsole("The console is not here !\n");
00303         return;
00304     }
00305
00306 #if qGTK
00307     if(!GTK_IS_TEXT(wid))
00308     {
00309         g_warning("The pseudo-console is not here !\n");
00310         return;
00311     }
00312
00313     GtkText *w = GTK_TEXT(wid);
00314     gtk_text_set_point(w, gtk_text_get_length(w));
00315
00316     GdkColormap *cmap;
00317     GdkColor col;
00318     cmap = gdk_colormap_get_system();
00319     col.red = ((unsigned int)out.col.r) << 8;
00320     col.green = ((unsigned int)out.col.g) << 8;
00321     col.blue = ((unsigned int)out.col.b) << 8;
00322     if(out.col.r != 0 || out.col.g != 0 || out.col.b != 0)
00323     {
00324         if (!gdk_color_alloc(cmap, &col)) {
00325             g_error("Couldn't allocate color\n");
00326         }
00327         gtk_text_insert(w, m_font, &col, NULL, txt, len);
00328     }
00329     else
00330         gtk_text_insert(w, m_font, &GTK_WIDGET(w)->style->black, NULL, txt, len);
00331 #endif
00332 }

Here is the call graph for this function:

void UCvsConsole::OutConsole | ( | const char * | txt,
 |  | size_t | len,
 |  | bool | isStderr = false
 | ) |

Definition at line 151 of file UCvsConsole.cpp.

References FeedThisLine(), m_buf, m_numbuf, malloc, MAX_CHAR_BY_LINE, and MAX_CHAR_BY_LINE.

Referenced by cvs_err(), cvs_errstr(), cvs_out(), and cvs_outstr().

00152 {
00153     if(len == 0)
00154         return;
00155
00156     if(m_buf == 0L)
00157     {
00158         m_buf = (char *)malloc((MAX_CHAR_BY_LINE + 3) * sizeof(char));
00159         if(m_buf == 0L)
00160             return;
00161     }
00162
00163     size_t i = 0;
00164     char c = 0;
00165 once_again:
00166     for(; i < len && m_numbuf < MAX_CHAR_BY_LINE; m_numbuf++)
00167     {
00168         c = txt[i++];
00169         if(c == 0x0a)
00170             break;
00171         m_buf[m_numbuf] = c;
00172     }
00173
00174     if(c == 0x0a || m_numbuf == MAX_CHAR_BY_LINE)
00175     {
00176         m_buf[m_numbuf++] = 0x0a;
00177         m_buf[m_numbuf++] = 0x00;
00178
00179         FeedThisLine(m_buf, m_numbuf, isStderr);
00180         m_numbuf = 0;
00181     }
00182
00183     if(i != len)
00184         goto once_again;
00185 }

Here is the call graph for this function:

const URuntimeClass * UCvsConsole::rtUCvsConsole ( void ) [static]

Definition at line 41 of file UCvsConsole.cpp.

void UCvsConsole::setFont ( const char * fontName )

Definition at line 292 of file UCvsConsole.cpp.

References m_font.

Referenced by OnCreate().

00293 {
00294     m_font = gdk_font_load ( fontName );
00295 }

Member Data Documentation

const UMSGMAP_ENTRY UCvsConsole::_messageEntries [static, private]

Initial value:

   {
    { EV_UPDTCMD, epV_VP, UMSG_RANGE,  cmdCLEAR_ALL ,  cmdCLEAR_ALL ,   (UPMSG)(void (UCmdTarget::*)(UCmdUI *pCmdUI))& UCvsConsole::OnCmdUIEraseAll  },
    { EV_CMD, epi_V, UMSG_RANGE,  cmdCLEAR_ALL ,  cmdCLEAR_ALL ,   (UPMSG)(int (UCmdTarget::*)(void))& UCvsConsole::OnEraseAll  },
    { EV_DESTROY, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsConsole ::OnDestroy },
    { EV_CREATE, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsConsole ::OnCreate },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UWidget.

Definition at line 43 of file UCvsConsole.cpp.

bool UCvsConsole::bold [protected]

Definition at line 71 of file UCvsConsole.h.

const URuntimeClass UCvsConsole::classUCvsConsole [static, protected]

UCOLOR UCvsConsole::col [protected]

Definition at line 70 of file UCvsConsole.h.

Referenced by FeedThisLine(), and OutColor().

bool UCvsConsole::italic [protected]

Definition at line 71 of file UCvsConsole.h.

char* UCvsConsole::m_buf [protected]

Definition at line 64 of file UCvsConsole.h.

Referenced by OutConsole(), and ~UCvsConsole().

GdkFont* UCvsConsole::m_font [protected]

Definition at line 66 of file UCvsConsole.h.

Referenced by FeedThisLine(), OutColor(), and setFont().

size_t UCvsConsole::m_numbuf [protected]

Definition at line 65 of file UCvsConsole.h.

Referenced by OutConsole(), and ~UCvsConsole().

const UMSGMAP UCvsConsole::messageMap = { UWidget ::GetThisMessageMap(), & UCvsConsole ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Definition at line 43 of file UCvsConsole.cpp.

struct { ... } UCvsConsole::out [protected]

Referenced by OutColor().

bool UCvsConsole::underline [protected]

Definition at line 71 of file UCvsConsole.h.

The documentation for this class was generated from the following files:
  • common/UCvsConsole.h
  • common/UCvsConsole.cpp
Generated on Sat Aug 7 22:50:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCvsConsole Class Reference

CCvsConsole Class Reference

Abstract base class for CVS process console. More...

#include <AppGlue.h>

Inheritance diagram for CCvsConsole:

[legend]
List of all members.

Public Member Functions

virtual long | cvs_out (const char *txt, long len)=0L
virtual long | cvs_err (const char *txt, long len)=0L

Detailed Description

Abstract base class for CVS process console.

Definition at line 95 of file AppGlue.h.

Member Function Documentation

virtual long CCvsConsole::cvs_err | ( | const char * | txt,
 |  | long | len
 | ) | [pure virtual]

Stderr handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implemented in CCvsStreamConsole, CCvsRootConsole, CItemListConsole, CPyCvsConsole, CTCLCvsConsole, and CGraphConsole.

Referenced by glue_consoleerr().

virtual long CCvsConsole::cvs_out | ( | const char * | txt,
 |  | long | len
 | ) | [pure virtual]

Stdout handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implemented in CCvsStreamConsole, CCvsRootConsole, CItemListConsole, CPyCvsConsole, CTCLCvsConsole, and CGraphConsole.

Referenced by glue_consoleout().

The documentation for this class was generated from the following file:
  • common/AppGlue.h
Generated on Sat Aug 7 22:50:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsFiles Class Reference

UCvsFiles Class Reference

#include <UCvsFiles.h>

Inheritance diagram for UCvsFiles:

[legend]
Collaboration diagram for UCvsFiles:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsFiles ()
virtual | ~UCvsFiles ()
void | OnFilteringChanged ()
void | ResetView (UStr path, bool notifyBrowser)
void | ResetView (const char *path, bool notifyBrowser)
void | ResetView (bool forceReload, bool notifyBrowser)
bool | IsSortAscendant (void)
KiColumnModel * | GetColumnModel () const
const UStr & | GetPath () const

Static Public Member Functions

const URuntimeClass * | rtUCvsFiles (void)
void * | GetImageForEntry (EntnodeData *data)

Protected Member Functions

void | GetEntriesModTime (time_t &newEntriesMod, time_t &newEntriesLogMod)
void | EditSel (EntnodeData *data, bool useDefault=false)
void | Resort (void)
bool | DisableGeneric (bool needSelection)
bool | DisableGeneric (void)
int | Search (const char *title)
int | ProcessSelectionCommand (KiSelectionHandler &handler)
void | SaveColumns (void)
bool | LoadColumns (void)
void | ShowColumns (void)
void | HideColumns (void)
void | SetRecursive (bool isRecursive)
void | OnDestroy ()
void | OnCreate ()
int | OnCmdUpdate (void)
int | OnCmdAdd (void)
int | OnCmdAddb (void)
int | OnCmdCommit (void)
int | OnCmdRmv (void)
int | OnCmdQueryUpdate (void)
int | OnCmdUpone (void)
int | OnCmdTrash (void)
int | OnCmdDiff (void)
int | OnCmdLog (void)
int | OnCmdGraph (void)
int | OnCmdStatus (void)
int | OnCmdLock (void)
int | OnCmdUnlock (void)
int | OnCmdWatchOn (void)
int | OnCmdWatchOff (void)
int | OnCmdEdit (void)
int | OnCmdResEdit (void)
int | OnCmdUnedit (void)
int | OnCmdWatchers (void)
int | OnCmdEditors (void)
int | OnCmdRelease (void)
int | OnCmdTagNew (void)
int | OnCmdTagDelete (void)
int | OnCmdTagBranch (void)
int | OnCmdExplore (void)
int | OnCmdEditsel (void)
int | OnCmdEditseldef (void)
int | OnMacroSel (int cmd)
int | OnViewRecursive (void)
void | OnCmdUIUpdate (UCmdUI *pCmdUI)
void | OnCmdUIAdd (UCmdUI *pCmdUI)
void | OnCmdUIAddB (UCmdUI *pCmdUI)
void | OnCmdUIRelease (UCmdUI *pCmdUI)
void | OnCmdUIRmv (UCmdUI *pCmdUI)
void | OnCmdUIGraph (UCmdUI *pCmdUI)
void | OnCmdUIEditseldef (UCmdUI *pCmdUI)
void | OnCmdUIResEdit (UCmdUI *pCmdUI)
void | OnCmdUIUpone (UCmdUI *pCmdUI)
void | OnCmdUITrash (UCmdUI *pCmdUI)
void | OnCmdUIExplore (UCmdUI *pCmdUI)
void | OnCmdUIMacroSel (int cmd, UCmdUI *pCmdUI)
void | OnCmdUIViewRecursive (UCmdUI *pCmdUI)
void | OnDblClick (void)
void | OnPopup (void)
void | OnSelColumn (int column)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

CSortList< ENTNODE > m_entries
UStr m_path
time_t | m_entriesMod
time_t | m_entriesLogMod
int m_sort
bool m_ascendant
KiColumnModel * m_modelColumns
bool m_isRecursive

Static Protected Attributes

const URuntimeClass | classUCvsFiles
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UCvsFiles ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Constructor & Destructor Documentation

UCvsFiles::UCvsFiles ( )

Definition at line 517 of file UCvsFiles.cpp.

References gFileViewSort, gFileViewSortAsc, kUCvsFilesID, m_ascendant, m_sort, and SetRecursive().

00517                      : UWidget(kUCvsFilesID), m_entries(200, ENTNODE::Compare), m_entriesMod(0), m_entriesLogMod(0)
00518
00519 {
00520     m_sort = (int)gFileViewSort;
00521     m_ascendant = (bool)gFileViewSortAsc;
00522
00523     SetRecursive(false);
00524 }

Here is the call graph for this function:

UCvsFiles::~UCvsFiles ( ) [virtual]

Definition at line 526 of file UCvsFiles.cpp.

References gFileViewSort, gFileViewSortAsc, m_ascendant, and m_sort.

00527 {
00528     gFileViewSort = m_sort;
00529     gFileViewSortAsc = m_ascendant;
00530 }

Member Function Documentation

const URuntimeClass * UCvsFiles::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 74 of file UCvsFiles.cpp.

bool UCvsFiles::DisableGeneric ( void ) [protected]

Definition at line 987 of file UCvsFiles.cpp.

Referenced by OnCmdUIAdd(), OnCmdUIAddB(), OnCmdUIEditseldef(), OnCmdUIExplore(), OnCmdUIGraph(), OnCmdUIMacroSel(), OnCmdUIRelease(), OnCmdUIRmv(), OnCmdUITrash(), OnCmdUIUpdate(), and OnCmdUIUpone().

00988 {
00989     return DisableGeneric(true);
00990 }

bool UCvsFiles::DisableGeneric ( bool needSelection ) [protected]

Definition at line 981 of file UCvsFiles.cpp.

References EV_LIST_GETNEXTSEL, gCvsPrefs, UCmdTarget::GetWidID(), UWidget::HasFocus(), UCvsApp::IsCvsRunning(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

00982 {
00983     return ((UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, -1), 0L) == -1) && needSelection) ||
00984         UCvsApp::gApp->IsCvsRunning() || gCvsPrefs.empty() || !HasFocus();
00985 }

Here is the call graph for this function:

void UCvsFiles::EditSel | ( | EntnodeData * | data,
 |  | bool | useDefault = false
 | ) | [protected]

Definition at line 1587 of file UCvsFiles.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CStr, ENT_SUBDIR, UCvsApp::Execute(), gCvsPrefs, EntnodeData::GetFullPathName(), EntnodeData::GetType(), LaunchViewer(), ResetView(), and CvsPrefs::Viewer().

Referenced by OnCmdEditsel(), OnCmdEditseldef(), and OnDblClick().

01588 {
01589     UStr buf;
01590     CStr fullpath = data->GetFullPathName(buf);
01591
01592     if(data->GetType() == ENT_SUBDIR)
01593     {
01594         ResetView( /*(const char*)*/fullpath, true);
01595     }
01596     else
01597     {
01598 #ifdef WIN32
01599         // This replaces huge chunk of code for now, even thought it's not ever called
01600         LaunchViewer((*data)[EntnodeData::kName]);
01601 #endif
01602 #ifdef qUnix
01603         CStr fullpath = data->GetFullPathName(buf);
01604
01605         CvsArgs args(false);
01606         args.add(gCvsPrefs.Viewer());
01607         args.add(fullpath);
01608         UCvsApp::gApp->Execute(args.Argc(), args.Argv());
01609 #endif
01610     }
01611 }

Here is the call graph for this function:

const UMSGMAP * UCvsFiles::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 76 of file UCvsFiles.cpp.

KiColumnModel* UCvsFiles::GetColumnModel ( ) const [inline]

Definition at line 62 of file UCvsFiles.h.

References m_modelColumns.

Referenced by HideColumns(), TViewFill::InitItem(), ResetView(), Resort(), and ShowColumns().

00063     {
00064         return m_modelColumns;
00065     }

void UCvsFiles::GetEntriesModTime | ( | time_t & | newEntriesMod,
 |  | time_t & | newEntriesLogMod
 | ) | [protected]

Definition at line 655 of file UCvsFiles.cpp.

References GetPath(), stat::st_mtime, and stat.

Referenced by ResetView().

00656 {
00657     newEntriesMod = 0;
00658     newEntriesLogMod = 0;
00659     if(chdir(GetPath()) != 0)
00660         return;
00661     if(chdir("CVS") != 0)
00662         return;
00663
00664     struct stat sb;
00665     if (stat("Entries", &sb) != -1)
00666         newEntriesMod = sb.st_mtime;
00667     if (stat("Entries.log", &sb) != -1)
00668         newEntriesLogMod = sb.st_mtime;
00669     chdir(GetPath());
00670 }

Here is the call graph for this function:

void * UCvsFiles::GetImageForEntry ( EntnodeData * data ) [static]

Definition at line 860 of file UCvsFiles.cpp.

References ENT_FILE, EntnodeData::GetType(), EntnodeData::IsIgnored(), EntnodeData::IsMissing(), EntnodeData::IsRemoved(), EntnodeData::IsUnknown(), kFileIconAdded, kFileIconBinary, kFileIconBinaryMod, kFileIconConflict, kFileIconIgnored, kFileIconMiss, kFileIconRemoved, kFileIconText, kFileIconTextMod, kFileIconUnknown, kFolderIcon, kFolderIconIgnored, kFolderIconMiss, kFolderIconUnknown, sFileIconAddedIcon, sFileIconBinaryIcon, sFileIconBinaryModIcon, sFileIconConflictIcon, sFileIconIgnoredIcon, sFileIconMissIcon, sFileIconRemovedIcon, sFileIconTextIcon, sFileIconTextModIcon, sFileIconUnknownIcon, sFolderIconIcon, sFolderIconIgnoredIcon, sFolderIconMissIcon, and sFolderIconUnknownIcon.

Referenced by ResetView().

00861 {
00862     int result;
00863     void *resIcon = 0L;
00864
00865     if(data->GetType() == ENT_FILE)
00866     {
00867         const char *info = 0L;
00868         if(data->IsIgnored())
00869         {
00870             result = kFileIconIgnored;
00871         }
00872         else if(data->IsUnknown())
00873         {
00874             result = kFileIconUnknown;
00875         }
00876         else if(data->IsMissing())
00877         {
00878             result = data->IsRemoved() ? kFileIconRemoved : kFileIconMiss;
00879         }
00880         else if((*data)[EntnodeFile::kConflict] != 0L)
00881         {
00882             result = kFileIconConflict;
00883         }
00884         else if(data->IsRemoved())
00885         {
00886             result = kFileIconRemoved;
00887         }
00888         else if((info = (*data)[EntnodeFile::kOption]) != 0L && strcmp(info, "-kb") == 0)
00889         {
00890             result = data->IsUnmodified() ? kFileIconBinary : kFileIconBinaryMod;
00891         }
00892         else
00893         {
00894             result = data->IsUnmodified() ? kFileIconText : kFileIconTextMod;
00895         }
00896     }
00897     else
00898     {
00899         if(data->IsIgnored())
00900         {
00901             result = kFolderIconIgnored;
00902         }
00903         else if(data->IsUnknown())
00904         {
00905             result = kFolderIconUnknown;
00906         }
00907         else if(data->IsMissing())
00908         {
00909             result = kFolderIconMiss;
00910         }
00911         else
00912         {
00913             result = kFolderIcon;
00914         }
00915     }
00916
00917 #if qGTK
00918     void *pixmap = 0L;
00919     switch(result)
00920     {
00921     case kFileIconText:
00922         pixmap = sFileIconTextIcon;
00923         break;
00924     case kFileIconBinary:
00925         pixmap = sFileIconBinaryIcon;
00926         break;
00927     case kFileIconUnknown:
00928         pixmap = sFileIconUnknownIcon;
00929         break;
00930     case kFileIconAdded:
00931         pixmap = sFileIconAddedIcon;
00932         break;
00933     case kFileIconConflict:
00934         pixmap = sFileIconConflictIcon;
00935         break;
00936     case kFileIconMiss:
00937         pixmap = sFileIconMissIcon;
00938         break;
00939     case kFolderIcon:
00940         pixmap = sFolderIconIcon;
00941         break;
00942     case kFolderIconUnknown:
00943         pixmap = sFolderIconUnknownIcon;
00944         break;
00945     case kFolderIconMiss:
00946         pixmap = sFolderIconMissIcon;
00947         break;
00948     case kFileIconTextMod:
00949         pixmap = sFileIconTextModIcon;
00950         break;
00951     case kFileIconBinaryMod:
00952         pixmap = sFileIconBinaryModIcon;
00953         break;
00954     case kFileIconIgnored:
00955         pixmap = sFileIconIgnoredIcon;
00956         break;
00957     case kFolderIconIgnored:
00958         pixmap = sFolderIconIgnoredIcon;
00959         break;
00960     case kFileIconRemoved:
00961         pixmap = sFileIconRemovedIcon;
00962         break;
00963     }
00964     if(pixmap != 0L)
00965     {
00966         resIcon = gtk_pixmap_new (GTK_PIXMAP(pixmap)->pixmap, GTK_PIXMAP(pixmap)->mask);
00967     }
00968 #endif
00969
00970     return resIcon;
00971 }

Here is the call graph for this function:

const UMSGMAP * UCvsFiles::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Definition at line 76 of file UCvsFiles.cpp.

const UStr& UCvsFiles::GetPath ( ) const [inline]

Definition at line 169 of file UCvsFiles.h.

References m_path.

Referenced by GetEntriesModTime(), OnCmdExplore(), OnCmdUpone(), OnMacroSel(), UCvsFolders::OnTreeSelecting(), ProcessSelectionCommand(), ResetView(), and Resort().

00169 { return m_path; };

const URuntimeClass * UCvsFiles::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Definition at line 74 of file UCvsFiles.cpp.

const UMSGMAP * UCvsFiles::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 76 of file UCvsFiles.cpp.

void UCvsFiles::HideColumns ( void ) [protected]

Definition at line 1871 of file UCvsFiles.cpp.

References EV_LIST_HIDECOLUMNS, GetColumnModel(), KiColumnModel::GetCount(), UCmdTarget::GetWidID(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

Referenced by OnCreate(), and ResetView().

01872 {
01873     KiColumnModel* model = GetColumnModel();
01874     int columnCount = model->GetCount();
01875
01876     UEventSendMessage(GetWidID(), EV_LIST_HIDECOLUMNS, UMAKEINT(kUMainWidget, columnCount), 0L);
01877 }

Here is the call graph for this function:

bool UCvsFiles::IsSortAscendant ( void ) [inline]

Definition at line 59 of file UCvsFiles.h.

References m_ascendant.

00059 { return m_ascendant; }

bool UCvsFiles::LoadColumns ( void ) [protected]

int UCvsFiles::OnCmdAdd ( void ) [protected]

Definition at line 1313 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01314 {
01315   KoAddHandler handler;
01316
01317   return ProcessSelectionCommand(handler);
01318 }

Here is the call graph for this function:

int UCvsFiles::OnCmdAddb ( void ) [protected]

Definition at line 1331 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01332 {
01333   KoAddBinaryHandler handler;
01334
01335   return ProcessSelectionCommand(handler);
01336 }

Here is the call graph for this function:

int UCvsFiles::OnCmdCommit ( void ) [protected]

Definition at line 1338 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01339 {
01340   KoCommitHandler handler;
01341   return ProcessSelectionCommand(handler);
01342 }

Here is the call graph for this function:

int UCvsFiles::OnCmdDiff ( void ) [protected]

Definition at line 1373 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01374 {
01375   KoDiffHandler handler;
01376
01377   return ProcessSelectionCommand(handler);
01378 }

Here is the call graph for this function:

int UCvsFiles::OnCmdEdit ( void ) [protected]

Definition at line 1429 of file UCvsFiles.cpp.

References KoEditHandler, and ProcessSelectionCommand().

01430 {
01431   KoEditHandler handler;
01432
01433   return ProcessSelectionCommand(handler);
01434 }

Here is the call graph for this function:

int UCvsFiles::OnCmdEditors ( void ) [protected]

Definition at line 1463 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01464 {
01465   KoEditorsHandler handler;
01466
01467   return ProcessSelectionCommand(handler);
01468 }

Here is the call graph for this function:

int UCvsFiles::OnCmdEditsel ( void ) [protected]

Definition at line 1533 of file UCvsFiles.cpp.

References EditSel(), EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, UCmdTarget::GetWidID(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01534 {
01535     int nItem = -1;
01536
01537     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01538     {
01539         EntnodeData *data;
01540         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01541         EditSel(data);
01542     }
01543     return 0;
01544 }

Here is the call graph for this function:

int UCvsFiles::OnCmdEditseldef ( void ) [protected]

Definition at line 1546 of file UCvsFiles.cpp.

References EditSel(), EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, UCmdTarget::GetWidID(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01547 {
01548     int nItem = -1;
01549
01550     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01551     {
01552         EntnodeData *data;
01553         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01554         EditSel(data, true);
01555     }
01556     return 0;
01557 }

Here is the call graph for this function:

int UCvsFiles::OnCmdExplore ( void ) [protected]

Definition at line 1500 of file UCvsFiles.cpp.

References _i18n, CvsPrefs::Browser(), cvs_err(), EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, UCvsApp::Execute(), gCvsPrefs, EntnodeData::GetFullPathName(), GetPath(), UCmdTarget::GetWidID(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01501 {
01502     const char* fullpath = GetPath();
01503
01504     int nItem = -1;
01505
01506     // first add the folders
01507     if((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01508     {
01509         EntnodeData *data;
01510         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01511
01512         UStr buf;
01513         fullpath = data->GetFullPathName(buf);
01514
01515 #ifdef WIN32
01516         HINSTANCE hInst = ShellExecute(*AfxGetMainWnd(), "explore", fullpath,
01517                                        0L, 0L, SW_SHOWDEFAULT);
01518         if((long)hInst < 32)
01519         {
01520             cvs_err(_i18n("Unable to explore '%s' (error %d)\n", (char *)GetPath(), GetLastError());
01521         }
01522 #endif
01523 #ifdef qUnix
01524         CvsArgs args(false);
01525         args.add(gCvsPrefs.Browser());
01526         args.add(fullpath);
01527         UCvsApp::gApp->Execute(args.Argc(), args.Argv());
01528 #endif
01529     }
01530     return 0;
01531 }

Here is the call graph for this function:

int UCvsFiles::OnCmdGraph ( void ) [protected]

Definition at line 1387 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01388 {
01389   KoGraphHandler handler;
01390
01391   return ProcessSelectionCommand(handler);
01392 }

Here is the call graph for this function:

int UCvsFiles::OnCmdLock ( void ) [protected]

Definition at line 1401 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01402 {
01403   KoLockHandler handler;
01404
01405   return ProcessSelectionCommand(handler);
01406 }

Here is the call graph for this function:

int UCvsFiles::OnCmdLog ( void ) [protected]

Definition at line 1380 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01381 {
01382   KoLogHandler handler;
01383
01384   return ProcessSelectionCommand(handler);
01385 }

Here is the call graph for this function:

int UCvsFiles::OnCmdQueryUpdate ( void ) [protected]

Definition at line 1351 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01352 {
01353   KoQueryUpdateHandler handler;
01354
01355   return ProcessSelectionCommand(handler);
01356 }

Here is the call graph for this function:

int UCvsFiles::OnCmdRelease ( void ) [protected]

Definition at line 1470 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01471 {
01472   KoReleaseHandler handler;
01473
01474   return ProcessSelectionCommand(handler);
01475 }

Here is the call graph for this function:

int UCvsFiles::OnCmdResEdit ( void ) [protected]

Definition at line 1442 of file UCvsFiles.cpp.

References KoReservedEditHandler, and ProcessSelectionCommand().

01443 {
01444   KoReservedEditHandler handler;
01445
01446   return ProcessSelectionCommand(handler);
01447 }

Here is the call graph for this function:

int UCvsFiles::OnCmdRmv ( void ) [protected]

Definition at line 1344 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01345 {
01346   KoFileRemoveHandler handler;
01347
01348   return ProcessSelectionCommand(handler);
01349 }

Here is the call graph for this function:

int UCvsFiles::OnCmdStatus ( void ) [protected]

Definition at line 1394 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01395 {
01396   KoStatusHandler handler;
01397
01398   return ProcessSelectionCommand(handler);
01399 }

Here is the call graph for this function:

int UCvsFiles::OnCmdTagBranch ( void ) [protected]

Definition at line 1492 of file UCvsFiles.cpp.

References KoBranchTagHandler, and ProcessSelectionCommand().

01493 {
01494   KoBranchTagHandler handler;
01495
01496   return ProcessSelectionCommand(handler);
01497 }

Here is the call graph for this function:

int UCvsFiles::OnCmdTagDelete ( void ) [protected]

Definition at line 1485 of file UCvsFiles.cpp.

References KoDeleteTagHandler, and ProcessSelectionCommand().

01486 {
01487   KoDeleteTagHandler handler;
01488
01489   return ProcessSelectionCommand(handler);
01490 }

Here is the call graph for this function:

int UCvsFiles::OnCmdTagNew ( void ) [protected]

Definition at line 1478 of file UCvsFiles.cpp.

References KoCreateTagHandler, and ProcessSelectionCommand().

01479 {
01480   KoCreateTagHandler handler;
01481
01482   return ProcessSelectionCommand(handler);
01483 }

Here is the call graph for this function:

int UCvsFiles::OnCmdTrash ( void ) [protected]

Definition at line 1366 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01367 {
01368   KoMoveToTrashHandler handler;
01369
01370   return ProcessSelectionCommand(handler);
01371 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIAdd ( UCmdUI * pCmdUI ) [protected]

Definition at line 1030 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), ENT_FILE, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, EntnodeData::GetType(), UCmdTarget::GetWidID(), EntnodeData::IsMissing(), EntnodeData::IsRemoved(), EntnodeData::IsUnknown(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01031 {
01032     if(DisableGeneric())
01033     {
01034         pCmdUI->Enable(false);
01035         return;
01036     }
01037
01038     int nItem = -1;
01039     bool res = true;
01040     int numFiles = 0;
01041     int numFolders = 0;
01042
01043     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01044     {
01045         EntnodeData *data;
01046         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01047
01048         if(!(data->IsUnknown() || (data->IsRemoved() && data->IsMissing())))
01049         {
01050             res = false;
01051             break;
01052         }
01053         if(data->GetType() == ENT_FILE)
01054         {
01055             numFiles++;
01056         }
01057         else
01058             numFolders++;
01059
01060         if((numFiles != 0) && (numFolders != 0))
01061         {
01062             res = false;
01063             break;
01064         }
01065     }
01066
01067     pCmdUI->Enable(res);
01068 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIAddB ( UCmdUI * pCmdUI ) [protected]

Definition at line 1070 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), ENT_FILE, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, EntnodeData::GetType(), UCmdTarget::GetWidID(), EntnodeData::IsMissing(), EntnodeData::IsRemoved(), EntnodeData::IsUnknown(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01071 {
01072     if(DisableGeneric())
01073     {
01074         pCmdUI->Enable(false);
01075         return;
01076     }
01077
01078     int nItem = -1;
01079     bool res = true;
01080
01081     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01082     {
01083         EntnodeData *data;
01084         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01085
01086         if(data->GetType() != ENT_FILE)
01087         {
01088             res = false;
01089             break;
01090         }
01091         if(!(data->IsUnknown() || (data->IsRemoved() && data->IsMissing())))
01092         {
01093             res = false;
01094             break;
01095         }
01096     }
01097
01098     pCmdUI->Enable(res);
01099 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIEditseldef ( UCmdUI * pCmdUI ) [protected]

Definition at line 1187 of file UCvsFiles.cpp.

References _i18n, CStr, DisableGeneric(), UCmdUI::Enable(), ENT_SUBDIR, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, gCvsPrefs, EntnodeData::GetType(), UCmdTarget::GetWidID(), EntnodeData::IsMissing(), kUMainWidget, UCmdUI::SetText(), UEventSendMessage(), UMAKEINT, and CvsPrefs::Viewer().

01188 {
01189     if(DisableGeneric())
01190     {
01191         pCmdUI->Enable(false);
01192         return;
01193     }
01194
01195     int nItem = -1;
01196     bool res = true;
01197
01198     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01199     {
01200         EntnodeData *data;
01201         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01202
01203         if(data->GetType() == ENT_SUBDIR || data->IsMissing())
01204         {
01205             res = false;
01206             break;
01207         }
01208     }
01209
01210     pCmdUI->Enable(res);
01211     if(gCvsPrefs.Viewer() != 0L)
01212     {
01213         CStr title(_i18n("Edit with "));
01214         title << gCvsPrefs.Viewer();
01215         pCmdUI->SetText(title);
01216     }
01217 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIExplore ( UCmdUI * pCmdUI ) [protected]

Definition at line 1249 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, UCmdTarget::GetWidID(), EntnodeData::IsMissing(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01250 {
01251     if(DisableGeneric())
01252     {
01253         pCmdUI->Enable(false);
01254         return;
01255     }
01256
01257     int nItem = -1;
01258     bool res = true;
01259     int numItem = 0;
01260
01261     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01262     {
01263         EntnodeData *data;
01264         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01265
01266         if(data->IsMissing() || ++numItem > 1)
01267         {
01268             res = false;
01269             break;
01270         }
01271     }
01272
01273     pCmdUI->Enable(res);
01274 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIGraph ( UCmdUI * pCmdUI ) [protected]

Definition at line 1161 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), ENT_SUBDIR, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, EntnodeData::GetType(), UCmdTarget::GetWidID(), EntnodeData::IsUnknown(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01162 {
01163     if(DisableGeneric())
01164     {
01165         pCmdUI->Enable(false);
01166         return;
01167     }
01168
01169     int nItem = -1;
01170     bool res = true;
01171
01172     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01173     {
01174         EntnodeData *data;
01175         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01176
01177         if(data->IsUnknown() || data->GetType() == ENT_SUBDIR)
01178         {
01179             res = false;
01180             break;
01181         }
01182     }
01183
01184     pCmdUI->Enable(res);
01185 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIMacroSel | ( | int | cmd,
 |  | UCmdUI * | pCmdUI
 | ) | [protected]

Definition at line 1283 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, UCmdTarget::GetWidID(), kUMainWidget, UCmdUI::m_nID, PyAppendCache(), PyDoCmdUI(), PyIsUICacheValid(), UEventSendMessage(), and UMAKEINT.

01284 {
01285     if(DisableGeneric())
01286     {
01287         pCmdUI->Enable(false);
01288         return;
01289     }
01290
01291 #ifdef USE_PYTHON
01292     if( !PyIsUICacheValid() )
01293     {
01294         int nItem = -1;
01295         while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01296         {
01297             fprintf(stderr, "%d\n", nItem);
01298             EntnodeData *data;
01299             UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01300             PyAppendCache(data);
01301         }
01302     }
01303
01304     UCmdUI ucmdui((pCmdUI->m_nID));
01305     ucmdui.pCmdUI = pCmdUI;
01306     PyDoCmdUI(&ucmdui);
01307 #else
01308     int nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, -1), 0L);
01309     pCmdUI->Enable(nItem != -1 && CTcl_Interp::IsAvail());
01310 #endif
01311 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIRelease ( UCmdUI * pCmdUI ) [protected]

Definition at line 1101 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), ENT_SUBDIR, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, EntnodeData::GetType(), UCmdTarget::GetWidID(), EntnodeData::IsUnknown(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01102 {
01103     if(DisableGeneric())
01104     {
01105         pCmdUI->Enable(false);
01106         return;
01107     }
01108
01109     int nItem = -1;
01110     bool res = true;
01111     int numFolders = 0;
01112
01113     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01114     {
01115         EntnodeData *data;
01116         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01117
01118         if(data->IsUnknown() || data->GetType() != ENT_SUBDIR)
01119         {
01120             res = false;
01121             break;
01122         }
01123         numFolders++;
01124
01125         if(numFolders > 1)
01126         {
01127             res = false;
01128             break;
01129         }
01130     }
01131
01132     pCmdUI->Enable(res);
01133 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIResEdit ( UCmdUI * pCmdUI ) [protected]

Definition at line 1436 of file UCvsFiles.cpp.

References CvsPrefs::CvsVersion(), gCvsPrefs, and OnCmdUIUpdate().

01437 {
01438   if(gCvsPrefs.CvsVersion() == 1)
01439     OnCmdUIUpdate(pCmdUI);
01440 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIRmv ( UCmdUI * pCmdUI ) [protected]

Definition at line 1135 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), ENT_SUBDIR, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, EntnodeData::GetType(), UCmdTarget::GetWidID(), EntnodeData::IsRemoved(), EntnodeData::IsUnknown(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01136 {
01137     if(DisableGeneric())
01138     {
01139         pCmdUI->Enable(false);
01140         return;
01141     }
01142
01143     int nItem = -1;
01144     bool res = true;
01145
01146     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01147     {
01148         EntnodeData *data;
01149         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01150
01151         if(data->IsUnknown() || data->IsRemoved() || data->GetType() == ENT_SUBDIR)
01152         {
01153             res = false;
01154             break;
01155         }
01156     }
01157
01158     pCmdUI->Enable(res);
01159 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUITrash ( UCmdUI * pCmdUI ) [protected]

Definition at line 1224 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), ENT_SUBDIR, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, EntnodeData::GetType(), UCmdTarget::GetWidID(), EntnodeData::IsMissing(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01225 {
01226     if(DisableGeneric())
01227     {
01228         pCmdUI->Enable(false);
01229         return;
01230     }
01231
01232     int nItem = -1;
01233     bool res = true;
01234
01235     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01236     {
01237         EntnodeData *data;
01238         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01239         if(data->GetType() == ENT_SUBDIR || data->IsMissing())
01240         {
01241             res = false;
01242             break;
01243         }
01244     }
01245
01246     pCmdUI->Enable(res);
01247 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIUpdate ( UCmdUI * pCmdUI ) [protected]

Definition at line 992 of file UCvsFiles.cpp.

References DisableGeneric(), UCmdUI::Enable(), ENT_FILE, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, EntnodeData::GetType(), UCmdTarget::GetWidID(), EntnodeData::IsUnknown(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

Referenced by OnCmdUIResEdit().

00993 {
00994     if(DisableGeneric())
00995     {
00996         pCmdUI->Enable(false);
00997         return;
00998     }
00999
01000     int nItem = -1;
01001     bool res = true;
01002     int numFiles = 0;
01003     int numFolders = 0;
01004
01005     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01006     {
01007         EntnodeData *data;
01008         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01009
01010         if(data->IsUnknown())
01011         {
01012             res = false;
01013             break;
01014         }
01015         if(data->GetType() == ENT_FILE)
01016             numFiles++;
01017         else
01018             numFolders++;
01019
01020         if((numFiles != 0) && (numFolders != 0))
01021         {
01022             res = false;
01023             break;
01024         }
01025     }
01026
01027     pCmdUI->Enable(res);
01028 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIUpone ( UCmdUI * pCmdUI ) [protected]

Definition at line 1219 of file UCvsFiles.cpp.

References DisableGeneric(), and UCmdUI::Enable().

01220 {
01221     pCmdUI->Enable(!DisableGeneric());
01222 }

Here is the call graph for this function:

void UCvsFiles::OnCmdUIViewRecursive ( UCmdUI * pCmdUI ) [protected]

Definition at line 1276 of file UCvsFiles.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), UCvsApp::GetRecursionModel(), and KoRecursionModel::IsShowRecursive().

01277 {
01278     KoRecursionModel *m_recursion = (KoRecursionModel *)UCvsApp::gApp->GetRecursionModel();
01279     pCmdUI->Enable(!UCvsApp::gApp->IsCvsRunning());
01280     pCmdUI->Check(m_recursion->IsShowRecursive());
01281 }

Here is the call graph for this function:

int UCvsFiles::OnCmdUnedit ( void ) [protected]

Definition at line 1449 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01450 {
01451   KoUneditHandler handler;
01452
01453   return ProcessSelectionCommand(handler);
01454 }

Here is the call graph for this function:

int UCvsFiles::OnCmdUnlock ( void ) [protected]

Definition at line 1408 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01409 {
01410   KoUnlockHandler handler;
01411
01412   return ProcessSelectionCommand(handler);
01413 }

Here is the call graph for this function:

int UCvsFiles::OnCmdUpdate ( void ) [protected]

Definition at line 974 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

00975 {
00976   KoUpdateHandler handler;
00977
00978   return ProcessSelectionCommand(handler);
00979 }

Here is the call graph for this function:

int UCvsFiles::OnCmdUpone ( void ) [protected]

Definition at line 1358 of file UCvsFiles.cpp.

References GetPath(), ResetView(), and SplitPath().

01359 {
01360     UStr uppath, filename;
01361     SplitPath(GetPath(), uppath, filename);
01362     ResetView( /*(const char*)*/uppath, true);
01363     return 0;
01364 }

Here is the call graph for this function:

int UCvsFiles::OnCmdWatchers ( void ) [protected]

Definition at line 1456 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01457 {
01458   KoWatchersHandler handler;
01459
01460   return ProcessSelectionCommand(handler);
01461 }

Here is the call graph for this function:

int UCvsFiles::OnCmdWatchOff ( void ) [protected]

Definition at line 1422 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01423 {
01424   KoWatchOnHandler handler;
01425
01426   return ProcessSelectionCommand(handler);
01427 }

Here is the call graph for this function:

int UCvsFiles::OnCmdWatchOn ( void ) [protected]

Definition at line 1415 of file UCvsFiles.cpp.

References ProcessSelectionCommand().

01416 {
01417   KoWatchOnHandler handler;
01418
01419   return ProcessSelectionCommand(handler);
01420 }

Here is the call graph for this function:

void UCvsFiles::OnCreate ( ) [protected]

Definition at line 592 of file UCvsFiles.cpp.

References NotificationManager::CheckIn(), EV_LIST_SETFEEDBACK, UCvsApp::GetFilterModel(), UCvsApp::GetIgnoreModel(), KiFilterBase::GetNotificationManager(), UCvsApp::GetRecursionModel(), UCmdTarget::GetWidID(), HideColumns(), KoTraversalContext::IsRecursive(), kUMainWidget, onFilteringChanged(), SetRecursive(), sFileIconAddedIcon, sFileIconBinaryIcon, sFileIconBinaryModIcon, sFileIconConflictIcon, sFileIconIgnoredIcon, sFileIconMissIcon, sFileIconRemovedIcon, sFileIconTextIcon, sFileIconTextModIcon, sFileIconUnknownIcon, sFolderIconIcon, sFolderIconIgnoredIcon, sFolderIconMissIcon, sFolderIconUnknownIcon, ShowColumns(), UCreate_pixmap(), UEventSendMessage(), and UMAKEINT.

00593 {
00594     KoTraversalContext context(this);
00595     bool recursive;
00596
00597     if(sFileIconTextIcon == 0L)
00598     {
00599         sFileIconTextIcon = UCreate_pixmap(this, "cvsfile.xpm");
00600         sFileIconBinaryIcon = UCreate_pixmap(this, "binfile.xpm");
00601         sFileIconUnknownIcon = UCreate_pixmap(this, "unkfile.xpm");
00602         sFileIconAddedIcon = UCreate_pixmap(this, "addfile.xpm");
00603         sFileIconConflictIcon = UCreate_pixmap(this, "conflict.xpm");
00604         sFileIconMissIcon = UCreate_pixmap(this, "missfile.xpm");
00605         sFolderIconIcon = UCreate_pixmap(this, "folder.xpm");
00606         sFolderIconUnknownIcon = UCreate_pixmap(this, "foldunk.xpm");
00607         sFolderIconMissIcon = UCreate_pixmap(this, "foldmiss.xpm");
00608         sFileIconTextModIcon = UCreate_pixmap(this, "modfile.xpm");
00609         sFileIconBinaryModIcon = UCreate_pixmap(this, "modbin.xpm");
00610         sFileIconIgnoredIcon = UCreate_pixmap(this, "ignfile.xpm");
00611         sFolderIconIgnoredIcon = UCreate_pixmap(this, "foldign.xpm");
00612         sFileIconRemovedIcon = UCreate_pixmap(this, "delfile.xpm");
00613     }
00614
00615     UEventSendMessage(GetWidID(), EV_LIST_SETFEEDBACK, UMAKEINT(kUMainWidget, 0), 0L);
00616
00617     recursive = context.IsRecursive();
00618
00619     SetRecursive(!recursive);
00620     HideColumns();
00621
00622     SetRecursive(recursive);
00623     ShowColumns();
00624
00625     if( UCvsApp* app = UCvsApp::gApp ) {
00626         app->GetFilterModel()->GetNotificationManager()->CheckIn(this, onFilteringChanged);
00627         app->GetRecursionModel()->GetNotificationManager()->CheckIn(this, onFilteringChanged);
00628         app->GetIgnoreModel()->GetNotificationManager()->CheckIn(this, onFilteringChanged);
00629     }
00630     UEventSendMessage(GetWidID(), EV_LIST_SETFEEDBACK, UMAKEINT(kUMainWidget, 1), 0L);
00631 }

Here is the call graph for this function:

void UCvsFiles::OnDblClick ( void ) [protected]

Definition at line 1613 of file UCvsFiles.cpp.

References EditSel(), EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, UCmdTarget::GetWidID(), kUMainWidget, UEventSendMessage(), and UMAKEINT.

01614 {
01615     int nItem = -1;
01616
01617     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01618     {
01619         EntnodeData *data;
01620         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01621         EditSel(data);
01622     }
01623 }

Here is the call graph for this function:

void UCvsFiles::OnDestroy ( ) [protected]

Definition at line 574 of file UCvsFiles.cpp.

References NotificationManager::CheckOut(), UCvsApp::GetFilterModel(), UCvsApp::GetIgnoreModel(), KiFilterBase::GetNotificationManager(), and UCvsApp::GetRecursionModel().

00575 {
00576     // unregister notifications
00577     if (UCvsApp* app = UCvsApp::gApp)
00578     {
00579         app->GetFilterModel()->GetNotificationManager()->CheckOut(this);
00580         app->GetRecursionModel()->GetNotificationManager()->CheckOut(this);
00581         app->GetIgnoreModel()->GetNotificationManager()->CheckOut(this);
00582     }
00583
00584     delete this;
00585 }

Here is the call graph for this function:

void UCvsFiles::OnFilteringChanged ( )

Definition at line 1879 of file UCvsFiles.cpp.

References ResetView().

01880 {
01881     ResetView(true, false);
01882 }

Here is the call graph for this function:

int UCvsFiles::OnMacroSel ( int cmd ) [protected]

Definition at line 1559 of file UCvsFiles.cpp.

References cmdSELMACRO, CStr, CTcl_Interp::DoScriptVar(), CMacroSet::entries, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, GetPath(), UCmdTarget::GetWidID(), gMacrosSel, kUMainWidget, CMacroEntry::path, PyDoPython(), ResetView(), TclBrowserAppend(), TclBrowserReset(), UEventSendMessage(), UMAKEINT, and CTcl_Interp::Unixfy().

01560 {
01561
01562 #ifdef USE_PYTHON
01563     PyDoPython(cmd);
01564 #else
01565     CTcl_Interp interp;
01566     CMacroEntry & entry = gMacrosSel.entries[cmd - cmdSELMACRO];
01567     CStr path = entry.path;
01568     CTcl_Interp::Unixfy(path);
01569
01570     TclBrowserReset();
01571
01572     int nItem = -1;
01573     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01574     {
01575         EntnodeData *data;
01576         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01577         TclBrowserAppend(GetPath(), data);
01578     }
01579
01580     interp.DoScriptVar("source \"%s\"", (const char *)path);
01581 #endif
01582     ResetView(true, true);
01583
01584     return 0;
01585 }

Here is the call graph for this function:

void UCvsFiles::OnPopup ( void ) [protected]

Definition at line 1625 of file UCvsFiles.cpp.

01626 {
01627     fprintf(stderr, "UCvsFiles: Popup called\n");
01628 }

void UCvsFiles::OnSelColumn ( int column ) [protected]

Definition at line 1822 of file UCvsFiles.cpp.

References m_ascendant, m_sort, and Resort().

01823 {
01824     if(column == m_sort)
01825         m_ascendant = !m_ascendant;
01826     else
01827     {
01828         m_ascendant = true;
01829         switch(column)
01830         {
01831         case EntnodeData::kName:
01832         case EntnodeData::kState:
01833         case EntnodeFile::kEncoding:
01834         case EntnodeFile::kExt:
01835         case EntnodeFile::kOption:
01836         case EntnodeFile::kTag:
01837         case EntnodeFile::kConflict:
01838         case EntnodeFile::kTS:
01839         case EntnodeFile::kVN:
01840             m_sort = column;
01841             break;
01842         }
01843     }
01844
01845     Resort();
01846 }

Here is the call graph for this function:

int UCvsFiles::OnViewRecursive ( void ) [protected]

Definition at line 1320 of file UCvsFiles.cpp.

References UCvsApp::GetMainFrame(), UCvsApp::GetRecursionModel(), UCvsFrame::OnFilterMaskEntered(), ResetView(), and KoRecursionModel::ToggleRecursion().

01321 {
01322     KoRecursionModel *m_recursion = (KoRecursionModel *)UCvsApp::gApp->GetRecursionModel();
01323     m_recursion->ToggleRecursion();
01324     ResetView(true, true);
01325
01326     UCvsApp::gApp->GetMainFrame()->OnFilterMaskEntered();
01327
01328     return 0;
01329 }

Here is the call graph for this function:

int UCvsFiles::ProcessSelectionCommand ( KiSelectionHandler & handler ) [protected]

Definition at line 532 of file UCvsFiles.cpp.

References ENT_SUBDIR, EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, EntnodeData::GetFullPathName(), KiSelectionHandler::GetNeedViewReset(), GetPath(), EntnodeData::GetType(), UCmdTarget::GetWidID(), kUMainWidget, UStr::length(), MultiFiles::newdir(), MultiFiles::newfile(), KiSelectionHandler::OnFiles(), KiSelectionHandler::OnFolder(), ResetView(), MultiFiles::TotalNumFiles(), UEventSendMessage(), and UMAKEINT.

Referenced by OnCmdAdd(), OnCmdAddb(), OnCmdCommit(), OnCmdDiff(), OnCmdEdit(), OnCmdEditors(), OnCmdGraph(), OnCmdLock(), OnCmdLog(), OnCmdQueryUpdate(), OnCmdRelease(), OnCmdResEdit(), OnCmdRmv(), OnCmdStatus(), OnCmdTagBranch(), OnCmdTagDelete(), OnCmdTagNew(), OnCmdTrash(), OnCmdUnedit(), OnCmdUnlock(), OnCmdUpdate(), OnCmdWatchers(), OnCmdWatchOff(), and OnCmdWatchOn().

00533 {
00534   int nItem = -1;
00535
00536   MultiFiles mf;
00537   mf.newdir(GetPath());
00538   int pathLen = GetPath().length();
00539
00540   // first add the folders
00541   while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
00542   {
00543     EntnodeData *data;
00544     UStr buf;
00545
00546     UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
00547     const char* fullpath = data->GetFullPathName(buf);
00548
00549     if(data->GetType() == ENT_SUBDIR)
00550     {
00551         handler.OnFolder(fullpath);
00552     }
00553     else
00554     {
00555         const char* fn = data->GetFullPathName(buf) + pathLen;
00556         if(*fn == kPathDelimiter ) {
00557             fn++;
00558         }
00559
00560
00561         mf.newfile(fn, 0, (*data)[EntnodeFile::kVN]);
00562     }
00563   }
00564   if(mf.TotalNumFiles() != 0)
00565   {
00566     handler.OnFiles(&mf);
00567
00568     ResetView(handler.GetNeedViewReset(), false);
00569   }
00570
00571   return 0;
00572 }

Here is the call graph for this function:

void UCvsFiles::ResetView | ( | bool | forceReload,
 |  | bool | notifyBrowser
 | ) |

Definition at line 696 of file UCvsFiles.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), ULIST_INSERT::col, Entries_SetMissing(), EV_CHGFOCUS, EV_LIST_ADDSEL, EV_LIST_GETNEXTSEL, EV_LIST_INSERT, EV_LIST_NEWROW, EV_LIST_RESETALL, EV_LIST_ROWGETDATA, EV_LIST_ROWSETDATA, FileTraverse(), CSortList< T >::Get(), KiColumnModel::GetAt(), UCvsApp::GetBrowserView(), GetColumnModel(), KiColumnModel::GetCount(), GetEntriesModTime(), EntnodeData::GetFullPathName(), GetImageForEntry(), GetPath(), UWidget::GetWidget(), UCmdTarget::GetWidID(), HideColumns(), ULIST_INSERT::icon, TViewFill::InitItem(), USemaphore::IsEnteredTwice(), EntnodeData::IsMissing(), KoTraversalContext::IsRecursive(), kUMainWidget, m_entries, m_entriesLogMod, m_entriesMod, m_isRecursive, m_modelColumns, m_sort, NULL, CSortList< T >::NumOfElements(), UCvsFolders::ResetView(), Resort(), ULIST_INSERT::row, Search(), SetRecursive(), ShowColumns(), ULIST_INSERT::title, UEventSendMessage(), and UMAKEINT.

00697 {
00698     UWaitCursor wait;
00699
00700     static bool sSemaphore = false;
00701     USemaphore policeman(sSemaphore);
00702     if(policeman.IsEnteredTwice())
00703         return;
00704
00705     // - check if we really need to reload (forceReload == false)
00706     // - wait a bit for the watcher in order to let him tell us
00707     // if something was modified.
00708     time_t newEntriesMod;
00709     time_t newEntriesLogMod;
00710     GetEntriesModTime(newEntriesMod, newEntriesLogMod);
00711     if(!forceReload)
00712     {
00713         if(m_entriesMod == newEntriesMod && m_entriesLogMod == newEntriesLogMod)
00714             return;
00715     }
00716
00717     // reset all the watchers
00718     m_entriesMod = newEntriesMod;
00719     m_entriesLogMod = newEntriesLogMod;
00720
00721     // get the selection to later try to restore it
00722     CvsArgs selection(false);
00723     int nItem = -1;
00724     UStr buf;
00725
00726     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL,
00727                                      UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
00728     {
00729         EntnodeData *data;
00730         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
00731         //selection.add((*data)[EntnodeData::kName]);
00732         selection.add(data->GetFullPathName(buf));
00733     }
00734
00735     UEventSendMessage(GetWidID(), EV_LIST_RESETALL, kUMainWidget, 0L);
00736
00737     UEventSendMessage(GetWidID(), EV_CHGFOCUS, kUMainWidget, 0L);
00738
00739 #if qGTK
00740     void *wid = GetWidget(kUMainWidget);
00741     guint sigHandler;
00742
00743     if(wid != 0L)
00744     {
00745         sigHandler = gtk_signal_connect (GTK_OBJECT (wid), "key_press_event",
00746                         GTK_SIGNAL_FUNC(gtkkeypress), (gpointer)this);
00747
00748         ResetKeyState();
00749     }
00750 #endif
00751
00752     // make sure columns are ok
00753     KoTraversalContext context(this);
00754
00755     if ((context.IsRecursive() && !m_isRecursive) || (!context.IsRecursive() && m_isRecursive))
00756     {
00757
00758         KiColumnModel* oldModel = GetColumnModel();
00759         int oldCount = oldModel->GetCount();
00760         const KiColumn* oldColumn = (0 <= m_sort && m_sort < oldCount) ? oldModel->GetAt(m_sort) : NULL;
00761         HideColumns();
00762
00763         SetRecursive(context.IsRecursive());
00764         ShowColumns();
00765
00766         if (oldColumn == NULL)
00767         {
00768                 m_sort = 0;
00769         }
00770         else
00771         {
00772             KiColumnModel* newModel = GetColumnModel();
00773             int newCount = newModel->GetCount();
00774             int sort = -1;
00775             for (int pos = 0; pos < newCount && sort == -1; pos++)
00776             {
00777                 if (newModel->GetAt(pos) == oldColumn)
00778                 {
00779                     sort = pos;
00780                 }
00781             }
00782             m_sort = (sort >= 0) ? sort : 0;
00783         }
00784     }
00785
00786     // refetch all items
00787     TViewFill traverse(/*this, */&context, m_entries);
00788     /*kTraversal res = */FileTraverse(GetPath(), traverse);
00789
00790     // add the missing files
00791     Entries_SetMissing(m_entries);
00792
00793     int numEntries = m_entries.NumOfElements();
00794     for(int i = 0; i < numEntries; i++)
00795     {
00796         const ENTNODE & theNode = m_entries.Get(i);
00797         EntnodeData *data = ((ENTNODE *)&theNode)->Data();
00798         if(!data->IsMissing())
00799             continue;
00800
00801         //TViewFill::
00802         traverse.InitItem(data, UCvsFiles::GetImageForEntry(data));
00803 #ifdef _0_
00804         int rownum;
00805         UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kUMainWidget, &rownum);
00806         UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kUMainWidget, rownum), data);
00807         ULIST_INSERT entry;
00808         entry.row = rownum;
00809
00810         entry.col = 0;
00811         entry.title = (*data)[EntnodeData::kName];
00812         entry.icon = UCvsFiles::GetImageForEntry(data);
00813         UEventSendMessage(GetWidID(), EV_LIST_INSERT, kUMainWidget, &entry);
00814
00815         entry.icon = 0L;
00816
00817         // set item text for additional columns
00818         for(int j = 1; j < m_modelColumns->GetCount(); j++)
00819         {
00820             const char *info = (*data)[j];
00821             if(info != 0L)
00822             {
00823                 entry.col = j;
00824                 entry.title = info;
00825                 UEventSendMessage(GetWidID(), EV_LIST_INSERT, kUMainWidget, &entry);
00826             }
00827         }
00828         entry.col = EntnodeData::kState;
00829         entry.title = data->GetDesc();
00830         UEventSendMessage(GetWidID(), EV_LIST_INSERT, kUMainWidget, &entry);
00831 #endif
00832     }
00833
00834     Resort();
00835
00836     // now restore the selection
00837     int argc = selection.Argc(), c;
00838     char * const *argv = selection.Argv();
00839     for(c = 0; c < argc; c++)
00840     {
00841         int row = Search(argv[c]);
00842         if(row != -1)
00843             UEventSendMessage(GetWidID(), EV_LIST_ADDSEL, UMAKEINT(kUMainWidget, row), 0L);
00844     }
00845
00846     if(notifyBrowser)
00847     {
00848         // notify the tree
00849         UCvsApp::gApp->GetBrowserView()->ResetView(forceReload);
00850     }
00851 #ifdef GTK
00852     if(wid != 0L)
00853     {
00854         gtk_signal_disconnect (GTK_OBJECT (wid), sigHandler);
00855     }
00856 #endif
00857
00858 }

Here is the call graph for this function:

void UCvsFiles::ResetView | ( | const char * | path,
 |  | bool | notifyBrowser
 | ) |

Definition at line 633 of file UCvsFiles.cpp.

References EV_SETTEXT, UCvsApp::GetBrowserView(), GetPath(), kUCvsFrameID, kUMainWidget, m_path, ResetView(), UCvsFolders::StepToLocation(), and UEventSendMessage().

00634 {
00635     m_path = path;
00636     ResetView(true, false);
00637
00638     UStr title(UCvsApp::gApp->GetAppName());
00639     title << ": ";
00640     title << GetPath();
00641     UEventSendMessage(kUCvsFrameID, EV_SETTEXT, kUMainWidget, (void *)(const char *)title);
00642
00643     if(notifyBrowser)
00644     {
00645         // notify the tree
00646         UCvsApp::gApp->GetBrowserView()->StepToLocation(path);
00647     }
00648 }

Here is the call graph for this function:

void UCvsFiles::ResetView | ( | UStr | path,
 |  | bool | notifyBrowser
 | ) |

Definition at line 650 of file UCvsFiles.cpp.

References UStr::c_str().

Referenced by EditSel(), OnCmdUpone(), OnFilteringChanged(), OnMacroSel(), UCvsApp::OnMainTimer(), UCvsFolders::OnTreeSelecting(), OnViewRecursive(), ProcessSelectionCommand(), UCvsFolders::ResetBrowser(), UCvsFolders::ResetView(), and ResetView().

00651 {
00652     ResetView(path.c_str(), notifyBrowser);
00653 }

Here is the call graph for this function:

void UCvsFiles::Resort ( void ) [protected]

Definition at line 1812 of file UCvsFiles.cpp.

References EV_LIST_RESORT, EV_LIST_SETSORTDIR, KiColumnModel::GetAt(), GetColumnModel(), GetPath(), UCmdTarget::GetWidID(), gSortParam, gtkCompareWrap(), kUMainWidget, m_ascendant, m_sort, UEventSendMessage(), and UMAKEINT.

Referenced by OnSelColumn(), and ResetView().

01813 {
01814     KiColumnModel* model = GetColumnModel();
01815     KoColumnContext context(GetPath());
01816     gSortParam = new CSortParam (m_ascendant, true, model->GetAt(m_sort), model->GetAt(EntnodeData::kName), &context);
01817
01818     UEventSendMessage(GetWidID(), EV_LIST_RESORT, UMAKEINT(kUMainWidget, m_sort), (void *)gtkCompareWrap);
01819     UEventSendMessage(GetWidID(), EV_LIST_SETSORTDIR, UMAKEINT(kUMainWidget, m_sort), (void *)m_ascendant);
01820 }

Here is the call graph for this function:

const URuntimeClass * UCvsFiles::rtUCvsFiles ( void ) [static]

Definition at line 74 of file UCvsFiles.cpp.

void UCvsFiles::SaveColumns ( void ) [protected]

int UCvsFiles::Search ( const char * title ) [protected]

Definition at line 672 of file UCvsFiles.cpp.

References ULIST_INFO::col, EV_LIST_GETINFO, EV_LIST_GETNEXT, UCmdTarget::GetWidID(), kUMainWidget, ULIST_INFO::row, ULIST_INFO::title, UEventSendMessage(), and UMAKEINT.

Referenced by ResetView().

00673 {
00674     int row = -1;
00675     while((row = UEventSendMessage(GetWidID(), EV_LIST_GETNEXT,
00676                                      UMAKEINT(kUMainWidget, row), 0L)) != -1)
00677     {
00678         ULIST_INFO info;
00679         info.col = 0;
00680         info.row = row;
00681         UEventSendMessage(GetWidID(), EV_LIST_GETINFO, kUMainWidget, &info);
00682         if(info.title == 0L)
00683             continue;
00684
00685 #if qUnix
00686         if(strcmp(title, info.title) == 0)
00687 #else
00688         if(stricmp(title, info.title) == 0)
00689 #endif
00690             return row;
00691     }
00692
00693     return -1;
00694 }

Here is the call graph for this function:

void UCvsFiles::SetRecursive ( bool isRecursive ) [protected]

Definition at line 1848 of file UCvsFiles.cpp.

References KiColumnModel::GetRecursiveModel(), KiColumnModel::GetRegularModel(), m_isRecursive, and m_modelColumns.

Referenced by OnCreate(), ResetView(), and UCvsFiles().

01849 {
01850     m_isRecursive = isRecursive;
01851     m_modelColumns = (m_isRecursive) ? KiColumnModel::GetRecursiveModel() : KiColumnModel::GetRegularModel();
01852 }

Here is the call graph for this function:

void UCvsFiles::ShowColumns ( void ) [protected]

Definition at line 1854 of file UCvsFiles.cpp.

References EV_LIST_SETCOLTITLE, EV_LIST_SETCOLWIDTH, EV_LIST_SHOWCOLUMNS, KiColumnModel::GetAt(), GetColumnModel(), KiColumnModel::GetCount(), KiColumn::GetSetupData(), UCmdTarget::GetWidID(), kUMainWidget, m_modelColumns, UEventSendMessage(), and UMAKEINT.

Referenced by OnCreate(), and ResetView().

01855 {
01856     KiColumnModel* model = GetColumnModel();
01857     int columnCount = model->GetCount();
01858
01859     UEventSendMessage(GetWidID(), EV_LIST_SHOWCOLUMNS, UMAKEINT(kUMainWidget, columnCount), 0L);
01860
01861     for(int i = 0; i<columnCount; i++)
01862     {
01863         LV_COLUMN lv;
01864
01865         m_modelColumns->GetAt(i)->GetSetupData(&lv);
01866         UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kUMainWidget, i), (char*)lv.name);
01867         UEventSendMessage(GetWidID(), EV_LIST_SETCOLWIDTH, UMAKEINT(kUMainWidget, i), (void *)lv.width);
01868     }
01869 }

Here is the call graph for this function:

Member Data Documentation

const UMSGMAP_ENTRY UCvsFiles::_messageEntries [static, private]

Reimplemented from UWidget.

Definition at line 76 of file UCvsFiles.cpp.

const URuntimeClass UCvsFiles::classUCvsFiles [static, protected]

bool UCvsFiles::m_ascendant [protected]

Definition at line 86 of file UCvsFiles.h.

Referenced by IsSortAscendant(), OnSelColumn(), Resort(), UCvsFiles(), and ~UCvsFiles().

CSortList<ENTNODE> UCvsFiles::m_entries [protected]

Definition at line 77 of file UCvsFiles.h.

Referenced by ResetView().

time_t UCvsFiles::m_entriesLogMod [protected]

Definition at line 82 of file UCvsFiles.h.

Referenced by ResetView().

time_t UCvsFiles::m_entriesMod [protected]

Definition at line 81 of file UCvsFiles.h.

Referenced by ResetView().

bool UCvsFiles::m_isRecursive [protected]

Definition at line 114 of file UCvsFiles.h.

Referenced by ResetView(), and SetRecursive().

KiColumnModel* UCvsFiles::m_modelColumns [protected]

Definition at line 89 of file UCvsFiles.h.

Referenced by GetColumnModel(), ResetView(), SetRecursive(), and ShowColumns().

UStr UCvsFiles::m_path [protected]

Definition at line 79 of file UCvsFiles.h.

Referenced by GetPath(), and ResetView().

int UCvsFiles::m_sort [protected]

Definition at line 84 of file UCvsFiles.h.

Referenced by OnSelColumn(), ResetView(), Resort(), UCvsFiles(), and ~UCvsFiles().

const UMSGMAP UCvsFiles::messageMap = { UWidget ::GetThisMessageMap(), & UCvsFiles ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Definition at line 76 of file UCvsFiles.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsFiles.h
  • common/UCvsFiles.cpp
Generated on Sat Aug 7 22:51:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsFolders Class Reference

UCvsFolders Class Reference

#include <UCvsFolders.h>

Inheritance diagram for UCvsFolders:

[legend]
Collaboration diagram for UCvsFolders:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsFolders ()
virtual | ~UCvsFolders ()
void | ResetBrowser (const char *path, bool notifyView=false)
const char * | GetRoot (void) const
void | RetrievePath (UTREEITEM item, UStr &path)
void | StepToLocation (const char *path, bool notifyView=false)
void | DeleteAllItems (void)
void | DeleteAllItems (UTREEITEM root)
void | ResetView (bool forceReload=false, bool notifyView=false)

Static Public Member Functions

const URuntimeClass * | rtUCvsFolders (void)
void | SetDefaultRoot (const char *root)

Protected Member Functions

void | OnUpdateGeneric (UCmdUI *pCmdUI, bool needCvsInfos)
bool DisableGeneric ()
void | StoreExpanded (std::vector< UStr > &allExpanded, UTREEITEM root=0L)
UTREEITEM | GetItemByLocation (const char *path)
int | ProcessSelectionCommand (KiSelectionHandler &handler)
void | OnDestroy ()
void | OnCreate ()
void | OnTreeExpanding (int collapse, UTREEITEM item)
void | OnTreeSelecting (int deselect, UTREEITEM item)
void | OnCmdUIMacrosSel (int cmd, UCmdUI *pCmdUI)
void | OnCmdUIUpdate (UCmdUI *pCmdUI)
void | OnCmdUIAdd (UCmdUI *pCmdUI)
void | OnCmdUIExplore (UCmdUI *pCmdUI)
void | OnCmdUICheckout (UCmdUI *pCmdUI)
void | OnCmdUIImport (UCmdUI *pCmdUI)
void | OnCmdUIResEdit (UCmdUI *pCmdUI)
int | OnCmdUpdate (void)
int | OnCmdAdd (void)
int | OnCmdCommit (void)
int | OnCmdQueryUpdate (void)
int | OnCmdDiff (void)
int | OnCmdLog (void)
int | OnCmdStatus (void)
int | OnCmdLock (void)
int | OnCmdUnlock (void)
int | OnCmdWatchOn (void)
int | OnCmdWatchOff (void)
int | OnCmdEdit (void)
int | OnCmdResEdit (void)
int | OnCmdUnedit (void)
int | OnCmdWatchers (void)
int | OnCmdEditors (void)
int | OnCmdRelease (void)
int | OnCmdTagNew (void)
int | OnCmdTagDelete (void)
int | OnCmdTagBranch (void)
int | OnCmdExplore (void)
int | OnCmdCheckout (void)
int | OnCmdImport (void)
int | OnCmdMacrosSel (int cmd)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

UStr m_root

Static Protected Attributes

const URuntimeClass | classUCvsFolders
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UCvsFolders ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Constructor & Destructor Documentation

UCvsFolders::UCvsFolders ( )

Definition at line 456 of file UCvsFolders.cpp.

References kUCvsFoldersID.

00456                          : UWidget(kUCvsFoldersID)
00457 {
00458 }

UCvsFolders::~UCvsFolders ( ) [virtual]

Definition at line 460 of file UCvsFolders.cpp.

00461 {
00462 }

Member Function Documentation

const URuntimeClass * UCvsFolders::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 83 of file UCvsFolders.cpp.

void UCvsFolders::DeleteAllItems ( UTREEITEM root )

Definition at line 937 of file UCvsFolders.cpp.

References UTREE_INFO::child, UTREE_INFO::data, DeleteAllItems(), EV_TREE_DELETE, EV_TREE_GETINFO, EV_TREE_SETDATA, UCmdTarget::GetWidID(), UTREE_INFO::item, kUMainWidget, UTREE_INFO::next, sTemporaryTurnOffNotify, UEventSendMessage(), EntnodeData::UnRef(), and UTREEITEM.

00938 {
00939     // we don't want the file view to be notified when things get deleted
00940     CTempToggleBool toggler(sTemporaryTurnOffNotify);
00941
00942     UTREE_INFO query;
00943     bool eraseRoot = false;
00944     query.item = root;
00945     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00946     if(root == 0L)
00947     {
00948         root = query.item;
00949         eraseRoot = true;
00950     }
00951
00952     if(root == 0L)
00953         return;
00954
00955     UTREEITEM childItem = query.child;
00956
00957     // erase all the childs
00958     while(childItem != 0L)
00959     {
00960         UTREE_INFO queryChild;
00961         queryChild.item = childItem;
00962         UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &queryChild);
00963
00964         EntnodeData *data = (EntnodeData *)queryChild.data;
00965         if(data != 0L)
00966         {
00967             queryChild.data = 0L; // So that subsequent references after UnRef() won't SEGV
00968             UEventSendMessage(GetWidID(), EV_TREE_SETDATA, kUMainWidget, &queryChild);
00969             data->UnRef();  // Or move this one after DeleteAllItems? so we don't loose one system call. For now, safe way
00970         }
00971
00972         DeleteAllItems(childItem);
00973
00974         UEventSendMessage(GetWidID(), EV_TREE_DELETE, kUMainWidget, childItem);
00975         childItem = queryChild.next;
00976     }
00977
00978     // erase the root only if initially root was 0L
00979     if(eraseRoot)
00980     {
00981         EntnodeData *data = (EntnodeData *)query.data;
00982         ASSERT(data == 0L);
00983
00984         UEventSendMessage(GetWidID(), EV_TREE_DELETE, kUMainWidget, root);
00985     }
00986 }

Here is the call graph for this function:

void UCvsFolders::DeleteAllItems ( void )

Definition at line 932 of file UCvsFolders.cpp.

References NULL.

Referenced by DeleteAllItems(), OnTreeExpanding(), and ResetBrowser().

00933 {
00934     DeleteAllItems(NULL);
00935 }

bool UCvsFolders::DisableGeneric ( ) [protected]

Definition at line 988 of file UCvsFolders.cpp.

References gCvsPrefs, UWidget::HasFocus(), and UCvsApp::IsCvsRunning().

Referenced by OnCmdUIExplore(), OnCmdUIMacrosSel(), and OnUpdateGeneric().

00989 {
00990     UCvsApp *app = UCvsApp::gApp;
00991     return app->IsCvsRunning() || gCvsPrefs.empty() || !HasFocus();
00992 }

Here is the call graph for this function:

const UMSGMAP * UCvsFolders::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 85 of file UCvsFolders.cpp.

UTREEITEM UCvsFolders::GetItemByLocation ( const char * path ) [protected]

Definition at line 736 of file UCvsFolders.cpp.

References UTREE_INFO::child, CStr, UTREE_INFO::data, UStr::endsWith(), EV_TREE_GETINFO, UCmdTarget::GetWidID(), UTREE_INFO::item, kUMainWidget, UStr::length(), m_root, UTREE_INFO::next, UEventSendMessage(), and UTREEITEM.

Referenced by ResetView().

00737 {
00738     UStr root(m_root);
00739     if(!root.endsWith(kPathDelimiter))
00740         root << kPathDelimiter;
00741     UStr subpath(path);
00742     if(!subpath.endsWith(kPathDelimiter))
00743         subpath << kPathDelimiter;
00744
00745     // check if it is a sub-path
00746     if(strncmp(root, subpath, root.length()) != 0)
00747         return 0L;
00748
00749     UTREE_INFO query;
00750     query.item = 0L;
00751     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00752     UTREEITEM item = query.item;
00753     if(item == 0L)
00754         return 0L;
00755
00756     // step inside synchronized
00757     const char *tmp = (const char *)subpath + root.length() - 1;
00758     while((tmp = strchr(tmp, kPathDelimiter)) != 0L)
00759     {
00760         const char *name = ++tmp;
00761         if(name[0] == '\0')
00762             break;
00763
00764         CStr subname;
00765         const char *tmp2 = strchr(name, kPathDelimiter);
00766         if(tmp2 == 0L)
00767             subname = name;
00768         else
00769             subname.set(name, tmp2 - name);
00770
00771         UTREEITEM childItem = query.child;
00772
00773         // find the subitem which matches this name
00774         while(childItem != 0L)
00775         {
00776             query.item = childItem;
00777             UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00778             EntnodeData *data = (EntnodeData *)query.data;
00779             if(data != 0L)
00780             {
00781 #if qUnix
00782                 if(strcmp((*data)[EntnodeData::kName], subname) == 0)
00783 #else
00784                 if(_stricmp((*data)[EntnodeData::kName], subname) == 0)
00785 #endif
00786                 {
00787                     item = childItem;
00788                     break;
00789                 }
00790             }
00791
00792             childItem = query.next;
00793         }
00794         if(childItem == 0L)
00795             return 0L;
00796     }
00797
00798     return item;
00799 }

Here is the call graph for this function:

const UMSGMAP * UCvsFolders::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Definition at line 85 of file UCvsFolders.cpp.

const char* UCvsFolders::GetRoot ( void ) const [inline]

Definition at line 42 of file UCvsFolders.h.

References m_root.

Referenced by UCvsFrame::OnCmdSaveSettings(), and CvsPrefs::save().

00042 { return m_root; }

const URuntimeClass * UCvsFolders::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Definition at line 83 of file UCvsFolders.cpp.

const UMSGMAP * UCvsFolders::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 85 of file UCvsFolders.cpp.

int UCvsFolders::OnCmdAdd ( void ) [protected]

Definition at line 1036 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01037 {
01038     KoAddHandler handler;
01039     return ProcessSelectionCommand(handler);
01040 }

Here is the call graph for this function:

int UCvsFolders::OnCmdCheckout ( void ) [protected]

Definition at line 1183 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01184 {
01185   KoCheckoutHandler handler;
01186   return ProcessSelectionCommand(handler);
01187 }

Here is the call graph for this function:

int UCvsFolders::OnCmdCommit ( void ) [protected]

Definition at line 1042 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01043 {
01044     KoCommitHandler handler;
01045     return ProcessSelectionCommand(handler);
01046 }

Here is the call graph for this function:

int UCvsFolders::OnCmdDiff ( void ) [protected]

Definition at line 1054 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01055 {
01056     KoDiffHandler handler;
01057     return ProcessSelectionCommand(handler);
01058 }

Here is the call graph for this function:

int UCvsFolders::OnCmdEdit ( void ) [protected]

Definition at line 1096 of file UCvsFolders.cpp.

References KoEditHandler, and ProcessSelectionCommand().

01097 {
01098     KoEditHandler handler;
01099     return ProcessSelectionCommand(handler);
01100 }

Here is the call graph for this function:

int UCvsFolders::OnCmdEditors ( void ) [protected]

Definition at line 1126 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01127 {
01128     KoEditorsHandler handler;
01129     return ProcessSelectionCommand(handler);
01130 }

Here is the call graph for this function:

int UCvsFolders::OnCmdExplore ( void ) [protected]

Definition at line 1156 of file UCvsFolders.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CvsPrefs::Browser(), cvs_err(), EV_TREE_GETSEL, UCvsApp::Execute(), gCvsPrefs, UCmdTarget::GetWidID(), kUMainWidget, RetrievePath(), UEventSendMessage(), and UTREEITEM.

01157 {
01158     UTREEITEM *item;
01159     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &item);
01160     ASSERT(item != 0L);
01161
01162     UStr path;
01163     RetrievePath(item, path);
01164
01165 #ifdef WIN32
01166     HINSTANCE hInst = ShellExecute(*AfxGetMainWnd(), "explore", path,
01167             0L, 0L, SW_SHOWDEFAULT);
01168     if((long)hInst < 32)
01169     {
01170         cvs_err(_i18n("Unable to explore '%s' (error %d)\n"), (const char *)path, GetLastError());
01171     }
01172 #endif
01173 #ifdef qUnix
01174     CvsArgs args(false);
01175     args.add(gCvsPrefs.Browser());
01176     args.add(path);
01177     UCvsApp::gApp->Execute(args.Argc(), args.Argv());
01178 #endif
01179
01180     return 0;
01181 }

Here is the call graph for this function:

int UCvsFolders::OnCmdImport ( void ) [protected]

Definition at line 1189 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01190 {
01191   KoImportHandler handler;
01192   return ProcessSelectionCommand(handler);
01193 }

Here is the call graph for this function:

int UCvsFolders::OnCmdLock ( void ) [protected]

Definition at line 1072 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01073 {
01074     KoLockHandler handler;
01075     return ProcessSelectionCommand(handler);
01076 }

Here is the call graph for this function:

int UCvsFolders::OnCmdLog ( void ) [protected]

Definition at line 1060 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01061 {
01062     KoLogHandler handler;
01063     return ProcessSelectionCommand(handler);
01064 }

Here is the call graph for this function:

int UCvsFolders::OnCmdMacrosSel ( int cmd ) [protected]

Definition at line 1249 of file UCvsFolders.cpp.

References cmdSELMACRO, CStr, UTREE_INFO::data, CTcl_Interp::DoScriptVar(), CMacroSet::entries, EV_TREE_GETINFO, EV_TREE_GETSEL, UCmdTarget::GetWidID(), gMacrosSel, UTREE_INFO::item, kUMainWidget, CMacroEntry::path, PyDoPython(), ResetView(), RetrievePath(), SplitPath(), TclBrowserAppend(), TclBrowserReset(), UEventSendMessage(), CTcl_Interp::Unixfy(), EntnodeData::UnRef(), EntnodePath::UnRef(), and UTREEITEM.

01250 {
01251 #ifdef USE_PYTHON
01252     PyDoPython(cmd);
01253 #else
01254     CTcl_Interp interp;
01255     CMacroEntry & entry = gMacrosSel.entries[cmd - cmdSELMACRO];
01256     CStr path = entry.path;
01257     CTcl_Interp::Unixfy(path);
01258
01259     UTREEITEM selItem;
01260     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
01261
01262     CStr selPath;
01263     RetrievePath(selItem, selPath);
01264     CStr uppath, folder;
01265     SplitPath(selPath, uppath, folder);
01266
01267     UTREE_INFO query;
01268     query.item = selItem;
01269     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
01270     bool deleteData = false;
01271     EntnodeData *data = (EntnodeData *)query.data;
01272     if(data == 0L)
01273     {
01274         deleteData = true;
01275         EntnodePath *apath = new EntnodePath(uppath);
01276         data = new EntnodeFolder(folder, apath);
01277         apath->UnRef();
01278     }
01279
01280     TclBrowserReset();
01281     TclBrowserAppend(uppath, data);
01282
01283     interp.DoScriptVar("source \"%s\"", (const char *)path);
01284
01285     if(deleteData)
01286         data->UnRef();
01287 #endif
01288
01289     ResetView(true, true);
01290
01291     return 0;
01292 }

Here is the call graph for this function:

int UCvsFolders::OnCmdQueryUpdate ( void ) [protected]

Definition at line 1048 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01049 {
01050     KoQueryUpdateHandler handler;
01051     return ProcessSelectionCommand(handler);
01052 }

Here is the call graph for this function:

int UCvsFolders::OnCmdRelease ( void ) [protected]

Definition at line 1132 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01133 {
01134     KoReleaseHandler handler;
01135     return ProcessSelectionCommand(handler);
01136 }

Here is the call graph for this function:

int UCvsFolders::OnCmdResEdit ( void ) [protected]

Definition at line 1102 of file UCvsFolders.cpp.

References KoReservedEditHandler, and ProcessSelectionCommand().

01103 {
01104     KoReservedEditHandler handler;
01105     return ProcessSelectionCommand(handler);
01106 }

Here is the call graph for this function:

int UCvsFolders::OnCmdStatus ( void ) [protected]

Definition at line 1066 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01067 {
01068     KoStatusHandler handler;
01069     return ProcessSelectionCommand(handler);
01070 }

Here is the call graph for this function:

int UCvsFolders::OnCmdTagBranch ( void ) [protected]

Definition at line 1150 of file UCvsFolders.cpp.

References KoBranchTagHandler, and ProcessSelectionCommand().

01151 {
01152     KoBranchTagHandler handler;
01153     return ProcessSelectionCommand(handler);
01154 }

Here is the call graph for this function:

int UCvsFolders::OnCmdTagDelete ( void ) [protected]

Definition at line 1144 of file UCvsFolders.cpp.

References KoDeleteTagHandler, and ProcessSelectionCommand().

01145 {
01146     KoDeleteTagHandler handler;
01147     return ProcessSelectionCommand(handler);
01148 }

Here is the call graph for this function:

int UCvsFolders::OnCmdTagNew ( void ) [protected]

Definition at line 1138 of file UCvsFolders.cpp.

References KoCreateTagHandler, and ProcessSelectionCommand().

01139 {
01140     KoCreateTagHandler handler;
01141     return ProcessSelectionCommand(handler);
01142 }

Here is the call graph for this function:

void UCvsFolders::OnCmdUIAdd ( UCmdUI * pCmdUI ) [protected]

Definition at line 1195 of file UCvsFolders.cpp.

References OnUpdateGeneric().

01196 {
01197     OnUpdateGeneric(pCmdUI, false);
01198 }

Here is the call graph for this function:

void UCvsFolders::OnCmdUICheckout ( UCmdUI * pCmdUI ) [protected]

Definition at line 1212 of file UCvsFolders.cpp.

References UCmdUI::Enable(), gCvsPrefs, and UCvsApp::IsCvsRunning().

01213 {
01214     UCvsApp *app = UCvsApp::gApp;
01215     pCmdUI->Enable(!app->IsCvsRunning() && !gCvsPrefs.empty());
01216 }

Here is the call graph for this function:

void UCvsFolders::OnCmdUIExplore ( UCmdUI * pCmdUI ) [protected]

Definition at line 1200 of file UCvsFolders.cpp.

References DisableGeneric(), UCmdUI::Enable(), EV_TREE_GETSEL, UCmdTarget::GetWidID(), kUMainWidget, UEventSendMessage(), and UTREEITEM.

01201 {
01202     if(DisableGeneric())
01203     {
01204         pCmdUI->Enable(false);
01205         return;
01206     }
01207     UTREEITEM selItem;
01208     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
01209     pCmdUI->Enable(selItem != 0L);
01210 }

Here is the call graph for this function:

void UCvsFolders::OnCmdUIImport ( UCmdUI * pCmdUI ) [protected]

Definition at line 1218 of file UCvsFolders.cpp.

References UCmdUI::Enable(), gCvsPrefs, and UCvsApp::IsCvsRunning().

01219 {
01220     UCvsApp *app = UCvsApp::gApp;
01221     pCmdUI->Enable(!app->IsCvsRunning() && !gCvsPrefs.empty());
01222 }

Here is the call graph for this function:

void UCvsFolders::OnCmdUIMacrosSel | ( | int | cmd,
 |  | UCmdUI * | pCmdUI
 | ) | [protected]

Definition at line 1224 of file UCvsFolders.cpp.

References DisableGeneric(), UCmdUI::Enable(), EV_TREE_GETSEL, UCmdTarget::GetWidID(), kUMainWidget, UCmdUI::m_nID, PyDoCmdUI(), PyIsUICacheValid(), UEventSendMessage(), and UTREEITEM.

01225 {
01226     if(DisableGeneric())
01227     {
01228         pCmdUI->Enable(false);
01229         return;
01230     }
01231 #ifdef USE_PYTHON
01232     // Fill the cache with current selection
01233     if( !PyIsUICacheValid() )
01234     {
01235         UTREEITEM selItem;
01236         UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
01237     }
01238
01239     UCmdUI ucmdui((pCmdUI->m_nID));
01240     ucmdui.pCmdUI = pCmdUI;
01241     PyDoCmdUI(&ucmdui);
01242 #else
01243     UTREEITEM selItem;
01244     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
01245     pCmdUI->Enable(selItem != 0L && CTcl_Interp::IsAvail());
01246 #endif
01247 }

Here is the call graph for this function:

void UCvsFolders::OnCmdUIResEdit ( UCmdUI * pCmdUI ) [protected]

Definition at line 1108 of file UCvsFolders.cpp.

References CvsPrefs::CvsVersion(), gCvsPrefs, and OnCmdUIUpdate().

01109 {
01110     if(gCvsPrefs.CvsVersion() == 1)
01111         OnCmdUIUpdate(pCmdUI);
01112 }

Here is the call graph for this function:

void UCvsFolders::OnCmdUIUpdate ( UCmdUI * pCmdUI ) [protected]

Definition at line 1031 of file UCvsFolders.cpp.

References OnUpdateGeneric().

Referenced by OnCmdUIResEdit().

01032 {
01033     OnUpdateGeneric(pCmdUI, true);
01034 }

Here is the call graph for this function:

int UCvsFolders::OnCmdUnedit ( void ) [protected]

Definition at line 1114 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01115 {
01116     KoUneditHandler handler;
01117     return ProcessSelectionCommand(handler);
01118 }

Here is the call graph for this function:

int UCvsFolders::OnCmdUnlock ( void ) [protected]

Definition at line 1078 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01079 {
01080     KoUnlockHandler handler;
01081     return ProcessSelectionCommand(handler);
01082 }

Here is the call graph for this function:

int UCvsFolders::OnCmdUpdate ( void ) [protected]

Definition at line 1025 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01026 {
01027   KoUpdateHandler handler;
01028   return ProcessSelectionCommand(handler);
01029 }

Here is the call graph for this function:

int UCvsFolders::OnCmdWatchers ( void ) [protected]

Definition at line 1120 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01121 {
01122     KoWatchersHandler handler;
01123     return ProcessSelectionCommand(handler);
01124 }

Here is the call graph for this function:

int UCvsFolders::OnCmdWatchOff ( void ) [protected]

Definition at line 1090 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01091 {
01092     KoWatchOffHandler handler;
01093     return ProcessSelectionCommand(handler);
01094 }

Here is the call graph for this function:

int UCvsFolders::OnCmdWatchOn ( void ) [protected]

Definition at line 1084 of file UCvsFolders.cpp.

References ProcessSelectionCommand().

01085 {
01086     KoWatchOnHandler handler;
01087     return ProcessSelectionCommand(handler);
01088 }

Here is the call graph for this function:

void UCvsFolders::OnCreate ( ) [protected]

Definition at line 498 of file UCvsFolders.cpp.

References UStr::empty(), gCvsPrefs, gOldLoc, CvsPrefs::Home(), ResetBrowser(), sFolderIcon, sFolderIgnoredIcon, sFolderMissingIcon, sFolderUnknownIcon, and UCreate_pixmap().

00499 {
00500     if(sFolderIcon == 0L)
00501     {
00502         sFolderIcon = UCreate_pixmap(this, "folder.xpm");
00503         sFolderUnknownIcon = UCreate_pixmap(this, "foldunk.xpm");
00504         sFolderIgnoredIcon = UCreate_pixmap(this, "foldign.xpm");
00505         sFolderMissingIcon = UCreate_pixmap(this, "foldmiss.xpm");
00506     }
00507     UStr newpath;
00508     newpath = (const char *)gOldLoc;
00509     if(newpath.empty())
00510         newpath = gCvsPrefs.Home();
00511
00512     // set the initial root
00513     ResetBrowser(newpath, true);
00514 }

Here is the call graph for this function:

void UCvsFolders::OnDestroy ( ) [protected]

Definition at line 493 of file UCvsFolders.cpp.

00494 {
00495     delete this;
00496 }

void UCvsFolders::OnTreeExpanding | ( | int | collapse,
 |  | UTREEITEM | item
 | ) | [protected]

Definition at line 801 of file UCvsFolders.cpp.

References UTREE_INSERT::data, UTREE_INFO::data, DeleteAllItems(), ENT_SUBDIR, Entries_SetMissing(), EV_TREE_EXPAND, EV_TREE_GETINFO, EV_TREE_INSERT, FileTraverse(), CSortList< T >::Get(), GetIcon(), EntnodeData::GetType(), UCmdTarget::GetWidID(), UTREE_INSERT::icon, USemaphore::IsEnteredTwice(), EntnodeData::IsMissing(), UTREE_INFO::item, kUMainWidget, CSortList< T >::NumOfElements(), UTREE_INSERT::parent, EntnodeData::Ref(), RetrievePath(), UTREE_INSERT::title, UEventSendMessage(), UMAKEINT, and UTREEITEM.

00802 {
00803     // many situations make that we enter here twice. Fortunately enough
00804     // we only dare the first signal.
00805     static bool sSemaphore = false;
00806     USemaphore policeman(sSemaphore);
00807     if(policeman.IsEnteredTwice())
00808         return;
00809
00810     UWaitCursor wait;
00811
00812     UTREE_INFO query;
00813     query.item = item;
00814     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00815     EntnodeData *data = (EntnodeData *)query.data;
00816
00817     // we refuse to expand in this case cause the folder is not really here
00818     if(data != 0L && data->IsMissing())
00819     {
00820         UEventSendMessage(GetWidID(), EV_TREE_EXPAND, UMAKEINT(kUMainWidget, 1), item);
00821         return;
00822     }
00823
00824     // erase all the childs
00825     DeleteAllItems(item);
00826
00827     UStr path;
00828     RetrievePath(item, path);
00829
00830     if(collapse)
00831     {
00832         TBrowserFillDummy traverse(this, 0L, item, 0L);
00833         /*kTraversal res = */FileTraverse(path, traverse);
00834     }
00835     else
00836     {
00837         CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00838         TBrowserFill traverse(this, 0L, item, entries);
00839         /*kTraversal res = */FileTraverse(path, traverse);
00840
00841 #if qGTK
00842         // gtk is closing the tree when we removed everything in it
00843         UEventSendMessage(GetWidID(), EV_TREE_EXPAND, UMAKEINT(kUMainWidget, 0), item);
00844 #endif
00845
00846         // add the missing folders
00847         Entries_SetMissing(entries);
00848         int numEntries = entries.NumOfElements();
00849         for(int i = 0; i < numEntries; i++)
00850         {
00851             const ENTNODE & theNode = entries.Get(i);
00852             EntnodeData *data = ((ENTNODE *)&theNode)->Data();
00853             if(!data->IsMissing() || data->GetType() != ENT_SUBDIR)
00854                 continue;
00855
00856             UTREE_INSERT insert;
00857             insert.parent = item;
00858             insert.icon = GetIcon(this, item, false, false, data->Ref());
00859             insert.title = (*data)[EntnodeData::kName];
00860             insert.data = data;
00861             UEventSendMessage(GetWidID(), EV_TREE_INSERT, kUMainWidget, &insert);
00862         }
00863     }
00864 }

Here is the call graph for this function:

void UCvsFolders::OnTreeSelecting | ( | int | deselect,
 |  | UTREEITEM | item
 | ) | [protected]

Definition at line 866 of file UCvsFolders.cpp.

References UStr::c_str(), UTREE_INFO::data, EV_CHGFOCUS, EV_TREE_GETINFO, UCvsApp::GetFilesView(), UCvsFiles::GetPath(), UCmdTarget::GetWidID(), UObject::IsKindOf(), EntnodeData::IsMissing(), UTREE_INFO::item, kUMainWidget, UCvsFiles::ResetView(), RetrievePath(), sTemporaryTurnOffNotify, UEventSendMessage(), URUNTIME_CLASS, and UTREEITEM.

00867 {
00868     if(deselect)
00869         return;
00870
00871     UTREE_INFO query;
00872     query.item = item;
00873     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00874     EntnodeData *data = (EntnodeData *)query.data;
00875     if(data != 0L && data->IsMissing())
00876         return;
00877
00878     UCvsFiles *fileView = UCvsApp::gApp->GetFilesView();
00879
00880     if(!sTemporaryTurnOffNotify && fileView)
00881     {
00882         UStr path;
00883         RetrievePath(item, path);
00884
00885         // reset file view only if path changes
00886         if(fileView->GetPath() != path)
00887         {
00888             ASSERT(fileView->IsKindOf(URUNTIME_CLASS(UCvsFiles)));
00889             fileView->ResetView(path.c_str(), false);
00890         }
00891
00892         /* recover the focus */
00893         UEventSendMessage(GetWidID(), EV_CHGFOCUS, kUMainWidget, 0L);
00894     }
00895 }

Here is the call graph for this function:

void UCvsFolders::OnUpdateGeneric | ( | UCmdUI * | pCmdUI,
 |  | bool | needCvsInfos
 | ) | [protected]

Definition at line 994 of file UCvsFolders.cpp.

References DisableGeneric(), UCmdUI::Enable(), UStr::endsWith(), EV_TREE_GETSEL, UCmdTarget::GetWidID(), kUMainWidget, RetrievePath(), stat::st_mode, stat, UEventSendMessage(), and UTREEITEM.

Referenced by OnCmdUIAdd(), and OnCmdUIUpdate().

00995 {
00996     if(DisableGeneric())
00997     {
00998         pCmdUI->Enable(false);
00999         return;
01000     }
01001
01002     UTREEITEM *item;
01003     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &item);
01004     if(item == 0L)
01005     {
01006         pCmdUI->Enable(false);
01007         return;
01008     }
01009
01010     UStr path;
01011     RetrievePath(item, path);
01012     if(!path.endsWith(kPathDelimiter))
01013         path << kPathDelimiter;
01014     path << "CVS";
01015
01016     struct stat sb;
01017     if (stat(path, &sb) == -1 || !S_ISDIR(sb.st_mode))
01018         pCmdUI->Enable(!needCvsInfos);
01019     else
01020         pCmdUI->Enable(needCvsInfos);
01021 }

Here is the call graph for this function:

int UCvsFolders::ProcessSelectionCommand ( KiSelectionHandler & handler ) [protected]

Definition at line 468 of file UCvsFolders.cpp.

References BUTTONTITLE_OK, EV_TREE_GETSEL, UCmdTarget::GetWidID(), kCvsAlertWarningIcon, kUMainWidget, NULL, KiSelectionHandler::OnFolder(), RetrievePath(), CvsAlert::ShowAlert(), UEventSendMessage(), and UTREEITEM.

Referenced by OnCmdAdd(), OnCmdCheckout(), OnCmdCommit(), OnCmdDiff(), OnCmdEdit(), OnCmdEditors(), OnCmdImport(), OnCmdLock(), OnCmdLog(), OnCmdQueryUpdate(), OnCmdRelease(), OnCmdResEdit(), OnCmdStatus(), OnCmdTagBranch(), OnCmdTagDelete(), OnCmdTagNew(), OnCmdUnedit(), OnCmdUnlock(), OnCmdUpdate(), OnCmdWatchers(), OnCmdWatchOff(), and OnCmdWatchOn().

00469 {
00470   bool res = false;
00471   UTREEITEM *selItem;
00472
00473     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
00474
00475   if( selItem ) {
00476     UStr path;
00477     RetrievePath(selItem, path);
00478
00479     handler.OnFolder(path);
00480     res = true;
00481   } else {
00482     CvsAlert alert(kCvsAlertWarningIcon,
00483                    "Checkout folder required",
00484                    "Please select a folder before checking out a module",
00485                    BUTTONTITLE_OK,
00486                    NULL
00487                    );
00488     alert.ShowAlert();  }
00489
00490   return res;
00491 }

Here is the call graph for this function:

void UCvsFolders::ResetBrowser | ( | const char * | path,
 |  | bool | notifyView = false
 | ) |

Definition at line 516 of file UCvsFolders.cpp.

References AskCreatePersistentSettings(), CStr, DeleteAllItems(), UStr::empty(), UStr::endsWith(), EV_COMBO_APPEND, EV_COMBO_RESETALL, EV_COMBO_SETSEL, EV_TREE_EXPAND, FileTraverse(), UCvsApp::GetFilesView(), TMString< T >::GetList(), UCmdTarget::GetWidID(), gHistoryLocs, gOldLoc, HasPersistentSettings(), TMString< T >::Insert(), kUCvsFrameID, kUMainWidget, LoadPersistentSettings(), TBrowserFillDummy::m_item, m_root, UCvsFiles::ResetView(), stat::st_mode, stat, UEventSendMessage(), and UMAKEINT.

Referenced by UCvsFrame::OnBrowserPopup(), UCvsFrame::OnComboSelDir(), OnCreate(), and ResetView().

00517 {
00518     UWaitCursor wait;
00519
00520     // Must make a copy of 'path' before calling DeleteAllItems(), since
00521     // this function may have been called with 'm_root' passed as the first
00522     // parameter (in fact it is in several places in the code) whose value
00523     // gets deleted by the call to DeleteAllItems() below, making 'path'
00524     // point to an invalid memory location
00525     CStr pathCopy(path);
00526     DeleteAllItems();
00527     bool isReload = !pathCopy.empty() && !m_root.empty() && stricmp(m_root, pathCopy) == 0;
00528
00529     m_root = pathCopy;
00530
00531     if( pathCopy.empty() )
00532         return;
00533
00534     if(!isReload)
00535     {
00536         if(HasPersistentSettings(m_root))
00537             LoadPersistentSettings(m_root);
00538         else
00539         {
00540             // check if the path has a CVS folder. If not,
00541             // we don't want the user to be prompted (like when
00542             // WinCvs is starting for the first time).
00543             UStr cvsFolder(m_root);
00544             if(!cvsFolder.endsWith(kPathDelimiter))
00545                 cvsFolder << kPathDelimiter;
00546             cvsFolder << "CVS";
00547             struct stat sb;
00548             if (stat(cvsFolder, &sb) != -1 && S_ISDIR(sb.st_mode))
00549                 AskCreatePersistentSettings(m_root);
00550         }
00551     }
00552
00553     if(stricmp(gOldLoc, m_root) != 0)
00554         gOldLoc = m_root;
00555
00556     // update the history combo
00557     gHistoryLocs.Insert(m_root);
00558     UEventSendMessage(kUCvsFrameID, EV_COMBO_RESETALL, UCvsFrame::kDirCombo, 0L);
00559     const std::vector<UStr> & list = gHistoryLocs.GetList();
00560     std::vector<UStr>::const_iterator i;
00561     int pos = 0;
00562     for(i = list.begin(); i != list.end(); ++i, pos++)
00563     {
00564         UEventSendMessage(kUCvsFrameID, EV_COMBO_APPEND,
00565                           UCvsFrame::kDirCombo, (void *)(const char *)*i);
00566     }
00567     UEventSendMessage(kUCvsFrameID, EV_COMBO_SETSEL, UMAKEINT(UCvsFrame::kDirCombo, 0), 0L);
00568
00569     // fill the browser
00570     TBrowserFillDummy traverse(this, 0L, 0L, 0L);
00571     /*kTraversal res = */FileTraverse(m_root, traverse);
00572
00573     if(traverse.m_item != 0L)
00574     {
00575         UEventSendMessage(GetWidID(), EV_TREE_EXPAND, UMAKEINT(kUMainWidget, 0), traverse.m_item);
00576         if(notifyView && UCvsApp::gApp->GetFilesView())
00577             UCvsApp::gApp->GetFilesView()->ResetView(pathCopy, false);
00578     }
00579 }

Here is the call graph for this function:

void UCvsFolders::ResetView | ( | bool | forceReload = false,
 |  | bool | notifyView = false
 | ) |

Definition at line 581 of file UCvsFolders.cpp.

References UStr::empty(), EV_CHGFOCUS, EV_TREE_GETSEL, EV_TREE_SELECT, UCvsApp::GetFilesView(), GetItemByLocation(), UCmdTarget::GetWidID(), kUMainWidget, m_root, ResetBrowser(), UCvsFiles::ResetView(), RetrievePath(), StepToLocation(), StoreExpanded(), UEventSendMessage(), UMAKEINT, and UTREEITEM.

Referenced by UCvsFrame::OnCmdIgnore(), OnCmdMacrosSel(), and UCvsFiles::ResetView().

00582 {
00583     UWaitCursor doWait;
00584
00585     std::vector<UStr> allExpanded;
00586     StoreExpanded(allExpanded);
00587
00588     bool contentChanged = false;
00589     UStr selPath;
00590     UTREEITEM selItem;
00591     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
00592     if(selItem != 0L)
00593         RetrievePath(selItem, selPath);
00594
00595     if(forceReload)
00596     {
00597         ResetBrowser(m_root);
00598         contentChanged = true;
00599     }
00600
00601     if(contentChanged)
00602     {
00603         // restore the expanded paths and the selected item
00604         std::vector<UStr>::const_iterator i;
00605         for(i = allExpanded.begin(); i != allExpanded.end(); ++i)
00606         {
00607             StepToLocation(*i);
00608         }
00609         if(!selPath.empty())
00610         {
00611             selItem = GetItemByLocation(selPath);
00612             if(selItem != 0L)
00613                 UEventSendMessage(GetWidID(), EV_TREE_SELECT, UMAKEINT(kUMainWidget, 0), selItem);
00614         }
00615     }
00616
00617     // we don't need to notify the file view if we force the reload
00618     // because that's already done
00619     if(notifyView)
00620     {
00621         UCvsApp::gApp->GetFilesView()->ResetView(forceReload, false);
00622     }
00623     UEventSendMessage(GetWidID(), EV_CHGFOCUS, kUMainWidget, 0L);
00624 }

Here is the call graph for this function:

void UCvsFolders::RetrievePath | ( | UTREEITEM | item,
 |  | UStr & | path
 | ) |

Definition at line 910 of file UCvsFolders.cpp.

References UStr::endsWith(), EV_TREE_GETINFO, UCmdTarget::GetWidID(), UTREE_INFO::item, kUMainWidget, m_root, UTREE_INFO::parent, UTREE_INFO::title, UEventSendMessage(), and UTREEITEM.

Referenced by OnCmdExplore(), OnCmdMacrosSel(), OnTreeExpanding(), OnTreeSelecting(), OnUpdateGeneric(), ProcessSelectionCommand(), ResetView(), and StoreExpanded().

00911 {
00912     UStr tmp, newPath;
00913     path = "";
00914
00915     do
00916     {
00917         UTREE_INFO query;
00918         query.item = item;
00919         UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00920
00921         item = query.parent;
00922
00923         tmp = path;
00924         newPath = item == 0L ? (const char *)m_root : query.title;
00925         if(!newPath.endsWith(kPathDelimiter))
00926             newPath << kPathDelimiter;
00927         newPath << path;
00928         path = newPath;
00929     } while(item != 0L);
00930 }

Here is the call graph for this function:

const URuntimeClass * UCvsFolders::rtUCvsFolders ( void ) [static]

Definition at line 83 of file UCvsFolders.cpp.

void UCvsFolders::SetDefaultRoot ( const char * root ) [static]

Definition at line 897 of file UCvsFolders.cpp.

References _i18n, cvs_err(), gOldLoc, stat::st_mode, and stat.

Referenced by UCvsApp::UCvsApp().

00898 {
00899     struct stat sb;
00900
00901     if (stat(root, &sb) == -1 || !S_ISDIR(sb.st_mode))
00902     {
00903         cvs_err(_i18n("Cannot access directory '%s' (error %d)\n"), root, errno);
00904         return;
00905     }
00906
00907     gOldLoc = root;
00908 }

Here is the call graph for this function:

void UCvsFolders::StepToLocation | ( | const char * | path,
 |  | bool | notifyView = false
 | ) |

Definition at line 654 of file UCvsFolders.cpp.

References UTREE_INFO::child, UTREE_INFO::data, UStr::endsWith(), EV_TREE_EXPAND, EV_TREE_GETINFO, EV_TREE_SELECT, UCmdTarget::GetWidID(), UTREE_INFO::item, kUMainWidget, UStr::length(), m_root, UTREE_INFO::next, UStr::set(), sTemporaryTurnOffNotify, UEventSendMessage(), UMAKEINT, and UTREEITEM.

Referenced by ResetView(), and UCvsFiles::ResetView().

00655 {
00656     UStr root(m_root);
00657     if(!root.endsWith(kPathDelimiter))
00658         root << kPathDelimiter;
00659     UStr subpath(path);
00660     if(!subpath.endsWith(kPathDelimiter))
00661         subpath << kPathDelimiter;
00662
00663     // check if it is a sub-path
00664     if(strncmp(root, subpath, root.length()) != 0)
00665         return;
00666
00667     UTREE_INFO query;
00668     query.item = 0L;
00669     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00670
00671     UTREEITEM item = query.item;
00672     UTREEITEM lastitem = 0L;
00673     if(item == 0L)
00674         return;
00675
00676     // step inside synchronized
00677     const char *tmp = (const char *)subpath + root.length() - 1;
00678     while((tmp = strchr(tmp, kPathDelimiter)) != 0L)
00679     {
00680         const char *name = ++tmp;
00681         if(name[0] == '\0')
00682             break;
00683
00684         UStr subname;
00685         const char *tmp2 = strchr(name, kPathDelimiter);
00686         if(tmp2 == 0L)
00687             subname = name;
00688         else
00689             subname.set(name, tmp2 - name);
00690
00691         query.item = item;
00692         UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00693         UTREEITEM childItem = query.child;
00694
00695         // find the subitem which matches this name
00696         while(childItem != 0L)
00697         {
00698             query.item = childItem;
00699             UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00700             EntnodeData *data = (EntnodeData *)query.data;
00701             if(data != 0L)
00702             {
00703 #ifdef qUnix
00704                 if(strcmp((*data)[EntnodeData::kName], subname) == 0)
00705 #else
00706                 if(_stricmp((*data)[EntnodeData::kName], subname) == 0)
00707 #endif
00708                 {
00709                     // found it !
00710                     lastitem = item = childItem;
00711                     UEventSendMessage(GetWidID(), EV_TREE_EXPAND, UMAKEINT(kUMainWidget, 0), item);
00712                     break;
00713                 }
00714             }
00715
00716             childItem = query.next;
00717         }
00718     }
00719
00720     // in case this is called by the view, turn off notifying
00721     // when the item gets selected
00722     if(lastitem != 0L)
00723     {
00724         if(!notifyView)
00725         {
00726             CTempToggleBool toggler(sTemporaryTurnOffNotify);
00727             UEventSendMessage(GetWidID(), EV_TREE_SELECT, UMAKEINT(kUMainWidget, 0), lastitem);
00728         }
00729         else
00730         {
00731             UEventSendMessage(GetWidID(), EV_TREE_SELECT, UMAKEINT(kUMainWidget, 0), lastitem);
00732         }
00733     }
00734 }

Here is the call graph for this function:

void UCvsFolders::StoreExpanded | ( | std::vector< UStr > & | allExpanded,
 |  | UTREEITEM | root = 0L
 | ) | [protected]

Definition at line 626 of file UCvsFolders.cpp.

References UTREE_INFO::child, EV_TREE_GETINFO, UTREE_INFO::expanded, UCmdTarget::GetWidID(), UTREE_INFO::item, kUMainWidget, UTREE_INFO::next, RetrievePath(), UEventSendMessage(), and UTREEITEM.

Referenced by ResetView().

00627 {
00628     UTREE_INFO query;
00629     query.item = root;
00630     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00631
00632     UTREEITEM item = query.item;
00633     if(item == 0L)
00634         return;
00635
00636     if(query.expanded)
00637     {
00638         UStr path;
00639         RetrievePath(item, path);
00640         allExpanded.push_back(path);
00641     }
00642
00643     UTREEITEM childItem = query.child;
00644
00645     while(childItem != 0L)
00646     {
00647         StoreExpanded(allExpanded, childItem);
00648         query.item = childItem;
00649         UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00650         childItem = query.next;
00651     }
00652 }

Here is the call graph for this function:

Member Data Documentation

const UMSGMAP_ENTRY UCvsFolders::_messageEntries [static, private]

Reimplemented from UWidget.

Definition at line 85 of file UCvsFolders.cpp.

const URuntimeClass UCvsFolders::classUCvsFolders [static, protected]

UStr UCvsFolders::m_root [protected]

Definition at line 69 of file UCvsFolders.h.

Referenced by GetItemByLocation(), GetRoot(), ResetBrowser(), ResetView(), RetrievePath(), and StepToLocation().

const UMSGMAP UCvsFolders::messageMap = { UWidget ::GetThisMessageMap(), & UCvsFolders ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Definition at line 85 of file UCvsFolders.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsFolders.h
  • common/UCvsFolders.cpp
Generated on Sat Aug 7 22:51:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsFrame Class Reference

UCvsFrame Class Reference

#include <UCvsFrame.h>

Inheritance diagram for UCvsFrame:

[legend]
Collaboration diagram for UCvsFrame:

[legend]
List of all members.

Public Types

enum {
kDirCombo = EV_COMMAND_START,
kBrowserPopup
}

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsFrame ()
virtual | ~UCvsFrame ()
bool | AskForQuitting (void)
KiFilterModel * | GetFilterModel (void)
KiRecursionModel * | GetRecursionModel (void)
KiIgnoreModel * | GetIgnoreModel (void)
void | OnFilterMaskEntered (void)
bool | FreshenFileMask (void)
int | OnCmdIgnore (void)

Static Public Member Functions

const URuntimeClass * | rtUCvsFrame (void)

Protected Member Functions

void | OnCmdUIAnytime (int cmd, UCmdUI *pCmdUI)
void | OnCmdUIViewRecursive (UCmdUI *pCmdUI)
void | OnCmdUIViewIgnored (UCmdUI *pCmdUI)
void | OnCmdUIFilterMask (UCmdUI *pCmdUI)
void | OnCmdUIViewAdded (UCmdUI *pCmdUI)
void | OnCmdUIViewModified (UCmdUI *pCmdUI)
void | OnCmdUIViewConflict (UCmdUI *pCmdUI)
void | OnCmdUIViewUnknown (UCmdUI *pCmdUI)
void | OnCmdUIViewMissing (UCmdUI *pCmdUI)
void | OnCmdUIViewRemoved (UCmdUI *pCmdUI)
void | OnCmdUIViewChanged (UCmdUI *pCmdUI)
void | OnCmdUIHideUnknown (UCmdUI *pCmdUI)
void | OnCmdUIReload (UCmdUI *pCmdUI)
void | OnCmdUIQuit (UCmdUI *pCmdUI)
void | OnCmdUIIgnore (UCmdUI *pCmdUI)
void | OnCmdUIStopcvs (UCmdUI *pCmdUI)
void | OnCmdUICvsCmd (UCmdUI *pCmdUI)
void | OnCmdUIMacroAdmin (int cmd, UCmdUI *pCmdUI)
void | OnCmdUIPyMacro (int cmd, UCmdUI *pCmdUI)
void | OnCreate (void)
void | OnDestroy (void)
void | OnCmdUIUseTclShell (UCmdUI *pCmdUI)
void | OnCmdUIUsePyShell (UCmdUI *pCmdUI)
int | OnQuit (void)
int | OnCopyrights (void)
int | OnCredits (void)
int | OnAbout (void)
void | OnComboSelDir (int pos, const char *txt)
int | OnBrowserPopup (void)
int | OnCmdPreferences (void)
int | OnCmdSaveSettings (void)
int | OnCmdRtagNew (void)
int | OnCmdRtagDelete (void)
int | OnCmdRtagBranch (void)
int | OnCmdUseTclShell (void)
int | OnCmdUsePyShell (void)
int | OnCmdCmdline (void)
int | OnCmdLogin (void)
int | OnCmdLogout (void)
int | OnCmdStopcvs (void)
int | OnCmdInit (void)
int | OnCmdMacroAdmin (int cmd)
int | OnViewIgnored (void)
int | OnViewRecursive (void)
int | OnViewAdded (void)
int | OnViewModified (void)
int | OnViewConflict (void)
int | OnViewUnknown (void)
int | OnViewMissing (void)
int | OnViewRemoved (void)
int | OnViewChanged (void)
int | OnHideUnknown (void)
int | OnCmdReload (void)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

KoFilterModel m_filter
KoRecursionModel m_recursion
KoIgnoreModel m_ignore
bool InUpdateUI

Static Protected Attributes

const URuntimeClass | classUCvsFrame
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UCvsFrame ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Member Enumeration Documentation

anonymous enum

Enumeration values:
kDirCombo
kBrowserPopup
Definition at line 44 of file UCvsFrame.h.
00045     {
00046         kDirCombo = EV_COMMAND_START,   // 0
00047         kBrowserPopup                   // 1
00048     };

Constructor & Destructor Documentation

UCvsFrame::UCvsFrame ( )

Definition at line 151 of file UCvsFrame.cpp.

References kUCvsFrameID.

00151                      : UWidget(kUCvsFrameID), InUpdateUI(false)
00152 {
00153 }

UCvsFrame::~UCvsFrame ( ) [virtual]

Definition at line 155 of file UCvsFrame.cpp.

00156 {
00157 }

Member Function Documentation

const URuntimeClass * UCvsFrame::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 54 of file UCvsFrame.cpp.

bool UCvsFrame::AskForQuitting ( void )

bool UCvsFrame::FreshenFileMask ( void )

Definition at line 455 of file UCvsFrame.cpp.

References cmdVIEW_FILEMASK, EV_GETTEXT, filterFileMasks, UCmdTarget::GetWidID(), TMString< T >::Insert(), kUCvsFilterToolbarID, m_filter, KoFilterModel::SetMask(), and UEventSendMessage().

Referenced by OnCmdReload(), OnFilterMaskEntered(), OnHideUnknown(), OnViewAdded(), OnViewChanged(), OnViewConflict(), OnViewMissing(), OnViewModified(), OnViewRemoved(), and OnViewUnknown().

00456 {
00457     UStr strFileMask;
00458     UCvsToolbar* toolbar = (UCvsToolbar *)::UEventQueryWidget(kUCvsFilterToolbarID);
00459
00460     UEventSendMessage(toolbar->GetWidID(), EV_GETTEXT, cmdVIEW_FILEMASK, &strFileMask);
00461
00462     filterFileMasks.Insert(strFileMask);
00463
00464     ::DoDataExchange(true, toolbar->GetWidID(), cmdVIEW_FILEMASK, filterFileMasks);
00465
00466     return m_filter.SetMask(EntnodeData::kName, strFileMask);
00467 }

Here is the call graph for this function:

const UMSGMAP * UCvsFrame::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 56 of file UCvsFrame.cpp.

KiFilterModel* UCvsFrame::GetFilterModel ( void ) [inline]

Definition at line 60 of file UCvsFrame.h.

References m_filter.

Referenced by UCvsApp::GetFilterModel().

00061     {
00062         return &m_filter;
00063     }

KiIgnoreModel* UCvsFrame::GetIgnoreModel ( void ) [inline]

Definition at line 72 of file UCvsFrame.h.

References m_ignore.

Referenced by UCvsApp::GetIgnoreModel().

00073     {
00074         return &m_ignore;
00075     }

const UMSGMAP * UCvsFrame::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Definition at line 56 of file UCvsFrame.cpp.

KiRecursionModel* UCvsFrame::GetRecursionModel ( void ) [inline]

Definition at line 66 of file UCvsFrame.h.

References m_recursion.

Referenced by UCvsApp::GetRecursionModel().

00067     {
00068         return &m_recursion;
00069     }

const URuntimeClass * UCvsFrame::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Definition at line 54 of file UCvsFrame.cpp.

const UMSGMAP * UCvsFrame::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 56 of file UCvsFrame.cpp.

int UCvsFrame::OnAbout ( void ) [protected]

Definition at line 227 of file UCvsFrame.cpp.

References AboutDialog().

00228 {
00229     AboutDialog();
00230     return 0;
00231 }

Here is the call graph for this function:

int UCvsFrame::OnBrowserPopup ( void ) [protected]

Definition at line 186 of file UCvsFrame.cpp.

References _i18n, BrowserGetDirectory(), CStr, UCvsApp::GetBrowserView(), and UCvsFolders::ResetBrowser().

00187 {
00188     CStr newPath;
00189     if( BrowserGetDirectory(_i18n("Select a folder to open with the browser"), newPath) )
00190     {
00191         UCvsApp::gApp->GetBrowserView()->ResetBrowser(newPath, true);
00192     }
00193
00194     return 0;
00195 }

Here is the call graph for this function:

int UCvsFrame::OnCmdCmdline ( void ) [protected]

Definition at line 342 of file UCvsFrame.cpp.

References CvsCmdCommandLine().

00343 {
00344   KoCommandLineHandler handler;
00345     CvsCmdCommandLine(handler);
00346     return 0;
00347 }

Here is the call graph for this function:

int UCvsFrame::OnCmdIgnore ( void )

Definition at line 691 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, UCvsApp::GetBrowserView(), UCvsApp::GetIgnoreModel(), m_ignore, and UCvsFolders::ResetView().

00692 {
00693     BLOCK_UPDATE_UI
00694     KoIgnoreModel *m_ignore = (KoIgnoreModel *)UCvsApp::gApp->GetIgnoreModel();
00695     m_ignore->ToggleIgnore();
00696
00697     UCvsApp::gApp->GetBrowserView()->ResetView(true, true);
00698     return 0;
00699 }

Here is the call graph for this function:

int UCvsFrame::OnCmdInit ( void ) [protected]

Definition at line 373 of file UCvsFrame.cpp.

References CvsCmdInit().

00374 {
00375     CvsCmdInit();
00376     return 0;
00377 }

Here is the call graph for this function:

int UCvsFrame::OnCmdLogin ( void ) [protected]

Definition at line 349 of file UCvsFrame.cpp.

References CvsCmdLogin().

00350 {
00351     CvsCmdLogin();
00352     return 0;
00353 }

Here is the call graph for this function:

int UCvsFrame::OnCmdLogout ( void ) [protected]

Definition at line 355 of file UCvsFrame.cpp.

References CvsCmdLogout().

00356 {
00357     CvsCmdLogout();
00358     return 0;
00359 }

Here is the call graph for this function:

int UCvsFrame::OnCmdMacroAdmin ( int cmd ) [protected]

Definition at line 379 of file UCvsFrame.cpp.

References cmdMACROADMIN, CvsCmdMacrosAdmin(), CMacroSet::entries, gMacrosAdmin, CMacroEntry::path, and PyDoPython().

00380 {
00381 #ifndef USE_PYTHON
00382     CMacroEntry & entry = gMacrosAdmin.entries[cmd - cmdMACROADMIN];
00383     CvsCmdMacrosAdmin(entry.path);
00384 #else
00385     PyDoPython(cmd);
00386 #endif
00387     return 0;
00388 }

Here is the call graph for this function:

int UCvsFrame::OnCmdPreferences ( void ) [protected]

Definition at line 302 of file UCvsFrame.cpp.

References gCvsPrefs.

00303 {
00304     UCvsConsole* console = UCvsApp::gApp->GetConsole();
00305     CompatGetPrefs();
00306
00307     if(console != 0l)
00308         console->setFont(gCvsPrefs.ConsoleFont());
00309     return 0;
00310 }

int UCvsFrame::OnCmdReload ( void ) [protected]

Definition at line 622 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, and NotificationManager::NotifyAll().

00623 {
00624     BLOCK_UPDATE_UI
00625     FreshenFileMask();
00626     m_filter.GetNotificationManager()->NotifyAll();
00627
00628     return 0;
00629 }

Here is the call graph for this function:

int UCvsFrame::OnCmdRtagBranch ( void ) [protected]

Definition at line 335 of file UCvsFrame.cpp.

References CvsCmdRtag(), KoRtagBranchHandler, and kTagBranch.

00336 {
00337   KoRtagBranchHandler handler;
00338     CvsCmdRtag(handler, kTagBranch);
00339     return 0;
00340 }

Here is the call graph for this function:

int UCvsFrame::OnCmdRtagDelete ( void ) [protected]

Definition at line 328 of file UCvsFrame.cpp.

References CvsCmdRtag(), KoRtagDeleteHandler, and kTagDelete.

00329 {
00330   KoRtagDeleteHandler handler;
00331     CvsCmdRtag(handler, kTagDelete);
00332     return 0;
00333 }

Here is the call graph for this function:

int UCvsFrame::OnCmdRtagNew ( void ) [protected]

Definition at line 320 of file UCvsFrame.cpp.

References CvsCmdRtag(), KoRtagCreateHandler, and kTagCreate.

00321 {
00322   KoRtagCreateHandler handler;
00323     CvsCmdRtag(handler, kTagCreate);
00324
00325     return 0;
00326 }

Here is the call graph for this function:

int UCvsFrame::OnCmdSaveSettings ( void ) [protected]

Definition at line 312 of file UCvsFrame.cpp.

References AskCreatePersistentSettings(), UCvsApp::GetBrowserView(), and UCvsFolders::GetRoot().

00313 {
00314     UCvsFolders *browser = UCvsApp::gApp->GetBrowserView();
00315     if(browser != 0L && browser->GetRoot() != 0L)
00316         AskCreatePersistentSettings(browser->GetRoot());
00317     return 0;
00318 }

Here is the call graph for this function:

int UCvsFrame::OnCmdStopcvs ( void ) [protected]

Definition at line 361 of file UCvsFrame.cpp.

References _i18n, cvs_out(), UCvsApp::GetCvsProcess(), and UCvsApp::SetCvsStopping().

00362 {
00363     UCvsApp::gApp->SetCvsStopping(true);
00364     if(UCvsApp::gApp->GetCvsProcess() != 0L && cvs_process_is_active(UCvsApp::gApp->GetCvsProcess()))
00365     {
00366         cvs_process_stop(UCvsApp::gApp->GetCvsProcess());
00367         cvs_out(_i18n("***** CVS stopped on user request !!! *****\n\n"));
00368     }
00369
00370     return 0;
00371 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIAnytime | ( | int | cmd,
 |  | UCmdUI * | pCmdUI
 | ) | [protected]

Definition at line 222 of file UCvsFrame.cpp.

References UCmdUI::Enable().

00223 {
00224     pCmdUI->Enable(!UCvsApp::gApp->IsCvsRunning());
00225 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUICvsCmd ( UCmdUI * pCmdUI ) [protected]

Definition at line 395 of file UCvsFrame.cpp.

References UCmdUI::Enable(), and IsAppEnabled().

00396 {
00397     pCmdUI->Enable(IsAppEnabled());
00398 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIFilterMask ( UCmdUI * pCmdUI ) [protected]

Definition at line 448 of file UCvsFrame.cpp.

References UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), and START_UPDATE_UI.

00449 {
00450     START_UPDATE_UI
00451     pCmdUI->Enable(IsAppEnabled());
00452     END_UPDATE_UI
00453 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIHideUnknown ( UCmdUI * pCmdUI ) [protected]

Definition at line 614 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), KoFilterModel::IsDefaultMode(), KoFilterModel::IsHideUnknown(), m_filter, and START_UPDATE_UI.

00615 {
00616     START_UPDATE_UI
00617     pCmdUI->Enable(IsAppEnabled() && m_filter.IsDefaultMode());
00618     pCmdUI->Check(m_filter.IsHideUnknown());
00619     END_UPDATE_UI
00620 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIIgnore ( UCmdUI * pCmdUI ) [protected]

Definition at line 701 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, UCvsApp::GetIgnoreModel(), IsAppEnabled(), m_ignore, and START_UPDATE_UI.

00702 {
00703     START_UPDATE_UI
00704     KoIgnoreModel *m_ignore = (KoIgnoreModel *)UCvsApp::gApp->GetIgnoreModel();
00705     pCmdUI->Enable(IsAppEnabled());
00706     pCmdUI->Check(m_ignore->IsShowIgnored());
00707     END_UPDATE_UI
00708 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIMacroAdmin | ( | int | cmd,
 |  | UCmdUI * | pCmdUI
 | ) | [protected]

Definition at line 400 of file UCvsFrame.cpp.

References UCmdUI::Enable(), EV_LIST_GETNEXTSEL, EV_LIST_ROWGETDATA, UCmdTarget::GetWidID(), IsAppEnabled(), kUMainWidget, UCmdUI::m_nID, PyAppendCache(), PyDoCmdUI(), PyIsUICacheValid(), UEventSendMessage(), and UMAKEINT.

00401 {
00402 #ifndef USE_PYTHON
00403     pCmdUI->Enable(IsAppEnabled() && CTcl_Interp::IsAvail());
00404 #else
00405     if(!IsAppEnabled())
00406     {
00407         pCmdUI->Enable(false);
00408         return;
00409     }
00410     if( !PyIsUICacheValid() )
00411     {
00412         int nItem = -1;
00413         while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
00414         {
00415             EntnodeData *data;
00416             bool deleteData = false;
00417             UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
00418
00419             PyAppendCache(data);
00420         }
00421     } {
00422
00423     UCmdUI ucmdui(pCmdUI->m_nID);
00424     ucmdui.pCmdUI = pCmdUI;
00425     PyDoCmdUI(&ucmdui);
00426     }
00427 #endif
00428 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIPyMacro | ( | int | cmd,
 |  | UCmdUI * | pCmdUI
 | ) | [protected]

void UCvsFrame::OnCmdUIQuit ( UCmdUI * pCmdUI ) [protected]

Definition at line 217 of file UCvsFrame.cpp.

References UCmdUI::Enable().

00218 {
00219     pCmdUI->Enable(true);
00220 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIReload ( UCmdUI * pCmdUI ) [protected]

Definition at line 631 of file UCvsFrame.cpp.

References UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), and START_UPDATE_UI.

00632 {
00633     START_UPDATE_UI
00634     pCmdUI->Enable(IsAppEnabled());
00635     END_UPDATE_UI
00636 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIStopcvs ( UCmdUI * pCmdUI ) [protected]

Definition at line 390 of file UCvsFrame.cpp.

References UCmdUI::Enable().

00391 {
00392     pCmdUI->Enable(UCvsApp::gApp->IsCvsRunning() && !UCvsApp::gApp->IsCvsStopping());
00393 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIUsePyShell ( UCmdUI * pCmdUI ) [protected]

void UCvsFrame::OnCmdUIUseTclShell ( UCmdUI * pCmdUI ) [protected]

void UCvsFrame::OnCmdUIViewAdded ( UCmdUI * pCmdUI ) [protected]

Definition at line 560 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, KoFilterModel::IsAdded(), IsAppEnabled(), m_filter, and START_UPDATE_UI.

00561 {
00562     START_UPDATE_UI
00563     pCmdUI->Enable(IsAppEnabled());
00564     pCmdUI->Check(m_filter.IsAdded());
00565     END_UPDATE_UI
00566 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIViewChanged ( UCmdUI * pCmdUI ) [protected]

Definition at line 596 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), KoFilterModel::IsChanged(), m_filter, and START_UPDATE_UI.

00597 {
00598     START_UPDATE_UI
00599     pCmdUI->Enable(IsAppEnabled());
00600     pCmdUI->Check(m_filter.IsChanged());
00601     END_UPDATE_UI
00602 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIViewConflict ( UCmdUI * pCmdUI ) [protected]

Definition at line 506 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), KoFilterModel::IsConflict(), m_filter, and START_UPDATE_UI.

00507 {
00508     START_UPDATE_UI
00509     pCmdUI->Enable(IsAppEnabled());
00510     pCmdUI->Check(m_filter.IsConflict());
00511     END_UPDATE_UI
00512 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIViewIgnored ( UCmdUI * pCmdUI ) [protected]

Definition at line 440 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), KoIgnoreModel::IsShowIgnored(), m_ignore, and START_UPDATE_UI.

00441 {
00442     START_UPDATE_UI
00443     pCmdUI->Enable(IsAppEnabled());
00444     pCmdUI->Check(m_ignore.IsShowIgnored());
00445     END_UPDATE_UI
00446 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIViewMissing ( UCmdUI * pCmdUI ) [protected]

Definition at line 542 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), KoFilterModel::IsMissing(), m_filter, and START_UPDATE_UI.

00543 {
00544     START_UPDATE_UI
00545     pCmdUI->Enable(IsAppEnabled());
00546     pCmdUI->Check(m_filter.IsMissing());
00547     END_UPDATE_UI
00548 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIViewModified ( UCmdUI * pCmdUI ) [protected]

Definition at line 479 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), KoFilterModel::IsModified(), m_filter, and START_UPDATE_UI.

00480 {
00481     START_UPDATE_UI
00482     pCmdUI->Enable(IsAppEnabled());
00483     pCmdUI->Check(m_filter.IsModified());
00484     END_UPDATE_UI
00485 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIViewRecursive ( UCmdUI * pCmdUI ) [protected]

void UCvsFrame::OnCmdUIViewRemoved ( UCmdUI * pCmdUI ) [protected]

Definition at line 568 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), KoFilterModel::IsRemoved(), m_filter, and START_UPDATE_UI.

00569 {
00570     START_UPDATE_UI
00571     pCmdUI->Enable(IsAppEnabled());
00572     pCmdUI->Check(m_filter.IsRemoved());
00573     END_UPDATE_UI
00574 }

Here is the call graph for this function:

void UCvsFrame::OnCmdUIViewUnknown ( UCmdUI * pCmdUI ) [protected]

Definition at line 524 of file UCvsFrame.cpp.

References UCmdUI::Check(), UCmdUI::Enable(), END_UPDATE_UI, IsAppEnabled(), KoFilterModel::IsUnknown(), m_filter, and START_UPDATE_UI.

00525 {
00526     START_UPDATE_UI
00527     pCmdUI->Enable(IsAppEnabled());
00528     pCmdUI->Check(m_filter.IsUnknown());
00529     END_UPDATE_UI
00530 }

Here is the call graph for this function:

int UCvsFrame::OnCmdUsePyShell ( void ) [protected]

int UCvsFrame::OnCmdUseTclShell ( void ) [protected]

void UCvsFrame::OnComboSelDir | ( | int | pos,
 |  | const char * | txt
 | ) | [protected]

Definition at line 181 of file UCvsFrame.cpp.

References UCvsApp::GetBrowserView(), and UCvsFolders::ResetBrowser().

00182 {
00183     UCvsApp::gApp->GetBrowserView()->ResetBrowser(txt, true);
00184 }

Here is the call graph for this function:

int UCvsFrame::OnCopyrights ( void ) [protected]

Definition at line 233 of file UCvsFrame.cpp.

References _i18n, cvs_out(), and UCvsApp::GetAppName().

00234 {
00235     const char *appName = UCvsApp::gApp->GetAppName();
00236
00237     cvs_out(_i18n("\nBoth %s and CVS are distributed under the terms of\n"
00238               "the GNU General Public License (GPL).\n\n"), appName);
00239     cvs_out(_i18n("* %s : maintained by Alexandre Parenteau (aubonbeurre@hotmail.com)\n"), appName);
00240     cvs_out(_i18n("* CVS : Copyright © 1989-1998 Brian Berliner, david d `zoo' zuhn,\n"));
00241     cvs_out(_i18n("        Jeff Polk, and other authors\n"));
00242 #ifdef macintosh
00243     printf("* MacCVS : Mike Ladwig, Matthias Neeracher, Alexandre Parenteau\n");
00244     printf("* GUSI : Copyright © 1992-1997 Matthias Neeracher\n");
00245     printf("* Waste : Copyright © 1993-1998 Marco Piovanelli\n");
00246     printf("* CWASTEEdit : Copyright © 1995-1997 Timothy Paustian\n");
00247     printf(_i18n("* ABalloon : Freeware of James W. Walker (jwwalker@kagi.com)\n"));
00248     printf("* Metrowerks Standard Library, PowerPlant & CodeWarrior :\n");
00249     printf("    Copyright © 1996-1997 Metrowerks Inc.\n");
00250     printf("* MPW, MoreFiles : Copyright © Apple Computer Inc.\n");
00251 #endif
00252 #ifdef WIN32
00253     cvs_out(_i18n("* WinCvs documentation : Copyright © 1999 Don Harper <don@lamrc.com>.\n"));
00254     cvs_out(_i18n("* CJLIB : Copyright © 1998-99 Kirk Stowell <kstowell@codejockeys.com>\n"));
00255     cvs_out(_i18n("* MFC : Copyright © 1992-1997 Microsoft Corporation\n"));
00256 #endif
00257     cvs_out(_i18n("* Kerberos : Copyright © 1997 Massachusetts Institute of Technology\n"));
00258     cvs_out(_i18n("* TCL : Copyright © Sun Microsystems Inc.\n"));
00259     cvs_out(_i18n("\nSome others copyrights may apply, check the source code for details.\n"));
00260     return 0;
00261 }

Here is the call graph for this function:

void UCvsFrame::OnCreate ( void ) [protected]

Definition at line 164 of file UCvsFrame.cpp.

References NotificationManager::CheckIn(), UCvsApp::GetIgnoreModel(), KiFilterBase::GetNotificationManager(), and onIgnoreChanged().

00165 {
00166     if( UCvsApp* app = UCvsApp::gApp )
00167         app->GetIgnoreModel()->GetNotificationManager()->CheckIn((CObject*)this, onIgnoreChanged);
00168 }

Here is the call graph for this function:

int UCvsFrame::OnCredits ( void ) [protected]

Definition at line 263 of file UCvsFrame.cpp.

References _i18n, cvs_out(), UCvsApp::GetAppName(), and UCvsApp::GetAppVersion().

00264 {
00265     const char *appName = UCvsApp::gApp->GetAppName();
00266     const char *appVers = UCvsApp::gApp->GetAppVersion();
00267
00268 #ifndef macintosh
00269     cvs_out(_i18n("\n%s %s - Client/Local\n"), appName, appVers);
00270 #else
00271     cvs_out(_i18n("\n%s %s - Client\n"), appName, appVers);
00272 #endif
00273     cvs_out(_i18n("%s is maintained by Alexandre Parenteau\n"), appName);
00274     cvs_out(_i18n("- WinCvs/MacCvs/gcvs page : http://www.wincvs.org or http://cvsgui.sourceforge.net/\n"));
00275     cvs_out(_i18n("- cvs page : http://www.cvshome.org\n"));
00276 #ifdef WIN32
00277     cvs_out(_i18n("- WinCvs documentation : Don Harper <don@lamrc.com>.\n"));
00278     cvs_out(_i18n("- WinHelp cvs documentation : Norbert Klamann.\n"));
00279 #endif
00280 #ifdef macintosh
00281     printf(_i18n("- Mac port :\n"));
00282     printf("\t* Mike Ladwig <mike@twinpeaks.prc.com>\n");
00283     printf("\t* Matthias Neeracher <neeri@iis.ee.ethz.ch>\n");
00284     printf("\t* Alexandre Parenteau <aubonbeurre@hotmail.com>\n");
00285     printf(_i18n("- With contributions of :\n");
00286     printf("\t* Miro Jurisic <meeroh@mit.edu> (Kerberos)\n");
00287     printf("\t* Aleks Totic <atotic@netscape.com> (AppleSingle)\n");
00288     printf("\t* Jocelyn Houle <houlejo@IRO.UMontreal.CA> (Help balloons)\n");
00289 #endif
00290     cvs_out(_i18n("- Special thanks to :\n"));
00291     cvs_out(_i18n("\t* Gary Bringhurst from C3D Digital who gives me time, resources,\n"
00292               "\t  help and ideas for doing this project (http://www.3d.com)\n"));
00293     cvs_out(_i18n("\t* The Freeware community for providing cvs, Linux, Perl, GTK, gcc\n"
00294               "\t  and so many others valuables tools\n"));
00295     cvs_out(_i18n("\t* The users of the CvsGui project (WinCvs, MacCvs, gcvs) who have\n"
00296               "\t  defined all the functionnalities and help every day to enhance it\n"));
00297     cvs_out(_i18n("- Cvs contributors :\n"));
00298     cvs_out(_i18n("\t* Too many to be listed here, see the 'ChangeLog' instead !\n"));
00299     return 0;
00300 }

Here is the call graph for this function:

void UCvsFrame::OnDestroy ( void ) [protected]

Definition at line 170 of file UCvsFrame.cpp.

References NotificationManager::CheckOut(), UCvsApp::GetIgnoreModel(), and KiFilterBase::GetNotificationManager().

00171 {
00172 #if qGTK
00173     gtk_main_quit();
00174 #endif /* qGTK */
00175
00176     if( UCvsApp* app = UCvsApp::gApp )
00177         app->GetIgnoreModel()->GetNotificationManager()->CheckOut((CObject*)this);
00178     delete this;
00179 }

Here is the call graph for this function:

void UCvsFrame::OnFilterMaskEntered ( void )

Definition at line 487 of file UCvsFrame.cpp.

References FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, and NotificationManager::NotifyAll().

Referenced by OnViewIgnored(), and UCvsFiles::OnViewRecursive().

00488 {
00489 //  BLOCK_UPDATE_UI
00490     if (FreshenFileMask())
00491     {
00492         m_filter.GetNotificationManager()->NotifyAll();
00493     }
00494 }

Here is the call graph for this function:

int UCvsFrame::OnHideUnknown ( void ) [protected]

Definition at line 604 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleHideUnknown().

00605 {
00606     BLOCK_UPDATE_UI
00607     m_filter.ToggleHideUnknown();
00608     FreshenFileMask();
00609     m_filter.GetNotificationManager()->NotifyAll();
00610
00611     return 0;
00612 }

Here is the call graph for this function:

int UCvsFrame::OnQuit ( void ) [protected]

Definition at line 197 of file UCvsFrame.cpp.

References _i18n, BUTTONTITLE_OK, gCvsPrefs, UCvsApp::IsCvsRunning(), kCvsAlertNoteIcon, kCvsAlertOKButton, NULL, CvsPrefs::save(), and CvsAlert::ShowAlert().

00198 {
00199     if(UCvsApp::gApp->IsCvsRunning()) {
00200         CvsAlert al(kCvsAlertNoteIcon, _i18n("Cvs is currently running."),
00201                  _i18n("Stop CVS first before exiting."), BUTTONTITLE_OK, NULL);
00202
00203         al.ShowAlert(kCvsAlertOKButton);
00204
00205         return 0;
00206     }
00207
00208     gCvsPrefs.save();
00209
00210 #if qGTK
00211     gtk_main_quit();
00212 #endif /* qGTK */
00213
00214     return 0;
00215 }

Here is the call graph for this function:

int UCvsFrame::OnViewAdded ( void ) [protected]

Definition at line 550 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleAdded().

00551 {
00552     BLOCK_UPDATE_UI
00553     m_filter.ToggleAdded();
00554     FreshenFileMask();
00555     m_filter.GetNotificationManager()->NotifyAll();
00556
00557     return 0;
00558 }

Here is the call graph for this function:

int UCvsFrame::OnViewChanged ( void ) [protected]

Definition at line 586 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleChanged().

00587 {
00588     BLOCK_UPDATE_UI
00589     m_filter.ToggleChanged();
00590     FreshenFileMask();
00591     m_filter.GetNotificationManager()->NotifyAll();
00592
00593     return 0;
00594 }

Here is the call graph for this function:

int UCvsFrame::OnViewConflict ( void ) [protected]

Definition at line 496 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleConflict().

00497 {
00498     BLOCK_UPDATE_UI
00499     m_filter.ToggleConflict();
00500     FreshenFileMask();
00501     m_filter.GetNotificationManager()->NotifyAll();
00502
00503     return 0;
00504 }

Here is the call graph for this function:

int UCvsFrame::OnViewIgnored ( void ) [protected]

Definition at line 430 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, KoIgnoreModel::GetNotificationManager(), m_ignore, NotificationManager::NotifyAll(), OnFilterMaskEntered(), and KoIgnoreModel::ToggleIgnore().

00431 {
00432     BLOCK_UPDATE_UI
00433     m_ignore.ToggleIgnore();
00434     m_ignore.GetNotificationManager()->NotifyAll();
00435     OnFilterMaskEntered();
00436
00437     return 0;
00438 }

Here is the call graph for this function:

int UCvsFrame::OnViewMissing ( void ) [protected]

Definition at line 532 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleMissing().

00533 {
00534     BLOCK_UPDATE_UI
00535     m_filter.ToggleMissing();
00536     FreshenFileMask();
00537     m_filter.GetNotificationManager()->NotifyAll();
00538
00539     return 0;
00540 }

Here is the call graph for this function:

int UCvsFrame::OnViewModified ( void ) [protected]

Definition at line 469 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleModified().

00470 {
00471     BLOCK_UPDATE_UI
00472     m_filter.ToggleModified();
00473     FreshenFileMask();
00474     m_filter.GetNotificationManager()->NotifyAll();
00475
00476     return 0;
00477 }

Here is the call graph for this function:

int UCvsFrame::OnViewRecursive ( void ) [protected]

int UCvsFrame::OnViewRemoved ( void ) [protected]

Definition at line 576 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleRemoved().

00577 {
00578     BLOCK_UPDATE_UI
00579     m_filter.ToggleRemoved();
00580     FreshenFileMask();
00581     m_filter.GetNotificationManager()->NotifyAll();
00582
00583     return 0;
00584 }

Here is the call graph for this function:

int UCvsFrame::OnViewUnknown ( void ) [protected]

Definition at line 514 of file UCvsFrame.cpp.

References BLOCK_UPDATE_UI, FreshenFileMask(), KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleUnknown().

00515 {
00516     BLOCK_UPDATE_UI
00517     m_filter.ToggleUnknown();
00518     FreshenFileMask();
00519     m_filter.GetNotificationManager()->NotifyAll();
00520
00521     return 0;
00522 }

Here is the call graph for this function:

const URuntimeClass * UCvsFrame::rtUCvsFrame ( void ) [static]

Definition at line 54 of file UCvsFrame.cpp.

Member Data Documentation

const UMSGMAP_ENTRY UCvsFrame::_messageEntries [static, private]

Reimplemented from UWidget.

Definition at line 56 of file UCvsFrame.cpp.

const URuntimeClass UCvsFrame::classUCvsFrame [static, protected]

bool UCvsFrame::InUpdateUI [protected]

Definition at line 56 of file UCvsFrame.h.

KoFilterModel UCvsFrame::m_filter [protected]

Definition at line 52 of file UCvsFrame.h.

Referenced by FreshenFileMask(), GetFilterModel(), OnCmdReload(), OnCmdUIHideUnknown(), OnCmdUIViewAdded(), OnCmdUIViewChanged(), OnCmdUIViewConflict(), OnCmdUIViewMissing(), OnCmdUIViewModified(), OnCmdUIViewRemoved(), OnCmdUIViewUnknown(), OnFilterMaskEntered(), OnHideUnknown(), OnViewAdded(), OnViewChanged(), OnViewConflict(), OnViewMissing(), OnViewModified(), OnViewRemoved(), and OnViewUnknown().

KoIgnoreModel UCvsFrame::m_ignore [protected]

Definition at line 54 of file UCvsFrame.h.

Referenced by GetIgnoreModel(), OnCmdIgnore(), OnCmdUIIgnore(), OnCmdUIViewIgnored(), and OnViewIgnored().

KoRecursionModel UCvsFrame::m_recursion [protected]

Definition at line 53 of file UCvsFrame.h.

Referenced by GetRecursionModel().

const UMSGMAP UCvsFrame::messageMap = { UWidget ::GetThisMessageMap(), & UCvsFrame ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Definition at line 56 of file UCvsFrame.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsFrame.h
  • common/UCvsFrame.cpp
Generated on Sat Aug 7 22:51:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsGraph Class Reference

UCvsGraph Class Reference

#include <UCvsGraph.h>

Inheritance diagram for UCvsGraph:

[legend]
Collaboration diagram for UCvsGraph:

[legend]
List of all members.

Public Types

enum | { kDrawing = EV_COMMAND_START }

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsGraph (CLogNode *node, const char *dir)
virtual | ~UCvsGraph ()

Static Public Member Functions

const URuntimeClass * | rtUCvsGraph (void)

Protected Member Functions

void | CalcImageSize (void)
void | OnDestroy ()
void | OnCreate ()
void | OnDrawing (void *info)
void | OnBtnClick (void *info)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

CLogNode * | m_node
UStr m_dir
UStr m_name
EntnodeData * m_data

Static Protected Attributes

const URuntimeClass | classUCvsGraph
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UCvsGraph ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Member Enumeration Documentation

anonymous enum

Enumeration values:
kDrawing
Definition at line 133 of file UCvsGraph.h.
00134     {
00135         kDrawing = EV_COMMAND_START // 0
00136     };

Constructor & Destructor Documentation

UCvsGraph::UCvsGraph | ( | CLogNode * | node,
 |  | const char * | dir
 | ) |

Definition at line 49 of file UCvsGraph.cpp.

References cvs_err(), Entries_Open(), Entries_SetVisited(), and stat.

00049                                                     :
00050     UWidget(::UEventGetWidID()), m_node(node), m_dir(dir), m_data(0L)
00051 {
00052     // get the CVS/Entries infos for this file
00053     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00054     if(!Entries_Open (entries, dir))
00055     {
00056         cvs_err("Warning : Error while accessing the CVS folder in '%s'\n", dir);
00057     }
00058     else
00059     {
00060         if(node->GetType() != kNodeHeader)
00061         {
00062             cvs_err("Warning : Top node is not a RCS file description !\n");
00063         }
00064         else
00065         {
00066             const char *name = (**(CLogNodeHeader *)node).WorkingFile();
00067             struct stat sb;
00068             if (stat(name, &sb) == -1)
00069             {
00070                 cvs_err("Warning : Unknown file '%s'\n", name);
00071             }
00072             else
00073             {
00074                 m_data = Entries_SetVisited(dir, entries, name, sb, false);
00075                 m_data->Ref();
00076                 m_name = name;
00077             }
00078         }
00079     }
00080 }

Here is the call graph for this function:

UCvsGraph::~UCvsGraph ( ) [virtual]

Definition at line 82 of file UCvsGraph.cpp.

References m_data, m_node, and EntnodeData::UnRef().

00083 {
00084     if(m_node != 0L)
00085         delete m_node;
00086     if(m_data != 0L)
00087         m_data->UnRef();
00088 }

Here is the call graph for this function:

Member Function Documentation

const URuntimeClass * UCvsGraph::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 39 of file UCvsGraph.cpp.

void UCvsGraph::CalcImageSize ( void ) [protected]

Definition at line 613 of file UCvsGraph.cpp.

References CWinLogData::Bounds(), CWinLogData::ComputeBounds(), CWinLogData::CreateNewData(), UWidget::GetWidget(), UCmdTarget::GetWidID(), URect::Height(), kDrawing, m_data, m_node, CWinLogData::Offset(), URect::Size(), URect::TopLeft(), and URect::Width().

Referenced by OnDrawing().

00614 {
00615     if(m_node == 0L)
00616         return;
00617
00618     // set all the bounds locations
00619     UDC dc(GetWidID(), kDrawing);
00620     CWinLogData *data = CWinLogData::CreateNewData(m_node);
00621     m_node->SetUserData(data);
00622     UPoint start(5, 5);
00623     data->ComputeBounds(start, dc, m_data);
00624
00625     // reoffset from (0, 0)
00626     URect bounds = data->Bounds();
00627     data->Offset(start - bounds.TopLeft());
00628     bounds = data->Bounds();
00629
00630 #if qGTK
00631     GtkWidget *layout = (GtkWidget *)GetWidget(kDrawing);
00632     gtk_drawing_area_size(GTK_DRAWING_AREA(layout), bounds.Width()+5, bounds.Height()+5);
00633 #endif
00634 #if 0
00635     // set the scroll size
00636     SetScrollSizes(MM_TEXT, bounds.Size() + USize(5, 5));
00637 #endif
00638 }

Here is the call graph for this function:

const UMSGMAP * UCvsGraph::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 41 of file UCvsGraph.cpp.

const UMSGMAP * UCvsGraph::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Definition at line 41 of file UCvsGraph.cpp.

const URuntimeClass * UCvsGraph::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Definition at line 39 of file UCvsGraph.cpp.

const UMSGMAP * UCvsGraph::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 41 of file UCvsGraph.cpp.

void UCvsGraph::OnBtnClick ( void * info ) [protected]

Definition at line 697 of file UCvsGraph.cpp.

References CvsLogOutput(), UCmdTarget::GetWidID(), CWinLogData::HitTest(), kDrawing, m_data, m_node, CWinLogData::Selected(), CWinLogData::SetSelected(), UK_LBUTTON, CWinLogData::UnselectAll(), and CWinLogData::Update().

00698 {
00699     GdkEventButton *event = (GdkEventButton *)info;
00700     UPoint point((int)event->x, (int)event->y);
00701     int nFlags = event->state;
00702     CWinLogData *data = (CWinLogData *)m_node->GetUserData();
00703     UDC dc(GetWidID(), kDrawing);
00704
00705     //fprintf(stderr,"x: %f, y:%f, x_root: %f, y_root:%f, state:%d, button:%d\n",
00706     //              event->x, event->y, event->x_root, event->y_root, event->state, event->button);
00707
00708     if(event->button & UK_LBUTTON ) {
00709         if((nFlags & GDK_SHIFT_MASK) == 0 && (nFlags & GDK_CONTROL_MASK) == 0)
00710             data->UnselectAll();
00711
00712         CWinLogData *hit = data->HitTest(point);
00713
00714         if(hit != 0L) {
00715             if((nFlags & GDK_SHIFT_MASK) == 0 && (nFlags & GDK_CONTROL_MASK) == 0) {
00716                 if(!hit->Selected()) {
00717                     CColorConsole out;
00718
00719                     hit->SetSelected(true);
00720
00721                     CvsLogOutput(out, hit->Node());
00722                 }
00723             } else {
00724                 hit->SetSelected(!hit->Selected());
00725             }
00726
00727             data->Update(dc, m_data);
00728         }
00729     }
00730 }

Here is the call graph for this function:

void UCvsGraph::OnCreate ( ) [protected]

Definition at line 95 of file UCvsGraph.cpp.

References EV_SETTEXT, UCmdTarget::GetWidID(), kUMainWidget, m_name, and UEventSendMessage().

00096 {
00097     UStr title("Graph log : ");
00098     title << m_name;
00099     UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, (void *)(const char *)title);
00100 }

Here is the call graph for this function:

void UCvsGraph::OnDestroy ( ) [protected]

Definition at line 90 of file UCvsGraph.cpp.

00091 {
00092     delete this;
00093 }

void UCvsGraph::OnDrawing ( void * info ) [protected]

Definition at line 640 of file UCvsGraph.cpp.

References CalcImageSize(), UWidget::GetWidget(), UCmdTarget::GetWidID(), kDrawing, m_data, m_node, UWidget::OnBlockHandler(), UWidget::OnUnblockHandler(), and CWinLogData::Update().

00641 {
00642 #if qGTK
00643     GdkEventExpose *event = (GdkEventExpose *)info;
00644     GtkDrawingArea *drawing = GTK_DRAWING_AREA(GetWidget(kDrawing));
00645     gdk_window_clear_area (drawing->widget.window,
00646                            event->area.x, event->area.y,
00647                            event->area.width, event->area.height);
00648     //fprintf(stderr,"Area: x: %d, y:%d, width: %d, height:%d\n",
00649     //      event->area.x, event->area.y, event->area.width, event->area.height);
00650 #endif
00651     CalcImageSize();
00652
00653     if(m_node == 0L || m_node->GetUserData() == 0L)
00654         return;
00655
00656     OnBlockHandler(drawing, kDrawing, GDK_EXPOSE);
00657
00658     UDC dc(GetWidID(), kDrawing);
00659     CWinLogData *data = (CWinLogData *)m_node->GetUserData();
00660     data->Update(dc, m_data);
00661
00662     while (gtk_events_pending())
00663           gtk_main_iteration();
00664
00665     OnUnblockHandler(drawing, kDrawing, GDK_EXPOSE);
00666
00667     /*  GtkWidget *widget = (GtkWidget *)GetWidget(kDrawing);
00668     if(widget == 0L)
00669         return;
00670
00671     GtkDrawingArea *darea;
00672     GdkDrawable *drawable;
00673     GdkGC *black_gc;
00674     GdkGC *gray_gc;
00675     GdkGC *white_gc;
00676     guint max_width;
00677     guint max_height;
00678
00679     g_return_if_fail (widget != NULL);
00680     g_return_if_fail (GTK_IS_DRAWING_AREA (widget));
00681
00682     darea = GTK_DRAWING_AREA (widget);
00683     drawable = widget->window;
00684     white_gc = widget->style->white_gc;
00685     gray_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
00686     black_gc = widget->style->black_gc;
00687     max_width = widget->allocation.width;
00688     max_height = widget->allocation.height;
00689     gdk_draw_rectangle (drawable, black_gc,
00690                         TRUE,
00691                         0,
00692                         max_height / 2,
00693                         max_width,
00694                         max_height / 2);*/
00695 }

Here is the call graph for this function:

const URuntimeClass * UCvsGraph::rtUCvsGraph ( void ) [static]

Definition at line 39 of file UCvsGraph.cpp.

Member Data Documentation

const UMSGMAP_ENTRY UCvsGraph::_messageEntries [static, private]

Initial value:

   {
    { EV_DESTROY, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsGraph ::OnDestroy },
    { EV_CREATE, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsGraph ::OnCreate },
    { EV_CUSTOM_DRAW, epV_VP, UMSG_RANGE,  UCvsGraph::kDrawing ,  UCvsGraph::kDrawing ,   (UPMSG)(void (UCmdTarget::*)(void *drawInfo))& UCvsGraph::OnDrawing  },
    { EV_CUSTOM_CLICK, epV_VP, UMSG_RANGE,  UCvsGraph::kDrawing ,  UCvsGraph::kDrawing ,   (UPMSG)(void (UCmdTarget::*)(void *drawInfo))& UCvsGraph::OnBtnClick  },
    { EV_RESIZE, epV_VP, UMSG_RANGE,  UCvsGraph::kDrawing ,  UCvsGraph::kDrawing ,   (UPMSG)(void (UCmdTarget::*)(const URECT * r))& UCvsGraph::OnDrawing  },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UWidget.

Definition at line 41 of file UCvsGraph.cpp.

const URuntimeClass UCvsGraph::classUCvsGraph [static, protected]

EntnodeData* UCvsGraph::m_data [protected]

Definition at line 141 of file UCvsGraph.h.

Referenced by CalcImageSize(), OnBtnClick(), OnDrawing(), and ~UCvsGraph().

UStr UCvsGraph::m_dir [protected]

Definition at line 139 of file UCvsGraph.h.

UStr UCvsGraph::m_name [protected]

Definition at line 140 of file UCvsGraph.h.

Referenced by OnCreate().

CLogNode* UCvsGraph::m_node [protected]

Definition at line 138 of file UCvsGraph.h.

Referenced by CalcImageSize(), OnBtnClick(), OnDrawing(), and ~UCvsGraph().

const UMSGMAP UCvsGraph::messageMap = { UWidget ::GetThisMessageMap(), & UCvsGraph ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Definition at line 41 of file UCvsGraph.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsGraph.h
  • common/UCvsGraph.cpp
Generated on Sat Aug 7 22:51:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsMenubar Class Reference

UCvsMenubar Class Reference

#include <UCvsMenubar.h>

Inheritance diagram for UCvsMenubar:

[legend]
Collaboration diagram for UCvsMenubar:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsMenubar ()
virtual | ~UCvsMenubar ()

Static Public Member Functions

const URuntimeClass * | rtUCvsMenubar (void)

Protected Member Functions

void | OnDestroy ()
void | OnCreate ()
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Static Protected Attributes

const URuntimeClass | classUCvsMenubar
const UMSGMAP | messageMap = { UMenu ::GetThisMessageMap(), & UCvsMenubar ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Constructor & Destructor Documentation

UCvsMenubar::UCvsMenubar ( )

Definition at line 38 of file UCvsMenubar.cpp.

00038                          : UMenu(kUCvsMenubarID)
00039 {
00040 }

UCvsMenubar::~UCvsMenubar ( ) [virtual]

Definition at line 42 of file UCvsMenubar.cpp.

00043 {
00044 }

Member Function Documentation

const URuntimeClass * UCvsMenubar::_GetBaseClass ( ) [static, protected]

Reimplemented from UMenu.

Definition at line 31 of file UCvsMenubar.cpp.

const UMSGMAP * UCvsMenubar::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UMenu.

Definition at line 33 of file UCvsMenubar.cpp.

const UMSGMAP * UCvsMenubar::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UMenu.

Definition at line 33 of file UCvsMenubar.cpp.

const URuntimeClass * UCvsMenubar::GetRuntimeClass ( ) const [virtual]

Reimplemented from UMenu.

Definition at line 31 of file UCvsMenubar.cpp.

const UMSGMAP * UCvsMenubar::GetThisMessageMap ( ) [static, protected]

Reimplemented from UMenu.

Definition at line 33 of file UCvsMenubar.cpp.

void UCvsMenubar::OnCreate ( ) [protected]

Definition at line 51 of file UCvsMenubar.cpp.

00052 {
00053 }

void UCvsMenubar::OnDestroy ( ) [protected]

Definition at line 46 of file UCvsMenubar.cpp.

00047 {
00048     delete this;
00049 }

const URuntimeClass * UCvsMenubar::rtUCvsMenubar ( void ) [static]

Definition at line 31 of file UCvsMenubar.cpp.

Member Data Documentation

const UMSGMAP_ENTRY UCvsMenubar::_messageEntries [static, private]

Initial value:

   {
    { EV_DESTROY, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsMenubar ::OnDestroy },
    { EV_CREATE, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsMenubar ::OnCreate },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UMenu.

Definition at line 33 of file UCvsMenubar.cpp.

const URuntimeClass UCvsMenubar::classUCvsMenubar [static, protected]

const UMSGMAP UCvsMenubar::messageMap = { UMenu ::GetThisMessageMap(), & UCvsMenubar ::_messageEntries[0] } [static, protected]

Reimplemented from UMenu.

Definition at line 33 of file UCvsMenubar.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsMenubar.h
  • common/UCvsMenubar.cpp
Generated on Sat Aug 7 22:51:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCvsProcessData Class Reference

CCvsProcessData Class Reference

Application data holder passed to the cvsgui protocol callbacks. More...

#include <AppGlue.h>

Collaboration diagram for CCvsProcessData:

[legend]
List of all members.

Public Member Functions

CCvsProcessData ()
void | SetCvsConsole (CCvsConsole *pCvsConsole)
CCvsConsole * | GetCvsConsole () const
CCvsConsole * GetCvsConsole ()

Private Attributes

CCvsConsole * m_pCvsConsole

Detailed Description

Application data holder passed to the cvsgui protocol callbacks.

Definition at line 77 of file AppGlue.h.

Constructor & Destructor Documentation

CCvsProcessData::CCvsProcessData ( )

Definition at line 830 of file AppGlue.cpp.

References NULL.

00831     : m_pCvsConsole(NULL)
00832 {
00833 }

Member Function Documentation

CCvsConsole * CCvsProcessData::GetCvsConsole ( )

Get the console

Returns:
The console
Definition at line 858 of file AppGlue.cpp.

References m_pCvsConsole.

00859 {
00860     return m_pCvsConsole;
00861 }

CCvsConsole * CCvsProcessData::GetCvsConsole ( ) const

Get the console

Returns:
The console
Note:
Const overload
Definition at line 849 of file AppGlue.cpp.

References m_pCvsConsole.

Referenced by glue_consoleerr(), and glue_consoleout().

00850 {
00851     return m_pCvsConsole;
00852 }

void CCvsProcessData::SetCvsConsole ( CCvsConsole * pCvsConsole )

Set the console

Parameters:
pCvsConsole CVS console
Definition at line 839 of file AppGlue.cpp.

References m_pCvsConsole.

Referenced by launchCVS().

00840 {
00841     m_pCvsConsole = pCvsConsole;
00842 }

Member Data Documentation

CCvsConsole* CCvsProcessData::m_pCvsConsole [private]

Definition at line 85 of file AppGlue.h.

Referenced by GetCvsConsole(), and SetCvsConsole().

The documentation for this class was generated from the following files:
  • common/AppGlue.h
  • common/AppGlue.cpp
Generated on Sat Aug 7 22:51:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCvsRootConsole Class Reference

CCvsRootConsole Class Reference

Base class for cvsRoot list console. More...

#include <CvsRootDlg.h>

Inheritance diagram for CCvsRootConsole:

[legend]
Collaboration diagram for CCvsRootConsole:

[legend]
List of all members.

Public Member Functions

CCvsRootConsole ()
virtual | ~CCvsRootConsole ()
virtual long | cvs_out (const char *txt, long len)
virtual long | cvs_err (const char *txt, long len)
virtual void | Parse (int launchRes)=0L
int | GetLaunchRes () const
Get the result of the command launch.
stringstream & | GetCvsErr ()
Get the error result.

Protected Attributes

stringstream | m_cvsOut
stringstream | m_cvsErr
int m_launchRes

Detailed Description

Base class for cvsRoot list console.

Definition at line 69 of file CvsRootDlg.h.

Constructor & Destructor Documentation

CCvsRootConsole::CCvsRootConsole ( )

Definition at line 59 of file CvsRootDlg.cpp.

References m_launchRes.

00060 {
00061     m_launchRes = 0;
00062 }

CCvsRootConsole::~CCvsRootConsole ( ) [virtual]

Definition at line 64 of file CvsRootDlg.cpp.

00065 {
00066 }

Member Function Documentation

long CCvsRootConsole::cvs_err | ( | const char * | txt,
 |  | long | len
 | ) | [virtual]

Stderr handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 74 of file CvsRootDlg.cpp.

References cvs_errstr(), and m_cvsErr.

00075 {
00076     cvs_errstr(txt, len);
00077     m_cvsErr << txt;
00078
00079     return len;
00080 }

Here is the call graph for this function:

long CCvsRootConsole::cvs_out | ( | const char * | txt,
 |  | long | len
 | ) | [virtual]

Stdout handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 68 of file CvsRootDlg.cpp.

References m_cvsOut.

00069 {
00070     m_cvsOut << txt;
00071     return len;
00072 }

stringstream & CCvsRootConsole::GetCvsErr ( )

Get the error result.

Definition at line 101 of file CvsRootDlg.cpp.

References m_cvsErr.

Referenced by CCvsRootDlg::DisplayKeywords(), and CCvsRootDlg::FillProtocolsComboBox().

00102 {
00103     return m_cvsErr;
00104 }

int CCvsRootConsole::GetLaunchRes ( ) const

Get the result of the command launch.

Definition at line 95 of file CvsRootDlg.cpp.

References m_launchRes.

Referenced by CCvsRootDlg::DisplayKeywords(), and CCvsRootDlg::FillProtocolsComboBox().

00096 {
00097     return m_launchRes;
00098 }

void CCvsRootConsole::Parse ( int launchRes ) [pure virtual]

Virtual overridable to parse the result of browse command

Parameters:
launchRes The result of the command launch
Note:
Call default implementation after parsing is finished to clear the stored command output and store the launch result, the error output is not cleared however to allow further analysis

Implemented in CInfoParserConsole, and CProtocolParserConsole.

Definition at line 88 of file CvsRootDlg.cpp.

References m_cvsOut, and m_launchRes.

Referenced by LaunchCvsRootCommand(), CProtocolParserConsole::Parse(), and CInfoParserConsole::Parse().

00089 {
00090     m_launchRes = launchRes;
00091     m_cvsOut.clear();
00092 }

Member Data Documentation

stringstream CCvsRootConsole::m_cvsErr [protected]

Cvs command result (stderr) used for parsing Definition at line 84 of file CvsRootDlg.h.

Referenced by cvs_err(), and GetCvsErr().

stringstream CCvsRootConsole::m_cvsOut [protected]

Cvs command result (stdout) used for parsing Definition at line 83 of file CvsRootDlg.h.

Referenced by cvs_out(), and Parse().

int CCvsRootConsole::m_launchRes [protected]

The result of the command launch Definition at line 85 of file CvsRootDlg.h.

Referenced by CCvsRootConsole(), GetLaunchRes(), and Parse().

The documentation for this class was generated from the following files:
  • common/CvsRootDlg.h
  • common/CvsRootDlg.cpp
Generated on Sat Aug 7 22:51:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCvsRootDlg Class Reference

CCvsRootDlg Class Reference

#include <CvsRootDlg.h>

Inheritance diagram for CCvsRootDlg:

[legend]
Collaboration diagram for CCvsRootDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_CVSROOT }

Public Member Functions

CCvsRootDlg (const char *cvsRoot, CWnd *pParent=NULL)

Public Attributes

CSmartComboBox m_repositoryPathCombo
CEdit | m_cvsrootStatic
CStatic | m_keywordDescStatic
CButton | m_okButton
CButton | m_cancelButton
CStatic | m_protocolDescStatic
CButton | m_clearButton
CButton | m_editButton
CListCtrl | m_keywordList
CSmartComboBox m_protocolCombo
CString | m_protocol
CString | m_cvsroot
CString | m_repositoryPath

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initializes controls and triggers data reading if necessary.
virtual void | OnCancel ()
OnCancel virtual override, stop CVS command or cancel dialog.
afx_msg void | OnDblclkKeywordlist (NMHDR *pNMHDR, LRESULT *pResult)
NM_DBLCLK message handler, edit the selected keyword.
afx_msg void | OnItemchangedKeywordlist (NMHDR *pNMHDR, LRESULT *pResult)
LVN_ITEMCHANGED message handler, update the keyword description.
afx_msg void | OnDestroy ()
WM_DESTROY message handler, release any memory allocated.
afx_msg void | OnSelchangeProtocol ()
CBN_SELCHANGE notification handler, show the selected protocol description and trigger the reading of the details.
afx_msg void | OnEdit ()
BN_CLICKED message handler, edit selected keyword.
afx_msg void | OnClear ()
BN_CLICKED message handler, clear selected keyword.
afx_msg void | OnEditchangePath ()
CBN_EDITCHANGE notification handler, update CVSROOT display.
afx_msg void | OnSelchangePath ()
CBN_SELCHANGE notification handler, update CVSROOT display.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.
afx_msg void | OnReadProtocols ()
WM_READ_PROTOCOLS message handler, read the protocols available.

Private Member Functions

virtual void | InitHelpID ()
void | InitListCtrl (const kCvsRootDisplayType displayType)
void | EnableControls (BOOL enable)
void | EnableEditControls (const KeywordDisplayInfo *displayInfo)
BOOL | PostReadProtocolsMsg ()
void | ReadAvailableProtocols ()
void | ReadProtocolDetails ()
void | ShowProtocolDescription ()
void | FillProtocolsComboBox (CInfoParserConsole &infoParserConsole)
void | DisplayKeywords (CProtocolParserConsole &protocolParserConsole)
void | UpdateKeywords (const CvsProtocolList &protocolList)
void | DeleteAllItems ()
void | UpdateCvsRoot ()

Private Attributes

bool m_cvsStopped
CCvsRootParser m_cvsRootParser

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 201 of file CvsRootDlg.h.
00201 { IDD = IDD_CVSROOT };

Constructor & Destructor Documentation

CCvsRootDlg::CCvsRootDlg | ( | const char * | cvsRoot,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 670 of file CvsRootDlg.cpp.

References gPrevCVsRootRepositoryPaths, m_cvsroot, m_cvsRootParser, m_cvsStopped, m_protocol, m_repositoryPath, m_repositoryPathCombo, CCvsRootParser::Parse(), and USmartCombo::SetItems().

00671     : m_protocolCombo(USmartCombo::AutoDropWidth),
00672     CHHelpDialog(CCvsRootDlg::IDD, pParent)
00673 {
00674     //{{AFX_DATA_INIT(CCvsRootDlg)
00675     m_protocol = _T("");
00676     m_cvsroot = _T("");
00677     m_repositoryPath = _T("");
00678     //}}AFX_DATA_INIT
00679
00680     m_cvsroot = cvsRoot;
00681     m_cvsRootParser.Parse(m_cvsroot);
00682
00683     m_cvsStopped = false;
00684     m_repositoryPathCombo.SetItems(&gPrevCVsRootRepositoryPaths);
00685 }

Here is the call graph for this function:

Member Function Documentation

void CCvsRootDlg::DeleteAllItems ( ) [private]

Remove all items and release associated memory held in Item Data of the list control Definition at line 1019 of file CvsRootDlg.cpp.

References m_keywordList.

Referenced by InitListCtrl(), and OnDestroy().

01020 {
01021     const int itemCount = m_keywordList.GetItemCount();
01022     for(int nIndex = 0; nIndex < itemCount; nIndex++)
01023     {
01024         KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(nIndex);
01025         delete displayInfo;
01026     }
01027
01028     m_keywordList.DeleteAllItems();
01029 }

void CCvsRootDlg::DisplayKeywords ( CProtocolParserConsole & protocolParserConsole ) [private]

Display items in the list

Parameters:
protocolParserConsole Protocol parser console
Definition at line 935 of file CvsRootDlg.cpp.

References _i18n, KeywordDisplayInfo::Create(), EnableControls(), EnableEditControls(), CCvsRootConsole::GetCvsErr(), CProtocolParserConsole::GetKeywordList(), CCvsRootConsole::GetLaunchRes(), getline(), KeywordDisplayInfo::GetName(), InitListCtrl(), kCvsRootDisplayInfo, KeywordList, m_cvsStopped, and m_keywordList.

Referenced by ReadProtocolDetails().

00936 {
00937     const KeywordList& itemList = protocolParserConsole.GetKeywordList();
00938     if( itemList.size() == 0 )
00939     {
00940         if( !m_cvsStopped )
00941         {
00942             if( protocolParserConsole.GetLaunchRes() == 0 )
00943             {
00944                 InitListCtrl(kCvsRootDisplayInfo);
00945                 m_keywordList.InsertItem(0, _i18n("No keywords available"));
00946
00947                 m_keywordList.EnableWindow(FALSE);
00948                 EnableEditControls(FALSE);
00949             }
00950             else
00951             {
00952                 InitListCtrl(kCvsRootDisplayInfo);
00953
00954                 // Show the error in the list control
00955                 m_keywordList.InsertItem(0, _i18n("Command failed:"));
00956
00957                 string line;
00958                 while( getline(protocolParserConsole.GetCvsErr(), line) )
00959                 {
00960                     m_keywordList.InsertItem(m_keywordList.GetItemCount(), line.c_str());
00961                 }
00962
00963                 EnableControls(FALSE);
00964             }
00965         }
00966     }
00967     else
00968     {
00969         // Insert the items
00970         for(KeywordList::const_iterator it = itemList.begin(); it != itemList.end(); it++)
00971         {
00972             KeywordDisplayInfo* displayInfo = new KeywordDisplayInfo;
00973             if( displayInfo )
00974             {
00975                 displayInfo->Create(*it);
00976
00977                 const int itemIndex = m_keywordList.InsertItem(m_keywordList.GetItemCount(), displayInfo->GetName().c_str());
00978                 if( itemIndex > -1 )
00979                 {
00980                     if( !m_keywordList.SetItemData(itemIndex, (DWORD)displayInfo) )
00981                     {
00982                         delete displayInfo;
00983                     }
00984                 }
00985                 else
00986                 {
00987                     delete displayInfo;
00988                 }
00989             }
00990         }
00991     }
00992 }

Here is the call graph for this function:

void CCvsRootDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 688 of file CvsRootDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpDialog::DoDataExchange(), IDC_CLEAR_KEYWORD, IDC_EDIT_KEYWORD, IDC_KEYWORDLIST, IDC_KEYWORDLIST_DESC, IDC_PREVIEW_CVSROOT, IDC_PROTOCOL, IDC_PROTOCOL_DESC, IDC_REPOSITORY_PATH, m_cancelButton, m_clearButton, m_cvsroot, m_cvsrootStatic, m_editButton, m_keywordDescStatic, m_keywordList, m_okButton, m_protocol, m_protocolCombo, m_protocolDescStatic, m_repositoryPath, and m_repositoryPathCombo.

00689 {
00690     CHHelpDialog::DoDataExchange(pDX);
00691     //{{AFX_DATA_MAP(CCvsRootDlg)
00692     DDX_Control(pDX, IDC_REPOSITORY_PATH, m_repositoryPathCombo);
00693     DDX_Control(pDX, IDC_PREVIEW_CVSROOT, m_cvsrootStatic);
00694     DDX_Control(pDX, IDC_KEYWORDLIST_DESC, m_keywordDescStatic);
00695     DDX_Control(pDX, IDOK, m_okButton);
00696     DDX_Control(pDX, IDCANCEL, m_cancelButton);
00697     DDX_Control(pDX, IDC_PROTOCOL_DESC, m_protocolDescStatic);
00698     DDX_Control(pDX, IDC_CLEAR_KEYWORD, m_clearButton);
00699     DDX_Control(pDX, IDC_EDIT_KEYWORD, m_editButton);
00700     DDX_Control(pDX, IDC_KEYWORDLIST, m_keywordList);
00701     DDX_Control(pDX, IDC_PROTOCOL, m_protocolCombo);
00702     DDX_CBString(pDX, IDC_PROTOCOL, m_protocol);
00703     DDX_Text(pDX, IDC_PREVIEW_CVSROOT, m_cvsroot);
00704     DDX_CBString(pDX, IDC_REPOSITORY_PATH, m_repositoryPath);
00705     //}}AFX_DATA_MAP
00706
00707     DDV_MinChars(pDX, m_repositoryPath, 1);
00708     DDX_ComboMString(pDX, IDC_REPOSITORY_PATH, m_repositoryPathCombo);
00709 }

Here is the call graph for this function:

void CCvsRootDlg::EnableControls ( BOOL enable ) [private]

Enable or disable controls

Parameters:
enable Set to TRUE to enable controls, FALSE to disable controls
Definition at line 817 of file CvsRootDlg.cpp.

References m_clearButton, m_editButton, m_keywordList, m_okButton, m_protocolCombo, and m_repositoryPathCombo.

Referenced by DisplayKeywords(), FillProtocolsComboBox(), ReadAvailableProtocols(), and ReadProtocolDetails().

00818 {
00819     m_okButton.EnableWindow(enable);
00820     m_keywordList.EnableWindow(enable);
00821     m_protocolCombo.EnableWindow(enable);
00822     m_editButton.EnableWindow(enable);
00823     m_clearButton.EnableWindow(enable);
00824     m_repositoryPathCombo.EnableWindow(enable);
00825 }

void CCvsRootDlg::EnableEditControls ( const KeywordDisplayInfo * displayInfo ) [private]

Enable or disable keyword edit controls

Parameters:
displayInfo Display info of the selected item, NULL if there is no selection
Definition at line 831 of file CvsRootDlg.cpp.

References KeywordDisplayInfo::GetValue(), m_clearButton, and m_editButton.

Referenced by DisplayKeywords(), OnClear(), OnEdit(), and OnItemchangedKeywordlist().

00832 {
00833     if( displayInfo )
00834     {
00835         m_editButton.EnableWindow(TRUE);
00836         m_clearButton.EnableWindow(!displayInfo->GetValue().empty());
00837     }
00838     else
00839     {
00840         m_editButton.EnableWindow(FALSE);
00841         m_clearButton.EnableWindow(FALSE);
00842     }
00843 }

Here is the call graph for this function:

void CCvsRootDlg::FillProtocolsComboBox ( CInfoParserConsole & infoParserConsole ) [private]

Fill protocol selection combo box

Parameters:
infoParserConsole CVS Info parser console
Definition at line 876 of file CvsRootDlg.cpp.

References _i18n, CvsProtocolList, EnableControls(), CCvsRootConsole::GetCvsErr(), CInfoParserConsole::GetCvsProtocolList(), CCvsRootConsole::GetLaunchRes(), getline(), InitListCtrl(), kCvsRootDisplayInfo, m_cvsStopped, m_keywordList, m_protocolCombo, and m_protocolDescStatic.

Referenced by ReadAvailableProtocols().

00877 {
00878     m_protocolCombo.ResetContent();
00879     m_protocolDescStatic.SetWindowText("");
00880
00881     const CvsProtocolList& cvsProtocolList = infoParserConsole.GetCvsProtocolList();
00882     if( cvsProtocolList.size() == 0 )
00883     {
00884         if( !m_cvsStopped )
00885         {
00886             if( infoParserConsole.GetLaunchRes() == 0 )
00887             {
00888                 InitListCtrl(kCvsRootDisplayInfo);
00889                 m_keywordList.InsertItem(0, _i18n("No protocols available, check your CVS configuration"));
00890
00891                 EnableControls(FALSE);
00892             }
00893             else
00894             {
00895                 InitListCtrl(kCvsRootDisplayInfo);
00896
00897                 // Show the error in the list control
00898                 m_keywordList.InsertItem(0, _i18n("Command failed:"));
00899
00900                 string line;
00901                 while( getline(infoParserConsole.GetCvsErr(), line) )
00902                 {
00903                     m_keywordList.InsertItem(m_keywordList.GetItemCount(), line.c_str());
00904                 }
00905
00906                 EnableControls(FALSE);
00907             }
00908         }
00909     }
00910     else
00911     {
00912         // Fill the protocols combobox
00913         for(CvsProtocolList::const_iterator it = cvsProtocolList.begin(); it != cvsProtocolList.end(); it++)
00914         {
00915             const item = m_protocolCombo.AddString((*it).first.c_str());
00916             if( item > -1 )
00917             {
00918                 m_protocolCombo.SetItemData(item, (DWORD)new string((*it).second));
00919             }
00920         }
00921
00922         // Show instructions and enable protocols combobox
00923         InitListCtrl(kCvsRootDisplayInfo);
00924         m_keywordList.InsertItem(0, _i18n("Select the protocol and enter repository path and any keywords required"));
00925
00926         EnableControls(FALSE);
00927         m_protocolCombo.EnableWindow(TRUE);
00928     }
00929 }

Here is the call graph for this function:

void CCvsRootDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 750 of file CvsRootDlg.cpp.

References IDC_CLEAR_KEYWORD, IDC_EDIT_KEYWORD, IDC_KEYWORDLIST, IDC_KEYWORDLIST_DESC, IDC_PREVIEW_CVSROOT, IDC_PROTOCOL, IDC_PROTOCOL_DESC, IDC_REPOSITORY_PATH, IDH_IDC_CLEAR_KEYWORD, IDH_IDC_EDIT_KEYWORD, IDH_IDC_KEYWORDLIST, IDH_IDC_KEYWORDLIST_DESC, IDH_IDC_PREVIEW_CVSROOT, IDH_IDC_PROTOCOL, IDH_IDC_PROTOCOL_DESC, IDH_IDC_REPOSITORY_PATH, and CHHelpSupport::SetCtrlHelpID().

00751 {
00752     SetCtrlHelpID(IDC_PROTOCOL,         IDH_IDC_PROTOCOL);
00753     SetCtrlHelpID(IDC_PROTOCOL_DESC,    IDH_IDC_PROTOCOL_DESC);
00754     SetCtrlHelpID(IDC_REPOSITORY_PATH,  IDH_IDC_REPOSITORY_PATH);
00755     SetCtrlHelpID(IDC_KEYWORDLIST,      IDH_IDC_KEYWORDLIST);
00756     SetCtrlHelpID(IDC_KEYWORDLIST_DESC, IDH_IDC_KEYWORDLIST_DESC);
00757     SetCtrlHelpID(IDC_EDIT_KEYWORD,     IDH_IDC_EDIT_KEYWORD);
00758     SetCtrlHelpID(IDC_CLEAR_KEYWORD,    IDH_IDC_CLEAR_KEYWORD);
00759     SetCtrlHelpID(IDC_PREVIEW_CVSROOT,  IDH_IDC_PREVIEW_CVSROOT);
00760 }

Here is the call graph for this function:

void CCvsRootDlg::InitListCtrl ( const kCvsRootDisplayType displayType ) [private]

Set the list control columns appropriate to the dialog type, show prompt message eventually

Parameters:
displayType Display type as specified by kCvsRootDisplayType enum
Note:
Prompt message will be shown while data are being read
Definition at line 767 of file CvsRootDlg.cpp.

References _i18n, DeleteAllItems(), kCvsRootDisplayData, kCvsRootDisplayInfo, kCvsRootDisplayWait, and m_keywordList.

Referenced by DisplayKeywords(), FillProtocolsComboBox(), ReadAvailableProtocols(), and ReadProtocolDetails().

00768 {
00769     CWndRedrawMngr redrawMngr(&m_keywordList);
00770
00771     // Remove all items and columns
00772     DeleteAllItems();
00773
00774     int columnCount = m_keywordList.GetHeaderCtrl()->GetItemCount();
00775     while( columnCount-- )
00776     {
00777         m_keywordList.DeleteColumn(0);
00778     }
00779
00780     // Get the client area width to properly size columns
00781     CRect rect;
00782     m_keywordList.GetClientRect(rect);
00783
00784     const int listCtrlWidth = rect.Width();
00785
00786     // Set the appropriate columns
00787     switch( displayType )
00788     {
00789     case kCvsRootDisplayWait:
00790         m_keywordList.InsertColumn(0, _i18n("Action"), LVCFMT_LEFT, listCtrlWidth);
00791
00792         m_keywordList.InsertItem(0, _i18n("Please wait while retrieving data"));
00793         m_keywordList.InsertItem(1, _i18n("You can press Stop button to cancel the operation"));
00794         break;
00795     case kCvsRootDisplayData:
00796         {
00797             const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
00798             const int fistColWidth = 100;
00799
00800             m_keywordList.InsertColumn(0, _i18n("Keyword"), LVCFMT_LEFT, fistColWidth);
00801             m_keywordList.InsertColumn(1, _i18n("Value"), LVCFMT_LEFT, listCtrlWidthNoScroll - fistColWidth);
00802         }
00803         break;
00804     case kCvsRootDisplayInfo:
00805         m_keywordList.InsertColumn(0, _i18n("Information"), LVCFMT_LEFT, listCtrlWidth);
00806         break;
00807     default:
00808         ASSERT(FALSE);  // unknown display type
00809         break;
00810     }
00811 }

Here is the call graph for this function:

void CCvsRootDlg::OnCancel ( ) [protected, virtual]

OnCancel virtual override, stop CVS command or cancel dialog.

Definition at line 1032 of file CvsRootDlg.cpp.

References _i18n, CWincvsApp::IsCvsRunning(), CWincvsApp::IsCvsStopping(), m_cvsStopped, m_keywordList, and stopCVS().

01033 {
01034     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01035     if( app && app->IsCvsRunning() && !app->IsCvsStopping() )
01036     {
01037         m_keywordList.DeleteAllItems();
01038         m_keywordList.InsertItem(0, _i18n("Stopping..."));
01039
01040         m_cvsStopped = true;
01041         stopCVS();
01042         return;
01043     }
01044
01045     CHHelpDialog::OnCancel();
01046 }

Here is the call graph for this function:

void CCvsRootDlg::OnClear ( ) [protected]

BN_CLICKED message handler, clear selected keyword.

Definition at line 1262 of file CvsRootDlg.cpp.

References EnableEditControls(), KeywordDisplayInfo::GetValue(), m_keywordList, KeywordDisplayInfo::SetValue(), and UpdateCvsRoot().

01263 {
01264     const int item = m_keywordList.GetNextItem(-1, LVNI_SELECTED);
01265     if( item > -1 )
01266     {
01267         KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(item);
01268         if( displayInfo )
01269         {
01270             displayInfo->SetValue("");
01271             m_keywordList.SetItemText(item, 1, displayInfo->GetValue().c_str());
01272
01273             EnableEditControls(displayInfo);
01274             UpdateCvsRoot();
01275         }
01276     }
01277 }

Here is the call graph for this function:

void CCvsRootDlg::OnDblclkKeywordlist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

NM_DBLCLK message handler, edit the selected keyword.

Definition at line 1049 of file CvsRootDlg.cpp.

References OnEdit().

01050 {
01051     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01052     if( pNMListView->iItem > -1 )
01053     {
01054         OnEdit();
01055     }
01056
01057     *pResult = 0;
01058 }

Here is the call graph for this function:

void CCvsRootDlg::OnDestroy ( ) [protected]

WM_DESTROY message handler, release any memory allocated.

Definition at line 1087 of file CvsRootDlg.cpp.

References DeleteAllItems(), and m_protocolCombo.

01088 {
01089     DeleteAllItems();
01090
01091     const int count = m_protocolCombo.GetCount();
01092     for(int nIndex = 0; nIndex < count; nIndex++)
01093     {
01094         delete (string*)m_protocolCombo.GetItemData(nIndex);
01095     }
01096
01097     CHHelpDialog::OnDestroy();
01098 }

Here is the call graph for this function:

void CCvsRootDlg::OnEdit ( ) [protected]

BN_CLICKED message handler, edit selected keyword.

Definition at line 1239 of file CvsRootDlg.cpp.

References EnableEditControls(), KeywordDisplayInfo::GetName(), KeywordDisplayInfo::GetRowInfo(), KeywordDisplayInfo::GetValue(), KeywordInfo::m_description, m_keywordList, KeywordDisplayInfo::SetValue(), and UpdateCvsRoot().

Referenced by OnDblclkKeywordlist().

01240 {
01241     const int item = m_keywordList.GetNextItem(-1, LVNI_SELECTED);
01242     if( item > -1 )
01243     {
01244         KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(item);
01245         if( displayInfo )
01246         {
01247             CEditKeywordDlg editKeywordDlg(displayInfo->GetRowInfo().m_description.c_str(), displayInfo->GetName().c_str(), displayInfo->GetValue().c_str());
01248
01249             if( editKeywordDlg.DoModal() == IDOK )
01250             {
01251                 displayInfo->SetValue(editKeywordDlg.m_value);
01252                 m_keywordList.SetItemText(item, 1, displayInfo->GetValue().c_str());
01253
01254                 EnableEditControls(displayInfo);
01255                 UpdateCvsRoot();
01256             }
01257         }
01258     }
01259 }

Here is the call graph for this function:

void CCvsRootDlg::OnEditchangePath ( ) [protected]

CBN_EDITCHANGE notification handler, update CVSROOT display.

Definition at line 1280 of file CvsRootDlg.cpp.

References UpdateCvsRoot().

01281 {
01282     UpdateCvsRoot();
01283 }

Here is the call graph for this function:

void CCvsRootDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 1318 of file CvsRootDlg.cpp.

References CHHelpSupport::ShowHelp().

01319 {
01320     ShowHelp();
01321 }

Here is the call graph for this function:

BOOL CCvsRootDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initializes controls and triggers data reading if necessary.

Reimplemented from CHHelpDialog.

Definition at line 731 of file CvsRootDlg.cpp.

References kCvsRootDisplayData, CHHelpDialog::OnInitDialog(), and SetListCtrlExtendedStyle().

00732 {
00733     CHHelpDialog::OnInitDialog();
00734
00735     // Extra initialization
00736     SetListCtrlExtendedStyle(&m_keywordList, LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP | LVS_EX_GRIDLINES);
00737
00738     InitListCtrl(kCvsRootDisplayData);
00739
00740     ShowProtocolDescription();
00741
00742     // Force the window to show itself and trigger the reading of available protocols
00743     ShowWindow(SW_SHOW);
00744     PostReadProtocolsMsg();
00745
00746     return TRUE;  // return TRUE unless you set the focus to a control
00747                   // EXCEPTION: OCX Property Pages should return FALSE
00748 }

Here is the call graph for this function:

void CCvsRootDlg::OnItemchangedKeywordlist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_ITEMCHANGED message handler, update the keyword description.

Definition at line 1061 of file CvsRootDlg.cpp.

References EnableEditControls(), KeywordDisplayInfo::GetRowInfo(), KeywordInfo::m_description, m_keywordDescStatic, m_keywordList, and NULL.

01062 {
01063     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01064     if( pNMListView->iItem > -1 &&
01065         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
01066     {
01067         const KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(pNMListView->iItem);
01068         if( displayInfo )
01069         {
01070             m_keywordDescStatic.SetWindowText(displayInfo->GetRowInfo().m_description.c_str());
01071
01072             EnableEditControls(displayInfo);
01073         }
01074     }
01075
01076     if( m_keywordList.GetNextItem(-1, LVNI_SELECTED) < 0 )
01077     {
01078         m_keywordDescStatic.SetWindowText("");
01079
01080         EnableEditControls(NULL);
01081     }
01082
01083     *pResult = 0;
01084 }

Here is the call graph for this function:

void CCvsRootDlg::OnReadProtocols ( ) [protected]

WM_READ_PROTOCOLS message handler, read the protocols available.

Definition at line 855 of file CvsRootDlg.cpp.

References CCvsRootParser::GetPath(), CCvsRootParser::GetProtocol(), CCvsRootParser::IsEmpty(), m_cvsRootParser, m_protocolCombo, m_repositoryPathCombo, ReadAvailableProtocols(), ReadProtocolDetails(), and ShowProtocolDescription().

00856 {
00857     ReadAvailableProtocols();
00858
00859     if( m_protocolCombo.GetCount() > 0 )
00860     {
00861         if( !m_cvsRootParser.IsEmpty() )
00862         {
00863             m_protocolCombo.SelectString(-1, m_cvsRootParser.GetProtocol().c_str());
00864             m_repositoryPathCombo.SetWindowText(m_cvsRootParser.GetPath().c_str());
00865
00866             ShowProtocolDescription();
00867             ReadProtocolDetails();
00868         }
00869     }
00870 }

Here is the call graph for this function:

void CCvsRootDlg::OnSelchangePath ( ) [protected]

CBN_SELCHANGE notification handler, update CVSROOT display.

Definition at line 1286 of file CvsRootDlg.cpp.

References CSmartComboBox::EnsureSelchangeMatch(), m_repositoryPathCombo, and UpdateCvsRoot().

01287 {
01288     m_repositoryPathCombo.EnsureSelchangeMatch();
01289
01290     UpdateCvsRoot();
01291 }

Here is the call graph for this function:

void CCvsRootDlg::OnSelchangeProtocol ( ) [protected]

CBN_SELCHANGE notification handler, show the selected protocol description and trigger the reading of the details.

Definition at line 1101 of file CvsRootDlg.cpp.

References ReadProtocolDetails(), and ShowProtocolDescription().

01102 {
01103     ShowProtocolDescription();
01104     ReadProtocolDetails();
01105 }

Here is the call graph for this function:

BOOL CCvsRootDlg::PostReadProtocolsMsg ( ) [private]

Post the private message to trigger the reading of the available protocols

Returns:
TRUE on success, FALSE otherwise
Definition at line 849 of file CvsRootDlg.cpp.

References WM_READ_PROTOCOLS.

00850 {
00851     return PostMessage(WM_READ_PROTOCOLS);
00852 }

void CCvsRootDlg::ReadAvailableProtocols ( ) [private]

Read available protocols Definition at line 1131 of file CvsRootDlg.cpp.

References _i18n, EnableControls(), FillProtocolsComboBox(), InitListCtrl(), kCvsRootDisplayData, kCvsRootDisplayWait, LaunchCvsRootCommand(), m_cancelButton, m_cvsStopped, m_protocolCombo, and m_repositoryPathCombo.

Referenced by OnReadProtocols().

01132 {
01133     m_cvsStopped = false;
01134
01135     // Prepare controls
01136     EnableControls(FALSE);
01137
01138     // Change the Cancel button's name to "Stop"
01139     CString strPrevCancelText;
01140     m_cancelButton.GetWindowText(strPrevCancelText);
01141     m_cancelButton.SetWindowText(_i18n("Stop"));
01142
01143     // Display the reading data prompt
01144     InitListCtrl(kCvsRootDisplayWait);
01145
01146     // Launch command
01147     CInfoParserConsole infoParserConsole;
01148     LaunchCvsRootCommand(&infoParserConsole);
01149
01150     // Initialize list control
01151     InitListCtrl(kCvsRootDisplayData);
01152
01153     // Restore control's state
01154     EnableControls(TRUE);
01155
01156     // Display data
01157     FillProtocolsComboBox(infoParserConsole);
01158
01159     // Restore Cancel's button name
01160     m_cancelButton.SetWindowText(strPrevCancelText);
01161
01162     // If there are any protocols set the focus to protocol combobox and enable path entry
01163     if( m_protocolCombo.GetCount() )
01164     {
01165         GotoDlgCtrl(&m_protocolCombo);
01166         m_repositoryPathCombo.EnableWindow(TRUE);
01167     }
01168 }

Here is the call graph for this function:

void CCvsRootDlg::ReadProtocolDetails ( ) [private]

Read selected protocol details Definition at line 1173 of file CvsRootDlg.cpp.

References _i18n, DisplayKeywords(), EnableControls(), CCvsRootParser::GetCvsProtocolList(), InitListCtrl(), kCvsRootDisplayData, kCvsRootDisplayWait, LaunchCvsRootCommand(), m_cancelButton, m_cvsRootParser, m_cvsrootStatic, m_cvsStopped, m_keywordDescStatic, m_keywordList, m_protocolCombo, CCvsRootParser::Parse(), UpdateCvsRoot(), and UpdateKeywords().

Referenced by OnReadProtocols(), and OnSelchangeProtocol().

01174 {
01175     m_cvsStopped = false;
01176
01177     m_keywordDescStatic.SetWindowText("");
01178
01179     CString cvsRoot;
01180     m_cvsrootStatic.GetWindowText(cvsRoot);
01181
01182     CString protocol;
01183
01184     {
01185         const int item = m_protocolCombo.GetCurSel();
01186         if( item > -1 )
01187         {
01188             m_protocolCombo.GetLBText(item, protocol);
01189         }
01190         else
01191         {
01192             // No protocol selected
01193             return;
01194         }
01195     }
01196
01197     // Prepare controls
01198     EnableControls(FALSE);
01199
01200     // Change the Cancel button's name to "Stop"
01201     CString strPrevCancelText;
01202     m_cancelButton.GetWindowText(strPrevCancelText);
01203     m_cancelButton.SetWindowText(_i18n("Stop"));
01204
01205     // Display the reading data prompt
01206     InitListCtrl(kCvsRootDisplayWait);
01207
01208     // Launch command
01209     CProtocolParserConsole protocolParserConsole;
01210     LaunchCvsRootCommand(&protocolParserConsole, protocol);
01211
01212     // Initialize list control
01213     InitListCtrl(kCvsRootDisplayData);
01214
01215     // Restore control's state
01216     EnableControls(TRUE);
01217
01218     // Display data
01219     DisplayKeywords(protocolParserConsole);
01220
01221     // Restore Cancel's button name
01222     m_cancelButton.SetWindowText(strPrevCancelText);
01223
01224     // If there are any keywords select the first keyword
01225     if( m_keywordList.IsWindowEnabled() && m_keywordList.GetItemCount() )
01226     {
01227         m_keywordList.SetItemState(0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
01228     }
01229
01230     GotoDlgCtrl(&m_protocolCombo);
01231
01232     m_cvsRootParser.Parse(cvsRoot, false);
01233     UpdateKeywords(m_cvsRootParser.GetCvsProtocolList());
01234
01235     UpdateCvsRoot();
01236 }

Here is the call graph for this function:

void CCvsRootDlg::ShowProtocolDescription ( ) [private]

Show the selected protocol description Definition at line 1110 of file CvsRootDlg.cpp.

References m_keywordDescStatic, m_protocolCombo, and m_protocolDescStatic.

Referenced by OnReadProtocols(), and OnSelchangeProtocol().

01111 {
01112     const int item = m_protocolCombo.GetCurSel();
01113     if( item > -1 )
01114     {
01115         string* description = (string*)m_protocolCombo.GetItemData(item);
01116         if( description )
01117         {
01118             m_protocolDescStatic.SetWindowText(description->c_str());
01119         }
01120     }
01121     else
01122     {
01123         m_protocolDescStatic.SetWindowText("");
01124         m_keywordDescStatic.SetWindowText("");
01125     }
01126 }

void CCvsRootDlg::UpdateCvsRoot ( ) [private]

Update CVS root string display Definition at line 1296 of file CvsRootDlg.cpp.

References FormatCvsRoot(), CSmartComboBox::GetCurSelText(), CSmartComboBox::GetWindowText(), KeywordDisplayInfoList, m_cvsrootStatic, m_keywordList, m_protocolCombo, and m_repositoryPathCombo.

Referenced by OnClear(), OnEdit(), OnEditchangePath(), OnSelchangePath(), and ReadProtocolDetails().

01297 {
01298     KeywordDisplayInfoList displayInfoList;
01299
01300     const int itemCount = m_keywordList.GetItemCount();
01301     for(int nIndex = 0; nIndex < itemCount; nIndex++)
01302     {
01303         const KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(nIndex);
01304         if( displayInfo )
01305         {
01306             displayInfoList.push_back(displayInfo);
01307         }
01308     }
01309
01310     const CString protocol = m_protocolCombo.GetCurSelText();
01311     const CString path = m_repositoryPathCombo.GetWindowText();
01312     const string cvsroot = FormatCvsRoot(protocol, displayInfoList, path);
01313
01314     m_cvsrootStatic.SetWindowText(cvsroot.c_str());
01315 }

Here is the call graph for this function:

void CCvsRootDlg::UpdateKeywords ( const CvsProtocolList & protocolList ) [private]

Update keywords with any found in the protocol list

Parameters:
protocolList Protocol list
Definition at line 998 of file CvsRootDlg.cpp.

References CvsProtocolList, CCvsRootParser::GetCvsProtocolList(), KeywordDisplayInfo::GetRowInfo(), KeywordDisplayInfo::GetValue(), m_cvsRootParser, KeywordInfo::m_keyword, m_keywordList, and KeywordDisplayInfo::SetValue().

Referenced by ReadProtocolDetails().

00999 {
01000     const int itemCount = m_keywordList.GetItemCount();
01001     for(int nIndex = 0; nIndex < itemCount; nIndex++)
01002     {
01003         KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(nIndex);
01004         if( displayInfo )
01005         {
01006             CvsProtocolList::const_iterator it = protocolList.find(displayInfo->GetRowInfo().m_keyword);
01007             if( it != m_cvsRootParser.GetCvsProtocolList().end() )
01008             {
01009                 displayInfo->SetValue((*it).second.c_str());
01010                 m_keywordList.SetItemText(nIndex, 1, displayInfo->GetValue().c_str());
01011             }
01012         }
01013     }
01014 }

Here is the call graph for this function:

Member Data Documentation

CButton CCvsRootDlg::m_cancelButton

Definition at line 206 of file CvsRootDlg.h.

Referenced by DoDataExchange(), ReadAvailableProtocols(), and ReadProtocolDetails().

CButton CCvsRootDlg::m_clearButton

Definition at line 208 of file CvsRootDlg.h.

Referenced by DoDataExchange(), EnableControls(), and EnableEditControls().

CString CCvsRootDlg::m_cvsroot

Definition at line 213 of file CvsRootDlg.h.

Referenced by CCvsRootDlg(), CompatGetCvsRoot(), and DoDataExchange().

CCvsRootParser CCvsRootDlg::m_cvsRootParser [private]

CVS root parser Definition at line 247 of file CvsRootDlg.h.

Referenced by CCvsRootDlg(), OnReadProtocols(), ReadProtocolDetails(), and UpdateKeywords().

CEdit CCvsRootDlg::m_cvsrootStatic

Definition at line 203 of file CvsRootDlg.h.

Referenced by DoDataExchange(), ReadProtocolDetails(), and UpdateCvsRoot().

bool CCvsRootDlg::m_cvsStopped [private]

Flag indicating that user stopped the command Definition at line 246 of file CvsRootDlg.h.

Referenced by CCvsRootDlg(), DisplayKeywords(), FillProtocolsComboBox(), OnCancel(), ReadAvailableProtocols(), and ReadProtocolDetails().

CButton CCvsRootDlg::m_editButton

Definition at line 209 of file CvsRootDlg.h.

Referenced by DoDataExchange(), EnableControls(), and EnableEditControls().

CStatic CCvsRootDlg::m_keywordDescStatic

Definition at line 204 of file CvsRootDlg.h.

Referenced by DoDataExchange(), OnItemchangedKeywordlist(), ReadProtocolDetails(), and ShowProtocolDescription().

CListCtrl CCvsRootDlg::m_keywordList

Definition at line 210 of file CvsRootDlg.h.

Referenced by DeleteAllItems(), DisplayKeywords(), DoDataExchange(), EnableControls(), FillProtocolsComboBox(), InitListCtrl(), OnCancel(), OnClear(), OnEdit(), OnItemchangedKeywordlist(), ReadProtocolDetails(), UpdateCvsRoot(), and UpdateKeywords().

CButton CCvsRootDlg::m_okButton

Definition at line 205 of file CvsRootDlg.h.

Referenced by DoDataExchange(), and EnableControls().

CString CCvsRootDlg::m_protocol

Definition at line 212 of file CvsRootDlg.h.

Referenced by CCvsRootDlg(), and DoDataExchange().

CSmartComboBox CCvsRootDlg::m_protocolCombo

Definition at line 211 of file CvsRootDlg.h.

Referenced by DoDataExchange(), EnableControls(), FillProtocolsComboBox(), OnDestroy(), OnReadProtocols(), ReadAvailableProtocols(), ReadProtocolDetails(), ShowProtocolDescription(), and UpdateCvsRoot().

CStatic CCvsRootDlg::m_protocolDescStatic

Definition at line 207 of file CvsRootDlg.h.

Referenced by DoDataExchange(), FillProtocolsComboBox(), and ShowProtocolDescription().

CString CCvsRootDlg::m_repositoryPath

Definition at line 214 of file CvsRootDlg.h.

Referenced by CCvsRootDlg(), and DoDataExchange().

CSmartComboBox CCvsRootDlg::m_repositoryPathCombo

Definition at line 202 of file CvsRootDlg.h.

Referenced by CCvsRootDlg(), DoDataExchange(), EnableControls(), OnReadProtocols(), OnSelchangePath(), ReadAvailableProtocols(), and UpdateCvsRoot().

The documentation for this class was generated from the following files:
  • common/CvsRootDlg.h
  • common/CvsRootDlg.cpp
Generated on Sat Aug 7 22:51:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCvsRootParser Class Reference

CCvsRootParser Class Reference

Class to parse CVS root string. More...

#include <CvsRootDlg.h>

Collaboration diagram for CCvsRootParser:

[legend]
List of all members.

Public Member Functions

bool | Parse (const char *cvsRoot, const bool clearData=true)
void | Clear ()
bool | IsEmpty () const
const string & | GetProtocol () const
const string & | GetPath () const
const CvsProtocolList & | GetCvsProtocolList () const

Private Member Functions

bool | SplitCvsRoot (const char *cvsRoot, string &protocol, string &keywords, string &path) const
int | NormalizeCvsRoot (string &strCvsRoot, const char tokenSeparator) const

Private Attributes

string | m_protocol
string | m_path
CvsProtocolList m_cvsProtocolList

Detailed Description

Class to parse CVS root string.

Definition at line 131 of file CvsRootDlg.h.

Member Function Documentation

void CCvsRootParser::Clear ( )

Clear the data Definition at line 437 of file CvsRootDlg.cpp.

References m_cvsProtocolList, m_path, and m_protocol.

Referenced by Parse().

00438 {
00439     m_protocol.erase();
00440     m_path.erase();
00441     m_cvsProtocolList.clear();
00442 }

const CvsProtocolList & CCvsRootParser::GetCvsProtocolList ( ) const

Get the protocol keywords list

Returns:
Protocol keywords list
Definition at line 475 of file CvsRootDlg.cpp.

References CvsProtocolList, and m_cvsProtocolList.

Referenced by CCvsRootDlg::ReadProtocolDetails(), and CCvsRootDlg::UpdateKeywords().

00476 {
00477     return m_cvsProtocolList;
00478 }

const string & CCvsRootParser::GetPath ( ) const

Get the repository path

Returns:
Repository path
Definition at line 466 of file CvsRootDlg.cpp.

References m_path.

Referenced by CCvsRootDlg::OnReadProtocols().

00467 {
00468     return m_path;
00469 }

const string & CCvsRootParser::GetProtocol ( ) const

Get the protocol

Returns:
Protocol
Definition at line 457 of file CvsRootDlg.cpp.

References m_protocol.

Referenced by CCvsRootDlg::OnReadProtocols().

00458 {
00459     return m_protocol;
00460 }

bool CCvsRootParser::IsEmpty ( ) const

Test whether the parser data are empty

Returns:
true on if the parser data are empty, false otherwise
Definition at line 448 of file CvsRootDlg.cpp.

References m_path, and m_protocol.

Referenced by CCvsRootDlg::OnReadProtocols().

00449 {
00450     return m_protocol.empty() && m_path.empty();
00451 }

int CCvsRootParser::NormalizeCvsRoot | ( | string & | strCvsRoot,
 |  | const char | tokenSeparator
 | ) | const [private]

Normalize CVS root string to prepare for parsing

Parameters:
strCvsRoot | Return CVS root string
tokenSeparator | Token separator to be used in normalized string
Returns:
The count of tokens in the CVS root string
Definition at line 257 of file CvsRootDlg.cpp.

References CHR_KEYWORD_QUOTE, CHR_PROTOCOL_TOKEN_SEPARATOR, and CHR_ROOT_TOKEN_SEPARATOR.

Referenced by SplitCvsRoot().

00258 {
00259     int tokenCount = 0;
00260
00261     // Eliminate leading token separator
00262     if( !strCvsRoot.empty() && CHR_ROOT_TOKEN_SEPARATOR == *strCvsRoot.begin() )
00263     {
00264         strCvsRoot.erase(strCvsRoot.begin());
00265     }
00266
00267     // Flag token separators
00268     bool inQuoted = false;
00269
00270     for(string::iterator it = strCvsRoot.begin(); it != strCvsRoot.end() ; it++)
00271     {
00272         if( CHR_KEYWORD_QUOTE == *it )
00273         {
00274             inQuoted = !inQuoted;
00275         }
00276
00277         if( inQuoted )
00278         {
00279             // We are inside quoted value
00280             continue;
00281         }
00282
00283         if( 0 == tokenCount )
00284         {
00285             bool isRootTokenSeparator = CHR_ROOT_TOKEN_SEPARATOR == *it;
00286
00287             if( CHR_PROTOCOL_TOKEN_SEPARATOR == *it || isRootTokenSeparator )
00288             {
00289                 *it = tokenSeparator;
00290                 tokenCount++;
00291             }
00292
00293             if( isRootTokenSeparator )
00294             {
00295                 if( it + 1 != strCvsRoot.end() )
00296                 {
00297                     tokenCount++;
00298                 }
00299
00300                 break;
00301             }
00302         }
00303         else if( 1 == tokenCount )
00304         {
00305             if( CHR_ROOT_TOKEN_SEPARATOR == *it )
00306             {
00307                 *it = tokenSeparator;
00308                 tokenCount++;
00309
00310                 if( it + 1 != strCvsRoot.end() )
00311                 {
00312                     tokenCount++;
00313                 }
00314
00315                 break;
00316             }
00317         }
00318     }
00319
00320     return tokenCount;
00321 }

bool CCvsRootParser::Parse | ( | const char * | cvsRoot,
 |  | const bool | clearData = true
 | ) |

Parse given CVS root string

Parameters:
cvsRoot | CVS root string
clearData | true to clear the data
Returns:
true on success, false otherwise
Definition at line 385 of file CvsRootDlg.cpp.

References CHR_KEYWORD_QUOTE, CHR_KEYWORD_TOKEN_SEPARATOR, CHR_PROTOCOL_TOKEN_SEPARATOR, Clear(), getline(), m_cvsProtocolList, m_path, m_protocol, and SplitCvsRoot().

Referenced by CCvsRootDlg::CCvsRootDlg(), and CCvsRootDlg::ReadProtocolDetails().

00386 {
00387     bool res = false;
00388
00389     if( clearData )
00390     {
00391         Clear();
00392     }
00393
00394     string protocol;
00395     string keywords;
00396     string path;
00397
00398     if( SplitCvsRoot(cvsRoot, protocol, keywords, path) )
00399     {
00400         m_protocol = protocol;
00401         m_path = path;
00402
00403         // Parse the keywords
00404         if( !keywords.empty() )
00405         {
00406             string protocolToken;
00407             stringstream protocolStream(keywords);
00408
00409             // Keywords
00410             while( getline(protocolStream, protocolToken, CHR_PROTOCOL_TOKEN_SEPARATOR) )
00411             {
00412                 string keywordToken;
00413                 string valueToken;
00414                 stringstream keywordStream(protocolToken);
00415
00416                 if( getline(keywordStream, keywordToken, CHR_KEYWORD_TOKEN_SEPARATOR) &&
00417                     getline(keywordStream, valueToken, CHR_KEYWORD_TOKEN_SEPARATOR) )
00418                 {
00419                     valueToken.erase(0, valueToken.find_first_not_of(CHR_KEYWORD_QUOTE));
00420                     valueToken.erase(valueToken.find_last_not_of(CHR_KEYWORD_QUOTE) + 1, string::npos);
00421
00422                     m_cvsProtocolList.erase(keywordToken);
00423                     m_cvsProtocolList.insert(std::make_pair(keywordToken, valueToken));
00424                 }
00425             }
00426         }
00427
00428         res = true;
00429     }
00430
00431     return res;
00432 }

Here is the call graph for this function:

bool CCvsRootParser::SplitCvsRoot | ( | const char * | cvsRoot,
 |  | string & | protocol,
 |  | string & | keywords,
 |  | string & | path
 | ) | const [private]

Split CVS root string into tokens

Parameters:
cvsRoot | CVS root string
protocol | Return protocol
keywords | Return keywords string
path | Return path
Returns:
true on success, false otherwise
Definition at line 331 of file CvsRootDlg.cpp.

References getline(), and NormalizeCvsRoot().

Referenced by Parse().

00332 {
00333     bool res = false;
00334
00335     if( cvsRoot )
00336     {
00337         string strCvsRoot = cvsRoot;
00338
00339         const char tokenSeparator = '\x01';
00340
00341         // Preprocess CVS root to prevent colons posing as a component separator
00342         const int tokenCount = NormalizeCvsRoot(strCvsRoot, tokenSeparator);
00343
00344         // Separate tokens
00345         if( tokenCount > 1 )
00346         {
00347             string token;
00348             stringstream cvsRootStream(strCvsRoot);
00349
00350             // Get the protocol
00351             if( getline(cvsRootStream, token, tokenSeparator) )
00352             {
00353                 protocol = token;
00354
00355                 // Get keywords
00356                 if( tokenCount > 2 )
00357                 {
00358                     if( getline(cvsRootStream, token, tokenSeparator) )
00359                     {
00360                         keywords = token;
00361                     }
00362                 }
00363
00364                 // Get the path
00365                 if( getline(cvsRootStream, token, tokenSeparator) )
00366                 {
00367                     path = token;
00368
00369                     // At this point parsing can be considered a success
00370                     res = true;
00371                 }
00372             }
00373         }
00374     }
00375
00376     return res;
00377 }

Here is the call graph for this function:

Member Data Documentation

CvsProtocolList CCvsRootParser::m_cvsProtocolList [private]

Parsed CVS protocol list Definition at line 137 of file CvsRootDlg.h.

Referenced by Clear(), GetCvsProtocolList(), and Parse().

string CCvsRootParser::m_path [private]

Parsed repository path Definition at line 136 of file CvsRootDlg.h.

Referenced by Clear(), GetPath(), IsEmpty(), and Parse().

string CCvsRootParser::m_protocol [private]

Parsed protocol Definition at line 135 of file CvsRootDlg.h.

Referenced by Clear(), GetProtocol(), IsEmpty(), and Parse().

The documentation for this class was generated from the following files:
  • common/CvsRootDlg.h
  • common/CvsRootDlg.cpp
Generated on Sat Aug 7 22:51:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCvsSandboxInfo Class Reference

CCvsSandboxInfo Class Reference

CVS sandbox info. More...

#include <CvsSandboxInfo.h>

Collaboration diagram for CCvsSandboxInfo:

[legend]
List of all members.

Public Member Functions

CCvsSandboxInfo (const char *path)
virtual | ~CCvsSandboxInfo ()
string | GetRoot () const
string | GetRepository () const

Protected Member Functions

string | ReadAdminFile (const char *name) const

Private Attributes

string | m_path

Detailed Description

CVS sandbox info.

Definition at line 35 of file CvsSandboxInfo.h.

Constructor & Destructor Documentation

CCvsSandboxInfo::CCvsSandboxInfo ( const char * path )

Definition at line 43 of file CvsSandboxInfo.cpp.

00044     : m_path(path)
00045 {
00046 }

CCvsSandboxInfo::~CCvsSandboxInfo ( ) [virtual]

Definition at line 48 of file CvsSandboxInfo.cpp.

00049 {
00050 }

Member Function Documentation

string CCvsSandboxInfo::GetRepository ( ) const

Get the repository

Returns:
CVS/Repository data
Definition at line 84 of file CvsSandboxInfo.cpp.

References ReadAdminFile().

00085 {
00086     return ReadAdminFile("Repository");
00087 }

Here is the call graph for this function:

string CCvsSandboxInfo::GetRoot ( ) const

Get the root

Returns:
CVS/Root data
Definition at line 93 of file CvsSandboxInfo.cpp.

References ReadAdminFile().

00094 {
00095     return ReadAdminFile("Root");
00096 }

Here is the call graph for this function:

string CCvsSandboxInfo::ReadAdminFile ( const char * name ) const [protected]

Read administrative file data

Parameters:
name File name to read
Returns:
Administrative file data
Definition at line 57 of file CvsSandboxInfo.cpp.

References getline(), and m_path.

Referenced by GetRepository(), and GetRoot().

00058 {
00059     string res;
00060
00061     UStr adminPath(m_path.c_str());
00062     if( !adminPath.endsWith(kPathDelimiter) )
00063         adminPath << kPathDelimiter;
00064
00065     adminPath << "CVS";
00066     adminPath << kPathDelimiter;
00067
00068     UStr filename = adminPath;
00069     filename << name;
00070
00071     ifstream adminFile(filename);
00072     if( adminFile.is_open() )
00073     {
00074         std::getline(adminFile, res);
00075     }
00076
00077     return res;
00078 }

Here is the call graph for this function:

Member Data Documentation

string CCvsSandboxInfo::m_path [private]

Definition at line 44 of file CvsSandboxInfo.h.

Referenced by ReadAdminFile().

The documentation for this class was generated from the following files:
  • common/CvsSandboxInfo.h
  • common/CvsSandboxInfo.cpp
Generated on Sat Aug 7 22:51:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsStatusbar Class Reference

UCvsStatusbar Class Reference

#include <UCvsStatusbar.h>

Inheritance diagram for UCvsStatusbar:

[legend]
Collaboration diagram for UCvsStatusbar:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsStatusbar ()
virtual | ~UCvsStatusbar ()

Static Public Member Functions

const URuntimeClass * | rtUCvsStatusbar (void)

Protected Member Functions

void | OnDestroy ()
void | OnCreate ()
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Static Protected Attributes

const URuntimeClass | classUCvsStatusbar
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UCvsStatusbar ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Constructor & Destructor Documentation

UCvsStatusbar::UCvsStatusbar ( )

Definition at line 38 of file UCvsStatusbar.cpp.

00038                              : UWidget(kUCvsStatusbarID)
00039 {
00040 }

UCvsStatusbar::~UCvsStatusbar ( ) [virtual]

Definition at line 42 of file UCvsStatusbar.cpp.

00043 {
00044 }

Member Function Documentation

const URuntimeClass * UCvsStatusbar::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 31 of file UCvsStatusbar.cpp.

const UMSGMAP * UCvsStatusbar::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 33 of file UCvsStatusbar.cpp.

const UMSGMAP * UCvsStatusbar::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Definition at line 33 of file UCvsStatusbar.cpp.

const URuntimeClass * UCvsStatusbar::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Definition at line 31 of file UCvsStatusbar.cpp.

const UMSGMAP * UCvsStatusbar::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Definition at line 33 of file UCvsStatusbar.cpp.

void UCvsStatusbar::OnCreate ( ) [protected]

Definition at line 51 of file UCvsStatusbar.cpp.

00052 {
00053 }

void UCvsStatusbar::OnDestroy ( ) [protected]

Definition at line 46 of file UCvsStatusbar.cpp.

00047 {
00048     delete this;
00049 }

const URuntimeClass * UCvsStatusbar::rtUCvsStatusbar ( void ) [static]

Definition at line 31 of file UCvsStatusbar.cpp.

Member Data Documentation

const UMSGMAP_ENTRY UCvsStatusbar::_messageEntries [static, private]

Initial value:

   {
    { EV_DESTROY, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsStatusbar ::OnDestroy },
    { EV_CREATE, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsStatusbar ::OnCreate },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UWidget.

Definition at line 33 of file UCvsStatusbar.cpp.

const URuntimeClass UCvsStatusbar::classUCvsStatusbar [static, protected]

const UMSGMAP UCvsStatusbar::messageMap = { UWidget ::GetThisMessageMap(), & UCvsStatusbar ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Definition at line 33 of file UCvsStatusbar.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsStatusbar.h
  • common/UCvsStatusbar.cpp
Generated on Sat Aug 7 22:51:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCvsStatusBar Class Reference

CCvsStatusBar Class Reference

#include <CvsStatusBar.h>

Inheritance diagram for CCvsStatusBar:

[legend]
Collaboration diagram for CCvsStatusBar:

[legend]
List of all members.

Public Member Functions

CCvsStatusBar ()
virtual | ~CCvsStatusBar ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)
PreTranslateMessage virtual override, relay messages to the tool tip control.
virtual void | DrawItem (LPDRAWITEMSTRUCT)
DrawItem virtual override, draw animation while CVS command is running.
void | UpdatePathInfo (const char *path)

Protected Member Functions

afx_msg void | OnTimer (UINT nIDEvent)
WM_TIMER message handler, trigger animation.
afx_msg void | OnSize (UINT nType, int cx, int cy)
WM_SIZE message handler, resize indicators.
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
WM_CREATE message handler, set indicators and create tool tip control.
afx_msg UINT | OnNcHitTest (CPoint point)
WM_NCHITTEST message handler, set the tool tip text.

Private Member Functions

BOOL | SetIndicators ()

Private Attributes

CBitmap | m_indic
int m_step
bool m_settimer
CToolTipCtrl | m_tooltip

Constructor & Destructor Documentation

CCvsStatusBar::CCvsStatusBar ( )

Definition at line 53 of file CvsStatusBar.cpp.

References IDB_IDLE, and m_indic.

00054     : m_step(-1), m_settimer(false)
00055 {
00056     m_indic.LoadBitmap(IDB_IDLE);
00057 }

CCvsStatusBar::~CCvsStatusBar ( ) [virtual]

Definition at line 59 of file CvsStatusBar.cpp.

00060 {
00061 }

Member Function Documentation

void CCvsStatusBar::DrawItem ( LPDRAWITEMSTRUCT ) [virtual]

DrawItem virtual override, draw animation while CVS command is running.

Definition at line 100 of file CvsStatusBar.cpp.

References gCvsPrefs, CWincvsApp::IsCvsRunning(), CvsPrefs::IsTclFileRunning(), m_indic, m_settimer, and m_step.

00101 {
00102     if( !m_settimer )
00103     {
00104         SetTimer(999, 100, 0L);
00105         m_settimer = true;
00106     }
00107
00108     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00109     if( !app->IsCvsRunning() && !gCvsPrefs.IsTclFileRunning() )
00110         return;
00111
00112     static int tab[12] = {
00113         -2, -1, 1, 4, 8, 11, 13, 11,
00114         8, 4, 1, -1};
00115     CDC hdc;
00116     CBrush b(RGB(0, 0, 0xFF));
00117
00118     hdc.Attach(p->hDC);
00119     CRect r(p->rcItem);
00120     hdc.FillRect(r, &b);
00121     CPoint off(r.TopLeft());
00122     off.x -= m_step;
00123     int cnt = 0;
00124     while(off.x < r.right)
00125     {
00126         CPoint offy(off);
00127         offy.y += tab[(m_step + cnt) % 12];
00128         hdc.DrawState(offy, CSize(16,16), m_indic, DSS_NORMAL);
00129         off.x += 24;
00130         cnt++;
00131     }
00132
00133     hdc.Detach();
00134 }

Here is the call graph for this function:

int CCvsStatusBar::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

WM_CREATE message handler, set indicators and create tool tip control.

Definition at line 184 of file CvsStatusBar.cpp.

References cvs_err(), m_tooltip, and SetIndicators().

00185 {
00186     if (CStatusBar::OnCreate(lpCreateStruct) == -1)
00187         return -1;
00188
00189     // Set indicators
00190     SetIndicators();
00191
00192     // Create tool tip
00193     if( !m_tooltip.Create(this, TTS_ALWAYSTIP | TTS_NOPREFIX) ||
00194         !m_tooltip.AddTool(this, "Status Bar") )
00195     {
00196         cvs_err("Unable to create tool tip control for status bar\n");
00197     }
00198
00199     return 0;
00200 }

Here is the call graph for this function:

UINT CCvsStatusBar::OnNcHitTest ( CPoint point ) [protected]

WM_NCHITTEST message handler, set the tool tip text.

Definition at line 211 of file CvsStatusBar.cpp.

References kStatusRepository, and m_tooltip.

00212 {
00213     // Set the tool tip text according to the mouse position pane
00214     const int paneCount = GetCount();
00215     for(int nIndex = 0; nIndex < paneCount; nIndex++)
00216     {
00217         CRect paneRect;
00218         GetItemRect(nIndex, paneRect);
00219         ClientToScreen(paneRect);
00220
00221         if( paneRect.PtInRect(point) )
00222         {
00223             CString strCurTip;
00224             m_tooltip.GetText(strCurTip, this);
00225
00226             CString strTip;
00227
00228             if( nIndex <= kStatusRepository )
00229             {
00230                 strTip = GetPaneText(nIndex);
00231             }
00232
00233             if( strTip != strCurTip )
00234             {
00235                 m_tooltip.UpdateTipText(strTip, this);
00236             }
00237
00238             break;
00239         }
00240     }
00241
00242     return CStatusBar::OnNcHitTest(point);
00243 }

void CCvsStatusBar::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy
 | ) | [protected]

WM_SIZE message handler, resize indicators.

Definition at line 159 of file CvsStatusBar.cpp.

References kStatusCVSROOT, kStatusMain, kStatusRepository, and kStatusThrobber.

00160 {
00161     CStatusBar::OnSize(nType, cx, cy);
00162
00163     if( CommandToIndex(ID_SEPARATOR) >= 0 )
00164     {
00165         UINT nID;
00166         UINT nStyle;
00167         int cxWidth;
00168
00169         GetPaneInfo(kStatusMain, nID, nStyle, cxWidth);
00170         SetPaneInfo(kStatusMain, nID, nStyle, int(floor(cx * .10)));
00171
00172         GetPaneInfo(kStatusCVSROOT, nID, nStyle, cxWidth);
00173         SetPaneInfo(kStatusCVSROOT, nID, nStyle, int(floor(cx * .25)));
00174
00175         GetPaneInfo(kStatusRepository, nID, nStyle, cxWidth);
00176         SetPaneInfo(kStatusRepository, nID, nStyle, int(floor(cx * .25)));
00177
00178         GetPaneInfo(kStatusThrobber, nID, nStyle, cxWidth);
00179         SetPaneInfo(kStatusThrobber, nID, nStyle | SBPS_OWNERDRAW, 100);
00180     }
00181 }

void CCvsStatusBar::OnTimer ( UINT nIDEvent ) [protected]

WM_TIMER message handler, trigger animation.

Definition at line 137 of file CvsStatusBar.cpp.

References gCvsPrefs, CWincvsApp::IsCvsRunning(), CvsPrefs::IsTclFileRunning(), kStatusThrobber, and m_step.

00138 {
00139     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00140     if( app->IsCvsRunning() || gCvsPrefs.IsTclFileRunning() )
00141     {
00142         if( m_step-- <= 0 )
00143             m_step = 23;
00144
00145         CRect r;
00146         GetItemRect(kStatusThrobber, r);
00147         InvalidateRect(r, FALSE);
00148     }
00149     else if( m_step != -1 )
00150     {
00151         m_step = -1;
00152         CRect r;
00153         GetItemRect(kStatusThrobber, r);
00154         InvalidateRect(r, FALSE);
00155     }
00156 }

Here is the call graph for this function:

BOOL CCvsStatusBar::PreTranslateMessage ( MSG * pMsg ) [virtual]

PreTranslateMessage virtual override, relay messages to the tool tip control.

Definition at line 203 of file CvsStatusBar.cpp.

References m_tooltip.

00204 {
00205     m_tooltip.RelayEvent(pMsg);
00206
00207     return CStatusBar::PreTranslateMessage(pMsg);
00208 }

BOOL CCvsStatusBar::SetIndicators ( ) [private]

Set the status bar indicators

Returns:
TRUE on success, FALSE otherwise
Note:
Must be called after the status bar is created
Definition at line 80 of file CvsStatusBar.cpp.

References indicators.

Referenced by OnCreate().

00081 {
00082     return CStatusBar::SetIndicators(indicators, sizeof(indicators)/sizeof(UINT));
00083 }

void CCvsStatusBar::UpdatePathInfo ( const char * path )

Update path info

Parameters:
path Path
Definition at line 89 of file CvsStatusBar.cpp.

References kStatusCVSROOT, and kStatusRepository.

Referenced by CBrowseFileView::ResetView().

00090 {
00091     std::auto_ptr<CCvsSandboxInfo> pSandboxInfo(new CCvsSandboxInfo(path));
00092     if( pSandboxInfo.get() )
00093     {
00094         SetPaneText(kStatusCVSROOT, pSandboxInfo->GetRoot().c_str());
00095         SetPaneText(kStatusRepository, pSandboxInfo->GetRepository().c_str());
00096     }
00097 }

Member Data Documentation

CBitmap CCvsStatusBar::m_indic [private]

Definition at line 76 of file CvsStatusBar.h.

Referenced by CCvsStatusBar(), and DrawItem().

bool CCvsStatusBar::m_settimer [private]

Definition at line 78 of file CvsStatusBar.h.

Referenced by DrawItem().

int CCvsStatusBar::m_step [private]

Definition at line 77 of file CvsStatusBar.h.

Referenced by DrawItem(), and OnTimer().

CToolTipCtrl CCvsStatusBar::m_tooltip [private]

Definition at line 80 of file CvsStatusBar.h.

Referenced by OnCreate(), OnNcHitTest(), and PreTranslateMessage().

The documentation for this class was generated from the following files:
  • WinCvs/CvsStatusBar.h
  • WinCvs/CvsStatusBar.cpp
Generated on Sat Aug 7 22:51:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CCvsStreamConsole Class Reference

CCvsStreamConsole Class Reference

Base class for CVS stream console. More...

#include <AppGlue.h>

Inheritance diagram for CCvsStreamConsole:

[legend]
Collaboration diagram for CCvsStreamConsole:

[legend]
List of all members.

Public Member Functions

CCvsStreamConsole (FILE *fileOut=0L, bool autoClose=true)
virtual | ~CCvsStreamConsole ()
virtual bool | Open (const char *fileName)
virtual long | cvs_out (const char *txt, long len)
virtual long | cvs_err (const char *txt, long len)
Call from override at the entry.

Protected Member Functions

virtual void | SetMode (bool binary)
virtual bool | IsModeSet () const

Protected Attributes

bool m_autoClose
bool m_modeSet
FILE * | m_fileOut

Detailed Description

Base class for CVS stream console.

Definition at line 116 of file AppGlue.h.

Constructor & Destructor Documentation

CCvsStreamConsole::CCvsStreamConsole | ( | FILE * | fileOut = 0L,
 |  | bool | autoClose = true
 | ) |

Definition at line 866 of file AppGlue.cpp.

00867     : m_autoClose(autoClose), m_modeSet(false), m_fileOut(fileOut)
00868 {
00869 }

CCvsStreamConsole::~CCvsStreamConsole ( ) [virtual]

Definition at line 871 of file AppGlue.cpp.

References m_autoClose, and m_fileOut.

00872 {
00873     if( m_autoClose && m_fileOut )
00874     {
00875         fclose(m_fileOut);
00876     }
00877 }

Member Function Documentation

long CCvsStreamConsole::cvs_err | ( | const char * | txt,
 |  | long | len
 | ) | [virtual]

Call from override at the entry.

Implements CCvsConsole.

Definition at line 935 of file AppGlue.cpp.

References cvs_errstr().

00936 {
00937     cvs_errstr(txt, len);
00938     return len;
00939 }

Here is the call graph for this function:

long CCvsStreamConsole::cvs_out | ( | const char * | txt,
 |  | long | len
 | ) | [virtual]

Stdout handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 923 of file AppGlue.cpp.

References IsModeSet(), m_fileOut, and SetMode().

00924 {
00925     if( !IsModeSet() )
00926     {
00927         SetMode(len == 0);
00928     }
00929
00930     fwrite(txt, sizeof(char), len, m_fileOut);
00931     return len;
00932 }

Here is the call graph for this function:

bool CCvsStreamConsole::IsModeSet ( ) const [protected, virtual]

Check whether the file translation mode was set already

Returns:
true if the file translation mode was set already, false otherwise
Note:
Should be used before call to setmode to prevent unnecessary mode change
Definition at line 905 of file AppGlue.cpp.

References m_modeSet.

Referenced by cvs_out().

00906 {
00907     return m_modeSet;
00908 }

bool CCvsStreamConsole::Open ( const char * fileName ) [virtual]

Open the output file

Parameters:
fileName File name to be opened
Returns:
true on success, false otherwise
Note:
File is opened as text or binary depending on the line feed preference settings
Definition at line 916 of file AppGlue.cpp.

References gCvsPrefs, m_fileOut, and CvsPrefs::UnixLF().

Referenced by CRevisionConsole::Init().

00917 {
00918     m_fileOut = fopen(fileName, gCvsPrefs.UnixLF() ? "wb+" : "w+");
00919
00920     return 0L != m_fileOut;
00921 }

Here is the call graph for this function:

void CCvsStreamConsole::SetMode ( bool binary ) [protected, virtual]

Set the output file mode

Parameters:
binary true to set the binary mode, false to set the text mode
Note:
Typically the default mode is text
Definition at line 884 of file AppGlue.cpp.

References gCvsPrefs, m_fileOut, m_modeSet, and CvsPrefs::UnixLF().

Referenced by cvs_out().

00885 {
00886 #ifdef WIN32
00887     if( binary )
00888     {
00889         setmode(fileno(m_fileOut), _O_BINARY);
00890     }
00891     else
00892     {
00893         setmode(fileno(m_fileOut), gCvsPrefs.UnixLF() ? _O_BINARY : _O_TEXT);
00894     }
00895 #endif
00896
00897     m_modeSet = true;
00898 }

Here is the call graph for this function:

Member Data Documentation

bool CCvsStreamConsole::m_autoClose [protected]

Flag to indicate that output file should be closed by the destructor Definition at line 125 of file AppGlue.h.

Referenced by ~CCvsStreamConsole().

FILE* CCvsStreamConsole::m_fileOut [protected]

Output file handle Definition at line 127 of file AppGlue.h.

Referenced by cvs_out(), Open(), SetMode(), and ~CCvsStreamConsole().

bool CCvsStreamConsole::m_modeSet [protected]

Flag to indicate that output file mode is set Definition at line 126 of file AppGlue.h.

Referenced by IsModeSet(), and SetMode().

The documentation for this class was generated from the following files:
  • common/AppGlue.h
  • common/AppGlue.cpp
Generated on Sat Aug 7 22:51:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UCvsToolbar Class Reference

UCvsToolbar Class Reference

#include <UCvsToolbar.h>

Inheritance diagram for UCvsToolbar:

[legend]
Collaboration diagram for UCvsToolbar:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UCvsToolbar (int widid)
virtual | ~UCvsToolbar ()

Static Public Member Functions

const URuntimeClass * | rtUCvsToolbar (void)

Protected Member Functions

void | OnDestroy ()
void | OnCreate ()
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Static Protected Attributes

const URuntimeClass | classUCvsToolbar
const UMSGMAP | messageMap = { UToolbar ::GetThisMessageMap(), & UCvsToolbar ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Constructor & Destructor Documentation

UCvsToolbar::UCvsToolbar ( int widid )

Definition at line 37 of file UCvsToolbar.cpp.

00037                                   : UToolbar(widid)
00038 {
00039 }

UCvsToolbar::~UCvsToolbar ( ) [virtual]

Definition at line 41 of file UCvsToolbar.cpp.

00042 {
00043 }

Member Function Documentation

const URuntimeClass * UCvsToolbar::_GetBaseClass ( ) [static, protected]

Reimplemented from UToolbar.

Definition at line 30 of file UCvsToolbar.cpp.

const UMSGMAP * UCvsToolbar::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UToolbar.

Definition at line 32 of file UCvsToolbar.cpp.

const UMSGMAP * UCvsToolbar::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UToolbar.

Definition at line 32 of file UCvsToolbar.cpp.

const URuntimeClass * UCvsToolbar::GetRuntimeClass ( ) const [virtual]

Reimplemented from UToolbar.

Definition at line 30 of file UCvsToolbar.cpp.

const UMSGMAP * UCvsToolbar::GetThisMessageMap ( ) [static, protected]

Reimplemented from UToolbar.

Definition at line 32 of file UCvsToolbar.cpp.

void UCvsToolbar::OnCreate ( ) [protected]

Definition at line 50 of file UCvsToolbar.cpp.

00051 {
00052 }

void UCvsToolbar::OnDestroy ( ) [protected]

Reimplemented from UToolbar.

Definition at line 45 of file UCvsToolbar.cpp.

00046 {
00047     delete this;
00048 }

const URuntimeClass * UCvsToolbar::rtUCvsToolbar ( void ) [static]

Definition at line 30 of file UCvsToolbar.cpp.

Member Data Documentation

const UMSGMAP_ENTRY UCvsToolbar::_messageEntries [static, private]

Initial value:

   {
    { EV_DESTROY, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsToolbar ::OnDestroy },
    { EV_CREATE, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UCvsToolbar ::OnCreate },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UToolbar.

Definition at line 32 of file UCvsToolbar.cpp.

const URuntimeClass UCvsToolbar::classUCvsToolbar [static, protected]

const UMSGMAP UCvsToolbar::messageMap = { UToolbar ::GetThisMessageMap(), & UCvsToolbar ::_messageEntries[0] } [static, protected]

Reimplemented from UToolbar.

Definition at line 32 of file UCvsToolbar.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsToolbar.h
  • common/UCvsToolbar.cpp
Generated on Sat Aug 7 22:51:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UDC Class Reference

UDC Class Reference

#include <udraw.h>

Collaboration diagram for UDC:

[legend]
List of all members.

Public Member Functions

UDC (int widid, int cmdid)
~UDC ()
USize | GetTextExtent (const char *lpszString, int nCount) const
int | GetTextHeight (void) const
bool | TextOutClipped (int x, int y, const URECT *lpRect, const char *lpszString, int nCount)
void | MoveTo (int x, int y)
void | LineTo (int x, int y)
bool | DrawBitmap (void *bitmap, UPOINT where)
UPen * | SelectObject (UPen *pPen)
UBrush * | SelectObject (UBrush *pBrush)
bool | Rectangle (const URECT *lpRect)
bool | RoundRect (const URECT *lpRect, UPOINT point)

Protected Attributes

void * | m_wid
UPen * m_pen
UBrush * m_brush

Constructor & Destructor Documentation

UDC::UDC | ( | int | widid,
 |  | int | cmdid
 | ) |

Definition at line 160 of file udraw.cpp.

References UObject::IsKindOf(), m_wid, UEventQueryWidget(), and URUNTIME_CLASS.

00160                              : m_wid(0L), m_pen(0L), m_brush(0L)
00161 #if qGTK
00162     , m_gc(0L), m_penloc(0, 0), m_drawable(0L), m_orig(0, 0)
00163 #endif
00164 {
00165     UCmdTarget *target = UEventQueryWidget(widid);
00166     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UWidget)))
00167         return;
00168
00169     m_wid = ((UWidget *)target)->GetWidget(cmdid);
00170 #if qGTK
00171     if(m_wid != 0L)
00172     {
00173         GtkWidget *widget = GTK_WIDGET(m_wid);
00174
00175         if(GTK_IS_DRAWING_AREA(widget))
00176         {
00177             m_drawable = GTK_DRAWING_AREA(widget)->widget.window;
00178             m_orig.x = 0;
00179             m_orig.y = 0;
00180         }
00181         else
00182             m_drawable = m_drawable;
00183         m_gc = gdk_gc_new(m_drawable);
00184         if(m_gc == 0L)
00185             m_wid = 0L;
00186         else
00187         {
00188             GdkGCValues values;
00189             gdk_gc_get_values(m_gc, &values);
00190             m_foreground = values.foreground;
00191             m_background = values.background;
00192             m_font = gdk_font_load ("-adobe-*-medium-r-normal--*-120-*-*-*-*-iso8859-*");
00193             if(m_font == 0L)
00194                 m_font = gdk_font_load ("-adobe-courier-medium-r-normal--*-120-*-*-*-*-*-*");
00195             if(m_font != 0L)
00196                 gdk_gc_set_font(m_gc, m_font);
00197         }
00198     }
00199 #endif
00200 }

Here is the call graph for this function:

UDC::~UDC ( )

Definition at line 238 of file udraw.cpp.

00239 {
00240 #if qGTK
00241     if(m_gc != 0L)
00242         gdk_gc_destroy(m_gc);
00243     if(m_font != 0L)
00244         gdk_font_unref (m_font);
00245 #endif
00246 }

Member Function Documentation

bool UDC::DrawBitmap | ( | void * | bitmap,
 |  | UPOINT | where
 | ) |

Definition at line 366 of file udraw.cpp.

References m_wid, UPOINT::x, and UPOINT::y.

Referenced by CWinLogRevData::UpdateSelf().

00367 {
00368     if(m_wid == 0L)
00369         return false;
00370
00371 #if qGTK
00372     if(m_font == 0L)
00373         return false;
00374
00375     gdk_draw_pixmap(m_drawable, m_gc, GTK_PIXMAP(bitmap)->pixmap,
00376                     0, 0, where.x + m_orig.x, where.y + m_orig.y, -1, -1);
00377 #endif
00378
00379     return true;
00380 }

USize UDC::GetTextExtent | ( | const char * | lpszString,
 |  | int | nCount
 | ) | const

Definition at line 312 of file udraw.cpp.

References USIZE::cx, USIZE::cy, and m_wid.

Referenced by CWinLogBranchData::GetBoundsSelf(), CWinLogTagData::GetBoundsSelf(), CWinLogRevData::GetBoundsSelf(), CWinLogHeaderData::GetBoundsSelf(), and TextOutClipped().

00313 {
00314     USize res(0, 0);
00315     if(m_wid == 0L)
00316         return res;
00317
00318 #if qGTK
00319     if(m_font == 0L)
00320         return res;
00321
00322     res.cx = gdk_text_width(m_font, lpszString, nCount);
00323     res.cy = gdk_text_height(m_font, lpszString, nCount);
00324 #endif
00325
00326     return res;
00327 }

int UDC::GetTextHeight ( void ) const

Definition at line 329 of file udraw.cpp.

References m_wid.

Referenced by CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogRevData::UpdateSelf(), and CWinLogHeaderData::UpdateSelf().

00330 {
00331     int res = 0;
00332     if(m_wid == 0L)
00333         return res;
00334
00335 #if qGTK
00336     if(m_font == 0L)
00337         return res;
00338
00339     res = m_font->ascent + m_font->descent;
00340 #endif
00341
00342     return res;
00343 }

void UDC::LineTo | ( | int | x,
 |  | int | y
 | ) |

Definition at line 299 of file udraw.cpp.

References m_wid.

Referenced by CWinLogData::Update().

00300 {
00301     if(m_wid == 0L)
00302         return;
00303
00304 #if qGTK
00305     gdk_draw_line(m_drawable, m_gc,
00306                   m_penloc.x, m_penloc.y, x + m_orig.x, y + m_orig.y);
00307     m_penloc.x = x + m_orig.x;
00308     m_penloc.y = y + m_orig.y;
00309 #endif
00310 }

void UDC::MoveTo | ( | int | x,
 |  | int | y
 | ) |

Definition at line 288 of file udraw.cpp.

References m_wid.

Referenced by CWinLogData::Update().

00289 {
00290     if(m_wid == 0L)
00291         return;
00292
00293 #if qGTK
00294     m_penloc.x = x + m_orig.x;
00295     m_penloc.y = y + m_orig.y;
00296 #endif
00297 }

bool UDC::Rectangle ( const URECT * lpRect )

Definition at line 248 of file udraw.cpp.

References URect::Height(), URECT::left, m_brush, m_pen, m_wid, SelectObject(), URECT::top, and URect::Width().

Referenced by DrawNode().

00249 {
00250     if(m_wid == 0L)
00251         return false;
00252
00253 #if qGTK
00254     URect r(*lpRect);
00255     if(m_brush != 0L && m_brush->m_set)
00256     {
00257         gdk_gc_set_foreground(m_gc, &m_brush->m_col);
00258         gdk_draw_rectangle (m_drawable, m_gc, TRUE,
00259                             r.left + m_orig.x, r.top + m_orig.y, r.Width(), r.Height());
00260         SelectObject(m_pen);
00261     }
00262     gdk_draw_rectangle (m_drawable, m_gc, FALSE,
00263                         r.left + m_orig.x, r.top + m_orig.y, r.Width(), r.Height());
00264 #endif
00265     return true;
00266 }

Here is the call graph for this function:

bool UDC::RoundRect | ( | const URECT * | lpRect,
 |  | UPOINT | point
 | ) |

Definition at line 268 of file udraw.cpp.

References URect::Height(), URECT::left, m_brush, m_pen, m_wid, SelectObject(), URECT::top, and URect::Width().

Referenced by DrawNode().

00269 {
00270     if(m_wid == 0L)
00271         return false;
00272
00273 #if qGTK
00274     URect r(*lpRect);
00275     if(m_brush != 0L && m_brush->m_set)
00276     {
00277         gdk_gc_set_foreground(m_gc, &m_brush->m_col);
00278         gdk_draw_rectangle (m_drawable, m_gc, TRUE,
00279                             r.left + m_orig.x, r.top + m_orig.y, r.Width(), r.Height());
00280         SelectObject(m_pen);
00281     }
00282     gdk_draw_rectangle (m_drawable, m_gc, FALSE,
00283                         r.left + m_orig.x, r.top + m_orig.y, r.Width(), r.Height());
00284 #endif
00285     return true;
00286 }

Here is the call graph for this function:

UBrush * UDC::SelectObject ( UBrush * pBrush )

Definition at line 220 of file udraw.cpp.

References m_brush, and m_wid.

00221 {
00222     if(m_wid == 0L)
00223         return 0L;
00224
00225     UBrush *oldbrush = m_brush;
00226     m_brush = pBrush;
00227
00228 #if qGTK
00229     if(m_brush != 0L && m_brush->m_set)
00230         gdk_gc_set_background(m_gc, &m_brush->m_col);
00231     else
00232         gdk_gc_set_background(m_gc, &m_background);
00233 #endif
00234
00235     return oldbrush;
00236 }

UPen * UDC::SelectObject ( UPen * pPen )

Definition at line 202 of file udraw.cpp.

References m_pen, and m_wid.

Referenced by DrawNode(), Rectangle(), RoundRect(), and CWinLogData::Update().

00203 {
00204     if(m_wid == 0L)
00205         return 0L;
00206
00207     UPen *oldpen = m_pen;
00208     m_pen = pPen;
00209
00210 #if qGTK
00211     if(m_pen != 0L && m_pen->m_set)
00212         gdk_gc_set_foreground(m_gc, &m_pen->m_col);
00213     else
00214         gdk_gc_set_foreground(m_gc, &m_foreground);
00215 #endif
00216
00217     return oldpen;
00218 }

bool UDC::TextOutClipped | ( | int | x,
 |  | int | y,
 |  | const URECT * | lpRect,
 |  | const char * | lpszString,
 |  | int | nCount
 | ) |

Definition at line 345 of file udraw.cpp.

References URECT::bottom, USIZE::cx, USIZE::cy, GetTextExtent(), URect::Height(), URECT::left, m_wid, and URect::Width().

Referenced by CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogRevData::UpdateSelf(), and CWinLogHeaderData::UpdateSelf().

00347 {
00348     if(m_wid == 0L)
00349         return false;
00350
00351 #if qGTK
00352     if(m_font == 0L)
00353         return false;
00354
00355     USize size = GetTextExtent(lpszString, nCount);
00356     URect r(*lpRect);
00357     UPoint out(r.left, r.bottom);
00358     out += UPoint((r.Width() - size.cx) / 2, -(r.Height() - size.cy) / 2);
00359     gdk_draw_text(m_drawable, m_font, m_gc, out.x + m_orig.x, out.y + m_orig.y,
00360                   lpszString, nCount);
00361 #endif
00362
00363     return true;
00364 }

Here is the call graph for this function:

Member Data Documentation

UBrush* UDC::m_brush [protected]

Definition at line 525 of file udraw.h.

Referenced by Rectangle(), RoundRect(), and SelectObject().

UPen* UDC::m_pen [protected]

Definition at line 524 of file udraw.h.

Referenced by Rectangle(), RoundRect(), and SelectObject().

void* UDC::m_wid [protected]

Definition at line 523 of file udraw.h.

Referenced by DrawBitmap(), GetTextExtent(), GetTextHeight(), LineTo(), MoveTo(), Rectangle(), RoundRect(), SelectObject(), TextOutClipped(), and UDC().

The documentation for this class was generated from the following files:
  • rf/udraw.h
  • rf/udraw.cpp
Generated on Sat Aug 7 22:51:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDialog Class Reference

CDialog Class Reference

Inheritance diagram for CDialog:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/TipDlg.h
Generated on Sat Aug 7 22:51:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDiff_MAIN Class Reference

CDiff_MAIN Class Reference

#include <DiffDlg.h>

Inheritance diagram for CDiff_MAIN:

[legend]
Collaboration diagram for CDiff_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_DIFF_MAIN }

Public Member Functions

CDiff_MAIN (const MultiFiles *mf, kDiffCmdType diffType, const char *rev1, const char *rev2, bool allowExtDiff, bool useExtDiff, bool unifiedDiff, bool noWhiteSpace, bool ignoreCase, const char *keyword, const char *diffOptions)
~CDiff_MAIN ()

Public Attributes

CSmartComboBox m_diffOptionsCombo
CButton | m_noWhiteSpaceCheck
CButton | m_ignoreCaseCheck
CButton | m_extDiffButton
CButton | m_optionsMenuButton
CButton | m_noRecursCheck
CButton | m_unifiedDiffCheck
CStatic | m_keywordDescStatic
CKeywordComboBox m_keywordCombo
CButton | m_browseTag2Button
CButton | m_browseTag1Button
CButton | m_isDate2Check
CButton | m_isDate1Check
CSmartComboBox m_compareTypeCombo
CSmartComboBox m_rev2Combo
CSmartComboBox m_rev1Combo
BOOL | m_isDate1
BOOL | m_isDate2
CString | m_rev1
CString | m_rev2
BOOL | m_noWhiteSpace
BOOL | m_ignoreCase
int m_compareType
BOOL | m_unifiedDiff
CString | m_keyword
BOOL | m_noRecurs
BOOL | m_extDiff
CString | m_diffOptions

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnExtdiff ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnCheck1 ()
BN_CLICKED message handler, enable controls and set default input.
afx_msg void | OnCheck2 ()
BN_CLICKED message handler, enable controls and set default input.
afx_msg void | OnBrowseTag1 ()
BN_CLICKED message handler, display browse tag/branch dialog.
afx_msg void | OnBrowseTag2 ()
BN_CLICKED message handler, display browse tag/branch dialog.
afx_msg void | OnSelchangeCompareType ()
CBN_SELCHANGE message handler, enable controls and set default input.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize the controls.
afx_msg void | OnOptionsmenu ()
BN_CLICKED message handler, display the diff options dialog.

Private Types

enum kInputChange {
kDefRev1Change,
kDefRev2Change,
kDefTypeChange
}
Input change enum. More...

Private Member Functions

virtual void | InitHelpID ()
void | EnableCompareType (const int compareType)
void | EnableCmdLineDiffOptions (bool enable)
void | SetDefaultInput (const kInputChange inputChange, const int compareType)
bool | IsDefaultedRev (const CComboBox *comboBox)

Private Attributes

const MultiFiles * | m_mf
bool m_allowExtDiff
kDiffCmdType m_diffType

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 76 of file DiffDlg.h.
00076 { IDD = IDD_DIFF_MAIN };

enum CDiff_MAIN::kInputChange [private]

Input change enum.

Enumeration values:
kDefRev1Change | Revision 1 date checkbox changed
kDefRev2Change | Revision 2 date checkbox changed
kDefTypeChange | Compare type change
Definition at line 130 of file DiffDlg.h.
00131     {
00132         kDefRev1Change,
00133         kDefRev2Change,
00134         kDefTypeChange
00135     } kInputChange;

Constructor & Destructor Documentation

CDiff_MAIN::CDiff_MAIN | ( | const MultiFiles * | mf,
 |  | kDiffCmdType | diffType,
 |  | const char * | rev1,
 |  | const char * | rev2,
 |  | bool | allowExtDiff,
 |  | bool | useExtDiff,
 |  | bool | unifiedDiff,
 |  | bool | noWhiteSpace,
 |  | bool | ignoreCase,
 |  | const char * | keyword,
 |  | const char * | diffOptions
 | ) |

Definition at line 261 of file DiffDlg.cpp.

References UStr::c_str(), MultiFiles::const_iterator, gDateNames, gDiffOptions, gRevNames, kCompareAnotherRev, kCompareSameRev, kCompareTwoRev, and kDiffGraph.

00266                        : m_mf(mf), m_diffType(diffType), m_compareTypeCombo(USmartCombo::AutoDropWidth), m_allowExtDiff(allowExtDiff),
00267                        CHHelpPropertyPage(CDiff_MAIN::IDD)
00268 {
00269     //{{AFX_DATA_INIT(CDiff_MAIN)
00270     m_isDate1 = FALSE;
00271     m_isDate2 = FALSE;
00272     m_rev1 = rev1;
00273     m_rev2 = rev2;
00274     m_noWhiteSpace = noWhiteSpace;
00275     m_ignoreCase = ignoreCase;
00276     m_compareType = kCompareSameRev;
00277     m_unifiedDiff = unifiedDiff;
00278     m_keyword = keyword;
00279     m_noRecurs = FALSE;
00280     m_extDiff = useExtDiff;
00281     m_diffOptions = diffOptions;
00282     //}}AFX_DATA_INIT
00283
00284     if( kDiffGraph != m_diffType )
00285     {
00286         m_rev1Combo.SetItems(m_isDate1 ? &gDateNames : &gRevNames);
00287         m_rev2Combo.SetItems(m_isDate2 ? &gDateNames : &gRevNames);
00288     }
00289     else
00290     {
00291         m_compareType = m_mf->TotalNumFiles() == 1 ? kCompareAnotherRev : kCompareTwoRev;
00292
00293         m_rev1Combo.SetFeature(USmartCombo::AutoDropWidth | USmartCombo::ReadOnly);
00294         m_rev2Combo.SetFeature(USmartCombo::AutoDropWidth | USmartCombo::ReadOnly);
00295
00296         if( m_mf && m_mf->TotalNumFiles() )
00297         {
00298             MultiFiles::const_iterator mfi;
00299             for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
00300             {
00301                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
00302                 {
00303                     UStr path;
00304                     UStr fileName;
00305                     UStr currRev;
00306
00307                     mfi->get(nIndex, path, fileName, currRev);
00308
00309                     switch( nIndex )
00310                     {
00311                     case 0:
00312                         m_rev1 = currRev.c_str();
00313                         break;
00314                     case 1:
00315                         m_rev2 = currRev.c_str();
00316                         break;
00317                     default:
00318                         ASSERT(FALSE);  // there should be no more than 2 files in the selection
00319                         break;
00320                     }
00321                 }
00322             }
00323         }
00324     }
00325
00326     m_diffOptionsCombo.SetItems(&gDiffOptions);
00327 }

Here is the call graph for this function:

CDiff_MAIN::~CDiff_MAIN ( )

Definition at line 329 of file DiffDlg.cpp.

00330 {
00331 }

Member Function Documentation

void CDiff_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 333 of file DiffDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), EnableCompareType(), IDC_BROWSE_DIFFOPTIONS, IDC_BROWSE_TAG1, IDC_BROWSE_TAG2, IDC_COMPARE_TYPE, IDC_DIFFOPTIONS, IDC_IGNORECASE, IDC_IGNOREWHITESPACE, IDC_ISDATE1, IDC_ISDATE2, IDC_KEYWORD_DESC, IDC_KEYWORD_OPT, IDC_NORECURS, IDC_REV_TAG1, IDC_REV_TAG2, IDC_UNIFIEDDIFF, IDC_USE_EXTERNAL_DIFF, kCompareAnotherRev, kCompareTwoRev, kDiffGraph, m_allowExtDiff, m_browseTag1Button, m_browseTag2Button, m_compareType, m_compareTypeCombo, m_diffOptions, m_diffOptionsCombo, m_diffType, m_extDiff, m_extDiffButton, m_ignoreCase, m_ignoreCaseCheck, m_isDate1, m_isDate1Check, m_isDate2, m_isDate2Check, m_keyword, m_keywordCombo, m_keywordDescStatic, m_noRecurs, m_noRecursCheck, m_noWhiteSpace, m_noWhiteSpaceCheck, m_optionsMenuButton, m_rev1, m_rev1Combo, m_rev2, m_rev2Combo, m_unifiedDiff, m_unifiedDiffCheck, and OnExtdiff().

00334 {
00335     CHHelpPropertyPage::DoDataExchange(pDX);
00336     //{{AFX_DATA_MAP(CDiff_MAIN)
00337     DDX_Control(pDX, IDC_DIFFOPTIONS, m_diffOptionsCombo);
00338     DDX_Control(pDX, IDC_IGNOREWHITESPACE, m_noWhiteSpaceCheck);
00339     DDX_Control(pDX, IDC_IGNORECASE, m_ignoreCaseCheck);
00340     DDX_Control(pDX, IDC_USE_EXTERNAL_DIFF, m_extDiffButton);
00341     DDX_Control(pDX, IDC_BROWSE_DIFFOPTIONS, m_optionsMenuButton);
00342     DDX_Control(pDX, IDC_NORECURS, m_noRecursCheck);
00343     DDX_Control(pDX, IDC_UNIFIEDDIFF, m_unifiedDiffCheck);
00344     DDX_Control(pDX, IDC_KEYWORD_DESC, m_keywordDescStatic);
00345     DDX_Control(pDX, IDC_KEYWORD_OPT, m_keywordCombo);
00346     DDX_Control(pDX, IDC_BROWSE_TAG2, m_browseTag2Button);
00347     DDX_Control(pDX, IDC_BROWSE_TAG1, m_browseTag1Button);
00348     DDX_Control(pDX, IDC_ISDATE2, m_isDate2Check);
00349     DDX_Control(pDX, IDC_ISDATE1, m_isDate1Check);
00350     DDX_Control(pDX, IDC_COMPARE_TYPE, m_compareTypeCombo);
00351     DDX_Control(pDX, IDC_REV_TAG2, m_rev2Combo);
00352     DDX_Control(pDX, IDC_REV_TAG1, m_rev1Combo);
00353     DDX_Check(pDX, IDC_ISDATE1, m_isDate1);
00354     DDX_Check(pDX, IDC_ISDATE2, m_isDate2);
00355     DDX_CBString(pDX, IDC_REV_TAG1, m_rev1);
00356     DDX_CBString(pDX, IDC_REV_TAG2, m_rev2);
00357     DDX_Check(pDX, IDC_IGNOREWHITESPACE, m_noWhiteSpace);
00358     DDX_Check(pDX, IDC_IGNORECASE, m_ignoreCase);
00359     DDX_CBIndex(pDX, IDC_COMPARE_TYPE, m_compareType);
00360     DDX_Check(pDX, IDC_UNIFIEDDIFF, m_unifiedDiff);
00361     DDX_CBString(pDX, IDC_KEYWORD_OPT, m_keyword);
00362     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00363     DDX_Check(pDX, IDC_USE_EXTERNAL_DIFF, m_extDiff);
00364     DDX_CBString(pDX, IDC_DIFFOPTIONS, m_diffOptions);
00365     //}}AFX_DATA_MAP
00366
00367     if( kDiffGraph != m_diffType )
00368     {
00369         if( kCompareAnotherRev == m_compareType || kCompareTwoRev == m_compareType )
00370         {
00371             DDV_MinChars(pDX, m_rev1, 1);
00372         }
00373
00374         if( kCompareTwoRev == m_compareType )
00375         {
00376             DDV_MinChars(pDX, m_rev2, 1);
00377         }
00378
00379         if( !pDX->m_bSaveAndValidate )
00380         {
00381             EnableCompareType(m_compareType);
00382         }
00383
00384         DDX_ComboMString(pDX, IDC_REV_TAG1, m_rev1Combo);
00385         DDX_ComboMString(pDX, IDC_REV_TAG2, m_rev2Combo);
00386
00387         DDX_ComboMString(pDX, IDC_DIFFOPTIONS, m_diffOptionsCombo);
00388     }
00389
00390     m_extDiffButton.EnableWindow(m_allowExtDiff ? true : false);
00391
00392     OnExtdiff();
00393 }

Here is the call graph for this function:

void CDiff_MAIN::EnableCmdLineDiffOptions ( bool enable ) [private]

Enable controls for command line option

Parameters:
enable true to enable controls, false to disable
Definition at line 420 of file DiffDlg.cpp.

References m_diffOptionsCombo, m_ignoreCaseCheck, m_keywordCombo, m_keywordDescStatic, m_noRecursCheck, m_noWhiteSpaceCheck, m_optionsMenuButton, and m_unifiedDiffCheck.

00421 {
00422     m_unifiedDiffCheck.EnableWindow(enable);
00423     m_ignoreCaseCheck.EnableWindow(enable);
00424     m_noWhiteSpaceCheck.EnableWindow(enable);
00425     m_noRecursCheck.EnableWindow(enable);
00426     m_keywordCombo.EnableWindow(enable);
00427     m_keywordDescStatic.EnableWindow(enable);
00428     m_diffOptionsCombo.EnableWindow(enable);
00429     m_optionsMenuButton.EnableWindow(enable);
00430 }

void CDiff_MAIN::EnableCompareType ( const int compareType ) [private]

Enable controls for given compare type

Parameters:
compareType Compare type
Definition at line 493 of file DiffDlg.cpp.

References kCompareAnotherRev, kCompareSameRev, kCompareTwoRev, m_browseTag1Button, m_browseTag2Button, m_isDate1Check, m_isDate2Check, m_rev1Combo, and m_rev2Combo.

Referenced by DoDataExchange(), and OnSelchangeCompareType().

00494 {
00495     bool hasRev1 = false;
00496     bool hasRev2 = false;
00497
00498     switch( compareType )
00499     {
00500     default:
00501         ASSERT(FALSE);  //unknown compare type
00502     case kCompareSameRev:
00503         hasRev1 = hasRev2 = false;
00504         break;
00505     case kCompareAnotherRev:
00506         hasRev1 = true;
00507         hasRev2 = false;
00508         break;
00509     case kCompareTwoRev:
00510         hasRev1 = true;
00511         hasRev2 = true;
00512         break;
00513     }
00514
00515     m_rev1Combo.EnableWindow(hasRev1);
00516     m_isDate1Check.EnableWindow(hasRev1);
00517     m_browseTag1Button.EnableWindow(hasRev1);
00518
00519     m_rev2Combo.EnableWindow(hasRev2);
00520     m_isDate2Check.EnableWindow(hasRev2);
00521     m_browseTag2Button.EnableWindow(hasRev2);
00522 }

void CDiff_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 680 of file DiffDlg.cpp.

References IDC_BROWSE_DIFFOPTIONS, IDC_BROWSE_TAG1, IDC_BROWSE_TAG2, IDC_COMPARE_TYPE, IDC_DIFFOPTIONS, IDC_IGNORECASE, IDC_IGNOREWHITESPACE, IDC_ISDATE1, IDC_ISDATE2, IDC_KEYWORD_DESC, IDC_KEYWORD_OPT, IDC_NORECURS, IDC_REV_TAG1, IDC_REV_TAG2, IDC_UNIFIEDDIFF, IDC_USE_EXTERNAL_DIFF, IDH_IDC_BROWSE_DIFFOPTIONS, IDH_IDC_BROWSE_TAG, IDH_IDC_COMPARE_TYPE, IDH_IDC_DIFFOPTIONS, IDH_IDC_IGNORECASE, IDH_IDC_IGNOREWHITESPACE, IDH_IDC_ISDATE, IDH_IDC_KEYWORD_DESC, IDH_IDC_KEYWORD_OPT, IDH_IDC_NORECURS, IDH_IDC_REV_TAG_DATE, IDH_IDC_UNIFIEDDIFF, IDH_IDC_USE_EXTERNAL_DIFF, and CHHelpSupport::SetCtrlHelpID().

00681 {
00682     SetCtrlHelpID(IDC_COMPARE_TYPE,         IDH_IDC_COMPARE_TYPE);
00683     SetCtrlHelpID(IDC_REV_TAG1,             IDH_IDC_REV_TAG_DATE);
00684     SetCtrlHelpID(IDC_BROWSE_TAG1,          IDH_IDC_BROWSE_TAG);
00685     SetCtrlHelpID(IDC_ISDATE1,              IDH_IDC_ISDATE);
00686     SetCtrlHelpID(IDC_REV_TAG2,             IDH_IDC_REV_TAG_DATE);
00687     SetCtrlHelpID(IDC_BROWSE_TAG2,          IDH_IDC_BROWSE_TAG);
00688     SetCtrlHelpID(IDC_ISDATE2,              IDH_IDC_ISDATE);
00689     SetCtrlHelpID(IDC_USE_EXTERNAL_DIFF,    IDH_IDC_USE_EXTERNAL_DIFF);
00690     SetCtrlHelpID(IDC_UNIFIEDDIFF,          IDH_IDC_UNIFIEDDIFF);
00691     SetCtrlHelpID(IDC_IGNORECASE,           IDH_IDC_IGNORECASE);
00692     SetCtrlHelpID(IDC_IGNOREWHITESPACE,     IDH_IDC_IGNOREWHITESPACE);
00693     SetCtrlHelpID(IDC_NORECURS,             IDH_IDC_NORECURS);
00694     SetCtrlHelpID(IDC_KEYWORD_OPT,          IDH_IDC_KEYWORD_OPT);
00695     SetCtrlHelpID(IDC_KEYWORD_DESC,         IDH_IDC_KEYWORD_DESC);
00696     SetCtrlHelpID(IDC_DIFFOPTIONS,          IDH_IDC_DIFFOPTIONS);
00697     SetCtrlHelpID(IDC_BROWSE_DIFFOPTIONS,   IDH_IDC_BROWSE_DIFFOPTIONS);
00698 }

Here is the call graph for this function:

bool CDiff_MAIN::IsDefaultedRev ( const CComboBox * comboBox ) [private]

Check whether the combo box text is a defaulted one

Parameters:
comboBox Combo box to check
Returns:
true if the combo box text is a defaulted one, false otherwise
Definition at line 607 of file DiffDlg.cpp.

References STR_DIFFDEFAULT_DATE, and STR_DIFFDEFAULT_REV.

Referenced by SetDefaultInput().

00608 {
00609     bool res = false;
00610
00611     if( comboBox )
00612     {
00613         CString strRev;
00614         comboBox->GetWindowText(strRev);
00615
00616         if( (STR_DIFFDEFAULT_REV == strRev || STR_DIFFDEFAULT_DATE == strRev) &&
00617             comboBox->FindStringExact(-1, strRev) == CB_ERR )
00618         {
00619             res = true;
00620         }
00621     }
00622     else
00623     {
00624         ASSERT(FALSE);  // Bad pointer
00625     }
00626
00627     return res;
00628 }

void CDiff_MAIN::OnBrowseTag1 ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 459 of file DiffDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev1, and m_rev1Combo.

00460 {
00461     CStr tagName;
00462     if( CompatGetTagListItem(m_mf, tagName) )
00463     {
00464         m_rev1 = (const char*)tagName;
00465         m_rev1Combo.SetWindowText(m_rev1);
00466     }
00467 }

Here is the call graph for this function:

void CDiff_MAIN::OnBrowseTag2 ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 470 of file DiffDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev2, and m_rev2Combo.

00471 {
00472     CStr tagName;
00473     if( CompatGetTagListItem(m_mf, tagName) )
00474     {
00475         m_rev2 = (const char*)tagName;
00476         m_rev2Combo.SetWindowText(m_rev2);
00477     }
00478 }

Here is the call graph for this function:

void CDiff_MAIN::OnCheck1 ( ) [protected]

BN_CLICKED message handler, enable controls and set default input.

Definition at line 433 of file DiffDlg.cpp.

References DDX_ComboMString(), gDateNames, gRevNames, IDC_REV_TAG1, kDefRev1Change, m_browseTag1Button, m_compareTypeCombo, m_isDate1Check, m_rev1Combo, NULL, SetDefaultInput(), and USmartCombo::SetItems().

00434 {
00435     BOOL isDate = m_isDate1Check.GetCheck();
00436
00437     m_rev1Combo.SetItems(isDate ? &gDateNames : &gRevNames);
00438     DDX_ComboMString(NULL, IDC_REV_TAG1, m_rev1Combo);
00439
00440     m_browseTag1Button.EnableWindow(!isDate);
00441
00442     SetDefaultInput(kDefRev1Change, m_compareTypeCombo.GetCurSel());
00443 }

Here is the call graph for this function:

void CDiff_MAIN::OnCheck2 ( ) [protected]

BN_CLICKED message handler, enable controls and set default input.

Definition at line 446 of file DiffDlg.cpp.

References DDX_ComboMString(), gDateNames, gRevNames, IDC_REV_TAG2, kDefRev2Change, m_browseTag2Button, m_compareTypeCombo, m_isDate2Check, m_rev2Combo, NULL, SetDefaultInput(), and USmartCombo::SetItems().

00447 {
00448     BOOL isDate = m_isDate2Check.GetCheck();
00449
00450     m_rev2Combo.SetItems(isDate ? &gDateNames : &gRevNames);
00451     DDX_ComboMString(NULL, IDC_REV_TAG2, m_rev2Combo);
00452
00453     m_browseTag2Button.EnableWindow(!isDate);
00454
00455     SetDefaultInput(kDefRev2Change, m_compareTypeCombo.GetCurSel());
00456 }

Here is the call graph for this function:

void CDiff_MAIN::OnExtdiff ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 411 of file DiffDlg.cpp.

Referenced by DoDataExchange().

00412 {
00413     EnableCmdLineDiffOptions(!m_extDiffButton.GetCheck() || !m_extDiffButton.IsWindowEnabled());
00414 }

BOOL CDiff_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize the controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 631 of file DiffDlg.cpp.

References kCompareAnotherRev, kCompareTwoRev, kDiffGraph, m_browseTag1Button, m_browseTag2Button, m_compareTypeCombo, m_diffType, m_isDate1Check, m_isDate2Check, m_keywordCombo, m_keywordDescStatic, m_mf, m_rev1, m_rev1Combo, m_rev2, m_rev2Combo, CHHelpPropertyPage::OnInitDialog(), CKeywordComboBox::SetDescriptionWnd(), CSmartComboBox::SetReadOnly(), and MultiFiles::TotalNumFiles().

00632 {
00633     CHHelpPropertyPage::OnInitDialog();
00634
00635     // Extra initialization
00636     m_keywordCombo.SetDescriptionWnd(m_keywordDescStatic.m_hWnd);
00637
00638     // Special setup for the diff invoked using the graph view
00639     if( kDiffGraph == m_diffType )
00640     {
00641         m_compareTypeCombo.SetCurSel(m_mf->TotalNumFiles() == 1 ? kCompareAnotherRev : kCompareTwoRev);
00642         m_compareTypeCombo.EnableWindow(FALSE);
00643
00644         m_browseTag1Button.EnableWindow(FALSE);
00645         m_browseTag2Button.EnableWindow(FALSE);
00646
00647         m_isDate1Check.EnableWindow(FALSE);
00648         m_isDate2Check.EnableWindow(FALSE);
00649
00650         m_rev1Combo.SetReadOnly(TRUE);
00651         m_rev1Combo.ResetContent();
00652
00653         if( !m_rev1.IsEmpty() )
00654         {
00655             m_rev1Combo.AddString(m_rev1);
00656             m_rev1Combo.SetWindowText(m_rev1);
00657         }
00658
00659         if( m_mf && m_mf->TotalNumFiles() == 2 )
00660         {
00661             m_rev2Combo.SetReadOnly(TRUE);
00662             m_rev2Combo.ResetContent();
00663
00664             if( !m_rev2.IsEmpty() )
00665             {
00666                 m_rev2Combo.AddString(m_rev2);
00667                 m_rev2Combo.SetWindowText(m_rev2);
00668             }
00669         }
00670         else
00671         {
00672             m_rev2Combo.EnableWindow(FALSE);
00673         }
00674     }
00675
00676     return TRUE;  // return TRUE unless you set the focus to a control
00677                   // EXCEPTION: OCX Property Pages should return FALSE
00678 }

Here is the call graph for this function:

void CDiff_MAIN::OnOptionsmenu ( ) [protected]

BN_CLICKED message handler, display the diff options dialog.

Definition at line 701 of file DiffDlg.cpp.

References CDiff_Options::GetDiffOptions(), CSmartComboBox::GetWindowText(), CDiff_Options::m_currentOptions, and m_diffOptionsCombo.

00702 {
00703     CDiff_Options diffOptionsDlg;
00704
00705     CString currentOptions;
00706     m_diffOptionsCombo.GetWindowText(currentOptions);
00707     diffOptionsDlg.m_currentOptions = currentOptions;
00708
00709     if( diffOptionsDlg.DoModal() == IDOK )
00710     {
00711         CString diffOptions = diffOptionsDlg.GetDiffOptions();
00712         if( !diffOptions.IsEmpty() )
00713         {
00714             currentOptions.TrimRight();
00715             currentOptions += currentOptions.IsEmpty() ? "" : " ";
00716             m_diffOptionsCombo.SetWindowText(currentOptions + diffOptions);
00717             GotoDlgCtrl(&m_diffOptionsCombo);
00718         }
00719     }
00720 }

Here is the call graph for this function:

void CDiff_MAIN::OnSelchangeCompareType ( ) [protected]

CBN_SELCHANGE message handler, enable controls and set default input.

Definition at line 481 of file DiffDlg.cpp.

References EnableCompareType(), kDefTypeChange, m_compareTypeCombo, and SetDefaultInput().

00482 {
00483     const int compareType = m_compareTypeCombo.GetCurSel();
00484
00485     EnableCompareType(compareType);
00486     SetDefaultInput(kDefTypeChange, compareType);
00487 }

Here is the call graph for this function:

void CDiff_MAIN::SetDefaultInput | ( | const kInputChange | inputChange,
 |  | const int | compareType
 | ) | [private]

Set the default input for given compare type

Parameters:
inputChange | Input change
compareType | Compare type
Definition at line 529 of file DiffDlg.cpp.

References CSmartComboBox::GetWindowText(), IsDefaultedRev(), kCompareAnotherRev, kCompareSameRev, kCompareTwoRev, kDefRev1Change, kDefRev2Change, kDefTypeChange, m_isDate1Check, m_isDate2Check, m_rev1Combo, m_rev2Combo, STR_DIFFDEFAULT_DATE, and STR_DIFFDEFAULT_REV.

Referenced by OnCheck1(), OnCheck2(), and OnSelchangeCompareType().

00530 {
00531     CString strRev1;
00532     CString strRev2;
00533
00534     m_rev1Combo.GetWindowText(strRev1);
00535     m_rev2Combo.GetWindowText(strRev2);
00536
00537     switch( inputChange )
00538     {
00539     case kDefRev1Change:
00540         if( strRev1.IsEmpty() || IsDefaultedRev(&m_rev1Combo) )
00541         {
00542             m_rev1Combo.SetWindowText(m_isDate1Check.GetCheck() ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV);
00543         }
00544         break;
00545     case kDefRev2Change:
00546         if( strRev2.IsEmpty() || IsDefaultedRev(&m_rev2Combo) )
00547         {
00548             m_rev2Combo.SetWindowText(m_isDate2Check.GetCheck() ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV);
00549         }
00550         break;
00551     case kDefTypeChange:
00552         {
00553             // Set the input
00554             switch( compareType )
00555             {
00556             default:
00557                 ASSERT(FALSE);  //unknown compare type
00558             case kCompareSameRev:
00559                 break;
00560             case kCompareTwoRev:
00561                 if( strRev2.IsEmpty() )
00562                 {
00563                     m_rev2Combo.SetWindowText(m_isDate2Check.GetCheck() ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV);
00564                 }
00565
00566                 // Fall thru
00567
00568             case kCompareAnotherRev:
00569                 if( strRev1.IsEmpty() )
00570                 {
00571                     m_rev1Combo.SetWindowText(m_isDate1Check.GetCheck() ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV);
00572                 }
00573                 break;
00574             }
00575
00576             // Reset unneeded input
00577             if( !m_rev1Combo.IsWindowEnabled() )
00578             {
00579                 if( IsDefaultedRev(&m_rev1Combo) )
00580                 {
00581                     m_rev1Combo.SetWindowText("");
00582                 }
00583             }
00584
00585             if( !m_rev2Combo.IsWindowEnabled() )
00586             {
00587                 if( IsDefaultedRev(&m_rev2Combo) )
00588                 {
00589                     m_rev2Combo.SetWindowText("");
00590                 }
00591             }
00592         }
00593
00594         break;
00595
00596     default:
00597         ASSERT(FALSE); // unknown input change
00598         break;
00599     }
00600 }

Here is the call graph for this function:

Member Data Documentation

bool CDiff_MAIN::m_allowExtDiff [private]

Definition at line 140 of file DiffDlg.h.

Referenced by DoDataExchange().

CButton CDiff_MAIN::m_browseTag1Button

Definition at line 87 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCompareType(), OnCheck1(), and OnInitDialog().

CButton CDiff_MAIN::m_browseTag2Button

Definition at line 86 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCompareType(), OnCheck2(), and OnInitDialog().

int CDiff_MAIN::m_compareType

Definition at line 99 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CSmartComboBox CDiff_MAIN::m_compareTypeCombo

Definition at line 90 of file DiffDlg.h.

Referenced by DoDataExchange(), OnCheck1(), OnCheck2(), OnInitDialog(), and OnSelchangeCompareType().

CString CDiff_MAIN::m_diffOptions

Definition at line 104 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CSmartComboBox CDiff_MAIN::m_diffOptionsCombo

Definition at line 77 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCmdLineDiffOptions(), and OnOptionsmenu().

kDiffCmdType CDiff_MAIN::m_diffType [private]

Definition at line 141 of file DiffDlg.h.

Referenced by DoDataExchange(), and OnInitDialog().

BOOL CDiff_MAIN::m_extDiff

Definition at line 103 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CButton CDiff_MAIN::m_extDiffButton

Definition at line 80 of file DiffDlg.h.

Referenced by DoDataExchange().

BOOL CDiff_MAIN::m_ignoreCase

Definition at line 98 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CButton CDiff_MAIN::m_ignoreCaseCheck

Definition at line 79 of file DiffDlg.h.

Referenced by DoDataExchange(), and EnableCmdLineDiffOptions().

BOOL CDiff_MAIN::m_isDate1

Definition at line 93 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CButton CDiff_MAIN::m_isDate1Check

Definition at line 89 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCompareType(), OnCheck1(), OnInitDialog(), and SetDefaultInput().

BOOL CDiff_MAIN::m_isDate2

Definition at line 94 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CButton CDiff_MAIN::m_isDate2Check

Definition at line 88 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCompareType(), OnCheck2(), OnInitDialog(), and SetDefaultInput().

CString CDiff_MAIN::m_keyword

Definition at line 101 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CKeywordComboBox CDiff_MAIN::m_keywordCombo

Definition at line 85 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCmdLineDiffOptions(), and OnInitDialog().

CStatic CDiff_MAIN::m_keywordDescStatic

Definition at line 84 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCmdLineDiffOptions(), and OnInitDialog().

const MultiFiles* CDiff_MAIN::m_mf [private]

Definition at line 139 of file DiffDlg.h.

Referenced by OnBrowseTag1(), OnBrowseTag2(), and OnInitDialog().

BOOL CDiff_MAIN::m_noRecurs

Definition at line 102 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CButton CDiff_MAIN::m_noRecursCheck

Definition at line 82 of file DiffDlg.h.

Referenced by DoDataExchange(), and EnableCmdLineDiffOptions().

BOOL CDiff_MAIN::m_noWhiteSpace

Definition at line 97 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CButton CDiff_MAIN::m_noWhiteSpaceCheck

Definition at line 78 of file DiffDlg.h.

Referenced by DoDataExchange(), and EnableCmdLineDiffOptions().

CButton CDiff_MAIN::m_optionsMenuButton

Definition at line 81 of file DiffDlg.h.

Referenced by DoDataExchange(), and EnableCmdLineDiffOptions().

CString CDiff_MAIN::m_rev1

Definition at line 95 of file DiffDlg.h.

Referenced by CompatGetDiff(), DoDataExchange(), OnBrowseTag1(), and OnInitDialog().

CSmartComboBox CDiff_MAIN::m_rev1Combo

Definition at line 92 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCompareType(), OnBrowseTag1(), OnCheck1(), OnInitDialog(), and SetDefaultInput().

CString CDiff_MAIN::m_rev2

Definition at line 96 of file DiffDlg.h.

Referenced by CompatGetDiff(), DoDataExchange(), OnBrowseTag2(), and OnInitDialog().

CSmartComboBox CDiff_MAIN::m_rev2Combo

Definition at line 91 of file DiffDlg.h.

Referenced by DoDataExchange(), EnableCompareType(), OnBrowseTag2(), OnCheck2(), OnInitDialog(), and SetDefaultInput().

BOOL CDiff_MAIN::m_unifiedDiff

Definition at line 100 of file DiffDlg.h.

Referenced by CompatGetDiff(), and DoDataExchange().

CButton CDiff_MAIN::m_unifiedDiffCheck

Definition at line 83 of file DiffDlg.h.

Referenced by DoDataExchange(), and EnableCmdLineDiffOptions().

The documentation for this class was generated from the following files:
  • common/DiffDlg.h
  • common/DiffDlg.cpp
Generated on Sat Aug 7 22:51:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDiff_Options Class Reference

CDiff_Options Class Reference

#include <DiffDlg.h>

Inheritance diagram for CDiff_Options:

[legend]
Collaboration diagram for CDiff_Options:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_DIFF_OPTIONS }

Public Member Functions

CDiff_Options (CWnd *pParent=NULL)
CString | GetDiffOptions ()

Public Attributes

CListCtrl | m_optionsListCtrl
CString | m_currentOptions

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnOK ()
OnOK virtual override, sets the string containing all selected options.
afx_msg void | OnItemchangedOptionslist (NMHDR *pNMHDR, LRESULT *pResult)
LVN_ITEMCHANGED message handler, update the option's description edit box value as selection is changing.
afx_msg void | OnColumnclickOptionslist (NMHDR *pNMHDR, LRESULT *pResult)
LVN_COLUMNCLICK message handler, sort items in response to column click.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize diff options list.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()
void | SortItems (int column, bool asc)

Static Private Member Functions

int CALLBACK | CompareItems (LPARAM itemData1, LPARAM itemData2, LPARAM lParam)

Private Attributes

CString | m_diffOptions
bool m_sortAsc
int m_sortColumn
CSortHeaderCtrl m_headerCtrl

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 164 of file DiffDlg.h.
00164 { IDD = IDD_DIFF_OPTIONS };

Constructor & Destructor Documentation

CDiff_Options::CDiff_Options ( CWnd * pParent = NULL )

Definition at line 726 of file DiffDlg.cpp.

References m_currentOptions, m_sortAsc, and m_sortColumn.

00727     : CHHelpDialog(CDiff_Options::IDD, pParent)
00728 {
00729     //{{AFX_DATA_INIT(CDiff_Options)
00730     m_currentOptions = _T("");
00731     //}}AFX_DATA_INIT
00732
00733     m_sortAsc = false;
00734     m_sortColumn = 0;
00735 }

Member Function Documentation

int CALLBACK CDiff_Options::CompareItems | ( | LPARAM | itemData1,
 |  | LPARAM | itemData2,
 |  | LPARAM | lParam
 | ) | [static, private]

Callback method used for sorting of items in the list control

Parameters:
itemData1 | DiffOptionsItem* of the first element
itemData2 | DiffOptionsItem* of the second element
lParam | CompareInfo* Sort settings
Returns:
1, -1 or 0 depending on the sort settings
Definition at line 906 of file DiffDlg.cpp.

References _sDiffOptionsItem::description, DiffOptionsItem, CDiff_Options::CompareInfo::m_asc, CDiff_Options::CompareInfo::m_column, and _sDiffOptionsItem::option.

Referenced by SortItems().

00907 {
00908     int res = 0;
00909
00910     const CompareInfo* info = (CompareInfo*)lParam;
00911     if( info )
00912     {
00913         DiffOptionsItem* diffOptionsItem1 = (DiffOptionsItem*)itemData1;
00914         DiffOptionsItem* diffOptionsItem2 = (DiffOptionsItem*)itemData2;
00915
00916         switch( info->m_column )
00917         {
00918         case 0:
00919             res = stricmp(diffOptionsItem1->option, diffOptionsItem2->option);
00920             break;
00921         case 1:
00922             res = stricmp(diffOptionsItem1->description, diffOptionsItem2->description);
00923             break;
00924         default:
00925             ASSERT(FALSE); // should not come here
00926             break;
00927         }
00928     }
00929
00930     if( res )
00931     {
00932         if( info->m_asc )
00933         {
00934             res *= -1;
00935         }
00936     }
00937
00938     return res;
00939 }

void CDiff_Options::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 738 of file DiffDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_CURRENT_DIFF_OPTIONS, IDC_DIFF_OPTION_LIST, m_currentOptions, and m_optionsListCtrl.

00739 {
00740     CHHelpDialog::DoDataExchange(pDX);
00741     //{{AFX_DATA_MAP(CDiff_Options)
00742     DDX_Control(pDX, IDC_DIFF_OPTION_LIST, m_optionsListCtrl);
00743     DDX_Text(pDX, IDC_CURRENT_DIFF_OPTIONS, m_currentOptions);
00744     //}}AFX_DATA_MAP
00745 }

Here is the call graph for this function:

CString CDiff_Options::GetDiffOptions ( )

Get the diff options

Returns:
The diff options as CString
Definition at line 763 of file DiffDlg.cpp.

Referenced by CDiff_MAIN::OnOptionsmenu().

00764 {
00765     return m_diffOptions;
00766 }

void CDiff_Options::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 868 of file DiffDlg.cpp.

References IDC_CURRENT_DIFF_OPTIONS, IDC_DIFF_OPTION_DESCRIPTION, IDC_DIFF_OPTION_LIST, IDH_IDC_CURRENT_DIFF_OPTIONS, IDH_IDC_DIFF_OPTION_DESCRIPTION, IDH_IDC_DIFF_OPTION_LIST, and CHHelpSupport::SetCtrlHelpID().

00869 {
00870     SetCtrlHelpID(IDC_DIFF_OPTION_LIST,         IDH_IDC_DIFF_OPTION_LIST);
00871     SetCtrlHelpID(IDC_DIFF_OPTION_DESCRIPTION,  IDH_IDC_DIFF_OPTION_DESCRIPTION);
00872     SetCtrlHelpID(IDC_CURRENT_DIFF_OPTIONS,     IDH_IDC_CURRENT_DIFF_OPTIONS);
00873 }

Here is the call graph for this function:

void CDiff_Options::OnColumnclickOptionslist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_COLUMNCLICK message handler, sort items in response to column click.

Definition at line 804 of file DiffDlg.cpp.

References m_sortAsc, m_sortColumn, and SortItems().

00805 {
00806     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00807
00808     if( m_sortColumn != pNMListView->iSubItem )
00809     {
00810         m_sortAsc = false;
00811     }
00812     else
00813     {
00814         m_sortAsc = !m_sortAsc;
00815     }
00816
00817     m_sortColumn = pNMListView->iSubItem;
00818
00819     SortItems(m_sortColumn, m_sortAsc);
00820
00821     *pResult = 0;
00822 }

Here is the call graph for this function:

void CDiff_Options::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 876 of file DiffDlg.cpp.

References CHHelpSupport::ShowHelp().

00877 {
00878     ShowHelp();
00879 }

Here is the call graph for this function:

BOOL CDiff_Options::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize diff options list.

Reimplemented from CHHelpDialog.

Definition at line 825 of file DiffDlg.cpp.

References DiffOptionsItem, m_headerCtrl, m_optionsListCtrl, CHHelpDialog::OnInitDialog(), _sDiffOptionsItem::option, sDiffOptions, and SetListCtrlExtendedStyle().

00826 {
00827     CHHelpDialog::OnInitDialog();
00828
00829     // Extra initialization
00830
00831     // Set the control's style
00832     SetListCtrlExtendedStyle(&m_optionsListCtrl, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES | LVS_EX_LABELTIP);
00833
00834     // Setup controls
00835     CHeaderCtrl* headerCtrl = m_optionsListCtrl.GetHeaderCtrl();
00836     if( headerCtrl )
00837     {
00838         m_headerCtrl.SubclassWindow(headerCtrl->m_hWnd);
00839     }
00840
00841     // Get the client area width to properly size columns
00842     CRect rect;
00843     m_optionsListCtrl.GetClientRect(rect);
00844
00845     const int listCtrlWidth = rect.Width();
00846     const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
00847
00848     // Insert columns
00849     m_optionsListCtrl.InsertColumn(0, "Option", LVCFMT_LEFT, 65);
00850     m_optionsListCtrl.InsertColumn(1, "Description", LVCFMT_LEFT, listCtrlWidthNoScroll - 65);
00851
00852     // Insert options
00853     const int itemsCount = (sizeof(sDiffOptions) / sizeof(DiffOptionsItem));
00854     for(int nIndex = 0; nIndex < itemsCount; nIndex++)
00855     {
00856         const int item = m_optionsListCtrl.InsertItem(m_optionsListCtrl.GetItemCount(), sDiffOptions[nIndex].option);
00857         if( item > -1 )
00858         {
00859             m_optionsListCtrl.SetItemText(item, 1, sDiffOptions[nIndex].description);
00860             m_optionsListCtrl.SetItemData(item, (DWORD)&sDiffOptions[nIndex]);
00861         }
00862     }
00863
00864     return TRUE;  // return TRUE unless you set the focus to a control
00865                   // EXCEPTION: OCX Property Pages should return FALSE
00866 }

Here is the call graph for this function:

void CDiff_Options::OnItemchangedOptionslist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_ITEMCHANGED message handler, update the option's description edit box value as selection is changing.

Definition at line 786 of file DiffDlg.cpp.

References IDC_DIFF_OPTION_DESCRIPTION, m_optionsListCtrl, and STR_DIFFOPT_OPTIONDESCRIPTION_FORMAT.

00787 {
00788     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00789     if( pNMListView->iItem > -1 &&
00790         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
00791     {
00792         CString item;
00793         item.Format(STR_DIFFOPT_OPTIONDESCRIPTION_FORMAT,
00794             m_optionsListCtrl.GetItemText(pNMListView->iItem, 0),
00795             m_optionsListCtrl.GetItemText(pNMListView->iItem, 1));
00796
00797         SetDlgItemText(IDC_DIFF_OPTION_DESCRIPTION, item);
00798     }
00799
00800     *pResult = 0;
00801 }

void CDiff_Options::OnOK ( ) [protected, virtual]

OnOK virtual override, sets the string containing all selected options.

Definition at line 769 of file DiffDlg.cpp.

References m_diffOptions, and m_optionsListCtrl.

00770 {
00771     for(int nIndex = 0; nIndex < m_optionsListCtrl.GetItemCount(); nIndex++)
00772     {
00773         if( m_optionsListCtrl.GetCheck(nIndex) )
00774         {
00775             m_diffOptions += m_optionsListCtrl.GetItemText(nIndex, 0);
00776             m_diffOptions += " ";
00777         }
00778     }
00779
00780     m_diffOptions.TrimRight();
00781
00782     CHHelpDialog::OnOK();
00783 }

void CDiff_Options::SortItems | ( | int | column,
 |  | bool | asc
 | ) | [private]

Sort items listed in the list control

Parameters:
column | Column to sort items by
asc | Sort ascending or descending
Note:
Using list control callback CompareItems
Definition at line 887 of file DiffDlg.cpp.

References CompareItems(), CDiff_Options::CompareInfo::m_asc, CDiff_Options::CompareInfo::m_column, m_headerCtrl, m_optionsListCtrl, and CSortHeaderCtrl::SetSortImage().

Referenced by OnColumnclickOptionslist().

00888 {
00889     m_headerCtrl.SetSortImage(column, asc);
00890
00891     CompareInfo info = { 0 };
00892
00893     info.m_column = column;
00894     info.m_asc = asc;
00895
00896     m_optionsListCtrl.SortItems(CompareItems, (DWORD)&info);
00897 }

Here is the call graph for this function:

Member Data Documentation

CString CDiff_Options::m_currentOptions

Definition at line 166 of file DiffDlg.h.

Referenced by CDiff_Options(), DoDataExchange(), and CDiff_MAIN::OnOptionsmenu().

CString CDiff_Options::m_diffOptions [private]

Diff options Definition at line 191 of file DiffDlg.h.

Referenced by OnOK().

CSortHeaderCtrl CDiff_Options::m_headerCtrl [private]

Definition at line 203 of file DiffDlg.h.

Referenced by OnInitDialog(), and SortItems().

CListCtrl CDiff_Options::m_optionsListCtrl

Definition at line 165 of file DiffDlg.h.

Referenced by DoDataExchange(), OnInitDialog(), OnItemchangedOptionslist(), OnOK(), and SortItems().

bool CDiff_Options::m_sortAsc [private]

Current ascending/descending sorting Definition at line 201 of file DiffDlg.h.

Referenced by CDiff_Options(), and OnColumnclickOptionslist().

int CDiff_Options::m_sortColumn [private]

Current sort column Definition at line 202 of file DiffDlg.h.

Referenced by CDiff_Options(), and OnColumnclickOptionslist().

The documentation for this class was generated from the following files:
  • common/DiffDlg.h
  • common/DiffDlg.cpp
Generated on Sat Aug 7 22:51:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDiff_Options::CompareInfo Struct Reference

CDiff_Options::CompareInfo Struct Reference

Structure to hold the sorting settings. More...

Collaboration diagram for CDiff_Options::CompareInfo:

[legend]
List of all members.

Public Attributes

int m_column
bool m_asc

Detailed Description

Structure to hold the sorting settings.

Definition at line 195 of file DiffDlg.h.

Member Data Documentation

bool CDiff_Options::CompareInfo::m_asc

Sort ascending or descending Definition at line 198 of file DiffDlg.h.

Referenced by CDiff_Options::CompareItems(), and CDiff_Options::SortItems().

int CDiff_Options::CompareInfo::m_column

Sorting column Definition at line 197 of file DiffDlg.h.

Referenced by CDiff_Options::CompareItems(), and CDiff_Options::SortItems().

The documentation for this struct was generated from the following file:
  • common/DiffDlg.h
Generated on Sat Aug 7 22:51:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: direct Struct Reference

direct Struct Reference

#include <ndir.h>

Collaboration diagram for direct:

[legend]
List of all members.

Public Attributes

ino_t | d_ino
int d_reclen
int d_namlen
char | d_name [255+1]

Member Data Documentation

ino_t direct::d_ino

Definition at line 41 of file ndir.h.

Referenced by readdir().

char direct::d_name[255+1]

Definition at line 44 of file ndir.h.

Referenced by readdir().

int direct::d_namlen

Definition at line 43 of file ndir.h.

Referenced by readdir().

int direct::d_reclen

Definition at line 42 of file ndir.h.

Referenced by readdir().

The documentation for this struct was generated from the following file:
  • WinCvs/ndir.h
Generated on Sat Aug 7 22:51:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDockBar Class Reference

CDockBar Class Reference

Inheritance diagram for CDockBar:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJSizeDockBar.h
Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDockContext Class Reference

CDockContext Class Reference

Inheritance diagram for CDockContext:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJDockContext.h
Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Wincvs::Document Class Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Wincvs::Document Class Reference

The documentation for this class was generated from the following file:
  • WinCvs/wincvs.odl
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDocument Class Reference

CDocument Class Reference

Inheritance diagram for CDocument:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/GraphDoc.h
Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: DROPDOWNBUTTON Struct Reference

DROPDOWNBUTTON Struct Reference

#include <CJToolBar.h>

Collaboration diagram for DROPDOWNBUTTON:

[legend]
List of all members.

Public Attributes

DROPDOWNBUTTON * next
UINT | idButton
UINT | idMenu

Member Data Documentation

UINT DROPDOWNBUTTON::idButton

Definition at line 89 of file CJToolBar.h.

Referenced by CCJToolBar::AddDropDownButton(), and CCJToolBar::FindDropDownButton().

UINT DROPDOWNBUTTON::idMenu

Definition at line 90 of file CJToolBar.h.

Referenced by CCJToolBar::AddDropDownButton(), and CCJToolBar::OnDropDownButton().

DROPDOWNBUTTON* DROPDOWNBUTTON::next

Definition at line 88 of file CJToolBar.h.

Referenced by CCJToolBar::AddDropDownButton(), CCJToolBar::FindDropDownButton(), and CCJToolBar::~CCJToolBar().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/CJToolBar.h
Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDummyClass Class Reference

CDummyClass Class Reference

List of all members.

Public Member Functions

CDummyClass ()
CDummyClass ()

Constructor & Destructor Documentation

CDummyClass::CDummyClass ( ) [inline]

Definition at line 864 of file UPseudoSupport.cpp.

00865     {
00866         InitUSlider();
00867         if (!gUGridViewInitialized)
00868         {
00869             InitUGridView();
00870         }
00871         MA_REGISTER_CLASS(TPseudoAppBehavior);
00872         MA_REGISTER_CLASS(TPseudoIconButton);
00873         MA_REGISTER_CLASS(TPseudoIconPopup);
00874         MA_REGISTER_CLASS(TPseudoScrollBar);
00875         MA_REGISTER_CLASS(TPseudoRotateIconButton);
00876         MA_REGISTER_CLASS(TPseudoIconCheckBox);
00877         MA_REGISTER_CLASS(TBuggyPopup);
00878         MA_REGISTER_CLASS(TPseudoWinBehavior);
00879         MA_REGISTER_CLASS(TPseudoCustomView);
00880         MA_REGISTER_CLASS(TPseudoWinAdorner);
00881         MA_REGISTER_SIGNATURE(TPseudoTextListView,
00882                 TPseudoTextListView::kTextStringListViewSignature);
00883         MA_REGISTER_CLASS(TPseudoDoubleNumberText);
00884     }

CDummyClass::CDummyClass ( ) [inline]

Definition at line 1020 of file UPseudoSupport.cpp.

01021     {
01022         RegisterClass_(UPseudoRotButton);
01023         RegisterClass_(UPseudoPlaceHolder);
01024         RegisterClass_(UPseudoPageHider);
01025     }

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.cpp
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: DYN_LIST Struct Reference

DYN_LIST Struct Reference

Collaboration diagram for DYN_LIST:

[legend]
List of all members.

Public Attributes

int numentries
int defaultnumcells
int sizeofcell
int totpage
void * first
DYN_LIST * next
DYN_LIST * current

Member Data Documentation

struct DYN_LIST* DYN_LIST::current

Definition at line 284 of file dll_garbage.c.

Referenced by listAddCell(), and listNew().

int DYN_LIST::defaultnumcells

Definition at line 278 of file dll_garbage.c.

Referenced by listAddCell(), and listNew().

void* DYN_LIST::first

Definition at line 282 of file dll_garbage.c.

struct DYN_LIST* DYN_LIST::next

Definition at line 283 of file dll_garbage.c.

Referenced by listAddCell(), listFree(), and listNew().

int DYN_LIST::numentries

Definition at line 277 of file dll_garbage.c.

Referenced by listAddCell(), and listNew().

int DYN_LIST::sizeofcell

Definition at line 279 of file dll_garbage.c.

Referenced by listAddCell(), and listNew().

int DYN_LIST::totpage

Definition at line 280 of file dll_garbage.c.

Referenced by listAddCell(), and listNew().

The documentation for this struct was generated from the following file:
  • common/dll_garbage.c
Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CDynToolBar Class Reference

CDynToolBar Class Reference

#include <utoolbar.h>

Inheritance diagram for CDynToolBar:

[legend]
Collaboration diagram for CDynToolBar:

[legend]
List of all members.

Public Member Functions

CDynToolBar ()
virtual | ~CDynToolBar ()
int | GetPseudoID (void) const
void | SetPseudoID (int id)
WININFO * | GetWinInfo (void) const
void | SetWinInfo (WININFO *info)
CFrameWnd * GetMainFrame ()

Public Attributes

HBITMAP | m_bitmap
bool m_tracking

Protected Member Functions

virtual void | OnDropDownButton (const NMTOOLBAR &nmtb, UINT nID, CRect rc)
afx_msg void | OnDestroy (void)

Protected Attributes

WININFO * m_info
int m_widid

Constructor & Destructor Documentation

CDynToolBar::CDynToolBar ( )

Definition at line 376 of file utoolbar.cpp.

00376                          : m_info(0L), m_bitmap(0L),
00377     m_tracking(false), m_widid(0)
00378 {
00379 }

CDynToolBar::~CDynToolBar ( ) [virtual]

Definition at line 381 of file utoolbar.cpp.

00382 {
00383     //if(m_bitmap != 0L)
00384         //::DeleteObject(m_bitmap);
00385 }

Member Function Documentation

CFrameWnd* CDynToolBar::GetMainFrame ( ) [inline]

Definition at line 62 of file utoolbar.h.

Referenced by UToolbar::OnTbInit().

00062 { return GetRoutingFrame(); }

int CDynToolBar::GetPseudoID ( void ) const [inline]

Definition at line 58 of file utoolbar.h.

References m_widid.

Referenced by OnDestroy().

00058 { return m_widid; }

WININFO* CDynToolBar::GetWinInfo ( void ) const [inline]

Definition at line 60 of file utoolbar.h.

References m_info.

00060 { return m_info; }

void CDynToolBar::OnDestroy ( void ) [protected]

Reimplemented from CCJToolBar.

Definition at line 387 of file utoolbar.cpp.

References EV_DESTROY, GetPseudoID(), NULL, CCJToolBar::OnDestroy(), and UEventSendMessage().

00388 {
00389     UEventSendMessage(GetPseudoID(), EV_DESTROY, 0, NULL);
00390
00391     CCJToolBar::OnDestroy();
00392 }

Here is the call graph for this function:

void CDynToolBar::OnDropDownButton | ( | const NMTOOLBAR & | nmtb,
 |  | UINT | nID,
 |  | CRect | rc
 | ) | [protected, virtual]

Reimplemented from CCJToolBar.

Definition at line 394 of file utoolbar.cpp.

References WININFO::entries, WININFO::height, TbEntryDropDown::icons, TbEntry::kind, m_info, m_tracking, WININFO::Search(), tbeDropDown, UCMD_to_WINCMD, WININFO::width, and WINCMD_to_UCMD.

00395 {
00396     std::vector<TbEntry *>::iterator f = m_info->Search(WINCMD_to_UCMD(nID));
00397     if(f == m_info->entries.end())
00398     {
00399         TRACE("Unknown id");
00400         return;
00401     }
00402
00403     TbEntryDropDown *entry = (TbEntryDropDown *)(*f);
00404     if(entry->kind != tbeDropDown)
00405     {
00406         TRACE("Unknown kind");
00407         return;
00408     }
00409
00410     CColorMenu menu(m_info->width, m_info->height);
00411     std::vector<awidget>::iterator i;
00412     for(i = entry->icons.begin(); i != entry->icons.end(); ++i)
00413     {
00414         menu.AppendColorMenuItem(UCMD_to_WINCMD((*i).cmd), &i[0]);
00415     }
00416
00417     m_tracking = true;
00418     menu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,
00419         rc.left, rc.bottom, GetOwner(), &rc);
00420     m_tracking = false;
00421 }

Here is the call graph for this function:

void CDynToolBar::SetPseudoID ( int id ) [inline]

Definition at line 59 of file utoolbar.h.

References m_widid.

Referenced by UToolbar::OnTbInit().

00059 { m_widid = id; }

void CDynToolBar::SetWinInfo ( WININFO * info ) [inline]

Definition at line 61 of file utoolbar.h.

References m_info.

Referenced by UToolbar::OnTbInit().

00061 { m_info = info; }

Member Data Documentation

HBITMAP CDynToolBar::m_bitmap

Definition at line 55 of file utoolbar.h.

Referenced by UToolbar::RebuildBar().

WININFO* CDynToolBar::m_info [protected]

Definition at line 66 of file utoolbar.h.

Referenced by GetWinInfo(), OnDropDownButton(), and SetWinInfo().

bool CDynToolBar::m_tracking

Definition at line 56 of file utoolbar.h.

Referenced by OnDropDownButton().

int CDynToolBar::m_widid [protected]

Definition at line 67 of file utoolbar.h.

Referenced by GetPseudoID(), and SetPseudoID().

The documentation for this class was generated from the following files:
  • rf/utoolbar.h
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:52:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CEdit Class Reference

CEdit Class Reference

Inheritance diagram for CEdit:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJMaskEdit.h
Generated on Sat Aug 7 22:52:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CEditKeywordDlg Class Reference

CEditKeywordDlg Class Reference

#include <CvsRootDlg.h>

Inheritance diagram for CEditKeywordDlg:

[legend]
Collaboration diagram for CEditKeywordDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_EDITKEYWORD }

Public Member Functions

CEditKeywordDlg (const char *description, const char *keyword, const char *value, CWnd *pParent=NULL)

Public Attributes

CSmartComboBox m_valueCombo
CString | m_description
CString | m_keyword
CString | m_value

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 284 of file CvsRootDlg.h.
00284 { IDD = IDD_EDITKEYWORD };

Constructor & Destructor Documentation

CEditKeywordDlg::CEditKeywordDlg | ( | const char * | description,
 |  | const char * | keyword,
 |  | const char * | value,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 613 of file CvsRootDlg.cpp.

References gPrevCvsRootKeywords, m_description, m_keyword, m_value, m_valueCombo, USmartCombo::SetItems(), and USmartCombo::SetKeyword().

00615 : CHHelpDialog(CEditKeywordDlg::IDD, pParent)
00616 {
00617     //{{AFX_DATA_INIT(CEditKeywordDlg)
00618     m_description = description;
00619     m_keyword = keyword;
00620     m_value = value;
00621     //}}AFX_DATA_INIT
00622
00623     m_valueCombo.SetItems(&gPrevCvsRootKeywords);
00624     m_valueCombo.SetKeyword(m_keyword);
00625 }

Here is the call graph for this function:

Member Function Documentation

void CEditKeywordDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 628 of file CvsRootDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpDialog::DoDataExchange(), IDC_KEYWORD_DESCRIPTION, IDC_KEYWORD_VALUE, IDC_PROTOCOL_KEYWORD, m_description, m_keyword, m_value, and m_valueCombo.

00629 {
00630     CHHelpDialog::DoDataExchange(pDX);
00631     //{{AFX_DATA_MAP(CEditKeywordDlg)
00632     DDX_Control(pDX, IDC_KEYWORD_VALUE, m_valueCombo);
00633     DDX_Text(pDX, IDC_KEYWORD_DESCRIPTION, m_description);
00634     DDX_Text(pDX, IDC_PROTOCOL_KEYWORD, m_keyword);
00635     DDX_CBString(pDX, IDC_KEYWORD_VALUE, m_value);
00636     //}}AFX_DATA_MAP
00637
00638     DDV_MinChars(pDX, m_value, 1);
00639     DDX_ComboMString(pDX, IDC_KEYWORD_VALUE, m_valueCombo);
00640 }

Here is the call graph for this function:

void CEditKeywordDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 652 of file CvsRootDlg.cpp.

References IDC_KEYWORD_DESCRIPTION, IDC_KEYWORD_VALUE, IDC_PROTOCOL_KEYWORD, IDH_IDC_KEYWORD_DESCRIPTION, IDH_IDC_KEYWORD_VALUE, and IDH_IDC_PROTOCOL_KEYWORD.

00653 {
00654     SetCtrlHelpID(IDC_PROTOCOL_KEYWORD,     IDH_IDC_PROTOCOL_KEYWORD);
00655     SetCtrlHelpID(IDC_KEYWORD_DESCRIPTION,  IDH_IDC_KEYWORD_DESCRIPTION);
00656     SetCtrlHelpID(IDC_KEYWORD_VALUE,        IDH_IDC_KEYWORD_VALUE);
00657 }

void CEditKeywordDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 660 of file CvsRootDlg.cpp.

References CHHelpSupport::ShowHelp().

00661 {
00662     ShowHelp();
00663 }

Here is the call graph for this function:

Member Data Documentation

CString CEditKeywordDlg::m_description

Definition at line 286 of file CvsRootDlg.h.

Referenced by CEditKeywordDlg(), and DoDataExchange().

CString CEditKeywordDlg::m_keyword

Definition at line 287 of file CvsRootDlg.h.

Referenced by CEditKeywordDlg(), and DoDataExchange().

CString CEditKeywordDlg::m_value

Definition at line 288 of file CvsRootDlg.h.

Referenced by CEditKeywordDlg(), and DoDataExchange().

CSmartComboBox CEditKeywordDlg::m_valueCombo

Definition at line 285 of file CvsRootDlg.h.

Referenced by CEditKeywordDlg(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/CvsRootDlg.h
  • common/CvsRootDlg.cpp
Generated on Sat Aug 7 22:52:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UEditMessage Class Reference

UEditMessage Class Reference

Inheritance diagram for UEditMessage:

[legend]
Collaboration diagram for UEditMessage:

[legend]
List of all members.

Public Types

enum {
kOK = EV_COMMAND_START,
kCancel,
kMsg,
kEdit
}

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UEditMessage (const char *msg, const char *edit, const char *title, const char *def, const char *cncl)
virtual | ~UEditMessage ()
virtual void | DoDataExchange (bool fill)
while modaling, allows to fill/read the dialog content.

Static Public Member Functions

const URuntimeClass * | rtUEditMessage (void)

Public Attributes

UStr m_edit

Protected Member Functions

virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Static Protected Attributes

const URuntimeClass | classUEditMessage
const UMSGMAP | messageMap = { UPromptMessage ::GetThisMessageMap(), & UEditMessage ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Member Enumeration Documentation

anonymous enum

Enumeration values:
kOK
kCancel
kMsg
kEdit
Definition at line 124 of file AskYesNo.cpp.
00125     {
00126         kOK = EV_COMMAND_START, // 0
00127         kCancel,                // 1
00128         kMsg,                   // 2
00129         kEdit                   // 3
00130     };

Constructor & Destructor Documentation

UEditMessage::UEditMessage | ( | const char * | msg,
 |  | const char * | edit,
 |  | const char * | title,
 |  | const char * | def,
 |  | const char * | cncl
 | ) | [inline]

Definition at line 117 of file AskYesNo.cpp.

References m_edit.

00118                           : UPromptMessage(msg, title, def, cncl), m_edit(edit)
00119     {
00120     }

virtual UEditMessage::~UEditMessage ( ) [inline, virtual]

Definition at line 122 of file AskYesNo.cpp.

00122 {}

Member Function Documentation

const URuntimeClass * UEditMessage::_GetBaseClass ( ) [static, protected]

Reimplemented from UPromptMessage.

Definition at line 153 of file AskYesNo.cpp.

00159 {

virtual void UEditMessage::DoDataExchange ( bool fill ) [inline, virtual]

while modaling, allows to fill/read the dialog content.

  • fill says if it expects to fill or read the dialog content.

Reimplemented from UPromptMessage.

Definition at line 132 of file AskYesNo.cpp.

References UStr::c_str(), UPromptMessage::DoDataExchange(), EV_GETTEXT, EV_SETTEXT, UCmdTarget::GetWidID(), kEdit, m_edit, and UEventSendMessage().

00133     {
00134         UPromptMessage::DoDataExchange(fill);
00135
00136         if(fill)
00137         {
00138             UEventSendMessage(GetWidID(), EV_SETTEXT, kEdit, (void *)m_edit.c_str());
00139         }
00140         else
00141         {
00142             UEventSendMessage(GetWidID(), EV_GETTEXT, kEdit, &m_edit);
00143         }
00144     }

Here is the call graph for this function:

const UMSGMAP * UEditMessage::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UPromptMessage.

Definition at line 155 of file AskYesNo.cpp.

00159 {

const UMSGMAP * UEditMessage::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UPromptMessage.

Definition at line 155 of file AskYesNo.cpp.

00159 {

const URuntimeClass * UEditMessage::GetRuntimeClass ( ) const [virtual]

Reimplemented from UPromptMessage.

Definition at line 153 of file AskYesNo.cpp.

00159 {

const UMSGMAP * UEditMessage::GetThisMessageMap ( ) [static, protected]

Reimplemented from UPromptMessage.

Definition at line 155 of file AskYesNo.cpp.

00159 {

const URuntimeClass * UEditMessage::rtUEditMessage ( void ) [static]

Definition at line 153 of file AskYesNo.cpp.

00159 {

Member Data Documentation

const UMSGMAP_ENTRY UEditMessage::_messageEntries [static, private]

Initial value:

   {
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UPromptMessage.

Definition at line 155 of file AskYesNo.cpp.

const URuntimeClass UEditMessage::classUEditMessage [static, protected]

UStr UEditMessage::m_edit

Definition at line 146 of file AskYesNo.cpp.

Referenced by DoDataExchange(), and UEditMessage().

const UMSGMAP UEditMessage::messageMap = { UPromptMessage ::GetThisMessageMap(), & UEditMessage ::_messageEntries[0] } [static, protected]

Reimplemented from UPromptMessage.

Definition at line 155 of file AskYesNo.cpp.

The documentation for this class was generated from the following file:
  • common/AskYesNo.cpp
Generated on Sat Aug 7 22:52:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CEditorMonDlg Class Reference

CEditorMonDlg Class Reference

#include <EditorMonDlg.h>

Inheritance diagram for CEditorMonDlg:

[legend]
Collaboration diagram for CEditorMonDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_EDITORMON }

Public Member Functions

CEditorMonDlg (CWnd *pParent=NULL)

Public Attributes

CString | m_tempFile
HANDLE | m_hProcess

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDestroy ()
WM_DESTROY message handler, kill the monitoring timer.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, start monitoring timer.
afx_msg void | OnTimer (UINT nIDEvent)
WM_TIMER message handler, check whether the process was terminated.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

UINT | m_timer

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 53 of file EditorMonDlg.h.
00053 { IDD = IDD_EDITORMON };

Constructor & Destructor Documentation

CEditorMonDlg::CEditorMonDlg ( CWnd * pParent = NULL )

Definition at line 48 of file EditorMonDlg.cpp.

References m_tempFile.

00049     : CHHelpDialog(CEditorMonDlg::IDD, pParent)
00050 {
00051     //{{AFX_DATA_INIT(CEditorMonDlg)
00052     m_tempFile = _T("");
00053     //}}AFX_DATA_INIT
00054 }

Member Function Documentation

void CEditorMonDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 57 of file EditorMonDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_TEMPFILE, and m_tempFile.

00058 {
00059     CHHelpDialog::DoDataExchange(pDX);
00060     //{{AFX_DATA_MAP(CEditorMonDlg)
00061     DDX_Text(pDX, IDC_TEMPFILE, m_tempFile);
00062     //}}AFX_DATA_MAP
00063 }

Here is the call graph for this function:

void CEditorMonDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 100 of file EditorMonDlg.cpp.

References IDC_TEMPFILE, IDH_IDC_TEMPFILE, and CHHelpSupport::SetCtrlHelpID().

00101 {
00102     SetCtrlHelpID(IDC_TEMPFILE, IDH_IDC_TEMPFILE);
00103 }

Here is the call graph for this function:

void CEditorMonDlg::OnDestroy ( ) [protected]

WM_DESTROY message handler, kill the monitoring timer.

Definition at line 78 of file EditorMonDlg.cpp.

00079 {
00080     if( m_timer )
00081     {
00082         KillTimer(m_timer);
00083     }
00084
00085     CHHelpDialog::OnDestroy();
00086 }

void CEditorMonDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 106 of file EditorMonDlg.cpp.

References CHHelpSupport::ShowHelp().

00107 {
00108     ShowHelp();
00109 }

Here is the call graph for this function:

BOOL CEditorMonDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, start monitoring timer.

Reimplemented from CHHelpDialog.

Definition at line 89 of file EditorMonDlg.cpp.

References m_timer, NULL, and CHHelpDialog::OnInitDialog().

00090 {
00091     CHHelpDialog::OnInitDialog();
00092
00093     // Extra initialization
00094     m_timer = SetTimer(2048, 200, NULL);
00095
00096     return TRUE;  // return TRUE unless you set the focus to a control
00097                   // EXCEPTION: OCX Property Pages should return FALSE
00098 }

Here is the call graph for this function:

void CEditorMonDlg::OnTimer ( UINT nIDEvent ) [protected]

WM_TIMER message handler, check whether the process was terminated.

Definition at line 112 of file EditorMonDlg.cpp.

References m_hProcess, and m_timer.

00113 {
00114     if( nIDEvent == m_timer && INVALID_HANDLE_VALUE != m_hProcess )
00115     {
00116         const DWORD status = WaitForSingleObject(m_hProcess, 0);
00117         if( status == WAIT_OBJECT_0 )
00118         {
00119             EndDialog(IDOK);
00120         }
00121     }
00122
00123     CHHelpDialog::OnTimer(nIDEvent);
00124 }

Member Data Documentation

HANDLE CEditorMonDlg::m_hProcess

Definition at line 85 of file EditorMonDlg.h.

Referenced by CompatGetEditorMsg(), and OnTimer().

CString CEditorMonDlg::m_tempFile

Definition at line 54 of file EditorMonDlg.h.

Referenced by CEditorMonDlg(), CompatGetEditorMsg(), and DoDataExchange().

UINT CEditorMonDlg::m_timer [private]

Definition at line 78 of file EditorMonDlg.h.

Referenced by OnInitDialog(), and OnTimer().

The documentation for this class was generated from the following files:
  • common/EditorMonDlg.h
  • common/EditorMonDlg.cpp
Generated on Sat Aug 7 22:52:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ENTNODE Class Reference

ENTNODE Class Reference

Allow reference of a file or a folder node. More...

#include <CvsEntries.h>

Collaboration diagram for ENTNODE:

[legend]
List of all members.

Public Member Functions

ENTNODE ()
ENTNODE (EntnodeData *data)
ENTNODE (EntnodeData &data)
ENTNODE (const ENTNODE &anode)
virtual | ~ENTNODE ()
ENTNODE & | operator= (const ENTNODE &anode)
Operator =.
EntnodeData * | Data () const
Access data.
operator EntnodeData * () const
Operator EntnodeData*.

Static Public Member Functions

int | Compare (const ENTNODE &node1, const ENTNODE &node2)

Protected Attributes

EntnodeData * shareData

Detailed Description

Allow reference of a file or a folder node.

Definition at line 264 of file CvsEntries.h.

Constructor & Destructor Documentation

ENTNODE::ENTNODE ( ) [inline]

Definition at line 520 of file CvsEntries.h.

References NULL.

00520                         : shareData(NULL)
00521 {
00522 }

ENTNODE::ENTNODE ( EntnodeData * data ) [inline]

Definition at line 524 of file CvsEntries.h.

00524                                          : shareData(data->Ref())
00525 {
00526 }

ENTNODE::ENTNODE ( EntnodeData & data ) [inline]

Definition at line 528 of file CvsEntries.h.

00528                                          : shareData(data.Ref())
00529 {
00530 }

ENTNODE::ENTNODE ( const ENTNODE & anode ) [inline]

Definition at line 532 of file CvsEntries.h.

References NULL.

00532                                             : shareData(NULL)
00533 {
00534     *this = anode;
00535 }

ENTNODE::~ENTNODE ( ) [inline, virtual]

Definition at line 537 of file CvsEntries.h.

References NULL, shareData, and EntnodeData::UnRef().

00538 {
00539     if( shareData != NULL )
00540         shareData->UnRef();
00541 }

Here is the call graph for this function:

Member Function Documentation

int ENTNODE::Compare | ( | const ENTNODE & | node1,
 |  | const ENTNODE & | node2
 | ) | [inline, static]

Compare two ENTNODE items

Parameters:
node1 | First item
node2 | Second item
Returns:
Less than zero if node1 is less than node2, zero if nodes are equal, more than zero if node2 is less than node1
Definition at line 549 of file CvsEntries.h.

References EntnodeData::Compare(), and shareData.

00550 {
00551     return EntnodeData::Compare(*node1.shareData, *node2.shareData);
00552 }

Here is the call graph for this function:

EntnodeData * ENTNODE::Data ( ) const [inline]

Access data.

Definition at line 555 of file CvsEntries.h.

References shareData.

Referenced by cvsgui_GetCvsEntries(), Entries_SetMissing(), Entries_SetVisited(), TViewFill::ExitDirectory(), CTCLBrowserEnt::GetData(), CTCLBrowserEnt::GetNormalized(), CTCLBrowserEnt::IsSamePath(), CWinCvsBrowser::OnItemexpanding(), and tclCvsEntriesProc().

00556 {
00557     return shareData;
00558 }

ENTNODE::operator EntnodeData * ( ) const [inline]

Operator EntnodeData*.

Definition at line 561 of file CvsEntries.h.

References shareData.

00562 {
00563     return shareData;
00564 }

ENTNODE & ENTNODE::operator= ( const ENTNODE & anode )

Operator =.

Definition at line 482 of file CvsEntries.cpp.

References NULL, EntnodeData::Ref(), shareData, and EntnodeData::UnRef().

00483 {
00484     EntnodeData* oldData = shareData;
00485     shareData = anode.shareData;
00486
00487     if( shareData != NULL )
00488     {
00489         shareData->Ref();
00490     }
00491
00492     if( oldData != NULL )
00493     {
00494         oldData->UnRef();
00495     }
00496
00497     return *this;
00498 }

Here is the call graph for this function:

Member Data Documentation

EntnodeData* ENTNODE::shareData [protected]

Data Definition at line 282 of file CvsEntries.h.

Referenced by Compare(), Data(), operator EntnodeData *(), operator=(), and ~ENTNODE().

The documentation for this class was generated from the following files:
  • common/CvsEntries.h
  • common/CvsEntries.cpp
Generated on Sat Aug 7 22:52:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: EntnodeData Class Reference

EntnodeData Class Reference

#include <CvsEntries.h>

Inheritance diagram for EntnodeData:

[legend]
Collaboration diagram for EntnodeData:

[legend]
List of all members.

Public Types

enum {
kName = ColumnIndex::kName,
kState = ColumnIndex::kState,
kPath = ColumnIndex::kPath
}
Enum node types. More...

Public Member Functions

virtual ent_type | GetType () const =0
Get the entry type.
EntnodeData * Ref ()
Increase reference count.
EntnodeData * UnRef ()
Decrease reference count, delete self if reference count reached zero.
virtual const char * | operator[] (const int index) const
Operator [].
void | SetMissing (bool state)
Set the missing flag.
bool | IsMissing () const
Get the missing flag.
void | SetVisited (bool state)
Set the visited flag.
bool | IsVisited () const
Get the visited flag.
void | SetUnknown (bool state)
Set the unknown flag.
bool | IsUnknown () const
Get the unknown flag.
void | SetIgnored (bool state)
Set the ignored flag.
bool | IsIgnored () const
Get the ignored flag.
void | SetLocked (bool state)
Set the locked flag.
bool | IsLocked () const
Get the locked flag.
void | SetRemoved (bool state)
Set the removed flag.
bool | IsRemoved () const
Get the removed flag.
void | SetState (const char *state)
Set the description.
const char * | GetState () const
Get the description.
const char * | GetName () const
Get the item name.
const char * | GetFullPathName (UStr &resPath) const
Get the fully qualified item name.
const char * | GetFolderPath () const
Get the fully qualified folder name of the item.
virtual const char * | GetExtension () const
Get the extension.
virtual const char * | GetConflict () const
Get the conflict marker.
void | SetUnmodified (bool state)
Set the unmodified flag.
bool | IsUnmodified () const
Get the unmodified flag.
void | SetResolved (bool state)
Set the resolved flag.
bool | IsResolved () const
Get the resolved flag.

Static Public Member Functions

int | Compare (const EntnodeData &node1, const EntnodeData &node2)

Protected Member Functions

EntnodeData (const char *name, EntnodePath *path)
virtual | ~EntnodeData ()

Protected Attributes

int m_ref
int | m_missing: 1
int | m_visited: 1
int | m_unknown: 1
int | m_unmodified: 1
int | m_ignored: 1
int | m_locked: 1
int | m_removed: 1
int | m_resolved: 1

Private Attributes

const char * | m_name
const char * | m_state
EntnodePath * m_fullpath

Static Private Attributes

UStr m_sbuffer

Detailed Description

Abstract class to hold the node data
Note:
Reference-counted, we don't use delete on it

Definition at line 105 of file CvsEntries.h.

Member Enumeration Documentation

anonymous enum

Enum node types.

Enumeration values:
kName
kState
kPath
Definition at line 114 of file CvsEntries.h.
00115     {
00116         kName = ColumnIndex::kName,
00117         kState = ColumnIndex::kState,
00118         kPath = ColumnIndex::kPath
00119     };

Constructor & Destructor Documentation

EntnodeData::EntnodeData | ( | const char * | name,
 |  | EntnodePath * | path
 | ) | [protected]

Definition at line 292 of file CvsEntries.cpp.

References CloneStr(), m_fullpath, m_name, NULL, and EntnodePath::Ref().

00293     : m_ref(1), m_missing(false), m_visited(false), m_unknown(false),
00294       m_unmodified(true), m_ignored(false), m_locked(false), m_removed(false), m_resolved(false),
00295       m_name(NULL), m_state(NULL), m_fullpath(NULL)
00296 {
00297 #if TARGET_RT_MAC_MACHO
00298     memset(&macspec, 0, sizeof(macspec));
00299 #endif
00300
00301     m_name = CloneStr(name);
00302     m_fullpath = path->Ref();
00303 }

Here is the call graph for this function:

EntnodeData::~EntnodeData ( ) [protected, virtual]

Definition at line 305 of file CvsEntries.cpp.

References DisposeStr(), m_fullpath, m_name, and EntnodePath::UnRef().

00306 {
00307     DisposeStr(m_name);
00308
00309     if( m_fullpath )
00310         m_fullpath->UnRef();
00311 }

Here is the call graph for this function:

Member Function Documentation

int EntnodeData::Compare | ( | const EntnodeData & | node1,
 |  | const EntnodeData & | node2
 | ) | [inline, static]

Compare two nodes data

Parameters:
node1 | First node
node2 | Second node
Returns:
Less than zero if node1 is less than node2, zero if nodes are equal, more than zero if node2 is less than node1
Note:
For windows comparison is not case sensitive
Definition at line 353 of file CvsEntries.h.

References gCvsPrefs, m_name, and CvsPrefs::MatchEntriesCase().

Referenced by ENTNODE::Compare().

00354 {
00355     return gCvsPrefs.MatchEntriesCase() ? strcmp(node1.m_name, node2.m_name) : stricmp(node1.m_name, node2.m_name);
00356 }

Here is the call graph for this function:

const char * EntnodeData::GetConflict ( ) const [inline, virtual]

Get the conflict marker.

Reimplemented in EntnodeFile.

Definition at line 468 of file CvsEntries.h.

References NULL.

Referenced by KoConflictColumn::Compare(), CBrowseFileView::GetImageForEntry(), KoConflictColumn::GetText(), KoFilterModel::IsMatch(), and KoFilterMask::IsMatch().

00469 {
00470     return NULL;
00471 }

const char * EntnodeData::GetExtension ( ) const [inline, virtual]

Get the extension.

Reimplemented in EntnodeFile.

Definition at line 474 of file CvsEntries.h.

References NULL.

Referenced by KoExtColumn::Compare(), KoExtColumn::GetText(), and KoFilterMask::IsMatch().

00475 {
00476     return NULL;
00477 }

const char * EntnodeData::GetFolderPath ( ) const [inline]

Get the fully qualified folder name of the item.

Definition at line 462 of file CvsEntries.h.

References EntnodePath::GetFolderPath(), and m_fullpath.

Referenced by EntnodeFile::GetRelativePath(), CBrowseFileView::OnUpdateViewAdd(), and CBrowseFileView::OnUpdateViewAddB().

00463 {
00464     return m_fullpath->GetFolderPath();
00465 }

Here is the call graph for this function:

const char * EntnodeData::GetFullPathName ( UStr & resPath ) const [inline]

Get the fully qualified item name.

Definition at line 456 of file CvsEntries.h.

References EntnodePath::GetFullPathName(), m_fullpath, and m_name.

Referenced by CBrowseFileView::DoDrag(), UCvsFiles::EditSel(), PyCvsEntry::GetAttr(), CTCLBrowserEnt::GetNormalized(), CTCLBrowserEnt::IsSamePath(), UCvsFiles::OnCmdExplore(), CBrowseFileView::OnKeydown(), CBrowseFileView::OnLButtonDblClk(), CBrowseFileView::OnQueryProperties(), CBrowseFileView::OnViewExplore(), CBrowseFileView::OnViewNewInstance(), operator[](), CBrowseFileView::ProcessSelectionCommand(), UCvsFiles::ProcessSelectionCommand(), CBrowseFileView::ResetView(), and UCvsFiles::ResetView().

00457 {
00458     return m_fullpath->GetFullPathName(resPath, m_name);
00459 }

Here is the call graph for this function:

const char * EntnodeData::GetName ( ) const [inline]

Get the item name.

Definition at line 450 of file CvsEntries.h.

References m_name.

Referenced by KoExtColumn::Compare(), KoNameColumn::Compare(), PyCvsEntry::GetAttr(), KoNameColumn::GetText(), and KoFilterMask::IsMatch().

00451 {
00452     return m_name;
00453 }

const char * EntnodeData::GetState ( ) const [inline]

Get the description.

Definition at line 438 of file CvsEntries.h.

References m_state.

Referenced by PyCvsEntry::GetAttr().

00439 {
00440     return m_state;
00441 }

virtual ent_type EntnodeData::GetType ( ) const [pure virtual]

Get the entry type.

Implemented in EntnodeFile, and EntnodeFolder.

Referenced by _Compare(), CBrowseFileView::DoDrag(), UCvsFiles::EditSel(), TViewFill::ExitDirectory(), PyCvsEntry::GetAttr(), CBrowseFileView::GetImageForEntry(), UCvsFiles::GetImageForEntry(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIEditseldef(), UCvsFiles::OnCmdUIGraph(), UCvsFiles::OnCmdUIRelease(), UCvsFiles::OnCmdUIRmv(), UCvsFiles::OnCmdUITrash(), UCvsFiles::OnCmdUIUpdate(), CBrowseFileView::OnEditSelectAll(), CWinCvsBrowser::OnItemexpanding(), CBrowseFileView::OnKeydown(), CBrowseFileView::OnLButtonDblClk(), UCvsFolders::OnTreeExpanding(), CBrowseFileView::OnUpdateViewAdd(), CBrowseFileView::OnUpdateViewAddB(), CBrowseFileView::OnUpdateViewAnnotate(), CBrowseFileView::OnUpdateViewEditseldef(), CBrowseFileView::OnUpdateViewGraph(), CBrowseFileView::OnUpdateViewRelease(), CBrowseFileView::OnUpdateViewRmv(), CBrowseFileView::OnUpdateViewUpdate(), CBrowseFileView::OnViewExplore(), CBrowseFileView::ProcessSelectionCommand(), UCvsFiles::ProcessSelectionCommand(), CBrowseFileView::ResetView(), and tclCvsBrowserProc().

bool EntnodeData::IsIgnored ( ) const [inline]

Get the ignored flag.

Definition at line 401 of file CvsEntries.h.

References m_ignored.

Referenced by Entries_SetVisited(), PyCvsEntry::GetAttr(), GetIcon(), CBrowseFileView::GetImageForEntry(), UCvsFiles::GetImageForEntry(), TBrowserFill::OnDirectory(), TViewFill::OnDirectory(), TViewFill::OnFile(), and CHistComboBoxEx::SetIcon().

00402 {
00403     return m_ignored != 0L;
00404 }

bool EntnodeData::IsLocked ( ) const [inline]

Get the locked flag.

Definition at line 413 of file CvsEntries.h.

References m_locked.

Referenced by PyCvsEntry::GetAttr(), and TViewFill::InitItem().

00414 {
00415     return m_locked != 0L;
00416 }

bool EntnodeData::IsMissing ( ) const [inline]

Get the missing flag.

Definition at line 365 of file CvsEntries.h.

References m_missing.

Referenced by TViewFill::ExitDirectory(), PyCvsEntry::GetAttr(), GetIcon(), UCvsFiles::GetImageForEntry(), KoFilterModel::IsMatch(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIEditseldef(), UCvsFiles::OnCmdUIExplore(), UCvsFiles::OnCmdUITrash(), TViewFill::OnDirectory(), CWinCvsBrowser::OnItemexpanding(), CBrowseFileView::OnQueryProperties(), CWinCvsBrowser::OnSelchanging(), UCvsFolders::OnTreeExpanding(), UCvsFolders::OnTreeSelecting(), CBrowseFileView::OnUpdateQueryProperties(), CBrowseFileView::OnUpdateViewAdd(), CBrowseFileView::OnUpdateViewAddB(), CBrowseFileView::OnUpdateViewEditseldef(), CBrowseFileView::OnUpdateViewExplore(), CBrowseFileView::OnViewExplore(), CBrowseFileView::OnViewNewInstance(), UCvsFiles::ResetView(), and CHistComboBoxEx::SetIcon().

00366 {
00367     return m_missing != 0L;
00368 }

bool EntnodeData::IsRemoved ( ) const [inline]

Get the removed flag.

Definition at line 425 of file CvsEntries.h.

References m_removed.

Referenced by Entries_SetMissing(), PyCvsEntry::GetAttr(), CBrowseFileView::GetImageForEntry(), UCvsFiles::GetImageForEntry(), KoFilterModel::IsMatch(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIRmv(), CBrowseFileView::OnUpdateViewAdd(), CBrowseFileView::OnUpdateViewAddB(), and CBrowseFileView::OnUpdateViewRmv().

00426 {
00427     return m_removed != 0L;
00428 }

bool EntnodeData::IsResolved ( ) const [inline]

Get the resolved flag.

Definition at line 498 of file CvsEntries.h.

References m_resolved.

00499 {
00500     return m_resolved != 0;
00501 }

bool EntnodeData::IsUnknown ( ) const [inline]

Get the unknown flag.

Definition at line 389 of file CvsEntries.h.

References m_unknown.

Referenced by Entries_SetVisited(), PyCvsEntry::GetAttr(), GetIcon(), CBrowseFileView::GetImageForEntry(), UCvsFiles::GetImageForEntry(), IsCvsDirectory(), KoFilterModel::IsMatch(), UCvsFiles::OnCmdUIAdd(), UCvsFiles::OnCmdUIAddB(), UCvsFiles::OnCmdUIGraph(), UCvsFiles::OnCmdUIRelease(), UCvsFiles::OnCmdUIRmv(), UCvsFiles::OnCmdUIUpdate(), TViewFill::OnDirectory(), CBrowseFileView::OnUpdateViewAdd(), CBrowseFileView::OnUpdateViewAddB(), CBrowseFileView::OnUpdateViewAnnotate(), CBrowseFileView::OnUpdateViewGraph(), CBrowseFileView::OnUpdateViewRelease(), CBrowseFileView::OnUpdateViewRmv(), CBrowseFileView::OnUpdateViewUpdate(), and CHistComboBoxEx::SetIcon().

00390 {
00391     return m_unknown != 0L;
00392 }

bool EntnodeData::IsUnmodified ( ) const [inline]

Get the unmodified flag.

Definition at line 486 of file CvsEntries.h.

References m_unmodified.

Referenced by PyCvsEntry::GetAttr(), and KoFilterModel::IsMatch().

00487 {
00488     return m_unmodified != 0L;
00489 }

bool EntnodeData::IsVisited ( ) const [inline]

Get the visited flag.

Definition at line 377 of file CvsEntries.h.

References m_visited.

Referenced by Entries_SetMissing().

00378 {
00379     return m_visited != 0L;
00380 }

const char * EntnodeData::operator[] ( const int index ) const [virtual]

Operator [].

Reimplemented in EntnodeFile, and EntnodeFolder.

Definition at line 314 of file CvsEntries.cpp.

References GetFullPathName(), kName, kPath, kState, m_name, m_sbuffer, m_state, and NULL.

Referenced by EntnodeFolder::operator[](), and EntnodeFile::operator[]().

00315 {
00316     switch( index )
00317     {
00318     case kName:
00319         return m_name;
00320     case kState:
00321         return m_state;
00322     case kPath:
00323         return GetFullPathName(m_sbuffer);
00324     default:
00325         break;
00326     }
00327
00328     return NULL;
00329 }

Here is the call graph for this function:

EntnodeData * EntnodeData::Ref ( ) [inline]

Increase reference count.

Definition at line 328 of file CvsEntries.h.

References m_ref.

Referenced by TBrowserFillDummy::ExitDirectory(), TViewFill::InitItem(), CWinCvsBrowser::OnItemexpanding(), UCvsFolders::OnTreeExpanding(), ENTNODE::operator=(), CHistComboBoxEx::SetIcon(), and CGraphDoc::SetNode().

00329 {
00330     ++m_ref;
00331     return this;
00332 }

void EntnodeData::SetIgnored ( bool state ) [inline]

Set the ignored flag.

Definition at line 395 of file CvsEntries.h.

References m_ignored.

Referenced by Entries_SetVisited().

00396 {
00397     m_ignored = state;
00398 }

void EntnodeData::SetLocked ( bool state ) [inline]

Set the locked flag.

Definition at line 407 of file CvsEntries.h.

References m_locked.

00408 {
00409     m_locked = state;
00410 }

void EntnodeData::SetMissing ( bool state ) [inline]

Set the missing flag.

Definition at line 359 of file CvsEntries.h.

References m_missing.

Referenced by Entries_SetMissing().

00360 {
00361     m_missing = state;
00362 }

void EntnodeData::SetRemoved ( bool state ) [inline]

Set the removed flag.

Definition at line 419 of file CvsEntries.h.

References m_removed.

Referenced by EntnodeFile::EntnodeFile().

00420 {
00421     m_removed = state;
00422 }

void EntnodeData::SetResolved ( bool state ) [inline]

Set the resolved flag.

Definition at line 492 of file CvsEntries.h.

References m_resolved.

00493 {
00494     m_resolved = state;
00495 }

void EntnodeData::SetState ( const char * state ) [inline]

Set the description.

Definition at line 432 of file CvsEntries.h.

References m_state.

Referenced by Entries_SetMissing(), and Entries_SetVisited().

00433 {
00434     m_state = state;
00435 }

void EntnodeData::SetUnknown ( bool state ) [inline]

Set the unknown flag.

Definition at line 383 of file CvsEntries.h.

References m_unknown.

Referenced by Entries_SetVisited().

00384 {
00385     m_unknown = state;
00386 }

void EntnodeData::SetUnmodified ( bool state ) [inline]

Set the unmodified flag.

Definition at line 480 of file CvsEntries.h.

References m_unmodified.

00481 {
00482     m_unmodified = state;
00483 }

void EntnodeData::SetVisited ( bool state ) [inline]

Set the visited flag.

Definition at line 371 of file CvsEntries.h.

References m_visited.

Referenced by Entries_SetVisited().

00372 {
00373     m_visited = state;
00374 }

EntnodeData * EntnodeData::UnRef ( ) [inline]

Decrease reference count, delete self if reference count reached zero.

Definition at line 335 of file CvsEntries.h.

References m_ref, and NULL.

Referenced by CGraphDoc::Clear(), CWinCvsBrowser::DeleteAllItems(), UCvsFolders::DeleteAllItems(), Entries_Open(), Entries_SetVisited(), TBrowserFillDummy::ExitDirectory(), UCvsFolders::OnCmdMacrosSel(), CBrowseFileView::OnDeleteitem(), CWinCvsBrowser::OnUpdateMacro(), ENTNODE::operator=(), CHistComboBoxEx::SetIcon(), ENTNODE::~ENTNODE(), and UCvsGraph::~UCvsGraph().

00336 {
00337     if( --m_ref == 0 )
00338     {
00339         delete this;
00340         return NULL;
00341     }
00342
00343     return this;
00344 }

Member Data Documentation

EntnodePath* EntnodeData::m_fullpath [private]

Fully qualified path of the folder containing the item Definition at line 187 of file CvsEntries.h.

Referenced by EntnodeData(), GetFolderPath(), GetFullPathName(), and ~EntnodeData().

int EntnodeData::m_ignored [protected]

Ignored flag Definition at line 174 of file CvsEntries.h.

Referenced by IsIgnored(), and SetIgnored().

int EntnodeData::m_locked [protected]

Locked flag Definition at line 175 of file CvsEntries.h.

Referenced by IsLocked(), and SetLocked().

int EntnodeData::m_missing [protected]

Missing flag Definition at line 170 of file CvsEntries.h.

Referenced by IsMissing(), and SetMissing().

const char* EntnodeData::m_name [private]

Name of this item Definition at line 185 of file CvsEntries.h.

Referenced by Compare(), EntnodeData(), GetFullPathName(), GetName(), operator[](), and ~EntnodeData().

int EntnodeData::m_ref [protected]

Reference counter Definition at line 168 of file CvsEntries.h.

Referenced by Ref(), and UnRef().

int EntnodeData::m_removed [protected]

Removed flag Definition at line 176 of file CvsEntries.h.

Referenced by IsRemoved(), and SetRemoved().

int EntnodeData::m_resolved [protected]

Conflict resolved flag Definition at line 177 of file CvsEntries.h.

Referenced by IsResolved(), and SetResolved().

UStr EntnodeData::m_sbuffer [static, private]

Static buffer Definition at line 290 of file CvsEntries.cpp.

Referenced by operator[]().

const char* EntnodeData::m_state [private]

Item's state Definition at line 186 of file CvsEntries.h.

Referenced by GetState(), operator[](), and SetState().

int EntnodeData::m_unknown [protected]

Unknown flag Definition at line 172 of file CvsEntries.h.

Referenced by IsUnknown(), and SetUnknown().

int EntnodeData::m_unmodified [protected]

Unmodified flag Definition at line 173 of file CvsEntries.h.

Referenced by IsUnmodified(), and SetUnmodified().

int EntnodeData::m_visited [protected]

Visited flag Definition at line 171 of file CvsEntries.h.

Referenced by IsVisited(), and SetVisited().

The documentation for this class was generated from the following files:
  • common/CvsEntries.h
  • common/CvsEntries.cpp
Generated on Sat Aug 7 22:52:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: EntnodeFile Class Reference

EntnodeFile Class Reference

#include <CvsEntries.h>

Inheritance diagram for EntnodeFile:

[legend]
Collaboration diagram for EntnodeFile:

[legend]
List of all members.

Public Types

enum {
kExt = ColumnIndex::kExtention,
kVN = ColumnIndex::kRevision,
kTS = ColumnIndex::kTimeStamp,
kOption = ColumnIndex::kOption,
kEncoding = ColumnIndex::kEncoding,
kTag = ColumnIndex::kStickyTag,
kConflict = ColumnIndex::kConflict
}
Enum file node types. More...

Public Member Functions

EntnodeFile (const char *name, EntnodePath *path, const char *vn=NULL, const char *ts=NULL, const char *option=NULL, const char *tag=NULL, const char *date=NULL, const char *conflict=NULL)
virtual const char * | operator[] (const int index) const
Operator [] to access fields.
virtual ent_type | GetType () const
Get the type.
virtual const char * | GetExtension () const
Get the extension.
virtual const char * | GetConflict () const
Get the conflict marker.
virtual const char * | GetRelativePath (const KoColumnContext *context, const bool forceCreate=false) const
void | SetEncoding (const char *encoding)
Set the encoding.

Protected Member Functions

virtual | ~EntnodeFile ()

Protected Attributes

const char * | m_ext
const char * | m_vn
const char * | m_ts
const char * | m_option
const char * | m_encoding
const char * | m_tag
const char * | m_date
const char * | m_conflict
const char * | m_relativePath

Detailed Description

Abstract class to hold the file node data
Note:
Reference-counted, we don't use delete on it

Definition at line 196 of file CvsEntries.h.

Member Enumeration Documentation

anonymous enum

Enum file node types.

Enumeration values:
kExt
kVN
kTS
kOption
kEncoding
kTag
kConflict
Definition at line 209 of file CvsEntries.h.
00210     {
00211         kExt = ColumnIndex::kExtention,
00212         kVN = ColumnIndex::kRevision,
00213         kTS = ColumnIndex::kTimeStamp,
00214         kOption = ColumnIndex::kOption,
00215         kEncoding = ColumnIndex::kEncoding,
00216         kTag = ColumnIndex::kStickyTag,
00217         kConflict = ColumnIndex::kConflict
00218     };

Constructor & Destructor Documentation

EntnodeFile::EntnodeFile | ( | const char * | name,
 |  | EntnodePath * | path,
 |  | const char * | vn = NULL,
 |  | const char * | ts = NULL,
 |  | const char * | option = NULL,
 |  | const char * | tag = NULL,
 |  | const char * | date = NULL,
 |  | const char * | conflict = NULL
 | ) |

Definition at line 334 of file CvsEntries.cpp.

References CloneStr(), FindExtension(), m_conflict, m_date, m_encoding, m_ext, m_option, m_relativePath, m_tag, m_ts, m_vn, NULL, and EntnodeData::SetRemoved().

00337                                      : EntnodeData(name, path)
00338 {
00339     m_ext = CloneStr(FindExtension(name));
00340     m_vn = CloneStr(vn);
00341     m_ts = CloneStr(ts);
00342     m_option = CloneStr(option);
00343     m_tag = CloneStr(tag);
00344     m_date = CloneStr(date);
00345     m_conflict = CloneStr(conflict);
00346
00347     m_relativePath = NULL;
00348     m_encoding = NULL;
00349
00350     if( vn != NULL && vn[0] == '-' )
00351         SetRemoved(true);
00352 }

Here is the call graph for this function:

EntnodeFile::~EntnodeFile ( ) [protected, virtual]

Definition at line 354 of file CvsEntries.cpp.

References DisposeStr(), m_conflict, m_date, m_ext, m_option, m_relativePath, m_tag, m_ts, and m_vn.

00355 {
00356     DisposeStr(m_ext);
00357     DisposeStr(m_vn);
00358     DisposeStr(m_ts);
00359     DisposeStr(m_option);
00360     DisposeStr(m_tag);
00361     DisposeStr(m_date);
00362     DisposeStr(m_conflict);
00363
00364     DisposeStr(m_relativePath);
00365 }

Here is the call graph for this function:

Member Function Documentation

const char * EntnodeFile::GetConflict ( ) const [virtual]

Get the conflict marker.

Reimplemented from EntnodeData.

Definition at line 406 of file CvsEntries.cpp.

References m_conflict.

00407 {
00408     return m_conflict;
00409 }

const char * EntnodeFile::GetExtension ( ) const [virtual]

Get the extension.

Reimplemented from EntnodeData.

Definition at line 400 of file CvsEntries.cpp.

References m_ext.

00401 {
00402     return m_ext;
00403 }

const char * EntnodeFile::GetRelativePath | ( | const KoColumnContext * | context,
 |  | const bool | forceCreate = false
 | ) | const [virtual]

Get the relative path

Parameters:
context | Column context
forceCreate | true to force creation, false to reuse any previously extracted value
Returns:
The path extracted from full pathname
Definition at line 417 of file CvsEntries.cpp.

References CloneStr(), DisposeStr(), free, EntnodeData::GetFolderPath(), KoColumnContext::GetPath(), UStr::length(), m_relativePath, NULL, and strdup().

Referenced by KoPathColumn::GetText(), and KoFilterMask::IsMatch().

00418 {
00419     if( !m_relativePath || forceCreate )
00420     {
00421         char* folderPath = strdup(GetFolderPath());
00422         if( folderPath )
00423         {
00424             DisposeStr(m_relativePath);
00425             m_relativePath = NULL;
00426
00427             char* dupMem = folderPath;
00428
00429             folderPath += context->GetPath().length();
00430
00431             if( '\\' == *folderPath )
00432             {
00433                 folderPath++;
00434             }
00435
00436             const int lenPath = strlen(folderPath);
00437             if( !lenPath )
00438             {
00439                 m_relativePath = CloneStr(".");
00440             }
00441             else
00442             {
00443                 m_relativePath = CloneStr(folderPath);
00444             }
00445
00446             free(dupMem);
00447         }
00448     }
00449
00450     return m_relativePath;
00451 }

Here is the call graph for this function:

ent_type EntnodeFile::GetType ( ) const [virtual]

Get the type.

Implements EntnodeData.

Definition at line 394 of file CvsEntries.cpp.

References ENT_FILE, and ent_type.

00395 {
00396     return ENT_FILE;
00397 }

const char * EntnodeFile::operator[] ( const int index ) const [virtual]

Operator [] to access fields.

Reimplemented from EntnodeData.

Definition at line 368 of file CvsEntries.cpp.

References kConflict, kEncoding, kExt, kOption, kTag, kTS, kVN, m_conflict, m_date, m_encoding, m_ext, m_option, m_tag, m_ts, m_vn, NULL, and EntnodeData::operator[]().

00369 {
00370     switch( index )
00371     {
00372     case kExt:
00373         return m_ext;
00374     case kVN:
00375         return m_vn;
00376     case kTS:
00377         return m_ts;
00378     case kOption:
00379         return m_option;
00380     case kEncoding:
00381         return m_encoding;
00382     case kTag:
00383         return m_tag != NULL ? m_tag : m_date;
00384     case kConflict:
00385         return m_conflict;
00386     default:
00387         break;
00388     }
00389
00390     return EntnodeData::operator[](index);
00391 }

Here is the call graph for this function:

void EntnodeFile::SetEncoding ( const char * encoding ) [inline]

Set the encoding.

Definition at line 444 of file CvsEntries.h.

References m_encoding.

00445 {
00446     m_encoding = encoding;
00447 }

Member Data Documentation

const char* EntnodeFile::m_conflict [protected]

Conflict, can be NULL Definition at line 239 of file CvsEntries.h.

Referenced by EntnodeFile(), GetConflict(), operator[](), and ~EntnodeFile().

const char* EntnodeFile::m_date [protected]

Date, can be NULL Definition at line 238 of file CvsEntries.h.

Referenced by EntnodeFile(), operator[](), and ~EntnodeFile().

const char* EntnodeFile::m_encoding [protected]

Encoding Definition at line 236 of file CvsEntries.h.

Referenced by EntnodeFile(), operator[](), and SetEncoding().

const char* EntnodeFile::m_ext [protected]

Extension Definition at line 232 of file CvsEntries.h.

Referenced by EntnodeFile(), GetExtension(), operator[](), and ~EntnodeFile().

const char* EntnodeFile::m_option [protected]

Option Definition at line 235 of file CvsEntries.h.

Referenced by EntnodeFile(), operator[](), and ~EntnodeFile().

const char* EntnodeFile::m_relativePath [mutable, protected]

Path relative to the column context path Definition at line 240 of file CvsEntries.h.

Referenced by EntnodeFile(), GetRelativePath(), and ~EntnodeFile().

const char* EntnodeFile::m_tag [protected]

Tag, can be NULL Definition at line 237 of file CvsEntries.h.

Referenced by EntnodeFile(), operator[](), and ~EntnodeFile().

const char* EntnodeFile::m_ts [protected]

Timestamp Definition at line 234 of file CvsEntries.h.

Referenced by EntnodeFile(), operator[](), and ~EntnodeFile().

const char* EntnodeFile::m_vn [protected]

Revision Definition at line 233 of file CvsEntries.h.

Referenced by EntnodeFile(), operator[](), and ~EntnodeFile().

The documentation for this class was generated from the following files:
  • common/CvsEntries.h
  • common/CvsEntries.cpp
Generated on Sat Aug 7 22:52:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: EntnodeFolder Class Reference

EntnodeFolder Class Reference

#include <CvsEntries.h>

Inheritance diagram for EntnodeFolder:

[legend]
Collaboration diagram for EntnodeFolder:

[legend]
List of all members.

Public Member Functions

EntnodeFolder (const char *name, EntnodePath *path, const char *vn=NULL, const char *ts=NULL, const char *option=NULL, const char *tag=NULL, const char *date=NULL, const char *conflict=NULL)
virtual const char * | operator[] (const int index) const
Operator [] to access fields.
virtual ent_type | GetType () const
Get the type.

Protected Member Functions

virtual | ~EntnodeFolder ()

Detailed Description

Abstract class to hold the folder node data
Note:
Reference-counted, we don't use delete on it

Definition at line 247 of file CvsEntries.h.

Constructor & Destructor Documentation

EntnodeFolder::EntnodeFolder | ( | const char * | name,
 |  | EntnodePath * | path,
 |  | const char * | vn = NULL,
 |  | const char * | ts = NULL,
 |  | const char * | option = NULL,
 |  | const char * | tag = NULL,
 |  | const char * | date = NULL,
 |  | const char * | conflict = NULL
 | ) |

Definition at line 456 of file CvsEntries.cpp.

00458                                                                   : EntnodeData(name, path)
00459 {
00460 }

EntnodeFolder::~EntnodeFolder ( ) [protected, virtual]

Definition at line 462 of file CvsEntries.cpp.

00463 {
00464 }

Member Function Documentation

ent_type EntnodeFolder::GetType ( ) const [virtual]

Get the type.

Implements EntnodeData.

Definition at line 473 of file CvsEntries.cpp.

References ENT_SUBDIR, and ent_type.

00474 {
00475     return ENT_SUBDIR;
00476 }

const char * EntnodeFolder::operator[] ( const int index ) const [virtual]

Operator [] to access fields.

Reimplemented from EntnodeData.

Definition at line 467 of file CvsEntries.cpp.

References EntnodeData::operator[]().

00468 {
00469     return EntnodeData::operator[](index);
00470 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/CvsEntries.h
  • common/CvsEntries.cpp
Generated on Sat Aug 7 22:52:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: EntnodePath Class Reference

EntnodePath Class Reference

#include <CvsEntries.h>

Collaboration diagram for EntnodePath:

[legend]
List of all members.

Public Member Functions

EntnodePath (const char *path)
EntnodePath * Ref ()
Increase reference count.
EntnodePath * UnRef ()
Decrease reference count, delete self if reference count reached zero.
const char * | GetFullPathName (UStr &resPath, const char *name) const
const char * | GetFolderPath () const

Protected Member Functions

virtual | ~EntnodePath ()

Protected Attributes

const char * | m_fullpath
int m_ref

Detailed Description

Class to support reference counted full path description
Note:
Reference-counted, we don't use delete on it

Definition at line 80 of file CvsEntries.h.

Constructor & Destructor Documentation

EntnodePath::EntnodePath ( const char * path )

Definition at line 259 of file CvsEntries.cpp.

References CloneStr(), m_fullpath, and NULL.

00260     : m_fullpath(NULL), m_ref(1)
00261 {
00262     m_fullpath = CloneStr(path);
00263 }

Here is the call graph for this function:

EntnodePath::~EntnodePath ( ) [protected, virtual]

Definition at line 265 of file CvsEntries.cpp.

References DisposeStr(), and m_fullpath.

00266 {
00267     DisposeStr(m_fullpath);
00268 }

Here is the call graph for this function:

Member Function Documentation

const char * EntnodePath::GetFolderPath ( ) const [inline]

Get the folder path

Returns:
Folder path
Definition at line 319 of file CvsEntries.h.

References m_fullpath.

Referenced by EntnodeData::GetFolderPath().

00320 {
00321     return m_fullpath;
00322 }

const char * EntnodePath::GetFullPathName | ( | UStr & | resPath,
 |  | const char * | name
 | ) | const

Get the full path for a given name

Parameters:
resPath | Return full path
name | File name
Returns:
Full path
Definition at line 276 of file CvsEntries.cpp.

References UStr::endsWith(), and m_fullpath.

Referenced by EntnodeData::GetFullPathName().

00277 {
00278     resPath = m_fullpath;
00279     if( !resPath.endsWith(kPathDelimiter) )
00280         resPath << kPathDelimiter;
00281
00282     resPath << name;
00283
00284     return resPath;
00285 }

Here is the call graph for this function:

EntnodePath * EntnodePath::Ref ( ) [inline]

Increase reference count.

Definition at line 297 of file CvsEntries.h.

References m_ref.

Referenced by EntnodeData::EntnodeData().

00298 {
00299     ++m_ref;
00300     return this;
00301 }

EntnodePath * EntnodePath::UnRef ( ) [inline]

Decrease reference count, delete self if reference count reached zero.

Definition at line 304 of file CvsEntries.h.

References m_ref, and NULL.

Referenced by Entries_SetVisited(), GetNextEntriesLine(), UCvsFolders::OnCmdMacrosSel(), CWinCvsBrowser::OnUpdateMacro(), and EntnodeData::~EntnodeData().

00305 {
00306     if( --m_ref == 0 )
00307     {
00308         delete this;
00309         return NULL;
00310     }
00311
00312     return this;
00313 }

Member Data Documentation

const char* EntnodePath::m_fullpath [protected]

Fully qualified path of the folder containing the item Definition at line 97 of file CvsEntries.h.

Referenced by EntnodePath(), GetFolderPath(), GetFullPathName(), and ~EntnodePath().

int EntnodePath::m_ref [protected]

Reference count Definition at line 98 of file CvsEntries.h.

Referenced by Ref(), and UnRef().

The documentation for this class was generated from the following files:
  • common/CvsEntries.h
  • common/CvsEntries.cpp
Generated on Sat Aug 7 22:52:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CExploreBar Class Reference

CExploreBar Class Reference

#include <ExploreBar.h>

Inheritance diagram for CExploreBar:

[legend]
Collaboration diagram for CExploreBar:

[legend]
List of all members.

Public Member Functions

virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)

Public Attributes

CMyShellTree m_TreeCtrl

Protected Member Functions

CExploreBar ()
virtual void | OnDraw (CDC *pDC)
virtual | ~CExploreBar ()
void | OnUpdateCmd (CCmdUI *pCmdUI)
bool DisableCommon ()
afx_msg void | OnWindowPosChanged (WINDOWPOS FAR *lpwndpos)
afx_msg void | OnViewCheckout ()
afx_msg void | OnUpdateViewCheckout (CCmdUI *pCmdUI)
afx_msg void | OnViewImport ()
afx_msg void | OnUpdateViewImport (CCmdUI *pCmdUI)

Constructor & Destructor Documentation

CExploreBar::CExploreBar ( ) [protected]

Definition at line 127 of file ExploreBar.cpp.

00128 {
00129 }

CExploreBar::~CExploreBar ( ) [protected, virtual]

Definition at line 131 of file ExploreBar.cpp.

00132 {
00133 }

Member Function Documentation

BOOL CExploreBar::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL
 | ) | [virtual]

Definition at line 172 of file ExploreBar.cpp.

References IDC_BAR_TREE, and m_TreeCtrl.

00173 {
00174     BOOL res = CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
00175
00176     if(res)
00177     {
00178         if (!m_TreeCtrl.Create(
00179             WS_VISIBLE|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS,
00180             CRect(0,0,0,0), this, IDC_BAR_TREE))
00181         {
00182             TRACE0("Unable to create caption button.\n");
00183             return FALSE;
00184         }
00185     }
00186
00187     //m_TreeCtrl.EnableImages();
00188     //m_TreeCtrl.PopulateTree();
00189
00190     //SetChild(&m_TreeCtrl);
00191
00192     return res;
00193 }

bool CExploreBar::DisableCommon ( ) [protected]

Definition at line 222 of file ExploreBar.cpp.

References CWincvsApp::IsCvsRunning().

Referenced by OnUpdateCmd().

00223 {
00224     CWincvsApp *app = (CWincvsApp *)AfxGetApp();
00225     return app->IsCvsRunning();
00226 }

Here is the call graph for this function:

void CExploreBar::OnDraw ( CDC * pDC ) [protected, virtual]

Definition at line 149 of file ExploreBar.cpp.

00150 {
00151     CDocument* pDoc = GetDocument();
00152 }

void CExploreBar::OnUpdateCmd ( CCmdUI * pCmdUI ) [protected]

Definition at line 204 of file ExploreBar.cpp.

References DisableCommon(), and m_TreeCtrl.

Referenced by OnUpdateViewCheckout(), and OnUpdateViewImport().

00205 {
00206     CWincvsApp* app = (CWincvsApp *)AfxGetApp();
00207     if(DisableCommon())
00208     {
00209         pCmdUI->Enable(FALSE);
00210         return;
00211     }
00212     CString folderPath;
00213     if(!m_TreeCtrl.GetSelectedFolderPath(folderPath) || folderPath.IsEmpty())
00214     {
00215         pCmdUI->Enable(FALSE);
00216         return;
00217     }
00218
00219     pCmdUI->Enable(TRUE);
00220 }

Here is the call graph for this function:

void CExploreBar::OnUpdateViewCheckout ( CCmdUI * pCmdUI ) [protected]

Definition at line 238 of file ExploreBar.cpp.

References OnUpdateCmd().

00239 {
00240     OnUpdateCmd(pCmdUI);
00241     pCmdUI->SetText("Chec&kout module to selection...");
00242 }

Here is the call graph for this function:

void CExploreBar::OnUpdateViewImport ( CCmdUI * pCmdUI ) [protected]

Definition at line 254 of file ExploreBar.cpp.

References OnUpdateCmd().

00255 {
00256     OnUpdateCmd(pCmdUI);
00257     pCmdUI->SetText("&Import module from selection...");
00258 }

Here is the call graph for this function:

void CExploreBar::OnViewCheckout ( ) [protected]

Definition at line 228 of file ExploreBar.cpp.

References m_TreeCtrl, and KoCheckoutHandler::OnFolder().

00229 {
00230     CString folderPath;
00231     if( m_TreeCtrl.GetSelectedFolderPath(folderPath) && !folderPath.IsEmpty() )
00232     {
00233         KoCheckoutHandler handler;
00234         handler.OnFolder(folderPath);
00235     }
00236 }

Here is the call graph for this function:

void CExploreBar::OnViewImport ( ) [protected]

Definition at line 244 of file ExploreBar.cpp.

References m_TreeCtrl, and KoImportHandler::OnFolder().

00245 {
00246     CString folderPath;
00247     if( m_TreeCtrl.GetSelectedFolderPath(folderPath) && !folderPath.IsEmpty() )
00248     {
00249         KoImportHandler handler;
00250         handler.OnFolder(folderPath);
00251     }
00252 }

Here is the call graph for this function:

void CExploreBar::OnWindowPosChanged ( WINDOWPOS FAR * lpwndpos ) [protected]

Definition at line 195 of file ExploreBar.cpp.

References m_TreeCtrl, and NULL.

00196 {
00197     CView::OnWindowPosChanged(wp);
00198
00199     CRect r;
00200     GetClientRect(&r);
00201     m_TreeCtrl.SetWindowPos(NULL, r.left, r.top, r.Width(), r.Height(), SWP_NOZORDER);
00202 }

Member Data Documentation

CMyShellTree CExploreBar::m_TreeCtrl

Definition at line 60 of file ExploreBar.h.

Referenced by Create(), CMainFrame::GetExplorerView(), OnUpdateCmd(), OnViewCheckout(), OnViewImport(), and OnWindowPosChanged().

The documentation for this class was generated from the following files:
  • WinCvs/ExploreBar.h
  • WinCvs/ExploreBar.cpp
Generated on Sat Aug 7 22:52:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFileAction_MAIN Class Reference

CFileAction_MAIN Class Reference

#include <FileActionDlg.h>

Inheritance diagram for CFileAction_MAIN:

[legend]
Collaboration diagram for CFileAction_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_OPEN_MAIN }

Public Member Functions

CFileAction_MAIN (const MultiFiles *mf, kLaunchType launchType)
~CFileAction_MAIN ()
virtual void | OnOK ()
OnOK virtual override, retrieve launch type for selection.
kLaunchType | GetLaunchType () const

Public Attributes

CStatic | m_fileActionDescStatic
CSmartComboBox m_fileActionCombo
int m_fileAction
BOOL | m_sameActionNextTime

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize the controls.
afx_msg void | OnSelchangeAction ()
CBN_SELCHANGE notification handler, update action description.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf
kLaunchType m_launchType

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 59 of file FileActionDlg.h.
00059 { IDD = IDD_OPEN_MAIN };

Constructor & Destructor Documentation

CFileAction_MAIN::CFileAction_MAIN | ( | const MultiFiles * | mf,
 |  | kLaunchType | launchType
 | ) |

Definition at line 51 of file FileActionDlg.cpp.

00052     : m_mf(mf), m_launchType(launchType), m_fileActionCombo(USmartCombo::AutoDropWidth),
00053     CHHelpPropertyPage(CFileAction_MAIN::IDD)
00054 {
00055     //{{AFX_DATA_INIT(CFileAction_MAIN)
00056     m_fileAction = -1;
00057     m_sameActionNextTime = FALSE;
00058     //}}AFX_DATA_INIT
00059
00060     m_sameActionNextTime = TRUE;
00061 }

CFileAction_MAIN::~CFileAction_MAIN ( )

Definition at line 63 of file FileActionDlg.cpp.

00064 {
00065 }

Member Function Documentation

void CFileAction_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 67 of file FileActionDlg.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_ACTION, IDC_ACTION_DESC, IDC_SAME_ACTION_NEXT_TIME, m_fileAction, m_fileActionCombo, m_fileActionDescStatic, and m_sameActionNextTime.

00068 {
00069     CHHelpPropertyPage::DoDataExchange(pDX);
00070     //{{AFX_DATA_MAP(CFileAction_MAIN)
00071     DDX_Control(pDX, IDC_ACTION_DESC, m_fileActionDescStatic);
00072     DDX_Control(pDX, IDC_ACTION, m_fileActionCombo);
00073     DDX_CBIndex(pDX, IDC_ACTION, m_fileAction);
00074     DDX_Check(pDX, IDC_SAME_ACTION_NEXT_TIME, m_sameActionNextTime);
00075     //}}AFX_DATA_MAP
00076 }

Here is the call graph for this function:

kLaunchType CFileAction_MAIN::GetLaunchType ( ) const

Get the selected launch type

Returns:
The selected launch type
Definition at line 140 of file FileActionDlg.cpp.

References kLaunchType, and m_launchType.

Referenced by CompatGetFileAction().

00141 {
00142     return m_launchType;
00143 }

void CFileAction_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 118 of file FileActionDlg.cpp.

References IDC_ACTION, IDC_ACTION_DESC, IDC_SAME_ACTION_NEXT_TIME, IDH_IDC_ACTION, IDH_IDC_ACTION_DESC, IDH_IDC_SAME_ACTION_NEXT_TIME, and CHHelpSupport::SetCtrlHelpID().

00119 {
00120     SetCtrlHelpID(IDC_ACTION,                   IDH_IDC_ACTION);
00121     SetCtrlHelpID(IDC_ACTION_DESC,              IDH_IDC_ACTION_DESC);
00122     SetCtrlHelpID(IDC_SAME_ACTION_NEXT_TIME,    IDH_IDC_SAME_ACTION_NEXT_TIME);
00123 }

Here is the call graph for this function:

BOOL CFileAction_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize the controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 89 of file FileActionDlg.cpp.

References GetLaunchTypeName(), kLaunchEnd, kLaunchType, and CHHelpPropertyPage::OnInitDialog().

00090 {
00091     CHHelpPropertyPage::OnInitDialog();
00092
00093     // Extra initialization
00094     for(int index = 0; index != kLaunchEnd; index++)
00095     {
00096         const int item = m_fileActionCombo.AddString(GetLaunchTypeName((kLaunchType)index, true));
00097         if( item > -1  )
00098         {
00099             m_fileActionCombo.SetItemData(item, (DWORD)index);
00100             if( index == m_launchType )
00101             {
00102                 m_fileActionCombo.SetCurSel(item);
00103             }
00104         }
00105     }
00106
00107     if( m_fileActionCombo.GetCurSel() < 0 )
00108     {
00109         m_fileActionCombo.SetCurSel(0);
00110     }
00111
00112     OnSelchangeAction();
00113
00114     return TRUE;  // return TRUE unless you set the focus to a control
00115                   // EXCEPTION: OCX Property Pages should return FALSE
00116 }

Here is the call graph for this function:

void CFileAction_MAIN::OnOK ( ) [virtual]

OnOK virtual override, retrieve launch type for selection.

Definition at line 146 of file FileActionDlg.cpp.

References kLaunchType, m_fileAction, m_fileActionCombo, and m_launchType.

00147 {
00148     UpdateData();
00149
00150     m_launchType = (kLaunchType)m_fileActionCombo.GetItemData(m_fileAction);
00151
00152     CHHelpPropertyPage::OnOK();
00153 }

void CFileAction_MAIN::OnSelchangeAction ( ) [protected]

CBN_SELCHANGE notification handler, update action description.

Definition at line 126 of file FileActionDlg.cpp.

References GetLaunchTypeName(), kLaunchType, m_fileActionCombo, and m_fileActionDescStatic.

00127 {
00128     const int item = m_fileActionCombo.GetCurSel();
00129     if( item > -1 )
00130     {
00131         const kLaunchType launchType = (kLaunchType)m_fileActionCombo.GetItemData(item);
00132         m_fileActionDescStatic.SetWindowText(GetLaunchTypeName(launchType, false));
00133     }
00134 }

Here is the call graph for this function:

Member Data Documentation

int CFileAction_MAIN::m_fileAction

Definition at line 62 of file FileActionDlg.h.

Referenced by DoDataExchange(), and OnOK().

CSmartComboBox CFileAction_MAIN::m_fileActionCombo

Definition at line 61 of file FileActionDlg.h.

Referenced by DoDataExchange(), OnOK(), and OnSelchangeAction().

CStatic CFileAction_MAIN::m_fileActionDescStatic

Definition at line 60 of file FileActionDlg.h.

Referenced by DoDataExchange(), and OnSelchangeAction().

kLaunchType CFileAction_MAIN::m_launchType [private]

Definition at line 87 of file FileActionDlg.h.

Referenced by GetLaunchType(), and OnOK().

const MultiFiles* CFileAction_MAIN::m_mf [private]

Definition at line 86 of file FileActionDlg.h.

BOOL CFileAction_MAIN::m_sameActionNextTime

Definition at line 63 of file FileActionDlg.h.

Referenced by CompatGetFileAction(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/FileActionDlg.h
  • common/FileActionDlg.cpp
Generated on Sat Aug 7 22:52:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFileDialog Class Reference

CFileDialog Class Reference

Inheritance diagram for CFileDialog:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/MfFileDialog.h
Generated on Sat Aug 7 22:52:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: FileEntry Class Reference

FileEntry Class Reference

Used internally. More...

#include <MultiFiles.h>

Collaboration diagram for FileEntry:

[legend]
List of all members.

Public Member Functions

FileEntry ()
FileEntry (const char *filename, const FSSpec *macspec=0L, const char *currRevision=0L)
FileEntry (const FileEntry &entry)
FileEntry & operator= (const FileEntry &entry)

Protected Attributes

UStr file
UStr currRev
FSSpec spec

Detailed Description

Used internally.

Definition at line 40 of file MultiFiles.h.

Constructor & Destructor Documentation

FileEntry::FileEntry ( )

Definition at line 52 of file MultiFiles.cpp.

00053 {
00054 }

FileEntry::FileEntry | ( | const char * | filename,
 |  | const FSSpec * | macspec = 0L,
 |  | const char * | currRevision = 0L
 | ) |

Definition at line 56 of file MultiFiles.cpp.

References currRev, file, and spec.

00057 {
00058     file = filename;
00059
00060     if( currRevision != 0L )
00061         currRev = currRevision;
00062
00063     if( macspec != 0L )
00064         spec = *macspec;
00065 }

FileEntry::FileEntry ( const FileEntry & entry )

Definition at line 67 of file MultiFiles.cpp.

00068 {
00069     *this = entry;
00070 }

Member Function Documentation

FileEntry & FileEntry::operator= ( const FileEntry & entry )

Definition at line 72 of file MultiFiles.cpp.

References currRev, file, and spec.

00073 {
00074     file = entry.file;
00075     currRev = entry.currRev;
00076     spec = entry.spec;
00077     return *this;
00078 }

Member Data Documentation

UStr FileEntry::currRev [protected]

Definition at line 51 of file MultiFiles.h.

Referenced by FileEntry(), and operator=().

UStr FileEntry::file [protected]

Definition at line 50 of file MultiFiles.h.

Referenced by FileEntry(), and operator=().

FSSpec FileEntry::spec [protected]

Definition at line 52 of file MultiFiles.h.

Referenced by FileEntry(), and operator=().

The documentation for this class was generated from the following files:
  • common/MultiFiles.h
  • common/MultiFiles.cpp
Generated on Sat Aug 7 22:52:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFillPyEntries Class Reference

CFillPyEntries Class Reference

Inheritance diagram for CFillPyEntries:

[legend]
Collaboration diagram for CFillPyEntries:

[legend]
List of all members.

Public Member Functions

CFillPyEntries (CSortList< ENTNODE > &entries)
virtual | ~CFillPyEntries ()
virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnAlias (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnFile (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Public Attributes

CSortList< ENTNODE > & m_entries
std::vector< UStr > | m_ignlist

Constructor & Destructor Documentation

CFillPyEntries::CFillPyEntries ( CSortList< ENTNODE > & entries ) [inline]

Definition at line 332 of file PythonGlue.cpp.

References m_entries.

00332                                                  :
00333         m_entries(entries) {}

virtual CFillPyEntries::~CFillPyEntries ( ) [inline, virtual]

Definition at line 335 of file PythonGlue.cpp.

00335 {}

Member Function Documentation

virtual kTraversal CFillPyEntries::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 337 of file PythonGlue.cpp.

References BuildIgnoredList(), Entries_Open(), kContinueTraversal, kTraversal, m_entries, and m_ignlist.

00338     {
00339         Entries_Open (m_entries, fullpath);
00340         BuildIgnoredList(m_ignlist, fullpath);
00341         return kContinueTraversal;
00342     }

Here is the call graph for this function:

virtual kTraversal CFillPyEntries::ExitDirectory ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 344 of file PythonGlue.cpp.

References kContinueTraversal, kTraversal, and m_ignlist.

00345     {
00346         m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00347         return kContinueTraversal;
00348     }

virtual kTraversal CFillPyEntries::OnAlias | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 377 of file PythonGlue.cpp.

References kTraversal, and OnFile().

00381     {
00382         return OnFile(fullpath, fullname, name, dir, macspec);
00383     }

Here is the call graph for this function:

virtual kTraversal CFillPyEntries::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 360 of file PythonGlue.cpp.

References Entries_SetVisited(), kSkipFile, kTraversal, m_entries, and m_ignlist.

00364     {
00365 #if defined(WIN32) || defined(TARGET_OS_MAC)
00366         if(stricmp(name, "CVS") == 0)
00367 #else
00368         if(strcmp(name, "CVS") == 0)
00369 #endif
00370             return kSkipFile;
00371
00372         /*EntnodeData *data = */Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00373
00374         return kSkipFile;
00375     }

Here is the call graph for this function:

virtual kTraversal CFillPyEntries::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 350 of file PythonGlue.cpp.

References kTraversal, and kTraversalError.

00351     {
00352         return kTraversalError;
00353     }

virtual kTraversal CFillPyEntries::OnFile | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 385 of file PythonGlue.cpp.

References Entries_SetVisited(), kContinueTraversal, kTraversal, m_entries, and m_ignlist.

Referenced by OnAlias().

00389     {
00390         /*EntnodeData *data = */Entries_SetVisited(fullpath, m_entries, name, dir, false, &m_ignlist);
00391
00392         return kContinueTraversal;
00393     }

Here is the call graph for this function:

virtual kTraversal CFillPyEntries::OnIdle ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 355 of file PythonGlue.cpp.

References kContinueTraversal, and kTraversal.

00356     {
00357         return kContinueTraversal;
00358     }

Member Data Documentation

CSortList<ENTNODE>& CFillPyEntries::m_entries

Definition at line 329 of file PythonGlue.cpp.

Referenced by CFillPyEntries(), EnterDirectory(), OnDirectory(), and OnFile().

std::vector< UStr > CFillPyEntries::m_ignlist

Definition at line 330 of file PythonGlue.cpp.

Referenced by EnterDirectory(), ExitDirectory(), OnDirectory(), and OnFile().

The documentation for this class was generated from the following file:
  • common/PythonGlue.cpp
Generated on Sat Aug 7 22:52:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFillTclEntries Class Reference

CFillTclEntries Class Reference

Inheritance diagram for CFillTclEntries:

[legend]
Collaboration diagram for CFillTclEntries:

[legend]
List of all members.

Public Member Functions

CFillTclEntries (CSortList< ENTNODE > &entries)
virtual | ~CFillTclEntries ()
virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnAlias (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnFile (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Public Attributes

CSortList< ENTNODE > & m_entries
std::vector< UStr > | m_ignlist

Constructor & Destructor Documentation

CFillTclEntries::CFillTclEntries ( CSortList< ENTNODE > & entries ) [inline]

Definition at line 568 of file TclGlue.cpp.

References m_entries.

00568                                                  :
00569         m_entries(entries) {}

virtual CFillTclEntries::~CFillTclEntries ( ) [inline, virtual]

Definition at line 571 of file TclGlue.cpp.

00571 {}

Member Function Documentation

virtual kTraversal CFillTclEntries::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 573 of file TclGlue.cpp.

References BuildIgnoredList(), Entries_Open(), kContinueTraversal, kTraversal, m_entries, and m_ignlist.

00574     {
00575         Entries_Open (m_entries, fullpath);
00576         BuildIgnoredList(m_ignlist, fullpath);
00577         return kContinueTraversal;
00578     }

Here is the call graph for this function:

virtual kTraversal CFillTclEntries::ExitDirectory ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 580 of file TclGlue.cpp.

References kContinueTraversal, kTraversal, and m_ignlist.

00581     {
00582         m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00583         return kContinueTraversal;
00584     }

virtual kTraversal CFillTclEntries::OnAlias | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 613 of file TclGlue.cpp.

References kTraversal, and OnFile().

00617     {
00618         return OnFile(fullpath, fullname, name, dir, macspec);
00619     }

Here is the call graph for this function:

virtual kTraversal CFillTclEntries::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 596 of file TclGlue.cpp.

References Entries_SetVisited(), kSkipFile, kTraversal, m_entries, and m_ignlist.

00600     {
00601 #if defined(WIN32) || defined(TARGET_OS_MAC)
00602         if( stricmp(name, "CVS") == 0 )
00603 #else
00604         if( strcmp(name, "CVS") == 0 )
00605 #endif
00606             return kSkipFile;
00607
00608         /*EntnodeData *data = */Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00609
00610         return kSkipFile;
00611     }

Here is the call graph for this function:

virtual kTraversal CFillTclEntries::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 586 of file TclGlue.cpp.

References kTraversal, and kTraversalError.

00587     {
00588         return kTraversalError;
00589     }

virtual kTraversal CFillTclEntries::OnFile | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 621 of file TclGlue.cpp.

References Entries_SetVisited(), kContinueTraversal, kTraversal, m_entries, and m_ignlist.

Referenced by OnAlias().

00625     {
00626         /*EntnodeData *data = */Entries_SetVisited(fullpath, m_entries, name, dir, false, &m_ignlist);
00627
00628         return kContinueTraversal;
00629     }

Here is the call graph for this function:

virtual kTraversal CFillTclEntries::OnIdle ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 591 of file TclGlue.cpp.

References kContinueTraversal, and kTraversal.

00592     {
00593         return kContinueTraversal;
00594     }

Member Data Documentation

CSortList<ENTNODE>& CFillTclEntries::m_entries

Definition at line 565 of file TclGlue.cpp.

Referenced by CFillTclEntries(), EnterDirectory(), OnDirectory(), and OnFile().

std::vector< UStr > CFillTclEntries::m_ignlist

Definition at line 566 of file TclGlue.cpp.

Referenced by EnterDirectory(), ExitDirectory(), OnDirectory(), and OnFile().

The documentation for this class was generated from the following file:
  • common/TclGlue.cpp
Generated on Sat Aug 7 22:52:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFilterMaskOptDlg Class Reference

CFilterMaskOptDlg Class Reference

#include <FilterMaskOptDlg.h>

Inheritance diagram for CFilterMaskOptDlg:

[legend]
Collaboration diagram for CFilterMaskOptDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_FILTERBAR_OPTIONS }

Public Member Functions

CFilterMaskOptDlg (const int reactionSpeed, CWnd *pParent=NULL)

Public Attributes

CStatic | m_reactionSpeedStatic
CSpinButtonCtrl | m_reactionSpeedSpin
int m_reactionSpeed

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override.
afx_msg void | OnChangeReactionSpeed ()
EN_CHANGE notification handler, update the setting info.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()
void | UpdateReactionSpeedInfo ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 51 of file FilterMaskOptDlg.h.
00051 { IDD = IDD_FILTERBAR_OPTIONS };

Constructor & Destructor Documentation

CFilterMaskOptDlg::CFilterMaskOptDlg | ( | const int | reactionSpeed,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 45 of file FilterMaskOptDlg.cpp.

References m_reactionSpeed.

00046     : CHHelpDialog(CFilterMaskOptDlg::IDD, pParent)
00047 {
00048     //{{AFX_DATA_INIT(CFilterMaskOptDlg)
00049     m_reactionSpeed = reactionSpeed;
00050     //}}AFX_DATA_INIT
00051 }

Member Function Documentation

void CFilterMaskOptDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 54 of file FilterMaskOptDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_REACTION_SPEED, IDC_REACTION_SPEED_SECONDS, IDC_REACTION_SPEED_SPIN, m_reactionSpeed, m_reactionSpeedSpin, and m_reactionSpeedStatic.

00055 {
00056     CHHelpDialog::DoDataExchange(pDX);
00057     //{{AFX_DATA_MAP(CFilterMaskOptDlg)
00058     DDX_Control(pDX, IDC_REACTION_SPEED_SECONDS, m_reactionSpeedStatic);
00059     DDX_Control(pDX, IDC_REACTION_SPEED_SPIN, m_reactionSpeedSpin);
00060     DDX_Text(pDX, IDC_REACTION_SPEED, m_reactionSpeed);
00061     DDV_MinMaxInt(pDX, m_reactionSpeed, 0, 1000000);
00062     //}}AFX_DATA_MAP
00063 }

Here is the call graph for this function:

void CFilterMaskOptDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 90 of file FilterMaskOptDlg.cpp.

References IDC_REACTION_SPEED, IDC_REACTION_SPEED_SECONDS, IDC_REACTION_SPEED_SPIN, IDH_IDC_REACTION_SPEED, IDH_IDC_REACTION_SPEED_SECONDS, IDH_IDC_REACTION_SPEED_SPIN, and CHHelpSupport::SetCtrlHelpID().

00091 {
00092     SetCtrlHelpID(IDC_REACTION_SPEED,           IDH_IDC_REACTION_SPEED);
00093     SetCtrlHelpID(IDC_REACTION_SPEED_SPIN,      IDH_IDC_REACTION_SPEED_SPIN);
00094     SetCtrlHelpID(IDC_REACTION_SPEED_SECONDS,   IDH_IDC_REACTION_SPEED_SECONDS);
00095 }

Here is the call graph for this function:

void CFilterMaskOptDlg::OnChangeReactionSpeed ( ) [protected]

EN_CHANGE notification handler, update the setting info.

Definition at line 104 of file FilterMaskOptDlg.cpp.

References UpdateReactionSpeedInfo().

00105 {
00106     UpdateReactionSpeedInfo();
00107 }

Here is the call graph for this function:

void CFilterMaskOptDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 98 of file FilterMaskOptDlg.cpp.

References CHHelpSupport::ShowHelp().

00099 {
00100     ShowHelp();
00101 }

Here is the call graph for this function:

BOOL CFilterMaskOptDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override.

Reimplemented from CHHelpDialog.

Definition at line 77 of file FilterMaskOptDlg.cpp.

References CHHelpDialog::OnInitDialog().

00078 {
00079     CHHelpDialog::OnInitDialog();
00080
00081     // Extra initialization
00082     m_reactionSpeedSpin.SetRange(0, 1000000);
00083
00084     UpdateReactionSpeedInfo();
00085
00086     return TRUE;  // return TRUE unless you set the focus to a control
00087     // EXCEPTION: OCX Property Pages should return FALSE
00088 }

Here is the call graph for this function:

void CFilterMaskOptDlg::UpdateReactionSpeedInfo ( ) [private]

Update reaction speed information text Definition at line 112 of file FilterMaskOptDlg.cpp.

References IDC_REACTION_SPEED, and m_reactionSpeedStatic.

Referenced by OnChangeReactionSpeed().

00113 {
00114     if( ::IsWindow(m_reactionSpeedStatic.GetSafeHwnd()) )
00115     {
00116         BOOL trans = FALSE;
00117         const int reactionSpeed = GetDlgItemInt(IDC_REACTION_SPEED, &trans);
00118
00119         CString reactionSpeedInfo;
00120         if( trans )
00121         {
00122             const double secReactionSpeed = (double)reactionSpeed / 1000;
00123
00124             CString strSecReactionSpeed;
00125             strSecReactionSpeed.Format("%f", secReactionSpeed);
00126             strSecReactionSpeed.TrimRight("0");
00127             strSecReactionSpeed.TrimRight(".");
00128
00129             if( !strSecReactionSpeed.IsEmpty() )
00130             {
00131                 reactionSpeedInfo.Format("(%s second%s)", strSecReactionSpeed, secReactionSpeed >= 2 ? "s" : "");
00132             }
00133         }
00134
00135         m_reactionSpeedStatic.SetWindowText(reactionSpeedInfo);
00136     }
00137 }

Member Data Documentation

int CFilterMaskOptDlg::m_reactionSpeed

Definition at line 54 of file FilterMaskOptDlg.h.

Referenced by CFilterMaskOptDlg(), CompatGetFilterMaskOptions(), and DoDataExchange().

CSpinButtonCtrl CFilterMaskOptDlg::m_reactionSpeedSpin

Definition at line 53 of file FilterMaskOptDlg.h.

Referenced by DoDataExchange().

CStatic CFilterMaskOptDlg::m_reactionSpeedStatic

Definition at line 52 of file FilterMaskOptDlg.h.

Referenced by DoDataExchange(), and UpdateReactionSpeedInfo().

The documentation for this class was generated from the following files:
  • common/FilterMaskOptDlg.h
  • common/FilterMaskOptDlg.cpp
Generated on Sat Aug 7 22:52:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFilterSelectionDlg Class Reference

CFilterSelectionDlg Class Reference

#include <FilterSelectionDlg.h>

Inheritance diagram for CFilterSelectionDlg:

[legend]
Collaboration diagram for CFilterSelectionDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_FILTER_SELECTION }

Public Member Functions

CFilterSelectionDlg (const int columnIndex, const char *filterText, CWnd *pParent=NULL)

Public Attributes

CSmartComboBox m_filterCombo
CSmartComboBox m_contentsCombo
CString | m_filterText

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, position the window so it looks like a drop-down list rather than a dialog.
afx_msg void | OnSelchangeContentsCombo ()
CBN_SELCHANGE notification handler, change the contents as appropriate.
afx_msg void | OnDblclkCombofilter ()
CBN_DBLCLK notification handler, select the item.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

int m_columnIndex

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 56 of file FilterSelectionDlg.h.
00056 { IDD = IDD_FILTER_SELECTION };

Constructor & Destructor Documentation

CFilterSelectionDlg::CFilterSelectionDlg | ( | const int | columnIndex,
 |  | const char * | filterText,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 92 of file FilterSelectionDlg.cpp.

References m_columnIndex, and m_filterText.

00094     : m_contentsCombo(USmartCombo::AutoDropWidth), m_filterCombo(USmartCombo::RemoveItems),
00095     CHHelpDialog(CFilterSelectionDlg::IDD, pParent)
00096 {
00097     //{{AFX_DATA_INIT(CFilterSelectionDlg)
00098     m_filterText = _T("");
00099     //}}AFX_DATA_INIT
00100
00101     m_columnIndex = columnIndex;
00102     m_filterText = filterText;
00103 }

Member Function Documentation

void CFilterSelectionDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 106 of file FilterSelectionDlg.cpp.

References DDX_ComboMString(), CHHelpDialog::DoDataExchange(), GetPrevFilter(), IDC_FILTER, IDC_FILTER_CONTENTS, TMString< T >::Insert(), m_columnIndex, m_contentsCombo, m_filterCombo, and m_filterText.

00107 {
00108     CHHelpDialog::DoDataExchange(pDX);
00109     //{{AFX_DATA_MAP(CFilterSelectionDlg)
00110     DDX_Control(pDX, IDC_FILTER, m_filterCombo);
00111     DDX_Control(pDX, IDC_FILTER_CONTENTS, m_contentsCombo);
00112     DDX_CBString(pDX, IDC_FILTER, m_filterText);
00113     //}}AFX_DATA_MAP
00114
00115     if( pDX->m_bSaveAndValidate )
00116     {
00117         if( !m_filterText.IsEmpty() )
00118         {
00119             CMString* prevFilter = GetPrevFilter(m_columnIndex);
00120             if( prevFilter )
00121             {
00122                 prevFilter->Insert(m_filterText);
00123             }
00124         }
00125     }
00126     else
00127     {
00128         // Display only
00129         DDX_ComboMString(pDX, IDC_FILTER, m_filterCombo);
00130     }
00131 }

Here is the call graph for this function:

void CFilterSelectionDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 193 of file FilterSelectionDlg.cpp.

References IDC_FILTER, IDC_FILTER_CONTENTS, IDH_IDC_FILTER, IDH_IDC_FILTER_CONTENTS, and CHHelpSupport::SetCtrlHelpID().

00194 {
00195     SetCtrlHelpID(IDC_FILTER,           IDH_IDC_FILTER);
00196     SetCtrlHelpID(IDC_FILTER_CONTENTS,  IDH_IDC_FILTER_CONTENTS);
00197 }

Here is the call graph for this function:

void CFilterSelectionDlg::OnDblclkCombofilter ( ) [protected]

CBN_DBLCLK notification handler, select the item.

Definition at line 237 of file FilterSelectionDlg.cpp.

00238 {
00239     OnOK();
00240 }

void CFilterSelectionDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 200 of file FilterSelectionDlg.cpp.

References CHHelpSupport::ShowHelp().

00201 {
00202     ShowHelp();
00203 }

Here is the call graph for this function:

BOOL CFilterSelectionDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, position the window so it looks like a drop-down list rather than a dialog.

Reimplemented from CHHelpDialog.

Definition at line 146 of file FilterSelectionDlg.cpp.

References GetPrevFilter(), and CHHelpDialog::OnInitDialog().

00147 {
00148     // Extra initialization
00149     CMString* prevFilter = GetPrevFilter(m_columnIndex);
00150     if( prevFilter )
00151     {
00152         m_filterCombo.SetItems(prevFilter);
00153     }
00154
00155     CHHelpDialog::OnInitDialog();
00156
00157     // Add the columns to the contents combo
00158     for(int index = 0; index != ColumnIndex::kEnd; index++)
00159     {
00160         const int item = m_contentsCombo.AddString(ColumnIndex::GetColumnName(index, false));
00161         if( item > -1  )
00162         {
00163             m_contentsCombo.SetItemData(item, (DWORD)index);
00164         }
00165     }
00166
00167     // Find and set the filter column
00168     for(int nIndex = 0; nIndex < m_contentsCombo.GetCount(); nIndex++)
00169     {
00170         if( m_contentsCombo.GetItemData(nIndex) == (DWORD)m_columnIndex )
00171         {
00172             m_contentsCombo.SetCurSel(nIndex);
00173             break;
00174         }
00175     }
00176
00177     // Select the item in the list
00178     const int itemIndex = m_filterCombo.FindStringExact(-1, m_filterText);
00179     if( itemIndex > -1 )
00180     {
00181         m_filterCombo.SetCurSel(itemIndex);
00182     }
00183
00184     // Set the dialog window title
00185     CString strTitle;
00186     strTitle.Format("Select %s Filter", ColumnIndex::GetColumnName(m_columnIndex, false));
00187     SetWindowText(strTitle);
00188
00189     return TRUE;  // return TRUE unless you set the focus to a control
00190                   // EXCEPTION: OCX Property Pages should return FALSE
00191 }

Here is the call graph for this function:

void CFilterSelectionDlg::OnSelchangeContentsCombo ( ) [protected]

CBN_SELCHANGE notification handler, change the contents as appropriate.

Definition at line 206 of file FilterSelectionDlg.cpp.

References GetPrevFilter(), CSmartComboBox::GetWindowText(), m_contentsCombo, m_filterCombo, and USmartCombo::SetItems().

00207 {
00208     const int selection = m_contentsCombo.GetCurSel();
00209     if( selection > -1 )
00210     {
00211         // Store the filter text
00212         CString filterText;
00213         m_filterCombo.GetWindowText(filterText);
00214
00215         // Set the items
00216         const int columnIndex = (int)m_contentsCombo.GetItemData(selection);
00217         CMString* prevFilter = GetPrevFilter(columnIndex);
00218         if( prevFilter )
00219         {
00220             m_filterCombo.SetItems(prevFilter);
00221         }
00222
00223         UpdateData(FALSE);
00224
00225         // Restore the filter text and the selection
00226         m_filterCombo.SetWindowText(filterText);
00227
00228         const int itemIndex = m_filterCombo.FindStringExact(-1, filterText);
00229         if( itemIndex > -1 )
00230         {
00231             m_filterCombo.SetCurSel(itemIndex);
00232         }
00233     }
00234 }

Here is the call graph for this function:

Member Data Documentation

int CFilterSelectionDlg::m_columnIndex [private]

Column index Definition at line 83 of file FilterSelectionDlg.h.

Referenced by CFilterSelectionDlg(), and DoDataExchange().

CSmartComboBox CFilterSelectionDlg::m_contentsCombo

Definition at line 58 of file FilterSelectionDlg.h.

Referenced by DoDataExchange(), and OnSelchangeContentsCombo().

CSmartComboBox CFilterSelectionDlg::m_filterCombo

Definition at line 57 of file FilterSelectionDlg.h.

Referenced by DoDataExchange(), and OnSelchangeContentsCombo().

CString CFilterSelectionDlg::m_filterText

Definition at line 59 of file FilterSelectionDlg.h.

Referenced by CFilterSelectionDlg(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/FilterSelectionDlg.h
  • common/FilterSelectionDlg.cpp
Generated on Sat Aug 7 22:52:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFindSettings Class Reference

CFindSettings Class Reference

Inheritance diagram for CFindSettings:

[legend]
Collaboration diagram for CFindSettings:

[legend]
List of all members.

Public Member Functions

CFindSettings (const char *findPath)
CFindSettings (std::map< UStr, UStr > &list)
virtual | ~CFindSettings ()
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnFile (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Static Public Member Functions

bool | searchPath (const char *token, const char *value, void *data)
bool | searchAllPath (const char *token, const char *value, void *data)

Public Attributes

UStr m_pathToFind
UStr m_settingsFile
bool m_foundIt
UStr m_topfolder
std::map< UStr, UStr > * | m_list

Constructor & Destructor Documentation

CFindSettings::CFindSettings ( const char * findPath ) [inline]

Definition at line 1151 of file Persistent.cpp.

References m_list, m_pathToFind, and UStr::rtrim().

01151                                         : m_pathToFind(findPath), m_list(0L)
01152     {
01153         m_pathToFind.rtrim(kPathDelimiter);
01154     }

Here is the call graph for this function:

CFindSettings::CFindSettings ( std::map< UStr, UStr > & list ) [inline]

Definition at line 1156 of file Persistent.cpp.

References m_list.

01156                                             : m_list(&list)
01157     {
01158     }

virtual CFindSettings::~CFindSettings ( ) [inline, virtual]

Definition at line 1160 of file Persistent.cpp.

01160 {}

Member Function Documentation

virtual kTraversal CFindSettings::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 1162 of file Persistent.cpp.

References cvs_err(), err, kTraversal, and kTraversalError.

01163     {
01164         cvs_err(err);
01165         cvs_err("\n");
01166         return kTraversalError;
01167     }

Here is the call graph for this function:

kTraversal CFindSettings::OnFile | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

Definition at line 1221 of file Persistent.cpp.

References kContinueTraversal, kStopTraversal, kTraversal, LoadSettingsInternal(), m_foundIt, m_list, m_settingsFile, searchAllPath(), and searchPath().

01225 {
01226     m_foundIt = false;
01227
01228     if( m_list == 0L )
01229     {
01230         LoadSettingsInternal(fullname, searchPath, this);
01231     }
01232     else
01233     {
01234         m_settingsFile = fullname;
01235         LoadSettingsInternal(fullname, searchAllPath, this);
01236     }
01237
01238     if( m_foundIt )
01239         m_settingsFile = fullname;
01240
01241     return m_foundIt ? kStopTraversal : kContinueTraversal;
01242 }

Here is the call graph for this function:

bool CFindSettings::searchAllPath | ( | const char * | token,
 |  | const char * | value,
 |  | void * | data
 | ) | [static]

Definition at line 1206 of file Persistent.cpp.

References getSettingName(), m_list, and m_settingsFile.

Referenced by OnFile().

01207 {
01208     CFindSettings *loader = (CFindSettings*)data;
01209     if( strcmp(token, "PATH") == 0 )
01210     {
01211         getSettingName(loader->m_settingsFile, loader->m_settingsFile);
01212         std::map<UStr, UStr>::value_type v(loader->m_settingsFile, UStr(value));
01213         loader->m_list->insert(v);
01214
01215         return true;
01216     }
01217
01218     return false;
01219 }

Here is the call graph for this function:

bool CFindSettings::searchPath | ( | const char * | token,
 |  | const char * | value,
 |  | void * | data
 | ) | [static]

Definition at line 1184 of file Persistent.cpp.

References m_foundIt, m_pathToFind, and m_topfolder.

Referenced by OnFile().

01185 {
01186     CFindSettings* loader = (CFindSettings*)data;
01187     // if we give a sub-folder to look for, it will return the
01188     // top folder's settings
01189     if( strcmp(token, "PATH") == 0 &&
01190 #if qUnix
01191         strcmp(value, loader->m_pathToFind) == 0
01192 #else
01193         stricmp(value, loader->m_pathToFind) == 0
01194 #endif
01195         )
01196     {
01197         loader->m_foundIt = true;
01198         loader->m_topfolder = value;
01199
01200         return true;
01201     }
01202
01203     return false;
01204 }

Member Data Documentation

bool CFindSettings::m_foundIt

Definition at line 1179 of file Persistent.cpp.

Referenced by OnFile(), and searchPath().

std::map<UStr, UStr>* CFindSettings::m_list

Definition at line 1181 of file Persistent.cpp.

Referenced by CFindSettings(), OnFile(), and searchAllPath().

UStr CFindSettings::m_pathToFind

Definition at line 1177 of file Persistent.cpp.

Referenced by CFindSettings(), and searchPath().

UStr CFindSettings::m_settingsFile

Definition at line 1178 of file Persistent.cpp.

Referenced by AskCreatePersistentSettings(), HasPersistentSettings(), LoadPersistentSettings(), OnFile(), SavePersistentSettings(), and searchAllPath().

UStr CFindSettings::m_topfolder

Definition at line 1180 of file Persistent.cpp.

Referenced by SavePersistentSettings(), and searchPath().

The documentation for this class was generated from the following file:
  • common/Persistent.cpp
Generated on Sat Aug 7 22:52:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFormView Class Reference

CFormView Class Reference

Inheritance diagram for CFormView:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJHtmlView.h
Generated on Sat Aug 7 22:52:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CFrameWnd Class Reference

CFrameWnd Class Reference

Inheritance diagram for CFrameWnd:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJFrameWnd.h
Generated on Sat Aug 7 22:52:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: garbyRec Struct Reference

garbyRec Struct Reference

Collaboration diagram for garbyRec:

[legend]
List of all members.

Public Attributes

poolRec pools [20]

Member Data Documentation

poolRec garbyRec::pools[20]

Definition at line 299 of file dll_garbage.c.

The documentation for this struct was generated from the following file:
  • common/dll_garbage.c
Generated on Sat Aug 7 22:52:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: GetPassword Class Reference

GetPassword Class Reference

#include <GetPassword.h>

Inheritance diagram for GetPassword:

[legend]
Collaboration diagram for GetPassword:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_PASSWRD }

Public Member Functions

GetPassword (CWnd *pParent=NULL)

Public Attributes

CString | m_passwd

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, set help IDs and bring window into the foreground.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 48 of file GetPassword.h.
00048 { IDD = IDD_PASSWRD };

Constructor & Destructor Documentation

GetPassword::GetPassword ( CWnd * pParent = NULL )

Definition at line 59 of file GetPassword.cpp.

References m_passwd.

00060     : CHHelpDialog(GetPassword::IDD, pParent)
00061 {
00062     //{{AFX_DATA_INIT(GetPassword)
00063     m_passwd = _T("");
00064     //}}AFX_DATA_INIT
00065 }

Member Function Documentation

void GetPassword::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 68 of file GetPassword.cpp.

References CHHelpDialog::DoDataExchange(), IDC_PASSWORD, and m_passwd.

00069 {
00070     CHHelpDialog::DoDataExchange(pDX);
00071     //{{AFX_DATA_MAP(GetPassword)
00072     DDX_Text(pDX, IDC_PASSWORD, m_passwd);
00073     //}}AFX_DATA_MAP
00074 }

Here is the call graph for this function:

void GetPassword::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 102 of file GetPassword.cpp.

References IDC_PASSWORD, IDH_IDC_PASSWORD, and CHHelpSupport::SetCtrlHelpID().

00103 {
00104     SetCtrlHelpID(IDC_PASSWORD, IDH_IDC_PASSWORD);
00105 }

Here is the call graph for this function:

void GetPassword::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 108 of file GetPassword.cpp.

References CHHelpSupport::ShowHelp().

00109 {
00110     ShowHelp();
00111 }

Here is the call graph for this function:

BOOL GetPassword::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, set help IDs and bring window into the foreground.

Reimplemented from CHHelpDialog.

Definition at line 87 of file GetPassword.cpp.

References CHHelpDialog::OnInitDialog().

00088 {
00089     CHHelpDialog::OnInitDialog();
00090
00091     // Extra initialization here
00092     if( !IsWindowVisible() )
00093     {
00094         // Force the window to the foreground in case it was covered by terminal or DOS box
00095         SetForegroundWindow();
00096     }
00097
00098     return TRUE;  // return TRUE unless you set the focus to a control
00099     // EXCEPTION: OCX Property Pages should return FALSE
00100 }

Here is the call graph for this function:

Member Data Documentation

CString GetPassword::m_passwd

Definition at line 49 of file GetPassword.h.

Referenced by CompatGetPassword(), DoDataExchange(), and GetPassword().

The documentation for this class was generated from the following files:
  • common/GetPassword.h
  • common/GetPassword.cpp
Generated on Sat Aug 7 22:52:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGetPrefs_CVS Class Reference

CGetPrefs_CVS Class Reference

CVS preferences property page. More...

#include <GetPrefs.h>

Inheritance diagram for CGetPrefs_CVS:

[legend]
Collaboration diagram for CGetPrefs_CVS:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_PREFS_CVS }

Public Member Functions

CGetPrefs_CVS ()
~CGetPrefs_CVS ()
void | StoreValues ()
Save the values.

Public Attributes

CSmartComboBox m_altCvsCombo
CButton | m_cvsConsoleCheck
CSmartComboBox m_showCvsCombo
CButton | m_selAltCvsButton
CButton | m_useAltCvsCheck
CEdit | m_homeEdit
CString | m_home
BOOL | m_useAltCvs
BOOL | m_cvsConsole
int m_showCvs
CString | m_altCvs

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnBtnhome ()
BN_CLICKED message handler, change HOME directory.
afx_msg void | OnAltcvschk ()
BN_CLICKED message handler, enable to change alternate CVS executable.
afx_msg void | OnAltcvssel ()
BN_CLICKED message handler, change alternate CVS executable.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls.
afx_msg void | OnConsole ()
BN_CLICKED message handler, enable show console combo box.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

bool m_didInteract

Detailed Description

CVS preferences property page.

Definition at line 175 of file GetPrefs.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 186 of file GetPrefs.h.
00186 { IDD = IDD_PREFS_CVS };

Constructor & Destructor Documentation

CGetPrefs_CVS::CGetPrefs_CVS ( )

Definition at line 516 of file GetPrefs.cpp.

References CvsPrefs::CvsConsole(), gCvsPrefs, gPrevAltCvs, CvsPrefs::Home(), CvsPrefs::ShowCvs(), and CvsPrefs::WhichCvs().

00517     : CHHelpPropertyPage(CGetPrefs_CVS::IDD), m_didInteract(false), m_showCvsCombo(CSmartComboBox::AutoDropWidth)
00518 {
00519     UStr cvsPath;
00520
00521     //{{AFX_DATA_INIT(CGetPrefs_CVS)
00522     m_home = gCvsPrefs.Home() != 0L ? gCvsPrefs.Home() : "";
00523     m_useAltCvs = gCvsPrefs.WhichCvs(cvsPath, true) != 0L;
00524     m_cvsConsole = gCvsPrefs.CvsConsole();
00525     m_showCvs = gCvsPrefs.ShowCvs();
00526     m_altCvs = gCvsPrefs.WhichCvs(cvsPath);
00527     //}}AFX_DATA_INIT
00528
00529     m_altCvsCombo.SetItems(&gPrevAltCvs);
00530 }

Here is the call graph for this function:

CGetPrefs_CVS::~CGetPrefs_CVS ( )

Definition at line 532 of file GetPrefs.cpp.

00533 {
00534 }

Member Function Documentation

void CGetPrefs_CVS::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 536 of file GetPrefs.cpp.

References DDV_CheckPathExists(), DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_ALTERNATE_CVS, IDC_BROWSE_FILENAME, IDC_CONSOLE, IDC_HAS_ALTERNATE_CVS, IDC_HOME, IDC_SHOW_CVS_METHOD, m_altCvs, m_altCvsCombo, m_cvsConsole, m_cvsConsoleCheck, m_didInteract, m_home, m_homeEdit, m_selAltCvsButton, m_showCvs, m_showCvsCombo, m_useAltCvs, m_useAltCvsCheck, and OnAltcvschk().

00537 {
00538     m_didInteract = true;
00539
00540     CHHelpPropertyPage::DoDataExchange(pDX);
00541
00542     //{{AFX_DATA_MAP(CGetPrefs_CVS)
00543     DDX_Control(pDX, IDC_ALTERNATE_CVS, m_altCvsCombo);
00544     DDX_Control(pDX, IDC_CONSOLE, m_cvsConsoleCheck);
00545     DDX_Control(pDX, IDC_SHOW_CVS_METHOD, m_showCvsCombo);
00546     DDX_Control(pDX, IDC_BROWSE_FILENAME, m_selAltCvsButton);
00547     DDX_Control(pDX, IDC_HAS_ALTERNATE_CVS, m_useAltCvsCheck);
00548     DDX_Control(pDX, IDC_HOME, m_homeEdit);
00549     DDX_Text(pDX, IDC_HOME, m_home);
00550     DDX_Check(pDX, IDC_HAS_ALTERNATE_CVS, m_useAltCvs);
00551     DDX_Check(pDX, IDC_CONSOLE, m_cvsConsole);
00552     DDX_CBIndex(pDX, IDC_SHOW_CVS_METHOD, m_showCvs);
00553     DDX_CBString(pDX, IDC_ALTERNATE_CVS, m_altCvs);
00554     //}}AFX_DATA_MAP
00555
00556     DDV_CheckPathExists(pDX, IDC_HOME, m_home);
00557
00558     if( !pDX->m_bSaveAndValidate )
00559     {
00560         OnAltcvschk();
00561     }
00562
00563     if( m_useAltCvs )
00564     {
00565         DDV_MinChars(pDX, m_altCvs, 1);
00566         DDX_ComboMString(pDX, IDC_ALTERNATE_CVS, m_altCvsCombo);
00567     }
00568 }

Here is the call graph for this function:

void CGetPrefs_CVS::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 604 of file GetPrefs.cpp.

References IDC_ALTERNATE_CVS, IDC_BROWSE_FILENAME, IDC_BROWSE_PATH, IDC_CONSOLE, IDC_HAS_ALTERNATE_CVS, IDC_HOME, IDC_SHOW_CVS_METHOD, IDH_IDC_ALTERNATE_CVS, IDH_IDC_BROWSE_FILENAME, IDH_IDC_BROWSE_PATH, IDH_IDC_CONSOLE, IDH_IDC_HAS_ALTERNATE_CVS, IDH_IDC_HOME, IDH_IDC_SHOW_CVS_METHOD, and CHHelpSupport::SetCtrlHelpID().

00605 {
00606     SetCtrlHelpID(IDC_HOME,                 IDH_IDC_HOME);
00607     SetCtrlHelpID(IDC_BROWSE_PATH,          IDH_IDC_BROWSE_PATH);
00608     SetCtrlHelpID(IDC_HAS_ALTERNATE_CVS,    IDH_IDC_HAS_ALTERNATE_CVS);
00609     SetCtrlHelpID(IDC_ALTERNATE_CVS,        IDH_IDC_ALTERNATE_CVS);
00610     SetCtrlHelpID(IDC_BROWSE_FILENAME,      IDH_IDC_BROWSE_FILENAME);
00611     SetCtrlHelpID(IDC_CONSOLE,              IDH_IDC_CONSOLE);
00612     SetCtrlHelpID(IDC_SHOW_CVS_METHOD,      IDH_IDC_SHOW_CVS_METHOD);
00613 }

Here is the call graph for this function:

void CGetPrefs_CVS::OnAltcvschk ( ) [protected]

BN_CLICKED message handler, enable to change alternate CVS executable.

Definition at line 647 of file GetPrefs.cpp.

References m_altCvsCombo, m_selAltCvsButton, and m_useAltCvsCheck.

Referenced by DoDataExchange().

00648 {
00649     m_altCvsCombo.EnableWindow(m_useAltCvsCheck.GetCheck() != 0);
00650     m_selAltCvsButton.EnableWindow(m_useAltCvsCheck.GetCheck() != 0);
00651 }

void CGetPrefs_CVS::OnAltcvssel ( ) [protected]

BN_CLICKED message handler, change alternate CVS executable.

Definition at line 654 of file GetPrefs.cpp.

References BrowseForFile(), CStr, CSmartComboBox::GetWindowText(), kSelectExecutable, and m_altCvsCombo.

00655 {
00656     CString altCvs;
00657     m_altCvsCombo.GetWindowText(altCvs);
00658
00659     CStr fullpath = altCvs;
00660     if( BrowseForFile("Select the CVS client application", kSelectExecutable, fullpath) )
00661     {
00662         m_altCvsCombo.SetWindowText(fullpath);
00663     }
00664 }

Here is the call graph for this function:

void CGetPrefs_CVS::OnBtnhome ( ) [protected]

BN_CLICKED message handler, change HOME directory.

Definition at line 634 of file GetPrefs.cpp.

References BrowserGetDirectory(), CStr, m_homeEdit, and NULL.

00635 {
00636     CString strHome;
00637     m_homeEdit.GetWindowText(strHome);
00638
00639     CStr home(strHome);
00640     if( BrowserGetDirectory("Select the HOME directory", home, IsWindow(m_hWnd) ? this : NULL) )
00641     {
00642         m_homeEdit.SetWindowText(home);
00643     }
00644 }

Here is the call graph for this function:

void CGetPrefs_CVS::OnConsole ( ) [protected]

BN_CLICKED message handler, enable show console combo box.

Definition at line 616 of file GetPrefs.cpp.

References m_cvsConsoleCheck, and m_showCvsCombo.

00617 {
00618     m_showCvsCombo.EnableWindow(!m_cvsConsoleCheck.GetCheck());
00619 }

BOOL CGetPrefs_CVS::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 580 of file GetPrefs.cpp.

References EnableEditAutoComplete(), gCvsPrefs, CHHelpPropertyPage::OnInitDialog(), and CvsPrefs::ShowCvs().

00581 {
00582     CHHelpPropertyPage::OnInitDialog();
00583
00584     // Extra initialization
00585     EnableEditAutoComplete(m_altCvsCombo.GetEditCtrl());
00586     EnableEditAutoComplete(&m_homeEdit);
00587
00588     m_showCvsCombo.AddString("Hidden");
00589     m_showCvsCombo.AddString("Normal Window");
00590     m_showCvsCombo.AddString("Non-active Window");
00591     m_showCvsCombo.AddString("Minimized non-active Window");
00592
00593     m_showCvsCombo.SetCurSel(gCvsPrefs.ShowCvs());
00594
00595     if( m_cvsConsole )
00596     {
00597         m_showCvsCombo.EnableWindow(FALSE);
00598     }
00599
00600     return TRUE;  // return TRUE unless you set the focus to a control
00601     // EXCEPTION: OCX Property Pages should return FALSE
00602 }

Here is the call graph for this function:

void CGetPrefs_CVS::StoreValues ( )

Save the values.

Definition at line 622 of file GetPrefs.cpp.

References gCvsPrefs, m_altCvs, m_cvsConsole, m_didInteract, m_home, m_showCvs, m_useAltCvs, CvsPrefs::SetCvsConsole(), CvsPrefs::SetHome(), CvsPrefs::SetShowCvs(), CvsPrefs::SetWhichCvs(), and SHOWCVS_TYPE.

Referenced by CompatGetPrefs().

00623 {
00624     if( !m_didInteract )
00625         return;
00626
00627     gCvsPrefs.SetHome(m_home);
00628     gCvsPrefs.SetWhichCvs(m_useAltCvs && !m_altCvs.IsEmpty() ? (LPCTSTR)m_altCvs : "");
00629     gCvsPrefs.SetCvsConsole(m_cvsConsole != 0);
00630     gCvsPrefs.SetShowCvs((SHOWCVS_TYPE)m_showCvs);
00631 }

Here is the call graph for this function:

Member Data Documentation

CString CGetPrefs_CVS::m_altCvs

Definition at line 197 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CSmartComboBox CGetPrefs_CVS::m_altCvsCombo

Definition at line 187 of file GetPrefs.h.

Referenced by DoDataExchange(), OnAltcvschk(), and OnAltcvssel().

BOOL CGetPrefs_CVS::m_cvsConsole

Definition at line 195 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CButton CGetPrefs_CVS::m_cvsConsoleCheck

Definition at line 188 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnConsole().

bool CGetPrefs_CVS::m_didInteract [private]

Flag indicating data change Definition at line 222 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CString CGetPrefs_CVS::m_home

Definition at line 193 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CEdit CGetPrefs_CVS::m_homeEdit

Definition at line 192 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnBtnhome().

CButton CGetPrefs_CVS::m_selAltCvsButton

Definition at line 190 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnAltcvschk().

int CGetPrefs_CVS::m_showCvs

Definition at line 196 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CSmartComboBox CGetPrefs_CVS::m_showCvsCombo

Definition at line 189 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnConsole().

BOOL CGetPrefs_CVS::m_useAltCvs

Definition at line 194 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CButton CGetPrefs_CVS::m_useAltCvsCheck

Definition at line 191 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnAltcvschk().

The documentation for this class was generated from the following files:
  • common/GetPrefs.h
  • common/GetPrefs.cpp
Generated on Sat Aug 7 22:52:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGetPrefs_CVSCMD_DIALOGS Class Reference

CGetPrefs_CVSCMD_DIALOGS Class Reference

Command dialogs preferences property page. More...

#include <GetPrefs.h>

Inheritance diagram for CGetPrefs_CVSCMD_DIALOGS:

[legend]
Collaboration diagram for CGetPrefs_CVSCMD_DIALOGS:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_PREFS_CVSCMD_DIALOGS }

Public Member Functions

CGetPrefs_CVSCMD_DIALOGS ()
~CGetPrefs_CVSCMD_DIALOGS ()
void | StoreValues ()
Save the values.

Public Attributes

BOOL | m_hideUpdate
BOOL | m_hideDiff
BOOL | m_hideGraph
BOOL | m_hideLog
int m_keyForce
BOOL | m_hideAnnotate
BOOL | m_hideStatus
BOOL | m_ctrlPressedOnOK
BOOL | m_fileAction

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

bool m_didInteract

Detailed Description

Command dialogs preferences property page.

Definition at line 233 of file GetPrefs.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 246 of file GetPrefs.h.
00246 { IDD = IDD_PREFS_CVSCMD_DIALOGS };

Constructor & Destructor Documentation

CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS ( )

Definition at line 672 of file GetPrefs.cpp.

References CvsPrefs::CtrlPressedOnOK(), gCvsPrefs, CvsPrefs::HideCommandDlgAnnotate(), CvsPrefs::HideCommandDlgDiff(), CvsPrefs::HideCommandDlgFileAction(), CvsPrefs::HideCommandDlgGraph(), CvsPrefs::HideCommandDlgLog(), CvsPrefs::HideCommandDlgStatus(), CvsPrefs::HideCommandDlgUpdate(), and CvsPrefs::HideCommandDlgUseShift().

00673     : CHHelpPropertyPage(CGetPrefs_CVSCMD_DIALOGS::IDD), m_didInteract(false)
00674 {
00675     //{{AFX_DATA_INIT(CGetPrefs_CVSCMD_DIALOGS)
00676     m_hideUpdate = gCvsPrefs.HideCommandDlgUpdate() != 0L;
00677     m_hideDiff = gCvsPrefs.HideCommandDlgDiff() != 0L;
00678     m_hideGraph = gCvsPrefs.HideCommandDlgGraph() != 0L;
00679     m_hideLog = gCvsPrefs.HideCommandDlgLog() != 0L;
00680     m_keyForce = gCvsPrefs.HideCommandDlgUseShift() != 0L ? 0 : 1;
00681     m_hideAnnotate = gCvsPrefs.HideCommandDlgAnnotate() != 0L;
00682     m_hideStatus = gCvsPrefs.HideCommandDlgStatus() != 0L;
00683     m_fileAction = gCvsPrefs.HideCommandDlgFileAction() != 0L;
00684     m_ctrlPressedOnOK = gCvsPrefs.CtrlPressedOnOK() != 0L;
00685     //}}AFX_DATA_INIT
00686 }

Here is the call graph for this function:

CGetPrefs_CVSCMD_DIALOGS::~CGetPrefs_CVSCMD_DIALOGS ( )

Definition at line 688 of file GetPrefs.cpp.

00689 {
00690 }

Member Function Documentation

void CGetPrefs_CVSCMD_DIALOGS::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 692 of file GetPrefs.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_CTRL_PRESSED_ON_OK, IDC_FORCE_KEY_SHIFT, IDC_SKIP_ANNOTATE, IDC_SKIP_DIFF, IDC_SKIP_FILEACTION, IDC_SKIP_GRAPH, IDC_SKIP_LOG, IDC_SKIP_STATUS, IDC_SKIP_UPDATE, m_ctrlPressedOnOK, m_didInteract, m_fileAction, m_hideAnnotate, m_hideDiff, m_hideGraph, m_hideLog, m_hideStatus, m_hideUpdate, and m_keyForce.

00693 {
00694     m_didInteract = true;
00695
00696     CHHelpPropertyPage::DoDataExchange(pDX);
00697     //{{AFX_DATA_MAP(CGetPrefs_CVSCMD_DIALOGS)
00698     DDX_Check(pDX, IDC_SKIP_UPDATE, m_hideUpdate);
00699     DDX_Check(pDX, IDC_SKIP_DIFF, m_hideDiff);
00700     DDX_Check(pDX, IDC_SKIP_GRAPH, m_hideGraph);
00701     DDX_Check(pDX, IDC_SKIP_LOG, m_hideLog);
00702     DDX_Radio(pDX, IDC_FORCE_KEY_SHIFT, m_keyForce);
00703     DDX_Check(pDX, IDC_SKIP_ANNOTATE, m_hideAnnotate);
00704     DDX_Check(pDX, IDC_SKIP_STATUS, m_hideStatus);
00705     DDX_Check(pDX, IDC_CTRL_PRESSED_ON_OK, m_ctrlPressedOnOK);
00706     DDX_Check(pDX, IDC_SKIP_FILEACTION, m_fileAction);
00707     //}}AFX_DATA_MAP
00708 }

Here is the call graph for this function:

void CGetPrefs_CVSCMD_DIALOGS::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 732 of file GetPrefs.cpp.

References IDC_CTRL_PRESSED_ON_OK, IDC_FORCE_KEY_CTRL, IDC_FORCE_KEY_SHIFT, IDC_SKIP_ANNOTATE, IDC_SKIP_DIFF, IDC_SKIP_FILEACTION, IDC_SKIP_GRAPH, IDC_SKIP_LOG, IDC_SKIP_STATUS, IDC_SKIP_UPDATE, IDH_IDC_CTRL_PRESSED_ON_OK, IDH_IDC_FORCE_KEY_CTRL, IDH_IDC_FORCE_KEY_SHIFT, IDH_IDC_SKIP_ANNOTATE, IDH_IDC_SKIP_DIFF, IDH_IDC_SKIP_FILEACTION, IDH_IDC_SKIP_GRAPH, IDH_IDC_SKIP_LOG, IDH_IDC_SKIP_STATUS, and IDH_IDC_SKIP_UPDATE.

00733 {
00734     SetCtrlHelpID(IDC_SKIP_UPDATE,          IDH_IDC_SKIP_UPDATE);
00735     SetCtrlHelpID(IDC_SKIP_DIFF,            IDH_IDC_SKIP_DIFF);
00736     SetCtrlHelpID(IDC_SKIP_GRAPH,           IDH_IDC_SKIP_GRAPH);
00737     SetCtrlHelpID(IDC_SKIP_LOG,             IDH_IDC_SKIP_LOG);
00738     SetCtrlHelpID(IDC_SKIP_ANNOTATE,        IDH_IDC_SKIP_ANNOTATE);
00739     SetCtrlHelpID(IDC_SKIP_STATUS,          IDH_IDC_SKIP_STATUS);
00740     SetCtrlHelpID(IDC_SKIP_FILEACTION,      IDH_IDC_SKIP_FILEACTION);
00741     SetCtrlHelpID(IDC_FORCE_KEY_SHIFT,      IDH_IDC_FORCE_KEY_SHIFT);
00742     SetCtrlHelpID(IDC_FORCE_KEY_CTRL,       IDH_IDC_FORCE_KEY_CTRL);
00743     SetCtrlHelpID(IDC_CTRL_PRESSED_ON_OK,   IDH_IDC_CTRL_PRESSED_ON_OK);
00744 }

void CGetPrefs_CVSCMD_DIALOGS::StoreValues ( )

Save the values.

Definition at line 711 of file GetPrefs.cpp.

References gCvsPrefs, m_ctrlPressedOnOK, m_didInteract, m_fileAction, m_hideAnnotate, m_hideDiff, m_hideGraph, m_hideLog, m_hideStatus, m_hideUpdate, m_keyForce, CvsPrefs::SetCtrlPressedOnOK(), CvsPrefs::SetHideCommandDlgAnnotate(), CvsPrefs::SetHideCommandDlgDiff(), CvsPrefs::SetHideCommandDlgFileAction(), CvsPrefs::SetHideCommandDlgGraph(), CvsPrefs::SetHideCommandDlgLog(), CvsPrefs::SetHideCommandDlgStatus(), CvsPrefs::SetHideCommandDlgUpdate(), and CvsPrefs::SetHideCommandDlgUseShift().

Referenced by CompatGetPrefs().

00712 {
00713     if( !m_didInteract )
00714         return;
00715
00716     gCvsPrefs.SetHideCommandDlgUpdate(m_hideUpdate ? true : false);
00717     gCvsPrefs.SetHideCommandDlgDiff(m_hideDiff ? true : false);
00718     gCvsPrefs.SetHideCommandDlgGraph(m_hideGraph ? true : false);
00719     gCvsPrefs.SetHideCommandDlgAnnotate(m_hideAnnotate ? true : false);
00720     gCvsPrefs.SetHideCommandDlgLog(m_hideLog ? true : false);
00721     gCvsPrefs.SetHideCommandDlgStatus(m_hideStatus ? true : false);
00722     gCvsPrefs.SetHideCommandDlgFileAction(m_fileAction ? true : false);
00723     gCvsPrefs.SetHideCommandDlgUseShift(m_keyForce == 0);
00724     gCvsPrefs.SetCtrlPressedOnOK(m_ctrlPressedOnOK ? true : false);
00725 }

Here is the call graph for this function:

Member Data Documentation

BOOL CGetPrefs_CVSCMD_DIALOGS::m_ctrlPressedOnOK

Definition at line 254 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

bool CGetPrefs_CVSCMD_DIALOGS::m_didInteract [private]

Flag indicating data change Definition at line 275 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_CVSCMD_DIALOGS::m_fileAction

Definition at line 255 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_CVSCMD_DIALOGS::m_hideAnnotate

Definition at line 252 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_CVSCMD_DIALOGS::m_hideDiff

Definition at line 248 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_CVSCMD_DIALOGS::m_hideGraph

Definition at line 249 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_CVSCMD_DIALOGS::m_hideLog

Definition at line 250 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_CVSCMD_DIALOGS::m_hideStatus

Definition at line 253 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_CVSCMD_DIALOGS::m_hideUpdate

Definition at line 247 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

int CGetPrefs_CVSCMD_DIALOGS::m_keyForce

Definition at line 251 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

The documentation for this class was generated from the following files:
  • common/GetPrefs.h
  • common/GetPrefs.cpp
Generated on Sat Aug 7 22:52:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGetPrefs_GLOBALS Class Reference

CGetPrefs_GLOBALS Class Reference

Global preferences property page. More...

#include <GetPrefs.h>

Inheritance diagram for CGetPrefs_GLOBALS:

[legend]
Collaboration diagram for CGetPrefs_GLOBALS:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_PREFS_GLOBALS }

Public Member Functions

CGetPrefs_GLOBALS ()
~CGetPrefs_GLOBALS ()
void | StoreValues ()
Save the values.

Public Attributes

CSpinButtonCtrl | m_logoutSpinButton
CEdit | m_logoutEdit
CButton | m_logoutCheck
CSpinButtonCtrl | m_zspinSpinButton
CEdit | m_zlevelEdit
CButton | m_tcpipCheck
BOOL | m_checkoutro
BOOL | m_prune
BOOL | m_tcpip
BOOL | m_quiet
BOOL | m_cntladd
BOOL | m_alwaysroot
BOOL | m_logout
BOOL | m_unixlf
UINT | m_zlevel
BOOL | m_disableSplashScreen
UINT | m_logoutTime
BOOL | m_matchEntriesCase
BOOL | m_encryptCommunication

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnLogout ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnCheckunixlf ()
BN_CLICKED message handler, display the warning about changing the line endings.
afx_msg void | OnTcpip ()
BN_CLICKED message handler, enable controls.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, setup help IDs and spin controls.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

bool m_didInteract

Detailed Description

Global preferences property page.

Definition at line 44 of file GetPrefs.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 55 of file GetPrefs.h.
00055 { IDD = IDD_PREFS_GLOBALS };

Constructor & Destructor Documentation

CGetPrefs_GLOBALS::CGetPrefs_GLOBALS ( )

Definition at line 130 of file GetPrefs.cpp.

References CvsPrefs::AddControl(), CvsPrefs::AlwaysUseCvsroot(), CvsPrefs::CheckoutRO(), CvsPrefs::DisableSplashScreen(), CvsPrefs::EncryptCommunication(), gCvsPrefs, CvsPrefs::LogoutTimeOut(), CvsPrefs::MatchEntriesCase(), CvsPrefs::PruneOption(), CvsPrefs::QuietOption(), CvsPrefs::UnixLF(), CvsPrefs::Z9Option(), and CvsPrefs::ZLevel().

00131     : CHHelpPropertyPage(CGetPrefs_GLOBALS::IDD), m_didInteract(false)
00132 {
00133     //{{AFX_DATA_INIT(CGetPrefs_GLOBALS)
00134     m_checkoutro = gCvsPrefs.CheckoutRO();
00135     m_prune = gCvsPrefs.PruneOption();
00136     m_tcpip = gCvsPrefs.Z9Option();
00137     m_quiet = gCvsPrefs.QuietOption();
00138     m_cntladd = gCvsPrefs.AddControl();
00139     m_alwaysroot = gCvsPrefs.AlwaysUseCvsroot();
00140     m_logout = gCvsPrefs.LogoutTimeOut() > 0;
00141     m_unixlf = gCvsPrefs.UnixLF();
00142     m_zlevel = gCvsPrefs.ZLevel();
00143     m_disableSplashScreen = gCvsPrefs.DisableSplashScreen();
00144     m_logoutTime = gCvsPrefs.LogoutTimeOut();
00145     m_matchEntriesCase = gCvsPrefs.MatchEntriesCase();
00146     m_encryptCommunication = gCvsPrefs.EncryptCommunication();
00147     //}}AFX_DATA_INIT
00148 }

Here is the call graph for this function:

CGetPrefs_GLOBALS::~CGetPrefs_GLOBALS ( )

Definition at line 150 of file GetPrefs.cpp.

00151 {
00152 }

Member Function Documentation

void CGetPrefs_GLOBALS::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 154 of file GetPrefs.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_ALWAYSROOT, IDC_AUTO_LOGOUT, IDC_AUTO_LOGOUT_TIME, IDC_CHECKOUT_READ_ONLY, IDC_COMPRESSION, IDC_CONTROL_ADDED_FILES, IDC_ENCRYPTION, IDC_HAS_COMPRESSION, IDC_MATCH_ENTRIES_CASE, IDC_NO_SPLASH_SCREEN, IDC_PRUNE_EMPTY_DIR, IDC_QUIET, IDC_SPIN_AUTO_LOGOUT_TIME, IDC_SPIN_COMPRESSION, IDC_UNIX_LF, m_alwaysroot, m_checkoutro, m_cntladd, m_didInteract, m_disableSplashScreen, m_encryptCommunication, m_logout, m_logoutCheck, m_logoutEdit, m_logoutSpinButton, m_logoutTime, m_matchEntriesCase, m_prune, m_quiet, m_tcpip, m_tcpipCheck, m_unixlf, m_zlevel, m_zlevelEdit, m_zspinSpinButton, OnLogout(), and OnTcpip().

00155 {
00156     m_didInteract = true;
00157
00158     CHHelpPropertyPage::DoDataExchange(pDX);
00159
00160     //{{AFX_DATA_MAP(CGetPrefs_GLOBALS)
00161     DDX_Control(pDX, IDC_SPIN_AUTO_LOGOUT_TIME, m_logoutSpinButton);
00162     DDX_Control(pDX, IDC_AUTO_LOGOUT_TIME, m_logoutEdit);
00163     DDX_Control(pDX, IDC_AUTO_LOGOUT, m_logoutCheck);
00164     DDX_Control(pDX, IDC_SPIN_COMPRESSION, m_zspinSpinButton);
00165     DDX_Control(pDX, IDC_COMPRESSION, m_zlevelEdit);
00166     DDX_Control(pDX, IDC_HAS_COMPRESSION, m_tcpipCheck);
00167     DDX_Check(pDX, IDC_CHECKOUT_READ_ONLY, m_checkoutro);
00168     DDX_Check(pDX, IDC_PRUNE_EMPTY_DIR, m_prune);
00169     DDX_Check(pDX, IDC_HAS_COMPRESSION, m_tcpip);
00170     DDX_Check(pDX, IDC_QUIET, m_quiet);
00171     DDX_Check(pDX, IDC_CONTROL_ADDED_FILES, m_cntladd);
00172     DDX_Check(pDX, IDC_ALWAYSROOT, m_alwaysroot);
00173     DDX_Check(pDX, IDC_AUTO_LOGOUT, m_logout);
00174     DDX_Check(pDX, IDC_UNIX_LF, m_unixlf);
00175     DDX_Text(pDX, IDC_COMPRESSION, m_zlevel);
00176     DDV_MinMaxUInt(pDX, m_zlevel, 1, 9);
00177     DDX_Check(pDX, IDC_NO_SPLASH_SCREEN, m_disableSplashScreen);
00178     DDX_Text(pDX, IDC_AUTO_LOGOUT_TIME, m_logoutTime);
00179     DDV_MinMaxUInt(pDX, m_logoutTime, 0, 999999);
00180     DDX_Check(pDX, IDC_MATCH_ENTRIES_CASE, m_matchEntriesCase);
00181     DDX_Check(pDX, IDC_ENCRYPTION, m_encryptCommunication);
00182     //}}AFX_DATA_MAP
00183
00184     if( !pDX->m_bSaveAndValidate )
00185     {
00186         OnTcpip();
00187         OnLogout();
00188     }
00189 }

Here is the call graph for this function:

void CGetPrefs_GLOBALS::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 245 of file GetPrefs.cpp.

References IDC_AUTO_LOGOUT, IDC_AUTO_LOGOUT_TIME, IDC_CHECKOUT_READ_ONLY, IDC_COMPRESSION, IDC_CONTROL_ADDED_FILES, IDC_ENCRYPTION, IDC_HAS_COMPRESSION, IDC_MATCH_ENTRIES_CASE, IDC_NO_SPLASH_SCREEN, IDC_PRUNE_EMPTY_DIR, IDC_QUIET, IDC_SPIN_AUTO_LOGOUT_TIME, IDC_SPIN_COMPRESSION, IDC_UNIX_LF, IDH_IDC_AUTO_LOGOUT, IDH_IDC_AUTO_LOGOUT_TIME, IDH_IDC_CHECKOUT_READ_ONLY, IDH_IDC_COMPRESSION, IDH_IDC_CONTROL_ADDED_FILES, IDH_IDC_ENCRYPTION, IDH_IDC_HAS_COMPRESSION, IDH_IDC_MATCH_ENTRIES_CASE, IDH_IDC_NO_SPLASH_SCREEN, IDH_IDC_PRUNE_EMPTY_DIR, IDH_IDC_QUIET, IDH_IDC_SPIN_AUTO_LOGOUT_TIME, IDH_IDC_SPIN_COMPRESSION, IDH_IDC_UNIX_LF, and CHHelpSupport::SetCtrlHelpID().

00246 {
00247     SetCtrlHelpID(IDC_CHECKOUT_READ_ONLY,       IDH_IDC_CHECKOUT_READ_ONLY);
00248     SetCtrlHelpID(IDC_QUIET,                    IDH_IDC_QUIET);
00249     SetCtrlHelpID(IDC_PRUNE_EMPTY_DIR,          IDH_IDC_PRUNE_EMPTY_DIR);
00250     SetCtrlHelpID(IDC_HAS_COMPRESSION,          IDH_IDC_HAS_COMPRESSION);
00251     SetCtrlHelpID(IDC_COMPRESSION,              IDH_IDC_COMPRESSION);
00252     SetCtrlHelpID(IDC_SPIN_COMPRESSION,         IDH_IDC_SPIN_COMPRESSION);
00253     SetCtrlHelpID(IDC_ENCRYPTION,               IDH_IDC_ENCRYPTION);
00254     SetCtrlHelpID(IDC_UNIX_LF,                  IDH_IDC_UNIX_LF);
00255     SetCtrlHelpID(IDC_NO_SPLASH_SCREEN,         IDH_IDC_NO_SPLASH_SCREEN);
00256     SetCtrlHelpID(IDC_CONTROL_ADDED_FILES,      IDH_IDC_CONTROL_ADDED_FILES);
00257     SetCtrlHelpID(IDC_MATCH_ENTRIES_CASE,       IDH_IDC_MATCH_ENTRIES_CASE);
00258     SetCtrlHelpID(IDC_AUTO_LOGOUT,              IDH_IDC_AUTO_LOGOUT);
00259     SetCtrlHelpID(IDC_AUTO_LOGOUT_TIME,         IDH_IDC_AUTO_LOGOUT_TIME);
00260     SetCtrlHelpID(IDC_SPIN_AUTO_LOGOUT_TIME,    IDH_IDC_SPIN_AUTO_LOGOUT_TIME);
00261 }

Here is the call graph for this function:

void CGetPrefs_GLOBALS::OnCheckunixlf ( ) [protected]

BN_CLICKED message handler, display the warning about changing the line endings.

Definition at line 278 of file GetPrefs.cpp.

References kCvsAlertNoteIcon.

00279 {
00280     CvsAlert(kCvsAlertNoteIcon, "File-translation mode change.",
00281         "Be careful when using this option!\n"
00282         "You can't use WinCvs in both modes - you have to use either Unix or DOS line feeds. "
00283         "If you experience some problems try to remove the global CVS files (such as .cvspass) because "
00284         "they probably don't match the new line feeds setting.").ShowAlert();
00285 }

BOOL CGetPrefs_GLOBALS::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, setup help IDs and spin controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 230 of file GetPrefs.cpp.

References CHHelpPropertyPage::OnInitDialog().

00231 {
00232     CHHelpPropertyPage::OnInitDialog();
00233
00234     // Extra initialization
00235     m_logoutSpinButton.SetBase(10);
00236     m_logoutSpinButton.SetRange(0, 30000);
00237
00238     m_zspinSpinButton.SetBase(1);
00239     m_zspinSpinButton.SetRange(1, 9);
00240
00241     return TRUE;  // return TRUE unless you set the focus to a control
00242                   // EXCEPTION: OCX Property Pages should return FALSE
00243 }

Here is the call graph for this function:

void CGetPrefs_GLOBALS::OnLogout ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 271 of file GetPrefs.cpp.

References m_logoutCheck, m_logoutEdit, and m_logoutSpinButton.

Referenced by DoDataExchange().

00272 {
00273     m_logoutEdit.EnableWindow(m_logoutCheck.GetCheck() != 0);
00274     m_logoutSpinButton.EnableWindow(m_logoutCheck.GetCheck() != 0);
00275 }

void CGetPrefs_GLOBALS::OnTcpip ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 264 of file GetPrefs.cpp.

References m_tcpipCheck, m_zlevelEdit, and m_zspinSpinButton.

Referenced by DoDataExchange().

00265 {
00266     m_zlevelEdit.EnableWindow(m_tcpipCheck.GetCheck() != 0);
00267     m_zspinSpinButton.EnableWindow(m_tcpipCheck.GetCheck() != 0);
00268 }

void CGetPrefs_GLOBALS::StoreValues ( )

Save the values.

Definition at line 192 of file GetPrefs.cpp.

References gCvsPrefs, CWincvsApp::GetFileView(), m_alwaysroot, m_checkoutro, m_cntladd, m_didInteract, m_disableSplashScreen, m_encryptCommunication, m_logout, m_logoutTime, m_matchEntriesCase, m_prune, m_quiet, m_tcpip, m_unixlf, m_zlevel, CvsPrefs::MatchEntriesCase(), CBrowseFileView::ResetView(), CvsPrefs::SetAddControl(), CvsPrefs::SetAlwaysUseCvsroot(), CvsPrefs::SetCheckoutRO(), CvsPrefs::SetDisableSplashScreen(), CvsPrefs::SetEncryptCommunication(), CvsPrefs::SetLogoutTimeOut(), CvsPrefs::SetMatchEntriesCase(), CvsPrefs::SetPruneOption(), CvsPrefs::SetQuietOption(), CvsPrefs::SetUnixLF(), CvsPrefs::SetZ9Option(), and CvsPrefs::SetZLevel().

Referenced by CompatGetAdminOptions(), CompatGetAnnotate(), CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetDiff(), CompatGetFileAction(), CompatGetImport(), CompatGetInit(), CompatGetLog(), CompatGetLogin(), CompatGetPrefs(), CompatGetRelease(), CompatGetRtag(), CompatGetStatus(), CompatGetTag(), and CompatGetUpdate().

00193 {
00194     if( !m_didInteract )
00195         return;
00196
00197     bool needsRefresh = gCvsPrefs.MatchEntriesCase() != (m_matchEntriesCase != 0);
00198
00199     gCvsPrefs.SetCheckoutRO(m_checkoutro ? true : false);
00200     gCvsPrefs.SetPruneOption(m_prune ? true : false);
00201     gCvsPrefs.SetZ9Option(m_tcpip ? true : false);
00202     gCvsPrefs.SetQuietOption(m_quiet ? true : false);
00203     gCvsPrefs.SetAddControl(m_cntladd ? true : false);
00204     gCvsPrefs.SetAlwaysUseCvsroot(m_alwaysroot ? true : false);
00205     gCvsPrefs.SetLogoutTimeOut(m_logout ? (int)m_logoutTime : 0);
00206     gCvsPrefs.SetUnixLF(m_unixlf != 0);
00207     gCvsPrefs.SetZLevel(m_zlevel);
00208     gCvsPrefs.SetDisableSplashScreen(m_disableSplashScreen ? true : false);
00209     gCvsPrefs.SetMatchEntriesCase(m_matchEntriesCase ? true : false);
00210     gCvsPrefs.SetEncryptCommunication(m_encryptCommunication ? true : false);
00211
00212     if( needsRefresh )
00213     {
00214         if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
00215         {
00216             app->GetFileView()->ResetView(true);
00217         }
00218     }
00219 }

Here is the call graph for this function:

Member Data Documentation

BOOL CGetPrefs_GLOBALS::m_alwaysroot

Definition at line 67 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_checkoutro

Definition at line 62 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_cntladd

Definition at line 66 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

bool CGetPrefs_GLOBALS::m_didInteract [private]

Flag indicating data change Definition at line 98 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_disableSplashScreen

Definition at line 71 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_encryptCommunication

Definition at line 74 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_logout

Definition at line 68 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CButton CGetPrefs_GLOBALS::m_logoutCheck

Definition at line 58 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnLogout().

CEdit CGetPrefs_GLOBALS::m_logoutEdit

Definition at line 57 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnLogout().

CSpinButtonCtrl CGetPrefs_GLOBALS::m_logoutSpinButton

Definition at line 56 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnLogout().

UINT CGetPrefs_GLOBALS::m_logoutTime

Definition at line 72 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_matchEntriesCase

Definition at line 73 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_prune

Definition at line 63 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_quiet

Definition at line 65 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

BOOL CGetPrefs_GLOBALS::m_tcpip

Definition at line 64 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CButton CGetPrefs_GLOBALS::m_tcpipCheck

Definition at line 61 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnTcpip().

BOOL CGetPrefs_GLOBALS::m_unixlf

Definition at line 69 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

UINT CGetPrefs_GLOBALS::m_zlevel

Definition at line 70 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CEdit CGetPrefs_GLOBALS::m_zlevelEdit

Definition at line 60 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnTcpip().

CSpinButtonCtrl CGetPrefs_GLOBALS::m_zspinSpinButton

Definition at line 59 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnTcpip().

The documentation for this class was generated from the following files:
  • common/GetPrefs.h
  • common/GetPrefs.cpp
Generated on Sat Aug 7 22:52:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGetPrefs_WINCVS Class Reference

CGetPrefs_WINCVS Class Reference

WinCvs preferences property page. More...

#include <GetPrefs.h>

Inheritance diagram for CGetPrefs_WINCVS:

[legend]
Collaboration diagram for CGetPrefs_WINCVS:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_PREFS_WINCVS }

Public Member Functions

CGetPrefs_WINCVS ()
~CGetPrefs_WINCVS ()
void | StoreValues ()
Save the values.

Public Attributes

CEdit | m_pythonDllEdit
CEdit | m_tclDllEdit
CEdit | m_viewerEdit
CButton | m_extDiffSelButton
CEdit | m_diffProgEdit
CButton | m_useExtDiffCheck
CEdit | m_settingsFolderEdit
CButton | m_settingsFolderButton
CButton | m_useSettingsFolderCheck
CString | m_viewer
BOOL | m_useExtDiff
CString | m_diffProg
BOOL | m_useSettingsFolder
CString | m_settingsFolder
CString | m_tclDll
CString | m_pythonDll

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnBtnviewer ()
BN_CLICKED message handler, change default viewer used to open files.
afx_msg void | OnExtdiffsel ()
BN_CLICKED message handler, change external diff program.
afx_msg void | OnExtdiff ()
BN_CLICKED message handler, enable to change external diff program.
afx_msg void | OnAltsettingschk ()
BN_CLICKED message handler, enable to change settings folder.
afx_msg void | OnBtnsettings ()
BN_CLICKED message handler, change settings folder.
afx_msg void | OnTcldllsel ()
BN_CLICKED message handler, select TCL DLL path.
afx_msg void | OnPythondllsel ()
BN_CLICKED message handler, select Python DLL path.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, setup autocomplete and help IDs.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

bool m_didInteract

Detailed Description

WinCvs preferences property page.

Definition at line 109 of file GetPrefs.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 120 of file GetPrefs.h.
00120 { IDD = IDD_PREFS_WINCVS };

Constructor & Destructor Documentation

CGetPrefs_WINCVS::CGetPrefs_WINCVS ( )

Definition at line 290 of file GetPrefs.cpp.

References CvsPrefs::ExtDiff(), gCvsPrefs, CvsPrefs::PythonLibrary(), CvsPrefs::SettingsFolder(), CvsPrefs::TclLibrary(), and CvsPrefs::Viewer().

00291     : CHHelpPropertyPage(CGetPrefs_WINCVS::IDD), m_didInteract(false)
00292 {
00293     //{{AFX_DATA_INIT(CGetPrefs_WINCVS)
00294     m_viewer = gCvsPrefs.Viewer() != 0L ? gCvsPrefs.Viewer() : "";
00295     m_useExtDiff = gCvsPrefs.ExtDiff() != 0L;
00296     m_diffProg = gCvsPrefs.ExtDiff();
00297     m_useSettingsFolder = gCvsPrefs.SettingsFolder() != 0L;
00298     m_settingsFolder = gCvsPrefs.SettingsFolder() != 0L ? gCvsPrefs.SettingsFolder() : "";
00299     m_tclDll = gCvsPrefs.TclLibrary() != 0L ? gCvsPrefs.TclLibrary() : "";
00300     m_pythonDll = gCvsPrefs.PythonLibrary() != 0L ? gCvsPrefs.PythonLibrary() : "";
00301     //}}AFX_DATA_INIT
00302 }

Here is the call graph for this function:

CGetPrefs_WINCVS::~CGetPrefs_WINCVS ( )

Definition at line 304 of file GetPrefs.cpp.

00305 {
00306 }

Member Function Documentation

void CGetPrefs_WINCVS::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 308 of file GetPrefs.cpp.

References DDV_CheckPathExists(), DDV_MinChars(), CHHelpPropertyPage::DoDataExchange(), IDC_ALTERNATE_SETTINGS, IDC_BROWSE_ALTERNATE_SETTINGS, IDC_BROWSE_EXTERNAL_DIFF, IDC_EXTERNAL_DIFF, IDC_EXTERNAL_EDITOR, IDC_HAS_ALTERNATE_SETTINGS, IDC_HAS_EXTERNAL_DIFF, IDC_PYTHONDLL, IDC_TCLDLL, m_didInteract, m_diffProg, m_diffProgEdit, m_extDiffSelButton, m_pythonDll, m_pythonDllEdit, m_settingsFolder, m_settingsFolderButton, m_settingsFolderEdit, m_tclDll, m_tclDllEdit, m_useExtDiff, m_useExtDiffCheck, m_useSettingsFolder, m_useSettingsFolderCheck, m_viewer, m_viewerEdit, OnAltsettingschk(), and OnExtdiff().

00309 {
00310     m_didInteract = true;
00311
00312     CHHelpPropertyPage::DoDataExchange(pDX);
00313
00314     //{{AFX_DATA_MAP(CGetPrefs_WINCVS)
00315     DDX_Control(pDX, IDC_PYTHONDLL, m_pythonDllEdit);
00316     DDX_Control(pDX, IDC_TCLDLL, m_tclDllEdit);
00317     DDX_Control(pDX, IDC_EXTERNAL_EDITOR, m_viewerEdit);
00318     DDX_Control(pDX, IDC_BROWSE_EXTERNAL_DIFF, m_extDiffSelButton);
00319     DDX_Control(pDX, IDC_EXTERNAL_DIFF, m_diffProgEdit);
00320     DDX_Control(pDX, IDC_HAS_EXTERNAL_DIFF, m_useExtDiffCheck);
00321     DDX_Control(pDX, IDC_ALTERNATE_SETTINGS, m_settingsFolderEdit);
00322     DDX_Control(pDX, IDC_BROWSE_ALTERNATE_SETTINGS, m_settingsFolderButton);
00323     DDX_Control(pDX, IDC_HAS_ALTERNATE_SETTINGS, m_useSettingsFolderCheck);
00324     DDX_Text(pDX, IDC_EXTERNAL_EDITOR, m_viewer);
00325     DDX_Check(pDX, IDC_HAS_EXTERNAL_DIFF, m_useExtDiff);
00326     DDX_Text(pDX, IDC_EXTERNAL_DIFF, m_diffProg);
00327     DDX_Check(pDX, IDC_HAS_ALTERNATE_SETTINGS, m_useSettingsFolder);
00328     DDX_Text(pDX, IDC_ALTERNATE_SETTINGS, m_settingsFolder);
00329     DDX_Text(pDX, IDC_TCLDLL, m_tclDll);
00330     DDX_Text(pDX, IDC_PYTHONDLL, m_pythonDll);
00331     //}}AFX_DATA_MAP
00332
00333     if( m_useSettingsFolder )
00334     {
00335         DDV_MinChars(pDX, m_settingsFolder, 1);
00336         DDV_CheckPathExists(pDX, IDC_ALTERNATE_SETTINGS, m_settingsFolder);
00337     }
00338
00339     if( !pDX->m_bSaveAndValidate )
00340     {
00341         OnExtdiff();
00342         OnAltsettingschk();
00343     }
00344 }

Here is the call graph for this function:

void CGetPrefs_WINCVS::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 399 of file GetPrefs.cpp.

References IDC_ALTERNATE_SETTINGS, IDC_BROWSE_ALTERNATE_SETTINGS, IDC_BROWSE_EXTERNAL_DIFF, IDC_BROWSE_EXTERNAL_EDITOR, IDC_BROWSE_PYTHONDLL, IDC_BROWSE_TCLDLL, IDC_EXTERNAL_DIFF, IDC_EXTERNAL_EDITOR, IDC_HAS_ALTERNATE_SETTINGS, IDC_HAS_EXTERNAL_DIFF, IDC_PYTHONDLL, IDC_TCLDLL, IDH_IDC_ALTERNATE_SETTINGS, IDH_IDC_BROWSE_FILENAME, IDH_IDC_EXTERNAL_DIFF, IDH_IDC_EXTERNAL_EDITOR, IDH_IDC_HAS_ALTERNATE_SETTINGS, IDH_IDC_HAS_EXTERNAL_DIFF, IDH_IDC_PYTHONDLL, IDH_IDC_TCLDLL, and CHHelpSupport::SetCtrlHelpID().

00400 {
00401     SetCtrlHelpID(IDC_HAS_EXTERNAL_DIFF,            IDH_IDC_HAS_EXTERNAL_DIFF);
00402     SetCtrlHelpID(IDC_EXTERNAL_DIFF,                IDH_IDC_EXTERNAL_DIFF);
00403     SetCtrlHelpID(IDC_BROWSE_EXTERNAL_DIFF,         IDH_IDC_BROWSE_FILENAME);
00404     SetCtrlHelpID(IDC_EXTERNAL_EDITOR,              IDH_IDC_EXTERNAL_EDITOR);
00405     SetCtrlHelpID(IDC_BROWSE_EXTERNAL_EDITOR,       IDH_IDC_BROWSE_FILENAME);
00406     SetCtrlHelpID(IDC_PYTHONDLL,                    IDH_IDC_PYTHONDLL);
00407     SetCtrlHelpID(IDC_BROWSE_PYTHONDLL,             IDH_IDC_BROWSE_FILENAME);
00408     SetCtrlHelpID(IDC_TCLDLL,                       IDH_IDC_TCLDLL);
00409     SetCtrlHelpID(IDC_BROWSE_TCLDLL,                IDH_IDC_BROWSE_FILENAME);
00410     SetCtrlHelpID(IDC_HAS_ALTERNATE_SETTINGS,       IDH_IDC_HAS_ALTERNATE_SETTINGS);
00411     SetCtrlHelpID(IDC_ALTERNATE_SETTINGS,           IDH_IDC_ALTERNATE_SETTINGS);
00412     SetCtrlHelpID(IDC_BROWSE_ALTERNATE_SETTINGS,    IDH_IDC_BROWSE_FILENAME);
00413 }

Here is the call graph for this function:

void CGetPrefs_WINCVS::OnAltsettingschk ( ) [protected]

BN_CLICKED message handler, enable to change settings folder.

Definition at line 475 of file GetPrefs.cpp.

References CStr, FormatDefaultSettingsLoc(), m_settingsFolderButton, m_settingsFolderEdit, and m_useSettingsFolderCheck.

Referenced by DoDataExchange().

00476 {
00477     const bool useSettingsFolder = m_useSettingsFolderCheck.GetCheck() != 0;
00478
00479     m_settingsFolderEdit.EnableWindow(useSettingsFolder);
00480     m_settingsFolderButton.EnableWindow(useSettingsFolder);
00481
00482     if( useSettingsFolder )
00483     {
00484         CString strSettingsFolder;
00485         m_settingsFolderEdit.GetWindowText(strSettingsFolder);
00486
00487         if( strSettingsFolder.IsEmpty() )
00488         {
00489             CStr settingsFolder;
00490             if( FormatDefaultSettingsLoc(settingsFolder) )
00491             {
00492                 m_settingsFolderEdit.SetWindowText(settingsFolder);
00493             }
00494         }
00495     }
00496 }

Here is the call graph for this function:

void CGetPrefs_WINCVS::OnBtnsettings ( ) [protected]

BN_CLICKED message handler, change settings folder.

Definition at line 499 of file GetPrefs.cpp.

References BrowserGetDirectory(), CStr, m_settingsFolderEdit, and NULL.

00500 {
00501     CString strSettingsFolder;
00502     m_settingsFolderEdit.GetWindowText(strSettingsFolder);
00503
00504     CStr settingsFolder(strSettingsFolder);
00505     if( BrowserGetDirectory("Select the settings directory", settingsFolder, IsWindow(m_hWnd) ? this : NULL) )
00506     {
00507         m_settingsFolderEdit.SetWindowText(settingsFolder);
00508     }
00509 }

Here is the call graph for this function:

void CGetPrefs_WINCVS::OnBtnviewer ( ) [protected]

BN_CLICKED message handler, change default viewer used to open files.

Definition at line 416 of file GetPrefs.cpp.

References BrowseForFile(), CStr, kSelectExecutable, and m_viewerEdit.

00417 {
00418     CString viewerPath;
00419     m_viewerEdit.GetWindowText(viewerPath);
00420
00421     CStr fullpath = viewerPath;
00422     if( BrowseForFile("Select the viewer application", kSelectExecutable, fullpath) )
00423     {
00424         m_viewerEdit.SetWindowText(fullpath);
00425     }
00426 }

Here is the call graph for this function:

void CGetPrefs_WINCVS::OnExtdiff ( ) [protected]

BN_CLICKED message handler, enable to change external diff program.

Definition at line 468 of file GetPrefs.cpp.

References m_diffProgEdit, m_extDiffSelButton, and m_useExtDiffCheck.

Referenced by DoDataExchange().

00469 {
00470     m_diffProgEdit.EnableWindow(m_useExtDiffCheck.GetCheck() != 0);
00471     m_extDiffSelButton.EnableWindow(m_useExtDiffCheck.GetCheck() != 0);
00472 }

void CGetPrefs_WINCVS::OnExtdiffsel ( ) [protected]

BN_CLICKED message handler, change external diff program.

Definition at line 429 of file GetPrefs.cpp.

References BrowseForFile(), CStr, kSelectExecutable, and m_diffProgEdit.

00430 {
00431     CString diffProg;
00432     m_diffProgEdit.GetWindowText(diffProg);
00433
00434     CStr fullpath = diffProg;
00435     if( BrowseForFile("Select the external diff application", kSelectExecutable, fullpath) )
00436     {
00437         m_diffProgEdit.SetWindowText(fullpath);
00438     }
00439 }

Here is the call graph for this function:

BOOL CGetPrefs_WINCVS::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, setup autocomplete and help IDs.

Reimplemented from CHHelpPropertyPage.

Definition at line 384 of file GetPrefs.cpp.

References EnableEditAutoComplete(), and CHHelpPropertyPage::OnInitDialog().

00385 {
00386     CHHelpPropertyPage::OnInitDialog();
00387
00388     // Extra initialization
00389     EnableEditAutoComplete(&m_pythonDllEdit);
00390     EnableEditAutoComplete(&m_tclDllEdit);
00391     EnableEditAutoComplete(&m_viewerEdit);
00392     EnableEditAutoComplete(&m_diffProgEdit);
00393     EnableEditAutoComplete(&m_settingsFolderEdit);
00394
00395     return TRUE;  // return TRUE unless you set the focus to a control
00396     // EXCEPTION: OCX Property Pages should return FALSE
00397 }

Here is the call graph for this function:

void CGetPrefs_WINCVS::OnPythondllsel ( ) [protected]

BN_CLICKED message handler, select Python DLL path.

Definition at line 455 of file GetPrefs.cpp.

References BrowseForFile(), CStr, kSelectDll, and m_pythonDllEdit.

00456 {
00457     CString pythonDll;
00458     m_pythonDllEdit.GetWindowText(pythonDll);
00459
00460     CStr fullpath = pythonDll;
00461     if( BrowseForFile("Select the Python DLL", kSelectDll, fullpath) )
00462     {
00463         m_pythonDllEdit.SetWindowText(fullpath);
00464     }
00465 }

Here is the call graph for this function:

void CGetPrefs_WINCVS::OnTcldllsel ( ) [protected]

BN_CLICKED message handler, select TCL DLL path.

Definition at line 442 of file GetPrefs.cpp.

References BrowseForFile(), CStr, kSelectDll, and m_tclDllEdit.

00443 {
00444     CString tclDll;
00445     m_tclDllEdit.GetWindowText(tclDll);
00446
00447     CStr fullpath = tclDll;
00448     if( BrowseForFile("Select the TCL DLL", kSelectDll, fullpath) )
00449     {
00450         m_tclDllEdit.SetWindowText(fullpath);
00451     }
00452 }

Here is the call graph for this function:

void CGetPrefs_WINCVS::StoreValues ( )

Save the values.

Definition at line 347 of file GetPrefs.cpp.

References gCvsPrefs, m_didInteract, m_diffProg, m_pythonDll, m_settingsFolder, m_tclDll, m_useExtDiff, m_useSettingsFolder, m_viewer, CvsPrefs::PythonLibrary(), CWincvsApp::RestartScriptEngine(), CvsPrefs::SetExtDiff(), CvsPrefs::SetPythonLibrary(), CvsPrefs::SetSettingsFolder(), CvsPrefs::SetTclLibrary(), CvsPrefs::SetViewer(), and CvsPrefs::TclLibrary().

Referenced by CompatGetPrefs().

00348 {
00349     if( !m_didInteract )
00350         return;
00351
00352     gCvsPrefs.SetViewer(!m_viewer.IsEmpty() ? (LPCTSTR)m_viewer : 0L);
00353     gCvsPrefs.SetExtDiff(m_useExtDiff && !m_diffProg.IsEmpty() ? (LPCTSTR)m_diffProg : 0L);
00354     gCvsPrefs.SetSettingsFolder(m_useSettingsFolder && !m_settingsFolder.IsEmpty() ? (LPCTSTR)m_settingsFolder : 0L);
00355
00356     const bool restartScriptEngine = m_tclDll != CString(gCvsPrefs.TclLibrary()) || m_pythonDll != CString(gCvsPrefs.PythonLibrary());
00357
00358     gCvsPrefs.SetTclLibrary(!m_tclDll.IsEmpty() ? (LPCTSTR)m_tclDll : 0L);
00359     gCvsPrefs.SetPythonLibrary(!m_pythonDll.IsEmpty() ? (LPCTSTR)m_pythonDll : 0L);
00360
00361     if( restartScriptEngine )
00362     {
00363         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00364         if( app )
00365         {
00366             app->RestartScriptEngine();
00367         }
00368     }
00369 }

Here is the call graph for this function:

Member Data Documentation

bool CGetPrefs_WINCVS::m_didInteract [private]

Flag indicating data change Definition at line 164 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CString CGetPrefs_WINCVS::m_diffProg

Definition at line 132 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CEdit CGetPrefs_WINCVS::m_diffProgEdit

Definition at line 125 of file GetPrefs.h.

Referenced by DoDataExchange(), OnExtdiff(), and OnExtdiffsel().

CButton CGetPrefs_WINCVS::m_extDiffSelButton

Definition at line 124 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnExtdiff().

CString CGetPrefs_WINCVS::m_pythonDll

Definition at line 136 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CEdit CGetPrefs_WINCVS::m_pythonDllEdit

Definition at line 121 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnPythondllsel().

CString CGetPrefs_WINCVS::m_settingsFolder

Definition at line 134 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CButton CGetPrefs_WINCVS::m_settingsFolderButton

Definition at line 128 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnAltsettingschk().

CEdit CGetPrefs_WINCVS::m_settingsFolderEdit

Definition at line 127 of file GetPrefs.h.

Referenced by DoDataExchange(), OnAltsettingschk(), and OnBtnsettings().

CString CGetPrefs_WINCVS::m_tclDll

Definition at line 135 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CEdit CGetPrefs_WINCVS::m_tclDllEdit

Definition at line 122 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnTcldllsel().

BOOL CGetPrefs_WINCVS::m_useExtDiff

Definition at line 131 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CButton CGetPrefs_WINCVS::m_useExtDiffCheck

Definition at line 126 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnExtdiff().

BOOL CGetPrefs_WINCVS::m_useSettingsFolder

Definition at line 133 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CButton CGetPrefs_WINCVS::m_useSettingsFolderCheck

Definition at line 129 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnAltsettingschk().

CString CGetPrefs_WINCVS::m_viewer

Definition at line 130 of file GetPrefs.h.

Referenced by DoDataExchange(), and StoreValues().

CEdit CGetPrefs_WINCVS::m_viewerEdit

Definition at line 123 of file GetPrefs.h.

Referenced by DoDataExchange(), and OnBtnviewer().

The documentation for this class was generated from the following files:
  • common/GetPrefs.h
  • common/GetPrefs.cpp
Generated on Sat Aug 7 22:52:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGfxGroupEdit Class Reference

CGfxGroupEdit Class Reference

#include <GfxGroupEdit.h>

Inheritance diagram for CGfxGroupEdit:

[legend]
Collaboration diagram for CGfxGroupEdit:

[legend]
List of all members.

Public Member Functions

CGfxGroupEdit ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)
virtual | ~CGfxGroupEdit ()

Public Attributes

BOOL | bEscapeKey
CString | text
WPARAM | msgSend
bool bNoDown
int iIndex

Protected Member Functions

virtual void | PostNcDestroy ()
afx_msg void | OnKillFocus (CWnd *pNewWnd)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags)

Constructor & Destructor Documentation

CGfxGroupEdit::CGfxGroupEdit ( )

Definition at line 38 of file GfxGroupEdit.cpp.

References bEscapeKey, bNoDown, iIndex, msgSend, and NM_OB_ONGROUPENDEDIT.

00039 {
00040     bEscapeKey = FALSE;
00041     iIndex = -1;
00042     msgSend = NM_OB_ONGROUPENDEDIT;
00043     bNoDown = false;
00044 }

CGfxGroupEdit::~CGfxGroupEdit ( ) [virtual]

Definition at line 46 of file GfxGroupEdit.cpp.

00047 {
00048 }

Member Function Documentation

void CGfxGroupEdit::OnChar | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

Definition at line 103 of file GfxGroupEdit.cpp.

References bEscapeKey, bNoDown, msgSend, and NM_OB_ONGROUPENDEDIT.

00104 {
00105     if (msgSend == NM_OB_ONGROUPENDEDIT)
00106     {
00107         CEdit::OnChar(nChar, nRepCnt, nFlags);
00108         return;
00109     }
00110
00111     if (nChar == VK_ESCAPE || nChar == VK_RETURN)
00112     {
00113         if (nChar == VK_ESCAPE) bEscapeKey = TRUE;
00114         GetParent()->SetFocus();
00115         return;
00116     }
00117     CEdit::OnChar(nChar, nRepCnt, nFlags);
00118     CString str;
00119     CRect rect, parentrect;
00120     GetClientRect(&rect);
00121     GetParent()->GetClientRect(&parentrect);
00122     ClientToScreen(&rect);
00123     GetParent()->ScreenToClient(&rect);
00124     GetWindowText(str);
00125     CWindowDC dc(this);
00126     CFont *pFont = GetParent()->GetFont();
00127     CFont *pFontDC = dc.SelectObject(pFont);
00128     CRect szrc(rect);
00129     szrc.bottom = szrc.top;
00130
00131     if (bNoDown == true)
00132     {
00133         dc.DrawText(str, szrc, DT_CALCRECT);
00134         if (szrc.right >= parentrect.right - 1) rect.right = parentrect.right - 1;
00135         else rect.right = szrc.right;
00136         MoveWindow(&rect);
00137         return;
00138     }
00139
00140     dc.DrawText(str, szrc, DT_WORDBREAK|DT_CENTER|DT_CALCRECT);
00141     dc.SelectObject(pFontDC);
00142     CSize size = szrc.Size();
00143
00144     if (size.cx > rect.Width())
00145     {
00146         if (size.cx + rect.left < parentrect.right) rect.right = rect.left + size.cx;
00147         else rect.right = parentrect.right;
00148         MoveWindow(&rect);
00149     }
00150     else if (size.cy > rect.Height())
00151     {
00152         if (size.cy + rect.bottom < parentrect.bottom) rect.bottom = rect.top + size.cy;
00153         else rect.bottom = parentrect.bottom;
00154         MoveWindow(&rect);
00155     }
00156 }

int CGfxGroupEdit::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 94 of file GfxGroupEdit.cpp.

00095 {
00096     if (CEdit::OnCreate(lpCreateStruct) == -1)
00097         return -1;
00098
00099     SendMessage(WM_SETFONT,(WPARAM) GetStockObject(DEFAULT_GUI_FONT),MAKELPARAM(TRUE,0));
00100     return 0;
00101 }

void CGfxGroupEdit::OnKillFocus ( CWnd * pNewWnd ) [protected]

Definition at line 62 of file GfxGroupEdit.cpp.

References WM_OUTBAR_NOTIFY.

00063 {
00064     PostMessage(WM_CLOSE, 0, 0);
00065     if (!bEscapeKey)
00066     {
00067         GetWindowText(text);
00068         if (text != "") GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, msgSend, (LPARAM) this);
00069     }
00070 }

void CGfxGroupEdit::PostNcDestroy ( ) [protected, virtual]

Definition at line 88 of file GfxGroupEdit.cpp.

00089 {
00090     CEdit::PostNcDestroy();
00091     delete this;
00092 }

BOOL CGfxGroupEdit::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 72 of file GfxGroupEdit.cpp.

References bEscapeKey.

00073 {
00074     if (pMsg->wParam == VK_RETURN)
00075     {
00076         PostMessage(WM_CLOSE, 0, 0);
00077         return TRUE;
00078     }
00079     else if (pMsg->wParam == VK_ESCAPE)
00080     {
00081         PostMessage(WM_CLOSE, 0, 0);
00082         return bEscapeKey = TRUE;
00083     }
00084
00085     return CEdit::PreTranslateMessage(pMsg);
00086 }

Member Data Documentation

BOOL CGfxGroupEdit::bEscapeKey

Definition at line 43 of file GfxGroupEdit.h.

Referenced by CGfxGroupEdit(), OnChar(), and PreTranslateMessage().

bool CGfxGroupEdit::bNoDown

Definition at line 46 of file GfxGroupEdit.h.

Referenced by CGfxGroupEdit(), OnChar(), and CGfxOutBarCtrl::StartItemEdit().

int CGfxGroupEdit::iIndex

Definition at line 62 of file GfxGroupEdit.h.

Referenced by CGfxGroupEdit(), CGfxOutBarCtrl::OnEndLabelEdit(), CGfxOutBarCtrl::StartGroupEdit(), and CGfxOutBarCtrl::StartItemEdit().

WPARAM CGfxGroupEdit::msgSend

Definition at line 45 of file GfxGroupEdit.h.

Referenced by CGfxGroupEdit(), OnChar(), CGfxOutBarCtrl::StartGroupEdit(), and CGfxOutBarCtrl::StartItemEdit().

CString CGfxGroupEdit::text

Definition at line 44 of file GfxGroupEdit.h.

Referenced by CGfxOutBarCtrl::OnEndLabelEdit().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/GfxGroupEdit.h
  • WinCvs/CJLib/CJLibrary/GfxGroupEdit.cpp
Generated on Sat Aug 7 22:52:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGfxOutBarCtrl Class Reference

CGfxOutBarCtrl Class Reference

#include <GfxOutBarCtrl.h>

Inheritance diagram for CGfxOutBarCtrl:

[legend]
Collaboration diagram for CGfxOutBarCtrl:

[legend]
List of all members.

Public Types

enum {
fSmallIcon = 1 << 0,
fLargeIcon = 1 << 1,
fEditGroups = 1 << 2,
fEditItems = 1 << 3,
fRemoveGroups = 1 << 4,
fRemoveItems = 1 << 5,
fAddGroups = 1 << 6,
fDragItems = 1 << 7,
fAnimation = 1 << 8,
fSelHighlight = 1 << 9
}
enum {
ircIcon = 1,
ircLabel = 2,
ircAll = 3
}
enum {
htNothing = -1,
htFolder,
htItem,
htUpScroll,
htDownScroll
}

Public Member Functions

CGfxOutBarCtrl ()
virtual void | DrawAnimItem (const int xoffset, const int yoffset, const int index)
virtual void | SetAnimSelHighlight (const int iTime)
virtual DWORD | GetFolderData (int iFolder=-1)
virtual CWnd * | GetFolderChild (int iFolder=-1)
virtual int | AddFolderBar (LPCTSTR pFolder, CWnd *pSon, const DWORD exData=0)
virtual CString | GetItemText (const int index)
virtual void | SetAnimationTickCount (const long value)
virtual long | GetAnimationTickCount ()
virtual void | AnimateFolderScroll (const int iFrom, const int iTo)
virtual int | GetDragItemRect (const int index, CRect &rect)
virtual void | DrawDragArrow (CDC *pDC, const int iFrom, const int iTo)
virtual void | SetItemImage (const int index, const int iImage)
virtual void | SetItemData (const int index, const DWORD dwData)
virtual int | GetItemImage (const int index) const
virtual DWORD | GetItemData (const int index) const
virtual bool | IsValidItem (const int index) const
virtual void | RemoveItem (const int index)
virtual void | SetItemText (const int index, LPCTSTR text)
virtual void | StartItemEdit (const int index)
virtual void | SetFolderText (const int index, LPCTSTR text)
virtual void | StartGroupEdit (const int index)
virtual void | GetLabelRect (const int iFolder, const int iIndex, CRect &rect)
virtual void | GetIconRect (const int iFolder, const int iIndex, CRect &rect)
virtual void | HighlightItem (const int index, const bool bPressed=false)
virtual void | GetVisibleRange (const int iFolder, int &first, int &last)
virtual void | DrawItem (CDC *pDC, const int iFolder, CRect rc, const int index, const bool bOnlyImage=false)
virtual CImageList * | GetFolderImageList (const int index, const bool bSmall) const
virtual CSize | GetItemSize (const int iFolder, const int index, const int type)
virtual void | PaintItems (CDC *pDC, const int iFolder, CRect rc)
virtual CImageList * | GetImageList (CImageList *pImageList, int nImageList)
virtual CImageList * | SetFolderImageList (const int folder, CImageList *pImageList, int nImageList)
virtual CImageList * | SetImageList (CImageList *pImageList, int nImageList)
virtual int | GetCountPerPage () const
virtual void | RemoveFolder (const int index)
virtual int | GetSelFolder () const
virtual int | GetFolderCount () const
virtual void | SetSelFolder (const int index)
virtual int | GetItemCount () const
virtual int | InsertItem (const int folder, const int index, LPCTSTR text, const int image=-1, const DWORD exData=0)
virtual void | HighlightFolder (const int index)
virtual int | HitTestEx (const CPoint &point, int &index)
virtual void | GetInsideRect (CRect &rect) const
virtual int | AddFolder (LPCTSTR cFolderName, const DWORD exData)
virtual void | GetItemRect (const int iFolder, const int iIndex, CRect &rect)
virtual bool | GetFolderRect (const int iIndex, CRect &rect) const
virtual void | ModifyFlag (const DWORD &dwRemove, const DWORD &dwAdd, const UINT redraw=0)
virtual DWORD | GetFlag () const
virtual void | SetSmallIconView (const bool bSet)
virtual bool | IsSmallIconView () const
virtual BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, const DWORD dwFlag=fDragItems|fEditGroups|fEditItems|fRemoveGroups|fRemoveItems|fAddGroups|fAnimation|fSelHighlight)
virtual | ~CGfxOutBarCtrl ()

Public Attributes

COLORREF | crBackGroundColor
COLORREF | crBackGroundColor1
COLORREF | crTextColor
COLORREF | cr3dFace
COLORREF | crLightBorder
COLORREF | crHilightBorder
COLORREF | crShadowBorder
COLORREF | crDkShadowBorder
int iFolderHeight
int xSmallIconLabelOffset
int yLargeIconLabelOffset
int ySmallIconSpacing
int yLargeIconSpacing
int xLeftMargin
int yTopMargin
bool bUpArrow
bool bDownArrow
bool bUpPressed
bool bDownPressed
CRect | rcUpArrow
CRect | rcDownArrow
bool bLooping
int iHitInternal1
int iHitInternal2
long | lAnimationTickCount
int iLastSel
int iSelAnimTiming
int iSelAnimCount
DWORD | dwFlags
CPtrArray | arFolder
int iLastFolderHighlighted
int iLastSelectedFolder
int iFirstItem
int iLastItemHighlighted
bool bPressedHighlight
int iLastDragItemDraw
int iLastDragItemDrawType
int iSelFolder
CImageList * | pLargeImageList
CImageList * | pSmallImageList
HCURSOR | hHandCursor
HCURSOR | hDragCursor
HCURSOR | hNoDragCursor
CPen * | pBlackPen
CCJMenu m_popupMenu
CString | m_strRemoveItem
CString | m_strRenameItem

Protected Member Functions

void | DrawFolder (CDC *pDC, const int iIdx, CRect rect, const bool bSelected)
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnTimer (UINT nIDEvent)
afx_msg void | OnPaint ()
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnGfxLargeicon ()
afx_msg void | OnUpdateGfxLargeicon (CCmdUI *pCmdUI)
afx_msg void | OnGfxSmallicon ()
afx_msg void | OnUpdateGfxSmallicon (CCmdUI *pCmdUI)
afx_msg void | OnGfxRemoveitem ()
afx_msg void | OnUpdateGfxRemoveitem (CCmdUI *pCmdUI)
afx_msg void | OnGfxRenameitem ()
afx_msg void | OnUpdateGfxRenameitem (CCmdUI *pCmdUI)
afx_msg void | OnSysColorChange ()
afx_msg long | OnEndLabelEdit (WPARAM wParam, LPARAM lParam)

Member Enumeration Documentation

anonymous enum

Enumeration values:
fSmallIcon
fLargeIcon
fEditGroups
fEditItems
fRemoveGroups
fRemoveItems
fAddGroups
fDragItems
fAnimation
fSelHighlight
Definition at line 66 of file GfxOutBarCtrl.h.
00066          {  fSmallIcon = 1 << 0, fLargeIcon = 1 << 1, fEditGroups = 1 << 2, fEditItems = 1 << 3,
00067             fRemoveGroups = 1 << 4, fRemoveItems = 1 << 5, fAddGroups = 1 << 6,
00068             fDragItems = 1 << 7, fAnimation = 1 << 8, fSelHighlight = 1 << 9 };

anonymous enum

Enumeration values:
ircIcon
ircLabel
ircAll
Definition at line 70 of file GfxOutBarCtrl.h.
00070 { ircIcon = 1, ircLabel = 2, ircAll = 3 };

anonymous enum

Enumeration values:
htNothing
htFolder
htItem
htUpScroll
htDownScroll
Definition at line 150 of file GfxOutBarCtrl.h.
00150 { htNothing = -1, htFolder, htItem, htUpScroll, htDownScroll};

Constructor & Destructor Documentation

CGfxOutBarCtrl::CGfxOutBarCtrl ( )

Definition at line 53 of file GfxOutBarCtrl.cpp.

References IDC_DRAGGING, IDC_HANDCUR, IDC_NODRAGGING, IDS_REMOVEITEM, IDS_RENAMEITEM, and NULL.

00054 {
00055     crBackGroundColor   = ::GetSysColor(COLOR_3DSHADOW);//RGB(0,128,128);//
00056     crBackGroundColor1  = ::GetSysColor(COLOR_3DSHADOW);
00057     crTextColor         = ::GetSysColor(COLOR_WINDOW);
00058     cr3dFace            = ::GetSysColor(COLOR_3DFACE);
00059     crLightBorder       = ::GetSysColor(COLOR_3DLIGHT);
00060     crHilightBorder     = ::GetSysColor(COLOR_3DHILIGHT);
00061     crShadowBorder      = ::GetSysColor(COLOR_3DSHADOW);
00062     crDkShadowBorder    = ::GetSysColor(COLOR_3DDKSHADOW);
00063
00064     pBlackPen = new CPen(PS_SOLID, 1, RGB(0,0,0));
00065
00066     iFolderHeight = 22;
00067
00068     dwFlags = fDragItems|fEditGroups|fEditItems|fRemoveGroups|fRemoveItems|fAddGroups|fAnimation|fSelHighlight;
00069
00070     iSelFolder = 0;
00071
00072     iLastFolderHighlighted = -1;
00073     iLastSelectedFolder = -1;
00074
00075     pLargeImageList = NULL;
00076     pSmallImageList = NULL;
00077
00078     iFirstItem = 0;
00079
00080     xSmallIconLabelOffset = 4;
00081     yLargeIconLabelOffset = 3;
00082
00083     ySmallIconSpacing = 10;
00084     yLargeIconSpacing = 8;
00085
00086     xLeftMargin = 5;
00087     yTopMargin = 5;
00088
00089     bUpArrow = bDownArrow = false;
00090
00091     hHandCursor = AfxGetApp()->LoadCursor(IDC_HANDCUR);
00092     rcUpArrow = rcDownArrow = CRect(0,0,0,0);
00093
00094     bUpPressed = bDownPressed = false;
00095
00096     bLooping = false;
00097
00098     iLastItemHighlighted = -1;
00099     bPressedHighlight = false;
00100
00101     iLastDragItemDraw = -1;
00102
00103     lAnimationTickCount = 10;
00104
00105     hDragCursor = AfxGetApp()->LoadCursor(IDC_DRAGGING);
00106     hNoDragCursor = AfxGetApp()->LoadCursor(IDC_NODRAGGING);
00107
00108     iLastSel = -1;
00109     iSelAnimCount = 0;
00110
00111     iSelAnimTiming = 0;
00112
00113     m_strRemoveItem.LoadString(IDS_REMOVEITEM);
00114     m_strRenameItem.LoadString(IDS_RENAMEITEM);
00115 }

CGfxOutBarCtrl::~CGfxOutBarCtrl ( ) [virtual]

Definition at line 117 of file GfxOutBarCtrl.cpp.

References arFolder, and pBlackPen.

00118 {
00119     for (int t = 0; t < arFolder.GetSize(); t++)
00120     {
00121         if (arFolder.GetAt(t)) delete (CBarFolder*) arFolder.GetAt(t);
00122     }
00123
00124     arFolder.RemoveAll();
00125
00126     delete pBlackPen;
00127 }

Member Function Documentation

int CGfxOutBarCtrl::AddFolder | ( | LPCTSTR | cFolderName,
 |  | const DWORD | exData
 | ) | [virtual]

Definition at line 590 of file GfxOutBarCtrl.cpp.

References arFolder.

00591 {
00592     CBarFolder* pbf = new CBarFolder(cFolderName, exData);
00593
00594     ASSERT(pbf);
00595
00596     arFolder.Add((void *)pbf);
00597
00598     return arFolder.GetSize() - 1;
00599 }

int CGfxOutBarCtrl::AddFolderBar | ( | LPCTSTR | pFolder,
 |  | CWnd * | pSon,
 |  | const DWORD | exData = 0
 | ) | [virtual]

Definition at line 2307 of file GfxOutBarCtrl.cpp.

References arFolder, and CGfxOutBarCtrl::CBarFolder::pChild.

02308 {
02309     CBarFolder* pbf = new CBarFolder( pFolder, exData );
02310
02311     ASSERT( pbf );
02312
02313     pbf->pChild = pSon;
02314
02315     arFolder.Add((void*) pbf);
02316
02317     return arFolder.GetSize() - 1;
02318 }

void CGfxOutBarCtrl::AnimateFolderScroll | ( | const int | iFrom,
 |  | const int | iTo
 | ) | [virtual]

Definition at line 2166 of file GfxOutBarCtrl.cpp.

References crBackGroundColor, DrawFolder(), GetFolderChild(), GetFolderCount(), GetFolderRect(), GetInsideRect(), lAnimationTickCount, and PaintItems().

Referenced by SetSelFolder().

02167 {
02168     ASSERT(iFrom >= 0 && iFrom < GetFolderCount());
02169     ASSERT(iTo >= 0 && iTo < GetFolderCount());
02170
02171     CRect rc, rc1, frc, frc1;
02172     GetInsideRect(rc);
02173     rc1.SetRect(0,0,rc.Width(),rc.Height());
02174     GetFolderRect(iTo, frc);
02175     frc1 = frc;
02176
02177     CClientDC dc(this);
02178     CDC memDC;
02179     memDC.CreateCompatibleDC(&dc);
02180     CBitmap bmpFrom, bmpTo;
02181     bmpFrom.CreateCompatibleBitmap(&dc, rc1.Width(), rc1.Height() + frc.Height() * 2);
02182     bmpTo.CreateCompatibleBitmap(&dc, rc1.Width(), rc1.Height() + frc.Height() * 2);
02183     CDC * pDC = &memDC;
02184
02185     CWnd * pWnd1 = GetFolderChild(iFrom);
02186     CWnd * pWnd2 = GetFolderChild(iTo);
02187
02188     CBitmap * obmp = pDC->SelectObject(&bmpFrom);
02189     if (iTo > iFrom)
02190     {
02191         rc1.bottom += frc.Height() * 2;
02192         pDC->FillSolidRect(rc1, crBackGroundColor);
02193         if (pWnd1)
02194         {
02195             BOOL bPrev = pWnd1->ShowWindow(SW_SHOW);
02196             pWnd1->SendMessage(WM_ERASEBKGND, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02197             pWnd1->SendMessage(WM_PAINT, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02198             if (!bPrev) pWnd1->ShowWindow(SW_HIDE);
02199         }
02200         else PaintItems(pDC, iFrom, rc1);
02201
02202         pDC->SelectObject(&bmpTo);
02203         frc.SetRect(0,0,frc.Width(),frc.Height());
02204         rc1.SetRect(0,frc.Height(),rc.Width(), rc.Height()+frc.Height() * 2);
02205         pDC->FillSolidRect(rc1, crBackGroundColor);
02206
02207         if (pWnd2)
02208         {
02209             CPoint ovpt = pDC->SetViewportOrg(0, frc.Height());
02210             BOOL bPrev = pWnd2->ShowWindow(SW_SHOW);
02211             pWnd2->SendMessage(WM_ERASEBKGND, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02212             pWnd2->SendMessage(WM_PAINT, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02213             if (!bPrev) pWnd2->ShowWindow(SW_HIDE);
02214             pDC->SetViewportOrg(ovpt);
02215         }
02216         else PaintItems(pDC, iTo, rc1);
02217         DrawFolder(pDC, iTo, frc, false);
02218     }
02219     else
02220     {
02221         frc.SetRect(0,0,frc.Width(),frc.Height());
02222         rc1.top += frc.Height();
02223         rc1.bottom += frc.Height() * 2;
02224         pDC->FillSolidRect(rc1, crBackGroundColor);
02225         if (pWnd1)
02226         {
02227             CPoint ovpt = pDC->SetViewportOrg(0, frc.Height());
02228             BOOL bPrev = pWnd1->ShowWindow(SW_SHOW);
02229             pWnd1->SendMessage(WM_ERASEBKGND, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02230             pWnd1->SendMessage(WM_PAINT, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02231             if (!bPrev) pWnd1->ShowWindow(SW_HIDE);
02232             pDC->SetViewportOrg(ovpt);
02233         }
02234         else PaintItems(pDC, iFrom, rc1);
02235
02236         DrawFolder(pDC, iFrom, frc, false);
02237
02238         pDC->SelectObject(&bmpTo);
02239         rc1.SetRect(0,0,rc.Width(), rc.Height() + frc.Height() * 2);
02240         pDC->FillSolidRect(rc1, crBackGroundColor);
02241
02242         if (pWnd2)
02243         {
02244             BOOL bPrev = pWnd2->ShowWindow(SW_SHOW);
02245             pWnd2->SendMessage(WM_ERASEBKGND, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02246             pWnd2->SendMessage(WM_PAINT, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02247             if (!bPrev) pWnd2->ShowWindow(SW_HIDE);
02248         }
02249         else PaintItems(pDC, iTo, rc1);
02250     }
02251
02252     if (iTo > iFrom)
02253     {
02254         CRect rcFrom, rcTo;
02255         GetFolderRect(iFrom, rcFrom);
02256         GetFolderRect(iTo, rcTo);
02257         int fh = rcFrom.Height();
02258         for (int y = rcTo.top - fh; y > rcFrom.bottom; y -= fh)
02259         {
02260             pDC->SelectObject(&bmpFrom);
02261             dc.BitBlt(rc.left, rcFrom.bottom + 1, rc.Width(), y - rcFrom.bottom - 1, pDC, 0,fh, SRCCOPY);
02262             pDC->SelectObject(&bmpTo);
02263             dc.BitBlt(rc.left, y, rc.Width(), rc.bottom - y + fh, pDC, 0,0, SRCCOPY);
02264             Sleep(lAnimationTickCount);
02265         }
02266     }
02267     else
02268     {
02269         CRect rcFrom, rcTo;
02270         GetFolderRect(iFrom, rcFrom);
02271         int fh = rcFrom.Height();
02272         rcTo.SetRect(rc.left, rc.bottom, rc.right, rc.bottom - fh);
02273         for (int y = rcFrom.top + 1; y < rcTo.top - fh; y += fh)
02274         {
02275             pDC->SelectObject(&bmpTo);
02276             dc.BitBlt(rc.left, rcFrom.top, rc.Width(), y - rcFrom.top - 1, pDC, 0, fh*2, SRCCOPY);
02277             pDC->SelectObject(&bmpFrom);
02278             dc.BitBlt(rc.left, y, rc.Width(), rc.bottom - y, pDC, 0,0, SRCCOPY);
02279             Sleep(lAnimationTickCount);
02280         }
02281     }
02282
02283     pDC->SelectObject(obmp);
02284     // fix potential resource leak - KStowell - 10-21-99
02285     memDC.DeleteDC();
02286     bmpFrom.DeleteObject();
02287     bmpTo.DeleteObject();
02288 }

Here is the call graph for this function:

BOOL CGfxOutBarCtrl::Create | ( | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | const DWORD | dwFlag = fDragItems|fEditGroups|fEditItems|fRemoveGroups|fRemoveItems|fAddGroups|fAnimation|fSelHighlight
 | ) | [virtual]

Definition at line 233 of file GfxOutBarCtrl.cpp.

References dwFlags, and NULL.

00234 {
00235     dwFlags = dwFlag;
00236     return CWnd::CreateEx(WS_EX_STATICEDGE, NULL, NULL, dwStyle|WS_CHILD, rect, pParentWnd, nID);
00237     //GFXOUTBARCTRL_CLASSNAME
00238 }

void CGfxOutBarCtrl::DrawAnimItem | ( | const int | xoffset,
 |  | const int | yoffset,
 |  | const int | index
 | ) | [virtual]

Definition at line 331 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, crBackGroundColor, GetFolderCount(), GetFolderImageList(), GetInsideRect(), GetItemCount(), GetItemRect(), iFirstItem, CGfxOutBarCtrl::CBarItem::iImageIndex, iLastSel, iSelFolder, and IsSmallIconView().

Referenced by OnLButtonDown(), and OnTimer().

00332 {
00333     CImageList * ima = GetFolderImageList(iSelFolder, IsSmallIconView());
00334
00335     CRect rc, irc;
00336     GetInsideRect(irc);
00337     GetItemRect(iSelFolder, iLastSel, rc);
00338
00339     if (iLastSel >= iFirstItem && irc.bottom > rc.bottom && irc.top < rc.top)
00340     {
00341         ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
00342         CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
00343
00344         ASSERT(index >= 0 && index < pbf->GetItemCount());
00345         CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
00346
00347         ASSERT(pi && ima);
00348
00349         CClientDC dc(this);
00350
00351         if (IsSmallIconView())
00352         {
00353             if (ima)
00354             {
00355                 IMAGEINFO ii;
00356                 ima->GetImageInfo(pi->iImageIndex, &ii);
00357                 CSize szImage = CRect(ii.rcImage).Size();
00358                 CPoint pt;
00359                 pt.x = rc.left + 2;
00360                 pt.y = rc.top + (rc.Height() - szImage.cy) / 2;
00361
00362                 CRect rcBck(pt.x-1, pt.y-1, pt.x + szImage.cx+2, pt.y + szImage.cy+2);
00363                 dc.FillSolidRect(rcBck, crBackGroundColor);
00364
00365                 pt.x += xoffset;
00366                 pt.y += yoffset;
00367
00368                 ima->Draw(&dc, pi->iImageIndex, pt, ILD_NORMAL);
00369
00370             }
00371         }
00372         else
00373         {
00374             if (ima)
00375             {
00376                 IMAGEINFO ii;
00377                 ima->GetImageInfo(pi->iImageIndex, &ii);
00378                 CSize szImage = CRect(ii.rcImage).Size();
00379                 CPoint pt;
00380                 pt.x = rc.left + (rc.Width() - szImage.cx) / 2;
00381                 pt.y = rc.top;
00382
00383                 CRect rcBck(pt.x-1, pt.y-1, pt.x + szImage.cx+2, pt.y + szImage.cy+2);
00384                 dc.FillSolidRect(rcBck, crBackGroundColor);
00385
00386                 pt.x += xoffset;
00387                 pt.y += yoffset;
00388
00389                 ima->Draw(&dc, pi->iImageIndex, pt, ILD_NORMAL);
00390             }
00391         }
00392     }
00393 }

Here is the call graph for this function:

void CGfxOutBarCtrl::DrawDragArrow | ( | CDC * | pDC,
 |  | const int | iFrom,
 |  | const int | iTo
 | ) | [virtual]

Definition at line 2058 of file GfxOutBarCtrl.cpp.

References GetDragItemRect(), iLastDragItemDraw, iLastDragItemDrawType, and pBlackPen.

Referenced by OnLButtonDown().

02059 {
02060     if (iTo == iLastDragItemDraw) return;
02061     CRect rc1;
02062     if (iLastDragItemDraw >= 0)
02063     {
02064         GetDragItemRect(iLastDragItemDraw, rc1);
02065         if (iLastDragItemDrawType == 0) rc1.bottom = rc1.top + 5;
02066         else if (iLastDragItemDrawType == 1) { rc1.top -= 4; rc1.bottom = rc1.top + 9; }
02067         else if (iLastDragItemDrawType == 2) { rc1.top -= 4; rc1.bottom = rc1.top + 5; }
02068         InvalidateRect(rc1, true);
02069         UpdateWindow();
02070     }
02071     iLastDragItemDraw = iTo;
02072
02073     if (iLastDragItemDraw >= 0)
02074     {
02075         iLastDragItemDrawType = GetDragItemRect(iLastDragItemDraw, rc1);
02076
02077         CPen * op = pDC->SelectObject(pBlackPen);
02078
02079         pDC->MoveTo(rc1.left, rc1.top);
02080         pDC->LineTo(rc1.right, rc1.top);
02081
02082         if (iLastDragItemDrawType != 2)
02083         {
02084             pDC->MoveTo(rc1.left, rc1.top+1);
02085             pDC->LineTo(rc1.left + 7, rc1.top+1);
02086             pDC->MoveTo(rc1.left, rc1.top+2);
02087             pDC->LineTo(rc1.left + 5, rc1.top+2);
02088             pDC->MoveTo(rc1.left, rc1.top+3);
02089             pDC->LineTo(rc1.left + 3, rc1.top+3);
02090             pDC->MoveTo(rc1.left, rc1.top+4);
02091             pDC->LineTo(rc1.left + 1, rc1.top+4);
02092
02093             pDC->MoveTo(rc1.right-1, rc1.top+1);
02094             pDC->LineTo(rc1.right - 7, rc1.top+1);
02095             pDC->MoveTo(rc1.right-1, rc1.top+2);
02096             pDC->LineTo(rc1.right - 5, rc1.top+2);
02097             pDC->MoveTo(rc1.right-1, rc1.top+3);
02098             pDC->LineTo(rc1.right - 3, rc1.top+3);
02099         }
02100         if (iLastDragItemDrawType != 0)
02101         {
02102             pDC->MoveTo(rc1.left, rc1.top-1);
02103             pDC->LineTo(rc1.left + 7, rc1.top-1);
02104             pDC->MoveTo(rc1.left, rc1.top-2);
02105             pDC->LineTo(rc1.left + 5, rc1.top-2);
02106             pDC->MoveTo(rc1.left, rc1.top-3);
02107             pDC->LineTo(rc1.left + 3, rc1.top-3);
02108             pDC->MoveTo(rc1.left, rc1.top-4);
02109             pDC->LineTo(rc1.left + 1, rc1.top-4);
02110
02111             pDC->MoveTo(rc1.right-1, rc1.top-1);
02112             pDC->LineTo(rc1.right - 7, rc1.top-1);
02113             pDC->MoveTo(rc1.right-1, rc1.top-2);
02114             pDC->LineTo(rc1.right - 5, rc1.top-2);
02115             pDC->MoveTo(rc1.right-1, rc1.top-3);
02116             pDC->LineTo(rc1.right - 3, rc1.top-3);
02117             pDC->MoveTo(rc1.right-1, rc1.top-4);
02118             pDC->LineTo(rc1.right - 1, rc1.top-4);
02119         }
02120
02121         pDC->SelectObject(op);
02122     }
02123 }

Here is the call graph for this function:

void CGfxOutBarCtrl::DrawFolder | ( | CDC * | pDC,
 |  | const int | iIdx,
 |  | CRect | rect,
 |  | const bool | bSelected
 | ) | [protected]

Definition at line 536 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::cName, cr3dFace, crBackGroundColor1, crDkShadowBorder, and crHilightBorder.

Referenced by AnimateFolderScroll(), OnLButtonDown(), and OnPaint().

00537 {
00538     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iIdx);
00539
00540     if (!bSelected)
00541     {
00542         CPen pn1(PS_SOLID, 1, crBackGroundColor1);
00543         CPen * op = pDC->SelectObject(&pn1);
00544         pDC->MoveTo(rect.left, rect.top);
00545         pDC->LineTo(rect.right, rect.top);
00546         pDC->SelectObject(op);
00547
00548         // fix potential resource leak - KStowell - 10-21-99
00549         pn1.DeleteObject();
00550
00551         rect.top ++;
00552
00553         pDC->Draw3dRect(rect, crHilightBorder, crBackGroundColor1);
00554         rect.InflateRect(-1,-1);
00555         pDC->FillSolidRect(rect, cr3dFace);
00556         int obk = pDC->SetBkMode(TRANSPARENT);
00557         CFont * of = pDC->SelectObject(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));
00558         pDC->DrawText(CString(pbf->cName), rect, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
00559         pDC->SetBkMode(obk);
00560         pDC->SelectObject(of);
00561     }
00562     else
00563     {
00564         CPen pn1(PS_SOLID, 1, crBackGroundColor1);
00565         CPen * op = pDC->SelectObject(&pn1);
00566         pDC->MoveTo(rect.left+1, rect.top);
00567         pDC->LineTo(rect.right, rect.top);
00568         pDC->SelectObject(op);
00569
00570         // fix potential resource leak - KStowell - 10-21-99
00571         pn1.DeleteObject();
00572
00573         rect.top ++;
00574
00575         pDC->Draw3dRect(rect, crDkShadowBorder, crHilightBorder);
00576         rect.InflateRect(-1,-1);
00577         pDC->Draw3dRect(rect, crBackGroundColor1, cr3dFace);
00578         rect.InflateRect(-1,-1);
00579
00580         pDC->FillSolidRect(rect, cr3dFace);
00581
00582         int obk = pDC->SetBkMode(TRANSPARENT);
00583         CFont * of = pDC->SelectObject(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));
00584         pDC->DrawText(CString(pbf->cName), rect, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
00585         pDC->SetBkMode(obk);
00586         pDC->SelectObject(of);
00587     }
00588 }

void CGfxOutBarCtrl::DrawItem | ( | CDC * | pDC,
 |  | const int | iFolder,
 |  | CRect | rc,
 |  | const int | index,
 |  | const bool | bOnlyImage = false
 | ) | [virtual]

Definition at line 1569 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, CGfxOutBarCtrl::CBarItem::cItem, cr3dFace, crDkShadowBorder, crTextColor, dwFlags, fSelHighlight, GetFolderCount(), GetFolderImageList(), GetIconRect(), GetItemCount(), CGfxOutBarCtrl::CBarItem::iImageIndex, iLastSel, iSelFolder, IsSmallIconView(), xSmallIconLabelOffset, and yLargeIconLabelOffset.

Referenced by PaintItems().

01570 {
01571     CImageList * ima = GetFolderImageList(iFolder, IsSmallIconView());
01572
01573     ASSERT(iFolder >= 0 && iFolder < GetFolderCount());
01574     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
01575
01576     ASSERT(index >= 0 && index < pbf->GetItemCount());
01577     CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
01578
01579     ASSERT(pi && ima);
01580
01581     CFont * oft = (CFont *) pDC->SelectObject(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));
01582     COLORREF ocr = pDC->SetTextColor(crTextColor);
01583     int obk = pDC->SetBkMode(TRANSPARENT);
01584
01585     if (IsSmallIconView())
01586     {
01587         if (ima)
01588         {
01589             IMAGEINFO ii;
01590             ima->GetImageInfo(pi->iImageIndex, &ii);
01591             CSize szImage = CRect(ii.rcImage).Size();
01592             CPoint pt;
01593             pt.x = rc.left + 2;
01594             pt.y = rc.top + (rc.Height() - szImage.cy) / 2;
01595             ima->Draw(pDC, pi->iImageIndex, pt, ILD_NORMAL);
01596
01597             if (!bOnlyImage)
01598             {
01599                 rc.left += szImage.cx + xSmallIconLabelOffset;
01600                 pDC->TextOut(rc.left, rc.top, CString(pi->cItem));
01601             }
01602
01603         }
01604     }
01605     else
01606     {
01607         if (ima)
01608         {
01609             IMAGEINFO ii;
01610             ima->GetImageInfo(pi->iImageIndex, &ii);
01611             CSize szImage = CRect(ii.rcImage).Size();
01612             CPoint pt;
01613             pt.x = rc.left + (rc.Width() - szImage.cx) / 2;
01614             pt.y = rc.top;// + (rc.Height() - szImage.cy) / 2;
01615             ima->Draw(pDC, pi->iImageIndex, pt, ILD_NORMAL);
01616             if (!bOnlyImage)
01617             {
01618                 rc.top += szImage.cy + yLargeIconLabelOffset;
01619                 pDC->DrawText(pi->cItem, lstrlen(pi->cItem), rc, DT_CENTER|DT_WORDBREAK);
01620             }
01621         }
01622     }
01623
01624     if (dwFlags&fSelHighlight && iLastSel == index && iLastSel >= 0)
01625     {
01626         CRect rc;
01627         GetIconRect(iSelFolder, iLastSel, rc);
01628         rc.InflateRect(1,1);
01629         pDC->Draw3dRect(rc, crDkShadowBorder, cr3dFace);
01630     }
01631
01632     pDC->SetTextColor(ocr);
01633     pDC->SelectObject(oft);
01634     pDC->SetBkMode(obk);
01635
01636 }

Here is the call graph for this function:

virtual long CGfxOutBarCtrl::GetAnimationTickCount ( ) [inline, virtual]

Definition at line 166 of file GfxOutBarCtrl.h.

00166 { return lAnimationTickCount; };

int CGfxOutBarCtrl::GetCountPerPage ( ) const [virtual]

Definition at line 1398 of file GfxOutBarCtrl.cpp.

01399 {
01400     return 0;
01401 }

int CGfxOutBarCtrl::GetDragItemRect | ( | const int | index,
 |  | CRect & | rect
 | ) | [virtual]

Definition at line 2125 of file GfxOutBarCtrl.cpp.

References GetInsideRect(), GetItemCount(), GetItemRect(), iSelFolder, and IsSmallIconView().

Referenced by DrawDragArrow().

02126 {
02127     CRect rc, crc;
02128     GetInsideRect(crc);
02129     crc.InflateRect(-2, 0);
02130
02131     GetItemRect(iSelFolder, index < GetItemCount() ? index : index - 1, rc);
02132     int line = 0;
02133     if (index < GetItemCount())
02134     {
02135         line = rc.top - 4;
02136     }
02137     else
02138     {
02139         line = rc.bottom + 6;
02140     }
02141     int tpe;
02142     if (index == 0)
02143     {
02144         rect.SetRect(crc.left, line+2, crc.right, line + 7);
02145         tpe = 0;
02146     }
02147     else if (index < GetItemCount())
02148     {
02149         rect.SetRect(crc.left, line - 9, crc.right, line);
02150         tpe = 1;
02151         if (IsSmallIconView())
02152         {
02153             rect.top += 8;
02154             rect.bottom += 8;
02155         }
02156     }
02157     else
02158     {
02159         rect.SetRect(crc.left, line, crc.right, line + 5);
02160         tpe = 2;
02161     }
02162     return tpe;
02163 }

Here is the call graph for this function:

DWORD CGfxOutBarCtrl::GetFlag ( ) const [virtual]

Definition at line 271 of file GfxOutBarCtrl.cpp.

References dwFlags.

00272 {
00273     return dwFlags;
00274 }

CWnd * CGfxOutBarCtrl::GetFolderChild ( int iFolder = -1 ) [virtual]

Definition at line 2320 of file GfxOutBarCtrl.cpp.

References arFolder, GetFolderCount(), iSelFolder, NULL, and CGfxOutBarCtrl::CBarFolder::pChild.

Referenced by AnimateFolderScroll(), OnPaint(), OnSize(), and SetSelFolder().

02321 {
02322     if (GetFolderCount())
02323     {
02324         if (iFolder < 0) iFolder = iSelFolder;
02325
02326         CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
02327         return pbf->pChild;
02328     }
02329     return NULL;
02330 }

Here is the call graph for this function:

int CGfxOutBarCtrl::GetFolderCount ( ) const [virtual]

Definition at line 1353 of file GfxOutBarCtrl.cpp.

References arFolder.

Referenced by AnimateFolderScroll(), DrawAnimItem(), DrawItem(), GetFolderChild(), GetFolderImageList(), GetItemCount(), GetItemData(), GetItemImage(), GetItemSize(), GetItemText(), InsertItem(), IsValidItem(), OnSize(), PaintItems(), RemoveFolder(), RemoveItem(), SetFolderImageList(), SetFolderText(), SetItemData(), SetItemImage(), SetItemText(), SetSelFolder(), StartGroupEdit(), and StartItemEdit().

01354 {
01355     return arFolder.GetSize();
01356 }

DWORD CGfxOutBarCtrl::GetFolderData ( int iFolder = -1 ) [virtual]

Definition at line 2332 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::dwData, and iSelFolder.

02333 {
02334     if (iFolder < 0) iFolder = iSelFolder;
02335     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
02336     return pbf->dwData;
02337 }

CImageList * CGfxOutBarCtrl::GetFolderImageList | ( | const int | index,
 |  | const bool | bSmall
 | ) | const [virtual]

Definition at line 1558 of file GfxOutBarCtrl.cpp.

References arFolder, GetFolderCount(), pLargeImageList, CGfxOutBarCtrl::CBarFolder::pLargeImageList, pSmallImageList, and CGfxOutBarCtrl::CBarFolder::pSmallImageList.

Referenced by DrawAnimItem(), DrawItem(), and GetItemSize().

01559 {
01560     ASSERT(index >= 0 && index < GetFolderCount());
01561     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(index);
01562     if (bSmall)
01563     {
01564         if (pbf->pSmallImageList) return pbf->pSmallImageList; else return pSmallImageList;
01565     }
01566     if (pbf->pLargeImageList) return pbf->pLargeImageList; else return pLargeImageList;
01567 }

Here is the call graph for this function:

bool CGfxOutBarCtrl::GetFolderRect | ( | const int | iIndex,
 |  | CRect & | rect
 | ) | const [virtual]

Definition at line 477 of file GfxOutBarCtrl.cpp.

References arFolder, iFolderHeight, and iSelFolder.

Referenced by AnimateFolderScroll(), HighlightFolder(), HitTestEx(), OnLButtonDown(), OnPaint(), and StartGroupEdit().

00478 {
00479     int max = arFolder.GetSize();
00480     ASSERT(iIndex >= 0 && iIndex < max);
00481
00482     if (iIndex >= 0 && iIndex < max)
00483     {
00484         CRect rc;
00485         GetClientRect(rc);
00486         if (iIndex > iSelFolder)
00487             rect.SetRect(rc.left, rc.bottom - ((max - iIndex)) * iFolderHeight, rc.right,
00488             rc.bottom - (max - iIndex - 1) * iFolderHeight);
00489         else
00490             rect.SetRect(rc.left, rc.top + iIndex * iFolderHeight - 1, rc.right,
00491             rc.top + (1 + iIndex) * iFolderHeight - 1);
00492         return true;
00493     }
00494     return false;
00495 }

void CGfxOutBarCtrl::GetIconRect | ( | const int | iFolder,
 |  | const int | iIndex,
 |  | CRect & | rect
 | ) | [virtual]

Definition at line 1745 of file GfxOutBarCtrl.cpp.

References GetInsideRect(), GetItemSize(), iFirstItem, ircAll, ircIcon, IsSmallIconView(), xLeftMargin, yLargeIconSpacing, ySmallIconSpacing, and yTopMargin.

Referenced by DrawItem(), HighlightItem(), HitTestEx(), OnLButtonDown(), and StartItemEdit().

01746 {
01747     CRect rc;
01748     GetInsideRect(rc);
01749     int top = rc.top;
01750     CSize sz(0,0);
01751     int y = 0;
01752     int spacing = IsSmallIconView() ? ySmallIconSpacing : yLargeIconSpacing;
01753
01754     for (int t = 0; t < iIndex; t++)
01755     {
01756         sz = GetItemSize(iFolder, t, ircAll);
01757         top += sz.cy;
01758         top += spacing;
01759         if (t == iFirstItem - 1) y = top - rc.top;
01760     }
01761     top += spacing;
01762
01763     sz = GetItemSize(iFolder, iIndex, ircIcon);
01764     if (IsSmallIconView())
01765     {
01766         rect.SetRect(rc.left, top, rc.left + sz.cx, top + sz.cy);
01767         rect.left += xLeftMargin + 2;
01768         rect.right += xLeftMargin + 2;
01769         rect.top -= yTopMargin;
01770         rect.bottom -= yTopMargin;
01771
01772         rect.top -= y;
01773         rect.bottom -= y;
01774     }
01775     else
01776     {
01777         rect.SetRect(rc.left + (rc.Width() - sz.cx)/2, top, rc.left + (rc.Width() - sz.cx)/2 + sz.cx, top + sz.cy);
01778         rect.top -= y + 3;
01779         rect.bottom -= y + 2;
01780     }
01781 }

Here is the call graph for this function:

CImageList * CGfxOutBarCtrl::GetImageList | ( | CImageList * | pImageList,
 |  | int | nImageList
 | ) | [virtual]

Definition at line 1419 of file GfxOutBarCtrl.cpp.

References fLargeIcon, fSmallIcon, NULL, pLargeImageList, and pSmallImageList.

01420 {
01421     if (nImageList == fSmallIcon) return pSmallImageList;
01422     else if (nImageList == fLargeIcon) return pLargeImageList;
01423     return NULL;
01424 }

void CGfxOutBarCtrl::GetInsideRect ( CRect & rect ) const [virtual]

Definition at line 629 of file GfxOutBarCtrl.cpp.

References arFolder, iFolderHeight, and iSelFolder.

Referenced by AnimateFolderScroll(), DrawAnimItem(), GetDragItemRect(), GetIconRect(), GetItemRect(), GetItemSize(), GetLabelRect(), GetVisibleRange(), HighlightItem(), HitTestEx(), OnLButtonDown(), OnPaint(), OnSize(), PaintItems(), RemoveItem(), SetSelFolder(), SetSmallIconView(), and StartItemEdit().

00630 {
00631     GetClientRect(rect);
00632     if (arFolder.GetSize() > 0)
00633     {
00634         int max = arFolder.GetSize();
00635         rect.top += iFolderHeight * (iSelFolder + 1) - 1;//+ 2;
00636         rect.bottom -= (max - iSelFolder - 1)*iFolderHeight;
00637         return;
00638     }
00639 }

int CGfxOutBarCtrl::GetItemCount ( ) const [virtual]

Definition at line 1315 of file GfxOutBarCtrl.cpp.

References arFolder, GetFolderCount(), CGfxOutBarCtrl::CBarFolder::GetItemCount(), and iSelFolder.

Referenced by DrawAnimItem(), DrawItem(), GetDragItemRect(), GetItemSize(), OnLButtonDown(), OnPaint(), RemoveItem(), and StartItemEdit().

01316 {
01317     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
01318     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01319     return  pbf->GetItemCount();
01320 }

Here is the call graph for this function:

DWORD CGfxOutBarCtrl::GetItemData ( const int index ) const [virtual]

Definition at line 2012 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, CGfxOutBarCtrl::CBarItem::dwData, GetFolderCount(), iSelFolder, and IsValidItem().

02013 {
02014     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02015     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02016     if (IsValidItem(index))
02017     {
02018         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
02019         return i->dwData;
02020     }
02021     return 0;
02022 }

Here is the call graph for this function:

int CGfxOutBarCtrl::GetItemImage ( const int index ) const [virtual]

Definition at line 2024 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, GetFolderCount(), CGfxOutBarCtrl::CBarItem::iImageIndex, iSelFolder, and IsValidItem().

02025 {
02026     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02027     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02028     if (IsValidItem(index))
02029     {
02030         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
02031         return i->iImageIndex;
02032     }
02033     return 0;
02034 }

Here is the call graph for this function:

void CGfxOutBarCtrl::GetItemRect | ( | const int | iFolder,
 |  | const int | iIndex,
 |  | CRect & | rect
 | ) | [virtual]

Definition at line 497 of file GfxOutBarCtrl.cpp.

References GetInsideRect(), GetItemSize(), iFirstItem, ircAll, IsSmallIconView(), xLeftMargin, yLargeIconSpacing, ySmallIconSpacing, and yTopMargin.

Referenced by DrawAnimItem(), GetDragItemRect(), GetVisibleRange(), HitTestEx(), OnLButtonDown(), and PaintItems().

00498 {
00499     CRect rc;
00500     GetInsideRect(rc);
00501     int top = rc.top;
00502     CSize sz(0,0);
00503     int y = 0;
00504     for (int t = 0; t < iIndex; t++)
00505     {
00506         sz = GetItemSize(iFolder, t, ircAll);
00507         top += sz.cy;
00508
00509         if (IsSmallIconView())
00510         {
00511             top += ySmallIconSpacing;
00512         }
00513         else
00514         {
00515             top += yLargeIconSpacing;
00516         }
00517         if (t == iFirstItem - 1) y = top - rc.top;
00518     }
00519     sz = GetItemSize(iFolder, iIndex, ircAll);
00520     rect.SetRect(rc.left, top, rc.left + sz.cx, top + sz.cy);
00521
00522     rect.top -= y;
00523     rect.bottom -= y;
00524
00525     rect.left += xLeftMargin;
00526     rect.top  += yTopMargin;
00527     rect.bottom += yTopMargin;
00528
00529     if (!IsSmallIconView())
00530     {
00531         rect.left = rc.left;
00532         rect.right = rc.right;
00533     }
00534 }

Here is the call graph for this function:

CSize CGfxOutBarCtrl::GetItemSize | ( | const int | iFolder,
 |  | const int | index,
 |  | const int | type
 | ) | [virtual]

Definition at line 1493 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, CGfxOutBarCtrl::CBarItem::cItem, GetFolderCount(), GetFolderImageList(), GetInsideRect(), GetItemCount(), CGfxOutBarCtrl::CBarItem::iImageIndex, ircAll, ircIcon, ircLabel, IsSmallIconView(), xSmallIconLabelOffset, yLargeIconLabelOffset, and yLargeIconSpacing.

Referenced by GetIconRect(), GetItemRect(), and GetLabelRect().

01494 {
01495     ASSERT(iFolder >= 0 && iFolder < GetFolderCount());
01496     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
01497
01498     ASSERT(index >= 0 && index < pbf->GetItemCount());
01499     CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
01500
01501     CSize szImage(0,0);
01502     CSize szLabel(0,0);
01503     CSize szAll(0,0);
01504
01505     if (pi->iImageIndex >= 0)
01506     {
01507         if (type != ircLabel)
01508         {
01509             CImageList * il = GetFolderImageList(iFolder, IsSmallIconView());
01510             ASSERT(il);
01511             if (il)
01512             {
01513                 IMAGEINFO ii;
01514                 il->GetImageInfo(pi->iImageIndex, &ii);
01515                 szImage = CRect(ii.rcImage).Size();
01516             }
01517         }
01518     }
01519     if (pi->cItem)
01520     {
01521         if (type != ircIcon)
01522         {
01523             CClientDC dc(this);
01524             CFont * oft = (CFont *) dc.SelectObject(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));
01525             if (IsSmallIconView())
01526             {
01527                 szLabel = dc.GetTextExtent(pi->cItem, lstrlen(pi->cItem));
01528             }
01529             else
01530             {
01531                 CRect rc;
01532                 GetInsideRect(rc);
01533                 rc.bottom = rc.top;
01534                 dc.DrawText(pi->cItem, lstrlen(pi->cItem), rc, DT_CALCRECT|DT_CENTER|DT_WORDBREAK);
01535                 szLabel = rc.Size();
01536             }
01537             dc.SelectObject(oft);
01538         }
01539     }
01540     if (IsSmallIconView())
01541     {
01542         if (type == ircIcon) szAll = szImage;
01543         else if (type == ircLabel) szAll = szLabel;
01544         else if (type == ircAll) szAll = CSize(szImage.cx + szLabel.cx + xSmallIconLabelOffset, szImage.cy > szLabel.cy ? szImage.cy : szLabel.cy);
01545     }
01546     else
01547     {
01548         if (type == ircIcon) szAll = szImage;
01549         else if (type == ircLabel) szAll = szLabel;
01550         else if (type == ircAll)
01551         {
01552             szAll = CSize(szImage.cx > szLabel.cx ? szImage.cx : szLabel.cx, szLabel.cy + szImage.cy + yLargeIconLabelOffset + yLargeIconSpacing);
01553         }
01554     }
01555     return szAll;
01556 }

Here is the call graph for this function:

CString CGfxOutBarCtrl::GetItemText ( const int index ) [virtual]

Definition at line 2293 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, CGfxOutBarCtrl::CBarItem::cItem, GetFolderCount(), iSelFolder, and IsValidItem().

02294 {
02295     CString item;
02296
02297     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02298     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02299     if (IsValidItem(index))
02300     {
02301         CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
02302         if (pi->cItem) item = pi->cItem;
02303     }
02304     return item;
02305 }

Here is the call graph for this function:

void CGfxOutBarCtrl::GetLabelRect | ( | const int | iFolder,
 |  | const int | iIndex,
 |  | CRect & | rect
 | ) | [virtual]

Definition at line 1783 of file GfxOutBarCtrl.cpp.

References GetInsideRect(), GetItemSize(), iFirstItem, ircAll, ircLabel, IsSmallIconView(), xLeftMargin, yLargeIconSpacing, ySmallIconSpacing, and yTopMargin.

Referenced by HitTestEx(), and StartItemEdit().

01784 {
01785     CRect rc;
01786     GetInsideRect(rc);
01787     int top = rc.top;
01788     CSize sz(0,0);
01789     int y = 0;
01790     int spacing = IsSmallIconView() ? ySmallIconSpacing : yLargeIconSpacing;
01791
01792     for (int t = 0; t < iIndex; t++)
01793     {
01794         sz = GetItemSize(iFolder, t, ircAll);
01795         top += sz.cy;
01796         top += spacing;
01797         if (t == iFirstItem - 1) y = top - rc.top;
01798     }
01799     top += spacing;
01800
01801     sz = GetItemSize(iFolder, iIndex, ircAll);
01802
01803     CSize szLabel = GetItemSize(iFolder, iIndex, ircLabel);
01804
01805     if (IsSmallIconView())
01806     {
01807         rect.SetRect(rc.left, top, rc.left + sz.cx, top + sz.cy);
01808         rect.left += xLeftMargin + 2;
01809         rect.right += xLeftMargin + 2;
01810         rect.top  += yTopMargin - 5;
01811         rect.bottom += yTopMargin - 5;
01812     }
01813     else
01814     {
01815         rect.SetRect(rc.left + (rc.Width() - sz.cx)/2, top, rc.left + (rc.Width() - sz.cx)/2 + sz.cx, top + sz.cy);
01816         rect.top -= y + 3;
01817         rect.bottom -= y + 2;
01818
01819         rect.bottom -=  yLargeIconSpacing;
01820         rect.top    = rect.bottom - szLabel.cy;
01821     }
01822 }

Here is the call graph for this function:

int CGfxOutBarCtrl::GetSelFolder ( ) const [virtual]

Definition at line 1358 of file GfxOutBarCtrl.cpp.

References iSelFolder.

01359 {
01360     return iSelFolder;
01361 }

void CGfxOutBarCtrl::GetVisibleRange | ( | const int | iFolder,
 |  | int & | first,
 |  | int & | last
 | ) | [virtual]

Definition at line 1653 of file GfxOutBarCtrl.cpp.

References arFolder, GetInsideRect(), CGfxOutBarCtrl::CBarFolder::GetItemCount(), GetItemRect(), and iFirstItem.

Referenced by OnPaint().

01654 {
01655     first = iFirstItem;
01656     CRect rc;
01657     GetInsideRect(rc);
01658
01659     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
01660     int max = pbf->GetItemCount(), t;
01661     for (t = iFirstItem; t < max; t++)
01662     {
01663         CRect itemRc;
01664         GetItemRect(iFolder, t, itemRc);
01665         if (itemRc.bottom > rc.bottom)
01666         {
01667             last = t - 1;
01668             break;
01669         }
01670         else last = t;
01671     }
01672 }

Here is the call graph for this function:

void CGfxOutBarCtrl::HighlightFolder ( const int index ) [virtual]

Definition at line 718 of file GfxOutBarCtrl.cpp.

References cr3dFace, crBackGroundColor1, crDkShadowBorder, GetFolderRect(), iLastFolderHighlighted, and NULL.

Referenced by OnMouseMove(), OnPaint(), and OnTimer().

00719 {
00720     CWnd * pf = GetFocus();
00721     if (pf != NULL && pf != this && IsChild(pf)) return;
00722
00723     if (iLastFolderHighlighted == index) return;
00724
00725     if (iLastFolderHighlighted >= 0)
00726     {
00727         CRect rc;
00728         if (GetFolderRect(iLastFolderHighlighted, rc))
00729         {
00730             CClientDC dc(this);
00731             CPen pn(PS_SOLID, 1, crBackGroundColor1);//crShadowBorder);
00732             CPen * op = dc.SelectObject(&pn);
00733             dc.MoveTo(rc.left, rc.bottom-1);
00734             dc.LineTo(rc.right-1, rc.bottom-1);
00735             dc.LineTo(rc.right-1, rc.top);
00736             CPen pn1(PS_SOLID, 1, cr3dFace);
00737             dc.SelectObject(&pn1);
00738             dc.MoveTo(rc.left+1, rc.bottom-2);
00739             dc.LineTo(rc.right-2, rc.bottom-2);
00740             dc.LineTo(rc.right-2, rc.top+1);
00741             dc.SelectObject(op);
00742
00743             // fix potential resource leak - KStowell - 10-21-99
00744             pn.DeleteObject();
00745         }
00746     }
00747     iLastFolderHighlighted = index;
00748     if (iLastFolderHighlighted >= 0)
00749     {
00750         CRect rc;
00751         if (GetFolderRect(iLastFolderHighlighted, rc))
00752         {
00753             CClientDC dc(this);
00754             CPen pn(PS_SOLID, 1, crDkShadowBorder);
00755             CPen * op = dc.SelectObject(&pn);
00756             dc.MoveTo(rc.left, rc.bottom-1);
00757             dc.LineTo(rc.right-1, rc.bottom-1);
00758             dc.LineTo(rc.right-1, rc.top);
00759             CPen pn1(PS_SOLID, 1, crBackGroundColor1);
00760             dc.SelectObject(&pn1);
00761             dc.MoveTo(rc.left+1, rc.bottom-2);
00762             dc.LineTo(rc.right-2, rc.bottom-2);
00763             dc.LineTo(rc.right-2, rc.top+1);
00764             dc.SelectObject(op);
00765
00766             // fix potential resource leak - KStowell - 10-21-99
00767             pn.DeleteObject();
00768         }
00769     }
00770 }

Here is the call graph for this function:

void CGfxOutBarCtrl::HighlightItem | ( | const int | index,
 |  | const bool | bPressed = false
 | ) | [virtual]

Definition at line 1691 of file GfxOutBarCtrl.cpp.

References cr3dFace, crBackGroundColor, crDkShadowBorder, dwFlags, fSelHighlight, GetIconRect(), GetInsideRect(), iLastItemHighlighted, iLastSel, iSelAnimTiming, iSelFolder, IsValidItem(), NM_OB_ITEMHOVER, NULL, and WM_OUTBAR_NOTIFY.

Referenced by OnLButtonDown(), OnMouseMove(), OnPaint(), and OnTimer().

01692 {
01693     CWnd * pf = GetFocus();
01694     if (pf != NULL && pf != this && IsChild(pf)) return;
01695
01696     static bool bOldPressed = false;
01697     if (iLastItemHighlighted == index && bOldPressed == bPressed) return;
01698
01699     bOldPressed = bPressed;
01700
01701     CClientDC dc(this);
01702
01703     CRect irc;
01704     GetInsideRect(irc);
01705     int isdc = dc.SaveDC();
01706     CRgn itemRegion;
01707     itemRegion.CreateRectRgnIndirect(&irc);
01708     dc.SelectClipRgn(&itemRegion);
01709     itemRegion.DeleteObject();
01710
01711
01712     if (iLastItemHighlighted >= 0 && IsValidItem(iLastItemHighlighted))
01713     {
01714         CRect rc;
01715         GetIconRect(iSelFolder, iLastItemHighlighted, rc);
01716         rc.InflateRect(1,1);
01717         dc.Draw3dRect(rc, crBackGroundColor, crBackGroundColor);
01718     }
01719     if (iSelAnimTiming > 0 && index == iLastSel)
01720     {
01721         iLastItemHighlighted = -1;
01722         return;
01723     }
01724     if (dwFlags&fSelHighlight && iLastSel == index)
01725     {
01726         iLastItemHighlighted = -1;
01727         return;
01728     }
01729
01730     iLastItemHighlighted = index;
01731     if (iLastItemHighlighted >= 0 && IsValidItem(iLastItemHighlighted))
01732     {
01733         CRect rc;
01734         GetIconRect(iSelFolder, iLastItemHighlighted, rc);
01735         rc.InflateRect(1,1);
01736         if (bPressed)
01737             dc.Draw3dRect(rc, crDkShadowBorder, cr3dFace);
01738         else
01739             dc.Draw3dRect(rc, cr3dFace, crDkShadowBorder);
01740     }
01741     dc.RestoreDC(isdc);
01742     GetOwner()->SendMessage(WM_OUTBAR_NOTIFY,NM_OB_ITEMHOVER,index);
01743 }

Here is the call graph for this function:

int CGfxOutBarCtrl::HitTestEx | ( | const CPoint & | point,
 |  | int & | index
 | ) | [virtual]

Definition at line 662 of file GfxOutBarCtrl.cpp.

References arFolder, bDownArrow, bUpArrow, GetFolderRect(), GetIconRect(), GetInsideRect(), CGfxOutBarCtrl::CBarFolder::GetItemCount(), GetItemRect(), GetLabelRect(), htDownScroll, htFolder, htItem, htNothing, htUpScroll, iFirstItem, iSelFolder, IsSmallIconView(), rcDownArrow, rcUpArrow, and yLargeIconLabelOffset.

Referenced by OnLButtonDown(), OnMouseMove(), OnRButtonDown(), and OnSetCursor().

00663 {
00664     if (bUpArrow && rcUpArrow.PtInRect(point)) return htUpScroll;
00665     if (bDownArrow && rcDownArrow.PtInRect(point)) return htDownScroll;
00666
00667     int max = arFolder.GetSize(), t;
00668
00669     CRect rc;
00670     for (t = 0; t < max; t++)
00671     {
00672         GetFolderRect(t, rc);
00673         if (rc.PtInRect(point))
00674         {
00675             index = t;
00676             return htFolder;
00677         }
00678     }
00679     GetInsideRect(rc);
00680     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
00681     max = pbf->GetItemCount();
00682     for (t = iFirstItem; t < max; t++)
00683     {
00684         CRect itemRc;
00685         if (!IsSmallIconView())
00686         {
00687             GetIconRect(iSelFolder, t, itemRc);
00688             if (itemRc.PtInRect(point))
00689             {
00690                 index = t;
00691                 return htItem;
00692             }
00693             else if (itemRc.top > rc.bottom) break;
00694             GetLabelRect(iSelFolder, t, itemRc);
00695             itemRc.top -= yLargeIconLabelOffset;
00696
00697             if (itemRc.PtInRect(point))
00698             {
00699                 index = t;
00700                 return htItem;
00701             }
00702             else if (itemRc.top > rc.bottom) break;
00703         }
00704         else
00705         {
00706             GetItemRect(iSelFolder, t, itemRc);
00707             if (itemRc.PtInRect(point))
00708             {
00709                 index = t;
00710                 return htItem;
00711             }
00712             else if (itemRc.top > rc.bottom) break;
00713         }
00714     }
00715     return htNothing;
00716 }

Here is the call graph for this function:

int CGfxOutBarCtrl::InsertItem | ( | const int | folder,
 |  | const int | index,
 |  | LPCTSTR | text,
 |  | const int | image = -1,
 |  | const DWORD | exData = 0
 | ) | [virtual]

Definition at line 1306 of file GfxOutBarCtrl.cpp.

References arFolder, GetFolderCount(), and CGfxOutBarCtrl::CBarFolder::InsertItem().

01307 {
01308     ASSERT(folder >= 0 && folder < GetFolderCount());
01309
01310     CBarFolder* pbf = (CBarFolder*) arFolder.GetAt(folder);
01311
01312     return pbf->InsertItem(index, text, image, exData);
01313 }

Here is the call graph for this function:

bool CGfxOutBarCtrl::IsSmallIconView ( ) const [virtual]

Definition at line 240 of file GfxOutBarCtrl.cpp.

References dwFlags, and fSmallIcon.

Referenced by DrawAnimItem(), DrawItem(), GetDragItemRect(), GetIconRect(), GetItemRect(), GetItemSize(), GetLabelRect(), HitTestEx(), OnUpdateGfxLargeicon(), OnUpdateGfxSmallicon(), SetSmallIconView(), and StartItemEdit().

00241 {
00242     return dwFlags&fSmallIcon;
00243 }

bool CGfxOutBarCtrl::IsValidItem ( const int index ) const [virtual]

Definition at line 2005 of file GfxOutBarCtrl.cpp.

References arFolder, GetFolderCount(), CGfxOutBarCtrl::CBarFolder::GetItemCount(), and iSelFolder.

Referenced by GetItemData(), GetItemImage(), GetItemText(), HighlightItem(), RemoveItem(), SetItemData(), and SetItemImage().

02006 {
02007     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02008     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02009     return (index >= 0 && index < pbf->GetItemCount());
02010 }

Here is the call graph for this function:

void CGfxOutBarCtrl::ModifyFlag | ( | const DWORD & | dwRemove,
 |  | const DWORD & | dwAdd,
 |  | const UINT | redraw = 0
 | ) | [virtual]

Definition at line 276 of file GfxOutBarCtrl.cpp.

References dwFlags.

00277 {
00278     if (dwRemove)   dwFlags &= ~(dwRemove);
00279     if (dwAdd)      dwFlags |= dwAdd;
00280
00281     if (GetSafeHwnd())
00282     {
00283         if (redraw != 0) SetWindowPos(0,0,0,0,0,SWP_NOZORDER|SWP_NOSIZE|SWP_NOMOVE|redraw);
00284         else Invalidate();
00285     }
00286 }

int CGfxOutBarCtrl::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 288 of file GfxOutBarCtrl.cpp.

00289 {
00290     if (CWnd::OnCreate(lpCreateStruct) == -1)
00291         return -1;
00292
00293     // TODO: Add your specialized creation code here
00294
00295     return 0;
00296 }

long CGfxOutBarCtrl::OnEndLabelEdit | ( | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected]

Definition at line 158 of file GfxOutBarCtrl.cpp.

References OUTBAR_INFO::cText, CGfxGroupEdit::iIndex, OUTBAR_INFO::index, NM_OB_ONGROUPENDEDIT, NM_OB_ONLABELENDEDIT, CGfxGroupEdit::text, and WM_OUTBAR_NOTIFY.

00159 {
00160     if (wParam == NM_OB_ONGROUPENDEDIT)
00161     {
00162         CGfxGroupEdit* pEdit = (CGfxGroupEdit*) lParam;
00163
00164         OUTBAR_INFO ob;
00165
00166         ob.index = pEdit->iIndex;
00167         ob.cText = (LPCTSTR) pEdit->text;
00168
00169         if (GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_ONGROUPENDEDIT, (LPARAM) &ob))
00170         {
00171             SetFolderText(pEdit->iIndex, pEdit->text);
00172             CRect rc;
00173             GetFolderRect(pEdit->iIndex, rc);
00174             InvalidateRect(rc, false);
00175         }
00176     }
00177
00178     if (wParam == NM_OB_ONLABELENDEDIT)
00179     {
00180         CGfxGroupEdit * pEdit = (CGfxGroupEdit *) lParam;
00181         OUTBAR_INFO ob;
00182         ob.index = pEdit->iIndex;
00183         ob.cText = pEdit->text;
00184
00185         if (GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_ONLABELENDEDIT, (LPARAM) &ob))
00186         {
00187             SetItemText(pEdit->iIndex, pEdit->text);
00188             CRect rc;
00189             GetInsideRect(rc);
00190             InvalidateRect(rc, true);
00191         }
00192     }
00193
00194     return 0;
00195 }

BOOL CGfxOutBarCtrl::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 472 of file GfxOutBarCtrl.cpp.

00473 {
00474     return true;
00475 }

void CGfxOutBarCtrl::OnGfxLargeicon ( ) [protected]

Definition at line 1933 of file GfxOutBarCtrl.cpp.

References SetSmallIconView().

01934 {
01935     SetSmallIconView(false);
01936     Invalidate();
01937 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnGfxRemoveitem ( ) [protected]

Definition at line 1955 of file GfxOutBarCtrl.cpp.

References htFolder, htItem, iHitInternal1, iHitInternal2, RemoveFolder(), and RemoveItem().

01956 {
01957     if (iHitInternal1 == htFolder)
01958     {
01959         RemoveFolder(iHitInternal2);
01960     }
01961     else if (iHitInternal1 == htItem)
01962     {
01963         RemoveItem(iHitInternal2);
01964     }
01965 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnGfxRenameitem ( ) [protected]

Definition at line 1972 of file GfxOutBarCtrl.cpp.

References htFolder, htItem, iHitInternal1, iHitInternal2, StartGroupEdit(), and StartItemEdit().

01973 {
01974     if (iHitInternal1 == htFolder)
01975     {
01976         StartGroupEdit(iHitInternal2);
01977     }
01978     else if (iHitInternal1 == htItem)
01979     {
01980         StartItemEdit(iHitInternal2);
01981     }
01982 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnGfxSmallicon ( ) [protected]

Definition at line 1944 of file GfxOutBarCtrl.cpp.

References SetSmallIconView().

01945 {
01946     SetSmallIconView(true);
01947     Invalidate();
01948 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 772 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, bDownArrow, bDownPressed, bLooping, bPressedHighlight, bUpArrow, bUpPressed, DrawAnimItem(), DrawDragArrow(), DrawFolder(), dwFlags, fDragItems, fSelHighlight, GetFolderRect(), GetIconRect(), GetInsideRect(), GetItemCount(), GetItemRect(), hDragCursor, HighlightItem(), HitTestEx(), hNoDragCursor, htDownScroll, htFolder, htItem, htUpScroll, OUTBAR_INFO::iDragFrom, OUTBAR_INFO::iDragTo, iFirstItem, iLastDragItemDraw, iLastDragItemDrawType, iLastItemHighlighted, iLastSel, iLastSelectedFolder, iSelAnimTiming, iSelFolder, NM_OB_DRAGITEM, NM_OB_ITEMCLICK, NULL, rcDownArrow, rcUpArrow, SetSelFolder(), and WM_OUTBAR_NOTIFY.

00773 {
00774     if (GetFocus() != this) SetFocus();
00775
00776     int index, ht = HitTestEx(point, index);
00777     iLastDragItemDrawType = -1;
00778
00779     CRect inRc;
00780     GetInsideRect(inRc);
00781
00782     if (ht == htFolder)
00783     {
00784         bool bHigh = true;
00785         CRect rc;
00786         GetFolderRect(index, rc);
00787
00788         if (::GetCapture() == NULL)
00789         {
00790             SetCapture();
00791             ASSERT(this == GetCapture());
00792             CClientDC dc(this);
00793             DrawFolder(&dc, index, rc, true);
00794             AfxLockTempMaps();
00795             for (;;)
00796             {
00797                 MSG msg;
00798                 VERIFY(::GetMessage(&msg, NULL, 0, 0));
00799
00800                 if (CWnd::GetCapture() != this) break;
00801
00802                 switch (msg.message)
00803                 {
00804                 case WM_MOUSEMOVE:
00805                     {
00806                         CPoint pt(msg.lParam);
00807                         int idx, ht1 = HitTestEx(pt, idx);
00808                         if (ht1 == htFolder && idx == index)
00809                         {
00810                             if (!bHigh)
00811                             {
00812                                 DrawFolder(&dc, index, rc, true);
00813                                 bHigh = true;
00814                             }
00815                         }
00816                         else
00817                         {
00818                             if (bHigh)
00819                             {
00820                                 DrawFolder(&dc, index, rc, false);
00821                                 bHigh = false;
00822                             }
00823                         }
00824                     }
00825                     break;
00826
00827                 case WM_LBUTTONUP:
00828                     {
00829                         if (bHigh)
00830                         {
00831                             DrawFolder(&dc, index, rc, false);
00832                             bHigh = false;
00833                         }
00834                         CPoint pt(msg.lParam);
00835                         int idx, ht1 = HitTestEx(pt, idx);
00836                         if (ht1 == htFolder && idx != iSelFolder)
00837                             SetSelFolder(idx);
00838                     }
00839
00840                     goto ExitLoop2;
00841
00842                 case WM_KEYDOWN:
00843                     if (msg.wParam != VK_ESCAPE)
00844                         break;
00845
00846                 default:
00847                     DispatchMessage(&msg);
00848                     break;
00849                 }
00850             }
00851
00852         ExitLoop2:
00853             ReleaseCapture();
00854             AfxUnlockTempMaps(FALSE);
00855         }
00856         if (bHigh) InvalidateRect(rc, false);
00857     }
00858     else iLastSelectedFolder = -1;
00859
00860     if (ht == htItem)
00861     {
00862         iLastDragItemDraw = -1;
00863         bool bHigh = true, bDragging = false;
00864         CRect rc;
00865         GetItemRect(iSelFolder, index, rc);
00866
00867         HCURSOR hCur = GetCursor();
00868
00869         if (::GetCapture() == NULL)
00870         {
00871             SetCapture();
00872             ASSERT(this == GetCapture());
00873             CClientDC dc(this);
00874             HighlightItem(index, true);
00875             AfxLockTempMaps();
00876             for (;;)
00877             {
00878                 MSG msg;
00879                 VERIFY(::GetMessage(&msg, NULL, 0, 0));
00880
00881                 if (CWnd::GetCapture() != this) break;
00882
00883                 switch (msg.message)
00884                 {
00885                 case WM_MOUSEMOVE:
00886                     {
00887                         CPoint pt(msg.lParam);
00888                         int idx, ht1 = HitTestEx(pt, idx);
00889                         if (bDragging)
00890                         {
00891                             if (ht1 == htItem)
00892                             {
00893                                 DrawDragArrow(&dc, index, idx);
00894                                 SetCursor(hDragCursor);
00895                                 hCur = hDragCursor;
00896                             }
00897                             else
00898                             {
00899                                 CRect rcItem;
00900                                 GetItemRect(iSelFolder, GetItemCount() - 1, rcItem);
00901                                 if (pt.y > rcItem.bottom && pt.y < inRc.bottom)
00902                                 {
00903                                     DrawDragArrow(&dc, index, GetItemCount());
00904                                     SetCursor(hDragCursor);
00905                                     hCur = hDragCursor;
00906                                 }
00907                                 else
00908                                 {
00909                                     DrawDragArrow(&dc, index, -1);
00910                                     SetCursor(hNoDragCursor);
00911                                     hCur = hNoDragCursor;
00912                                 }
00913                             }
00914                         }
00915                         else
00916                         {
00917                             if (ht1 == htItem && idx == index)
00918                             {
00919                                 if (!bHigh)
00920                                 {
00921                                     HighlightItem(index, true);
00922                                     bHigh = true;
00923                                     bPressedHighlight = true;
00924                                 }
00925                             }
00926                             else
00927                             {
00928                                 if (ht1 == htItem)
00929                                 {
00930                                     if (bHigh)
00931                                     {
00932                                         HighlightItem(index, false);
00933                                         bHigh = false;
00934                                         bPressedHighlight = false;
00935                                     }
00936                                 }
00937                                 else
00938                                 {
00939                                     if (dwFlags&fDragItems)
00940                                     {
00941                                         HighlightItem(index, true);
00942                                         bHigh = true;
00943                                         bDragging = true;
00944
00945                                         SetCursor(hDragCursor);
00946                                         hCur = hDragCursor;
00947
00948                                         bPressedHighlight = true;
00949                                     }
00950                                 }
00951                             }
00952                         }
00953                     }
00954                     break;
00955
00956                 case WM_SETCURSOR:
00957                     SetCursor(hCur);
00958                     break;
00959
00960                 case WM_LBUTTONUP:
00961                     {
00962                         if (bHigh)
00963                         {
00964                             HighlightItem(-1);
00965                             bHigh = false;
00966                         }
00967                         CPoint pt(msg.lParam);
00968                         int idx, ht1 = HitTestEx(pt, idx);
00969                         if (!bDragging)
00970                         {
00971                             if (ht1 == htItem && idx == index)
00972                             {
00973                                 if (iSelAnimTiming > 0 && index != iLastSel && iLastSel >= 0)
00974                                 {
00975                                     DrawAnimItem(0, 0, iLastSel);
00976                                 }
00977
00978                                 if (dwFlags&fSelHighlight && iLastSel >= 0)
00979                                 {
00980                                     CRect rc;
00981                                     GetIconRect(iSelFolder, iLastSel, rc);
00982                                     rc.InflateRect(1,1);
00983                                     InvalidateRect(rc);
00984                                 }
00985
00986                                 iLastSel = index;
00987
00988                                 if (dwFlags&fSelHighlight && iLastSel >= 0)
00989                                 {
00990                                     CRect rc;
00991                                     GetIconRect(iSelFolder, iLastSel, rc);
00992                                     rc.InflateRect(1,1);
00993                                     InvalidateRect(rc);
00994                                 }
00995
00996                                 GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_ITEMCLICK, idx);
00997                             }
00998                         }
00999                         else
01000                         {
01001                             if (ht1 == htItem)
01002                             {
01003                                 if (idx != index)
01004                                 {
01005                                     OUTBAR_INFO ob;
01006                                     ob.iDragFrom = iSelFolder;
01007                                     ob.iDragTo = index;
01008                                     if (GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_DRAGITEM, (LPARAM) &ob))
01009                                     {
01010                                         CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01011                                         CBarItem * piFrom = (CBarItem *) pbf->arItems.GetAt(index);
01012                                         pbf->arItems.RemoveAt(index);
01013                                         if (idx > index) idx --;
01014                                         pbf->arItems.InsertAt(idx, piFrom);
01015                                     }
01016                                 }
01017                             }
01018                             else
01019                             {
01020                                 CRect rcItem;
01021                                 GetItemRect(iSelFolder, GetItemCount() - 1, rcItem);
01022                                 if (pt.y > rcItem.bottom && pt.y < inRc.bottom)
01023                                 {
01024                                     OUTBAR_INFO ob;
01025                                     ob.iDragFrom = iSelFolder;
01026                                     ob.iDragTo = index;
01027                                     if (GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_DRAGITEM, (LPARAM) &ob))
01028                                     {
01029                                         CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01030                                         CBarItem * piFrom = (CBarItem *) pbf->arItems.GetAt(index);
01031                                         pbf->arItems.RemoveAt(index);
01032                                         pbf->arItems.Add((void *) piFrom);
01033                                     }
01034                                 }
01035                             }
01036                         }
01037                     }
01038
01039                     goto ExitLoop4;
01040
01041                 default:
01042                     DispatchMessage(&msg);
01043                     break;
01044                 }
01045             }
01046
01047         ExitLoop4:
01048             ReleaseCapture();
01049             AfxUnlockTempMaps(FALSE);
01050             if (bDragging)
01051             {
01052                 Invalidate();
01053             }
01054         }
01055         bPressedHighlight = false;
01056         if (bHigh) InvalidateRect(rc, false);
01057     }
01058     else iLastItemHighlighted = -1;
01059
01060     if (ht == htDownScroll)
01061     {
01062         bLooping = true;
01063         bool bHigh = true;
01064
01065         if (::GetCapture() == NULL)
01066         {
01067             SetCapture();
01068             ASSERT(this == GetCapture());
01069             CClientDC dc(this);
01070             dc.DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN|DFCS_PUSHED);
01071             SetTimer(2,300,NULL);
01072             AfxLockTempMaps();
01073             for (;;)
01074             {
01075                 MSG msg;
01076                 VERIFY(::GetMessage(&msg, NULL, 0, 0));
01077
01078                 if (CWnd::GetCapture() != this) break;
01079
01080                 switch (msg.message)
01081                 {
01082                 case WM_MOUSEMOVE:
01083                     {
01084                         CPoint pt(msg.lParam);
01085                         if (rcDownArrow.PtInRect(pt))
01086                         {
01087                             if (bHigh == false)
01088                             {
01089                                 dc.DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN|DFCS_PUSHED);
01090                                 bHigh = true;
01091                                 bDownArrow = true;
01092                                 bDownPressed = true;
01093                             }
01094                         }
01095                         else
01096                         {
01097                             if (bHigh == true)
01098                             {
01099                                 dc.DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN);
01100                                 bHigh = false;
01101                                 bDownArrow = false;
01102                                 bDownPressed = false;
01103                             }
01104                         }
01105                     }
01106                     break;
01107
01108                 case WM_LBUTTONUP:
01109                     {
01110                         if (bHigh)
01111                         {
01112                             dc.DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN);
01113                             bHigh = false;
01114                         }
01115                         bDownArrow = false;
01116                         CPoint pt(msg.lParam);
01117                         if (rcDownArrow.PtInRect(pt))
01118                         {
01119                             CRect itrc;
01120                             GetItemRect(iSelFolder, GetItemCount() - 1, itrc);
01121                             CRect crc;
01122                             GetInsideRect(crc);
01123                             if (itrc.bottom > crc.bottom)
01124                             {
01125                                 iFirstItem ++;
01126                                 InvalidateRect(crc, true);
01127                             }
01128                         }
01129                     }
01130                     goto ExitLoop3;
01131
01132
01133                 case WM_TIMER:
01134                     {
01135                         if (msg.wParam == 2)
01136                         {
01137                             if (bHigh)
01138                             {
01139                                 CPoint pt(msg.pt);
01140                                 ScreenToClient(&pt);
01141                                 if (rcDownArrow.PtInRect(pt))
01142                                 {
01143                                     bDownPressed = true;
01144                                     CRect itrc;
01145                                     GetItemRect(iSelFolder, GetItemCount() - 1, itrc);
01146                                     CRect crc;
01147                                     GetInsideRect(crc);
01148                                     if (itrc.bottom > crc.bottom)
01149                                     {
01150                                         iFirstItem ++;
01151                                         InvalidateRect(crc, true);
01152                                     }
01153                                     else goto ExitLoop3;
01154                                 }
01155                                 else bDownPressed = false;
01156                             }
01157                         }
01158                         break;
01159                     }
01160
01161                 case WM_KEYDOWN:
01162                     if (msg.wParam != VK_ESCAPE)
01163                         break;
01164
01165                 default:
01166                     DispatchMessage(&msg);
01167                     break;
01168                 }
01169             }
01170
01171         ExitLoop3:
01172             KillTimer(2);
01173             ReleaseCapture();
01174             AfxUnlockTempMaps(FALSE);
01175             bLooping = false;
01176             bDownPressed = false;
01177             bDownArrow = false;
01178             CRect crc;
01179             GetInsideRect(crc);
01180             InvalidateRect(crc, true);
01181         }
01182     }
01183
01184     if (ht == htUpScroll)
01185     {
01186         bLooping = true;
01187         bool bHigh = true;
01188
01189         if (::GetCapture() == NULL)
01190         {
01191             SetCapture();
01192             ASSERT(this == GetCapture());
01193             CClientDC dc(this);
01194             dc.DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP|DFCS_PUSHED);
01195             SetTimer(2,300,NULL);
01196             AfxLockTempMaps();
01197             for (;;)
01198             {
01199                 MSG msg;
01200                 VERIFY(::GetMessage(&msg, NULL, 0, 0));
01201
01202                 if (CWnd::GetCapture() != this) break;
01203
01204                 switch (msg.message)
01205                 {
01206                 case WM_MOUSEMOVE:
01207                     {
01208                         CPoint pt(msg.lParam);
01209                         if (rcUpArrow.PtInRect(pt))
01210                         {
01211                             if (bHigh == false)
01212                             {
01213                                 dc.DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP|DFCS_PUSHED);
01214                                 bHigh = true;
01215                                 bUpArrow = true;
01216                                 bUpPressed = true;
01217                             }
01218                         }
01219                         else
01220                         {
01221                             if (bHigh == true)
01222                             {
01223                                 dc.DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP);
01224                                 bHigh = false;
01225                                 bUpArrow = false;
01226                                 bUpPressed = false;
01227                             }
01228                         }
01229                     }
01230                     break;
01231
01232                 case WM_LBUTTONUP:
01233                     {
01234                         if (bHigh)
01235                         {
01236                             dc.DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP);
01237                             bHigh = false;
01238                         }
01239                         bUpArrow = false;
01240                         CPoint pt(msg.lParam);
01241                         if (rcUpArrow.PtInRect(pt))
01242                         {
01243                             if (iFirstItem > 0 )
01244                             {
01245                                 iFirstItem --;
01246                                 CRect crc;
01247                                 GetInsideRect(crc);
01248                                 InvalidateRect(crc, true);
01249                             }
01250                         }
01251                     }
01252
01253                     goto ExitLoop;
01254
01255                 case WM_TIMER:
01256                     {
01257                         if (msg.wParam == 2)
01258                         {
01259                             if (bHigh)
01260                             {
01261                                 CPoint pt(msg.pt);
01262                                 ScreenToClient(&pt);
01263                                 if (rcUpArrow.PtInRect(pt))
01264                                 {
01265                                     bUpPressed = true;
01266                                     if (iFirstItem > 0)
01267                                     {
01268                                         iFirstItem --;
01269                                         CRect crc;
01270                                         GetInsideRect(crc);
01271                                         InvalidateRect(crc, true);
01272                                     }
01273                                     else goto ExitLoop;
01274                                 }
01275                                 else bUpPressed = false;
01276                             }
01277                         }
01278                         break;
01279                     }
01280                 case WM_KEYDOWN:
01281                     if (msg.wParam != VK_ESCAPE) break;
01282
01283                 default:
01284                     DispatchMessage(&msg);
01285                     break;
01286                 }
01287             }
01288
01289         ExitLoop:
01290             KillTimer(2);
01291             ReleaseCapture();
01292             AfxUnlockTempMaps(FALSE);
01293             bLooping = false;
01294             bUpPressed = false;
01295             bUpArrow = false;
01296             CRect crc;
01297             GetInsideRect(crc);
01298             InvalidateRect(crc, true);
01299         }
01300     }
01301
01302     CWnd::OnLButtonDown(nFlags, point);
01303 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnMouseMove | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 641 of file GfxOutBarCtrl.cpp.

References HighlightFolder(), HighlightItem(), HitTestEx(), htFolder, htItem, iLastFolderHighlighted, iLastItemHighlighted, and NULL.

00642 {
00643     int index, ht = HitTestEx(point, index);
00644
00645     if (ht != htFolder && iLastFolderHighlighted >= 0) HighlightFolder(-1);
00646     if (ht != htItem   && iLastItemHighlighted   >= 0) HighlightItem(-1);
00647
00648     if (ht == htFolder)
00649     {
00650         HighlightFolder(index);
00651         SetTimer(1,100,NULL);
00652     }
00653     else if (ht == htItem)
00654     {
00655         HighlightItem(index);
00656         SetTimer(1,100,NULL);
00657     }
00658
00659     CWnd::OnMouseMove(nFlags, point);
00660 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnPaint ( ) [protected]

Definition at line 395 of file GfxOutBarCtrl.cpp.

References arFolder, bDownArrow, bDownPressed, bPressedHighlight, bUpArrow, bUpPressed, crBackGroundColor, DrawFolder(), GetFolderChild(), GetFolderRect(), GetInsideRect(), GetItemCount(), GetVisibleRange(), HighlightFolder(), HighlightItem(), iLastFolderHighlighted, iLastItemHighlighted, iSelFolder, PaintItems(), rcDownArrow, and rcUpArrow.

00396 {
00397     CRect clientRc;
00398     GetClientRect(&clientRc);
00399     CPaintDC dc(this);
00400     CDC memDC;
00401     memDC.CreateCompatibleDC(&dc);
00402     CBitmap bmp;
00403     bmp.CreateCompatibleBitmap(&dc, clientRc.Width(), clientRc.Height());
00404     CBitmap * obmp = memDC.SelectObject(&bmp);
00405
00406     CDC * pDC = &memDC;
00407
00408     CRect rc;
00409     GetInsideRect(rc);
00410     if (!GetFolderChild()) pDC->FillSolidRect(rc, crBackGroundColor);
00411
00412
00413     int max = arFolder.GetSize();
00414     CRect frc;
00415     for (int t = 0; t < max; t++)
00416     {
00417         GetFolderRect(t, frc);
00418         DrawFolder(pDC, t, frc, false);
00419     }
00420     if (!GetFolderChild())
00421     {
00422         int f,l;
00423         GetVisibleRange(iSelFolder, f,l);
00424         rcUpArrow.SetRect(0,0,GetSystemMetrics(SM_CXVSCROLL), GetSystemMetrics(SM_CXVSCROLL));
00425         rcDownArrow = rcUpArrow;
00426         rcUpArrow.OffsetRect(rc.right - 5 - GetSystemMetrics(SM_CXVSCROLL), rc.top +5);
00427         rcDownArrow.OffsetRect(rc.right - 5 - GetSystemMetrics(SM_CXVSCROLL), rc.bottom - 5 - GetSystemMetrics(SM_CXVSCROLL));
00428
00429         if (f > 0)
00430         {
00431             if (bUpPressed) pDC->DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP|DFCS_PUSHED);
00432             else pDC->DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP);
00433             bUpArrow = true;
00434             pDC->ExcludeClipRect(rcUpArrow);
00435         }
00436         else bUpArrow = false;
00437
00438         if (l < GetItemCount() - 1)
00439         {
00440             if (bDownPressed) pDC->DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN|DFCS_PUSHED);
00441             else pDC->DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN);
00442             bDownArrow = true;
00443             pDC->ExcludeClipRect(rcDownArrow);
00444         }
00445         else bDownArrow = false;
00446
00447         PaintItems(pDC, iSelFolder, rc);
00448     }
00449
00450     dc.BitBlt(clientRc.left, clientRc.top, clientRc.Width(), clientRc.Height(), &memDC, 0,0, SRCCOPY);
00451
00452     memDC.SelectObject(obmp);
00453
00454     if (iLastFolderHighlighted >= 0)
00455     {
00456         int i = iLastFolderHighlighted;
00457         iLastFolderHighlighted = -1;
00458         HighlightFolder(i);
00459     }
00460     if (iLastItemHighlighted >= 0)
00461     {
00462         int i = iLastItemHighlighted;
00463         iLastItemHighlighted = -1;
00464         HighlightItem(i, bPressedHighlight);
00465     }
00466
00467     // fix potential resource leak - KStowell - 10-21-99
00468     memDC.DeleteDC();
00469     bmp.DeleteObject();
00470 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 1880 of file GfxOutBarCtrl.cpp.

References CCJMenu::DestroyMenu(), dwFlags, fEditGroups, fEditItems, fRemoveGroups, fRemoveItems, HitTestEx(), htFolder, htItem, ID_GFX_REMOVEITEM, ID_GFX_RENAMEITEM, IDR_GFXOUTBAR, iHitInternal1, iHitInternal2, CCJMenu::LoadMenu(), CCJMenu::LoadToolbar(), m_popupMenu, m_strRemoveItem, m_strRenameItem, and NULL.

01881 {
01882     iHitInternal1 = HitTestEx(point, iHitInternal2);
01883
01884     SetCapture();
01885
01886     CPoint pt = point;
01887     ClientToScreen(&pt);
01888
01889     // Load the popup menu.
01890     VERIFY(m_popupMenu.LoadMenu(IDR_GFXOUTBAR));
01891     CCJMenu* pPopup = (CCJMenu*)m_popupMenu.GetSubMenu(0);
01892     ASSERT(pPopup != NULL);
01893
01894     // Load toolbar resource if any for menu icons.
01895     pPopup->LoadToolbar(IDR_GFXOUTBAR);
01896
01897     if (iHitInternal1 == htItem)
01898     {
01899         if (dwFlags&fRemoveItems || dwFlags&fEditItems)
01900         {
01901             pPopup->AppendMenu(MF_SEPARATOR);
01902             if (dwFlags&fRemoveItems)
01903                 ((CMenu*)pPopup)->AppendMenu(MF_STRING, ID_GFX_REMOVEITEM, m_strRemoveItem);
01904
01905             if (dwFlags&fEditItems)
01906                 ((CMenu*)pPopup)->AppendMenu(MF_STRING, ID_GFX_RENAMEITEM, m_strRenameItem);
01907         }
01908     }
01909     else if (iHitInternal1 == htFolder)
01910     {
01911         if (dwFlags&fRemoveGroups || dwFlags&fEditGroups)
01912         {
01913             ((CMenu*)pPopup)->AppendMenu(MF_SEPARATOR);
01914
01915             if (dwFlags&fRemoveGroups)
01916                 ((CMenu*)pPopup)->AppendMenu(MF_STRING, ID_GFX_REMOVEITEM, m_strRemoveItem);
01917
01918             if (dwFlags&fEditGroups)
01919                 ((CMenu*)pPopup)->AppendMenu(MF_STRING, ID_GFX_RENAMEITEM, m_strRenameItem);
01920         }
01921     }
01922
01923     // Display the popup menu, use the main window as its parent.
01924     pPopup->TrackPopupMenu( TPM_LEFTALIGN | TPM_RIGHTBUTTON,
01925         pt.x, pt.y, this );
01926
01927     m_popupMenu.DestroyMenu();
01928     ReleaseCapture();
01929
01930     CWnd::OnRButtonDown(nFlags, point);
01931 }

Here is the call graph for this function:

BOOL CGfxOutBarCtrl::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message
 | ) | [protected]

Definition at line 1639 of file GfxOutBarCtrl.cpp.

References hHandCursor, HitTestEx(), and htFolder.

01640 {
01641     CPoint pt(GetMessagePos());
01642     ScreenToClient(&pt);
01643     int index, ht = HitTestEx(pt, index);
01644     if (ht == htFolder)
01645     {
01646         SetCursor(hHandCursor);
01647         return true;
01648     }
01649
01650     return CWnd::OnSetCursor(pWnd, nHitTest, message);
01651 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy
 | ) | [protected]

Definition at line 1674 of file GfxOutBarCtrl.cpp.

References bDownArrow, bUpArrow, GetFolderChild(), GetFolderCount(), and GetInsideRect().

01675 {
01676     bUpArrow = bDownArrow = false;
01677
01678     CWnd::OnSize(nType, cx, cy);
01679
01680     int t, max = GetFolderCount();
01681     CRect rc;
01682     GetInsideRect(rc);
01683
01684     for (t = 0; t < max; t++)
01685     {
01686         CWnd * pc = GetFolderChild(t);
01687         if (pc) pc->SetWindowPos(0, rc.left, rc.top, rc.Width(), rc.Height(), SWP_NOZORDER);
01688     }
01689 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnSysColorChange ( ) [protected]

Definition at line 2346 of file GfxOutBarCtrl.cpp.

References cr3dFace, crBackGroundColor, crBackGroundColor1, crDkShadowBorder, crHilightBorder, crLightBorder, crShadowBorder, and crTextColor.

02347 {
02348     // TODO: Add your message handler code here
02349     crBackGroundColor   = ::GetSysColor(COLOR_3DSHADOW);//RGB(0,128,128);//
02350     crBackGroundColor1  = ::GetSysColor(COLOR_3DSHADOW);
02351     crTextColor         = ::GetSysColor(COLOR_WINDOW);
02352     cr3dFace            = ::GetSysColor(COLOR_3DFACE);
02353     crLightBorder       = ::GetSysColor(COLOR_3DLIGHT);
02354     crHilightBorder     = ::GetSysColor(COLOR_3DHILIGHT);
02355     crShadowBorder      = ::GetSysColor(COLOR_3DSHADOW);
02356     crDkShadowBorder    = ::GetSysColor(COLOR_3DDKSHADOW);
02357
02358     CWnd::OnSysColorChange();
02359 }

void CGfxOutBarCtrl::OnTimer ( UINT nIDEvent ) [protected]

Definition at line 298 of file GfxOutBarCtrl.cpp.

References DrawAnimItem(), HighlightFolder(), HighlightItem(), iLastSel, and iSelAnimCount.

00299 {
00300     if (nIDEvent == 1)
00301     {
00302         CPoint pt(GetMessagePos());
00303
00304         ScreenToClient(&pt);
00305
00306         CRect rc;
00307         GetClientRect(&rc);
00308         if (!(rc.PtInRect(pt)))
00309         {
00310             HighlightFolder(-1);
00311             HighlightItem(-1);
00312             KillTimer(1);
00313         }
00314     }
00315     else if (nIDEvent == 3 && iLastSel >= 0)
00316     {
00317         iSelAnimCount ++;
00318         if (iSelAnimCount > 10) iSelAnimCount = -1;
00319         if (iSelAnimCount == 0)
00320             DrawAnimItem(-1, 1, iLastSel);
00321         if (iSelAnimCount == 1)
00322             DrawAnimItem(0, 0, iLastSel);
00323         if (iSelAnimCount == 2)
00324             DrawAnimItem(1, 1, iLastSel);
00325         if (iSelAnimCount == 3)
00326             DrawAnimItem(0, 0, iLastSel);
00327     }
00328     CWnd::OnTimer(nIDEvent);
00329 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnUpdateGfxLargeicon ( CCmdUI * pCmdUI ) [protected]

Definition at line 1939 of file GfxOutBarCtrl.cpp.

References IsSmallIconView().

01940 {
01941     pCmdUI->Enable(IsSmallIconView());
01942 }

Here is the call graph for this function:

void CGfxOutBarCtrl::OnUpdateGfxRemoveitem ( CCmdUI * pCmdUI ) [protected]

Definition at line 1967 of file GfxOutBarCtrl.cpp.

01968 {
01969
01970 }

void CGfxOutBarCtrl::OnUpdateGfxRenameitem ( CCmdUI * pCmdUI ) [protected]

Definition at line 1984 of file GfxOutBarCtrl.cpp.

01985 {
01986 }

void CGfxOutBarCtrl::OnUpdateGfxSmallicon ( CCmdUI * pCmdUI ) [protected]

Definition at line 1950 of file GfxOutBarCtrl.cpp.

References IsSmallIconView().

01951 {
01952     pCmdUI->Enable(!IsSmallIconView());
01953 }

Here is the call graph for this function:

void CGfxOutBarCtrl::PaintItems | ( | CDC * | pDC,
 |  | const int | iFolder,
 |  | CRect | rc
 | ) | [virtual]

Definition at line 1470 of file GfxOutBarCtrl.cpp.

References arFolder, DrawItem(), GetFolderCount(), GetInsideRect(), CGfxOutBarCtrl::CBarFolder::GetItemCount(), GetItemRect(), and iFirstItem.

Referenced by AnimateFolderScroll(), and OnPaint().

01471 {
01472     ASSERT(iFolder >= 0 && iFolder < GetFolderCount());
01473     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
01474     int max = pbf->GetItemCount(), t;
01475     CRect irc;
01476     GetInsideRect(irc);
01477     int isdc = pDC->SaveDC();
01478     CRgn itemRegion;
01479     itemRegion.CreateRectRgnIndirect(&irc);
01480     pDC->SelectClipRgn(&itemRegion);
01481     itemRegion.DeleteObject();
01482     for (t = iFirstItem; t < max; t++)
01483     {
01484         CRect itemRc;
01485         GetItemRect(iFolder, t, itemRc);
01486         if (itemRc.top > rc.bottom) break;
01487         else DrawItem(pDC, iFolder, itemRc, t);
01488     }
01489     pDC->RestoreDC(isdc);
01490 }

Here is the call graph for this function:

void CGfxOutBarCtrl::RemoveFolder ( const int index ) [virtual]

Definition at line 1363 of file GfxOutBarCtrl.cpp.

References arFolder, GetFolderCount(), and iSelFolder.

Referenced by OnGfxRemoveitem().

01364 {
01365     ASSERT(index >= 0 && index < GetFolderCount());
01366     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(index);
01367     delete pbf;
01368     arFolder.RemoveAt(index);
01369     if (iSelFolder >= index) iSelFolder = index - 1;
01370     if (iSelFolder < 0 && GetFolderCount() > 0) iSelFolder = 0;
01371     Invalidate();
01372 }

Here is the call graph for this function:

void CGfxOutBarCtrl::RemoveItem ( const int index ) [virtual]

Definition at line 1988 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, GetFolderCount(), GetInsideRect(), GetItemCount(), iSelFolder, and IsValidItem().

Referenced by OnGfxRemoveitem().

01989 {
01990     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
01991     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01992     ASSERT(index >= 0 && index < pbf->GetItemCount());
01993     if (IsValidItem(index))
01994     {
01995         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
01996         delete i;
01997
01998         pbf->arItems.RemoveAt(index);
01999         CRect rc;
02000         GetInsideRect(rc);
02001         InvalidateRect(rc);
02002     }
02003 }

Here is the call graph for this function:

virtual void CGfxOutBarCtrl::SetAnimationTickCount ( const long value ) [inline, virtual]

Definition at line 165 of file GfxOutBarCtrl.h.

00165 { lAnimationTickCount = value; };

void CGfxOutBarCtrl::SetAnimSelHighlight ( const int iTime ) [virtual]

Definition at line 2339 of file GfxOutBarCtrl.cpp.

References iSelAnimTiming, and NULL.

02340 {
02341     if (iTime <= 0) KillTimer(3);
02342     else SetTimer(3, iTime, NULL);
02343     iSelAnimTiming = iTime;
02344 }

CImageList * CGfxOutBarCtrl::SetFolderImageList | ( | const int | folder,
 |  | CImageList * | pImageList,
 |  | int | nImageList
 | ) | [virtual]

Definition at line 1426 of file GfxOutBarCtrl.cpp.

References arFolder, fLargeIcon, fSmallIcon, GetFolderCount(), NULL, CGfxOutBarCtrl::CBarFolder::pLargeImageList, and CGfxOutBarCtrl::CBarFolder::pSmallImageList.

01427 {
01428     ASSERT(folder >= 0 && folder < GetFolderCount());
01429     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(folder);
01430     CImageList * o = NULL;
01431     if (nImageList == fSmallIcon)
01432     {
01433         o = pbf->pSmallImageList;
01434         pbf->pSmallImageList = pImageList;
01435     }
01436     else if (nImageList == fLargeIcon)
01437     {
01438         o = pbf->pLargeImageList;
01439         pbf->pLargeImageList = pImageList;
01440     }
01441     return o;
01442 }

Here is the call graph for this function:

void CGfxOutBarCtrl::SetFolderText | ( | const int | index,
 |  | LPCTSTR | text
 | ) | [virtual]

Definition at line 197 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::cName, GetFolderCount(), and NULL.

00198 {
00199     ASSERT(index >= 0 && index < GetFolderCount());
00200
00201     CBarFolder* pbf = (CBarFolder *) arFolder.GetAt(index);
00202
00203     if( pbf->cName )
00204     {
00205         delete [] pbf->cName;
00206         pbf->cName = NULL;
00207     }
00208
00209     pbf->cName = new TCHAR[ _tcslen( text ) + 1 ];
00210
00211     _tcscpy( pbf->cName, text );
00212 }

Here is the call graph for this function:

CImageList * CGfxOutBarCtrl::SetImageList | ( | CImageList * | pImageList,
 |  | int | nImageList
 | ) | [virtual]

Definition at line 1403 of file GfxOutBarCtrl.cpp.

References fLargeIcon, fSmallIcon, NULL, pLargeImageList, and pSmallImageList.

01404 {
01405     CImageList * o = NULL;
01406     if (nImageList == fSmallIcon)
01407     {
01408         o = pSmallImageList;
01409         pSmallImageList = pImageList;
01410     }
01411     else if (nImageList == fLargeIcon)
01412     {
01413         o = pLargeImageList;
01414         pLargeImageList = pImageList;
01415     }
01416     return o;
01417 }

void CGfxOutBarCtrl::SetItemData | ( | const int | index,
 |  | const DWORD | dwData
 | ) | [virtual]

Definition at line 2036 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, CGfxOutBarCtrl::CBarItem::dwData, GetFolderCount(), iSelFolder, and IsValidItem().

02037 {
02038     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02039     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02040     if (IsValidItem(index))
02041     {
02042         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
02043         i->dwData = dwData;
02044     }
02045 }

Here is the call graph for this function:

void CGfxOutBarCtrl::SetItemImage | ( | const int | index,
 |  | const int | iImage
 | ) | [virtual]

Definition at line 2047 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, GetFolderCount(), CGfxOutBarCtrl::CBarItem::iImageIndex, iSelFolder, and IsValidItem().

02048 {
02049     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02050     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02051     if (IsValidItem(index))
02052     {
02053         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
02054         i->iImageIndex = iImage;
02055     }
02056 }

Here is the call graph for this function:

void CGfxOutBarCtrl::SetItemText | ( | const int | index,
 |  | LPCTSTR | text
 | ) | [virtual]

Definition at line 214 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, CGfxOutBarCtrl::CBarItem::cItem, GetFolderCount(), iSelFolder, and NULL.

00215 {
00216     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
00217
00218     CBarFolder* pbf = (CBarFolder*) arFolder.GetAt(iSelFolder);
00219
00220     CBarItem*   pi  = (CBarItem*) pbf->arItems.GetAt(index);
00221
00222     if (pi->cItem)
00223     {
00224         delete [] pi->cItem;
00225         pi->cItem = NULL;
00226     }
00227
00228     pi->cItem = new TCHAR[ _tcslen( text ) + 1 ];
00229
00230     _tcscpy( pi->cItem, text );
00231 }

Here is the call graph for this function:

void CGfxOutBarCtrl::SetSelFolder ( const int index ) [virtual]

Definition at line 1322 of file GfxOutBarCtrl.cpp.

References AnimateFolderScroll(), dwFlags, fAnimation, GetFolderChild(), GetFolderCount(), GetInsideRect(), iFirstItem, iLastSel, iSelFolder, lAnimationTickCount, NM_FOLDERCHANGE, and WM_OUTBAR_NOTIFY.

Referenced by OnLButtonDown().

01323 {
01324     ASSERT(index >= 0 && index < GetFolderCount());
01325 //  if (index == iSelFolder) return;
01326
01327     CWnd * pc = GetFolderChild();
01328     if (pc) pc->ShowWindow(SW_HIDE);
01329
01330     if (index != iSelFolder)
01331     {
01332         if (dwFlags&fAnimation && lAnimationTickCount >= 0) AnimateFolderScroll(iSelFolder, index);
01333     }
01334
01335     iSelFolder = index;
01336     iFirstItem = 0;
01337     iLastSel = -1;
01338
01339     pc = GetFolderChild();
01340     if (pc)
01341     {
01342         CRect rc;
01343         GetInsideRect(rc);
01344         pc->MoveWindow(rc);
01345         pc->ShowWindow(SW_SHOW);
01346     }
01347
01348     GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_FOLDERCHANGE, (LPARAM) iSelFolder);
01349
01350     Invalidate();
01351 }

Here is the call graph for this function:

void CGfxOutBarCtrl::SetSmallIconView ( const bool bSet ) [virtual]

Definition at line 245 of file GfxOutBarCtrl.cpp.

References dwFlags, fSmallIcon, GetInsideRect(), iFirstItem, and IsSmallIconView().

Referenced by OnGfxLargeicon(), and OnGfxSmallicon().

00246 {
00247     iFirstItem = 0;
00248
00249     if (bSet)
00250     {
00251         if (!IsSmallIconView())
00252         {
00253             dwFlags |= fSmallIcon;
00254             CRect rc;
00255             GetInsideRect(rc);
00256             InvalidateRect(rc, false);
00257         }
00258     }
00259     else
00260     {
00261         if (IsSmallIconView())
00262         {
00263             dwFlags &= ~fSmallIcon;
00264             CRect rc;
00265             GetInsideRect(rc);
00266             InvalidateRect(rc, false);
00267         }
00268     }
00269 }

Here is the call graph for this function:

void CGfxOutBarCtrl::StartGroupEdit ( const int index ) [virtual]

Definition at line 1825 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::cName, GetFolderCount(), GetFolderRect(), CGfxGroupEdit::iIndex, CGfxGroupEdit::msgSend, and NM_OB_ONGROUPENDEDIT.

Referenced by OnGfxRenameitem().

01826 {
01827     CGfxGroupEdit * pEdit = new CGfxGroupEdit;
01828     pEdit->iIndex = index;
01829     CRect rc;
01830     GetFolderRect(index, rc);
01831     rc.InflateRect(-2,-2);
01832     pEdit->Create(WS_CHILD|WS_VISIBLE|ES_CENTER|ES_MULTILINE,rc,this,1);
01833     pEdit->msgSend = NM_OB_ONGROUPENDEDIT;
01834     pEdit->ModifyStyleEx(0, WS_EX_CLIENTEDGE, SWP_FRAMECHANGED);
01835     ASSERT(index >= 0 && index < GetFolderCount());
01836     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(index);
01837     pEdit->SetWindowText(pbf->cName);
01838     pEdit->SetFocus();
01839 }

Here is the call graph for this function:

void CGfxOutBarCtrl::StartItemEdit ( const int index ) [virtual]

Definition at line 1841 of file GfxOutBarCtrl.cpp.

References arFolder, CGfxOutBarCtrl::CBarFolder::arItems, CGfxGroupEdit::bNoDown, CGfxOutBarCtrl::CBarItem::cItem, GetFolderCount(), GetIconRect(), GetInsideRect(), GetItemCount(), GetLabelRect(), CGfxGroupEdit::iIndex, iSelFolder, IsSmallIconView(), CGfxGroupEdit::msgSend, and NM_OB_ONLABELENDEDIT.

Referenced by OnGfxRenameitem().

01842 {
01843     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
01844     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01845     ASSERT(index >= 0 && index < pbf->GetItemCount());
01846     CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
01847
01848     CGfxGroupEdit * pEdit = new CGfxGroupEdit;
01849     pEdit->iIndex = index;
01850     CRect rc, crc;
01851     GetLabelRect(iSelFolder, index, rc);
01852     GetInsideRect(crc);
01853
01854     DWORD dwFlag = WS_CHILD|WS_VISIBLE|WS_BORDER;
01855
01856     if (!IsSmallIconView())
01857     {
01858         rc.left = crc.left + 5;
01859         rc.right = crc.right - 5;
01860         rc.bottom += 5;
01861         dwFlag |= ES_CENTER|ES_MULTILINE;
01862     }
01863     else
01864     {
01865         CRect irc;
01866         GetIconRect(iSelFolder, index, irc);
01867         dwFlag |= ES_AUTOHSCROLL;
01868         rc.OffsetRect(irc.Width()+1, -6);
01869         pEdit->bNoDown = true;
01870     }
01871
01872     pEdit->Create(dwFlag, rc, this, 1);
01873     pEdit->msgSend = NM_OB_ONLABELENDEDIT;
01874
01875     pEdit->SetWindowText(pi->cItem);
01876     pEdit->SetFocus();
01877
01878 }

Here is the call graph for this function:

Member Data Documentation

CPtrArray CGfxOutBarCtrl::arFolder

Definition at line 97 of file GfxOutBarCtrl.h.

Referenced by AddFolder(), AddFolderBar(), DrawAnimItem(), DrawFolder(), DrawItem(), GetFolderChild(), GetFolderCount(), GetFolderData(), GetFolderImageList(), GetFolderRect(), GetInsideRect(), GetItemCount(), GetItemData(), GetItemImage(), GetItemSize(), GetItemText(), GetVisibleRange(), HitTestEx(), InsertItem(), IsValidItem(), OnLButtonDown(), OnPaint(), PaintItems(), RemoveFolder(), RemoveItem(), SetFolderImageList(), SetFolderText(), SetItemData(), SetItemImage(), SetItemText(), StartGroupEdit(), StartItemEdit(), and ~CGfxOutBarCtrl().

bool CGfxOutBarCtrl::bDownArrow

Definition at line 83 of file GfxOutBarCtrl.h.

Referenced by HitTestEx(), OnLButtonDown(), OnPaint(), and OnSize().

bool CGfxOutBarCtrl::bDownPressed

Definition at line 83 of file GfxOutBarCtrl.h.

Referenced by OnLButtonDown(), and OnPaint().

bool CGfxOutBarCtrl::bLooping

Definition at line 85 of file GfxOutBarCtrl.h.

Referenced by OnLButtonDown().

bool CGfxOutBarCtrl::bPressedHighlight

Definition at line 104 of file GfxOutBarCtrl.h.

Referenced by OnLButtonDown(), and OnPaint().

bool CGfxOutBarCtrl::bUpArrow

Definition at line 83 of file GfxOutBarCtrl.h.

Referenced by HitTestEx(), OnLButtonDown(), OnPaint(), and OnSize().

bool CGfxOutBarCtrl::bUpPressed

Definition at line 83 of file GfxOutBarCtrl.h.

Referenced by OnLButtonDown(), and OnPaint().

COLORREF CGfxOutBarCtrl::cr3dFace

Definition at line 76 of file GfxOutBarCtrl.h.

Referenced by DrawFolder(), DrawItem(), HighlightFolder(), HighlightItem(), and OnSysColorChange().

COLORREF CGfxOutBarCtrl::crBackGroundColor

Definition at line 74 of file GfxOutBarCtrl.h.

Referenced by AnimateFolderScroll(), DrawAnimItem(), HighlightItem(), OnPaint(), and OnSysColorChange().

COLORREF CGfxOutBarCtrl::crBackGroundColor1

Definition at line 74 of file GfxOutBarCtrl.h.

Referenced by DrawFolder(), HighlightFolder(), and OnSysColorChange().

COLORREF CGfxOutBarCtrl::crDkShadowBorder

Definition at line 76 of file GfxOutBarCtrl.h.

Referenced by DrawFolder(), DrawItem(), HighlightFolder(), HighlightItem(), and OnSysColorChange().

COLORREF CGfxOutBarCtrl::crHilightBorder

Definition at line 76 of file GfxOutBarCtrl.h.

Referenced by DrawFolder(), and OnSysColorChange().

COLORREF CGfxOutBarCtrl::crLightBorder

Definition at line 76 of file GfxOutBarCtrl.h.

Referenced by OnSysColorChange().

COLORREF CGfxOutBarCtrl::crShadowBorder

Definition at line 76 of file GfxOutBarCtrl.h.

Referenced by OnSysColorChange().

COLORREF CGfxOutBarCtrl::crTextColor

Definition at line 75 of file GfxOutBarCtrl.h.

Referenced by DrawItem(), and OnSysColorChange().

DWORD CGfxOutBarCtrl::dwFlags

Definition at line 95 of file GfxOutBarCtrl.h.

Referenced by Create(), DrawItem(), GetFlag(), HighlightItem(), IsSmallIconView(), ModifyFlag(), OnLButtonDown(), OnRButtonDown(), SetSelFolder(), and SetSmallIconView().

HCURSOR CGfxOutBarCtrl::hDragCursor

Definition at line 139 of file GfxOutBarCtrl.h.

Referenced by OnLButtonDown().

HCURSOR CGfxOutBarCtrl::hHandCursor

Definition at line 138 of file GfxOutBarCtrl.h.

Referenced by OnSetCursor().

HCURSOR CGfxOutBarCtrl::hNoDragCursor

Definition at line 140 of file GfxOutBarCtrl.h.

Referenced by OnLButtonDown().

int CGfxOutBarCtrl::iFirstItem

Definition at line 101 of file GfxOutBarCtrl.h.

Referenced by DrawAnimItem(), GetIconRect(), GetItemRect(), GetLabelRect(), GetVisibleRange(), HitTestEx(), OnLButtonDown(), PaintItems(), SetSelFolder(), and SetSmallIconView().

int CGfxOutBarCtrl::iFolderHeight

Definition at line 77 of file GfxOutBarCtrl.h.

Referenced by GetFolderRect(), and GetInsideRect().

int CGfxOutBarCtrl::iHitInternal1

Definition at line 87 of file GfxOutBarCtrl.h.

Referenced by OnGfxRemoveitem(), OnGfxRenameitem(), and OnRButtonDown().

int CGfxOutBarCtrl::iHitInternal2

Definition at line 87 of file GfxOutBarCtrl.h.

Referenced by OnGfxRemoveitem(), OnGfxRenameitem(), and OnRButtonDown().

int CGfxOutBarCtrl::iLastDragItemDraw

Definition at line 106 of file GfxOutBarCtrl.h.

Referenced by DrawDragArrow(), and OnLButtonDown().

int CGfxOutBarCtrl::iLastDragItemDrawType

Definition at line 106 of file GfxOutBarCtrl.h.

Referenced by DrawDragArrow(), and OnLButtonDown().

int CGfxOutBarCtrl::iLastFolderHighlighted

Definition at line 99 of file GfxOutBarCtrl.h.

Referenced by HighlightFolder(), OnMouseMove(), and OnPaint().

int CGfxOutBarCtrl::iLastItemHighlighted

Definition at line 103 of file GfxOutBarCtrl.h.

Referenced by HighlightItem(), OnLButtonDown(), OnMouseMove(), and OnPaint().

int CGfxOutBarCtrl::iLastSel

Definition at line 91 of file GfxOutBarCtrl.h.

Referenced by DrawAnimItem(), DrawItem(), HighlightItem(), OnLButtonDown(), OnTimer(), and SetSelFolder().

int CGfxOutBarCtrl::iLastSelectedFolder

Definition at line 100 of file GfxOutBarCtrl.h.

Referenced by OnLButtonDown().

int CGfxOutBarCtrl::iSelAnimCount

Definition at line 92 of file GfxOutBarCtrl.h.

Referenced by OnTimer().

int CGfxOutBarCtrl::iSelAnimTiming

Definition at line 91 of file GfxOutBarCtrl.h.

Referenced by HighlightItem(), OnLButtonDown(), and SetAnimSelHighlight().

int CGfxOutBarCtrl::iSelFolder

Definition at line 133 of file GfxOutBarCtrl.h.

Referenced by DrawAnimItem(), DrawItem(), GetDragItemRect(), GetFolderChild(), GetFolderData(), GetFolderRect(), GetInsideRect(), GetItemCount(), GetItemData(), GetItemImage(), GetItemText(), GetSelFolder(), HighlightItem(), HitTestEx(), IsValidItem(), OnLButtonDown(), OnPaint(), RemoveFolder(), RemoveItem(), SetItemData(), SetItemImage(), SetItemText(), SetSelFolder(), and StartItemEdit().

long CGfxOutBarCtrl::lAnimationTickCount

Definition at line 89 of file GfxOutBarCtrl.h.

Referenced by AnimateFolderScroll(), and SetSelFolder().

CCJMenu CGfxOutBarCtrl::m_popupMenu

Definition at line 144 of file GfxOutBarCtrl.h.

Referenced by OnRButtonDown().

CString CGfxOutBarCtrl::m_strRemoveItem

Definition at line 145 of file GfxOutBarCtrl.h.

Referenced by OnRButtonDown().

CString CGfxOutBarCtrl::m_strRenameItem

Definition at line 146 of file GfxOutBarCtrl.h.

Referenced by OnRButtonDown().

CPen* CGfxOutBarCtrl::pBlackPen

Definition at line 142 of file GfxOutBarCtrl.h.

Referenced by DrawDragArrow(), and ~CGfxOutBarCtrl().

CImageList* CGfxOutBarCtrl::pLargeImageList

Definition at line 135 of file GfxOutBarCtrl.h.

Referenced by GetFolderImageList(), GetImageList(), and SetImageList().

CImageList* CGfxOutBarCtrl::pSmallImageList

Definition at line 136 of file GfxOutBarCtrl.h.

Referenced by GetFolderImageList(), GetImageList(), and SetImageList().

CRect CGfxOutBarCtrl::rcDownArrow

Definition at line 84 of file GfxOutBarCtrl.h.

Referenced by HitTestEx(), OnLButtonDown(), and OnPaint().

CRect CGfxOutBarCtrl::rcUpArrow

Definition at line 84 of file GfxOutBarCtrl.h.

Referenced by HitTestEx(), OnLButtonDown(), and OnPaint().

int CGfxOutBarCtrl::xLeftMargin

Definition at line 82 of file GfxOutBarCtrl.h.

Referenced by GetIconRect(), GetItemRect(), and GetLabelRect().

int CGfxOutBarCtrl::xSmallIconLabelOffset

Definition at line 79 of file GfxOutBarCtrl.h.

Referenced by DrawItem(), and GetItemSize().

int CGfxOutBarCtrl::yLargeIconLabelOffset

Definition at line 79 of file GfxOutBarCtrl.h.

Referenced by DrawItem(), GetItemSize(), and HitTestEx().

int CGfxOutBarCtrl::yLargeIconSpacing

Definition at line 80 of file GfxOutBarCtrl.h.

Referenced by GetIconRect(), GetItemRect(), GetItemSize(), and GetLabelRect().

int CGfxOutBarCtrl::ySmallIconSpacing

Definition at line 80 of file GfxOutBarCtrl.h.

Referenced by GetIconRect(), GetItemRect(), and GetLabelRect().

int CGfxOutBarCtrl::yTopMargin

Definition at line 82 of file GfxOutBarCtrl.h.

Referenced by GetIconRect(), GetItemRect(), and GetLabelRect().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/GfxOutBarCtrl.h
  • WinCvs/CJLib/CJLibrary/GfxOutBarCtrl.cpp
Generated on Sat Aug 7 22:52:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGfxOutBarCtrl::CBarFolder Class Reference

CGfxOutBarCtrl::CBarFolder Class Reference

#include <GfxOutBarCtrl.h>

Collaboration diagram for CGfxOutBarCtrl::CBarFolder:

[legend]
List of all members.

Public Member Functions

CBarFolder (LPCTSTR name, DWORD exData)
virtual | ~CBarFolder ()
int GetItemCount ()
int | InsertItem (int index, LPCTSTR text, const int image, const DWORD exData)

Public Attributes

LPTSTR | cName
DWORD | dwData
CImageList * | pLargeImageList
CImageList * | pSmallImageList
CPtrArray | arItems
CWnd * | pChild

Constructor & Destructor Documentation

CGfxOutBarCtrl::CBarFolder::CBarFolder | ( | LPCTSTR | name,
 |  | DWORD | exData
 | ) |

Definition at line 601 of file GfxOutBarCtrl.cpp.

References cName, dwData, NULL, pChild, pLargeImageList, and pSmallImageList.

00602 {
00603     cName  = NULL;
00604     dwData = exData;
00605
00606     if( name )
00607     {
00608         cName = new TCHAR[ _tcslen( name ) + 1 ];
00609
00610         ASSERT(cName);
00611
00612         _tcscpy( cName, name );
00613     }
00614
00615     pLargeImageList = NULL;
00616     pSmallImageList = NULL;
00617     pChild          = NULL;
00618 }

CGfxOutBarCtrl::CBarFolder::~CBarFolder ( ) [virtual]

Definition at line 620 of file GfxOutBarCtrl.cpp.

References arItems, and cName.

00621 {
00622     if (cName) delete [] cName;
00623     for (int t = 0; t < arItems.GetSize(); t++)
00624         if (arItems.GetAt(t)) delete (CBarFolder*) arItems.GetAt(t);
00625
00626     arItems.RemoveAll();
00627 }

Member Function Documentation

int CGfxOutBarCtrl::CBarFolder::GetItemCount ( )

Definition at line 1465 of file GfxOutBarCtrl.cpp.

References arItems.

Referenced by CGfxOutBarCtrl::GetItemCount(), CGfxOutBarCtrl::GetVisibleRange(), CGfxOutBarCtrl::HitTestEx(), InsertItem(), CGfxOutBarCtrl::IsValidItem(), and CGfxOutBarCtrl::PaintItems().

01466 {
01467     return arItems.GetSize();
01468 }

int CGfxOutBarCtrl::CBarFolder::InsertItem | ( | int | index,
 |  | LPCTSTR | text,
 |  | const int | image,
 |  | const DWORD | exData
 | ) |

Definition at line 1374 of file GfxOutBarCtrl.cpp.

References arItems, and GetItemCount().

Referenced by CGfxOutBarCtrl::InsertItem().

01375 {
01376     if (index < 0 || index > GetItemCount()) index = GetItemCount();
01377
01378     int c = GetItemCount();
01379
01380     CBarItem* pbf = new CBarItem(text, image, exData);
01381
01382     ASSERT(pbf);
01383
01384     if( index < GetItemCount())
01385     {
01386         arItems.InsertAt(index, (void *) pbf);
01387     }
01388     else
01389     {
01390         arItems.Add((void *) pbf);
01391     }
01392
01393     c = GetItemCount();
01394
01395     return index;
01396 }

Here is the call graph for this function:

Member Data Documentation

CPtrArray CGfxOutBarCtrl::CBarFolder::arItems

Definition at line 129 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::DrawAnimItem(), CGfxOutBarCtrl::DrawItem(), GetItemCount(), CGfxOutBarCtrl::GetItemData(), CGfxOutBarCtrl::GetItemImage(), CGfxOutBarCtrl::GetItemSize(), CGfxOutBarCtrl::GetItemText(), InsertItem(), CGfxOutBarCtrl::OnLButtonDown(), CGfxOutBarCtrl::RemoveItem(), CGfxOutBarCtrl::SetItemData(), CGfxOutBarCtrl::SetItemImage(), CGfxOutBarCtrl::SetItemText(), CGfxOutBarCtrl::StartItemEdit(), and ~CBarFolder().

LPTSTR CGfxOutBarCtrl::CBarFolder::cName

Definition at line 125 of file GfxOutBarCtrl.h.

Referenced by CBarFolder(), CGfxOutBarCtrl::DrawFolder(), CGfxOutBarCtrl::SetFolderText(), CGfxOutBarCtrl::StartGroupEdit(), and ~CBarFolder().

DWORD CGfxOutBarCtrl::CBarFolder::dwData

Definition at line 126 of file GfxOutBarCtrl.h.

Referenced by CBarFolder(), and CGfxOutBarCtrl::GetFolderData().

CWnd* CGfxOutBarCtrl::CBarFolder::pChild

Definition at line 130 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::AddFolderBar(), CBarFolder(), and CGfxOutBarCtrl::GetFolderChild().

CImageList* CGfxOutBarCtrl::CBarFolder::pLargeImageList

Definition at line 127 of file GfxOutBarCtrl.h.

Referenced by CBarFolder(), CGfxOutBarCtrl::GetFolderImageList(), and CGfxOutBarCtrl::SetFolderImageList().

CImageList* CGfxOutBarCtrl::CBarFolder::pSmallImageList

Definition at line 128 of file GfxOutBarCtrl.h.

Referenced by CBarFolder(), CGfxOutBarCtrl::GetFolderImageList(), and CGfxOutBarCtrl::SetFolderImageList().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/GfxOutBarCtrl.h
  • WinCvs/CJLib/CJLibrary/GfxOutBarCtrl.cpp
Generated on Sat Aug 7 22:52:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGfxOutBarCtrl::CBarItem Class Reference

CGfxOutBarCtrl::CBarItem Class Reference

#include <GfxOutBarCtrl.h>

Collaboration diagram for CGfxOutBarCtrl::CBarItem:

[legend]
List of all members.

Public Member Functions

CBarItem (LPCTSTR name, const int image, DWORD exData)
virtual | ~CBarItem ()

Public Attributes

int iImageIndex
LPTSTR | cItem
DWORD | dwData

Constructor & Destructor Documentation

CGfxOutBarCtrl::CBarItem::CBarItem | ( | LPCTSTR | name,
 |  | const int | image,
 |  | DWORD | exData
 | ) |

Definition at line 1444 of file GfxOutBarCtrl.cpp.

References cItem, dwData, iImageIndex, and NULL.

01445 {
01446     cItem       = NULL;
01447     iImageIndex = image;
01448     dwData      = exData;
01449
01450     if( name )
01451     {
01452         cItem = new TCHAR[ _tcslen( name ) + 1 ];
01453
01454         ASSERT(cItem);
01455
01456         _tcscpy( cItem, name );
01457     }
01458 }

CGfxOutBarCtrl::CBarItem::~CBarItem ( ) [virtual]

Definition at line 1460 of file GfxOutBarCtrl.cpp.

References cItem.

01461 {
01462     if (cItem) delete [] cItem;
01463 }

Member Data Documentation

LPTSTR CGfxOutBarCtrl::CBarItem::cItem

Definition at line 114 of file GfxOutBarCtrl.h.

Referenced by CBarItem(), CGfxOutBarCtrl::DrawItem(), CGfxOutBarCtrl::GetItemSize(), CGfxOutBarCtrl::GetItemText(), CGfxOutBarCtrl::SetItemText(), CGfxOutBarCtrl::StartItemEdit(), and ~CBarItem().

DWORD CGfxOutBarCtrl::CBarItem::dwData

Definition at line 115 of file GfxOutBarCtrl.h.

Referenced by CBarItem(), CGfxOutBarCtrl::GetItemData(), and CGfxOutBarCtrl::SetItemData().

int CGfxOutBarCtrl::CBarItem::iImageIndex

Definition at line 113 of file GfxOutBarCtrl.h.

Referenced by CBarItem(), CGfxOutBarCtrl::DrawAnimItem(), CGfxOutBarCtrl::DrawItem(), CGfxOutBarCtrl::GetItemImage(), CGfxOutBarCtrl::GetItemSize(), and CGfxOutBarCtrl::SetItemImage().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/GfxOutBarCtrl.h
  • WinCvs/CJLib/CJLibrary/GfxOutBarCtrl.cpp
Generated on Sat Aug 7 22:52:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGfxSplitterWnd Class Reference

CGfxSplitterWnd Class Reference

#include <GfxSplitterWnd.h>

Inheritance diagram for CGfxSplitterWnd:

[legend]
Collaboration diagram for CGfxSplitterWnd:

[legend]
List of all members.

Public Member Functions

CGfxSplitterWnd ()
virtual | ~CGfxSplitterWnd ()
virtual void | OnDrawSplitter (CDC *pDC, ESplitType nType, const CRect &rectArg)
virtual void | OnInvertTracker (const CRect &rect)
virtual void | RecalcLayout ()

Public Attributes

int m_upBorder
bool bWhiteLine

Protected Member Functions

virtual void | GetInsideRect (CRect &rect) const
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
afx_msg void | OnPaint ()

Constructor & Destructor Documentation

CGfxSplitterWnd::CGfxSplitterWnd ( )

Definition at line 62 of file GfxSplitterWnd.cpp.

References bNotWin4.

00063 {
00064     m_cxBorder = 0;
00065     m_cyBorder = 0;
00066     m_cxSplitter = m_cySplitter = 2 + 2;
00067     m_cxSplitterGap = m_cySplitterGap = 2 + 2;
00068
00069
00070     DWORD dwVersion = ::GetVersion();
00071     BOOL bWin4 = (BYTE)dwVersion >= 4;
00072     bNotWin4 = 1 - bWin4;   // for convenience
00073
00074     m_upBorder = 5;
00075     bWhiteLine = false;
00076 }

CGfxSplitterWnd::~CGfxSplitterWnd ( ) [virtual]

Definition at line 78 of file GfxSplitterWnd.cpp.

00079 {
00080
00081 }

Member Function Documentation

void CGfxSplitterWnd::GetInsideRect ( CRect & rect ) const [protected, virtual]

Definition at line 364 of file GfxSplitterWnd.cpp.

References m_upBorder.

Referenced by RecalcLayout().

00365 {
00366     CSplitterWnd::GetInsideRect(rect);
00367     rect.top += m_upBorder;
00368 /*  ASSERT_VALID(this);
00369
00370     GetClientRect(rect);
00371     ASSERT(rect.left == 0 && rect.top == 0);
00372
00373     // subtract space for 3d borders
00374     rect.InflateRect(-m_cxBorder, -m_cyBorder);
00375     rect.top += m_upBorder;
00376
00377     // subtract scrollbar clearance
00378     if (m_bHasVScroll)
00379         rect.right -= GetSystemMetrics(SM_CXVSCROLL);
00380     if (m_bHasHScroll)
00381         rect.bottom -= GetSystemMetrics(SM_CYHSCROLL);*/
00382 }

void CGfxSplitterWnd::OnDrawSplitter | ( | CDC * | pDC,
 |  | ESplitType | nType,
 |  | const CRect & | rectArg
 | ) | [virtual]

Definition at line 83 of file GfxSplitterWnd.cpp.

References CX_BORDER, CY_BORDER, and NULL.

00084 {
00085     if (pDC == NULL)
00086     {
00087         RedrawWindow(rectArg, NULL, RDW_INVALIDATE|RDW_NOCHILDREN);
00088         return;
00089     }
00090     ASSERT_VALID(pDC);
00091     CRect rect = rectArg;
00092     switch (nType)
00093     {
00094     case splitBorder:
00095         return;
00096     case splitBox:
00097         pDC->Draw3dRect(rect, GetSysColor(COLOR_3DFACE), GetSysColor(COLOR_WINDOWFRAME));
00098         rect.InflateRect(-CX_BORDER, -CY_BORDER);
00099         pDC->Draw3dRect(rect, GetSysColor(COLOR_BTNHIGHLIGHT), GetSysColor(COLOR_BTNSHADOW));
00100         rect.InflateRect(-CX_BORDER, -CY_BORDER);
00101         break;
00102     }
00103
00104     COLORREF clr = GetSysColor(COLOR_3DFACE);
00105     pDC->FillSolidRect(rect, clr);
00106 }

BOOL CGfxSplitterWnd::OnEraseBkgnd ( CDC * pDC ) [protected]

Definition at line 384 of file GfxSplitterWnd.cpp.

References m_upBorder.

00385 {
00386 //  return CSplitterWnd::OnEraseBkgnd(pDC);
00387
00388     CRect rectClient;
00389     GetClientRect(rectClient);
00390     rectClient.InflateRect(-m_cxBorder, -m_cyBorder);
00391     rectClient.bottom = rectClient.top + m_upBorder;
00392     pDC->FillSolidRect(rectClient, GetSysColor(COLOR_3DFACE));
00393     return true;
00394 }

void CGfxSplitterWnd::OnInvertTracker ( const CRect & rect ) [virtual]

Definition at line 108 of file GfxSplitterWnd.cpp.

References NULL.

00109 {
00110     ASSERT_VALID(this);
00111     ASSERT(!rect.IsRectEmpty());
00112     ASSERT((GetStyle() & WS_CLIPCHILDREN) == 0);
00113
00114     CDC* pDC = GetDC();
00115     CBrush* pBrush = CDC::GetHalftoneBrush();
00116     CBrush* pOldBrush = NULL;
00117
00118     if (pBrush != NULL) {
00119         pOldBrush = pDC->SelectObject(pBrush);
00120     }
00121
00122     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATINVERT);
00123
00124     if (pOldBrush != NULL) {
00125         pDC->SelectObject(pOldBrush);
00126     }
00127     ReleaseDC(pDC);
00128 }

void CGfxSplitterWnd::OnPaint ( ) [protected]

Definition at line 396 of file GfxSplitterWnd.cpp.

References bWhiteLine.

00397 {
00398     CSplitterWnd::OnPaint();
00399     if (bWhiteLine)
00400     {
00401         CClientDC dc(this);
00402         CRect rectClient;
00403         GetClientRect(rectClient);
00404         CPen pn(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW));
00405         CPen * op = dc.SelectObject(&pn);
00406         dc.MoveTo(rectClient.left, rectClient.top);
00407         dc.LineTo(rectClient.right, rectClient.top);
00408         CPen pn1(PS_SOLID, 1, GetSysColor(COLOR_3DHILIGHT));
00409         dc.SelectObject(&pn1);
00410         dc.MoveTo(rectClient.left, rectClient.top+1);
00411         dc.LineTo(rectClient.right, rectClient.top+1);
00412         dc.SelectObject(op);
00413
00414         // fix potential resource leak - KStowell - 10-21-99
00415         pn.DeleteObject();
00416         pn1.DeleteObject();
00417     }
00418 }

void CGfxSplitterWnd::RecalcLayout ( ) [virtual]

Definition at line 256 of file GfxSplitterWnd.cpp.

References bNotWin4, DeferClientPos(), GetInsideRect(), LayoutRowCol(), m_upBorder, and NULL.

00257 {
00258     ASSERT_VALID(this);
00259     ASSERT(m_nRows > 0 && m_nCols > 0); // must have at least one pane
00260
00261     CRect rectClient;
00262     GetClientRect(rectClient);
00263     rectClient.InflateRect(-m_cxBorder, -m_cyBorder);
00264     rectClient.top += m_upBorder;
00265
00266     CRect rectInside;
00267     GetInsideRect(rectInside);
00268
00269     // layout columns (restrict to possible sizes)
00270     LayoutRowCol(m_pColInfo, m_nCols, rectInside.Width(), m_cxSplitterGap);
00271     LayoutRowCol(m_pRowInfo, m_nRows, rectInside.Height(), m_cySplitterGap);
00272
00273     // adjust the panes (and optionally scroll bars)
00274
00275     // give the hint for the maximum number of HWNDs
00276     AFX_SIZEPARENTPARAMS layout;
00277     layout.hDWP = ::BeginDeferWindowPos((m_nCols + 1) * (m_nRows + 1) + 1);
00278
00279     // size of scrollbars
00280     int cx = (rectClient.right - rectInside.right - bNotWin4);// - afxData.bNotWin4;
00281     int cy = (rectClient.bottom - rectInside.bottom - bNotWin4);// - afxData.bNotWin4;
00282
00283     // reposition size box
00284     if (m_bHasHScroll && m_bHasVScroll)
00285     {
00286         CWnd* pScrollBar = GetDlgItem(AFX_IDW_SIZE_BOX);
00287         ASSERT(pScrollBar != NULL);
00288
00289         // fix style if necessary
00290         BOOL bSizingParent = (GetSizingParent() != NULL);
00291         // modifyStyle returns TRUE if style changes
00292         if (pScrollBar->ModifyStyle(SBS_SIZEGRIP|SBS_SIZEBOX,
00293                 bSizingParent ? SBS_SIZEGRIP : SBS_SIZEBOX))
00294             pScrollBar->Invalidate();
00295         pScrollBar->EnableWindow(bSizingParent);
00296
00297         // reposition the size box
00298         DeferClientPos(&layout, pScrollBar,
00299             rectInside.right + bNotWin4,
00300             rectInside.bottom + bNotWin4, cx, cy, TRUE);
00301     }
00302
00303     // reposition scroll bars
00304     if (m_bHasHScroll)
00305     {
00306         int cxSplitterBox = m_cxSplitter + bNotWin4;// split box bigger
00307         int x = rectClient.left;
00308         int y = rectInside.bottom + bNotWin4;
00309         for (int col = 0; col < m_nCols; col++)
00310         {
00311             CWnd* pScrollBar = GetDlgItem(AFX_IDW_HSCROLL_FIRST + col);
00312             ASSERT(pScrollBar != NULL);
00313             int cx = m_pColInfo[col].nCurSize;
00314             if (col == 0 && m_nCols < m_nMaxCols)
00315                 x += cxSplitterBox, cx -= cxSplitterBox;
00316             DeferClientPos(&layout, pScrollBar, x, y, cx, cy, TRUE);
00317             x += cx + m_cxSplitterGap;
00318         }
00319     }
00320
00321     if (m_bHasVScroll)
00322     {
00323         int cySplitterBox = m_cySplitter + bNotWin4;// split box bigger
00324         int x = rectInside.right + bNotWin4;
00325         int y = rectClient.top;
00326         for (int row = 0; row < m_nRows; row++)
00327         {
00328             CWnd* pScrollBar = GetDlgItem(AFX_IDW_VSCROLL_FIRST + row);
00329             ASSERT(pScrollBar != NULL);
00330             int cy = m_pRowInfo[row].nCurSize;
00331             if (row == 0 && m_nRows < m_nMaxRows)
00332                 y += cySplitterBox, cy -= cySplitterBox;
00333             DeferClientPos(&layout, pScrollBar, x, y, cx, cy, TRUE);
00334             y += cy + m_cySplitterGap;
00335         }
00336     }
00337
00338     //BLOCK: Reposition all the panes
00339     {
00340         int x = rectClient.left;
00341         for (int col = 0; col < m_nCols; col++)
00342         {
00343             int cx = m_pColInfo[col].nCurSize;
00344             int y = rectClient.top;
00345             for (int row = 0; row < m_nRows; row++)
00346             {
00347                 int cy = m_pRowInfo[row].nCurSize;
00348                 CWnd* pWnd = GetPane(row, col);
00349                 DeferClientPos(&layout, pWnd, x, y, cx, cy, FALSE);
00350                 y += cy + m_cySplitterGap;
00351             }
00352             x += cx + m_cxSplitterGap;
00353         }
00354     }
00355
00356     // move and resize all the windows at once!
00357     if (layout.hDWP == NULL || !::EndDeferWindowPos(layout.hDWP))
00358         TRACE0("Warning: DeferWindowPos failed - low system resources.\n");
00359
00360     // invalidate all the splitter bars (with NULL pDC)
00361     DrawAllSplitBars(NULL, rectInside.right, rectInside.bottom);
00362 }

Here is the call graph for this function:

Member Data Documentation

bool CGfxSplitterWnd::bWhiteLine

Definition at line 40 of file GfxSplitterWnd.h.

Referenced by OnPaint().

int CGfxSplitterWnd::m_upBorder

Definition at line 39 of file GfxSplitterWnd.h.

Referenced by GetInsideRect(), OnEraseBkgnd(), and RecalcLayout().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/GfxSplitterWnd.h
  • WinCvs/CJLib/CJLibrary/GfxSplitterWnd.cpp
Generated on Sat Aug 7 22:52:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGraphConsole Class Reference

CGraphConsole Class Reference

Graph console. More...

#include <GraphView.h>

Inheritance diagram for CGraphConsole:

[legend]
Collaboration diagram for CGraphConsole:

[legend]
List of all members.

Public Member Functions

CGraphConsole ()
virtual long | cvs_out (const char *txt, long len)
virtual long | cvs_err (const char *txt, long len)

Private Attributes

CWincvsView * m_view

Detailed Description

Graph console.

Definition at line 229 of file GraphView.h.

Constructor & Destructor Documentation

CGraphConsole::CGraphConsole ( )

Definition at line 1145 of file GraphView.cpp.

References CWincvsApp::GetConsoleView(), and m_view.

01146 {
01147     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01148     m_view = app->GetConsoleView();
01149 }

Here is the call graph for this function:

Member Function Documentation

long CGraphConsole::cvs_err | ( | const char * | txt,
 |  | long | len
 | ) | [virtual]

Stderr handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 1159 of file GraphView.cpp.

References m_view, and CWincvsView::OutConsole().

01160 {
01161     if( m_view != 0L )
01162         m_view->OutConsole(txt, len, true);
01163
01164     return len;
01165 }

Here is the call graph for this function:

long CGraphConsole::cvs_out | ( | const char * | txt,
 |  | long | len
 | ) | [virtual]

Stdout handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 1151 of file GraphView.cpp.

References m_view, and CWincvsView::OutConsole().

01152 {
01153     if( m_view != 0L )
01154         m_view->OutConsole(txt, len);
01155
01156     return len;
01157 }

Here is the call graph for this function:

Member Data Documentation

CWincvsView* CGraphConsole::m_view [private]

View Definition at line 237 of file GraphView.h.

Referenced by CGraphConsole(), cvs_err(), and cvs_out().

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:52:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGraphDoc Class Reference

CGraphDoc Class Reference

Graph document class. More...

#include <GraphDoc.h>

Inheritance diagram for CGraphDoc:

[legend]
Collaboration diagram for CGraphDoc:

[legend]
List of all members.

Public Member Functions

virtual | ~CGraphDoc ()
virtual BOOL | OnNewDocument ()
OnNewDocument virtual override, clear the data.
virtual void | Serialize (CArchive &ar)
void | SetNode (CLogNode *node, const char *dir)
CLogNode * | GetNode (void)
Get the node data.
EntnodeData * | GetEntryInfo (void)
Get the entry info.
const char * | GetDir (void) const
Get the directory.
const char * | GetName (void) const
Get the file name.
CGraphView * | GetTreeView (void)

Protected Member Functions

CGraphDoc ()
afx_msg long | NumNodes ()

Private Member Functions

void | Clear (void)

Private Attributes

CLogNode * | m_fNode
CString | m_fDir
CString | m_fName
EntnodeData * m_fData

Detailed Description

Graph document class.

Definition at line 38 of file GraphDoc.h.

Constructor & Destructor Documentation

CGraphDoc::CGraphDoc ( ) [protected]

Definition at line 99 of file GraphDoc.cpp.

00100 {
00101     EnableAutomation();
00102
00103     AfxOleLockApp();
00104
00105     m_fNode = 0L;
00106     m_fData = 0L;
00107 }

CGraphDoc::~CGraphDoc ( ) [virtual]

Definition at line 109 of file GraphDoc.cpp.

References Clear().

00110 {
00111     AfxOleUnlockApp();
00112
00113     Clear();
00114 }

Here is the call graph for this function:

Member Function Documentation

void CGraphDoc::Clear ( void ) [private]

Clear the data Definition at line 119 of file GraphDoc.cpp.

References m_fData, m_fDir, m_fName, m_fNode, and EntnodeData::UnRef().

Referenced by OnNewDocument(), SetNode(), and ~CGraphDoc().

00120 {
00121     if( m_fNode != 0L )
00122     {
00123         delete m_fNode;
00124         m_fNode = 0L;
00125     }
00126
00127     if( m_fData != 0L )
00128     {
00129         m_fData->UnRef();
00130         m_fData = 0L;
00131     }
00132
00133     m_fDir.Empty();
00134     m_fName.Empty();
00135 }

Here is the call graph for this function:

const char * CGraphDoc::GetDir ( void ) const [inline]

Get the directory.

Definition at line 119 of file GraphDoc.h.

References m_fDir.

Referenced by CGraphView::OnAnnotate(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewDiff(), CGraphView::OnViewReload(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), CGraphView::RetrieveSel(), and CGraphView::SaveSel().

00120 {
00121     return m_fDir;
00122 }

EntnodeData * CGraphDoc::GetEntryInfo ( void ) [inline]

Get the entry info.

Definition at line 113 of file GraphDoc.h.

References m_fData.

Referenced by CGraphView::CalcImageSize(), TGraphCurSelector::construct_(), CGraphView::OnBeginPrinting(), CGraphView::OnDraw(), and CGraphView::OnPrint().

00114 {
00115     return m_fData;
00116 }

const char * CGraphDoc::GetName ( void ) const [inline]

Get the file name.

Definition at line 125 of file GraphDoc.h.

References m_fName.

Referenced by CGraphView::OnAnnotate(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewDiff(), CGraphView::OnViewReload(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), CGraphView::RetrieveSel(), and CGraphView::SaveSel().

00126 {
00127     return m_fName;
00128 }

CLogNode * CGraphDoc::GetNode ( void ) [inline]

Get the node data.

Definition at line 107 of file GraphDoc.h.

References m_fNode.

Referenced by CGraphView::CalcImageSize(), CGraphView::DisableCommon(), CGraphView::IsSelSingleNode(), CGraphView::OnAnnotate(), CGraphView::OnBeginPrinting(), CGraphView::OnContextMenu(), CGraphView::OnDraw(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnKeyDown(), CGraphView::OnLButtonDown(), CGraphView::OnPrint(), CGraphView::OnUpdateViewDelrev(), CGraphView::OnUpdateViewDiff(), CGraphView::OnUpdateViewTag(), CGraphView::OnViewDelrev(), CGraphView::OnViewDiff(), CGraphView::OnViewReload(), CGraphView::OnViewSelnonsig(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), CGraphView::RetrieveSel(), and CGraphView::SaveSel().

00108 {
00109     return m_fNode;
00110 }

CGraphView * CGraphDoc::GetTreeView ( void )

Get the graph (tree) view

Returns:
The graph view
Definition at line 229 of file GraphDoc.cpp.

References NULL.

Referenced by SetNode().

00230 {
00231     CView* view;
00232
00233     POSITION posv = GetFirstViewPosition();
00234     while( posv != NULL )
00235     {
00236         view = GetNextView(posv);
00237         if( view->IsKindOf(RUNTIME_CLASS(CGraphView)) )
00238             return (CGraphView*)view;
00239     }
00240
00241     return NULL;
00242 }

long CGraphDoc::NumNodes ( ) [protected]

Get the number of nodes

Returns:
The number of nodes
Definition at line 266 of file GraphDoc.cpp.
00267 {
00268     return 0;
00269 }

BOOL CGraphDoc::OnNewDocument ( ) [virtual]

OnNewDocument virtual override, clear the data.

Definition at line 138 of file GraphDoc.cpp.

References Clear().

00139 {
00140     Clear();
00141
00142     if( !CDocument::OnNewDocument() )
00143         return FALSE;
00144
00145     return TRUE;
00146 }

Here is the call graph for this function:

void CGraphDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 213 of file GraphDoc.cpp.

00214 {
00215     if (ar.IsStoring())
00216     {
00217         // TODO: add storing code here
00218     }
00219     else
00220     {
00221         // TODO: add loading code here
00222     }
00223 }

void CGraphDoc::SetNode | ( | CLogNode * | node,
 |  | const char * | folder
 | ) |

Set the node data

Parameters:
node | Log node
folder | Folder
Definition at line 153 of file GraphDoc.cpp.

References CGraphView::CalcImageSize(), Clear(), CStr, cvs_err(), Entries_Open(), Entries_SetVisited(), GetTreeView(), m_fData, m_fDir, m_fName, m_fNode, NormalizeFn(), EntnodeData::Ref(), and stat.

Referenced by CvsLogParse().

00154 {
00155     Clear();
00156
00157     // Normalize folder/fname
00158     const char* fn = (**(CLogNodeHeader*)node).WorkingFile();
00159     char dir[_MAX_PATH];
00160     char name[_MAX_PATH];
00161     NormalizeFn(folder, fn, dir, name);
00162
00163     m_fNode = node;
00164     m_fDir = dir;
00165
00166     // Get the CVS/Entries infos for this file
00167     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00168     if( !Entries_Open(entries, dir) )
00169     {
00170         cvs_err("Warning : Error while accessing the CVS folder in '%s'\n", dir);
00171     }
00172     else
00173     {
00174         if( node->GetType() != kNodeHeader )
00175         {
00176             cvs_err("Warning : Top node is not a RCS file description !\n");
00177         }
00178         else
00179         {
00180             CStr fullPath;
00181
00182             fullPath << m_fDir;
00183             fullPath << name;
00184
00185             struct stat sb;
00186             if( stat(fullPath, &sb) == -1 )
00187             {
00188                 cvs_err("Warning : Unknown file '%s'\n", name);
00189             }
00190             else
00191             {
00192                 m_fData = Entries_SetVisited(dir, entries, name, sb, false);
00193                 m_fData->Ref();
00194                 m_fName = name;
00195             }
00196         }
00197     }
00198
00199     // Create the graph and redraw
00200     CGraphView* view = GetTreeView();
00201     if( view != 0L )
00202     {
00203         view->CalcImageSize();
00204         view->Invalidate();
00205         SetTitle(m_fName);
00206     }
00207 }

Here is the call graph for this function:

Member Data Documentation

EntnodeData* CGraphDoc::m_fData [private]

Node data Definition at line 89 of file GraphDoc.h.

Referenced by Clear(), GetEntryInfo(), and SetNode().

CString CGraphDoc::m_fDir [private]

Directory Definition at line 87 of file GraphDoc.h.

Referenced by Clear(), GetDir(), and SetNode().

CString CGraphDoc::m_fName [private]

File name Definition at line 88 of file GraphDoc.h.

Referenced by Clear(), GetName(), and SetNode().

CLogNode* CGraphDoc::m_fNode [private]

Node data Definition at line 86 of file GraphDoc.h.

Referenced by Clear(), GetNode(), and SetNode().

The documentation for this class was generated from the following files:
  • WinCvs/GraphDoc.h
  • WinCvs/GraphDoc.cpp
Generated on Sat Aug 7 22:52:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGraphFrame Class Reference

CGraphFrame Class Reference

#include <GraphFrm.h>

Inheritance diagram for CGraphFrame:

[legend]
Collaboration diagram for CGraphFrame:

[legend]
List of all members.

Public Member Functions

CGraphFrame ()
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual | ~CGraphFrame ()

Constructor & Destructor Documentation

CGraphFrame::CGraphFrame ( )

Definition at line 53 of file GraphFrm.cpp.

00054 {
00055     // TODO: add member initialization code here
00056
00057 }

CGraphFrame::~CGraphFrame ( ) [virtual]

Definition at line 59 of file GraphFrm.cpp.

00060 {
00061 }

Member Function Documentation

BOOL CGraphFrame::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo
 | ) | [virtual]

Definition at line 82 of file GraphFrm.cpp.

References CWincvsApp::GetMainFrame(), and CMainFrame::OnBroadcastCmdMsg().

00083 {
00084     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00085     if( app->GetMainFrame()->OnBroadcastCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00086         return TRUE;
00087
00088     return CCJMDIChildWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00089 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/GraphFrm.h
  • WinCvs/GraphFrm.cpp
Generated on Sat Aug 7 22:52:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGraphOptDlg Class Reference

CGraphOptDlg Class Reference

#include <GraphOptDlg.h>

Inheritance diagram for CGraphOptDlg:

[legend]
Collaboration diagram for CGraphOptDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_GRAPH_OPTIONS }

Public Member Functions

CGraphOptDlg (CPersistentInt &selColor, CPersistentInt &shadowColor, CPersistentInt &headerColor, CPersistentInt &tagColor, CPersistentInt &branchColor, CPersistentInt &nodeColor, CPersistentInt &deadNodeColor, CPersistentInt &userStateNodeColor, CPersistentInt &mergeColor, CWnd *pParent=NULL)

Public Attributes

CButton | m_apply
CColorStatic m_rgbShadow
CColorStatic m_rgbSelection
CColorStatic m_rgbState
CColorStatic m_rgbDead
CColorStatic m_rgbNode
CColorStatic m_rgbBranch
CColorStatic m_rgbTag
CColorStatic m_rgbHeader
CColorStatic m_rgbMerge

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | OnOK ()
OnOK virtual override, retrieve all colors into corresponding variables.
afx_msg void | OnHeader ()
BN_CLICKED message handler, prompt for header color.
afx_msg void | OnTag ()
BN_CLICKED message handler, prompt for tag color.
afx_msg void | OnBranch ()
BN_CLICKED message handler, prompt for branch color.
afx_msg void | OnNode ()
BN_CLICKED message handler, prompt for node color.
afx_msg void | OnDead ()
BN_CLICKED message handler, prompt for dead color.
afx_msg void | OnState ()
BN_CLICKED message handler, prompt for state color.
afx_msg void | OnSelection ()
BN_CLICKED message handler, prompt for selection color.
afx_msg void | OnShadow ()
BN_CLICKED message handler, prompt for shadow color.
afx_msg void | OnReset ()
BN_CLICKED message handler, reset all preview colors.
virtual void | OnCancel ()
OnCancel virtual override, restore original colors.
afx_msg void | OnMerge ()
BN_CLICKED message handler, prompt for merge color.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.
afx_msg void | OnApplyNow ()
BN_CLICKED message handler, apply any color changes.

Private Member Functions

virtual void | InitHelpID ()
void | PromptForColor (CColorStatic &colorStatic)
void | GetAllColors ()

Private Attributes

CPersistentInt & m_selColor
CPersistentInt & m_shadowColor
CPersistentInt & m_headerColor
CPersistentInt & m_tagColor
CPersistentInt & m_branchColor
CPersistentInt & m_nodeColor
CPersistentInt & m_deadNodeColor
CPersistentInt & m_userStateNodeColor
CPersistentInt & m_mergeColor
int m_origSelColor
int m_origShadowColor
int m_origHeaderColor
int m_origTagColor
int m_origBranchColor
int m_origNodeColor
int m_origDeadNodeColor
int m_origUserStateNodeColor
int m_origMergeColor

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 59 of file GraphOptDlg.h.
00059 { IDD = IDD_GRAPH_OPTIONS };

Constructor & Destructor Documentation

CGraphOptDlg::CGraphOptDlg | ( | CPersistentInt & | selColor,
 |  | CPersistentInt & | shadowColor,
 |  | CPersistentInt & | headerColor,
 |  | CPersistentInt & | tagColor,
 |  | CPersistentInt & | branchColor,
 |  | CPersistentInt & | nodeColor,
 |  | CPersistentInt & | deadNodeColor,
 |  | CPersistentInt & | userStateNodeColor,
 |  | CPersistentInt & | mergeColor,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 48 of file GraphOptDlg.cpp.

References m_branchColor, m_deadNodeColor, m_headerColor, m_mergeColor, m_nodeColor, m_origBranchColor, m_origDeadNodeColor, m_origHeaderColor, m_origMergeColor, m_origNodeColor, m_origSelColor, m_origShadowColor, m_origTagColor, m_origUserStateNodeColor, m_rgbBranch, m_rgbDead, m_rgbHeader, m_rgbMerge, m_rgbNode, m_rgbSelection, m_rgbShadow, m_rgbState, m_rgbTag, m_selColor, m_shadowColor, m_tagColor, m_userStateNodeColor, and CColorStatic::SetColor().

00052     : CHHelpDialog(CGraphOptDlg::IDD, pParent),
00053     m_selColor(selColor), m_shadowColor(shadowColor),
00054     m_headerColor(headerColor), m_tagColor(tagColor), m_branchColor(branchColor),
00055     m_nodeColor(nodeColor), m_deadNodeColor(deadNodeColor), m_userStateNodeColor(userStateNodeColor),
00056     m_mergeColor(mergeColor)
00057 {
00058     //{{AFX_DATA_INIT(CGraphOptDlg)
00059         // NOTE: the ClassWizard will add member initialization here
00060     //}}AFX_DATA_INIT
00061
00062     m_rgbShadow.SetColor((int)m_shadowColor);
00063     m_rgbSelection.SetColor((int)m_selColor);
00064     m_rgbState.SetColor((int)m_userStateNodeColor);
00065     m_rgbDead.SetColor((int)m_deadNodeColor);
00066     m_rgbNode.SetColor((int)m_nodeColor);
00067     m_rgbBranch.SetColor((int)m_branchColor);
00068     m_rgbTag.SetColor((int)m_tagColor);
00069     m_rgbHeader.SetColor((int)m_headerColor);
00070     m_rgbMerge.SetColor((int)m_mergeColor);
00071
00072     m_origSelColor = m_selColor;
00073     m_origShadowColor = m_shadowColor;
00074     m_origHeaderColor = m_headerColor;
00075     m_origTagColor = m_tagColor;
00076     m_origBranchColor = m_branchColor;
00077     m_origNodeColor = m_deadNodeColor;
00078     m_origDeadNodeColor = m_deadNodeColor;
00079     m_origUserStateNodeColor = m_userStateNodeColor;
00080     m_origMergeColor = m_mergeColor;
00081 }

Here is the call graph for this function:

Member Function Documentation

void CGraphOptDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 84 of file GraphOptDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_APPLY, IDC_RGB_BRANCH, IDC_RGB_DEAD, IDC_RGB_HEADER, IDC_RGB_MERGE, IDC_RGB_NODE, IDC_RGB_SELECTION, IDC_RGB_SHADOW, IDC_RGB_STATE, IDC_RGB_TAG, m_apply, m_rgbBranch, m_rgbDead, m_rgbHeader, m_rgbMerge, m_rgbNode, m_rgbSelection, m_rgbShadow, m_rgbState, and m_rgbTag.

00085 {
00086     CHHelpDialog::DoDataExchange(pDX);
00087     //{{AFX_DATA_MAP(CGraphOptDlg)
00088     DDX_Control(pDX, IDC_APPLY, m_apply);
00089     DDX_Control(pDX, IDC_RGB_SHADOW, m_rgbShadow);
00090     DDX_Control(pDX, IDC_RGB_SELECTION, m_rgbSelection);
00091     DDX_Control(pDX, IDC_RGB_STATE, m_rgbState);
00092     DDX_Control(pDX, IDC_RGB_DEAD, m_rgbDead);
00093     DDX_Control(pDX, IDC_RGB_NODE, m_rgbNode);
00094     DDX_Control(pDX, IDC_RGB_BRANCH, m_rgbBranch);
00095     DDX_Control(pDX, IDC_RGB_TAG, m_rgbTag);
00096     DDX_Control(pDX, IDC_RGB_HEADER, m_rgbHeader);
00097     DDX_Control(pDX, IDC_RGB_MERGE, m_rgbMerge);
00098     //}}AFX_DATA_MAP
00099 }

Here is the call graph for this function:

void CGraphOptDlg::GetAllColors ( ) [private]

Retrieve all colors Definition at line 155 of file GraphOptDlg.cpp.

References CColorStatic::GetColor(), m_branchColor, m_deadNodeColor, m_headerColor, m_mergeColor, m_nodeColor, m_rgbBranch, m_rgbDead, m_rgbHeader, m_rgbMerge, m_rgbNode, m_rgbSelection, m_rgbShadow, m_rgbState, m_rgbTag, m_selColor, m_shadowColor, m_tagColor, and m_userStateNodeColor.

Referenced by OnApplyNow(), and OnOK().

00156 {
00157     m_shadowColor = (int)m_rgbShadow.GetColor();
00158     m_selColor = (int)m_rgbSelection.GetColor();
00159     m_userStateNodeColor = (int)m_rgbState.GetColor();
00160     m_deadNodeColor = (int)m_rgbDead.GetColor();
00161     m_nodeColor = (int)m_rgbNode.GetColor();
00162     m_branchColor = (int)m_rgbBranch.GetColor();
00163     m_tagColor = (int)m_rgbTag.GetColor();
00164     m_headerColor = (int)m_rgbHeader.GetColor();
00165     m_mergeColor = (int)m_rgbMerge.GetColor();
00166 }

Here is the call graph for this function:

void CGraphOptDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 122 of file GraphOptDlg.cpp.

References IDC_APPLY, IDC_COLOR_BRANCH, IDC_COLOR_DEAD, IDC_COLOR_HEADER, IDC_COLOR_MERGE, IDC_COLOR_NODE, IDC_COLOR_SELECTION, IDC_COLOR_SHADOW, IDC_COLOR_STATE, IDC_COLOR_TAG, IDC_RESET_COLORS, IDC_RGB_BRANCH, IDC_RGB_DEAD, IDC_RGB_HEADER, IDC_RGB_MERGE, IDC_RGB_NODE, IDC_RGB_SELECTION, IDC_RGB_SHADOW, IDC_RGB_STATE, IDC_RGB_TAG, IDH_IDC_APPLY, IDH_IDC_COLOR_BRANCH, IDH_IDC_COLOR_DEAD, IDH_IDC_COLOR_HEADER, IDH_IDC_COLOR_MERGE, IDH_IDC_COLOR_NODE, IDH_IDC_COLOR_SELECTION, IDH_IDC_COLOR_SHADOW, IDH_IDC_COLOR_STATE, IDH_IDC_COLOR_TAG, IDH_IDC_RESET_COLORS, IDH_IDC_RGB_BRANCH, IDH_IDC_RGB_DEAD, IDH_IDC_RGB_HEADER, IDH_IDC_RGB_MERGE, IDH_IDC_RGB_NODE, IDH_IDC_RGB_SELECTION, IDH_IDC_RGB_SHADOW, IDH_IDC_RGB_STATE, and IDH_IDC_RGB_TAG.

00123 {
00124     SetCtrlHelpID(IDC_COLOR_HEADER,     IDH_IDC_COLOR_HEADER);
00125     SetCtrlHelpID(IDC_COLOR_TAG,        IDH_IDC_COLOR_TAG);
00126     SetCtrlHelpID(IDC_COLOR_BRANCH,     IDH_IDC_COLOR_BRANCH);
00127     SetCtrlHelpID(IDC_COLOR_NODE,       IDH_IDC_COLOR_NODE);
00128     SetCtrlHelpID(IDC_COLOR_DEAD,       IDH_IDC_COLOR_DEAD);
00129     SetCtrlHelpID(IDC_COLOR_STATE,      IDH_IDC_COLOR_STATE);
00130     SetCtrlHelpID(IDC_COLOR_SELECTION,  IDH_IDC_COLOR_SELECTION);
00131     SetCtrlHelpID(IDC_COLOR_SHADOW,     IDH_IDC_COLOR_SHADOW);
00132     SetCtrlHelpID(IDC_COLOR_MERGE,      IDH_IDC_COLOR_MERGE);
00133     SetCtrlHelpID(IDC_RGB_HEADER,       IDH_IDC_RGB_HEADER);
00134     SetCtrlHelpID(IDC_RGB_TAG,          IDH_IDC_RGB_TAG);
00135     SetCtrlHelpID(IDC_RGB_BRANCH,       IDH_IDC_RGB_BRANCH);
00136     SetCtrlHelpID(IDC_RGB_NODE,         IDH_IDC_RGB_NODE);
00137     SetCtrlHelpID(IDC_RGB_DEAD,         IDH_IDC_RGB_DEAD);
00138     SetCtrlHelpID(IDC_RGB_STATE,        IDH_IDC_RGB_STATE);
00139     SetCtrlHelpID(IDC_RGB_SELECTION,    IDH_IDC_RGB_SELECTION);
00140     SetCtrlHelpID(IDC_RGB_SHADOW,       IDH_IDC_RGB_SHADOW);
00141     SetCtrlHelpID(IDC_RGB_MERGE,        IDH_IDC_RGB_MERGE);
00142     SetCtrlHelpID(IDC_RESET_COLORS,     IDH_IDC_RESET_COLORS);
00143     SetCtrlHelpID(IDC_APPLY,            IDH_IDC_APPLY);
00144 }

void CGraphOptDlg::OnApplyNow ( ) [protected]

BN_CLICKED message handler, apply any color changes.

Definition at line 177 of file GraphOptDlg.cpp.

References GetAllColors(), m_apply, and CWincvsApp::UpdateAllDocsView().

00178 {
00179     GetAllColors();
00180
00181     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00182     if( pApp )
00183     {
00184         pApp->UpdateAllDocsView();
00185     }
00186
00187     m_apply.EnableWindow(FALSE);
00188 }

Here is the call graph for this function:

void CGraphOptDlg::OnBranch ( ) [protected]

BN_CLICKED message handler, prompt for branch color.

Definition at line 236 of file GraphOptDlg.cpp.

References m_rgbBranch, and PromptForColor().

00237 {
00238     PromptForColor(m_rgbBranch);
00239 }

Here is the call graph for this function:

void CGraphOptDlg::OnCancel ( ) [protected, virtual]

OnCancel virtual override, restore original colors.

Definition at line 191 of file GraphOptDlg.cpp.

References m_branchColor, m_deadNodeColor, m_headerColor, m_mergeColor, m_origBranchColor, m_origDeadNodeColor, m_origHeaderColor, m_origMergeColor, m_origNodeColor, m_origSelColor, m_origShadowColor, m_origTagColor, m_origUserStateNodeColor, m_selColor, m_shadowColor, m_tagColor, and m_userStateNodeColor.

00192 {
00193     m_selColor = m_origSelColor;
00194     m_shadowColor = m_origShadowColor;
00195     m_headerColor = m_origHeaderColor;
00196     m_tagColor = m_origTagColor;
00197     m_branchColor = m_origBranchColor;
00198     m_deadNodeColor = m_origNodeColor;
00199     m_deadNodeColor = m_origDeadNodeColor;
00200     m_userStateNodeColor = m_origUserStateNodeColor;
00201     m_mergeColor = m_origMergeColor;
00202
00203     CHHelpDialog::OnCancel();
00204 }

void CGraphOptDlg::OnDead ( ) [protected]

BN_CLICKED message handler, prompt for dead color.

Definition at line 248 of file GraphOptDlg.cpp.

References m_rgbDead, and PromptForColor().

00249 {
00250     PromptForColor(m_rgbDead);
00251 }

Here is the call graph for this function:

void CGraphOptDlg::OnHeader ( ) [protected]

BN_CLICKED message handler, prompt for header color.

Definition at line 224 of file GraphOptDlg.cpp.

References m_rgbHeader, and PromptForColor().

00225 {
00226     PromptForColor(m_rgbHeader);
00227 }

Here is the call graph for this function:

void CGraphOptDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 147 of file GraphOptDlg.cpp.

References CHHelpSupport::ShowHelp().

00148 {
00149     ShowHelp();
00150 }

Here is the call graph for this function:

void CGraphOptDlg::OnMerge ( ) [protected]

BN_CLICKED message handler, prompt for merge color.

Definition at line 272 of file GraphOptDlg.cpp.

References m_rgbMerge, and PromptForColor().

00273 {
00274     PromptForColor(m_rgbMerge);
00275 }

Here is the call graph for this function:

void CGraphOptDlg::OnNode ( ) [protected]

BN_CLICKED message handler, prompt for node color.

Definition at line 242 of file GraphOptDlg.cpp.

References m_rgbNode, and PromptForColor().

00243 {
00244     PromptForColor(m_rgbNode);
00245 }

Here is the call graph for this function:

void CGraphOptDlg::OnOK ( ) [protected, virtual]

OnOK virtual override, retrieve all colors into corresponding variables.

Definition at line 169 of file GraphOptDlg.cpp.

References GetAllColors().

00170 {
00171     GetAllColors();
00172
00173     CHHelpDialog::OnOK();
00174 }

Here is the call graph for this function:

void CGraphOptDlg::OnReset ( ) [protected]

BN_CLICKED message handler, reset all preview colors.

Definition at line 279 of file GraphOptDlg.cpp.

References m_apply, m_rgbBranch, m_rgbDead, m_rgbHeader, m_rgbMerge, m_rgbNode, m_rgbSelection, m_rgbShadow, m_rgbState, m_rgbTag, RGB_DEF_BRANCH, RGB_DEF_DEADNODE, RGB_DEF_HEADER, RGB_DEF_MERGE, RGB_DEF_NODE, RGB_DEF_SEL, RGB_DEF_SHADOW, RGB_DEF_TAG, RGB_DEF_USERSTATENODE, and CColorStatic::SetColor().

00280 {
00281     m_rgbShadow.SetColor(RGB_DEF_SHADOW);
00282     m_rgbSelection.SetColor(RGB_DEF_SEL);
00283     m_rgbState.SetColor(RGB_DEF_USERSTATENODE);
00284     m_rgbDead.SetColor(RGB_DEF_DEADNODE);
00285     m_rgbNode.SetColor(RGB_DEF_NODE);
00286     m_rgbBranch.SetColor(RGB_DEF_BRANCH);
00287     m_rgbTag.SetColor(RGB_DEF_TAG);
00288     m_rgbHeader.SetColor(RGB_DEF_HEADER);
00289     m_rgbMerge.SetColor(RGB_DEF_MERGE);
00290
00291     m_apply.EnableWindow();
00292 }

Here is the call graph for this function:

void CGraphOptDlg::OnSelection ( ) [protected]

BN_CLICKED message handler, prompt for selection color.

Definition at line 260 of file GraphOptDlg.cpp.

References m_rgbSelection, and PromptForColor().

00261 {
00262     PromptForColor(m_rgbSelection);
00263 }

Here is the call graph for this function:

void CGraphOptDlg::OnShadow ( ) [protected]

BN_CLICKED message handler, prompt for shadow color.

Definition at line 266 of file GraphOptDlg.cpp.

References m_rgbShadow, and PromptForColor().

00267 {
00268     PromptForColor(m_rgbShadow);
00269 }

Here is the call graph for this function:

void CGraphOptDlg::OnState ( ) [protected]

BN_CLICKED message handler, prompt for state color.

Definition at line 254 of file GraphOptDlg.cpp.

References m_rgbState, and PromptForColor().

00255 {
00256     PromptForColor(m_rgbState);
00257 }

Here is the call graph for this function:

void CGraphOptDlg::OnTag ( ) [protected]

BN_CLICKED message handler, prompt for tag color.

Definition at line 230 of file GraphOptDlg.cpp.

References m_rgbTag, and PromptForColor().

00231 {
00232     PromptForColor(m_rgbTag);
00233 }

Here is the call graph for this function:

void CGraphOptDlg::PromptForColor ( CColorStatic & colorStatic ) [private]

Select the color

Parameters:
colorStatic Preview static control
Definition at line 210 of file GraphOptDlg.cpp.

References CColorStatic::GetColor(), m_apply, and CColorStatic::SetColor().

Referenced by OnBranch(), OnDead(), OnHeader(), OnMerge(), OnNode(), OnSelection(), OnShadow(), OnState(), and OnTag().

00211 {
00212     CColorDialog colorDialog(colorStatic.GetColor());
00213     if( colorDialog.DoModal() == IDOK )
00214     {
00215         if( colorDialog.GetColor() != colorStatic.GetColor() )
00216         {
00217             colorStatic.SetColor(colorDialog.GetColor());
00218             m_apply.EnableWindow();
00219         }
00220     }
00221 }

Here is the call graph for this function:

Member Data Documentation

CButton CGraphOptDlg::m_apply

Definition at line 60 of file GraphOptDlg.h.

Referenced by DoDataExchange(), OnApplyNow(), OnReset(), and PromptForColor().

CPersistentInt& CGraphOptDlg::m_branchColor [private]

Definition at line 107 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), GetAllColors(), and OnCancel().

CPersistentInt& CGraphOptDlg::m_deadNodeColor [private]

Definition at line 109 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), GetAllColors(), and OnCancel().

CPersistentInt& CGraphOptDlg::m_headerColor [private]

Definition at line 105 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), GetAllColors(), and OnCancel().

CPersistentInt& CGraphOptDlg::m_mergeColor [private]

Definition at line 111 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), GetAllColors(), and OnCancel().

CPersistentInt& CGraphOptDlg::m_nodeColor [private]

Definition at line 108 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and GetAllColors().

int CGraphOptDlg::m_origBranchColor [private]

Definition at line 117 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

int CGraphOptDlg::m_origDeadNodeColor [private]

Definition at line 119 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

int CGraphOptDlg::m_origHeaderColor [private]

Definition at line 115 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

int CGraphOptDlg::m_origMergeColor [private]

Definition at line 121 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

int CGraphOptDlg::m_origNodeColor [private]

Definition at line 118 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

int CGraphOptDlg::m_origSelColor [private]

Definition at line 113 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

int CGraphOptDlg::m_origShadowColor [private]

Definition at line 114 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

int CGraphOptDlg::m_origTagColor [private]

Definition at line 116 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

int CGraphOptDlg::m_origUserStateNodeColor [private]

Definition at line 120 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), and OnCancel().

CColorStatic CGraphOptDlg::m_rgbBranch

Definition at line 66 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnBranch(), and OnReset().

CColorStatic CGraphOptDlg::m_rgbDead

Definition at line 64 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnDead(), and OnReset().

CColorStatic CGraphOptDlg::m_rgbHeader

Definition at line 68 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnHeader(), and OnReset().

CColorStatic CGraphOptDlg::m_rgbMerge

Definition at line 69 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnMerge(), and OnReset().

CColorStatic CGraphOptDlg::m_rgbNode

Definition at line 65 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnNode(), and OnReset().

CColorStatic CGraphOptDlg::m_rgbSelection

Definition at line 62 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnReset(), and OnSelection().

CColorStatic CGraphOptDlg::m_rgbShadow

Definition at line 61 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnReset(), and OnShadow().

CColorStatic CGraphOptDlg::m_rgbState

Definition at line 63 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnReset(), and OnState().

CColorStatic CGraphOptDlg::m_rgbTag

Definition at line 67 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), DoDataExchange(), GetAllColors(), OnReset(), and OnTag().

CPersistentInt& CGraphOptDlg::m_selColor [private]

Definition at line 103 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), GetAllColors(), and OnCancel().

CPersistentInt& CGraphOptDlg::m_shadowColor [private]

Definition at line 104 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), GetAllColors(), and OnCancel().

CPersistentInt& CGraphOptDlg::m_tagColor [private]

Definition at line 106 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), GetAllColors(), and OnCancel().

CPersistentInt& CGraphOptDlg::m_userStateNodeColor [private]

Definition at line 110 of file GraphOptDlg.h.

Referenced by CGraphOptDlg(), GetAllColors(), and OnCancel().

The documentation for this class was generated from the following files:
  • common/GraphOptDlg.h
  • common/GraphOptDlg.cpp
Generated on Sat Aug 7 22:52:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGraphRectTracker Class Reference

CGraphRectTracker Class Reference

Graph rectangle tracker. More...

#include <GraphView.h>

Inheritance diagram for CGraphRectTracker:

[legend]
Collaboration diagram for CGraphRectTracker:

[legend]
List of all members.

Public Member Functions

CGraphRectTracker (CGraphView *view)
virtual void OnChangedRect (const CRect &rectOld)
OnChangedRect virtual override.

Protected Attributes

CGraphView * m_view

Detailed Description

Graph rectangle tracker.

Definition at line 296 of file GraphView.h.

Constructor & Destructor Documentation

CGraphRectTracker::CGraphRectTracker ( CGraphView * view ) [inline]

Definition at line 299 of file GraphView.h.

00299 : m_view(view) {}

Member Function Documentation

void CGraphRectTracker::OnChangedRect ( const CRect & rectOld ) [virtual]

OnChangedRect virtual override.

Definition at line 995 of file GraphView.cpp.

References CScrollView::GetDeviceScrollPosition(), and m_view.

00996 {
00997 #if 0 // :-< doesn't work...
00998     CRect r;
00999     m_view->GetClientRect(&r);
01000     CPoint rb = m_rect.BottomRight();
01001
01002     if( !r.PtInRect(rb) )
01003     {
01004         CPoint orig = m_view->GetDeviceScrollPosition();
01005         CPoint offset;
01006         if( rb.x >= r.right )
01007             offset.x += 10;
01008
01009         if( rb.y >= r.bottom )
01010             offset.y += 10;
01011
01012         orig += offset;
01013         m_rect -= offset;
01014         m_view->ScrollToPosition(orig);
01015     }
01016 #endif
01017 }

Here is the call graph for this function:

Member Data Documentation

CGraphView* CGraphRectTracker::m_view [protected]

View Definition at line 303 of file GraphView.h.

Referenced by OnChangedRect().

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:52:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CGraphView Class Reference

CGraphView Class Reference

Graph view class. More...

#include <GraphView.h>

Inheritance diagram for CGraphView:

[legend]
Collaboration diagram for CGraphView:

[legend]
List of all members.

Public Member Functions

virtual BOOL | OnScroll (UINT nScrollCode, UINT nPos, BOOL bDoScroll=TRUE)
void | CalcImageSize (void)
Calculate the size of the graph and set the scroll bars.

Static Public Member Functions

CImageList & | GetImgList (void)
Get the image list.

Protected Member Functions

CGraphView ()
virtual | ~CGraphView ()
virtual void | OnDraw (CDC *pDC)
OnDraw virtual override, paint the graph.
virtual void | OnInitialUpdate ()
OnInitialUpdate virtual override, set the initial scroll sizes.
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
OnBeginPrinting virtual override.
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
OnEndPrinting virtual override.
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
OnPreparePrinting virtual override.
virtual void | OnPrint (CDC *pDC, CPrintInfo *pInfo)
OnPrint virtual override.
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
WM_LBUTTONDOWN message handler, update selection.
afx_msg void | OnViewReload ()
WM_COMMAND message handler, reload view.
afx_msg void | OnUpdateViewReload (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnViewDiff ()
WM_COMMAND message handler, diff the selection.
afx_msg void | OnUpdateViewDiff (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnViewUpdate ()
WM_COMMAND message handler, update.
afx_msg void | OnUpdateViewUpdate (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnViewTag ()
WM_COMMAND message handler, tag update.
afx_msg void | OnUpdateViewTag (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnViewDelrev ()
WM_COMMAND message handler, delete selected revisions.
afx_msg void | OnUpdateViewDelrev (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnViewSelnonsig ()
WM_COMMAND message handler, select non-significant revisions.
afx_msg void | OnUpdateViewSelnonsig (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnViewRetrieve ()
WM_COMMAND message handler, retrieve revisions.
afx_msg void | OnUpdateViewRetrieve (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | DisableUpdate (CCmdUI *pCmdUI)
Update command UI state, disable command.
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void | OnAnnotate ()
WM_COMMAND message handler, annotate selection.
afx_msg void | OnGraphGraphoptions ()
WM_COMMAND message handler, display graph options menu.
afx_msg void | OnUpdateGraphChangelogmessage (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnGraphChangelogmessage ()
WM_COMMAND message handler, change the log message.
afx_msg void | OnUpdateGraphSetdescription (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnGraphSetdescription ()
WM_COMMAND message handler, set the description.
afx_msg void | OnGraphSetstate ()
WM_COMMAND message handler, set the state.
afx_msg void | OnUpdateGraphSetstate (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnViewUnlockf ()
WM_COMMAND message handler, unlock the selection.
afx_msg void | OnUpdateViewUnlockf (CCmdUI *pCmdUI)
Update command UI state.
afx_msg void | OnViewEditsel ()
WM_COMMAND message handler, edit selection.
afx_msg void | OnViewEditseldef ()
WM_COMMAND message handler, edit selection using default editor.
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
WM_LBUTTONDBLCLK message handler, view the selection via file action.
afx_msg void | OnViewRetrieveAs ()
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnViewOpensel ()
WM_COMMAND message handler, open selection.
afx_msg void | OnViewOpenselas ()
WM_COMMAND message handler, open selection using Open With... dialog.
afx_msg void | OnQueryShellactionDefault ()
WM_COMMAND message handler, launch default associated shell action.

Private Member Functions

bool DisableCommon ()
bool | IsSelSingleNode (kLogNode type, bool equal=true)
void | FileAction ()
void | SaveSel (bool queryName=false)
bool | RetrieveSel (UStr &file)
void | OnInitMenuPopup (CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu)
WM_INITMENUPOPUP message handler.

Private Attributes

int m_numberOfPages
int m_pageHeight

Static Private Attributes

CImageList | m_imageList

Detailed Description

Graph view class.

Definition at line 310 of file GraphView.h.

Constructor & Destructor Documentation

CGraphView::CGraphView ( ) [protected]

Definition at line 1270 of file GraphView.cpp.

References IDB_SMALLICONS.

01271 {
01272     if( m_imageList.m_hImageList == 0L )
01273         m_imageList.Create(IDB_SMALLICONS, 16, 1, RGB(255, 255, 255));
01274 }

CGraphView::~CGraphView ( ) [protected, virtual]

Definition at line 1276 of file GraphView.cpp.

01277 {
01278 }

Member Function Documentation

void CGraphView::CalcImageSize ( void )

Calculate the size of the graph and set the scroll bars.

Definition at line 1350 of file GraphView.cpp.

References CWinLogData::Bounds(), CWinLogData::ComputeBounds(), CWinLogData::CreateNewData(), CGraphDoc::GetEntryInfo(), CGraphDoc::GetNode(), CWinLogData::Offset(), SHADOW_OFFSET_PT, and STARTPOINT_PT.

Referenced by OnEndPrinting(), and CGraphDoc::SetNode().

01351 {
01352     const CPoint startPoint(STARTPOINT_PT);
01353     CWindowDC dc(this);
01354     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01355
01356     CLogNode* root = pDoc->GetNode();
01357     if( root == 0L )
01358         return;
01359
01360     // Set all the bounds locations
01361     CWinLogData* data = CWinLogData::CreateNewData(root);
01362     root->SetUserData(data);
01363     data->ComputeBounds(startPoint, dc, pDoc->GetEntryInfo());
01364
01365     // Re-offset from (0, 0)
01366     CRect bounds = data->Bounds();
01367     data->Offset(startPoint - bounds.TopLeft());
01368     bounds = data->Bounds();
01369
01370     // Set the scroll size, we add the margin of the start point offset on each side
01371     SetScrollSizes(MM_TEXT, bounds.Size() + CSize(startPoint)+CSize(startPoint)+CSize(SHADOW_OFFSET_PT));
01372 }

Here is the call graph for this function:

bool CGraphView::DisableCommon ( ) [private]

Check whether the commands should be disabled

Returns:
true if commands should be disabled, false otherwise
Definition at line 1713 of file GraphView.cpp.

References CGraphDoc::GetNode(), and CWincvsApp::IsCvsRunning().

Referenced by FileAction(), OnContextMenu(), OnUpdateGraphChangelogmessage(), OnUpdateGraphSetdescription(), OnUpdateGraphSetstate(), OnUpdateViewDelrev(), OnUpdateViewDiff(), OnUpdateViewReload(), OnUpdateViewRetrieve(), OnUpdateViewSelnonsig(), OnUpdateViewTag(), OnUpdateViewUnlockf(), and OnUpdateViewUpdate().

01714 {
01715     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01716     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01717     CLogNode* root = pDoc->GetNode();
01718
01719     return root == 0L || root->GetUserData() == 0L || app->IsCvsRunning() || this != CWnd::GetFocus();
01720 }

Here is the call graph for this function:

void CGraphView::DisableUpdate ( CCmdUI * pCmdUI ) [protected]

Update command UI state, disable command.

Definition at line 1894 of file GraphView.cpp.

01895 {
01896     pCmdUI->Enable(false);
01897 }

void CGraphView::FileAction ( ) [private]

File action Definition at line 2714 of file GraphView.cpp.

References CStr, DisableCommon(), IsSelSingleNode(), MultiFiles::newdir(), MultiFiles::newfile(), KoFileActionHandler::OnFiles(), RetrieveSel(), and SplitPath().

Referenced by OnKeyDown(), and OnLButtonDblClk().

02715 {
02716     if( !DisableCommon() && IsSelSingleNode(kNodeHeader, false) )
02717     {
02718         CStr file;
02719         if( RetrieveSel(file) )
02720         {
02721             MultiFiles mf;
02722
02723             CStr uppath, folder;
02724             if( SplitPath(file.c_str(), uppath, folder) )
02725             {
02726                 mf.newdir(uppath.c_str());
02727                 mf.newfile(folder.c_str());
02728
02729                 KoFileActionHandler handler;
02730                 handler.OnFiles(&mf);
02731             }
02732         }
02733     }
02734 }

Here is the call graph for this function:

CImageList& CGraphView::GetImgList ( void ) [inline, static]

Get the image list.

Definition at line 408 of file GraphView.h.

Referenced by CWinLogRevData::UpdateSelf().

00408 { return m_imageList; }

bool CGraphView::IsSelSingleNode | ( | kLogNode | type,
 |  | bool | equal = true
 | ) | [private]

Check whether a single node is selected

Parameters:
type | Node type
equal | true if selection should be equal, false otherwise
Returns:
true if the selection is a single node, false otherwise
Definition at line 1728 of file GraphView.cpp.

References CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), TGraphCmdStatus::GetSelCount(), CWinLogData::GetType(), and TGraph::TraverseGraph().

Referenced by FileAction(), OnUpdateGraphChangelogmessage(), OnUpdateGraphSetdescription(), OnUpdateGraphSetstate(), OnUpdateViewRetrieve(), and OnUpdateViewUnlockf().

01729 {
01730     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01731     CLogNode* root = pDoc->GetNode();
01732
01733     TGraphCmdStatus trav;
01734     trav.TraverseGraph(root);
01735
01736     return (trav.GetSelCount() == 1 &&
01737         (equal ? trav.GetSel1()->GetType() == type : trav.GetSel1()->GetType() != type));
01738 }

Here is the call graph for this function:

void CGraphView::OnAnnotate ( ) [protected]

WM_COMMAND message handler, annotate selection.

Definition at line 2064 of file GraphView.cpp.

References CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), TGraphCmdStatus::GetSel2(), TGraphCmdStatus::GetSelCount(), CWinLogData::GetStr(), MultiFiles::newdir(), MultiFiles::newfile(), KoGraphAnnotateHandler::OnFiles(), and TGraph::TraverseGraph().

02065 {
02066     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02067     CLogNode* root = pDoc->GetNode();
02068     if( root == 0L || root->GetUserData() == 0L )
02069         return;
02070
02071     TGraphCmdStatus trav;
02072     trav.TraverseGraph(root);
02073
02074     MultiFiles mf;
02075
02076     mf.newdir(pDoc->GetDir());
02077     mf.newfile(pDoc->GetName(), 0L, trav.GetSel1()->GetStr());
02078
02079     if( trav.GetSelCount() == 2 )
02080     {
02081         mf.newfile(pDoc->GetName(), 0L, trav.GetSel2()->GetStr());
02082     }
02083
02084     KoGraphAnnotateHandler handler;
02085     handler.OnFiles(&mf);
02086 }

Here is the call graph for this function:

void CGraphView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo
 | ) | [protected, virtual]

OnBeginPrinting virtual override.

Definition at line 1643 of file GraphView.cpp.

References CWinLogData::Bounds(), CWinLogData::ComputeBounds(), CWinLogData::CreateNewData(), CGraphDoc::GetEntryInfo(), CGraphDoc::GetNode(), m_numberOfPages, and m_pageHeight.

01644 {
01645     CScrollView::OnBeginPrinting(pDC, pInfo);
01646
01647     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01648     CLogNode* root = pDoc->GetNode();
01649     if( root == 0L )
01650         return;
01651
01652     // set all the bounds locations
01653     CWinLogData* data = CWinLogData::CreateNewData(root);
01654     root->SetUserData(data);
01655     CPoint start(0, 0);
01656     data->ComputeBounds(start, *pDC, pDoc->GetEntryInfo());
01657
01658     // compute the number of pages
01659     CRect bounds = data->Bounds();
01660     m_pageHeight = pDC->GetDeviceCaps(VERTRES);
01661     m_numberOfPages = bounds.Height() / m_pageHeight + 1;
01662
01663     pInfo->SetMaxPage(m_numberOfPages);
01664 }

Here is the call graph for this function:

void CGraphView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point
 | ) | [protected]

Display context menu

Parameters:
pWnd | Window
point | Mouse position
Definition at line 1904 of file GraphView.cpp.

References DisableCommon(), CScrollView::GetDeviceScrollPosition(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), TGraphCmdStatus::GetSelCount(), GetTopPopupMenu(), CWinLogData::GetType(), CWinLogData::HitTest(), CWinLogData::Selected(), CWinLogData::SetSelected(), STARTPOINT_PT, TGraph::TraverseGraph(), and CWinLogData::UnselectAll().

01905 {
01906     // Comply with windows UI standard (Windows Explorer file view used as a reference),
01907     // change selections according to the state of Control and Shift keys
01908     BYTE abKeyboardState[256];
01909     BOOL bControlState = FALSE;
01910     BOOL bShiftState = FALSE;
01911     memset(abKeyboardState, 0, 256);
01912
01913     if( GetKeyboardState(abKeyboardState) )
01914     {
01915         bControlState = abKeyboardState[VK_CONTROL] & 0x80;
01916         bShiftState = abKeyboardState[VK_SHIFT] & 0x80;
01917     }
01918
01919     if( (!bControlState || (bControlState && bShiftState)) && !DisableCommon() )
01920     {
01921         CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01922         CLogNode* root = pDoc->GetNode();
01923
01924         TGraphCmdStatus trav;
01925         trav.TraverseGraph(root);
01926
01927         CWinLogData* data = (CWinLogData*)root->GetUserData();
01928
01929         // Set the track point in case it's not the mouse click
01930         if( -1 == point.x && -1 == point.y )
01931         {
01932             // Set to top-left corner
01933             point = STARTPOINT_PT;
01934             point.x /= 2;
01935             point.y /= 2;
01936
01937             ClientToScreen(&point);
01938         }
01939
01940         CPoint hitPoint(point);
01941
01942         ScreenToClient(&hitPoint);
01943         hitPoint += GetDeviceScrollPosition();
01944
01945         CWinLogData* hit = data->HitTest(hitPoint);
01946
01947         if( hit != 0L )
01948         {
01949             if( trav.GetSelCount() == 0 )
01950             {
01951                 hit->SetSelected(this, true);
01952             }
01953             else if( trav.GetSelCount() >= 1 && trav.GetSel1()->GetType() != kNodeHeader )
01954             {
01955                 if( !(hit->Selected() && bShiftState) &&
01956                     !hit->Selected() &&
01957                     !(bControlState && bShiftState && hit->Selected()) )
01958                 {
01959                     data->UnselectAll(this);
01960                 }
01961
01962                 hit->SetSelected(this, true);
01963             }
01964         }
01965     }
01966
01967     // Get the menu to display from the main app window, which for graph view
01968     // will be IDR_GRAPH,  The submenu to display is the menu under "Graph".
01969     CMenu* pSubMenu = GetTopPopupMenu("&Graph");
01970     if( pSubMenu )
01971     {
01972         pSubMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON, point.x, point.y, this);
01973     }
01974     else
01975     {
01976         ASSERT(FALSE); // Popup menu not found
01977     }
01978 }

Here is the call graph for this function:

void CGraphView::OnDraw ( CDC * pDC ) [protected, virtual]

OnDraw virtual override, paint the graph.

Definition at line 1384 of file GraphView.cpp.

References CGraphDoc::GetEntryInfo(), CGraphDoc::GetNode(), CWinLogData::Update(), and CWinLogData::UpdateMergePoints().

01385 {
01386     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01387     CLogNode* root = pDoc->GetNode();
01388     if( root == 0L || root->GetUserData() == 0L )
01389         return;
01390
01391     CWinLogData* data = (CWinLogData*)root->GetUserData();
01392
01393     pDC->SetTextAlign(TA_CENTER);
01394     pDC->SetBkMode(TRANSPARENT);
01395     data->Update(*pDC, pDoc->GetEntryInfo());
01396     data->UpdateMergePoints(*pDC);
01397 }

Here is the call graph for this function:

void CGraphView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo
 | ) | [protected, virtual]

OnEndPrinting virtual override.

Definition at line 1667 of file GraphView.cpp.

References CalcImageSize().

01668 {
01669     CScrollView::OnEndPrinting(pDC, pInfo);
01670
01671     CalcImageSize();
01672     Invalidate();
01673 }

Here is the call graph for this function:

void CGraphView::OnGraphChangelogmessage ( ) [protected]

WM_COMMAND message handler, change the log message.

Definition at line 2119 of file GraphView.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CleanupLogMsg(), CompatGetAdminOptions(), CStr, CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), CWinLogData::GetStr(), ID_VIEW_RELOAD, kChangeLog, launchCVS(), MultiFiles::newdir(), MultiFiles::newfile(), CvsArgs::print(), and TGraph::TraverseGraph().

02120 {
02121     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02122     CLogNode* root = pDoc->GetNode();
02123     if( root == 0L || root->GetUserData() == 0L )
02124         return;
02125
02126     TGraphCmdStatus trav;
02127     trav.TraverseGraph(root);
02128
02129     CLogNode* node = trav.GetSel1()->Node();
02130     ASSERT(node->GetType() == kNodeRev);
02131     CRevFile& rev = **(CLogNodeRev*)node;
02132
02133     CStr msg = (const char*)rev.DescLog();
02134
02135     MultiFiles mf;
02136
02137     mf.newdir(pDoc->GetDir());
02138     mf.newfile(pDoc->GetName());
02139
02140     if( CompatGetAdminOptions(&mf, kChangeLog, msg) )
02141     {
02142         CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
02143
02144         CvsArgs args;
02145         args.add("admin");
02146         args.add(CStr("-m") + trav.GetSel1()->GetStr() + CStr(":") + CleanupLogMsg(msg));
02147
02148         args.add(pDoc->GetName());
02149         args.print(pDoc->GetDir());
02150
02151         CGraphConsole cons;
02152         launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
02153     }
02154 }

Here is the call graph for this function:

void CGraphView::OnGraphGraphoptions ( ) [protected]

WM_COMMAND message handler, display graph options menu.

Definition at line 2089 of file GraphView.cpp.

References CompatGetGraphOptions(), gGraphBranchColor, gGraphDeadNodeColor, gGraphHeaderColor, gGraphMergeColor, gGraphNodeColor, gGraphSelColor, gGraphShadowColor, gGraphTagColor, gGraphUserStateNodeColor, and CWincvsApp::UpdateAllDocsView().

02090 {
02091     if( CompatGetGraphOptions(gGraphSelColor, gGraphShadowColor,
02092         gGraphHeaderColor, gGraphTagColor, gGraphBranchColor,
02093         gGraphNodeColor, gGraphDeadNodeColor, gGraphUserStateNodeColor,
02094         gGraphMergeColor) )
02095     {
02096         // add any additional processing here
02097     }
02098
02099     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
02100     if( pApp )
02101     {
02102         pApp->UpdateAllDocsView();
02103     }
02104 }

Here is the call graph for this function:

void CGraphView::OnGraphSetdescription ( ) [protected]

WM_COMMAND message handler, set the description.

Definition at line 2169 of file GraphView.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CleanupLogMsg(), CompatGetAdminOptions(), CStr, CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), ID_VIEW_RELOAD, kSetDescription, launchCVS(), MultiFiles::newdir(), MultiFiles::newfile(), CvsArgs::print(), and TGraph::TraverseGraph().

02170 {
02171     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02172     CLogNode* root = pDoc->GetNode();
02173     if( root == 0L || root->GetUserData() == 0L )
02174         return;
02175
02176     TGraphCmdStatus trav;
02177     trav.TraverseGraph(root);
02178
02179     CLogNode* node = trav.GetSel1()->Node();
02180     ASSERT(node->GetType() == kNodeHeader);
02181     CRcsFile& rev = **(CLogNodeHeader*)node;
02182
02183     CStr msg = (const char*)rev.DescLog();
02184
02185     MultiFiles mf;
02186
02187     mf.newdir(pDoc->GetDir());
02188     mf.newfile(pDoc->GetName());
02189
02190     if( CompatGetAdminOptions(&mf, kSetDescription, msg) )
02191     {
02192         CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
02193
02194         CvsArgs args;
02195         args.add("admin");
02196         args.add(CStr("-t-") + CleanupLogMsg(msg));
02197
02198         args.add(pDoc->GetName());
02199         args.print(pDoc->GetDir());
02200
02201         CGraphConsole cons;
02202         launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
02203     }
02204 }

Here is the call graph for this function:

void CGraphView::OnGraphSetstate ( ) [protected]

WM_COMMAND message handler, set the state.

Definition at line 2219 of file GraphView.cpp.

References _i18n, CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), BUTTONTITLE_CANCEL, BUTTONTITLE_CONTINUE, CleanupLogMsg(), CompatGetAdminOptions(), CStr, CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), CWinLogData::GetStr(), ID_VIEW_RELOAD, kCvsAlertOKButton, kCvsAlertStopIcon, kSetState, launchCVS(), MultiFiles::newdir(), MultiFiles::newfile(), CvsArgs::print(), CvsAlert::ShowAlert(), and TGraph::TraverseGraph().

02220 {
02221     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02222     CLogNode* root = pDoc->GetNode();
02223     if( root == 0L || root->GetUserData() == 0L )
02224         return;
02225
02226     TGraphCmdStatus trav;
02227     trav.TraverseGraph(root);
02228
02229     CLogNode* node = trav.GetSel1()->Node();
02230     ASSERT(node->GetType() == kNodeRev);
02231     CRevFile& rev = **(CLogNodeRev*)node;
02232
02233     CStr state = (const char*)rev.State();
02234
02235     CvsAlert cvsAlert(kCvsAlertStopIcon,
02236         _i18n("Are you sure you want to continue?"), _i18n("The revision state is: \"dead\".\nYou should not alter it manually."),
02237         BUTTONTITLE_CONTINUE, BUTTONTITLE_CANCEL);
02238
02239     if( strcmp("dead", state.c_str()) == 0 && cvsAlert.ShowAlert() != kCvsAlertOKButton )
02240     {
02241         return;
02242     }
02243
02244     MultiFiles mf;
02245
02246     mf.newdir(pDoc->GetDir());
02247     mf.newfile(pDoc->GetName());
02248
02249     if( CompatGetAdminOptions(&mf, kSetState, state) )
02250     {
02251         CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
02252
02253         CvsArgs args;
02254         args.add("admin");
02255         args.add("-s");
02256         args.add(CleanupLogMsg(state) + CStr(":") + trav.GetSel1()->GetStr());
02257
02258         args.add(pDoc->GetName());
02259         args.print(pDoc->GetDir());
02260
02261         CGraphConsole cons;
02262         launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
02263     }
02264 }

Here is the call graph for this function:

void CGraphView::OnInitialUpdate ( ) [protected, virtual]

OnInitialUpdate virtual override, set the initial scroll sizes.

Definition at line 1375 of file GraphView.cpp.

01376 {
01377     CScrollView::OnInitialUpdate();
01378
01379     SetScrollSizes(MM_TEXT, CSize(200, 100));
01380     //CalcImageSize();
01381 }

void CGraphView::OnInitMenuPopup | ( | CMenu * | pPopupMenu,
 |  | UINT | nIndex,
 |  | BOOL | bSysMenu
 | ) | [private]

WM_INITMENUPOPUP message handler.

Definition at line 1981 of file GraphView.cpp.

References NULL.

01982 {
01983     ASSERT(pPopupMenu != NULL);
01984     // Check the enabled state of various menu items.
01985
01986     CCmdUI state;
01987     state.m_pMenu = pPopupMenu;
01988     ASSERT(state.m_pOther == NULL);
01989     ASSERT(state.m_pParentMenu == NULL);
01990
01991     // Determine if menu is popup in top-level menu and set m_pOther to
01992     // it if so (m_pParentMenu == NULL indicates that it is secondary popup).
01993     HMENU hParentMenu;
01994     if( AfxGetThreadState()->m_hTrackingMenu == pPopupMenu->m_hMenu )
01995         state.m_pParentMenu = pPopupMenu;    // Parent == child for tracking popup.
01996     else if( (hParentMenu = ::GetMenu(m_hWnd)) != NULL )
01997     {
01998         CWnd* pParent = this;
01999         // Child windows don't have menus--need to go to the top!
02000         if( pParent != NULL &&
02001             (hParentMenu = ::GetMenu(pParent->m_hWnd)) != NULL )
02002         {
02003             int nIndexMax = ::GetMenuItemCount(hParentMenu);
02004             for(int nIndex = 0; nIndex < nIndexMax; nIndex++)
02005             {
02006                 if( ::GetSubMenu(hParentMenu, nIndex) == pPopupMenu->m_hMenu )
02007                 {
02008                     // When popup is found, m_pParentMenu is containing menu.
02009                     state.m_pParentMenu = CMenu::FromHandle(hParentMenu);
02010                     break;
02011                 }
02012             }
02013         }
02014     }
02015
02016     state.m_nIndexMax = pPopupMenu->GetMenuItemCount();
02017     for(state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax; state.m_nIndex++)
02018     {
02019         state.m_nID = pPopupMenu->GetMenuItemID(state.m_nIndex);
02020         if( state.m_nID == 0 )
02021             continue; // Menu separator or invalid cmd - ignore it.
02022
02023         ASSERT(state.m_pOther == NULL);
02024         ASSERT(state.m_pMenu != NULL);
02025         if( state.m_nID == (UINT)-1 )
02026         {
02027             // Possibly a popup menu, route to first item of that popup.
02028             state.m_pSubMenu = pPopupMenu->GetSubMenu(state.m_nIndex);
02029             if( state.m_pSubMenu == NULL ||
02030                 (state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
02031                 state.m_nID == (UINT)-1 )
02032             {
02033                 continue;       // First item of popup can't be routed to.
02034             }
02035
02036             state.DoUpdate(this, TRUE);   // Popups are never auto disabled.
02037         }
02038         else
02039         {
02040             // Normal menu item.
02041             // Auto enable/disable if frame window has m_bAutoMenuEnable
02042             // set and command is _not_ a system command.
02043             state.m_pSubMenu = NULL;
02044             state.DoUpdate(this, FALSE);
02045         }
02046
02047         // Adjust for menu deletions and additions.
02048         UINT nCount = pPopupMenu->GetMenuItemCount();
02049         if( nCount < state.m_nIndexMax )
02050         {
02051             state.m_nIndex -= (state.m_nIndexMax - nCount);
02052             while( state.m_nIndex < nCount &&
02053                 pPopupMenu->GetMenuItemID(state.m_nIndex) == state.m_nID )
02054             {
02055                 state.m_nIndex++;
02056             }
02057         }
02058
02059         state.m_nIndexMax = nCount;
02060     }
02061 }

void CGraphView::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

WM_KEYDOWN message handler, move the selection thru the nodes:

  • Esc to cancel selection
  • Enter to edit selection (just as mouse double-click does)
  • Space to print the log info (just as mouse click does)
  • Ctrl+Home to go to the current revision
  • Up, Down, PgUp, PgDown to navigate thru the nodes vertically
  • Left, Right to navigate thru branches and tags horizontally
  • Home, End to go to the bottom or top of the graph
Definition at line 2582 of file GraphView.cpp.

References CvsLogOutput(), FileAction(), CWincvsApp::GetConsoleView(), TGraphCurSelector::GetDiskNodeSel(), TGraphCurSelector::GetLastSel(), TGraphCurSelector::GetNewSel(), CGraphDoc::GetNode(), TGraphCurSelector::GetSel1(), TGraphCmdStatus::GetSel1(), TGraphCurSelector::GetSel2(), URect::Height(), NULL, CWinLogData::SelfBounds(), CWinLogData::SetSelected(), URECT::top, TGraph::TraverseGraph(), and CWinLogData::UnselectAll().

02583 {
02584     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02585     CLogNode* node = pDoc->GetNode();
02586     UINT nCharTmp = (nChar == VK_LEFT ? VK_UP : (nChar == VK_RIGHT ? VK_DOWN : nChar));
02587
02588     switch( nCharTmp )
02589     {
02590     case VK_ESCAPE:
02591         // Unselect all
02592         if( node && node->GetUserData() /*&& GetAsyncKeyState(VK_CONTROL) != 0*/ )
02593         {
02594             CWinLogData* data = (CWinLogData*)node->GetUserData();
02595             data->UnselectAll(this);
02596         }
02597         break;
02598     case VK_RETURN:
02599         FileAction();
02600         break;
02601     case VK_SPACE:
02602         // Print selection info
02603         {
02604             CWincvsApp* app = (CWincvsApp*)AfxGetApp();
02605             CWincvsView* view = app->GetConsoleView();
02606
02607             if( view != 0L )
02608             {
02609                 TGraphCmdStatus trav;
02610                 trav.TraverseGraph(node);
02611
02612                 if( trav.GetSel1() )
02613                 {
02614                     CColorConsole out(view);
02615                     CvsLogOutput(out, trav.GetSel1()->Node());
02616                 }
02617             }
02618         }
02619         break;
02620     case VK_PRIOR:
02621     case VK_NEXT:
02622     case VK_UP:
02623     case VK_DOWN:
02624     case VK_HOME: // FIXME -> go to current rev., Ctrl+Home, Ctrl+End -> go to top/bottom of graph
02625     case VK_END:
02626         // Navigation
02627         {
02628             if( node == NULL || node->GetUserData() == NULL || pDoc == NULL )
02629             {
02630                 break;
02631             }
02632
02633             int offset = (nCharTmp == VK_DOWN || nCharTmp == VK_NEXT) ? 1 : -1;
02634             offset *= (nCharTmp == VK_NEXT || nCharTmp == VK_PRIOR) ? 10 : 1;
02635
02636             const bool ctrlOn = GetAsyncKeyState(VK_CONTROL) < 0;
02637             const bool shiftOn = GetAsyncKeyState(VK_SHIFT) < 0;
02638
02639             TGraphCurSelector trav(offset, this);
02640             trav.TraverseGraph(node);
02641
02642             //CWinLogData* origsel1 = trav.GetSel1();
02643             CWinLogData* origsel2 = trav.GetSel2() ? trav.GetSel2() : (ctrlOn ? trav.GetSel1() : 0L);
02644             CWinLogData* newsel;
02645
02646             if( nCharTmp == VK_HOME && ctrlOn )
02647             {
02648                 newsel = trav.GetDiskNodeSel();
02649             }
02650             else if( nCharTmp == VK_END ||
02651                 ((nCharTmp == VK_DOWN || nCharTmp == VK_NEXT) && trav.GetNewSel() && trav.GetNewSel() == node->GetUserData()) )
02652             {
02653                 newsel = trav.GetLastSel();
02654             }
02655             else if( nCharTmp != VK_HOME && nCharTmp != VK_END )
02656             {
02657                 newsel = trav.GetNewSel();
02658             }
02659             else
02660             {
02661                 newsel = (CWinLogData*)node->GetUserData();
02662             }
02663
02664             if( !newsel )
02665             {
02666                 break;
02667             }
02668
02669             if( !shiftOn )
02670             {
02671                 CWinLogData* data = (CWinLogData*)node->GetUserData();
02672                 data->UnselectAll(this);
02673             }
02674             else if( origsel2 && ctrlOn )
02675             {
02676                 origsel2->SetSelected(this, true);
02677             }
02678
02679             newsel->SetSelected(this, true);
02680
02681             CPoint pt = GetScrollPosition();
02682             pt.y = _cpp_max(newsel->SelfBounds().top - newsel->SelfBounds().Height(), 0);
02683             ScrollToPosition(pt);
02684         }
02685         break;
02686     }
02687
02688     CScrollView::OnKeyDown(nChar, nRepCnt, nFlags);
02689 }

Here is the call graph for this function:

void CGraphView::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

WM_LBUTTONDBLCLK message handler, view the selection via file action.

Definition at line 2380 of file GraphView.cpp.

References FileAction().

02381 {
02382     FileAction();
02383
02384     CScrollView::OnLButtonDblClk(nFlags, point);
02385 }

Here is the call graph for this function:

void CGraphView::OnLButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

WM_LBUTTONDOWN message handler, update selection.

Definition at line 1418 of file GraphView.cpp.

References CvsLogOutput(), CWincvsApp::GetConsoleView(), CScrollView::GetDeviceScrollPosition(), CGraphDoc::GetNode(), CWinLogData::HitTest(), CWinLogData::Selected(), CWinLogData::SetSelected(), and CWinLogData::UnselectAll().

01419 {
01420     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01421     CLogNode* root = pDoc->GetNode();
01422     if( root == 0L || root->GetUserData() == 0L )
01423         return;
01424
01425     CWinLogData* data = (CWinLogData*)root->GetUserData();
01426
01427     if( nFlags & MK_LBUTTON )
01428     {
01429         if((nFlags & MK_SHIFT) == 0 && (nFlags & MK_CONTROL) == 0)
01430             data->UnselectAll(this);
01431
01432         point += GetDeviceScrollPosition();
01433
01434         CWinLogData* hit = data->HitTest(point);
01435         if( hit != 0L )
01436         {
01437             if( (nFlags & MK_SHIFT) == 0 && (nFlags & MK_CONTROL) == 0 )
01438             {
01439                 if( !hit->Selected() )
01440                 {
01441                     hit->SetSelected(this, true);
01442                     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01443                     CWincvsView* view = app->GetConsoleView();
01444
01445                     if( view != 0L )
01446                     {
01447                         CColorConsole out(view);
01448                         CvsLogOutput(out, hit->Node());
01449                     }
01450                 }
01451             }
01452             else
01453             {
01454                 hit->SetSelected(this, !hit->Selected());
01455             }
01456         }
01457         else
01458         {
01459             CGraphRectTracker track(this);
01460             point -= GetDeviceScrollPosition();
01461             if( track.TrackRubberBand(this, point, true) )
01462             {
01463                 // Traverse and mark
01464                 track.m_rect.OffsetRect(GetDeviceScrollPosition());
01465                 track.m_rect.NormalizeRect();
01466
01467                 TGraphRectSelect traversal((nFlags & MK_CONTROL) != 0, this, track.m_rect);
01468                 traversal.TraverseGraph(root);
01469             }
01470         }
01471     }
01472     else if( nFlags & MK_RBUTTON )
01473     {
01474         // nothing to do
01475     }
01476
01477     CScrollView::OnLButtonDown(nFlags, point);
01478 }

Here is the call graph for this function:

BOOL CGraphView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

OnPreparePrinting virtual override.

Definition at line 1676 of file GraphView.cpp.

01677 {
01678     BOOL res = DoPreparePrinting(pInfo);
01679     if( !res )
01680         return res;
01681
01682     return TRUE;
01683 }

void CGraphView::OnPrint | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo
 | ) | [protected, virtual]

OnPrint virtual override.

Definition at line 1686 of file GraphView.cpp.

References CGraphDoc::GetEntryInfo(), CGraphDoc::GetNode(), m_pageHeight, and CWinLogData::Update().

01687 {
01688     if( !pDC->IsPrinting() )
01689         return;
01690
01691     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01692     CLogNode* root = pDoc->GetNode();
01693     if( root == 0L || root->GetUserData() == 0L )
01694         return;
01695
01696     CWinLogData* data = (CWinLogData*)root->GetUserData();
01697
01698     // Orient the viewport so that the first row to be printed
01699     // has a viewport coordinate of (0,0).
01700     int yTopOfPage = (pInfo->m_nCurPage -1) * m_pageHeight;
01701     pDC->SetViewportOrg(0, -yTopOfPage);
01702     pDC->SetTextAlign(TA_CENTER);
01703     pDC->SetBkMode(TRANSPARENT);
01704     data->Update(*pDC, pDoc->GetEntryInfo());
01705
01706     //  CScrollView::OnPrint(pDC, pInfo);
01707 }

Here is the call graph for this function:

void CGraphView::OnQueryShellactionDefault ( ) [protected]

WM_COMMAND message handler, launch default associated shell action.

Definition at line 2323 of file GraphView.cpp.

References CStr, kLaunchDefault, LaunchHandler(), and RetrieveSel().

02324 {
02325     CStr file;
02326     if( RetrieveSel(file) )
02327     {
02328         LaunchHandler(kLaunchDefault, file.c_str());
02329     }
02330 }

Here is the call graph for this function:

BOOL CGraphView::OnScroll | ( | UINT | nScrollCode,
 |  | UINT | nPos,
 |  | BOOL | bDoScroll = TRUE
 | ) | [virtual]

OnScroll virtual override to fix MFC bug when graph window is larger than 32K

Note:
See kb166473 (http://support.microsoft.com/default.aspx?scid=kb;en-us;166473)
Definition at line 2391 of file GraphView.cpp.
02392 {
02393     SCROLLINFO info;
02394     info.cbSize = sizeof(SCROLLINFO);
02395     info.fMask = SIF_TRACKPOS;
02396
02397     if( LOBYTE(nScrollCode) == SB_THUMBTRACK )
02398     {
02399         GetScrollInfo(SB_HORZ, &info);
02400         nPos = info.nTrackPos;
02401     }
02402
02403     if( HIBYTE(nScrollCode) == SB_THUMBTRACK )
02404     {
02405         GetScrollInfo(SB_VERT, &info);
02406         nPos = info.nTrackPos;
02407     }
02408
02409     return CScrollView::OnScroll(nScrollCode, nPos, bDoScroll);
02410 }

void CGraphView::OnUpdateGraphChangelogmessage ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 2107 of file GraphView.cpp.

References DisableCommon(), and IsSelSingleNode().

02108 {
02109     BOOL enabled = FALSE;
02110     if( !DisableCommon() )
02111     {
02112         enabled = IsSelSingleNode(kNodeRev);
02113     }
02114
02115     pCmdUI->Enable(enabled);
02116 }

Here is the call graph for this function:

void CGraphView::OnUpdateGraphSetdescription ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 2157 of file GraphView.cpp.

References DisableCommon(), and IsSelSingleNode().

02158 {
02159     BOOL enabled = FALSE;
02160     if( !DisableCommon() )
02161     {
02162         enabled = IsSelSingleNode(kNodeHeader);
02163     }
02164
02165     pCmdUI->Enable(enabled);
02166 }

Here is the call graph for this function:

void CGraphView::OnUpdateGraphSetstate ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 2207 of file GraphView.cpp.

References DisableCommon(), and IsSelSingleNode().

02208 {
02209     BOOL enabled = FALSE;
02210     if( !DisableCommon() )
02211     {
02212         enabled = IsSelSingleNode(kNodeRev);
02213     }
02214
02215     pCmdUI->Enable(enabled);
02216 }

Here is the call graph for this function:

void CGraphView::OnUpdateViewDelrev ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 1788 of file GraphView.cpp.

References DisableCommon(), TGraphDelCmd::GetCountSel(), CGraphDoc::GetNode(), TGraphDelCmd::GetOnlyRev(), and TGraph::TraverseGraph().

01789 {
01790     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01791     CLogNode* root = pDoc->GetNode();
01792     if( DisableCommon() )
01793     {
01794         pCmdUI->Enable(FALSE);
01795         return;
01796     }
01797
01798     TGraphDelCmd trav;
01799     trav.TraverseGraph(root);
01800     BOOL outEnabled = trav.GetCountSel() >= 1 && trav.GetOnlyRev();
01801     pCmdUI->Enable(outEnabled);
01802 }

Here is the call graph for this function:

void CGraphView::OnUpdateViewDiff ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 1532 of file GraphView.cpp.

References DisableCommon(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), TGraphCmdStatus::GetSel2(), TGraphCmdStatus::GetSelCount(), CWinLogData::GetType(), and TGraph::TraverseGraph().

01533 {
01534     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01535     CLogNode* root = pDoc->GetNode();
01536     if( DisableCommon() )
01537     {
01538         pCmdUI->Enable(FALSE);
01539         return;
01540     }
01541
01542     TGraphCmdStatus trav;
01543     trav.TraverseGraph(root);
01544
01545     const BOOL outEnabled = (trav.GetSelCount() == 2 && trav.GetSel1()->GetType() != kNodeHeader &&
01546         trav.GetSel2()->GetType() != kNodeHeader) ||
01547         (trav.GetSelCount() == 1 && trav.GetSel1()->GetType() != kNodeHeader);
01548
01549     pCmdUI->Enable(outEnabled);
01550 }

Here is the call graph for this function:

void CGraphView::OnUpdateViewReload ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 1498 of file GraphView.cpp.

References DisableCommon().

01499 {
01500     if( DisableCommon() )
01501         pCmdUI->Enable(FALSE);
01502     else
01503         pCmdUI->Enable(TRUE);
01504 }

Here is the call graph for this function:

void CGraphView::OnUpdateViewRetrieve ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 1882 of file GraphView.cpp.

References DisableCommon(), and IsSelSingleNode().

01883 {
01884     BOOL enabled = FALSE;
01885     if( !DisableCommon() )
01886     {
01887         enabled = IsSelSingleNode(kNodeHeader, false);
01888     }
01889
01890     pCmdUI->Enable(enabled);
01891 }

Here is the call graph for this function:

void CGraphView::OnUpdateViewSelnonsig ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 1820 of file GraphView.cpp.

References DisableCommon().

01821 {
01822     if( DisableCommon() )
01823         pCmdUI->Enable(FALSE);
01824     else
01825         pCmdUI->Enable(TRUE);
01826 }

Here is the call graph for this function:

void CGraphView::OnUpdateViewTag ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 1624 of file GraphView.cpp.

References DisableCommon(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSelCount(), and TGraph::TraverseGraph().

01625 {
01626     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01627     CLogNode* root = pDoc->GetNode();
01628
01629     if( DisableCommon() )
01630     {
01631         pCmdUI->Enable(FALSE);
01632         return;
01633     }
01634
01635     TGraphCmdStatus trav;
01636     trav.TraverseGraph(root);
01637
01638     const BOOL outEnabled = trav.GetSelCount() == 1;
01639     pCmdUI->Enable(outEnabled);
01640 }

Here is the call graph for this function:

void CGraphView::OnUpdateViewUnlockf ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 2267 of file GraphView.cpp.

References DisableCommon(), and IsSelSingleNode().

02268 {
02269     BOOL enabled = FALSE;
02270     if( !DisableCommon() )
02271     {
02272         enabled = IsSelSingleNode(kNodeRev);
02273     }
02274
02275     pCmdUI->Enable(enabled);
02276 }

Here is the call graph for this function:

void CGraphView::OnUpdateViewUpdate ( CCmdUI * pCmdUI ) [protected]

Update command UI state.

Definition at line 1573 of file GraphView.cpp.

References DisableCommon().

01574 {
01575     if( DisableCommon() )
01576         pCmdUI->Enable(FALSE);
01577     else
01578         pCmdUI->Enable(TRUE);
01579 }

Here is the call graph for this function:

void CGraphView::OnViewDelrev ( ) [protected]

WM_COMMAND message handler, delete selected revisions.

Definition at line 1741 of file GraphView.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), BUTTONTITLE_NO, BUTTONTITLE_YES, TGraphDelCmd::GetAllRevs(), CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), CProgress::HasAborted(), ID_VIEW_RELOAD, kCvsAlertCancelButton, kCvsAlertOKButton, kCvsAlertQuestionIcon, launchCVS(), CvsArgs::print(), CProgress::SetProgress(), CvsAlert::ShowAlert(), and TGraph::TraverseGraph().

01742 {
01743     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01744     CLogNode* root = pDoc->GetNode();
01745     if( root == 0L || root->GetUserData() == 0L )
01746         return;
01747
01748     CvsAlert cvsAlert(kCvsAlertQuestionIcon,
01749         "Do you really want to delete selected revisions?", "Deleting file revisions will permanently remove the revisions on the server.",
01750         BUTTONTITLE_YES, BUTTONTITLE_NO);
01751
01752     if( cvsAlert.ShowAlert(kCvsAlertCancelButton) != kCvsAlertOKButton )
01753     {
01754         return;
01755     }
01756
01757     CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
01758
01759     TGraphDelCmd trav;
01760     trav.TraverseGraph(root);
01761
01762     CProgress progress(true, "Deleting revisions...");
01763
01764     std::vector<CStr>::const_iterator i;
01765     int count = 0;
01766     for(i = trav.GetAllRevs().begin(); i != trav.GetAllRevs().end(); ++i, ++count)
01767     {
01768         progress.SetProgress((int)(((float)count / (float)trav.GetAllRevs().size()) * 100.0 + .5));
01769         if( progress.HasAborted() )
01770             break;
01771
01772         CvsArgs args;
01773         args.add("admin");
01774         args.add("-o");
01775         args.add(*i);
01776         args.add(pDoc->GetName());
01777         args.print(pDoc->GetDir());
01778
01779         CGraphConsole cons;
01780         launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
01781     }
01782
01783     if( !progress.HasAborted() )
01784         progress.SetProgress(100);
01785 }

Here is the call graph for this function:

void CGraphView::OnViewDiff ( ) [protected]

WM_COMMAND message handler, diff the selection.

Definition at line 1507 of file GraphView.cpp.

References CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), TGraphCmdStatus::GetSel2(), TGraphCmdStatus::GetSelCount(), CWinLogData::GetStr(), MultiFiles::newdir(), MultiFiles::newfile(), NULL, KoGraphDiffHandler::OnFiles(), and TGraph::TraverseGraph().

01508 {
01509     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01510     CLogNode* root = pDoc->GetNode();
01511     if( root == NULL || root->GetUserData() == NULL || pDoc == NULL )
01512         return;
01513
01514     TGraphCmdStatus trav;
01515     trav.TraverseGraph(root);
01516
01517     MultiFiles mf;
01518
01519     mf.newdir(pDoc->GetDir());
01520     mf.newfile(pDoc->GetName(), 0L, trav.GetSel1()->GetStr());
01521
01522     if( trav.GetSelCount() == 2 )
01523     {
01524         mf.newfile(pDoc->GetName(), 0L, trav.GetSel2()->GetStr());
01525     }
01526
01527     KoGraphDiffHandler handler;
01528     handler.OnFiles(&mf);
01529 }

Here is the call graph for this function:

void CGraphView::OnViewEditsel ( ) [protected]

WM_COMMAND message handler, edit selection.

Definition at line 2303 of file GraphView.cpp.

References CStr, kLaunchEdit, LaunchHandler(), and RetrieveSel().

02304 {
02305     CStr file;
02306     if( RetrieveSel(file) )
02307     {
02308         LaunchHandler(kLaunchEdit, file.c_str());
02309     }
02310 }

Here is the call graph for this function:

void CGraphView::OnViewEditseldef ( ) [protected]

WM_COMMAND message handler, edit selection using default editor.

Definition at line 2313 of file GraphView.cpp.

References CStr, kLaunchDefaultEdit, LaunchHandler(), and RetrieveSel().

02314 {
02315     CStr file;
02316     if( RetrieveSel(file) )
02317     {
02318         LaunchHandler(kLaunchDefaultEdit, file.c_str());
02319     }
02320 }

Here is the call graph for this function:

void CGraphView::OnViewOpensel ( ) [protected]

WM_COMMAND message handler, open selection.

Definition at line 2692 of file GraphView.cpp.

References CStr, kLaunchOpen, LaunchHandler(), and RetrieveSel().

02693 {
02694     CStr file;
02695     if( RetrieveSel(file) )
02696     {
02697         LaunchHandler(kLaunchOpen, file.c_str());
02698     }
02699 }

Here is the call graph for this function:

void CGraphView::OnViewOpenselas ( ) [protected]

WM_COMMAND message handler, open selection using Open With... dialog.

Definition at line 2702 of file GraphView.cpp.

References CStr, kLaunchOpenAs, LaunchHandler(), and RetrieveSel().

02703 {
02704     CStr file;
02705     if( RetrieveSel(file) )
02706     {
02707         LaunchHandler(kLaunchOpenAs, file.c_str());
02708     }
02709 }

Here is the call graph for this function:

void CGraphView::OnViewReload ( ) [protected]

WM_COMMAND message handler, reload view.

Definition at line 1481 of file GraphView.cpp.

References CvsArgs::add(), CStr, CvsLogParse(), CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), and CvsArgs::print().

01482 {
01483     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01484     CLogNode* root = pDoc->GetNode();
01485     if( root == 0L || root->GetUserData() == 0L )
01486         return;
01487
01488     CvsArgs args;
01489     args.add("log");
01490     args.add(pDoc->GetName());
01491     args.print(pDoc->GetDir());
01492
01493     CStr dir(pDoc->GetDir());
01494     CvsLogParse(dir, args, true, pDoc);
01495 }

Here is the call graph for this function:

void CGraphView::OnViewRetrieve ( ) [protected]

WM_COMMAND message handler, retrieve revisions.

Definition at line 1829 of file GraphView.cpp.

References SaveSel().

01830 {
01831     SaveSel();
01832 }

Here is the call graph for this function:

void CGraphView::OnViewRetrieveAs ( ) [protected]

Definition at line 1834 of file GraphView.cpp.

References SaveSel().

01835 {
01836     SaveSel(true);
01837 }

Here is the call graph for this function:

void CGraphView::OnViewSelnonsig ( ) [protected]

WM_COMMAND message handler, select non-significant revisions.

Definition at line 1805 of file GraphView.cpp.

References CGraphDoc::GetNode(), TGraph::TraverseGraph(), and CWinLogData::UnselectAll().

01806 {
01807     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01808     CLogNode* root = pDoc->GetNode();
01809     if( root == 0L || root->GetUserData() == 0L )
01810         return;
01811
01812     CWinLogData* data = (CWinLogData*)root->GetUserData();
01813     data->UnselectAll(this);
01814
01815     TGraphSelNonSig trav(this);
01816     trav.TraverseGraph(root);
01817 }

Here is the call graph for this function:

void CGraphView::OnViewTag ( ) [protected]

WM_COMMAND message handler, tag update.

Definition at line 1582 of file GraphView.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), CWinLogData::GetStr(), ID_VIEW_RELOAD, launchCVS(), CvsArgs::print(), and TGraph::TraverseGraph().

01583 {
01584     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01585     CLogNode* root = pDoc->GetNode();
01586
01587     if( root == 0L || root->GetUserData() == 0L )
01588         return;
01589
01590     CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
01591
01592     TGraphCmdStatus trav;
01593     trav.TraverseGraph(root);
01594
01595     CvsArgs args;
01596     args.add("update");
01597
01598     CLogNode* node = trav.GetSel1()->Node();
01599     switch( node->GetType() )
01600     {
01601     case kNodeHeader:
01602         {
01603             args.add("-A");
01604             break;
01605         }
01606     case kNodeRev:
01607     case kNodeBranch:
01608     case kNodeTag:
01609         {
01610             args.add("-r");
01611             args.add(trav.GetSel1()->GetStr());
01612             break;
01613         }
01614     }
01615
01616     args.add(pDoc->GetName());
01617     args.print(pDoc->GetDir());
01618
01619     CGraphConsole cons;
01620     launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
01621 }

Here is the call graph for this function:

void CGraphView::OnViewUnlockf ( ) [protected]

WM_COMMAND message handler, unlock the selection.

Definition at line 2279 of file GraphView.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CStr, CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), CWinLogData::GetStr(), ID_VIEW_RELOAD, launchCVS(), CvsArgs::print(), and TGraph::TraverseGraph().

02280 {
02281     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02282     CLogNode* root = pDoc->GetNode();
02283     if( root == 0L || root->GetUserData() == 0L )
02284         return;
02285
02286     CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
02287
02288     TGraphCmdStatus trav;
02289     trav.TraverseGraph(root);
02290
02291     CvsArgs args;
02292     args.add("admin");
02293     args.add(CStr("-u") + trav.GetSel1()->GetStr());
02294
02295     args.add(pDoc->GetName());
02296     args.print(pDoc->GetDir());
02297
02298     CGraphConsole cons;
02299     launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
02300 }

Here is the call graph for this function:

void CGraphView::OnViewUpdate ( ) [protected]

WM_COMMAND message handler, update.

Definition at line 1553 of file GraphView.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), ID_VIEW_RELOAD, launchCVS(), and CvsArgs::print().

01554 {
01555     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01556     CLogNode* root = pDoc->GetNode();
01557     if( root == 0L || root->GetUserData() == 0L )
01558         return;
01559
01560     CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
01561
01562     CvsArgs args;
01563     args.add("update");
01564     args.add("-A");
01565     args.add(pDoc->GetName());
01566     args.print(pDoc->GetDir());
01567
01568     CGraphConsole cons;
01569     launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
01570 }

Here is the call graph for this function:

bool CGraphView::RetrieveSel ( UStr & file ) [private]

Retrieve the selected revision

Parameters:
file Return the file name of the retrieved revision
Returns:
true on success, false otherwise
Definition at line 2337 of file GraphView.cpp.

References CvsArgs::add(), CStr, UStr::empty(), CGraphDoc::GetDir(), GetExtension(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), CWinLogData::GetStr(), launchCVS(), CvsArgs::print(), and TGraph::TraverseGraph().

Referenced by FileAction(), OnQueryShellactionDefault(), OnViewEditsel(), OnViewEditseldef(), OnViewOpensel(), and OnViewOpenselas().

02338 {
02339     bool res = false;
02340
02341     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02342     CLogNode* root = pDoc->GetNode();
02343
02344     if( root && root->GetUserData() )
02345     {
02346         TGraphCmdStatus trav;
02347         trav.TraverseGraph(root);
02348
02349         CStr prf, ext, base;
02350         CvsArgs args;
02351
02352         GetExtension(pDoc->GetName(), base, ext);
02353
02354         prf = base;
02355         prf << "_view_";
02356         prf << trav.GetSel1()->GetStr();
02357         prf << '_';
02358
02359         args.add("update");
02360         args.add("-p");
02361
02362         args.add("-r");
02363         args.add(trav.GetSel1()->GetStr());
02364
02365         args.add(pDoc->GetName());
02366
02367         args.print(pDoc->GetDir());
02368
02369         file = launchCVS(pDoc->GetDir(), args, prf.c_str(), ext);
02370         if( !file.empty() )
02371         {
02372             res = true;
02373         }
02374     }
02375
02376     return res;
02377 }

Here is the call graph for this function:

void CGraphView::SaveSel ( bool queryName = false ) [private]

Definition at line 1839 of file GraphView.cpp.

References CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), BrowserGetSaveasFile(), CStr, CGraphDoc::GetDir(), CGraphDoc::GetName(), CGraphDoc::GetNode(), TGraphCmdStatus::GetSel1(), CWinLogData::GetStr(), CRevisionConsole::Init(), kSelectAny, launchCVS(), CvsArgs::print(), SplitPath(), and TGraph::TraverseGraph().

Referenced by OnViewRetrieve(), and OnViewRetrieveAs().

01840 {
01841     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01842     CLogNode* root = pDoc->GetNode();
01843
01844     if( root == 0L || root->GetUserData() == 0L )
01845         return;
01846
01847     TGraphCmdStatus trav;
01848     trav.TraverseGraph(root);
01849
01850     CStr fileName;
01851     CvsArgs args;
01852
01853     fileName = pDoc->GetDir();
01854     fileName << pDoc->GetName();
01855     fileName << ".#.";
01856     fileName << trav.GetSel1()->GetStr();
01857
01858     if( !queryName || BrowserGetSaveasFile("Select the file name to save to", kSelectAny, fileName) )
01859     {
01860         args.add("update");
01861         args.add("-p");
01862
01863         args.add("-r");
01864         args.add(trav.GetSel1()->GetStr());
01865
01866         args.add(pDoc->GetName());
01867
01868         args.print(pDoc->GetDir());
01869
01870         CStr outDir;
01871         CStr outFile;
01872         SplitPath(fileName, outDir, outFile);
01873
01874         CRevisionConsole console;
01875         console.Init(outDir, outFile);
01876
01877         int code = launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &console);
01878     }
01879 }

Here is the call graph for this function:

Member Data Documentation

CImageList CGraphView::m_imageList [static, private]

Image list Definition at line 1266 of file GraphView.cpp.

int CGraphView::m_numberOfPages [private]

Number of pages Definition at line 389 of file GraphView.h.

Referenced by OnBeginPrinting().

int CGraphView::m_pageHeight [private]

Page height Definition at line 390 of file GraphView.h.

Referenced by OnBeginPrinting(), and OnPrint().

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:53:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CHARFORMAT Class Reference

CHARFORMAT Class Reference

Inheritance diagram for CHARFORMAT:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/wincvsView.h
Generated on Sat Aug 7 22:53:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CHeaderCtrl Class Reference

CHeaderCtrl Class Reference

Inheritance diagram for CHeaderCtrl:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/SortHeaderCtrl.h
Generated on Sat Aug 7 22:53:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CHHelpDialog Class Reference

CHHelpDialog Class Reference

HTML Help dialog. More...

#include <HHelpSupport.h>

Inheritance diagram for CHHelpDialog:

[legend]
Collaboration diagram for CHHelpDialog:

[legend]
List of all members.

Public Member Functions

CHHelpDialog (LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL)
CHHelpDialog (UINT nIDTemplate, CWnd *pParentWnd=NULL)

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable window context help.
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
WM_HELPINFO message handler.
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
WM_CONTEXTMENU message handler.

Detailed Description

HTML Help dialog.

Definition at line 155 of file HHelpSupport.h.

Constructor & Destructor Documentation

CHHelpDialog::CHHelpDialog | ( | LPCTSTR | lpszTemplateName,
 |  | CWnd * | pParentWnd = NULL
 | ) |

Definition at line 393 of file HHelpSupport.cpp.

00394     : CDialog(lpszTemplateName, pParentWnd)
00395 {
00396 }

CHHelpDialog::CHHelpDialog | ( | UINT | nIDTemplate,
 |  | CWnd * | pParentWnd = NULL
 | ) |

Definition at line 398 of file HHelpSupport.cpp.

00399     : CDialog(nIDTemplate, pParentWnd)
00400 {
00401 }

Member Function Documentation

void CHHelpDialog::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented in CCvsRootDlg, CEditKeywordDlg, CDiff_Options, CEditorMonDlg, CFilterMaskOptDlg, CFilterSelectionDlg, GetPassword, CGraphOptDlg, CImportFilterDlg, CImportWarning, CImportEntry, CItemListDlg, CSaveSettingsDlg, CSelectionDetailsDlg, CTemplateDlg, CCustomizeMenus, CNoPython, and CAboutDlg.

Definition at line 403 of file HHelpSupport.cpp.

Referenced by CAboutDlg::DoDataExchange(), CNoPython::DoDataExchange(), CCustomizeMenus::DoDataExchange(), CTemplateDlg::DoDataExchange(), CSelectionDetailsDlg::DoDataExchange(), CSaveSettingsDlg::DoDataExchange(), CItemListDlg::DoDataExchange(), CImportFilterDlg::DoDataExchange(), CImportEntry::DoDataExchange(), CImportWarning::DoDataExchange(), CGraphOptDlg::DoDataExchange(), GetPassword::DoDataExchange(), CFilterSelectionDlg::DoDataExchange(), CFilterMaskOptDlg::DoDataExchange(), CEditorMonDlg::DoDataExchange(), CDiff_Options::DoDataExchange(), CCvsRootDlg::DoDataExchange(), and CEditKeywordDlg::DoDataExchange().

00404 {
00405     CDialog::DoDataExchange(pDX);
00406     //{{AFX_DATA_MAP(CHHelpDialog)
00407         // NOTE: the ClassWizard will add DDX and DDV calls here
00408     //}}AFX_DATA_MAP
00409 }

void CHHelpDialog::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point
 | ) | [protected]

WM_CONTEXTMENU message handler.

Definition at line 447 of file HHelpSupport.cpp.

References CHHelpSupport::DoOnContextMenu().

00448 {
00449     DoOnContextMenu(pWnd, point);
00450 }

Here is the call graph for this function:

BOOL CHHelpDialog::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

WM_HELPINFO message handler.

Definition at line 436 of file HHelpSupport.cpp.

References CHHelpSupport::DoOnHelpInfo().

00437 {
00438     if( DoOnHelpInfo(pHelpInfo) )
00439     {
00440         return TRUE;
00441     }
00442
00443     return CDialog::OnHelpInfo(pHelpInfo);
00444 }

Here is the call graph for this function:

BOOL CHHelpDialog::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable window context help.

Reimplemented in CCvsRootDlg, CDiff_Options, CEditorMonDlg, CFilterMaskOptDlg, CFilterSelectionDlg, GetPassword, CImportFilterDlg, CItemListDlg, CSaveSettingsDlg, CSelectionDetailsDlg, CTemplateDlg, CCustomizeMenus, CNoPython, and CAboutDlg.

Definition at line 423 of file HHelpSupport.cpp.

Referenced by CAboutDlg::OnInitDialog(), CNoPython::OnInitDialog(), CCustomizeMenus::OnInitDialog(), CTemplateDlg::OnInitDialog(), CSelectionDetailsDlg::OnInitDialog(), CSaveSettingsDlg::OnInitDialog(), CItemListDlg::OnInitDialog(), CImportFilterDlg::OnInitDialog(), GetPassword::OnInitDialog(), CFilterSelectionDlg::OnInitDialog(), CFilterMaskOptDlg::OnInitDialog(), CEditorMonDlg::OnInitDialog(), CDiff_Options::OnInitDialog(), and CCvsRootDlg::OnInitDialog().

00424 {
00425     CDialog::OnInitDialog();
00426
00427     // Extra initialization
00428     EnableWndContextHelp();
00429     InitHelpID();
00430
00431     return TRUE;  // return TRUE unless you set the focus to a control
00432                   // EXCEPTION: OCX Property Pages should return FALSE
00433 }

The documentation for this class was generated from the following files:
  • WinCvs/HHelpSupport.h
  • WinCvs/HHelpSupport.cpp
Generated on Sat Aug 7 22:53:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CHHelpPropertyPage Class Reference

CHHelpPropertyPage Class Reference

HTML Help property page. More...

#include <HHelpSupport.h>

Inheritance diagram for CHHelpPropertyPage:

[legend]
Collaboration diagram for CHHelpPropertyPage:

[legend]
List of all members.

Public Member Functions

CHHelpPropertyPage (UINT nIDTemplate, UINT nIDCaption=0)
CHHelpPropertyPage (LPCTSTR lpszTemplateName, UINT nIDCaption=0)
~CHHelpPropertyPage ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable window context help.
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
WM_HELPINFO message handler.
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
WM_CONTEXTMENU message handler.

Detailed Description

HTML Help property page.

Definition at line 119 of file HHelpSupport.h.

Constructor & Destructor Documentation

CHHelpPropertyPage::CHHelpPropertyPage | ( | UINT | nIDTemplate,
 |  | UINT | nIDCaption = 0
 | ) |

Definition at line 327 of file HHelpSupport.cpp.

00328     : CPropertyPage(nIDTemplate, nIDCaption)
00329 {
00330 }

CHHelpPropertyPage::CHHelpPropertyPage | ( | LPCTSTR | lpszTemplateName,
 |  | UINT | nIDCaption = 0
 | ) |

Definition at line 332 of file HHelpSupport.cpp.

00333     : CPropertyPage(lpszTemplateName, nIDCaption)
00334 {
00335 }

CHHelpPropertyPage::~CHHelpPropertyPage ( )

Definition at line 337 of file HHelpSupport.cpp.

00338 {
00339 }

Member Function Documentation

void CHHelpPropertyPage::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented in CAdminOption_MAIN, CAnnotate_MAIN, CCheckout_MAIN, CCommit_MAIN, CCommit_OPTIONS, CDiff_MAIN, CFileAction_MAIN, CGetPrefs_GLOBALS, CGetPrefs_WINCVS, CGetPrefs_CVS, CGetPrefs_CVSCMD_DIALOGS, CImport_MAIN, CImport_OPTIONS, CInit_MAIN, CCmdLine_MAIN, CLogMain, CLogFilters, CLogin_MAIN, CRelease_MAIN, CRtag_MAIN, CRtag_OPTIONS, CStatus_MAIN, CTag_MAIN, CUpdateMain, CUpdateOptions, CUpdateMerge, and CMultilineEntryDlg.

Definition at line 341 of file HHelpSupport.cpp.

Referenced by CMultilineEntryDlg::DoDataExchange(), CUpdateMerge::DoDataExchange(), CUpdateOptions::DoDataExchange(), CUpdateMain::DoDataExchange(), CTag_MAIN::DoDataExchange(), CStatus_MAIN::DoDataExchange(), CRtag_OPTIONS::DoDataExchange(), CRtag_MAIN::DoDataExchange(), CRelease_MAIN::DoDataExchange(), CLogin_MAIN::DoDataExchange(), CLogFilters::DoDataExchange(), CLogMain::DoDataExchange(), CCmdLine_MAIN::DoDataExchange(), CInit_MAIN::DoDataExchange(), CImport_OPTIONS::DoDataExchange(), CImport_MAIN::DoDataExchange(), CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(), CGetPrefs_CVS::DoDataExchange(), CGetPrefs_WINCVS::DoDataExchange(), CGetPrefs_GLOBALS::DoDataExchange(), CFileAction_MAIN::DoDataExchange(), CDiff_MAIN::DoDataExchange(), CCommit_OPTIONS::DoDataExchange(), CCommit_MAIN::DoDataExchange(), CCheckout_MAIN::DoDataExchange(), CAnnotate_MAIN::DoDataExchange(), and CAdminOption_MAIN::DoDataExchange().

00342 {
00343     CPropertyPage::DoDataExchange(pDX);
00344     //{{AFX_DATA_MAP(CHHelpPropertyPage)
00345         // NOTE: the ClassWizard will add DDX and DDV calls here
00346     //}}AFX_DATA_MAP
00347 }

void CHHelpPropertyPage::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point
 | ) | [protected]

WM_CONTEXTMENU message handler.

Definition at line 385 of file HHelpSupport.cpp.

References CHHelpSupport::DoOnContextMenu().

00386 {
00387     DoOnContextMenu(pWnd, point);
00388 }

Here is the call graph for this function:

BOOL CHHelpPropertyPage::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

WM_HELPINFO message handler.

Definition at line 374 of file HHelpSupport.cpp.

References CHHelpSupport::DoOnHelpInfo().

00375 {
00376     if( DoOnHelpInfo(pHelpInfo) )
00377     {
00378         return TRUE;
00379     }
00380
00381     return CPropertyPage::OnHelpInfo(pHelpInfo);
00382 }

Here is the call graph for this function:

BOOL CHHelpPropertyPage::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable window context help.

Reimplemented in CAdminOption_MAIN, CAnnotate_MAIN, CCheckout_MAIN, CCommit_MAIN, CDiff_MAIN, CFileAction_MAIN, CGetPrefs_GLOBALS, CGetPrefs_WINCVS, CGetPrefs_CVS, CImport_MAIN, CInit_MAIN, CCmdLine_MAIN, CLogin_MAIN, CRtag_MAIN, CRtag_OPTIONS, CTag_MAIN, CUpdateOptions, and CMultilineEntryDlg.

Definition at line 361 of file HHelpSupport.cpp.

Referenced by CMultilineEntryDlg::OnInitDialog(), CUpdateOptions::OnInitDialog(), CTag_MAIN::OnInitDialog(), CRtag_OPTIONS::OnInitDialog(), CRtag_MAIN::OnInitDialog(), CLogin_MAIN::OnInitDialog(), CCmdLine_MAIN::OnInitDialog(), CInit_MAIN::OnInitDialog(), CImport_MAIN::OnInitDialog(), CGetPrefs_CVS::OnInitDialog(), CGetPrefs_WINCVS::OnInitDialog(), CGetPrefs_GLOBALS::OnInitDialog(), CFileAction_MAIN::OnInitDialog(), CDiff_MAIN::OnInitDialog(), CCommit_MAIN::OnInitDialog(), CCheckout_MAIN::OnInitDialog(), CAnnotate_MAIN::OnInitDialog(), and CAdminOption_MAIN::OnInitDialog().

00362 {
00363     CPropertyPage::OnInitDialog();
00364
00365     // Extra initialization
00366     EnableWndContextHelp();
00367     InitHelpID();
00368
00369     return TRUE;  // return TRUE unless you set the focus to a control
00370                   // EXCEPTION: OCX Property Pages should return FALSE
00371 }

The documentation for this class was generated from the following files:
  • WinCvs/HHelpSupport.h
  • WinCvs/HHelpSupport.cpp
Generated on Sat Aug 7 22:53:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CHHelpPropertySheet Class Reference

CHHelpPropertySheet Class Reference

HTML Help property sheet. More...

#include <HHelpSupport.h>

Inheritance diagram for CHHelpPropertySheet:

[legend]
Collaboration diagram for CHHelpPropertySheet:

[legend]
List of all members.

Public Member Functions

CHHelpPropertySheet (UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
CHHelpPropertySheet (LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
virtual | ~CHHelpPropertySheet ()

Protected Member Functions

virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable window context help.
afx_msg BOOL | OnHelpInfo (HELPINFO *pHelpInfo)
WM_HELPINFO message handler.
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
WM_CONTEXTMENU message handler.
virtual void | InitHelpID ()
InitHelpID virtual override, enable direct use of CHHelpPropertySheet.

Detailed Description

HTML Help property sheet.

Definition at line 81 of file HHelpSupport.h.

Constructor & Destructor Documentation

CHHelpPropertySheet::CHHelpPropertySheet | ( | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |

Definition at line 255 of file HHelpSupport.cpp.

00256     : CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00257 {
00258 }

CHHelpPropertySheet::CHHelpPropertySheet | ( | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |

Definition at line 260 of file HHelpSupport.cpp.

00261     : CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00262 {
00263 }

CHHelpPropertySheet::~CHHelpPropertySheet ( ) [virtual]

Definition at line 265 of file HHelpSupport.cpp.

00266 {
00267 }

Member Function Documentation

void CHHelpPropertySheet::InitHelpID ( ) [protected, virtual]

InitHelpID virtual override, enable direct use of CHHelpPropertySheet.

Implements CHHelpSupport.

Reimplemented in COptionalPropertySheet.

Definition at line 294 of file HHelpSupport.cpp.

00295 {
00296 }

void CHHelpPropertySheet::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point
 | ) | [protected]

WM_CONTEXTMENU message handler.

Definition at line 317 of file HHelpSupport.cpp.

References CHHelpSupport::DoOnContextMenu().

00318 {
00319     DoOnContextMenu(pWnd, point);
00320 }

Here is the call graph for this function:

BOOL CHHelpPropertySheet::OnHelpInfo ( HELPINFO * pHelpInfo ) [protected]

WM_HELPINFO message handler.

Definition at line 299 of file HHelpSupport.cpp.

References CHHelpSupport::DoOnHelpInfo(), and CHHelpSupport::ShowHelp().

00300 {
00301     if( GetTabControl()->GetSafeHwnd() == pHelpInfo->hItemHandle )
00302     {
00303         // Show the page's help
00304         ShowHelp();
00305         return TRUE;
00306     }
00307
00308     if( DoOnHelpInfo(pHelpInfo) )
00309     {
00310         return TRUE;
00311     }
00312
00313     return CPropertySheet::OnHelpInfo(pHelpInfo);
00314 }

Here is the call graph for this function:

BOOL CHHelpPropertySheet::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable window context help.

Reimplemented in COptionalPropertySheet.

Definition at line 281 of file HHelpSupport.cpp.

Referenced by COptionalPropertySheet::OnInitDialog().

00282 {
00283     CPropertySheet::OnInitDialog();
00284
00285     // Extra initialization
00286     EnableWndContextHelp();
00287     InitHelpID();
00288
00289     return TRUE;  // return TRUE unless you set the focus to a control
00290                   // EXCEPTION: OCX Property Pages should return FALSE
00291 }

The documentation for this class was generated from the following files:
  • WinCvs/HHelpSupport.h
  • WinCvs/HHelpSupport.cpp
Generated on Sat Aug 7 22:53:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CHHelpSupport Class Reference

CHHelpSupport Class Reference

HTML help support class. More...

#include <HHelpSupport.h>

Inheritance diagram for CHHelpSupport:

[legend]
Collaboration diagram for CHHelpSupport:

[legend]
List of all members.

Public Member Functions

CHHelpSupport ()
~CHHelpSupport ()
void | EnableWndContextHelp ()
DWORD | SetCtrlHelpID (const DWORD ctrlID, const const DWORD helpTopic)
void | ShowHelp ()

Static Public Member Functions

LPCTSTR | GetHelpFilePath ()
void | InitHTMLHelp ()

Protected Member Functions

virtual CWnd * | GetWnd ()
virtual void | InitHelpID ()=0
void | CreateHelpIDsData (tHelpIDsData &helpIDsData) const
BOOL | DoOnHelpInfo (const HELPINFO *pHelpInfo)
void | DoOnContextMenu (const CWnd *pWnd, CPoint point)
BOOL | IsHelpCtrl (const UINT ctrlID) const
BOOL | IsIgnoredCtrl (const UINT ctrlID) const

Private Types

typedef std::map< DWORD, DWORD > | tHelpIDMap
typedef std::vector< DWORD > | tHelpIDsData

Private Attributes

tHelpIDMap m_hhelpIDs

Detailed Description

HTML help support class.

Definition at line 40 of file HHelpSupport.h.

Member Typedef Documentation

typedef std::map<DWORD, DWORD> CHHelpSupport::tHelpIDMap [private]

Help ID mapping container type Definition at line 49 of file HHelpSupport.h.

typedef std::vector<DWORD> CHHelpSupport::tHelpIDsData [private]

Help ID data container type Definition at line 50 of file HHelpSupport.h.

Referenced by CreateHelpIDsData(), DoOnContextMenu(), and DoOnHelpInfo().

Constructor & Destructor Documentation

CHHelpSupport::CHHelpSupport ( )

Definition at line 38 of file HHelpSupport.cpp.

00039 {
00040 }

CHHelpSupport::~CHHelpSupport ( )

Definition at line 42 of file HHelpSupport.cpp.

00043 {
00044 }

Member Function Documentation

void CHHelpSupport::CreateHelpIDsData ( tHelpIDsData & helpIDsData ) const [protected]

Create help IDs data

Parameters:
helpIDsData Help IDs data
Definition at line 112 of file HHelpSupport.cpp.

References helpTopicEnd, m_hhelpIDs, and tHelpIDsData.

Referenced by DoOnContextMenu(), and DoOnHelpInfo().

00113 {
00114     for(tHelpIDMap::const_iterator it = m_hhelpIDs.begin(); it != m_hhelpIDs.end(); ++it)
00115     {
00116         helpIDsData.push_back((*it).first);
00117         helpIDsData.push_back((*it).second);
00118     }
00119
00120     helpIDsData.push_back(helpTopicEnd);
00121     helpIDsData.push_back(helpTopicEnd);
00122 }

void CHHelpSupport::DoOnContextMenu | ( | const CWnd * | pWnd,
 |  | CPoint | point
 | ) | [protected]

OnContextMenu handler Definition at line 175 of file HHelpSupport.cpp.

References _i18n, CreateHelpIDsData(), GetHelpFilePath(), GetWnd(), IsHelpCtrl(), and tHelpIDsData.

Referenced by CHHelpDialog::OnContextMenu(), CHHelpPropertyPage::OnContextMenu(), and CHHelpPropertySheet::OnContextMenu().

00176 {
00177     if( !IsHelpCtrl(pWnd->GetDlgCtrlID()) )
00178     {
00179         return;
00180     }
00181
00182     CMenu contextMenu;
00183     contextMenu.CreatePopupMenu();
00184     contextMenu.InsertMenu(0, MF_BYPOSITION, 1, _i18n("&What's This?"));
00185
00186     if( -1 == point.x && -1 == point.y )
00187     {
00188         // Application key pressed
00189         CRect rect;
00190         pWnd->GetWindowRect(rect);
00191
00192         point.x = rect.TopLeft().x + rect.Height() / 2;
00193         point.y = rect.CenterPoint().y;
00194     }
00195
00196     if( contextMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD,
00197         point.x, point.y, GetWnd()) )
00198     {
00199         tHelpIDsData helpIDs;
00200         CreateHelpIDsData(helpIDs);
00201
00202         HtmlHelp(pWnd->GetSafeHwnd(),
00203             CHHelpSupport::GetHelpFilePath(),
00204             HH_TP_HELP_CONTEXTMENU,
00205             (DWORD)(LPVOID)helpIDs.begin());
00206     }
00207 }

Here is the call graph for this function:

BOOL CHHelpSupport::DoOnHelpInfo ( const HELPINFO * pHelpInfo ) [protected]

OnHelpInfo handler

Parameters:
pHelpInfo Help info
Returns:
TRUE if handled, FALSE otherwise
Definition at line 151 of file HHelpSupport.cpp.

References CreateHelpIDsData(), GetHelpFilePath(), IsHelpCtrl(), IsIgnoredCtrl(), NULL, and tHelpIDsData.

Referenced by CHHelpDialog::OnHelpInfo(), CHHelpPropertyPage::OnHelpInfo(), and CHHelpPropertySheet::OnHelpInfo().

00152 {
00153     if( !IsHelpCtrl(pHelpInfo->iCtrlId) || IsIgnoredCtrl(pHelpInfo->iCtrlId) )
00154     {
00155         return TRUE;
00156     }
00157
00158     if( HELPINFO_WINDOW == pHelpInfo->iContextType )
00159     {
00160         tHelpIDsData helpIDs;
00161         CreateHelpIDsData(helpIDs);
00162
00163         return HtmlHelp((HWND)pHelpInfo->hItemHandle,
00164             CHHelpSupport::GetHelpFilePath(),
00165             HH_TP_HELP_WM_HELP,
00166             (DWORD)(LPVOID)helpIDs.begin()) != NULL;
00167     }
00168
00169     return TRUE;
00170 }

Here is the call graph for this function:

void CHHelpSupport::EnableWndContextHelp ( )

Enable context help for a given window Definition at line 212 of file HHelpSupport.cpp.

References GetWnd().

00213 {
00214     if( GetWnd() )
00215     {
00216         GetWnd()->ModifyStyleEx(0, WS_EX_CONTEXTHELP);
00217     }
00218 }

Here is the call graph for this function:

LPCTSTR CHHelpSupport::GetHelpFilePath ( ) [static]

Get the application help file path

Returns:
The application help file path
Definition at line 50 of file HHelpSupport.cpp.

References NULL.

Referenced by DoOnContextMenu(), and DoOnHelpInfo().

00051 {
00052     LPCTSTR res = "";
00053
00054     CWinApp* pApp = AfxGetApp();
00055     ASSERT(pApp != NULL); // No application object
00056
00057     if( pApp )
00058     {
00059         res = pApp->m_pszHelpFilePath;
00060     }
00061
00062     return res;
00063 }

CWnd * CHHelpSupport::GetWnd ( ) [protected, virtual]

Get the window

Returns:
Window
Note:
Using RTTI to downcast itself to CWnd
Definition at line 96 of file HHelpSupport.cpp.

Referenced by DoOnContextMenu(), EnableWndContextHelp(), and ShowHelp().

00097 {
00098     return dynamic_cast<CWnd*>(this);
00099 }

void CHHelpSupport::InitHelpID ( ) [protected, pure virtual]

Set the controls help IDs

Implemented in CAdminOption_MAIN, CAnnotate_MAIN, CCheckout_MAIN, CCommit_MAIN, CCommit_OPTIONS, CCvsRootDlg, CEditKeywordDlg, CDiff_MAIN, CDiff_Options, CEditorMonDlg, CFileAction_MAIN, CFilterMaskOptDlg, CFilterSelectionDlg, GetPassword, CGetPrefs_GLOBALS, CGetPrefs_WINCVS, CGetPrefs_CVS, CGetPrefs_CVSCMD_DIALOGS, CGraphOptDlg, CImport_MAIN, CImport_OPTIONS, CImportFilterDlg, CImportWarning, CImportEntry, CInit_MAIN, CItemListDlg, CCmdLine_MAIN, CLogMain, CLogFilters, CLogin_MAIN, COptionalPropertySheet, CRelease_MAIN, CRtag_MAIN, CRtag_OPTIONS, CSaveSettingsDlg, CSelectionDetailsDlg, CStatus_MAIN, CTag_MAIN, CTemplateDlg, CUpdateMain, CUpdateOptions, CUpdateMerge, CCustomizeMenus, CHHelpPropertySheet, CMultilineEntryDlg, CNoPython, and CAboutDlg.

Definition at line 104 of file HHelpSupport.cpp.

00105 {
00106 }

void CHHelpSupport::InitHTMLHelp ( ) [static]

Initialize HTML help support

Note:
To be called from within CWinApp::InitInstance override
Definition at line 69 of file HHelpSupport.cpp.

References free, and NULL.

Referenced by CWincvsApp::InitInstance().

00070 {
00071     CWinApp* pApp = AfxGetApp();
00072     ASSERT(pApp != NULL); // No application object
00073
00074     if( pApp )
00075     {
00076         // Set the HTML Help file path
00077         char path[_MAX_PATH] = "";
00078         char drive[_MAX_DRIVE] = "";
00079         char dir[_MAX_DIR] = "";
00080         char fname[_MAX_FNAME] = "";
00081         char ext[_MAX_EXT] = "";
00082
00083         _splitpath(pApp->m_pszHelpFilePath, drive, dir, fname, ext);
00084         _makepath(path, drive, dir, fname, ".chm");
00085
00086         free((void*)pApp->m_pszHelpFilePath);
00087         pApp->m_pszHelpFilePath = _tcsdup(path);
00088     }
00089 }

BOOL CHHelpSupport::IsHelpCtrl ( const UINT ctrlID ) const [protected]

Check whether the control can have a help topic

Parameters:
ctrlID Control ID
Returns:
TRUE if the control can heave a help topic, FALSE otherwise
Definition at line 129 of file HHelpSupport.cpp.

Referenced by DoOnContextMenu(), and DoOnHelpInfo().

00130 {
00131     return ctrlID != 0 && ctrlID != IDC_STATIC;
00132 }

BOOL CHHelpSupport::IsIgnoredCtrl ( const UINT ctrlID ) const [protected]

Check whether the control is set to be ignored

Parameters:
ctrlID Control ID
Returns:
TRUE if the control is set to be ignored, FALSE otherwise
Definition at line 139 of file HHelpSupport.cpp.

References helpTopicIgnore, and m_hhelpIDs.

Referenced by DoOnHelpInfo().

00140 {
00141     tHelpIDMap::const_iterator it = m_hhelpIDs.find(ctrlID);
00142
00143     return it != m_hhelpIDs.end() && (*it).second == helpTopicIgnore;
00144 }

DWORD CHHelpSupport::SetCtrlHelpID | ( | const DWORD | ctrlID,
 |  | const const DWORD | helpTopic
 | ) |

Set the help topic ID for a given control ID

Parameters:
ctrlID | Control ID
helpTopic | Help topic ID, use helpTopicIgnore constant to disable context help for the control
Returns:
Previous control's topic ID, helpTopicIgnore if no previous topic ID was present
Definition at line 234 of file HHelpSupport.cpp.

References helpTopicIgnore, and m_hhelpIDs.

Referenced by CAboutDlg::InitHelpID(), CNoPython::InitHelpID(), CMultilineEntryDlg::InitHelpID(), CCustomizeMenus::InitHelpID(), CUpdateMerge::InitHelpID(), CUpdateOptions::InitHelpID(), CTemplateDlg::InitHelpID(), CTag_MAIN::InitHelpID(), CSelectionDetailsDlg::InitHelpID(), CSaveSettingsDlg::InitHelpID(), CRtag_OPTIONS::InitHelpID(), CRtag_MAIN::InitHelpID(), COptionalPropertySheet::InitHelpID(), CLogin_MAIN::InitHelpID(), CCmdLine_MAIN::InitHelpID(), CItemListDlg::InitHelpID(), CInit_MAIN::InitHelpID(), CImportFilterDlg::InitHelpID(), CImport_MAIN::InitHelpID(), CGetPrefs_CVS::InitHelpID(), CGetPrefs_WINCVS::InitHelpID(), CGetPrefs_GLOBALS::InitHelpID(), GetPassword::InitHelpID(), CFilterSelectionDlg::InitHelpID(), CFilterMaskOptDlg::InitHelpID(), CFileAction_MAIN::InitHelpID(), CEditorMonDlg::InitHelpID(), CDiff_Options::InitHelpID(), CDiff_MAIN::InitHelpID(), CCvsRootDlg::InitHelpID(), CCommit_MAIN::InitHelpID(), CCheckout_MAIN::InitHelpID(), and CAnnotate_MAIN::InitHelpID().

00235 {
00236     DWORD prevHelpID = helpTopicIgnore;
00237
00238     tHelpIDMap::iterator it = m_hhelpIDs.find(ctrlID);
00239     if( it != m_hhelpIDs.end() )
00240     {
00241         prevHelpID = (*it).second;
00242         m_hhelpIDs.erase(it);
00243     }
00244
00245     m_hhelpIDs.insert(std::make_pair(ctrlID, helpTopic));
00246
00247     return prevHelpID;
00248 }

void CHHelpSupport::ShowHelp ( )

Show context-sensitive help Definition at line 223 of file HHelpSupport.cpp.

References GetWnd().

Referenced by CNoPython::OnHelp(), CCustomizeMenus::OnHelp(), CTemplateDlg::OnHelp(), CSelectionDetailsDlg::OnHelp(), CSaveSettingsDlg::OnHelp(), CItemListDlg::OnHelp(), CImportFilterDlg::OnHelp(), CImportEntry::OnHelp(), CImportWarning::OnHelp(), CGraphOptDlg::OnHelp(), GetPassword::OnHelp(), CFilterSelectionDlg::OnHelp(), CFilterMaskOptDlg::OnHelp(), CEditorMonDlg::OnHelp(), CDiff_Options::OnHelp(), CCvsRootDlg::OnHelp(), CEditKeywordDlg::OnHelp(), and CHHelpPropertySheet::OnHelpInfo().

00224 {
00225     GetWnd()->SendMessage(WM_COMMANDHELP);
00226 }

Here is the call graph for this function:

Member Data Documentation

tHelpIDMap CHHelpSupport::m_hhelpIDs [private]

Help ID container Definition at line 53 of file HHelpSupport.h.

Referenced by CreateHelpIDsData(), IsIgnoredCtrl(), and SetCtrlHelpID().

The documentation for this class was generated from the following files:
  • WinCvs/HHelpSupport.h
  • WinCvs/HHelpSupport.cpp
Generated on Sat Aug 7 22:53:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CHistComboBoxEx Class Reference

CHistComboBoxEx Class Reference

Browse location history combo box class. More...

#include <HistComboBoxEx.h>

Inheritance diagram for CHistComboBoxEx:

[legend]
Collaboration diagram for CHistComboBoxEx:

[legend]
List of all members.

Public Member Functions

CHistComboBoxEx (int feature=USmartCombo::DefaultFeature)
virtual | ~CHistComboBoxEx ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)
PreTranslateMessage virtual override, perform the key test to determine whether to delete item.
int | AddString (LPCTSTR lpszString)
int | InsertString (int nIndex, LPCTSTR lpszString)
BOOL | SetIcon (COMBOBOXEXITEM cbi, bool showStatus)
const char * | GetOldLoc ()
int | NewRoot (const char *root)

Static Public Member Functions

CString | FindBestRoot (CMString &strItems, const char *path, bool mustExist=false)

Protected Member Functions

virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam)
WindowProc virtual override, intercept messages to allow GetLBText to work.
afx_msg void | OnDropdown ()
CBN_DROPDOWN notification message handler, traverse the history items to set the appropriate icons and calculate the width of the drop-down list.

Private Member Functions

virtual int | CalcDroppedWidth ()
BOOL | DelKeyTest (MSG *pMsg)

Private Attributes

CImageList | m_imageList

Detailed Description

Browse location history combo box class.

Definition at line 47 of file HistComboBoxEx.h.

Constructor & Destructor Documentation

CHistComboBoxEx::CHistComboBoxEx ( int feature = USmartCombo::DefaultFeature )

Definition at line 71 of file HistComboBoxEx.cpp.

00072     : USmartCombo(feature)
00073 {
00074 }

CHistComboBoxEx::~CHistComboBoxEx ( ) [virtual]

Definition at line 76 of file HistComboBoxEx.cpp.

00077 {
00078 }

Member Function Documentation

int CHistComboBoxEx::AddString ( LPCTSTR lpszString )

Add the string to the end of the drop-down list

Parameters:
lpszString String to be added
Returns:
true on success, false otherwise
Definition at line 223 of file HistComboBoxEx.cpp.

References InsertString().

00224 {
00225     return InsertString(-1, lpszString);
00226 }

Here is the call graph for this function:

int CHistComboBoxEx::CalcDroppedWidth ( ) [private, virtual]

Calculate the proper width for drop-down list so the items can fit into it

Returns:
The width of the drop-down list
Note:
Make sure it doesn't go off-screen as well

Reimplemented from USmartCombo.

Definition at line 327 of file HistComboBoxEx.cpp.

References HISTLOC_IMAGE_CX.

Referenced by OnDropdown().

00328 {
00329     int maxSize = 0;
00330
00331     CClientDC ClientDC(this);
00332     int savedDc = ClientDC.SaveDC();
00333     ClientDC.SelectObject(GetFont());
00334
00335     CString strLBText;
00336     for(int nIndex = 0; nIndex < GetCount(); nIndex++)
00337     {
00338         GetLBText(nIndex, strLBText);
00339         CSize size = ClientDC.GetTextExtent(strLBText);
00340
00341         if( size.cx > maxSize )
00342         {
00343             maxSize = size.cx;
00344         }
00345     }
00346
00347     ClientDC.RestoreDC(savedDc);
00348
00349     maxSize += ::GetSystemMetrics(SM_CXVSCROLL)     // Vertical scroll bar
00350         + 4*::GetSystemMetrics(SM_CXEDGE)           // The border aroung the text and icon: Edge-Icon-Edge - Edge-Text-Edge
00351         + HISTLOC_IMAGE_CX                          // The icon width
00352         + 2;                                        // The focus frame width
00353
00354     CRect rect;
00355     GetWindowRect(rect);
00356     maxSize = min(ClientDC.GetDeviceCaps(HORZRES) - rect.TopLeft().x, maxSize);
00357
00358     return maxSize;
00359 }

BOOL CHistComboBoxEx::DelKeyTest ( MSG * pMsg ) [private]

Test if the Del key is pressed and remove the item if the drop-down list is dropped down

Parameters:
pMsg Message to check
Returns:
TRUE if the drop-down list was dropped and Del key was pressed, FALSE otherwise
Attention:
Make sure the items collection is set earlier (call USmartCombo::SetItems to set the collection).
Definition at line 367 of file HistComboBoxEx.cpp.

References BUTTONTITLE_OK, CMainFrame::ChangeLocation(), USmartCombo::GetItems(), CWincvsApp::GetMainFrame(), kCvsAlertStopIcon, NULL, and USmartCombo::RemoveItem().

Referenced by PreTranslateMessage().

00368 {
00369     CMString* pstrItems = GetItems();
00370     ASSERT(pstrItems != NULL);
00371
00372     BOOL bRes = FALSE;
00373
00374     if( WM_KEYDOWN == pMsg->message &&
00375         VK_DELETE == (int)pMsg->wParam &&
00376         pstrItems &&
00377         GetDroppedState() )
00378     {
00379         const int sel = GetCurSel();
00380         if( sel > CB_ERR && GetCount() > 1 )
00381         {
00382             CString strItem;
00383             GetLBText(sel, strItem);
00384
00385             if( RemoveItem(strItem) )
00386             {
00387                 DeleteString(sel);
00388
00389                 if( GetCount() )
00390                 {
00391                     const int nNewSel = (sel == 0 ? sel : (GetCount() ? 0 : -1));
00392                     if( nNewSel != 0 || sel == 0 )
00393                     {
00394                         SetCurSel(nNewSel);
00395
00396                         // Trigger the location change for all views
00397                         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00398                         CMainFrame* mainFrm = app->GetMainFrame();
00399                         mainFrm->ChangeLocation();
00400                     }
00401                 }
00402             }
00403         }
00404         else if( GetCount() == 1 )
00405         {
00406             CvsAlert(kCvsAlertStopIcon,
00407                 "Can't remove the last item from the history.", "Please add a new location first before removing the current one.",
00408                 BUTTONTITLE_OK, NULL).ShowAlert();
00409         }
00410
00411         // We have to prevent it going to another window
00412         bRes = TRUE;
00413     }
00414
00415     return bRes;
00416 }

Here is the call graph for this function:

CString CHistComboBoxEx::FindBestRoot | ( | CMString & | strItems,
 |  | const char * | path,
 |  | bool | mustExist = false
 | ) | [static]

Find the best root for the passed path

Parameters:
strItems | Items to search in
path | Path to find the root for
mustExist | true if the path must exist, false otherwise
Returns:
The best root for the passed path
Definition at line 154 of file HistComboBoxEx.cpp.

References TMString< T >::GetList().

Referenced by CWincvsApp::InitInstance().

00155 {
00156     CString normPath(path);
00157     CString bestRoot;
00158     normPath.TrimRight("\\/");
00159     normPath.MakeLower();
00160
00161     const std::vector<CStr> & list = strItems.GetList();
00162     std::vector<CStr>::const_iterator i;
00163     for(i = list.begin(); i != list.end(); ++i)
00164     {
00165         CString root = *i;
00166         root.TrimRight("\\/");
00167         root.MakeLower();
00168
00169         if( normPath.Find(root) != -1 )
00170         {
00171             // We want the longest root so it's near the file
00172             if( root.GetLength() > bestRoot.GetLength() )
00173             {
00174                 bestRoot = *i;
00175             }
00176         }
00177     }
00178
00179     if( !mustExist && bestRoot.IsEmpty() )
00180     {
00181         bestRoot = path;
00182         bestRoot.TrimRight("\\/");
00183     }
00184
00185     // Handle the drive root
00186     if( bestRoot.GetAllocLength() &&
00187         ':' == bestRoot[bestRoot.GetLength()-1])
00188     {
00189         bestRoot += kPathDelimiter;
00190     }
00191
00192     return bestRoot;
00193 }

Here is the call graph for this function:

const char * CHistComboBoxEx::GetOldLoc ( )

Get the browse location

Returns:
The browse location
Definition at line 94 of file HistComboBoxEx.cpp.

References gOldLoc.

Referenced by CWinCvsBrowser::Create().

00095 {
00096     return gOldLoc;
00097 }

int CHistComboBoxEx::InsertString | ( | int | nIndex,
 |  | LPCTSTR | lpszString
 | ) |

Insert string into drop-down list

Parameters:
nIndex | Index to insert the string at
lpszString | String to be inserted
Returns:
The index of the newly inserted item
Note:
Doesn't set the status icon
Definition at line 202 of file HistComboBoxEx.cpp.

References SetIcon().

Referenced by AddString(), and NewRoot().

00203 {
00204     int nRes = -1;
00205
00206     COMBOBOXEXITEM cbi = { 0 };
00207     cbi.mask = CBEIF_TEXT;
00208     cbi.iItem = 0 > nIndex ? GetCount() : nIndex;
00209     cbi.pszText = (LPTSTR)lpszString;   // This cast is safe because we are inserting an item only
00210     cbi.cchTextMax = 0;
00211
00212     nRes = InsertItem(&cbi);
00213     SetIcon(cbi, false);
00214
00215     return nRes;
00216 }

Here is the call graph for this function:

int CHistComboBoxEx::NewRoot ( const char * root )

Set new browse location root

Parameters:
root New browse location root
Returns:
The browse location items count
Definition at line 104 of file HistComboBoxEx.cpp.

References USmartCombo::GetItems(), TMString< T >::GetList(), gOldLoc, TMString< T >::Insert(), InsertString(), MAX_PATH, NULL, and SetIcon().

Referenced by CWinCvsBrowser::ResetBrowser().

00105 {
00106     if( stricmp(gOldLoc, root) != 0 )
00107         gOldLoc = root;
00108
00109     CMString* pstrItems = GetItems();
00110     ASSERT(pstrItems != NULL);
00111
00112     // Update the history combo
00113     pstrItems->Insert(root);
00114     ResetContent();
00115
00116     const std::vector<CStr>& list = pstrItems->GetList();
00117     std::vector<CStr>::const_iterator i;
00118     for(i = list.begin(); i != list.end(); ++i)
00119     {
00120         InsertString(-1, *i);
00121     }
00122
00123     if( GetCount() )
00124     {
00125         // Set the selection and the status icon
00126         CString strText;
00127
00128         COMBOBOXEXITEM cbi = { 0 };
00129         cbi.mask = CBEIF_TEXT;
00130         cbi.iItem = 0;
00131         cbi.pszText = strText.GetBuffer(MAX_PATH);
00132         cbi.cchTextMax = MAX_PATH - 1;
00133
00134         if( GetItem(&cbi) )
00135         {
00136             SetIcon(cbi, true);
00137         }
00138
00139         strText.ReleaseBuffer();
00140
00141         SetCurSel(0);
00142     }
00143
00144     return GetCount();
00145 }

Here is the call graph for this function:

void CHistComboBoxEx::OnDropdown ( ) [protected]

CBN_DROPDOWN notification message handler, traverse the history items to set the appropriate icons and calculate the width of the drop-down list.

Definition at line 313 of file HistComboBoxEx.cpp.

References CalcDroppedWidth(), USmartCombo::HasFeature(), and TraverseHistory().

00314 {
00315     TraverseHistory(*this);
00316     if( HasFeature(USmartCombo::AutoDropWidth) )
00317     {
00318         SetDroppedWidth(CalcDroppedWidth());
00319     }
00320 }

Here is the call graph for this function:

BOOL CHistComboBoxEx::PreTranslateMessage ( MSG * pMsg ) [virtual]

PreTranslateMessage virtual override, perform the key test to determine whether to delete item.

Definition at line 299 of file HistComboBoxEx.cpp.

References DelKeyTest(), and USmartCombo::HasFeature().

00300 {
00301     if( HasFeature(USmartCombo::RemoveItems) )
00302     {
00303         if( DelKeyTest(pMsg) )
00304         {
00305             return TRUE;
00306         }
00307     }
00308
00309     return CComboBoxEx::PreTranslateMessage(pMsg);
00310 }

Here is the call graph for this function:

BOOL CHistComboBoxEx::SetIcon | ( | COMBOBOXEXITEM | cbi,
 |  | bool | showStatus
 | ) |

Set the item icon

Parameters:
cbi | Combo box item data
showStatus | true to show the status icon, false to set the default folder icon
Returns:
TRUE on success, FALSE otherwise
Definition at line 234 of file HistComboBoxEx.cpp.

References BuildIgnoredList(), CStr, Entries_SetVisited(), HISTLOC_IMAGE_CX, IDB_HISTLOC, EntnodeData::IsIgnored(), EntnodeData::IsMissing(), EntnodeData::IsUnknown(), kLocationIcon, kLocationIconErased, kLocationIconIgnored, kLocationIconMissing, kLocationIconUnknown, m_imageList, EntnodeData::Ref(), SplitPath(), stat::st_mode, stat, and EntnodeData::UnRef().

Referenced by InsertString(), NewRoot(), and TraverseHistory().

00235 {
00236     // Initialize the image list if necessary
00237     if( m_imageList.m_hImageList == 0L )
00238     {
00239         m_imageList.Create(IDB_HISTLOC, HISTLOC_IMAGE_CX, 1, RGB(255, 255, 255));
00240         SetImageList(&m_imageList);
00241     }
00242
00243     cbi.mask = CBEIF_IMAGE | /*CBEIF_OVERLAY |*/ CBEIF_SELECTEDIMAGE;
00244     cbi.iImage = cbi.iSelectedImage = kLocationIconUnknown;
00245     //cbi.iOverlay = ;
00246
00247     if( showStatus )
00248     {
00249         CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00250         vector<CStr> ignlist;
00251         struct stat sb;
00252         const char *fullpath = cbi.pszText;
00253
00254         int statres = stat(fullpath, &sb);
00255         if( statres != -1 )
00256         {
00257             if( S_ISDIR(sb.st_mode) )
00258             {
00259                 CStr uppath, folder;
00260                 if( !SplitPath(fullpath, uppath, folder) || uppath.empty() )
00261                 {
00262                     uppath = fullpath;
00263                     folder = ".";
00264                 }
00265
00266                 BuildIgnoredList(ignlist, uppath);
00267
00268                 EntnodeData *data = Entries_SetVisited(uppath, entries, folder, sb, true, &ignlist);
00269                 data->Ref();
00270
00271                 if( !data->IsUnknown() )
00272                 {
00273                     cbi.iImage = cbi.iSelectedImage = kLocationIcon;
00274                 }
00275
00276                 if( data->IsIgnored() )
00277                 {
00278                     cbi.iImage = cbi.iSelectedImage = kLocationIconIgnored;
00279                 }
00280
00281                 if( data->IsMissing() )
00282                 {
00283                     cbi.iImage = cbi.iSelectedImage = kLocationIconMissing;
00284                 }
00285
00286                 data->UnRef();
00287             }
00288         }
00289         else
00290         {
00291             cbi.iImage = cbi.iSelectedImage = kLocationIconErased;
00292         }
00293     }
00294
00295     return SetItem(&cbi);
00296 }

Here is the call graph for this function:

LRESULT CHistComboBoxEx::WindowProc | ( | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected, virtual]

WindowProc virtual override, intercept messages to allow GetLBText to work.

Definition at line 419 of file HistComboBoxEx.cpp.

References MAX_PATH.

00420 {
00421     if( CB_GETLBTEXTLEN == message )
00422     {
00423         const int index = (int)wParam;
00424         if( index < GetCount() )
00425         {
00426             char szBuffer[MAX_PATH] = "";
00427
00428             COMBOBOXEXITEM cbi = { 0 };
00429             cbi.mask = CBEIF_TEXT;
00430             cbi.iItem = index;
00431             cbi.pszText = szBuffer;
00432             cbi.cchTextMax = MAX_PATH - 1;
00433
00434             if( GetItem(&cbi) )
00435             {
00436                 return strlen(szBuffer);
00437             }
00438         }
00439     }
00440     else if( CB_GETLBTEXT == message )
00441     {
00442         const int index = (int)wParam;
00443         if( index < GetCount() )
00444         {
00445             LPSTR szBuffer = (LPSTR)lParam;
00446
00447             COMBOBOXEXITEM cbi = { 0 };
00448             cbi.mask = CBEIF_TEXT;
00449             cbi.iItem = index;
00450             cbi.pszText = szBuffer;
00451             cbi.cchTextMax = MAX_PATH - 1;
00452
00453             if( GetItem(&cbi) )
00454             {
00455                 return strlen(szBuffer);
00456             }
00457         }
00458     }
00459
00460     return CComboBoxEx::WindowProc(message, wParam, lParam);
00461 }

Member Data Documentation

CImageList CHistComboBoxEx::m_imageList [private]

Image list Definition at line 81 of file HistComboBoxEx.h.

Referenced by SetIcon().

The documentation for this class was generated from the following files:
  • WinCvs/HistComboBoxEx.h
  • WinCvs/HistComboBoxEx.cpp
Generated on Sat Aug 7 22:53:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CImport_MAIN Class Reference

CImport_MAIN Class Reference

Import settings property page. More...

#include <ImportDlg.h>

Inheritance diagram for CImport_MAIN:

[legend]
Collaboration diagram for CImport_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_IMPORT_MAIN }

Public Member Functions

CImport_MAIN (const MultiFiles *mf, const char *logMsg, const char *modname, const char *rtag, const char *vtag, const bool dontCreateVendorTag, const bool overwriteReleaseTags, bool forceRoot, const char *cvsroot)
~CImport_MAIN ()
CString | GetLogMsg () const

Public Attributes

CButton | m_overwriteReleaseTagsCheck
CButton | m_forceRootCheck
CButton | m_selCvsrootButton
CSmartComboBox m_cvsrootCombo
CStatic | m_multilineEntryPlaceholder
CButton | m_vtagButton
CButton | m_rtagButton
CButton | m_dontCreateVendorTagCheck
CSmartComboBox m_moduleCombo
CSmartComboBox m_rtagCombo
CSmartComboBox m_vtagCombo
CString | m_vtag
CString | m_rtag
CString | m_moduleName
BOOL | m_dontCreateVendorTag
CString | m_cvsroot
BOOL | m_forceRoot
BOOL | m_overwriteReleaseTags

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnBrowseTag1 ()
BN_CLICKED message handler, display browse tag/branch dialog.
afx_msg void | OnBrowseTag2 ()
BN_CLICKED message handler, display browse tag/branch dialog.
afx_msg void | OnBrowseModules ()
BN_CLICKED message handler, browse for file/directory.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls.
afx_msg void | OnDontcreatevendortag ()
BN_CLICKED message handler, disable the vendor and release tag.
afx_msg void | OnForceroot ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnSelcvsroot ()
BN_CLICKED message handler, select CVSROOT.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf
CString | m_logMsg
CMultilineEntryDlg m_multilineEntryDlg

Detailed Description

Import settings property page.

Definition at line 54 of file ImportDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 68 of file ImportDlg.h.
00068 { IDD = IDD_IMPORT_MAIN };

Constructor & Destructor Documentation

CImport_MAIN::CImport_MAIN | ( | const MultiFiles * | mf,
 |  | const char * | logMsg,
 |  | const char * | modname,
 |  | const char * | rtag,
 |  | const char * | vtag,
 |  | const bool | dontCreateVendorTag,
 |  | const bool | overwriteReleaseTags,
 |  | bool | forceRoot,
 |  | const char * | cvsroot
 | ) |

Definition at line 119 of file ImportDlg.cpp.

References gImportModuleNames, gOldCvsroots, gReleasesNames, and gVendorNames.

00123                            : m_mf(mf), m_multilineEntryDlg(mf), CHHelpPropertyPage(CImport_MAIN::IDD)
00124 {
00125     //{{AFX_DATA_INIT(CImport_MAIN)
00126     m_vtag = vtag;
00127     m_rtag = rtag;
00128     m_moduleName = modname;
00129     m_dontCreateVendorTag = dontCreateVendorTag;
00130     m_cvsroot = cvsroot;
00131     m_forceRoot = forceRoot;
00132     m_overwriteReleaseTags = overwriteReleaseTags;
00133     //}}AFX_DATA_INIT
00134
00135     m_logMsg = logMsg;
00136
00137     m_moduleCombo.SetItems(&gImportModuleNames);
00138     m_rtagCombo.SetItems(&gReleasesNames);
00139     m_vtagCombo.SetItems(&gVendorNames);
00140     m_cvsrootCombo.SetItems(&gOldCvsroots);
00141 }

CImport_MAIN::~CImport_MAIN ( )

Definition at line 143 of file ImportDlg.cpp.

00144 {
00145 }

Member Function Documentation

void CImport_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 147 of file ImportDlg.cpp.

References BUTTONTITLE_OK, DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BROWSE_CVSROOT, IDC_BROWSE_TAG1, IDC_BROWSE_TAG2, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_MULTILINE_ENTRY_STATIC, IDC_NO_VENDOR_RELEASE_TAGS, IDC_OVERWRITE_RELEASE_TAGS, IDC_RELEASE_TAG, IDC_REPOSITORY_PATH, IDC_VENDOR_TAG, kCvsAlertWarningIcon, m_cvsroot, m_cvsrootCombo, m_dontCreateVendorTag, m_dontCreateVendorTagCheck, m_forceRoot, m_forceRootCheck, m_logMsg, m_moduleCombo, m_moduleName, m_multilineEntryDlg, m_multilineEntryPlaceholder, m_overwriteReleaseTags, m_overwriteReleaseTagsCheck, m_rtag, m_rtagButton, m_rtagCombo, m_selCvsrootButton, m_vtag, m_vtagButton, m_vtagCombo, NULL, OnDontcreatevendortag(), and CMultilineEntryDlg::UpdateData().

00148 {
00149     CHHelpPropertyPage::DoDataExchange(pDX);
00150
00151     //{{AFX_DATA_MAP(CImport_MAIN)
00152     DDX_Control(pDX, IDC_OVERWRITE_RELEASE_TAGS, m_overwriteReleaseTagsCheck);
00153     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00154     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00155     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00156     DDX_Control(pDX, IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryPlaceholder);
00157     DDX_Control(pDX, IDC_BROWSE_TAG2, m_vtagButton);
00158     DDX_Control(pDX, IDC_BROWSE_TAG1, m_rtagButton);
00159     DDX_Control(pDX, IDC_NO_VENDOR_RELEASE_TAGS, m_dontCreateVendorTagCheck);
00160     DDX_Control(pDX, IDC_REPOSITORY_PATH, m_moduleCombo);
00161     DDX_Control(pDX, IDC_RELEASE_TAG, m_rtagCombo);
00162     DDX_Control(pDX, IDC_VENDOR_TAG, m_vtagCombo);
00163     DDX_CBString(pDX, IDC_VENDOR_TAG, m_vtag);
00164     DDX_CBString(pDX, IDC_RELEASE_TAG, m_rtag);
00165     DDX_CBString(pDX, IDC_REPOSITORY_PATH, m_moduleName);
00166     DDX_Check(pDX, IDC_NO_VENDOR_RELEASE_TAGS, m_dontCreateVendorTag);
00167     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00168     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00169     DDX_Check(pDX, IDC_OVERWRITE_RELEASE_TAGS, m_overwriteReleaseTags);
00170     //}}AFX_DATA_MAP
00171
00172     DDV_MinChars(pDX, m_moduleName, 1);
00173     DDV_MinChars(pDX, m_rtag, 1);
00174     DDV_MinChars(pDX, m_vtag, 1);
00175     DDX_ComboMString(pDX, IDC_REPOSITORY_PATH, m_moduleCombo);
00176     DDX_ComboMString(pDX, IDC_VENDOR_TAG, m_vtagCombo);
00177     DDX_ComboMString(pDX, IDC_RELEASE_TAG, m_rtagCombo);
00178     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00179
00180     if( m_forceRoot )
00181     {
00182         DDV_MinChars(pDX, m_cvsroot, 1);
00183     }
00184
00185     // Error if the vendor and release tags are same
00186     if( pDX->m_bSaveAndValidate )
00187     {
00188         if( !m_dontCreateVendorTag && m_vtag == m_rtag )
00189         {
00190             CvsAlert(kCvsAlertWarningIcon,
00191                 "Invalid Vendor and Release tags.", "Vendor Tag and Release Tag can't have the same values.",
00192                 BUTTONTITLE_OK, NULL).ShowAlert();
00193
00194             pDX->Fail();
00195         }
00196     }
00197
00198     if( !pDX->m_bSaveAndValidate )
00199     {
00200         OnDontcreatevendortag();
00201         m_selCvsrootButton.EnableWindow(m_forceRoot);
00202     }
00203
00204     m_multilineEntryDlg.UpdateData(pDX->m_bSaveAndValidate, m_logMsg);
00205 }

Here is the call graph for this function:

CString CImport_MAIN::GetLogMsg ( ) const

Get the log message

Returns:
The log message
Definition at line 302 of file ImportDlg.cpp.

References m_logMsg.

Referenced by CompatGetImport().

00303 {
00304     return m_logMsg;
00305 }

void CImport_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 236 of file ImportDlg.cpp.

References IDC_BROWSE_CVSROOT, IDC_BROWSE_MODNAME, IDC_BROWSE_TAG1, IDC_BROWSE_TAG2, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_NO_VENDOR_RELEASE_TAGS, IDC_OVERWRITE_RELEASE_TAGS, IDC_RELEASE_TAG, IDC_REPOSITORY_PATH, IDC_VENDOR_TAG, IDH_IDC_BROWSE_CVSROOT, IDH_IDC_BROWSE_MODNAME, IDH_IDC_BROWSE_TAG, IDH_IDC_CVSROOT, IDH_IDC_FORCE_CVSROOT, IDH_IDC_NO_VENDOR_RELEASE_TAGS, IDH_IDC_OVERWRITE_RELEASE_TAGS, IDH_IDC_RELEASE_TAG, IDH_IDC_REPOSITORY_PATH, IDH_IDC_VENDOR_TAG, and CHHelpSupport::SetCtrlHelpID().

00237 {
00238     SetCtrlHelpID(IDC_REPOSITORY_PATH,          IDH_IDC_REPOSITORY_PATH);
00239     SetCtrlHelpID(IDC_BROWSE_MODNAME,           IDH_IDC_BROWSE_MODNAME);
00240     SetCtrlHelpID(IDC_VENDOR_TAG,               IDH_IDC_VENDOR_TAG);
00241     SetCtrlHelpID(IDC_BROWSE_TAG1,              IDH_IDC_BROWSE_TAG);
00242     SetCtrlHelpID(IDC_RELEASE_TAG,              IDH_IDC_RELEASE_TAG);
00243     SetCtrlHelpID(IDC_BROWSE_TAG2,              IDH_IDC_BROWSE_TAG);
00244     SetCtrlHelpID(IDC_NO_VENDOR_RELEASE_TAGS,   IDH_IDC_NO_VENDOR_RELEASE_TAGS);
00245     SetCtrlHelpID(IDC_OVERWRITE_RELEASE_TAGS,   IDH_IDC_OVERWRITE_RELEASE_TAGS);
00246     SetCtrlHelpID(IDC_FORCE_CVSROOT,            IDH_IDC_FORCE_CVSROOT);
00247     SetCtrlHelpID(IDC_CVSROOT,                  IDH_IDC_CVSROOT);
00248     SetCtrlHelpID(IDC_BROWSE_CVSROOT,           IDH_IDC_BROWSE_CVSROOT);
00249 }

Here is the call graph for this function:

void CImport_MAIN::OnBrowseModules ( ) [protected]

BN_CLICKED message handler, browse for file/directory.

Definition at line 274 of file ImportDlg.cpp.

References CompatGetModuleListItem(), CStr, m_mf, m_moduleCombo, and m_moduleName.

00275 {
00276     CStr moduleName;
00277     if( CompatGetModuleListItem(m_mf, moduleName) )
00278     {
00279         m_moduleName = (const char*)moduleName;
00280         m_moduleCombo.SetWindowText(m_moduleName);
00281     }
00282 }

Here is the call graph for this function:

void CImport_MAIN::OnBrowseTag1 ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 252 of file ImportDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_vtag, and m_vtagCombo.

00253 {
00254     CStr tagName;
00255     if( CompatGetTagListItem(m_mf, tagName) )
00256     {
00257         m_vtag = (const char*)tagName;
00258         m_vtagCombo.SetWindowText(m_vtag);
00259     }
00260 }

Here is the call graph for this function:

void CImport_MAIN::OnBrowseTag2 ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 263 of file ImportDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rtag, and m_rtagCombo.

00264 {
00265     CStr tagName;
00266     if( CompatGetTagListItem(m_mf, tagName) )
00267     {
00268         m_rtag = (const char*)tagName;
00269         m_rtagCombo.SetWindowText(m_rtag);
00270     }
00271 }

Here is the call graph for this function:

void CImport_MAIN::OnDontcreatevendortag ( ) [protected]

BN_CLICKED message handler, disable the vendor and release tag.

Definition at line 285 of file ImportDlg.cpp.

References m_dontCreateVendorTagCheck, m_overwriteReleaseTagsCheck, m_rtagButton, m_rtagCombo, m_vtagButton, and m_vtagCombo.

Referenced by DoDataExchange().

00286 {
00287     const bool enable = m_dontCreateVendorTagCheck.GetCheck() == 0;
00288
00289     m_rtagCombo.EnableWindow(enable);
00290     m_rtagButton.EnableWindow(enable);
00291
00292     m_vtagCombo.EnableWindow(enable);
00293     m_vtagButton.EnableWindow(enable);
00294
00295     m_overwriteReleaseTagsCheck.EnableWindow(enable);
00296 }

void CImport_MAIN::OnForceroot ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 308 of file ImportDlg.cpp.

References m_cvsrootCombo, m_forceRootCheck, and m_selCvsrootButton.

00309 {
00310     const BOOL enable = m_forceRootCheck.GetCheck();
00311
00312     m_selCvsrootButton.EnableWindow(enable);
00313     m_cvsrootCombo.EnableWindow(enable);
00314 }

BOOL CImport_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 223 of file ImportDlg.cpp.

References gCommitLogs, kMultilineLogMessage, and CHHelpPropertyPage::OnInitDialog().

00224 {
00225     CHHelpPropertyPage::OnInitDialog();
00226
00227     // Extra initialization
00228     m_multilineEntryDlg.Create(kMultilineLogMessage, &gCommitLogs, &m_multilineEntryPlaceholder, this);
00229
00230     OnForceroot();
00231
00232     return TRUE;  // return TRUE unless you set the focus to a control
00233     // EXCEPTION: OCX Property Pages should return FALSE
00234 }

Here is the call graph for this function:

void CImport_MAIN::OnSelcvsroot ( ) [protected]

BN_CLICKED message handler, select CVSROOT.

Definition at line 317 of file ImportDlg.cpp.

References CompatGetCvsRoot(), CStr, CSmartComboBox::GetWindowText(), and m_cvsrootCombo.

00318 {
00319     CString strCvsroot;
00320     m_cvsrootCombo.GetWindowText(strCvsroot);
00321
00322     CStr cvsroot(strCvsroot);
00323     if( CompatGetCvsRoot(cvsroot) )
00324     {
00325         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00326     }
00327 }

Here is the call graph for this function:

Member Data Documentation

CString CImport_MAIN::m_cvsroot

Definition at line 84 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

CSmartComboBox CImport_MAIN::m_cvsrootCombo

Definition at line 72 of file ImportDlg.h.

Referenced by DoDataExchange(), OnForceroot(), and OnSelcvsroot().

BOOL CImport_MAIN::m_dontCreateVendorTag

Definition at line 83 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

CButton CImport_MAIN::m_dontCreateVendorTagCheck

Definition at line 76 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnDontcreatevendortag().

BOOL CImport_MAIN::m_forceRoot

Definition at line 85 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

CButton CImport_MAIN::m_forceRootCheck

Definition at line 70 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

CString CImport_MAIN::m_logMsg [private]

Selected message Definition at line 114 of file ImportDlg.h.

Referenced by DoDataExchange(), and GetLogMsg().

const MultiFiles* CImport_MAIN::m_mf [private]

Browser selection Definition at line 113 of file ImportDlg.h.

Referenced by OnBrowseModules(), OnBrowseTag1(), and OnBrowseTag2().

CSmartComboBox CImport_MAIN::m_moduleCombo

Definition at line 77 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnBrowseModules().

CString CImport_MAIN::m_moduleName

Definition at line 82 of file ImportDlg.h.

Referenced by CompatGetImport(), DoDataExchange(), and OnBrowseModules().

CMultilineEntryDlg CImport_MAIN::m_multilineEntryDlg [private]

Multiline entry child dialog Definition at line 116 of file ImportDlg.h.

Referenced by DoDataExchange().

CStatic CImport_MAIN::m_multilineEntryPlaceholder

Definition at line 73 of file ImportDlg.h.

Referenced by DoDataExchange().

BOOL CImport_MAIN::m_overwriteReleaseTags

Definition at line 86 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

CButton CImport_MAIN::m_overwriteReleaseTagsCheck

Definition at line 69 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnDontcreatevendortag().

CString CImport_MAIN::m_rtag

Definition at line 81 of file ImportDlg.h.

Referenced by CompatGetImport(), DoDataExchange(), and OnBrowseTag2().

CButton CImport_MAIN::m_rtagButton

Definition at line 75 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnDontcreatevendortag().

CSmartComboBox CImport_MAIN::m_rtagCombo

Definition at line 78 of file ImportDlg.h.

Referenced by DoDataExchange(), OnBrowseTag2(), and OnDontcreatevendortag().

CButton CImport_MAIN::m_selCvsrootButton

Definition at line 71 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

CString CImport_MAIN::m_vtag

Definition at line 80 of file ImportDlg.h.

Referenced by CompatGetImport(), DoDataExchange(), and OnBrowseTag1().

CButton CImport_MAIN::m_vtagButton

Definition at line 74 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnDontcreatevendortag().

CSmartComboBox CImport_MAIN::m_vtagCombo

Definition at line 79 of file ImportDlg.h.

Referenced by DoDataExchange(), OnBrowseTag1(), and OnDontcreatevendortag().

The documentation for this class was generated from the following files:
  • common/ImportDlg.h
  • common/ImportDlg.cpp
Generated on Sat Aug 7 22:53:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CImport_OPTIONS Class Reference

CImport_OPTIONS Class Reference

Import options property page. More...

#include <ImportDlg.h>

Inheritance diagram for CImport_OPTIONS:

[legend]
Collaboration diagram for CImport_OPTIONS:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_IMPORT_OPTIONS }

Public Member Functions

CImport_OPTIONS (const MultiFiles *mf, ReportConflict *&entries, ReportWarning *&warnings, const char *path, const bool useDefIgnore, const bool useFilesTime, const bool createSandbox)
~CImport_OPTIONS ()

Public Attributes

CSmartComboBox m_pathCombo
CSmartComboBox m_vendorBranchCombo
CButton | m_vendorBranchButton
CButton | m_vendorBranchCheck
BOOL | m_useDefIgnore
BOOL | m_useFilesTime
BOOL | m_hasVendorBranch
CString | m_vendorBranch
BOOL | m_createSandbox
CString | m_path

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnBtnpath ()
BN_CLICKED message handler, browse for import directory.
afx_msg void | OnBrowseBranchid ()
BN_CLICKED message handler, browse for vendor branch id.
afx_msg void | OnBranchid ()
BN_CLICKED message handler, enable vendor branch controls.
afx_msg void | OnImportfilter ()
BN_CLICKED message handler, show import filter dialog.
afx_msg void | OnSelchangePath ()
CBN_SELCHANGE message handler, run import filter.

Private Member Functions

virtual void | InitHelpID ()
bool | ImportFilter (const char *path)

Private Attributes

const MultiFiles * | m_mf
ReportConflict *& m_entries
ReportWarning *& m_warnings

Detailed Description

Import options property page.

Definition at line 127 of file ImportDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 140 of file ImportDlg.h.
00140 { IDD = IDD_IMPORT_OPTIONS };

Constructor & Destructor Documentation

CImport_OPTIONS::CImport_OPTIONS | ( | const MultiFiles * | mf,
 |  | ReportConflict *& | entries,
 |  | ReportWarning *& | warnings,
 |  | const char * | path,
 |  | const bool | useDefIgnore,
 |  | const bool | useFilesTime,
 |  | const bool | createSandbox
 | ) |

Definition at line 334 of file ImportDlg.cpp.

References gImportLocalFolder, and gVendorBranchIds.

00337                                  : m_mf(mf), m_entries(entries), m_warnings(warnings),
00338                                  CHHelpPropertyPage(CImport_OPTIONS::IDD)
00339 {
00340     //{{AFX_DATA_INIT(CImport_OPTIONS)
00341     m_useDefIgnore = useDefIgnore;
00342     m_useFilesTime = useFilesTime;
00343     m_hasVendorBranch = FALSE;
00344     m_vendorBranch = _T("");
00345     m_createSandbox = createSandbox;
00346     m_path = path;
00347     //}}AFX_DATA_INIT
00348
00349     m_vendorBranchCombo.SetItems(&gVendorBranchIds);
00350     m_pathCombo.SetItems(&gImportLocalFolder);
00351     m_pathCombo.SetReadOnly();
00352 }

CImport_OPTIONS::~CImport_OPTIONS ( )

Definition at line 354 of file ImportDlg.cpp.

00355 {
00356 }

Member Function Documentation

void CImport_OPTIONS::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 358 of file ImportDlg.cpp.

References DDV_CheckPathExists(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BRANCHID, IDC_BROWSE_BRANCHID, IDC_CREATE_SANDBOX, IDC_DEFAULT_CVSIGNORE, IDC_FILES_MODIFICATION_TIME, IDC_HAS_BRANCHID, IDC_PATH, m_createSandbox, m_hasVendorBranch, m_path, m_pathCombo, m_useDefIgnore, m_useFilesTime, m_vendorBranch, m_vendorBranchButton, m_vendorBranchCheck, m_vendorBranchCombo, and OnBranchid().

00359 {
00360     CHHelpPropertyPage::DoDataExchange(pDX);
00361
00362     //{{AFX_DATA_MAP(CImport_OPTIONS)
00363     DDX_Control(pDX, IDC_PATH, m_pathCombo);
00364     DDX_Control(pDX, IDC_BRANCHID, m_vendorBranchCombo);
00365     DDX_Control(pDX, IDC_BROWSE_BRANCHID, m_vendorBranchButton);
00366     DDX_Control(pDX, IDC_HAS_BRANCHID, m_vendorBranchCheck);
00367     DDX_Check(pDX, IDC_DEFAULT_CVSIGNORE, m_useDefIgnore);
00368     DDX_Check(pDX, IDC_FILES_MODIFICATION_TIME, m_useFilesTime);
00369     DDX_Check(pDX, IDC_HAS_BRANCHID, m_hasVendorBranch);
00370     DDX_CBString(pDX, IDC_BRANCHID, m_vendorBranch);
00371     DDX_Check(pDX, IDC_CREATE_SANDBOX, m_createSandbox);
00372     DDX_CBString(pDX, IDC_PATH, m_path);
00373     //}}AFX_DATA_MAP
00374
00375     DDV_CheckPathExists(pDX, IDC_PATH, m_path, false);
00376     DDX_ComboMString(pDX, IDC_BRANCHID, m_vendorBranchCombo);
00377     DDX_ComboMString(pDX, IDC_PATH, m_pathCombo);
00378
00379     if( !pDX->m_bSaveAndValidate )
00380     {
00381         OnBranchid();
00382     }
00383 }

Here is the call graph for this function:

bool CImport_OPTIONS::ImportFilter ( const char * path ) [private]

Run the import filter Definition at line 479 of file ImportDlg.cpp.

References CompatImportFilter(), free_list_types(), m_entries, m_warnings, and NULL.

Referenced by OnBtnpath(), and OnSelchangePath().

00480 {
00481     bool res = false;
00482
00483     ReportConflict* entries = NULL;
00484     ReportWarning* warnings = NULL;
00485
00486     if( CompatImportFilter(path, entries, warnings) )
00487     {
00488         // Free the previous filters and use the new selection instead
00489         free_list_types(m_warnings, m_entries);
00490
00491         m_entries = entries;
00492         m_warnings = warnings;
00493
00494         res = true;
00495     }
00496
00497     return res;
00498 }

Here is the call graph for this function:

void CImport_OPTIONS::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 399 of file ImportDlg.cpp.

References IDC_BRANCHID, IDC_BROWSE_BRANCHID, IDC_BROWSE_PATH, IDC_CREATE_SANDBOX, IDC_DEFAULT_CVSIGNORE, IDC_FILES_MODIFICATION_TIME, IDC_HAS_BRANCHID, IDC_IMPORT_FILTER, IDC_PATH, IDH_IDC_BRANCHID, IDH_IDC_BROWSE_BRANCHID, IDH_IDC_BROWSE_PATH, IDH_IDC_CREATE_SANDBOX, IDH_IDC_DEFAULT_CVSIGNORE, IDH_IDC_FILES_MODIFICATION_TIME, IDH_IDC_HAS_BRANCHID, IDH_IDC_IMPORT_FILTER, and IDH_IDC_PATH.

00400 {
00401     SetCtrlHelpID(IDC_PATH,                     IDH_IDC_PATH);
00402     SetCtrlHelpID(IDC_BROWSE_PATH,              IDH_IDC_BROWSE_PATH);
00403     SetCtrlHelpID(IDC_IMPORT_FILTER,            IDH_IDC_IMPORT_FILTER);
00404     SetCtrlHelpID(IDC_DEFAULT_CVSIGNORE,        IDH_IDC_DEFAULT_CVSIGNORE);
00405     SetCtrlHelpID(IDC_FILES_MODIFICATION_TIME,  IDH_IDC_FILES_MODIFICATION_TIME);
00406     SetCtrlHelpID(IDC_CREATE_SANDBOX,           IDH_IDC_CREATE_SANDBOX);
00407     SetCtrlHelpID(IDC_HAS_BRANCHID,             IDH_IDC_HAS_BRANCHID);
00408     SetCtrlHelpID(IDC_BRANCHID,                 IDH_IDC_BRANCHID);
00409     SetCtrlHelpID(IDC_BROWSE_BRANCHID,          IDH_IDC_BROWSE_BRANCHID);
00410 }

void CImport_OPTIONS::OnBranchid ( ) [protected]

BN_CLICKED message handler, enable vendor branch controls.

Definition at line 512 of file ImportDlg.cpp.

References m_vendorBranchButton, m_vendorBranchCheck, and m_vendorBranchCombo.

Referenced by DoDataExchange().

00513 {
00514     m_vendorBranchCombo.EnableWindow(m_vendorBranchCheck.GetCheck());
00515     m_vendorBranchButton.EnableWindow(m_vendorBranchCheck.GetCheck());
00516 }

void CImport_OPTIONS::OnBrowseBranchid ( ) [protected]

BN_CLICKED message handler, browse for vendor branch id.

Definition at line 501 of file ImportDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_vendorBranch, and m_vendorBranchCombo.

00502 {
00503     CStr branchName;
00504     if( CompatGetTagListItem(m_mf, branchName) )
00505     {
00506         m_vendorBranch = (const char*)branchName;
00507         m_vendorBranchCombo.SetWindowText(m_vendorBranch);
00508     }
00509 }

Here is the call graph for this function:

void CImport_OPTIONS::OnBtnpath ( ) [protected]

BN_CLICKED message handler, browse for import directory.

Definition at line 413 of file ImportDlg.cpp.

References BrowserGetDirectory(), CStr, CSmartComboBox::GetWindowText(), ImportFilter(), m_pathCombo, and NULL.

00414 {
00415     CString strPath;
00416     m_pathCombo.GetWindowText(strPath);
00417
00418     CStr path(strPath);
00419     if( BrowserGetDirectory("Select a directory to import from", path, IsWindow(m_hWnd) ? this : NULL) )
00420     {
00421         if( strPath.CompareNoCase(path) )
00422         {
00423             if( !ImportFilter(path) )
00424                 return;
00425         }
00426
00427         m_pathCombo.SetWindowText(path);
00428     }
00429 }

Here is the call graph for this function:

void CImport_OPTIONS::OnImportfilter ( ) [protected]

BN_CLICKED message handler, show import filter dialog.

Definition at line 432 of file ImportDlg.cpp.

References CompatImportFilter(), copy_list_types(), free_list_types(), CSmartComboBox::GetWindowText(), m_entries, m_pathCombo, m_warnings, and NULL.

00433 {
00434     CString strPath;
00435     m_pathCombo.GetWindowText(strPath);
00436
00437     ReportConflict* entries = NULL;
00438     ReportWarning* warnings = NULL;
00439
00440     copy_list_types(m_warnings, m_entries, warnings, entries);
00441
00442     if( CompatImportFilter(strPath, entries, warnings) )
00443     {
00444         // Free the previous filters and use the new selection instead
00445         free_list_types(m_warnings, m_entries);
00446
00447         m_entries = entries;
00448         m_warnings = warnings;
00449     }
00450     else
00451     {
00452         free_list_types(warnings, entries);
00453     }
00454 }

Here is the call graph for this function:

void CImport_OPTIONS::OnSelchangePath ( ) [protected]

CBN_SELCHANGE message handler, run import filter.

Definition at line 457 of file ImportDlg.cpp.

References CSmartComboBox::EnsureSelchangeMatch(), CSmartComboBox::GetWindowText(), ImportFilter(), and m_pathCombo.

00458 {
00459     CString strPrevPath;
00460     m_pathCombo.GetWindowText(strPrevPath);
00461
00462     m_pathCombo.EnsureSelchangeMatch();
00463
00464     CString strPath;
00465     m_pathCombo.GetWindowText(strPath);
00466
00467     if( strPrevPath.CompareNoCase(strPath) )
00468     {
00469         if( !ImportFilter(strPath) )
00470         {
00471             m_pathCombo.SelectString(-1, strPrevPath);
00472         }
00473     }
00474 }

Here is the call graph for this function:

Member Data Documentation

BOOL CImport_OPTIONS::m_createSandbox

Definition at line 149 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

ReportConflict*& CImport_OPTIONS::m_entries [private]

Conflicts Definition at line 175 of file ImportDlg.h.

Referenced by ImportFilter(), and OnImportfilter().

BOOL CImport_OPTIONS::m_hasVendorBranch

Definition at line 147 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

const MultiFiles* CImport_OPTIONS::m_mf [private]

Definition at line 174 of file ImportDlg.h.

Referenced by OnBrowseBranchid().

CString CImport_OPTIONS::m_path

Definition at line 150 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

CSmartComboBox CImport_OPTIONS::m_pathCombo

Definition at line 141 of file ImportDlg.h.

Referenced by DoDataExchange(), OnBtnpath(), OnImportfilter(), and OnSelchangePath().

BOOL CImport_OPTIONS::m_useDefIgnore

Definition at line 145 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

BOOL CImport_OPTIONS::m_useFilesTime

Definition at line 146 of file ImportDlg.h.

Referenced by CompatGetImport(), and DoDataExchange().

CString CImport_OPTIONS::m_vendorBranch

Definition at line 148 of file ImportDlg.h.

Referenced by CompatGetImport(), DoDataExchange(), and OnBrowseBranchid().

CButton CImport_OPTIONS::m_vendorBranchButton

Definition at line 143 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnBranchid().

CButton CImport_OPTIONS::m_vendorBranchCheck

Definition at line 144 of file ImportDlg.h.

Referenced by DoDataExchange(), and OnBranchid().

CSmartComboBox CImport_OPTIONS::m_vendorBranchCombo

Definition at line 142 of file ImportDlg.h.

Referenced by DoDataExchange(), OnBranchid(), and OnBrowseBranchid().

ReportWarning*& CImport_OPTIONS::m_warnings [private]

Warnings Definition at line 176 of file ImportDlg.h.

Referenced by ImportFilter(), and OnImportfilter().

The documentation for this class was generated from the following files:
  • common/ImportDlg.h
  • common/ImportDlg.cpp
Generated on Sat Aug 7 22:53:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CImportEntry Class Reference

CImportEntry Class Reference

#include <ImportFilterDlg.h>

Inheritance diagram for CImportEntry:

[legend]
Collaboration diagram for CImportEntry:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_ENTRYDESC }

Public Member Functions

CImportEntry (ReportConflict *entry, CWnd *pParent=NULL)

Public Attributes

CString | m_desc
int m_radios

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 127 of file ImportFilterDlg.h.
00127 { IDD = IDD_ENTRYDESC };

Constructor & Destructor Documentation

CImportEntry::CImportEntry | ( | ReportConflict * | entry,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 140 of file ImportFilterDlg.cpp.

References CStr, ReportConflict::HasForceBinary(), ReportConflict::HasForceNoKeywords(), ReportConflict::HasForceText(), ReportConflict::HasForceUnicode(), ReportConflict::HasIgnore(), m_desc, m_radios, and ReportConflict::PrintOut().

00141     : CHHelpDialog(CImportEntry::IDD, pParent)
00142 {
00143     CStr print;
00144     entry->PrintOut(print);
00145
00146     //{{AFX_DATA_INIT(CImportEntry)
00147     //}}AFX_DATA_INIT
00148
00149     //keep these outside MFC remarks
00150     m_desc = print;
00151
00152     if( entry->HasForceBinary() )
00153         m_radios = 1;
00154     else if( entry->HasForceUnicode() )
00155         m_radios = 2;
00156     else if( entry->HasForceText() )
00157         m_radios = 3;
00158     else if( entry->HasForceNoKeywords() )
00159         m_radios = 4;
00160     else if( entry->HasIgnore() )
00161         m_radios = 5;
00162     else
00163         m_radios = 0;
00164 }

Here is the call graph for this function:

Member Function Documentation

void CImportEntry::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 167 of file ImportFilterDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_CONFLICT_DESC, IDC_ENTRYSTATE_NO_CHANGE, m_desc, and m_radios.

00168 {
00169     CHHelpDialog::DoDataExchange(pDX);
00170     //{{AFX_DATA_MAP(CImportEntry)
00171     DDX_Text(pDX, IDC_CONFLICT_DESC, m_desc);
00172     DDX_Radio(pDX, IDC_ENTRYSTATE_NO_CHANGE, m_radios);
00173     //}}AFX_DATA_MAP
00174 }

Here is the call graph for this function:

void CImportEntry::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 186 of file ImportFilterDlg.cpp.

References IDC_CONFLICT_DESC, IDC_ENTRYSTATE_FORCE_BINARY, IDC_ENTRYSTATE_FORCE_TEXT, IDC_ENTRYSTATE_FORCE_UNICODE, IDC_ENTRYSTATE_IGNORE, IDC_ENTRYSTATE_NO_CHANGE, IDC_ENTRYSTATE_NO_EXPANSION, IDH_IDC_CONFLICT_DESC, IDH_IDC_ENTRYSTATE_FORCE_BINARY, IDH_IDC_ENTRYSTATE_FORCE_TEXT, IDH_IDC_ENTRYSTATE_FORCE_UNICODE, IDH_IDC_ENTRYSTATE_IGNORE, IDH_IDC_ENTRYSTATE_NO_CHANGE, and IDH_IDC_ENTRYSTATE_NO_EXPANSION.

00187 {
00188     SetCtrlHelpID(IDC_ENTRYSTATE_NO_CHANGE,     IDH_IDC_ENTRYSTATE_NO_CHANGE);
00189     SetCtrlHelpID(IDC_ENTRYSTATE_FORCE_BINARY,  IDH_IDC_ENTRYSTATE_FORCE_BINARY);
00190     SetCtrlHelpID(IDC_ENTRYSTATE_FORCE_UNICODE, IDH_IDC_ENTRYSTATE_FORCE_UNICODE);
00191     SetCtrlHelpID(IDC_ENTRYSTATE_FORCE_TEXT,    IDH_IDC_ENTRYSTATE_FORCE_TEXT);
00192     SetCtrlHelpID(IDC_ENTRYSTATE_NO_EXPANSION,  IDH_IDC_ENTRYSTATE_NO_EXPANSION);
00193     SetCtrlHelpID(IDC_ENTRYSTATE_IGNORE,        IDH_IDC_ENTRYSTATE_IGNORE);
00194     SetCtrlHelpID(IDC_CONFLICT_DESC,            IDH_IDC_CONFLICT_DESC);
00195 }

void CImportEntry::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 198 of file ImportFilterDlg.cpp.

References CHHelpSupport::ShowHelp().

00199 {
00200     ShowHelp();
00201 }

Here is the call graph for this function:

Member Data Documentation

CString CImportEntry::m_desc

Definition at line 128 of file ImportFilterDlg.h.

Referenced by CImportEntry(), and DoDataExchange().

int CImportEntry::m_radios

Definition at line 129 of file ImportFilterDlg.h.

Referenced by CImportEntry(), DoDataExchange(), and CImportFilterDlg::OnEditentry().

The documentation for this class was generated from the following files:
  • common/ImportFilterDlg.h
  • common/ImportFilterDlg.cpp
Generated on Sat Aug 7 22:53:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CImportFilterDlg Class Reference

CImportFilterDlg Class Reference

#include <ImportFilterDlg.h>

Inheritance diagram for CImportFilterDlg:

[legend]
Collaboration diagram for CImportFilterDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_IMPORTFILTER }

Public Member Functions

CImportFilterDlg (ReportConflict *entries, ReportWarning *warnings, CWnd *pParent=NULL)

Public Attributes

CListCtrl | m_list
CButton | m_edit

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnEditentry ()
BN_CLICKED message handler, edit the selected entry.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls.
afx_msg void | OnDblclkListentries (NMHDR *pNMHDR, LRESULT *pResult)
BN_CLICKED message handler, edit the selected entry.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

CImageList | m_imageList
ReportConflict * m_entries
ReportWarning * m_warnings

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 53 of file ImportFilterDlg.h.
00053 { IDD = IDD_IMPORTFILTER };

Constructor & Destructor Documentation

CImportFilterDlg::CImportFilterDlg | ( | ReportConflict * | entries,
 |  | ReportWarning * | warnings,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 206 of file ImportFilterDlg.cpp.

References m_entries, and m_warnings.

00208     : CHHelpDialog(CImportFilterDlg::IDD, pParent)
00209 {
00210     //{{AFX_DATA_INIT(CImportFilterDlg)
00211     m_entries = entries;
00212     m_warnings = warnings;
00213     //}}AFX_DATA_INIT
00214 }

Member Function Documentation

void CImportFilterDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 217 of file ImportFilterDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_ENTRIES_LIST, IDC_ENTRY_EDIT, m_edit, and m_list.

00218 {
00219     CHHelpDialog::DoDataExchange(pDX);
00220     //{{AFX_DATA_MAP(CImportFilterDlg)
00221     DDX_Control(pDX, IDC_ENTRIES_LIST, m_list);
00222     DDX_Control(pDX, IDC_ENTRY_EDIT, m_edit);
00223     //}}AFX_DATA_MAP
00224 }

Here is the call graph for this function:

void CImportFilterDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 373 of file ImportFilterDlg.cpp.

References IDC_ENTRIES_LIST, IDC_ENTRY_EDIT, IDH_IDC_ENTRIES_LIST, IDH_IDC_ENTRY_EDIT, and CHHelpSupport::SetCtrlHelpID().

00374 {
00375     SetCtrlHelpID(IDC_ENTRIES_LIST, IDH_IDC_ENTRIES_LIST);
00376     SetCtrlHelpID(IDC_ENTRY_EDIT,   IDH_IDC_ENTRY_EDIT);
00377 }

Here is the call graph for this function:

void CImportFilterDlg::OnDblclkListentries | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

BN_CLICKED message handler, edit the selected entry.

Definition at line 314 of file ImportFilterDlg.cpp.

References OnEditentry().

00315 {
00316     OnEditentry();
00317     *pResult = 0;
00318 }

Here is the call graph for this function:

void CImportFilterDlg::OnEditentry ( ) [protected]

BN_CLICKED message handler, edit the selected entry.

Definition at line 239 of file ImportFilterDlg.cpp.

References COL_KIND, ReportConflict::DisableUserSettings(), ReportConflict::ForceBinary(), ReportConflict::ForceNoKeywords(), ReportConflict::ForceText(), ReportConflict::ForceUnicode(), ReportConflict::GetKindDesc(), ReportConflict::Ignore(), CImportEntry::m_radios, ReportConflict::next, and ReportWarning::next.

Referenced by OnDblclkListentries().

00240 {
00241     // The user wants to edit an entry.
00242     // Start at the top of the list and walk through it until an item
00243     // that is selected is found.
00244     int nItem = m_list.GetNextItem(-1, LVNI_ALL);
00245     while( nItem != -1 )
00246     {
00247         UINT nState = m_list.GetItemState(nItem, LVIS_SELECTED);
00248         if( (nState & LVIS_SELECTED) == LVIS_SELECTED )
00249             break;
00250
00251         nItem = m_list.GetNextItem(nItem, LVNI_ALL);
00252     }
00253
00254     if( nItem == -1 )
00255         return;
00256
00257     int i = 0;
00258     ReportWarning* warn = m_warnings;
00259     while( warn != 0L )
00260     {
00261         if( i == nItem )
00262         {
00263             CImportWarning dlg(warn);
00264             dlg.DoModal();
00265             return;
00266         }
00267
00268         warn = warn->next;
00269         i++;
00270     }
00271
00272     ReportConflict* conf = m_entries;
00273     while( conf != 0L )
00274     {
00275         if( i == nItem )
00276         {
00277             CImportEntry dlg(conf);
00278             if( dlg.DoModal() == IDOK )
00279             {
00280                 switch(dlg.m_radios)
00281                 {
00282                 case 0:
00283                     conf->DisableUserSettings();
00284                     break;
00285                 case 1:
00286                     conf->ForceBinary();
00287                     break;
00288                 case 2:
00289                     conf->ForceUnicode();
00290                     break;
00291                 case 3:
00292                     conf->ForceText();
00293                     break;
00294                 case 4:
00295                     conf->ForceNoKeywords();
00296                     break;
00297                 case 5:
00298                     conf->Ignore();
00299                     break;
00300                 }
00301
00302                 m_list.SetItemText(nItem, COL_KIND, conf->GetKindDesc());
00303             }
00304
00305             return;
00306         }
00307
00308         conf = conf->next;
00309         i++;
00310     }
00311 }

Here is the call graph for this function:

void CImportFilterDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 380 of file ImportFilterDlg.cpp.

References CHHelpSupport::ShowHelp().

00381 {
00382     ShowHelp();
00383 }

Here is the call graph for this function:

BOOL CImportFilterDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls.

Reimplemented from CHHelpDialog.

Definition at line 321 of file ImportFilterDlg.cpp.

References _gnColumnWidth, _gszColumnLabel, COL_DESC, COL_KIND, COL_STATE, ReportConflict::GetDesc(), ReportWarning::GetDesc(), ReportConflict::GetKindDesc(), ReportConflict::GetStateDesc(), ReportWarning::GetStateDesc(), ReportConflict::HasConflict(), IDB_IMPORT, ReportWarning::IsError(), m_entries, m_imageList, m_list, m_warnings, ReportConflict::next, ReportWarning::next, CHHelpDialog::OnInitDialog(), and SetListCtrlExtendedStyle().

00322 {
00323     CHHelpDialog::OnInitDialog();
00324
00325     // Extra initialization
00326
00327     // Need to set up to display the little icons next to each entry
00328     if( m_imageList.m_hImageList == 0L )
00329         m_imageList.Create(IDB_IMPORT, 16, 1, RGB(255, 255, 255));
00330
00331     m_list.SetImageList(&m_imageList, LVSIL_SMALL);
00332
00333     // Full row selection
00334     SetListCtrlExtendedStyle(&m_list, LVS_EX_FULLROWSELECT | LVS_EX_ONECLICKACTIVATE | LVS_EX_UNDERLINEHOT | LVS_EX_LABELTIP);
00335
00336     // Set up columns inside the list view
00337     m_list.InsertColumn(COL_STATE,  _gszColumnLabel[COL_STATE], LVCFMT_LEFT, _gnColumnWidth[COL_STATE]);
00338     m_list.InsertColumn(COL_DESC,   _gszColumnLabel[COL_DESC], LVCFMT_LEFT, _gnColumnWidth[COL_DESC]);
00339     m_list.InsertColumn(COL_KIND,   _gszColumnLabel[COL_KIND], LVCFMT_LEFT, _gnColumnWidth[COL_KIND]);
00340
00341     int i = 0;
00342     ReportWarning* warn = m_warnings;
00343     while( warn != 0L )
00344     {
00345         // Store this information in the list view
00346         m_list.InsertItem(i, "", warn->IsError() ? 0 : 1);
00347
00348         m_list.SetItemText(i, COL_DESC, warn->GetDesc());
00349         m_list.SetItemText(i, COL_STATE, warn->GetStateDesc());
00350
00351         warn = warn->next;
00352         i++;
00353     }
00354
00355     ReportConflict* conf = m_entries;
00356     while( conf != 0L )
00357     {
00358         // Store this information in the list view
00359         m_list.InsertItem(i, "", conf->HasConflict() ? 0 : 1);
00360
00361         m_list.SetItemText(i, COL_STATE, conf->GetStateDesc());
00362         m_list.SetItemText(i, COL_DESC, conf->GetDesc());
00363         m_list.SetItemText(i, COL_KIND, conf->GetKindDesc());
00364
00365         conf = conf->next;
00366         i++;
00367     }
00368
00369     return TRUE;  // return TRUE unless you set the focus to a control
00370                   // EXCEPTION: OCX Property Pages should return FALSE
00371 }

Here is the call graph for this function:

Member Data Documentation

CButton CImportFilterDlg::m_edit

Definition at line 55 of file ImportFilterDlg.h.

Referenced by DoDataExchange().

ReportConflict* CImportFilterDlg::m_entries [private]

Conflicts Definition at line 79 of file ImportFilterDlg.h.

Referenced by CImportFilterDlg(), and OnInitDialog().

CImageList CImportFilterDlg::m_imageList [private]

Image list Definition at line 78 of file ImportFilterDlg.h.

Referenced by OnInitDialog().

CListCtrl CImportFilterDlg::m_list

Definition at line 54 of file ImportFilterDlg.h.

Referenced by DoDataExchange(), and OnInitDialog().

ReportWarning* CImportFilterDlg::m_warnings [private]

Warnings Definition at line 80 of file ImportFilterDlg.h.

Referenced by CImportFilterDlg(), and OnInitDialog().

The documentation for this class was generated from the following files:
  • common/ImportFilterDlg.h
  • common/ImportFilterDlg.cpp
Generated on Sat Aug 7 22:53:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ImportReport Class Reference

ImportReport Class Reference

Class to traverse and detect conflicts or warnings for import. More...

#include <ImportFilter.h>

Inheritance diagram for ImportReport:

[legend]
Collaboration diagram for ImportReport:

[legend]
List of all members.

Public Member Functions

ImportReport (const char *path, ReportWarning *&w, ReportConflict *&c)
virtual | ~ImportReport ()
std::vector< UStr > & | GetIgnoreList ()
Get the ignore list.
virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnFile (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnAlias (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Private Attributes

ReportWarning *& warnings
ReportConflict *& conflicts
std::vector< UStr > | m_ignlist
CProgress m_progress

Detailed Description

Class to traverse and detect conflicts or warnings for import.

Definition at line 156 of file ImportFilter.h.

Constructor & Destructor Documentation

ImportReport::ImportReport | ( | const char * | path,
 |  | ReportWarning *& | w,
 |  | ReportConflict *& | c
 | ) |

Definition at line 972 of file ImportFilter.cpp.

References BuildIgnoredList(), kProgressFile, and m_ignlist.

00973     : warnings(w), conflicts(c), m_progress(true, "Filtering files to import...", kProgressFile)
00974 {
00975     // MN - Apply ignore filter to import file list
00976     BuildIgnoredList(m_ignlist, path);
00977 }

Here is the call graph for this function:

ImportReport::~ImportReport ( ) [virtual]

Definition at line 979 of file ImportFilter.cpp.

00980 {
00981 }

Member Function Documentation

kTraversal ImportReport::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

Definition at line 983 of file ImportFilter.cpp.

References cvs_out(), kContinueTraversal, and kTraversal.

00984 {
00985     cvs_out("Filtering \'%s\'...\n", fullpath);
00986     return kContinueTraversal;
00987 }

Here is the call graph for this function:

kTraversal ImportReport::ExitDirectory ( const char * fullpath ) [virtual]

Reimplemented from TraversalReport.

Definition at line 989 of file ImportFilter.cpp.

References kContinueTraversal, and kTraversal.

00990 {
00991     return kContinueTraversal;
00992 }

std::vector< UStr >& ImportReport::GetIgnoreList ( ) [inline]

Get the ignore list.

Definition at line 175 of file ImportFilter.h.

Referenced by list_add_type().

00175 { return m_ignlist; }

kTraversal ImportReport::OnAlias | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

Definition at line 1080 of file ImportFilter.cpp.

References kContinueTraversal, kFileIsAlias, kTraversal, and list_add_warning().

01082 {
01083     list_add_warning(warnings, kFileIsAlias, fullname);
01084     return kContinueTraversal;
01085 }

Here is the call graph for this function:

kTraversal ImportReport::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

Definition at line 1012 of file ImportFilter.cpp.

References kContinueTraversal, kSkipFile, and kTraversal.

01014 {
01015 #if defined(WIN32) || defined(TARGET_OS_MAC)
01016     if(stricmp(name, "CVS") == 0)
01017 #else
01018     if(strcmp(name, "CVS") == 0)
01019 #endif
01020         return kSkipFile;
01021
01022     return kContinueTraversal;
01023 }

kTraversal ImportReport::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [virtual]

Reimplemented from TraversalReport.

Definition at line 994 of file ImportFilter.cpp.

References err, kContinueTraversal, kFileMissing, kTraversal, and list_add_warning().

00995 {
00996     list_add_warning(warnings, kFileMissing, err);
00997     return kContinueTraversal;
00998 }

Here is the call graph for this function:

kTraversal ImportReport::OnFile | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

Definition at line 1025 of file ImportFilter.cpp.

References FileIsBinary(), FileIsText(), kContinueTraversal, kFileIsOK, kFileType, kFileTypeBin, kFileTypeText, kFileTypeUnicode, kTextBinTYPE, kTextIsBinary, kTextIsUnicode, kTextWrongSig, kTraversal, list_add_type(), list_add_warning(), MACSPEC, and UFSSpec.

01027 {
01028     int mac_type = 0;
01029     int mac_creator = 0;
01030
01031 #ifdef TARGET_OS_MAC
01032 #   define MACSPEC , &fsSpec
01033     GUSIFileSpec inspec(fullname);
01034     FInfo finfo;
01035     memcpy(&finfo, inspec.CatInfo()->Info().finderInfo, 2 * sizeof(OSType));
01036     mac_type = finfo.fdType;
01037     mac_creator = finfo.fdCreator;
01038     UFSSpec fsSpec = inspec;
01039 #else /* !TARGET_OS_MAC */
01040 #   define MACSPEC
01041 #endif /* !TARGET_OS_MAC */
01042
01043     kFileType newType = kFileTypeText;
01044     kTextBinTYPE filetype = FileIsText(name, fullpath MACSPEC);
01045
01046     if( kTextIsBinary == filetype || kTextWrongSig == filetype )
01047     {
01048         kTextBinTYPE bintype = FileIsBinary(name, fullpath MACSPEC);
01049         if( kFileIsOK != bintype )
01050         {
01051             list_add_warning(warnings, bintype, fullname);
01052         }
01053         else if( kTextWrongSig == filetype )
01054         {
01055             list_add_warning(warnings, filetype, fullname);
01056             filetype = kTextIsBinary;
01057             newType = kFileTypeBin;
01058         }
01059
01060         if( kFileIsOK == bintype )
01061         {
01062             newType = kFileTypeBin;
01063         }
01064     }
01065     else if( kTextIsUnicode == filetype )
01066     {
01067         newType = kFileTypeUnicode;
01068     }
01069     else if( kFileIsOK != filetype )
01070     {
01071         list_add_warning(warnings, filetype, fullname);
01072     }
01073
01074     // Add the type
01075     list_add_type(this, conflicts, newType, name, fullname, mac_type, mac_creator);
01076
01077     return kContinueTraversal;
01078 }

Here is the call graph for this function:

kTraversal ImportReport::OnIdle ( const char * fullpath ) [virtual]

Reimplemented from TraversalReport.

Definition at line 1000 of file ImportFilter.cpp.

References CProgress::HasAborted(), kContinueTraversal, kStopTraversal, kTraversal, m_progress, and CProgress::SetProgress().

01001 {
01002     if( m_progress.HasAborted() )
01003     {
01004         return kStopTraversal;
01005     }
01006
01007     m_progress.SetProgress(fullpath);
01008
01009     return kContinueTraversal;
01010 }

Here is the call graph for this function:

Member Data Documentation

ReportConflict*& ImportReport::conflicts [private]

Conflicts list Definition at line 166 of file ImportFilter.h.

std::vector< UStr > ImportReport::m_ignlist [private]

Ignore list Definition at line 167 of file ImportFilter.h.

Referenced by ImportReport().

CProgress ImportReport::m_progress [private]

Progress dialog to allow abort filtering Definition at line 169 of file ImportFilter.h.

Referenced by OnIdle().

ReportWarning*& ImportReport::warnings [private]

Warnings list Definition at line 165 of file ImportFilter.h.

The documentation for this class was generated from the following files:
  • common/ImportFilter.h
  • common/ImportFilter.cpp
Generated on Sat Aug 7 22:53:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CImportWarning Class Reference

CImportWarning Class Reference

#include <ImportFilterDlg.h>

Inheritance diagram for CImportWarning:

[legend]
Collaboration diagram for CImportWarning:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_WARNINGDESC }

Public Member Functions

CImportWarning (ReportWarning *warn, CWnd *pParent=NULL)

Public Attributes

CString | m_desc

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 94 of file ImportFilterDlg.h.
00094 { IDD = IDD_WARNINGDESC };

Constructor & Destructor Documentation

CImportWarning::CImportWarning | ( | ReportWarning * | warn,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 96 of file ImportFilterDlg.cpp.

References CStr, m_desc, and ReportWarning::PrintOut().

00097     : CHHelpDialog(CImportWarning::IDD, pParent)
00098 {
00099     CStr print;
00100     warn->PrintOut(print);
00101
00102     //{{AFX_DATA_INIT(CImportWarning)
00103     m_desc = print;
00104     //}}AFX_DATA_INIT
00105 }

Here is the call graph for this function:

Member Function Documentation

void CImportWarning::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 108 of file ImportFilterDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_WARNING_DESC, and m_desc.

00109 {
00110     CHHelpDialog::DoDataExchange(pDX);
00111     //{{AFX_DATA_MAP(CImportWarning)
00112     DDX_Text(pDX, IDC_WARNING_DESC, m_desc);
00113     //}}AFX_DATA_MAP
00114 }

Here is the call graph for this function:

void CImportWarning::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 126 of file ImportFilterDlg.cpp.

References IDC_WARNING_DESC, and IDH_IDC_WARNING_DESC.

00127 {
00128     SetCtrlHelpID(IDC_WARNING_DESC, IDH_IDC_WARNING_DESC);
00129 }

void CImportWarning::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 132 of file ImportFilterDlg.cpp.

References CHHelpSupport::ShowHelp().

00133 {
00134     ShowHelp();
00135 }

Here is the call graph for this function:

Member Data Documentation

CString CImportWarning::m_desc

Definition at line 95 of file ImportFilterDlg.h.

Referenced by CImportWarning(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/ImportFilterDlg.h
  • common/ImportFilterDlg.cpp
Generated on Sat Aug 7 22:53:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CInfoParserConsole Class Reference

CInfoParserConsole Class Reference

Class to parse protocols available (obtained using cvs info). More...

#include <CvsRootDlg.h>

Inheritance diagram for CInfoParserConsole:

[legend]
Collaboration diagram for CInfoParserConsole:

[legend]
List of all members.

Public Member Functions

CInfoParserConsole ()
virtual | ~CInfoParserConsole ()
virtual void | Parse (int launchRes)
const CvsProtocolList & | GetCvsProtocolList () const

Private Attributes

CvsProtocolList m_cvsProtocolList

Detailed Description

Class to parse protocols available (obtained using cvs info).

Definition at line 93 of file CvsRootDlg.h.

Constructor & Destructor Documentation

CInfoParserConsole::CInfoParserConsole ( )

Definition at line 109 of file CvsRootDlg.cpp.

00110 {
00111 }

CInfoParserConsole::~CInfoParserConsole ( ) [virtual]

Definition at line 113 of file CvsRootDlg.cpp.

00114 {
00115 }

Member Function Documentation

const CvsProtocolList & CInfoParserConsole::GetCvsProtocolList ( ) const

Get the CVS protocol list

Returns:
CVS protocol list
Definition at line 167 of file CvsRootDlg.cpp.

References CvsProtocolList, and m_cvsProtocolList.

Referenced by CCvsRootDlg::FillProtocolsComboBox().

00168 {
00169     return m_cvsProtocolList;
00170 }

void CInfoParserConsole::Parse ( int launchRes ) [virtual]

Virtual overridable to parse the result of browse command

Parameters:
launchRes The result of the command launch
Note:
Call default implementation after parsing is finished to clear the stored command output and store the launch result, the error output is not cleared however to allow further analysis

Implements CCvsRootConsole.

Definition at line 117 of file CvsRootDlg.cpp.

References getline(), m_cvsProtocolList, and CCvsRootConsole::Parse().

00118 {
00119     bool protocols = false;
00120
00121     string line;
00122
00123     while( getline(m_cvsOut, line) )
00124     {
00125         if( protocols )
00126         {
00127             stringstream stream;
00128             string protocol;
00129
00130             stream << line;
00131             stream >> protocol;
00132
00133             if( !protocol.empty() )
00134             {
00135                 string description;
00136
00137                 while( !stream.eof() )
00138                 {
00139                     string token;
00140                     stream >> token;
00141
00142                     if( !description.empty() )
00143                     {
00144                         description += " ";
00145                     }
00146
00147                     description += token;
00148                 }
00149
00150                 m_cvsProtocolList.insert(std::make_pair(protocol, description));
00151             }
00152         }
00153
00154         if( line.find("Available protocols:") != string::npos )
00155         {
00156             protocols = true;
00157         }
00158     }
00159
00160     CCvsRootConsole::Parse(launchRes);
00161 }

Here is the call graph for this function:

Member Data Documentation

CvsProtocolList CInfoParserConsole::m_cvsProtocolList [private]

Parsed CVS protocol list Definition at line 102 of file CvsRootDlg.h.

Referenced by GetCvsProtocolList(), and Parse().

The documentation for this class was generated from the following files:
  • common/CvsRootDlg.h
  • common/CvsRootDlg.cpp
Generated on Sat Aug 7 22:53:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CInit_MAIN Class Reference

CInit_MAIN Class Reference

#include <InitDlg.h>

Inheritance diagram for CInit_MAIN:

[legend]
Collaboration diagram for CInit_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_INIT_MAIN }

Public Member Functions

CInit_MAIN (bool forceRoot, const char *cvsroot)

Public Attributes

CButton | m_selCvsrootButton
CSmartComboBox m_cvsrootCombo
CButton | m_forceRootCheck
BOOL | m_forceRoot
CString | m_helpinit
CString | m_cvsroot

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnForceroot ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnSelcvsroot ()
BN_CLICKED message handler, select CVSROOT.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable controls.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 53 of file InitDlg.h.
00053 { IDD = IDD_INIT_MAIN };

Constructor & Destructor Documentation

CInit_MAIN::CInit_MAIN | ( | bool | forceRoot,
 |  | const char * | cvsroot
 | ) |

Definition at line 48 of file InitDlg.cpp.

References gOldCvsroots, m_cvsroot, m_cvsrootCombo, m_forceRoot, m_helpinit, and USmartCombo::SetItems().

00049     : CHHelpPropertyPage(CInit_MAIN::IDD)
00050 {
00051     m_forceRoot = forceRoot;
00052     m_cvsroot = cvsroot;
00053
00054     m_cvsrootCombo.SetItems(&gOldCvsroots);
00055
00056     m_helpinit = _T("If the CVSROOT is set to ""local"", "
00057         "the CVSROOT should be a Windows path (i.e. c:\\cvsroot). "
00058         "If the CVSROOT points on a remote machine, the path should be a Unix path "
00059         "(i.e. /fscvs/cvsroot : make sure you got the relevant security rights in "
00060         "order to create such a directory on the remote machine.");
00061 }

Here is the call graph for this function:

Member Function Documentation

void CInit_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 63 of file InitDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BROWSE_CVSROOT, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_HELP_INIT, m_cvsroot, m_cvsrootCombo, m_forceRoot, m_forceRootCheck, m_helpinit, and m_selCvsrootButton.

00064 {
00065     CHHelpPropertyPage::DoDataExchange(pDX);
00066     //{{AFX_DATA_MAP(CInit_MAIN)
00067     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00068     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00069     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00070     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00071     DDX_Text(pDX, IDC_HELP_INIT, m_helpinit);
00072     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00073     //}}AFX_DATA_MAP
00074
00075     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00076
00077     if( m_forceRoot )
00078     {
00079         DDV_MinChars(pDX, m_cvsroot, 1);
00080     }
00081
00082     if( !pDX->m_bSaveAndValidate )
00083     {
00084         m_selCvsrootButton.EnableWindow(m_forceRoot);
00085     }
00086 }

Here is the call graph for this function:

void CInit_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 113 of file InitDlg.cpp.

References IDC_BROWSE_CVSROOT, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_HELP_INIT, IDH_IDC_BROWSE_CVSROOT, IDH_IDC_CVSROOT, IDH_IDC_FORCE_CVSROOT, IDH_IDC_HELP_INIT, and CHHelpSupport::SetCtrlHelpID().

00114 {
00115     SetCtrlHelpID(IDC_HELP_INIT,        IDH_IDC_HELP_INIT);
00116     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
00117     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
00118     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
00119 }

Here is the call graph for this function:

void CInit_MAIN::OnForceroot ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 122 of file InitDlg.cpp.

References m_cvsrootCombo, m_forceRootCheck, and m_selCvsrootButton.

00123 {
00124     const BOOL enable = m_forceRootCheck.GetCheck();
00125
00126     m_selCvsrootButton.EnableWindow(enable);
00127     m_cvsrootCombo.EnableWindow(enable);
00128 }

BOOL CInit_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 101 of file InitDlg.cpp.

References CHHelpPropertyPage::OnInitDialog(), and PostGotoDlgCtrl().

00102 {
00103     CHHelpPropertyPage::OnInitDialog();
00104
00105     // Extra initialization
00106     OnForceroot();
00107     PostGotoDlgCtrl(this, m_forceRoot ? (CWnd*)&m_cvsrootCombo : (CWnd*)&m_forceRootCheck);
00108
00109     return TRUE;  // return TRUE unless you set the focus to a control
00110                   // EXCEPTION: OCX Property Pages should return FALSE
00111 }

Here is the call graph for this function:

void CInit_MAIN::OnSelcvsroot ( ) [protected]

BN_CLICKED message handler, select CVSROOT.

Definition at line 131 of file InitDlg.cpp.

References CompatGetCvsRoot(), CStr, CSmartComboBox::GetWindowText(), and m_cvsrootCombo.

00132 {
00133     CString strCvsroot;
00134     m_cvsrootCombo.GetWindowText(strCvsroot);
00135
00136     CStr cvsroot(strCvsroot);
00137     if( CompatGetCvsRoot(cvsroot) )
00138     {
00139         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00140     }
00141 }

Here is the call graph for this function:

Member Data Documentation

CString CInit_MAIN::m_cvsroot

Definition at line 59 of file InitDlg.h.

Referenced by CInit_MAIN(), CompatGetInit(), and DoDataExchange().

CSmartComboBox CInit_MAIN::m_cvsrootCombo

Definition at line 55 of file InitDlg.h.

Referenced by CInit_MAIN(), DoDataExchange(), OnForceroot(), and OnSelcvsroot().

BOOL CInit_MAIN::m_forceRoot

Definition at line 57 of file InitDlg.h.

Referenced by CInit_MAIN(), CompatGetInit(), and DoDataExchange().

CButton CInit_MAIN::m_forceRootCheck

Definition at line 56 of file InitDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

CString CInit_MAIN::m_helpinit

Definition at line 58 of file InitDlg.h.

Referenced by CInit_MAIN(), and DoDataExchange().

CButton CInit_MAIN::m_selCvsrootButton

Definition at line 54 of file InitDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

The documentation for this class was generated from the following files:
  • common/InitDlg.h
  • common/InitDlg.cpp
Generated on Sat Aug 7 22:53:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: irciiAttrCvt Class Reference

irciiAttrCvt Class Reference

#include <CTCP2Parse.hpp>

Inheritance diagram for irciiAttrCvt:

[legend]
Collaboration diagram for irciiAttrCvt:

[legend]
List of all members.

Public Member Functions

void | ircii2ctcp (std::string *in)

Static Private Attributes

const char | tokens [5]

Member Function Documentation

void irciiAttrCvt::ircii2ctcp ( std::string * in )

Definition at line 507 of file CTCP2Parse.cpp.

References CBOLD, CCTCP2, CREV, CSTOP, CUNDR, and tokens.

Referenced by CTCP2Parse::ParseIt().

00508 {
00509     int pos, bold = 0, under = 0, rev = 0;
00510
00511     pos = in->find_first_of(tokens);
00512
00513     while (pos != std::string::npos)
00514     {
00515         switch (in->at(pos))
00516         {
00517         case CBOLD:
00518             bold = !bold;
00519             in->replace(pos, 1,
00520                 std::string("") + CCTCP2 + 'B' + (bold?'+':'-') + CCTCP2);
00521             pos += 3;   // consume the additions
00522             break;
00523
00524         case CUNDR:
00525             under = !under;
00526             in->replace(pos, 1,
00527                 std::string("") + CCTCP2 + 'U' + (under?'+':'-') + CCTCP2);
00528             pos += 3;   // consume the additions
00529             break;
00530
00531         case CREV:
00532             rev = !rev;
00533             in->replace(pos, 1,
00534                 std::string("") + CCTCP2 + 'V' + (rev?'+':'-') + CCTCP2);
00535             pos += 3;   // consume the additions
00536             break;
00537
00538         case CSTOP:
00539             bold = under = rev = 0;
00540             in->replace(pos, 1, std::string("") + CCTCP2 + 'N' + CCTCP2);
00541             pos += 2;   // consume the additions
00542         }
00543         pos = in->find_first_of(tokens,++pos);
00544     }
00545 }

Member Data Documentation

const char irciiAttrCvt::tokens [static, private]

Initial value:

 {
     (char)2 ,  (char)31 ,  (char)22 ,  (char)15 , 0
}
Definition at line 502 of file CTCP2Parse.cpp.

Referenced by ircii2ctcp().

The documentation for this class was generated from the following files:
  • common/CTCP2Parse.hpp
  • common/CTCP2Parse.cpp
Generated on Sat Aug 7 22:53:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ItemDisplayInfo Class Reference

ItemDisplayInfo Class Reference

Class to hold and support data display (e.g. sorting or storing the result for next display). More...

#include <ItemListDlg.h>

Collaboration diagram for ItemDisplayInfo:

[legend]
List of all members.

Public Member Functions

void | Create (const string &item, const ItemRowInfo &rowInfo)
const string & | GetItem () const
Get item text.
const string & | GetDescription () const
Get the description text.
const string & | GetDescriptionEx () const
Get the extended description text.
const ItemRowInfo & | GetRowInfo () const
Get the row info.

Private Attributes

string | m_item
string | m_description
string | m_descriptionEx
ItemRowInfo m_rowInfo

Detailed Description

Class to hold and support data display (e.g. sorting or storing the result for next display).

Definition at line 168 of file ItemListDlg.h.

Member Function Documentation

void ItemDisplayInfo::Create | ( | const string & | item,
 |  | const ItemRowInfo & | rowInfo
 | ) |

Create display info

Parameters:
item | Item
rowInfo | Row info for the item
Definition at line 685 of file ItemListDlg.cpp.

References FormatItemDescription(), ItemRowInfo::m_description, m_description, ItemRowInfo::m_descriptionEx, m_descriptionEx, m_item, and m_rowInfo.

Referenced by CItemListDlg::DisplayItems().

00686 {
00687     m_item = item;
00688     m_description = FormatItemDescription(rowInfo.m_description);
00689     m_descriptionEx = FormatItemDescription(rowInfo.m_descriptionEx);
00690
00691     m_rowInfo = rowInfo;
00692 }

Here is the call graph for this function:

const string & ItemDisplayInfo::GetDescription ( ) const

Get the description text.

Definition at line 701 of file ItemListDlg.cpp.

References m_description.

Referenced by CItemListDlg::CompareItems(), CItemListDlg::DisplayItems(), and CItemListDlg::GetImageForItem().

00702 {
00703     return m_description;
00704 }

const string & ItemDisplayInfo::GetDescriptionEx ( ) const

Get the extended description text.

Definition at line 707 of file ItemListDlg.cpp.

References m_descriptionEx.

Referenced by CItemListDlg::CompareItems(), and CItemListDlg::DisplayItems().

00708 {
00709     return m_descriptionEx;
00710 }

const string & ItemDisplayInfo::GetItem ( ) const

Get item text.

Definition at line 695 of file ItemListDlg.cpp.

References m_item.

Referenced by CItemListDlg::CompareItems(), CItemListDlg::DisplayItems(), CItemListDlg::DoDataExchange(), and CItemListDlg::GetImageForItem().

00696 {
00697     return m_item;
00698 }

const ItemRowInfo & ItemDisplayInfo::GetRowInfo ( ) const

Get the row info.

Definition at line 713 of file ItemListDlg.cpp.

References m_rowInfo.

Referenced by CItemListDlg::DoDataExchange().

00714 {
00715     return m_rowInfo;
00716 }

Member Data Documentation

string ItemDisplayInfo::m_description [private]

Description text Definition at line 173 of file ItemListDlg.h.

Referenced by Create(), and GetDescription().

string ItemDisplayInfo::m_descriptionEx [private]

Extended description text Definition at line 174 of file ItemListDlg.h.

Referenced by Create(), and GetDescriptionEx().

string ItemDisplayInfo::m_item [private]

Item text Definition at line 172 of file ItemListDlg.h.

Referenced by Create(), and GetItem().

ItemRowInfo ItemDisplayInfo::m_rowInfo [private]

Original row data after parsing Definition at line 176 of file ItemListDlg.h.

Referenced by Create(), and GetRowInfo().

The documentation for this class was generated from the following files:
  • common/ItemListDlg.h
  • common/ItemListDlg.cpp
Generated on Sat Aug 7 22:53:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CItemListConsole Class Reference

CItemListConsole Class Reference

Base class for item list console. More...

#include <ItemListDlg.h>

Inheritance diagram for CItemListConsole:

[legend]
Collaboration diagram for CItemListConsole:

[legend]
List of all members.

Public Member Functions

CItemListConsole ()
virtual | ~CItemListConsole ()
virtual long | cvs_out (const char *txt, long len)
virtual long | cvs_err (const char *txt, long len)
virtual void | Parse (int launchRes)=0L
int | GetLaunchRes () const
Get the result of the command launch.
stringstream & | GetCvsErr ()
Get the error result.
const ItemList & | GetItemList () const
Get the parsing result.

Protected Attributes

ItemList m_itemList
stringstream | m_cvsOut
stringstream | m_cvsErr
int m_launchRes

Detailed Description

Base class for item list console.

Definition at line 88 of file ItemListDlg.h.

Constructor & Destructor Documentation

CItemListConsole::CItemListConsole ( )

Definition at line 92 of file ItemListDlg.cpp.

References m_launchRes.

00093 {
00094     m_launchRes = 0;
00095 }

CItemListConsole::~CItemListConsole ( ) [virtual]

Definition at line 97 of file ItemListDlg.cpp.

References m_itemList.

00098 {
00099     m_itemList.clear();
00100 }

Member Function Documentation

long CItemListConsole::cvs_err | ( | const char * | txt,
 |  | long | len
 | ) | [virtual]

Stderr handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 108 of file ItemListDlg.cpp.

References cvs_errstr(), and m_cvsErr.

00109 {
00110     cvs_errstr(txt, len);
00111     m_cvsErr << txt;
00112
00113     return len;
00114 }

Here is the call graph for this function:

long CItemListConsole::cvs_out | ( | const char * | txt,
 |  | long | len
 | ) | [virtual]

Stdout handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 102 of file ItemListDlg.cpp.

References m_cvsOut.

00103 {
00104     m_cvsOut << txt;
00105     return len;
00106 }

stringstream & CItemListConsole::GetCvsErr ( )

Get the error result.

Definition at line 135 of file ItemListDlg.cpp.

References m_cvsErr.

00136 {
00137     return m_cvsErr;
00138 }

const ItemList & CItemListConsole::GetItemList ( ) const

Get the parsing result.

Definition at line 141 of file ItemListDlg.cpp.

References ItemList, and m_itemList.

00142 {
00143     return m_itemList;
00144 }

int CItemListConsole::GetLaunchRes ( ) const

Get the result of the command launch.

Definition at line 129 of file ItemListDlg.cpp.

References m_launchRes.

00130 {
00131     return m_launchRes;
00132 }

void CItemListConsole::Parse ( int launchRes ) [pure virtual]

Virtual overridable to parse the result of browse command

Parameters:
launchRes The result of the command launch
Note:
Call default implementation after parsing is finished to clear the stored command output and store the launch result, the error output is not cleared however to allow further analysis

Implemented in CTagParserConsole, CModuleParserConsole, and CListParserConsole.

Definition at line 122 of file ItemListDlg.cpp.

References m_cvsOut, and m_launchRes.

Referenced by LaunchItemListCommand(), CListParserConsole::Parse(), CModuleParserConsole::Parse(), and CTagParserConsole::Parse().

00123 {
00124     m_launchRes = launchRes;
00125     m_cvsOut.clear();
00126 }

Member Data Documentation

stringstream CItemListConsole::m_cvsErr [protected]

Cvs command result (stderr) used for parsing Definition at line 99 of file ItemListDlg.h.

Referenced by cvs_err(), and GetCvsErr().

stringstream CItemListConsole::m_cvsOut [protected]

Cvs command result (stdout) used for parsing Definition at line 98 of file ItemListDlg.h.

Referenced by cvs_out(), and Parse().

ItemList CItemListConsole::m_itemList [protected]

Parsing result Definition at line 97 of file ItemListDlg.h.

Referenced by GetItemList(), and ~CItemListConsole().

int CItemListConsole::m_launchRes [protected]

The result of the command launch Definition at line 100 of file ItemListDlg.h.

Referenced by CItemListConsole(), GetLaunchRes(), and Parse().

The documentation for this class was generated from the following files:
  • common/ItemListDlg.h
  • common/ItemListDlg.cpp
Generated on Sat Aug 7 22:53:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CItemListDlg Class Reference

CItemListDlg Class Reference

#include <ItemListDlg.h>

Inheritance diagram for CItemListDlg:

[legend]
Collaboration diagram for CItemListDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_ITEM_LIST }

Public Member Functions

CItemListDlg (const MultiFiles *mf, const char *item, kItemListDlg type, ItemList &itemList, const ListPath *listPath, bool forceRoot, const char *cvsroot, const char *rev, const char *date, CWnd *pParent=NULL)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
PreTranslateMessage virtual override, detects the F5 key pressed and refreshes the display.

Public Attributes

CButton | m_selCvsrootButton
CSmartComboBox m_cvsrootCombo
CButton | m_forceRootCheck
CSmartComboBox m_autoRefreshCombo
CButton | m_selectionButton
CButton | m_cancelButton
CButton | m_browseTagButton
CEdit | m_itemEdit
CButton | m_refreshButton
CButton | m_okButton
CButton | m_browseReadFromButton
CStatic | m_itemLabelStatic
CButton | m_hasDateCheck
CButton | m_hasRevCheck
CSmartComboBox m_dateCombo
CSmartComboBox m_revCombo
CButton | m_optionCheck
CListCtrl | m_itemListCtrl
CSmartComboBox m_readFromCombo
CString | m_readFrom
CString | m_item
BOOL | m_option
BOOL | m_hasRev
CString | m_rev
CString | m_date
BOOL | m_hasDate
BOOL | m_forceRoot
CString | m_cvsroot
ListPath m_listPath

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnRefresh ()
BN_CLICKED message handler, re-reads the data.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initializes controls and triggers data reading if necessary.
virtual void | OnCancel ()
OnCancel virtual override, stop CVS command or cancel dialog.
afx_msg void | OnOption ()
BN_CLICKED message handler, initialize the related controls and sort settings.
afx_msg void | OnCheckrev ()
BN_CLICKED message handler, enable revision combo box.
afx_msg void | OnCheckdate ()
BN_CLICKED message handler, enable date combo box.
afx_msg void | OnBrowseTag ()
BN_CLICKED message handler, browse for tag/branch.
virtual void | OnOK ()
OnOK virtual override, store the persistent data.
afx_msg void | OnDblclkItemlist (NMHDR *pNMHDR, LRESULT *pResult)
NM_DBLCLK message handler, select the item and close dialog for tag/modules browser or navigate directories for directory and files listing.
afx_msg void | OnItemchangedItemlist (NMHDR *pNMHDR, LRESULT *pResult)
LVN_ITEMCHANGED message handler, update the item edit box value as selection is changing.
afx_msg void | OnColumnclickItemlist (NMHDR *pNMHDR, LRESULT *pResult)
LVN_COLUMNCLICK message handler, sort items in response to column click.
afx_msg void | OnDestroy ()
WM_DESTROY message handler, release any memory allocated.
afx_msg void | OnForceroot ()
BN_CLICKED message handler, enable related controls.
afx_msg void | OnBrowseReadfrom ()
BN_CLICKED message handler, browse for file/directory.
afx_msg void | OnSelection ()
BN_CLICKED message handler, browse selection info.
afx_msg void | OnSelchangeAutoRefresh ()
CBN_SELCHANGE message handler, update auto-refresh settings.
afx_msg void | OnSelcvsroot ()
BN_CLICKED message handler, select CVSROOT.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Types

enum {
kItemImgBlank,
kItemImgUpDir,
kItemImgDir,
kItemImgFile,
kItemImgModule,
kItemImgRevision,
kItemImgBranch,
kItemImgBranchAndRevision
}
Images enum. More...

Private Member Functions

virtual void | InitHelpID ()
void | InitListCtrl (const kItemDisplayType displayType)
void | InitOptionCtrls ()
void | EnableControls (BOOL enable)
bool EnableDateRev ()
bool CheckSettings ()
BOOL | PostClickRefresh ()
bool | SelectItem (const char *item)
void | DisplayItems (const ItemList &itemList, const int launchRes, stringstream *cvsErr=NULL, const bool showUpDir=true)
int | GetImageForItem (kItemListDlg type, bool option, const ItemDisplayInfo *displayInfo)
void | DeleteAllItems ()
void | SortItems (int column, bool asc, kItemListDlg type, bool option)

Static Private Member Functions

int CALLBACK | CompareItems (LPARAM itemData1, LPARAM itemData2, LPARAM lParam)

Private Attributes

const MultiFiles * | m_mf
kItemListDlg m_type
ItemList & m_itemList
bool m_cvsStopped
CImageList | m_itemsImageList
bool m_sortAsc
int m_sortColumn
CSortHeaderCtrl m_headerCtrl

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 206 of file ItemListDlg.h.
00206 { IDD = IDD_ITEM_LIST };

anonymous enum [private]

Images enum.

Enumeration values:
kItemImgBlank | Blank
kItemImgUpDir | Go one directory up
kItemImgDir | Directory
kItemImgFile | File
kItemImgModule | Module
kItemImgRevision | Revision
kItemImgBranch | Branch
kItemImgBranchAndRevision | Branch and revision
Definition at line 297 of file ItemListDlg.h.
00298     {
00299         kItemImgBlank,
00300         kItemImgUpDir,
00301         kItemImgDir,
00302         kItemImgFile,
00303         kItemImgModule,
00304         kItemImgRevision,
00305         kItemImgBranch,
00306         kItemImgBranchAndRevision,
00307     };

Constructor & Destructor Documentation

CItemListDlg::CItemListDlg | ( | const MultiFiles * | mf,
 |  | const char * | item,
 |  | kItemListDlg | type,
 |  | ItemList & | itemList,
 |  | const ListPath * | listPath,
 |  | bool | forceRoot,
 |  | const char * | cvsroot,
 |  | const char * | rev,
 |  | const char * | date,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 865 of file ItemListDlg.cpp.

References gDateNames, gItemListModuleList, gItemListTagRecurse, gOldCvsroots, gRevNames, ItemList, kItemListModule, kItemListTag, ListPath, m_cvsroot, m_cvsrootCombo, m_cvsStopped, m_date, m_dateCombo, m_forceRoot, m_hasDate, m_hasRev, m_item, m_listPath, m_option, m_readFrom, m_rev, m_revCombo, m_sortAsc, m_sortColumn, m_type, and USmartCombo::SetItems().

00870                            : m_mf(mf), m_itemList(itemList),
00871                            m_readFromCombo(USmartCombo::AutoDropWidth), m_autoRefreshCombo(USmartCombo::AutoDropWidth),
00872                            CHHelpDialog(CItemListDlg::IDD, pParent)
00873 {
00874     //{{AFX_DATA_INIT(CItemListDlg)
00875     m_readFrom = _T("");
00876     m_item = _T("");
00877     m_option = FALSE;
00878     m_hasRev = FALSE;
00879     m_rev = _T("");
00880     m_date = _T("");
00881     m_hasDate = FALSE;
00882     m_forceRoot = FALSE;
00883     m_cvsroot = _T("");
00884     //}}AFX_DATA_INIT
00885
00886     m_item = item;
00887
00888     m_type = type;
00889
00890     switch( m_type )
00891     {
00892     case kItemListTag:
00893         m_option = (bool)gItemListTagRecurse;
00894         break;
00895     case kItemListModule:
00896         m_option = (bool)gItemListModuleList;
00897         break;
00898     default:
00899         // Nothing to do
00900         break;
00901     }
00902
00903     if( listPath )
00904     {
00905         m_listPath = *listPath;
00906     }
00907
00908     m_cvsStopped = false;
00909
00910     m_rev = rev;
00911     m_date = date;
00912
00913     m_sortAsc = false;
00914     m_sortColumn = 0;
00915
00916     m_forceRoot = forceRoot;
00917     m_cvsroot = cvsroot;
00918
00919     m_revCombo.SetItems(&gRevNames);
00920     m_dateCombo.SetItems(&gDateNames);
00921     m_cvsrootCombo.SetItems(&gOldCvsroots);
00922 }

Here is the call graph for this function:

Member Function Documentation

bool CItemListDlg::CheckSettings ( ) [private]

Verify that the settings are correct to retrieve items

Returns:
true if the settings are correct, false otherwise
Definition at line 1431 of file ItemListDlg.cpp.

References BUTTONTITLE_OK, kCvsAlertWarningIcon, m_dateCombo, m_hasDateCheck, m_hasRevCheck, m_revCombo, and NULL.

Referenced by OnRefresh().

01432 {
01433     if( m_hasRevCheck.IsWindowEnabled() && m_hasRevCheck.GetCheck() && !m_revCombo.GetWindowTextLength() )
01434     {
01435         CvsAlert(kCvsAlertWarningIcon,
01436             "Invalid revision.", "Please enter more than 1 character.",
01437             BUTTONTITLE_OK, NULL).ShowAlert();
01438
01439         GotoDlgCtrl(&m_revCombo);
01440         return false;
01441     }
01442
01443     if( m_hasDateCheck.IsWindowEnabled() && m_hasDateCheck.GetCheck() && !m_dateCombo.GetWindowTextLength() )
01444     {
01445         CvsAlert(kCvsAlertWarningIcon,
01446             "Invalid date.", "Please enter more than 1 character.",
01447             BUTTONTITLE_OK, NULL).ShowAlert();
01448
01449         GotoDlgCtrl(&m_dateCombo);
01450         return false;
01451     }
01452
01453     return true;
01454 }

int CALLBACK CItemListDlg::CompareItems | ( | LPARAM | itemData1,
 |  | LPARAM | itemData2,
 |  | LPARAM | lParam
 | ) | [static, private]

Callback method used for sorting of items in the list control

Parameters:
itemData1 | ItemDisplayInfo* of the first element
itemData2 | ItemDisplayInfo* of the second element
lParam | CompareInfo* Sort settings
Returns:
1, -1 or 0 depending on the sort settings
Definition at line 727 of file ItemListDlg.cpp.

References GetDateTime(), ItemDisplayInfo::GetDescription(), ItemDisplayInfo::GetDescriptionEx(), ItemDisplayInfo::GetItem(), kItemListModule, kItemListTag, CItemListDlg::CompareInfo::m_asc, CItemListDlg::CompareInfo::m_column, CItemListDlg::CompareInfo::m_option, CItemListDlg::CompareInfo::m_type, STR_ITEMLIST_DIR, and STR_ITEMLIST_UP_DIR.

Referenced by SortItems().

00728 {
00729     int res = 0;
00730
00731     const CompareInfo* info = (CompareInfo*)lParam;
00732     if( info )
00733     {
00734         ItemDisplayInfo* displayInfo1 = (ItemDisplayInfo*)itemData1;
00735         ItemDisplayInfo* displayInfo2 = (ItemDisplayInfo*)itemData2;
00736
00737         if( displayInfo1 && displayInfo2 )
00738         {
00739             switch( info->m_type )
00740             {
00741             case kItemListTag:
00742                 switch( info->m_column )
00743                 {
00744                 case 0:
00745                     res = stricmp(displayInfo1->GetItem().c_str(), displayInfo2->GetItem().c_str());
00746                     break;
00747                 case 1:
00748                     res = stricmp(displayInfo1->GetDescription().c_str(), displayInfo2->GetDescription().c_str());
00749                     break;
00750                 default:
00751                     ASSERT(FALSE); // should not come here
00752                     break;
00753                 }
00754                 break;
00755             case kItemListModule:
00756                 if( info->m_option )
00757                 {
00758                     if( strcmp(displayInfo1->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
00759                     {
00760                         res = info->m_asc ? 1 : -1;
00761                     }
00762                     else if( strcmp(displayInfo2->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
00763                     {
00764                         res = info->m_asc ? -1 : 1;
00765                     }
00766                     else
00767                     {
00768                         bool isDir1 = strcmp(displayInfo1->GetDescription().c_str(), STR_ITEMLIST_DIR) == 0;
00769                         bool isDir2 = strcmp(displayInfo2->GetDescription().c_str(), STR_ITEMLIST_DIR) == 0;
00770
00771                         if( isDir1 && !isDir2 )
00772                         {
00773                             res = info->m_asc ? 1 : -1;
00774                         }
00775                         else if( !isDir1 && isDir2 )
00776                         {
00777                             res = info->m_asc ? -1 : 1;
00778                         }
00779                         else if( isDir1 && isDir2 )
00780                         {
00781                             res = stricmp(displayInfo1->GetItem().c_str(), displayInfo2->GetItem().c_str());
00782                             if( info->m_column != 0 )
00783                             {
00784                                 if( info->m_asc )
00785                                 {
00786                                     res *= -1;
00787                                 }
00788                             }
00789                         }
00790                         else
00791                         {
00792                             switch( info->m_column )
00793                             {
00794                             case 0:
00795                                 res = stricmp(displayInfo1->GetItem().c_str(), displayInfo2->GetItem().c_str());
00796                                 break;
00797                             case 1:
00798                                 res = stricmp(displayInfo1->GetDescription().c_str(), displayInfo2->GetDescription().c_str());
00799                                 break;
00800                             case 2:
00801                                 {
00802                                     const time_t time1 = GetDateTime(displayInfo1->GetDescriptionEx().c_str());
00803                                     const time_t time2 = GetDateTime(displayInfo2->GetDescriptionEx().c_str());
00804
00805                                     if( time1 != (time_t)-1 && time2 != (time_t)-1 )
00806                                     {
00807                                         res = time1 < time2 ? -1 : (time1 > time2 ? 1 : 0);
00808                                     }
00809                                     else
00810                                     {
00811                                         res = stricmp(displayInfo1->GetDescriptionEx().c_str(), displayInfo2->GetDescriptionEx().c_str());
00812                                     }
00813                                 }
00814                                 break;
00815                             default:
00816                                 ASSERT(FALSE); // should not come here
00817                                 break;
00818                             }
00819                         }
00820                     }
00821                 }
00822                 else
00823                 {
00824                     switch( info->m_column )
00825                     {
00826                     case 0:
00827                         res = stricmp(displayInfo1->GetItem().c_str(), displayInfo2->GetItem().c_str());
00828                         break;
00829                     case 1:
00830                         res = stricmp(displayInfo1->GetDescription().c_str(), displayInfo2->GetDescription().c_str());
00831                         break;
00832                     case 2:
00833                         res = stricmp(displayInfo1->GetDescriptionEx().c_str(), displayInfo2->GetDescriptionEx().c_str());
00834                         break;
00835                     default:
00836                         ASSERT(FALSE); // should not come here
00837                         break;
00838                     }
00839                 }
00840
00841                 break;
00842             default:
00843                 ASSERT(FALSE);  // unknown type
00844                 break;
00845             }
00846         }
00847     }
00848
00849     if( res )
00850     {
00851         if( info->m_asc )
00852         {
00853             res *= -1;
00854         }
00855     }
00856
00857     return res;
00858 }

Here is the call graph for this function:

void CItemListDlg::DeleteAllItems ( ) [private]

Remove all items and release associated memory held in Item Data of the list control Definition at line 1637 of file ItemListDlg.cpp.

References m_itemListCtrl.

Referenced by InitListCtrl(), and OnDestroy().

01638 {
01639     for(int nIndex = 0; nIndex < m_itemListCtrl.GetItemCount(); nIndex++)
01640     {
01641         ItemDisplayInfo* displayInfo = (ItemDisplayInfo*)m_itemListCtrl.GetItemData(nIndex);
01642         delete displayInfo;
01643     }
01644
01645     m_itemListCtrl.DeleteAllItems();
01646 }

void CItemListDlg::DisplayItems | ( | const ItemList & | itemList,
 |  | const int | launchRes,
 |  | stringstream * | cvsErr = NULL,
 |  | const bool | showUpDir = true
 | ) | [private]

Display items in the list

Parameters:
itemList | List of items to display
launchRes | Command launch result
cvsErr | Command error stream, can be NULL
showUpDir | Set to true to show the up-dir(..) in the list if appropriate
Definition at line 1463 of file ItemListDlg.cpp.

References _i18n, ItemDisplayInfo::Create(), ItemDisplayInfo::GetDescription(), ItemDisplayInfo::GetDescriptionEx(), GetImageForItem(), ItemDisplayInfo::GetItem(), getline(), InitListCtrl(), ItemList, kItemDisplayInfo, kItemImgBlank, kItemListModule, kItemListTag, m_cvsStopped, ItemRowInfo::m_description, m_itemListCtrl, m_listPath, m_optionCheck, m_type, NULL, STR_ITEMLIST_DIR, and STR_ITEMLIST_UP_DIR.

Referenced by OnRefresh().

01464 {
01465     if( itemList.size() == 0 )
01466     {
01467         if( !m_cvsStopped )
01468         {
01469             if( launchRes == 0 )
01470             {
01471                 // Show the info if the modules file doesn't contain any modules
01472                 if( kItemListModule == m_type && !m_optionCheck.GetCheck() )
01473                 {
01474                     InitListCtrl(kItemDisplayInfo);
01475                     m_itemListCtrl.InsertItem(0, _i18n("Modules file doesn't contain any modules definitions"), kItemImgBlank);
01476                     m_itemListCtrl.EnableWindow(FALSE);
01477                 }
01478             }
01479             else if( cvsErr )
01480             {
01481                 InitListCtrl(kItemDisplayInfo);
01482
01483                 // Show the error in the list control
01484                 m_itemListCtrl.InsertItem(0, _i18n("Command failed:"), kItemImgBlank);
01485
01486                 string line;
01487                 while( getline(*cvsErr, line) )
01488                 {
01489                     m_itemListCtrl.InsertItem(m_itemListCtrl.GetItemCount(), line.c_str(), kItemImgBlank);
01490                 }
01491
01492                 m_itemListCtrl.EnableWindow(FALSE);
01493             }
01494         }
01495     }
01496     else
01497     {
01498         // Insert the items
01499         ItemList::const_iterator it = itemList.begin();
01500         while( it != itemList.end() )
01501         {
01502             ItemDisplayInfo* displayInfo = new ItemDisplayInfo;
01503             if( displayInfo )
01504             {
01505                 displayInfo->Create((*it).first, (*it).second);
01506
01507                 const int itemIndex = m_itemListCtrl.InsertItem(m_itemListCtrl.GetItemCount(), displayInfo->GetItem().c_str());
01508                 if( itemIndex > -1 )
01509                 {
01510                     if( kItemListTag == m_type || kItemListModule == m_type )
01511                     {
01512                         m_itemListCtrl.SetItemText(itemIndex, 1, displayInfo->GetDescription().c_str());
01513                     }
01514
01515                     if( kItemListModule == m_type )
01516                     {
01517                         m_itemListCtrl.SetItemText(itemIndex, 2, displayInfo->GetDescriptionEx().c_str());
01518                     }
01519
01520                     if( !m_itemListCtrl.SetItemData(itemIndex, (DWORD)displayInfo) )
01521                     {
01522                         delete displayInfo;
01523                     }
01524
01525                     const int image = GetImageForItem(m_type, m_optionCheck.GetCheck() != 0, displayInfo);
01526                     if( image > -1 )
01527                     {
01528                         m_itemListCtrl.SetItem(itemIndex, -1, LVIF_IMAGE, NULL, image, 0, 0, 0);
01529                     }
01530                 }
01531                 else
01532                 {
01533                     delete displayInfo;
01534                 }
01535             }
01536
01537             it++;
01538         }
01539     }
01540
01541     if( showUpDir && kItemListModule == m_type && m_optionCheck.GetCheck() && !m_listPath.empty() )
01542     {
01543         // Insert the ".." to move one level up in the directories tree
01544         ItemDisplayInfo* displayInfo = new ItemDisplayInfo;
01545         if( displayInfo )
01546         {
01547             ItemRowInfo rowInfo;
01548             rowInfo.m_description.insert(STR_ITEMLIST_DIR);
01549
01550             displayInfo->Create(string(STR_ITEMLIST_UP_DIR), rowInfo);
01551
01552             const int itemIndex = m_itemListCtrl.InsertItem(0, displayInfo->GetItem().c_str());
01553             if( itemIndex > -1 )
01554             {
01555                 m_itemListCtrl.SetItemText(itemIndex, 1, displayInfo->GetDescription().c_str());
01556
01557                 if( !m_itemListCtrl.SetItemData(itemIndex, (DWORD)displayInfo) )
01558                 {
01559                     delete displayInfo;
01560                 }
01561
01562                 const int image = GetImageForItem(m_type, m_optionCheck.GetCheck() != 0, displayInfo);
01563                 if( image > -1 )
01564                 {
01565                     m_itemListCtrl.SetItem(itemIndex, -1, LVIF_IMAGE, NULL, image, 0, 0, 0);
01566                 }
01567             }
01568             else
01569             {
01570                 delete displayInfo;
01571             }
01572         }
01573     }
01574 }

Here is the call graph for this function:

void CItemListDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 925 of file ItemListDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpDialog::DoDataExchange(), ItemDisplayInfo::GetItem(), ItemDisplayInfo::GetRowInfo(), IDC_AUTO_REFRESH, IDC_BROWSE_CVSROOT, IDC_BROWSE_READ_FROM, IDC_BROWSE_SELECTION, IDC_BROWSE_TAG, IDC_CVSROOT, IDC_DATE, IDC_FORCE_CVSROOT, IDC_HAS_DATE, IDC_HAS_REV, IDC_ITEM, IDC_ITEM_LABEL, IDC_ITEM_LIST, IDC_ITEM_LIST_OPTION, IDC_READ_FROM, IDC_REFRESH_ITEMS, IDC_REV_TAG, m_autoRefreshCombo, m_browseReadFromButton, m_browseTagButton, m_cancelButton, m_cvsroot, m_cvsrootCombo, m_date, m_dateCombo, m_forceRoot, m_forceRootCheck, m_hasDate, m_hasDateCheck, m_hasRev, m_hasRevCheck, m_item, m_itemEdit, m_itemLabelStatic, m_itemList, m_itemListCtrl, m_okButton, m_option, m_optionCheck, m_readFrom, m_readFromCombo, m_refreshButton, m_rev, m_revCombo, m_selCvsrootButton, and m_selectionButton.

00926 {
00927     CHHelpDialog::DoDataExchange(pDX);
00928     //{{AFX_DATA_MAP(CItemListDlg)
00929     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00930     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00931     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00932     DDX_Control(pDX, IDC_AUTO_REFRESH, m_autoRefreshCombo);
00933     DDX_Control(pDX, IDC_BROWSE_SELECTION, m_selectionButton);
00934     DDX_Control(pDX, IDCANCEL, m_cancelButton);
00935     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00936     DDX_Control(pDX, IDC_ITEM, m_itemEdit);
00937     DDX_Control(pDX, IDC_REFRESH_ITEMS, m_refreshButton);
00938     DDX_Control(pDX, IDOK, m_okButton);
00939     DDX_Control(pDX, IDC_BROWSE_READ_FROM, m_browseReadFromButton);
00940     DDX_Control(pDX, IDC_ITEM_LABEL, m_itemLabelStatic);
00941     DDX_Control(pDX, IDC_HAS_DATE, m_hasDateCheck);
00942     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00943     DDX_Control(pDX, IDC_DATE, m_dateCombo);
00944     DDX_Control(pDX, IDC_REV_TAG, m_revCombo);
00945     DDX_Control(pDX, IDC_ITEM_LIST_OPTION, m_optionCheck);
00946     DDX_Control(pDX, IDC_ITEM_LIST, m_itemListCtrl);
00947     DDX_Control(pDX, IDC_READ_FROM, m_readFromCombo);
00948     DDX_CBString(pDX, IDC_READ_FROM, m_readFrom);
00949     DDX_Text(pDX, IDC_ITEM, m_item);
00950     DDX_Check(pDX, IDC_ITEM_LIST_OPTION, m_option);
00951     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00952     DDX_CBString(pDX, IDC_REV_TAG, m_rev);
00953     DDX_CBString(pDX, IDC_DATE, m_date);
00954     DDX_Check(pDX, IDC_HAS_DATE, m_hasDate);
00955     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00956     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00957     //}}AFX_DATA_MAP
00958
00959     DDX_ComboMString(pDX, IDC_REV_TAG, m_revCombo);
00960     DDX_ComboMString(pDX, IDC_DATE, m_dateCombo);
00961     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00962
00963     if( pDX->m_bSaveAndValidate )
00964     {
00965         m_itemList.clear();
00966
00967         for(int nIndex = 0; nIndex < m_itemListCtrl.GetItemCount(); nIndex++)
00968         {
00969             ItemDisplayInfo* displayInfo = (ItemDisplayInfo*)m_itemListCtrl.GetItemData(nIndex);
00970             if( displayInfo )
00971             {
00972                 m_itemList.insert(std::make_pair(displayInfo->GetItem(), displayInfo->GetRowInfo()));
00973             }
00974         }
00975     }
00976     else
00977     {
00978         m_selCvsrootButton.EnableWindow(m_forceRoot);
00979     }
00980
00981     if( m_forceRoot )
00982     {
00983         DDV_MinChars(pDX, m_cvsroot, 1);
00984     }
00985 }

Here is the call graph for this function:

void CItemListDlg::EnableControls ( BOOL enable ) [private]

Enable or disable controls

Parameters:
enable Set to TRUE to enable controls, FALSE to disable controls
Definition at line 1300 of file ItemListDlg.cpp.

References InitOptionCtrls(), m_autoRefreshCombo, m_browseReadFromButton, m_browseTagButton, m_dateCombo, m_forceRootCheck, m_hasDateCheck, m_hasRevCheck, m_itemEdit, m_itemListCtrl, m_okButton, m_optionCheck, m_readFromCombo, m_refreshButton, m_revCombo, m_selectionButton, and OnForceroot().

Referenced by OnRefresh().

01301 {
01302     m_okButton.EnableWindow(enable);
01303     m_refreshButton.EnableWindow(enable);
01304     m_readFromCombo.EnableWindow(enable);
01305     m_itemListCtrl.EnableWindow(enable);
01306     m_itemEdit.EnableWindow(enable);
01307     m_selectionButton.EnableWindow(enable);
01308
01309     m_optionCheck.EnableWindow(enable);
01310
01311     m_forceRootCheck.EnableWindow(enable);
01312     m_autoRefreshCombo.EnableWindow(enable);
01313
01314     if( !enable )
01315     {
01316         m_hasRevCheck.EnableWindow(FALSE);
01317         m_revCombo.EnableWindow(FALSE);
01318
01319         m_browseTagButton.EnableWindow(FALSE);
01320
01321         m_hasDateCheck.EnableWindow(FALSE);
01322         m_dateCombo.EnableWindow(FALSE);
01323
01324         m_browseReadFromButton.EnableWindow(FALSE);
01325     }
01326     else
01327     {
01328         InitOptionCtrls();
01329         OnForceroot();
01330     }
01331 }

Here is the call graph for this function:

bool CItemListDlg::EnableDateRev ( ) [private]

int CItemListDlg::GetImageForItem | ( | kItemListDlg | type,
 |  | bool | option,
 |  | const ItemDisplayInfo * | displayInfo
 | ) | [private]

Get the image corresponding to the given item

Parameters:
type | Item list type
option | Item list option
displayInfo | Item info to find the image for
Returns:
The image index in the image list to be used for item or -1 if not image was selected
Definition at line 1583 of file ItemListDlg.cpp.

References ItemDisplayInfo::GetDescription(), ItemDisplayInfo::GetItem(), kItemImgBranch, kItemImgBranchAndRevision, kItemImgDir, kItemImgFile, kItemImgModule, kItemImgRevision, kItemImgUpDir, kItemListModule, kItemListTag, STR_ITEMLIST_BRANCH, STR_ITEMLIST_DIR, STR_ITEMLIST_REVISION, and STR_ITEMLIST_UP_DIR.

Referenced by DisplayItems().

01584 {
01585     int res = -1;
01586
01587     switch( type )
01588     {
01589     case kItemListTag:
01590         {
01591             bool hasRevision = displayInfo->GetDescription().find(STR_ITEMLIST_REVISION) != string::npos;
01592             bool hasBranch = displayInfo->GetDescription().find(STR_ITEMLIST_BRANCH) != string::npos;
01593
01594             if( hasRevision && hasBranch )
01595             {
01596                 res = kItemImgBranchAndRevision;
01597             }
01598             else if( hasBranch )
01599             {
01600                 res = kItemImgBranch;
01601             }
01602             else
01603             {
01604                 res = kItemImgRevision;
01605             }
01606         }
01607         break;
01608     case kItemListModule:
01609         if( option )
01610         {
01611             if( strcmp(displayInfo->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
01612             {
01613                 res = kItemImgUpDir;
01614             }
01615             else
01616             {
01617                 bool isDir = displayInfo->GetDescription().find(STR_ITEMLIST_DIR) != string::npos;
01618                 res = isDir ? kItemImgDir : kItemImgFile;
01619             }
01620         }
01621         else
01622         {
01623             res = kItemImgModule;
01624         }
01625         break;
01626     default:
01627         ASSERT(FALSE);  // unknown type
01628         break;
01629     }
01630
01631     return res;
01632 }

Here is the call graph for this function:

void CItemListDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 1148 of file ItemListDlg.cpp.

References IDC_AUTO_REFRESH, IDC_BROWSE_CVSROOT, IDC_BROWSE_READ_FROM, IDC_BROWSE_SELECTION, IDC_BROWSE_TAG, IDC_CVSROOT, IDC_DATE, IDC_FORCE_CVSROOT, IDC_GROUP_OPTIONS, IDC_HAS_DATE, IDC_HAS_REV, IDC_ITEM, IDC_ITEM_LABEL, IDC_ITEM_LIST, IDC_ITEM_LIST_OPTION, IDC_READ_FROM, IDC_REFRESH_ITEMS, IDC_REV_TAG, IDH_IDC_AUTO_REFRESH, IDH_IDC_BROWSE_CVSROOT, IDH_IDC_BROWSE_READ_FROM, IDH_IDC_BROWSE_SELECTION, IDH_IDC_BROWSE_TAG, IDH_IDC_CVSROOT, IDH_IDC_DATE, IDH_IDC_FORCE_CVSROOT, IDH_IDC_FORCE_RECURSE, IDH_IDC_GROUP_OPTIONS, IDH_IDC_HAS_DATE, IDH_IDC_HAS_REV, IDH_IDC_ITEM, IDH_IDC_ITEM_LABEL, IDH_IDC_ITEM_LIST, IDH_IDC_ITEM_LIST_OPTION, IDH_IDC_READ_FROM, IDH_IDC_REFRESH_ITEMS, IDH_IDC_REV_TAG, kItemListModule, kItemListTag, m_type, and CHHelpSupport::SetCtrlHelpID().

01149 {
01150     SetCtrlHelpID(IDC_ITEM_LABEL,       IDH_IDC_ITEM_LABEL);
01151     SetCtrlHelpID(IDC_ITEM,             IDH_IDC_ITEM);
01152     SetCtrlHelpID(IDC_BROWSE_SELECTION, IDH_IDC_BROWSE_SELECTION);
01153     SetCtrlHelpID(IDC_ITEM_LIST,        IDH_IDC_ITEM_LIST);
01154     SetCtrlHelpID(IDC_GROUP_OPTIONS,    IDH_IDC_GROUP_OPTIONS);
01155     SetCtrlHelpID(IDC_READ_FROM,        IDH_IDC_READ_FROM);
01156     SetCtrlHelpID(IDC_BROWSE_READ_FROM, IDH_IDC_BROWSE_READ_FROM);
01157     SetCtrlHelpID(IDC_REFRESH_ITEMS,    IDH_IDC_REFRESH_ITEMS);
01158     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
01159     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
01160     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
01161     SetCtrlHelpID(IDC_HAS_REV,          IDH_IDC_HAS_REV);
01162     SetCtrlHelpID(IDC_REV_TAG,          IDH_IDC_REV_TAG);
01163     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
01164     SetCtrlHelpID(IDC_HAS_DATE,         IDH_IDC_HAS_DATE);
01165     SetCtrlHelpID(IDC_DATE,             IDH_IDC_DATE);
01166     SetCtrlHelpID(IDC_AUTO_REFRESH,     IDH_IDC_AUTO_REFRESH);
01167
01168     switch( m_type )
01169     {
01170     case kItemListTag:
01171         SetCtrlHelpID(IDC_ITEM_LIST_OPTION, IDH_IDC_FORCE_RECURSE);
01172         break;
01173     case kItemListModule:
01174         SetCtrlHelpID(IDC_ITEM_LIST_OPTION, IDH_IDC_ITEM_LIST_OPTION);
01175         break;
01176     default:
01177         ASSERT(FALSE); // unknown option
01178         break;
01179     }
01180 }

Here is the call graph for this function:

void CItemListDlg::InitListCtrl ( const kItemDisplayType displayType ) [private]

Set the list control columns appropriate to the dialog type, show prompt message eventually

Parameters:
displayType Display type as specified by kItemDisplayType enum
Note:
Prompt message will be shown while data are being read
Definition at line 1202 of file ItemListDlg.cpp.

References _i18n, DeleteAllItems(), kItemDisplayData, kItemDisplayInfo, kItemDisplayWait, kItemImgBlank, kItemListModule, kItemListTag, m_itemListCtrl, m_optionCheck, and m_type.

Referenced by DisplayItems(), and OnRefresh().

01203 {
01204     CWndRedrawMngr redrawMngr(&m_itemListCtrl);
01205
01206     // Remove all items and columns
01207     DeleteAllItems();
01208
01209     int columnCount = m_itemListCtrl.GetHeaderCtrl()->GetItemCount();
01210     while( columnCount-- )
01211     {
01212         m_itemListCtrl.DeleteColumn(0);
01213     }
01214
01215     // Get the client area width to properly size columns
01216     CRect rect;
01217     m_itemListCtrl.GetClientRect(rect);
01218
01219     const int listCtrlWidth = rect.Width();
01220
01221     // Set the appropriate columns
01222     switch( displayType )
01223     {
01224     case kItemDisplayWait:
01225         m_itemListCtrl.InsertColumn(0, _i18n("Action"), LVCFMT_LEFT, listCtrlWidth);
01226
01227         m_itemListCtrl.InsertItem(0, _i18n("Please wait while retrieving data"), kItemImgBlank);
01228         m_itemListCtrl.InsertItem(1, _i18n("You can press Stop button to cancel the operation"), kItemImgBlank);
01229         break;
01230     case kItemDisplayData:
01231         {
01232             const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
01233
01234             switch( m_type )
01235             {
01236             case kItemListTag:
01237                 m_itemListCtrl.InsertColumn(0, _i18n("Tag/branch"), LVCFMT_LEFT, 200);
01238                 m_itemListCtrl.InsertColumn(1, _i18n("Description"), LVCFMT_LEFT, listCtrlWidthNoScroll - 200);
01239                 break;
01240             case kItemListModule:
01241                 if( m_optionCheck.GetCheck() )
01242                 {
01243                     m_itemListCtrl.InsertColumn(0, _i18n("Module"), LVCFMT_LEFT, 200);
01244                     m_itemListCtrl.InsertColumn(1, _i18n("Description"), LVCFMT_LEFT, 120);
01245                     m_itemListCtrl.InsertColumn(2, _i18n("Timestamp"), LVCFMT_LEFT, listCtrlWidthNoScroll - 120 - 200);
01246                 }
01247                 else
01248                 {
01249                     m_itemListCtrl.InsertColumn(0, _i18n("Module"), LVCFMT_LEFT, 200);
01250                     m_itemListCtrl.InsertColumn(1, _i18n("Options"), LVCFMT_LEFT, 60);
01251                     m_itemListCtrl.InsertColumn(2, _i18n("Directories / Files"), LVCFMT_LEFT, listCtrlWidthNoScroll - 60 - 200);
01252                 }
01253                 break;
01254             default:
01255                 ASSERT(FALSE);  // unknown type
01256                 break;
01257             }
01258         }
01259         break;
01260     case kItemDisplayInfo:
01261         m_itemListCtrl.InsertColumn(0, _i18n("Information"), LVCFMT_LEFT, listCtrlWidth);
01262         break;
01263     default:
01264         ASSERT(FALSE);  // unknown display type
01265         break;
01266     }
01267 }

Here is the call graph for this function:

void CItemListDlg::InitOptionCtrls ( ) [private]

Set the controls dependent on the Option state Definition at line 1272 of file ItemListDlg.cpp.

References gItemListModuleList, gItemListTagRecurse, kItemListModule, kItemListTag, m_hasDateCheck, m_hasRevCheck, m_optionCheck, m_type, OnCheckdate(), and OnCheckrev().

Referenced by EnableControls(), and OnOption().

01273 {
01274     BOOL enableDateRev = (kItemListModule == m_type && !m_optionCheck.GetCheck()) ? false : true;
01275
01276     m_hasRevCheck.EnableWindow(enableDateRev);
01277     m_hasDateCheck.EnableWindow(enableDateRev);
01278
01279     OnCheckrev();
01280     OnCheckdate();
01281
01282     switch( m_type )
01283     {
01284     case kItemListTag:
01285         gItemListTagRecurse = m_optionCheck.GetCheck() != 0;
01286         break;
01287     case kItemListModule:
01288         gItemListModuleList = m_optionCheck.GetCheck() != 0;
01289         break;
01290     default:
01291         // Nothing to do
01292         break;
01293     }
01294 }

Here is the call graph for this function:

void CItemListDlg::OnBrowseReadfrom ( ) [protected]

BN_CLICKED message handler, browse for file/directory.

Definition at line 1781 of file ItemListDlg.cpp.

References CompatGetModuleListItem(), CStr, m_browseReadFromButton, m_mf, and m_readFromCombo.

01782 {
01783     CStr moduleName;
01784     if( CompatGetModuleListItem(m_mf, moduleName) )
01785     {
01786         m_readFromCombo.SetWindowText((const char*)moduleName);
01787         GotoDlgCtrl(&m_browseReadFromButton);
01788     }
01789 }

Here is the call graph for this function:

void CItemListDlg::OnBrowseTag ( ) [protected]

BN_CLICKED message handler, browse for tag/branch.

Definition at line 1770 of file ItemListDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev, and m_revCombo.

01771 {
01772     CStr tagName;
01773     if( CompatGetTagListItem(m_mf, tagName) )
01774     {
01775         m_rev = (const char*)tagName;
01776         m_revCombo.SetWindowText(m_rev);
01777     }
01778 }

Here is the call graph for this function:

void CItemListDlg::OnCancel ( ) [protected, virtual]

OnCancel virtual override, stop CVS command or cancel dialog.

Definition at line 1694 of file ItemListDlg.cpp.

References _i18n, CWincvsApp::IsCvsRunning(), CWincvsApp::IsCvsStopping(), kItemImgBlank, m_cvsStopped, m_itemListCtrl, and stopCVS().

01695 {
01696     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01697     if( app && app->IsCvsRunning() && !app->IsCvsStopping() )
01698     {
01699         m_itemListCtrl.DeleteAllItems();
01700         m_itemListCtrl.InsertItem(0, _i18n("Stopping..."), kItemImgBlank);
01701
01702         m_cvsStopped = true;
01703         stopCVS();
01704         return;
01705     }
01706
01707     CHHelpDialog::OnCancel();
01708 }

Here is the call graph for this function:

void CItemListDlg::OnCheckdate ( ) [protected]

BN_CLICKED message handler, enable date combo box.

Definition at line 1762 of file ItemListDlg.cpp.

References kItemListModule, m_dateCombo, m_hasDateCheck, m_optionCheck, and m_type.

Referenced by InitOptionCtrls().

01763 {
01764     bool enable = m_hasDateCheck.GetCheck() && !(kItemListModule == m_type && !m_optionCheck.GetCheck());
01765
01766     m_dateCombo.EnableWindow(enable);
01767 }

void CItemListDlg::OnCheckrev ( ) [protected]

BN_CLICKED message handler, enable revision combo box.

Definition at line 1753 of file ItemListDlg.cpp.

References kItemListModule, m_browseTagButton, m_hasRevCheck, m_optionCheck, m_revCombo, and m_type.

Referenced by InitOptionCtrls().

01754 {
01755     bool enable = m_hasRevCheck.GetCheck() && !(kItemListModule == m_type && !m_optionCheck.GetCheck());
01756
01757     m_revCombo.EnableWindow(enable);
01758     m_browseTagButton.EnableWindow(enable);
01759 }

void CItemListDlg::OnColumnclickItemlist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_COLUMNCLICK message handler, sort items in response to column click.

Definition at line 1885 of file ItemListDlg.cpp.

References m_optionCheck, m_sortAsc, m_sortColumn, m_type, and SortItems().

01886 {
01887     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01888
01889     if( m_sortColumn != pNMListView->iSubItem )
01890     {
01891         m_sortAsc = false;
01892     }
01893     else
01894     {
01895         m_sortAsc = !m_sortAsc;
01896     }
01897
01898     m_sortColumn = pNMListView->iSubItem;
01899
01900     SortItems(m_sortColumn, m_sortAsc, m_type, m_optionCheck.GetCheck() != 0);
01901
01902     *pResult = 0;
01903 }

Here is the call graph for this function:

void CItemListDlg::OnDblclkItemlist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

NM_DBLCLK message handler, select the item and close dialog for tag/modules browser or navigate directories for directory and files listing.

Definition at line 1809 of file ItemListDlg.cpp.

References kItemListModule, m_itemEdit, m_itemListCtrl, m_listPath, m_optionCheck, m_type, OnOK(), PostClickRefresh(), STR_ITEMLIST_DIR, and STR_ITEMLIST_UP_DIR.

01810 {
01811     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01812     if( pNMListView->iItem > -1 )
01813     {
01814         if( kItemListModule == m_type && m_optionCheck.GetCheck() )
01815         {
01816             const CString description = m_itemListCtrl.GetItemText(pNMListView->iItem, 1);
01817             if( description == STR_ITEMLIST_DIR )
01818             {
01819                 const CString item = m_itemListCtrl.GetItemText(pNMListView->iItem, 0);
01820                 if( item == STR_ITEMLIST_UP_DIR )
01821                 {
01822                     if( !m_listPath.empty() )
01823                     {
01824                         // Set the item for selection in up-level
01825                         const string backItem = m_listPath.back();
01826                         m_itemEdit.SetWindowText(backItem.c_str());
01827
01828                         m_listPath.pop_back();
01829                     }
01830                 }
01831                 else
01832                 {
01833                     // Make it so it's easy to "return" where we came from
01834                     m_itemEdit.SetWindowText(STR_ITEMLIST_UP_DIR);
01835                     m_listPath.push_back((LPCTSTR)item);
01836                 }
01837
01838                 PostClickRefresh();
01839             }
01840         }
01841         else
01842         {
01843             OnOK();
01844         }
01845     }
01846
01847     *pResult = 0;
01848 }

Here is the call graph for this function:

void CItemListDlg::OnDestroy ( ) [protected]

WM_DESTROY message handler, release any memory allocated.

Definition at line 1928 of file ItemListDlg.cpp.

References DeleteAllItems().

01929 {
01930     DeleteAllItems();
01931
01932     CHHelpDialog::OnDestroy();
01933 }

Here is the call graph for this function:

void CItemListDlg::OnForceroot ( ) [protected]

BN_CLICKED message handler, enable related controls.

Definition at line 1725 of file ItemListDlg.cpp.

References kItemListModule, kItemListTag, m_browseReadFromButton, m_cvsrootCombo, m_forceRootCheck, m_optionCheck, m_readFromCombo, m_selCvsrootButton, and m_type.

Referenced by EnableControls().

01726 {
01727     bool enableReadFrom = !(kItemListModule == m_type && m_forceRootCheck.GetCheck() && !m_optionCheck.GetCheck());
01728     m_readFromCombo.EnableWindow(enableReadFrom);
01729
01730     bool enableBrowseReadFrom = kItemListTag == m_type && m_forceRootCheck.GetCheck();
01731     m_browseReadFromButton.EnableWindow(enableBrowseReadFrom);
01732
01733     const BOOL enable = m_forceRootCheck.GetCheck();
01734
01735     m_selCvsrootButton.EnableWindow(enable);
01736     m_cvsrootCombo.EnableWindow(enable);
01737 }

void CItemListDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 1183 of file ItemListDlg.cpp.

References CHHelpSupport::ShowHelp().

01184 {
01185     ShowHelp();
01186 }

Here is the call graph for this function:

BOOL CItemListDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initializes controls and triggers data reading if necessary.

Reimplemented from CHHelpDialog.

Definition at line 1012 of file ItemListDlg.cpp.

References MultiFiles::const_iterator, CStr, UStr::empty(), UStr::endsWith(), gItemListAutoRefreshModule, gItemListAutoRefreshTag, IDR_ITEMLIST, kAutoRefreshAlways, kAutoRefreshFirstTime, kItemDisplayData, kItemListAutoRefreshType, kItemListModule, kItemListTag, NULL, CHHelpDialog::OnInitDialog(), and SetListCtrlExtendedStyle().

01013 {
01014     CHHelpDialog::OnInitDialog();
01015
01016     // Extra initialization
01017     SetListCtrlExtendedStyle(&m_itemListCtrl, LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
01018
01019     // Setup controls
01020     CHeaderCtrl* headerCtrl = m_itemListCtrl.GetHeaderCtrl();
01021     if( headerCtrl )
01022     {
01023         m_headerCtrl.SubclassWindow(headerCtrl->m_hWnd);
01024     }
01025
01026     InitListCtrl(kItemDisplayData);
01027     InitOptionCtrls();
01028     OnForceroot();
01029
01030     m_itemsImageList.Create(IDR_ITEMLIST, 16, 1, RGB(255, 0, 255));
01031     m_itemListCtrl.SetImageList(&m_itemsImageList, LVSIL_SMALL);
01032
01033     int nReadFromSelection = 0;
01034
01035     if( m_mf )
01036     {
01037         // Add selected directories
01038         for( int nIndex = 0; nIndex < m_mf->NumDirs(); nIndex++ )
01039         {
01040             CStr path;
01041             if( m_mf->getdir(nIndex, path) )
01042             {
01043                 m_readFromCombo.AddString(CString(path));
01044             }
01045         }
01046     }
01047
01048     switch( m_type )
01049     {
01050     case kItemListTag:
01051         // Set windows titles
01052         SetWindowText("Select tag/branch");
01053         m_itemLabelStatic.SetWindowText("&Tag/branch:");
01054         m_optionCheck.SetWindowText("&Recurse");
01055
01056         // The browser selection
01057         if( m_mf && m_mf->TotalNumFiles() )
01058         {
01059             MultiFiles::const_iterator mfi;
01060             for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
01061             {
01062                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
01063                 {
01064                     UStr path;
01065                     UStr fileName;
01066                     UStr currRev;
01067
01068                     mfi->get(nIndex, path, fileName, currRev);
01069                     if( !path.empty() && !path.endsWith(kPathDelimiter) )
01070                         path << kPathDelimiter;
01071
01072                     path << fileName;
01073
01074                     const int nComboIndex = m_readFromCombo.AddString(path);
01075
01076                     // It's better to have a single file selected initially for the performance reasons
01077                     if( 0 == nReadFromSelection )
01078                     {
01079                         nReadFromSelection = nComboIndex;
01080                     }
01081                 }
01082             }
01083         }
01084
01085         break;
01086     case kItemListModule:
01087         // Set windows titles
01088         SetWindowText("Select module");
01089         m_itemLabelStatic.SetWindowText("&Module:");
01090         m_optionCheck.SetWindowText("&List");
01091
01092         m_browseReadFromButton.ShowWindow(SW_HIDE);
01093         break;
01094     default:
01095         ASSERT(FALSE);  // unknown type
01096         EndDialog(IDCANCEL);
01097         return FALSE;
01098     }
01099
01100     // Set the "read from"
01101     if( m_readFromCombo.GetCount() )
01102     {
01103         m_readFromCombo.SetCurSel(nReadFromSelection);
01104     }
01105
01106     // Trigger refresh
01107     kItemListAutoRefreshType autoRefresh = kAutoRefreshFirstTime;
01108
01109     if( kItemListModule == m_type )
01110     {
01111         autoRefresh = (kItemListAutoRefreshType)(int)gItemListAutoRefreshModule;
01112     }
01113     else if( kItemListTag == m_type )
01114     {
01115         autoRefresh = (kItemListAutoRefreshType)(int)gItemListAutoRefreshTag;
01116     }
01117     else
01118     {
01119         ASSERT(FALSE); // unknown type
01120     }
01121
01122     m_autoRefreshCombo.SetCurSel(autoRefresh);
01123
01124     if( (kAutoRefreshAlways == autoRefresh) || (kAutoRefreshFirstTime == autoRefresh && m_itemList.empty()) )
01125     {
01126         // Force the window to show itself
01127         ShowWindow(SW_SHOW);
01128         PostClickRefresh();
01129     }
01130     else
01131     {
01132         DisplayItems(m_itemList, 0, NULL, false);
01133         if( m_itemListCtrl.IsWindowEnabled() )
01134         {
01135             SortItems(m_sortColumn, m_sortAsc, m_type, m_optionCheck.GetCheck() != 0);
01136         }
01137
01138         if( !m_item.IsEmpty() )
01139         {
01140             SelectItem(m_item);
01141         }
01142     }
01143
01144     return TRUE;  // return TRUE unless you set the focus to a control
01145                   // EXCEPTION: OCX Property Pages should return FALSE
01146 }

Here is the call graph for this function:

void CItemListDlg::OnItemchangedItemlist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_ITEMCHANGED message handler, update the item edit box value as selection is changing.

Definition at line 1851 of file ItemListDlg.cpp.

References FormatListPath(), kItemListModule, m_itemEdit, m_itemListCtrl, m_listPath, m_optionCheck, m_type, and STR_ITEMLIST_UP_DIR.

01852 {
01853     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01854     if( pNMListView->iItem > -1 &&
01855         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
01856     {
01857         CString item;
01858
01859         if( kItemListModule == m_type && m_optionCheck.GetCheck() )
01860         {
01861             item = FormatListPath(m_listPath).c_str();
01862
01863             CString selItem = m_itemListCtrl.GetItemText(pNMListView->iItem, 0);
01864             if( selItem  != STR_ITEMLIST_UP_DIR )
01865             {
01866                 item += selItem;
01867             }
01868             else
01869             {
01870                 item.TrimRight('/');
01871             }
01872         }
01873         else
01874         {
01875             item = m_itemListCtrl.GetItemText(pNMListView->iItem, 0);
01876         }
01877
01878         m_itemEdit.SetWindowText(item);
01879     }
01880
01881     *pResult = 0;
01882 }

Here is the call graph for this function:

void CItemListDlg::OnOK ( ) [protected, virtual]

OnOK virtual override, store the persistent data.

Definition at line 1675 of file ItemListDlg.cpp.

References gItemListModuleList, gItemListTagRecurse, kItemListModule, kItemListTag, m_optionCheck, and m_type.

Referenced by OnDblclkItemlist(), and OnSelection().

01676 {
01677     switch( m_type )
01678     {
01679     case kItemListTag:
01680         gItemListTagRecurse = m_optionCheck.GetCheck() != 0;
01681         break;
01682     case kItemListModule:
01683         gItemListModuleList = m_optionCheck.GetCheck() != 0;
01684         break;
01685     default:
01686         // Nothing to do
01687         break;
01688     }
01689
01690     CHHelpDialog::OnOK();
01691 }

void CItemListDlg::OnOption ( ) [protected]

BN_CLICKED message handler, initialize the related controls and sort settings.

Definition at line 1711 of file ItemListDlg.cpp.

References InitOptionCtrls(), kItemListModule, m_listPath, m_sortAsc, m_sortColumn, and m_type.

01712 {
01713     InitOptionCtrls();
01714
01715     if( m_type == kItemListModule )
01716     {
01717         m_listPath.clear();
01718
01719         m_sortAsc = false;
01720         m_sortColumn = 0;
01721     }
01722 }

Here is the call graph for this function:

void CItemListDlg::OnRefresh ( ) [protected]

BN_CLICKED message handler, re-reads the data.

Definition at line 1334 of file ItemListDlg.cpp.

References _i18n, CheckSettings(), DisplayItems(), EnableControls(), CSmartComboBox::GetWindowText(), InitListCtrl(), kItemDisplayData, kItemDisplayWait, kItemListModule, LaunchItemListCommand(), m_cancelButton, m_cvsrootCombo, m_cvsStopped, m_dateCombo, m_forceRootCheck, m_hasDateCheck, m_hasRevCheck, m_itemEdit, m_itemListCtrl, m_listPath, m_optionCheck, m_readFromCombo, m_revCombo, m_sortAsc, m_sortColumn, m_type, SelectItem(), and SortItems().

01335 {
01336     m_cvsStopped = false;
01337
01338     // Verify the settings
01339     if( !CheckSettings() )
01340     {
01341         return;
01342     }
01343
01344     // Prepare controls
01345     EnableControls(FALSE);
01346
01347     // Change the Cancel button's name to "Stop"
01348     CString strPrevCancelText;
01349     m_cancelButton.GetWindowText(strPrevCancelText);
01350     m_cancelButton.SetWindowText(_i18n("Stop"));
01351
01352     // Store current item text
01353     CString strItem;
01354     m_itemEdit.GetWindowText(strItem);
01355
01356     // Display the reading data prompt
01357     InitListCtrl(kItemDisplayWait);
01358
01359     // Select and launch command
01360     CString strReadFrom;
01361     CString revision;
01362     CString date;
01363     CString cvsroot;
01364
01365     m_readFromCombo.GetWindowText(strReadFrom);
01366
01367     if( m_hasRevCheck.GetCheck() )
01368     {
01369         m_revCombo.GetWindowText(revision);
01370     }
01371
01372     if( m_hasDateCheck.GetCheck() )
01373     {
01374         m_dateCombo.GetWindowText(date);
01375     }
01376
01377     if( m_forceRootCheck.GetCheck() )
01378     {
01379         m_cvsrootCombo.GetWindowText(cvsroot);
01380     }
01381
01382     const char* readFrom = kItemListModule == m_type &&
01383         m_forceRootCheck.GetCheck() && !m_optionCheck.GetCheck() ? "" : (LPCTSTR)strReadFrom;
01384
01385     std::auto_ptr<CItemListConsole> itemListConsole(LaunchItemListCommand(m_type, m_optionCheck.GetCheck() != 0,
01386         readFrom,
01387         m_forceRootCheck.GetCheck() != 0, cvsroot,
01388         revision, date, &m_listPath));
01389
01390     if( !itemListConsole.get() )
01391     {
01392         EndDialog(IDCANCEL);
01393         return;
01394     }
01395
01396     // Initialize list control
01397     InitListCtrl(kItemDisplayData);
01398
01399     // Restore control's state
01400     EnableControls(TRUE);
01401
01402     // Display data
01403     DisplayItems(itemListConsole->GetItemList(), itemListConsole->GetLaunchRes(), &itemListConsole->GetCvsErr());
01404
01405     // Restore Cancel's button name
01406     m_cancelButton.SetWindowText(strPrevCancelText);
01407
01408     if( m_itemListCtrl.IsWindowEnabled() )
01409     {
01410         // Sort items
01411         SortItems(m_sortColumn, m_sortAsc, m_type, m_optionCheck.GetCheck() != 0);
01412
01413         // Try to select the item
01414         if( strItem.IsEmpty() && m_itemListCtrl.GetItemCount() )
01415         {
01416             strItem = m_itemListCtrl.GetItemText(0, 0);
01417         }
01418
01419         if( !strItem.IsEmpty() )
01420         {
01421             SelectItem(strItem);
01422             GotoDlgCtrl(&m_itemListCtrl);
01423         }
01424     }
01425 }

Here is the call graph for this function:

void CItemListDlg::OnSelchangeAutoRefresh ( ) [protected]

CBN_SELCHANGE message handler, update auto-refresh settings.

Definition at line 1950 of file ItemListDlg.cpp.

References gItemListAutoRefreshModule, gItemListAutoRefreshTag, kItemListModule, kItemListTag, m_autoRefreshCombo, and m_type.

01951 {
01952     const int autoRefresh = m_autoRefreshCombo.GetCurSel();
01953     if( autoRefresh > -1 )
01954     {
01955         if( kItemListModule == m_type )
01956         {
01957              gItemListAutoRefreshModule = autoRefresh;
01958         }
01959         else if( kItemListTag == m_type )
01960         {
01961             gItemListAutoRefreshTag = autoRefresh;
01962         }
01963         else
01964         {
01965             ASSERT(FALSE); // unknown type
01966         }
01967     }
01968 }

void CItemListDlg::OnSelcvsroot ( ) [protected]

BN_CLICKED message handler, select CVSROOT.

Definition at line 1740 of file ItemListDlg.cpp.

References CompatGetCvsRoot(), CStr, CSmartComboBox::GetWindowText(), and m_cvsrootCombo.

01741 {
01742     CString strCvsroot;
01743     m_cvsrootCombo.GetWindowText(strCvsroot);
01744
01745     CStr cvsroot(strCvsroot);
01746     if( CompatGetCvsRoot(cvsroot) )
01747     {
01748         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
01749     }
01750 }

Here is the call graph for this function:

void CItemListDlg::OnSelection ( ) [protected]

BN_CLICKED message handler, browse selection info.

Definition at line 1792 of file ItemListDlg.cpp.

References CompatGetSelectionDetails(), CStr, kItemListModule, kSelDetPath, kSelDetRevision, kSelDetType, m_itemEdit, m_mf, m_type, and OnOK().

01793 {
01794     kSelDetType selDetType = kItemListModule == m_type ? kSelDetPath : kSelDetRevision;
01795     CStr selection;
01796
01797     CString strSelection;
01798     m_itemEdit.GetWindowText(strSelection);
01799     selection = (const char*)strSelection;
01800
01801     if( CompatGetSelectionDetails(m_mf, selDetType, selection) )
01802     {
01803         m_itemEdit.SetWindowText(selection.c_str());
01804         OnOK();
01805     }
01806 }

Here is the call graph for this function:

BOOL CItemListDlg::PostClickRefresh ( ) [private]

"Click" the refresh button by posting the BN_CLICKED message for the refresh button

Returns:
TRUE on success, FALSE otherwise
Definition at line 1192 of file ItemListDlg.cpp.

References IDC_REFRESH_ITEMS, and NULL.

Referenced by OnDblclkItemlist(), and PreTranslateMessage().

01193 {
01194     return PostMessage(WM_COMMAND, MAKEWPARAM(IDC_REFRESH_ITEMS, BN_CLICKED), (LPARAM)NULL);
01195 }

BOOL CItemListDlg::PreTranslateMessage ( MSG * pMsg ) [virtual]

PreTranslateMessage virtual override, detects the F5 key pressed and refreshes the display.

Definition at line 1936 of file ItemListDlg.cpp.

References PostClickRefresh().

01937 {
01938     if( WM_KEYUP == pMsg->message )
01939     {
01940         if( VK_F5 == pMsg->wParam )
01941         {
01942             PostClickRefresh();
01943         }
01944     }
01945
01946     return CHHelpDialog::PreTranslateMessage(pMsg);
01947 }

Here is the call graph for this function:

bool CItemListDlg::SelectItem ( const char * item ) [private]

Find and select the item in the list control

Parameters:
item Item to be found
Returns:
true if the item was found, false otherwise
Note:
Even thought the item state is set to selected and focused it does not set the focus to the list control itself
Definition at line 1654 of file ItemListDlg.cpp.

References m_itemListCtrl.

Referenced by OnRefresh().

01655 {
01656     bool res = FALSE;
01657
01658     LVFINDINFO findInfo = { 0 };
01659     findInfo.flags = LVFI_STRING | LVFI_PARTIAL;
01660     findInfo.psz = item;
01661
01662     const int index = m_itemListCtrl.FindItem(&findInfo);
01663     if( index > -1 )
01664     {
01665         m_itemListCtrl.EnsureVisible(index, FALSE);
01666         m_itemListCtrl.SetItemState(index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
01667
01668         res = true;
01669     }
01670
01671     return res;
01672 }

void CItemListDlg::SortItems | ( | int | column,
 |  | bool | asc,
 |  | kItemListDlg | type,
 |  | bool | option
 | ) | [private]

Sort items listed in the list control

Parameters:
column | Column to sort items by
asc | Sort ascending or descending
type | List dialog type
option | Option state (recurse or list checkbox)
Note:
Using list control callback CompareItems
Definition at line 1913 of file ItemListDlg.cpp.

References CompareItems(), CItemListDlg::CompareInfo::m_asc, CItemListDlg::CompareInfo::m_column, m_headerCtrl, m_itemListCtrl, CItemListDlg::CompareInfo::m_option, CItemListDlg::CompareInfo::m_type, and CSortHeaderCtrl::SetSortImage().

Referenced by OnColumnclickItemlist(), and OnRefresh().

01914 {
01915     m_headerCtrl.SetSortImage(column, asc);
01916
01917     CompareInfo info = { 0 };
01918
01919     info.m_column = column;
01920     info.m_asc = asc;
01921     info.m_type = type;
01922     info.m_option = option;
01923
01924     m_itemListCtrl.SortItems(CompareItems, (DWORD)&info);
01925 }

Here is the call graph for this function:

Member Data Documentation

CSmartComboBox CItemListDlg::m_autoRefreshCombo

Definition at line 210 of file ItemListDlg.h.

Referenced by DoDataExchange(), EnableControls(), and OnSelchangeAutoRefresh().

CButton CItemListDlg::m_browseReadFromButton

Definition at line 217 of file ItemListDlg.h.

Referenced by DoDataExchange(), EnableControls(), OnBrowseReadfrom(), and OnForceroot().

CButton CItemListDlg::m_browseTagButton

Definition at line 213 of file ItemListDlg.h.

Referenced by DoDataExchange(), EnableControls(), and OnCheckrev().

CButton CItemListDlg::m_cancelButton

Definition at line 212 of file ItemListDlg.h.

Referenced by DoDataExchange(), and OnRefresh().

CString CItemListDlg::m_cvsroot

Definition at line 234 of file ItemListDlg.h.

Referenced by CItemListDlg(), CompatGetModuleListItem(), and DoDataExchange().

CSmartComboBox CItemListDlg::m_cvsrootCombo

Definition at line 208 of file ItemListDlg.h.

Referenced by CItemListDlg(), DoDataExchange(), OnForceroot(), OnRefresh(), and OnSelcvsroot().

bool CItemListDlg::m_cvsStopped [private]

Flag indicating that user stopped the command Definition at line 281 of file ItemListDlg.h.

Referenced by CItemListDlg(), DisplayItems(), OnCancel(), and OnRefresh().

CString CItemListDlg::m_date

Definition at line 231 of file ItemListDlg.h.

Referenced by CItemListDlg(), CompatGetModuleListItem(), CompatGetTagListItem(), and DoDataExchange().

CSmartComboBox CItemListDlg::m_dateCombo

Definition at line 221 of file ItemListDlg.h.

Referenced by CheckSettings(), CItemListDlg(), DoDataExchange(), EnableControls(), OnCheckdate(), and OnRefresh().

BOOL CItemListDlg::m_forceRoot

Definition at line 233 of file ItemListDlg.h.

Referenced by CItemListDlg(), CompatGetModuleListItem(), CompatGetTagListItem(), and DoDataExchange().

CButton CItemListDlg::m_forceRootCheck

Definition at line 209 of file ItemListDlg.h.

Referenced by DoDataExchange(), EnableControls(), OnForceroot(), and OnRefresh().

BOOL CItemListDlg::m_hasDate

Definition at line 232 of file ItemListDlg.h.

Referenced by CItemListDlg(), and DoDataExchange().

CButton CItemListDlg::m_hasDateCheck

Definition at line 219 of file ItemListDlg.h.

Referenced by CheckSettings(), DoDataExchange(), EnableControls(), InitOptionCtrls(), OnCheckdate(), and OnRefresh().

BOOL CItemListDlg::m_hasRev

Definition at line 229 of file ItemListDlg.h.

Referenced by CItemListDlg(), and DoDataExchange().

CButton CItemListDlg::m_hasRevCheck

Definition at line 220 of file ItemListDlg.h.

Referenced by CheckSettings(), DoDataExchange(), EnableControls(), InitOptionCtrls(), OnCheckrev(), and OnRefresh().

CSortHeaderCtrl CItemListDlg::m_headerCtrl [private]

Definition at line 329 of file ItemListDlg.h.

Referenced by SortItems().

CString CItemListDlg::m_item

Definition at line 227 of file ItemListDlg.h.

Referenced by CItemListDlg(), CompatGetModuleListItem(), CompatGetTagListItem(), and DoDataExchange().

CEdit CItemListDlg::m_itemEdit

Definition at line 214 of file ItemListDlg.h.

Referenced by DoDataExchange(), EnableControls(), OnDblclkItemlist(), OnItemchangedItemlist(), OnRefresh(), and OnSelection().

CStatic CItemListDlg::m_itemLabelStatic

Definition at line 218 of file ItemListDlg.h.

Referenced by DoDataExchange().

ItemList& CItemListDlg::m_itemList [private]

Item's container Definition at line 280 of file ItemListDlg.h.

Referenced by DoDataExchange().

CListCtrl CItemListDlg::m_itemListCtrl

Definition at line 224 of file ItemListDlg.h.

Referenced by DeleteAllItems(), DisplayItems(), DoDataExchange(), EnableControls(), InitListCtrl(), OnCancel(), OnDblclkItemlist(), OnItemchangedItemlist(), OnRefresh(), SelectItem(), and SortItems().

CImageList CItemListDlg::m_itemsImageList [private]

Definition at line 309 of file ItemListDlg.h.

ListPath CItemListDlg::m_listPath

Path to the current list location Definition at line 273 of file ItemListDlg.h.

Referenced by CItemListDlg(), CompatGetModuleListItem(), DisplayItems(), OnDblclkItemlist(), OnItemchangedItemlist(), OnOption(), and OnRefresh().

const MultiFiles* CItemListDlg::m_mf [private]

Browser selection Definition at line 277 of file ItemListDlg.h.

Referenced by OnBrowseReadfrom(), OnBrowseTag(), and OnSelection().

CButton CItemListDlg::m_okButton

Definition at line 216 of file ItemListDlg.h.

Referenced by DoDataExchange(), and EnableControls().

BOOL CItemListDlg::m_option

Definition at line 228 of file ItemListDlg.h.

Referenced by CItemListDlg(), and DoDataExchange().

CButton CItemListDlg::m_optionCheck

Definition at line 223 of file ItemListDlg.h.

Referenced by DisplayItems(), DoDataExchange(), EnableControls(), InitListCtrl(), InitOptionCtrls(), OnCheckdate(), OnCheckrev(), OnColumnclickItemlist(), OnDblclkItemlist(), OnForceroot(), OnItemchangedItemlist(), OnOK(), and OnRefresh().

CString CItemListDlg::m_readFrom

Definition at line 226 of file ItemListDlg.h.

Referenced by CItemListDlg(), and DoDataExchange().

CSmartComboBox CItemListDlg::m_readFromCombo

Definition at line 225 of file ItemListDlg.h.

Referenced by DoDataExchange(), EnableControls(), OnBrowseReadfrom(), OnForceroot(), and OnRefresh().

CButton CItemListDlg::m_refreshButton

Definition at line 215 of file ItemListDlg.h.

Referenced by DoDataExchange(), and EnableControls().

CString CItemListDlg::m_rev

Definition at line 230 of file ItemListDlg.h.

Referenced by CItemListDlg(), CompatGetModuleListItem(), CompatGetTagListItem(), DoDataExchange(), and OnBrowseTag().

CSmartComboBox CItemListDlg::m_revCombo

Definition at line 222 of file ItemListDlg.h.

Referenced by CheckSettings(), CItemListDlg(), DoDataExchange(), EnableControls(), OnBrowseTag(), OnCheckrev(), and OnRefresh().

CButton CItemListDlg::m_selCvsrootButton

Definition at line 207 of file ItemListDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

CButton CItemListDlg::m_selectionButton

Definition at line 211 of file ItemListDlg.h.

Referenced by DoDataExchange(), and EnableControls().

bool CItemListDlg::m_sortAsc [private]

Current ascending/descending sorting Definition at line 327 of file ItemListDlg.h.

Referenced by CItemListDlg(), OnColumnclickItemlist(), OnOption(), and OnRefresh().

int CItemListDlg::m_sortColumn [private]

Current sort column Definition at line 328 of file ItemListDlg.h.

Referenced by CItemListDlg(), OnColumnclickItemlist(), OnOption(), and OnRefresh().

kItemListDlg CItemListDlg::m_type [private]

Dialog type Definition at line 279 of file ItemListDlg.h.

Referenced by CItemListDlg(), DisplayItems(), InitHelpID(), InitListCtrl(), InitOptionCtrls(), OnCheckdate(), OnCheckrev(), OnColumnclickItemlist(), OnDblclkItemlist(), OnForceroot(), OnItemchangedItemlist(), OnOK(), OnOption(), OnRefresh(), OnSelchangeAutoRefresh(), and OnSelection().

The documentation for this class was generated from the following files:
  • common/ItemListDlg.h
  • common/ItemListDlg.cpp
Generated on Sat Aug 7 22:53:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CItemListDlg::CompareInfo Struct Reference

CItemListDlg::CompareInfo Struct Reference

Structure to hold the sorting settings. More...

Collaboration diagram for CItemListDlg::CompareInfo:

[legend]
List of all members.

Public Attributes

int m_column
bool m_asc
kItemListDlg m_type
bool m_option

Detailed Description

Structure to hold the sorting settings.

Definition at line 319 of file ItemListDlg.h.

Member Data Documentation

bool CItemListDlg::CompareInfo::m_asc

Sort ascending or descending Definition at line 322 of file ItemListDlg.h.

Referenced by CItemListDlg::CompareItems(), and CItemListDlg::SortItems().

int CItemListDlg::CompareInfo::m_column

Sorting column Definition at line 321 of file ItemListDlg.h.

Referenced by CItemListDlg::CompareItems(), and CItemListDlg::SortItems().

bool CItemListDlg::CompareInfo::m_option

Option state Definition at line 324 of file ItemListDlg.h.

Referenced by CItemListDlg::CompareItems(), and CItemListDlg::SortItems().

kItemListDlg CItemListDlg::CompareInfo::m_type

Dialog type Definition at line 323 of file ItemListDlg.h.

Referenced by CItemListDlg::CompareItems(), and CItemListDlg::SortItems().

The documentation for this struct was generated from the following file:
  • common/ItemListDlg.h
Generated on Sat Aug 7 22:53:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ItemRowInfo Struct Reference

ItemRowInfo Struct Reference

Structure to hold item's row information. More...

#include <ItemListDlg.h>

Collaboration diagram for ItemRowInfo:

[legend]
List of all members.

Public Attributes

ItemDescription m_description
ItemDescription m_descriptionEx

Detailed Description

Structure to hold item's row information.

Definition at line 74 of file ItemListDlg.h.

Member Data Documentation

ItemDescription ItemRowInfo::m_description

Item's description Definition at line 76 of file ItemListDlg.h.

Referenced by ItemDisplayInfo::Create(), CItemListDlg::DisplayItems(), CListParserConsole::Parse(), CModuleParserConsole::Parse(), and CTagParserConsole::Parse().

ItemDescription ItemRowInfo::m_descriptionEx

Item's extended description Definition at line 77 of file ItemListDlg.h.

Referenced by ItemDisplayInfo::Create(), CListParserConsole::Parse(), and CModuleParserConsole::Parse().

The documentation for this struct was generated from the following file:
  • common/ItemListDlg.h
Generated on Sat Aug 7 22:53:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Wincvs::IWincvs Interface Reference

Wincvs::IWincvs Interface Reference

List of all members.

Properties

BSTR ViewPath

Property Documentation

BSTR Wincvs::IWincvs::ViewPath

Definition at line 21 of file wincvs.odl.

The documentation for this interface was generated from the following file:
  • WinCvs/wincvs.odl
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CJX_COLORMAP Struct Reference

CJX_COLORMAP Struct Reference

Collaboration diagram for CJX_COLORMAP:

[legend]
List of all members.

Public Attributes

DWORD rgbqFrom
int iSysColorTo

Member Data Documentation

int CJX_COLORMAP::iSysColorTo

Definition at line 128 of file CJToolBar.cpp.

Referenced by _LoadSysColorBitmap().

DWORD CJX_COLORMAP::rgbqFrom

Definition at line 127 of file CJToolBar.cpp.

Referenced by _LoadSysColorBitmap().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/CJLibrary/CJToolBar.cpp
Generated on Sat Aug 7 22:53:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CJX_CONTROLPOS Struct Reference

CJX_CONTROLPOS Struct Reference

Collaboration diagram for CJX_CONTROLPOS:

[legend]
List of all members.

Public Attributes

int nIndex
int nID
CRect rectOldPos

Member Data Documentation

int CJX_CONTROLPOS::nID

Definition at line 260 of file CJToolBar.cpp.

Referenced by CCJToolBar::CalcLayout().

int CJX_CONTROLPOS::nIndex

Definition at line 259 of file CJToolBar.cpp.

Referenced by CCJToolBar::CalcLayout().

CRect CJX_CONTROLPOS::rectOldPos

Definition at line 261 of file CJToolBar.cpp.

Referenced by CCJToolBar::CalcLayout().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/CJLibrary/CJToolBar.cpp
Generated on Sat Aug 7 22:53:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CKeyString Class Reference

CKeyString Class Reference

Dictionary specialization of TKeyString ('@'). More...

#include <MultiString.h>

Inheritance diagram for CKeyString:

[legend]
Collaboration diagram for CKeyString:

[legend]
List of all members.

Public Member Functions

CKeyString (unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass)
virtual ~CKeyString ()

Detailed Description

Dictionary specialization of TKeyString ('@').

Definition at line 157 of file MultiString.h.

Constructor & Destructor Documentation

CKeyString::CKeyString | ( | unsigned int | maxstr,
 |  | const char * | uniqueName,
 |  | char *const * | defaultStr = 0L,
 |  | kClassPersistent | pclass = kNoClass
 | ) |

Definition at line 357 of file MultiString.cpp.

00359                        : TKeyString<'@'>(maxstr, uniqueName, defaultStr, pclass)
00360 {
00361 }

CKeyString::~CKeyString ( ) [virtual]

Definition at line 363 of file MultiString.cpp.

00364 {
00365 }

The documentation for this class was generated from the following files:
  • common/MultiString.h
  • common/MultiString.cpp
Generated on Sat Aug 7 22:53:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CKeywordComboBox Class Reference

CKeywordComboBox Class Reference

#include <KeywordComboBox.h>

Inheritance diagram for CKeywordComboBox:

[legend]
Collaboration diagram for CKeywordComboBox:

[legend]
List of all members.

Public Member Functions

CKeywordComboBox ()
virtual | ~CKeywordComboBox ()
void | SetDescriptionWnd (HWND hDesc)

Protected Member Functions

virtual void | PreSubclassWindow ()
PreSubclassWindow virtual override, add items to the drop down list.
afx_msg void | OnSelchange ()
CBN_SELCHANGE message handler, set the description for the option.

Private Member Functions

void | SetDescription ()

Private Attributes

HWND | m_hDesc

Detailed Description

Class to aid the keyword substitution selection

Note:
It supports automatic option description setting if the description window is given

Definition at line 42 of file KeywordComboBox.h.

Constructor & Destructor Documentation

CKeywordComboBox::CKeywordComboBox ( )

Definition at line 59 of file KeywordComboBox.cpp.

References m_hDesc, and NULL.

00060     : CSmartComboBox(USmartCombo::AutoDropWidth)
00061 {
00062     m_hDesc = NULL;
00063 }

CKeywordComboBox::~CKeywordComboBox ( ) [virtual]

Definition at line 65 of file KeywordComboBox.cpp.

00066 {
00067 }

Member Function Documentation

void CKeywordComboBox::OnSelchange ( ) [protected]

CBN_SELCHANGE message handler, set the description for the option.

Definition at line 80 of file KeywordComboBox.cpp.

00081 {
00082     SetDescription();
00083 }

void CKeywordComboBox::PreSubclassWindow ( ) [protected, virtual]

PreSubclassWindow virtual override, add items to the drop down list.

Reimplemented from CSmartComboBox.

Definition at line 116 of file KeywordComboBox.cpp.

References gKeywordModes, KEYWORD_MODE_COUNT, and CSmartComboBox::PreSubclassWindow().

00117 {
00118     CSmartComboBox::PreSubclassWindow();
00119
00120     for(int nIndex = 0; nIndex < KEYWORD_MODE_COUNT; nIndex++)
00121     {
00122         const int itemIndex = AddString(gKeywordModes[nIndex].mode);
00123         if( itemIndex > -1 )
00124         {
00125             SetItemData(itemIndex, (DWORD)gKeywordModes[nIndex].desc);
00126         }
00127     }
00128 }

Here is the call graph for this function:

void CKeywordComboBox::SetDescription ( ) [private]

Set the keyword substitution mode description according to the keywords combo box selection

Note:
The "Current" description is set if no selection is present
Definition at line 89 of file KeywordComboBox.cpp.

References keywordMode::desc, gKeywordModes, and m_hDesc.

Referenced by SetDescriptionWnd().

00090 {
00091     if( m_hDesc && ::IsWindow(m_hDesc) )
00092     {
00093         const char* desc = gKeywordModes[0].desc;
00094         const int selItem = GetCurSel();
00095         if( selItem > -1 )
00096         {
00097             desc = (const char*)GetItemData(selItem);
00098         }
00099
00100         ::SetWindowText(m_hDesc, desc);
00101     }
00102 }

void CKeywordComboBox::SetDescriptionWnd ( HWND hDesc )

Set the description window handle

Parameters:
hDesc Description window handle
Note:
It updates the description window text immediately
Definition at line 109 of file KeywordComboBox.cpp.

References m_hDesc, and SetDescription().

Referenced by CDiff_MAIN::OnInitDialog().

00110 {
00111     m_hDesc = hDesc;
00112     SetDescription();
00113 }

Here is the call graph for this function:

Member Data Documentation

HWND CKeywordComboBox::m_hDesc [private]

Description window handle Definition at line 74 of file KeywordComboBox.h.

Referenced by CKeywordComboBox(), SetDescription(), and SetDescriptionWnd().

The documentation for this class was generated from the following files:
  • common/KeywordComboBox.h
  • common/KeywordComboBox.cpp
Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KeywordDisplayInfo Class Reference

KeywordDisplayInfo Class Reference

Class to hold and support data display. More...

#include <CvsRootDlg.h>

Collaboration diagram for KeywordDisplayInfo:

[legend]
List of all members.

Public Member Functions

void | Create (const KeywordInfo &rowInfo)
const string & | GetName () const
Get name text.
const string & | GetValue () const
Get the keyword value.
void | SetValue (const char *value)
const KeywordInfo & | GetRowInfo () const
Get the row info.

Private Attributes

string | m_name
string | m_value
KeywordInfo m_rowInfo

Detailed Description

Class to hold and support data display.

Definition at line 164 of file CvsRootDlg.h.

Member Function Documentation

void KeywordDisplayInfo::Create ( const KeywordInfo & rowInfo )

Create display info

Parameters:
rowInfo Row info for the keyword
Definition at line 563 of file CvsRootDlg.cpp.

References KeywordInfo::m_keyword, m_name, and m_rowInfo.

Referenced by CCvsRootDlg::DisplayKeywords().

00564 {
00565     m_name = rowInfo.m_keyword;
00566
00567     string::iterator it = m_name.begin();
00568     it++;
00569
00570     if( it != m_name.end() )
00571     {
00572         std::transform(m_name.begin(), it, m_name.begin(), toupper);
00573     }
00574
00575     m_rowInfo = rowInfo;
00576 }

const string & KeywordDisplayInfo::GetName ( ) const

Get name text.

Definition at line 579 of file CvsRootDlg.cpp.

References m_name.

Referenced by CCvsRootDlg::DisplayKeywords(), and CCvsRootDlg::OnEdit().

00580 {
00581     return m_name;
00582 }

const KeywordInfo & KeywordDisplayInfo::GetRowInfo ( ) const

Get the row info.

Definition at line 600 of file CvsRootDlg.cpp.

References m_rowInfo.

Referenced by FormatCvsRoot(), CCvsRootDlg::OnEdit(), CCvsRootDlg::OnItemchangedKeywordlist(), and CCvsRootDlg::UpdateKeywords().

00601 {
00602     return m_rowInfo;
00603 }

const string & KeywordDisplayInfo::GetValue ( ) const

Get the keyword value.

Definition at line 585 of file CvsRootDlg.cpp.

References m_value.

Referenced by CCvsRootDlg::EnableEditControls(), FormatCvsRoot(), CCvsRootDlg::OnClear(), CCvsRootDlg::OnEdit(), and CCvsRootDlg::UpdateKeywords().

00586 {
00587     return m_value;
00588 }

void KeywordDisplayInfo::SetValue ( const char * value )

Set the value

Parameters:
value Value, can be NULL
Definition at line 594 of file CvsRootDlg.cpp.

References m_value.

Referenced by CCvsRootDlg::OnClear(), CCvsRootDlg::OnEdit(), and CCvsRootDlg::UpdateKeywords().

00595 {
00596     m_value = value ? value : "";
00597 }

Member Data Documentation

string KeywordDisplayInfo::m_name [private]

Display keyword's name Definition at line 168 of file CvsRootDlg.h.

Referenced by Create(), and GetName().

KeywordInfo KeywordDisplayInfo::m_rowInfo [private]

Original row data after parsing Definition at line 171 of file CvsRootDlg.h.

Referenced by Create(), and GetRowInfo().

string KeywordDisplayInfo::m_value [private]

Keyword's value Definition at line 169 of file CvsRootDlg.h.

Referenced by GetValue(), and SetValue().

The documentation for this class was generated from the following files:
  • common/CvsRootDlg.h
  • common/CvsRootDlg.cpp
Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KeywordInfo Struct Reference

KeywordInfo Struct Reference

Structure to hold protocol row information. More...

#include <CvsRootDlg.h>

Collaboration diagram for KeywordInfo:

[legend]
List of all members.

Public Attributes

string | m_keyword
string | m_description

Detailed Description

Structure to hold protocol row information.

Definition at line 59 of file CvsRootDlg.h.

Member Data Documentation

string KeywordInfo::m_description

Description Definition at line 62 of file CvsRootDlg.h.

Referenced by CCvsRootDlg::OnEdit(), CCvsRootDlg::OnItemchangedKeywordlist(), and CProtocolParserConsole::Parse().

string KeywordInfo::m_keyword

Keyword Definition at line 61 of file CvsRootDlg.h.

Referenced by KeywordDisplayInfo::Create(), FormatCvsRoot(), CProtocolParserConsole::Parse(), and CCvsRootDlg::UpdateKeywords().

The documentation for this struct was generated from the following file:
  • common/CvsRootDlg.h
Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: keywordMode Struct Reference

keywordMode Struct Reference

Structure to hold the keyword modes and their descriptions. More...

Collaboration diagram for keywordMode:

[legend]
List of all members.

Public Attributes

const char * | mode
const char * | desc

Detailed Description

Structure to hold the keyword modes and their descriptions.

Definition at line 34 of file KeywordComboBox.cpp.

Member Data Documentation

const char* keywordMode::desc

Keyword substitution description Definition at line 37 of file KeywordComboBox.cpp.

Referenced by CKeywordComboBox::SetDescription().

const char* keywordMode::mode

Keyword substitution mode Definition at line 36 of file KeywordComboBox.cpp.

The documentation for this struct was generated from the following file:
  • common/KeywordComboBox.cpp
Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KiColumn Class Reference

KiColumn Class Reference

Column descriptor abstract class. More...

#include <BrowseViewColumn.h>

Inheritance diagram for KiColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const =0
virtual void | GetSetupData (LV_COLUMN *lvc) const =0
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const =0
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const =0
virtual bool | IsDefaultAscending () const

Detailed Description

Column descriptor abstract class.

Definition at line 57 of file BrowseViewColumn.h.

Member Function Documentation

virtual int KiColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [pure virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implemented in KoNameColumn, KoExtColumn, KoPathColumn, KoRevisionColumn, KoOptionColumn, KoEncodingColumn, KoStateColumn, KoTagColumn, KoDateColumn, and KoConflictColumn.

Referenced by _Compare().

virtual int KiColumn::GetColumnIndex ( ) const [pure virtual]

Get the column index

Returns:
The column index

Implemented in KoNameColumn, KoExtColumn, KoPathColumn, KoRevisionColumn, KoOptionColumn, KoEncodingColumn, KoStateColumn, KoTagColumn, KoDateColumn, and KoConflictColumn.

Referenced by _Compare().

virtual void KiColumn::GetSetupData ( LV_COLUMN * lvc ) const [pure virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implemented in KoNameColumn, KoExtColumn, KoPathColumn, KoRevisionColumn, KoOptionColumn, KoEncodingColumn, KoStateColumn, KoTagColumn, KoDateColumn, and KoConflictColumn.

Referenced by CBrowseFileView::AddColumns(), and UCvsFiles::ShowColumns().

virtual void KiColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [pure virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implemented in KoNameColumn, KoExtColumn, KoPathColumn, KoRevisionColumn, KoOptionColumn, KoEncodingColumn, KoStateColumn, KoTagColumn, KoDateColumn, and KoConflictColumn.

Referenced by TViewFill::InitItem(), and CBrowseFileView::OnPrint().

virtual bool KiColumn::IsDefaultAscending ( ) const [inline, virtual]

Check whether the column shall be sorted ascending initially

Returns:
true if the column should be sorted ascending, false otherwise
Note:
Override if the initial sorting order is not ascending

Reimplemented in KoNameColumn, KoExtColumn, and KoPathColumn.

Definition at line 97 of file BrowseViewColumn.h.

Referenced by CBrowseFileView::OnColumnclick().

00098     {
00099         return true;
00100     }

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.h
Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KiColumnModel Class Reference

KiColumnModel Class Reference

Columnar model of the data. More...

#include <BrowseViewColumn.h>

Inheritance diagram for KiColumnModel:

[legend]
List of all members.

Public Member Functions

virtual const KiColumn * | GetAt (const int pos) const =0
virtual int | GetType (const int pos) const =0
virtual int | GetCount () const =0
virtual int | GetColumn (const int type) const

Static Public Member Functions

KiColumnModel * GetRecursiveModel ()
KiColumnModel * GetRegularModel ()

Detailed Description

Columnar model of the data.

Definition at line 104 of file BrowseViewColumn.h.

Member Function Documentation

virtual const KiColumn* KiColumnModel::GetAt ( const int pos ) const [pure virtual]

Get the column descriptor by its index

Parameters:
pos Index to get the column descriptor
Returns:
Column descriptor

Implemented in KoRegularModel, and KoRecursiveModel.

Referenced by CBrowseFileView::AddColumns(), TViewFill::InitItem(), CBrowseFileView::OnColumnclick(), CBrowseFileView::OnPrint(), CBrowseFileView::ResetView(), UCvsFiles::ResetView(), CBrowseFileView::Resort(), UCvsFiles::Resort(), and UCvsFiles::ShowColumns().

int KiColumnModel::GetColumn ( const int type ) const [virtual]

Get the column index by its type

Parameters:
type Column type
Returns:
Column index
Definition at line 828 of file BrowseViewColumn.cpp.

References GetCount(), and GetType().

Referenced by TViewFill::InitItem().

00829 {
00830     const int numColumns = GetCount();
00831
00832     for(int i = 0; i < numColumns; i++)
00833     {
00834         if( type == GetType(i) )
00835         {
00836             return i;
00837         }
00838     }
00839
00840     return 0;
00841 }

Here is the call graph for this function:

virtual int KiColumnModel::GetCount ( ) const [pure virtual]

Get the column count

Returns:
The column count

Implemented in KoRegularModel, and KoRecursiveModel.

Referenced by CBrowseFileView::AddColumns(), GetColumn(), UCvsFiles::HideColumns(), TViewFill::InitItem(), CBrowseFileView::OnPrint(), CBrowseFileView::ResetView(), UCvsFiles::ResetView(), CMainFrame::SetFilterBarMask(), and UCvsFiles::ShowColumns().

KiColumnModel * KiColumnModel::GetRecursiveModel ( ) [static]

Get the recursive model

Returns:
The recursive model
Definition at line 809 of file BrowseViewColumn.cpp.

References modelRecursive.

Referenced by CBrowseFileView::SetRecursive(), and UCvsFiles::SetRecursive().

00810 {
00811     return &modelRecursive;
00812 }

KiColumnModel * KiColumnModel::GetRegularModel ( ) [static]

Get the regular model

Returns:
The regular model
Definition at line 818 of file BrowseViewColumn.cpp.

References modelRegular.

Referenced by CBrowseFileView::SetRecursive(), and UCvsFiles::SetRecursive().

00819 {
00820     return &modelRegular;
00821 }

virtual int KiColumnModel::GetType ( const int pos ) const [pure virtual]

Get the column type by its index

Parameters:
pos Index to get the column type
Returns:
The column type

Implemented in KoRegularModel, and KoRecursiveModel.

Referenced by GetColumn(), CSortHeaderCtrl::OnFilterBtnClicked(), CSortHeaderCtrl::OnFilterChanged(), CBrowseFileView::ResetView(), and CMainFrame::SetFilterBarMask().

The documentation for this class was generated from the following files:
  • common/BrowseViewColumn.h
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:53:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KiFilterBase Class Reference

KiFilterBase Class Reference

Filter's base class. More...

#include <BrowseViewModel.h>

Inheritance diagram for KiFilterBase:

[legend]
List of all members.

Public Member Functions

virtual void | LoadSettings ()=0
Load the filter settings.
virtual void | SaveSettings ()=0
Save the filter settings.
virtual NotificationManager * | GetNotificationManager ()=0
Retrieves notification manager for observing changes.

Detailed Description

Filter's base class.

Definition at line 94 of file BrowseViewModel.h.

Member Function Documentation

virtual NotificationManager* KiFilterBase::GetNotificationManager ( ) [pure virtual]

Retrieves notification manager for observing changes.

Implemented in KoFilterModel, KoRecursionModel, and KoIgnoreModel.

Referenced by UCvsFrame::OnCreate(), UCvsFiles::OnCreate(), CWinCvsBrowser::OnDestroy(), CBrowseFileView::OnDestroy(), UCvsFrame::OnDestroy(), UCvsFiles::OnDestroy(), CWinCvsBrowser::OnInitialUpdate(), and CBrowseFileView::OnInitialUpdate().

virtual void KiFilterBase::LoadSettings ( ) [pure virtual]

Load the filter settings.

Implemented in KoFilterModel, KoRecursionModel, and KoIgnoreModel.

virtual void KiFilterBase::SaveSettings ( ) [pure virtual]

Save the filter settings.

Implemented in KoFilterModel, KoRecursionModel, and KoIgnoreModel.

The documentation for this class was generated from the following file:
  • common/BrowseViewModel.h
Generated on Sat Aug 7 22:53:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KiFilterModel Class Reference

KiFilterModel Class Reference

Interface to filtering entries. More...

#include <BrowseViewModel.h>

Inheritance diagram for KiFilterModel:

[legend]
Collaboration diagram for KiFilterModel:

[legend]
List of all members.

Public Member Functions

virtual bool | IsMatch (const EntnodeData *data) const =0
Checks to see if an item satisfies current filtering criteria.
virtual int | GetFilters () const =0
Get the filters.

Detailed Description

Interface to filtering entries.

Definition at line 110 of file BrowseViewModel.h.

Member Function Documentation

virtual int KiFilterModel::GetFilters ( ) const [pure virtual]

Get the filters.

Implemented in KoFilterModel.

Referenced by KoFileViewTraversalContext::IsHideUnknown(), KoFileViewTraversalContext::IsShowMissing(), KoFileViewTraversalContext::IsShowModified(), KoFileViewTraversalContext::IsShowUnknown(), and TBrowserFill::TBrowserFill().

virtual bool KiFilterModel::IsMatch ( const EntnodeData * data ) const [pure virtual]

Checks to see if an item satisfies current filtering criteria.

Implemented in KoFilterModel.

Referenced by KoFileViewTraversalContext::IsMatch(), and KoTraversalContext::IsMatch().

The documentation for this class was generated from the following file:
  • common/BrowseViewModel.h
Generated on Sat Aug 7 22:53:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KiIgnoreModel Class Reference

KiIgnoreModel Class Reference

Interface to recursive display of entries. More...

#include <BrowseViewModel.h>

Inheritance diagram for KiIgnoreModel:

[legend]
Collaboration diagram for KiIgnoreModel:

[legend]
List of all members.

Public Member Functions

virtual bool IsShowIgnored ()=0
Returns true if displaying ignored files.

Detailed Description

Interface to recursive display of entries.

Definition at line 133 of file BrowseViewModel.h.

Member Function Documentation

virtual bool KiIgnoreModel::IsShowIgnored ( ) [pure virtual]

Returns true if displaying ignored files.

Implemented in KoIgnoreModel.

Referenced by KoFileViewTraversalContext::KoFileViewTraversalContext(), and TBrowserFill::TBrowserFill().

The documentation for this class was generated from the following file:
  • common/BrowseViewModel.h
Generated on Sat Aug 7 22:53:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KiRecursionModel Class Reference

KiRecursionModel Class Reference

Interface to recursive display of entries. More...

#include <BrowseViewModel.h>

Inheritance diagram for KiRecursionModel:

[legend]
Collaboration diagram for KiRecursionModel:

[legend]
List of all members.

Public Member Functions

virtual bool IsShowRecursive ()=0
Returns true if displaying files recursively.

Detailed Description

Interface to recursive display of entries.

Definition at line 123 of file BrowseViewModel.h.

Member Function Documentation

virtual bool KiRecursionModel::IsShowRecursive ( ) [pure virtual]

Returns true if displaying files recursively.

Implemented in KoRecursionModel.

Referenced by KoFileViewTraversalContext::KoFileViewTraversalContext().

The documentation for this class was generated from the following file:
  • common/BrowseViewModel.h
Generated on Sat Aug 7 22:53:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KiSelectionHandler Class Reference

KiSelectionHandler Class Reference

Interface describing a handler to process a selection-related command. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KiSelectionHandler:

[legend]
Collaboration diagram for KiSelectionHandler:

[legend]
List of all members.

Public Member Functions

KiSelectionHandler (const char *strCommand, bool needSelection=true, bool needResetView=false)
virtual | ~KiSelectionHandler ()
kSelType | GetSelType () const
bool | GetNeedSelection () const
bool | GetNeedViewReset () const
virtual void | OnFolder (const char *fullpath)=0
virtual void | OnFiles (MultiFiles *pmf)=0
virtual MultiFiles * | GetSelection ()
virtual bool | NeedsNormalize ()

Protected Attributes

bool m_needSelection
bool m_needViewReset

Private Attributes

UStr m_strCommand
MultiFiles * m_pmf
kSelType m_selType
bool m_autoDelete

Detailed Description

Interface describing a handler to process a selection-related command.

KiSelectionHandler is an abstract class designed to aid processing of a selection-related commands. Create command handlers by deriving from KiSelectionHandler and overriding virtual methods KiSelectionHandler::OnFolder and KiSelectionHandler::OnFiles.

The default value of KiSelectionHandler::m_needSelection can be changed if the command does not require selection to work properly (e.g checkout, import or rtag commands). However it's important to supply the selection whenever available.

The goal of passing the selection is to enable support for additional data retrieval and present the selection information for the user as needed. For example to show the files selected for commit command and enable to perform review of changes using diff command. There are also commands that use the selection information to retrieve the repository data such as modules or tags.

Definition at line 52 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KiSelectionHandler::KiSelectionHandler | ( | const char * | strCommand,
 |  | bool | needSelection = true,
 |  | bool | needViewReset = false
 | ) |

Constructor

Parameters:
strCommand | Command name
needSelection | Need selection indicator
needViewReset | Need reset indicator
Definition at line 42 of file BrowseViewHandlers.cpp.

References kSelNone, and NULL.

00043     : m_strCommand(strCommand), m_pmf(NULL), m_selType(kSelNone),
00044       m_autoDelete(false), m_needSelection(needSelection), m_needViewReset(needViewReset)
00045 {
00046 }

KiSelectionHandler::~KiSelectionHandler ( ) [virtual]

Definition at line 48 of file BrowseViewHandlers.cpp.

References m_autoDelete, and m_pmf.

00049 {
00050     if( m_autoDelete && m_pmf )
00051     {
00052         delete m_pmf;
00053     }
00054 }

Member Function Documentation

bool KiSelectionHandler::GetNeedSelection ( ) const

Get the need selection flag

Returns:
The need selection flag
Definition at line 69 of file BrowseViewHandlers.cpp.

References m_needSelection.

Referenced by CheckSelectionHandler().

00070 {
00071     return m_needSelection;
00072 }

bool KiSelectionHandler::GetNeedViewReset ( ) const

Get the need view reset

Returns:
The need view reset flag
Definition at line 78 of file BrowseViewHandlers.cpp.

References m_needViewReset.

Referenced by UCvsFiles::ProcessSelectionCommand().

00079 {
00080     return m_needViewReset;
00081 }

MultiFiles * KiSelectionHandler::GetSelection ( ) [virtual]

Get the selection

Returns:
The selection as a pointer to MultiFiles object
Note:
Prompts the user if necessary (controlled by KiSelectionHandler::m_needSelection flag)
Definition at line 118 of file BrowseViewHandlers.cpp.

References _i18n, BrowserGetDirectory(), BrowserGetMultiFiles(), CStr, kSelDir, kSelFiles, m_autoDelete, m_needSelection, m_pmf, m_selType, m_strCommand, MultiFiles::newdir(), and NULL.

Referenced by CheckSelectionHandler().

00119 {
00120     if( !m_pmf && m_needSelection )
00121     {
00122         switch( m_selType )
00123         {
00124         case kSelFiles:
00125             m_pmf = new MultiFiles;
00126             if( m_pmf )
00127             {
00128                 m_autoDelete = true;
00129
00130                 CStr strPrompt;
00131                 strPrompt << _i18n("Select files for ");
00132                 strPrompt << m_strCommand;
00133
00134                 if( !BrowserGetMultiFiles(strPrompt, *m_pmf, false) )
00135                 {
00136                     delete m_pmf;
00137                     m_pmf = NULL;
00138                 }
00139             }
00140             break;
00141         case kSelDir:
00142             m_pmf = new MultiFiles;
00143             if( m_pmf )
00144             {
00145                 CStr strPrompt;
00146                 strPrompt << _i18n("Select directory to ");
00147                 strPrompt << m_strCommand;
00148
00149                 CStr dir;
00150                 if( BrowserGetDirectory(strPrompt, dir) )
00151                 {
00152                     m_pmf->newdir(dir);
00153                 }
00154                 else
00155                 {
00156                     delete m_pmf;
00157                     m_pmf = NULL;
00158                 }
00159             }
00160             break;
00161         default:
00162 #ifdef WIN32
00163             ASSERT(FALSE);  // type must be set to something if m_needSelection is true
00164 #endif
00165             break;
00166         }
00167     }
00168
00169     return m_pmf;
00170 }

Here is the call graph for this function:

kSelType KiSelectionHandler::GetSelType ( ) const

Get the selection type

Returns:
The selection type
Definition at line 60 of file BrowseViewHandlers.cpp.

References kSelType, and m_selType.

00061 {
00062     return m_selType;
00063 }

bool KiSelectionHandler::NeedsNormalize ( ) [virtual]

Check whether the command needs the selection to be normalized

Returns:
true if commands needs normalization, false otherwise

Reimplemented in KoGraphHandler, KoAddHandler, KoAddBinaryHandler, and KoAddUnicodeHandler.

Definition at line 176 of file BrowseViewHandlers.cpp.

Referenced by CheckSelectionHandler().

00177 {
00178     return false;
00179 }

void KiSelectionHandler::OnFiles ( MultiFiles * pmf ) [pure virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implemented in KoMoveToTrashHandler, KoUpdateMoveToTrashHandler, TTagHandler< tagType >, TEditHandler< editType >, KoUneditHandler, KoReleaseHandler, KoWatchersHandler, KoEditorsHandler, KoWatchOnHandler, KoWatchOffHandler, KoDiffHandler, KoGraphDiffHandler, KoLogHandler, KoGraphHandler, KoStatusHandler, KoFileRemoveHandler, KoLockHandler, KoUnlockHandler, KoAddHandler, KoAddBinaryHandler, KoAddUnicodeHandler, KoCommitHandler, KoUpdateHandler, KoQueryUpdateHandler, KoAnnotateHandler, KoGraphAnnotateHandler, KoCancelChangesHandler, KoCommandLineHandler, KoImportHandler, KoCheckoutHandler, TRtagHandler< tagType >, KoFileActionHandler, and TLaunchHandler< lauchType >.

Definition at line 107 of file BrowseViewHandlers.cpp.

References kSelFiles, m_pmf, and m_selType.

Referenced by TLaunchHandler< lauchType >::OnFiles(), KoFileActionHandler::OnFiles(), TRtagHandler< tagType >::OnFiles(), KoCheckoutHandler::OnFiles(), KoImportHandler::OnFiles(), KoCommandLineHandler::OnFiles(), KoCancelChangesHandler::OnFiles(), KoGraphAnnotateHandler::OnFiles(), KoAnnotateHandler::OnFiles(), KoQueryUpdateHandler::OnFiles(), KoUpdateHandler::OnFiles(), KoCommitHandler::OnFiles(), KoAddUnicodeHandler::OnFiles(), KoAddBinaryHandler::OnFiles(), KoAddHandler::OnFiles(), KoUnlockHandler::OnFiles(), KoLockHandler::OnFiles(), KoFileRemoveHandler::OnFiles(), KoStatusHandler::OnFiles(), KoGraphHandler::OnFiles(), KoLogHandler::OnFiles(), KoGraphDiffHandler::OnFiles(), KoDiffHandler::OnFiles(), KoWatchOffHandler::OnFiles(), KoWatchOnHandler::OnFiles(), KoEditorsHandler::OnFiles(), KoWatchersHandler::OnFiles(), KoUneditHandler::OnFiles(), TEditHandler< editType >::OnFiles(), TTagHandler< tagType >::OnFiles(), KoMoveToTrashHandler::OnFiles(), CBrowseFileView::ProcessSelectionCommand(), and UCvsFiles::ProcessSelectionCommand().

00108 {
00109     m_selType = kSelFiles;
00110     m_pmf = pmf;
00111 }

void KiSelectionHandler::OnFolder ( const char * fullpath ) [pure virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implemented in KoMoveToTrashHandler, KoUpdateMoveToTrashHandler, TTagHandler< tagType >, TEditHandler< editType >, KoUneditHandler, KoReleaseHandler, KoWatchersHandler, KoEditorsHandler, KoWatchOnHandler, KoWatchOffHandler, KoDiffHandler, KoGraphDiffHandler, KoLogHandler, KoGraphHandler, KoStatusHandler, KoFileRemoveHandler, KoLockHandler, KoUnlockHandler, KoAddHandler, KoAddBinaryHandler, KoAddUnicodeHandler, KoCommitHandler, KoUpdateHandler, KoQueryUpdateHandler, KoAnnotateHandler, KoGraphAnnotateHandler, KoCancelChangesHandler, KoCommandLineHandler, KoImportHandler, KoCheckoutHandler, TRtagHandler< tagType >, KoFileActionHandler, and TLaunchHandler< lauchType >.

Definition at line 88 of file BrowseViewHandlers.cpp.

References kSelDir, m_autoDelete, m_pmf, m_selType, and MultiFiles::newdir().

Referenced by TRtagHandler< tagType >::OnFolder(), KoCheckoutHandler::OnFolder(), KoImportHandler::OnFolder(), KoCommandLineHandler::OnFolder(), KoQueryUpdateHandler::OnFolder(), KoUpdateHandler::OnFolder(), KoCommitHandler::OnFolder(), KoAddUnicodeHandler::OnFolder(), KoAddBinaryHandler::OnFolder(), KoAddHandler::OnFolder(), KoUnlockHandler::OnFolder(), KoLockHandler::OnFolder(), KoStatusHandler::OnFolder(), KoLogHandler::OnFolder(), KoDiffHandler::OnFolder(), KoWatchOffHandler::OnFolder(), KoWatchOnHandler::OnFolder(), KoEditorsHandler::OnFolder(), KoWatchersHandler::OnFolder(), KoReleaseHandler::OnFolder(), KoUneditHandler::OnFolder(), TEditHandler< editType >::OnFolder(), TTagHandler< tagType >::OnFolder(), CWinCvsBrowser::ProcessSelectionCommand(), CBrowseFileView::ProcessSelectionCommand(), UCvsFolders::ProcessSelectionCommand(), and UCvsFiles::ProcessSelectionCommand().

00089 {
00090     m_selType = kSelDir;
00091     if( fullpath )
00092     {
00093         m_pmf = new MultiFiles;
00094         if( m_pmf )
00095         {
00096             m_autoDelete = true;
00097             m_pmf->newdir(fullpath);
00098         }
00099     }
00100 }

Here is the call graph for this function:

Member Data Documentation

bool KiSelectionHandler::m_autoDelete [private]

Indicates whether to delete the command selection allocated memory Definition at line 60 of file BrowseViewHandlers.h.

Referenced by GetSelection(), OnFolder(), and ~KiSelectionHandler().

bool KiSelectionHandler::m_needSelection [protected]

Indicates whether the selection is needed for command Definition at line 63 of file BrowseViewHandlers.h.

Referenced by GetNeedSelection(), and GetSelection().

bool KiSelectionHandler::m_needViewReset [protected]

Indicates whether reseting the view is needed for command Definition at line 64 of file BrowseViewHandlers.h.

Referenced by GetNeedViewReset().

MultiFiles* KiSelectionHandler::m_pmf [private]

Command selection (files or directory) Definition at line 57 of file BrowseViewHandlers.h.

Referenced by GetSelection(), OnFiles(), OnFolder(), and ~KiSelectionHandler().

kSelType KiSelectionHandler::m_selType [private]

Command selection type Definition at line 58 of file BrowseViewHandlers.h.

Referenced by GetSelection(), GetSelType(), OnFiles(), and OnFolder().

UStr KiSelectionHandler::m_strCommand [private]

Command name, used when browsing for selection Definition at line 55 of file BrowseViewHandlers.h.

Referenced by GetSelection().

The documentation for this class was generated from the following files:
  • common/BrowseViewHandlers.h
  • common/BrowseViewHandlers.cpp
Generated on Sat Aug 7 22:53:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoAddBinaryHandler Class Reference

KoAddBinaryHandler Class Reference

Handles binary addition of the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoAddBinaryHandler:

[legend]
Collaboration diagram for KoAddBinaryHandler:

[legend]
List of all members.

Public Member Functions

KoAddBinaryHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)
virtual bool | NeedsNormalize ()

Detailed Description

Handles binary addition of the selected items.

Definition at line 493 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoAddBinaryHandler::KoAddBinaryHandler ( ) [inline]

Definition at line 496 of file BrowseViewHandlers.h.

References _i18n.

00497         : KiSelectionHandler(_i18n("Add Binary"), true, true)
00498     {}

Member Function Documentation

virtual bool KoAddBinaryHandler::NeedsNormalize ( ) [inline, virtual]

Check whether the command needs the selection to be normalized

Returns:
true if commands needs normalization, false otherwise

Reimplemented from KiSelectionHandler.

Definition at line 512 of file BrowseViewHandlers.h.

00513     {
00514         return true;
00515     }

virtual void KoAddBinaryHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 506 of file BrowseViewHandlers.h.

References CvsCmdAdd(), kAddBinary, and KiSelectionHandler::OnFiles().

00507     {
00508         KiSelectionHandler::OnFiles(pmf);
00509         CvsCmdAdd(*this, kAddBinary);
00510     }

Here is the call graph for this function:

virtual void KoAddBinaryHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 500 of file BrowseViewHandlers.h.

References CvsCmdAdd(), and KiSelectionHandler::OnFolder().

00501     {
00502         KiSelectionHandler::OnFolder(fullpath);
00503         CvsCmdAdd(*this);
00504     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:53:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoAddHandler Class Reference

KoAddHandler Class Reference

Handles addition of the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoAddHandler:

[legend]
Collaboration diagram for KoAddHandler:

[legend]
List of all members.

Public Member Functions

KoAddHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)
virtual bool | NeedsNormalize ()

Detailed Description

Handles addition of the selected items.

Definition at line 467 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoAddHandler::KoAddHandler ( ) [inline]

Definition at line 470 of file BrowseViewHandlers.h.

References _i18n.

00471         : KiSelectionHandler(_i18n("Add"), true, true)
00472     {}

Member Function Documentation

virtual bool KoAddHandler::NeedsNormalize ( ) [inline, virtual]

Check whether the command needs the selection to be normalized

Returns:
true if commands needs normalization, false otherwise

Reimplemented from KiSelectionHandler.

Definition at line 486 of file BrowseViewHandlers.h.

00487     {
00488         return true;
00489     }

virtual void KoAddHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 480 of file BrowseViewHandlers.h.

References CvsCmdAdd(), and KiSelectionHandler::OnFiles().

00481     {
00482         KiSelectionHandler::OnFiles(pmf);
00483         CvsCmdAdd(*this);
00484     }

Here is the call graph for this function:

virtual void KoAddHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 474 of file BrowseViewHandlers.h.

References CvsCmdAdd(), and KiSelectionHandler::OnFolder().

00475     {
00476         KiSelectionHandler::OnFolder(fullpath);
00477         CvsCmdAdd(*this);
00478     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:53:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoAddUnicodeHandler Class Reference

KoAddUnicodeHandler Class Reference

Handles unicode addition of the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoAddUnicodeHandler:

[legend]
Collaboration diagram for KoAddUnicodeHandler:

[legend]
List of all members.

Public Member Functions

KoAddUnicodeHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)
virtual bool | NeedsNormalize ()

Detailed Description

Handles unicode addition of the selected items.

Definition at line 519 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoAddUnicodeHandler::KoAddUnicodeHandler ( ) [inline]

Definition at line 522 of file BrowseViewHandlers.h.

References _i18n.

00523         : KiSelectionHandler(_i18n("Add Unicode"), true, true)
00524     {}

Member Function Documentation

virtual bool KoAddUnicodeHandler::NeedsNormalize ( ) [inline, virtual]

Check whether the command needs the selection to be normalized

Returns:
true if commands needs normalization, false otherwise

Reimplemented from KiSelectionHandler.

Definition at line 538 of file BrowseViewHandlers.h.

00539     {
00540         return true;
00541     }

virtual void KoAddUnicodeHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 532 of file BrowseViewHandlers.h.

References CvsCmdAdd(), kAddUnicode, and KiSelectionHandler::OnFiles().

00533     {
00534         KiSelectionHandler::OnFiles(pmf);
00535         CvsCmdAdd(*this, kAddUnicode);
00536     }

Here is the call graph for this function:

virtual void KoAddUnicodeHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 526 of file BrowseViewHandlers.h.

References CvsCmdAdd(), and KiSelectionHandler::OnFolder().

00527     {
00528         KiSelectionHandler::OnFolder(fullpath);
00529         CvsCmdAdd(*this);
00530     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:53:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoAnnotateHandler Class Reference

KoAnnotateHandler Class Reference

Handles annotate on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoAnnotateHandler:

[legend]
Collaboration diagram for KoAnnotateHandler:

[legend]
List of all members.

Public Member Functions

KoAnnotateHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles annotate on the selected items.

Definition at line 608 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoAnnotateHandler::KoAnnotateHandler ( ) [inline]

Definition at line 611 of file BrowseViewHandlers.h.

References _i18n.

00612         : KiSelectionHandler(_i18n("Annotate"))
00613     {}

Member Function Documentation

virtual void KoAnnotateHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 620 of file BrowseViewHandlers.h.

References CvsCmdAnnotate(), and KiSelectionHandler::OnFiles().

00621     {
00622         KiSelectionHandler::OnFiles(pmf);
00623         CvsCmdAnnotate(*this);
00624     }

Here is the call graph for this function:

virtual void KoAnnotateHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 615 of file BrowseViewHandlers.h.

00616     {
00617         /*we avoid processing directory*/
00618     }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:53:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoCancelChangesHandler Class Reference

KoCancelChangesHandler Class Reference

Handles cancel changes on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoCancelChangesHandler:

[legend]
Collaboration diagram for KoCancelChangesHandler:

[legend]
List of all members.

Public Member Functions

KoCancelChangesHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles cancel changes on the selected items.

Definition at line 647 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoCancelChangesHandler::KoCancelChangesHandler ( ) [inline]

Definition at line 650 of file BrowseViewHandlers.h.

References _i18n.

00651         : KiSelectionHandler(_i18n("Cancel Changes"))
00652     {}

Member Function Documentation

virtual void KoCancelChangesHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 659 of file BrowseViewHandlers.h.

References CvsCmdCancelChanges(), and KiSelectionHandler::OnFiles().

00660     {
00661         KiSelectionHandler::OnFiles(pmf);
00662         CvsCmdCancelChanges(*this);
00663     }

Here is the call graph for this function:

virtual void KoCancelChangesHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 654 of file BrowseViewHandlers.h.

00655     {
00656         /*we avoid processing directory*/
00657     }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:53:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoCheckoutHandler Class Reference

KoCheckoutHandler Class Reference

Handles Checkout. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoCheckoutHandler:

[legend]
Collaboration diagram for KoCheckoutHandler:

[legend]
List of all members.

Public Member Functions

KoCheckoutHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles Checkout.

Definition at line 709 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoCheckoutHandler::KoCheckoutHandler ( ) [inline]

Definition at line 712 of file BrowseViewHandlers.h.

References _i18n.

00713         : KiSelectionHandler(_i18n("Checkout"), true, true)
00714     {}

Member Function Documentation

virtual void KoCheckoutHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 722 of file BrowseViewHandlers.h.

References CvsCmdCheckoutModule(), and KiSelectionHandler::OnFiles().

00723     {
00724         KiSelectionHandler::OnFiles(pmf);
00725         CvsCmdCheckoutModule(*this);
00726     }

Here is the call graph for this function:

virtual void KoCheckoutHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 716 of file BrowseViewHandlers.h.

References CvsCmdCheckoutModule(), and KiSelectionHandler::OnFolder().

Referenced by CExploreBar::OnViewCheckout(), and CBrowseFileView::OnViewCheckout().

00717     {
00718         KiSelectionHandler::OnFolder(fullpath);
00719         CvsCmdCheckoutModule(*this);
00720     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:53:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoColumnContext Class Reference

KoColumnContext Class Reference

Context in which a column is accessed. More...

#include <BrowseViewColumn.h>

Collaboration diagram for KoColumnContext:

[legend]
List of all members.

Public Member Functions

KoColumnContext (const char *path)
const UStr & GetPath () const

Private Attributes

UStr m_path

Detailed Description

Context in which a column is accessed.

Definition at line 41 of file BrowseViewColumn.h.

Constructor & Destructor Documentation

KoColumnContext::KoColumnContext ( const char * path )

Definition at line 137 of file BrowseViewColumn.cpp.

00138     : m_path(path)
00139 {
00140 }

Member Function Documentation

const UStr & KoColumnContext::GetPath ( ) const

Get the current path

Returns:
The current path
Definition at line 146 of file BrowseViewColumn.cpp.

References m_path.

Referenced by EntnodeFile::GetRelativePath(), and KoFilterModel::SetContext().

00147 {
00148     return m_path;
00149 }

Member Data Documentation

UStr KoColumnContext::m_path [private]

Current path Definition at line 49 of file BrowseViewColumn.h.

Referenced by GetPath().

The documentation for this class was generated from the following files:
  • common/BrowseViewColumn.h
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:53:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoCommandLineHandler Class Reference

KoCommandLineHandler Class Reference

Handles Command Line. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoCommandLineHandler:

[legend]
Collaboration diagram for KoCommandLineHandler:

[legend]
List of all members.

Public Member Functions

KoCommandLineHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles Command Line.

Definition at line 667 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoCommandLineHandler::KoCommandLineHandler ( ) [inline]

Definition at line 670 of file BrowseViewHandlers.h.

References _i18n.

00671         : KiSelectionHandler(_i18n("Command Line"), false)
00672     {}

Member Function Documentation

virtual void KoCommandLineHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 680 of file BrowseViewHandlers.h.

References CvsCmdCommandLine(), and KiSelectionHandler::OnFiles().

00681     {
00682         KiSelectionHandler::OnFiles(pmf);
00683         CvsCmdCommandLine(*this);
00684     }

Here is the call graph for this function:

virtual void KoCommandLineHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 674 of file BrowseViewHandlers.h.

References CvsCmdCommandLine(), and KiSelectionHandler::OnFolder().

Referenced by CBrowseFileView::OnAppCmdline().

00675     {
00676         KiSelectionHandler::OnFolder(fullpath);
00677         CvsCmdCommandLine(*this);
00678     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:53:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoCommitHandler Class Reference

KoCommitHandler Class Reference

Handles commits of the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoCommitHandler:

[legend]
Collaboration diagram for KoCommitHandler:

[legend]
List of all members.

Public Member Functions

KoCommitHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles commits of the selected items.

Definition at line 545 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoCommitHandler::KoCommitHandler ( ) [inline]

Definition at line 548 of file BrowseViewHandlers.h.

References _i18n.

00549         : KiSelectionHandler(_i18n("Commit"), true, true)
00550     {}

Member Function Documentation

virtual void KoCommitHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 558 of file BrowseViewHandlers.h.

References CvsCmdCommit(), and KiSelectionHandler::OnFiles().

00559     {
00560         KiSelectionHandler::OnFiles(pmf);
00561         CvsCmdCommit(*this);
00562     }

Here is the call graph for this function:

virtual void KoCommitHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 552 of file BrowseViewHandlers.h.

References CvsCmdCommit(), and KiSelectionHandler::OnFolder().

00553     {
00554         KiSelectionHandler::OnFolder(fullpath);
00555         CvsCmdCommit(*this);
00556     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:53:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoConflictColumn Class Reference

KoConflictColumn Class Reference

Conflict column. More...

Inheritance diagram for KoConflictColumn:

[legend]
Collaboration diagram for KoConflictColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const

Detailed Description

Conflict column.

Definition at line 676 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoConflictColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 703 of file BrowseViewColumn.cpp.

References EntnodeData::GetConflict().

00704     {
00705         int res;
00706
00707         const char* s1 = d1->GetConflict();
00708         const char* s2 = d2->GetConflict();
00709
00710         if( s1 != 0L && s2 != 0L )
00711         {
00712             res = strcmp(s1, s2);
00713         }
00714         else
00715         {
00716             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00717         }
00718
00719         return res;
00720     }

Here is the call graph for this function:

virtual int KoConflictColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 680 of file BrowseViewColumn.cpp.

Referenced by GetSetupData().

00681     {
00682         return ColumnIndex::kConflict;
00683     }

virtual void KoConflictColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 685 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and ColumnIndex::GetColumnName().

00686     {
00687 #ifdef WIN32
00688         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00689         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00690         lvc->cx = 150;
00691         lvc->fmt = LVCFMT_LEFT;
00692 #else
00693         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00694         lvc->width = 100;
00695 #endif
00696     }

Here is the call graph for this function:

virtual void KoConflictColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 698 of file BrowseViewColumn.cpp.

References EntnodeData::GetConflict(), and StrSafeCopy().

00699     {
00700         StrSafeCopy(buffer, data->GetConflict(), bufferSize);
00701     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:53:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoDateColumn Class Reference

KoDateColumn Class Reference

Date column. More...

Inheritance diagram for KoDateColumn:

[legend]
Collaboration diagram for KoDateColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const

Detailed Description

Date column.

Definition at line 622 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoDateColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 649 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and GetDateTime().

00650     {
00651         int res = 0;
00652
00653         const char* s1 = (*d1)[GetColumnIndex()];
00654         const char* s2 = (*d2)[GetColumnIndex()];
00655
00656         if( s1 != 0L && s2 != 0L )
00657         {
00658             const time_t t1 = GetDateTime(s1);
00659             const time_t t2 = GetDateTime(s2);
00660
00661             res = t1 < t2 ? -1 : (t1 > t2 ? 1 : 0);
00662         }
00663         else
00664         {
00665             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00666         }
00667
00668         return res;
00669     }

Here is the call graph for this function:

virtual int KoDateColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 626 of file BrowseViewColumn.cpp.

Referenced by Compare(), GetSetupData(), and GetText().

00627     {
00628         return ColumnIndex::kTimeStamp;
00629     }

virtual void KoDateColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 631 of file BrowseViewColumn.cpp.

References GetColumnIndex(), ColumnIndex::GetColumnName(), IsLargeFonts(), and PLATFORM_COLUMN_WIDTH.

00632     {
00633 #ifdef WIN32
00634         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00635         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00636         lvc->cx = (IsLargeFonts()) ? 170 : 150;
00637         lvc->fmt = LVCFMT_LEFT;
00638 #else
00639         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00640         lvc->width = PLATFORM_COLUMN_WIDTH(172, 135);
00641 #endif
00642     }

Here is the call graph for this function:

virtual void KoDateColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 644 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and StrSafeCopy().

00645     {
00646         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00647     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoDiffHandler Class Reference

KoDiffHandler Class Reference

Handles diffing on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoDiffHandler:

[legend]
Collaboration diagram for KoDiffHandler:

[legend]
List of all members.

Public Member Functions

KoDiffHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles diffing on the selected items.

Definition at line 302 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoDiffHandler::KoDiffHandler ( ) [inline]

Definition at line 305 of file BrowseViewHandlers.h.

References _i18n.

00306         : KiSelectionHandler(_i18n("Diff"))
00307     {}

Member Function Documentation

virtual void KoDiffHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 315 of file BrowseViewHandlers.h.

References CvsCmdDiff(), kDiffFile, and KiSelectionHandler::OnFiles().

Referenced by CompatGetCommit(), and CCommit_MAIN::OnDiff().

00316     {
00317         KiSelectionHandler::OnFiles(pmf);
00318         CvsCmdDiff(*this, kDiffFile);
00319     }

Here is the call graph for this function:

virtual void KoDiffHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 309 of file BrowseViewHandlers.h.

References CvsCmdDiff(), kDiffFolder, and KiSelectionHandler::OnFolder().

00310     {
00311         KiSelectionHandler::OnFolder(fullpath);
00312         CvsCmdDiff(*this, kDiffFolder);
00313     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoEditorsHandler Class Reference

KoEditorsHandler Class Reference

Handles editors on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoEditorsHandler:

[legend]
Collaboration diagram for KoEditorsHandler:

[legend]
List of all members.

Public Member Functions

KoEditorsHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles editors on the selected items.

Definition at line 239 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoEditorsHandler::KoEditorsHandler ( ) [inline]

Definition at line 242 of file BrowseViewHandlers.h.

References _i18n.

00243         : KiSelectionHandler(_i18n("Editors"))
00244     {}

Member Function Documentation

virtual void KoEditorsHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 252 of file BrowseViewHandlers.h.

References CvsCmdEditors(), and KiSelectionHandler::OnFiles().

00253     {
00254         KiSelectionHandler::OnFiles(pmf);
00255         CvsCmdEditors(*this);
00256     }

Here is the call graph for this function:

virtual void KoEditorsHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 246 of file BrowseViewHandlers.h.

References CvsCmdEditors(), and KiSelectionHandler::OnFolder().

00247     {
00248         KiSelectionHandler::OnFolder(fullpath);
00249         CvsCmdEditors(*this);
00250     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoEncodingColumn Class Reference

KoEncodingColumn Class Reference

Encoding column. More...

Inheritance diagram for KoEncodingColumn:

[legend]
Collaboration diagram for KoEncodingColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const

Detailed Description

Encoding column.

Definition at line 468 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoEncodingColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 495 of file BrowseViewColumn.cpp.

References GetColumnIndex().

00496     {
00497         int res;
00498
00499         const char* s1 = (*d1)[GetColumnIndex()];
00500         const char* s2 = (*d2)[GetColumnIndex()];
00501
00502         if( s1 != 0L && s2 != 0L )
00503         {
00504             res = stricmp(s1, s2);
00505         }
00506         else
00507         {
00508             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00509         }
00510
00511         return res;
00512     }

Here is the call graph for this function:

virtual int KoEncodingColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 472 of file BrowseViewColumn.cpp.

Referenced by Compare(), GetSetupData(), and GetText().

00473     {
00474         return ColumnIndex::kEncoding;
00475     }

virtual void KoEncodingColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 477 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and ColumnIndex::GetColumnName().

00478     {
00479 #ifdef WIN32
00480         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00481         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00482         lvc->cx = 60;
00483         lvc->fmt = LVCFMT_LEFT;
00484 #else
00485         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00486         lvc->width = 60;
00487 #endif
00488     }

Here is the call graph for this function:

virtual void KoEncodingColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 490 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and StrSafeCopy().

00491     {
00492         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00493     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoExtColumn Class Reference

KoExtColumn Class Reference

Extension column. More...

Inheritance diagram for KoExtColumn:

[legend]
Collaboration diagram for KoExtColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const
virtual bool | IsDefaultAscending () const

Detailed Description

Extension column.

Definition at line 197 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoExtColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 224 of file BrowseViewColumn.cpp.

References EntnodeData::GetExtension(), and EntnodeData::GetName().

00225     {
00226         int res = 0;
00227
00228         // Compare extensions
00229         const char* p1 = d1->GetExtension();
00230         const char* p2 = d2->GetExtension();
00231
00232         if( p1 && p2 )
00233         {
00234             res = stricmp(p1, p2);
00235             if( res == 0 )
00236             {
00237                 // Compare filenames, if ext. are identical
00238                 res = stricmp(d1->GetName(), d2->GetName());
00239             }
00240         }
00241         else if( p1 )
00242         {
00243             res = +1;
00244         }
00245         else if( p2 )
00246         {
00247             res = -1;
00248         }
00249         else
00250         {
00251             // Compare filenames, if their are no ext.
00252             res = stricmp(d1->GetName(), d2->GetName());
00253         }
00254
00255         return res;
00256     }

Here is the call graph for this function:

virtual int KoExtColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 201 of file BrowseViewColumn.cpp.

Referenced by GetSetupData().

00202     {
00203         return ColumnIndex::kExtention;
00204     }

virtual void KoExtColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 206 of file BrowseViewColumn.cpp.

References GetColumnIndex(), ColumnIndex::GetColumnName(), and PLATFORM_COLUMN_WIDTH.

00207     {
00208 #ifdef WIN32
00209         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00210         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00211         lvc->cx = 50;
00212         lvc->fmt = LVCFMT_LEFT;
00213 #else
00214         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00215         lvc->width = PLATFORM_COLUMN_WIDTH(150, 60);
00216 #endif
00217     }

Here is the call graph for this function:

virtual void KoExtColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 219 of file BrowseViewColumn.cpp.

References EntnodeData::GetExtension(), and StrSafeCopy().

00220     {
00221         StrSafeCopy(buffer, data->GetExtension(), bufferSize);
00222     }

Here is the call graph for this function:

virtual bool KoExtColumn::IsDefaultAscending ( ) const [inline, virtual]

Check whether the column shall be sorted ascending initially

Returns:
true if the column should be sorted ascending, false otherwise
Note:
Override if the initial sorting order is not ascending

Reimplemented from KiColumn.

Definition at line 258 of file BrowseViewColumn.cpp.

00259     {
00260         return false;
00261     }

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoFileActionHandler Class Reference

KoFileActionHandler Class Reference

Handles file action. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoFileActionHandler:

[legend]
Collaboration diagram for KoFileActionHandler:

[legend]
List of all members.

Public Member Functions

KoFileActionHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles file action.

Definition at line 756 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoFileActionHandler::KoFileActionHandler ( ) [inline]

Definition at line 759 of file BrowseViewHandlers.h.

References _i18n.

00760         : KiSelectionHandler(_i18n("File Action"), true)
00761     {}

Member Function Documentation

virtual void KoFileActionHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 766 of file BrowseViewHandlers.h.

References CvsCmdFileAction(), and KiSelectionHandler::OnFiles().

Referenced by CGraphView::FileAction().

00767     {
00768         KiSelectionHandler::OnFiles(pmf);
00769         CvsCmdFileAction(*this);
00770     }

Here is the call graph for this function:

virtual void KoFileActionHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 763 of file BrowseViewHandlers.h.

00764     { /* ignore */ }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoFileRemoveHandler Class Reference

KoFileRemoveHandler Class Reference

Handles file remove requests. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoFileRemoveHandler:

[legend]
Collaboration diagram for KoFileRemoveHandler:

[legend]
List of all members.

Public Member Functions

KoFileRemoveHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles file remove requests.

Definition at line 408 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoFileRemoveHandler::KoFileRemoveHandler ( ) [inline]

Definition at line 411 of file BrowseViewHandlers.h.

References _i18n.

00412         : KiSelectionHandler(_i18n("Remove"), true, true)
00413     {}

Member Function Documentation

virtual void KoFileRemoveHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 418 of file BrowseViewHandlers.h.

References CvsCmdRemove(), and KiSelectionHandler::OnFiles().

00419     {
00420         KiSelectionHandler::OnFiles(pmf);
00421         CvsCmdRemove(*this);
00422     }

Here is the call graph for this function:

virtual void KoFileRemoveHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 415 of file BrowseViewHandlers.h.

00416     { /* folder cannot be removed */ }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoFileViewTraversalContext Class Reference

KoFileViewTraversalContext Class Reference

Context for traversing. More...

#include <BrowseFileView.h>

Collaboration diagram for KoFileViewTraversalContext:

[legend]
List of all members.

Public Member Functions

KoFileViewTraversalContext (CBrowseFileView *view)
bool | IsRecursive () const
Get the recursive flag.
bool | IsShowIgnored () const
Get the show ignored flag.
bool | IsShowUnknown () const
Get the unknown flag.
bool | IsHideUnknown () const
Get the hide unknown flag.
bool | IsShowMissing () const
Get the show missing flag.
bool | IsShowModified () const
Get the show missing flag.
bool | IsMatch (EntnodeData *data) const
CBrowseFileView * | GetView () const
Get the file view.

Private Attributes

bool m_isRecursive
bool m_isShowIgnored
KiFilterModel * m_filter
CBrowseFileView * m_view

Detailed Description

Context for traversing.

Definition at line 96 of file BrowseFileView.h.

Constructor & Destructor Documentation

KoFileViewTraversalContext::KoFileViewTraversalContext ( CBrowseFileView * view )

Definition at line 113 of file BrowseFileView.cpp.

References CWincvsApp::GetFilterModel(), CWincvsApp::GetIgnoreModel(), CWincvsApp::GetRecursionModel(), KiIgnoreModel::IsShowIgnored(), KiRecursionModel::IsShowRecursive(), m_filter, m_isRecursive, m_isShowIgnored, and NULL.

00114     : m_view(view), m_filter(NULL), m_isRecursive(false), m_isShowIgnored(false)
00115 {
00116     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
00117     {
00118         m_filter = app->GetFilterModel();
00119         m_isRecursive = app->GetRecursionModel()->IsShowRecursive();
00120         m_isShowIgnored = app->GetIgnoreModel()->IsShowIgnored();
00121     }
00122 }

Here is the call graph for this function:

Member Function Documentation

CBrowseFileView * KoFileViewTraversalContext::GetView ( ) const

Get the file view.

Definition at line 161 of file BrowseFileView.cpp.

References m_view.

00162 {
00163     return m_view;
00164 }

bool KoFileViewTraversalContext::IsHideUnknown ( ) const

Get the hide unknown flag.

Definition at line 143 of file BrowseFileView.cpp.

References KiFilterModel::GetFilters(), kFilterHideUnknown, and m_filter.

00144 {
00145     return (m_filter->GetFilters() & kFilterHideUnknown) != 0;
00146 }

Here is the call graph for this function:

bool KoFileViewTraversalContext::IsMatch ( EntnodeData * data ) const

Check the node's match

Parameters:
data Node data to be checked
Returns:
true if node matches, false otherwise
Definition at line 171 of file BrowseFileView.cpp.

References KiFilterModel::IsMatch(), and m_filter.

00172 {
00173     return m_filter->IsMatch(data);
00174 }

Here is the call graph for this function:

bool KoFileViewTraversalContext::IsRecursive ( ) const

Get the recursive flag.

Definition at line 125 of file BrowseFileView.cpp.

References m_isRecursive.

Referenced by CBrowseFileView::OnInitialUpdate(), and CBrowseFileView::ResetView().

00126 {
00127     return m_isRecursive;
00128 }

bool KoFileViewTraversalContext::IsShowIgnored ( ) const

Get the show ignored flag.

Definition at line 131 of file BrowseFileView.cpp.

References m_isShowIgnored.

00132 {
00133     return m_isShowIgnored;
00134 }

bool KoFileViewTraversalContext::IsShowMissing ( ) const

Get the show missing flag.

Definition at line 149 of file BrowseFileView.cpp.

References KiFilterModel::GetFilters(), kFilterMissing, and m_filter.

00150 {
00151     return (m_filter->GetFilters() & kFilterMissing) != 0;
00152 }

Here is the call graph for this function:

bool KoFileViewTraversalContext::IsShowModified ( ) const

Get the show missing flag.

Definition at line 155 of file BrowseFileView.cpp.

References KiFilterModel::GetFilters(), kFilterModified, and m_filter.

00156 {
00157     return (m_filter->GetFilters() & kFilterModified) != 0;
00158 }

Here is the call graph for this function:

bool KoFileViewTraversalContext::IsShowUnknown ( ) const

Get the unknown flag.

Definition at line 137 of file BrowseFileView.cpp.

References KiFilterModel::GetFilters(), kFilterUnknown, and m_filter.

00138 {
00139     return (m_filter->GetFilters() & kFilterUnknown) != 0;
00140 }

Here is the call graph for this function:

Member Data Documentation

KiFilterModel* KoFileViewTraversalContext::m_filter [private]

Filter model Definition at line 106 of file BrowseFileView.h.

Referenced by IsHideUnknown(), IsMatch(), IsShowMissing(), IsShowModified(), IsShowUnknown(), and KoFileViewTraversalContext().

bool KoFileViewTraversalContext::m_isRecursive [private]

Recursive flag Definition at line 104 of file BrowseFileView.h.

Referenced by IsRecursive(), and KoFileViewTraversalContext().

bool KoFileViewTraversalContext::m_isShowIgnored [private]

Show ignored flag Definition at line 105 of file BrowseFileView.h.

Referenced by IsShowIgnored(), and KoFileViewTraversalContext().

CBrowseFileView* KoFileViewTraversalContext::m_view [private]

File view Definition at line 108 of file BrowseFileView.h.

Referenced by GetView().

The documentation for this class was generated from the following files:
  • WinCvs/BrowseFileView.h
  • WinCvs/BrowseFileView.cpp
Generated on Sat Aug 7 22:54:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoFilterMask Class Reference

KoFilterMask Class Reference

Filter mask item. More...

#include <BrowseViewModel.h>

Collaboration diagram for KoFilterMask:

[legend]
List of all members.

Public Member Functions

bool | SetMask (const char *mask)
bool | IsMatch (const int type, const EntnodeData *data, const KoColumnContext *context) const
bool | Empty () const

Private Attributes

std::string | m_mask
std::vector< UStr > | m_tokens

Detailed Description

Filter mask item.

Definition at line 143 of file BrowseViewModel.h.

Member Function Documentation

bool KoFilterMask::Empty ( ) const

Check whether the filter mask is empty

Returns:
true if filter mask is empty, false otherwise
Definition at line 267 of file BrowseViewModel.cpp.

References m_tokens.

Referenced by KoFilterModel::SetMask().

00268 {
00269     return m_tokens.empty();
00270 }

bool KoFilterMask::IsMatch | ( | const int | type,
 |  | const EntnodeData * | data,
 |  | const KoColumnContext * | context
 | ) | const

Check whether the given node matches the mask

Parameters:
type | Type of match to test
data | Node to be tested
context | Column context
Returns:
true if node matches the mask, false otherwise
Note:
All column types are matched in file-specific way temporarily (which is why it has redundant repetitions of code). This ought to change as we will profile the matching algorithm to the specifics of each column
Definition at line 153 of file BrowseViewModel.cpp.

References EntnodeData::GetConflict(), EntnodeData::GetExtension(), EntnodeData::GetName(), EntnodeFile::GetRelativePath(), m_tokens, and MatchIgnoredList().

00154 {
00155     bool res = false;
00156
00157     switch( type )
00158     {
00159     case ColumnIndex::kName:
00160         if( MatchIgnoredList(data->GetName(), m_tokens) )
00161         {
00162             res = true;
00163         }
00164         break;
00165     case ColumnIndex::kExtention:
00166         if( MatchIgnoredList(data->GetExtension(), m_tokens) )
00167         {
00168             res = true;
00169         }
00170         break;
00171     case ColumnIndex::kRevision:
00172         {
00173             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00174             if( node )
00175             {
00176                 if( MatchIgnoredList((*node)[EntnodeFile::kVN], m_tokens) )
00177                 {
00178                     res = true;
00179                 }
00180             }
00181         }
00182         break;
00183     case ColumnIndex::kOption:
00184         {
00185             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00186             if( node )
00187             {
00188                 if( MatchIgnoredList((*node)[EntnodeFile::kOption], m_tokens) )
00189                 {
00190                     res = true;
00191                 }
00192             }
00193         }
00194         break;
00195     case ColumnIndex::kEncoding:
00196         {
00197             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00198             if( node )
00199             {
00200                 if( MatchIgnoredList((*node)[EntnodeFile::kEncoding], m_tokens) )
00201                 {
00202                     res = true;
00203                 }
00204             }
00205         }
00206         break;
00207     case ColumnIndex::kState:
00208         if( MatchIgnoredList((*data)[EntnodeData::kState], m_tokens) )
00209         {
00210             res = true;
00211         }
00212         break;
00213     case ColumnIndex::kStickyTag:
00214         {
00215             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00216             if( node )
00217             {
00218                 if( MatchIgnoredList((*node)[EntnodeFile::kTag], m_tokens) )
00219                 {
00220                     res = true;
00221                 }
00222             }
00223         }
00224         break;
00225     case ColumnIndex::kTimeStamp:
00226         {
00227             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00228             if( node )
00229             {
00230                 if( MatchIgnoredList((*node)[EntnodeFile::kTS], m_tokens) )
00231                 {
00232                     res = true;
00233                 }
00234             }
00235         }
00236         break;
00237     case ColumnIndex::kConflict:
00238         if( MatchIgnoredList(data->GetConflict(), m_tokens) )
00239         {
00240             res = true;
00241         }
00242         break;
00243     case ColumnIndex::kPath:
00244         {
00245             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00246             if( node )
00247             {
00248                 if( MatchIgnoredList(node->GetRelativePath(context), m_tokens) )
00249                 {
00250                     res = true;
00251                 }
00252             }
00253         }
00254         break;
00255     default:
00256         // Nothing to do
00257         break;
00258     }
00259
00260     return res;
00261 }

Here is the call graph for this function:

bool KoFilterMask::SetMask ( const char * mask )

Set new mask

Parameters:
mask Mask to be set
Returns:
true if mask was changed, false otherwise
Definition at line 113 of file BrowseViewModel.cpp.

References FILTER_TOKEN_SEPARATORS, free, m_mask, m_tokens, NULL, and strdup().

Referenced by KoFilterModel::SetMask().

00114 {
00115     bool changed = m_mask.empty() || stricmp(m_mask.c_str(), mask) != 0;
00116     if( changed )
00117     {
00118         m_mask = mask;
00119         m_tokens.clear();
00120
00121         if( !m_mask.empty() )
00122         {
00123             // Build token list
00124             char* buffer = strdup(mask);
00125             static const char separators[] = FILTER_TOKEN_SEPARATORS;
00126
00127             for(char* token = strtok(buffer, separators); token; token = strtok(NULL, separators))
00128             {
00129                 m_tokens.push_back(UStr(token));
00130             }
00131
00132             free(buffer);
00133         }
00134     }
00135
00136     if( m_mask.empty() )
00137     {
00138         m_tokens.clear();
00139     }
00140
00141     return changed;
00142 }

Here is the call graph for this function:

Member Data Documentation

std::string KoFilterMask::m_mask [private]

Filter mask Definition at line 150 of file BrowseViewModel.h.

Referenced by SetMask().

std::vector<UStr> KoFilterMask::m_tokens [private]

Tokenized filter mask Definition at line 151 of file BrowseViewModel.h.

Referenced by Empty(), IsMatch(), and SetMask().

The documentation for this class was generated from the following files:
  • common/BrowseViewModel.h
  • common/BrowseViewModel.cpp
Generated on Sat Aug 7 22:54:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoFilterModel Class Reference

KoFilterModel Class Reference

Interface to filtering entries. More...

#include <BrowseViewModel.h>

Inheritance diagram for KoFilterModel:

[legend]
Collaboration diagram for KoFilterModel:

[legend]
List of all members.

Public Member Functions

KoFilterModel ()
virtual | ~KoFilterModel ()
virtual void | LoadSettings ()
Load the filter settings.
virtual void | SaveSettings ()
Save the filter settings.
virtual NotificationManager * | GetNotificationManager ()
Retrieves notification manager for observing changes.
virtual bool | IsMatch (const EntnodeData *data) const
Checks to see if an item satisfies current filtering criteria.
virtual int | GetFilters () const
Get the filters.
void | ToggleFilterMasksEnable ()
Toggle the filter masks enable flag.
bool | IsFilterMasksEnable () const
Get the filter masks enable flag.
bool | HasFilterMasks () const
bool | IsDefaultMode () const
Check whether the filter is in default mode - to show flags are set.
void | ClearAll ()
bool | HasFilters () const
bool | HasAnyModified () const
bool | SetMask (int type, const char *mask)
void | SetContext (const KoColumnContext *context)
void | ToggleModified ()
Toggle modified flag.
bool | IsModified () const
Get the modified flag.
void | ToggleConflict ()
Toggle show conflict flag.
bool | IsConflict () const
Get the show conflict flag.
void | ToggleUnknown ()
Toggle show unknown flag.
bool | IsUnknown () const
Get the show unknown flag.
void | ToggleHideUnknown ()
Toggle hide unknown flag.
bool | IsHideUnknown () const
Get the hide unknown flag.
void | ToggleMissing ()
Toggle show missing flag.
bool | IsMissing () const
Get the show missing flag.
void | ToggleHideMissing ()
Toggle hide missing flag.
bool | IsHideMissing () const
Get the hide missing flag.
void | ToggleChanged ()
Toggle changed flag.
bool | IsChanged () const
Get the changed flag.
void | ToggleAdded ()
Toggle added flag.
bool | IsAdded () const
Get the added flag.
void | ToggleRemoved ()
Toggle removed flag.
bool | IsRemoved () const
Get the removed flag.

Protected Member Functions

void | ToggleFilter (int filter)
Toggle specified filter.
bool | HasFilter (const int filter) const
Check whether the given filter is set.

Protected Attributes

int m_filters
bool m_filterMasksEnable
FilterMaskContainer m_filterMask
KoColumnContext * m_context
NotificationManager m_manager

Detailed Description

Interface to filtering entries.

Definition at line 164 of file BrowseViewModel.h.

Constructor & Destructor Documentation

KoFilterModel::KoFilterModel ( )

Definition at line 275 of file BrowseViewModel.cpp.

References kFilterNone, and NULL.

00276     : m_filters(kFilterNone), m_context(NULL)
00277 {
00278 }

KoFilterModel::~KoFilterModel ( ) [virtual]

Definition at line 280 of file BrowseViewModel.cpp.

References m_context.

00281 {
00282     delete m_context;
00283 }

Member Function Documentation

void KoFilterModel::ClearAll ( )

Clear all filters Definition at line 427 of file BrowseViewModel.cpp.

References kFilterNone, and m_filters.

Referenced by CMainFrame::ClearFilters(), and CMainFrame::OnViewClearall().

00428 {
00429     m_filters = kFilterNone;
00430 }

int KoFilterModel::GetFilters ( ) const [virtual]

Get the filters.

Implements KiFilterModel.

Definition at line 451 of file BrowseViewModel.cpp.

References m_filters.

00452 {
00453     return m_filters;
00454 }

NotificationManager * KoFilterModel::GetNotificationManager ( ) [virtual]

Retrieves notification manager for observing changes.

Implements KiFilterBase.

Definition at line 315 of file BrowseViewModel.cpp.

References m_manager.

Referenced by CMainFrame::LoadLocationSettings(), UCvsFrame::OnCmdReload(), UCvsFrame::OnFilterMaskEntered(), UCvsFrame::OnHideUnknown(), CMainFrame::OnViewAdded(), UCvsFrame::OnViewAdded(), CMainFrame::OnViewChanged(), UCvsFrame::OnViewChanged(), CMainFrame::OnViewClearall(), CMainFrame::OnViewConflict(), UCvsFrame::OnViewConflict(), CMainFrame::OnViewHidemissing(), CMainFrame::OnViewHideunknown(), CMainFrame::OnViewMissing(), UCvsFrame::OnViewMissing(), CMainFrame::OnViewModified(), UCvsFrame::OnViewModified(), CMainFrame::OnViewRemoved(), UCvsFrame::OnViewRemoved(), CMainFrame::OnViewUnknown(), and UCvsFrame::OnViewUnknown().

00316 {
00317     return &m_manager;
00318 }

bool KoFilterModel::HasAnyModified ( ) const

Check whether any of the modified filters are active

Returns:
true if any modified filter is active, false otherwise
Definition at line 419 of file BrowseViewModel.cpp.

References kFilterModified, kFilterNone, and m_filters.

Referenced by CMainFrame::OnUpdateViewHidemissing().

00420 {
00421     return kFilterNone != (kFilterModified & m_filters);
00422 }

bool KoFilterModel::HasFilter ( const int filter ) const [protected]

Check whether the given filter is set.

Definition at line 529 of file BrowseViewModel.cpp.

References m_filters.

Referenced by IsAdded(), IsChanged(), IsConflict(), IsHideMissing(), IsHideUnknown(), IsMatch(), IsMissing(), IsRemoved(), IsUnknown(), SaveSettings(), ToggleFilter(), ToggleHideMissing(), ToggleHideUnknown(), ToggleMissing(), and ToggleUnknown().

00530 {
00531     return (m_filters & filter) != 0;
00532 }

bool KoFilterModel::HasFilterMasks ( ) const

Check whether any file masks are present

Returns:
true if any file masks are present, false otherwise
Definition at line 472 of file BrowseViewModel.cpp.

References m_filterMask.

Referenced by CMainFrame::OnUpdateViewFilterbarClearall().

00473 {
00474     return m_filterMask.size() > 0;
00475 }

bool KoFilterModel::HasFilters ( ) const

Check whether any filters are active

Returns:
true if any filter is active, false otherwise
Note:
File mask is not considered a filter
Definition at line 410 of file BrowseViewModel.cpp.

References kFilterNone, and m_filters.

Referenced by CMainFrame::OnUpdateViewClearall().

00411 {
00412     return kFilterNone != m_filters;
00413 }

bool KoFilterModel::IsAdded ( ) const

Get the added flag.

Definition at line 646 of file BrowseViewModel.cpp.

References HasFilter(), and kFilterAdded.

Referenced by UCvsFrame::OnCmdUIViewAdded(), and CMainFrame::OnUpdateViewAdded().

00647 {
00648     return HasFilter(kFilterAdded);
00649 }

Here is the call graph for this function:

bool KoFilterModel::IsChanged ( ) const

Get the changed flag.

Definition at line 634 of file BrowseViewModel.cpp.

References HasFilter(), and kFilterChanged.

Referenced by UCvsFrame::OnCmdUIViewChanged(), and CMainFrame::OnUpdateViewChanged().

00635 {
00636     return HasFilter(kFilterChanged);
00637 }

Here is the call graph for this function:

bool KoFilterModel::IsConflict ( ) const

Get the show conflict flag.

Definition at line 554 of file BrowseViewModel.cpp.

References HasFilter(), and kFilterConflicts.

Referenced by UCvsFrame::OnCmdUIViewConflict(), and CMainFrame::OnUpdateViewConflict().

00555 {
00556     return HasFilter(kFilterConflicts);
00557 }

Here is the call graph for this function:

bool KoFilterModel::IsDefaultMode ( ) const

Check whether the filter is in default mode - to show flags are set.

Definition at line 321 of file BrowseViewModel.cpp.

References kFilterAdded, kFilterChanged, kFilterConflicts, kFilterMissing, kFilterRemoved, and m_filters.

Referenced by IsMatch(), UCvsFrame::OnCmdUIHideUnknown(), and CMainFrame::OnUpdateViewHideunknown().

00322 {
00323     return !((kFilterConflicts | kFilterChanged | kFilterMissing | kFilterAdded | kFilterRemoved) & m_filters);
00324 }

bool KoFilterModel::IsFilterMasksEnable ( ) const

Get the filter masks enable flag.

Definition at line 463 of file BrowseViewModel.cpp.

References m_filterMasksEnable.

Referenced by CMainFrame::IsFilterMasksEnable(), CMainFrame::OnUpdateViewFilterbarClearall(), and CMainFrame::OnUpdateViewFilterbarEnable().

00464 {
00465     return m_filterMasksEnable;
00466 }

bool KoFilterModel::IsHideMissing ( ) const

Get the hide missing flag.

Definition at line 622 of file BrowseViewModel.cpp.

References HasFilter(), and kFilterHideMissing.

Referenced by CMainFrame::OnUpdateViewHidemissing().

00623 {
00624     return HasFilter(kFilterHideMissing);
00625 }

Here is the call graph for this function:

bool KoFilterModel::IsHideUnknown ( ) const

Get the hide unknown flag.

Definition at line 588 of file BrowseViewModel.cpp.

References HasFilter(), and kFilterHideUnknown.

Referenced by UCvsFrame::OnCmdUIHideUnknown(), and CMainFrame::OnUpdateViewHideunknown().

00589 {
00590     return HasFilter(kFilterHideUnknown);
00591 }

Here is the call graph for this function:

bool KoFilterModel::IsMatch ( const EntnodeData * data ) const [virtual]

Checks to see if an item satisfies current filtering criteria.

Implements KiFilterModel.

Definition at line 326 of file BrowseViewModel.cpp.

References EntnodeData::GetConflict(), HasFilter(), IsDefaultMode(), EntnodeData::IsMissing(), EntnodeData::IsRemoved(), EntnodeData::IsUnknown(), EntnodeData::IsUnmodified(), kFilterAdded, kFilterChanged, kFilterConflicts, kFilterHideMissing, kFilterHideUnknown, kFilterMissing, kFilterRemoved, kFilterUnknown, m_context, m_filterMask, m_filterMasksEnable, and NULL.

00327 {
00328     if( m_filterMasksEnable )
00329     {
00330         // Check to see if any filter matches
00331         for(FilterMaskContainer::const_iterator i = m_filterMask.begin(); i != m_filterMask.end(); ++i)
00332         {
00333             if( !(*i).second.Empty() && !(*i).second.IsMatch((*i).first, data, m_context) )
00334             {
00335                 return false;
00336             }
00337         }
00338     }
00339
00340     if( IsDefaultMode() && !HasFilter(kFilterUnknown) )
00341     {
00342         // Check if unknown files are to be hidden
00343         if( data->IsUnknown() && HasFilter(kFilterHideUnknown) )
00344         {
00345             // Unknown item match
00346             return false;
00347         }
00348
00349         if( data->IsMissing() && HasFilter(kFilterHideMissing) )
00350         {
00351             // Hide missing item match
00352             return false;
00353         }
00354
00355         return true;
00356     }
00357
00358     if( data->IsMissing() && data->IsRemoved() && HasFilter(kFilterRemoved) )
00359     {
00360         // Removed item match
00361         return true;
00362     }
00363
00364     if( data->IsMissing() && !data->IsRemoved() && HasFilter(kFilterMissing) )
00365     {
00366         // Missing item match
00367         return true;
00368     }
00369
00370     if( data->IsUnknown() && HasFilter(kFilterUnknown) )
00371     {
00372         // Unknown item match
00373         return true;
00374     }
00375
00376     if( (data->GetConflict() != NULL) && HasFilter(kFilterConflicts) )
00377     {
00378         // Conflict match
00379         return true;
00380     }
00381
00382     if( !data->IsUnmodified() )
00383     {
00384         // Can be either changed or added
00385         const char* vn = (*data)[EntnodeFile::kVN];
00386         const bool isAdded = vn && (strcmp(vn, "0") == 0);
00387
00388         if( isAdded && HasFilter(kFilterAdded) )
00389         {
00390             // Added file match
00391             return true;
00392         }
00393
00394         if( !isAdded && HasFilter(kFilterChanged) && !data->GetConflict() )
00395         {
00396             // Changed file match
00397             return true;
00398         }
00399     }
00400
00401     // No match
00402     return false;
00403 }

Here is the call graph for this function:

bool KoFilterModel::IsMissing ( ) const

Get the show missing flag.

Definition at line 605 of file BrowseViewModel.cpp.

References HasFilter(), and kFilterMissing.

Referenced by UCvsFrame::OnCmdUIViewMissing(), and CMainFrame::OnUpdateViewMissing().

00606 {
00607     return HasFilter(kFilterMissing);
00608 }

Here is the call graph for this function:

bool KoFilterModel::IsModified ( ) const

Get the modified flag.

Definition at line 446 of file BrowseViewModel.cpp.

References kFilterModified, and m_filters.

Referenced by UCvsFrame::OnCmdUIViewModified(), CMainFrame::OnUpdateViewModified(), and ToggleModified().

00447 {
00448     return (kFilterModified & m_filters) == kFilterModified;
00449 }

bool KoFilterModel::IsRemoved ( ) const

Get the removed flag.

Definition at line 658 of file BrowseViewModel.cpp.

References HasFilter(), and kFilterRemoved.

Referenced by UCvsFrame::OnCmdUIViewRemoved(), and CMainFrame::OnUpdateViewRemoved().

00659 {
00660     return HasFilter(kFilterRemoved);
00661 }

Here is the call graph for this function:

bool KoFilterModel::IsUnknown ( ) const

Get the show unknown flag.

Definition at line 571 of file BrowseViewModel.cpp.

References HasFilter(), and kFilterUnknown.

Referenced by UCvsFrame::OnCmdUIViewUnknown(), and CMainFrame::OnUpdateViewUnknown().

00572 {
00573     return HasFilter(kFilterUnknown);
00574 }

Here is the call graph for this function:

void KoFilterModel::LoadSettings ( ) [virtual]

Load the filter settings.

Implements KiFilterBase.

Definition at line 285 of file BrowseViewModel.cpp.

References gFilterMasksEnable, gViewAdded, gViewChanged, gViewConflicts, gViewHideMissing, gViewHideUnknown, gViewMissing, gViewRemoved, gViewUnknown, kFilterAdded, kFilterChanged, kFilterConflicts, kFilterHideMissing, kFilterHideUnknown, kFilterMissing, kFilterNone, kFilterRemoved, kFilterUnknown, m_filterMasksEnable, and m_filters.

Referenced by CMainFrame::LoadLocationSettings().

00286 {
00287     m_filters = kFilterNone;
00288
00289     m_filters |= gViewChanged       ? kFilterChanged : 0;
00290     m_filters |= gViewAdded         ? kFilterAdded : 0;
00291     m_filters |= gViewRemoved       ? kFilterRemoved : 0;
00292     m_filters |= gViewConflicts     ? kFilterConflicts : 0;
00293     m_filters |= gViewMissing       ? kFilterMissing : 0;
00294     m_filters |= gViewHideMissing   ? kFilterHideMissing : 0;
00295     m_filters |= gViewUnknown       ? kFilterUnknown : 0;
00296     m_filters |= gViewHideUnknown   ? kFilterHideUnknown : 0;
00297
00298     m_filterMasksEnable = gFilterMasksEnable;
00299 }

void KoFilterModel::SaveSettings ( ) [virtual]

Save the filter settings.

Implements KiFilterBase.

Definition at line 301 of file BrowseViewModel.cpp.

References gFilterMasksEnable, gViewAdded, gViewChanged, gViewConflicts, gViewHideMissing, gViewHideUnknown, gViewMissing, gViewRemoved, gViewUnknown, HasFilter(), kFilterAdded, kFilterChanged, kFilterConflicts, kFilterHideMissing, kFilterHideUnknown, kFilterMissing, kFilterRemoved, kFilterUnknown, and m_filterMasksEnable.

Referenced by CMainFrame::StoreLocationSettings().

00302 {
00303     gViewChanged        = HasFilter(kFilterChanged);
00304     gViewAdded      = HasFilter(kFilterAdded);
00305     gViewRemoved        = HasFilter(kFilterRemoved);
00306     gViewConflicts      = HasFilter(kFilterConflicts);
00307     gViewMissing        = HasFilter(kFilterMissing);
00308     gViewHideMissing    = HasFilter(kFilterHideMissing);
00309     gViewUnknown        = HasFilter(kFilterUnknown);
00310     gViewHideUnknown    = HasFilter(kFilterHideUnknown);
00311
00312     gFilterMasksEnable = m_filterMasksEnable;
00313 }

Here is the call graph for this function:

void KoFilterModel::SetContext ( const KoColumnContext * context )

Set the column context for the filter

Parameters:
context Column context
Definition at line 519 of file BrowseViewModel.cpp.

References KoColumnContext::GetPath(), and m_context.

Referenced by CMainFrame::SetContext().

00520 {
00521     if( context )
00522     {
00523         delete m_context;
00524         m_context = new KoColumnContext(context->GetPath());
00525     }
00526 }

Here is the call graph for this function:

bool KoFilterModel::SetMask | ( | int | type,
 |  | const char * | mask
 | ) |

Set new file mask

Parameters:
type | Mask type
mask | Mask to be set
Returns:
true if mask has changed, false otherwise
Definition at line 483 of file BrowseViewModel.cpp.

References KoFilterMask::Empty(), m_filterMask, NULL, and KoFilterMask::SetMask().

Referenced by UCvsFrame::FreshenFileMask(), and CMainFrame::SetFilterBarMask().

00484 {
00485     bool res = false;
00486
00487     if ( mask == NULL ) mask = ""; // safeguard arguments
00488
00489     FilterMaskContainer::iterator i = m_filterMask.find(type);
00490     if( i != m_filterMask.end() )
00491     {
00492         res = (*i).second.SetMask(mask);
00493
00494         if( (*i).second.Empty() )
00495         {
00496             // Empty mask can be removed
00497             m_filterMask.erase(i);
00498         }
00499     }
00500     else
00501     {
00502         KoFilterMask filterMask;
00503         filterMask.SetMask(mask);
00504
00505         if( !filterMask.Empty() )
00506         {
00507             m_filterMask.insert(std::make_pair(type, filterMask));
00508             res = true;
00509         }
00510     }
00511
00512     return res;
00513 }

Here is the call graph for this function:

void KoFilterModel::ToggleAdded ( )

Toggle added flag.

Definition at line 640 of file BrowseViewModel.cpp.

References kFilterAdded, and ToggleFilter().

Referenced by CMainFrame::OnViewAdded(), and UCvsFrame::OnViewAdded().

00641 {
00642     ToggleFilter(kFilterAdded);
00643 }

Here is the call graph for this function:

void KoFilterModel::ToggleChanged ( )

Toggle changed flag.

Definition at line 628 of file BrowseViewModel.cpp.

References kFilterChanged, and ToggleFilter().

Referenced by CMainFrame::OnViewChanged(), and UCvsFrame::OnViewChanged().

00629 {
00630     ToggleFilter(kFilterChanged);
00631 }

Here is the call graph for this function:

void KoFilterModel::ToggleConflict ( )

Toggle show conflict flag.

Definition at line 548 of file BrowseViewModel.cpp.

References kFilterConflicts, and ToggleFilter().

Referenced by CMainFrame::OnViewConflict(), and UCvsFrame::OnViewConflict().

00549 {
00550     ToggleFilter(kFilterConflicts);
00551 }

Here is the call graph for this function:

void KoFilterModel::ToggleFilter ( int filter ) [protected]

Toggle specified filter.

Definition at line 535 of file BrowseViewModel.cpp.

References HasFilter(), and m_filters.

Referenced by ToggleAdded(), ToggleChanged(), ToggleConflict(), ToggleHideMissing(), ToggleHideUnknown(), ToggleMissing(), ToggleRemoved(), and ToggleUnknown().

00536 {
00537     if( HasFilter(filter) )
00538     {
00539         m_filters &= ~filter;
00540     }
00541     else
00542     {
00543         m_filters |= filter;
00544     }
00545 }

Here is the call graph for this function:

void KoFilterModel::ToggleFilterMasksEnable ( )

Toggle the filter masks enable flag.

Definition at line 457 of file BrowseViewModel.cpp.

References m_filterMasksEnable.

Referenced by CMainFrame::ToggleFilterMasksEnable().

00458 {
00459     m_filterMasksEnable = !m_filterMasksEnable;
00460 }

void KoFilterModel::ToggleHideMissing ( )

Toggle hide missing flag.

Definition at line 611 of file BrowseViewModel.cpp.

References HasFilter(), kFilterHideMissing, kFilterMissing, m_filters, and ToggleFilter().

Referenced by CMainFrame::OnViewHidemissing().

00612 {
00613     ToggleFilter(kFilterHideMissing);
00614
00615     if( HasFilter(kFilterHideMissing) )
00616     {
00617         m_filters &= ~kFilterMissing;
00618     }
00619 }

Here is the call graph for this function:

void KoFilterModel::ToggleHideUnknown ( )

Toggle hide unknown flag.

Definition at line 577 of file BrowseViewModel.cpp.

References HasFilter(), kFilterHideUnknown, kFilterUnknown, m_filters, and ToggleFilter().

Referenced by UCvsFrame::OnHideUnknown(), and CMainFrame::OnViewHideunknown().

00578 {
00579     ToggleFilter(kFilterHideUnknown);
00580
00581     if( HasFilter(kFilterHideUnknown) )
00582     {
00583         m_filters &= ~kFilterUnknown;
00584     }
00585 }

Here is the call graph for this function:

void KoFilterModel::ToggleMissing ( )

Toggle show missing flag.

Definition at line 594 of file BrowseViewModel.cpp.

References HasFilter(), kFilterHideMissing, kFilterMissing, m_filters, and ToggleFilter().

Referenced by CMainFrame::OnViewMissing(), and UCvsFrame::OnViewMissing().

00595 {
00596     ToggleFilter(kFilterMissing);
00597
00598     if( HasFilter(kFilterMissing) )
00599     {
00600         m_filters &= ~kFilterHideMissing;
00601     }
00602 }

Here is the call graph for this function:

void KoFilterModel::ToggleModified ( )

Toggle modified flag.

Definition at line 433 of file BrowseViewModel.cpp.

References IsModified(), kFilterModified, and m_filters.

Referenced by CMainFrame::OnViewModified(), and UCvsFrame::OnViewModified().

00434 {
00435     if( IsModified() )
00436     {
00437         m_filters &= ~kFilterModified;
00438     }
00439     else
00440     {
00441         m_filters |= kFilterModified;
00442     }
00443 }

Here is the call graph for this function:

void KoFilterModel::ToggleRemoved ( )

Toggle removed flag.

Definition at line 652 of file BrowseViewModel.cpp.

References kFilterRemoved, and ToggleFilter().

Referenced by CMainFrame::OnViewRemoved(), and UCvsFrame::OnViewRemoved().

00653 {
00654     ToggleFilter(kFilterRemoved);
00655 }

Here is the call graph for this function:

void KoFilterModel::ToggleUnknown ( )

Toggle show unknown flag.

Definition at line 560 of file BrowseViewModel.cpp.

References HasFilter(), kFilterHideUnknown, kFilterUnknown, m_filters, and ToggleFilter().

Referenced by CMainFrame::OnViewUnknown(), and UCvsFrame::OnViewUnknown().

00561 {
00562     ToggleFilter(kFilterUnknown);
00563
00564     if( HasFilter(kFilterUnknown) )
00565     {
00566         m_filters &= ~kFilterHideUnknown;
00567     }
00568 }

Here is the call graph for this function:

Member Data Documentation

KoColumnContext* KoFilterModel::m_context [protected]

Column context Definition at line 177 of file BrowseViewModel.h.

Referenced by IsMatch(), SetContext(), and ~KoFilterModel().

FilterMaskContainer KoFilterModel::m_filterMask [protected]

Filter mask collection map Definition at line 176 of file BrowseViewModel.h.

Referenced by HasFilterMasks(), IsMatch(), and SetMask().

bool KoFilterModel::m_filterMasksEnable [protected]

Flag to turn filter masks on or off Definition at line 175 of file BrowseViewModel.h.

Referenced by IsFilterMasksEnable(), IsMatch(), LoadSettings(), SaveSettings(), and ToggleFilterMasksEnable().

int KoFilterModel::m_filters [protected]

Filters Definition at line 173 of file BrowseViewModel.h.

Referenced by ClearAll(), GetFilters(), HasAnyModified(), HasFilter(), HasFilters(), IsDefaultMode(), IsModified(), LoadSettings(), ToggleFilter(), ToggleHideMissing(), ToggleHideUnknown(), ToggleMissing(), ToggleModified(), and ToggleUnknown().

NotificationManager KoFilterModel::m_manager [protected]

Manager for filter change notifications Definition at line 179 of file BrowseViewModel.h.

Referenced by GetNotificationManager().

The documentation for this class was generated from the following files:
  • common/BrowseViewModel.h
  • common/BrowseViewModel.cpp
Generated on Sat Aug 7 22:54:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoGraphAnnotateHandler Class Reference

KoGraphAnnotateHandler Class Reference

Handles annotate on the selected graph items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoGraphAnnotateHandler:

[legend]
Collaboration diagram for KoGraphAnnotateHandler:

[legend]
List of all members.

Public Member Functions

KoGraphAnnotateHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles annotate on the selected graph items.

Definition at line 628 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoGraphAnnotateHandler::KoGraphAnnotateHandler ( ) [inline]

Definition at line 631 of file BrowseViewHandlers.h.

References _i18n.

00632         : KiSelectionHandler(_i18n("Annotate"))
00633     {}

Member Function Documentation

virtual void KoGraphAnnotateHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 638 of file BrowseViewHandlers.h.

References CvsCmdAnnotate(), kAnnotateGraph, and KiSelectionHandler::OnFiles().

Referenced by CGraphView::OnAnnotate().

00639     {
00640         KiSelectionHandler::OnFiles(pmf);
00641         CvsCmdAnnotate(*this, kAnnotateGraph);
00642     }

Here is the call graph for this function:

virtual void KoGraphAnnotateHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 635 of file BrowseViewHandlers.h.

00636     { }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoGraphDiffHandler Class Reference

KoGraphDiffHandler Class Reference

Handles diffing on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoGraphDiffHandler:

[legend]
Collaboration diagram for KoGraphDiffHandler:

[legend]
List of all members.

Public Member Functions

KoGraphDiffHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles diffing on the selected items.

Definition at line 323 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoGraphDiffHandler::KoGraphDiffHandler ( ) [inline]

Definition at line 326 of file BrowseViewHandlers.h.

References _i18n.

00327         : KiSelectionHandler(_i18n("Diff"))
00328     {}

Member Function Documentation

virtual void KoGraphDiffHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 333 of file BrowseViewHandlers.h.

References CvsCmdDiff(), kDiffGraph, and KiSelectionHandler::OnFiles().

Referenced by CGraphView::OnViewDiff().

00334     {
00335         KiSelectionHandler::OnFiles(pmf);
00336         CvsCmdDiff(*this, kDiffGraph);
00337     }

Here is the call graph for this function:

virtual void KoGraphDiffHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 330 of file BrowseViewHandlers.h.

00331     {   }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoGraphHandler Class Reference

KoGraphHandler Class Reference

Handles graph log queries on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoGraphHandler:

[legend]
Collaboration diagram for KoGraphHandler:

[legend]
List of all members.

Public Member Functions

KoGraphHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)
virtual bool | NeedsNormalize ()

Detailed Description

Handles graph log queries on the selected items.

Definition at line 362 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoGraphHandler::KoGraphHandler ( ) [inline]

Definition at line 365 of file BrowseViewHandlers.h.

References _i18n.

00366         : KiSelectionHandler(_i18n("Graph"))
00367     {}

Member Function Documentation

virtual bool KoGraphHandler::NeedsNormalize ( ) [inline, virtual]

Check whether the command needs the selection to be normalized

Returns:
true if commands needs normalization, false otherwise

Reimplemented from KiSelectionHandler.

Definition at line 380 of file BrowseViewHandlers.h.

00381     {
00382         return true;
00383     }

virtual void KoGraphHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 374 of file BrowseViewHandlers.h.

References CvsCmdLog(), and KiSelectionHandler::OnFiles().

00375     {
00376         KiSelectionHandler::OnFiles(pmf);
00377         CvsCmdLog(*this, true);
00378     }

Here is the call graph for this function:

virtual void KoGraphHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 369 of file BrowseViewHandlers.h.

00370     {
00371         /*we avoid processing directory*/
00372     }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoIgnoreModel Class Reference

KoIgnoreModel Class Reference

Interface for ignored entries. More...

#include <BrowseViewModel.h>

Inheritance diagram for KoIgnoreModel:

[legend]
Collaboration diagram for KoIgnoreModel:

[legend]
List of all members.

Public Member Functions

KoIgnoreModel ()
virtual | ~KoIgnoreModel ()
virtual void | LoadSettings ()
Load the filter settings.
virtual void | SaveSettings ()
Save the filter settings.
virtual NotificationManager * | GetNotificationManager ()
Retrieves notification manager for observing changes.
virtual bool | IsShowIgnored ()
Get the show ignored flag.
void | ToggleIgnore ()
Toggle show ignored flag.

Private Attributes

NotificationManager m_manager
bool m_isIgnore

Detailed Description

Interface for ignored entries.

Definition at line 260 of file BrowseViewModel.h.

Constructor & Destructor Documentation

KoIgnoreModel::KoIgnoreModel ( )

Definition at line 705 of file BrowseViewModel.cpp.

00706     : m_isIgnore(false)
00707 {
00708 }

KoIgnoreModel::~KoIgnoreModel ( ) [virtual]

Definition at line 710 of file BrowseViewModel.cpp.

00711 {
00712 }

Member Function Documentation

NotificationManager * KoIgnoreModel::GetNotificationManager ( ) [virtual]

Retrieves notification manager for observing changes.

Implements KiFilterBase.

Definition at line 724 of file BrowseViewModel.cpp.

References m_manager.

Referenced by CMainFrame::LoadLocationSettings(), CMainFrame::OnViewIgnore(), and UCvsFrame::OnViewIgnored().

00725 {
00726     return &m_manager;
00727 }

bool KoIgnoreModel::IsShowIgnored ( ) [virtual]

Get the show ignored flag.

Implements KiIgnoreModel.

Definition at line 730 of file BrowseViewModel.cpp.

References m_isIgnore.

Referenced by UCvsFrame::OnCmdUIViewIgnored(), CMainFrame::OnUpdateViewClearall(), CMainFrame::OnUpdateViewIgnore(), and CMainFrame::OnViewClearall().

00731 {
00732     return m_isIgnore;
00733 }

void KoIgnoreModel::LoadSettings ( ) [virtual]

Load the filter settings.

Implements KiFilterBase.

Definition at line 714 of file BrowseViewModel.cpp.

References gFileViewIgnore, and m_isIgnore.

Referenced by CMainFrame::LoadLocationSettings().

00715 {
00716     m_isIgnore = gFileViewIgnore;
00717 }

void KoIgnoreModel::SaveSettings ( ) [virtual]

Save the filter settings.

Implements KiFilterBase.

Definition at line 719 of file BrowseViewModel.cpp.

References gFileViewIgnore, and m_isIgnore.

Referenced by CMainFrame::StoreLocationSettings().

00720 {
00721     gFileViewIgnore = m_isIgnore;
00722 }

void KoIgnoreModel::ToggleIgnore ( )

Toggle show ignored flag.

Definition at line 736 of file BrowseViewModel.cpp.

References m_isIgnore.

Referenced by CMainFrame::OnViewClearall(), CMainFrame::OnViewIgnore(), and UCvsFrame::OnViewIgnored().

00737 {
00738     m_isIgnore = !m_isIgnore;
00739 }

Member Data Documentation

bool KoIgnoreModel::m_isIgnore [private]

Flag to tell if ignored files are displayed Definition at line 270 of file BrowseViewModel.h.

Referenced by IsShowIgnored(), LoadSettings(), SaveSettings(), and ToggleIgnore().

NotificationManager KoIgnoreModel::m_manager [private]

Manager for change notifications Definition at line 269 of file BrowseViewModel.h.

Referenced by GetNotificationManager().

The documentation for this class was generated from the following files:
  • common/BrowseViewModel.h
  • common/BrowseViewModel.cpp
Generated on Sat Aug 7 22:54:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoImportHandler Class Reference

KoImportHandler Class Reference

Handles Import. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoImportHandler:

[legend]
Collaboration diagram for KoImportHandler:

[legend]
List of all members.

Public Member Functions

KoImportHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles Import.

Definition at line 688 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoImportHandler::KoImportHandler ( ) [inline]

Definition at line 691 of file BrowseViewHandlers.h.

References _i18n.

00692         : KiSelectionHandler(_i18n("Import"), true, true)
00693     {}

Member Function Documentation

virtual void KoImportHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 701 of file BrowseViewHandlers.h.

References CvsCmdImportModule(), and KiSelectionHandler::OnFiles().

00702     {
00703         KiSelectionHandler::OnFiles(pmf);
00704         CvsCmdImportModule(*this);
00705     }

Here is the call graph for this function:

virtual void KoImportHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 695 of file BrowseViewHandlers.h.

References CvsCmdImportModule(), and KiSelectionHandler::OnFolder().

Referenced by CExploreBar::OnViewImport(), and CBrowseFileView::OnViewImport().

00696     {
00697         KiSelectionHandler::OnFolder(fullpath);
00698         CvsCmdImportModule(*this);
00699     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoLockHandler Class Reference

KoLockHandler Class Reference

Handles locking on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoLockHandler:

[legend]
Collaboration diagram for KoLockHandler:

[legend]
List of all members.

Public Member Functions

KoLockHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles locking on the selected items.

Definition at line 426 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoLockHandler::KoLockHandler ( ) [inline]

Definition at line 429 of file BrowseViewHandlers.h.

References _i18n.

00430         : KiSelectionHandler(_i18n("Lock"))
00431     {}

Member Function Documentation

virtual void KoLockHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 439 of file BrowseViewHandlers.h.

References CvsCmdLock(), and KiSelectionHandler::OnFiles().

00440     {
00441         KiSelectionHandler::OnFiles(pmf);
00442         CvsCmdLock(*this);
00443     }

Here is the call graph for this function:

virtual void KoLockHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 433 of file BrowseViewHandlers.h.

References CvsCmdLock(), and KiSelectionHandler::OnFolder().

00434     {
00435         KiSelectionHandler::OnFolder(fullpath);
00436         CvsCmdLock(*this);
00437     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoLogHandler Class Reference

KoLogHandler Class Reference

Handles log queries on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoLogHandler:

[legend]
Collaboration diagram for KoLogHandler:

[legend]
List of all members.

Public Member Functions

KoLogHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles log queries on the selected items.

Definition at line 341 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoLogHandler::KoLogHandler ( ) [inline]

Definition at line 344 of file BrowseViewHandlers.h.

References _i18n.

00345         : KiSelectionHandler(_i18n("Log"))
00346     {}

Member Function Documentation

virtual void KoLogHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 354 of file BrowseViewHandlers.h.

References CvsCmdLog(), and KiSelectionHandler::OnFiles().

00355     {
00356         KiSelectionHandler::OnFiles(pmf);
00357         CvsCmdLog(*this);
00358     }

Here is the call graph for this function:

virtual void KoLogHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 348 of file BrowseViewHandlers.h.

References CvsCmdLog(), and KiSelectionHandler::OnFolder().

00349     {
00350         KiSelectionHandler::OnFolder(fullpath);
00351         CvsCmdLog(*this);
00352     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoMoveToTrashHandler Class Reference

KoMoveToTrashHandler Class Reference

Handles moving files to trash. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoMoveToTrashHandler:

[legend]
Collaboration diagram for KoMoveToTrashHandler:

[legend]
List of all members.

Public Member Functions

KoMoveToTrashHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles moving files to trash.

Definition at line 81 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoMoveToTrashHandler::KoMoveToTrashHandler ( ) [inline]

Definition at line 84 of file BrowseViewHandlers.h.

References _i18n.

00085         : KiSelectionHandler(_i18n("Move To Trash"), true, true)
00086     {}

Member Function Documentation

virtual void KoMoveToTrashHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 91 of file BrowseViewHandlers.h.

References CvsCmdMoveToTrash(), and KiSelectionHandler::OnFiles().

00092     {
00093         KiSelectionHandler::OnFiles(pmf);
00094         CvsCmdMoveToTrash(*this);
00095     }

Here is the call graph for this function:

virtual void KoMoveToTrashHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 88 of file BrowseViewHandlers.h.

00089     { /* ignore */ }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoNameColumn Class Reference

KoNameColumn Class Reference

Name column. More...

Inheritance diagram for KoNameColumn:

[legend]
Collaboration diagram for KoNameColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const
virtual bool | IsDefaultAscending () const

Detailed Description

Name column.

Definition at line 155 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoNameColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 182 of file BrowseViewColumn.cpp.

References EntnodeData::GetName(), and StrOrdICmp().

00183     {
00184         return StrOrdICmp(d1->GetName(), d2->GetName());
00185     }

Here is the call graph for this function:

virtual int KoNameColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 159 of file BrowseViewColumn.cpp.

Referenced by GetSetupData().

00160     {
00161         return ColumnIndex::kName;
00162     }

virtual void KoNameColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 164 of file BrowseViewColumn.cpp.

References GetColumnIndex(), ColumnIndex::GetColumnName(), and PLATFORM_COLUMN_WIDTH.

00165     {
00166 #ifdef WIN32
00167         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00168         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00169         lvc->cx = 150;
00170         lvc->fmt = LVCFMT_LEFT;
00171 #else
00172         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00173         lvc->width = PLATFORM_COLUMN_WIDTH(250, 210);
00174 #endif
00175     }

Here is the call graph for this function:

virtual void KoNameColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 177 of file BrowseViewColumn.cpp.

References EntnodeData::GetName(), and StrSafeCopy().

00178     {
00179         StrSafeCopy(buffer, data->GetName(), bufferSize);
00180     }

Here is the call graph for this function:

virtual bool KoNameColumn::IsDefaultAscending ( ) const [inline, virtual]

Check whether the column shall be sorted ascending initially

Returns:
true if the column should be sorted ascending, false otherwise
Note:
Override if the initial sorting order is not ascending

Reimplemented from KiColumn.

Definition at line 187 of file BrowseViewColumn.cpp.

00188     {
00189         return false;
00190     }

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoOptionColumn Class Reference

KoOptionColumn Class Reference

Option column. More...

Inheritance diagram for KoOptionColumn:

[legend]
Collaboration diagram for KoOptionColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const

Detailed Description

Option column.

Definition at line 417 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoOptionColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 444 of file BrowseViewColumn.cpp.

References GetColumnIndex().

00445     {
00446         int res;
00447
00448         const char* s1 = (*d1)[GetColumnIndex()];
00449         const char* s2 = (*d2)[GetColumnIndex()];
00450
00451         if( s1 != 0L && s2 != 0L )
00452         {
00453             res = strcmp(s1, s2);
00454         }
00455         else
00456         {
00457             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00458         }
00459
00460         return res;
00461     }

Here is the call graph for this function:

virtual int KoOptionColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 421 of file BrowseViewColumn.cpp.

Referenced by Compare(), GetSetupData(), and GetText().

00422     {
00423         return ColumnIndex::kOption;
00424     }

virtual void KoOptionColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 426 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and ColumnIndex::GetColumnName().

00427     {
00428 #ifdef WIN32
00429         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00430         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00431         lvc->cx = 50;
00432         lvc->fmt = LVCFMT_LEFT;
00433 #else
00434         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00435         lvc->width = 55;
00436 #endif
00437     }

Here is the call graph for this function:

virtual void KoOptionColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 439 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and StrSafeCopy().

00440     {
00441         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00442     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoPathColumn Class Reference

KoPathColumn Class Reference

Path column. More...

Inheritance diagram for KoPathColumn:

[legend]
Collaboration diagram for KoPathColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const
virtual bool | IsDefaultAscending () const

Detailed Description

Path column.

Definition at line 268 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoPathColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 296 of file BrowseViewColumn.cpp.

References GetText(), MAX_PATH, and StrOrdICmp().

00297     {
00298         char text1[MAX_PATH];
00299         GetText(context, d1, text1, MAX_PATH);
00300
00301         char text2[MAX_PATH];
00302         GetText(context, d2, text2, MAX_PATH);
00303
00304         return StrOrdICmp(text1, text2);
00305     }

Here is the call graph for this function:

virtual int KoPathColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 272 of file BrowseViewColumn.cpp.

Referenced by GetSetupData().

00273     {
00274         return ColumnIndex::kPath;
00275     }

virtual void KoPathColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 277 of file BrowseViewColumn.cpp.

References GetColumnIndex(), ColumnIndex::GetColumnName(), and PLATFORM_COLUMN_WIDTH.

00278     {
00279 #ifdef WIN32
00280         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00281         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00282         lvc->cx = 150;
00283         lvc->fmt = LVCFMT_LEFT;
00284 #else
00285         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00286         lvc->width = PLATFORM_COLUMN_WIDTH(340, 300);
00287 #endif
00288     }

Here is the call graph for this function:

virtual void KoPathColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 290 of file BrowseViewColumn.cpp.

References EntnodeFile::GetRelativePath(), and StrSafeCopy().

Referenced by Compare().

00291     {
00292         const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00293         StrSafeCopy(buffer, node ? node->GetRelativePath(context) : "", bufferSize);
00294     }

Here is the call graph for this function:

virtual bool KoPathColumn::IsDefaultAscending ( ) const [inline, virtual]

Check whether the column shall be sorted ascending initially

Returns:
true if the column should be sorted ascending, false otherwise
Note:
Override if the initial sorting order is not ascending

Reimplemented from KiColumn.

Definition at line 307 of file BrowseViewColumn.cpp.

00308     {
00309         return false;
00310     }

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoQueryUpdateHandler Class Reference

KoQueryUpdateHandler Class Reference

Handles query updates on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoQueryUpdateHandler:

[legend]
Collaboration diagram for KoQueryUpdateHandler:

[legend]
List of all members.

Public Member Functions

KoQueryUpdateHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles query updates on the selected items.

Definition at line 587 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoQueryUpdateHandler::KoQueryUpdateHandler ( ) [inline]

Definition at line 590 of file BrowseViewHandlers.h.

References _i18n.

00591         : KiSelectionHandler(_i18n("Query Update"))
00592     {}

Member Function Documentation

virtual void KoQueryUpdateHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 600 of file BrowseViewHandlers.h.

References CvsCmdUpdate(), and KiSelectionHandler::OnFiles().

00601     {
00602         KiSelectionHandler::OnFiles(pmf);
00603         CvsCmdUpdate(*this, true);
00604     }

Here is the call graph for this function:

virtual void KoQueryUpdateHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 594 of file BrowseViewHandlers.h.

References CvsCmdUpdate(), and KiSelectionHandler::OnFolder().

00595     {
00596         KiSelectionHandler::OnFolder(fullpath);
00597         CvsCmdUpdate(*this, true);
00598     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoRecursionModel Class Reference

KoRecursionModel Class Reference

Interface to recursive display of entries. More...

#include <BrowseViewModel.h>

Inheritance diagram for KoRecursionModel:

[legend]
Collaboration diagram for KoRecursionModel:

[legend]
List of all members.

Public Member Functions

KoRecursionModel ()
virtual | ~KoRecursionModel ()
virtual void | LoadSettings ()
Load the filter settings.
virtual void | SaveSettings ()
Save the filter settings.
virtual NotificationManager * | GetNotificationManager ()
Retrieves notification manager for observing changes.
virtual bool | IsShowRecursive ()
Get the show recursive flag.
void | ToggleRecursion ()
Toggle recursion flag.

Private Attributes

NotificationManager m_manager
bool m_isRecursive

Detailed Description

Interface to recursive display of entries.

Definition at line 236 of file BrowseViewModel.h.

Constructor & Destructor Documentation

KoRecursionModel::KoRecursionModel ( )

Definition at line 666 of file BrowseViewModel.cpp.

00667     : m_isRecursive(false)
00668 {
00669 }

KoRecursionModel::~KoRecursionModel ( ) [virtual]

Definition at line 671 of file BrowseViewModel.cpp.

00672 {
00673 }

Member Function Documentation

NotificationManager * KoRecursionModel::GetNotificationManager ( ) [virtual]

Retrieves notification manager for observing changes.

Implements KiFilterBase.

Definition at line 685 of file BrowseViewModel.cpp.

References m_manager.

Referenced by CMainFrame::LoadLocationSettings(), and CMainFrame::OnViewRecursive().

00686 {
00687     return &m_manager;
00688 }

bool KoRecursionModel::IsShowRecursive ( ) [virtual]

Get the show recursive flag.

Implements KiRecursionModel.

Definition at line 691 of file BrowseViewModel.cpp.

References m_isRecursive.

Referenced by UCvsFiles::OnCmdUIViewRecursive(), and CMainFrame::OnUpdateViewRecursive().

00692 {
00693     return m_isRecursive;
00694 }

void KoRecursionModel::LoadSettings ( ) [virtual]

Load the filter settings.

Implements KiFilterBase.

Definition at line 675 of file BrowseViewModel.cpp.

References gDisplayRecursive, and m_isRecursive.

Referenced by CMainFrame::LoadLocationSettings().

00676 {
00677     m_isRecursive = gDisplayRecursive;
00678 }

void KoRecursionModel::SaveSettings ( ) [virtual]

Save the filter settings.

Implements KiFilterBase.

Definition at line 680 of file BrowseViewModel.cpp.

References gDisplayRecursive, and m_isRecursive.

Referenced by CMainFrame::StoreLocationSettings().

00681 {
00682     gDisplayRecursive = m_isRecursive;
00683 }

void KoRecursionModel::ToggleRecursion ( )

Toggle recursion flag.

Definition at line 697 of file BrowseViewModel.cpp.

References m_isRecursive.

Referenced by CMainFrame::OnViewRecursive(), and UCvsFiles::OnViewRecursive().

00698 {
00699     m_isRecursive = !m_isRecursive;
00700 }

Member Data Documentation

bool KoRecursionModel::m_isRecursive [private]

Flag to tell if files in sub-folders shall be iterated Definition at line 246 of file BrowseViewModel.h.

Referenced by IsShowRecursive(), LoadSettings(), SaveSettings(), and ToggleRecursion().

NotificationManager KoRecursionModel::m_manager [private]

Manager for change notifications Definition at line 245 of file BrowseViewModel.h.

Referenced by GetNotificationManager().

The documentation for this class was generated from the following files:
  • common/BrowseViewModel.h
  • common/BrowseViewModel.cpp
Generated on Sat Aug 7 22:54:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoRecursiveModel Class Reference

KoRecursiveModel Class Reference

Recursive columnar model. More...

Inheritance diagram for KoRecursiveModel:

[legend]
Collaboration diagram for KoRecursiveModel:

[legend]
List of all members.

Public Member Functions

virtual const KiColumn * | GetAt (const int pos) const
virtual int | GetType (const int pos) const
virtual int | GetCount () const

Detailed Description

Recursive columnar model.

Definition at line 782 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual const KiColumn* KoRecursiveModel::GetAt ( const int pos ) const [inline, virtual]

Get the column descriptor by its index

Parameters:
pos Index to get the column descriptor
Returns:
Column descriptor

Implements KiColumnModel.

Definition at line 786 of file BrowseViewColumn.cpp.

References columnsRecursive.

00787     {
00788         return columnsRecursive[pos];
00789     }

virtual int KoRecursiveModel::GetCount ( ) const [inline, virtual]

Get the column count

Returns:
The column count

Implements KiColumnModel.

Definition at line 796 of file BrowseViewColumn.cpp.

References _countof, and columnsRecursive.

00797     {
00798         return _countof(columnsRecursive);
00799     }

virtual int KoRecursiveModel::GetType ( const int pos ) const [inline, virtual]

Get the column type by its index

Parameters:
pos Index to get the column type
Returns:
The column type

Implements KiColumnModel.

Definition at line 791 of file BrowseViewColumn.cpp.

References typesRecursive.

00792     {
00793         return typesRecursive[pos];
00794     }

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoRegularModel Class Reference

KoRegularModel Class Reference

Regular columnar model. More...

Inheritance diagram for KoRegularModel:

[legend]
Collaboration diagram for KoRegularModel:

[legend]
List of all members.

Public Member Functions

virtual const KiColumn * | GetAt (const int pos) const
virtual int | GetType (const int pos) const
virtual int | GetCount () const

Detailed Description

Regular columnar model.

Definition at line 758 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual const KiColumn* KoRegularModel::GetAt ( const int pos ) const [inline, virtual]

Get the column descriptor by its index

Parameters:
pos Index to get the column descriptor
Returns:
Column descriptor

Implements KiColumnModel.

Definition at line 762 of file BrowseViewColumn.cpp.

References columnsRegular.

00763     {
00764         return columnsRegular[pos];
00765     }

virtual int KoRegularModel::GetCount ( ) const [inline, virtual]

Get the column count

Returns:
The column count

Implements KiColumnModel.

Definition at line 772 of file BrowseViewColumn.cpp.

References _countof, and columnsRegular.

00773     {
00774         return _countof(columnsRegular);
00775     }

virtual int KoRegularModel::GetType ( const int pos ) const [inline, virtual]

Get the column type by its index

Parameters:
pos Index to get the column type
Returns:
The column type

Implements KiColumnModel.

Definition at line 767 of file BrowseViewColumn.cpp.

References typesRegular.

00768     {
00769         return typesRegular[pos];
00770     }

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoReleaseHandler Class Reference

KoReleaseHandler Class Reference

Handles releasing on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoReleaseHandler:

[legend]
Collaboration diagram for KoReleaseHandler:

[legend]
List of all members.

Public Member Functions

KoReleaseHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles releasing on the selected items.

Definition at line 200 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoReleaseHandler::KoReleaseHandler ( ) [inline]

Definition at line 203 of file BrowseViewHandlers.h.

References _i18n.

00204         : KiSelectionHandler(_i18n("Release"))
00205     {}

Member Function Documentation

virtual void KoReleaseHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 213 of file BrowseViewHandlers.h.

00214     {   }

virtual void KoReleaseHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 207 of file BrowseViewHandlers.h.

References CvsCmdRelease(), and KiSelectionHandler::OnFolder().

00208     {
00209         KiSelectionHandler::OnFolder(fullpath);
00210         CvsCmdRelease(*this);
00211     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoRevisionColumn Class Reference

KoRevisionColumn Class Reference

Revision column. More...

Inheritance diagram for KoRevisionColumn:

[legend]
Collaboration diagram for KoRevisionColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const

Static Private Member Functions

int | CompareRevisions (const char *rev1, const char *rev2)

Detailed Description

Revision column.

Definition at line 317 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoRevisionColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 393 of file BrowseViewColumn.cpp.

References CompareRevisions(), and GetColumnIndex().

00394     {
00395         int res;
00396
00397         const char* s1 = (*d1)[GetColumnIndex()];
00398         const char* s2 = (*d2)[GetColumnIndex()];
00399
00400         if( s1 != 0L && s2 != 0L )
00401         {
00402             res = CompareRevisions(s1, s2);
00403         }
00404         else
00405         {
00406             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00407         }
00408
00409         return res;
00410     }

Here is the call graph for this function:

int KoRevisionColumn::CompareRevisions | ( | const char * | rev1,
 |  | const char * | rev2
 | ) | [inline, static, private]

Compare two revisions

Parameters:
rev1 | First revision
rev2 | Second revision
Returns:
-1, 0 or 1
Definition at line 328 of file BrowseViewColumn.cpp.

References CStr.

Referenced by Compare().

00329     {
00330         if( rev1 == 0L && rev2 == 0L )
00331         {
00332             return 0;
00333         }
00334         else if( rev1 == 0L || rev2 == 0L )
00335         {
00336             return rev1 == 0L ? -1 : 1;
00337         }
00338
00339         CStr r1(rev1), r2(rev2);
00340         CStr q1, q2;
00341         int v1, v2;
00342         char* tmp;
00343
00344         if( (tmp = strchr(r1, '.')) != 0L )
00345         {
00346             tmp[0] = '\0';
00347             q1 = tmp + 1;
00348         }
00349
00350         v1 = atoi(r1);
00351
00352         if( (tmp = strchr(r2, '.')) != 0L )
00353         {
00354             tmp[0] = '\0';
00355             q2 = tmp + 1;
00356         }
00357
00358         v2 = atoi(r2);
00359
00360         if( v1 == v2 )
00361         {
00362             return CompareRevisions(q1.empty() ? (const char*)0L : q1.c_str(), q2.empty() ? (const char*)0L : q2.c_str());
00363         }
00364
00365         return v1 < v2 ? -1 : 1;
00366     }

virtual int KoRevisionColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 370 of file BrowseViewColumn.cpp.

Referenced by Compare(), GetSetupData(), and GetText().

00371     {
00372         return ColumnIndex::kRevision;
00373     }

virtual void KoRevisionColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 375 of file BrowseViewColumn.cpp.

References GetColumnIndex(), ColumnIndex::GetColumnName(), and PLATFORM_COLUMN_WIDTH.

00376     {
00377 #ifdef WIN32
00378         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00379         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00380         lvc->cx = 50;
00381         lvc->fmt = LVCFMT_LEFT;
00382 #else
00383         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00384         lvc->width = PLATFORM_COLUMN_WIDTH(82, 70);
00385 #endif
00386     }

Here is the call graph for this function:

virtual void KoRevisionColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 388 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and StrSafeCopy().

00389     {
00390         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00391     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoStateColumn Class Reference

KoStateColumn Class Reference

State column. More...

Inheritance diagram for KoStateColumn:

[legend]
Collaboration diagram for KoStateColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const

Detailed Description

State column.

Definition at line 519 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoStateColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 546 of file BrowseViewColumn.cpp.

References GetColumnIndex().

00547     {
00548         int res;
00549
00550         const char* s1 = (*d1)[GetColumnIndex()];
00551         const char* s2 = (*d2)[GetColumnIndex()];
00552
00553         if( s1 != 0L && s2 != 0L )
00554         {
00555             res = stricmp(s1, s2);
00556         }
00557         else
00558         {
00559             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00560         }
00561
00562         return res;
00563     }

Here is the call graph for this function:

virtual int KoStateColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 523 of file BrowseViewColumn.cpp.

Referenced by Compare(), GetSetupData(), and GetText().

00524     {
00525         return ColumnIndex::kState;
00526     }

virtual void KoStateColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 528 of file BrowseViewColumn.cpp.

References GetColumnIndex(), ColumnIndex::GetColumnName(), and PLATFORM_COLUMN_WIDTH.

00529     {
00530 #ifdef WIN32
00531         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00532         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00533         lvc->cx = 70;
00534         lvc->fmt = LVCFMT_LEFT;
00535 #else
00536         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00537         lvc->width = PLATFORM_COLUMN_WIDTH(76, 70);
00538 #endif
00539     }

Here is the call graph for this function:

virtual void KoStateColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 541 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and StrSafeCopy().

00542     {
00543         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00544     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoStatusHandler Class Reference

KoStatusHandler Class Reference

Handles status queries on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoStatusHandler:

[legend]
Collaboration diagram for KoStatusHandler:

[legend]
List of all members.

Public Member Functions

KoStatusHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles status queries on the selected items.

Definition at line 387 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoStatusHandler::KoStatusHandler ( ) [inline]

Definition at line 390 of file BrowseViewHandlers.h.

References _i18n.

00391         : KiSelectionHandler(_i18n("Status"))
00392     {}

Member Function Documentation

virtual void KoStatusHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 400 of file BrowseViewHandlers.h.

References CvsCmdStatus(), and KiSelectionHandler::OnFiles().

00401     {
00402         KiSelectionHandler::OnFiles(pmf);
00403         CvsCmdStatus(*this);
00404     }

Here is the call graph for this function:

virtual void KoStatusHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 394 of file BrowseViewHandlers.h.

References CvsCmdStatus(), and KiSelectionHandler::OnFolder().

00395     {
00396         KiSelectionHandler::OnFolder(fullpath);
00397         CvsCmdStatus(*this);
00398     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoTagColumn Class Reference

KoTagColumn Class Reference

Tag column. More...

Inheritance diagram for KoTagColumn:

[legend]
Collaboration diagram for KoTagColumn:

[legend]
List of all members.

Public Member Functions

virtual int | GetColumnIndex () const
virtual void | GetSetupData (LV_COLUMN *lvc) const
virtual void | GetText (const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const
virtual int | Compare (const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const

Detailed Description

Tag column.

Definition at line 570 of file BrowseViewColumn.cpp.

Member Function Documentation

virtual int KoTagColumn::Compare | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | d1,
 |  | const EntnodeData * | d2
 | ) | const [inline, virtual]

Compare two nodes

Parameters:
context | Column context
d1 | Data of the first node
d2 | Data of the second node
Returns:
-1,0 or +1

Implements KiColumn.

Definition at line 597 of file BrowseViewColumn.cpp.

References GetColumnIndex().

00598     {
00599         int res = 0;
00600
00601         const char* s1 = (*d1)[GetColumnIndex()];
00602         const char* s2 = (*d2)[GetColumnIndex()];
00603
00604         if( s1 != 0L && s2 != 0L )
00605         {
00606             res = strcmp(s1, s2);
00607         }
00608         else
00609         {
00610             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00611         }
00612
00613         return res;
00614
00615     }

Here is the call graph for this function:

virtual int KoTagColumn::GetColumnIndex ( ) const [inline, virtual]

Get the column index

Returns:
The column index

Implements KiColumn.

Definition at line 574 of file BrowseViewColumn.cpp.

Referenced by Compare(), GetSetupData(), and GetText().

00575     {
00576         return ColumnIndex::kStickyTag;
00577     }

virtual void KoTagColumn::GetSetupData ( LV_COLUMN * lvc ) const [inline, virtual]

Get the column setup data

Parameters:
lvc Return column setup data

Implements KiColumn.

Definition at line 579 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and ColumnIndex::GetColumnName().

00580     {
00581 #ifdef WIN32
00582         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00583         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00584         lvc->cx = 150;
00585         lvc->fmt = LVCFMT_LEFT;
00586 #else
00587         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00588         lvc->width = 90;
00589 #endif
00590     }

Here is the call graph for this function:

virtual void KoTagColumn::GetText | ( | const KoColumnContext * | context,
 |  | const EntnodeData * | data,
 |  | char * | buffer,
 |  | const int | bufferSize
 | ) | const [inline, virtual]

Retrieve formatted text as pertained to a node

Parameters:
context | Column context
data | Node data
buffer | Return buffer
bufferSize | Return buffer size

Implements KiColumn.

Definition at line 592 of file BrowseViewColumn.cpp.

References GetColumnIndex(), and StrSafeCopy().

00593     {
00594         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00595     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewColumn.cpp
Generated on Sat Aug 7 22:54:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoTraversalContext Class Reference

KoTraversalContext Class Reference

Collaboration diagram for KoTraversalContext:

[legend]
List of all members.

Public Member Functions

KoTraversalContext (UCvsFiles *view)
bool | IsRecursive () const
bool | IsShowIgnored () const
bool | IsMatch (EntnodeData *data) const

Public Attributes

UCvsFiles * m_view

Private Attributes

bool m_isRecursive
bool m_isShowIgnored
KiFilterModel * m_filter

Constructor & Destructor Documentation

KoTraversalContext::KoTraversalContext ( UCvsFiles * view ) [inline]

Definition at line 244 of file UCvsFiles.cpp.

References m_filter, m_isRecursive, m_isShowIgnored, m_view, and NULL.

00245         : m_isRecursive(false), m_isShowIgnored(false), m_filter(NULL), m_view(view)
00246     {
00247 #ifdef WIN32
00248         CWincvsApp* app = (CWincvsApp *)AfxGetApp()
00249 #elif qUnix
00250         UCvsApp* app = UCvsApp::gApp;
00251 #elif TARGET_RT_MAC_MACHO
00252         CMacCvsApp* app = CMacCvsApp::gApp;
00253 #endif
00254         if (app)
00255         {
00256             m_filter = app->GetFilterModel();
00257             m_isRecursive = app->GetRecursionModel()->IsShowRecursive();
00258             m_isShowIgnored = app->GetIgnoreModel()->IsShowIgnored();
00259         }
00260     }

Member Function Documentation

bool KoTraversalContext::IsMatch ( EntnodeData * data ) const [inline]

Definition at line 272 of file UCvsFiles.cpp.

References KiFilterModel::IsMatch(), and m_filter.

Referenced by TViewFill::ExitDirectory(), and TViewFill::OnFile().

00273     {
00274         return m_filter->IsMatch(data);
00275     }

Here is the call graph for this function:

bool KoTraversalContext::IsRecursive ( ) const [inline]

Definition at line 262 of file UCvsFiles.cpp.

References m_isRecursive.

Referenced by TViewFill::InitItem(), TViewFill::IsRecursive(), UCvsFiles::OnCreate(), and UCvsFiles::ResetView().

00263     {
00264         return m_isRecursive;
00265     }

bool KoTraversalContext::IsShowIgnored ( ) const [inline]

Definition at line 267 of file UCvsFiles.cpp.

References m_isShowIgnored.

Referenced by TViewFill::IsShowIgnored().

00268     {
00269         return m_isShowIgnored;
00270     }

Member Data Documentation

KiFilterModel* KoTraversalContext::m_filter [private]

Definition at line 239 of file UCvsFiles.cpp.

Referenced by IsMatch(), and KoTraversalContext().

bool KoTraversalContext::m_isRecursive [private]

Definition at line 237 of file UCvsFiles.cpp.

Referenced by IsRecursive(), and KoTraversalContext().

bool KoTraversalContext::m_isShowIgnored [private]

Definition at line 238 of file UCvsFiles.cpp.

Referenced by IsShowIgnored(), and KoTraversalContext().

UCvsFiles* KoTraversalContext::m_view

Definition at line 242 of file UCvsFiles.cpp.

Referenced by TViewFill::GetView(), and KoTraversalContext().

The documentation for this class was generated from the following file:
  • common/UCvsFiles.cpp
Generated on Sat Aug 7 22:54:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoUneditHandler Class Reference

KoUneditHandler Class Reference

Handles edit stop request on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoUneditHandler:

[legend]
Collaboration diagram for KoUneditHandler:

[legend]
List of all members.

Public Member Functions

KoUneditHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles edit stop request on the selected items.

Definition at line 179 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoUneditHandler::KoUneditHandler ( ) [inline]

Definition at line 182 of file BrowseViewHandlers.h.

References _i18n.

00183         : KiSelectionHandler(_i18n("Unedit"))
00184     {}

Member Function Documentation

virtual void KoUneditHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 192 of file BrowseViewHandlers.h.

References CvsCmdUnedit(), and KiSelectionHandler::OnFiles().

00193     {
00194         KiSelectionHandler::OnFiles(pmf);
00195         CvsCmdUnedit(*this);
00196     }

Here is the call graph for this function:

virtual void KoUneditHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 186 of file BrowseViewHandlers.h.

References CvsCmdUnedit(), and KiSelectionHandler::OnFolder().

00187     {
00188         KiSelectionHandler::OnFolder(fullpath);
00189         CvsCmdUnedit(*this);
00190     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoUnlockHandler Class Reference

KoUnlockHandler Class Reference

Handles unlocking on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoUnlockHandler:

[legend]
Collaboration diagram for KoUnlockHandler:

[legend]
List of all members.

Public Member Functions

KoUnlockHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles unlocking on the selected items.

Definition at line 447 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoUnlockHandler::KoUnlockHandler ( ) [inline]

Definition at line 450 of file BrowseViewHandlers.h.

References _i18n.

00451         : KiSelectionHandler(_i18n("Unlock"))
00452     {}

Member Function Documentation

virtual void KoUnlockHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 459 of file BrowseViewHandlers.h.

References CvsCmdUnlock(), and KiSelectionHandler::OnFiles().

00460     {
00461         KiSelectionHandler::OnFiles(pmf);
00462         CvsCmdUnlock(*this);
00463     }

Here is the call graph for this function:

virtual void KoUnlockHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 453 of file BrowseViewHandlers.h.

References CvsCmdUnlock(), and KiSelectionHandler::OnFolder().

00454     {
00455         KiSelectionHandler::OnFolder(fullpath);
00456         CvsCmdUnlock(*this);
00457     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoUpdateHandler Class Reference

KoUpdateHandler Class Reference

Handles updates on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoUpdateHandler:

[legend]
Collaboration diagram for KoUpdateHandler:

[legend]
List of all members.

Public Member Functions

KoUpdateHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles updates on the selected items.

Definition at line 566 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoUpdateHandler::KoUpdateHandler ( ) [inline]

Definition at line 569 of file BrowseViewHandlers.h.

References _i18n.

00570         : KiSelectionHandler(_i18n("Update"), true, true)
00571     {}

Member Function Documentation

virtual void KoUpdateHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 579 of file BrowseViewHandlers.h.

References CvsCmdUpdate(), and KiSelectionHandler::OnFiles().

00580     {
00581         KiSelectionHandler::OnFiles(pmf);
00582         CvsCmdUpdate(*this);
00583     }

Here is the call graph for this function:

virtual void KoUpdateHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 573 of file BrowseViewHandlers.h.

References CvsCmdUpdate(), and KiSelectionHandler::OnFolder().

00574     {
00575         KiSelectionHandler::OnFolder(fullpath);
00576         CvsCmdUpdate(*this);
00577     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoUpdateMoveToTrashHandler Class Reference

KoUpdateMoveToTrashHandler Class Reference

Handles figuring out if moving files to trash is enabled. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoUpdateMoveToTrashHandler:

[legend]
Collaboration diagram for KoUpdateMoveToTrashHandler:

[legend]
List of all members.

Public Member Functions

KoUpdateMoveToTrashHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)
bool | IsEnabled () const

Private Attributes

bool m_isFolders
bool m_isFiles

Detailed Description

Handles figuring out if moving files to trash is enabled.

Definition at line 99 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoUpdateMoveToTrashHandler::KoUpdateMoveToTrashHandler ( ) [inline]

Definition at line 106 of file BrowseViewHandlers.h.

References _i18n.

00107         : KiSelectionHandler(_i18n("Update Move To Trash")), m_isFolders(false), m_isFiles(false)
00108     {}

Member Function Documentation

bool KoUpdateMoveToTrashHandler::IsEnabled ( ) const [inline]

Definition at line 120 of file BrowseViewHandlers.h.

Referenced by CBrowseFileView::OnUpdateViewTrash().

00121     {
00122         return !m_isFolders && m_isFiles;
00123     }

virtual void KoUpdateMoveToTrashHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 115 of file BrowseViewHandlers.h.

00116     {
00117         m_isFiles = true;
00118     }

virtual void KoUpdateMoveToTrashHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 110 of file BrowseViewHandlers.h.

00111     {
00112         m_isFolders = true;
00113     }

Member Data Documentation

bool KoUpdateMoveToTrashHandler::m_isFiles [private]

Definition at line 103 of file BrowseViewHandlers.h.

bool KoUpdateMoveToTrashHandler::m_isFolders [private]

Definition at line 102 of file BrowseViewHandlers.h.

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoWatcher Class Reference

KoWatcher Class Reference

File modification watcher thread. More...

#include <FileViewWatcher.h>

Collaboration diagram for KoWatcher:

[legend]
List of all members.

Public Types

enum | { WM_FILECHANGE = WM_APP + 51 }
Messages posted out. More...

Public Member Functions

KoWatcher (HWND hWnd)
void | SignalStartWatch (LPCTSTR path, bool isRecursive)
void | SignalTerminate ()

Private Types

enum {
kStartHandle = 0,
kTerminateHandle,
kNotifyHandle,
kEndHandle
}
Handles index enum. More...

Private Member Functions

~KoWatcher ()
Private destructor - SignalTerminate() must be called to destroy this object.
UINT | Run ()
bool StartWatch ()
void | StopWatch ()
BOOL | Notify ()
DWORD | GetTimeout (const bool ignoreTimeout=false)

Static Private Member Functions

UINT | DelegateRun (LPVOID pWatcher)

Private Attributes

CEvent | m_startEvent
CEvent | m_terminateEvent
TCHAR | m_path [_MAX_PATH]
HWND | m_hWnd
bool m_isRecursive
DWORD | m_notificationTime
int m_rapidNotificationCount
HANDLE | m_handles [kEndHandle]
DWORD | m_count
CCriticalSection | m_section

Detailed Description

File modification watcher thread.

Definition at line 29 of file FileViewWatcher.h.

Member Enumeration Documentation

anonymous enum [private]

Handles index enum.

Enumeration values:
kStartHandle | Start handle index
kTerminateHandle | Terminate handle index
kNotifyHandle | Notify handle index
kEndHandle | End handle index
Definition at line 39 of file FileViewWatcher.h.
00040     {
00041         kStartHandle = 0,
00042         kTerminateHandle,
00043         kNotifyHandle,
00044         kEndHandle
00045     };

anonymous enum

Messages posted out.

Enumeration values:
WM_FILECHANGE Private message for delivering file change notification
Definition at line 78 of file FileViewWatcher.h.
00079     {
00080         WM_FILECHANGE = WM_APP + 51
00081     };

Constructor & Destructor Documentation

KoWatcher::KoWatcher ( HWND hWnd )

Definition at line 53 of file FileViewWatcher.cpp.

References DelegateRun(), kStartHandle, kTerminateHandle, m_count, m_handles, m_path, m_startEvent, and m_terminateEvent.

00054     : m_isRecursive(false), m_hWnd(hWnd), m_notificationTime(0)
00055 {
00056     m_handles[kStartHandle] = m_startEvent;
00057     m_handles[kTerminateHandle] = m_terminateEvent;
00058     m_count = 2;
00059     *m_path = 0;
00060
00061     // Start the thread immediately
00062     AfxBeginThread(DelegateRun, (LPVOID)this);
00063 }

Here is the call graph for this function:

KoWatcher::~KoWatcher ( ) [private]

Private destructor - SignalTerminate() must be called to destroy this object.

Definition at line 66 of file FileViewWatcher.cpp.

00067 {
00068 }

Member Function Documentation

UINT KoWatcher::DelegateRun ( LPVOID pWatcher ) [static, private]

Delegate control to non-static member

Parameters:
pWatcher Watcher object
Returns:
true on success, false otherwise
Definition at line 75 of file FileViewWatcher.cpp.

References Run().

Referenced by KoWatcher().

00076 {
00077     KoWatcher* watcher = (KoWatcher*)pWatcher;
00078     return watcher->Run();
00079 }

Here is the call graph for this function:

DWORD KoWatcher::GetTimeout ( const bool ignoreTimeout = false ) [private]

Get the timeout value

Parameters:
ignoreTimeout true to get the ignore timeout, false to get the notification timeout
Returns:
Timeout value
Definition at line 270 of file FileViewWatcher.cpp.

References m_rapidNotificationCount, WATCHER_BACKGROUND_TIMEOUT, WATCHER_FOREGROUND_TIMEOUT, WATCHER_IGNORE_FACTOR, and WATCHER_RAPID_THRESHOLD.

Referenced by Run().

00271 {
00272     const bool backgroundProcess = ((CWincvsApp*)AfxGetApp())->IsBackgroundProcess();
00273
00274     DWORD timeout = backgroundProcess ? WATCHER_BACKGROUND_TIMEOUT : WATCHER_FOREGROUND_TIMEOUT;
00275
00276     if( ignoreTimeout )
00277     {
00278         timeout = DWORD((float)timeout * WATCHER_IGNORE_FACTOR);
00279         if( !backgroundProcess && m_rapidNotificationCount > WATCHER_RAPID_THRESHOLD )
00280         {
00281             timeout *= 2;
00282         }
00283     }
00284
00285     return timeout;
00286 }

BOOL KoWatcher::Notify ( ) [private]

Notify about the file change

Returns:
TRUE on success, FALSE otherwise
Definition at line 244 of file FileViewWatcher.cpp.

References m_hWnd, m_notificationTime, m_rapidNotificationCount, WATCHER_FOREGROUND_TIMEOUT, WATCHER_RAPID_FACTOR, and WM_FILECHANGE.

Referenced by Run().

00245 {
00246     const DWORD notificationTime = m_notificationTime;
00247
00248     m_notificationTime = GetTickCount();
00249     if( m_notificationTime - notificationTime < WATCHER_FOREGROUND_TIMEOUT * WATCHER_RAPID_FACTOR )
00250     {
00251         m_rapidNotificationCount++;
00252     }
00253     else
00254     {
00255         m_rapidNotificationCount--;
00256         if( m_rapidNotificationCount < 0 )
00257         {
00258             m_rapidNotificationCount = 0;
00259         }
00260     }
00261
00262     return PostMessage(m_hWnd, WM_FILECHANGE, 0, 0);
00263 }

UINT KoWatcher::Run ( ) [private]

Responds to events until requested to terminate

Returns:
Zero
Definition at line 85 of file FileViewWatcher.cpp.

References GetTimeout(), kNotifyHandle, kStartHandle, kTerminateHandle, m_count, m_handles, m_notificationTime, m_startEvent, Notify(), StartWatch(), StopWatch(), and WATCHER_BACKGROUND_TIMEOUT.

Referenced by DelegateRun().

00086 {
00087     DWORD timeout = INFINITE;
00088
00089     for( ; ; )
00090     {
00091         const DWORD wait = WaitForMultipleObjects(m_count, m_handles, FALSE, timeout);
00092         switch( wait )
00093         {
00094         case WAIT_OBJECT_0 + kStartHandle:
00095             {
00096                 // Process signal to start watching
00097                 StopWatch();
00098                 StartWatch();
00099
00100                 m_startEvent.Unlock();
00101                 timeout = INFINITE;
00102                 break;
00103             }
00104         case WAIT_OBJECT_0 + kTerminateHandle:
00105             {
00106                 // Process signal to terminate
00107                 StopWatch();
00108                 delete this;
00109                 return 0;
00110             }
00111         case WAIT_OBJECT_0 + kNotifyHandle:
00112             {
00113                 StopWatch();
00114                 timeout = GetTimeout();
00115
00116                 if( !m_notificationTime || (GetTickCount() - m_notificationTime > WATCHER_BACKGROUND_TIMEOUT) )
00117                 {
00118                     Notify();
00119                 }
00120                 else
00121                 {
00122                     StartWatch();
00123
00124                     const DWORD ignoreTimeout = GetTimeout(true);
00125
00126                     // Ignore some possible notifications to reduce the thread's load
00127                     if( WaitForSingleObject(m_handles[kTerminateHandle], ignoreTimeout) == WAIT_OBJECT_0 )
00128                     {
00129                         // Process signal to terminate
00130                         StopWatch();
00131                         delete this;
00132                         return 0;
00133                     }
00134
00135                     timeout /= 2;
00136                 }
00137
00138                 m_startEvent.Unlock();
00139                 break;
00140             }
00141         case WAIT_TIMEOUT:
00142             {
00143                 StopWatch();
00144                 Notify();
00145
00146                 timeout = INFINITE;
00147                 break;
00148             }
00149         }
00150     }
00151
00152     return 0;
00153 }

Here is the call graph for this function:

void KoWatcher::SignalStartWatch | ( | LPCTSTR | path,
 |  | bool | isRecursive
 | ) |

Signal to start watching for file changes in particular destination

Parameters:
path | Path to watch
isRecursive | true to watch recursively, false otherwise
Definition at line 160 of file FileViewWatcher.cpp.

References m_isRecursive, m_notificationTime, m_path, m_section, and m_startEvent.

Referenced by CBrowseFileView::ResetView().

00161 {
00162     // Store parameters
00163     m_section.Lock();
00164
00165     if( stricmp(m_path, path) != 0 )
00166     {
00167         m_notificationTime = 0;
00168     }
00169
00170     _tcscpy(m_path, path);
00171     m_isRecursive = isRecursive;
00172
00173     m_section.Unlock();
00174     m_startEvent.SetEvent();
00175 }

void KoWatcher::SignalTerminate ( )

Set signal to terminate Definition at line 180 of file FileViewWatcher.cpp.

References m_terminateEvent.

Referenced by CBrowseFileView::OnDestroy().

00181 {
00182     m_terminateEvent.SetEvent();
00183 }

bool KoWatcher::StartWatch ( ) [private]

Start monitoring

Returns:
true on success, false otherwise
Definition at line 189 of file FileViewWatcher.cpp.

References kEndHandle, kNotifyHandle, m_count, m_handles, m_isRecursive, m_path, and m_section.

Referenced by Run().

00190 {
00191     // Retrieve parameters first
00192     TCHAR path[_MAX_PATH];
00193     bool isRecursive;
00194
00195     m_section.Lock();
00196
00197     lstrcpyn(path, m_path, _MAX_PATH);
00198     isRecursive = m_isRecursive;
00199
00200     m_section.Unlock();
00201
00202     // Start watching
00203     const HANDLE notifyHandle = FindFirstChangeNotification(path,
00204         isRecursive,
00205         FILE_NOTIFY_CHANGE_FILE_NAME |
00206         FILE_NOTIFY_CHANGE_DIR_NAME |
00207         //FILE_NOTIFY_CHANGE_SIZE |
00208         FILE_NOTIFY_CHANGE_LAST_WRITE |
00209         //FILE_NOTIFY_CHANGE_LAST_ACCESS |
00210 #if _MSC_VER >= 1200
00211         //FILE_NOTIFY_CHANGE_CREATION | (makes Win98 fail)
00212 #endif
00213         //FILE_NOTIFY_CHANGE_SECURITY |
00214         FILE_NOTIFY_CHANGE_ATTRIBUTES);
00215
00216     if( notifyHandle != INVALID_HANDLE_VALUE )
00217     {
00218         m_handles[kNotifyHandle] = notifyHandle;
00219         m_count = kEndHandle;
00220     }
00221
00222     return m_count == kEndHandle;
00223 }

void KoWatcher::StopWatch ( ) [private]

Stop monitoring Definition at line 228 of file FileViewWatcher.cpp.

References kEndHandle, kNotifyHandle, m_count, and m_handles.

Referenced by Run().

00229 {
00230     if( m_count == kEndHandle && m_handles[kNotifyHandle] != INVALID_HANDLE_VALUE )
00231     {
00232         // Reset and close the handle
00233         FindNextChangeNotification(m_handles[kNotifyHandle]);
00234         FindCloseChangeNotification(m_handles[kNotifyHandle]);
00235         m_handles[kNotifyHandle] = INVALID_HANDLE_VALUE;
00236         m_count = 2;
00237     }
00238 }

Member Data Documentation

DWORD KoWatcher::m_count [private]

Count of handles being watched Definition at line 59 of file FileViewWatcher.h.

Referenced by KoWatcher(), Run(), StartWatch(), and StopWatch().

HANDLE KoWatcher::m_handles[kEndHandle] [private]

Objects being watched Definition at line 58 of file FileViewWatcher.h.

Referenced by KoWatcher(), Run(), StartWatch(), and StopWatch().

HWND KoWatcher::m_hWnd [private]

Window to post notifications to Definition at line 52 of file FileViewWatcher.h.

Referenced by Notify().

bool KoWatcher::m_isRecursive [private]

Flag to tell whether to watch for recursive changes Definition at line 53 of file FileViewWatcher.h.

Referenced by SignalStartWatch(), and StartWatch().

DWORD KoWatcher::m_notificationTime [private]

Store the last notification tick count to assure refreshes under heave load Definition at line 55 of file FileViewWatcher.h.

Referenced by Notify(), Run(), and SignalStartWatch().

TCHAR KoWatcher::m_path[_MAX_PATH] [private]

Path to watch for changes Definition at line 51 of file FileViewWatcher.h.

Referenced by KoWatcher(), SignalStartWatch(), and StartWatch().

int KoWatcher::m_rapidNotificationCount [private]

Count rapid notifications Definition at line 56 of file FileViewWatcher.h.

Referenced by GetTimeout(), and Notify().

CCriticalSection KoWatcher::m_section [private]

Synchronization object Definition at line 61 of file FileViewWatcher.h.

Referenced by SignalStartWatch(), and StartWatch().

CEvent KoWatcher::m_startEvent [private]

Signals that watcher thread shall start watching Definition at line 48 of file FileViewWatcher.h.

Referenced by KoWatcher(), Run(), and SignalStartWatch().

CEvent KoWatcher::m_terminateEvent [private]

Signals that watcher thread should terminate Definition at line 49 of file FileViewWatcher.h.

Referenced by KoWatcher(), and SignalTerminate().

The documentation for this class was generated from the following files:
  • WinCvs/FileViewWatcher.h
  • WinCvs/FileViewWatcher.cpp
Generated on Sat Aug 7 22:54:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoWatchersHandler Class Reference

KoWatchersHandler Class Reference

Handles watchers on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoWatchersHandler:

[legend]
Collaboration diagram for KoWatchersHandler:

[legend]
List of all members.

Public Member Functions

KoWatchersHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles watchers on the selected items.

Definition at line 218 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoWatchersHandler::KoWatchersHandler ( ) [inline]

Definition at line 221 of file BrowseViewHandlers.h.

References _i18n.

00222         : KiSelectionHandler(_i18n("Watchers"))
00223     {}

Member Function Documentation

virtual void KoWatchersHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 231 of file BrowseViewHandlers.h.

References CvsCmdWatchers(), and KiSelectionHandler::OnFiles().

00232     {
00233         KiSelectionHandler::OnFiles(pmf);
00234         CvsCmdWatchers(*this);
00235     }

Here is the call graph for this function:

virtual void KoWatchersHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 225 of file BrowseViewHandlers.h.

References CvsCmdWatchers(), and KiSelectionHandler::OnFolder().

00226     {
00227         KiSelectionHandler::OnFolder(fullpath);
00228         CvsCmdWatchers(*this);
00229     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoWatchOffHandler Class Reference

KoWatchOffHandler Class Reference

Handles watch off on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoWatchOffHandler:

[legend]
Collaboration diagram for KoWatchOffHandler:

[legend]
List of all members.

Public Member Functions

KoWatchOffHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles watch off on the selected items.

Definition at line 281 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoWatchOffHandler::KoWatchOffHandler ( ) [inline]

Definition at line 284 of file BrowseViewHandlers.h.

References _i18n.

00285         : KiSelectionHandler(_i18n("Watch Off"))
00286     {}

Member Function Documentation

virtual void KoWatchOffHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 294 of file BrowseViewHandlers.h.

References CvsCmdWatchOff(), and KiSelectionHandler::OnFiles().

00295     {
00296         KiSelectionHandler::OnFiles(pmf);
00297         CvsCmdWatchOff(*this);
00298     }

Here is the call graph for this function:

virtual void KoWatchOffHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 288 of file BrowseViewHandlers.h.

References CvsCmdWatchOff(), and KiSelectionHandler::OnFolder().

00289     {
00290         KiSelectionHandler::OnFolder(fullpath);
00291         CvsCmdWatchOff(*this);
00292     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: KoWatchOnHandler Class Reference

KoWatchOnHandler Class Reference

Handles watch on on the selected items. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for KoWatchOnHandler:

[legend]
Collaboration diagram for KoWatchOnHandler:

[legend]
List of all members.

Public Member Functions

KoWatchOnHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

Handles watch on on the selected items.

Definition at line 260 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

KoWatchOnHandler::KoWatchOnHandler ( ) [inline]

Definition at line 263 of file BrowseViewHandlers.h.

References _i18n.

00264         : KiSelectionHandler(_i18n("Watch On"))
00265     {}

Member Function Documentation

virtual void KoWatchOnHandler::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 273 of file BrowseViewHandlers.h.

References CvsCmdWatchOn(), and KiSelectionHandler::OnFiles().

00274     {
00275         KiSelectionHandler::OnFiles(pmf);
00276         CvsCmdWatchOn(*this);
00277     }

Here is the call graph for this function:

virtual void KoWatchOnHandler::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 267 of file BrowseViewHandlers.h.

References CvsCmdWatchOn(), and KiSelectionHandler::OnFolder().

00268     {
00269         KiSelectionHandler::OnFolder(fullpath);
00270         CvsCmdWatchOn(*this);
00271     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LAttachment Class Reference

LAttachment Class Reference

Inheritance diagram for LAttachment:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LBevelButton Class Reference

LBevelButton Class Reference

Inheritance diagram for LBevelButton:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.h
Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LCommander Class Reference

LCommander Class Reference

Inheritance diagram for LCommander:

[legend]
The documentation for this class was generated from the following file:
  • common/MacBinEncoding.h
Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ULIST_INFO Struct Reference

ULIST_INFO Struct Reference

#include <umain.h>

Collaboration diagram for ULIST_INFO:

[legend]
List of all members.

Public Attributes

int row
int col
const char * | title
void * | data

Member Data Documentation

int ULIST_INFO::col

Definition at line 1021 of file umain.h.

Referenced by UWidget::OnListGetInfo(), and UCvsFiles::Search().

void* ULIST_INFO::data

Definition at line 1023 of file umain.h.

Referenced by UWidget::OnListGetInfo().

int ULIST_INFO::row

Definition at line 1021 of file umain.h.

Referenced by UWidget::OnListGetInfo(), and UCvsFiles::Search().

const char* ULIST_INFO::title

Definition at line 1022 of file umain.h.

Referenced by UWidget::OnListGetInfo(), and UCvsFiles::Search().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ULIST_INSERT Struct Reference

ULIST_INSERT Struct Reference

#include <umain.h>

Collaboration diagram for ULIST_INSERT:

[legend]
List of all members.

Public Attributes

int row
int col
const char * | title
void * | icon

Member Data Documentation

int ULIST_INSERT::col

Definition at line 1012 of file umain.h.

Referenced by TViewFill::InitItem(), UWidget::OnListInsert(), and UCvsFiles::ResetView().

void* ULIST_INSERT::icon

Definition at line 1014 of file umain.h.

Referenced by TViewFill::InitItem(), UWidget::OnListInsert(), and UCvsFiles::ResetView().

int ULIST_INSERT::row

Definition at line 1012 of file umain.h.

Referenced by TViewFill::InitItem(), UWidget::OnListInsert(), and UCvsFiles::ResetView().

const char* ULIST_INSERT::title

Definition at line 1013 of file umain.h.

Referenced by TViewFill::InitItem(), UWidget::OnListInsert(), and UCvsFiles::ResetView().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CListBox Class Reference

CListBox Class Reference

Inheritance diagram for CListBox:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJListBox.h
Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CListCtrl Class Reference

CListCtrl Class Reference

Inheritance diagram for CListCtrl:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJListCtrl.h
Generated on Sat Aug 7 22:54:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CListParserConsole Class Reference

CListParserConsole Class Reference

Class to parse directories/files (obtained using cvs ls). More...

#include <ItemListDlg.h>

Inheritance diagram for CListParserConsole:

[legend]
Collaboration diagram for CListParserConsole:

[legend]
List of all members.

Public Member Functions

CListParserConsole ()
virtual | ~CListParserConsole ()
virtual void | Parse (int launchRes)

Detailed Description

Class to parse directories/files (obtained using cvs ls).

Definition at line 145 of file ItemListDlg.h.

Constructor & Destructor Documentation

CListParserConsole::CListParserConsole ( )

Definition at line 431 of file ItemListDlg.cpp.

00432 {
00433 }

CListParserConsole::~CListParserConsole ( ) [virtual]

Definition at line 435 of file ItemListDlg.cpp.

00436 {
00437 }

Member Function Documentation

void CListParserConsole::Parse ( int launchRes ) [virtual]

Virtual overridable to parse the result of browse command

Parameters:
launchRes The result of the command launch
Note:
Call default implementation after parsing is finished to clear the stored command output and store the launch result, the error output is not cleared however to allow further analysis

Implements CItemListConsole.

Definition at line 439 of file ItemListDlg.cpp.

References getline(), ItemRowInfo::m_description, ItemRowInfo::m_descriptionEx, CItemListConsole::Parse(), and STR_ITEMLIST_DIR.

00440 {
00441     string line;
00442
00443     while( getline(m_cvsOut, line) )
00444     {
00445         if( !line.empty() && !isspace(line.c_str()[0]) )
00446         {
00447             const char entrySeparator = '/';
00448             string entryType;
00449             stringstream entry(line);
00450
00451             if( getline(entry, entryType, entrySeparator) )
00452             {
00453                 if( entryType.size() > 0 && entryType.c_str()[0] == 'D' )
00454                 {
00455                     string directory;
00456
00457                     if( getline(entry, directory, entrySeparator) && !directory.empty() )
00458                     {
00459                         ItemRowInfo rowInfo;
00460                         rowInfo.m_description.insert(STR_ITEMLIST_DIR);
00461
00462                         m_itemList.insert(std::make_pair(directory, rowInfo));
00463                     }
00464                 }
00465                 else
00466                 {
00467                     string file;
00468
00469                     if( getline(entry, file, entrySeparator) && !file.empty() )
00470                     {
00471                         string revision;
00472                         string date;
00473
00474                         if( getline(entry, revision, entrySeparator) &&
00475                             getline(entry, date, entrySeparator) )
00476                         {
00477                             ItemRowInfo rowInfo;
00478                             rowInfo.m_description.insert(revision);
00479                             rowInfo.m_descriptionEx.insert(date);
00480
00481                             m_itemList.insert(std::make_pair(file, rowInfo));
00482                         }
00483                     }
00484                 }
00485             }
00486         }
00487     }
00488
00489     CItemListConsole::Parse(launchRes);
00490 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/ItemListDlg.h
  • common/ItemListDlg.cpp
Generated on Sat Aug 7 22:54:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CListView Class Reference

CListView Class Reference

Inheritance diagram for CListView:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/BrowseFileView.h
Generated on Sat Aug 7 22:54:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LListener Class Reference

LListener Class Reference

Inheritance diagram for LListener:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.h
Generated on Sat Aug 7 22:54:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LMainPseudoAttachment Class Reference

LMainPseudoAttachment Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for LMainPseudoAttachment:

[legend]
Collaboration diagram for LMainPseudoAttachment:

[legend]
List of all members.

Public Member Functions

LMainPseudoAttachment ()
virtual | ~LMainPseudoAttachment ()
virtual void | SpendTime (const EventRecord &inMacEvent)

Protected Member Functions

virtual void | ExecuteSelf (MessageT inMessage, void *ioParam)

Constructor & Destructor Documentation

LMainPseudoAttachment::LMainPseudoAttachment ( )

Definition at line 291 of file UPseudoSupport.cpp.

00291                                              : LAttachment(msg_AnyMessage)
00292 {
00293     StartIdling();
00294 }

LMainPseudoAttachment::~LMainPseudoAttachment ( ) [virtual]

Definition at line 296 of file UPseudoSupport.cpp.

00297 {
00298 }

Member Function Documentation

void LMainPseudoAttachment::ExecuteSelf | ( | MessageT | inMessage,
 |  | void * | ioParam
 | ) | [protected, virtual]

Definition at line 305 of file UPseudoSupport.cpp.

References UCmdUI::CanContinue(), UWidget::DoValidUI(), EV_CMD, EV_COMMAND_START, EV_UPDATEFOCUS, EV_UPDTCMD, UWidget::GetFocus(), UCmdUI::m_nID, NEW, UPseudoCmdStatusWrapper::outEnabled, UPseudoCmdStatusWrapper::outMark, UPseudoCmdStatusWrapper::outName, UPseudoCmdStatusWrapper::outUsesMark, STD, UEventGetTargets(), UEventNotifyMessage(), UEventSendMessage(), and UEventSendMessageExt().

00306 {
00307     SetExecuteHost(true);
00308
00309     if(UPPMenu::sPPMenuWidID == -1)
00310     {
00311         NEW UPPMenu();
00312     }
00313
00314     if((inMessage > 0 && inMessage < 800) || inMessage >= EV_COMMAND_START)
00315     {
00316         int handledFlag;
00317         int res = UEventSendMessageExt(UPPMenu::sPPMenuWidID, EV_CMD,
00318             inMessage, 0L, &handledFlag);
00319         if(res == 0 && handledFlag)
00320         {
00321             SetExecuteHost(false);
00322             return;
00323         }
00324         else
00325             SetExecuteHost(true);
00326     }
00327
00328     switch (inMessage)
00329     {
00330         case msg_CommandStatus:
00331         {
00332             SCommandStatus *status = static_cast<SCommandStatus*> (ioParam);
00333             CommandT cmdid = status->command;
00334             UPseudoCmdStatusWrapper wrapper;
00335             wrapper.outEnabled = status->enabled;
00336             wrapper.outUsesMark = status->usesMark;
00337             wrapper.outMark = status->mark;
00338             wrapper.outName = status->name;
00339
00340             // first forward the command to the focused widget : if it doesn't want it
00341             // we give it to the next pseudo widget.
00342             int widFocus = UWidget::GetFocus();
00343             if(widFocus != -1)
00344             {
00345                 UCmdUI pUI(cmdid);
00346                 pUI.m_wrapper = &wrapper;
00347                 UEventSendMessage(widFocus, EV_UPDTCMD, pUI.m_nID, &pUI);
00348                 if(!pUI.CanContinue())
00349                 {
00350                     SetExecuteHost(false);
00351                     break;
00352                 }
00353             }
00354
00355             STD map<int, UCmdTarget *>::const_iterator i;
00356             const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00357             for(i = targets.begin(); i != targets.end(); ++i)
00358             {
00359                 int widid = (*i).first;
00360                 if(widid == widFocus)
00361                     continue;
00362
00363                 UCmdUI pUI(cmdid);
00364                 pUI.m_wrapper = &wrapper;
00365                 UEventSendMessage(widid, EV_UPDTCMD, pUI.m_nID, &pUI);
00366                 if(!pUI.CanContinue())
00367                     break;
00368             }
00369
00370             if(i != targets.end())
00371                 SetExecuteHost(false);
00372             break;
00373         }
00374
00375         case msg_Event:
00376         {
00377             EventRecord *ev = static_cast<EventRecord*> (ioParam);
00378
00379 #if 0
00380             if(ev->what == activateEvt)
00381             {
00382                 bool activate = (ev->modifiers & activeFlag) != 0;
00383                 LWindow *theWindow = LWindow::FetchWindowObject((WindowPtr)ev->message);
00384                 if(theWindow != 0L)
00385                 {
00386                     UEventNotifyMessage(EV_UPDATEFOCUS, !activate, theWindow);
00387                         // so the pseudo widget update its current widget.
00388                         // it's important for the menu handling.
00389                 }
00390             }
00391 #endif
00392             if(ev->what == activateEvt ||
00393                 ev->what == mouseDown ||
00394                 ev->what == mouseUp ||
00395                 ev->what == keyDown ||
00396                 ev->what == keyUp ||
00397                 ev->what == autoKey)
00398             {
00399                 UWidget::DoValidUI(false);
00400                 LCommander::SetUpdateCommandStatus(true);
00401             }
00402             break;
00403         }
00404     }
00405 }

Here is the call graph for this function:

void LMainPseudoAttachment::SpendTime ( const EventRecord & inMacEvent ) [virtual]

Definition at line 300 of file UPseudoSupport.cpp.

00301 {
00302     ::UEventGiveTime();
00303 }

The documentation for this class was generated from the following files:
  • rf/support/powerplant/UPseudoSupport.h
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:54:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CLogFilters Class Reference

CLogFilters Class Reference

Filters log dialog. More...

#include <LogDlg.h>

Inheritance diagram for CLogFilters:

[legend]
Collaboration diagram for CLogFilters:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_LOG_FILTERS }

Public Member Functions

CLogFilters (const MultiFiles *mf, const char *sLastDate, const char *sLastRev, const char *sLastUsers, const char *sLastStates)
~CLogFilters ()

Public Attributes

CButton | m_hasUserCheck
CButton | m_hasStateCheck
CButton | m_hasRevCheck
CButton | m_hasDateCheck
CButton | m_browseTagButton
CSmartComboBox m_userCombo
CSmartComboBox m_stateCombo
CSmartComboBox m_revCombo
CSmartComboBox m_dateCombo
CString | m_date
CString | m_rev
CString | m_state
CString | m_user
BOOL | m_hasDate
BOOL | m_hasRev
BOOL | m_hasState
BOOL | m_hasUser

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDate ()
BN_CLICKED message handler, enable date entry window.
afx_msg void | OnRev ()
BN_CLICKED message handler, enable revision entry window.
afx_msg void | OnState ()
BN_CLICKED message handler, enable state entry window.
afx_msg void | OnUser ()
BN_CLICKED message handler, enable user entry window.
afx_msg void | OnBrowseTag ()
BN_CLICKED message handler, browse for branch/tag.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf

Detailed Description

Filters log dialog.

Definition at line 95 of file LogDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 108 of file LogDlg.h.
00108 { IDD = IDD_LOG_FILTERS };

Constructor & Destructor Documentation

CLogFilters::CLogFilters | ( | const MultiFiles * | mf,
 |  | const char * | sLastDate,
 |  | const char * | sLastRev,
 |  | const char * | sLastUsers,
 |  | const char * | sLastStates
 | ) |

Definition at line 198 of file LogDlg.cpp.

References gLogDateNames, gLogRevNames, gLogStateNames, and gLogUserNames.

00201                          : m_mf(mf), CHHelpPropertyPage(CLogFilters::IDD)
00202 {
00203     //{{AFX_DATA_INIT(CLogFilters)
00204     m_date = sLastDate;
00205     m_rev = sLastRev;
00206     m_state = sLastStates;
00207     m_user = sLastUsers;
00208     m_hasDate = FALSE;
00209     m_hasRev = FALSE;
00210     m_hasState = FALSE;
00211     m_hasUser = FALSE;
00212     //}}AFX_DATA_INIT
00213
00214     m_revCombo.SetItems(&gLogRevNames);
00215     m_dateCombo.SetItems(&gLogDateNames);
00216     m_userCombo.SetItems(&gLogUserNames);
00217     m_stateCombo.SetItems(&gLogStateNames);
00218 }

CLogFilters::~CLogFilters ( )

Definition at line 220 of file LogDlg.cpp.

00221 {
00222 }

Member Function Documentation

void CLogFilters::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 224 of file LogDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BROWSE_TAG, IDC_HAS_DATE, IDC_HAS_REV, IDC_HAS_STATES, IDC_HAS_USERS, IDC_RANGE_DATE, IDC_RANGE_REV_TAG, IDC_STATES, IDC_USERS, m_browseTagButton, m_date, m_dateCombo, m_hasDate, m_hasDateCheck, m_hasRev, m_hasRevCheck, m_hasState, m_hasStateCheck, m_hasUser, m_hasUserCheck, m_rev, m_revCombo, m_state, m_stateCombo, m_user, m_userCombo, OnDate(), OnRev(), OnState(), and OnUser().

00225 {
00226     CHHelpPropertyPage::DoDataExchange(pDX);
00227     //{{AFX_DATA_MAP(CLogFilters)
00228     DDX_Control(pDX, IDC_HAS_USERS, m_hasUserCheck);
00229     DDX_Control(pDX, IDC_HAS_STATES, m_hasStateCheck);
00230     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00231     DDX_Control(pDX, IDC_HAS_DATE, m_hasDateCheck);
00232     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00233     DDX_Control(pDX, IDC_USERS, m_userCombo);
00234     DDX_Control(pDX, IDC_STATES, m_stateCombo);
00235     DDX_Control(pDX, IDC_RANGE_REV_TAG, m_revCombo);
00236     DDX_Control(pDX, IDC_RANGE_DATE, m_dateCombo);
00237     DDX_CBString(pDX, IDC_RANGE_DATE, m_date);
00238     DDX_CBString(pDX, IDC_RANGE_REV_TAG, m_rev);
00239     DDX_CBString(pDX, IDC_STATES, m_state);
00240     DDX_CBString(pDX, IDC_USERS, m_user);
00241     DDX_Check(pDX, IDC_HAS_DATE, m_hasDate);
00242     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00243     DDX_Check(pDX, IDC_HAS_STATES, m_hasState);
00244     DDX_Check(pDX, IDC_HAS_USERS, m_hasUser);
00245     //}}AFX_DATA_MAP
00246
00247     if( m_hasDate )
00248     {
00249         DDV_MinChars(pDX, m_date, 1);
00250     }
00251
00252     if( m_hasState )
00253     {
00254         DDV_MinChars(pDX, m_state, 1);
00255     }
00256
00257     if( !pDX->m_bSaveAndValidate )
00258     {
00259         OnRev();
00260         OnDate();
00261         OnState();
00262         OnUser();
00263     }
00264
00265     DDX_ComboMString(pDX, IDC_RANGE_REV_TAG, m_revCombo);
00266     DDX_ComboMString(pDX, IDC_RANGE_DATE, m_dateCombo);
00267     DDX_ComboMString(pDX, IDC_USERS, m_userCombo);
00268     DDX_ComboMString(pDX, IDC_STATES, m_stateCombo);
00269 }

Here is the call graph for this function:

void CLogFilters::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 285 of file LogDlg.cpp.

References IDC_BROWSE_TAG, IDC_HAS_DATE, IDC_HAS_REV, IDC_HAS_STATES, IDC_HAS_USERS, IDC_RANGE_DATE, IDC_RANGE_REV_TAG, IDC_STATES, IDC_USERS, IDH_IDC_BROWSE_TAG, IDH_IDC_HAS_DATE, IDH_IDC_HAS_REV, IDH_IDC_HAS_STATES, IDH_IDC_HAS_USERS, IDH_IDC_RANGE_DATE, IDH_IDC_RANGE_REV_TAG, IDH_IDC_STATES, and IDH_IDC_USERS.

00286 {
00287     SetCtrlHelpID(IDC_HAS_REV,          IDH_IDC_HAS_REV);
00288     SetCtrlHelpID(IDC_RANGE_REV_TAG,    IDH_IDC_RANGE_REV_TAG);
00289     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00290     SetCtrlHelpID(IDC_HAS_DATE,         IDH_IDC_HAS_DATE);
00291     SetCtrlHelpID(IDC_RANGE_DATE,       IDH_IDC_RANGE_DATE);
00292     SetCtrlHelpID(IDC_HAS_STATES,       IDH_IDC_HAS_STATES);
00293     SetCtrlHelpID(IDC_STATES,           IDH_IDC_STATES);
00294     SetCtrlHelpID(IDC_HAS_USERS,        IDH_IDC_HAS_USERS);
00295     SetCtrlHelpID(IDC_USERS,            IDH_IDC_USERS);
00296 }

void CLogFilters::OnBrowseTag ( ) [protected]

BN_CLICKED message handler, browse for branch/tag.

Definition at line 312 of file LogDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev, and m_revCombo.

00313 {
00314     CStr tagName;
00315     if( CompatGetTagListItem(m_mf, tagName) )
00316     {
00317         m_rev = tagName.c_str();
00318         m_revCombo.SetWindowText(m_rev);
00319     }
00320 }

Here is the call graph for this function:

void CLogFilters::OnDate ( ) [protected]

BN_CLICKED message handler, enable date entry window.

Definition at line 299 of file LogDlg.cpp.

References m_dateCombo, and m_hasDateCheck.

Referenced by DoDataExchange().

00300 {
00301     m_dateCombo.EnableWindow(m_hasDateCheck.GetCheck());
00302 }

void CLogFilters::OnRev ( ) [protected]

BN_CLICKED message handler, enable revision entry window.

Definition at line 305 of file LogDlg.cpp.

References m_browseTagButton, m_hasRevCheck, and m_revCombo.

Referenced by DoDataExchange().

00306 {
00307     m_revCombo.EnableWindow(m_hasRevCheck.GetCheck());
00308     m_browseTagButton.EnableWindow(m_hasRevCheck.GetCheck());
00309 }

void CLogFilters::OnState ( ) [protected]

BN_CLICKED message handler, enable state entry window.

Definition at line 323 of file LogDlg.cpp.

References m_hasStateCheck, and m_stateCombo.

Referenced by DoDataExchange().

00324 {
00325     m_stateCombo.EnableWindow(m_hasStateCheck.GetCheck());
00326 }

void CLogFilters::OnUser ( ) [protected]

BN_CLICKED message handler, enable user entry window.

Definition at line 329 of file LogDlg.cpp.

References m_hasUserCheck, and m_userCombo.

Referenced by DoDataExchange().

00330 {
00331     m_userCombo.EnableWindow(m_hasUserCheck.GetCheck());
00332 }

Member Data Documentation

CButton CLogFilters::m_browseTagButton

Definition at line 113 of file LogDlg.h.

Referenced by DoDataExchange(), and OnRev().

CString CLogFilters::m_date

Definition at line 118 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CSmartComboBox CLogFilters::m_dateCombo

Definition at line 117 of file LogDlg.h.

Referenced by DoDataExchange(), and OnDate().

BOOL CLogFilters::m_hasDate

Definition at line 122 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CButton CLogFilters::m_hasDateCheck

Definition at line 112 of file LogDlg.h.

Referenced by DoDataExchange(), and OnDate().

BOOL CLogFilters::m_hasRev

Definition at line 123 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CButton CLogFilters::m_hasRevCheck

Definition at line 111 of file LogDlg.h.

Referenced by DoDataExchange(), and OnRev().

BOOL CLogFilters::m_hasState

Definition at line 124 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CButton CLogFilters::m_hasStateCheck

Definition at line 110 of file LogDlg.h.

Referenced by DoDataExchange(), and OnState().

BOOL CLogFilters::m_hasUser

Definition at line 125 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CButton CLogFilters::m_hasUserCheck

Definition at line 109 of file LogDlg.h.

Referenced by DoDataExchange(), and OnUser().

const MultiFiles* CLogFilters::m_mf [private]

Definition at line 149 of file LogDlg.h.

Referenced by OnBrowseTag().

CString CLogFilters::m_rev

Definition at line 119 of file LogDlg.h.

Referenced by CompatGetLog(), DoDataExchange(), and OnBrowseTag().

CSmartComboBox CLogFilters::m_revCombo

Definition at line 116 of file LogDlg.h.

Referenced by DoDataExchange(), OnBrowseTag(), and OnRev().

CString CLogFilters::m_state

Definition at line 120 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CSmartComboBox CLogFilters::m_stateCombo

Definition at line 115 of file LogDlg.h.

Referenced by DoDataExchange(), and OnState().

CString CLogFilters::m_user

Definition at line 121 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CSmartComboBox CLogFilters::m_userCombo

Definition at line 114 of file LogDlg.h.

Referenced by DoDataExchange(), and OnUser().

The documentation for this class was generated from the following files:
  • common/LogDlg.h
  • common/LogDlg.cpp
Generated on Sat Aug 7 22:54:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CLogFrame Class Reference

CLogFrame Class Reference

#include <LogFrm.h>

Inheritance diagram for CLogFrame:

[legend]
Collaboration diagram for CLogFrame:

[legend]
List of all members.

Public Member Functions

CLogFrame ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)
virtual BOOL | OnCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
virtual | ~CLogFrame ()
virtual BOOL | OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)

Protected Member Functions

afx_msg void | OnClose ()

Constructor & Destructor Documentation

CLogFrame::CLogFrame ( )

Definition at line 66 of file LogFrm.cpp.

00067 {
00068     // TODO: add member initialization code here
00069
00070 }

CLogFrame::~CLogFrame ( ) [virtual]

Definition at line 72 of file LogFrm.cpp.

00073 {
00074 }

Member Function Documentation

void CLogFrame::OnClose ( ) [protected]

Definition at line 104 of file LogFrm.cpp.

00105 {
00106     // prevent from closing the main frame
00107     //CCJMDIChildWnd::OnClose();
00108 }

BOOL CLogFrame::OnCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo
 | ) | [virtual]

Definition at line 136 of file LogFrm.cpp.

References CWincvsApp::GetMainFrame(), and CMainFrame::OnBroadcastCmdMsg().

00137 {
00138     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00139     if( app->GetMainFrame()->OnBroadcastCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00140         return TRUE;
00141
00142     return CCJMDIChildWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00143 }

Here is the call graph for this function:

BOOL CLogFrame::OnCreateClient | ( | LPCREATESTRUCT | lpcs,
 |  | CCreateContext * | pContext
 | ) | [virtual]

Definition at line 76 of file LogFrm.cpp.

00078 {
00079     BOOL res = CCJMDIChildWnd::OnCreateClient(lpcs, pContext);
00080     MDIMaximize();
00081
00082     return res;
00083 }

BOOL CLogFrame::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 110 of file LogFrm.cpp.

00111 {
00112 /*  if (IsKeyMovingFocus(pMsg))
00113     {
00114         CWnd* pWnd;
00115         if (0x8000 & GetKeyState(VK_SHIFT))
00116             pWnd = FindPrevWindow(GetFocus());
00117         else
00118             pWnd = FindNextWindow(GetFocus());
00119         if(pWnd)
00120         {
00121             LRESULT DlgCode = ::SendMessage(pMsg->hwnd, WM_GETDLGCODE, 0, 0);
00122             if (!(DlgCode & (DLGC_WANTTAB | DLGC_WANTALLKEYS)))
00123             {
00124                 if (pWnd->IsKindOf(RUNTIME_CLASS(CView)))
00125                     SetActiveView((CView*)pWnd, TRUE);
00126                 else
00127                     pWnd->SetFocus();
00128             }
00129         }
00130         return TRUE;
00131     }*/
00132
00133     return CCJMDIChildWnd::PreTranslateMessage(pMsg);
00134 }

The documentation for this class was generated from the following files:
  • WinCvs/LogFrm.h
  • WinCvs/LogFrm.cpp
Generated on Sat Aug 7 22:54:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CLogin_MAIN Class Reference

CLogin_MAIN Class Reference

#include <LoginDlg.h>

Inheritance diagram for CLogin_MAIN:

[legend]
Collaboration diagram for CLogin_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_LOGIN_MAIN }

Public Member Functions

CLogin_MAIN (bool forceRoot, const char *cvsroot)
~CLogin_MAIN ()

Public Attributes

CButton | m_forceRootCheck
CButton | m_selCvsrootButton
CSmartComboBox m_cvsrootCombo
BOOL | m_forceRoot
CString | m_helpLogin
CString | m_cvsroot

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnSelcvsroot ()
BN_CLICKED message handler, select CVSROOT.
afx_msg void | OnForceroot ()
BN_CLICKED message handler, enable controls.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable controls.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 53 of file LoginDlg.h.
00053 { IDD = IDD_LOGIN_MAIN };

Constructor & Destructor Documentation

CLogin_MAIN::CLogin_MAIN | ( | bool | forceRoot,
 |  | const char * | cvsroot
 | ) |

Definition at line 50 of file LoginDlg.cpp.

References gOldCvsroots.

00051     : CHHelpPropertyPage(CLogin_MAIN::IDD)
00052 {
00053     m_forceRoot = forceRoot;
00054     m_cvsroot = cvsroot;
00055
00056     m_cvsrootCombo.SetItems(&gOldCvsroots);
00057
00058     m_helpLogin = _T("Select \"Force using the CVSROOT\" option to login according to your general preferences settings "
00059         "(otherwise current sandbox settings will be used by CVS client executable).\r\n"
00060         "\r\n"
00061         "Login command is interactive and it will ask you for password.\r\n"
00062         "Entered password will be cached by CVS so you need to login only once for each CVSROOT.\r\n"
00063         "\r\n"
00064         "To remove the password from CVS cache use the logout command.");
00065 }

CLogin_MAIN::~CLogin_MAIN ( )

Definition at line 67 of file LoginDlg.cpp.

00068 {
00069 }

Member Function Documentation

void CLogin_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 71 of file LoginDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BROWSE_CVSROOT, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_HELPLOGIN, m_cvsroot, m_cvsrootCombo, m_forceRoot, m_forceRootCheck, m_helpLogin, and m_selCvsrootButton.

00072 {
00073     CHHelpPropertyPage::DoDataExchange(pDX);
00074     //{{AFX_DATA_MAP(CLogin_MAIN)
00075     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00076     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00077     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00078     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00079     DDX_Text(pDX, IDC_HELPLOGIN, m_helpLogin);
00080     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00081     //}}AFX_DATA_MAP
00082
00083     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00084
00085     if( m_forceRoot )
00086     {
00087         DDV_MinChars(pDX, m_cvsroot, 1);
00088     }
00089
00090     if( !pDX->m_bSaveAndValidate )
00091     {
00092         m_selCvsrootButton.EnableWindow(m_forceRoot);
00093     }
00094 }

Here is the call graph for this function:

void CLogin_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 120 of file LoginDlg.cpp.

References IDC_BROWSE_CVSROOT, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_HELPLOGIN, IDH_IDC_BROWSE_CVSROOT, IDH_IDC_CVSROOT, IDH_IDC_FORCE_CVSROOT, IDH_IDC_HELPLOGIN, and CHHelpSupport::SetCtrlHelpID().

00121 {
00122     SetCtrlHelpID(IDC_HELPLOGIN,        IDH_IDC_HELPLOGIN);
00123     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
00124     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
00125     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
00126 }

Here is the call graph for this function:

void CLogin_MAIN::OnForceroot ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 142 of file LoginDlg.cpp.

References m_cvsrootCombo, m_forceRootCheck, and m_selCvsrootButton.

00143 {
00144     const BOOL enable = m_forceRootCheck.GetCheck();
00145
00146     m_selCvsrootButton.EnableWindow(enable);
00147     m_cvsrootCombo.EnableWindow(enable);
00148 }

BOOL CLogin_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 108 of file LoginDlg.cpp.

References CHHelpPropertyPage::OnInitDialog(), and PostGotoDlgCtrl().

00109 {
00110     CHHelpPropertyPage::OnInitDialog();
00111
00112     // Extra initialization
00113     OnForceroot();
00114     PostGotoDlgCtrl(this, m_forceRoot ? (CWnd*)&m_cvsrootCombo : (CWnd*)&m_forceRootCheck);
00115
00116     return TRUE;  // return TRUE unless you set the focus to a control
00117                   // EXCEPTION: OCX Property Pages should return FALSE
00118 }

Here is the call graph for this function:

void CLogin_MAIN::OnSelcvsroot ( ) [protected]

BN_CLICKED message handler, select CVSROOT.

Definition at line 129 of file LoginDlg.cpp.

References CompatGetCvsRoot(), CStr, CSmartComboBox::GetWindowText(), and m_cvsrootCombo.

00130 {
00131     CString strCvsroot;
00132     m_cvsrootCombo.GetWindowText(strCvsroot);
00133
00134     CStr cvsroot(strCvsroot);
00135     if( CompatGetCvsRoot(cvsroot) )
00136     {
00137         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00138     }
00139 }

Here is the call graph for this function:

Member Data Documentation

CString CLogin_MAIN::m_cvsroot

Definition at line 59 of file LoginDlg.h.

Referenced by CompatGetLogin(), and DoDataExchange().

CSmartComboBox CLogin_MAIN::m_cvsrootCombo

Definition at line 56 of file LoginDlg.h.

Referenced by DoDataExchange(), OnForceroot(), and OnSelcvsroot().

BOOL CLogin_MAIN::m_forceRoot

Definition at line 57 of file LoginDlg.h.

Referenced by CompatGetLogin(), and DoDataExchange().

CButton CLogin_MAIN::m_forceRootCheck

Definition at line 54 of file LoginDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

CString CLogin_MAIN::m_helpLogin

Definition at line 58 of file LoginDlg.h.

Referenced by DoDataExchange().

CButton CLogin_MAIN::m_selCvsrootButton

Definition at line 55 of file LoginDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

The documentation for this class was generated from the following files:
  • common/LoginDlg.h
  • common/LoginDlg.cpp
Generated on Sat Aug 7 22:54:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CLogMain Class Reference

CLogMain Class Reference

Main log dialog. More...

#include <LogDlg.h>

Inheritance diagram for CLogMain:

[legend]
Collaboration diagram for CLogMain:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_LOG_MAIN }

Public Member Functions

CLogMain (bool supress)
~CLogMain ()

Public Attributes

CButton | m_headerDescCheck
CButton | m_headerOnlyCheck
BOOL | m_supress
BOOL | m_defBranch
BOOL | m_noRecurs
BOOL | m_noTags
BOOL | m_onlyRCS
BOOL | m_headerOnly
BOOL | m_headerDesc

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnHeaders ()
BN_CLICKED message handler, reset headers desc if set.
afx_msg void | OnHeadersdesc ()
BN_CLICKED message handler, reset headers only if set.

Private Member Functions

virtual void | InitHelpID ()

Detailed Description

Main log dialog.

Definition at line 50 of file LogDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 61 of file LogDlg.h.
00061 { IDD = IDD_LOG_MAIN };

Constructor & Destructor Documentation

CLogMain::CLogMain ( bool supress )

Definition at line 120 of file LogDlg.cpp.

00120                                : CHHelpPropertyPage(CLogMain::IDD)
00121 {
00122     //{{AFX_DATA_INIT(CLogMain)
00123     m_supress = supress;
00124     m_defBranch = FALSE;
00125     m_noRecurs = FALSE;
00126     m_noTags = FALSE;
00127     m_onlyRCS = FALSE;
00128     m_headerOnly = FALSE;
00129     m_headerDesc = FALSE;
00130     //}}AFX_DATA_INIT
00131 }

CLogMain::~CLogMain ( )

Definition at line 133 of file LogDlg.cpp.

00134 {
00135 }

Member Function Documentation

void CLogMain::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 137 of file LogDlg.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_DEFAULT_BRANCH, IDC_HEADERS, IDC_HEADERS_DESC, IDC_NORECURS, IDC_NOTAGS, IDC_RCS_FILENAMES_ONLY, IDC_SUPRESS_HEADER, m_defBranch, m_headerDesc, m_headerDescCheck, m_headerOnly, m_headerOnlyCheck, m_noRecurs, m_noTags, m_onlyRCS, and m_supress.

00138 {
00139     CHHelpPropertyPage::DoDataExchange(pDX);
00140     //{{AFX_DATA_MAP(CLogMain)
00141     DDX_Control(pDX, IDC_HEADERS_DESC, m_headerDescCheck);
00142     DDX_Control(pDX, IDC_HEADERS, m_headerOnlyCheck);
00143     DDX_Check(pDX, IDC_SUPRESS_HEADER, m_supress);
00144     DDX_Check(pDX, IDC_DEFAULT_BRANCH, m_defBranch);
00145     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00146     DDX_Check(pDX, IDC_NOTAGS, m_noTags);
00147     DDX_Check(pDX, IDC_RCS_FILENAMES_ONLY, m_onlyRCS);
00148     DDX_Check(pDX, IDC_HEADERS, m_headerOnly);
00149     DDX_Check(pDX, IDC_HEADERS_DESC, m_headerDesc);
00150     //}}AFX_DATA_MAP
00151 }

Here is the call graph for this function:

void CLogMain::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 164 of file LogDlg.cpp.

References IDC_DEFAULT_BRANCH, IDC_HEADERS, IDC_HEADERS_DESC, IDC_NORECURS, IDC_NOTAGS, IDC_RCS_FILENAMES_ONLY, IDC_SUPRESS_HEADER, IDH_IDC_DEFAULT_BRANCH, IDH_IDC_HEADERS, IDH_IDC_HEADERS_DESC, IDH_IDC_NORECURS, IDH_IDC_NOTAGS, IDH_IDC_RCS_FILENAMES_ONLY, and IDH_IDC_SUPRESS_HEADER.

00165 {
00166     SetCtrlHelpID(IDC_SUPRESS_HEADER,       IDH_IDC_SUPRESS_HEADER);
00167     SetCtrlHelpID(IDC_DEFAULT_BRANCH,       IDH_IDC_DEFAULT_BRANCH);
00168     SetCtrlHelpID(IDC_NORECURS,             IDH_IDC_NORECURS);
00169     SetCtrlHelpID(IDC_RCS_FILENAMES_ONLY,   IDH_IDC_RCS_FILENAMES_ONLY);
00170     SetCtrlHelpID(IDC_NOTAGS,               IDH_IDC_NOTAGS);
00171     SetCtrlHelpID(IDC_HEADERS,              IDH_IDC_HEADERS);
00172     SetCtrlHelpID(IDC_HEADERS_DESC,         IDH_IDC_HEADERS_DESC);
00173 }

void CLogMain::OnHeaders ( ) [protected]

BN_CLICKED message handler, reset headers desc if set.

Definition at line 176 of file LogDlg.cpp.

References m_headerDescCheck, and m_headerOnlyCheck.

00177 {
00178     if( m_headerOnlyCheck.GetCheck() && m_headerDescCheck.GetCheck() )
00179     {
00180         m_headerDescCheck.SetCheck(0);
00181     }
00182 }

void CLogMain::OnHeadersdesc ( ) [protected]

BN_CLICKED message handler, reset headers only if set.

Definition at line 185 of file LogDlg.cpp.

References m_headerDescCheck, and m_headerOnlyCheck.

00186 {
00187     if( m_headerDescCheck.GetCheck() && m_headerOnlyCheck.GetCheck() )
00188     {
00189         m_headerOnlyCheck.SetCheck(0);
00190     }
00191 }

Member Data Documentation

BOOL CLogMain::m_defBranch

Definition at line 65 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

BOOL CLogMain::m_headerDesc

Definition at line 70 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CButton CLogMain::m_headerDescCheck

Definition at line 62 of file LogDlg.h.

Referenced by DoDataExchange(), OnHeaders(), and OnHeadersdesc().

BOOL CLogMain::m_headerOnly

Definition at line 69 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

CButton CLogMain::m_headerOnlyCheck

Definition at line 63 of file LogDlg.h.

Referenced by DoDataExchange(), OnHeaders(), and OnHeadersdesc().

BOOL CLogMain::m_noRecurs

Definition at line 66 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

BOOL CLogMain::m_noTags

Definition at line 67 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

BOOL CLogMain::m_onlyRCS

Definition at line 68 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

BOOL CLogMain::m_supress

Definition at line 64 of file LogDlg.h.

Referenced by CompatGetLog(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/LogDlg.h
  • common/LogDlg.cpp
Generated on Sat Aug 7 22:54:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CLogNodeData Class Reference

CLogNodeData Class Reference

Inheritance diagram for CLogNodeData:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/GraphView.h
Generated on Sat Aug 7 22:54:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CLogoutThread Class Reference

CLogoutThread Class Reference

Class to handle auto-logout. More...

Inheritance diagram for CLogoutThread:

[legend]
Collaboration diagram for CLogoutThread:

[legend]
List of all members.

Public Member Functions

CLogoutThread ()
virtual | ~CLogoutThread ()
void | KillThread (void)

Private Member Functions

virtual BOOL | InitInstance ()
InitInstance virtual override, run the thread loop.
virtual void | Delete ()
Delete virtual override, delete the thread.

Private Attributes

bool m_term

Detailed Description

Class to handle auto-logout.

Definition at line 74 of file wincvs.cpp.

Constructor & Destructor Documentation

CLogoutThread::CLogoutThread ( )

Definition at line 109 of file wincvs.cpp.

00110     : m_term(false)
00111 {
00112 }

CLogoutThread::~CLogoutThread ( ) [virtual]

Definition at line 114 of file wincvs.cpp.

00115 {
00116 }

Member Function Documentation

void CLogoutThread::Delete ( ) [private, virtual]

Delete virtual override, delete the thread.

Definition at line 119 of file wincvs.cpp.

00120 {
00121     CWinThread::Delete();
00122 }

BOOL CLogoutThread::InitInstance ( ) [private, virtual]

InitInstance virtual override, run the thread loop.

Definition at line 125 of file wincvs.cpp.

References cvs_err(), CvsCmdLogout(), gCvsPrefs, CWincvsApp::GetIdleTime(), CvsPrefs::HasLoogedIn(), CWincvsApp::IsCvsRunning(), CvsPrefs::LogoutTimeOut(), m_term, and CWincvsApp::ResetIdleTime().

00126 {
00127     for( ; ; )
00128     {
00129         Sleep(1000);
00130
00131         if( m_term )
00132             return FALSE;
00133
00134         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00135
00136         if( !gCvsPrefs.HasLoogedIn() || gCvsPrefs.LogoutTimeOut() <= 0 || app->IsCvsRunning() )
00137         {
00138             continue;
00139         }
00140
00141         const DWORD time = ::GetTickCount();
00142         if( app->GetIdleTime() != 0 &&
00143             (int)(time - app->GetIdleTime()) >= (gCvsPrefs.LogoutTimeOut() * 60 * 1000) )
00144         {
00145             app->ResetIdleTime();
00146
00147             cvs_err("Making automatic logout after %d minute(s):\n", gCvsPrefs.LogoutTimeOut());
00148             CvsCmdLogout();
00149         }
00150     }
00151
00152     return FALSE;
00153 }

Here is the call graph for this function:

void CLogoutThread::KillThread ( void )

Set the thread to self-terminate Definition at line 158 of file wincvs.cpp.

References m_term.

Referenced by CWincvsApp::SaveAllModified().

00159 {
00160     m_term = true;
00161 }

Member Data Documentation

bool CLogoutThread::m_term [private]

Definition at line 98 of file wincvs.cpp.

Referenced by InitInstance(), and KillThread().

The documentation for this class was generated from the following file:
  • WinCvs/wincvs.cpp
Generated on Sat Aug 7 22:54:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LOutlineItem Class Reference

LOutlineItem Class Reference

Inheritance diagram for LOutlineItem:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.h
Generated on Sat Aug 7 22:54:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LOutlineTable Class Reference

LOutlineTable Class Reference

Inheritance diagram for LOutlineTable:

[legend]
The documentation for this class was generated from the following file:
  • common/MacBinEncoding.h
Generated on Sat Aug 7 22:54:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LPane Class Reference

LPane Class Reference

Inheritance diagram for LPane:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.h
Generated on Sat Aug 7 22:54:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LPeriodical Class Reference

LPeriodical Class Reference

Inheritance diagram for LPeriodical:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.h
Generated on Sat Aug 7 22:54:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LPlaceHolder Class Reference

LPlaceHolder Class Reference

Inheritance diagram for LPlaceHolder:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.h
Generated on Sat Aug 7 22:54:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LPseudoDrawAttachment Class Reference

LPseudoDrawAttachment Class Reference

Inheritance diagram for LPseudoDrawAttachment:

[legend]
Collaboration diagram for LPseudoDrawAttachment:

[legend]
List of all members.

Public Member Functions

LPseudoDrawAttachment (int widid, int cmdid)
virtual | ~LPseudoDrawAttachment ()

Protected Member Functions

virtual void | ExecuteSelf (MessageT inMessage, void *ioParam)

Protected Attributes

int m_widid
int m_cmdid

Constructor & Destructor Documentation

LPseudoDrawAttachment::LPseudoDrawAttachment | ( | int | widid,
 |  | int | cmdid
 | ) |

Definition at line 275 of file UPseudoSupport.cpp.

00275                                                                  : LAttachment(msg_DrawOrPrint),
00276     m_widid(widid), m_cmdid(cmdid)
00277 {
00278 }

LPseudoDrawAttachment::~LPseudoDrawAttachment ( ) [virtual]

Definition at line 280 of file UPseudoSupport.cpp.

00281 {
00282 }

Member Function Documentation

void LPseudoDrawAttachment::ExecuteSelf | ( | MessageT | inMessage,
 |  | void * | ioParam
 | ) | [protected, virtual]

Definition at line 284 of file UPseudoSupport.cpp.

References EV_CUSTOM_DRAW, m_cmdid, m_widid, and UEventSendMessage().

00285 {
00286     SetExecuteHost(true);
00287     LView *view = dynamic_cast<LView*>(GetOwnerHost());
00288     UEventSendMessage(m_widid, EV_CUSTOM_DRAW, m_cmdid, view);
00289 }

Here is the call graph for this function:

Member Data Documentation

int LPseudoDrawAttachment::m_cmdid [protected]

Definition at line 67 of file UPseudoSupport.cpp.

Referenced by ExecuteSelf().

int LPseudoDrawAttachment::m_widid [protected]

Definition at line 67 of file UPseudoSupport.cpp.

Referenced by ExecuteSelf().

The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:54:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LPseudoWinAttachment Class Reference

LPseudoWinAttachment Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for LPseudoWinAttachment:

[legend]
Collaboration diagram for LPseudoWinAttachment:

[legend]
List of all members.

Public Member Functions

LPseudoWinAttachment (int widid)
virtual | ~LPseudoWinAttachment ()
int | GetPageValue (int cmdid) const
void | SetPageValue (int cmdid, int value)
void | CheckWindowSize (void)
int | SearchWidID (LPane *pane)
void | InvalidCache (UWidget *tab_wid)

Protected Member Functions

virtual void | ExecuteSelf (MessageT inMessage, void *ioParam)
virtual void | ListenToMessage (MessageT inMessage, void *ioParam)

Protected Attributes

int m_widid
Rect | m_lastRect
std::map< int, int > | m_PageValues
std::map< LPane *, int > | m_CacheWidgets

Constructor & Destructor Documentation

LPseudoWinAttachment::LPseudoWinAttachment ( int widid )

Definition at line 407 of file UPseudoSupport.cpp.

References CheckWindowSize(), and m_lastRect.

00407                                                     : LAttachment(msg_GrowZone), m_widid(widid)
00408 {
00409     ::SetRect(&m_lastRect, 0, 0, 0, 0);
00410
00411     CheckWindowSize();
00412 }

Here is the call graph for this function:

LPseudoWinAttachment::~LPseudoWinAttachment ( ) [virtual]

Definition at line 414 of file UPseudoSupport.cpp.

References EV_DESTROY, m_widid, and UEventSendMessage().

00415 {
00416     UEventSendMessage(m_widid, EV_DESTROY, 0, 0L);
00417 }

Here is the call graph for this function:

Member Function Documentation

void LPseudoWinAttachment::CheckWindowSize ( void )

Definition at line 441 of file UPseudoSupport.cpp.

References EV_RESIZE, kUMainWidget, m_lastRect, m_widid, and UEventSendMessage().

Referenced by UPseudoFakePane::AdaptToSuperFrameSize(), and LPseudoWinAttachment().

00442 {
00443     LWindow *wind = dynamic_cast<LWindow*>(GetOwnerHost());
00444     if(wind != 0L)
00445     {
00446         Rect r;
00447         wind->GetGlobalBounds(r);
00448         if(!::EqualRect(&r, &m_lastRect))
00449         {
00450             m_lastRect = r;
00451             URect ur(r);
00452             UEventSendMessage(m_widid, EV_RESIZE, kUMainWidget, &ur);
00453         }
00454     }
00455 }

Here is the call graph for this function:

void LPseudoWinAttachment::ExecuteSelf | ( | MessageT | inMessage,
 |  | void * | ioParam
 | ) | [protected, virtual]

Definition at line 434 of file UPseudoSupport.cpp.

00435 {
00436     SetExecuteHost(true);
00437
00438     // not used yet
00439 }

int LPseudoWinAttachment::GetPageValue ( int cmdid ) const

Definition at line 419 of file UPseudoSupport.cpp.

References m_PageValues.

Referenced by ListenToMessage(), and UWidget::OnGetSliderProperty().

00420 {
00421     std::map<int, int>::const_iterator i = m_PageValues.find(cmdid);
00422     if(i != m_PageValues.end())
00423         return (*i).second;
00424     return 1;
00425 }

void LPseudoWinAttachment::InvalidCache ( UWidget * tab_wid )

Definition at line 494 of file UPseudoSupport.cpp.

References m_CacheWidgets, and UWidget::m_widgets.

Referenced by UWidget::OnPageChanged().

00495 {
00496     std::map<int, void *>::iterator s;
00497     for(s = tab_wid->m_widgets.begin(); s != tab_wid->m_widgets.end(); ++s)
00498     {
00499         std::map<LPane *, int>::iterator i = m_CacheWidgets.find((LPane *)(*s).second);
00500         if(i != m_CacheWidgets.end())
00501             m_CacheWidgets.erase(i);
00502     }
00503 }

void LPseudoWinAttachment::ListenToMessage | ( | MessageT | inMessage,
 |  | void * | ioParam
 | ) | [protected, virtual]

Definition at line 506 of file UPseudoSupport.cpp.

References EV_CMD, EV_COMBO_SEL, EV_EDITCHANGE, EV_LIST_DBLCLICK, EV_LIST_SELECTING, EV_SCROLLCHANGE, GetPageValue(), gTurnOffBroadcast, macpp_getcmdid(), SearchWidID(), UStr::set(), UEventSendMessage(), UMAKEINT, UTextTableView_DoubleClick, and UTextTableView_SingleClick.

00509 {
00510     int cmdid;
00511     LPane *pane;
00512
00513     if(gTurnOffBroadcast)
00514         return;
00515
00516     if(macpp_getcmdid(inMessage, cmdid))
00517     {
00518         LWindow *wind = dynamic_cast<LWindow*>(GetOwnerHost());
00519         if(wind != 0L)
00520         {
00521             pane = wind->FindPaneByID(inMessage);
00522
00523             if(pane != 0L)
00524             {
00525                 int widid = SearchWidID(pane);
00526
00527                 LEditText *edit;
00528                 LControl *control;
00529                 LMenuController *popup;
00530                 LScrollBar *bar;
00531                 LSlider *slider;
00532                 LLittleArrows *arrows;
00533                 LCheckBoxGroupBox *groupbox;
00534
00535                 if((edit = dynamic_cast<LEditText*>(pane)) != 0L)
00536                     UEventSendMessage(widid, EV_EDITCHANGE, cmdid, 0L);
00537                 else if((popup = dynamic_cast<LMenuController*>(pane)) != 0L &&
00538                     popup->GetMacMenuH() != 0L)
00539                 {
00540                     SInt16 item = popup->GetCurrentMenuItem();
00541                     LStr255 pstr;
00542                     if(item > 0)
00543                         popup->GetMenuItemText(item, pstr);
00544                     UStr content(pstr);
00545                     UEventSendMessage(widid, EV_COMBO_SEL, UMAKEINT(cmdid, item - 1),
00546                         (void *)(const char *)content);
00547                 }
00548                 else if((bar = dynamic_cast<LScrollBar*>(pane)) != 0L)
00549                     UEventSendMessage(widid, EV_SCROLLCHANGE, cmdid, (void *)bar->GetValue());
00550                 else if((slider = dynamic_cast<LSlider*>(pane)) != 0L)
00551                     UEventSendMessage(widid, EV_SCROLLCHANGE, cmdid, (void *)slider->GetValue());
00552                 else if((arrows = dynamic_cast<LLittleArrows*>(pane)) != 0L)
00553                     UEventSendMessage(widid, EV_SCROLLCHANGE, cmdid, (void *)arrows->GetValue());
00554                 else if((control = dynamic_cast<LControl*>(pane)) != 0L)
00555                     UEventSendMessage(widid, EV_CMD, cmdid, 0L);
00556                 else if((groupbox = dynamic_cast<LCheckBoxGroupBox*>(pane)) != 0L)
00557                     UEventSendMessage(widid, EV_CMD, cmdid, 0L);
00558             }
00559         }
00560     }
00561     else switch (inMessage)
00562     {
00563         case msg_ScrollAction:
00564         {
00565             LScrollBar::SScrollMessage *message = static_cast<LScrollBar::SScrollMessage *>(ioParam);
00566             LScrollBar* scrollBar = message->scrollBar;
00567             int fPageStep = 1;
00568             if(macpp_getcmdid(scrollBar->GetPaneID(), cmdid))
00569                 fPageStep = GetPageValue(cmdid);
00570             int fButtonStep = 1;
00571             switch(message->hotSpot)
00572             {
00573             case kControlPageUpPart:
00574                 scrollBar->SetValue(scrollBar->GetValue() - fPageStep);
00575                 break;
00576             case kControlUpButtonPart:
00577                 scrollBar->SetValue(scrollBar->GetValue() - fButtonStep);
00578                 break;
00579             case kControlPageDownPart:
00580                 scrollBar->SetValue(scrollBar->GetValue() + fPageStep);
00581                 break;
00582             case kControlDownButtonPart:
00583                 scrollBar->SetValue(scrollBar->GetValue() + fButtonStep);
00584                 break;
00585             }
00586             break;
00587         }
00588         case UTextTableView_SingleClick:
00589         case UTextTableView_DoubleClick:
00590             pane = static_cast<LPane *>(ioParam);
00591
00592             if(pane != 0L && macpp_getcmdid(pane, cmdid))
00593             {
00594                 UStr name;
00595                 int entry = 0;
00596                 LTextTableView *table = dynamic_cast<LTextTableView *>(pane);
00597                 if(table != 0L)
00598                 {
00599                     STableCell cell = table->GetFirstSelectedCell();
00600                     if(!cell.IsNullCell())
00601                     {
00602                         char tmp[255];
00603                         UInt32 ioDataSize = 255;
00604                         table->GetCellData(cell, tmp, ioDataSize);
00605                         name.set(tmp, ioDataSize);
00606                         entry = cell.row;
00607                     }
00608                 }
00609
00610                 UEventSendMessage(SearchWidID(pane),
00611                     inMessage == UTextTableView_SingleClick ?
00612                     EV_LIST_SELECTING : EV_LIST_DBLCLICK, UMAKEINT(cmdid, entry - 1),
00613                     (void *)(const char *)name);
00614             }
00615             break;
00616     }
00617 }

Here is the call graph for this function:

int LPseudoWinAttachment::SearchWidID ( LPane * pane )

Definition at line 457 of file UPseudoSupport.cpp.

References UCmdTarget::GetWidID(), m_CacheWidgets, UWidget::m_tabs, UWidget::m_widgets, m_widid, UDYNAMIC_CAST, and UEventQueryWidget().

Referenced by ListenToMessage().

00458 {
00459     int res = m_widid;
00460
00461     // first ask the cache
00462     std::map<LPane *, int>::iterator i = m_CacheWidgets.find(pane);
00463     if(i != m_CacheWidgets.end())
00464         return (*i).second;
00465
00466     // then look if it belongs to a tab
00467     UCmdTarget *target = UEventQueryWidget(m_widid);
00468     UWidget *wid = UDYNAMIC_CAST(UWidget, target);
00469     if(wid == 0L)
00470         return res;
00471
00472     std::map<int, UWidget *>::iterator t;
00473     for(t = wid->m_tabs.begin(); t != wid->m_tabs.end(); ++t)
00474     {
00475         UWidget *tab = (*t).second;
00476         std::map<int, void *>::iterator s;
00477         for(s = tab->m_widgets.begin(); s != tab->m_widgets.end(); ++s)
00478         {
00479             if((*s).second == (void *)pane)
00480             {
00481                 res = tab->GetWidID();
00482                 break; // it's a tab widget
00483             }
00484         }
00485     }
00486
00487     // so we guess it's in the main widget !
00488     std::map<LPane *, int>::value_type val(pane, res);
00489     m_CacheWidgets.insert(val);
00490
00491     return res;
00492 }

Here is the call graph for this function:

void LPseudoWinAttachment::SetPageValue | ( | int | cmdid,
 |  | int | value
 | ) |

Definition at line 427 of file UPseudoSupport.cpp.

References m_PageValues.

Referenced by UWidget::OnSetSliderProperty().

00428 {
00429     std::map<int, int>::value_type val(cmdid, value);
00430     m_PageValues.erase(cmdid);
00431     m_PageValues.insert(val);
00432 }

Member Data Documentation

std::map<LPane *, int> LPseudoWinAttachment::m_CacheWidgets [protected]

Definition at line 137 of file UPseudoSupport.h.

Referenced by InvalidCache(), and SearchWidID().

Rect LPseudoWinAttachment::m_lastRect [protected]

Definition at line 135 of file UPseudoSupport.h.

Referenced by CheckWindowSize(), and LPseudoWinAttachment().

std::map<int, int> LPseudoWinAttachment::m_PageValues [protected]

Definition at line 136 of file UPseudoSupport.h.

Referenced by GetPageValue(), and SetPageValue().

int LPseudoWinAttachment::m_widid [protected]

Definition at line 134 of file UPseudoSupport.h.

Referenced by CheckWindowSize(), SearchWidID(), and ~LPseudoWinAttachment().

The documentation for this class was generated from the following files:
  • rf/support/powerplant/UPseudoSupport.h
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:54:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: LSReport Class Reference

LSReport Class Reference

Inheritance diagram for LSReport:

[legend]
Collaboration diagram for LSReport:

[legend]
List of all members.

Public Member Functions

LSReport (Tcl_Interp *interp)
virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnAnyDevice (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Public Attributes

Tcl_Interp * | fInterp
int fState

Constructor & Destructor Documentation

LSReport::LSReport ( Tcl_Interp * interp ) [inline]

Definition at line 682 of file TclGlue.cpp.

References fInterp, fState, and TCL_OK.

00682 : fInterp(interp), fState(TCL_OK) {}

Member Function Documentation

virtual kTraversal LSReport::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 684 of file TclGlue.cpp.

References kContinueTraversal, and kTraversal.

00685     {
00686         return kContinueTraversal;
00687     }

virtual kTraversal LSReport::ExitDirectory ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 689 of file TclGlue.cpp.

References kContinueTraversal, and kTraversal.

00690     {
00691         return kContinueTraversal;
00692     }

virtual kTraversal LSReport::OnAnyDevice | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 706 of file TclGlue.cpp.

References fInterp, kSkipFile, kTraversal, and Tcl_AppendResult.

00710     {
00711         Tcl_AppendResult(fInterp, name, "\n", 0L);
00712         return kSkipFile;
00713     }

virtual kTraversal LSReport::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 694 of file TclGlue.cpp.

References err, fInterp, fState, kTraversal, kTraversalError, Tcl_AppendResult, and TCL_ERROR.

00695     {
00696         fState = TCL_ERROR;
00697         Tcl_AppendResult(fInterp, err, "\n", 0L);
00698         return kTraversalError;
00699     }

virtual kTraversal LSReport::OnIdle ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 701 of file TclGlue.cpp.

References kContinueTraversal, and kTraversal.

00702     {
00703         return kContinueTraversal;
00704     }

Member Data Documentation

Tcl_Interp* LSReport::fInterp

Definition at line 679 of file TclGlue.cpp.

Referenced by LSReport(), OnAnyDevice(), and OnError().

int LSReport::fState

Definition at line 680 of file TclGlue.cpp.

Referenced by LSReport(), OnError(), and tclDirProc().

The documentation for this class was generated from the following file:
  • common/TclGlue.cpp
Generated on Sat Aug 7 22:54:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UMacAppMenu Class Reference

UMacAppMenu Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for UMacAppMenu:

[legend]
Collaboration diagram for UMacAppMenu:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UMacAppMenu ()
virtual | ~UMacAppMenu ()
void | OnUpdateUI (void)
when the user interface is invalid.

Static Public Member Functions

const URuntimeClass * | rtUMacAppMenu (void)

Static Public Attributes

int | sMAMenuWidID = -1

Protected Member Functions

virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Static Protected Attributes

const URuntimeClass | classUMacAppMenu
const UMSGMAP | messageMap = { UMenu ::GetThisMessageMap(), & UMacAppMenu ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Constructor & Destructor Documentation

UMacAppMenu::UMacAppMenu ( )

Definition at line 772 of file UPseudoSupport.cpp.

00772                          : UMenu(::UEventGetWidID())
00773 {
00774     sMAMenuWidID = GetWidID();
00775 }

UMacAppMenu::~UMacAppMenu ( ) [virtual]

Definition at line 777 of file UPseudoSupport.cpp.

00778 {
00779 }

Member Function Documentation

const URuntimeClass * UMacAppMenu::_GetBaseClass ( ) [static, protected]

Reimplemented from UMenu.

Definition at line 764 of file UPseudoSupport.cpp.

const UMSGMAP * UMacAppMenu::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UMenu.

Definition at line 766 of file UPseudoSupport.cpp.

const UMSGMAP * UMacAppMenu::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UMenu.

Definition at line 766 of file UPseudoSupport.cpp.

const URuntimeClass * UMacAppMenu::GetRuntimeClass ( ) const [virtual]

Reimplemented from UMenu.

Definition at line 764 of file UPseudoSupport.cpp.

const UMSGMAP * UMacAppMenu::GetThisMessageMap ( ) [static, protected]

Reimplemented from UMenu.

Definition at line 766 of file UPseudoSupport.cpp.

void UMacAppMenu::OnUpdateUI ( void )

when the user interface is invalid.

the default is to send a EV_UPDTCMD to each sub-widget.

Reimplemented from UMenu.

Definition at line 789 of file UPseudoSupport.cpp.

References UCmdUI::CanContinue(), UCmdUI::Enable(), EV_UPDTCMD, UWidget::GetFocus(), UCmdTarget::GetWidID(), USemaphore::IsEnteredTwice(), kHierarchicalMax, kUMainWidget, UCmdUI::m_nID, STD, UAppConsole(), UEventGetTargets(), and UEventSendMessage().

00790 {
00791     static bool sSemaphore = false;
00792     USemaphore policeman(sSemaphore);
00793     if(policeman.IsEnteredTwice())
00794         return;
00795
00796     // this is the interesting thing about the toolbar : it resends the
00797     // update UI to other widgets according to the focus information and
00798     // allows the update to be handled several times if the handler asks for it
00799     // (by using UCmdUI::SetContinue)
00800
00801     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00802     std::map<int, void *>::iterator w;
00803     int cmdid;
00804     int widFocus = UWidget::GetFocus();
00805
00806     for(CMenuIterator iter; iter.Current(); ++iter)
00807     {
00808         MenuRef menu = iter;
00809         short menuID = (**menu).menuID;
00810
00811         // see UMenuMgr.cpp from MacApp
00812         if (menuID < kHierarchicalMin || menuID > kHierarchicalMax)
00813             continue;
00814
00815         short numitems = ::CountMItems(menu);
00816         for(int j = 1; j <= numitems; j++)
00817         {
00818             cmdid = CommandFromMenuItem(menuID, j);
00819             if(cmdid < 0)
00820             {
00821                 UAppConsole("The item %d of the menu %d has not a MacApp cmd\n", j, menuID);
00822             }
00823             else
00824             {
00825                 if(cmdid == kUMainWidget)
00826                     continue;
00827
00828                 // first forward the command to the focused widget : if it doesn't want it
00829                 // we give it to the next pseudo widget.
00830                 if(widFocus != -1 && widFocus != GetWidID())
00831                 {
00832                     UCmdUI pUI(cmdid);
00833                     UEventSendMessage(widFocus, EV_UPDTCMD, pUI.m_nID, &pUI);
00834                     if(!pUI.CanContinue())
00835                         continue;
00836                 }
00837
00838                 STD map<int, UCmdTarget *>::const_iterator i;
00839                 for(i = targets.begin(); i != targets.end(); ++i)
00840                 {
00841                     int widid = (*i).first;
00842                     if(widid == widFocus || widid == GetWidID())
00843                         continue;
00844
00845                     UCmdUI pUI(cmdid);
00846                     UEventSendMessage(widid, EV_UPDTCMD, pUI.m_nID, &pUI);
00847                     if(!pUI.CanContinue())
00848                         break;
00849                 }
00850                 if(i == targets.end())
00851                 {
00852                     //UAppConsole("The cmd %d of the menubar has no update handler, it's gonna be disabled\n", cmdid);
00853                     UCmdUI pUI(cmdid);
00854                     pUI.Enable(false);
00855                 }
00856             }
00857         }
00858     }
00859 }

Here is the call graph for this function:

const URuntimeClass * UMacAppMenu::rtUMacAppMenu ( void ) [static]

Definition at line 764 of file UPseudoSupport.cpp.

Member Data Documentation

const UMSGMAP_ENTRY UMacAppMenu::_messageEntries [static, private]

Initial value:

   {
    { EV_UPDATEUI, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UMacAppMenu ::OnUpdateUI },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UMenu.

Definition at line 766 of file UPseudoSupport.cpp.

const URuntimeClass UMacAppMenu::classUMacAppMenu [static, protected]

const UMSGMAP UMacAppMenu::messageMap = { UMenu ::GetThisMessageMap(), & UMacAppMenu ::_messageEntries[0] } [static, protected]

Reimplemented from UMenu.

Definition at line 766 of file UPseudoSupport.cpp.

int UMacAppMenu::sMAMenuWidID = -1 [static]

Definition at line 770 of file UPseudoSupport.cpp.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:54:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMacBinItem Class Reference

CMacBinItem Class Reference

#include <MacBinEncoding.h>

Inheritance diagram for CMacBinItem:

[legend]
Collaboration diagram for CMacBinItem:

[legend]
List of all members.

Public Member Functions

CMacBinItem (const MACBINMAP &map)
virtual | ~CMacBinItem ()
virtual bool | EditCell (void)
virtual void | RemoveCell (void)

Protected Member Functions

virtual void | GetDrawContentsSelf (const STableCell &inCell, SOutlineDrawContents &ioDrawContents)
virtual void | DrawRowAdornments (const Rect &inLocalRowRect)
virtual void | DoubleClick (const STableCell &inCell, const SMouseDownEvent &inMouseDown, const SOutlineDrawContents &inDrawContents, Boolean inHitText)

Protected Attributes

MACBINMAP fMap

Private Member Functions

CMacBinItem ()
CMacBinItem (const CMacBinItem &inOriginal)
CMacBinItem & | operator= (const CMacBinItem &inOriginal)

Constructor & Destructor Documentation

CMacBinItem::CMacBinItem ( const MACBINMAP & map )

virtual CMacBinItem::~CMacBinItem ( ) [virtual]

CMacBinItem::CMacBinItem ( ) [private]

CMacBinItem::CMacBinItem ( const CMacBinItem & inOriginal ) [private]

Member Function Documentation

virtual void CMacBinItem::DoubleClick | ( | const STableCell & | inCell,
 |  | const SMouseDownEvent & | inMouseDown,
 |  | const SOutlineDrawContents & | inDrawContents,
 |  | Boolean | inHitText
 | ) | [protected, virtual]

virtual void CMacBinItem::DrawRowAdornments ( const Rect & inLocalRowRect ) [protected, virtual]

virtual bool CMacBinItem::EditCell ( void ) [virtual]

virtual void CMacBinItem::GetDrawContentsSelf | ( | const STableCell & | inCell,
 |  | SOutlineDrawContents & | ioDrawContents
 | ) | [protected, virtual]

CMacBinItem& CMacBinItem::operator= ( const CMacBinItem & inOriginal ) [private]

virtual void CMacBinItem::RemoveCell ( void ) [virtual]

Member Data Documentation

MACBINMAP CMacBinItem::fMap [protected]

Definition at line 73 of file MacBinEncoding.h.

The documentation for this class was generated from the following file:
  • common/MacBinEncoding.h
Generated on Sat Aug 7 22:54:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: MACBINMAP Struct Reference

MACBINMAP Struct Reference

#include <MacBinMaps.h>

Collaboration diagram for MACBINMAP:

[legend]
List of all members.

Public Attributes

OSType | sig
char | ext [31+1]
char | desc [63+1]
MACENCODING encod
bool useDefault

Member Data Documentation

char MACBINMAP::desc[63+1]

Definition at line 36 of file MacBinMaps.h.

MACENCODING MACBINMAP::encod

Definition at line 37 of file MacBinMaps.h.

char MACBINMAP::ext[31+1]

Definition at line 35 of file MacBinMaps.h.

OSType MACBINMAP::sig

Definition at line 34 of file MacBinMaps.h.

bool MACBINMAP::useDefault

Definition at line 38 of file MacBinMaps.h.

The documentation for this struct was generated from the following file:
  • common/MacBinMaps.h
Generated on Sat Aug 7 22:54:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: MACBINMAPENTRIES Struct Reference

MACBINMAPENTRIES Struct Reference

#include <MacBinMaps.h>

Collaboration diagram for MACBINMAPENTRIES:

[legend]
List of all members.

Public Attributes

unsigned long | cookie
int numMaps
MACBINMAP | maps [1]

Member Data Documentation

unsigned long MACBINMAPENTRIES::cookie

Definition at line 44 of file MacBinMaps.h.

MACBINMAP MACBINMAPENTRIES::maps[1]

Definition at line 46 of file MacBinMaps.h.

int MACBINMAPENTRIES::numMaps

Definition at line 45 of file MacBinMaps.h.

The documentation for this struct was generated from the following file:
  • common/MacBinMaps.h
Generated on Sat Aug 7 22:54:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: MacBinMaps Class Reference

MacBinMaps Class Reference

#include <MacBinMaps.h>

Collaboration diagram for MacBinMaps:

[legend]
List of all members.

Public Member Functions

MacBinMaps ()
~MacBinMaps ()
void | LoadDefaults (void)
void | SaveDefaults (void)
const MACBINMAP * | AddEntry (OSType sig, const char *extension, const char *desc, MACENCODING encod, bool useDefault)
void | RemoveEntry (OSType sig, const char *extension)
MacBinMaps & | operator= (const MacBinMaps &otherMap)
const MACBINMAPENTRIES * | Entries (void) const

Static Public Member Functions

const char * | GetEnvPlainTypes (void)
const char * | GetEnvTypes (MACENCODING type)

Protected Member Functions

void | Reset (void)

Protected Attributes

MACBINMAPENTRIES * entries

Constructor & Destructor Documentation

MacBinMaps::MacBinMaps ( )

MacBinMaps::~MacBinMaps ( )

Member Function Documentation

const MACBINMAP* MacBinMaps::AddEntry | ( | OSType | sig,
 |  | const char * | extension,
 |  | const char * | desc,
 |  | MACENCODING | encod,
 |  | bool | useDefault
 | ) |

const MACBINMAPENTRIES* MacBinMaps::Entries ( void ) const [inline]

Definition at line 70 of file MacBinMaps.h.

References entries.

00070 {return entries;}

const char* MacBinMaps::GetEnvPlainTypes ( void ) [static]

Referenced by glue_getenv().

const char* MacBinMaps::GetEnvTypes ( MACENCODING type ) [static]

Referenced by glue_getenv().

void MacBinMaps::LoadDefaults ( void )

Referenced by CompatGetPrefs().

MacBinMaps& MacBinMaps::operator= ( const MacBinMaps & otherMap )

void MacBinMaps::RemoveEntry | ( | OSType | sig,
 |  | const char * | extension
 | ) |

void MacBinMaps::Reset ( void ) [protected]

void MacBinMaps::SaveDefaults ( void )

Referenced by CompatGetPrefs().

Member Data Documentation

MACBINMAPENTRIES* MacBinMaps::entries [protected]

Definition at line 83 of file MacBinMaps.h.

Referenced by Entries().

The documentation for this class was generated from the following file:
  • common/MacBinMaps.h
Generated on Sat Aug 7 22:54:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMacBinTable Class Reference

CMacBinTable Class Reference

#include <MacBinEncoding.h>

Inheritance diagram for CMacBinTable:

[legend]
Collaboration diagram for CMacBinTable:

[legend]
List of all members.

Public Types

enum | { class_ID = 'MBTA' }

Public Member Functions

CMacBinTable (LStream *inStream)
virtual | ~CMacBinTable ()

Static Public Member Functions

void | SetCurrentMap (MacBinMaps *map)
MacBinMaps * | GetCurrentMap (void)

Protected Member Functions

virtual void | FinishCreateSelf ()

Static Protected Attributes

MacBinMaps * gCurMacBinMap

Private Member Functions

CMacBinTable ()
CMacBinTable (const CMacBinTable &inOriginal)
CMacBinTable & | operator= (const CMacBinTable &inOriginal)

Member Enumeration Documentation

anonymous enum

Enumeration values:
class_ID
Definition at line 38 of file MacBinEncoding.h.
00038 { class_ID = 'MBTA' };

Constructor & Destructor Documentation

CMacBinTable::CMacBinTable ( LStream * inStream )

virtual CMacBinTable::~CMacBinTable ( ) [virtual]

CMacBinTable::CMacBinTable ( ) [private]

CMacBinTable::CMacBinTable ( const CMacBinTable & inOriginal ) [private]

Member Function Documentation

virtual void CMacBinTable::FinishCreateSelf ( ) [protected, virtual]

MacBinMaps* CMacBinTable::GetCurrentMap ( void ) [inline, static]

Definition at line 44 of file MacBinEncoding.h.

References gCurMacBinMap.

00044 {return gCurMacBinMap;}

CMacBinTable& CMacBinTable::operator= ( const CMacBinTable & inOriginal ) [private]

void CMacBinTable::SetCurrentMap ( MacBinMaps * map ) [inline, static]

Definition at line 43 of file MacBinEncoding.h.

References gCurMacBinMap.

Referenced by CompatGetPrefs().

00043 {gCurMacBinMap = map;}

Member Data Documentation

MacBinMaps* CMacBinTable::gCurMacBinMap [static, protected]

Definition at line 46 of file MacBinEncoding.h.

Referenced by GetCurrentMap(), and SetCurrentMap().

The documentation for this class was generated from the following file:
  • common/MacBinEncoding.h
Generated on Sat Aug 7 22:54:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMacroEntry Class Reference

CMacroEntry Class Reference

#include <MacrosSetup.h>

Collaboration diagram for CMacroEntry:

[legend]
List of all members.

Public Member Functions

CMacroEntry ()
CMacroEntry (const char *fullname, const char *dispname)
CMacroEntry (const CMacroEntry &anentry)
CMacroEntry & | operator= (const CMacroEntry &anentry)
bool | operator< (const CMacroEntry &anentry) const
bool | operator== (const CMacroEntry &anentry) const

Public Attributes

UStr path
UStr name

Constructor & Destructor Documentation

CMacroEntry::CMacroEntry ( ) [inline]

Definition at line 42 of file MacrosSetup.h.

00042 {}

CMacroEntry::CMacroEntry | ( | const char * | fullname,
 |  | const char * | dispname
 | ) | [inline]

Definition at line 43 of file MacrosSetup.h.

References name, and path.

00044     {
00045         path = fullname;
00046         name = dispname;
00047     }

CMacroEntry::CMacroEntry ( const CMacroEntry & anentry ) [inline]

Definition at line 48 of file MacrosSetup.h.

00049     {
00050         *this = anentry;
00051     }

Member Function Documentation

bool CMacroEntry::operator< ( const CMacroEntry & anentry ) const [inline]

Definition at line 60 of file MacrosSetup.h.

00061     {
00062         return false;
00063     }

CMacroEntry& CMacroEntry::operator= ( const CMacroEntry & anentry ) [inline]

Definition at line 53 of file MacrosSetup.h.

References name, and path.

00054     {
00055         path = anentry.path;
00056         name = anentry.name;
00057         return *this;
00058     }

bool CMacroEntry::operator== ( const CMacroEntry & anentry ) const [inline]

Definition at line 65 of file MacrosSetup.h.

References UStr::compare(), name, and path.

00066     {
00067         return path.compare(anentry.path) == 0 && name.compare(anentry.name) == 0;
00068     }

Here is the call graph for this function:

Member Data Documentation

UStr CMacroEntry::name

Definition at line 71 of file MacrosSetup.h.

Referenced by CMacroEntry(), operator=(), and operator==().

UStr CMacroEntry::path

Definition at line 70 of file MacrosSetup.h.

Referenced by CMacroEntry(), UCvsFrame::OnCmdMacroAdmin(), UCvsFolders::OnCmdMacrosSel(), CWincvsDoc::OnMacroAdmin(), UCvsFiles::OnMacroSel(), operator=(), and operator==().

The documentation for this class was generated from the following file:
  • common/MacrosSetup.h
Generated on Sat Aug 7 22:54:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMacroSet Class Reference

CMacroSet Class Reference

#include <MacrosSetup.h>

Collaboration diagram for CMacroSet:

[legend]
List of all members.

Public Member Functions

CMacroSet ()
void | Flush (void)
void | Add (const char *fullname, const char *name)

Public Attributes

std::vector< CMacroEntry > | entries
bool invalFlag

Constructor & Destructor Documentation

CMacroSet::CMacroSet ( ) [inline]

Definition at line 78 of file MacrosSetup.h.

References invalFlag.

00079     {
00080         invalFlag = true;
00081     }

Member Function Documentation

void CMacroSet::Add | ( | const char * | fullname,
 |  | const char * | name
 | ) | [inline]

Definition at line 93 of file MacrosSetup.h.

References entries.

Referenced by MacroTraversal::OnFile().

00094     {
00095         std::vector<CMacroEntry>::iterator j;
00096
00097         for(j = entries.begin(); j != entries.end(); ++j) {
00098             if( stricmp((*j).name, name) > 0 )
00099                 break;
00100         }
00101
00102         entries.insert(j, CMacroEntry(fullname, name));
00103     }

void CMacroSet::Flush ( void ) [inline]

Definition at line 87 of file MacrosSetup.h.

References entries, and invalFlag.

Referenced by MacrosFlushAll().

00088     {
00089         entries.erase(entries.begin(), entries.end());
00090         invalFlag = true;
00091     }

Member Data Documentation

std::vector<CMacroEntry> CMacroSet::entries

Definition at line 83 of file MacrosSetup.h.

Referenced by Add(), CreateMainMenubar(), Flush(), CCustInvertTable::Initialize(), UCvsFrame::OnCmdMacroAdmin(), UCvsFolders::OnCmdMacrosSel(), CWincvsDoc::OnMacroAdmin(), UCvsFiles::OnMacroSel(), and CWincvsDoc::OnUpdateMacroAdmin().

bool CMacroSet::invalFlag

Definition at line 85 of file MacrosSetup.h.

Referenced by CMacroSet(), and Flush().

The documentation for this class was generated from the following file:
  • common/MacrosSetup.h
Generated on Sat Aug 7 22:54:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: MacroTraversal Class Reference

MacroTraversal Class Reference

Inheritance diagram for MacroTraversal:

[legend]
Collaboration diagram for MacroTraversal:

[legend]
List of all members.

Public Member Functions

virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnFile (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Member Function Documentation

virtual kTraversal MacroTraversal::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 187 of file MacrosSetup.cpp.

References cvs_err(), err, kTraversal, and kTraversalError.

00188     {
00189         cvs_err(err);
00190         cvs_err("\n");
00191         return kTraversalError;
00192     }

Here is the call graph for this function:

kTraversal MacroTraversal::OnFile | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

Definition at line 200 of file MacrosSetup.cpp.

References CMacroSet::Add(), CvsArgs::add(), CvsArgs::Argc(), CvsArgs::Argv(), CStr, cvs_err(), free, getline(), getopt_long(), gMacrosAdmin, gMacrosSel, kContinueTraversal, kTraversal, no_argument, optarg, optind, and required_argument.

00204 {
00205     if(stricmp(name + strlen(name) - 4, ".tcl"))
00206         return kContinueTraversal;
00207
00208     FILE *fpin = fopen(fullname, "r");
00209     if(fpin == 0L)
00210     {
00211         cvs_err("Impossible to open '%s' (error %d)\n", fullname, errno);
00212         return kContinueTraversal;
00213     }
00214
00215     char *oldline = 0L;
00216     int line_length;
00217     size_t line_chars_allocated = 0;
00218     CvsArgs args(false);
00219     args.add("dummy");
00220
00221     if((line_length = getline (&oldline, &line_chars_allocated, fpin)) > 0 &&
00222         strnicmp(oldline, "#!CVSGUI1.0", strlen("#!CVSGUI1.0")) == 0)
00223     {
00224         char *line = oldline + strlen("#!CVSGUI1.0");
00225
00226         while(*line)
00227         {
00228             int hasQuote = 0;
00229             char *temp;
00230
00231             // Search for the non space char
00232             while(*line && isspace(*line))
00233                 ++line;
00234
00235             // handle the quote
00236             if((*line) == '"')
00237             {
00238                 hasQuote = 1;
00239                 line++;
00240             }
00241             for(temp=line;*line;++line)
00242             {
00243                 if((*line) == '"')
00244                 {
00245                     if(hasQuote)
00246                     {
00247                         hasQuote = 0; /* ok doc */
00248                         break;
00249                     }
00250                 }
00251                 if(isspace(*line) && !hasQuote)
00252                     break;
00253             }
00254             if(hasQuote) /* mismatch quote */
00255                 temp = line;
00256
00257             if(temp != line)
00258             {
00259                 CStr arg;
00260                 arg.set(temp, line - temp);
00261                 args.add(arg);
00262             }
00263         }
00264
00265         static struct option long_options[] =
00266         {
00267             {"admin", no_argument, 0L, 1},
00268             {"selection", no_argument, 0L, 2},
00269             {"name", required_argument, 0L, 3},
00270             {0, 0, 0, 0}
00271         };
00272         bool hasAdmin = false;
00273         bool hasSel = false;
00274         CStr dispname;
00275
00276         optind = 0;
00277         int option_index = 0, c;
00278         while ((c = getopt_long
00279             (args.Argc(), args.Argv(), "+", long_options, &option_index)) != EOF)
00280         {
00281             switch (c)
00282             {
00283             case 1:
00284                 hasAdmin = true;
00285                 break;
00286             case 2:
00287                 hasSel = true;
00288                 break;
00289             case 3:
00290                 dispname = optarg;
00291                 break;
00292             default:
00293                 cvs_err("Warning : unknown option in the file '%s'\n", fullname);
00294                 break;
00295             }
00296         }
00297
00298         if(dispname.empty())
00299         {
00300             dispname = name;
00301         }
00302
00303         if(hasAdmin)
00304         {
00305             gMacrosAdmin.Add(fullname, dispname);
00306         }
00307         else if(hasSel)
00308         {
00309             gMacrosSel.Add(fullname, dispname);
00310         }
00311         else
00312         {
00313             cvs_err("Warning : no option <admin|selection> in the file '%s'\n", fullname);
00314         }
00315     }
00316
00317     free (oldline);
00318
00319     fclose(fpin);
00320
00321     return kContinueTraversal;
00322 }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/MacrosSetup.cpp
Generated on Sat Aug 7 22:54:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMainFrame Class Reference

CMainFrame Class Reference

Main frame class. More...

#include <MainFrm.h>

Inheritance diagram for CMainFrame:

[legend]
Collaboration diagram for CMainFrame:

[legend]
List of all members.

Public Member Functions

CMainFrame ()
virtual | ~CMainFrame ()
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
PreCreateWindow virtual override.
virtual void | WinHelp (DWORD dwData, UINT nCmd=HELP_CONTEXT)
WinHelp virtual override, call HTML Help instead of WinHelp.
void | InitialShowWindow (int nCmdShow)
BOOL | OnBroadcastCmdMsg (UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
Cmd msg routing on the dock bars.
void | SetFilterBarMask (CSortHeaderCtrl &ctrlHeader, const KiColumnModel *columnModel)
void | ClearFilters ()
void | SetContext (const KoColumnContext *context)
void | ToggleFilterMasksEnable ()
bool | IsFilterMasksEnable () const
CWincvsView * GetConsoleView ()
Get the console view.
CCJTabCtrlBar * GetWorkspace ()
Get workspace.
CStatusBar * GetStatusBar ()
Get the status bar.
CHistComboBoxEx & | GetBrowseHistory (void)
Get the browse location combo box.
CCJShellTree * GetExplorerView ()
Get the explorer view.
CWinCvsBrowser * GetBrowserView ()
Get the browser view.
const char * | GetEnvMainThread (const char *name)
KiFilterModel * GetFilterModel ()
Get the filter model implementation.
KiRecursionModel * GetRecursionModel ()
Get the recursion model implementation.
KiIgnoreModel * GetIgnoreModel ()
Get the ignore model implementation.
void | DropFiles (HDROP hDropInfo)
Drop files.
void | ChangeLocation ()
Change browse location.
void | LoadLocationSettings ()
void | StoreLocationSettings ()

Protected Member Functions

afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
WM_CREATE message handler, create frame and toolbars.
afx_msg void | OnClose ()
WM_CLOSE message handler, save windows positions.
afx_msg void | OnDropFiles (HDROP hDropInfo)
WM_DROPFILES message handler.
afx_msg void | OnHistorySelect ()
CBN_SELCHANGE message handler, change browse location.
afx_msg void | OnActivate (UINT nState, CWnd *pWndOther, BOOL bMinimized)
Handle window activation, prevent the focus to be gone from FileView to the Workspace - for the Dialogs etc.
afx_msg void | OnSysCommand (UINT nID, LPARAM lParam)
WM_SYSCOMMAND message handler, prevent the focus to be gone from FileView to the Workspace - for the Minimize.
afx_msg void | OnViewRecursive ()
Toggle recursive view.
afx_msg void | OnViewModified ()
Toggle modified filter.
afx_msg void | OnUpdateViewModified (CCmdUI *pCmdUI)
Update modified filter command.
afx_msg void | OnUpdateViewRecursive (CCmdUI *pCmdUI)
Update recursive view command.
afx_msg void | OnViewConflict ()
Toggle conflict filter.
afx_msg void | OnUpdateViewConflict (CCmdUI *pCmdUI)
Update conflict filter.
afx_msg void | OnViewUnknown ()
Toggle unknown filter.
afx_msg void | OnUpdateViewUnknown (CCmdUI *pCmdUI)
Update unknown filter.
afx_msg void | OnViewMissing ()
Toggle missing filter.
afx_msg void | OnUpdateViewMissing (CCmdUI *pCmdUI)
Update missing filter.
afx_msg void | OnViewIgnore ()
Toggle ignore filter.
afx_msg void | OnUpdateViewIgnore (CCmdUI *pCmdUI)
Update ignore filter.
afx_msg void | OnUpdateFilterMask (CCmdUI *pCmdUI)
Update filter mask.
afx_msg void | OnUpdateHistory (CCmdUI *pCmdUI)
Update history.
afx_msg void | OnViewAdded ()
Toggle added filter.
afx_msg void | OnUpdateViewAdded (CCmdUI *pCmdUI)
Update added filter.
afx_msg void | OnUpdateViewRemoved (CCmdUI *pCmdUI)
Toggle removed filter.
afx_msg void | OnViewRemoved ()
Update removed filter.
afx_msg void | OnViewChanged ()
Toggle changed filter.
afx_msg void | OnUpdateViewChanged (CCmdUI *pCmdUI)
Update changed filter.
afx_msg void | OnViewHideunknown ()
Toggle hide unknown filter.
afx_msg void | OnUpdateViewHideunknown (CCmdUI *pCmdUI)
Update hide unknown filter.
afx_msg void | OnTimer (UINT nIDEvent)
WM_TIMER message handler, get the environment variable and unlocks the sGetEnv semaphore.
afx_msg void | OnViewClearall ()
Clear all filters.
afx_msg void | OnUpdateViewClearall (CCmdUI *pCmdUI)
Update clear all filters command.
afx_msg void | OnViewHidemissing ()
Toggle hide missing filter.
afx_msg void | OnUpdateViewHidemissing (CCmdUI *pCmdUI)
Update hide missing filter.
afx_msg void | OnUpdateViewFilterbarEnable (CCmdUI *pCmdUI)
Update filter bar enable.
afx_msg void | OnUpdateViewFilterbarClearall (CCmdUI *pCmdUI)
Update clear all filter bar.
afx_msg void | OnUpdateViewFilterbarOptions (CCmdUI *pCmdUI)
Update filter bar options.
afx_msg void | OnInitMenu (CMenu *pMenu)
WM_INITMENU message handler.

Private Member Functions

BOOL | InitializeDockingWindows ()
BOOL | CreateStatusBar ()
BOOL | CreateToolbar (const char *title, const UINT toolbarID, CToolBar *toolBar, CToolBar *dockToolBar=NULL, UINT childID=AFX_IDW_TOOLBAR)
void | DockControlBarLeftOf (CToolBar *toolBar, CToolBar *dockToolBar)
BOOL | CreateLocationCombo ()
void | LoadDockState ()
CMDIMenuList & | GetMenuList (void)
Get the menu list.

Private Attributes

KoFilterModel m_filter
KoRecursionModel m_recursion
KoIgnoreModel m_ignore
BOOL | m_bRestoreFocus
CCvsStatusBar m_wndStatusBar
CToolBar | m_wndToolBar
CToolBar | m_wndBrowser
CToolBar | m_wndMultiUser
CToolBar | m_wndTags
CToolBar | m_wndList
CToolBar | m_wndFilter
CHistComboBoxEx m_browseHist
CFont | m_fontNormal
CBarConsole m_consolebar
CCJTabCtrlBar m_wndWorkspace
CImageList | m_TabImages
CCJWindowPlacement m_state

Detailed Description

Main frame class.

Definition at line 65 of file MainFrm.h.

Constructor & Destructor Documentation

CMainFrame::CMainFrame ( )

Definition at line 191 of file MainFrm.cpp.

00192 {
00193     m_bRestoreFocus = FALSE;
00194
00195     LoadLocationSettings();
00196 }

CMainFrame::~CMainFrame ( ) [virtual]

Definition at line 198 of file MainFrm.cpp.

00199 {
00200 }

Member Function Documentation

void CMainFrame::ChangeLocation ( )

Change browse location.

Definition at line 600 of file MainFrm.cpp.

References CWincvsApp::ActivateBrowserView(), CheckLocationDriveType(), CWincvsApp::GetBrowserView(), m_browseHist, and CWinCvsBrowser::ResetBrowser().

Referenced by CHistComboBoxEx::DelKeyTest(), and OnHistorySelect().

00601 {
00602     const int curSel = m_browseHist.GetCurSel();
00603     if( curSel > CB_ERR )
00604     {
00605         CString setText;
00606         m_browseHist.GetLBText(curSel, setText);
00607
00608         if( !setText.IsEmpty() )
00609         {
00610             CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00611             if( app )
00612             {
00613                 CheckLocationDriveType(setText);
00614                 app->GetBrowserView()->ResetBrowser(setText, true);
00615                 app->ActivateBrowserView();
00616             }
00617         }
00618     }
00619 }

Here is the call graph for this function:

void CMainFrame::ClearFilters ( )

Clear the filter mask Definition at line 770 of file MainFrm.cpp.

References KoFilterModel::ClearAll(), and m_filter.

00771 {
00772     m_filter.ClearAll();
00773 }

Here is the call graph for this function:

BOOL CMainFrame::CreateLocationCombo ( ) [private]

Create location combo box

Returns:
true on success, false otherwise
Definition at line 374 of file MainFrm.cpp.

References gHistoryLocs, HISTLOC_IMAGE_CX, HISTLOC_VISIBLEITEMS, ID_HISTORYBROWSE, m_browseHist, m_fontNormal, m_wndBrowser, USmartCombo::SetItems(), and TBBS_SEPARATOR.

Referenced by OnCreate().

00375 {
00376     m_wndBrowser.SetButtonInfo(3, ID_SEPARATOR, TBBS_SEPARATOR, 200);
00377
00378     CRect rect;
00379     m_wndBrowser.GetItemRect(3, &rect);
00380     rect.bottom += HISTLOC_VISIBLEITEMS * HISTLOC_IMAGE_CX + rect.bottom % HISTLOC_IMAGE_CX;
00381
00382     m_browseHist.SetItems(&gHistoryLocs);
00383
00384     if( !m_browseHist.Create(CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | WS_HSCROLL, rect, &m_wndBrowser, ID_HISTORYBROWSE) )
00385     {
00386         TRACE0("Failed to create combobox (Browse History)\n");
00387         return FALSE;   // fail to create
00388     }
00389
00390     // Older versions of Windows* (NT 3.51 for instance) fail with DEFAULT_GUI_FONT
00391     if( !m_fontNormal.CreateStockObject(DEFAULT_GUI_FONT) )
00392     {
00393         if( !m_fontNormal.CreatePointFont(80, "MS Sans Serif") )
00394         {
00395             TRACE0("Failed to create default GUI font\n");
00396             return FALSE;
00397         }
00398     }
00399
00400     // Make browse history use default GUI font
00401     m_browseHist.SetFont(&m_fontNormal);
00402
00403     return TRUE;
00404 }

Here is the call graph for this function:

BOOL CMainFrame::CreateStatusBar ( ) [private]

Create status bar

Returns:
TRUE on success, FALSE otherwise
Definition at line 296 of file MainFrm.cpp.

References m_wndStatusBar.

Referenced by OnCreate().

00297 {
00298     if( !m_wndStatusBar.Create(this) )
00299     {
00300         TRACE0("Failed to create status bar\n");
00301         return FALSE;   // fail to create
00302     }
00303
00304     return TRUE;
00305 }

BOOL CMainFrame::CreateToolbar | ( | const char * | title,
 |  | const UINT | toolbarID,
 |  | CToolBar * | toolBar,
 |  | CToolBar * | dockToolBar = NULL,
 |  | UINT | childID = AFX_IDW_TOOLBAR
 | ) | [private]

Create the toolbar and dock it

Parameters:
title | Toolbar title
toolbarID | Toolbar resource ID
toolBar | Toolbar
dockToolBar | Dock toolbar, if NULL it will dock the toolbar to the top side of the frame window
childID | Toolbar's child window ID
Returns:
true on success, false otherwise
Note:
We adjust toolbar height to 28 pixels because the default of 26 pixels seems a little bit too small
Definition at line 317 of file MainFrm.cpp.

References DockControlBarLeftOf().

Referenced by OnCreate().

00318 {
00319     if( !toolBar->CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, CRect(0, 0, 0, 0), childID) ||
00320         !toolBar->LoadToolBar(toolbarID) )
00321     {
00322         TRACE1("Failed to create toolbar (%s)\n", title);
00323         return FALSE;   // fail to create
00324     }
00325
00326     toolBar->SetWindowText(title);
00327     toolBar->SetHeight(28);
00328     toolBar->SetBarStyle(toolBar->GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00329     toolBar->EnableDocking(CBRS_ALIGN_ANY);
00330
00331     if( dockToolBar )
00332     {
00333         DockControlBarLeftOf(toolBar, dockToolBar);
00334     }
00335     else
00336     {
00337         DockControlBar(toolBar, AFX_IDW_DOCKBAR_TOP);
00338     }
00339
00340     return TRUE;
00341 }

Here is the call graph for this function:

void CMainFrame::DockControlBarLeftOf | ( | CToolBar * | toolBar,
 |  | CToolBar * | dockToolBar
 | ) | [private]

Dock the control bar left of the given control bar

Parameters:
toolBar | Control bar to dock
dockToolBar | Control bar to dock to
Definition at line 348 of file MainFrm.cpp.

References CCJMDIFrameWnd::RecalcLayout().

Referenced by CreateToolbar().

00349 {
00350     // Get MFC to adjust the dimensions of all docked ToolBars so that GetWindowRect will be accurate
00351     RecalcLayout();
00352
00353     CRect rect;
00354     dockToolBar->GetWindowRect(&rect);
00355     rect.OffsetRect(1, 0);
00356     DWORD dwLeftOfStyle = dockToolBar->GetBarStyle();
00357
00358     UINT dockBarID = 0;
00359     dockBarID = (dwLeftOfStyle & CBRS_ALIGN_TOP)                        ? AFX_IDW_DOCKBAR_TOP : dockBarID;
00360     dockBarID = (dwLeftOfStyle & CBRS_ALIGN_BOTTOM && dockBarID == 0)   ? AFX_IDW_DOCKBAR_BOTTOM : dockBarID;
00361     dockBarID = (dwLeftOfStyle & CBRS_ALIGN_LEFT && dockBarID == 0)     ? AFX_IDW_DOCKBAR_LEFT : dockBarID;
00362     dockBarID = (dwLeftOfStyle & CBRS_ALIGN_RIGHT && dockBarID == 0)    ? AFX_IDW_DOCKBAR_RIGHT : dockBarID;
00363
00364     // When we take the default parameters on rect, DockControlBar will dock
00365     // each Toolbar on a separate line.  By calculating a rectangle, we in effect
00366     // are simulating a Toolbar being dragged to that location and docked.
00367     DockControlBar(toolBar, dockBarID, &rect);
00368 }

Here is the call graph for this function:

void CMainFrame::DropFiles ( HDROP hDropInfo )

Drop files.

Definition at line 559 of file MainFrm.cpp.

References OnDropFiles().

Referenced by CWincvsView::OnDropFiles().

00560 {
00561     OnDropFiles(hDropInfo);
00562 }

Here is the call graph for this function:

CHistComboBoxEx & CMainFrame::GetBrowseHistory ( void ) [inline]

Get the browse location combo box.

Definition at line 230 of file MainFrm.h.

Referenced by CWinCvsBrowser::Create(), and CWinCvsBrowser::ResetBrowser().

00231 {
00232     return m_browseHist;
00233 }

CWinCvsBrowser * CMainFrame::GetBrowserView ( )

Get the browser view.

Definition at line 646 of file MainFrm.cpp.

References CBrowserBar::GetBrowserView(), CCJTabCtrlBar::GetView(), and m_wndWorkspace.

Referenced by CWincvsApp::GetBrowserView().

00647 {
00648     CBrowserBar* bar = (CBrowserBar*)m_wndWorkspace.GetView(0);
00649
00650     return bar->GetBrowserView();
00651 }

Here is the call graph for this function:

CWincvsView * CMainFrame::GetConsoleView ( ) [inline]

Get the console view.

Definition at line 212 of file MainFrm.h.

References CBarConsole::m_view.

Referenced by CWincvsApp::GetConsoleView().

00213 {
00214     return m_consolebar.m_view;
00215 }

const char * CMainFrame::GetEnvMainThread ( const char * name )

Get the environment variable

Parameters:
name Name of the variable to get
Returns:
The variable name
Note:
It locks the sGetEnv semaphore
Definition at line 975 of file MainFrm.cpp.

References sAskingMainThread, sGetEnv(), and sGetEnvResult.

Referenced by CWincvsApp::GetEnvMainThread().

00976 {
00977     ASSERT(::GetCurrentThreadId() != AfxGetApp()->m_nThreadID);
00978
00979     sGetEnvResult = name;
00980     sAskingMainThread = true;
00981
00982     sGetEnv.Lock();
00983
00984     return sGetEnvResult;
00985 }

Here is the call graph for this function:

CCJShellTree * CMainFrame::GetExplorerView ( )

Get the explorer view.

Definition at line 654 of file MainFrm.cpp.

References CCJTabCtrlBar::GetView(), CExploreBar::m_TreeCtrl, and m_wndWorkspace.

Referenced by CWincvsApp::GetExplorerView().

00655 {
00656     CExploreBar* bar = (CExploreBar*)m_wndWorkspace.GetView(1);
00657     return &bar->m_TreeCtrl;
00658 }

Here is the call graph for this function:

KiFilterModel * CMainFrame::GetFilterModel ( ) [inline]

Get the filter model implementation.

Definition at line 236 of file MainFrm.h.

Referenced by CWincvsApp::GetFilterModel().

00237 {
00238     return &m_filter;
00239 }

KiIgnoreModel * CMainFrame::GetIgnoreModel ( ) [inline]

Get the ignore model implementation.

Definition at line 248 of file MainFrm.h.

Referenced by CWincvsApp::GetIgnoreModel().

00249 {
00250     return &m_ignore;
00251 }

CMDIMenuList & CMainFrame::GetMenuList ( void ) [inline, private]

Get the menu list.

Definition at line 254 of file MainFrm.h.

References CMDIMenuList.

00255 {
00256     return m_menuList;
00257 }

KiRecursionModel * CMainFrame::GetRecursionModel ( ) [inline]

Get the recursion model implementation.

Definition at line 242 of file MainFrm.h.

Referenced by CWincvsApp::GetRecursionModel().

00243 {
00244     return &m_recursion;
00245 }

CStatusBar * CMainFrame::GetStatusBar ( ) [inline]

Get the status bar.

Definition at line 224 of file MainFrm.h.

Referenced by CWincvsApp::GetStatusBar(), CBrowseFileView::OnDeleteallitems(), CBrowseFileView::OnItemchanged(), and CBrowseFileView::ResetView().

00225 {
00226     return &m_wndStatusBar;
00227 }

CCJTabCtrlBar * CMainFrame::GetWorkspace ( ) [inline]

Get workspace.

Definition at line 218 of file MainFrm.h.

Referenced by CWincvsApp::ActivateBrowserView().

00219 {
00220     return &m_wndWorkspace;
00221 }

BOOL CMainFrame::InitializeDockingWindows ( ) [private]

Create and initialize docking windows

Returns:
TRUE on success, FALSE otherwise
Definition at line 206 of file MainFrm.cpp.

References CCJTabCtrlBar::AddView(), CCJControlBar::Create(), CCJMDIFrameWnd::DockSizeBar(), CCJControlBar::EnableDockingOnSizeBar(), CCJMDIFrameWnd::EnableDockingSizeBar(), ID_VIEW_CONSOLE_BAR, ID_VIEW_WORKSPACE, IDR_WORKSPACE, m_consolebar, m_TabImages, m_wndWorkspace, CCJTabCtrlBar::SetActiveView(), and CCJTabCtrlBar::SetTabImageList().

Referenced by OnCreate().

00207 {
00208     // Initial size when docked: top, bottom, left, right.
00209     // ??? SetInitialSize(125,225,225,225);
00210
00211     if( !m_wndWorkspace.Create(this, ID_VIEW_WORKSPACE, _T("Workspace"), CSize(200, 100), CBRS_LEFT) )
00212     {
00213         TRACE0("Failed to create dialog bar (Workspace)\n");
00214         return FALSE;       // fail to create
00215     }
00216
00217     m_wndWorkspace.AddView(_T("Modules"), RUNTIME_CLASS(CBrowserBar));
00218
00219 #ifndef NOEXPLOREVIEW
00220     m_wndWorkspace.AddView(_T("Explore"), RUNTIME_CLASS(CExploreBar));
00221 #endif
00222
00223     m_wndWorkspace.SetActiveView(0);
00224
00225     // Define the image list to use with the tab control
00226     m_TabImages.Create(IDR_WORKSPACE, 16, 1, RGB(255,255,255));
00227     m_wndWorkspace.SetTabImageList(&m_TabImages);
00228
00229     //m_wndWorkspace.SetMenuID(IDR_POPUP);
00230     m_wndWorkspace.EnableDockingOnSizeBar(CBRS_ALIGN_ANY);
00231
00232     if( !m_consolebar.Create(this, ID_VIEW_CONSOLE_BAR, _T("Output"), CSize(300, 100), CBRS_BOTTOM) )
00233     {
00234         TRACE0("Failed to create dialog bar (Output)\n");
00235         return FALSE;       // fail to create
00236     }
00237
00238     //m_consolebar.SetMenuID(IDR_POPUP);
00239     m_consolebar.EnableDockingOnSizeBar(CBRS_ALIGN_ANY);
00240
00241     EnableDockingSizeBar(CBRS_ALIGN_ANY);
00242     DockSizeBar(&m_wndWorkspace);
00243     DockSizeBar(&m_consolebar);
00244
00245     return TRUE;
00246 }

Here is the call graph for this function:

void CMainFrame::InitialShowWindow ( int nCmdShow )

Show and place window

Parameters:
nCmdShow Show command
Definition at line 574 of file MainFrm.cpp.

References CWinPlacement::GetPlacement(), gMainPlacement, and CWinPlacement::IsHasOne().

00575 {
00576     if( gMainPlacement.IsHasOne() )
00577     {
00578         WINDOWPLACEMENT wp = gMainPlacement.GetPlacement();
00579
00580         if( nCmdShow != SW_SHOWNORMAL )
00581             wp.showCmd = nCmdShow;
00582         else if( wp.showCmd & SW_SHOWMINIMIZED )
00583             wp.showCmd = (wp.flags & WPF_RESTORETOMAXIMIZED) ? SW_MAXIMIZE : SW_SHOWNORMAL;
00584
00585         SetWindowPlacement(&wp);
00586     }
00587     else
00588     {
00589         ShowWindow(nCmdShow);
00590     }
00591 }

Here is the call graph for this function:

bool CMainFrame::IsFilterMasksEnable ( ) const

Get the filter mask enable flag

Returns:
The filter mask enable flag
Definition at line 745 of file MainFrm.cpp.

References KoFilterModel::IsFilterMasksEnable(), and m_filter.

Referenced by CBrowseFileView::OnInitialUpdate(), CBrowseFileView::OnViewFilterbarEnable(), and CBrowseFileView::ResetView().

00746 {
00747     return m_filter.IsFilterMasksEnable();
00748 }

Here is the call graph for this function:

void CMainFrame::LoadDockState ( ) [private]

Load the dock state, but check the toolbar exists (MFC bug) Definition at line 409 of file MainFrm.cpp.

References CCJMDIFrameWnd::LoadBarState(), CCJWindowPlacement::LoadWindowPos(), m_state, and NULL.

Referenced by OnCreate().

00410 {
00411 #if 1
00412     //
00413     CDockState state;
00414     state.LoadState(_T("Bar State"));
00415
00416     for(int i = 0; i < state.m_arrBarInfo.GetSize(); i++)
00417     {
00418         CControlBarInfo* pInfo = (CControlBarInfo*)state.m_arrBarInfo[i];
00419         ASSERT(pInfo != NULL);
00420         if( !pInfo->m_bFloating )
00421         {
00422             pInfo->m_pBar = GetControlBar(pInfo->m_nBarID);
00423             if( pInfo->m_pBar == NULL )
00424             {
00425                 delete (CControlBarInfo*)state.m_arrBarInfo[i];
00426                 state.m_arrBarInfo.RemoveAt(i);
00427                 i--;
00428             }
00429         }
00430     }
00431
00432     SetDockState(state);
00433 #else
00434     LoadBarState(_T("Bar State"));
00435 #endif
00436     m_state.LoadWindowPos(this);
00437 }

Here is the call graph for this function:

void CMainFrame::LoadLocationSettings ( )

Load location-specific settings Definition at line 624 of file MainFrm.cpp.

References KoIgnoreModel::GetNotificationManager(), KoRecursionModel::GetNotificationManager(), KoFilterModel::GetNotificationManager(), KoIgnoreModel::LoadSettings(), KoRecursionModel::LoadSettings(), KoFilterModel::LoadSettings(), m_filter, m_ignore, m_recursion, and NotificationManager::NotifyAll().

Referenced by CWinCvsBrowser::ResetBrowser().

00625 {
00626     m_filter.LoadSettings();
00627     m_recursion.LoadSettings();
00628     m_ignore.LoadSettings();
00629
00630     m_filter.GetNotificationManager()->NotifyAll();
00631     m_recursion.GetNotificationManager()->NotifyAll();
00632     m_ignore.GetNotificationManager()->NotifyAll();
00633 }

Here is the call graph for this function:

void CMainFrame::OnActivate | ( | UINT | nState,
 |  | CWnd * | pWndOther,
 |  | BOOL | bMinimized
 | ) | [protected]

Handle window activation, prevent the focus to be gone from FileView to the Workspace - for the Dialogs etc.

Definition at line 690 of file MainFrm.cpp.

References CWincvsApp::GetFileView(), m_bRestoreFocus, and CWincvsApp::SetBackgroundProcess().

00691 {
00692     CCJMDIFrameWnd::OnActivate(nState, pWndOther, bMinimized);
00693
00694     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00695     ASSERT(pApp);
00696
00697     if( WA_INACTIVE == nState && !m_bRestoreFocus )
00698     {
00699         m_bRestoreFocus = BOOL( GetFocus() == pApp->GetFileView() );
00700         pApp->SetBackgroundProcess(true);
00701     }
00702     else
00703     {
00704         pApp->SetBackgroundProcess(false);
00705
00706         if( !bMinimized && m_bRestoreFocus )
00707         {
00708             m_bRestoreFocus = FALSE;
00709             CBrowseFileView* pBrowseFileView = pApp->GetFileView();
00710
00711             if( pBrowseFileView )
00712             {
00713                 pBrowseFileView->SetFocus();
00714             }
00715         }
00716     }
00717 }

Here is the call graph for this function:

BOOL CMainFrame::OnBroadcastCmdMsg | ( | UINT | nID,
 |  | int | nCode,
 |  | void * | pExtra,
 |  | AFX_CMDHANDLERINFO * | pHandlerInfo
 | ) |

Cmd msg routing on the dock bars.

Definition at line 661 of file MainFrm.cpp.

References CWincvsApp::GetBrowserView(), CWincvsApp::GetConsoleView(), CWincvsApp::GetExplorerView(), and NULL.

Referenced by CLogFrame::OnCmdMsg(), and CGraphFrame::OnCmdMsg().

00662 {
00663     CPushRoutingFrame push(this);
00664
00665     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00666
00667     // pump through dock bars FIRST
00668     CWinCvsBrowser* bView = app->GetBrowserView();
00669     if( bView != NULL && bView == CWnd::GetFocus() && bView->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00670         return TRUE;
00671
00672 #ifndef NOEXPLOREVIEW
00673     // pump through dock bars FIRST
00674     CCJShellTree* eView = app->GetExplorerView();
00675     if( eView != NULL && eView == CWnd::GetFocus() )
00676     {
00677         if( eView->GetParent()->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00678             return TRUE;
00679     }
00680 #endif
00681
00682     CWincvsView* cView = app->GetConsoleView();
00683     if( cView != NULL && cView == CWnd::GetFocus() && cView->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00684         return TRUE;
00685
00686     return FALSE;
00687 }

Here is the call graph for this function:

void CMainFrame::OnClose ( ) [protected]

WM_CLOSE message handler, save windows positions.

Reimplemented from CCJMDIFrameWnd.

Definition at line 465 of file MainFrm.cpp.

References BUTTONTITLE_OK, gCvsPrefs, CWincvsApp::GetBrowserView(), gMainPlacement, CWincvsApp::IsCvsRunning(), kCvsAlertStopIcon, m_state, NULL, CCJMDIFrameWnd::OnClose(), CWinCvsBrowser::ResetBrowser(), CvsPrefs::save(), CCJMDIFrameWnd::SaveBarState(), CCJWindowPlacement::SaveWindowPos(), and StoreLocationSettings().

00466 {
00467     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00468     if( app->IsCvsRunning() )
00469     {
00470         CvsAlert(kCvsAlertStopIcon,
00471             "CVS is currently running.", "Stop CVS first before exiting.",
00472             BUTTONTITLE_OK, NULL).ShowAlert();
00473
00474         return;
00475     }
00476
00477     // Write all persistent settings
00478     StoreLocationSettings();
00479
00480     // Charybids Ltd's suggested fix:
00481     // Saving the window positions whilst iconic trashes the registry.
00482     if( !IsIconic() )
00483     {
00484         m_state.SaveWindowPos(this);
00485         SaveBarState(_T("Bar State"));
00486
00487         WINDOWPLACEMENT wp;
00488         wp.length = sizeof wp;
00489         if( GetWindowPlacement(&wp) )
00490         {
00491             wp.flags &= WPF_RESTORETOMAXIMIZED;
00492             gMainPlacement = wp;
00493         }
00494     }
00495
00496     // Only way I found to notify the browser and to prevent the memory leak support
00497     app->GetBrowserView()->ResetBrowser(0L);
00498
00499     CCJMDIFrameWnd::OnClose();
00500
00501     gCvsPrefs.save(true);
00502 }

Here is the call graph for this function:

int CMainFrame::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

WM_CREATE message handler, create frame and toolbars.

Definition at line 249 of file MainFrm.cpp.

References CreateLocationCombo(), CreateStatusBar(), CreateToolbar(), CCJMDIFrameWnd::EnableDocking(), ID_VIEW_BROWSER_BAR, ID_VIEW_FILES_BAR, ID_VIEW_FILTER_BAR, ID_VIEW_MULTI_BAR, ID_VIEW_TAGS_BAR, IDR_BROWSER, IDR_FILELIST, IDR_FILTER, IDR_MAINFRAME, IDR_MULTIUSER, IDR_TAGS, InitializeDockingWindows(), LoadDockState(), m_wndBrowser, m_wndFilter, m_wndList, m_wndMultiUser, m_wndTags, m_wndToolBar, and CSplashWnd::ShowSplashScreen().

00250 {
00251     if( CCJMDIFrameWnd::OnCreate(lpCreateStruct) == -1 )
00252         return -1;
00253
00254     if( !CreateStatusBar() )
00255     {
00256         return -1;
00257     }
00258
00259     EnableDocking(CBRS_ALIGN_ANY);
00260
00261     if( !CreateToolbar("Standard", IDR_MAINFRAME, &m_wndToolBar) ||
00262         !CreateToolbar("Browse", IDR_BROWSER, &m_wndBrowser, &m_wndToolBar, ID_VIEW_BROWSER_BAR) ||
00263         !CreateToolbar("Files", IDR_FILELIST, &m_wndList, &m_wndBrowser, ID_VIEW_FILES_BAR) ||
00264         !CreateToolbar("Multi-Users", IDR_MULTIUSER, &m_wndMultiUser, &m_wndList, ID_VIEW_MULTI_BAR) ||
00265         !CreateToolbar("Tags", IDR_TAGS, &m_wndTags, &m_wndMultiUser, ID_VIEW_TAGS_BAR) ||
00266         !CreateToolbar("Filter", IDR_FILTER, &m_wndFilter, &m_wndTags, ID_VIEW_FILTER_BAR) )
00267     {
00268         return -1;
00269     }
00270
00271     if( !CreateLocationCombo() )
00272     {
00273         return -1;
00274     }
00275
00276     if( !InitializeDockingWindows() )
00277     {
00278         TRACE0("Failed to initialize docking windows\n");
00279         return -1;  // fail to create
00280     }
00281
00282     LoadDockState();
00283
00284     // CG: The following line was added by the Splash Screen component.
00285     CSplashWnd::ShowSplashScreen(this);
00286
00287     SetTimer(99, 200, 0L);
00288
00289     return 0;
00290 }

Here is the call graph for this function:

void CMainFrame::OnDropFiles ( HDROP hDropInfo ) [protected]

WM_DROPFILES message handler.

Definition at line 505 of file MainFrm.cpp.

References cvs_out(), CWincvsApp::GetBrowserView(), CWincvsApp::GetFileView(), kBold, kNL, kNormal, kUnderline, NULL, CBrowseFileView::ResetView(), and CWinCvsBrowser::StepToLocation().

Referenced by DropFiles().

00506 {
00507     SetActiveWindow();  // activate us first !
00508     UINT nFiles = ::DragQueryFile(hDropInfo, (UINT)-1, NULL, 0);
00509
00510     CWinApp* pApp = AfxGetApp();
00511     for(UINT iFile = 0; iFile < nFiles; iFile++)
00512     {
00513         TCHAR szFileName[_MAX_PATH];
00514         ::DragQueryFile(hDropInfo, iFile, szFileName, _MAX_PATH);
00515
00516         if( iFile == 0 )
00517         {
00518             CColorConsole out;
00519             out << kBold << "Locating: " << kNormal << kUnderline << szFileName << kNormal <<  kNormal << kNL;
00520
00521             CWincvsApp* pApp = (CWincvsApp *)AfxGetApp();
00522             if( pApp )
00523             {
00524                 const TCHAR *p1, *p2 = szFileName;
00525
00526                 while( p2 )
00527                 {
00528                     p1 = ++p2;
00529                     p2 = strchr(p2, _T('\\'));
00530                 }
00531
00532                 CWinCvsBrowser* pBrowser = pApp->GetBrowserView();
00533                 if( pBrowser )
00534                 {
00535                     if( pBrowser->StepToLocation(szFileName, true) )
00536                     {
00537                         pApp->GetFileView()->ResetView(false, p1);
00538                     }
00539                 }
00540             }
00541         }
00542
00543         // replace \ by /
00544         TCHAR *tmp = szFileName;
00545         while( (tmp = strchr(tmp, '\\')) != 0L )
00546         {
00547             *tmp++ = '/';
00548         }
00549
00550         cvs_out("%s\n", szFileName);
00551
00552         //pApp->OpenDocumentFile(szFileName);
00553     }//end for
00554
00555     ::DragFinish(hDropInfo);
00556 }

Here is the call graph for this function:

void CMainFrame::OnHistorySelect ( ) [protected]

CBN_SELCHANGE message handler, change browse location.

Definition at line 594 of file MainFrm.cpp.

References ChangeLocation().

00595 {
00596     ChangeLocation();
00597 }

Here is the call graph for this function:

void CMainFrame::OnInitMenu ( CMenu * pMenu ) [protected]

WM_INITMENU message handler.

Definition at line 565 of file MainFrm.cpp.

00566 {
00567     CCJMDIFrameWnd::OnInitMenu(pMenu);
00568 }

void CMainFrame::OnSysCommand | ( | UINT | nID,
 |  | LPARAM | lParam
 | ) | [protected]

WM_SYSCOMMAND message handler, prevent the focus to be gone from FileView to the Workspace - for the Minimize.

Definition at line 720 of file MainFrm.cpp.

References CWincvsApp::GetFileView(), and m_bRestoreFocus.

00721 {
00722     if( SC_MINIMIZE == nID )
00723     {
00724         CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00725         ASSERT(pApp);
00726
00727         m_bRestoreFocus = BOOL(GetFocus() == pApp->GetFileView());
00728     }
00729
00730     CCJMDIFrameWnd::OnSysCommand(nID, lParam);
00731 }

Here is the call graph for this function:

void CMainFrame::OnTimer ( UINT nIDEvent ) [protected]

WM_TIMER message handler, get the environment variable and unlocks the sGetEnv semaphore.

Definition at line 988 of file MainFrm.cpp.

References glue_getenv(), NULL, sAskingMainThread, sGetEnv(), and sGetEnvResult.

00989 {
00990     if( sAskingMainThread )
00991     {
00992         sAskingMainThread = false;
00993
00994         sGetEnvResult = glue_getenv(sGetEnvResult, NULL); // FIXME -> temporary
00995         sGetEnv.Unlock();
00996     }
00997 }

Here is the call graph for this function:

void CMainFrame::OnUpdateFilterMask ( CCmdUI * pCmdUI ) [protected]

Update filter mask.

Definition at line 958 of file MainFrm.cpp.

References IsAppEnabled().

00959 {
00960     pCmdUI->Enable(IsAppEnabled());
00961 }

Here is the call graph for this function:

void CMainFrame::OnUpdateHistory ( CCmdUI * pCmdUI ) [protected]

Update history.

Definition at line 964 of file MainFrm.cpp.

References IsAppEnabled().

00965 {
00966     pCmdUI->Enable(IsAppEnabled());
00967 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewAdded ( CCmdUI * pCmdUI ) [protected]

Update added filter.

Definition at line 909 of file MainFrm.cpp.

References KoFilterModel::IsAdded(), IsAppEnabled(), and m_filter.

00910 {
00911     pCmdUI->Enable(IsAppEnabled());
00912     pCmdUI->SetCheck(m_filter.IsAdded());
00913 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewChanged ( CCmdUI * pCmdUI ) [protected]

Update changed filter.

Definition at line 937 of file MainFrm.cpp.

References IsAppEnabled(), KoFilterModel::IsChanged(), and m_filter.

00938 {
00939     pCmdUI->Enable(IsAppEnabled());
00940     pCmdUI->SetCheck(m_filter.IsChanged());
00941 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewClearall ( CCmdUI * pCmdUI ) [protected]

Update clear all filters command.

Definition at line 812 of file MainFrm.cpp.

References KoFilterModel::HasFilters(), IsAppEnabled(), KoIgnoreModel::IsShowIgnored(), m_filter, and m_ignore.

00813 {
00814     pCmdUI->Enable(IsAppEnabled() && (m_filter.HasFilters() || m_ignore.IsShowIgnored()));
00815 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewConflict ( CCmdUI * pCmdUI ) [protected]

Update conflict filter.

Definition at line 839 of file MainFrm.cpp.

References IsAppEnabled(), KoFilterModel::IsConflict(), and m_filter.

00840 {
00841     pCmdUI->Enable(IsAppEnabled());
00842     pCmdUI->SetCheck(m_filter.IsConflict());
00843 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewFilterbarClearall ( CCmdUI * pCmdUI ) [protected]

Update clear all filter bar.

Definition at line 1007 of file MainFrm.cpp.

References KoFilterModel::HasFilterMasks(), IsAppEnabled(), KoFilterModel::IsFilterMasksEnable(), and m_filter.

01008 {
01009     pCmdUI->Enable(IsAppEnabled() && m_filter.IsFilterMasksEnable() && m_filter.HasFilterMasks());
01010 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewFilterbarEnable ( CCmdUI * pCmdUI ) [protected]

Update filter bar enable.

Definition at line 1000 of file MainFrm.cpp.

References IsAppEnabled(), KoFilterModel::IsFilterMasksEnable(), and m_filter.

01001 {
01002     pCmdUI->Enable(IsAppEnabled());
01003     pCmdUI->SetCheck(m_filter.IsFilterMasksEnable());
01004 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewFilterbarOptions ( CCmdUI * pCmdUI ) [protected]

Update filter bar options.

Definition at line 1013 of file MainFrm.cpp.

References IsAppEnabled().

01014 {
01015     pCmdUI->Enable(IsAppEnabled());
01016 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewHidemissing ( CCmdUI * pCmdUI ) [protected]

Update hide missing filter.

Definition at line 881 of file MainFrm.cpp.

References KoFilterModel::HasAnyModified(), IsAppEnabled(), KoFilterModel::IsHideMissing(), and m_filter.

00882 {
00883     pCmdUI->Enable(IsAppEnabled() && !m_filter.HasAnyModified());
00884     pCmdUI->SetCheck(m_filter.IsHideMissing());
00885 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewHideunknown ( CCmdUI * pCmdUI ) [protected]

Update hide unknown filter.

Definition at line 951 of file MainFrm.cpp.

References IsAppEnabled(), KoFilterModel::IsDefaultMode(), KoFilterModel::IsHideUnknown(), and m_filter.

00952 {
00953     pCmdUI->Enable(IsAppEnabled() && m_filter.IsDefaultMode());
00954     pCmdUI->SetCheck(m_filter.IsHideUnknown());
00955 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewIgnore ( CCmdUI * pCmdUI ) [protected]

Update ignore filter.

Definition at line 895 of file MainFrm.cpp.

References IsAppEnabled(), KoIgnoreModel::IsShowIgnored(), and m_ignore.

00896 {
00897     pCmdUI->Enable(IsAppEnabled());
00898     pCmdUI->SetCheck(m_ignore.IsShowIgnored());
00899 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewMissing ( CCmdUI * pCmdUI ) [protected]

Update missing filter.

Definition at line 867 of file MainFrm.cpp.

References IsAppEnabled(), KoFilterModel::IsMissing(), and m_filter.

00868 {
00869     pCmdUI->Enable(IsAppEnabled());
00870     pCmdUI->SetCheck(m_filter.IsMissing());
00871 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewModified ( CCmdUI * pCmdUI ) [protected]

Update modified filter command.

Definition at line 825 of file MainFrm.cpp.

References IsAppEnabled(), KoFilterModel::IsModified(), and m_filter.

00826 {
00827     pCmdUI->Enable(IsAppEnabled());
00828     pCmdUI->SetCheck(m_filter.IsModified());
00829 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewRecursive ( CCmdUI * pCmdUI ) [protected]

Update recursive view command.

Definition at line 792 of file MainFrm.cpp.

References IsAppEnabled(), KoRecursionModel::IsShowRecursive(), and m_recursion.

00793 {
00794     pCmdUI->Enable(IsAppEnabled());
00795     pCmdUI->SetCheck(m_recursion.IsShowRecursive());
00796 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewRemoved ( CCmdUI * pCmdUI ) [protected]

Toggle removed filter.

Definition at line 916 of file MainFrm.cpp.

References IsAppEnabled(), KoFilterModel::IsRemoved(), and m_filter.

00917 {
00918     pCmdUI->Enable(IsAppEnabled());
00919     pCmdUI->SetCheck(m_filter.IsRemoved());
00920 }

Here is the call graph for this function:

void CMainFrame::OnUpdateViewUnknown ( CCmdUI * pCmdUI ) [protected]

Update unknown filter.

Definition at line 853 of file MainFrm.cpp.

References IsAppEnabled(), KoFilterModel::IsUnknown(), and m_filter.

00854 {
00855     pCmdUI->Enable(IsAppEnabled());
00856     pCmdUI->SetCheck(m_filter.IsUnknown());
00857 }

Here is the call graph for this function:

void CMainFrame::OnViewAdded ( ) [protected]

Toggle added filter.

Definition at line 902 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleAdded().

00903 {
00904     m_filter.ToggleAdded();
00905     m_filter.GetNotificationManager()->NotifyAll();
00906 }

Here is the call graph for this function:

void CMainFrame::OnViewChanged ( ) [protected]

Toggle changed filter.

Definition at line 930 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleChanged().

00931 {
00932     m_filter.ToggleChanged();
00933     m_filter.GetNotificationManager()->NotifyAll();
00934 }

Here is the call graph for this function:

void CMainFrame::OnViewClearall ( ) [protected]

Clear all filters.

Definition at line 799 of file MainFrm.cpp.

References KoFilterModel::ClearAll(), KoFilterModel::GetNotificationManager(), KoIgnoreModel::IsShowIgnored(), m_filter, m_ignore, NotificationManager::NotifyAll(), and KoIgnoreModel::ToggleIgnore().

00800 {
00801     m_filter.ClearAll();
00802
00803     if( m_ignore.IsShowIgnored() )
00804     {
00805         m_ignore.ToggleIgnore();
00806     }
00807
00808     m_filter.GetNotificationManager()->NotifyAll();
00809 }

Here is the call graph for this function:

void CMainFrame::OnViewConflict ( ) [protected]

Toggle conflict filter.

Definition at line 832 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleConflict().

00833 {
00834     m_filter.ToggleConflict();
00835     m_filter.GetNotificationManager()->NotifyAll();
00836 }

Here is the call graph for this function:

void CMainFrame::OnViewHidemissing ( ) [protected]

Toggle hide missing filter.

Definition at line 874 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleHideMissing().

00875 {
00876     m_filter.ToggleHideMissing();
00877     m_filter.GetNotificationManager()->NotifyAll();
00878 }

Here is the call graph for this function:

void CMainFrame::OnViewHideunknown ( ) [protected]

Toggle hide unknown filter.

Definition at line 944 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleHideUnknown().

00945 {
00946     m_filter.ToggleHideUnknown();
00947     m_filter.GetNotificationManager()->NotifyAll();
00948 }

Here is the call graph for this function:

void CMainFrame::OnViewIgnore ( ) [protected]

Toggle ignore filter.

Definition at line 888 of file MainFrm.cpp.

References KoIgnoreModel::GetNotificationManager(), m_ignore, NotificationManager::NotifyAll(), and KoIgnoreModel::ToggleIgnore().

00889 {
00890     m_ignore.ToggleIgnore();
00891     m_ignore.GetNotificationManager()->NotifyAll();
00892 }

Here is the call graph for this function:

void CMainFrame::OnViewMissing ( ) [protected]

Toggle missing filter.

Definition at line 860 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleMissing().

00861 {
00862     m_filter.ToggleMissing();
00863     m_filter.GetNotificationManager()->NotifyAll();
00864 }

Here is the call graph for this function:

void CMainFrame::OnViewModified ( ) [protected]

Toggle modified filter.

Definition at line 818 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleModified().

00819 {
00820     m_filter.ToggleModified();
00821     m_filter.GetNotificationManager()->NotifyAll();
00822 }

Here is the call graph for this function:

void CMainFrame::OnViewRecursive ( ) [protected]

Toggle recursive view.

Definition at line 785 of file MainFrm.cpp.

References KoRecursionModel::GetNotificationManager(), m_recursion, NotificationManager::NotifyAll(), and KoRecursionModel::ToggleRecursion().

00786 {
00787     m_recursion.ToggleRecursion();
00788     m_recursion.GetNotificationManager()->NotifyAll();
00789 }

Here is the call graph for this function:

void CMainFrame::OnViewRemoved ( ) [protected]

Update removed filter.

Definition at line 923 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleRemoved().

00924 {
00925     m_filter.ToggleRemoved();
00926     m_filter.GetNotificationManager()->NotifyAll();
00927 }

Here is the call graph for this function:

void CMainFrame::OnViewUnknown ( ) [protected]

Toggle unknown filter.

Definition at line 846 of file MainFrm.cpp.

References KoFilterModel::GetNotificationManager(), m_filter, NotificationManager::NotifyAll(), and KoFilterModel::ToggleUnknown().

00847 {
00848     m_filter.ToggleUnknown();
00849     m_filter.GetNotificationManager()->NotifyAll();
00850 }

Here is the call graph for this function:

BOOL CMainFrame::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

PreCreateWindow virtual override.

Reimplemented from CCJMDIFrameWnd.

Definition at line 440 of file MainFrm.cpp.

References CCJMDIFrameWnd::PreCreateWindow().

00441 {
00442     return CCJMDIFrameWnd::PreCreateWindow(cs);
00443 }

Here is the call graph for this function:

void CMainFrame::SetContext ( const KoColumnContext * context )

Set the column context

Parameters:
context Context to be set
Definition at line 779 of file MainFrm.cpp.

References m_filter, and KoFilterModel::SetContext().

Referenced by CBrowseFileView::ResetView().

00780 {
00781     m_filter.SetContext(context);
00782 }

Here is the call graph for this function:

void CMainFrame::SetFilterBarMask | ( | CSortHeaderCtrl & | ctrlHeader,
 |  | const KiColumnModel * | columnModel
 | ) |

Set the filter mask according to filter bar entries

Parameters:
ctrlHeader | Header control to get the filter bar entries from
columnModel | Column model
Definition at line 755 of file MainFrm.cpp.

References KiColumnModel::GetCount(), CSortHeaderCtrl::GetFilterText(), KiColumnModel::GetType(), m_filter, and KoFilterModel::SetMask().

Referenced by CBrowseFileView::DeleteColumns(), CBrowseFileView::OnFilterBarChanged(), and CBrowseFileView::ResetView().

00756 {
00757     const int columnCount = columnModel->GetCount();
00758     for(int nIndex = 0; nIndex < columnCount; nIndex++)
00759     {
00760         std::string filterText = ctrlHeader.GetFilterText(nIndex);
00761         const int filterType = columnModel->GetType(nIndex);
00762
00763         m_filter.SetMask(filterType, filterText.c_str());
00764     }
00765 }

Here is the call graph for this function:

void CMainFrame::StoreLocationSettings ( )

Store location-specific settings Definition at line 638 of file MainFrm.cpp.

References m_filter, m_ignore, m_recursion, KoIgnoreModel::SaveSettings(), KoRecursionModel::SaveSettings(), and KoFilterModel::SaveSettings().

Referenced by OnClose(), and CWinCvsBrowser::ResetBrowser().

00639 {
00640     m_filter.SaveSettings();
00641     m_recursion.SaveSettings();
00642     m_ignore.SaveSettings();
00643 }

Here is the call graph for this function:

void CMainFrame::ToggleFilterMasksEnable ( )

Toggle the filter mask enable Definition at line 736 of file MainFrm.cpp.

References m_filter, and KoFilterModel::ToggleFilterMasksEnable().

Referenced by CBrowseFileView::OnViewFilterbarEnable().

00737 {
00738     m_filter.ToggleFilterMasksEnable();
00739 }

Here is the call graph for this function:

void CMainFrame::WinHelp | ( | DWORD | dwData,
 |  | UINT | nCmd = HELP_CONTEXT
 | ) | [virtual]

WinHelp virtual override, call HTML Help instead of WinHelp.

Definition at line 1019 of file MainFrm.cpp.

01020 {
01021     HtmlHelp(m_hWnd, AfxGetApp()->m_pszHelpFilePath, HH_HELP_CONTEXT, nCmd == HELP_CONTEXT ? dwData : 0);
01022
01023     //CCJMDIFrameWnd::WinHelp(dwData, nCmd);
01024 }

Member Data Documentation

BOOL CMainFrame::m_bRestoreFocus [private]

Restore focus flag Definition at line 146 of file MainFrm.h.

Referenced by OnActivate(), and OnSysCommand().

CHistComboBoxEx CMainFrame::m_browseHist [private]

Browse history combo Definition at line 158 of file MainFrm.h.

Referenced by ChangeLocation(), and CreateLocationCombo().

CBarConsole CMainFrame::m_consolebar [private]

Console bar Definition at line 160 of file MainFrm.h.

Referenced by InitializeDockingWindows().

KoFilterModel CMainFrame::m_filter [private]

Filter model Definition at line 142 of file MainFrm.h.

Referenced by ClearFilters(), IsFilterMasksEnable(), LoadLocationSettings(), OnUpdateViewAdded(), OnUpdateViewChanged(), OnUpdateViewClearall(), OnUpdateViewConflict(), OnUpdateViewFilterbarClearall(), OnUpdateViewFilterbarEnable(), OnUpdateViewHidemissing(), OnUpdateViewHideunknown(), OnUpdateViewMissing(), OnUpdateViewModified(), OnUpdateViewRemoved(), OnUpdateViewUnknown(), OnViewAdded(), OnViewChanged(), OnViewClearall(), OnViewConflict(), OnViewHidemissing(), OnViewHideunknown(), OnViewMissing(), OnViewModified(), OnViewRemoved(), OnViewUnknown(), SetContext(), SetFilterBarMask(), StoreLocationSettings(), and ToggleFilterMasksEnable().

CFont CMainFrame::m_fontNormal [private]

Font Definition at line 159 of file MainFrm.h.

Referenced by CreateLocationCombo().

KoIgnoreModel CMainFrame::m_ignore [private]

Ignore model Definition at line 144 of file MainFrm.h.

Referenced by LoadLocationSettings(), OnUpdateViewClearall(), OnUpdateViewIgnore(), OnViewClearall(), OnViewIgnore(), and StoreLocationSettings().

KoRecursionModel CMainFrame::m_recursion [private]

Recursion model Definition at line 143 of file MainFrm.h.

Referenced by LoadLocationSettings(), OnUpdateViewRecursive(), OnViewRecursive(), and StoreLocationSettings().

CCJWindowPlacement CMainFrame::m_state [private]

Bar state Definition at line 163 of file MainFrm.h.

Referenced by LoadDockState(), and OnClose().

CImageList CMainFrame::m_TabImages [private]

Workspace tab images Definition at line 162 of file MainFrm.h.

Referenced by InitializeDockingWindows().

CToolBar CMainFrame::m_wndBrowser [private]

Browser toolbar Definition at line 152 of file MainFrm.h.

Referenced by CreateLocationCombo(), and OnCreate().

CToolBar CMainFrame::m_wndFilter [private]

Filter toolbar Definition at line 156 of file MainFrm.h.

Referenced by OnCreate().

CToolBar CMainFrame::m_wndList [private]

List toolbar Definition at line 155 of file MainFrm.h.

Referenced by OnCreate().

CToolBar CMainFrame::m_wndMultiUser [private]

Multi user toolbar Definition at line 153 of file MainFrm.h.

Referenced by OnCreate().

CCvsStatusBar CMainFrame::m_wndStatusBar [private]

Status bar Definition at line 149 of file MainFrm.h.

Referenced by CreateStatusBar().

CToolBar CMainFrame::m_wndTags [private]

Tags toolbar Definition at line 154 of file MainFrm.h.

Referenced by OnCreate().

CToolBar CMainFrame::m_wndToolBar [private]

File toolbar Definition at line 151 of file MainFrm.h.

Referenced by OnCreate().

CCJTabCtrlBar CMainFrame::m_wndWorkspace [private]

Workspace bar Definition at line 161 of file MainFrm.h.

Referenced by GetBrowserView(), GetExplorerView(), and InitializeDockingWindows().

The documentation for this class was generated from the following files:
  • WinCvs/MainFrm.h
  • WinCvs/MainFrm.cpp
Generated on Sat Aug 7 22:55:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMapPtrToPtr Class Reference

CMapPtrToPtr Class Reference

Inheritance diagram for CMapPtrToPtr:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/CJLibrary/Subclass.cpp
Generated on Sat Aug 7 22:55:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: match_dir Struct Reference

match_dir Struct Reference

helper functor to compare MultiFilesEntry by directory path More...

Collaboration diagram for match_dir:

[legend]
List of all members.

Public Member Functions

match_dir (const UStr &inDirPath)
bool | operator() (const MultiFilesEntry &inEntry) const

Public Attributes

const UStr & | dirPath

Detailed Description

helper functor to compare MultiFilesEntry by directory path

Definition at line 220 of file MultiFiles.cpp.

Constructor & Destructor Documentation

match_dir::match_dir ( const UStr & inDirPath ) [inline]

Definition at line 223 of file MultiFiles.cpp.

References dirPath.

00223 : dirPath(inDirPath) {}

Member Function Documentation

bool match_dir::operator() ( const MultiFilesEntry & inEntry ) const [inline]

Definition at line 224 of file MultiFiles.cpp.

References dirPath, and MultiFilesEntry::getdir().

00225     {
00226         return dirPath == inEntry.getdir();
00227     }

Here is the call graph for this function:

Member Data Documentation

const UStr& match_dir::dirPath

Definition at line 222 of file MultiFiles.cpp.

Referenced by match_dir(), and operator()().

The documentation for this struct was generated from the following file:
  • common/MultiFiles.cpp
Generated on Sat Aug 7 22:55:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMDIChildWnd Class Reference

CMDIChildWnd Class Reference

Inheritance diagram for CMDIChildWnd:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJMDIChildWnd.h
Generated on Sat Aug 7 22:55:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMDIFrameWnd Class Reference

CMDIFrameWnd Class Reference

Inheritance diagram for CMDIFrameWnd:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJMDIFrameWnd.h
Generated on Sat Aug 7 22:55:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMemFile Class Reference

CMemFile Class Reference

Inheritance diagram for CMemFile:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJMemFile.h
Generated on Sat Aug 7 22:55:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UMenu Class Reference

UMenu Class Reference

#include <umenu.h>

Inheritance diagram for UMenu:

[legend]
Collaboration diagram for UMenu:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UMenu (int widid)
virtual | ~UMenu ()

Static Public Member Functions

const URuntimeClass * | rtUMenu (void)

Protected Member Functions

void | OnUpdateUI (void)
when the user interface is invalid.
int | OnCommands (int cmd)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Static Protected Attributes

const URuntimeClass | classUMenu
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UMenu ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Constructor & Destructor Documentation

UMenu::UMenu ( int widid )

Definition at line 81 of file umenu.cpp.

00081                       : UWidget(widid)
00082 #if qGTK
00083     , fAccelGroup(0L), fRadioGroup(0L)
00084 #endif
00085 {
00086 #if qGTK
00087     fAccelGroup = gtk_accel_group_new ();
00088 #endif
00089 }

UMenu::~UMenu ( ) [virtual]

Definition at line 91 of file umenu.cpp.

00092 {
00093 }

Member Function Documentation

const URuntimeClass * UMenu::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UMacAppMenu, and UCvsMenubar.

Definition at line 74 of file umenu.cpp.

const UMSGMAP * UMenu::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UMacAppMenu, and UCvsMenubar.

Definition at line 76 of file umenu.cpp.

const UMSGMAP * UMenu::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Reimplemented in UMacAppMenu, and UCvsMenubar.

Definition at line 76 of file umenu.cpp.

const URuntimeClass * UMenu::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Reimplemented in UMacAppMenu, and UCvsMenubar.

Definition at line 74 of file umenu.cpp.

const UMSGMAP * UMenu::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UMacAppMenu, and UCvsMenubar.

Definition at line 76 of file umenu.cpp.

int UMenu::OnCommands ( int cmd ) [protected]

Definition at line 1005 of file umenu.cpp.

References EV_CMD, UCmdTarget::GetWidID(), USemaphore::IsEnteredTwice(), STD, UEventGetTargets(), and UEventSendMessageExt().

01006 {
01007 #if 0
01008     static bool sSemaphore = false;
01009     USemaphore policeman(sSemaphore);
01010     if(policeman.IsEnteredTwice())
01011         return 1;
01012 #endif
01013
01014     // this is the interesting thing about the toolbar : it resends the
01015     // commands to other widgets according to the focus information and
01016     // allows the command to be handled several times if the handler return 1
01017
01018     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
01019     int res = 0;
01020     int handledFlag;
01021
01022     // first forward the command to the focused widget : if it doesn't want it
01023     // we give it to the next pseudo widget.
01024     if(sFocusWidID != -1 && sFocusWidID != GetWidID())
01025     {
01026         res = UEventSendMessageExt(sFocusWidID, EV_CMD, cmd, 0L, &handledFlag);
01027         if(/*res == 0 &&*/ handledFlag)
01028             return 0;// may be we should retuen res here?
01029     }
01030
01031     STD map<int, UCmdTarget *>::const_iterator i;
01032     for(i = targets.begin(); i != targets.end(); ++i)
01033     {
01034         int widid = (*i).first;
01035         if(widid == sFocusWidID || widid == GetWidID())
01036             continue;
01037         res = UEventSendMessageExt(widid, EV_CMD, cmd, 0L, &handledFlag);
01038         if(/*res == 0 &&*/ handledFlag)
01039             return 0;
01040     }
01041
01042     //UAppConsole("The cmd %d of the menubar has no command handler\n", cmd);
01043
01044     return 1;
01045 }

Here is the call graph for this function:

void UMenu::OnUpdateUI ( void ) [protected]

when the user interface is invalid.

the default is to send a EV_UPDTCMD to each sub-widget.

Reimplemented from UWidget.

Reimplemented in UMacAppMenu.

Definition at line 939 of file umenu.cpp.

References UCmdUI::CanContinue(), UCmdUI::Enable(), EV_UPDTCMD, UCmdTarget::GetWidID(), USemaphore::IsEnteredTwice(), kUMainWidget, UCmdUI::m_nID, UCmdUI::m_widget, STD, UEventGetTargets(), and UEventSendMessage().

00940 {
00941     // for WIN32, the UpdateUI on the menus is better handled by MFC
00942 #ifndef WIN32
00943     static bool sSemaphore = false;
00944     USemaphore policeman(sSemaphore);
00945     if(policeman.IsEnteredTwice())
00946         return;
00947
00948     // this is the interesting thing about the toolbar : it resends the
00949     // update UI to other widgets according to the focus information and
00950     // allows the update to be handled several times if the handler asks for it
00951     // (by using UCmdUI::SetContinue)
00952
00953     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00954     std::map<int, void *>::iterator w;
00955     int cmdid;
00956
00957     for(w = m_widgets.begin(); w != m_widgets.end(); ++w)
00958     {
00959         void *widget = (*w).second;
00960         cmdid = (*w).first;
00961
00962         if(cmdid == kUMainWidget)
00963             continue;
00964
00965 #if qGTK
00966         if(!GTK_IS_MENU_ITEM(widget))
00967             continue;
00968 #endif
00969
00970         // first forward the command to the focused widget : if it doesn't want it
00971         // we give it to the next pseudo widget.
00972         if(sFocusWidID != -1 && sFocusWidID != GetWidID())
00973         {
00974             UCmdUI pUI(cmdid);
00975             pUI.m_widget = widget;
00976             UEventSendMessage(sFocusWidID, EV_UPDTCMD, pUI.m_nID, &pUI);
00977             if(!pUI.CanContinue())
00978                 continue;
00979         }
00980
00981         STD map<int, UCmdTarget *>::const_iterator i;
00982         for(i = targets.begin(); i != targets.end(); ++i)
00983         {
00984             int widid = (*i).first;
00985             if(widid == sFocusWidID || widid == GetWidID())
00986                 continue;
00987
00988             UCmdUI pUI(cmdid);
00989             pUI.m_widget = widget;
00990             UEventSendMessage(widid, EV_UPDTCMD, pUI.m_nID, &pUI);
00991             if(!pUI.CanContinue())
00992                 break;
00993         }
00994         if(i == targets.end())
00995         {
00996             //UAppConsole("The cmd %d of the menubar has no update handler, it's gonna be disabled\n", cmdid);
00997             UCmdUI pUI(cmdid);
00998             pUI.m_widget = widget;
00999             pUI.Enable(false);
01000         }
01001     }
01002 #endif
01003 }

Here is the call graph for this function:

const URuntimeClass * UMenu::rtUMenu ( void ) [static]

Definition at line 74 of file umenu.cpp.

Member Data Documentation

const UMSGMAP_ENTRY UMenu::_messageEntries [static, private]

Initial value:

   {
    { EV_UPDATEUI, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UMenu ::OnUpdateUI },
    { EV_CMD, epi_i, UMSG_RANGE,  0 ,  0xFFFF ,   (UPMSG)(int (UCmdTarget::*)(int cmd))& UMenu::OnCommands  },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UWidget.

Reimplemented in UMacAppMenu, and UCvsMenubar.

Definition at line 76 of file umenu.cpp.

const URuntimeClass UMenu::classUMenu [static, protected]

const UMSGMAP UMenu::messageMap = { UWidget ::GetThisMessageMap(), & UMenu ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Reimplemented in UMacAppMenu, and UCvsMenubar.

Definition at line 76 of file umenu.cpp.

The documentation for this class was generated from the following files:
  • rf/umenu.h
  • rf/umenu.cpp
Generated on Sat Aug 7 22:55:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMenu Class Reference

CMenu Class Reference

Inheritance diagram for CMenu:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJMenu.h
Generated on Sat Aug 7 22:55:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMenuItemInfo Struct Reference

CMenuItemInfo Struct Reference

#include <CJMenu.h>

Inheritance diagram for CMenuItemInfo:

[legend]
Collaboration diagram for CMenuItemInfo:

[legend]
List of all members.

Public Member Functions

CMenuItemInfo ()

Constructor & Destructor Documentation

CMenuItemInfo::CMenuItemInfo ( ) [inline]

Definition at line 72 of file CJMenu.h.

00073     { memset(this, 0, sizeof(MENUITEMINFO));
00074       cbSize = sizeof(MENUITEMINFO);
00075     }

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/CJMenu.h
Generated on Sat Aug 7 22:55:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UMessageMapFunctions Union Reference

UMessageMapFunctions Union Reference

Collaboration diagram for UMessageMapFunctions:

[legend]
List of all members.

Public Attributes

UPMSG pfn
void(UCmdTarget::* | pfnV_V )(void)
void(UCmdTarget::* | pfnV_VP )(void *)
void(UCmdTarget::* | pfnV_iVP )(int, void *)
void(UCmdTarget::* | pfnV_i )(int)
void(UCmdTarget::* | pfnV_ii )(int, int)
void(UCmdTarget::* | pfnV_iii )(int, int, int)
void(UCmdTarget::* | pfnV_iiVP )(int, int, void *)
int(UCmdTarget::* | pfni_ii )(int, int)
int(UCmdTarget::* | pfni_i )(int)
int(UCmdTarget::* | pfni_V )()
int(UCmdTarget::* | pfni_iVP )(int, void *)
int(UCmdTarget::* | pfni_VP )(void *)

Member Data Documentation

UPMSG UMessageMapFunctions::pfn

Definition at line 182 of file uevent.cpp.

Referenced by UCmdTarget::UDispatchMessage().

int(UCmdTarget::* UMessageMapFunctions::pfni_i)(int)

Referenced by UCmdTarget::UDispatchMessage().

int(UCmdTarget::* UMessageMapFunctions::pfni_ii)(int, int)

Referenced by UCmdTarget::UDispatchMessage().

int(UCmdTarget::* UMessageMapFunctions::pfni_iVP)(int, void *)

Referenced by UCmdTarget::UDispatchMessage().

int(UCmdTarget::* UMessageMapFunctions::pfni_V)()

Referenced by UCmdTarget::UDispatchMessage().

int(UCmdTarget::* UMessageMapFunctions::pfni_VP)(void *)

Referenced by UCmdTarget::UDispatchMessage().

void(UCmdTarget::* UMessageMapFunctions::pfnV_i)(int)

Referenced by UCmdTarget::UDispatchMessage().

void(UCmdTarget::* UMessageMapFunctions::pfnV_ii)(int, int)

Referenced by UCmdTarget::UDispatchMessage().

void(UCmdTarget::* UMessageMapFunctions::pfnV_iii)(int, int, int)

Referenced by UCmdTarget::UDispatchMessage().

void(UCmdTarget::* UMessageMapFunctions::pfnV_iiVP)(int, int, void *)

Referenced by UCmdTarget::UDispatchMessage().

void(UCmdTarget::* UMessageMapFunctions::pfnV_iVP)(int, void *)

Referenced by UCmdTarget::UDispatchMessage().

void(UCmdTarget::* UMessageMapFunctions::pfnV_V)(void)

Referenced by UCmdTarget::UDispatchMessage().

void(UCmdTarget::* UMessageMapFunctions::pfnV_VP)(void *)

Referenced by UCmdTarget::UDispatchMessage().

The documentation for this union was generated from the following file:
  • rf/uevent.cpp
Generated on Sat Aug 7 22:55:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMfFileDialog Class Reference

CMfFileDialog Class Reference

Multi-selection file dialog wrapper class. More...

#include <MfFileDialog.h>

Inheritance diagram for CMfFileDialog:

[legend]
Collaboration diagram for CMfFileDialog:

[legend]
List of all members.

Public Member Functions

CMfFileDialog (MultiFiles &mf, LPCTSTR lpszDefExt=NULL, LPCTSTR lpszFileName=NULL, DWORD dwFlags=OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter=NULL, CWnd *pParentWnd=NULL)
virtual int | DoModal ()
DoModal virtual override, overwrite FNERR_BUFFERTOOSMALL error and retrieve the selection.

Private Member Functions

virtual void | OnFileNameChange ()
OnFileNameChange virtual override, fill in the buffers with new selection.
POSITION | GetStartPosition () const
Hide, use the CMfFileDialog::m_mf instead.
CString | GetNextPathName (POSITION &pos) const
Hide, use the CMfFileDialog::m_mf instead.

Private Attributes

CPathBuffer m_filesBuffer
CPathBuffer m_folderBuffer
MultiFiles & m_mf

Detailed Description

Multi-selection file dialog wrapper class.

Definition at line 59 of file MfFileDialog.h.

Constructor & Destructor Documentation

CMfFileDialog::CMfFileDialog | ( | MultiFiles & | mf,
 |  | LPCTSTR | lpszDefExt = NULL,
 |  | LPCTSTR | lpszFileName = NULL,
 |  | DWORD | dwFlags = OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,
 |  | LPCTSTR | lpszFilter = NULL,
 |  | CWnd * | pParentWnd = NULL
 | ) |

Definition at line 88 of file MfFileDialog.cpp.

00089                                                              : m_mf(mf),
00090         CFileDialog(TRUE, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
00091 {
00092 }

Member Function Documentation

int CMfFileDialog::DoModal ( ) [virtual]

DoModal virtual override, overwrite FNERR_BUFFERTOOSMALL error and retrieve the selection.

Definition at line 100 of file MfFileDialog.cpp.

References CStr, getline(), and SplitPath().

00101 {
00102     m_filesBuffer.Clear();
00103     m_folderBuffer.Clear();
00104
00105     int modalResult = CFileDialog::DoModal();
00106     if( IDCANCEL == modalResult )
00107     {
00108         // Override the "buffer too small" error since we provide our own buffer
00109         if( CommDlgExtendedError() == FNERR_BUFFERTOOSMALL )
00110         {
00111             modalResult = IDOK;
00112         }
00113     }
00114
00115     if( IDOK == modalResult && m_filesBuffer.GetBuffer() && m_folderBuffer.GetBuffer() )
00116     {
00117         if( m_ofn.Flags & OFN_ALLOWMULTISELECT )
00118         {
00119             m_mf.newdir(m_folderBuffer.GetBuffer());
00120
00121             // Fill the selection
00122             string selFile;
00123             stringstream filesStream;
00124             filesStream << m_filesBuffer.GetBuffer();
00125
00126             while( getline(filesStream, selFile, '\"') )
00127             {
00128                 if( selFile.size() > 0 && !isspace(selFile.c_str()[0]) )
00129                 {
00130                     m_mf.newfile(selFile.c_str());
00131                 }
00132             }
00133         }
00134         else
00135         {
00136             CStr uppath;
00137             CStr file;
00138
00139             if( SplitPath(GetPathName(), uppath, file) )
00140             {
00141                 m_mf.newdir(uppath);
00142                 m_mf.newfile(file);
00143             }
00144         }
00145     }
00146
00147     return modalResult;
00148 }

Here is the call graph for this function:

CString CMfFileDialog::GetNextPathName ( POSITION & pos ) const [private]

Hide, use the CMfFileDialog::m_mf instead.

POSITION CMfFileDialog::GetStartPosition ( ) const [private]

Hide, use the CMfFileDialog::m_mf instead.

void CMfFileDialog::OnFileNameChange ( ) [private, virtual]

OnFileNameChange virtual override, fill in the buffers with new selection.

Definition at line 151 of file MfFileDialog.cpp.

References CPathBuffer::GetBuffer(), m_filesBuffer, m_folderBuffer, and NULL.

00152 {
00153     const CWnd* pParent = GetParent();
00154     if( pParent )
00155     {
00156         const HWND hParent = pParent->m_hWnd;
00157
00158         // Get the buffer size required
00159         const int filesBufferSize = CommDlg_OpenSave_GetSpec(hParent, NULL, 0);
00160         const int folderBufferSize = CommDlg_OpenSave_GetFolderPath(hParent, NULL, 0);
00161
00162         CommDlg_OpenSave_GetSpec(hParent, m_filesBuffer.GetBuffer(filesBufferSize), filesBufferSize);
00163         CommDlg_OpenSave_GetFolderPath(hParent, m_folderBuffer.GetBuffer(folderBufferSize), folderBufferSize);
00164     }
00165 }

Here is the call graph for this function:

Member Data Documentation

CPathBuffer CMfFileDialog::m_filesBuffer [private]

Files buffer Definition at line 77 of file MfFileDialog.h.

Referenced by OnFileNameChange().

CPathBuffer CMfFileDialog::m_folderBuffer [private]

Folder buffer Definition at line 78 of file MfFileDialog.h.

Referenced by OnFileNameChange().

MultiFiles& CMfFileDialog::m_mf [private]

Selection Definition at line 80 of file MfFileDialog.h.

The documentation for this class was generated from the following files:
  • WinCvs/MfFileDialog.h
  • WinCvs/MfFileDialog.cpp
Generated on Sat Aug 7 22:55:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMiniDockFrameWnd Class Reference

CMiniDockFrameWnd Class Reference

Inheritance diagram for CMiniDockFrameWnd:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJMiniDockFrameWnd.h
Generated on Sat Aug 7 22:55:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: mircAttrCvt Class Reference

mircAttrCvt Class Reference

#include <CTCP2Parse.hpp>

Inheritance diagram for mircAttrCvt:

[legend]
Collaboration diagram for mircAttrCvt:

[legend]
List of all members.

Public Member Functions

void | mirc2ctcp (std::string *in)

Private Member Functions

int | extractcolor (std::string *in, int start, short *fg, short *bg)

Static Private Attributes

const char | tokens [2]
const char * | mirc2ctcpmap [17]

Member Function Documentation

int mircAttrCvt::extractcolor | ( | std::string * | in,
 |  | int | start,
 |  | short * | fg,
 |  | short * | bg
 | ) | [private]

Definition at line 445 of file CTCP2Parse.cpp.

References isn, and MIRC_TRANSPARENT.

Referenced by mirc2ctcp().

00446 {
00447     int ptr = start, len = in->length(), preColor;
00448
00449     if (ptr == len) return 0;
00450
00451     if (isn(in->at(ptr)))
00452     {
00453         // there's a foreground
00454
00455         if (ptr + 1 < len && isn(in->at(ptr + 1)))
00456         {
00457             // it's 2 digits
00458             preColor = (((in->at(ptr) - '0') * 10) + (in->at(ptr + 1) - '0'));
00459             if (preColor == 99) *fg = MIRC_TRANSPARENT;
00460             else *fg = preColor % 16;
00461             ptr += 2;
00462         }
00463         else
00464         {
00465             // it's 1 digit
00466             *fg = in->at(ptr) - '0';
00467             ptr++;
00468         }
00469         if (ptr + 1 < len && in->at(ptr) == ',' && isn(in->at(ptr + 1)))
00470         {
00471             // there's a background
00472             ptr++; // the comma
00473
00474             if (ptr + 1 < len && isn(in->at(ptr + 1)))
00475             {
00476                 // it's 2 digits
00477                 preColor = (((in->at(ptr) - '0') * 10) + (in->at(ptr + 1) - '0'));
00478                 if (preColor == 99) *bg = MIRC_TRANSPARENT;
00479                 else *bg = preColor % 16;
00480                 ptr += 2;
00481             }
00482             else
00483             {
00484                 // it's 1 digit
00485                 *bg = in->at(ptr) - '0';
00486                 ptr++;
00487             }
00488         }
00489     }
00490     return (ptr - start);
00491 };

void mircAttrCvt::mirc2ctcp ( std::string * in )

Definition at line 404 of file CTCP2Parse.cpp.

References CCTCP2, extractcolor(), mirc2ctcpmap, and tokens.

Referenced by CTCP2Parse::ParseIt().

00405 {
00406     int col;
00407     char f[20];
00408     bool eqf, eqb;
00409     short oldfg, oldbg, fg = -1, bg = -1;
00410     int pos;
00411
00412     pos = in->find_first_of(tokens);
00413
00414     while (pos != std::string::npos)
00415     {
00416         oldfg = fg;
00417         oldbg = bg;
00418         col = extractcolor(in, pos+1, &fg, &bg);
00419         eqf = (oldfg == fg);
00420         eqb = (oldbg == bg);
00421
00422         if (col && (!eqf || !eqb))
00423         {
00424             // if the color hasn't changed, we insert a - which means
00425             // basically "ignore me"
00426             sprintf(f, "C%s%s",
00427                 eqf ? "-" : mirc2ctcpmap[fg],
00428                 eqb ? (eqf ? 0 : "-") : mirc2ctcpmap[bg]);
00429
00430             in->replace(pos, col+1,
00431                 std::string("") + CCTCP2 + f + CCTCP2);
00432             pos += (2 + strlen(f));   // consume the additions
00433         }
00434         else
00435         {
00436             in->replace(pos, 1, std::string("") + CCTCP2 + 'C' + CCTCP2);
00437             pos += 2;   // consume the additions
00438         }
00439         pos = in->find_first_of(tokens, pos);
00440     }
00441 };

Here is the call graph for this function:

Member Data Documentation

const char * mircAttrCvt::mirc2ctcpmap [static, private]

Initial value:

 {
    "F",
    "0",
    "1",
    "2",
    "C",
    "#7F3F3F",
    "5",
    "#FF7F00",
    "E",
    "A",
    "3",
    "B",
    "9",
    "#FF7FC0",
    "8",
    "7",
    "."
}
Definition at line 382 of file CTCP2Parse.cpp.

Referenced by mirc2ctcp().

const char mircAttrCvt::tokens [static, private]

Initial value:

 {
     (char)3 , 0
}
Definition at line 376 of file CTCP2Parse.cpp.

Referenced by mirc2ctcp().

The documentation for this class was generated from the following files:
  • common/CTCP2Parse.hpp
  • common/CTCP2Parse.cpp
Generated on Sat Aug 7 22:55:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMKeyString Class Reference

CMKeyString Class Reference

Multi-key specialization of TKeyString ('x01'). More...

#include <MultiString.h>

Inheritance diagram for CMKeyString:

[legend]
Collaboration diagram for CMKeyString:

[legend]
List of all members.

Public Member Functions

CMKeyString (unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass)
virtual | ~CMKeyString ()

Protected Member Functions

virtual int | Compare (const char *s1, const char *s2) const

Detailed Description

Multi-key specialization of TKeyString ('x01').

Definition at line 168 of file MultiString.h.

Constructor & Destructor Documentation

CMKeyString::CMKeyString | ( | unsigned int | maxstr,
 |  | const char * | uniqueName,
 |  | char *const * | defaultStr = 0L,
 |  | kClassPersistent | pclass = kNoClass
 | ) |

Definition at line 370 of file MultiString.cpp.

00372                        : TKeyString<'\x01'>(maxstr, uniqueName, defaultStr, pclass)
00373 {
00374 }

CMKeyString::~CMKeyString ( ) [virtual]

Definition at line 376 of file MultiString.cpp.

00377 {
00378 }

Member Function Documentation

int CMKeyString::Compare | ( | const char * | s1,
 |  | const char * | s2
 | ) | const [protected, virtual]

Reimplemented from TKeyString<'\x01'>.

Definition at line 380 of file MultiString.cpp.

References TMString< UStr >::Compare().

00381 {
00382     return CMString::Compare(s1, s2);
00383 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/MultiString.h
  • common/MultiString.cpp
Generated on Sat Aug 7 22:55:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMMenuString Class Reference

CMMenuString Class Reference

Menu string. More...

#include <MMenuString.h>

Inheritance diagram for CMMenuString:

[legend]
Collaboration diagram for CMMenuString:

[legend]
List of all members.

Public Member Functions

CMMenuString (unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L)
virtual | ~CMMenuString ()
virtual unsigned int | SizeOf (void) const
Get the size of the data.
virtual const void * | GetData (void) const
Get the data.
virtual void | SetData (const void *ptr, unsigned int size)
Set the data.
void | Insert (const char *newstr)
const std::vector< UStr > & | GetList (void) const
std::vector< UStr > & | GetList (void)

Protected Attributes

std::vector< UStr > | fAllStrs
CStaticAllocT< char > | fBuf
unsigned int | fMaxStr

Detailed Description

Menu string.

Definition at line 33 of file MMenuString.h.

Constructor & Destructor Documentation

CMMenuString::CMMenuString | ( | unsigned int | maxstr,
 |  | const char * | uniqueName,
 |  | char *const * | defaultStr = 0L
 | ) |

Constructor

Parameters:
maxstr | Maximum string
uniqueName | Unique name
defaultStr | NULL terminated set of strings
Definition at line 41 of file MMenuString.cpp.

References Insert(), kNoClass, and NULL.

00042     : CPersistent(uniqueName, kNoClass), fMaxStr(maxstr)
00043 {
00044     if( defaultStr != NULL )
00045     {
00046         int i = 0;
00047         while( defaultStr[i] != NULL )
00048         {
00049             Insert(defaultStr[i++]);
00050         }
00051     }
00052 }

Here is the call graph for this function:

CMMenuString::~CMMenuString ( ) [virtual]

Definition at line 54 of file MMenuString.cpp.

00055 {
00056 }

Member Function Documentation

const void * CMMenuString::GetData ( void ) const [virtual]

Get the data.

Implements CPersistent.

Definition at line 71 of file MMenuString.cpp.

References fAllStrs, fBuf, NAMESPACE, and SizeOf().

00072 {
00073     unsigned int thesize = SizeOf(), tmpsize;
00074     ((CMMenuString *)this)->fBuf.AdjustSize(thesize);
00075     char *tmp = ((CMMenuString *)this)->fBuf;
00076     *(int *)tmp = fAllStrs.size();
00077     tmp += sizeof(int) / sizeof(char);
00078
00079     NAMESPACE(std) vector<UStr>::const_iterator i;
00080     for(i = fAllStrs.begin(); i != fAllStrs.end(); ++i)
00081     {
00082         tmpsize = (*i).length() + 1;
00083         memcpy(tmp, (const char*)(*i), tmpsize * sizeof(char));
00084         tmp += tmpsize;
00085     }
00086
00087     return (char*)fBuf;
00088 }

Here is the call graph for this function:

std::vector<UStr>& CMMenuString::GetList ( void ) [inline]

Definition at line 47 of file MMenuString.h.

References fAllStrs, and CPersistent::TouchTimeStamp().

00047 { TouchTimeStamp(); return fAllStrs; }

Here is the call graph for this function:

const std::vector<UStr>& CMMenuString::GetList ( void ) const [inline]

Definition at line 46 of file MMenuString.h.

References fAllStrs.

Referenced by GetCustomMenu(), CCustomizeMenus::OnInitDialog(), and CCustomizeMenus::OnOK().

00046 { return fAllStrs; }

void CMMenuString::Insert ( const char * newstr )

Definition at line 104 of file MMenuString.cpp.

References fAllStrs, and CPersistent::TouchTimeStamp().

Referenced by CMMenuString().

00105 {
00106     TouchTimeStamp();
00107     fAllStrs.push_back(UStr(newstr));
00108 }

Here is the call graph for this function:

void CMMenuString::SetData | ( | const void * | ptr,
 |  | unsigned int | size
 | ) | [virtual]

Set the data.

Implements CPersistent.

Definition at line 90 of file MMenuString.cpp.

References fAllStrs, and fMaxStr.

00091 {
00092     const char* tmp = (char *)ptr;
00093     unsigned int thesize;
00094     fAllStrs.erase(fAllStrs.begin(), fAllStrs.end());
00095     thesize = *(int *)tmp;
00096     tmp += sizeof(int) / sizeof(char);
00097     for(unsigned int i = 0; i < thesize && i < fMaxStr; i++)
00098     {
00099         fAllStrs.push_back(UStr(tmp));
00100         tmp += strlen(tmp) + 1;
00101     }
00102 }

unsigned int CMMenuString::SizeOf ( void ) const [virtual]

Get the size of the data.

Implements CPersistent.

Definition at line 58 of file MMenuString.cpp.

References fAllStrs, and NAMESPACE.

Referenced by GetData().

00059 {
00060     NAMESPACE(std) vector<UStr>::const_iterator i;
00061     unsigned int thesize = sizeof(int);
00062
00063     for(i = fAllStrs.begin(); i != fAllStrs.end(); ++i)
00064     {
00065         thesize += (*i).length() + 1;
00066     }
00067
00068     return thesize;
00069 }

Member Data Documentation

std::vector<UStr> CMMenuString::fAllStrs [protected]

Definition at line 51 of file MMenuString.h.

Referenced by GetData(), GetList(), Insert(), SetData(), and SizeOf().

CStaticAllocT<char> CMMenuString::fBuf [protected]

Definition at line 52 of file MMenuString.h.

Referenced by GetData().

unsigned int CMMenuString::fMaxStr [protected]

Definition at line 53 of file MMenuString.h.

Referenced by SetData().

The documentation for this class was generated from the following files:
  • WinCvs/MMenuString.h
  • WinCvs/MMenuString.cpp
Generated on Sat Aug 7 22:55:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CModuleParserConsole Class Reference

CModuleParserConsole Class Reference

Class to parse modules (obtained using cvs co -c). More...

#include <ItemListDlg.h>

Inheritance diagram for CModuleParserConsole:

[legend]
Collaboration diagram for CModuleParserConsole:

[legend]
List of all members.

Public Member Functions

CModuleParserConsole ()
virtual | ~CModuleParserConsole ()
virtual void | Parse (int launchRes)

Private Member Functions

void | Normalize ()
bool | NeedsNormalize () const

Detailed Description

Class to parse modules (obtained using cvs co -c).

Definition at line 127 of file ItemListDlg.h.

Constructor & Destructor Documentation

CModuleParserConsole::CModuleParserConsole ( )

Definition at line 249 of file ItemListDlg.cpp.

00250 {
00251 }

CModuleParserConsole::~CModuleParserConsole ( ) [virtual]

Definition at line 253 of file ItemListDlg.cpp.

00254 {
00255 }

Member Function Documentation

bool CModuleParserConsole::NeedsNormalize ( ) const [private]

Check whether the modules list needs to be normalized before parsing

Returns:
true if normalization is needed, false otherwise
Definition at line 261 of file ItemListDlg.cpp.

References getline().

Referenced by Parse().

00262 {
00263     bool res = false;
00264
00265     stringstream strCvsOut(m_cvsOut.str());
00266     string line;
00267     while( getline(strCvsOut, line) )
00268     {
00269         if( !line.empty() && isspace(line.c_str()[0]) )
00270         {
00271             res = true;
00272             break;
00273         }
00274     }
00275
00276     return res;
00277 }

Here is the call graph for this function:

void CModuleParserConsole::Normalize ( ) [private]

Normalize modules list output

Note:
We need to normalize modules list because for a very long lines CVS breaks the output
Definition at line 283 of file ItemListDlg.cpp.

References getline().

Referenced by Parse().

00284 {
00285     string cvsOut;
00286
00287     string line;
00288     string partialLine;
00289
00290     while( getline(m_cvsOut, line) )
00291     {
00292         if( !line.empty() )
00293         {
00294             if( isspace(line.c_str()[0]) )
00295             {
00296                 partialLine += " " + line.erase(0, line.find_first_not_of(" "));
00297             }
00298             else
00299             {
00300                 if( !cvsOut.empty() )
00301                 {
00302                     cvsOut += "\n";
00303                 }
00304
00305                 cvsOut += partialLine;
00306                 partialLine = line;
00307             }
00308         }
00309     }
00310
00311     if( !cvsOut.empty() )
00312     {
00313         cvsOut += "\n";
00314     }
00315
00316     cvsOut += partialLine;
00317
00318     m_cvsOut.clear();
00319     m_cvsOut << cvsOut;
00320 }

Here is the call graph for this function:

void CModuleParserConsole::Parse ( int launchRes ) [virtual]

Virtual overridable to parse the result of browse command

Parameters:
launchRes The result of the command launch
Note:
Call default implementation after parsing is finished to clear the stored command output and store the launch result, the error output is not cleared however to allow further analysis

Implements CItemListConsole.

Definition at line 322 of file ItemListDlg.cpp.

References getline(), ItemRowInfo::m_description, ItemRowInfo::m_descriptionEx, NeedsNormalize(), Normalize(), and CItemListConsole::Parse().

00323 {
00324     if( NeedsNormalize() )
00325     {
00326         Normalize();
00327     }
00328
00329     string line;
00330
00331     while( getline(m_cvsOut, line) )
00332     {
00333         if( !line.empty() && !isspace(line.c_str()[0]) )
00334         {
00335             stringstream stream;
00336             string module;
00337
00338             stream << line;
00339             stream >> module;
00340
00341             if( !module.empty() )
00342             {
00343                 ItemRowInfo rowInfo;
00344
00345                 string definition = line;
00346                 definition.erase(definition.begin(), definition.begin() + module.size());
00347
00348                 while( !definition.empty() && isspace(definition[0]) )
00349                 {
00350                     definition.erase(definition.begin(), definition.begin() + 1);
00351                 }
00352
00353                 if( !definition.empty() )
00354                 {
00355                     stringstream strDefintion;
00356                     string options;
00357                     string directories;
00358                     string token;
00359
00360                     strDefintion << definition;
00361
00362                     bool hasProg = false;
00363
00364                     do{
00365                         strDefintion >> token;
00366                         if( !token.empty() )
00367                         {
00368                             if( directories.empty() )
00369                             {
00370                                 if( options.empty() )
00371                                 {
00372                                     if( token[0] != '-' )
00373                                     {
00374                                         directories += token;
00375                                         continue;
00376                                     }
00377                                 }
00378
00379                                 if( token[0] == '-' || hasProg )
00380                                 {
00381                                     if( !options.empty() )
00382                                     {
00383                                         options += " ";
00384                                     }
00385
00386                                     options += token;
00387
00388                                     if( hasProg )
00389                                     {
00390                                         hasProg = false;
00391                                     }
00392                                     else if( token == "-d" ||
00393                                         token == "-e" ||
00394                                         token == "-i" ||
00395                                         token == "-o" ||
00396                                         token == "-s" ||
00397                                         token == "-t" ||
00398                                         token == "-u" )
00399                                     {
00400                                         hasProg = true;
00401                                     }
00402                                 }
00403                                 else
00404                                 {
00405                                     directories += token;
00406                                 }
00407                             }
00408                             else
00409                             {
00410                                 directories += " ";
00411                                 directories += token;
00412                             }
00413                         }
00414                     }while( !strDefintion.eof());
00415
00416                     rowInfo.m_description.insert(options.c_str());
00417                     rowInfo.m_descriptionEx.insert(directories.c_str());
00418                 }
00419
00420                 m_itemList.insert(std::make_pair(module, rowInfo));
00421             }
00422         }
00423     }
00424
00425     CItemListConsole::Parse(launchRes);
00426 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/ItemListDlg.h
  • common/ItemListDlg.cpp
Generated on Sat Aug 7 22:55:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMPString Class Reference

CMPString Class Reference

CPStr specialization of TMString. More...

#include <MultiString.h>

Inheritance diagram for CMPString:

[legend]
Collaboration diagram for CMPString:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
CMPString (unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass)
virtual | ~CMPString ()

Static Public Member Functions

const URuntimeClass * | rtCMPString (void)

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()

Static Protected Attributes

const URuntimeClass | classCMPString

Detailed Description

CPStr specialization of TMString.

Definition at line 122 of file MultiString.h.

Constructor & Destructor Documentation

CMPString::CMPString | ( | unsigned int | maxstr,
 |  | const char * | uniqueName,
 |  | char *const * | defaultStr = 0L,
 |  | kClassPersistent | pclass = kNoClass
 | ) |

Definition at line 246 of file MultiString.cpp.

References CPStr.

00248     : TMString<CPStr>(maxstr, uniqueName, defaultStr, pclass)
00249 {
00250 }

CMPString::~CMPString ( ) [virtual]

Definition at line 252 of file MultiString.cpp.

00253 {
00254 }

Member Function Documentation

const URuntimeClass * CMPString::_GetBaseClass ( ) [static, protected]

Reimplemented from CPersistent.

Definition at line 43 of file MultiString.cpp.

00047 {

const URuntimeClass * CMPString::GetRuntimeClass ( ) const [virtual]

Reimplemented from CPersistent.

Definition at line 43 of file MultiString.cpp.

00047 {

const URuntimeClass * CMPString::rtCMPString ( void ) [static]

Definition at line 43 of file MultiString.cpp.

References UStr::empty(), EV_COMBO_APPEND, EV_COMBO_RESETALL, EV_GETTEXT, NAMESPACE, and UEventSendMessage().

00047 {

Here is the call graph for this function:

Member Data Documentation

const URuntimeClass CMPString::classCMPString [static, protected]

The documentation for this class was generated from the following files:
  • common/MultiString.h
  • common/MultiString.cpp
Generated on Sat Aug 7 22:55:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMsg Class Reference

CMsg Class Reference

Collaboration diagram for CMsg:

[legend]
List of all members.

Public Member Functions

CMsg (int wid, int ev, int arg1, void *arg2)
CMsg ()
CMsg (const CMsg &msg)
CMsg & | operator= (const CMsg &msg)

Public Attributes

int m_wid
int m_ev
int m_arg1
void * | m_arg2

Constructor & Destructor Documentation

CMsg::CMsg | ( | int | wid,
 |  | int | ev,
 |  | int | arg1,
 |  | void * | arg2
 | ) | [inline]

Definition at line 150 of file uevent.cpp.

00150                                                 : m_wid(wid), m_ev(ev), m_arg1(arg1), m_arg2(arg2)
00151     {
00152     }

CMsg::CMsg ( ) [inline]

Definition at line 154 of file uevent.cpp.

00154            : m_wid(0), m_ev(0), m_arg1(0), m_arg2(0L)
00155     {
00156     }

CMsg::CMsg ( const CMsg & msg ) [inline]

Definition at line 158 of file uevent.cpp.

00158                            : m_wid(0), m_ev(0), m_arg1(0), m_arg2(0L)
00159     {
00160         *this = msg;
00161     }

Member Function Documentation

CMsg& CMsg::operator= ( const CMsg & msg ) [inline]

Definition at line 163 of file uevent.cpp.

References m_arg1, m_arg2, m_ev, and m_wid.

00164     {
00165         m_wid = msg.m_wid;
00166         m_ev = msg.m_ev;
00167         m_arg1 = msg.m_arg1;
00168         m_arg2 = msg.m_arg2;
00169
00170         return *this;
00171     }

Member Data Documentation

int CMsg::m_arg1

Definition at line 173 of file uevent.cpp.

Referenced by operator=(), and UEventGiveTime().

void* CMsg::m_arg2

Definition at line 174 of file uevent.cpp.

Referenced by operator=(), and UEventGiveTime().

int CMsg::m_ev

Definition at line 173 of file uevent.cpp.

Referenced by operator=(), and UEventGiveTime().

int CMsg::m_wid

Definition at line 173 of file uevent.cpp.

Referenced by operator=(), and UEventGiveTime().

The documentation for this class was generated from the following file:
  • rf/uevent.cpp
Generated on Sat Aug 7 22:55:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UMSGMAP Struct Reference

UMSGMAP Struct Reference

#include <umain.h>

Collaboration diagram for UMSGMAP:

[legend]
List of all members.

Public Attributes

const UMSGMAP * | pBaseMap
const UMSGMAP_ENTRY * | lpEntries

Member Data Documentation

const UMSGMAP_ENTRY* UMSGMAP::lpEntries

Definition at line 690 of file umain.h.

Referenced by UCmdTarget::UDispatchMessage().

const UMSGMAP* UMSGMAP::pBaseMap

Definition at line 689 of file umain.h.

Referenced by UCmdTarget::UDispatchMessage().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:55:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UMSGMAP_ENTRY Struct Reference

UMSGMAP_ENTRY Struct Reference

#include <umain.h>

Collaboration diagram for UMSGMAP_ENTRY:

[legend]
List of all members.

Public Attributes

int nMessage
UEventParam nSig
UMSG_EXT ext
int ext1
int ext2
UPMSG pfn

Member Data Documentation

UMSG_EXT UMSGMAP_ENTRY::ext

Definition at line 681 of file umain.h.

Referenced by UCmdTarget::UDispatchMessage().

int UMSGMAP_ENTRY::ext1

Definition at line 682 of file umain.h.

Referenced by UCmdTarget::UDispatchMessage().

int UMSGMAP_ENTRY::ext2

Definition at line 683 of file umain.h.

Referenced by UCmdTarget::UDispatchMessage().

int UMSGMAP_ENTRY::nMessage

Definition at line 679 of file umain.h.

Referenced by UCmdTarget::UDispatchMessage().

UEventParam UMSGMAP_ENTRY::nSig

Definition at line 680 of file umain.h.

Referenced by UCmdTarget::UDispatchMessage().

UPMSG UMSGMAP_ENTRY::pfn

Definition at line 684 of file umain.h.

Referenced by UCmdTarget::UDispatchMessage().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:55:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMString Class Reference

CMString Class Reference

CStr specialization of TMString. More...

#include <MultiString.h>

Inheritance diagram for CMString:

[legend]
Collaboration diagram for CMString:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
CMString (unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass)
virtual | ~CMString ()

Static Public Member Functions

const URuntimeClass * | rtCMString (void)

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()

Static Protected Attributes

const URuntimeClass | classCMString

Detailed Description

CStr specialization of TMString.

Definition at line 110 of file MultiString.h.

Constructor & Destructor Documentation

CMString::CMString | ( | unsigned int | maxstr,
 |  | const char * | uniqueName,
 |  | char *const * | defaultStr = 0L,
 |  | kClassPersistent | pclass = kNoClass
 | ) |

Definition at line 233 of file MultiString.cpp.

References CStr.

00235          : TMString<CStr>(maxstr, uniqueName, defaultStr, pclass)
00236 {
00237 }

CMString::~CMString ( ) [virtual]

Definition at line 239 of file MultiString.cpp.

00240 {
00241 }

Member Function Documentation

const URuntimeClass * CMString::_GetBaseClass ( ) [static, protected]

Reimplemented from CPersistent.

Definition at line 42 of file MultiString.cpp.

00047 {

const URuntimeClass * CMString::GetRuntimeClass ( ) const [virtual]

Reimplemented from CPersistent.

Definition at line 42 of file MultiString.cpp.

00047 {

const URuntimeClass * CMString::rtCMString ( void ) [static]

Definition at line 42 of file MultiString.cpp.

00047 {

Member Data Documentation

const URuntimeClass CMString::classCMString [static, protected]

The documentation for this class was generated from the following files:
  • common/MultiString.h
  • common/MultiString.cpp
Generated on Sat Aug 7 22:55:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: MultiFiles Class Reference

MultiFiles Class Reference

Store multiple files by directory. More...

#include <MultiFiles.h>

Collaboration diagram for MultiFiles:

[legend]
List of all members.

Public Types

typedef std::vector< MultiFilesEntry
>::const_iterator 		const_iterator

Public Member Functions

MultiFiles ()
void | newdir (const char *dir)
Add a new directory.
void | newfile (const char *file, const FSSpec *spec=0L, const char *currRevision=0L)
Add a new file to the current directory.
const_iterator | begin () const
const_iterator | end () const
bool | getdir (int index, UStr &path) const
Get the directory at the specified index, return false if failed.
int | NumDirs (void) const
int | TotalNumFiles (void) const
Get the total number of files.
void | reset ()
Reset for reuse.
bool Normalize ()
Adjust the file list so that we end up with a list that contains no file entries with partial path names.

Protected Attributes

std::vector< MultiFilesEntry > | dirs

Detailed Description

Store multiple files by directory.

Definition at line 90 of file MultiFiles.h.

Member Typedef Documentation

typedef std::vector<MultiFilesEntry>::const_iterator MultiFiles::const_iterator

Definition at line 98 of file MultiFiles.h.

Referenced by begin(), BrowserGetMultiFiles(), CAnnotate_MAIN::CAnnotate_MAIN(), CDiff_MAIN::CDiff_MAIN(), CompatGetCommit(), CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdFileAction(), CvsCmdImportModule(), CvsCmdLaunch(), CvsCmdLock(), CvsCmdLog(), CvsCmdMoveToTrash(), CvsCmdRemove(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), CSelectionDetailsDlg::DisplaySelection(), end(), MultiFilesEntryIndex::GetIterator(), MultiFilesEntryIndex::MultiFilesEntryIndex(), Normalize(), CItemListDlg::OnInitDialog(), CCommit_MAIN::OnInitDialog(), and TotalNumFiles().

Constructor & Destructor Documentation

MultiFiles::MultiFiles ( )

Definition at line 146 of file MultiFiles.cpp.

00147 {
00148 }

Member Function Documentation

const_iterator MultiFiles::begin ( ) const [inline]

Definition at line 100 of file MultiFiles.h.

References const_iterator, and dirs.

Referenced by BrowseForFile(), BrowserGetMultiFiles(), CompatGetCommit(), CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdFileAction(), CvsCmdImportModule(), CvsCmdLaunch(), CvsCmdLock(), CvsCmdLog(), CvsCmdMoveToTrash(), CvsCmdRemove(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), CSelectionDetailsDlg::DisplaySelection(), LaunchItemListCommand(), and CCommit_MAIN::OnInitDialog().

00100 { return dirs.begin(); }

const_iterator MultiFiles::end ( ) const [inline]

Definition at line 101 of file MultiFiles.h.

References const_iterator, and dirs.

Referenced by BrowserGetMultiFiles(), CompatGetCommit(), CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdFileAction(), CvsCmdImportModule(), CvsCmdLaunch(), CvsCmdLock(), CvsCmdLog(), CvsCmdMoveToTrash(), CvsCmdRemove(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), CSelectionDetailsDlg::DisplaySelection(), and CCommit_MAIN::OnInitDialog().

00101 { return dirs.end(); }

bool MultiFiles::getdir | ( | int | index,
 |  | UStr & | path
 | ) | const

Get the directory at the specified index, return false if failed.

Definition at line 168 of file MultiFiles.cpp.

References MultiFilesEntry::dir, and dirs.

Referenced by CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetRtag(), CvsCmdRelease(), and CSelectionDetailsDlg::DisplaySelection().

00169 {
00170     if( index < 0 || index >= (int)dirs.size() )
00171         return false;
00172
00173     const MultiFilesEntry& entry = dirs[index];
00174
00175     path = entry.dir;
00176
00177     return true;
00178 }

void MultiFiles::newdir ( const char * dir )

Add a new directory.

Definition at line 151 of file MultiFiles.cpp.

References dirs.

Referenced by BrowseForFile(), BrowserGetMultiFiles(), CompatGetCommit(), CGraphView::FileAction(), KiSelectionHandler::GetSelection(), LaunchItemListCommand(), Normalize(), CGraphView::OnAnnotate(), CCommit_MAIN::OnDiff(), KiSelectionHandler::OnFolder(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDiff(), CBrowseFileView::ProcessSelectionCommand(), and UCvsFiles::ProcessSelectionCommand().

00152 {
00153     MultiFilesEntry entry(dir);
00154     dirs.push_back(dir);
00155 }

void MultiFiles::newfile | ( | const char * | file,
 |  | const FSSpec * | spec = 0L,
 |  | const char * | currRevision = 0L
 | ) |

Add a new file to the current directory.

Definition at line 158 of file MultiFiles.cpp.

References MultiFilesEntry::add(), and dirs.

Referenced by BrowseForFile(), BrowserGetMultiFiles(), CompatGetCommit(), CGraphView::FileAction(), LaunchItemListCommand(), Normalize(), CGraphView::OnAnnotate(), CCommit_MAIN::OnDiff(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDiff(), CBrowseFileView::ProcessSelectionCommand(), and UCvsFiles::ProcessSelectionCommand().

00159 {
00160     if( dirs.size() == 0 )
00161         return;
00162
00163     MultiFilesEntry& entry = dirs[dirs.size() - 1];
00164     entry.add(file, spec, currRevision);
00165 }

Here is the call graph for this function:

bool MultiFiles::Normalize ( )

Adjust the file list so that we end up with a list that contains no file entries with partial path names.

Definition at line 231 of file MultiFiles.cpp.

References const_iterator, CStr, dirs, newdir(), newfile(), and split().

Referenced by CheckSelectionHandler().

00232 {
00233     std::vector<MultiFilesEntry>    workingCopy(dirs);
00234     dirs.clear();
00235
00236     for ( std::vector<MultiFilesEntry>::const_iterator i(workingCopy.begin()); i != workingCopy.end(); ++i )
00237       if ( i->files.empty() )
00238       {
00239         // special case for empty directories in MultiFiles:
00240         // just add the directory to our directory list
00241         //
00242             std::vector<MultiFilesEntry>::iterator      found;
00243             found = std::find_if(dirs.begin(), dirs.end(), match_dir(i->dir));
00244             if ( found == dirs.end() )
00245             {
00246                 // directory not found in list -> create new directory
00247                 this->newdir(i->dir);
00248             }
00249       }
00250         else for ( std::vector<FileEntry>::const_iterator j(i->files.begin()); j != i->files.end(); j++ )
00251         {
00252             // split into partial path and name
00253             //
00254             CStr        fullDirPath, dir, name;
00255             if ( split(j->file, dir, name) )
00256             {
00257                 // insert current directory path in front of partial path
00258                 //
00259                 fullDirPath = i->dir;
00260                 if ( !i->dir.endsWith(kPathDelimiter) )
00261                     fullDirPath << kPathDelimiter;
00262                 fullDirPath << dir;
00263             }
00264             else fullDirPath = i->dir; // file does not have a partial path
00265
00266             std::vector<MultiFilesEntry>::iterator      found;
00267             found = std::find_if(dirs.begin(), dirs.end(), match_dir(fullDirPath));
00268             if ( found != dirs.end() )
00269             {
00270                 // directory already in list -> just append the new file entry
00271                 found->add(name, &j->spec, j->currRev);
00272             }
00273             else
00274             {
00275                 // directory not found in list -> create new directory and append the file to the new directory
00276                 this->newdir(fullDirPath);
00277                 this->newfile(name, &j->spec, j->currRev);
00278             }
00279         }
00280
00281     return true;
00282 }

Here is the call graph for this function:

int MultiFiles::NumDirs ( void ) const [inline]

Definition at line 105 of file MultiFiles.h.

References dirs.

Referenced by BrowserGetMultiFiles(), CompatGetCommand(), CompatGetCommit(), CompatGetRtag(), and CSelectionDetailsDlg::DisplaySelection().

00105 { return dirs.size(); }

void MultiFiles::reset ( )

Reset for reuse.

Definition at line 181 of file MultiFiles.cpp.

References dirs.

Referenced by BrowserGetMultiFiles().

00182 {
00183     dirs.erase(dirs.begin(), dirs.end());
00184 }

int MultiFiles::TotalNumFiles ( void ) const

Get the total number of files.

Definition at line 187 of file MultiFiles.cpp.

References const_iterator, and dirs.

Referenced by BrowserGetMultiFiles(), CompatGetCommit(), CvsCmdAnnotate(), CvsCmdDiff(), CSelectionDetailsDlg::DisplaySelection(), CDiff_MAIN::OnInitDialog(), CCommit_MAIN::OnInitDialog(), CBrowseFileView::ProcessSelectionCommand(), and UCvsFiles::ProcessSelectionCommand().

00188 {
00189     int total = 0;
00190
00191     std::vector<MultiFilesEntry>::const_iterator i;
00192     for(i = dirs.begin(); i != dirs.end(); ++i)
00193     {
00194         total += i->NumFiles();
00195     }
00196
00197     return total;
00198 }

Member Data Documentation

std::vector<MultiFilesEntry> MultiFiles::dirs [protected]

Definition at line 113 of file MultiFiles.h.

Referenced by begin(), end(), getdir(), newdir(), newfile(), Normalize(), NumDirs(), reset(), and TotalNumFiles().

The documentation for this class was generated from the following files:
  • common/MultiFiles.h
  • common/MultiFiles.cpp
Generated on Sat Aug 7 22:55:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: MultiFilesEntry Class Reference

MultiFilesEntry Class Reference

Used internally. More...

#include <MultiFiles.h>

Collaboration diagram for MultiFilesEntry:

[legend]
List of all members.

Public Member Functions

MultiFilesEntry ()
MultiFilesEntry (const char *path)
MultiFilesEntry (const MultiFilesEntry &entries)
MultiFilesEntry & | operator= (const MultiFilesEntry &entries)
void | setdir (const char *newdir)
Set the directory.
void | add (const char *file, const FSSpec *spec=0L, const char *currRevision=0L)
Add file.
bool | get (int index, UStr &path, UStr &fileName, UStr &currRev) const
Get the file in the current directory, return false if failed.
int | NumFiles (void) const
Get the number of files in the current dir.
const char * | getdir () const
Get the current directory.
const char * | add (CvsArgs &args) const
Fill up the arguments with all the files.

Protected Attributes

UStr dir
std::vector< FileEntry > | files

Detailed Description

Used internally.

Definition at line 59 of file MultiFiles.h.

Constructor & Destructor Documentation

MultiFilesEntry::MultiFilesEntry ( )

Definition at line 84 of file MultiFiles.cpp.

00085 {
00086 }

MultiFilesEntry::MultiFilesEntry ( const char * path )

Definition at line 88 of file MultiFiles.cpp.

References dir.

00089 {
00090     dir = path;
00091 }

MultiFilesEntry::MultiFilesEntry ( const MultiFilesEntry & entries )

Definition at line 93 of file MultiFiles.cpp.

00094 {
00095     *this = entries;
00096 }

Member Function Documentation

const char * MultiFilesEntry::add ( CvsArgs & args ) const

Fill up the arguments with all the files.

Definition at line 132 of file MultiFiles.cpp.

References CvsArgs::addfile(), dir, and files.

00133 {
00134     std::vector<FileEntry>::const_iterator i;
00135     for(i = files.begin(); i != files.end(); ++i)
00136     {
00137         args.addfile((*i).file, dir, &(*i).spec, (*i).currRev);
00138     }
00139
00140     return dir;
00141 }

Here is the call graph for this function:

void MultiFilesEntry::add | ( | const char * | file,
 |  | const FSSpec * | spec = 0L,
 |  | const char * | currRevision = 0L
 | ) |

Add file.

Definition at line 112 of file MultiFiles.cpp.

References files.

Referenced by MultiFiles::newfile().

00113 {
00114     FileEntry entry(file, spec, currRevision);
00115     files.push_back(entry);
00116 }

bool MultiFilesEntry::get | ( | int | index,
 |  | UStr & | path,
 |  | UStr & | fileName,
 |  | UStr & | currRev
 | ) | const

Get the file in the current directory, return false if failed.

Definition at line 119 of file MultiFiles.cpp.

References dir, and files.

Referenced by CvsCmdAnnotate(), and CvsCmdDiff().

00120 {
00121     if( index < 0 || (size_t)index >= files.size() )
00122         return false;
00123
00124     path = dir;
00125     fileName = files[index].file;
00126     currRev = files[index].currRev;
00127
00128     return true;
00129 }

const char* MultiFilesEntry::getdir ( ) const [inline]

Get the current directory.

Definition at line 77 of file MultiFiles.h.

References dir.

Referenced by match_dir::operator()().

00077 { return dir; }

int MultiFilesEntry::NumFiles ( void ) const [inline]

Get the number of files in the current dir.

Definition at line 74 of file MultiFiles.h.

References files.

Referenced by CvsCmdAnnotate(), and CvsCmdDiff().

00074 { return files.size(); }

MultiFilesEntry & MultiFilesEntry::operator= ( const MultiFilesEntry & entries )

Definition at line 98 of file MultiFiles.cpp.

References dir, and files.

00099 {
00100     dir = entries.dir;
00101     files = entries.files;
00102     return *this;
00103 }

void MultiFilesEntry::setdir ( const char * newdir )

Set the directory.

Definition at line 106 of file MultiFiles.cpp.

References dir.

00107 {
00108     dir = newdir;
00109 }

Member Data Documentation

UStr MultiFilesEntry::dir [protected]

Definition at line 83 of file MultiFiles.h.

Referenced by add(), get(), getdir(), MultiFiles::getdir(), MultiFilesEntry(), operator=(), and setdir().

std::vector<FileEntry> MultiFilesEntry::files [protected]

Definition at line 84 of file MultiFiles.h.

Referenced by add(), get(), NumFiles(), and operator=().

The documentation for this class was generated from the following files:
  • common/MultiFiles.h
  • common/MultiFiles.cpp
Generated on Sat Aug 7 22:55:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: MultiFilesEntryIndex Class Reference

MultiFilesEntryIndex Class Reference

A pair of MultiFiles::const_iterator and index allowing to identify the FileEntry. More...

#include <MultiFiles.h>

Collaboration diagram for MultiFilesEntryIndex:

[legend]
List of all members.

Public Member Functions

MultiFilesEntryIndex (int index, MultiFiles::const_iterator mfi)
int | GetIndex () const
MultiFiles::const_iterator | GetIterator () const

Private Attributes

int m_index
MultiFiles::const_iterator m_mfi

Detailed Description

A pair of MultiFiles::const_iterator and index allowing to identify the FileEntry.

Definition at line 117 of file MultiFiles.h.

Constructor & Destructor Documentation

MultiFilesEntryIndex::MultiFilesEntryIndex | ( | int | index,
 |  | MultiFiles::const_iterator | mfi
 | ) | [inline]

Definition at line 120 of file MultiFiles.h.

References MultiFiles::const_iterator.

00121         : m_index(index), m_mfi(mfi)
00122     {
00123     }

Member Function Documentation

int MultiFilesEntryIndex::GetIndex ( ) const [inline]

Definition at line 125 of file MultiFiles.h.

Referenced by CCommit_MAIN::OnDiff().

00125 { return m_index; }

MultiFiles::const_iterator MultiFilesEntryIndex::GetIterator ( ) const [inline]

Definition at line 126 of file MultiFiles.h.

References MultiFiles::const_iterator.

Referenced by CCommit_MAIN::OnDiff().

00126 { return m_mfi; }

Member Data Documentation

int MultiFilesEntryIndex::m_index [private]

Definition at line 129 of file MultiFiles.h.

MultiFiles::const_iterator MultiFilesEntryIndex::m_mfi [private]

Definition at line 130 of file MultiFiles.h.

The documentation for this class was generated from the following file:
  • common/MultiFiles.h
Generated on Sat Aug 7 22:55:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMultiLineEditDialogKeyHelper Class Reference

CMultiLineEditDialogKeyHelper Class Reference

Helper class to process dialog messages for dialogs containing multi-line edit control. More...

#include <MultilineEntryDlg.h>

Collaboration diagram for CMultiLineEditDialogKeyHelper:

[legend]
List of all members.

Public Member Functions

CMultiLineEditDialogKeyHelper ()
void | Create (const ctrlPressedOnOK, CDialog *pDlg, const HWND hParentDlg=NULL)
BOOL | RelayEvent (const MSG *pMsg)
const char * | FormatLineBreakHint () const

Private Attributes

CDialog * m_pDlg
HWND | m_hParentDlg
BOOL | m_ctrlPressedOnOK

Detailed Description

Helper class to process dialog messages for dialogs containing multi-line edit control.

Definition at line 61 of file MultilineEntryDlg.h.

Constructor & Destructor Documentation

CMultiLineEditDialogKeyHelper::CMultiLineEditDialogKeyHelper ( )

Definition at line 57 of file MultilineEntryDlg.cpp.

References NULL.

00058     : m_pDlg(NULL), m_hParentDlg(NULL), m_ctrlPressedOnOK(FALSE)
00059 {
00060 }

Member Function Documentation

void CMultiLineEditDialogKeyHelper::Create | ( | const | ctrlPressedOnOK,
 |  | CDialog * | pDlg,
 |  | const HWND | hParentDlg = NULL
 | ) |

Set the dialog to process the messages for

Parameters:
ctrlPressedOnOK | Ctrl key flag
pDlg | Dialog
hParentDlg | Dialog's parent handle
Definition at line 68 of file MultilineEntryDlg.cpp.

References m_ctrlPressedOnOK, m_hParentDlg, and m_pDlg.

Referenced by CMultilineEntryDlg::OnInitDialog().

00069 {
00070     m_ctrlPressedOnOK = ctrlPressedOnOK;
00071
00072     m_pDlg = pDlg;
00073     m_hParentDlg = hParentDlg;
00074 }

const char * CMultiLineEditDialogKeyHelper::FormatLineBreakHint ( ) const

Format line break hint message

Returns:
Formatted line break hint
Definition at line 159 of file MultilineEntryDlg.cpp.

References m_ctrlPressedOnOK.

Referenced by CMultilineEntryDlg::SetEntryDescription().

00160 {
00161     return m_ctrlPressedOnOK ? "Enter for line break, Ctrl+Enter to confirm dialog" : "Ctrl+Enter for line break, Enter to confirm dialog";
00162 }

BOOL CMultiLineEditDialogKeyHelper::RelayEvent ( const MSG * pMsg )

Process the message

Parameters:
pMsg Message
Returns:
TRUE if the message was processed, FALSE otherwise
Definition at line 81 of file MultilineEntryDlg.cpp.

References m_ctrlPressedOnOK, m_hParentDlg, and m_pDlg.

Referenced by CMultilineEntryDlg::PreTranslateMessage().

00082 {
00083     BOOL res = FALSE;
00084
00085     if( pMsg->message == WM_KEYDOWN )
00086     {
00087         switch( (int)pMsg->wParam )
00088         {
00089         case VK_ESCAPE:
00090             {
00091                 if( m_pDlg )
00092                 {
00093                     m_pDlg->EndDialog(IDCANCEL);
00094                     res = TRUE;
00095                 }
00096
00097                 if( m_hParentDlg )
00098                 {
00099                     CDialog* pDialog = (CDialog*)CWnd::FromHandle(m_hParentDlg);
00100                     if( pDialog )
00101                     {
00102                         pDialog->EndDialog(IDCANCEL);
00103                         res = TRUE;
00104                     }
00105                 }
00106
00107             }
00108             break;
00109         case VK_RETURN:
00110             {
00111                 const BOOL ctrlKeyPressed = ::GetKeyState(VK_CONTROL) < 0;
00112
00113                 if( !m_ctrlPressedOnOK && !ctrlKeyPressed ||
00114                     m_ctrlPressedOnOK && ctrlKeyPressed )
00115                 {
00116                     if( m_pDlg )
00117                     {
00118                         res = TRUE;
00119
00120                         if( m_pDlg->UpdateData() )
00121                         {
00122                             m_pDlg->EndDialog(IDOK);
00123                         }
00124                         else
00125                         {
00126                             break;
00127                         }
00128                     }
00129
00130                     if( m_hParentDlg )
00131                     {
00132                         CDialog* pDialog = (CDialog*)CWnd::FromHandle(m_hParentDlg);
00133                         if( pDialog )
00134                         {
00135                             if( pDialog->UpdateData() )
00136                             {
00137                                 pDialog->EndDialog(IDOK);
00138                             }
00139
00140                             res = TRUE;
00141                         }
00142                     }
00143                 }
00144             }
00145             break;
00146         default:
00147             // Nothing to do
00148             break;
00149         }
00150     }
00151
00152     return res;
00153 }

Member Data Documentation

BOOL CMultiLineEditDialogKeyHelper::m_ctrlPressedOnOK [private]

Ctrl key flag: TRUE to confirm the dialog when Ctrl key is pressed, FALSE otherwise Definition at line 72 of file MultilineEntryDlg.h.

Referenced by Create(), FormatLineBreakHint(), and RelayEvent().

HWND CMultiLineEditDialogKeyHelper::m_hParentDlg [private]

Dialog's parent handle Definition at line 70 of file MultilineEntryDlg.h.

Referenced by Create(), and RelayEvent().

CDialog* CMultiLineEditDialogKeyHelper::m_pDlg [private]

Dialog Definition at line 69 of file MultilineEntryDlg.h.

Referenced by Create(), and RelayEvent().

The documentation for this class was generated from the following files:
  • WinCvs/MultilineEntryDlg.h
  • WinCvs/MultilineEntryDlg.cpp
Generated on Sat Aug 7 22:55:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMultilineEntryDlg Class Reference

CMultilineEntryDlg Class Reference

Multiline entry controls complex. More...

#include <MultilineEntryDlg.h>

Inheritance diagram for CMultilineEntryDlg:

[legend]
Collaboration diagram for CMultilineEntryDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_MULTILINE_ENTRY }

Public Member Functions

CMultilineEntryDlg (const MultiFiles *mf)
~CMultilineEntryDlg ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)
PreTranslateMessage virtual override, update text entry info and relay message for the multi-line processing.
BOOL | Create (const kMultilineEntryType multilineEntryType, CMString *pPreviousEntries, const CWnd *pWndInsertAfter, CDialog *pParentWnd, const bool updateData=true)
BOOL | UpdateData (BOOL bSaveAndValidate, CString &entryText)

Public Attributes

CEdit | m_editPositionEdit
CSmartComboBox m_actionCombo
CButton | m_entryStatic
CButton | m_wordWrapCtrl
CEdit | m_entryTextCtrlWrap
CEdit | m_entryTextCtrl
CSmartComboBox m_prevLogsCombo
CString | m_entryText
BOOL | m_wordWrap

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnSelchangeCombo ()
CBN_SELCHANGE message handler, copy the selected text as the log message.
afx_msg BOOL | OnEraseBkgnd (CDC *pDC)
WM_ERASEBKGND message handler, prevent flickering while switching the entry text edit controls.
afx_msg void | OnWordwrap ()
BN_CLICKED message handler, switch the log message windows.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls appropriate to the entry type.
afx_msg void | OnActionGo ()
BN_CLICKED message handler, execute the selected action.
afx_msg void | OnSetfocusLogmsg ()
EN_SETFOCUS message handler, cancel the selection if it's the first time command line control gets focus.
afx_msg void | OnSetfocusLogmsgWrap ()
EN_SETFOCUS message handler, cancel the selection if it's the first time command line control gets focus.

Private Member Functions

virtual void | InitHelpID ()
void | SwitchWrapEdit (const BOOL bWordWrap)
void | SetEntryDescription ()
void | SetActions ()
void | AddAction (const kActionType actionType, const char *actionDescription, const bool select=false)
void | UpdateInfo ()
int GetEntryTextID ()
CWnd * | GetEntryTextWnd ()
void | ActionOpenEditor ()
void | ActionOpenTemplate ()
void | ActionBrowseTag ()
void | ActionBrowseModule ()
void | ActionFormatCvsRoot ()

Private Attributes

const MultiFiles * | m_mf
kMultilineEntryType m_multilineEntryType
CDialog * m_pParentWnd
CMString * m_pPreviousEntries
bool m_switchingWrap
bool m_firstFocus
CMultiLineEditDialogKeyHelper m_multiLineEditDialogKeyHelper

Detailed Description

Multiline entry controls complex.

Definition at line 83 of file MultilineEntryDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 94 of file MultilineEntryDlg.h.
00094 { IDD = IDD_MULTILINE_ENTRY };

Constructor & Destructor Documentation

CMultilineEntryDlg::CMultilineEntryDlg ( const MultiFiles * mf )

Definition at line 169 of file MultilineEntryDlg.cpp.

References gCvsPrefs, and CvsPrefs::WordWrapLogMsg().

00170     : m_mf(mf), m_actionCombo(CSmartComboBox::AutoDropWidth), CHHelpPropertyPage(CMultilineEntryDlg::IDD)
00171 {
00172     //{{AFX_DATA_INIT(CMultilineEntryDlg)
00173     m_entryText = _T("");
00174     m_wordWrap = FALSE;
00175     //}}AFX_DATA_INIT
00176
00177     m_switchingWrap = false;
00178     m_firstFocus = true;
00179     m_wordWrap = gCvsPrefs.WordWrapLogMsg();
00180 }

Here is the call graph for this function:

CMultilineEntryDlg::~CMultilineEntryDlg ( )

Definition at line 182 of file MultilineEntryDlg.cpp.

00183 {
00184 }

Member Function Documentation

void CMultilineEntryDlg::ActionBrowseModule ( ) [private]

Browse for module or path to insert into edited text Definition at line 627 of file MultilineEntryDlg.cpp.

References CompatGetModuleListItem(), CStr, GetEntryTextWnd(), and m_mf.

Referenced by OnActionGo().

00628 {
00629     CStr moduleName;
00630     if( CompatGetModuleListItem(m_mf, moduleName) )
00631     {
00632         CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00633         pEdit->ReplaceSel(moduleName.c_str(), TRUE);
00634     }
00635 }

Here is the call graph for this function:

void CMultilineEntryDlg::ActionBrowseTag ( ) [private]

Browse for tag to insert into edited text Definition at line 614 of file MultilineEntryDlg.cpp.

References CompatGetTagListItem(), CStr, GetEntryTextWnd(), and m_mf.

Referenced by OnActionGo().

00615 {
00616     CStr tagName;
00617     if( CompatGetTagListItem(m_mf, tagName) )
00618     {
00619         CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00620         pEdit->ReplaceSel(tagName.c_str(), TRUE);
00621     }
00622 }

Here is the call graph for this function:

void CMultilineEntryDlg::ActionFormatCvsRoot ( ) [private]

Format CVSROOT string Definition at line 640 of file MultilineEntryDlg.cpp.

References CompatGetCvsRoot(), CStr, and GetEntryTextWnd().

Referenced by OnActionGo().

00641 {
00642     CStr cvsRoot;
00643     if( CompatGetCvsRoot(cvsRoot) )
00644     {
00645         CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00646         pEdit->ReplaceSel(cvsRoot.c_str(), TRUE);
00647     }
00648 }

Here is the call graph for this function:

void CMultilineEntryDlg::ActionOpenEditor ( ) [private]

Open the external editor to edit the text Definition at line 568 of file MultilineEntryDlg.cpp.

References CompatGetEditorMsg(), and GetEntryTextWnd().

Referenced by OnActionGo().

00569 {
00570     UStr message;
00571
00572     if( CompatGetEditorMsg(message) )
00573     {
00574         CString strMessage(message);
00575         strMessage.Replace("\n", "\r\n");
00576
00577         if( !strMessage.IsEmpty() )
00578         {
00579             CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00580             pEdit->SetSel(0, -1);
00581             pEdit->ReplaceSel(strMessage, TRUE);
00582         }
00583     }
00584
00585     GotoDlgCtrl(GetEntryTextWnd());
00586 }

Here is the call graph for this function:

void CMultilineEntryDlg::ActionOpenTemplate ( ) [private]

Open the CVS template file and insert as edited text Definition at line 591 of file MultilineEntryDlg.cpp.

References CompatGetCvsTemplate(), GetEntryTextWnd(), and m_mf.

Referenced by OnActionGo().

00592 {
00593     UStr message;
00594
00595     if( CompatGetCvsTemplate(m_mf, message) )
00596     {
00597         CString strMessage(message);
00598         strMessage.Replace("\n", "\r\n");
00599
00600         if( !strMessage.IsEmpty() )
00601         {
00602             CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00603             pEdit->SetSel(0, -1);
00604             pEdit->ReplaceSel(strMessage, TRUE);
00605         }
00606     }
00607
00608     GotoDlgCtrl(GetEntryTextWnd());
00609 }

Here is the call graph for this function:

void CMultilineEntryDlg::AddAction | ( | const kActionType | actionType,
 |  | const char * | actionDescription,
 |  | const bool | select = false
 | ) | [private]

Add the action to the action combo box

Parameters:
actionType | Action to add
actionDescription | Action description
select | true to set the new action item selected, false otherwise
Definition at line 373 of file MultilineEntryDlg.cpp.

References m_actionCombo.

Referenced by SetActions().

00374 {
00375     const int item = m_actionCombo.AddString(actionDescription);
00376     if( item > -1 )
00377     {
00378         m_actionCombo.SetItemData(item, (DWORD)actionType);
00379
00380         if( select )
00381         {
00382             m_actionCombo.SetCurSel(item);
00383         }
00384     }
00385 }

BOOL CMultilineEntryDlg::Create | ( | const kMultilineEntryType | multilineEntryType,
 |  | CMString * | pPreviousEntries,
 |  | const CWnd * | pWndInsertAfter,
 |  | CDialog * | pParentWnd,
 |  | const bool | updateData = true
 | ) |

Create the entry dialog

Parameters:
multilineEntryType | Entry type
pPreviousEntries | Previous entries collection
pWndInsertAfter | Placeholder window
pParentWnd | Parent window
updateData | true to invoke UpdateData(FALSE) for the parent dialog after the creation to display the initial text entry, false otherwise
Returns:
TRUE on success, FALSE otherwise
Definition at line 246 of file MultilineEntryDlg.cpp.

References IDD, and NULL.

Referenced by CCmdLine_MAIN::OnInitDialog(), CCommit_MAIN::OnInitDialog(), and CAdminOption_MAIN::SetMultilineEntry().

00248 {
00249     BOOL res = FALSE;
00250
00251     ASSERT(pWndInsertAfter != NULL);    // Invalid pointer
00252     ASSERT(pParentWnd != NULL);         // Invalid pointer
00253     ASSERT(pPreviousEntries != NULL);   // Invalid pointer
00254
00255     m_multilineEntryType = multilineEntryType;
00256     m_pParentWnd = pParentWnd;
00257     m_pPreviousEntries = pPreviousEntries;
00258
00259     m_prevLogsCombo.SetItems(m_pPreviousEntries);
00260
00261     if( CHHelpPropertyPage::Create(CMultilineEntryDlg::IDD, m_pParentWnd) )
00262     {
00263         CRect windowRect;
00264         pWndInsertAfter->GetWindowRect(windowRect);
00265         pParentWnd->ScreenToClient(windowRect);
00266
00267         SetWindowPos(pWndInsertAfter, windowRect.left, windowRect.top, windowRect.Width(), windowRect.Height(), SWP_SHOWWINDOW);
00268
00269         if( updateData )
00270         {
00271             m_pParentWnd->UpdateData(FALSE);
00272         }
00273
00274         res = TRUE;
00275     }
00276
00277     return res;
00278 }

void CMultilineEntryDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 186 of file MultilineEntryDlg.cpp.

References DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), GetEntryTextID(), IDC_MULTILINE_ACTION, IDC_MULTILINE_ENTRY, IDC_MULTILINE_ENTRY_WRAP, IDC_MULTILINE_POSITION, IDC_MULTILINE_PREV_ENTRY, IDC_MULTILINE_TYPE, IDC_MULTILINE_WORDWRAP, TMString< T >::Insert(), m_actionCombo, m_editPositionEdit, m_entryStatic, m_entryText, m_entryTextCtrl, m_entryTextCtrlWrap, m_pPreviousEntries, m_prevLogsCombo, m_wordWrap, and m_wordWrapCtrl.

00187 {
00188     CHHelpPropertyPage::DoDataExchange(pDX);
00189     //{{AFX_DATA_MAP(CMultilineEntryDlg)
00190     DDX_Control(pDX, IDC_MULTILINE_POSITION, m_editPositionEdit);
00191     DDX_Control(pDX, IDC_MULTILINE_ACTION, m_actionCombo);
00192     DDX_Control(pDX, IDC_MULTILINE_TYPE, m_entryStatic);
00193     DDX_Control(pDX, IDC_MULTILINE_WORDWRAP, m_wordWrapCtrl);
00194     DDX_Control(pDX, IDC_MULTILINE_ENTRY_WRAP, m_entryTextCtrlWrap);
00195     DDX_Control(pDX, IDC_MULTILINE_ENTRY, m_entryTextCtrl);
00196     DDX_Control(pDX, IDC_MULTILINE_PREV_ENTRY, m_prevLogsCombo);
00197     DDX_Check(pDX, IDC_MULTILINE_WORDWRAP, m_wordWrap);
00198     //}}AFX_DATA_MAP
00199
00200     if( !pDX->m_bSaveAndValidate )
00201     {
00202         DDX_Text(pDX, IDC_MULTILINE_ENTRY_WRAP, m_entryText);
00203         DDX_Text(pDX, IDC_MULTILINE_ENTRY, m_entryText);
00204     }
00205     else
00206     {
00207         DDX_Text(pDX, GetEntryTextID(), m_entryText);
00208     }
00209
00210     if( pDX->m_bSaveAndValidate )
00211     {
00212         if( !m_entryText.IsEmpty() )
00213         {
00214             m_pPreviousEntries->Insert(m_entryText);
00215         }
00216     }
00217     else
00218     {
00219         DDX_ComboMString(pDX, IDC_MULTILINE_PREV_ENTRY, m_prevLogsCombo);
00220     }
00221 }

Here is the call graph for this function:

int CMultilineEntryDlg::GetEntryTextID ( ) [private]

Get the entry window dialog ID

Returns:
The entry window dialog ID
Definition at line 501 of file MultilineEntryDlg.cpp.

References IDC_MULTILINE_ENTRY, IDC_MULTILINE_ENTRY_WRAP, and m_wordWrapCtrl.

Referenced by DoDataExchange(), and GetEntryTextWnd().

00502 {
00503     return m_wordWrapCtrl.GetCheck() ? IDC_MULTILINE_ENTRY_WRAP : IDC_MULTILINE_ENTRY;
00504 }

CWnd * CMultilineEntryDlg::GetEntryTextWnd ( ) [private]

Get the entry window

Returns:
The entry window
Definition at line 510 of file MultilineEntryDlg.cpp.

References GetEntryTextID().

Referenced by ActionBrowseModule(), ActionBrowseTag(), ActionFormatCvsRoot(), ActionOpenEditor(), ActionOpenTemplate(), OnSelchangeCombo(), and UpdateInfo().

00511 {
00512     return GetDlgItem(GetEntryTextID());
00513 }

Here is the call graph for this function:

void CMultilineEntryDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 296 of file MultilineEntryDlg.cpp.

References helpTopicIgnore, IDC_MULTILINE_ACTION, IDC_MULTILINE_ENTRY, IDC_MULTILINE_ENTRY_WRAP, IDC_MULTILINE_GO_ACTION, IDC_MULTILINE_POSITION, IDC_MULTILINE_PREV_ENTRY, IDC_MULTILINE_TYPE, IDC_MULTILINE_WORDWRAP, IDH_IDC_MULTILINE_ACTION, IDH_IDC_MULTILINE_ENTRY, IDH_IDC_MULTILINE_ENTRY_WRAP, IDH_IDC_MULTILINE_GO_ACTION, IDH_IDC_MULTILINE_POSITION, IDH_IDC_MULTILINE_PREV_ENTRY, IDH_IDC_MULTILINE_WORDWRAP, and CHHelpSupport::SetCtrlHelpID().

00297 {
00298     SetCtrlHelpID(IDC_MULTILINE_TYPE,       helpTopicIgnore);
00299     SetCtrlHelpID(IDC_MULTILINE_ENTRY,      IDH_IDC_MULTILINE_ENTRY);
00300     SetCtrlHelpID(IDC_MULTILINE_ENTRY_WRAP, IDH_IDC_MULTILINE_ENTRY_WRAP);
00301     SetCtrlHelpID(IDC_MULTILINE_PREV_ENTRY, IDH_IDC_MULTILINE_PREV_ENTRY);
00302     SetCtrlHelpID(IDC_MULTILINE_ACTION,     IDH_IDC_MULTILINE_ACTION);
00303     SetCtrlHelpID(IDC_MULTILINE_GO_ACTION,  IDH_IDC_MULTILINE_GO_ACTION);
00304     SetCtrlHelpID(IDC_MULTILINE_WORDWRAP,   IDH_IDC_MULTILINE_WORDWRAP);
00305     SetCtrlHelpID(IDC_MULTILINE_POSITION,   IDH_IDC_MULTILINE_POSITION);
00306 }

Here is the call graph for this function:

void CMultilineEntryDlg::OnActionGo ( ) [protected]

BN_CLICKED message handler, execute the selected action.

Definition at line 534 of file MultilineEntryDlg.cpp.

References ActionBrowseModule(), ActionBrowseTag(), ActionFormatCvsRoot(), ActionOpenEditor(), ActionOpenTemplate(), kActionBrowseModule, kActionBrowseTag, kActionFormatCvsRoot, kActionOpenEditor, kActionOpenTemplate, kActionType, and m_actionCombo.

00535 {
00536     const int selItem = m_actionCombo.GetCurSel();
00537     if( selItem > -1 )
00538     {
00539         const kActionType action = (kActionType)m_actionCombo.GetItemData(selItem);
00540
00541         switch( action )
00542         {
00543         case kActionOpenEditor:
00544             ActionOpenEditor();
00545             break;
00546         case kActionOpenTemplate:
00547             ActionOpenTemplate();
00548             break;
00549         case kActionBrowseTag:
00550             ActionBrowseTag();
00551             break;
00552         case kActionBrowseModule:
00553             ActionBrowseModule();
00554             break;
00555         case kActionFormatCvsRoot:
00556             ActionFormatCvsRoot();
00557             break;
00558         default:
00559             ASSERT(FALSE);  // Unknown action
00560             break;
00561         }
00562     }
00563 }

Here is the call graph for this function:

BOOL CMultilineEntryDlg::OnEraseBkgnd ( CDC * pDC ) [protected]

WM_ERASEBKGND message handler, prevent flickering while switching the entry text edit controls.

Definition at line 516 of file MultilineEntryDlg.cpp.

References m_switchingWrap.

00517 {
00518     if( m_switchingWrap )
00519     {
00520         return TRUE;
00521     }
00522
00523     return CHHelpPropertyPage::OnEraseBkgnd(pDC);
00524 }

BOOL CMultilineEntryDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls appropriate to the entry type.

Reimplemented from CHHelpPropertyPage.

Definition at line 281 of file MultilineEntryDlg.cpp.

References CMultiLineEditDialogKeyHelper::Create(), CvsPrefs::CtrlPressedOnOK(), gCvsPrefs, m_multiLineEditDialogKeyHelper, m_pParentWnd, CHHelpPropertyPage::OnInitDialog(), SetActions(), SetEntryDescription(), SwitchWrapEdit(), and CvsPrefs::WordWrapLogMsg().

00282 {
00283     CHHelpPropertyPage::OnInitDialog();
00284
00285     // Extra initialization
00286     m_multiLineEditDialogKeyHelper.Create(gCvsPrefs.CtrlPressedOnOK(), m_pParentWnd, m_pParentWnd->GetParent()->GetSafeHwnd());
00287
00288     SwitchWrapEdit(gCvsPrefs.WordWrapLogMsg());
00289     SetEntryDescription();
00290     SetActions();
00291
00292     return TRUE;  // return TRUE unless you set the focus to a control
00293                   // EXCEPTION: OCX Property Pages should return FALSE
00294 }

Here is the call graph for this function:

void CMultilineEntryDlg::OnSelchangeCombo ( ) [protected]

CBN_SELCHANGE message handler, copy the selected text as the log message.

Definition at line 336 of file MultilineEntryDlg.cpp.

References GetEntryTextWnd(), TMString< T >::GetList(), m_pPreviousEntries, m_prevLogsCombo, and NAMESPACE.

00337 {
00338     int sel = m_prevLogsCombo.GetCurSel();
00339     if( sel == CB_ERR )
00340         return;
00341
00342     CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00343     pEdit->SetSel(0, -1);
00344
00345     const NAMESPACE(std) vector<CStr>& list = m_pPreviousEntries->GetList();
00346     pEdit->ReplaceSel(list[sel]);
00347 }

Here is the call graph for this function:

void CMultilineEntryDlg::OnSetfocusLogmsg ( ) [protected]

EN_SETFOCUS message handler, cancel the selection if it's the first time command line control gets focus.

Definition at line 651 of file MultilineEntryDlg.cpp.

References DEF_CVS_CMD, kMultilineCmdLine, m_entryTextCtrl, m_firstFocus, and m_multilineEntryType.

00652 {
00653     if( m_firstFocus )
00654     {
00655         m_firstFocus = false;
00656
00657         if( kMultilineCmdLine == m_multilineEntryType )
00658         {
00659             CString cmdLine;
00660             m_entryTextCtrl.GetWindowText(cmdLine);
00661
00662             if( DEF_CVS_CMD == cmdLine )
00663             {
00664                 m_entryTextCtrl.SetSel(-1, -1);
00665             }
00666         }
00667     }
00668 }

void CMultilineEntryDlg::OnSetfocusLogmsgWrap ( ) [protected]

EN_SETFOCUS message handler, cancel the selection if it's the first time command line control gets focus.

Definition at line 671 of file MultilineEntryDlg.cpp.

References DEF_CVS_CMD, kMultilineCmdLine, m_entryTextCtrlWrap, m_firstFocus, and m_multilineEntryType.

00672 {
00673     if( m_firstFocus )
00674     {
00675         m_firstFocus = false;
00676
00677         if( kMultilineCmdLine == m_multilineEntryType )
00678         {
00679             CString cmdLine;
00680             m_entryTextCtrlWrap.GetWindowText(cmdLine);
00681
00682             if( DEF_CVS_CMD == cmdLine )
00683             {
00684                 m_entryTextCtrlWrap.SetSel(-1, -1);
00685             }
00686         }
00687     }
00688 }

void CMultilineEntryDlg::OnWordwrap ( ) [protected]

BN_CLICKED message handler, switch the log message windows.

Definition at line 527 of file MultilineEntryDlg.cpp.

References gCvsPrefs, m_wordWrapCtrl, CvsPrefs::SetWordWrapLogMsg(), SwitchWrapEdit(), and CvsPrefs::WordWrapLogMsg().

00528 {
00529     gCvsPrefs.SetWordWrapLogMsg(m_wordWrapCtrl.GetCheck());
00530     SwitchWrapEdit(gCvsPrefs.WordWrapLogMsg());
00531 }

Here is the call graph for this function:

BOOL CMultilineEntryDlg::PreTranslateMessage ( MSG * pMsg ) [virtual]

PreTranslateMessage virtual override, update text entry info and relay message for the multi-line processing.

Definition at line 350 of file MultilineEntryDlg.cpp.

References m_multiLineEditDialogKeyHelper, CMultiLineEditDialogKeyHelper::RelayEvent(), and UpdateInfo().

00351 {
00352     if( pMsg->message >= WM_KEYFIRST ||
00353         pMsg->message <= WM_KEYLAST ||
00354         pMsg->message == WM_COPY || pMsg->message == WM_CUT || pMsg->message == WM_PASTE )
00355     {
00356         UpdateInfo();
00357     }
00358
00359     if( m_multiLineEditDialogKeyHelper.RelayEvent(pMsg) )
00360     {
00361         return TRUE;
00362     }
00363
00364     return CHHelpPropertyPage::PreTranslateMessage(pMsg);
00365 }

Here is the call graph for this function:

void CMultilineEntryDlg::SetActions ( ) [private]

Set the actions depending on entry type Definition at line 473 of file MultilineEntryDlg.cpp.

References AddAction(), kActionBrowseModule, kActionBrowseTag, kActionFormatCvsRoot, kActionOpenEditor, kActionOpenTemplate, kMultilineCmdLine, kMultilineDescription, kMultilineLogMessage, kMultilineState, and m_multilineEntryType.

Referenced by OnInitDialog().

00474 {
00475     switch( m_multilineEntryType )
00476     {
00477     default:
00478         ASSERT(FALSE); // Unknown type
00479     case kMultilineLogMessage:
00480         AddAction(kActionOpenEditor, "Editor", true);
00481         AddAction(kActionOpenTemplate, "Template");
00482         break;
00483     case kMultilineCmdLine:
00484         AddAction(kActionBrowseTag, "Tag", true);
00485         AddAction(kActionBrowseModule, "Module");
00486         AddAction(kActionFormatCvsRoot, "CVSROOT");
00487         break;
00488     case kMultilineState:
00489         AddAction(kActionOpenEditor, "Editor", true);
00490         break;
00491     case kMultilineDescription:
00492         AddAction(kActionOpenEditor, "Editor", true);
00493         break;
00494     }
00495 }

Here is the call graph for this function:

void CMultilineEntryDlg::SetEntryDescription ( ) [private]

Set the entry description depending on entry type Definition at line 442 of file MultilineEntryDlg.cpp.

References ENTRY_CMDLINE_DESC_FORMAT, ENTRY_DESCRIPTION_DESC_FORMAT, ENTRY_LOGMESSAGE_DESC_FORMAT, ENTRY_STATE_DESC_FORMAT, CMultiLineEditDialogKeyHelper::FormatLineBreakHint(), kMultilineCmdLine, kMultilineDescription, kMultilineLogMessage, kMultilineState, m_entryStatic, m_multiLineEditDialogKeyHelper, and m_multilineEntryType.

Referenced by OnInitDialog().

00443 {
00444     CString entryDescription;
00445
00446     switch( m_multilineEntryType )
00447     {
00448     default:
00449         ASSERT(FALSE); // Unknown type
00450     case kMultilineLogMessage:
00451         entryDescription.Format(ENTRY_LOGMESSAGE_DESC_FORMAT, m_multiLineEditDialogKeyHelper.FormatLineBreakHint());
00452         break;
00453     case kMultilineCmdLine:
00454         entryDescription.Format(ENTRY_CMDLINE_DESC_FORMAT, m_multiLineEditDialogKeyHelper.FormatLineBreakHint());
00455         break;
00456     case kMultilineState:
00457         entryDescription.Format(ENTRY_STATE_DESC_FORMAT, m_multiLineEditDialogKeyHelper.FormatLineBreakHint());
00458         break;
00459     case kMultilineDescription:
00460         entryDescription.Format(ENTRY_DESCRIPTION_DESC_FORMAT, m_multiLineEditDialogKeyHelper.FormatLineBreakHint());
00461         break;
00462     }
00463
00464     if( !entryDescription.IsEmpty() )
00465     {
00466         m_entryStatic.SetWindowText(entryDescription);
00467     }
00468 }

Here is the call graph for this function:

void CMultilineEntryDlg::SwitchWrapEdit ( const BOOL bWordWrap ) [private]

Switch the edit wrap and non-wrap edit boxes

Parameters:
bWordWrap TRUE to enable word wrap, FALSE otherwise
Definition at line 413 of file MultilineEntryDlg.cpp.

References m_entryTextCtrl, m_entryTextCtrlWrap, and m_switchingWrap.

Referenced by OnInitDialog(), and OnWordwrap().

00414 {
00415     CString strMessage;
00416
00417     if( bWordWrap )
00418     {
00419         m_entryTextCtrl.GetWindowText(strMessage);
00420         m_entryTextCtrlWrap.SetWindowText(strMessage);
00421
00422         m_switchingWrap = true;
00423         m_entryTextCtrl.ShowWindow(SW_HIDE);
00424         m_entryTextCtrlWrap.ShowWindow(SW_SHOW);
00425         m_switchingWrap = false;
00426     }
00427     else
00428     {
00429         m_entryTextCtrlWrap.GetWindowText(strMessage);
00430         m_entryTextCtrl.SetWindowText(strMessage);
00431
00432         m_switchingWrap = true;
00433         m_entryTextCtrlWrap.ShowWindow(SW_HIDE);
00434         m_entryTextCtrl.ShowWindow(SW_SHOW);
00435         m_switchingWrap = false;
00436     }
00437 }

BOOL CMultilineEntryDlg::UpdateData | ( | BOOL | bSaveAndValidate,
 |  | CString & | entryText
 | ) |

Invoke DDX for multiline entry

Parameters:
bSaveAndValidate | Validation flag
entryText | Return the entered text
Returns:
TRUE on success, FALSE otherwise
Definition at line 314 of file MultilineEntryDlg.cpp.

References m_entryText.

Referenced by CCmdLine_MAIN::DoDataExchange(), CImport_MAIN::DoDataExchange(), CCommit_MAIN::DoDataExchange(), and CAdminOption_MAIN::DoDataExchange().

00315 {
00316     BOOL res = FALSE;
00317
00318     if( ::IsWindow(GetSafeHwnd()) )
00319     {
00320         if( bSaveAndValidate )
00321         {
00322             CHHelpPropertyPage::UpdateData(TRUE);
00323             entryText = m_entryText;
00324         }
00325         else
00326         {
00327             m_entryText = entryText;
00328             CHHelpPropertyPage::UpdateData(FALSE);
00329         }
00330     }
00331
00332     return res;
00333 }

void CMultilineEntryDlg::UpdateInfo ( ) [private]

Display entry text info Definition at line 390 of file MultilineEntryDlg.cpp.

References GetEntryTextWnd(), and m_editPositionEdit.

Referenced by PreTranslateMessage().

00391 {
00392     CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00393
00394     const int nLineNumber = pEdit->LineFromChar();
00395     const int nLineLenght = pEdit->LineLength(pEdit->LineIndex());
00396
00397     CString strInfo;
00398     strInfo.Format("Line %d (%d chars)", nLineNumber + 1, nLineLenght);
00399
00400     CString strOldInfo;
00401     m_editPositionEdit.GetWindowText(strOldInfo);
00402
00403     if( strOldInfo != strInfo )
00404     {
00405         m_editPositionEdit.SetWindowText(strInfo);
00406     }
00407 }

Here is the call graph for this function:

Member Data Documentation

CSmartComboBox CMultilineEntryDlg::m_actionCombo

Definition at line 96 of file MultilineEntryDlg.h.

Referenced by AddAction(), DoDataExchange(), and OnActionGo().

CEdit CMultilineEntryDlg::m_editPositionEdit

Definition at line 95 of file MultilineEntryDlg.h.

Referenced by DoDataExchange(), and UpdateInfo().

CButton CMultilineEntryDlg::m_entryStatic

Definition at line 97 of file MultilineEntryDlg.h.

Referenced by DoDataExchange(), and SetEntryDescription().

CString CMultilineEntryDlg::m_entryText

Definition at line 102 of file MultilineEntryDlg.h.

Referenced by DoDataExchange(), and UpdateData().

CEdit CMultilineEntryDlg::m_entryTextCtrl

Definition at line 100 of file MultilineEntryDlg.h.

Referenced by DoDataExchange(), OnSetfocusLogmsg(), and SwitchWrapEdit().

CEdit CMultilineEntryDlg::m_entryTextCtrlWrap

Definition at line 99 of file MultilineEntryDlg.h.

Referenced by DoDataExchange(), OnSetfocusLogmsgWrap(), and SwitchWrapEdit().

bool CMultilineEntryDlg::m_firstFocus [private]

Flag to mark the first time edit control is focused Definition at line 137 of file MultilineEntryDlg.h.

Referenced by OnSetfocusLogmsg(), and OnSetfocusLogmsgWrap().

const MultiFiles* CMultilineEntryDlg::m_mf [private]

Browser selection Definition at line 130 of file MultilineEntryDlg.h.

Referenced by ActionBrowseModule(), ActionBrowseTag(), and ActionOpenTemplate().

CMultiLineEditDialogKeyHelper CMultilineEntryDlg::m_multiLineEditDialogKeyHelper [private]

Definition at line 139 of file MultilineEntryDlg.h.

Referenced by OnInitDialog(), PreTranslateMessage(), and SetEntryDescription().

kMultilineEntryType CMultilineEntryDlg::m_multilineEntryType [private]

Entry type Definition at line 131 of file MultilineEntryDlg.h.

Referenced by OnSetfocusLogmsg(), OnSetfocusLogmsgWrap(), SetActions(), and SetEntryDescription().

CDialog* CMultilineEntryDlg::m_pParentWnd [private]

Parent dialog Definition at line 133 of file MultilineEntryDlg.h.

Referenced by OnInitDialog().

CMString* CMultilineEntryDlg::m_pPreviousEntries [private]

Previous entries Definition at line 134 of file MultilineEntryDlg.h.

Referenced by DoDataExchange(), and OnSelchangeCombo().

CSmartComboBox CMultilineEntryDlg::m_prevLogsCombo

Definition at line 101 of file MultilineEntryDlg.h.

Referenced by DoDataExchange(), and OnSelchangeCombo().

bool CMultilineEntryDlg::m_switchingWrap [private]

Switching the wrap control flag Definition at line 136 of file MultilineEntryDlg.h.

Referenced by OnEraseBkgnd(), and SwitchWrapEdit().

BOOL CMultilineEntryDlg::m_wordWrap

Definition at line 103 of file MultilineEntryDlg.h.

Referenced by DoDataExchange().

CButton CMultilineEntryDlg::m_wordWrapCtrl

Definition at line 98 of file MultilineEntryDlg.h.

Referenced by DoDataExchange(), GetEntryTextID(), and OnWordwrap().

The documentation for this class was generated from the following files:
  • WinCvs/MultilineEntryDlg.h
  • WinCvs/MultilineEntryDlg.cpp
Generated on Sat Aug 7 22:55:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CMyShellTree Class Reference

CMyShellTree Class Reference

#include <ExploreBar.h>

Inheritance diagram for CMyShellTree:

[legend]
Collaboration diagram for CMyShellTree:

[legend]
List of all members.

Protected Member Functions

bool DisableCommon ()
afx_msg void | OnRclick (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnDeleteitem (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnSelchanged (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void | OnItemexpanding (NMHDR *pNMHDR, LRESULT *pResult)

Member Function Documentation

bool CMyShellTree::DisableCommon ( ) [protected]

Definition at line 51 of file ExploreBar.cpp.

References CWincvsApp::IsCvsRunning().

Referenced by OnDeleteitem(), OnItemexpanding(), OnRclick(), and OnSelchanged().

00052 {
00053     CWincvsApp *app = (CWincvsApp*)AfxGetApp();
00054     return app->IsCvsRunning();
00055 }

Here is the call graph for this function:

void CMyShellTree::OnDeleteitem | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 108 of file ExploreBar.cpp.

References DisableCommon().

00109 {
00110     if(DisableCommon())
00111     {
00112         *pResult = 1;
00113         return;
00114     }
00115
00116     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00117     // TODO: Add your control notification handler code here
00118     CCJShellTree::OnDeleteitem(pNMHDR,pResult);
00119     *pResult = 0;
00120 }

Here is the call graph for this function:

void CMyShellTree::OnItemexpanding | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 57 of file ExploreBar.cpp.

References DisableCommon().

00058 {
00059     if(DisableCommon())
00060     {
00061         *pResult = 1;
00062         return;
00063     }
00064
00065     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00066     CCJShellTree::OnItemexpanding(pNMHDR,pResult);
00067     CCJShellTree::Invalidate();
00068     *pResult = 0;
00069 }

Here is the call graph for this function:

void CMyShellTree::OnRclick | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 95 of file ExploreBar.cpp.

References DisableCommon().

00096 {
00097     if(DisableCommon())
00098     {
00099         *pResult = 1;
00100         return;
00101     }
00102
00103     // TODO: Add your control notification handler code here
00104     CCJShellTree::OnRclick(pNMHDR,pResult);
00105     *pResult = 0;
00106 }

Here is the call graph for this function:

void CMyShellTree::OnSelchanged | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

Definition at line 71 of file ExploreBar.cpp.

References DisableCommon(), CWincvsApp::GetFileView(), and CBrowseFileView::ResetView().

00072 {
00073     if(DisableCommon())
00074     {
00075         *pResult = 1;
00076         return;
00077     }
00078
00079     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00080
00081     CString szPath;
00082     CCJShellTree::OnSelchanged(pNMHDR,pResult);
00083
00084     if(CCJShellTree::GetSelectedFolderPath(szPath))
00085     {
00086         CWincvsApp* app = (CWincvsApp *)AfxGetApp();
00087         CBrowseFileView *view = app->GetFileView();
00088         if(view != 0L)
00089             view->ResetView(szPath);
00090     }
00091
00092     *pResult = 0;
00093 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/ExploreBar.h
  • WinCvs/ExploreBar.cpp
Generated on Sat Aug 7 22:55:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CNoPython Class Reference

CNoPython Class Reference

#include <NoPython.h>

Inheritance diagram for CNoPython:

[legend]
Collaboration diagram for CNoPython:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_NOPYTHON }

Public Member Functions

CNoPython (CWnd *pParent=NULL)

Public Attributes

CCJHyperLink m_url
BOOL | m_remind

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 45 of file NoPython.h.
00045 { IDD = IDD_NOPYTHON };

Constructor & Destructor Documentation

CNoPython::CNoPython ( CWnd * pParent = NULL )

Definition at line 42 of file NoPython.cpp.

References m_remind.

00043     : CHHelpDialog(CNoPython::IDD, pParent)
00044 {
00045     //{{AFX_DATA_INIT(CNoPython)
00046     m_remind = TRUE;
00047     //}}AFX_DATA_INIT
00048 }

Member Function Documentation

void CNoPython::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 51 of file NoPython.cpp.

References CHHelpDialog::DoDataExchange(), IDC_PYTHON_URL, IDC_REMIND, m_remind, and m_url.

00052 {
00053     CHHelpDialog::DoDataExchange(pDX);
00054     //{{AFX_DATA_MAP(CNoPython)
00055     DDX_Control(pDX, IDC_PYTHON_URL, m_url);
00056     DDX_Check(pDX, IDC_REMIND, m_remind);
00057     //}}AFX_DATA_MAP
00058 }

Here is the call graph for this function:

void CNoPython::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 82 of file NoPython.cpp.

References IDC_PYTHON_URL, IDC_REMIND, IDH_IDC_PYTHON_URL, IDH_IDC_REMIND, and CHHelpSupport::SetCtrlHelpID().

00083 {
00084     SetCtrlHelpID(IDC_PYTHON_URL,   IDH_IDC_PYTHON_URL);
00085     SetCtrlHelpID(IDC_REMIND,       IDH_IDC_REMIND);
00086 }

Here is the call graph for this function:

void CNoPython::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 89 of file NoPython.cpp.

References CHHelpSupport::ShowHelp().

00090 {
00091     ShowHelp();
00092 }

Here is the call graph for this function:

BOOL CNoPython::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls.

Reimplemented from CHHelpDialog.

Definition at line 71 of file NoPython.cpp.

References CHHelpDialog::OnInitDialog().

00072 {
00073     CHHelpDialog::OnInitDialog();
00074
00075     // Extra initialization
00076     m_url.SetURL(_T("http://www.python.org"));
00077
00078     return TRUE;  // return TRUE unless you set the focus to a control
00079                   // EXCEPTION: OCX Property Pages should return FALSE
00080 }

Here is the call graph for this function:

Member Data Documentation

BOOL CNoPython::m_remind

Definition at line 47 of file NoPython.h.

Referenced by CNoPython(), DoDataExchange(), and WarnNoPython().

CCJHyperLink CNoPython::m_url

Definition at line 46 of file NoPython.h.

Referenced by DoDataExchange().

The documentation for this class was generated from the following files:
  • WinCvs/NoPython.h
  • WinCvs/NoPython.cpp
Generated on Sat Aug 7 22:55:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: NotificationManager Class Reference

NotificationManager Class Reference

Notification manager. More...

#include <BrowseViewModel.h>

Collaboration diagram for NotificationManager:

[legend]
List of all members.

Public Member Functions

NotificationManager ()
void | CheckIn (CObject *observer, FNOBSERVER handler)
Register an observer.
void | CheckOut (CObject *observer)
Unregister an observer.
void | NotifyAll ()
Fire up a notification once done with changes in observable.

Private Attributes

std::vector< Node > | m_nodes

Detailed Description

Notification manager.

Definition at line 63 of file BrowseViewModel.h.

Constructor & Destructor Documentation

NotificationManager::NotificationManager ( )

Definition at line 46 of file BrowseViewModel.cpp.

00047 {
00048 }

Member Function Documentation

void NotificationManager::CheckIn | ( | CObject * | observer,
 |  | FNOBSERVER | handler
 | ) |

Register an observer.

Definition at line 76 of file BrowseViewModel.cpp.

References FNOBSERVER, and m_nodes.

Referenced by UCvsFrame::OnCreate(), UCvsFiles::OnCreate(), CWinCvsBrowser::OnInitialUpdate(), and CBrowseFileView::OnInitialUpdate().

00077 {
00078     m_nodes.push_back(Node(observer, handler));
00079 }

void NotificationManager::CheckOut ( CObject * observer )

Unregister an observer.

Definition at line 82 of file BrowseViewModel.cpp.

References m_nodes.

Referenced by CWinCvsBrowser::OnDestroy(), CBrowseFileView::OnDestroy(), UCvsFrame::OnDestroy(), and UCvsFiles::OnDestroy().

00083 {
00084     for(std::vector<Node>::iterator i = m_nodes.begin(); i != m_nodes.end(); i++)
00085     {
00086         if( (*i).observer == observer )
00087         {
00088             m_nodes.erase(i);
00089             break;
00090         }
00091     }
00092 }

void NotificationManager::NotifyAll ( )

Fire up a notification once done with changes in observable.

Definition at line 95 of file BrowseViewModel.cpp.

References NotificationManager::Node::handler, m_nodes, and NotificationManager::Node::observer.

Referenced by CMainFrame::LoadLocationSettings(), UCvsFrame::OnCmdReload(), CSortHeaderCtrl::OnFilterChanged(), UCvsFrame::OnFilterMaskEntered(), UCvsFrame::OnHideUnknown(), CMainFrame::OnViewAdded(), UCvsFrame::OnViewAdded(), CMainFrame::OnViewChanged(), UCvsFrame::OnViewChanged(), CMainFrame::OnViewClearall(), CMainFrame::OnViewConflict(), UCvsFrame::OnViewConflict(), CMainFrame::OnViewHidemissing(), CMainFrame::OnViewHideunknown(), CMainFrame::OnViewIgnore(), UCvsFrame::OnViewIgnored(), CMainFrame::OnViewMissing(), UCvsFrame::OnViewMissing(), CMainFrame::OnViewModified(), UCvsFrame::OnViewModified(), CMainFrame::OnViewRecursive(), CMainFrame::OnViewRemoved(), UCvsFrame::OnViewRemoved(), CMainFrame::OnViewUnknown(), and UCvsFrame::OnViewUnknown().

00096 {
00097     for(std::vector<Node>::iterator i = m_nodes.begin(); i != m_nodes.end(); i++)
00098     {
00099         // Make a local copy so that observers can freely unregister during the process
00100         Node& node = *i;
00101         node.handler(node.observer);
00102     }
00103 }

Member Data Documentation

std::vector<Node> NotificationManager::m_nodes [private]

Nodes Definition at line 84 of file BrowseViewModel.h.

Referenced by CheckIn(), CheckOut(), and NotifyAll().

The documentation for this class was generated from the following files:
  • common/BrowseViewModel.h
  • common/BrowseViewModel.cpp
Generated on Sat Aug 7 22:55:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: NotificationManager::Node Struct Reference

NotificationManager::Node Struct Reference

Node describing observer registration. More...

Collaboration diagram for NotificationManager::Node:

[legend]
List of all members.

Public Member Functions

Node ()
Default constructor just zeroes everything.
Node (CObject *o, FNOBSERVER h)
Full-blown construction.
Node (const Node &n)
Node & operator= (const Node &n)

Public Attributes

CObject * observer
FNOBSERVER handler

Detailed Description

Node describing observer registration.

Definition at line 71 of file BrowseViewModel.h.

Constructor & Destructor Documentation

NotificationManager::Node::Node ( )

Default constructor just zeroes everything.

Definition at line 51 of file BrowseViewModel.cpp.

References NULL.

00052     : observer(NULL), handler(NULL)
00053 {
00054 }

NotificationManager::Node::Node | ( | CObject * | o,
 |  | FNOBSERVER | h
 | ) |

Full-blown construction.

Definition at line 57 of file BrowseViewModel.cpp.

References FNOBSERVER.

00058     : observer(o), handler(h)
00059 {
00060 }

NotificationManager::Node::Node ( const Node & n )

Definition at line 62 of file BrowseViewModel.cpp.

References handler, and observer.

00063 {
00064     observer = n.observer;
00065     handler = n.handler;
00066 }

Member Function Documentation

NotificationManager::Node & NotificationManager::Node::operator= ( const Node & n )

Definition at line 68 of file BrowseViewModel.cpp.

References handler, and observer.

00069 {
00070     observer = n.observer;
00071     handler = n.handler;
00072     return *this;
00073 }

Member Data Documentation

FNOBSERVER NotificationManager::Node::handler

Notification handler Definition at line 74 of file BrowseViewModel.h.

Referenced by Node(), NotificationManager::NotifyAll(), and operator=().

CObject* NotificationManager::Node::observer

Observer Definition at line 73 of file BrowseViewModel.h.

Referenced by Node(), NotificationManager::NotifyAll(), and operator=().

The documentation for this struct was generated from the following files:
  • common/BrowseViewModel.h
  • common/BrowseViewModel.cpp
Generated on Sat Aug 7 22:55:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CObject Class Reference

CObject Class Reference

Inheritance diagram for CObject:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJStatusBar.h
Generated on Sat Aug 7 22:55:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UObject Class Reference

UObject Class Reference

#include <uobject.h>

Inheritance diagram for UObject:

[legend]
Collaboration diagram for UObject:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
virtual | ~UObject ()
bool | IsKindOf (const URuntimeClass *pClass) const

Static Public Member Functions

const URuntimeClass * | rtUObject ()
const URuntimeClass * | _GetBaseClass ()
UObject * | CreateObject (const char *className)

Protected Member Functions

UObject ()

Static Protected Attributes

const URuntimeClass | classUObject

Constructor & Destructor Documentation

virtual UObject::~UObject ( ) [inline, virtual]

Definition at line 93 of file uobject.h.

00093 {}

UObject::UObject ( ) [inline, protected]

Definition at line 102 of file uobject.h.

00102 {}

Member Function Documentation

const URuntimeClass * UObject::_GetBaseClass ( ) [static]

Reimplemented in UMacAppMenu, UCmdTarget, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, PCPStr, PCStr, CMString, CMPString, CPersistent, CPersistentBool, CPersistentInt, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 33 of file uobject.cpp.

00034     { return 0L; }

UObject * UObject::CreateObject ( const char * className ) [static]

Definition at line 40 of file uobject.cpp.

References URuntimeClass::CreateObject(), URuntimeClass::m_lpszClassName, and URuntimeClass::m_pNextClass.

00041 {
00042     URuntimeClass *next = URuntimeClass::sAllURuntimeClass;
00043     while(next != 0L)
00044     {
00045         if(strcmp(next->m_lpszClassName, className) == 0)
00046             return next->CreateObject();
00047
00048         next = next->m_pNextClass;
00049     }
00050     return 0L;
00051 }

Here is the call graph for this function:

const URuntimeClass * UObject::GetRuntimeClass ( ) const [virtual]

Reimplemented in UMacAppMenu, UCmdTarget, UMenu, UToolbar, UWidget, UPromptMessage, UEditMessage, PCPStr, PCStr, CMString, CMPString, CPersistent, CPersistentBool, CPersistentInt, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 53 of file uobject.cpp.

References URUNTIME_CLASS.

Referenced by IsKindOf().

00054 {
00055     return URUNTIME_CLASS(UObject);
00056 }

bool UObject::IsKindOf ( const URuntimeClass * pClass ) const

Definition at line 58 of file uobject.cpp.

References GetRuntimeClass(), and URuntimeClass::IsDerivedFrom().

Referenced by _loadPersistentSettings(), UCvsApp::GetBrowserView(), UCvsApp::GetConsole(), UCvsApp::GetFilesView(), UWidget::HasModal(), CPersistent::LoadAll(), UCvsFolders::OnTreeSelecting(), CPersistent::SaveAll(), CPersistent::SaveAllSettings(), UDC::UDC(), UEventGiveTime(), UMenuAddButton(), UMenuAddPulldown(), UMenuAddRadio(), and UMenuAddToggle().

00059 {
00060     // simple SI case
00061     const URuntimeClass* pClassThis = GetRuntimeClass();
00062     return pClassThis->IsDerivedFrom(pClass);
00063 }

Here is the call graph for this function:

const URuntimeClass * UObject::rtUObject ( ) [static]

Definition at line 37 of file uobject.cpp.

References classUObject.

00038     { return &UObject::classUObject; }

Member Data Documentation

const URuntimeClass UObject::classUObject [static, protected]

Referenced by rtUObject().

The documentation for this class was generated from the following files:
  • rf/uobject.h
  • rf/uobject.cpp
Generated on Sat Aug 7 22:55:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ColorTableEntry Struct Reference

ColorTableEntry Struct Reference

#include <CJColorPopup.h>

Collaboration diagram for ColorTableEntry:

[legend]
List of all members.

Public Attributes

COLORREF | crColor
TCHAR * | szName

Member Data Documentation

COLORREF ColorTableEntry::crColor

Definition at line 66 of file CJColorPopup.h.

TCHAR* ColorTableEntry::szName

Definition at line 67 of file CJColorPopup.h.

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/CJColorPopup.h
Generated on Sat Aug 7 22:55:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ColumnIndex Class Reference

ColumnIndex Class Reference

Column index class. More...

#include <CvsEntries.h>

List of all members.

Public Types

enum {
kName = 0,
kExtention,
kRevision,
kOption,
kState,
kEncoding,
kStickyTag,
kTimeStamp,
kConflict,
kPath,
kEnd
}
Column index enum. More...

Static Public Member Functions

const char * GetColumnName (const int index, const bool shortName=true)

Private Member Functions

ColumnIndex ()

Detailed Description

Column index class.

Definition at line 50 of file CvsEntries.h.

Member Enumeration Documentation

anonymous enum

Column index enum.

Enumeration values:
kName | Name
kExtention | Extension
kRevision | Revision number
kOption | Keyword expansion option
kState | File state
kEncoding | File Encoding
kStickyTag | Sticky tag
kTimeStamp | Time stamp
kConflict | Conflict
kPath | Path
kEnd | Marker of the last index only
Definition at line 58 of file CvsEntries.h.
00059     {
00060         kName = 0,
00061         kExtention,
00062         kRevision,
00063         kOption,
00064         kState,
00065         kEncoding,
00066         kStickyTag,
00067         kTimeStamp,
00068         kConflict,
00069         kPath,
00070         kEnd
00071     };

Constructor & Destructor Documentation

ColumnIndex::ColumnIndex ( ) [private]

Definition at line 217 of file CvsEntries.cpp.

00218 {
00219 }

Member Function Documentation

const char * ColumnIndex::GetColumnName | ( | const int | index,
 |  | const bool | shortName = true
 | ) | [static]

Get the name for a given column index

Parameters:
index | The column index
shortName | true to retrieve the short column name, false to get the long name
Returns:
The column name
Definition at line 227 of file CvsEntries.cpp.

References _i18n, kConflict, kEncoding, kExtention, kName, kOption, kPath, kRevision, kState, kStickyTag, and kTimeStamp.

Referenced by KoConflictColumn::GetSetupData(), KoDateColumn::GetSetupData(), KoTagColumn::GetSetupData(), KoStateColumn::GetSetupData(), KoEncodingColumn::GetSetupData(), KoOptionColumn::GetSetupData(), KoRevisionColumn::GetSetupData(), KoPathColumn::GetSetupData(), KoExtColumn::GetSetupData(), and KoNameColumn::GetSetupData().

00228 {
00229     switch( index )
00230     {
00231     case kName:
00232         return shortName ? _i18n("Name") : _i18n("Filename");
00233     case kExtention:
00234         return shortName ? _i18n("Ext") : _i18n("Extension");
00235     case kRevision:
00236         return shortName ? _i18n("Rev.") : _i18n("Revision");
00237     case kOption:
00238         return shortName ? _i18n("Option") : _i18n("Keyword Expansion Option");
00239     case kState:
00240         return _i18n("State");
00241     case kEncoding:
00242         return _i18n("Encoding");
00243     case kStickyTag:
00244         return shortName ? _i18n("Tag") : _i18n("Sticky Tag");
00245     case kTimeStamp:
00246         return _i18n("Timestamp");
00247     case kConflict:
00248         return _i18n("Conflict");
00249     case kPath:
00250         return _i18n("Path");
00251     }
00252
00253     return "";
00254 }

The documentation for this class was generated from the following files:
  • common/CvsEntries.h
  • common/CvsEntries.cpp
Generated on Sat Aug 7 22:55:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ControlCvsArgs Class Reference

ControlCvsArgs Class Reference

Base class for control arguments used by add commands (added files are tested appropriate). More...

#include <CvsArgs.h>

Inheritance diagram for ControlCvsArgs:

[legend]
Collaboration diagram for ControlCvsArgs:

[legend]
List of all members.

Public Member Functions

ControlCvsArgs ()
virtual void | addfile (const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L)
bool | HasProblem (void) const
void | SetProblem (bool newState)

Protected Member Functions

virtual kTextBinTYPE | FileIsType (const char *arg, const char *dir, const FSSpec *spec=0L)=0
Virtual override to test the file type.
virtual const char * | TypeDesc ()=0
Virtual override to get the type description.

Private Attributes

bool m_gotProblem

Detailed Description

Base class for control arguments used by add commands (added files are tested appropriate).

Definition at line 68 of file CvsArgs.h.

Constructor & Destructor Documentation

ControlCvsArgs::ControlCvsArgs ( ) [inline]

Definition at line 71 of file CvsArgs.h.

References m_gotProblem.

00071 : m_gotProblem(false) { }

Member Function Documentation

void ControlCvsArgs::addfile | ( | const char * | arg,
 |  | const char * | dir = 0L,
 |  | const FSSpec * | spec = 0L,
 |  | const char * | currRevision = 0L
 | ) | [virtual]

Add file

Parameters:
arg | File to be added
dir | Directory of the file
spec | UFS Spec
currRevision | Current revision
Returns:
true on success, false otherwise

Reimplemented from CvsArgs.

Definition at line 353 of file CvsArgs.cpp.

References CvsPrefs::AddControl(), CvsArgs::addfile(), cvs_err(), FileIsType(), gCvsPrefs, ISO8559_none, CvsPrefs::IsoConvert(), kBinIsText, kBinIsUnicode, kBinWrongSig, kFileInvalidName, kFileIsAlias, kFileIsOK, kFileMissing, kTextBinTYPE, kTextEscapeChar, kTextIsBinary, kTextIsUnicode, kTextWrongLF, kTextWrongSig, kUnicodeIsBinary, kUnicodeIsText, and SetProblem().

00355 {
00356     CvsArgs::addfile(arg, dir, spec);
00357
00358     if( !gCvsPrefs.AddControl() )
00359         return;
00360
00361     kTextBinTYPE state = FileIsType(arg, dir, spec);
00362     switch(state)
00363     {
00364     case kFileIsOK:
00365         break;
00366
00367     case kFileMissing:
00368         // we can resurect a file which is missing by re-adding it
00369         break;
00370
00371     case kFileIsAlias:
00372         cvs_err("Warning : \'%s\' is an alias\n", arg);
00373         SetProblem(true);
00374         break;
00375
00376     case kFileInvalidName:
00377         cvs_err("Warning : \'%s\' has an invalid name\n", arg);
00378         SetProblem(true);
00379         break;
00380
00381     case kTextWrongLF:
00382         cvs_err("Warning : \'%s\' seems to have the wrong line feed for this machine, you should correct it first\n", arg);
00383         SetProblem(true);
00384         break;
00385
00386     case kUnicodeIsBinary: // fall thru intentional
00387     case kTextIsBinary:
00388         cvs_err("Warning : \'%s\' seems to be \'binary\', you should use the \'Add binary\' command instead...\n", arg);
00389         SetProblem(true);
00390         break;
00391
00392     case kTextEscapeChar:
00393 #ifdef TARGET_OS_MAC
00394         if(gCvsPrefs.IsoConvert() == ISO8559_none)
00395         {
00396             cvs_err("Warning : \'%s\' has some escape characters in it (0x00-0x20, 0x80-0xFF),\n", arg);
00397             cvs_err("Warning   so you may need to have the ISO8559 translation option set in the preferences\n");
00398             cvs_err("Warning   before commiting\n");
00399         }
00400 #else /* !TARGET_OS_MAC */
00401         cvs_err("Warning : \'%s\' has some escape characters in it (0x00-0x20, 0x80-0xFF), you should correct it first\n", arg);
00402 #endif /* !TARGET_OS_MAC */
00403         break;
00404
00405     case kTextWrongSig:
00406 #if TARGET_RT_MAC_MACHO
00407         cvs_err("Warning : \'%s\' has a file type different from \'TEXT\' or 0, you should correct it first\n", arg);
00408 #else
00409         cvs_err("Warning : \'%s\' has a file type different from \'TEXT\', you should correct it first\n", arg);
00410 #endif
00411         SetProblem(true);
00412         break;
00413
00414     case kUnicodeIsText: // fall thru intentional
00415     case kBinIsText:
00416         cvs_err("Warning : \'%s\' seems to be a text file, you should consider to use the \'Add selection\' command instead\n", arg);
00417         SetProblem(true);
00418         break;
00419
00420     case kBinWrongSig:
00421         cvs_err("Warning : \'%s\' has a file type of \'TEXT\', you should correct it first\n", arg);
00422         SetProblem(true);
00423         break;
00424
00425     case kTextIsUnicode: // fall thru intentional
00426     case kBinIsUnicode:
00427         cvs_err("Warning : \'%s\' seems to be an Unicode file, you should consider to use the \'Add unicode\' command instead\n", arg);
00428         SetProblem(true);
00429         break;
00430
00431     default:
00432         cvs_err("Warning : \'%s\' has some unknown problems\n", arg);
00433         SetProblem(true);
00434         break;
00435     }
00436 }

Here is the call graph for this function:

virtual kTextBinTYPE ControlCvsArgs::FileIsType | ( | const char * | arg,
 |  | const char * | dir,
 |  | const FSSpec * | spec = 0L
 | ) | [protected, pure virtual]

Virtual override to test the file type.

Implemented in AddCvsArgs, AddBinCvsArgs, and AddUnicodeCvsArgs.

Referenced by addfile().

bool ControlCvsArgs::HasProblem ( void ) const

Get the problem indicator

Returns:
true if there is a problem, false if all correct
Definition at line 442 of file CvsArgs.cpp.

References m_gotProblem.

Referenced by CvsCmdAdd().

00443 {
00444     return m_gotProblem;
00445 }

void ControlCvsArgs::SetProblem ( bool newState )

Set the problem indicator

Parameters:
newState New state of the problem indicator
Definition at line 451 of file CvsArgs.cpp.

References m_gotProblem.

Referenced by addfile().

00452 {
00453     m_gotProblem = newState;
00454 }

virtual const char* ControlCvsArgs::TypeDesc ( ) [protected, pure virtual]

Virtual override to get the type description.

Implemented in AddCvsArgs, AddBinCvsArgs, and AddUnicodeCvsArgs.

Member Data Documentation

bool ControlCvsArgs::m_gotProblem [private]

Problem indicator Definition at line 87 of file CvsArgs.h.

Referenced by ControlCvsArgs(), HasProblem(), and SetProblem().

The documentation for this class was generated from the following files:
  • common/CvsArgs.h
  • common/CvsArgs.cpp
Generated on Sat Aug 7 22:55:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: option Struct Reference

option Struct Reference

#include <getopt.h>

Collaboration diagram for option:

[legend]
List of all members.

Public Attributes

const char * name
int has_arg
int * flag
int val

Member Data Documentation

int* option::flag

Definition at line 89 of file getopt.h.

int option::has_arg

Definition at line 88 of file getopt.h.

const char* option::name

Definition at line 82 of file getopt.h.

int option::val

Definition at line 90 of file getopt.h.

The documentation for this struct was generated from the following file:
  • common/getopt.h
Generated on Sat Aug 7 22:55:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: COptionalPropertySheet Class Reference

COptionalPropertySheet Class Reference

#include <OptionalPropertySheet.h>

Inheritance diagram for COptionalPropertySheet:

[legend]
Collaboration diagram for COptionalPropertySheet:

[legend]
List of all members.

Public Member Functions

COptionalPropertySheet (bool bOptionChecked, UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
COptionalPropertySheet (bool bOptionChecked, LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0)
virtual int | DoModal ()
DoModal virtual override, check the Shift key and the hide command option settings.
virtual | ~COptionalPropertySheet ()
bool GetHideCommandDlg ()
Get the hide command option value.

Protected Member Functions

virtual BOOL | OnCommand (WPARAM wParam, LPARAM lParam)
OnCommand virtual override, save the state of the hide command option checkbox if the OK button was pressed.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, create and add the.
virtual void | InitHelpID ()
InitHelpID virtual override, enable direct use of CHHelpPropertySheet.
void | GetOptionCheckRect (LPRECT lpRect)

Protected Attributes

bool m_bOptionChecked
CButton | m_optionCheck

Constructor & Destructor Documentation

COptionalPropertySheet::COptionalPropertySheet | ( | bool | bOptionChecked,
 |  | UINT | nIDCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |

Definition at line 42 of file OptionalPropertySheet.cpp.

00043     :CHHelpPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00044 {
00045     m_bOptionChecked = bOptionChecked;
00046 }

COptionalPropertySheet::COptionalPropertySheet | ( | bool | bOptionChecked,
 |  | LPCTSTR | pszCaption,
 |  | CWnd * | pParentWnd = NULL,
 |  | UINT | iSelectPage = 0
 | ) |

Definition at line 48 of file OptionalPropertySheet.cpp.

References m_bOptionChecked.

00049     :CHHelpPropertySheet(pszCaption, pParentWnd, iSelectPage)
00050 {
00051     m_bOptionChecked = bOptionChecked;
00052 }

COptionalPropertySheet::~COptionalPropertySheet ( ) [virtual]

Definition at line 54 of file OptionalPropertySheet.cpp.

00055 {
00056 }

Member Function Documentation

int COptionalPropertySheet::DoModal ( ) [virtual]

DoModal virtual override, check the Shift key and the hide command option settings.

Definition at line 151 of file OptionalPropertySheet.cpp.

References IsHideCommandKeyPressed(), and m_bOptionChecked.

00152 {
00153     return !m_bOptionChecked || (m_bOptionChecked && IsHideCommandKeyPressed()) ? CHHelpPropertySheet::DoModal() : IDOK;
00154 }

Here is the call graph for this function:

bool COptionalPropertySheet::GetHideCommandDlg ( )

Get the hide command option value.

Definition at line 169 of file OptionalPropertySheet.cpp.

References m_bOptionChecked.

00170 {
00171     return m_bOptionChecked;
00172 }

void COptionalPropertySheet::GetOptionCheckRect ( LPRECT lpRect ) [protected]

Calculate the rectangle for the option check box window

Parameters:
lpRect Return rectangle for the option check box window
Definition at line 101 of file OptionalPropertySheet.cpp.

References IsLargeFonts().

00102 {
00103     if( lpRect )
00104     {
00105         CWnd* pOkWnd = GetDlgItem(IDOK);
00106         if( pOkWnd )
00107         {
00108             CRect rectOkWnd;
00109             pOkWnd->GetWindowRect(rectOkWnd);
00110
00111             CRect rectWnd;
00112             GetWindowRect(rectWnd);
00113
00114             const int margin = rectWnd.bottom - rectOkWnd.bottom;
00115             const int height = IsLargeFonts() ? 19 : 16;
00116             const int width = rectOkWnd.left  - rectWnd.left - (margin * 2);
00117
00118             GetClientRect(rectWnd);
00119
00120             lpRect->left = rectWnd.left + margin;
00121             lpRect->right = lpRect->left + width;
00122
00123             lpRect->bottom = rectWnd.bottom - margin - (rectOkWnd.Height() - height) / 4;
00124             lpRect->top = lpRect->bottom - height;
00125         }
00126         else
00127         {
00128             ASSERT(FALSE);  // Can't get the OK button window?
00129
00130             CRect rectWnd;
00131             GetClientRect(rectWnd);
00132
00133             rectWnd.bottom -= 13;
00134             rectWnd.left   += 7;
00135             rectWnd.top     = rectWnd.bottom - (IsLargeFonts() ? 19 : 16);
00136             rectWnd.right   = rectWnd.left   + (IsLargeFonts() ? 235 : 180);
00137
00138             lpRect->bottom = rectWnd.bottom;
00139             lpRect->left = rectWnd.left;
00140             lpRect->top = rectWnd.top;
00141             lpRect->right = rectWnd.right;
00142         }
00143     }
00144     else
00145     {
00146         ASSERT(FALSE);  // Bad pointer
00147     }
00148 }

Here is the call graph for this function:

void COptionalPropertySheet::InitHelpID ( ) [protected, virtual]

InitHelpID virtual override, enable direct use of CHHelpPropertySheet.

Reimplemented from CHHelpPropertySheet.

Definition at line 92 of file OptionalPropertySheet.cpp.

References IDC_OPTIONCHECK_BUTTON, IDH_IDC_OPTIONCHECK_BUTTON, and CHHelpSupport::SetCtrlHelpID().

00093 {
00094     SetCtrlHelpID(IDC_OPTIONCHECK_BUTTON, IDH_IDC_OPTIONCHECK_BUTTON);
00095 }

Here is the call graph for this function:

BOOL COptionalPropertySheet::OnCommand | ( | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected, virtual]

OnCommand virtual override, save the state of the hide command option checkbox if the OK button was pressed.

Definition at line 157 of file OptionalPropertySheet.cpp.

References m_bOptionChecked, and m_optionCheck.

00158 {
00159     if( wParam == IDOK )
00160     {
00161         // Save the check state of the display option
00162         m_bOptionChecked = (m_optionCheck.GetCheck() == 1);
00163     }
00164
00165     return CHHelpPropertySheet::OnCommand(wParam, lParam);
00166 }

BOOL COptionalPropertySheet::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, create and add the.

Reimplemented from CHHelpPropertySheet.

Definition at line 68 of file OptionalPropertySheet.cpp.

References gCvsPrefs, CvsPrefs::HideCommandDlgUseShift(), IDC_OPTIONCHECK_BUTTON, and CHHelpPropertySheet::OnInitDialog().

00069 {
00070     CHHelpPropertySheet::OnInitDialog();
00071
00072     // Add the option check box
00073     CRect rectWnd;
00074     GetOptionCheckRect(rectWnd);
00075
00076     CString strOptionText;
00077     strOptionText.Format(_T("Display only if %s key is down"), gCvsPrefs.HideCommandDlgUseShift() ? "Shift" : "Ctrl");
00078
00079     m_optionCheck.Create(strOptionText,
00080         WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | WS_TABSTOP,
00081         rectWnd, this, IDC_OPTIONCHECK_BUTTON);
00082
00083     m_optionCheck.SetFont(GetFont());
00084
00085     // Set the checkbox
00086     m_optionCheck.SetCheck(m_bOptionChecked);
00087
00088     return TRUE;  // return TRUE unless you set the focus to a control
00089                   // EXCEPTION: OCX Property Pages should return FALSE
00090 }

Here is the call graph for this function:

Member Data Documentation

bool COptionalPropertySheet::m_bOptionChecked [protected]

The initial state of the option check box Definition at line 71 of file OptionalPropertySheet.h.

Referenced by COptionalPropertySheet(), DoModal(), GetHideCommandDlg(), and OnCommand().

CButton COptionalPropertySheet::m_optionCheck [protected]

The object wrapping the option check box Definition at line 72 of file OptionalPropertySheet.h.

Referenced by OnCommand().

The documentation for this class was generated from the following files:
  • common/OptionalPropertySheet.h
  • common/OptionalPropertySheet.cpp
Generated on Sat Aug 7 22:55:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: OUTBAR_INFO Struct Reference

OUTBAR_INFO Struct Reference

#include <GfxOutBarCtrl.h>

Collaboration diagram for OUTBAR_INFO:

[legend]
List of all members.

Public Attributes

int index
int iDragFrom
int iDragTo
LPCTSTR cText

Member Data Documentation

LPCTSTR OUTBAR_INFO::cText

Definition at line 56 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::OnEndLabelEdit().

int OUTBAR_INFO::iDragFrom

Definition at line 53 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::OnLButtonDown().

int OUTBAR_INFO::iDragTo

Definition at line 54 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::OnLButtonDown().

int OUTBAR_INFO::index

Definition at line 52 of file GfxOutBarCtrl.h.

Referenced by CGfxOutBarCtrl::OnEndLabelEdit().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/GfxOutBarCtrl.h
Generated on Sat Aug 7 22:55:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPathBuffer Class Reference

CPathBuffer Class Reference

Support class to handle the selection buffer. More...

#include <MfFileDialog.h>

Collaboration diagram for CPathBuffer:

[legend]
List of all members.

Public Member Functions

CPathBuffer ()
virtual | ~CPathBuffer ()
void | Clear ()
Release allocated buffer memory.
TCHAR * | GetBuffer (int size=0)

Private Attributes

int m_bufferSize
TCHAR * | m_buffer

Detailed Description

Support class to handle the selection buffer.

Definition at line 35 of file MfFileDialog.h.

Constructor & Destructor Documentation

CPathBuffer::CPathBuffer ( )

Definition at line 45 of file MfFileDialog.cpp.

References m_buffer, m_bufferSize, and NULL.

00046 {
00047     m_bufferSize = 0;
00048     m_buffer = NULL;
00049 }

CPathBuffer::~CPathBuffer ( ) [virtual]

Definition at line 51 of file MfFileDialog.cpp.

References Clear().

00052 {
00053     Clear();
00054 }

Here is the call graph for this function:

Member Function Documentation

void CPathBuffer::Clear ( ) [inline]

Release allocated buffer memory.

Definition at line 57 of file MfFileDialog.cpp.

References m_buffer, m_bufferSize, and NULL.

Referenced by GetBuffer(), and ~CPathBuffer().

00058 {
00059     m_bufferSize = 0;
00060     delete [] m_buffer;
00061     m_buffer = NULL;
00062 }

TCHAR * CPathBuffer::GetBuffer ( int size = 0 ) [inline]

Get the buffer of the specified size

Parameters:
size Size of the required buffer, specify zero to get the current buffer
Returns:
The pointer to the buffer, NULL on error
Definition at line 69 of file MfFileDialog.cpp.

References Clear(), m_buffer, and m_bufferSize.

Referenced by CMfFileDialog::OnFileNameChange().

00070 {
00071     if( size > m_bufferSize )
00072     {
00073         Clear();
00074
00075         m_bufferSize = size;
00076         m_buffer = new TCHAR[size];
00077     }
00078
00079     return m_buffer;
00080 }

Here is the call graph for this function:

Member Data Documentation

TCHAR* CPathBuffer::m_buffer [private]

Buffer to hold the selection Definition at line 45 of file MfFileDialog.h.

Referenced by Clear(), CPathBuffer(), and GetBuffer().

int CPathBuffer::m_bufferSize [private]

Buffer size Definition at line 44 of file MfFileDialog.h.

Referenced by Clear(), CPathBuffer(), and GetBuffer().

The documentation for this class was generated from the following files:
  • WinCvs/MfFileDialog.h
  • WinCvs/MfFileDialog.cpp
Generated on Sat Aug 7 22:55:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PCPStr Class Reference

PCPStr Class Reference

Persistent P string. More...

#include <CPStr.h>

Inheritance diagram for PCPStr:

[legend]
Collaboration diagram for PCPStr:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
PCPStr (const char *uniqueName, const char *defValue=0L, kClassPersistent pclass=kNoClass)
virtual | ~PCPStr ()
virtual unsigned int | SizeOf (void) const
virtual const void * | GetData (void) const
virtual void | SetData (const void *ptr, unsigned int size)
operator const unsigned char * () const
Access the string as a P string.
operator const char * () const
Access the string as a C string.
PCPStr & | operator= (const char *newstr)
Set from a C String (0L is OK).
PCPStr & | operator= (const unsigned char *newstr)
Set from a P String (0L is OK).

Static Public Member Functions

const URuntimeClass * | rtPCPStr (void)

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()

Static Protected Attributes

const URuntimeClass | classPCPStr

Detailed Description

Persistent P string.

Definition at line 45 of file CPStr.h.

Constructor & Destructor Documentation

PCPStr::PCPStr | ( | const char * | uniqueName,
 |  | const char * | defValue = 0L,
 |  | kClassPersistent | pclass = kNoClass
 | ) | [inline]

Definition at line 94 of file CPStr.h.

References CPStr.

00095     : CPStr(), CPersistent(uniqueName, pclass)
00096 {
00097     if( defValue != 0L )
00098         *(CPStr*)this = defValue;
00099 }

PCPStr::~PCPStr ( ) [virtual]

Definition at line 33 of file CPStr.cpp.

00034 {
00035 }

Member Function Documentation

const URuntimeClass * PCPStr::_GetBaseClass ( ) [static, protected]

Reimplemented from CPersistent.

Definition at line 106 of file Persistent.cpp.

const void * PCPStr::GetData ( void ) const [virtual]

Get the string data

Returns:
The string data

Implements CPersistent.

Definition at line 50 of file CPStr.cpp.

References CPStr.

00051 {
00052     const void* res = (const char*)(*(CPStr*)this);
00053
00054     return res == 0L ? "" : res;
00055 }

const URuntimeClass * PCPStr::GetRuntimeClass ( ) const [virtual]

Reimplemented from CPersistent.

Definition at line 106 of file Persistent.cpp.

PCPStr::operator const char * ( ) const [inline]

Access the string as a C string.

Reimplemented from UPStr.

Definition at line 116 of file CPStr.h.

References CPStr.

00117 {
00118     return *(CPStr*)this;
00119 }

PCPStr::operator const unsigned char * ( ) const [inline]

Access the string as a P string.

Reimplemented from UPStr.

Definition at line 102 of file CPStr.h.

References CPStr.

00103 {
00104     return *(CPStr*)this;
00105 }

PCPStr & PCPStr::operator= ( const unsigned char * newstr ) [inline]

Set from a P String (0L is OK).

Reimplemented from UPStr.

Definition at line 137 of file CPStr.h.

References CPStr.

00138 {
00139     ((CPStr*)this)->operator=(newstr);
00140     return *this;
00141 }

PCPStr & PCPStr::operator= ( const char * newstr ) [inline]

Set from a C String (0L is OK).

Reimplemented from UPStr.

Definition at line 130 of file CPStr.h.

References CPStr.

00131 {
00132     ((CPStr*)this)->operator=(newstr);
00133     return *this;
00134 }

const URuntimeClass * PCPStr::rtPCPStr ( void ) [static]

Definition at line 106 of file Persistent.cpp.

void PCPStr::SetData | ( | const void * | ptr,
 |  | unsigned int | size
 | ) | [virtual]

Set the string data

Parameters:
ptr | String data
size | String data size

Implements CPersistent.

Definition at line 62 of file CPStr.cpp.

References CPStr.

00063 {
00064     if(strlen((const char*)ptr) == (size - 1))
00065         *(CPStr*)this = (const char*)ptr;
00066 }

unsigned int PCPStr::SizeOf ( void ) const [virtual]

Get the size of string

Returns:
The size of string

Implements CPersistent.

Definition at line 41 of file CPStr.cpp.

References UPStr::length().

00042 {
00043     return m_str != 0L ? length() + 1 : 1;
00044 }

Here is the call graph for this function:

Member Data Documentation

const URuntimeClass PCPStr::classPCPStr [static, protected]

The documentation for this class was generated from the following files:
  • common/CPStr.h
  • common/CPStr.cpp
  • common/Persistent.cpp
Generated on Sat Aug 7 22:55:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PCStr Class Reference

PCStr Class Reference

Persistent C string. More...

#include <CPStr.h>

Inheritance diagram for PCStr:

[legend]
Collaboration diagram for PCStr:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
PCStr (const char *uniqueName, const char *defValue=0L, kClassPersistent pclass=kNoClass)
virtual | ~PCStr ()
virtual unsigned int | SizeOf (void) const
virtual const void * | GetData (void) const
virtual void | SetData (const void *ptr, unsigned int size)
operator const char * () const
Access the string as a C string.
PCStr & | operator= (const char *newstr)
Set from a C String (0L is OK).
PCStr & | operator= (const unsigned char *newstr)
Set from a P String (0L is OK).

Static Public Member Functions

const URuntimeClass * | rtPCStr (void)

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()

Static Protected Attributes

const URuntimeClass | classPCStr

Detailed Description

Persistent C string.

Definition at line 70 of file CPStr.h.

Constructor & Destructor Documentation

PCStr::PCStr | ( | const char * | uniqueName,
 |  | const char * | defValue = 0L,
 |  | kClassPersistent | pclass = kNoClass
 | ) | [inline]

Definition at line 146 of file CPStr.h.

References CStr.

00147     : CStr(), CPersistent(uniqueName, pclass)
00148 {
00149     if( defValue != 0L )
00150         *(CStr*)this = defValue;
00151 }

PCStr::~PCStr ( ) [virtual]

Definition at line 71 of file CPStr.cpp.

00072 {
00073 }

Member Function Documentation

const URuntimeClass * PCStr::_GetBaseClass ( ) [static, protected]

Reimplemented from CPersistent.

Definition at line 105 of file Persistent.cpp.

const void * PCStr::GetData ( void ) const [virtual]

Get the string data

Returns:
The string data

Implements CPersistent.

Definition at line 88 of file CPStr.cpp.

References CStr.

00089 {
00090     const void* res = (const char*)(*(CStr*)this);
00091     return res == 0L ? "" : res;
00092 }

const URuntimeClass * PCStr::GetRuntimeClass ( ) const [virtual]

Reimplemented from CPersistent.

Definition at line 105 of file Persistent.cpp.

PCStr::operator const char * ( ) const [inline]

Access the string as a C string.

Reimplemented from UStr.

Definition at line 154 of file CPStr.h.

References CStr.

00155 {
00156     return *(CStr*)this;
00157 }

PCStr & PCStr::operator= ( const unsigned char * newstr ) [inline]

Set from a P String (0L is OK).

Reimplemented from UStr.

Definition at line 176 of file CPStr.h.

References CStr, and CPersistent::TouchTimeStamp().

00177 {
00178     TouchTimeStamp();
00179     ((CStr*)this)->operator=(newstr);
00180     return *this;
00181 }

Here is the call graph for this function:

PCStr & PCStr::operator= ( const char * newstr ) [inline]

Set from a C String (0L is OK).

Reimplemented from UStr.

Definition at line 168 of file CPStr.h.

References CStr, and CPersistent::TouchTimeStamp().

00169 {
00170     TouchTimeStamp();
00171     ((CStr*)this)->operator=(newstr);
00172     return *this;
00173 }

Here is the call graph for this function:

const URuntimeClass * PCStr::rtPCStr ( void ) [static]

Definition at line 105 of file Persistent.cpp.

void PCStr::SetData | ( | const void * | ptr,
 |  | unsigned int | size
 | ) | [virtual]

Set the string data

Parameters:
ptr | String data
size | String data size

Implements CPersistent.

Definition at line 99 of file CPStr.cpp.

References CStr.

00100 {
00101     if( strlen((const char*)ptr) == (size - 1) )
00102         *(CStr*)this = (const char*)ptr;
00103 }

unsigned int PCStr::SizeOf ( void ) const [virtual]

Get the size of string

Returns:
The size of string

Implements CPersistent.

Definition at line 79 of file CPStr.cpp.

References UStr::length().

00080 {
00081     return m_str != 0L ? length() + 1 : 0;
00082 }

Here is the call graph for this function:

Member Data Documentation

const URuntimeClass PCStr::classPCStr [static, protected]

The documentation for this class was generated from the following files:
  • common/CPStr.h
  • common/CPStr.cpp
  • common/Persistent.cpp
Generated on Sat Aug 7 22:55:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPen Class Reference

UPen Class Reference

#include <udraw.h>

Collaboration diagram for UPen:

[legend]
List of all members.

Public Member Functions

UPen ()
~UPen ()
bool | DeleteObject (void)
bool | CreatePen (int nPenStyle, int nWidth, UCOLORREF crColor)

Protected Attributes

int m_width
int m_style

Constructor & Destructor Documentation

UPen::UPen ( )

Definition at line 382 of file udraw.cpp.

00384     : m_set(false)
00385 #endif
00386 {
00387 }

UPen::~UPen ( )

Definition at line 389 of file udraw.cpp.

References DeleteObject().

00390 {
00391     DeleteObject();
00392 }

Here is the call graph for this function:

Member Function Documentation

bool UPen::CreatePen | ( | int | nPenStyle,
 |  | int | nWidth,
 |  | UCOLORREF | crColor
 | ) |

Definition at line 414 of file udraw.cpp.

References DeleteObject(), m_style, m_width, UCOLORREF, UGetBValue, UGetGValue, and UGetRValue.

Referenced by DrawNode(), and CWinLogData::Update().

00415 {
00416     bool res = false;
00417
00418     m_width = nWidth;
00419     m_style = nPenStyle;
00420
00421 #if qGTK
00422     DeleteObject();
00423     GdkColormap *cmap = gdk_colormap_get_system();
00424     if(cmap != 0L)
00425     {
00426         m_col.red = UGetRValue(crColor) << 8;
00427         m_col.green = UGetGValue(crColor) << 8;
00428         m_col.blue = UGetBValue(crColor) << 8;
00429         if(gdk_color_alloc(cmap, &m_col))
00430             m_set = true;
00431     }
00432     res = m_set;
00433 #endif
00434     return res;
00435 }

Here is the call graph for this function:

bool UPen::DeleteObject ( void )

Definition at line 394 of file udraw.cpp.

Referenced by CreatePen(), DrawNode(), CWinLogData::Update(), and ~UPen().

00395 {
00396     bool res = false;
00397 #if qGTK
00398     if(m_set)
00399     {
00400         m_set = false;
00401         GdkColormap *cmap = gdk_colormap_get_system();
00402         if(cmap != 0L)
00403         {
00404             gdk_colormap_free_colors(cmap, &m_col, 1);
00405             res = true;
00406         }
00407     }
00408     else
00409         res = true;
00410 #endif
00411     return res;
00412 }

Member Data Documentation

int UPen::m_style [protected]

Definition at line 473 of file udraw.h.

Referenced by CreatePen().

int UPen::m_width [protected]

Definition at line 472 of file udraw.h.

Referenced by CreatePen().

The documentation for this class was generated from the following files:
  • rf/udraw.h
  • rf/udraw.cpp
Generated on Sat Aug 7 22:55:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPersistent Class Reference

CPersistent Class Reference

Abstract class to access the persistent data to load/save. More...

#include <Persistent.h>

Inheritance diagram for CPersistent:

[legend]
Collaboration diagram for CPersistent:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
CPersistent (const char *uniqueName, kClassPersistent pclass)
virtual | ~CPersistent ()
void | ResetTimeStamp ()
Reset the time stamp.
long | GetTimeStamp () const
Get the time stamp.
void | TouchTimeStamp ()
Update time stamp.

Static Public Member Functions

const URuntimeClass * | rtCPersistent (void)
void | SaveAll (void)
bool | LoadAll (const char *only=0L)
bool | SaveAllSettings (const char *settingFileName, const char *filePath)
CPersistentEntry * | Find (const char *uniqueName)
bool | NeedSave (bool onlySettings=false)

Protected Member Functions

virtual unsigned int | SizeOf (void) const =0L
Get the size of the data.
virtual const void * | GetData (void) const =0L
Get the data.
virtual void | SetData (const void *ptr, unsigned int size)=0L
Set the data.

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()

Protected Attributes

long | m_fTimeStamp

Static Protected Attributes

const URuntimeClass | classCPersistent
std::vector< CPersistentEntry > * | m_fAllEntries = 0L

Static Private Member Functions

void | Register (CPersistent *value, const char *uniqueName, kClassPersistent pclass)
void | UnRegister (CPersistent *value)

Detailed Description

Abstract class to access the persistent data to load/save.

Definition at line 81 of file Persistent.h.

Constructor & Destructor Documentation

CPersistent::CPersistent | ( | const char * | uniqueName,
 |  | kClassPersistent | pclass
 | ) |

Definition at line 108 of file Persistent.cpp.

00108                                                                         : m_fTimeStamp(0)
00109 {
00110     Register(this, uniqueName, pclass);
00111     TouchTimeStamp();
00112 }

CPersistent::~CPersistent ( ) [virtual]

Definition at line 114 of file Persistent.cpp.

References UnRegister().

00115 {
00116     UnRegister(this);
00117 }

Here is the call graph for this function:

Member Function Documentation

const URuntimeClass * CPersistent::_GetBaseClass ( ) [static, protected]

Reimplemented from UObject.

Reimplemented in PCPStr, PCStr, CMString, CMPString, CPersistentBool, and CPersistentInt.

Definition at line 102 of file Persistent.cpp.

CPersistent::CPersistentEntry * CPersistent::Find ( const char * uniqueName ) [static]

Find given setting

Parameters:
uniqueName Name of the setting to fing
Returns:
The setting pointer if found, NULL otherwise
Definition at line 796 of file Persistent.cpp.

References m_fAllEntries, and CPersistent::CPersistentEntry::m_fUniqueName.

Referenced by _loadPersistentSettings(), and LoadAll().

00797 {
00798     std::vector<CPersistentEntry>::iterator i;
00799     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00800     {
00801         CPersistentEntry& entry = *i;
00802         if( !strcmp(uniqueName, entry.m_fUniqueName) )
00803             return &entry;
00804     }
00805
00806     return 0L;
00807 }

virtual const void* CPersistent::GetData ( void ) const [protected, pure virtual]

Get the data.

Implemented in PCPStr, PCStr, TMPersistent< T >, TMString< T >, CPersistentT< T >, CWinPlacement, CMMenuString, TMString< UStr >, TMString< UPStr >, CPersistentT< int >, and CPersistentT< bool >.

Referenced by SaveAll().

const URuntimeClass * CPersistent::GetRuntimeClass ( ) const [virtual]

Reimplemented from UObject.

Reimplemented in PCPStr, PCStr, CMString, CMPString, CPersistentBool, and CPersistentInt.

Definition at line 102 of file Persistent.cpp.

long CPersistent::GetTimeStamp ( ) const [inline]

Get the time stamp.

Definition at line 118 of file Persistent.h.

References m_fTimeStamp.

00118 { return m_fTimeStamp; }

bool CPersistent::LoadAll ( const char * only = 0L ) [static]

Load the registered values

Parameters:
only Force load only this persistent value
Returns:
true on success, false otherwise
Definition at line 491 of file Persistent.cpp.

References CStaticAllocT< T >::AdjustSize(), CFString_to_UStr(), CPStr, CStr, cvs_err(), err, Find(), gCvsPrefs, TMString< T >::GetList(), gOldCvsroots, CvsPrefs::Home(), TMString< T >::Insert(), UObject::IsKindOf(), m_fAllEntries, CPersistent::CPersistentEntry::m_fUniqueName, CPersistent::CPersistentEntry::m_fValue, NULL, NUM_CVSROOT, PROFILE_NAME, ResetTimeStamp(), SetData(), and URUNTIME_CLASS.

Referenced by PyPersistent::Create(), and CvsPrefs::load().

00492 {
00493     bool found_one = false;
00494 #ifndef qUnix
00495     std::vector<CPersistentEntry>::iterator i;
00496 #endif
00497 #ifdef TARGET_OS_MAC
00498   Boolean   keyExists(false);
00499   UInt32    prefsVersion;
00500   if ( CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication) )
00501     prefsVersion = CFPreferencesGetAppIntegerValue(CFSTR("MacCvs:PrefsVersion"), kCFPreferencesCurrentApplication, &keyExists);
00502   if ( keyExists ) {
00503
00504     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00505     {
00506         CPersistentEntry& entry = *i;
00507         CFStringRef       key(CFStringCreateWithCString(NULL, entry.m_fUniqueName, kCFStringEncodingASCII));
00508         if ( key ) {
00509             keyExists = false;
00510
00511             if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentBool)) )
00512             {
00513               Boolean   value(CFPreferencesGetAppBooleanValue(key, kCFPreferencesCurrentApplication, &keyExists));
00514               if ( keyExists ) *static_cast<CPersistentBool*>(entry.m_fValue) = (value == true);
00515             }
00516             else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentInt)) )
00517             {
00518               SInt32 value(CFPreferencesGetAppIntegerValue(key, kCFPreferencesCurrentApplication, &keyExists));
00519               if ( keyExists ) *static_cast<CPersistentInt*>(entry.m_fValue) = value;
00520             }
00521             else if( dynamic_cast<TMString<CStr>*>(entry.m_fValue) != NULL )
00522             {
00523               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00524               if ( value ) {
00525                 if ( CFGetTypeID(value) == CFArrayGetTypeID() ) {
00526                   static_cast<TMString<CStr>*>(entry.m_fValue)->RemoveAll();
00527                 CFArrayRef    valueArray = static_cast<CFArrayRef>(value);
00528                 CFIndex       itemCount(CFArrayGetCount(valueArray));
00529                 // MultiStrings only know how to insert at the beginning, so let's iterate backwards
00530                 for ( CFIndex i(itemCount); i > 0; --i ) {
00531                   CFTypeRef   stringValue(CFArrayGetValueAtIndex(valueArray, i-1));
00532                   if ( stringValue  &&  CFGetTypeID(stringValue) == CFStringGetTypeID() ) {
00533                     static_cast<TMString<CStr>*>(entry.m_fValue)->Insert(CFString_to_UStr(static_cast<CFStringRef>(stringValue), kCFStringEncodingUTF8));
00534                   }
00535                 }
00536                 keyExists = true;
00537               }
00538                 CFRelease(value);
00539               }
00540             }
00541             else if( dynamic_cast<TMString<CPStr>*>(entry.m_fValue) != NULL )
00542             {
00543               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00544               if ( value ) {
00545                 if ( CFGetTypeID(value) == CFArrayGetTypeID() ) {
00546                   static_cast<TMString<CPStr>*>(entry.m_fValue)->RemoveAll();
00547                 CFArrayRef    valueArray = static_cast<CFArrayRef>(value);
00548                 CFIndex       itemCount(CFArrayGetCount(valueArray));
00549                 // MultiStrings only know how to insert at the beginning, so let's iterate backwards
00550                 for ( CFIndex i(itemCount); i > 0 ; --i ) {
00551                   CFTypeRef   stringValue(CFArrayGetValueAtIndex(valueArray, i-1));
00552                   if ( stringValue  &&  CFGetTypeID(stringValue) == CFStringGetTypeID() ) {
00553                     static_cast<TMString<CPStr>*>(entry.m_fValue)->Insert(CFString_to_UStr(static_cast<CFStringRef>(stringValue), kCFStringEncodingUTF8));
00554                   }
00555                 }
00556                 keyExists = true;
00557               }
00558                 CFRelease(value);
00559               }
00560             }
00561             else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCStr)) )
00562             {
00563               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00564               if ( value  &&  CFGetTypeID(value) == CFStringGetTypeID() ) {
00565                 *(PCStr*)entry.m_fValue = CFString_to_UStr(static_cast<CFStringRef>(value), kCFStringEncodingUTF8);
00566                 keyExists = true;
00567                 CFRelease(value);
00568               }
00569             }
00570             else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCPStr)) )
00571             {
00572               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00573               if ( value  &&  CFGetTypeID(value) == CFStringGetTypeID() ) {
00574                 *(PCPStr*)entry.m_fValue = CFString_to_UStr(static_cast<CFStringRef>(value), kCFStringEncodingUTF8);
00575                 keyExists = true;
00576                 CFRelease(value);
00577               }
00578             }
00579             else
00580             {
00581               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00582               if ( value  &&  CFGetTypeID(value) == CFDataGetTypeID() ) {
00583                 entry.m_fValue->SetData(CFDataGetBytePtr(static_cast<CFDataRef>(value)), CFDataGetLength(static_cast<CFDataRef>(value)));
00584                 keyExists = true;
00585                 CFRelease(value);
00586               }
00587             }
00588
00589             if ( keyExists ) entry.m_fValue->ResetTimeStamp();
00590       }
00591       else cvs_err("Couldn't create prefs key for '%s'\n", static_cast<const char*>(entry.m_fUniqueName));
00592     }
00593   } else {
00594     // no CFPreferences based prefs yet -> attempt to read resource based settings
00595     FSRef thePrefFile;
00596     short FRef, oldRef;
00597     OSErr err;
00598
00599     err = GetPreferencesFile(thePrefFile);
00600
00601     if( err != noErr )
00602         return false;
00603
00604     oldRef = CurResFile();
00605     FRef = FSOpenResFile(&thePrefFile, fsRdPerm);
00606     if( FRef < 0 )
00607         return false;
00608
00609     CPStr name;
00610     UseResFile(FRef);
00611
00612     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00613     {
00614         CPersistentEntry& entry = *i;
00615         name = entry.m_fUniqueName;
00616
00617         Handle hdl = Get1NamedResource(kCVS_prefID, name);
00618         if( hdl == 0L || (only && strcmp(only, name) != 0) )
00619             continue;
00620
00621         HLock(hdl);
00622         found_one = true;
00623         entry.m_fValue->SetData(*hdl, GetHandleSize(hdl));
00624         entry.m_fValue->ResetTimeStamp();
00625         HUnlock(hdl);
00626     }
00627
00628     // migrate to the new gOldCvsroots container
00629     if( gOldCvsroots.GetList().size() == 0 && only == 0L )
00630     {
00631         for(int nIndex = 0; nIndex <= NUM_CVSROOT; nIndex++)
00632         {
00633             char tmp[20];
00634             sprintf(tmp, "P_Cvsroot%d", nIndex);
00635
00636             CPStr pstr(tmp);
00637             Handle hdl = Get1NamedResource(kCVS_prefID, pstr);
00638             if( hdl == 0L )
00639                 continue;
00640
00641             CStr root((char*)*hdl);
00642             if( !root.empty() )
00643                 gOldCvsroots.Insert(root);
00644         }
00645     }
00646
00647     CloseResFile(FRef);
00648     UseResFile(oldRef);
00649
00650     // and rename old prefs file
00651         LCFString str(kCVS_prefName " (old)");
00652         UniChar buffer[256];
00653         CFRange range = {0, str.GetLength()};
00654         ::CFStringGetCharacters(str, range, buffer);
00655     FSRenameUnicode(&thePrefFile, str.GetLength(), buffer, kTextEncodingUnknown, NULL);
00656   }
00657 #endif /* TARGET_OS_MAC */
00658 #ifdef WIN32
00659     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00660     {
00661         CPersistentEntry & entry = *i;
00662         BYTE* ppData;
00663         UINT pBytes;
00664
00665         if( only && strcmp(only, entry.m_fUniqueName) != 0 )
00666             continue;
00667
00668         if( !AfxGetApp()->GetProfileBinary(PROFILE_NAME, entry.m_fUniqueName, &ppData, &pBytes))
00669         {
00670             continue;
00671         }
00672
00673         found_one = true;
00674         entry.m_fValue->SetData(ppData, pBytes);
00675         entry.m_fValue->ResetTimeStamp();
00676
00677         delete ppData;
00678     }
00679 #endif /* WIN32 */
00680 #ifdef qUnix
00681     bool error     = false;
00682
00683     CStr home;
00684     CStr cvsroot;
00685
00686
00687     home = gCvsPrefs.Home();
00688     if( !home.endsWith(kPathDelimiter) )
00689         home << kPathDelimiter;
00690
00691     home << ".gcvsrc";
00692
00693     FILE* out = fopen(home, "rb");
00694     if( out == 0L )
00695         return false;
00696
00697     int version;
00698     int numEntries;
00699     CStaticAllocT<char> alloc;
00700     fread(&version, sizeof(int), 1, out);
00701     if( version != 1 )
00702     {
00703         cvs_err("Unexpected version %d in the file '%s'\n", version, (const char*)home);
00704         error = true;
00705     } else {
00706         fread(&numEntries, sizeof(int), 1, out);
00707         if( numEntries < 0 )
00708         {
00709             cvs_err("Unexpected # %d in the file '%s'\n", numEntries, (const char*)home);
00710             error = true;
00711         }
00712     }
00713
00714     /* something has gone wrong !!!! */
00715     if( error ) {
00716         fclose(out);
00717         return false;
00718     }
00719
00720     while( !feof(out) && !ferror(out) )
00721     {
00722         CStr name;
00723         while( !feof(out) && !ferror(out) )
00724         {
00725             int c = getc(out);
00726             if( EOF == c)
00727                 break;
00728             name << (char)c;
00729             if( c == '\0' )
00730                 break;
00731         }
00732
00733         if( feof(out) && name.length())
00734             cvs_err("Unexpected end of file in '%s'\n", (const char*)home);
00735
00736         if( ferror(out) )
00737             cvs_err("Unexpected error %d in '%s'\n", errno, (const char*)home);
00738
00739         if( feof(out) || ferror(out) ) {
00740             break;
00741         }
00742
00743         unsigned int size = 0;
00744         fread(&size, sizeof(unsigned int), 1, out);
00745
00746         if ( size > 1024 || size < 0) {
00747             cvs_err("%s is bogus (size: %d - %s)\n", (const char*)home, size, name.c_str());
00748             break;
00749         }
00750
00751         alloc.AdjustSize(size);
00752         if ( size != fread((char*)alloc, 1, size, out)) {
00753             cvs_err("%s is bogus (fread - %s)\n", (const char*)home, name.c_str());
00754             break;
00755         }
00756
00757         if( only && strcmp(only, name) != 0 )
00758             continue;
00759
00760         CPersistentEntry* entry = Find( name);
00761         if ( NULL == entry) {
00762             if( name.compare("P_Cvsroot") != 0) {
00763                 cvsroot = (char*)alloc;
00764                 if( !cvsroot.empty() ) {
00765                     gOldCvsroots.Insert(cvsroot);
00766                 } else {
00767                     gOldCvsroots.Insert(name);
00768                 }
00769
00770                 continue;
00771             }
00772
00773             cvs_err("dropping value for persitent '%s' from %s (not needed any longer)\n", name.c_str(), (const char*)home);
00774             continue;
00775         }
00776
00777         found_one = true;
00778         entry->m_fValue->SetData((char*)alloc, size);
00779         entry->m_fValue->ResetTimeStamp();
00780     }
00781
00782     if( ferror(out) )
00783         cvs_err("Error while reading '%s' (error %d)\n", (const char*)home, errno);
00784
00785     fclose(out);
00786 #endif /* qUnix */
00787
00788     return found_one;
00789 }

Here is the call graph for this function:

bool CPersistent::NeedSave ( bool onlySettings = false ) [static]

Check whether save is needed

Parameters:
onlySettings true to only check setting that have kAddSettings
Returns:
true if save is needed, false otherwise
Definition at line 814 of file Persistent.cpp.

References kAddSettings, m_fAllEntries, CPersistent::CPersistentEntry::m_fClass, m_fTimeStamp, and CPersistent::CPersistentEntry::m_fValue.

Referenced by CvsPrefs::save().

00815 {
00816     std::vector<CPersistentEntry>::const_iterator i;
00817     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00818     {
00819         const CPersistentEntry& entry = *i;
00820         if( onlySettings && (entry.m_fClass & kAddSettings) == 0 )
00821             continue;
00822
00823         if( entry.m_fValue->m_fTimeStamp != 0 )
00824             return true;
00825     }
00826
00827     return false;
00828 }

void CPersistent::Register | ( | CPersistent * | value,
 |  | const char * | uniqueName,
 |  | kClassPersistent | pclass
 | ) | [static, private]

Register a value to store/load

Parameters:
value | Value
uniqueName | Name of the value
pclass | Class of the value
Definition at line 125 of file Persistent.cpp.

References m_fAllEntries, CPersistent::CPersistentEntry::m_fClass, CPersistent::CPersistentEntry::m_fUniqueName, CPersistent::CPersistentEntry::m_fValue, NEW, and UAppConsole().

00126 {
00127     std::vector<CPersistentEntry>::const_iterator i;
00128     if( m_fAllEntries == 0L )
00129         m_fAllEntries = NEW std::vector<CPersistentEntry>;
00130
00131     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00132     {
00133         if(strcmp(uniqueName, (*i).m_fUniqueName) == 0)
00134         {
00135             UAppConsole("Error : duplicate persistent %s !\n", uniqueName);
00136         }
00137     }
00138
00139     CPersistentEntry newentry;
00140     newentry.m_fClass = pclass;
00141     newentry.m_fUniqueName = uniqueName;
00142     newentry.m_fValue = value;
00143
00144     m_fAllEntries->push_back(newentry);
00145 }

Here is the call graph for this function:

void CPersistent::ResetTimeStamp ( ) [inline]

Reset the time stamp.

Definition at line 115 of file Persistent.h.

References m_fTimeStamp.

Referenced by LoadAll(), and SaveAll().

00115 { m_fTimeStamp = 0; }

const URuntimeClass * CPersistent::rtCPersistent ( void ) [static]

Definition at line 102 of file Persistent.cpp.

void CPersistent::SaveAll ( void ) [static]

Save the registered values Definition at line 337 of file Persistent.cpp.

References CStr, cvs_err(), gCvsPrefs, GetData(), TMString< T >::GetList(), CvsPrefs::Home(), UObject::IsKindOf(), m_fAllEntries, CPersistent::CPersistentEntry::m_fUniqueName, CPersistent::CPersistentEntry::m_fValue, NULL, PROFILE_NAME, ResetTimeStamp(), SizeOf(), and URUNTIME_CLASS.

Referenced by CvsPrefs::save().

00338 {
00339 #ifdef TARGET_OS_MAC
00340     std::vector<CPersistentEntry>::iterator i;
00341     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00342     {
00343         CPersistentEntry & entry = *i;
00344         int size = entry.m_fValue->SizeOf();
00345         if( size <= 0 )
00346             continue;
00347
00348         CFPropertyListRef   value(NULL);
00349         CFStringRef         key(CFStringCreateWithCString(NULL, entry.m_fUniqueName, kCFStringEncodingASCII));
00350
00351         if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentBool)) )
00352         {
00353           value = *static_cast<CPersistentBool*>(entry.m_fValue) ? kCFBooleanTrue : kCFBooleanFalse;
00354           CFRetain(value);
00355         }
00356         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentInt)) )
00357         {
00358             CPersistentInt* pint = (CPersistentInt*)entry.m_fValue;
00359             SInt32 val = *pint;
00360             value = CFNumberCreate(NULL, kCFNumberSInt32Type, &val);
00361         }
00362         else if( dynamic_cast<TMString<CStr>*>(entry.m_fValue) != NULL )
00363         {
00364           CFMutableArrayRef    valueArray(CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks));
00365           if ( valueArray != NULL ) {
00366             TMString<CStr>* ptmstr = static_cast<TMString<CStr>*>(entry.m_fValue);
00367             for ( TMString<CStr>::list_t::const_iterator i(ptmstr->GetList().begin()); i != ptmstr->GetList().end(); ++i ) {
00368               CFStringRef   str(CFStringCreateWithCString(NULL, i->empty() ? "" : static_cast<const char*>(*i), kCFStringEncodingUTF8));
00369               if ( str ) {
00370                 CFArrayAppendValue(valueArray, str);
00371                 CFRelease(str);
00372               } else cvs_err("couldn't create string entry for multi-string array\n");
00373             }
00374           }
00375           value = valueArray;
00376         }
00377         else if( dynamic_cast<TMString<CPStr>*>(entry.m_fValue) != NULL )
00378         {
00379           CFMutableArrayRef    valueArray(CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks));
00380           if ( valueArray != NULL ) {
00381             TMString<CPStr>* ptmstr = static_cast<TMString<CPStr>*>(entry.m_fValue);
00382             for ( TMString<CPStr>::list_t::const_iterator i(ptmstr->GetList().begin()); i != ptmstr->GetList().end(); ++i ) {
00383               CFStringRef   str(CFStringCreateWithCString(NULL, i->empty() ? "" : static_cast<const char*>(*i), kCFStringEncodingUTF8));
00384               if ( str ) {
00385                 CFArrayAppendValue(valueArray, str);
00386                 CFRelease(str);
00387               } else cvs_err("couldn't create string entry for multi-string array\n");
00388             }
00389           }
00390           value = valueArray;
00391         }
00392         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCStr)) )
00393         {
00394             PCStr* pstr = (PCStr*)entry.m_fValue;
00395             value = CFStringCreateWithCString(NULL, *pstr, kCFStringEncodingUTF8);
00396         }
00397         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCPStr)) )
00398         {
00399             PCPStr* pstr = (PCPStr*)entry.m_fValue;
00400             value = CFStringCreateWithCString(NULL, *pstr, kCFStringEncodingUTF8);
00401         }
00402         else
00403         {
00404             value = CFDataCreate(NULL, (const UInt8*)entry.m_fValue->GetData(), entry.m_fValue->SizeOf());
00405         }
00406
00407     if ( value ) {
00408       CFPreferencesSetAppValue(key, value, kCFPreferencesCurrentApplication);
00409     } else {
00410       cvs_err("Couldn't create preference value for %s.\n", entry.m_fUniqueName);
00411     }
00412     if ( value ) CFRelease(value);
00413     if ( key ) CFRelease(key);
00414     }
00415
00416     UInt32        bundleVersion(CFBundleGetVersionNumber(CFBundleGetMainBundle()));
00417     CFNumberRef   bundleVersionPref(CFNumberCreate(NULL, kCFNumberSInt32Type, &bundleVersion));
00418     if ( bundleVersionPref ) {
00419     CFPreferencesSetAppValue(CFSTR("MacCvs:PrefsVersion"), bundleVersionPref, kCFPreferencesCurrentApplication);
00420     CFRelease(bundleVersionPref);
00421   } else {
00422     cvs_err("Couldn't write prefs version.\n");
00423   }
00424   if ( !CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication) ) {
00425     cvs_err("Couldn't write preferences.\n");
00426   }
00427 #endif /* TARGET_OS_MAC */
00428 #ifdef WIN32
00429     std::vector<CPersistentEntry>::iterator i;
00430     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00431     {
00432         CPersistentEntry& entry = *i;
00433         unsigned int size = entry.m_fValue->SizeOf();
00434         if( size == 0 )
00435             continue;
00436
00437         if( !AfxGetApp()->WriteProfileBinary(PROFILE_NAME, entry.m_fUniqueName, (BYTE*)entry.m_fValue->GetData(), size) )
00438         {
00439             cvs_err("Error while saving preferences !\n");
00440             break;
00441         }
00442     }
00443 #endif /* WIN32 */
00444 #ifdef qUnix
00445     CStr home;
00446     home = gCvsPrefs.Home();
00447     if( !home.endsWith(kPathDelimiter) )
00448         home << kPathDelimiter;
00449
00450     home << ".gcvsrc";
00451     FILE* out = fopen(home, "wb");
00452     if( out == 0L )
00453     {
00454         cvs_err("Unable to open '%s' for writing (error %d)", (const char*)home, errno);
00455         return;
00456     }
00457
00458     int version = 1;
00459     fwrite(&version, sizeof(int), 1, out);
00460     int numEntries = m_fAllEntries->size();
00461     fwrite(&numEntries, sizeof(int), 1, out);
00462     std::vector<CPersistentEntry>::iterator i;
00463     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00464     {
00465         CPersistentEntry& entry = *i;
00466         unsigned int size = entry.m_fValue->SizeOf();
00467
00468         fwrite(entry.m_fUniqueName, sizeof(char), strlen(entry.m_fUniqueName) + 1, out);
00469         fwrite(&size, sizeof(unsigned int), 1, out);
00470         fwrite(entry.m_fValue->GetData(), 1, size, out);
00471     }
00472
00473     if( ferror(out) )
00474         cvs_err("Error while writing '%s' (error %d)", (const char*)home, errno);
00475
00476     fclose(out);
00477 #endif /* qUnix */
00478
00479     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00480     {
00481         CPersistentEntry& entry = *i;
00482         entry.m_fValue->ResetTimeStamp();
00483     }
00484 }

Here is the call graph for this function:

bool CPersistent::SaveAllSettings | ( | const char * | settingFileName,
 |  | const char * | filePath
 | ) | [static]

Save all persistent values with the class kAddSettings

Parameters:
settingFileName | Setting file name
filePath | Settings file path
Returns:
true if the values were actually saved, false otherwise
Definition at line 227 of file Persistent.cpp.

References cvs_err(), gCvsPrefs, UObject::IsKindOf(), kAddSettings, m_fAllEntries, CPersistent::CPersistentEntry::m_fClass, CPersistent::CPersistentEntry::m_fUniqueName, CPersistent::CPersistentEntry::m_fValue, UStr::rtrim(), simple_diff(), and URUNTIME_CLASS.

Referenced by SaveAllSettings().

00228 {
00229     UStr tmpSettingsFile(settingFileName);
00230     tmpSettingsFile << "__";
00231
00232     FILE* fd = fopen(tmpSettingsFile, "w");
00233     if( fd == 0L )
00234     {
00235         cvs_err("Failed to open the setting file '%s' for writing (error %d)", (const char*)tmpSettingsFile, errno);
00236         return false;
00237     }
00238
00239     fprintf(fd, "VERSION=%d\n", 1);
00240
00241     UStr path(filePath);
00242     path.rtrim (kPathDelimiter);
00243
00244     fprintf(fd, "PATH=%s\n", (const char*)path);
00245 #if INTERNAL_AUTHEN
00246     fprintf(fd, "AUTHENTICATION=%s\n", (const char*)Authen::kindToToken(gAuthen.kind()));
00247     fprintf(fd, "CVSROOT=%s\n", (const char*)gCvsPrefs);
00248 #endif /* INTERNAL_AUTHEN */
00249
00250     std::vector<CPersistentEntry>::const_iterator i;
00251     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00252     {
00253         const CPersistentEntry& entry = *i;
00254         if( (entry.m_fClass & kAddSettings) == 0 )
00255             continue;
00256
00257         if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentBool)) )
00258         {
00259             CPersistentBool* pbool = (CPersistentBool*)entry.m_fValue;
00260             bool state = *pbool;
00261             fprintf(fd, "%s=%s\n", entry.m_fUniqueName, state ? "true" : "false");
00262         }
00263         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentInt)) )
00264         {
00265             CPersistentInt* pint = (CPersistentInt*)entry.m_fValue;
00266             int val = *pint;
00267             fprintf(fd, "%s=%d\n", entry.m_fUniqueName, val);
00268         }
00269         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCStr)) )
00270         {
00271             PCStr* pstr = (PCStr*)entry.m_fValue;
00272             const char* str = *pstr;
00273             fprintf(fd, "%s=%s\n", entry.m_fUniqueName, (const char*)(str == 0L ? "" : str));
00274         }
00275         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCPStr)) )
00276         {
00277             PCPStr* pstr = (PCPStr*)entry.m_fValue;
00278             const char* str = *pstr;
00279             fprintf(fd, "%s=%s\n", entry.m_fUniqueName, (const char*)(str == 0L ? "" : str));
00280         }
00281         else
00282         {
00283             cvs_err("Unknown persistent value '%s'\n", entry.m_fUniqueName);
00284         }
00285     }
00286
00287     fclose(fd);
00288
00289     if( simple_diff(tmpSettingsFile, settingFileName) == 0 )
00290     {
00291         if( unlink(tmpSettingsFile) != 0 && errno != ENOENT )
00292             cvs_err("Could not remove file '%s' (error %d)\n", (const char*)tmpSettingsFile, errno);
00293
00294         return false;
00295     }
00296
00297     if( unlink(settingFileName) != 0 && errno != ENOENT )
00298     {
00299         cvs_err("Could not remove file '%s' (error %d)\n", (const char*)settingFileName, errno);
00300         return false;
00301     }
00302
00303     if( rename(tmpSettingsFile, settingFileName) != 0 )
00304     {
00305         cvs_err("Could not rename file '%s' (error %d)\n", (const char*)tmpSettingsFile, errno);
00306         return false;
00307     }
00308
00309     return true;
00310 }

Here is the call graph for this function:

virtual void CPersistent::SetData | ( | const void * | ptr,
 |  | unsigned int | size
 | ) | [protected, pure virtual]

Set the data.

Implemented in PCPStr, PCStr, TMPersistent< T >, TMString< T >, CPersistentT< T >, CWinPlacement, CMMenuString, TMString< UStr >, TMString< UPStr >, CPersistentT< int >, and CPersistentT< bool >.

Referenced by LoadAll().

virtual unsigned int CPersistent::SizeOf ( void ) const [protected, pure virtual]

Get the size of the data.

Implemented in PCPStr, PCStr, TMPersistent< T >, TMString< T >, CPersistentT< T >, CWinPlacement, CMMenuString, TMString< UStr >, TMString< UPStr >, CPersistentT< int >, and CPersistentT< bool >.

Referenced by SaveAll().

void CPersistent::TouchTimeStamp ( ) [inline]

Update time stamp.

Definition at line 121 of file Persistent.h.

References m_fTimeStamp.

Referenced by CMMenuString::GetList(), CMMenuString::Insert(), TMString< T >::Insert(), CWinPlacement::operator=(), PCStr::operator=(), TMString< T >::Remove(), and TMString< T >::RemoveAll().

00121 { m_fTimeStamp++; }

void CPersistent::UnRegister ( CPersistent * value ) [static, private]

Unregister a value to store/load

Parameters:
value Value to unregister
Definition at line 151 of file Persistent.cpp.

References m_fAllEntries, and UAppConsole().

Referenced by ~CPersistent().

00152 {
00153     std::vector<CPersistentEntry>::iterator i;
00154     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00155     {
00156         if( value == (*i).m_fValue )
00157             break;
00158     }
00159
00160     if( i == m_fAllEntries->end() )
00161     {
00162         UAppConsole("Error : Unknown persistent value !\n");
00163         return;
00164     }
00165
00166     m_fAllEntries->erase(i);
00167     if( m_fAllEntries->size() == 0 )
00168     {
00169         delete m_fAllEntries;
00170         m_fAllEntries = 0L;
00171     }
00172 }

Here is the call graph for this function:

Member Data Documentation

const URuntimeClass CPersistent::classCPersistent [static, protected]

std::vector< CPersistent::CPersistentEntry > * CPersistent::m_fAllEntries = 0L [static, protected]

Entries container Definition at line 100 of file Persistent.cpp.

Referenced by Find(), LoadAll(), NeedSave(), Register(), SaveAll(), SaveAllSettings(), and UnRegister().

long CPersistent::m_fTimeStamp [protected]

Time stamp Definition at line 130 of file Persistent.h.

Referenced by GetTimeStamp(), NeedSave(), ResetTimeStamp(), and TouchTimeStamp().

The documentation for this class was generated from the following files:
  • common/Persistent.h
  • common/Persistent.cpp
Generated on Sat Aug 7 22:55:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPersistent::CPersistentEntry Struct Reference

CPersistent::CPersistentEntry Struct Reference

Entry description internal structure. More...

#include <Persistent.h>

Collaboration diagram for CPersistent::CPersistentEntry:

[legend]
List of all members.

Public Attributes

const char * m_fUniqueName
CPersistent * m_fValue
kClassPersistent m_fClass

Detailed Description

Entry description internal structure.

Definition at line 105 of file Persistent.h.

Member Data Documentation

kClassPersistent CPersistent::CPersistentEntry::m_fClass

Definition at line 109 of file Persistent.h.

Referenced by CPersistent::NeedSave(), CPersistent::Register(), and CPersistent::SaveAllSettings().

const char* CPersistent::CPersistentEntry::m_fUniqueName

Definition at line 107 of file Persistent.h.

Referenced by _loadPersistentSettings(), CPersistent::Find(), CPersistent::LoadAll(), CPersistent::Register(), CPersistent::SaveAll(), and CPersistent::SaveAllSettings().

CPersistent* CPersistent::CPersistentEntry::m_fValue

Definition at line 108 of file Persistent.h.

Referenced by _loadPersistentSettings(), CPersistent::LoadAll(), CPersistent::NeedSave(), CPersistent::Register(), CPersistent::SaveAll(), and CPersistent::SaveAllSettings().

The documentation for this struct was generated from the following file:
  • common/Persistent.h
Generated on Sat Aug 7 22:55:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPersistentBool Class Reference

CPersistentBool Class Reference

bool type persistent specialization More...

#include <Persistent.h>

Inheritance diagram for CPersistentBool:

[legend]
Collaboration diagram for CPersistentBool:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
CPersistentBool (const char *uniqueName, bool defValue, kClassPersistent pclass=kNoClass)
virtual | ~CPersistentBool ()
operator const bool & () const
bool & | operator= (const bool &val)
bool | operator== (const bool &val) const

Static Public Member Functions

const URuntimeClass * | rtCPersistentBool (void)

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()

Static Protected Attributes

const URuntimeClass | classCPersistentBool

Detailed Description

bool type persistent specialization

Definition at line 164 of file Persistent.h.

Constructor & Destructor Documentation

CPersistentBool::CPersistentBool | ( | const char * | uniqueName,
 |  | bool | defValue,
 |  | kClassPersistent | pclass = kNoClass
 | ) | [inline]

Definition at line 168 of file Persistent.h.

00169                                             :
00170       CPersistentT<bool>(uniqueName, defValue, pclass)
00171     {
00172     }

virtual CPersistentBool::~CPersistentBool ( ) [inline, virtual]

Definition at line 174 of file Persistent.h.

00175     {
00176     }

Member Function Documentation

const URuntimeClass * CPersistentBool::_GetBaseClass ( ) [static, protected]

Reimplemented from CPersistent.

Definition at line 104 of file Persistent.cpp.

const URuntimeClass * CPersistentBool::GetRuntimeClass ( ) const [virtual]

Reimplemented from CPersistent.

Definition at line 104 of file Persistent.cpp.

CPersistentBool::operator const bool & ( ) const [inline]

Definition at line 178 of file Persistent.h.

00182 : public CPersistentT<int>

bool& CPersistentBool::operator= ( const bool & val ) [inline]

Reimplemented from CPersistentT< bool >.

Definition at line 178 of file Persistent.h.

00182 : public CPersistentT<int>

bool CPersistentBool::operator== ( const bool & val ) const [inline]

Reimplemented from CPersistentT< bool >.

Definition at line 178 of file Persistent.h.

00182 : public CPersistentT<int>

const URuntimeClass * CPersistentBool::rtCPersistentBool ( void ) [static]

Definition at line 104 of file Persistent.cpp.

Member Data Documentation

const URuntimeClass CPersistentBool::classCPersistentBool [static, protected]

The documentation for this class was generated from the following files:
  • common/Persistent.h
  • common/Persistent.cpp
Generated on Sat Aug 7 22:55:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPersistentInt Class Reference

CPersistentInt Class Reference

int type persistent specialization More...

#include <Persistent.h>

Inheritance diagram for CPersistentInt:

[legend]
Collaboration diagram for CPersistentInt:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
CPersistentInt (const char *uniqueName, int defValue, kClassPersistent pclass=kNoClass)
virtual | ~CPersistentInt ()
operator const int & () const
int & | operator= (const int &val)
bool | operator== (const int &val) const

Static Public Member Functions

const URuntimeClass * | rtCPersistentInt (void)

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()

Static Protected Attributes

const URuntimeClass | classCPersistentInt

Detailed Description

int type persistent specialization

Definition at line 182 of file Persistent.h.

Constructor & Destructor Documentation

CPersistentInt::CPersistentInt | ( | const char * | uniqueName,
 |  | int | defValue,
 |  | kClassPersistent | pclass = kNoClass
 | ) | [inline]

Definition at line 186 of file Persistent.h.

00187                                             :
00188             CPersistentT<int>(uniqueName, defValue, pclass)
00189     {
00190     }

virtual CPersistentInt::~CPersistentInt ( ) [inline, virtual]

Definition at line 192 of file Persistent.h.

00193     {
00194     }

Member Function Documentation

const URuntimeClass * CPersistentInt::_GetBaseClass ( ) [static, protected]

Reimplemented from CPersistent.

Definition at line 103 of file Persistent.cpp.

const URuntimeClass * CPersistentInt::GetRuntimeClass ( ) const [virtual]

Reimplemented from CPersistent.

Definition at line 103 of file Persistent.cpp.

CPersistentInt::operator const int & ( ) const [inline]

Definition at line 196 of file Persistent.h.

int& CPersistentInt::operator= ( const int & val ) [inline]

Reimplemented from CPersistentT< int >.

Definition at line 196 of file Persistent.h.

bool CPersistentInt::operator== ( const int & val ) const [inline]

Reimplemented from CPersistentT< int >.

Definition at line 196 of file Persistent.h.

const URuntimeClass * CPersistentInt::rtCPersistentInt ( void ) [static]

Definition at line 103 of file Persistent.cpp.

Member Data Documentation

const URuntimeClass CPersistentInt::classCPersistentInt [static, protected]

The documentation for this class was generated from the following files:
  • common/Persistent.h
  • common/Persistent.cpp
Generated on Sat Aug 7 22:55:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPersistentT< T > Class Template Reference

CPersistentT< T > Class Template Reference

Template class for persistent values. More...

#include <Persistent.h>

Inheritance diagram for CPersistentT< T >:

[legend]
Collaboration diagram for CPersistentT< T >:

[legend]
List of all members.

Public Member Functions

CPersistentT (const char *uniqueName, T defValue, kClassPersistent pclass)
virtual | ~CPersistentT ()
operator const T & () const
T & | operator= (const T &val)
bool | operator== (const T &val) const
virtual unsigned int | SizeOf (void) const
Get the size of the data.
virtual const void * | GetData (void) const
Get the data.
virtual void | SetData (const void *ptr, unsigned int size)
Set the data.

Protected Attributes

T | m_fDefValue
T | m_fValue

Detailed Description

template<class T>
class CPersistentT< T >

Template class for persistent values.

Definition at line 136 of file Persistent.h.

Constructor & Destructor Documentation

template<class T>
CPersistentT< T >::CPersistentT | ( | const char * | uniqueName,
 |  | T | defValue,
 |  | kClassPersistent | pclass
 | ) | [inline]

Definition at line 139 of file Persistent.h.

00139                                                                               : CPersistent(uniqueName, pclass)
00140     {
00141         m_fValue = m_fDefValue = defValue;
00142     }

template<class T>
virtual CPersistentT< T >::~CPersistentT ( ) [inline, virtual]

Definition at line 144 of file Persistent.h.

00145     {
00146     }

Member Function Documentation

template<class T>
virtual const void* CPersistentT< T >::GetData ( void ) const [inline, virtual]

Get the data.

Implements CPersistent.

Definition at line 151 of file Persistent.h.

00151 {return &m_fValue;}

template<class T>
CPersistentT< T >::operator const T & ( ) const [inline]

Definition at line 148 of file Persistent.h.

00150 {return sizeof(T);}

template<class T>
T& CPersistentT< T >::operator= ( const T & val ) [inline]

Reimplemented in CPersistentBool, and CPersistentInt.

Definition at line 148 of file Persistent.h.

00150 {return sizeof(T);}

template<class T>
bool CPersistentT< T >::operator== ( const T & val ) const [inline]

Reimplemented in CPersistentBool, and CPersistentInt.

Definition at line 148 of file Persistent.h.

00150 {return sizeof(T);}

template<class T>
virtual void CPersistentT< T >::SetData | ( | const void * | ptr,
 |  | unsigned int | size
 | ) | [inline, virtual]

Set the data.

Implements CPersistent.

Definition at line 152 of file Persistent.h.

00153     {
00154         if( size == sizeof(T) )
00155             memcpy(&m_fValue, ptr, size);
00156     }

template<class T>
virtual unsigned int CPersistentT< T >::SizeOf ( void ) const [inline, virtual]

Get the size of the data.

Implements CPersistent.

Definition at line 150 of file Persistent.h.

00150 {return sizeof(T);}

Member Data Documentation

template<class T>
T CPersistentT< T >::m_fDefValue [protected]

Default value Definition at line 159 of file Persistent.h.

template<class T>
T CPersistentT< T >::m_fValue [protected]

Value Definition at line 160 of file Persistent.h.

The documentation for this class was generated from the following file:
  • common/Persistent.h
Generated on Sat Aug 7 22:55:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPoint Class Reference

UPoint Class Reference

#include <udraw.h>

Inheritance diagram for UPoint:

[legend]
Collaboration diagram for UPoint:

[legend]
List of all members.

Public Member Functions

UPoint ()
UPoint (int initX, int initY)
UPoint (UPOINT initPt)
UPoint (USIZE initSize)
void | Offset (int xOffset, int yOffset)
void | Offset (UPOINT point)
void | Offset (USIZE size)
bool | operator== (UPOINT point) const
bool | operator!= (UPOINT point) const
void | operator+= (USIZE size)
void | operator-= (USIZE size)
void | operator+= (UPOINT point)
void | operator-= (UPOINT point)
UPoint | operator+ (USIZE size) const
UPoint | operator- (USIZE size) const
UPoint | operator- () const
UPoint | operator+ (UPOINT point) const
USize | operator- (UPOINT point) const
URect | operator+ (const URECT *lpRect) const
URect | operator- (const URECT *lpRect) const

Constructor & Destructor Documentation

UPoint::UPoint ( ) [inline]

Definition at line 282 of file udraw.h.

Referenced by operator+(), and operator-().

00283     { /* random filled */ }

UPoint::UPoint | ( | int | initX,
 |  | int | initY
 | ) | [inline]

Definition at line 284 of file udraw.h.

00285     { x = initX; y = initY; }

UPoint::UPoint ( UPOINT initPt ) [inline]

Definition at line 286 of file udraw.h.

00287     { *(UPOINT*)this = initPt; }

UPoint::UPoint ( USIZE initSize ) [inline]

Definition at line 288 of file udraw.h.

00289     { *(USIZE*)this = initSize; }

Member Function Documentation

void UPoint::Offset ( USIZE size ) [inline]

Definition at line 294 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00295     { x += size.cx; y += size.cy; }

void UPoint::Offset ( UPOINT point ) [inline]

Definition at line 292 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00293     { x += point.x; y += point.y; }

void UPoint::Offset | ( | int | xOffset,
 |  | int | yOffset
 | ) | [inline]

Definition at line 290 of file udraw.h.

00291     { x += xOffset; y += yOffset; }

bool UPoint::operator!= ( UPOINT point ) const [inline]

Definition at line 298 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00299     { return (x != point.x || y != point.y); }

URect UPoint::operator+ ( const URECT * lpRect ) const [inline]

Definition at line 318 of file udraw.h.

00319     { return URect(lpRect) + *this; }

UPoint UPoint::operator+ ( UPOINT point ) const [inline]

Definition at line 314 of file udraw.h.

References UPoint(), UPOINT::x, and UPOINT::y.

00315     { return UPoint(x + point.x, y + point.y); }

Here is the call graph for this function:

UPoint UPoint::operator+ ( USIZE size ) const [inline]

Definition at line 308 of file udraw.h.

References USIZE::cx, USIZE::cy, and UPoint().

00309     { return UPoint(x + size.cx, y + size.cy); }

Here is the call graph for this function:

void UPoint::operator+= ( UPOINT point ) [inline]

Definition at line 304 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00305     { x += point.x; y += point.y; }

void UPoint::operator+= ( USIZE size ) [inline]

Definition at line 300 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00301     { x += size.cx; y += size.cy; }

URect UPoint::operator- ( const URECT * lpRect ) const [inline]

Definition at line 320 of file udraw.h.

00321     { return URect(lpRect) - *this; }

USize UPoint::operator- ( UPOINT point ) const [inline]

Definition at line 316 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00317     { return USize(x - point.x, y - point.y); }

UPoint UPoint::operator- ( ) const [inline]

Definition at line 312 of file udraw.h.

References UPoint().

00313     { return UPoint(-x, -y); }

Here is the call graph for this function:

UPoint UPoint::operator- ( USIZE size ) const [inline]

Definition at line 310 of file udraw.h.

References USIZE::cx, USIZE::cy, and UPoint().

00311     { return UPoint(x - size.cx, y - size.cy); }

Here is the call graph for this function:

void UPoint::operator-= ( UPOINT point ) [inline]

Definition at line 306 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00307     { x -= point.x; y -= point.y; }

void UPoint::operator-= ( USIZE size ) [inline]

Definition at line 302 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00303     { x -= size.cx; y -= size.cy; }

bool UPoint::operator== ( UPOINT point ) const [inline]

Definition at line 296 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00297     { return (x == point.x && y == point.y); }

The documentation for this class was generated from the following file:
  • rf/udraw.h
Generated on Sat Aug 7 22:55:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPOINT Struct Reference

UPOINT Struct Reference

#include <umain.h>

Inheritance diagram for UPOINT:

[legend]
Collaboration diagram for UPOINT:

[legend]
List of all members.

Public Attributes

int x
int y

Member Data Documentation

int UPOINT::x

Definition at line 979 of file umain.h.

Referenced by CWinLogData::ComputeBounds(), UDC::DrawBitmap(), UPoint::Offset(), URect::OffsetRect(), UWidget::OnSetLoc(), UPoint::operator!=(), URect::operator+(), UPoint::operator+(), USize::operator+(), URect::operator+=(), UPoint::operator+=(), URect::operator-(), UPoint::operator-(), USize::operator-(), URect::operator-=(), UPoint::operator-=(), UPoint::operator==(), PtInRect(), URect::SetRect(), CWinLogData::Update(), CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogRevData::UpdateSelf(), CWinLogHeaderData::UpdateSelf(), and URect::URect().

int UPOINT::y

Definition at line 979 of file umain.h.

Referenced by CWinLogData::ComputeBounds(), UDC::DrawBitmap(), UPoint::Offset(), URect::OffsetRect(), UWidget::OnSetLoc(), UPoint::operator!=(), URect::operator+(), UPoint::operator+(), USize::operator+(), URect::operator+=(), UPoint::operator+=(), URect::operator-(), UPoint::operator-(), USize::operator-(), URect::operator-=(), UPoint::operator-=(), UPoint::operator==(), PtInRect(), URect::SetRect(), CWinLogData::Update(), CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogRevData::UpdateSelf(), CWinLogHeaderData::UpdateSelf(), and URect::URect().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:55:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: poolRec Struct Reference

poolRec Struct Reference

Collaboration diagram for poolRec:

[legend]
List of all members.

Public Attributes

frameRec * firstentry
frameRec * firstfree
DYN_LIST * pool

Member Data Documentation

frameRec* poolRec::firstentry

Definition at line 292 of file dll_garbage.c.

frameRec* poolRec::firstfree

Definition at line 293 of file dll_garbage.c.

DYN_LIST* poolRec::pool

Definition at line 294 of file dll_garbage.c.

The documentation for this struct was generated from the following file:
  • common/dll_garbage.c
Generated on Sat Aug 7 22:55:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPPMenu Class Reference

UPPMenu Class Reference

Inheritance diagram for UPPMenu:

[legend]
Collaboration diagram for UPPMenu:

[legend]
List of all members.

Public Member Functions

UPPMenu ()
virtual | ~UPPMenu ()

Static Public Attributes

int | sPPMenuWidID = -1

Constructor & Destructor Documentation

UPPMenu::UPPMenu ( )

Definition at line 707 of file UPseudoSupport.cpp.

References UCmdTarget::GetWidID(), sPPMenuWidID, and UEventGetWidID().

00707                  : UMenu(::UEventGetWidID())
00708 {
00709     sPPMenuWidID = GetWidID();
00710 }

Here is the call graph for this function:

UPPMenu::~UPPMenu ( ) [virtual]

Definition at line 712 of file UPseudoSupport.cpp.

00713 {
00714 }

Member Data Documentation

int UPPMenu::sPPMenuWidID = -1 [static]

Definition at line 705 of file UPseudoSupport.cpp.

Referenced by UPPMenu().

The documentation for this class was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:55:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CProgress Class Reference

CProgress Class Reference

Progress indicator wrapper class. More...

#include <ProgressDlg.h>

Collaboration diagram for CProgress:

[legend]
List of all members.

Public Member Functions

CProgress (bool interruptable, const char *title=0L, kProgressType progressType=kProgressBar)
virtual | ~CProgress ()
bool | HasAborted (void) const
void | SetProgress (int percent)
void | SetProgress (const char *text)

Private Member Functions

void | ForceAbort (void)

Private Attributes

bool m_abort
CProgressDlg * m_dlg

Detailed Description

Progress indicator wrapper class.

Definition at line 46 of file ProgressDlg.h.

Constructor & Destructor Documentation

CProgress::CProgress | ( | bool | interruptable,
 |  | const char * | title = 0L,
 |  | kProgressType | progressType = kProgressBar
 | ) |

Definition at line 42 of file ProgressDlg.cpp.

References CProgressDlg::Create(), cvs_err(), m_abort, and m_dlg.

00043     : m_abort(false)
00044 {
00045 #ifdef WIN32
00046     m_dlg = new CProgressDlg(m_abort, interruptable, title, progressType);
00047     if( !m_dlg || !m_dlg->Create() )
00048     {
00049         cvs_err("Failed to create Progress dialog\n");
00050
00051         delete m_dlg;
00052         m_dlg = 0L;
00053
00054         return;
00055     }
00056
00057     ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
00058 #endif /* WIN32 */
00059 }

Here is the call graph for this function:

CProgress::~CProgress ( ) [virtual]

Definition at line 61 of file ProgressDlg.cpp.

References m_dlg.

00062 {
00063 #ifdef WIN32
00064     if( m_dlg != 0L )
00065         m_dlg->DestroyWindow();
00066 #endif /* WIN32 */
00067 }

Member Function Documentation

void CProgress::ForceAbort ( void ) [private]

Force the progress indicator to abort

Note:
Normally the user aborts the operation, use this method in the exceptional cases only
Definition at line 107 of file ProgressDlg.cpp.

References m_dlg.

00108 {
00109 #ifdef WIN32
00110     if( m_dlg != 0L )
00111     {
00112         m_dlg->DestroyWindow();
00113     }
00114
00115     m_dlg = 0L;
00116 #endif /* WIN32 */
00117 }

bool CProgress::HasAborted ( void ) const [inline]

Check the value of the abort flag

Returns:
true if the operation was aborted, false otherwise
Definition at line 71 of file ProgressDlg.h.

References m_abort.

Referenced by ImportReport::OnIdle(), and CGraphView::OnViewDelrev().

00071 { return m_abort; }

void CProgress::SetProgress ( const char * text )

Set the progress indicator

Parameters:
text Value, as a text, to be set
Definition at line 90 of file ProgressDlg.cpp.

References m_abort, m_dlg, and CProgressDlg::SetProgress().

00091 {
00092 #ifdef WIN32
00093     if( m_dlg == 0L )
00094         return;
00095
00096     m_dlg->SetProgress(text);
00097
00098     if( m_abort )
00099         m_dlg = 0L;
00100 #endif /* WIN32 */
00101 }

Here is the call graph for this function:

void CProgress::SetProgress ( int percent )

Set the progress indicator

Parameters:
percent Value, as a percentage, to be set
Definition at line 73 of file ProgressDlg.cpp.

References m_abort, m_dlg, and CProgressDlg::SetProgress().

Referenced by ImportReport::OnIdle(), and CGraphView::OnViewDelrev().

00074 {
00075 #ifdef WIN32
00076     if( m_dlg == 0L )
00077         return;
00078
00079     m_dlg->SetProgress(percent);
00080
00081     if( m_abort )
00082         m_dlg = 0L;
00083 #endif /* WIN32 */
00084 }

Here is the call graph for this function:

Member Data Documentation

bool CProgress::m_abort [private]

Flag indicating that the operation was cancelled by the user Definition at line 55 of file ProgressDlg.h.

Referenced by CProgress(), HasAborted(), and SetProgress().

CProgressDlg* CProgress::m_dlg [private]

Progress dialog Definition at line 58 of file ProgressDlg.h.

Referenced by CProgress(), ForceAbort(), SetProgress(), and ~CProgress().

The documentation for this class was generated from the following files:
  • common/ProgressDlg.h
  • common/ProgressDlg.cpp
Generated on Sat Aug 7 22:55:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CProgressDlg Class Reference

CProgressDlg Class Reference

Progress dialog, should be dynamically allocated. More...

#include <ProgressDlg.h>

Inheritance diagram for CProgressDlg:

[legend]
Collaboration diagram for CProgressDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_PROGRESS }

Public Member Functions

CProgressDlg (bool &abort, bool interruptable, const char *title=NULL, kProgressType progressType=kProgressBar, CWnd *pParent=NULL)
BOOL | Create ()
void | SetProgress (int percent)
void | SetProgress (const char *text)

Public Attributes

CButton | m_cancelButton
CProgressCtrl | m_progressCtrl
CStatic | m_progressTextStatic

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual void | PostNcDestroy ()
PostNcDestroy virtual override, restore the active window and release the allocated memory.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable and show appropriate controls.
virtual void | OnOK ()
OnOK virtual override, set the abort flag to true and destroy the progress dialog window.

Static Private Member Functions

void | FlushDisplay (const CDialog *dlg, const bool &abort)

Private Attributes

bool & m_abort
bool m_interruptable
CString | m_title
kProgressType m_progressType
CWnd * | m_pParent
HWND | m_hWndParent

Detailed Description

Progress dialog, should be dynamically allocated.

Definition at line 82 of file ProgressDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 92 of file ProgressDlg.h.
00092 { IDD = IDD_PROGRESS };

Constructor & Destructor Documentation

CProgressDlg::CProgressDlg | ( | bool & | abort,
 |  | bool | interruptable,
 |  | const char * | title = NULL,
 |  | kProgressType | progressType = kProgressBar,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 124 of file ProgressDlg.cpp.

00127     : m_abort(abort), m_interruptable(interruptable),
00128     m_title(title), m_progressType(progressType),
00129     m_pParent(pParent), m_hWndParent(0L),
00130     CDialog(CProgressDlg::IDD, pParent)
00131 {
00132     //{{AFX_DATA_INIT(CProgressDlg)
00133     //}}AFX_DATA_INIT
00134 }

Member Function Documentation

BOOL CProgressDlg::Create ( )

Create the progress dialog

Returns:
TRUE on success, FALSE otherwise
Definition at line 160 of file ProgressDlg.cpp.

References IDD.

Referenced by CProgress::CProgress().

00161 {
00162     m_hWndParent = PreModal();
00163     return CDialog::Create(CProgressDlg::IDD, m_pParent);
00164 }

void CProgressDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 137 of file ProgressDlg.cpp.

References IDC_PROGRESS, IDC_PROGRESS_TEXT, m_cancelButton, m_progressCtrl, and m_progressTextStatic.

00138 {
00139     CDialog::DoDataExchange(pDX);
00140     //{{AFX_DATA_MAP(CProgressDlg)
00141     DDX_Control(pDX, IDOK, m_cancelButton);
00142     DDX_Control(pDX, IDC_PROGRESS, m_progressCtrl);
00143     DDX_Control(pDX, IDC_PROGRESS_TEXT, m_progressTextStatic);
00144     //}}AFX_DATA_MAP
00145 }

void CProgressDlg::FlushDisplay | ( | const CDialog * | dlg,
 |  | const bool & | abort
 | ) | [static, private]

Peek and pump application messages, flush the messages if the dialog was aborted

Parameters:
dlg | Dialog
abort | Abort flag
Definition at line 266 of file ProgressDlg.cpp.

References NULL.

Referenced by SetProgress().

00267 {
00268     MSG msg;
00269     while( PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_NOREMOVE) == TRUE )
00270     {
00271         AfxGetApp()->PumpMessage();
00272     }
00273
00274     while( PeekMessage(&msg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE) == TRUE )
00275     {
00276         CPoint pt(LOWORD(msg.lParam), HIWORD(msg.lParam));
00277         ::ClientToScreen(msg.hwnd, &pt);
00278
00279         CWnd* wnd = CWnd::WindowFromPoint(pt);
00280
00281         if( !abort && wnd && dlg && (wnd->GetSafeHwnd() == dlg->GetSafeHwnd() || dlg->IsChild(wnd)) )
00282         {
00283             AfxGetApp()->PumpMessage();
00284         }
00285         else
00286         {
00287             PeekMessage(&msg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE);
00288         }
00289     }
00290 }

BOOL CProgressDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable and show appropriate controls.

Definition at line 167 of file ProgressDlg.cpp.

References kProgressBar, kProgressFile, kProgressText, m_cancelButton, m_interruptable, m_progressCtrl, m_progressTextStatic, m_progressType, and m_title.

00168 {
00169     CenterWindow();
00170
00171     CDialog::OnInitDialog();
00172
00173     // Enable/disable controls
00174     m_cancelButton.EnableWindow(m_interruptable);
00175
00176     // Show progress indicator
00177     switch( m_progressType )
00178     {
00179     default:
00180     case kProgressBar:
00181         m_progressTextStatic.ShowWindow(SW_HIDE);
00182         break;
00183     case kProgressText:
00184     case kProgressFile:
00185         m_progressCtrl.ShowWindow(SW_HIDE);
00186
00187         if( kProgressText == m_progressType )
00188         {
00189             m_progressTextStatic.ModifyStyle(0, SS_ENDELLIPSIS);
00190         }
00191         else if( kProgressFile == m_progressType )
00192         {
00193             m_progressTextStatic.ModifyStyle(0, SS_PATHELLIPSIS);
00194         }
00195
00196         break;
00197     }
00198
00199     // Set the window title
00200     if( !m_title.IsEmpty() )
00201     {
00202         SetWindowText(m_title);
00203     }
00204
00205     // Show the main window
00206     ShowWindow(SW_SHOW);
00207
00208     return TRUE;  // return TRUE unless you set the focus to a control
00209 }

void CProgressDlg::OnOK ( ) [protected, virtual]

OnOK virtual override, set the abort flag to true and destroy the progress dialog window.

Definition at line 212 of file ProgressDlg.cpp.

References m_abort.

00213 {
00214     m_abort = true;
00215     DestroyWindow();
00216 }

void CProgressDlg::PostNcDestroy ( ) [protected, virtual]

PostNcDestroy virtual override, restore the active window and release the allocated memory.

Definition at line 219 of file ProgressDlg.cpp.

References m_hWndParent, and NULL.

00220 {
00221     MSG msg;
00222     if( m_hWndParent != NULL && ::GetActiveWindow() == m_hWnd )
00223     {
00224         ::SetActiveWindow(m_hWndParent);
00225     }
00226
00227     PostModal();
00228
00229     while( PeekMessage(&msg, m_hWnd, 0, 0, PM_NOREMOVE) == TRUE )
00230     {
00231         AfxGetApp()->PumpMessage();
00232     }
00233
00234     delete this;
00235 }

void CProgressDlg::SetProgress ( const char * text )

Set the progress text indicator

Parameters:
text Value to be set
Definition at line 253 of file ProgressDlg.cpp.

References FlushDisplay(), m_abort, and m_progressTextStatic.

00254 {
00255     m_progressTextStatic.SetWindowText(text);
00256
00257     CProgressDlg::FlushDisplay(this, m_abort);
00258     ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
00259 }

Here is the call graph for this function:

void CProgressDlg::SetProgress ( int percent )

Set the progress bar indicator

Parameters:
percent Value to be set
Definition at line 241 of file ProgressDlg.cpp.

References FlushDisplay(), m_abort, and m_progressCtrl.

Referenced by CProgress::SetProgress().

00242 {
00243     m_progressCtrl.SetPos(percent);
00244
00245     CProgressDlg::FlushDisplay(this, m_abort);
00246     ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
00247 }

Here is the call graph for this function:

Member Data Documentation

bool& CProgressDlg::m_abort [private]

Flag indicating that the operation was cancelled by the user Definition at line 117 of file ProgressDlg.h.

Referenced by OnOK(), and SetProgress().

CButton CProgressDlg::m_cancelButton

Definition at line 93 of file ProgressDlg.h.

Referenced by DoDataExchange(), and OnInitDialog().

HWND CProgressDlg::m_hWndParent [private]

Parent window handle (activated after progress dialog closes Definition at line 123 of file ProgressDlg.h.

Referenced by PostNcDestroy().

bool CProgressDlg::m_interruptable [private]

Flag indicating that the operation can be stopped by pressing the Cancel button Definition at line 118 of file ProgressDlg.h.

Referenced by OnInitDialog().

CWnd* CProgressDlg::m_pParent [private]

Parent dialog (used at the creation time Definition at line 122 of file ProgressDlg.h.

CProgressCtrl CProgressDlg::m_progressCtrl

Definition at line 94 of file ProgressDlg.h.

Referenced by DoDataExchange(), OnInitDialog(), and SetProgress().

CStatic CProgressDlg::m_progressTextStatic

Definition at line 95 of file ProgressDlg.h.

Referenced by DoDataExchange(), OnInitDialog(), and SetProgress().

kProgressType CProgressDlg::m_progressType [private]

Progress dialog type Definition at line 120 of file ProgressDlg.h.

Referenced by OnInitDialog().

CString CProgressDlg::m_title [private]

Progress dialog title Definition at line 119 of file ProgressDlg.h.

Referenced by OnInitDialog().

The documentation for this class was generated from the following files:
  • common/ProgressDlg.h
  • common/ProgressDlg.cpp
Generated on Sat Aug 7 22:55:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPromptMessage Class Reference

UPromptMessage Class Reference

Inheritance diagram for UPromptMessage:

[legend]
Collaboration diagram for UPromptMessage:

[legend]
List of all members.

Public Types

enum {
kOK = EV_COMMAND_START,
kCancel,
kMsg
}

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UPromptMessage (const char *msg, const char *title, const char *def, const char *cncl)
virtual | ~UPromptMessage ()
virtual void | DoDataExchange (bool fill)
while modaling, allows to fill/read the dialog content.

Static Public Member Functions

const URuntimeClass * | rtUPromptMessage (void)

Protected Member Functions

int | OnOK (void)
int | OnCancel (void)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

UStr m_msg
UStr m_title
UStr m_ok
UStr m_cncl

Static Protected Attributes

const URuntimeClass | classUPromptMessage
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UPromptMessage ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Member Enumeration Documentation

anonymous enum

Enumeration values:
kOK
kCancel
kMsg
Definition at line 64 of file AskYesNo.cpp.
00065     {
00066         kOK = EV_COMMAND_START, // 0
00067         kCancel,                // 1
00068         kMsg                    // 2
00069     };

Constructor & Destructor Documentation

UPromptMessage::UPromptMessage | ( | const char * | msg,
 |  | const char * | title,
 |  | const char * | def,
 |  | const char * | cncl
 | ) | [inline]

Definition at line 56 of file AskYesNo.cpp.

References m_cncl, m_msg, m_ok, m_title, and UEventGetWidID().

00057                           : UWidget(UEventGetWidID()), m_msg(msg), m_title(title),
00058         m_ok(def), m_cncl(cncl)
00059     {
00060     }

Here is the call graph for this function:

virtual UPromptMessage::~UPromptMessage ( ) [inline, virtual]

Definition at line 62 of file AskYesNo.cpp.

00062 {}

Member Function Documentation

const URuntimeClass * UPromptMessage::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UEditMessage.

Definition at line 94 of file AskYesNo.cpp.

virtual void UPromptMessage::DoDataExchange ( bool fill ) [inline, virtual]

while modaling, allows to fill/read the dialog content.

  • fill says if it expects to fill or read the dialog content.

Reimplemented from UWidget.

Reimplemented in UEditMessage.

Definition at line 71 of file AskYesNo.cpp.

References UStr::c_str(), EV_SETTEXT, UCmdTarget::GetWidID(), kCancel, kMsg, kOK, kUMainWidget, m_cncl, m_msg, m_ok, m_title, and UEventSendMessage().

Referenced by UEditMessage::DoDataExchange().

00072     {
00073         if(fill)
00074         {
00075             UEventSendMessage(GetWidID(), EV_SETTEXT, kOK, (void *)m_ok.c_str());
00076             UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, (void *)m_title.c_str());
00077             UEventSendMessage(GetWidID(), EV_SETTEXT, kCancel, (void *)m_cncl.c_str());
00078             UEventSendMessage(GetWidID(), EV_SETTEXT, kMsg, (void *)m_msg.c_str());
00079         }
00080         else
00081         {
00082         }
00083     }

Here is the call graph for this function:

const UMSGMAP * UPromptMessage::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UEditMessage.

Definition at line 96 of file AskYesNo.cpp.

const UMSGMAP * UPromptMessage::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Reimplemented in UEditMessage.

Definition at line 96 of file AskYesNo.cpp.

const URuntimeClass * UPromptMessage::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Reimplemented in UEditMessage.

Definition at line 94 of file AskYesNo.cpp.

const UMSGMAP * UPromptMessage::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UEditMessage.

Definition at line 96 of file AskYesNo.cpp.

int UPromptMessage::OnCancel ( void ) [protected]

Definition at line 107 of file AskYesNo.cpp.

References UWidget::EndModal().

00108 {
00109     EndModal(false);
00110     return 0;
00111 }

Here is the call graph for this function:

int UPromptMessage::OnOK ( void ) [protected]

Definition at line 101 of file AskYesNo.cpp.

00102 {
00103     EndModal(true);
00104     return 0;
00105 }

const URuntimeClass * UPromptMessage::rtUPromptMessage ( void ) [static]

Definition at line 94 of file AskYesNo.cpp.

Member Data Documentation

const UMSGMAP_ENTRY UPromptMessage::_messageEntries [static, private]

Initial value:

   {
    { EV_CMD, epi_V, UMSG_RANGE,  kOK ,  kOK ,   (UPMSG)(int (UCmdTarget::*)(void))& UPromptMessage::OnOK  },
    { EV_CMD, epi_V, UMSG_RANGE,  kCancel ,  kCancel ,   (UPMSG)(int (UCmdTarget::*)(void))& UPromptMessage::OnCancel  },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UWidget.

Reimplemented in UEditMessage.

Definition at line 96 of file AskYesNo.cpp.

const URuntimeClass UPromptMessage::classUPromptMessage [static, protected]

UStr UPromptMessage::m_cncl [protected]

Definition at line 86 of file AskYesNo.cpp.

Referenced by DoDataExchange(), and UPromptMessage().

UStr UPromptMessage::m_msg [protected]

Definition at line 86 of file AskYesNo.cpp.

Referenced by DoDataExchange(), and UPromptMessage().

UStr UPromptMessage::m_ok [protected]

Definition at line 86 of file AskYesNo.cpp.

Referenced by DoDataExchange(), and UPromptMessage().

UStr UPromptMessage::m_title [protected]

Definition at line 86 of file AskYesNo.cpp.

Referenced by DoDataExchange(), and UPromptMessage().

const UMSGMAP UPromptMessage::messageMap = { UWidget ::GetThisMessageMap(), & UPromptMessage ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Reimplemented in UEditMessage.

Definition at line 96 of file AskYesNo.cpp.

The documentation for this class was generated from the following file:
  • common/AskYesNo.cpp
Generated on Sat Aug 7 22:55:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPropertyPage Class Reference

CPropertyPage Class Reference

Inheritance diagram for CPropertyPage:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/HHelpSupport.h
Generated on Sat Aug 7 22:55:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPropertySheet Class Reference

CPropertySheet Class Reference

Inheritance diagram for CPropertySheet:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/HHelpSupport.h
Generated on Sat Aug 7 22:55:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CProtocolParserConsole Class Reference

CProtocolParserConsole Class Reference

Class to parse protocol info (obtained using cvs info protocol). More...

#include <CvsRootDlg.h>

Inheritance diagram for CProtocolParserConsole:

[legend]
Collaboration diagram for CProtocolParserConsole:

[legend]
List of all members.

Public Member Functions

CProtocolParserConsole ()
virtual | ~CProtocolParserConsole ()
virtual void | Parse (int launchRes)
const KeywordList & | GetKeywordList () const

Private Attributes

KeywordList m_keywordList

Detailed Description

Class to parse protocol info (obtained using cvs info protocol).

Definition at line 112 of file CvsRootDlg.h.

Constructor & Destructor Documentation

CProtocolParserConsole::CProtocolParserConsole ( )

Definition at line 175 of file CvsRootDlg.cpp.

00176 {
00177 }

CProtocolParserConsole::~CProtocolParserConsole ( ) [virtual]

Definition at line 179 of file CvsRootDlg.cpp.

00180 {
00181 }

Member Function Documentation

const KeywordList & CProtocolParserConsole::GetKeywordList ( ) const

Get the protocol keywords list

Returns:
Protocol keywords list
Definition at line 243 of file CvsRootDlg.cpp.

References KeywordList, and m_keywordList.

Referenced by CCvsRootDlg::DisplayKeywords().

00244 {
00245     return m_keywordList;
00246 }

void CProtocolParserConsole::Parse ( int launchRes ) [virtual]

Virtual overridable to parse the result of browse command

Parameters:
launchRes The result of the command launch
Note:
Call default implementation after parsing is finished to clear the stored command output and store the launch result, the error output is not cleared however to allow further analysis

Implements CCvsRootConsole.

Definition at line 183 of file CvsRootDlg.cpp.

References getline(), KeywordInfo::m_description, KeywordInfo::m_keyword, m_keywordList, and CCvsRootConsole::Parse().

00184 {
00185     bool keywords = false;
00186
00187     string line;
00188
00189     while( getline(m_cvsOut, line) )
00190     {
00191         if( keywords )
00192         {
00193             stringstream stream;
00194             string keyword;
00195
00196             stream << line;
00197             stream >> keyword;
00198
00199             if( !keyword.empty() )
00200             {
00201                 string description;
00202
00203                 while( !stream.eof() )
00204                 {
00205                     string token;
00206                     stream >> token;
00207
00208                     if( !description.empty() )
00209                     {
00210                         if( token.find("(alias:") != string::npos || token.find("(aliases:") != string::npos )
00211                         {
00212                             // Bail out to eliminate alias(es)
00213                             break;
00214                         }
00215
00216                         description += " ";
00217                     }
00218
00219                     description += token;
00220                 }
00221
00222                 KeywordInfo rowInfo;
00223                 rowInfo.m_keyword = keyword;
00224                 rowInfo.m_description = description;
00225
00226                 m_keywordList.push_back(rowInfo);
00227             }
00228         }
00229
00230         if( line.find("Keywords available:") != string::npos )
00231         {
00232             keywords = true;
00233         }
00234     }
00235
00236     CCvsRootConsole::Parse(launchRes);
00237 }

Here is the call graph for this function:

Member Data Documentation

KeywordList CProtocolParserConsole::m_keywordList [private]

Parsed protocol keywords list Definition at line 121 of file CvsRootDlg.h.

Referenced by GetKeywordList(), and Parse().

The documentation for this class was generated from the following files:
  • common/CvsRootDlg.h
  • common/CvsRootDlg.cpp
Generated on Sat Aug 7 22:55:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPseudoButton Class Reference

CPseudoButton Class Reference

#include <PseudoButton.h>

Inheritance diagram for CPseudoButton:

[legend]
Collaboration diagram for CPseudoButton:

[legend]
List of all members.

Public Member Functions

CPseudoButton ()
virtual bool | LoadXPM (int rsrcid)
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual | ~CPseudoButton ()

Static Public Member Functions

bool | loadIcon (CString &icon, int rsrcid)

Protected Member Functions

virtual void | DrawButtonBitmap (CDC *pDC, UINT nState, CRect &rcItem)

Protected Attributes

HBITMAP | m_bitmap
HBITMAP | m_disbitmap

Constructor & Destructor Documentation

CPseudoButton::CPseudoButton ( )

Definition at line 41 of file PseudoButton.cpp.

00041                              : m_bitmap(0L), m_disbitmap(0L)
00042 {
00043 }

CPseudoButton::~CPseudoButton ( ) [virtual]

Definition at line 45 of file PseudoButton.cpp.

References m_bitmap, and m_disbitmap.

00046 {
00047     if(m_bitmap != 0L)
00048         AfxDeleteObject((HGDIOBJ*)&m_bitmap);
00049     if(m_disbitmap != 0L)
00050         AfxDeleteObject((HGDIOBJ*)&m_disbitmap);
00051 }

Member Function Documentation

void CPseudoButton::DrawButtonBitmap | ( | CDC * | pDC,
 |  | UINT | nState,
 |  | CRect & | rcItem
 | ) | [protected, virtual]

Reimplemented from CCJFlatButton.

Definition at line 114 of file PseudoButton.cpp.

References m_bitmap, m_disbitmap, and NULL.

00115 {
00116     // get the handle to the bitmap (if any) associated
00117     // with this button.
00118     HBITMAP hBitmap = GetBitmap();
00119     if( hBitmap == NULL ) {
00120         return;
00121     }
00122
00123     CRect rc = rcItem;
00124
00125     // if the button is selected.
00126     if( nState & ODS_SELECTED ) {
00127         rcItem.OffsetRect(1,1);
00128     }
00129
00130     // draw the bitmap associated with this button.
00131     if((nState & ODS_DISABLED) != 0 && m_disbitmap != 0L)
00132         pDC->DrawState( rc.TopLeft(), rc.Size(), m_disbitmap,
00133             DSS_NORMAL, (HBRUSH)NULL );
00134     else if(m_bitmap != 0L)
00135         pDC->DrawState( rc.TopLeft(), rc.Size(), m_bitmap,
00136             DSS_NORMAL, (HBRUSH)NULL );
00137     else
00138         pDC->DrawState( rc.TopLeft(), rc.Size(), hBitmap,
00139             ( nState & ODS_DISABLED )?DSS_DISABLED:DSS_NORMAL, (HBRUSH)NULL );
00140 }

void CPseudoButton::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Reimplemented from CCJFlatButton.

Reimplemented in CPseudoToggle.

Definition at line 53 of file PseudoButton.cpp.

References CCJFlatButton::DrawItem().

Referenced by CPseudoToggle::DrawItem().

00054 {
00055     BOOL oldFlag = m_bFlatLook;
00056     if(lpDIS->itemState & ODS_DISABLED)
00057         m_bFlatLook = true;
00058     CCJFlatButton::DrawItem(lpDIS);
00059     m_bFlatLook = oldFlag;
00060 }

Here is the call graph for this function:

bool CPseudoButton::loadIcon | ( | CString & | icon,
 |  | int | rsrcid
 | ) | [static]

Definition at line 62 of file PseudoButton.cpp.

Referenced by LoadXPM(), and CPseudoRotButton::LoadXPMs().

00063 {
00064     icon = "";
00065     bool res = false;
00066
00067     HINSTANCE inst = ::AfxGetResourceHandle();
00068     HRSRC hRsrc = FindResource(inst, MAKEINTRESOURCE(rsrcid), "CICN");
00069     if (hRsrc != 0L)
00070     {
00071         HGLOBAL hg = LoadResource(inst, hRsrc);
00072         if (hg != 0L)
00073         {
00074             DWORD size = SizeofResource(inst, hRsrc);
00075             char *rsrcptr = (char *)LockResource(hg);
00076             icon = CString(rsrcptr, size);
00077             FreeResource(hg);
00078             res = true;
00079         }
00080     }
00081
00082     return res;
00083 }

bool CPseudoButton::LoadXPM ( int rsrcid ) [virtual]

Definition at line 85 of file PseudoButton.cpp.

References DD_PIXMAP, loadIcon(), m_bitmap, m_disbitmap, and UMakeBitmap().

00086 {
00087     CString sicon;
00088
00089     if(!CPseudoButton::loadIcon(sicon, rsrcid))
00090         return false;
00091
00092     COLORREF back = ::GetSysColor(COLOR_BTNFACE);
00093     COLORREF fore = ::GetSysColor(COLOR_GRAYTEXT);
00094
00095     int w, h;
00096     HBITMAP bmap = UMakeBitmap((const char *)sicon, w, h, DD_PIXMAP, back, fore);
00097     if(bmap == 0L)
00098         return false;
00099
00100     SetBitmap(bmap);
00101     if(m_bitmap != 0L)
00102         AfxDeleteObject((HGDIOBJ*)&m_bitmap);
00103     m_bitmap = bmap;
00104
00105     bmap = UMakeBitmap((const char *)sicon, w, h, DD_PIXMAP, back, fore, false);
00106     if(bmap == 0L)
00107         return false;
00108     if(m_disbitmap != 0L)
00109         AfxDeleteObject((HGDIOBJ*)&m_disbitmap);
00110     m_disbitmap = bmap;
00111     return true;
00112 }

Here is the call graph for this function:

Member Data Documentation

HBITMAP CPseudoButton::m_bitmap [protected]

Definition at line 58 of file PseudoButton.h.

Referenced by DrawButtonBitmap(), LoadXPM(), and ~CPseudoButton().

HBITMAP CPseudoButton::m_disbitmap [protected]

Definition at line 59 of file PseudoButton.h.

Referenced by DrawButtonBitmap(), LoadXPM(), and ~CPseudoButton().

The documentation for this class was generated from the following files:
  • rf/support/mfc/PseudoButton.h
  • rf/support/mfc/PseudoButton.cpp
Generated on Sat Aug 7 22:55:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPseudoCmdStatusWrapper Struct Reference

UPseudoCmdStatusWrapper Struct Reference

#include <UPseudoSupport.h>

Collaboration diagram for UPseudoCmdStatusWrapper:

[legend]
List of all members.

Public Attributes

Boolean * | outEnabled
Boolean * | outUsesMark
UInt16 * | outMark
unsigned char * | outName

Member Data Documentation

Boolean* UPseudoCmdStatusWrapper::outEnabled

Definition at line 16 of file UPseudoSupport.h.

Referenced by LMainPseudoAttachment::ExecuteSelf().

UInt16* UPseudoCmdStatusWrapper::outMark

Definition at line 18 of file UPseudoSupport.h.

Referenced by LMainPseudoAttachment::ExecuteSelf().

unsigned char* UPseudoCmdStatusWrapper::outName

Definition at line 19 of file UPseudoSupport.h.

Referenced by LMainPseudoAttachment::ExecuteSelf().

Boolean* UPseudoCmdStatusWrapper::outUsesMark

Definition at line 17 of file UPseudoSupport.h.

Referenced by LMainPseudoAttachment::ExecuteSelf().

The documentation for this struct was generated from the following file:
  • rf/support/powerplant/UPseudoSupport.h
Generated on Sat Aug 7 22:55:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPseudoDlg Class Reference

CPseudoDlg Class Reference

#include <PseudoDlg.h>

Inheritance diagram for CPseudoDlg:

[legend]
Collaboration diagram for CPseudoDlg:

[legend]
List of all members.

Public Member Functions

CPseudoDlg (int dlgid, UWidget *pseudo, CWnd *pParent=NULL)
virtual | ~CPseudoDlg ()

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam)
virtual BOOL | OnInitDialog ()

Protected Attributes

UWidget * m_pseudo

Constructor & Destructor Documentation

CPseudoDlg::CPseudoDlg | ( | int | dlgid,
 |  | UWidget * | pseudo,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 42 of file PseudoDlg.cpp.

00043     : CDialog(dlgid, pParent), m_pseudo(pseudo)
00044 {
00045     //{{AFX_DATA_INIT(CPseudoDlg)
00046         // NOTE: the ClassWizard will add member initialization here
00047     //}}AFX_DATA_INIT
00048 }

CPseudoDlg::~CPseudoDlg ( ) [virtual]

Definition at line 50 of file PseudoDlg.cpp.

References EV_DESTROY, UWidget::GetWidgets(), UCmdTarget::GetWidID(), kUMainWidget, m_pseudo, and UEventSendMessage().

00051 {
00052     if(m_pseudo != 0L)
00053     {
00054         UEventSendMessage(m_pseudo->GetWidID(), EV_DESTROY, 0, 0L);
00055
00056         std::map<int, void *>::iterator k;
00057         for(k = m_pseudo->GetWidgets().begin(); k != m_pseudo->GetWidgets().end(); ++k)
00058         {
00059             CWnd *wnd = (CWnd *)(*k).second;
00060             if((*k).first != kUMainWidget)
00061                 delete wnd;
00062         }
00063     }
00064 }

Here is the call graph for this function:

Member Function Documentation

void CPseudoDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 66 of file PseudoDlg.cpp.

References UWidget::DoDataExchange(), UWidget::GetWidgets(), kUMainWidget, m_pseudo, and UCMD_to_WINCTL.

00067 {
00068     CDialog::DoDataExchange(pDX);
00069
00070     if(m_pseudo != 0L)
00071     {
00072         std::map<int, void *>::iterator i;
00073         for(i = m_pseudo->GetWidgets().begin(); i != m_pseudo->GetWidgets().end(); ++i)
00074         {
00075             if((*i).first != kUMainWidget)
00076                 DDX_Control(pDX, UCMD_to_WINCTL((*i).first), *(CWnd *)(*i).second);
00077         }
00078
00079         m_pseudo->DoDataExchange(!pDX->m_bSaveAndValidate);
00080     }
00081
00082     //{{AFX_DATA_MAP(CPseudoDlg)
00083     //}}AFX_DATA_MAP
00084 }

Here is the call graph for this function:

BOOL CPseudoDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 167 of file PseudoDlg.cpp.

References EV_CREATE, UCmdTarget::GetWidID(), m_pseudo, UEventSendMessage(), and WinInitWidgets().

00168 {
00169     if(m_pseudo != 0L)
00170     {
00171         WinInitWidgets(this, m_pseudo);
00172         UEventSendMessage(m_pseudo->GetWidID(), EV_CREATE, 0, 0L);
00173     }
00174
00175     CDialog::OnInitDialog();
00176
00177     return TRUE;  // return TRUE unless you set the focus to a control
00178                   // EXCEPTION: OCX Property Pages should return FALSE
00179 }

Here is the call graph for this function:

LRESULT CPseudoDlg::WindowProc | ( | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected, virtual]

Definition at line 486 of file PseudoDlg.cpp.

References m_pseudo, and UWinPseudoWindowProc().

00487 {
00488     if(m_pseudo != 0L && !UWinPseudoWindowProc(this, m_pseudo, message, wParam, lParam))
00489         return 0;
00490
00491     return CDialog::WindowProc(message, wParam, lParam);
00492 }

Here is the call graph for this function:

Member Data Documentation

UWidget* CPseudoDlg::m_pseudo [protected]

Definition at line 56 of file PseudoDlg.h.

Referenced by DoDataExchange(), OnInitDialog(), WindowProc(), and ~CPseudoDlg().

The documentation for this class was generated from the following files:
  • rf/support/mfc/PseudoDlg.h
  • rf/support/mfc/PseudoDlg.cpp
Generated on Sat Aug 7 22:55:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPseudoDraw Class Reference

CPseudoDraw Class Reference

#include <PseudoDraw.h>

Inheritance diagram for CPseudoDraw:

[legend]
Collaboration diagram for CPseudoDraw:

[legend]
List of all members.

Public Member Functions

CPseudoDraw (UWidget *pseudo, int cmdid)
virtual | ~CPseudoDraw ()

Public Attributes

UWidget * m_pseudo
int m_cmdid

Protected Member Functions

afx_msg void | OnPaint ()

Constructor & Destructor Documentation

CPseudoDraw::CPseudoDraw | ( | UWidget * | pseudo,
 |  | int | cmdid
 | ) |

Definition at line 38 of file PseudoDraw.cpp.

00038                                                    : m_pseudo(pseudo), m_cmdid(cmdid)
00039 {
00040 }

CPseudoDraw::~CPseudoDraw ( ) [virtual]

Definition at line 42 of file PseudoDraw.cpp.

00043 {
00044 }

Member Function Documentation

void CPseudoDraw::OnPaint ( ) [protected]

Definition at line 56 of file PseudoDraw.cpp.

References EV_CUSTOM_DRAW, and UEventSendMessage().

00057 {
00058     CPaintDC dc(this); // device context for painting
00059
00060     if(m_pseudo != 0L)
00061         UEventSendMessage(m_pseudo->GetWidID(), EV_CUSTOM_DRAW, m_cmdid, &dc);
00062 }

Here is the call graph for this function:

Member Data Documentation

int CPseudoDraw::m_cmdid

Definition at line 44 of file PseudoDraw.h.

UWidget* CPseudoDraw::m_pseudo

Definition at line 43 of file PseudoDraw.h.

The documentation for this class was generated from the following files:
  • rf/support/mfc/PseudoDraw.h
  • rf/support/mfc/PseudoDraw.cpp
Generated on Sat Aug 7 22:55:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPseudoFakePane Class Reference

UPseudoFakePane Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for UPseudoFakePane:

[legend]
Collaboration diagram for UPseudoFakePane:

[legend]
List of all members.

Public Member Functions

UPseudoFakePane (const SPaneInfo &inPaneInfo, LPseudoWinAttachment *inAttach)
virtual | ~UPseudoFakePane ()
virtual void | AdaptToSuperFrameSize (SInt32 inSurrWidthDelta, SInt32 inSurrHeightDelta, Boolean inRefresh)

Protected Member Functions

virtual void | ActivateSelf ()
virtual void | DeactivateSelf ()

Protected Attributes

LPseudoWinAttachment * m_Attach

Constructor & Destructor Documentation

UPseudoFakePane::UPseudoFakePane | ( | const SPaneInfo & | inPaneInfo,
 |  | LPseudoWinAttachment * | inAttach
 | ) |

Definition at line 987 of file UPseudoSupport.cpp.

00987                                                                                              :
00988     LPane(inPaneInfo), m_Attach(inAttach)
00989 {
00990 }

UPseudoFakePane::~UPseudoFakePane ( ) [virtual]

Definition at line 992 of file UPseudoSupport.cpp.

00993 {
00994 }

Member Function Documentation

void UPseudoFakePane::ActivateSelf ( ) [protected, virtual]

Definition at line 996 of file UPseudoSupport.cpp.

References EV_UPDATEFOCUS, and UEventNotifyMessage().

00997 {
00998     UEventNotifyMessage(EV_UPDATEFOCUS, 0, dynamic_cast<LWindow *>(GetSuperView()));
00999 }

Here is the call graph for this function:

void UPseudoFakePane::AdaptToSuperFrameSize | ( | SInt32 | inSurrWidthDelta,
 |  | SInt32 | inSurrHeightDelta,
 |  | Boolean | inRefresh
 | ) | [virtual]

Definition at line 1006 of file UPseudoSupport.cpp.

References LPseudoWinAttachment::CheckWindowSize(), and m_Attach.

01010 {
01011     LPane::AdaptToSuperFrameSize(inSurrWidthDelta, inSurrHeightDelta, inRefresh);
01012
01013     m_Attach->CheckWindowSize();
01014 }

Here is the call graph for this function:

void UPseudoFakePane::DeactivateSelf ( ) [protected, virtual]

Definition at line 1001 of file UPseudoSupport.cpp.

References EV_UPDATEFOCUS, and UEventNotifyMessage().

01002 {
01003     UEventNotifyMessage(EV_UPDATEFOCUS, 1, dynamic_cast<LWindow *>(GetSuperView()));
01004 }

Here is the call graph for this function:

Member Data Documentation

LPseudoWinAttachment* UPseudoFakePane::m_Attach [protected]

Definition at line 152 of file UPseudoSupport.h.

Referenced by AdaptToSuperFrameSize().

The documentation for this class was generated from the following files:
  • rf/support/powerplant/UPseudoSupport.h
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:55:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPseudoItem Class Reference

CPseudoItem Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for CPseudoItem:

[legend]
Collaboration diagram for CPseudoItem:

[legend]
List of all members.

Public Member Functions

CPseudoItem (int widid, int cmdid)
virtual | ~CPseudoItem ()

Public Attributes

std::map< int, UStr > | m_texts
void * | m_data

Protected Member Functions

virtual void | GetDrawContentsSelf (const STableCell &inCell, SOutlineDrawContents &ioDrawContents)
virtual void | DrawRowAdornments (const Rect &inLocalRowRect)
virtual void | DrawCell (const STableCell &inCell, const Rect &inLocalCellRect)
virtual void | DoubleClick (const STableCell &inCell, const SMouseDownEvent &inMouseDown, const SOutlineDrawContents &inDrawContents, Boolean inHitText)
virtual void | SingleClick (const STableCell &inCell, const SMouseDownEvent &inMouseDown, const SOutlineDrawContents &inDrawContents, Boolean inHitText)

Protected Attributes

int m_widid
int m_cmdid

Private Member Functions

CPseudoItem ()
CPseudoItem (const CPseudoItem &inOriginal)
CPseudoItem & | operator= (const CPseudoItem &inOriginal)

Constructor & Destructor Documentation

CPseudoItem::CPseudoItem | ( | int | widid,
 |  | int | cmdid
 | ) |

Definition at line 619 of file UPseudoSupport.cpp.

00619                                              : m_widid(widid), m_cmdid(cmdid), m_data(0L)
00620 {
00621 }

CPseudoItem::~CPseudoItem ( ) [virtual]

Definition at line 623 of file UPseudoSupport.cpp.

00624 {
00625 }

CPseudoItem::CPseudoItem ( ) [private]

CPseudoItem::CPseudoItem ( const CPseudoItem & inOriginal ) [private]

Member Function Documentation

void CPseudoItem::DoubleClick | ( | const STableCell & | inCell,
 |  | const SMouseDownEvent & | inMouseDown,
 |  | const SOutlineDrawContents & | inDrawContents,
 |  | Boolean | inHitText
 | ) | [protected, virtual]

Definition at line 686 of file UPseudoSupport.cpp.

References EV_LIST_DBLCLICK, m_cmdid, m_texts, m_widid, UEventSendMessage(), and UMAKEINT.

00691 {
00692     UStr name;
00693     std::map<int, UStr>::iterator i = m_texts.find(inCell.col - 1);
00694     if(i != m_texts.end())
00695     {
00696         name = (*i).second;
00697     }
00698     UEventSendMessage(m_widid,
00699         EV_LIST_DBLCLICK, UMAKEINT(m_cmdid, inCell.row - 1),
00700         (void *)(const char *)name);
00701
00702     LOutlineItem::DoubleClick(inCell, inMouseDown, inDrawContents, inHitText);
00703 }

Here is the call graph for this function:

void CPseudoItem::DrawCell | ( | const STableCell & | inCell,
 |  | const Rect & | inLocalCellRect
 | ) | [protected, virtual]

Definition at line 656 of file UPseudoSupport.cpp.

00657 {
00658     LOutlineItem::DrawCell(inCell, inLocalCellRect);
00659
00660     RGBColor c = UGAColorRamp::GetColor(colorRamp_Gray2);
00661     RGBForeColor(&c);
00662     MoveTo(inLocalCellRect.right - 1, inLocalCellRect.top);
00663     LineTo(inLocalCellRect.right - 1, inLocalCellRect.bottom);
00664 }

void CPseudoItem::DrawRowAdornments ( const Rect & inLocalRowRect ) [protected, virtual]

Definition at line 646 of file UPseudoSupport.cpp.

00648 {
00649     ShadeRow(UGAColorRamp::GetColor(colorRamp_White), inLocalRowRect);
00650     RGBColor c = UGAColorRamp::GetColor(colorRamp_Gray2);
00651     RGBForeColor(&c);
00652     MoveTo(inLocalRowRect.right, inLocalRowRect.top);
00653     LineTo(inLocalRowRect.right, inLocalRowRect.bottom);
00654 }

void CPseudoItem::GetDrawContentsSelf | ( | const STableCell & | inCell,
 |  | SOutlineDrawContents & | ioDrawContents
 | ) | [protected, virtual]

Definition at line 630 of file UPseudoSupport.cpp.

References m_texts.

00633 {
00634     std::map<int, UStr>::iterator i = m_texts.find(inCell.col);
00635     if(i != m_texts.end())
00636     {
00637         ioDrawContents.outShowSelection = true;
00638         LStr255 pstr((*i).second);
00639         LString::CopyPStr(pstr, ioDrawContents.outTextString);
00640     }
00641 }

CPseudoItem& CPseudoItem::operator= ( const CPseudoItem & inOriginal ) [private]

void CPseudoItem::SingleClick | ( | const STableCell & | inCell,
 |  | const SMouseDownEvent & | inMouseDown,
 |  | const SOutlineDrawContents & | inDrawContents,
 |  | Boolean | inHitText
 | ) | [protected, virtual]

Definition at line 666 of file UPseudoSupport.cpp.

References EV_LIST_SELECTING, m_cmdid, m_texts, m_widid, UEventSendMessage(), and UMAKEINT.

00671 {
00672     UStr name;
00673     std::map<int, UStr>::iterator i = m_texts.find(inCell.col - 1);
00674     if(i != m_texts.end())
00675     {
00676         name = (*i).second;
00677     }
00678     UEventSendMessage(m_widid,
00679         EV_LIST_SELECTING, UMAKEINT(m_cmdid, inCell.row - 1),
00680         (void *)(const char *)name);
00681
00682     LOutlineItem::SingleClick(inCell, inMouseDown, inDrawContents, inHitText);
00683 }

Here is the call graph for this function:

Member Data Documentation

int CPseudoItem::m_cmdid [protected]

Definition at line 183 of file UPseudoSupport.h.

Referenced by DoubleClick(), and SingleClick().

void* CPseudoItem::m_data

Definition at line 165 of file UPseudoSupport.h.

Referenced by UWidget::OnListGetInfo(), UWidget::OnListRowGetData(), and UWidget::OnListRowSetData().

std::map<int, UStr> CPseudoItem::m_texts

Definition at line 164 of file UPseudoSupport.h.

Referenced by DoubleClick(), GetDrawContentsSelf(), UWidget::OnListGetInfo(), UWidget::OnListInsert(), and SingleClick().

int CPseudoItem::m_widid [protected]

Definition at line 183 of file UPseudoSupport.h.

Referenced by DoubleClick(), and SingleClick().

The documentation for this class was generated from the following files:
  • rf/support/powerplant/UPseudoSupport.h
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:55:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPseudoList Class Reference

CPseudoList Class Reference

#include <pseudolist.h>

Inheritance diagram for CPseudoList:

[legend]
Collaboration diagram for CPseudoList:

[legend]
List of all members.

Public Member Functions

CPseudoList (int wid, int cmd)
virtual | ~CPseudoList ()

Protected Member Functions

afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)

Protected Attributes

int m_cmd
int m_wid

Constructor & Destructor Documentation

CPseudoList::CPseudoList | ( | int | wid,
 |  | int | cmd
 | ) |

Definition at line 37 of file PseudoList.cpp.

00037                                          : m_wid(wid), m_cmd(cmd)
00038 {
00039 }

CPseudoList::~CPseudoList ( ) [virtual]

Definition at line 41 of file PseudoList.cpp.

00042 {
00043 }

Member Function Documentation

void CPseudoList::OnLButtonDblClk | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

Definition at line 55 of file PseudoList.cpp.

References EV_LIST_DBLCLICK, UEventSendMessage(), and UMAKEINT.

00056 {
00057     UINT pFlags;
00058     int nItem = HitTest(point, &pFlags);
00059     if(nItem != -1)
00060     {
00061         CString s = GetItemText(nItem, 0);
00062
00063         UEventSendMessage(m_wid, EV_LIST_DBLCLICK, UMAKEINT(m_cmd, nItem),
00064             (void *)(const char *)s);
00065     }
00066
00067     CListCtrl::OnLButtonDblClk(nFlags, point);
00068 }

Here is the call graph for this function:

Member Data Documentation

int CPseudoList::m_cmd [protected]

Definition at line 56 of file pseudolist.h.

int CPseudoList::m_wid [protected]

Definition at line 56 of file pseudolist.h.

The documentation for this class was generated from the following files:
  • rf/support/mfc/pseudolist.h
  • rf/support/mfc/PseudoList.cpp
Generated on Sat Aug 7 22:55:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPseudoPageHider Class Reference

UPseudoPageHider Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for UPseudoPageHider:

[legend]
Collaboration diagram for UPseudoPageHider:

[legend]
List of all members.

Public Types

enum | { class_ID = FOUR_CHAR_CODE('UPPH') }

Public Member Functions

UPseudoPageHider (LStream *inStream)
virtual | ~UPseudoPageHider ()
void | SetWidID (int widid)
virtual void | ListenToMessage (MessageT inMessage, void *ioParam)

Protected Member Functions

void | DoRotate (int entry)
virtual void | ExecuteSelf (MessageT inMessage, void *ioParam)

Protected Attributes

std::vector< PaneIDT > | fViewSuite
int fWidid
int fCurSel
LPageController * | fPageCtrl

Member Enumeration Documentation

anonymous enum

Enumeration values:
class_ID
Definition at line 67 of file UPseudoSupport.h.
00067 { class_ID = FOUR_CHAR_CODE('UPPH') };

Constructor & Destructor Documentation

UPseudoPageHider::UPseudoPageHider ( LStream * inStream )

Definition at line 880 of file UPseudoSupport.cpp.

References UStr::c_str(), fViewSuite, UStr::length(), and UStr::set().

00880                                                     : LAttachment(inStream),
00881     fWidid(-1), fCurSel(-1), fPageCtrl(0L)
00882 {
00883     SetMessage(msg_FinishCreate);
00884
00885     LStr255 pstr;
00886     inStream->ReadPString(pstr);
00887
00888     UStr str(pstr);
00889     const char *ptr = str;
00890     while(ptr != 0L)
00891     {
00892         PaneIDT paneID;
00893         const char *tmp = strchr(ptr, ',');
00894         if(tmp != 0L)
00895         {
00896             UStr stmp;
00897             size_t offset = tmp - ptr;
00898             stmp.set(ptr, offset);
00899             ptr += offset + 1;
00900             if(stmp.length() == 4)
00901             {
00902                 paneID = *(PaneIDT *)(char *)stmp.c_str();
00903                 fViewSuite.push_back(paneID);
00904             }
00905         }
00906         else
00907         {
00908             if(strlen(ptr) == 4)
00909             {
00910                 paneID = *(PaneIDT *)ptr;
00911                 fViewSuite.push_back(paneID);
00912             }
00913             ptr = 0L;
00914         }
00915     }
00916 }

Here is the call graph for this function:

UPseudoPageHider::~UPseudoPageHider ( ) [virtual]

Definition at line 939 of file UPseudoSupport.cpp.

00940 {
00941 }

Member Function Documentation

void UPseudoPageHider::DoRotate ( int entry ) [protected]

Definition at line 943 of file UPseudoSupport.cpp.

References EV_CMD, fCurSel, fPageCtrl, fViewSuite, fWidid, macpp_findwindow(), macpp_getcmdid(), and UEventSendMessage().

Referenced by ListenToMessage().

00944 {
00945     if(fPageCtrl == 0L)
00946         return;
00947
00948     int cmdid;
00949     if(macpp_getcmdid(fPageCtrl->GetPaneID(), cmdid) && entry >= 0 && entry < fViewSuite.size() &&
00950         entry != fCurSel)
00951     {
00952         fCurSel = entry;
00953
00954         LWindow *win = macpp_findwindow(fPageCtrl);
00955         if(win == 0L)
00956             return;
00957
00958         LPane* samplePanel;
00959         std::vector<PaneIDT>::iterator i;
00960         for(i = fViewSuite.begin(); i != fViewSuite.end(); ++i)
00961         {
00962             samplePanel = win->FindPaneByID(*i);
00963             if(samplePanel != 0L)
00964                 samplePanel->Hide();
00965         }
00966
00967         samplePanel = win->FindPaneByID(fViewSuite[entry]);
00968         if(samplePanel == 0L)
00969             return;
00970
00971         samplePanel->Show();
00972
00973         if(fWidid != -1)
00974             UEventSendMessage(fWidid, EV_CMD, cmdid, (void *)entry);
00975     }
00976 }

Here is the call graph for this function:

void UPseudoPageHider::ExecuteSelf | ( | MessageT | inMessage,
 |  | void * | ioParam
 | ) | [protected, virtual]

Definition at line 918 of file UPseudoSupport.cpp.

References fPageCtrl, and UAppConsole().

00921 {
00922     if(inMessage == msg_FinishCreate)
00923     {
00924         LPane *pane = reinterpret_cast<LPane*>(ioParam);
00925         fPageCtrl = dynamic_cast<LPageController*>(pane);
00926         if(fPageCtrl == 0L)
00927         {
00928             UAppConsole("The UPseudoPageHider attachement does not have any LPageController to attach to.");
00929         }
00930         else
00931         {
00932             // add ourself to the broadcast so we receive the changes
00933             fPageCtrl->StartBroadcasting ();
00934             fPageCtrl->AddListener (this);
00935         }
00936     }
00937 }

Here is the call graph for this function:

void UPseudoPageHider::ListenToMessage | ( | MessageT | inMessage,
 |  | void * | ioParam
 | ) | [virtual]

Definition at line 978 of file UPseudoSupport.cpp.

References DoRotate(), and fPageCtrl.

00979 {
00980     if(fPageCtrl != 0L && inMessage == fPageCtrl->GetPaneID())
00981     {
00982         SInt32 currPageIndex = *static_cast<SInt32 *>(ioParam);
00983         DoRotate(currPageIndex - 1);
00984     }
00985 }

Here is the call graph for this function:

void UPseudoPageHider::SetWidID ( int widid ) [inline]

Definition at line 72 of file UPseudoSupport.h.

References fWidid.

Referenced by macpp_fecthview().

00072 { fWidid = widid; }

Member Data Documentation

int UPseudoPageHider::fCurSel [protected]

Definition at line 87 of file UPseudoSupport.h.

Referenced by DoRotate().

class LPageController* UPseudoPageHider::fPageCtrl [protected]

Definition at line 88 of file UPseudoSupport.h.

Referenced by DoRotate(), ExecuteSelf(), and ListenToMessage().

std::vector<PaneIDT> UPseudoPageHider::fViewSuite [protected]

Definition at line 85 of file UPseudoSupport.h.

Referenced by DoRotate(), and UPseudoPageHider().

int UPseudoPageHider::fWidid [protected]

Definition at line 86 of file UPseudoSupport.h.

Referenced by DoRotate(), and SetWidID().

The documentation for this class was generated from the following files:
  • rf/support/powerplant/UPseudoSupport.h
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:55:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPseudoPlaceHolder Class Reference

UPseudoPlaceHolder Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for UPseudoPlaceHolder:

[legend]
Collaboration diagram for UPseudoPlaceHolder:

[legend]
List of all members.

Public Types

enum | { class_ID = FOUR_CHAR_CODE('UPLH') }

Public Member Functions

UPseudoPlaceHolder (LStream *inStream)
virtual | ~UPseudoPlaceHolder ()
void | DoRotate (int entry)
void | SetWidID (int widid)
LView * | GetCurrentView (void)
virtual void | ListenToMessage (MessageT inMessage, void *ioParam)

Protected Member Functions

virtual void | FinishCreateSelf ()

Protected Attributes

std::vector< short > | fViewSuite
LView * | fCurrentView
PaneIDT | fController
int fWidid

Member Enumeration Documentation

anonymous enum

Enumeration values:
class_ID
Definition at line 42 of file UPseudoSupport.h.
00042 { class_ID = FOUR_CHAR_CODE('UPLH') };

Constructor & Destructor Documentation

UPseudoPlaceHolder::UPseudoPlaceHolder ( LStream * inStream )

Definition at line 777 of file UPseudoSupport.cpp.

References fController, fViewSuite, and UStr::set().

00777                                                         : LPlaceHolder(inStream),
00778     fCurrentView(0L), fWidid(-1)
00779 {
00780     LStr255 pstr;
00781     inStream->ReadPString(pstr);
00782     *inStream >> fController;
00783
00784     UStr str(pstr);
00785     const char *ptr = str;
00786     while(ptr != 0L)
00787     {
00788         int v;
00789         const char *tmp = strchr(ptr, ',');
00790         if(tmp != 0L)
00791         {
00792             UStr stmp;
00793             size_t offset = tmp - ptr;
00794             stmp.set(ptr, offset);
00795             ptr += offset + 1;
00796             if(sscanf(stmp, "%d", &v) == 1)
00797                 fViewSuite.push_back(v);
00798         }
00799         else
00800         {
00801             if(sscanf(ptr, "%d", &v) == 1)
00802                 fViewSuite.push_back(v);
00803             ptr = 0L;
00804         }
00805     }
00806 }

Here is the call graph for this function:

UPseudoPlaceHolder::~UPseudoPlaceHolder ( ) [virtual]

Definition at line 808 of file UPseudoSupport.cpp.

00809 {
00810 }

Member Function Documentation

void UPseudoPlaceHolder::DoRotate ( int entry )

Definition at line 812 of file UPseudoSupport.cpp.

References EV_PAGE_CHANGED, fCurrentView, fViewSuite, fWidid, gTurnOffBroadcast, macpp_findwindow(), macpp_getcmdid(), UEventSendMessage(), and UMAKEINT.

Referenced by FinishCreateSelf(), and ListenToMessage().

00813 {
00814     int cmdid;
00815     if(macpp_getcmdid(GetPaneID(), cmdid) && entry >= 0 && entry < fViewSuite.size())
00816     {
00817         LWindow *win = macpp_findwindow(this);
00818         if(win == 0L)
00819             return;
00820
00821         LView* samplePanel = UReanimator::CreateView(fViewSuite[entry], this, win);
00822         if(samplePanel == 0L)
00823             return;
00824
00825         InstallOccupant (samplePanel);
00826
00827         LView *oldView = fCurrentView;
00828
00829         if (fCurrentView != 0L)
00830         {
00831             fCurrentView->Hide ();
00832             fCurrentView = nil;
00833         }
00834
00835         Refresh();
00836         fCurrentView = samplePanel;
00837
00838         if(fWidid != -1 && !gTurnOffBroadcast)
00839             UEventSendMessage(fWidid, EV_PAGE_CHANGED, UMAKEINT(cmdid, entry), 0L);
00840
00841         if (oldView != 0L)
00842         {
00843             delete oldView;
00844         }
00845
00846     }
00847 }

Here is the call graph for this function:

void UPseudoPlaceHolder::FinishCreateSelf ( ) [protected, virtual]

Definition at line 858 of file UPseudoSupport.cpp.

References DoRotate(), fController, and macpp_findwindow().

00859 {
00860     DoRotate(0);
00861
00862     LWindow *win = macpp_findwindow(this);
00863     if(win == 0L)
00864         return;
00865
00866     LPageController *controller = dynamic_cast<LPageController*>(win->FindPaneByID(fController));
00867     if (controller != 0L)
00868     {
00869         controller->StartBroadcasting ();
00870         controller->AddListener (this);
00871     }
00872     LTabsControl *controller2 = dynamic_cast<LTabsControl*>(win->FindPaneByID(fController));
00873     if (controller2 != 0L)
00874     {
00875         controller2->StartBroadcasting ();
00876         controller2->AddListener (this);
00877     }
00878 }

Here is the call graph for this function:

LView* UPseudoPlaceHolder::GetCurrentView ( void ) [inline]

Definition at line 49 of file UPseudoSupport.h.

References fCurrentView.

Referenced by UWidget::OnPageChanged().

00049 { return fCurrentView; }

void UPseudoPlaceHolder::ListenToMessage | ( | MessageT | inMessage,
 |  | void * | ioParam
 | ) | [virtual]

Definition at line 849 of file UPseudoSupport.cpp.

References DoRotate(), and fController.

00850 {
00851     if(inMessage == fController)
00852     {
00853         SInt32 currPageIndex = *static_cast<SInt32 *>(ioParam);
00854         DoRotate(currPageIndex - 1);
00855     }
00856 }

Here is the call graph for this function:

void UPseudoPlaceHolder::SetWidID ( int widid ) [inline]

Definition at line 48 of file UPseudoSupport.h.

References fWidid.

Referenced by macpp_fecthview().

00048 { fWidid = widid; }

Member Data Documentation

PaneIDT UPseudoPlaceHolder::fController [protected]

Definition at line 60 of file UPseudoSupport.h.

Referenced by FinishCreateSelf(), ListenToMessage(), and UPseudoPlaceHolder().

LView* UPseudoPlaceHolder::fCurrentView [protected]

Definition at line 59 of file UPseudoSupport.h.

Referenced by DoRotate(), and GetCurrentView().

std::vector<short> UPseudoPlaceHolder::fViewSuite [protected]

Definition at line 58 of file UPseudoSupport.h.

Referenced by DoRotate(), and UPseudoPlaceHolder().

int UPseudoPlaceHolder::fWidid [protected]

Definition at line 61 of file UPseudoSupport.h.

Referenced by DoRotate(), and SetWidID().

The documentation for this class was generated from the following files:
  • rf/support/powerplant/UPseudoSupport.h
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:55:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPseudoRotButton Class Reference

CPseudoRotButton Class Reference

#include <PseudoButton.h>

Inheritance diagram for CPseudoRotButton:

[legend]
Collaboration diagram for CPseudoRotButton:

[legend]
List of all members.

Public Member Functions

CPseudoRotButton ()
virtual bool | LoadXPMs (const int *rsrcid, int numrsrc)
virtual void | DoRotate (int index)
int | GetCurrent (void) const
virtual | ~CPseudoRotButton ()

Protected Attributes

std::vector< HBITMAP > | m_bitmaps
std::vector< HBITMAP > | m_disbitmaps
int m_curindex

Constructor & Destructor Documentation

CPseudoRotButton::CPseudoRotButton ( )

Definition at line 152 of file PseudoButton.cpp.

00152                                    : m_curindex(-1)
00153 {
00154 }

CPseudoRotButton::~CPseudoRotButton ( ) [virtual]

Definition at line 156 of file PseudoButton.cpp.

References m_bitmaps, and m_disbitmaps.

00157 {
00158     m_bitmap = 0L;
00159     m_disbitmap = 0L;
00160     std::vector<HBITMAP>::iterator i;
00161     for(i = m_bitmaps.begin(); i != m_bitmaps.end(); ++i)
00162     {
00163         HBITMAP bmap = *i;
00164         AfxDeleteObject((HGDIOBJ*)&bmap);
00165     }
00166     for(i = m_disbitmaps.begin(); i != m_disbitmaps.end(); ++i)
00167     {
00168         HBITMAP bmap = *i;
00169         AfxDeleteObject((HGDIOBJ*)&bmap);
00170     }
00171 }

Member Function Documentation

void CPseudoRotButton::DoRotate ( int index ) [virtual]

Definition at line 201 of file PseudoButton.cpp.

References m_bitmaps, m_curindex, and m_disbitmaps.

Referenced by LoadXPMs(), and UWidget::OnSetState().

00202 {
00203     if(index < 0 || index > (int)m_bitmaps.size() || index > (int)m_disbitmaps.size() ||
00204         m_curindex == index)
00205         return;
00206
00207     SetBitmap(m_bitmaps[index]);
00208     Invalidate(TRUE);
00209     m_curindex = index;
00210     m_bitmap = m_bitmaps[index];
00211     m_disbitmap = m_disbitmaps[index];
00212 }

int CPseudoRotButton::GetCurrent ( void ) const [inline]

Definition at line 104 of file PseudoButton.h.

References m_curindex.

Referenced by UWidget::OnGetState().

00104 { return m_curindex; }

bool CPseudoRotButton::LoadXPMs | ( | const int * | rsrcid,
 |  | int | numrsrc
 | ) | [virtual]

Definition at line 173 of file PseudoButton.cpp.

References DD_PIXMAP, DoRotate(), CPseudoButton::loadIcon(), m_bitmaps, m_disbitmaps, and UMakeBitmap().

00174 {
00175     CString sicon;
00176     COLORREF back = ::GetSysColor(COLOR_BTNFACE);
00177     COLORREF fore = ::GetSysColor(COLOR_GRAYTEXT);
00178
00179     for(int i = 0; i < numrsrc; i++)
00180     {
00181         if(!CPseudoButton::loadIcon(sicon, rsrcid[i]))
00182             return false;
00183
00184         int w, h;
00185         HBITMAP bmap = UMakeBitmap((const char *)sicon, w, h, DD_PIXMAP, back, fore);
00186         if(bmap == 0L)
00187             return false;
00188
00189         HBITMAP disbmap = UMakeBitmap((const char *)sicon, w, h, DD_PIXMAP, back, fore, false);
00190         if(disbmap == 0L)
00191             return false;
00192
00193         m_bitmaps.push_back(bmap);
00194         m_disbitmaps.push_back(disbmap);
00195     }
00196
00197     DoRotate(0);
00198     return true;
00199 }

Here is the call graph for this function:

Member Data Documentation

std::vector<HBITMAP> CPseudoRotButton::m_bitmaps [protected]

Definition at line 95 of file PseudoButton.h.

Referenced by DoRotate(), LoadXPMs(), and ~CPseudoRotButton().

int CPseudoRotButton::m_curindex [protected]

Definition at line 97 of file PseudoButton.h.

Referenced by DoRotate(), and GetCurrent().

std::vector<HBITMAP> CPseudoRotButton::m_disbitmaps [protected]

Definition at line 96 of file PseudoButton.h.

Referenced by DoRotate(), LoadXPMs(), and ~CPseudoRotButton().

The documentation for this class was generated from the following files:
  • rf/support/mfc/PseudoButton.h
  • rf/support/mfc/PseudoButton.cpp
Generated on Sat Aug 7 22:55:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPseudoRotButton Class Reference

UPseudoRotButton Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for UPseudoRotButton:

[legend]
Collaboration diagram for UPseudoRotButton:

[legend]
List of all members.

Public Types

enum | { class_ID = FOUR_CHAR_CODE('UPRB') }

Public Member Functions

UPseudoRotButton (LStream *inStream, ClassIDT inImpID=LBevelButton::imp_class_ID)
virtual | ~UPseudoRotButton ()
virtual void | DoRotate (int icon, bool refresh=true)
int | GetCurrentState (void) const

Protected Member Functions

void | ReadIconsID (LStream *inStream, std::vector< short > &res)

Protected Attributes

std::vector< short > | fIconSuite
int fCurrentIcon

Member Enumeration Documentation

anonymous enum

Enumeration values:
class_ID
Definition at line 25 of file UPseudoSupport.h.
00025 { class_ID = FOUR_CHAR_CODE('UPRB') };

Constructor & Destructor Documentation

UPseudoRotButton::UPseudoRotButton | ( | LStream * | inStream,
 |  | ClassIDT | inImpID = LBevelButton::imp_class_ID
 | ) |

Definition at line 716 of file UPseudoSupport.cpp.

References DoRotate(), fIconSuite, and ReadIconsID().

00716                                                                       : LBevelButton(inStream, inImpID), fCurrentIcon(0)
00717 {
00718     ReadIconsID(inStream, fIconSuite);
00719
00720     if(fIconSuite.size() != 0)
00721         DoRotate(0, false);
00722 }

Here is the call graph for this function:

UPseudoRotButton::~UPseudoRotButton ( ) [virtual]

Definition at line 724 of file UPseudoSupport.cpp.

00725 {
00726 }

Member Function Documentation

void UPseudoRotButton::DoRotate | ( | int | icon,
 |  | bool | refresh = true
 | ) | [virtual]

Definition at line 757 of file UPseudoSupport.cpp.

References fCurrentIcon, and fIconSuite.

Referenced by UWidget::OnSetState(), and UPseudoRotButton().

00758 {
00759     if(fCurrentIcon != icon && icon >= 0 && icon < fIconSuite.size())
00760     {
00761         fCurrentIcon = icon;
00762         ControlButtonContentInfo info;
00763         GetContentInfo(info);
00764         if(info.contentType == kControlContentCIconRes ||
00765             info.contentType == kControlContentIconSuiteRes ||
00766             info.contentType == kControlContentICONRes ||
00767             info.contentType == kControlContentPictRes)
00768         {
00769             info.u.resID = fIconSuite[icon];
00770             SetContentInfo(info);
00771         }
00772         if(refresh)
00773             Refresh();
00774     }
00775 }

int UPseudoRotButton::GetCurrentState ( void ) const [inline]

Definition at line 31 of file UPseudoSupport.h.

References fCurrentIcon.

Referenced by UWidget::OnGetState().

00031 { return fCurrentIcon; }

void UPseudoRotButton::ReadIconsID | ( | LStream * | inStream,
 |  | std::vector< short > & | res
 | ) | [protected]

Definition at line 728 of file UPseudoSupport.cpp.

References UStr::set().

Referenced by UPseudoRotButton().

00729 {
00730     LStr255 pstr;
00731
00732     inStream->ReadPString(pstr);
00733     UStr str(pstr);
00734     const char *ptr = str;
00735     while(ptr != 0L)
00736     {
00737         int v;
00738         const char *tmp = strchr(ptr, ',');
00739         if(tmp != 0L)
00740         {
00741             UStr stmp;
00742             size_t offset = tmp - ptr;
00743             stmp.set(ptr, offset);
00744             ptr += offset + 1;
00745             if(sscanf(stmp, "%d", &v) == 1)
00746                 res.push_back(v);
00747         }
00748         else
00749         {
00750             if(sscanf(ptr, "%d", &v) == 1)
00751                 res.push_back(v);
00752             ptr = 0L;
00753         }
00754     }
00755 }

Here is the call graph for this function:

Member Data Documentation

int UPseudoRotButton::fCurrentIcon [protected]

Definition at line 36 of file UPseudoSupport.h.

Referenced by DoRotate(), and GetCurrentState().

std::vector<short> UPseudoRotButton::fIconSuite [protected]

Definition at line 35 of file UPseudoSupport.h.

Referenced by DoRotate(), and UPseudoRotButton().

The documentation for this class was generated from the following files:
  • rf/support/powerplant/UPseudoSupport.h
  • rf/support/powerplant/UPseudoSupport.cpp
Generated on Sat Aug 7 22:55:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPseudoToggle Class Reference

CPseudoToggle Class Reference

#include <PseudoButton.h>

Inheritance diagram for CPseudoToggle:

[legend]
Collaboration diagram for CPseudoToggle:

[legend]
List of all members.

Public Member Functions

CPseudoToggle ()
~CPseudoToggle ()
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
virtual void | SetState (int state)
int | GetState (void) const
void | ToggleBtn ()
void | SetRadio (bool state)
bool | IsRadio (void) const
void | SetGroup (const char *group)
const char * | GetGroup (void) const
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags)

Protected Attributes

int m_flag
bool m_radio
CString | m_group

Constructor & Destructor Documentation

CPseudoToggle::CPseudoToggle ( )

Definition at line 223 of file PseudoButton.cpp.

00224 {
00225     m_flag = 0;
00226     m_radio = false;
00227 }

CPseudoToggle::~CPseudoToggle ( )

Definition at line 229 of file PseudoButton.cpp.

00230 {
00231 }

Member Function Documentation

void CPseudoToggle::DrawItem ( LPDRAWITEMSTRUCT lpDrawItemStruct ) [virtual]

Reimplemented from CPseudoButton.

Definition at line 260 of file PseudoButton.cpp.

References CPseudoButton::DrawItem(), and m_flag.

00261 {
00262     if(m_flag)
00263         lpDIS->itemState |= ODS_SELECTED;
00264     CPseudoButton::DrawItem(lpDIS);
00265 }

Here is the call graph for this function:

const char* CPseudoToggle::GetGroup ( void ) const [inline]

Definition at line 153 of file PseudoButton.h.

References m_group.

Referenced by SetState().

00153 { return m_group; }

int CPseudoToggle::GetState ( void ) const [inline]

Definition at line 146 of file PseudoButton.h.

References m_flag.

Referenced by UWidget::OnGetState(), and ToggleBtn().

00146 { return m_flag;}

bool CPseudoToggle::IsRadio ( void ) const [inline]

Definition at line 151 of file PseudoButton.h.

References m_radio.

Referenced by SetState().

00151 { return m_radio; }

afx_msg void CPseudoToggle::OnChar | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) |

afx_msg void CPseudoToggle::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) |

void CPseudoToggle::OnLButtonUp | ( | UINT | nFlags,
 |  | CPoint | point
 | ) |

Reimplemented from CCJFlatButton.

Definition at line 267 of file PseudoButton.cpp.

References CCJFlatButton::OnLButtonUp(), PtInRect(), and ToggleBtn().

00268 {
00269     CRect rect;
00270     GetClientRect(&rect);
00271
00272     //check you are still on the button
00273     if(PtInRect(rect, point))
00274         ToggleBtn();
00275
00276     CPseudoButton::OnLButtonUp(nFlags, point);
00277 }

Here is the call graph for this function:

void CPseudoToggle::SetGroup ( const char * group ) [inline]

Definition at line 152 of file PseudoButton.h.

References m_group.

00152 { m_group = group; }

void CPseudoToggle::SetRadio ( bool state ) [inline]

Definition at line 150 of file PseudoButton.h.

References m_radio.

00150 { m_radio = state; }

void CPseudoToggle::SetState ( int state ) [virtual]

Definition at line 233 of file PseudoButton.cpp.

References GetGroup(), IsRadio(), m_flag, and m_group.

Referenced by UCmdUI::Check(), UWidget::OnSetState(), and ToggleBtn().

00234 {
00235     int newstate = state ? 1 : 0;
00236     if(m_flag == newstate)
00237         return;
00238
00239     m_flag = newstate;
00240     Invalidate(TRUE);
00241
00242     if(state && IsRadio() && !m_group.IsEmpty())
00243     {
00244         CWnd *hwndChild, *parent = GetParent();
00245         for (hwndChild = parent->GetTopWindow(); hwndChild != 0L; hwndChild = hwndChild->GetNextWindow())
00246         {
00247             if(hwndChild != this && hwndChild->IsWindowEnabled() && hwndChild->IsKindOf(RUNTIME_CLASS(CPseudoToggle)))
00248             {
00249                 CPseudoToggle *btn = (CPseudoToggle *)hwndChild;
00250                 if(btn->IsRadio() && m_group == btn->GetGroup())
00251                 {
00252                     btn->SetState(0);
00253                     break;
00254                 }
00255             }
00256         }
00257     }
00258 }

Here is the call graph for this function:

void CPseudoToggle::ToggleBtn ( ) [inline]

Definition at line 147 of file PseudoButton.h.

References GetState(), and SetState().

Referenced by OnLButtonUp().

00147 { SetState(GetState() == 0 ? 1:0);}

Here is the call graph for this function:

Member Data Documentation

int CPseudoToggle::m_flag [protected]

Definition at line 135 of file PseudoButton.h.

Referenced by DrawItem(), GetState(), and SetState().

CString CPseudoToggle::m_group [protected]

Definition at line 137 of file PseudoButton.h.

Referenced by GetGroup(), SetGroup(), and SetState().

bool CPseudoToggle::m_radio [protected]

Definition at line 136 of file PseudoButton.h.

Referenced by IsRadio(), and SetRadio().

The documentation for this class was generated from the following files:
  • rf/support/mfc/PseudoButton.h
  • rf/support/mfc/PseudoButton.cpp
Generated on Sat Aug 7 22:55:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UPStr Class Reference

UPStr Class Reference

Up to 255 characters pascal and C string class. More...

#include <ustr.h>

Inheritance diagram for UPStr:

[legend]
Collaboration diagram for UPStr:

[legend]
List of all members.

Public Member Functions

UPStr ()
UPStr (const char *newstr)
UPStr (const unsigned char *newstr)
UPStr (const UPStr &newstr)
virtual | ~UPStr ()
bool | empty (void) const
unsigned int | length (void) const
UPStr & | operator= (const char *newstr)
Set to a new C String (0L is OK).
UPStr & | operator= (const unsigned char *newstr)
Set to a new P String (0L is OK).
UPStr & | operator= (const UPStr &newstr)
Set according to another UPStr.
operator const char * () const
Access the string as a C string.
operator const unsigned char * () const
Access the string as a P string.
UPStr & | set (const char *buf, unsigned int len)
Set from a buffer.
const char * | c_str () const
Access the string as a C string.
const unsigned char * | p_str () const
Access the string as a P string.
UPStr & | operator<< (const char *addToStr)
Concatenate.
UPStr & | operator<< (char addToStr)
Concatenate.
UPStr & | operator<< (int addToStr)
Concatenate.
bool | endsWith (char c) const
UPStr & | replace (char which, char bywhich)

Protected Member Functions

void | clear (void)

Protected Attributes

char * | m_str

Detailed Description

Up to 255 characters pascal and C string class.

Definition at line 100 of file ustr.h.

Constructor & Destructor Documentation

UPStr::UPStr ( ) [inline]

Definition at line 220 of file ustr.h.

00221     : m_str(0L)
00222 {
00223 }

UPStr::UPStr ( const char * newstr ) [inline]

Definition at line 225 of file ustr.h.

00226 {
00227     m_str = 0L;
00228     *this = newstr;
00229 }

UPStr::UPStr ( const unsigned char * newstr ) [inline]

Definition at line 232 of file ustr.h.

00233 {
00234     m_str = 0L;
00235     *this = newstr;
00236 }

UPStr::UPStr ( const UPStr & newstr ) [inline]

Definition at line 239 of file ustr.h.

00240 {
00241     m_str = 0L;
00242     *this = newstr;
00243 }

UPStr::~UPStr ( ) [virtual]

Definition at line 494 of file ustr.cpp.

References clear().

00495 {
00496     clear();
00497 }

Here is the call graph for this function:

Member Function Documentation

const char * UPStr::c_str ( ) const [inline]

Access the string as a C string.

Definition at line 278 of file ustr.h.

00279 {
00280     return m_str == 0L ? "" : m_str + 1;
00281 }

void UPStr::clear ( void ) [protected]

Clear the string Definition at line 502 of file ustr.cpp.

References free, and m_str.

Referenced by operator=(), set(), and ~UPStr().

00503 {
00504     if( m_str )
00505     {
00506         free(m_str);
00507         m_str = 0L;
00508     }
00509 }

bool UPStr::empty ( void ) const [inline]

Check whether the string is empty

Returns:
true if the string is empty, false otherwise
Definition at line 249 of file ustr.h.

Referenced by replace(), and CvsPrefs::ServerName().

00250 {
00251     return m_str == 0L || m_str[0] == '\0';
00252 }

bool UPStr::endsWith ( char c ) const [inline]

Check whether the string is ending with a given character

Parameters:
c The character to check
Returns:
true if the string ends with a character, false otherwise
Definition at line 310 of file ustr.h.
00311 {
00312     return m_str == 0L ? false : m_str[m_str[0]] == c;
00313 }

unsigned int UPStr::length ( void ) const [inline]

Get the string length

Returns:
The string length
Definition at line 258 of file ustr.h.

Referenced by operator<<(), and PCPStr::SizeOf().

00259 {
00260     return m_str == 0L ? 0 : (unsigned char)m_str[0];
00261 }

UPStr::operator const char * ( ) const [inline]

Access the string as a C string.

Reimplemented in PCPStr.

Definition at line 264 of file ustr.h.

00265 {
00266     return m_str == 0L ? "" : m_str + 1;
00267 }

UPStr::operator const unsigned char * ( ) const [inline]

Access the string as a P string.

Reimplemented in PCPStr.

Definition at line 285 of file ustr.h.

00286 {
00287     return m_str == 0L ? (const unsigned char*)"" : (const unsigned char*)m_str;
00288 }

UPStr & UPStr::operator<< ( int addToStr )

Concatenate.

Definition at line 654 of file ustr.cpp.

00655 {
00656     char astr[50];
00657     sprintf(astr, "%d", addToStr);
00658     return *this << astr;
00659 }

UPStr & UPStr::operator<< ( char addToStr )

Concatenate.

Definition at line 646 of file ustr.cpp.

00647 {
00648     char astr[2] = {'\0', '\0'};
00649     astr[0] = addToStr;
00650     return *this << astr;
00651 }

UPStr & UPStr::operator<< ( const char * addToStr )

Concatenate.

Definition at line 617 of file ustr.cpp.

References kMaxChar, length(), m_str, and realloc.

00618 {
00619     if( addToStr == 0L )
00620         return *this;
00621
00622     if( m_str == 0L )
00623     {
00624         *this = addToStr;
00625         return *this;
00626     }
00627
00628     size_t len = strlen(addToStr);
00629     unsigned curlen = length();
00630
00631     if( len + length() > kMaxChar )
00632         len = kMaxChar - length();
00633
00634     if( len == 0 )
00635         return *this;
00636
00637     m_str = (char*)realloc(m_str, (len + curlen + 2) * sizeof(char));
00638     memcpy(m_str + curlen + 1, addToStr, len * sizeof(char));
00639     m_str[0] = len + curlen;
00640     m_str[len + curlen + 1] = '\0';
00641
00642     return *this;
00643 }

Here is the call graph for this function:

UPStr & UPStr::operator= ( const UPStr & newstr )

Set according to another UPStr.

Definition at line 559 of file ustr.cpp.

00560 {
00561     *this = (const char*)newstr;
00562     return *this;
00563 }

UPStr & UPStr::operator= ( const unsigned char * newstr )

Set to a new P String (0L is OK).

Reimplemented in PCPStr.

Definition at line 537 of file ustr.cpp.

References clear(), m_str, malloc, and UTHROW.

00538 {
00539     if( newstr == 0L )
00540         newstr = (unsigned char*)"";
00541
00542     int l = newstr[0];
00543     char* newvalue = (char*)malloc((l + 2) * sizeof(char));
00544     if( newvalue == 0L )
00545         UTHROW(std::bad_alloc());
00546
00547     memcpy(newvalue + 1, (char*)newstr + 1, l * sizeof(char));
00548     newvalue[0] = l;
00549     newvalue[l + 1] = '\0';
00550
00551     clear();
00552
00553     m_str = newvalue;
00554
00555     return *this;
00556 }

Here is the call graph for this function:

UPStr & UPStr::operator= ( const char * newstr )

Set to a new C String (0L is OK).

Reimplemented in PCPStr.

Definition at line 512 of file ustr.cpp.

References clear(), kMaxChar, m_str, malloc, and UTHROW.

00513 {
00514     if( newstr == 0L )
00515         newstr = "";
00516
00517     size_t l = strlen(newstr);
00518     if( l > kMaxChar )
00519         l = kMaxChar;
00520
00521     char* newvalue = (char*)malloc((l + 2) * sizeof(char));
00522     if(newvalue == 0L)
00523         UTHROW(std::bad_alloc());
00524
00525     strncpy(newvalue + 1, newstr, l);
00526     newvalue[0] = l;
00527     newvalue[l + 1] = '\0';
00528
00529     clear();
00530
00531     m_str = newvalue;
00532
00533     return *this;
00534 }

Here is the call graph for this function:

const unsigned char * UPStr::p_str ( ) const [inline]

Access the string as a P string.

Definition at line 299 of file ustr.h.

00300 {
00301     return m_str == 0L ? (unsigned char*)"" : (unsigned char*)m_str;
00302 }

UPStr & UPStr::replace | ( | char | which,
 |  | char | bywhich
 | ) |

Replace a character

Parameters:
which | Character to be replaced
bywhich | Character to replace
Returns:
Self
Definition at line 599 of file ustr.cpp.

References empty(), and m_str.

00600 {
00601     if( !empty() )
00602     {
00603         char* buf = m_str + 1;
00604         while( *buf )
00605         {
00606             if( *buf == which )
00607                 *buf++ = bywhich;
00608             else
00609                 buf++;
00610         }
00611     }
00612
00613     return *this;
00614 }

Here is the call graph for this function:

UPStr & UPStr::set | ( | const char * | buf,
 |  | unsigned int | len
 | ) |

Set from a buffer.

Definition at line 566 of file ustr.cpp.

References clear(), kMaxChar, m_str, malloc, and UAppConsole().

00567 {
00568     clear();
00569
00570     if( len == 0 )
00571     {
00572         *this = "";
00573         return *this;
00574     }
00575
00576     if( len > kMaxChar )
00577         len = kMaxChar;
00578
00579     m_str = (char*)malloc((len + 2) * sizeof(char));
00580     if( m_str == 0L )
00581     {
00582         UAppConsole("Impossible to allocate %d bytes !\n", (len + 2) * sizeof(char));
00583         return *this;
00584     }
00585
00586     memcpy(m_str + 1, buf, len * sizeof(char));
00587     m_str[0] = len;
00588     m_str[len + 1] = '\0';
00589
00590     return *this;
00591 }

Here is the call graph for this function:

Member Data Documentation

char* UPStr::m_str [protected]

The String Definition at line 112 of file ustr.h.

Referenced by clear(), operator<<(), operator=(), replace(), and set().

The documentation for this class was generated from the following files:
  • rf/ustr.h
  • rf/ustr.cpp
Generated on Sat Aug 7 22:55:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyAutoObject< T > Class Template Reference

PyAutoObject< T > Class Template Reference

#include <PythonContainer.h>

Collaboration diagram for PyAutoObject< T >:

[legend]
List of all members.

Public Member Functions

PyAutoObject ()
PyAutoObject (T *o)
PyAutoObject (PyObject *o)
PyAutoObject (PyAutoObject &obj)
operator T * () const
~PyAutoObject ()
PyAutoObject & | operator= (T *o)
PyAutoObject & | operator= (PyObject *o)
PyAutoObject & | operator= (PyAutoObject &obj)
PyObject * | CopyReturn (void)
bool | IsValid (void)
T * | operator-> (void)

Protected Member Functions

void | Ref (void)
void | UnRef (void)

Protected Attributes

T * | m_o

template<class T>
class PyAutoObject< T >

Constructor & Destructor Documentation

template<class T>
PyAutoObject< T >::PyAutoObject ( ) [inline]

Definition at line 99 of file PythonContainer.h.

References PyAutoObject< T >::m_o, and NULL.

00099                           : m_o(NULL)
00100     {
00101     }

template<class T>
PyAutoObject< T >::PyAutoObject ( T * o ) [inline]

Definition at line 103 of file PythonContainer.h.

References PyAutoObject< T >::m_o, and PyAutoObject< T >::Ref().

00103                               : m_o(o)
00104     {
00105         Ref();
00106     }

Here is the call graph for this function:

template<class T>
PyAutoObject< T >::PyAutoObject ( PyObject * o ) [inline]

Definition at line 108 of file PythonContainer.h.

References PyAutoObject< T >::m_o, and PyAutoObject< T >::Ref().

00108                                      : m_o((T *)o)
00109     {
00110         Ref();
00111     }

Here is the call graph for this function:

template<class T>
PyAutoObject< T >::PyAutoObject ( PyAutoObject< T > & obj ) [inline]

Definition at line 113 of file PythonContainer.h.

References PyAutoObject< T >::CopyReturn(), and PyAutoObject< T >::m_o.

00113                                             : m_o((T *)obj.CopyReturn())
00114     {
00115     }

Here is the call graph for this function:

template<class T>
PyAutoObject< T >::~PyAutoObject ( ) [inline]

Definition at line 119 of file PythonContainer.h.

References PyAutoObject< T >::UnRef().

00120     {
00121         UnRef();
00122     }

Here is the call graph for this function:

Member Function Documentation

template<class T>
PyObject* PyAutoObject< T >::CopyReturn ( void ) [inline]

Definition at line 147 of file PythonContainer.h.

References PyAutoObject< T >::m_o, and PyAutoObject< T >::Ref().

Referenced by PyMenuMgr::AddPulldown(), cvsgui_GetCvsEntries(), cvsgui_GetSelection(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), PyAutoObject< T >::operator=(), and PyAutoObject< T >::PyAutoObject().

00148     {
00149         Ref();
00150         return (PyObject *)m_o;
00151     }

Here is the call graph for this function:

template<class T>
bool PyAutoObject< T >::IsValid ( void ) [inline]

Definition at line 153 of file PythonContainer.h.

References PyAutoObject< T >::m_o.

Referenced by PyMenuMgr::AddPulldown(), cvsgui_GetCvsEntries(), cvsgui_GetSelection(), cvsgui_GetTopMacroAdminMenu(), and cvsgui_GetTopMacroSelectionMenu().

00154     {
00155         return m_o != 0L;
00156     }

template<class T>
PyAutoObject< T >::operator T * ( void ) const [inline]

Definition at line 117 of file PythonContainer.h.

References PyAutoObject< T >::m_o.

00117 { return m_o; }

template<class T>
T* PyAutoObject< T >::operator-> ( void ) [inline]

Definition at line 158 of file PythonContainer.h.

References PyAutoObject< T >::m_o.

00159     {
00160         return m_o;
00161     }

template<class T>
PyAutoObject& PyAutoObject< T >::operator= ( PyAutoObject< T > & obj ) [inline]

Definition at line 140 of file PythonContainer.h.

References PyAutoObject< T >::CopyReturn(), PyAutoObject< T >::m_o, and PyAutoObject< T >::UnRef().

00141     {
00142         UnRef();
00143         m_o = (T *)obj.CopyReturn();
00144         return *this;
00145     }

Here is the call graph for this function:

template<class T>
PyAutoObject& PyAutoObject< T >::operator= ( PyObject * o ) [inline]

Definition at line 132 of file PythonContainer.h.

References PyAutoObject< T >::m_o, PyAutoObject< T >::Ref(), and PyAutoObject< T >::UnRef().

00133     {
00134         UnRef();
00135         m_o = (T *)o;
00136         Ref();
00137         return *this;
00138     }

Here is the call graph for this function:

template<class T>
PyAutoObject& PyAutoObject< T >::operator= ( T * o ) [inline]

Definition at line 124 of file PythonContainer.h.

References PyAutoObject< T >::m_o, PyAutoObject< T >::Ref(), and PyAutoObject< T >::UnRef().

00125     {
00126         UnRef();
00127         m_o = o;
00128         Ref();
00129         return *this;
00130     }

Here is the call graph for this function:

template<class T>
void PyAutoObject< T >::Ref ( void ) [inline, protected]

Definition at line 164 of file PythonContainer.h.

References PyAutoObject< T >::m_o.

Referenced by PyAutoObject< T >::CopyReturn(), PyAutoObject< T >::operator=(), and PyAutoObject< T >::PyAutoObject().

00165     {
00166         if(m_o)
00167             Py_INCREF(m_o);
00168     }

template<class T>
void PyAutoObject< T >::UnRef ( void ) [inline, protected]

Definition at line 170 of file PythonContainer.h.

References PyAutoObject< T >::m_o, and NULL.

Referenced by PyAutoObject< T >::operator=(), and PyAutoObject< T >::~PyAutoObject().

00171     {
00172         if(m_o)
00173         {
00174             Py_DECREF(m_o);
00175             m_o = NULL;
00176         }
00177     }

Member Data Documentation

template<class T>
T* PyAutoObject< T >::m_o [protected]

Definition at line 179 of file PythonContainer.h.

Referenced by PyAutoObject< T >::CopyReturn(), PyAutoObject< T >::IsValid(), PyAutoObject< T >::operator T *(), PyAutoObject< T >::operator->(), PyAutoObject< T >::operator=(), PyAutoObject< T >::PyAutoObject(), PyAutoObject< T >::Ref(), and PyAutoObject< T >::UnRef().

The documentation for this class was generated from the following file:
  • common/PythonContainer.h
Generated on Sat Aug 7 22:55:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyCmdUI Class Reference

PyCmdUI Class Reference

Cmd UI Python wrapper. More...

#include <PythonImpl.h>

Inheritance diagram for PyCmdUI:

[legend]
Collaboration diagram for PyCmdUI:

[legend]
List of all members.

Public Member Functions

PyObject * | Enable (PyObject *args)
PyObject * | SetCheck (PyObject *args)
PyObject * | SetText (PyObject *args)
PyCmdUI (UCmdUI *cmdui)
virtual | ~PyCmdUI ()

Static Public Member Functions

void | dealloc (obj_t *self)
PyObject * | getattr (obj_t *self, char *name)
PyAutoObject< obj_t > | New (void)
PyTypeObject * | GetType (void)
PyObject * | Create (PyObject *selfptr, PyObject *args)
void | InitValues (PyObject *d)
PyObject * | FindMethod (PyObject *self, char *name)

Static Public Attributes

const char * | m_doc = "Class to update an interface object state"
PyMethodDef | m_methods []
PyRegistry m_registry

Static Protected Member Functions

PyObject * | _Enable (obj_t *self, PyObject *args)
PyObject * | _SetCheck (obj_t *self, PyObject *args)
PyObject * | _SetText (obj_t *self, PyObject *args)

Protected Attributes

UCmdUI * m_cmdui

Detailed Description

Cmd UI Python wrapper.

Definition at line 103 of file PythonImpl.h.

Constructor & Destructor Documentation

PyCmdUI::PyCmdUI ( UCmdUI * cmdui ) [inline]

Definition at line 111 of file PythonImpl.h.

00111                            : m_cmdui(cmdui)
00112     {
00113     }

virtual PyCmdUI::~PyCmdUI ( ) [inline, virtual]

Definition at line 115 of file PythonImpl.h.

00116     {
00117     }

Member Function Documentation

PyObject* PyCmdUI::_Enable | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 106 of file PythonImpl.h.

00110 :
    PyCmdUI(UCmdUI* cmdui) : m_cmdui(cmdui)

PyObject* PyCmdUI::_SetCheck | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 107 of file PythonImpl.h.

00110 :
    PyCmdUI(UCmdUI* cmdui) : m_cmdui(cmdui)

PyObject* PyCmdUI::_SetText | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 108 of file PythonImpl.h.

00110 :
    PyCmdUI(UCmdUI* cmdui) : m_cmdui(cmdui)

PyObject * PyCmdUI::Create | ( | PyObject * | selfptr,
 |  | PyObject * | args
 | ) | [static]

Definition at line 337 of file PythonImpl.cpp.

References New(), NULL, PyArg_ParseTuple, and PyHandleCvsguiError().

00338 {
00339     UCmdUI *cmdui;
00340
00341 #if defined(SIZEOF_VOID_P) && (SIZEOF_VOID_P == 8)
00342     if( !PyArg_ParseTuple(args, "K:CCmdUI", &cmdui) )
00343         return NULL;
00344 #else
00345     if( !PyArg_ParseTuple(args, "i:CCmdUI", &cmdui) )
00346         return NULL;
00347 #endif
00348     PyAutoObject<PyCmdUI::obj_t> self = PyCmdUI::New();
00349     if( !self.IsValid() )
00350         return NULL;
00351
00352     TRY
00353     {
00354         self->m_object = new PyCmdUI(cmdui);
00355     }
00356     CATCH_ALL(e)
00357     {
00358         PyHandleCvsguiError(e);
00359         return NULL;
00360     }
00361     END_CATCH_ALL
00362
00363     return self.CopyReturn();
00364 }

Here is the call graph for this function:

void PyCmdUI::dealloc ( obj_t * self ) [static]

Definition at line 329 of file PythonImpl.cpp.

PyObject * PyCmdUI::Enable ( PyObject * args )

Definition at line 370 of file PythonImpl.cpp.

References UCmdUI::Enable(), m_cmdui, NULL, PyArg_ParseTuple, and PyContainer::Void().

00371 {
00372     int state;
00373
00374     if( !PyArg_ParseTuple(args, "i", &state) )
00375         return NULL;
00376
00377     m_cmdui->Enable(state != 0);
00378
00379     return Void();
00380 }

Here is the call graph for this function:

PyObject* PyCmdUI::FindMethod | ( | PyObject * | self,
 |  | char * | name
 | ) | [inline, static]

Definition at line 105 of file PythonImpl.h.

00110 :
    PyCmdUI(UCmdUI* cmdui) : m_cmdui(cmdui)

PyObject * PyCmdUI::getattr | ( | obj_t * | self,
 |  | char * | name
 | ) | [static]

Definition at line 329 of file PythonImpl.cpp.

PyTypeObject* PyCmdUI::GetType ( void ) [inline, static]

Definition at line 105 of file PythonImpl.h.

00110 :
    PyCmdUI(UCmdUI* cmdui) : m_cmdui(cmdui)

void PyCmdUI::InitValues ( PyObject * d ) [static]

Definition at line 366 of file PythonImpl.cpp.

00367 {
00368 }

PyAutoObject< PyCmdUI::obj_t > PyCmdUI::New ( void ) [static]

Definition at line 329 of file PythonImpl.cpp.

Referenced by Create().

PyObject * PyCmdUI::SetCheck ( PyObject * args )

Definition at line 382 of file PythonImpl.cpp.

References UCmdUI::Check(), m_cmdui, NULL, PyArg_ParseTuple, and PyContainer::Void().

00383 {
00384     int state;
00385
00386     if( !PyArg_ParseTuple(args, "i", &state) )
00387         return NULL;
00388
00389     m_cmdui->Check(state != 0);
00390
00391     return Void();
00392 }

Here is the call graph for this function:

PyObject * PyCmdUI::SetText ( PyObject * args )

Definition at line 394 of file PythonImpl.cpp.

References m_cmdui, NULL, PyArg_ParseTuple, UCmdUI::SetText(), and PyContainer::Void().

00395 {
00396     char* text;
00397
00398     if( !PyArg_ParseTuple(args, "s", &text) )
00399         return NULL;
00400
00401     m_cmdui->SetText(text);
00402
00403     return Void();
00404 }

Here is the call graph for this function:

Member Data Documentation

UCmdUI* PyCmdUI::m_cmdui [protected]

Cmd UI Definition at line 120 of file PythonImpl.h.

Referenced by Enable(), SetCheck(), and SetText().

const char * PyCmdUI::m_doc = "Class to update an interface object state" [static]

Definition at line 329 of file PythonImpl.cpp.

PyMethodDef PyCmdUI::m_methods [static]

Initial value:

   {
    {"Enable", (binaryfunc)PyCmdUI ::_Enable , METH_VARARGS, (char *) "Enable/Disable the object" },
    {"SetCheck", (binaryfunc)PyCmdUI ::_SetCheck , METH_VARARGS, (char *) "Check/uncheck the object" },
    {"SetText", (binaryfunc)PyCmdUI ::_SetText , METH_VARARGS, (char *) "Rename the object" },
 {NULL, NULL}   }
Definition at line 331 of file PythonImpl.cpp.

PyRegistry PyCmdUI::m_registry [static]

The documentation for this class was generated from the following files:
  • common/PythonImpl.h
  • common/PythonImpl.cpp
Generated on Sat Aug 7 22:55:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyCmdUI::obj_t Struct Reference

PyCmdUI::obj_t Struct Reference

#include <PythonImpl.h>

Collaboration diagram for PyCmdUI::obj_t:

[legend]
List of all members.

Public Attributes

PyObject_HEAD PyCmdUI * m_object

Member Data Documentation

PyObject_HEAD PyCmdUI* PyCmdUI::obj_t::m_object

Definition at line 105 of file PythonImpl.h.

The documentation for this struct was generated from the following file:
  • common/PythonImpl.h
Generated on Sat Aug 7 22:55:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyColorConsole Class Reference

PyColorConsole Class Reference

Color console Python wrapper. More...

#include <PythonImpl.h>

Inheritance diagram for PyColorConsole:

[legend]
Collaboration diagram for PyColorConsole:

[legend]
List of all members.

Public Member Functions

PyObject * | Print (PyObject *args)
PyColorConsole ()
virtual | ~PyColorConsole ()

Static Public Member Functions

void | dealloc (obj_t *self)
PyObject * | getattr (obj_t *self, char *name)
PyAutoObject< obj_t > | New (void)
PyTypeObject * | GetType (void)
PyObject * | Create (PyObject *selfptr, PyObject *args)
void | InitValues (PyObject *d)
PyObject * | FindMethod (PyObject *self, char *name)

Static Public Attributes

const char * | m_doc = "Class printing in color in the console"
PyMethodDef | m_methods []
PyRegistry m_registry

Static Protected Member Functions

PyObject * | _Print (obj_t *self, PyObject *args)

Protected Attributes

CColorConsole m_console

Detailed Description

Color console Python wrapper.

Definition at line 56 of file PythonImpl.h.

Constructor & Destructor Documentation

PyColorConsole::PyColorConsole ( ) [inline]

Definition at line 62 of file PythonImpl.h.

00063     {
00064     }

virtual PyColorConsole::~PyColorConsole ( ) [inline, virtual]

Definition at line 66 of file PythonImpl.h.

00067     {
00068     }

Member Function Documentation

PyObject* PyColorConsole::_Print | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 59 of file PythonImpl.h.

00061 :
    PyColorConsole()

PyObject * PyColorConsole::Create | ( | PyObject * | selfptr,
 |  | PyObject * | args
 | ) | [static]

Definition at line 126 of file PythonImpl.cpp.

References New(), NULL, PyArg_ParseTuple, and PyHandleCvsguiError().

00127 {
00128     if( !PyArg_ParseTuple(args, ":CColorConsole") )
00129         return NULL;
00130
00131     PyAutoObject<PyColorConsole::obj_t> self = PyColorConsole::New();
00132     if( !self.IsValid() )
00133         return NULL;
00134
00135     TRY
00136     {
00137         self->m_object = new PyColorConsole();
00138     }
00139     CATCH_ALL(e)
00140     {
00141         PyHandleCvsguiError(e);
00142         return NULL;
00143     }
00144     END_CATCH_ALL
00145
00146     return self.CopyReturn();
00147 }

Here is the call graph for this function:

void PyColorConsole::dealloc ( obj_t * self ) [static]

Definition at line 120 of file PythonImpl.cpp.

PyObject* PyColorConsole::FindMethod | ( | PyObject * | self,
 |  | char * | name
 | ) | [inline, static]

Definition at line 58 of file PythonImpl.h.

00061 :
    PyColorConsole()

PyObject * PyColorConsole::getattr | ( | obj_t * | self,
 |  | char * | name
 | ) | [static]

Definition at line 120 of file PythonImpl.cpp.

PyTypeObject* PyColorConsole::GetType ( void ) [inline, static]

Definition at line 58 of file PythonImpl.h.

00061 :
    PyColorConsole()

void PyColorConsole::InitValues ( PyObject * d ) [static]

Definition at line 150 of file PythonImpl.cpp.

References kBlue, kBold, kBrown, kGreen, kItalic, kMagenta, kNL, kNormal, kRed, kUnderline, and PyContainer::RegisterValue().

00151 {
00152     RegisterValue(d, "kNormal", kNormal);
00153     RegisterValue(d, "kBrown", kBrown);
00154     RegisterValue(d, "kGreen", kGreen);
00155     RegisterValue(d, "kMagenta", kMagenta);
00156     RegisterValue(d, "kRed", kRed);
00157     RegisterValue(d, "kBlue", kBlue);
00158     RegisterValue(d, "kBold", kBold);
00159     RegisterValue(d, "kItalic", kItalic);
00160     RegisterValue(d, "kUnderline", kUnderline);
00161     RegisterValue(d, "kNL", kNL);
00162 }

Here is the call graph for this function:

PyAutoObject< PyColorConsole::obj_t > PyColorConsole::New ( void ) [static]

Definition at line 120 of file PythonImpl.cpp.

Referenced by Create().

PyObject * PyColorConsole::Print ( PyObject * args )

Definition at line 164 of file PythonImpl.cpp.

References kConsoleColor, m_console, NULL, PyArg_ParseTuple, PyErr_Clear, and PyContainer::Void().

00165 {
00166     int style;
00167
00168     if( PyArg_ParseTuple(args, "i", &style) )
00169     {
00170         m_console << kConsoleColor(style);
00171         return Void();
00172     }
00173
00174     PyErr_Clear();
00175
00176     char* str;
00177     if( PyArg_ParseTuple(args, "s", &str) )
00178     {
00179         m_console << str;
00180         return Void();
00181     }
00182
00183     return NULL;
00184 }

Here is the call graph for this function:

Member Data Documentation

CColorConsole PyColorConsole::m_console [protected]

Console Definition at line 71 of file PythonImpl.h.

Referenced by Print().

const char * PyColorConsole::m_doc = "Class printing in color in the console" [static]

Definition at line 120 of file PythonImpl.cpp.

PyMethodDef PyColorConsole::m_methods [static]

Initial value:

   {
    {"Print", (binaryfunc)PyColorConsole ::_Print , METH_VARARGS, (char *) "Print in color" },
 {NULL, NULL}   }
Definition at line 122 of file PythonImpl.cpp.

PyRegistry PyColorConsole::m_registry [static]

The documentation for this class was generated from the following files:
  • common/PythonImpl.h
  • common/PythonImpl.cpp
Generated on Sat Aug 7 22:55:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyColorConsole::obj_t Struct Reference

PyColorConsole::obj_t Struct Reference

#include <PythonImpl.h>

Collaboration diagram for PyColorConsole::obj_t:

[legend]
List of all members.

Public Attributes

PyObject_HEAD PyColorConsole * m_object

Member Data Documentation

PyObject_HEAD PyColorConsole* PyColorConsole::obj_t::m_object

Definition at line 58 of file PythonImpl.h.

The documentation for this struct was generated from the following file:
  • common/PythonImpl.h
Generated on Sat Aug 7 22:55:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyContainer Class Reference

PyContainer Class Reference

#include <PythonContainer.h>

Inheritance diagram for PyContainer:

[legend]
List of all members.

Public Member Functions

PyContainer ()
virtual | ~PyContainer ()
virtual PyObject * | GetAttr (char *name)

Static Public Member Functions

PyObject * | True ()
PyObject * | False ()
PyObject * | Void ()
void | RegisterValue (PyObject *d, char *name, int value)

Constructor & Destructor Documentation

PyContainer::PyContainer ( ) [inline]

Definition at line 79 of file PythonContainer.h.

00079 {}

virtual PyContainer::~PyContainer ( ) [inline, virtual]

Definition at line 80 of file PythonContainer.h.

00080 {}

Member Function Documentation

PyObject* PyContainer::False ( ) [inline, static]

Definition at line 86 of file PythonContainer.h.

References GetPyFalse().

Referenced by cvsgui_PromptMessage(), and PyCvsEntry::GetAttr().

00086 { Py_INCREF(GetPyFalse()); return GetPyFalse(); }

Here is the call graph for this function:

virtual PyObject* PyContainer::GetAttr ( char * name ) [inline, virtual]

Reimplemented in PyCvsEntry.

Definition at line 82 of file PythonContainer.h.

References NULL.

00082 { return NULL; }

void PyContainer::RegisterValue | ( | PyObject * | d,
 |  | char * | name,
 |  | int | value
 | ) | [static]

Definition at line 96 of file PythonContainer.cpp.

References NULL, PyDict_SetItemString, PyErr_Clear, and PyInt_FromLong.

Referenced by PyColorConsole::InitValues().

00097 {
00098     PyObject *v = PyInt_FromLong((long) value);
00099     if (v == NULL) {
00100         /* Don't bother reporting this error */
00101         PyErr_Clear();
00102     }
00103     else {
00104         PyDict_SetItemString(d, name, v);
00105         Py_DECREF(v);
00106     }
00107 }

PyObject* PyContainer::True ( ) [inline, static]

Definition at line 85 of file PythonContainer.h.

References GetPyTrue().

Referenced by cvsgui_PromptMessage(), and PyCvsEntry::GetAttr().

00085 { Py_INCREF(GetPyTrue()); return GetPyTrue(); }

Here is the call graph for this function:

PyObject* PyContainer::Void ( ) [inline, static]

Definition at line 87 of file PythonContainer.h.

References GetPyNone().

Referenced by PyMenuMgr::AddButton(), PyMenuMgr::AddSeparator(), PyMenuMgr::AddToggle(), cvsgui_GetHistoryAsXML(), cvsgui_LaunchBrowser(), cvsgui_LaunchTclMacro(), cvsgui_write(), PyMenuMgr::Delete(), PyMenuMgr::DeleteByCmd(), PyCmdUI::Enable(), PyColorConsole::Print(), PyCmdUI::SetCheck(), PyCmdUI::SetText(), and PyPersistent::SetValue().

00087 { Py_INCREF(GetPyNone()); return GetPyNone(); }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/PythonContainer.h
  • common/PythonContainer.cpp
Generated on Sat Aug 7 22:55:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPyCvsConsole Class Reference

CPyCvsConsole Class Reference

Inheritance diagram for CPyCvsConsole:

[legend]
Collaboration diagram for CPyCvsConsole:

[legend]
List of all members.

Public Member Functions

CPyCvsConsole ()
virtual | ~CPyCvsConsole ()
virtual long | cvs_out (const char *txt, long len)
virtual long | cvs_err (const char *txt, long len)

Public Attributes

CBuffer m_out
CBuffer m_err

Constructor & Destructor Documentation

CPyCvsConsole::CPyCvsConsole ( ) [inline]

Definition at line 556 of file PythonGlue.cpp.

00556 {}

virtual CPyCvsConsole::~CPyCvsConsole ( ) [inline, virtual]

Definition at line 557 of file PythonGlue.cpp.

00557 {}

Member Function Documentation

virtual long CPyCvsConsole::cvs_err | ( | const char * | txt,
 |  | long | len
 | ) | [inline, virtual]

Stderr handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 565 of file PythonGlue.cpp.

References CBuffer::append(), and m_err.

00566     {
00567         m_err.append(txt, len);
00568         return len;
00569     }

Here is the call graph for this function:

virtual long CPyCvsConsole::cvs_out | ( | const char * | txt,
 |  | long | len
 | ) | [inline, virtual]

Stdout handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 559 of file PythonGlue.cpp.

References CBuffer::append(), and m_out.

00560     {
00561         m_out.append(txt, len);
00562         return len;
00563     }

Here is the call graph for this function:

Member Data Documentation

CBuffer CPyCvsConsole::m_err

Definition at line 572 of file PythonGlue.cpp.

Referenced by cvs_err(), and cvsgui_RunCvs().

CBuffer CPyCvsConsole::m_out

Definition at line 571 of file PythonGlue.cpp.

Referenced by cvs_out(), and cvsgui_RunCvs().

The documentation for this class was generated from the following file:
  • common/PythonGlue.cpp
Generated on Sat Aug 7 22:56:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyCvsEntry Class Reference

PyCvsEntry Class Reference

Cvs Entry Python wrapper. More...

#include <PythonImpl.h>

Inheritance diagram for PyCvsEntry:

[legend]
Collaboration diagram for PyCvsEntry:

[legend]
List of all members.

Public Member Functions

PyCvsEntry (EntnodeData *data)
virtual | ~PyCvsEntry ()
virtual PyObject * | GetAttr (char *name)
operator EntnodeData * (void) const
EntnodeData* operator.

Static Public Member Functions

void | dealloc (obj_t *self)
PyObject * | getattr (obj_t *self, char *name)
PyAutoObject< obj_t > | New (void)
PyTypeObject * | GetType (void)
PyObject * | Create (PyObject *selfptr, PyObject *args)
void | InitValues (PyObject *d)
PyObject * | FindMethod (PyObject *self, char *name)

Static Public Attributes

const char * | m_doc = "Class for an entry in CVS/Entries"
PyMethodDef | m_methods []
PyRegistry m_registry

Protected Attributes

ENTNODE m_data

Detailed Description

Cvs Entry Python wrapper.

Definition at line 33 of file PythonImpl.h.

Constructor & Destructor Documentation

PyCvsEntry::PyCvsEntry ( EntnodeData * data ) [inline]

Definition at line 38 of file PythonImpl.h.

00038                                   : m_data(data)
00039     {
00040     }

virtual PyCvsEntry::~PyCvsEntry ( ) [inline, virtual]

Definition at line 42 of file PythonImpl.h.

00043     {
00044     }

Member Function Documentation

PyObject * PyCvsEntry::Create | ( | PyObject * | selfptr,
 |  | PyObject * | args
 | ) | [static]

Definition at line 34 of file PythonImpl.cpp.

References New(), NULL, PyArg_ParseTuple, and PyHandleCvsguiError().

00035 {
00036     if( !PyArg_ParseTuple(args, ":CCvsEntry") )
00037         return NULL;
00038
00039     PyAutoObject<PyCvsEntry::obj_t> self = PyCvsEntry::New();
00040     if( !self.IsValid() )
00041         return NULL;
00042
00043     TRY
00044     {
00045         self->m_object = new PyCvsEntry(0L);
00046     }
00047     CATCH_ALL(e)
00048     {
00049         PyHandleCvsguiError(e);
00050         return NULL;
00051     }
00052     END_CATCH_ALL
00053
00054     return self.CopyReturn();
00055 }

Here is the call graph for this function:

void PyCvsEntry::dealloc ( obj_t * self ) [static]

Definition at line 29 of file PythonImpl.cpp.

PyObject* PyCvsEntry::FindMethod | ( | PyObject * | self,
 |  | char * | name
 | ) | [inline, static]

Definition at line 35 of file PythonImpl.h.

00037 :
    PyCvsEntry(EntnodeData* data) : m_data(data)

PyObject * PyCvsEntry::GetAttr ( char * name ) [virtual]

Reimplemented from PyContainer.

Definition at line 61 of file PythonImpl.cpp.

References ENT_FILE, PyContainer::False(), EntnodeData::GetFullPathName(), EntnodeData::GetName(), EntnodeData::GetState(), EntnodeData::GetType(), EntnodeData::IsIgnored(), EntnodeData::IsLocked(), EntnodeData::IsMissing(), EntnodeData::IsRemoved(), EntnodeData::IsUnknown(), EntnodeData::IsUnmodified(), m_data, NULL, PyString_FromString, and PyContainer::True().

00062 {
00063     UStr buf;
00064     EntnodeData* data = m_data;
00065
00066     if( strcmp(name, "name") == 0 )
00067         return PyString_FromString(data->GetName());
00068     else if( strcmp(name, "fullname") == 0 )
00069         return PyString_FromString(data->GetFullPathName(buf));
00070     else if( strcmp(name, "version") == 0 )
00071     {
00072         const char* str = (*data)[EntnodeFile::kVN];
00073         return PyString_FromString(str ? str : "");
00074     }
00075     else if( strcmp(name, "timeutc") == 0 )
00076     {
00077         const char* str = (*data)[EntnodeFile::kTS];
00078         return PyString_FromString(str ? str : "");
00079     }
00080     else if( strcmp(name, "keyword") == 0 )
00081     {
00082         const char* str = (*data)[EntnodeFile::kOption];
00083         return PyString_FromString(str ? str : "");
00084     }
00085     else if( strcmp(name, "tag") == 0 )
00086     {
00087         const char* str = (*data)[EntnodeFile::kTag];
00088         return PyString_FromString(str ? str : "");
00089     }
00090     else if( strcmp(name, "isfile") == 0 )
00091         return data->GetType() == ENT_FILE ? True() : False();
00092     else if( strcmp(name, "modified") == 0 )
00093         return data->IsUnmodified() ? False() : True();
00094     else if( strcmp(name, "missing") == 0 )
00095         return data->IsMissing() ? True() : False();
00096     else if( strcmp(name, "unknown") == 0 )
00097         return data->IsUnknown() ? True() : False();
00098     else if( strcmp(name, "ignored") == 0 )
00099         return data->IsIgnored() ? True() : False();
00100     else if( strcmp(name, "readonly") == 0 )
00101         return data->IsLocked() ? True() : False();
00102     else if( strcmp(name, "removed") == 0 )
00103         return data->IsRemoved() ? True() : False();
00104     else if( strcmp(name, "added") == 0 )
00105     {
00106         const char* vn = (*data)[EntnodeFile::kVN];
00107         bool isAdded = vn && (strcmp(vn, "0") == 0);
00108         return isAdded ? True() : False();
00109     }
00110     else if( strcmp(name, "state") == 0 )
00111         return PyString_FromString(data->GetState() ? data->GetState() : "");
00112     else if( strcmp(name, "encoding") == 0 )
00113         return PyString_FromString((*data)[EntnodeFile::kEncoding] ? (*data)[EntnodeFile::kEncoding] : "");
00114     else if( strcmp(name, "conflict") == 0 )
00115         return PyString_FromString(data->GetConflict() ? data->GetConflict() : "");
00116
00117     return NULL;
00118 }

Here is the call graph for this function:

PyObject * PyCvsEntry::getattr | ( | obj_t * | self,
 |  | char * | name
 | ) | [static]

Definition at line 29 of file PythonImpl.cpp.

PyTypeObject* PyCvsEntry::GetType ( void ) [inline, static]

Definition at line 35 of file PythonImpl.h.

00037 :
    PyCvsEntry(EntnodeData* data) : m_data(data)

void PyCvsEntry::InitValues ( PyObject * d ) [static]

Definition at line 57 of file PythonImpl.cpp.

00058 {
00059 }

PyAutoObject< PyCvsEntry::obj_t > PyCvsEntry::New ( void ) [static]

Definition at line 29 of file PythonImpl.cpp.

Referenced by Create(), cvsgui_GetCvsEntries(), and cvsgui_GetSelection().

PyCvsEntry::operator EntnodeData * ( void ) const [inline]

EntnodeData* operator.

Definition at line 49 of file PythonImpl.h.

References m_data.

00049 { return m_data; }

Member Data Documentation

ENTNODE PyCvsEntry::m_data [protected]

Node data Definition at line 52 of file PythonImpl.h.

Referenced by GetAttr(), and operator EntnodeData *().

const char * PyCvsEntry::m_doc = "Class for an entry in CVS/Entries" [static]

Definition at line 29 of file PythonImpl.cpp.

PyMethodDef PyCvsEntry::m_methods [static]

Initial value:

   {
 {NULL, NULL}   }
Definition at line 31 of file PythonImpl.cpp.

PyRegistry PyCvsEntry::m_registry [static]

The documentation for this class was generated from the following files:
  • common/PythonImpl.h
  • common/PythonImpl.cpp
Generated on Sat Aug 7 22:56:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyCvsEntry::obj_t Struct Reference

PyCvsEntry::obj_t Struct Reference

#include <PythonImpl.h>

Collaboration diagram for PyCvsEntry::obj_t:

[legend]
List of all members.

Public Attributes

PyObject_HEAD PyCvsEntry * m_object

Member Data Documentation

PyObject_HEAD PyCvsEntry* PyCvsEntry::obj_t::m_object

Definition at line 35 of file PythonImpl.h.

The documentation for this struct was generated from the following file:
  • common/PythonImpl.h
Generated on Sat Aug 7 22:56:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyMenuMgr Class Reference

PyMenuMgr Class Reference

Menu Python wrapper. More...

#include <PythonImpl.h>

Inheritance diagram for PyMenuMgr:

[legend]
Collaboration diagram for PyMenuMgr:

[legend]
List of all members.

Public Member Functions

PyObject * | AddPulldown (PyObject *args)
PyObject * | AddToggle (PyObject *args)
PyObject * | AddButton (PyObject *args)
PyObject * | AddSeparator (PyObject *args)
PyObject * | Delete (PyObject *args)
PyObject * | DeleteByCmd (PyObject *args)
PyObject * | Count (PyObject *args)
PyMenuMgr (UMENU menu)
virtual | ~PyMenuMgr ()
operator UMENU () const
UMENU operator.

Static Public Member Functions

void | dealloc (obj_t *self)
PyObject * | getattr (obj_t *self, char *name)
PyAutoObject< obj_t > | New (void)
PyTypeObject * | GetType (void)
PyObject * | Create (PyObject *selfptr, PyObject *args)
void | InitValues (PyObject *d)
PyObject * | FindMethod (PyObject *self, char *name)

Static Public Attributes

const char * | m_doc = "Class to manipulate menus"
PyMethodDef | m_methods []
PyRegistry m_registry

Static Protected Member Functions

PyObject * | _AddPulldown (obj_t *self, PyObject *args)
PyObject * | _AddToggle (obj_t *self, PyObject *args)
PyObject * | _AddButton (obj_t *self, PyObject *args)
PyObject * | _AddSeparator (obj_t *self, PyObject *args)
PyObject * | _Delete (obj_t *self, PyObject *args)
PyObject * | _DeleteByCmd (obj_t *self, PyObject *args)
PyObject * | _Count (obj_t *self, PyObject *args)

Protected Attributes

UMENU m_menu

Detailed Description

Menu Python wrapper.

Definition at line 75 of file PythonImpl.h.

Constructor & Destructor Documentation

PyMenuMgr::PyMenuMgr ( UMENU menu ) [inline]

Definition at line 87 of file PythonImpl.h.

References UMENU.

Referenced by AddPulldown(), and Create().

00087                           : m_menu(menu)
00088     {
00089     }

virtual PyMenuMgr::~PyMenuMgr ( ) [inline, virtual]

Definition at line 91 of file PythonImpl.h.

00092     {
00093     }

Member Function Documentation

PyObject* PyMenuMgr::_AddButton | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 80 of file PythonImpl.h.

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

PyObject* PyMenuMgr::_AddPulldown | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 78 of file PythonImpl.h.

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

PyObject* PyMenuMgr::_AddSeparator | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 81 of file PythonImpl.h.

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

PyObject* PyMenuMgr::_AddToggle | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 79 of file PythonImpl.h.

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

PyObject* PyMenuMgr::_Count | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 84 of file PythonImpl.h.

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

PyObject* PyMenuMgr::_Delete | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 82 of file PythonImpl.h.

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

PyObject* PyMenuMgr::_DeleteByCmd | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 83 of file PythonImpl.h.

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

PyObject * PyMenuMgr::AddButton ( PyObject * args )

Definition at line 268 of file PythonImpl.cpp.

References m_menu, NULL, PyArg_ParseTuple, UMenuAddButton(), and PyContainer::Void().

00269 {
00270     int widid, cmd;
00271     char *name, *pixmap = 0L;
00272
00273     if( !PyArg_ParseTuple(args, "isi|s", &widid, &name, &cmd, &pixmap) )
00274         return NULL;
00275
00276     UMenuAddButton(widid, name, m_menu, pixmap, cmd);
00277
00278     return Void();
00279 }

Here is the call graph for this function:

PyObject * PyMenuMgr::AddPulldown ( PyObject * args )

Definition at line 238 of file PythonImpl.cpp.

References PyAutoObject< T >::CopyReturn(), PyAutoObject< T >::IsValid(), m_menu, New(), NULL, PyArg_ParseTuple, PyMenuMgr(), and UMenuAddPulldown().

00239 {
00240     int widid;
00241     char* name;
00242
00243     if( !PyArg_ParseTuple(args, "is", &widid, &name) )
00244         return NULL;
00245
00246     PyAutoObject<PyMenuMgr::obj_t> res = PyMenuMgr::New();
00247     if( !res.IsValid() )
00248         return NULL;
00249
00250     res->m_object = new PyMenuMgr(UMenuAddPulldown(widid, name, m_menu));
00251
00252     return res.CopyReturn();
00253 }

Here is the call graph for this function:

PyObject * PyMenuMgr::AddSeparator ( PyObject * args )

Definition at line 281 of file PythonImpl.cpp.

References m_menu, NULL, PyArg_ParseTuple, UMenuAddSeparator(), and PyContainer::Void().

00282 {
00283     int widid;
00284
00285     if( !PyArg_ParseTuple(args, "i", &widid) )
00286         return NULL;
00287
00288     UMenuAddSeparator(widid, m_menu);
00289
00290     return Void();
00291 }

Here is the call graph for this function:

PyObject * PyMenuMgr::AddToggle ( PyObject * args )

Definition at line 255 of file PythonImpl.cpp.

References m_menu, NULL, PyArg_ParseTuple, UMenuAddToggle(), and PyContainer::Void().

00256 {
00257     int widid, cmd;
00258     char *name, *pixmap = 0L;
00259
00260     if( !PyArg_ParseTuple(args, "isi|s", &widid, &name, &cmd, &pixmap) )
00261         return NULL;
00262
00263     UMenuAddToggle(widid, name, m_menu, pixmap, cmd);
00264
00265     return Void();
00266 }

Here is the call graph for this function:

PyObject * PyMenuMgr::Count ( PyObject * args )

Definition at line 317 of file PythonImpl.cpp.

References m_menu, NULL, PyArg_ParseTuple, PyInt_FromLong, and UMenuCount().

00318 {
00319     int res;
00320
00321     if( !PyArg_ParseTuple(args, "") )
00322         return NULL;
00323
00324     res = UMenuCount(m_menu);
00325
00326     return PyInt_FromLong(res);
00327 }

Here is the call graph for this function:

PyObject * PyMenuMgr::Create | ( | PyObject * | selfptr,
 |  | PyObject * | args
 | ) | [static]

Definition at line 209 of file PythonImpl.cpp.

References New(), NULL, PyArg_ParseTuple, PyHandleCvsguiError(), PyMenuMgr(), and UMENU.

00210 {
00211     UMENU menu;
00212
00213     if( !PyArg_ParseTuple(args, "i:CMenuMgr", &menu) )
00214         return NULL;
00215
00216     PyAutoObject<PyMenuMgr::obj_t> self = PyMenuMgr::New();
00217     if( !self.IsValid() )
00218         return NULL;
00219
00220     TRY
00221     {
00222         self->m_object = new PyMenuMgr(menu);
00223     }
00224     CATCH_ALL(e)
00225     {
00226         PyHandleCvsguiError(e);
00227         return NULL;
00228     }
00229     END_CATCH_ALL
00230
00231     return self.CopyReturn();
00232 }

Here is the call graph for this function:

void PyMenuMgr::dealloc ( obj_t * self ) [static]

Definition at line 186 of file PythonImpl.cpp.

00199 {

PyObject * PyMenuMgr::Delete ( PyObject * args )

Definition at line 293 of file PythonImpl.cpp.

References m_menu, NULL, PyArg_ParseTuple, UMenuDelete(), and PyContainer::Void().

00294 {
00295     int afterIndex;
00296
00297     if( !PyArg_ParseTuple(args, "i", &afterIndex) )
00298         return NULL;
00299
00300     UMenuDelete(m_menu, afterIndex);
00301
00302     return Void();
00303 }

Here is the call graph for this function:

PyObject * PyMenuMgr::DeleteByCmd ( PyObject * args )

Definition at line 305 of file PythonImpl.cpp.

References m_menu, NULL, PyArg_ParseTuple, UMenuDeleteByCmd(), and PyContainer::Void().

00306 {
00307     int cmd;
00308
00309     if( !PyArg_ParseTuple(args, "i", &cmd) )
00310         return NULL;
00311
00312     UMenuDeleteByCmd(m_menu, cmd);
00313
00314     return Void();
00315 }

Here is the call graph for this function:

PyObject* PyMenuMgr::FindMethod | ( | PyObject * | self,
 |  | char * | name
 | ) | [inline, static]

Definition at line 77 of file PythonImpl.h.

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

PyObject * PyMenuMgr::getattr | ( | obj_t * | self,
 |  | char * | name
 | ) | [static]

Definition at line 186 of file PythonImpl.cpp.

00199 {

PyTypeObject* PyMenuMgr::GetType ( void ) [inline, static]

Definition at line 77 of file PythonImpl.h.

Referenced by ParseUMENU().

00086 :
    PyMenuMgr(UMENU menu) : m_menu(menu)

void PyMenuMgr::InitValues ( PyObject * d ) [static]

Definition at line 234 of file PythonImpl.cpp.

00235 {
00236 }

PyAutoObject< PyMenuMgr::obj_t > PyMenuMgr::New ( void ) [static]

Definition at line 186 of file PythonImpl.cpp.

Referenced by AddPulldown(), Create(), cvsgui_GetTopMacroAdminMenu(), and cvsgui_GetTopMacroSelectionMenu().

00199 {

PyMenuMgr::operator UMENU ( ) const [inline]

UMENU operator.

Definition at line 96 of file PythonImpl.h.

References m_menu.

00096 { return m_menu; }

Member Data Documentation

const char * PyMenuMgr::m_doc = "Class to manipulate menus" [static]

Definition at line 186 of file PythonImpl.cpp.

UMENU PyMenuMgr::m_menu [protected]

Menu Definition at line 99 of file PythonImpl.h.

Referenced by AddButton(), AddPulldown(), AddSeparator(), AddToggle(), Count(), Delete(), DeleteByCmd(), and operator UMENU().

PyMethodDef PyMenuMgr::m_methods [static]

Initial value:

   {
    {"AddPulldown", (binaryfunc)PyMenuMgr ::_AddPulldown , METH_VARARGS, (char *) "Add a new menu" },
    {"AddToggle", (binaryfunc)PyMenuMgr ::_AddToggle , METH_VARARGS, (char *) "Add a toggle menu entry" },
    {"AddButton", (binaryfunc)PyMenuMgr ::_AddButton , METH_VARARGS, (char *) "Add a regular menu entry" },
    {"AddSeparator", (binaryfunc)PyMenuMgr ::_AddSeparator , METH_VARARGS, (char *) "Add a separator menu entry" },
    {"Delete", (binaryfunc)PyMenuMgr ::_Delete , METH_VARARGS, (char *) "Delete a menu entry by index" },
    {"DeleteByCmd", (binaryfunc)PyMenuMgr ::_DeleteByCmd , METH_VARARGS, (char *) "Delete a menu entry by command" },
    {"Count", (binaryfunc)PyMenuMgr ::_Count , METH_VARARGS, (char *) "Count the number of entries in the menu" },
 {NULL, NULL}   }
Definition at line 188 of file PythonImpl.cpp.

PyRegistry PyMenuMgr::m_registry [static]

The documentation for this class was generated from the following files:
  • common/PythonImpl.h
  • common/PythonImpl.cpp
Generated on Sat Aug 7 22:56:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyMenuMgr::obj_t Struct Reference

PyMenuMgr::obj_t Struct Reference

#include <PythonImpl.h>

Collaboration diagram for PyMenuMgr::obj_t:

[legend]
List of all members.

Public Attributes

PyObject_HEAD PyMenuMgr * m_object

Member Data Documentation

PyObject_HEAD PyMenuMgr* PyMenuMgr::obj_t::m_object

Definition at line 77 of file PythonImpl.h.

The documentation for this struct was generated from the following file:
  • common/PythonImpl.h
Generated on Sat Aug 7 22:56:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyPersistent Class Reference

PyPersistent Class Reference

#include <PythonImpl.h>

Inheritance diagram for PyPersistent:

[legend]
Collaboration diagram for PyPersistent:

[legend]
List of all members.

Public Member Functions

PyObject * | GetValue (PyObject *args)
PyObject * | SetValue (PyObject *args)
PyPersistent (const char *uniqueName, const char *defValue, kClassPersistent pclass)
virtual | ~PyPersistent ()

Static Public Member Functions

void | dealloc (obj_t *self)
PyObject * | getattr (obj_t *self, char *name)
PyAutoObject< obj_t > | New (void)
PyTypeObject * | GetType (void)
PyObject * | Create (PyObject *selfptr, PyObject *args)
void | InitValues (PyObject *d)
PyObject * | FindMethod (PyObject *self, char *name)

Static Public Attributes

const char * | m_doc = "Class to store persistent values on disk"
PyMethodDef | m_methods []
PyRegistry m_registry

Static Protected Member Functions

PyObject * | _GetValue (obj_t *self, PyObject *args)
PyObject * | _SetValue (obj_t *self, PyObject *args)

Protected Attributes

PCStr m_cstr

Constructor & Destructor Documentation

PyPersistent::PyPersistent | ( | const char * | uniqueName,
 |  | const char * | defValue,
 |  | kClassPersistent | pclass
 | ) | [inline]

Definition at line 130 of file PythonImpl.h.

00130                                                                                         :
00131         m_cstr(uniqueName, defValue, pclass)
00132     {
00133     }

virtual PyPersistent::~PyPersistent ( ) [inline, virtual]

Definition at line 135 of file PythonImpl.h.

00136     {
00137     }

Member Function Documentation

PyObject* PyPersistent::_GetValue | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 126 of file PythonImpl.h.

00129 :
    PyPersistent(const char* uniqueName, const char* defValue, kClassPersistent pclass) :

PyObject* PyPersistent::_SetValue | ( | obj_t * | self,
 |  | PyObject * | args
 | ) | [inline, static, protected]

Definition at line 127 of file PythonImpl.h.

00129 :
    PyPersistent(const char* uniqueName, const char* defValue, kClassPersistent pclass) :

PyObject * PyPersistent::Create | ( | PyObject * | selfptr,
 |  | PyObject * | args
 | ) | [static]

Definition at line 413 of file PythonImpl.cpp.

References kAddSettings, kNoClass, CPersistent::LoadAll(), New(), NULL, PyArg_ParseTuple, and PyHandleCvsguiError().

00414 {
00415     char *uniqueName, *defValue = 0L;
00416     int addToSettings = 0;
00417
00418     if( !PyArg_ParseTuple(args, "s|si:CPersistent", &uniqueName, &defValue, &addToSettings) )
00419         return NULL;
00420
00421     PyAutoObject<PyPersistent::obj_t> self = PyPersistent::New();
00422     if( !self.IsValid() )
00423         return NULL;
00424
00425     TRY
00426     {
00427         self->m_object = new PyPersistent(uniqueName, defValue, addToSettings ? kAddSettings : kNoClass);
00428
00429         CPersistent::LoadAll(uniqueName);
00430     }
00431     CATCH_ALL(e)
00432     {
00433         PyHandleCvsguiError(e);
00434         return NULL;
00435     }
00436     END_CATCH_ALL
00437
00438     return self.CopyReturn();
00439 }

Here is the call graph for this function:

void PyPersistent::dealloc ( obj_t * self ) [static]

Definition at line 406 of file PythonImpl.cpp.

PyObject* PyPersistent::FindMethod | ( | PyObject * | self,
 |  | char * | name
 | ) | [inline, static]

Definition at line 125 of file PythonImpl.h.

00129 :
    PyPersistent(const char* uniqueName, const char* defValue, kClassPersistent pclass) :

PyObject * PyPersistent::getattr | ( | obj_t * | self,
 |  | char * | name
 | ) | [static]

Definition at line 406 of file PythonImpl.cpp.

PyTypeObject* PyPersistent::GetType ( void ) [inline, static]

Definition at line 125 of file PythonImpl.h.

00129 :
    PyPersistent(const char* uniqueName, const char* defValue, kClassPersistent pclass) :

PyObject * PyPersistent::GetValue ( PyObject * args )

Definition at line 459 of file PythonImpl.cpp.

References m_cstr, NULL, PyArg_ParseTuple, and PyString_FromString.

00460 {
00461     if( !PyArg_ParseTuple(args, "") )
00462         return NULL;
00463
00464     return PyString_FromString(m_cstr);
00465 }

void PyPersistent::InitValues ( PyObject * d ) [static]

Definition at line 441 of file PythonImpl.cpp.

00442 {
00443 }

PyAutoObject< PyPersistent::obj_t > PyPersistent::New ( void ) [static]

Definition at line 406 of file PythonImpl.cpp.

Referenced by Create().

PyObject * PyPersistent::SetValue ( PyObject * args )

Definition at line 445 of file PythonImpl.cpp.

References gCvsPrefs, m_cstr, NULL, PyArg_ParseTuple, CvsPrefs::save(), and PyContainer::Void().

00446 {
00447     char* s;
00448
00449     if( !PyArg_ParseTuple(args, "s", &s) )
00450         return NULL;
00451
00452     m_cstr = s;
00453
00454     gCvsPrefs.save(true);
00455
00456     return Void();
00457 }

Here is the call graph for this function:

Member Data Documentation

PCStr PyPersistent::m_cstr [protected]

Command string Definition at line 140 of file PythonImpl.h.

Referenced by GetValue(), and SetValue().

const char * PyPersistent::m_doc = "Class to store persistent values on disk" [static]

Definition at line 406 of file PythonImpl.cpp.

PyMethodDef PyPersistent::m_methods [static]

Initial value:

   {
    {"GetValue", (binaryfunc)PyPersistent ::_GetValue , METH_VARARGS, (char *) "Get the persistent value" },
    {"SetValue", (binaryfunc)PyPersistent ::_SetValue , METH_VARARGS, (char *) "Set the persistent value" },
 {NULL, NULL}   }
Definition at line 408 of file PythonImpl.cpp.

PyRegistry PyPersistent::m_registry [static]

The documentation for this class was generated from the following files:
  • common/PythonImpl.h
  • common/PythonImpl.cpp
Generated on Sat Aug 7 22:56:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyPersistent::obj_t Struct Reference

PyPersistent::obj_t Struct Reference

#include <PythonImpl.h>

Collaboration diagram for PyPersistent::obj_t:

[legend]
List of all members.

Public Attributes

PyObject_HEAD PyPersistent * m_object

Member Data Documentation

PyObject_HEAD PyPersistent* PyPersistent::obj_t::m_object

Definition at line 125 of file PythonImpl.h.

The documentation for this struct was generated from the following file:
  • common/PythonImpl.h
Generated on Sat Aug 7 22:56:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: PyRegistry Class Reference

PyRegistry Class Reference

#include <PythonContainer.h>

Collaboration diagram for PyRegistry:

[legend]
List of all members.

Public Member Functions

PyRegistry (const char *name, size_t size, destructor d, getattrfunc g, PyRegistry_InitValues v, PyCFunction c, const char *doc)
~PyRegistry ()

Static Public Member Functions

void | RegisterAllObjects (std::vector< PyMethodDef > &methods)
void | CallInitValues (PyObject *dict)

Public Attributes

PyTypeObject | m_type

Protected Attributes

PyRegistry * m_next
PyRegistry_InitValues m_v
PyCFunction | m_c
const char * | m_doc

Static Protected Attributes

PyRegistry * | m_all = NULL

Constructor & Destructor Documentation

PyRegistry::PyRegistry | ( | const char * | name,
 |  | size_t | size,
 |  | destructor | d,
 |  | getattrfunc | g,
 |  | PyRegistry_InitValues | v,
 |  | PyCFunction | c,
 |  | const char * | doc
 | ) |

Definition at line 32 of file PythonContainer.cpp.

References GetPyType_Type(), m_all, m_next, m_type, and PyRegistry_InitValues.

00033                                                              : m_v(v), m_c(c), m_doc(doc)
00034 {
00035     m_next = m_all;
00036     m_all = this;
00037
00038     PyTypeObject deftype =
00039     {
00040         PyObject_HEAD_INIT(0)
00041         0,
00042         (char *)name,
00043         size,
00044         0, \
00045         d,                           /*tp_dealloc*/
00046         0,                              /*tp_print*/
00047         g,                            /*tp_getattr*/
00048         0,                              /*tp_setattr*/
00049         0,                              /*tp_compare*/
00050         0,                              /*tp_repr*/
00051         0,                              /*tp_as_number*/
00052         0,                              /*tp_as_sequence*/
00053         0,                              /*tp_as_mapping*/
00054     };
00055
00056     m_type = deftype;
00057     m_type.ob_type = GetPyType_Type();
00058 }

Here is the call graph for this function:

PyRegistry::~PyRegistry ( )

Definition at line 60 of file PythonContainer.cpp.

00061 {
00062 }

Member Function Documentation

void PyRegistry::CallInitValues ( PyObject * dict ) [static]

Definition at line 84 of file PythonContainer.cpp.

References m_all, m_next, and m_v.

Referenced by InitializeInterp().

00085 {
00086     PyRegistry *tmp = m_all;
00087     while(tmp != 0L)
00088     {
00089         tmp->m_v(d);
00090         tmp = tmp->m_next;
00091     }
00092 }

void PyRegistry::RegisterAllObjects ( std::vector< PyMethodDef > & methods ) [static]

Definition at line 64 of file PythonContainer.cpp.

References m_all, m_c, m_doc, m_next, and m_type.

Referenced by InitializeInterp().

00065 {
00066     PyRegistry *tmp = m_all;
00067     PyMethodDef def;
00068     while(tmp != 0L)
00069     {
00070         def.ml_name = tmp->m_type.tp_name;
00071         def.ml_meth = tmp->m_c;
00072         def.ml_flags = METH_VARARGS;
00073         def.ml_doc = (char *)tmp->m_doc;
00074
00075         methods.push_back(def);
00076
00077         tmp = tmp->m_next;
00078     }
00079
00080     memset(&def, 0, sizeof(def));
00081     methods.push_back(def);
00082 }

Member Data Documentation

PyRegistry * PyRegistry::m_all = NULL [static, protected]

Definition at line 30 of file PythonContainer.cpp.

Referenced by CallInitValues(), PyRegistry(), and RegisterAllObjects().

PyCFunction PyRegistry::m_c [protected]

Definition at line 66 of file PythonContainer.h.

Referenced by RegisterAllObjects().

const char* PyRegistry::m_doc [protected]

Definition at line 67 of file PythonContainer.h.

Referenced by RegisterAllObjects().

PyRegistry* PyRegistry::m_next [protected]

Definition at line 64 of file PythonContainer.h.

Referenced by CallInitValues(), PyRegistry(), and RegisterAllObjects().

PyTypeObject PyRegistry::m_type

Definition at line 54 of file PythonContainer.h.

Referenced by PyRegistry(), and RegisterAllObjects().

PyRegistry_InitValues PyRegistry::m_v [protected]

Definition at line 65 of file PythonContainer.h.

Referenced by CallInitValues().

The documentation for this class was generated from the following files:
  • common/PythonContainer.h
  • common/PythonContainer.cpp
Generated on Sat Aug 7 22:56:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPython_Interp Class Reference

CPython_Interp Class Reference

Python interpreter wrapper. More...

#include <PythonGlue.h>

Collaboration diagram for CPython_Interp:

[legend]
List of all members.

Public Member Functions

CPython_Interp (bool mainInterp=true)
~CPython_Interp ()
int | DoScriptVar (const char *format,...)
int | DoScript (const char *script)
int | DoFile (const char *file)
operator PyThreadState * (void)
Get the Python interpreter.

Static Public Member Functions

bool | IsAvail (const bool forceReload=false)
void | InitPythonSupport (const bool forceReload=false)
void | ClosePythonSupport (void)

Private Attributes

PyThreadState * fInterp

Static Private Attributes

PyThreadState * | m_mainInterpreter = 0L

Detailed Description

Python interpreter wrapper.

Definition at line 43 of file PythonGlue.h.

Constructor & Destructor Documentation

CPython_Interp::CPython_Interp ( bool mainInterp = true )

Definition at line 1012 of file PythonGlue.cpp.

References fInterp, gCvsPrefs, InitializeInterp(), IsAvail(), m_mainInterpreter, NULL, Py_NewInterpreter, and CvsPrefs::SetTclFileRunning().

01013 {
01014     fInterp = 0L;
01015
01016 #if USE_PYTHON
01017     if( !CPython_Interp::IsAvail() )
01018     {
01019         return;
01020     }
01021
01022     if( mainInterp )
01023     {
01024         fInterp = m_mainInterpreter;
01025         gCvsPrefs.SetTclFileRunning(true);
01026         return;
01027     }
01028
01029     {
01030         CPyThreadState lock(0L);
01031
01032         fInterp = Py_NewInterpreter();
01033         if( fInterp == NULL )
01034             return;
01035     }
01036
01037     InitializeInterp(fInterp);
01038     gCvsPrefs.SetTclFileRunning(true);
01039 #endif
01040 }

Here is the call graph for this function:

CPython_Interp::~CPython_Interp ( )

Definition at line 1042 of file PythonGlue.cpp.

References fInterp, gCvsPrefs, m_mainInterpreter, Py_EndInterpreter, and CvsPrefs::SetTclFileRunning().

01043 {
01044 #if USE_PYTHON
01045     if( fInterp != 0L )
01046     {
01047         gCvsPrefs.SetTclFileRunning(false);
01048
01049         if( fInterp != m_mainInterpreter )
01050         {
01051             CPyThreadState lock(fInterp);
01052
01053             Py_EndInterpreter(fInterp);
01054         }
01055     }
01056 #endif
01057 }

Here is the call graph for this function:

Member Function Documentation

void CPython_Interp::ClosePythonSupport ( void ) [static]

Definition at line 1266 of file PythonGlue.cpp.

References IsAvail(), m_mainInterpreter, Py_Finalize, PyInvalUICache(), and PyThreadState_Swap.

Referenced by CWincvsApp::StopScriptEngine(), and UCvsApp::StopScriptEngine().

01267 {
01268 #if USE_PYTHON
01269     if( !CPython_Interp::IsAvail() )
01270         return;
01271
01272     PyThreadState_Swap(m_mainInterpreter);
01273 //  PyEval_ReleaseLock();
01274
01275     PyInvalUICache();
01276
01277     Py_Finalize();
01278
01279     m_mainInterpreter = 0L;
01280 #endif
01281 }

Here is the call graph for this function:

int CPython_Interp::DoFile ( const char * file )

Execute a Python script

Returns:
true on success, false otherwise
Definition at line 1219 of file PythonGlue.cpp.

References fInterp, and PyRun_SimpleFile.

01220 {
01221 #if USE_PYTHON
01222     if( fInterp == 0L )
01223         return -1;
01224
01225     CPyThreadState lock(fInterp);
01226
01227     FILE* f = fopen(file, "r");
01228     if( f )
01229     {
01230         PyRun_SimpleFile(f, (char*)file);
01231         fclose(f);
01232     }
01233
01234     return 0;
01235 #else
01236     return -1;
01237 #endif
01238 }

int CPython_Interp::DoScript ( const char * script )

Execute a Python script

Returns:
true on success, false otherwise
Definition at line 1176 of file PythonGlue.cpp.

References fInterp, and PyRun_SimpleString.

Referenced by DoScriptVar(), and CWincvsView::OnKeyDown().

01177 {
01178 #if USE_PYTHON
01179     if( fInterp == 0L )
01180         return -1;
01181
01182     CPyThreadState lock(fInterp);
01183
01184     PyRun_SimpleString((char*)script);
01185
01186     return 0;
01187 #else
01188     return -1;
01189 #endif
01190 }

int CPython_Interp::DoScriptVar | ( | const char * | format,
 |  |  | ...
 | ) |

Execute a Python script

Returns:
true on success, false otherwise
Definition at line 1196 of file PythonGlue.cpp.

References DoScript(), and fInterp.

Referenced by PyDoCmdUI(), PyDoPython(), and PyMacrosReloadAll().

01197 {
01198 #if USE_PYTHON
01199     if(fInterp == 0L)
01200         return -1;
01201
01202     va_list args;
01203     char script[1024] = {'\0'};
01204
01205     va_start(args, format);
01206     vsprintf(script, format, args);
01207     va_end (args);
01208
01209     return DoScript(script);
01210 #else
01211     return -1;
01212 #endif
01213 }

Here is the call graph for this function:

void CPython_Interp::InitPythonSupport ( const bool forceReload = false ) [static]

Definition at line 1240 of file PythonGlue.cpp.

References InitializeInterp(), IsAvail(), m_mainInterpreter, NULL, Py_Initialize, Py_SetProgramName, PyEval_InitThreads, and PyThreadState_Swap.

Referenced by CWincvsApp::StartScriptEngine(), and UCvsApp::StartScriptEngine().

01241 {
01242 #if USE_PYTHON
01243     if( !CPython_Interp::IsAvail(forceReload) )
01244         return;
01245
01246     char* programName;
01247
01248 #ifdef WIN32
01249     programName = "wincvs";
01250 #elif TARGET_RT_MAC_MACHO
01251     programName = "maccvsX";
01252 #else
01253     programName = "gcvs";
01254 #endif
01255
01256     Py_SetProgramName(programName);
01257     Py_Initialize();
01258     PyEval_InitThreads();
01259
01260     m_mainInterpreter = PyThreadState_Swap(NULL);
01261
01262     InitializeInterp(m_mainInterpreter);
01263 #endif
01264 }

Here is the call graph for this function:

bool CPython_Interp::IsAvail ( const bool forceReload = false ) [static]

Check whether Python is available and load if not

Parameters:
forceReload Force reload of Python library
Returns:
true if Python is available, false otherwise
Definition at line 1064 of file PythonGlue.cpp.

References _PyObject_New, CompatCloseLibrary(), CompatConnectID, CompatLoadLibrary(), gCvsPrefs, LOAD_CODEFRAG, Py_BuildValue, Py_EndInterpreter, Py_Finalize, Py_FindMethod, Py_GetPath, Py_Initialize, Py_InitModule4, Py_IsInitialized, Py_NewInterpreter, Py_SetProgramName, PyArg_ParseTuple, PyDict_SetItemString, PyErr_Clear, PyErr_NewException, PyErr_SetString, PyEval_InitThreads, PyFile_AsFile, PyInt_FromLong, PyModule_GetDict, PyObject_Free, PyRun_SimpleFile, PyRun_SimpleString, PyString_AsString, PyString_FromString, PySys_SetPath, CvsPrefs::PythonLibrary(), PyThreadState_Swap, PyTuple_New, PyTuple_Size, and WarnNoPython().

Referenced by ClosePythonSupport(), CPython_Interp(), InitPythonSupport(), CWincvsApp::StartScriptEngine(), and UCvsApp::StartScriptEngine().

01065 {
01066 #if USE_PYTHON
01067 #   if (defined(WIN32) && !qCvsDebug) || TARGET_RT_MAC_MACHO
01068     static bool firstTime = true;
01069     static bool pyAvail = false;
01070
01071     if( firstTime || forceReload )
01072     {
01073 #   if defined(WIN32) || TARGET_RT_MAC_MACHO
01074         static CompatConnectID connID = 0L;
01075
01076         if( connID )
01077         {
01078             if( CompatCloseLibrary(&connID) )
01079             {
01080                 connID = 0L;
01081                 pyAvail = false;
01082             }
01083         }
01084 #   endif
01085
01086 #   ifdef WIN32
01087         if( !pyAvail )
01088         {
01089             pyAvail = (gCvsPrefs.PythonLibrary() && CompatLoadLibrary(&connID, gCvsPrefs.PythonLibrary())) ||
01090                 CompatLoadLibrary(&connID, "python23.dll") ||
01091                 CompatLoadLibrary(&connID, "python22.dll") ||
01092                 CompatLoadLibrary(&connID, "python21.dll");
01093         }
01094 #   endif
01095
01096 #   if TARGET_RT_MAC_MACHO
01097         pyAvail = CompatLoadLibrary(&connID, "/Library/Frameworks/Python.framework") ||
01098             CompatLoadLibrary(&connID, "/System/Library/Frameworks/Python.framework");
01099 #   endif
01100
01101 #   if defined(WIN32) || TARGET_RT_MAC_MACHO
01102 #   define LOAD_CODEFRAG(name) \
01103         if( pyAvail ) \
01104             pyAvail = (*(void **)&name##_glue = \
01105                 _CompatCallLibrary(connID, #name)) != 0L
01106 #   endif
01107
01108 #   if defined(WIN32) || TARGET_RT_MAC_MACHO
01109         LOAD_CODEFRAG(PyThreadState_Swap);
01110         LOAD_CODEFRAG(PyDict_SetItemString);
01111         LOAD_CODEFRAG(PyErr_Clear);
01112         LOAD_CODEFRAG(PyInt_FromLong);
01113         LOAD_CODEFRAG(PyErr_SetString);
01114         LOAD_CODEFRAG(PyArg_ParseTuple);
01115         LOAD_CODEFRAG(PyTuple_New);
01116         LOAD_CODEFRAG(Py_BuildValue);
01117         LOAD_CODEFRAG(PyFile_AsFile);
01118         LOAD_CODEFRAG(PyString_AsString);
01119         LOAD_CODEFRAG(PyTuple_Size);
01120         LOAD_CODEFRAG(PyRun_SimpleString);
01121         LOAD_CODEFRAG(PyRun_SimpleFile);
01122         LOAD_CODEFRAG(Py_SetProgramName);
01123         LOAD_CODEFRAG(Py_Initialize);
01124         LOAD_CODEFRAG(Py_Finalize);
01125         LOAD_CODEFRAG(Py_IsInitialized);
01126         LOAD_CODEFRAG(Py_NewInterpreter);
01127         LOAD_CODEFRAG(Py_EndInterpreter);
01128         LOAD_CODEFRAG(PyString_FromString);
01129         LOAD_CODEFRAG(PyErr_NewException);
01130         LOAD_CODEFRAG(PyModule_GetDict);
01131         LOAD_CODEFRAG(Py_InitModule4);
01132         LOAD_CODEFRAG(PyEval_InitThreads);
01133         LOAD_CODEFRAG(Py_FindMethod);
01134         LOAD_CODEFRAG(_PyObject_New);
01135 #   if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 3
01136         LOAD_CODEFRAG(_PyObject_Del);
01137 #   else
01138         LOAD_CODEFRAG(PyObject_Free);
01139 #   endif
01140         LOAD_CODEFRAG(PySys_SetPath);
01141         LOAD_CODEFRAG(Py_GetPath);
01142
01143         LOAD_CODEFRAG(PyType_Type);
01144         LOAD_CODEFRAG(PyFile_Type);
01145         LOAD_CODEFRAG(PyString_Type);
01146         LOAD_CODEFRAG(PyTuple_Type);
01147         LOAD_CODEFRAG(PyInt_Type);
01148         LOAD_CODEFRAG(_Py_NoneStruct);
01149         LOAD_CODEFRAG(_Py_ZeroStruct);
01150         LOAD_CODEFRAG(_Py_TrueStruct);
01151
01152 #       ifdef WIN32
01153         if( !pyAvail )
01154         {
01155             WarnNoPython();
01156         }
01157 #       endif
01158 #   endif /* WIN32 */
01159
01160         firstTime = false;
01161     }
01162
01163     return pyAvail;
01164 #   else
01165     return true;
01166 #   endif
01167 #else // !USE_PYTHON
01168     return false;
01169 #endif // !USE_PYTHON
01170 }

Here is the call graph for this function:

CPython_Interp::operator PyThreadState * ( void ) [inline]

Get the Python interpreter.

Definition at line 74 of file PythonGlue.h.

References fInterp.

00075 {
00076     return fInterp;
00077 }

Member Data Documentation

PyThreadState* CPython_Interp::fInterp [private]

Python interpreter Definition at line 52 of file PythonGlue.h.

Referenced by CPython_Interp(), DoFile(), DoScript(), DoScriptVar(), operator PyThreadState *(), and ~CPython_Interp().

PyThreadState * CPython_Interp::m_mainInterpreter = 0L [static, private]

Main interpreter Definition at line 100 of file PythonGlue.cpp.

Referenced by ClosePythonSupport(), CPython_Interp(), InitPythonSupport(), and ~CPython_Interp().

The documentation for this class was generated from the following files:
  • common/PythonGlue.h
  • common/PythonGlue.cpp
Generated on Sat Aug 7 22:56:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CPyThreadState Class Reference

CPyThreadState Class Reference

Collaboration diagram for CPyThreadState:

[legend]
List of all members.

Public Member Functions

CPyThreadState (PyThreadState *p)
~CPyThreadState ()

Protected Attributes

PyThreadState * m_p

Constructor & Destructor Documentation

CPyThreadState::CPyThreadState ( PyThreadState * p ) [inline]

Definition at line 108 of file PythonGlue.cpp.

References m_p, PyThreadState, and PyThreadState_Swap.

00108                                      : m_p(p)
00109     {
00110         m_p = PyThreadState_Swap(p);
00111     }

CPyThreadState::~CPyThreadState ( ) [inline]

Definition at line 112 of file PythonGlue.cpp.

References m_p, and PyThreadState_Swap.

00113     {
00114         PyThreadState_Swap(m_p);
00115     }

Member Data Documentation

PyThreadState* CPyThreadState::m_p [protected]

Definition at line 117 of file PythonGlue.cpp.

Referenced by CPyThreadState(), and ~CPyThreadState().

The documentation for this class was generated from the following file:
  • common/PythonGlue.cpp
Generated on Sat Aug 7 22:56:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: URect Class Reference

URect Class Reference

#include <udraw.h>

Inheritance diagram for URect:

[legend]
Collaboration diagram for URect:

[legend]
List of all members.

Public Member Functions

URect ()
URect (int l, int t, int r, int b)
URect (const URECT &srURect)
URect (const URECT *lpSrURect)
URect (UPOINT point, USIZE size)
URect (UPOINT topLeft, UPOINT bottomRight)
URect (const CRect &winRect)
int | Width () const
int | Height () const
USize | Size () const
UPoint & TopLeft ()
UPoint & BottomRight ()
const UPoint & | TopLeft () const
const UPoint & | BottomRight () const
UPoint | CenterPoint () const
operator URECT * ()
operator const URECT * () const
operator CRect () const
bool | IsRectEmpty () const
bool | IsRectNull () const
bool | PtInRect (UPOINT point) const
void | SetRect (int x1, int y1, int x2, int y2)
void | SetRect (UPOINT topLeft, UPOINT bottomRight)
void | SetRectEmpty ()
void | CopyRect (const URECT *lpSrURect)
bool | EqualRect (const URECT *lpRect) const
void | InflateRect (int x, int y)
void | InflateRect (USIZE size)
void | InflateRect (const URECT *lpRect)
void | InflateRect (int l, int t, int r, int b)
void | DeflateRect (int x, int y)
void | DeflateRect (USIZE size)
void | DeflateRect (const URECT *lpRect)
void | DeflateRect (int l, int t, int r, int b)
void | OffsetRect (int x, int y)
void | OffsetRect (USIZE size)
void | OffsetRect (UPOINT point)
void | NormalizeRect ()
bool | IntersectRect (const URECT *lpRect1, const URECT *lpRect2)
bool | UnionRect (const URECT *lpRect1, const URECT *lpRect2)
void | operator= (const URECT &srURect)
bool | operator== (const URECT &rect) const
bool | operator!= (const URECT &rect) const
void | operator+= (UPOINT point)
void | operator+= (USIZE size)
void | operator+= (const URECT *lpRect)
void | operator-= (UPOINT point)
void | operator-= (USIZE size)
void | operator-= (const URECT *lpRect)
void | operator &= (const URECT &rect)
void | operator|= (const URECT &rect)
URect | operator+ (UPOINT point) const
URect | operator- (UPOINT point) const
URect | operator+ (const URECT *lpRect) const
URect | operator+ (USIZE size) const
URect | operator- (USIZE size) const
URect | operator- (const URECT *lpRect) const
URect | operator & (const URECT &rect2) const
URect | operator| (const URECT &rect2) const
URect | MulDiv (int nMultiplier, int nDivisor) const

Constructor & Destructor Documentation

URect::URect ( ) [inline]

Definition at line 324 of file udraw.h.

00325     { /* random filled */ }

URect::URect | ( | int | l,
 |  | int | t,
 |  | int | r,
 |  | int | b
 | ) | [inline]

Definition at line 326 of file udraw.h.

00327     { left = l; top = t; right = r; bottom = b; }

URect::URect ( const URECT & srURect ) [inline]

Definition at line 328 of file udraw.h.

00329     { ::CopyRect(this, &srURect); }

URect::URect ( const URECT * lpSrURect ) [inline]

Definition at line 330 of file udraw.h.

00331     { ::CopyRect(this, lpSrURect); }

URect::URect | ( | UPOINT | point,
 |  | USIZE | size
 | ) | [inline]

Definition at line 332 of file udraw.h.

References USIZE::cx, USIZE::cy, UPOINT::x, and UPOINT::y.

00333     { right = (left = point.x) + size.cx; bottom = (top = point.y) + size.cy; }

URect::URect | ( | UPOINT | topLeft,
 |  | UPOINT | bottomRight
 | ) | [inline]

Definition at line 334 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00335     { left = topLeft.x; top = topLeft.y;
00336         right = bottomRight.x; bottom = bottomRight.y; }

URect::URect ( const CRect & winRect ) [inline]

Definition at line 342 of file udraw.h.

00343     { left = winRect.left; right = winRect.right; top = winRect.top; bottom = winRect.bottom; }

Member Function Documentation

const UPoint & URect::BottomRight ( ) const [inline]

Definition at line 357 of file udraw.h.

00358     { return *((UPoint*)this+1); }

UPoint & URect::BottomRight ( ) [inline]

Definition at line 353 of file udraw.h.

Referenced by CWinLogData::ComputeBounds(), and CWinLogData::Update().

00354     { return *((UPoint*)this+1); }

UPoint URect::CenterPoint ( ) const [inline]

Definition at line 359 of file udraw.h.

Referenced by CWinLogData::Update(), CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogHeaderData::UpdateSelf(), and CWinLogRevData::UpdateSelf().

00360     { return UPoint((left+right)/2, (top+bottom)/2); }

void URect::CopyRect ( const URECT * lpSrURect ) [inline]

Definition at line 389 of file udraw.h.

00390     { ::CopyRect(this, lpSrURect); }

void URect::DeflateRect | ( | int | l,
 |  | int | t,
 |  | int | r,
 |  | int | b
 | ) |

void URect::DeflateRect ( const URECT * lpRect )

void URect::DeflateRect ( USIZE size ) [inline]

Definition at line 399 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00400     { ::InflateRect(this, -size.cx, -size.cy); }

void URect::DeflateRect | ( | int | x,
 |  | int | y
 | ) | [inline]

Definition at line 397 of file udraw.h.

Referenced by operator-(), and operator-=().

00398     { ::InflateRect(this, -x, -y); }

bool URect::EqualRect ( const URECT * lpRect ) const [inline]

Definition at line 391 of file udraw.h.

References EqualRect().

00392     { return ::EqualRect(this, lpRect); }

Here is the call graph for this function:

int URect::Height ( ) const [inline]

Definition at line 347 of file udraw.h.

Referenced by UCvsGraph::CalcImageSize(), CWinLogData::ComputeBounds(), CGraphView::OnKeyDown(), UWidget::OnSetLoc(), UDC::Rectangle(), UDC::RoundRect(), UDC::TextOutClipped(), and CWinLogRevData::UpdateSelf().

00348     { return bottom - top; }

void URect::InflateRect | ( | int | l,
 |  | int | t,
 |  | int | r,
 |  | int | b
 | ) |

void URect::InflateRect ( const URECT * lpRect )

void URect::InflateRect ( USIZE size ) [inline]

Definition at line 395 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00396     { ::InflateRect(this, size.cx, size.cy); }

void URect::InflateRect | ( | int | x,
 |  | int | y
 | ) | [inline]

Definition at line 393 of file udraw.h.

Referenced by operator+(), and operator+=().

00394     { ::InflateRect(this, x, y); }

bool URect::IntersectRect | ( | const URECT * | lpRect1,
 |  | const URECT * | lpRect2
 | ) | [inline]

Definition at line 407 of file udraw.h.

References IntersectRect().

00408     { return ::IntersectRect(this, lpRect1, lpRect2);}

Here is the call graph for this function:

bool URect::IsRectEmpty ( ) const [inline]

Definition at line 377 of file udraw.h.

00378     { return left == right || top == bottom; }

bool URect::IsRectNull ( ) const [inline]

Definition at line 379 of file udraw.h.

00380     { return (left == 0 && right == 0 && top == 0 && bottom == 0); }

URect URect::MulDiv | ( | int | nMultiplier,
 |  | int | nDivisor
 | ) | const

void URect::NormalizeRect ( )

void URect::OffsetRect ( UPOINT point ) [inline]

Definition at line 403 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00404     { ::OffsetRect(this, point.x, point.y); }

void URect::OffsetRect ( USIZE size ) [inline]

Definition at line 405 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00406     { ::OffsetRect(this, size.cx, size.cy); }

void URect::OffsetRect | ( | int | x,
 |  | int | y
 | ) | [inline]

Definition at line 401 of file udraw.h.

Referenced by CWinLogData::ComputeBounds(), DrawNode(), CWinLogData::Offset(), and CWinLogData::SetSelected().

00402     { ::OffsetRect(this, x, y); }

URect URect::operator & ( const URECT & rect2 ) const [inline]

Definition at line 445 of file udraw.h.

00446     { URect rect; ::IntersectRect(&rect, this, &rect2);
00447         return rect; }

void URect::operator &= ( const URECT & rect ) [inline]

Definition at line 429 of file udraw.h.

00430     { ::IntersectRect(this, this, &rect); }

URect::operator const URECT * ( ) const [inline]

Definition at line 363 of file udraw.h.

00364     { return this; }

URect::operator CRect ( ) const [inline]

Definition at line 372 of file udraw.h.

00373 {
00374     return CRect(left, top, right, bottom);
00375 }

URect::operator URECT * ( ) [inline]

Definition at line 361 of file udraw.h.

00362     { return this; }

bool URect::operator!= ( const URECT & rect ) const [inline]

Definition at line 415 of file udraw.h.

00416     { return !::EqualRect(this, &rect); }

URect URect::operator+ ( USIZE size ) const [inline]

Definition at line 437 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00438     { URect rect(*this); ::OffsetRect(&rect, size.cx, size.cy); return rect; }

URect URect::operator+ ( const URECT * lpRect ) const [inline]

Definition at line 441 of file udraw.h.

References InflateRect().

00442     { URect rect(this); rect.InflateRect(lpRect); return rect; }

Here is the call graph for this function:

URect URect::operator+ ( UPOINT point ) const [inline]

Definition at line 433 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00434     { URect rect(*this); ::OffsetRect(&rect, pt.x, pt.y); return rect; }

void URect::operator+= ( const URECT * lpRect ) [inline]

Definition at line 421 of file udraw.h.

References InflateRect().

00422     { InflateRect(lpRect); }

Here is the call graph for this function:

void URect::operator+= ( USIZE size ) [inline]

Definition at line 419 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00420     { ::OffsetRect(this, size.cx, size.cy); }

void URect::operator+= ( UPOINT point ) [inline]

Definition at line 417 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00418     { ::OffsetRect(this, point.x, point.y); }

URect URect::operator- ( const URECT * lpRect ) const [inline]

Definition at line 443 of file udraw.h.

References DeflateRect().

00444     { URect rect(this); rect.DeflateRect(lpRect); return rect; }

Here is the call graph for this function:

URect URect::operator- ( USIZE size ) const [inline]

Definition at line 439 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00440     { URect rect(*this); ::OffsetRect(&rect, -size.cx, -size.cy); return rect; }

URect URect::operator- ( UPOINT point ) const [inline]

Definition at line 435 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00436     { URect rect(*this); ::OffsetRect(&rect, -pt.x, -pt.y); return rect; }

void URect::operator-= ( const URECT * lpRect ) [inline]

Definition at line 427 of file udraw.h.

References DeflateRect().

00428     { DeflateRect(lpRect); }

Here is the call graph for this function:

void URect::operator-= ( USIZE size ) [inline]

Definition at line 425 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00426     { ::OffsetRect(this, -size.cx, -size.cy); }

void URect::operator-= ( UPOINT point ) [inline]

Definition at line 423 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00424     { ::OffsetRect(this, -point.x, -point.y); }

void URect::operator= ( const URECT & srURect ) [inline]

Definition at line 411 of file udraw.h.

00412     { ::CopyRect(this, &srURect); }

bool URect::operator== ( const URECT & rect ) const [inline]

Definition at line 413 of file udraw.h.

References EqualRect().

00414     { return ::EqualRect(this, &rect); }

Here is the call graph for this function:

URect URect::operator| ( const URECT & rect2 ) const [inline]

Definition at line 448 of file udraw.h.

00449     { URect rect; ::UnionRect(&rect, this, &rect2);
00450         return rect; }

void URect::operator|= ( const URECT & rect ) [inline]

Definition at line 431 of file udraw.h.

00432     { ::UnionRect(this, this, &rect); }

bool URect::PtInRect ( UPOINT point ) const [inline]

Definition at line 381 of file udraw.h.

References PtInRect().

Referenced by CWinLogData::HitTest().

00382     { return ::PtInRect(this, point); }

Here is the call graph for this function:

void URect::SetRect | ( | UPOINT | topLeft,
 |  | UPOINT | bottomRight
 | ) | [inline]

Definition at line 385 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00386     { ::SetRect(this, topLeft.x, topLeft.y, bottomRight.x, bottomRight.y); }

void URect::SetRect | ( | int | x1,
 |  | int | y1,
 |  | int | x2,
 |  | int | y2
 | ) | [inline]

Definition at line 383 of file udraw.h.

Referenced by CWinLogData::ComputeBounds().

00384     { ::SetRect(this, x1, y1, x2, y2); }

void URect::SetRectEmpty ( ) [inline]

Definition at line 387 of file udraw.h.

Referenced by CWinLogData::ComputeBounds(), and CWinLogData::CWinLogData().

00388     { ::SetRectEmpty(this); }

USize URect::Size ( ) const [inline]

Definition at line 349 of file udraw.h.

Referenced by UCvsGraph::CalcImageSize().

00350     { return USize(right - left, bottom - top); }

const UPoint & URect::TopLeft ( ) const [inline]

Definition at line 355 of file udraw.h.

00356     { return *((UPoint*)this); }

UPoint & URect::TopLeft ( ) [inline]

Definition at line 351 of file udraw.h.

Referenced by UCvsGraph::CalcImageSize(), CWinLogData::ComputeBounds(), UWidget::OnSetLoc(), and CWinLogData::Update().

00352     { return *((UPoint*)this); }

bool URect::UnionRect | ( | const URECT * | lpRect1,
 |  | const URECT * | lpRect2
 | ) | [inline]

Definition at line 409 of file udraw.h.

References UnionRect().

Referenced by CWinLogData::ComputeBounds().

00410     { return ::UnionRect(this, lpRect1, lpRect2); }

Here is the call graph for this function:

int URect::Width ( ) const [inline]

Definition at line 345 of file udraw.h.

Referenced by UCvsGraph::CalcImageSize(), CWinLogData::ComputeBounds(), UWidget::OnSetLoc(), UDC::Rectangle(), UDC::RoundRect(), UDC::TextOutClipped(), and CWinLogData::Update().

00346     { return right - left; }

The documentation for this class was generated from the following file:
  • rf/udraw.h
Generated on Sat Aug 7 22:56:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: URECT Struct Reference

URECT Struct Reference

#include <umain.h>

Inheritance diagram for URECT:

[legend]
Collaboration diagram for URECT:

[legend]
List of all members.

Public Attributes

int left
int top
int right
int bottom

Member Data Documentation

int URECT::bottom

Definition at line 984 of file umain.h.

Referenced by EqualRect(), InflateRect(), IntersectRect(), IsRectEmpty(), OffsetRect(), UWidget::OnGetLoc(), UWidget::OnSetLoc(), PtInRect(), SetRect(), SetRectEmpty(), UDC::TextOutClipped(), UnionRect(), and TPseudoWinAdorner::ViewChangedFrame().

int URECT::left

Definition at line 984 of file umain.h.

Referenced by EqualRect(), InflateRect(), IntersectRect(), IsRectEmpty(), OffsetRect(), UWidget::OnGetLoc(), UWidget::OnSetLoc(), PtInRect(), UDC::Rectangle(), UDC::RoundRect(), SetRect(), SetRectEmpty(), UDC::TextOutClipped(), UnionRect(), CWinLogRevData::UpdateSelf(), and TPseudoWinAdorner::ViewChangedFrame().

int URECT::right

Definition at line 984 of file umain.h.

Referenced by EqualRect(), InflateRect(), IntersectRect(), IsRectEmpty(), OffsetRect(), UWidget::OnGetLoc(), UWidget::OnSetLoc(), PtInRect(), SetRect(), SetRectEmpty(), UnionRect(), and TPseudoWinAdorner::ViewChangedFrame().

int URECT::top

Definition at line 984 of file umain.h.

Referenced by EqualRect(), InflateRect(), IntersectRect(), IsRectEmpty(), OffsetRect(), UWidget::OnGetLoc(), CGraphView::OnKeyDown(), UWidget::OnSetLoc(), PtInRect(), UDC::Rectangle(), UDC::RoundRect(), SetRect(), SetRectEmpty(), UnionRect(), and TPseudoWinAdorner::ViewChangedFrame().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:56:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CRectTracker Class Reference

CRectTracker Class Reference

Inheritance diagram for CRectTracker:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/GraphView.h
Generated on Sat Aug 7 22:56:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CRecursionLock Class Reference

CRecursionLock Class Reference

Class to prevent the recursive calls. More...

#include <BrowseFileView.h>

Collaboration diagram for CRecursionLock:

[legend]
List of all members.

Public Member Functions

CRecursionLock (bool &semaphore)
virtual ~CRecursionLock ()

Private Attributes

bool & m_semaphore

Detailed Description

Class to prevent the recursive calls.

Definition at line 80 of file BrowseFileView.h.

Constructor & Destructor Documentation

CRecursionLock::CRecursionLock ( bool & semaphore )

Definition at line 99 of file BrowseFileView.cpp.

References m_semaphore.

00100     : m_semaphore(semaphore)
00101 {
00102     m_semaphore = true;
00103 }

CRecursionLock::~CRecursionLock ( ) [virtual]

Definition at line 105 of file BrowseFileView.cpp.

References m_semaphore.

00106 {
00107     m_semaphore = false;
00108 }

Member Data Documentation

bool& CRecursionLock::m_semaphore [private]

Definition at line 89 of file BrowseFileView.h.

Referenced by CRecursionLock(), and ~CRecursionLock().

The documentation for this class was generated from the following files:
  • WinCvs/BrowseFileView.h
  • WinCvs/BrowseFileView.cpp
Generated on Sat Aug 7 22:56:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CRelease_MAIN Class Reference

CRelease_MAIN Class Reference

#include <ReleaseDlg.h>

Inheritance diagram for CRelease_MAIN:

[legend]
Collaboration diagram for CRelease_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_RELEASE_MAIN }

Public Member Functions

CRelease_MAIN (const char *dir)
~CRelease_MAIN ()
kReleaseDelType | GetRemoveDirectoryOption () const

Public Attributes

CButton | m_delDirCheck
CButton | m_delCvsInfoCheck
CButton | m_delAllCheck
CString | m_dir

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDelcvsinfo ()
BN_CLICKED message handler, uncheck other remove directory options if this one is selected.
afx_msg void | OnDeldir ()
BN_CLICKED message handler, uncheck other remove directory options if this one is selected and enable or disable deleting non-cvs files checkbox.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

kReleaseDelType m_removeDirectoryOption

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 65 of file ReleaseDlg.h.
00065 { IDD = IDD_RELEASE_MAIN };

Constructor & Destructor Documentation

CRelease_MAIN::CRelease_MAIN ( const char * dir )

Definition at line 49 of file ReleaseDlg.cpp.

References kReleaseNoDel.

00050     : CHHelpPropertyPage(CRelease_MAIN::IDD)
00051 {
00052     //{{AFX_DATA_INIT(CRelease_MAIN)
00053     m_dir = dir;
00054     //}}AFX_DATA_INIT
00055
00056     m_removeDirectoryOption = kReleaseNoDel;
00057 }

CRelease_MAIN::~CRelease_MAIN ( )

Definition at line 59 of file ReleaseDlg.cpp.

00060 {
00061 }

Member Function Documentation

void CRelease_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 63 of file ReleaseDlg.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_DELETE_ALL_FILES, IDC_DELETE_CVS_INFO, IDC_DELETE_DIRECTORY, IDC_PATH, kReleaseDelAll, kReleaseDelCvsInfo, kReleaseDelDir, m_delAllCheck, m_delCvsInfoCheck, m_delDirCheck, m_dir, and m_removeDirectoryOption.

00064 {
00065     CHHelpPropertyPage::DoDataExchange(pDX);
00066     //{{AFX_DATA_MAP(CRelease_MAIN)
00067     DDX_Control(pDX, IDC_DELETE_DIRECTORY, m_delDirCheck);
00068     DDX_Control(pDX, IDC_DELETE_CVS_INFO, m_delCvsInfoCheck);
00069     DDX_Control(pDX, IDC_DELETE_ALL_FILES, m_delAllCheck);
00070     DDX_Text(pDX, IDC_PATH, m_dir);
00071     //}}AFX_DATA_MAP
00072
00073     if( pDX->m_bSaveAndValidate )
00074     {
00075         if( m_delCvsInfoCheck.GetCheck() )
00076         {
00077             m_removeDirectoryOption = kReleaseDelCvsInfo;
00078         }
00079         else if( m_delDirCheck.GetCheck() )
00080         {
00081             m_removeDirectoryOption = m_delAllCheck.GetCheck() ? kReleaseDelAll : kReleaseDelDir;
00082         }
00083     }
00084 }

Here is the call graph for this function:

kReleaseDelType CRelease_MAIN::GetRemoveDirectoryOption ( ) const

Get the remove directory option

Returns:
The remove directory option
Definition at line 109 of file ReleaseDlg.cpp.

References kReleaseDelType, and m_removeDirectoryOption.

Referenced by CompatGetRelease().

00110 {
00111     return m_removeDirectoryOption;
00112 }

void CRelease_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 97 of file ReleaseDlg.cpp.

References IDC_DELETE_ALL_FILES, IDC_DELETE_CVS_INFO, IDC_DELETE_DIRECTORY, IDC_PATH, IDH_IDC_DELETE_ALL_FILES, IDH_IDC_DELETE_CVS_INFO, IDH_IDC_DELETE_DIRECTORY, and IDH_IDC_PATH.

00098 {
00099     SetCtrlHelpID(IDC_PATH,             IDH_IDC_PATH);
00100     SetCtrlHelpID(IDC_DELETE_CVS_INFO,  IDH_IDC_DELETE_CVS_INFO);
00101     SetCtrlHelpID(IDC_DELETE_DIRECTORY, IDH_IDC_DELETE_DIRECTORY);
00102     SetCtrlHelpID(IDC_DELETE_ALL_FILES, IDH_IDC_DELETE_ALL_FILES);
00103 }

void CRelease_MAIN::OnDelcvsinfo ( ) [protected]

BN_CLICKED message handler, uncheck other remove directory options if this one is selected.

Definition at line 115 of file ReleaseDlg.cpp.

References m_delAllCheck, m_delCvsInfoCheck, and m_delDirCheck.

00116 {
00117     if( m_delCvsInfoCheck.GetCheck() )
00118     {
00119         m_delAllCheck.EnableWindow(FALSE);
00120
00121         m_delAllCheck.SetCheck(0);
00122         m_delDirCheck.SetCheck(0);
00123     }
00124 }

void CRelease_MAIN::OnDeldir ( ) [protected]

BN_CLICKED message handler, uncheck other remove directory options if this one is selected and enable or disable deleting non-cvs files checkbox.

Definition at line 127 of file ReleaseDlg.cpp.

References m_delAllCheck, m_delCvsInfoCheck, and m_delDirCheck.

00128 {
00129     m_delAllCheck.EnableWindow(m_delDirCheck.GetCheck());
00130     m_delCvsInfoCheck.SetCheck(0);
00131     m_delAllCheck.SetCheck(0);
00132 }

Member Data Documentation

CButton CRelease_MAIN::m_delAllCheck

Definition at line 68 of file ReleaseDlg.h.

Referenced by DoDataExchange(), OnDelcvsinfo(), and OnDeldir().

CButton CRelease_MAIN::m_delCvsInfoCheck

Definition at line 67 of file ReleaseDlg.h.

Referenced by DoDataExchange(), OnDelcvsinfo(), and OnDeldir().

CButton CRelease_MAIN::m_delDirCheck

Definition at line 66 of file ReleaseDlg.h.

Referenced by DoDataExchange(), OnDelcvsinfo(), and OnDeldir().

CString CRelease_MAIN::m_dir

Definition at line 69 of file ReleaseDlg.h.

Referenced by DoDataExchange().

kReleaseDelType CRelease_MAIN::m_removeDirectoryOption [private]

Remove directory option Definition at line 90 of file ReleaseDlg.h.

Referenced by DoDataExchange(), and GetRemoveDirectoryOption().

The documentation for this class was generated from the following files:
  • common/ReleaseDlg.h
  • common/ReleaseDlg.cpp
Generated on Sat Aug 7 22:56:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: RemoveCvsArgs Class Reference

RemoveCvsArgs Class Reference

Class to remove files. More...

#include <CvsArgs.h>

Inheritance diagram for RemoveCvsArgs:

[legend]
Collaboration diagram for RemoveCvsArgs:

[legend]
List of all members.

Public Member Functions

virtual void addfile (const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L)

Detailed Description

Class to remove files.

Definition at line 148 of file CvsArgs.h.

Member Function Documentation

void RemoveCvsArgs::addfile | ( | const char * | arg,
 |  | const char * | dir = 0L,
 |  | const FSSpec * | spec = 0L,
 |  | const char * | currRevision = 0L
 | ) | [virtual]

Add file

Parameters:
arg | File to be added
dir | Directory of the file
spec | UFS Spec
currRevision | Current revision
Returns:
true on success, false otherwise

Reimplemented from CvsArgs.

Definition at line 460 of file CvsArgs.cpp.

References CvsArgs::addfile(), CompatMoveToTrash(), CStr, cvs_err(), cvs_out(), stat::st_mode, and stat.

00462 {
00463     CvsArgs::addfile(arg, dir, spec);
00464
00465     CStr fullpath(dir);
00466     if( !fullpath.endsWith(kPathDelimiter) )
00467         fullpath << kPathDelimiter;
00468
00469     fullpath << arg;
00470
00471     // check the file is not already deleted
00472     struct stat sb;
00473     if( stat(dir, &sb) != -1 && S_ISDIR(sb.st_mode) &&
00474         stat(fullpath, &sb) == -1 && errno == ENOENT )
00475     {
00476         return;
00477     }
00478
00479     if( !CompatMoveToTrash(arg, dir, spec) )
00480 #ifdef WIN32
00481         cvs_err("Unable to send '%s' to the recycle bin\n", arg);
00482     else
00483         cvs_out("'%s' has been moved successfully to the recycle bin...\n", arg);
00484 #else
00485         cvs_err("Unable to send '%s' to the trash\n", arg);
00486     else
00487         cvs_out("'%s' has been moved successfully to the trash...\n", arg);
00488 #endif
00489 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/CvsArgs.h
  • common/CvsArgs.cpp
Generated on Sat Aug 7 22:56:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ReportConflict Class Reference

ReportConflict Class Reference

Class to represent file type and help handle possible import conflicts. More...

#include <ImportFilter.h>

Collaboration diagram for ReportConflict:

[legend]
List of all members.

Public Types

enum {
noConflict = 0x0000,
hasConflict = 0x0001,
hasExtension = 0x0002,
isBinary = 0x0004,
forceBinary = 0x0008,
forceText = 0x0010,
hasIgnore = 0x0020,
hasTypeCreatorConflict = 0x0040,
forceNoKeywords = 0x0080,
isUnicode = 0x0100,
forceUnicode = 0x0200,
userFlags = forceText | forceBinary | forceUnicode | hasIgnore | forceNoKeywords
}
Status enum. More...

Public Member Functions

ReportConflict (int mac_type, int mac_creator)
virtual | ~ReportConflict ()
void | AddPattern (const char *newpat, kFileType fileType, bool isExtension, const char *sample)
void | SetConflict (const char *sample)
void | SetTypeCreatorConflict (const char *sample)
bool | Match (const char *pat)
bool | HasConflict (void) const
bool | HasTypeCreatorConflict (void) const
bool | IsBinary (void) const
bool | IsUnicode (void) const
bool | IsExtension (void) const
const char * | GetPattern (void) const
int | GetMacType (void) const
int | GetMacCreator (void) const
void | ForceBinary (void)
void | ForceText (void)
void | ForceUnicode (void)
void | Ignore (void)
void | ForceNoKeywords (void)
bool | HasForceBinary (void) const
bool | HasForceText (void) const
bool | HasForceUnicode (void) const
bool | HasIgnore (void) const
bool | HasForceNoKeywords (void) const
void | DisableUserSettings (void)
UPStr | GetStateDesc () const
UPStr | GetDesc () const
UPStr | GetKindDesc () const
void | PrintOut (UStr &out) const

Public Attributes

ReportConflict * next

Protected Attributes

int status
UStr pattern
UStr sample1
UStr sample2
int ftype
int fcreator

Detailed Description

Class to represent file type and help handle possible import conflicts.

Definition at line 54 of file ImportFilter.h.

Member Enumeration Documentation

anonymous enum

Status enum.

Enumeration values:
noConflict | No conflict
hasConflict | There is a conflict
hasExtension | Has an extension
isBinary | Binary
forceBinary | Force binary
forceText | Force text
hasIgnore | Ignore
hasTypeCreatorConflict | Type creator conflict, mac only
forceNoKeywords | For no keyword expansion
isUnicode | Unicode
forceUnicode | Force unicode
userFlags | Mask of all user flags
Definition at line 63 of file ImportFilter.h.
00064     {
00065         noConflict =                0x0000,
00066         hasConflict =               0x0001,
00067         hasExtension =              0x0002,
00068         isBinary =                  0x0004,
00069         forceBinary =               0x0008,
00070         forceText =                 0x0010,
00071         hasIgnore =                 0x0020,
00072         hasTypeCreatorConflict =    0x0040,
00073         forceNoKeywords =           0x0080,
00074         isUnicode =                 0x0100,
00075         forceUnicode =              0x0200,
00076         userFlags = forceText | forceBinary | forceUnicode | hasIgnore | forceNoKeywords
00077     };

Constructor & Destructor Documentation

ReportConflict::ReportConflict | ( | int | mac_type,
 |  | int | mac_creator
 | ) |

Definition at line 338 of file ImportFilter.cpp.

References fcreator, ftype, next, noConflict, and status.

00339 {
00340     next = 0L;
00341     status = noConflict;
00342     ftype = mac_type;
00343     fcreator = mac_creator;
00344 }

ReportConflict::~ReportConflict ( ) [virtual]

Definition at line 403 of file ImportFilter.cpp.

00404 {
00405 }

Member Function Documentation

void ReportConflict::AddPattern | ( | const char * | newpat,
 |  | kFileType | fileType,
 |  | bool | isExt,
 |  | const char * | sample
 | ) |

Add new pattern

Parameters:
newpat | Pattern to add
fileType | File type
isExt | Flag indicating whether the file has an extension
sample | Sample
Definition at line 414 of file ImportFilter.cpp.

References isBinary, isUnicode, kFileTypeBin, kFileTypeUnicode, and status.

Referenced by list_add_type().

00415 {
00416     pattern = newpat;
00417     sample1 = sample;
00418
00419     switch( fileType )
00420     {
00421     case kFileTypeBin:
00422         status |= isBinary;
00423         break;
00424     case kFileTypeUnicode:
00425         status |= isUnicode;
00426         break;
00427     default:
00428         // nothing to do
00429         break;
00430     }
00431
00432     if( isExt )
00433         status |= hasExtension;
00434 }

void ReportConflict::DisableUserSettings ( void )

Erase any user settings (force binary, force text etc.) Definition at line 657 of file ImportFilter.cpp.

References status, and userFlags.

Referenced by CImportFilterDlg::OnEditentry().

00658 {
00659     status &= ~(int)userFlags;
00660 }

void ReportConflict::ForceBinary ( void )

Force binary status Definition at line 567 of file ImportFilter.cpp.

References forceBinary, status, and userFlags.

Referenced by CImportFilterDlg::OnEditentry().

00568 {
00569     status &= ~(int)userFlags;
00570     status |= (int)forceBinary;
00571 }

void ReportConflict::ForceNoKeywords ( void )

Force no keyword expansion status Definition at line 603 of file ImportFilter.cpp.

References forceNoKeywords, status, and userFlags.

Referenced by CImportFilterDlg::OnEditentry().

00604 {
00605     status &= ~(int)userFlags;
00606     status |= (int)forceNoKeywords;
00607 }

void ReportConflict::ForceText ( void )

Force text status Definition at line 576 of file ImportFilter.cpp.

References forceText, status, and userFlags.

Referenced by CImportFilterDlg::OnEditentry().

00577 {
00578     status &= ~(int)userFlags;
00579     status |= (int)forceText;
00580 }

void ReportConflict::ForceUnicode ( void )

Force unicode status Definition at line 585 of file ImportFilter.cpp.

References forceUnicode, status, and userFlags.

Referenced by CImportFilterDlg::OnEditentry().

00586 {
00587     status &= ~(int)userFlags;
00588     status |= (int)forceUnicode;
00589 }

UPStr ReportConflict::GetDesc ( ) const

Get the description

Returns:
The description as CPStr
Definition at line 675 of file ImportFilter.cpp.

References CPStr, GetPattern(), and IsExtension().

Referenced by CImportFilterDlg::OnInitDialog().

00676 {
00677     CPStr desc;
00678
00679     desc << "Type ";
00680     desc << (IsExtension() ? "*" : "");
00681     desc << GetPattern();
00682
00683     return desc;
00684 }

Here is the call graph for this function:

UPStr ReportConflict::GetKindDesc ( ) const

Get the kind description

Returns:
The kind description as CPStr
Definition at line 690 of file ImportFilter.cpp.

References CPStr, HasForceBinary(), HasForceNoKeywords(), HasForceText(), HasForceUnicode(), HasIgnore(), IsBinary(), and IsUnicode().

Referenced by CImportFilterDlg::OnEditentry(), and CImportFilterDlg::OnInitDialog().

00691 {
00692     if( HasForceBinary() )
00693     {
00694         return "FORCE BINARY";
00695     }
00696     else if( HasForceUnicode() )
00697     {
00698         return "FORCE UNICODE";
00699     }
00700     else if( HasForceText() )
00701     {
00702         return "FORCE TEXT";
00703     }
00704     else if( HasForceNoKeywords() )
00705     {
00706         return "FORCE NO KEYWORDS";
00707     }
00708     else if( HasIgnore() )
00709     {
00710         return "IGNORE";
00711     }
00712     else if( IsBinary() )
00713     {
00714         return "BINARY";
00715     }
00716     else if( IsUnicode() )
00717     {
00718         return "UNICODE";
00719     }
00720
00721     return "TEXT";
00722 }

Here is the call graph for this function:

int ReportConflict::GetMacCreator ( void ) const

Get the mac creator

Returns:
The mac creator
Note:
Mac only
Definition at line 559 of file ImportFilter.cpp.

References fcreator.

Referenced by list_add_type().

00560 {
00561     return fcreator;
00562 }

int ReportConflict::GetMacType ( void ) const

Get the mac type

Returns:
The mac type
Note:
Mac only
Definition at line 549 of file ImportFilter.cpp.

References ftype.

Referenced by list_add_type().

00550 {
00551     return ftype;
00552 }

const char * ReportConflict::GetPattern ( void ) const

Get the pattern

Returns:
The pattern
Definition at line 539 of file ImportFilter.cpp.

Referenced by CvsCmdImportModule(), and GetDesc().

00540 {
00541     return pattern;
00542 }

UPStr ReportConflict::GetStateDesc ( ) const

Get the state description

Returns:
The state description as CPStr
Definition at line 666 of file ImportFilter.cpp.

References CPStr, and HasConflict().

Referenced by CImportFilterDlg::OnInitDialog().

00667 {
00668     return HasConflict() ? "Error" : "OK";
00669 }

Here is the call graph for this function:

bool ReportConflict::HasConflict ( void ) const

Get the conflist status

Returns:
true if there is a conflict, false otherwise
Definition at line 493 of file ImportFilter.cpp.

References hasConflict, and status.

Referenced by GetStateDesc(), list_add_type(), CImportFilterDlg::OnInitDialog(), PrintOut(), SetConflict(), and SetTypeCreatorConflict().

00494 {
00495     return (status & hasConflict) != 0;
00496 }

bool ReportConflict::HasForceBinary ( void ) const

Get the force binary status

Returns:
true if force binary is set
Definition at line 613 of file ImportFilter.cpp.

References forceBinary, and status.

Referenced by CImportEntry::CImportEntry(), CvsCmdImportModule(), and GetKindDesc().

00614 {
00615     return (status & forceBinary) != 0;
00616 }

bool ReportConflict::HasForceNoKeywords ( void ) const

Get the force no keyword expansion status

Returns:
true if force no keyword expansion is set
Definition at line 649 of file ImportFilter.cpp.

References forceNoKeywords, and status.

Referenced by CImportEntry::CImportEntry(), CvsCmdImportModule(), and GetKindDesc().

00650 {
00651     return (status & forceNoKeywords) != 0;
00652 }

bool ReportConflict::HasForceText ( void ) const

Get the force text status

Returns:
true if force text is set
Definition at line 622 of file ImportFilter.cpp.

References forceText, and status.

Referenced by CImportEntry::CImportEntry(), CvsCmdImportModule(), and GetKindDesc().

00623 {
00624     return (status & forceText) != 0;
00625 }

bool ReportConflict::HasForceUnicode ( void ) const

Get the force unicode status

Returns:
true if force unicode is set
Definition at line 631 of file ImportFilter.cpp.

References forceUnicode, and status.

Referenced by CImportEntry::CImportEntry(), CvsCmdImportModule(), and GetKindDesc().

00632 {
00633     return (status & forceUnicode) != 0;
00634 }

bool ReportConflict::HasIgnore ( void ) const

Get the ignore status

Returns:
true if ignore is set
Definition at line 640 of file ImportFilter.cpp.

References hasIgnore, and status.

Referenced by CImportEntry::CImportEntry(), CvsCmdImportModule(), and GetKindDesc().

00641 {
00642     return (status & hasIgnore) != 0;
00643 }

bool ReportConflict::HasTypeCreatorConflict ( void ) const

Get the type creator conflist status

Returns:
true if there is a type creator conflict, false otherwise
Note:
Mac only
Definition at line 503 of file ImportFilter.cpp.

References hasTypeCreatorConflict, and status.

Referenced by PrintOut(), and SetTypeCreatorConflict().

00504 {
00505     return (status & hasTypeCreatorConflict) != 0;
00506 }

void ReportConflict::Ignore ( void )

Mark conflict for ignore Definition at line 594 of file ImportFilter.cpp.

References hasIgnore, status, and userFlags.

Referenced by list_add_type(), and CImportFilterDlg::OnEditentry().

00595 {
00596     status &= ~(int)userFlags;
00597     status |= (int)hasIgnore;
00598 }

bool ReportConflict::IsBinary ( void ) const

Get the binary status

Returns:
true if the status is binary, false otherwise
Definition at line 512 of file ImportFilter.cpp.

References isBinary, and status.

Referenced by CvsCmdImportModule(), GetKindDesc(), and list_add_type().

00513 {
00514     return (status & isBinary) != 0;
00515 }

bool ReportConflict::IsExtension ( void ) const

Check whether conflict has an extension

Returns:
true if conflict has an extension
Definition at line 530 of file ImportFilter.cpp.

References status.

Referenced by CvsCmdImportModule(), and GetDesc().

00531 {
00532     return (status & hasExtension) != 0;
00533 }

bool ReportConflict::IsUnicode ( void ) const

Get the unicode status

Returns:
true if the status is unicode, false otherwise
Definition at line 521 of file ImportFilter.cpp.

References isUnicode, and status.

Referenced by CvsCmdImportModule(), GetKindDesc(), and list_add_type().

00522 {
00523     return (status & isUnicode) != 0;
00524 }

bool ReportConflict::Match ( const char * pat )

Match the pattern

Parameters:
pat
Returns:
true if pattern matches, false otherwise
Note:
Since it is the server who compares against the pattern that might be a case compare
Definition at line 442 of file ImportFilter.cpp.

References status.

Referenced by list_add_type().

00443 {
00444     if( pat == 0L || pattern.empty() )
00445         return false;
00446
00447     int len = strlen(pat);
00448     int patlen = pattern.length();
00449
00450     if( status & hasExtension )
00451     {
00452         if( len < patlen )
00453             return false;
00454
00455         return strcmp(pattern, pat + len - patlen) == 0;
00456     }
00457
00458     return strcmp(pattern, pat) == 0;
00459 }

void ReportConflict::PrintOut ( UStr & out ) const

Definition at line 346 of file ImportFilter.cpp.

References UStr::empty(), HasConflict(), HasTypeCreatorConflict(), lf, sample1, and sample2.

Referenced by CImportEntry::CImportEntry().

00347 {
00348     out = "";
00349     if( HasConflict() )
00350     {
00351         out << "Text/Binary conflict, at least these files :";
00352         out << lf;
00353
00354         if( !sample1.empty() && !sample2.empty() )
00355         {
00356             out << "    ";
00357             out << sample1;
00358             out << " and ";
00359             out << sample2;
00360             out << lf;
00361         }
00362     }
00363     else if( HasTypeCreatorConflict() )
00364     {
00365         out << "Mac signature mismatch for this type, at least these files :";
00366         out << lf;
00367
00368         if( !sample1.empty() && !sample2.empty() )
00369         {
00370             out << "    ";
00371             out << sample1;
00372             out << " and ";
00373             out << sample2;
00374             out << lf;
00375         }
00376     }
00377 }

Here is the call graph for this function:

void ReportConflict::SetConflict ( const char * sample )

Mark conflict

Parameters:
sample Sample
Definition at line 465 of file ImportFilter.cpp.

References hasConflict, HasConflict(), sample2, and status.

Referenced by list_add_type().

00466 {
00467     // one is enough !
00468     if( HasConflict() )
00469         return;
00470
00471     sample2 = sample;
00472     status |= hasConflict;
00473 }

Here is the call graph for this function:

void ReportConflict::SetTypeCreatorConflict ( const char * sample )

Set type creator conflict

Parameters:
sample Sample
Definition at line 479 of file ImportFilter.cpp.

References HasConflict(), hasTypeCreatorConflict, HasTypeCreatorConflict(), sample2, and status.

Referenced by list_add_type().

00480 {
00481     // one is enough !
00482     if( HasTypeCreatorConflict() || HasConflict() )
00483         return;
00484
00485     sample2 = sample;
00486     status |= hasTypeCreatorConflict;
00487 }

Here is the call graph for this function:

Member Data Documentation

int ReportConflict::fcreator [protected]

File creator, mac only Definition at line 122 of file ImportFilter.h.

Referenced by GetMacCreator(), and ReportConflict().

int ReportConflict::ftype [protected]

File type, mac only Definition at line 121 of file ImportFilter.h.

Referenced by GetMacType(), and ReportConflict().

ReportConflict* ReportConflict::next

Next element Definition at line 60 of file ImportFilter.h.

Referenced by copy_list_types(), CvsCmdImportModule(), free_list_types(), list_add_type(), CImportFilterDlg::OnEditentry(), CImportFilterDlg::OnInitDialog(), and ReportConflict().

UStr ReportConflict::pattern [protected]

An extension or a whole name (hasExtension) Definition at line 118 of file ImportFilter.h.

UStr ReportConflict::sample1 [protected]

Sample for this entry Definition at line 119 of file ImportFilter.h.

Referenced by PrintOut().

UStr ReportConflict::sample2 [protected]

Another sample (if hasConflict) Definition at line 120 of file ImportFilter.h.

Referenced by PrintOut(), SetConflict(), and SetTypeCreatorConflict().

int ReportConflict::status [protected]

Status Definition at line 117 of file ImportFilter.h.

Referenced by AddPattern(), DisableUserSettings(), ForceBinary(), ForceNoKeywords(), ForceText(), ForceUnicode(), HasConflict(), HasForceBinary(), HasForceNoKeywords(), HasForceText(), HasForceUnicode(), HasIgnore(), HasTypeCreatorConflict(), Ignore(), IsBinary(), IsExtension(), IsUnicode(), Match(), ReportConflict(), SetConflict(), and SetTypeCreatorConflict().

The documentation for this class was generated from the following files:
  • common/ImportFilter.h
  • common/ImportFilter.cpp
Generated on Sat Aug 7 22:56:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: ReportWarning Class Reference

ReportWarning Class Reference

Class to represent a warning (wrong line feed, escape characters etc.) and a set of files which illustrates this warning. More...

#include <ImportFilter.h>

Collaboration diagram for ReportWarning:

[legend]
List of all members.

Public Member Functions

ReportWarning (kTextBinTYPE akind)
virtual | ~ReportWarning ()
void | AddWarning (const char *sample)
kTextBinTYPE | Kind (void) const
bool | IsError () const
UPStr | GetStateDesc () const
UPStr | GetDesc () const
void | PrintOut (UStr &out) const

Public Attributes

ReportWarning * next

Static Public Attributes

const size_t | maxWarnings = 10

Protected Attributes

kTextBinTYPE kind
std::vector< UStr > | samples
bool tooManyWarnings

Detailed Description

Class to represent a warning (wrong line feed, escape characters etc.) and a set of files which illustrates this warning.

Definition at line 126 of file ImportFilter.h.

Constructor & Destructor Documentation

ReportWarning::ReportWarning ( kTextBinTYPE akind )

Definition at line 729 of file ImportFilter.cpp.

References kind, next, and tooManyWarnings.

00730 {
00731     kind = akind;
00732     next = 0L;
00733     tooManyWarnings = false;
00734 }

ReportWarning::~ReportWarning ( ) [virtual]

Definition at line 736 of file ImportFilter.cpp.

00737 {
00738 }

Member Function Documentation

void ReportWarning::AddWarning ( const char * sample )

Add warning

Parameters:
sample Sample
Definition at line 873 of file ImportFilter.cpp.

References CStr, maxWarnings, samples, and tooManyWarnings.

Referenced by list_add_warning().

00874 {
00875     // it's enough !
00876     if( samples.size() >= maxWarnings )
00877     {
00878         tooManyWarnings = true;
00879         return;
00880     }
00881
00882     samples.push_back(CStr(sample));
00883 }

UPStr ReportWarning::GetDesc ( ) const

Get the description

Returns:
The description as CPStr
Definition at line 922 of file ImportFilter.cpp.

References CPStr, kBinIsUnicode, kBinWrongSig, kFileInvalidName, kFileIsAlias, kFileIsOK, kFileMissing, Kind(), kTextEscapeChar, kTextIsBinary, kTextIsUnicode, kTextWrongLF, and kTextWrongSig.

Referenced by CImportFilterDlg::OnInitDialog().

00923 {
00924     CPStr desc;
00925
00926     switch( Kind() )
00927     {
00928     case kFileIsOK:
00929         desc = "File is OK";
00930         break;
00931     case kFileMissing:
00932         desc = "File is missing or unreadable";
00933         break;
00934     case kFileIsAlias:
00935         desc = "File is an alias";
00936         break;
00937     case kFileInvalidName:
00938         desc = "File has an invalid name";
00939         break;
00940     case kTextWrongLF:
00941         desc = "File has the wrong line feed for this machine";
00942         break;
00943     case kTextIsBinary:
00944         desc = "File seems to be binary, while expecting text";
00945         break;
00946     case kTextEscapeChar:
00947         desc = "File has some escape characters in it (0x00-0x20, 0x80-0xFF)";
00948         break;
00949     case kTextIsUnicode:
00950         desc = "File seems to be unicode, while expecting text";
00951         break;
00952     case kBinIsUnicode:
00953         desc = "File seems to be unicode, while expecting binary";
00954         break;
00955     case kTextWrongSig:
00956         desc = "Text File has a wrong mac signature";
00957         break;
00958     case kBinWrongSig:
00959         desc = "Binary File has a wrong mac signature";
00960         break;
00961     default:
00962         desc = "File has some unknown problem";
00963         break;
00964     }
00965
00966     return desc;
00967 }

Here is the call graph for this function:

UPStr ReportWarning::GetStateDesc ( ) const

Get the state description

Returns:
The state description as CPStr
Definition at line 908 of file ImportFilter.cpp.

References CPStr, and IsError().

Referenced by CImportFilterDlg::OnInitDialog().

00909 {
00910     if( IsError() )
00911     {
00912         return "Error";
00913     }
00914
00915     return "Warning";
00916 }

Here is the call graph for this function:

bool ReportWarning::IsError ( ) const

Check whether item represents an error

Returns:
true if item is an error, false if it is warning
Note:
Item kind kFileIsOK should not happen and is considered an error
Definition at line 899 of file ImportFilter.cpp.

References kFileIsOK, Kind(), and kTextEscapeChar.

Referenced by GetStateDesc(), and CImportFilterDlg::OnInitDialog().

00900 {
00901     return Kind() == kFileIsOK || Kind() == kTextEscapeChar;
00902 }

Here is the call graph for this function:

kTextBinTYPE ReportWarning::Kind ( void ) const

Get the warning type

Returns:
The warning type
Definition at line 889 of file ImportFilter.cpp.

References kind, and kTextBinTYPE.

Referenced by GetDesc(), IsError(), and list_add_warning().

00890 {
00891     return kind;
00892 }

void ReportWarning::PrintOut ( UStr & out ) const

Get the text description for warning type

Parameters:
out Return warning's description
Definition at line 744 of file ImportFilter.cpp.

References kBinIsText, kBinIsUnicode, kBinWrongSig, kFileInvalidName, kFileIsAlias, kFileIsOK, kFileMissing, kind, kTextEscapeChar, kTextIsBinary, kTextIsUnicode, kTextWrongLF, kTextWrongSig, lf, samples, and tooManyWarnings.

Referenced by CImportWarning::CImportWarning().

00745 {
00746     out = "";
00747
00748     if( samples.size() == 0 )
00749         return;
00750
00751     out = "Warning : ";
00752     switch(kind)
00753     {
00754     default:
00755     case kFileIsOK:
00756         out << "Files are OK";
00757         break;
00758     case kFileMissing:
00759         out << "Files are missing or unreadable";
00760         break;
00761     case kFileIsAlias:
00762         out << "Files are aliases";
00763         break;
00764     case kFileInvalidName:
00765         out << "Files have invalid name";
00766         break;
00767     case kTextWrongLF:
00768         out << "Files have the wrong line feed";
00769         break;
00770     case kTextIsBinary:
00771         out << "Files are binary";
00772         break;
00773     case kTextEscapeChar:
00774         out << "Files have escape characters in it";
00775         break;
00776     case kTextWrongSig:
00777         out << "Text files have the wrong signature";
00778         break;
00779     case kBinIsText:
00780         out << "Files are text, should be binary";
00781         break;
00782     case kBinWrongSig:
00783         out << "Binary files have the wrong signature";
00784         break;
00785     case kTextIsUnicode:
00786         out << "Files are unicode, should be text";
00787         break;
00788     case kBinIsUnicode:
00789         out << "Files are unicode, should be binary";
00790         break;
00791     }
00792
00793     out << lf;
00794
00795     std::vector<CStr>::const_iterator i;
00796     for(i = samples.begin(); i != samples.end(); ++i)
00797     {
00798         out << "    ";
00799         out << *i;
00800         out << lf;
00801     }
00802
00803     if( tooManyWarnings )
00804     {
00805         out << "    More files follow";
00806         out << lf;
00807     }
00808 }

Member Data Documentation

kTextBinTYPE ReportWarning::kind [protected]

Definition at line 149 of file ImportFilter.h.

Referenced by Kind(), PrintOut(), and ReportWarning().

const size_t ReportWarning::maxWarnings = 10 [static]

Maximum number of wanings Definition at line 727 of file ImportFilter.cpp.

Referenced by AddWarning().

ReportWarning* ReportWarning::next

Next element Definition at line 132 of file ImportFilter.h.

Referenced by copy_list_types(), free_list_types(), list_add_warning(), CImportFilterDlg::OnEditentry(), CImportFilterDlg::OnInitDialog(), and ReportWarning().

std::vector< UStr > ReportWarning::samples [protected]

Samples container Definition at line 151 of file ImportFilter.h.

Referenced by AddWarning(), and PrintOut().

bool ReportWarning::tooManyWarnings [protected]

Flag to indicate too many warnings Definition at line 152 of file ImportFilter.h.

Referenced by AddWarning(), PrintOut(), and ReportWarning().

The documentation for this class was generated from the following files:
  • common/ImportFilter.h
  • common/ImportFilter.cpp
Generated on Sat Aug 7 22:56:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CRevisionConsole Class Reference

CRevisionConsole Class Reference

Console used to retrieve a specific revision. More...

#include <GraphView.h>

Inheritance diagram for CRevisionConsole:

[legend]
Collaboration diagram for CRevisionConsole:

[legend]
List of all members.

Public Member Functions

CRevisionConsole ()
bool Init (LPCTSTR path, LPCTSTR fname)

Detailed Description

Console used to retrieve a specific revision.

Definition at line 284 of file GraphView.h.

Constructor & Destructor Documentation

CRevisionConsole::CRevisionConsole ( )

Definition at line 1243 of file GraphView.cpp.

01244 {
01245 }

Member Function Documentation

bool CRevisionConsole::Init | ( | LPCTSTR | path,
 |  | LPCTSTR | fname
 | ) |

Initialize console

Parameters:
path | File path
fname | File name
Returns:
true on success, false otherwise
Definition at line 1253 of file GraphView.cpp.

References NULL, and CCvsStreamConsole::Open().

Referenced by CGraphView::SaveSel().

01254 {
01255     TCHAR buf[_MAX_PATH] = "";
01256
01257     _tmakepath(buf, NULL, path, fname, NULL);
01258
01259     return CCvsStreamConsole::Open(buf);
01260 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:56:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CRichEditView Class Reference

CRichEditView Class Reference

Inheritance diagram for CRichEditView:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/wincvsView.h
Generated on Sat Aug 7 22:56:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CRtag_MAIN Class Reference

CRtag_MAIN Class Reference

#include <RtagDlg.h>

Inheritance diagram for CRtag_MAIN:

[legend]
Collaboration diagram for CRtag_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_RTAG_MAIN }

Public Member Functions

CRtag_MAIN (const MultiFiles *mf, const kTagCmdType type, const char *sLastModule, const char *sLastTag, bool noRecurs, bool movDelBranch, bool lookAttic, bool forceRoot, const char *cvsroot, bool overwriteExist=false)
~CRtag_MAIN ()

Public Attributes

CButton | m_forceRootCheck
CButton | m_selCvsrootButton
CSmartComboBox m_cvsrootCombo
CButton | m_overwriteExistingCheck
CStatic | m_moduleDescStatic
CStatic | m_tagDescStatic
CButton | m_grpBox
CSmartComboBox m_moduleCombo
CSmartComboBox m_tagCombo
CString | m_tagName
CString | m_moduleName
BOOL | m_noRecurs
BOOL | m_lookAttic
BOOL | m_overwriteExisting
BOOL | m_movDelBranch
BOOL | m_forceRoot
CString | m_cvsroot

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable controls and setup entry descriptions.
afx_msg void | OnBrowseTag ()
BN_CLICKED message handler, select tag.
afx_msg void | OnBrowseModules ()
BN_CLICKED message handler, select module.
afx_msg void | OnForceroot ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnSelcvsroot ()
BN_CLICKED message handler, select CVSROOT.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf
kTagCmdType m_type

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 69 of file RtagDlg.h.
00069 { IDD = IDD_RTAG_MAIN };

Constructor & Destructor Documentation

CRtag_MAIN::CRtag_MAIN | ( | const MultiFiles * | mf,
 |  | const kTagCmdType | type,
 |  | const char * | sLastModule,
 |  | const char * | sLastTag,
 |  | bool | noRecurs,
 |  | bool | movDelBranch,
 |  | bool | lookAttic,
 |  | bool | forceRoot,
 |  | const char * | cvsroot,
 |  | bool | overwriteExist = false
 | ) |

Definition at line 70 of file RtagDlg.cpp.

References gOldCvsroots, gOldModules, and gRevNames.

00075                        : m_mf(mf), CHHelpPropertyPage(CRtag_MAIN::IDD)
00076 {
00077     //{{AFX_DATA_INIT(CRtag_MAIN)
00078     //}}AFX_DATA_INIT
00079
00080     m_forceRoot = forceRoot;
00081     m_cvsroot = cvsroot;
00082
00083     m_type = type;
00084
00085     m_tagName = sLastTag;
00086     m_moduleName = sLastModule;
00087
00088     m_noRecurs = noRecurs;
00089     m_movDelBranch = movDelBranch;
00090
00091     m_lookAttic = lookAttic;
00092     m_overwriteExisting = overwriteExist;
00093
00094     m_moduleCombo.SetItems(&gOldModules);
00095     m_tagCombo.SetItems(&gRevNames);
00096     m_cvsrootCombo.SetItems(&gOldCvsroots);
00097 }

CRtag_MAIN::~CRtag_MAIN ( )

Definition at line 99 of file RtagDlg.cpp.

00100 {
00101 }

Member Function Documentation

void CRtag_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 103 of file RtagDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_ATTIC, IDC_BROWSE_CVSROOT, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_GRPBOX_TEXT, IDC_MODNAME, IDC_MODULEDESC_TEXT, IDC_MOVDEL_BRANCH, IDC_NORECURS, IDC_OVERWRITE, IDC_TAGDESC_TEXT, IDC_TAGNAME, m_cvsroot, m_cvsrootCombo, m_forceRoot, m_forceRootCheck, m_grpBox, m_lookAttic, m_moduleCombo, m_moduleDescStatic, m_moduleName, m_movDelBranch, m_noRecurs, m_overwriteExisting, m_overwriteExistingCheck, m_selCvsrootButton, m_tagCombo, m_tagDescStatic, and m_tagName.

00104 {
00105     CHHelpPropertyPage::DoDataExchange(pDX);
00106     //{{AFX_DATA_MAP(CRtag_MAIN)
00107     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00108     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00109     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00110     DDX_Control(pDX, IDC_OVERWRITE, m_overwriteExistingCheck);
00111     DDX_Control(pDX, IDC_MODULEDESC_TEXT, m_moduleDescStatic);
00112     DDX_Control(pDX, IDC_TAGDESC_TEXT, m_tagDescStatic);
00113     DDX_Control(pDX, IDC_GRPBOX_TEXT, m_grpBox);
00114     DDX_Control(pDX, IDC_MODNAME, m_moduleCombo);
00115     DDX_Control(pDX, IDC_TAGNAME, m_tagCombo);
00116     DDX_CBString(pDX, IDC_TAGNAME, m_tagName);
00117     DDX_CBString(pDX, IDC_MODNAME, m_moduleName);
00118     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00119     DDX_Check(pDX, IDC_ATTIC, m_lookAttic);
00120     DDX_Check(pDX, IDC_OVERWRITE, m_overwriteExisting);
00121     DDX_Check(pDX, IDC_MOVDEL_BRANCH, m_movDelBranch);
00122     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00123     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00124     //}}AFX_DATA_MAP
00125
00126     DDV_MinChars(pDX, m_moduleName, 1);
00127     DDV_MinChars(pDX, m_tagName, 1);
00128
00129     DDX_ComboMString(pDX, IDC_MODNAME, m_moduleCombo);
00130     DDX_ComboMString(pDX, IDC_TAGNAME, m_tagCombo);
00131     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00132
00133     if( m_forceRoot )
00134     {
00135         DDV_MinChars(pDX, m_cvsroot, 1);
00136     }
00137
00138     if( !pDX->m_bSaveAndValidate )
00139     {
00140         m_selCvsrootButton.EnableWindow(m_forceRoot);
00141     }
00142 }

Here is the call graph for this function:

void CRtag_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 200 of file RtagDlg.cpp.

References IDC_ATTIC, IDC_BROWSE_CVSROOT, IDC_BROWSE_MODNAME, IDC_BROWSE_TAG, IDC_CVSROOT, IDC_FORCE_CVSROOT, IDC_MODNAME, IDC_MOVDEL_BRANCH, IDC_NORECURS, IDC_OVERWRITE, IDC_TAGNAME, IDH_IDC_ATTIC, IDH_IDC_BROWSE_CVSROOT, IDH_IDC_BROWSE_MODNAME, IDH_IDC_BROWSE_TAG, IDH_IDC_CVSROOT, IDH_IDC_FORCE_CVSROOT, IDH_IDC_MODNAME, IDH_IDC_MOVDEL_BRANCH, IDH_IDC_NORECURS, IDH_IDC_OVERWRITE, IDH_IDC_TAGNAME, and CHHelpSupport::SetCtrlHelpID().

00201 {
00202     SetCtrlHelpID(IDC_TAGNAME,          IDH_IDC_TAGNAME);
00203     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00204     SetCtrlHelpID(IDC_MODNAME,          IDH_IDC_MODNAME);
00205     SetCtrlHelpID(IDC_BROWSE_MODNAME,   IDH_IDC_BROWSE_MODNAME);
00206     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
00207     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
00208     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
00209     SetCtrlHelpID(IDC_NORECURS,         IDH_IDC_NORECURS);
00210     SetCtrlHelpID(IDC_MOVDEL_BRANCH,    IDH_IDC_MOVDEL_BRANCH);
00211     SetCtrlHelpID(IDC_ATTIC,            IDH_IDC_ATTIC);
00212     SetCtrlHelpID(IDC_OVERWRITE,        IDH_IDC_OVERWRITE);
00213 }

Here is the call graph for this function:

void CRtag_MAIN::OnBrowseModules ( ) [protected]

BN_CLICKED message handler, select module.

Definition at line 228 of file RtagDlg.cpp.

References CompatGetModuleListItem(), CStr, m_mf, m_moduleCombo, and m_moduleName.

00229 {
00230     CStr moduleName;
00231     if( CompatGetModuleListItem(m_mf, moduleName) )
00232     {
00233         m_moduleName = (const char*)moduleName;
00234         m_moduleCombo.SetWindowText(m_moduleName);
00235     }
00236 }

Here is the call graph for this function:

void CRtag_MAIN::OnBrowseTag ( ) [protected]

BN_CLICKED message handler, select tag.

Definition at line 217 of file RtagDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_tagCombo, and m_tagName.

00218 {
00219     CStr tagName;
00220     if( CompatGetTagListItem(m_mf, tagName) )
00221     {
00222         m_tagName = (const char*)tagName;
00223         m_tagCombo.SetWindowText(m_tagName);
00224     }
00225 }

Here is the call graph for this function:

void CRtag_MAIN::OnForceroot ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 239 of file RtagDlg.cpp.

References m_cvsrootCombo, m_forceRootCheck, and m_selCvsrootButton.

00240 {
00241     const BOOL enable = m_forceRootCheck.GetCheck();
00242
00243     m_selCvsrootButton.EnableWindow(enable);
00244     m_cvsrootCombo.EnableWindow(enable);
00245 }

BOOL CRtag_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable controls and setup entry descriptions.

Reimplemented from CHHelpPropertyPage.

Definition at line 158 of file RtagDlg.cpp.

References kTagBranch, kTagCreate, kTagDelete, and CHHelpPropertyPage::OnInitDialog().

00159 {
00160     CHHelpPropertyPage::OnInitDialog();
00161
00162     // Set the type-specific data
00163     CString strGrpBox;
00164     CString strTagDesc;
00165     CString strmoduleDesc;
00166
00167     switch( m_type )
00168     {
00169     case kTagCreate:
00170         strGrpBox = "Enter the tag name and which module to tag:";
00171         strTagDesc = "New &tag name:";
00172         strmoduleDesc = "&Module to tag:";
00173         break;
00174     case kTagDelete:
00175         strGrpBox = "Enter the tag name to delete and which module to untag:";
00176         strTagDesc = "Delete &tag name:";
00177         strmoduleDesc = "&Module to untag:";
00178
00179         m_overwriteExistingCheck.ShowWindow(SW_HIDE);
00180         break;
00181     case kTagBranch:
00182         strGrpBox = "Enter the branch name and which module to fork:";
00183         strTagDesc = "New &branch name:";
00184         strmoduleDesc = "&Module to fork:";
00185         break;
00186     default:
00187         ASSERT(FALSE); //unknown type
00188     }
00189
00190     m_grpBox.SetWindowText(strGrpBox);
00191     m_tagDescStatic.SetWindowText(strTagDesc);
00192     m_moduleDescStatic.SetWindowText(strmoduleDesc);;
00193
00194     OnForceroot();
00195
00196     return TRUE;  // return TRUE unless you set the focus to a control
00197                   // EXCEPTION: OCX Property Pages should return FALSE
00198 }

Here is the call graph for this function:

void CRtag_MAIN::OnSelcvsroot ( ) [protected]

BN_CLICKED message handler, select CVSROOT.

Definition at line 248 of file RtagDlg.cpp.

References CompatGetCvsRoot(), CStr, CSmartComboBox::GetWindowText(), and m_cvsrootCombo.

00249 {
00250     CString strCvsroot;
00251     m_cvsrootCombo.GetWindowText(strCvsroot);
00252
00253     CStr cvsroot(strCvsroot);
00254     if( CompatGetCvsRoot(cvsroot) )
00255     {
00256         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00257     }
00258 }

Here is the call graph for this function:

Member Data Documentation

CString CRtag_MAIN::m_cvsroot

Definition at line 86 of file RtagDlg.h.

Referenced by CompatGetRtag(), and DoDataExchange().

CSmartComboBox CRtag_MAIN::m_cvsrootCombo

Definition at line 72 of file RtagDlg.h.

Referenced by DoDataExchange(), OnForceroot(), and OnSelcvsroot().

BOOL CRtag_MAIN::m_forceRoot

Definition at line 85 of file RtagDlg.h.

Referenced by CompatGetRtag(), and DoDataExchange().

CButton CRtag_MAIN::m_forceRootCheck

Definition at line 70 of file RtagDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

CButton CRtag_MAIN::m_grpBox

Definition at line 76 of file RtagDlg.h.

Referenced by DoDataExchange().

BOOL CRtag_MAIN::m_lookAttic

Definition at line 82 of file RtagDlg.h.

Referenced by CompatGetRtag(), and DoDataExchange().

const MultiFiles* CRtag_MAIN::m_mf [private]

Definition at line 110 of file RtagDlg.h.

Referenced by OnBrowseModules(), and OnBrowseTag().

CSmartComboBox CRtag_MAIN::m_moduleCombo

Definition at line 77 of file RtagDlg.h.

Referenced by DoDataExchange(), and OnBrowseModules().

CStatic CRtag_MAIN::m_moduleDescStatic

Definition at line 74 of file RtagDlg.h.

Referenced by DoDataExchange().

CString CRtag_MAIN::m_moduleName

Definition at line 80 of file RtagDlg.h.

Referenced by CompatGetRtag(), DoDataExchange(), and OnBrowseModules().

BOOL CRtag_MAIN::m_movDelBranch

Definition at line 84 of file RtagDlg.h.

Referenced by CompatGetRtag(), and DoDataExchange().

BOOL CRtag_MAIN::m_noRecurs

Definition at line 81 of file RtagDlg.h.

Referenced by CompatGetRtag(), and DoDataExchange().

BOOL CRtag_MAIN::m_overwriteExisting

Definition at line 83 of file RtagDlg.h.

Referenced by CompatGetRtag(), and DoDataExchange().

CButton CRtag_MAIN::m_overwriteExistingCheck

Definition at line 73 of file RtagDlg.h.

Referenced by DoDataExchange().

CButton CRtag_MAIN::m_selCvsrootButton

Definition at line 71 of file RtagDlg.h.

Referenced by DoDataExchange(), and OnForceroot().

CSmartComboBox CRtag_MAIN::m_tagCombo

Definition at line 78 of file RtagDlg.h.

Referenced by DoDataExchange(), and OnBrowseTag().

CStatic CRtag_MAIN::m_tagDescStatic

Definition at line 75 of file RtagDlg.h.

Referenced by DoDataExchange().

CString CRtag_MAIN::m_tagName

Definition at line 79 of file RtagDlg.h.

Referenced by CompatGetRtag(), DoDataExchange(), and OnBrowseTag().

kTagCmdType CRtag_MAIN::m_type [private]

Definition at line 111 of file RtagDlg.h.

The documentation for this class was generated from the following files:
  • common/RtagDlg.h
  • common/RtagDlg.cpp
Generated on Sat Aug 7 22:56:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CRtag_OPTIONS Class Reference

CRtag_OPTIONS Class Reference

#include <RtagDlg.h>

Inheritance diagram for CRtag_OPTIONS:

[legend]
Collaboration diagram for CRtag_OPTIONS:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_RTAG_OPTIONS }

Public Member Functions

CRtag_OPTIONS (const MultiFiles *mf, const kTagCmdType type, bool hasDate, bool hasRev, const char *sLastDate, const char *sLastRev, bool useMostRecent)
CRtag_OPTIONS ()
~CRtag_OPTIONS ()

Public Attributes

CButton | m_browseTagButton
CButton | m_hasRevCheck
CButton | m_hasDateCheck
CSmartComboBox m_revCombo
CSmartComboBox m_dateCombo
CButton | m_grpBox
CString | m_date
CString | m_rev
BOOL | m_hasDate
BOOL | m_hasRev
BOOL | m_useMostRecent

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDate ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnRev ()
BN_CLICKED message handler, enable controls.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, enable controls and setup entry descriptions.
afx_msg void | OnBrowseTag ()
BN_CLICKED message handler, select tag.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf
kTagCmdType m_type

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 135 of file RtagDlg.h.
00135 { IDD = IDD_RTAG_OPTIONS };

Constructor & Destructor Documentation

CRtag_OPTIONS::CRtag_OPTIONS | ( | const MultiFiles * | mf,
 |  | const kTagCmdType | type,
 |  | bool | hasDate,
 |  | bool | hasRev,
 |  | const char * | sLastDate,
 |  | const char * | sLastRev,
 |  | bool | useMostRecent
 | ) |

Definition at line 265 of file RtagDlg.cpp.

References gDateNames, and gRevNames.

00269                              : m_mf(mf), CHHelpPropertyPage(CRtag_OPTIONS::IDD)
00270 {
00271     m_type = type;
00272
00273     m_date = sLastDate;
00274     m_rev = sLastRev;
00275     m_hasDate = hasDate;
00276     m_hasRev = hasRev;
00277     m_useMostRecent = useMostRecent;
00278
00279     m_revCombo.SetItems(&gRevNames);
00280     m_dateCombo.SetItems(&gDateNames);
00281 }

CRtag_OPTIONS::CRtag_OPTIONS ( )

Definition at line 283 of file RtagDlg.cpp.

References m_date, m_hasDate, m_hasRev, m_rev, and m_useMostRecent.

00283                              : CHHelpPropertyPage(CRtag_OPTIONS::IDD)
00284 {
00285     //{{AFX_DATA_INIT(CRtag_OPTIONS)
00286     m_date = _T("");
00287     m_rev = _T("");
00288     m_hasDate = FALSE;
00289     m_hasRev = FALSE;
00290     m_useMostRecent = FALSE;
00291     //}}AFX_DATA_INIT
00292 }

CRtag_OPTIONS::~CRtag_OPTIONS ( )

Definition at line 294 of file RtagDlg.cpp.

00295 {
00296 }

Member Function Documentation

void CRtag_OPTIONS::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 298 of file RtagDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BROWSE_TAG, IDC_DATE, IDC_FORCE_HEAD_REV, IDC_GRPBOX_TEXT, IDC_HAS_DATE, IDC_HAS_REV, IDC_REV_TAG, m_browseTagButton, m_date, m_dateCombo, m_grpBox, m_hasDate, m_hasDateCheck, m_hasRev, m_hasRevCheck, m_rev, m_revCombo, m_useMostRecent, OnDate(), and OnRev().

00299 {
00300     CHHelpPropertyPage::DoDataExchange(pDX);
00301     //{{AFX_DATA_MAP(CRtag_OPTIONS)
00302     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00303     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00304     DDX_Control(pDX, IDC_HAS_DATE, m_hasDateCheck);
00305     DDX_Control(pDX, IDC_REV_TAG, m_revCombo);
00306     DDX_Control(pDX, IDC_DATE, m_dateCombo);
00307     DDX_Control(pDX, IDC_GRPBOX_TEXT, m_grpBox);
00308     DDX_CBString(pDX, IDC_DATE, m_date);
00309     DDX_CBString(pDX, IDC_REV_TAG, m_rev);
00310     DDX_Check(pDX, IDC_HAS_DATE, m_hasDate);
00311     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00312     DDX_Check(pDX, IDC_FORCE_HEAD_REV, m_useMostRecent);
00313     //}}AFX_DATA_MAP
00314
00315     if( m_hasRev )
00316     {
00317         DDV_MinChars(pDX, m_rev, 1);
00318     }
00319
00320     if( m_hasDate )
00321     {
00322         DDV_MinChars(pDX, m_date, 1);
00323     }
00324
00325     if( !pDX->m_bSaveAndValidate )
00326     {
00327         OnDate();
00328         OnRev();
00329     }
00330
00331     DDX_ComboMString(pDX, IDC_REV_TAG, m_revCombo);
00332     DDX_ComboMString(pDX, IDC_DATE, m_dateCombo);
00333 }

Here is the call graph for this function:

void CRtag_OPTIONS::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 391 of file RtagDlg.cpp.

References IDC_BROWSE_TAG, IDC_DATE, IDC_FORCE_HEAD_REV, IDC_HAS_DATE, IDC_HAS_REV, IDC_REV_TAG, IDH_IDC_BROWSE_TAG, IDH_IDC_DATE, IDH_IDC_FORCE_HEAD_REV, IDH_IDC_HAS_DATE, IDH_IDC_HAS_REV, IDH_IDC_REV_TAG, and CHHelpSupport::SetCtrlHelpID().

00392 {
00393     SetCtrlHelpID(IDC_HAS_DATE,         IDH_IDC_HAS_DATE);
00394     SetCtrlHelpID(IDC_DATE,             IDH_IDC_DATE);
00395     SetCtrlHelpID(IDC_HAS_REV,          IDH_IDC_HAS_REV);
00396     SetCtrlHelpID(IDC_REV_TAG,          IDH_IDC_REV_TAG);
00397     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00398     SetCtrlHelpID(IDC_FORCE_HEAD_REV,   IDH_IDC_FORCE_HEAD_REV);
00399 }

Here is the call graph for this function:

void CRtag_OPTIONS::OnBrowseTag ( ) [protected]

BN_CLICKED message handler, select tag.

Definition at line 402 of file RtagDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev, and m_revCombo.

00403 {
00404     CStr tagName;
00405     if( CompatGetTagListItem(m_mf, tagName) )
00406     {
00407         m_rev = (const char*)tagName;
00408         m_revCombo.SetWindowText(m_rev);
00409     }
00410 }

Here is the call graph for this function:

void CRtag_OPTIONS::OnDate ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 348 of file RtagDlg.cpp.

Referenced by DoDataExchange().

00349 {
00350     m_dateCombo.EnableWindow(m_hasDateCheck.GetCheck());
00351 }

BOOL CRtag_OPTIONS::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, enable controls and setup entry descriptions.

Reimplemented from CHHelpPropertyPage.

Definition at line 363 of file RtagDlg.cpp.

References kTagBranch, kTagCreate, kTagDelete, m_grpBox, m_type, and CHHelpPropertyPage::OnInitDialog().

00364 {
00365     CHHelpPropertyPage::OnInitDialog();
00366
00367     // Set the type-specific data
00368     CString strGrpBox;
00369
00370     switch( m_type )
00371     {
00372     case kTagCreate:
00373         strGrpBox = "Optionally use this revision/tag/date to create the tag:";
00374         break;
00375     case kTagDelete:
00376         ASSERT(FALSE); //delete tag has no options
00377         break;
00378     case kTagBranch:
00379         strGrpBox = "Optionally use this revision/tag/date to create the branch:";
00380         break;
00381     default:
00382         ASSERT(FALSE); //unknown type
00383     }
00384
00385     m_grpBox.SetWindowText(strGrpBox);
00386
00387     return TRUE;  // return TRUE unless you set the focus to a control
00388                   // EXCEPTION: OCX Property Pages should return FALSE
00389 }

Here is the call graph for this function:

void CRtag_OPTIONS::OnRev ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 354 of file RtagDlg.cpp.

References m_browseTagButton, m_hasRevCheck, and m_revCombo.

Referenced by DoDataExchange().

00355 {
00356     const BOOL enable = m_hasRevCheck.GetCheck();
00357
00358     m_revCombo.EnableWindow(enable);
00359     m_browseTagButton.EnableWindow(enable);
00360 }

Member Data Documentation

CButton CRtag_OPTIONS::m_browseTagButton

Definition at line 136 of file RtagDlg.h.

Referenced by DoDataExchange(), and OnRev().

CString CRtag_OPTIONS::m_date

Definition at line 142 of file RtagDlg.h.

Referenced by CompatGetRtag(), CRtag_OPTIONS(), and DoDataExchange().

CSmartComboBox CRtag_OPTIONS::m_dateCombo

Definition at line 140 of file RtagDlg.h.

Referenced by DoDataExchange().

CButton CRtag_OPTIONS::m_grpBox

Definition at line 141 of file RtagDlg.h.

Referenced by DoDataExchange(), and OnInitDialog().

BOOL CRtag_OPTIONS::m_hasDate

Definition at line 144 of file RtagDlg.h.

Referenced by CompatGetRtag(), CRtag_OPTIONS(), and DoDataExchange().

CButton CRtag_OPTIONS::m_hasDateCheck

Definition at line 138 of file RtagDlg.h.

Referenced by DoDataExchange().

BOOL CRtag_OPTIONS::m_hasRev

Definition at line 145 of file RtagDlg.h.

Referenced by CompatGetRtag(), CRtag_OPTIONS(), and DoDataExchange().

CButton CRtag_OPTIONS::m_hasRevCheck

Definition at line 137 of file RtagDlg.h.

Referenced by DoDataExchange(), and OnRev().

const MultiFiles* CRtag_OPTIONS::m_mf [private]

Definition at line 169 of file RtagDlg.h.

Referenced by OnBrowseTag().

CString CRtag_OPTIONS::m_rev

Definition at line 143 of file RtagDlg.h.

Referenced by CompatGetRtag(), CRtag_OPTIONS(), DoDataExchange(), and OnBrowseTag().

CSmartComboBox CRtag_OPTIONS::m_revCombo

Definition at line 139 of file RtagDlg.h.

Referenced by DoDataExchange(), OnBrowseTag(), and OnRev().

kTagCmdType CRtag_OPTIONS::m_type [private]

Definition at line 170 of file RtagDlg.h.

Referenced by OnInitDialog().

BOOL CRtag_OPTIONS::m_useMostRecent

Definition at line 146 of file RtagDlg.h.

Referenced by CompatGetRtag(), CRtag_OPTIONS(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/RtagDlg.h
  • common/RtagDlg.cpp
Generated on Sat Aug 7 22:56:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: URuntimeClass Class Reference

URuntimeClass Class Reference

#include <uobject.h>

Collaboration diagram for URuntimeClass:

[legend]
List of all members.

Public Member Functions

URuntimeClass (const char *lpszClassName, int nObjectSize, UObject *(*pfnCreateObject)(), const URuntimeClass *(*pfnGetBaseClass)())
~URuntimeClass ()
UObject * CreateObject ()
bool | IsDerivedFrom (const URuntimeClass *pBaseClass) const

Public Attributes

const char * | m_lpszClassName
int m_nObjectSize
UObject *(* m_pfnCreateObject )()
const URuntimeClass *(* | m_pfnGetBaseClass )()
URuntimeClass * m_pNextClass

Static Public Attributes

URuntimeClass * | sAllURuntimeClass = 0L

Constructor & Destructor Documentation

URuntimeClass::URuntimeClass | ( | const char * | lpszClassName,
 |  | int | nObjectSize,
 |  | UObject *(* | pfnCreateObject)(),
 |  | const URuntimeClass *(* | pfnGetBaseClass)()
 | ) |

Definition at line 65 of file uobject.cpp.

References m_lpszClassName, m_nObjectSize, m_pfnCreateObject, m_pfnGetBaseClass, m_pNextClass, and sAllURuntimeClass.

00067 {
00068     m_lpszClassName = lpszClassName;
00069     m_nObjectSize = nObjectSize;
00070     m_pfnCreateObject = pfnCreateObject;
00071     m_pfnGetBaseClass = pfnGetBaseClass;
00072     m_pNextClass = sAllURuntimeClass;
00073
00074     sAllURuntimeClass = this;
00075 }

URuntimeClass::~URuntimeClass ( )

Definition at line 77 of file uobject.cpp.

References m_pNextClass, and sAllURuntimeClass.

00078 {
00079     URuntimeClass *next = sAllURuntimeClass;
00080     URuntimeClass *prev = 0L;
00081     while(next != 0L)
00082     {
00083         if(next == this)
00084         {
00085             if(prev == 0L)
00086                 sAllURuntimeClass = m_pNextClass;
00087             else
00088                 prev->m_pNextClass = m_pNextClass;
00089             break;
00090         }
00091
00092         prev = next;
00093         next = next->m_pNextClass;
00094     }
00095 }

Member Function Documentation

UObject * URuntimeClass::CreateObject ( )

Definition at line 97 of file uobject.cpp.

References m_pfnCreateObject.

Referenced by UObject::CreateObject().

00098 {
00099     if (m_pfnCreateObject == 0L)
00100     {
00101         return 0L;
00102     }
00103
00104     UObject* pObject = 0L;
00105     try
00106     {
00107         pObject = (*m_pfnCreateObject)();
00108     }
00109     catch(...)
00110     {
00111     }
00112
00113     return pObject;
00114 }

bool URuntimeClass::IsDerivedFrom ( const URuntimeClass * pBaseClass ) const

Definition at line 116 of file uobject.cpp.

References m_pfnGetBaseClass.

Referenced by UObject::IsKindOf().

00117 {
00118     // simple SI case
00119     const URuntimeClass* pClassThis = this;
00120     while (pClassThis != 0L)
00121     {
00122         if (pClassThis == pBaseClass)
00123             return true;
00124         pClassThis = (*pClassThis->m_pfnGetBaseClass)();
00125     }
00126     return false;       // walked to the top, no match
00127 }

Member Data Documentation

const char* URuntimeClass::m_lpszClassName

Definition at line 38 of file uobject.h.

Referenced by UObject::CreateObject(), and URuntimeClass().

int URuntimeClass::m_nObjectSize

Definition at line 39 of file uobject.h.

Referenced by URuntimeClass().

UObject*(* URuntimeClass::m_pfnCreateObject)()

Referenced by CreateObject(), and URuntimeClass().

const URuntimeClass*(* URuntimeClass::m_pfnGetBaseClass)()

Referenced by IsDerivedFrom(), and URuntimeClass().

URuntimeClass* URuntimeClass::m_pNextClass

Definition at line 48 of file uobject.h.

Referenced by UObject::CreateObject(), URuntimeClass(), and ~URuntimeClass().

URuntimeClass * URuntimeClass::sAllURuntimeClass = 0L [static]

Definition at line 31 of file uobject.cpp.

Referenced by URuntimeClass(), and ~URuntimeClass().

The documentation for this class was generated from the following files:
  • rf/uobject.h
  • rf/uobject.cpp
Generated on Sat Aug 7 22:56:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSaveSettingsDlg Class Reference

CSaveSettingsDlg Class Reference

#include <SaveSettingsDlg.h>

Inheritance diagram for CSaveSettingsDlg:

[legend]
Collaboration diagram for CSaveSettingsDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_SAVESETTINGS }

Public Member Functions

CSaveSettingsDlg (const char *path, const char *oldname, CWnd *pParent=NULL)

Public Attributes

CButton | m_copyCheck
CSmartComboBox m_copyFromPathCombo
CString | m_settingName
CString | m_copyFrom
CString | m_path
BOOL | m_copy

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls and set help IDs.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.
afx_msg void | OnCopySettings ()
BN_CLICKED message handler, enable copy settings.

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 49 of file SaveSettingsDlg.h.
00049 { IDD = IDD_SAVESETTINGS };

Constructor & Destructor Documentation

CSaveSettingsDlg::CSaveSettingsDlg | ( | const char * | path,
 |  | const char * | oldname,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 45 of file SaveSettingsDlg.cpp.

References UStr::empty(), m_copy, m_copyFrom, m_path, m_settingName, and SplitPath().

00046 : m_copyFromPathCombo(USmartCombo::AutoDropWidth), CHHelpDialog(CSaveSettingsDlg::IDD, pParent)
00047 {
00048     UStr strOldName = oldname;
00049
00050     UStr defname;
00051     if( strOldName.empty() )
00052     {
00053         UStr uppath;
00054         SplitPath(path, uppath, defname);
00055     }
00056     else
00057         defname = oldname;
00058
00059     //{{AFX_DATA_INIT(CSaveSettingsDlg)
00060     m_settingName = defname;
00061     m_copyFrom = _T("");
00062     m_path = path;
00063     m_copy = FALSE;
00064     //}}AFX_DATA_INIT
00065 }

Here is the call graph for this function:

Member Function Documentation

void CSaveSettingsDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 68 of file SaveSettingsDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_COPY_SETTINGS, IDC_COPY_SETTINGS_NAME, IDC_PATH, IDC_SETTINGS_NAME, m_copy, m_copyCheck, m_copyFrom, m_copyFromPathCombo, m_path, and m_settingName.

00069 {
00070     CHHelpDialog::DoDataExchange(pDX);
00071     //{{AFX_DATA_MAP(CSaveSettingsDlg)
00072     DDX_Control(pDX, IDC_COPY_SETTINGS, m_copyCheck);
00073     DDX_Control(pDX, IDC_COPY_SETTINGS_NAME, m_copyFromPathCombo);
00074     DDX_Text(pDX, IDC_SETTINGS_NAME, m_settingName);
00075     DDX_CBString(pDX, IDC_COPY_SETTINGS_NAME, m_copyFrom);
00076     DDX_Text(pDX, IDC_PATH, m_path);
00077     DDX_Check(pDX, IDC_COPY_SETTINGS, m_copy);
00078     //}}AFX_DATA_MAP
00079 }

Here is the call graph for this function:

void CSaveSettingsDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 115 of file SaveSettingsDlg.cpp.

References IDC_COPY_SETTINGS, IDC_COPY_SETTINGS_NAME, IDC_PATH, IDC_SETTINGS_NAME, IDH_IDC_COPY_SETTINGS, IDH_IDC_COPY_SETTINGS_NAME, IDH_IDC_PATH, IDH_IDC_SETTINGS_NAME, and CHHelpSupport::SetCtrlHelpID().

00116 {
00117     SetCtrlHelpID(IDC_SETTINGS_NAME,        IDH_IDC_SETTINGS_NAME);
00118     SetCtrlHelpID(IDC_PATH,                 IDH_IDC_PATH);
00119     SetCtrlHelpID(IDC_COPY_SETTINGS,        IDH_IDC_COPY_SETTINGS);
00120     SetCtrlHelpID(IDC_COPY_SETTINGS_NAME,   IDH_IDC_COPY_SETTINGS_NAME);
00121 }

Here is the call graph for this function:

void CSaveSettingsDlg::OnCopySettings ( ) [protected]

BN_CLICKED message handler, enable copy settings.

Definition at line 130 of file SaveSettingsDlg.cpp.

References m_copyCheck, and m_copyFromPathCombo.

00131 {
00132     m_copyFromPathCombo.EnableWindow(m_copyCheck.GetCheck());
00133
00134     if( !m_copyCheck.GetCheck() )
00135     {
00136         m_copyFromPathCombo.SetCurSel(-1);
00137     }
00138 }

void CSaveSettingsDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 124 of file SaveSettingsDlg.cpp.

References CHHelpSupport::ShowHelp().

00125 {
00126     ShowHelp();
00127 }

Here is the call graph for this function:

BOOL CSaveSettingsDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls and set help IDs.

Reimplemented from CHHelpDialog.

Definition at line 93 of file SaveSettingsDlg.cpp.

References GetAllPersistentSettings(), and CHHelpDialog::OnInitDialog().

00094 {
00095     CHHelpDialog::OnInitDialog();
00096
00097     // Extra initialization
00098     // Fill the "copy from" combo
00099     std :: map<UStr, UStr> settingsList;
00100     if( GetAllPersistentSettings(settingsList) )
00101     {
00102         std::map<UStr, UStr>::const_iterator i;
00103         for(i = settingsList.begin(); i != settingsList.end(); ++i)
00104         {
00105             m_copyFromPathCombo.AddString((*i).first.c_str());
00106         }
00107     }
00108
00109     OnCopySettings();
00110
00111     return TRUE;  // return TRUE unless you set the focus to a control
00112                   // EXCEPTION: OCX Property Pages should return FALSE
00113 }

Here is the call graph for this function:

Member Data Documentation

BOOL CSaveSettingsDlg::m_copy

Definition at line 55 of file SaveSettingsDlg.h.

Referenced by AskCreatePersistentSettings(), CSaveSettingsDlg(), and DoDataExchange().

CButton CSaveSettingsDlg::m_copyCheck

Definition at line 50 of file SaveSettingsDlg.h.

Referenced by DoDataExchange(), and OnCopySettings().

CString CSaveSettingsDlg::m_copyFrom

Definition at line 53 of file SaveSettingsDlg.h.

Referenced by AskCreatePersistentSettings(), CSaveSettingsDlg(), and DoDataExchange().

CSmartComboBox CSaveSettingsDlg::m_copyFromPathCombo

Definition at line 51 of file SaveSettingsDlg.h.

Referenced by DoDataExchange(), and OnCopySettings().

CString CSaveSettingsDlg::m_path

Definition at line 54 of file SaveSettingsDlg.h.

Referenced by CSaveSettingsDlg(), and DoDataExchange().

CString CSaveSettingsDlg::m_settingName

Definition at line 52 of file SaveSettingsDlg.h.

Referenced by AskCreatePersistentSettings(), CSaveSettingsDlg(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/SaveSettingsDlg.h
  • common/SaveSettingsDlg.cpp
Generated on Sat Aug 7 22:56:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CScrollView Class Reference

CScrollView Class Reference

#include <UCvsGraph.h>

Inheritance diagram for CScrollView:

[legend]
List of all members.

Public Member Functions

UPoint GetDeviceScrollPosition ()
void InvalidateRect (const URECT *r)

Member Function Documentation

UPoint CScrollView::GetDeviceScrollPosition ( ) [inline]

Definition at line 38 of file UCvsGraph.h.

Referenced by CGraphRectTracker::OnChangedRect(), CGraphView::OnContextMenu(), CGraphView::OnLButtonDown(), and CWinLogData::SetSelected().

00038 { return UPoint(0, 0); }

void CScrollView::InvalidateRect ( const URECT * r ) [inline]

Definition at line 39 of file UCvsGraph.h.

Referenced by CWinLogData::SetSelected().

00039 {}

The documentation for this class was generated from the following file:
  • common/UCvsGraph.h
Generated on Sat Aug 7 22:56:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSelectionChangeNotifier Class Reference

CSelectionChangeNotifier Class Reference

#include <WinCvsBrowser.h>

Collaboration diagram for CSelectionChangeNotifier:

[legend]
List of all members.

Public Member Functions

CSelectionChangeNotifier (CWinCvsBrowser *view, bool notify)
virtual ~CSelectionChangeNotifier ()

Private Attributes

bool m_notify
bool m_wasLocked
CWinCvsBrowser * m_view

Detailed Description

Class to ensure that selection notification is properly issued
Note:
Constructor can be configured either to issue notification or discard it

Definition at line 43 of file WinCvsBrowser.h.

Constructor & Destructor Documentation

CSelectionChangeNotifier::CSelectionChangeNotifier | ( | CWinCvsBrowser * | view,
 |  | bool | notify
 | ) |

Definition at line 145 of file WinCvsBrowser.cpp.

References m_view, m_wasLocked, CWinCvsBrowser::SetSelectionChanged(), and CWinCvsBrowser::SetSelectionNotificationLocked().

00146     : m_notify(notify), m_view(view), m_wasLocked(view->GetSelectionNotificationLocked())
00147 {
00148     if( !m_wasLocked )
00149     {
00150         m_view->SetSelectionChanged(false);
00151         m_view->SetSelectionNotificationLocked(true);
00152     }
00153 }

Here is the call graph for this function:

CSelectionChangeNotifier::~CSelectionChangeNotifier ( ) [virtual]

Definition at line 155 of file WinCvsBrowser.cpp.

References m_notify, m_view, m_wasLocked, CWinCvsBrowser::NotifySelectionChange(), CWinCvsBrowser::SetSelectionChanged(), and CWinCvsBrowser::SetSelectionNotificationLocked().

00156 {
00157     m_view->SetSelectionNotificationLocked(m_wasLocked);
00158     if( !m_wasLocked )
00159     {
00160         if( m_notify )
00161         {
00162             m_view->NotifySelectionChange();
00163         }
00164
00165         m_view->SetSelectionChanged(false);
00166     }
00167 }

Here is the call graph for this function:

Member Data Documentation

bool CSelectionChangeNotifier::m_notify [private]

If true, the object will issue proper selection notification when going out of scope Definition at line 52 of file WinCvsBrowser.h.

Referenced by ~CSelectionChangeNotifier().

CWinCvsBrowser* CSelectionChangeNotifier::m_view [private]

View to change the state Definition at line 54 of file WinCvsBrowser.h.

Referenced by CSelectionChangeNotifier(), and ~CSelectionChangeNotifier().

bool CSelectionChangeNotifier::m_wasLocked [private]

Flag to indicate whether the view was already locked at the time of initialization Definition at line 53 of file WinCvsBrowser.h.

Referenced by CSelectionChangeNotifier(), and ~CSelectionChangeNotifier().

The documentation for this class was generated from the following files:
  • WinCvs/WinCvsBrowser.h
  • WinCvs/WinCvsBrowser.cpp
Generated on Sat Aug 7 22:56:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSelectionDetailsDlg Class Reference

CSelectionDetailsDlg Class Reference

#include <SelectionDetailsDlg.h>

Inheritance diagram for CSelectionDetailsDlg:

[legend]
Collaboration diagram for CSelectionDetailsDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_SELECTION_DETAILS }

Public Member Functions

CSelectionDetailsDlg (const MultiFiles *mf, const kSelDetType selDetType, const char *selection, CWnd *pParent=NULL)

Public Attributes

CButton | m_revisionCheck
CButton | m_fileNameCheck
CButton | m_pathCheck
CEdit | m_selectionEdit
CSpinButtonCtrl | m_revisionSpinCtrl
CListCtrl | m_selectionListCtrl
CString | m_selection
int m_selDetType

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initializes controls and displays data.
afx_msg void | OnDblclkSelectionlist (NMHDR *pNMHDR, LRESULT *pResult)
NM_DBLCLK message handler, select the item and close dialog.
afx_msg void | OnColumnclickSelectionlist (NMHDR *pNMHDR, LRESULT *pResult)
LVN_COLUMNCLICK message handler, sort items in response to column click.
afx_msg void | OnItemchangedSelectionlist (NMHDR *pNMHDR, LRESULT *pResult)
LVN_ITEMCHANGED message handler, update the item edit box value as selection is changing.
afx_msg void | OnDeltaposRevisionSpin (NMHDR *pNMHDR, LRESULT *pResult)
UDN_DELTAPOS notification handler, for the revision type move the revision up or down.
afx_msg void | OnFilename ()
BN_CLICKED message handler, update the controls.
afx_msg void | OnPath ()
BN_CLICKED message handler, update the controls.
afx_msg void | OnRevision ()
BN_CLICKED message handler, update the controls.
afx_msg void | OnDestroy ()
WM_DESTROY message handler, release any memory allocated.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()
void | DisplaySelection ()
void | DeleteAllItems ()
void | EnableControls ()
void | UpdateSelect (int item)
void | SortItems (int column, bool asc)

Static Private Member Functions

int CALLBACK | CompareItems (LPARAM itemData1, LPARAM itemData2, LPARAM lParam)

Private Attributes

const MultiFiles * | m_mf
bool m_sortAsc
int m_sortColumn
CSortHeaderCtrl m_headerCtrl

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 81 of file SelectionDetailsDlg.h.
00081 { IDD = IDD_SELECTION_DETAILS };

Constructor & Destructor Documentation

CSelectionDetailsDlg::CSelectionDetailsDlg | ( | const MultiFiles * | mf,
 |  | const kSelDetType | selDetType,
 |  | const char * | selection,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 133 of file SelectionDetailsDlg.cpp.

References m_selDetType, m_selection, m_sortAsc, and m_sortColumn.

00135     : m_mf(mf), CHHelpDialog(CSelectionDetailsDlg::IDD, pParent)
00136 {
00137     //{{AFX_DATA_INIT(CSelectionDetailsDlg)
00138     m_selection = selection;
00139     m_selDetType = selDetType;
00140     //}}AFX_DATA_INIT
00141
00142     m_sortAsc = false;
00143     m_sortColumn = 0;
00144 }

Member Function Documentation

int CALLBACK CSelectionDetailsDlg::CompareItems | ( | LPARAM | itemData1,
 |  | LPARAM | itemData2,
 |  | LPARAM | lParam
 | ) | [static, private]

Callback method used for sorting of items in the list control

Parameters:
itemData1 | SelectionDisplayInfo* of the first element
itemData2 | SelectionDisplayInfo* of the second element
lParam | CompareInfo* Sort settings
Returns:
1, -1 or 0 depending on the sort settings
Definition at line 89 of file SelectionDetailsDlg.cpp.

References SelectionDisplayInfo::GetFileName(), SelectionDisplayInfo::GetPath(), SelectionDisplayInfo::GetRevision(), CSelectionDetailsDlg::CompareInfo::m_asc, and CSelectionDetailsDlg::CompareInfo::m_column.

Referenced by SortItems().

00090 {
00091     int res = 0;
00092
00093     const CompareInfo* info = (CompareInfo*)lParam;
00094     if( info )
00095     {
00096         SelectionDisplayInfo* displayInfo1 = (SelectionDisplayInfo*)itemData1;
00097         SelectionDisplayInfo* displayInfo2 = (SelectionDisplayInfo*)itemData2;
00098
00099         if( displayInfo1 && displayInfo2 )
00100         {
00101             switch( info->m_column )
00102             {
00103             case 0:
00104                 res = stricmp(displayInfo1->GetFileName().c_str(), displayInfo2->GetFileName().c_str());
00105                 break;
00106             case 1:
00107                 res = stricmp(displayInfo1->GetRevision().c_str(), displayInfo2->GetRevision().c_str());
00108                 break;
00109             case 2:
00110                 res = stricmp(displayInfo1->GetPath().c_str(), displayInfo2->GetPath().c_str());
00111                 break;
00112             default:
00113                 ASSERT(FALSE); // should not come here
00114                 break;
00115             }
00116         }
00117     }
00118
00119     if( res )
00120     {
00121         if( info->m_asc )
00122         {
00123             res *= -1;
00124         }
00125     }
00126
00127     return res;
00128 }

Here is the call graph for this function:

void CSelectionDetailsDlg::DeleteAllItems ( ) [private]

Remove all items and release associated memory held in Item Data of the list control Definition at line 309 of file SelectionDetailsDlg.cpp.

References m_selectionListCtrl.

Referenced by OnDestroy().

00310 {
00311     for(int nIndex = 0; nIndex < m_selectionListCtrl.GetItemCount(); nIndex++)
00312     {
00313         SelectionDisplayInfo* displayInfo = (SelectionDisplayInfo*)m_selectionListCtrl.GetItemData(nIndex);
00314         delete displayInfo;
00315     }
00316
00317     m_selectionListCtrl.DeleteAllItems();
00318 }

void CSelectionDetailsDlg::DisplaySelection ( ) [private]

Insert columns and display the selection items Definition at line 226 of file SelectionDetailsDlg.cpp.

References MultiFiles::begin(), MultiFiles::const_iterator, SelectionDisplayInfo::Create(), CStr, MultiFiles::end(), MultiFiles::getdir(), m_mf, m_selectionListCtrl, MultiFiles::NumDirs(), and MultiFiles::TotalNumFiles().

00227 {
00228     CWndRedrawMngr redrawMngr(&m_selectionListCtrl);
00229
00230     // Get the client area width to properly size columns
00231     CRect rect;
00232     m_selectionListCtrl.GetClientRect(rect);
00233
00234     const int listCtrlWidth = rect.Width();
00235     const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
00236
00237     // Insert columns
00238     m_selectionListCtrl.InsertColumn(0, ColumnIndex::GetColumnName(ColumnIndex::kName, false), LVCFMT_LEFT, 200);
00239     m_selectionListCtrl.InsertColumn(1, ColumnIndex::GetColumnName(ColumnIndex::kRevision, false), LVCFMT_LEFT, 60);
00240     m_selectionListCtrl.InsertColumn(2, ColumnIndex::GetColumnName(ColumnIndex::kPath, false), LVCFMT_LEFT, listCtrlWidthNoScroll - 60 - 200);
00241
00242     // The browser selection
00243     if( m_mf )
00244     {
00245         if( m_mf->TotalNumFiles() )
00246         {
00247             MultiFiles::const_iterator mfi;
00248             for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
00249             {
00250                 for(int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++)
00251                 {
00252                     CStr fileName;
00253                     CStr currRev;
00254                     CStr path;
00255
00256                     if( mfi->get(nIndex, path, fileName, currRev) )
00257                     {
00258                         const int itemIndex = m_selectionListCtrl.InsertItem(m_selectionListCtrl.GetItemCount(), fileName.c_str());
00259                         if( itemIndex > -1 )
00260                         {
00261                             m_selectionListCtrl.SetItemText(itemIndex, 1, currRev.c_str());
00262                             m_selectionListCtrl.SetItemText(itemIndex, 2, path.c_str());
00263
00264                             SelectionDisplayInfo* displayInfo = new SelectionDisplayInfo;
00265                             if( displayInfo )
00266                             {
00267                                 displayInfo->Create(string(fileName.c_str()), string(currRev.c_str()), string(path.c_str()));
00268                                 if( !m_selectionListCtrl.SetItemData(itemIndex, (DWORD)displayInfo) )
00269                                 {
00270                                     delete displayInfo;
00271                                 }
00272                             }
00273                         }
00274                     }
00275                 }
00276             }
00277         }
00278         else if( m_mf->NumDirs() )
00279         {
00280             for(int nIndex = 0; nIndex < m_mf->NumDirs(); nIndex++)
00281             {
00282                 CStr path;
00283                 if( m_mf->getdir(nIndex, path) )
00284                 {
00285                     const int itemIndex = m_selectionListCtrl.InsertItem(m_selectionListCtrl.GetItemCount(), "");
00286                     if( itemIndex > -1 )
00287                     {
00288                         m_selectionListCtrl.SetItemText(itemIndex, 2, path.c_str());
00289
00290                         SelectionDisplayInfo* displayInfo = new SelectionDisplayInfo;
00291                         if( displayInfo )
00292                         {
00293                             displayInfo->Create(string(""), string(""), string(path.c_str()));
00294                             if( !m_selectionListCtrl.SetItemData(itemIndex, (DWORD)displayInfo) )
00295                             {
00296                                 delete displayInfo;
00297                             }
00298                         }
00299                     }
00300                 }
00301             }
00302         }
00303     }
00304 }

Here is the call graph for this function:

void CSelectionDetailsDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 147 of file SelectionDetailsDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_FILENAME, IDC_FILEPATH, IDC_REVISION, IDC_REVISION_SPIN, IDC_SELECTION, IDC_SELECTION_LIST, m_fileNameCheck, m_pathCheck, m_revisionCheck, m_revisionSpinCtrl, m_selDetType, m_selection, m_selectionEdit, and m_selectionListCtrl.

00148 {
00149     CHHelpDialog::DoDataExchange(pDX);
00150     //{{AFX_DATA_MAP(CSelectionDetailsDlg)
00151     DDX_Control(pDX, IDC_REVISION, m_revisionCheck);
00152     DDX_Control(pDX, IDC_FILENAME, m_fileNameCheck);
00153     DDX_Control(pDX, IDC_FILEPATH, m_pathCheck);
00154     DDX_Control(pDX, IDC_SELECTION, m_selectionEdit);
00155     DDX_Control(pDX, IDC_REVISION_SPIN, m_revisionSpinCtrl);
00156     DDX_Control(pDX, IDC_SELECTION_LIST, m_selectionListCtrl);
00157     DDX_Text(pDX, IDC_SELECTION, m_selection);
00158     DDX_Radio(pDX, IDC_FILENAME, m_selDetType);
00159     //}}AFX_DATA_MAP
00160 }

Here is the call graph for this function:

void CSelectionDetailsDlg::EnableControls ( ) [private]

Enable/disable controls Definition at line 449 of file SelectionDetailsDlg.cpp.

References m_revisionCheck, and m_revisionSpinCtrl.

Referenced by OnFilename(), OnPath(), and OnRevision().

00450 {
00451     m_revisionSpinCtrl.EnableWindow(m_revisionCheck.GetCheck());
00452 }

void CSelectionDetailsDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 207 of file SelectionDetailsDlg.cpp.

References IDC_FILENAME, IDC_FILEPATH, IDC_REVISION, IDC_REVISION_SPIN, IDC_SELECTION, IDC_SELECTION_LIST, IDH_IDC_FILENAME, IDH_IDC_FILEPATH, IDH_IDC_REVISION, IDH_IDC_REVISION_SPIN, IDH_IDC_SELECTION, IDH_IDC_SELECTION_LIST, and CHHelpSupport::SetCtrlHelpID().

00208 {
00209     SetCtrlHelpID(IDC_SELECTION,        IDH_IDC_SELECTION);
00210     SetCtrlHelpID(IDC_REVISION_SPIN,    IDH_IDC_REVISION_SPIN);
00211     SetCtrlHelpID(IDC_FILENAME,         IDH_IDC_FILENAME);
00212     SetCtrlHelpID(IDC_REVISION,         IDH_IDC_REVISION);
00213     SetCtrlHelpID(IDC_FILEPATH,         IDH_IDC_FILEPATH);
00214     SetCtrlHelpID(IDC_SELECTION_LIST,   IDH_IDC_SELECTION_LIST);
00215 }

Here is the call graph for this function:

void CSelectionDetailsDlg::OnColumnclickSelectionlist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_COLUMNCLICK message handler, sort items in response to column click.

Definition at line 341 of file SelectionDetailsDlg.cpp.

References m_sortAsc, m_sortColumn, and SortItems().

00342 {
00343     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00344
00345     if( m_sortColumn != pNMListView->iSubItem )
00346     {
00347         m_sortAsc = false;
00348     }
00349     else
00350     {
00351         m_sortAsc = !m_sortAsc;
00352     }
00353
00354     m_sortColumn = pNMListView->iSubItem;
00355
00356     SortItems(m_sortColumn, m_sortAsc);
00357
00358     *pResult = 0;
00359 }

Here is the call graph for this function:

void CSelectionDetailsDlg::OnDblclkSelectionlist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

NM_DBLCLK message handler, select the item and close dialog.

Definition at line 329 of file SelectionDetailsDlg.cpp.

00330 {
00331     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00332     if( pNMListView->iItem > -1 )
00333     {
00334         OnOK();
00335     }
00336
00337     *pResult = 0;
00338 }

void CSelectionDetailsDlg::OnDeltaposRevisionSpin | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

UDN_DELTAPOS notification handler, for the revision type move the revision up or down.

Definition at line 393 of file SelectionDetailsDlg.cpp.

References m_revisionCheck, and m_selectionEdit.

00394 {
00395     NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00396
00397     if( m_revisionCheck.GetCheck() )
00398     {
00399         CString selection;
00400         m_selectionEdit.GetWindowText(selection);
00401
00402         const int dotPos = selection.ReverseFind('.');
00403         if( dotPos > 0 && dotPos < selection.GetLength() - 1 )
00404         {
00405             CString revLast = selection.Mid(dotPos + 1);
00406             int revLastNum = atoi(revLast);
00407             if( revLastNum > 0 )
00408             {
00409                 revLastNum += pNMUpDown->iDelta;
00410                 if( revLastNum > 0 )
00411                 {
00412                     revLast.Format("%d", revLastNum);
00413                     selection = selection.Left(dotPos + 1) + revLast;
00414
00415                     m_selectionEdit.SetWindowText(selection);
00416                 }
00417             }
00418         }
00419     }
00420
00421     // We do not allow to change position
00422     *pResult = 1;
00423 }

void CSelectionDetailsDlg::OnDestroy ( ) [protected]

WM_DESTROY message handler, release any memory allocated.

Definition at line 321 of file SelectionDetailsDlg.cpp.

References DeleteAllItems().

00322 {
00323     DeleteAllItems();
00324
00325     CHHelpDialog::OnDestroy();
00326 }

Here is the call graph for this function:

void CSelectionDetailsDlg::OnFilename ( ) [protected]

BN_CLICKED message handler, update the controls.

Definition at line 426 of file SelectionDetailsDlg.cpp.

References EnableControls(), and UpdateSelect().

00427 {
00428     EnableControls();
00429     UpdateSelect(-1);
00430 }

Here is the call graph for this function:

void CSelectionDetailsDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 218 of file SelectionDetailsDlg.cpp.

References CHHelpSupport::ShowHelp().

00219 {
00220     ShowHelp();
00221 }

Here is the call graph for this function:

BOOL CSelectionDetailsDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initializes controls and displays data.

Reimplemented from CHHelpDialog.

Definition at line 181 of file SelectionDetailsDlg.cpp.

References CHHelpDialog::OnInitDialog(), and SetListCtrlExtendedStyle().

00182 {
00183     CHHelpDialog::OnInitDialog();
00184
00185     // Extra initialization
00186     // Initialize controls
00187     SetListCtrlExtendedStyle(&m_selectionListCtrl, LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
00188
00189     m_revisionSpinCtrl.SetRange(0, 100);
00190
00191     // Setup controls
00192     CHeaderCtrl* headerCtrl = m_selectionListCtrl.GetHeaderCtrl();
00193     if( headerCtrl )
00194     {
00195         m_headerCtrl.SubclassWindow(headerCtrl->m_hWnd);
00196     }
00197
00198     EnableControls();
00199
00200     // Display items
00201     DisplaySelection();
00202
00203     return TRUE;  // return TRUE unless you set the focus to a control
00204                   // EXCEPTION: OCX Property Pages should return FALSE
00205 }

Here is the call graph for this function:

void CSelectionDetailsDlg::OnItemchangedSelectionlist | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_ITEMCHANGED message handler, update the item edit box value as selection is changing.

Definition at line 380 of file SelectionDetailsDlg.cpp.

References UpdateSelect().

00381 {
00382     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00383     if( pNMListView->iItem > -1 &&
00384         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
00385     {
00386         UpdateSelect(pNMListView->iItem);
00387     }
00388
00389     *pResult = 0;
00390 }

Here is the call graph for this function:

void CSelectionDetailsDlg::OnPath ( ) [protected]

BN_CLICKED message handler, update the controls.

Definition at line 433 of file SelectionDetailsDlg.cpp.

References EnableControls(), and UpdateSelect().

00434 {
00435     EnableControls();
00436     UpdateSelect(-1);
00437 }

Here is the call graph for this function:

void CSelectionDetailsDlg::OnRevision ( ) [protected]

BN_CLICKED message handler, update the controls.

Definition at line 440 of file SelectionDetailsDlg.cpp.

References EnableControls(), and UpdateSelect().

00441 {
00442     EnableControls();
00443     UpdateSelect(-1);
00444 }

Here is the call graph for this function:

void CSelectionDetailsDlg::SortItems | ( | int | column,
 |  | bool | asc
 | ) | [private]

Sort items listed in the list control

Parameters:
column | Column to sort items by
asc | Sort ascending or descending
Note:
Using list control callback CompareItems
Definition at line 367 of file SelectionDetailsDlg.cpp.

References CompareItems(), CSelectionDetailsDlg::CompareInfo::m_asc, CSelectionDetailsDlg::CompareInfo::m_column, m_headerCtrl, m_selectionListCtrl, and CSortHeaderCtrl::SetSortImage().

Referenced by OnColumnclickSelectionlist().

00368 {
00369     m_headerCtrl.SetSortImage(column, asc);
00370
00371     CompareInfo info = { 0 };
00372
00373     info.m_column = column;
00374     info.m_asc = asc;
00375
00376     m_selectionListCtrl.SortItems(CompareItems, (DWORD)&info);
00377 }

Here is the call graph for this function:

void CSelectionDetailsDlg::UpdateSelect ( int item ) [private]

Update the select edit box to the data from given list item

Parameters:
item Item to update to, -1 to update to the currently selected item
Definition at line 458 of file SelectionDetailsDlg.cpp.

References m_pathCheck, m_revisionCheck, m_selectionEdit, and m_selectionListCtrl.

Referenced by OnFilename(), OnItemchangedSelectionlist(), OnPath(), and OnRevision().

00459 {
00460     if( item < 0 )
00461     {
00462         // Get the currently selected item
00463         POSITION pos = m_selectionListCtrl.GetFirstSelectedItemPosition();
00464         if( pos )
00465         {
00466             item = m_selectionListCtrl.GetNextSelectedItem(pos);
00467         }
00468     }
00469
00470     if( item > -1 && item < m_selectionListCtrl.GetItemCount() )
00471     {
00472         // Update the select edit box
00473         int subItem = 0;
00474
00475         if( m_revisionCheck.GetCheck() )
00476         {
00477             subItem = 1;
00478         }
00479         else if( m_pathCheck.GetCheck() )
00480         {
00481             subItem = 2;
00482         }
00483
00484         m_selectionEdit.SetWindowText(m_selectionListCtrl.GetItemText(item, subItem));
00485     }
00486 }

Member Data Documentation

CButton CSelectionDetailsDlg::m_fileNameCheck

Definition at line 83 of file SelectionDetailsDlg.h.

Referenced by DoDataExchange().

CSortHeaderCtrl CSelectionDetailsDlg::m_headerCtrl [private]

Definition at line 141 of file SelectionDetailsDlg.h.

Referenced by SortItems().

const MultiFiles* CSelectionDetailsDlg::m_mf [private]

Browser selection Definition at line 119 of file SelectionDetailsDlg.h.

Referenced by DisplaySelection().

CButton CSelectionDetailsDlg::m_pathCheck

Definition at line 84 of file SelectionDetailsDlg.h.

Referenced by DoDataExchange(), and UpdateSelect().

CButton CSelectionDetailsDlg::m_revisionCheck

Definition at line 82 of file SelectionDetailsDlg.h.

Referenced by DoDataExchange(), EnableControls(), OnDeltaposRevisionSpin(), and UpdateSelect().

CSpinButtonCtrl CSelectionDetailsDlg::m_revisionSpinCtrl

Definition at line 86 of file SelectionDetailsDlg.h.

Referenced by DoDataExchange(), and EnableControls().

int CSelectionDetailsDlg::m_selDetType

Definition at line 89 of file SelectionDetailsDlg.h.

Referenced by CSelectionDetailsDlg(), and DoDataExchange().

CString CSelectionDetailsDlg::m_selection

Definition at line 88 of file SelectionDetailsDlg.h.

Referenced by CSelectionDetailsDlg(), and DoDataExchange().

CEdit CSelectionDetailsDlg::m_selectionEdit

Definition at line 85 of file SelectionDetailsDlg.h.

Referenced by DoDataExchange(), OnDeltaposRevisionSpin(), and UpdateSelect().

CListCtrl CSelectionDetailsDlg::m_selectionListCtrl

Definition at line 87 of file SelectionDetailsDlg.h.

Referenced by DeleteAllItems(), DisplaySelection(), DoDataExchange(), SortItems(), and UpdateSelect().

bool CSelectionDetailsDlg::m_sortAsc [private]

Current ascending/descending sorting Definition at line 139 of file SelectionDetailsDlg.h.

Referenced by CSelectionDetailsDlg(), and OnColumnclickSelectionlist().

int CSelectionDetailsDlg::m_sortColumn [private]

Current sort column Definition at line 140 of file SelectionDetailsDlg.h.

Referenced by CSelectionDetailsDlg(), and OnColumnclickSelectionlist().

The documentation for this class was generated from the following files:
  • common/SelectionDetailsDlg.h
  • common/SelectionDetailsDlg.cpp
Generated on Sat Aug 7 22:56:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSelectionDetailsDlg::CompareInfo Struct Reference

CSelectionDetailsDlg::CompareInfo Struct Reference

Structure to hold the sorting settings. More...

Collaboration diagram for CSelectionDetailsDlg::CompareInfo:

[legend]
List of all members.

Public Attributes

int m_column
bool m_asc

Detailed Description

Structure to hold the sorting settings.

Definition at line 133 of file SelectionDetailsDlg.h.

Member Data Documentation

bool CSelectionDetailsDlg::CompareInfo::m_asc

Sort ascending or descending Definition at line 136 of file SelectionDetailsDlg.h.

Referenced by CSelectionDetailsDlg::CompareItems(), and CSelectionDetailsDlg::SortItems().

int CSelectionDetailsDlg::CompareInfo::m_column

Sorting column Definition at line 135 of file SelectionDetailsDlg.h.

Referenced by CSelectionDetailsDlg::CompareItems(), and CSelectionDetailsDlg::SortItems().

The documentation for this struct was generated from the following file:
  • common/SelectionDetailsDlg.h
Generated on Sat Aug 7 22:56:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: SelectionDisplayInfo Class Reference

SelectionDisplayInfo Class Reference

Class to hold and support data display (e.g. sorting). More...

#include <SelectionDetailsDlg.h>

Collaboration diagram for SelectionDisplayInfo:

[legend]
List of all members.

Public Member Functions

void | Create (const string &fileName, const string &revision, const string &path)
const string & | GetFileName () const
Get filename.
const string & | GetRevision () const
Get revision.
const string & | GetPath () const
Get path.

Private Attributes

string | m_fileName
string | m_revision
string | m_path

Detailed Description

Class to hold and support data display (e.g. sorting).

Definition at line 52 of file SelectionDetailsDlg.h.

Member Function Documentation

void SelectionDisplayInfo::Create | ( | const string & | fileName,
 |  | const string & | revision,
 |  | const string & | path
 | ) |

Create display info

Parameters:
fileName | Filename
revision | Revision
path | Path
Definition at line 56 of file SelectionDetailsDlg.cpp.

References m_fileName, m_path, and m_revision.

Referenced by CSelectionDetailsDlg::DisplaySelection().

00057 {
00058     m_fileName = fileName;
00059     m_revision = revision;
00060     m_path = path;
00061 }

const string & SelectionDisplayInfo::GetFileName ( ) const

Get filename.

Definition at line 64 of file SelectionDetailsDlg.cpp.

References m_fileName.

Referenced by CSelectionDetailsDlg::CompareItems().

00065 {
00066     return m_fileName;
00067 }

const string & SelectionDisplayInfo::GetPath ( ) const

Get path.

Definition at line 76 of file SelectionDetailsDlg.cpp.

References m_path.

Referenced by CSelectionDetailsDlg::CompareItems().

00077 {
00078     return m_path;
00079 }

const string & SelectionDisplayInfo::GetRevision ( ) const

Get revision.

Definition at line 70 of file SelectionDetailsDlg.cpp.

References m_revision.

Referenced by CSelectionDetailsDlg::CompareItems().

00071 {
00072     return m_revision;
00073 }

Member Data Documentation

string SelectionDisplayInfo::m_fileName [private]

Filename Definition at line 56 of file SelectionDetailsDlg.h.

Referenced by Create(), and GetFileName().

string SelectionDisplayInfo::m_path [private]

Path Definition at line 58 of file SelectionDetailsDlg.h.

Referenced by Create(), and GetPath().

string SelectionDisplayInfo::m_revision [private]

Revision Definition at line 57 of file SelectionDetailsDlg.h.

Referenced by Create(), and GetRevision().

The documentation for this class was generated from the following files:
  • common/SelectionDetailsDlg.h
  • common/SelectionDetailsDlg.cpp
Generated on Sat Aug 7 22:56:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: USemaphore Class Reference

USemaphore Class Reference

#include <umain.h>

Collaboration diagram for USemaphore:

[legend]
List of all members.

Public Member Functions

USemaphore (bool &semaphore)
~USemaphore ()
bool IsEnteredTwice () const

Protected Attributes

bool & m_semaphore
bool m_didSetSemaphore
bool m_enteredTwice

Constructor & Destructor Documentation

USemaphore::USemaphore ( bool & semaphore ) [inline]

Definition at line 803 of file umain.h.

References m_didSetSemaphore, m_enteredTwice, and m_semaphore.

00803                                  : m_semaphore(semaphore), m_didSetSemaphore(false),
00804         m_enteredTwice(false)
00805     {
00806         if(m_semaphore)
00807         {
00808             m_enteredTwice = true;
00809             return;
00810         }
00811         m_semaphore = true;
00812         m_didSetSemaphore = true;
00813     }

USemaphore::~USemaphore ( ) [inline]

Definition at line 815 of file umain.h.

References m_didSetSemaphore, and m_semaphore.

00816     {
00817         if(m_didSetSemaphore)
00818             m_semaphore = false;
00819     }

Member Function Documentation

bool USemaphore::IsEnteredTwice ( ) const [inline]

Definition at line 821 of file umain.h.

References m_enteredTwice.

Referenced by FileTraverse(), UToolbar::OnCommands(), UMenu::OnCommands(), UWidget::OnInitWidget(), UCvsFolders::OnTreeExpanding(), UToolbar::OnUpdateUI(), UMenu::OnUpdateUI(), UMacAppMenu::OnUpdateUI(), and UCvsFiles::ResetView().

00821 { return m_enteredTwice; }

Member Data Documentation

bool USemaphore::m_didSetSemaphore [protected]

Definition at line 825 of file umain.h.

Referenced by USemaphore(), and ~USemaphore().

bool USemaphore::m_enteredTwice [protected]

Definition at line 826 of file umain.h.

Referenced by IsEnteredTwice(), and USemaphore().

bool& USemaphore::m_semaphore [protected]

Definition at line 824 of file umain.h.

Referenced by USemaphore(), and ~USemaphore().

The documentation for this class was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:56:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: USize Class Reference

USize Class Reference

#include <udraw.h>

Inheritance diagram for USize:

[legend]
Collaboration diagram for USize:

[legend]
List of all members.

Public Member Functions

USize ()
USize (int initCX, int initCY)
USize (USIZE initSize)
USize (UPOINT initPt)
bool | operator== (USIZE size) const
bool | operator!= (USIZE size) const
void | operator+= (USIZE size)
void | operator-= (USIZE size)
USize | operator+ (USIZE size) const
USize | operator- (USIZE size) const
USize | operator- () const
UPoint | operator+ (UPOINT point) const
UPoint | operator- (UPOINT point) const
URect | operator+ (const URECT *lpRect) const
URect | operator- (const URECT *lpRect) const

Constructor & Destructor Documentation

USize::USize ( ) [inline]

Definition at line 250 of file udraw.h.

Referenced by operator+(), and operator-().

00251     { /* random filled */ }

USize::USize | ( | int | initCX,
 |  | int | initCY
 | ) | [inline]

Definition at line 252 of file udraw.h.

00253     { cx = initCX; cy = initCY; }

USize::USize ( USIZE initSize ) [inline]

Definition at line 254 of file udraw.h.

00255     { *(USIZE*)this = initSize; }

USize::USize ( UPOINT initPt ) [inline]

Definition at line 256 of file udraw.h.

00257     { *(UPOINT*)this = initPt; }

Member Function Documentation

bool USize::operator!= ( USIZE size ) const [inline]

Definition at line 260 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00261     { return (cx != size.cx || cy != size.cy); }

URect USize::operator+ ( const URECT * lpRect ) const [inline]

Definition at line 276 of file udraw.h.

00277     { return URect(lpRect) + *this; }

UPoint USize::operator+ ( UPOINT point ) const [inline]

Definition at line 272 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00273     { return UPoint(cx + point.x, cy + point.y); }

USize USize::operator+ ( USIZE size ) const [inline]

Definition at line 266 of file udraw.h.

References USIZE::cx, USIZE::cy, and USize().

00267     { return USize(cx + size.cx, cy + size.cy); }

Here is the call graph for this function:

void USize::operator+= ( USIZE size ) [inline]

Definition at line 262 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00263     { cx += size.cx; cy += size.cy; }

URect USize::operator- ( const URECT * lpRect ) const [inline]

Definition at line 278 of file udraw.h.

00279     { return URect(lpRect) - *this; }

UPoint USize::operator- ( UPOINT point ) const [inline]

Definition at line 274 of file udraw.h.

References UPOINT::x, and UPOINT::y.

00275     { return UPoint(cx - point.x, cy - point.y); }

USize USize::operator- ( ) const [inline]

Definition at line 270 of file udraw.h.

References USize().

00271     { return USize(-cx, -cy); }

Here is the call graph for this function:

USize USize::operator- ( USIZE size ) const [inline]

Definition at line 268 of file udraw.h.

References USIZE::cx, USIZE::cy, and USize().

00269     { return USize(cx - size.cx, cy - size.cy); }

Here is the call graph for this function:

void USize::operator-= ( USIZE size ) [inline]

Definition at line 264 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00265     { cx -= size.cx; cy -= size.cy; }

bool USize::operator== ( USIZE size ) const [inline]

Definition at line 258 of file udraw.h.

References USIZE::cx, and USIZE::cy.

00259     { return (cx == size.cx && cy == size.cy); }

The documentation for this class was generated from the following file:
  • rf/udraw.h
Generated on Sat Aug 7 22:56:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: USIZE Struct Reference

USIZE Struct Reference

#include <umain.h>

Inheritance diagram for USIZE:

[legend]
Collaboration diagram for USIZE:

[legend]
List of all members.

Public Attributes

int cx
int cy

Member Data Documentation

int USIZE::cx

Definition at line 974 of file umain.h.

Referenced by CWinLogData::ComputeBounds(), URect::DeflateRect(), CWinLogRevData::GetBoundsSelf(), UDC::GetTextExtent(), URect::InflateRect(), UPoint::Offset(), URect::OffsetRect(), USize::operator!=(), URect::operator+(), UPoint::operator+(), USize::operator+(), URect::operator+=(), UPoint::operator+=(), USize::operator+=(), URect::operator-(), UPoint::operator-(), USize::operator-(), URect::operator-=(), UPoint::operator-=(), USize::operator-=(), USize::operator==(), UDC::TextOutClipped(), and URect::URect().

int USIZE::cy

Definition at line 974 of file umain.h.

Referenced by CWinLogData::ComputeBounds(), URect::DeflateRect(), CWinLogRevData::GetBoundsSelf(), UDC::GetTextExtent(), URect::InflateRect(), UPoint::Offset(), URect::OffsetRect(), USize::operator!=(), URect::operator+(), UPoint::operator+(), USize::operator+(), URect::operator+=(), UPoint::operator+=(), USize::operator+=(), URect::operator-(), UPoint::operator-(), USize::operator-(), URect::operator-=(), UPoint::operator-=(), USize::operator-=(), USize::operator==(), UDC::TextOutClipped(), and URect::URect().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:56:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: USLIDER Struct Reference

USLIDER Struct Reference

#include <umain.h>

Collaboration diagram for USLIDER:

[legend]
List of all members.

Public Attributes

int max
int min
int inc
int pos

Member Data Documentation

int USLIDER::inc

Definition at line 962 of file umain.h.

Referenced by UWidget::OnGetSliderProperty(), and UWidget::OnSetSliderProperty().

int USLIDER::max

Definition at line 960 of file umain.h.

Referenced by UWidget::OnGetSliderProperty(), and UWidget::OnSetSliderProperty().

int USLIDER::min

Definition at line 961 of file umain.h.

Referenced by UWidget::OnGetSliderProperty(), and UWidget::OnSetSliderProperty().

int USLIDER::pos

Definition at line 963 of file umain.h.

Referenced by UWidget::OnGetSliderProperty(), and UWidget::OnSetSliderProperty().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:56:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: USmartCombo Class Reference

USmartCombo Class Reference

#include <SmartComboBox.h>

Inheritance diagram for USmartCombo:

[legend]
Collaboration diagram for USmartCombo:

[legend]
List of all members.

Public Types

enum Feature {
None = 0x00,
AutoDropWidth = 0x01,
RemoveItems = 0x02,
ReadOnly = 0x04,
Keyword = 0x10,
DefaultFeature = AutoDropWidth | RemoveItems
}
Feature enum. More...

Public Member Functions

USmartCombo (int feature)
Constructor.
virtual | ~USmartCombo ()
Destructor.
void | SetFeature (int feature)
bool | HasFeature (int feature) const
void | SetItems (CMString *pstrItems)
CMString * GetItems ()
void | SetKeyword (const char *keyword)
UStr | GetKeyword () const
virtual int | CalcDroppedWidth ()
virtual void | SetReadOnly (bool readOnly=true)
virtual bool | RemoveItem (const char *strItem)

Private Attributes

int m_feature
CMString * m_pstrItems
UStr m_keyword

Detailed Description

Abstract class for Smart Combo Box (CSmartComboBox)

Use as a base class to derive the Smart Combo Box for different platforms

Note:
To set the desired features support by Smart Combo Box objects use the combinations of values enumerated under USmartCombo::Feature

Definition at line 42 of file SmartComboBox.h.

Member Enumeration Documentation

enum USmartCombo::Feature

Feature enum.

Enum to specify the desired features for Smart Combo Box object

Enumeration values:
None | No features, just standard Combo Box.
AutoDropWidth | Automatically adjust the width of the drop-down list to fit the long items.
RemoveItems | Allows to remove items from combo boxes containing previous values.
ReadOnly | Make the edit portion of combo box read-only (while still allowing to change the selection it prevents from typing those and copy it's values).
Keyword | Indicates that combo box items are keywords or multi-keywords
DefaultFeature | Default combination of features passed to the Smart Combo Box constructor.
Definition at line 57 of file SmartComboBox.h.
00057                 {
00058         None =          0x00,
00059         AutoDropWidth = 0x01,
00060         RemoveItems =   0x02,
00061         ReadOnly =      0x04,
00062         Keyword =       0x10,
00063         //
00064         DefaultFeature = AutoDropWidth | RemoveItems
00065     };

Constructor & Destructor Documentation

USmartCombo::USmartCombo ( int feature )

Constructor.

Definition at line 45 of file SmartComboBox.cpp.

References m_pstrItems, and NULL.

00046     : m_feature(feature)
00047 {
00048     m_pstrItems = NULL;
00049 }

USmartCombo::~USmartCombo ( ) [virtual]

Destructor.

Definition at line 52 of file SmartComboBox.cpp.

00053 {
00054 }

Member Function Documentation

int USmartCombo::CalcDroppedWidth ( ) [virtual]

Calculate the width of the dropped items list to fit all items

Returns:
The width of the dropped items list
Note:
The default implementation does nothing, you should override that method to perform the real calculation

Reimplemented in CSmartComboBox, and CHistComboBoxEx.

Definition at line 133 of file SmartComboBox.cpp.

00134 {
00135     return 0;
00136 }

CMString * USmartCombo::GetItems ( )

Get the items persistent collection

Returns:
pointer to CMString that contains the items persistent collection, can be NULL
Note:
Used to populate combo box in DDX routine etc.
Definition at line 103 of file SmartComboBox.cpp.

References m_pstrItems.

Referenced by DDX_ComboMString(), CHistComboBoxEx::DelKeyTest(), CSmartComboBox::DelKeyTest(), CHistComboBoxEx::NewRoot(), and RemoveItem().

00104 {
00105     return m_pstrItems;
00106 }

UStr USmartCombo::GetKeyword ( ) const

Get the keyword

Returns:
The keyword string
Definition at line 123 of file SmartComboBox.cpp.

References CStr, and m_keyword.

Referenced by DDX_ComboMString(), and RemoveItem().

00124 {
00125     return m_keyword;
00126 }

bool USmartCombo::HasFeature ( int feature ) const

Test whether the feature is supported

Parameters:
feature Feature pattern to be tested
Returns:
true if the feature is set, false otherwise
Definition at line 72 of file SmartComboBox.cpp.

References m_feature.

Referenced by DDX_ComboMString(), CHistComboBoxEx::OnDropdown(), CSmartComboBox::PreSubclassWindow(), CHistComboBoxEx::PreTranslateMessage(), CSmartComboBox::PreTranslateMessage(), and RemoveItem().

00073 {
00074     return (m_feature & feature) != 0;
00075 }

bool USmartCombo::RemoveItem ( const char * strItem ) [virtual]

Remove the item from the list

Parameters:
strItem Item to be removed
Returns:
true if item removed, false otherwise
Note:
Prompts the user before removing the item
Definition at line 161 of file SmartComboBox.cpp.

References _i18n, BUTTONTITLE_NO, BUTTONTITLE_YES, TKeyString< delimiter >::Concatenate(), CStr, GetItems(), GetKeyword(), TMString< T >::GetList(), HasFeature(), kCvsAlertOKButton, kCvsAlertQuestionIcon, m_pstrItems, TMString< T >::Remove(), and TKeyString< delimiter >::Split().

Referenced by CHistComboBoxEx::DelKeyTest(), and CSmartComboBox::DelKeyTest().

00162 {
00163     bool res = false;
00164
00165     std::string item("Item: ");
00166     item += strItem;
00167
00168     CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00169         _i18n("Do you want to remove item from the list?"), item.c_str(),
00170         BUTTONTITLE_YES, BUTTONTITLE_NO);
00171
00172     if( cvsAlert.ShowAlert() == kCvsAlertOKButton )
00173     {
00174         if( HasFeature(Feature::Keyword) )
00175         {
00176             CMKeyString* pMKeyString = dynamic_cast<CMKeyString*>(GetItems());
00177             if( pMKeyString )
00178             {
00179                 CStr mapValue;
00180                 pMKeyString->Concatenate(mapValue, GetKeyword(), strItem);
00181
00182                 res = m_pstrItems->Remove(mapValue);
00183             }
00184             else
00185             {
00186                 CKeyString* pKeyString = dynamic_cast<CKeyString*>(GetItems());
00187                 if( pKeyString )
00188                 {
00189                     std::vector<CStr> keyList;
00190
00191                     const std::vector<CStr>& list = pKeyString->GetList();
00192                     std::vector<CStr>::const_iterator i;
00193                     for(i = list.begin(); i != list.end(); ++i)
00194                     {
00195                         CStr key;
00196                         CStr value;
00197
00198                         pKeyString->Split((*i).c_str(), key, value);
00199                         if( key.compare(GetKeyword()) == 0 )
00200                         {
00201                             keyList.push_back(key);
00202                         }
00203                     }
00204
00205                     for(i = keyList.begin(); i != keyList.end() ; ++i)
00206                     {
00207                         CStr mapValue;
00208                         pKeyString->Concatenate(mapValue, *i, strItem);
00209                         res = m_pstrItems->Remove(mapValue);
00210                     }
00211                 }
00212             }
00213         }
00214         else
00215         {
00216             res = m_pstrItems->Remove(strItem);
00217         }
00218     }
00219
00220     return res;
00221 }

Here is the call graph for this function:

void USmartCombo::SetFeature ( int feature )

Set the features

Parameters:
feature Feature pattern to be set
Note:
Reflects the read-only state appropriate
Definition at line 61 of file SmartComboBox.cpp.

References m_feature, ReadOnly, and SetReadOnly().

Referenced by CSmartComboBox::OnSetFeature().

00062 {
00063     m_feature = feature;
00064     SetReadOnly(0 != (m_feature & USmartCombo::ReadOnly));
00065 }

Here is the call graph for this function:

void USmartCombo::SetItems ( CMString * pstrItems )

Set the items persistent collection

Parameters:
pstrItems pointer to CMString class object so that it can be removed with Del key when the drop-down list is dropped down
Returns:
true on success, false otherwise
Note:
It will also set the feature member appropriate:
  • if pstrItems is NULL it will remove
  • if it's valid then it will add the USmartCombo::RemoveItems feature.
Definition at line 85 of file SmartComboBox.cpp.

References m_feature, m_pstrItems, and RemoveItems.

Referenced by CCvsRootDlg::CCvsRootDlg(), CEditKeywordDlg::CEditKeywordDlg(), CInit_MAIN::CInit_MAIN(), CItemListDlg::CItemListDlg(), CMainFrame::CreateLocationCombo(), CDiff_MAIN::OnCheck1(), CDiff_MAIN::OnCheck2(), CAnnotate_MAIN::OnIsdate(), CFilterSelectionDlg::OnSelchangeContentsCombo(), and CSmartComboBox::OnSetItems().

00086 {
00087     m_pstrItems = pstrItems;
00088     if( m_pstrItems )
00089     {
00090         m_feature |= USmartCombo::RemoveItems;
00091     }
00092     else
00093     {
00094         m_feature &= ~USmartCombo::RemoveItems;
00095     }
00096 }

void USmartCombo::SetKeyword ( const char * keyword )

Set the keyword

Parameters:
keyword Keyword
Note:
It will also set the feature member appropriate
Definition at line 113 of file SmartComboBox.cpp.

References Keyword, m_feature, and m_keyword.

Referenced by CEditKeywordDlg::CEditKeywordDlg().

00114 {
00115     m_keyword = keyword;
00116     m_feature |= USmartCombo::Keyword;
00117 }

void USmartCombo::SetReadOnly ( bool readOnly = true ) [virtual]

Set the read-only feature

Parameters:
readOnly true to turn on the read-only feature, false to turn if off
Note:
Call the base class first when you override USmartCombo::SetReadOnly

Reimplemented in CSmartComboBox.

Definition at line 143 of file SmartComboBox.cpp.

References m_feature, and ReadOnly.

Referenced by SetFeature(), and CSmartComboBox::SetReadOnly().

00144 {
00145     if( readOnly )
00146     {
00147         m_feature |= USmartCombo::ReadOnly;
00148     }
00149     else
00150     {
00151         m_feature &= ~USmartCombo::ReadOnly;
00152     }
00153 }

Member Data Documentation

int USmartCombo::m_feature [private]

Pattern of used features Definition at line 50 of file SmartComboBox.h.

Referenced by HasFeature(), SetFeature(), SetItems(), SetKeyword(), and SetReadOnly().

UStr USmartCombo::m_keyword [private]

Keyword to be used with Feature::Keyword Definition at line 52 of file SmartComboBox.h.

Referenced by GetKeyword(), and SetKeyword().

CMString* USmartCombo::m_pstrItems [private]

Items collection Definition at line 51 of file SmartComboBox.h.

Referenced by GetItems(), RemoveItem(), SetItems(), and USmartCombo().

The documentation for this class was generated from the following files:
  • common/SmartComboBox.h
  • common/SmartComboBox.cpp
Generated on Sat Aug 7 22:56:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSmartComboBox Class Reference

CSmartComboBox Class Reference

#include <SmartComboBox.h>

Inheritance diagram for CSmartComboBox:

[legend]
Collaboration diagram for CSmartComboBox:

[legend]
List of all members.

Public Member Functions

CSmartComboBox (int feature=USmartCombo::DefaultFeature)
virtual BOOL | PreTranslateMessage (MSG *pMsg)
PreTranslateMessage virtual override, if the USmartCombo::RemoveItems feature is set perform the key test to determine whether to delete item.
virtual | ~CSmartComboBox ()
virtual void | SetReadOnly (bool readOnly=true)
virtual void | SetSelectExact (bool selectExact=true)
virtual CEdit * | GetEditCtrl () const
virtual int | EnsureSelchangeMatch ()
virtual CString | GetCurSelText () const
virtual CString | GetWindowText () const
void | GetWindowText (CString &rString) const

Protected Member Functions

virtual void | PreSubclassWindow ()
PreSubclassWindow virtual override, sets the read-only state if the USmartCombo::ReadOnly feature is set.
afx_msg void | OnDropdown ()
CBN_DROPDOWN message handler, calculates the width of the drop-down list if the USmartCombo::AutoDropWidth feature is set.
afx_msg LRESULT | OnSelectString (WPARAM wParam, LPARAM lParam)
CB_SELECTSTRING message handler, intercepted to work around problems with DDX data exchange.
afx_msg LRESULT | OnSetFeature (WPARAM wParam, LPARAM lParam)
afx_msg LRESULT | OnSetItems (WPARAM wParam, LPARAM lParam)
afx_msg LRESULT | OnSetReadOnly (WPARAM wParam, LPARAM lParam)

Private Member Functions

virtual int | CalcDroppedWidth ()
CalcDroppedWidth virtual override, calculate drop-down list width and make sure it doesn't go off-screen as well.
BOOL | DelKeyTest (MSG *pMsg)

Private Attributes

bool m_selectExact

Detailed Description

Smart Combo Box class(CSmartComboBox)

Use that class as a replacement for CComboBox. Set the desired features using the constructor or CSmartComboBox::SetFeature method. To use the Del key feature when the drop-down list is dropped down you need to also call CSmartComboBox::SetItems method to setup appropriate persistent collection (CMString object).

The CSmartComboBox::SetReadOnlymethod can be used to make an edit portion of the combo readonly or to reverse that feature. For use with the UWidget the messages to set appropriate features and data members are provided (WM_SMCB_SETFEATURE, WM_SMCB_SETITEMS and WM_SMCB_SETREADONLY).

Definition at line 111 of file SmartComboBox.h.

Constructor & Destructor Documentation

CSmartComboBox::CSmartComboBox ( int feature = USmartCombo::DefaultFeature )

Definition at line 227 of file SmartComboBox.cpp.

00228     : USmartCombo(feature), m_selectExact(true)
00229 {
00230 }

CSmartComboBox::~CSmartComboBox ( ) [virtual]

Definition at line 232 of file SmartComboBox.cpp.

00233 {
00234 }

Member Function Documentation

int CSmartComboBox::CalcDroppedWidth ( ) [private, virtual]

CalcDroppedWidth virtual override, calculate drop-down list width and make sure it doesn't go off-screen as well.

Reimplemented from USmartCombo.

Definition at line 305 of file SmartComboBox.cpp.

00306 {
00307     int maxSize = 0;
00308
00309     CClientDC ClientDC(this);
00310     int savedDC = ClientDC.SaveDC();
00311     ClientDC.SelectObject(GetFont());
00312
00313     CString strLBText;
00314     for(int nIndex = 0; nIndex < GetCount(); nIndex++)
00315     {
00316         GetLBText(nIndex, strLBText);
00317         CSize size = ClientDC.GetTextExtent(strLBText);
00318
00319         if( size.cx > maxSize )
00320         {
00321             maxSize = size.cx;
00322         }
00323     }
00324
00325     ClientDC.RestoreDC(savedDC);
00326
00327     maxSize += ::GetSystemMetrics(SM_CXVSCROLL) + 3*::GetSystemMetrics(SM_CXEDGE);
00328
00329     CRect rect;
00330     GetWindowRect(rect);
00331     maxSize = min(ClientDC.GetDeviceCaps(HORZRES) - rect.TopLeft().x, maxSize);
00332
00333     return maxSize;
00334 }

BOOL CSmartComboBox::DelKeyTest ( MSG * pMsg ) [private]

Test if the Del key is pressed and remove the item if the drop-down list is dropped down

Parameters:
pMsg Message to test
Returns:
TRUE if the drop-down list was dropped and Del key was pressed
Note:
Make sure the items collection is set earlier (call USmartCombo::SetItems to set the collection)
Definition at line 342 of file SmartComboBox.cpp.

References USmartCombo::GetItems(), NULL, and USmartCombo::RemoveItem().

Referenced by PreTranslateMessage().

00343 {
00344     CMString* pstrItems = GetItems();
00345     ASSERT(pstrItems != NULL);
00346
00347     BOOL bRes = FALSE;
00348
00349     if( WM_KEYDOWN == pMsg->message &&
00350         VK_DELETE == (int)pMsg->wParam &&
00351         pstrItems &&
00352         GetDroppedState() )
00353     {
00354         int sel = GetCurSel();
00355         if( CB_ERR < sel )
00356         {
00357             CString strItem;
00358             GetLBText(sel, strItem);
00359
00360             if( RemoveItem(strItem) )
00361             {
00362                 DeleteString(sel);
00363             }
00364
00365             //we have to prevent it going to another window
00366             bRes = TRUE;
00367         }
00368     }
00369
00370     return bRes;
00371 }

Here is the call graph for this function:

int CSmartComboBox::EnsureSelchangeMatch ( ) [inline, virtual]

Ensure that the edit control text retrieved with GetWindowText API matches the currently selected item

Returns:
The current selection or -1 if none
Warning:
It should be only called from within CBN_SELCHANGE handler
Note:
For more details see kb66365: http://support.microsoft.com/default.aspx?scid=kb;en-us;66365
Definition at line 187 of file SmartComboBox.h.

Referenced by CImport_OPTIONS::OnSelchangePath(), and CCvsRootDlg::OnSelchangePath().

00188 {
00189     const int item = GetCurSel();
00190
00191     if( item > -1 )
00192     {
00193         CString path;
00194         GetLBText(item, path);
00195         SetWindowText(path);
00196     }
00197
00198     return item;
00199 }

CString CSmartComboBox::GetCurSelText ( ) const [inline, virtual]

Get currently selected text

Returns:
Currently selected text
Definition at line 205 of file SmartComboBox.h.

Referenced by CCvsRootDlg::UpdateCvsRoot().

00206 {
00207     CString strRes;
00208
00209     const int item = GetCurSel();
00210     if( item > -1 )
00211     {
00212         GetLBText(item, strRes);
00213     }
00214
00215     return strRes;
00216 }

CEdit * CSmartComboBox::GetEditCtrl ( ) const [inline, virtual]

Get the edit control portion of the combo box

Returns:
The edit control portion of the combo box
Definition at line 176 of file SmartComboBox.h.

Referenced by CCmdLine_MAIN::OnInitDialog().

00177 {
00178     return (CEdit*)GetDlgItem(1001);
00179 }

void CSmartComboBox::GetWindowText ( CString & rString ) const [inline]

Get window text

Returns:
Window text
Note:
Just forwarding to the base class to allow standard operations working
Definition at line 235 of file SmartComboBox.h.
00236 {
00237     CComboBox::GetWindowText(rString);
00238 }

CString CSmartComboBox::GetWindowText ( ) const [inline, virtual]

Get window text

Returns:
Window text
Definition at line 222 of file SmartComboBox.h.

Referenced by DDX_ComboMString(), CGetPrefs_CVS::OnAltcvssel(), CImport_OPTIONS::OnBtnpath(), CCheckout_MAIN::OnCheckOverridecheckoutdir(), CImport_OPTIONS::OnImportfilter(), CDiff_MAIN::OnOptionsmenu(), CItemListDlg::OnRefresh(), CFilterSelectionDlg::OnSelchangeContentsCombo(), CImport_OPTIONS::OnSelchangePath(), CRtag_MAIN::OnSelcvsroot(), CLogin_MAIN::OnSelcvsroot(), CCmdLine_MAIN::OnSelcvsroot(), CItemListDlg::OnSelcvsroot(), CInit_MAIN::OnSelcvsroot(), CImport_MAIN::OnSelcvsroot(), CCheckout_MAIN::OnSelcvsroot(), CCmdLine_MAIN::OnSelfolder(), CDiff_MAIN::SetDefaultInput(), and CCvsRootDlg::UpdateCvsRoot().

00223 {
00224     CString strRes;
00225     GetWindowText(strRes);
00226
00227     return strRes;
00228 }

void CSmartComboBox::OnDropdown ( ) [protected]

CBN_DROPDOWN message handler, calculates the width of the drop-down list if the USmartCombo::AutoDropWidth feature is set.

Definition at line 252 of file SmartComboBox.cpp.

00253 {
00254     if( HasFeature(USmartCombo::AutoDropWidth) )
00255     {
00256         SetDroppedWidth(CalcDroppedWidth());
00257     }
00258 }

LRESULT CSmartComboBox::OnSelectString | ( | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected]

CB_SELECTSTRING message handler, intercepted to work around problems with DDX data exchange.

Definition at line 261 of file SmartComboBox.cpp.

References m_selectExact.

00262 {
00263     LRESULT result = CB_ERR;
00264
00265     LRESULT findRes = SendMessage(m_selectExact ? CB_FINDSTRINGEXACT : CB_FINDSTRING, wParam, lParam);
00266     if( findRes != CB_ERR )
00267     {
00268         // Check whether there is a better match
00269         if( m_selectExact )
00270         {
00271             CString strLBText;
00272             for(int nIndex = 0; nIndex < GetCount(); nIndex++)
00273             {
00274                 GetLBText(nIndex, strLBText);
00275                 if( strLBText.Compare((LPCSTR)lParam) == 0 )
00276                 {
00277                     // Perfect match found
00278                     findRes = nIndex;
00279                     break;
00280                 }
00281             }
00282         }
00283
00284         result = SendMessage(CB_SETCURSEL, (WPARAM)findRes, 0);
00285     }
00286
00287     return result;
00288 }

LRESULT CSmartComboBox::OnSetFeature | ( | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected]

WM_SMCB_SETFEATURE private message handler

Parameters:
wParam | Value or a combinations of values enumerated under USmartCombo::Feature
lParam | Unused
Returns:
0
Definition at line 418 of file SmartComboBox.cpp.

References USmartCombo::SetFeature().

00419 {
00420     SetFeature((int)wParam);
00421     return 0;
00422 }

Here is the call graph for this function:

LRESULT CSmartComboBox::OnSetItems | ( | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected]

WM_SMCB_SETITEMS private message handler

Parameters:
wParam | Pointer to persistent collection of items
lParam | Unused
Returns:
0
Definition at line 430 of file SmartComboBox.cpp.

References USmartCombo::SetItems().

00431 {
00432     SetItems((CMString*)wParam);
00433     return 0;
00434 }

Here is the call graph for this function:

LRESULT CSmartComboBox::OnSetReadOnly | ( | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [protected]

WM_SMCB_SETREADONLY private message handler

Parameters:
wParam | Boolean value to set the read-only state
lParam | Unused
Returns:
0
Definition at line 442 of file SmartComboBox.cpp.

References SetReadOnly().

00443 {
00444     SetReadOnly(0 != wParam);
00445     return 0;
00446 }

Here is the call graph for this function:

void CSmartComboBox::PreSubclassWindow ( ) [protected, virtual]

PreSubclassWindow virtual override, sets the read-only state if the USmartCombo::ReadOnly feature is set.

Reimplemented in CKeywordComboBox.

Definition at line 374 of file SmartComboBox.cpp.

References USmartCombo::HasFeature(), and SetReadOnly().

Referenced by CKeywordComboBox::PreSubclassWindow().

00375 {
00376     if( HasFeature(USmartCombo::ReadOnly) )
00377     {
00378         SetReadOnly();
00379     }
00380
00381     CComboBox::PreSubclassWindow();
00382 }

Here is the call graph for this function:

BOOL CSmartComboBox::PreTranslateMessage ( MSG * pMsg ) [virtual]

PreTranslateMessage virtual override, if the USmartCombo::RemoveItems feature is set perform the key test to determine whether to delete item.

Definition at line 291 of file SmartComboBox.cpp.

References DelKeyTest(), and USmartCombo::HasFeature().

00292 {
00293     if( HasFeature(USmartCombo::RemoveItems) )
00294     {
00295         if( DelKeyTest(pMsg) )
00296         {
00297             return TRUE;
00298         }
00299     }
00300
00301     return CComboBox::PreTranslateMessage(pMsg);
00302 }

Here is the call graph for this function:

void CSmartComboBox::SetReadOnly ( bool readOnly = true ) [virtual]

Set the read-only state (edit part of combo box)

Parameters:
readOnly true to set the read-only state, false otherwise
Note:
It can be used at runtime, but it's better to set read-only using constructor (CSmartComboBox::CSmartComboBox)

Reimplemented from USmartCombo.

Definition at line 389 of file SmartComboBox.cpp.

References USmartCombo::SetReadOnly().

Referenced by CDiff_MAIN::OnInitDialog(), OnSetReadOnly(), and PreSubclassWindow().

00390 {
00391     USmartCombo::SetReadOnly(readOnly);
00392
00393     if( IsWindow(m_hWnd) )
00394     {
00395         CEdit* pEdit = (CEdit*)GetDlgItem(1001);
00396         if( pEdit && IsWindow(pEdit->m_hWnd) )
00397         {
00398             pEdit->SetReadOnly(readOnly);
00399         }
00400     }
00401 }

Here is the call graph for this function:

void CSmartComboBox::SetSelectExact ( bool selectExact = true ) [virtual]

Set the exact selection flag

Parameters:
selectExact true to set the exact selection on, false otherwise
Definition at line 407 of file SmartComboBox.cpp.

References m_selectExact.

00408 {
00409     m_selectExact = selectExact;
00410 }

Member Data Documentation

bool CSmartComboBox::m_selectExact [private]

true to attempt to select the exact string when CB_SELECTSTRING message is received Definition at line 149 of file SmartComboBox.h.

Referenced by OnSelectString(), and SetSelectExact().

The documentation for this class was generated from the following files:
  • common/SmartComboBox.h
  • common/SmartComboBox.cpp
Generated on Sat Aug 7 22:56:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSortHeaderCtrl Class Reference

CSortHeaderCtrl Class Reference

Sort header control. More...

#include <SortHeaderCtrl.h>

Inheritance diagram for CSortHeaderCtrl:

[legend]
Collaboration diagram for CSortHeaderCtrl:

[legend]
List of all members.

Public Member Functions

CSortHeaderCtrl ()
virtual | ~CSortHeaderCtrl ()
int | SetSortImage (const int nCol, const BOOL bAsc)
BOOL | EnableHeaderFilters (const BOOL enable=TRUE)
NotificationManager * GetNotificationManager ()
CString | GetFilterText (const int intItem)
BOOL | SetFilterText (const int intItem, const char *text)
void | SetFilterChangeTimeout (const int nFilterChangeTimeout)

Protected Member Functions

afx_msg void | OnCustomdraw (NMHDR *pNMHDR, LRESULT *pResult)
NM_CUSTOMDRAW notification handler, draw sort order indication.
afx_msg void | OnKillFocus (CWnd *pNewWnd)
WM_KILLFOCUS message handler, reset the last filter cache.
afx_msg void | OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags)
WM_KEYUP message handler, reset the last filter cache if Return key was pressed.
afx_msg void | OnFilterChanged (NMHDR *pNMHDR, LRESULT *pResult)
HDN_FILTERCHANGE notification handler, send the change notification to any observers.
afx_msg void | OnFilterBtnClicked (NMHDR *pNMHDR, LRESULT *pResult)
HDN_FILTERBTNCLICK notification handler, send the change notification to any observers.

Private Member Functions

void | DrawItem (const UINT itemID, const RECT rcItem, const BOOL bSelected, const BOOL bSortCol, const BOOL bSortAsc, const HDC hDC)
void | ResetLastFilter ()

Private Attributes

int m_nSortCol
BOOL | m_bSortAsc
BOOL | m_bHeaderFilters
NotificationManager m_notificationManager
int m_nLastFilterChanged
CString | m_strLastInsertedFilterText

Detailed Description

Sort header control.

Definition at line 30 of file SortHeaderCtrl.h.

Constructor & Destructor Documentation

CSortHeaderCtrl::CSortHeaderCtrl ( )

Definition at line 50 of file SortHeaderCtrl.cpp.

00051 {
00052     m_bSortAsc = TRUE;
00053     m_nSortCol = -1;
00054     m_bHeaderFilters = FALSE;
00055
00056     ResetLastFilter();
00057 }

CSortHeaderCtrl::~CSortHeaderCtrl ( ) [virtual]

Definition at line 59 of file SortHeaderCtrl.cpp.

00060 {
00061 }

Member Function Documentation

void CSortHeaderCtrl::DrawItem | ( | const UINT | itemID,
 |  | const RECT | rcItem,
 |  | const BOOL | bSelected,
 |  | const BOOL | bSortCol,
 |  | const BOOL | bSortAsc,
 |  | const HDC | hDC
 | ) | [private]

Draw the item

Parameters:
itemID | Item ID (column)
rcItem | Item rectangle (the top half only if the filter bar is in use
bSelected | TRUE if the column is selected (mouse pressed), FALSE otherwise
bSortCol | TRUE if the column is the sorted column so the indicator will be drawn, FALSE otherwise
bSortAsc | TRUE if the column is sorted in the ascending order, FALSE if it's sorted in descending order
hDC | Handle to the devide context
Definition at line 91 of file SortHeaderCtrl.cpp.

References GETITEM_BUFFER_SIZE.

Referenced by OnCustomdraw().

00094 {
00095     CDC dc;
00096
00097     dc.Attach(hDC);
00098
00099     // Get the column rect
00100     CRect rcLabel(rcItem);
00101
00102     // Save DC
00103     int nSavedDC = dc.SaveDC();
00104
00105     // Set clipping region to limit drawing within column
00106     CRgn rgn;
00107     rgn.CreateRectRgnIndirect(&rcLabel);
00108     dc.SelectObject(&rgn);
00109     rgn.DeleteObject();
00110
00111     // Draw the header "button"
00112     dc.DrawFrameControl(&rcLabel, DFC_BUTTON, DFCS_BUTTONPUSH | (bSelected ? DFCS_PUSHED : 0));
00113
00114     // Labels are offset by a certain amount
00115     // This offset is related to the width of a space character
00116     int offset = dc.GetTextExtent(_T(" "), 1).cx * 2;
00117
00118     // Get the column text and format
00119     TCHAR buf[GETITEM_BUFFER_SIZE];
00120     HD_ITEM hditem;
00121
00122     hditem.mask = HDI_TEXT | HDI_FORMAT;
00123     hditem.pszText = buf;
00124     hditem.cchTextMax = GETITEM_BUFFER_SIZE - 1;
00125
00126     GetItem(itemID, &hditem);
00127
00128     // Determine format for drawing column label
00129     UINT uFormat = DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER | DT_END_ELLIPSIS;
00130
00131     if( hditem.fmt & HDF_CENTER)
00132     {
00133         uFormat |= DT_CENTER;
00134     }
00135     else if( hditem.fmt & HDF_RIGHT)
00136     {
00137         uFormat |= DT_RIGHT;
00138     }
00139     else
00140     {
00141         uFormat |= DT_LEFT;
00142     }
00143
00144     // Adjust the rect if the mouse button is pressed on it
00145     if( bSelected )
00146     {
00147         rcLabel.left++;
00148         rcLabel.top += 2;
00149         rcLabel.right++;
00150     }
00151
00152     // Adjust the rect further if Sort arrow is to be displayed
00153     if( bSortCol )
00154     {
00155         rcLabel.right -= 3 * offset;
00156     }
00157
00158     rcLabel.left += offset;
00159     rcLabel.right -= offset;
00160
00161     // Draw column label
00162     if( rcLabel.left < rcLabel.right )
00163     {
00164         const int prevBkMode = dc.SetBkMode(TRANSPARENT);
00165         const COLORREF prevTextColor = dc.SetTextColor(GetSysColor(COLOR_BTNTEXT));
00166
00167         dc.DrawText(buf, -1, rcLabel, uFormat);
00168
00169         dc.SetBkMode(prevBkMode);
00170         dc.SetTextColor(prevTextColor);
00171     }
00172
00173     // Draw the Sort arrow
00174     if( bSortCol )
00175     {
00176         CRect rcIcon(rcItem);
00177
00178         // Set up pens to use for drawing the triangle
00179         CPen penLight(PS_SOLID, 1, GetSysColor(COLOR_3DHILIGHT));
00180         CPen penShadow(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW));
00181         CPen* pOldPen = dc.SelectObject(&penLight);
00182
00183         offset = (rcIcon.bottom - rcIcon.top) / 4;
00184
00185         if( bSortAsc )
00186         {
00187             // Draw triangle pointing downwards
00188             dc.MoveTo(rcIcon.right - offset-1, offset);
00189             dc.LineTo(rcIcon.right - 2*offset-1, rcIcon.bottom - offset);
00190             dc.MoveTo(rcIcon.right - 2*offset-2, rcIcon.bottom - offset);
00191
00192             dc.SelectObject( &penShadow );
00193             dc.LineTo(rcIcon.right - 3*offset-1, offset);
00194             dc.LineTo(rcIcon.right - offset-1, offset);
00195         }
00196         else
00197         {
00198             // Draw triangle pointing upwards
00199             dc.MoveTo(rcIcon.right - 2* offset, offset);
00200             dc.LineTo(rcIcon.right - offset, rcIcon.bottom - offset-1);
00201             dc.LineTo(rcIcon.right - 3*offset-2, rcIcon.bottom - offset-1);
00202             dc.MoveTo(rcIcon.right - 3*offset-1, rcIcon.bottom - offset-1);
00203
00204             dc.SelectObject(&penShadow);
00205             dc.LineTo(rcIcon.right - 2*offset, offset-1);
00206         }
00207
00208         // Restore the pen
00209         dc.SelectObject(pOldPen);
00210     }
00211
00212     // Restore dc
00213     dc.RestoreDC(nSavedDC);
00214
00215     // Detach the dc before returning
00216     dc.Detach();
00217 }

BOOL CSortHeaderCtrl::EnableHeaderFilters ( const BOOL enable = TRUE )

Enable or disable the headers bar

Parameters:
enable TRUE to enable filter bar, FALSE to disable
Returns:
The previous state of headers bar
Definition at line 224 of file SortHeaderCtrl.cpp.

References DEFAULT_FILTERCHANGETIMEOUT, m_bHeaderFilters, and SetFilterChangeTimeout().

Referenced by CBrowseFileView::OnInitialUpdate(), CBrowseFileView::OnViewFilterbarEnable(), and CBrowseFileView::ResetView().

00225 {
00226     const BOOL blnPrevEnable = m_bHeaderFilters;
00227
00228     if( enable != m_bHeaderFilters )
00229     {
00230         m_bHeaderFilters = enable;
00231
00232         if( m_bHeaderFilters )
00233         {
00234             ModifyStyle(0, HDS_FILTERBAR);
00235             SetFilterChangeTimeout(DEFAULT_FILTERCHANGETIMEOUT);
00236         }
00237         else
00238         {
00239             ModifyStyle(HDS_FILTERBAR, 0);
00240         }
00241
00242         Invalidate();
00243     }
00244
00245     return blnPrevEnable;
00246 }

Here is the call graph for this function:

CString CSortHeaderCtrl::GetFilterText ( const int intItem )

Get the filter bar item text

Parameters:
intItem Item to get the text for
Returns:
The item bar text string
Definition at line 371 of file SortHeaderCtrl.cpp.

References GETITEM_BUFFER_SIZE.

Referenced by OnFilterBtnClicked(), OnFilterChanged(), CBrowseFileView::ResetView(), and CMainFrame::SetFilterBarMask().

00372 {
00373     TCHAR buffer[GETITEM_BUFFER_SIZE] = { 0 };
00374     strcpy(buffer, "");
00375
00376     if( intItem >= 0 && intItem < GetItemCount() )
00377     {
00378         HDITEM hdItem = { 0 };
00379         HDTEXTFILTER hdTextFilter = { 0 };
00380
00381         hdTextFilter.pszText = buffer;
00382         hdTextFilter.cchTextMax = GETITEM_BUFFER_SIZE - 1;
00383
00384         hdItem.mask = HDI_FILTER;
00385         hdItem.type = HDFT_ISSTRING;
00386         hdItem.pvFilter = &hdTextFilter;
00387
00388         if( !GetItem(intItem, &hdItem) )
00389         {
00390             // Copy an empty string just to be sure the return value is correct
00391             strcpy(buffer, "");
00392         }
00393     }
00394
00395     return buffer;
00396 }

NotificationManager * CSortHeaderCtrl::GetNotificationManager ( )

Get the notification manager

Returns:
The notification manager reference
Definition at line 361 of file SortHeaderCtrl.cpp.

References m_notificationManager.

Referenced by CBrowseFileView::OnDestroy(), and CBrowseFileView::OnInitialUpdate().

00362 {
00363     return &m_notificationManager;
00364 }

void CSortHeaderCtrl::OnCustomdraw | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

NM_CUSTOMDRAW notification handler, draw sort order indication.

Definition at line 249 of file SortHeaderCtrl.cpp.

References DrawItem(), m_bHeaderFilters, m_bSortAsc, and m_nSortCol.

00250 {
00251     LPNMCUSTOMDRAW pNmcustomdraw = (LPNMCUSTOMDRAW)pNMHDR;
00252
00253     if( CDDS_ITEM & pNmcustomdraw->dwDrawStage )
00254     {
00255         if( (const int)pNmcustomdraw->dwItemSpec == m_nSortCol )
00256         {
00257             if( CDDS_PREPAINT & pNmcustomdraw->dwDrawStage )
00258             {
00259                 // Ask for the post-paint notification so we can draw sort indicator
00260                 *pResult = CDRF_NOTIFYPOSTPAINT;
00261                 return;
00262             }
00263             else if( CDDS_POSTPAINT & pNmcustomdraw->dwDrawStage )
00264             {
00265                 RECT rcItem = pNmcustomdraw->rc;
00266
00267                 if( m_bHeaderFilters )
00268                 {
00269                     // Reduce the size to assure filter bar is visible
00270                     rcItem.bottom = (rcItem.bottom - rcItem.top) / 2;
00271                 }
00272
00273                 DrawItem(pNmcustomdraw->dwItemSpec, rcItem,
00274                     pNmcustomdraw->uItemState & CDIS_SELECTED, TRUE, m_bSortAsc,
00275                     pNmcustomdraw->hdc);
00276             }
00277         }
00278     }
00279
00280     if( CDDS_PREPAINT == pNmcustomdraw->dwDrawStage )
00281     {
00282         // We want notifications for all items
00283         *pResult = CDRF_NOTIFYITEMDRAW;
00284         return;
00285     }
00286
00287     *pResult = 0;
00288 }

Here is the call graph for this function:

void CSortHeaderCtrl::OnFilterBtnClicked | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

HDN_FILTERBTNCLICK notification handler, send the change notification to any observers.

Definition at line 336 of file SortHeaderCtrl.cpp.

References CompatGetFilterSelection(), CStr, CBrowseFileView::GetColumnModel(), CWincvsApp::GetFileView(), GetFilterText(), KiColumnModel::GetType(), and SetFilterText().

00337 {
00338     LPNMHDFILTERBTNCLICK pNMBClick = (LPNMHDFILTERBTNCLICK)pNMHDR;
00339
00340     *pResult = 0;
00341
00342     CStr filterText = GetFilterText(pNMBClick->iItem);
00343     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00344     CBrowseFileView* pBrowseFileView = pApp->GetFileView();
00345
00346     if( pBrowseFileView &&
00347         CompatGetFilterSelection(pBrowseFileView->GetColumnModel()->GetType(pNMBClick->iItem), filterText) )
00348     {
00349         if( !filterText.empty() )
00350         {
00351             SetFilterText(pNMBClick->iItem, filterText.c_str());
00352             *pResult = TRUE;
00353         }
00354     }
00355 }

Here is the call graph for this function:

void CSortHeaderCtrl::OnFilterChanged | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

HDN_FILTERCHANGE notification handler, send the change notification to any observers.

Definition at line 291 of file SortHeaderCtrl.cpp.

References CBrowseFileView::GetColumnModel(), CWincvsApp::GetFileView(), GetFilterText(), GetPrevFilter(), KiColumnModel::GetType(), TMString< T >::Insert(), m_nLastFilterChanged, m_notificationManager, m_strLastInsertedFilterText, NotificationManager::NotifyAll(), TMString< T >::Remove(), and ResetLastFilter().

00292 {
00293     LPNMHEADER pNMHeader = (LPNMHEADER)pNMHDR;
00294
00295     CWnd* pFocusWnd = GetFocus();
00296     const bool hasFocus = pFocusWnd && pFocusWnd->GetParent() && (pFocusWnd->GetParent()->GetSafeHwnd() == GetSafeHwnd());
00297
00298     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00299     CBrowseFileView* pBrowseFileView = pApp->GetFileView();
00300
00301     if( pBrowseFileView )
00302     {
00303         CMString* prevFilter = GetPrevFilter(pBrowseFileView->GetColumnModel()->GetType(pNMHeader->iItem));
00304         if( prevFilter )
00305         {
00306             const CString strFilterText = GetFilterText(pNMHeader->iItem);
00307             if( !strFilterText.IsEmpty() )
00308             {
00309                 const bool overrideLast = hasFocus && pNMHeader->iItem == m_nLastFilterChanged;
00310                 if( overrideLast && !m_strLastInsertedFilterText.IsEmpty() )
00311                 {
00312                     prevFilter->Remove(m_strLastInsertedFilterText);
00313                 }
00314
00315                 prevFilter->Insert(strFilterText);
00316                 m_strLastInsertedFilterText = strFilterText;
00317             }
00318         }
00319     }
00320
00321     if( hasFocus )
00322     {
00323         m_nLastFilterChanged = pNMHeader->iItem;
00324     }
00325     else
00326     {
00327         ResetLastFilter();
00328     }
00329
00330     m_notificationManager.NotifyAll();
00331
00332     *pResult = 0;
00333 }

Here is the call graph for this function:

void CSortHeaderCtrl::OnKeyUp | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

WM_KEYUP message handler, reset the last filter cache if Return key was pressed.

Definition at line 451 of file SortHeaderCtrl.cpp.

References ResetLastFilter().

00452 {
00453     if( VK_RETURN == nChar )
00454     {
00455         ResetLastFilter();
00456     }
00457
00458     CHeaderCtrl::OnKeyUp(nChar, nRepCnt, nFlags);
00459 }

Here is the call graph for this function:

void CSortHeaderCtrl::OnKillFocus ( CWnd * pNewWnd ) [protected]

WM_KILLFOCUS message handler, reset the last filter cache.

Definition at line 434 of file SortHeaderCtrl.cpp.

References ResetLastFilter().

00435 {
00436     CHeaderCtrl::OnKillFocus(pNewWnd);
00437
00438     ResetLastFilter();
00439 }

Here is the call graph for this function:

void CSortHeaderCtrl::ResetLastFilter ( ) [private]

Reset the last filter cache data Definition at line 444 of file SortHeaderCtrl.cpp.

References m_nLastFilterChanged, and m_strLastInsertedFilterText.

Referenced by OnFilterChanged(), OnKeyUp(), and OnKillFocus().

00445 {
00446     m_nLastFilterChanged = -1;
00447     m_strLastInsertedFilterText.Empty();
00448 }

void CSortHeaderCtrl::SetFilterChangeTimeout ( const int nFilterChangeTimeout )

Set the filter change timeout

Parameters:
nFilterChangeTimeout Filter change timeout in seconds
Definition at line 428 of file SortHeaderCtrl.cpp.

Referenced by EnableHeaderFilters(), CBrowseFileView::OnInitialUpdate(), CBrowseFileView::OnViewFilterbarEnable(), CBrowseFileView::OnViewFilterbarOptions(), and CBrowseFileView::ResetView().

00429 {
00430     Header_SetFilterChangeTimeout(m_hWnd, nFilterChangeTimeout);
00431 }

BOOL CSortHeaderCtrl::SetFilterText | ( | const int | intItem,
 |  | const char * | text
 | ) |

Set the filter bar item text

Parameters:
intItem | Item to set the text for
text | Text to set
Returns:
TRUE on success, FALSE otherwise
Definition at line 404 of file SortHeaderCtrl.cpp.

References GETITEM_BUFFER_SIZE.

Referenced by OnFilterBtnClicked(), and CBrowseFileView::ResetView().

00405 {
00406     ASSERT(intItem >= 0 && intItem < GetItemCount()); //item out-of-bound
00407
00408     TCHAR buffer[GETITEM_BUFFER_SIZE] = { 0 };
00409     HDITEM hdItem = { 0 };
00410     HDTEXTFILTER hdTextFilter = { 0 };
00411
00412     hdTextFilter.pszText = buffer;
00413     hdTextFilter.cchTextMax = GETITEM_BUFFER_SIZE - 1;
00414
00415     hdItem.mask = HDI_FILTER;
00416     hdItem.type = HDFT_ISSTRING;
00417     hdItem.pvFilter = &hdTextFilter;
00418
00419     strncpy(buffer, text, hdTextFilter.cchTextMax);
00420
00421     return SetItem(intItem, &hdItem);
00422 }

int CSortHeaderCtrl::SetSortImage | ( | const int | nCol,
 |  | const BOOL | bAsc
 | ) |

Set the sort column

Parameters:
nCol | Column to become sorted
bAsc | TRUE to sort in an ascending order, FALSE to sort in descending order
Returns:
The previous sort column
Definition at line 69 of file SortHeaderCtrl.cpp.

References m_bSortAsc, and m_nSortCol.

Referenced by CBrowseFileView::Resort(), CSelectionDetailsDlg::SortItems(), CItemListDlg::SortItems(), and CDiff_Options::SortItems().

00070 {
00071     const int nPrevCol = m_nSortCol;
00072
00073     m_nSortCol = nCol;
00074     m_bSortAsc = bAsc;
00075
00076     // Invalidate header control so that it gets redrawn
00077     Invalidate();
00078
00079     return nPrevCol;
00080 }

Member Data Documentation

BOOL CSortHeaderCtrl::m_bHeaderFilters [private]

Header filters flag Definition at line 72 of file SortHeaderCtrl.h.

Referenced by EnableHeaderFilters(), and OnCustomdraw().

BOOL CSortHeaderCtrl::m_bSortAsc [private]

Sorting order Definition at line 71 of file SortHeaderCtrl.h.

Referenced by OnCustomdraw(), and SetSortImage().

int CSortHeaderCtrl::m_nLastFilterChanged [private]

Last filter changed notification Definition at line 76 of file SortHeaderCtrl.h.

Referenced by OnFilterChanged(), and ResetLastFilter().

NotificationManager CSortHeaderCtrl::m_notificationManager [private]

Notification manager Definition at line 74 of file SortHeaderCtrl.h.

Referenced by GetNotificationManager(), and OnFilterChanged().

int CSortHeaderCtrl::m_nSortCol [private]

Sort column Definition at line 70 of file SortHeaderCtrl.h.

Referenced by OnCustomdraw(), and SetSortImage().

CString CSortHeaderCtrl::m_strLastInsertedFilterText [private]

Last inserted filter text Definition at line 77 of file SortHeaderCtrl.h.

Referenced by OnFilterChanged(), and ResetLastFilter().

The documentation for this class was generated from the following files:
  • WinCvs/SortHeaderCtrl.h
  • WinCvs/SortHeaderCtrl.cpp
Generated on Sat Aug 7 22:56:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSortList< T > Class Template Reference

CSortList< T > Class Template Reference

#include <SortList.h>

Inheritance diagram for CSortList< T >:

[legend]
Collaboration diagram for CSortList< T >:

[legend]
List of all members.

Public Types

typedef int(* | QsortMethod )(const T &, const T &)

Public Member Functions

CSortList (int def_size, QsortMethod method_sort)
~CSortList ()
int | Insert (const T &entry, bool replaceIfAlreadyExists=false)
bool | Inside (const T &entry, int *indexptr=0L) const
bool | InsideAndInsert (const T &entry, int *indexptr=0L, bool replaceIfAlreadyExists=false)
bool | Delete (const T &entry)
T * | Result (int *num_elem)
const T & | Get (int index) const
void | Reset (void)
int | NumOfElements (void)

Private Member Functions

const T & | Entry (int num_elem) const
int | Location (const T &entry)

Private Attributes

QsortMethod fMethod
int fDef
int fNum
int fMax
T * | fElems
bool fNewOne

template<class T>
class CSortList< T >

Member Typedef Documentation

template<class T>
typedef int(* CSortList< T >::QsortMethod)(const T &, const T &)

Definition at line 48 of file SortList.h.

Constructor & Destructor Documentation

template<class T>
CSortList< T >::CSortList | ( | int | def_size,
 |  | QsortMethod | method_sort
 | ) | [inline]

Definition at line 50 of file SortList.h.

00051     {
00052         assert(def_size > 1 && method_sort != 0L);
00053
00054         fDef = def_size;
00055         fMethod = method_sort;
00056         fMax = fNum = 0;
00057         fElems = 0L;
00058         fNewOne = false;
00059     }

template<class T>
CSortList< T >::~CSortList ( ) [inline]

Definition at line 61 of file SortList.h.

00062     {
00063         Reset();
00064     }

Member Function Documentation

template<class T>
bool CSortList< T >::Delete ( const T & entry ) [inline]

Definition at line 151 of file SortList.h.

Referenced by Entries_Open().

00152     {
00153         int index = Location(entry), i;
00154
00155         if(fNewOne)
00156             return false;
00157
00158         if(fNum == 1)
00159         {
00160             Reset();
00161             return true;
00162         }
00163
00164         for(i = index; i < fNum - 1; i++)
00165         {
00166             fElems[i] = fElems[i + 1];
00167         }
00168         --fNum;
00169         return true;
00170     }

template<class T>
const T& CSortList< T >::Entry ( int num_elem ) const [inline, private]

Definition at line 217 of file SortList.h.

Referenced by CSortList< ENTNODE >::Get(), and CSortList< ENTNODE >::Location().

00218     {
00219         assert(num_elem >= 0 && num_elem < fNum);
00220
00221         return fElems[num_elem];
00222     }

template<class T>
const T& CSortList< T >::Get ( int index ) const [inline]

Definition at line 191 of file SortList.h.

Referenced by cvsgui_GetCvsEntries(), Entries_SetMissing(), Entries_SetVisited(), TViewFill::ExitDirectory(), CWinCvsBrowser::OnItemexpanding(), UCvsFolders::OnTreeExpanding(), UCvsFiles::ResetView(), and tclCvsEntriesProc().

00192     {
00193         return Entry(index);
00194     }

template<class T>
int CSortList< T >::Insert | ( | const T & | entry,
 |  | bool | replaceIfAlreadyExists = false
 | ) | [inline]

Definition at line 68 of file SortList.h.

Referenced by CSortList< ENTNODE >::InsideAndInsert().

00069     {
00070         int index = Location(entry), i;
00071
00072         if(!fNewOne)
00073         {
00074             if(replaceIfAlreadyExists)
00075                 fElems[index] = entry;
00076
00077             return index;
00078         }
00079
00080         // check memory
00081         if(fNum == fMax)
00082         {
00083             T *newElems = 0L;
00084
00085             try
00086             {
00087                 newElems = new T[fMax + fDef];
00088
00089                 for(i = 0; i < fNum + 1; i++)
00090                 {
00091                     if(i < index)
00092                         newElems[i] = fElems[i];
00093                     else if(i == index)
00094                         newElems[i] = entry;
00095                     else
00096                         newElems[i] = fElems[i - 1];
00097                 }
00098             }
00099             catch(...)
00100             {
00101                 if(newElems != 0L)
00102                     delete[] newElems;
00103                 throw;
00104             }
00105
00106             fMax += fDef;
00107             fNum++;
00108             if(fElems != 0L)
00109                 delete[] fElems;
00110             fElems = newElems;
00111             return index;
00112         }
00113
00114         for(i = fNum - 1; i >= index; i--)
00115         {
00116             fElems[i + 1] = fElems[i];
00117         }
00118
00119         fElems[index] = entry;
00120         fNum++;
00121         return index;
00122     }

template<class T>
bool CSortList< T >::Inside | ( | const T & | entry,
 |  | int * | indexptr = 0L
 | ) | const [inline]

Definition at line 127 of file SortList.h.

00128     {
00129         int index = ((CSortList*)this)->Location(entry);
00130
00131         if(indexptr != 0L)
00132             *indexptr = fNewOne ? -1 : index;
00133
00134         return !fNewOne;
00135     }

template<class T>
bool CSortList< T >::InsideAndInsert | ( | const T & | entry,
 |  | int * | indexptr = 0L,
 |  | bool | replaceIfAlreadyExists = false
 | ) | [inline]

Definition at line 139 of file SortList.h.

Referenced by Entries_Open(), and Entries_SetVisited().

00141     {
00142         int index = Insert(entry, replaceIfAlreadyExists);
00143         if(indexptr != 0L)
00144             *indexptr = index;
00145
00146         return !fNewOne;
00147     }

template<class T>
int CSortList< T >::Location ( const T & entry ) [inline, private]

Definition at line 226 of file SortList.h.

Referenced by CSortList< ENTNODE >::Delete(), and CSortList< ENTNODE >::Insert().

00227     {
00228         int left, right, cmp_left = 0, cmp_right = 0;
00229         int cmp_middle, middle;
00230         computeSort compute;
00231
00232         if(fNum == 0)
00233         {
00234             fNewOne = true;
00235             return 0;
00236         }
00237
00238         fNewOne = false;
00239         left = 0;
00240         right = fNum - 1;
00241         compute = computeLR;
00242
00243         while(1)
00244         {
00245             middle = (left + right) / 2;
00246
00247             if(compute == computeLR)
00248             {
00249                 // firstime only
00250                 cmp_left = fMethod(Entry(left), entry);
00251                 cmp_right = fMethod(Entry(right), entry);
00252             }
00253             cmp_middle = fMethod(Entry(middle), entry);
00254
00255             // entry already exist (E == L || E == R)
00256             if(cmp_left == 0 || cmp_right == 0)
00257             {
00258                 return cmp_left == 0 ? left : right;
00259             }
00260
00261             // found an entry superior to the right (E > R && E < R + 1)
00262             if(cmp_right < 0)
00263             {
00264                 fNewOne = true;
00265                 return right + 1;
00266             }
00267
00268             // found an entry inferior to the left (L - 1 < E < L)
00269             if(cmp_left > 0)
00270             {
00271                 fNewOne = true;
00272                 return left;
00273             }
00274
00275             // found an entry inferior to the right (E > R - 1 && E < R)
00276             if(middle == left)
00277             {
00278                 fNewOne = true;
00279                 return right;
00280             }
00281
00282             // entry already exist (E == M)
00283             if(cmp_middle == 0)
00284                 return middle;
00285             // restart search (E > M && E < R)
00286             else if(cmp_middle < 0)
00287             {
00288                 compute = computeNone;
00289                 left = middle;
00290                 cmp_left = cmp_middle;
00291                 cmp_right = 1;
00292             }
00293             // restart search (E > L && E < M)
00294             else
00295             {
00296                 compute = computeNone;
00297                 right = middle;
00298                 cmp_right = cmp_middle;
00299                 cmp_left = -1;
00300             }
00301         }
00302         assert(0);
00303         return 0;
00304     }

template<class T>
int CSortList< T >::NumOfElements ( void ) [inline]

Definition at line 207 of file SortList.h.

Referenced by cvsgui_GetCvsEntries(), Entries_SetMissing(), TViewFill::ExitDirectory(), CWinCvsBrowser::OnItemexpanding(), UCvsFolders::OnTreeExpanding(), UCvsFiles::ResetView(), and tclCvsEntriesProc().

00207 {return fNum;}

template<class T>
void CSortList< T >::Reset ( void ) [inline]

Definition at line 198 of file SortList.h.

Referenced by CSortList< ENTNODE >::Delete(), Entries_Open(), and CSortList< ENTNODE >::~CSortList().

00199     {
00200         if(fElems != 0L)
00201             delete[] fElems;
00202         fMax = fNum = 0;
00203         fElems = 0L;
00204     }

template<class T>
T* CSortList< T >::Result ( int * num_elem ) [inline]

Definition at line 173 of file SortList.h.

00174     {
00175         *num_elem = 0;
00176
00177         if(fNum == 0)
00178             return 0L;
00179
00180         *num_elem = fNum;
00181         T *res = new T[fNum];
00182         for(int i = 0; i < fNum; i++)
00183         {
00184             res[i] = fElems[i];
00185         }
00186
00187         return res;
00188     }

Member Data Documentation

template<class T>
int CSortList< T >::fDef [private]

Definition at line 210 of file SortList.h.

template<class T>
T* CSortList< T >::fElems [private]

Definition at line 213 of file SortList.h.

template<class T>
int CSortList< T >::fMax [private]

Definition at line 212 of file SortList.h.

template<class T>
QsortMethod CSortList< T >::fMethod [private]

Definition at line 209 of file SortList.h.

Referenced by CSortList< ENTNODE >::Location().

template<class T>
bool CSortList< T >::fNewOne [private]

Definition at line 214 of file SortList.h.

template<class T>
int CSortList< T >::fNum [private]

Definition at line 211 of file SortList.h.

The documentation for this class was generated from the following file:
  • common/SortList.h
Generated on Sat Aug 7 22:56:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSortParam Struct Reference

CSortParam Struct Reference

Sort parameters. More...

#include <BrowseViewColumn.h>

Collaboration diagram for CSortParam:

[legend]
List of all members.

Public Member Functions

CSortParam (bool fAccendant, bool fGroupSubDir, const KiColumn *column, const KiColumn *columnAlt, KoColumnContext *context)

Public Attributes

const KiColumn * | m_column
const KiColumn * | m_columnAlt
KoColumnContext * m_context
bool m_fAccendant
bool m_fGroupSubDir

Detailed Description

Sort parameters.

Definition at line 137 of file BrowseViewColumn.h.

Constructor & Destructor Documentation

CSortParam::CSortParam | ( | bool | fAccendant,
 |  | bool | fGroupSubDir,
 |  | const KiColumn * | column,
 |  | const KiColumn * | columnAlt,
 |  | KoColumnContext * | context
 | ) | [inline]

Definition at line 140 of file BrowseViewColumn.h.

00142         : m_column(column), m_columnAlt(columnAlt), m_context(context),
00143         m_fAccendant(fAccendant), m_fGroupSubDir(fGroupSubDir)
00144     {
00145     }

Member Data Documentation

const KiColumn* CSortParam::m_column

Descriptor of the column being sorted Definition at line 148 of file BrowseViewColumn.h.

Referenced by _Compare().

const KiColumn* CSortParam::m_columnAlt

Descriptor of the alternate sorting column Definition at line 149 of file BrowseViewColumn.h.

Referenced by _Compare().

KoColumnContext* CSortParam::m_context

Column context Definition at line 150 of file BrowseViewColumn.h.

Referenced by _Compare().

bool CSortParam::m_fAccendant

Ascendant sorting Definition at line 152 of file BrowseViewColumn.h.

Referenced by _Compare().

bool CSortParam::m_fGroupSubDir

Group subdirectories Definition at line 153 of file BrowseViewColumn.h.

Referenced by _Compare().

The documentation for this struct was generated from the following file:
  • common/BrowseViewColumn.h
Generated on Sat Aug 7 22:56:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSplashWnd Class Reference

CSplashWnd Class Reference

#include <Splash.h>

Inheritance diagram for CSplashWnd:

[legend]
Collaboration diagram for CSplashWnd:

[legend]
List of all members.

Public Member Functions

~CSplashWnd ()
virtual void | PostNcDestroy ()

Static Public Member Functions

void | EnableSplashScreen (BOOL bEnable=TRUE)
void | ShowSplashScreen (CWnd *pParentWnd=NULL)
BOOL | PreTranslateAppMessage (MSG *pMsg)

Public Attributes

CBitmap | m_bitmap

Protected Member Functions

CSplashWnd ()
BOOL | Create (CWnd *pParentWnd=NULL)
void | HideSplashScreen ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnPaint ()
afx_msg void | OnTimer (UINT nIDEvent)

Static Protected Attributes

BOOL | c_bShowSplashWnd
CSplashWnd * c_pSplashWnd

Constructor & Destructor Documentation

CSplashWnd::CSplashWnd ( ) [protected]

Definition at line 49 of file Splash.cpp.

00050 {
00051 }

CSplashWnd::~CSplashWnd ( )

Definition at line 53 of file Splash.cpp.

References c_pSplashWnd, and NULL.

00054 {
00055     // Clear the static window pointer.
00056     ASSERT(c_pSplashWnd == this);
00057     c_pSplashWnd = NULL;
00058 }

Member Function Documentation

BOOL CSplashWnd::Create ( CWnd * pParentWnd = NULL ) [protected]

Definition at line 108 of file Splash.cpp.

References IDB_SPLASH, m_bitmap, and NULL.

Referenced by ShowSplashScreen().

00109 {
00110     if (!m_bitmap.LoadBitmap(IDB_SPLASH))
00111         return FALSE;
00112
00113     BITMAP bm;
00114     m_bitmap.GetBitmap(&bm);
00115
00116     return CreateEx(0,
00117         AfxRegisterWndClass(0, AfxGetApp()->LoadStandardCursor(IDC_ARROW)),
00118         NULL, WS_POPUP | WS_VISIBLE, 0, 0, bm.bmWidth, bm.bmHeight, pParentWnd->GetSafeHwnd(), NULL);
00119 }

void CSplashWnd::EnableSplashScreen ( BOOL bEnable = TRUE ) [static]

Definition at line 68 of file Splash.cpp.

Referenced by CWincvsApp::InitInstance().

00069 {
00070     c_bShowSplashWnd = bEnable;
00071 }

void CSplashWnd::HideSplashScreen ( ) [protected]

Definition at line 121 of file Splash.cpp.

Referenced by OnTimer(), and PreTranslateAppMessage().

00122 {
00123     // Destroy the window, and update the mainframe.
00124     DestroyWindow();
00125     AfxGetMainWnd()->UpdateWindow();
00126 }

int CSplashWnd::OnCreate ( LPCREATESTRUCT lpCreateStruct ) [protected]

Definition at line 134 of file Splash.cpp.

References NULL.

00135 {
00136     if (CWnd::OnCreate(lpCreateStruct) == -1)
00137         return -1;
00138
00139     // Center the window.
00140     CenterWindow();
00141
00142     // Set a timer to destroy the splash screen.
00143     SetTimer(1, 750, NULL);
00144
00145     return 0;
00146 }

void CSplashWnd::OnPaint ( ) [protected]

Definition at line 148 of file Splash.cpp.

References CStr, gc_nBitmapRightMargin(), CWincvsApp::GetAppVersion(), and m_bitmap.

00149 {
00150     CPaintDC dc(this);
00151
00152     CDC dcImage;
00153     if (!dcImage.CreateCompatibleDC(&dc))
00154         return;
00155
00156     BITMAP bm;
00157     m_bitmap.GetBitmap(&bm);
00158
00159     // Paint the image.
00160     CBitmap* pOldBitmap = dcImage.SelectObject(&m_bitmap);
00161     dc.BitBlt(0, 0, bm.bmWidth, bm.bmHeight, &dcImage, 0, 0, SRCCOPY);
00162     dcImage.SelectObject(pOldBitmap);
00163
00164     // Get version information from the application
00165     CWincvsApp* app = (CWincvsApp *)AfxGetApp();
00166     CStr vers;
00167
00168     if(app->GetAppVersion(vers))
00169     {
00170         dc.SetBkMode(TRANSPARENT);
00171         dc.SetTextAlign(TA_RIGHT | TA_TOP);
00172         dc.TextOut(bm.bmWidth - gc_nBitmapRightMargin - 10, 219, vers, vers.length());
00173     }
00174 }

Here is the call graph for this function:

void CSplashWnd::OnTimer ( UINT nIDEvent ) [protected]

Definition at line 176 of file Splash.cpp.

References HideSplashScreen().

00177 {
00178     // Destroy the splash screen window.
00179     HideSplashScreen();
00180 }

Here is the call graph for this function:

void CSplashWnd::PostNcDestroy ( ) [virtual]

Definition at line 128 of file Splash.cpp.

00129 {
00130     // Free the C++ class.
00131     delete this;
00132 }

BOOL CSplashWnd::PreTranslateAppMessage ( MSG * pMsg ) [static]

Definition at line 86 of file Splash.cpp.

References c_pSplashWnd, HideSplashScreen(), and NULL.

Referenced by CWincvsApp::PreTranslateMessage().

00087 {
00088     if (c_pSplashWnd == NULL)
00089         return FALSE;
00090
00091     // If we get a keyboard or mouse message, hide the splash screen.
00092     if (pMsg->message == WM_KEYDOWN ||
00093         pMsg->message == WM_SYSKEYDOWN ||
00094         pMsg->message == WM_LBUTTONDOWN ||
00095         pMsg->message == WM_RBUTTONDOWN ||
00096         pMsg->message == WM_MBUTTONDOWN ||
00097         pMsg->message == WM_NCLBUTTONDOWN ||
00098         pMsg->message == WM_NCRBUTTONDOWN ||
00099         pMsg->message == WM_NCMBUTTONDOWN)
00100     {
00101         c_pSplashWnd->HideSplashScreen();
00102         return TRUE;    // message handled here
00103     }
00104
00105     return FALSE;   // message not handled
00106 }

Here is the call graph for this function:

void CSplashWnd::ShowSplashScreen ( CWnd * pParentWnd = NULL ) [static]

Definition at line 73 of file Splash.cpp.

References c_bShowSplashWnd, c_pSplashWnd, Create(), and NULL.

Referenced by CMainFrame::OnCreate().

00074 {
00075     if (!c_bShowSplashWnd || c_pSplashWnd != NULL)
00076         return;
00077
00078     // Allocate a new splash screen, and create the window.
00079     c_pSplashWnd = new CSplashWnd;
00080     if (!c_pSplashWnd->Create(pParentWnd))
00081         delete c_pSplashWnd;
00082     else
00083         c_pSplashWnd->UpdateWindow();
00084 }

Here is the call graph for this function:

Member Data Documentation

BOOL CSplashWnd::c_bShowSplashWnd [static, protected]

Definition at line 47 of file Splash.cpp.

Referenced by ShowSplashScreen().

CSplashWnd * CSplashWnd::c_pSplashWnd [static, protected]

Definition at line 48 of file Splash.cpp.

Referenced by PreTranslateAppMessage(), ShowSplashScreen(), and ~CSplashWnd().

CBitmap CSplashWnd::m_bitmap

Definition at line 40 of file Splash.h.

Referenced by Create(), and OnPaint().

The documentation for this class was generated from the following files:
  • WinCvs/Splash.h
  • WinCvs/Splash.cpp
Generated on Sat Aug 7 22:56:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSplitterWnd Class Reference

CSplitterWnd Class Reference

Inheritance diagram for CSplitterWnd:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/GfxSplitterWnd.h
Generated on Sat Aug 7 22:56:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: stat Struct Reference

stat Struct Reference

#include <StdAfx.h>

Collaboration diagram for stat:

[legend]
List of all members.

Public Attributes

_dev_t | st_dev
_ino_t | st_ino
unsigned short | st_mode
short | st_nlink
short | st_uid
short | st_gid
_dev_t | st_rdev
_off_t | st_size
time_t | st_atime
time_t | st_mtime
time_t | st_ctime

Member Data Documentation

time_t stat::st_atime

Definition at line 86 of file StdAfx.h.

Referenced by _statcore().

time_t stat::st_ctime

Definition at line 88 of file StdAfx.h.

Referenced by _statcore().

_dev_t stat::st_dev

Definition at line 78 of file StdAfx.h.

Referenced by _statcore().

short stat::st_gid

Definition at line 83 of file StdAfx.h.

Referenced by _statcore().

_ino_t stat::st_ino

Definition at line 79 of file StdAfx.h.

Referenced by _statcore().

unsigned short stat::st_mode

Definition at line 80 of file StdAfx.h.

Referenced by _statcore(), RemoveCvsArgs::addfile(), BrowserGetDirectory(), BuildIgnoredList(), Entries_SetVisited(), FileTraverse(), FormatDefaultSettingsLoc(), getLoc(), IsCvsDirectory(), launchCVS(), MakeTmpFile(), CWinCvsBrowser::OnUpdateCmd(), UCvsFolders::OnUpdateGeneric(), CWinCvsBrowser::ResetBrowser(), UCvsFolders::ResetBrowser(), UCvsFolders::SetDefaultRoot(), CHistComboBoxEx::SetIcon(), SettingsGetLoc(), TestFileIsAlias(), and CvsPrefs::WhichCvs().

time_t stat::st_mtime

Definition at line 87 of file StdAfx.h.

Referenced by _statcore(), Entries_SetVisited(), CBrowseFileView::GetEntriesModTime(), UCvsFiles::GetEntriesModTime(), and VerifyUnmodified().

short stat::st_nlink

Definition at line 81 of file StdAfx.h.

Referenced by _statcore().

_dev_t stat::st_rdev

Definition at line 84 of file StdAfx.h.

Referenced by _statcore().

_off_t stat::st_size

Definition at line 85 of file StdAfx.h.

Referenced by _statcore().

short stat::st_uid

Definition at line 82 of file StdAfx.h.

Referenced by _statcore().

The documentation for this struct was generated from the following file:
  • WinCvs/StdAfx.h
Generated on Sat Aug 7 22:56:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CStatic Class Reference

CStatic Class Reference

Inheritance diagram for CStatic:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJCaption.h
Generated on Sat Aug 7 22:56:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CStaticAllocT< T > Class Template Reference

CStaticAllocT< T > Class Template Reference

Class to use when fed-up with realloc, malloc... More...

#include <ustr.h>

Inheritance diagram for CStaticAllocT< T >:

[legend]
Collaboration diagram for CStaticAllocT< T >:

[legend]
List of all members.

Public Member Functions

CStaticAllocT ()
~CStaticAllocT ()
void | AdjustSize (size_t size)
operator T * (void) const
Buffer access.
operator const T * (void) const
Buffer access.
size_t | size () const

Protected Attributes

T * | m_buf
size_t m_bufsize

Detailed Description

template<class T>
class CStaticAllocT< T >

Class to use when fed-up with realloc, malloc...

Definition at line 72 of file ustr.h.

Constructor & Destructor Documentation

template<class T>
CStaticAllocT< T >::CStaticAllocT ( )

Definition at line 482 of file ustr.h.

References CStaticAllocT< T >::m_buf, and CStaticAllocT< T >::m_bufsize.

00483 {
00484     m_buf = 0L;
00485     m_bufsize = 0;
00486 }

template<class T>
CStaticAllocT< T >::~CStaticAllocT ( )

Definition at line 489 of file ustr.h.

References free, and CStaticAllocT< T >::m_buf.

00490 {
00491     if( m_buf != 0L )
00492         free(m_buf);
00493 }

Member Function Documentation

template<class T>
void CStaticAllocT< T >::AdjustSize ( size_t size )

Adjust the buffer size

Parameters:
size New buffer size
Definition at line 500 of file ustr.h.

References CStaticAllocT< T >::m_buf, CStaticAllocT< T >::m_bufsize, malloc, and realloc.

Referenced by CBuffer::append(), CleanupLogMsg(), expandLF(), FillBuffer(), CPersistent::LoadAll(), and reduceString().

00501 {
00502     if( m_bufsize < size )
00503     {
00504         if( m_buf == 0L )
00505             m_buf = (T*)malloc(size * sizeof(T));
00506         else
00507             m_buf = (T*)realloc(m_buf, size * sizeof(T));
00508
00509         if( m_buf == 0L )
00510             throw std::bad_alloc();
00511
00512         m_bufsize = size;
00513     }
00514 }

template<class T>
CStaticAllocT< T >::operator const T * ( void ) const [inline]

Buffer access.

Definition at line 525 of file ustr.h.

References CStaticAllocT< T >::m_buf.

00526 {
00527     return m_buf;
00528 }

template<class T>
CStaticAllocT< T >::operator T * ( void ) const [inline]

Buffer access.

Definition at line 518 of file ustr.h.

References CStaticAllocT< T >::m_buf.

00519 {
00520     return m_buf;
00521 }

template<class T>
size_t CStaticAllocT< T >::size ( ) const [inline]

Get the buffer size

Returns:
The buffer size
Definition at line 549 of file ustr.h.

References CStaticAllocT< T >::m_bufsize.

Referenced by CBuffer::append().

00550 {
00551     return m_bufsize;
00552 }

Member Data Documentation

template<class T>
T* CStaticAllocT< T >::m_buf [protected]

Buffer Definition at line 81 of file ustr.h.

Referenced by CStaticAllocT< T >::AdjustSize(), CStaticAllocT< T >::CStaticAllocT(), CStaticAllocT< T >::operator const T *(), CStaticAllocT< T >::operator T *(), and CStaticAllocT< T >::~CStaticAllocT().

template<class T>
size_t CStaticAllocT< T >::m_bufsize [protected]

Buffer size Definition at line 82 of file ustr.h.

Referenced by CStaticAllocT< T >::AdjustSize(), CStaticAllocT< T >::CStaticAllocT(), and CStaticAllocT< T >::size().

The documentation for this class was generated from the following file:
  • rf/ustr.h
Generated on Sat Aug 7 22:56:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CStatus_MAIN Class Reference

CStatus_MAIN Class Reference

#include <StatusDlg.h>

Inheritance diagram for CStatus_MAIN:

[legend]
Collaboration diagram for CStatus_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_STATUS_MAIN }

Public Member Functions

CStatus_MAIN (bool noRecurs, STATUSOUTPUT_TYPE outputType)
~CStatus_MAIN ()

Public Attributes

BOOL | m_noRecurs
int m_outputType

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Private Member Functions

virtual void | InitHelpID ()

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 58 of file StatusDlg.h.
00058 { IDD = IDD_STATUS_MAIN };

Constructor & Destructor Documentation

CStatus_MAIN::CStatus_MAIN | ( | bool | noRecurs,
 |  | STATUSOUTPUT_TYPE | outputType
 | ) |

Definition at line 65 of file StatusDlg.cpp.

00066     : CHHelpPropertyPage(CStatus_MAIN::IDD)
00067 {
00068     m_noRecurs = noRecurs;
00069     m_outputType = (int)outputType;
00070 }

CStatus_MAIN::~CStatus_MAIN ( )

Definition at line 72 of file StatusDlg.cpp.

00073 {
00074 }

Member Function Documentation

void CStatus_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 76 of file StatusDlg.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_NORECURS, IDC_OUTPUT_STANDARD, m_noRecurs, and m_outputType.

00077 {
00078     CHHelpPropertyPage::DoDataExchange(pDX);
00079     //{{AFX_DATA_MAP(CStatus_MAIN)
00080     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00081     DDX_Radio(pDX, IDC_OUTPUT_STANDARD, m_outputType);
00082     //}}AFX_DATA_MAP
00083 }

Here is the call graph for this function:

void CStatus_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 94 of file StatusDlg.cpp.

References IDC_NORECURS, IDC_OUTPUT_QUICK, IDC_OUTPUT_STANDARD, IDC_OUTPUT_VERBOSE, IDH_IDC_NORECURS, IDH_IDC_OUTPUT_QUICK, IDH_IDC_OUTPUT_STANDARD, and IDH_IDC_OUTPUT_VERBOSE.

00095 {
00096     SetCtrlHelpID(IDC_OUTPUT_STANDARD,  IDH_IDC_OUTPUT_STANDARD);
00097     SetCtrlHelpID(IDC_OUTPUT_QUICK,     IDH_IDC_OUTPUT_QUICK);
00098     SetCtrlHelpID(IDC_OUTPUT_VERBOSE,   IDH_IDC_OUTPUT_VERBOSE);
00099     SetCtrlHelpID(IDC_NORECURS,         IDH_IDC_NORECURS);
00100 }

Member Data Documentation

BOOL CStatus_MAIN::m_noRecurs

Definition at line 59 of file StatusDlg.h.

Referenced by CompatGetStatus(), and DoDataExchange().

int CStatus_MAIN::m_outputType

Definition at line 60 of file StatusDlg.h.

Referenced by CompatGetStatus(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/StatusDlg.h
  • common/StatusDlg.cpp
Generated on Sat Aug 7 22:56:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CStatusBar Class Reference

CStatusBar Class Reference

Inheritance diagram for CStatusBar:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CvsStatusBar.h
Generated on Sat Aug 7 22:56:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UStr Class Reference

UStr Class Reference

C string class. More...

#include <ustr.h>

Inheritance diagram for UStr:

[legend]
Collaboration diagram for UStr:

[legend]
List of all members.

Public Member Functions

UStr ()
UStr (const char *newstr)
UStr (const unsigned char *newstr)
UStr (const UStr &newstr)
virtual | ~UStr ()
void | clear (void)
bool | empty (void) const
unsigned int | length (void) const
UStr & | operator= (const char *newstr)
Set from a C String (0L is OK).
UStr & | operator= (const unsigned char *newstr)
Set from a P String (0L is OK).
UStr & | operator= (const UStr &newstr)
Set according to another UStr.
UStr & | set (const char *buf, unsigned int len)
Set from a buffer.
bool | operator< (const UStr &str) const
compare Compare, provided to compile with STL
bool | operator> (const UStr &str) const
Compare, provided to compile with STL.
bool | operator== (const UStr &str) const
Compare, provided to compile with STL.
bool | operator== (const char *str) const
Compare, provided to compile with STL.
bool | operator!= (const UStr &str) const
Compare, provided to compile with STL.
bool | operator!= (const char *str) const
Compare, provided to compile with STL.
operator const char * () const
as a C string
const char * | c_str () const
Access the string as a C string.
UStr & | operator<< (const char *addToStr)
Concatenate.
UStr & | operator<< (char addToStr)
Concatenate.
UStr & | operator<< (int addToStr)
Concatenate.
UStr & | operator+= (int addToStr)
Concatenate.
UStr & | operator+= (const char *addToStr)
Concatenate.
UStr & | operator+= (const UStr &addToStr)
Concatenate.
int | compare (const char *thestr) const
bool | endsWith (char c) const
UStr & | replace (char which, char bywhich)
replace a character
int | find (const char *thestr) const
int | rfind (const char *thestr) const
int | find (char thechar) const
int | rfind (char thechar) const
UStr | substr (int idx, int len) const
UStr & | trim (char c= ' ')
UStr & | rtrim (char c)
UStr & | rtrim (const char *MatchList)

Protected Attributes

char * | m_str

Detailed Description

C string class.

Definition at line 144 of file ustr.h.

Constructor & Destructor Documentation

UStr::UStr ( ) [inline]

Definition at line 318 of file ustr.h.

00319     : m_str(0L)
00320 {
00321 }

UStr::UStr ( const char * newstr ) [inline]

Definition at line 323 of file ustr.h.

00324 {
00325     m_str = 0L;
00326     *this = newstr;
00327 }

UStr::UStr ( const unsigned char * newstr ) [inline]

Definition at line 330 of file ustr.h.

References set().

00331 {
00332     m_str = 0L;
00333     set((const char*)newstr + 1, newstr[0]);
00334 }

Here is the call graph for this function:

UStr::UStr ( const UStr & newstr ) [inline]

Definition at line 337 of file ustr.h.

00338 {
00339     m_str = 0L;
00340     *this = newstr;
00341 }

UStr::~UStr ( ) [virtual]

Definition at line 664 of file ustr.cpp.

References clear().

00665 {
00666     clear();
00667 }

Here is the call graph for this function:

Member Function Documentation

const char * UStr::c_str ( ) const [inline]

Access the string as a C string.

Definition at line 388 of file ustr.h.

Referenced by CAnnotate_MAIN::CAnnotate_MAIN(), CDiff_MAIN::CDiff_MAIN(), CompatGetPassword(), CvsCmdMoveToTrash(), cvsgui_PromptEditMessage(), UEditMessage::DoDataExchange(), UPromptMessage::DoDataExchange(), CBrowseFileView::GetEntriesModTime(), InitializeInterp(), UCvsFolders::OnTreeSelecting(), PyMacrosReloadAll(), CWinCvsBrowser::ResetBrowser(), UCvsFiles::ResetView(), UPseudoPageHider::UPseudoPageHider(), and CvsPrefs::WhichCvs().

00389 {
00390     return m_str == 0L ? "" : m_str;
00391 }

void UStr::clear ( void )

Clear the string Definition at line 672 of file ustr.cpp.

References free, and m_str.

Referenced by operator<<(), operator=(), set(), TKeyString< delimiter >::Split(), CvsPrefs::WhichCvs(), and ~UStr().

00673 {
00674     if( m_str )
00675     {
00676         free(m_str);
00677         m_str = 0L;
00678     }
00679 }

int UStr::compare ( const char * thestr ) const [inline]

Compare the string with another one

Parameters:
thestr String to compare with
Returns:
-1, 0 and 1 as appropriate
Definition at line 463 of file ustr.h.

Referenced by CMacroEntry::operator==().

00464 {
00465     return strcmp(*this, thestr);
00466 }

bool UStr::empty ( void ) const [inline]

Check whether the string is empty

Returns:
true if the string is empty, false otherwise
Definition at line 347 of file ustr.h.

Referenced by AskCreatePersistentSettings(), CvsPrefs::Browser(), CompatGetCommit(), CSaveSettingsDlg::CSaveSettingsDlg(), CvsCmdFileAction(), CvsCmdLaunch(), cvsgui_PromptEditMessage(), TBrowserFillDummy::EnterDirectory(), CvsPrefs::ExtDiff(), find(), getLoc(), HasPersistentSettings(), CvsPrefs::Helper(), CvsPrefs::Home(), CvsPrefs::LastWorkingDir(), LoadPersistentSettings(), UCvsFolders::OnCreate(), CItemListDlg::OnInitDialog(), CCommit_MAIN::OnInitDialog(), ReportConflict::PrintOut(), CvsPrefs::PythonLibrary(), replace(), CWinCvsBrowser::ResetBrowser(), UCvsFolders::ResetBrowser(), UCvsFolders::ResetView(), CGraphView::RetrieveSel(), rfind(), CvsPrefs::RshName(), CMPString::rtCMPString(), rtrim(), SaveAsPersistentSettings(), SavePersistentSettings(), CvsPrefs::SettingsFolder(), CvsPrefs::SetWhichCvs(), substr(), CvsPrefs::TclLibrary(), trim(), CvsPrefs::Viewer(), and CvsPrefs::WhichCvs().

00348 {
00349     return m_str == 0L || m_str[0] == '\0';
00350 }

bool UStr::endsWith ( char c ) const [inline]

Check whether the string is ending with a given character

Parameters:
c The character to check
Returns:
true if the string ends with a character, false otherwise
Definition at line 473 of file ustr.h.

References length().

Referenced by BuildIgnoredList(), CompatGetCommit(), CvsCmdFileAction(), CvsCmdLaunch(), CvsCmdMoveToTrash(), Entries_Open(), EntnodePath::GetFullPathName(), UCvsFolders::GetItemByLocation(), getLoc(), MakeTmpFile(), CItemListDlg::OnInitDialog(), CCommit_MAIN::OnInitDialog(), UCvsFolders::OnUpdateGeneric(), CWinCvsBrowser::ResetBrowser(), UCvsFolders::ResetBrowser(), UCvsFolders::RetrievePath(), SaveAsPersistentSettings(), UCvsFolders::StepToLocation(), and CvsPrefs::WhichCvs().

00474 {
00475     return !length() ? false : m_str[length()-1] == c;
00476 }

Here is the call graph for this function:

int UStr::find ( char thechar ) const

Find a character

Parameters:
thechar Character to be found
Returns:
The position of the found character, zero if not found
Definition at line 848 of file ustr.cpp.

References empty(), m_str, and NULL.

00849 {
00850     if( !empty() )
00851     {
00852         char* buf;
00853         buf = strchr(m_str, thechar);
00854
00855         if( buf != NULL )
00856             return buf - m_str;
00857     }
00858
00859     return 0;
00860 }

Here is the call graph for this function:

int UStr::find ( const char * thestr ) const

Find a string

Parameters:
thestr String to be found
Returns:
The position of the found string, zero if not found
Definition at line 829 of file ustr.cpp.

References empty(), m_str, and NULL.

00830 {
00831     if( thestr != NULL && !empty() )
00832     {
00833         char* buf;
00834         buf = strstr(m_str, thestr);
00835
00836         if( buf != NULL )
00837             return buf - m_str;
00838     }
00839
00840     return 0;
00841 }

Here is the call graph for this function:

unsigned int UStr::length ( void ) const [inline]

Get the string length

Returns:
The string length
Definition at line 356 of file ustr.h.

Referenced by CompatGetPassword(), endsWith(), UCvsConsole::FeedThisLine(), UCvsFolders::GetItemByLocation(), GetMenuTitle(), EntnodeFile::GetRelativePath(), operator<<(), CBrowseFileView::ProcessSelectionCommand(), UCvsFiles::ProcessSelectionCommand(), PCStr::SizeOf(), UCvsFolders::StepToLocation(), and UPseudoPageHider::UPseudoPageHider().

00357 {
00358     return m_str == 0L ? 0 : strlen(m_str);
00359 }

UStr::operator const char * ( ) const [inline]

as a C string

Reimplemented in PCStr.

Definition at line 374 of file ustr.h.

00375 {
00376     return m_str == 0L ? "" : m_str;
00377 }

bool UStr::operator!= ( const char * str ) const [inline]

Compare, provided to compile with STL.

Definition at line 453 of file ustr.h.

00454 {
00455     return strcmp(*this, str) != 0;
00456 }

bool UStr::operator!= ( const UStr & str ) const [inline]

Compare, provided to compile with STL.

Definition at line 447 of file ustr.h.

00448 {
00449     return strcmp(*this, str) != 0;
00450 }

UStr & UStr::operator+= ( const UStr & addToStr ) [inline]

Concatenate.

Definition at line 408 of file ustr.h.

00409 {
00410     return *this << (const char*)addToStr;
00411 }

UStr & UStr::operator+= ( const char * addToStr ) [inline]

Concatenate.

Definition at line 402 of file ustr.h.

00403 {
00404     return *this << addToStr;
00405 }

UStr & UStr::operator+= ( int addToStr ) [inline]

Concatenate.

Definition at line 414 of file ustr.h.

00415 {
00416     return *this << addToStr;
00417 }

bool UStr::operator< ( const UStr & str ) const [inline]

compare Compare, provided to compile with STL

Definition at line 423 of file ustr.h.

00424 {
00425     return strcmp(*this, str) < 0;
00426 }

UStr & UStr::operator<< ( int addToStr )

Concatenate.

Definition at line 816 of file ustr.cpp.

00817 {
00818     char astr[50];
00819     sprintf(astr, "%d", addToStr);
00820
00821     return *this << astr;
00822 }

UStr & UStr::operator<< ( char addToStr )

Concatenate.

Definition at line 807 of file ustr.cpp.

00808 {
00809     char astr[2] = {'\0', '\0'};
00810     astr[0] = addToStr;
00811
00812     return *this << astr;
00813 }

UStr & UStr::operator<< ( const char * addToStr )

Concatenate.

Definition at line 775 of file ustr.cpp.

References clear(), length(), m_str, malloc, and UTHROW.

00776 {
00777     if( addToStr == 0L )
00778         return *this;
00779
00780     if( m_str == 0L )
00781     {
00782         *this = addToStr;
00783         return *this;
00784     }
00785
00786     unsigned int len = strlen(addToStr);
00787     if( len == 0 )
00788         return *this;
00789
00790     unsigned int curlen = length();
00791     char* newstr = (char*)malloc((len + curlen + 1) * sizeof(char));
00792     if( newstr == 0L )
00793         UTHROW(std::bad_alloc());
00794
00795     memcpy(newstr, m_str, curlen * sizeof(char));
00796     memcpy(newstr + curlen, addToStr, len * sizeof(char));
00797     newstr[len + curlen] = '\0';
00798
00799     clear();
00800
00801     m_str = newstr;
00802
00803     return *this;
00804 }

Here is the call graph for this function:

UStr & UStr::operator= ( const UStr & newstr )

Set according to another UStr.

Definition at line 723 of file ustr.cpp.

00724 {
00725     *this = (const char*)newstr;
00726
00727     return *this;
00728 }

UStr & UStr::operator= ( const unsigned char * newstr )

Set from a P String (0L is OK).

Reimplemented in PCStr.

Definition at line 702 of file ustr.cpp.

References clear(), m_str, malloc, and UTHROW.

00703 {
00704     if( newstr == 0L )
00705         newstr = (unsigned char*)"";
00706
00707     int l = newstr[0];
00708     char* newvalue = (char*)malloc((l + 1) * sizeof(char));
00709     if( newvalue == 0L )
00710         UTHROW(std::bad_alloc());
00711
00712     memcpy(newvalue, newstr + 1, l * sizeof(char));
00713     newvalue[l] = '\0';
00714
00715     clear();
00716
00717     m_str = newvalue;
00718
00719     return *this;
00720 }

Here is the call graph for this function:

UStr & UStr::operator= ( const char * newstr )

Set from a C String (0L is OK).

Reimplemented in PCStr.

Definition at line 682 of file ustr.cpp.

References clear(), m_str, malloc, and UTHROW.

00683 {
00684     if( newstr == 0L )
00685         newstr = "";
00686
00687     int l = strlen(newstr);
00688     char* newvalue = (char*)malloc((l + 1) * sizeof(char));
00689     if( newvalue == 0L )
00690         UTHROW(std::bad_alloc());
00691
00692     strcpy(newvalue, newstr);
00693
00694     clear();
00695
00696     m_str = newvalue;
00697
00698     return *this;
00699 }

Here is the call graph for this function:

bool UStr::operator== ( const char * str ) const [inline]

Compare, provided to compile with STL.

Definition at line 441 of file ustr.h.

00442 {
00443     return strcmp(*this, str) == 0;
00444 }

bool UStr::operator== ( const UStr & str ) const [inline]

Compare, provided to compile with STL.

Definition at line 435 of file ustr.h.

00436 {
00437     return strcmp(*this, str) == 0;
00438 }

bool UStr::operator> ( const UStr & str ) const [inline]

Compare, provided to compile with STL.

Definition at line 429 of file ustr.h.

00430 {
00431     return strcmp(*this, str) > 0;
00432 }

UStr & UStr::replace | ( | char | which,
 |  | char | bywhich
 | ) |

replace a character

Replace a character

Parameters:
which | Character to be replaced
bywhich | Character to replace
Returns:
Self
Definition at line 757 of file ustr.cpp.

References empty(), and m_str.

Referenced by FlatenSubFolders(), and NormalizeFileName().

00758 {
00759     if( !empty() )
00760     {
00761         char* buf = m_str;
00762         while( *buf )
00763         {
00764             if( *buf == which )
00765                 *buf++ = bywhich;
00766             else
00767                 buf++;
00768         }
00769     }
00770
00771     return *this;
00772 }

Here is the call graph for this function:

int UStr::rfind ( char thechar ) const

Reverse-find a character

Parameters:
thechar Character to be found
Returns:
The position of the found character, zero if not found
Definition at line 894 of file ustr.cpp.

References empty(), m_str, and NULL.

00895 {
00896     if( !empty() )
00897     {
00898         char* buf;
00899         buf = strrchr(m_str, thechar);
00900
00901         if( buf != NULL )
00902             return buf - m_str;
00903     }
00904
00905     return 0;
00906 }

Here is the call graph for this function:

int UStr::rfind ( const char * thestr ) const

Reverse-find a string

Parameters:
thestr String to be found
Returns:
The position of the found string, zero if not found
Definition at line 867 of file ustr.cpp.

References empty(), m_str, and NULL.

00868 {
00869     if( thestr != NULL && !empty() )
00870     {
00871         char* buf = m_str;
00872         char* last_buf = NULL;
00873
00874         while( buf )
00875         {
00876             last_buf = buf;
00877             buf++;
00878
00879             buf = strstr(buf, thestr);
00880         }
00881
00882         if( last_buf != NULL )
00883             return last_buf - m_str;
00884     }
00885
00886     return 0;
00887 }

Here is the call graph for this function:

UStr & UStr::rtrim ( const char * MatchList )

Definition at line 1000 of file ustr.cpp.

References empty(), and m_str.

01001 {
01002     if( !empty() )
01003     {
01004         char* p = m_str + strlen(m_str);
01005         for( ; p != m_str; --p)
01006         {
01007             if( !strchr( MatchList, *(p-1)) )
01008                 break;
01009         }
01010
01011         *p = '\0';
01012     }
01013
01014     return *this;
01015 }

Here is the call graph for this function:

UStr & UStr::rtrim ( char c )

Remove all Characters matching 'c' from end of string

Parameters:
c Character to be searched
Returns:
the modified UStr
Definition at line 983 of file ustr.cpp.

References empty(), and m_str.

Referenced by CFindSettings::CFindSettings(), CvsPrefs::Home(), CBrowseFileView::OnViewExplore(), CPersistent::SaveAllSettings(), and CvsPrefs::SetHome().

00984 {
00985     if( !empty() )
00986     {
00987         char* p = m_str + strlen(m_str);
00988         for( ; p != m_str; --p)
00989         {
00990             if( *(p-1) != c)
00991                 break;
00992         }
00993
00994         *p = '\0';
00995     }
00996
00997     return *this;
00998 }

Here is the call graph for this function:

UStr & UStr::set | ( | const char * | buf,
 |  | unsigned int | len
 | ) |

Set from a buffer.

Definition at line 731 of file ustr.cpp.

References clear(), m_str, malloc, and UAppConsole().

Referenced by cvsgui_RunCvs(), UCvsConsole::FeedThisLine(), GetEnvValue(), LPseudoWinAttachment::ListenToMessage(), LoadSettingsInternal(), UWidget::OnGetText(), UWidget::OnListGetInfo(), UPseudoRotButton::ReadIconsID(), UCvsFolders::StepToLocation(), substr(), UMakeBitmap(), UPseudoPageHider::UPseudoPageHider(), UPseudoPlaceHolder::UPseudoPlaceHolder(), and UStr().

00732 {
00733     clear();
00734
00735     if( len == 0 )
00736         return *this;
00737
00738     m_str = (char*)malloc((len + 1) * sizeof(char));
00739     if( m_str == 0L )
00740     {
00741         UAppConsole("Impossible to allocate %d bytes !\n", (len + 1) * sizeof(char));
00742         return *this;
00743     }
00744
00745     memcpy(m_str, buf, len * sizeof(char));
00746     m_str[len] = '\0';
00747
00748     return *this;
00749 }

Here is the call graph for this function:

UStr UStr::substr | ( | int | idx,
 |  | int | len
 | ) | const

Get substring as UStr

Parameters:
idx | Start index
len | Substring length
Returns:
new Substring
Definition at line 940 of file ustr.cpp.

References empty(), m_str, and set().

Referenced by GetExtension().

00941 {
00942     UStr rs;
00943
00944     if( !empty() )
00945     {
00946         int l = strlen (m_str);
00947
00948         if( idx < l )
00949         {
00950             rs.set(&m_str[idx], (idx + len < l) ? len : (l - idx));
00951         }
00952     }
00953
00954     return rs;
00955 }

Here is the call graph for this function:

UStr & UStr::trim ( char c = ' ' )

Remove all Characters matching 'c' from begin of string

Parameters:
c Character to be searched
Returns:
the modified UStr
Definition at line 962 of file ustr.cpp.

References empty(), and m_str.

00963 {
00964     if( !empty() )
00965     {
00966         const char *p = m_str;
00967
00968         while( *p && (*p == c))
00969             ++p;
00970
00971         if( p != m_str)
00972             *this = p;
00973     }
00974
00975     return *this;
00976 }

Here is the call graph for this function:

Member Data Documentation

char* UStr::m_str [protected]

The String Definition at line 156 of file ustr.h.

Referenced by clear(), find(), operator<<(), operator=(), replace(), rfind(), rtrim(), set(), substr(), and trim().

The documentation for this class was generated from the following files:
  • rf/ustr.h
  • rf/ustr.cpp
Generated on Sat Aug 7 22:56:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CStreamConsole Class Reference

CStreamConsole Class Reference

Class to implement stream console. More...

#include <AppGlue.h>

Inheritance diagram for CStreamConsole:

[legend]
Collaboration diagram for CStreamConsole:

[legend]
List of all members.

Public Member Functions

CStreamConsole (FILE *fileOut)

Detailed Description

Class to implement stream console.

Definition at line 143 of file AppGlue.h.

Constructor & Destructor Documentation

CStreamConsole::CStreamConsole ( FILE * fileOut )

Definition at line 945 of file AppGlue.cpp.

00946     : CCvsStreamConsole(fileOut, false)
00947 {
00948 }

The documentation for this class was generated from the following files:
  • common/AppGlue.h
  • common/AppGlue.cpp
Generated on Sat Aug 7 22:56:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSubclassWnd Class Reference

CSubclassWnd Class Reference

#include <Subclass.h>

Inheritance diagram for CSubclassWnd:

[legend]
Collaboration diagram for CSubclassWnd:

[legend]
List of all members.

Public Member Functions

DECLARE_DYNAMIC (CSubclassWnd)
CSubclassWnd ()
~CSubclassWnd ()
virtual BOOL | HookWindow (HWND hwnd)
virtual BOOL | HookWindow (CWnd *pWnd)
virtual BOOL | IsHooked ()

Protected Member Functions

virtual LRESULT | WindowProc (UINT msg, WPARAM wp, LPARAM lp)
virtual LRESULT | Default ()

Protected Attributes

HWND | m_hWnd
WNDPROC | m_pOldWndProc
CSubclassWnd * m_pNext

Friends

LRESULT CALLBACK | HookWndProc (HWND, UINT, WPARAM, LPARAM)

Constructor & Destructor Documentation

CSubclassWnd::CSubclassWnd ( )

Definition at line 59 of file Subclass.cpp.

References m_hWnd, m_pNext, m_pOldWndProc, and NULL.

00060 {
00061     m_pNext = NULL;
00062     m_pOldWndProc = NULL;
00063     m_hWnd  = NULL;
00064 }

CSubclassWnd::~CSubclassWnd ( )

Definition at line 66 of file Subclass.cpp.

References HookWindow(), m_hWnd, and NULL.

00067 {
00068     if (m_hWnd)
00069         HookWindow((HWND)NULL);     // unhook window
00070 }

Here is the call graph for this function:

Member Function Documentation

CSubclassWnd::DECLARE_DYNAMIC ( CSubclassWnd )

LRESULT CSubclassWnd::Default ( ) [protected, virtual]

Definition at line 115 of file Subclass.cpp.

References WindowProc().

00116 {
00117     // MFC stores current MSG in thread state
00118     MSG& curMsg = AfxGetThreadState()->m_lastSentMsg;
00119     // Note: must explicitly call CSubclassWnd::WindowProc to avoid infinte
00120     // recursion on virtual function
00121     return CSubclassWnd::WindowProc(curMsg.message, curMsg.wParam, curMsg.lParam);
00122 }

Here is the call graph for this function:

virtual BOOL CSubclassWnd::HookWindow ( CWnd * pWnd ) [inline, virtual]

Definition at line 61 of file Subclass.h.

00061 { return HookWindow(pWnd->GetSafeHwnd()); }

BOOL CSubclassWnd::HookWindow ( HWND hwnd ) [virtual]

Definition at line 77 of file Subclass.cpp.

References m_hWnd, m_pOldWndProc, NULL, and theHookMap.

Referenced by CCJMenuBarFrameHook::Install(), CSubclassWndMap::RemoveAll(), CCJMenuBarFrameHook::~CCJMenuBarFrameHook(), and ~CSubclassWnd().

00078 {
00079     ASSERT_VALID(this);
00080     if (hwnd) {
00081         // Hook the window
00082         ASSERT(m_hWnd==NULL);
00083         ASSERT(::IsWindow(hwnd));
00084         theHookMap.Add(hwnd, this);         // Add to map of hooks
00085
00086     } else if (m_hWnd) {
00087         // Unhook the window
00088         theHookMap.Remove(this);                // Remove from map
00089         m_pOldWndProc = NULL;
00090     }
00091     m_hWnd = hwnd;
00092     return TRUE;
00093 }

virtual BOOL CSubclassWnd::IsHooked ( ) [inline, virtual]

Definition at line 62 of file Subclass.h.

References NULL.

00062 { return m_hWnd!=NULL; }

LRESULT CSubclassWnd::WindowProc | ( | UINT | msg,
 |  | WPARAM | wp,
 |  | LPARAM | lp
 | ) | [protected, virtual]

Reimplemented in CCJMenuBarFrameHook.

Definition at line 103 of file Subclass.cpp.

References m_hWnd, m_pNext, and m_pOldWndProc.

Referenced by Default(), HookWndProc(), and CCJMenuBarFrameHook::WindowProc().

00104 {
00105 //  ASSERT_VALID(this);  // removed for speed
00106     ASSERT(m_pOldWndProc);
00107     return m_pNext ? m_pNext->WindowProc(msg, wp, lp) :
00108         ::CallWindowProc(m_pOldWndProc, m_hWnd, msg, wp, lp);
00109 }

Friends And Related Function Documentation

LRESULT CALLBACK HookWndProc | ( | HWND | hwnd,
 |  | UINT | msg,
 |  | WPARAM | wp,
 |  | LPARAM | lp
 | ) | [friend]

Definition at line 150 of file Subclass.cpp.

00151 {
00152 #ifdef _USRDLL
00153     // If this is a DLL, need to set up MFC state
00154     AFX_MANAGE_STATE(AfxGetStaticModuleState());
00155 #endif
00156
00157     // Set up MFC message state just in case anyone wants it
00158     // This is just like AfxCallWindowProc, but we can't use that because
00159     // a CSubclassWnd is not a CWnd.
00160     //
00161     MSG& curMsg = AfxGetThreadState()->m_lastSentMsg;
00162     MSG  oldMsg = curMsg;   // save for nesting
00163     curMsg.hwnd     = hwnd;
00164     curMsg.message = msg;
00165     curMsg.wParam  = wp;
00166     curMsg.lParam  = lp;
00167
00168     // Get hook object for this window. Get from hook map
00169     CSubclassWnd* pSubclassWnd = theHookMap.Lookup(hwnd);
00170     ASSERT(pSubclassWnd);
00171
00172     LRESULT lr;
00173     if (msg==WM_NCDESTROY) {
00174         // Window is being destroyed: unhook all hooks (for this window)
00175         // and pass msg to orginal window proc
00176         //
00177         WNDPROC wndproc = pSubclassWnd->m_pOldWndProc;
00178         theHookMap.RemoveAll(hwnd);
00179         lr = ::CallWindowProc(wndproc, hwnd, msg, wp, lp);
00180
00181     } else {
00182         // pass to msg hook
00183         lr = pSubclassWnd->WindowProc(msg, wp, lp);
00184     }
00185     curMsg = oldMsg;            // pop state
00186     return lr;
00187 }

Member Data Documentation

HWND CSubclassWnd::m_hWnd [protected]

Definition at line 73 of file Subclass.h.

Referenced by CSubclassWnd(), HookWindow(), CSubclassWndMap::Remove(), WindowProc(), and ~CSubclassWnd().

CSubclassWnd* CSubclassWnd::m_pNext [protected]

Definition at line 75 of file Subclass.h.

Referenced by CSubclassWndMap::Add(), CSubclassWnd(), CSubclassWndMap::Remove(), and WindowProc().

WNDPROC CSubclassWnd::m_pOldWndProc [protected]

Definition at line 74 of file Subclass.h.

Referenced by CSubclassWndMap::Add(), CSubclassWnd(), HookWindow(), HookWndProc(), CSubclassWndMap::Remove(), and WindowProc().

The documentation for this class was generated from the following files:
  • WinCvs/CJLib/Include/Subclass.h
  • WinCvs/CJLib/CJLibrary/Subclass.cpp
Generated on Sat Aug 7 22:56:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CSubclassWndMap Class Reference

CSubclassWndMap Class Reference

Inheritance diagram for CSubclassWndMap:

[legend]
Collaboration diagram for CSubclassWndMap:

[legend]
List of all members.

Public Member Functions

CSubclassWndMap ()
~CSubclassWndMap ()
void | Add (HWND hwnd, CSubclassWnd *pSubclassWnd)
void | Remove (CSubclassWnd *pSubclassWnd)
void | RemoveAll (HWND hwnd)
CSubclassWnd * | Lookup (HWND hwnd)

Static Public Member Functions

CSubclassWndMap & GetHookMap ()

Constructor & Destructor Documentation

CSubclassWndMap::CSubclassWndMap ( )

Definition at line 192 of file Subclass.cpp.

00193 {
00194 }

CSubclassWndMap::~CSubclassWndMap ( )

Definition at line 196 of file Subclass.cpp.

00197 {
00198 // This assert bombs when posting WM_QUIT, so I've deleted it.
00199 //  ASSERT(IsEmpty());  // all hooks should be removed!
00200 }

Member Function Documentation

void CSubclassWndMap::Add | ( | HWND | hwnd,
 |  | CSubclassWnd * | pSubclassWnd
 | ) |

Definition at line 218 of file Subclass.cpp.

References HookWndProc(), Lookup(), CSubclassWnd::m_pNext, CSubclassWnd::m_pOldWndProc, and NULL.

00219 {
00220     ASSERT(hwnd && ::IsWindow(hwnd));
00221
00222     // Add to front of list
00223     pSubclassWnd->m_pNext = Lookup(hwnd);
00224     SetAt(hwnd, pSubclassWnd);
00225
00226     if (pSubclassWnd->m_pNext==NULL) {
00227         // If this is the first hook added, subclass the window
00228         pSubclassWnd->m_pOldWndProc =
00229             (WNDPROC)SetWindowLong(hwnd, GWL_WNDPROC, (DWORD)HookWndProc);
00230
00231     } else {
00232         // just copy wndproc from next hook
00233         pSubclassWnd->m_pOldWndProc = pSubclassWnd->m_pNext->m_pOldWndProc;
00234     }
00235     ASSERT(pSubclassWnd->m_pOldWndProc);
00236 }

Here is the call graph for this function:

CSubclassWndMap & CSubclassWndMap::GetHookMap ( ) [static]

Definition at line 205 of file Subclass.cpp.

00206 {
00207     // By creating theMap here, C++ doesn't instantiate it until/unless
00208     // it's ever used! This is a good trick to use in C++, to
00209     // instantiate/initialize a static object the first time it's used.
00210     //
00211     static CSubclassWndMap theMap;
00212     return theMap;
00213 }

CSubclassWnd * CSubclassWndMap::Lookup ( HWND hwnd )

Definition at line 279 of file Subclass.cpp.

References NULL.

Referenced by Add(), Remove(), and RemoveAll().

00280 {
00281     CSubclassWnd* pFound = NULL;
00282     if (!CMapPtrToPtr::Lookup(hwnd, (void*&)pFound))
00283         return NULL;
00284     ASSERT_KINDOF(CSubclassWnd, pFound);
00285     return pFound;
00286 }

void CSubclassWndMap::Remove ( CSubclassWnd * pSubclassWnd )

Definition at line 241 of file Subclass.cpp.

References Lookup(), CSubclassWnd::m_hWnd, CSubclassWnd::m_pNext, and CSubclassWnd::m_pOldWndProc.

00242 {
00243     HWND hwnd = pUnHook->m_hWnd;
00244     ASSERT(hwnd && ::IsWindow(hwnd));
00245
00246     CSubclassWnd* pHook = Lookup(hwnd);
00247     ASSERT(pHook);
00248     if (pHook==pUnHook) {
00249         // hook to remove is the one in the hash table: replace w/next
00250         if (pHook->m_pNext)
00251             SetAt(hwnd, pHook->m_pNext);
00252         else {
00253             // This is the last hook for this window: restore wnd proc
00254             RemoveKey(hwnd);
00255             SetWindowLong(hwnd, GWL_WNDPROC, (DWORD)pHook->m_pOldWndProc);
00256         }
00257     } else {
00258         // Hook to remove is in the middle: just remove from linked list
00259         while (pHook->m_pNext!=pUnHook)
00260             pHook = pHook->m_pNext;
00261         ASSERT(pHook && pHook->m_pNext==pUnHook);
00262         pHook->m_pNext = pUnHook->m_pNext;
00263     }
00264 }

Here is the call graph for this function:

void CSubclassWndMap::RemoveAll ( HWND hwnd )

Definition at line 269 of file Subclass.cpp.

References CSubclassWnd::HookWindow(), Lookup(), and NULL.

00270 {
00271     CSubclassWnd* pSubclassWnd;
00272     while ((pSubclassWnd = Lookup(hwnd))!=NULL)
00273         pSubclassWnd->HookWindow((HWND)NULL);   // (unhook)
00274 }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • WinCvs/CJLib/CJLibrary/Subclass.cpp
Generated on Sat Aug 7 22:56:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTabCtrl Class Reference

CTabCtrl Class Reference

Inheritance diagram for CTabCtrl:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJTabCtrl.h
Generated on Sat Aug 7 22:56:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TAdorner Class Reference

TAdorner Class Reference

Inheritance diagram for TAdorner:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:56:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTag_MAIN Class Reference

CTag_MAIN Class Reference

#include <TagDlg.h>

Inheritance diagram for CTag_MAIN:

[legend]
Collaboration diagram for CTag_MAIN:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_TAG_MAIN }

Public Member Functions

CTag_MAIN (const MultiFiles *mf, const kTagCmdType type, const char *sLastTag, bool noRecurs, bool movDelBranch, bool checkUnmod=false, bool overwriteExisting=false)
~CTag_MAIN ()

Public Attributes

CStatic | m_tagDescStatic
CButton | m_grpBox
CButton | m_overwriteExistingCheck
CButton | m_checkUnmodCheck
CSmartComboBox m_tagCombo
BOOL | m_noRecurs
BOOL | m_checkUnmod
BOOL | m_overwriteExisting
CString | m_tagName
BOOL | m_movDelBranch

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize controls.
afx_msg void | OnBrowseTag ()
BN_CLICKED message handler, select tag.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf
kTagCmdType m_type

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 65 of file TagDlg.h.
00065 { IDD = IDD_TAG_MAIN };

Constructor & Destructor Documentation

CTag_MAIN::CTag_MAIN | ( | const MultiFiles * | mf,
 |  | const kTagCmdType | type,
 |  | const char * | sLastTag,
 |  | bool | noRecurs,
 |  | bool | movDelBranch,
 |  | bool | checkUnmod = false,
 |  | bool | overwriteExisting = false
 | ) |

Definition at line 69 of file TagDlg.cpp.

References gRevNames.

00073                      : m_mf(mf), CHHelpPropertyPage(CTag_MAIN::IDD)
00074 {
00075     //{{AFX_DATA_INIT(CTag_MAIN)
00076     //}}AFX_DATA_INIT
00077
00078     m_type = type;
00079
00080     m_noRecurs = noRecurs;
00081     m_movDelBranch = movDelBranch;
00082     m_checkUnmod = checkUnmod;
00083     m_overwriteExisting = overwriteExisting;
00084     m_tagName = sLastTag;
00085
00086     m_tagCombo.SetItems(&gRevNames);
00087 }

CTag_MAIN::~CTag_MAIN ( )

Definition at line 89 of file TagDlg.cpp.

00090 {
00091 }

Member Function Documentation

void CTag_MAIN::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 93 of file TagDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_CHECK_UNMODIFIED, IDC_GRPBOX_TEXT, IDC_MOVDEL_BRANCH, IDC_NORECURS, IDC_OVERWRITE, IDC_TAGDESC_TEXT, IDC_TAGNAME, m_checkUnmod, m_checkUnmodCheck, m_grpBox, m_movDelBranch, m_noRecurs, m_overwriteExisting, m_overwriteExistingCheck, m_tagCombo, m_tagDescStatic, and m_tagName.

00094 {
00095     CHHelpPropertyPage::DoDataExchange(pDX);
00096     //{{AFX_DATA_MAP(CTag_MAIN)
00097     DDX_Control(pDX, IDC_TAGDESC_TEXT, m_tagDescStatic);
00098     DDX_Control(pDX, IDC_GRPBOX_TEXT, m_grpBox);
00099     DDX_Control(pDX, IDC_OVERWRITE, m_overwriteExistingCheck);
00100     DDX_Control(pDX, IDC_CHECK_UNMODIFIED, m_checkUnmodCheck);
00101     DDX_Control(pDX, IDC_TAGNAME, m_tagCombo);
00102     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00103     DDX_Check(pDX, IDC_CHECK_UNMODIFIED, m_checkUnmod);
00104     DDX_Check(pDX, IDC_OVERWRITE, m_overwriteExisting);
00105     DDX_CBString(pDX, IDC_TAGNAME, m_tagName);
00106     DDX_Check(pDX, IDC_MOVDEL_BRANCH, m_movDelBranch);
00107     //}}AFX_DATA_MAP
00108
00109     DDV_MinChars(pDX, m_tagName, 1);
00110     DDX_ComboMString(pDX, IDC_TAGNAME, m_tagCombo);
00111 }

Here is the call graph for this function:

void CTag_MAIN::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 160 of file TagDlg.cpp.

References IDC_BROWSE_TAG, IDC_CHECK_UNMODIFIED, IDC_MOVDEL_BRANCH, IDC_NORECURS, IDC_OVERWRITE, IDC_TAGNAME, IDH_IDC_BROWSE_TAG, IDH_IDC_CHECK_UNMODIFIED, IDH_IDC_MOVDEL_BRANCH, IDH_IDC_NORECURS, IDH_IDC_OVERWRITE, IDH_IDC_TAGNAME, and CHHelpSupport::SetCtrlHelpID().

00161 {
00162     SetCtrlHelpID(IDC_TAGNAME,          IDH_IDC_TAGNAME);
00163     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00164     SetCtrlHelpID(IDC_NORECURS,         IDH_IDC_NORECURS);
00165     SetCtrlHelpID(IDC_MOVDEL_BRANCH,    IDH_IDC_MOVDEL_BRANCH);
00166     SetCtrlHelpID(IDC_CHECK_UNMODIFIED, IDH_IDC_CHECK_UNMODIFIED);
00167     SetCtrlHelpID(IDC_OVERWRITE,        IDH_IDC_OVERWRITE);
00168 }

Here is the call graph for this function:

void CTag_MAIN::OnBrowseTag ( ) [protected]

BN_CLICKED message handler, select tag.

Definition at line 171 of file TagDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_tagCombo, and m_tagName.

00172 {
00173     CStr tagName;
00174     if( CompatGetTagListItem(m_mf, tagName) )
00175     {
00176         m_tagName = (const char*)tagName;
00177         m_tagCombo.SetWindowText(m_tagName);
00178     }
00179 }

Here is the call graph for this function:

BOOL CTag_MAIN::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 124 of file TagDlg.cpp.

References _i18n, kTagBranch, kTagCreate, kTagDelete, and CHHelpPropertyPage::OnInitDialog().

00125 {
00126     CHHelpPropertyPage::OnInitDialog();
00127
00128     // Set the type-specific data
00129     CString strGrpBox;
00130     CString strTagDesc;
00131
00132     switch( m_type )
00133     {
00134     case kTagCreate:
00135         strGrpBox = _i18n("Enter the tag name to create:");
00136         strTagDesc = _i18n("New tag &name:");
00137         break;
00138     case kTagDelete:
00139         strGrpBox = _i18n("Enter the tag name to delete:");
00140         strTagDesc = _i18n("Delete tag &name:");
00141
00142         m_checkUnmodCheck.ShowWindow(SW_HIDE);
00143         m_overwriteExistingCheck.ShowWindow(SW_HIDE);
00144         break;
00145     case kTagBranch:
00146         strGrpBox = _i18n("Enter the branch name to create:");
00147         strTagDesc = _i18n("New branch &name:");
00148         break;
00149     default:
00150         ASSERT(FALSE); //unknown type
00151     }
00152
00153     m_grpBox.SetWindowText(strGrpBox);
00154     m_tagDescStatic.SetWindowText(strTagDesc);
00155
00156     return TRUE;  // return TRUE unless you set the focus to a control
00157                   // EXCEPTION: OCX Property Pages should return FALSE
00158 }

Here is the call graph for this function:

Member Data Documentation

BOOL CTag_MAIN::m_checkUnmod

Definition at line 72 of file TagDlg.h.

Referenced by CompatGetTag(), and DoDataExchange().

CButton CTag_MAIN::m_checkUnmodCheck

Definition at line 69 of file TagDlg.h.

Referenced by DoDataExchange().

CButton CTag_MAIN::m_grpBox

Definition at line 67 of file TagDlg.h.

Referenced by DoDataExchange().

const MultiFiles* CTag_MAIN::m_mf [private]

Definition at line 96 of file TagDlg.h.

Referenced by OnBrowseTag().

BOOL CTag_MAIN::m_movDelBranch

Definition at line 75 of file TagDlg.h.

Referenced by CompatGetTag(), and DoDataExchange().

BOOL CTag_MAIN::m_noRecurs

Definition at line 71 of file TagDlg.h.

Referenced by CompatGetTag(), and DoDataExchange().

BOOL CTag_MAIN::m_overwriteExisting

Definition at line 73 of file TagDlg.h.

Referenced by CompatGetTag(), and DoDataExchange().

CButton CTag_MAIN::m_overwriteExistingCheck

Definition at line 68 of file TagDlg.h.

Referenced by DoDataExchange().

CSmartComboBox CTag_MAIN::m_tagCombo

Definition at line 70 of file TagDlg.h.

Referenced by DoDataExchange(), and OnBrowseTag().

CStatic CTag_MAIN::m_tagDescStatic

Definition at line 66 of file TagDlg.h.

Referenced by DoDataExchange().

CString CTag_MAIN::m_tagName

Definition at line 74 of file TagDlg.h.

Referenced by CompatGetTag(), DoDataExchange(), and OnBrowseTag().

kTagCmdType CTag_MAIN::m_type [private]

Definition at line 97 of file TagDlg.h.

The documentation for this class was generated from the following files:
  • common/TagDlg.h
  • common/TagDlg.cpp
Generated on Sat Aug 7 22:56:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: tagCTV_ITEM Struct Reference

tagCTV_ITEM Struct Reference

#include <CJTabView.h>

Collaboration diagram for tagCTV_ITEM:

[legend]
List of all members.

Public Attributes

CWnd * | pWnd
TCHAR | szLabel [32]

Member Data Documentation

CWnd* tagCTV_ITEM::pWnd

Definition at line 48 of file CJTabView.h.

Referenced by CCJTabView::AddView(), CCJTabView::GetView(), CCJTabView::OnWindowPosChanged(), and CCJTabView::SetActiveView().

TCHAR tagCTV_ITEM::szLabel[32]

Definition at line 49 of file CJTabView.h.

Referenced by CCJTabView::AddView().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/CJTabView.h
Generated on Sat Aug 7 22:56:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: tagMENUITEMINFOA Class Reference

tagMENUITEMINFOA Class Reference

Inheritance diagram for tagMENUITEMINFOA:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJMenu.h
Generated on Sat Aug 7 22:56:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTagParserConsole Class Reference

CTagParserConsole Class Reference

Class to parse tags/branches (obtained using cvs log or cvs rlog). More...

#include <ItemListDlg.h>

Inheritance diagram for CTagParserConsole:

[legend]
Collaboration diagram for CTagParserConsole:

[legend]
List of all members.

Public Member Functions

CTagParserConsole ()
virtual | ~CTagParserConsole ()
virtual void | Parse (int launchRes)

Detailed Description

Class to parse tags/branches (obtained using cvs log or cvs rlog).

Definition at line 114 of file ItemListDlg.h.

Constructor & Destructor Documentation

CTagParserConsole::CTagParserConsole ( )

Definition at line 149 of file ItemListDlg.cpp.

00150 {
00151 }

CTagParserConsole::~CTagParserConsole ( ) [virtual]

Definition at line 153 of file ItemListDlg.cpp.

00154 {
00155 }

Member Function Documentation

void CTagParserConsole::Parse ( int launchRes ) [virtual]

Virtual overridable to parse the result of browse command

Parameters:
launchRes The result of the command launch
Note:
Call default implementation after parsing is finished to clear the stored command output and store the launch result, the error output is not cleared however to allow further analysis

Implements CItemListConsole.

Definition at line 157 of file ItemListDlg.cpp.

References getline(), ItemRowInfo::m_description, CItemListConsole::Parse(), STR_ITEMLIST_BRANCH, and STR_ITEMLIST_REVISION.

00158 {
00159     bool btag = false;
00160
00161     string line;
00162
00163     while( getline(m_cvsOut, line) )
00164     {
00165         if( btag )
00166         {
00167             if( line.empty() || line.find("keyword substitution:") != string::npos )
00168             {
00169                 btag = false;
00170             }
00171             else
00172             {
00173                 stringstream stream;
00174                 string tag;
00175
00176                 stream << line;
00177                 stream >> tag;
00178
00179                 tag.erase(tag.find(':'), tag.size());
00180
00181                 if( !tag.empty() )
00182                 {
00183                     ItemRowInfo rowInfo;
00184                     string type;
00185
00186                     stream >> type;
00187
00188                     if( type.size() > 0 )
00189                     {
00190                         bool isBranch = false;
00191
00192                         const int dotsCount = count(type.begin(), type.end(), '.');
00193                         if( dotsCount > 2 && dotsCount % 2 )
00194                         {
00195                             // If we have even and greater than two number of separated integers
00196                             // then check if it's a magic branch
00197                             string magicTest = type;
00198                             magicTest.erase(magicTest.find_last_of('.'), magicTest.size());
00199                             magicTest.erase(0, magicTest.find_last_of('.') + 1);
00200
00201                             if( !magicTest.empty() && magicTest[0] == '0' )
00202                             {
00203                                 isBranch = true;
00204                             }
00205                         }
00206                         else if( dotsCount > 1 && !(dotsCount % 2) )
00207                         {
00208                             // We have an odd and greater than one number of integers, surely a branch
00209                             isBranch = true;
00210                         }
00211
00212                         // Set the type appropriate to findings
00213                         type = isBranch ? STR_ITEMLIST_BRANCH : STR_ITEMLIST_REVISION;
00214                     }
00215
00216                     ItemList::iterator i = m_itemList.find(tag);
00217                     if( i != m_itemList.end() )
00218                     {
00219                         if( !type.empty() )
00220                         {
00221                             (*i).second.m_description.insert(type);
00222                         }
00223                     }
00224                     else
00225                     {
00226                         if( !type.empty() )
00227                         {
00228                             rowInfo.m_description.insert(type);
00229                         }
00230
00231                         m_itemList.insert(std::make_pair(tag, rowInfo));
00232                     }
00233                 }
00234             }
00235         }
00236
00237         if( line.find("symbolic names:") != string::npos )
00238         {
00239             btag = true;
00240         }
00241     }
00242
00243     CItemListConsole::Parse(launchRes);
00244 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/ItemListDlg.h
  • common/ItemListDlg.cpp
Generated on Sat Aug 7 22:56:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: tagTCB_ITEM Struct Reference

tagTCB_ITEM Struct Reference

#include <CJTabCtrlBar.h>

Collaboration diagram for tagTCB_ITEM:

[legend]
List of all members.

Public Attributes

CWnd * | pWnd
CString | szTabLabel
CString | szToolTipLabel
UINT | uiToolTipId

Member Data Documentation

CWnd* tagTCB_ITEM::pWnd

Definition at line 169 of file CJTabCtrlBar.h.

Referenced by CCJTabCtrlBar::CreateTabListItem(), CCJTabCtrlBar::DeleteView(), CCJTabCtrlBar::GetView(), CCJTabCtrlBar::GetViewName(), CCJTabCtrlBar::OnWindowPosChanged(), CCJTabCtrlBar::RemoveListItem(), CCJTabCtrlBar::SetActiveView(), and CCJTabCtrlBar::SetViewToolTip().

CString tagTCB_ITEM::szTabLabel

Definition at line 170 of file CJTabCtrlBar.h.

Referenced by CCJTabCtrlBar::CreateTabListItem(), and CCJTabCtrlBar::GetViewName().

CString tagTCB_ITEM::szToolTipLabel

Definition at line 171 of file CJTabCtrlBar.h.

Referenced by CCJTabCtrlBar::CreateTabListItem(), CCJTabCtrlBar::ResetToolTips(), and CCJTabCtrlBar::SetViewToolTip().

UINT tagTCB_ITEM::uiToolTipId

Definition at line 172 of file CJTabCtrlBar.h.

Referenced by CCJTabCtrlBar::AddToolTip(), CCJTabCtrlBar::CreateTabListItem(), CCJTabCtrlBar::ResetToolTips(), and CCJTabCtrlBar::SetViewToolTip().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/CJTabCtrlBar.h
Generated on Sat Aug 7 22:56:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UTB_BUTTON Struct Reference

UTB_BUTTON Struct Reference

#include <umain.h>

Collaboration diagram for UTB_BUTTON:

[legend]
List of all members.

Public Attributes

const void * | icon
int cmd
UTB_VAR varcode
UTB_DROP drop
const char * | tooltip

Member Data Documentation

int UTB_BUTTON::cmd

Definition at line 945 of file umain.h.

Referenced by UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), and UToolbar::OnTbDropDown().

UTB_DROP UTB_BUTTON::drop

Definition at line 947 of file umain.h.

const void* UTB_BUTTON::icon

Definition at line 944 of file umain.h.

Referenced by UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), and UToolbar::OnTbDropDown().

const char* UTB_BUTTON::tooltip

Definition at line 948 of file umain.h.

Referenced by UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), and UToolbar::OnTbDropDown().

UTB_VAR UTB_BUTTON::varcode

Definition at line 946 of file umain.h.

Referenced by UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), and UToolbar::OnTbDropDown().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:56:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UTB_DROPDOWN Struct Reference

UTB_DROPDOWN Struct Reference

#include <umain.h>

Collaboration diagram for UTB_DROPDOWN:

[legend]
List of all members.

Public Attributes

int initialcmd
UTB_BUTTON * btns
const char * tooltip

Member Data Documentation

UTB_BUTTON* UTB_DROPDOWN::btns

Definition at line 954 of file umain.h.

Referenced by UToolbar::OnTbDropDown().

int UTB_DROPDOWN::initialcmd

Definition at line 953 of file umain.h.

Referenced by UToolbar::OnTbDropDown().

const char* UTB_DROPDOWN::tooltip

Definition at line 955 of file umain.h.

Referenced by UToolbar::OnTbDropDown().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:56:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UTB_INIT Struct Reference

UTB_INIT Struct Reference

#include <umain.h>

Collaboration diagram for UTB_INIT:

[legend]
List of all members.

Public Attributes

int widthbtn
int heightbtn
const char * title
int winid

Member Data Documentation

int UTB_INIT::heightbtn

Definition at line 925 of file umain.h.

Referenced by CreateBrowseToolbar(), CreateFilterToolbar(), CreateMainToolbar(), and UToolbar::OnTbInit().

const char* UTB_INIT::title

Definition at line 926 of file umain.h.

Referenced by CreateBrowseToolbar(), CreateFilterToolbar(), CreateMainToolbar(), and UToolbar::OnTbInit().

int UTB_INIT::widthbtn

Definition at line 925 of file umain.h.

Referenced by CreateBrowseToolbar(), CreateFilterToolbar(), CreateMainToolbar(), and UToolbar::OnTbInit().

int UTB_INIT::winid

Definition at line 928 of file umain.h.

Referenced by UToolbar::OnTbInit().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:56:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TBehavior Class Reference

TBehavior Class Reference

Inheritance diagram for TBehavior:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:56:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TbEntry Class Reference

TbEntry Class Reference

Inheritance diagram for TbEntry:

[legend]
Collaboration diagram for TbEntry:

[legend]
List of all members.

Public Member Functions

TbEntry (tbeKind k)
virtual ~TbEntry ()

Public Attributes

tbeKind kind

Constructor & Destructor Documentation

TbEntry::TbEntry ( tbeKind k ) [inline]

Definition at line 82 of file utoolbar.cpp.

References kind.

00082 : kind(k) {}

virtual TbEntry::~TbEntry ( ) [inline, virtual]

Definition at line 83 of file utoolbar.cpp.

00083 {}

Member Data Documentation

tbeKind TbEntry::kind

Definition at line 85 of file utoolbar.cpp.

Referenced by CDynToolBar::OnDropDownButton(), UToolbar::OnSetTooltip(), UToolbar::OnUpdateUI(), UToolbar::RebuildBar(), WININFO::Search(), TbEntry(), and UToolbar::UDispatchMessage().

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:56:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TbEntryButton Class Reference

TbEntryButton Class Reference

Inheritance diagram for TbEntryButton:

[legend]
Collaboration diagram for TbEntryButton:

[legend]
List of all members.

Public Member Functions

TbEntryButton (HBITMAP b, int c, const char *t, UTB_VAR v)
virtual ~TbEntryButton ()

Public Attributes

awidget wid
bool ischeck

Constructor & Destructor Documentation

TbEntryButton::TbEntryButton | ( | HBITMAP | b,
 |  | int | c,
 |  | const char * | t,
 |  | UTB_VAR | v
 | ) | [inline]

Definition at line 192 of file utoolbar.cpp.

References ischeck, tbeButton, and wid.

00192                                                               :
00193         TbEntry(tbeButton), wid(b, c, t, v), ischeck(false)
00194     {
00195     }
    virtual ~TbEntryButton()

virtual TbEntryButton::~TbEntryButton ( ) [inline, virtual]

Definition at line 196 of file utoolbar.cpp.

00197     {
00198     }

Member Data Documentation

bool TbEntryButton::ischeck

Definition at line 201 of file utoolbar.cpp.

Referenced by UToolbar::RebuildBar(), and TbEntryButton().

awidget TbEntryButton::wid

Definition at line 200 of file utoolbar.cpp.

Referenced by UToolbar::OnSetTooltip(), UToolbar::OnUpdateUI(), UToolbar::RebuildBar(), WININFO::Search(), and TbEntryButton().

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:56:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TbEntryChkButton Class Reference

TbEntryChkButton Class Reference

Inheritance diagram for TbEntryChkButton:

[legend]
Collaboration diagram for TbEntryChkButton:

[legend]
List of all members.

Public Member Functions

TbEntryChkButton (HBITMAP b, int c, const char *t, UTB_VAR v)
virtual ~TbEntryChkButton ()

Constructor & Destructor Documentation

TbEntryChkButton::TbEntryChkButton | ( | HBITMAP | b,
 |  | int | c,
 |  | const char * | t,
 |  | UTB_VAR | v
 | ) | [inline]

Definition at line 207 of file utoolbar.cpp.

00207                                                                  :
00208         TbEntryButton(b, c, t, v)
00209     {
00210         ischeck = true;
00211     }
    virtual ~TbEntryChkButton()

virtual TbEntryChkButton::~TbEntryChkButton ( ) [inline, virtual]

Definition at line 212 of file utoolbar.cpp.

00213     {
00214     }

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:56:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TbEntryDropDown Class Reference

TbEntryDropDown Class Reference

Inheritance diagram for TbEntryDropDown:

[legend]
Collaboration diagram for TbEntryDropDown:

[legend]
List of all members.

Public Member Functions

TbEntryDropDown ()
virtual | ~TbEntryDropDown ()

Public Attributes

std::vector< awidget > | icons
int current

Constructor & Destructor Documentation

TbEntryDropDown::TbEntryDropDown ( ) [inline]

Definition at line 220 of file utoolbar.cpp.

References current, and tbeDropDown.

00220 : TbEntry(tbeDropDown), current(0) {}

virtual TbEntryDropDown::~TbEntryDropDown ( ) [inline, virtual]

Definition at line 221 of file utoolbar.cpp.

00222     {
00223     }

Member Data Documentation

int TbEntryDropDown::current

Definition at line 226 of file utoolbar.cpp.

Referenced by UToolbar::OnTbDropDown(), UToolbar::RebuildBar(), TbEntryDropDown(), and UToolbar::UDispatchMessage().

std::vector<awidget> TbEntryDropDown::icons

Definition at line 225 of file utoolbar.cpp.

Referenced by CDynToolBar::OnDropDownButton(), UToolbar::OnSetTooltip(), UToolbar::OnTbDropDown(), UToolbar::RebuildBar(), and WININFO::Search().

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:56:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TbEntrySeparator Class Reference

TbEntrySeparator Class Reference

Inheritance diagram for TbEntrySeparator:

[legend]
Collaboration diagram for TbEntrySeparator:

[legend]
List of all members.

Public Member Functions

TbEntrySeparator ()
virtual ~TbEntrySeparator ()

Constructor & Destructor Documentation

TbEntrySeparator::TbEntrySeparator ( ) [inline]

Definition at line 232 of file utoolbar.cpp.

References tbeSeparator.

00232 : TbEntry(tbeSeparator) {}

virtual TbEntrySeparator::~TbEntrySeparator ( ) [inline, virtual]

Definition at line 233 of file utoolbar.cpp.

00234     {
00235     }

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:56:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TBrowserFill Class Reference

TBrowserFill Class Reference

Class to create an item with all the subdirectories inside for a given path and a root item. More...

#include <WinCvsBrowser.h>

Inheritance diagram for TBrowserFill:

[legend]
Collaboration diagram for TBrowserFill:

[legend]
List of all members.

Public Member Functions

TBrowserFill (UCvsFolders *treeCtrl, UTREEITEM root, UTREEITEM item, CSortList< ENTNODE > &entries)
virtual | ~TBrowserFill ()
virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
TBrowserFill (CTreeCtrl &treeCtrl, HTREEITEM root, HTREEITEM item, CSortList< ENTNODE > &entries)
bool | IsHideMissing () const
Get the hide missing filter.

Public Attributes

UTREEITEM m_root
UTREEITEM m_item
UCvsFolders * m_treeCtrl
CSortList< ENTNODE > & m_entries
std::vector< UStr > | m_ignlist
bool m_isShowIgnored

Private Member Functions

virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Private Attributes

HTREEITEM | m_root
HTREEITEM | m_item
CTreeCtrl & m_treeCtrl
bool m_hascvs
CSortList< ENTNODE > & m_entries
vector< UStr > m_ignlist
bool m_isHideUnknown
bool m_isHideMissing

Detailed Description

Class to create an item with all the subdirectories inside for a given path and a root item.

Definition at line 362 of file UCvsFolders.cpp.

Constructor & Destructor Documentation

TBrowserFill::TBrowserFill | ( | UCvsFolders * | treeCtrl,
 |  | UTREEITEM | root,
 |  | UTREEITEM | item,
 |  | CSortList< ENTNODE > & | entries
 | ) | [inline]

Definition at line 372 of file UCvsFolders.cpp.

References UCvsApp::GetIgnoreModel(), KiIgnoreModel::IsShowIgnored(), m_entries, m_isShowIgnored, m_item, m_root, m_treeCtrl, and UTREEITEM.

00372                                                                                                       :
00373             m_root(root), m_item(item), m_treeCtrl(treeCtrl),
00374             m_entries(entries), m_isShowIgnored(false)
00375     {
00376         if( UCvsApp* app = UCvsApp::gApp )
00377             m_isShowIgnored = app->GetIgnoreModel()->IsShowIgnored();
00378     }

Here is the call graph for this function:

virtual TBrowserFill::~TBrowserFill ( ) [inline, virtual]

Definition at line 380 of file UCvsFolders.cpp.

00380 {}

TBrowserFill::TBrowserFill | ( | CTreeCtrl & | treeCtrl,
 |  | HTREEITEM | root,
 |  | HTREEITEM | item,
 |  | CSortList< ENTNODE > & | entries
 | ) |

Definition at line 271 of file WinCvsBrowser.cpp.

References CWincvsApp::GetFilterModel(), KiFilterModel::GetFilters(), CWincvsApp::GetIgnoreModel(), KiIgnoreModel::IsShowIgnored(), kFilterHideMissing, kFilterHideUnknown, m_isHideMissing, m_isHideUnknown, and m_isShowIgnored.

00272     : m_root(root), m_item(item), m_treeCtrl(treeCtrl), m_hascvs(false), m_entries(entries),
00273     m_isShowIgnored(false), m_isHideUnknown(false), m_isHideMissing(false)
00274 {
00275     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
00276     {
00277         m_isShowIgnored = app->GetIgnoreModel()->IsShowIgnored();
00278         m_isHideUnknown = (app->GetFilterModel()->GetFilters() & kFilterHideUnknown) != 0;
00279         m_isHideMissing = (app->GetFilterModel()->GetFilters() & kFilterHideMissing) != 0;
00280     }
00281 }

Here is the call graph for this function:

Member Function Documentation

virtual kTraversal TBrowserFill::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFill::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 382 of file UCvsFolders.cpp.

References BuildIgnoredList(), Entries_Open(), FSSpec, kContinueTraversal, kTraversal, m_entries, m_ignlist, and m_item.

00383     {
00384         ASSERT(m_item != 0L);
00385
00386         // assign the entries to this item
00387         Entries_Open (m_entries, fullpath);
00388         BuildIgnoredList(m_ignlist, fullpath);
00389
00390         return kContinueTraversal;
00391     }

Here is the call graph for this function:

virtual kTraversal TBrowserFill::ExitDirectory ( const char * fullpath ) [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFill::ExitDirectory ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 393 of file UCvsFolders.cpp.

References UTREE_INFO::data, EV_TREE_GETINFO, EV_TREE_SETICON, GetIcon(), UCmdTarget::GetWidID(), UTREE_INFO::icon, UTREE_INFO::item, kContinueTraversal, kTraversal, kUMainWidget, m_ignlist, m_item, m_treeCtrl, and UEventSendMessage().

00394     {
00395         m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00396
00397         UTREE_INFO query;
00398         query.item = m_item;
00399         UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00400         query.icon = GetIcon(m_treeCtrl, m_item, true /*ignored*/, true, (EntnodeData *)query.data);
00401         UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_SETICON, kUMainWidget, &query);
00402
00403         return kContinueTraversal;
00404     }

Here is the call graph for this function:

bool TBrowserFill::IsHideMissing ( ) const

Get the hide missing filter.

Definition at line 354 of file WinCvsBrowser.cpp.

References m_isHideMissing.

Referenced by CWinCvsBrowser::OnItemexpanding().

00355 {
00356     return m_isHideMissing;
00357 }

virtual kTraversal TBrowserFill::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFill::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 416 of file UCvsFolders.cpp.

References Entries_SetVisited(), EV_TREE_SETICON, FileTraverse(), FSSpec, GetIcon(), UCmdTarget::GetWidID(), UTREE_INFO::icon, EntnodeData::IsIgnored(), UTREE_INFO::item, kSkipFile, kTraversal, kUMainWidget, m_entries, m_ignlist, m_isShowIgnored, TBrowserFillDummy::m_item, m_item, m_treeCtrl, and UEventSendMessage().

00420     {
00421 #if qUnix
00422         if(strcmp(name, "CVS") == 0)
00423 #else
00424         if(stricmp(name, "cvs") == 0)
00425 #endif
00426             return kSkipFile;
00427
00428         // is the sub-directory ignored ?
00429         EntnodeData *data = Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00430         if(!m_isShowIgnored && data->IsIgnored())
00431             return kSkipFile;
00432
00433 #if qUnix
00434         // suppress hidden directories
00435         if( name[0] == '.')
00436             return kSkipFile;
00437 #endif
00438
00439         // create the item for the sub-directory
00440         TBrowserFillDummy traverse(m_treeCtrl, m_item, 0L, data);
00441         /*kTraversal res = */FileTraverse(fullname, traverse);
00442
00443         // assign the icon regarding our Entries info
00444         if(traverse.m_item != 0L)
00445         {
00446             UTREE_INFO query;
00447             query.item = traverse.m_item;
00448             query.icon = GetIcon(m_treeCtrl, m_item, true /*ignored*/, false, data);
00449             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_SETICON, kUMainWidget, &query);
00450         }
00451
00452         return kSkipFile;
00453     }

Here is the call graph for this function:

virtual kTraversal TBrowserFill::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFill::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 406 of file UCvsFolders.cpp.

References kTraversal, and kTraversalError.

00407     {
00408         return kTraversalError;
00409     }

virtual kTraversal TBrowserFill::OnIdle ( const char * fullpath ) [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFill::OnIdle ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 411 of file UCvsFolders.cpp.

References kContinueTraversal, and kTraversal.

00412     {
00413         return kContinueTraversal;
00414     }

Member Data Documentation

CSortList<ENTNODE>& TBrowserFill::m_entries [private]

Entries list Definition at line 102 of file WinCvsBrowser.h.

CSortList<ENTNODE>& TBrowserFill::m_entries

Definition at line 368 of file UCvsFolders.cpp.

Referenced by EnterDirectory(), OnDirectory(), and TBrowserFill().

bool TBrowserFill::m_hascvs [private]

CVS meta-data flag Definition at line 101 of file WinCvsBrowser.h.

vector< UStr > TBrowserFill::m_ignlist [private]

Ignore list Definition at line 103 of file WinCvsBrowser.h.

std::vector<UStr> TBrowserFill::m_ignlist

Definition at line 369 of file UCvsFolders.cpp.

Referenced by EnterDirectory(), ExitDirectory(), and OnDirectory().

bool TBrowserFill::m_isHideMissing [private]

Hide missing flag Definition at line 107 of file WinCvsBrowser.h.

Referenced by IsHideMissing(), and TBrowserFill().

bool TBrowserFill::m_isHideUnknown [private]

Hide unknown flag Definition at line 106 of file WinCvsBrowser.h.

Referenced by TBrowserFill().

bool TBrowserFill::m_isShowIgnored

Show ignored flag Definition at line 105 of file WinCvsBrowser.h.

Referenced by OnDirectory(), and TBrowserFill().

HTREEITEM TBrowserFill::m_item [private]

Current item handle Definition at line 98 of file WinCvsBrowser.h.

UTREEITEM TBrowserFill::m_item

Definition at line 366 of file UCvsFolders.cpp.

Referenced by EnterDirectory(), ExitDirectory(), OnDirectory(), and TBrowserFill().

HTREEITEM TBrowserFill::m_root [private]

Root item handle Definition at line 97 of file WinCvsBrowser.h.

UTREEITEM TBrowserFill::m_root

Definition at line 365 of file UCvsFolders.cpp.

Referenced by TBrowserFill().

CTreeCtrl& TBrowserFill::m_treeCtrl [private]

Tree control Definition at line 99 of file WinCvsBrowser.h.

UCvsFolders* TBrowserFill::m_treeCtrl

Definition at line 367 of file UCvsFolders.cpp.

Referenced by ExitDirectory(), OnDirectory(), and TBrowserFill().

The documentation for this class was generated from the following files:
  • common/UCvsFolders.cpp
  • WinCvs/WinCvsBrowser.h
  • WinCvs/WinCvsBrowser.cpp
Generated on Sat Aug 7 22:56:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TBrowserFillDummy Class Reference

TBrowserFillDummy Class Reference

Class to create an item with a dummy item inside if and only if the folder is not empty. More...

#include <WinCvsBrowser.h>

Inheritance diagram for TBrowserFillDummy:

[legend]
Collaboration diagram for TBrowserFillDummy:

[legend]
List of all members.

Public Member Functions

TBrowserFillDummy (UCvsFolders *treeCtrl, UTREEITEM root, UTREEITEM item, EntnodeData *data)
virtual | ~TBrowserFillDummy ()
virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
TBrowserFillDummy (CTreeCtrl &treeCtrl, HTREEITEM root, HTREEITEM item, EntnodeData *data)
HTREEITEM | GetItem () const
Get the current item.

Public Attributes

UTREEITEM m_root
UTREEITEM m_item
UCvsFolders * m_treeCtrl
bool m_empty
bool m_hascvs
EntnodeData * m_data
UStr m_dirname

Private Member Functions

virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Private Attributes

HTREEITEM | m_root
HTREEITEM | m_item
CTreeCtrl & m_treeCtrl
EntnodeData * m_data

Detailed Description

Class to create an item with a dummy item inside if and only if the folder is not empty.

Definition at line 247 of file UCvsFolders.cpp.

Constructor & Destructor Documentation

TBrowserFillDummy::TBrowserFillDummy | ( | UCvsFolders * | treeCtrl,
 |  | UTREEITEM | root,
 |  | UTREEITEM | item,
 |  | EntnodeData * | data
 | ) | [inline]

Definition at line 258 of file UCvsFolders.cpp.

References m_data, m_empty, m_hascvs, m_item, m_root, m_treeCtrl, and UTREEITEM.

00258                                                                                                 :
00259         m_root(root), m_item(item), m_treeCtrl(treeCtrl), m_empty(true),
00260         m_hascvs(false), m_data(data) {}

virtual TBrowserFillDummy::~TBrowserFillDummy ( ) [inline, virtual]

Definition at line 262 of file UCvsFolders.cpp.

00262 {}

TBrowserFillDummy::TBrowserFillDummy | ( | CTreeCtrl & | treeCtrl,
 |  | HTREEITEM | root,
 |  | HTREEITEM | item,
 |  | EntnodeData * | data
 | ) |

Definition at line 172 of file WinCvsBrowser.cpp.

00173     : m_root(root), m_item(item), m_treeCtrl(treeCtrl), m_empty(true), m_data(data), m_hascvs(false)
00174 {
00175 }

Member Function Documentation

virtual kTraversal TBrowserFillDummy::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFillDummy::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 264 of file UCvsFolders.cpp.

References UStr::empty(), FSSpec, kContinueTraversal, kTraversal, and m_dirname.

00265     {
00266         m_dirname = dirname;
00267 #if qUnix
00268         if(m_dirname.empty())
00269             m_dirname = fullpath; // '/'
00270 #endif
00271         return kContinueTraversal;
00272     }

Here is the call graph for this function:

virtual kTraversal TBrowserFillDummy::ExitDirectory ( const char * fullpath ) [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFillDummy::ExitDirectory ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 274 of file UCvsFolders.cpp.

References UTREE_INFO::data, UTREE_INSERT::data, EV_TREE_GETINFO, EV_TREE_INSERT, EV_TREE_SETDATA, gDummyFile, GetIcon(), UCmdTarget::GetWidID(), UTREE_INSERT::icon, UTREE_INFO::item, kContinueTraversal, kTraversal, kUMainWidget, m_data, m_dirname, m_empty, m_hascvs, m_item, m_root, m_treeCtrl, UTREE_INSERT::parent, EntnodeData::Ref(), UTREE_INSERT::result, UTREE_INSERT::title, UEventSendMessage(), and EntnodeData::UnRef().

00275     {
00276         if(m_item == 0L)
00277         {
00278             UTREE_INSERT insert;
00279             insert.parent = m_root;
00280             insert.icon = GetIcon(m_treeCtrl, m_item, m_hascvs, false, m_data);
00281             insert.title = m_dirname;
00282             insert.data = 0L;
00283             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_INSERT, kUMainWidget, &insert);
00284             m_item = insert.result;
00285         }
00286
00287         // assign the entries to this item
00288         UTREE_INFO query;
00289         query.item = m_item;
00290         if(m_data != 0L)
00291         {
00292             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00293             EntnodeData *data = (EntnodeData *)query.data;
00294
00295             if(m_data != 0L)
00296                 m_data->Ref();
00297
00298             query.data = m_data;
00299             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_SETDATA, kUMainWidget, &query);
00300
00301             if(data != 0L)
00302                 data->UnRef();
00303         }
00304         else
00305         {
00306             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00307             m_data = (EntnodeData *)query.data;
00308         }
00309
00310         if(m_empty)
00311             return kContinueTraversal;
00312
00313         // add a dummy item to simulate the folder
00314         // is not empty. This dummy item will be
00315         // replaced by a complete listing when the
00316         // node is expanding...
00317
00318         UTREE_INSERT insert;
00319         insert.parent = m_item;
00320         insert.icon = 0L;
00321         insert.title = gDummyFile;
00322         insert.data = 0L;
00323         UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_INSERT, kUMainWidget, &insert);
00324
00325         return kContinueTraversal;
00326     }

Here is the call graph for this function:

HTREEITEM TBrowserFillDummy::GetItem ( ) const [inline]

Get the current item.

Definition at line 85 of file WinCvsBrowser.h.

References m_item.

00085 { return m_item; };

virtual kTraversal TBrowserFillDummy::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFillDummy::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 342 of file UCvsFolders.cpp.

References FSSpec, kSkipFile, kTraversal, m_empty, and m_hascvs.

00346     {
00347 #if qUnix
00348         if(strcmp(name, "CVS") == 0)
00349 #else
00350         if(stricmp(name, "cvs") == 0)
00351 #endif
00352             m_hascvs = true;
00353         else
00354             m_empty = false;
00355
00356         return kSkipFile;
00357     }

virtual kTraversal TBrowserFillDummy::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFillDummy::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 328 of file UCvsFolders.cpp.

References cvs_err(), err, kTraversal, and kTraversalError.

00329     {
00330     cvs_err(err);
00331     cvs_err("\n");
00332     cvs_err(strerror(errcode));
00333     cvs_err("\n");
00334         return kTraversalError;
00335     }

Here is the call graph for this function:

virtual kTraversal TBrowserFillDummy::OnIdle ( const char * fullpath ) [private, virtual]

Reimplemented from TraversalReport.

kTraversal TBrowserFillDummy::OnIdle ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 337 of file UCvsFolders.cpp.

References kContinueTraversal, and kTraversal.

00338     {
00339         return kContinueTraversal;
00340     }

Member Data Documentation

EntnodeData* TBrowserFillDummy::m_data [private]

Node data Definition at line 71 of file WinCvsBrowser.h.

EntnodeData* TBrowserFillDummy::m_data

Definition at line 255 of file UCvsFolders.cpp.

Referenced by ExitDirectory(), and TBrowserFillDummy().

UStr TBrowserFillDummy::m_dirname

Definition at line 256 of file UCvsFolders.cpp.

Referenced by EnterDirectory(), and ExitDirectory().

bool TBrowserFillDummy::m_empty

Empty flag Definition at line 69 of file WinCvsBrowser.h.

Referenced by ExitDirectory(), OnDirectory(), and TBrowserFillDummy().

bool TBrowserFillDummy::m_hascvs

CVS meta-data flag Definition at line 70 of file WinCvsBrowser.h.

Referenced by ExitDirectory(), OnDirectory(), and TBrowserFillDummy().

HTREEITEM TBrowserFillDummy::m_item [private]

Current item handle Definition at line 67 of file WinCvsBrowser.h.

UTREEITEM TBrowserFillDummy::m_item

Definition at line 251 of file UCvsFolders.cpp.

Referenced by ExitDirectory(), GetItem(), TBrowserFill::OnDirectory(), UCvsFolders::ResetBrowser(), and TBrowserFillDummy().

HTREEITEM TBrowserFillDummy::m_root [private]

Root item handle Definition at line 66 of file WinCvsBrowser.h.

UTREEITEM TBrowserFillDummy::m_root

Definition at line 250 of file UCvsFolders.cpp.

Referenced by ExitDirectory(), and TBrowserFillDummy().

CTreeCtrl& TBrowserFillDummy::m_treeCtrl [private]

Tree control Definition at line 68 of file WinCvsBrowser.h.

UCvsFolders* TBrowserFillDummy::m_treeCtrl

Definition at line 252 of file UCvsFolders.cpp.

Referenced by ExitDirectory(), and TBrowserFillDummy().

The documentation for this class was generated from the following files:
  • common/UCvsFolders.cpp
  • WinCvs/WinCvsBrowser.h
  • WinCvs/WinCvsBrowser.cpp
Generated on Sat Aug 7 22:56:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TBuggyPopup Class Reference

TBuggyPopup Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TBuggyPopup:

[legend]
Collaboration diagram for TBuggyPopup:

[legend]
List of all members.

Protected Attributes

int fRealWidth

Private Member Functions

TBuggyPopup ()
virtual | ~TBuggyPopup ()
virtual void | ReadFields (CStream_AC *aStream)
virtual void | WriteFields (CStream_AC *aStream) const
virtual void | DoPostCreate (TDocument *itsDocument)

Private Attributes

MA_DECLARE_CLASS

Constructor & Destructor Documentation

TBuggyPopup::TBuggyPopup ( ) [private]

Definition at line 541 of file UPseudoSupport.cpp.

00542 {
00543 }

TBuggyPopup::~TBuggyPopup ( ) [private, virtual]

Definition at line 545 of file UPseudoSupport.cpp.

00546 {
00547 }

Member Function Documentation

void TBuggyPopup::DoPostCreate ( TDocument * itsDocument ) [private, virtual]

Definition at line 563 of file UPseudoSupport.cpp.

References fRealWidth.

00564 {
00565     if(fRealWidth > 0)
00566     {
00567         CViewRect r = GetExtent();
00568         Resize(CViewPoint(fRealWidth, r.Height()), true);
00569     }
00570 }

void TBuggyPopup::ReadFields ( CStream_AC * aStream ) [private, virtual]

Definition at line 549 of file UPseudoSupport.cpp.

References fRealWidth.

00550 {
00551     Inherited::ReadFields(aStream);
00552
00553     *aStream >> fRealWidth;
00554 }

void TBuggyPopup::WriteFields ( CStream_AC * aStream ) const [private, virtual]

Definition at line 556 of file UPseudoSupport.cpp.

References fRealWidth.

00557 {
00558     Inherited::WriteFields(aStream);
00559
00560     *aStream << fRealWidth;
00561 }

Member Data Documentation

int TBuggyPopup::fRealWidth [protected]

Definition at line 24 of file UPseudoSupport.h.

Referenced by DoPostCreate(), ReadFields(), and WriteFields().

TBuggyPopup::MA_DECLARE_CLASS [private]

Definition at line 15 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:56:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTcl_Interp Class Reference

CTcl_Interp Class Reference

TCL interpreter wrapper. More...

#include <TclGlue.h>

Collaboration diagram for CTcl_Interp:

[legend]
List of all members.

Public Member Functions

CTcl_Interp ()
~CTcl_Interp ()
kTclRes | DoScriptVar (const char *format,...)
kTclRes | DoScript (const char *script)
kTclRes | DoFile (const char *file)
operator Tcl_Interp * (void)
Get the TCL interpreter.
int | GetCvsLastErrorCode () const
Get the last error code.
void | SetCvsLastErrorCode (const int value)
Set the last error code.
bool | GetCvsExitOnError () const
Get the exit on error flag.
void | SetCvsExitOnError (const bool value)
Set the exit on error flag.

Static Public Member Functions

bool | IsAvail (const bool forceReload=false)
void | Unixfy (UStr &path)
void | Deunixfy (UStr &path)

Private Attributes

Tcl_Interp * | fInterp
int fLastErrorCode
bool fExitOnError

Detailed Description

TCL interpreter wrapper.

Definition at line 50 of file TclGlue.h.

Constructor & Destructor Documentation

CTcl_Interp::CTcl_Interp ( )

Definition at line 977 of file TclGlue.cpp.

References _TCL_CALLBACK, CStr, cvs_err(), fExitOnError, fInterp, fLastErrorCode, IsAvail(), MacrosGetLoc(), myTcl_CreateInterp(), Tcl_CreateCommand, Tcl_Init, Tcl_SetVar, Tcl_SourceRCFile, tclCvsBrowserProc(), tclCvsEntriesProc(), tclCvsErrProc(), tclCvsExitOnErrorProc(), tclCvsLastErrorCodeProc(), tclCvsOutProc(), tclCvsProc(), tclDirProc(), tclHelpProc(), and tclSafeRemove().

00978 {
00979     fInterp = 0L;
00980
00981     fExitOnError = true;
00982     fLastErrorCode = 0;
00983
00984 #if USE_TCL
00985     if( !CTcl_Interp::IsAvail() )
00986     {
00987         return;
00988     }
00989
00990     fInterp = myTcl_CreateInterp();
00991     if( fInterp == 0L )
00992     {
00993         cvs_err("Unable to create a new TCL interpreter !\n");
00994         return;
00995     }
00996
00997     Tcl_Command cmd;
00998
00999     // this parameter is used to get access to CTcl_Interp::SetCvsLastErrorCode
01000     // in tclCvsProc method
01001     cmd = Tcl_CreateCommand (fInterp, "cvs", _TCL_CALLBACK(tclCvsProc),
01002         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01003
01004     cmd = Tcl_CreateCommand (fInterp, "help", _TCL_CALLBACK(tclHelpProc),
01005         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01006     cmd = Tcl_CreateCommand (fInterp, "cvsout", _TCL_CALLBACK(tclCvsOutProc),
01007         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01008     cmd = Tcl_CreateCommand (fInterp, "cvserr", _TCL_CALLBACK(tclCvsErrProc),
01009         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01010     cmd = Tcl_CreateCommand (fInterp, "cvsbrowser", _TCL_CALLBACK(tclCvsBrowserProc),
01011         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01012     cmd = Tcl_CreateCommand (fInterp, "cvsentries", _TCL_CALLBACK(tclCvsEntriesProc),
01013         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01014 #ifdef WIN32
01015     cmd = Tcl_CreateCommand (fInterp, "ls", _TCL_CALLBACK(tclDirProc),
01016         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01017     cmd = Tcl_CreateCommand (fInterp, "dir", _TCL_CALLBACK(tclDirProc),
01018         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01019 #endif /* WIN32 */
01020     cmd = Tcl_CreateCommand (fInterp, "trash", _TCL_CALLBACK(tclSafeRemove),
01021         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01022
01023     cmd = Tcl_CreateCommand (fInterp, "cvsexitonerror", _TCL_CALLBACK(tclCvsExitOnErrorProc),
01024         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01025
01026     cmd = Tcl_CreateCommand (fInterp, "cvslasterrorcode", _TCL_CALLBACK(tclCvsLastErrorCodeProc),
01027         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01028 #if defined(WIN32)
01029 #   if ENABLE_WINCVSDEBUG
01030     cmd = Tcl_CreateCommand (fInterp, "cvssetdebugmask", _TCL_CALLBACK(tclSetDebugMaskProc),
01031         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01032     cmd = Tcl_CreateCommand (fInterp, "cvsgetdebugmask", _TCL_CALLBACK(tclGetDebugMaskProc),
01033         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01034     cmd = Tcl_CreateCommand (fInterp, "cvsfilemodtime", _TCL_CALLBACK(tclGetFileModTimeProc),
01035         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01036 #   endif   // ENABLE_WINCVSDEBUG
01037 #endif  // defined(WIN32)
01038
01039     CStr rcfile;
01040     MacrosGetLoc(rcfile);
01041
01042     if( !rcfile.endsWith(kPathDelimiter) )
01043         rcfile << kPathDelimiter;
01044
01045     rcfile << "startup.tcl";
01046
01047     Tcl_SetVar(fInterp, "tcl_rcFileName", rcfile, TCL_GLOBAL_ONLY);
01048     Tcl_SetVar(fInterp, "tcl_interactive", "1", TCL_GLOBAL_ONLY);
01049     Tcl_Init(fInterp);
01050     Tcl_SourceRCFile(fInterp);
01051 #endif
01052 }

Here is the call graph for this function:

CTcl_Interp::~CTcl_Interp ( )

Definition at line 1054 of file TclGlue.cpp.

References fInterp, and Tcl_DeleteInterp.

01055 {
01056 #if USE_TCL
01057     if( fInterp != 0L )
01058         Tcl_DeleteInterp(fInterp);
01059 #endif
01060 }

Member Function Documentation

void CTcl_Interp::Deunixfy ( UStr & path ) [static]

Normalize the path separator to use kPathDelimiter

Parameters:
path Return the normalized path
Definition at line 1282 of file TclGlue.cpp.

References kTCLPathDelimiter.

Referenced by CTCLBrowserEnt::GetNormalized(), CTCLBrowserEnt::IsSamePath(), tclCvsEntriesProc(), and tclSafeRemove().

01283 {
01284     if( kTCLPathDelimiter != kPathDelimiter )
01285     {
01286         path.replace (kTCLPathDelimiter, kPathDelimiter);
01287     }
01288 }

kTclRes CTcl_Interp::DoFile ( const char * file )

Execute a TCL script

Returns:
true on success, false otherwise
Definition at line 1235 of file TclGlue.cpp.

References cvs_errstr(), cvs_outstr(), fInterp, kTclRes, TCL_ERROR, and Tcl_EvalFile.

01236 {
01237 #if USE_TCL
01238     if( fInterp == 0L )
01239         return false;
01240
01241     int exitc = Tcl_EvalFile(fInterp, (char*)file);
01242     size_t len = strlen(fInterp->result);
01243     if( exitc == TCL_ERROR )
01244     {
01245         cvs_errstr(fInterp->result, len);
01246         if( len != 0 && fInterp->result[len - 1] != '\n' )
01247             cvs_errstr("\n", 1);
01248     }
01249     else
01250     {
01251         cvs_outstr(fInterp->result, len);
01252         if( len != 0 && fInterp->result[len - 1] != '\n' )
01253             cvs_outstr("\n", 1);
01254     }
01255
01256     return exitc;
01257 #else
01258     return false;
01259 #endif
01260 }

Here is the call graph for this function:

kTclRes CTcl_Interp::DoScript ( const char * script )

Execute a TCL script

Returns:
true on success, false otherwise
Definition at line 1169 of file TclGlue.cpp.

References cvs_errstr(), cvs_outstr(), fInterp, gCvsPrefs, kTclRes, CvsPrefs::SetTclFileRunning(), TCL_ERROR, and Tcl_Eval.

Referenced by DoScriptVar(), and CWincvsView::OnKeyDown().

01170 {
01171 #if USE_TCL
01172     bool bTclFileStarted;
01173
01174     if( fInterp == 0L )
01175         return false;
01176
01177     // If script cmd begins with "source " then this
01178     // must be TCL file execution.
01179     bTclFileStarted = (strncmp(script, "source ", 7) == 0);
01180     if( bTclFileStarted )
01181         gCvsPrefs.SetTclFileRunning(true);
01182
01183     int exitc = Tcl_Eval(fInterp, (char*)script);
01184
01185     if( bTclFileStarted )
01186         gCvsPrefs.SetTclFileRunning(false);
01187
01188     size_t len = strlen(fInterp->result);
01189     if( exitc == TCL_ERROR )
01190     {
01191         cvs_errstr(fInterp->result, len);
01192         if( len != 0 && fInterp->result[len - 1] != '\n' )
01193             cvs_errstr("\n", 1);
01194     }
01195     else
01196     {
01197         cvs_outstr(fInterp->result, len);
01198         if( len != 0 && fInterp->result[len - 1] != '\n' )
01199             cvs_outstr("\n", 1);
01200     }
01201
01202     return exitc;
01203 #else
01204     return false;
01205 #endif
01206 }

Here is the call graph for this function:

kTclRes CTcl_Interp::DoScriptVar | ( | const char * | format,
 |  |  | ...
 | ) |

Execute a TCL script

Returns:
true on success, false otherwise
Definition at line 1212 of file TclGlue.cpp.

References DoScript(), fInterp, and kTclRes.

Referenced by CvsCmdMacrosAdmin(), cvsgui_LaunchTclMacro(), UCvsFolders::OnCmdMacrosSel(), and UCvsFiles::OnMacroSel().

01213 {
01214 #if USE_TCL
01215     if( fInterp == 0L )
01216         return false;
01217
01218     va_list args;
01219     char script[1024] = {'\0'};
01220
01221     va_start(args, format);
01222     vsprintf(script, format, args);
01223     va_end(args);
01224
01225     return DoScript(script);
01226 #else
01227     return false;
01228 #endif
01229 }

Here is the call graph for this function:

bool CTcl_Interp::GetCvsExitOnError ( ) const [inline]

Get the exit on error flag.

Definition at line 106 of file TclGlue.h.

References fExitOnError.

Referenced by tclCvsProc().

00107 {
00108     return fExitOnError;
00109 }

int CTcl_Interp::GetCvsLastErrorCode ( ) const [inline]

Get the last error code.

Definition at line 94 of file TclGlue.h.

References fLastErrorCode.

Referenced by tclCvsLastErrorCodeProc().

00095 {
00096     return fLastErrorCode;
00097 }

bool CTcl_Interp::IsAvail ( const bool forceReload = false ) [static]

Check whether TCL is available and load if not

Parameters:
forceReload Force reload of Python library
Returns:
true if TCL is available, false otherwise
Definition at line 1067 of file TclGlue.cpp.

References CompatCloseLibrary(), CompatConnectID, CompatLoadLibrary(), gCvsPrefs, LOAD_CODEFRAG, myTcl_CreateInterp(), Tcl_Alloc, Tcl_AppendResult, Tcl_Concat, Tcl_CreateCommand, Tcl_CreateInterp, Tcl_DeleteInterp, Tcl_DStringAppendElement, Tcl_DStringEndSublist, Tcl_DStringFree, Tcl_DStringInit, Tcl_DStringResult, Tcl_DStringStartSublist, Tcl_Eval, Tcl_EvalFile, Tcl_ExprLong, Tcl_FindExecutable, Tcl_Free, Tcl_Init, Tcl_ListObjAppendElement, Tcl_NewListObj, Tcl_NewStringObj, Tcl_Realloc, Tcl_SetObjResult, Tcl_SetResult, Tcl_SetVar, Tcl_SetVar2, Tcl_SourceRCFile, TclFreeObj, and CvsPrefs::TclLibrary().

Referenced by CTcl_Interp(), CvsCmdMacrosAdmin(), cvsgui_LaunchTclMacro(), CWincvsApp::StartScriptEngine(), and UCvsApp::StartScriptEngine().

01068 {
01069 #if USE_TCL
01070     static bool firstTime = true;
01071     static bool tclAvail = false;
01072
01073     if( firstTime || forceReload )
01074     {
01075 #   if defined(WIN32) || qCarbon
01076         static CompatConnectID connID = 0L;
01077
01078         if( connID )
01079         {
01080             if( CompatCloseLibrary(&connID) )
01081             {
01082                 connID = 0L;
01083                 tclAvail = false;
01084             }
01085         }
01086 #   endif
01087
01088 #   ifdef WIN32
01089         if( !tclAvail )
01090         {
01091             tclAvail = (gCvsPrefs.TclLibrary() && CompatLoadLibrary(&connID, gCvsPrefs.TclLibrary())) ||
01092                 CompatLoadLibrary(&connID, "tcl87.dll") != 0 ||
01093                 CompatLoadLibrary(&connID, "tcl86.dll") != 0 ||
01094                 CompatLoadLibrary(&connID, "tcl85.dll") != 0 ||
01095                 CompatLoadLibrary(&connID, "tcl84.dll") != 0 ||
01096                 CompatLoadLibrary(&connID, "tcl83.dll") != 0 ||
01097                 CompatLoadLibrary(&connID, "tcl82.dll") != 0 ||
01098                 CompatLoadLibrary(&connID, "tcl81.dll") != 0;
01099         }
01100 #   endif
01101
01102 #   if TARGET_RT_MAC_MACHO
01103         tclAvail = CompatLoadLibrary(&connID, "/usr/lib/libtcl.dylib");
01104 #   endif
01105
01106 #   if defined(WIN32) || qCarbon
01107 #   define LOAD_CODEFRAG(name) \
01108         if( tclAvail ) \
01109             tclAvail = (*(void**)&name##_glue = \
01110                 _CompatCallLibrary(connID, #name)) != 0L
01111 #   endif
01112 #   if defined(WIN32) || TARGET_API_MAC_CARBON
01113         LOAD_CODEFRAG(Tcl_CreateCommand);
01114         LOAD_CODEFRAG(Tcl_CreateInterp);
01115         LOAD_CODEFRAG(Tcl_AppendResult);
01116         LOAD_CODEFRAG(Tcl_SetResult);
01117         LOAD_CODEFRAG(Tcl_DeleteInterp);
01118         LOAD_CODEFRAG(Tcl_Eval);
01119         LOAD_CODEFRAG(Tcl_EvalFile);
01120         LOAD_CODEFRAG(Tcl_Alloc);
01121         LOAD_CODEFRAG(Tcl_Free);
01122         LOAD_CODEFRAG(Tcl_Realloc);
01123         LOAD_CODEFRAG(Tcl_ExprLong);
01124         LOAD_CODEFRAG(Tcl_Concat);
01125         LOAD_CODEFRAG(Tcl_SetVar2);
01126         LOAD_CODEFRAG(Tcl_DStringStartSublist);
01127         LOAD_CODEFRAG(Tcl_DStringEndSublist);
01128         LOAD_CODEFRAG(Tcl_DStringFree);
01129         LOAD_CODEFRAG(Tcl_DStringInit);
01130         LOAD_CODEFRAG(Tcl_DStringResult);
01131         LOAD_CODEFRAG(Tcl_DStringAppendElement);
01132         LOAD_CODEFRAG(TclFreeObj);
01133         LOAD_CODEFRAG(Tcl_SetObjResult);
01134         LOAD_CODEFRAG(Tcl_NewStringObj);
01135         LOAD_CODEFRAG(Tcl_NewListObj);
01136         LOAD_CODEFRAG(Tcl_ListObjAppendElement);
01137         LOAD_CODEFRAG(Tcl_SourceRCFile);
01138         LOAD_CODEFRAG(Tcl_Init);
01139         LOAD_CODEFRAG(Tcl_SetVar);
01140         LOAD_CODEFRAG(Tcl_FindExecutable);
01141
01142         if( !tclAvail )
01143             return false;
01144 #   endif /* WIN32 */
01145
01146         Tcl_Interp* interp = myTcl_CreateInterp();
01147         tclAvail = interp != 0L;
01148         if( !tclAvail )
01149             return false;
01150
01151         Tcl_Init(interp);
01152
01153         /* Destroy the interp we needed just for this */
01154         Tcl_DeleteInterp(interp);
01155
01156         firstTime = false;
01157     }
01158
01159     return tclAvail;
01160 #else
01161     return false;
01162 #endif
01163 }

Here is the call graph for this function:

CTcl_Interp::operator Tcl_Interp * ( void ) [inline]

Get the TCL interpreter.

Definition at line 88 of file TclGlue.h.

References fInterp.

00089 {
00090     return fInterp;
00091 }

void CTcl_Interp::SetCvsExitOnError ( const bool value ) [inline]

Set the exit on error flag.

Definition at line 112 of file TclGlue.h.

References fExitOnError.

Referenced by tclCvsExitOnErrorProc().

00113 {
00114     fExitOnError = value;
00115 }

void CTcl_Interp::SetCvsLastErrorCode ( const int value ) [inline]

Set the last error code.

Definition at line 100 of file TclGlue.h.

References fLastErrorCode.

Referenced by tclCvsLastErrorCodeProc(), and tclCvsProc().

00101 {
00102     fLastErrorCode = value;
00103 }

void CTcl_Interp::Unixfy ( UStr & path ) [static]

Normalize the path separator to use kTCLPathDelimiter

Parameters:
path Return the normalized path
Definition at line 1266 of file TclGlue.cpp.

References kTCLPathDelimiter.

Referenced by CvsCmdMacrosAdmin(), cvsgui_LaunchTclMacro(), UCvsFolders::OnCmdMacrosSel(), UCvsFiles::OnMacroSel(), and tclCvsBrowserProc().

01267 {
01268     if( kTCLPathDelimiter != kPathDelimiter )
01269     {
01270         path.replace (kPathDelimiter, kTCLPathDelimiter);
01271     }
01272
01273
01274     path.rtrim (kTCLPathDelimiter);
01275
01276 }

Member Data Documentation

bool CTcl_Interp::fExitOnError [private]

Exit on error flag (TRUE = Exit TCL macro automatically in error, FALSE = Do not exit) Definition at line 62 of file TclGlue.h.

Referenced by CTcl_Interp(), GetCvsExitOnError(), and SetCvsExitOnError().

Tcl_Interp* CTcl_Interp::fInterp [private]

TCL interpreter Definition at line 59 of file TclGlue.h.

Referenced by CTcl_Interp(), DoFile(), DoScript(), DoScriptVar(), operator Tcl_Interp *(), and ~CTcl_Interp().

int CTcl_Interp::fLastErrorCode [private]

ErrorCode value from the last CVS command (cvslaunch) Definition at line 61 of file TclGlue.h.

Referenced by CTcl_Interp(), GetCvsLastErrorCode(), and SetCvsLastErrorCode().

The documentation for this class was generated from the following files:
  • common/TclGlue.h
  • common/TclGlue.cpp
Generated on Sat Aug 7 22:56:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTCLBrowserEnt Class Reference

CTCLBrowserEnt Class Reference

The tcl browser class entity. More...

Collaboration diagram for CTCLBrowserEnt:

[legend]
List of all members.

Public Member Functions

CTCLBrowserEnt ()
CTCLBrowserEnt (EntnodeData *data)
CTCLBrowserEnt (const CTCLBrowserEnt &ent)
~CTCLBrowserEnt ()
CTCLBrowserEnt & | operator= (const CTCLBrowserEnt &ent)
bool | IsSamePath (const char *pathstr) const
EntnodeData * | GetData () const
void | GetNormalized (UStr &path, UStr &fname) const
returns normalized path and file name (GetName() may return relative path)

Private Attributes

ENTNODE node

Detailed Description

The tcl browser class entity.

Definition at line 233 of file TclGlue.cpp.

Constructor & Destructor Documentation

CTCLBrowserEnt::CTCLBrowserEnt ( ) [inline]

Definition at line 236 of file TclGlue.cpp.

00237     {}

CTCLBrowserEnt::CTCLBrowserEnt ( EntnodeData * data ) [inline]

Definition at line 239 of file TclGlue.cpp.

References node.

00240         : node(data)
00241     {}

CTCLBrowserEnt::CTCLBrowserEnt ( const CTCLBrowserEnt & ent ) [inline]

Definition at line 243 of file TclGlue.cpp.

References node.

00244         : node(ent.node)
00245     {}

CTCLBrowserEnt::~CTCLBrowserEnt ( ) [inline]

Definition at line 247 of file TclGlue.cpp.

00248     {}

Member Function Documentation

EntnodeData* CTCLBrowserEnt::GetData ( void ) const [inline]

Definition at line 268 of file TclGlue.cpp.

References ENTNODE::Data(), and node.

00269     {
00270         return node.Data();
00271     }

Here is the call graph for this function:

void CTCLBrowserEnt::GetNormalized | ( | UStr & | path,
 |  | UStr & | fname
 | ) | const [inline]

returns normalized path and file name (GetName() may return relative path)

Definition at line 274 of file TclGlue.cpp.

References CStr, ENTNODE::Data(), CTcl_Interp::Deunixfy(), EntnodeData::GetFullPathName(), node, and SplitPath().

00275     {
00276         CStr file;
00277         node.Data()->GetFullPathName(file);
00278         CTcl_Interp::Deunixfy(file);
00279         SplitPath(file, path, fname);
00280     }

Here is the call graph for this function:

bool CTCLBrowserEnt::IsSamePath ( const char * pathstr ) const [inline]

Definition at line 256 of file TclGlue.cpp.

References CStr, ENTNODE::Data(), CTcl_Interp::Deunixfy(), EntnodeData::GetFullPathName(), and node.

00257     {
00258         CStr path = pathstr;
00259         CTcl_Interp::Deunixfy(path);
00260
00261         CStr file;
00262         node.Data()->GetFullPathName(file);
00263         CTcl_Interp::Deunixfy(file);
00264
00265         return path.compare(file) == 0;
00266     }

Here is the call graph for this function:

CTCLBrowserEnt& CTCLBrowserEnt::operator= ( const CTCLBrowserEnt & ent ) [inline]

Definition at line 250 of file TclGlue.cpp.

References node.

00251     {
00252         node = ent.node;
00253         return *this;
00254     }

Member Data Documentation

ENTNODE CTCLBrowserEnt::node [private]

Definition at line 283 of file TclGlue.cpp.

Referenced by CTCLBrowserEnt(), GetData(), GetNormalized(), IsSamePath(), and operator=().

The documentation for this class was generated from the following file:
  • common/TclGlue.cpp
Generated on Sat Aug 7 22:56:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTCLCvsConsole Class Reference

CTCLCvsConsole Class Reference

TCL console. More...

Inheritance diagram for CTCLCvsConsole:

[legend]
Collaboration diagram for CTCLCvsConsole:

[legend]
List of all members.

Public Member Functions

CTCLCvsConsole (Tcl_Interp *interp)
virtual | ~CTCLCvsConsole ()
virtual long | cvs_out (const char *txt, long len)
virtual long | cvs_err (const char *txt, long len)

Protected Attributes

Tcl_Interp * | fInterp
int fLen
char * | fAlloc

Detailed Description

TCL console.

Definition at line 289 of file TclGlue.cpp.

Constructor & Destructor Documentation

CTCLCvsConsole::CTCLCvsConsole ( Tcl_Interp * interp ) [inline]

Definition at line 292 of file TclGlue.cpp.

References fAlloc, fInterp, fLen, and malloc.

00292                                        : fInterp(interp)
00293     {
00294         fLen = 100;
00295         fAlloc = (char*)malloc((fLen + 1) * sizeof(char));
00296     }

virtual CTCLCvsConsole::~CTCLCvsConsole ( ) [inline, virtual]

Definition at line 298 of file TclGlue.cpp.

References fAlloc, and free.

00299     {
00300         if( fAlloc != 0L )
00301             free(fAlloc);
00302     }

Member Function Documentation

virtual long CTCLCvsConsole::cvs_err | ( | const char * | txt,
 |  | long | len
 | ) | [inline, virtual]

Stderr handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 325 of file TclGlue.cpp.

References cvs_out().

00326     {
00327         return cvs_out(txt, len);
00328     }

Here is the call graph for this function:

virtual long CTCLCvsConsole::cvs_out | ( | const char * | txt,
 |  | long | len
 | ) | [inline, virtual]

Stdout handler

Parameters:
txt | Text
len | Text length
Returns:
The character count written to the console

Implements CCvsConsole.

Definition at line 304 of file TclGlue.cpp.

References fAlloc, fInterp, fLen, realloc, and Tcl_AppendResult.

Referenced by cvs_err().

00305     {
00306         if( fAlloc == 0L )
00307             return 0;
00308
00309         if( len > fLen )
00310         {
00311             fLen = len;
00312             fAlloc = (char*)realloc(fAlloc, (fLen + 1) * sizeof(char));
00313         }
00314
00315         if( fAlloc == 0L )
00316             return 0;
00317
00318         memcpy(fAlloc, txt, len * sizeof(char));
00319         fAlloc[len] = '\0';
00320
00321         Tcl_AppendResult(fInterp, fAlloc, 0L);
00322         return len;
00323     }

Member Data Documentation

char* CTCLCvsConsole::fAlloc [protected]

Definition at line 332 of file TclGlue.cpp.

Referenced by CTCLCvsConsole(), cvs_out(), and ~CTCLCvsConsole().

Tcl_Interp* CTCLCvsConsole::fInterp [protected]

Definition at line 330 of file TclGlue.cpp.

Referenced by CTCLCvsConsole(), and cvs_out().

int CTCLCvsConsole::fLen [protected]

Definition at line 331 of file TclGlue.cpp.

Referenced by CTCLCvsConsole(), and cvs_out().

The documentation for this class was generated from the following file:
  • common/TclGlue.cpp
Generated on Sat Aug 7 22:56:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTCP2Parse Class Reference

CTCP2Parse Class Reference

#include <CTCP2Parse.hpp>

Inheritance diagram for CTCP2Parse:

[legend]
Collaboration diagram for CTCP2Parse:

[legend]
List of all members.

Protected Types

enum EncodingType {
iso8859_1,
iso8859_2,
iso8859_3,
iso8859_4,
iso8859_5,
iso8859_6,
iso8859_7,
iso8859_8,
iso8859_9,
UTF_8
}
enum CharSpacingType {
Fixed,
Proportional
}
enum ColorType {
Black = 0x000000,
Blue = 0x00007F,
Green = 0x007F00,
Cyan = 0x007F7F,
Red = 0x7F0000,
Magenta = 0x7F007F,
Yellow = 0x7F7F00,
Lt_Grey = 0xC0C0C0,
Grey = 0x7F7F7F,
Lt_Blue = 0x0000FF,
Lt_Green = 0x00FF00,
Lt_Cyan = 0x00FFFF,
Lt_Red = 0xFF0000,
Lt_Magenta = 0xFF00FF,
Lt_Yellow = 0xFFFF00,
White = 0xFFFFFF
}

Protected Member Functions

CTCP2Parse ()
void | SetDefaults (unsigned char fgR=(unsigned char)((Lt_Grey &0xFF0000) >> 16), unsigned char fgG=(unsigned char)((Lt_Grey &0x00FF00) >> 8), unsigned char fgB=(unsigned char)(Lt_Grey &0x0000FF), unsigned char bgR=(unsigned char)((Black &0xFF0000) >> 16), unsigned char bgG=(unsigned char)((Black &0x00FF00) >> 8), unsigned char bgB=(unsigned char)(Black &0x0000FF), CharSpacingType cpDef_=Fixed, EncodingType encDef_=iso8859_1)
void | ParseIt (std::string *line)
virtual void | PushStart ()=0
virtual void | PushBold (bool)=0
virtual void | PushReverse (bool)=0
virtual void | PushUnderline (bool)=0
virtual void | PushOverstrike (bool)=0
virtual void | PushItalic (bool)=0
virtual void | PushBlink (bool)=0
virtual void | PushURL (bool)=0
virtual void | PushEncoding (EncodingType)=0
virtual void | PushSpacing (CharSpacingType)=0
virtual void | PushFontSize (int)=0
virtual void | PushForegroundColor (unsigned char R, unsigned char G, unsigned char B)=0
virtual void | PushBackgroundColor (unsigned char R, unsigned char G, unsigned char B)=0
virtual void | PushTextSegment (std::string *)=0

Private Member Functions

void | decodeToggle (std::string *line, int *parseFrmChar, int *parseEndChar, int *varCnt)
int | decodeColor (std::string *line, int *parseFrmChar, int *parseEndChar, RGBColor *c)
int | fromHex (unsigned char h, unsigned char *val)
void | PushOut (void)

Private Attributes

EncodingType enc
EncodingType encLast
EncodingType encDef
int boldCnt
int revCnt
int overCnt
int underCnt
int italicCnt
int blinkCnt
int urlCnt
int boldLast
int revLast
int overLast
int underLast
int italicLast
int blinkLast
int urlLast
int fntSize
int fntLast
CharSpacingType cp
CharSpacingType cpLast
CharSpacingType cpDef
RGBColor fg
RGBColor fgLast
RGBColor fgDef
RGBColor bg
RGBColor bgLast
RGBColor bgDef
std::string * | segment

Static Private Attributes

const RGBColor | indexColor [16]

Member Enumeration Documentation

enum CTCP2Parse::CharSpacingType [protected]

Enumeration values:
Fixed
Proportional
Definition at line 111 of file CTCP2Parse.hpp.
00111 { Fixed, Proportional };

enum CTCP2Parse::ColorType [protected]

Enumeration values:
Black
Blue
Green
Cyan
Red
Magenta
Yellow
Lt_Grey
Grey
Lt_Blue
Lt_Green
Lt_Cyan
Lt_Red
Lt_Magenta
Lt_Yellow
White
Definition at line 114 of file CTCP2Parse.hpp.
00115     {
00116         Black      = 0x000000,
00117         Blue       = 0x00007F,
00118         Green      = 0x007F00,
00119         Cyan       = 0x007F7F,
00120         Red        = 0x7F0000,
00121         Magenta    = 0x7F007F,
00122         Yellow     = 0x7F7F00,
00123         Lt_Grey    = 0xC0C0C0,
00124         Grey       = 0x7F7F7F,
00125         Lt_Blue    = 0x0000FF,
00126         Lt_Green   = 0x00FF00,
00127         Lt_Cyan    = 0x00FFFF,
00128         Lt_Red     = 0xFF0000,
00129         Lt_Magenta = 0xFF00FF,
00130         Lt_Yellow  = 0xFFFF00,
00131         White      = 0xFFFFFF
00132     };

enum CTCP2Parse::EncodingType [protected]

Enumeration values:
iso8859_1
iso8859_2
iso8859_3
iso8859_4
iso8859_5
iso8859_6
iso8859_7
iso8859_8
iso8859_9
UTF_8
Definition at line 104 of file CTCP2Parse.hpp.
00105     {
00106         iso8859_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, iso8859_6,
00107         iso8859_7, iso8859_8, iso8859_9, UTF_8
00108     };

Constructor & Destructor Documentation

CTCP2Parse::CTCP2Parse ( ) [protected]

Definition at line 31 of file CTCP2Parse.cpp.

References bg, bgDef, bgLast, Black, blinkCnt, blinkLast, boldCnt, boldLast, cp, cpDef, cpLast, enc, encDef, encLast, fg, fgDef, fgLast, Fixed, fntLast, fntSize, iso8859_1, italicCnt, italicLast, Lt_Grey, overCnt, overLast, revCnt, revLast, CTCP2Parse::RGBColor::RGB, underCnt, underLast, urlCnt, and urlLast.

00032 {
00033     boldCnt = revCnt = overCnt = underCnt = italicCnt = blinkCnt = urlCnt = 0;
00034     boldLast = revLast = overLast = underLast = italicLast = blinkLast = urlLast = 0;
00035     fntSize = fntLast = 0;
00036
00037     fg.RGB = fgLast.RGB = fgDef.RGB = Lt_Grey;
00038     bg.RGB = bgLast.RGB = bgDef.RGB = Black;
00039
00040     cp = cpLast = cpDef = Fixed;
00041     enc = encLast = encDef = iso8859_1;
00042 }

Member Function Documentation

int CTCP2Parse::decodeColor | ( | std::string * | line,
 |  | int * | parseFrmChar,
 |  | int * | parseEndChar,
 |  | RGBColor * | c
 | ) | [inline, private]

Definition at line 212 of file CTCP2Parse.hpp.

References fromHex(), indexColor, and CTCP2Parse::RGBColor::RGB.

Referenced by ParseIt().

00213     {
00214         if (line->at(*parseFrmChar) == '#')
00215         {
00216             (*parseFrmChar)++;   // consume it
00217             if (*parseFrmChar + 6 <= *parseEndChar)
00218             {
00219                 unsigned char C = 0;
00220
00221                 c->RGB = 0;     // start with a clean plate
00222
00223                 // hi-byte red
00224                 if (!fromHex(line->at(*parseFrmChar), &C)) return 3;
00225                 (*parseFrmChar)++;  // consume the hex character
00226                 c->R |= (C << 4);
00227
00228                 // lo-byte red
00229                 if (!fromHex(line->at(*parseFrmChar), &C)) return 4;
00230                 (*parseFrmChar)++;  // consume the hex character
00231                 c->R |= C;
00232
00233                 // hi-byte green
00234                 if (!fromHex(line->at(*parseFrmChar), &C)) return 5;
00235                 (*parseFrmChar)++;  // consume the hex character
00236                 c->G |= (C << 4);
00237
00238                 // lo-byte green
00239                 if (!fromHex(line->at(*parseFrmChar), &C)) return 6;
00240                 (*parseFrmChar)++;  // consume the hex character
00241                 c->G |= C;
00242
00243                 // hi-byte blue
00244                 if (!fromHex(line->at(*parseFrmChar), &C)) return 7;
00245                 (*parseFrmChar)++;  // consume the hex character
00246                 c->B |= (C << 4);
00247
00248                 // lo-byte blue
00249                 if (!fromHex(line->at(*parseFrmChar), &C)) return 8;
00250                 (*parseFrmChar)++;  // consume the hex character
00251                 c->B |= C;
00252             } else {
00253                 // rollback the error...
00254                 return 3;
00255             }
00256         } else {
00257             unsigned char index = 0;
00258             if (!fromHex(line->at(*parseFrmChar), &index)) return 3;
00259             (*parseFrmChar)++;  // consume the hex character
00260             c->RGB = indexColor[index].RGB;
00261         }
00262         return 0;
00263     }

Here is the call graph for this function:

void CTCP2Parse::decodeToggle | ( | std::string * | line,
 |  | int * | parseFrmChar,
 |  | int * | parseEndChar,
 |  | int * | varCnt
 | ) | [inline, private]

Definition at line 190 of file CTCP2Parse.hpp.

00191     {
00192         (*parseFrmChar)++;   // consume the attribute
00193         if (*parseFrmChar < *parseEndChar)
00194         {
00195             if (line->at(*parseFrmChar) == '+')
00196             {
00197                 (*varCnt)++;
00198                 (*parseFrmChar)++;   // consume the '+'
00199             }
00200             else if (line->at(*parseFrmChar) == '-')
00201             {
00202                 if ((*varCnt) > 0)
00203                     (*varCnt)--;
00204                 (*parseFrmChar)++;   // consume the '-'
00205             }
00206         }
00207         else
00208             (*varCnt)++;  // default to a '+'
00209     }

int CTCP2Parse::fromHex | ( | unsigned char | h,
 |  | unsigned char * | val
 | ) | [inline, private]

Definition at line 265 of file CTCP2Parse.hpp.

Referenced by decodeColor().

00266     {
00267         // 0 - 9
00268         if (h > 47 && h < 58) *val = (h - 48);
00269         // A - F
00270         else if (h > 64 && h < 71) *val = (h - 55);
00271         else return 0;   // throw a little conversion exception
00272         return 1;
00273     }

void CTCP2Parse::ParseIt ( std::string * line ) [protected]

Definition at line 65 of file CTCP2Parse.cpp.

References ansiAttrCvt::ansi2ctcp(), CTCP2Parse::RGBColor::B, bg, bgDef, blinkCnt, boldCnt, cp, cpDef, CTCP2_TOGGLE, decodeColor(), enc, encDef, fg, fgDef, Fixed, fntSize, CTCP2Parse::RGBColor::G, irciiAttrCvt::ircii2ctcp(), iso8859_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, iso8859_6, iso8859_7, iso8859_8, iso8859_9, italicCnt, mircAttrCvt::mirc2ctcp(), overCnt, Proportional, PushOut(), CTCP2Parse::RGBColor::R, revCnt, CTCP2Parse::RGBColor::RGB, segment, underCnt, urlCnt, and UTF_8.

00066 {
00067     int parseFrmChar = 0, parseEndChar = 0, parseStart = 0;
00068     int fntVal, fntDir = 1;
00069     int rollBack;
00070
00071     // Pre-parse and replace other attribute standards with
00072     // the ctcp2 equivalents for display.
00073     mirc2ctcp(line);
00074     ircii2ctcp(line);
00075     ansi2ctcp(line);
00076
00077
00078     // find an opening ctcp/2 format character (^F)
00079     parseFrmChar = line->find_first_of("\006");
00080
00081     // do we have any?
00082     while (parseFrmChar != std::string::npos)
00083     {
00084         // find the closing ctcp/2 format character (^F)
00085         parseEndChar = line->find_first_of("\006", parseFrmChar+1);
00086
00087         if (parseEndChar == std::string::npos)
00088         {
00089             // an opening without a closing is bogus
00090             // so remove it and fallout of the while loop
00091             line->replace(parseFrmChar, 1, "");
00092             break;
00093         }
00094
00095         // check for text before this format character
00096         // and after the last format character (or index 0 for
00097         // the first iteration.
00098         if (parseFrmChar > parseStart)
00099         {
00100             // yes.. we got a text segment ready to push.
00101             segment = new std::string(line->substr(parseStart, (parseFrmChar - parseStart)));
00102             PushOut();
00103             delete segment;
00104         }
00105
00106         // now, interpret this format code and decode this attribute
00107         // (and options, if any).
00108
00109
00110         parseFrmChar++;  // consume the first ^F.
00111
00112
00113         switch (line->at(parseFrmChar)) {
00114
00115 #   define CTCP2_TOGGLE(ch, var)  \
00116         case (ch): \
00117         decodeToggle(line, &parseFrmChar, &parseEndChar, &(var)); \
00118             break;
00119
00120         // bold
00121         CTCP2_TOGGLE('B', boldCnt);
00122
00123         // reverse
00124         CTCP2_TOGGLE('V', revCnt);
00125
00126         // underline
00127         CTCP2_TOGGLE('U', underCnt);
00128
00129         // over-strike
00130         CTCP2_TOGGLE('S', overCnt);
00131
00132         // italics
00133         CTCP2_TOGGLE('I', italicCnt);
00134
00135         // blink
00136         CTCP2_TOGGLE('K', blinkCnt);
00137
00138         // URL
00139         CTCP2_TOGGLE('L', urlCnt);
00140
00141 #   undef CTCP2_TOGGLE
00142
00143         // color
00144         case 'C':
00145             parseFrmChar++;   // consume the 'C'
00146             if (parseFrmChar < parseEndChar)
00147             {
00148                 if (line->at(parseFrmChar) == '.')
00149                 {
00150                     // reset to default
00151                     fg.RGB = fgDef.RGB;
00152                     parseFrmChar++;  // consume the '.'
00153                 }
00154                 else if (line->at(parseFrmChar) == '-')
00155                 {
00156                     // ignore
00157                     parseFrmChar++;   // consume the '-'
00158                 }
00159                 else
00160                 {
00161                     if (rollBack = decodeColor(line, &parseFrmChar, &parseEndChar, &fg))
00162                     {
00163                         // rollback the error to the 'C'
00164                         parseFrmChar -= rollBack;
00165                         fg.RGB = fgDef.RGB;
00166                         break;
00167                     }
00168                 }
00169
00170
00171                 // background color?
00172                 if (parseFrmChar < parseEndChar)
00173                 {
00174                     if (line->at(parseFrmChar) == '.')
00175                     {
00176                         bg.RGB = bgDef.RGB;
00177                         parseFrmChar++;  // consume the '.'
00178                     }
00179                     else if (line->at(parseFrmChar) == '-')
00180                     {
00181                         // ignore
00182                         parseFrmChar++;   // consume the '-'
00183                     }
00184                     else
00185                     {
00186                         if (rollBack = decodeColor(line, &parseFrmChar, &parseEndChar, &bg))
00187                         {
00188                             // rollback the error to the 'C'
00189                             parseFrmChar -= rollBack;
00190                             bg.RGB = bgDef.RGB;
00191                             break;
00192                         }
00193                     }
00194                 }
00195                 else
00196                     parseFrmChar--;   // rollback one
00197             }
00198             else
00199             {
00200                 // no colors were specified: reset to normal
00201                 fg.RGB = fgDef.RGB;
00202                 bg.RGB = bgDef.RGB;
00203             }
00204
00205             // if fg/bg are too similar, reset to defaults.
00206             // (this is in the ctcp2 draft).  These calculations
00207             // are DIRECTLY from ctcp2's draft.
00208             if ((fg.R >= bg.R - 8) && (fg.R <= bg.R + 8) &&
00209                 (fg.G >= bg.G - 8) && (fg.G <= bg.G + 8) &&
00210                 (fg.B >= bg.B - 8) && (fg.B <= bg.B + 8))
00211             {
00212                 fg.RGB = fgDef.RGB;
00213                 bg.RGB = bgDef.RGB;
00214             }
00215             break;
00216
00217         // font size
00218         case 'F':
00219             parseFrmChar++;
00220             if (parseFrmChar < parseEndChar)
00221             {
00222                 if (line->at(parseFrmChar) == '+') fntDir = 1;
00223                 else fntDir = -1;
00224                 parseFrmChar++;
00225                 if (parseFrmChar < parseEndChar)
00226                 {
00227                     fntVal = line->at(parseFrmChar) - 48;
00228                     if (fntVal > 4) fntVal = 4;
00229                 } else {
00230                     // no amount -- assume 1
00231                     fntVal = 1;
00232                     parseFrmChar--;
00233                 }
00234                 fntSize += (fntDir*fntVal);
00235             } else {
00236                 // no parameters -- reset to normal
00237                 fntSize = 0;
00238                 parseFrmChar--;
00239             }
00240             break;
00241
00242         // character spacing
00243         case 'P':
00244             parseFrmChar++;   // consume it
00245             if (parseFrmChar < parseEndChar)
00246             {
00247                 switch (line->at(parseFrmChar))
00248                 {
00249                 case 'P':
00250                     cp = Proportional; parseFrmChar++; break;
00251                 case 'F':
00252                     cp = Fixed; parseFrmChar++; break;
00253                 default:
00254                     // rollback to show the error.
00255                     parseFrmChar -= 2;
00256                 }
00257             } else {
00258                 // no parameters -- reset to normal
00259                 cp = cpDef;
00260             }
00261             break;
00262
00263         // text encoding
00264         case 'E':
00265             parseFrmChar++;   // consume it
00266             switch (line->at(parseFrmChar))
00267             {
00268             case '1':
00269                 if (line->at(parseFrmChar+1) == '0') parseFrmChar++; // what's iso8859-10 ???
00270                 enc = iso8859_1; parseFrmChar++; break;
00271             case '2':
00272                 enc = iso8859_2; parseFrmChar++; break;
00273             case '3':
00274                 enc = iso8859_3; parseFrmChar++; break;
00275             case '4':
00276                 enc = iso8859_4; parseFrmChar++; break;
00277             case '5':
00278                 enc = iso8859_5; parseFrmChar++; break;
00279             case '6':
00280                 enc = iso8859_6; parseFrmChar++; break;
00281             case '7':
00282                 enc = iso8859_7; parseFrmChar++; break;
00283             case '8':
00284                 enc = iso8859_8; parseFrmChar++; break;
00285             case '9':
00286                 enc = iso8859_9; parseFrmChar++; break;
00287             case 'U':
00288                 enc = UTF_8; parseFrmChar++; break;
00289             default:
00290                 // rollback to show the error.
00291                 parseFrmChar -= 2;
00292             }
00293             break;
00294
00295         // revert to normal
00296         case 'N':
00297             parseFrmChar++;   // consume it
00298             boldCnt = revCnt = overCnt = underCnt = italicCnt = blinkCnt = urlCnt = 0;
00299             enc = encDef;
00300             fg.RGB = fgDef.RGB;
00301             bg.RGB = bgDef.RGB;
00302             cp = cpDef;
00303             break;
00304
00305         // client extensions
00306         case 'X':
00307             //  no extensions are defined at this time.
00308             /*
00309             parseFrmChar++;
00310             switch (line->at(parseFrmChar)) {
00311             case '':
00312             default:
00313                  rollback to show the error.
00314                 parseFrmChar -= 2;
00315             }
00316             */
00317             parseFrmChar--;
00318             break;
00319
00320         // error condition...
00321         default:
00322             // rollback one.  unrecognized format specifier.
00323             parseFrmChar--;
00324         }
00325
00326         // extra params? include them in the text surrounded by "[ ]"
00327         // (This is recommended, in case someone chooses to "hide" a
00328         //    message by doing "^FNsell yoyodyne stocks!^F" -- this code
00329         //    effectively "unhides" it, and is [yet again] recommended
00330         //    by the CTCP2 draft.)
00331
00332         parseFrmChar++;
00333         if (parseFrmChar < parseEndChar)
00334         {
00335             line->replace(parseFrmChar, parseEndChar - parseFrmChar,
00336                 std::string("\006[") +
00337                 line->substr(parseFrmChar, parseEndChar-parseFrmChar) +
00338                 std::string("]"));
00339
00340             parseEndChar = parseFrmChar;
00341         }
00342
00343         // save old end position
00344         parseStart = parseEndChar+1;
00345
00346         // got any more?
00347         parseFrmChar = line->find_first_of("\006", parseStart);
00348     };
00349
00350
00351
00352     // anything left?
00353     if (parseStart < line->length())
00354     {
00355         // last text segment is ready to push.
00356         segment = new std::string(line->substr(parseStart));
00357         PushOut();
00358         delete segment;
00359     }
00360 };

Here is the call graph for this function:

virtual void CTCP2Parse::PushBackgroundColor | ( | unsigned char | R,
 |  | unsigned char | G,
 |  | unsigned char | B
 | ) | [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushBlink ( bool ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushBold ( bool ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushEncoding ( EncodingType ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushFontSize ( int ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushForegroundColor | ( | unsigned char | R,
 |  | unsigned char | G,
 |  | unsigned char | B
 | ) | [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushItalic ( bool ) [protected, pure virtual]

Referenced by PushOut().

void CTCP2Parse::PushOut ( void ) [inline, private]

Definition at line 275 of file CTCP2Parse.hpp.

References CTCP2Parse::RGBColor::B, bg, bgLast, blinkCnt, blinkLast, boldCnt, boldLast, cp, cpLast, enc, encLast, fg, fgLast, fntLast, fntSize, CTCP2Parse::RGBColor::G, italicCnt, italicLast, overCnt, overLast, PushBackgroundColor(), PushBlink(), PushBold(), PushEncoding(), PushFontSize(), PushForegroundColor(), PushItalic(), PushOverstrike(), PushReverse(), PushSpacing(), PushStart(), PushTextSegment(), PushUnderline(), PushURL(), CTCP2Parse::RGBColor::R, revCnt, revLast, CTCP2Parse::RGBColor::RGB, segment, underCnt, underLast, urlCnt, and urlLast.

Referenced by ParseIt().

00276     {
00277         // notify the derived class, we are about to start a new attribute set.
00278         PushStart();
00279
00280         // never push-out ALL the attributes -- only the CHANGED ones.
00281
00282         if ((boldCnt > 0) ^ boldLast) PushBold (boldLast = !boldLast ? true : false);
00283         if ((revCnt > 0) ^ revLast) PushReverse (revLast = !revLast ? true : false);
00284         if ((underCnt > 0) ^ underLast) PushUnderline (underLast = !underLast ? true : false);
00285         if ((overCnt > 0) ^ overLast) PushOverstrike (overLast = !overLast ? true : false);
00286         if ((italicCnt > 0) ^ italicLast) PushItalic (italicLast = !italicLast ? true : false);
00287         if ((blinkCnt > 0) ^ blinkLast) PushBlink (blinkLast = !blinkLast ? true : false);
00288         if ((urlCnt > 0) ^ urlLast) PushURL (urlLast = !urlLast ? true : false);
00289         if (enc ^ encLast) PushEncoding (encLast = enc);
00290         if (cp ^ cpLast) PushSpacing (cpLast = cp);
00291         if (fntSize ^ fntLast) PushFontSize (fntLast = fntSize);
00292
00293         if (fg.RGB ^ fgLast.RGB)
00294         {
00295             fgLast.RGB = fg.RGB;
00296             PushForegroundColor(fg.R, fg.G, fg.B);
00297         }
00298         if (bg.RGB ^ bgLast.RGB)
00299         {
00300             bgLast.RGB = bg.RGB;
00301             PushBackgroundColor(bg.R, bg.G, bg.B);
00302         }
00303
00304         PushTextSegment(segment);
00305     }

Here is the call graph for this function:

virtual void CTCP2Parse::PushOverstrike ( bool ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushReverse ( bool ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushSpacing ( CharSpacingType ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushStart ( ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushTextSegment ( std::string * ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushUnderline ( bool ) [protected, pure virtual]

Referenced by PushOut().

virtual void CTCP2Parse::PushURL ( bool ) [protected, pure virtual]

Referenced by PushOut().

void CTCP2Parse::SetDefaults | ( | unsigned char | fgR = (unsigned char)((Lt_Grey &0xFF0000) >> 16),
 |  | unsigned char | fgG = (unsigned char)((Lt_Grey &0x00FF00) >> 8),
 |  | unsigned char | fgB = (unsigned char)(Lt_Grey &0x0000FF),
 |  | unsigned char | bgR = (unsigned char)((Black &0xFF0000) >> 16),
 |  | unsigned char | bgG = (unsigned char)((Black &0x00FF00) >> 8),
 |  | unsigned char | bgB = (unsigned char)(Black &0x0000FF),
 |  | CharSpacingType | cpDef_ = Fixed,
 |  | EncodingType | encDef_ = iso8859_1
 | ) | [protected]

Definition at line 44 of file CTCP2Parse.cpp.

References CTCP2Parse::RGBColor::B, bg, bgDef, bgLast, cp, cpDef, cpLast, enc, encDef, encLast, fg, fgDef, fgLast, CTCP2Parse::RGBColor::G, and CTCP2Parse::RGBColor::R.

00049 {
00050
00051     // reassemble the seperate RGB values into our internal rep.
00052
00053     fg.R = fgLast.R = fgDef.R = fgR;
00054     fg.G = fgLast.G = fgDef.G = fgG;
00055     fg.B = fgLast.B = fgDef.B = fgB;
00056
00057     bg.R = bgLast.R = bgDef.R = bgR;
00058     bg.G = bgLast.G = bgDef.G = bgG;
00059     bg.B = bgLast.B = bgDef.B = bgB;
00060
00061     cp = cpLast = cpDef = cpDef_;
00062     enc = encLast = encDef = encDef_;
00063 }

Member Data Documentation

RGBColor CTCP2Parse::bg [private]

Definition at line 317 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), PushOut(), and SetDefaults().

RGBColor CTCP2Parse::bgDef [private]

Definition at line 317 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and SetDefaults().

RGBColor CTCP2Parse::bgLast [private]

Definition at line 317 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), PushOut(), and SetDefaults().

int CTCP2Parse::blinkCnt [private]

Definition at line 311 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and PushOut().

int CTCP2Parse::blinkLast [private]

Definition at line 312 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), and PushOut().

int CTCP2Parse::boldCnt [private]

Definition at line 311 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and PushOut().

int CTCP2Parse::boldLast [private]

Definition at line 312 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), and PushOut().

CharSpacingType CTCP2Parse::cp [private]

Definition at line 315 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), PushOut(), and SetDefaults().

CharSpacingType CTCP2Parse::cpDef [private]

Definition at line 315 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and SetDefaults().

CharSpacingType CTCP2Parse::cpLast [private]

Definition at line 315 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), PushOut(), and SetDefaults().

EncodingType CTCP2Parse::enc [private]

Definition at line 308 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), PushOut(), and SetDefaults().

EncodingType CTCP2Parse::encDef [private]

Definition at line 308 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and SetDefaults().

EncodingType CTCP2Parse::encLast [private]

Definition at line 308 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), PushOut(), and SetDefaults().

RGBColor CTCP2Parse::fg [private]

Definition at line 317 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), PushOut(), and SetDefaults().

RGBColor CTCP2Parse::fgDef [private]

Definition at line 317 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and SetDefaults().

RGBColor CTCP2Parse::fgLast [private]

Definition at line 317 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), PushOut(), and SetDefaults().

int CTCP2Parse::fntLast [private]

Definition at line 313 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), and PushOut().

int CTCP2Parse::fntSize [private]

Definition at line 313 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and PushOut().

const CTCP2Parse::RGBColor CTCP2Parse::indexColor [static, private]

Initial value:

 {
    Black, Blue, Green, Cyan, Red, Magenta, Yellow, Lt_Grey, Grey,
    Lt_Blue, Lt_Green, Lt_Cyan, Lt_Red, Lt_Magenta, Lt_Yellow, White
}
Definition at line 362 of file CTCP2Parse.cpp.

Referenced by decodeColor().

int CTCP2Parse::italicCnt [private]

Definition at line 311 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and PushOut().

int CTCP2Parse::italicLast [private]

Definition at line 312 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), and PushOut().

int CTCP2Parse::overCnt [private]

Definition at line 311 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and PushOut().

int CTCP2Parse::overLast [private]

Definition at line 312 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), and PushOut().

int CTCP2Parse::revCnt [private]

Definition at line 311 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and PushOut().

int CTCP2Parse::revLast [private]

Definition at line 312 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), and PushOut().

std::string* CTCP2Parse::segment [private]

Definition at line 319 of file CTCP2Parse.hpp.

Referenced by ParseIt(), and PushOut().

int CTCP2Parse::underCnt [private]

Definition at line 311 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and PushOut().

int CTCP2Parse::underLast [private]

Definition at line 312 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), and PushOut().

int CTCP2Parse::urlCnt [private]

Definition at line 311 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), ParseIt(), and PushOut().

int CTCP2Parse::urlLast [private]

Definition at line 312 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse(), and PushOut().

The documentation for this class was generated from the following files:
  • common/CTCP2Parse.hpp
  • common/CTCP2Parse.cpp
Generated on Sat Aug 7 22:56:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTCP2Parse::RGBColor Struct Reference

CTCP2Parse::RGBColor Struct Reference

Collaboration diagram for CTCP2Parse::RGBColor:

[legend]
List of all members.

Member Data Documentation

unsigned char CTCP2Parse::RGBColor::B

Definition at line 184 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse::ParseIt(), CTCP2Parse::PushOut(), and CTCP2Parse::SetDefaults().

unsigned char CTCP2Parse::RGBColor::G

Definition at line 183 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse::ParseIt(), CTCP2Parse::PushOut(), and CTCP2Parse::SetDefaults().

unsigned char CTCP2Parse::RGBColor::nul_void_ignore

Definition at line 181 of file CTCP2Parse.hpp.

unsigned char CTCP2Parse::RGBColor::R

Definition at line 182 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse::ParseIt(), CTCP2Parse::PushOut(), and CTCP2Parse::SetDefaults().

__int32 CTCP2Parse::RGBColor::RGB

Definition at line 172 of file CTCP2Parse.hpp.

Referenced by CTCP2Parse::CTCP2Parse(), CTCP2Parse::decodeColor(), CTCP2Parse::ParseIt(), and CTCP2Parse::PushOut().

The documentation for this struct was generated from the following file:
  • common/CTCP2Parse.hpp
Generated on Sat Aug 7 22:56:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TEditHandler< editType > Class Template Reference

TEditHandler< editType > Class Template Reference

Handles edit command. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for TEditHandler< editType >:

[legend]
Collaboration diagram for TEditHandler< editType >:

[legend]
List of all members.

Public Member Functions

TEditHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

template<kEditCmdType editType>
class TEditHandler< editType >

Handles edit command.

Definition at line 154 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

template<kEditCmdType editType>
TEditHandler< editType >::TEditHandler ( ) [inline]

Definition at line 157 of file BrowseViewHandlers.h.

References GetEditTypeName().

00158         : KiSelectionHandler(GetEditTypeName(editType))
00159     {}

Here is the call graph for this function:

Member Function Documentation

template<kEditCmdType editType>
virtual void TEditHandler< editType >::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 167 of file BrowseViewHandlers.h.

References CvsCmdEdit(), and KiSelectionHandler::OnFiles().

00168     {
00169         KiSelectionHandler::OnFiles(pmf);
00170         CvsCmdEdit(*this, editType);
00171     }

Here is the call graph for this function:

template<kEditCmdType editType>
virtual void TEditHandler< editType >::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 161 of file BrowseViewHandlers.h.

References CvsCmdEdit(), and KiSelectionHandler::OnFolder().

00162     {
00163         KiSelectionHandler::OnFolder(fullpath);
00164         CvsCmdEdit(*this, editType);
00165     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:56:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TEditText Class Reference

TEditText Class Reference

Inheritance diagram for TEditText:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:56:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTemplateDlg Class Reference

CTemplateDlg Class Reference

#include <TemplateDlg.h>

Inheritance diagram for CTemplateDlg:

[legend]
Collaboration diagram for CTemplateDlg:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_CVSTEMPLATE }

Public Member Functions

CTemplateDlg (const MultiFiles *mf, CWnd *pParent=NULL)
const char * | GetTemplateText () const

Public Attributes

CButton | m_okButton
CEdit | m_previewEdit
CListCtrl | m_templateList

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override.
virtual void | OnOK ()
OnOK virtual override, read the selected template file.
afx_msg void | OnDblclkTemplateList (NMHDR *pNMHDR, LRESULT *pResult)
NM_DBLCLK message handler, confirm selection.
afx_msg void | OnItemchangedTemplateList (NMHDR *pNMHDR, LRESULT *pResult)
LVN_ITEMCHANGED notification handler, update preview and enable OK button.
afx_msg void | OnHelp ()
BN_CLICKED message handler, display dialog help.

Private Member Functions

virtual void | InitHelpID ()
bool | ReadSelectedTemplate (CStr &templateText)

Private Attributes

const MultiFiles * | m_mf
CStr | m_templateText

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 53 of file TemplateDlg.h.
00053 { IDD = IDD_CVSTEMPLATE };

Constructor & Destructor Documentation

CTemplateDlg::CTemplateDlg | ( | const MultiFiles * | mf,
 |  | CWnd * | pParent = NULL
 | ) |

Definition at line 48 of file TemplateDlg.cpp.

00049     : m_mf(mf), CHHelpDialog(CTemplateDlg::IDD, pParent)
00050 {
00051     //{{AFX_DATA_INIT(CTemplateDlg)
00052     //}}AFX_DATA_INIT
00053 }

Member Function Documentation

void CTemplateDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpDialog.

Definition at line 56 of file TemplateDlg.cpp.

References CHHelpDialog::DoDataExchange(), IDC_TEMPLATE_LIST, IDC_TEMPLATE_PREVIEW, m_okButton, m_previewEdit, and m_templateList.

00057 {
00058     CHHelpDialog::DoDataExchange(pDX);
00059     //{{AFX_DATA_MAP(CTemplateDlg)
00060     DDX_Control(pDX, IDOK, m_okButton);
00061     DDX_Control(pDX, IDC_TEMPLATE_PREVIEW, m_previewEdit);
00062     DDX_Control(pDX, IDC_TEMPLATE_LIST, m_templateList);
00063     //}}AFX_DATA_MAP
00064 }

Here is the call graph for this function:

const char * CTemplateDlg::GetTemplateText ( ) const

Get the selected template text

Returns:
The selected template text
Definition at line 223 of file TemplateDlg.cpp.

References m_templateText.

Referenced by CompatGetCvsTemplate().

00224 {
00225     return m_templateText.c_str();
00226 }

void CTemplateDlg::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 154 of file TemplateDlg.cpp.

References IDC_TEMPLATE_LIST, IDC_TEMPLATE_PREVIEW, IDH_IDC_TEMPLATE_LIST, IDH_IDC_TEMPLATE_PREVIEW, and CHHelpSupport::SetCtrlHelpID().

00155 {
00156     SetCtrlHelpID(IDC_TEMPLATE_LIST,    IDH_IDC_TEMPLATE_LIST);
00157     SetCtrlHelpID(IDC_TEMPLATE_PREVIEW, IDH_IDC_TEMPLATE_PREVIEW);
00158 }

Here is the call graph for this function:

void CTemplateDlg::OnDblclkTemplateList | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

NM_DBLCLK message handler, confirm selection.

Definition at line 256 of file TemplateDlg.cpp.

References m_templateList, and OnOK().

00257 {
00258     if( m_templateList.GetSelectedCount() )
00259     {
00260         OnOK();
00261     }
00262
00263     *pResult = 0;
00264 }

Here is the call graph for this function:

void CTemplateDlg::OnHelp ( ) [protected]

BN_CLICKED message handler, display dialog help.

Definition at line 267 of file TemplateDlg.cpp.

References CHHelpSupport::ShowHelp().

00268 {
00269     ShowHelp();
00270 }

Here is the call graph for this function:

BOOL CTemplateDlg::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override.

Reimplemented from CHHelpDialog.

Definition at line 79 of file TemplateDlg.cpp.

References BUTTONTITLE_OK, CStr, kCvsAlertStopIcon, NULL, CHHelpDialog::OnInitDialog(), and SetListCtrlExtendedStyle().

00080 {
00081     CHHelpDialog::OnInitDialog();
00082
00083     // Extra initialization
00084     // Setup template list control
00085     {
00086         SetListCtrlExtendedStyle(&m_templateList, LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
00087
00088
00089         CRect rect;
00090         m_templateList.GetClientRect(rect);
00091
00092         const int listCtrlWidth = rect.Width();
00093         const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
00094
00095         // Insert columns
00096         m_templateList.InsertColumn(0, "Folder", LVCFMT_LEFT, 250);
00097         m_templateList.InsertColumn(1, "Full Path", LVCFMT_LEFT, listCtrlWidthNoScroll - m_templateList.GetColumnWidth(0));
00098     }
00099
00100     if( m_mf )
00101     {
00102         for(int nIndex = 0; nIndex < m_mf->NumDirs(); nIndex++)
00103         {
00104             CStr dir;
00105             if( m_mf->getdir(nIndex, dir) )
00106             {
00107                 CStr path = dir;
00108                 if( !path.endsWith(kPathDelimiter) )
00109                     path << kPathDelimiter;
00110
00111                 path << "CVS";
00112                 path << kPathDelimiter;
00113                 path << "Template";
00114
00115                 FILE* templateFile = fopen(path, "r");
00116                 if( templateFile )
00117                 {
00118                     fclose(templateFile);
00119
00120                     const int item = m_templateList.InsertItem(m_templateList.GetItemCount(), dir.c_str());
00121                     if( item > -1 )
00122                     {
00123                         m_templateList.SetItemText(item, 1, path.c_str());
00124                     }
00125                 }
00126             }
00127         }
00128     }
00129
00130     // Select the first template on the list
00131     if( m_templateList.GetItemCount() )
00132     {
00133         m_templateList.SetItemState(0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
00134
00135         // If there is only one consider it as a chosen one
00136         if( m_templateList.GetItemCount() == 1 )
00137         {
00138             OnOK();
00139         }
00140     }
00141     else
00142     {
00143         CvsAlert(kCvsAlertStopIcon,
00144             "Template file not found.", "You need to setup Template using rcsinfo file. Please refer to CVS documentation for more details.",
00145             BUTTONTITLE_OK, NULL).ShowAlert();
00146
00147         OnCancel();
00148     }
00149
00150     return TRUE;  // return TRUE unless you set the focus to a control
00151                   // EXCEPTION: OCX Property Pages should return FALSE
00152 }

Here is the call graph for this function:

void CTemplateDlg::OnItemchangedTemplateList | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

LVN_ITEMCHANGED notification handler, update preview and enable OK button.

Definition at line 229 of file TemplateDlg.cpp.

References CStr, m_okButton, m_previewEdit, m_templateList, and ReadSelectedTemplate().

00230 {
00231     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00232     if( pNMListView->iItem > -1 &&
00233         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
00234     {
00235         CStr templateText;
00236         if( ReadSelectedTemplate(templateText) )
00237         {
00238             CString itemText(templateText.c_str());
00239             itemText.Replace("\n", "\r\n");
00240
00241             m_previewEdit.SetWindowText(itemText);
00242         }
00243     }
00244
00245     if( !m_templateList.GetSelectedCount() )
00246     {
00247         m_previewEdit.SetWindowText("");
00248     }
00249
00250     m_okButton.EnableWindow(m_templateList.GetSelectedCount());
00251
00252     *pResult = 0;
00253 }

Here is the call graph for this function:

void CTemplateDlg::OnOK ( ) [protected, virtual]

OnOK virtual override, read the selected template file.

Definition at line 161 of file TemplateDlg.cpp.

References BUTTONTITLE_OK, kCvsAlertStopIcon, m_templateList, m_templateText, NULL, and ReadSelectedTemplate().

Referenced by OnDblclkTemplateList().

00162 {
00163     if( m_templateList.GetSelectedCount() > 0 )
00164     {
00165         if( ReadSelectedTemplate(m_templateText) )
00166         {
00167             CHHelpDialog::OnOK();
00168         }
00169     }
00170     else
00171     {
00172         CvsAlert(kCvsAlertStopIcon,
00173             "No selection.", "Select the Template file from the list.",
00174             BUTTONTITLE_OK, NULL).ShowAlert();
00175     }
00176 }

Here is the call graph for this function:

bool CTemplateDlg::ReadSelectedTemplate ( CStr & templateText ) [private]

Referenced by OnItemchangedTemplateList(), and OnOK().

Member Data Documentation

const MultiFiles* CTemplateDlg::m_mf [private]

Browser selection Definition at line 81 of file TemplateDlg.h.

CButton CTemplateDlg::m_okButton

Definition at line 54 of file TemplateDlg.h.

Referenced by DoDataExchange(), and OnItemchangedTemplateList().

CEdit CTemplateDlg::m_previewEdit

Definition at line 55 of file TemplateDlg.h.

Referenced by DoDataExchange(), and OnItemchangedTemplateList().

CListCtrl CTemplateDlg::m_templateList

Definition at line 56 of file TemplateDlg.h.

Referenced by DoDataExchange(), OnDblclkTemplateList(), OnItemchangedTemplateList(), and OnOK().

CStr CTemplateDlg::m_templateText [private]

Selected template file text Definition at line 83 of file TemplateDlg.h.

Referenced by GetTemplateText(), and OnOK().

The documentation for this class was generated from the following files:
  • common/TemplateDlg.h
  • common/TemplateDlg.cpp
Generated on Sat Aug 7 22:56:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTempToggleBool Class Reference

CTempToggleBool Class Reference

Collaboration diagram for CTempToggleBool:

[legend]
List of all members.

Public Member Functions

CTempToggleBool (bool &value)
~CTempToggleBool ()

Protected Attributes

bool & m_value
bool m_didSetIt

Constructor & Destructor Documentation

CTempToggleBool::CTempToggleBool ( bool & value ) [inline]

Definition at line 158 of file UCvsFolders.cpp.

00158                                   : m_value(value), m_didSetIt(false)
00159     {
00160         if(!m_value)
00161         {
00162             m_didSetIt = true;
00163             m_value = true;
00164         }
00165     }

CTempToggleBool::~CTempToggleBool ( ) [inline]

Definition at line 167 of file UCvsFolders.cpp.

00168     {
00169         if(m_didSetIt)
00170             m_value = false;
00171     }

Member Data Documentation

bool CTempToggleBool::m_didSetIt [protected]

Definition at line 174 of file UCvsFolders.cpp.

bool& CTempToggleBool::m_value [protected]

Definition at line 173 of file UCvsFolders.cpp.

The documentation for this class was generated from the following file:
  • common/UCvsFolders.cpp
Generated on Sat Aug 7 22:56:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TGraph Class Reference

TGraph Class Reference

Base traverse class. More...

#include <GraphView.h>

Inheritance diagram for TGraph:

[legend]
List of all members.

Public Member Functions

kTGraph | TraverseGraph (CLogNode *node)
virtual kTGraph | TraverseNode (CLogNode *node)=0

Detailed Description

Base traverse class.

Definition at line 180 of file GraphView.h.

Member Function Documentation

kTGraph TGraph::TraverseGraph ( CLogNode * node )

Traverse the graph

Parameters:
node Node
Returns:
kTGraph
Definition at line 1027 of file GraphView.cpp.

References kTContinue, kTGetDown, kTGraph, kTStop, and TraverseNode().

Referenced by CGraphView::IsSelSingleNode(), CGraphView::OnAnnotate(), CGraphView::OnContextMenu(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnKeyDown(), CGraphView::OnUpdateViewDelrev(), CGraphView::OnUpdateViewDiff(), CGraphView::OnUpdateViewTag(), CGraphView::OnViewDelrev(), CGraphView::OnViewDiff(), CGraphView::OnViewSelnonsig(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::RetrieveSel(), and CGraphView::SaveSel().

01028 {
01029     kTGraph res = TraverseNode(node);
01030     if( res == kTStop )
01031         return kTStop;
01032
01033     if( res == kTGetDown )
01034     {
01035         vector<CLogNode*>::iterator i;
01036         for(i = node->Childs().begin(); i != node->Childs().end(); ++i)
01037         {
01038             res = TraverseGraph(*i);
01039             if( res == kTStop )
01040                 return kTStop;
01041         }
01042     }
01043
01044     if( node->Next() != 0L )
01045     {
01046         res = TraverseGraph(node->Next());
01047         if( res == kTStop )
01048             return kTStop;
01049     }
01050
01051     return kTContinue;
01052 };

Here is the call graph for this function:

virtual kTGraph TGraph::TraverseNode ( CLogNode * node ) [pure virtual]

Implemented in TGraphCurSelector, TGraphRectSelect, TGraphCmdStatus, TGraphDelCmd, and TGraphSelNonSig.

Referenced by TraverseGraph().

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:56:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TGraphCmdStatus Class Reference

TGraphCmdStatus Class Reference

Graph command status class. More...

#include <GraphView.h>

Inheritance diagram for TGraphCmdStatus:

[legend]
Collaboration diagram for TGraphCmdStatus:

[legend]
List of all members.

Public Member Functions

TGraphCmdStatus ()
Construction.
virtual kTGraph | TraverseNode (CLogNode *node)
int | GetSelCount () const
CWinLogData * | GetSel1 () const
CWinLogData * | GetSel2 () const

Private Attributes

CWinLogData * m_fSel1
CWinLogData * m_fSel2
int m_selCount

Detailed Description

Graph command status class.

Definition at line 207 of file GraphView.h.

Constructor & Destructor Documentation

TGraphCmdStatus::TGraphCmdStatus ( )

Construction.

Definition at line 1093 of file GraphView.cpp.

01094     : m_fSel1(0L), m_fSel2(0L), m_selCount(0)
01095 {
01096 }

Member Function Documentation

CWinLogData * TGraphCmdStatus::GetSel1 ( ) const

Get the first selection

Returns:
The first selection
Definition at line 1128 of file GraphView.cpp.

References m_fSel1.

Referenced by CGraphView::IsSelSingleNode(), CGraphView::OnAnnotate(), CGraphView::OnContextMenu(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnKeyDown(), CGraphView::OnUpdateViewDiff(), CGraphView::OnViewDiff(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::RetrieveSel(), and CGraphView::SaveSel().

01129 {
01130     return m_fSel1;
01131 }

CWinLogData * TGraphCmdStatus::GetSel2 ( ) const

Get the second selection

Returns:
The second selection
Definition at line 1137 of file GraphView.cpp.

References m_fSel2.

Referenced by CGraphView::OnAnnotate(), CGraphView::OnUpdateViewDiff(), and CGraphView::OnViewDiff().

01138 {
01139     return m_fSel2;
01140 }

int TGraphCmdStatus::GetSelCount ( ) const

Get the selection count

Returns:
The selection count
Definition at line 1119 of file GraphView.cpp.

References m_selCount.

Referenced by CGraphView::IsSelSingleNode(), CGraphView::OnAnnotate(), CGraphView::OnContextMenu(), CGraphView::OnUpdateViewDiff(), CGraphView::OnUpdateViewTag(), and CGraphView::OnViewDiff().

01120 {
01121     return m_selCount;
01122 }

kTGraph TGraphCmdStatus::TraverseNode ( CLogNode * node ) [virtual]

Implements TGraph.

Definition at line 1098 of file GraphView.cpp.

References kTGetDown, kTGraph, m_fSel1, m_fSel2, m_selCount, and CWinLogData::Selected().

01099 {
01100     CWinLogData* data = (CWinLogData*)node->GetUserData();
01101
01102     if( data->Selected() )
01103     {
01104         if( m_fSel1 == 0L )
01105             m_fSel1 = data;
01106         else if( m_fSel2 == 0L )
01107             m_fSel2 = data;
01108
01109         m_selCount++;
01110     }
01111
01112     return kTGetDown;
01113 }

Here is the call graph for this function:

Member Data Documentation

CWinLogData* TGraphCmdStatus::m_fSel1 [private]

First selected item log data Definition at line 215 of file GraphView.h.

Referenced by GetSel1(), and TraverseNode().

CWinLogData* TGraphCmdStatus::m_fSel2 [private]

Second selected item log data Definition at line 216 of file GraphView.h.

Referenced by GetSel2(), and TraverseNode().

int TGraphCmdStatus::m_selCount [private]

Selection count Definition at line 217 of file GraphView.h.

Referenced by GetSelCount(), and TraverseNode().

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:56:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TGraphCurSelector Class Reference

TGraphCurSelector Class Reference

Inheritance diagram for TGraphCurSelector:

[legend]
Collaboration diagram for TGraphCurSelector:

[legend]
List of all members.

Public Member Functions

TGraphCurSelector (int offset_from_sel, CGraphView *view)
CWinLogData * | GetSel1 () const
CWinLogData * | GetSel2 () const
CWinLogData * | GetNewSel () const
CWinLogData * | GetFirstSel () const
CWinLogData * | GetLastSel () const
CWinLogData * | GetDiskNodeSel () const
virtual kTGraph | TraverseNode (CLogNode *node)

Private Types

enum | { CACHE_INTERVAL = 10 }

Private Member Functions

void | construct_ ()
TGraphCurSelector (int offset_from_sel, CGraphView *view, CLogNode *sel1, CLogNode *sel2)
CWinLogData * | getWinLogData_ (CLogNode *node) const

Private Attributes

int m_offset
CGraphView * m_view
int m_selId
bool m_bRestart
std::map< int, CLogNode * > | m_restartPointerCache
CLogNode * | m_sel1
CLogNode * | m_sel2
CLogNode * | m_newSel
CLogNode * | m_firstSel
CLogNode * | m_lastSel
CLogNode * | m_diskNode
EntnodeData * m_disknodeEntryInfo

Member Enumeration Documentation

anonymous enum [private]

Enumeration values:
CACHE_INTERVAL
Definition at line 2414 of file GraphView.cpp.
02414 { CACHE_INTERVAL = 10 };

Constructor & Destructor Documentation

TGraphCurSelector::TGraphCurSelector | ( | int | offset_from_sel,
 |  | CGraphView * | view,
 |  | CLogNode * | sel1,
 |  | CLogNode * | sel2
 | ) | [inline, private]

Definition at line 2422 of file GraphView.cpp.

References construct_(), m_bRestart, m_diskNode, m_firstSel, m_lastSel, m_newSel, m_offset, m_sel1, m_sel2, m_selId, and m_view.

02423         : m_offset(offset_from_sel), m_view(view),
02424         m_selId(-1), m_bRestart(true), m_sel1(sel1), m_sel2(sel2),
02425         m_newSel(0L), m_firstSel(0L), m_lastSel(0L), m_diskNode(0L)
02426     {
02427         construct_();
02428     }

Here is the call graph for this function:

TGraphCurSelector::TGraphCurSelector | ( | int | offset_from_sel,
 |  | CGraphView * | view
 | ) | [inline]

Definition at line 2431 of file GraphView.cpp.

References construct_(), m_bRestart, m_diskNode, m_firstSel, m_lastSel, m_newSel, m_offset, m_sel1, m_sel2, m_selId, and m_view.

02432         : m_offset(offset_from_sel), m_view(view),
02433         m_selId(-1), m_bRestart(false), m_sel1(0L), m_sel2(0L),
02434         m_newSel(0L), m_firstSel(0L), m_lastSel(0L), m_diskNode(0L)
02435     {
02436         construct_();
02437     }

Here is the call graph for this function:

Member Function Documentation

void TGraphCurSelector::construct_ ( ) [inline, private]

Definition at line 2416 of file GraphView.cpp.

References CGraphDoc::GetEntryInfo(), m_disknodeEntryInfo, and m_view.

Referenced by TGraphCurSelector().

02417     {
02418         CGraphDoc* pDoc = m_view ? (CGraphDoc*)m_view->GetDocument() : 0L;
02419         m_disknodeEntryInfo = pDoc ? pDoc->GetEntryInfo() : 0L;
02420     }

Here is the call graph for this function:

CWinLogData* TGraphCurSelector::GetDiskNodeSel ( ) const [inline]

Definition at line 2491 of file GraphView.cpp.

References getWinLogData_(), and m_diskNode.

Referenced by CGraphView::OnKeyDown().

02492     {
02493         return getWinLogData_(m_diskNode);
02494     }

Here is the call graph for this function:

CWinLogData* TGraphCurSelector::GetFirstSel ( ) const [inline]

Definition at line 2481 of file GraphView.cpp.

References getWinLogData_(), and m_firstSel.

02482     {
02483         return getWinLogData_(m_firstSel);
02484     }

Here is the call graph for this function:

CWinLogData* TGraphCurSelector::GetLastSel ( ) const [inline]

Definition at line 2486 of file GraphView.cpp.

References getWinLogData_(), and m_lastSel.

Referenced by CGraphView::OnKeyDown().

02487     {
02488         return getWinLogData_(m_lastSel);
02489     }

Here is the call graph for this function:

CWinLogData* TGraphCurSelector::GetNewSel ( ) const [inline]

Definition at line 2476 of file GraphView.cpp.

References getWinLogData_(), m_firstSel, and m_newSel.

Referenced by CGraphView::OnKeyDown().

02477     {
02478         return getWinLogData_(m_newSel ? m_newSel : m_firstSel);
02479     }

Here is the call graph for this function:

CWinLogData* TGraphCurSelector::GetSel1 ( ) const [inline]

Definition at line 2466 of file GraphView.cpp.

References getWinLogData_(), and m_sel1.

Referenced by CGraphView::OnKeyDown().

02467     {
02468         return getWinLogData_(m_sel1);
02469     }

Here is the call graph for this function:

CWinLogData* TGraphCurSelector::GetSel2 ( ) const [inline]

Definition at line 2471 of file GraphView.cpp.

References getWinLogData_(), and m_sel2.

Referenced by CGraphView::OnKeyDown().

02472     {
02473         return getWinLogData_(m_sel2);
02474     }

Here is the call graph for this function:

CWinLogData* TGraphCurSelector::getWinLogData_ ( CLogNode * node ) const [inline, private]

Definition at line 2461 of file GraphView.cpp.

Referenced by GetDiskNodeSel(), GetFirstSel(), GetLastSel(), GetNewSel(), GetSel1(), and GetSel2().

02462     {
02463         return node ? (CWinLogData*)node->GetUserData() : 0L;
02464     }

virtual kTGraph TGraphCurSelector::TraverseNode ( CLogNode * node ) [inline, virtual]

Implements TGraph.

Definition at line 2496 of file GraphView.cpp.

References CACHE_INTERVAL, kTGetDown, kTGraph, kTStop, m_bRestart, m_diskNode, m_disknodeEntryInfo, m_firstSel, m_lastSel, m_newSel, m_offset, m_restartPointerCache, m_sel1, m_sel2, m_selId, m_view, CWinLogData::Selected(), and CWinLogData::SetSelected().

02497     {
02498         ++m_selId;
02499
02500         if( !m_firstSel )
02501         {
02502             m_lastSel = m_firstSel = node;
02503         }
02504
02505         if( !m_bRestart && (((m_selId % CACHE_INTERVAL == 0) && node->Next()) || !m_selId) )
02506         {
02507             m_restartPointerCache.insert(std::make_pair(m_selId, node));
02508         }
02509
02510         if( ((CWinLogData*)node->GetUserData())->IsDiskNode(m_disknodeEntryInfo) )
02511         {
02512             m_diskNode = node;
02513         }
02514
02515         CWinLogData* data = (CWinLogData*)node->GetUserData();
02516         if( data->Selected() )
02517         {
02518             if( !m_sel1 )
02519             {
02520                 m_sel1 = node;
02521             }
02522             else if( !m_sel2 )
02523             {
02524                 m_sel2 = node;
02525             }
02526
02527             data->SetSelected(m_view, false);
02528         }
02529
02530         if( m_sel1 && !m_newSel )
02531         {
02532             if( m_offset < 0 )
02533             {
02534                 int target = m_selId + m_offset;
02535                 target = (target > 0) ? target : 0;
02536                 typedef std::map<int, CLogNode*>::iterator ITER_t_;
02537                 typedef std::pair<ITER_t_, ITER_t_> ITERPAIR_t_;
02538                 ITERPAIR_t_ itpair = m_restartPointerCache.equal_range(target);
02539                 if( itpair.first != itpair.second )
02540                 {
02541                     m_newSel = (*(itpair.first)).second;
02542                 }
02543                 else
02544                 {
02545                     ITER_t_ it = itpair.first; // lower_bound
02546                     if( it != m_restartPointerCache.begin() )
02547                     {
02548                         --it;
02549                     }
02550
02551                     TGraphCurSelector internal(target - (*it).first, m_view, m_sel1, m_sel2);
02552                     internal.TraverseGraph((*it).second);
02553                     m_newSel = internal.m_newSel ? internal.m_newSel : m_lastSel;
02554                 }
02555             }
02556             else if( m_offset == 0 )
02557             {
02558                 m_newSel = node;
02559             }
02560             else
02561             {
02562                 --m_offset;
02563             }
02564         }
02565
02566         m_lastSel = node;
02567
02568         return m_newSel && m_bRestart ? kTStop : kTGetDown;
02569     }

Here is the call graph for this function:

Member Data Documentation

bool TGraphCurSelector::m_bRestart [private]

Definition at line 2445 of file GraphView.cpp.

Referenced by TGraphCurSelector(), and TraverseNode().

CLogNode* TGraphCurSelector::m_diskNode [private]

Definition at line 2457 of file GraphView.cpp.

Referenced by GetDiskNodeSel(), TGraphCurSelector(), and TraverseNode().

EntnodeData* TGraphCurSelector::m_disknodeEntryInfo [private]

Definition at line 2459 of file GraphView.cpp.

Referenced by construct_(), and TraverseNode().

CLogNode* TGraphCurSelector::m_firstSel [private]

Definition at line 2454 of file GraphView.cpp.

Referenced by GetFirstSel(), GetNewSel(), TGraphCurSelector(), and TraverseNode().

CLogNode* TGraphCurSelector::m_lastSel [private]

Definition at line 2455 of file GraphView.cpp.

Referenced by GetLastSel(), TGraphCurSelector(), and TraverseNode().

CLogNode* TGraphCurSelector::m_newSel [private]

Definition at line 2452 of file GraphView.cpp.

Referenced by GetNewSel(), TGraphCurSelector(), and TraverseNode().

int TGraphCurSelector::m_offset [private]

Definition at line 2440 of file GraphView.cpp.

Referenced by TGraphCurSelector(), and TraverseNode().

std::map<int, CLogNode*> TGraphCurSelector::m_restartPointerCache [private]

Definition at line 2447 of file GraphView.cpp.

Referenced by TraverseNode().

CLogNode* TGraphCurSelector::m_sel1 [private]

Definition at line 2449 of file GraphView.cpp.

Referenced by GetSel1(), TGraphCurSelector(), and TraverseNode().

CLogNode* TGraphCurSelector::m_sel2 [private]

Definition at line 2450 of file GraphView.cpp.

Referenced by GetSel2(), TGraphCurSelector(), and TraverseNode().

int TGraphCurSelector::m_selId [private]

Definition at line 2444 of file GraphView.cpp.

Referenced by TGraphCurSelector(), and TraverseNode().

CGraphView* TGraphCurSelector::m_view [private]

Definition at line 2442 of file GraphView.cpp.

Referenced by construct_(), TGraphCurSelector(), and TraverseNode().

The documentation for this class was generated from the following file:
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:57:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TGraphDelCmd Class Reference

TGraphDelCmd Class Reference

Graph command delete revisions class. More...

#include <GraphView.h>

Inheritance diagram for TGraphDelCmd:

[legend]
Collaboration diagram for TGraphDelCmd:

[legend]
List of all members.

Public Member Functions

TGraphDelCmd ()
virtual kTGraph | TraverseNode (CLogNode *node)
int | GetCountSel () const
bool | GetOnlyRev () const
std::vector< CStr > & | GetAllRevs ()

Private Attributes

int m_countSel
bool m_onlyRev
std::vector< CStr > | m_allRevs

Detailed Description

Graph command delete revisions class.

Definition at line 246 of file GraphView.h.

Constructor & Destructor Documentation

TGraphDelCmd::TGraphDelCmd ( )

Definition at line 1170 of file GraphView.cpp.

01171     : m_countSel(0), m_onlyRev(true)
01172 {
01173 }

Member Function Documentation

std::vector< UStr > & TGraphDelCmd::GetAllRevs ( )

Get all revisions

Returns:
All revisions
Definition at line 1214 of file GraphView.cpp.

References m_allRevs.

Referenced by CGraphView::OnViewDelrev().

01215 {
01216     return m_allRevs;
01217 }

int TGraphDelCmd::GetCountSel ( ) const

Get the selection count

Returns:
The selection count
Definition at line 1196 of file GraphView.cpp.

References m_countSel.

Referenced by CGraphView::OnUpdateViewDelrev().

01197 {
01198     return m_countSel;
01199 }

bool TGraphDelCmd::GetOnlyRev ( ) const

Get only revisions flag

Returns:
The only revisions flag
Definition at line 1205 of file GraphView.cpp.

References m_onlyRev.

Referenced by CGraphView::OnUpdateViewDelrev().

01206 {
01207     return m_onlyRev;
01208 }

kTGraph TGraphDelCmd::TraverseNode ( CLogNode * node ) [virtual]

Implements TGraph.

Definition at line 1175 of file GraphView.cpp.

References CStr, CWinLogData::GetStr(), CWinLogData::GetType(), kTGetDown, kTGraph, m_allRevs, m_countSel, m_onlyRev, and CWinLogData::Selected().

01176 {
01177     CWinLogData* data = (CWinLogData*)node->GetUserData();
01178
01179     if( data->Selected() )
01180     {
01181         if( data->GetType() != kNodeRev )
01182             m_onlyRev = false;
01183         else
01184             m_allRevs.push_back(CStr(data->GetStr()));
01185
01186         m_countSel++;
01187     }
01188
01189     return kTGetDown;
01190 }

Here is the call graph for this function:

Member Data Documentation

std::vector<CStr> TGraphDelCmd::m_allRevs [private]

Definition at line 256 of file GraphView.h.

Referenced by GetAllRevs(), and TraverseNode().

int TGraphDelCmd::m_countSel [private]

Definition at line 254 of file GraphView.h.

Referenced by GetCountSel(), and TraverseNode().

bool TGraphDelCmd::m_onlyRev [private]

Definition at line 255 of file GraphView.h.

Referenced by GetOnlyRev(), and TraverseNode().

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:57:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TGraphRectSelect Class Reference

TGraphRectSelect Class Reference

Graph traverse class. More...

#include <GraphView.h>

Inheritance diagram for TGraphRectSelect:

[legend]
Collaboration diagram for TGraphRectSelect:

[legend]
List of all members.

Public Member Functions

TGraphRectSelect (bool shiftOn, CGraphView *view, CRect &rect)
virtual kTGraph | TraverseNode (CLogNode *node)

Protected Attributes

bool m_shiftOn
CGraphView * m_view
CRect & | m_rect

Detailed Description

Graph traverse class.

Definition at line 189 of file GraphView.h.

Constructor & Destructor Documentation

TGraphRectSelect::TGraphRectSelect | ( | bool | shiftOn,
 |  | CGraphView * | view,
 |  | CRect & | rect
 | ) |

Definition at line 1057 of file GraphView.cpp.

01058     : m_shiftOn(shiftOn), m_view(view), m_rect(rect)
01059 {
01060 }

Member Function Documentation

kTGraph TGraphRectSelect::TraverseNode ( CLogNode * node ) [virtual]

Implements TGraph.

Definition at line 1062 of file GraphView.cpp.

References CWinLogData::Bounds(), kTContinue, kTGetDown, kTGraph, m_rect, m_shiftOn, m_view, CWinLogData::Selected(), CWinLogData::SelfBounds(), and CWinLogData::SetSelected().

01063 {
01064     CWinLogData* data = (CWinLogData*)node->GetUserData();
01065
01066     // No need to go further
01067     CRect inter;
01068     if( !inter.IntersectRect(m_rect, data->Bounds()) )
01069     {
01070         return kTContinue;
01071     }
01072
01073     // Self enclosed in the tracker ?
01074     CRect& boundsRect = data->SelfBounds();
01075     if( m_rect.PtInRect(boundsRect.TopLeft()) && m_rect.PtInRect(boundsRect.BottomRight()) )
01076     {
01077         if( !m_shiftOn )
01078         {
01079             if( !data->Selected() )
01080                 data->SetSelected(m_view, true);
01081         }
01082         else
01083             data->SetSelected(m_view, !data->Selected());
01084     }
01085
01086     // Traverse childrens
01087     return kTGetDown;
01088 }

Here is the call graph for this function:

Member Data Documentation

CRect& TGraphRectSelect::m_rect [protected]

Rectangle Definition at line 199 of file GraphView.h.

Referenced by TraverseNode().

bool TGraphRectSelect::m_shiftOn [protected]

Flag to indicate the shift key state Definition at line 197 of file GraphView.h.

Referenced by TraverseNode().

CGraphView* TGraphRectSelect::m_view [protected]

View Definition at line 198 of file GraphView.h.

Referenced by TraverseNode().

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:57:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TGraphSelNonSig Class Reference

TGraphSelNonSig Class Reference

Select non-significant revisions. More...

#include <GraphView.h>

Inheritance diagram for TGraphSelNonSig:

[legend]
Collaboration diagram for TGraphSelNonSig:

[legend]
List of all members.

Public Member Functions

TGraphSelNonSig (CGraphView *view)
virtual kTGraph TraverseNode (CLogNode *node)

Private Attributes

CGraphView * m_view

Detailed Description

Select non-significant revisions.

Definition at line 268 of file GraphView.h.

Constructor & Destructor Documentation

TGraphSelNonSig::TGraphSelNonSig ( CGraphView * view )

Definition at line 1222 of file GraphView.cpp.

01223     : m_view(view)
01224 {
01225 }

Member Function Documentation

kTGraph TGraphSelNonSig::TraverseNode ( CLogNode * node ) [virtual]

Implements TGraph.

Definition at line 1227 of file GraphView.cpp.

References CWinLogData::GetType(), kTGetDown, kTGraph, m_view, and CWinLogData::SetSelected().

01228 {
01229     CWinLogData* data = (CWinLogData*)node->GetUserData();
01230
01231     if( data->GetType() == kNodeRev )
01232     {
01233         if( node->Next() != 0L && node->Childs().size() == 0 )
01234             data->SetSelected(m_view, true);
01235     }
01236
01237     return kTGetDown;
01238 }

Here is the call graph for this function:

Member Data Documentation

CGraphView* TGraphSelNonSig::m_view [private]

View Definition at line 276 of file GraphView.h.

Referenced by TraverseNode().

The documentation for this class was generated from the following files:
  • WinCvs/GraphView.h
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:57:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TIconButton Class Reference

TIconButton Class Reference

Inheritance diagram for TIconButton:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:57:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TIconCheckBox Class Reference

TIconCheckBox Class Reference

Inheritance diagram for TIconCheckBox:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:57:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TIconPopup Class Reference

TIconPopup Class Reference

Inheritance diagram for TIconPopup:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:57:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UTimer Class Reference

UTimer Class Reference

used by the UWidget class to implement timers/repeaters. More...

#include <uwidget.h>

Collaboration diagram for UTimer:

[legend]
List of all members.

Public Member Functions

UTimer (int lap, int lastlap, int cmd)
UTimer ()
UTimer (const UTimer &src)
UTimer & | operator= (const UTimer &src)

Public Attributes

long | m_lap
long | m_lastlap
int m_cmd

Detailed Description

used by the UWidget class to implement timers/repeaters.

Definition at line 58 of file uwidget.h.

Constructor & Destructor Documentation

UTimer::UTimer | ( | int | lap,
 |  | int | lastlap,
 |  | int | cmd
 | ) | [inline]

Definition at line 61 of file uwidget.h.

References m_cmd, m_lap, and m_lastlap.

00061 : m_lap(lap), m_lastlap(lastlap), m_cmd(cmd) {}

UTimer::UTimer ( ) [inline]

Definition at line 62 of file uwidget.h.

References m_cmd, m_lap, and m_lastlap.

00062 : m_lap(0), m_lastlap(0), m_cmd(0) {}

UTimer::UTimer ( const UTimer & src ) [inline]

Definition at line 63 of file uwidget.h.

References m_cmd, m_lap, and m_lastlap.

00063 : m_lap(src.m_lap), m_lastlap(src.m_lastlap), m_cmd(src.m_cmd) {}

Member Function Documentation

UTimer& UTimer::operator= ( const UTimer & src ) [inline]

Definition at line 65 of file uwidget.h.

References m_cmd, m_lap, and m_lastlap.

00066     {
00067         m_lastlap = src.m_lastlap;
00068         m_lap = src.m_lap;
00069         m_cmd = src.m_cmd;
00070
00071         return *this;
00072     }

Member Data Documentation

int UTimer::m_cmd

Definition at line 75 of file uwidget.h.

Referenced by operator=(), UEventGiveTime(), and UTimer().

long UTimer::m_lap

Definition at line 73 of file uwidget.h.

Referenced by operator=(), UEventGiveTime(), and UTimer().

long UTimer::m_lastlap

Definition at line 74 of file uwidget.h.

Referenced by operator=(), UEventGiveTime(), and UTimer().

The documentation for this class was generated from the following file:
  • rf/uwidget.h
Generated on Sat Aug 7 22:57:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTipDlg Class Reference

CTipDlg Class Reference

#include <TipDlg.h>

Inheritance diagram for CTipDlg:

[legend]
Collaboration diagram for CTipDlg:

[legend]
List of all members.

Public Member Functions

CTipDlg (CWnd *pParent=NULL)
virtual | ~CTipDlg ()

Public Attributes

BOOL | m_bStartup
CString | m_strTip
FILE * | m_pStream

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnNextTip ()
afx_msg HBRUSH | OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor)
virtual void | OnOK ()
virtual BOOL | OnInitDialog ()
afx_msg void | OnPaint ()
void | GetNextTipString (CString &strNext)

Constructor & Destructor Documentation

CTipDlg::CTipDlg ( CWnd * pParent = NULL )

Definition at line 49 of file TipDlg.cpp.

References BUTTONTITLE_OK, CG_IDP_FILE_CORRUPT, CG_IDS_FILE_ABSENT, CStr, CWincvsApp::GetAppPath(), GetNextTipString(), IDD_TIP, kCvsAlertStopIcon, m_bStartup, m_pStream, m_strTip, NULL, szIntFilePos, szIntStartup, szSection, and szTimeStamp.

00050     : CDialog(IDD_TIP, pParent)
00051 {
00052     //{{AFX_DATA_INIT(CTipDlg)
00053     m_bStartup = TRUE;
00054     //}}AFX_DATA_INIT
00055
00056     // We need to find out what the startup and file position parameters are
00057     // If startup does not exist, we assume that the Tips on startup is checked TRUE.
00058     CWincvsApp* pApp = (CWincvsApp *)AfxGetApp();
00059     m_bStartup = !pApp->GetProfileInt(szSection, szIntStartup, 0);
00060     UINT iFilePos = pApp->GetProfileInt(szSection, szIntFilePos, 0);
00061     CStr tips;
00062     pApp->GetAppPath(tips);
00063     if(!tips.empty() && !tips.endsWith(kPathDelimiter))
00064     {
00065         tips << kPathDelimiter;
00066     }
00067     tips << "tips.txt";
00068
00069     // Now try to open the tips file
00070     m_pStream = fopen(tips, "r");
00071     if (m_pStream == NULL)
00072     {
00073         m_strTip.LoadString(CG_IDS_FILE_ABSENT);
00074         return;
00075     }
00076
00077     // If the timestamp in the INI file is different from the timestamp of
00078     // the tips file, then we know that the tips file has been modified
00079     // Reset the file position to 0 and write the latest timestamp to the
00080     // ini file
00081     struct _stat buf;
00082     _fstat(_fileno(m_pStream), &buf);
00083     CString strCurrentTime = ctime(&buf.st_ctime);
00084     strCurrentTime.TrimRight();
00085     CString strStoredTime =
00086         pApp->GetProfileString(szSection, szTimeStamp, NULL);
00087     if (strCurrentTime != strStoredTime)
00088     {
00089         iFilePos = 0;
00090         pApp->WriteProfileString(szSection, szTimeStamp, strCurrentTime);
00091     }
00092
00093     if (fseek(m_pStream, iFilePos, SEEK_SET) != 0)
00094     {
00095         CString errorMsg;
00096         errorMsg.LoadString(CG_IDP_FILE_CORRUPT);
00097
00098         CvsAlert(kCvsAlertStopIcon,
00099             errorMsg, NULL,
00100             BUTTONTITLE_OK, NULL).ShowAlert();
00101     }
00102     else
00103     {
00104         GetNextTipString(m_strTip);
00105     }
00106 }

Here is the call graph for this function:

CTipDlg::~CTipDlg ( ) [virtual]

Definition at line 108 of file TipDlg.cpp.

References m_pStream, NULL, szIntFilePos, and szSection.

00109 {
00110     // This destructor is executed whether the user had pressed the escape key
00111     // or clicked on the close button. If the user had pressed the escape key,
00112     // it is still required to update the filepos in the ini file with the
00113     // latest position so that we don't repeat the tips!
00114
00115     // But make sure the tips file existed in the first place....
00116     if (m_pStream != NULL)
00117     {
00118         CWinApp* pApp = AfxGetApp();
00119         pApp->WriteProfileInt(szSection, szIntFilePos, ftell(m_pStream));
00120         fclose(m_pStream);
00121     }
00122 }

Member Function Documentation

void CTipDlg::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Definition at line 124 of file TipDlg.cpp.

References IDC_STARTUP, IDC_TIPSTRING, m_bStartup, and m_strTip.

00125 {
00126     CDialog::DoDataExchange(pDX);
00127     //{{AFX_DATA_MAP(CTipDlg)
00128     DDX_Check(pDX, IDC_STARTUP, m_bStartup);
00129     DDX_Text(pDX, IDC_TIPSTRING, m_strTip);
00130     //}}AFX_DATA_MAP
00131 }

void CTipDlg::GetNextTipString ( CString & strNext ) [protected]

Definition at line 150 of file TipDlg.cpp.

References BUTTONTITLE_OK, CG_IDP_FILE_CORRUPT, kCvsAlertStopIcon, m_pStream, MAX_BUFLEN, and NULL.

Referenced by CTipDlg().

00151 {
00152     LPTSTR lpsz = strNext.GetBuffer(MAX_BUFLEN);
00153
00154     // This routine identifies the next string that needs to be
00155     // read from the tips file
00156     BOOL bStop = FALSE;
00157     while (!bStop)
00158     {
00159         if (_fgetts(lpsz, MAX_BUFLEN, m_pStream) == NULL)
00160         {
00161             // We have either reached EOF or encountered some problem
00162             // In both cases reset the pointer to the beginning of the file
00163             // This behavior is same as VC++ Tips file
00164             if (fseek(m_pStream, 0, SEEK_SET) != 0)
00165             {
00166                 CString errorMsg;
00167                 errorMsg.LoadString(CG_IDP_FILE_CORRUPT);
00168
00169                 CvsAlert(kCvsAlertStopIcon,
00170                     errorMsg, NULL,
00171                     BUTTONTITLE_OK, NULL).ShowAlert();
00172             }
00173         }
00174         else
00175         {
00176             if (*lpsz != ' ' && *lpsz != '\t' &&
00177                 *lpsz != '\n' && *lpsz != ';')
00178             {
00179                 // There should be no space at the beginning of the tip
00180                 // This behavior is same as VC++ Tips file
00181                 // Comment lines are ignored and they start with a semicolon
00182                 bStop = TRUE;
00183             }
00184         }
00185     }
00186     strNext.ReleaseBuffer();
00187 }

HBRUSH CTipDlg::OnCtlColor | ( | CDC * | pDC,
 |  | CWnd * | pWnd,
 |  | UINT | nCtlColor
 | ) | [protected]

Definition at line 189 of file TipDlg.cpp.

References IDC_TIPSTRING.

00190 {
00191     if (pWnd->GetDlgCtrlID() == IDC_TIPSTRING)
00192         return (HBRUSH)GetStockObject(WHITE_BRUSH);
00193
00194     return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
00195 }

BOOL CTipDlg::OnInitDialog ( ) [protected, virtual]

Definition at line 206 of file TipDlg.cpp.

References IDC_NEXTTIP, m_pStream, and NULL.

00207 {
00208     CDialog::OnInitDialog();
00209
00210     // If Tips file does not exist then disable NextTip
00211     if (m_pStream == NULL)
00212         GetDlgItem(IDC_NEXTTIP)->EnableWindow(FALSE);
00213
00214     return TRUE;  // return TRUE unless you set the focus to a control
00215 }

void CTipDlg::OnNextTip ( ) [protected]

Definition at line 144 of file TipDlg.cpp.

00145 {
00146     GetNextTipString(m_strTip);
00147     UpdateData(FALSE);
00148 }

void CTipDlg::OnOK ( ) [protected, virtual]

Definition at line 197 of file TipDlg.cpp.

References m_bStartup, szIntStartup, and szSection.

00198 {
00199     CDialog::OnOK();
00200
00201     // Update the startup information stored in the INI file
00202     CWinApp* pApp = AfxGetApp();
00203     pApp->WriteProfileInt(szSection, szIntStartup, !m_bStartup);
00204 }

void CTipDlg::OnPaint ( ) [protected]

Definition at line 217 of file TipDlg.cpp.

References CG_IDS_DIDYOUKNOW, IDB_LIGHTBULB, and IDC_BULB.

00218 {
00219     CPaintDC dc(this); // device context for painting
00220
00221     // Get paint area for the big static control
00222     CWnd* pStatic = GetDlgItem(IDC_BULB);
00223     CRect rect;
00224     pStatic->GetWindowRect(&rect);
00225     ScreenToClient(&rect);
00226
00227     // Paint the background white.
00228     CBrush brush;
00229     brush.CreateStockObject(WHITE_BRUSH);
00230     dc.FillRect(rect, &brush);
00231
00232     // Load bitmap and get dimensions of the bitmap
00233     CBitmap bmp;
00234     bmp.LoadBitmap(IDB_LIGHTBULB);
00235     BITMAP bmpInfo;
00236     bmp.GetBitmap(&bmpInfo);
00237
00238     // Draw bitmap in top corner and validate only top portion of window
00239     CDC dcTmp;
00240     dcTmp.CreateCompatibleDC(&dc);
00241     dcTmp.SelectObject(&bmp);
00242     rect.bottom = bmpInfo.bmHeight + rect.top;
00243     dc.BitBlt(rect.left, rect.top, rect.Width(), rect.Height(),
00244         &dcTmp, 0, 0, SRCCOPY);
00245
00246     // Draw out "Did you know..." message next to the bitmap
00247     CString strMessage;
00248     strMessage.LoadString(CG_IDS_DIDYOUKNOW);
00249     rect.left += bmpInfo.bmWidth;
00250     dc.DrawText(strMessage, rect, DT_VCENTER | DT_SINGLELINE);
00251
00252     // Do not call CDialog::OnPaint() for painting messages
00253 }

Member Data Documentation

BOOL CTipDlg::m_bStartup

Definition at line 38 of file TipDlg.h.

Referenced by CTipDlg(), DoDataExchange(), and OnOK().

FILE* CTipDlg::m_pStream

Definition at line 42 of file TipDlg.h.

Referenced by CTipDlg(), GetNextTipString(), OnInitDialog(), and ~CTipDlg().

CString CTipDlg::m_strTip

Definition at line 39 of file TipDlg.h.

Referenced by CTipDlg(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • WinCvs/TipDlg.h
  • WinCvs/TipDlg.cpp
Generated on Sat Aug 7 22:57:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TKeyString< delimiter > Class Template Reference

TKeyString< delimiter > Class Template Reference

Multi-string for storing map (e.g. dictionary). More...

#include <MultiString.h>

Inheritance diagram for TKeyString< delimiter >:

[legend]
Collaboration diagram for TKeyString< delimiter >:

[legend]
List of all members.

Public Member Functions

TKeyString (unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass)
virtual | ~TKeyString ()
virtual void | Concatenate (UStr &res, const char *key, const char *value) const
virtual void | Split (const char *str, UStr &key, UStr &value) const
const char | GetDelimiter () const

Protected Member Functions

virtual int | Compare (const char *s1, const char *s2) const

Detailed Description

template<char delimiter>
class TKeyString< delimiter >

Multi-string for storing map (e.g. dictionary).

Definition at line 135 of file MultiString.h.

Constructor & Destructor Documentation

template<char delimiter>
TKeyString< delimiter >::TKeyString | ( | unsigned int | maxstr,
 |  | const char * | uniqueName,
 |  | char *const * | defaultStr = 0L,
 |  | kClassPersistent | pclass = kNoClass
 | ) |

Definition at line 260 of file MultiString.cpp.

00262                                   : CMString(maxstr, uniqueName, defaultStr, pclass)
00263 {
00264 }

template<char delimiter>
TKeyString< delimiter >::~TKeyString ( ) [virtual]

Definition at line 267 of file MultiString.cpp.

00268 {
00269 }

Member Function Documentation

template<char delimiter>
int TKeyString< delimiter >::Compare | ( | const char * | s1,
 |  | const char * | s2
 | ) | const [protected, virtual]

Reimplemented from TMString< UStr >.

Reimplemented in CMKeyString.

Definition at line 334 of file MultiString.cpp.

References TKeyString< delimiter >::Split().

00335 {
00336     UStr key1, key2, val1, val2;
00337
00338     Split(s1, key1, val1);
00339     Split(s2, key2, val2);
00340
00341     return strcmp(key1, key2);
00342 }

Here is the call graph for this function:

template<char delimiter>
void TKeyString< delimiter >::Concatenate | ( | UStr & | res,
 |  | const char * | key,
 |  | const char * | value
 | ) | const [virtual]

Concatenate the key and value strings into a single delimited string

Parameters:
res | Return result string
key | Key
value | Value
Definition at line 278 of file MultiString.cpp.

Referenced by DDX_ComboMString(), InsertLastCvsroot(), InsertLastModuleName(), USmartCombo::RemoveItem(), CvsPrefs::SetWhichCvs(), and CvsPrefs::WhichCvs().

00279 {
00280     char c;
00281     while( (c = *key++) != '\0' )
00282     {
00283         if( c == delimiter || c == '\\' )
00284             res << '\\';
00285
00286         res << c;
00287     }
00288
00289     res << delimiter;
00290     while( (c = *value++) != '\0' )
00291     {
00292         if( c == delimiter || c == '\\' )
00293             res << '\\';
00294
00295         res << c;
00296     }
00297 }

template<char delimiter>
const char TKeyString< delimiter >::GetDelimiter ( ) const

Get the delimiter

Returns:
Keyword-value delimiter
Definition at line 349 of file MultiString.cpp.
00350 {
00351     return delimiter;
00352 }

template<char delimiter>
void TKeyString< delimiter >::Split | ( | const char * | str,
 |  | UStr & | key,
 |  | UStr & | value
 | ) | const [virtual]

Split a single delimited string into the key and value strings

Parameters:
str | String to split
key | Return key
value | Return value
Definition at line 306 of file MultiString.cpp.

References UStr::clear().

Referenced by TKeyString< delimiter >::Compare(), DDX_ComboMString(), FindBestLastCvsroot(), FindBestLastModuleName(), USmartCombo::RemoveItem(), and CvsPrefs::WhichCvs().

00307 {
00308     key.clear();
00309     value.clear();
00310
00311     bool inKey = true;
00312
00313     char c;
00314     while( (c = *str++) != 0 )
00315     {
00316         if( c == '\\' )
00317         {
00318             c = *str++;
00319         }
00320         else if( c == delimiter )
00321         {
00322             inKey = false;
00323             continue;
00324         }
00325
00326         if( inKey )
00327             key << c;
00328         else
00329             value << c;
00330     }
00331 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/MultiString.h
  • common/MultiString.cpp
Generated on Sat Aug 7 22:57:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TLaunchHandler< lauchType > Class Template Reference

TLaunchHandler< lauchType > Class Template Reference

Handles shell action launch. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for TLaunchHandler< lauchType >:

[legend]
Collaboration diagram for TLaunchHandler< lauchType >:

[legend]
List of all members.

Public Member Functions

TLaunchHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

template<kLaunchType lauchType>
class TLaunchHandler< lauchType >

Handles shell action launch.

Definition at line 775 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

template<kLaunchType lauchType>
TLaunchHandler< lauchType >::TLaunchHandler ( ) [inline]

Definition at line 778 of file BrowseViewHandlers.h.

References GetLaunchTypeName().

00779         : KiSelectionHandler(GetLaunchTypeName(lauchType), true)
00780     {}

Here is the call graph for this function:

Member Function Documentation

template<kLaunchType lauchType>
virtual void TLaunchHandler< lauchType >::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 785 of file BrowseViewHandlers.h.

References CvsCmdLaunch(), and KiSelectionHandler::OnFiles().

00786     {
00787         KiSelectionHandler::OnFiles(pmf);
00788         CvsCmdLaunch(*this, lauchType);
00789     }

Here is the call graph for this function:

template<kLaunchType lauchType>
virtual void TLaunchHandler< lauchType >::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 782 of file BrowseViewHandlers.h.

00783     { /* ignore */ }

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:57:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TMPersistent< T > Class Template Reference

TMPersistent< T > Class Template Reference

Persistent array. More...

#include <MultiString.h>

Inheritance diagram for TMPersistent< T >:

[legend]
Collaboration diagram for TMPersistent< T >:

[legend]
List of all members.

Public Member Functions

TMPersistent (const char *uniqueName, kClassPersistent pclass=kNoClass)
virtual | ~TMPersistent ()

Protected Types

typedef ::vector< T > | list_t

Protected Member Functions

virtual unsigned int | SizeOf (void) const
Get the size of the data.
virtual const void * | GetData (void) const
Get the data.
virtual void | SetData (const void *ptr, unsigned int size)
Set the data.
const list_t & | GetList (void) const
list_t & | GetList (void)

Private Attributes

list_t m_allItems
CStaticAllocT< char > | m_buffer

Detailed Description

template<class T>
class TMPersistent< T >

Persistent array.

Definition at line 47 of file MultiString.h.

Member Typedef Documentation

template<class T>
typedef :: vector<T> TMPersistent< T >::list_t [protected]

Definition at line 50 of file MultiString.h.

Referenced by TMPersistent< T >::GetList().

Constructor & Destructor Documentation

template<class T>
TMPersistent< T >::TMPersistent | ( | const char * | uniqueName,
 |  | kClassPersistent | pclass = kNoClass
 | ) |

Definition at line 198 of file MultiString.h.

00199     : CPersistent(uniqueName, pclass)
00200 {
00201 }

template<class T>
TMPersistent< T >::~TMPersistent ( ) [virtual]

Definition at line 204 of file MultiString.h.

00205 {
00206 }

Member Function Documentation

template<class T>
const void * TMPersistent< T >::GetData ( void ) const [protected, virtual]

Get the data.

Implements CPersistent.

Definition at line 215 of file MultiString.h.

References TMPersistent< T >::SizeOf().

00216 {
00217     m_buffer.AdjustSize(SizeOf());
00218     char* tmp = m_buffer;
00219     *(int*) tmp = m_allItems.size();
00220     tmp += sizeof(int) / sizeof(char);
00221
00222     for(typename list_t::const_iterator i = m_allItems.begin(); i != m_allItems.end(); ++i)
00223     {
00224         memcpy(tmp, (const char*)(&*i), sizeof(T));
00225         tmp += sizeof(T);
00226     }
00227
00228     return (char*)m_buffer;
00229 }

Here is the call graph for this function:

template<class T>
TMPersistent< T >::list_t & TMPersistent< T >::GetList ( void ) [inline, protected]

Definition at line 192 of file MultiString.h.

References TMPersistent< T >::list_t.

00193 {
00194     return m_allItems;
00195 }

template<class T>
const TMPersistent< T >::list_t & TMPersistent< T >::GetList ( void ) const [inline, protected]

Definition at line 186 of file MultiString.h.

References TMPersistent< T >::list_t.

00187 {
00188     return m_allItems;
00189 }

template<class T>
void TMPersistent< T >::SetData | ( | const void * | ptr,
 |  | unsigned int | size
 | ) | [protected, virtual]

Set the data.

Implements CPersistent.

Definition at line 232 of file MultiString.h.

00233 {
00234     const char* tmp = (char*)ptr;
00235     m_allItems.erase(m_allItems.begin(), m_allItems.end());
00236     unsigned int thesize = *(int*)tmp;
00237
00238     tmp += sizeof(int) / sizeof(char);
00239     for(unsigned int i = 0; i < thesize; ++i)
00240     {
00241         m_allItems.push_back(*((T*)tmp));
00242         tmp += sizeof(T);
00243     }
00244 }

template<class T>
unsigned int TMPersistent< T >::SizeOf ( void ) const [inline, protected, virtual]

Get the size of the data.

Implements CPersistent.

Definition at line 209 of file MultiString.h.

Referenced by TMPersistent< T >::GetData().

00210 {
00211     return sizeof(int) + sizeof(T) * m_allItems.size();
00212 }

Member Data Documentation

template<class T>
list_t TMPersistent< T >::m_allItems [private]

Definition at line 68 of file MultiString.h.

template<class T>
CStaticAllocT<char> TMPersistent< T >::m_buffer [mutable, private]

Definition at line 69 of file MultiString.h.

The documentation for this class was generated from the following file:
  • common/MultiString.h
Generated on Sat Aug 7 22:57:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTmpFiles Class Reference

CTmpFiles Class Reference

Class to support the clean up of any temporary files created. More...

#include <AppGlue.h>

Collaboration diagram for CTmpFiles:

[legend]
List of all members.

Public Member Functions

CTmpFiles ()
virtual | ~CTmpFiles ()
const char * | push_back (const char *file)

Protected Attributes

std::vector< CStr > | m_allfiles

Detailed Description

Class to support the clean up of any temporary files created.

Definition at line 161 of file AppGlue.h.

Constructor & Destructor Documentation

CTmpFiles::CTmpFiles ( )

Definition at line 972 of file AppGlue.cpp.

00973 {
00974 }

CTmpFiles::~CTmpFiles ( ) [virtual]

Definition at line 976 of file AppGlue.cpp.

References m_allfiles, and wnt_unlink().

00977 {
00978     std::vector<CStr>::const_iterator i;
00979     for(i = m_allfiles.begin(); i != m_allfiles.end(); ++i)
00980     {
00981         const char* file = *i;
00982
00983 #ifdef WIN32
00984         wnt_unlink((char*)file);
00985 #else
00986         unlink((char*)file);
00987 #endif
00988     }
00989 }

Here is the call graph for this function:

Member Function Documentation

const char * CTmpFiles::push_back ( const char * file ) [inline]

Definition at line 991 of file AppGlue.cpp.

References m_allfiles.

Referenced by launchCVS().

00992 {
00993     m_allfiles.push_back(file);
00994
00995     return m_allfiles[m_allfiles.size() - 1];
00996 }

Member Data Documentation

std::vector<CStr> CTmpFiles::m_allfiles [protected]

Files collection Definition at line 168 of file AppGlue.h.

Referenced by push_back(), and ~CTmpFiles().

The documentation for this class was generated from the following files:
  • common/AppGlue.h
  • common/AppGlue.cpp
Generated on Sat Aug 7 22:57:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TMString< T > Class Template Reference

TMString< T > Class Template Reference

#include <MultiString.h>

Inheritance diagram for TMString< T >:

[legend]
Collaboration diagram for TMString< T >:

[legend]
List of all members.

Public Types

typedef ::vector< T > | list_t

Public Member Functions

TMString (unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass)
defaultStr is a null terminated set of strings
virtual | ~TMString ()
void | Insert (const char *str)
bool | Remove (const char *str)
void | RemoveAll ()
list_t::const_iterator | Find (const char *instr) const
const list_t & | GetList (void) const
list_t::const_iterator | begin () const
list_t::const_iterator | end () const

Protected Member Functions

virtual unsigned int | SizeOf (void) const
Get the size of the data.
virtual const void * | GetData (void) const
Get the data.
virtual void | SetData (const void *ptr, unsigned int size)
Set the data.
virtual int | Compare (const char *s1, const char *s2) const

Protected Attributes

list_t m_allStrs
CStaticAllocT< char > | m_buffer
unsigned int | m_maxStr

template<class T>
class TMString< T >

Member Typedef Documentation

template<class T>
typedef :: vector<T> TMString< T >::list_t

Definition at line 76 of file MultiString.h.

Referenced by TMString< T >::GetList().

Constructor & Destructor Documentation

template<class T>
TMString< T >::TMString | ( | unsigned int | maxstr,
 |  | const char * | uniqueName,
 |  | char *const * | defaultStr = 0L,
 |  | kClassPersistent | pclass = kNoClass
 | ) |

defaultStr is a null terminated set of strings

Definition at line 78 of file MultiString.cpp.

References TMString< T >::Insert().

00080     : CPersistent(uniqueName, pclass), m_maxStr(maxstr)
00081 {
00082     if( defaultStr != 0L )
00083     {
00084         int i = 0;
00085         while( defaultStr[i] != 0L )
00086         {
00087             Insert(defaultStr[i++]);
00088         }
00089     }
00090 }

Here is the call graph for this function:

template<class T>
TMString< T >::~TMString ( ) [virtual]

Definition at line 93 of file MultiString.cpp.

00094 {
00095 }

Member Function Documentation

template<class T>
TMString< T >::list_t::const_iterator TMString< T >::begin ( ) const [inline]

Definition at line 256 of file MultiString.h.

References TMString< T >::GetList().

00257 {
00258     return GetList().begin();
00259 }

Here is the call graph for this function:

template<class T>
int TMString< T >::Compare | ( | const char * | s1,
 |  | const char * | s2
 | ) | const [protected, virtual]

Reimplemented in TKeyString< delimiter >, CMKeyString, TKeyString<'@'>, and TKeyString<'\x01'>.

Definition at line 268 of file MultiString.h.

Referenced by TMString< T >::Find(), TMString< T >::Insert(), and TMString< T >::Remove().

00269 {
00270     return strcmp(s1, s2);
00271 }

template<class T>
TMString< T >::list_t::const_iterator TMString< T >::end ( ) const [inline]

Definition at line 262 of file MultiString.h.

References TMString< T >::GetList().

Referenced by CvsPrefs::WhichCvs().

00263 {
00264     return GetList().end();
00265 }

Here is the call graph for this function:

template<class T>
TMString< T >::list_t::const_iterator TMString< T >::Find ( const char * instr ) const

Find a string

Parameters:
instr String to be found
Returns:
const Iterator to the string found
Note:
The string classes have too many operators to use std::find
Definition at line 154 of file MultiString.cpp.

References TMString< T >::Compare(), and TMString< T >::m_allStrs.

Referenced by CvsPrefs::WhichCvs().

00155 {
00156 #if (__GNUC__ > 2)
00157     // prevent compiler warnings if gcc 3.x is used
00158     typename TMString<T>::list_t::const_iterator i;
00159 #else
00160     TMString<T>::list_t::const_iterator i;
00161 #endif
00162
00163     for(i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00164     {
00165         if( Compare(*i, instr) == 0 )
00166             break;
00167     }
00168
00169     return i;
00170 }

Here is the call graph for this function:

template<class T>
const void * TMString< T >::GetData ( void ) const [protected, virtual]

Get the data.

Implements CPersistent.

Definition at line 111 of file MultiString.cpp.

References TMString< T >::m_allStrs, TMString< T >::m_buffer, and TMString< T >::SizeOf().

00112 {
00113     unsigned int thesize = SizeOf(), tmpsize;
00114     ((TMString*)this)->m_buffer.AdjustSize(thesize);
00115
00116     char* tmp = ((TMString*)this)->m_buffer;
00117     *(int*)tmp = m_allStrs.size();
00118     tmp += sizeof(int) / sizeof(char);
00119
00120     for(typename list_t::const_iterator i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00121     {
00122         tmpsize = (*i).length() + 1;
00123         memcpy(tmp, (const char*)(*i), tmpsize * sizeof(char));
00124         tmp += tmpsize;
00125     }
00126
00127     return (char*)m_buffer;
00128 }

Here is the call graph for this function:

template<class T>
const TMString< T >::list_t & TMString< T >::GetList ( void ) const [inline]

Definition at line 250 of file MultiString.h.

References TMString< T >::list_t, and TMString< T >::m_allStrs.

Referenced by TMString< T >::begin(), DDX_ComboMString(), TMString< T >::end(), FindBestLastCvsroot(), FindBestLastModuleName(), CHistComboBoxEx::FindBestRoot(), CPersistent::LoadAll(), CHistComboBoxEx::NewRoot(), CMultilineEntryDlg::OnSelchangeCombo(), USmartCombo::RemoveItem(), UCvsFolders::ResetBrowser(), and CPersistent::SaveAll().

00251 {
00252     return m_allStrs;
00253 }

template<class T>
void TMString< T >::Insert ( const char * str )

Add a new string

Parameters:
str String to insert
Definition at line 177 of file MultiString.cpp.

References TMString< T >::Compare(), TMString< T >::m_allStrs, TMString< T >::m_maxStr, and CPersistent::TouchTimeStamp().

Referenced by DDX_ComboMString(), CMultilineEntryDlg::DoDataExchange(), CFilterSelectionDlg::DoDataExchange(), UCvsFrame::FreshenFileMask(), InsertLastCvsroot(), InsertLastModuleName(), CvsPrefs::load(), CPersistent::LoadAll(), MigrateCvsrootList(), CHistComboBoxEx::NewRoot(), CSortHeaderCtrl::OnFilterChanged(), UCvsFolders::ResetBrowser(), CvsPrefs::SetWhichCvs(), and TMString< T >::TMString().

00178 {
00179     TouchTimeStamp();
00180
00181     for(typename list_t::iterator i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00182     {
00183         if( Compare(*i, str) == 0 )
00184         {
00185             m_allStrs.erase(i);
00186             m_allStrs.insert(m_allStrs.begin(), T(str));
00187             return;
00188         }
00189     }
00190
00191     m_allStrs.insert(m_allStrs.begin(), T(str));
00192
00193     if( m_allStrs.size() > m_maxStr )
00194     {
00195         m_allStrs.erase(m_allStrs.begin() + m_maxStr, m_allStrs.end());
00196     }
00197 }

Here is the call graph for this function:

template<class T>
bool TMString< T >::Remove ( const char * str )

Remove a string, true if it was found

Parameters:
str String to remove
Returns:
true if a string was found and remove, false otherwise
Definition at line 205 of file MultiString.cpp.

References TMString< T >::Compare(), TMString< T >::m_allStrs, and CPersistent::TouchTimeStamp().

Referenced by MigrateCvsrootList(), CSortHeaderCtrl::OnFilterChanged(), and USmartCombo::RemoveItem().

00206 {
00207     for(typename list_t::iterator i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00208     {
00209         if( Compare(*i, str) == 0 )
00210         {
00211             TouchTimeStamp();
00212             m_allStrs.erase(i);
00213             return true;
00214         }
00215     }
00216
00217     return false;
00218 }

Here is the call graph for this function:

template<class T>
void TMString< T >::RemoveAll ( void )

Remove all strings Definition at line 224 of file MultiString.cpp.

References TMString< T >::m_allStrs, and CPersistent::TouchTimeStamp().

00225 {
00226     TouchTimeStamp();
00227     m_allStrs.clear();
00228 }

Here is the call graph for this function:

template<class T>
void TMString< T >::SetData | ( | const void * | ptr,
 |  | unsigned int | size
 | ) | [protected, virtual]

Set the data.

Implements CPersistent.

Definition at line 131 of file MultiString.cpp.

References TMString< T >::m_allStrs, and TMString< T >::m_maxStr.

00132 {
00133     const char* tmp = (char*)ptr;
00134     unsigned int thesize;
00135
00136     m_allStrs.erase(m_allStrs.begin(), m_allStrs.end());
00137     thesize = *(int*)tmp;
00138     tmp += sizeof(int) / sizeof(char);
00139
00140     for(unsigned int i = 0; i < thesize && i < m_maxStr; i++)
00141     {
00142         m_allStrs.push_back(T(tmp));
00143         tmp += strlen(tmp) + 1;
00144     }
00145 }

template<class T>
unsigned int TMString< T >::SizeOf ( void ) const [protected, virtual]

Get the size of the data.

Implements CPersistent.

Definition at line 98 of file MultiString.cpp.

References TMString< T >::m_allStrs.

Referenced by TMString< T >::GetData().

00099 {
00100     unsigned int thesize = sizeof(int);
00101
00102     for(typename list_t::const_iterator i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00103     {
00104         thesize += (*i).length() + 1;
00105     }
00106
00107     return thesize;
00108 }

Member Data Documentation

template<class T>
list_t TMString< T >::m_allStrs [protected]

Definition at line 104 of file MultiString.h.

Referenced by TMString< T >::Find(), TMString< T >::GetData(), TMString< T >::GetList(), TMString< T >::Insert(), TMString< T >::Remove(), TMString< T >::RemoveAll(), TMString< T >::SetData(), and TMString< T >::SizeOf().

template<class T>
CStaticAllocT<char> TMString< T >::m_buffer [mutable, protected]

Definition at line 105 of file MultiString.h.

Referenced by TMString< T >::GetData().

template<class T>
unsigned int TMString< T >::m_maxStr [protected]

Definition at line 106 of file MultiString.h.

Referenced by TMString< T >::Insert(), and TMString< T >::SetData().

The documentation for this class was generated from the following files:
  • common/MultiString.h
  • common/MultiString.cpp
Generated on Sat Aug 7 22:57:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UToolbar Class Reference

UToolbar Class Reference

#include <utoolbar.h>

Inheritance diagram for UToolbar:

[legend]
Collaboration diagram for UToolbar:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UToolbar (int widid)
virtual | ~UToolbar ()
virtual int | UDispatchMessage (int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo)
this is overided in order to broadcast to the listeners

Static Public Member Functions

const URuntimeClass * | rtUToolbar (void)

Protected Member Functions

void | OnDestroy ()
void | OnTbInit (UTB_INIT *info)
void | OnTbEnd (void)
void | OnTbButton (UTB_BUTTON *info)
void | OnTbDropDown (UTB_DROPDOWN *info)
void | OnTbCheckBtn (UTB_BUTTON *info)
void | OnTbSeparator (void)
void | OnSetTooltip (int cmd, UCmdUI *pCmdUI)
not documented
int | OnCommands (int cmd)
void | OnUpdateUI (void)
when the user interface is invalid.
void | RebuildBar (bool onlyBitmap=true)
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

WININFO * m_winInfo
CDynToolBar * m_wndToolBar

Static Protected Attributes

const URuntimeClass | classUToolbar
const UMSGMAP | messageMap = { UWidget ::GetThisMessageMap(), & UToolbar ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Constructor & Destructor Documentation

UToolbar::UToolbar ( int widid )

Definition at line 424 of file utoolbar.cpp.

00424                             : UWidget(widid), m_winInfo(0L)
00425 #ifdef WIN32
00426     , m_wndToolBar(0L)
00427 #endif
00428 {
00429 }

UToolbar::~UToolbar ( ) [virtual]

Definition at line 431 of file utoolbar.cpp.

00432 {
00433 }

Member Function Documentation

const URuntimeClass * UToolbar::_GetBaseClass ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UCvsToolbar.

Definition at line 57 of file utoolbar.cpp.

const UMSGMAP * UToolbar::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UCvsToolbar.

Definition at line 59 of file utoolbar.cpp.

const UMSGMAP * UToolbar::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UWidget.

Reimplemented in UCvsToolbar.

Definition at line 59 of file utoolbar.cpp.

const URuntimeClass * UToolbar::GetRuntimeClass ( ) const [virtual]

Reimplemented from UWidget.

Reimplemented in UCvsToolbar.

Definition at line 57 of file utoolbar.cpp.

const UMSGMAP * UToolbar::GetThisMessageMap ( ) [static, protected]

Reimplemented from UWidget.

Reimplemented in UCvsToolbar.

Definition at line 59 of file utoolbar.cpp.

int UToolbar::OnCommands ( int cmd ) [protected]

Definition at line 825 of file utoolbar.cpp.

References EV_CMD, UCmdTarget::GetWidID(), USemaphore::IsEnteredTwice(), STD, UAppConsole(), UEventGetTargets(), and UEventSendMessageExt().

00826 {
00827 #if 0
00828     static bool sSemaphore = false;
00829     USemaphore policeman(sSemaphore);
00830     if(policeman.IsEnteredTwice())
00831         return 1;
00832 #endif
00833     // this is the interesting thing about the toolbar : it resends the
00834     // commands to other widgets according to the focus information and
00835     // allows the command to be handled several times if the handler return 1
00836
00837     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00838     int res = 0;
00839     int handledFlag;
00840
00841     // first forward the command to the focused widget : if it doesn't want it
00842     // we give it to the next pseudo widget.
00843     if(sFocusWidID != -1 && sFocusWidID != GetWidID())
00844     {
00845         res = UEventSendMessageExt(sFocusWidID, EV_CMD, cmd, 0L, &handledFlag);
00846         if(/*res == 0 &&*/ handledFlag)
00847             return 0;
00848     }
00849
00850     STD map<int, UCmdTarget *>::const_iterator i;
00851     for(i = targets.begin(); i != targets.end(); ++i)
00852     {
00853         int widid = (*i).first;
00854         if(widid == sFocusWidID || widid == GetWidID())
00855             continue;
00856         res = UEventSendMessageExt(widid, EV_CMD, cmd, 0L, &handledFlag);
00857         if(/*res == 0 &&*/ handledFlag)
00858             return 0;
00859     }
00860
00861     UAppConsole("The cmd %d of the toolbar has no command handler\n", cmd);
00862
00863     return 0;
00864 }

Here is the call graph for this function:

void UToolbar::OnDestroy ( ) [protected]

Reimplemented in UCvsToolbar.

Definition at line 764 of file utoolbar.cpp.

References m_winInfo.

00765 {
00766     if(m_winInfo != 0L)
00767         delete m_winInfo;
00768 }

void UToolbar::OnSetTooltip | ( | int | cmd,
 |  | UCmdUI * | pCmdUI
 | ) | [protected]

not documented

Reimplemented from UWidget.

Definition at line 800 of file utoolbar.cpp.

References WININFO::entries, TbEntryDropDown::icons, TbEntry::kind, m_winInfo, WININFO::Search(), UCmdUI::SetTooltip(), tbeButton, tbeDropDown, awidget::tooltip, and TbEntryButton::wid.

00801 {
00802     WININFO *info = m_winInfo;
00803     if(info == 0L)
00804         return;
00805
00806     int index;
00807     std::vector<TbEntry *>::iterator f = info->Search(cmd, &index);
00808     if(f == info->entries.end())
00809         return;
00810
00811     TbEntry * entry = *f;
00812     if(entry->kind == tbeDropDown)
00813     {
00814         TbEntryDropDown *drop = (TbEntryDropDown *)entry;
00815         awidget & wid = drop->icons[index];
00816         pCmdUI->SetTooltip(wid.tooltip);
00817     }
00818     else if(entry->kind == tbeButton)
00819     {
00820         TbEntryButton *btn = (TbEntryButton *)entry;
00821         pCmdUI->SetTooltip(btn->wid.tooltip);
00822     }
00823 }

Here is the call graph for this function:

void UToolbar::OnTbButton ( UTB_BUTTON * info ) [protected]

Definition at line 624 of file utoolbar.cpp.

References UTB_BUTTON::cmd, WININFO::entries, EV_INIT_WIDGET, UWidget::GetWidget(), UCmdTarget::GetWidID(), UTB_BUTTON::icon, kUMainWidget, m_winInfo, m_wndToolBar, NEW, UTB_BUTTON::tooltip, UEventSendMessage(), UMakeBitmap(), and UTB_BUTTON::varcode.

00625 {
00626 #ifdef WIN32
00627     ASSERT(m_wndToolBar != 0L);
00628 #endif
00629
00630     WININFO & tb = *m_winInfo;
00631     HBITMAP bitmap = UMakeBitmap((char **)info->icon);
00632     TbEntryButton *btn = NEW TbEntryButton(bitmap, info->cmd,
00633         info->tooltip, info->varcode);
00634     tb.entries.push_back(btn);
00635
00636 #ifdef qGTK
00637     char status[256] = {'\0'};
00638     char prompt[256] = {'\0'};
00639
00640     strcpy(status, info->tooltip);
00641     char *cr = strchr(status, '\n');
00642     if(cr != 0L)
00643     {
00644         strcpy(prompt, cr + 1);
00645         *cr = '\0';
00646     }
00647     GtkToolbar *toolbar = GTK_TOOLBAR(GetWidget(kUMainWidget));
00648     GtkWidget *tmp_toolbar_icon = info->icon != 0L ?
00649         create_pixmap(GTK_WIDGET(toolbar), (const char *)info->icon) : 0L;
00650     GtkWidget *wid = gtk_toolbar_append_element(toolbar, GTK_TOOLBAR_CHILD_BUTTON, 0L,
00651                                                 prompt, status, 0L,
00652                                                 tmp_toolbar_icon, 0L, 0L);
00653     UEventSendMessage(GetWidID(), EV_INIT_WIDGET, info->cmd, wid);
00654 #endif
00655 }

Here is the call graph for this function:

void UToolbar::OnTbCheckBtn ( UTB_BUTTON * info ) [protected]

Definition at line 730 of file utoolbar.cpp.

References UTB_BUTTON::cmd, WININFO::entries, EV_INIT_WIDGET, UWidget::GetWidget(), UCmdTarget::GetWidID(), UTB_BUTTON::icon, kUMainWidget, m_winInfo, m_wndToolBar, NEW, UTB_BUTTON::tooltip, UEventSendMessage(), UMakeBitmap(), and UTB_BUTTON::varcode.

00731 {
00732 #ifdef WIN32
00733     ASSERT(m_wndToolBar != 0L);
00734 #endif
00735
00736     WININFO & tb = *m_winInfo;
00737     HBITMAP bitmap = UMakeBitmap((char **)info->icon);
00738     TbEntryButton *btn = NEW TbEntryChkButton(bitmap, info->cmd,
00739         info->tooltip, info->varcode);
00740     tb.entries.push_back(btn);
00741
00742 #ifdef qGTK
00743     char status[256] = {'\0'};
00744     char prompt[256] = {'\0'};
00745
00746     strcpy(status, info->tooltip);
00747     char *cr = strchr(status, '\n');
00748     if(cr != 0L)
00749     {
00750         strcpy(prompt, cr + 1);
00751         *cr = '\0';
00752     }
00753     GtkToolbar *toolbar = GTK_TOOLBAR(GetWidget(kUMainWidget));
00754     GtkWidget *tmp_toolbar_icon = info->icon != 0L ?
00755         create_pixmap(GTK_WIDGET(toolbar), (const char *)info->icon) : 0L;
00756     GtkWidget *wid = gtk_toolbar_append_element(toolbar, GTK_TOOLBAR_CHILD_TOGGLEBUTTON, 0L,
00757                                                 prompt, status, 0L,
00758                                                 tmp_toolbar_icon, 0L, 0L);
00759     UEventSendMessage(GetWidID(), EV_INIT_WIDGET, info->cmd, wid);
00760 #endif
00761 }

Here is the call graph for this function:

void UToolbar::OnTbDropDown ( UTB_DROPDOWN * info ) [protected]

Definition at line 674 of file utoolbar.cpp.

References UTB_DROPDOWN::btns, UTB_BUTTON::cmd, TbEntryDropDown::current, WININFO::entries, EV_INIT_WIDGET, UWidget::GetWidget(), UCmdTarget::GetWidID(), UTB_BUTTON::icon, TbEntryDropDown::icons, UTB_DROPDOWN::initialcmd, kUMainWidget, m_winInfo, m_wndToolBar, NEW, UTB_DROPDOWN::tooltip, UTB_BUTTON::tooltip, UEventSendMessage(), UMakeBitmap(), and UTB_BUTTON::varcode.

00675 {
00676 #ifdef WIN32
00677     ASSERT(m_wndToolBar != 0L);
00678 #endif
00679
00680     WININFO & tb = *m_winInfo;
00681     TbEntryDropDown *drop = NEW TbEntryDropDown();
00682     tb.entries.push_back(drop);
00683     int current = 0;
00684
00685 #ifndef qGTK
00686     UTB_BUTTON *btns = info->btns;
00687     while(btns->icon != 0L)
00688     {
00689         HBITMAP bitmap = UMakeBitmap((char **)btns->icon);
00690         awidget ad(bitmap, btns->cmd, btns->tooltip, btns->varcode);
00691         drop->icons.push_back(ad);
00692         if(btns->cmd == info->initialcmd)
00693             drop->current = current;
00694         btns++;
00695         current++;
00696     }
00697 #else
00698     char status[256] = {'\0'};
00699     char prompt[256] = {'\0'};
00700
00701     strcpy(status, info->tooltip);
00702     char *cr = strchr(status, '\n');
00703     if(cr != 0L)
00704     {
00705         strcpy(prompt, cr + 1);
00706         *cr = '\0';
00707     }
00708
00709     UTB_BUTTON *btns = info->btns;
00710     GtkToolbar *toolbar = GTK_TOOLBAR(GetWidget(kUMainWidget));
00711     GtkWidget *newElement = gtk_combo_new ();
00712
00713     while(btns && btns->icon != 0L) {
00714         if(btns->cmd == info->initialcmd)
00715             drop->current = current;
00716
00717         btns++;
00718     }
00719
00720     /* don't open the list on RETURN */
00721     gtk_combo_disable_activate(GTK_COMBO(newElement));
00722
00723     gtk_toolbar_append_widget(toolbar, newElement, prompt, status);
00724     gtk_widget_show (newElement);
00725
00726     UEventSendMessage(GetWidID(), EV_INIT_WIDGET, info->initialcmd, newElement);
00727 #endif
00728 }

Here is the call graph for this function:

void UToolbar::OnTbEnd ( void ) [protected]

Definition at line 617 of file utoolbar.cpp.

References RebuildBar().

00618 {
00619 #ifdef WIN32
00620     RebuildBar(false);
00621 #endif
00622 }

Here is the call graph for this function:

void UToolbar::OnTbInit ( UTB_INIT * info ) [protected]

Definition at line 435 of file utoolbar.cpp.

References CCJToolBar::Create(), CDynToolBar::GetMainFrame(), UWidget::GetWidget(), UCmdTarget::GetWidID(), UTB_INIT::heightbtn, kUMainWidget, m_winInfo, m_wndToolBar, NEW, CDynToolBar::SetPseudoID(), CCJToolBar::SetSizes(), CDynToolBar::SetWinInfo(), UTB_INIT::title, UTB_INIT::widthbtn, and UTB_INIT::winid.

00436 {
00437     m_winInfo = NEW WININFO(info->widthbtn, info->heightbtn);
00438
00439 #ifdef WIN32
00440     WININFO & tb = *m_winInfo;
00441     m_wndToolBar = new CDynToolBar;
00442     CFrameWnd *f = m_wndToolBar->GetMainFrame();
00443     VERIFY(m_wndToolBar->Create(f, WS_CHILD | WS_VISIBLE | CBRS_TOP, info->winid));
00444     m_wndToolBar->SetBarStyle(m_wndToolBar->GetBarStyle() |
00445         CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00446     m_wndToolBar->EnableDocking(CBRS_ALIGN_ANY);
00447     m_wndToolBar->SetWinInfo(m_winInfo);
00448     m_wndToolBar->SetPseudoID(GetWidID());
00449     f->DockControlBar(m_wndToolBar);
00450
00451     // configure the Win32 toolbar
00452     if(info->title != 0L)
00453         m_wndToolBar->SetWindowText(info->title);
00454     m_wndToolBar->SetSizes(CSize(info->widthbtn+7,info->heightbtn+6),
00455         CSize(info->widthbtn,info->heightbtn));
00456 #endif
00457 #ifdef qGTK
00458     void *wid = GetWidget(kUMainWidget);
00459     g_assert(wid != 0L && GTK_IS_TOOLBAR(wid));
00460 #endif
00461 }

Here is the call graph for this function:

void UToolbar::OnTbSeparator ( void ) [protected]

Definition at line 657 of file utoolbar.cpp.

References WININFO::entries, UWidget::GetWidget(), kUMainWidget, m_winInfo, m_wndToolBar, and NEW.

00658 {
00659 #ifdef WIN32
00660     ASSERT(m_wndToolBar != 0L);
00661 #endif
00662
00663     WININFO & tb = *m_winInfo;
00664     TbEntrySeparator *btn = NEW TbEntrySeparator();
00665     tb.entries.push_back(btn);
00666
00667 #ifdef qGTK
00668     GtkToolbar *toolbar = GTK_TOOLBAR(GetWidget(kUMainWidget));
00669
00670     /*GtkWidget *wid = */gtk_toolbar_append_space(toolbar);
00671 #endif
00672 }

Here is the call graph for this function:

void UToolbar::OnUpdateUI ( void ) [protected]

when the user interface is invalid.

the default is to send a EV_UPDTCMD to each sub-widget.

Reimplemented from UWidget.

Definition at line 866 of file utoolbar.cpp.

References UCmdUI::CanContinue(), awidget::cmd, UCmdUI::Enable(), WININFO::entries, EV_UPDTCMD, UWidget::GetWidget(), UCmdTarget::GetWidID(), USemaphore::IsEnteredTwice(), TbEntry::kind, UCmdUI::m_nID, UCmdUI::m_widget, m_winInfo, STD, tbeButton, UEventGetTargets(), UEventSendMessage(), and TbEntryButton::wid.

00867 {
00868 // on Windows the update UI is sent by MFC
00869 #ifndef WIN32
00870     WININFO *info = m_winInfo;
00871     if(info == 0L)
00872         return;
00873
00874     static bool sSemaphore = false;
00875     USemaphore policeman(sSemaphore);
00876     if(policeman.IsEnteredTwice())
00877         return;
00878
00879     // this is the interesting thing about the toolbar : it resends the
00880     // update UI to other widgets according to the focus information and
00881     // allows the update to be handled several times if the handler asks for it
00882     // (by using UCmdUI::SetContinue)
00883
00884     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00885     std::vector<TbEntry *>::const_iterator f;
00886     int cmdid;
00887
00888     for(f = info->entries.begin(); f != info->entries.end(); ++f)
00889     {
00890         TbEntry * entry = *f;
00891         if(entry->kind == tbeButton)
00892         {
00893             TbEntryButton *btn = (TbEntryButton *)entry;
00894             cmdid = btn->wid.cmd;
00895         }
00896         else
00897             continue;
00898
00899         void *widget = GetWidget(cmdid);
00900         if(widget == 0L)
00901             continue;
00902
00903         // first forward the command to the focused widget : if it doesn't want it
00904         // we give it to the next pseudo widget.
00905         if(sFocusWidID != -1 && sFocusWidID != GetWidID())
00906         {
00907             UCmdUI pUI(cmdid);
00908             pUI.m_widget = widget;
00909             UEventSendMessage(sFocusWidID, EV_UPDTCMD, pUI.m_nID, &pUI);
00910             if(!pUI.CanContinue())
00911                 continue;
00912         }
00913
00914         STD map<int, UCmdTarget *>::const_iterator i;
00915         for(i = targets.begin(); i != targets.end(); ++i)
00916         {
00917             int widid = (*i).first;
00918             if(widid == sFocusWidID || widid == GetWidID())
00919                 continue;
00920
00921             UCmdUI pUI(cmdid);
00922             pUI.m_widget = widget;
00923             UEventSendMessage(widid, EV_UPDTCMD, pUI.m_nID, &pUI);
00924             if(!pUI.CanContinue())
00925                 break;
00926         }
00927         if(i == targets.end())
00928         {
00929             //UAppConsole("The cmd %d of the toolbar has no update handler, it's gonna be disabled\n", cmdid);
00930             UCmdUI pUI(cmdid);
00931             pUI.m_widget = widget;
00932             pUI.Enable(false);
00933         }
00934     }
00935 #endif // !WIN32
00936 }

Here is the call graph for this function:

void UToolbar::RebuildBar ( bool onlyBitmap = true ) [protected]

Definition at line 464 of file utoolbar.cpp.

References CCJToolBar::AddDropDownButton(), awidget::bitmap, awidget::cmd, TbEntryDropDown::current, DDV_NONE, WININFO::entries, CCJToolBar::GetButtonStyle(), CCJToolBar::GetItemRect(), WININFO::height, TbEntryDropDown::icons, TbEntryButton::ischeck, TbEntry::kind, CDynToolBar::m_bitmap, m_winInfo, m_wndToolBar, NULL, CCJToolBar::SetBitmap(), CCJToolBar::SetButtonInfo(), CCJToolBar::SetButtons(), TBBS_BUTTON, TBBS_CHECKBOX, TBBS_SEPARATOR, tbeButton, tbeDropDown, tbeSeparator, UCMD_to_WINCMD, UTB_SEPARATOR, awidget::var, TbEntryButton::wid, and WININFO::width.

Referenced by OnTbEnd(), and UDispatchMessage().

00465 {
00466     WININFO & tb = *m_winInfo;
00467
00468     ASSERT(m_wndToolBar != 0L);
00469     // create the bitmap associated with the toolbar
00470     CClientDC dc(m_wndToolBar);
00471     CBitmap* pbmOld = NULL;
00472
00473     CDC dcDest;
00474     VERIFY(dcDest.CreateCompatibleDC(&dc));
00475     CDC dcSrc;
00476     VERIFY(dcSrc.CreateCompatibleDC(&dc));
00477
00478     std::vector<UINT> styles;
00479     std::vector<TbEntry *>::iterator i;
00480     int numicons = 0;
00481     for(i = tb.entries.begin(); i != tb.entries.end(); ++i)
00482     {
00483         TbEntry * entry = *i;
00484
00485         if(entry->kind == tbeDropDown)
00486         {
00487             TbEntryDropDown *drop = (TbEntryDropDown *)entry;
00488             styles.push_back(UCMD_to_WINCMD(drop->icons[drop->current].cmd));
00489             numicons++;
00490         }
00491         else if(entry->kind == tbeButton)
00492         {
00493             TbEntryButton *btn = (TbEntryButton *)entry;
00494             if(btn->wid.var != DDV_NONE)
00495             {
00496                 styles.push_back(UTB_SEPARATOR);
00497             }
00498             else
00499             {
00500                 numicons++;
00501                 styles.push_back(btn->wid.cmd);
00502             }
00503         }
00504         else if(entry->kind == tbeSeparator)
00505         {
00506             styles.push_back(UTB_SEPARATOR);
00507         }
00508         else
00509         {
00510             ASSERT(0);
00511         }
00512     }
00513
00514     if(!onlyBitmap && styles.size())
00515     {
00516         // create the Win32 toolbar
00517         m_wndToolBar->SetButtons(&styles.begin()[0], styles.size());
00518     }
00519
00520     CBitmap bdest;
00521     bdest.CreateCompatibleBitmap(&dc, tb.width * numicons, tb.height);
00522     ASSERT(bdest.m_hObject != NULL);
00523     CBitmap *pbmOldDest = dcDest.SelectObject(&bdest);
00524
00525     int cnt = 0, index = 0;
00526     for(i = tb.entries.begin(); i != tb.entries.end(); ++i, index++)
00527     {
00528         TbEntry * entry = *i;
00529         HBITMAP bmap = 0L;
00530         int cmd;
00531         bool dropdown = false;
00532         bool ischeck = false;
00533
00534         if(entry->kind == tbeDropDown)
00535         {
00536             TbEntryDropDown *drop = (TbEntryDropDown *)entry;
00537             bmap = drop->icons[drop->current].bitmap;
00538             cmd = drop->icons[drop->current].cmd;
00539             dropdown = true;
00540         }
00541         else if(entry->kind == tbeButton)
00542         {
00543             TbEntryButton *btn = (TbEntryButton *)entry;
00544             if(btn->wid.var != DDV_NONE)
00545             {
00546                 if(!onlyBitmap)
00547                 {
00548                     m_wndToolBar->SetButtonInfo(index, ID_SEPARATOR,
00549                         TBBS_SEPARATOR, tb.width);
00550                     CRect rect;
00551                     m_wndToolBar->GetItemRect(index, &rect);
00552                     /*VERIFY(Create("",
00553                             WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_OWNERDRAW,
00554                             rect, m_wndToolBar, UCMD_to_WINCMD(btn->wid.cmd)));*/
00555                 }
00556                 continue;
00557             }
00558
00559             bmap = btn->wid.bitmap;
00560             cmd = btn->wid.cmd;
00561             ischeck = btn->ischeck;
00562         }
00563         else if(entry->kind == tbeSeparator)
00564         {
00565             m_wndToolBar->SetButtonInfo(index, ID_SEPARATOR,
00566                 TBBS_SEPARATOR, 0);
00567             continue;
00568         }
00569         else
00570         {
00571             continue;
00572             ASSERT(0);
00573         }
00574
00575         if(bmap != 0L)
00576         {
00577             CBitmap bsrc;
00578             VERIFY(bsrc.Attach(bmap));
00579             CBitmap *pbmOldSrc = dcSrc.SelectObject(&bsrc);
00580
00581             dcDest.BitBlt(tb.width * cnt, 0, tb.width, tb.height,
00582                     &dcSrc, 0, 0, SRCCOPY);
00583             bsrc.Detach();
00584
00585             dcSrc.SelectObject(pbmOldSrc);
00586         }
00587
00588         DWORD dwStyle = m_wndToolBar->GetButtonStyle(index);
00589         if(ischeck)
00590         {
00591             dwStyle &= ~TBBS_BUTTON;
00592             dwStyle |= TBBS_CHECKBOX;
00593         }
00594         m_wndToolBar->SetButtonInfo(index, UCMD_to_WINCMD(cmd),
00595             dwStyle, cnt);
00596
00597         if(dropdown)
00598             m_wndToolBar->AddDropDownButton(UCMD_to_WINCMD(cmd), -1, TRUE);
00599
00600         cnt++;
00601     }
00602
00603     dcDest.SelectObject(pbmOldDest);
00604     VERIFY(dcDest.DeleteDC());
00605     VERIFY(dcSrc.DeleteDC());
00606
00607     HBITMAP finalbmap = (HBITMAP)bdest.Detach();
00608     m_wndToolBar->SetBitmap(finalbmap);
00609
00610     if(m_wndToolBar->m_bitmap != 0L)
00611         ::DeleteObject(m_wndToolBar->m_bitmap);
00612     m_wndToolBar->m_bitmap = finalbmap;
00613
00614 }

Here is the call graph for this function:

const URuntimeClass * UToolbar::rtUToolbar ( void ) [static]

Definition at line 57 of file utoolbar.cpp.

int UToolbar::UDispatchMessage | ( | int | evt,
 |  | int | arg1,
 |  | void * | arg2,
 |  | UDispatchInfo & | dispatchInfo
 | ) | [virtual]

this is overided in order to broadcast to the listeners

Reimplemented from UWidget.

Definition at line 770 of file utoolbar.cpp.

References TbEntryDropDown::current, WININFO::entries, EV_CMD, TbEntry::kind, m_winInfo, RebuildBar(), WININFO::Search(), tbeDropDown, and UWidget::UDispatchMessage().

00771 {
00772     if(evt == EV_CMD)
00773     {
00774         WININFO *info = m_winInfo;
00775         if(info != 0L)
00776         {
00777             int index;
00778             std::vector<TbEntry *>::iterator f = info->Search(arg1, &index);
00779             if(f != info->entries.end())
00780             {
00781                 TbEntryDropDown *entry = (TbEntryDropDown *)*f;
00782                 if(entry->kind == tbeDropDown)
00783                 {
00784                     // toggle the current bitmap
00785                     if(entry->current != index)
00786                     {
00787                         entry->current = index;
00788 #ifdef WIN32
00789                         RebuildBar();
00790 #endif
00791                     }
00792                 }
00793             }
00794         }
00795     }
00796
00797     return UWidget::UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00798 }

Here is the call graph for this function:

Member Data Documentation

const UMSGMAP_ENTRY UToolbar::_messageEntries [static, private]

Initial value:

   {
    { EV_UPDATEUI, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UToolbar ::OnUpdateUI },
    { EV_CMD, epi_i, UMSG_RANGE,  0 ,  0xFFFF ,   (UPMSG)(int (UCmdTarget::*)(int cmd))& UToolbar::OnCommands  },
    { EV_DESTROY, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UToolbar ::OnDestroy },
    { EV_TB_INIT, epV_VP, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(UTB_INIT *info))& UToolbar ::OnTbInit },
    { EV_TB_END, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UToolbar ::OnTbEnd },
    { EV_TB_BUTTON, epV_VP, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(UTB_BUTTON *info))& UToolbar ::OnTbButton },
    { EV_TB_DROPDOWN, epV_VP, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(UTB_DROPDOWN *info))& UToolbar ::OnTbDropDown },
    { EV_TB_CHECKBTN, epV_VP, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(UTB_BUTTON *info))& UToolbar ::OnTbCheckBtn },
    { EV_TB_SEPARATOR, epV_V, UMSG_NOEXT, 0, 0,   (UPMSG)(void (UCmdTarget::*)(void))& UToolbar ::OnTbSeparator },
    { EV_SETTOOLTIP, epV_iVP, UMSG_RANGE,  0 ,  0xFFFF ,   (UPMSG)(void (UCmdTarget::*)(int cmd, UCmdUI *pCmdUI))& UToolbar::OnSetTooltip  },
{EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }   }

Reimplemented from UWidget.

Reimplemented in UCvsToolbar.

Definition at line 59 of file utoolbar.cpp.

const URuntimeClass UToolbar::classUToolbar [static, protected]

WININFO* UToolbar::m_winInfo [protected]

Definition at line 102 of file utoolbar.h.

Referenced by OnDestroy(), OnSetTooltip(), OnTbButton(), OnTbCheckBtn(), OnTbDropDown(), OnTbInit(), OnTbSeparator(), OnUpdateUI(), RebuildBar(), and UDispatchMessage().

CDynToolBar* UToolbar::m_wndToolBar [protected]

Definition at line 105 of file utoolbar.h.

Referenced by OnTbButton(), OnTbCheckBtn(), OnTbDropDown(), OnTbInit(), OnTbSeparator(), and RebuildBar().

const UMSGMAP UToolbar::messageMap = { UWidget ::GetThisMessageMap(), & UToolbar ::_messageEntries[0] } [static, protected]

Reimplemented from UWidget.

Reimplemented in UCvsToolbar.

Definition at line 59 of file utoolbar.cpp.

The documentation for this class was generated from the following files:
  • rf/utoolbar.h
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:57:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CToolBarCtrl Class Reference

CToolBarCtrl Class Reference

Inheritance diagram for CToolBarCtrl:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJToolBarCtrl.h
Generated on Sat Aug 7 22:57:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CToolBarData Struct Reference

CToolBarData Struct Reference

Collaboration diagram for CToolBarData:

[legend]
List of all members.

Public Member Functions

WORD * | items ()

Public Attributes

WORD | wVersion
WORD | wWidth
WORD | wHeight
WORD | wItemCount

Member Function Documentation

WORD* CToolBarData::items ( ) [inline]

Definition at line 1045 of file CJToolBar.cpp.

Referenced by CCJToolBar::LoadToolBar().

01046         { return (WORD*)(this+1); }

Member Data Documentation

WORD CToolBarData::wHeight

Definition at line 1041 of file CJToolBar.cpp.

Referenced by CCJToolBar::LoadToolBar().

WORD CToolBarData::wItemCount

Definition at line 1042 of file CJToolBar.cpp.

Referenced by CCJToolBar::LoadToolBar().

WORD CToolBarData::wVersion

Definition at line 1039 of file CJToolBar.cpp.

Referenced by CCJToolBar::LoadToolBar().

WORD CToolBarData::wWidth

Definition at line 1040 of file CJToolBar.cpp.

Referenced by CCJToolBar::LoadToolBar().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/CJLibrary/CJToolBar.cpp
Generated on Sat Aug 7 22:57:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TOOLBARINFO Struct Reference

TOOLBARINFO Struct Reference

#include <CJToolBar.h>

Collaboration diagram for TOOLBARINFO:

[legend]
List of all members.

Public Attributes

TBBUTTON | tbButton
LPCTSTR | btnText

Member Data Documentation

LPCTSTR TOOLBARINFO::btnText

Definition at line 95 of file CJToolBar.h.

Referenced by CCJToolBar::OnToolBarGetButtonInfo().

TBBUTTON TOOLBARINFO::tbButton

Definition at line 94 of file CJToolBar.h.

Referenced by CCJToolBar::OnToolBarGetButtonInfo().

The documentation for this struct was generated from the following file:
  • WinCvs/CJLib/Include/CJToolBar.h
Generated on Sat Aug 7 22:57:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPopup Class Reference

TPopup Class Reference

Inheritance diagram for TPopup:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:57:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoAppBehavior Class Reference

TPseudoAppBehavior Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoAppBehavior:

[legend]
Collaboration diagram for TPseudoAppBehavior:

[legend]
List of all members.

Public Member Functions

TPseudoAppBehavior ()
virtual | ~TPseudoAppBehavior ()
virtual bool | DoIdle (IdlePhase phase)
virtual void | DoMenuCommand (CommandNumber aCommandNumber)
virtual void | DoSetupMenus ()
virtual bool | DoToolboxEvent (TToolboxEvent *event)

Private Attributes

MA_DECLARE_CLASS

Constructor & Destructor Documentation

TPseudoAppBehavior::TPseudoAppBehavior ( )

Definition at line 453 of file UPseudoSupport.cpp.

00453                                        : TBehavior()
00454 {
00455     SetIdleFreq(0); // ASAP
00456 }

TPseudoAppBehavior::~TPseudoAppBehavior ( ) [virtual]

Definition at line 458 of file UPseudoSupport.cpp.

00459 {
00460 }

Member Function Documentation

bool TPseudoAppBehavior::DoIdle ( IdlePhase phase ) [virtual]

Definition at line 462 of file UPseudoSupport.cpp.

00463 {
00464     ::UEventGiveTime();
00465     return false;
00466 }

void TPseudoAppBehavior::DoMenuCommand ( CommandNumber aCommandNumber ) [virtual]

Definition at line 468 of file UPseudoSupport.cpp.

References EV_CMD, and UEventSendMessageExt().

00469 {
00470     if(UMacAppMenu::sMAMenuWidID != -1)
00471     {
00472         int handledFlag;
00473         int res = UEventSendMessageExt(UMacAppMenu::sMAMenuWidID, EV_CMD,
00474             aCommandNumber, 0L, &handledFlag);
00475         if(res == 0 && handledFlag)
00476             return;
00477     }
00478
00479     // regular MacApp handling
00480     Inherited::DoMenuCommand(aCommandNumber);
00481 }

Here is the call graph for this function:

void TPseudoAppBehavior::DoSetupMenus ( ) [virtual]

Definition at line 483 of file UPseudoSupport.cpp.

References UWidget::DoValidUI().

00484 {
00485     UWidget::DoValidUI(false);
00486     ::UEventGiveTime();
00487
00488     Inherited::DoSetupMenus();
00489 }

Here is the call graph for this function:

bool TPseudoAppBehavior::DoToolboxEvent ( TToolboxEvent * event ) [virtual]

Definition at line 491 of file UPseudoSupport.cpp.

References EV_UPDATEFOCUS, and UEventNotifyMessage().

00492 {
00493     if(event && event->GetIdentifier() == activateEvt)
00494     {
00495         bool activate = ((event->GetModifiers()) & activeFlag) != 0;
00496         TWindow * aWindow = TWindow::WMgrToWindow((WindowRef)(event->GetMessage()));
00497         if(aWindow)
00498         {
00499             UEventNotifyMessage(EV_UPDATEFOCUS, !activate, aWindow);
00500                 // so the pseudo widget update its current widget.
00501                 // it's important for the menu handling.
00502         }
00503     }
00504
00505     return Inherited::DoToolboxEvent(event);
00506 }

Here is the call graph for this function:

Member Data Documentation

TPseudoAppBehavior::MA_DECLARE_CLASS [private]

Definition at line 107 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoCustomView Class Reference

TPseudoCustomView Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoCustomView:

[legend]
Collaboration diagram for TPseudoCustomView:

[legend]
List of all members.

Public Member Functions

TPseudoCustomView ()
virtual | ~TPseudoCustomView ()
virtual void | Draw (const CViewRect &area)

Private Attributes

MA_DECLARE_CLASS

Constructor & Destructor Documentation

TPseudoCustomView::TPseudoCustomView ( )

Definition at line 324 of file UPseudoSupport.cpp.

00325 {
00326 }

TPseudoCustomView::~TPseudoCustomView ( ) [virtual]

Definition at line 328 of file UPseudoSupport.cpp.

00329 {
00330 }

Member Function Documentation

void TPseudoCustomView::Draw ( const CViewRect & area ) [virtual]

Definition at line 332 of file UPseudoSupport.cpp.

References EV_CUSTOM_DRAW, EV_FETCHCMD, TPseudoWinBehavior::GetWidID(), and UEventSendMessage().

00333 {
00334     TWindow *wind = GetWindow();
00335     if(wind != 0L)
00336     {
00337         TPseudoWinBehavior *pseudo = dynamic_cast_AC(TPseudoWinBehavior*,
00338             wind->GetBehaviorWithIdentifier(TPseudoWinBehavior::kPseudoWinBehavior));
00339         if(pseudo != 0L)
00340         {
00341             int cmdid = UEventSendMessage(pseudo->GetWidID(), EV_FETCHCMD, 0, this);
00342             if(cmdid != -1)
00343                 UEventSendMessage(pseudo->GetWidID(), EV_CUSTOM_DRAW, cmdid, this);
00344         }
00345     }
00346 }

Here is the call graph for this function:

Member Data Documentation

TPseudoCustomView::MA_DECLARE_CLASS [private]

Definition at line 172 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoDoubleNumberText Class Reference

TPseudoDoubleNumberText Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoDoubleNumberText:

[legend]
Collaboration diagram for TPseudoDoubleNumberText:

[legend]
List of all members.

Public Types

enum {
kDefaultPrecision = 5,
kStdDoubleNumberText = 'dNum'
}

Public Member Functions

TPseudoDoubleNumberText ()
virtual | ~TPseudoDoubleNumberText ()
virtual IDType | GetStandardSignature () const
virtual void | ReadFields (CStream_AC *aStream)
virtual void | WriteFields (CStream_AC *aStream) const
virtual long | GetValidationError ()
virtual double | GetValue ()
virtual void | SetValue (double newValue, bool redraw)

Protected Attributes

double | fMinimum
double | fMaximum
short | fPrecision

Private Attributes

MA_DECLARE_CLASS

Member Enumeration Documentation

anonymous enum

Enumeration values:
kDefaultPrecision
kStdDoubleNumberText
Definition at line 224 of file UPseudoSupport.h.
00225     {
00226         kDefaultPrecision = 5,
00227         kStdDoubleNumberText = 'dNum'
00228     };

Constructor & Destructor Documentation

TPseudoDoubleNumberText::TPseudoDoubleNumberText ( )

Definition at line 354 of file UPseudoSupport.cpp.

00354                                                  : fMaximum(DBL_MAX), fMinimum(DBL_MIN),
00355     fPrecision(kDefaultPrecision)
00356 {
00357 }

TPseudoDoubleNumberText::~TPseudoDoubleNumberText ( ) [virtual]

Definition at line 359 of file UPseudoSupport.cpp.

00360 {
00361 }

Member Function Documentation

IDType TPseudoDoubleNumberText::GetStandardSignature ( ) const [virtual]

Definition at line 363 of file UPseudoSupport.cpp.

References kStdDoubleNumberText.

00364 {
00365     return kStdDoubleNumberText;
00366 }

long TPseudoDoubleNumberText::GetValidationError ( ) [virtual]

Definition at line 428 of file UPseudoSupport.cpp.

References fMaximum, and fMinimum.

00429 {
00430     CStr255_AC theString = GetText();
00431
00432     if (!theString.IsEmpty())
00433     {
00434         double extValue;
00435         bool valid = sscanf(CChar255_AC(theString), "%lf", &extValue) == 1;
00436
00437         if (!valid)
00438             return kNonNumericCharacters;
00439         else if (extValue < fMinimum)
00440             return kValueTooSmall;
00441         else if (extValue > fMaximum)
00442             return kValueTooLarge;
00443     }
00444
00445     return kValidValue;
00446 }

double TPseudoDoubleNumberText::GetValue ( ) [virtual]

Definition at line 393 of file UPseudoSupport.cpp.

Referenced by UWidget::OnGetFloat().

00394 {
00395     double theValue = 0.0;
00396     CStr255_AC theString = GetText();
00397
00398     if (!theString.IsEmpty())
00399     {
00400         sscanf(CChar255_AC(theString), "%lf", &theValue);
00401     }
00402
00403     return theValue;
00404 }

void TPseudoDoubleNumberText::ReadFields ( CStream_AC * aStream ) [virtual]

Definition at line 368 of file UPseudoSupport.cpp.

References fMaximum, fMinimum, and fPrecision.

00369 {
00370     Inherited::ReadFields(aStream);
00371
00372     CStr255_AC theString;
00373     theString = aStream->ReadString(255);
00374     sscanf(CChar255_AC(theString), "%lf", &fMinimum);
00375     theString = aStream->ReadString(255);
00376     sscanf(CChar255_AC(theString), "%lf", &fMaximum);
00377     fPrecision = aStream->ReadInteger();
00378 }

void TPseudoDoubleNumberText::SetValue | ( | double | newValue,
 |  | bool | redraw
 | ) | [virtual]

Definition at line 416 of file UPseudoSupport.cpp.

References fMaximum, fMinimum, fPrecision, and NumberToString_US().

Referenced by UWidget::OnSetFloat().

00417 {
00418     newValue = fMinimum >= newValue ? fMinimum : newValue;
00419     newValue = newValue <= fMaximum ? newValue : fMaximum;
00420
00421     UStr aString;
00422     NumberToString_US(newValue, aString, fPrecision);
00423
00424     CStr255_AC tempString = aString;
00425     SetText(tempString, redraw);
00426 }

Here is the call graph for this function:

void TPseudoDoubleNumberText::WriteFields ( CStream_AC * aStream ) const [virtual]

Definition at line 380 of file UPseudoSupport.cpp.

References fMaximum, fMinimum, and fPrecision.

00381 {
00382     Inherited::WriteFields(aStream);
00383
00384     char tmp[255];
00385     sprintf(tmp, "%lf", fMinimum);
00386     aStream->WriteString(CStr255_AC(tmp));
00387     sprintf(tmp, "%lf", fMaximum);
00388     aStream->WriteString(CStr255_AC(tmp));
00389     aStream->WriteLong(fPrecision);
00390 }

Member Data Documentation

double TPseudoDoubleNumberText::fMaximum [protected]

Definition at line 243 of file UPseudoSupport.h.

Referenced by GetValidationError(), ReadFields(), SetValue(), and WriteFields().

double TPseudoDoubleNumberText::fMinimum [protected]

Definition at line 242 of file UPseudoSupport.h.

Referenced by GetValidationError(), ReadFields(), SetValue(), and WriteFields().

short TPseudoDoubleNumberText::fPrecision [protected]

Definition at line 244 of file UPseudoSupport.h.

Referenced by ReadFields(), SetValue(), and WriteFields().

TPseudoDoubleNumberText::MA_DECLARE_CLASS [private]

Definition at line 221 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoIconButton Class Reference

TPseudoIconButton Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoIconButton:

[legend]
Collaboration diagram for TPseudoIconButton:

[legend]
List of all members.

Private Member Functions

TPseudoIconButton ()
virtual | ~TPseudoIconButton ()
virtual void | ReadFields (CStream_AC *aStream)
virtual void | WriteFields (CStream_AC *aStream) const

Private Attributes

MA_DECLARE_CLASS

Constructor & Destructor Documentation

TPseudoIconButton::TPseudoIconButton ( ) [private]

Definition at line 513 of file UPseudoSupport.cpp.

00514 {
00515 }

TPseudoIconButton::~TPseudoIconButton ( ) [private, virtual]

Definition at line 517 of file UPseudoSupport.cpp.

00518 {
00519 }

Member Function Documentation

void TPseudoIconButton::ReadFields ( CStream_AC * aStream ) [private, virtual]

Reimplemented in TPseudoRotateIconButton.

Definition at line 521 of file UPseudoSupport.cpp.

00522 {
00523     Inherited::ReadFields(aStream);
00524
00525     *aStream >> fContentType;
00526     SetContentRsrcID(fContentType, fRsrcID);
00527 }

void TPseudoIconButton::WriteFields ( CStream_AC * aStream ) const [private, virtual]

Reimplemented in TPseudoRotateIconButton.

Definition at line 529 of file UPseudoSupport.cpp.

00530 {
00531     Inherited::WriteFields(aStream);
00532
00533     *aStream << fContentType;
00534 }

Member Data Documentation

TPseudoIconButton::MA_DECLARE_CLASS [private]

Reimplemented in TPseudoRotateIconButton.

Definition at line 53 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoIconCheckBox Class Reference

TPseudoIconCheckBox Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoIconCheckBox:

[legend]
Collaboration diagram for TPseudoIconCheckBox:

[legend]
List of all members.

Private Member Functions

TPseudoIconCheckBox ()
virtual | ~TPseudoIconCheckBox ()
virtual void | ReadFields (CStream_AC *aStream)
virtual void | WriteFields (CStream_AC *aStream) const

Private Attributes

MA_DECLARE_CLASS

Constructor & Destructor Documentation

TPseudoIconCheckBox::TPseudoIconCheckBox ( ) [private]

Definition at line 704 of file UPseudoSupport.cpp.

00705 {
00706 }

TPseudoIconCheckBox::~TPseudoIconCheckBox ( ) [private, virtual]

Definition at line 708 of file UPseudoSupport.cpp.

00709 {
00710 }

Member Function Documentation

void TPseudoIconCheckBox::ReadFields ( CStream_AC * aStream ) [private, virtual]

Definition at line 712 of file UPseudoSupport.cpp.

00713 {
00714     Inherited::ReadFields(aStream);
00715
00716     *aStream >> fContentType;
00717     SetContentRsrcID(fContentType, fRsrcID);
00718 }

void TPseudoIconCheckBox::WriteFields ( CStream_AC * aStream ) const [private, virtual]

Definition at line 720 of file UPseudoSupport.cpp.

00721 {
00722     Inherited::WriteFields(aStream);
00723
00724     *aStream << fContentType;
00725 }

Member Data Documentation

TPseudoIconCheckBox::MA_DECLARE_CLASS [private]

Definition at line 81 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoIconPopup Class Reference

TPseudoIconPopup Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoIconPopup:

[legend]
Collaboration diagram for TPseudoIconPopup:

[legend]
List of all members.

Private Member Functions

TPseudoIconPopup ()
virtual | ~TPseudoIconPopup ()
virtual void | ReadFields (CStream_AC *aStream)
virtual void | WriteFields (CStream_AC *aStream) const

Private Attributes

MA_DECLARE_CLASS

Constructor & Destructor Documentation

TPseudoIconPopup::TPseudoIconPopup ( ) [private]

Definition at line 577 of file UPseudoSupport.cpp.

00578 {
00579 }

TPseudoIconPopup::~TPseudoIconPopup ( ) [private, virtual]

Definition at line 581 of file UPseudoSupport.cpp.

00582 {
00583 }

Member Function Documentation

void TPseudoIconPopup::ReadFields ( CStream_AC * aStream ) [private, virtual]

Definition at line 585 of file UPseudoSupport.cpp.

00586 {
00587     Inherited::ReadFields(aStream);
00588
00589     *aStream >> fContentType;
00590     SetContentRsrcID(fContentType, fRsrcID);
00591 }

void TPseudoIconPopup::WriteFields ( CStream_AC * aStream ) const [private, virtual]

Definition at line 593 of file UPseudoSupport.cpp.

00594 {
00595     Inherited::WriteFields(aStream);
00596
00597     *aStream << fContentType;
00598 }

Member Data Documentation

TPseudoIconPopup::MA_DECLARE_CLASS [private]

Definition at line 42 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoRotateIconButton Class Reference

TPseudoRotateIconButton Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoRotateIconButton:

[legend]
Collaboration diagram for TPseudoRotateIconButton:

[legend]
List of all members.

Protected Attributes

std::vector< short > | fIconSuite
int fCurrentIcon

Private Member Functions

TPseudoRotateIconButton ()
virtual | ~TPseudoRotateIconButton ()
virtual void | ReadFields (CStream_AC *aStream)
virtual void | WriteFields (CStream_AC *aStream) const
void | DoRotate (int icon)

Private Attributes

MA_DECLARE_CLASS

Constructor & Destructor Documentation

TPseudoRotateIconButton::TPseudoRotateIconButton ( ) [private]

Definition at line 641 of file UPseudoSupport.cpp.

00641                                                  : fCurrentIcon(0)
00642 {
00643 }

TPseudoRotateIconButton::~TPseudoRotateIconButton ( ) [private, virtual]

Definition at line 645 of file UPseudoSupport.cpp.

00646 {
00647 }

Member Function Documentation

void TPseudoRotateIconButton::DoRotate ( int icon ) [private]

Definition at line 689 of file UPseudoSupport.cpp.

References fCurrentIcon, and fIconSuite.

Referenced by UWidget::OnSetState().

00690 {
00691     if(fCurrentIcon != icon && icon >= 0 && icon < fIconSuite.size())
00692     {
00693         fCurrentIcon = icon;
00694         SetContentRsrcID(fContentType, fIconSuite[fCurrentIcon]);
00695         ForceRedraw();
00696     }
00697 }

void TPseudoRotateIconButton::ReadFields ( CStream_AC * aStream ) [private, virtual]

Reimplemented from TPseudoIconButton.

Definition at line 649 of file UPseudoSupport.cpp.

References fIconSuite.

00650 {
00651     Inherited::ReadFields(aStream);
00652
00653     CChar255_AC str(aStream->ReadString(255));
00654     const char *ptr = str;
00655     while(ptr != 0L)
00656     {
00657         int v;
00658         const char *tmp = strchr(ptr, ',');
00659         if(tmp != 0L)
00660         {
00661             CChar255_AC stmp;
00662             size_t offset = tmp - ptr;
00663             stmp.CopyFrom(ptr, offset);
00664             ptr += offset + 1;
00665             if(sscanf(stmp, "%d", &v) == 1)
00666                 fIconSuite.push_back(v);
00667         }
00668         else
00669         {
00670             if(sscanf(ptr, "%d", &v) == 1)
00671                 fIconSuite.push_back(v);
00672             ptr = 0;
00673         }
00674     }
00675
00676     if(fIconSuite.size() != 0)
00677         SetContentRsrcID(fContentType, fIconSuite[0]);
00678 }

void TPseudoRotateIconButton::WriteFields ( CStream_AC * aStream ) const [private, virtual]

Reimplemented from TPseudoIconButton.

Definition at line 680 of file UPseudoSupport.cpp.

References UASSERT.

00681 {
00682     Inherited::WriteFields(aStream);
00683
00684     // do we really need to write ?
00685     *aStream << "";
00686     UASSERT(0);
00687 }

Member Data Documentation

int TPseudoRotateIconButton::fCurrentIcon [protected]

Definition at line 76 of file UPseudoSupport.h.

Referenced by DoRotate().

std::vector<short> TPseudoRotateIconButton::fIconSuite [protected]

Definition at line 75 of file UPseudoSupport.h.

Referenced by DoRotate(), and ReadFields().

TPseudoRotateIconButton::MA_DECLARE_CLASS [private]

Reimplemented from TPseudoIconButton.

Definition at line 64 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoScrollBar Class Reference

TPseudoScrollBar Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoScrollBar:

[legend]
Collaboration diagram for TPseudoScrollBar:

[legend]
List of all members.

Private Member Functions

TPseudoScrollBar ()
virtual | ~TPseudoScrollBar ()
virtual void | TrackScrollBar (short partCode)

Private Attributes

MA_DECLARE_CLASS
int fPageStep
int fButtonStep

Constructor & Destructor Documentation

TPseudoScrollBar::TPseudoScrollBar ( ) [private]

Definition at line 605 of file UPseudoSupport.cpp.

00605                                    : fPageStep(1), fButtonStep(1)
00606 {
00607 }

TPseudoScrollBar::~TPseudoScrollBar ( ) [private, virtual]

Definition at line 609 of file UPseudoSupport.cpp.

00610 {
00611 }

Member Function Documentation

void TPseudoScrollBar::TrackScrollBar ( short partCode ) [private, virtual]

Definition at line 613 of file UPseudoSupport.cpp.

References fButtonStep, and fPageStep.

00614 {
00615     switch (partCode)
00616     {
00617         case kControlPageUpPart:
00618             if (GetValue() > GetMinimum())
00619                 DeltaValue(-fPageStep);
00620             break;
00621         case kControlUpButtonPart:
00622             if (GetValue() > GetMinimum())
00623                 DeltaValue(-fButtonStep);
00624             break;
00625         case kControlPageDownPart:
00626             if (GetValue() < GetMaximum())
00627                 DeltaValue(fPageStep);
00628             break;
00629         case kControlDownButtonPart:
00630             if (GetValue() < GetMaximum())
00631                 DeltaValue(fButtonStep);
00632             break;
00633     }
00634 }

Member Data Documentation

int TPseudoScrollBar::fButtonStep [private]

Definition at line 37 of file UPseudoSupport.h.

Referenced by TrackScrollBar().

int TPseudoScrollBar::fPageStep [private]

Definition at line 36 of file UPseudoSupport.h.

Referenced by TrackScrollBar().

TPseudoScrollBar::MA_DECLARE_CLASS [private]

Definition at line 29 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoTextListView Class Reference

TPseudoTextListView Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoTextListView:

[legend]
Collaboration diagram for TPseudoTextListView:

[legend]
List of all members.

Public Types

enum {
kTextStringListViewSignature = 'TxLv',
kSelectionChanged = 'TxSC',
kMultiClickSelection = 'TxMu'
}

Public Member Functions

TPseudoTextListView ()
virtual | ~TPseudoTextListView ()
virtual IDType | GetStandardSignature (void) const
virtual CStr255_AC | GetItemText (GridCoordinate) const
virtual void | InsStringBefore (short anItem, const char *string)
virtual void | InsStringFirst (const char *string)
virtual void | InsStringLast (const char *string)
virtual void | DelItemAt (GridCoordinate anItem, GridCoordinate numOfItems)
virtual void | RemoveAll (void)
virtual void | DoKeyEvent (TToolboxEvent *event)
virtual void | DoMouseCommand (CViewPoint &theMouse, TToolboxEvent *event, CPoint_AC)
virtual void | SetSelection (const TGridViewDesignator *cellsToSelect, bool extendSelection, bool highlight, bool select)

Protected Member Functions

virtual bool | DoMouseCommand_SelectCells (GridCell whichCell, class TToolboxEvent *event)

Protected Attributes

std::vector< CStr255_AC > | fStringContainer

Private Attributes

MA_DECLARE_CLASS

Member Enumeration Documentation

anonymous enum

Enumeration values:
kTextStringListViewSignature
kSelectionChanged
kMultiClickSelection
Definition at line 186 of file UPseudoSupport.h.
00187     {
00188         kTextStringListViewSignature = 'TxLv',
00189
00190         kSelectionChanged = 'TxSC',
00191         kMultiClickSelection = 'TxMu'
00192     };

Constructor & Destructor Documentation

TPseudoTextListView::TPseudoTextListView ( )

Definition at line 127 of file UPseudoSupport.cpp.

00128 {
00129 }

TPseudoTextListView::~TPseudoTextListView ( ) [virtual]

Definition at line 133 of file UPseudoSupport.cpp.

00134 {
00135 }

Member Function Documentation

void TPseudoTextListView::DelItemAt | ( | GridCoordinate | anItem,
 |  | GridCoordinate | numOfItems
 | ) | [virtual]

Definition at line 186 of file UPseudoSupport.cpp.

References fStringContainer.

Referenced by UWidget::OnListDelRow().

00187 {
00188     this->fStringContainer.erase(
00189             this->fStringContainer.begin() + (anItem - 1),
00190             this->fStringContainer.begin() + (anItem - 1 + numOfItems));
00191
00192     this->Inherited::DelItemAt(anItem, numOfItems);
00193 }

void TPseudoTextListView::DoKeyEvent ( TToolboxEvent * event ) [virtual]

Definition at line 277 of file UPseudoSupport.cpp.

References DoMouseCommand_SelectCells().

00278 {
00279     Boolean handledCharacter = false;
00280
00281     if (this->IsEnabled() && this->Focus())     // if view is not enabled then we don't take ANY keystrokes
00282     {
00283         GridCell selected;
00284         unsigned char ch = event->GetText()[1];
00285
00286         if (ch == chUp)
00287         {
00288             selected = this->FirstSelectedCell();
00289             selected.v -= 1;
00290
00291             this->DoMouseCommand_SelectCells(selected, event);
00292
00293             handledCharacter = true;
00294         }
00295         else if (ch == chDown)
00296         {
00297             selected = this->LastSelectedCell();
00298             selected.v += 1;
00299
00300             this->DoMouseCommand_SelectCells(selected, event);
00301
00302             handledCharacter = true;
00303         }
00304     }
00305
00306     if (!handledCharacter)
00307         Inherited::DoKeyEvent(event);
00308 }

Here is the call graph for this function:

void TPseudoTextListView::DoMouseCommand | ( | CViewPoint & | theMouse,
 |  | TToolboxEvent * | event,
 |  | CPoint_AC |
 | ) | [virtual]

Definition at line 261 of file UPseudoSupport.cpp.

References DoMouseCommand_SelectCells(), and kMultiClickSelection.

00262 {
00263     GridCell aCell;
00264
00265     if (badChoice != this->IdentifyPoint(theMouse, aCell))
00266     {
00267         this->DoMouseCommand_SelectCells(aCell, event);
00268             // First be sure to select/deselect the cell they clicked on.
00269
00270         if (event->GetClickCount() > 1)
00271         {
00272             this->HandleEvent(kMultiClickSelection, this, event);
00273         }
00274     }
00275 }

Here is the call graph for this function:

bool TPseudoTextListView::DoMouseCommand_SelectCells | ( | GridCell | whichCell,
 |  | class TToolboxEvent * | event
 | ) | [protected, virtual]

Definition at line 200 of file UPseudoSupport.cpp.

References MA_CHECK.

Referenced by DoKeyEvent(), and DoMouseCommand().

00201 {
00202     MA_CHECK(nil != event);
00203
00204     bool selectionChanged = false;
00205         // Will be true if the selection changed.
00206
00207     if (this->CanSelectCell(whichCell))
00208     {
00209         bool shifted = event->IsShiftKeyPressed();
00210         bool commandKey = event->IsCommandKeyPressed();
00211
00212         if (commandKey)
00213         {
00214             this->SelectCell(whichCell, !this->fSingleSelection,
00215                     kHighlight, !this->IsCellSelected(whichCell));
00216
00217             selectionChanged = true;
00218         }
00219         else if (shifted && !this->fSingleSelection)
00220         {
00221             GridCell runner = whichCell;
00222
00223             if (this->IsCellSelected(whichCell))
00224             {
00225                 for ( ; runner.v <= this->fNumOfRows; runner.v++)
00226                 {
00227                     if (!this->IsCellSelected(runner))
00228                     {
00229                         break;
00230                     }
00231
00232                     this->SelectCell(runner, kExtend, kHighlight, kDeSelect);
00233                 }
00234             }
00235             else
00236             {
00237                 for ( ; runner.v > 0; runner.v--)
00238                 {
00239                     if (this->IsCellSelected(runner))
00240                     {
00241                         break;
00242                     }
00243
00244                     this->SelectCell(runner, kExtend, kHighlight, kSelect);
00245                 }
00246             }
00247
00248             selectionChanged = true;
00249         }
00250         else if (!this->IsCellSelected(whichCell))
00251         {
00252             this->SelectCell(whichCell, kDontExtend, kHighlight, kSelect);
00253
00254             selectionChanged = true;
00255         }
00256     }
00257
00258     return selectionChanged;
00259 }

CStr255_AC TPseudoTextListView::GetItemText ( GridCoordinate ) const [virtual]

Definition at line 143 of file UPseudoSupport.cpp.

References fStringContainer, and MA_CHECK.

Referenced by TPseudoWinBehavior::DoEvent(), and UWidget::OnListGetInfo().

00144 {
00145     MA_CHECK(this->fNumOfRows == this->fStringContainer.size());
00146     MA_CHECK(1 <= anItem && this->fStringContainer.size() >= anItem);
00147
00148     CStr255_AC aString = this->fStringContainer[anItem - 1];
00149     return aString;
00150 }

IDType TPseudoTextListView::GetStandardSignature ( void ) const [virtual]

Definition at line 138 of file UPseudoSupport.cpp.

References kTextStringListViewSignature.

00139 {
00140     return TPseudoTextListView::kTextStringListViewSignature;
00141 }

void TPseudoTextListView::InsStringBefore | ( | short | anItem,
 |  | const char * | string
 | ) | [virtual]

Definition at line 152 of file UPseudoSupport.cpp.

References fStringContainer, and MA_CHECK.

Referenced by InsStringFirst(), and InsStringLast().

00153 {
00154     MA_CHECK(1 <= anItem && this->fStringContainer.size() >= anItem - 1);
00155
00156     std::vector<CStr255_AC>::iterator iter = this->fStringContainer.end();
00157
00158     try
00159     {
00160         iter = this->fStringContainer.insert(
00161                     this->fStringContainer.begin() + (anItem - 1), string);
00162     }
00163     catch(CException_AC& theException)
00164     {
00165         if (iter != this->fStringContainer.end())
00166         {
00167             this->fStringContainer.erase(iter);
00168                 // Put it back like it was.  This will maintain internal consistency.
00169         }
00170         throw;
00171     }
00172
00173     this->InsItemBefore(anItem, 1);
00174 }

void TPseudoTextListView::InsStringFirst ( const char * string ) [virtual]

Definition at line 176 of file UPseudoSupport.cpp.

References InsStringBefore().

00177 {
00178     this->InsStringBefore(1, string);
00179 }

Here is the call graph for this function:

void TPseudoTextListView::InsStringLast ( const char * string ) [virtual]

Definition at line 181 of file UPseudoSupport.cpp.

References InsStringBefore().

Referenced by UWidget::OnListInsert().

00182 {
00183     this->InsStringBefore(this->fNumOfRows + 1, string);
00184 }

Here is the call graph for this function:

void TPseudoTextListView::RemoveAll ( void ) [virtual]

Definition at line 195 of file UPseudoSupport.cpp.

Referenced by UWidget::OnListResetAll().

00196 {
00197     this->DelItemFirst(this->fNumOfRows);
00198 }

void TPseudoTextListView::SetSelection | ( | const TGridViewDesignator * | cellsToSelect,
 |  | bool | extendSelection,
 |  | bool | highlight,
 |  | bool | select
 | ) | [virtual]

Definition at line 310 of file UPseudoSupport.cpp.

References kSelectionChanged.

00312 {
00313     this->Inherited::SetSelection(cellsToSelect, extendSelection, highlight, select);
00314
00315     this->Changed(kSelectionChanged, this);
00316     this->HandleEvent(kSelectionChanged, this, nil);
00317 }

Member Data Documentation

std::vector<CStr255_AC> TPseudoTextListView::fStringContainer [protected]

Definition at line 216 of file UPseudoSupport.h.

Referenced by DelItemAt(), GetItemText(), and InsStringBefore().

TPseudoTextListView::MA_DECLARE_CLASS [private]

Definition at line 183 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoWinAdorner Class Reference

TPseudoWinAdorner Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoWinAdorner:

[legend]
Collaboration diagram for TPseudoWinAdorner:

[legend]
List of all members.

Public Types

enum | { kPseudoWinAdorner = 'pswa' }

Public Member Functions

TPseudoWinAdorner ()
virtual | ~TPseudoWinAdorner ()
virtual void | ViewChangedFrame (TView *itsView, const CViewRect &oldFrame, const CViewRect &newFrame, bool invalidate)

Protected Member Functions

void | SetPseudoWidget (int widid)

Protected Attributes

int fWidID

Private Attributes

MA_DECLARE_CLASS

Member Enumeration Documentation

anonymous enum

Enumeration values:
kPseudoWinAdorner
Definition at line 149 of file UPseudoSupport.h.
00150     {
00151         kPseudoWinAdorner = 'pswa'
00152     };

Constructor & Destructor Documentation

TPseudoWinAdorner::TPseudoWinAdorner ( )

Definition at line 732 of file UPseudoSupport.cpp.

00732                                      : TAdorner(kPseudoWinAdorner), fWidID(-1)
00733 {
00734 }

TPseudoWinAdorner::~TPseudoWinAdorner ( ) [virtual]

Definition at line 736 of file UPseudoSupport.cpp.

References EV_DESTROY, fWidID, and UEventSendMessage().

00737 {
00738     if(fWidID != -1)
00739         UEventSendMessage(fWidID, EV_DESTROY, 0, 0L);
00740 }

Here is the call graph for this function:

Member Function Documentation

void TPseudoWinAdorner::SetPseudoWidget ( int widid ) [inline, protected]

Definition at line 163 of file UPseudoSupport.h.

References fWidID.

Referenced by UWidget::OnInitWidget().

00163 { fWidID = widid; }

void TPseudoWinAdorner::ViewChangedFrame | ( | TView * | itsView,
 |  | const CViewRect & | oldFrame,
 |  | const CViewRect & | newFrame,
 |  | bool | invalidate
 | ) | [virtual]

Definition at line 742 of file UPseudoSupport.cpp.

References URECT::bottom, EV_FETCHCMD, EV_RESIZE, fWidID, URECT::left, URECT::right, URECT::top, and UEventSendMessage().

00746 {
00747     TWindow *wind = itsView->GetWindow();
00748     if(wind != 0L && fWidID != -1)
00749     {
00750         int cmdid = UEventSendMessage(fWidID, EV_FETCHCMD, 0, itsView);
00751         if(cmdid != -1)
00752         {
00753             URECT r;
00754             r.left = newFrame.left;
00755             r.right = newFrame.right;
00756             r.top = newFrame.top;
00757             r.bottom = newFrame.bottom;
00758
00759             UEventSendMessage(fWidID, EV_RESIZE, cmdid, &r);
00760         }
00761     }
00762 }

Here is the call graph for this function:

Member Data Documentation

int TPseudoWinAdorner::fWidID [protected]

Definition at line 165 of file UPseudoSupport.h.

Referenced by SetPseudoWidget(), ViewChangedFrame(), and ~TPseudoWinAdorner().

TPseudoWinAdorner::MA_DECLARE_CLASS [private]

Definition at line 146 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TPseudoWinBehavior Class Reference

TPseudoWinBehavior Class Reference

#include <UPseudoSupport.h>

Inheritance diagram for TPseudoWinBehavior:

[legend]
Collaboration diagram for TPseudoWinBehavior:

[legend]
List of all members.

Public Types

enum | { kPseudoWinBehavior = 'pswb' }

Public Member Functions

TPseudoWinBehavior ()
virtual | ~TPseudoWinBehavior ()
virtual void | DoEvent (EventNumber eventNumber, TEventHandler *source, TEvent *event)
int | GetWidID () const

Protected Member Functions

void | SetPseudoWidget (int widid)

Protected Attributes

int fWidID

Private Attributes

MA_DECLARE_CLASS

Member Enumeration Documentation

anonymous enum

Enumeration values:
kPseudoWinBehavior
Definition at line 125 of file UPseudoSupport.h.
00126     {
00127         kPseudoWinBehavior = 'pswb'
00128     };

Constructor & Destructor Documentation

TPseudoWinBehavior::TPseudoWinBehavior ( )

Definition at line 35 of file UPseudoSupport.cpp.

00035                                        : TBehavior(kPseudoWinBehavior), fWidID(-1)
00036 {
00037 }

TPseudoWinBehavior::~TPseudoWinBehavior ( ) [virtual]

Definition at line 39 of file UPseudoSupport.cpp.

00040 {
00041 }

Member Function Documentation

void TPseudoWinBehavior::DoEvent | ( | EventNumber | eventNumber,
 |  | TEventHandler * | source,
 |  | TEvent * | event
 | ) | [virtual]

Definition at line 43 of file UPseudoSupport.cpp.

References EV_CMD, EV_COMBO_SEL, EV_EDITCHANGE, EV_FETCHCMD, EV_LIST_DBLCLICK, EV_LIST_SELECTING, EV_SCROLLCHANGE, EV_UPDATEFOCUS, fWidID, TPseudoTextListView::GetItemText(), UEventNotifyMessage(), UEventSendMessage(), and UMAKEINT.

00044 {
00045     // find out the command who fired the event (if any)
00046     int cmdid = -1;
00047
00048     // the typing event is originated by a sub-view of an TEditText field
00049     TEventHandler* ourSource = source;
00050     if(eventNumber == cTyping && MA_MEMBER(ourSource, TDialogTEView))
00051     {
00052         ourSource = ((TDialogTEView *)ourSource)->fEditText;
00053     }
00054
00055     if(fWidID != -1)
00056         cmdid = UEventSendMessage(fWidID, EV_FETCHCMD, 0, ourSource);
00057
00058     if(cmdid != -1) switch(eventNumber)
00059     {
00060         case mBecameTarget:
00061         case mResignedTarget:
00062             UEventNotifyMessage(EV_UPDATEFOCUS, eventNumber == mResignedTarget, ourSource);
00063             break;
00064         case mButtonHit:
00065         case mRadioHit:
00066         case mCheckBoxHit:
00067             UEventSendMessage(fWidID, EV_CMD, cmdid, 0L);
00068             break;
00069         case mHScrollBarHit:
00070         case mVScrollBarHit:
00071             if(MA_MEMBER(ourSource, TSlider) || MA_MEMBER(ourSource, TScrollBar))
00072             {
00073                 TCtlMgr *slider = (TCtlMgr *)ourSource;
00074                 UEventSendMessage(fWidID, EV_SCROLLCHANGE, cmdid, (void *)slider->GetValue());
00075             }
00076             break;
00077         case mPopupHit:
00078             if(MA_MEMBER(ourSource, TPopup))
00079             {
00080                 TPopup *popup = (TPopup *)ourSource;
00081                 short cur = popup->GetCurrentItem();
00082                 CStr255_AC pstr = popup->GetItemText(cur);
00083                 UPStr content(pstr);
00084                 UEventSendMessage(fWidID, EV_COMBO_SEL, UMAKEINT(cmdid, cur - 1),
00085                     (void *)(const char *)content);
00086             }
00087             break;
00088         case mControlHit:
00089             if(MA_MEMBER(ourSource, TSlider))
00090             {
00091                 TSlider *slider = (TSlider *)ourSource;
00092                 UEventSendMessage(fWidID, EV_SCROLLCHANGE, cmdid, (void *)slider->GetValue());
00093             }
00094             break;
00095         case cTyping:
00096             if(MA_MEMBER(ourSource, TEditText))
00097             {
00098                 UEventSendMessage(fWidID, EV_EDITCHANGE, cmdid, 0L);
00099             }
00100             break;
00101         case TPseudoTextListView::kSelectionChanged:
00102         case TPseudoTextListView::kMultiClickSelection:
00103             if(MA_MEMBER(ourSource, TPseudoTextListView))
00104             {
00105                 TPseudoTextListView *txt = (TPseudoTextListView *)ourSource;
00106                 short entry = txt->FirstSelectedItem();
00107                 CChar255_AC name;
00108                 if(entry > 0)
00109                     name = txt->GetItemText(entry);
00110
00111                 UEventSendMessage(fWidID,
00112                     eventNumber == TPseudoTextListView::kSelectionChanged ?
00113                     EV_LIST_SELECTING : EV_LIST_DBLCLICK, UMAKEINT(cmdid, entry - 1),
00114                     (void *)(const char *)name);
00115             }
00116             break;
00117     }
00118
00119     Inherited::DoEvent(eventNumber, source, event);
00120 }

Here is the call graph for this function:

int TPseudoWinBehavior::GetWidID ( ) const [inline]

Definition at line 135 of file UPseudoSupport.h.

References fWidID.

Referenced by TPseudoCustomView::Draw().

00135 { return fWidID; }

void TPseudoWinBehavior::SetPseudoWidget ( int widid ) [inline, protected]

Definition at line 137 of file UPseudoSupport.h.

References fWidID.

Referenced by UWidget::OnInitWidget().

00137 { fWidID = widid; }

Member Data Documentation

int TPseudoWinBehavior::fWidID [protected]

Definition at line 139 of file UPseudoSupport.h.

Referenced by DoEvent(), GetWidID(), and SetPseudoWidget().

TPseudoWinBehavior::MA_DECLARE_CLASS [private]

Definition at line 122 of file UPseudoSupport.h.

The documentation for this class was generated from the following files:
  • rf/support/macapp/UPseudoSupport.h
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TraversalReport Class Reference

TraversalReport Class Reference

Traverse report base class. More...

#include <FileTraversal.h>

Inheritance diagram for TraversalReport:

[legend]
Collaboration diagram for TraversalReport:

[legend]
List of all members.

Public Member Functions

virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnAnyDevice (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnFile (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnAlias (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Static Public Member Functions

bool & GetRefRunning ()

Static Private Attributes

bool | m_running = false

Detailed Description

Traverse report base class.

Definition at line 91 of file FileTraversal.h.

Member Function Documentation

kTraversal TraversalReport::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented in ImportReport, CFillPyEntries, CFillTclEntries, LSReport, TViewFill, TBrowserFillDummy, TBrowserFill, TViewFill, TBrowserFillDummy, and TBrowserFill.

Definition at line 299 of file FileTraversal.cpp.

References kContinueTraversal, and kTraversal.

Referenced by FileTraverse().

00300 {
00301     return kContinueTraversal;
00302 }

kTraversal TraversalReport::ExitDirectory ( const char * fullpath ) [virtual]

Reimplemented in ImportReport, CFillPyEntries, CFillTclEntries, LSReport, TViewFill, TBrowserFillDummy, TBrowserFill, TViewFill, TBrowserFillDummy, and TBrowserFill.

Definition at line 304 of file FileTraversal.cpp.

References kContinueTraversal, and kTraversal.

Referenced by FileTraverse().

00305 {
00306     return kContinueTraversal;
00307 }

bool & TraversalReport::GetRefRunning ( ) [static]

Get the reference to the traverse flag

Returns:
The reference to the traverse flag
Definition at line 294 of file FileTraversal.cpp.

References m_running.

00295 {
00296     return TraversalReport::m_running;
00297 }

kTraversal TraversalReport::OnAlias | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented in ImportReport, CFillPyEntries, CFillTclEntries, TViewFill, and TViewFill.

Definition at line 343 of file FileTraversal.cpp.

References kTraversal, and OnAnyDevice().

Referenced by FileTraverse().

00347 {
00348     return OnAnyDevice(fullpath, fullname, name, dir, macspec);
00349 }

Here is the call graph for this function:

kTraversal TraversalReport::OnAnyDevice | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented in LSReport.

Definition at line 319 of file FileTraversal.cpp.

References kContinueTraversal, and kTraversal.

Referenced by OnAlias(), OnDirectory(), and OnFile().

00323 {
00324     return kContinueTraversal;
00325 }

kTraversal TraversalReport::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented in ImportReport, CFillPyEntries, CFillTclEntries, TViewFill, TBrowserFillDummy, TBrowserFill, TViewFill, TBrowserFillDummy, and TBrowserFill.

Definition at line 327 of file FileTraversal.cpp.

References kTraversal, and OnAnyDevice().

Referenced by FileTraverse().

00331 {
00332     return OnAnyDevice(fullpath, fullname, name, dir, macspec);
00333 }

Here is the call graph for this function:

kTraversal TraversalReport::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [virtual]

Reimplemented in ImportReport, MacroTraversal, CFindSettings, CFillPyEntries, CFillTclEntries, LSReport, TViewFill, TBrowserFillDummy, TBrowserFill, TViewFill, TBrowserFillDummy, and TBrowserFill.

Definition at line 309 of file FileTraversal.cpp.

References kTraversal, and kTraversalError.

Referenced by FileTraverse().

00310 {
00311     return kTraversalError;
00312 }

kTraversal TraversalReport::OnFile | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented in ImportReport, MacroTraversal, CFindSettings, CFillPyEntries, CFillTclEntries, TViewFill, and TViewFill.

Definition at line 335 of file FileTraversal.cpp.

References kTraversal, and OnAnyDevice().

Referenced by FileTraverse().

00339 {
00340     return OnAnyDevice(fullpath, fullname, name, dir, macspec);
00341 }

Here is the call graph for this function:

kTraversal TraversalReport::OnIdle ( const char * fullpath ) [virtual]

Reimplemented in ImportReport, CFillPyEntries, CFillTclEntries, LSReport, TViewFill, TBrowserFillDummy, TBrowserFill, TViewFill, TBrowserFillDummy, and TBrowserFill.

Definition at line 314 of file FileTraversal.cpp.

References kContinueTraversal, and kTraversal.

Referenced by FileTraverse().

00315 {
00316     return kContinueTraversal;
00317 }

Member Data Documentation

bool TraversalReport::m_running = false [static, private]

Flag indicating that traversal is ongoing Definition at line 64 of file FileTraversal.cpp.

Referenced by GetRefRunning().

The documentation for this class was generated from the following files:
  • common/FileTraversal.h
  • common/FileTraversal.cpp
Generated on Sat Aug 7 22:57:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UTREE_INFO Struct Reference

UTREE_INFO Struct Reference

#include <umain.h>

Collaboration diagram for UTREE_INFO:

[legend]
List of all members.

Public Attributes

UTREEITEM item
UTREEITEM parent
UTREEITEM next
UTREEITEM child
void * | data
char * | title
void * | icon
int expanded

Member Data Documentation

UTREEITEM UTREE_INFO::child

Definition at line 1003 of file umain.h.

Referenced by UCvsFolders::DeleteAllItems(), UCvsFolders::GetItemByLocation(), UWidget::OnTreeGetInfo(), UCvsFolders::StepToLocation(), and UCvsFolders::StoreExpanded().

void* UTREE_INFO::data

Definition at line 1004 of file umain.h.

Referenced by UCvsFolders::DeleteAllItems(), TBrowserFill::ExitDirectory(), TBrowserFillDummy::ExitDirectory(), UCvsFolders::GetItemByLocation(), UCvsFolders::OnCmdMacrosSel(), UCvsFolders::OnTreeExpanding(), UWidget::OnTreeGetInfo(), UCvsFolders::OnTreeSelecting(), UWidget::OnTreeSetData(), and UCvsFolders::StepToLocation().

int UTREE_INFO::expanded

Definition at line 1007 of file umain.h.

Referenced by UWidget::OnTreeGetInfo(), and UCvsFolders::StoreExpanded().

void* UTREE_INFO::icon

Definition at line 1006 of file umain.h.

Referenced by TBrowserFill::ExitDirectory(), TBrowserFill::OnDirectory(), UWidget::OnTreeGetInfo(), and UWidget::OnTreeSetIcon().

UTREEITEM UTREE_INFO::item

Definition at line 1000 of file umain.h.

Referenced by UCvsFolders::DeleteAllItems(), TBrowserFill::ExitDirectory(), TBrowserFillDummy::ExitDirectory(), UCvsFolders::GetItemByLocation(), UCvsFolders::OnCmdMacrosSel(), TBrowserFill::OnDirectory(), UCvsFolders::OnTreeExpanding(), UWidget::OnTreeGetInfo(), UCvsFolders::OnTreeSelecting(), UWidget::OnTreeSetData(), UWidget::OnTreeSetIcon(), UCvsFolders::RetrievePath(), UCvsFolders::StepToLocation(), and UCvsFolders::StoreExpanded().

UTREEITEM UTREE_INFO::next

Definition at line 1002 of file umain.h.

Referenced by UCvsFolders::DeleteAllItems(), UCvsFolders::GetItemByLocation(), UWidget::OnTreeGetInfo(), UCvsFolders::StepToLocation(), and UCvsFolders::StoreExpanded().

UTREEITEM UTREE_INFO::parent

Definition at line 1001 of file umain.h.

Referenced by UWidget::OnTreeGetInfo(), and UCvsFolders::RetrievePath().

char* UTREE_INFO::title

Definition at line 1005 of file umain.h.

Referenced by UWidget::OnTreeGetInfo(), and UCvsFolders::RetrievePath().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:57:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UTREE_INSERT Struct Reference

UTREE_INSERT Struct Reference

#include <umain.h>

Collaboration diagram for UTREE_INSERT:

[legend]
List of all members.

Public Attributes

const char * | title
UTREEITEM parent
UTREEITEM result
void * | icon
void * | data

Member Data Documentation

void* UTREE_INSERT::data

Definition at line 995 of file umain.h.

Referenced by TBrowserFillDummy::ExitDirectory(), UCvsFolders::OnTreeExpanding(), and UWidget::OnTreeInsert().

void* UTREE_INSERT::icon

Definition at line 994 of file umain.h.

Referenced by TBrowserFillDummy::ExitDirectory(), UCvsFolders::OnTreeExpanding(), and UWidget::OnTreeInsert().

UTREEITEM UTREE_INSERT::parent

Definition at line 992 of file umain.h.

Referenced by TBrowserFillDummy::ExitDirectory(), UCvsFolders::OnTreeExpanding(), and UWidget::OnTreeInsert().

UTREEITEM UTREE_INSERT::result

Definition at line 993 of file umain.h.

Referenced by TBrowserFillDummy::ExitDirectory(), and UWidget::OnTreeInsert().

const char* UTREE_INSERT::title

Definition at line 991 of file umain.h.

Referenced by TBrowserFillDummy::ExitDirectory(), UCvsFolders::OnTreeExpanding(), and UWidget::OnTreeInsert().

The documentation for this struct was generated from the following file:
  • rf/umain.h
Generated on Sat Aug 7 22:57:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTreeCtrl Class Reference

CTreeCtrl Class Reference

Inheritance diagram for CTreeCtrl:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJTreeCtrl.h
Generated on Sat Aug 7 22:57:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTreeView Class Reference

CTreeView Class Reference

Inheritance diagram for CTreeView:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/WinCvsBrowser.h
Generated on Sat Aug 7 22:57:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TRtagHandler< tagType > Class Template Reference

TRtagHandler< tagType > Class Template Reference

Handles rtag command. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for TRtagHandler< tagType >:

[legend]
Collaboration diagram for TRtagHandler< tagType >:

[legend]
List of all members.

Public Member Functions

TRtagHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

template<kTagCmdType tagType>
class TRtagHandler< tagType >

Handles rtag command.

Definition at line 731 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

template<kTagCmdType tagType>
TRtagHandler< tagType >::TRtagHandler ( ) [inline]

Definition at line 734 of file BrowseViewHandlers.h.

References GetRtagTypeName().

00735         : KiSelectionHandler(GetRtagTypeName(tagType))
00736     {}

Here is the call graph for this function:

Member Function Documentation

template<kTagCmdType tagType>
virtual void TRtagHandler< tagType >::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 744 of file BrowseViewHandlers.h.

References CvsCmdRtag(), and KiSelectionHandler::OnFiles().

00745     {
00746         KiSelectionHandler::OnFiles(pmf);
00747         CvsCmdRtag(*this, tagType);
00748     }

Here is the call graph for this function:

template<kTagCmdType tagType>
virtual void TRtagHandler< tagType >::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 738 of file BrowseViewHandlers.h.

References CvsCmdRtag(), and KiSelectionHandler::OnFolder().

Referenced by CBrowseFileView::OnAppRtagbranch(), CBrowseFileView::OnAppRtagcreate(), and CBrowseFileView::OnAppRtagdelete().

00739     {
00740         KiSelectionHandler::OnFolder(fullpath);
00741         CvsCmdRtag(*this, tagType);
00742     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:57:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TScrollBar Class Reference

TScrollBar Class Reference

Inheritance diagram for TScrollBar:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:57:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TTagHandler< tagType > Class Template Reference

TTagHandler< tagType > Class Template Reference

Handles tag command. More...

#include <BrowseViewHandlers.h>

Inheritance diagram for TTagHandler< tagType >:

[legend]
Collaboration diagram for TTagHandler< tagType >:

[legend]
List of all members.

Public Member Functions

TTagHandler ()
virtual void | OnFolder (const char *fullpath)
virtual void | OnFiles (MultiFiles *pmf)

Detailed Description

template<kTagCmdType tagType>
class TTagHandler< tagType >

Handles tag command.

Definition at line 128 of file BrowseViewHandlers.h.

Constructor & Destructor Documentation

template<kTagCmdType tagType>
TTagHandler< tagType >::TTagHandler ( ) [inline]

Definition at line 131 of file BrowseViewHandlers.h.

References GetTagTypeName().

00132         : KiSelectionHandler(GetTagTypeName(tagType))
00133     {}

Here is the call graph for this function:

Member Function Documentation

template<kTagCmdType tagType>
virtual void TTagHandler< tagType >::OnFiles ( MultiFiles * pmf ) [inline, virtual]

Called for selected files

Parameters:
pmf Files selection as MultiFiles
Note:
Typically you should call the KiSelectionHandler::OnFiles in your override first

Implements KiSelectionHandler.

Definition at line 141 of file BrowseViewHandlers.h.

References CvsCmdTag(), and KiSelectionHandler::OnFiles().

00142     {
00143         KiSelectionHandler::OnFiles(pmf);
00144         CvsCmdTag(*this, tagType);
00145     }

Here is the call graph for this function:

template<kTagCmdType tagType>
virtual void TTagHandler< tagType >::OnFolder ( const char * fullpath ) [inline, virtual]

Called for selected folder

Parameters:
fullpath Directory path to add to selection
Note:
Typically you should call the KiSelectionHandler::OnFolder in your override first

Implements KiSelectionHandler.

Definition at line 135 of file BrowseViewHandlers.h.

References CvsCmdTag(), and KiSelectionHandler::OnFolder().

00136     {
00137         KiSelectionHandler::OnFolder(fullpath);
00138         CvsCmdTag(*this, tagType);
00139     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/BrowseViewHandlers.h
Generated on Sat Aug 7 22:57:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TTextListView Class Reference

TTextListView Class Reference

Inheritance diagram for TTextListView:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:57:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CTurnOffDispatching Class Reference

CTurnOffDispatching Class Reference

Collaboration diagram for CTurnOffDispatching:

[legend]
List of all members.

Public Member Functions

CTurnOffDispatching ()
~CTurnOffDispatching ()

Protected Attributes

bool m_didSetIt

Constructor & Destructor Documentation

CTurnOffDispatching::CTurnOffDispatching ( ) [inline]

Definition at line 126 of file uevent.cpp.

References m_didSetIt, and sTurnOffDispatching.

00126                           : m_didSetIt(false)
00127     {
00128         if(!sTurnOffDispatching)
00129         {
00130             m_didSetIt = true;
00131             sTurnOffDispatching = true;
00132         }
00133     }

CTurnOffDispatching::~CTurnOffDispatching ( ) [inline]

Definition at line 135 of file uevent.cpp.

References m_didSetIt, and sTurnOffDispatching.

00136     {
00137         if(m_didSetIt)
00138             sTurnOffDispatching = false;
00139     }

Member Data Documentation

bool CTurnOffDispatching::m_didSetIt [protected]

Definition at line 141 of file uevent.cpp.

Referenced by CTurnOffDispatching(), and ~CTurnOffDispatching().

The documentation for this class was generated from the following file:
  • rf/uevent.cpp
Generated on Sat Aug 7 22:57:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TView Class Reference

TView Class Reference

Inheritance diagram for TView:

[legend]
The documentation for this class was generated from the following file:
  • rf/support/macapp/UPseudoSupport.h
Generated on Sat Aug 7 22:57:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: TViewFill Class Reference

TViewFill Class Reference

Fill the view. More...

#include <BrowseFileView.h>

Inheritance diagram for TViewFill:

[legend]
Collaboration diagram for TViewFill:

[legend]
List of all members.

Public Member Functions

TViewFill (const KoTraversalContext *context)
TViewFill (const KoTraversalContext *context, CSortList< ENTNODE > &entries)
virtual | ~TViewFill ()
UCvsFiles * | GetView () const
int | GetListCtrl () const
bool | IsRecursive () const
bool | IsShowIgnored () const
int | InitItem (EntnodeData *data, void *iImage, const char *tag=0L)
virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnAlias (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnFile (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
TViewFill (const KoFileViewTraversalContext *context)
int | InitItem (EntnodeData *data, int iImage, const char *tag=0L)
virtual kTraversal | EnterDirectory (const char *fullpath, const char *dirname, const FSSpec *macspec)
virtual kTraversal | ExitDirectory (const char *fullpath)
virtual kTraversal | OnError (const char *err, int errcode)
virtual kTraversal | OnIdle (const char *fullpath)
virtual kTraversal | OnDirectory (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnAlias (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)
virtual kTraversal | OnFile (const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec)

Public Attributes

CSortList< ENTNODE > m_entries
::vector< UStr > m_ignlist
const KoTraversalContext * | m_context
bool m_isShowIgnored

Private Attributes

CSortList< ENTNODE > m_entries
vector< UStr > m_ignlist
const KoFileViewTraversalContext * | m_context

Detailed Description

Fill the view.

Definition at line 293 of file UCvsFiles.cpp.

Constructor & Destructor Documentation

TViewFill::TViewFill ( const KoTraversalContext * context ) [inline]

Definition at line 302 of file UCvsFiles.cpp.

00302                                                  :
00303         m_entries(200, ENTNODE::Compare), m_context(context) {}

TViewFill::TViewFill | ( | const KoTraversalContext * | context,
 |  | CSortList< ENTNODE > & | entries
 | ) | [inline]

Definition at line 305 of file UCvsFiles.cpp.

References m_context, and m_entries.

00305                                                                                :
00306         m_entries(entries), m_context(context) {}

virtual TViewFill::~TViewFill ( ) [inline, virtual]

Definition at line 309 of file UCvsFiles.cpp.

00309 {}

TViewFill::TViewFill ( const KoFileViewTraversalContext * context )

Definition at line 179 of file BrowseFileView.cpp.

00180     : m_context(context), m_entries(1000, ENTNODE::Compare)
00181 {
00182 }

Member Function Documentation

virtual kTraversal TViewFill::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

kTraversal TViewFill::EnterDirectory | ( | const char * | fullpath,
 |  | const char * | dirname,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 385 of file UCvsFiles.cpp.

References BuildIgnoredList(), Entries_Open(), FSSpec, kContinueTraversal, kTraversal, m_entries, and m_ignlist.

00386     {
00387         Entries_Open (m_entries, fullpath);
00388         BuildIgnoredList(m_ignlist, fullpath);
00389
00390         return kContinueTraversal;
00391     }

Here is the call graph for this function:

virtual kTraversal TViewFill::ExitDirectory ( const char * fullpath ) [virtual]

Reimplemented from TraversalReport.

kTraversal TViewFill::ExitDirectory ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 393 of file UCvsFiles.cpp.

References ENTNODE::Data(), ENT_FILE, Entries_SetMissing(), CSortList< T >::Get(), EntnodeData::GetType(), InitItem(), KoTraversalContext::IsMatch(), EntnodeData::IsMissing(), IsRecursive(), kContinueTraversal, kTraversal, m_context, m_entries, m_ignlist, and CSortList< T >::NumOfElements().

00394     {
00395         // add the missing files
00396         Entries_SetMissing(m_entries);
00397
00398         int numEntries = m_entries.NumOfElements();
00399         for(int i = 0; i < numEntries; i++)
00400         {
00401             const ENTNODE & theNode = m_entries.Get(i);
00402             EntnodeData *data = theNode.Data();
00403             if (data->IsMissing() && m_context->IsMatch(data))
00404             {
00405                 if (!IsRecursive() || data->GetType() == ENT_FILE)
00406                 {
00407                     InitItem(data, UCvsFiles::GetImageForEntry(data));
00408                 }
00409             }
00410         }
00411
00412         m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00413         return kContinueTraversal;
00414     }

Here is the call graph for this function:

int TViewFill::GetListCtrl ( ) const [inline]

Definition at line 316 of file UCvsFiles.cpp.

References GetView(), and UCmdTarget::GetWidID().

Referenced by InitItem().

00317     {
00318         return GetView()->GetWidID();
00319     }

Here is the call graph for this function:

UCvsFiles* TViewFill::GetView ( ) const [inline]

Definition at line 311 of file UCvsFiles.cpp.

References m_context, and KoTraversalContext::m_view.

Referenced by GetListCtrl(), and InitItem().

00312     {
00313         return m_context->m_view;
00314     }

int TViewFill::InitItem | ( | EntnodeData * | data,
 |  | int | iImage,
 |  | const char * | tag = 0L
 | ) |

Initialize and add new item to list view

Parameters:
data | Node to be added
iImage | Image for the node
tag | Tag
Returns:
Index of the new inserted item
Definition at line 227 of file BrowseFileView.cpp.

References KiColumnModel::GetAt(), KiColumnModel::GetCount(), KiColumn::GetText(), KoTraversalContext::IsRecursive(), m_context, and EntnodeData::Ref().

00228 {
00229     CListCtrl& listCtrl = m_context->GetView()->GetListCtrl();
00230     KoColumnContext context(m_context->GetView()->GetPath());
00231
00232     TCHAR buf[256];
00233     m_context->GetView()->GetColumnModel()->GetAt(0)->GetText(&context, data, buf, 256);
00234
00235     LV_ITEM lvi;
00236     lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
00237     lvi.iItem = listCtrl.GetItemCount();
00238     lvi.iSubItem = 0;
00239     lvi.pszText = buf;
00240     lvi.iImage = iImage;
00241     lvi.lParam = (LPARAM)(LPVOID)data;
00242
00243     const int pos = listCtrl.InsertItem(&lvi);
00244     if( pos >= 0 )
00245     {
00246         // Note ownership addition
00247         data->Ref();
00248
00249         // Set item text for additional columns
00250         KiColumnModel* model = m_context->GetView()->GetColumnModel();
00251         int columnCount = model->GetCount();
00252
00253         for(int j = 1; j < columnCount; j++)
00254         {
00255             model->GetAt(j)->GetText(&context, data, buf, 256);
00256             listCtrl.SetItemText(pos, j, buf);
00257         }
00258
00259         if( tag != 0L && tag[0] != '\0' && !m_context->IsRecursive() )
00260         {
00261             listCtrl.SetItemText(pos, EntnodeFile::kTag, tag);
00262         }
00263     }
00264
00265     return pos;
00266 }

Here is the call graph for this function:

int TViewFill::InitItem | ( | EntnodeData * | data,
 |  | void * | iImage,
 |  | const char * | tag = 0L
 | ) | [inline]

Definition at line 332 of file UCvsFiles.cpp.

References ULIST_INSERT::col, EV_LIST_INSERT, EV_LIST_NEWROW, EV_LIST_ROWSETDATA, KiColumnModel::GetAt(), KiColumnModel::GetColumn(), UCvsFiles::GetColumnModel(), KiColumnModel::GetCount(), GetListCtrl(), KiColumn::GetText(), GetView(), ULIST_INSERT::icon, EntnodeData::IsLocked(), IsRecursive(), kUMainWidget, EntnodeData::Ref(), ULIST_INSERT::row, ULIST_INSERT::title, UEventSendMessage(), and UMAKEINT.

Referenced by ExitDirectory(), OnDirectory(), OnFile(), and UCvsFiles::ResetView().

00333     {
00334             KoColumnContext context(GetView()->GetPath());
00335             char buf[256];
00336             GetView()->GetColumnModel()->GetAt(0)->GetText(&context, data, buf, 256);
00337
00338             int rownum;
00339             UEventSendMessage(GetListCtrl(), EV_LIST_NEWROW, kUMainWidget, &rownum);
00340             UEventSendMessage(GetListCtrl(), EV_LIST_ROWSETDATA, UMAKEINT(kUMainWidget, rownum), data);
00341             ULIST_INSERT entry;
00342             entry.row = rownum;
00343             entry.col = 0;
00344             entry.title = buf;
00345             entry.icon = /*UCvsFiles::GetImageForEntry(data);*/iImage;
00346             UEventSendMessage(GetListCtrl(), EV_LIST_INSERT, kUMainWidget, &entry);
00347
00348             entry.icon = 0L;
00349
00350             if(rownum >= 0) {
00351                 data->Ref();
00352
00353 #if 0 /* TODO */
00354             lvi.state = data->IsLocked() ?
00355                 INDEXTOSTATEIMAGEMASK(2) : INDEXTOSTATEIMAGEMASK(1);
00356 #endif
00357             KiColumnModel* model = GetView()->GetColumnModel();
00358
00359             // set item text for additional columns
00360             int columnCount = model->GetCount();
00361             for(int j = 1; j < columnCount; j++)
00362             {
00363                 char buf[256];
00364                 model->GetAt(j)->GetText(&context, data, buf, 256);
00365
00366                 if(buf[0] != 0L)
00367                 {
00368                     entry.col = j;
00369                     entry.title = buf;
00370                     UEventSendMessage(GetListCtrl(), EV_LIST_INSERT, kUMainWidget, &entry);
00371                 }
00372             }
00373
00374             // set tag column to given special tag
00375             if(tag != 0L && tag[0] != '\0' && !IsRecursive()) {
00376                 entry.col = model->GetColumn(EntnodeFile::kTag);
00377                 entry.title = tag == 0L ? "" : (const char *)tag;
00378                 UEventSendMessage(GetListCtrl(), EV_LIST_INSERT, kUMainWidget, &entry);
00379             }
00380         }
00381
00382         return rownum;
00383     }

Here is the call graph for this function:

bool TViewFill::IsRecursive ( ) const [inline]

Definition at line 321 of file UCvsFiles.cpp.

References KoTraversalContext::IsRecursive(), and m_context.

Referenced by ExitDirectory(), InitItem(), and OnDirectory().

00322     {
00323         return m_context->IsRecursive();
00324     }

Here is the call graph for this function:

bool TViewFill::IsShowIgnored ( ) const [inline]

Definition at line 326 of file UCvsFiles.cpp.

References KoTraversalContext::IsShowIgnored(), and m_context.

Referenced by OnDirectory(), and OnFile().

00327     {
00328         return m_context->IsShowIgnored();
00329     }

Here is the call graph for this function:

virtual kTraversal TViewFill::OnAlias | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

kTraversal TViewFill::OnAlias | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 479 of file UCvsFiles.cpp.

References FSSpec, kTraversal, and OnFile().

00483     {
00484         return OnFile(fullpath, fullname, name, dir, macspec);
00485     }

Here is the call graph for this function:

virtual kTraversal TViewFill::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

kTraversal TViewFill::OnDirectory | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 436 of file UCvsFiles.cpp.

References CStr, Entries_SetVisited(), FileTraverse(), FSSpec, InitItem(), EntnodeData::IsIgnored(), EntnodeData::IsMissing(), IsRecursive(), IsShowIgnored(), EntnodeData::IsUnknown(), kSkipFile, kTraversal, kTraversalError, m_context, m_entries, m_ignlist, and Tag_Open().

00440     {
00441 #if qUnix
00442         if(strcmp(name, "CVS") == 0)
00443 #else
00444         if(stricmp(name, "CVS") == 0)
00445 #endif
00446             return kSkipFile;
00447
00448         EntnodeData *data = Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00449         if(!IsShowIgnored() && data->IsIgnored())
00450             return kSkipFile;
00451
00452         if (IsRecursive())
00453         {
00454             if (!data->IsIgnored() && !data->IsUnknown() && !data->IsMissing())
00455             {
00456                 TViewFill traverse(m_context);
00457                 FileTraverse(fullname, traverse);
00458             }
00459             return kSkipFile;
00460         }
00461
00462         // get the tag
00463         CStr subCVS;
00464         CStr tagName;
00465         subCVS = fullname;
00466         if(!subCVS.endsWith(kPathDelimiter))
00467             subCVS << kPathDelimiter;
00468         subCVS << "CVS";
00469         if(chdir(subCVS) == 0)
00470             Tag_Open(tagName, subCVS);
00471         if(chdir(fullpath) != 0)
00472             return kTraversalError;
00473
00474         InitItem(data, UCvsFiles::GetImageForEntry(data), tagName);
00475
00476         return kSkipFile;
00477     }

Here is the call graph for this function:

virtual kTraversal TViewFill::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [virtual]

Reimplemented from TraversalReport.

kTraversal TViewFill::OnError | ( | const char * | err,
 |  | int | errcode
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 416 of file UCvsFiles.cpp.

References kTraversal, and kTraversalError.

00417     {
00418         return kTraversalError;
00419     }

virtual kTraversal TViewFill::OnFile | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [virtual]

Reimplemented from TraversalReport.

kTraversal TViewFill::OnFile | ( | const char * | fullpath,
 |  | const char * | fullname,
 |  | const char * | name,
 |  | const struct stat & | dir,
 |  | const FSSpec * | macspec
 | ) | [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 487 of file UCvsFiles.cpp.

References Entries_SetVisited(), FSSpec, InitItem(), EntnodeData::IsIgnored(), KoTraversalContext::IsMatch(), IsShowIgnored(), kContinueTraversal, kTraversal, m_context, m_entries, and m_ignlist.

Referenced by OnAlias().

00491     {
00492         EntnodeData *data = Entries_SetVisited(fullpath, m_entries, name, dir, false, &m_ignlist);
00493         if(!IsShowIgnored() && data->IsIgnored())
00494             return kContinueTraversal;
00495
00496         if( m_context->IsMatch(data) )
00497         {
00498             InitItem(data, UCvsFiles::GetImageForEntry(data));
00499         }
00500
00501         return kContinueTraversal;
00502     }

Here is the call graph for this function:

virtual kTraversal TViewFill::OnIdle ( const char * fullpath ) [virtual]

Reimplemented from TraversalReport.

kTraversal TViewFill::OnIdle ( const char * fullpath ) [inline, virtual]

Reimplemented from TraversalReport.

Definition at line 421 of file UCvsFiles.cpp.

References kContinueTraversal, kStopTraversal, and kTraversal.

00422     {
00423 #ifdef qUnix
00424         // Allow to stop traversing using the escape key
00425         bool escState = GetAsyncKeyState(GDK_Escape);
00426
00427         if( escState == TRUE)
00428         {
00429             return kStopTraversal;
00430         }
00431 #endif
00432
00433         return kContinueTraversal;
00434     }

Member Data Documentation

const KoFileViewTraversalContext* TViewFill::m_context [private]

Traversal context Definition at line 138 of file BrowseFileView.h.

const KoTraversalContext* TViewFill::m_context

Definition at line 299 of file UCvsFiles.cpp.

Referenced by ExitDirectory(), GetView(), InitItem(), IsRecursive(), IsShowIgnored(), OnDirectory(), OnFile(), and TViewFill().

CSortList<ENTNODE> TViewFill::m_entries [private]

Entries list Definition at line 136 of file BrowseFileView.h.

CSortList<ENTNODE> TViewFill::m_entries

Definition at line 296 of file UCvsFiles.cpp.

Referenced by EnterDirectory(), ExitDirectory(), OnDirectory(), OnFile(), and TViewFill().

vector< UStr > TViewFill::m_ignlist [private]

Ignore list Definition at line 137 of file BrowseFileView.h.

:: vector< UStr > TViewFill::m_ignlist

Definition at line 298 of file UCvsFiles.cpp.

Referenced by EnterDirectory(), ExitDirectory(), OnDirectory(), and OnFile().

bool TViewFill::m_isShowIgnored

Definition at line 300 of file UCvsFiles.cpp.

The documentation for this class was generated from the following files:
  • common/UCvsFiles.cpp
  • WinCvs/BrowseFileView.h
  • WinCvs/BrowseFileView.cpp
Generated on Sat Aug 7 22:57:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CUpdateMain Class Reference

CUpdateMain Class Reference

Main update page. More...

#include <UpdateDlg.h>

Inheritance diagram for CUpdateMain:

[legend]
Collaboration diagram for CUpdateMain:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_UPDATE_MAIN }

Public Member Functions

CUpdateMain ()
~CUpdateMain ()

Public Attributes

BOOL | m_norecurs
BOOL | m_createmissdir
BOOL | m_getcleancopy

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)

Private Member Functions

virtual void | InitHelpID ()

Detailed Description

Main update page.

Definition at line 58 of file UpdateDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 69 of file UpdateDlg.h.
00069 { IDD = IDD_UPDATE_MAIN };

Constructor & Destructor Documentation

CUpdateMain::CUpdateMain ( )

Definition at line 117 of file UpdateDlg.cpp.

00117                          : CHHelpPropertyPage(CUpdateMain::IDD)
00118 {
00119     //{{AFX_DATA_INIT(CUpdateMain)
00120     m_norecurs = FALSE;
00121     m_createmissdir = FALSE;
00122     m_getcleancopy = FALSE;
00123     //}}AFX_DATA_INIT
00124 }

CUpdateMain::~CUpdateMain ( )

Definition at line 126 of file UpdateDlg.cpp.

00127 {
00128 }

Member Function Documentation

void CUpdateMain::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 130 of file UpdateDlg.cpp.

References CHHelpPropertyPage::DoDataExchange(), IDC_CREATE_MISSING_DIR, IDC_GET_CLEAN_COPY, IDC_NORECURS, m_createmissdir, m_getcleancopy, and m_norecurs.

00131 {
00132     CHHelpPropertyPage::DoDataExchange(pDX);
00133     //{{AFX_DATA_MAP(CUpdateMain)
00134     DDX_Check(pDX, IDC_NORECURS, m_norecurs);
00135     DDX_Check(pDX, IDC_CREATE_MISSING_DIR, m_createmissdir);
00136     DDX_Check(pDX, IDC_GET_CLEAN_COPY, m_getcleancopy);
00137     //}}AFX_DATA_MAP
00138 }

Here is the call graph for this function:

void CUpdateMain::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 146 of file UpdateDlg.cpp.

References IDC_CREATE_MISSING_DIR, IDC_GET_CLEAN_COPY, IDC_NORECURS, IDH_IDC_CREATE_MISSING_DIR, IDH_IDC_GET_CLEAN_COPY, and IDH_IDC_NORECURS.

00147 {
00148     SetCtrlHelpID(IDC_NORECURS,             IDH_IDC_NORECURS);
00149     SetCtrlHelpID(IDC_CREATE_MISSING_DIR,   IDH_IDC_CREATE_MISSING_DIR);
00150     SetCtrlHelpID(IDC_GET_CLEAN_COPY,       IDH_IDC_GET_CLEAN_COPY);
00151 }

Member Data Documentation

BOOL CUpdateMain::m_createmissdir

Definition at line 71 of file UpdateDlg.h.

Referenced by CompatGetUpdate(), and DoDataExchange().

BOOL CUpdateMain::m_getcleancopy

Definition at line 72 of file UpdateDlg.h.

Referenced by CompatGetUpdate(), and DoDataExchange().

BOOL CUpdateMain::m_norecurs

Definition at line 70 of file UpdateDlg.h.

Referenced by CompatGetUpdate(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/UpdateDlg.h
  • common/UpdateDlg.cpp
Generated on Sat Aug 7 22:57:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CUpdateMerge Class Reference

CUpdateMerge Class Reference

Merge update page. More...

#include <UpdateDlg.h>

Inheritance diagram for CUpdateMerge:

[legend]
Collaboration diagram for CUpdateMerge:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_UPDATE_MERGE }

Public Member Functions

CUpdateMerge (const MultiFiles *mf, bool isCheckout, const char *rev1, const char *rev2, const char *date1, const char *date2, const bool threeWayConflicts)
~CUpdateMerge ()

Public Attributes

CSmartComboBox m_mergeTypeCombo
CButton | m_branchPointMergeCheck
CButton | m_threeWayConflictsCheck
CButton | m_hasDate2Check
CButton | m_hasDate1Check
CButton | m_browse2TagButton
CButton | m_browse1TagButton
CSmartComboBox m_date2Combo
CSmartComboBox m_date1Combo
CSmartComboBox m_rev2Combo
CSmartComboBox m_rev1Combo
CString | m_rev1
CString | m_rev2
BOOL | m_hasDate1
BOOL | m_hasDate2
CString | m_date1
CString | m_date2
BOOL | m_threeWayConflicts
BOOL | m_branchPointMerge
int m_mergeType

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnCheckdate1 ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnCheckdate2 ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnBrowseTag1 ()
BN_CLICKED message handler, display browse tag/branch dialog.
afx_msg void | OnBrowseTag2 ()
BN_CLICKED message handler, display browse tag/branch dialog.
afx_msg void | OnSelchangeMergeType ()
CBN_SELCHANGE message handler, enable controls.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf
bool m_isCheckout

Detailed Description

Merge update page.

Definition at line 158 of file UpdateDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 172 of file UpdateDlg.h.
00172 { IDD = IDD_UPDATE_MERGE };

Constructor & Destructor Documentation

CUpdateMerge::CUpdateMerge | ( | const MultiFiles * | mf,
 |  | bool | isCheckout,
 |  | const char * | rev1,
 |  | const char * | rev2,
 |  | const char * | date1,
 |  | const char * | date2,
 |  | const bool | threeWayConflicts
 | ) |

Definition at line 322 of file UpdateDlg.cpp.

References gDateNames, gReleasesNames, and gRevNames.

00326                            : m_mf(mf), m_mergeTypeCombo(USmartCombo::AutoDropWidth), CHHelpPropertyPage(CUpdateMerge::IDD)
00327 {
00328     //{{AFX_DATA_INIT(CUpdateMerge)
00329     m_rev1 = rev1;
00330     m_rev2 = rev2;
00331     m_hasDate1 = FALSE;
00332     m_hasDate2 = FALSE;
00333     m_date1 = _T("");
00334     m_date2 = _T("");
00335     m_threeWayConflicts = threeWayConflicts;
00336     m_branchPointMerge = FALSE;
00337     m_mergeType = 0;
00338     //}}AFX_DATA_INIT
00339
00340     m_isCheckout = isCheckout;
00341
00342     m_rev1Combo.SetItems(m_isCheckout ? &gReleasesNames : &gRevNames);
00343     m_rev2Combo.SetItems(m_isCheckout ? &gReleasesNames : &gRevNames);
00344     m_date1Combo.SetItems(&gDateNames);
00345     m_date2Combo.SetItems(&gDateNames);
00346 }

CUpdateMerge::~CUpdateMerge ( )

Definition at line 348 of file UpdateDlg.cpp.

00349 {
00350 }

Member Function Documentation

void CUpdateMerge::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 352 of file UpdateDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BRANCHPOINT_MERGE, IDC_BROWSE_TAG1, IDC_BROWSE_TAG2, IDC_DATE1, IDC_DATE2, IDC_HAS_DATE1, IDC_HAS_DATE2, IDC_MERGE_TYPE, IDC_REV_TAG, IDC_REV_TAG2, IDC_THREE_WAY_CONFLICTS, m_branchPointMerge, m_branchPointMergeCheck, m_browse1TagButton, m_browse2TagButton, m_date1, m_date1Combo, m_date2, m_date2Combo, m_hasDate1, m_hasDate1Check, m_hasDate2, m_hasDate2Check, m_mergeType, m_mergeTypeCombo, m_rev1, m_rev1Combo, m_rev2, m_rev2Combo, m_threeWayConflicts, m_threeWayConflictsCheck, and OnSelchangeMergeType().

00353 {
00354     CHHelpPropertyPage::DoDataExchange(pDX);
00355     //{{AFX_DATA_MAP(CUpdateMerge)
00356     DDX_Control(pDX, IDC_MERGE_TYPE, m_mergeTypeCombo);
00357     DDX_Control(pDX, IDC_BRANCHPOINT_MERGE, m_branchPointMergeCheck);
00358     DDX_Control(pDX, IDC_THREE_WAY_CONFLICTS, m_threeWayConflictsCheck);
00359     DDX_Control(pDX, IDC_HAS_DATE2, m_hasDate2Check);
00360     DDX_Control(pDX, IDC_HAS_DATE1, m_hasDate1Check);
00361     DDX_Control(pDX, IDC_BROWSE_TAG2, m_browse2TagButton);
00362     DDX_Control(pDX, IDC_BROWSE_TAG1, m_browse1TagButton);
00363     DDX_Control(pDX, IDC_DATE2, m_date2Combo);
00364     DDX_Control(pDX, IDC_DATE1, m_date1Combo);
00365     DDX_Control(pDX, IDC_REV_TAG2, m_rev2Combo);
00366     DDX_Control(pDX, IDC_REV_TAG, m_rev1Combo);
00367     DDX_CBString(pDX, IDC_REV_TAG, m_rev1);
00368     DDX_CBString(pDX, IDC_REV_TAG2, m_rev2);
00369     DDX_Check(pDX, IDC_HAS_DATE1, m_hasDate1);
00370     DDX_Check(pDX, IDC_HAS_DATE2, m_hasDate2);
00371     DDX_CBString(pDX, IDC_DATE1, m_date1);
00372     DDX_CBString(pDX, IDC_DATE2, m_date2);
00373     DDX_Check(pDX, IDC_THREE_WAY_CONFLICTS, m_threeWayConflicts);
00374     DDX_Check(pDX, IDC_BRANCHPOINT_MERGE, m_branchPointMerge);
00375     DDX_CBIndex(pDX, IDC_MERGE_TYPE, m_mergeType);
00376     //}}AFX_DATA_MAP
00377
00378     if( m_mergeType > 0 == 1 || m_mergeType == 2 )
00379     {
00380         DDV_MinChars(pDX, m_rev1, 1);
00381         if( m_hasDate1 )
00382         {
00383             DDV_MinChars(pDX, m_date1, 1);
00384         }
00385     }
00386
00387     if( m_mergeType == 2 )
00388     {
00389         DDV_MinChars(pDX, m_rev2, 1);
00390         if( m_hasDate2 )
00391         {
00392             DDV_MinChars(pDX, m_date2, 1);
00393         }
00394     }
00395
00396     if( !pDX->m_bSaveAndValidate )
00397     {
00398         OnSelchangeMergeType();
00399     }
00400
00401     DDX_ComboMString(pDX, IDC_REV_TAG, m_rev1Combo);
00402     DDX_ComboMString(pDX, IDC_REV_TAG2, m_rev2Combo);
00403     DDX_ComboMString(pDX, IDC_DATE1, m_date1Combo);
00404     DDX_ComboMString(pDX, IDC_DATE2, m_date2Combo);
00405 }

Here is the call graph for this function:

void CUpdateMerge::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 407 of file UpdateDlg.cpp.

References IDC_BRANCHPOINT_MERGE, IDC_BROWSE_TAG1, IDC_BROWSE_TAG2, IDC_DATE1, IDC_DATE2, IDC_HAS_DATE1, IDC_HAS_DATE2, IDC_MERGE_TYPE, IDC_REV_TAG, IDC_REV_TAG2, IDC_THREE_WAY_CONFLICTS, IDH_IDC_BRANCHPOINT_MERGE, IDH_IDC_BROWSE_TAG, IDH_IDC_DATE, IDH_IDC_HAS_DATE, IDH_IDC_MERGE_TYPE, IDH_IDC_REV_TAG, IDH_IDC_THREE_WAY_CONFLICTS, and CHHelpSupport::SetCtrlHelpID().

00408 {
00409     SetCtrlHelpID(IDC_MERGE_TYPE,           IDH_IDC_MERGE_TYPE);
00410     SetCtrlHelpID(IDC_REV_TAG,              IDH_IDC_REV_TAG);
00411     SetCtrlHelpID(IDC_BROWSE_TAG1,          IDH_IDC_BROWSE_TAG);
00412     SetCtrlHelpID(IDC_HAS_DATE1,            IDH_IDC_HAS_DATE);
00413     SetCtrlHelpID(IDC_DATE1,                IDH_IDC_DATE);
00414     SetCtrlHelpID(IDC_REV_TAG2,             IDH_IDC_REV_TAG);
00415     SetCtrlHelpID(IDC_BROWSE_TAG2,          IDH_IDC_BROWSE_TAG);
00416     SetCtrlHelpID(IDC_HAS_DATE2,            IDH_IDC_HAS_DATE);
00417     SetCtrlHelpID(IDC_DATE2,                IDH_IDC_DATE);
00418     SetCtrlHelpID(IDC_THREE_WAY_CONFLICTS,  IDH_IDC_THREE_WAY_CONFLICTS);
00419     SetCtrlHelpID(IDC_BRANCHPOINT_MERGE,    IDH_IDC_BRANCHPOINT_MERGE);
00420 }

Here is the call graph for this function:

void CUpdateMerge::OnBrowseTag1 ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 468 of file UpdateDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev1, and m_rev1Combo.

00469 {
00470     CStr tagName;
00471     if( CompatGetTagListItem(m_mf, tagName) )
00472     {
00473         m_rev1 = (const char*)tagName;
00474         m_rev1Combo.SetWindowText(m_rev1);
00475     }
00476 }

Here is the call graph for this function:

void CUpdateMerge::OnBrowseTag2 ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 479 of file UpdateDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev2, and m_rev2Combo.

00480 {
00481     CStr tagName;
00482     if( CompatGetTagListItem(m_mf, tagName) )
00483     {
00484         m_rev2 = (const char*)tagName;
00485         m_rev2Combo.SetWindowText(m_rev2);
00486     }
00487 }

Here is the call graph for this function:

void CUpdateMerge::OnCheckdate1 ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 456 of file UpdateDlg.cpp.

References OnSelchangeMergeType().

00457 {
00458     OnSelchangeMergeType();
00459 }

Here is the call graph for this function:

void CUpdateMerge::OnCheckdate2 ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 462 of file UpdateDlg.cpp.

References OnSelchangeMergeType().

00463 {
00464     OnSelchangeMergeType();
00465 }

Here is the call graph for this function:

void CUpdateMerge::OnSelchangeMergeType ( ) [protected]

CBN_SELCHANGE message handler, enable controls.

Definition at line 423 of file UpdateDlg.cpp.

References m_branchPointMergeCheck, m_browse1TagButton, m_browse2TagButton, m_date1Combo, m_date2Combo, m_hasDate1Check, m_hasDate2Check, m_mergeTypeCombo, m_rev1Combo, m_rev2Combo, and m_threeWayConflictsCheck.

Referenced by DoDataExchange(), OnCheckdate1(), and OnCheckdate2().

00424 {
00425     switch( m_mergeTypeCombo.GetCurSel() )
00426     {
00427     case 1:
00428         m_rev1Combo.EnableWindow(TRUE);
00429         m_rev2Combo.EnableWindow(FALSE);
00430         m_browse1TagButton.EnableWindow(TRUE);
00431         m_browse2TagButton.EnableWindow(FALSE);
00432         break;
00433     case 2:
00434         m_rev1Combo.EnableWindow(TRUE);
00435         m_rev2Combo.EnableWindow(TRUE);
00436         m_browse1TagButton.EnableWindow(TRUE);
00437         m_browse2TagButton.EnableWindow(TRUE);
00438         break;
00439     default:
00440         m_rev1Combo.EnableWindow(FALSE);
00441         m_rev2Combo.EnableWindow(FALSE);
00442         m_browse1TagButton.EnableWindow(FALSE);
00443         m_browse2TagButton.EnableWindow(FALSE);
00444         break;
00445     }
00446
00447     m_hasDate1Check.EnableWindow(m_rev1Combo.IsWindowEnabled());
00448     m_hasDate2Check.EnableWindow(m_rev2Combo.IsWindowEnabled());
00449     m_date1Combo.EnableWindow(m_rev1Combo.IsWindowEnabled() && m_hasDate1Check.GetCheck());
00450     m_date2Combo.EnableWindow(m_rev2Combo.IsWindowEnabled() && m_hasDate2Check.GetCheck());
00451     m_threeWayConflictsCheck.EnableWindow(m_rev1Combo.IsWindowEnabled());
00452     m_branchPointMergeCheck.EnableWindow(m_rev1Combo.IsWindowEnabled());
00453 }

Member Data Documentation

BOOL CUpdateMerge::m_branchPointMerge

Definition at line 191 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CButton CUpdateMerge::m_branchPointMergeCheck

Definition at line 174 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

CButton CUpdateMerge::m_browse1TagButton

Definition at line 179 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

CButton CUpdateMerge::m_browse2TagButton

Definition at line 178 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

CString CUpdateMerge::m_date1

Definition at line 188 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CSmartComboBox CUpdateMerge::m_date1Combo

Definition at line 181 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

CString CUpdateMerge::m_date2

Definition at line 189 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CSmartComboBox CUpdateMerge::m_date2Combo

Definition at line 180 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

BOOL CUpdateMerge::m_hasDate1

Definition at line 186 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CButton CUpdateMerge::m_hasDate1Check

Definition at line 177 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

BOOL CUpdateMerge::m_hasDate2

Definition at line 187 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CButton CUpdateMerge::m_hasDate2Check

Definition at line 176 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

bool CUpdateMerge::m_isCheckout [private]

true for the checkout, false for update Definition at line 217 of file UpdateDlg.h.

int CUpdateMerge::m_mergeType

Definition at line 192 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CSmartComboBox CUpdateMerge::m_mergeTypeCombo

Definition at line 173 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

const MultiFiles* CUpdateMerge::m_mf [private]

Browser selection Definition at line 216 of file UpdateDlg.h.

Referenced by OnBrowseTag1(), and OnBrowseTag2().

CString CUpdateMerge::m_rev1

Definition at line 184 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), DoDataExchange(), and OnBrowseTag1().

CSmartComboBox CUpdateMerge::m_rev1Combo

Definition at line 183 of file UpdateDlg.h.

Referenced by DoDataExchange(), OnBrowseTag1(), and OnSelchangeMergeType().

CString CUpdateMerge::m_rev2

Definition at line 185 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), DoDataExchange(), and OnBrowseTag2().

CSmartComboBox CUpdateMerge::m_rev2Combo

Definition at line 182 of file UpdateDlg.h.

Referenced by DoDataExchange(), OnBrowseTag2(), and OnSelchangeMergeType().

BOOL CUpdateMerge::m_threeWayConflicts

Definition at line 190 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CButton CUpdateMerge::m_threeWayConflictsCheck

Definition at line 175 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnSelchangeMergeType().

The documentation for this class was generated from the following files:
  • common/UpdateDlg.h
  • common/UpdateDlg.cpp
Generated on Sat Aug 7 22:57:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CUpdateOptions Class Reference

CUpdateOptions Class Reference

Update options page. More...

#include <UpdateDlg.h>

Inheritance diagram for CUpdateOptions:

[legend]
Collaboration diagram for CUpdateOptions:

[legend]
List of all members.

Public Types

enum | { IDD = IDD_UPDATE_OPTIONS }

Public Member Functions

CUpdateOptions (const MultiFiles *mf, const char *rev, const char *date, const char *keyword, const bool resetSticky, const bool caseSensitiveNames, const bool lastCheckinTime)
~CUpdateOptions ()

Public Attributes

CButton | m_matchCheck
CButton | m_resetStickyCheck
CButton | m_browseTagButton
CButton | m_hasRevCheck
CButton | m_hasDateCheck
CKeywordComboBox m_keywordCombo
CStatic | m_keywordDescStatic
CSmartComboBox m_revCombo
CSmartComboBox m_dateCombo
CString | m_date
CString | m_rev
BOOL | m_hasDate
BOOL | m_match
BOOL | m_hasRev
CString | m_keyword
BOOL | m_resetSticky
BOOL | m_stdout
BOOL | m_caseSensitiveNames
BOOL | m_lastCheckinTime

Protected Member Functions

virtual void | DoDataExchange (CDataExchange *pDX)
afx_msg void | OnDate ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnRev ()
BN_CLICKED message handler, enable controls.
afx_msg void | OnBrowseTag ()
BN_CLICKED message handler, display browse tag/branch dialog.
virtual BOOL | OnInitDialog ()
OnInitDialog virtual override, initialize the controls.
afx_msg void | OnDelsticky ()
BN_CLICKED message handler, enable controls.

Private Member Functions

virtual void | InitHelpID ()

Private Attributes

const MultiFiles * | m_mf

Detailed Description

Update options page.

Definition at line 95 of file UpdateDlg.h.

Member Enumeration Documentation

anonymous enum

Enumeration values:
IDD
Definition at line 108 of file UpdateDlg.h.
00108 { IDD = IDD_UPDATE_OPTIONS };

Constructor & Destructor Documentation

CUpdateOptions::CUpdateOptions | ( | const MultiFiles * | mf,
 |  | const char * | rev,
 |  | const char * | date,
 |  | const char * | keyword,
 |  | const bool | resetSticky,
 |  | const bool | caseSensitiveNames,
 |  | const bool | lastCheckinTime
 | ) |

Definition at line 158 of file UpdateDlg.cpp.

References gDateNames, and gRevNames.

00161                                      : m_mf(mf), CHHelpPropertyPage(CUpdateOptions::IDD)
00162 {
00163     //{{AFX_DATA_INIT(CUpdateOptions)
00164     m_date = date;
00165     m_rev = rev;
00166     m_hasDate = FALSE;
00167     m_match = FALSE;
00168     m_hasRev = FALSE;
00169     m_keyword = keyword;
00170     m_resetSticky = resetSticky;
00171     m_stdout = FALSE;
00172     m_caseSensitiveNames = caseSensitiveNames;
00173     m_lastCheckinTime = lastCheckinTime;
00174     //}}AFX_DATA_INIT
00175
00176     m_revCombo.SetItems(&gRevNames);
00177     m_dateCombo.SetItems(&gDateNames);
00178 }

CUpdateOptions::~CUpdateOptions ( )

Definition at line 180 of file UpdateDlg.cpp.

00181 {
00182 }

Member Function Documentation

void CUpdateOptions::DoDataExchange ( CDataExchange * pDX ) [protected, virtual]

Reimplemented from CHHelpPropertyPage.

Definition at line 184 of file UpdateDlg.cpp.

References DDV_MinChars(), DDX_ComboMString(), CHHelpPropertyPage::DoDataExchange(), IDC_BROWSE_TAG, IDC_CASE_SENSITIVE_NAMES, IDC_DATE, IDC_FORCE_HEAD_REV, IDC_HAS_DATE, IDC_HAS_REV, IDC_KEYWORD_DESC, IDC_KEYWORD_OPT, IDC_LAST_CHECKIN_TIME, IDC_RESET_STICKY, IDC_REV_TAG, IDC_STDOUT, m_browseTagButton, m_caseSensitiveNames, m_date, m_dateCombo, m_hasDate, m_hasDateCheck, m_hasRev, m_hasRevCheck, m_keyword, m_keywordCombo, m_keywordDescStatic, m_lastCheckinTime, m_match, m_matchCheck, m_resetSticky, m_resetStickyCheck, m_rev, m_revCombo, m_stdout, OnDate(), OnDelsticky(), and OnRev().

00185 {
00186     CHHelpPropertyPage::DoDataExchange(pDX);
00187     //{{AFX_DATA_MAP(CUpdateOptions)
00188     DDX_Control(pDX, IDC_FORCE_HEAD_REV, m_matchCheck);
00189     DDX_Control(pDX, IDC_RESET_STICKY, m_resetStickyCheck);
00190     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00191     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00192     DDX_Control(pDX, IDC_HAS_DATE, m_hasDateCheck);
00193     DDX_Control(pDX, IDC_KEYWORD_OPT, m_keywordCombo);
00194     DDX_Control(pDX, IDC_KEYWORD_DESC, m_keywordDescStatic);
00195     DDX_Control(pDX, IDC_REV_TAG, m_revCombo);
00196     DDX_Control(pDX, IDC_DATE, m_dateCombo);
00197     DDX_CBString(pDX, IDC_DATE, m_date);
00198     DDX_CBString(pDX, IDC_REV_TAG, m_rev);
00199     DDX_Check(pDX, IDC_HAS_DATE, m_hasDate);
00200     DDX_Check(pDX, IDC_FORCE_HEAD_REV, m_match);
00201     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00202     DDX_CBString(pDX, IDC_KEYWORD_OPT, m_keyword);
00203     DDX_Check(pDX, IDC_RESET_STICKY, m_resetSticky);
00204     DDX_Check(pDX, IDC_STDOUT, m_stdout);
00205     DDX_Check(pDX, IDC_CASE_SENSITIVE_NAMES, m_caseSensitiveNames);
00206     DDX_Check(pDX, IDC_LAST_CHECKIN_TIME, m_lastCheckinTime);
00207     //}}AFX_DATA_MAP
00208
00209     if( m_hasRev )
00210     {
00211         DDV_MinChars(pDX, m_rev, 1);
00212     }
00213
00214     if( m_hasDate )
00215     {
00216         DDV_MinChars(pDX, m_date, 1);
00217     }
00218
00219     if( !pDX->m_bSaveAndValidate )
00220     {
00221         OnDelsticky();
00222         OnDate();
00223         OnRev();
00224     }
00225
00226     DDX_ComboMString(pDX, IDC_REV_TAG, m_revCombo);
00227     DDX_ComboMString(pDX, IDC_DATE, m_dateCombo);
00228 }

Here is the call graph for this function:

void CUpdateOptions::InitHelpID ( ) [private, virtual]

Set the controls help IDs

Implements CHHelpSupport.

Definition at line 255 of file UpdateDlg.cpp.

References IDC_BROWSE_TAG, IDC_CASE_SENSITIVE_NAMES, IDC_DATE, IDC_FORCE_HEAD_REV, IDC_HAS_DATE, IDC_HAS_REV, IDC_KEYWORD_DESC, IDC_KEYWORD_OPT, IDC_LAST_CHECKIN_TIME, IDC_RESET_STICKY, IDC_REV_TAG, IDC_STDOUT, IDH_IDC_BROWSE_TAG, IDH_IDC_CASE_SENSITIVE_NAMES, IDH_IDC_DATE, IDH_IDC_FORCE_HEAD_REV, IDH_IDC_HAS_DATE, IDH_IDC_HAS_REV, IDH_IDC_KEYWORD_DESC, IDH_IDC_KEYWORD_OPT, IDH_IDC_LAST_CHECKIN_TIME, IDH_IDC_RESET_STICKY, IDH_IDC_REV_TAG, IDH_IDC_STDOUT, and CHHelpSupport::SetCtrlHelpID().

00256 {
00257     SetCtrlHelpID(IDC_RESET_STICKY,         IDH_IDC_RESET_STICKY);
00258     SetCtrlHelpID(IDC_HAS_DATE,             IDH_IDC_HAS_DATE);
00259     SetCtrlHelpID(IDC_DATE,                 IDH_IDC_DATE);
00260     SetCtrlHelpID(IDC_HAS_REV,              IDH_IDC_HAS_REV);
00261     SetCtrlHelpID(IDC_REV_TAG,              IDH_IDC_REV_TAG);
00262     SetCtrlHelpID(IDC_BROWSE_TAG,           IDH_IDC_BROWSE_TAG);
00263     SetCtrlHelpID(IDC_FORCE_HEAD_REV,       IDH_IDC_FORCE_HEAD_REV);
00264     SetCtrlHelpID(IDC_KEYWORD_OPT,          IDH_IDC_KEYWORD_OPT);
00265     SetCtrlHelpID(IDC_KEYWORD_DESC,         IDH_IDC_KEYWORD_DESC);
00266     SetCtrlHelpID(IDC_STDOUT,               IDH_IDC_STDOUT);
00267     SetCtrlHelpID(IDC_CASE_SENSITIVE_NAMES, IDH_IDC_CASE_SENSITIVE_NAMES);
00268     SetCtrlHelpID(IDC_LAST_CHECKIN_TIME,    IDH_IDC_LAST_CHECKIN_TIME);
00269 }

Here is the call graph for this function:

void CUpdateOptions::OnBrowseTag ( ) [protected]

BN_CLICKED message handler, display browse tag/branch dialog.

Definition at line 289 of file UpdateDlg.cpp.

References CompatGetTagListItem(), CStr, m_mf, m_rev, and m_revCombo.

00290 {
00291     CStr tagName;
00292     if( CompatGetTagListItem(m_mf, tagName) )
00293     {
00294         m_rev = (const char*)tagName;
00295         m_revCombo.SetWindowText(m_rev);
00296     }
00297 }

Here is the call graph for this function:

void CUpdateOptions::OnDate ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 272 of file UpdateDlg.cpp.

References m_dateCombo, m_hasDateCheck, and m_resetStickyCheck.

Referenced by DoDataExchange(), and OnDelsticky().

00273 {
00274     const BOOL enable = m_hasDateCheck.GetCheck() != 0 && !m_resetStickyCheck.GetCheck();
00275
00276     m_dateCombo.EnableWindow(enable);
00277 }

void CUpdateOptions::OnDelsticky ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 300 of file UpdateDlg.cpp.

References m_browseTagButton, m_dateCombo, m_hasDateCheck, m_hasRevCheck, m_keywordCombo, m_keywordDescStatic, m_matchCheck, m_resetStickyCheck, m_revCombo, OnDate(), and OnRev().

Referenced by DoDataExchange().

00301 {
00302     const BOOL enable = !m_resetStickyCheck.GetCheck();
00303
00304     m_hasDateCheck.EnableWindow(enable);
00305     m_dateCombo.EnableWindow(enable);
00306     m_hasRevCheck.EnableWindow(enable);
00307     m_revCombo.EnableWindow(enable);
00308     m_browseTagButton.EnableWindow(enable);
00309     m_matchCheck.EnableWindow(enable);
00310     m_keywordCombo.EnableWindow(enable);
00311     m_keywordDescStatic.EnableWindow(enable);
00312
00313     OnDate();
00314     OnRev();
00315 }

Here is the call graph for this function:

BOOL CUpdateOptions::OnInitDialog ( ) [protected, virtual]

OnInitDialog virtual override, initialize the controls.

Reimplemented from CHHelpPropertyPage.

Definition at line 244 of file UpdateDlg.cpp.

References CHHelpPropertyPage::OnInitDialog().

00245 {
00246     CHHelpPropertyPage::OnInitDialog();
00247
00248     // Extra initialization
00249     m_keywordCombo.SetDescriptionWnd(m_keywordDescStatic.m_hWnd);
00250
00251     return TRUE;  // return TRUE unless you set the focus to a control
00252                   // EXCEPTION: OCX Property Pages should return FALSE
00253 }

Here is the call graph for this function:

void CUpdateOptions::OnRev ( ) [protected]

BN_CLICKED message handler, enable controls.

Definition at line 280 of file UpdateDlg.cpp.

References m_browseTagButton, m_hasRevCheck, m_resetStickyCheck, and m_revCombo.

Referenced by DoDataExchange(), and OnDelsticky().

00281 {
00282     const BOOL enable = m_hasRevCheck.GetCheck() && !m_resetStickyCheck.GetCheck();
00283
00284     m_revCombo.EnableWindow(enable);
00285     m_browseTagButton.EnableWindow(enable);
00286 }

Member Data Documentation

CButton CUpdateOptions::m_browseTagButton

Definition at line 111 of file UpdateDlg.h.

Referenced by DoDataExchange(), OnDelsticky(), and OnRev().

BOOL CUpdateOptions::m_caseSensitiveNames

Definition at line 126 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CString CUpdateOptions::m_date

Definition at line 118 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CSmartComboBox CUpdateOptions::m_dateCombo

Definition at line 117 of file UpdateDlg.h.

Referenced by DoDataExchange(), OnDate(), and OnDelsticky().

BOOL CUpdateOptions::m_hasDate

Definition at line 120 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CButton CUpdateOptions::m_hasDateCheck

Definition at line 113 of file UpdateDlg.h.

Referenced by DoDataExchange(), OnDate(), and OnDelsticky().

BOOL CUpdateOptions::m_hasRev

Definition at line 122 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CButton CUpdateOptions::m_hasRevCheck

Definition at line 112 of file UpdateDlg.h.

Referenced by DoDataExchange(), OnDelsticky(), and OnRev().

CString CUpdateOptions::m_keyword

Definition at line 123 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CKeywordComboBox CUpdateOptions::m_keywordCombo

Definition at line 114 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnDelsticky().

CStatic CUpdateOptions::m_keywordDescStatic

Definition at line 115 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnDelsticky().

BOOL CUpdateOptions::m_lastCheckinTime

Definition at line 127 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

BOOL CUpdateOptions::m_match

Definition at line 121 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CButton CUpdateOptions::m_matchCheck

Definition at line 109 of file UpdateDlg.h.

Referenced by DoDataExchange(), and OnDelsticky().

const MultiFiles* CUpdateOptions::m_mf [private]

Definition at line 151 of file UpdateDlg.h.

Referenced by OnBrowseTag().

BOOL CUpdateOptions::m_resetSticky

Definition at line 124 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

CButton CUpdateOptions::m_resetStickyCheck

Definition at line 110 of file UpdateDlg.h.

Referenced by DoDataExchange(), OnDate(), OnDelsticky(), and OnRev().

CString CUpdateOptions::m_rev

Definition at line 119 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), DoDataExchange(), and OnBrowseTag().

CSmartComboBox CUpdateOptions::m_revCombo

Definition at line 116 of file UpdateDlg.h.

Referenced by DoDataExchange(), OnBrowseTag(), OnDelsticky(), and OnRev().

BOOL CUpdateOptions::m_stdout

Definition at line 125 of file UpdateDlg.h.

Referenced by CompatGetCheckout(), CompatGetUpdate(), and DoDataExchange().

The documentation for this class was generated from the following files:
  • common/UpdateDlg.h
  • common/UpdateDlg.cpp
Generated on Sat Aug 7 22:57:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CustInvertTable Struct Reference

CustInvertTable Struct Reference

Custom menu item. More...

#include <CustomizeMenus.h>

Collaboration diagram for CustInvertTable:

[legend]
List of all members.

Public Attributes

const char * | title
const char * | key
int cmd

Detailed Description

Custom menu item.

Definition at line 36 of file CustomizeMenus.h.

Member Data Documentation

int CustInvertTable::cmd

Command Definition at line 40 of file CustomizeMenus.h.

Referenced by CustMenuCompare(), GetCustomMenu(), CCustomizeMenus::GetIcon(), CCustInvertTable::Initialize(), CCustomizeMenus::OnAdd(), CCustomizeMenus::OnInitDialog(), and CCustomizeMenus::OnRemove().

const char* CustInvertTable::key

Key Definition at line 39 of file CustomizeMenus.h.

Referenced by CCustInvertTable::CCustInvertTable(), CCustInvertTable::Initialize(), IsInInvertList(), and CCustomizeMenus::OnOK().

const char* CustInvertTable::title

Menu title Definition at line 38 of file CustomizeMenus.h.

Referenced by GetCustomMenu(), GetInvString(), and CCustInvertTable::Initialize().

The documentation for this struct was generated from the following file:
  • WinCvs/CustomizeMenus.h
Generated on Sat Aug 7 22:57:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: vector Class Reference

vector Class Reference

Inheritance diagram for vector:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CustomizeMenus.cpp
Generated on Sat Aug 7 22:57:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CView Class Reference

CView Class Reference

Inheritance diagram for CView:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/BrowserBar.h
Generated on Sat Aug 7 22:57:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CViewInfo Struct Reference

CViewInfo Struct Reference

Collaboration diagram for CViewInfo:

[legend]
List of all members.

Public Attributes

TView * view

Member Data Documentation

TView* CViewInfo::view

Definition at line 890 of file UPseudoSupport.cpp.

Referenced by extractInfos().

The documentation for this struct was generated from the following file:
  • rf/support/macapp/UPseudoSupport.cpp
Generated on Sat Aug 7 22:57:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CvsAlert Class Reference

CvsAlert Class Reference

CVS Alert class. More...

#include <CvsAlert.h>

Collaboration diagram for CvsAlert:

[legend]
List of all members.

Public Member Functions

CvsAlert (const kCvsAlertIconType icon, const char *message, const char *messageDetails=NULL, const char *okButtonTitle=_T("OK"), const char *cancelButtonTitle=_T("Cancel"))
virtual | ~CvsAlert ()
virtual kCvsAlertButtonType | ShowAlert (const kCvsAlertButtonType defaultButton=kCvsAlertOKButton)
void | SetAlertTitle (const char *alertTitle)
void | SetButtonTitle (const kCvsAlertButtonType buttonType, const char *buttonTitle)
void | SetHideOption (CPersistentBool *pHideOption)
kCvsAlertIconType | GetIcon () const
std::string | GetMessage () const
std::string | GetMessageDetails () const
std::string | GetAlertTitle () const
std::string | GetButtonTitle (const kCvsAlertButtonType buttonType) const
CPersistentBool * | GetHideOption () const

Private Attributes

kCvsAlertIconType m_icon
std::string | m_message
std::string | m_messageDetails
std::string | m_alertTitle
std::string | m_okButtonTitle
std::string | m_cancelButtonTitle
std::string | m_otherButtonTitle
CPersistentBool * m_pHideOption

Detailed Description

CVS Alert class.

Definition at line 73 of file CvsAlert.h.

Constructor & Destructor Documentation

CvsAlert::CvsAlert | ( | const kCvsAlertIconType | icon,
 |  | const char * | message,
 |  | const char * | messageDetails = NULL,
 |  | const char * | okButtonTitle = _T("OK"),
 |  | const char * | cancelButtonTitle = _T("Cancel")
 | ) |

Definition at line 73 of file CvsAlert.cpp.

References DEFAULT_ALERT_TITLE, kCvsAlertNoteIcon, m_alertTitle, m_cancelButtonTitle, m_icon, m_message, m_messageDetails, m_okButtonTitle, m_pHideOption, and NULL.

00076 {
00077     m_icon = icon;
00078
00079     m_message = message ? message : "";
00080     m_messageDetails = messageDetails ? messageDetails : "";
00081
00082     m_okButtonTitle = okButtonTitle ? okButtonTitle : "";
00083     m_cancelButtonTitle = cancelButtonTitle ? cancelButtonTitle : "";
00084
00085     if( icon == kCvsAlertNoteIcon )
00086     {
00087         // Note needs one button only
00088         m_cancelButtonTitle.erase();
00089     }
00090
00091     m_pHideOption = NULL;
00092
00093     m_alertTitle = DEFAULT_ALERT_TITLE;
00094 }

virtual CvsAlert::~CvsAlert ( ) [inline, virtual]

Definition at line 80 of file CvsAlert.h.

00080 {}

Member Function Documentation

std::string CvsAlert::GetAlertTitle ( ) const

Get the alert title

Returns:
The alert title
Definition at line 301 of file CvsAlert.cpp.

References m_alertTitle.

Referenced by CCVSAlert_MAIN::SetTitle().

00302 {
00303     return m_alertTitle;
00304 }

std::string CvsAlert::GetButtonTitle ( const kCvsAlertButtonType buttonType ) const

Get the alert title

Parameters:
buttonType Button type to get the title for
Returns:
The alert title
Definition at line 311 of file CvsAlert.cpp.

References kCvsAlertCancelButton, kCvsAlertOKButton, kCvsAlertOtherButton, m_cancelButtonTitle, m_okButtonTitle, and m_otherButtonTitle.

Referenced by CCVSAlert_MAIN::SetButtonTitles().

00312 {
00313     switch( buttonType )
00314     {
00315     case kCvsAlertOKButton:
00316         return m_okButtonTitle;
00317     case kCvsAlertCancelButton:
00318         return m_cancelButtonTitle;
00319     case kCvsAlertOtherButton:
00320         return m_otherButtonTitle;
00321     default:
00322 #ifdef WIN32
00323         ASSERT(FALSE); // Incorrect button type
00324 #endif
00325         break;
00326     }
00327
00328     return "";
00329 }

CPersistentBool * CvsAlert::GetHideOption ( ) const

Get the hide option

Returns:
The hide option
Definition at line 335 of file CvsAlert.cpp.

References m_pHideOption.

00336 {
00337     return m_pHideOption;
00338 }

kCvsAlertIconType CvsAlert::GetIcon ( ) const

Get the icon type

Returns:
The icon type
Definition at line 274 of file CvsAlert.cpp.

References kCvsAlertIconType, and m_icon.

Referenced by CCVSAlert_MAIN::SetIcon().

00275 {
00276     return m_icon;
00277 }

std::string CvsAlert::GetMessage ( ) const

Get the message

Returns:
The message
Definition at line 283 of file CvsAlert.cpp.

References m_message.

Referenced by CCVSAlert_MAIN::Resize(), and CCVSAlert_MAIN::SetMessages().

00284 {
00285     return m_message;
00286 }

std::string CvsAlert::GetMessageDetails ( ) const

Get the message details

Returns:
The message details
Definition at line 292 of file CvsAlert.cpp.

References m_messageDetails.

Referenced by CCVSAlert_MAIN::Resize(), and CCVSAlert_MAIN::SetMessages().

00293 {
00294     return m_messageDetails;
00295 }

void CvsAlert::SetAlertTitle ( const char * alertTitle )

Set the alert title

Parameters:
alertTitle Alert title
Definition at line 228 of file CvsAlert.cpp.

References m_alertTitle.

Referenced by cvsgui_PromptMessage().

00229 {
00230     m_alertTitle = alertTitle ? alertTitle : "";
00231 }

void CvsAlert::SetButtonTitle | ( | const kCvsAlertButtonType | buttonType,
 |  | const char * | buttonTitle
 | ) |

Set the button title

Parameters:
buttonType | Button type to set the title for
buttonTitle | Button title
Definition at line 238 of file CvsAlert.cpp.

References kCvsAlertCancelButton, kCvsAlertOKButton, kCvsAlertOtherButton, m_cancelButtonTitle, m_okButtonTitle, and m_otherButtonTitle.

00239 {
00240     if( !buttonTitle )
00241     {
00242         buttonTitle = "";
00243     }
00244
00245     switch( buttonType )
00246     {
00247     case kCvsAlertOKButton:
00248         m_okButtonTitle = buttonTitle;
00249     case kCvsAlertCancelButton:
00250         m_cancelButtonTitle = buttonTitle;
00251     case kCvsAlertOtherButton:
00252         m_otherButtonTitle = buttonTitle;
00253     default:
00254 #ifdef WIN32
00255         ASSERT(FALSE); // Incorrect button type
00256 #endif
00257         break;
00258     }
00259 }

void CvsAlert::SetHideOption ( CPersistentBool * pHideOption )

Set the hide option

Parameters:
pHideOption Hide option
Definition at line 265 of file CvsAlert.cpp.

References m_pHideOption.

00266 {
00267     m_pHideOption = pHideOption;
00268 }

kCvsAlertButtonType CvsAlert::ShowAlert ( const kCvsAlertButtonType defaultButton = kCvsAlertOKButton ) [virtual]

Display an alert with 1-3 buttons and standard icons

Parameters:
defaultButton Default button
Returns:
The ID of the button that was pressed.
Definition at line 101 of file CvsAlert.cpp.

References BUTTONTITLE_CANCEL, BUTTONTITLE_OK, kCvsAlertButtonType, kCvsAlertCancelButton, kCvsAlertNoIcon, kCvsAlertNoteIcon, kCvsAlertOKButton, kCvsAlertOtherButton, kCvsAlertQuestionIcon, kCvsAlertStopIcon, kCvsAlertWarningIcon, m_cancelButtonTitle, m_icon, m_message, m_messageDetails, m_okButtonTitle, m_otherButtonTitle, m_pHideOption, and NULL.

Referenced by AskCreatePersistentSettings(), CompatMakeSurePathExists(), CvsCmdAdd(), CvsCmdMoveToTrash(), cvsgui_PromptMessage(), DDV_CheckCVSROOT(), glue_getenv(), CGraphView::OnGraphSetstate(), CWincvsApp::OnHelpCvs(), UCvsFrame::OnQuit(), CWincvsDoc::OnViewBrowselocationRemoveunwanted(), CGraphView::OnViewDelrev(), and UCvsFolders::ProcessSelectionCommand().

00102 {
00103     if( m_pHideOption && (bool)*m_pHideOption )
00104     {
00105         return kCvsAlertOKButton;
00106     }
00107
00108 #if defined(WIN32) || defined(qUnix)
00109     CCVSAlert_MAIN cvsAlertDlg(this, defaultButton);
00110     return (kCvsAlertButtonType)cvsAlertDlg.DoModal();
00111 #endif /* WIN32 */
00112
00113 #ifdef TARGET_OS_MAC
00114   // make sure user knows we need input
00115     CMacCvsApp::gApp->InteractWithUser();
00116     // and then display a standard alert
00117   AlertStdCFStringAlertParamRec       alertParams;
00118   kCvsAlertButtonType                 result(kCvsAlertCancelButton);
00119   SInt16                              itemHit(kAlertStdAlertCancelButton);
00120   if ( GetStandardAlertDefaultParams(&alertParams, kStdCFStringAlertVersionOne) == noErr )
00121   {
00122       CFStringRef     okButtonTitle(NULL);
00123       CFStringRef     cancelButtonTitle(NULL);
00124       CFStringRef     otherButtonTitle(NULL);
00125       CFStringRef     primaryMessage(m_message.empty() ? NULL : CFStringCreateWithCString(NULL, m_message.c_str(), CFStringGetSystemEncoding()));
00126       CFStringRef     secondaryMessage(m_messageDetails.empty() ? NULL : CFStringCreateWithCString(NULL, m_messageDetails.c_str(), CFStringGetSystemEncoding()));
00127
00128       /* first option for using the title: prefix the message with the title - not quite the real thing...
00129       if ( !m_alertTitle.empty() )
00130       {
00131         CFStringRef   alertTitle(CFStringCreateWithCString(NULL, m_alertTitle.c_str(), CFStringGetSystemEncoding()));
00132         if ( alertTitle )
00133         {
00134           if ( primaryMessage )
00135           {
00136             CFStringRef message(primaryMessage);
00137             primaryMessage = CFStringCreateWithFormat(NULL, NULL, message ? CFSTR("%@:\n%@") : CFSTR("%@:"), alertTitle, message);
00138             if ( message ) CFRelease(message);
00139           }
00140         }
00141       }
00142       */
00143
00144       // set up button title CFStrings
00145       if ( !m_okButtonTitle.empty()  &&  m_okButtonTitle != BUTTONTITLE_OK )
00146         okButtonTitle = CFStringCreateWithCString(NULL, m_okButtonTitle.c_str(), CFStringGetSystemEncoding());
00147       if ( !m_cancelButtonTitle.empty()  &&  m_cancelButtonTitle != BUTTONTITLE_CANCEL )
00148         cancelButtonTitle = CFStringCreateWithCString(NULL, m_cancelButtonTitle.c_str(), CFStringGetSystemEncoding());
00149       if ( !m_otherButtonTitle.empty() )
00150         otherButtonTitle = CFStringCreateWithCString(NULL, m_otherButtonTitle.c_str(), CFStringGetSystemEncoding());
00151
00152       // customize alert params
00153       alertParams.movable = true;
00154       alertParams.defaultText = m_okButtonTitle != BUTTONTITLE_OK ? okButtonTitle : (CFStringRef)kAlertDefaultOKText;
00155       alertParams.cancelText = m_cancelButtonTitle != BUTTONTITLE_CANCEL ? cancelButtonTitle : (CFStringRef)kAlertDefaultCancelText;
00156       alertParams.otherText = otherButtonTitle;
00157       // set button behaviors
00158       switch ( defaultButton )
00159       {
00160         case kCvsAlertOKButton: alertParams.defaultButton = kAlertStdAlertOKButton; break;
00161         case kCvsAlertCancelButton: alertParams.defaultButton = kAlertStdAlertCancelButton; break;
00162         case kCvsAlertOtherButton: alertParams.defaultButton = kAlertStdAlertOtherButton; break;
00163       }
00164       // cancel button can only behave as either cancel _or_ default button
00165       if ( alertParams.cancelText != NULL  &&  defaultButton != kCvsAlertCancelButton )
00166          alertParams.cancelButton = kAlertStdAlertCancelButton;
00167
00168       // translate alert type
00169       AlertType       alertType;
00170       switch ( m_icon )
00171       {
00172         case kCvsAlertStopIcon:
00173           alertType = kAlertStopAlert;
00174           break;
00175         case kCvsAlertNoteIcon:
00176           alertType = kAlertNoteAlert;
00177           break;
00178         case kCvsAlertWarningIcon:
00179         case kCvsAlertQuestionIcon:
00180           alertType = kAlertCautionAlert;
00181           break;
00182         case kCvsAlertNoIcon:
00183         default:
00184           alertType = kAlertPlainAlert;
00185       }
00186
00187       // create and run the alert
00188       DialogRef       alert;
00189       if ( CreateStandardAlert(alertType, primaryMessage, secondaryMessage, &alertParams, &alert) == noErr )
00190       {
00191       /* another option for using the title: actually set the window title - unfortunately, this is against the Apple UI guidelines
00192         if ( !m_alertTitle.empty() )
00193         {
00194           CFStringRef title(CFStringCreateWithCString(NULL, m_alertTitle.c_str(), CFStringGetSystemEncoding()));
00195           if (title ) {
00196             SetWindowTitleWithCFString(GetDialogWindow(alert), title);
00197             CFRelease(title);
00198           }
00199         }
00200       */
00201         RunStandardAlert(alert, _ModalFilterUPP, &itemHit);
00202       }
00203
00204       // clean up strings
00205       if ( okButtonTitle ) CFRelease(okButtonTitle);
00206       if ( cancelButtonTitle ) CFRelease(cancelButtonTitle);
00207       if ( otherButtonTitle ) CFRelease(otherButtonTitle);
00208       if ( primaryMessage ) CFRelease(primaryMessage);
00209       if ( secondaryMessage ) CFRelease(secondaryMessage);
00210   }
00211   // translate button result
00212   switch ( itemHit )
00213   {
00214     case kAlertStdAlertOKButton: return kCvsAlertOKButton;
00215     case kAlertStdAlertCancelButton: return kCvsAlertCancelButton;
00216     default:
00217       return kCvsAlertOtherButton;
00218   }
00219 #endif /* TARGET_OS_MAC */
00220
00221     return defaultButton;
00222 }

Member Data Documentation

std::string CvsAlert::m_alertTitle [private]

Alert title Definition at line 89 of file CvsAlert.h.

Referenced by CvsAlert(), GetAlertTitle(), and SetAlertTitle().

std::string CvsAlert::m_cancelButtonTitle [private]

Cancel button title Definition at line 92 of file CvsAlert.h.

Referenced by CvsAlert(), GetButtonTitle(), SetButtonTitle(), and ShowAlert().

kCvsAlertIconType CvsAlert::m_icon [private]

Icon used to indicate the nature of the alert Definition at line 84 of file CvsAlert.h.

Referenced by CvsAlert(), GetIcon(), and ShowAlert().

std::string CvsAlert::m_message [private]

Main alert message Definition at line 86 of file CvsAlert.h.

Referenced by CvsAlert(), GetMessage(), and ShowAlert().

std::string CvsAlert::m_messageDetails [private]

Details of the alert message Definition at line 87 of file CvsAlert.h.

Referenced by CvsAlert(), GetMessageDetails(), and ShowAlert().

std::string CvsAlert::m_okButtonTitle [private]

OK button title Definition at line 91 of file CvsAlert.h.

Referenced by CvsAlert(), GetButtonTitle(), SetButtonTitle(), and ShowAlert().

std::string CvsAlert::m_otherButtonTitle [private]

Third("other") button title Definition at line 93 of file CvsAlert.h.

Referenced by GetButtonTitle(), SetButtonTitle(), and ShowAlert().

CPersistentBool* CvsAlert::m_pHideOption [private]

Hide option Definition at line 95 of file CvsAlert.h.

Referenced by CvsAlert(), GetHideOption(), SetHideOption(), and ShowAlert().

The documentation for this class was generated from the following files:
  • common/CvsAlert.h
  • common/CvsAlert.cpp
Generated on Sat Aug 7 22:57:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CvsArgs Class Reference

CvsArgs Class Reference

Class to handle cvs arguments, append "cvs" and misc options defined by preferences ("-z9" for example). More...

#include <CvsArgs.h>

Inheritance diagram for CvsArgs:

[legend]
Collaboration diagram for CvsArgs:

[legend]
List of all members.

Public Member Functions

CvsArgs (bool defargs=true)
CvsArgs (char *const *fromargv, int fromargc)
virtual | ~CvsArgs ()
virtual void | add (const char *arg)
virtual void | addfile (const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L)
virtual int | parse (const char *arg)
void | reset (bool defargs=true)
void | print (const char *indirectory=0L)
char *const * | Argv (void) const
Get the arguments list.
int | Argc (void) const
Get the arguments count.

Protected Attributes

char ** | argv
int argc

Detailed Description

Class to handle cvs arguments, append "cvs" and misc options defined by preferences ("-z9" for example).

Definition at line 37 of file CvsArgs.h.

Constructor & Destructor Documentation

CvsArgs::CvsArgs ( bool defargs = true )

Definition at line 124 of file CvsArgs.cpp.

References argc, argv, NULL, and reset().

00125 {
00126     argv = NULL;
00127     argc = 0;
00128
00129     reset(defargs);
00130 }

Here is the call graph for this function:

CvsArgs::CvsArgs | ( | char *const * | fromargv,
 |  | int | fromargc
 | ) |

Definition at line 132 of file CvsArgs.cpp.

References add(), argc, argv, NULL, and reset().

00133 {
00134     argv = NULL;
00135     argc = 0;
00136
00137     reset(false);
00138
00139     for(int i = 0; i < fromargc; i++)
00140     {
00141         add(fromargv[i]);
00142     }
00143 }

Here is the call graph for this function:

CvsArgs::~CvsArgs ( ) [virtual]

Definition at line 145 of file CvsArgs.cpp.

References reset().

00146 {
00147     reset(false);
00148 }

Here is the call graph for this function:

Member Function Documentation

void CvsArgs::add ( const char * arg ) [virtual]

Add argument

Parameters:
arg Argument to be added
Definition at line 270 of file CvsArgs.cpp.

References argc, argv, malloc, mystrdup(), and realloc.

Referenced by addfile(), CvsArgs(), CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdImportModule(), CvsCmdInit(), CvsCmdLock(), CvsCmdLog(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdRelease(), CvsCmdRemove(), CvsCmdRtag(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), cvsgui_RunCvs(), UCvsFiles::EditSel(), UCvsApp::Execute(), LaunchCvsRootCommand(), LaunchDiff(), LaunchExplore(), LaunchItemListCommand(), UCvsFolders::OnCmdExplore(), MacroTraversal::OnFile(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewReload(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), parse(), CBrowseFileView::ResetView(), UCvsFiles::ResetView(), CGraphView::RetrieveSel(), CGraphView::SaveSel(), and tclCvsProc().

00271 {
00272     if( argv == 0L )
00273         argv = (char**)malloc(2 * sizeof(char*));
00274     else
00275         argv = (char**)realloc(argv, (argc + 2) * sizeof(char*));
00276
00277     argv[argc++] = arg != 0L ? mystrdup(arg) : 0L;
00278     argv[argc] = 0L;
00279 }

Here is the call graph for this function:

void CvsArgs::addfile | ( | const char * | arg,
 |  | const char * | dir = 0L,
 |  | const FSSpec * | spec = 0L,
 |  | const char * | currRevision = 0L
 | ) | [virtual]

Add file

Parameters:
arg | File to be added
dir | Directory of the file
spec | UFS Spec
currRevision | Current revision
Returns:
true on success, false otherwise

Reimplemented in ControlCvsArgs, and RemoveCvsArgs.

Definition at line 289 of file CvsArgs.cpp.

References add().

Referenced by MultiFilesEntry::add(), RemoveCvsArgs::addfile(), and ControlCvsArgs::addfile().

00290 {
00291     add(arg);
00292 }

Here is the call graph for this function:

int CvsArgs::Argc ( void ) const

Get the arguments count.

Definition at line 344 of file CvsArgs.cpp.

References argc.

Referenced by CvsCmdAdd(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdImportModule(), CvsCmdInit(), CvsCmdLock(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdRelease(), CvsCmdRemove(), CvsCmdRtag(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), cvsgui_RunCvs(), UCvsFiles::EditSel(), UCvsApp::Execute(), launchCVS(), LaunchCvsRootCommand(), LaunchDiff(), LaunchExplore(), LaunchItemListCommand(), UCvsFolders::OnCmdExplore(), MacroTraversal::OnFile(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), CBrowseFileView::ResetView(), UCvsFiles::ResetView(), CGraphView::SaveSel(), and tclCvsProc().

00345 {
00346     return argc;
00347 }

char *const * CvsArgs::Argv ( void ) const

Get the arguments list.

Definition at line 338 of file CvsArgs.cpp.

References argv.

Referenced by BrowseForFile(), CvsCmdAdd(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdImportModule(), CvsCmdInit(), CvsCmdLock(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdRelease(), CvsCmdRemove(), CvsCmdRtag(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), cvsgui_RunCvs(), UCvsFiles::EditSel(), UCvsApp::Execute(), launchCVS(), LaunchCvsRootCommand(), LaunchDiff(), LaunchExplore(), LaunchItemListCommand(), UCvsFolders::OnCmdExplore(), MacroTraversal::OnFile(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), CBrowseFileView::ResetView(), UCvsFiles::ResetView(), CGraphView::SaveSel(), and tclCvsProc().

00339 {
00340     return argv;
00341 }

int CvsArgs::parse ( const char * arg ) [virtual]

Parse given argument string and add the sub-arguments

Parameters:
arg Argument to be parsed
Returns:
The number of added sub-arguments
Definition at line 299 of file CvsArgs.cpp.

References add().

Referenced by CvsCmdDiff().

00300 {
00301     int res = 0;
00302
00303     stringstream strArg;
00304     strArg << arg;
00305     string token;
00306
00307     do{
00308         strArg >> token;
00309         if( !token.empty() )
00310         {
00311             res++;
00312             add(token.c_str());
00313         }
00314     }while( !strArg.eof() );
00315
00316     return res;
00317 }

Here is the call graph for this function:

void CvsArgs::print ( const char * indirectory = 0L )

Print the command line to the console

Parameters:
indirectory The directory for the command
Definition at line 229 of file CvsArgs.cpp.

References argc, argv, buf, CStr, cvs_out(), cvs_outstr(), expandLF(), MAX_PRINT_ARG, NULL, and reduceString().

Referenced by CvsCmdAdd(), CvsCmdAnnotate(), CvsCmdCancelChanges(), CvsCmdCheckoutModule(), CvsCmdCommandLine(), CvsCmdCommit(), CvsCmdDiff(), CvsCmdEdit(), CvsCmdEditors(), CvsCmdImportModule(), CvsCmdInit(), CvsCmdLock(), CvsCmdLog(), CvsCmdLogin(), CvsCmdLogout(), CvsCmdRelease(), CvsCmdRemove(), CvsCmdRtag(), CvsCmdStatus(), CvsCmdTag(), CvsCmdUnedit(), CvsCmdUnlock(), CvsCmdUpdate(), CvsCmdWatchers(), CvsCmdWatchOff(), CvsCmdWatchOn(), LaunchCvsRootCommand(), LaunchItemListCommand(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetdescription(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDelrev(), CGraphView::OnViewReload(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::OnViewUpdate(), CGraphView::RetrieveSel(), and CGraphView::SaveSel().

00230 {
00231     static CStaticAllocT<char> buf;
00232
00233     for(int i = 0; i < argc; i++)
00234     {
00235         CStr newarg;
00236         newarg = argv[i];
00237         bool hasLF = ::strchr(newarg, '\n') != 0L;
00238         size_t len = newarg.length();
00239
00240         if( len > MAX_PRINT_ARG )
00241             newarg = reduceString(newarg, buf);
00242
00243         if( hasLF )
00244             newarg = expandLF(newarg, buf);
00245
00246         bool hasSpace = ::strchr(newarg, ' ') != 0L;
00247         if( hasSpace )
00248             cvs_out("\"");
00249
00250         cvs_outstr(newarg, newarg.length());
00251
00252         if( hasSpace )
00253             cvs_out("\"");
00254
00255         cvs_out(" ");
00256     }
00257
00258     if( indirectory != NULL && strlen(indirectory) )
00259     {
00260         cvs_out("(in directory %s)", indirectory);
00261     }
00262
00263     cvs_out("\n");
00264 }

Here is the call graph for this function:

void CvsArgs::reset ( bool defargs = true )

Reset the arguments

Parameters:
defargs Add default arguments from preferences
Definition at line 154 of file CvsArgs.cpp.

References CvsPrefs::AlwaysUseCvsroot(), argc, argv, CStr, CVS_CMD, CvsPrefs::EncryptCommunication(), free, gCvsPrefs, malloc, mystrdup(), NULL, CvsPrefs::QuietOption(), CvsPrefs::Z9Option(), and CvsPrefs::ZLevel().

Referenced by CvsArgs(), CBrowseFileView::ResetView(), and ~CvsArgs().

00155 {
00156     if( argv != 0L )
00157     {
00158         for(int i = 0; i < argc; i++)
00159         {
00160             if( argv[i] != 0L )
00161                 free(argv[i]);
00162         }
00163
00164         free(argv);
00165     }
00166
00167     argc = 0;
00168     argv = NULL;
00169
00170     if( defargs )
00171     {
00172         int numargs = 1;
00173
00174         if( gCvsPrefs.Z9Option() )
00175             numargs++;
00176
00177         if( gCvsPrefs.QuietOption() )
00178             numargs++;
00179
00180 #if INTERNAL_AUTHEN
00181         AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00182         bool encrypt = gCvsPrefs.EncryptCommunication() && curModel->HasEncryption();
00183         if( encrypt )
00184             numargs++;
00185 #else
00186         bool encrypt = gCvsPrefs.EncryptCommunication();
00187         if( encrypt )
00188             numargs++;
00189 #endif /* INTERNAL_AUTHEN */
00190
00191         if( gCvsPrefs.AlwaysUseCvsroot() )
00192             numargs += 2;
00193
00194         argv = (char**)malloc(numargs * sizeof(char*));
00195         argv[argc++] = mystrdup(CVS_CMD);
00196
00197 #if INTERNAL_AUTHEN
00198         if( gCvsPrefs.AlwaysUseCvsroot() )
00199         {
00200             argv[argc++] = mystrdup("-d");
00201             CStr root;
00202             const char* ccvsroot = gCvsPrefs;
00203             ccvsroot = Authen::skiptoken(ccvsroot);
00204             root = gAuthen.token();
00205             root << ccvsroot;
00206             argv[argc++] = mystrdup(root);
00207         }
00208 #endif /* INTERNAL_AUTHEN */
00209
00210         if( gCvsPrefs.Z9Option() )
00211         {
00212             CStr zlev("-z");
00213             zlev << gCvsPrefs.ZLevel();
00214             argv[argc++] = mystrdup(zlev);
00215         }
00216
00217         if( gCvsPrefs.QuietOption() )
00218             argv[argc++] = mystrdup("-q");
00219
00220         if( encrypt )
00221             argv[argc++] = mystrdup("-x");
00222     }
00223 }

Here is the call graph for this function:

Member Data Documentation

int CvsArgs::argc [protected]

Arguments count Definition at line 61 of file CvsArgs.h.

Referenced by add(), Argc(), CvsArgs(), print(), and reset().

char** CvsArgs::argv [protected]

Arguments list Definition at line 60 of file CvsArgs.h.

Referenced by add(), Argv(), CvsArgs(), print(), and reset().

The documentation for this class was generated from the following files:
  • common/CvsArgs.h
  • common/CvsArgs.cpp
Generated on Sat Aug 7 22:57:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CvsPrefs Class Reference

CvsPrefs Class Reference

#include <CvsPrefs.h>

Collaboration diagram for CvsPrefs:

[legend]
List of all members.

Public Member Functions

CvsPrefs ()
~CvsPrefs ()
bool | CheckoutRO (void) const
bool | Z9Option (void) const
bool | PruneOption (void) const
bool | QuietOption (void) const
ISO8559 | IsoConvert (void) const
bool | ICTextOption (void) const
bool | AddControl (void) const
MACENCODING | MacBinEncoding (void) const
bool | MacBinEncodeBinariesOnly (void) const
int | KserverPort (void) const
int | PserverPort (void) const
int | RhostPort (void) const
const char * | ServerName (void) const
const char * | RshName (void) const
bool | EncryptCommunication (void) const
const char * | ConsoleFont (void) const
const char * | Home (void) const
const char * | Viewer (void) const
const char * | ExtDiff (void) const
const char * | Helper (void) const
const char * | Browser (void) const
int | LogoutTimeOut (void) const
bool | AlwaysUseCvsroot (void) const
bool | UseProxy (void) const
const char * | ProxyHost (void) const
int | ProxyPort (void) const
bool | UnixLF (void) const
bool | MacLF (void) const
int | ZLevel (void) const
int | CvsVersion (void) const
bool | CvsConsole (void) const
int | WordWrapLogMsg (void) const
const char * | LastWorkingDir (void) const
bool | UseKeyChain (void) const
bool | MatchEntriesCase (void) const
bool | HideCommandDlgUpdate (void) const
bool | HideCommandDlgDiff (void) const
bool | HideCommandDlgLog (void) const
bool | HideCommandDlgGraph (void) const
bool | HideCommandDlgAnnotate (void) const
bool | HideCommandDlgStatus (void) const
bool | HideCommandDlgFileAction (void) const
bool | HideCommandDlgUseShift (void) const
bool | CtrlPressedOnOK (void) const
SHELL_KIND | GetUseShell (void) const
const char * | getConsoleFont (void) const
bool | DisableSplashScreen (void) const
STATUSOUTPUT_TYPE | StatusOutputType (void) const
FILEACTION_TYPE | FileActionType (void) const
bool | UpdateCaseSensitiveNames () const
bool | UpdateLastCheckinTime () const
bool | UpdateThreeWayConflicts () const
const char * | SettingsFolder (void) const
const char * | TclLibrary (void) const
const char * | PythonLibrary (void) const
void | SetCheckoutRO (bool newState)
void | SetZ9Option (bool newState)
void | SetPruneOption (bool newState)
void | SetQuietOption (bool newState)
void | SetIsoConvert (ISO8559 newState)
void | SetICTextOption (bool newState)
void | SetAddControl (bool newState)
void | SetMacBinEncodeBinariesOnly (bool newState)
void | SetMacBinEncoding (MACENCODING newState)
void | SetKserverPort (int newState)
void | SetPserverPort (int newState)
void | SetRhostPort (int newState)
void | SetServerName (const char *newservername)
void | SetRshName (const char *newrshname)
void | SetEncryptCommunication (bool newState)
void | SetHome (const char *newhome)
void | SetConsoleFont (const char *newFont)
void | SetViewer (const char *newviewer)
void | SetExtDiff (const char *newdiff)
void | SetHelper (const char *newhelper)
void | SetBrowser (const char *newbrowser)
void | SetLogoutTimeOut (int newTimeout)
void | SetAlwaysUseCvsroot (bool newState)
void | SetUseProxy (bool useit)
void | SetProxyHost (const char *newhost)
void | SetProxyPort (int newport)
void | SetUnixLF (bool useit)
void | SetMacLF (bool useit)
void | SetZLevel (int level)
void | SetCvsVersion (int version)
void | SetCvsConsole (bool console)
void | SetWordWrapLogMsg (int wordwrap)
void | SetLastWorkingDir (const char *workdir)
void | SetMatchEntriesCase (bool newState)
void | SetHideCommandDlgUpdate (bool newState)
void | SetHideCommandDlgDiff (bool newState)
void | SetHideCommandDlgLog (bool newState)
void | SetHideCommandDlgGraph (bool newState)
void | SetHideCommandDlgAnnotate (bool newState)
void | SetHideCommandDlgStatus (bool newState)
void | SetHideCommandDlgFileAction (bool newState)
void | SetHideCommandDlgUseShift (bool newState)
void | SetCtrlPressedOnOK (bool newState)
void | SetUseShell (SHELL_KIND shell)
void | SetDisableSplashScreen (bool newState)
void | SetStatusOutputType (STATUSOUTPUT_TYPE outputType)
void | SetFileActionType (FILEACTION_TYPE fileActionType)
void | SetUpdateCaseSensitiveNames (bool newState)
void | SetUpdateLastCheckinTime (bool newState)
void | SetUpdateThreeWayConflicts (bool newState)
void | SetSettingsFolder (const char *settingsFolder)
void | SetTclLibrary (const char *tclLibrary)
void | SetPythonLibrary (const char *pythonLibrary)
kWinVersion WhichVersion ()
bool | UseAltCvs (void) const
void | SetUseAltCvs (bool useIt)
const char * | WhichCvs (UStr &path, bool userOnly=false) const
void | SetWhichCvs (const char *cvsPath)
SHOWCVS_TYPE | ShowCvs (void) const
void | SetShowCvs (SHOWCVS_TYPE showCvs)
bool | HasLoogedIn (void) const
void | SetHasLoogedIn (bool newstate)
bool | IsCvsRunning (void) const
int | SetCvsRunning (bool launched)
bool | IsTclFileRunning (void) const
int | SetTclFileRunning (bool launched)
void | save (bool quiet=false)
void | load (void)
bool NeedCvsrootMigration ()

Protected Attributes

bool fHasLoggedIn
int fCvsRunningCounter
int fTclFileRunningCounter

Constructor & Destructor Documentation

CvsPrefs::CvsPrefs ( ) [inline]

Definition at line 130 of file CvsPrefs.h.

References fCvsRunningCounter, fHasLoggedIn, and fTclFileRunningCounter.

00130                       : fHasLoggedIn(false),
00131         fCvsRunningCounter(0), fTclFileRunningCounter(0) {}

CvsPrefs::~CvsPrefs ( ) [inline]

Definition at line 132 of file CvsPrefs.h.

00132 {}

Member Function Documentation

bool CvsPrefs::AddControl ( void ) const

Definition at line 198 of file CvsPrefs.cpp.

References gAddBinControl.

Referenced by ControlCvsArgs::addfile(), and CGetPrefs_GLOBALS::CGetPrefs_GLOBALS().

00198 {return gAddBinControl;}

bool CvsPrefs::AlwaysUseCvsroot ( void ) const

Definition at line 255 of file CvsPrefs.cpp.

References gAlwaysUseCvsroot.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), and CvsArgs::reset().

00255 {return gAlwaysUseCvsroot;}

const char * CvsPrefs::Browser ( void ) const

Definition at line 251 of file CvsPrefs.cpp.

References UStr::empty(), and gBrowser.

Referenced by LaunchExplore(), UCvsFolders::OnCmdExplore(), and UCvsFiles::OnCmdExplore().

00251 {return gBrowser.empty() ? 0L : (const char*)gBrowser;}

Here is the call graph for this function:

bool CvsPrefs::CheckoutRO ( void ) const

Definition at line 192 of file CvsPrefs.cpp.

References gCheckoutRO.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), and glue_getenv().

00192 {return gCheckoutRO;}

const char* CvsPrefs::ConsoleFont ( void ) const

Referenced by UCvsConsole::OnCreate().

bool CvsPrefs::CtrlPressedOnOK ( void ) const

Definition at line 295 of file CvsPrefs.cpp.

References gCtrlPressedOnOK.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), and CMultilineEntryDlg::OnInitDialog().

00295 {return gCtrlPressedOnOK;}

bool CvsPrefs::CvsConsole ( void ) const

Definition at line 263 of file CvsPrefs.cpp.

References gCvsConsole.

Referenced by CGetPrefs_CVS::CGetPrefs_CVS(), and launchCVS().

00263 {return gCvsConsole;}

int CvsPrefs::CvsVersion ( void ) const

Definition at line 262 of file CvsPrefs.cpp.

References gCvsVersion.

Referenced by UCvsFolders::OnCmdUIResEdit(), and UCvsFiles::OnCmdUIResEdit().

00262 {return gCvsVersion;}

bool CvsPrefs::DisableSplashScreen ( void ) const

Definition at line 266 of file CvsPrefs.cpp.

References gDisableSplashScreen.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), and CWincvsApp::InitInstance().

00266 {return gDisableSplashScreen;}

bool CvsPrefs::EncryptCommunication ( void ) const

Definition at line 212 of file CvsPrefs.cpp.

References gEncryptCommunication.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), and CvsArgs::reset().

00212 {return gEncryptCommunication;}

const char * CvsPrefs::ExtDiff ( void ) const

Definition at line 252 of file CvsPrefs.cpp.

References UStr::empty(), and gExtdiff.

Referenced by CGetPrefs_WINCVS::CGetPrefs_WINCVS(), CompatGetDiff(), and LaunchDiff().

00252 {return gExtdiff.empty() ? 0L : (const char*)gExtdiff;}

Here is the call graph for this function:

FILEACTION_TYPE CvsPrefs::FileActionType ( void ) const

Definition at line 269 of file CvsPrefs.cpp.

References FILEACTION_TYPE, and gFileActionType.

Referenced by CompatGetFileAction().

00269 {return (FILEACTION_TYPE)(int)gFileActionType;}

const char* CvsPrefs::getConsoleFont ( void ) const

SHELL_KIND CvsPrefs::GetUseShell ( void ) const

Definition at line 265 of file CvsPrefs.cpp.

References gUseShell, and SHELL_KIND.

Referenced by CWincvsView::OnKeyDown(), CWincvsDoc::OnUpdateUsePyshell(), CWincvsDoc::OnUpdateUseTclshell(), CWincvsApp::StartScriptEngine(), and UCvsApp::StartScriptEngine().

00265 {return (SHELL_KIND)(int)gUseShell;}

bool CvsPrefs::HasLoogedIn ( void ) const [inline]

Definition at line 295 of file CvsPrefs.h.

References fHasLoggedIn.

Referenced by CvsCmdLogin(), CLogoutThread::InitInstance(), and CWincvsApp::SaveAllModified().

00295 { return fHasLoggedIn; }

const char * CvsPrefs::Helper ( void ) const

Definition at line 250 of file CvsPrefs.cpp.

References UStr::empty(), and gHelper.

00250 {return gHelper.empty() ? 0L : (const char*)gHelper;}

Here is the call graph for this function:

bool CvsPrefs::HideCommandDlgAnnotate ( void ) const

Definition at line 291 of file CvsPrefs.cpp.

References gHideCommandDlgAnnotate.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), and CompatGetAnnotate().

00291 {return gHideCommandDlgAnnotate;}

bool CvsPrefs::HideCommandDlgDiff ( void ) const

Definition at line 288 of file CvsPrefs.cpp.

References gHideCommandDlgDiff.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), and CompatGetDiff().

00288 {return gHideCommandDlgDiff;}

bool CvsPrefs::HideCommandDlgFileAction ( void ) const

Definition at line 293 of file CvsPrefs.cpp.

References gHideCommandDlgFileAction.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), and CompatGetFileAction().

00293 {return gHideCommandDlgFileAction;}

bool CvsPrefs::HideCommandDlgGraph ( void ) const

Definition at line 290 of file CvsPrefs.cpp.

References gHideCommandDlgGraph.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), and CompatGetLog().

00290 {return gHideCommandDlgGraph;}

bool CvsPrefs::HideCommandDlgLog ( void ) const

Definition at line 289 of file CvsPrefs.cpp.

References gHideCommandDlgLog.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), and CompatGetLog().

00289 {return gHideCommandDlgLog;}

bool CvsPrefs::HideCommandDlgStatus ( void ) const

Definition at line 292 of file CvsPrefs.cpp.

References gHideCommandDlgStatus.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), and CompatGetStatus().

00292 {return gHideCommandDlgStatus;}

bool CvsPrefs::HideCommandDlgUpdate ( void ) const

Definition at line 287 of file CvsPrefs.cpp.

References gHideCommandDlgUpdate.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), and CompatGetUpdate().

00287 {return gHideCommandDlgUpdate;}

bool CvsPrefs::HideCommandDlgUseShift ( void ) const

Definition at line 294 of file CvsPrefs.cpp.

References gHideCommandDlgUseShift.

Referenced by CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS(), IsHideCommandKeyPressed(), and COptionalPropertySheet::OnInitDialog().

00294 {return gHideCommandDlgUseShift;}

const char * CvsPrefs::Home ( void ) const

Definition at line 214 of file CvsPrefs.cpp.

References CStr, UStr::empty(), getenv, gHome, and UStr::rtrim().

Referenced by BuildIgnoredList(), CGetPrefs_CVS::CGetPrefs_CVS(), UCvsApp::Execute(), FormatDefaultSettingsLoc(), glue_getenv(), CPersistent::LoadAll(), UCvsFolders::OnCreate(), and CPersistent::SaveAll().

00215 {
00216 #if !qUnix && !TARGET_RT_MAC_MACHO
00217 #   ifdef WIN32
00218     // Windows 98 doesn't like C:\/.cvspass
00219     gHome.rtrim (kPathDelimiter);
00220 #   endif
00221     return gHome.empty() ? 0L : (const char*)gHome;
00222 #else /* qUnix || TARGET_RT_MAC_MACHO */
00223     static CStr home;
00224     if (!home.empty())
00225         return home;
00226
00227     char *env = getenv ("HOME");
00228     struct passwd *pw;
00229     if (env)
00230         home = env;
00231     else if ((pw = (struct passwd *) getpwuid (getuid ()))
00232              && pw->pw_dir)
00233         home = pw->pw_dir;
00234     else
00235         return 0L;
00236
00237     return home;
00238 #endif /* qUnix ||ÊTARGET_RT_MAC_MACHO */
00239 }

Here is the call graph for this function:

bool CvsPrefs::ICTextOption ( void ) const

Definition at line 197 of file CvsPrefs.cpp.

References gICTextOption.

Referenced by glue_getenv().

00197 {return gICTextOption;}

bool CvsPrefs::IsCvsRunning ( void ) const

Definition at line 713 of file CvsPrefs.cpp.

References fCvsRunningCounter.

00714 {
00715     return(fCvsRunningCounter > 0);
00716 }

ISO8559 CvsPrefs::IsoConvert ( void ) const

Definition at line 196 of file CvsPrefs.cpp.

References gIsoConvert, and ISO8559.

Referenced by ControlCvsArgs::addfile(), and glue_getenv().

00196 {return (ISO8559)(int)gIsoConvert;}

bool CvsPrefs::IsTclFileRunning ( void ) const

Definition at line 728 of file CvsPrefs.cpp.

References fTclFileRunningCounter.

Referenced by CCvsStatusBar::DrawItem(), glue_exit(), and CCvsStatusBar::OnTimer().

00729 {
00730     return(fTclFileRunningCounter > 0);
00731 }

int CvsPrefs::KserverPort ( void ) const

Definition at line 201 of file CvsPrefs.cpp.

References gKserverPort.

00201 {return gKserverPort;}

const char * CvsPrefs::LastWorkingDir ( void ) const

Definition at line 282 of file CvsPrefs.cpp.

References UStr::empty(), and gLastWorkingDir.

Referenced by CWincvsApp::InitInstance().

00283 {
00284     return gLastWorkingDir.empty() ? 0L : (const char*)gLastWorkingDir;
00285 }

Here is the call graph for this function:

void CvsPrefs::load ( void )

Definition at line 425 of file CvsPrefs.cpp.

References gOldCvsroots, TMString< T >::Insert(), CPersistent::LoadAll(), MigrateCvsrootList(), NeedCvsrootMigration(), NUM_CVSROOT, PROFILE_NAME, SetAddControl(), SetCheckoutRO(), SetPruneOption(), SetQuietOption(), and SetZ9Option().

Referenced by CWincvsApp::InitInstance(), and UCvsApp::UCvsApp().

00426 {
00427     bool loaded = CPersistent::LoadAll();
00428
00429     if( loaded )
00430     {
00431         if( NeedCvsrootMigration() )
00432         {
00433             MigrateCvsrootList();
00434         }
00435
00436         return;
00437     }
00438
00439     // backward compatibility
00440 #ifdef WIN32
00441     UINT value;
00442
00443     CString cstr;
00444 #if INTERNAL_AUTHEN
00445     cstr = AfxGetApp()->GetProfileString(PROFILE_NAME, "CVSROOT");
00446     if(!cstr.IsEmpty())
00447         *this = (const char*)cstr;
00448 #endif /* INTERNAL_AUTHEN */
00449
00450     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "CheckoutRO", -1)) != -1)
00451         SetCheckoutRO(value ? 1 : 0);
00452     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "Z9Option", -1)) != -1)
00453         SetZ9Option(value ? 1 : 0);
00454     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "QuietOption", -1)) != -1)
00455         SetQuietOption(value ? 1 : 0);
00456     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "PruneOption", -1)) != -1)
00457         SetPruneOption(value ? 1 : 0);
00458
00459 #if INTERNAL_AUTHEN
00460     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "Authentication", -1)) != -1)
00461         gAuthen.setkind((AuthenKind)value);
00462 #endif /* INTERNAL_AUTHEN */
00463
00464     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "AddControl", -1)) != -1)
00465         SetAddControl(value ? 1 : 0);
00466
00467     char tmp[20];
00468     for(int i = 0; i < NUM_CVSROOT; i++)
00469     {
00470         sprintf(tmp, "CVSROOTLIST%d", i);
00471         cstr = AfxGetApp()->GetProfileString(PROFILE_NAME, tmp);
00472         if(!cstr.IsEmpty())
00473             gOldCvsroots.Insert((const char*)cstr);
00474     }
00475
00476 #endif /* WIN32 */
00477
00478 }

Here is the call graph for this function:

int CvsPrefs::LogoutTimeOut ( void ) const

Definition at line 254 of file CvsPrefs.cpp.

References gLogoutTimeOut.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), CvsCmdLogin(), CLogoutThread::InitInstance(), and CWincvsApp::SaveAllModified().

00254 {return gLogoutTimeOut;}

bool CvsPrefs::MacBinEncodeBinariesOnly ( void ) const

Definition at line 199 of file CvsPrefs.cpp.

References gMacBinEncodeOnlyBinaryFiles.

Referenced by glue_getenv().

00199 {return gMacBinEncodeOnlyBinaryFiles;}

MACENCODING CvsPrefs::MacBinEncoding ( void ) const

Definition at line 200 of file CvsPrefs.cpp.

References gMacBinEncoding, and MACENCODING.

Referenced by glue_getenv().

00200 {return (MACENCODING)(int)gMacBinEncoding;}

bool CvsPrefs::MacLF ( void ) const

Definition at line 260 of file CvsPrefs.cpp.

References gMacLF.

Referenced by glue_getenv().

00260 {return gMacLF;}

bool CvsPrefs::MatchEntriesCase ( void ) const

Definition at line 204 of file CvsPrefs.cpp.

References gMatchEntriesCase.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), EntnodeData::Compare(), and CGetPrefs_GLOBALS::StoreValues().

00204 {return gMatchEntriesCase;}

bool CvsPrefs::NeedCvsrootMigration ( )

Check whether there is a need for the cvsroot history migration

Returns:
true if migration needed, false otherwise
Note:
Implementation is platform-specific
Definition at line 485 of file CvsPrefs.cpp.

References gPersistentShema, SCHEMA_0, and SCHEMA_1.

Referenced by load().

00486 {
00487     bool res = false;
00488
00489 #ifdef WIN32
00490     if( SCHEMA_0 == gPersistentShema )
00491     {
00492         res = true;
00493     }
00494 #endif /* WIN32 */
00495
00496 #if qUnix
00497     if( SCHEMA_0 == gPersistentShema || SCHEMA_1 == gPersistentShema )
00498     {
00499         res = true;
00500     }
00501 #endif // qUnix
00502
00503 #if qMacCvsPP
00504 #endif // qMacCvsPP
00505
00506     return res;
00507 }

const char * CvsPrefs::ProxyHost ( void ) const

Definition at line 256 of file CvsPrefs.cpp.

References gProxyHost.

00256 {return gProxyHost;}

int CvsPrefs::ProxyPort ( void ) const

Definition at line 257 of file CvsPrefs.cpp.

References gProxyPort.

00257 {return gProxyPort;}

bool CvsPrefs::PruneOption ( void ) const

Definition at line 194 of file CvsPrefs.cpp.

References gPruneOption.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), CvsCmdCheckoutModule(), and CvsCmdUpdate().

00194 {return gPruneOption;}

int CvsPrefs::PserverPort ( void ) const

Definition at line 202 of file CvsPrefs.cpp.

References gPserverPort.

00202 {return gPserverPort;}

const char * CvsPrefs::PythonLibrary ( void ) const

Definition at line 277 of file CvsPrefs.cpp.

References UStr::empty(), and gPythonLibrary.

Referenced by CGetPrefs_WINCVS::CGetPrefs_WINCVS(), CPython_Interp::IsAvail(), and CGetPrefs_WINCVS::StoreValues().

00277 {return gPythonLibrary.empty() ? 0L : (const char*)gPythonLibrary;};

Here is the call graph for this function:

bool CvsPrefs::QuietOption ( void ) const

Definition at line 195 of file CvsPrefs.cpp.

References gQuietOption.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), and CvsArgs::reset().

00195 {return gQuietOption;}

int CvsPrefs::RhostPort ( void ) const

Definition at line 203 of file CvsPrefs.cpp.

References gRhostPort.

00203 {return gRhostPort;}

const char * CvsPrefs::RshName ( void ) const

Definition at line 211 of file CvsPrefs.cpp.

References UStr::empty(), and gRshName.

00211 {return gRshName.empty() ? 0L : (const char*)gRshName;}

Here is the call graph for this function:

void CvsPrefs::save ( bool quiet = false )

Definition at line 387 of file CvsPrefs.cpp.

References UCvsApp::GetBrowserView(), UCvsFolders::GetRoot(), gOldLoc, gPersistentShema, CPersistent::NeedSave(), CPersistent::SaveAll(), SavePersistentSettings(), and SCHEMA_CURRENT.

Referenced by CompatGetAnnotate(), CompatGetCheckout(), CompatGetCommand(), CompatGetCommit(), CompatGetDiff(), CompatGetFileAction(), CompatGetImport(), CompatGetInit(), CompatGetLog(), CompatGetLogin(), CompatGetPrefs(), CompatGetRtag(), CompatGetStatus(), CompatGetTag(), CompatGetUpdate(), CustomizeMenus(), glue_getenv(), CMainFrame::OnClose(), CWincvsView::OnMyFormatFont(), UCvsFrame::OnQuit(), and PyPersistent::SetValue().

00388 {
00389 #if INTERNAL_AUTHEN
00390     if( empty() )
00391         return;
00392 #endif /* INTERNAL_AUTHEN */
00393
00394     if( SCHEMA_CURRENT != gPersistentShema )
00395     {
00396         gPersistentShema = SCHEMA_CURRENT;
00397     }
00398
00399     bool needSave = CPersistent::NeedSave();
00400     bool needSaveSettings = CPersistent::NeedSave(true);
00401     if( !needSave )
00402         return;
00403
00404     CPersistent::SaveAll();
00405
00406     if( !needSaveSettings )
00407         return;
00408
00409 #ifdef WIN32
00410     {
00411         extern PCPStr gOldLoc;
00412         SavePersistentSettings(gOldLoc, quiet);
00413     }
00414 #endif
00415 #ifdef qMacCvsPP
00416     CMacCvsApp::SavePersistentSettings(quiet);
00417 #endif /* qMacCvsPP */
00418 #if qUnix
00419     UCvsFolders *browser = UCvsApp::gApp->GetBrowserView();
00420     if(browser != 0L && browser->GetRoot() != 0L)
00421         SavePersistentSettings(browser->GetRoot(), quiet);
00422 #endif
00423 }

Here is the call graph for this function:

const char * CvsPrefs::ServerName ( void ) const

Definition at line 210 of file CvsPrefs.cpp.

References UPStr::empty(), and gServerName.

00210 {return gServerName.empty() ? 0L : (const char*)gServerName;}

Here is the call graph for this function:

void CvsPrefs::SetAddControl ( bool newState )

Definition at line 303 of file CvsPrefs.cpp.

References gAddBinControl.

Referenced by load(), and CGetPrefs_GLOBALS::StoreValues().

00303 {gAddBinControl = newState;}

void CvsPrefs::SetAlwaysUseCvsroot ( bool newState )

Definition at line 343 of file CvsPrefs.cpp.

References gAlwaysUseCvsroot.

Referenced by CGetPrefs_GLOBALS::StoreValues().

00343 {gAlwaysUseCvsroot = newState;}

void CvsPrefs::SetBrowser ( const char * newbrowser )

Definition at line 338 of file CvsPrefs.cpp.

References gBrowser.

00338 {gBrowser = newviewer;}

void CvsPrefs::SetCheckoutRO ( bool newState )

Definition at line 297 of file CvsPrefs.cpp.

References gCheckoutRO.

Referenced by load(), and CGetPrefs_GLOBALS::StoreValues().

00297 {gCheckoutRO = newState;}

void CvsPrefs::SetConsoleFont ( const char * newFont )

void CvsPrefs::SetCtrlPressedOnOK ( bool newState )

Definition at line 375 of file CvsPrefs.cpp.

References gCtrlPressedOnOK.

Referenced by CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00375 {gCtrlPressedOnOK = newState;}

void CvsPrefs::SetCvsConsole ( bool console )

Definition at line 351 of file CvsPrefs.cpp.

References gCvsConsole.

Referenced by CGetPrefs_CVS::StoreValues().

00351 {gCvsConsole = console;}

int CvsPrefs::SetCvsRunning ( bool launched )

Definition at line 718 of file CvsPrefs.cpp.

References fCvsRunningCounter.

00719 {
00720     if(launched)
00721         fCvsRunningCounter++;
00722     else if(fCvsRunningCounter > 0)
00723         fCvsRunningCounter--;
00724
00725     return fCvsRunningCounter;
00726 }

void CvsPrefs::SetCvsVersion ( int version )

Definition at line 350 of file CvsPrefs.cpp.

References gCvsVersion.

00350 {gCvsVersion = vers;}

void CvsPrefs::SetDisableSplashScreen ( bool newState )

Definition at line 355 of file CvsPrefs.cpp.

References gDisableSplashScreen.

Referenced by CGetPrefs_GLOBALS::StoreValues().

00355 {gDisableSplashScreen = newState;}

void CvsPrefs::SetEncryptCommunication ( bool newState )

Definition at line 311 of file CvsPrefs.cpp.

References gEncryptCommunication.

Referenced by CGetPrefs_GLOBALS::StoreValues().

00311 {gEncryptCommunication = newState;}

void CvsPrefs::SetExtDiff ( const char * newdiff )

Definition at line 340 of file CvsPrefs.cpp.

References gExtdiff.

Referenced by CGetPrefs_WINCVS::StoreValues().

00340 {gExtdiff = newdiff;}

void CvsPrefs::SetFileActionType ( FILEACTION_TYPE fileActionType )

Definition at line 358 of file CvsPrefs.cpp.

References FILEACTION_TYPE, and gFileActionType.

Referenced by CompatGetFileAction().

00358 {gFileActionType = fileActionType;}

void CvsPrefs::SetHasLoogedIn ( bool newstate ) [inline]

Definition at line 296 of file CvsPrefs.h.

References fHasLoggedIn.

Referenced by CvsCmdLogin(), and CvsCmdLogout().

00296 { fHasLoggedIn = newstate; }

void CvsPrefs::SetHelper ( const char * newhelper )

Definition at line 339 of file CvsPrefs.cpp.

References gHelper.

00339 {gHelper = newviewer;}

void CvsPrefs::SetHideCommandDlgAnnotate ( bool newState )

Definition at line 371 of file CvsPrefs.cpp.

References gHideCommandDlgAnnotate.

Referenced by CompatGetAnnotate(), and CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00371 {gHideCommandDlgAnnotate = newState;}

void CvsPrefs::SetHideCommandDlgDiff ( bool newState )

Definition at line 368 of file CvsPrefs.cpp.

References gHideCommandDlgDiff.

Referenced by CompatGetDiff(), and CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00368 {gHideCommandDlgDiff = newState;}

void CvsPrefs::SetHideCommandDlgFileAction ( bool newState )

Definition at line 373 of file CvsPrefs.cpp.

References gHideCommandDlgFileAction.

Referenced by CompatGetFileAction(), and CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00373 {gHideCommandDlgFileAction = newState;}

void CvsPrefs::SetHideCommandDlgGraph ( bool newState )

Definition at line 370 of file CvsPrefs.cpp.

References gHideCommandDlgGraph.

Referenced by CompatGetLog(), and CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00370 {gHideCommandDlgGraph = newState;}

void CvsPrefs::SetHideCommandDlgLog ( bool newState )

Definition at line 369 of file CvsPrefs.cpp.

References gHideCommandDlgLog.

Referenced by CompatGetLog(), and CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00369 {gHideCommandDlgLog = newState;}

void CvsPrefs::SetHideCommandDlgStatus ( bool newState )

Definition at line 372 of file CvsPrefs.cpp.

References gHideCommandDlgStatus.

Referenced by CompatGetStatus(), and CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00372 {gHideCommandDlgStatus = newState;}

void CvsPrefs::SetHideCommandDlgUpdate ( bool newState )

Definition at line 367 of file CvsPrefs.cpp.

References gHideCommandDlgUpdate.

Referenced by CompatGetUpdate(), and CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00367 {gHideCommandDlgUpdate = newState;}

void CvsPrefs::SetHideCommandDlgUseShift ( bool newState )

Definition at line 374 of file CvsPrefs.cpp.

References gHideCommandDlgUseShift.

Referenced by CGetPrefs_CVSCMD_DIALOGS::StoreValues().

00374 {gHideCommandDlgUseShift = newState;}

void CvsPrefs::SetHome ( const char * newhome )

Definition at line 318 of file CvsPrefs.cpp.

References gHome, and UStr::rtrim().

Referenced by glue_getenv(), and CGetPrefs_CVS::StoreValues().

00319 {
00320 #if !qUnix && !TARGET_RT_MAC_MACHO
00321     gHome = newhome;
00322 #   ifdef WIN32
00323     // Windows 98 doesn't like C:\/.cvspass
00324     gHome.rtrim (kPathDelimiter);
00325 #   endif
00326 #endif /* !qUnix && !TARGET_RT_MAC_MACHO */
00327 }

Here is the call graph for this function:

void CvsPrefs::SetICTextOption ( bool newState )

Definition at line 302 of file CvsPrefs.cpp.

References gICTextOption.

00302 {gICTextOption = newState;}

void CvsPrefs::SetIsoConvert ( ISO8559 newState )

Definition at line 301 of file CvsPrefs.cpp.

References gIsoConvert.

00301 {gIsoConvert = (int)newState;}

void CvsPrefs::SetKserverPort ( int newState )

Definition at line 306 of file CvsPrefs.cpp.

References gKserverPort.

00306 {gKserverPort = newState;}

void CvsPrefs::SetLastWorkingDir ( const char * workdir )

Definition at line 353 of file CvsPrefs.cpp.

References gLastWorkingDir.

Referenced by CBrowseFileView::EnterFolder(), CWincvsApp::InitInstance(), and CWinCvsBrowser::NotifySelectionChange().

00353 {gLastWorkingDir = workdir;}

void CvsPrefs::SetLogoutTimeOut ( int newTimeout )

Definition at line 342 of file CvsPrefs.cpp.

References gLogoutTimeOut.

Referenced by CGetPrefs_GLOBALS::StoreValues().

00342 {gLogoutTimeOut = newTimeout;}

void CvsPrefs::SetMacBinEncodeBinariesOnly ( bool newState )

Definition at line 304 of file CvsPrefs.cpp.

References gMacBinEncodeOnlyBinaryFiles.

00304 {gMacBinEncodeOnlyBinaryFiles = newState;}

void CvsPrefs::SetMacBinEncoding ( MACENCODING newState )

Definition at line 305 of file CvsPrefs.cpp.

References gMacBinEncoding.

00305 {gMacBinEncoding = (int)newState;}

void CvsPrefs::SetMacLF ( bool useit )

Definition at line 346 of file CvsPrefs.cpp.

References gMacLF.

00346 {gMacLF = useit;}

void CvsPrefs::SetMatchEntriesCase ( bool newState )

Definition at line 312 of file CvsPrefs.cpp.

References gMatchEntriesCase.

Referenced by CGetPrefs_GLOBALS::StoreValues().

00312 {gMatchEntriesCase = newState;}

void CvsPrefs::SetProxyHost ( const char * newhost )

Definition at line 348 of file CvsPrefs.cpp.

References gProxyHost.

00348 {gProxyHost = newhost;}

void CvsPrefs::SetProxyPort ( int newport )

Definition at line 349 of file CvsPrefs.cpp.

References gProxyPort.

00349 {gProxyPort = newport;}

void CvsPrefs::SetPruneOption ( bool newState )

Definition at line 299 of file CvsPrefs.cpp.

References gPruneOption.

Referenced by load(), and CGetPrefs_GLOBALS::StoreValues().

00299 {gPruneOption = newState;}

void CvsPrefs::SetPserverPort ( int newState )

Definition at line 307 of file CvsPrefs.cpp.

References gPserverPort.

00307 {gPserverPort = newState;}

void CvsPrefs::SetPythonLibrary ( const char * pythonLibrary )

Definition at line 365 of file CvsPrefs.cpp.

References gPythonLibrary.

Referenced by CGetPrefs_WINCVS::StoreValues().

00365 {gPythonLibrary = pythonLibrary;}

void CvsPrefs::SetQuietOption ( bool newState )

Definition at line 300 of file CvsPrefs.cpp.

References gQuietOption.

Referenced by load(), and CGetPrefs_GLOBALS::StoreValues().

00300 {gQuietOption = newState;}

void CvsPrefs::SetRhostPort ( int newState )

Definition at line 308 of file CvsPrefs.cpp.

References gRhostPort.

00308 {gRhostPort = newState;}

void CvsPrefs::SetRshName ( const char * newrshname )

Definition at line 310 of file CvsPrefs.cpp.

References gRshName.

00310 {gRshName = newrshname;}

void CvsPrefs::SetServerName ( const char * newservername )

Definition at line 309 of file CvsPrefs.cpp.

References gServerName.

00309 {gServerName = newservername;}

void CvsPrefs::SetSettingsFolder ( const char * settingsFolder )

Definition at line 363 of file CvsPrefs.cpp.

References gSettingsFolder.

Referenced by CGetPrefs_WINCVS::StoreValues().

00363 {gSettingsFolder = settingsFolder;}

void CvsPrefs::SetShowCvs ( SHOWCVS_TYPE showCvs )

Definition at line 860 of file CvsPrefs.cpp.

References gShowCvs.

Referenced by CGetPrefs_CVS::StoreValues().

00861 {
00862     gShowCvs = showCvs;
00863 }

void CvsPrefs::SetStatusOutputType ( STATUSOUTPUT_TYPE outputType )

Definition at line 357 of file CvsPrefs.cpp.

References gStatusOutputType.

Referenced by CompatGetStatus().

00357 {gStatusOutputType = outputType;}

int CvsPrefs::SetTclFileRunning ( bool launched )

Definition at line 733 of file CvsPrefs.cpp.

References fTclFileRunningCounter.

Referenced by CPython_Interp::CPython_Interp(), CTcl_Interp::DoScript(), and CPython_Interp::~CPython_Interp().

00734 {
00735     if(launched)
00736         fTclFileRunningCounter++;
00737     else if(fTclFileRunningCounter > 0)
00738         fTclFileRunningCounter--;
00739
00740     return fTclFileRunningCounter;
00741 }

void CvsPrefs::SetTclLibrary ( const char * tclLibrary )

Definition at line 364 of file CvsPrefs.cpp.

References gTclLibrary.

Referenced by CGetPrefs_WINCVS::StoreValues().

00364 {gTclLibrary = tclLibrary;}

const char * CvsPrefs::SettingsFolder ( void ) const

Definition at line 275 of file CvsPrefs.cpp.

References UStr::empty(), and gSettingsFolder.

Referenced by CGetPrefs_WINCVS::CGetPrefs_WINCVS(), and SettingsGetLoc().

00275 {return gSettingsFolder.empty() ? 0L : (const char*)gSettingsFolder;};

Here is the call graph for this function:

void CvsPrefs::SetUnixLF ( bool useit )

Definition at line 345 of file CvsPrefs.cpp.

References gUnixLF.

Referenced by CGetPrefs_GLOBALS::StoreValues().

00345 {gUnixLF = useit;}

void CvsPrefs::SetUpdateCaseSensitiveNames ( bool newState )

Definition at line 359 of file CvsPrefs.cpp.

References gUpdateCaseSensitiveNames.

Referenced by CompatGetCheckout(), and CompatGetUpdate().

00359 {gUpdateCaseSensitiveNames = newState;}

void CvsPrefs::SetUpdateLastCheckinTime ( bool newState )

Definition at line 360 of file CvsPrefs.cpp.

References gUpdateLastCheckinTime.

Referenced by CompatGetCheckout(), and CompatGetUpdate().

00360 {gUpdateLastCheckinTime = newState;}

void CvsPrefs::SetUpdateThreeWayConflicts ( bool newState )

Definition at line 361 of file CvsPrefs.cpp.

References gUpdateThreeWayConflicts.

Referenced by CompatGetCheckout(), and CompatGetUpdate().

00361 {gUpdateThreeWayConflicts = newState;}

void CvsPrefs::SetUseAltCvs ( bool useIt )

Definition at line 748 of file CvsPrefs.cpp.

References gUseAltCvs.

00749 {
00750     gUseAltCvs = useit;
00751 }

void CvsPrefs::SetUseProxy ( bool useit )

Definition at line 344 of file CvsPrefs.cpp.

References gUseProxy.

00344 {gUseProxy = useit;}

void CvsPrefs::SetUseShell ( SHELL_KIND shell )

Definition at line 354 of file CvsPrefs.cpp.

References gUseShell.

Referenced by CWincvsDoc::OnUsePyshell(), CWincvsDoc::OnUseTclshell(), CWincvsApp::StartScriptEngine(), and UCvsApp::StartScriptEngine().

00354 {gUseShell = shell;}

void CvsPrefs::SetViewer ( const char * newviewer )

Definition at line 337 of file CvsPrefs.cpp.

References gViewer.

Referenced by CGetPrefs_WINCVS::StoreValues().

00337 {gViewer = newviewer;}

void CvsPrefs::SetWhichCvs ( const char * cvsPath )

Definition at line 753 of file CvsPrefs.cpp.

References TKeyString< delimiter >::Concatenate(), UStr::empty(), CWincvsApp::GetAppModule(), gWhichCvs, and TMString< T >::Insert().

Referenced by CGetPrefs_CVS::StoreValues().

00754 {
00755     UStr appPath;
00756
00757 #ifdef WIN32
00758     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00759     pApp->GetAppModule(appPath);
00760
00761     CString strAppPath(appPath);
00762     strAppPath.MakeLower();
00763     appPath = strAppPath;
00764 #elif qUnix
00765     appPath << EXECLIB << "/" << "cvs";
00766 #elif TARGET_RT_MAC_MACHO
00767     appPath = CMacCvsApp::gApp->GetAppPath();
00768 #endif
00769
00770     if( !appPath.empty() )
00771     {
00772         UStr value;
00773         gWhichCvs.Concatenate(value, appPath, cvsPath);
00774         gWhichCvs.Insert(value);
00775     }
00776     else
00777     {
00778         gWhichCvs.Insert(cvsPath);
00779     }
00780 }

Here is the call graph for this function:

void CvsPrefs::SetWordWrapLogMsg ( int wordwrap )

Definition at line 352 of file CvsPrefs.cpp.

References gWordWrapLogMsg.

Referenced by CMultilineEntryDlg::OnWordwrap().

00352 {gWordWrapLogMsg = wordwrap;}

void CvsPrefs::SetZ9Option ( bool newState )

Definition at line 298 of file CvsPrefs.cpp.

References gZ9Option.

Referenced by load(), and CGetPrefs_GLOBALS::StoreValues().

00298 {gZ9Option = newState;}

void CvsPrefs::SetZLevel ( int level )

Definition at line 347 of file CvsPrefs.cpp.

References gZLevel.

Referenced by CGetPrefs_GLOBALS::StoreValues().

00347 {gZLevel = level;}

SHOWCVS_TYPE CvsPrefs::ShowCvs ( void ) const

Definition at line 855 of file CvsPrefs.cpp.

References gShowCvs, and SHOWCVS_TYPE.

Referenced by CGetPrefs_CVS::CGetPrefs_CVS(), launchCVS(), and CGetPrefs_CVS::OnInitDialog().

00856 {
00857     return (SHOWCVS_TYPE)(int)gShowCvs;
00858 }

STATUSOUTPUT_TYPE CvsPrefs::StatusOutputType ( void ) const

Definition at line 268 of file CvsPrefs.cpp.

References gStatusOutputType, and STATUSOUTPUT_TYPE.

Referenced by CompatGetStatus().

00268 {return (STATUSOUTPUT_TYPE)(int)gStatusOutputType;}

const char * CvsPrefs::TclLibrary ( void ) const

Definition at line 276 of file CvsPrefs.cpp.

References UStr::empty(), and gTclLibrary.

Referenced by CGetPrefs_WINCVS::CGetPrefs_WINCVS(), CTcl_Interp::IsAvail(), and CGetPrefs_WINCVS::StoreValues().

00276 {return gTclLibrary.empty() ? 0L : (const char*)gTclLibrary;};

Here is the call graph for this function:

bool CvsPrefs::UnixLF ( void ) const

Definition at line 259 of file CvsPrefs.cpp.

References gUnixLF.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), glue_getenv(), launchCVS(), CCvsStreamConsole::Open(), and CCvsStreamConsole::SetMode().

00259 {return gUnixLF;}

bool CvsPrefs::UpdateCaseSensitiveNames ( ) const

Definition at line 270 of file CvsPrefs.cpp.

References gUpdateCaseSensitiveNames.

Referenced by CompatGetCheckout(), and CompatGetUpdate().

00270 {return gUpdateCaseSensitiveNames;}

bool CvsPrefs::UpdateLastCheckinTime ( ) const

Definition at line 271 of file CvsPrefs.cpp.

References gUpdateLastCheckinTime.

Referenced by CompatGetCheckout(), and CompatGetUpdate().

00271 {return gUpdateLastCheckinTime;}

bool CvsPrefs::UpdateThreeWayConflicts ( ) const

Definition at line 272 of file CvsPrefs.cpp.

References gUpdateThreeWayConflicts.

Referenced by CompatGetCheckout(), and CompatGetUpdate().

00272 {return gUpdateThreeWayConflicts;}

bool CvsPrefs::UseAltCvs ( void ) const

Definition at line 743 of file CvsPrefs.cpp.

References gUseAltCvs.

Referenced by launchCVS(), and CWincvsApp::OnHelpCvs().

00744 {
00745     return gUseAltCvs;
00746 }

bool CvsPrefs::UseKeyChain ( void ) const

bool CvsPrefs::UseProxy ( void ) const

Definition at line 258 of file CvsPrefs.cpp.

References gUseProxy.

00258 {return gUseProxy;}

const char * CvsPrefs::Viewer ( void ) const

Definition at line 249 of file CvsPrefs.cpp.

References UStr::empty(), and gViewer.

Referenced by CGetPrefs_WINCVS::CGetPrefs_WINCVS(), CompatGetEditorMsg(), UCvsFiles::EditSel(), LaunchDefaultEditor(), and UCvsFiles::OnCmdUIEditseldef().

00249 {return gViewer.empty() ? 0L : (const char*)gViewer;}

Here is the call graph for this function:

const char * CvsPrefs::WhichCvs | ( | UStr & | path,
 |  | bool | userOnly = false
 | ) | const

Definition at line 782 of file CvsPrefs.cpp.

References UStr::c_str(), UStr::clear(), TKeyString< delimiter >::Concatenate(), UStr::empty(), TMString< T >::end(), UStr::endsWith(), TMString< T >::Find(), gCvsPrefs, CWincvsApp::GetAppModule(), CWincvsApp::GetAppPath(), gWhichCvs, kWin32, TKeyString< delimiter >::Split(), stat::st_mode, stat, and WhichVersion().

Referenced by CGetPrefs_CVS::CGetPrefs_CVS(), launchCVS(), and CWincvsApp::OnHelpCvs().

00783 {
00784     path.clear();
00785
00786     UStr appPath;
00787
00788 #ifdef WIN32
00789     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00790     pApp->GetAppModule(appPath);
00791
00792     CString strAppPath(appPath);
00793     strAppPath.MakeLower();
00794     appPath = strAppPath;
00795 #elif qUnix
00796     appPath << EXECLIB << "/" << "cvs";
00797 #elif TARGET_RT_MAC_MACHO
00798     appPath = CMacCvsApp::gApp->GetAppPath();
00799 #endif
00800
00801     // search if beside the default cvs, the user defined one to use
00802     // with this application only.
00803     UStr candidate;
00804     if( !appPath.empty() )
00805     {
00806         UStr value;
00807         gWhichCvs.Concatenate(value, appPath, "");
00808         TMString<UStr>::list_t::const_iterator i = gWhichCvs.Find(value);
00809         if( i != gWhichCvs.end() )
00810         {
00811             UStr key;
00812             gWhichCvs.Split(*i, key, candidate);
00813         }
00814     }
00815
00816     // verify this cvs exe is still there
00817     struct stat sb;
00818     if( !candidate.empty() && stat(candidate, &sb) != -1 && S_ISREG(sb.st_mode) )
00819     {
00820         path = candidate;
00821         return path.c_str();
00822     }
00823
00824     // fallback to the default one.
00825     if( userOnly )
00826         return 0L;
00827
00828 #ifdef WIN32
00829     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00830
00831     app->GetAppPath(path);
00832     if( !path.endsWith(kPathDelimiter) )
00833         path << kPathDelimiter;
00834
00835     path << "cvsnt" << kPathDelimiter;
00836     path << (gCvsPrefs.WhichVersion() == kWin32 ? "cvs95.exe" : "cvs.exe");
00837 #elif qUnix
00838     if( path.empty() )
00839         path = EXECLIB;
00840
00841     if(!path.endsWith(kPathDelimiter))
00842         path << kPathDelimiter;
00843
00844     path << "cvs";
00845 #elif TARGET_RT_MAC_MACHO
00846     path = CMacCvsApp::gApp->GetAppResourcesPath();
00847     if(!path.endsWith(kPathDelimiter))
00848         path << kPathDelimiter;
00849     path << "cvsgui";
00850 #endif
00851
00852     return path.c_str();
00853 }

Here is the call graph for this function:

kWinVersion CvsPrefs::WhichVersion ( )

Definition at line 677 of file CvsPrefs.cpp.

References kWin16, kWin32, kWinNT35, kWinNT4, and kWinVersion.

Referenced by TestBuffer(), and WhichCvs().

00678 {
00679     DWORD dwVersion = GetVersion(); // Get major and minor version numbers of Windows
00680     DWORD dwWindowsMajorVersion =  (DWORD)(LOBYTE(LOWORD(dwVersion)));
00681     DWORD dwWindowsMinorVersion =  (DWORD)(HIBYTE(LOWORD(dwVersion)));
00682     DWORD dwBuild;
00683
00684     // Get build numbers for Windows NT or Win32s
00685     if (dwVersion < 0x80000000)                // Windows NT
00686     {
00687         dwBuild = (DWORD)(HIWORD(dwVersion));
00688         return dwWindowsMajorVersion == 3 ? kWinNT35 : kWinNT4;
00689     }
00690     else if (dwWindowsMajorVersion < 4)        // Win16s
00691     {
00692         dwBuild = (DWORD)(HIWORD(dwVersion));
00693         return kWin16;
00694     }
00695
00696     // Windows 95 -- No build numbers provided    dwBuild =  0;
00697     return kWin32;
00698 }

int CvsPrefs::WordWrapLogMsg ( void ) const

Definition at line 264 of file CvsPrefs.cpp.

References gWordWrapLogMsg.

Referenced by CMultilineEntryDlg::CMultilineEntryDlg(), CMultilineEntryDlg::OnInitDialog(), and CMultilineEntryDlg::OnWordwrap().

00264 {return gWordWrapLogMsg;}

bool CvsPrefs::Z9Option ( void ) const

Definition at line 193 of file CvsPrefs.cpp.

References gZ9Option.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), and CvsArgs::reset().

00193 {return gZ9Option;}

int CvsPrefs::ZLevel ( void ) const

Definition at line 261 of file CvsPrefs.cpp.

References gZLevel.

Referenced by CGetPrefs_GLOBALS::CGetPrefs_GLOBALS(), and CvsArgs::reset().

00261 {return gZLevel;}

Member Data Documentation

int CvsPrefs::fCvsRunningCounter [protected]

Definition at line 315 of file CvsPrefs.h.

Referenced by CvsPrefs(), IsCvsRunning(), and SetCvsRunning().

bool CvsPrefs::fHasLoggedIn [protected]

Definition at line 313 of file CvsPrefs.h.

Referenced by CvsPrefs(), HasLoogedIn(), and SetHasLoogedIn().

int CvsPrefs::fTclFileRunningCounter [protected]

Definition at line 316 of file CvsPrefs.h.

Referenced by CvsPrefs(), IsTclFileRunning(), and SetTclFileRunning().

The documentation for this class was generated from the following files:
  • common/CvsPrefs.h
  • common/CvsPrefs.cpp
Generated on Sat Aug 7 22:57:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UWaitCursor Class Reference

UWaitCursor Class Reference

#include <UCvsFrame.h>

List of all members.

Public Member Functions

UWaitCursor ()
virtual ~UWaitCursor ()

Constructor & Destructor Documentation

UWaitCursor::UWaitCursor ( ) [inline]

Definition at line 143 of file UCvsFrame.h.

References EV_CHGCURSOR, kUCvsFrameID, kUMainWidget, uCursWatch, UEventSendMessage(), and UMAKEINT.

00144     {
00145         UEventSendMessage(kUCvsFrameID, EV_CHGCURSOR, UMAKEINT(kUMainWidget, uCursWatch), 0L);
00146     }

Here is the call graph for this function:

virtual UWaitCursor::~UWaitCursor ( ) [inline, virtual]

Definition at line 147 of file UCvsFrame.h.

References EV_CHGCURSOR, kUCvsFrameID, kUMainWidget, uCursArrow, UEventSendMessage(), and UMAKEINT.

00148     {
00149         UEventSendMessage(kUCvsFrameID, EV_CHGCURSOR, UMAKEINT(kUMainWidget, uCursArrow), 0L);
00150     }

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • common/UCvsFrame.h
Generated on Sat Aug 7 22:57:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: UWidget Class Reference

UWidget Class Reference

This is the pseudo widget class. More...

#include <uwidget.h>

Inheritance diagram for UWidget:

[legend]
Collaboration diagram for UWidget:

[legend]
List of all members.

Public Member Functions

virtual const URuntimeClass * | GetRuntimeClass () const
UWidget (int widid)
  • widid unique pseudo widget identifier

virtual | ~UWidget ()
virtual void | AddListener (UCmdTarget *listener)
  • listener has the widget events broadcasted to it.

virtual int | UDispatchMessage (int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo)
this is overided in order to broadcast to the listeners
void * | GetWidget (int cmd) const
return a sub-widget as inserted by EV_INIT_WIDGET
  • cmd the sub-widget identifier.

std::map< int, void * > & | GetWidgets (void)
return all the sub-widgets inserted by EV_INIT_WIDGET
bool | WidgetIsActive (int cmd) const
return true if a widget has the focus ...
const char * | GetTooltip (int cmd) const
return the tooltip (i.e.
void | AddTooltip (int cmd, const char *tooltipID)
associate a tooltip with a sub-widget
  • cmd the sub-widget identifier.

void | AddTimer (long lap, int cmd)
timer handling - add a timer.
void | RemoveTimer (int cmd)
timer handling - remove a timer.
std::vector< UTimer > & | GetTimers (void)
timer handling - get the timers. Used internally by the event mamanger.
int | DoModal (int id=0)
modality : works only on the top widget and if it is a window
  • id associated dialog id.

void | EndModal (bool result)
while modaling, allows to quit the interaction
  • result set the return value for DoModal.

void | EndDialog (int result)
while modaling, allows to quit the interaction
  • result set the return value for DoModal.

virtual void | DoDataExchange (bool)
while modaling, allows to fill/read the dialog content.
virtual void | Dismiss (void)
while modaling, allows to detect when the user cancels the dialog.
virtual void | BeforeUpdateUI (void)
update user interface handling : before the EV_UPDATEUI get fired, give a chance to all the widgets to cache some computations used for the handling of the event.
bool | HasFocus (void)
tells if the pseudo-widget has the focus
bool | HasFocus (int cmdid)
tells if the pseudo-widget and the sub-widget have the focus
void | OnBlockHandler (void *widget, int cmd, int event)
blocks a eventhandler
void | OnUnblockHandler (void *widget, int cmd, int event)
unblocks a eventhandler
void | AddPage (UWidget *page, int pagecmd, int num_page)
map the widgets inside a pseudo tab-page and the pseudo tab-page to the pseudo-widget.
void | OverideMapWidget (int cmdid, CRuntimeClass *widClass)
std::map< int, CRuntimeClass * > & | GetOverideList (void)
CDialog * | GetCurModal () const

Static Public Member Functions

const URuntimeClass * | rtUWidget (void)
bool | HasModal (void)
tells if any other widget is currently modaling.
bool IsUIValid ()
update user interface handling : check validation says if at this moment the UI is valid (i.e.
void | DoValidUI (bool how)
update user interface handling : invalidate/validate UI
  • how determines if the UI will be valid.

int | GetFocus (void)
returns the current pseudo-widget which has the focus
int | GetFocusCmd (void)

Protected Member Functions

int | OnGetState (int cmd)
EV_QUERYSTATE message handling
  • cmd the sub-widget.

void | OnSetState (int cmd, int state)
  • cmd the sub-widget
  • state of the widget to set (pushed/checked...)

void | OnEnableCmd (int cmd, int state)
  • cmd the sub-widget
  • state of the widget to enable/disable (grayed)

void | OnIsEnabled (int cmd)
  • cmd the sub-widget
  • state of the widget enable/disable (grayed)

bool | IsEnabled (int cmd)
EV_IS_ENABLED UWidget message handling.
void | OnChgFocus (int cmd)
  • cmd the sub-widget to change focus to

void | OnSetDefault (int cmd)
  • cmd the sub-widget to change default to

void | OnInvalidate (int cmd)
  • cmd the sub-widget to redraw (delayed)

void | OnRedraw (int cmd)
  • cmd the sub-widget to redraw *now*

void | OnSetIcon (int cmd, void *pixmap)
  • cmd the sub-widget
  • pixmap the pixmap to set

void | OnSetText (int cmd, const char *text)
  • cmd the sub-widget
  • text the c-string caption to set

void | OnGetText (int cmd, UStr *text)
  • cmd the sub-widget
  • text is filled with the widget caption

void | OnSetFloat (int cmd, const float *f)
  • cmd the sub-widget
  • f the float value the to set

void | OnGetFloat (int cmd, float *f)
  • cmd the sub-widget
  • f the float value the to get

void | OnInitWidget (int cmd, void *widget)
  • cmd the sub-widget
  • widget the native pointer/handle for the sub-widget

void | OnInitTabWidget (int cmd, int page, void *widget)
  • cmd the sub-widget page holder
  • page the location for the page insertion
  • widget the native pointer/handle for the sub-widget page

void | OnShowWidget (int cmd, int state)
  • cmd the sub-widget
  • state of the widget to show/hide

void | OnSetSlider (int cmd, int pos)
  • cmd the sub-widget
  • pos is the position to set

void | OnGetSliderProperty (int cmd, USLIDER *prop)
  • cmd the sub-widget
  • prop get the informations about this scroller/slider

void | OnSetSliderProperty (int cmd, const USLIDER *prop)
  • cmd the sub-widget
  • prop set the informations about this scroller/slider

void | OnSetTooltip (int cmd, UCmdUI *pCmdUI)
not documented
void | OnGetLoc (int cmd, URECT *r)
  • cmd the sub-widget
  • r get the position of the widget relative to its parent

void | OnSetLoc (int cmd, const URECT *r)
  • cmd the sub-widget
  • r set the position of the widget relative to its parent

void | OnChgCursor (int cmd, UCURSOR cursor)
  • cmd the sub-widget
  • cursor to use in this sub-widget

void | OnUpdateUI (void)
when the user interface is invalid.
void | OnTreeResetAll (int cmd)
EV_TREE_RESETALL UWidget message handling.
void | OnTreeInsert (int cmd, UTREE_INSERT *data)
EV_TREE_INSERT UWidget message handling.
void | OnTreeGetInfo (int cmd, UTREE_INFO *data)
EV_TREE_GETINFO UWidget message handling.
void | OnTreeSetData (int cmd, UTREE_INFO *data)
EV_TREE_SETDATA UWidget message handling.
void | OnTreeSetIcon (int cmd, UTREE_INFO *data)
EV_TREE_SETICON UWidget message handling.
void | OnTreeDelete (int cmd, UTREEITEM item)
EV_TREE_DELETE UWidget message handling.
void | OnTreeExpand (int cmd, int collapse, UTREEITEM item)
EV_TREE_EXPAND UWidget message handling.
void | OnTreeSelect (int cmd, int deselect, UTREEITEM item)
EV_TREE_SELECT UWidget message handling.
void | OnTreeGetSel (int cmd, UTREEITEM *item)
EV_TREE_GETSEL UWidget message handling.
void | OnListAddColumns (int cmd, int num)
EV_LIST_ADDCOLUMNS UWidget message handling.
void | OnListShowColumns (int cmd, int num)
EV_LIST_SHOWCOLUMNS UWidget message handling.
void | OnListHideColumns (int cmd, int num)
EV_LIST_DELCOLUMNS UWidget message handling.
void | OnListSetColTitle (int cmd, int num, const char *title)
EV_LIST_SETCOLTITLE UWidget message handling.
void | OnListSetColWidth (int cmd, int num, int width)
EV_LIST_SETCOLWIDTH UWidget message handling.
void | OnListResetAll (int cmd)
EV_LIST_RESETALL UWidget message handling.
void | OnListAddSel (int cmd, int entry)
EV_LIST_ADDSEL UWidget message handling.
void | OnListPopup (int cmd, int entry)
EV_LIST_POPUP UWidget message handling.
void | OnListDelRow (int cmd, int row)
EV_LIST_DELROW UWidget message handling.
void | OnListSetFeedback (int cmd, int turnOn)
EV_LIST_SETFEEDBACK UWidget message handling.
void | OnListNewRow (int cmd, int *num)
EV_LIST_NEWROW UWidget message handling.
void | OnListRowSetData (int cmd, int row, void *data)
EV_LIST_ROWSETDATA UWidget message handling.
void | OnListRowGetData (int cmd, int row, void **data)
EV_LIST_ROWGETDATA UWidget message handling.
void | OnListInsert (int cmd, ULIST_INSERT *data)
EV_LIST_INSERT UWidget message handling.
void | OnListGetInfo (int cmd, ULIST_INFO *desc)
EV_LIST_GETINFO UWidget message handling.
int | OnListGetNextSel (int cmd, int selectedCell)
EV_LIST_GETNEXTSEL UWidget message handling.
int | OnListGetNext (int cmd, int whichCell)
EV_LIST_GETNEXT UWidget message handling.
void | OnListResort (int cmd, int column, UListSorter s)
EV_LIST_RESORT UWidget message handling.
void | OnListSetSortDir (int cmd, int column, bool dir)
ON_LIST_SETSORTDIR UWidget message handling.
void | OnComboResetAll (int cmd)
EV_COMBO_RESETALL UWidget message handling.
void | OnComboAppend (int cmd, const char *txt)
EV_COMBO_APPEND UWidget message handling.
void | OnComboSetPos (int cmd, int sel)
EV_COMBO_SETSEL UWidget message handling.
int | OnComboGetPos (int cmd, UStr *txt)
EV_COMBO_GETSEL UWidget message handling.
int | OnComboGetCount (int cmd)
EV_COMBO_GETCOUNT UWidget message handling.
void | OnComboDelSel (int cmd, int sel)
EV_COMBO_DELSEL UWidget message handling.
void | OnComboEnableSel (int cmd, int sel, int state)
not implemented on Win32
void | OnComboGetMenu (int cmd, UMENU *menu)
EV_COMBO_ENABLESEL UWidget message handling.
void | OnSmartComboSetFeature (int cmd, int feature)
EV_SMARTCOMBO_SETFEATURE UWidget message handling.
void | OnSmartComboSetItems (int cmd, CMString *items)
EV_SMARTCOMBO_SETITEMS UWidget message handling.
void | OnSmartComboSetReadOnly (int cmd, bool readOnly)
EV_SMARTCOMBO_SETREADONLY UWidget message handling.
int | OnUpdateFocus (int leave, void *widget)
EV_UPDATEFOCUS UWidget message handling.
int | OnFetchCmd (int cmd, void *widget)
EV_FETCHCMD UWidget message handling.
void | OnPageChanged (int cmd, int pagenum)
EV_PAGE UWidget message handling.
void | OnStatusBarText (int cmd, const char *txt)
EV_STATUSBAR_TEXT UWidget message handling.
virtual const UMSGMAP * | GetMessageMap () const

Static Protected Member Functions

const URuntimeClass * | _GetBaseClass ()
const UMSGMAP * | GetBaseMessageMap ()
const UMSGMAP * | GetThisMessageMap ()

Protected Attributes

std::vector< UCmdTarget * > | m_listeners
std::map< int, void * > | m_widgets
std::map< int, UStr > | m_tooltips
std::vector< UTimer > | m_timers
std::map< int, UWidget * > | m_tabs
int m_modalRes
int m_currentPage
CDialog * m_curModal
std::map< int, CRuntimeClass * > | m_overide
bool m_noDispatch

Static Protected Attributes

const URuntimeClass | classUWidget
bool | sValidMenu = false
int | sFocusWidID = -1
int sFocusCmdID
const UMSGMAP | messageMap = { UCmdTarget ::GetThisMessageMap(), & UWidget ::_messageEntries[0] }

Static Private Attributes

const UMSGMAP_ENTRY | _messageEntries []

Friends

LRESULT | UWinPseudoWindowProc (CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam)

Detailed Description

This is the pseudo widget class.

The pseudo widget class allows to access mapped widgets (using the event EV_INIT_WIDGET) and to manipulate them (i.e. set the caption, visible state...). By derivating this class, you can also take advantage of features like modaling dialogs, timers...

Definition at line 112 of file uwidget.h.

Constructor & Destructor Documentation

UWidget::UWidget ( int widid )

  • widid unique pseudo widget identifier

Definition at line 759 of file uwidget.cpp.

References NEW, and qMacPP.

00759                           : UCmdTarget(widid), m_currentPage(-1)
00760 #if qGTK || qMacPP
00761     , m_modalLoop(false)
00762 #endif
00763 #ifdef WIN32
00764     , m_curModal(0L), m_noDispatch(false)
00765 #endif
00766 {
00767 #if qMacAPP
00768     static bool firstTime = true;
00769     if(firstTime)
00770     {
00771         firstTime = false;
00772         gDispatcher->AddBehavior(new TPseudoAppBehavior);
00773             // this behavior takes care about menu routing and giving time
00774             // to the pseudo-events.
00775         new UMacAppMenu();
00776             // for MacApp, we can create automatically the pseudo menu handling.
00777     }
00778 #endif
00779 #if qMacPP
00780     static bool firstTime = true;
00781     if(firstTime && LCommander::GetTopCommander() != 0L)
00782     {
00783         firstTime = false;
00784         LCommander::GetTopCommander()->AddAttachment(NEW LMainPseudoAttachment());
00785     }
00786 #endif
00787 }

UWidget::~UWidget ( ) [virtual]

Definition at line 789 of file uwidget.cpp.

References HasFocus(), m_listeners, m_tabs, and sFocusWidID.

00790 {
00791     std::vector<UCmdTarget *>::iterator i;
00792     for(i = m_listeners.begin(); i != m_listeners.end(); ++i)
00793     {
00794         delete *i;
00795     }
00796     std::map<int, UWidget *>::iterator j;
00797     for(j = m_tabs.begin(); j != m_tabs.end(); ++j)
00798     {
00799         delete (*j).second;
00800     }
00801     if(HasFocus())
00802         sFocusWidID = -1;
00803 }

Here is the call graph for this function:

Member Function Documentation

const URuntimeClass * UWidget::_GetBaseClass ( ) [static, protected]

Reimplemented from UCmdTarget.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 83 of file uwidget.cpp.

void UWidget::AddListener ( UCmdTarget * listener ) [virtual]

  • listener has the widget events broadcasted to it.

Note:
listener gets destroyed by the widget when it is destroyed.
Definition at line 805 of file uwidget.cpp.

References m_listeners.

00806 {
00807     m_listeners.push_back(listener);
00808 }

void UWidget::AddPage | ( | UWidget * | page,
 |  | int | pagecmd,
 |  | int | num_page
 | ) |

map the widgets inside a pseudo tab-page and the pseudo tab-page to the pseudo-widget.

Warning:
not implemented yet on Win32
Definition at line 3848 of file uwidget.cpp.

References EV_INIT_TAB_WIDGET, EV_PAGE_CHANGED, GetWidget(), UCmdTarget::GetWidID(), kUMainWidget, m_tabs, UEventSendMessage(), and UMAKEINT.

03849 {
03850     void *wid = GetWidget(kUMainWidget);
03851     if(wid == 0L)
03852         return;
03853
03854     UEventSendMessage(page->GetWidID(), EV_INIT_TAB_WIDGET, UMAKEINT(pagecmd, num_page), wid);
03855     std::map<int, UWidget *>::value_type val(UMAKEINT(pagecmd, num_page), page);
03856     m_tabs.insert(val);
03857
03858 #if qMacPP
03859     // emulate the click in tab 1
03860     if(num_page == 0)
03861     {
03862         // emulate the click in tab 1
03863         UEventSendMessage(GetWidID(), EV_PAGE_CHANGED, UMAKEINT(pagecmd, num_page), 0L);
03864     }
03865 #endif /* qMacPP */
03866 }

Here is the call graph for this function:

void UWidget::AddTimer | ( | long | lap,
 |  | int | cmd
 | ) |

timer handling - add a timer.

  • lap in milliseconds.
  • cmd to fire to the pseudo-widget each time the lap expires.
Definition at line 2058 of file uwidget.cpp.

References m_timers, and UTickCount().

Referenced by UCvsApp::UCvsApp().

02059 {
02060     UTimer timer(lap, ::UTickCount(), cmd);
02061     m_timers.push_back(timer);
02062 }

Here is the call graph for this function:

void UWidget::AddTooltip | ( | int | cmd,
 |  | const char * | tooltipID
 | ) |

associate a tooltip with a sub-widget

  • cmd the sub-widget identifier.

  • tooltipID a string.
Definition at line 963 of file uwidget.cpp.

References m_tooltips.

00964 {
00965     std::map<int, UStr>::value_type val(cmd, UStr(tooltipID));
00966     m_tooltips.insert(val);
00967 }

virtual void UWidget::BeforeUpdateUI ( void ) [inline, virtual]

update user interface handling : before the EV_UPDATEUI get fired, give a chance to all the widgets to cache some computations used for the handling of the event.

Definition at line 207 of file uwidget.h.

Referenced by UEventGiveTime().

00207 {}

virtual void UWidget::Dismiss ( void ) [inline, virtual]

while modaling, allows to detect when the user cancels the dialog.

Definition at line 186 of file uwidget.h.

Referenced by DoModal().

00186 {}

virtual void UWidget::DoDataExchange ( bool ) [inline, virtual]

while modaling, allows to fill/read the dialog content.

  • fill says if it expects to fill or read the dialog content.

Reimplemented in UPromptMessage, and UEditMessage.

Definition at line 183 of file uwidget.h.

Referenced by CPseudoDlg::DoDataExchange(), DoModal(), and OnPageChanged().

00183 {}

int UWidget::DoModal ( int id = 0 )

modality : works only on the top widget and if it is a window

  • id associated dialog id.

Returns:
true -> OK, false -> Cancel.
Note:
the 'id' is significant by platform (on Mac, that is the id view)
Definition at line 2105 of file uwidget.cpp.

References Dismiss(), DoDataExchange(), EV_INIT_WIDGET, EV_PAGE_CHANGED, GetWidget(), UCmdTarget::GetWidID(), kUMainWidget, m_curModal, m_modalRes, m_tabs, UAppConsole(), UEventSendMessage(), UHIWORD, ULOWORD, and UMAKEINT.

Referenced by PromptEditMessage().

02106 {
02107     bool result = false;
02108
02109 #if !defined(qMacAPP) && !defined(qMacPP) && !defined(WIN32)
02110     void *w = GetWidget(kUMainWidget);
02111     if(w == 0L)
02112     {
02113         UAppConsole("Unable to find widget id : %d (file %s:%d)\n", kUMainWidget, __FILE__, __LINE__);
02114         return result;
02115     }
02116 #endif // !qMacAPP && !WIN32
02117
02118 #if qGTK || qMacPP
02119     if(m_modalLoop)
02120     {
02121         UAppConsole("Trying to break a modal state\n");
02122         return result;
02123     }
02124 #endif
02125
02126 #ifdef WIN32
02127     CPseudoDlg dlg(id, this);
02128     m_curModal = &dlg;
02129     result = dlg.DoModal() == IDOK;
02130     if(!result)
02131         Dismiss();
02132     m_curModal = 0L;
02133 #endif
02134 #if qMacAPP
02135     TWindow *view = gViewServer->NewTemplateWindow(id, nil);
02136     ThrowIfNULL_AC(view);
02137
02138     UEventSendMessage(GetWidID(), EV_INIT_WIDGET, kUMainWidget, view);
02139
02140     DoDataExchange(true);
02141     IDType resid = view->PoseModally();
02142
02143     TDialogBehavior* dlgb;
02144     if((dlgb = view->GetDialogBehavior()) != 0L)
02145     {
02146         result = resid == dlgb->fDefaultItem;
02147     }
02148
02149     if(result)
02150         DoDataExchange(false);
02151     else
02152         Dismiss();
02153
02154     view->Close();
02155 #endif
02156 #if qMacPP
02157     StDialogHandler theHandler(id, LCommander::GetTopCommander());
02158     LWindow *theDialog = theHandler.GetDialog();
02159
02160     if(theDialog != 0L)
02161     {
02162         UEventSendMessage(GetWidID(), EV_INIT_WIDGET, kUMainWidget, theDialog);
02163
02164         DoDataExchange(true);
02165         theDialog->Show();
02166         theHandler.SetSleepTime(6);
02167
02168         m_modalLoop = true;
02169         MessageT hitMessage;
02170         while (m_modalLoop)
02171         {       // Let DialogHandler process events
02172             hitMessage = theHandler.DoDialog();
02173
02174             if (hitMessage == msg_OK || hitMessage == msg_Cancel)
02175                 break;
02176         }
02177
02178         result = m_modalLoop ? hitMessage == msg_OK : m_modalRes;
02179
02180         if(result)
02181             DoDataExchange(false);
02182         else
02183             Dismiss();
02184
02185         //theDialog->Hide();
02186         //theDialog->DoClose();
02187     }
02188 #endif
02189 #if qGTK
02190     if(GTK_IS_WINDOW(w))
02191     {
02192         // emulate the click in tab 1
02193         std::map<int, UWidget *>::iterator i;
02194         for(i = m_tabs.begin(); i != m_tabs.end(); ++i)
02195         {
02196             int cmdid = ULOWORD((*i).first);
02197             int pagenum = UHIWORD((*i).first);
02198             if(pagenum == 0)
02199             {
02200                 UEventSendMessage(GetWidID(), EV_PAGE_CHANGED, UMAKEINT(cmdid, pagenum), 0L);
02201                 break;
02202             }
02203         }
02204         gtk_signal_connect(GTK_OBJECT(w),"delete_event", GTK_SIGNAL_FUNC(gtkcancel), this);
02205         DoDataExchange(true);
02206         gtk_widget_show(GTK_WIDGET(w));
02207         m_modalLoop = true;
02208         gtk_grab_add (GTK_WIDGET(w));
02209         while (m_modalLoop)
02210         {
02211             if( gtk_main_iteration_do(TRUE))
02212                 break;
02213         }
02214         gtk_grab_remove (GTK_WIDGET(w));
02215         result = m_modalRes;
02216         m_modalLoop = false; // sanity...
02217         if(result)
02218         {
02219             UEventSendMessage(GetWidID(), EV_PAGE_CHANGED, UMAKEINT(0, -1), 0L);
02220             DoDataExchange(false);
02221         }
02222         else
02223         {
02224             Dismiss();
02225         }
02226         gtk_widget_destroy(GTK_WIDGET(w));
02227     }
02228     else
02229         g_warning("Trying to modal on a non-window\n");
02230 #endif
02231
02232     return result;
02233 }

Here is the call graph for this function:

void UWidget::DoValidUI ( bool how ) [static]

update user interface handling : invalidate/validate UI

  • how determines if the UI will be valid.

Note:
if the UI is not valid, the event manager will fire a EV_UPDATEUI event next time it spends time.
Warning:
you generally don't have to use this function since

the pseudo-widgets detect the UI validity automatically

Definition at line 160 of file uwidget.cpp.

References sValidMenu.

Referenced by TPseudoAppBehavior::DoSetupMenus(), LMainPseudoAttachment::ExecuteSelf(), UCvsApp::OnMainTimer(), UEventGiveTime(), and UWinPseudoWindowProc().

00160 { sValidMenu = how; }

void UWidget::EndDialog ( int result )

while modaling, allows to quit the interaction

  • result set the return value for DoModal.

Definition at line 2235 of file uwidget.cpp.

References GetWidget(), kUMainWidget, m_curModal, m_modalRes, and UAppConsole().

Referenced by EndModal().

02236 {
02237     m_modalRes = result;
02238 #if qGTK || qMacPP
02239     if(!m_modalLoop)
02240         UAppConsole("EndModal called twice\n");
02241
02242     m_modalLoop = false;
02243 #endif
02244 #if qMacAPP
02245     void *w = GetWidget(kUMainWidget);
02246     if(w == 0L)
02247         return;
02248
02249     TWindow *wind = (TWindow *)w;
02250     TDialogBehavior* dlgb;
02251     if(MA_MEMBER(wind, TWindow) && (dlgb = wind->GetDialogBehavior()) != 0L)
02252     {
02253         wind->Dismiss(result ? dlgb->fDefaultItem : dlgb->fCancelItem, result);
02254     }
02255 #endif
02256 #ifdef WIN32
02257     if(m_curModal != 0L)
02258     {
02259         if (result && !m_curModal->UpdateData(TRUE))
02260         {
02261             TRACE0("UpdateData failed during dialog termination.\n");
02262             // the UpdateData routine will set focus to correct item
02263             return;
02264         }
02265         m_curModal->EndDialog(result ? IDOK : IDCANCEL);
02266     }
02267 #endif
02268 }

Here is the call graph for this function:

void UWidget::EndModal ( bool result )

while modaling, allows to quit the interaction

  • result set the return value for DoModal.

obsolete Definition at line 2270 of file uwidget.cpp.

References EndDialog().

Referenced by UPromptMessage::OnCancel().

02271 {
02272     EndDialog((int)result);
02273 }

Here is the call graph for this function:

const UMSGMAP * UWidget::GetBaseMessageMap ( ) [static, protected]

Reimplemented from UCmdTarget.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 85 of file uwidget.cpp.

CDialog* UWidget::GetCurModal ( ) const [inline]

Definition at line 238 of file uwidget.h.

00238 { return m_curModal; }

int UWidget::GetFocus ( void ) [static]

returns the current pseudo-widget which has the focus

Note:
it is important cause it is used by the event manager

in order to decide which routing for the events

Definition at line 161 of file uwidget.cpp.

References sFocusWidID.

Referenced by LMainPseudoAttachment::ExecuteSelf(), and UMacAppMenu::OnUpdateUI().

00161 { return sFocusWidID; }

int UWidget::GetFocusCmd ( void ) [static]

Definition at line 162 of file uwidget.cpp.

References sFocusCmdID.

00162 { return sFocusCmdID; }

const UMSGMAP * UWidget::GetMessageMap ( ) const [protected, virtual]

Reimplemented from UCmdTarget.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 85 of file uwidget.cpp.

std::map<int, CRuntimeClass *>& UWidget::GetOverideList ( void ) [inline]

Definition at line 234 of file uwidget.h.

00234 { return m_overide; }

const URuntimeClass * UWidget::GetRuntimeClass ( ) const [virtual]

Reimplemented from UCmdTarget.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 83 of file uwidget.cpp.

const UMSGMAP * UWidget::GetThisMessageMap ( ) [static, protected]

Reimplemented from UCmdTarget.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 85 of file uwidget.cpp.

std::vector< UTimer > & UWidget::GetTimers ( void )

timer handling - get the timers. Used internally by the event mamanger.

Definition at line 2077 of file uwidget.cpp.

References m_timers.

Referenced by UEventGiveTime().

02078 {
02079     // removed the delayed items
02080     std::vector<UTimer>::iterator i;
02081     for(i = m_timers.begin(); i != m_timers.end(); ++i)
02082     {
02083         if((*i).m_cmd == 0)
02084         {
02085             m_timers.erase(i);
02086             break;
02087         }
02088     }
02089
02090     return m_timers;
02091 }

const char * UWidget::GetTooltip ( int cmd ) const

return the tooltip (i.e.

status/nprompt) or 0L if no tooltip associated with this command

  • cmd the sub-widget identifier.
Definition at line 837 of file uwidget.cpp.

References m_tooltips, and UAppConsole().

Referenced by OnSetTooltip().

00838 {
00839     std::map<int, UStr>::const_iterator i = m_tooltips.find(cmd);
00840     if(i == m_tooltips.end())
00841     {
00842         UAppConsole("Unable to find widget id : %d (file %s:%d)\n", cmd, __FILE__, __LINE__);
00843 #ifdef DEBUG
00844         printf( "Valid Ids are:\n");
00845         for ( i = m_tooltips.begin(); i != m_tooltips.end(); ++i) {
00846             printf( "    Id: %d, Str: '%s'\n", (*i).first, (*i).second.c_str());
00847         }
00848 #endif
00849         return 0L;
00850     }
00851     return (*i).second;
00852 }

Here is the call graph for this function:

void * UWidget::GetWidget ( int cmd ) const

return a sub-widget as inserted by EV_INIT_WIDGET

  • cmd the sub-widget identifier.

Returns:
a native pointer for the sub-widget.
Note:
the native pointer type depends on the platform implementation.

for example on Windows it's a derivated CWnd *

Definition at line 820 of file uwidget.cpp.

References m_widgets, and UAppConsole().

Referenced by AddPage(), UCvsGraph::CalcImageSize(), cvsgui_GetTopMacroAdminMenu(), cvsgui_GetTopMacroSelectionMenu(), DoModal(), EndDialog(), UCvsConsole::FeedThisLine(), IsEnabled(), macpp_getattachwindow(), OnChgCursor(), OnChgFocus(), OnComboAppend(), OnComboDelSel(), OnComboEnableSel(), OnComboGetCount(), OnComboGetMenu(), OnComboGetPos(), OnComboResetAll(), OnComboSetPos(), UCvsConsole::OnCreate(), UCvsGraph::OnDrawing(), OnEnableCmd(), OnGetFloat(), OnGetLoc(), OnGetSliderProperty(), OnGetState(), OnGetText(), OnInvalidate(), OnListAddColumns(), OnListAddSel(), OnListDelRow(), OnListGetInfo(), OnListGetNext(), OnListGetNextSel(), OnListHideColumns(), OnListInsert(), OnListNewRow(), OnListResetAll(), OnListResort(), OnListRowGetData(), OnListRowSetData(), OnListSetColTitle(), OnListSetColWidth(), OnListSetFeedback(), OnListSetSortDir(), OnListShowColumns(), OnPageChanged(), OnRedraw(), OnSetDefault(), OnSetFloat(), OnSetIcon(), OnSetLoc(), OnSetSlider(), OnSetSliderProperty(), OnSetState(), OnSetText(), OnShowWidget(), OnSmartComboSetFeature(), OnSmartComboSetItems(), OnSmartComboSetReadOnly(), OnStatusBarText(), UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), UToolbar::OnTbDropDown(), UToolbar::OnTbInit(), UToolbar::OnTbSeparator(), OnTreeDelete(), OnTreeExpand(), OnTreeGetInfo(), OnTreeGetSel(), OnTreeInsert(), OnTreeResetAll(), OnTreeSelect(), OnTreeSetData(), OnTreeSetIcon(), UToolbar::OnUpdateUI(), UCvsConsole::OutColor(), UCvsFiles::ResetView(), UMenuAddPulldown(), UWinPseudoWindowProc(), and WidgetIsActive().

00821 {
00822     std::map<int, void *>::const_iterator i = m_widgets.find(cmd);
00823     if(i == m_widgets.end())
00824     {
00825         UAppConsole("Unable to find widget id : %d (file %s:%d)\n", cmd, __FILE__, __LINE__);
00826 #ifdef DEBUG
00827         printf( "Valid Ids are:\n");
00828         for ( i = m_widgets.begin(); i != m_widgets.end(); ++i) {
00829             printf( "    Id: %d, Addr: 0x%x\n", (*i).first, (unsigned int)(*i).second);
00830         }
00831 #endif
00832         return 0L;
00833     }
00834     return (*i).second;
00835 }

Here is the call graph for this function:

std::map<int, void *>& UWidget::GetWidgets ( void ) [inline]

return all the sub-widgets inserted by EV_INIT_WIDGET

Returns:
a STL map with a pair of id and native pointer.
Definition at line 136 of file uwidget.h.

Referenced by CPseudoDlg::DoDataExchange(), findIdForWnd(), UWinPseudoWindowProc(), and CPseudoDlg::~CPseudoDlg().

00136 { return m_widgets; }

bool UWidget::HasFocus ( int cmdid ) [inline]

tells if the pseudo-widget and the sub-widget have the focus

Definition at line 219 of file uwidget.h.

References UCmdTarget::GetWidID().

00219 { return GetFocus() == GetWidID() && GetFocusCmd() == cmdid; }

Here is the call graph for this function:

bool UWidget::HasFocus ( void ) [inline]

tells if the pseudo-widget has the focus

Definition at line 216 of file uwidget.h.

References UCmdTarget::GetWidID().

Referenced by UCvsFolders::DisableGeneric(), UCvsFiles::DisableGeneric(), and ~UWidget().

00216 { return GetFocus() == GetWidID(); }

Here is the call graph for this function:

bool UWidget::HasModal ( void ) [static]

tells if any other widget is currently modaling.

Definition at line 3818 of file uwidget.cpp.

References UObject::IsKindOf(), STD, UEventGetTargets(), and URUNTIME_CLASS.

03819 {
03820 #if qGTK
03821     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
03822     STD map<int, UCmdTarget *>::const_iterator i;
03823     for(i = targets.begin(); i != targets.end(); ++i)
03824     {
03825         UCmdTarget *target = (*i).second;
03826         if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
03827             continue;
03828
03829         UWidget *wid = (UWidget *)target;
03830         if(wid->m_modalLoop)
03831             return true;
03832     }
03833 #endif
03834     return false;
03835 }

Here is the call graph for this function:

bool UWidget::IsEnabled ( int cmd ) [protected]

EV_IS_ENABLED UWidget message handling.

Definition at line 1543 of file uwidget.cpp.

References GetWidget().

01544 {
01545     void *w = GetWidget(cmd);
01546     if(w == 0L)
01547         return false;
01548
01549 #ifdef qGTK
01550     return GTK_WIDGET_SENSITIVE(GTK_WIDGET(w));
01551 #else
01552     return true;
01553 #endif
01554
01555 }

Here is the call graph for this function:

bool UWidget::IsUIValid ( ) [static]

update user interface handling : check validation says if at this moment the UI is valid (i.e.

menus, widgets states are correct) Definition at line 159 of file uwidget.cpp.

Referenced by UEventGiveTime().

00159 { return sValidMenu; }

void UWidget::OnBlockHandler | ( | void * | widget,
 |  | int | cmd,
 |  | int | event
 | ) |

blocks a eventhandler

Definition at line 1156 of file uwidget.cpp.

References UCmdTarget::GetWidID(), and UMAKEINT.

Referenced by UCvsGraph::OnDrawing().

01157 {
01158 #ifdef qGTK
01159     if(event == GDK_EXPOSE) {
01160         gtk_signal_handler_block_by_func( GTK_OBJECT(widget),
01161                                           GTK_SIGNAL_FUNC (gtkexposeevent),
01162                                           (gpointer)UMAKEINT(GetWidID(), cmd) );
01163     }
01164 #endif
01165 }

Here is the call graph for this function:

void UWidget::OnChgCursor | ( | int | cmd,
 |  | UCURSOR | cursor
 | ) | [protected]

  • cmd the sub-widget
  • cursor to use in this sub-widget

Warning:
GTK only and limited implementation
Definition at line 2275 of file uwidget.cpp.

References GetWidget(), uCursArrow, and uCursWatch.

02276 {
02277     void *w = GetWidget(cmd);
02278     if(w == 0L)
02279         return;
02280
02281 #if qGTK
02282     if(GTK_IS_WIDGET(w) && GTK_WIDGET(w)->window != 0L)
02283     {
02284         static GdkCursor *cursor_arrow=0L;
02285         static GdkCursor *cursor_watch=0L;
02286         if(cursor_arrow == 0L)
02287         {
02288             cursor_arrow = gdk_cursor_new (GDK_TOP_LEFT_ARROW);
02289             cursor_watch = gdk_cursor_new (GDK_WATCH);
02290         }
02291         if(cursor == uCursArrow)
02292             gdk_window_set_cursor (GTK_WIDGET(w)->window, cursor_arrow);
02293         else if(cursor == uCursWatch)
02294             gdk_window_set_cursor (GTK_WIDGET(w)->window, cursor_watch);
02295     }
02296 #endif
02297 }

Here is the call graph for this function:

void UWidget::OnChgFocus ( int cmd ) [protected]

  • cmd the sub-widget to change focus to

Definition at line 1557 of file uwidget.cpp.

References EV_UPDATEFOCUS, GetWidget(), and UEventNotifyMessage().

01558 {
01559     void *w = GetWidget(cmd);
01560     if(w == 0L)
01561         return;
01562
01563 #if qMacPP
01564     LPane *pane = (LPane *)w;
01565     LCommander *target = dynamic_cast<LCommander *>(pane);
01566     if(target != 0L)
01567     {
01568         LCommander::SwitchTarget(target);
01569     }
01570 #endif
01571 #if qMacAPP
01572     TView *view = (TView *)w;
01573     if(MA_MEMBER(view, TView))
01574     {
01575         if(view->GetWindow() != 0L)
01576             view->GetWindow()->SetWindowTarget(view);
01577     }
01578 #endif
01579 #if qGTK
01580     if(GTK_IS_WIDGET(w))
01581     {
01582         gtk_widget_grab_focus(GTK_WIDGET(w)); // TODO doesn't work
01583
01584         UEventNotifyMessage(EV_UPDATEFOCUS, 0, GTK_OBJECT(w));
01585     }
01586
01587 #endif
01588 #ifdef WIN32
01589     CWnd *wnd = (CWnd *)w;
01590
01591     wnd->SetFocus();
01592 #endif
01593 }

Here is the call graph for this function:

void UWidget::OnComboAppend | ( | int | cmd,
 |  | const char * | txt
 | ) | [protected]

EV_COMBO_APPEND UWidget message handling.

Definition at line 2610 of file uwidget.cpp.

References free, GetWidget(), UCmdTarget::GetWidID(), gTurnOffBroadcast, strdup(), and UMAKEINT.

02611 {
02612     void *w = GetWidget(cmd);
02613     if(w == 0L)
02614         return;
02615
02616 #ifdef WIN32
02617     CWnd *wnd = (CWnd *)w;
02618
02619     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02620     {
02621         CComboBox *combo = (CComboBox *)wnd;
02622         combo->InsertString(-1, txt);
02623     }
02624 #endif
02625 #if qGTK
02626     if(GTK_IS_COMBO(w))
02627     {
02628         GtkWidget *list = GTK_COMBO(w)->list;
02629         GtkWidget *list_item = gtk_list_item_new_with_label(txt);
02630         gtk_container_add( GTK_CONTAINER(list), list_item );
02631         gtk_widget_show( list_item );
02632
02633         gtk_signal_connect( GTK_OBJECT(list_item), "select",
02634                             GTK_SIGNAL_FUNC(gtkcomboclicked), (gpointer)UMAKEINT(GetWidID(), cmd) );
02635     }
02636     else if(GTK_IS_OPTION_MENU(w))
02637     {
02638         GtkWidget *menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(w));
02639         GtkWidget *item = gtk_menu_item_new_with_label(txt);
02640         // fix me: where to find the label of the item ?
02641         gtk_object_set_data_full(GTK_OBJECT(item), "rf_menuitemtext", strdup(txt), (GtkDestroyNotify)free);
02642         gtk_signal_connect (GTK_OBJECT(item), "activate",
02643             GTK_SIGNAL_FUNC(gtkmenuactivated), (gpointer)UMAKEINT(GetWidID(), cmd));
02644         gtk_widget_show(item);
02645         gtk_menu_append(GTK_MENU(menu), item);
02646     }
02647 #endif
02648 #if qMacPP
02649     LPane *view = (LPane *)w;
02650     LMenuController *popup;
02651     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02652     {
02653         USemaphore policeman(gTurnOffBroadcast);
02654
02655         if(strcmp(txt, "-") == 0)
02656             popup->InsertMenuItem("\p(-", max_Int16, false);
02657         else
02658             popup->InsertMenuItem(LStr255(txt), max_Int16);
02659     }
02660 #endif
02661 #if qMacAPP
02662     TView *view = (TView *)w;
02663     if(MA_MEMBER(view, TPopup))
02664     {
02665         TPopup *popup = (TPopup *)view;
02666         if(strcmp(txt, "-") == 0)
02667             popup->AddSeparator();
02668         else
02669             popup->AddItem(CStr255_AC(txt));
02670     }
02671 #endif
02672 }

Here is the call graph for this function:

void UWidget::OnComboDelSel | ( | int | cmd,
 |  | int | sel
 | ) | [protected]

EV_COMBO_DELSEL UWidget message handling.

Definition at line 2721 of file uwidget.cpp.

References GetWidget(), and gTurnOffBroadcast.

02722 {
02723     void *w = GetWidget(cmd);
02724     if(w == 0L)
02725         return;
02726
02727 #ifdef WIN32
02728     CWnd *wnd = (CWnd *)w;
02729
02730     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02731     {
02732         CComboBox *combo = (CComboBox *)wnd;
02733         combo->DeleteString(sel);
02734     }
02735 #endif
02736 #if qMacPP
02737     LPane *view = (LPane *)w;
02738     LMenuController *popup;
02739     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02740     {
02741         USemaphore policeman(gTurnOffBroadcast);
02742
02743         popup->DeleteMenuItem(sel + 1);
02744     }
02745 #endif
02746 }

Here is the call graph for this function:

void UWidget::OnComboEnableSel | ( | int | cmd,
 |  | int | sel,
 |  | int | state
 | ) | [protected]

not implemented on Win32

Definition at line 2748 of file uwidget.cpp.

References GetWidget().

02749 {
02750     void *w = GetWidget(cmd);
02751     if(w == 0L)
02752         return;
02753
02754 #ifdef WIN32
02755     CWnd *wnd = (CWnd *)w;
02756
02757     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02758     {
02759     }
02760 #endif
02761 #if qMacPP
02762     LPane *view = (LPane *)w;
02763     LMenuController *popup;
02764     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02765     {
02766         if(state)
02767             ::EnableMenuItem(popup->GetMacMenuH(), sel + 1);
02768         else
02769             ::DisableMenuItem(popup->GetMacMenuH(), sel + 1);
02770     }
02771 #endif
02772 }

Here is the call graph for this function:

int UWidget::OnComboGetCount ( int cmd ) [protected]

EV_COMBO_GETCOUNT UWidget message handling.

Definition at line 2876 of file uwidget.cpp.

References GetWidget().

02877 {
02878     int res = 0; // sanity
02879
02880     void *w = GetWidget(cmd);
02881     if(w == 0L)
02882         return res;
02883
02884 #ifdef WIN32
02885     CWnd *wnd = (CWnd *)w;
02886
02887     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02888     {
02889         CComboBox *combo = (CComboBox *)wnd;
02890         res = combo->GetCount();
02891     }
02892 #endif
02893 #if qGTK
02894     if(GTK_IS_COMBO(w))
02895     {
02896         GtkList *list = GTK_LIST(GTK_COMBO(w)->list);
02897         if ( list)
02898         {
02899             GList *tmp_list;
02900             for( tmp_list = list->children; tmp_list; tmp_list = tmp_list->next)
02901                 ++res;
02902         }
02903     }
02904     else if(GTK_IS_OPTION_MENU(w))
02905     {
02906         GtkMenu *mm = GTK_MENU(gtk_option_menu_get_menu( GTK_OPTION_MENU(w)));
02907         if ( mm)
02908         {
02909             GList *tmp_list;
02910             for( tmp_list = mm->menu_shell.children; tmp_list; tmp_list = tmp_list->next)
02911                 ++res;
02912         }
02913     }
02914
02915 #endif
02916 #if qMacAPP
02917     TView *view = (TView *)w;
02918     if(MA_MEMBER(view, TPopup))
02919     {
02920         TPopup *popup = (TPopup *)view;
02921         res = popup->GetNumberOfItems();
02922     }
02923 #endif
02924 #if qMacPP
02925     LPane *view = (LPane *)w;
02926     LMenuController *popup;
02927     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02928     {
02929         res = ::CountMenuItems(popup->GetMacMenuH());
02930     }
02931 #endif
02932
02933     return res;
02934 }

Here is the call graph for this function:

void UWidget::OnComboGetMenu | ( | int | cmd,
 |  | UMENU * | menu
 | ) | [protected]

EV_COMBO_ENABLESEL UWidget message handling.

Definition at line 2774 of file uwidget.cpp.

References GetWidget(), UMENU, and UMENU_NULL.

02775 {
02776     *menu = UMENU_NULL; // sanity
02777
02778     void *w = GetWidget(cmd);
02779     if(w == 0L)
02780         return;
02781
02782 #ifdef WIN32
02783     CWnd *wnd = (CWnd *)w;
02784
02785     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02786     {
02787     }
02788 #endif
02789 #if qMacPP
02790     LPane *view = (LPane *)w;
02791     LMenuController *popup;
02792     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02793     {
02794         MenuHandle hdl = popup->GetMacMenuH();
02795         if(hdl != 0L)
02796 #   if ACCESSOR_CALLS_ARE_FUNCTIONS
02797             *menu = GetMenuID(hdl);
02798 #   else
02799             *menu = (**hdl).menuID;
02800 #   endif
02801     }
02802 #endif
02803 }

Here is the call graph for this function:

int UWidget::OnComboGetPos | ( | int | cmd,
 |  | UStr * | txt
 | ) | [protected]

EV_COMBO_GETSEL UWidget message handling.

Definition at line 2805 of file uwidget.cpp.

References GetWidget().

02806 {
02807     int res = -1; // sanity
02808     if(txt != 0L)
02809         *txt = "";
02810
02811     void *w = GetWidget(cmd);
02812     if(w == 0L)
02813         return res;
02814
02815 #ifdef WIN32
02816     CWnd *wnd = (CWnd *)w;
02817
02818     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02819     {
02820         CComboBox *combo = (CComboBox *)wnd;
02821         res = combo->GetCurSel();
02822         if(res != -1 && txt != 0L)
02823         {
02824             CString s;
02825             combo->GetLBText(res, s);
02826             *txt = s;
02827         }
02828     }
02829 #endif
02830 #ifdef qGTK
02831     if(GTK_IS_COMBO(w))
02832     {
02833         GtkList *list = (GtkList*)GTK_COMBO(w)->list;
02834         GtkWidget *data = (GtkWidget*) list->selection->data;
02835
02836         res = gtk_list_child_position(GTK_LIST(list), (GtkWidget*)data);
02837     }
02838     else if(GTK_IS_OPTION_MENU(w))
02839     {
02840
02841     }
02842 #endif
02843 #if qMacAPP
02844     TView *view = (TView *)w;
02845     if(MA_MEMBER(view, TPopup))
02846     {
02847         TPopup *popup = (TPopup *)view;
02848         res = popup->GetCurrentItem() - 1;
02849         if(txt != 0L)
02850         {
02851             CStr255_AC pstr = popup->GetItemText(res + 1);
02852             *txt = pstr;
02853         }
02854     }
02855 #endif
02856 #if qMacPP
02857     LPane *view = (LPane *)w;
02858     LMenuController *popup;
02859     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02860     {
02861         res = popup->GetCurrentMenuItem() - 1;
02862         if(txt != 0L)
02863         {
02864             LStr255 pstr;
02865             popup->GetMenuItemText(res + 1, pstr);
02866             *txt = pstr;
02867         }
02868     }
02869 #endif
02870
02871     return res;
02872 }

Here is the call graph for this function:

void UWidget::OnComboResetAll ( int cmd ) [protected]

EV_COMBO_RESETALL UWidget message handling.

Definition at line 2553 of file uwidget.cpp.

References GetWidget(), and gTurnOffBroadcast.

02554 {
02555     void *w = GetWidget(cmd);
02556     if(w == 0L)
02557         return;
02558
02559 #ifdef WIN32
02560     CWnd *wnd = (CWnd *)w;
02561
02562     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02563     {
02564         CComboBox *combo = (CComboBox *)wnd;
02565         combo->ResetContent();
02566     }
02567 #endif
02568 #if qGTK
02569     if(GTK_IS_COMBO(w))
02570     {
02571         GtkList *listbox = GTK_LIST( GTK_COMBO(w)->list );
02572         if(listbox && listbox->children != 0L)
02573             gtk_list_remove_items( listbox, g_list_copy(listbox->children));
02574     }
02575     else if(GTK_IS_OPTION_MENU(w))
02576     {
02577         GtkWidget *menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(w));
02578         GList *list = g_list_copy(GTK_MENU_SHELL(menu)->children);
02579         GList *head = list;
02580         while(list != 0L)
02581         {
02582             GtkWidget *wid = GTK_WIDGET(list->data);
02583             gtk_container_remove(GTK_CONTAINER(menu), wid);
02584             list = (GList *)g_list_next(list);
02585         }
02586         g_list_free(head);
02587     }
02588 #endif
02589 #if qMacPP
02590     LPane *view = (LPane *)w;
02591     LMenuController *popup;
02592     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02593     {
02594         USemaphore policeman(gTurnOffBroadcast);
02595
02596         popup->DeleteAllMenuItems();
02597     }
02598 #endif
02599 #if qMacAPP
02600     TView *view = (TView *)w;
02601     if(MA_MEMBER(view, TPopup))
02602     {
02603         TPopup *popup = (TPopup *)view;
02604         while(popup->GetNumberOfItems() > 0)
02605             popup->DeleteItem(1);
02606     }
02607 #endif
02608 }

Here is the call graph for this function:

void UWidget::OnComboSetPos | ( | int | cmd,
 |  | int | sel
 | ) | [protected]

EV_COMBO_SETSEL UWidget message handling.

Definition at line 2674 of file uwidget.cpp.

References GetWidget(), and gTurnOffBroadcast.

02675 {
02676     void *w = GetWidget(cmd);
02677     if(w == 0L)
02678         return;
02679
02680 #ifdef WIN32
02681     CWnd *wnd = (CWnd *)w;
02682
02683     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02684     {
02685         CComboBox *combo = (CComboBox *)wnd;
02686         combo->SetCurSel(sel);
02687     }
02688 #endif
02689 #if qGTK
02690     if(GTK_IS_COMBO(w))
02691     {
02692         GtkWidget *list = GTK_COMBO(w)->list;
02693         gtk_list_select_item(GTK_LIST(list), sel);
02694     }
02695     else if(GTK_IS_OPTION_MENU(w))
02696     {
02697         gtk_option_menu_set_history (GTK_OPTION_MENU(w), sel);
02698     }
02699
02700 #endif
02701 #if qMacAPP
02702     TView *view = (TView *)w;
02703     if(MA_MEMBER(view, TPopup))
02704     {
02705         TPopup *popup = (TPopup *)view;
02706         popup->SetCurrentItem(sel + 1, true);
02707     }
02708 #endif
02709 #if qMacPP
02710     LPane *view = (LPane *)w;
02711     LMenuController *popup;
02712     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02713     {
02714         USemaphore policeman(gTurnOffBroadcast);
02715
02716         popup->SetCurrentMenuItem(sel + 1);
02717     }
02718 #endif
02719 }

Here is the call graph for this function:

void UWidget::OnEnableCmd | ( | int | cmd,
 |  | int | state
 | ) | [protected]

  • cmd the sub-widget
  • state of the widget to enable/disable (grayed)

Definition at line 1510 of file uwidget.cpp.

References GetWidget().

01511 {
01512     void *w = GetWidget(cmd);
01513     if(w == 0L)
01514         return;
01515
01516 #if qMacPP
01517     LPane *view = (LPane *)w;
01518     if(state)
01519         view->Enable();
01520     else
01521         view->Disable();
01522 #endif
01523 #if qMacAPP
01524     TView *view = (TView *)w;
01525     if(MA_MEMBER(view, TView))
01526     {
01527         view->SetActiveState(state != 0, true);
01528     }
01529 #endif
01530 #if qGTK
01531     if(GTK_IS_WIDGET(w))
01532     {
01533         gtk_widget_set_sensitive(GTK_WIDGET(w), state != 0);
01534     }
01535 #endif
01536 #ifdef WIN32
01537     CWnd *wnd = (CWnd *)w;
01538
01539     wnd->EnableWindow(state != 0);
01540 #endif
01541 }

Here is the call graph for this function:

int UWidget::OnFetchCmd | ( | int | cmd,
 |  | void * | widget
 | ) | [protected]

EV_FETCHCMD UWidget message handling.

Definition at line 3837 of file uwidget.cpp.

References m_widgets.

03838 {
03839     std::map<int, void *>::const_iterator i;
03840     for(i = m_widgets.begin(); i != m_widgets.end(); ++i)
03841     {
03842         if(widget == (*i).second)
03843             return (*i).first;
03844     }
03845     return -1;
03846 }

void UWidget::OnGetFloat | ( | int | cmd,
 |  | float * | f
 | ) | [protected]

  • cmd the sub-widget
  • f the float value the to get

Definition at line 1301 of file uwidget.cpp.

References TPseudoDoubleNumberText::GetValue(), GetWidget(), and stat.

01302 {
01303     *f = 0.0; // sanity
01304
01305     void *w = GetWidget(cmd);
01306     if(w == 0L)
01307         return;
01308
01309 #if qMacPP
01310     LPane *view = (LPane *)w;
01311     LEditText *edit;
01312     LStaticText *stat;
01313     if((edit = dynamic_cast<LEditText *>(view)) != 0L)
01314     {
01315         LStr255 pstr;
01316         edit->GetText(pstr);
01317         *f = (double)pstr;
01318     }
01319     else if((stat = dynamic_cast<LStaticText *>(view)) != 0L)
01320     {
01321         LStr255 pstr;
01322         stat->GetText(pstr);
01323         *f = (double)pstr;
01324     }
01325 #endif
01326 #if qMacAPP
01327     TView *view = (TView *)w;
01328     if(MA_MEMBER(view, TPseudoDoubleNumberText))
01329     {
01330         TPseudoDoubleNumberText *num = (TPseudoDoubleNumberText *)view;
01331         *f = num->GetValue();
01332     }
01333 #endif
01334 #ifdef WIN32
01335     CWnd *wnd = (CWnd *)w;
01336
01337     CString s;
01338     wnd->GetWindowText(s);
01339     sscanf(s, "%f", f);
01340 #endif
01341 }

Here is the call graph for this function:

void UWidget::OnGetLoc | ( | int | cmd,
 |  | URECT * | r
 | ) | [protected]

  • cmd the sub-widget
  • r get the position of the widget relative to its parent

Definition at line 854 of file uwidget.cpp.

References URECT::bottom, GetWidget(), URECT::left, URECT::right, and URECT::top.

00855 {
00856     r->left = 0; // sanity
00857     r->right = 0;
00858     r->top = 0;
00859     r->bottom = 0;
00860
00861     void *w = GetWidget(cmd);
00862     if(w == 0L)
00863         return;
00864
00865 #if qMacAPP
00866     TView *view = (TView *)w;
00867     CViewRect mr = view->GetFrame();
00868     view->SuperViewToLocal(mr);
00869     view->LocalToRootView(mr);
00870     r->left = mr.left;
00871     r->right = mr.right;
00872     r->top = mr.top;
00873     r->bottom = mr.bottom;
00874 #endif
00875 #if qMacPP
00876     LPane *view = (LPane *)w;
00877     SPoint32 outLocation;
00878     SDimension16 outSize;
00879     view->GetFrameLocation(outLocation);
00880     view->GetFrameSize(outSize);
00881
00882     *r = URect(UPoint(outLocation.h, outLocation.v), USize(outSize.width, outSize.height));
00883 #endif
00884 #ifdef WIN32
00885     CRect mr;
00886     CWnd *wnd = (CWnd *)w;
00887     wnd->GetClientRect(mr);
00888     CWnd *parent = wnd->GetParent();
00889     if(parent != 0L)
00890     {
00891         wnd->ClientToScreen(mr);
00892         parent->ScreenToClient(mr);
00893     }
00894     r->left = mr.left;
00895     r->right = mr.right;
00896     r->top = mr.top;
00897     r->bottom = mr.bottom;
00898 #endif
00899 }

Here is the call graph for this function:

void UWidget::OnGetSliderProperty | ( | int | cmd,
 |  | USLIDER * | prop
 | ) | [protected]

  • cmd the sub-widget
  • prop get the informations about this scroller/slider

Definition at line 1939 of file uwidget.cpp.

References LPseudoWinAttachment::GetPageValue(), GetWidget(), USLIDER::inc, macpp_getattachwindow(), USLIDER::max, USLIDER::min, and USLIDER::pos.

01940 {
01941     void *w = GetWidget(cmd);
01942     if(w == 0L)
01943         return;
01944
01945 #ifdef WIN32
01946     CWnd *wnd = (CWnd *)w;
01947
01948     if(wnd->IsKindOf(RUNTIME_CLASS(CSliderCtrl)))
01949     {
01950         CSliderCtrl *slider = (CSliderCtrl *)wnd;
01951         prop->max = slider->GetRangeMax();
01952         prop->min = slider->GetRangeMin();
01953         prop->inc = slider->GetPageSize();
01954         prop->pos = slider->GetPos();
01955     }
01956     else if(wnd->IsKindOf(RUNTIME_CLASS(CScrollBar)))
01957     {
01958         SCROLLINFO info;
01959         CScrollBar *scroll = (CScrollBar *)wnd;
01960         VERIFY(scroll->GetScrollInfo(&info));
01961         prop->max = info.nMax;
01962         prop->min = info.nMin;
01963         prop->inc = info.nPage;
01964         prop->pos = info.nPos;
01965     }
01966 #endif
01967 #if qMacAPP
01968     TView *view = (TView *)w;
01969     if(MA_MEMBER(view, TSlider) || MA_MEMBER(view, TScrollBar))
01970     {
01971         TCtlMgr *ctrl = (TCtlMgr *)view;
01972         prop->max = ctrl->GetMaximum();
01973         prop->min = ctrl->GetMinimum();
01974         if(MA_MEMBER(ctrl, TPseudoScrollBar))
01975             prop->inc = ((TPseudoScrollBar *)ctrl)->fPageStep;
01976         else
01977             prop->inc = 1;
01978         prop->pos = ctrl->GetValue();
01979     }
01980 #endif
01981 #if qMacPP
01982     LPane *view = (LPane *)w;
01983     LControl *ctrl;
01984     if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
01985     {
01986         prop->max = ctrl->GetMaxValue();
01987         prop->min = ctrl->GetMinValue();
01988         LPseudoWinAttachment *attach = macpp_getattachwindow(this);
01989         prop->inc = attach != 0L ? attach->GetPageValue(cmd) : 1;
01990         prop->pos = ctrl->GetValue();
01991     }
01992 #endif
01993 }

Here is the call graph for this function:

int UWidget::OnGetState ( int cmd ) [protected]

EV_QUERYSTATE message handling

  • cmd the sub-widget.

Returns:
0 or 1 if the widget is checked/pushed...
Definition at line 1178 of file uwidget.cpp.

References CPseudoRotButton::GetCurrent(), UPseudoRotButton::GetCurrentState(), CPseudoToggle::GetState(), GetWidget(), and stat.

01179 {
01180     void *w = GetWidget(cmd);
01181     if(w == 0L)
01182         return 0;
01183
01184     int state = 0; // sanity
01185
01186 #ifdef WIN32
01187     CWnd *wnd = (CWnd *)w;
01188
01189     if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoRotButton)))
01190     {
01191         CPseudoRotButton *btn = (CPseudoRotButton *)wnd;
01192         state = btn->GetCurrent();
01193     }
01194     else if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoToggle)))
01195     {
01196         CPseudoToggle *btn = (CPseudoToggle *)wnd;
01197         state = btn->GetState();
01198     }
01199     else if(wnd->IsKindOf(RUNTIME_CLASS(CButton)))
01200     {
01201         CButton *btn = (CButton *)wnd;
01202         state = btn->GetCheck() != 0;
01203     }
01204     else
01205     {
01206         CString s;
01207         wnd->GetWindowText(s);
01208         sscanf(s, "%d", &state);
01209     }
01210 #endif
01211 #if qGTK
01212     if(GTK_IS_TOGGLE_BUTTON(w))
01213     {
01214         state = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)) != 0;
01215     }
01216     else if(GTK_IS_ENTRY(w))
01217     {
01218         gchar *text = gtk_entry_get_text(GTK_ENTRY(w));
01219         sscanf(text, "%d", &state);
01220     }
01221 #endif
01222 #if qMacPP
01223     LPane *view = (LPane *)w;
01224     LCheckBox *check;
01225     LRadioButton *rad;
01226     LEditText *edit;
01227     LStaticText *stat;
01228     LBevelButton *bevel;
01229     UPseudoRotButton *rot;
01230     LCheckBoxGroupBox *groupbox;
01231     LPageController *tabctrl;
01232     LTabsControl *tabctrl2;
01233     LControl *ctrl;
01234     if((check = dynamic_cast<LCheckBox *>(view)) != 0L)
01235     {
01236         state = check->GetValue() == Button_On ? 1 : 0;
01237     }
01238     else if((rad = dynamic_cast<LRadioButton *>(view)) != 0L)
01239     {
01240         state = rad->GetValue() == Button_On ? 1 : 0;
01241     }
01242     else if((edit = dynamic_cast<LEditText *>(view)) != 0L)
01243     {
01244         LStr255 pstr;
01245         edit->GetText(pstr);
01246         state = (SInt32)pstr;
01247     }
01248     else if((stat = dynamic_cast<LStaticText *>(view)) != 0L)
01249     {
01250         LStr255 pstr;
01251         stat->GetText(pstr);
01252         state = (SInt32)pstr;
01253     }
01254     else if((groupbox = dynamic_cast<LCheckBoxGroupBox *>(view)) != 0L)
01255     {
01256         state = groupbox->GetValue() == Button_On ? 1 : 0;
01257     }
01258     else if((rot = dynamic_cast<UPseudoRotButton *>(view)) != 0L)
01259     {
01260         state = rot->GetCurrentState();
01261     }
01262     else if((bevel = dynamic_cast<LBevelButton *>(view)) != 0L)
01263     {
01264         state = bevel->GetValue() == Button_On ? 1 : 0;
01265     }
01266     else if((tabctrl = dynamic_cast<LPageController *>(view)) != 0L)
01267     {
01268         state = tabctrl->GetCurrentPageIndex() - 1;
01269     }
01270     else if((tabctrl2 = dynamic_cast<LTabsControl *>(view)) != 0L)
01271     {
01272         state = tabctrl2->GetValue() - 1;
01273     }
01274     else if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
01275     {
01276         state = ctrl->GetValue();
01277     }
01278 #endif
01279 #if qMacAPP
01280     TView *view = (TView *)w;
01281     if(MA_MEMBER(view, TCheckBox))
01282     {
01283         TCheckBox *check = (TCheckBox *)view;
01284         state = check->GetState();
01285     }
01286     else if(MA_MEMBER(view, TRadio))
01287     {
01288         TRadio *rad = (TRadio *)view;
01289         state = rad->GetState();
01290     }
01291     else if(MA_MEMBER(view, TNumberText))
01292     {
01293         TNumberText *num = (TNumberText *)view;
01294         state = num->GetValue();
01295     }
01296 #endif
01297
01298     return state;
01299 }

Here is the call graph for this function:

void UWidget::OnGetText | ( | int | cmd,
 |  | UStr * | text
 | ) | [protected]

  • cmd the sub-widget
  • text is filled with the widget caption

Definition at line 1765 of file uwidget.cpp.

References getLabelFromContainer(), GetWidget(), and UStr::set().

01766 {
01767     *text = ""; // sanity
01768
01769     void *w = GetWidget(cmd);
01770     if(w == 0L)
01771         return;
01772
01773 #ifdef WIN32
01774     CWnd *wnd = (CWnd *)w;
01775
01776     CString s;
01777     wnd->GetWindowText(s);
01778     *text = s;
01779 #endif
01780 #if qGTK
01781     if(GTK_IS_WINDOW(w))
01782     {
01783         *text = GTK_WINDOW(w)->title;
01784     }
01785     else if(GTK_IS_BUTTON(w))
01786     {
01787         GtkLabel *label = getLabelFromContainer(GTK_CONTAINER(w));
01788         if(label != 0L)
01789         {
01790             gchar *str;
01791             gtk_label_get(label, &str);
01792
01793             if(str != 0L)
01794                                 *text = str;
01795         }
01796         else
01797             g_warning("Cannot find the label of '%s'\n", gtk_widget_get_name(GTK_WIDGET(w)));
01798     }
01799     else if(GTK_IS_ENTRY(w))
01800     {
01801         *text = gtk_entry_get_text(GTK_ENTRY(w));
01802     }
01803     else if(GTK_IS_COMBO(w))
01804     {
01805         *text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(w)->entry));
01806     }
01807     else if(GTK_IS_TEXT(w))
01808     {
01809         GtkText *t = GTK_TEXT(w);
01810         size_t size = gtk_text_get_length(t);
01811         size_t idx;
01812
01813         for (idx = 0; idx < size; idx++) {
01814             *text << (char)GTK_TEXT_INDEX(t,idx);
01815         }
01816     }
01817     else if(GTK_IS_LABEL(w))
01818     {
01819         GtkLabel *t = GTK_LABEL(w);
01820         gchar *str;
01821         gtk_label_get(t, &str);
01822         if(str != 0L)
01823             *text = str;
01824     }
01825 #endif
01826 #if qMacPP
01827     LPane *view = (LPane *)w;
01828     LTextEditView *txt;
01829     if((txt = dynamic_cast<LTextEditView *>(view)) != 0L)
01830     {
01831         LStr255 pstr;
01832         Handle hdl = txt->GetTextHandle();
01833         text->set((const char *)*hdl, ::GetHandleSize(hdl));
01834     }
01835     else
01836     {
01837         LStr255 pstr;
01838         view->GetDescriptor(pstr);
01839         *text = pstr;
01840     }
01841 #endif
01842 #if qMacAPP
01843     TView *view = (TView *)w;
01844     if(MA_MEMBER(view, TCtlMgr))
01845     {
01846         TCtlMgr *ctrl = (TCtlMgr *)view;
01847         CStr255_AC pstr = ctrl->GetText();
01848         *text = pstr;
01849     }
01850     else if(MA_MEMBER(view, TStaticText))
01851     {
01852         TStaticText *ctrl = (TStaticText *)view;
01853         CStr255_AC pstr = ctrl->GetText();
01854         *text = pstr;
01855     }
01856     else if(MA_MEMBER(view, TWindow))
01857     {
01858         TWindow *ctrl = (TWindow *)view;
01859         CStr255_AC pstr = ctrl->GetTitle();
01860         *text = pstr;
01861     }
01862 #endif
01863 }

Here is the call graph for this function:

void UWidget::OnInitTabWidget | ( | int | cmd,
 |  | int | page,
 |  | void * | widget
 | ) | [protected]

  • cmd the sub-widget page holder
  • page the location for the page insertion
  • widget the native pointer/handle for the sub-widget page

Warning:
not implemented yet on Win32
Definition at line 1144 of file uwidget.cpp.

References UCmdTarget::GetWidID().

01145 {
01146 #if qGTK
01147     if(GTK_IS_WIDGET(widget))
01148     {
01149         // extract and map to the pseudo widget the sub-widgets begining with 'kUgtkPrefixToken'
01150         _dataTabForeach data = {GetWidID(), cmd, page};
01151         g_datalist_foreach (&GTK_OBJECT(widget)->object_data, dataTabForeach, (gpointer)&data);
01152     }
01153 #endif /* qGTK */
01154 }

Here is the call graph for this function:

void UWidget::OnInitWidget | ( | int | cmd,
 |  | void * | widget
 | ) | [protected]

  • cmd the sub-widget
  • widget the native pointer/handle for the sub-widget

Definition at line 969 of file uwidget.cpp.

References EV_CREATE, UCmdTarget::GetWidID(), USemaphore::IsEnteredTwice(), kUMainWidget, m_widgets, macpp_fecthview(), macpp_linkbroadcasters(), NEW, NULL, TPseudoWinAdorner::SetPseudoWidget(), TPseudoWinBehavior::SetPseudoWidget(), UEventSendMessage(), and UMAKEINT.

00970 {
00971     std::map<int, void *>::value_type val(cmd, widget);
00972     m_widgets.insert(val);
00973
00974 #ifdef WIN32
00975
00976 #endif
00977 #if qMacPP
00978     LPane *view = (LPane *)widget;
00979     if(view != 0L)
00980     {
00981         // fetch the inside widgets and add them the the widget list
00982         static bool sSemaphore = false;
00983         USemaphore policeman(sSemaphore);
00984         if(!policeman.IsEnteredTwice())
00985         {
00986             macpp_fecthview(GetWidID(), view);
00987         }
00988
00989         LWindow *wind = dynamic_cast<LWindow*>(view);
00990         if(wind != 0L)
00991         {
00992             LPseudoWinAttachment *attach = NEW LPseudoWinAttachment(GetWidID());
00993             wind->AddAttachment(attach);
00994             macpp_linkbroadcasters(wind, attach);
00995
00996             SPaneInfo inPaneInfo;
00997             memset(&inPaneInfo, 0, sizeof(SPaneInfo));
00998             inPaneInfo.superView = wind;
00999             NEW UPseudoFakePane(inPaneInfo, attach);
01000
01001             // call the create callback
01002             UEventSendMessage(GetWidID(), EV_CREATE, 0, 0L);
01003         }
01004     }
01005 #endif
01006 #if qMacAPP
01007     TView *view = (TView *)widget;
01008     if(MA_MEMBER(view, TView))
01009     {
01010         // fetch the inside widgets and add them the the widget list
01011         static bool sSemaphore = false;
01012         USemaphore policeman(sSemaphore);
01013         if(!policeman.IsEnteredTwice())
01014         {
01015             macapp_fecthview(GetWidID(), view);
01016             //macapp_workaround_adlib_bug(view);
01017         }
01018
01019         if(MA_MEMBER(view, TWindow))
01020         {
01021             // add the pseudo behaviour which re-routes the events to the pseudo-widget
01022             TPseudoWinBehavior *psbehavior = dynamic_cast_AC(TPseudoWinBehavior*,
01023                 view->GetBehaviorWithIdentifier(TPseudoWinBehavior::kPseudoWinBehavior));
01024
01025             if(psbehavior == 0L)
01026             {
01027                 psbehavior = TH_new TPseudoWinBehavior;
01028                 view->AddBehavior(psbehavior);
01029             }
01030             psbehavior->SetPseudoWidget(GetWidID());
01031
01032             // add the pseudo adorner which intercepts the frame size changes
01033             TPseudoWinAdorner *psadorner = dynamic_cast_AC(TPseudoWinAdorner*,
01034                 view->AdornerWithID(TPseudoWinAdorner::kPseudoWinAdorner));
01035
01036             if(psadorner == 0L)
01037             {
01038                 psadorner = TH_new TPseudoWinAdorner;
01039                 view->AddAdorner(psadorner, kAdornLast, false);
01040             }
01041             psadorner->SetPseudoWidget(GetWidID());
01042
01043             // call the create callback
01044             UEventSendMessage(GetWidID(), EV_CREATE, 0, 0L);
01045         }
01046     }
01047 #endif
01048 #if qGTK
01049     static bool firstTime = true;
01050     if(firstTime)
01051     {
01052         // for the disable/enable handling notification (EV_UPDATEUI)
01053         gdk_event_handler_set((GdkEventFunc)gtkmaindoevent, NULL, NULL);
01054
01055         // listen focus events
01056         focus_in_signal_id = gtk_signal_lookup ("focus_in_event", GTK_TYPE_WIDGET);
01057         gtk_signal_add_emission_hook (focus_in_signal_id, gtkeventwatcher, NULL);
01058         focus_out_signal_id = gtk_signal_lookup ("focus_out_event", GTK_TYPE_WIDGET);
01059         gtk_signal_add_emission_hook (focus_out_signal_id, gtkeventwatcher, NULL);
01060
01061         firstTime = false;
01062     }
01063
01064     // so for every widget mapped, we'll be able to find the pseudo-widget associated with.
01065     gtk_object_set_data(GTK_OBJECT(widget), kUgtkDataToken, (gpointer)UMAKEINT(GetWidID(), cmd));
01066
01067     // we are only interesting about the main widgets here
01068     if(GTK_IS_WIDGET(widget))
01069     {
01070         if(cmd == kUMainWidget)
01071         {
01072             // extract and map to the pseudo widget the sub-widgets begining with 'kUgtkPrefixToken'
01073             g_datalist_foreach (&GTK_OBJECT(widget)->object_data, dataForeach, (gpointer)GetWidID());
01074
01075             // map the destroy callback
01076             gtk_signal_connect (GTK_OBJECT(widget), "destroy",
01077                                 GTK_SIGNAL_FUNC(gtkdestroy), (gpointer)this);
01078
01079             gtk_signal_connect (GTK_OBJECT(widget), "key_press_event",
01080                                 GTK_SIGNAL_FUNC(gtkkeypress), (gpointer)this);
01081
01082             // call the create callback
01083             UEventSendMessage(GetWidID(), EV_CREATE, 0, 0L);
01084         }
01085     }
01086
01087     if(GTK_IS_NOTEBOOK(widget))
01088     {
01089         gtk_signal_connect (GTK_OBJECT(widget), "switch_page",
01090                             GTK_SIGNAL_FUNC(gtkswitchpage),
01091                             (gpointer)UMAKEINT(GetWidID(), cmd));
01092     }
01093
01094     if(GTK_IS_BUTTON(widget))
01095     {
01096         gtk_signal_connect (GTK_OBJECT(widget), "clicked",
01097             GTK_SIGNAL_FUNC(gtkclicked), (gpointer)UMAKEINT(GetWidID(), cmd));
01098     }
01099
01100     if(GTK_IS_MENU_ITEM(widget))
01101     {
01102         gtk_signal_connect(GTK_OBJECT(widget), "activate",
01103             GTK_SIGNAL_FUNC(gtkmenuitemactivate), (gpointer)UMAKEINT(GetWidID(), cmd));
01104     }
01105
01106     if(GTK_IS_COMBO(widget))
01107     {
01108         gtk_signal_connect(GTK_OBJECT(GTK_COMBO(widget)->entry), "activate",
01109             GTK_SIGNAL_FUNC(gtkclicked), (gpointer)UMAKEINT(GetWidID(), cmd));
01110     }
01111
01112     if(GTK_IS_CLIST(widget))
01113     {
01114         gtk_signal_connect (GTK_OBJECT(widget), "select_row",
01115             GTK_SIGNAL_FUNC(gtkselectclist), (gpointer)UMAKEINT(GetWidID(), cmd));
01116
01117         gtk_signal_connect (GTK_OBJECT(widget), "click_column",
01118             GTK_SIGNAL_FUNC(gtkselectclistcolumn), (gpointer)UMAKEINT(GetWidID(), cmd));
01119
01120         gtk_signal_connect_after (GTK_OBJECT (widget), "button_press_event",
01121                                   GTK_SIGNAL_FUNC (gtkclistdblclick), (gpointer)UMAKEINT(GetWidID(), cmd));
01122     }
01123
01124     if(GTK_IS_DRAWING_AREA(widget))
01125     {
01126         gtk_signal_connect_after (GTK_OBJECT(widget), "button_press_event",
01127                                   GTK_SIGNAL_FUNC(gtklayoutclicked), (gpointer)UMAKEINT(GetWidID(), cmd));
01128         gtk_signal_connect (GTK_OBJECT(widget), "expose_event",
01129                             GTK_SIGNAL_FUNC (gtkexposeevent), (gpointer)UMAKEINT(GetWidID(), cmd));
01130         gtk_widget_set_events (GTK_WIDGET(widget), GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
01131     }
01132
01133     if(GTK_IS_LAYOUT(widget))
01134     {
01135         gtk_signal_connect_after (GTK_OBJECT(widget), "button_press_event",
01136                                   GTK_SIGNAL_FUNC(gtklayoutclicked), (gpointer)UMAKEINT(GetWidID(), cmd));
01137         gtk_signal_connect (GTK_OBJECT(widget), "expose_event",
01138                             GTK_SIGNAL_FUNC (gtkexposeevent), (gpointer)UMAKEINT(GetWidID(), cmd));
01139         gtk_widget_set_events (GTK_WIDGET(widget), GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
01140     }
01141 #endif /* qGTK */
01142 }

Here is the call graph for this function:

void UWidget::OnInvalidate ( int cmd ) [protected]

  • cmd the sub-widget to redraw (delayed)

Definition at line 1614 of file uwidget.cpp.

References GetWidget().

01615 {
01616     void *w = GetWidget(cmd);
01617     if(w == 0L)
01618         return;
01619
01620 #if qMacAPP
01621     TView *view = (TView *)w;
01622     if(MA_MEMBER(view, TView))
01623     {
01624         view->ForceRedraw();
01625     }
01626 #endif
01627 #if qMacPP
01628     LPane *pane = (LPane *)w;
01629     pane->Refresh();
01630 #endif
01631 #ifdef WIN32
01632     CWnd *wnd = (CWnd *)w;
01633
01634     wnd->Invalidate();
01635 #endif
01636 }

Here is the call graph for this function:

void UWidget::OnIsEnabled ( int cmd ) [protected]

  • cmd the sub-widget
  • state of the widget enable/disable (grayed)

void UWidget::OnListAddColumns | ( | int | cmd,
 |  | int | num
 | ) | [protected]

EV_LIST_ADDCOLUMNS UWidget message handling.

Definition at line 3031 of file uwidget.cpp.

References GetWidget(), kUMainWidget, and macpp_preparetable().

03032 {
03033     void *w = GetWidget(cmd);
03034     if(w == 0L)
03035         return;
03036
03037 #if qGTK
03038     if(!GTK_IS_CLIST(w))
03039         return;
03040
03041     //GtkCList *list = GTK_CLIST(w);
03042         // don't know how to do that, for now it relies on glade settings
03043
03044 #endif
03045 #ifdef WIN32
03046     CWnd *wnd = (CWnd *)w;
03047
03048     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03049     {
03050         CListCtrl *list = (CListCtrl *)wnd;
03051         DWORD dwExStyle = ListView_GetExtendedListViewStyle(list->m_hWnd);
03052         dwExStyle |= LVS_EX_FULLROWSELECT;
03053         ListView_SetExtendedListViewStyle(list->m_hWnd, dwExStyle);
03054
03055         while(num--)
03056             list->InsertColumn(0, "", LVCFMT_LEFT, 80);
03057     }
03058 #endif
03059 #if qMacPP
03060     LPane *view = (LPane *)w;
03061     LOutlineTable *table;
03062     LTextTableView *tabtext;
03063     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03064     {
03065         macpp_preparetable(table);
03066         table->InsertCols( num, 0, nil, nil, false );
03067     }
03068     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03069     {
03070         macpp_preparetable(GetWidget(kUMainWidget), tabtext);
03071         tabtext->InsertCols( num, 0, nil, nil, false );
03072     }
03073 #endif
03074 }

Here is the call graph for this function:

void UWidget::OnListAddSel | ( | int | cmd,
 |  | int | entry
 | ) | [protected]

EV_LIST_ADDSEL UWidget message handling.

Definition at line 3206 of file uwidget.cpp.

References GetWidget().

03207 {
03208     void *w = GetWidget(cmd);
03209     if(w == 0L)
03210         return;
03211
03212 #if qMacAPP
03213     TView *view = (TView *)w;
03214     if(MA_MEMBER(view, TPseudoTextListView))
03215     {
03216         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03217         txt->SelectItem(entry + 1, false, true, true);
03218     }
03219 #endif
03220 #if qGTK
03221     if(!GTK_IS_CLIST(w))
03222         return;
03223
03224     GtkCList *list = GTK_CLIST(w);
03225     gtk_clist_select_row(list, entry, 0);
03226 #endif
03227 #ifdef WIN32
03228     CWnd *wnd = (CWnd *)w;
03229
03230     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03231     {
03232         CListCtrl *list = (CListCtrl *)wnd;
03233         VERIFY(list->SetItemState(entry, LVIS_SELECTED, LVIS_SELECTED));
03234         VERIFY(list->EnsureVisible(entry, true));
03235     }
03236 #endif
03237 #if qMacPP
03238     LPane *view = (LPane *)w;
03239     LTableView *table;
03240     if((table = dynamic_cast<LTableView *>(view)) != 0L)
03241     {
03242         STableCell cell(entry + 1, 1);
03243         table->SelectCell(cell);
03244         table->ScrollCellIntoFrame(cell);
03245     }
03246 #endif
03247 }

Here is the call graph for this function:

void UWidget::OnListDelRow | ( | int | cmd,
 |  | int | row
 | ) | [protected]

EV_LIST_DELROW UWidget message handling.

Definition at line 3249 of file uwidget.cpp.

References TPseudoTextListView::DelItemAt(), and GetWidget().

03250 {
03251     void *w = GetWidget(cmd);
03252     if(w == 0L)
03253         return;
03254
03255 #if qMacAPP
03256     TView *view = (TView *)w;
03257     if(MA_MEMBER(view, TPseudoTextListView))
03258     {
03259         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03260         txt->DelItemAt(entry + 1, 1);
03261     }
03262 #endif
03263 #if qGTK
03264     if(!GTK_IS_CLIST(w))
03265         return;
03266
03267     GtkCList *list = GTK_CLIST(w);
03268     gtk_clist_remove(list, entry);
03269 #endif
03270 #ifdef WIN32
03271     CWnd *wnd = (CWnd *)w;
03272
03273     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03274     {
03275         CListCtrl *list = (CListCtrl *)wnd;
03276         VERIFY(list->DeleteItem(entry));
03277     }
03278 #endif
03279 #if qMacPP
03280     LPane *view = (LPane *)w;
03281     LOutlineTable *table;
03282     LTextTableView *tabtext;
03283     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03284     {
03285         LOutlineItem* item = table->FindItemForRow(entry + 1);
03286         if(item != 0L)
03287         {
03288             table->RemoveItem(item);
03289         }
03290     }
03291     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03292     {
03293         tabtext->RemoveRows(1, entry + 1, true);
03294     }
03295 #endif
03296 }

Here is the call graph for this function:

void UWidget::OnListGetInfo | ( | int | cmd,
 |  | ULIST_INFO * | desc
 | ) | [protected]

EV_LIST_GETINFO UWidget message handling.

Definition at line 3658 of file uwidget.cpp.

References ULIST_INFO::col, ULIST_INFO::data, TPseudoTextListView::GetItemText(), GetWidget(), CPseudoItem::m_data, CPseudoItem::m_texts, ULIST_INFO::row, UStr::set(), and ULIST_INFO::title.

03659 {
03660     // sanity
03661     desc->data = 0L;
03662     desc->title = 0L;
03663
03664     void *w = GetWidget(cmd);
03665     if(w == 0L)
03666         return;
03667
03668 #if qMacAPP
03669     TView *view = (TView *)w;
03670     if(MA_MEMBER(view, TPseudoTextListView))
03671     {
03672         static UStr cstr; // no good
03673
03674         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03675         CStr255_AC name = txt->GetItemText(desc->row + 1);
03676         cstr = name;
03677         desc->title = cstr;
03678     }
03679 #endif
03680 #if qGTK
03681     if(!GTK_IS_CLIST(w))
03682         return;
03683
03684     GtkCList *list = GTK_CLIST(w);
03685     desc->data = gtk_clist_get_row_data(list, desc->row);
03686     gtk_clist_get_text_is_buggy(list, desc->row, desc->col, (gchar **)&desc->title);
03687 #endif
03688 #ifdef WIN32
03689     CWnd *wnd = (CWnd *)w;
03690
03691     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03692     {
03693         CListCtrl *list = (CListCtrl *)wnd;
03694
03695         desc->data = (void *)list->GetItemData(desc->row);
03696         static CString s;
03697         s = list->GetItemText(desc->row, desc->col);
03698         desc->title = s;
03699     }
03700 #endif
03701 #if qMacPP
03702     LPane *view = (LPane *)w;
03703     LOutlineTable *table;
03704     LTextTableView *tabtext;
03705     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03706     {
03707         LOutlineItem *item = table->FindItemForRow(desc->row + 1);
03708         CPseudoItem *theItem;
03709         if((theItem = dynamic_cast<CPseudoItem *>(item)) != 0L)
03710         {
03711             std::map<int, UStr>::iterator i = theItem->m_texts.find(desc->col + 1);
03712             if(i != theItem->m_texts.end())
03713             {
03714                 desc->title = (*i).second;
03715             }
03716             desc->data = theItem->m_data;
03717         }
03718     }
03719     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03720     {
03721         STableCell cell(desc->row + 1, desc->col + 1);
03722         UInt32 ioDataSize = 255;
03723         char tmp[255];
03724         tabtext->GetCellData(cell, tmp, ioDataSize);
03725         static UStr res;
03726         res.set(tmp, ioDataSize);
03727         desc->title = res;
03728     }
03729 #endif
03730 }

Here is the call graph for this function:

int UWidget::OnListGetNext | ( | int | cmd,
 |  | int | whichCell
 | ) | [protected]

EV_LIST_GETNEXT UWidget message handling.

Definition at line 3522 of file uwidget.cpp.

References GetWidget().

03523 {
03524     void *w = GetWidget(cmd);
03525     if(w == 0L)
03526         return -1;
03527
03528 #if qGTK
03529     if(!GTK_IS_CLIST(w))
03530         return -1;
03531
03532     if(whichCell == -1)
03533         whichCell = 0;
03534     else
03535         whichCell++;
03536
03537     if(whichCell >= GTK_CLIST(w)->rows)
03538         whichCell = -1;
03539
03540     return whichCell;
03541 #endif
03542 #ifdef WIN32
03543     CWnd *wnd = (CWnd *)w;
03544
03545     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03546     {
03547         CListCtrl *list = (CListCtrl *)wnd;
03548         return list->GetNextItem(whichCell, LVNI_ALL);
03549     }
03550 #endif
03551 #if qMacPP
03552     LPane *view = (LPane *)w;
03553     LTableView *table;
03554     if((table = dynamic_cast<LTableView *>(view)) != 0L)
03555     {
03556         STableCell sel;
03557
03558         if(whichCell != -1)
03559         {
03560             sel.row = whichCell + 1;
03561             sel.col = 1;
03562         }
03563
03564         while(table->GetNextCell(sel))
03565         {
03566             if(sel.row != whichCell + 1)
03567                 return sel.row - 1;
03568         }
03569     }
03570 #endif
03571
03572     return -1;
03573 }

Here is the call graph for this function:

int UWidget::OnListGetNextSel | ( | int | cmd,
 |  | int | selectedCell
 | ) | [protected]

EV_LIST_GETNEXTSEL UWidget message handling.

Definition at line 3439 of file uwidget.cpp.

References GetWidget().

03440 {
03441     void *w = GetWidget(cmd);
03442     if(w == 0L)
03443         return -1;
03444
03445 #if qGTK
03446     if(!GTK_IS_CLIST(w))
03447         return -1;
03448
03449     GList *sel = GTK_CLIST(w)->selection;
03450     if(sel == 0L)
03451         return -1;
03452
03453     while(sel != 0L)
03454     {
03455         gint row = GPOINTER_TO_INT(sel->data);
03456         if(selectedCell == -1)
03457             return row;
03458
03459         sel = (GList *)g_list_next(sel);
03460
03461         if(selectedCell == row)
03462         {
03463             return sel == 0L ? -1 : GPOINTER_TO_INT(sel->data);
03464         }
03465     }
03466 #endif
03467 #if qMacAPP
03468     TView *view = (TView *)w;
03469     if(MA_MEMBER(view, TPseudoTextListView))
03470     {
03471         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03472         if(txt->FirstSelectedItem() == 0)
03473             return -1;
03474
03475         for(GridCoordinate c = 0; c < txt->GetNumOfRows(); ++c)
03476         {
03477             if(!txt->IsItemSelected(c + 1))
03478                 continue;
03479
03480             if(selectedCell == -1)
03481                 return c;
03482
03483             if(selectedCell == c)
03484                 selectedCell = -1; // so the next pick is the one
03485         }
03486     }
03487 #endif
03488 #ifdef WIN32
03489     CWnd *wnd = (CWnd *)w;
03490
03491     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03492     {
03493         CListCtrl *list = (CListCtrl *)wnd;
03494         return list->GetNextItem(selectedCell, LVNI_SELECTED);
03495     }
03496 #endif
03497 #if qMacPP
03498     LPane *view = (LPane *)w;
03499     LTableView *table;
03500     if((table = dynamic_cast<LTableView *>(view)) != 0L)
03501     {
03502         STableCell sel;
03503         if(selectedCell == -1)
03504         {
03505             sel = table->GetFirstSelectedCell();
03506             return sel.row - 1;
03507         }
03508
03509         sel.row = selectedCell + 1;
03510         sel.col = 1;
03511         while(table->GetNextSelectedCell(sel))
03512         {
03513             if(sel.row != selectedCell + 1)
03514                 return sel.row - 1;
03515         }
03516     }
03517 #endif
03518
03519     return -1;
03520 }

Here is the call graph for this function:

void UWidget::OnListHideColumns | ( | int | cmd,
 |  | int | num
 | ) | [protected]

EV_LIST_DELCOLUMNS UWidget message handling.

Definition at line 2995 of file uwidget.cpp.

References GetWidget().

02996 {
02997     void *w = GetWidget(cmd);
02998     if(w == 0L)
02999         return;
03000
03001 #if qGTK
03002     if(!GTK_IS_CLIST(w))
03003         return;
03004
03005     GtkCList *list = GTK_CLIST(w);
03006
03007     // one must always be visible. We use the first one
03008     for(int i=1; i< num; i++)
03009         gtk_clist_set_column_visibility (list, i, false);
03010 #endif
03011 }

Here is the call graph for this function:

void UWidget::OnListInsert | ( | int | cmd,
 |  | ULIST_INSERT * | data
 | ) | [protected]

EV_LIST_INSERT UWidget message handling.

Definition at line 3575 of file uwidget.cpp.

References ULIST_INSERT::col, GetWidget(), ULIST_INSERT::icon, TPseudoTextListView::InsStringLast(), CPseudoItem::m_texts, ULIST_INSERT::row, and ULIST_INSERT::title.

03576 {
03577     void *w = GetWidget(cmd);
03578     if(w == 0L)
03579         return;
03580
03581 #if qGTK
03582     if(!GTK_IS_CLIST(w))
03583         return;
03584
03585     GtkCList *list = GTK_CLIST(w);
03586
03587     if(data->title == 0L && data->icon == 0L)
03588         g_warning("Got an empty cell !\n");
03589     else if(data->title == 0L)
03590     {
03591         GtkPixmap *pix = GTK_PIXMAP(data->icon);
03592         gtk_clist_set_pixmap(list, data->row, data->col, pix->pixmap, pix->mask);
03593     }
03594     else if(data->icon == 0L)
03595     {
03596         gtk_clist_set_text(list, data->row, data->col, data->title);
03597     }
03598     else
03599     {
03600         GtkPixmap *pix = GTK_PIXMAP(data->icon);
03601         gtk_clist_set_pixtext(list, data->row, data->col, data->title, 2, pix->pixmap, pix->mask);
03602     }
03603 #endif
03604 #if qMacAPP
03605     TView *view = (TView *)w;
03606     if(MA_MEMBER(view, TPseudoTextListView))
03607     {
03608         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03609         //txt->InsStringBefore(data->row + 1, data->title);
03610         txt->InsStringLast(data->title);
03611     }
03612 #endif
03613 #ifdef WIN32
03614     CWnd *wnd = (CWnd *)w;
03615
03616     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03617     {
03618         CListCtrl *list = (CListCtrl *)wnd;
03619         if(data->col == 0)
03620         {
03621             LV_ITEM lvi;
03622             memset(&lvi, 0, sizeof(lvi));
03623             lvi.mask = LVIF_TEXT;
03624             lvi.iItem = data->row;
03625             lvi.iSubItem = 0;
03626             lvi.pszText = (char *)data->title;
03627
03628             list->InsertItem(&lvi);
03629         }
03630         else
03631         {
03632             list->SetItemText(data->row, data->col, data->title);
03633         }
03634     }
03635 #endif
03636 #if qMacPP
03637     LPane *view = (LPane *)w;
03638     LOutlineTable *table;
03639     LTextTableView *tabtext;
03640     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03641     {
03642         LOutlineItem *item = table->FindItemForRow(data->row + 1);
03643         CPseudoItem *theItem;
03644         if((theItem = dynamic_cast<CPseudoItem *>(item)) != 0L)
03645         {
03646             std::map<int, UStr>::value_type val(data->col + 1, UStr(data->title));
03647             theItem->m_texts.insert(val);
03648         }
03649     }
03650     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03651     {
03652         STableCell cell(data->row + 1, data->col + 1);
03653         tabtext->SetCellData(cell, data->title, strlen(data->title));
03654     }
03655 #endif
03656 }

Here is the call graph for this function:

void UWidget::OnListNewRow | ( | int | cmd,
 |  | int * | num
 | ) | [protected]

EV_LIST_NEWROW UWidget message handling.

Definition at line 3316 of file uwidget.cpp.

References GetWidget(), UCmdTarget::GetWidID(), and NEW.

03317 {
03318     *num = 0; // sanity
03319
03320     void *w = GetWidget(cmd);
03321     if(w == 0L)
03322         return;
03323
03324 #if qGTK
03325     if(!GTK_IS_CLIST(w))
03326         return;
03327
03328     gchar *emptyTxts[] = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""};
03329
03330     GtkCList *list = GTK_CLIST(w);
03331     *num = gtk_clist_append  (list, emptyTxts);
03332 #endif
03333 #if qMacAPP
03334     TView *view = (TView *)w;
03335     if(MA_MEMBER(view, TPseudoTextListView))
03336     {
03337         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03338         *num = txt->GetNumOfRows();
03339     }
03340 #endif
03341 #ifdef WIN32
03342     CWnd *wnd = (CWnd *)w;
03343
03344     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03345     {
03346         CListCtrl *list = (CListCtrl *)wnd;
03347         *num = list->GetItemCount();
03348     }
03349 #endif
03350 #if qMacPP
03351     LPane *view = (LPane *)w;
03352     LOutlineTable *table;
03353     LTextTableView *tabtext;
03354     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03355     {
03356         // Store this information in the list view
03357         CPseudoItem *theItem = NEW CPseudoItem(GetWidID(), cmd);
03358         if(theItem != 0L)
03359         {
03360             TableIndexT outRows, outCols;
03361             table->GetTableSize(outRows, outCols);
03362             // and insert it at the end of the table
03363             LOutlineItem *lastItem = table->FindItemForRow(outRows);
03364             table->InsertItem( theItem, nil, lastItem );
03365             *num = outRows;
03366         }
03367     }
03368     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03369     {
03370         TableIndexT outRows, outCols;
03371         tabtext->GetTableSize(outRows, outCols);
03372         tabtext->InsertRows(1, outRows);
03373         tabtext->AdjustImageSize(false);
03374         *num = outRows;
03375     }
03376 #endif
03377 }

Here is the call graph for this function:

void UWidget::OnListPopup | ( | int | cmd,
 |  | int | entry
 | ) | [protected]

EV_LIST_POPUP UWidget message handling.

void UWidget::OnListResetAll ( int cmd ) [protected]

EV_LIST_RESETALL UWidget message handling.

Definition at line 3151 of file uwidget.cpp.

References GetWidget(), kUMainWidget, macpp_preparetable(), and TPseudoTextListView::RemoveAll().

03152 {
03153     void *w = GetWidget(cmd);
03154     if(w == 0L)
03155         return;
03156
03157 #if qGTK
03158     if(!GTK_IS_CLIST(w))
03159         return;
03160
03161     GtkCList *list = GTK_CLIST(w);
03162     gtk_clist_clear(list);
03163 #endif
03164 #if qMacAPP
03165     TView *view = (TView *)w;
03166     if(MA_MEMBER(view, TPseudoTextListView))
03167     {
03168         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03169         txt->RemoveAll();
03170     }
03171 #endif
03172 #if qMacPP
03173     LPane *view = (LPane *)w;
03174     LOutlineTable *table;
03175     LTextTableView *tabtext;
03176     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03177     {
03178         macpp_preparetable(table);
03179         LArrayIterator iter(table->GetFirstLevelItems());
03180         LOutlineItem* item;
03181         while (iter.Next(&item))
03182         {
03183             table->RemoveItem(item, false, false);
03184         }
03185         table->AdjustImageSize(false);
03186         table->Refresh();
03187     }
03188     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03189     {
03190         macpp_preparetable(GetWidget(kUMainWidget), tabtext);
03191         tabtext->RemoveAllRows(false);
03192         tabtext->Refresh();
03193     }
03194 #endif
03195 #ifdef WIN32
03196     CWnd *wnd = (CWnd *)w;
03197
03198     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03199     {
03200         CListCtrl *list = (CListCtrl *)wnd;
03201         VERIFY(list->DeleteAllItems());
03202     }
03203 #endif
03204 }

Here is the call graph for this function:

void UWidget::OnListResort | ( | int | cmd,
 |  | int | column,
 |  | UListSorter | s
 | ) | [protected]

EV_LIST_RESORT UWidget message handling.

Definition at line 3732 of file uwidget.cpp.

References GetWidget(), and UListSorter.

03733 {
03734     void *w = GetWidget(cmd);
03735     if(w == 0L)
03736         return;
03737
03738 #if qGTK
03739     if(!GTK_IS_CLIST(w))
03740         return;
03741
03742     GtkCList *list = GTK_CLIST(w);
03743
03744     sGtkClistDiff = s;
03745     sGtkClistWid = this;
03746     gtk_clist_set_compare_func(list, gtkclistdefcompare);
03747     gtk_clist_set_sort_column(list, column);
03748     gtk_clist_sort(list);
03749     gtk_clist_set_compare_func(list, 0L);
03750 #endif
03751 }

Here is the call graph for this function:

void UWidget::OnListRowGetData | ( | int | cmd,
 |  | int | row,
 |  | void ** | data
 | ) | [protected]

EV_LIST_ROWGETDATA UWidget message handling.

Definition at line 3408 of file uwidget.cpp.

References GetWidget(), and CPseudoItem::m_data.

03409 {
03410     *data = 0L; // sanity
03411
03412     void *w = GetWidget(cmd);
03413     if(w == 0L)
03414         return;
03415
03416 #if qGTK
03417     if(!GTK_IS_CLIST(w))
03418         return;
03419
03420     GtkCList *list = GTK_CLIST(w);
03421     *data = gtk_clist_get_row_data(list, row);
03422 #endif
03423 #if qMacPP
03424     LPane *view = (LPane *)w;
03425     LOutlineTable *table;
03426     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03427     {
03428         // Store this information in the list view
03429         LOutlineItem *item = table->FindItemForRow(row + 1);
03430         CPseudoItem *theItem;
03431         if((theItem = dynamic_cast<CPseudoItem *>(item)) != 0L)
03432         {
03433             *data = theItem->m_data;
03434         }
03435     }
03436 #endif
03437 }

Here is the call graph for this function:

void UWidget::OnListRowSetData | ( | int | cmd,
 |  | int | row,
 |  | void * | data
 | ) | [protected]

EV_LIST_ROWSETDATA UWidget message handling.

Definition at line 3379 of file uwidget.cpp.

References GetWidget(), and CPseudoItem::m_data.

03380 {
03381     void *w = GetWidget(cmd);
03382     if(w == 0L)
03383         return;
03384
03385 #if qGTK
03386     if(!GTK_IS_CLIST(w))
03387         return;
03388
03389     GtkCList *list = GTK_CLIST(w);
03390     gtk_clist_set_row_data(list, num, data);
03391 #endif
03392 #if qMacPP
03393     LPane *view = (LPane *)w;
03394     LOutlineTable *table;
03395     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03396     {
03397         // Store this information in the list view
03398         LOutlineItem *item = table->FindItemForRow(num + 1);
03399         CPseudoItem *theItem;
03400         if((theItem = dynamic_cast<CPseudoItem *>(item)) != 0L)
03401         {
03402             theItem->m_data = data;
03403         }
03404     }
03405 #endif
03406 }

Here is the call graph for this function:

void UWidget::OnListSetColTitle | ( | int | cmd,
 |  | int | num,
 |  | const char * | title
 | ) | [protected]

EV_LIST_SETCOLTITLE UWidget message handling.

Definition at line 3076 of file uwidget.cpp.

References GetWidget().

03077 {
03078     void *w = GetWidget(cmd);
03079     if(w == 0L)
03080         return;
03081
03082 #if qGTK
03083     if(!GTK_IS_CLIST(w))
03084         return;
03085
03086     GtkCList *list = GTK_CLIST(w);
03087     gtk_clist_set_column_title (list, num, title);
03088 #endif
03089 #ifdef WIN32
03090     CWnd *wnd = (CWnd *)w;
03091
03092     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03093     {
03094         CListCtrl *list = (CListCtrl *)wnd;
03095         LVCOLUMN col;
03096         memset(&col, 0, sizeof(col));
03097         col.mask = LVCF_TEXT;
03098         col.pszText = (char *)title;
03099         VERIFY(list->SetColumn(num, &col));
03100     }
03101 #endif
03102 }

Here is the call graph for this function:

void UWidget::OnListSetColWidth | ( | int | cmd,
 |  | int | num,
 |  | int | width
 | ) | [protected]

EV_LIST_SETCOLWIDTH UWidget message handling.

Definition at line 3104 of file uwidget.cpp.

References GetWidget(), kUMainWidget, and macpp_preparetable().

03105 {
03106     void *w = GetWidget(cmd);
03107     if(w == 0L)
03108         return;
03109
03110 #if qGTK
03111     if(!GTK_IS_CLIST(w))
03112         return;
03113
03114     GtkCList *list = GTK_CLIST(w);
03115     gtk_clist_set_column_width(list, num, width);
03116 #endif
03117 #ifdef WIN32
03118     CWnd *wnd = (CWnd *)w;
03119
03120     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03121     {
03122         CListCtrl *list = (CListCtrl *)wnd;
03123         LVCOLUMN col;
03124         memset(&col, 0, sizeof(col));
03125         col.mask = LVCF_WIDTH;
03126         col.cx = width;
03127         VERIFY(list->SetColumn(num, &col));
03128     }
03129 #endif
03130 #if qMacPP
03131     LPane *view = (LPane *)w;
03132     LOutlineTable *table;
03133     LTextTableView *tabtext;
03134     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03135     {
03136         macpp_preparetable(table);
03137         LTableGeometry *geom = table->GetTableGeometry();
03138         if(geom != 0L)
03139             geom->SetColWidth(width, num + 1, num + 1);
03140     }
03141     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03142     {
03143         macpp_preparetable(GetWidget(kUMainWidget), tabtext);
03144         LTableGeometry *geom = tabtext->GetTableGeometry();
03145         if(geom != 0L)
03146             geom->SetColWidth(width, num + 1, num + 1);
03147     }
03148 #endif
03149 }

Here is the call graph for this function:

void UWidget::OnListSetFeedback | ( | int | cmd,
 |  | int | turnOn
 | ) | [protected]

EV_LIST_SETFEEDBACK UWidget message handling.

Definition at line 3298 of file uwidget.cpp.

References GetWidget().

03299 {
03300     void *w = GetWidget(cmd);
03301     if(w == 0L)
03302         return;
03303
03304 #if qGTK
03305     if(!GTK_IS_CLIST(w))
03306         return;
03307
03308     GtkCList *list = GTK_CLIST(w);
03309     if(turnOn)
03310         gtk_clist_thaw(list);
03311     else
03312         gtk_clist_freeze(list);
03313 #endif
03314 }

Here is the call graph for this function:

void UWidget::OnListSetSortDir | ( | int | cmd,
 |  | int | column,
 |  | bool | dir
 | ) | [protected]

ON_LIST_SETSORTDIR UWidget message handling.

Definition at line 3753 of file uwidget.cpp.

References GetWidget().

03754 {
03755     void *w = GetWidget(cmd);
03756     if(w == 0L)
03757         return;
03758
03759 #if qGTK
03760     if(!GTK_IS_CLIST(w))
03761         return;
03762
03763     GtkCList *list = GTK_CLIST(w);
03764     gchar *text;
03765     guint8 spacing;
03766     GdkPixmap *pixmap;
03767     GdkBitmap *mask;
03768
03769     gtk_clist_get_pixtext (list, 0, column, &text, &spacing, &pixmap, &mask);
03770     gtk_clist_set_pixtext (list, 0, column, text, spacing, pixmap, mask);
03771 #endif
03772 }

Here is the call graph for this function:

void UWidget::OnListShowColumns | ( | int | cmd,
 |  | int | num
 | ) | [protected]

EV_LIST_SHOWCOLUMNS UWidget message handling.

Definition at line 3013 of file uwidget.cpp.

References GetWidget().

03014 {
03015     void *w = GetWidget(cmd);
03016     if(w == 0L)
03017         return;
03018
03019 #if qGTK
03020     if(!GTK_IS_CLIST(w))
03021         return;
03022
03023     GtkCList *list = GTK_CLIST(w);
03024
03025     // one must always be visible. We use the first one
03026     for(int i=1; i< num; i++)
03027         gtk_clist_set_column_visibility (list, i, true);
03028 #endif
03029 }

Here is the call graph for this function:

void UWidget::OnPageChanged | ( | int | cmd,
 |  | int | pagenum
 | ) | [protected]

EV_PAGE UWidget message handling.

Definition at line 3868 of file uwidget.cpp.

References DoDataExchange(), UPseudoPlaceHolder::GetCurrentView(), GetWidget(), UCmdTarget::GetWidID(), LPseudoWinAttachment::InvalidCache(), m_currentPage, m_tabs, m_widgets, macpp_fecthview(), macpp_getattachwindow(), macpp_linkbroadcasters(), and UMAKEINT.

03869 {
03870     if(m_currentPage == UMAKEINT(cmdid, num_page))
03871         return;
03872
03873     std::map<int, UWidget *>::iterator i;
03874     if(m_currentPage != -1)
03875     {
03876         i = m_tabs.find(m_currentPage);
03877         if(i != m_tabs.end())
03878         {
03879             UWidget *tab = (*i).second;
03880             tab->DoDataExchange(false);
03881
03882 #if qMacPP
03883             LPseudoWinAttachment *attach = macpp_getattachwindow(this);
03884             if(attach != 0L)
03885             {
03886                 attach->InvalidCache(tab);
03887             }
03888
03889             tab->m_widgets.erase(tab->m_widgets.begin(), tab->m_widgets.end());
03890 #endif /* qMacPP */
03891         }
03892     }
03893
03894     if(num_page == -1)
03895     {
03896         m_currentPage = -1;
03897         return;
03898     }
03899
03900     i = m_tabs.find(UMAKEINT(cmdid, num_page));
03901     if(i != m_tabs.end())
03902     {
03903         UWidget *tab = (*i).second;
03904
03905 #if qMacPP
03906         UPseudoPlaceHolder *holder = dynamic_cast<UPseudoPlaceHolder *>((LPane *)GetWidget(cmdid));
03907         if(holder != 0L)
03908         {
03909             macpp_fecthview(tab->GetWidID(), holder->GetCurrentView());
03910
03911             LPseudoWinAttachment *attach = macpp_getattachwindow(this);
03912             if(attach != 0L)
03913             {
03914                 macpp_linkbroadcasters(holder->GetCurrentView(), attach);
03915             }
03916         }
03917 #endif /* qMacPP */
03918
03919         tab->DoDataExchange(true);
03920     }
03921     m_currentPage = UMAKEINT(cmdid, num_page);
03922 }

Here is the call graph for this function:

void UWidget::OnRedraw ( int cmd ) [protected]

  • cmd the sub-widget to redraw *now*

Definition at line 1638 of file uwidget.cpp.

References GetWidget().

01639 {
01640     void *w = GetWidget(cmd);
01641     if(w == 0L)
01642         return;
01643
01644 #if qMacAPP
01645     TView *view = (TView *)w;
01646     if(MA_MEMBER(view, TView))
01647     {
01648         view->ForceRedraw();
01649     }
01650 #endif
01651 #if qMacPP
01652     LPane *pane = (LPane *)w;
01653     pane->Draw(nil);
01654 #endif
01655 #ifdef WIN32
01656     CWnd *wnd = (CWnd *)w;
01657
01658     wnd->Invalidate();
01659 #endif
01660 }

Here is the call graph for this function:

void UWidget::OnSetDefault ( int cmd ) [protected]

  • cmd the sub-widget to change default to

Definition at line 1595 of file uwidget.cpp.

References GetWidget().

01596 {
01597     void *w = GetWidget(cmd);
01598     if(w == 0L)
01599         return;
01600
01601 #if qMacPP
01602 #endif
01603 #if qMacAPP
01604 #endif
01605 #if qGTK
01606     if(GTK_IS_WIDGET(w))
01607     {
01608         gtk_widget_grab_default(GTK_WIDGET(w));
01609     }
01610 #endif
01611 #ifdef WIN32
01612 #endif
01613 }

Here is the call graph for this function:

void UWidget::OnSetFloat | ( | int | cmd,
 |  | const float * | f
 | ) | [protected]

  • cmd the sub-widget
  • f the float value the to set

Definition at line 1469 of file uwidget.cpp.

References GetWidget(), gTurnOffBroadcast, m_noDispatch, TPseudoDoubleNumberText::SetValue(), and stat.

01470 {
01471     void *w = GetWidget(cmd);
01472     if(w == 0L)
01473         return;
01474
01475 #if qMacAPP
01476     TView *view = (TView *)w;
01477     if(MA_MEMBER(view, TPseudoDoubleNumberText))
01478     {
01479         TPseudoDoubleNumberText *num = (TPseudoDoubleNumberText *)view;
01480         num->SetValue(*f, true);
01481     }
01482 #endif
01483 #if qMacPP
01484     USemaphore policeman(gTurnOffBroadcast);
01485
01486     LPane *view = (LPane *)w;
01487     LEditText *edit;
01488     LStaticText *stat;
01489     if((edit = dynamic_cast<LEditText *>(view)) != 0L)
01490     {
01491         LStr255 pstr((long double)*f, "\p#####.##");
01492         edit->SetText(pstr);
01493     }
01494     else if((stat = dynamic_cast<LStaticText *>(view)) != 0L)
01495     {
01496         LStr255 pstr((long double)*f, "\p#####.##");
01497         stat->SetText(pstr);
01498     }
01499 #endif
01500 #ifdef WIN32
01501     USemaphore policeman(m_noDispatch);
01502     CWnd *wnd = (CWnd *)w;
01503
01504     char tmp[100];
01505     sprintf(tmp, "%f", *f);
01506     wnd->SetWindowText(tmp);
01507 #endif
01508 }

Here is the call graph for this function:

void UWidget::OnSetIcon | ( | int | cmd,
 |  | void * | pixmap
 | ) | [protected]

  • cmd the sub-widget
  • pixmap the pixmap to set

Definition at line 1663 of file uwidget.cpp.

References GetWidget().

01664 {
01665     void *w = GetWidget(cmd);
01666     if(w == 0L)
01667         return;
01668
01669 #ifdef qUnix
01670     if(GTK_IS_PIXMAP(w))
01671     {
01672         GtkPixmap *widget = GTK_PIXMAP(w);
01673         GtkPixmap *pix = GTK_PIXMAP(p);
01674         gtk_pixmap_set(widget, pix->pixmap, pix->mask);
01675     }
01676 #endif
01677 }

Here is the call graph for this function:

void UWidget::OnSetLoc | ( | int | cmd,
 |  | const URECT * | r
 | ) | [protected]

  • cmd the sub-widget
  • r set the position of the widget relative to its parent

Definition at line 901 of file uwidget.cpp.

References URECT::bottom, GetWidget(), URect::Height(), URECT::left, URECT::right, URECT::top, URect::TopLeft(), URect::Width(), UPOINT::x, and UPOINT::y.

00902 {
00903     void *w = GetWidget(cmd);
00904     if(w == 0L)
00905         return;
00906
00907 #if qMacAPP
00908     TView *view = (TView *)w;
00909     CViewRect mr(r->left, r->top, r->right, r->bottom);
00910     if(mr.right < mr.left)
00911         mr.right = mr.left;
00912     if(mr.bottom < mr.top)
00913         mr.bottom = mr.top;
00914     view->RootViewToLocal(mr);
00915     view->LocalToSuperView(mr);
00916     view->SetFrame(mr, true);
00917 #endif
00918 #if qMacPP
00919     LPane *view = (LPane *)w;
00920     SPoint32 oldLocation;
00921     view->GetFrameLocation(oldLocation);
00922     URect newDim(*r);
00923     UPoint offset = newDim.TopLeft() - UPoint(oldLocation.h, oldLocation.v);
00924     view->ResizeFrameTo(newDim.Width(), newDim.Height(), true);
00925     view->MoveBy(offset.x, offset.y, true);
00926 #endif
00927 #ifdef WIN32
00928     CRect wr(r->left, r->top, r->right, r->bottom);
00929     CWnd *wnd = (CWnd *)w;
00930     wnd->MoveWindow(wr, TRUE);
00931 #endif
00932 }

Here is the call graph for this function:

void UWidget::OnSetSlider | ( | int | cmd,
 |  | int | pos
 | ) | [protected]

  • cmd the sub-widget
  • pos is the position to set

Definition at line 1898 of file uwidget.cpp.

References GetWidget(), and gTurnOffBroadcast.

01899 {
01900     void *w = GetWidget(cmd);
01901     if(w == 0L)
01902         return;
01903
01904 #ifdef WIN32
01905     CWnd *wnd = (CWnd *)w;
01906
01907     if(wnd->IsKindOf(RUNTIME_CLASS(CSliderCtrl)))
01908     {
01909         CSliderCtrl *slider = (CSliderCtrl *)wnd;
01910         slider->SetPos(pos);
01911     }
01912     else if(wnd->IsKindOf(RUNTIME_CLASS(CScrollBar)))
01913     {
01914         CScrollBar *scroll = (CScrollBar *)wnd;
01915         scroll->SetScrollPos(pos);
01916     }
01917 #endif
01918 #if qMacAPP
01919     TView *view = (TView *)w;
01920     if(MA_MEMBER(view, TSlider) || MA_MEMBER(view, TScrollBar))
01921     {
01922         TCtlMgr *ctrl = (TCtlMgr *)view;
01923         ctrl->SetValue(pos, true);
01924     }
01925 #endif
01926 #if qMacPP
01927     USemaphore policeman(gTurnOffBroadcast);
01928
01929     LPane *view = (LPane *)w;
01930     LControl *ctrl;
01931     if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
01932     {
01933         ctrl->SetValue(pos);
01934     }
01935 #endif
01936 }

Here is the call graph for this function:

void UWidget::OnSetSliderProperty | ( | int | cmd,
 |  | const USLIDER * | prop
 | ) | [protected]

  • cmd the sub-widget
  • prop set the informations about this scroller/slider

Definition at line 1995 of file uwidget.cpp.

References GetWidget(), gTurnOffBroadcast, USLIDER::inc, macpp_getattachwindow(), USLIDER::max, USLIDER::min, USLIDER::pos, and LPseudoWinAttachment::SetPageValue().

01996 {
01997     void *w = GetWidget(cmd);
01998     if(w == 0L)
01999         return;
02000
02001 #ifdef WIN32
02002     CWnd *wnd = (CWnd *)w;
02003
02004     if(wnd->IsKindOf(RUNTIME_CLASS(CSliderCtrl)))
02005     {
02006         CSliderCtrl *slider = (CSliderCtrl *)wnd;
02007         slider->SetRange(prop->min, prop->max);
02008         slider->SetPos(prop->pos);
02009         slider->SetPageSize(prop->inc);
02010     }
02011     else if(wnd->IsKindOf(RUNTIME_CLASS(CScrollBar)))
02012     {
02013         SCROLLINFO info;
02014         memset(&info, 0, sizeof(info));
02015         info.cbSize = sizeof(info);
02016         info.fMask = SIF_DISABLENOSCROLL | SIF_PAGE | SIF_POS | SIF_RANGE;
02017         info.nMax = prop->max;
02018         info.nMin = prop->min;
02019         info.nPos = prop->pos;
02020         info.nPage = prop->inc;
02021         if(info.nPage > (UINT)(info.nMax - info.nMin))
02022             info.nPage = (UINT)(info.nMax - info.nMin) / 2;
02023         CScrollBar *scroll = (CScrollBar *)wnd;
02024         VERIFY(scroll->SetScrollInfo(&info));
02025         if(prop->max != prop->min)
02026             scroll->EnableWindow(TRUE);
02027     }
02028 #endif
02029 #if qMacAPP
02030     TView *view = (TView *)w;
02031     if(MA_MEMBER(view, TSlider) || MA_MEMBER(view, TScrollBar))
02032     {
02033         TCtlMgr *ctrl = (TCtlMgr *)view;
02034         ctrl->SetValues(prop->pos, prop->min, prop->max, true);
02035         if(MA_MEMBER(ctrl, TPseudoScrollBar))
02036             ((TPseudoScrollBar *)ctrl)->fPageStep = prop->inc;
02037     }
02038 #endif
02039 #if qMacPP
02040     USemaphore policeman(gTurnOffBroadcast);
02041
02042     LPane *view = (LPane *)w;
02043     LControl *ctrl;
02044     if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
02045     {
02046         ctrl->SetMaxValue(prop->max);
02047         ctrl->SetMinValue(prop->min);
02048         ctrl->SetValue(prop->pos);
02049         LPseudoWinAttachment *attach = macpp_getattachwindow(this);
02050         if(attach != 0L)
02051             attach->SetPageValue(cmd, prop->inc);
02052     }
02053 #endif
02054 }

Here is the call graph for this function:

void UWidget::OnSetState | ( | int | cmd,
 |  | int | state
 | ) | [protected]

  • cmd the sub-widget
  • state of the widget to set (pushed/checked...)

Definition at line 1343 of file uwidget.cpp.

References TPseudoRotateIconButton::DoRotate(), UPseudoRotButton::DoRotate(), CPseudoRotButton::DoRotate(), GetWidget(), gTurnOffBroadcast, m_noDispatch, CPseudoToggle::SetState(), and stat.

01344 {
01345     void *w = GetWidget(cmd);
01346     if(w == 0L)
01347         return;
01348
01349 #ifdef WIN32
01350     CWnd *wnd = (CWnd *)w;
01351
01352     if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoRotButton)))
01353     {
01354         CPseudoRotButton *btn = (CPseudoRotButton *)wnd;
01355         btn->DoRotate(state);
01356     }
01357     else if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoToggle)))
01358     {
01359         CPseudoToggle *btn = (CPseudoToggle *)wnd;
01360         btn->SetState(state);
01361     }
01362     else if(wnd->IsKindOf(RUNTIME_CLASS(CButton)))
01363     {
01364         CButton *btn = (CButton *)wnd;
01365         btn->SetCheck(state != 0);
01366     }
01367     else
01368     {
01369         USemaphore policeman(m_noDispatch);
01370         char tmp[100];
01371         sprintf(tmp, "%d", state);
01372         wnd->SetWindowText(tmp);
01373     }
01374 #endif
01375 #if qGTK
01376     if(GTK_IS_TOGGLE_BUTTON(w))
01377     {
01378         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), state != 0);
01379     }
01380     else if(GTK_IS_ENTRY(w))
01381     {
01382         char tmp[20];
01383         sprintf(tmp, "%d", state);
01384         gtk_entry_set_text(GTK_ENTRY(w), tmp);
01385     }
01386 #endif
01387 #if qMacPP
01388     USemaphore policeman(gTurnOffBroadcast);
01389
01390     LPane *view = (LPane *)w;
01391     LCheckBox *check;
01392     LRadioButton *rad;
01393     LEditText *edit;
01394     LStaticText *stat;
01395     UPseudoRotButton *rot;
01396     LCheckBoxGroupBox *groupbox;
01397     LPageController *tabctrl;
01398     LTabsControl *tabctrl2;
01399     LControl *ctrl;
01400     if((check = dynamic_cast<LCheckBox *>(view)) != 0L)
01401     {
01402         check->SetValue(state ? Button_On : Button_Off);
01403     }
01404     else if((rad = dynamic_cast<LRadioButton *>(view)) != 0L)
01405     {
01406         rad->SetValue(state ? Button_On : Button_Off);
01407     }
01408     else if((groupbox = dynamic_cast<LCheckBoxGroupBox *>(view)) != 0L)
01409     {
01410         groupbox->SetValue(state ? Button_On : Button_Off);
01411     }
01412     else if((edit = dynamic_cast<LEditText *>(view)) != 0L)
01413     {
01414         LStr255 pstr((SInt32)state);
01415         edit->SetText(pstr);
01416     }
01417     else if((stat = dynamic_cast<LStaticText *>(view)) != 0L)
01418     {
01419         LStr255 pstr((SInt32)state);
01420         stat->SetText(pstr);
01421     }
01422     else if((rot = dynamic_cast<UPseudoRotButton *>(view)) != 0L)
01423     {
01424         rot->DoRotate(state);
01425     }
01426     else if((tabctrl = dynamic_cast<LPageController *>(view)) != 0L)
01427     {
01428         tabctrl->SetSelectedPageButtonByIndex(state + 1, false);
01429     }
01430     else if((tabctrl2 = dynamic_cast<LTabsControl *>(view)) != 0L)
01431     {
01432         tabctrl2->SetValue(state + 1);
01433     }
01434     else if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
01435     {
01436         ctrl->SetValue(state);
01437     }
01438 #endif
01439 #if qMacAPP
01440     TView *view = (TView *)w;
01441     if(MA_MEMBER(view, TCheckBox))
01442     {
01443         TCheckBox *check = (TCheckBox *)view;
01444         check->SetState(state, true);
01445     }
01446     else if(MA_MEMBER(view, TRadio))
01447     {
01448         TRadio *rad = (TRadio *)view;
01449         rad->SetState(state, true);
01450     }
01451     else if(MA_MEMBER(view, TNumberText))
01452     {
01453         TNumberText *num = (TNumberText *)view;
01454         num->SetValue(state, true);
01455     }
01456     else if(MA_MEMBER(view, TPseudoRotateIconButton))
01457     {
01458         TPseudoRotateIconButton *rot = (TPseudoRotateIconButton *)view;
01459         rot->DoRotate(state);
01460     }
01461     else if(MA_MEMBER(view, TProgressIndicator))
01462     {
01463         TProgressIndicator *progress = (TProgressIndicator *)view;
01464         progress->SetValue(state, true);
01465     }
01466 #endif
01467 }

Here is the call graph for this function:

void UWidget::OnSetText | ( | int | cmd,
 |  | const char * | text
 | ) | [protected]

  • cmd the sub-widget
  • text the c-string caption to set

Definition at line 1679 of file uwidget.cpp.

References getLabelFromContainer(), GetWidget(), gTurnOffBroadcast, and m_noDispatch.

01680 {
01681     void *w = GetWidget(cmd);
01682     if(w == 0L)
01683         return;
01684
01685 #ifdef WIN32
01686     USemaphore policeman(m_noDispatch);
01687     CWnd *wnd = (CWnd *)w;
01688     wnd->SetWindowText(text);
01689 #endif
01690 #if qGTK
01691     if(GTK_IS_WINDOW(w))
01692     {
01693         gtk_window_set_title(GTK_WINDOW(w), text);
01694     }
01695     else if(GTK_IS_BUTTON(w))
01696     {
01697         GtkLabel *label = getLabelFromContainer(GTK_CONTAINER(w));
01698         if(label != 0L)
01699             gtk_label_set_text(label, text);
01700         else
01701             g_warning("Cannot find the label of '%s'\n", gtk_widget_get_name(GTK_WIDGET(w)));
01702     }
01703     else if(GTK_IS_TEXT(w))
01704     {
01705         GtkText *t = GTK_TEXT(w);
01706         gtk_text_set_point(t, 0);
01707         gtk_text_forward_delete(t, gtk_text_get_length(t));
01708         gtk_text_insert(t, 0L, 0L, 0L, text, -1);
01709     }
01710     else if(GTK_IS_ENTRY(w))
01711     {
01712         gtk_entry_set_text(GTK_ENTRY(w), text);
01713     }
01714     else if(GTK_IS_COMBO(w))
01715     {
01716         gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(w)->entry), text);
01717     }
01718     else if(GTK_IS_LABEL(w))
01719     {
01720         GtkLabel *t = GTK_LABEL(w);
01721         gtk_label_set_text(t, text);
01722     }
01723 #endif
01724 #if qMacPP
01725     USemaphore policeman(gTurnOffBroadcast);
01726
01727     LPane *view = (LPane *)w;
01728     LTextEditView *txt;
01729     if((txt = dynamic_cast<LTextEditView *>(view)) != 0L)
01730     {
01731         txt->SetTextPtr((Ptr)text, strlen(text));
01732     }
01733     else
01734     {
01735         LStr255 pstr(text);
01736         LStr255 oldstr;
01737         view->GetDescriptor(oldstr);
01738         if(oldstr != pstr)
01739             view->SetDescriptor(pstr);
01740     }
01741 #endif
01742 #if qMacAPP
01743     TView *view = (TView *)w;
01744     if(MA_MEMBER(view, TCtlMgr))
01745     {
01746         TCtlMgr *ctrl = (TCtlMgr *)view;
01747         CStr255_AC pstr(text);
01748         ctrl->SetText(pstr, true);
01749     }
01750     else if(MA_MEMBER(view, TStaticText))
01751     {
01752         TStaticText *ctrl = (TStaticText *)view;
01753         CStr255_AC pstr(text);
01754         ctrl->SetText(pstr, true);
01755     }
01756     else if(MA_MEMBER(view, TWindow))
01757     {
01758         TWindow *ctrl = (TWindow *)view;
01759         CStr255_AC pstr(text);
01760         ctrl->SetTitle(pstr);
01761     }
01762 #endif
01763 }

Here is the call graph for this function:

void UWidget::OnSetTooltip | ( | int | cmd,
 |  | UCmdUI * | pCmdUI
 | ) | [protected]

not documented

Reimplemented in UToolbar.

Definition at line 934 of file uwidget.cpp.

References GetTooltip(), and UCmdUI::SetTooltip().

00935 {
00936     const char *tooltip = GetTooltip(cmd);
00937     if(tooltip == 0L)
00938         return;
00939
00940     pCmdUI->SetTooltip(tooltip);
00941 }

Here is the call graph for this function:

void UWidget::OnShowWidget | ( | int | cmd,
 |  | int | state
 | ) | [protected]

  • cmd the sub-widget
  • state of the widget to show/hide

Definition at line 1865 of file uwidget.cpp.

References GetWidget().

01866 {
01867     void *w = GetWidget(cmd);
01868     if(w == 0L)
01869         return;
01870
01871 #ifdef WIN32
01872     CWnd *wnd = (CWnd *)w;
01873
01874     wnd->ShowWindow(state ? SW_SHOWNORMAL : SW_HIDE);
01875 #endif
01876 #if qGTK
01877     GtkWidget *wid = (GtkWidget *)w;
01878     if(state)
01879         gtk_widget_show(wid);
01880     else
01881         gtk_widget_hide(wid);
01882 #endif
01883 #if qMacAPP
01884     TView *view = (TView *)w;
01885     view->Show(state != 0, true);
01886 #endif
01887 #if qMacPP
01888     LPane *view = (LPane *)w;
01889     if(state)
01890         view->Show();
01891     else
01892         view->Hide();
01893 #endif
01894 }

Here is the call graph for this function:

void UWidget::OnSmartComboSetFeature | ( | int | cmd,
 |  | int | feature
 | ) | [protected]

EV_SMARTCOMBO_SETFEATURE UWidget message handling.

Definition at line 2936 of file uwidget.cpp.

References GetWidget(), and WM_SMCB_SETFEATURE.

02937 {
02938     void *w = GetWidget(cmd);
02939     if( w == 0L )
02940         return;
02941
02942 #ifdef WIN32
02943     CWnd* wnd = (CWnd*)w;
02944
02945     if( wnd->IsKindOf(RUNTIME_CLASS(CComboBox)) )
02946     {
02947         CComboBox* combo = (CComboBox*)wnd;
02948         combo->SendMessage(WM_SMCB_SETFEATURE, WPARAM(feature));
02949     }
02950 #endif
02951 #if qMacPP
02952 #endif
02953 }

Here is the call graph for this function:

void UWidget::OnSmartComboSetItems | ( | int | cmd,
 |  | CMString * | items
 | ) | [protected]

EV_SMARTCOMBO_SETITEMS UWidget message handling.

Definition at line 2955 of file uwidget.cpp.

References GetWidget(), and WM_SMCB_SETITEMS.

02956 {
02957     void *w = GetWidget(cmd);
02958     if( w == 0L )
02959         return;
02960
02961 #ifdef WIN32
02962     CWnd* wnd = (CWnd*)w;
02963
02964     if( wnd->IsKindOf(RUNTIME_CLASS(CComboBox)) )
02965     {
02966         CComboBox* combo = (CComboBox*)wnd;
02967         combo->SendMessage(WM_SMCB_SETITEMS, WPARAM(items));
02968     }
02969 #endif
02970 #if qMacPP
02971 #endif
02972 }

Here is the call graph for this function:

void UWidget::OnSmartComboSetReadOnly | ( | int | cmd,
 |  | bool | readOnly
 | ) | [protected]

EV_SMARTCOMBO_SETREADONLY UWidget message handling.

Definition at line 2974 of file uwidget.cpp.

References GetWidget(), and WM_SMCB_SETREADONLY.

02975 {
02976     void *w = GetWidget(cmd);
02977     if( w == 0L )
02978         return;
02979
02980 #ifdef WIN32
02981     CWnd* wnd = (CWnd*)w;
02982
02983     if( wnd->IsKindOf(RUNTIME_CLASS(CComboBox)) )
02984     {
02985         CComboBox* combo = (CComboBox*)wnd;
02986         combo->SendMessage(WM_SMCB_SETREADONLY, WPARAM(readOnly));
02987     }
02988 #endif
02989 #if qMacPP
02990 #endif
02991 }

Here is the call graph for this function:

void UWidget::OnStatusBarText | ( | int | cmd,
 |  | const char * | txt
 | ) | [protected]

EV_STATUSBAR_TEXT UWidget message handling.

Definition at line 3775 of file uwidget.cpp.

References GetWidget().

03776 {
03777     void *w = GetWidget(cmd);
03778     if( (w == 0L) || (txt == 0L) )
03779         return;
03780
03781 #if qGTK
03782     if(!GTK_IS_STATUSBAR(w))
03783         return;
03784
03785     GtkStatusbar *bar = GTK_STATUSBAR(w);
03786
03787     gtk_statusbar_pop(bar, 1);
03788     gtk_statusbar_push(bar, 1, txt);
03789 #endif
03790 }

Here is the call graph for this function:

void UWidget::OnTreeDelete | ( | int | cmd,
 |  | UTREEITEM | item
 | ) | [protected]

EV_TREE_DELETE UWidget message handling.

Definition at line 2478 of file uwidget.cpp.

References GetWidget(), and UTREEITEM.

02479 {
02480     // sanity
02481     void *w = GetWidget(cmd);
02482     if(w == 0L)
02483         return;
02484
02485 #if qGTK
02486     if(!GTK_IS_TREE(w) || item == 0L)
02487         return;
02488
02489     GtkTreeItem *i = GTK_TREE_ITEM(item);
02490
02491     GtkTree *parent = GTK_TREE(GTK_WIDGET(i)->parent);
02492     if (parent == 0L)
02493         return;
02494
02495     gtk_container_remove(GTK_CONTAINER(parent), GTK_WIDGET(i));
02496 #endif
02497 }

Here is the call graph for this function:

void UWidget::OnTreeExpand | ( | int | cmd,
 |  | int | collapse,
 |  | UTREEITEM | item
 | ) | [protected]

EV_TREE_EXPAND UWidget message handling.

Definition at line 2499 of file uwidget.cpp.

References GetWidget(), and UTREEITEM.

02500 {
02501     // sanity
02502     void *w = GetWidget(cmd);
02503     if(w == 0L)
02504         return;
02505
02506 #if qGTK
02507   if(!GTK_IS_TREE(w) || item == 0L)
02508         return;
02509
02510   GtkTreeItem *i = GTK_TREE_ITEM(item);
02511
02512   gtktreesort(GTK_TREE(i->subtree));
02513
02514     int collapsed = !i->expanded;
02515     if((collapsed != 0) ^ (collapse != 0))
02516     {
02517         if(!collapse)
02518             gtk_tree_item_expand(i);
02519         else
02520             gtk_tree_item_collapse(i);
02521     }
02522 #endif
02523 }

Here is the call graph for this function:

void UWidget::OnTreeGetInfo | ( | int | cmd,
 |  | UTREE_INFO * | data
 | ) | [protected]

EV_TREE_GETINFO UWidget message handling.

Definition at line 2421 of file uwidget.cpp.

References UTREE_INFO::child, UTREE_INFO::data, UTREE_INFO::expanded, GetWidget(), UTREE_INFO::icon, UTREE_INFO::item, UTREE_INFO::next, UTREE_INFO::parent, and UTREE_INFO::title.

02422 {
02423     // sanity
02424     desc->parent = 0L;
02425     desc->next = 0L;
02426     desc->child = 0L;
02427     desc->data = 0L;
02428     desc->title = 0L;
02429     desc->icon = 0L;
02430     desc->expanded = 0;
02431
02432     void *w = GetWidget(cmd);
02433     if(w == 0L)
02434         return;
02435
02436 #if qGTK
02437     if(!GTK_IS_TREE(w))
02438         return;
02439
02440     GtkTreeItem *item;
02441     if(desc->item == 0L)
02442     {
02443         GList *list = g_list_first(GTK_TREE(w)->children);
02444         GList *next = g_list_next(list);
02445         item = list != 0L ? GTK_TREE_ITEM(list->data) : 0L;
02446         desc->item = item;
02447         desc->next = next != 0L ? GTK_TREE_ITEM(next->data) : 0L;
02448     }
02449     else
02450     {
02451         GtkTree *parent = GTK_TREE(GTK_WIDGET(desc->item)->parent);
02452         GList *list = g_list_find(GTK_TREE(parent)->children, desc->item);
02453         GList *next = g_list_next(list);
02454         item = list != 0L ? GTK_TREE_ITEM(list->data) : 0L;
02455         desc->item = item;
02456         // the only way I found to guess the TREE_ITEM parent
02457         desc->parent = parent == w ? 0L : GTK_TREE_ITEM(gtk_object_get_data(GTK_OBJECT(parent), "rf_treeparent"));
02458         g_assert(desc->parent == 0L || GTK_IS_TREE_ITEM(desc->parent));
02459         desc->next = next != 0L ? GTK_TREE_ITEM(next->data) : 0L;
02460     }
02461     if(item != 0L)
02462     {
02463         if(item->subtree != 0L)
02464         {
02465             GtkTree *subtree = GTK_TREE(item->subtree);
02466             GList *list = g_list_first(GTK_TREE(subtree)->children);
02467             desc->child = list != 0L ? GTK_TREE_ITEM(list->data) : 0L;
02468         }
02469         desc->data = gtk_object_get_data(GTK_OBJECT(item), "rf_treeitemdata");
02470         GtkLabel *label = gtktreegetlabel(GTK_WIDGET(item));
02471         if(label != 0L)
02472             gtk_label_get(label, &desc->title);
02473         desc->expanded = item->expanded;
02474     }
02475 #endif
02476 }

Here is the call graph for this function:

void UWidget::OnTreeGetSel | ( | int | cmd,
 |  | UTREEITEM * | item
 | ) | [protected]

EV_TREE_GETSEL UWidget message handling.

Definition at line 2401 of file uwidget.cpp.

References GetWidget(), and UTREEITEM.

02402 {
02403     *item = 0L; // sanity
02404
02405     void *w = GetWidget(cmd);
02406     if(w == 0L)
02407         return;
02408
02409 #if qGTK
02410     if(!GTK_IS_TREE(w))
02411         return;
02412
02413     GList *sel = GTK_TREE(w)->selection;
02414     if(sel == 0L || !GTK_IS_TREE_ITEM(sel->data))
02415         return;
02416
02417     *item = sel->data;
02418 #endif
02419 }

Here is the call graph for this function:

void UWidget::OnTreeInsert | ( | int | cmd,
 |  | UTREE_INSERT * | data
 | ) | [protected]

EV_TREE_INSERT UWidget message handling.

Definition at line 2323 of file uwidget.cpp.

References UTREE_INSERT::data, GetWidget(), UCmdTarget::GetWidID(), UTREE_INSERT::icon, UTREE_INSERT::parent, UTREE_INSERT::result, UTREE_INSERT::title, UMAKEINT, and UTREEITEM.

02324 {
02325     data->result = 0L; // sanity
02326
02327     void *w = GetWidget(cmd);
02328     if(w == 0L)
02329         return;
02330
02331 #if qGTK
02332   if(!GTK_IS_TREE(w))
02333         return;
02334
02335     GtkTree *root;
02336     if(data->parent == 0L)
02337         root = GTK_TREE(w);
02338     else
02339     {
02340         GtkTreeItem *item = GTK_TREE_ITEM(data->parent);
02341
02342         if(item->subtree != 0L) {
02343             root = GTK_TREE(item->subtree);
02344         }
02345         else
02346         {
02347             root = GTK_TREE(gtk_tree_new());
02348             gtk_object_set_data(GTK_OBJECT(root), "rf_treeparent", item);
02349             gtk_tree_set_selection_mode (root, GTK_SELECTION_BROWSE); // TODO : find out it with the root
02350             gtk_tree_set_view_mode (root, GTK_TREE_VIEW_ITEM); // TODO : find out it with the root
02351             gtk_tree_item_set_subtree (item, GTK_WIDGET(root));
02352         }
02353     }
02354
02355   GtkTreeItem *item = gtknewtreeitem(data->title, data->icon == 0L ? 0L : GTK_PIXMAP(data->icon));
02356     gtk_object_set_data(GTK_OBJECT(item), "rf_treeitemdata", data->data);
02357     gtk_signal_connect(GTK_OBJECT(item), "select",
02358                        GTK_SIGNAL_FUNC(gtktreeselect), (gpointer)UMAKEINT(GetWidID(), cmd));
02359     gtk_signal_connect(GTK_OBJECT(item), "deselect",
02360                        GTK_SIGNAL_FUNC(gtktreedeselect), (gpointer)UMAKEINT(GetWidID(), cmd));
02361     gtk_signal_connect (GTK_OBJECT(item), "expand",
02362                         GTK_SIGNAL_FUNC(gtktreeexpand), (gpointer)UMAKEINT(GetWidID(), cmd));
02363     gtk_signal_connect (GTK_OBJECT(item), "collapse",
02364                         GTK_SIGNAL_FUNC(gtktreecollapse), (gpointer)UMAKEINT(GetWidID(), cmd));
02365
02366     gtk_tree_append(GTK_TREE(root), GTK_WIDGET(item));
02367   gtk_widget_show (GTK_WIDGET(item));
02368
02369     data->result = (UTREEITEM)item;
02370 #endif
02371 }

Here is the call graph for this function:

void UWidget::OnTreeResetAll ( int cmd ) [protected]

EV_TREE_RESETALL UWidget message handling.

Definition at line 2300 of file uwidget.cpp.

References GetWidget().

02301 {
02302     void *w = GetWidget(cmd);
02303     if(w == 0L)
02304         return;
02305
02306 #if qGTK
02307     if(!GTK_IS_TREE(w))
02308         return;
02309
02310     GtkTree *tree = GTK_TREE(w);
02311     GList *list = g_list_copy(tree->children);
02312     GList *head = list;
02313     while(list != 0L)
02314     {
02315         GtkWidget *wid = GTK_WIDGET(list->data);
02316         gtk_container_remove(GTK_CONTAINER(tree), wid);
02317         list = (GList *)g_list_next(list);
02318     }
02319     g_list_free(head);
02320 #endif
02321 }

Here is the call graph for this function:

void UWidget::OnTreeSelect | ( | int | cmd,
 |  | int | deselect,
 |  | UTREEITEM | item
 | ) | [protected]

EV_TREE_SELECT UWidget message handling.

Definition at line 2525 of file uwidget.cpp.

References GetWidget(), and UTREEITEM.

02526 {
02527     // sanity
02528     void *w = GetWidget(cmd);
02529     if(w == 0L)
02530         return;
02531
02532 #if qGTK
02533     if(!GTK_IS_TREE(w) || item == 0L)
02534         return;
02535
02536     GList *sel = GTK_TREE(w)->selection;
02537     while(sel)
02538     {
02539         gtk_tree_item_deselect(GTK_TREE_ITEM(sel->data));
02540         sel = g_list_next(sel);
02541     }
02542
02543     GtkWidget *i = GTK_WIDGET(item);
02544     if(!deselect)
02545         gtk_tree_select_child(GTK_TREE(w), i);
02546     else
02547         gtk_tree_unselect_child(GTK_TREE(w), i);
02548 #endif
02549 }

Here is the call graph for this function:

void UWidget::OnTreeSetData | ( | int | cmd,
 |  | UTREE_INFO * | data
 | ) | [protected]

EV_TREE_SETDATA UWidget message handling.

Definition at line 2373 of file uwidget.cpp.

References UTREE_INFO::data, GetWidget(), and UTREE_INFO::item.

02374 {
02375     void *w = GetWidget(cmd);
02376     if(w == 0L)
02377         return;
02378
02379 #if qGTK
02380     if(!GTK_IS_TREE(w))
02381         return;
02382
02383     gtk_object_set_data(GTK_OBJECT(data->item), "rf_treeitemdata", data->data);
02384 #endif
02385 }

Here is the call graph for this function:

void UWidget::OnTreeSetIcon | ( | int | cmd,
 |  | UTREE_INFO * | data
 | ) | [protected]

EV_TREE_SETICON UWidget message handling.

Definition at line 2387 of file uwidget.cpp.

References GetWidget(), UTREE_INFO::icon, and UTREE_INFO::item.

02388 {
02389     void *w = GetWidget(cmd);
02390     if(w == 0L)
02391         return;
02392
02393 #if qGTK
02394     if(!GTK_IS_TREE(w))
02395         return;
02396
02397     gtksettreeitemicon(GTK_TREE_ITEM(data->item), GTK_PIXMAP(data->icon));
02398 #endif
02399 }

Here is the call graph for this function:

void UWidget::OnUnblockHandler | ( | void * | widget,
 |  | int | cmd,
 |  | int | event
 | ) |

unblocks a eventhandler

Definition at line 1167 of file uwidget.cpp.

References UCmdTarget::GetWidID(), and UMAKEINT.

Referenced by UCvsGraph::OnDrawing().

01168 {
01169 #ifdef qGTK
01170     if(event == GDK_EXPOSE) {
01171         gtk_signal_handler_unblock_by_func( GTK_OBJECT(widget),
01172                                             GTK_SIGNAL_FUNC (gtkexposeevent),
01173                                             (gpointer)UMAKEINT(GetWidID(), cmd));
01174     }
01175 #endif
01176 }

Here is the call graph for this function:

int UWidget::OnUpdateFocus | ( | int | leave,
 |  | void * | widget
 | ) | [protected]

EV_UPDATEFOCUS UWidget message handling.

Definition at line 3792 of file uwidget.cpp.

References UCmdTarget::GetWidID(), m_widgets, sFocusCmdID, and sFocusWidID.

03793 {
03794     std::map<int, void *>::const_iterator i;
03795
03796     for(i = m_widgets.begin(); i != m_widgets.end(); ++i)
03797     {
03798         if((*i).second == widget)
03799             break;
03800     }
03801     if(i == m_widgets.end())
03802         return 0; // continue notification
03803
03804     if(leave)
03805     {
03806         if(sFocusWidID == GetWidID())
03807             sFocusWidID = -1;
03808     }
03809     else
03810     {
03811         sFocusWidID = GetWidID();
03812         sFocusCmdID = (*i).first;
03813     }
03814
03815     return 1; // stop notification
03816 }

Here is the call graph for this function:

void UWidget::OnUpdateUI ( void ) [protected]

when the user interface is invalid.

the default is to send a EV_UPDTCMD to each sub-widget.

Reimplemented in UMacAppMenu, UMenu, and UToolbar.

Definition at line 2094 of file uwidget.cpp.

References EV_UPDTCMD, UCmdTarget::GetWidID(), m_widgets, and UEventSendMessage().

02095 {
02096     std::map<int, void *>::const_iterator i;
02097     for(i = m_widgets.begin(); i != m_widgets.end(); ++i)
02098     {
02099         UCmdUI pUI((*i).first);
02100         pUI.m_widget = (*i).second;
02101         UEventSendMessage(GetWidID(), EV_UPDTCMD, pUI.m_nID, &pUI);
02102     }
02103 }

Here is the call graph for this function:

void UWidget::OverideMapWidget | ( | int | cmdid,
 |  | CRuntimeClass * | widClass
 | ) |

Definition at line 3925 of file uwidget.cpp.

References m_overide.

03926 {
03927     std::map<int, CRuntimeClass *>::value_type val(cmdid, widClass);
03928     m_overide.insert(val);
03929 }

void UWidget::RemoveTimer ( int cmd )

timer handling - remove a timer.

  • cmd associated with the timer.
Definition at line 2064 of file uwidget.cpp.

References m_timers.

02065 {
02066     std::vector<UTimer>::iterator i;
02067     for(i = m_timers.begin(); i != m_timers.end(); i++)
02068     {
02069         if((*i).m_cmd == cmd)
02070         {
02071             (*i).m_cmd = 0; // delay removing
02072             break;
02073         }
02074     }
02075 }

const URuntimeClass * UWidget::rtUWidget ( void ) [static]

Definition at line 83 of file uwidget.cpp.

int UWidget::UDispatchMessage | ( | int | evt,
 |  | int | arg1,
 |  | void * | arg2,
 |  | UDispatchInfo & | dispatchInfo
 | ) | [virtual]

this is overided in order to broadcast to the listeners

Reimplemented from UCmdTarget.

Reimplemented in UToolbar.

Definition at line 810 of file uwidget.cpp.

References m_listeners, and UCmdTarget::UDispatchMessage().

Referenced by UToolbar::UDispatchMessage().

00811 {
00812     std::vector<UCmdTarget *>::iterator i;
00813     for(i = m_listeners.begin(); i != m_listeners.end(); ++i)
00814     {
00815         (*i)->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00816     }
00817     return UCmdTarget::UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00818 }

Here is the call graph for this function:

bool UWidget::WidgetIsActive ( int cmd ) const

return true if a widget has the focus ...

  • cmd the sub-widget identifier.
    Warning:
    only on Win32
Definition at line 943 of file uwidget.cpp.

References GetWidget().

00944 {
00945     void *w = GetWidget(cmd);
00946     if(w == 0L)
00947         return false;
00948
00949 #ifdef WIN32
00950     CWnd *wnd = (CWnd *)w;
00951
00952     bool res = false;
00953
00954     CWnd* parent = wnd->GetOwner();
00955     if(parent && (HWND)*parent->GetFocus() == (HWND)*wnd)
00956         res = true;
00957
00958     return res;
00959 #endif
00960     return false;
00961 }

Here is the call graph for this function:

Friends And Related Function Documentation

LRESULT UWinPseudoWindowProc | ( | CWnd * | wnd,
 |  | UWidget * | wid,
 |  | UINT | message,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [friend]

Definition at line 212 of file PseudoDlg.cpp.

00213 {
00214     bool sentOne = false;
00215
00216     if(wid == 0L)
00217         return 1;
00218
00219     if (message == WM_COMMAND)
00220     {
00221         UINT nID = LOWORD(wParam);
00222         if(!IS_PSEUDO_CTL(nID))
00223             return 1;
00224
00225         int nCode = HIWORD(wParam);
00226         HWND hWndCtrl = (HWND)lParam;
00227         switch(nCode)
00228         {
00229         case BN_CLICKED:
00230             UEventSendMessage(wid->GetWidID(), EV_CMD, WINCTL_to_UCMD(nID), 0L);
00231             sentOne = true;
00232             break;
00233         case CBN_SELCHANGE:
00234         {
00235             ASSERT(::IsWindow(hWndCtrl));
00236             int sel = (int)::SendMessage(hWndCtrl, CB_GETCURSEL, 0, 0);
00237             const char *txt = 0L;
00238             char buf[1024] = {'\0'};
00239             if(sel != -1 && (int)::SendMessage(hWndCtrl, CB_GETLBTEXT, sel, (LPARAM)buf) != CB_ERR)
00240                 txt = buf;
00241             if(strcmp(buf, "-") != 0) // separator
00242                 UEventSendMessage(wid->GetWidID(), EV_COMBO_SEL,
00243                     UMAKEINT(WINCTL_to_UCMD(nID), sel), (void *)txt);
00244             sentOne = true;
00245             break;
00246         }
00247         case EN_CHANGE:
00248             if(wid->m_noDispatch)
00249                 break;
00250
00251             ASSERT(::IsWindow(hWndCtrl));
00252             UEventSendMessage(wid->GetWidID(), EV_EDITCHANGE,
00253                 WINCTL_to_UCMD(nID), 0L);
00254             break;
00255         }
00256     }
00257     else if (message == WM_NOTIFY)
00258     {
00259         NMHDR* pNMHDR = (NMHDR*)lParam;
00260         if (pNMHDR->hwndFrom != NULL)
00261         {
00262             UINT nID = _AfxGetDlgCtrlID(pNMHDR->hwndFrom);
00263             int nCode = pNMHDR->code;
00264             if(!IS_PSEUDO_CTL(nID))
00265                 return 1;
00266
00267             switch(nCode)
00268             {
00269             case LVN_ITEMCHANGED:
00270                 NMLISTVIEW *state = (NMLISTVIEW *)pNMHDR;
00271
00272                 HWND wnd = state->hdr.hwndFrom;
00273                 ASSERT(::IsWindow(wnd));
00274
00275                 int id = state->hdr.idFrom;
00276                 std::map<int, void *>::const_iterator i = wid->GetWidgets().find(WINCTL_to_UCMD(id));
00277                 if(i != wid->GetWidgets().end())
00278                 {
00279                     CWnd *w = (CWnd *)(*i).second;
00280                     if(w->IsKindOf(RUNTIME_CLASS(CListCtrl)))
00281                     {
00282                         CListCtrl *list = (CListCtrl*)w;
00283                         CString s = list->GetItemText(state->iItem, 0);
00284
00285                         UEventSendMessage(wid->GetWidID(), EV_LIST_SELECTING,
00286                             UMAKEINT(WINCTL_to_UCMD(state->hdr.idFrom), state->iItem), (void *)(const char *)s);
00287                         sentOne = true;
00288                     }
00289                 }
00290                 break;
00291             }
00292         }
00293     }
00294     else if (message == WM_SIZE)
00295     {
00296         int id = findIdForWnd(wnd, wid);
00297         if(id != -1)
00298         {
00299             URECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
00300             UEventSendMessage(wid->GetWidID(), EV_RESIZE, id, &r);
00301             sentOne = true;
00302         }
00303     }
00304     else if (message == WM_MOUSEMOVE)
00305     {
00306         int id = findIdForWnd(wnd, wid);
00307         if(id != -1)
00308         {
00309             UEventSendMessage(wid->GetWidID(), EV_MMOVE, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00310                 (void *)UWinToUMod(wParam));
00311             sentOne = true;
00312         }
00313     }
00314     else if (message == WM_LBUTTONDOWN)
00315     {
00316         int id = findIdForWnd(wnd, wid);
00317         if(id != -1)
00318         {
00319             UEventSendMessage(wid->GetWidID(), EV_BTNDOWN, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00320                 (void *)UWinToUMod(wParam));
00321             sentOne = true;
00322         }
00323     }
00324     else if (message == WM_LBUTTONUP)
00325     {
00326         int id = findIdForWnd(wnd, wid);
00327         if(id != -1)
00328         {
00329             UEventSendMessage(wid->GetWidID(), EV_BTNUP, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00330                 (void *)UWinToUMod(wParam));
00331             sentOne = true;
00332         }
00333     }
00334     else if (message == WM_LBUTTONDBLCLK)
00335     {
00336         int id = findIdForWnd(wnd, wid);
00337         if(id != -1)
00338         {
00339             UEventSendMessage(wid->GetWidID(), EV_BTNDBLDOWN, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00340                 (void *)UWinToUMod(wParam));
00341             sentOne = true;
00342         }
00343     }
00344     else if (message == WM_KEYDOWN)
00345     {
00346         int id = findIdForWnd(wnd, wid);
00347         if(id != -1)
00348         {
00349             UEventSendMessage(wid->GetWidID(), EV_KEYDOWN, wParam, 0L);
00350             sentOne = true;
00351         }
00352     }
00353     else if (message == WM_HSCROLL)
00354     {
00355         HWND hwndScrollBar = (HWND) lParam;       // handle to scroll bar
00356         int nID = ::GetDlgCtrlID(hwndScrollBar);
00357         if(!IS_PSEUDO_CTL(nID))
00358             return 1;
00359
00360         int cmd = WINCTL_to_UCMD(nID);
00361         CWnd *wnds = (CWnd *)wid->GetWidget(cmd);
00362         if(wnds == 0L || !wnds->IsKindOf(RUNTIME_CLASS(CScrollBar)))
00363             return 1;
00364
00365         CScrollBar *scroll = (CScrollBar *)wnds;
00366
00367         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
00368         int nPos;
00369         if(nScrollCode == SB_THUMBPOSITION || nScrollCode == SB_THUMBTRACK)
00370         {
00371             nPos = (short int) HIWORD(wParam);   // scroll box position
00372
00373             if(nScrollCode == SB_THUMBPOSITION)
00374                 scroll->SetScrollPos(nPos);
00375         }
00376         else
00377         {
00378             SCROLLINFO info;
00379             VERIFY(scroll->GetScrollInfo(&info));
00380             nPos = info.nPos;
00381
00382             switch(nScrollCode)
00383             {
00384             case SB_ENDSCROLL:
00385                 return 1;
00386                 break;
00387             case SB_LINELEFT:
00388                 nPos -= 1;
00389                 break;
00390             case SB_LINERIGHT:
00391                 nPos += 1;
00392                 break;
00393             case SB_PAGELEFT:
00394                 nPos -= info.nPage;
00395                 break;
00396             case SB_PAGERIGHT:
00397                 nPos += info.nPage;
00398                 break;
00399             case SB_LEFT:
00400                 nPos = info.nMin;
00401                 break;
00402             case SB_RIGHT:
00403                 nPos = info.nMax;
00404                 break;
00405             }
00406
00407             scroll->SetScrollPos(nPos);
00408         }
00409
00410         UEventSendMessage(wid->GetWidID(), EV_SCROLLCHANGE, WINCTL_to_UCMD(nID),
00411             (void *)nPos);
00412         sentOne = true;
00413     }
00414     else if (message == WM_VSCROLL)
00415     {
00416         HWND hwndScrollBar = (HWND) lParam;       // handle to scroll bar
00417         int nID = ::GetDlgCtrlID(hwndScrollBar);
00418         if(!IS_PSEUDO_CTL(nID))
00419             return 1;
00420
00421         int cmd = WINCTL_to_UCMD(nID);
00422         CWnd *wnds = (CWnd *)wid->GetWidget(cmd);
00423         if(wnds == 0L || !wnds->IsKindOf(RUNTIME_CLASS(CScrollBar)))
00424             return 1;
00425
00426         CScrollBar *scroll = (CScrollBar *)wnds;
00427
00428         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
00429         int nPos;
00430         if(nScrollCode == SB_THUMBPOSITION || nScrollCode == SB_THUMBTRACK)
00431         {
00432             nPos = (short int) HIWORD(wParam);   // scroll box position
00433
00434             if(nScrollCode == SB_THUMBPOSITION)
00435                 scroll->SetScrollPos(nPos);
00436         }
00437         else
00438         {
00439             SCROLLINFO info;
00440             VERIFY(scroll->GetScrollInfo(&info));
00441             nPos = info.nPos;
00442
00443             switch(nScrollCode)
00444             {
00445             case SB_ENDSCROLL:
00446                 return 1;
00447                 break;
00448             case SB_LINEUP:
00449                 nPos -= 1;
00450                 break;
00451             case SB_LINEDOWN:
00452                 nPos += 1;
00453                 break;
00454             case SB_PAGEUP:
00455                 nPos -= info.nPage;
00456                 break;
00457             case SB_PAGEDOWN:
00458                 nPos += info.nPage;
00459                 break;
00460             case SB_TOP:
00461                 nPos = info.nMin;
00462                 break;
00463             case SB_BOTTOM:
00464                 nPos = info.nMax;
00465                 break;
00466             }
00467
00468             if(nPos > info.nMax)
00469                 nPos = info.nMax;
00470             else if(nPos < info.nMin)
00471                 nPos = info.nMin;
00472             scroll->SetScrollPos(nPos);
00473         }
00474
00475         UEventSendMessage(wid->GetWidID(), EV_SCROLLCHANGE, WINCTL_to_UCMD(nID),
00476             (void *)nPos);
00477         sentOne = true;
00478     }
00479
00480     if(sentOne)
00481         UWidget::DoValidUI(false);
00482
00483     return 1;
00484 }

Member Data Documentation

const UMSGMAP_ENTRY UWidget::_messageEntries [static, private]

Reimplemented from UCmdTarget.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 85 of file uwidget.cpp.

const URuntimeClass UWidget::classUWidget [static, protected]

CDialog* UWidget::m_curModal [protected]

Definition at line 259 of file uwidget.h.

Referenced by DoModal(), and EndDialog().

int UWidget::m_currentPage [protected]

Definition at line 254 of file uwidget.h.

Referenced by OnPageChanged().

std::vector<UCmdTarget *> UWidget::m_listeners [protected]

Definition at line 247 of file uwidget.h.

Referenced by AddListener(), UDispatchMessage(), and ~UWidget().

int UWidget::m_modalRes [protected]

Definition at line 253 of file uwidget.h.

Referenced by DoModal(), and EndDialog().

bool UWidget::m_noDispatch [protected]

Definition at line 261 of file uwidget.h.

Referenced by OnSetFloat(), OnSetState(), OnSetText(), and UWinPseudoWindowProc().

std::map<int, CRuntimeClass *> UWidget::m_overide [protected]

Definition at line 260 of file uwidget.h.

Referenced by OverideMapWidget().

std::map<int, UWidget *> UWidget::m_tabs [protected]

Definition at line 251 of file uwidget.h.

Referenced by AddPage(), DoModal(), OnPageChanged(), LPseudoWinAttachment::SearchWidID(), and ~UWidget().

std::vector<UTimer> UWidget::m_timers [protected]

Definition at line 250 of file uwidget.h.

Referenced by AddTimer(), GetTimers(), and RemoveTimer().

std::map<int, UStr> UWidget::m_tooltips [protected]

Definition at line 249 of file uwidget.h.

Referenced by AddTooltip(), and GetTooltip().

std::map<int, void *> UWidget::m_widgets [protected]

Definition at line 248 of file uwidget.h.

Referenced by GetWidget(), LPseudoWinAttachment::InvalidCache(), OnFetchCmd(), OnInitWidget(), OnPageChanged(), OnUpdateFocus(), OnUpdateUI(), and LPseudoWinAttachment::SearchWidID().

const UMSGMAP UWidget::messageMap = { UCmdTarget ::GetThisMessageMap(), & UWidget ::_messageEntries[0] } [static, protected]

Reimplemented from UCmdTarget.

Reimplemented in UMacAppMenu, UMenu, UToolbar, UPromptMessage, UEditMessage, UCvsApp, UCvsConsole, UCvsFiles, UCvsFolders, UCvsFrame, UCvsGraph, UCvsMenubar, UCvsStatusbar, and UCvsToolbar.

Definition at line 85 of file uwidget.cpp.

int UWidget::sFocusCmdID [static, protected]

Definition at line 157 of file uwidget.cpp.

Referenced by GetFocusCmd(), and OnUpdateFocus().

int UWidget::sFocusWidID = -1 [static, protected]

Definition at line 156 of file uwidget.cpp.

Referenced by GetFocus(), OnUpdateFocus(), and ~UWidget().

bool UWidget::sValidMenu = false [static, protected]

Definition at line 155 of file uwidget.cpp.

Referenced by DoValidUI().

The documentation for this class was generated from the following files:
  • rf/uwidget.h
  • rf/uwidget.cpp
Generated on Sat Aug 7 22:58:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Win32wstring Class Reference

Win32wstring Class Reference

#include <Win32wstring.hpp>

Inheritance diagram for Win32wstring:

[legend]
Collaboration diagram for Win32wstring:

[legend]
List of all members.

Public Member Functions

Win32wstring (unsigned int codepage, std::string *s)
Win32wstring (unsigned int codepage, std::string &s)

Private Member Functions

void convert (unsigned int codepage, const char *s, int inLen)

Constructor & Destructor Documentation

Win32wstring::Win32wstring | ( | unsigned int | codepage,
 |  | std::string * | s
 | ) | [inline]

Definition at line 11 of file Win32wstring.hpp.

References convert().

00012     {
00013         convert(codepage, s->c_str(), s->length());
00014     }

Here is the call graph for this function:

Win32wstring::Win32wstring | ( | unsigned int | codepage,
 |  | std::string & | s
 | ) | [inline]

Definition at line 16 of file Win32wstring.hpp.

References convert().

00017     {
00018         convert(codepage, s.c_str(), s.length());
00019     }

Here is the call graph for this function:

Member Function Documentation

void Win32wstring::convert | ( | unsigned int | codepage,
 |  | const char * | s,
 |  | int | inLen
 | ) | [inline, private]

Definition at line 22 of file Win32wstring.hpp.

References NULL.

Referenced by Win32wstring().

00023     {
00024         register int outLen;
00025         register wchar_t *buff = NULL;
00026
00027         // I read this in the msdn docs:
00028         // "Windows NT 4.0 and Windows 2000: Translate using UTF-8.
00029         //  When this is set, dwFlags must be zero."
00030         //
00031         // Does this mean UTF-8 conversions don't work on win 95/98 ???
00032         //
00033         DWORD flags = (codepage == CP_UTF8 ? 0 : MB_USEGLYPHCHARS);
00034
00035         // calc size needed
00036         outLen = ::MultiByteToWideChar(codepage, flags, s, inLen, buff, 0);
00037
00038         buff = new wchar_t [outLen];
00039
00040         // do it
00041         ::MultiByteToWideChar(codepage, flags, s, inLen, buff, outLen);
00042
00043         // set the string into our base class.
00044         assign(buff, outLen);
00045
00046         // discard the scratch space.
00047         delete [] buff;
00048     }

The documentation for this class was generated from the following file:
  • WinCvs/Win32wstring.hpp
Generated on Sat Aug 7 22:58:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinApp Class Reference

CWinApp Class Reference

Inheritance diagram for CWinApp:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/wincvs.h
Generated on Sat Aug 7 22:58:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWincvsApp Class Reference

CWincvsApp Class Reference

#include <wincvs.h>

Inheritance diagram for CWincvsApp:

[legend]
Collaboration diagram for CWincvsApp:

[legend]
List of all members.

Public Member Functions

CWincvsApp ()
virtual BOOL | InitInstance ()
virtual int | ExitInstance ()
virtual BOOL | SaveAllModified ()
virtual BOOL | PreTranslateMessage (MSG *pMsg)
CMultiDocTemplate * | GetLogGraph ()
bool | IsBackgroundProcess (void) const
void | SetBackgroundProcess (const bool isBackgroundProcess)
CWincvsView * | GetConsoleView (void)
CWinCvsBrowser * | GetBrowserView (void)
void | ActivateBrowserView (void)
CMainFrame * | GetMainFrame (void) const
CCJShellTree * | GetExplorerView (void)
CBrowseFileView * | GetFileView (void)
CDocument * | GetDocument (void)
CStatusBar * GetStatusBar ()
CString | GetRoot ()
void | PeekPumpAndIdle (bool doIdle)
void | SetCvsProcess (CvsProcess *proc)
CvsProcess * | GetCvsProcess (void) const
void | SetCvsRunning (bool state)
bool | IsCvsRunning (void) const
void | SetCvsStopping (bool state)
bool | IsCvsStopping (void) const
void | UpdateAllDocsView ()
void | GetAppPath (UStr &path) const
void | GetAppModule (UStr &module) const
bool | GetAppVersion (UStr &vers) const
DWORD | GetIdleTime (void) const
void | ResetIdleTime (void)
void | IdleCvsProgress (void)
KiFilterModel * | GetFilterModel () const
KiRecursionModel * | GetRecursionModel () const
KiIgnoreModel * | GetIgnoreModel () const
const char * | GetEnvMainThread (const char *name)
void | StartScriptEngine (const bool forceReload=false)
void | StopScriptEngine ()
void | RestartScriptEngine ()
bool | HasTCL () const
bool | HasPython () const

Protected Member Functions

afx_msg void | OnAppAbout ()
App command to run the dialog.
afx_msg void | OnAppCopyrights ()
afx_msg void | OnAppCredits ()
afx_msg void | OnLogWindowIsPresent (CCmdUI *pCmdUI)
afx_msg void | OnStopcvs ()
WM_COMMAND message handler, stop running CVS command.
afx_msg void | OnUpdateStopcvs (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnHelpCvs ()
Display CVS Documentation file.
afx_msg void | OnFileNew ()

Private Member Functions

void | LookForResourceFile (const char *what, UStr &path)
void | ShowTipAtStartup (void)
void | ShowTipOfTheDay (void)

Private Attributes

DWORD | m_idletime
CMainFrame * m_mainFrame
_CvsProcess * | m_CvsProcess
bool m_CvsRunning
bool m_CvsStopping
bool m_isBackgroundProcess
CMultiDocTemplate * | m_logTempl
CMultiDocTemplate * | m_logGraph
bool m_hasTCL
bool m_hasPY

Constructor & Destructor Documentation

CWincvsApp::CWincvsApp ( )

Definition at line 200 of file wincvs.cpp.

References NULL.

00201     : m_isBackgroundProcess(false)
00202 {
00203     m_CvsRunning = false;
00204     m_CvsStopping = false;
00205     m_idletime = 0;
00206     m_CvsProcess = NULL;
00207
00208     m_hasTCL = false;
00209     m_hasPY = false;
00210 }

Member Function Documentation

void CWincvsApp::ActivateBrowserView ( void )

Activate browser view Definition at line 714 of file wincvs.cpp.

References CMainFrame::GetWorkspace(), m_mainFrame, NULL, and CCJTabCtrlBar::SetActiveView().

Referenced by CMainFrame::ChangeLocation().

00715 {
00716     if( m_mainFrame == NULL )
00717         return;
00718
00719     m_mainFrame->GetWorkspace()->SetActiveView(RUNTIME_CLASS(CBrowserBar));
00720 }

Here is the call graph for this function:

int CWincvsApp::ExitInstance ( ) [virtual]

Definition at line 978 of file wincvs.cpp.

00979 {
00980     return CWinApp::ExitInstance();
00981 }

void CWincvsApp::GetAppModule ( UStr & module ) const

Get the application module path

Parameters:
module Return the application module path
Definition at line 1138 of file wincvs.cpp.

References NULL.

Referenced by GetAppPath(), LaunchNewInst(), myTcl_CreateInterp(), CvsPrefs::SetWhichCvs(), and CvsPrefs::WhichCvs().

01139 {
01140     module.clear();
01141
01142     const HINSTANCE hInst = ::AfxGetInstanceHandle();
01143     if( hInst != NULL )
01144     {
01145         char apath[_MAX_PATH];
01146
01147         const DWORD len = ::GetModuleFileName(hInst, apath, _MAX_PATH);
01148         if( len > 0 )
01149         {
01150             module = apath;
01151         }
01152     }
01153 }

void CWincvsApp::GetAppPath ( UStr & path ) const

Get the application path

Parameters:
path Return the application path
Definition at line 1120 of file wincvs.cpp.

References CStr, and GetAppModule().

Referenced by CTipDlg::CTipDlg(), FormatDefaultSettingsLoc(), getLoc(), and CvsPrefs::WhichCvs().

01121 {
01122     path.clear();
01123
01124     GetAppModule(path);
01125
01126     CStr uppath;
01127     CStr exefile;
01128     if( ::SplitPath(path, uppath, exefile) )
01129     {
01130         path = uppath;
01131     }
01132 }

Here is the call graph for this function:

bool CWincvsApp::GetAppVersion ( UStr & vers ) const

Get the application version

Parameters:
vers Return the application version
Returns:
true on success, false otherwise
Definition at line 1160 of file wincvs.cpp.

References NULL.

Referenced by CAboutDlg::CAboutDlg(), InitInstance(), OnAppCredits(), and CSplashWnd::OnPaint().

01161 {
01162     bool bRet = false;
01163     char szFullPath[_MAX_PATH];
01164     DWORD len = ::GetModuleFileName(AfxGetInstanceHandle(), szFullPath, sizeof(szFullPath));
01165     DWORD dwVerHnd;
01166
01167     DWORD dwVerInfoSize = GetFileVersionInfoSize(szFullPath, &dwVerHnd);
01168     if( dwVerInfoSize && len )
01169     {
01170         // If we were able to get the information, process it
01171         HANDLE hMem;
01172         LPVOID lpvMem;
01173         char szGetName[256];
01174         int cchRoot;
01175
01176         hMem = GlobalAlloc(GMEM_MOVEABLE, dwVerInfoSize);
01177         lpvMem = GlobalLock(hMem);
01178
01179         GetFileVersionInfo(szFullPath, dwVerHnd, dwVerInfoSize, lpvMem);
01180
01181         lstrcpy(szGetName, "\\StringFileInfo\\040904b0\\");
01182         cchRoot = lstrlen(szGetName);
01183
01184         BOOL fRet;
01185         UINT cchVer = 0;
01186         LPVOID lszVer = NULL;
01187
01188         lstrcpy(&szGetName[cchRoot], "ProductVersion");
01189         fRet = VerQueryValue(lpvMem, szGetName, &lszVer, &cchVer);
01190
01191         if( fRet && cchVer && lszVer )
01192         {
01193             vers = (char*)lszVer;
01194             bRet = true;
01195         }
01196
01197         GlobalUnlock(hMem);
01198         GlobalFree(hMem);
01199     }
01200
01201     return bRet;
01202 }

CWinCvsBrowser * CWincvsApp::GetBrowserView ( void )

Get the directory browser

Returns:
The directory browser
Definition at line 686 of file wincvs.cpp.

References CMainFrame::GetBrowserView(), m_mainFrame, and NULL.

Referenced by CMainFrame::ChangeLocation(), GetRoot(), InitInstance(), CMainFrame::OnBroadcastCmdMsg(), CWincvsDoc::OnBrowserOpen(), CMainFrame::OnClose(), CMainFrame::OnDropFiles(), CWincvsDoc::OnSavesettings(), and CBrowseFileView::ResetView().

00687 {
00688     if( m_mainFrame == NULL )
00689         return NULL;
00690
00691     return m_mainFrame->GetBrowserView();
00692 }

Here is the call graph for this function:

CWincvsView * CWincvsApp::GetConsoleView ( void )

Get the top console

Returns:
The top console
Definition at line 662 of file wincvs.cpp.

References CMainFrame::GetConsoleView(), m_mainFrame, and NULL.

Referenced by CGraphConsole::CGraphConsole(), CMainFrame::OnBroadcastCmdMsg(), CGraphView::OnKeyDown(), CGraphView::OnLButtonDown(), and OnLogWindowIsPresent().

00663 {
00664     if( m_mainFrame == NULL )
00665         return NULL;
00666
00667     return m_mainFrame->GetConsoleView();
00668 }

Here is the call graph for this function:

CvsProcess * CWincvsApp::GetCvsProcess ( void ) const [inline]

Get the current CVS process

Returns:
Current CVS process
Definition at line 225 of file wincvs.h.

References CvsProcess, and m_CvsProcess.

Referenced by stopCVS(), and WaitForCvs().

00226 {
00227     return m_CvsProcess;
00228 }

CDocument * CWincvsApp::GetDocument ( void )

Get the document

Returns:
The document
Definition at line 772 of file wincvs.cpp.

References NULL.

Referenced by InitInstance(), and CBrowseFileView::ResetView().

00773 {
00774     CWinApp* app = AfxGetApp();
00775
00776     POSITION post = app->GetFirstDocTemplatePosition();
00777     while( post != NULL )
00778     {
00779         CDocTemplate* tmpl = app->GetNextDocTemplate(post);
00780
00781         POSITION posd = tmpl->GetFirstDocPosition();
00782         while( posd != NULL )
00783         {
00784             CDocument* doc = tmpl->GetNextDoc(posd);
00785             if( !doc->IsKindOf(RUNTIME_CLASS(CWincvsDoc)) )
00786                 continue;
00787
00788             return doc;
00789         }
00790     }
00791
00792     ASSERT(0);
00793     return NULL;
00794 }

const char * CWincvsApp::GetEnvMainThread ( const char * name )

Ask for an environmental variable value from the main thread for those which require interaction (ex: CVS_GETPASS)

Parameters:
name Environmental variable name
Returns:
The environmental variable value
Definition at line 1239 of file wincvs.cpp.

References CMainFrame::GetEnvMainThread(), and m_mainFrame.

Referenced by glue_getenv().

01240 {
01241     return m_mainFrame->GetEnvMainThread(name);
01242 }

Here is the call graph for this function:

CCJShellTree * CWincvsApp::GetExplorerView ( void )

Get the directory explorer

Returns:
The directory explorer
Definition at line 726 of file wincvs.cpp.

References CMainFrame::GetExplorerView(), m_mainFrame, and NULL.

Referenced by CMainFrame::OnBroadcastCmdMsg().

00727 {
00728     if( m_mainFrame == NULL )
00729         return NULL;
00730
00731     return m_mainFrame->GetExplorerView();
00732 }

Here is the call graph for this function:

CBrowseFileView * CWincvsApp::GetFileView ( void )

Get the files browser

Returns:
The files browser
Definition at line 738 of file wincvs.cpp.

References NULL.

Referenced by IdleCvsProgress(), InitInstance(), CWinCvsBrowser::NotifySelectionChange(), CMainFrame::OnActivate(), CMainFrame::OnDropFiles(), CSortHeaderCtrl::OnFilterBtnClicked(), CSortHeaderCtrl::OnFilterChanged(), CMyShellTree::OnSelchanged(), CMainFrame::OnSysCommand(), CWinCvsBrowser::ResetBrowser(), CWinCvsBrowser::ResetView(), and CGetPrefs_GLOBALS::StoreValues().

00739 {
00740
00741     POSITION post = GetFirstDocTemplatePosition();
00742     while( post != NULL )
00743     {
00744         CDocTemplate* tmpl = GetNextDocTemplate(post);
00745         if( !tmpl->IsKindOf(RUNTIME_CLASS(CMultiDocTemplate)) )
00746             continue;
00747
00748         POSITION posd = tmpl->GetFirstDocPosition();
00749         while( posd != NULL )
00750         {
00751             CDocument* doc = tmpl->GetNextDoc(posd);
00752             if( !doc->IsKindOf(RUNTIME_CLASS(CWincvsDoc)) )
00753                 continue;
00754
00755             POSITION posv = doc->GetFirstViewPosition();
00756             while( posv != NULL )
00757             {
00758                 CView* view = doc->GetNextView(posv);
00759                 if( view->IsKindOf(RUNTIME_CLASS(CBrowseFileView)) )
00760                     return (CBrowseFileView*)view;
00761             }
00762         }
00763     }
00764
00765     return NULL;
00766 }

KiFilterModel * CWincvsApp::GetFilterModel ( void ) const

Get the filtering model

Returns:
The filtering model
Definition at line 1304 of file wincvs.cpp.

References CMainFrame::GetFilterModel(), and m_mainFrame.

Referenced by KoFileViewTraversalContext::KoFileViewTraversalContext(), CWinCvsBrowser::OnDestroy(), CBrowseFileView::OnDestroy(), CWinCvsBrowser::OnInitialUpdate(), CBrowseFileView::OnInitialUpdate(), and TBrowserFill::TBrowserFill().

01305 {
01306     return m_mainFrame->GetFilterModel();
01307 }

Here is the call graph for this function:

DWORD CWincvsApp::GetIdleTime ( void ) const [inline]

Get the idle time

Returns:
the idle time
Definition at line 270 of file wincvs.h.

References m_idletime.

Referenced by CLogoutThread::InitInstance().

00271 {
00272     return m_idletime;
00273 }

KiIgnoreModel * CWincvsApp::GetIgnoreModel ( void ) const

Get the ignore model

Returns:
The ignore model
Definition at line 1322 of file wincvs.cpp.

References CMainFrame::GetIgnoreModel(), and m_mainFrame.

Referenced by KoFileViewTraversalContext::KoFileViewTraversalContext(), CWinCvsBrowser::OnDestroy(), CBrowseFileView::OnDestroy(), CWinCvsBrowser::OnInitialUpdate(), CBrowseFileView::OnInitialUpdate(), and TBrowserFill::TBrowserFill().

01323 {
01324     return m_mainFrame->GetIgnoreModel();
01325 }

Here is the call graph for this function:

CMultiDocTemplate * CWincvsApp::GetLogGraph ( ) [inline]

Get the graph document

Returns:
The graph document
Definition at line 180 of file wincvs.h.

References m_logGraph.

Referenced by CvsLogParse().

00181 {
00182     return m_logGraph;
00183 }

CMainFrame * CWincvsApp::GetMainFrame ( void ) const [inline]

Get the main frame

Returns:
The main frame
Definition at line 207 of file wincvs.h.

References m_mainFrame.

Referenced by CWinCvsBrowser::Create(), CHistComboBoxEx::DelKeyTest(), CLogFrame::OnCmdMsg(), CGraphFrame::OnCmdMsg(), and CWinCvsBrowser::ResetBrowser().

00208 {
00209     return m_mainFrame;
00210 }

KiRecursionModel * CWincvsApp::GetRecursionModel ( void ) const

Get the recursion model

Returns:
The recursion model
Definition at line 1313 of file wincvs.cpp.

References CMainFrame::GetRecursionModel(), and m_mainFrame.

Referenced by KoFileViewTraversalContext::KoFileViewTraversalContext(), CBrowseFileView::OnDestroy(), and CBrowseFileView::OnInitialUpdate().

01314 {
01315     return m_mainFrame->GetRecursionModel();
01316 }

Here is the call graph for this function:

CString CWincvsApp::GetRoot ( void )

Get the current root

Returns:
Current root
Definition at line 698 of file wincvs.cpp.

References GetBrowserView(), and CWinCvsBrowser::GetRoot().

Referenced by CCheckout_MAIN::CCheckout_MAIN(), CBrowseFileView::OnUpdateViewUpone(), and CBrowseFileView::OnViewUpone().

00699 {
00700     CString root;
00701
00702     CWinCvsBrowser* view = GetBrowserView();
00703     if( view )
00704     {
00705         root = view->GetRoot();
00706     }
00707
00708     return root;
00709 }

Here is the call graph for this function:

CStatusBar * CWincvsApp::GetStatusBar ( void )

Get the mainframe status bar

Returns:
The mainframe status bar
Definition at line 674 of file wincvs.cpp.

References CMainFrame::GetStatusBar(), m_mainFrame, and NULL.

Referenced by IdleCvsProgress().

00675 {
00676     if( m_mainFrame == NULL )
00677         return NULL;
00678
00679     return m_mainFrame->GetStatusBar();
00680 }

Here is the call graph for this function:

bool CWincvsApp::HasPython ( ) const [inline]

Check the Python library flag

Returns:
true if Python is loaded, false otherwise
Definition at line 296 of file wincvs.h.

References m_hasPY.

Referenced by CWincvsView::OnKeyDown(), and CWincvsDoc::OnUpdateUsePyshell().

00297 {
00298     return m_hasPY;
00299 }

bool CWincvsApp::HasTCL ( ) const [inline]

Check the TCL library flag

Returns:
true if TCL is loaded, false otherwise
Definition at line 287 of file wincvs.h.

References m_hasTCL.

Referenced by CWincvsView::OnKeyDown(), CWincvsDoc::OnUpdateMacroAdmin(), and CWincvsDoc::OnUpdateUseTclshell().

00288 {
00289     return m_hasTCL;
00290 }

void CWincvsApp::IdleCvsProgress ( void )

Show the progress status during the idle time Definition at line 1247 of file wincvs.cpp.

References CBrowseFileView::CheckChanges(), GetFileView(), GetStatusBar(), m_CvsProcess, m_CvsRunning, m_CvsStopping, and NULL.

Referenced by PreTranslateMessage().

01248 {
01249     static bool bWasCvsRunning = false; // To restore the idle message once CVS has stoped
01250
01251     if( !m_CvsRunning )
01252     {
01253         if( bWasCvsRunning )
01254         {
01255             bWasCvsRunning = false;
01256
01257             CString strIdleString;
01258             strIdleString.LoadString(AFX_IDS_IDLEMESSAGE);
01259
01260             CStatusBar* bar = GetStatusBar();
01261             if( bar != NULL )
01262                 bar->SetWindowText(strIdleString);
01263         }
01264
01265         return;
01266     }
01267
01268     if( m_CvsProcess != NULL )
01269     {
01270         if( !cvs_process_is_active(m_CvsProcess) )
01271         {
01272             m_CvsRunning = false;
01273             m_CvsStopping = false;
01274             m_CvsProcess = NULL;
01275
01276             GetFileView()->CheckChanges();
01277         }
01278     }
01279
01280     bWasCvsRunning = true;
01281
01282     DWORD whatTimeIsIt = ::GetTickCount();
01283     static DWORD lastTime = 0;
01284
01285     // Let's make some stuff every second while cvs is idling
01286     if( (whatTimeIsIt - lastTime) < 1000 )
01287         return;
01288
01289     lastTime = whatTimeIsIt;
01290
01291     char path[_MAX_PATH];
01292     getcwd(path, _MAX_PATH);
01293
01294     CStatusBar* bar = GetStatusBar();
01295
01296     if( bar != NULL )
01297         bar->SetWindowText(path);
01298 }

Here is the call graph for this function:

BOOL CWincvsApp::InitInstance ( ) [virtual]

Definition at line 282 of file wincvs.cpp.

References _countof, BUTTONTITLE_OK, CheckLocationDriveType(), CStr, cvs_err(), CvsPrefs::DisableSplashScreen(), CSplashWnd::EnableSplashScreen(), CHistComboBoxEx::FindBestRoot(), gCvsPrefs, GetAppVersion(), GetBrowserView(), GetDocument(), GetFileView(), CBrowseFileView::GetPath(), CWinCvsBrowser::GetRoot(), gHistoryLocs, gLogoutThread, IDP_SOCKETS_INIT_FAILED, IDR_BROWSER, IDR_CNTR_INPLACE, IDR_FILELIST, IDR_FILTER, IDR_GRAPH, IDR_MAINFRAME, IDR_MULTIUSER, IDR_TAGS, CHHelpSupport::InitHTMLHelp(), IsValidHandle(), kBold, kCvsAlertStopIcon, kNL, kNormal, kUnderline, CvsPrefs::LastWorkingDir(), CvsPrefs::load(), m_logGraph, m_logTempl, m_mainFrame, NULL, CWinCvsBrowser::ResetBrowser(), CBrowseFileView::ResetView(), CvsPrefs::SetLastWorkingDir(), CWincvsDoc::SetTitle(), ShowTipAtStartup(), StartScriptEngine(), and CWinCvsBrowser::StepToLocation().

00283 {
00284 #if qCvsDebug
00285     int tmpDbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
00286     tmpDbgFlag |= _CRTDBG_LEAK_CHECK_DF;
00287     _CrtSetDbgFlag(tmpDbgFlag);
00288 #endif
00289
00290     CStr lastWorkingDir;
00291
00292     // David Gravereaux <davygrvy@interwoven.com> suggests this might
00293     // be a work around to the bug #42 (I love the bug number,
00294     // really fits the bug description ;-))
00295 #if 0
00296     if( !IsValidHandle(GetStdHandle(STD_OUTPUT_HANDLE)) )
00297     {
00298         SetStdHandle(STD_OUTPUT_HANDLE, NULL);
00299     }
00300 #endif
00301
00302     // CG: The following block was added by the Splash Screen component.
00303     {
00304         CCommandLineInfo cmdInfo;
00305         ParseCommandLine(cmdInfo);
00306
00307         CSplashWnd::EnableSplashScreen(
00308             (!(m_nCmdShow & SW_SHOWMINIMIZED)) && cmdInfo.m_bShowSplash);
00309     }
00310
00311     if( !AfxSocketInit() )
00312     {
00313         CString errorMsg;
00314         errorMsg.LoadString(IDP_SOCKETS_INIT_FAILED);
00315
00316         CvsAlert(kCvsAlertStopIcon,
00317             errorMsg, NULL,
00318             BUTTONTITLE_OK, NULL).ShowAlert();
00319
00320         return FALSE;
00321     }
00322
00323     AfxEnableControlContainer();
00324
00325     // Standard initialization
00326     // If you are not using these features and wish to reduce the size
00327     //  of your final executable, you should remove from the following
00328     //  the specific initialization routines you do not need.
00329
00330 #if _MFC_VER < 0x700
00331 #ifdef _AFXDLL
00332     Enable3dControls();         // Call this when using MFC in a shared DLL
00333 #else
00334     Enable3dControlsStatic();   // Call this when linking to MFC statically
00335 #endif
00336 #endif
00337
00338     // Initialize HTML Help support
00339     CHHelpSupport::InitHTMLHelp();
00340
00341     // Change the registry key under which our settings are stored.
00342     // You should modify this string to be something appropriate
00343     // such as the name of your company or organization.
00344     SetRegistryKey(_T("WinCvs"));
00345
00346     LoadStdProfileSettings(5);  // Load standard INI file options (including MRU)
00347     gCvsPrefs.load();
00348
00349     CSplashWnd::EnableSplashScreen(!gCvsPrefs.DisableSplashScreen());
00350
00351     CStr strVersion;
00352     GetAppVersion(strVersion);
00353     WriteProfileString(_T(""), _T("Current Version"), strVersion);
00354
00355     // We need to make a temp local copy of LastWorkingDir property here,
00356     // because CWinCvsBrowser::OnSelchanging event would override
00357     // LastWorkingDir preference when browser window is created.
00358     lastWorkingDir = gCvsPrefs.LastWorkingDir();
00359
00360     // Register the application's document templates.  Document templates
00361     //  serve as the connection between documents, frame windows and views.
00362
00363     m_logTempl = new CMultiDocTemplate(
00364         IDR_MAINFRAME,
00365         RUNTIME_CLASS(CWincvsDoc),
00366         RUNTIME_CLASS(CLogFrame),
00367         RUNTIME_CLASS(CBrowseFileView));
00368     AddDocTemplate(m_logTempl);
00369
00370     m_logGraph = new CMultiDocTemplate(
00371         IDR_GRAPH,
00372         RUNTIME_CLASS(CGraphDoc),
00373         RUNTIME_CLASS(CGraphFrame),
00374         RUNTIME_CLASS(CGraphView));
00375     AddDocTemplate(m_logGraph);
00376
00377     // create main MDI Frame window
00378     m_mainFrame = new CMainFrame;
00379     if (!m_mainFrame->LoadFrame(IDR_CNTR_INPLACE))
00380         return FALSE;
00381     m_pMainWnd = m_mainFrame;
00382
00383     // Initialize the cool menus...
00384 #if 0
00385     UINT barIds[] = {IDR_BROWSER, IDR_MAINFRAME, IDR_MULTIUSER, IDR_TAGS, IDR_FILELIST, IDR_FILTER};
00386     m_mainFrame->InitializeMenu(m_logTempl,
00387         IDR_MAINFRAME, barIds, _countof(barIds), IDR_MAINFRAME);
00388     m_mainFrame->InitializeMenu(m_logGraph,
00389         IDR_GRAPH, barIds, _countof(barIds), IDR_GRAPH);
00390 #endif
00391
00392     // Parse command line for standard shell commands, DDE, file open
00393     CCommandLineInfo cmdInfo;
00394     ParseCommandLine(cmdInfo);
00395
00396     // Try to resolve the long filename if the argument passed is the short filename (like when it's a call thru SendTo shell menu)
00397     if( -1 != cmdInfo.m_strFileName.Find('~') )
00398     {
00399         CString strLongFileName;
00400         CString strTempTileName = cmdInfo.m_strFileName;
00401
00402         SHFILEINFO sFileInfo;
00403         int nSlashPos = -1;
00404
00405         BOOL bError = FALSE;
00406
00407         while( -1 != (nSlashPos = strTempTileName.ReverseFind(kPathDelimiter)) )
00408         {
00409             if( SHGetFileInfo((LPCTSTR)strTempTileName, 0, &sFileInfo, sizeof(sFileInfo), SHGFI_DISPLAYNAME) )
00410             {
00411                 CString strFileNameBit = strTempTileName.Mid(nSlashPos + 1);
00412
00413                 strLongFileName = sFileInfo.szDisplayName + strLongFileName;
00414                 strLongFileName = kPathDelimiter + strLongFileName;
00415                 strTempTileName = strTempTileName.Left(nSlashPos);
00416             }
00417             else
00418             {
00419                 bError = TRUE;
00420                 break;  //we need it or we get the dead loop
00421             }
00422         }
00423
00424         if( !bError )
00425         {
00426             cmdInfo.m_strFileName = strTempTileName + strLongFileName;
00427         }
00428     }
00429
00430     // Open in the directory, so remove the file
00431     CString strOpenDirectory;
00432     CString strSelectFile;
00433     if( !cmdInfo.m_strFileName.IsEmpty() )
00434     {
00435         TCHAR fullpath[_MAX_PATH];
00436         _tfullpath(fullpath, cmdInfo.m_strFileName, _MAX_PATH);
00437         if( GetFileAttributes(cmdInfo.m_strFileName) != 0xFFFFFFFF )
00438         {
00439             cmdInfo.m_strFileName.Replace('/', kPathDelimiter); //normalize path
00440
00441             TCHAR drive[_MAX_DRIVE];
00442             TCHAR dir[_MAX_DIR];
00443
00444             _tsplitpath(fullpath, drive, dir, NULL, NULL);
00445             strSelectFile = fullpath;
00446             _tmakepath(fullpath, drive, dir, NULL, NULL);
00447             strOpenDirectory = fullpath;
00448         }
00449     }
00450
00451     // Dispatch commands specified on the command line
00452     // We need to trick the ProcessShellCommand a bit
00453     // because we might get a directory as a parameter we don't want it to check after the file...
00454     cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew;
00455     if( !ProcessShellCommand(cmdInfo) )
00456         return FALSE;
00457
00458     // The one and only window has been initialized, so show and update it.
00459     m_mainFrame/*m_pMainWnd*/->InitialShowWindow(m_nCmdShow);
00460     m_mainFrame/*m_pMainWnd*/->UpdateWindow();
00461
00462     m_mainFrame/*m_pMainWnd*/->DragAcceptFiles();
00463     //CWincvsView *cons = GetConsoleView();
00464     //if(cons != NULL)
00465     //  cons->DragAcceptFiles();
00466
00467
00468     CWinCvsBrowser* browser = GetBrowserView();
00469     CWincvsDoc* doc = (CWincvsDoc*)GetDocument();
00470     if( doc != NULL && browser != NULL )
00471         doc->SetTitle(browser->GetRoot());
00472
00473     CBrowseFileView* fileView = GetFileView();
00474     if( fileView != NULL )
00475     {
00476         if( strOpenDirectory.IsEmpty() )
00477         {
00478             // Goto the last working directory, which was selected
00479             // when WinCVS was closed
00480             if( !lastWorkingDir.empty() && browser->StepToLocation(lastWorkingDir) )
00481             {
00482                 CheckLocationDriveType(lastWorkingDir);
00483                 fileView->ResetView(lastWorkingDir, false, (LPCTSTR)NULL);
00484                 gCvsPrefs.SetLastWorkingDir(lastWorkingDir);
00485             }
00486             else
00487             {
00488                 CheckLocationDriveType(browser->GetRoot());
00489                 fileView->ResetView(browser->GetRoot());
00490             }
00491         }
00492         else
00493         {
00494             CColorConsole out;
00495             out << kBold << "Locating: " << kNormal << kUnderline << cmdInfo.m_strFileName << kNormal <<  kNormal << kNL;
00496
00497             //search the browse location (will create a new location if not found)
00498             extern CMString gHistoryLocs;
00499             CString bestRoot = CHistComboBoxEx::FindBestRoot(gHistoryLocs, strOpenDirectory);
00500             if( !bestRoot.IsEmpty() )
00501             {
00502                 browser->ResetBrowser(bestRoot);
00503             }
00504
00505             if( browser->StepToLocation(strOpenDirectory) )
00506             {
00507                 CheckLocationDriveType(strOpenDirectory);
00508                 fileView->ResetView(strOpenDirectory, false, strSelectFile);
00509             }
00510             else
00511             {
00512                 CheckLocationDriveType(browser->GetRoot());
00513                 fileView->ResetView(browser->GetRoot());
00514             }
00515         }
00516     }
00517
00518     // If you launch WinCvs with the file or directory as a parameter you obviously don't need a "tip of the day"
00519     if( strOpenDirectory.IsEmpty() )
00520     {
00521         // CG: This line inserted by 'Tip of the Day' component.
00522         ShowTipAtStartup();
00523     }
00524
00525     // Auto-logout thread
00526     gLogoutThread = new CLogoutThread();
00527     if( gLogoutThread == NULL )
00528     {
00529         cvs_err("Impossible to create the auto-logout thread !\n");
00530     }
00531     else
00532     {
00533         ASSERT_VALID(gLogoutThread);
00534
00535         // Create Thread in a suspended state so we can set the Priority
00536         // before it starts getting away from us
00537         if( !gLogoutThread->CreateThread(CREATE_SUSPENDED) )
00538         {
00539             cvs_err("Impossible to start the auto-logout thread (error %d)!\n", GetLastError());
00540
00541             delete gLogoutThread;
00542             gLogoutThread = NULL;
00543         }
00544
00545         if( gLogoutThread != NULL )
00546         {
00547             // If you want to make the sample more sprightly, set the thread priority here
00548             // a little higher. It has been set at idle priority to keep from bogging down
00549             // other apps that may also be running.
00550             VERIFY(gLogoutThread->SetThreadPriority(THREAD_PRIORITY_NORMAL));
00551             // Now the thread can run wild
00552             gLogoutThread->ResumeThread();
00553         }
00554     }
00555
00556     // Start macros
00557     StartScriptEngine();
00558
00559     // Make sure the current directory is properly setup
00560     if( NULL != fileView )
00561     {
00562         chdir(fileView->GetPath());
00563     }
00564
00565     return TRUE;
00566 }

Here is the call graph for this function:

bool CWincvsApp::IsBackgroundProcess ( void ) const [inline]

Test whether the application is in background

Returns:
true if app is in the background, false otherwise
Definition at line 189 of file wincvs.h.

References m_isBackgroundProcess.

00190 {
00191     return m_isBackgroundProcess;
00192 }

bool CWincvsApp::IsCvsRunning ( void ) const [inline]

Get the CVS running state

Returns:
The CVS running state
Definition at line 243 of file wincvs.h.

References m_CvsRunning.

Referenced by CWinCvsBrowser::DisableCommon(), CGraphView::DisableCommon(), CExploreBar::DisableCommon(), CMyShellTree::DisableCommon(), CBrowseFileView::DisableCommon(), CCvsStatusBar::DrawItem(), CLogoutThread::InitInstance(), IsAppEnabled(), CItemListDlg::OnCancel(), CCvsRootDlg::OnCancel(), CMainFrame::OnClose(), CWinCvsBrowser::OnContextMenu(), CWinCvsBrowser::OnItemexpanding(), CBrowseFileView::OnKeydown(), CBrowseFileView::OnLButtonDblClk(), CWinCvsBrowser::OnRButtonDown(), CWinCvsBrowser::OnSelchanging(), CWinCvsBrowser::OnSetCursor(), CBrowseFileView::OnSetCursor(), CCvsStatusBar::OnTimer(), CBrowseFileView::OnTimer(), CWincvsDoc::OnUpdateCvsCmd(), CBrowseFileView::OnUpdateCvsCmd(), CWincvsDoc::OnUpdateMacroAdmin(), CWincvsDoc::OnUpdatePrefs(), CWincvsDoc::OnUpdateSavesettings(), OnUpdateStopcvs(), CWinCvsBrowser::OnUpdateViewReload(), CBrowseFileView::OnUpdateViewReload(), and CBrowseFileView::OnUpdateViewUpone().

00244 {
00245     return m_CvsRunning;
00246 }

bool CWincvsApp::IsCvsStopping ( void ) const [inline]

Get the CVS stopping state

Returns:
The CVS stopping state
Definition at line 261 of file wincvs.h.

References m_CvsStopping.

Referenced by CItemListDlg::OnCancel(), CCvsRootDlg::OnCancel(), and OnUpdateStopcvs().

00262 {
00263     return m_CvsStopping;
00264 }

void CWincvsApp::LookForResourceFile | ( | const char * | what,
 |  | UStr & | path
 | ) | [private]

void CWincvsApp::OnAppAbout ( ) [protected]

App command to run the dialog.

Definition at line 652 of file wincvs.cpp.

00653 {
00654     CAboutDlg aboutDlg;
00655     aboutDlg.DoModal();
00656 }

void CWincvsApp::OnAppCopyrights ( ) [protected]

Definition at line 993 of file wincvs.cpp.

References cvs_out().

00994 {
00995     cvs_out("\nCvsGui, CVSNT and CVS are distributed under the terms of\n");
00996     cvs_out("the GNU General Public License (GPL).\n\n");
00997     cvs_out("* WinCvs: maintained by Jerzy Kaczorowski <kaczoroj@hotmail.com>\n");
00998     cvs_out("* MacCVS: maintained by Alexandre Parenteau <aubonbeurre@hotmail.com>\n");
00999     cvs_out("* gCvs: maintained by Karl-Heinz Bruenen <gcvs@bruenen-net.de>\n");
01000     cvs_out("* WinCvs documentation : Copyright © 1999 Don Harper <don@lamrc.com>.\n");
01001     cvs_out("* CVSNT : Copyright (c) 1999-2003 Tony Hoyle and others\n");
01002     cvs_out("* CVS : Copyright © 1989-1998 Brian Berliner, david d `zoo' zuhn,\n");
01003     cvs_out("        Jeff Polk, and other authors\n");
01004     cvs_out("* CJLIB : Copyright © 1998-99 Kirk Stowell <kstowell@codejockeys.com>\n");
01005     cvs_out("* Kerberos : Copyright © 1997 the Massachusetts Institute of Technology\n");
01006     cvs_out("* TCL : Copyright © Sun Microsystems Inc.\n");
01007     cvs_out("* Python : Copyright © Guido van Rossum\n");
01008     cvs_out("* MFC : Copyright © 1992-1997 Microsoft Corporation\n");
01009     cvs_out("\nSome other copyrights may apply, please check the source code for details.\n");
01010 }

Here is the call graph for this function:

void CWincvsApp::OnAppCredits ( ) [protected]

Definition at line 1012 of file wincvs.cpp.

References CStr, cvs_out(), gAuthors, GetAppVersion(), and NULL.

01013 {
01014     // WinCvs version
01015     CStr vers;
01016
01017     if( GetAppVersion(vers) )
01018         cvs_out("\n%s\n", (const char*)vers);
01019     else
01020         cvs_out("\nWinCvs\n");
01021
01022     // Authors in random order
01023     cvs_out("- WinCvs is developed by:\n");
01024
01025     const int authorsSize = sizeof(gAuthors) / sizeof(gAuthors[0]);
01026     vector<const char*> authors(authorsSize);
01027
01028     for(int index = 0; index < authorsSize; index++)
01029     {
01030         authors[index] = gAuthors[index];
01031     }
01032
01033     srand((unsigned)time(NULL));
01034     random_shuffle(authors.begin(), authors.end());
01035
01036     for(vector<const char*>::const_iterator it = authors.begin(); it != authors.end(); it++)
01037     {
01038         std::stringstream strOut;
01039         strOut << "\t* "<< (*it) << "\n",
01040
01041         cvs_out(strOut.str().c_str());
01042     }
01043
01044     cvs_out("\t* Other contributors (see the ChangeLog)\n");
01045
01046     // More info
01047     cvs_out("- WinCvs page : http://cvsgui.sourceforge.net/ or http://www.wincvs.org\n");
01048     cvs_out("- CVSNT page : http://www.cvsnt.org\n");
01049     cvs_out("- CVS page : http://www.cvshome.org\n");
01050     cvs_out("- WinCvs documentation : Don Harper <don@lamrc.com>.\n");
01051     cvs_out("- WinHelp cvs documentation : Norbert Klamann.\n");
01052
01053     cvs_out("- Special thanks to :\n");
01054     cvs_out("\t* The Strata Inc. developpers who are so patients with WinCvs\n");
01055     cvs_out("\t  and help to identify a lot of problems.\n");
01056     cvs_out("\t* All the people who are submitting bugs, patches and\n");
01057     cvs_out("\t  answer the cvsgui mailing list.\n");
01058
01059     cvs_out("- Bug reports, suggestions :\n");
01060     cvs_out("\t* Richard Wesley, Alain Aslag Roy, Eric Aubourg and many others\n");
01061     cvs_out("- CVS contributors :\n");
01062     cvs_out("\t* Too many to be listed here, see the 'ChangeLog' instead !\n");
01063 }

Here is the call graph for this function:

void CWincvsApp::OnFileNew ( ) [protected]

Definition at line 988 of file wincvs.cpp.

References m_logTempl, and NULL.

00989 {
00990     m_logTempl->OpenDocumentFile(NULL);
00991 }

void CWincvsApp::OnHelpCvs ( ) [protected]

Display CVS Documentation file.

Definition at line 1435 of file wincvs.cpp.

References _i18n, BUTTONTITLE_OK, CStr, gCvsPrefs, kCvsAlertStopIcon, NULL, CvsAlert::ShowAlert(), SplitPath(), CvsPrefs::UseAltCvs(), and CvsPrefs::WhichCvs().

01436 {
01437     CStr cvscmd;
01438     gCvsPrefs.WhichCvs(cvscmd, gCvsPrefs.UseAltCvs());
01439
01440     CStr uppath, folder;
01441     if( SplitPath(cvscmd, uppath, folder) )
01442     {
01443         CStr cvsHelpPath = uppath;
01444         cvsHelpPath += "cvs.chm";
01445
01446         if( HtmlHelp(AfxGetMainWnd()->GetSafeHwnd(), cvsHelpPath, HH_DISPLAY_TOPIC, 0) == NULL )
01447         {
01448             CvsAlert cvsAlert(kCvsAlertStopIcon,
01449                 _i18n("Unable to open CVS Documentation file."),
01450                 "Make sure CVS Documentation is installed in the same folder as your CVS executable.",
01451                 BUTTONTITLE_OK, NULL);
01452
01453             cvsAlert.ShowAlert();
01454         }
01455     }
01456     else
01457     {
01458         CvsAlert cvsAlert(kCvsAlertStopIcon,
01459             _i18n("Unable to locate CVS Documentation file."),
01460             "Make sure CVS Documentation is installed in the same folder as your CVS executable.",
01461             BUTTONTITLE_OK, NULL);
01462
01463         cvsAlert.ShowAlert();
01464     }
01465 }

Here is the call graph for this function:

void CWincvsApp::OnLogWindowIsPresent ( CCmdUI * pCmdUI ) [protected]

Definition at line 983 of file wincvs.cpp.

References GetConsoleView(), and NULL.

00984 {
00985     pCmdUI->Enable(GetConsoleView() != NULL);
00986 }

Here is the call graph for this function:

void CWincvsApp::OnStopcvs ( ) [protected]

WM_COMMAND message handler, stop running CVS command.

Definition at line 1423 of file wincvs.cpp.

References stopCVS().

01424 {
01425     stopCVS();
01426 }

Here is the call graph for this function:

void CWincvsApp::OnUpdateStopcvs ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1429 of file wincvs.cpp.

References IsCvsRunning(), and IsCvsStopping().

01430 {
01431     pCmdUI->Enable(IsCvsRunning() && !IsCvsStopping() ? TRUE : FALSE);
01432 }

Here is the call graph for this function:

void CWincvsApp::PeekPumpAndIdle ( bool doIdle )

Peek and pump application messages and perform the idle processing

Parameters:
doIdle true to an idle processing, false otherwise
Definition at line 1353 of file wincvs.cpp.

References NULL.

01354 {
01355     MSG Msg;
01356     while( ::PeekMessage(&Msg, NULL, 0, 0, PM_NOREMOVE) )
01357     {
01358         PumpMessage();
01359     }
01360
01361     if( doIdle )
01362     {
01363         LONG lIdle = 0;
01364         while( OnIdle(lIdle++) )
01365             ;
01366     }
01367 }

BOOL CWincvsApp::PreTranslateMessage ( MSG * pMsg ) [virtual]

Definition at line 1089 of file wincvs.cpp.

References IdleCvsProgress(), m_idletime, CSplashWnd::PreTranslateAppMessage(), and PyInvalUICache().

01090 {
01091     // CG: The following lines were added by the Splash Screen component.
01092     if( CSplashWnd::PreTranslateAppMessage(pMsg) )
01093         return TRUE;
01094
01095     DWORD time = ::GetTickCount();
01096
01097     if( m_idletime == 0 ||
01098         pMsg->message == WM_KEYDOWN ||
01099         pMsg->message == WM_SYSKEYDOWN ||
01100         pMsg->message == WM_LBUTTONDOWN ||
01101         pMsg->message == WM_RBUTTONDOWN ||
01102         pMsg->message == WM_MBUTTONDOWN ||
01103         pMsg->message == WM_NCLBUTTONDOWN ||
01104         pMsg->message == WM_NCRBUTTONDOWN ||
01105         pMsg->message == WM_NCMBUTTONDOWN )
01106     {
01107         m_idletime = time;
01108         PyInvalUICache();
01109     }
01110
01111     IdleCvsProgress();
01112
01113     return CWinApp::PreTranslateMessage(pMsg);
01114 }

Here is the call graph for this function:

void CWincvsApp::ResetIdleTime ( void ) [inline]

Reset idle time Definition at line 278 of file wincvs.h.

References m_idletime.

Referenced by CLogoutThread::InitInstance().

00279 {
00280     m_idletime = 0;
00281 }

void CWincvsApp::RestartScriptEngine ( )

Restart the script engine Definition at line 1372 of file wincvs.cpp.

References StartScriptEngine(), and StopScriptEngine().

Referenced by CWincvsDoc::OnUsePyshell(), CWincvsDoc::OnUseTclshell(), and CGetPrefs_WINCVS::StoreValues().

01373 {
01374     StopScriptEngine();
01375     StartScriptEngine(true);
01376 }

Here is the call graph for this function:

BOOL CWincvsApp::SaveAllModified ( ) [virtual]

Definition at line 1204 of file wincvs.cpp.

References cvs_err(), CvsCmdLogout(), gCvsPrefs, gLogoutThread, CvsPrefs::HasLoogedIn(), CLogoutThread::KillThread(), CvsPrefs::LogoutTimeOut(), m_CvsRunning, m_CvsStopping, NULL, and WaitForCvs().

01205 {
01206     // Prevent from exiting when cvs is running
01207     if( m_CvsRunning )
01208     {
01209         m_CvsStopping = true;
01210         return TRUE;
01211     }
01212
01213     if( gLogoutThread != NULL )
01214     {
01215         HANDLE hdl = gLogoutThread->m_hThread;
01216         gLogoutThread->KillThread();
01217         WaitForSingleObject(hdl, INFINITE);
01218
01219         //delete gLogoutThread;
01220         gLogoutThread = NULL;
01221     }
01222
01223     // Auto-logout
01224     if( gCvsPrefs.HasLoogedIn() && gCvsPrefs.LogoutTimeOut() > 0 )
01225     {
01226         cvs_err("Making automatic logout before quitting:\n");
01227         CvsCmdLogout();
01228         WaitForCvs();
01229     }
01230
01231     return CWinApp::SaveAllModified();
01232 }

Here is the call graph for this function:

void CWincvsApp::SetBackgroundProcess ( const bool isBackgroundProcess ) [inline]

Set the application background status flag

Parameters:
isBackgroundProcess Application background status flag
Definition at line 198 of file wincvs.h.

References m_isBackgroundProcess.

Referenced by CMainFrame::OnActivate().

00199 {
00200     m_isBackgroundProcess = isBackgroundProcess;
00201 }

void CWincvsApp::SetCvsProcess ( CvsProcess * proc ) [inline]

Set the current CVS process

Parameters:
proc current CVS process
Definition at line 216 of file wincvs.h.

References CvsProcess, and m_CvsProcess.

00217 {
00218     m_CvsProcess = proc;
00219 }

void CWincvsApp::SetCvsRunning ( bool state ) [inline]

Set the CVS running state

Parameters:
state State
Definition at line 234 of file wincvs.h.

References m_CvsRunning.

00235 {
00236     m_CvsRunning = state;
00237 }

void CWincvsApp::SetCvsStopping ( bool state ) [inline]

Set the CVS stopping state

Parameters:
state CVS stopping state
Definition at line 252 of file wincvs.h.

References m_CvsStopping.

Referenced by stopCVS().

00253 {
00254     m_CvsStopping = state;
00255 }

void CWincvsApp::ShowTipAtStartup ( void ) [private]

Definition at line 1065 of file wincvs.cpp.

References NULL.

Referenced by InitInstance().

01066 {
01067     // CG: This function added by 'Tip of the Day' component.
01068
01069     CCommandLineInfo cmdInfo;
01070     ParseCommandLine(cmdInfo);
01071
01072     if( cmdInfo.m_bShowSplash )
01073     {
01074         CTipDlg dlg(IsWindow(m_pMainWnd->GetSafeHwnd()) ? m_pMainWnd : NULL);
01075
01076         if( dlg.m_bStartup )
01077             dlg.DoModal();
01078     }
01079 }

void CWincvsApp::ShowTipOfTheDay ( void ) [private]

Definition at line 1081 of file wincvs.cpp.

01082 {
01083     // CG: This function added by 'Tip of the Day' component.
01084
01085     CTipDlg dlg;
01086     dlg.DoModal();
01087 }

void CWincvsApp::StartScriptEngine ( const bool forceReload = false )

Start the script engine Definition at line 1381 of file wincvs.cpp.

References cvs_err(), cvs_out(), gCvsPrefs, CvsPrefs::GetUseShell(), CPython_Interp::InitPythonSupport(), CPython_Interp::IsAvail(), CTcl_Interp::IsAvail(), m_hasPY, m_hasTCL, PyMacrosReloadAll(), CvsPrefs::SetUseShell(), SHELL_PYTHON, and SHELL_TCL.

Referenced by InitInstance(), and RestartScriptEngine().

01382 {
01383     CPython_Interp::InitPythonSupport(forceReload);
01384
01385     //MacrosReloadAll();
01386     PyMacrosReloadAll();
01387
01388     m_hasTCL = CTcl_Interp::IsAvail(forceReload);
01389     m_hasPY = CPython_Interp::IsAvail();
01390
01391     if( gCvsPrefs.GetUseShell() == SHELL_PYTHON && !m_hasPY && m_hasTCL )
01392     {
01393         cvs_out("Python is not available, switching the shell to TCL\n");
01394         gCvsPrefs.SetUseShell(SHELL_TCL);
01395     }
01396     else if( gCvsPrefs.GetUseShell() == SHELL_TCL && m_hasPY && !m_hasTCL )
01397     {
01398         cvs_out("TCL is not available, switching the shell to Python\n");
01399         gCvsPrefs.SetUseShell(SHELL_PYTHON);
01400     }
01401
01402     if( gCvsPrefs.GetUseShell() == SHELL_TCL && m_hasTCL )
01403     {
01404         cvs_out("TCL is available, shell is enabled : help (select and press enter)\n");
01405     }
01406
01407     if( !m_hasTCL && !m_hasPY )
01408     {
01409         cvs_err("TCL or Python are not available, shell is disabled\n");
01410     }
01411 }

Here is the call graph for this function:

void CWincvsApp::StopScriptEngine ( )

Stop the script engine Definition at line 1416 of file wincvs.cpp.

References CPython_Interp::ClosePythonSupport(), and PyInvalUICache().

Referenced by RestartScriptEngine(), and CWincvsView::~CWincvsView().

01417 {
01418     PyInvalUICache();
01419     CPython_Interp::ClosePythonSupport();
01420 }

Here is the call graph for this function:

void CWincvsApp::UpdateAllDocsView ( )

Update all documents views for all documents Definition at line 1330 of file wincvs.cpp.

References NULL.

Referenced by CGraphOptDlg::OnApplyNow(), and CGraphView::OnGraphGraphoptions().

01331 {
01332     POSITION pos = GetFirstDocTemplatePosition();
01333     while( pos )
01334     {
01335         CDocTemplate* pTemplate = GetNextDocTemplate(pos);
01336
01337         POSITION pos2 = pTemplate->GetFirstDocPosition();
01338         while( pos2 )
01339         {
01340             CDocument* pDocument;
01341             if( pDocument = pTemplate->GetNextDoc(pos2) )
01342             {
01343                 pDocument->UpdateAllViews(NULL);
01344             }
01345         }
01346     }
01347 }

Member Data Documentation

_CvsProcess* CWincvsApp::m_CvsProcess [private]

Current CVS process Definition at line 98 of file wincvs.h.

Referenced by GetCvsProcess(), IdleCvsProgress(), and SetCvsProcess().

bool CWincvsApp::m_CvsRunning [private]

CVS command is running Definition at line 99 of file wincvs.h.

Referenced by IdleCvsProgress(), IsCvsRunning(), SaveAllModified(), and SetCvsRunning().

bool CWincvsApp::m_CvsStopping [private]

CVS command is about to stop Definition at line 100 of file wincvs.h.

Referenced by IdleCvsProgress(), IsCvsStopping(), SaveAllModified(), and SetCvsStopping().

bool CWincvsApp::m_hasPY [private]

Flag indicating whether the Python library is loaded Definition at line 108 of file wincvs.h.

Referenced by HasPython(), and StartScriptEngine().

bool CWincvsApp::m_hasTCL [private]

Flag indicating whether the TCL library is loaded Definition at line 107 of file wincvs.h.

Referenced by HasTCL(), and StartScriptEngine().

DWORD CWincvsApp::m_idletime [private]

Definition at line 95 of file wincvs.h.

Referenced by GetIdleTime(), PreTranslateMessage(), and ResetIdleTime().

bool CWincvsApp::m_isBackgroundProcess [private]

Flag to indicate that the application is in the background Definition at line 102 of file wincvs.h.

Referenced by IsBackgroundProcess(), and SetBackgroundProcess().

CMultiDocTemplate* CWincvsApp::m_logGraph [private]

Graph view document Definition at line 105 of file wincvs.h.

Referenced by GetLogGraph(), and InitInstance().

CMultiDocTemplate* CWincvsApp::m_logTempl [private]

Browse file view document Definition at line 104 of file wincvs.h.

Referenced by InitInstance(), and OnFileNew().

CMainFrame* CWincvsApp::m_mainFrame [private]

Definition at line 96 of file wincvs.h.

Referenced by ActivateBrowserView(), GetBrowserView(), GetConsoleView(), GetEnvMainThread(), GetExplorerView(), GetFilterModel(), GetIgnoreModel(), GetMainFrame(), GetRecursionModel(), GetStatusBar(), and InitInstance().

The documentation for this class was generated from the following files:
  • WinCvs/wincvs.h
  • WinCvs/wincvs.cpp
Generated on Sat Aug 7 22:58:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinCvsBrowser Class Reference

CWinCvsBrowser Class Reference

#include <WinCvsBrowser.h>

Inheritance diagram for CWinCvsBrowser:

[legend]
Collaboration diagram for CWinCvsBrowser:

[legend]
List of all members.

Public Member Functions

virtual BOOL | Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)
Create virtual override, initialize browser tree control.
virtual void | OnInitialUpdate ()
OnInitialUpdate virtual override, expand the root item and register ignore notification function.
void | ResetView (bool forceReload=false, bool notifyView=false)
bool | StepToLocation (const char *path, bool notifyView=false)
void | ResetBrowser (const char *path, bool notifyView=false)
void | OnIgnoreChanged ()
Ignore changed notification handler, post reset view message.
void | OnFilteringChanged ()
void | NotifySelectionChange ()
const UStr & | GetRoot (void) const
Get the current root.
bool | GetSelectionNotificationLocked () const
Get the selection notification locked state.
void | SetSelectionNotificationLocked (bool selectionNotificationLocked)
Set the selection notification locked state.
bool | GetSelectionChanged () const
Get the selection changed state.
void | SetSelectionChanged (bool selectionChanged)
Set the selection changed state.

Protected Member Functions

CWinCvsBrowser ()
virtual | ~CWinCvsBrowser ()
virtual void | OnDraw (CDC *pDC)
OnDraw virtual override, no drawing code needed.
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
PreCreateWindow virtual override, modify the window style.
afx_msg void | OnItemexpanding (NMHDR *pNMHDR, LRESULT *pResult)
TVN_ITEMEXPANDING notification handler, expand the selected node.
afx_msg void | OnSelchanging (NMHDR *pNMHDR, LRESULT *pResult)
TVN_SELCHANGING notification handler, prevent the selection of the missing item.
afx_msg void | OnUpdateViewAdd (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewUpdate (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewAdd ()
WM_COMMAND message handler, cvs add selection.
afx_msg void | OnViewCommit ()
WM_COMMAND message handler, cvs commit selection.
afx_msg void | OnViewUpdate ()
WM_COMMAND message handler, cvs update selection.
afx_msg void | OnViewQueryUpdate ()
WM_COMMAND message handler, cvs -n update selection.
afx_msg void | OnViewDiff ()
WM_COMMAND message handler, [cvs] diff selection.
afx_msg void | OnViewLog ()
WM_COMMAND message handler, cvs log selection.
afx_msg void | OnViewStatus ()
WM_COMMAND message handler, cvs status selection.
afx_msg void | OnViewUnlock ()
WM_COMMAND message handler, cvs admin -u selection.
afx_msg void | OnViewWatchOn ()
WM_COMMAND message handler, cvs watch add selection.
afx_msg void | OnViewWatchOff ()
WM_COMMAND message handler, cvs watch remove selection.
afx_msg void | OnViewEdit ()
WM_COMMAND message handler, cvs edit selection.
afx_msg void | OnViewUnedit ()
WM_COMMAND message handler, cvs unedit selection.
afx_msg void | OnViewWatchers ()
WM_COMMAND message handler, cvs watchers selection.
afx_msg void | OnViewEditors ()
WM_COMMAND message handler, cvs editors selection.
afx_msg void | OnViewRelease ()
WM_COMMAND message handler, cvs release selection.
afx_msg void | OnViewTagNew ()
WM_COMMAND message handler, cvs tag selection.
afx_msg void | OnViewTagDelete ()
WM_COMMAND message handler, cvs tag -d selection.
afx_msg void | OnViewTagBranch ()
WM_COMMAND message handler, cvs tag -b selection.
afx_msg void | OnViewExplore ()
WM_COMMAND message handler, open the explorer.
afx_msg void | OnUpdateViewExplore (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnUpdateViewReload (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewReload ()
WM_COMMAND message handler, refresh view.
afx_msg void | OnViewCheckout ()
WM_COMMAND message handler, cvs checkout.
afx_msg void | OnUpdateViewCheckout (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewImport ()
WM_COMMAND message handler, cvs import.
afx_msg void | OnUpdateViewImport (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
WM_SETCURSOR message handler, set the hourglass cursor during CVS commands.
afx_msg void | OnSelchanged (NMHDR *pNMHDR, LRESULT *pResult)
TVN_SELCHANGED notification handler, notify the views.
afx_msg void | OnDestroy ()
WM_DESTROY message handler, unregister ignore notification function.
afx_msg void | OnViewReservededit ()
WM_COMMAND message handler, cvs edit -c selection.
afx_msg void | OnViewForceedit ()
WM_COMMAND message handler, cvs edit -f selection.
afx_msg void | OnAppCmdline ()
WM_COMMAND message handler, display command line dialog.
afx_msg void | OnAppRtagbranch ()
WM_COMMAND message handler, cvs rtag -b.
afx_msg void | OnAppRtagcreate ()
WM_COMMAND message handler, cvs rtag.
afx_msg void | OnAppRtagdelete ()
WM_COMMAND message handler, cvs rtag -d.
afx_msg void | OnUpdateAppCmdline (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
WM_CONTEXTMENU message handler, display the custom menu.
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
WM_RBUTTONDOWN message handler, select the clicked item.
afx_msg void | OnQueryProperties ()
WM_COMMAND message handler, show the selection properties.
afx_msg void | OnUpdateQueryProperties (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg void | OnViewNewInstance ()
afx_msg void | OnUpdateMacro (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg BOOL | OnMacro (UINT nID)
WM_COMMAND message handler, invoke macro.
afx_msg void | OnUpdateCustomize (CCmdUI *pCmdUI)
UPDATE_COMMAND_UI handler.
afx_msg BOOL | OnCustomize (UINT nID)
WM_COMMAND message handler, display the customize dialog.
afx_msg LRESULT | OnResetView (WPARAM, LPARAM)
WM_RESETVIEW message handler, reset view.

Private Member Functions

void | StoreExpanded (std::vector< UStr > &allExpanded, HTREEITEM root=0L)
bool DisableCommon ()
void | OnUpdateCmd (CCmdUI *pCmdUI, BOOL needCvsInfos)
void | SetNewStyle (long lStyleMask, BOOL bSetBits)
HTREEITEM | GetItemByLocation (const char *path)
void | DeleteAllItems (HTREEITEM root=0L)
void | RetrievePath (HTREEITEM item, UStr &path)
bool | ProcessSelectionCommand (KiSelectionHandler *handler)

Private Attributes

UStr m_root
bool m_selectionNotificationLocked
bool m_selectionChanged
bool m_resetViewPending

Static Private Attributes

CImageList | m_imageList

Constructor & Destructor Documentation

CWinCvsBrowser::CWinCvsBrowser ( ) [protected]

Definition at line 443 of file WinCvsBrowser.cpp.

00444     : m_selectionNotificationLocked(false), m_selectionChanged(false), m_resetViewPending(false)
00445 {
00446 }

CWinCvsBrowser::~CWinCvsBrowser ( ) [protected, virtual]

Definition at line 448 of file WinCvsBrowser.cpp.

00449 {
00450 }

Member Function Documentation

BOOL CWinCvsBrowser::Create | ( | LPCTSTR | lpszClassName,
 |  | LPCTSTR | lpszWindowName,
 |  | DWORD | dwStyle,
 |  | const RECT & | rect,
 |  | CWnd * | pParentWnd,
 |  | UINT | nID,
 |  | CCreateContext * | pContext = NULL
 | ) | [virtual]

Create virtual override, initialize browser tree control.

Definition at line 480 of file WinCvsBrowser.cpp.

References CStr, CMainFrame::GetBrowseHistory(), CWincvsApp::GetMainFrame(), CHistComboBoxEx::GetOldLoc(), IDB_MODULES, m_imageList, ResetBrowser(), and SetNewStyle().

Referenced by CBrowserBar::Create().

00481 {
00482     if( !CTreeView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext) )
00483     {
00484         return FALSE;
00485     }
00486
00487     if( m_imageList.m_hImageList == 0L )
00488         m_imageList.Create(IDB_MODULES, 16, 1, RGB(255, 255, 255));
00489
00490     CTreeCtrl& treeCtrl = GetTreeCtrl();
00491     treeCtrl.SetImageList(&m_imageList, TVSIL_NORMAL);
00492
00493     // Set the initial root
00494     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00495     CMainFrame* mainFrm = app->GetMainFrame();
00496     CHistComboBoxEx& hist = mainFrm->GetBrowseHistory();
00497     CStr newpath((const char*)hist.GetOldLoc());
00498     ResetBrowser(newpath, true);
00499
00500     SetNewStyle(TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT, TRUE);
00501
00502     return TRUE;
00503 }

Here is the call graph for this function:

void CWinCvsBrowser::DeleteAllItems ( HTREEITEM root = 0L ) [private]

Delete all items and handle the associated item data

Parameters:
root If root != 0L then delete all childs of root (except root), if root == 0L then delete all
Definition at line 509 of file WinCvsBrowser.cpp.

References EntnodeData::UnRef().

Referenced by OnItemexpanding(), and ResetBrowser().

00510 {
00511     // We don't want the file view to be notified when things get deleted
00512     // process selection after we are done with all that jazz below
00513     CSelectionChangeNotifier notifier(this, true);
00514
00515     CTreeCtrl& treeCtrl = GetTreeCtrl();
00516     bool eraseRoot = false;
00517     if( root == 0L )
00518     {
00519         root = treeCtrl.GetRootItem( );
00520         eraseRoot = true;
00521     }
00522
00523     if( root == 0L )
00524         return;
00525
00526     CWndRedrawMngr redrawMngr(this);
00527
00528     HTREEITEM childItem = treeCtrl.GetNextItem(root, TVGN_CHILD);
00529
00530     // Erase all the childs
00531     while( childItem != 0L )
00532     {
00533         EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(childItem);
00534         if( data != 0L )
00535         {
00536             treeCtrl.SetItemData(childItem,0L); //So that subsequent references after UnRef() won't SEGV
00537             data->UnRef();  //Or move this one after DeleteAllItems? so we don't loose one system call. For now, safe way
00538         }
00539
00540         DeleteAllItems(childItem);
00541
00542         HTREEITEM nextItem = treeCtrl.GetNextItem(childItem, TVGN_NEXT);
00543         VERIFY(treeCtrl.DeleteItem(childItem));
00544         childItem = nextItem;
00545     }
00546
00547     // Erase the root only if initially root was 0L
00548     if( eraseRoot )
00549     {
00550         EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(root);
00551         if( data )
00552         {
00553             data->UnRef();
00554         }
00555
00556         VERIFY(treeCtrl.DeleteItem(root));
00557     }
00558 }

Here is the call graph for this function:

bool CWinCvsBrowser::DisableCommon ( ) [private]

Check whether the commands should be disabled

Returns:
true if commands should be disabled, false otherwise
Definition at line 1519 of file WinCvsBrowser.cpp.

References CWincvsApp::IsCvsRunning().

Referenced by OnUpdateAppCmdline(), OnUpdateCmd(), OnUpdateMacro(), OnUpdateViewCheckout(), OnUpdateViewExplore(), and OnUpdateViewImport().

01520 {
01521     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01522     return app->IsCvsRunning();
01523 }

Here is the call graph for this function:

HTREEITEM CWinCvsBrowser::GetItemByLocation ( const char * path ) [private]

Find the tree item corresponding to the given path

Parameters:
path Path to find the item for
Returns:
Handle to the item for a given location, NULL if not found
Definition at line 1288 of file WinCvsBrowser.cpp.

References CStr, and m_root.

Referenced by ResetView().

01289 {
01290     CStr root(m_root);
01291     if( !root.endsWith(kPathDelimiter) )
01292         root << kPathDelimiter;
01293
01294     CStr subpath(path);
01295     if( !subpath.endsWith(kPathDelimiter) )
01296         subpath << kPathDelimiter;
01297
01298     // Check if it is a sub-path
01299     if( strncmp(root, subpath, root.length()) != 0 )
01300         return 0L;
01301
01302     CTreeCtrl& treeCtrl = GetTreeCtrl();
01303     HTREEITEM item = treeCtrl.GetRootItem();
01304     if( item == 0L )
01305         return 0L;
01306
01307     // Step inside synchronized
01308     const char* tmp = (const char*)subpath + root.length() - 1;
01309     while( (tmp = strchr(tmp, kPathDelimiter)) != 0L )
01310     {
01311         const char* name = ++tmp;
01312         if( name[0] == '\0' )
01313             break;
01314
01315         CStr subname;
01316         const char* tmp2 = strchr(name, kPathDelimiter);
01317         if( tmp2 == 0L )
01318             subname = name;
01319         else
01320             subname.set(name, tmp2 - name);
01321
01322         HTREEITEM childItem = treeCtrl.GetNextItem(item, TVGN_CHILD);
01323
01324         // Find the subitem which matches this name
01325         while( childItem != 0L )
01326         {
01327             EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(childItem);
01328             if( data != 0L )
01329             {
01330                 if( _stricmp((*data)[EntnodeData::kName], subname) == 0 )
01331                 {
01332                     item = childItem;
01333                     break;
01334                 }
01335             }
01336
01337             childItem = treeCtrl.GetNextItem(childItem, TVGN_NEXT);
01338         }
01339
01340         if( childItem == 0L )
01341             return 0L;
01342     }
01343
01344     return item;
01345 }

const UStr & CWinCvsBrowser::GetRoot ( void ) const [inline]

Get the current root.

Definition at line 255 of file WinCvsBrowser.h.

Referenced by CWincvsApp::GetRoot(), CWincvsApp::InitInstance(), and CWincvsDoc::OnSavesettings().

00256 {
00257     return m_root;
00258 }

bool CWinCvsBrowser::GetSelectionChanged ( ) const [inline]

Get the selection changed state.

Definition at line 273 of file WinCvsBrowser.h.

00274 {
00275     return m_selectionChanged;
00276 }

bool CWinCvsBrowser::GetSelectionNotificationLocked ( ) const [inline]

Get the selection notification locked state.

Definition at line 261 of file WinCvsBrowser.h.

00262 {
00263     return m_selectionNotificationLocked;
00264 }

void CWinCvsBrowser::NotifySelectionChange ( )

Issues notification on selected item change Definition at line 905 of file WinCvsBrowser.cpp.

References CStr, gCvsPrefs, CWincvsApp::GetFileView(), m_selectionChanged, m_selectionNotificationLocked, CBrowseFileView::ResetView(), RetrievePath(), and CvsPrefs::SetLastWorkingDir().

Referenced by OnSelchanged(), and CSelectionChangeNotifier::~CSelectionChangeNotifier().

00906 {
00907     if( !m_selectionNotificationLocked )
00908     {
00909         if( m_selectionChanged )
00910         {
00911             CStr path;
00912             HTREEITEM item = GetTreeCtrl().GetSelectedItem();
00913             if( item )
00914             {
00915                 RetrievePath(item, path);
00916                 CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00917                 CBrowseFileView* fileView = app->GetFileView();
00918                 if( fileView )
00919                 {
00920                     fileView->ResetView(path);
00921                 }
00922
00923                 gCvsPrefs.SetLastWorkingDir(path);
00924             }
00925         }
00926     }
00927 }

Here is the call graph for this function:

void CWinCvsBrowser::OnAppCmdline ( ) [protected]

WM_COMMAND message handler, display command line dialog.

Definition at line 1633 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01634 {
01635     KoCommandLineHandler handler;
01636     ProcessSelectionCommand(&handler);
01637 }

Here is the call graph for this function:

void CWinCvsBrowser::OnAppRtagbranch ( ) [protected]

WM_COMMAND message handler, cvs rtag -b.

Definition at line 1640 of file WinCvsBrowser.cpp.

References KoRtagBranchHandler, and ProcessSelectionCommand().

01641 {
01642     KoRtagBranchHandler handler;
01643     ProcessSelectionCommand(&handler);
01644 }

Here is the call graph for this function:

void CWinCvsBrowser::OnAppRtagcreate ( ) [protected]

WM_COMMAND message handler, cvs rtag.

Definition at line 1647 of file WinCvsBrowser.cpp.

References KoRtagCreateHandler, and ProcessSelectionCommand().

01648 {
01649     KoRtagCreateHandler handler;
01650     ProcessSelectionCommand(&handler);
01651 }

Here is the call graph for this function:

void CWinCvsBrowser::OnAppRtagdelete ( ) [protected]

WM_COMMAND message handler, cvs rtag -d.

Definition at line 1654 of file WinCvsBrowser.cpp.

References KoRtagDeleteHandler, and ProcessSelectionCommand().

01655 {
01656     KoRtagDeleteHandler handler;
01657     ProcessSelectionCommand(&handler);
01658 }

Here is the call graph for this function:

void CWinCvsBrowser::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point
 | ) | [protected]

WM_CONTEXTMENU message handler, display the custom menu.

Definition at line 830 of file WinCvsBrowser.cpp.

References GetCustomMenu(), CWincvsApp::IsCvsRunning(), and kCustomBrowserMenu.

00831 {
00832     // Prevent from changing directory if cvs is running
00833     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00834     if( app->IsCvsRunning() )
00835     {
00836         return;
00837     }
00838
00839     CTreeCtrl& treeCtrl = GetTreeCtrl();
00840     const HTREEITEM item = treeCtrl.GetSelectedItem();
00841     if( item )
00842     {
00843         // Set the track point in case it's not the mouse click
00844         if( -1 == point.x && -1 == point.y )
00845         {
00846             // Get the icon's rectangle
00847             CRect rectItem;
00848             if( treeCtrl.GetItemRect(item, &rectItem, TRUE) )
00849             {
00850                 point = rectItem.CenterPoint();
00851                 ClientToScreen(&point);
00852             }
00853         }
00854
00855         treeCtrl.SelectItem(item);
00856
00857         // Locate the submenu after item selection
00858         std::auto_ptr<CMenu> pCustomMenu(::GetCustomMenu(kCustomBrowserMenu, this));
00859         if( pCustomMenu.get() )
00860         {
00861             pCustomMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, this);
00862         }
00863     }
00864 }

Here is the call graph for this function:

BOOL CWinCvsBrowser::OnCustomize ( UINT nID ) [protected]

WM_COMMAND message handler, display the customize dialog.

Definition at line 1566 of file WinCvsBrowser.cpp.

References CustomizeMenus(), ID_CUST_FILES_MENU, kCustomBrowserMenu, and kCustomFilesMenu.

01567 {
01568     CustomizeMenus(nID == ID_CUST_FILES_MENU ? kCustomFilesMenu : kCustomBrowserMenu);
01569     return TRUE;
01570 }

Here is the call graph for this function:

void CWinCvsBrowser::OnDestroy ( ) [protected]

WM_DESTROY message handler, unregister ignore notification function.

Definition at line 1592 of file WinCvsBrowser.cpp.

References NotificationManager::CheckOut(), CWincvsApp::GetFilterModel(), CWincvsApp::GetIgnoreModel(), and KiFilterBase::GetNotificationManager().

01593 {
01594     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
01595     {
01596         app->GetIgnoreModel()->GetNotificationManager()->CheckOut(this);
01597         app->GetFilterModel()->GetNotificationManager()->CheckOut(this);
01598     }
01599
01600     CTreeView::OnDestroy();
01601 }

Here is the call graph for this function:

void CWinCvsBrowser::OnDraw ( CDC * pDC ) [protected, virtual]

OnDraw virtual override, no drawing code needed.

Definition at line 456 of file WinCvsBrowser.cpp.

00457 {
00458     // No draw code
00459 }

void CWinCvsBrowser::OnFilteringChanged ( )

Notify the view that app's filtering has changed Definition at line 1616 of file WinCvsBrowser.cpp.

References m_resetViewPending, and WM_RESETVIEW.

Referenced by OnInitialUpdate().

01617 {
01618     if( !m_resetViewPending )
01619     {
01620         m_resetViewPending = true;
01621         PostMessage(WM_RESETVIEW);
01622     }
01623 }

void CWinCvsBrowser::OnIgnoreChanged ( )

Ignore changed notification handler, post reset view message.

Definition at line 1604 of file WinCvsBrowser.cpp.

References m_resetViewPending, and WM_RESETVIEW.

Referenced by OnInitialUpdate().

01605 {
01606     if( !m_resetViewPending )
01607     {
01608         m_resetViewPending = true;
01609         PostMessage(WM_RESETVIEW);
01610     }
01611 }

void CWinCvsBrowser::OnInitialUpdate ( ) [virtual]

OnInitialUpdate virtual override, expand the root item and register ignore notification function.

Definition at line 1113 of file WinCvsBrowser.cpp.

References NotificationManager::CheckIn(), CWincvsApp::GetFilterModel(), CWincvsApp::GetIgnoreModel(), KiFilterBase::GetNotificationManager(), OnFilteringChanged(), and OnIgnoreChanged().

01114 {
01115     CTreeView::OnInitialUpdate();
01116
01117     CWndRedrawMngr redrawMngr(this);
01118
01119     CTreeCtrl& treeCtrl = GetTreeCtrl();
01120     HTREEITEM root = treeCtrl.GetRootItem();
01121     if( root != 0L )
01122     {
01123         treeCtrl.Expand(root, TVE_EXPAND);
01124         VERIFY(treeCtrl.Select(root, TVGN_CARET));
01125     }
01126
01127     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
01128     {
01129         app->GetFilterModel()->GetNotificationManager()->CheckIn(this, ::OnFilteringChanged);
01130         app->GetIgnoreModel()->GetNotificationManager()->CheckIn(this, ::OnIgnoreChanged);
01131     }
01132 }

Here is the call graph for this function:

void CWinCvsBrowser::OnItemexpanding | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

TVN_ITEMEXPANDING notification handler, expand the selected node.

Definition at line 702 of file WinCvsBrowser.cpp.

References CStr, ENTNODE::Data(), DeleteAllItems(), ENT_SUBDIR, Entries_SetMissing(), FileTraverse(), CSortList< T >::Get(), EntnodeData::GetType(), CWincvsApp::IsCvsRunning(), TBrowserFill::IsHideMissing(), EntnodeData::IsMissing(), kIconFolderLost, kTraversal, CSortList< T >::NumOfElements(), EntnodeData::Ref(), and RetrievePath().

00703 {
00704     CWndRedrawMngr redrawMngr(this);
00705
00706     // Prevent from changing directory if cvs is running
00707     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00708     if( app->IsCvsRunning() )
00709     {
00710         *pResult = TRUE;
00711         return;
00712     }
00713
00714     CTreeCtrl& treeCtrl = GetTreeCtrl();
00715     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00716
00717     HTREEITEM item = pNMTreeView->itemNew.hItem;
00718
00719     EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(item);
00720     if( data != 0L && data->IsMissing() )
00721     {
00722         *pResult = TRUE;
00723         return;
00724     }
00725
00726     // Erase all the childs
00727     DeleteAllItems(item);
00728
00729     CStr path;
00730     RetrievePath(item, path);
00731
00732     if( pNMTreeView->action & TVE_COLLAPSE )
00733     {
00734         TBrowserFillDummy traverse(treeCtrl, 0L, item, 0L);
00735         kTraversal res = FileTraverse(path, traverse);
00736     }
00737     else if( pNMTreeView->action & TVE_EXPAND )
00738     {
00739         CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00740         TBrowserFill traverse(treeCtrl, 0L, item, entries);
00741         kTraversal res = FileTraverse(path, traverse);
00742
00743         if( !traverse.IsHideMissing() )
00744         {
00745             // Add the missing folders
00746             Entries_SetMissing(entries);
00747
00748             int numEntries = entries.NumOfElements();
00749             for(int i = 0; i < numEntries; i++)
00750             {
00751                 const ENTNODE & theNode = entries.Get(i);
00752                 EntnodeData* data = theNode.Data();
00753                 if( !data->IsMissing() || data->GetType() != ENT_SUBDIR )
00754                     continue;
00755
00756                 TV_INSERTSTRUCT tvstruct;
00757                 tvstruct.hParent = item;
00758                 tvstruct.hInsertAfter = TVI_SORT;
00759                 tvstruct.item.iImage = kIconFolderLost;
00760                 tvstruct.item.iSelectedImage = kIconFolderLost;
00761                 tvstruct.item.pszText = (char*)(*data)[EntnodeData::kName];
00762                 tvstruct.item.lParam = (long)data->Ref();
00763                 tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT | TVIF_PARAM;
00764                 treeCtrl.InsertItem(&tvstruct);
00765             }
00766         }
00767     }
00768
00769     *pResult = 0;
00770 }

Here is the call graph for this function:

BOOL CWinCvsBrowser::OnMacro ( UINT nID ) [protected]

WM_COMMAND message handler, invoke macro.

Definition at line 1456 of file WinCvsBrowser.cpp.

References PyDoPython(), and WINCMD_to_UCMD.

01457 {
01458     PyDoPython(WINCMD_to_UCMD(nID));
01459
01460     return 1;
01461 }

Here is the call graph for this function:

void CWinCvsBrowser::OnQueryProperties ( ) [protected]

WM_COMMAND message handler, show the selection properties.

Definition at line 1178 of file WinCvsBrowser.cpp.

References CStr, LaunchProperties(), and RetrievePath().

01179 {
01180     CTreeCtrl& treeCtrl = GetTreeCtrl();
01181     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01182
01183     CStr path;
01184     RetrievePath(selItem, path);
01185
01186     LaunchProperties(path.c_str());
01187 }

Here is the call graph for this function:

void CWinCvsBrowser::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

WM_RBUTTONDOWN message handler, select the clicked item.

Note:
Prevent message from propagating to allow WM_CONTEXTMENU to work
Definition at line 809 of file WinCvsBrowser.cpp.

References CWincvsApp::IsCvsRunning().

00810 {
00811     // Prevent from changing directory if cvs is running
00812     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00813     if( app->IsCvsRunning() )
00814         return;
00815
00816     CTreeCtrl& treeCtrl = GetTreeCtrl();
00817
00818     UINT pFlags;
00819     HTREEITEM testItem = treeCtrl.HitTest(point, &pFlags);
00820
00821     if( testItem != 0L && (pFlags & (TVHT_ONITEM | TVHT_ONITEMBUTTON | TVHT_ONITEMRIGHT)) != 0 )
00822     {
00823         treeCtrl.SelectItem(testItem);
00824     }
00825
00826     //CTreeView::OnRButtonDown(nFlags, point);
00827 }

Here is the call graph for this function:

LRESULT CWinCvsBrowser::OnResetView | ( | WPARAM | ,
 |  | LPARAM |
 | ) | [protected]

WM_RESETVIEW message handler, reset view.

Definition at line 1626 of file WinCvsBrowser.cpp.

References ResetView().

01627 {
01628     ResetView(true, false);
01629     return 0;
01630 }

Here is the call graph for this function:

void CWinCvsBrowser::OnSelchanged | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

TVN_SELCHANGED notification handler, notify the views.

Definition at line 892 of file WinCvsBrowser.cpp.

References m_selectionChanged, and NotifySelectionChange().

00893 {
00894     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00895
00896     m_selectionChanged = true;
00897     NotifySelectionChange();
00898
00899     *pResult = 0;
00900 }

Here is the call graph for this function:

void CWinCvsBrowser::OnSelchanging | ( | NMHDR * | pNMHDR,
 |  | LRESULT * | pResult
 | ) | [protected]

TVN_SELCHANGING notification handler, prevent the selection of the missing item.

Definition at line 867 of file WinCvsBrowser.cpp.

References CWincvsApp::IsCvsRunning(), and EntnodeData::IsMissing().

00868 {
00869     // Prevent from changing directory if cvs is running
00870     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00871     if( app->IsCvsRunning() )
00872     {
00873         *pResult = TRUE;
00874         return;
00875     }
00876
00877     CTreeCtrl& treeCtrl = GetTreeCtrl();
00878     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00879     HTREEITEM item = pNMTreeView->itemNew.hItem;
00880
00881     EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(item);
00882     if( data != 0L && data->IsMissing() )
00883     {
00884         *pResult = TRUE;
00885         return;
00886     }
00887
00888     *pResult = 0;
00889 }

Here is the call graph for this function:

BOOL CWinCvsBrowser::OnSetCursor | ( | CWnd * | pWnd,
 |  | UINT | nHitTest,
 |  | UINT | message
 | ) | [protected]

WM_SETCURSOR message handler, set the hourglass cursor during CVS commands.

Definition at line 1579 of file WinCvsBrowser.cpp.

References CWincvsApp::IsCvsRunning().

01580 {
01581     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01582     if( app->IsCvsRunning() )
01583     {
01584         SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
01585         return TRUE;
01586     }
01587
01588     return CTreeView::OnSetCursor(pWnd, nHitTest, message);
01589 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateAppCmdline ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 961 of file WinCvsBrowser.cpp.

References DisableCommon().

00962 {
00963     pCmdUI->Enable(!DisableCommon());
00964 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateCmd | ( | CCmdUI * | pCmdUI,
 |  | BOOL | needCvsInfos
 | ) | [private]

Update UI for CVS command

Parameters:
pCmdUI | CCmdUI UI handler
needCvsInfos | true if command needs the CVS controlled selection, false otherwise
Definition at line 777 of file WinCvsBrowser.cpp.

References CStr, DisableCommon(), RetrievePath(), stat::st_mode, and stat.

Referenced by OnUpdateViewAdd(), and OnUpdateViewUpdate().

00778 {
00779     if( DisableCommon() )
00780     {
00781         pCmdUI->Enable(FALSE);
00782         return;
00783     }
00784
00785     CTreeCtrl& treeCtrl = GetTreeCtrl();
00786     HTREEITEM selItem = treeCtrl.GetSelectedItem();
00787     if( selItem == 0L )
00788     {
00789         pCmdUI->Enable(FALSE);
00790         return;
00791     }
00792
00793     CStr path;
00794     RetrievePath(selItem, path);
00795     if( !path.endsWith(kPathDelimiter) )
00796         path << kPathDelimiter;
00797
00798     path << "CVS";
00799
00800     struct stat sb;
00801     if( stat(path, &sb) == -1 || !S_ISDIR(sb.st_mode) )
00802         pCmdUI->Enable(!needCvsInfos);
00803     else
00804         pCmdUI->Enable(needCvsInfos);
00805 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateCustomize ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1573 of file WinCvsBrowser.cpp.

01574 {
01575     pCmdUI->Enable(TRUE);
01576 }

void CWinCvsBrowser::OnUpdateMacro ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1464 of file WinCvsBrowser.cpp.

References CStr, DisableCommon(), PyAppendCache(), PyDoCmdUI(), PyIsUICacheValid(), RetrievePath(), SplitPath(), EntnodeData::UnRef(), EntnodePath::UnRef(), and WINCMD_to_UCMD.

01465 {
01466     if( DisableCommon() )
01467     {
01468         pCmdUI->Enable(FALSE);
01469         return;
01470     }
01471
01472     // Fill the cache with current selection
01473     if( !PyIsUICacheValid() )
01474     {
01475         CTreeCtrl& treeCtrl = GetTreeCtrl();
01476         HTREEITEM selItem = treeCtrl.GetSelectedItem();
01477         if( selItem != 0L )
01478         {
01479             bool deleteData = false;
01480             EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(selItem);
01481             if( data == 0L )
01482             {
01483                 CStr selPath;
01484                 RetrievePath(selItem, selPath);
01485
01486                 CStr uppath, folder;
01487                 SplitPath(selPath, uppath, folder);
01488
01489                 deleteData = true;
01490                 EntnodePath *thePath = new EntnodePath(uppath);
01491                 data = new EntnodeFolder(folder, thePath);
01492                 thePath->UnRef();
01493             }
01494
01495             PyAppendCache(data);
01496
01497             if( deleteData )
01498                 data->UnRef();
01499         }
01500     }
01501
01502     UCmdUI ucmdui(WINCMD_to_UCMD(pCmdUI->m_nID));
01503     ucmdui.pCmdUI = pCmdUI;
01504     PyDoCmdUI(&ucmdui);
01505 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateQueryProperties ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1190 of file WinCvsBrowser.cpp.

References NULL.

01191 {
01192     CTreeCtrl& treeCtrl = GetTreeCtrl();
01193     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01194
01195     pCmdUI->Enable(selItem != NULL);
01196 }

void CWinCvsBrowser::OnUpdateViewAdd ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 955 of file WinCvsBrowser.cpp.

References OnUpdateCmd().

00956 {
00957     OnUpdateCmd(pCmdUI, FALSE);
00958 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateViewCheckout ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1533 of file WinCvsBrowser.cpp.

References DisableCommon().

01534 {
01535     if( DisableCommon() )
01536     {
01537         pCmdUI->Enable(FALSE);
01538         return;
01539     }
01540
01541     pCmdUI->Enable(TRUE);
01542     pCmdUI->SetText("Chec&kout module...");
01543 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateViewExplore ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1158 of file WinCvsBrowser.cpp.

References DisableCommon().

01159 {
01160     if( DisableCommon() )
01161     {
01162         pCmdUI->Enable(FALSE);
01163         return;
01164     }
01165
01166     CTreeCtrl& treeCtrl = GetTreeCtrl();
01167     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01168     if( selItem == 0L )
01169     {
01170         pCmdUI->Enable(FALSE);
01171         return;
01172     }
01173
01174     pCmdUI->Enable(TRUE);
01175 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateViewImport ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1553 of file WinCvsBrowser.cpp.

References DisableCommon().

01554 {
01555     if( DisableCommon() )
01556     {
01557         pCmdUI->Enable(FALSE);
01558         return;
01559     }
01560
01561     pCmdUI->Enable(TRUE);
01562     pCmdUI->SetText("&Import module...");
01563 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateViewReload ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 1443 of file WinCvsBrowser.cpp.

References CWincvsApp::IsCvsRunning().

01444 {
01445     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01446     pCmdUI->Enable(!app->IsCvsRunning());
01447 }

Here is the call graph for this function:

void CWinCvsBrowser::OnUpdateViewUpdate ( CCmdUI * pCmdUI ) [protected]

UPDATE_COMMAND_UI handler.

Definition at line 967 of file WinCvsBrowser.cpp.

References OnUpdateCmd().

00968 {
00969     OnUpdateCmd(pCmdUI, TRUE);
00970 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewAdd ( ) [protected]

WM_COMMAND message handler, cvs add selection.

Definition at line 973 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

00974 {
00975     KoAddHandler handler;
00976     ProcessSelectionCommand(&handler);
00977 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewCheckout ( ) [protected]

WM_COMMAND message handler, cvs checkout.

Definition at line 1526 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01527 {
01528     KoCheckoutHandler handler;
01529     ProcessSelectionCommand(&handler);
01530 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewCommit ( ) [protected]

WM_COMMAND message handler, cvs commit selection.

Definition at line 980 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

00981 {
00982     KoCommitHandler handler;
00983     ProcessSelectionCommand(&handler);
00984 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewDiff ( ) [protected]

WM_COMMAND message handler, [cvs] diff selection.

Definition at line 1001 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01002 {
01003     KoDiffHandler handler;
01004     ProcessSelectionCommand(&handler);
01005 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewEdit ( ) [protected]

WM_COMMAND message handler, cvs edit selection.

Definition at line 1043 of file WinCvsBrowser.cpp.

References KoEditHandler, and ProcessSelectionCommand().

01044 {
01045     KoEditHandler handler;
01046     ProcessSelectionCommand(&handler);
01047 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewEditors ( ) [protected]

WM_COMMAND message handler, cvs editors selection.

Definition at line 1078 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01079 {
01080     KoEditorsHandler handler;
01081     ProcessSelectionCommand(&handler);
01082 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewExplore ( ) [protected]

WM_COMMAND message handler, open the explorer.

Definition at line 1135 of file WinCvsBrowser.cpp.

References CStr, LaunchExplore(), and RetrievePath().

01136 {
01137     CTreeCtrl& treeCtrl = GetTreeCtrl();
01138     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01139
01140     CStr path;
01141     RetrievePath(selItem, path);
01142
01143     LaunchExplore(path.c_str());
01144 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewForceedit ( ) [protected]

WM_COMMAND message handler, cvs edit -f selection.

Definition at line 1057 of file WinCvsBrowser.cpp.

References KoForceEditHandler, and ProcessSelectionCommand().

01058 {
01059     KoForceEditHandler handler;
01060     ProcessSelectionCommand(&handler);
01061 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewImport ( ) [protected]

WM_COMMAND message handler, cvs import.

Definition at line 1546 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01547 {
01548     KoImportHandler handler;
01549     ProcessSelectionCommand(&handler);
01550 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewLog ( ) [protected]

WM_COMMAND message handler, cvs log selection.

Definition at line 1008 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01009 {
01010     KoLogHandler handler;
01011     ProcessSelectionCommand(&handler);
01012 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewNewInstance ( ) [protected]

Definition at line 1146 of file WinCvsBrowser.cpp.

References CStr, LaunchNewInst(), and RetrievePath().

01147 {
01148     CTreeCtrl& treeCtrl = GetTreeCtrl();
01149     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01150
01151     CStr path;
01152     RetrievePath(selItem, path);
01153
01154     LaunchNewInst(path.c_str());
01155 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewQueryUpdate ( ) [protected]

WM_COMMAND message handler, cvs -n update selection.

Definition at line 994 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

00995 {
00996     KoQueryUpdateHandler handler;
00997     ProcessSelectionCommand(&handler);
00998 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewRelease ( ) [protected]

WM_COMMAND message handler, cvs release selection.

Definition at line 1085 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01086 {
01087     KoReleaseHandler handler;
01088     ProcessSelectionCommand(&handler);
01089 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewReload ( ) [protected]

WM_COMMAND message handler, refresh view.

Definition at line 1450 of file WinCvsBrowser.cpp.

References ResetView().

01451 {
01452     ResetView(true, true);
01453 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewReservededit ( ) [protected]

WM_COMMAND message handler, cvs edit -c selection.

Definition at line 1050 of file WinCvsBrowser.cpp.

References KoReservedEditHandler, and ProcessSelectionCommand().

01051 {
01052     KoReservedEditHandler handler;
01053     ProcessSelectionCommand(&handler);
01054 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewStatus ( ) [protected]

WM_COMMAND message handler, cvs status selection.

Definition at line 1015 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01016 {
01017     KoStatusHandler handler;
01018     ProcessSelectionCommand(&handler);
01019 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewTagBranch ( ) [protected]

WM_COMMAND message handler, cvs tag -b selection.

Definition at line 1106 of file WinCvsBrowser.cpp.

References KoBranchTagHandler, and ProcessSelectionCommand().

01107 {
01108     KoBranchTagHandler handler;
01109     ProcessSelectionCommand(&handler);
01110 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewTagDelete ( ) [protected]

WM_COMMAND message handler, cvs tag -d selection.

Definition at line 1099 of file WinCvsBrowser.cpp.

References KoDeleteTagHandler, and ProcessSelectionCommand().

01100 {
01101     KoDeleteTagHandler handler;
01102     ProcessSelectionCommand(&handler);
01103 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewTagNew ( ) [protected]

WM_COMMAND message handler, cvs tag selection.

Definition at line 1092 of file WinCvsBrowser.cpp.

References KoCreateTagHandler, and ProcessSelectionCommand().

01093 {
01094     KoCreateTagHandler handler;
01095     ProcessSelectionCommand(&handler);
01096 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewUnedit ( ) [protected]

WM_COMMAND message handler, cvs unedit selection.

Definition at line 1064 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01065 {
01066     KoUneditHandler handler;
01067     ProcessSelectionCommand(&handler);
01068 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewUnlock ( ) [protected]

WM_COMMAND message handler, cvs admin -u selection.

Definition at line 1022 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01023 {
01024     KoUnlockHandler handler;
01025     ProcessSelectionCommand(&handler);
01026 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewUpdate ( ) [protected]

WM_COMMAND message handler, cvs update selection.

Definition at line 987 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

00988 {
00989     KoUpdateHandler handler;
00990     ProcessSelectionCommand(&handler);
00991 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewWatchers ( ) [protected]

WM_COMMAND message handler, cvs watchers selection.

Definition at line 1071 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01072 {
01073     KoWatchersHandler handler;
01074     ProcessSelectionCommand(&handler);
01075 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewWatchOff ( ) [protected]

WM_COMMAND message handler, cvs watch remove selection.

Definition at line 1036 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01037 {
01038     KoWatchOffHandler handler;
01039     ProcessSelectionCommand(&handler);
01040 }

Here is the call graph for this function:

void CWinCvsBrowser::OnViewWatchOn ( ) [protected]

WM_COMMAND message handler, cvs watch add selection.

Definition at line 1029 of file WinCvsBrowser.cpp.

References ProcessSelectionCommand().

01030 {
01031     KoWatchOnHandler handler;
01032     ProcessSelectionCommand(&handler);
01033 }

Here is the call graph for this function:

BOOL CWinCvsBrowser::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

PreCreateWindow virtual override, modify the window style.

Definition at line 1508 of file WinCvsBrowser.cpp.

01509 {
01510     cs.style |= WS_TABSTOP | TVS_SHOWSELALWAYS;
01511
01512     return CTreeView::PreCreateWindow(cs);
01513 }

bool CWinCvsBrowser::ProcessSelectionCommand ( KiSelectionHandler * handler ) [private]

Process the selection handler command

Parameters:
handler Command selection handler
Returns:
true if the command was processed, false otherwise
Definition at line 934 of file WinCvsBrowser.cpp.

References CStr, KiSelectionHandler::OnFolder(), and RetrievePath().

Referenced by OnAppCmdline(), OnAppRtagbranch(), OnAppRtagcreate(), OnAppRtagdelete(), OnViewAdd(), OnViewCheckout(), OnViewCommit(), OnViewDiff(), OnViewEdit(), OnViewEditors(), OnViewForceedit(), OnViewImport(), OnViewLog(), OnViewQueryUpdate(), OnViewRelease(), OnViewReservededit(), OnViewStatus(), OnViewTagBranch(), OnViewTagDelete(), OnViewTagNew(), OnViewUnedit(), OnViewUnlock(), OnViewUpdate(), OnViewWatchers(), OnViewWatchOff(), and OnViewWatchOn().

00935 {
00936     bool res = false;
00937
00938     CTreeCtrl& treeCtrl = GetTreeCtrl();
00939     HTREEITEM selItem = treeCtrl.GetSelectedItem();
00940
00941     if( selItem )
00942     {
00943         CStr path;
00944
00945         RetrievePath(selItem, path);
00946         handler->OnFolder(path);
00947
00948         res = true;
00949     }
00950
00951     return res;
00952 }

Here is the call graph for this function:

void CWinCvsBrowser::ResetBrowser | ( | const char * | path,
 |  | bool | notifyView = false
 | ) |

Set the browser root path

Parameters:
path | Browser root path
notifyView | true to notify the file view, false otherwise
Returns:
true on success, false otherwise
Definition at line 566 of file WinCvsBrowser.cpp.

References AskCreatePersistentSettings(), UStr::c_str(), CStr, DeleteAllItems(), UStr::empty(), UStr::endsWith(), FileTraverse(), CMainFrame::GetBrowseHistory(), CWincvsApp::GetFileView(), CWincvsApp::GetMainFrame(), HasPersistentSettings(), kTraversal, CMainFrame::LoadLocationSettings(), LoadPersistentSettings(), m_root, CHistComboBoxEx::NewRoot(), CBrowseFileView::ResetView(), SavePersistentSettings(), stat::st_mode, stat, and CMainFrame::StoreLocationSettings().

Referenced by CMainFrame::ChangeLocation(), Create(), CWincvsApp::InitInstance(), CWincvsDoc::OnBrowserOpen(), CMainFrame::OnClose(), and ResetView().

00567 {
00568     CWaitCursor doWait;
00569     CWndRedrawMngr redrawMngr(this);
00570
00571     // Must make a copy of 'path' before calling DeleteAllItems(), since
00572     // this function may have been called with 'm_root' passed as the first
00573     // parameter (in fact it is in several places in the code) whose value
00574     // gets deleted by the call to DeleteAllItems() below, making 'path'
00575     // point to an invalid memory location
00576     const CStr pathCopy(path);
00577     DeleteAllItems();
00578
00579     const bool isReload = !pathCopy.empty() && !m_root.empty() && stricmp(m_root, pathCopy) == 0;
00580
00581     const CStr prevRoot(m_root.c_str());
00582     m_root = pathCopy;
00583
00584     if( pathCopy.empty() )
00585         return;
00586
00587     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00588     CMainFrame* mainFrm = app->GetMainFrame();
00589
00590     if( !isReload )
00591     {
00592         // Save the previous root settings first
00593         if( !prevRoot.empty() && HasPersistentSettings(prevRoot) )
00594         {
00595             mainFrm->StoreLocationSettings();
00596             SavePersistentSettings(prevRoot);
00597         }
00598
00599         if( HasPersistentSettings(m_root) )
00600         {
00601             LoadPersistentSettings(m_root);
00602             mainFrm->LoadLocationSettings();
00603         }
00604         else
00605         {
00606             // Check if the path has a CVS folder. If not,
00607             // we don't want the user to be prompted (like when
00608             // WinCvs is starting for the first time).
00609             UStr cvsFolder(m_root);
00610             if( !cvsFolder.endsWith(kPathDelimiter) )
00611                 cvsFolder << kPathDelimiter;
00612
00613             cvsFolder << "CVS";
00614             struct stat sb;
00615             if( stat(cvsFolder, &sb) != -1 && S_ISDIR(sb.st_mode) )
00616                 AskCreatePersistentSettings(m_root);
00617         }
00618     }
00619
00620     if( notifyView )
00621     {
00622         CHistComboBoxEx& hist = mainFrm->GetBrowseHistory();
00623         hist.NewRoot(m_root);
00624     }
00625
00626     CTreeCtrl& treeCtrl = GetTreeCtrl();
00627     TBrowserFillDummy traverse(treeCtrl, 0L, 0L, 0L);
00628     kTraversal res = FileTraverse(m_root, traverse);
00629
00630     CBrowseFileView* fileView = app->GetFileView();
00631     if( fileView != 0L )
00632     {
00633         HTREEITEM root = treeCtrl.GetRootItem();
00634         if( root != 0L )
00635         {
00636             treeCtrl.Expand(root, TVE_EXPAND);
00637             if( notifyView )
00638             {
00639                 VERIFY(treeCtrl.Select(root, TVGN_CARET));
00640             }
00641         }
00642         else
00643         {
00644             fileView->ResetView(pathCopy);
00645         }
00646     }
00647 }

Here is the call graph for this function:

void CWinCvsBrowser::ResetView | ( | bool | forceReload = false,
 |  | bool | notifyView = false
 | ) |

Force reload or check modifications before redrawing and optionally synchronize the file view

Parameters:
forceReload | true to force the refresh, false otherwise
notifyView | true to notify the file view, false otherwise
Definition at line 1388 of file WinCvsBrowser.cpp.

References CStr, CWincvsApp::GetFileView(), GetItemByLocation(), m_resetViewPending, m_root, ResetBrowser(), CBrowseFileView::ResetView(), RetrievePath(), StepToLocation(), and StoreExpanded().

Referenced by OnResetView(), OnViewReload(), and CBrowseFileView::ResetView().

01389 {
01390     // No outstanding request to reset the view any more
01391     m_resetViewPending = false;
01392
01393     CWaitCursor doWait;
01394     CWndRedrawMngr redrawMngr(this);
01395
01396     bool contentChanged = false;
01397
01398     vector<CStr> allExpanded;
01399     StoreExpanded(allExpanded);
01400
01401     CTreeCtrl& treeCtrl = GetTreeCtrl();
01402     CStr selPath;
01403
01404     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01405     if( selItem != 0L )
01406         RetrievePath(selItem, selPath);
01407
01408     if( forceReload )
01409     {
01410         ResetBrowser(m_root);
01411         contentChanged = true;
01412     }
01413
01414     if( contentChanged )
01415     {
01416         // Restore the expanded paths and the selected item
01417         vector<CStr>::const_iterator i;
01418         for(i = allExpanded.begin(); i != allExpanded.end(); ++i)
01419         {
01420             StepToLocation(*i);
01421         }
01422
01423         if( !selPath.empty() )
01424         {
01425             selItem = GetItemByLocation(selPath);
01426             if( selItem != 0L )
01427             {
01428                 VERIFY(treeCtrl.Select(selItem, TVGN_CARET));
01429                 treeCtrl.EnsureVisible(selItem);
01430             }
01431         }
01432     }
01433
01434     // We don't need to notify the file view if we force the reload because that's already done
01435     if( notifyView )
01436     {
01437         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01438         app->GetFileView()->ResetView();
01439     }
01440 }

Here is the call graph for this function:

void CWinCvsBrowser::RetrievePath | ( | HTREEITEM | item,
 |  | UStr & | path
 | ) | [private]

Given an item of the tree, guess the full path.

Parameters:
item | Item to retrieve the path from
path | Return the path for the item
Definition at line 672 of file WinCvsBrowser.cpp.

References CStr, and m_root.

Referenced by NotifySelectionChange(), OnItemexpanding(), OnQueryProperties(), OnUpdateCmd(), OnUpdateMacro(), OnViewExplore(), OnViewNewInstance(), ProcessSelectionCommand(), ResetView(), and StoreExpanded().

00673 {
00674     CTreeCtrl& treeCtrl = GetTreeCtrl();
00675
00676     CStr tmp, newPath;
00677     path = "";
00678     TV_ITEM pItem;
00679     char name[512];
00680
00681     do
00682     {
00683         pItem.hItem = item;
00684         pItem.pszText = name;
00685         pItem.cchTextMax = 512;
00686         pItem.mask = TVIF_HANDLE | TVIF_TEXT;
00687
00688         VERIFY(treeCtrl.GetItem(&pItem));
00689         item = treeCtrl.GetParentItem(item);
00690
00691         tmp = path;
00692         newPath = item == 0L ? (const char*)m_root : pItem.pszText;
00693         if( !newPath.endsWith(kPathDelimiter) )
00694             newPath << kPathDelimiter;
00695
00696         newPath << path;
00697         path = newPath;
00698     } while(item != 0L);
00699 }

void CWinCvsBrowser::SetNewStyle | ( | long | lStyleMask,
 |  | BOOL | bSetBits
 | ) | [private]

Set the style for the tree control

Parameters:
lStyleMask | Style mask
bSetBits | true to set the new style, false to remove style
Definition at line 654 of file WinCvsBrowser.cpp.

References NULL.

Referenced by Create().

00655 {
00656     long lStyleOld;
00657
00658     lStyleOld = GetWindowLong(m_hWnd, GWL_STYLE);
00659     lStyleOld &= ~lStyleMask;
00660     if( bSetBits )
00661         lStyleOld |= lStyleMask;
00662
00663     SetWindowLong(m_hWnd, GWL_STYLE, lStyleOld);
00664     SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
00665 }

void CWinCvsBrowser::SetSelectionChanged ( bool selectionChanged ) [inline]

Set the selection changed state.

Definition at line 279 of file WinCvsBrowser.h.

Referenced by CSelectionChangeNotifier::CSelectionChangeNotifier(), and CSelectionChangeNotifier::~CSelectionChangeNotifier().

00280 {
00281     m_selectionChanged = selectionChanged;
00282 }

void CWinCvsBrowser::SetSelectionNotificationLocked ( bool selectionNotificationLocked ) [inline]

Set the selection notification locked state.

Definition at line 267 of file WinCvsBrowser.h.

Referenced by CSelectionChangeNotifier::CSelectionChangeNotifier(), and CSelectionChangeNotifier::~CSelectionChangeNotifier().

00268 {
00269     m_selectionNotificationLocked = selectionNotificationLocked;
00270 }

bool CWinCvsBrowser::StepToLocation | ( | const char * | path,
 |  | bool | notifyView = false
 | ) |

Expand and select the path and optionally synchronize the file view

Parameters:
path | Path to select
notifyView | true to notify the file view, false otherwise
Returns:
true on success, false otherwise
Definition at line 1204 of file WinCvsBrowser.cpp.

References CStr, and m_root.

Referenced by CWincvsApp::InitInstance(), CMainFrame::OnDropFiles(), ResetView(), and CBrowseFileView::ResetView().

01205 {
01206     bool bRes = false;
01207
01208     CStr root(m_root);
01209     if( !root.endsWith(kPathDelimiter) )
01210         root << kPathDelimiter;
01211
01212     CStr subpath(path);
01213     if( !subpath.endsWith(kPathDelimiter) )
01214         subpath << kPathDelimiter;
01215
01216     // Check if it is a sub-path
01217     if( strnicmp(root, subpath, root.length()) != 0 )
01218         return false;
01219
01220     CTreeCtrl& treeCtrl = GetTreeCtrl();
01221     HTREEITEM item = treeCtrl.GetRootItem();
01222     HTREEITEM lastitem = 0L;
01223     if( item == 0L )
01224         return false;
01225
01226     CWndRedrawMngr redrawMngr(this);
01227
01228     if( stricmp(root, subpath) == 0 )
01229     {
01230         // Must select root node
01231         lastitem = item;
01232         treeCtrl.Expand(item, TVE_EXPAND);
01233     }
01234     else
01235     {
01236         // Step inside synchronized
01237         const char* tmp = (const char*)subpath + root.length() - 1;
01238         while( (tmp = strchr(tmp, kPathDelimiter)) != 0L )
01239         {
01240             const char* name = ++tmp;
01241             if( name[0] == '\0' )
01242                 break;
01243
01244             CStr subname;
01245             const char* tmp2 = strchr(name, kPathDelimiter);
01246             if( tmp2 == 0L )
01247                 subname = name;
01248             else
01249                 subname.set(name, tmp2 - name);
01250
01251             HTREEITEM childItem = treeCtrl.GetNextItem(item, TVGN_CHILD);
01252
01253             // Find the subitem which matches this name
01254             while( childItem != 0L )
01255             {
01256                 EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(childItem);
01257                 if( data != 0L )
01258                 {
01259                     if( _stricmp((*data)[EntnodeData::kName], subname) == 0 )
01260                     {
01261                         // Found it !
01262                         lastitem = item = childItem;
01263                         treeCtrl.Expand(item, TVE_EXPAND);
01264                         break;
01265                     }
01266                 }
01267
01268                 childItem = treeCtrl.GetNextItem(childItem, TVGN_NEXT);
01269             }
01270         }
01271     }
01272
01273     // In case this is called by the view, turn off notifying when the item gets selected
01274     if( lastitem != 0L )
01275     {
01276         CSelectionChangeNotifier notifier(this, notifyView);
01277         VERIFY( bRes = (treeCtrl.Select(lastitem, TVGN_CARET) != 0) );
01278     }
01279
01280     return bRes;
01281 }

void CWinCvsBrowser::StoreExpanded | ( | std::vector< UStr > & | allExpanded,
 |  | HTREEITEM | root = 0L
 | ) | [private]

Store expanded items

Parameters:
allExpanded | Return the collection of expanded items
root | Start item handle, NULL to start from root item
Note:
Recursive
Definition at line 1353 of file WinCvsBrowser.cpp.

References CStr, and RetrievePath().

Referenced by ResetView().

01354 {
01355     HTREEITEM item = root;
01356     CTreeCtrl& treeCtrl = GetTreeCtrl();
01357     if( item == 0L )
01358         item = treeCtrl.GetRootItem();
01359
01360     if( item == 0L )
01361         return;
01362
01363     TV_ITEM pItem;
01364     pItem.hItem = item;
01365     pItem.mask = TVIF_STATE;
01366     VERIFY(treeCtrl.GetItem(&pItem));
01367
01368     if( pItem.state & TVIS_EXPANDED )
01369     {
01370         CStr path;
01371         RetrievePath(item, path);
01372         allExpanded.push_back(path);
01373     }
01374
01375     HTREEITEM childItem = treeCtrl.GetNextItem(item, TVGN_CHILD);
01376     while( childItem != 0L )
01377     {
01378         StoreExpanded(allExpanded, childItem);
01379         childItem = treeCtrl.GetNextItem(childItem, TVGN_NEXT);
01380     }
01381 }

Here is the call graph for this function:

Member Data Documentation

CImageList CWinCvsBrowser::m_imageList [static, private]

Several folders aspects image list Definition at line 362 of file WinCvsBrowser.cpp.

Referenced by Create().

bool CWinCvsBrowser::m_resetViewPending [private]

Flag to indicate whether request to rebuild the view is pending Definition at line 222 of file WinCvsBrowser.h.

Referenced by OnFilteringChanged(), OnIgnoreChanged(), and ResetView().

UStr CWinCvsBrowser::m_root [private]

Current path of the browser Definition at line 217 of file WinCvsBrowser.h.

Referenced by GetItemByLocation(), ResetBrowser(), ResetView(), RetrievePath(), and StepToLocation().

bool CWinCvsBrowser::m_selectionChanged [private]

Flag to indicate whether selection indeed changed since it was set to true, valid if m_isSelectionNotificationLocked is true Definition at line 221 of file WinCvsBrowser.h.

Referenced by NotifySelectionChange(), and OnSelchanged().

bool CWinCvsBrowser::m_selectionNotificationLocked [private]

Flag to indicate whether the propagating selection changes is currently locked out Definition at line 220 of file WinCvsBrowser.h.

Referenced by NotifySelectionChange().

The documentation for this class was generated from the following files:
  • WinCvs/WinCvsBrowser.h
  • WinCvs/WinCvsBrowser.cpp
Generated on Sat Aug 7 22:58:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWincvsDoc Class Reference

CWincvsDoc Class Reference

#include <wincvsDoc.h>

Inheritance diagram for CWincvsDoc:

[legend]
Collaboration diagram for CWincvsDoc:

[legend]
List of all members.

Public Member Functions

CWincvsDoc ()
virtual BOOL | OnNewDocument ()
OnNewDocument virtual override.
virtual void | Serialize (CArchive &ar)
virtual void | SetTitle (LPCTSTR lpszTitle)
SetTitle virtual override, set the path name to enable Save command working properly.
virtual | ~CWincvsDoc ()

Protected Member Functions

afx_msg void | OnAppPreferences ()
WM_COMMAND message handler, show preferences dialog.
afx_msg void | OnAppRtagNew ()
WM_COMMAND message handler, show create rtag dialog.
afx_msg void | OnAppRtagDelete ()
WM_COMMAND message handler, show delete rtag dialog.
afx_msg void | OnAppRtagBranch ()
WM_COMMAND message handler, show create branch rtag dialog.
afx_msg void | OnAppCmdline ()
WM_COMMAND message handler, show command line dialog.
afx_msg void | OnUpdateCvsCmd (CCmdUI *pCmdUI)
On update command.
afx_msg void | OnUpdatePrefs (CCmdUI *pCmdUI)
On update preferences.
afx_msg void | OnBrowserOpen ()
WM_COMMAND message handler, set browse location.
afx_msg void | OnAppLogin ()
WM_COMMAND message handler, show login dialog.
afx_msg BOOL | OnMacroAdmin (UINT nID)
Admin macro handler.
afx_msg void | OnUpdateMacroAdmin (CCmdUI *pCmdUI)
Update admin macro.
afx_msg void | OnAppLogout ()
WM_COMMAND message handler, logout.
afx_msg void | OnViewInit ()
WM_COMMAND message handler, show create repository dialog.
afx_msg void | OnSavesettings ()
WM_COMMAND message handler, show save settings dialog.
afx_msg void | OnUpdateSavesettings (CCmdUI *pCmdUI)
Update save settings dialog.
afx_msg void | OnViewBrowselocationRemoveunwanted ()
WM_COMMAND message handler, show information about removing unwanted browse locations.
afx_msg void | OnUsePyshell ()
WM_COMMAND message handler, set the shell to Python.
afx_msg void | OnUpdateUsePyshell (CCmdUI *pCmdUI)
Update set shell to Python.
afx_msg void | OnUseTclshell ()
WM_COMMAND message handler, set the shell to TCL.
afx_msg void | OnUpdateUseTclshell (CCmdUI *pCmdUI)
Update set shell to TCL.
afx_msg void | OnViewPathChanged ()
Propery change handler.

Protected Attributes

CString | m_viewPath

Constructor & Destructor Documentation

CWincvsDoc::CWincvsDoc ( )

Definition at line 115 of file wincvsDoc.cpp.

00116 {
00117     // Use OLE compound files
00118     //EnableCompoundFile();
00119
00120     // TODO: add one-time construction code here
00121
00122     //EnableAutomation();
00123
00124     //AfxOleLockApp();
00125 }

CWincvsDoc::~CWincvsDoc ( ) [virtual]

Definition at line 127 of file wincvsDoc.cpp.

00128 {
00129     //AfxOleUnlockApp();
00130 }

Member Function Documentation

void CWincvsDoc::OnAppCmdline ( ) [protected]

WM_COMMAND message handler, show command line dialog.

Definition at line 252 of file wincvsDoc.cpp.

References CvsCmdCommandLine().

00253 {
00254     KoCommandLineHandler handler;
00255     CvsCmdCommandLine(handler);
00256 }

Here is the call graph for this function:

void CWincvsDoc::OnAppLogin ( ) [protected]

WM_COMMAND message handler, show login dialog.

Definition at line 259 of file wincvsDoc.cpp.

References CvsCmdLogin().

00260 {
00261     CvsCmdLogin();
00262 }

Here is the call graph for this function:

void CWincvsDoc::OnAppLogout ( ) [protected]

WM_COMMAND message handler, logout.

Definition at line 361 of file wincvsDoc.cpp.

References CvsCmdLogout().

00362 {
00363     CvsCmdLogout();
00364 }

Here is the call graph for this function:

void CWincvsDoc::OnAppPreferences ( ) [protected]

WM_COMMAND message handler, show preferences dialog.

Definition at line 246 of file wincvsDoc.cpp.

References CompatGetPrefs().

00247 {
00248     CompatGetPrefs();
00249 }

Here is the call graph for this function:

void CWincvsDoc::OnAppRtagBranch ( ) [protected]

WM_COMMAND message handler, show create branch rtag dialog.

Definition at line 315 of file wincvsDoc.cpp.

References CvsCmdRtag(), KoRtagBranchHandler, and kTagBranch.

00316 {
00317     KoRtagBranchHandler handler;
00318     CvsCmdRtag(handler, kTagBranch);
00319 }

Here is the call graph for this function:

void CWincvsDoc::OnAppRtagDelete ( ) [protected]

WM_COMMAND message handler, show delete rtag dialog.

Definition at line 308 of file wincvsDoc.cpp.

References CvsCmdRtag(), KoRtagDeleteHandler, and kTagDelete.

00309 {
00310     KoRtagDeleteHandler handler;
00311     CvsCmdRtag(handler, kTagDelete);
00312 }

Here is the call graph for this function:

void CWincvsDoc::OnAppRtagNew ( ) [protected]

WM_COMMAND message handler, show create rtag dialog.

Definition at line 301 of file wincvsDoc.cpp.

References CvsCmdRtag(), KoRtagCreateHandler, and kTagCreate.

00302 {
00303     KoRtagCreateHandler handler;
00304     CvsCmdRtag(handler, kTagCreate);
00305 }

Here is the call graph for this function:

void CWincvsDoc::OnBrowserOpen ( ) [protected]

WM_COMMAND message handler, set browse location.

Definition at line 279 of file wincvsDoc.cpp.

References BrowserGetDirectory(), CheckLocationDriveType(), CStr, CWincvsApp::GetBrowserView(), and CWinCvsBrowser::ResetBrowser().

00280 {
00281     CStr newPath;
00282     if( BrowserGetDirectory("Select a folder to open with the browser", newPath) )
00283     {
00284         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00285         if( app )
00286         {
00287             CheckLocationDriveType(newPath);
00288             app->GetBrowserView()->ResetBrowser(newPath, true);
00289         }
00290     }
00291 }

Here is the call graph for this function:

BOOL CWincvsDoc::OnMacroAdmin ( UINT nID ) [protected]

Admin macro handler.

Definition at line 322 of file wincvsDoc.cpp.

References CvsCmdMacrosAdmin(), CMacroSet::entries, gMacrosAdmin, ID_MACRO_ADMIN, and CMacroEntry::path.

00323 {
00324     CMacroEntry & entry = gMacrosAdmin.entries[nID - ID_MACRO_ADMIN];
00325     CvsCmdMacrosAdmin(entry.path);
00326
00327     return 1;
00328 }

Here is the call graph for this function:

BOOL CWincvsDoc::OnNewDocument ( ) [virtual]

OnNewDocument virtual override.

Definition at line 133 of file wincvsDoc.cpp.

00134 {
00135     if (!CDocument::OnNewDocument())
00136         return FALSE;
00137
00138     return TRUE;
00139 }

void CWincvsDoc::OnSavesettings ( ) [protected]

WM_COMMAND message handler, show save settings dialog.

Definition at line 373 of file wincvsDoc.cpp.

References AskCreatePersistentSettings(), CWincvsApp::GetBrowserView(), and CWinCvsBrowser::GetRoot().

00374 {
00375     CWincvsApp* app = (CWincvsApp *)AfxGetApp();
00376     AskCreatePersistentSettings(app->GetBrowserView()->GetRoot());
00377 }

Here is the call graph for this function:

void CWincvsDoc::OnUpdateCvsCmd ( CCmdUI * pCmdUI ) [protected]

On update command.

Definition at line 265 of file wincvsDoc.cpp.

References CWincvsApp::IsCvsRunning().

00266 {
00267     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00268     pCmdUI->Enable(app->IsCvsRunning() ? FALSE : TRUE);
00269 }

Here is the call graph for this function:

void CWincvsDoc::OnUpdateMacroAdmin ( CCmdUI * pCmdUI ) [protected]

Update admin macro.

Definition at line 331 of file wincvsDoc.cpp.

References CMacroSet::entries, gMacrosAdmin, CWincvsApp::HasTCL(), and CWincvsApp::IsCvsRunning().

00332 {
00333     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00334     if( app->IsCvsRunning() || !app->HasTCL() )
00335     {
00336         pCmdUI->Enable(FALSE);
00337         return;
00338     }
00339
00340     if( pCmdUI->m_pSubMenu != 0L || pCmdUI->m_pMenu == 0L )
00341         return;
00342
00343     int iMRUMax = pCmdUI->m_pMenu->GetMenuItemCount();
00344     for (int iMRU = 0; iMRU < iMRUMax; iMRU++)
00345         pCmdUI->m_pMenu->DeleteMenu(pCmdUI->m_nID + iMRU, MF_BYCOMMAND);
00346
00347     vector<CMacroEntry>::const_iterator i;
00348     for(i = gMacrosAdmin.entries.begin(); i != gMacrosAdmin.entries.end(); ++i)
00349     {
00350         pCmdUI->m_pMenu->InsertMenu(pCmdUI->m_nIndex++,
00351             MF_STRING | MF_BYPOSITION, pCmdUI->m_nID++,
00352             (*i).name);
00353     }
00354
00355     pCmdUI->m_nIndexMax = pCmdUI->m_pMenu->GetMenuItemCount();
00356     pCmdUI->m_nIndex--; // point to last menu added
00357     pCmdUI->m_bEnableChanged = TRUE;    // all the added items are enabled
00358 }

Here is the call graph for this function:

void CWincvsDoc::OnUpdatePrefs ( CCmdUI * pCmdUI ) [protected]

On update preferences.

Definition at line 272 of file wincvsDoc.cpp.

References CWincvsApp::IsCvsRunning().

00273 {
00274     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00275     pCmdUI->Enable(app->IsCvsRunning() ? FALSE : TRUE);
00276 }

Here is the call graph for this function:

void CWincvsDoc::OnUpdateSavesettings ( CCmdUI * pCmdUI ) [protected]

Update save settings dialog.

Definition at line 380 of file wincvsDoc.cpp.

References CWincvsApp::IsCvsRunning().

00381 {
00382     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00383     pCmdUI->Enable(!app->IsCvsRunning());
00384 }

Here is the call graph for this function:

void CWincvsDoc::OnUpdateUsePyshell ( CCmdUI * pCmdUI ) [protected]

Update set shell to Python.

Definition at line 409 of file wincvsDoc.cpp.

References gCvsPrefs, CvsPrefs::GetUseShell(), CWincvsApp::HasPython(), and SHELL_PYTHON.

00410 {
00411     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00412
00413     pCmdUI->Enable(app && app->HasPython());
00414     pCmdUI->SetRadio(gCvsPrefs.GetUseShell() == SHELL_PYTHON);
00415 }

Here is the call graph for this function:

void CWincvsDoc::OnUpdateUseTclshell ( CCmdUI * pCmdUI ) [protected]

Update set shell to TCL.

Definition at line 431 of file wincvsDoc.cpp.

References gCvsPrefs, CvsPrefs::GetUseShell(), CWincvsApp::HasTCL(), and SHELL_TCL.

00432 {
00433     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00434
00435     pCmdUI->Enable(app && app->HasTCL());
00436     pCmdUI->SetRadio(gCvsPrefs.GetUseShell() == SHELL_TCL);
00437 }

Here is the call graph for this function:

void CWincvsDoc::OnUsePyshell ( ) [protected]

WM_COMMAND message handler, set the shell to Python.

Definition at line 396 of file wincvsDoc.cpp.

References cvs_out(), gCvsPrefs, CWincvsApp::RestartScriptEngine(), CvsPrefs::SetUseShell(), and SHELL_PYTHON.

00397 {
00398     gCvsPrefs.SetUseShell(SHELL_PYTHON);
00399     cvs_out("Switching the shell to Python...\n");
00400
00401     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00402     if( app )
00403     {
00404         app->RestartScriptEngine();
00405     }
00406 }

Here is the call graph for this function:

void CWincvsDoc::OnUseTclshell ( ) [protected]

WM_COMMAND message handler, set the shell to TCL.

Definition at line 418 of file wincvsDoc.cpp.

References cvs_out(), gCvsPrefs, CWincvsApp::RestartScriptEngine(), CvsPrefs::SetUseShell(), and SHELL_TCL.

00419 {
00420     gCvsPrefs.SetUseShell(SHELL_TCL);
00421     cvs_out("Switching the shell to TCL...\n");
00422
00423     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00424     if( app )
00425     {
00426         app->RestartScriptEngine();
00427     }
00428 }

Here is the call graph for this function:

void CWincvsDoc::OnViewBrowselocationRemoveunwanted ( ) [protected]

WM_COMMAND message handler, show information about removing unwanted browse locations.

Definition at line 387 of file wincvsDoc.cpp.

References kCvsAlertNoteIcon, and CvsAlert::ShowAlert().

00388 {
00389     CvsAlert cvsAlert(kCvsAlertNoteIcon,
00390         "You can remove combo box items using Del key.", "To remove the unwanted location history items click Del key when selecting from the combo box list.");
00391
00392     cvsAlert.ShowAlert();
00393 }

Here is the call graph for this function:

void CWincvsDoc::OnViewInit ( ) [protected]

WM_COMMAND message handler, show create repository dialog.

Definition at line 367 of file wincvsDoc.cpp.

References CvsCmdInit().

00368 {
00369     CvsCmdInit();
00370 }

Here is the call graph for this function:

void CWincvsDoc::OnViewPathChanged ( ) [protected]

Propery change handler.

Definition at line 294 of file wincvsDoc.cpp.

00295 {
00296     // TODO: Add notification handler code
00297
00298 }

void CWincvsDoc::Serialize ( CArchive & ar ) [virtual]

Definition at line 183 of file wincvsDoc.cpp.

References EditStreamCallBack().

00184 {
00185     if (ar.IsStoring())
00186     {
00187         CWinApp* app = AfxGetApp();
00188         CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00189         if( view && view->IsKindOf(RUNTIME_CLASS(CRichEditView)) )
00190         {
00191             int nFormat = SF_TEXT;
00192             EDITSTREAM es = {0, 0, (EDITSTREAMCALLBACK)EditStreamCallBack};
00193             _afxRichEditCookie cookie(ar);
00194             es.dwCookie = (DWORD)&cookie;
00195             ((CRichEditView*)view)->GetRichEditCtrl().StreamOut(nFormat, es);
00196         }
00197
00198         /*
00199         // This doesn't work because our view is actually a frame
00200         POSITION pos = GetFirstViewPosition();
00201         CView* view;
00202         while((view = GetNextView(pos)) != NULL)
00203         {
00204             if(view->IsKindOf(RUNTIME_CLASS(CRichEditView)))
00205             {
00206                 int nFormat = SF_TEXT;
00207                 EDITSTREAM es = {0, 0, (EDITSTREAMCALLBACK)EditStreamCallBack};
00208                 _afxRichEditCookie cookie(ar);
00209                 es.dwCookie = (DWORD)&cookie;
00210                 ((CRichEditView *)view)->GetRichEditCtrl().StreamOut(nFormat, es);
00211                 break;
00212             }
00213         }
00214         */
00215     }
00216     else
00217     {
00218         // We don't load right now
00219     }
00220
00221     // Calling the base class CDocument enables serialization
00222     //  of the container document's COleClientItem objects.
00223     // (but we don't have COleClientItem)
00224     CDocument::Serialize(ar);
00225 }

Here is the call graph for this function:

void CWincvsDoc::SetTitle ( LPCTSTR lpszTitle ) [virtual]

SetTitle virtual override, set the path name to enable Save command working properly.

Definition at line 440 of file wincvsDoc.cpp.

Referenced by CWincvsApp::InitInstance().

00441 {
00442     m_strPathName.LoadString(AFX_IDS_UNTITLED);
00443
00444     CDocument::SetTitle(lpszTitle);
00445 }

Member Data Documentation

CString CWincvsDoc::m_viewPath [protected]

Definition at line 92 of file wincvsDoc.h.

The documentation for this class was generated from the following files:
  • WinCvs/wincvsDoc.h
  • WinCvs/wincvsDoc.cpp
Generated on Sat Aug 7 22:58:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWincvsView Class Reference

CWincvsView Class Reference

Console window class. More...

#include <wincvsView.h>

Inheritance diagram for CWincvsView:

[legend]
Collaboration diagram for CWincvsView:

[legend]
List of all members.

Public Member Functions

CWincvsDoc * GetDocument ()
virtual void | OnDraw (CDC *pDC)
OnDraw virtual override, do nothing here.
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs)
PreCreateWindow virtual override, modify the window style.
virtual | ~CWincvsView ()
CHARFORMAT | GetCurFormat (bool jumpEnd=true)
void | OutConsole (const char *txt, long len, bool isStderr=false)
void | OutColor (const char *txt, long len)
void | OutColor (kConsoleColor color)
void | OutColor (CHARFORMAT &format)

Protected Member Functions

CWincvsView ()
virtual void | OnInitialUpdate ()
OnInitialUpdate virtual override, set the character font.
virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo)
OnPreparePrinting virtual override.
virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo)
OnBeginPrinting virtual override.
virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo)
OnEndPrinting virtual override.
virtual BOOL | IsSelected (const CObject *pDocItem) const
IsSelected virtual override.
afx_msg void | OnDestroy ()
WM_DESTROY message handler.
afx_msg void | OnSetFocus (CWnd *pOldWnd)
WM_SETFOCUS message handler.
afx_msg void | OnSize (UINT nType, int cx, int cy)
WM_SIZE message handler.
afx_msg void | OnMyFormatFont ()
WM_COMMAND(ID_FORMAT_FONT) message handler.
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
WM_KEYDOWN message handler, process the Enter key.
afx_msg void | OnDropFiles (HDROP hDropInfo)
WM_DROPFILES message handler.
afx_msg void | OnEditClearAll ()
WM_COMMAND(ID_EDIT_CLEAR_ALL) message handler, clear the selection.
afx_msg UINT | OnGetDlgCode ()
WM_GETDLGCODE message handler.
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point)
WM_CONTEXTMENU message handler, display the custom menu.
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
WM_RBUTTONDOWN message handler, call CWincvsView::OnContextMenu.

Private Member Functions

virtual HRESULT | QueryAcceptData (LPDATAOBJECT, CLIPFORMAT *, DWORD, BOOL, HGLOBAL)
QueryAcceptData virtual override.
void | OutLine (const char *buf, int numbuf, bool isStderr)
BOOL | CanPaste () const

Private Attributes

char * | m_sbuf
int m_snumbuf
UINT | m_fRtfFormat
CCriticalSection | m_syncObject

Detailed Description

Console window class.

Definition at line 89 of file wincvsView.h.

Constructor & Destructor Documentation

CWincvsView::CWincvsView ( ) [protected]

Definition at line 73 of file wincvsView.cpp.

00074 {
00075     m_fRtfFormat = ::RegisterClipboardFormat(_T("Rich Text Format"));
00076
00077     m_sbuf = 0L;
00078     m_snumbuf = 0;
00079 }

CWincvsView::~CWincvsView ( ) [virtual]

Definition at line 81 of file wincvsView.cpp.

References free, m_sbuf, m_snumbuf, and CWincvsApp::StopScriptEngine().

00082 {
00083     m_snumbuf = 0;
00084     if( m_sbuf != 0L)
00085     {
00086         free(m_sbuf);
00087         m_sbuf = 0L;
00088     }
00089
00090     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00091     if( app )
00092     {
00093         app->StopScriptEngine();
00094     }
00095 }

Here is the call graph for this function:

Member Function Documentation

BOOL CWincvsView::CanPaste ( ) const [private]

Check whether the clipboard contains a supported data format for paste

Returns:
If clipboard contains supported data format, false otherwise
Definition at line 670 of file wincvsView.cpp.

References m_fRtfFormat.

00671 {
00672     return (CountClipboardFormats() != 0) &&
00673         (IsClipboardFormatAvailable(CF_TEXT) ||
00674         IsClipboardFormatAvailable(m_fRtfFormat) ||
00675         //IsClipboardFormatAvailable(_oleData.cfEmbedSource) ||
00676         //IsClipboardFormatAvailable(_oleData.cfEmbeddedObject) ||
00677         //IsClipboardFormatAvailable(_oleData.cfFileName) ||
00678         //IsClipboardFormatAvailable(_oleData.cfFileNameW) ||
00679         //IsClipboardFormatAvailable(CF_METAFILEPICT) ||
00680         //IsClipboardFormatAvailable(CF_DIB) ||
00681         //IsClipboardFormatAvailable(CF_BITMAP) ||
00682         GetRichEditCtrl().CanPaste());
00683 }

CHARFORMAT CWincvsView::GetCurFormat ( bool jumpEnd = true )

Get current format of the text

Parameters:
jumpEnd true to select all
Returns:
The current format of the text
Note:
This call puts the cursor at the end of the text by default
Definition at line 338 of file wincvsView.cpp.

References WCHARFORMAT.

Referenced by CColorConsole::CColorConsole(), and OutColor().

00339 {
00340     CRichEditCtrl& edit = GetRichEditCtrl();
00341
00342     if( jumpEnd )
00343         edit.SetSel(-1, -1);
00344
00345     return GetCharFormatSelection();
00346 }

CWincvsDoc * CWincvsView::GetDocument ( ) [inline]

Definition at line 167 of file wincvsView.h.

00168    { return (CWincvsDoc*)m_pDocument; }

BOOL CWincvsView::IsSelected ( const CObject * pDocItem ) const [protected, virtual]

IsSelected virtual override.

Definition at line 191 of file wincvsView.cpp.

00192 {
00193     // The implementation below is adequate if your selection consists of
00194     //  only CWincvsCntrItem objects.  To handle different selection
00195     //  mechanisms, the implementation here should be replaced.
00196
00197     // TODO: implement this function that tests for a selected OLE client item
00198
00199     //return pDocItem == m_pSelection;
00200     return CRichEditView::IsSelected(pDocItem);
00201 }

void CWincvsView::OnBeginPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo
 | ) | [protected, virtual]

OnBeginPrinting virtual override.

Definition at line 157 of file wincvsView.cpp.

00158 {
00159     // No extra initialization before printing
00160     CRichEditView::OnBeginPrinting(pDC, pInfo);
00161 }

void CWincvsView::OnContextMenu | ( | CWnd * | pWnd,
 |  | CPoint | point
 | ) | [protected]

WM_CONTEXTMENU message handler, display the custom menu.

Definition at line 723 of file wincvsView.cpp.

Referenced by OnRButtonDown().

00724 {
00725     CMenu* pSubMenu = ::GetSubCMenu(ID_EDIT_UNDO, this);
00726     if( pSubMenu )
00727     {
00728         // Set the track point in case it's not the mouse click
00729         if( -1 == point.x && -1 == point.y )
00730         {
00731             // Set the top left corner
00732             point.x = 0;
00733             point.y = 0;
00734             ClientToScreen(&point);
00735         }
00736
00737         pSubMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, this);
00738     }
00739 }

void CWincvsView::OnDestroy ( ) [protected]

WM_DESTROY message handler.

Definition at line 171 of file wincvsView.cpp.

00172 {
00173     // Deactivate the item on destruction; this is important
00174     // when a splitter view is being used.
00175
00176     CRichEditView::OnDestroy();
00177
00178     //COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00179     //if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
00180     //{
00181     //  pActiveItem->Deactivate();
00182     //  ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00183     //}
00184 }

void CWincvsView::OnDraw ( CDC * pDC ) [virtual]

OnDraw virtual override, do nothing here.

Definition at line 110 of file wincvsView.cpp.

00111 {
00112     //CWincvsDoc* pDoc = GetDocument();
00113     //ASSERT_VALID(pDoc);
00114
00115     // TODO: add draw code for native data here
00116     // TODO: also draw all OLE items in the document
00117
00118     // Draw the selection at an arbitrary position.  This code should be
00119     //  removed once your real drawing code is implemented.  This position
00120     //  corresponds exactly to the rectangle returned by CWincvsCntrItem,
00121     //  to give the effect of in-place editing.
00122
00123     // TODO: remove this code when final draw code is complete.
00124
00125     //if (m_pSelection == NULL)
00126     //{
00127     //  POSITION pos = pDoc->GetStartPosition();
00128     //  m_pSelection = (CWincvsCntrItem*)pDoc->GetNextClientItem(pos);
00129     //}
00130     //if (m_pSelection != NULL)
00131     //  m_pSelection->Draw(pDC, CRect(10, 10, 210, 210));
00132 }

void CWincvsView::OnDropFiles ( HDROP hDropInfo ) [protected]

WM_DROPFILES message handler.

Definition at line 686 of file wincvsView.cpp.

References CMainFrame::DropFiles(), and NULL.

00687 {
00688     CWnd* pWnd = AfxGetMainWnd();   //look in InitInstance m_pMainWnd = m_mainFrame;
00689
00690     if( pWnd )
00691     {
00692         CMainFrame* pMainFrame = (CMainFrame*)pWnd;
00693
00694         if( pMainFrame->GetSafeHwnd() != NULL )
00695         {
00696             pMainFrame->DropFiles( hDropInfo );
00697         }
00698     }
00699
00700     //this cause the crash, remove
00701     //CRichEditView::OnDropFiles(hDropInfo);
00702 }

Here is the call graph for this function:

void CWincvsView::OnEditClearAll ( ) [protected]

WM_COMMAND(ID_EDIT_CLEAR_ALL) message handler, clear the selection.

Definition at line 705 of file wincvsView.cpp.

References gViewFont.

00706 {
00707     CRichEditCtrl& edit = GetRichEditCtrl();
00708     edit.SetSel(0, -1);
00709     SetCharFormat((CCharFormat)gViewFont);
00710     edit.ReplaceSel("", TRUE);
00711 }

void CWincvsView::OnEndPrinting | ( | CDC * | pDC,
 |  | CPrintInfo * | pInfo
 | ) | [protected, virtual]

OnEndPrinting virtual override.

Definition at line 164 of file wincvsView.cpp.

00165 {
00166     // No cleanup after printing
00167     CRichEditView::OnEndPrinting(pDC, pInfo);
00168 }

UINT CWincvsView::OnGetDlgCode ( ) [protected]

WM_GETDLGCODE message handler.

Definition at line 742 of file wincvsView.cpp.

00743 {
00744     LRESULT DlgCode = CRichEditView::OnGetDlgCode();
00745
00746     if( 0x8000 & GetKeyState(VK_TAB) )
00747         return DlgCode & ~(DLGC_WANTTAB | DLGC_WANTALLKEYS | DLGC_WANTCHARS);
00748     else
00749         return DlgCode;
00750 }

void CWincvsView::OnInitialUpdate ( ) [protected, virtual]

OnInitialUpdate virtual override, set the character font.

Definition at line 135 of file wincvsView.cpp.

References gViewFont.

00136 {
00137     CRichEditView::OnInitialUpdate();
00138
00139     CRichEditCtrl& edit = GetRichEditCtrl();
00140     edit.SetSel(0, -1);
00141
00142     SetCharFormat((CCharFormat)gViewFont);
00143     edit.SetSel(-1, -1);
00144 }

void CWincvsView::OnKeyDown | ( | UINT | nChar,
 |  | UINT | nRepCnt,
 |  | UINT | nFlags
 | ) | [protected]

WM_KEYDOWN message handler, process the Enter key.

Definition at line 565 of file wincvsView.cpp.

References CTcl_Interp::DoScript(), CPython_Interp::DoScript(), free, gCvsPrefs, CvsPrefs::GetUseShell(), CWincvsApp::HasPython(), CWincvsApp::HasTCL(), malloc, OutConsole(), SHELL_PYTHON, and SHELL_TCL.

00566 {
00567     CRichEditView::OnKeyDown(nChar, nRepCnt, nFlags);
00568
00569     if( nChar != VK_RETURN )
00570     {
00571         return;
00572     }
00573
00574     long len = GetTextLength();
00575     if( len == 0 )
00576         return;
00577
00578     TCHAR* buf = (char*)malloc((len + 1) * sizeof(TCHAR));
00579     if( buf == 0L )
00580         return;
00581
00582     TEXTRANGE textRange;
00583     textRange.chrg.cpMin = 0;
00584     textRange.chrg.cpMax = len;
00585     textRange.lpstrText = buf;
00586     GetRichEditCtrl().SendMessage(EM_GETTEXTRANGE, 0, (LPARAM)&textRange);
00587
00588     long nStartChar, nEndChar;
00589     GetRichEditCtrl().GetSel(nStartChar, nEndChar);
00590
00591     if( nStartChar == nEndChar ) // i.e. there is no selection
00592     {
00593         // Get the end and the beginning of the line
00594         if( nStartChar > 0 && buf[nStartChar] == '\r' )
00595             nStartChar--;
00596
00597         while( nStartChar > 0 && buf[nStartChar] != '\n' && buf[nStartChar] != '\r' )
00598             nStartChar--;
00599
00600         if( buf[nStartChar] == '\n' || buf[nStartChar] == '\r' )
00601             nStartChar++;
00602
00603         while( nEndChar < len && buf[nEndChar] != '\n' && buf[nEndChar] != '\r' )
00604             nEndChar++;
00605     }
00606
00607     long length = nEndChar - nStartChar;
00608     if( length > 0 && nStartChar < len )
00609     {
00610         OutConsole("\n", 1);
00611         buf[nEndChar] = '\0';
00612
00613         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00614
00615         if( gCvsPrefs.GetUseShell() == SHELL_PYTHON && app->HasPython() )
00616         {
00617             CPython_Interp interp;
00618             interp.DoScript(buf + nStartChar);
00619         }
00620         else if( gCvsPrefs.GetUseShell() == SHELL_TCL && app->HasTCL() )
00621         {
00622             CTcl_Interp interp;
00623             interp.DoScript(buf + nStartChar);
00624         }
00625     }
00626
00627     free(buf);
00628 }

Here is the call graph for this function:

void CWincvsView::OnMyFormatFont ( ) [protected]

WM_COMMAND(ID_FORMAT_FONT) message handler.

Definition at line 552 of file wincvsView.cpp.

References gCvsPrefs, gViewFont, and CvsPrefs::save().

00553 {
00554     CRichEditCtrl& edit = GetRichEditCtrl();
00555     edit.SetSel(0, -1);
00556
00557     CRichEditView::OnFormatFont();
00558     edit.SetSel(-1, -1);
00559
00560     gViewFont = CCharFormat(GetCharFormatSelection());
00561     gCvsPrefs.save();
00562 }

Here is the call graph for this function:

BOOL CWincvsView::OnPreparePrinting ( CPrintInfo * pInfo ) [protected, virtual]

OnPreparePrinting virtual override.

Definition at line 150 of file wincvsView.cpp.

00151 {
00152     return DoPreparePrinting(pInfo);
00153     //return CRichEditView::OnPreparePrinting(pInfo);
00154 }

void CWincvsView::OnRButtonDown | ( | UINT | nFlags,
 |  | CPoint | point
 | ) | [protected]

WM_RBUTTONDOWN message handler, call CWincvsView::OnContextMenu.

Definition at line 714 of file wincvsView.cpp.

References OnContextMenu().

00715 {
00716     ClientToScreen(&point);
00717     OnContextMenu(this, point);
00718
00719     //CRichEditView::OnRButtonDown(nFlags, point);
00720 }

Here is the call graph for this function:

void CWincvsView::OnSetFocus ( CWnd * pOldWnd ) [protected]

WM_SETFOCUS message handler.

Note:
Special handling of OnSetFocus and OnSize are required for a container when an object is being edited in-place
Definition at line 222 of file wincvsView.cpp.
00223 {
00224 //  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00225 //  if (pActiveItem != NULL &&
00226 //      pActiveItem->GetItemState() == COleClientItem::activeUIState)
00227 //  {
00228         // need to set focus to this item if it is in the same view
00229 //      CWnd* pWnd = pActiveItem->GetInPlaceWindow();
00230 //      if (pWnd != NULL)
00231 //      {
00232 //          pWnd->SetFocus();   // don't call the base class
00233 //          return;
00234 //      }
00235 //  }
00236
00237     CRichEditView::OnSetFocus(pOldWnd);
00238 }

void CWincvsView::OnSize | ( | UINT | nType,
 |  | int | cx,
 |  | int | cy
 | ) | [protected]

WM_SIZE message handler.

Definition at line 241 of file wincvsView.cpp.

00242 {
00243     CRichEditView::OnSize(nType, cx, cy);
00244 //  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00245 //  if (pActiveItem != NULL)
00246 //      pActiveItem->SetItemRects();
00247 }

void CWincvsView::OutColor ( CHARFORMAT & format )

Set the console character format

Parameters:
format Format to be set
Definition at line 451 of file wincvsView.cpp.

References m_syncObject.

00452 {
00453     // Synchronize
00454     CSingleLock lock(&m_syncObject);
00455     if( !lock.Lock(20000) )
00456     {
00457         ASSERT(FALSE); // Lock failed
00458         return;
00459     }
00460
00461     CRichEditCtrl& edit = GetRichEditCtrl();
00462     SetCharFormat(format);
00463 }

void CWincvsView::OutColor ( kConsoleColor color )

Set the console color

Parameters:
color Console color to be set
Definition at line 390 of file wincvsView.cpp.

References GetCurFormat(), kBlue, kBold, kBrown, kGreen, kItalic, kMagenta, kRed, kUnderline, m_syncObject, and WCHARFORMAT.

00391 {
00392     // Synchronize
00393     CSingleLock lock(&m_syncObject);
00394     if( !lock.Lock(20000) )
00395     {
00396         ASSERT(FALSE); // Lock failed
00397         return;
00398     }
00399
00400     CRichEditCtrl& edit = GetRichEditCtrl();
00401
00402     WCHARFORMAT cf = GetCurFormat(false);
00403     cf.dwEffects = 0;
00404
00405     switch(color)
00406     {
00407     default:
00408         return;
00409         break;
00410     case kBrown :
00411         cf.dwMask = CFM_COLOR;
00412         cf.crTextColor = RGB(0x80, 0x80, 0x00);
00413         break;
00414     case kGreen :
00415         cf.dwMask = CFM_COLOR;
00416         cf.crTextColor = RGB(0x00, 0xA0, 0x00);
00417         break;
00418     case kMagenta :
00419         cf.dwMask = CFM_COLOR;
00420         cf.crTextColor = RGB(0xFF, 0x00, 0xFF);
00421         break;
00422     case kRed :
00423         cf.dwMask = CFM_COLOR;
00424         cf.crTextColor = RGB(0xFF, 0x00, 0x00);
00425         break;
00426     case kBlue :
00427         cf.dwMask = CFM_COLOR;
00428         cf.crTextColor = RGB(0x00, 0x00, 0xFF);
00429         break;
00430     case kBold :
00431         cf.dwMask = CFM_BOLD;
00432         cf.dwEffects = CFE_BOLD;
00433         break;
00434     case kItalic :
00435         cf.dwMask = CFM_ITALIC;
00436         cf.dwEffects = CFE_ITALIC;
00437         break;
00438     case kUnderline :
00439         cf.dwMask = CFM_UNDERLINE;
00440         cf.dwEffects = CFE_UNDERLINE;
00441         break;
00442     }
00443
00444     SetCharFormat(cf);
00445 }

Here is the call graph for this function:

void CWincvsView::OutColor | ( | const char * | txt,
 |  | long | len
 | ) |

Print colorized console output

Parameters:
txt | Text to print
len | Length of the text to print
Definition at line 353 of file wincvsView.cpp.

References m_syncObject.

Referenced by CColorConsole::operator<<().

00354 {
00355     // Synchronize
00356     CSingleLock lock(&m_syncObject);
00357     if( !lock.Lock(20000) )
00358     {
00359         ASSERT(FALSE); // Lock failed
00360         return;
00361     }
00362
00363     CString strText;
00364     for(int index = 0; index < len; index++)
00365     {
00366         char chr = *txt++;
00367         if( chr == 0x0d || chr == 0x0a )
00368         {
00369             strText += (char)0x0d;
00370             strText += (char)0x0a;
00371
00372             // special case if we got already \r\n
00373             if( (index + 1) < len && chr == 0x0d && txt[0] == 0x0a )
00374                 index++;
00375         }
00376         else
00377         {
00378             strText += chr;
00379         }
00380     }
00381
00382     CRichEditCtrl& edit = GetRichEditCtrl();
00383     edit.ReplaceSel(strText);
00384 }

void CWincvsView::OutConsole | ( | const char * | txt,
 |  | long | len,
 |  | bool | isStderr = false
 | ) |

Print the text to the console

Parameters:
txt | Text to print
len | Length of text to print
isStderr | true for stderr, false otherwise
Definition at line 471 of file wincvsView.cpp.

References m_sbuf, m_snumbuf, m_syncObject, malloc, MAX_CHAR_BY_LINE, and OutLine().

Referenced by CGraphConsole::cvs_err(), cvs_err(), cvs_errstr(), CGraphConsole::cvs_out(), cvs_out(), cvs_outstr(), and OnKeyDown().

00472 {
00473     // Synchronize
00474     CSingleLock lock(&m_syncObject);
00475     if( !lock.Lock(20000) )
00476     {
00477         ASSERT(FALSE); // Lock failed
00478         return;
00479     }
00480
00481     if( len == 0 )
00482         return;
00483
00484     if( m_sbuf == 0L )
00485     {
00486         m_sbuf = (char*)malloc((MAX_CHAR_BY_LINE + 3) * sizeof(char));
00487         if( m_sbuf == 0L )
00488             return;
00489     }
00490
00491     int index = 0;
00492     char chr;
00493
00494     do{
00495         for(; index < len && m_snumbuf < MAX_CHAR_BY_LINE; m_snumbuf++)
00496         {
00497             chr = txt[index++];
00498
00499             if( chr == 0x0d || chr == 0x0a )
00500             {
00501                 // Newline
00502                 break;
00503             }
00504
00505             m_sbuf[m_snumbuf] = chr;
00506         }
00507
00508         // Special case if we got already \r\n
00509         if( index < len && chr == 0x0d && txt[index] == 0x0a )
00510         {
00511             index++;
00512         }
00513
00514         if( chr == 0x0d || chr == 0x0a || m_snumbuf == MAX_CHAR_BY_LINE )
00515         {
00516             m_sbuf[m_snumbuf++] = 0x0d;
00517             m_sbuf[m_snumbuf++] = 0x0a;
00518             m_sbuf[m_snumbuf++] = 0x00;
00519
00520             OutLine(m_sbuf, m_snumbuf, isStderr);
00521             m_snumbuf = 0;
00522         }
00523     }while( index < len );
00524 }

Here is the call graph for this function:

void CWincvsView::OutLine | ( | const char * | buf,
 |  | int | numbuf,
 |  | bool | isStderr
 | ) | [private]

Print a line into the console window

Parameters:
buf | Text to print
numbuf | Length of text to print
isStderr | true for stderr, false otherwise
Definition at line 255 of file wincvsView.cpp.

References WCHARFORMAT.

Referenced by OutConsole().

00256 {
00257     CRichEditCtrl& edit = GetRichEditCtrl();
00258     edit.SetSel(-1, -1);
00259
00260     if( numbuf <= 0 )
00261     {
00262         return;
00263     }
00264
00265     WCHARFORMAT cf;
00266     cf.cbSize = sizeof(WCHARFORMAT);
00267     cf = GetCharFormatSelection();
00268
00269     bool colorChanged = false;
00270     COLORREF oldColor = cf.crTextColor;
00271     DWORD oldEffect = cf.dwEffects;
00272     CString strline(buf, numbuf);
00273
00274     if( strline.GetLength() >= 5 && strline[1] == ' ' &&
00275         (strline[0] == 'M' || strline[0] == 'C' || strline[0] == 'U' ||
00276         strline[0] == 'P' || strline[0] == 'N' || strline[0] == 'A' ||
00277         strline[0] == 'R' || strline[0] == 'I' || strline[0] == '?' ||
00278         strline[0] == '<' || strline[0] == '>') )
00279     {
00280         colorChanged = true;
00281
00282         switch(strline[0])
00283         {
00284         default:
00285         case '?' :
00286         case 'I' :
00287             cf.crTextColor = RGB(0x80, 0x80, 0x00);
00288             break;
00289         case 'U' :
00290         case 'N' :
00291             cf.crTextColor = RGB(0x00, 0xA0, 0x00);
00292             break;
00293         case 'M' :
00294         case 'A' :
00295         case 'R' :
00296             cf.crTextColor = RGB(0xFF, 0x00, 0xFF);
00297             break;
00298         case 'C' :
00299         case '<' :
00300             cf.crTextColor = RGB(0xFF, 0x00, 0x00);
00301             break;
00302         case '>' :
00303         case 'P' :
00304             cf.crTextColor = RGB(0x00, 0x00, 0xFF);
00305             break;
00306         }
00307
00308         cf.dwMask = CFM_COLOR;
00309         cf.dwEffects = 0;
00310         SetCharFormat(cf);
00311     }
00312     else if( isStderr )
00313     {
00314         colorChanged = true;
00315         cf.crTextColor = RGB(0xFF, 0x80, 0x00);
00316         cf.dwMask = CFM_COLOR;
00317         cf.dwEffects = 0;
00318         SetCharFormat(cf);
00319     }
00320
00321     edit.ReplaceSel(strline);
00322
00323     if( colorChanged )
00324     {
00325         cf.dwMask = CFM_COLOR;
00326         cf.crTextColor = oldColor;
00327         cf.dwEffects = oldEffect;
00328         SetCharFormat(cf);
00329     }
00330 }

BOOL CWincvsView::PreCreateWindow ( CREATESTRUCT & cs ) [virtual]

PreCreateWindow virtual override, modify the window style.

Definition at line 98 of file wincvsView.cpp.

00099 {
00100     BOOL bRet = CRichEditView::PreCreateWindow(cs);
00101     cs.style |= WS_TABSTOP | ES_MULTILINE;
00102
00103     return bRet;
00104 }

HRESULT CWincvsView::QueryAcceptData | ( | LPDATAOBJECT | ,
 |  | CLIPFORMAT * | ,
 |  | DWORD | ,
 |  | BOOL | ,
 |  | HGLOBAL |
 | ) | [private, virtual]

QueryAcceptData virtual override.

Definition at line 631 of file wincvsView.cpp.

References m_fRtfFormat, and NULL.

00632 {
00633     ASSERT(lpcfFormat != NULL);
00634     if( !bReally ) // not actually pasting
00635         return S_OK;
00636
00637     // If direct pasting a particular native format allow it
00638     if( IsRichEditFormat(*lpcfFormat) )
00639         return S_OK;
00640
00641     COleDataObject dataobj;
00642     dataobj.Attach(lpdataobj, FALSE);
00643
00644     // If format is 0, then force particular formats if available
00645     if( *lpcfFormat == 0 && (m_nPasteType == 0) )
00646     {
00647         if( m_fRtfFormat != 0 && dataobj.IsDataAvailable(m_fRtfFormat)) // native avail, let rich edit do as it wants
00648         {
00649             *lpcfFormat = m_fRtfFormat;
00650             return S_OK;
00651         }
00652         else if (dataobj.IsDataAvailable(CF_TEXT))
00653         {
00654             *lpcfFormat = CF_TEXT;
00655             return S_OK;
00656         }
00657     }
00658
00659     // *DO NOT* paste OLE formats
00660     // Crash reported by Gerhard Möller
00661     //DoPaste(dataobj, *lpcfFormat, hMetaPict);
00662
00663     return S_FALSE;
00664 }

Member Data Documentation

UINT CWincvsView::m_fRtfFormat [private]

Clipboard format Definition at line 145 of file wincvsView.h.

Referenced by CanPaste(), and QueryAcceptData().

char* CWincvsView::m_sbuf [private]

Print buffer Definition at line 143 of file wincvsView.h.

Referenced by OutConsole(), and ~CWincvsView().

int CWincvsView::m_snumbuf [private]

Print buffer size Definition at line 144 of file wincvsView.h.

Referenced by OutConsole(), and ~CWincvsView().

CCriticalSection CWincvsView::m_syncObject [private]

Output synchronization object Definition at line 147 of file wincvsView.h.

Referenced by OutColor(), and OutConsole().

The documentation for this class was generated from the following files:
  • WinCvs/wincvsView.h
  • WinCvs/wincvsView.cpp
Generated on Sat Aug 7 22:58:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WINDOWPLACEMENT Class Reference

WINDOWPLACEMENT Class Reference

Inheritance diagram for WINDOWPLACEMENT:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJWindowPlacement.h
Generated on Sat Aug 7 22:58:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WININFO Class Reference

WININFO Class Reference

Collaboration diagram for WININFO:

[legend]
List of all members.

Public Member Functions

WININFO (int w, int h)
virtual | ~WININFO ()
std::vector< TbEntry
* >::iterator 		Search (int cmd, int *dropindex=0L)

Public Attributes

std::vector< TbEntry * > | entries
int width
int height

Constructor & Destructor Documentation

WININFO::WININFO | ( | int | w,
 |  | int | h
 | ) | [inline]

Definition at line 241 of file utoolbar.cpp.

References height, and width.

00241 : width(w), height(h) {}

virtual WININFO::~WININFO ( ) [inline, virtual]

Definition at line 242 of file utoolbar.cpp.

References entries.

00243     {
00244         std::vector<TbEntry *>::iterator i;
00245         for(i = entries.begin(); i != entries.end(); ++i)
00246         {
00247             delete (*i);
00248         }
00249     }

Member Function Documentation

std::vector<TbEntry *>::iterator WININFO::Search | ( | int | cmd,
 |  | int * | dropindex = 0L
 | ) | [inline]

Definition at line 251 of file utoolbar.cpp.

References awidget::cmd, entries, TbEntryDropDown::icons, TbEntry::kind, tbeButton, tbeDropDown, and TbEntryButton::wid.

Referenced by CDynToolBar::OnDropDownButton(), UToolbar::OnSetTooltip(), and UToolbar::UDispatchMessage().

00252     {
00253         std::vector<TbEntry *>::iterator i;
00254         for(i = entries.begin(); i != entries.end(); ++i)
00255         {
00256             TbEntry * entry = (*i);
00257             if(entry->kind == tbeDropDown)
00258             {
00259                 TbEntryDropDown *drop = (TbEntryDropDown *)entry;
00260                 std::vector<awidget>::iterator j;
00261                 int index;
00262
00263                 for(j = drop->icons.begin(), index = 0; j != drop->icons.end(); ++j, index++)
00264                 {
00265                     if((*j).cmd == cmd)
00266                     {
00267                         if(dropindex != 0L)
00268                             *dropindex = index;
00269                         return i;
00270                     }
00271                 }
00272             }
00273             else if(entry->kind == tbeButton)
00274             {
00275                 TbEntryButton *btn = (TbEntryButton *)entry;
00276                 if(btn->wid.cmd == cmd)
00277                     return i;
00278             }
00279         }
00280         return i;
00281     }

Member Data Documentation

std::vector<TbEntry *> WININFO::entries

Definition at line 283 of file utoolbar.cpp.

Referenced by CDynToolBar::OnDropDownButton(), UToolbar::OnSetTooltip(), UToolbar::OnTbButton(), UToolbar::OnTbCheckBtn(), UToolbar::OnTbDropDown(), UToolbar::OnTbSeparator(), UToolbar::OnUpdateUI(), UToolbar::RebuildBar(), Search(), UToolbar::UDispatchMessage(), and ~WININFO().

int WININFO::height

Definition at line 284 of file utoolbar.cpp.

Referenced by CDynToolBar::OnDropDownButton(), UToolbar::RebuildBar(), and WININFO().

int WININFO::width

Definition at line 284 of file utoolbar.cpp.

Referenced by CDynToolBar::OnDropDownButton(), UToolbar::RebuildBar(), and WININFO().

The documentation for this class was generated from the following file:
  • rf/utoolbar.cpp
Generated on Sat Aug 7 22:58:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinLogBranchData Class Reference

CWinLogBranchData Class Reference

Windows log branch node data. More...

#include <UCvsGraph.h>

Inheritance diagram for CWinLogBranchData:

[legend]
Collaboration diagram for CWinLogBranchData:

[legend]
List of all members.

Public Member Functions

CWinLogBranchData (CLogNode *node)
virtual | ~CWinLogBranchData ()
CWinLogBranchData (CLogNode *node)
virtual | ~CWinLogBranchData ()

Protected Member Functions

virtual void | UpdateSelf (UDC &hdc, EntnodeData *entryInfo)
virtual USize | GetBoundsSelf (UDC &hdc, EntnodeData *entryInfo)
virtual void | UpdateSelf (CDC &dc, EntnodeData *entryInfo)
virtual CSize | GetBoundsSelf (CDC &dc, EntnodeData *entryInfo)

Detailed Description

Windows log branch node data.

Definition at line 115 of file UCvsGraph.h.

Constructor & Destructor Documentation

CWinLogBranchData::CWinLogBranchData ( CLogNode * node ) [inline]

Definition at line 118 of file UCvsGraph.h.

00118 : CWinLogData(node) {}

virtual CWinLogBranchData::~CWinLogBranchData ( ) [inline, virtual]

Definition at line 119 of file UCvsGraph.h.

00119 {}

CWinLogBranchData::CWinLogBranchData ( CLogNode * node ) [inline]

Definition at line 170 of file GraphView.h.

00170 : CWinLogData(node) {}

virtual CWinLogBranchData::~CWinLogBranchData ( ) [inline, virtual]

Definition at line 171 of file GraphView.h.

00171 {}

Member Function Documentation

CSize CWinLogBranchData::GetBoundsSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Get the bounds size

Parameters:
dc | Device context
entryInfo | Entry info
Returns:
Bounds size as CSize

Implements CWinLogData.

Definition at line 970 of file GraphView.cpp.

00971 {
00972     CLogNodeBranch& branch = *(CLogNodeBranch*)fNode;
00973     return dc.GetTextExtent(*branch, (*branch).length());
00974 }

USize CWinLogBranchData::GetBoundsSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Implements CWinLogData.

Definition at line 281 of file UCvsGraph.cpp.

References UDC::GetTextExtent().

00282 {
00283     CLogNodeBranch & branch = *(CLogNodeBranch *)fNode;
00284     return hdc.GetTextExtent(*branch, (*branch).length());
00285 }

Here is the call graph for this function:

void CWinLogBranchData::UpdateSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Draw the node

Parameters:
dc | Device context
entryInfo | Entry info

Implements CWinLogData.

Definition at line 976 of file GraphView.cpp.

References URect::CenterPoint(), gGraphBranchColor, kOctangle, NULL, CWinLogData::Selected(), and CWinLogData::SelfBounds().

00977 {
00978     // Draw the node
00979     ::DrawNode(dc, SelfBounds(), gGraphBranchColor, kOctangle, Selected());
00980
00981     // Draw the content of the node
00982     TEXTMETRIC tm;
00983     dc.GetTextMetrics(&tm);
00984     CPoint center = SelfBounds().CenterPoint();
00985     int nCenterX = center.x;
00986     int nCenterY = center.y - tm.tmHeight/2;
00987     CLogNodeBranch& branch = *(CLogNodeBranch*)fNode;
00988     dc.ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, SelfBounds(), *branch, (*branch).length(), NULL);
00989 }

Here is the call graph for this function:

void CWinLogBranchData::UpdateSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Implements CWinLogData.

Definition at line 287 of file UCvsGraph.cpp.

References UDC::GetTextHeight(), UDC::TextOutClipped(), URGB, UPOINT::x, and UPOINT::y.

00288 {
00289     // draw the node
00290     ::DrawNode(hdc, selfB, URGB(0, 0, 255), URGB(0, 0, 120), true, sel);
00291
00292     // draw the content of the node
00293     UPoint center = selfB.CenterPoint();
00294     int nCenterX = center.x;
00295     int nCenterY = center.y - hdc.GetTextHeight()/2;
00296     CLogNodeBranch & branch = *(CLogNodeBranch *)fNode;
00297     hdc.TextOutClipped(nCenterX, nCenterY, &selfB,
00298         *branch, (*branch).length());
00299 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/UCvsGraph.h
  • WinCvs/GraphView.h
  • common/UCvsGraph.cpp
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:58:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinLogData Class Reference

CWinLogData Class Reference

Windows log data abstract class. More...

#include <UCvsGraph.h>

Inheritance diagram for CWinLogData:

[legend]
Collaboration diagram for CWinLogData:

[legend]
List of all members.

Public Member Functions

CWinLogData (CLogNode *node)
virtual | ~CWinLogData ()
kLogNode | GetType (void) const
const char * | GetStr (void)
void | ComputeBounds (const UPoint &topLeft, UDC &hdc, EntnodeData *entryInfo=0L)
void | Offset (UPoint o)
void | Update (UDC &hdc, EntnodeData *entryInfo=0L)
URect & | Bounds (void)
URect & | SelfBounds (void)
bool | Selected (void) const
void | SetSelected (CScrollView *view, bool state)
void | SetSelected (bool state)
void | UnselectAll (CScrollView *view)
void | UnselectAll (void)
CWinLogData * | HitTest (UPoint point)
bool | IsDiskNode (EntnodeData *entryInfo)
CWinLogData (CLogNode *node)
virtual | ~CWinLogData ()
kLogNode | GetType (void) const
const char * | GetStr (void)
CRect & | Bounds (void)
CRect & | SelfBounds (void)
void | ComputeBounds (const CPoint &topLeft, CDC &dc, EntnodeData *entryInfo=0L)
void | Offset (CPoint offset)
void | Update (CDC &dc, EntnodeData *entryInfo=0L)
bool | Selected (void) const
void | SetSelected (CScrollView *view, bool state)
void | UnselectAll (CScrollView *view)
CWinLogData * | HitTest (CPoint point)
bool | IsDiskNode (EntnodeData *entryInfo)
bool IsDeadNode ()
bool IsUserState ()
void | UpdateMergePoints (CDC &dc)

Static Public Member Functions

CWinLogData * | CreateNewData (CLogNode *node)
CWinLogData * | CreateNewData (CLogNode *node)

Protected Member Functions

virtual void | UpdateSelf (UDC &hdc, EntnodeData *entryInfo)=0
virtual USize | GetBoundsSelf (UDC &hdc, EntnodeData *entryInfo)=0
CWinLogData * | GetData (CLogNode *node)
CWinLogData * | GetData (CLogNode *node)
void | CollectMergePointPairPass1 (vector< pair< CWinLogData *, CWinLogData * > > &mergePair)
void | CollectMergePointPairPass2 (vector< pair< CWinLogData *, CWinLogData * > > &mergePair)
virtual void | UpdateSelf (CDC &dc, EntnodeData *entryInfo)=0
virtual CSize | GetBoundsSelf (CDC &dc, EntnodeData *entryInfo)=0
virtual void | CollectMergePointPairPass1Self (vector< pair< CWinLogData *, CWinLogData * > > &mergePair)
virtual void | CollectMergePointPairPass2Self (vector< pair< CWinLogData *, CWinLogData * > > &mergePair)

Protected Attributes

URect selfB
URect totB
bool sel

Private Attributes

CRect | selfB
CRect | totB

Detailed Description

Windows log data abstract class.

Definition at line 42 of file UCvsGraph.h.

Constructor & Destructor Documentation

CWinLogData::CWinLogData ( CLogNode * node )

Definition at line 301 of file UCvsGraph.cpp.

References sel, selfB, URect::SetRectEmpty(), and totB.

00301                                        : CLogNodeData(node)
00302 {
00303     selfB.SetRectEmpty();
00304     totB.SetRectEmpty();
00305     sel = false;
00306 }

Here is the call graph for this function:

CWinLogData::~CWinLogData ( ) [virtual]

Definition at line 308 of file UCvsGraph.cpp.

00309 {
00310 }

CWinLogData::CWinLogData ( CLogNode * node )

virtual CWinLogData::~CWinLogData ( ) [virtual]

Member Function Documentation

CRect& CWinLogData::Bounds ( void ) [inline]

CRect & CWinLogData::Bounds ( void ) [inline]

Get the bounds rectangle

Returns:
The bounds rectangle
Definition at line 56 of file UCvsGraph.h.

References totB.

Referenced by CGraphView::CalcImageSize(), UCvsGraph::CalcImageSize(), ComputeBounds(), CGraphView::OnBeginPrinting(), and TGraphRectSelect::TraverseNode().

00056 { return totB; }

void CWinLogData::CollectMergePointPairPass1 ( vector< pair< CWinLogData *, CWinLogData * > > & mergePair ) [protected]

Definition at line 745 of file GraphView.cpp.

References CollectMergePointPairPass1Self(), and NULL.

Referenced by UpdateMergePoints().

00746 {
00747     CollectMergePointPairPass1Self(mergePair);
00748
00749     std::vector<CLogNode*>::iterator it = Node()->Childs().begin();
00750
00751     while( it != Node()->Childs().end() )
00752     {
00753         ((CWinLogData*)(*it)->GetUserData())->CollectMergePointPairPass1(mergePair);
00754
00755         it++;
00756     }
00757
00758     if( Node()->Next() != NULL )
00759     {
00760         ((CWinLogData*)Node()->Next()->GetUserData())->CollectMergePointPairPass1(mergePair);
00761     }
00762 }

Here is the call graph for this function:

void CWinLogData::CollectMergePointPairPass1Self ( vector< pair< CWinLogData *, CWinLogData * > > & mergePair ) [protected, virtual]

Get a vector of merge points pair (source-->Target). This is the first pass, which collects only the target

Parameters:
mergePair Vector of merge pair

Reimplemented in CWinLogRevData.

Definition at line 809 of file GraphView.cpp.

Referenced by CollectMergePointPairPass1().

00810 {
00811 }

void CWinLogData::CollectMergePointPairPass2 ( vector< pair< CWinLogData *, CWinLogData * > > & mergePair ) [protected]

Definition at line 764 of file GraphView.cpp.

References CollectMergePointPairPass2Self(), and NULL.

Referenced by UpdateMergePoints().

00765 {
00766     CollectMergePointPairPass2Self(mergePair);
00767
00768     std::vector<CLogNode*>::iterator it = Node()->Childs().begin();
00769
00770     while( it != Node()->Childs().end() )
00771     {
00772         ((CWinLogData*)(*it)->GetUserData())->CollectMergePointPairPass2(mergePair);
00773
00774         it++;
00775     }
00776
00777     if( Node()->Next() != NULL )
00778     {
00779         ((CWinLogData*)Node()->Next()->GetUserData())->CollectMergePointPairPass2(mergePair);
00780     }
00781 }

Here is the call graph for this function:

void CWinLogData::CollectMergePointPairPass2Self ( vector< pair< CWinLogData *, CWinLogData * > > & mergePair ) [protected, virtual]

Get a vector of merge points pair (source-->Target). This is the second pass, which makes the link between source and target

Parameters:
mergePair Vector of merge pair

Reimplemented in CWinLogRevData.

Definition at line 818 of file GraphView.cpp.

Referenced by CollectMergePointPairPass2().

00819 {
00820 }

void CWinLogData::ComputeBounds | ( | const CPoint & | topLeft,
 |  | CDC & | dc,
 |  | EntnodeData * | entryInfo = 0L
 | ) |

Calculate the bounds

Parameters:
topLeft | Top-left point for the bounds
dc | Device context
entryInfo | Entry info
Definition at line 581 of file GraphView.cpp.

References URect::BottomRight(), Bounds(), ComputeBounds(), CreateNewData(), GetBoundsSelf(), GetData(), URect::Height(), kHChildSpace, kInflateNodeSpace, kVChildSpace, Offset(), URect::OffsetRect(), selfB, URect::SetRect(), URect::SetRectEmpty(), URect::TopLeft(), totB, URect::UnionRect(), URect::Width(), UPOINT::x, and UPOINT::y.

00582 {
00583     CLogNode* subNode;
00584     CLogNode* nextNode = fNode->Next();
00585
00586     // First compute childrens bounds
00587     vector<CLogNode*>::iterator i;
00588     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00589     {
00590         subNode = *i;
00591         CWinLogData::CreateNewData(subNode);
00592         GetData(subNode)->ComputeBounds(topLeft, dc, entryInfo);
00593     }
00594
00595     if( nextNode != 0L )
00596         CWinLogData::CreateNewData(nextNode);
00597
00598     // Compute self place
00599     selfB.SetRectEmpty();
00600     CSize size = GetBoundsSelf(dc, entryInfo);
00601     size.cx += kInflateNodeSpace;
00602     size.cy += kInflateNodeSpace;
00603     selfB.SetRect(0, 0, size.cx, size.cy);
00604
00605     // Offset to the place assigned to this node
00606     selfB.OffsetRect(topLeft - selfB.TopLeft());
00607
00608     // Calculate the total height of the childrens
00609     int vSize = 0;
00610     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00611     {
00612         subNode = *i;
00613         CRect& b = GetData(subNode)->Bounds();
00614         vSize += b.Height();
00615     }
00616
00617     if( !fNode->Childs().empty() )
00618         vSize += (fNode->Childs().size() - 1) * kVChildSpace;
00619
00620     // Offset the children relative to self
00621     CPoint startChilds(topLeft.x + selfB.Width() + kHChildSpace,
00622         /*selfB.CenterPoint().y - vSize / 2*/topLeft.y);
00623
00624     // Place the first child at the bottom of the header node so it won't take so much space for long filenames
00625     if( fNode->GetType() == kNodeHeader )
00626     {
00627         startChilds = CPoint(topLeft.x + kHChildSpace, topLeft.y + selfB.Height() + kVChildSpace);
00628     }
00629
00630     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00631     {
00632         subNode = *i;
00633         CRect curPos = GetData(subNode)->Bounds();
00634         GetData(subNode)->Offset(startChilds - curPos.TopLeft());
00635
00636         startChilds.y += curPos.Height() + kVChildSpace;
00637     }
00638
00639     // Calculate the total bounds of the childrens
00640     CRect bc;
00641     bc.SetRectEmpty();
00642     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00643     {
00644         subNode = *i;
00645         CRect& b = GetData(subNode)->Bounds();
00646         bc.UnionRect(bc, b);
00647     }
00648
00649     // Now we got the complete size
00650     totB.UnionRect(selfB, bc);
00651
00652     if( nextNode != 0L )
00653     {
00654         CPoint nextTopLeft;
00655         nextTopLeft.x = totB.TopLeft().x;
00656         nextTopLeft.y = totB.BottomRight().y + kVChildSpace;
00657         GetData(nextNode)->ComputeBounds(nextTopLeft, dc, entryInfo);
00658
00659         totB.UnionRect(totB, GetData(nextNode)->Bounds());
00660     }
00661 }

Here is the call graph for this function:

void CWinLogData::ComputeBounds | ( | const UPoint & | topLeft,
 |  | UDC & | hdc,
 |  | EntnodeData * | entryInfo = 0L
 | ) |

Definition at line 540 of file UCvsGraph.cpp.

References URect::BottomRight(), Bounds(), CreateNewData(), USIZE::cx, USIZE::cy, GetBoundsSelf(), GetData(), URect::Height(), kHChildSpace, kInflateNodeSpace, kVChildSpace, Offset(), URect::OffsetRect(), selfB, URect::SetRect(), URect::SetRectEmpty(), URect::TopLeft(), totB, URect::UnionRect(), URect::Width(), UPOINT::x, and UPOINT::y.

Referenced by CGraphView::CalcImageSize(), UCvsGraph::CalcImageSize(), ComputeBounds(), and CGraphView::OnBeginPrinting().

00542 {
00543     CLogNode *subNode;
00544     CLogNode *nextNode = fNode->Next();
00545
00546     // first compute childrens bounds
00547     std::vector<CLogNode *>::iterator i;
00548     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00549     {
00550         subNode = *i;
00551         CWinLogData::CreateNewData(subNode);
00552         GetData(subNode)->ComputeBounds(topLeft, hdc, entryInfo);
00553     }
00554     if(nextNode != 0L)
00555         CWinLogData::CreateNewData(nextNode);
00556
00557     // compute self place
00558     selfB.SetRectEmpty();
00559     USize size = GetBoundsSelf(hdc, entryInfo);
00560     size.cx += kInflateNodeSpace;
00561     size.cy += kInflateNodeSpace;
00562     selfB.SetRect(0, 0, size.cx, size.cy);
00563
00564     // offset to the place assigned to this node
00565     selfB.OffsetRect(topLeft - selfB.TopLeft());
00566
00567     // calculate the total height of the childrens
00568     int vSize = 0;
00569     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00570     {
00571         subNode = *i;
00572         URect & b = GetData(subNode)->Bounds();
00573         vSize += b.Height();
00574     }
00575     if(!fNode->Childs().empty())
00576         vSize += (fNode->Childs().size() - 1) * kVChildSpace;
00577
00578     // offset the children relative to self
00579     UPoint startChilds(topLeft.x + selfB.Width() + kHChildSpace,
00580         /*selfB.CenterPoint().y - vSize / 2*/topLeft.y);
00581     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00582     {
00583         subNode = *i;
00584         URect curPos = GetData(subNode)->Bounds();
00585         GetData(subNode)->Offset(startChilds - curPos.TopLeft());
00586         startChilds.y += curPos.Height() + kVChildSpace;
00587     }
00588
00589     // calculate the total bounds of the childrens
00590     URect bc;
00591     bc.SetRectEmpty();
00592     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00593     {
00594         subNode = *i;
00595         URect & b = GetData(subNode)->Bounds();
00596         bc.UnionRect(&bc, &b);
00597     }
00598
00599     // now we got the complete size
00600     totB.UnionRect(&selfB, &bc);
00601
00602     if(nextNode != 0L)
00603     {
00604         UPoint nextTopLeft;
00605         nextTopLeft.x = totB.TopLeft().x;
00606         nextTopLeft.y = totB.BottomRight().y + kVChildSpace;
00607         GetData(nextNode)->ComputeBounds(nextTopLeft, hdc, entryInfo);
00608
00609         totB.UnionRect(&totB, &GetData(nextNode)->Bounds());
00610     }
00611 }

Here is the call graph for this function:

CWinLogData* CWinLogData::CreateNewData ( CLogNode * node ) [static]

CWinLogData * CWinLogData::CreateNewData ( CLogNode * node ) [static]

Create new log data

Parameters:
node Log node
Returns:
New log data on success, NULL otherwise
Definition at line 344 of file UCvsGraph.cpp.

Referenced by CGraphView::CalcImageSize(), UCvsGraph::CalcImageSize(), ComputeBounds(), and CGraphView::OnBeginPrinting().

00345 {
00346     if(node->GetUserData() != 0L)
00347         return (CWinLogData *)node->GetUserData();
00348
00349     CWinLogData *res = 0L;
00350     switch(node->GetType())
00351     {
00352     case kNodeHeader :
00353         res = new CWinLogHeaderData(node);
00354         break;
00355     case kNodeBranch :
00356         res = new CWinLogBranchData(node);
00357         break;
00358     case kNodeRev :
00359         res = new CWinLogRevData(node);
00360         break;
00361     case kNodeTag :
00362         res = new CWinLogTagData(node);
00363         break;
00364     }
00365     node->SetUserData(res);
00366     return res;
00367 }

CSize CWinLogData::GetBoundsSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, pure virtual]

Get the bounds size

Parameters:
dc | Device context
entryInfo | Entry info
Returns:
Bounds size as CSize

Implemented in CWinLogHeaderData, CWinLogRevData, CWinLogTagData, and CWinLogBranchData.

Definition at line 798 of file GraphView.cpp.

00799 {
00800     return CSize(0, 0);
00801 }

virtual USize CWinLogData::GetBoundsSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, pure virtual]

Implemented in CWinLogHeaderData, CWinLogRevData, CWinLogTagData, and CWinLogBranchData.

Referenced by ComputeBounds().

CWinLogData* CWinLogData::GetData ( CLogNode * node ) [inline, protected]

CWinLogData * CWinLogData::GetData ( CLogNode * node ) [inline, protected]

Get log node data

Parameters:
node Log node to get the date from
Returns:
The log node data
Definition at line 74 of file UCvsGraph.h.

Referenced by ComputeBounds(), HitTest(), Offset(), UnselectAll(), and Update().

00075         { return (CWinLogData *)node->GetUserData(); }

const char* CWinLogData::GetStr ( void )

const char * CWinLogData::GetStr ( void )

Get the node string

Returns:
The node string
Definition at line 312 of file UCvsGraph.cpp.

References GetType().

Referenced by CGraphView::OnAnnotate(), CGraphView::OnGraphChangelogmessage(), CGraphView::OnGraphSetstate(), CGraphView::OnViewDiff(), CGraphView::OnViewTag(), CGraphView::OnViewUnlockf(), CGraphView::RetrieveSel(), CGraphView::SaveSel(), and TGraphDelCmd::TraverseNode().

00313 {
00314     switch(GetType())
00315     {
00316         case kNodeHeader :
00317         {
00318             CLogNodeHeader & header = *(CLogNodeHeader *)fNode;
00319             return (*header).WorkingFile();
00320             break;
00321         }
00322         case kNodeBranch :
00323         {
00324             CLogNodeBranch & branch = *(CLogNodeBranch *)fNode;
00325             return *branch;
00326             break;
00327         }
00328         case kNodeRev :
00329         {
00330             CLogNodeRev & rev = *(CLogNodeRev *)fNode;
00331             return (*rev).RevNum().c_str();
00332             break;
00333         }
00334         case kNodeTag :
00335         {
00336             CLogNodeTag & tag = *(CLogNodeTag *)fNode;
00337             return *tag;
00338             break;
00339         }
00340     }
00341     return 0L;
00342 }

Here is the call graph for this function:

kLogNode CWinLogData::GetType ( void ) const [inline]

kLogNode CWinLogData::GetType ( void ) const [inline]

Get log node type

Returns:
The log node type
Definition at line 48 of file UCvsGraph.h.

Referenced by GetStr(), IsDeadNode(), IsDiskNode(), CGraphView::IsSelSingleNode(), IsUserState(), CGraphView::OnContextMenu(), CGraphView::OnUpdateViewDiff(), TGraphSelNonSig::TraverseNode(), and TGraphDelCmd::TraverseNode().

00048 { return fNode->GetType(); }

CWinLogData * CWinLogData::HitTest ( CPoint point )

Text whether the point is within the node and return the found node

Parameters:
point Point to test
Returns:
Log data if node found, NULL otherwise
Definition at line 435 of file GraphView.cpp.

References GetData(), HitTest(), URect::PtInRect(), selfB, and totB.

00436 {
00437     if( !totB.PtInRect(point) )
00438         return 0L;
00439
00440     if( selfB.PtInRect(point) )
00441         return this;
00442
00443     CWinLogData* result;
00444     vector<CLogNode*>::iterator i;
00445     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00446     {
00447         CLogNode* subNode = *i;
00448         result = GetData(subNode)->HitTest(point);
00449         if( result != 0L )
00450             return result;
00451     }
00452
00453     if( fNode->Next() != 0L )
00454     {
00455         result = GetData(fNode->Next())->HitTest(point);
00456         if( result != 0L )
00457             return result;
00458     }
00459
00460     return 0L;
00461 }

Here is the call graph for this function:

CWinLogData * CWinLogData::HitTest ( UPoint point )

Definition at line 433 of file UCvsGraph.cpp.

References GetData(), URect::PtInRect(), selfB, and totB.

Referenced by HitTest(), UCvsGraph::OnBtnClick(), CGraphView::OnContextMenu(), and CGraphView::OnLButtonDown().

00434 {
00435     if(!totB.PtInRect(point))
00436         return 0L;
00437     if(selfB.PtInRect(point))
00438         return this;
00439
00440     CWinLogData *result;
00441     std::vector<CLogNode *>::iterator i;
00442     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00443     {
00444         CLogNode *subNode = *i;
00445         result = GetData(subNode)->HitTest(point);
00446         if(result != 0L)
00447             return result;
00448     }
00449     if(fNode->Next() != 0L)
00450     {
00451         result = GetData(fNode->Next())->HitTest(point);
00452         if(result != 0L)
00453             return result;
00454     }
00455     return 0L;
00456 }

Here is the call graph for this function:

bool CWinLogData::IsDeadNode ( )

Check whether the selected node has the dead state

Returns:
true if the selected node is a revision and the state is dead, false otherwise
Definition at line 342 of file GraphView.cpp.

References GetType().

Referenced by CWinLogRevData::UpdateSelf().

00343 {
00344     if( GetType() != kNodeRev )
00345         return false;
00346
00347     return strcmp("dead", (**(CLogNodeRev*)fNode).State()) == 0;
00348 }

Here is the call graph for this function:

bool CWinLogData::IsDiskNode ( EntnodeData * entryInfo )

bool CWinLogData::IsDiskNode ( EntnodeData * entryInfo )

Check whether the selected node is the same as sandbox revision

Returns:
true if the selected node is a revision and the revision is the same as sandbox revision, false otherwise
Definition at line 369 of file UCvsGraph.cpp.

References GetType().

Referenced by CWinLogRevData::GetBoundsSelf(), and CWinLogRevData::UpdateSelf().

00370 {
00371     if(entryInfo == 0L || GetType() != kNodeRev)
00372         return false;
00373     const char *vn = (*entryInfo)[EntnodeFile::kVN];
00374     if(vn == 0L)
00375         return false;
00376
00377     return strcmp(vn, (**(CLogNodeRev *)fNode).RevNum().c_str()) == 0;
00378 }

Here is the call graph for this function:

bool CWinLogData::IsUserState ( )

Check whether the selected state is a user-defined state

Returns:
true if the selected node is a revision and the state is user-defined, false otherwise
Definition at line 354 of file GraphView.cpp.

References GetType().

Referenced by CWinLogRevData::UpdateSelf().

00355 {
00356     if( GetType() != kNodeRev )
00357         return false;
00358
00359     return !(strcmp("dead", (**(CLogNodeRev*)fNode).State()) == 0 ||
00360         strcmp("Exp", (**(CLogNodeRev*)fNode).State()) == 0);
00361 }

Here is the call graph for this function:

void CWinLogData::Offset ( CPoint offset )

Offset the log node

Parameters:
offset Offset
Definition at line 367 of file GraphView.cpp.

References GetData(), Offset(), URect::OffsetRect(), selfB, and totB.

00368 {
00369     selfB.OffsetRect(offset);
00370     totB.OffsetRect(offset);
00371
00372     vector<CLogNode*>::iterator i;
00373     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00374     {
00375         CLogNode* subNode = *i;
00376         GetData(subNode)->Offset(offset);
00377     }
00378
00379     if( fNode->Next() != 0L )
00380     {
00381         GetData(fNode->Next())->Offset(offset);
00382     }
00383 }

Here is the call graph for this function:

void CWinLogData::Offset ( UPoint o )

Definition at line 384 of file UCvsGraph.cpp.

References GetData(), URect::OffsetRect(), selfB, and totB.

Referenced by CGraphView::CalcImageSize(), UCvsGraph::CalcImageSize(), ComputeBounds(), and Offset().

00385 {
00386     selfB.OffsetRect(o);
00387     totB.OffsetRect(o);
00388     std::vector<CLogNode *>::iterator i;
00389     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00390     {
00391         CLogNode *subNode = *i;
00392         GetData(subNode)->Offset(o);
00393     }
00394     if(fNode->Next() != 0L)
00395         GetData(fNode->Next())->Offset(o);
00396 }

Here is the call graph for this function:

bool CWinLogData::Selected ( void ) const [inline]

bool CWinLogData::Selected ( void ) const [inline]

Get the selection state

Returns:
true if selected, false otherwise
Definition at line 59 of file UCvsGraph.h.

References sel.

Referenced by UCvsGraph::OnBtnClick(), CGraphView::OnContextMenu(), CGraphView::OnLButtonDown(), TGraphCurSelector::TraverseNode(), TGraphDelCmd::TraverseNode(), TGraphCmdStatus::TraverseNode(), TGraphRectSelect::TraverseNode(), CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogRevData::UpdateSelf(), and CWinLogHeaderData::UpdateSelf().

00059 { return sel; }

CRect& CWinLogData::SelfBounds ( void ) [inline]

CRect & CWinLogData::SelfBounds ( void ) [inline]

Get the self bounds

Returns:
The self bounds
Definition at line 57 of file UCvsGraph.h.

References selfB.

Referenced by CGraphView::OnKeyDown(), TGraphRectSelect::TraverseNode(), Update(), CWinLogBranchData::UpdateSelf(), CWinLogTagData::UpdateSelf(), CWinLogRevData::UpdateSelf(), and CWinLogHeaderData::UpdateSelf().

00057 { return selfB; }

void CWinLogData::SetSelected | ( | CScrollView * | view,
 |  | bool | state
 | ) |

void CWinLogData::SetSelected ( bool state ) [inline]

Definition at line 61 of file UCvsGraph.h.

References sel.

00061 { sel = state; }

void CWinLogData::SetSelected | ( | CScrollView * | view,
 |  | bool | state
 | ) |

Set the selection state

Parameters:
view | View to set the selection state
state | New selection state
Definition at line 399 of file UCvsGraph.cpp.

References CScrollView::GetDeviceScrollPosition(), CScrollView::InvalidateRect(), URect::OffsetRect(), sel, and selfB.

Referenced by UCvsGraph::OnBtnClick(), CGraphView::OnContextMenu(), CGraphView::OnKeyDown(), CGraphView::OnLButtonDown(), TGraphCurSelector::TraverseNode(), TGraphSelNonSig::TraverseNode(), TGraphRectSelect::TraverseNode(), and UnselectAll().

00400 {
00401     sel = state;
00402
00403     URect invalR = selfB;
00404     invalR.OffsetRect(-view->GetDeviceScrollPosition());
00405     view->InvalidateRect(&invalR);
00406 }

Here is the call graph for this function:

void CWinLogData::UnselectAll ( CScrollView * view )

void CWinLogData::UnselectAll ( void )

Definition at line 428 of file UCvsGraph.cpp.

References NULL.

00429 {
00430     CWinLogData::UnselectAll(NULL);
00431 }

void CWinLogData::UnselectAll ( CScrollView * view )

Remove selection from all nodes

Parameters:
view View
Definition at line 408 of file UCvsGraph.cpp.

References GetData(), NULL, sel, and SetSelected().

Referenced by UCvsGraph::OnBtnClick(), CGraphView::OnContextMenu(), CGraphView::OnKeyDown(), CGraphView::OnLButtonDown(), and CGraphView::OnViewSelnonsig().

00409 {
00410     if(sel)
00411     {
00412         if(view != NULL)
00413             SetSelected(view, false);
00414         else
00415             SetSelected(false);
00416     }
00417
00418     std::vector<CLogNode *>::iterator i;
00419     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00420     {
00421         CLogNode *subNode = *i;
00422         GetData(subNode)->UnselectAll(view);
00423     }
00424     if(fNode->Next() != 0L)
00425         GetData(fNode->Next())->UnselectAll(view);
00426 }

Here is the call graph for this function:

void CWinLogData::Update | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo = 0L
 | ) |

Draw the node

Parameters:
dc | Device context
entryInfo | Entry info
Definition at line 468 of file GraphView.cpp.

References URect::BottomRight(), URect::CenterPoint(), GetData(), kHChildSpace, selfB, SelfBounds(), URect::TopLeft(), Update(), UpdateSelf(), URect::Width(), UPOINT::x, and UPOINT::y.

00469 {
00470     CLogNode* subNode;
00471     CLogNode* nextNode = fNode->Next();
00472     CPen* pOldPen = 0L;
00473     CBrush* pOldBrush = 0L;
00474     CPen pen, pen2;
00475     CBrush brush;
00476
00477     UpdateSelf(dc, entryInfo);
00478
00479     TRY
00480     {
00481         pen.CreatePen(PS_SOLID, 2, RGB(0, 0, 255));
00482         pen2.CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
00483         pOldPen = dc.SelectObject(&pen);
00484
00485         int topY = selfB.TopLeft().y + 2;
00486         int botY = selfB.BottomRight().y - 2;
00487         int lefX = selfB.BottomRight().x + 4;
00488
00489         int count = 1;
00490         int tot = fNode->Childs().size() + 1;
00491
00492         // Draw the children
00493         vector<CLogNode*>::iterator i;
00494         for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i, ++count)
00495         {
00496             subNode = *i;
00497
00498             // Draw the link
00499             CRect& cb = GetData(subNode)->SelfBounds();
00500
00501             if( subNode->GetType() == kNodeRev || subNode->GetType() == kNodeBranch )
00502                 dc.SelectObject(&pen);
00503             else
00504                 dc.SelectObject(&pen2);
00505
00506             float y = (float)topY + (float)(botY - topY) * (float)count / (float)tot;
00507             int rigX = cb.TopLeft().x - 4;
00508             float x = (float)rigX - (float)(rigX - lefX) * (float)count / (float)tot;
00509
00510             // Special drawing for the header node
00511             if( fNode->GetType() == kNodeHeader )
00512             {
00513                 dc.MoveTo(selfB.TopLeft().x + kHChildSpace/2, selfB.BottomRight().y);
00514                 dc.LineTo(selfB.TopLeft().x + kHChildSpace/2, cb.CenterPoint().y);
00515                 dc.LineTo(cb.TopLeft().x, cb.CenterPoint().y);
00516             }
00517             else
00518             {
00519                 //int halfX = (cb.TopLeft().x - selfB.BottomRight().x) / 2;
00520                 dc.MoveTo(selfB.BottomRight().x, (int)y);
00521                 dc.LineTo((int)x, (int)y);
00522                 dc.LineTo((int)x, cb.CenterPoint().y);
00523                 dc.LineTo(cb.TopLeft().x, cb.CenterPoint().y);
00524             }
00525
00526             // Draw the sub-node
00527             GetData(subNode)->Update(dc, entryInfo);
00528         }
00529
00530         // Draw the next node
00531         if( nextNode != 0L )
00532         {
00533             // Draw the link
00534             CRect& nb = GetData(nextNode)->SelfBounds();
00535             if( nextNode->GetType() == kNodeRev || nextNode->GetType() == kNodeBranch )
00536                 dc.SelectObject(&pen);
00537             else
00538                 dc.SelectObject(&pen2);
00539             int centerX = selfB.Width() < nb.Width() ?
00540                 selfB.CenterPoint().x : nb.CenterPoint().x;
00541
00542             dc.MoveTo(centerX, selfB.BottomRight().y);
00543             dc.LineTo(centerX, nb.TopLeft().y);
00544
00545             // Draw the next node
00546             GetData(nextNode)->Update(dc, entryInfo);
00547         }
00548
00549         if( pOldPen != 0L )
00550         {
00551             dc.SelectObject(pOldPen);
00552             pOldPen = 0L;
00553         }
00554
00555         if( pOldBrush != 0L )
00556         {
00557             dc.SelectObject(pOldBrush);
00558             pOldBrush = 0L;
00559         }
00560
00561         pen.DeleteObject();
00562         pen2.DeleteObject();
00563     }
00564     CATCH_ALL(e)
00565     {
00566         if( pOldPen != 0L )
00567             dc.SelectObject(pOldPen);
00568
00569         if( pOldBrush != 0L )
00570             dc.SelectObject(pOldBrush);
00571     }
00572     END_CATCH_ALL
00573 }

Here is the call graph for this function:

void CWinLogData::Update | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo = 0L
 | ) |

Definition at line 458 of file UCvsGraph.cpp.

References URect::BottomRight(), URect::CenterPoint(), UPen::CreatePen(), UPen::DeleteObject(), GetData(), UDC::LineTo(), UDC::MoveTo(), UDC::SelectObject(), selfB, SelfBounds(), URect::TopLeft(), UpdateSelf(), UPS_SOLID, URGB, URect::Width(), UPOINT::x, and UPOINT::y.

Referenced by UCvsGraph::OnBtnClick(), CGraphView::OnDraw(), UCvsGraph::OnDrawing(), CGraphView::OnPrint(), and Update().

00459 {
00460     CLogNode *subNode;
00461     CLogNode *nextNode = fNode->Next();
00462     UPen *pOldPen = 0L;
00463     UPen pen, pen2;
00464
00465     UpdateSelf(hdc, entryInfo);
00466
00467     try
00468     {
00469         pen.CreatePen(UPS_SOLID, 2, URGB(0, 0, 255));
00470         pen2.CreatePen(UPS_SOLID, 1, URGB(0, 0, 0));
00471         pOldPen = hdc.SelectObject(&pen);
00472
00473         int topY = selfB.TopLeft().y + 2;
00474         int botY = selfB.BottomRight().y - 2;
00475         int lefX = selfB.BottomRight().x + 4;
00476         int count = 1;
00477         int tot = fNode->Childs().size() + 1;
00478
00479         // draw the children
00480         std::vector<CLogNode *>::iterator i;
00481         for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i, ++count)
00482         {
00483             subNode = *i;
00484
00485             // draw the link
00486             URect & cb = GetData(subNode)->SelfBounds();
00487             if(subNode->GetType() == kNodeRev || subNode->GetType() == kNodeBranch)
00488                 hdc.SelectObject(&pen);
00489             else
00490                 hdc.SelectObject(&pen2);
00491             float y = (float)topY + (float)(botY - topY) *
00492                 (float)count / (float)tot;
00493             int rigX = cb.TopLeft().x - 4;
00494             float x = (float)rigX - (float)(rigX - lefX) *
00495                 (float)count / (float)tot;
00496             //int halfX = (cb.TopLeft().x - selfB.BottomRight().x) / 2;
00497             hdc.MoveTo(selfB.BottomRight().x, (int)y);
00498             hdc.LineTo((int)x, (int)y);
00499             hdc.LineTo((int)x, cb.CenterPoint().y);
00500             hdc.LineTo(cb.TopLeft().x, cb.CenterPoint().y);
00501
00502             // draw the sub-node
00503             GetData(subNode)->Update(hdc, entryInfo);
00504         }
00505
00506         // draw the next node
00507         if(nextNode != 0L)
00508         {
00509             // draw the link
00510             URect & nb = GetData(nextNode)->SelfBounds();
00511             if(nextNode->GetType() == kNodeRev || nextNode->GetType() == kNodeBranch)
00512                 hdc.SelectObject(&pen);
00513             else
00514                 hdc.SelectObject(&pen2);
00515             int centerX = selfB.Width() < nb.Width() ?
00516                 selfB.CenterPoint().x : nb.CenterPoint().x;
00517             hdc.MoveTo(centerX, selfB.BottomRight().y);
00518             hdc.LineTo(centerX, nb.TopLeft().y);
00519
00520             // draw the next node
00521             GetData(nextNode)->Update(hdc, entryInfo);
00522         }
00523
00524         if (pOldPen != 0L)
00525         {
00526             hdc.SelectObject(pOldPen);
00527             pOldPen = 0L;
00528         }
00529
00530         pen.DeleteObject();
00531         pen2.DeleteObject();
00532     }
00533     catch(...)
00534     {
00535         if (pOldPen != 0L)
00536             hdc.SelectObject(pOldPen);
00537     }
00538 }

Here is the call graph for this function:

void CWinLogData::UpdateMergePoints ( CDC & dc )

Draw the merges relationship

Parameters:
dc Device context
Definition at line 667 of file GraphView.cpp.

References CollectMergePointPairPass1(), CollectMergePointPairPass2(), and gGraphMergeColor.

Referenced by CGraphView::OnDraw().

00668 {
00669     vector<pair<CWinLogData*, CWinLogData*> > mergePair;
00670
00671     CollectMergePointPairPass1(mergePair);
00672     CollectMergePointPairPass2(mergePair);
00673
00674     CPen pen;
00675
00676     pen.CreatePen(PS_SOLID, 0, gGraphMergeColor);
00677
00678     CPen* oldPen = dc.SelectObject(&pen);
00679
00680     TRY
00681     {
00682         for(int i = 0; i < (int)mergePair.size(); i++)
00683         {
00684             if( mergePair[i].first != 0L && mergePair[i].second != 0L )
00685             {
00686                 CRect rect_source = mergePair[i].first->SelfBounds();
00687                 CRect rect_target = mergePair[i].second->SelfBounds();
00688
00689                 if( rect_source.left > rect_target.right )
00690                 {
00691                     CPoint pts[7];
00692
00693                     pts[0] = CPoint(rect_source.left, rect_source.top + rect_source.Height()/2);
00694                     pts[1] = CPoint(pts[0].x - 8, pts[0].y);
00695                     pts[2] = CPoint(rect_target.right + 8, rect_target.top + rect_target.Height()/2);
00696                     pts[3] = CPoint(pts[2].x - 8, pts[2].y);
00697                     pts[4] = CPoint(pts[3].x + 4, pts[3].y-2);
00698                     pts[5] = CPoint(pts[4].x, pts[4].y+4);
00699                     pts[6] = pts[3];
00700
00701                     dc.Polyline(pts, 7);
00702                 }
00703                 else if( rect_source.left == rect_target.left )
00704                 {
00705                     CPoint pts[7];
00706
00707                     pts[0] = CPoint(rect_source.right, rect_source.top + rect_source.Height()/2);
00708                     pts[1] = CPoint(pts[0].x + 8, pts[0].y);
00709                     pts[2] = CPoint(rect_target.right + 8, rect_target.top + rect_target.Height()/2);
00710                     pts[3] = CPoint(pts[2].x - 8, pts[2].y);
00711                     pts[4] = CPoint(pts[3].x + 4, pts[3].y-2);
00712                     pts[5] = CPoint(pts[4].x, pts[4].y+4);
00713                     pts[6] = pts[3];
00714
00715                     dc.Polyline(pts, 7);
00716                 }
00717                 else
00718                 {
00719                     CPoint pts[7];
00720
00721                     pts[0] = CPoint(rect_source.right, rect_source.top + rect_source.Height()/2);
00722                     pts[1] = CPoint(pts[0].x + 8, pts[0].y);
00723                     pts[2] = CPoint(rect_target.left - 8, rect_target.top + rect_target.Height()/2);
00724                     pts[3] = CPoint(pts[2].x + 8, pts[2].y);
00725                     pts[4] = CPoint(pts[3].x - 4, pts[3].y-2);
00726                     pts[5] = CPoint(pts[4].x, pts[4].y+4);
00727                     pts[6] = pts[3];
00728
00729                     dc.Polyline(pts, 7);
00730                 }
00731             }
00732         }
00733     }
00734     CATCH_ALL(e)
00735     {
00736     }
00737     END_CATCH_ALL
00738
00739     if( oldPen != 0L )
00740         dc.SelectObject(&oldPen);
00741
00742     pen.DeleteObject();
00743 }

Here is the call graph for this function:

void CWinLogData::UpdateSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, pure virtual]

Draw the node

Parameters:
dc | Device context
entryInfo | Entry info

Implemented in CWinLogHeaderData, CWinLogRevData, CWinLogTagData, and CWinLogBranchData.

Definition at line 788 of file GraphView.cpp.

00789 {
00790 }

virtual void CWinLogData::UpdateSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, pure virtual]

Implemented in CWinLogHeaderData, CWinLogRevData, CWinLogTagData, and CWinLogBranchData.

Referenced by Update().

Member Data Documentation

bool CWinLogData::sel [protected]

Selection flag Definition at line 79 of file GraphView.h.

Referenced by CWinLogData(), Selected(), SetSelected(), and UnselectAll().

CRect CWinLogData::selfB [private]

Self bounds Definition at line 77 of file GraphView.h.

URect CWinLogData::selfB [protected]

Definition at line 77 of file UCvsGraph.h.

Referenced by ComputeBounds(), CWinLogData(), HitTest(), Offset(), SelfBounds(), SetSelected(), and Update().

CRect CWinLogData::totB [private]

Total bounds Definition at line 78 of file GraphView.h.

URect CWinLogData::totB [protected]

Definition at line 78 of file UCvsGraph.h.

Referenced by Bounds(), ComputeBounds(), CWinLogData(), HitTest(), and Offset().

The documentation for this class was generated from the following files:
  • common/UCvsGraph.h
  • WinCvs/GraphView.h
  • common/UCvsGraph.cpp
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:58:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinLogHeaderData Class Reference

CWinLogHeaderData Class Reference

Windows log header node data. More...

#include <UCvsGraph.h>

Inheritance diagram for CWinLogHeaderData:

[legend]
Collaboration diagram for CWinLogHeaderData:

[legend]
List of all members.

Public Member Functions

CWinLogHeaderData (CLogNode *node)
virtual | ~CWinLogHeaderData ()
CWinLogHeaderData (CLogNode *node)
virtual | ~CWinLogHeaderData ()

Protected Member Functions

virtual void | UpdateSelf (UDC &hdc, EntnodeData *entryInfo)
virtual USize | GetBoundsSelf (UDC &hdc, EntnodeData *entryInfo)
virtual void | UpdateSelf (CDC &dc, EntnodeData *entryInfo)
virtual CSize | GetBoundsSelf (CDC &dc, EntnodeData *entryInfo)

Detailed Description

Windows log header node data.

Definition at line 82 of file UCvsGraph.h.

Constructor & Destructor Documentation

CWinLogHeaderData::CWinLogHeaderData ( CLogNode * node ) [inline]

Definition at line 85 of file UCvsGraph.h.

00085 : CWinLogData(node) {}

virtual CWinLogHeaderData::~CWinLogHeaderData ( ) [inline, virtual]

Definition at line 86 of file UCvsGraph.h.

00086 {}

CWinLogHeaderData::CWinLogHeaderData ( CLogNode * node ) [inline]

Definition at line 125 of file GraphView.h.

00125 : CWinLogData(node) {}

virtual CWinLogHeaderData::~CWinLogHeaderData ( ) [inline, virtual]

Definition at line 126 of file GraphView.h.

00126 {}

Member Function Documentation

CSize CWinLogHeaderData::GetBoundsSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Get the bounds size

Parameters:
dc | Device context
entryInfo | Entry info
Returns:
Bounds size as CSize

Implements CWinLogData.

Definition at line 826 of file GraphView.cpp.

00827 {
00828     CLogNodeHeader& header = *(CLogNodeHeader*)fNode;
00829     return dc.GetTextExtent((*header).WorkingFile(),
00830         (*header).WorkingFile().length());
00831 }

USize CWinLogHeaderData::GetBoundsSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Implements CWinLogData.

Definition at line 102 of file UCvsGraph.cpp.

References UDC::GetTextExtent().

00103 {
00104     CLogNodeHeader & header = *(CLogNodeHeader *)fNode;
00105     return hdc.GetTextExtent((*header).WorkingFile(),
00106         (*header).WorkingFile().length());
00107 }

Here is the call graph for this function:

void CWinLogHeaderData::UpdateSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Draw the node

Parameters:
dc | Device context
entryInfo | Entry info

Implements CWinLogData.

Definition at line 833 of file GraphView.cpp.

References URect::CenterPoint(), gGraphHeaderColor, kRoundRect, NULL, CWinLogData::Selected(), and CWinLogData::SelfBounds().

00834 {
00835     // Draw the node
00836     ::DrawNode(dc, SelfBounds(), gGraphHeaderColor, kRoundRect, Selected());
00837
00838     // Draw the content of the node
00839     TEXTMETRIC tm;
00840     dc.GetTextMetrics(&tm);
00841
00842     CPoint center = SelfBounds().CenterPoint();
00843     int nCenterX = center.x;
00844     int nCenterY = center.y - tm.tmHeight/2;
00845
00846     CLogNodeHeader& header = *(CLogNodeHeader*)fNode;
00847     dc.ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, SelfBounds(),
00848         (*header).WorkingFile(), (*header).WorkingFile().length(), NULL);
00849 }

Here is the call graph for this function:

void CWinLogHeaderData::UpdateSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Implements CWinLogData.

Definition at line 204 of file UCvsGraph.cpp.

References UDC::GetTextHeight(), UDC::TextOutClipped(), URGB, UPOINT::x, and UPOINT::y.

00205 {
00206     // draw the node
00207     ::DrawNode(hdc, selfB, URGB(255, 0, 0), URGB(120, 0, 0), true, sel);
00208
00209     // draw the content of the node
00210     UPoint center = selfB.CenterPoint();
00211     int nCenterX = center.x;
00212     int nCenterY = center.y - hdc.GetTextHeight()/2;
00213     CLogNodeHeader & header = *(CLogNodeHeader *)fNode;
00214     hdc.TextOutClipped(nCenterX, nCenterY, &selfB,
00215         (*header).WorkingFile(), (*header).WorkingFile().length());
00216 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/UCvsGraph.h
  • WinCvs/GraphView.h
  • common/UCvsGraph.cpp
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:58:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinLogRevData Class Reference

CWinLogRevData Class Reference

Windows log revision node data. More...

#include <UCvsGraph.h>

Inheritance diagram for CWinLogRevData:

[legend]
Collaboration diagram for CWinLogRevData:

[legend]
List of all members.

Public Member Functions

CWinLogRevData (CLogNode *node)
virtual | ~CWinLogRevData ()
CWinLogRevData (CLogNode *node)
virtual | ~CWinLogRevData ()

Protected Member Functions

virtual void | UpdateSelf (UDC &hdc, EntnodeData *entryInfo)
virtual USize | GetBoundsSelf (UDC &hdc, EntnodeData *entryInfo)
virtual void | UpdateSelf (CDC &dc, EntnodeData *entryInfo)
virtual CSize | GetBoundsSelf (CDC &dc, EntnodeData *entryInfo)
virtual void | CollectMergePointPairPass1Self (vector< pair< CWinLogData *, CWinLogData * > > &mergePair)
virtual void | CollectMergePointPairPass2Self (vector< pair< CWinLogData *, CWinLogData * > > &mergePair)

Detailed Description

Windows log revision node data.

Definition at line 93 of file UCvsGraph.h.

Constructor & Destructor Documentation

CWinLogRevData::CWinLogRevData ( CLogNode * node ) [inline]

Definition at line 96 of file UCvsGraph.h.

00096 : CWinLogData(node) {}

virtual CWinLogRevData::~CWinLogRevData ( ) [inline, virtual]

Definition at line 97 of file UCvsGraph.h.

00097 {}

CWinLogRevData::CWinLogRevData ( CLogNode * node ) [inline]

Definition at line 139 of file GraphView.h.

00139 : CWinLogData(node) {}

virtual CWinLogRevData::~CWinLogRevData ( ) [inline, virtual]

Definition at line 140 of file GraphView.h.

00140 {}

Member Function Documentation

void CWinLogRevData::CollectMergePointPairPass1Self ( vector< pair< CWinLogData *, CWinLogData * > > & mergePair ) [protected, virtual]

Get a vector of merge points pair (source-->Target). This is the first pass, which collects only the target

Parameters:
mergePair Vector of merge pair

Reimplemented from CWinLogData.

Definition at line 919 of file GraphView.cpp.

00920 {
00921     CRevFile rev = *(*((CLogNodeRev*)Node()));
00922
00923     if( !rev.MergePoint().empty() )
00924     {
00925         mergePair.push_back(make_pair<CWinLogData*, CWinLogData*>(0L, this));
00926     }
00927 }

void CWinLogRevData::CollectMergePointPairPass2Self ( vector< pair< CWinLogData *, CWinLogData * > > & mergePair ) [protected, virtual]

Get a vector of merge points pair (source-->Target). This is the second pass, which makes the link between source and target

Parameters:
mergePair Vector of merge pair

Reimplemented from CWinLogData.

Definition at line 929 of file GraphView.cpp.

00930 {
00931     CRevFile rev = *(*((CLogNodeRev*)Node()));
00932
00933     for(int i = 0; i < (int)mergePair.size(); i++)
00934     {
00935         if( mergePair[i].first == 0L &&  (*(*((CLogNodeRev*)(mergePair[i].second->Node())))).MergePoint() == rev.RevNum() )
00936         {
00937             mergePair[i].first = this;
00938         }
00939     }
00940 }

CSize CWinLogRevData::GetBoundsSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Get the bounds size

Parameters:
dc | Device context
entryInfo | Entry info
Returns:
Bounds size as CSize

Implements CWinLogData.

Definition at line 854 of file GraphView.cpp.

References USIZE::cx, and CWinLogData::IsDiskNode().

00855 {
00856     CLogNodeRev& rev = *(CLogNodeRev*)fNode;
00857     CSize size = dc.GetTextExtent((*rev).RevNum().c_str(), strlen((*rev).RevNum().c_str()));
00858
00859     if( IsDiskNode(entryInfo) )
00860     {
00861         size.cx += 2 + 16 + 2;
00862         size.cy = max(16, size.cy);
00863     }
00864
00865     return size;
00866 }

Here is the call graph for this function:

USize CWinLogRevData::GetBoundsSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Implements CWinLogData.

Definition at line 218 of file UCvsGraph.cpp.

References USIZE::cx, USIZE::cy, UDC::GetTextExtent(), and CWinLogData::IsDiskNode().

00219 {
00220     CLogNodeRev & rev = *(CLogNodeRev *)fNode;
00221     USize size = hdc.GetTextExtent((*rev).RevNum().c_str(),
00222         strlen((*rev).RevNum().c_str()));
00223     if(IsDiskNode(entryInfo))
00224     {
00225         size.cx += 2 + 16 + 2;
00226         size.cy = std::max(16, size.cy);
00227     }
00228     return size;
00229 }

Here is the call graph for this function:

void CWinLogRevData::UpdateSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Draw the node

Parameters:
dc | Device context
entryInfo | Entry info

Implements CWinLogData.

Definition at line 868 of file GraphView.cpp.

References CGraphView::GetImgList(), gGraphDeadNodeColor, gGraphNodeColor, gGraphUserStateNodeColor, URect::Height(), CWinLogData::IsDeadNode(), CWinLogData::IsDiskNode(), CWinLogData::IsUserState(), kRectangle, NULL, CWinLogData::Selected(), CWinLogData::SelfBounds(), STYLE_DEADNODE, and STYLE_USERSTATENODE.

00869 {
00870     CRect txtRect = SelfBounds();
00871
00872     if( IsDiskNode(entryInfo) )
00873     {
00874         txtRect.left += 2 + 16 + 2;
00875     }
00876
00877     // Draw the node
00878     COLORREF contour = gGraphNodeColor;
00879     int penStyle = PS_SOLID;
00880
00881     if( IsDeadNode() )
00882     {
00883         contour = (COLORREF)gGraphDeadNodeColor;
00884         penStyle = STYLE_DEADNODE;
00885     }
00886     else if( IsUserState() )
00887     {
00888         contour = (COLORREF)gGraphUserStateNodeColor;
00889         penStyle = STYLE_USERSTATENODE;
00890     }
00891
00892     ::DrawNode(dc, SelfBounds(), contour, kRectangle, Selected(), penStyle);
00893
00894     // Draw the state icon if it is the rev. of the disk
00895     if( IsDiskNode(entryInfo) )
00896     {
00897         CImageList& list = CGraphView::GetImgList();
00898         CPoint w(SelfBounds().TopLeft());
00899         w.x += 2;
00900         w.y += (SelfBounds().Height() - 16) / 2;
00901
00902         list.Draw(&dc, CBrowseFileView::GetImageForEntry(entryInfo), w, ILD_TRANSPARENT);
00903     }
00904
00905     // Draw the content of the node
00906     TEXTMETRIC tm;
00907     dc.GetTextMetrics(&tm);
00908
00909     CPoint center = txtRect.CenterPoint();
00910     int nCenterX = center.x;
00911     int nCenterY = center.y - tm.tmHeight/2;
00912
00913     CLogNodeRev& rev = *(CLogNodeRev*)fNode;
00914     dc.ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, txtRect,
00915         (*rev).RevNum().c_str(), strlen((*rev).RevNum().c_str()), NULL);
00916 }

Here is the call graph for this function:

void CWinLogRevData::UpdateSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Implements CWinLogData.

Definition at line 231 of file UCvsGraph.cpp.

References URect::CenterPoint(), UDC::DrawBitmap(), UDC::GetTextHeight(), CWinLogData::IsDiskNode(), URECT::left, UDC::TextOutClipped(), URGB, UPOINT::x, and UPOINT::y.

00232 {
00233     URect txtRect = selfB;
00234
00235     if(IsDiskNode(entryInfo))
00236     {
00237         txtRect.left += 2 + 16 + 2;
00238     }
00239
00240     // draw the node
00241     ::DrawNode(hdc, selfB, URGB(0, 0, 255), URGB(0, 0, 0), false, sel);
00242
00243     // draw the state icon if it is the rev. of the disk
00244     if(IsDiskNode(entryInfo))
00245     {
00246         UPoint w(selfB.TopLeft());
00247         w.x += 2;
00248         w.y += (selfB.Height() - 16) / 2;
00249         hdc.DrawBitmap(UCvsFiles::GetImageForEntry(entryInfo), w);
00250     }
00251
00252     // draw the content of the node
00253     UPoint center = txtRect.CenterPoint();
00254     int nCenterX = center.x;
00255     int nCenterY = center.y - hdc.GetTextHeight()/2;
00256     CLogNodeRev & rev = *(CLogNodeRev *)fNode;
00257     hdc.TextOutClipped(nCenterX, nCenterY, &txtRect,
00258             (*rev).RevNum().c_str(), strlen((*rev).RevNum().c_str()));
00259 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/UCvsGraph.h
  • WinCvs/GraphView.h
  • common/UCvsGraph.cpp
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:58:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinLogTagData Class Reference

CWinLogTagData Class Reference

Windows log tag node data. More...

#include <UCvsGraph.h>

Inheritance diagram for CWinLogTagData:

[legend]
Collaboration diagram for CWinLogTagData:

[legend]
List of all members.

Public Member Functions

CWinLogTagData (CLogNode *node)
virtual | ~CWinLogTagData ()
CWinLogTagData (CLogNode *node)
virtual | ~CWinLogTagData ()

Protected Member Functions

virtual void | UpdateSelf (UDC &hdc, EntnodeData *entryInfo)
virtual USize | GetBoundsSelf (UDC &hdc, EntnodeData *entryInfo)
virtual void | UpdateSelf (CDC &dc, EntnodeData *entryInfo)
virtual CSize | GetBoundsSelf (CDC &dc, EntnodeData *entryInfo)

Detailed Description

Windows log tag node data.

Definition at line 104 of file UCvsGraph.h.

Constructor & Destructor Documentation

CWinLogTagData::CWinLogTagData ( CLogNode * node ) [inline]

Definition at line 107 of file UCvsGraph.h.

00107 : CWinLogData(node) {}

virtual CWinLogTagData::~CWinLogTagData ( ) [inline, virtual]

Definition at line 108 of file UCvsGraph.h.

00108 {}

CWinLogTagData::CWinLogTagData ( CLogNode * node ) [inline]

Definition at line 156 of file GraphView.h.

00156 : CWinLogData(node) {}

virtual CWinLogTagData::~CWinLogTagData ( ) [inline, virtual]

Definition at line 157 of file GraphView.h.

00157 {}

Member Function Documentation

CSize CWinLogTagData::GetBoundsSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Get the bounds size

Parameters:
dc | Device context
entryInfo | Entry info
Returns:
Bounds size as CSize

Implements CWinLogData.

Definition at line 945 of file GraphView.cpp.

00946 {
00947     CLogNodeTag& tag = *(CLogNodeTag*)fNode;
00948     return dc.GetTextExtent(*tag, (*tag).length());
00949 }

USize CWinLogTagData::GetBoundsSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Implements CWinLogData.

Definition at line 261 of file UCvsGraph.cpp.

References UDC::GetTextExtent().

00262 {
00263     CLogNodeTag & tag = *(CLogNodeTag *)fNode;
00264     return hdc.GetTextExtent(*tag, (*tag).length());
00265 }

Here is the call graph for this function:

void CWinLogTagData::UpdateSelf | ( | CDC & | dc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Draw the node

Parameters:
dc | Device context
entryInfo | Entry info

Implements CWinLogData.

Definition at line 951 of file GraphView.cpp.

References URect::CenterPoint(), gGraphTagColor, kRoundRect, NULL, CWinLogData::Selected(), and CWinLogData::SelfBounds().

00952 {
00953     // Draw the node
00954     ::DrawNode(dc, SelfBounds(), gGraphTagColor, kRoundRect, Selected());
00955
00956     // Draw the content of the node
00957     TEXTMETRIC tm;
00958     dc.GetTextMetrics(&tm);
00959     CPoint center = SelfBounds().CenterPoint();
00960     int nCenterX = center.x;
00961     int nCenterY = center.y - tm.tmHeight/2;
00962
00963     CLogNodeTag& tag = *(CLogNodeTag*)fNode;
00964     dc.ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, SelfBounds(), *tag, (*tag).length(), NULL);
00965 }

Here is the call graph for this function:

void CWinLogTagData::UpdateSelf | ( | UDC & | hdc,
 |  | EntnodeData * | entryInfo
 | ) | [protected, virtual]

Implements CWinLogData.

Definition at line 267 of file UCvsGraph.cpp.

References UDC::GetTextHeight(), UDC::TextOutClipped(), URGB, UPOINT::x, and UPOINT::y.

00268 {
00269     // draw the node
00270     ::DrawNode(hdc, selfB, URGB(0, 0, 0), URGB(120, 120, 120), true, sel);
00271
00272     // draw the content of the node
00273     UPoint center = selfB.CenterPoint();
00274     int nCenterX = center.x;
00275     int nCenterY = center.y - hdc.GetTextHeight()/2;
00276     CLogNodeTag & tag = *(CLogNodeTag *)fNode;
00277     hdc.TextOutClipped(nCenterX, nCenterY, &selfB,
00278         *tag, (*tag).length());
00279 }

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • common/UCvsGraph.h
  • WinCvs/GraphView.h
  • common/UCvsGraph.cpp
  • WinCvs/GraphView.cpp
Generated on Sat Aug 7 22:58:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinPlacement Class Reference

CWinPlacement Class Reference

Persistent window placement class. More...

#include <MainFrm.h>

Inheritance diagram for CWinPlacement:

[legend]
Collaboration diagram for CWinPlacement:

[legend]
List of all members.

Public Member Functions

CWinPlacement (const char *uniqueName)
virtual | ~CWinPlacement ()
CWinPlacement & | operator= (const WINDOWPLACEMENT &newplace)
WINDOWPLACEMENT | GetPlacement () const
Get the window placement.
bool | IsHasOne () const
Get the allocated memory flag.

Private Member Functions

virtual unsigned int | SizeOf (void) const
Get the size of the data.
virtual const void * | GetData (void) const
Get the data.
virtual void | SetData (const void *ptr, unsigned int size)
Set the data.

Private Attributes

WINDOWPLACEMENT | m_placement
bool m_hasOne

Detailed Description

Persistent window placement class.

Definition at line 40 of file MainFrm.h.

Constructor & Destructor Documentation

CWinPlacement::CWinPlacement ( const char * uniqueName )

Definition at line 71 of file MainFrm.cpp.

References kNoClass, and m_hasOne.

00072     : CPersistent(uniqueName, kNoClass)
00073 {
00074     m_hasOne = false;
00075 }

CWinPlacement::~CWinPlacement ( ) [virtual]

Definition at line 77 of file MainFrm.cpp.

00078 {
00079 }

Member Function Documentation

const void * CWinPlacement::GetData ( void ) const [private, virtual]

Get the data.

Implements CPersistent.

Definition at line 86 of file MainFrm.cpp.

References m_hasOne, and m_placement.

00087 {
00088     return m_hasOne ? &m_placement : 0L;
00089 }

WINDOWPLACEMENT CWinPlacement::GetPlacement ( ) const

Get the window placement.

Definition at line 111 of file MainFrm.cpp.

References m_placement.

Referenced by CMainFrame::InitialShowWindow().

00112 {
00113     return m_placement;
00114 }

bool CWinPlacement::IsHasOne ( ) const

Get the allocated memory flag.

Definition at line 117 of file MainFrm.cpp.

References m_hasOne.

Referenced by CMainFrame::InitialShowWindow().

00118 {
00119     return m_hasOne;
00120 }

CWinPlacement & CWinPlacement::operator= ( const WINDOWPLACEMENT & newplace )

Definition at line 100 of file MainFrm.cpp.

References m_hasOne, m_placement, and CPersistent::TouchTimeStamp().

00101 {
00102     TouchTimeStamp();
00103
00104     memcpy(&m_placement, &newplace, sizeof(WINDOWPLACEMENT));
00105     m_hasOne = true;
00106
00107     return *this;
00108 }

Here is the call graph for this function:

void CWinPlacement::SetData | ( | const void * | ptr,
 |  | unsigned int | size
 | ) | [private, virtual]

Set the data.

Implements CPersistent.

Definition at line 91 of file MainFrm.cpp.

References m_hasOne, and m_placement.

00092 {
00093     if( size == sizeof(WINDOWPLACEMENT) )
00094     {
00095         memcpy(&m_placement, ptr, sizeof(WINDOWPLACEMENT));
00096         m_hasOne = true;
00097     }
00098 }

unsigned int CWinPlacement::SizeOf ( void ) const [private, virtual]

Get the size of the data.

Implements CPersistent.

Definition at line 81 of file MainFrm.cpp.

References m_hasOne.

00082 {
00083     return m_hasOne ? sizeof(WINDOWPLACEMENT) : 0;
00084 }

Member Data Documentation

bool CWinPlacement::m_hasOne [private]

Indicate the memory allocated Definition at line 50 of file MainFrm.h.

Referenced by CWinPlacement(), GetData(), IsHasOne(), operator=(), SetData(), and SizeOf().

WINDOWPLACEMENT CWinPlacement::m_placement [private]

Window placement data Definition at line 49 of file MainFrm.h.

Referenced by GetData(), GetPlacement(), operator=(), and SetData().

The documentation for this class was generated from the following files:
  • WinCvs/MainFrm.h
  • WinCvs/MainFrm.cpp
Generated on Sat Aug 7 22:58:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWinThread Class Reference

CWinThread Class Reference

Inheritance diagram for CWinThread:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/wincvs.cpp
Generated on Sat Aug 7 22:58:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWnd Class Reference

CWnd Class Reference

Inheritance diagram for CWnd:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/CJLib/Include/CJFlatTabCtrl.h
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWndAutoCommand Class Reference

CWndAutoCommand Class Reference

#include <wincvs_winutil.h>

Collaboration diagram for CWndAutoCommand:

[legend]
List of all members.

Public Member Functions

CWndAutoCommand (const CWnd *pWnd, const UINT uiCmd)
virtual | ~CWndAutoCommand ()

Private Attributes

HWND | m_hAutoCommandWnd
UINT | m_uiCmd

Detailed Description

Helper class to automatically issue the command to the given window using WM_COMMAND message
Note:
To be used for refresh purposes after the synchronous command completes

Definition at line 74 of file wincvs_winutil.h.

Constructor & Destructor Documentation

CWndAutoCommand::CWndAutoCommand | ( | const CWnd * | pWnd,
 |  | const UINT | uiCmd
 | ) |

Definition at line 613 of file wincvs_winutil.cpp.

References m_hAutoCommandWnd, and m_uiCmd.

00614 {
00615     m_hAutoCommandWnd = pWnd->GetSafeHwnd();
00616     m_uiCmd = uiCmd;
00617 }

CWndAutoCommand::~CWndAutoCommand ( ) [virtual]

Definition at line 619 of file wincvs_winutil.cpp.

References m_hAutoCommandWnd, and m_uiCmd.

00620 {
00621     ::PostMessage(m_hAutoCommandWnd, WM_COMMAND, (WPARAM)m_uiCmd, (LPARAM)0);
00622 }

Member Data Documentation

HWND CWndAutoCommand::m_hAutoCommandWnd [private]

Window handle to which the command will be send Definition at line 83 of file wincvs_winutil.h.

Referenced by CWndAutoCommand(), and ~CWndAutoCommand().

UINT CWndAutoCommand::m_uiCmd [private]

Command to be send to the window Definition at line 84 of file wincvs_winutil.h.

Referenced by CWndAutoCommand(), and ~CWndAutoCommand().

The documentation for this class was generated from the following files:
  • WinCvs/wincvs_winutil.h
  • WinCvs/wincvs_winutil.cpp
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: CWndRedrawMngr Class Reference

CWndRedrawMngr Class Reference

Class to support efficient drawing of CWnd based windows by managing window's redraw. More...

#include <wincvs_winutil.h>

Collaboration diagram for CWndRedrawMngr:

[legend]
List of all members.

Public Member Functions

CWndRedrawMngr (CWnd *pWnd)
Constructor sets the redraw to FALSE unless overidden by redraw flag.
virtual | ~CWndRedrawMngr ()
Destructor will make sure that Redraw is set to TRUE when object goes out of scope.

Private Attributes

BOOL | m_redraw
CWnd * | m_pWnd

Detailed Description

Class to support efficient drawing of CWnd based windows by managing window's redraw.

Definition at line 59 of file wincvs_winutil.h.

Constructor & Destructor Documentation

CWndRedrawMngr::CWndRedrawMngr ( CWnd * pWnd )

Constructor sets the redraw to FALSE unless overidden by redraw flag.

Definition at line 578 of file wincvs_winutil.cpp.

References m_pWnd, m_redraw, and NULL.

00579 {
00580     ASSERT(pWnd != NULL);
00581     m_pWnd = pWnd;
00582
00583     if( m_pWnd )
00584     {
00585         m_redraw = ::GetWindowLong(m_pWnd->m_hWnd, GWL_USERDATA);
00586         if( !m_redraw )
00587         {
00588             //m_pWnd->LockWindowUpdate();
00589             m_pWnd->SetRedraw(FALSE);
00590             ::SetWindowLong(m_pWnd->m_hWnd, GWL_USERDATA, TRUE);
00591         }
00592     }
00593 }

CWndRedrawMngr::~CWndRedrawMngr ( ) [virtual]

Destructor will make sure that Redraw is set to TRUE when object goes out of scope.

Definition at line 596 of file wincvs_winutil.cpp.

References m_pWnd, and m_redraw.

00597 {
00598     if( m_pWnd )
00599     {
00600         const BOOL redraw = ::GetWindowLong(m_pWnd->m_hWnd, GWL_USERDATA);
00601         if( redraw != m_redraw )
00602         {
00603             //m_pWnd->UnlockWindowUpdate();
00604             m_pWnd->SetRedraw(TRUE);
00605             ::SetWindowLong(m_pWnd->m_hWnd, GWL_USERDATA, m_redraw);
00606         }
00607     }
00608 }

Member Data Documentation

CWnd* CWndRedrawMngr::m_pWnd [private]

Window to manage Definition at line 63 of file wincvs_winutil.h.

Referenced by CWndRedrawMngr(), and ~CWndRedrawMngr().

BOOL CWndRedrawMngr::m_redraw [private]

Redraw state to redraw to Definition at line 62 of file wincvs_winutil.h.

Referenced by CWndRedrawMngr(), and ~CWndRedrawMngr().

The documentation for this class was generated from the following files:
  • WinCvs/wincvs_winutil.h
  • WinCvs/wincvs_winutil.cpp
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: wstring Class Reference

wstring Class Reference

Inheritance diagram for wstring:

[legend]
The documentation for this class was generated from the following file:
  • WinCvs/Win32wstring.hpp
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Hierarchical Index

WinCvs Source Class Hierarchy

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

  • _afxRichEditCookie
  • _dircontents
  • _dirdesc
  • _frameRec
  • _sDiffOptionsItem
  • AFX_DLLVERSIONINFO
  • CAllTargets
  • ansiAttrCvt
    • CTCP2Parse
  • ansiAttrCvt::AnsiSeq
  • AREF
  • aref
  • awidget
  • UBrush
  • CBuffer
  • CButton
    • CCJBrowseButton
  • CButton
    • CCJMetaFileButton
  • CButton
    • CCJColorPicker
  • CButton
    • CCJFlatButton
      • CCJCaptionButton
      • CCJCBarButton
      • CPseudoButton
        • CPseudoRotButton
        • CPseudoToggle
  • CCJMenuData
  • CCJShellTree
    • CMyShellTree
  • CCJSortClass
  • CCJSortClass::CSortItem
  • CCJTreeCtrl::Color_Font
  • CCmdUI
    • CCJToolCmdUI
  • UCmdUI
  • UCOLOR
  • UColor
  • CColorConsole
  • CComboBox
    • CCJComboBoxEx
    • CCJFlatComboBox
    • CCJFontCombo
    • CSmartComboBox
      • CKeywordComboBox
  • CComboBoxEx
    • CHistComboBoxEx
  • CContentItems
  • CControlBar
    • CCJControlBar
      • CBarConsole
      • CCJExplorerBar
      • CCJTabCtrlBar
    • CCJToolBarBase
      • CCJReBar
      • CCJToolBar
        • CCJMenuBar
        • CDynToolBar
  • CCtrlView
    • CCJTabView
  • CCvsConsole
    • CCvsRootConsole
      • CInfoParserConsole
      • CProtocolParserConsole
    • CCvsStreamConsole
      • CRevisionConsole
      • CStreamConsole
    • CGraphConsole
    • CItemListConsole
      • CListParserConsole
      • CModuleParserConsole
      • CTagParserConsole
    • CPyCvsConsole
    • CTCLCvsConsole
  • CCvsProcessData
  • CCvsRootParser
  • CCvsSandboxInfo
  • UDC
  • CDialog
    • CCVSAlert_MAIN
    • CHHelpDialog
      • CAboutDlg
      • CCustomizeMenus
      • CCvsRootDlg
      • CDiff_Options
      • CEditKeywordDlg
      • CEditorMonDlg
      • CFilterMaskOptDlg
      • CFilterSelectionDlg
      • CGraphOptDlg
      • CImportEntry
      • CImportFilterDlg
      • CImportWarning
      • CItemListDlg
      • CNoPython
      • CSaveSettingsDlg
      • CSelectionDetailsDlg
      • CTemplateDlg
      • GetPassword
    • CProgressDlg
    • CPseudoDlg
    • CTipDlg
  • CDiff_Options::CompareInfo
  • direct
  • CDockBar
    • CCJDockBar
    • CCJSizeDockBar
  • CDockContext
    • CCJDockContext
  • Wincvs::Document
  • CDocument
    • CGraphDoc
    • CWincvsDoc
  • DROPDOWNBUTTON
  • CDummyClass
  • DYN_LIST
  • CEdit
    • CCJHexEdit
  • CEdit
    • CCJBrowseEdit
  • CEdit
    • CGfxGroupEdit
  • CEdit
    • CCJMaskEdit
      • CCJDateEdit
        • CCJTimeEdit
  • ENTNODE
  • EntnodeData
    • EntnodeFile
    • EntnodeFolder
  • EntnodePath
  • CFileDialog
    • CMfFileDialog
  • FileEntry
  • CFormView
    • CCJHtmlView
  • CFrameWnd
    • CCJFrameWnd
  • garbyRec
  • CGfxOutBarCtrl::CBarFolder
  • CGfxOutBarCtrl::CBarItem
  • CHARFORMAT
    • CCharFormat
  • CHeaderCtrl
    • CCJFlatHeaderCtrl
    • CSortHeaderCtrl
  • CHHelpSupport
    • CHHelpDialog
    • CHHelpPropertyPage
      • CAdminOption_MAIN
      • CAnnotate_MAIN
      • CCheckout_MAIN
      • CCmdLine_MAIN
      • CCommit_MAIN
      • CCommit_OPTIONS
      • CDiff_MAIN
      • CFileAction_MAIN
      • CGetPrefs_CVS
      • CGetPrefs_CVSCMD_DIALOGS
      • CGetPrefs_GLOBALS
      • CGetPrefs_WINCVS
      • CImport_MAIN
      • CImport_OPTIONS
      • CInit_MAIN
      • CLogFilters
      • CLogin_MAIN
      • CLogMain
      • CMultilineEntryDlg
      • CRelease_MAIN
      • CRtag_MAIN
      • CRtag_OPTIONS
      • CStatus_MAIN
      • CTag_MAIN
      • CUpdateMain
      • CUpdateMerge
      • CUpdateOptions
    • CHHelpPropertySheet
      • COptionalPropertySheet
  • irciiAttrCvt
    • CTCP2Parse
  • ItemDisplayInfo
  • CItemListDlg::CompareInfo
  • ItemRowInfo
  • Wincvs::IWincvs
  • CJX_COLORMAP
  • CJX_CONTROLPOS
  • CKeyString
  • KeywordDisplayInfo
  • KeywordInfo
  • keywordMode
  • KiColumn
    • KoConflictColumn
    • KoDateColumn
    • KoEncodingColumn
    • KoExtColumn
    • KoNameColumn
    • KoOptionColumn
    • KoPathColumn
    • KoRevisionColumn
    • KoStateColumn
    • KoTagColumn
  • KiColumnModel
    • KoRecursiveModel
    • KoRegularModel
  • KiFilterBase
    • KiFilterModel
      • KoFilterModel
    • KiIgnoreModel
      • KoIgnoreModel
    • KiRecursionModel
      • KoRecursionModel
  • KiSelectionHandler
    • KoAddBinaryHandler
    • KoAddHandler
    • KoAddUnicodeHandler
    • KoAnnotateHandler
    • KoCancelChangesHandler
    • KoCheckoutHandler
    • KoCommandLineHandler
    • KoCommitHandler
    • KoDiffHandler
    • KoEditorsHandler
    • KoFileActionHandler
    • KoFileRemoveHandler
    • KoGraphAnnotateHandler
    • KoGraphDiffHandler
    • KoGraphHandler
    • KoImportHandler
    • KoLockHandler
    • KoLogHandler
    • KoMoveToTrashHandler
    • KoQueryUpdateHandler
    • KoReleaseHandler
    • KoStatusHandler
    • KoUneditHandler
    • KoUnlockHandler
    • KoUpdateHandler
    • KoUpdateMoveToTrashHandler
    • KoWatchersHandler
    • KoWatchOffHandler
    • KoWatchOnHandler
    • TEditHandler< editType >
    • TLaunchHandler< lauchType >
    • TRtagHandler< tagType >
    • TTagHandler< tagType >
  • KoColumnContext
  • KoFileViewTraversalContext
  • KoFilterMask
  • KoTraversalContext
  • KoWatcher
  • LAttachment
    • LMainPseudoAttachment
    • LPseudoDrawAttachment
    • LPseudoWinAttachment
    • UPseudoPageHider
  • LBevelButton
    • UPseudoRotButton
  • LCommander
    • CMacBinTable
  • ULIST_INFO
  • ULIST_INSERT
  • CListBox
    • CCJListBox
    • CCJOutlookBar
  • CListCtrl
    • CPseudoList
  • CListCtrl
    • CCJListCtrl
  • CListView
    • CBrowseFileView
    • CCJListView
  • LListener
    • LPseudoWinAttachment
    • UPseudoPageHider
    • UPseudoPlaceHolder
  • CLogNodeData
    • CWinLogData
      • CWinLogBranchData
      • CWinLogBranchData
      • CWinLogHeaderData
      • CWinLogHeaderData
      • CWinLogRevData
      • CWinLogRevData
      • CWinLogTagData
      • CWinLogTagData
    • CWinLogData
  • LOutlineItem
    • CMacBinItem
    • CPseudoItem
  • LOutlineTable
    • CMacBinTable
  • LPane
    • UPseudoFakePane
  • LPeriodical
    • LMainPseudoAttachment
  • LPlaceHolder
    • UPseudoPlaceHolder
  • MACBINMAP
  • MACBINMAPENTRIES
  • MacBinMaps
  • CMacroEntry
  • CMacroSet
  • CMapPtrToPtr
    • CSubclassWndMap
  • match_dir
  • CMDIChildWnd
    • CCJMDIChildWnd
      • CGraphFrame
      • CLogFrame
  • CMDIFrameWnd
    • CCJMDIFrameWnd
      • CMainFrame
  • CMemFile
    • CCJMemFile
  • CMenu
    • CCJMenu
    • CColorMenu
  • UMessageMapFunctions
  • CMiniDockFrameWnd
    • CCJMiniDockFrameWnd
  • mircAttrCvt
    • CTCP2Parse
  • CMsg
  • UMSGMAP
  • UMSGMAP_ENTRY
  • MultiFiles
  • MultiFilesEntry
  • MultiFilesEntryIndex
  • CMultiLineEditDialogKeyHelper
  • NotificationManager
  • NotificationManager::Node
  • CObject
    • CCJStatusBarPane
    • CCJStatusBarPaneControlInfo
    • CSubclassWnd
      • CCJMenuBarFrameHook
  • UObject
    • CPersistent
      • CMMenuString
      • CPersistentT< T >
      • CPersistentT< bool >
        • CPersistentBool
      • CPersistentT< int >
        • CPersistentInt
      • CWinPlacement
      • PCPStr
      • PCStr
      • TMPersistent< T >
      • TMString< T >
      • TMString< UPStr >
        • CMPString
      • TMString< UStr >
        • CMString
          • TKeyString< delimiter >
          • TKeyString<'\x01'>
            • CMKeyString
    • UCmdTarget
      • UWidget
        • UCvsApp
        • UCvsConsole
        • UCvsFiles
        • UCvsFolders
        • UCvsFrame
        • UCvsGraph
        • UCvsStatusbar
        • UMenu
          • UCvsMenubar
          • UMacAppMenu
          • UPPMenu
        • UPromptMessage
          • UEditMessage
        • UToolbar
          • UCvsToolbar
  • ColorTableEntry
  • ColumnIndex
  • option
  • OUTBAR_INFO
  • CPathBuffer
  • UPen
  • CPersistent::CPersistentEntry
  • UPOINT
    • UPoint
  • poolRec
  • CProgress
  • CPropertyPage
    • CHHelpPropertyPage
  • CPropertySheet
    • CHHelpPropertySheet
  • UPseudoCmdStatusWrapper
  • UPStr
    • PCPStr
  • PyAutoObject< T >
  • PyCmdUI::obj_t
  • PyColorConsole::obj_t
  • PyContainer
    • PyCmdUI
    • PyColorConsole
    • PyCvsEntry
    • PyMenuMgr
    • PyPersistent
  • PyCvsEntry::obj_t
  • PyMenuMgr::obj_t
  • PyPersistent::obj_t
  • PyRegistry
  • CPython_Interp
  • CPyThreadState
  • URECT
    • URect
  • CRectTracker
    • CGraphRectTracker
  • CRecursionLock
  • ReportConflict
  • ReportWarning
  • CRichEditView
    • CWincvsView
  • URuntimeClass
  • CScrollView
    • CGraphView
  • CSelectionChangeNotifier
  • CSelectionDetailsDlg::CompareInfo
  • SelectionDisplayInfo
  • USemaphore
  • USIZE
    • USize
  • USLIDER
  • USmartCombo
    • CHistComboBoxEx
    • CSmartComboBox
  • CSortList< T >
  • CSortParam
  • CSplitterWnd
    • CCJFlatSplitterWnd
    • CGfxSplitterWnd
  • stat
  • CStatic
    • CColorStatic
  • CStatic
    • CCJHyperLink
  • CStatic
    • CPseudoDraw
  • CStatic
    • CCJCaption
  • CStaticAllocT< T >
  • CStaticAllocT< char >
  • CStatusBar
    • CCJStatusBar
    • CCvsStatusBar
  • UStr
    • PCStr
  • CTabCtrl
    • CCJTabCtrl
  • TAdorner
    • TPseudoWinAdorner
  • tagCTV_ITEM
  • tagMENUITEMINFOA
    • CMenuItemInfo
  • tagTCB_ITEM
  • UTB_BUTTON
  • UTB_DROPDOWN
  • UTB_INIT
  • TBehavior
    • TPseudoAppBehavior
    • TPseudoWinBehavior
  • TbEntry
    • TbEntryButton
      • TbEntryChkButton
    • TbEntryDropDown
    • TbEntrySeparator
  • CTcl_Interp
  • CTCLBrowserEnt
  • CTCP2Parse::RGBColor
  • TEditText
    • TPseudoDoubleNumberText
  • CTempToggleBool
  • TGraph
    • TGraphCmdStatus
    • TGraphCurSelector
    • TGraphDelCmd
    • TGraphRectSelect
    • TGraphSelNonSig
  • TIconButton
    • TPseudoIconButton
      • TPseudoRotateIconButton
  • TIconCheckBox
    • TPseudoIconCheckBox
  • TIconPopup
    • TPseudoIconPopup
  • UTimer
  • CTmpFiles
  • CToolBarCtrl
    • CCJToolBarCtrl
  • CToolBarData
  • TOOLBARINFO
  • TPopup
    • TBuggyPopup
  • TraversalReport
    • CFillPyEntries
    • CFillTclEntries
    • CFindSettings
    • ImportReport
    • LSReport
    • MacroTraversal
    • TBrowserFill
    • TBrowserFill
    • TBrowserFillDummy
    • TBrowserFillDummy
    • TViewFill
    • TViewFill
  • UTREE_INFO
  • UTREE_INSERT
  • CTreeCtrl
    • CCJTreeCtrl
  • CTreeView
    • CWinCvsBrowser
  • TScrollBar
    • TPseudoScrollBar
  • TTextListView
    • TPseudoTextListView
  • CTurnOffDispatching
  • TView
    • TPseudoCustomView
  • CustInvertTable
  • vector
    • CCustInvertTable
  • CView
    • CBrowserBar
    • CExploreBar
  • CViewInfo
  • CvsAlert
  • CvsArgs
    • ControlCvsArgs
      • AddBinCvsArgs
      • AddCvsArgs
      • AddUnicodeCvsArgs
    • RemoveCvsArgs
  • CvsPrefs
  • UWaitCursor
  • CWinApp
    • CWincvsApp
  • WINDOWPLACEMENT
    • CCJWindowPlacement
  • WININFO
  • CWinThread
    • CLogoutThread
  • CWnd
    • CCJLogoPane
  • CWnd
    • CCJColorPopup
  • CWnd
    • CCJMonthCalCtrl
  • CWnd
    • CCJCaptionPopupWnd
  • CWnd
    • CGfxOutBarCtrl
  • CWnd
    • CCJReBarCtrl
  • CWnd
    • CCJPagerCtrl
  • CWnd
    • CSplashWnd
  • CWnd
    • CCJDateTimeCtrl
  • CWnd
    • CCJFlatTabCtrl
  • CWndAutoCommand
  • CWndRedrawMngr
  • wstring
    • Win32wstring
  • bool
  • char *
  • int
  • size_t
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: bool Class Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

bool Class Reference

The documentation for this class was generated from the following files:
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: char * Class Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

char * Class Reference

The documentation for this class was generated from the following files:
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: int Class Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

int Class Reference

The documentation for this class was generated from the following files:
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: size_t Class Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

size_t Class Reference

The documentation for this class was generated from the following files:
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class Members

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Properties | Related Functions
_ | a | b | c | d | e | f | g | h | i | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | ~

Here is a list of all class members with links to the classes they belong to:

- _ -

  • _AddBar() : CCJReBar
  • _AddButton() : PyMenuMgr
  • _AddPulldown() : PyMenuMgr
  • _AddSeparator() : PyMenuMgr
  • _AddToggle() : PyMenuMgr
  • _afxRichEditCookie() : _afxRichEditCookie
  • _Count() : PyMenuMgr
  • _d_entry : _dircontents
  • _d_next : _dircontents
  • _Delete() : PyMenuMgr
  • _DeleteByCmd() : PyMenuMgr
  • _Enable() : PyCmdUI
  • _GetBaseClass() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, CPersistentInt, CPersistentBool, CPersistent, CMPString, CMString, PCStr, PCPStr, UEditMessage, UPromptMessage, UWidget, UToolbar, UObject, UMenu, UCmdTarget, UMacAppMenu
  • _GetValue() : PyPersistent
  • _in : ansiAttrCvt
  • _messageEntries : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • _notOf : ansiAttrCvt::AnsiSeq
  • _params : ansiAttrCvt::AnsiSeq
  • _Print() : PyColorConsole
  • _seq : ansiAttrCvt, ansiAttrCvt::AnsiSeq
  • _SetCheck() : PyCmdUI
  • _SetText() : PyCmdUI
  • _SetValue() : PyPersistent
  • _verb : ansiAttrCvt::AnsiSeq

- a -

  • ActionBrowseModule() : CMultilineEntryDlg
  • ActionBrowseTag() : CMultilineEntryDlg
  • ActionFormatCvsRoot() : CMultilineEntryDlg
  • ActionOpenEditor() : CMultilineEntryDlg
  • ActionOpenTemplate() : CMultilineEntryDlg
  • ActivateBrowserView() : CWincvsApp
  • ActivateSelf() : UPseudoFakePane
  • AdaptToSuperFrameSize() : UPseudoFakePane
  • add() : MultiFilesEntry, CvsArgs
  • Add() : CSubclassWndMap, CMacroSet
  • AddAction() : CMultilineEntryDlg
  • AddBar() : CCJReBar
  • AddBitmapToImageList() : CCJMenu
  • AddButton() : PyMenuMgr
  • AddButtons() : CCJToolBar
  • AddColumn() : CCJListView, CCJListCtrl
  • AddColumns() : CBrowseFileView
  • AddControl() : CCJStatusBar, CvsPrefs
  • AddDropDownButton() : CCJToolBar
  • AddEntry() : MacBinMaps
  • addfile() : RemoveCvsArgs, ControlCvsArgs, CvsArgs
  • AddFolder() : CGfxOutBarCtrl
  • AddFolderBar() : CGfxOutBarCtrl
  • AddFromToolBar() : CCJMenu
  • AddIndicator() : CCJStatusBar
  • AddListener() : UWidget
  • AddPage() : UWidget
  • AddPattern() : ReportConflict
  • AddPulldown() : PyMenuMgr
  • AddReplaceBitmap() : CCJToolBar
  • AddSeparator() : PyMenuMgr
  • AddString() : CHistComboBoxEx, CCJComboBoxEx
  • AddStrings() : CCJToolBar
  • AddTimer() : UWidget
  • AddToggle() : PyMenuMgr
  • AddTooltip() : UWidget
  • AddToolTip() : CCJTabCtrlBar
  • AddView() : CCJTabView, CCJTabCtrlBar
  • AddWarning() : ReportWarning
  • AdjustSize() : CStaticAllocT< T >
  • AlwaysUseCvsroot() : CvsPrefs
  • AnimateFolderScroll() : CGfxOutBarCtrl
  • ansi2ctcp() : ansiAttrCvt
  • AnsiSeq() : ansiAttrCvt::AnsiSeq
  • append() : CBuffer
  • Append() : CCJMemFile
  • AppendColorMenuItem() : CColorMenu
  • AppendMenuA() : CCJMenu
  • AppendMenuW() : CCJMenu
  • AppendODMenuA() : CCJMenu
  • AppendODMenuW() : CCJMenu
  • AppendODPopupMenuA() : CCJMenu
  • AppendODPopupMenuW() : CCJMenu
  • aref() : aref
  • arFolder : CGfxOutBarCtrl
  • Argc() : CvsArgs
  • argc : CvsArgs
  • Argv() : CvsArgs
  • argv : CvsArgs
  • arItems : CGfxOutBarCtrl::CBarFolder
  • AskForQuitting() : UCvsFrame
  • AssociateImageIndexWithRuntimeClass() : CCJTabCtrlBar
  • AutoDropWidth : USmartCombo
  • AutoSaveColumns() : CCJListView, CCJListCtrl
  • AutoSize() : CCJToolBar
  • AutoSizeColumn() : CCJListView, CCJListCtrl
  • awidget() : awidget

- b -

  • b : UCOLOR, UColor
  • B : CTCP2Parse::RGBColor
  • bDownArrow : CGfxOutBarCtrl
  • bDownPressed : CGfxOutBarCtrl
  • BeforeNavigate2() : CCJHtmlView
  • BeforeUpdateUI() : UWidget
  • begin() : TMString< T >, MultiFiles
  • BeginDrag() : CCJReBarCtrl
  • bEscapeKey : CGfxGroupEdit
  • bg : CTCP2Parse
  • bgColorMap : ansiAttrCvt
  • bgDef : CTCP2Parse
  • bgLast : CTCP2Parse
  • bitmap : CCJMenuData, awidget, AREF
  • Black : CTCP2Parse
  • blink : ansiAttrCvt
  • blinkCnt : CTCP2Parse
  • blinkLast : CTCP2Parse
  • bLooping : CGfxOutBarCtrl
  • Blue : CTCP2Parse
  • bNoDown : CGfxGroupEdit
  • bold : UCvsConsole, ansiAttrCvt
  • boldCnt : CTCP2Parse
  • boldLast : CTCP2Parse
  • bottom : URECT
  • BottomRight() : URect
  • Bounds() : CWinLogData
  • bPressedHighlight : CGfxOutBarCtrl
  • brdrAllRaised : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatAll : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatBottom : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatHorizontal : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatLeft : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatRight : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatTop : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatVertical : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • Browser() : CvsPrefs
  • btns : UTB_DROPDOWN
  • btnText : TOOLBARINFO
  • bTRACE : CCJMenuBar
  • BuildColumns() : CCJListView, CCJListCtrl
  • bUpArrow : CGfxOutBarCtrl
  • bUpPressed : CGfxOutBarCtrl
  • bWhiteLine : CGfxSplitterWnd

- c -

  • c_bShowSplashWnd : CSplashWnd
  • c_pSplashWnd : CSplashWnd
  • c_str() : UStr, UPStr
  • CAboutDlg() : CAboutDlg
  • CACHE_INTERVAL : TGraphCurSelector
  • CAdminOption_MAIN() : CAdminOption_MAIN
  • CalcDroppedWidth() : CHistComboBoxEx, CSmartComboBox, USmartCombo
  • CalcDynamicLayout() : CCJToolBar, CCJSizeDockBar, CCJReBar, CCJControlBar
  • CalcFixedLayout() : CCJToolBar, CCJReBar, CCJMenuBar, CCJDockBar
  • CalcImageSize() : CGraphView, UCvsGraph
  • CalcInsideRect() : CCJToolBarBase
  • CalcLayout() : CCJToolBar
  • CalcPos() : CCJHexEdit
  • CalcSize() : CCJToolBar
  • CalcSizeBarLayout() : CCJSizeDockBar
  • CalcViewRect() : CCJTabView
  • CalcWndTextSize() : CCVSAlert_MAIN
  • CallInitValues() : PyRegistry
  • CAllTargets() : CAllTargets
  • CancelMenuAndTrackNewOne() : CCJMenuBar
  • CanContinue() : UCmdUI
  • CanDockDockBar() : CCJDockContext
  • CAnnotate_MAIN() : CAnnotate_MAIN
  • CanPaste() : CWincvsView
  • CBarConsole() : CBarConsole
  • CBarFolder() : CGfxOutBarCtrl::CBarFolder
  • CBarItem() : CGfxOutBarCtrl::CBarItem
  • CBrowseFileView() : CBrowseFileView
  • CBrowserBar() : CBrowserBar
  • cbSize : AFX_DLLVERSIONINFO
  • CBuffer() : CBuffer
  • CCharFormat() : CCharFormat
  • CCheckout_MAIN() : CCheckout_MAIN
  • CCJBrowseButton() : CCJBrowseButton
  • CCJBrowseEdit() : CCJBrowseEdit
  • CCJCaption() : CCJCaption
  • CCJCaptionPopupWnd() : CCJCaptionPopupWnd
  • CCJColorPicker() : CCJColorPicker
  • CCJColorPopup() : CCJColorPopup
  • CCJComboBoxEx() : CCJComboBoxEx
  • CCJControlBar() : CCJControlBar
  • CCJDateEdit() : CCJDateEdit
  • CCJDateTimeCtrl() : CCJDateTimeCtrl
  • CCJDockBar() : CCJDockBar
  • CCJDockContext() : CCJDockContext
  • CCJExplorerBar() : CCJExplorerBar
  • CCJFlatButton() : CCJFlatButton
  • CCJFlatComboBox() : CCJFlatComboBox
  • CCJFlatHeaderCtrl() : CCJFlatHeaderCtrl
  • CCJFlatSplitterWnd() : CCJFlatSplitterWnd
  • CCJFlatTabCtrl() : CCJFlatTabCtrl
  • CCJFontCombo() : CCJFontCombo
  • CCJFrameWnd() : CCJFrameWnd
  • CCJHexEdit() : CCJHexEdit
  • CCJHtmlView() : CCJHtmlView
  • CCJHyperLink() : CCJHyperLink
  • CCJListBox() : CCJListBox
  • CCJListCtrl() : CCJListCtrl
  • CCJListView() : CCJListView
  • CCJLogoPane() : CCJLogoPane
  • CCJMaskEdit() : CCJMaskEdit
  • CCJMDIChildWnd() : CCJMDIChildWnd
  • CCJMDIFrameWnd() : CCJMDIFrameWnd
  • CCJMemFile() : CCJMemFile
  • CCJMenu() : CCJMenu
  • CCJMenuBar() : CCJMenuBar
  • CCJMenuBarFrameHook() : CCJMenuBarFrameHook
  • CCJMenuData() : CCJMenuData
  • CCJMetaFileButton() : CCJMetaFileButton
  • CCJMiniDockFrameWnd() : CCJMiniDockFrameWnd
  • CCJMonthCalCtrl() : CCJMonthCalCtrl
  • CCJOutlookBar() : CCJOutlookBar
  • CCJPagerCtrl() : CCJPagerCtrl
  • CCJReBar() : CCJReBar
  • CCJReBarCtrl() : CCJReBarCtrl
  • CCJSizeDockBar() : CCJSizeDockBar
  • CCJSortClass() : CCJSortClass
  • CCJStatusBar() : CCJStatusBar
  • CCJStatusBarPane() : CCJStatusBarPane
  • CCJStatusBarPaneControlInfo() : CCJStatusBarPaneControlInfo
  • CCJTabCtrl() : CCJTabCtrl
  • CCJTabCtrlBar() : CCJTabCtrlBar
  • CCJTabView() : CCJTabView
  • CCJTimeEdit() : CCJTimeEdit
  • CCJToolBar() : CCJToolBar
  • CCJToolBarBase() : CCJToolBarBase
  • CCJToolBarCtrl() : CCJToolBarCtrl
  • CCJTreeCtrl() : CCJTreeCtrl
  • CCJWindowPlacement() : CCJWindowPlacement
  • CCmdLine_MAIN() : CCmdLine_MAIN
  • CColorConsole() : CColorConsole
  • CColorMenu() : CColorMenu
  • CColorStatic() : CColorStatic
  • CCommit_MAIN() : CCommit_MAIN
  • CCommit_OPTIONS() : CCommit_OPTIONS
  • CContentItems() : CContentItems
  • CCustInvertTable() : CCustInvertTable
  • CCustomizeMenus() : CCustomizeMenus
  • CCVSAlert_MAIN() : CCVSAlert_MAIN
  • CCvsProcessData() : CCvsProcessData
  • CCvsRootConsole() : CCvsRootConsole
  • CCvsRootDlg() : CCvsRootDlg
  • CCvsSandboxInfo() : CCvsSandboxInfo
  • CCvsStatusBar() : CCvsStatusBar
  • CCvsStreamConsole() : CCvsStreamConsole
  • CDiff_MAIN() : CDiff_MAIN
  • CDiff_Options() : CDiff_Options
  • CDummyClass() : CDummyClass
  • CDynToolBar() : CDynToolBar
  • CEditKeywordDlg() : CEditKeywordDlg
  • CEditorMonDlg() : CEditorMonDlg
  • CenterPoint() : URect
  • CExploreBar() : CExploreBar
  • CFileAction_MAIN() : CFileAction_MAIN
  • CFillPyEntries() : CFillPyEntries
  • CFillTclEntries() : CFillTclEntries
  • CFilterMaskOptDlg() : CFilterMaskOptDlg
  • CFilterSelectionDlg() : CFilterSelectionDlg
  • CFindSettings() : CFindSettings
  • CGetPrefs_CVS() : CGetPrefs_CVS
  • CGetPrefs_CVSCMD_DIALOGS() : CGetPrefs_CVSCMD_DIALOGS
  • CGetPrefs_GLOBALS() : CGetPrefs_GLOBALS
  • CGetPrefs_WINCVS() : CGetPrefs_WINCVS
  • CGfxGroupEdit() : CGfxGroupEdit
  • CGfxOutBarCtrl() : CGfxOutBarCtrl
  • CGfxSplitterWnd() : CGfxSplitterWnd
  • CGraphConsole() : CGraphConsole
  • CGraphDoc() : CGraphDoc
  • CGraphFrame() : CGraphFrame
  • CGraphOptDlg() : CGraphOptDlg
  • CGraphRectTracker() : CGraphRectTracker
  • CGraphView() : CGraphView
  • ChangeLocation() : CMainFrame
  • ChangeSelection() : CCJColorPopup
  • CharSpacingType : CTCP2Parse
  • Check() : UCmdUI
  • CheckButton() : CCJToolBar
  • CheckChanges() : CBrowseFileView
  • CheckChar() : CCJMaskEdit
  • CheckIn() : NotificationManager
  • checkmaps : CCJMenu
  • checkmapsshare : CCJMenu
  • CheckOut() : NotificationManager
  • CheckoutRO() : CvsPrefs
  • CheckSettings() : CItemListDlg
  • CheckTextColor() : CCJColorPicker
  • CheckWindowSize() : LPseudoWinAttachment
  • CHHelpDialog() : CHHelpDialog
  • CHHelpPropertyPage() : CHHelpPropertyPage
  • CHHelpPropertySheet() : CHHelpPropertySheet
  • CHHelpSupport() : CHHelpSupport
  • child : UTREE_INFO
  • CHistComboBoxEx() : CHistComboBoxEx
  • CImport_MAIN() : CImport_MAIN
  • CImport_OPTIONS() : CImport_OPTIONS
  • CImportEntry() : CImportEntry
  • CImportFilterDlg() : CImportFilterDlg
  • CImportWarning() : CImportWarning
  • CInfoParserConsole() : CInfoParserConsole
  • CInit_MAIN() : CInit_MAIN
  • cItem : CGfxOutBarCtrl::CBarItem
  • CItemListConsole() : CItemListConsole
  • CItemListDlg() : CItemListDlg
  • CKeyString() : CKeyString
  • CKeywordComboBox() : CKeywordComboBox
  • class_ID : CMacBinTable, UPseudoPageHider, UPseudoPlaceHolder, UPseudoRotButton
  • classCMPString : CMPString
  • classCMString : CMString
  • classCPersistent : CPersistent
  • classCPersistentBool : CPersistentBool
  • classCPersistentInt : CPersistentInt
  • classPCPStr : PCPStr
  • classPCStr : PCStr
  • classUCmdTarget : UCmdTarget
  • classUCvsApp : UCvsApp
  • classUCvsConsole : UCvsConsole
  • classUCvsFiles : UCvsFiles
  • classUCvsFolders : UCvsFolders
  • classUCvsFrame : UCvsFrame
  • classUCvsGraph : UCvsGraph
  • classUCvsMenubar : UCvsMenubar
  • classUCvsStatusbar : UCvsStatusbar
  • classUCvsToolbar : UCvsToolbar
  • classUEditMessage : UEditMessage
  • classUMacAppMenu : UMacAppMenu
  • classUMenu : UMenu
  • classUObject : UObject
  • classUPromptMessage : UPromptMessage
  • classUToolbar : UToolbar
  • classUWidget : UWidget
  • Clear() : CPathBuffer, CGraphDoc, CCvsRootParser
  • clear() : UStr, UPStr
  • ClearAll() : KoFilterModel
  • ClearFilters() : CMainFrame
  • ClearSelection() : CCJTreeCtrl
  • CListParserConsole() : CListParserConsole
  • CLogFilters() : CLogFilters
  • CLogFrame() : CLogFrame
  • CLogin_MAIN() : CLogin_MAIN
  • CLogMain() : CLogMain
  • CLogoutThread() : CLogoutThread
  • Close() : CCJMemFile
  • ClosePythonSupport() : CPython_Interp
  • CMacBinItem() : CMacBinItem
  • CMacBinTable() : CMacBinTable
  • CMacroEntry() : CMacroEntry
  • CMacroSet() : CMacroSet
  • CMainFrame() : CMainFrame
  • cmd : CustInvertTable, awidget, UTB_BUTTON
  • CMenuItemInfo() : CMenuItemInfo
  • CMfFileDialog() : CMfFileDialog
  • CMKeyString() : CMKeyString
  • CMMenuString() : CMMenuString
  • CModuleParserConsole() : CModuleParserConsole
  • CMPString() : CMPString
  • CMsg() : CMsg
  • CMString() : CMString
  • CMultiLineEditDialogKeyHelper() : CMultiLineEditDialogKeyHelper
  • CMultilineEntryDlg() : CMultilineEntryDlg
  • cName : CGfxOutBarCtrl::CBarFolder
  • CNoPython() : CNoPython
  • cnt : AREF
  • col : UCvsConsole, ULIST_INFO, ULIST_INSERT
  • CollectMergePointPairPass1() : CWinLogData
  • CollectMergePointPairPass1Self() : CWinLogRevData, CWinLogData
  • CollectMergePointPairPass2() : CWinLogData
  • CollectMergePointPairPass2Self() : CWinLogRevData, CWinLogData
  • color : CCJTreeCtrl::Color_Font
  • ColorType : CTCP2Parse
  • ColumnIndex() : ColumnIndex
  • CommandToIndex() : CCJToolBar
  • compare() : UStr
  • Compare() : CCJSortClass, CMKeyString, TKeyString< delimiter >, TMString< T >, ENTNODE, EntnodeData, KiColumn, KoConflictColumn, KoDateColumn, KoTagColumn, KoStateColumn, KoEncodingColumn, KoOptionColumn, KoRevisionColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • CompareItems() : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • CompareRevisions() : KoRevisionColumn
  • ComputeBounds() : CWinLogData
  • ComputeMenuTrackPoint() : CCJMenuBar
  • Concatenate() : TKeyString< delimiter >
  • conflicts : ImportReport
  • ConsoleFont() : CvsPrefs
  • const_iterator : MultiFiles
  • construct_() : TGraphCurSelector
  • ControlCvsArgs() : ControlCvsArgs
  • convert() : Win32wstring
  • cookie : MACBINMAPENTRIES
  • COptionalPropertySheet() : COptionalPropertySheet
  • CopyRect() : URect
  • CopyReturn() : PyAutoObject< T >
  • CopyRow() : CCJListView, CCJListCtrl
  • Count() : PyMenuMgr
  • cp : CTCP2Parse
  • CPathBuffer() : CPathBuffer
  • cpDef : CTCP2Parse
  • CPersistent() : CPersistent
  • CPersistentBool() : CPersistentBool
  • CPersistentInt() : CPersistentInt
  • CPersistentT() : CPersistentT< T >
  • cpLast : CTCP2Parse
  • CProgress() : CProgress
  • CProgressDlg() : CProgressDlg
  • CProtocolParserConsole() : CProtocolParserConsole
  • CPseudoButton() : CPseudoButton
  • CPseudoDlg() : CPseudoDlg
  • CPseudoDraw() : CPseudoDraw
  • CPseudoItem() : CPseudoItem
  • CPseudoList() : CPseudoList
  • CPseudoRotButton() : CPseudoRotButton
  • CPseudoToggle() : CPseudoToggle
  • CPyCvsConsole() : CPyCvsConsole
  • CPython_Interp() : CPython_Interp
  • CPyThreadState() : CPyThreadState
  • cr3dFace : CGfxOutBarCtrl
  • crBackGroundColor : CGfxOutBarCtrl
  • crBackGroundColor1 : CGfxOutBarCtrl
  • crColor : ColorTableEntry
  • crDkShadowBorder : CGfxOutBarCtrl
  • Create() : CWinCvsBrowser, CSplashWnd, CMultilineEntryDlg, CMultiLineEditDialogKeyHelper, CExploreBar, CGfxOutBarCtrl, CCJToolBarCtrl, CCJToolBar, CCJTabCtrl, CCJReBarCtrl, CCJReBar, CCJPagerCtrl, CCJMiniDockFrameWnd, CCJMenuBar, CCJLogoPane, CCJHtmlView, CCJHexEdit, CCJExplorerBar, CCJMonthCalCtrl, CCJDateTimeCtrl, CCJControlBar, CCJComboBoxEx, CCJColorPopup, CCJCaptionPopupWnd, CCJCaption, CCJBrowseButton, CBrowserBar, SelectionDisplayInfo, PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry, CProgressDlg, ItemDisplayInfo, KeywordDisplayInfo
  • CreateAddressCaret() : CCJHexEdit
  • CreateEditCaret() : CCJHexEdit
  • CreateEx() : CCJToolBar, CCJMenuBar
  • CreateHelpIDsData() : CHHelpSupport
  • CreateLocationCombo() : CMainFrame
  • CreateNewData() : CWinLogData
  • CreateObject() : UObject, URuntimeClass
  • CreatePen() : UPen
  • CreateSolidBrush() : UBrush
  • CreateStatusBar() : CMainFrame
  • CreateTabFont() : CCJFlatTabCtrl
  • CreateTabListItem() : CCJTabCtrlBar
  • CreateTabView() : CCJTabCtrlBar
  • CreateToolbar() : CMainFrame
  • CreateToolTips() : CCJColorPopup
  • CRecursionLock() : CRecursionLock
  • CRelease_MAIN() : CRelease_MAIN
  • CRevisionConsole() : CRevisionConsole
  • crHilightBorder : CGfxOutBarCtrl
  • crLightBorder : CGfxOutBarCtrl
  • crShadowBorder : CGfxOutBarCtrl
  • CRtag_MAIN() : CRtag_MAIN
  • CRtag_OPTIONS() : CRtag_OPTIONS
  • crTextColor : CGfxOutBarCtrl
  • CSaveSettingsDlg() : CSaveSettingsDlg
  • CSelectionChangeNotifier() : CSelectionChangeNotifier
  • CSelectionDetailsDlg() : CSelectionDetailsDlg
  • CSmartComboBox() : CSmartComboBox
  • CSortHeaderCtrl() : CSortHeaderCtrl
  • CSortItem() : CCJSortClass::CSortItem
  • CSortList() : CSortList< T >
  • CSortParam() : CSortParam
  • CSplashWnd() : CSplashWnd
  • CStaticAllocT() : CStaticAllocT< T >
  • CStatus_MAIN() : CStatus_MAIN
  • CStreamConsole() : CStreamConsole
  • CSubclassWnd() : CSubclassWnd
  • CSubclassWndMap() : CSubclassWndMap
  • CTag_MAIN() : CTag_MAIN
  • CTagParserConsole() : CTagParserConsole
  • CTcl_Interp() : CTcl_Interp
  • CTCLBrowserEnt() : CTCLBrowserEnt
  • CTCLCvsConsole() : CTCLCvsConsole
  • CTCP2Parse() : CTCP2Parse
  • CTemplateDlg() : CTemplateDlg
  • CTempToggleBool() : CTempToggleBool
  • cText : OUTBAR_INFO
  • CTipDlg() : CTipDlg
  • CtlColor() : CCJHyperLink
  • CTmpFiles() : CTmpFiles
  • CtrlPressedOnOK() : CvsPrefs
  • CTurnOffDispatching() : CTurnOffDispatching
  • CUpdateMain() : CUpdateMain
  • CUpdateMerge() : CUpdateMerge
  • CUpdateOptions() : CUpdateOptions
  • current : DYN_LIST, TbEntryDropDown
  • currRev : FileEntry
  • Customize() : CCJToolBar
  • cvs_err() : CGraphConsole, CTCLCvsConsole, CPyCvsConsole, CItemListConsole, CCvsRootConsole, CCvsStreamConsole, CCvsConsole
  • cvs_out() : CGraphConsole, CTCLCvsConsole, CPyCvsConsole, CItemListConsole, CCvsRootConsole, CCvsStreamConsole, CCvsConsole
  • CvsAlert() : CvsAlert
  • CvsArgs() : CvsArgs
  • CvsConsole() : CvsPrefs
  • CvsPrefs() : CvsPrefs
  • CvsVersion() : CvsPrefs
  • CWincvsApp() : CWincvsApp
  • CWinCvsBrowser() : CWinCvsBrowser
  • CWincvsDoc() : CWincvsDoc
  • CWincvsView() : CWincvsView
  • CWinLogBranchData() : CWinLogBranchData
  • CWinLogData() : CWinLogData
  • CWinLogHeaderData() : CWinLogHeaderData
  • CWinLogRevData() : CWinLogRevData
  • CWinLogTagData() : CWinLogTagData
  • CWinPlacement() : CWinPlacement
  • CWndAutoCommand() : CWndAutoCommand
  • CWndRedrawMngr() : CWndRedrawMngr
  • cx : USIZE
  • cy : USIZE
  • Cyan : CTCP2Parse

- d -

  • d_ino : direct
  • d_name : direct
  • d_namlen : direct
  • d_reclen : direct
  • Data() : ENTNODE
  • data : ULIST_INFO, UTREE_INFO, UTREE_INSERT
  • dd_contents : _dirdesc
  • dd_cp : _dirdesc
  • dd_id : _dirdesc
  • dd_loc : _dirdesc
  • DeactivateSelf() : UPseudoFakePane
  • dealloc() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • DECLARE_DYNAMIC() : CSubclassWnd
  • DECLARE_DYNCREATE() : CCJColorPicker
  • decodeColor() : CTCP2Parse
  • decodeToggle() : CTCP2Parse
  • Default() : CSubclassWnd
  • DefaultFeature : USmartCombo
  • defaultnumcells : DYN_LIST
  • DeflateRect() : URect
  • DelegateRun() : KoWatcher
  • Delete() : CLogoutThread, CSortList< T >, PyMenuMgr
  • DeleteAllItems() : CWinCvsBrowser, CCJFlatTabCtrl, UCvsFolders, CSelectionDetailsDlg, CItemListDlg, CCvsRootDlg
  • DeleteBand() : CCJReBarCtrl
  • DeleteButton() : CCJToolBar
  • DeleteByCmd() : PyMenuMgr
  • DeleteColumns() : CBrowseFileView
  • DeleteItem() : CCJFlatTabCtrl, CCJComboBoxEx
  • DeleteMenu() : CCJMenu
  • DeleteMenuList() : CCJMenu
  • DeleteObject() : UBrush, UPen
  • DeleteView() : CCJTabCtrlBar
  • DelItemAt() : TPseudoTextListView
  • DelKeyTest() : CHistComboBoxEx, CSmartComboBox
  • desc : MACBINMAP, keywordMode
  • description : _sDiffOptionsItem
  • DestroyMenu() : CCJMenu
  • Deunixfy() : CTcl_Interp
  • dir : MultiFilesEntry
  • Dir() : CCJComboBoxEx
  • dirPath : match_dir
  • dirs : MultiFiles
  • disable_old_style : CCJMenu
  • DisableColumnSizing() : CCJListView, CCJListCtrl
  • DisableCommon() : CWinCvsBrowser, CGraphView, CExploreBar, CMyShellTree, CBrowseFileView
  • DisableFlatLook() : CCJFlatButton
  • DisableFlatStyle() : CCJFlatSplitterWnd
  • DisableGeneric() : UCvsFolders, UCvsFiles
  • DisableSplashScreen() : CvsPrefs
  • DisableUpdate() : CGraphView
  • DisableUserSettings() : ReportConflict
  • Discard() : CCJMemFile
  • Dismiss() : UWidget
  • DisplayItems() : CItemListDlg
  • DisplayKeywords() : CCvsRootDlg
  • DisplaySelection() : CSelectionDetailsDlg
  • DitherBlt() : CCJMenu
  • DitherBlt2() : CCJMenu
  • do_C() : ansiAttrCvt
  • do_m() : ansiAttrCvt
  • DockControlBarLeftOf() : CMainFrame, CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • DockFlatBorders : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • DockSizeBar() : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd, CCJDockContext
  • DocumentComplete() : CCJHtmlView
  • DoDataExchange() : CAboutDlg, CTipDlg, CNoPython, CMultilineEntryDlg, CHHelpDialog, CHHelpPropertyPage, CCustomizeMenus, CUpdateMerge, CUpdateOptions, CUpdateMain, CTemplateDlg, CTag_MAIN, CStatus_MAIN, CSelectionDetailsDlg, CSaveSettingsDlg, CRtag_OPTIONS, CRtag_MAIN, CRelease_MAIN, CProgressDlg, CLogin_MAIN, CLogFilters, CLogMain, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImportEntry, CImportWarning, CImportFilterDlg, CImport_OPTIONS, CImport_MAIN, CGraphOptDlg, CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CFileAction_MAIN, CEditorMonDlg, CDiff_Options, CDiff_MAIN, CEditKeywordDlg, CCvsRootDlg, CCVSAlert_MAIN, CCommit_OPTIONS, CCommit_MAIN, CCheckout_MAIN, UEditMessage, UPromptMessage, CAnnotate_MAIN, CAdminOption_MAIN, UWidget, CPseudoDlg
  • DoDrag() : CBrowseFileView
  • DoEvent() : TPseudoWinBehavior
  • DoFile() : CTcl_Interp, CPython_Interp
  • DoIdle() : TPseudoAppBehavior
  • DoKeyEvent() : TPseudoTextListView
  • DoMenuCommand() : TPseudoAppBehavior
  • DoModal() : CMfFileDialog, COptionalPropertySheet, UWidget
  • DoMouseCommand() : TPseudoTextListView
  • DoMouseCommand_SelectCells() : TPseudoTextListView
  • DoOnContextMenu() : CHHelpSupport
  • DoOnHelpInfo() : CHHelpSupport
  • DoPaint() : CCJToolBarBase, CCJSizeDockBar
  • DoPostCreate() : TBuggyPopup
  • DoRotate() : UPseudoPageHider, UPseudoPlaceHolder, UPseudoRotButton, CPseudoRotButton, TPseudoRotateIconButton
  • DoScript() : CTcl_Interp, CPython_Interp
  • DoScriptVar() : CTcl_Interp, CPython_Interp
  • DoSetupMenus() : TPseudoAppBehavior
  • DoToolboxEvent() : TPseudoAppBehavior
  • DoubleClick() : CMacBinItem, CPseudoItem
  • DoValidUI() : UWidget
  • DragMove() : CCJReBarCtrl
  • Draw() : TPseudoCustomView
  • Draw3DCheckmark() : CCJMenu
  • DrawAnimItem() : CGfxOutBarCtrl
  • DrawBitmap() : UDC
  • DrawBorders() : CCJToolBarBase, CCJSizeDockBar, CCJControlBar
  • DrawButtonBitmap() : CCJFlatButton, CPseudoButton
  • DrawButtonIcon() : CCJFlatButton, CCJCBarButton
  • DrawButtonText() : CCJFlatButton, CCJCaptionButton
  • DrawCaptionBack() : CCJCaption
  • DrawCaptionIcon() : CCJCaption
  • DrawCaptionText() : CCJCaption
  • DrawCell() : CCJColorPopup, CPseudoItem
  • DrawCheckMark() : CCJMenu
  • DrawCombo() : CCJFlatComboBox
  • DrawDragArrow() : CGfxOutBarCtrl
  • DrawFlatBorder() : CCJFlatHeaderCtrl
  • DrawFolder() : CGfxOutBarCtrl
  • DrawGriperCaption() : CCJControlBar
  • DrawGripper() : CCJToolBarBase, CCJControlBar
  • DrawItem() : CSortHeaderCtrl, CCvsStatusBar, CGfxOutBarCtrl, CCJOutlookBar, CCJMetaFileButton, CCJMenu, CCJFontCombo, CCJFlatHeaderCtrl, CCJFlatButton, CCJColorPicker, CColorMenu, CPseudoToggle, CPseudoButton
  • DrawRadioDot() : CCJMenu
  • DrawRowAdornments() : CMacBinItem, CPseudoItem
  • DrawTab() : CCJFlatTabCtrl
  • drop : UTB_BUTTON
  • DropFiles() : CMainFrame
  • Duplicate() : CCJMemFile
  • dwBuildNumber : AFX_DLLVERSIONINFO
  • dwData : CGfxOutBarCtrl::CBarFolder, CGfxOutBarCtrl::CBarItem
  • dwDockBarMap : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • dwFlags : CGfxOutBarCtrl
  • dwMajorVersion : AFX_DLLVERSIONINFO
  • dwMinorVersion : AFX_DLLVERSIONINFO
  • dwPlatformID : AFX_DLLVERSIONINFO

- e -

  • EDIT_ASCII : CCJHexEdit
  • EDIT_HIGH : CCJHexEdit
  • EDIT_LOW : CCJHexEdit
  • EDIT_NONE : CCJHexEdit
  • EditCell() : CMacBinItem
  • EDITMODE : CCJHexEdit
  • EditSel() : UCvsFiles
  • empty() : UStr, UPStr
  • Empty() : KoFilterMask
  • Enable() : CCJToolCmdUI, PyCmdUI, UCmdUI
  • EnableAutoCompletion() : CCJFlatComboBox
  • EnableButton() : CCJToolBar
  • EnableButtons() : CCJFlatTabCtrl
  • EnableCmdLineDiffOptions() : CDiff_MAIN
  • EnableCompareType() : CDiff_MAIN
  • EnableControls() : CSelectionDetailsDlg, CItemListDlg, CCvsRootDlg
  • EnableDateRev() : CItemListDlg
  • EnableDocking() : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • EnableDockingOnSizeBar() : CCJControlBar
  • EnableDockingSizeBar() : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • EnableEditControls() : CCvsRootDlg
  • EnableFlatLook() : CCJControlBar
  • EnableHeaderFilters() : CSortHeaderCtrl
  • EnableMultiSelect() : CCJTreeCtrl
  • EnableSaveState() : CCJControlBar
  • EnableSplashScreen() : CSplashWnd
  • EnableToolTips() : CCJTabCtrlBar
  • EnableWndContextHelp() : CHHelpSupport
  • enc : CTCP2Parse
  • encDef : CTCP2Parse
  • encLast : CTCP2Parse
  • encod : MACBINMAP
  • EncodingType : CTCP2Parse
  • EncryptCommunication() : CvsPrefs
  • end() : TMString< T >, MultiFiles
  • EndDialog() : UWidget
  • EndDrag() : CCJReBarCtrl
  • EndDragDockBar() : CCJDockContext
  • EndModal() : UWidget
  • EndSelection() : CCJColorPopup
  • endsWith() : UStr, UPStr
  • EnsureSelchangeMatch() : CSmartComboBox
  • EnterDirectory() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, LSReport, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • EnterFolder() : CBrowseFileView
  • ENTNODE() : ENTNODE
  • EntnodeData() : EntnodeData
  • EntnodeFile() : EntnodeFile
  • EntnodeFolder() : EntnodeFolder
  • EntnodePath() : EntnodePath
  • entries : CMacroSet, MacBinMaps, WININFO
  • Entries() : MacBinMaps
  • Entry() : CSortList< T >
  • entry : _frameRec
  • EnumFontProc() : CCJFontCombo
  • EqualRect() : URect
  • EraseNonClient() : CCJToolBarBase, CCJSizeDockBar, CCJControlBar
  • escSeq : ansiAttrCvt
  • Execute() : UCvsApp
  • ExecuteSelf() : LPseudoWinAttachment, LMainPseudoAttachment, UPseudoPageHider, LPseudoDrawAttachment
  • ExecWB() : CCJHtmlView
  • ExitDirectory() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, LSReport, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • ExitInstance() : CWincvsApp
  • expanded : UTREE_INFO
  • ext : MACBINMAP, UMSGMAP_ENTRY
  • ext1 : UMSGMAP_ENTRY
  • ext2 : UMSGMAP_ENTRY
  • ExtDiff() : CvsPrefs
  • Extract() : CCJMemFile
  • extractcolor() : mircAttrCvt

- f -

  • fAddGroups : CGfxOutBarCtrl
  • fAlloc : CTCLCvsConsole
  • fAllStrs : CMMenuString
  • False() : PyContainer
  • fAnimation : CGfxOutBarCtrl
  • fBuf : CMMenuString
  • fButtonStep : TPseudoScrollBar
  • fController : UPseudoPlaceHolder
  • fcreator : ReportConflict
  • fCurrentIcon : UPseudoRotButton, TPseudoRotateIconButton
  • fCurrentView : UPseudoPlaceHolder
  • fCurSel : UPseudoPageHider
  • fCvsRunningCounter : CvsPrefs
  • fDef : CSortList< T >
  • fDragItems : CGfxOutBarCtrl
  • Feature : USmartCombo
  • fEditGroups : CGfxOutBarCtrl
  • fEditItems : CGfxOutBarCtrl
  • FeedThisLine() : UCvsConsole
  • fElems : CSortList< T >
  • fExitOnError : CTcl_Interp
  • fg : CTCP2Parse
  • fgColorMap : ansiAttrCvt
  • fgDef : CTCP2Parse
  • fgLast : CTCP2Parse
  • fHasLoggedIn : CvsPrefs
  • fIconSuite : UPseudoRotButton, TPseudoRotateIconButton
  • file : FileEntry
  • FileAction() : CGraphView
  • FileActionType() : CvsPrefs
  • FileEntry() : FileEntry
  • FileIsType() : AddUnicodeCvsArgs, AddBinCvsArgs, AddCvsArgs, ControlCvsArgs
  • files : MultiFilesEntry
  • FillProtocolsComboBox() : CCvsRootDlg
  • Find() : CPersistent, TMString< T >
  • find() : UStr
  • FindBestRoot() : CHistComboBoxEx
  • FindCellFromColor() : CCJColorPopup
  • FindData() : CCJMemFile
  • FindDropDownButton() : CCJToolBar
  • FindItem() : CCJTreeCtrl
  • FindKeyboardShortcut() : CCJMenu
  • FindMenuList() : CCJMenu
  • FindMenuOption() : CCJMenu
  • FindMethod() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • FindString() : CCJComboBoxEx
  • FinishCreateSelf() : CMacBinTable, UPseudoPlaceHolder
  • fInterp : CTcl_Interp, LSReport, CTCLCvsConsole, CPython_Interp
  • first : DYN_LIST
  • firstentry : poolRec
  • firstfree : poolRec
  • Fixed : CTCP2Parse
  • flag : option
  • fLargeIcon : CGfxOutBarCtrl
  • fLastErrorCode : CTcl_Interp
  • FlatBorder() : CCJSizeDockBar
  • fLen : CTCLCvsConsole
  • Flush() : CCJMemFile, CMacroSet
  • FlushDisplay() : CProgressDlg
  • fMap : CMacBinItem
  • fMax : CSortList< T >
  • fMaximum : TPseudoDoubleNumberText
  • fMaxStr : CMMenuString
  • fMethod : CSortList< T >
  • fMinimum : TPseudoDoubleNumberText
  • fNewOne : CSortList< T >
  • fntLast : CTCP2Parse
  • fntSize : CTCP2Parse
  • fNum : CSortList< T >
  • ForceAbort() : CProgress
  • ForceBinary() : ReportConflict
  • forceBinary : ReportConflict
  • ForceNoKeywords() : ReportConflict
  • forceNoKeywords : ReportConflict
  • ForceText() : ReportConflict
  • forceText : ReportConflict
  • ForceUnicode() : ReportConflict
  • forceUnicode : ReportConflict
  • FormatEntrryPrefix() : CBrowseFileView
  • FormatLineBreakHint() : CMultiLineEditDialogKeyHelper
  • FormatOleDateTime() : CCJTimeEdit, CCJDateEdit
  • ForwardMouse() : CCJPagerCtrl
  • fPageCtrl : UPseudoPageHider
  • fPageStep : TPseudoScrollBar
  • fPrecision : TPseudoDoubleNumberText
  • fRealWidth : TBuggyPopup
  • fRemoveGroups : CGfxOutBarCtrl
  • fRemoveItems : CGfxOutBarCtrl
  • FreshenFileMask() : UCvsFrame
  • fromHex() : CTCP2Parse
  • fSelHighlight : CGfxOutBarCtrl
  • fSmallIcon : CGfxOutBarCtrl
  • fState : LSReport
  • fStringContainer : TPseudoTextListView
  • fTclFileRunningCounter : CvsPrefs
  • ftype : ReportConflict
  • fView : CColorConsole
  • fViewSuite : UPseudoPageHider, UPseudoPlaceHolder
  • fWidid : UPseudoPageHider, UPseudoPlaceHolder
  • fWidID : TPseudoWinAdorner, TPseudoWinBehavior

- g -

  • G : CTCP2Parse::RGBColor
  • g : UCOLOR, UColor
  • gApp : UCvsApp
  • gCurMacBinMap : CMacBinTable
  • gCvsProcess : UCvsApp
  • gCvsRunning : UCvsApp
  • gCvsStopping : UCvsApp
  • get() : MultiFilesEntry
  • Get() : CSortList< T >, CAllTargets
  • GetActiveView() : CCJTabView, CCJTabCtrlBar
  • GetAddressBar() : CCJHtmlView
  • GetAlertTitle() : CvsAlert
  • GetAllColors() : CGraphOptDlg
  • GetAllRevs() : TGraphDelCmd
  • GetAnchorHighlight() : CCJToolBarCtrl
  • GetAnimationTickCount() : CGfxOutBarCtrl
  • GetAppLibFolder() : UCvsApp
  • GetApplication() : CCJHtmlView
  • GetAppModule() : CWincvsApp
  • GetAppName() : UCvsApp
  • GetAppPath() : CWincvsApp
  • GetAppVersion() : CWincvsApp, UCvsApp
  • GetAt() : KiColumnModel, KoRecursiveModel, KoRegularModel
  • GetAttr() : PyCvsEntry, PyContainer
  • getattr() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • GetAutoSize() : CCJHyperLink
  • GetAvailableRect() : CCJSizeDockBar
  • GetBandBorders() : CCJReBarCtrl
  • GetBandCount() : CCJReBarCtrl
  • GetBandInfo() : CCJReBarCtrl
  • GetBarHeight() : CCJReBarCtrl
  • GetBarInfo() : CCJReBarCtrl
  • GetBaseMessageMap() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • GetBitmap() : CCJToolBar
  • GetBitmapFlags() : CCJToolBar
  • GetBitmapFromImageList() : CCJMenu
  • GetBkColor() : CCJReBarCtrl, CCJPagerCtrl, CCJColorPicker
  • GetBorder() : CCJPagerCtrl
  • GetBorders() : CCJToolBarBase
  • GetBoundsSelf() : CWinLogBranchData, CWinLogTagData, CWinLogRevData, CWinLogHeaderData, CWinLogData, CWinLogBranchData, CWinLogTagData, CWinLogRevData, CWinLogHeaderData, CWinLogData
  • GetBrowseHistory() : CMainFrame
  • GetBrowserView() : CWincvsApp, CMainFrame, CBrowserBar, UCvsApp
  • GetBuffer() : CPathBuffer
  • GetBusy() : CCJHtmlView
  • GetButton() : CCJToolBar
  • GetButtonCount() : CCJToolBar
  • GetButtonInfo() : CCJToolBarCtrl, CCJToolBar
  • GetButtonRect() : CCJControlBar
  • GetButtonSize() : CCJToolBarCtrl, CCJToolBar, CCJPagerCtrl
  • GetButtonState() : CCJPagerCtrl
  • GetButtonStyle() : CCJToolBar
  • GetButtonText() : CCJToolBar
  • GetButtonTitle() : CvsAlert
  • GetCellRect() : CCJColorPopup
  • GetChildRect() : CCJTabView, CCJTabCtrlBar, CCJExplorerBar, CCJControlBar
  • GetCmdLine() : CCmdLine_MAIN
  • GetColor() : CColorStatic, CCJMonthCalCtrl, CCJColorPopup, CCJColorPicker
  • GetColorName() : CCJColorPopup
  • GetColorScheme() : CCJReBarCtrl
  • GetColumn() : CCJColorPopup, KiColumnModel
  • GetColumnCount() : CCJListView, CCJListCtrl
  • GetColumnIndex() : KiColumn, KoConflictColumn, KoDateColumn, KoTagColumn, KoStateColumn, KoEncodingColumn, KoOptionColumn, KoRevisionColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • GetColumnModel() : CBrowseFileView, UCvsFiles
  • GetColumnName() : ColumnIndex
  • GetComboBoxCtrl() : CCJComboBoxEx
  • GetConflict() : EntnodeFile, EntnodeData
  • GetConsole() : UCvsApp
  • getConsoleFont() : CvsPrefs
  • GetConsoleView() : CWincvsApp, CMainFrame
  • GetContainer() : CCJHtmlView
  • GetCount() : KiColumnModel, KoRecursiveModel, KoRegularModel
  • GetCountPerPage() : CGfxOutBarCtrl
  • GetCountSel() : TGraphDelCmd
  • GetCurFormat() : CWincvsView
  • GetCurModal() : UWidget
  • GetCurrent() : CPseudoRotButton
  • GetCurrentMap() : CMacBinTable
  • GetCurrentState() : UPseudoRotButton
  • GetCurrentView() : UPseudoPlaceHolder
  • GetCurSel() : CCJFlatTabCtrl, CCJMonthCalCtrl
  • GetCurSelText() : CSmartComboBox
  • GetCvsConsole() : CCvsProcessData
  • GetCvsErr() : CItemListConsole, CCvsRootConsole
  • GetCvsExitOnError() : CTcl_Interp
  • GetCvsLastErrorCode() : CTcl_Interp
  • GetCvsProcess() : CWincvsApp, UCvsApp
  • GetCvsProtocolList() : CCvsRootParser, CInfoParserConsole
  • GetData() : CMMenuString, CWinPlacement, CWinLogData, CCJHexEdit, CWinLogData, CTCLBrowserEnt, CPersistentT< T >, CPersistent, TMString< T >, TMPersistent< T >, PCStr, PCPStr
  • GetDateTime() : CCJDateEdit
  • GetDelimiter() : TKeyString< delimiter >
  • GetDesc() : ReportWarning, ReportConflict
  • GetDescription() : ItemDisplayInfo
  • GetDescriptionEx() : ItemDisplayInfo
  • GetDeviceScrollPosition() : CScrollView
  • GetDiffOptions() : CDiff_Options
  • getdir() : MultiFiles, MultiFilesEntry
  • GetDir() : CGraphDoc
  • GetDisabledImageList() : CCJToolBarCtrl
  • GetDisableOldStyle() : CCJMenu
  • GetDiskNodeSel() : TGraphCurSelector
  • GetDockBar() : CCJDockContext
  • GetDockedSizeBar() : CCJSizeDockBar
  • GetDocument() : CWincvsView, CWincvsApp
  • GetDragItemRect() : CGfxOutBarCtrl
  • GetDrawContentsSelf() : CMacBinItem, CPseudoItem
  • GetDropTarget() : CCJToolBarCtrl, CCJReBarCtrl, CCJPagerCtrl
  • GetEditCtrl() : CCJComboBoxEx, CSmartComboBox
  • GetEntriesModTime() : CBrowseFileView, UCvsFiles
  • GetEntryInfo() : CGraphDoc
  • GetEntryTextID() : CMultilineEntryDlg
  • GetEntryTextWnd() : CMultilineEntryDlg
  • GetEnvMainThread() : CWincvsApp, CMainFrame
  • GetEnvPlainTypes() : MacBinMaps
  • GetEnvTypes() : MacBinMaps
  • GetExplorerView() : CWincvsApp, CMainFrame
  • GetExtendedStyle() : CCJToolBarCtrl, CCJListView, CCJListCtrl, CCJComboBoxEx
  • GetExtension() : EntnodeFile, EntnodeData
  • GetFileName() : SelectionDisplayInfo
  • GetFilesView() : UCvsApp
  • GetFileView() : CWincvsApp
  • GetFilterModel() : CWincvsApp, CMainFrame, UCvsFrame, UCvsApp
  • GetFilters() : KoFilterModel, KiFilterModel
  • GetFilterText() : CSortHeaderCtrl
  • GetFirstDayOfWeek() : CCJMonthCalCtrl
  • GetFirstSel() : TGraphCurSelector
  • GetFirstSelectedItem() : CCJTreeCtrl
  • GetFlag() : CGfxOutBarCtrl
  • GetFocus() : UWidget
  • GetFocusCmd() : UWidget
  • GetFolderChild() : CGfxOutBarCtrl
  • GetFolderCount() : CGfxOutBarCtrl
  • GetFolderData() : CGfxOutBarCtrl
  • GetFolderImageList() : CGfxOutBarCtrl
  • GetFolderPath() : EntnodeData, EntnodePath
  • GetFolderRect() : CGfxOutBarCtrl
  • GetFullName() : CCJHtmlView
  • GetFullPathName() : EntnodeData, EntnodePath
  • GetFullScreen() : CCJHtmlView
  • GetGripperRect() : CCJControlBar
  • GetGroup() : CPseudoToggle
  • GetHeight() : CCJHtmlView
  • GetHelpFilePath() : CHHelpSupport
  • GetHideCommandDlg() : COptionalPropertySheet
  • GetHideOption() : CvsAlert
  • GetHookMap() : CSubclassWndMap
  • GetHorzSize() : CCJControlBar
  • GetHotImageList() : CCJToolBarCtrl
  • GetHotItem() : CCJToolBarCtrl, CCJToolBar
  • GetHoverColor() : CCJHyperLink
  • GetHtmlDocument() : CCJHtmlView
  • GetIcon() : CCustomizeMenus, CvsAlert
  • GetIconRect() : CGfxOutBarCtrl
  • GetIdleTime() : CWincvsApp
  • GetIgnoreList() : ImportReport
  • GetIgnoreModel() : CWincvsApp, CMainFrame, UCvsFrame, UCvsApp
  • GetImageForEntry() : CBrowseFileView, UCvsFiles
  • GetImageForItem() : CItemListDlg
  • GetImageID() : CContentItems
  • GetImageIndexFromRuntimeClass() : CCJTabCtrlBar
  • GetImageList() : CGfxOutBarCtrl, CCJToolBarCtrl, CCJToolBar, CCJReBarCtrl, CCJComboBoxEx
  • GetImgList() : CGraphView
  • GetIndex() : CCJColorPopup, MultiFilesEntryIndex
  • GetInitializedMenu() : CCJMDIChildWnd
  • GetInsertMark() : CCJToolBarCtrl
  • GetInsertMarkColor() : CCJToolBarCtrl
  • GetInsideRect() : CGfxSplitterWnd, CGfxOutBarCtrl
  • GetItem() : TBrowserFillDummy, CCJComboBoxEx, ItemDisplayInfo
  • GetItemBold() : CCJTreeCtrl
  • GetItemByLocation() : CWinCvsBrowser, UCvsFolders
  • GetItemColor() : CCJTreeCtrl
  • GetItemCount() : CGfxOutBarCtrl, CGfxOutBarCtrl::CBarFolder, CCJFlatTabCtrl
  • GetItemData() : CGfxOutBarCtrl
  • GetItemFont() : CCJTreeCtrl
  • GetItemID() : CCJToolBar
  • GetItemImage() : CGfxOutBarCtrl
  • GetItemList() : CItemListConsole
  • GetItemRect() : CGfxOutBarCtrl, CCJToolBar, CCJFlatTabCtrl
  • GetItems() : USmartCombo
  • GetItemSize() : CGfxOutBarCtrl
  • GetItemText() : CGfxOutBarCtrl, TPseudoTextListView
  • GetIterator() : MultiFilesEntryIndex
  • GetKeyword() : USmartCombo
  • GetKeywordList() : CProtocolParserConsole
  • GetKindDesc() : ReportConflict
  • GetLabelRect() : CGfxOutBarCtrl
  • GetLastItem() : CCJTreeCtrl
  • GetLastSel() : TGraphCurSelector
  • GetLaunchRes() : CItemListConsole, CCvsRootConsole
  • GetLaunchType() : CFileAction_MAIN
  • GetLeft() : CCJHtmlView
  • GetLinkColor() : CCJHyperLink
  • GetLinkCursor() : CCJHyperLink
  • GetList() : CMMenuString, TMString< T >, TMPersistent< T >
  • GetListCtrl() : TViewFill
  • GetLocationName() : CCJHtmlView
  • GetLocationURL() : CCJHtmlView
  • GetLogGraph() : CWincvsApp
  • GetLogMsg() : CImport_MAIN, CCommit_MAIN
  • GetLogoText() : CCJLogoPane
  • GetMacCreator() : ReportConflict
  • GetMacType() : ReportConflict
  • GetMainFrame() : CWincvsApp, UCvsApp, CDynToolBar
  • GetMaxSelCount() : CCJMonthCalCtrl
  • GetMaxSize() : CCJToolBarCtrl
  • GetMaxTextRows() : CCJToolBarCtrl
  • GetMenu() : CCJMenuBar
  • GetMenuBar() : CCJHtmlView
  • GetMenuID() : CCJTabCtrl, CCJMDIChildWnd, CCJFlatHeaderCtrl, CCJControlBar
  • GetMenuList() : CMainFrame
  • GetMenuText() : CCJMenu
  • GetMessage() : CvsAlert
  • GetMessageDetails() : CvsAlert
  • GetMessageMap() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • GetMinExt() : CCJControlBar
  • GetMinReqRect() : CCJMonthCalCtrl
  • GetMonthCalColor() : CCJDateTimeCtrl
  • GetMonthCalCtrl() : CCJDateTimeCtrl
  • GetMonthCalFont() : CCJDateTimeCtrl
  • GetMonthDelta() : CCJMonthCalCtrl
  • GetMonthRange() : CCJMonthCalCtrl
  • GetName() : CGraphDoc, KeywordDisplayInfo, EntnodeData
  • GetNeedSelection() : KiSelectionHandler
  • GetNeedViewReset() : KiSelectionHandler
  • GetNewSel() : TGraphCurSelector
  • GetNextID() : CCJBrowseButton
  • GetNextItem() : CCJTreeCtrl
  • GetNextOrPrevButton() : CCJMenuBar
  • GetNextPathName() : CMfFileDialog
  • GetNextSelectedItem() : CCJTreeCtrl
  • GetNextTipString() : CTipDlg
  • GetNode() : CGraphDoc
  • GetNormalized() : CTCLBrowserEnt
  • GetNotificationManager() : CSortHeaderCtrl, KoIgnoreModel, KoRecursionModel, KoFilterModel, KiFilterBase
  • GetOffline() : CCJHtmlView
  • GetOldLoc() : CHistComboBoxEx
  • GetOnlyRev() : TGraphDelCmd
  • GetOptionCheckRect() : COptionalPropertySheet
  • GetOptionString() : CAdminOption_MAIN
  • GetOverideList() : UWidget
  • GetPadding() : CCJToolBar
  • GetPageValue() : LPseudoWinAttachment
  • GetPalette() : CCJReBarCtrl
  • GetPanControl() : CCJStatusBar
  • GetParentBrowser() : CCJHtmlView
  • GetPassword() : GetPassword
  • GetPath() : CBrowseFileView, UCvsFiles, SelectionDisplayInfo, CCvsRootParser, KoColumnContext
  • GetPathLength() : CBrowseFileView
  • GetPattern() : ReportConflict
  • GetPlacement() : CWinPlacement
  • GetPos() : CCJPagerCtrl
  • GetPrevItem() : CCJTreeCtrl
  • GetPrevSelectedItem() : CCJTreeCtrl
  • GetProperty() : CCJHtmlView
  • GetProtocol() : CCvsRootParser
  • GetPseudoID() : CDynToolBar
  • GetRange() : CCJMonthCalCtrl, CCJDateTimeCtrl
  • GetReadyState() : CCJHtmlView
  • GetReBarCtrl() : CCJReBar
  • GetRect() : CCJToolBar, CCJReBarCtrl
  • GetRecursionModel() : CWincvsApp, CMainFrame, UCvsFrame, UCvsApp
  • GetRecursiveModel() : KiColumnModel
  • GetRefRunning() : TraversalReport
  • GetRegisterAsBrowser() : CCJHtmlView
  • GetRegisterAsDropTarget() : CCJHtmlView
  • GetRegKey() : CCJHyperLink
  • GetRegularModel() : KiColumnModel
  • GetRelativePath() : EntnodeFile
  • GetRemoveDirectoryOption() : CRelease_MAIN
  • GetRepository() : CCvsSandboxInfo
  • GetRevision() : SelectionDisplayInfo
  • GetRoot() : CWinCvsBrowser, CWincvsApp, UCvsFolders, CCvsSandboxInfo
  • GetRow() : CCJColorPopup
  • GetRowCount() : CCJReBarCtrl
  • GetRowHeight() : CCJReBarCtrl
  • GetRowInfo() : ItemDisplayInfo, KeywordDisplayInfo
  • GetRows() : CCJToolBar
  • GetRuntimeClass() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, CPersistentInt, CPersistentBool, CPersistent, CMPString, CMString, PCStr, PCPStr, UEditMessage, UPromptMessage, UWidget, UToolbar, UObject, UMenu, UCmdTarget, UMacAppMenu
  • GetSel() : CCJHexEdit
  • GetSel1() : TGraphCmdStatus, TGraphCurSelector
  • GetSel2() : TGraphCmdStatus, TGraphCurSelector
  • GetSelCount() : TGraphCmdStatus
  • GetSelection() : KiSelectionHandler
  • GetSelectionChanged() : CWinCvsBrowser
  • GetSelectionMode() : CCJColorPicker
  • GetSelectionNotificationLocked() : CWinCvsBrowser
  • GetSelFolder() : CGfxOutBarCtrl
  • GetSelFont() : CCJFontCombo
  • GetSelRange() : CCJMonthCalCtrl
  • GetSelType() : KiSelectionHandler
  • GetSetupData() : KiColumn, KoConflictColumn, KoDateColumn, KoTagColumn, KoStateColumn, KoEncodingColumn, KoOptionColumn, KoRevisionColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • GetSilent() : CCJHtmlView
  • GetStandardSignature() : TPseudoDoubleNumberText, TPseudoTextListView
  • GetStartPosition() : CMfFileDialog
  • GetState() : CCJToolBar, EntnodeData, CPseudoToggle
  • GetStateDesc() : ReportWarning, ReportConflict
  • GetStatusBar() : CWincvsApp, CMainFrame, CCJHtmlView, UCvsApp
  • GetStatusPane() : CCJStatusBar
  • GetStoredWidth() : CCJListView, CCJListCtrl
  • GetStr() : CWinLogData
  • GetString() : CCJMenuData
  • GetStyle() : CCJToolBarCtrl
  • GetTabCtrl() : CCJTabView
  • GetTabFromPoint() : CCJTabCtrlBar
  • GetTabWidth() : CCJFlatTabCtrl
  • GetTemplateText() : CTemplateDlg
  • GetText() : CContentItems, KiColumn, KoConflictColumn, KoDateColumn, KoTagColumn, KoStateColumn, KoEncodingColumn, KoOptionColumn, KoRevisionColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • GetTextColor() : CCJReBarCtrl, CCJColorPicker
  • GetTextExtent() : UDC
  • GetTextHeight() : UDC
  • GetTheaterMode() : CCJHtmlView
  • GetThisMessageMap() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • GetTime() : CCJDateTimeCtrl
  • GetTimeout() : KoWatcher
  • GetTimers() : UWidget
  • GetTimeStamp() : CPersistent
  • GetTipText() : CCJFlatTabCtrl
  • GetToday() : CCJMonthCalCtrl
  • GetToolBar() : CCJHtmlView
  • GetToolBarCtrl() : CCJToolBar
  • GetToolBarID() : CCJMDIChildWnd
  • GetToolBarIDs() : CCJMDIChildWnd
  • GetToolbarStyle() : CCJToolBar
  • GetTooltip() : UWidget
  • GetToolTip() : CCJTabCtrlBar
  • GetToolTips() : CCJToolBar, CCJReBarCtrl
  • GetTop() : CCJHtmlView
  • GetTopLevelContainer() : CCJHtmlView
  • GetTotalArrowWidth() : CCJFlatTabCtrl
  • GetTotalTabWidth() : CCJFlatTabCtrl
  • GetTrackingState() : CCJMenuBar
  • GetTrackSelection() : CCJColorPicker
  • GetTreeView() : CGraphDoc
  • GetType() : CWinLogData, CCJHtmlView, CWinLogData, PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry, EntnodeFolder, EntnodeFile, EntnodeData, KiColumnModel, KoRecursiveModel, KoRegularModel
  • GetUnderline() : CCJHyperLink
  • GetURL() : CCJHyperLink
  • GetUseShell() : CvsPrefs
  • GetValidationError() : TPseudoDoubleNumberText
  • GetValue() : PyPersistent, KeywordDisplayInfo, TPseudoDoubleNumberText
  • GetVertSize() : CCJControlBar
  • GetView() : CCJTabView, CCJTabCtrlBar, KoFileViewTraversalContext, TViewFill, CColorConsole
  • GetViewName() : CCJTabCtrlBar
  • GetViewType() : CBrowseFileView
  • GetVisible() : CCJHtmlView
  • GetVisibleRange() : CGfxOutBarCtrl
  • GetVisited() : CCJHyperLink
  • GetVisitedColor() : CCJHyperLink
  • GetWideString() : CCJMenuData
  • GetWidget() : UWidget
  • GetWidgets() : UWidget
  • GetWidID() : UCmdTarget, TPseudoWinBehavior
  • GetWindowDateTime() : CCJDateEdit
  • GetWindowText() : CSmartComboBox
  • GetWinInfo() : CDynToolBar
  • getWinLogData_() : TGraphCurSelector
  • GetWnd() : CHHelpSupport
  • GetWndTextExtent() : CCVSAlert_MAIN
  • GetWorkspace() : CMainFrame
  • GoBack() : CCJHtmlView
  • GoForward() : CCJHtmlView
  • GoHome() : CCJHtmlView
  • GoSearch() : CCJHtmlView
  • GotoURL() : CCJHyperLink
  • Green : CTCP2Parse
  • Grey : CTCP2Parse

- h -

  • handler : NotificationManager::Node
  • has_arg : option
  • HasAborted() : CProgress
  • HasAnyModified() : KoFilterModel
  • HasConflict() : ReportConflict
  • hasConflict : ReportConflict
  • HasEditChanged() : CCJComboBoxEx
  • hasExtension : ReportConflict
  • HasFeature() : USmartCombo
  • HasFilter() : KoFilterModel
  • HasFilterMasks() : KoFilterModel
  • HasFilters() : KoFilterModel
  • HasFocus() : UWidget
  • HasForceBinary() : ReportConflict
  • HasForceNoKeywords() : ReportConflict
  • HasForceText() : ReportConflict
  • HasForceUnicode() : ReportConflict
  • HasIgnore() : ReportConflict
  • hasIgnore : ReportConflict
  • HasLoogedIn() : CvsPrefs
  • HasModal() : UWidget
  • HasProblem() : ControlCvsArgs
  • HasPython() : CWincvsApp
  • HasTCL() : CWincvsApp
  • HasTypeCreatorConflict() : ReportConflict
  • hasTypeCreatorConflict : ReportConflict
  • hDragCursor : CGfxOutBarCtrl
  • height : WININFO
  • Height() : URect
  • heightbtn : UTB_INIT
  • Helper() : CvsPrefs
  • hHandCursor : CGfxOutBarCtrl
  • HideButton() : CCJToolBar
  • HideColumn() : CCJFlatSplitterWnd
  • HideColumns() : UCvsFiles
  • HideCommandDlgAnnotate() : CvsPrefs
  • HideCommandDlgDiff() : CvsPrefs
  • HideCommandDlgFileAction() : CvsPrefs
  • HideCommandDlgGraph() : CvsPrefs
  • HideCommandDlgLog() : CvsPrefs
  • HideCommandDlgStatus() : CvsPrefs
  • HideCommandDlgUpdate() : CvsPrefs
  • HideCommandDlgUseShift() : CvsPrefs
  • HideRow() : CCJFlatSplitterWnd
  • HideSplashScreen() : CSplashWnd
  • HighlightFolder() : CGfxOutBarCtrl
  • HighlightItem() : CGfxOutBarCtrl
  • HitTest() : CWinLogData, CCJToolBarCtrl, CCJToolBar, CCJSizeDockBar, CCJReBarCtrl, CCJMenuBar, CCJFlatTabCtrl, CCJMonthCalCtrl, CCJControlBar, CWinLogData
  • HitTestEx() : CGfxOutBarCtrl, CCJListView, CCJListCtrl
  • hNoDragCursor : CGfxOutBarCtrl
  • Home() : CCJFlatTabCtrl, CvsPrefs
  • HookWindow() : CSubclassWnd
  • HookWndProc : CSubclassWnd
  • htDownScroll : CGfxOutBarCtrl
  • htFolder : CGfxOutBarCtrl
  • htItem : CGfxOutBarCtrl
  • htNothing : CGfxOutBarCtrl
  • htUpScroll : CGfxOutBarCtrl

- i -

  • icon : ULIST_INSERT, UTREE_INFO, UTREE_INSERT, UTB_BUTTON
  • icons : TbEntryDropDown
  • ICTextOption() : CvsPrefs
  • idButton : DROPDOWNBUTTON
  • IDD : CAboutDlg, CNoPython, CMultilineEntryDlg, CCustomizeMenus, CUpdateMerge, CUpdateOptions, CUpdateMain, CTemplateDlg, CTag_MAIN, CStatus_MAIN, CSelectionDetailsDlg, CSaveSettingsDlg, CRtag_OPTIONS, CRtag_MAIN, CRelease_MAIN, CProgressDlg, CLogin_MAIN, CLogFilters, CLogMain, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImportEntry, CImportWarning, CImportFilterDlg, CImport_OPTIONS, CImport_MAIN, CGraphOptDlg, CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CFileAction_MAIN, CEditorMonDlg, CDiff_Options, CDiff_MAIN, CEditKeywordDlg, CCvsRootDlg, CCVSAlert_MAIN, CCommit_OPTIONS, CCommit_MAIN, CCheckout_MAIN, CAnnotate_MAIN, CAdminOption_MAIN
  • IdleCvsProgress() : CWincvsApp
  • idMenu : DROPDOWNBUTTON
  • iDragFrom : OUTBAR_INFO
  • iDragTo : OUTBAR_INFO
  • IDToIndex() : CCJReBarCtrl
  • iFirstItem : CGfxOutBarCtrl
  • iFolderHeight : CGfxOutBarCtrl
  • Ignore() : ReportConflict
  • iHitInternal1 : CGfxOutBarCtrl
  • iHitInternal2 : CGfxOutBarCtrl
  • iImageIndex : CGfxOutBarCtrl::CBarItem
  • iIndex : CGfxGroupEdit
  • iLastDragItemDraw : CGfxOutBarCtrl
  • iLastDragItemDrawType : CGfxOutBarCtrl
  • iLastFolderHighlighted : CGfxOutBarCtrl
  • iLastItemHighlighted : CGfxOutBarCtrl
  • iLastSel : CGfxOutBarCtrl
  • iLastSelectedFolder : CGfxOutBarCtrl
  • Import() : CCJMemFile
  • ImportFilter() : CImport_OPTIONS
  • ImportReport() : ImportReport
  • inc : USLIDER
  • Indeterminate() : CCJToolBar
  • index : OUTBAR_INFO
  • indexColor : CTCP2Parse
  • InflateRect() : URect
  • Init() : CRevisionConsole
  • InitHelpID() : CAboutDlg, CNoPython, CMultilineEntryDlg, CHHelpPropertySheet, CHHelpSupport, CCustomizeMenus, CUpdateMerge, CUpdateOptions, CUpdateMain, CTemplateDlg, CTag_MAIN, CStatus_MAIN, CSelectionDetailsDlg, CSaveSettingsDlg, CRtag_OPTIONS, CRtag_MAIN, CRelease_MAIN, COptionalPropertySheet, CLogin_MAIN, CLogFilters, CLogMain, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImportEntry, CImportWarning, CImportFilterDlg, CImport_OPTIONS, CImport_MAIN, CGraphOptDlg, CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CFileAction_MAIN, CEditorMonDlg, CDiff_Options, CDiff_MAIN, CEditKeywordDlg, CCvsRootDlg, CCommit_OPTIONS, CCommit_MAIN, CCheckout_MAIN, CAnnotate_MAIN, CAdminOption_MAIN
  • InitHTMLHelp() : CHHelpSupport
  • initialcmd : UTB_DROPDOWN
  • Initialise() : CCJColorPopup
  • Initialize() : CCustInvertTable
  • InitializeControl() : CCJBrowseEdit
  • InitializeDockingWindows() : CMainFrame
  • InitializeFonts() : CCJFontCombo
  • InitializeHeader() : CCJFlatHeaderCtrl
  • InitializeMenu() : CCJMDIFrameWnd, CCJFrameWnd
  • InitializeMenuList() : CCJMenu
  • InitialShowWindow() : CMainFrame
  • InitInstance() : CWincvsApp, CLogoutThread
  • InitItem() : TViewFill
  • InitListCtrl() : CItemListDlg, CCvsRootDlg
  • InitOptionCtrls() : CItemListDlg
  • InitPythonSupport() : CPython_Interp
  • InitValues() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • Insert() : CMMenuString, CCJMemFile, CSortList< T >, TMString< T >
  • InsertBand() : CCJReBarCtrl
  • InsertButton() : CCJToolBar
  • InsertControl() : CCJToolBar
  • InsertItem() : CGfxOutBarCtrl, CGfxOutBarCtrl::CBarFolder, CCJFlatTabCtrl, CCJComboBoxEx
  • InsertMarkHitTest() : CCJToolBarCtrl
  • InsertMenuA() : CCJMenu
  • InsertMenuW() : CCJMenu
  • InsertODMenuA() : CCJMenu
  • InsertODMenuW() : CCJMenu
  • InsertSpaces() : CCJMenu
  • InsertString() : CHistComboBoxEx, CCJComboBoxEx
  • Inside() : CSortList< T >
  • InsideAndInsert() : CSortList< T >
  • InsStringBefore() : TPseudoTextListView
  • InsStringFirst() : TPseudoTextListView
  • InsStringLast() : TPseudoTextListView
  • Install() : CCJMenuBarFrameHook
  • IntersectRect() : URect
  • InUpdateUI : UCvsFrame
  • invalFlag : CMacroSet
  • InvalidateOldPos() : CCJToolBar
  • InvalidateRect() : CScrollView
  • InvalidateTabs() : CCJFlatTabCtrl
  • InvalidCache() : LPseudoWinAttachment
  • ircAll : CGfxOutBarCtrl
  • ircIcon : CGfxOutBarCtrl
  • ircii2ctcp() : irciiAttrCvt
  • ircLabel : CGfxOutBarCtrl
  • IsAdded() : KoFilterModel
  • IsAvail() : CTcl_Interp, CPython_Interp
  • IsBackgroundProcess() : CWincvsApp
  • IsBinary() : ReportConflict
  • isBinary : ReportConflict
  • IsBottomDocked() : CCJControlBar
  • IsButtonChecked() : CCJToolBar
  • IsButtonEnabled() : CCJToolBar
  • IsButtonHidden() : CCJToolBar
  • IsButtonHighlighted() : CCJToolBarCtrl
  • IsButtonIndeterminate() : CCJToolBar
  • IsButtonPressed() : CCJToolBar
  • IsChanged() : KoFilterModel
  • ischeck : TbEntryButton
  • IsConflict() : KoFilterModel
  • IsCvsRunning() : CWincvsApp, UCvsApp, CvsPrefs
  • IsCvsStopping() : CWincvsApp, UCvsApp
  • IsDeadNode() : CWinLogData
  • IsDefaultAscending() : KiColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • IsDefaultedRev() : CDiff_MAIN
  • IsDefaultMode() : KoFilterModel
  • IsDerivedFrom() : URuntimeClass
  • IsDiskNode() : CWinLogData
  • IsDockBar() : CCJSizeDockBar
  • IsDockSizeBar() : CCJSizeDockBar
  • iSelAnimCount : CGfxOutBarCtrl
  • iSelAnimTiming : CGfxOutBarCtrl
  • iSelFolder : CGfxOutBarCtrl
  • IsEmpty() : CCvsRootParser
  • IsEnabled() : KoUpdateMoveToTrashHandler, UWidget
  • IsEnteredTwice() : USemaphore
  • IsError() : ReportWarning
  • IsExtension() : ReportConflict
  • IsFilterMasksEnable() : CMainFrame, KoFilterModel
  • IsFindValid() : CCJTreeCtrl
  • IsFloating() : CCJControlBar
  • IsHasOne() : CWinPlacement
  • IsHelpCtrl() : CHHelpSupport
  • IsHideMissing() : TBrowserFill, KoFilterModel
  • IsHideUnknown() : KoFileViewTraversalContext, KoFilterModel
  • IsHooked() : CSubclassWnd
  • IsHorzDocked() : CCJControlBar
  • IsIgnored() : EntnodeData
  • IsIgnoredCtrl() : CHHelpSupport
  • IsKindOf() : UObject
  • IsLastControlBar() : CCJSizeDockBar
  • IsLeftDocked() : CCJControlBar
  • IsLocked() : EntnodeData
  • IsMatch() : KoFileViewTraversalContext, KoTraversalContext, KoFilterModel, KoFilterMask, KiFilterModel
  • IsMenu() : CCJMenu
  • IsMissing() : EntnodeData, KoFilterModel
  • IsModeSet() : CCvsStreamConsole
  • IsModified() : KoFilterModel
  • IsNewShell() : CCJMenu
  • iso8859_1 : CTCP2Parse
  • iso8859_2 : CTCP2Parse
  • iso8859_3 : CTCP2Parse
  • iso8859_4 : CTCP2Parse
  • iso8859_5 : CTCP2Parse
  • iso8859_6 : CTCP2Parse
  • iso8859_7 : CTCP2Parse
  • iso8859_8 : CTCP2Parse
  • iso8859_9 : CTCP2Parse
  • IsoConvert() : CvsPrefs
  • IsRadio() : CPseudoToggle
  • IsRectEmpty() : URect
  • IsRectNull() : URect
  • IsRecursive() : KoFileViewTraversalContext, TViewFill, KoTraversalContext
  • IsRemoved() : EntnodeData, KoFilterModel
  • IsResolved() : EntnodeData
  • IsRightDocked() : CCJControlBar
  • IsSamePath() : CBrowseFileView, CTCLBrowserEnt
  • IsSelected() : CWincvsView, CCJHexEdit
  • IsSelSingleNode() : CGraphView
  • IsShowIgnored() : KoFileViewTraversalContext, TViewFill, KoTraversalContext, KoIgnoreModel, KiIgnoreModel
  • IsShowMissing() : KoFileViewTraversalContext
  • IsShowModified() : KoFileViewTraversalContext
  • IsShowRecursive() : KoRecursionModel, KiRecursionModel
  • IsShowUnknown() : KoFileViewTraversalContext
  • IsSmallIconView() : CGfxOutBarCtrl
  • IsSortAscendant() : UCvsFiles
  • IsTclFileRunning() : CvsPrefs
  • IsTopDocked() : CCJControlBar
  • IsUIValid() : UWidget
  • IsUnicode() : ReportConflict
  • isUnicode : ReportConflict
  • IsUnknown() : EntnodeData, KoFilterModel
  • IsUnmodified() : EntnodeData
  • IsUserState() : CWinLogData
  • IsValid() : PyAutoObject< T >
  • IsValidButton() : CCJMenuBar
  • IsValidItem() : CGfxOutBarCtrl
  • IsVertDocked() : CCJControlBar
  • IsVisited() : EntnodeData
  • IsWin95() : CCJFlatComboBox
  • iSysColorTo : CJX_COLORMAP
  • italic : UCvsConsole, ansiAttrCvt
  • italicCnt : CTCP2Parse
  • italicLast : CTCP2Parse
  • item : UTREE_INFO
  • items() : CToolBarData

- k -

  • kBrowserPopup : UCvsFrame
  • kCancel : UEditMessage, UPromptMessage
  • kConflict : EntnodeFile, ColumnIndex
  • kDefaultPrecision : TPseudoDoubleNumberText
  • kDefRev1Change : CDiff_MAIN
  • kDefRev2Change : CDiff_MAIN
  • kDefTypeChange : CDiff_MAIN
  • kDirCombo : UCvsFrame
  • kDrawing : UCvsGraph
  • kEdit : UEditMessage
  • kEncoding : EntnodeFile, ColumnIndex
  • kEnd : ColumnIndex
  • kEndHandle : KoWatcher
  • kExt : EntnodeFile
  • kExtention : ColumnIndex
  • key : CustInvertTable
  • Keyword : USmartCombo
  • KillChildWindow() : CCJCaption
  • KillThread() : CLogoutThread
  • kind : ReportWarning, TbEntry
  • Kind() : ReportWarning
  • kInputChange : CDiff_MAIN
  • KiSelectionHandler() : KiSelectionHandler
  • kItemImgBlank : CItemListDlg
  • kItemImgBranch : CItemListDlg
  • kItemImgBranchAndRevision : CItemListDlg
  • kItemImgDir : CItemListDlg
  • kItemImgFile : CItemListDlg
  • kItemImgModule : CItemListDlg
  • kItemImgRevision : CItemListDlg
  • kItemImgUpDir : CItemListDlg
  • kMsg : UEditMessage, UPromptMessage
  • kMultiClickSelection : TPseudoTextListView
  • kName : EntnodeData, ColumnIndex
  • kNotifyHandle : KoWatcher
  • KoAddBinaryHandler() : KoAddBinaryHandler
  • KoAddHandler() : KoAddHandler
  • KoAddUnicodeHandler() : KoAddUnicodeHandler
  • KoAnnotateHandler() : KoAnnotateHandler
  • KoCancelChangesHandler() : KoCancelChangesHandler
  • KoCheckoutHandler() : KoCheckoutHandler
  • KoColumnContext() : KoColumnContext
  • KoCommandLineHandler() : KoCommandLineHandler
  • KoCommitHandler() : KoCommitHandler
  • KoDiffHandler() : KoDiffHandler
  • KoEditorsHandler() : KoEditorsHandler
  • KoFileActionHandler() : KoFileActionHandler
  • KoFileRemoveHandler() : KoFileRemoveHandler
  • KoFileViewTraversalContext() : KoFileViewTraversalContext
  • KoFilterModel() : KoFilterModel
  • KoGraphAnnotateHandler() : KoGraphAnnotateHandler
  • KoGraphDiffHandler() : KoGraphDiffHandler
  • KoGraphHandler() : KoGraphHandler
  • KoIgnoreModel() : KoIgnoreModel
  • KoImportHandler() : KoImportHandler
  • kOK : UEditMessage, UPromptMessage
  • KoLockHandler() : KoLockHandler
  • KoLogHandler() : KoLogHandler
  • KoMoveToTrashHandler() : KoMoveToTrashHandler
  • kOption : EntnodeFile, ColumnIndex
  • KoQueryUpdateHandler() : KoQueryUpdateHandler
  • KoRecursionModel() : KoRecursionModel
  • KoReleaseHandler() : KoReleaseHandler
  • KoStatusHandler() : KoStatusHandler
  • KoTraversalContext() : KoTraversalContext
  • KoUneditHandler() : KoUneditHandler
  • KoUnlockHandler() : KoUnlockHandler
  • KoUpdateHandler() : KoUpdateHandler
  • KoUpdateMoveToTrashHandler() : KoUpdateMoveToTrashHandler
  • KoWatcher() : KoWatcher
  • KoWatchersHandler() : KoWatchersHandler
  • KoWatchOffHandler() : KoWatchOffHandler
  • KoWatchOnHandler() : KoWatchOnHandler
  • kPath : EntnodeData, ColumnIndex
  • kProcessTimer : UCvsApp
  • kPseudoWinAdorner : TPseudoWinAdorner
  • kPseudoWinBehavior : TPseudoWinBehavior
  • kRevision : ColumnIndex
  • kSelectionChanged : TPseudoTextListView
  • KserverPort() : CvsPrefs
  • kStartHandle : KoWatcher
  • kState : EntnodeData, ColumnIndex
  • kStdDoubleNumberText : TPseudoDoubleNumberText
  • kStickyTag : ColumnIndex
  • kTag : EntnodeFile
  • kTerminateHandle : KoWatcher
  • kTextStringListViewSignature : TPseudoTextListView
  • kTimeStamp : ColumnIndex
  • kTS : EntnodeFile
  • kUDispatchHandled : UCmdTarget
  • kUNoDispatchInfo : UCmdTarget
  • kVN : EntnodeFile

- l -

  • lAnimationTickCount : CGfxOutBarCtrl
  • LastWorkingDir() : CvsPrefs
  • Layout() : CCJToolBar
  • left : URECT
  • length() : UStr, UPStr
  • LineTo() : UDC
  • list_t : TMString< T >, TMPersistent< T >
  • ListenToMessage() : LPseudoWinAttachment, UPseudoPageHider, UPseudoPlaceHolder
  • LMainPseudoAttachment() : LMainPseudoAttachment
  • load() : CvsPrefs
  • Load() : CCJMemFile
  • LoadAll() : CPersistent
  • LoadBarState() : CCJMDIFrameWnd, CCJFrameWnd, CCJControlBar
  • LoadBitmap() : CCJToolBar
  • LoadCheckmarkBitmap() : CCJMenu
  • LoadColumns() : CBrowseFileView, UCvsFiles
  • LoadColumnWidths() : CCJListView, CCJListCtrl
  • LoadDefaults() : MacBinMaps
  • LoadDockState() : CMainFrame
  • LoadFromResource() : CCJHtmlView
  • LoadFromToolBar() : CCJMenu
  • loadIcon() : CPseudoButton
  • LoadLocationSettings() : CMainFrame
  • LoadMenu() : CCJMenuBar, CCJMenu
  • LoadSettings() : KoIgnoreModel, KoRecursionModel, KoFilterModel, KiFilterBase
  • LoadSysColorBitmap() : CCJMenu
  • LoadToolbar() : CCJMenu
  • LoadToolBar() : CCJToolBar
  • LoadToolbars() : CCJMenu
  • LoadWindowPos() : CCJWindowPlacement
  • LoadXPM() : CPseudoButton
  • LoadXPMs() : CPseudoRotButton
  • Location() : CSortList< T >
  • logfont : CCJTreeCtrl::Color_Font
  • LogoutTimeOut() : CvsPrefs
  • LookForResourceFile() : CWincvsApp
  • Lookup() : CSubclassWndMap
  • lpEntries : UMSGMAP
  • LPseudoDrawAttachment() : LPseudoDrawAttachment
  • LPseudoWinAttachment() : LPseudoWinAttachment
  • LSReport() : LSReport
  • Lt_Blue : CTCP2Parse
  • Lt_Cyan : CTCP2Parse
  • Lt_Green : CTCP2Parse
  • Lt_Grey : CTCP2Parse
  • Lt_Magenta : CTCP2Parse
  • Lt_Red : CTCP2Parse
  • Lt_Yellow : CTCP2Parse

- m -

  • m_abort : CProgressDlg, CProgress
  • m_actionCombo : CMultilineEntryDlg
  • m_addbtn : CCustomizeMenus
  • m_addDefault : CCmdLine_MAIN
  • m_addSelection : CCmdLine_MAIN
  • m_addSelectionCheck : CCmdLine_MAIN
  • m_alertMessage : CCVSAlert_MAIN
  • m_alertMessageEdit : CCVSAlert_MAIN
  • m_alertMessageFont : CCVSAlert_MAIN
  • m_alertTitle : CvsAlert
  • m_all : PyRegistry
  • m_allfiles : CTmpFiles
  • m_allItems : TMPersistent< T >
  • m_allowExtDiff : CDiff_MAIN
  • m_allRevs : TGraphDelCmd
  • m_allStrs : TMString< T >
  • m_AllSubMenus : CCJMenu
  • m_altCvs : CGetPrefs_CVS
  • m_altCvsCombo : CGetPrefs_CVS
  • m_alwaysroot : CGetPrefs_GLOBALS
  • m_annotateType : CAnnotate_MAIN
  • m_aPans : CCJStatusBar
  • m_apply : CGraphOptDlg
  • m_ar : _afxRichEditCookie
  • m_arg1 : CMsg
  • m_arg2 : CMsg
  • m_ArrowRect : CCJColorPicker
  • m_arStrings : CCJMenuBar
  • m_asc : CSelectionDetailsDlg::CompareInfo, CItemListDlg::CompareInfo, CDiff_Options::CompareInfo
  • m_ascendant : CBrowseFileView, UCvsFiles
  • m_Attach : UPseudoFakePane
  • m_autoClose : CCvsStreamConsole
  • m_autoDelete : KiSelectionHandler
  • m_autoRefreshCombo : CItemListDlg
  • m_bActive : CCJColorPicker
  • m_bAddressIsWide : CCJHexEdit
  • m_bAdjustToFit : CCJHyperLink
  • m_bAltColor : CCJFlatButton
  • m_bAscending : CCJListView, CCJListCtrl
  • m_bAutoComp : CCJFlatComboBox
  • m_bAutodelete : CCJStatusBarPaneControlInfo
  • m_bAutoRemoveFrameMenu : CCJMenuBar
  • m_bAutoSave : CCJListView, CCJListCtrl, CCJControlBar
  • m_bBoldFont : CCJFlatHeaderCtrl
  • m_bButtons : CCJControlBar
  • m_bDelayedButtonLayout : CCJToolBar
  • m_bDragging : CCJSizeDockBar, CCJControlBar
  • m_bEscapeWasPressed : CCJMenuBar
  • m_bExStyle : CCJToolBarBase
  • m_bFlatBorder : CCJSizeDockBar, CCJControlBar
  • m_bFlatGripper : CCJControlBar
  • m_bFlatLook : CCJFlatButton
  • m_bFlatSplitter : CCJFlatSplitterWnd
  • m_bFloating : CCJControlBar
  • m_bGripper : CCJControlBar
  • m_bHalfPage : CCJHexEdit
  • m_bHasArrows : CCJFlatTabCtrl
  • m_bHasFocus : CCJFlatComboBox
  • m_bHasHomeEnd : CCJFlatTabCtrl
  • m_bHeaderFilters : CSortHeaderCtrl
  • m_bHilight : CCJOutlookBar
  • m_bInReBar : CCJToolBarBase
  • m_bIsDockBar : CCJSizeDockBar
  • m_bitmap : CSplashWnd, CDynToolBar, CPseudoButton
  • m_bitmapBackground : CCJMenu
  • m_bitmapBackgroundFlag : CCJMenu
  • m_bitmaps : CPseudoRotButton
  • m_bLBDown : CCJOutlookBar
  • m_bLBtnDown : CCJFlatHeaderCtrl, CCJFlatComboBox, CCJFlatButton, CCJColorPicker
  • m_bMaskKeyInProgress : CCJMaskEdit
  • m_bMaximized : CCJControlBar
  • m_bMouseOver : CCJFlatButton
  • m_bMultiSelect : CCJTreeCtrl
  • m_bNoAddressChange : CCJHexEdit
  • m_bNoColSizing : CCJListView, CCJListCtrl
  • m_bOkToDrag : CCJSizeDockBar, CCJControlBar
  • m_BoldFont : CCJFlatTabCtrl
  • m_bOpen : CCJMemFile
  • m_bOpenFileDialog : CCJBrowseButton
  • m_bOptionChecked : COptionalPropertySheet
  • m_bOverControl : CCJHyperLink
  • m_bPainted : CCJFlatComboBox, CCJFlatButton
  • m_bpr : CCJHexEdit
  • m_bProcessLeftArrow : CCJMenuBar
  • m_bProcessRightArrow : CCJMenuBar
  • m_branchColor : CGraphOptDlg
  • m_branchPointMerge : CUpdateMerge
  • m_branchPointMergeCheck : CUpdateMerge
  • m_bRestart : TGraphCurSelector
  • m_bRestoreFocus : CMainFrame
  • m_browse1TagButton : CUpdateMerge
  • m_browse2TagButton : CUpdateMerge
  • m_browseHist : CMainFrame
  • m_browser : CBrowserBar
  • m_browseReadFromButton : CItemListDlg
  • m_browseTag1Button : CDiff_MAIN
  • m_browseTag2Button : CDiff_MAIN
  • m_browseTagButton : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CAnnotate_MAIN
  • m_brush : UDC
  • m_bShowAddress : CCJHexEdit
  • m_bShowAscii : CCJHexEdit
  • m_bShowDropArrow : CCJToolBar
  • m_bShowHex : CCJHexEdit
  • m_bSortAsc : CSortHeaderCtrl, CCJFlatHeaderCtrl
  • m_bStartup : CTipDlg
  • m_bTabsOnBottom : CCJFlatTabCtrl
  • m_btnBrowse : CCJBrowseEdit
  • m_btnClose : CCJControlBar
  • m_btnMinim : CCJControlBar
  • m_bToFit : CCJControlBar
  • m_bToolTipsEnabled : CCJTabCtrlBar
  • m_bTrackSelection : CCJColorPicker
  • m_buf : UCvsConsole, CBuffer, CStaticAllocT< T >
  • m_buffer : CPathBuffer, TMString< T >, TMPersistent< T >
  • m_bufferSize : CPathBuffer
  • m_bufsize : CStaticAllocT< T >
  • m_bUnderline : CCJHyperLink
  • m_bUnique : CCJControlBar
  • m_bUpdate : CCJHexEdit
  • m_bUseMask : CCJMaskEdit
  • m_bVisited : CCJHyperLink
  • m_c : PyRegistry
  • m_CacheWidgets : LPseudoWinAttachment
  • m_cancelButton : CProgressDlg, CItemListDlg, CCvsRootDlg, CCVSAlert_MAIN
  • m_cancelButtonTitle : CvsAlert
  • m_Caption : CCJExplorerBar, CCJCaptionPopupWnd
  • m_CaptionButton : CCJExplorerBar, CCJCaptionPopupWnd, CCJCaption
  • m_caseSensitiveNames : CUpdateOptions
  • m_checkChanges : CBrowseFileView
  • m_checkoutDir : CCheckout_MAIN
  • m_checkoutDirEdit : CCheckout_MAIN
  • m_checkoutro : CGetPrefs_GLOBALS
  • m_checkPath : CCmdLine_MAIN
  • m_checkPathCheck : CCmdLine_MAIN
  • m_checkUnmod : CTag_MAIN
  • m_checkUnmodCheck : CTag_MAIN
  • m_checkValidEdits : CCommit_OPTIONS
  • m_ClassNameToImageIndexMap : CCJTabCtrlBar
  • m_clearButton : CCvsRootDlg
  • m_clrAltHilite : CCJFlatButton
  • m_clrAltNormal : CCJFlatButton
  • m_clrAltShadow : CCJFlatButton
  • m_clrAltTextNm : CCJFlatButton
  • m_clrBackgnd : CCJCaption
  • m_clrBkgnd : CCJFontCombo
  • m_clrBorder : CCJCaption
  • m_clrBtnFace : CCJCaption
  • m_clrBtnHilite : CCJCaption
  • m_clrBtnShadow : CCJCaption
  • m_clrDkShad : CCJOutlookBar, CCJFlatButton
  • m_clrFont : CCJCaption
  • m_clrHilight : CCJFontCombo
  • m_clrHilightText : CCJFontCombo
  • m_clrHilite : CCJOutlookBar, CCJFlatComboBox, CCJFlatButton
  • m_clrNormal : CCJOutlookBar, CCJFlatComboBox, CCJFlatButton
  • m_clrNormalText : CCJFontCombo
  • m_clrShadow : CCJOutlookBar, CCJFlatComboBox, CCJFlatButton
  • m_clrText : CCJListView, CCJListCtrl
  • m_clrTextBk : CCJListView, CCJListCtrl
  • m_clrTextGy : CCJFlatButton
  • m_clrTextNm : CCJOutlookBar, CCJFlatButton
  • m_cmd : UTimer, CPseudoList
  • m_cmdid : CPseudoItem, LPseudoDrawAttachment, CPseudoDraw
  • m_cmdLine : CCmdLine_MAIN
  • m_cmdsList : CCustomizeMenus
  • m_cmdui : PyCmdUI
  • m_cncl : UPromptMessage
  • m_cntladd : CGetPrefs_GLOBALS
  • m_color : CColorStatic
  • m_column : CSelectionDetailsDlg::CompareInfo, CItemListDlg::CompareInfo, CDiff_Options::CompareInfo, CSortParam
  • m_columnAlt : CSortParam
  • m_columnIndex : CFilterSelectionDlg
  • m_compareType : CDiff_MAIN
  • m_compareTypeCombo : CDiff_MAIN
  • m_conflict : EntnodeFile
  • m_console : PyColorConsole
  • m_consolebar : CMainFrame
  • m_contentsCombo : CFilterSelectionDlg
  • m_context : TViewFill, KoFilterModel, CSortParam
  • m_continue : UCmdUI
  • m_copy : CSaveSettingsDlg
  • m_copyCheck : CSaveSettingsDlg
  • m_copyFrom : CSaveSettingsDlg
  • m_copyFromPathCombo : CSaveSettingsDlg
  • m_count : KoWatcher
  • m_countSel : TGraphDelCmd
  • m_crColor : CCJColorPopup
  • m_crColorBk : CCJColorPicker
  • m_crColors : CCJColorPopup
  • m_crColorText : CCJColorPicker
  • m_createmissdir : CUpdateMain
  • m_createSandbox : CImport_OPTIONS
  • m_crHoverColor : CCJHyperLink
  • m_crInitialColor : CCJColorPopup
  • m_crLinkColor : CCJHyperLink
  • m_crVisitedColor : CCJHyperLink
  • m_csText : CContentItems
  • m_cstr : PyPersistent
  • m_ctrlHeader : CBrowseFileView
  • m_ctrlPressedOnOK : CMultiLineEditDialogKeyHelper, CGetPrefs_CVSCMD_DIALOGS
  • m_curHSplitBar : CCJSizeDockBar
  • m_curindex : CPseudoRotButton
  • m_curModal : UWidget
  • m_currentAddress : CCJHexEdit
  • m_currentMode : CCJHexEdit
  • m_currentOptions : CDiff_Options
  • m_currentPage : UWidget
  • m_curSize : CBuffer
  • m_curVSplitBar : CCJSizeDockBar
  • m_CustomTextRect : CCJColorPopup
  • m_cvsConsole : CGetPrefs_CVS
  • m_cvsConsoleCheck : CGetPrefs_CVS
  • m_cvsErr : CItemListConsole, CCvsRootConsole
  • m_CvsGuiSfUrl : CAboutDlg
  • m_cvsOut : CItemListConsole, CCvsRootConsole
  • m_CvsProcess : CWincvsApp
  • m_cvsProtocolList : CCvsRootParser, CInfoParserConsole
  • m_cvsroot : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCvsRootDlg, CCheckout_MAIN
  • m_cvsrootCombo : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_cvsRootParser : CCvsRootDlg
  • m_cvsrootStatic : CCvsRootDlg
  • m_CvsRunning : CWincvsApp
  • m_cvsStopped : CItemListDlg, CCvsRootDlg
  • m_CvsStopping : CWincvsApp
  • m_cx : CCJCaption
  • m_cxOffset : CCJControlBar
  • m_cxText : CCJStatusBarPane
  • m_cy : CCJCaption
  • m_cyOffset : CCJControlBar
  • m_data : TBrowserFillDummy, UCvsGraph, TBrowserFillDummy, PyCvsEntry, CPseudoItem
  • m_date : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, EntnodeFile
  • m_date1 : CUpdateMerge
  • m_date1Combo : CUpdateMerge
  • m_date2 : CUpdateMerge
  • m_date2Combo : CUpdateMerge
  • m_dateCombo : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg
  • m_deadNodeColor : CGraphOptDlg
  • m_defaultButton : CCVSAlert_MAIN
  • m_DefaultTextRect : CCJColorPopup
  • m_defBranch : CLogMain
  • m_delAllCheck : CRelease_MAIN
  • m_delCvsInfoCheck : CRelease_MAIN
  • m_delDirCheck : CRelease_MAIN
  • m_desc : CImportEntry, CImportWarning
  • m_description : ItemDisplayInfo, ItemRowInfo, CEditKeywordDlg, KeywordInfo
  • m_descriptionEx : ItemDisplayInfo, ItemRowInfo
  • m_didInteract : CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS
  • m_didSetIt : CTempToggleBool, CTurnOffDispatching
  • m_didSetSemaphore : USemaphore
  • m_diffOptions : CDiff_Options, CDiff_MAIN
  • m_diffOptionsCombo : CDiff_MAIN
  • m_diffProg : CGetPrefs_WINCVS
  • m_diffProgEdit : CGetPrefs_WINCVS
  • m_diffType : CDiff_MAIN
  • m_dir : UCvsGraph, CRelease_MAIN
  • m_dirname : TBrowserFillDummy
  • m_disableSplashScreen : CGetPrefs_GLOBALS
  • m_disbitmap : CPseudoButton
  • m_disbitmaps : CPseudoRotButton
  • m_diskNode : TGraphCurSelector
  • m_disknodeEntryInfo : TGraphCurSelector
  • m_dlg : CProgress
  • m_doc : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry, PyRegistry
  • m_dontCreateVendorTag : CImport_MAIN
  • m_dontCreateVendorTagCheck : CImport_MAIN
  • m_dontShortenPaths : CCheckout_MAIN
  • m_dontShortenPathsCheck : CCheckout_MAIN
  • m_downbtn : CCustomizeMenus
  • m_dwData : CCJSortClass::CSortItem
  • m_dwDragStart : CCJTreeCtrl
  • m_dwError : _afxRichEditCookie
  • m_dwExStyle : CCJCaption
  • m_dwFlags : CCJBrowseButton
  • m_dwTextStyle : CCJCaption
  • m_eAuxIndex : CCJControlBar
  • m_eChildBorder : CCJControlBar
  • m_edit : CImportFilterDlg, UEditMessage
  • m_editButton : CCvsRootDlg
  • m_editPos : CCJHexEdit
  • m_editPositionEdit : CMultilineEntryDlg
  • m_empty : TBrowserFillDummy
  • m_encoding : EntnodeFile
  • m_encryptCommunication : CGetPrefs_GLOBALS
  • m_enteredTwice : USemaphore
  • m_entries : TBrowserFill, TViewFill, TBrowserFill, UCvsFiles, TViewFill, CFillTclEntries, CFillPyEntries, CImportFilterDlg, CImport_OPTIONS
  • m_entriesLogMod : CBrowseFileView, UCvsFiles
  • m_entriesMod : CBrowseFileView, UCvsFiles
  • m_entryStatic : CMultilineEntryDlg
  • m_entryText : CMultilineEntryDlg
  • m_entryTextCtrl : CMultilineEntryDlg
  • m_entryTextCtrlWrap : CMultilineEntryDlg
  • m_err : CPyCvsConsole
  • m_eType : CCJBrowseEdit, CCJBrowseButton
  • m_ev : CMsg
  • m_export : CCheckout_MAIN
  • m_ext : EntnodeFile
  • m_extDiff : CDiff_MAIN
  • m_extDiffButton : CDiff_MAIN
  • m_extDiffSelButton : CGetPrefs_WINCVS
  • m_fAccendant : CSortParam
  • m_fAllEntries : CPersistent
  • m_fClass : CPersistent::CPersistentEntry
  • m_fData : CGraphDoc
  • m_fDefValue : CPersistentT< T >
  • m_fDir : CGraphDoc
  • m_feature : USmartCombo
  • m_fGroupSubDir : CSortParam
  • m_File : CCJMemFile
  • m_fileAction : CGetPrefs_CVSCMD_DIALOGS, CFileAction_MAIN
  • m_fileActionCombo : CFileAction_MAIN
  • m_fileActionDescStatic : CFileAction_MAIN
  • m_fileName : SelectionDisplayInfo
  • m_fileNameCheck : CSelectionDetailsDlg
  • m_fileOut : CCvsStreamConsole
  • m_filesBuffer : CMfFileDialog
  • m_fileToDiffCombo : CCommit_MAIN
  • m_filter : CMainFrame, KoFileViewTraversalContext, UCvsFrame, KoTraversalContext
  • m_filterBarFilters : CBrowseFileView
  • m_filterCombo : CFilterSelectionDlg
  • m_filterMask : KoFilterModel
  • m_filterMasksEnable : KoFilterModel
  • m_filters : KoFilterModel
  • m_filterText : CFilterSelectionDlg
  • m_firstFocus : CMultilineEntryDlg
  • m_firstSel : TGraphCurSelector
  • m_flag : CPseudoToggle
  • m_fName : CGraphDoc
  • m_fNode : CGraphDoc
  • m_folderBuffer : CMfFileDialog
  • m_folderLoc : CCmdLine_MAIN
  • m_folderLocCombo : CCmdLine_MAIN
  • m_font : UCvsConsole
  • m_Font : CCJTabCtrl, CCJOutlookBar, CCJMenuBar, CCJMaskEdit, CCJLogoPane, CCJHyperLink, CCJHexEdit, CCJFlatTabCtrl, CCJFlatHeaderCtrl, CCJFlatButton, CCJColorPopup, CCJCaption, CCJBrowseButton
  • m_fontNormal : CMainFrame
  • m_force : CAnnotate_MAIN
  • m_forceCheck : CAnnotate_MAIN
  • m_forceCommit : CCommit_OPTIONS
  • m_forceRecurse : CCommit_OPTIONS
  • m_forceRevision : CCommit_OPTIONS
  • m_forceRoot : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_forceRootCheck : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_foundIt : CFindSettings
  • m_frameHook : CCJMenuBar
  • m_fRtfFormat : CWincvsView
  • m_fSel1 : TGraphCmdStatus
  • m_fSel2 : TGraphCmdStatus
  • m_fTimeStamp : CPersistent
  • m_fullpath : EntnodeData, EntnodePath
  • m_fUniqueName : CPersistent::CPersistentEntry
  • m_fValue : CPersistentT< T >, CPersistent::CPersistentEntry
  • m_garbage : CCustInvertTable
  • m_getcleancopy : CUpdateMain
  • m_gotProblem : ControlCvsArgs
  • m_group : CPseudoToggle
  • m_grpBox : CTag_MAIN, CRtag_OPTIONS, CRtag_MAIN
  • m_handles : KoWatcher
  • m_hascvs : TBrowserFill, TBrowserFillDummy
  • m_hasDate : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg
  • m_hasDate1 : CUpdateMerge
  • m_hasDate1Check : CUpdateMerge
  • m_hasDate2 : CUpdateMerge
  • m_hasDate2Check : CUpdateMerge
  • m_hasDateCheck : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg
  • m_hasOne : CWinPlacement
  • m_hasPY : CWincvsApp, UCvsApp
  • m_hasRev : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CAnnotate_MAIN
  • m_hasRevCheck : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CAnnotate_MAIN
  • m_hasSelection : CCmdLine_MAIN
  • m_hasState : CLogFilters
  • m_hasStateCheck : CLogFilters
  • m_hasTCL : CWincvsApp, UCvsApp
  • m_hasUser : CLogFilters
  • m_hasUserCheck : CLogFilters
  • m_hasVendorBranch : CImport_OPTIONS
  • m_hAutoCommandWnd : CWndAutoCommand
  • m_hAuxIcon : CCJControlBar
  • m_hbmImageWell : CCJToolBar
  • m_hCursor : CCJFlatButton
  • m_hDesc : CKeywordComboBox
  • m_headerColor : CGraphOptDlg
  • m_headerCtrl : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • m_headerDesc : CLogMain
  • m_headerDescCheck : CLogMain
  • m_headerOnly : CLogMain
  • m_headerOnlyCheck : CLogMain
  • m_height : CColorMenu
  • m_heightOfLines : CBrowseFileView
  • m_helpinit : CInit_MAIN
  • m_helpLogin : CLogin_MAIN
  • m_hEndArrow : CCJFlatTabCtrl
  • m_hEndArrowDisabled : CCJFlatTabCtrl
  • m_hEnhMetaFile : CCJMetaFileButton
  • m_hEnhMetaFileDisabled : CCJMetaFileButton
  • m_hEnhMetaFileFocus : CCJMetaFileButton
  • m_hEnhMetaFileSel : CCJMetaFileButton
  • m_hhelpIDs : CHHelpSupport
  • m_hHomeArrow : CCJFlatTabCtrl
  • m_hHomeArrowDisabled : CCJFlatTabCtrl
  • m_hIcon : CCJExplorerBar, CCJControlBar, CCJCaption, CCJBrowseButton
  • m_hIconOff : CCJCaptionPopupWnd
  • m_hIconOn : CCJCaptionPopupWnd
  • m_hideAnnotate : CGetPrefs_CVSCMD_DIALOGS
  • m_hideDiff : CGetPrefs_CVSCMD_DIALOGS
  • m_hideGraph : CGetPrefs_CVSCMD_DIALOGS
  • m_hideLog : CGetPrefs_CVSCMD_DIALOGS
  • m_hideStatus : CGetPrefs_CVSCMD_DIALOGS
  • m_hideUpdate : CGetPrefs_CVSCMD_DIALOGS
  • m_hInstImageWell : CCJToolBar
  • m_hItemFirstSel : CCJTreeCtrl
  • m_hKeyRoot : CCJToolBar
  • m_hLeftArrow : CCJFlatTabCtrl
  • m_hLeftArrowDisabled : CCJFlatTabCtrl
  • m_hLinkCursor : CCJHyperLink
  • m_hMenu : CCJMDIChildWnd
  • m_hMenuTracking : CCJMenuBar
  • m_home : CGetPrefs_CVS
  • m_homeEdit : CGetPrefs_CVS
  • m_hParentDlg : CMultiLineEditDialogKeyHelper
  • m_hProcess : CEditorMonDlg
  • m_hPushed : CCJFlatButton
  • m_hRightArrow : CCJFlatTabCtrl
  • m_hRightArrowDisabled : CCJFlatTabCtrl
  • m_hRsrcImageWell : CCJToolBar
  • m_hWnd : KoWatcher, CSubclassWnd
  • m_hWndParent : CProgressDlg
  • m_iActualSize : CCJSizeDockBar
  • m_iClientHeight : CCJFlatTabCtrl
  • m_iClientWidth : CCJFlatTabCtrl
  • m_icon : CvsAlert
  • m_iconStatic : CCVSAlert_MAIN
  • m_iconX : CCJMenu
  • m_iconY : CCJMenu
  • m_iCurSel : CCJFlatTabCtrl
  • m_idletime : CWincvsApp
  • m_ignlist : TBrowserFill, TViewFill, TBrowserFill, TViewFill, CFillTclEntries, CFillPyEntries, ImportReport
  • m_ignore : CMainFrame, UCvsFrame
  • m_ignoreCase : CDiff_MAIN
  • m_ignoreCaseCheck : CDiff_MAIN
  • m_ignored : EntnodeData
  • m_ImageList : CCJControlBar
  • m_imageList : CWinCvsBrowser, CHistComboBoxEx, CGraphView, CImportFilterDlg
  • m_index : MultiFilesEntryIndex
  • m_indic : CCvsStatusBar
  • m_iNewPopup : CCJMenuBar
  • m_info : CDynToolBar
  • m_interruptable : CProgressDlg
  • m_iPopupTracking : CCJMenuBar
  • m_iSafeSpace : CCJSizeDockBar
  • m_isBackgroundProcess : CWincvsApp
  • m_isCheckout : CUpdateMerge
  • m_isDate : CAnnotate_MAIN
  • m_isDate1 : CDiff_MAIN
  • m_isDate1Check : CDiff_MAIN
  • m_isDate2 : CDiff_MAIN
  • m_isDate2Check : CDiff_MAIN
  • m_isDateCheck : CAnnotate_MAIN
  • m_isFiles : KoUpdateMoveToTrashHandler
  • m_isFilesChange : CBrowseFileView
  • m_isFolders : KoUpdateMoveToTrashHandler
  • m_isHideMissing : TBrowserFill
  • m_isHideUnknown : TBrowserFill
  • m_isIgnore : KoIgnoreModel
  • m_isRecursive : KoWatcher, CBrowseFileView, KoFileViewTraversalContext, UCvsFiles, KoTraversalContext, KoRecursionModel
  • m_isResetViewLocked : CBrowseFileView
  • m_isResetViewPending : CBrowseFileView
  • m_isShowIgnored : KoFileViewTraversalContext, TBrowserFill, TViewFill, KoTraversalContext
  • m_item : TBrowserFill, TBrowserFillDummy, TBrowserFill, TBrowserFillDummy, CItemListDlg, ItemDisplayInfo
  • m_itemEdit : CItemListDlg
  • m_itemLabelStatic : CItemListDlg
  • m_itemList : CItemListDlg, CItemListConsole
  • m_itemListCtrl : CItemListDlg
  • m_itemsImageList : CItemListDlg
  • m_iTotalTabWidth : CCJFlatTabCtrl
  • m_iTrackingState : CCJMenuBar
  • m_iXOffset : CCJFlatTabCtrl
  • m_keyForce : CGetPrefs_CVSCMD_DIALOGS
  • m_keyword : CUpdateOptions, USmartCombo, CDiff_MAIN, CEditKeywordDlg, KeywordInfo
  • m_keywordCombo : CUpdateOptions, CDiff_MAIN
  • m_keywordDescStatic : CUpdateOptions, CDiff_MAIN, CCvsRootDlg
  • m_keywordList : CCvsRootDlg, CProtocolParserConsole
  • m_lap : UTimer
  • m_lastCheckinTime : CUpdateOptions
  • m_lastlap : UTimer
  • m_lastRect : LPseudoWinAttachment
  • m_lastSel : TGraphCurSelector
  • m_launchRes : CItemListConsole, CCvsRootConsole
  • m_launchType : CFileAction_MAIN
  • m_length : CCJHexEdit
  • m_lineHeight : CCJHexEdit
  • m_list : CFindSettings, CImportFilterDlg
  • m_listeners : UWidget
  • m_listPath : CItemListDlg
  • m_locked : EntnodeData
  • m_logGraph : CWincvsApp
  • m_logMsg : CImport_MAIN, CCommit_MAIN
  • m_logout : CGetPrefs_GLOBALS
  • m_logoutCheck : CGetPrefs_GLOBALS
  • m_logoutEdit : CGetPrefs_GLOBALS
  • m_logoutSpinButton : CGetPrefs_GLOBALS
  • m_logoutTime : CGetPrefs_GLOBALS
  • m_logTempl : CWincvsApp
  • m_lookAttic : CRtag_MAIN
  • m_lpp : CCJHexEdit
  • m_lpszClassName : URuntimeClass
  • m_mainFrame : CWincvsApp, UCvsApp
  • m_mainInterpreter : CPython_Interp
  • m_manager : KoIgnoreModel, KoRecursionModel, KoFilterModel
  • m_mapColorFont : CCJTreeCtrl
  • m_mask : KoFilterMask
  • m_match : CUpdateOptions
  • m_matchCheck : CUpdateOptions
  • m_matchEntriesCase : CGetPrefs_GLOBALS
  • m_maxStr : TMString< T >
  • m_Menu : CCustomizeMenus
  • m_menu : CCJFrameWnd, PyMenuMgr
  • m_menuList : CCustomizeMenus, CCJMDIFrameWnd
  • m_MenuList : CCJMenu
  • m_mergeColor : CGraphOptDlg
  • m_mergeType : CUpdateMerge
  • m_mergeTypeCombo : CUpdateMerge
  • m_message : CvsAlert
  • m_messageDetails : CCVSAlert_MAIN, CvsAlert
  • m_messageDetailsEdit : CCVSAlert_MAIN
  • m_methods : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • m_mf : CMultilineEntryDlg, CMfFileDialog, CUpdateMerge, CUpdateOptions, CTemplateDlg, CTag_MAIN, CSelectionDetailsDlg, CRtag_OPTIONS, CRtag_MAIN, CLogFilters, CCmdLine_MAIN, CItemListDlg, CImport_OPTIONS, CImport_MAIN, CFileAction_MAIN, CDiff_MAIN, CCommit_OPTIONS, CCommit_MAIN, CCheckout_MAIN, CAnnotate_MAIN
  • m_mfi : MultiFilesEntryIndex
  • m_missing : EntnodeData
  • m_modalRes : UWidget
  • m_modelColumns : CBrowseFileView, UCvsFiles
  • m_modeSet : CCvsStreamConsole
  • m_moduleCombo : CRtag_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_moduleDescStatic : CRtag_MAIN
  • m_moduleName : CRtag_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_movDelBranch : CTag_MAIN, CRtag_MAIN
  • m_msg : UPromptMessage
  • m_multiLineEditDialogKeyHelper : CMultilineEntryDlg
  • m_multilineEntryDlg : CCmdLine_MAIN, CImport_MAIN, CCommit_MAIN, CAdminOption_MAIN
  • m_multilineEntryPlaceholder : CCmdLine_MAIN, CImport_MAIN, CCommit_MAIN, CAdminOption_MAIN
  • m_multilineEntryType : CMultilineEntryDlg
  • m_nActiveTab : CCJTabView, CCJTabCtrlBar
  • m_name : UCvsGraph, KeywordDisplayInfo, EntnodeData
  • m_nBarNumber : CCJToolBar
  • m_nBorder : CCJCaption
  • m_nBoxSize : CCJColorPopup
  • m_nButtons : CCJToolBar
  • m_nChosenColorSel : CCJColorPopup
  • m_nCount : CCJMDIChildWnd
  • m_nCurrentSel : CCJColorPopup
  • m_needSelection : KiSelectionHandler
  • m_needViewReset : KiSelectionHandler
  • m_newSel : TGraphCurSelector
  • m_next : PyRegistry
  • m_nFlags : CCJStatusBarPane
  • m_nHeight : CCJPagerCtrl
  • m_nHiddenCol : CCJFlatSplitterWnd
  • m_nHiddenRow : CCJFlatSplitterWnd
  • m_nID : CCJStatusBarPane, CCJControlBar, CCJBrowseButton, UCmdUI
  • m_nImageID : CContentItems
  • m_nIndex : CCJOutlookBar
  • m_nLastFilterChanged : CSortHeaderCtrl
  • m_nMargin : CCJColorPopup
  • m_nMaxColWidth : CCJListView, CCJListCtrl
  • m_nMenu : CCJBrowseEdit, CCJBrowseButton
  • m_nMenuID : CCJMenuBar, CCJMDIChildWnd
  • m_nMinColWidth : CCJListView, CCJListCtrl
  • m_nMinSize : CCJListView, CCJListCtrl
  • m_nNextToolTipId : CCJTabCtrlBar
  • m_nNumColors : CCJColorPopup
  • m_nNumColumns : CCJColorPopup
  • m_nNumItems : CCJOutlookBar
  • m_nNumRows : CCJColorPopup
  • m_nObjectSize : URuntimeClass
  • m_node : UCvsGraph
  • m_nodeColor : CGraphOptDlg
  • m_nodes : NotificationManager
  • m_noDispatch : UWidget
  • m_nOffset : CCJFlatHeaderCtrl, CCJCaption
  • m_noModuleProgram : CCommit_OPTIONS
  • m_noRecurs : CTag_MAIN, CStatus_MAIN, CRtag_MAIN, CLogMain, CDiff_MAIN
  • m_norecurs : CUpdateMain
  • m_noRecursCheck : CDiff_MAIN
  • m_noRecurse : CCommit_OPTIONS, CCheckout_MAIN, CAnnotate_MAIN
  • m_noRecurseCheck : CAnnotate_MAIN
  • m_noTags : CLogMain
  • m_notificationManager : CSortHeaderCtrl
  • m_notificationTime : KoWatcher
  • m_notify : CSelectionChangeNotifier
  • m_noWhiteSpace : CDiff_MAIN
  • m_noWhiteSpaceCheck : CDiff_MAIN
  • m_nPaneID : CCJStatusBarPaneControlInfo
  • m_nPointTab : CCJTabCtrlBar
  • m_nPos : CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • m_nSelectionMode : CCJColorPicker
  • m_nSortCol : CSortHeaderCtrl, CCJFlatHeaderCtrl
  • m_nSortedCol : CCJListView, CCJListCtrl
  • m_nStyle : CCJStatusBarPane
  • m_nSubMenuIndx : CCJBrowseEdit, CCJBrowseButton
  • m_nToolBarID : CCJMDIChildWnd
  • m_nToolBarIDs : CCJMDIChildWnd
  • m_nullWidth : CCJHexEdit
  • m_numberByPages : CBrowseFileView
  • m_numberOfLines : CBrowseFileView
  • m_numberOfPages : CGraphView, CBrowseFileView
  • m_numbuf : UCvsConsole
  • m_nWidth : CCJPagerCtrl
  • m_o : PyAutoObject< T >
  • m_object : PyPersistent::obj_t, PyCmdUI::obj_t, PyMenuMgr::obj_t, PyColorConsole::obj_t, PyCvsEntry::obj_t
  • m_offAddress : CCJHexEdit
  • m_offAscii : CCJHexEdit
  • m_offHex : CCJHexEdit
  • m_offset : TGraphCurSelector
  • m_ok : UPromptMessage
  • m_okButton : CTemplateDlg, CItemListDlg, CCvsRootDlg, CCVSAlert_MAIN
  • m_okButtonTitle : CvsAlert
  • m_onlyRCS : CLogMain
  • m_onlyRev : TGraphDelCmd
  • m_option : CItemListDlg::CompareInfo, CItemListDlg, EntnodeFile
  • m_optionCheck : COptionalPropertySheet, CItemListDlg
  • m_optionsListCtrl : CDiff_Options
  • m_optionsMenuButton : CDiff_MAIN
  • m_optionString : CAdminOption_MAIN
  • m_origBranchColor : CGraphOptDlg
  • m_origDeadNodeColor : CGraphOptDlg
  • m_origHeaderColor : CGraphOptDlg
  • m_origMergeColor : CGraphOptDlg
  • m_origNodeColor : CGraphOptDlg
  • m_origSelColor : CGraphOptDlg
  • m_origShadowColor : CGraphOptDlg
  • m_origTagColor : CGraphOptDlg
  • m_origUserStateNodeColor : CGraphOptDlg
  • m_otherButton : CCVSAlert_MAIN
  • m_otherButtonTitle : CvsAlert
  • m_out : CPyCvsConsole
  • m_outputType : CStatus_MAIN
  • m_overide : UWidget
  • m_overrideCoDir : CCheckout_MAIN
  • m_overrideCoDirCheck : CCheckout_MAIN
  • m_overwriteExisting : CTag_MAIN, CRtag_MAIN
  • m_overwriteExistingCheck : CTag_MAIN, CRtag_MAIN
  • m_overwriteReleaseTags : CImport_MAIN
  • m_overwriteReleaseTagsCheck : CImport_MAIN
  • m_p : CPyThreadState
  • m_pActiveView : CCJTabView, CCJTabCtrlBar
  • m_pageHeight : CGraphView
  • m_PageValues : LPseudoWinAttachment
  • m_Palette : CCJColorPopup
  • m_passwd : GetPassword
  • m_path : KoWatcher, CBrowseFileView, UCvsFiles, SelectionDisplayInfo, CSaveSettingsDlg, CImport_OPTIONS, CCvsSandboxInfo, CCvsRootParser, CCheckout_MAIN, KoColumnContext
  • m_pathCheck : CSelectionDetailsDlg
  • m_pathCombo : CImport_OPTIONS
  • m_pathEdit : CCheckout_MAIN
  • m_pathToFind : CFindSettings
  • m_pBarInfo : CCJToolBar
  • m_pBrowserApp : CCJHtmlView
  • m_pChildParent : CCJCaptionPopupWnd
  • m_pChildWnd : CCJControlBar, CCJCaptionPopupWnd, CCJCaption
  • m_pContents : CCJOutlookBar
  • m_pControls : CCJToolBar
  • m_pcvsAlert : CCVSAlert_MAIN
  • m_pCvsConsole : CCvsProcessData
  • m_pData : CCJHexEdit
  • m_pDlg : CMultiLineEditDialogKeyHelper
  • m_pDropButtons : CCJToolBar
  • m_pEditWnd : CCJBrowseButton
  • m_pen : UDC
  • m_pEndButton : CCJFlatTabCtrl
  • m_pError : CCJMemFile
  • m_pfnCreateObject : URuntimeClass
  • m_pfnGetBaseClass : URuntimeClass
  • m_pFont : CCJFlatButton, CCJCaption
  • m_pHeaderCtrl : CCJListView, CCJListCtrl
  • m_pHideOption : CvsAlert
  • m_pHomeButton : CCJFlatTabCtrl
  • m_pImageListLarge : CCJOutlookBar
  • m_pImageListSmall : CCJOutlookBar
  • m_placement : CWinPlacement
  • m_pLeftButton : CCJFlatTabCtrl
  • m_pListCtrl : CCJListView, CCJListCtrl
  • m_pMenuBar : CCJMenuBarFrameHook
  • m_pmf : KiSelectionHandler
  • m_pNext : CSubclassWnd
  • m_pNextClass : URuntimeClass
  • m_pNotifyWnd : CCJCaption
  • m_point : CCJOutlookBar
  • m_pOldWndProc : CSubclassWnd
  • m_popToolbarID : CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • m_popupMenu : CGfxOutBarCtrl, CCJTabCtrl, CCJMenuBar, CCJFlatHeaderCtrl, CCJControlBar
  • m_popupMenuID : CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • m_pOwner : CCJOutlookBar
  • m_pParent : CCJColorPopup, CProgressDlg
  • m_pParentWnd : CMultilineEntryDlg, CCJFlatHeaderCtrl, CCJColorPicker, CCJCaptionPopupWnd, CCJBrowseButton
  • m_pPreviousEntries : CMultilineEntryDlg
  • m_previewEdit : CTemplateDlg
  • m_previewInfo : CCommit_MAIN
  • m_prevLogsCombo : CMultilineEntryDlg
  • m_pRightButton : CCJFlatTabCtrl
  • m_progress : ImportReport
  • m_progressCtrl : CProgressDlg
  • m_progressTextStatic : CProgressDlg
  • m_progressType : CProgressDlg
  • m_protocol : CCvsRootDlg, CCvsRootParser
  • m_protocolCombo : CCvsRootDlg
  • m_protocolDescStatic : CCvsRootDlg
  • m_prune : CGetPrefs_GLOBALS
  • m_pseudo : CPseudoDraw, CPseudoDlg
  • m_pStream : CTipDlg
  • m_pStringMap : CCJToolBar
  • m_pstrItems : USmartCombo
  • m_pTabCtrl : CCJTabView
  • m_ptCurDrag : CCJSizeDockBar, CCJControlBar
  • m_ptCurrent : CCJSizeDockBar
  • m_ptMouse : CCJMenuBar
  • m_pToolTip : CCJTabView
  • m_ptOrig : CCJDockContext
  • m_ptStartDrag : CCJSizeDockBar, CCJControlBar
  • m_pWnd : CWndRedrawMngr, CCJStatusBarPaneControlInfo, CCJSortClass
  • m_pWndPopDown : CCJCaption
  • m_pythonDll : CGetPrefs_WINCVS
  • m_pythonDllEdit : CGetPrefs_WINCVS
  • m_quiet : CGetPrefs_GLOBALS
  • m_radio : CPseudoToggle
  • m_radios : CImportEntry
  • m_rapidNotificationCount : KoWatcher
  • m_rcChild : CCJCaption
  • m_rcClient : CCJCaption
  • m_rcOldPos : CCJToolBar
  • m_rcOldSize : CCJFlatHeaderCtrl
  • m_rcTrack : CCJSizeDockBar, CCJControlBar
  • m_reactionSpeed : CFilterMaskOptDlg
  • m_reactionSpeedSpin : CFilterMaskOptDlg
  • m_reactionSpeedStatic : CFilterMaskOptDlg
  • m_readFrom : CItemListDlg
  • m_readFromCombo : CItemListDlg
  • m_rect : TGraphRectSelect
  • m_recursion : CMainFrame, UCvsFrame
  • m_redraw : CWndRedrawMngr
  • m_ref : EntnodeData, EntnodePath
  • m_refreshButton : CItemListDlg
  • m_registry : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • m_relativePath : EntnodeFile
  • m_remind : CNoPython
  • m_removebtn : CCustomizeMenus
  • m_removed : EntnodeData
  • m_removeDirectoryOption : CRelease_MAIN
  • m_repositoryPath : CCvsRootDlg
  • m_repositoryPathCombo : CCvsRootDlg
  • m_resetSticky : CUpdateOptions
  • m_resetStickyCheck : CUpdateOptions
  • m_resetViewPending : CWinCvsBrowser
  • m_resolved : EntnodeData
  • m_restartPointerCache : TGraphCurSelector
  • m_rev : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CCommit_OPTIONS, CAnnotate_MAIN
  • m_rev1 : CUpdateMerge, CDiff_MAIN
  • m_rev1Combo : CUpdateMerge, CDiff_MAIN
  • m_rev2 : CUpdateMerge, CDiff_MAIN
  • m_rev2Combo : CUpdateMerge, CDiff_MAIN
  • m_revCombo : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CCommit_OPTIONS, CAnnotate_MAIN
  • m_revision : SelectionDisplayInfo
  • m_revisionCheck : CSelectionDetailsDlg
  • m_revisionSpinCtrl : CSelectionDetailsDlg
  • m_rgbBranch : CGraphOptDlg
  • m_rgbDead : CGraphOptDlg
  • m_rgbHeader : CGraphOptDlg
  • m_rgbMerge : CGraphOptDlg
  • m_rgbNode : CGraphOptDlg
  • m_rgbSelection : CGraphOptDlg
  • m_rgbShadow : CGraphOptDlg
  • m_rgbState : CGraphOptDlg
  • m_rgbTag : CGraphOptDlg
  • m_root : CWinCvsBrowser, TBrowserFill, TBrowserFillDummy, UCvsFolders, TBrowserFill, TBrowserFillDummy
  • m_rowInfo : ItemDisplayInfo, KeywordDisplayInfo
  • m_rtag : CImport_MAIN
  • m_rtagButton : CImport_MAIN
  • m_rtagCombo : CImport_MAIN
  • m_running : TraversalReport
  • m_sameActionNextTime : CFileAction_MAIN
  • m_sbuf : CWincvsView
  • m_sbuffer : EntnodeData
  • m_section : KoWatcher
  • m_sel1 : TGraphCurSelector
  • m_sel2 : TGraphCurSelector
  • m_selAltCvsButton : CGetPrefs_CVS
  • m_selColor : CGraphOptDlg
  • m_selCount : TGraphCmdStatus
  • m_selCvsrootButton : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_selDetType : CSelectionDetailsDlg
  • m_selectcheck : CCJMenu
  • m_selectExact : CSmartComboBox
  • m_selection : CSelectionDetailsDlg
  • m_selectionButton : CItemListDlg
  • m_selectionChanged : CWinCvsBrowser
  • m_selectionEdit : CSelectionDetailsDlg
  • m_selectionListCtrl : CSelectionDetailsDlg
  • m_selectionNotificationLocked : CWinCvsBrowser
  • m_selEnd : CCJHexEdit
  • m_selFolderButton : CCmdLine_MAIN
  • m_selId : TGraphCurSelector
  • m_selStart : CCJHexEdit
  • m_selType : KiSelectionHandler
  • m_semaphore : CRecursionLock, USemaphore
  • m_settimer : CCvsStatusBar
  • m_settingName : CSaveSettingsDlg
  • m_settingsFile : CFindSettings
  • m_settingsFolder : CGetPrefs_WINCVS
  • m_settingsFolderButton : CGetPrefs_WINCVS
  • m_settingsFolderEdit : CGetPrefs_WINCVS
  • m_shadowColor : CGraphOptDlg
  • m_shiftOn : TGraphRectSelect
  • m_showCvs : CGetPrefs_CVS
  • m_showCvsCombo : CGetPrefs_CVS
  • m_sizeButton : CCJToolBar
  • m_sizeDesired : CCJControlBar
  • m_sizeFloat : CCJControlBar
  • m_sizeHorz : CCJControlBar
  • m_sizeIcon : CCJFlatButton
  • m_sizeImage : CCJToolBar
  • m_sizeNormal : CCJControlBar
  • m_sizeVert : CCJControlBar
  • m_SmallImageList : CCustomizeMenus
  • m_smallImageList : CBrowseFileView
  • m_snumbuf : CWincvsView
  • m_sort : CBrowseFileView, UCvsFiles
  • m_sortAsc : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • m_sortColumn : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • m_startEvent : KoWatcher
  • m_state : CMainFrame, CLogFilters, EntnodeData
  • m_stateCombo : CLogFilters
  • m_stateImageList : CBrowseFileView
  • m_stdout : CUpdateOptions
  • m_step : CCvsStatusBar
  • m_str : UStr, UPStr
  • m_strCaption : CCJExplorerBar
  • m_strCommand : KiSelectionHandler
  • m_strCustomText : CCJColorPopup, CCJColorPicker
  • m_strDefault : CCJListView, CCJListCtrl
  • m_strDefaultText : CCJColorPopup, CCJColorPicker
  • m_strDefExt : CCJBrowseButton
  • m_strEntry : CCJListView, CCJListCtrl
  • m_strFileName : CCJBrowseButton
  • m_strFilter : CCJBrowseButton
  • m_strFormat : CCJWindowPlacement
  • m_strHours : CCJTimeEdit
  • m_strItemText : CCJSortClass::CSortItem
  • m_strLastInsertedFilterText : CSortHeaderCtrl
  • m_strLiteral : CCJMaskEdit
  • m_strLogoText : CCJLogoPane
  • m_strMask : CCJMaskEdit
  • m_strMaskLiteral : CCJMaskEdit
  • m_strMins : CCJTimeEdit
  • m_strRemoveItem : CGfxOutBarCtrl
  • m_strRenameItem : CGfxOutBarCtrl
  • m_strSection : CCJWindowPlacement, CCJListView, CCJListCtrl, CCJControlBar
  • m_strSubKey : CCJToolBar
  • m_strText : CCJStatusBarPane
  • m_strTip : CTipDlg
  • m_strTitle : CCJBrowseButton
  • m_strURL : CCJHyperLink
  • m_strValid : CCJMaskEdit
  • m_strValueName : CCJToolBar
  • m_strWindowText : CCJMaskEdit
  • m_strWindText : CCJCaption
  • m_strWndPos : CCJWindowPlacement
  • m_style : UPen
  • m_SubMenus : CCJMenu
  • m_supress : CLogMain
  • m_switchingWrap : CMultilineEntryDlg
  • m_syncObject : CWincvsView
  • m_szMenuText : CCJMenuData
  • m_TabCtrl : CCJTabCtrlBar
  • m_TabFont : CCJTabView
  • m_TabImages : CMainFrame
  • m_TabList : CCJFlatTabCtrl
  • m_tabs : UWidget
  • m_TabTipList : CCJFlatTabCtrl
  • m_tag : EntnodeFile
  • m_tagColor : CGraphOptDlg
  • m_tagCombo : CTag_MAIN, CRtag_MAIN
  • m_tagDescStatic : CTag_MAIN, CRtag_MAIN
  • m_tagName : CTag_MAIN, CRtag_MAIN
  • m_tclDll : CGetPrefs_WINCVS
  • m_tclDllEdit : CGetPrefs_WINCVS
  • m_tcpip : CGetPrefs_GLOBALS
  • m_tcpipCheck : CGetPrefs_GLOBALS
  • m_tempFile : CEditorMonDlg
  • m_templateList : CTemplateDlg
  • m_templateText : CTemplateDlg
  • m_term : CLogoutThread
  • m_terminateEvent : KoWatcher
  • m_texts : CPseudoItem
  • m_threeWayConflicts : CUpdateMerge
  • m_threeWayConflictsCheck : CUpdateMerge
  • m_timer : CEditorMonDlg
  • m_timers : UWidget
  • m_title : CProgressDlg, UPromptMessage
  • m_tokens : KoFilterMask
  • m_tooltip : CCvsStatusBar
  • m_ToolTip : CCJHyperLink, CCJFlatTabCtrl, CCJControlBar, CCJColorPopup
  • m_tooltips : UWidget
  • m_topfolder : CFindSettings
  • m_topindex : CCJHexEdit
  • m_tracking : CDynToolBar
  • m_treeCtrl : TBrowserFill, TBrowserFillDummy, TBrowserFill, TBrowserFillDummy
  • m_TreeCtrl : CExploreBar
  • m_ts : EntnodeFile
  • m_type : CTag_MAIN, CRtag_OPTIONS, CRtag_MAIN, PyRegistry, CItemListDlg::CompareInfo, CItemListDlg, CAdminOption_MAIN
  • m_uiCmd : CWndAutoCommand
  • m_uiFilechangeTimer : CBrowseFileView
  • m_uiOpenFlags : CCJMemFile
  • m_unifiedDiff : CDiff_MAIN
  • m_unifiedDiffCheck : CDiff_MAIN
  • m_unixlf : CGetPrefs_GLOBALS
  • m_unknown : EntnodeData
  • m_unmodified : EntnodeData
  • m_unselectcheck : CCJMenu
  • m_upBorder : CGfxSplitterWnd
  • m_upbtn : CCustomizeMenus
  • m_url : CNoPython
  • m_useAltCvs : CGetPrefs_CVS
  • m_useAltCvsCheck : CGetPrefs_CVS
  • m_useDefIgnore : CImport_OPTIONS
  • m_useExtDiff : CGetPrefs_WINCVS
  • m_useExtDiffCheck : CGetPrefs_WINCVS
  • m_useFilesTime : CImport_OPTIONS
  • m_useMostRecent : CRtag_OPTIONS
  • m_user : CLogFilters
  • m_userCombo : CLogFilters
  • m_userStateNodeColor : CGraphOptDlg
  • m_useSettingsFolder : CGetPrefs_WINCVS
  • m_useSettingsFolderCheck : CGetPrefs_WINCVS
  • m_v : PyRegistry
  • m_value : CTempToggleBool, CEditKeywordDlg, KeywordDisplayInfo
  • m_valueCombo : CEditKeywordDlg
  • m_vendorBranch : CImport_OPTIONS
  • m_vendorBranchButton : CImport_OPTIONS
  • m_vendorBranchCheck : CImport_OPTIONS
  • m_vendorBranchCombo : CImport_OPTIONS
  • m_vers : CAboutDlg
  • m_view : CSelectionChangeNotifier, CGraphRectTracker, TGraphSelNonSig, CGraphConsole, TGraphRectSelect, TGraphCurSelector, CBarConsole, KoFileViewTraversalContext, KoTraversalContext
  • m_viewer : CGetPrefs_WINCVS
  • m_viewerEdit : CGetPrefs_WINCVS
  • m_viewList : CCJTabCtrlBar
  • m_viewPath : CWincvsDoc
  • m_views : CCJTabView
  • m_visited : EntnodeData
  • m_vn : EntnodeFile
  • m_vtag : CImport_MAIN
  • m_vtagButton : CImport_MAIN
  • m_vtagCombo : CImport_MAIN
  • m_warnings : CImportFilterDlg, CImport_OPTIONS
  • m_wasLocked : CSelectionChangeNotifier
  • m_watch : CBrowseFileView
  • m_wid : CMsg, UDC, CPseudoList
  • m_widget : UCmdUI
  • m_widgets : UWidget
  • m_widid : CDynToolBar, UCmdTarget, CPseudoItem, LPseudoWinAttachment, LPseudoDrawAttachment
  • m_width : CColorMenu, UPen
  • m_WinCvsUrl : CAboutDlg
  • m_WindowRect : CCJColorPopup
  • m_winInfo : UToolbar
  • m_wndBrowser : CMainFrame, CCJHtmlView
  • m_wndFilter : CMainFrame
  • m_wndList : CMainFrame
  • m_wndMenuBar : CCJMDIFrameWnd, CCJFrameWnd
  • m_wndMultiUser : CMainFrame
  • m_wndStatusBar : CMainFrame
  • m_wndTags : CMainFrame
  • m_wndToolBar : CMainFrame, UToolbar
  • m_wndWorkspace : CMainFrame
  • m_wordWrap : CMultilineEntryDlg
  • m_wordWrapCtrl : CMultilineEntryDlg
  • m_zlevel : CGetPrefs_GLOBALS
  • m_zlevelEdit : CGetPrefs_GLOBALS
  • m_zspinSpinButton : CGetPrefs_GLOBALS
  • MA_DECLARE_CLASS : TPseudoDoubleNumberText, TPseudoTextListView, TPseudoCustomView, TPseudoWinAdorner, TPseudoWinBehavior, TPseudoAppBehavior, TPseudoIconCheckBox, TPseudoRotateIconButton, TPseudoIconButton, TPseudoIconPopup, TPseudoScrollBar, TBuggyPopup
  • MacBinEncodeBinariesOnly() : CvsPrefs
  • MacBinEncoding() : CvsPrefs
  • MacBinMaps() : MacBinMaps
  • MacLF() : CvsPrefs
  • Magenta : CTCP2Parse
  • MapAccelerator() : CCJToolBarCtrl, CCJToolBar
  • maps : MACBINMAPENTRIES
  • MarkButton() : CCJToolBarCtrl
  • Match() : ReportConflict
  • match_dir() : match_dir
  • MatchEntriesCase() : CvsPrefs
  • max : USLIDER
  • MAX_CHAR_BY_LINE : UCvsConsole
  • Maximize() : CCJSizeDockBar, CCJControlBar
  • MaximizeBand() : CCJReBarCtrl
  • maxWarnings : ReportWarning
  • MeasureItem() : CCJOutlookBar, CCJMenu, CCJFontCombo, CColorMenu
  • menuIconNormal : CCJMenuData
  • MenuInputFilter() : CCJMenuBar
  • messageMap : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • min : USLIDER
  • Minimize() : CCJControlBar
  • MinimizeBand() : CCJReBarCtrl
  • mirc2ctcp() : mircAttrCvt
  • mirc2ctcpmap : mircAttrCvt
  • mode : keywordMode
  • ModifyCaptionStyle() : CCJCaption
  • ModifyFlag() : CGfxOutBarCtrl
  • ModifyODMenuA() : CCJMenu
  • ModifyODMenuW() : CCJMenu
  • ModifyTabStyle() : CCJTabView, CCJTabCtrlBar
  • Move() : CCJHexEdit
  • MoveBand() : CCJReBarCtrl
  • MoveButton() : CCJToolBarCtrl
  • MoveDockBar() : CCJDockContext
  • MoveRow() : CCJListView, CCJListCtrl
  • MoveTo() : UDC
  • msgSend : CGfxGroupEdit
  • MulDiv() : URect
  • MultiFiles() : MultiFiles
  • MultiFilesEntry() : MultiFilesEntry
  • MultiFilesEntryIndex() : MultiFilesEntryIndex

- n -

  • name : CMacroEntry, option
  • Navigate() : CCJHtmlView
  • Navigate2() : CCJHtmlView
  • NavigateComplete2() : CCJHtmlView
  • NeedCvsrootMigration() : CvsPrefs
  • NeedSave() : CPersistent
  • NeedsNormalize() : CModuleParserConsole, KoAddUnicodeHandler, KoAddBinaryHandler, KoAddHandler, KoGraphHandler, KiSelectionHandler
  • New() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • newdir() : MultiFiles
  • newfile() : MultiFiles
  • NewMenu() : CCJMDIFrameWnd, CCJFrameWnd
  • NewODMenu() : CCJMenu
  • NewRoot() : CHistComboBoxEx
  • next : DROPDOWNBUTTON, ReportWarning, ReportConflict, DYN_LIST, _frameRec, UTREE_INFO
  • nFlags : CCJMenuData
  • nID : CCJMenuData, CJX_CONTROLPOS
  • nIndex : CJX_CONTROLPOS
  • nMessage : UMSGMAP_ENTRY
  • noConflict : ReportConflict
  • node : CTCLBrowserEnt
  • Node() : NotificationManager::Node
  • None : USmartCombo
  • NORMAL : CCJFlatComboBox
  • Normalize() : CCJSizeDockBar, CCJControlBar, MultiFiles, CModuleParserConsole
  • NormalizeCvsRoot() : CCvsRootParser
  • NormalizeRect() : URect
  • NormalizeSel() : CCJHexEdit
  • NotificationManager() : NotificationManager
  • Notify() : KoWatcher
  • NotifyAll() : NotificationManager
  • NotifySelectionChange() : CWinCvsBrowser
  • nSig : UMSGMAP_ENTRY
  • nul_void_ignore : CTCP2Parse::RGBColor
  • NumDirs() : MultiFiles
  • numentries : DYN_LIST
  • NumFiles() : MultiFilesEntry
  • numMaps : MACBINMAPENTRIES
  • NumNodes() : CGraphDoc
  • NumOfElements() : CSortList< T >

- o -

  • observer : NotificationManager::Node
  • Offset() : CWinLogData, UPoint
  • OffsetRect() : URect
  • oldFormat : CColorConsole
  • OnAbout() : UCvsFrame
  • OnActionGo() : CMultilineEntryDlg
  • OnActivate() : CMainFrame
  • OnActivateApp() : CCJColorPopup
  • OnAdd() : CCustomizeMenus
  • OnAddSelection() : CCmdLine_MAIN
  • OnAlias() : TViewFill, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • OnAltcvschk() : CGetPrefs_CVS
  • OnAltcvssel() : CGetPrefs_CVS
  • OnAltsettingschk() : CGetPrefs_WINCVS
  • OnAnnotate() : CGraphView, CBrowseFileView
  • OnAnyDevice() : LSReport, TraversalReport
  • OnAppAbout() : CWincvsApp
  • OnAppCmdline() : CWincvsDoc, CWinCvsBrowser, CBrowseFileView
  • OnAppCopyrights() : CWincvsApp
  • OnAppCredits() : CWincvsApp
  • OnAppLogin() : CWincvsDoc
  • OnAppLogout() : CWincvsDoc
  • OnApplyNow() : CGraphOptDlg
  • OnAppPreferences() : CWincvsDoc
  • OnAppRtagBranch() : CWincvsDoc
  • OnAppRtagbranch() : CWinCvsBrowser, CBrowseFileView
  • OnAppRtagcreate() : CWinCvsBrowser, CBrowseFileView
  • OnAppRtagDelete() : CWincvsDoc
  • OnAppRtagdelete() : CWinCvsBrowser, CBrowseFileView
  • OnAppRtagNew() : CWincvsDoc
  • OnBarStyleChange() : CCJToolBar, CCJMenuBar
  • OnBeforeNavigate2() : CCJHtmlView
  • OnBegindrag() : CBrowseFileView
  • OnBeginPrinting() : CWincvsView, CGraphView, CBrowseFileView
  • OnBeginrdrag() : CBrowseFileView
  • OnBlockHandler() : UWidget
  • OnBranch() : CGraphOptDlg
  • OnBranchid() : CImport_OPTIONS
  • OnBroadcastCmdMsg() : CMainFrame
  • OnBrowseBranchid() : CImport_OPTIONS
  • OnBrowseModules() : CRtag_MAIN, CImport_MAIN, CCheckout_MAIN
  • OnBrowseReadfrom() : CItemListDlg
  • OnBrowserOpen() : CWincvsDoc
  • OnBrowserPopup() : UCvsFrame
  • OnBrowseTag() : CUpdateOptions, CTag_MAIN, CRtag_OPTIONS, CRtag_MAIN, CLogFilters, CItemListDlg, CCommit_OPTIONS, CAnnotate_MAIN
  • OnBrowseTag1() : CUpdateMerge, CImport_MAIN, CDiff_MAIN
  • OnBrowseTag2() : CUpdateMerge, CImport_MAIN, CDiff_MAIN
  • OnBtnClick() : UCvsGraph
  • OnBtnhome() : CGetPrefs_CVS
  • OnBtnPath() : CCheckout_MAIN
  • OnBtnpath() : CImport_OPTIONS
  • OnBtnsettings() : CGetPrefs_WINCVS
  • OnBtnviewer() : CGetPrefs_WINCVS
  • OnButtonClose() : CCJExplorerBar, CCJControlBar
  • OnButtonMinimize() : CCJControlBar
  • OnCancel() : CItemListDlg, CGraphOptDlg, CCvsRootDlg, CCVSAlert_MAIN, UPromptMessage
  • OnCaptButton() : CCJCaptionPopupWnd, CCJCaption
  • OnChangedRect() : CGraphRectTracker
  • OnChangeReactionSpeed() : CFilterMaskOptDlg
  • OnChar() : CGfxGroupEdit, CCJMaskEdit, CCJHexEdit, CPseudoToggle
  • OnCheck1() : CDiff_MAIN
  • OnCheck2() : CDiff_MAIN
  • OnCheckdate() : CItemListDlg
  • OnCheckdate1() : CUpdateMerge
  • OnCheckdate2() : CUpdateMerge
  • OnCheckOverridecheckoutdir() : CCheckout_MAIN
  • OnCheckpath() : CCmdLine_MAIN
  • OnCheckrev() : CItemListDlg
  • OnCheckunixlf() : CGetPrefs_GLOBALS
  • OnChgCursor() : UWidget
  • OnChgFocus() : UWidget
  • OnClear() : CCvsRootDlg
  • OnClicked() : CCJHyperLink, CCJColorPicker, CCJBrowseButton
  • OnClose() : CMainFrame, CLogFrame, CCJMDIFrameWnd, CCJFrameWnd
  • OnCmdAdd() : UCvsFolders, UCvsFiles
  • OnCmdAddb() : UCvsFiles
  • OnCmdCheckout() : UCvsFolders
  • OnCmdCmdline() : UCvsFrame
  • OnCmdCommit() : UCvsFolders, UCvsFiles
  • OnCmdDiff() : UCvsFolders, UCvsFiles
  • OnCmdEdit() : UCvsFolders, UCvsFiles
  • OnCmdEditors() : UCvsFolders, UCvsFiles
  • OnCmdEditsel() : UCvsFiles
  • OnCmdEditseldef() : UCvsFiles
  • OnCmdExplore() : UCvsFolders, UCvsFiles
  • OnCmdGraph() : UCvsFiles
  • OnCmdIgnore() : UCvsFrame
  • OnCmdImport() : UCvsFolders
  • OnCmdInit() : UCvsFrame
  • OnCmdLock() : UCvsFolders, UCvsFiles
  • OnCmdLog() : UCvsFolders, UCvsFiles
  • OnCmdLogin() : UCvsFrame
  • OnCmdLogout() : UCvsFrame
  • OnCmdMacroAdmin() : UCvsFrame
  • OnCmdMacrosSel() : UCvsFolders
  • OnCmdMsg() : CLogFrame, CGraphFrame
  • OnCmdPreferences() : UCvsFrame
  • OnCmdQueryUpdate() : UCvsFolders, UCvsFiles
  • OnCmdRelease() : UCvsFolders, UCvsFiles
  • OnCmdReload() : UCvsFrame
  • OnCmdResEdit() : UCvsFolders, UCvsFiles
  • OnCmdRmv() : UCvsFiles
  • OnCmdRtagBranch() : UCvsFrame
  • OnCmdRtagDelete() : UCvsFrame
  • OnCmdRtagNew() : UCvsFrame
  • OnCmdSaveSettings() : UCvsFrame
  • OnCmdStatus() : UCvsFolders, UCvsFiles
  • OnCmdStopcvs() : UCvsFrame
  • OnCmdTagBranch() : UCvsFolders, UCvsFiles
  • OnCmdTagDelete() : UCvsFolders, UCvsFiles
  • OnCmdTagNew() : UCvsFolders, UCvsFiles
  • OnCmdTrash() : UCvsFiles
  • OnCmdUIAdd() : UCvsFolders, UCvsFiles
  • OnCmdUIAddB() : UCvsFiles
  • OnCmdUIAnytime() : UCvsFrame
  • OnCmdUICheckout() : UCvsFolders
  • OnCmdUICvsCmd() : UCvsFrame
  • OnCmdUIEditseldef() : UCvsFiles
  • OnCmdUIEraseAll() : UCvsConsole
  • OnCmdUIExplore() : UCvsFolders, UCvsFiles
  • OnCmdUIFilterMask() : UCvsFrame
  • OnCmdUIGraph() : UCvsFiles
  • OnCmdUIHideUnknown() : UCvsFrame
  • OnCmdUIIgnore() : UCvsFrame
  • OnCmdUIImport() : UCvsFolders
  • OnCmdUIMacroAdmin() : UCvsFrame
  • OnCmdUIMacroSel() : UCvsFiles
  • OnCmdUIMacrosSel() : UCvsFolders
  • OnCmdUIPyMacro() : UCvsFrame
  • OnCmdUIQuit() : UCvsFrame
  • OnCmdUIRelease() : UCvsFiles
  • OnCmdUIReload() : UCvsFrame
  • OnCmdUIResEdit() : UCvsFolders, UCvsFiles
  • OnCmdUIRmv() : UCvsFiles
  • OnCmdUIStopcvs() : UCvsFrame
  • OnCmdUITrash() : UCvsFiles
  • OnCmdUIUpdate() : UCvsFolders, UCvsFiles
  • OnCmdUIUpone() : UCvsFiles
  • OnCmdUIUsePyShell() : UCvsFrame
  • OnCmdUIUseTclShell() : UCvsFrame
  • OnCmdUIViewAdded() : UCvsFrame
  • OnCmdUIViewChanged() : UCvsFrame
  • OnCmdUIViewConflict() : UCvsFrame
  • OnCmdUIViewIgnored() : UCvsFrame
  • OnCmdUIViewMissing() : UCvsFrame
  • OnCmdUIViewModified() : UCvsFrame
  • OnCmdUIViewRecursive() : UCvsFrame, UCvsFiles
  • OnCmdUIViewRemoved() : UCvsFrame
  • OnCmdUIViewUnknown() : UCvsFrame
  • OnCmdUnedit() : UCvsFolders, UCvsFiles
  • OnCmdUnlock() : UCvsFolders, UCvsFiles
  • OnCmdUpdate() : UCvsFolders, UCvsFiles
  • OnCmdUpone() : UCvsFiles
  • OnCmdUsePyShell() : UCvsFrame
  • OnCmdUseTclShell() : UCvsFrame
  • OnCmdWatchers() : UCvsFolders, UCvsFiles
  • OnCmdWatchOff() : UCvsFolders, UCvsFiles
  • OnCmdWatchOn() : UCvsFolders, UCvsFiles
  • OnColumnclick() : CBrowseFileView
  • OnColumnclickItemlist() : CItemListDlg
  • OnColumnclickOptionslist() : CDiff_Options
  • OnColumnclickSelectionlist() : CSelectionDetailsDlg
  • OnComboAppend() : UWidget
  • OnComboDelSel() : UWidget
  • OnComboEnableSel() : UWidget
  • OnComboGetCount() : UWidget
  • OnComboGetMenu() : UWidget
  • OnComboGetPos() : UWidget
  • OnComboResetAll() : UWidget
  • OnComboSelDir() : UCvsFrame
  • OnComboSetPos() : UWidget
  • OnCommand() : COptionalPropertySheet
  • OnCommands() : UToolbar, UMenu
  • OnCommandStateChange() : CCJHtmlView
  • OnConsole() : CGetPrefs_CVS
  • OnContextMenu() : CWincvsView, CWinCvsBrowser, CHHelpDialog, CHHelpPropertyPage, CHHelpPropertySheet, CGraphView, CCJHexEdit, CBrowseFileView
  • OnCopyrights() : UCvsFrame
  • OnCopySettings() : CSaveSettingsDlg
  • OnCreate() : CSplashWnd, CMainFrame, CCvsStatusBar, CBarConsole, CGfxOutBarCtrl, CGfxGroupEdit, CCJToolBarCtrl, CCJTabView, CCJTabCtrlBar, CCJFontCombo, CCJFlatTabCtrl, CCJFlatHeaderCtrl, CCJExplorerBar, CCJControlBar, CCJColorPicker, CCJBrowseEdit, UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole
  • OnCreateClient() : CLogFrame
  • OnCredits() : UCvsFrame
  • OnCtlColor() : CTipDlg
  • OnCustomdraw() : CSortHeaderCtrl
  • OnCustomDraw() : CCJListView, CCJListCtrl
  • OnCustomize() : CWinCvsBrowser, CBrowseFileView
  • OnDate() : CUpdateOptions, CRtag_OPTIONS, CLogFilters
  • OnDblClick() : UCvsFiles
  • OnDblclkAllcmds() : CCustomizeMenus
  • OnDblclkCombofilter() : CFilterSelectionDlg
  • OnDblclkItemlist() : CItemListDlg
  • OnDblclkKeywordlist() : CCvsRootDlg
  • OnDblclkListentries() : CImportFilterDlg
  • OnDblclkMenulist() : CCustomizeMenus
  • OnDblclkSelectionlist() : CSelectionDetailsDlg
  • OnDblclkTemplateList() : CTemplateDlg
  • OnDead() : CGraphOptDlg
  • OnDelcvsinfo() : CRelease_MAIN
  • OnDeldir() : CRelease_MAIN
  • OnDeleteallitems() : CBrowseFileView
  • OnDeleteitem() : CMyShellTree, CBrowseFileView
  • OnDelsticky() : CUpdateOptions
  • OnDeltaposRevisionSpin() : CSelectionDetailsDlg
  • OnDestroy() : CWincvsView, CWinCvsBrowser, CCJToolBar, CCJListView, CCJListCtrl, CCJHtmlView, CCJFontCombo, CCJCaptionPopupWnd, CBrowserBar, CBrowseFileView, UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, CSelectionDetailsDlg, CItemListDlg, CEditorMonDlg, CCvsRootDlg, CCommit_MAIN, UToolbar, CDynToolBar
  • OnDiff() : CCommit_MAIN
  • OnDirectory() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • OnDocumentComplete() : CCJHtmlView
  • OnDontcreatevendortag() : CImport_MAIN
  • OnDown() : CCustomizeMenus
  • OnDownloadBegin() : CCJHtmlView
  • OnDownloadComplete() : CCJHtmlView
  • OnDraw() : CWincvsView, CWinCvsBrowser, CGraphView, CExploreBar, CCJListView, CCJHtmlView, CBrowserBar
  • OnDrawing() : UCvsGraph
  • OnDrawSplitter() : CGfxSplitterWnd, CCJFlatSplitterWnd
  • OnDropdown() : CHistComboBoxEx, CSmartComboBox
  • OnDropDownButton() : CCJToolBar, CDynToolBar
  • OnDropFiles() : CWincvsView, CMainFrame
  • OnEdit() : CCvsRootDlg
  • OnEditchangePath() : CCvsRootDlg
  • OnEditClear() : CCJHexEdit
  • OnEditClearAll() : CWincvsView
  • OnEditCopy() : CCJHexEdit
  • OnEditCut() : CCJHexEdit
  • OnEditentry() : CImportFilterDlg
  • OnEditPaste() : CCJHexEdit
  • OnEditSelectAll() : CCJHexEdit, CBrowseFileView
  • OnEditUndo() : CCJHexEdit
  • OnEditUpdate() : CCJFlatComboBox
  • OnEnable() : CCJBrowseEdit
  • OnEnableCmd() : UWidget
  • OnEndArrow() : CCJFlatTabCtrl
  • OnEndLabelEdit() : CGfxOutBarCtrl
  • OnEndPrinting() : CWincvsView, CGraphView
  • OnEraseAll() : UCvsConsole
  • OnEraseBkgnd() : CMultilineEntryDlg, CGfxSplitterWnd, CGfxOutBarCtrl, CCJTreeCtrl, CCJToolBar, CCJTabView, CCJTabCtrl, CCJReBar, CCJOutlookBar, CCJMetaFileButton, CCJMDIChildWnd, CCJMaskEdit, CCJListView, CCJListCtrl, CCJListBox, CCJHtmlView, CCJHexEdit, CCJFontCombo, CCJFlatHeaderCtrl, CCJFlatComboBox, CCJFlatButton, CCJExplorerBar, CCJControlBar, CCJColorPopup, CCJColorPicker, CCJCaption
  • OnError() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, LSReport, CFillTclEntries, CFillPyEntries, CFindSettings, MacroTraversal, ImportReport, TraversalReport
  • OnExtdiff() : CGetPrefs_WINCVS, CDiff_MAIN
  • OnExtdiffsel() : CGetPrefs_WINCVS
  • OnFetchCmd() : UWidget
  • OnFile() : TViewFill, CFillTclEntries, CFillPyEntries, CFindSettings, MacroTraversal, ImportReport, TraversalReport
  • OnFileChange() : CBrowseFileView
  • OnFilename() : CSelectionDetailsDlg
  • OnFileNameChange() : CMfFileDialog
  • OnFileNew() : CWincvsApp
  • OnFilePrint() : CCJHtmlView
  • OnFiles() : TLaunchHandler< lauchType >, KoFileActionHandler, TRtagHandler< tagType >, KoCheckoutHandler, KoImportHandler, KoCommandLineHandler, KoCancelChangesHandler, KoGraphAnnotateHandler, KoAnnotateHandler, KoQueryUpdateHandler, KoUpdateHandler, KoCommitHandler, KoAddUnicodeHandler, KoAddBinaryHandler, KoAddHandler, KoUnlockHandler, KoLockHandler, KoFileRemoveHandler, KoStatusHandler, KoGraphHandler, KoLogHandler, KoGraphDiffHandler, KoDiffHandler, KoWatchOffHandler, KoWatchOnHandler, KoEditorsHandler, KoWatchersHandler, KoReleaseHandler, KoUneditHandler, TEditHandler< editType >, TTagHandler< tagType >, KoUpdateMoveToTrashHandler, KoMoveToTrashHandler, KiSelectionHandler
  • OnFilterBarChanged() : CBrowseFileView
  • OnFilterBtnClicked() : CSortHeaderCtrl
  • OnFilterChanged() : CSortHeaderCtrl
  • OnFilteringChanged() : CWinCvsBrowser, CBrowseFileView, UCvsFiles
  • OnFilterMaskEntered() : UCvsFrame
  • OnFolder() : TLaunchHandler< lauchType >, KoFileActionHandler, TRtagHandler< tagType >, KoCheckoutHandler, KoImportHandler, KoCommandLineHandler, KoCancelChangesHandler, KoGraphAnnotateHandler, KoAnnotateHandler, KoQueryUpdateHandler, KoUpdateHandler, KoCommitHandler, KoAddUnicodeHandler, KoAddBinaryHandler, KoAddHandler, KoUnlockHandler, KoLockHandler, KoFileRemoveHandler, KoStatusHandler, KoGraphHandler, KoLogHandler, KoGraphDiffHandler, KoDiffHandler, KoWatchOffHandler, KoWatchOnHandler, KoEditorsHandler, KoWatchersHandler, KoReleaseHandler, KoUneditHandler, TEditHandler< editType >, TTagHandler< tagType >, KoUpdateMoveToTrashHandler, KoMoveToTrashHandler, KiSelectionHandler
  • OnForcerevision() : CCommit_OPTIONS
  • OnForceroot() : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • OnFullScreen() : CCJHtmlView
  • OnGetDlgCode() : CWincvsView, CCJHexEdit
  • OnGetFloat() : UWidget
  • OnGetLoc() : UWidget
  • OnGetSliderProperty() : UWidget
  • OnGetState() : UWidget
  • OnGetText() : UWidget
  • OnGfxLargeicon() : CGfxOutBarCtrl
  • OnGfxRemoveitem() : CGfxOutBarCtrl
  • OnGfxRenameitem() : CGfxOutBarCtrl
  • OnGfxSmallicon() : CGfxOutBarCtrl
  • OnGraphChangelogmessage() : CGraphView
  • OnGraphGraphoptions() : CGraphView
  • OnGraphSetdescription() : CGraphView
  • OnGraphSetstate() : CGraphView
  • OnHeader() : CGraphOptDlg
  • OnHeaders() : CLogMain
  • OnHeadersdesc() : CLogMain
  • OnHeightChange() : CCJReBar
  • OnHelp() : CNoPython, CCustomizeMenus, CTemplateDlg, CSelectionDetailsDlg, CSaveSettingsDlg, CItemListDlg, CImportEntry, CImportWarning, CImportFilterDlg, CGraphOptDlg, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CEditorMonDlg, CDiff_Options, CEditKeywordDlg, CCvsRootDlg
  • OnHelpCvs() : CWincvsApp
  • OnHelpInfo() : CHHelpDialog, CHHelpPropertyPage, CHHelpPropertySheet
  • OnHideUnknown() : UCvsFrame
  • OnHistorySelect() : CMainFrame
  • OnHomeArrow() : CCJFlatTabCtrl
  • OnHScroll() : CCJHexEdit
  • OnIdle() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, LSReport, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • OnIgnoreChanged() : CWinCvsBrowser
  • OnImportfilter() : CImport_OPTIONS
  • OnInitDialog() : CAboutDlg, CTipDlg, CNoPython, CMultilineEntryDlg, CHHelpDialog, CHHelpPropertyPage, CHHelpPropertySheet, CCustomizeMenus, CUpdateOptions, CTemplateDlg, CTag_MAIN, CSelectionDetailsDlg, CSaveSettingsDlg, CRtag_OPTIONS, CRtag_MAIN, CProgressDlg, COptionalPropertySheet, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImportFilterDlg, CImport_MAIN, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CFileAction_MAIN, CEditorMonDlg, CDiff_Options, CDiff_MAIN, CCvsRootDlg, CCVSAlert_MAIN, CCommit_MAIN, CCheckout_MAIN, CAnnotate_MAIN, CAdminOption_MAIN, CPseudoDlg
  • OnInitialUpdate() : CWincvsView, CWinCvsBrowser, CGraphView, CCJListView, CBrowseFileView
  • OnInitMenu() : CMainFrame
  • OnInitMenuPopup() : CGraphView, CCJTabCtrl, CCJMDIFrameWnd, CCJFrameWnd, CCJFlatHeaderCtrl, CCJControlBar
  • OnInitTabWidget() : UWidget
  • OnInitWidget() : UWidget
  • OnInvalidate() : UWidget
  • OnInvertTracker() : CGfxSplitterWnd, CCJSizeDockBar, CCJControlBar
  • OnIsdate() : CAnnotate_MAIN
  • OnIsEnabled() : UWidget
  • OnItemchanged() : CBrowseFileView
  • OnItemchangedAllcmds() : CCustomizeMenus
  • OnItemchangedItemlist() : CItemListDlg
  • OnItemchangedKeywordlist() : CCvsRootDlg
  • OnItemchangedMenulist() : CCustomizeMenus
  • OnItemchangedOptionslist() : CDiff_Options
  • OnItemchangedSelectionlist() : CSelectionDetailsDlg
  • OnItemchangedTemplateList() : CTemplateDlg
  • OnItemexpanding() : CWinCvsBrowser, CMyShellTree
  • OnKeydown() : CBrowseFileView
  • OnKeyDown() : CWincvsView, CGraphView, CCJMaskEdit, CCJHexEdit, CCJColorPopup, CPseudoToggle
  • OnKeyUp() : CSortHeaderCtrl
  • OnKillFocus() : CSortHeaderCtrl, CGfxGroupEdit, CCJHexEdit, CCJFlatComboBox, CCJColorPopup
  • OnLButtonDblClk() : CGraphView, CCJMetaFileButton, CCJHexEdit, CCJFlatButton, CBrowseFileView, CPseudoList
  • OnLButtonDown() : CGraphView, CGfxOutBarCtrl, CCJTreeCtrl, CCJOutlookBar, CCJMenuBar, CCJHexEdit, CCJFlatTabCtrl, CCJFlatComboBox, CCJFlatButton, CCJExplorerBar, CCJControlBar
  • OnLButtonUp() : CCJSizeDockBar, CCJOutlookBar, CCJHexEdit, CCJFlatComboBox, CCJFlatButton, CCJExplorerBar, CCJControlBar, CCJColorPopup, CPseudoToggle
  • OnLeftArrow() : CCJFlatTabCtrl
  • OnListAddColumns() : UWidget
  • OnListAddSel() : UWidget
  • OnListDelRow() : UWidget
  • OnListGetInfo() : UWidget
  • OnListGetNext() : UWidget
  • OnListGetNextSel() : UWidget
  • OnListHideColumns() : UWidget
  • OnListInsert() : UWidget
  • OnListNewRow() : UWidget
  • OnListPopup() : UWidget
  • OnListResetAll() : UWidget
  • OnListResort() : UWidget
  • OnListRowGetData() : UWidget
  • OnListRowSetData() : UWidget
  • OnListSetColTitle() : UWidget
  • OnListSetColWidth() : UWidget
  • OnListSetFeedback() : UWidget
  • OnListSetSortDir() : UWidget
  • OnListShowColumns() : UWidget
  • OnLogout() : CGetPrefs_GLOBALS
  • OnLogWindowIsPresent() : CWincvsApp
  • OnMacro() : CWinCvsBrowser, CBrowseFileView
  • OnMacroAdmin() : CWincvsDoc
  • OnMacroSel() : UCvsFiles
  • OnMainTimer() : UCvsApp
  • OnMeasureItem() : CCJTabCtrl, CCJMDIFrameWnd, CCJFrameWnd, CCJFlatHeaderCtrl, CCJControlBar
  • OnMenuBar() : CCJHtmlView
  • OnMenuChar() : CCJTabCtrl, CCJMDIFrameWnd, CCJFrameWnd, CCJFlatHeaderCtrl, CCJControlBar
  • OnMenuInput() : CCJMenuBar
  • OnMenuSelect() : CCJMenuBar
  • OnMerge() : CGraphOptDlg
  • OnMouseMove() : CGfxOutBarCtrl, CCJSizeDockBar, CCJOutlookBar, CCJMenuBar, CCJHyperLink, CCJHexEdit, CCJFlatComboBox, CCJFlatButton, CCJControlBar, CCJColorPopup
  • OnMove() : CCustomizeMenus
  • OnMyFormatFont() : CWincvsView
  • OnNavigateComplete2() : CCJHtmlView
  • OnNcCalcSize() : CCJToolBar, CCJSizeDockBar, CCJReBar
  • OnNcCreate() : CCJToolBar, CCJReBar
  • OnNcDestroy() : CCJColorPopup
  • OnNcHitTest() : CCvsStatusBar, CCJToolBar, CCJSizeDockBar, CCJControlBar
  • OnNcLButtonDblClk() : CCJMiniDockFrameWnd
  • OnNcLButtonDown() : CCJSizeDockBar, CCJMiniDockFrameWnd
  • OnNcPaint() : CCJToolBar, CCJSizeDockBar, CCJReBar, CCJControlBar
  • OnNewDocument() : CWincvsDoc, CGraphDoc
  • OnNewWindow2() : CCJHtmlView
  • OnNextTip() : CTipDlg
  • OnNode() : CGraphOptDlg
  • OnNotify() : CCJListView, CCJListCtrl
  • OnOK() : CTipDlg, CCustomizeMenus, CTemplateDlg, CProgressDlg, CItemListDlg, CGraphOptDlg, CFileAction_MAIN, CDiff_Options, CCVSAlert_MAIN, UPromptMessage
  • OnOption() : CItemListDlg
  • OnOptionsmenu() : CDiff_MAIN
  • OnOtherButton() : CCVSAlert_MAIN
  • OnPageChanged() : UWidget
  • OnPagerCalcSize() : CCJPagerCtrl
  • OnPagerScroll() : CCJPagerCtrl
  • OnPaint() : CTipDlg, CSplashWnd, CColorStatic, CGfxSplitterWnd, CGfxOutBarCtrl, CCJTreeCtrl, CCJToolBarBase, CCJToolBar, CCJTabCtrl, CCJReBar, CCJOutlookBar, CCJMetaFileButton, CCJMaskEdit, CCJLogoPane, CCJListCtrl, CCJListBox, CCJHtmlView, CCJHexEdit, CCJFontCombo, CCJFlatTabCtrl, CCJFlatSplitterWnd, CCJFlatHeaderCtrl, CCJFlatComboBox, CCJFlatButton, CCJControlBar, CCJColorPopup, CCJColorPicker, CCJCaptionPopupWnd, CCJCaption, CBrowserBar, CPseudoDraw
  • OnPaletteChanged() : CCJColorPopup
  • OnPath() : CSelectionDetailsDlg
  • OnPopup() : UCvsFiles
  • OnPreparePrinting() : CWincvsView, CGraphView, CBrowseFileView
  • OnPreserveZeroBorderHelper() : CCJToolBar
  • OnPrint() : CGraphView, CBrowseFileView
  • OnProgressChange() : CCJHtmlView
  • OnPropertyChange() : CCJHtmlView
  • OnPushPinButton() : CCJCaption
  • OnPushPinCancel() : CCJCaption
  • OnPythondllsel() : CGetPrefs_WINCVS
  • OnQueryNewPalette() : CCJColorPopup
  • OnQueryProperties() : CWinCvsBrowser, CBrowseFileView
  • OnQueryShellactionDefault() : CGraphView, CBrowseFileView
  • OnQuit() : CCJHtmlView, UCvsFrame
  • OnRButtonDown() : CWincvsView, CWinCvsBrowser, CGfxOutBarCtrl, CCJToolBar, CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • OnRclick() : CMyShellTree
  • OnReadProtocols() : CCvsRootDlg
  • OnRecalcParent() : CCJReBar
  • OnRedraw() : UWidget
  • OnRefresh() : CItemListDlg
  • OnRemove() : CCustomizeMenus
  • OnReset() : CGraphOptDlg
  • OnResetView() : CWinCvsBrowser, CBrowseFileView
  • OnRev() : CUpdateOptions, CRtag_OPTIONS, CLogFilters
  • OnRevision() : CSelectionDetailsDlg
  • OnRightArrow() : CCJFlatTabCtrl
  • OnSavesettings() : CWincvsDoc
  • OnScroll() : CGraphView
  • OnSelchange() : CCJTabView, CKeywordComboBox
  • OnSelChange() : CCJColorPicker
  • OnSelchangeAction() : CFileAction_MAIN
  • OnSelchangeAutoRefresh() : CItemListDlg
  • OnSelchangeCombo() : CMultilineEntryDlg
  • OnSelchangeCompareType() : CDiff_MAIN
  • OnSelchangeContentsCombo() : CFilterSelectionDlg
  • OnSelchanged() : CWinCvsBrowser, CMyShellTree
  • OnSelchangeFiletodiff() : CCommit_MAIN
  • OnSelchangeMergeType() : CUpdateMerge
  • OnSelchangePath() : CImport_OPTIONS, CCvsRootDlg
  • OnSelchangeProtocol() : CCvsRootDlg
  • OnSelchanging() : CWinCvsBrowser
  • OnSelColumn() : UCvsFiles
  • OnSelcvsroot() : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • OnSelection() : CItemListDlg, CGraphOptDlg
  • OnSelectString() : CSmartComboBox
  • OnSelEndCancel() : CCJColorPicker
  • OnSelEndOK() : CCJColorPicker
  • OnSelfolder() : CCmdLine_MAIN
  • OnSetBitmapSize() : CCJToolBar
  • OnSetButtonSize() : CCJToolBar
  • OnSetCursor() : CWinCvsBrowser, CGfxOutBarCtrl, CCJSizeDockBar, CCJHyperLink, CCJFlatButton, CCJControlBar, CBrowseFileView
  • OnSetDefault() : UWidget
  • OnSetFeature() : CSmartComboBox
  • OnSetFloat() : UWidget
  • OnSetFocus() : CWincvsView, CCJHexEdit, CCJFlatComboBox
  • OnSetfocusLogmsg() : CMultilineEntryDlg
  • OnSetfocusLogmsgWrap() : CMultilineEntryDlg
  • OnSetIcon() : UWidget
  • OnSetItems() : CSmartComboBox
  • OnSetLoc() : UWidget
  • OnSetReadOnly() : CSmartComboBox
  • OnSetSizeHelper() : CCJToolBar
  • OnSetSlider() : UWidget
  • OnSetSliderProperty() : UWidget
  • OnSetState() : UWidget
  • OnSetText() : UWidget
  • OnSetTooltip() : UWidget, UToolbar
  • OnShadow() : CGraphOptDlg
  • OnShowBand() : CCJReBar
  • OnShowWidget() : UWidget
  • OnShowWindow() : CCJBrowseEdit
  • OnSize() : CWincvsView, CCvsStatusBar, CGfxOutBarCtrl, CCJStatusBar, CCJMenuBar, CCJHtmlView, CCJFlatTabCtrl, CCJCaption
  • OnSmartComboSetFeature() : UWidget
  • OnSmartComboSetItems() : UWidget
  • OnSmartComboSetReadOnly() : UWidget
  • OnSpecifyRev() : CAnnotate_MAIN
  • OnState() : CLogFilters, CGraphOptDlg
  • OnStatusBar() : CCJHtmlView
  • OnStatusBarText() : UWidget
  • OnStatusTextChange() : CCJHtmlView
  • OnStopcvs() : CWincvsApp
  • OnSysColorChange() : CGfxOutBarCtrl, CCJToolBar, CCJOutlookBar, CCJFlatComboBox, CCJFlatButton, CCJCaption, CCJCaptionButton
  • OnSysCommand() : CMainFrame
  • OnTabSelChange() : CCJTabCtrlBar
  • OnTag() : CGraphOptDlg
  • OnTbButton() : UToolbar
  • OnTbCheckBtn() : UToolbar
  • OnTbDropDown() : UToolbar
  • OnTbEnd() : UToolbar
  • OnTbInit() : UToolbar
  • OnTbSeparator() : UToolbar
  • OnTcldllsel() : CGetPrefs_WINCVS
  • OnTcpip() : CGetPrefs_GLOBALS
  • OnTheaterMode() : CCJHtmlView
  • OnTimer() : CSplashWnd, CMainFrame, CCvsStatusBar, CGfxOutBarCtrl, CCJOutlookBar, CCJFlatComboBox, CCJFlatButton, CCJCaptionPopupWnd, CBrowseFileView, CEditorMonDlg
  • OnTitleChange() : CCJHtmlView
  • OnToolBar() : CCJHtmlView
  • OnToolBarBeginAdjust() : CCJToolBar
  • OnToolBarBeginDrag() : CCJToolBar
  • OnToolBarBtnDropDown() : CCJToolBar
  • OnToolBarChange() : CCJToolBar
  • OnToolBarCustomHelp() : CCJToolBar
  • OnToolBarEndAdjust() : CCJToolBar
  • OnToolBarEndDrag() : CCJToolBar
  • OnToolBarGetButtonInfo() : CCJToolBar
  • OnToolBarQueryDelete() : CCJToolBar
  • OnToolBarQueryInsert() : CCJToolBar
  • OnToolBarReset() : CCJToolBar
  • OnToolHitTest() : CCJToolBar, CCJReBar
  • OnTreeDelete() : UWidget
  • OnTreeExpand() : UWidget
  • OnTreeExpanding() : UCvsFolders
  • OnTreeGetInfo() : UWidget
  • OnTreeGetSel() : UWidget
  • OnTreeInsert() : UWidget
  • OnTreeResetAll() : UWidget
  • OnTreeSelect() : UWidget
  • OnTreeSelecting() : UCvsFolders
  • OnTreeSetData() : UWidget
  • OnTreeSetIcon() : UWidget
  • OnUnblockHandler() : UWidget
  • OnUp() : CCustomizeMenus
  • OnUpdateAppCmdline() : CWinCvsBrowser
  • OnUpdateButtonClose() : CCJExplorerBar, CCJControlBar
  • OnUpdateButtonMinimize() : CCJControlBar
  • OnUpdateCmd() : CWinCvsBrowser, CExploreBar
  • OnUpdateCmdUI() : CCJToolBar, CCJReBar, CCJControlBar
  • OnUpdateCustomize() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateCvsCmd() : CWincvsDoc, CBrowseFileView
  • OnUpdateFilterMask() : CMainFrame
  • OnUpdateFocus() : UWidget
  • OnUpdateGeneric() : UCvsFolders
  • OnUpdateGfxLargeicon() : CGfxOutBarCtrl
  • OnUpdateGfxRemoveitem() : CGfxOutBarCtrl
  • OnUpdateGfxRenameitem() : CGfxOutBarCtrl
  • OnUpdateGfxSmallicon() : CGfxOutBarCtrl
  • OnUpdateGraphChangelogmessage() : CGraphView
  • OnUpdateGraphSetdescription() : CGraphView
  • OnUpdateGraphSetstate() : CGraphView
  • OnUpdateHistory() : CMainFrame
  • OnUpdateMacro() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateMacroAdmin() : CWincvsDoc
  • OnUpdateMenuButton() : CCJMenuBar
  • OnUpdatePrefs() : CWincvsDoc
  • OnUpdateQueryProperties() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateSavesettings() : CWincvsDoc
  • OnUpdateStopcvs() : CWincvsApp
  • OnUpdateUI() : UWidget, UToolbar, UMenu, UMacAppMenu
  • OnUpdateUsePyshell() : CWincvsDoc
  • OnUpdateUseTclshell() : CWincvsDoc
  • OnUpdateViewAdd() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateViewAddB() : CBrowseFileView
  • OnUpdateViewAdded() : CMainFrame
  • OnUpdateViewAnnotate() : CBrowseFileView
  • OnUpdateViewChanged() : CMainFrame
  • OnUpdateViewCheckout() : CWinCvsBrowser, CExploreBar, CBrowseFileView
  • OnUpdateViewClearall() : CMainFrame
  • OnUpdateViewConflict() : CMainFrame
  • OnUpdateViewDelrev() : CGraphView
  • OnUpdateViewDiff() : CGraphView
  • OnUpdateViewEditseldef() : CBrowseFileView
  • OnUpdateViewExplore() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateViewFilterbarClearall() : CMainFrame
  • OnUpdateViewFilterbarEnable() : CMainFrame
  • OnUpdateViewFilterbarOptions() : CMainFrame
  • OnUpdateViewFullRowDetails() : CBrowseFileView
  • OnUpdateViewGraph() : CBrowseFileView
  • OnUpdateViewHidemissing() : CMainFrame
  • OnUpdateViewHideunknown() : CMainFrame
  • OnUpdateViewIgnore() : CMainFrame
  • OnUpdateViewImport() : CWinCvsBrowser, CExploreBar, CBrowseFileView
  • OnUpdateViewList() : CBrowseFileView
  • OnUpdateViewMissing() : CMainFrame
  • OnUpdateViewModified() : CMainFrame
  • OnUpdateViewRecursive() : CMainFrame
  • OnUpdateViewRelease() : CBrowseFileView
  • OnUpdateViewReload() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnUpdateViewRemoved() : CMainFrame
  • OnUpdateViewRetrieve() : CGraphView
  • OnUpdateViewRmv() : CBrowseFileView
  • OnUpdateViewSelnonsig() : CGraphView
  • OnUpdateViewSmallIcons() : CBrowseFileView
  • OnUpdateViewTag() : CGraphView
  • OnUpdateViewTrash() : CBrowseFileView
  • OnUpdateViewUnknown() : CMainFrame
  • OnUpdateViewUnlockf() : CGraphView
  • OnUpdateViewUpdate() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnUpdateViewUpone() : CBrowseFileView
  • OnUsePyshell() : CWincvsDoc
  • OnUser() : CLogFilters
  • OnUseTclshell() : CWincvsDoc
  • OnViewAdd() : CWinCvsBrowser, CBrowseFileView
  • OnViewAddb() : CBrowseFileView
  • OnViewAdded() : CMainFrame, UCvsFrame
  • OnViewAddu() : CBrowseFileView
  • OnViewBrowselocationRemoveunwanted() : CWincvsDoc
  • OnViewChanged() : CMainFrame, UCvsFrame
  • OnViewCheckout() : CWinCvsBrowser, CExploreBar, CBrowseFileView
  • OnViewClearall() : CMainFrame
  • OnViewCommit() : CWinCvsBrowser, CBrowseFileView
  • OnViewConflict() : CMainFrame, UCvsFrame
  • OnViewDelrev() : CGraphView
  • OnViewDiff() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnViewEdit() : CWinCvsBrowser, CBrowseFileView
  • OnViewEditors() : CWinCvsBrowser, CBrowseFileView
  • OnViewEditsel() : CGraphView, CBrowseFileView
  • OnViewEditseldef() : CGraphView, CBrowseFileView
  • OnViewExplore() : CWinCvsBrowser, CBrowseFileView
  • OnViewFilterbarClearall() : CBrowseFileView
  • OnViewFilterbarEnable() : CBrowseFileView
  • OnViewFilterbarOptions() : CBrowseFileView
  • OnViewForceedit() : CWinCvsBrowser, CBrowseFileView
  • OnViewFullRowDetails() : CBrowseFileView
  • OnViewGraph() : CBrowseFileView
  • OnViewHidemissing() : CMainFrame
  • OnViewHideunknown() : CMainFrame
  • OnViewIgnore() : CMainFrame
  • OnViewIgnored() : UCvsFrame
  • OnViewImport() : CWinCvsBrowser, CExploreBar, CBrowseFileView
  • OnViewInit() : CWincvsDoc
  • OnViewList() : CBrowseFileView
  • OnViewLog() : CWinCvsBrowser, CBrowseFileView
  • OnViewMissing() : CMainFrame, UCvsFrame
  • OnViewModified() : CMainFrame, UCvsFrame
  • OnViewNewInstance() : CWinCvsBrowser, CBrowseFileView
  • OnViewOpensel() : CGraphView, CBrowseFileView
  • OnViewOpenselas() : CGraphView, CBrowseFileView
  • OnViewPathChanged() : CWincvsDoc
  • OnViewQueryUpdate() : CWinCvsBrowser, CBrowseFileView
  • OnViewRecursive() : CMainFrame, UCvsFrame, UCvsFiles
  • OnViewRelease() : CWinCvsBrowser, CBrowseFileView
  • OnViewReload() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnViewRemoved() : CMainFrame, UCvsFrame
  • OnViewReservededit() : CWinCvsBrowser, CBrowseFileView
  • OnViewRetrieve() : CGraphView
  • OnViewRetrieveAs() : CGraphView
  • OnViewRmv() : CBrowseFileView
  • OnViewSelnonsig() : CGraphView
  • OnViewSmallIcons() : CBrowseFileView
  • OnViewStatus() : CWinCvsBrowser, CBrowseFileView
  • OnViewTag() : CGraphView
  • OnViewTagBranch() : CWinCvsBrowser, CBrowseFileView
  • OnViewTagDelete() : CWinCvsBrowser, CBrowseFileView
  • OnViewTagNew() : CWinCvsBrowser, CBrowseFileView
  • OnViewTrash() : CBrowseFileView
  • OnViewUnedit() : CWinCvsBrowser, CBrowseFileView
  • OnViewUnknown() : CMainFrame, UCvsFrame
  • OnViewUnlock() : CWinCvsBrowser, CBrowseFileView
  • OnViewUnlockf() : CGraphView
  • OnViewUpdate() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnViewUpone() : CBrowseFileView
  • OnViewWatchers() : CWinCvsBrowser, CBrowseFileView
  • OnViewWatchOff() : CWinCvsBrowser, CBrowseFileView
  • OnViewWatchOn() : CWinCvsBrowser, CBrowseFileView
  • OnVisible() : CCJHtmlView
  • OnVScroll() : CCJHexEdit
  • OnWindowPosChanged() : CExploreBar, CCJToolBar, CCJTabView, CCJTabCtrlBar, CCJFlatHeaderCtrl, CCJExplorerBar, CCJControlBar, CBrowserBar
  • OnWindowPosChanging() : CCJToolBarBase, CCJToolBar
  • OnWordwrap() : CMultilineEntryDlg
  • Open() : CCJMemFile, CCvsStreamConsole
  • operator &() : URect
  • operator &=() : URect
  • operator char *() : CBuffer
  • operator CHARFORMAT &() : CCharFormat
  • operator const bool &() : CPersistentBool
  • operator const char *() : PCStr, PCPStr, UStr, UPStr
  • operator const int &() : CPersistentInt
  • operator const T &() : CPersistentT< T >
  • operator const T *() : CStaticAllocT< T >
  • operator const unsigned char *() : PCPStr, UPStr
  • operator const URECT *() : URect
  • operator CRect() : URect
  • operator EntnodeData *() : PyCvsEntry, ENTNODE
  • operator HBITMAP() : aref
  • operator PyThreadState *() : CPython_Interp
  • operator T *() : PyAutoObject< T >, CStaticAllocT< T >
  • operator Tcl_Interp *() : CTcl_Interp
  • operator UMENU() : PyMenuMgr
  • operator URECT *() : URect
  • operator!=() : UStr, URect, UPoint, USize
  • operator()() : match_dir
  • operator+() : URect, UPoint, USize
  • operator+=() : CCJMemFile, UStr, URect, UPoint, USize
  • operator-() : URect, UPoint, USize
  • operator-=() : URect, UPoint, USize
  • operator->() : PyAutoObject< T >
  • operator<() : CMacroEntry, UStr
  • operator<<() : CColorConsole, UStr, UPStr
  • operator=() : CWinPlacement, CCJStatusBarPane, CContentItems, CCJMemFile, CTCLBrowserEnt, PyAutoObject< T >, CPersistentInt, CPersistentBool, CPersistentT< T >, MultiFilesEntry, FileEntry, CMacroEntry, MacBinMaps, CMacBinItem, CMacBinTable, ENTNODE, PCStr, PCPStr, NotificationManager::Node, UTimer, awidget, aref, UStr, UPStr, CMsg, URect, CPseudoItem
  • operator==() : CPersistentInt, CPersistentBool, CPersistentT< T >, CMacroEntry, UStr, URect, UPoint, USize
  • operator>() : UStr
  • operator[]() : CCJMemFile, EntnodeFolder, EntnodeFile, EntnodeData
  • operator|() : URect
  • operator|=() : URect
  • option : _sDiffOptionsItem
  • out : UCvsConsole
  • OutColor() : CWincvsView, UCvsConsole
  • OutConsole() : CWincvsView, UCvsConsole
  • outEnabled : UPseudoCmdStatusWrapper
  • OutLine() : CWincvsView
  • outMark : UPseudoCmdStatusWrapper
  • outName : UPseudoCmdStatusWrapper
  • outUsesMark : UPseudoCmdStatusWrapper
  • overCnt : CTCP2Parse
  • OverideMapWidget() : UWidget
  • OverkillAssert() : CCJTabCtrlBar
  • overLast : CTCP2Parse

- p -

  • p_str() : UPStr
  • PaintItems() : CGfxOutBarCtrl
  • param() : ansiAttrCvt::AnsiSeq
  • paramc() : ansiAttrCvt::AnsiSeq
  • parent : UTREE_INFO, UTREE_INSERT
  • Parse() : CListParserConsole, CModuleParserConsole, CTagParserConsole, CItemListConsole, CCvsRootParser, CProtocolParserConsole, CInfoParserConsole, CCvsRootConsole
  • parse() : CvsArgs
  • ParseIt() : CTCP2Parse
  • path : CMacroEntry
  • pattern : ReportConflict
  • pBaseMap : UMSGMAP
  • pBlackPen : CGfxOutBarCtrl
  • pChild : CGfxOutBarCtrl::CBarFolder
  • pCmdUI : UCmdUI
  • PCPStr() : PCPStr
  • PCStr() : PCStr
  • PeekPumpAndIdle() : CWincvsApp, UCvsApp
  • pfn : UMSGMAP_ENTRY, UMessageMapFunctions
  • pfni_i : UMessageMapFunctions
  • pfni_ii : UMessageMapFunctions
  • pfni_iVP : UMessageMapFunctions
  • pfni_V : UMessageMapFunctions
  • pfni_VP : UMessageMapFunctions
  • pfnV_i : UMessageMapFunctions
  • pfnV_ii : UMessageMapFunctions
  • pfnV_iii : UMessageMapFunctions
  • pfnV_iiVP : UMessageMapFunctions
  • pfnV_iVP : UMessageMapFunctions
  • pfnV_V : UMessageMapFunctions
  • pfnV_VP : UMessageMapFunctions
  • pLargeImageList : CGfxOutBarCtrl, CGfxOutBarCtrl::CBarFolder
  • pNMHDR : UCmdUI
  • PointInRect() : CCJFlatComboBox
  • pool : poolRec
  • pools : garbyRec
  • pos : ansiAttrCvt, USLIDER
  • PositionControls() : CCJStatusBar
  • PositionWindow() : CCJHyperLink
  • PostClickRefresh() : CItemListDlg
  • PostNcDestroy() : CSplashWnd, CGfxGroupEdit, CProgressDlg
  • PostReadProtocolsMsg() : CCvsRootDlg
  • PreCreateWindow() : CWincvsView, CWinCvsBrowser, CMainFrame, CCJTreeCtrl, CCJToolBar, CCJMDIFrameWnd, CCJHexEdit, CCJFrameWnd, CCJFlatTabCtrl, CBrowseFileView
  • PressButton() : CCJToolBar
  • PRESSED : CCJFlatComboBox
  • PreSubclassWindow() : CCJHyperLink, CCJFontCombo, CCJFlatHeaderCtrl, CCJColorPicker, CCJBrowseEdit, CSmartComboBox, CKeywordComboBox
  • PreTranslateAppMessage() : CSplashWnd
  • PreTranslateMessage() : CWincvsApp, CMultilineEntryDlg, CLogFrame, CHistComboBoxEx, CCvsStatusBar, CGfxGroupEdit, CCJTabCtrlBar, CCJHyperLink, CCJFrameWnd, CCJFlatTabCtrl, CCJFlatComboBox, CCJControlBar, CCJColorPopup, CSmartComboBox, CItemListDlg
  • Print() : PyColorConsole
  • print() : CvsArgs
  • PrintOut() : ReportWarning, ReportConflict
  • ProcessMask() : CCJTimeEdit, CCJDateEdit, CCJMaskEdit
  • ProcessSelectionCommand() : CWinCvsBrowser, CBrowseFileView, UCvsFolders, UCvsFiles
  • PromptForColor() : CGraphOptDlg
  • Proportional : CTCP2Parse
  • ProxyHost() : CvsPrefs
  • ProxyPort() : CvsPrefs
  • PruneOption() : CvsPrefs
  • PserverPort() : CvsPrefs
  • pSmallImageList : CGfxOutBarCtrl, CGfxOutBarCtrl::CBarFolder
  • PtInRect() : URect
  • push_back() : CTmpFiles
  • PushBackgroundColor() : CTCP2Parse
  • PushBlink() : CTCP2Parse
  • PushBold() : CTCP2Parse
  • PushEncoding() : CTCP2Parse
  • PushFontSize() : CTCP2Parse
  • PushForegroundColor() : CTCP2Parse
  • PushItalic() : CTCP2Parse
  • PushOut() : CTCP2Parse
  • PushOverstrike() : CTCP2Parse
  • PushReverse() : CTCP2Parse
  • PushSpacing() : CTCP2Parse
  • PushStart() : CTCP2Parse
  • PushTextSegment() : CTCP2Parse
  • PushUnderline() : CTCP2Parse
  • PushURL() : CTCP2Parse
  • PutProperty() : CCJHtmlView
  • pWnd : tagCTV_ITEM, tagTCB_ITEM
  • PyAutoObject() : PyAutoObject< T >
  • PyCmdUI() : PyCmdUI
  • PyColorConsole() : PyColorConsole
  • PyContainer() : PyContainer
  • PyCvsEntry() : PyCvsEntry
  • PyMenuMgr() : PyMenuMgr
  • PyPersistent() : PyPersistent
  • PyRegistry() : PyRegistry
  • PythonLibrary() : CvsPrefs

- q -

  • QsortMethod : CSortList< T >
  • QueryAcceptData() : CWincvsView
  • QueryStatusWB() : CCJHtmlView
  • QuietOption() : CvsPrefs

- r -

  • R : CTCP2Parse::RGBColor
  • r : UCOLOR, UColor
  • RAISED : CCJFlatComboBox
  • rcDownArrow : CGfxOutBarCtrl
  • rcUpArrow : CGfxOutBarCtrl
  • ReadAdminFile() : CCvsSandboxInfo
  • ReadAvailableProtocols() : CCvsRootDlg
  • ReadFields() : TPseudoDoubleNumberText, TPseudoIconCheckBox, TPseudoRotateIconButton, TPseudoIconButton, TPseudoIconPopup, TBuggyPopup
  • ReadIconsID() : UPseudoRotButton
  • ReadOleDateTime() : CCJDateEdit
  • ReadOnly : USmartCombo
  • ReadProtocolDetails() : CCvsRootDlg
  • ReadSelectedTemplate() : CTemplateDlg
  • ReadString() : CCJMemFile
  • RebuildBar() : UToolbar
  • RecalcAllExcept() : CCJSizeDockBar, CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • RecalcLayout() : CGfxSplitterWnd, CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • RecalcSize() : CCJPagerCtrl
  • RecomputeMenuLayout() : CCJMenuBar
  • RecomputeToolbarSize() : CCJMenuBar
  • Rectangle() : UDC
  • rectOldPos : CJX_CONTROLPOS
  • Red : CTCP2Parse
  • ref : aref
  • Ref() : PyAutoObject< T >, EntnodeData, EntnodePath, aref
  • Refresh() : CCJHtmlView
  • Refresh2() : CCJHtmlView
  • Register() : CPersistent
  • RegisterAllObjects() : PyRegistry
  • RegisterValue() : PyContainer
  • RelayEvent() : CMultiLineEditDialogKeyHelper
  • Remove() : CSubclassWndMap, TMString< T >
  • RemoveAll() : CSubclassWndMap, TMString< T >, TPseudoTextListView
  • RemoveAllTabs() : CCJTabCtrlBar
  • RemoveCell() : CMacBinItem
  • RemoveEntry() : MacBinMaps
  • RemoveFolder() : CGfxOutBarCtrl
  • RemoveItem() : CGfxOutBarCtrl, USmartCombo
  • RemoveItems : USmartCombo
  • RemoveListItem() : CCJTabCtrlBar
  • RemoveMenu() : CCJMenu
  • RemovePane() : CCJStatusBar
  • RemoveTimer() : UWidget
  • RemoveView() : CCJTabView, CCJTabCtrlBar
  • replace() : UStr, UPStr
  • ReplaceView() : CCJFlatSplitterWnd
  • ReportConflict() : ReportConflict
  • ReportError() : CCJHyperLink
  • ReportWarning() : ReportWarning
  • RepositionCaret() : CCJHexEdit
  • Reset() : CSortList< T >, MacBinMaps
  • reset() : MultiFiles, CvsArgs
  • ResetBrowser() : CWinCvsBrowser, UCvsFolders
  • ResetIdleTime() : CWincvsApp
  • ResetLastFilter() : CSortHeaderCtrl
  • ResetTimeStamp() : CPersistent
  • ResetToolTips() : CCJTabCtrlBar
  • ResetView() : CWinCvsBrowser, CBrowseFileView, UCvsFolders, UCvsFiles
  • Resize() : CCVSAlert_MAIN
  • ResizeWindow() : CCJFlatHeaderCtrl
  • Resort() : CBrowseFileView, UCvsFiles
  • RestartScriptEngine() : CWincvsApp, UCvsApp
  • RestoreState() : CCJToolBar
  • Result() : CSortList< T >
  • result : UTREE_INSERT
  • RetrievePath() : CWinCvsBrowser, UCvsFolders
  • RetrieveSel() : CGraphView
  • revCnt : CTCP2Parse
  • reverse : ansiAttrCvt
  • revLast : CTCP2Parse
  • rfind() : UStr
  • RGB : CTCP2Parse::RGBColor
  • rgbqFrom : CJX_COLORMAP
  • RhostPort() : CvsPrefs
  • right : URECT
  • RoundRect() : UDC
  • row : ULIST_INFO, ULIST_INSERT
  • RshName() : CvsPrefs
  • rtCMPString() : CMPString
  • rtCMString() : CMString
  • rtCPersistent() : CPersistent
  • rtCPersistentBool() : CPersistentBool
  • rtCPersistentInt() : CPersistentInt
  • rtPCPStr() : PCPStr
  • rtPCStr() : PCStr
  • rtrim() : UStr
  • rtUCmdTarget() : UCmdTarget
  • rtUCvsApp() : UCvsApp
  • rtUCvsConsole() : UCvsConsole
  • rtUCvsFiles() : UCvsFiles
  • rtUCvsFolders() : UCvsFolders
  • rtUCvsFrame() : UCvsFrame
  • rtUCvsGraph() : UCvsGraph
  • rtUCvsMenubar() : UCvsMenubar
  • rtUCvsStatusbar() : UCvsStatusbar
  • rtUCvsToolbar() : UCvsToolbar
  • rtUEditMessage() : UEditMessage
  • rtUMacAppMenu() : UMacAppMenu
  • rtUMenu() : UMenu
  • rtUObject() : UObject
  • rtUPromptMessage() : UPromptMessage
  • rtUToolbar() : UToolbar
  • rtUWidget() : UWidget
  • Run() : KoWatcher

- s -

  • sAllURuntimeClass : URuntimeClass
  • sample1 : ReportConflict
  • sample2 : ReportConflict
  • samples : ReportWarning
  • Save() : CCJMemFile
  • save() : CvsPrefs
  • SaveAll() : CPersistent
  • SaveAllModified() : CWincvsApp
  • SaveAllSettings() : CPersistent
  • SaveBarState() : CCJMDIFrameWnd, CCJFrameWnd, CCJControlBar
  • SaveColumns() : CBrowseFileView, UCvsFiles
  • SaveColumnWidths() : CCJListView, CCJListCtrl
  • SaveDefaults() : MacBinMaps
  • SaveSel() : CGraphView
  • SaveSettings() : KoIgnoreModel, KoRecursionModel, KoFilterModel, KiFilterBase
  • SaveState() : CCJToolBar
  • SaveWindowPos() : CCJWindowPlacement
  • SayWelcome() : UCvsApp
  • ScrollIntoView() : CCJHexEdit
  • Search() : UCvsFiles, WININFO
  • searchAllPath() : CFindSettings
  • searchPath() : CFindSettings
  • SearchWidID() : LPseudoWinAttachment
  • segment : CTCP2Parse
  • sel : CWinLogData
  • SelDelete() : CCJHexEdit
  • Selected() : CWinLogData
  • SelectItem() : CItemListDlg
  • SelectItems() : CCJTreeCtrl
  • SelectObject() : UDC
  • selfB : CWinLogData
  • SelfBounds() : CWinLogData
  • SelInsert() : CCJHexEdit
  • SendChar() : CCJMaskEdit
  • SendMessageC() : CCJToolBar
  • seq() : ansiAttrCvt::AnsiSeq
  • Serialize() : CWincvsDoc, CGraphDoc
  • ServerName() : CvsPrefs
  • set() : UStr, UPStr
  • SetAccelerators() : CCVSAlert_MAIN
  • SetActions() : CMultilineEntryDlg
  • SetActiveView() : CCJTabView, CCJTabCtrlBar
  • SetActualSize() : CCJSizeDockBar
  • SetAddControl() : CvsPrefs
  • SetAddressBar() : CCJHtmlView
  • SetAlertTitle() : CvsAlert
  • SetAlternateColors() : CCJFlatButton
  • SetAlwaysUseCvsroot() : CvsPrefs
  • SetAnchorHighlight() : CCJToolBarCtrl
  • SetAnimationTickCount() : CGfxOutBarCtrl
  • SetAnimSelHighlight() : CGfxOutBarCtrl
  • SetAnsiString() : CCJMenuData
  • SetAutoSize() : CCJHyperLink
  • SetBackgroundProcess() : CWincvsApp
  • SetBandInfo() : CCJReBarCtrl
  • SetBarInfo() : CCJReBarCtrl
  • SetBitmap() : CCJToolBar
  • SetBitmapBackground() : CCJMenu
  • SetBitmapSize() : CCJToolBar
  • SetBkColor() : CCJReBarCtrl, CCJPagerCtrl, CCJColorPicker
  • SetBorder() : CCJPagerCtrl
  • SetBorders() : CCJToolBarBase
  • SetBPR() : CCJHexEdit
  • SetBrowser() : CvsPrefs
  • SetButton() : CCJToolBar
  • SetButtonAccelerator() : CCVSAlert_MAIN
  • SetButtonFont() : CCJFlatButton
  • SetButtonInfo() : CCJToolBarCtrl, CCJToolBar
  • SetButtons() : CCJToolBar
  • SetButtonSize() : CCJToolBar, CCJPagerCtrl
  • SetButtonStructSize() : CCJToolBar
  • SetButtonStyle() : CCJToolBar, CCJCaptionButton
  • SetButtonText() : CCJToolBar
  • SetButtonTitle() : CvsAlert
  • SetButtonTitles() : CCVSAlert_MAIN
  • SetButtonWidth() : CCJToolBarCtrl
  • SetCaptionColors() : CCJCaption
  • SetCheck() : CCJToolCmdUI, PyCmdUI
  • SetCheckoutRO() : CvsPrefs
  • SetChild() : CCJPagerCtrl, CCJControlBar
  • SetChildWindow() : CCJCaption
  • SetCmdID() : CCJToolBar
  • SetColor() : CColorStatic, CCJMonthCalCtrl, CCJColorPicker
  • SetColors() : CCJHyperLink
  • SetColorScheme() : CCJReBarCtrl
  • SetColumnWidth() : CCJListView, CCJListCtrl
  • SetConflict() : ReportConflict
  • SetConsoleFont() : CvsPrefs
  • SetContext() : CMainFrame, KoFilterModel
  • SetContinue() : UCmdUI
  • SetCtrlHelpID() : CHHelpSupport
  • SetCtrlPressedOnOK() : CvsPrefs
  • SetCurrentMap() : CMacBinTable
  • SetCurSel() : CCJFlatTabCtrl, CCJMonthCalCtrl
  • SetCustomText() : CCJColorPicker
  • SetCvsConsole() : CvsPrefs, CCvsProcessData
  • SetCvsExitOnError() : CTcl_Interp
  • SetCvsLastErrorCode() : CTcl_Interp
  • SetCvsProcess() : CWincvsApp, UCvsApp
  • SetCvsRunning() : CWincvsApp, UCvsApp, CvsPrefs
  • SetCvsStopping() : CWincvsApp, UCvsApp
  • SetCvsVersion() : CvsPrefs
  • SetData() : CMMenuString, CWinPlacement, CCJHexEdit, CPersistentT< T >, CPersistent, TMString< T >, TMPersistent< T >, PCStr, PCPStr
  • SetDateTime() : CCJDateEdit
  • SetDayState() : CCJMonthCalCtrl
  • SetDefaultButton() : CCVSAlert_MAIN
  • SetDefaultCursor() : CCJHyperLink
  • SetDefaultInput() : CDiff_MAIN
  • SetDefaultRoot() : UCvsFolders
  • SetDefaults() : CTCP2Parse
  • SetDefaultText() : CCJColorPicker
  • SetDescription() : CKeywordComboBox
  • SetDescriptionWnd() : CKeywordComboBox
  • setdir() : MultiFilesEntry
  • SetDisabledImageList() : CCJToolBarCtrl
  • SetDisableOldStyle() : CCJMenu
  • SetDisableSplashScreen() : CvsPrefs
  • SetDlgDefExt() : CCJBrowseEdit
  • SetDlgFileName() : CCJBrowseEdit
  • SetDlgFilter() : CCJBrowseEdit
  • SetDlgOpenFile() : CCJBrowseEdit
  • SetDlgOwner() : CCJBrowseEdit
  • SetDlgStyle() : CCJBrowseEdit
  • SetDlgTitle() : CCJBrowseEdit
  • SetDrawTextFlags() : CCJToolBarCtrl
  • SetEditMask() : CCJMaskEdit
  • SetEditSel() : CCJComboBoxEx
  • SetEncoding() : EntnodeFile
  • SetEncryptCommunication() : CvsPrefs
  • SetEntryDescription() : CMultilineEntryDlg
  • SetExtDiff() : CvsPrefs
  • SetExtendedStyle() : CCJToolBarCtrl, CCJToolBar, CCJListView, CCJListCtrl, CCJComboBoxEx
  • SetFeature() : USmartCombo
  • SetFileActionType() : CvsPrefs
  • SetFilterBarMask() : CMainFrame
  • SetFilterChangeTimeout() : CSortHeaderCtrl
  • SetFilterText() : CSortHeaderCtrl
  • SetFirstDayOfWeek() : CCJMonthCalCtrl
  • SetFolderImageList() : CGfxOutBarCtrl
  • SetFolderText() : CGfxOutBarCtrl
  • setFont() : UCvsConsole
  • SetFontBold() : CCJFlatHeaderCtrl
  • SetFormat() : CCJDateTimeCtrl
  • SetFullScreen() : CCJHtmlView
  • SetGroup() : CPseudoToggle
  • SetHasLoogedIn() : CvsPrefs
  • SetHeight() : CCJToolBar, CCJHtmlView
  • SetHelper() : CvsPrefs
  • SetHideCommandDlgAnnotate() : CvsPrefs
  • SetHideCommandDlgDiff() : CvsPrefs
  • SetHideCommandDlgFileAction() : CvsPrefs
  • SetHideCommandDlgGraph() : CvsPrefs
  • SetHideCommandDlgLog() : CvsPrefs
  • SetHideCommandDlgStatus() : CvsPrefs
  • SetHideCommandDlgUpdate() : CvsPrefs
  • SetHideCommandDlgUseShift() : CvsPrefs
  • SetHideOption() : CvsAlert
  • SetHilightColors() : CCJFontCombo
  • SetHome() : CvsPrefs
  • SetHotImageList() : CCJToolBarCtrl
  • SetHotItem() : CCJToolBarCtrl, CCJToolBar
  • SetHours() : CCJTimeEdit
  • SetIcon() : CHistComboBoxEx, CCJFlatButton, CCVSAlert_MAIN
  • SetIconSize() : CCJMenu
  • SetICTextOption() : CvsPrefs
  • SetIgnored() : EntnodeData
  • SetImageList() : CGfxOutBarCtrl, CCJToolBarCtrl, CCJToolBar, CCJReBarCtrl, CCJComboBoxEx
  • SetImageLists() : CCJOutlookBar
  • SetIndent() : CCJToolBarCtrl, CCJToolBar
  • SetIndicators() : CCvsStatusBar
  • SetInsertMark() : CCJToolBarCtrl
  • SetInsertMarkColor() : CCJToolBarCtrl
  • SetIsoConvert() : CvsPrefs
  • SetItem() : CCJComboBoxEx
  • SetItemBold() : CCJTreeCtrl
  • SetItemColor() : CCJTreeCtrl
  • SetItemData() : CGfxOutBarCtrl
  • SetItemFont() : CCJTreeCtrl
  • SetItemImage() : CGfxOutBarCtrl
  • SetItems() : CCJOutlookBar, USmartCombo
  • SetItemText() : CGfxOutBarCtrl
  • SetKeyword() : USmartCombo
  • SetKserverPort() : CvsPrefs
  • SetLastWorkingDir() : CvsPrefs
  • SetLeft() : CCJHtmlView
  • SetLinkCursor() : CCJHyperLink
  • SetLocked() : EntnodeData
  • SetLogoFont() : CCJLogoPane
  • SetLogoText() : CCJLogoPane
  • SetLogoutTimeOut() : CvsPrefs
  • SetMacBinEncodeBinariesOnly() : CvsPrefs
  • SetMacBinEncoding() : CvsPrefs
  • SetMacLF() : CvsPrefs
  • SetMask() : KoFilterModel, KoFilterMask
  • SetMatchEntriesCase() : CvsPrefs
  • SetMaxSelCount() : CCJMonthCalCtrl
  • SetMaxTextRows() : CCJToolBarCtrl
  • SetMenuBar() : CCJHtmlView
  • SetMenuID() : CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • SetMessages() : CCVSAlert_MAIN
  • SetMetaFiles() : CCJMetaFileButton
  • SetMinimumColSize() : CCJListView, CCJListCtrl
  • SetMins() : CCJTimeEdit
  • SetMissing() : EntnodeData
  • SetMode() : CCvsStreamConsole
  • SetMonthCalColor() : CCJDateTimeCtrl
  • SetMonthCalFont() : CCJDateTimeCtrl
  • SetMonthDelta() : CCJMonthCalCtrl
  • SetMultilineEntry() : CAdminOption_MAIN
  • SetNewStyle() : CWinCvsBrowser
  • SetNode() : CGraphDoc
  • SetNormalColors() : CCJFontCombo
  • SetNormalSize() : CCJControlBar
  • SetOffline() : CCJHtmlView
  • SetOptions() : CCJHexEdit
  • SetOwner() : CCJToolBar, CCJReBarCtrl, CCJOutlookBar
  • SetPadding() : CCJToolBar
  • SetPageValue() : LPseudoWinAttachment
  • SetPalette() : CCJReBarCtrl
  • SetPaneWidth() : CCJStatusBar
  • SetPos() : CCJPagerCtrl
  • SetProblem() : ControlCvsArgs
  • SetProgress() : CProgressDlg, CProgress
  • SetProxyHost() : CvsPrefs
  • SetProxyPort() : CvsPrefs
  • SetPruneOption() : CvsPrefs
  • SetPserverPort() : CvsPrefs
  • SetPseudoID() : CDynToolBar
  • SetPseudoWidget() : TPseudoWinAdorner, TPseudoWinBehavior
  • SetPythonLibrary() : CvsPrefs
  • SetQuietOption() : CvsPrefs
  • SetRadio() : CPseudoToggle
  • SetRange() : CCJMonthCalCtrl, CCJDateTimeCtrl
  • SetReadOnly() : CSmartComboBox, USmartCombo
  • SetRect() : URect
  • SetRectEmpty() : URect
  • SetRecursive() : CBrowseFileView, UCvsFiles
  • SetRegisterAsBrowser() : CCJHtmlView
  • SetRegisterAsDropTarget() : CCJHtmlView
  • SetRemoved() : EntnodeData
  • SetResolved() : EntnodeData
  • SetResourceIDs() : CCJMDIChildWnd
  • SetRhostPort() : CvsPrefs
  • SetRowColors() : CCJListView, CCJListCtrl
  • SetRows() : CCJToolBar
  • SetRshName() : CvsPrefs
  • SetScrollArea() : CCJPagerCtrl
  • SetSearchType() : CCJBrowseEdit
  • SetSel() : CCJHexEdit
  • SetSelected() : CWinLogData
  • SetSelectExact() : CSmartComboBox
  • SetSelection() : TPseudoTextListView
  • SetSelectionChanged() : CWinCvsBrowser
  • SetSelectionMode() : CCJColorPicker
  • SetSelectionNotificationLocked() : CWinCvsBrowser
  • SetSelFolder() : CGfxOutBarCtrl
  • SetSelRange() : CCJMonthCalCtrl
  • SetServerName() : CvsPrefs
  • SetSettingsFolder() : CvsPrefs
  • SetShowCvs() : CvsPrefs
  • SetSilent() : CCJHtmlView
  • SetSizes() : CCJToolBar
  • SetSmallIconView() : CGfxOutBarCtrl
  • SetSortImage() : CSortHeaderCtrl, CCJFlatHeaderCtrl
  • SetState() : CCJToolBar, EntnodeData, CPseudoToggle
  • SetStatusBar() : CCJHtmlView
  • SetStatusBarText() : UCvsApp
  • SetStatusOutputType() : CvsPrefs
  • SetStyle() : CCJToolBarCtrl
  • SetTabImageList() : CCJTabView, CCJTabCtrlBar
  • SetTabMenuID() : CCJTabCtrlBar
  • SetTclFileRunning() : CvsPrefs
  • SetTclLibrary() : CvsPrefs
  • SetText() : CCJToolCmdUI, PyCmdUI, UCmdUI
  • SetTextColor() : CCJReBarCtrl, CCJColorPicker
  • SetTextStyle() : CCJCaption
  • SetTheaterMode() : CCJHtmlView
  • SetTime() : CCJDateTimeCtrl
  • SettingsFolder() : CvsPrefs
  • SetTipText() : CCJFlatTabCtrl
  • SetTitle() : CWincvsDoc, CCVSAlert_MAIN
  • SetToday() : CCJMonthCalCtrl
  • SetToolBar() : CCJHtmlView
  • SetToolbarStyle() : CCJToolBar
  • SetTooltip() : UCmdUI
  • SetToolTips() : CCJToolBar, CCJReBarCtrl
  • SetTop() : CCJHtmlView
  • SetTrackingState() : CCJMenuBar
  • SetTrackSelection() : CCJColorPicker
  • SetTypeCreatorConflict() : ReportConflict
  • SetUnderline() : CCJHyperLink
  • SetUnixLF() : CvsPrefs
  • SetUnknown() : EntnodeData
  • SetUnmodified() : EntnodeData
  • SetUpdateCaseSensitiveNames() : CvsPrefs
  • SetUpdateLastCheckinTime() : CvsPrefs
  • SetUpdateThreeWayConflicts() : CvsPrefs
  • SetURL() : CCJHyperLink
  • SetUseAltCvs() : CvsPrefs
  • SetUseProxy() : CvsPrefs
  • SetUseShell() : CvsPrefs
  • SetValue() : PyPersistent, KeywordDisplayInfo, TPseudoDoubleNumberText
  • SetViewer() : CvsPrefs
  • SetViewToolTip() : CCJTabCtrlBar
  • SetViewType() : CBrowseFileView
  • SetVisible() : CCJHtmlView
  • SetVisited() : CCJHyperLink, EntnodeData
  • SetWhichCvs() : CvsPrefs
  • SetWideString() : CCJMenuData
  • SetWidID() : UPseudoPageHider, UPseudoPlaceHolder
  • SetWindowSize() : CCJColorPopup, CCJColorPicker
  • SetWinInfo() : CDynToolBar
  • SetWordWrapLogMsg() : CvsPrefs
  • SetZ9Option() : CvsPrefs
  • SetZLevel() : CvsPrefs
  • sFocusCmdID : UWidget
  • sFocusWidID : UWidget
  • shareData : ENTNODE
  • ShowAlert() : CvsAlert
  • ShowBand() : CCJReBarCtrl
  • ShowColumn() : CCJFlatSplitterWnd
  • ShowColumns() : UCvsFiles
  • ShowCvs() : CvsPrefs
  • ShowFrameControls() : CCJControlBar
  • ShowHelp() : CHHelpSupport
  • ShowProtocolDescription() : CCvsRootDlg
  • ShowRow() : CCJFlatSplitterWnd
  • ShowSplashScreen() : CSplashWnd
  • ShowTipAtStartup() : CWincvsApp
  • ShowTipOfTheDay() : CWincvsApp
  • sig : MACBINMAP
  • SignalStartWatch() : KoWatcher
  • SignalTerminate() : KoWatcher
  • SingleClick() : CPseudoItem
  • size() : CBuffer, CStaticAllocT< T >
  • Size() : URect
  • SizeMinReq() : CCJMonthCalCtrl
  • SizeOf() : CMMenuString, CWinPlacement, CPersistentT< T >, CPersistent, TMString< T >, TMPersistent< T >, PCStr, PCPStr
  • sizeofcell : DYN_LIST
  • SizeTabView() : CCJTabCtrlBar
  • SizeToolBar() : CCJToolBar
  • SizeToRect() : CCJReBarCtrl
  • sMAMenuWidID : UMacAppMenu
  • Sort() : CCJSortClass
  • SortItems() : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • SortList() : CCJListView, CCJListCtrl
  • spec : FileEntry
  • SpendTime() : LMainPseudoAttachment
  • Split() : TKeyString< delimiter >
  • SplitCvsRoot() : CCvsRootParser
  • sPPMenuWidID : UPPMenu
  • st_atime : stat
  • st_ctime : stat
  • st_dev : stat
  • st_gid : stat
  • st_ino : stat
  • st_mode : stat
  • st_mtime : stat
  • st_nlink : stat
  • st_rdev : stat
  • st_size : stat
  • st_uid : stat
  • StartDragDockBar() : CCJDockContext
  • StartGroupEdit() : CGfxOutBarCtrl
  • StartItemEdit() : CGfxOutBarCtrl
  • StartResize() : CCJDockContext
  • StartScriptEngine() : CWincvsApp, UCvsApp
  • StartWatch() : KoWatcher
  • STATE : CCJFlatComboBox
  • status : ReportConflict
  • StatusOutputType() : CvsPrefs
  • StepToLocation() : CWinCvsBrowser, UCvsFolders
  • Stop() : CCJHtmlView
  • StopScriptEngine() : CWincvsApp, UCvsApp
  • StopWatch() : KoWatcher
  • StoreExpanded() : CWinCvsBrowser, UCvsFolders
  • StoreLocationSettings() : CMainFrame
  • StoreValues() : CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS
  • Stretch() : CCJDockContext
  • SubclassHeader() : CCJListView, CCJListCtrl
  • substr() : UStr
  • sValidMenu : UWidget
  • SwitchView() : CCJFlatSplitterWnd
  • SwitchWrapEdit() : CMultilineEntryDlg
  • syncflag : CCJMenuData
  • SynchronizeMenu() : CCJMenu
  • szLabel : tagCTV_ITEM
  • szName : ColorTableEntry
  • szTabLabel : tagTCB_ITEM
  • szToolTipLabel : tagTCB_ITEM

- t -

  • targets : CAllTargets
  • tbButton : TOOLBARINFO
  • TbEntry() : TbEntry
  • TbEntryButton() : TbEntryButton
  • TbEntryChkButton() : TbEntryChkButton
  • TbEntryDropDown() : TbEntryDropDown
  • TbEntrySeparator() : TbEntrySeparator
  • TBrowserFill() : TBrowserFill
  • TBrowserFillDummy() : TBrowserFillDummy
  • TBuggyPopup() : TBuggyPopup
  • TclLibrary() : CvsPrefs
  • TEditHandler() : TEditHandler< editType >
  • text : CGfxGroupEdit
  • TextOutClipped() : UDC
  • TGraphCmdStatus() : TGraphCmdStatus
  • TGraphCurSelector() : TGraphCurSelector
  • TGraphDelCmd() : TGraphDelCmd
  • TGraphRectSelect() : TGraphRectSelect
  • TGraphSelNonSig() : TGraphSelNonSig
  • tHelpIDMap : CHHelpSupport
  • tHelpIDsData : CHHelpSupport
  • title : CustInvertTable, ULIST_INFO, ULIST_INSERT, UTREE_INFO, UTREE_INSERT, UTB_INIT
  • TKeyString() : TKeyString< delimiter >
  • TLaunchHandler() : TLaunchHandler< lauchType >
  • TMPersistent() : TMPersistent< T >
  • TMString() : TMString< T >
  • ToggleAdded() : KoFilterModel
  • ToggleBtn() : CPseudoToggle
  • ToggleChanged() : KoFilterModel
  • ToggleConflict() : KoFilterModel
  • ToggleDocking() : CCJDockContext
  • ToggleFilter() : KoFilterModel
  • ToggleFilterMasksEnable() : CMainFrame, KoFilterModel
  • ToggleHideMissing() : KoFilterModel
  • ToggleHideUnknown() : KoFilterModel
  • ToggleIgnore() : KoIgnoreModel
  • ToggleMissing() : KoFilterModel
  • ToggleModified() : KoFilterModel
  • ToggleRecursion() : KoRecursionModel
  • ToggleRemoved() : KoFilterModel
  • ToggleTrackButtonMode() : CCJMenuBar
  • ToggleUnknown() : KoFilterModel
  • tokens : irciiAttrCvt, mircAttrCvt
  • tooltip : awidget, UTB_DROPDOWN, UTB_BUTTON
  • tooManyWarnings : ReportWarning
  • top : URECT
  • TopLeft() : URect
  • TotalNumFiles() : MultiFiles
  • totB : CWinLogData
  • totpage : DYN_LIST
  • TouchTimeStamp() : CPersistent
  • TPseudoAppBehavior() : TPseudoAppBehavior
  • TPseudoCustomView() : TPseudoCustomView
  • TPseudoDoubleNumberText() : TPseudoDoubleNumberText
  • TPseudoIconButton() : TPseudoIconButton
  • TPseudoIconCheckBox() : TPseudoIconCheckBox
  • TPseudoIconPopup() : TPseudoIconPopup
  • TPseudoRotateIconButton() : TPseudoRotateIconButton
  • TPseudoScrollBar() : TPseudoScrollBar
  • TPseudoTextListView() : TPseudoTextListView
  • TPseudoWinAdorner() : TPseudoWinAdorner
  • TPseudoWinBehavior() : TPseudoWinBehavior
  • TrackDockBar() : CCJDockContext
  • TrackPopup() : CCJMenuBar
  • TrackScrollBar() : TPseudoScrollBar
  • TranslateFrameMessage() : CCJMenuBar
  • TraverseGraph() : TGraph
  • TraverseNode() : TGraphSelNonSig, TGraphDelCmd, TGraphCmdStatus, TGraphRectSelect, TGraph, TGraphCurSelector
  • trim() : UStr
  • TRtagHandler() : TRtagHandler< tagType >
  • True() : PyContainer
  • TTagHandler() : TTagHandler< tagType >
  • TViewFill() : TViewFill
  • TypeDesc() : AddUnicodeCvsArgs, AddBinCvsArgs, AddCvsArgs, ControlCvsArgs

- u -

  • UBrush() : UBrush
  • UCmdTarget() : UCmdTarget
  • UCmdUI() : UCmdUI
  • UCOLOR() : UCOLOR
  • UCvsApp() : UCvsApp
  • UCvsConsole() : UCvsConsole
  • UCvsFiles() : UCvsFiles
  • UCvsFolders() : UCvsFolders
  • UCvsFrame() : UCvsFrame
  • UCvsGraph() : UCvsGraph
  • UCvsMenubar() : UCvsMenubar
  • UCvsStatusbar() : UCvsStatusbar
  • UCvsToolbar() : UCvsToolbar
  • UDC() : UDC
  • UDispatchInfo : UCmdTarget
  • UDispatchMessage() : UWidget, UToolbar, UCmdTarget
  • UEditMessage() : UEditMessage
  • uiToolTipId : tagTCB_ITEM
  • UMacAppMenu() : UMacAppMenu
  • UMenu() : UMenu
  • underCnt : CTCP2Parse
  • underLast : CTCP2Parse
  • underline : UCvsConsole, ansiAttrCvt
  • UnionRect() : URect
  • Unixfy() : CTcl_Interp
  • UnixLF() : CvsPrefs
  • UnRef() : PyAutoObject< T >, EntnodeData, EntnodePath, aref
  • UnRegister() : CPersistent
  • UnselectAll() : CWinLogData
  • UnSetBitmapBackground() : CCJMenu
  • UnSetDisableOldStyle() : CCJMenu
  • UObject() : UObject
  • Update() : CWinLogData
  • UpdateAllDocsView() : CWincvsApp
  • UpdateCaption() : CCJCaption
  • UpdateCaptionBack() : CCJCaption
  • UpdateCaptionText() : CCJCaption
  • UpdateCaseSensitiveNames() : CvsPrefs
  • UpdateCvsRoot() : CCvsRootDlg
  • UpdateData() : CMultilineEntryDlg
  • UpdateFont() : CCJTabCtrl, CCJOutlookBar, CCJMenuBar, CCJMaskEdit, CCJFlatButton, CCJColorPopup, CCJCaption, CCJBrowseButton
  • UpdateInfo() : CMultilineEntryDlg
  • UpdateKeywords() : CCvsRootDlg
  • UpdateLastCheckinTime() : CvsPrefs
  • UpdateMenu() : CCJMenu
  • UpdateMergePoints() : CWinLogData
  • UpdatePathInfo() : CCvsStatusBar
  • UpdatePreviewInfo() : CCommit_MAIN
  • UpdateReactionSpeedInfo() : CFilterMaskOptDlg
  • UpdateScrollbars() : CCJHexEdit
  • UpdateSelect() : CSelectionDetailsDlg
  • UpdateSelf() : CWinLogBranchData, CWinLogTagData, CWinLogRevData, CWinLogHeaderData, CWinLogData, CWinLogBranchData, CWinLogTagData, CWinLogRevData, CWinLogHeaderData, CWinLogData
  • UpdateThreeWayConflicts() : CvsPrefs
  • UPen() : UPen
  • UPoint() : UPoint
  • UPPMenu() : UPPMenu
  • UPromptMessage() : UPromptMessage
  • UPseudoFakePane() : UPseudoFakePane
  • UPseudoPageHider() : UPseudoPageHider
  • UPseudoPlaceHolder() : UPseudoPlaceHolder
  • UPseudoRotButton() : UPseudoRotButton
  • UPStr() : UPStr
  • URect() : URect
  • urlCnt : CTCP2Parse
  • urlLast : CTCP2Parse
  • URuntimeClass() : URuntimeClass
  • UseAltCvs() : CvsPrefs
  • useDefault : MACBINMAP
  • UseKeyChain() : CvsPrefs
  • USemaphore() : USemaphore
  • UseProxy() : CvsPrefs
  • userFlags : ReportConflict
  • USize() : USize
  • USmartCombo() : USmartCombo
  • UStr() : UStr
  • UTF_8 : CTCP2Parse
  • UTimer() : UTimer
  • UToolbar() : UToolbar
  • UWaitCursor() : UWaitCursor
  • UWidget() : UWidget
  • UWinPseudoWindowProc : UWidget

- v -

  • val : option
  • var : awidget
  • varcode : UTB_BUTTON
  • verb() : ansiAttrCvt::AnsiSeq
  • view : CViewInfo
  • ViewChangedFrame() : TPseudoWinAdorner
  • Viewer() : CvsPrefs
  • ViewPath : Wincvs::IWincvs
  • Void() : PyContainer

- w -

  • warnings : ImportReport
  • wHeight : CToolBarData
  • WhichCvs() : CvsPrefs
  • WhichVersion() : CvsPrefs
  • White : CTCP2Parse
  • wid : TbEntryButton
  • WidgetIsActive() : UWidget
  • width : WININFO
  • Width() : URect
  • widthbtn : UTB_INIT
  • Win32wstring() : Win32wstring
  • WindowProc() : CHistComboBoxEx, CSubclassWnd, CCJToolBarBase, CCJReBar, CCJMenuBarFrameHook, CPseudoDlg
  • WinHelp() : CMainFrame
  • winid : UTB_INIT
  • WININFO() : WININFO
  • wItemCount : CToolBarData
  • WM_FILECHANGE : KoWatcher
  • WordWrapLogMsg() : CvsPrefs
  • WrapToolBar() : CCJToolBar
  • WriteFields() : TPseudoDoubleNumberText, TPseudoIconCheckBox, TPseudoRotateIconButton, TPseudoIconButton, TPseudoIconPopup, TBuggyPopup
  • WriteString() : CCJMemFile
  • wVersion : CToolBarData
  • wWidth : CToolBarData

- x -

  • x : UPOINT
  • xLeftMargin : CGfxOutBarCtrl
  • xoffset : CCJMenuData
  • xSmallIconLabelOffset : CGfxOutBarCtrl

- y -

  • y : UPOINT
  • Yellow : CTCP2Parse
  • yLargeIconLabelOffset : CGfxOutBarCtrl
  • yLargeIconSpacing : CGfxOutBarCtrl
  • ySmallIconSpacing : CGfxOutBarCtrl
  • yTopMargin : CGfxOutBarCtrl

- z -

  • Z9Option() : CvsPrefs
  • ZLevel() : CvsPrefs

- ~ -

  • ~AnsiSeq() : ansiAttrCvt::AnsiSeq
  • ~aref() : aref
  • ~awidget() : awidget
  • ~CAllTargets() : CAllTargets
  • ~CAnnotate_MAIN() : CAnnotate_MAIN
  • ~CBarConsole() : CBarConsole
  • ~CBarFolder() : CGfxOutBarCtrl::CBarFolder
  • ~CBarItem() : CGfxOutBarCtrl::CBarItem
  • ~CBrowseFileView() : CBrowseFileView
  • ~CBrowserBar() : CBrowserBar
  • ~CCheckout_MAIN() : CCheckout_MAIN
  • ~CCJBrowseButton() : CCJBrowseButton
  • ~CCJBrowseEdit() : CCJBrowseEdit
  • ~CCJCaption() : CCJCaption
  • ~CCJCaptionPopupWnd() : CCJCaptionPopupWnd
  • ~CCJColorPicker() : CCJColorPicker
  • ~CCJColorPopup() : CCJColorPopup
  • ~CCJComboBoxEx() : CCJComboBoxEx
  • ~CCJControlBar() : CCJControlBar
  • ~CCJDateTimeCtrl() : CCJDateTimeCtrl
  • ~CCJDockBar() : CCJDockBar
  • ~CCJDockContext() : CCJDockContext
  • ~CCJExplorerBar() : CCJExplorerBar
  • ~CCJFlatButton() : CCJFlatButton
  • ~CCJFlatComboBox() : CCJFlatComboBox
  • ~CCJFlatHeaderCtrl() : CCJFlatHeaderCtrl
  • ~CCJFlatSplitterWnd() : CCJFlatSplitterWnd
  • ~CCJFlatTabCtrl() : CCJFlatTabCtrl
  • ~CCJFontCombo() : CCJFontCombo
  • ~CCJFrameWnd() : CCJFrameWnd
  • ~CCJHexEdit() : CCJHexEdit
  • ~CCJHtmlView() : CCJHtmlView
  • ~CCJHyperLink() : CCJHyperLink
  • ~CCJListBox() : CCJListBox
  • ~CCJListCtrl() : CCJListCtrl
  • ~CCJListView() : CCJListView
  • ~CCJLogoPane() : CCJLogoPane
  • ~CCJMaskEdit() : CCJMaskEdit
  • ~CCJMDIChildWnd() : CCJMDIChildWnd
  • ~CCJMDIFrameWnd() : CCJMDIFrameWnd
  • ~CCJMemFile() : CCJMemFile
  • ~CCJMenu() : CCJMenu
  • ~CCJMenuBar() : CCJMenuBar
  • ~CCJMenuBarFrameHook() : CCJMenuBarFrameHook
  • ~CCJMenuData() : CCJMenuData
  • ~CCJMetaFileButton() : CCJMetaFileButton
  • ~CCJMiniDockFrameWnd() : CCJMiniDockFrameWnd
  • ~CCJMonthCalCtrl() : CCJMonthCalCtrl
  • ~CCJOutlookBar() : CCJOutlookBar
  • ~CCJPagerCtrl() : CCJPagerCtrl
  • ~CCJSizeDockBar() : CCJSizeDockBar
  • ~CCJSortClass() : CCJSortClass
  • ~CCJStatusBar() : CCJStatusBar
  • ~CCJStatusBarPane() : CCJStatusBarPane
  • ~CCJStatusBarPaneControlInfo() : CCJStatusBarPaneControlInfo
  • ~CCJTabCtrl() : CCJTabCtrl
  • ~CCJTabCtrlBar() : CCJTabCtrlBar
  • ~CCJTabView() : CCJTabView
  • ~CCJToolBar() : CCJToolBar
  • ~CCJToolBarBase() : CCJToolBarBase
  • ~CCJToolBarCtrl() : CCJToolBarCtrl
  • ~CCJTreeCtrl() : CCJTreeCtrl
  • ~CCJWindowPlacement() : CCJWindowPlacement
  • ~CCmdLine_MAIN() : CCmdLine_MAIN
  • ~CColorConsole() : CColorConsole
  • ~CColorMenu() : CColorMenu
  • ~CColorStatic() : CColorStatic
  • ~CCommit_MAIN() : CCommit_MAIN
  • ~CCommit_OPTIONS() : CCommit_OPTIONS
  • ~CCustInvertTable() : CCustInvertTable
  • ~CCvsRootConsole() : CCvsRootConsole
  • ~CCvsSandboxInfo() : CCvsSandboxInfo
  • ~CCvsStatusBar() : CCvsStatusBar
  • ~CCvsStreamConsole() : CCvsStreamConsole
  • ~CDiff_MAIN() : CDiff_MAIN
  • ~CDynToolBar() : CDynToolBar
  • ~CExploreBar() : CExploreBar
  • ~CFileAction_MAIN() : CFileAction_MAIN
  • ~CFillPyEntries() : CFillPyEntries
  • ~CFillTclEntries() : CFillTclEntries
  • ~CFindSettings() : CFindSettings
  • ~CGetPrefs_CVS() : CGetPrefs_CVS
  • ~CGetPrefs_CVSCMD_DIALOGS() : CGetPrefs_CVSCMD_DIALOGS
  • ~CGetPrefs_GLOBALS() : CGetPrefs_GLOBALS
  • ~CGetPrefs_WINCVS() : CGetPrefs_WINCVS
  • ~CGfxGroupEdit() : CGfxGroupEdit
  • ~CGfxOutBarCtrl() : CGfxOutBarCtrl
  • ~CGfxSplitterWnd() : CGfxSplitterWnd
  • ~CGraphDoc() : CGraphDoc
  • ~CGraphFrame() : CGraphFrame
  • ~CGraphView() : CGraphView
  • ~CHHelpPropertyPage() : CHHelpPropertyPage
  • ~CHHelpPropertySheet() : CHHelpPropertySheet
  • ~CHHelpSupport() : CHHelpSupport
  • ~CHistComboBoxEx() : CHistComboBoxEx
  • ~CImport_MAIN() : CImport_MAIN
  • ~CImport_OPTIONS() : CImport_OPTIONS
  • ~CInfoParserConsole() : CInfoParserConsole
  • ~CItemListConsole() : CItemListConsole
  • ~CKeyString() : CKeyString
  • ~CKeywordComboBox() : CKeywordComboBox
  • ~CListParserConsole() : CListParserConsole
  • ~CLogFilters() : CLogFilters
  • ~CLogFrame() : CLogFrame
  • ~CLogin_MAIN() : CLogin_MAIN
  • ~CLogMain() : CLogMain
  • ~CLogoutThread() : CLogoutThread
  • ~CMacBinItem() : CMacBinItem
  • ~CMacBinTable() : CMacBinTable
  • ~CMainFrame() : CMainFrame
  • ~CMKeyString() : CMKeyString
  • ~CMMenuString() : CMMenuString
  • ~CModuleParserConsole() : CModuleParserConsole
  • ~CMPString() : CMPString
  • ~CMString() : CMString
  • ~CMultilineEntryDlg() : CMultilineEntryDlg
  • ~COptionalPropertySheet() : COptionalPropertySheet
  • ~CPathBuffer() : CPathBuffer
  • ~CPersistent() : CPersistent
  • ~CPersistentBool() : CPersistentBool
  • ~CPersistentInt() : CPersistentInt
  • ~CPersistentT() : CPersistentT< T >
  • ~CProgress() : CProgress
  • ~CProtocolParserConsole() : CProtocolParserConsole
  • ~CPseudoButton() : CPseudoButton
  • ~CPseudoDlg() : CPseudoDlg
  • ~CPseudoDraw() : CPseudoDraw
  • ~CPseudoItem() : CPseudoItem
  • ~CPseudoList() : CPseudoList
  • ~CPseudoRotButton() : CPseudoRotButton
  • ~CPseudoToggle() : CPseudoToggle
  • ~CPyCvsConsole() : CPyCvsConsole
  • ~CPython_Interp() : CPython_Interp
  • ~CPyThreadState() : CPyThreadState
  • ~CRecursionLock() : CRecursionLock
  • ~CRelease_MAIN() : CRelease_MAIN
  • ~CRtag_MAIN() : CRtag_MAIN
  • ~CRtag_OPTIONS() : CRtag_OPTIONS
  • ~CSelectionChangeNotifier() : CSelectionChangeNotifier
  • ~CSmartComboBox() : CSmartComboBox
  • ~CSortHeaderCtrl() : CSortHeaderCtrl
  • ~CSortList() : CSortList< T >
  • ~CSplashWnd() : CSplashWnd
  • ~CStaticAllocT() : CStaticAllocT< T >
  • ~CStatus_MAIN() : CStatus_MAIN
  • ~CSubclassWnd() : CSubclassWnd
  • ~CSubclassWndMap() : CSubclassWndMap
  • ~CTag_MAIN() : CTag_MAIN
  • ~CTagParserConsole() : CTagParserConsole
  • ~CTcl_Interp() : CTcl_Interp
  • ~CTCLBrowserEnt() : CTCLBrowserEnt
  • ~CTCLCvsConsole() : CTCLCvsConsole
  • ~CTempToggleBool() : CTempToggleBool
  • ~CTipDlg() : CTipDlg
  • ~CTmpFiles() : CTmpFiles
  • ~CTurnOffDispatching() : CTurnOffDispatching
  • ~CUpdateMain() : CUpdateMain
  • ~CUpdateMerge() : CUpdateMerge
  • ~CUpdateOptions() : CUpdateOptions
  • ~CvsAlert() : CvsAlert
  • ~CvsArgs() : CvsArgs
  • ~CvsPrefs() : CvsPrefs
  • ~CWinCvsBrowser() : CWinCvsBrowser
  • ~CWincvsDoc() : CWincvsDoc
  • ~CWincvsView() : CWincvsView
  • ~CWinLogBranchData() : CWinLogBranchData
  • ~CWinLogData() : CWinLogData
  • ~CWinLogHeaderData() : CWinLogHeaderData
  • ~CWinLogRevData() : CWinLogRevData
  • ~CWinLogTagData() : CWinLogTagData
  • ~CWinPlacement() : CWinPlacement
  • ~CWndAutoCommand() : CWndAutoCommand
  • ~CWndRedrawMngr() : CWndRedrawMngr
  • ~ENTNODE() : ENTNODE
  • ~EntnodeData() : EntnodeData
  • ~EntnodeFile() : EntnodeFile
  • ~EntnodeFolder() : EntnodeFolder
  • ~EntnodePath() : EntnodePath
  • ~ImportReport() : ImportReport
  • ~KiSelectionHandler() : KiSelectionHandler
  • ~KoFilterModel() : KoFilterModel
  • ~KoIgnoreModel() : KoIgnoreModel
  • ~KoRecursionModel() : KoRecursionModel
  • ~KoWatcher() : KoWatcher
  • ~LMainPseudoAttachment() : LMainPseudoAttachment
  • ~LPseudoDrawAttachment() : LPseudoDrawAttachment
  • ~LPseudoWinAttachment() : LPseudoWinAttachment
  • ~MacBinMaps() : MacBinMaps
  • ~PCPStr() : PCPStr
  • ~PCStr() : PCStr
  • ~PyAutoObject() : PyAutoObject< T >
  • ~PyCmdUI() : PyCmdUI
  • ~PyColorConsole() : PyColorConsole
  • ~PyContainer() : PyContainer
  • ~PyCvsEntry() : PyCvsEntry
  • ~PyMenuMgr() : PyMenuMgr
  • ~PyPersistent() : PyPersistent
  • ~PyRegistry() : PyRegistry
  • ~ReportConflict() : ReportConflict
  • ~ReportWarning() : ReportWarning
  • ~TbEntry() : TbEntry
  • ~TbEntryButton() : TbEntryButton
  • ~TbEntryChkButton() : TbEntryChkButton
  • ~TbEntryDropDown() : TbEntryDropDown
  • ~TbEntrySeparator() : TbEntrySeparator
  • ~TBrowserFill() : TBrowserFill
  • ~TBrowserFillDummy() : TBrowserFillDummy
  • ~TBuggyPopup() : TBuggyPopup
  • ~TKeyString() : TKeyString< delimiter >
  • ~TMPersistent() : TMPersistent< T >
  • ~TMString() : TMString< T >
  • ~TPseudoAppBehavior() : TPseudoAppBehavior
  • ~TPseudoCustomView() : TPseudoCustomView
  • ~TPseudoDoubleNumberText() : TPseudoDoubleNumberText
  • ~TPseudoIconButton() : TPseudoIconButton
  • ~TPseudoIconCheckBox() : TPseudoIconCheckBox
  • ~TPseudoIconPopup() : TPseudoIconPopup
  • ~TPseudoRotateIconButton() : TPseudoRotateIconButton
  • ~TPseudoScrollBar() : TPseudoScrollBar
  • ~TPseudoTextListView() : TPseudoTextListView
  • ~TPseudoWinAdorner() : TPseudoWinAdorner
  • ~TPseudoWinBehavior() : TPseudoWinBehavior
  • ~TViewFill() : TViewFill
  • ~UBrush() : UBrush
  • ~UCmdTarget() : UCmdTarget
  • ~UCmdUI() : UCmdUI
  • ~UCvsApp() : UCvsApp
  • ~UCvsConsole() : UCvsConsole
  • ~UCvsFiles() : UCvsFiles
  • ~UCvsFolders() : UCvsFolders
  • ~UCvsFrame() : UCvsFrame
  • ~UCvsGraph() : UCvsGraph
  • ~UCvsMenubar() : UCvsMenubar
  • ~UCvsStatusbar() : UCvsStatusbar
  • ~UCvsToolbar() : UCvsToolbar
  • ~UDC() : UDC
  • ~UEditMessage() : UEditMessage
  • ~UMacAppMenu() : UMacAppMenu
  • ~UMenu() : UMenu
  • ~UObject() : UObject
  • ~UPen() : UPen
  • ~UPPMenu() : UPPMenu
  • ~UPromptMessage() : UPromptMessage
  • ~UPseudoFakePane() : UPseudoFakePane
  • ~UPseudoPageHider() : UPseudoPageHider
  • ~UPseudoPlaceHolder() : UPseudoPlaceHolder
  • ~UPseudoRotButton() : UPseudoRotButton
  • ~UPStr() : UPStr
  • ~URuntimeClass() : URuntimeClass
  • ~USemaphore() : USemaphore
  • ~USmartCombo() : USmartCombo
  • ~UStr() : UStr
  • ~UToolbar() : UToolbar
  • ~UWaitCursor() : UWaitCursor
  • ~UWidget() : UWidget
  • ~WININFO() : WININFO
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Namespace Index

WinCvs Source Namespace List

Here is a list of all namespaces with brief descriptions:
std
Wincvs
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: std Namespace Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Wincvs Namespace Reference

Classes

interface | Wincvs::IWincvs
class | Wincvs::Document

Functions

importlib ("stdole32.tlb")

Function Documentation

importlib ( "stdole32.tlb" )

Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: File Members

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
_ | a | b | c | d | e | f | g | h | i | k | l | m | n | o | p | q | r | s | t | u | v | w

Here is a list of all file members with links to the files they belong to:

- _ -

  • __cvs_initialize() : dll_glue.c
  • __cvs_terminate() : dll_glue.c
  • __FNM_FLAGS : fnmatch.h
  • __glue_consoleerr : dll_glue.c
  • __glue_consolein : dll_glue.c
  • __glue_consoleout : dll_glue.c
  • __glue_eventdispatch : dll_glue.c
  • __glue_exit_code : dll_glue.c
  • __glue_getenv : dll_glue.c
  • __GNU_LIBRARY__ : getopt.h
  • __initialize() : dll_glue.c
  • __no_msl_lf_convert : dll_glue.c
  • __PROTO : getline.h
  • __ssize_t : getline.h
  • __STDC__ : TclGlue.cpp, getopt.h, fnmatch.h
  • __terminate() : dll_glue.c
  • _AfxRelease() : CJHtmlView.cpp
  • _ANSI_ARGS_() : TclGlue.cpp
  • _CarbonCompatCallLibrary() : TclGlue.mac.h
  • _CJX_COMMENT : CJLibrary.h
  • _CJX_EXT_CLASS : CJLibrary.h, StdAfx.h
  • _CJX_MESSAGE : CJLibrary.h
  • _CjxChildWindowFromPoint() : CJReBar.cpp
  • _CjxGetDlgCtrlID : CJReBar.cpp
  • _CJXLIB_INLINE : CJLibrary.h, StdAfx.h
  • _CLR_TO_RGBQUAD : CJToolBar.cpp
  • _ComCtlVersion : CJToolBar.h, CJToolBar.cpp
  • _COMMON_PY_DECL_CLASS : PythonMacros.h
  • _Compare() : BrowseViewColumn.h, BrowseViewColumn.cpp
  • _CompatCallLibrary() : dll_loader.h, dll_loader.c
  • _countof : BrowseViewColumn.cpp, uevent.cpp
  • _delete : CJLibrary.h, StdAfx.h
  • _destroyIcon : StdAfx.h
  • _DIFF_CPP_ : DiffDlg.cpp
  • _dosmaperr() : Stat.cpp
  • _dropDownWidth : CJToolBar.cpp
  • _FNMATCH_H : fnmatch.h
  • _GetComCtlVersion() : CJToolBar.h, CJToolBar.cpp
  • _GetDropDownWidth() : CJToolBar.cpp
  • _getline_h_ : getline.h
  • _GetMenuEntryRecurs() : wincvs_winutil.cpp
  • _GETOPT_H : getopt.h
  • _getopt_initialize() : getopt.c
  • _getopt_internal() : getopt.h, getopt.c
  • _glue_buf : dll_glue.c
  • _gnColumnWidth : ImportFilterDlg.cpp
  • _gszColumnLabel : ImportFilterDlg.cpp
  • _i18n : cvsgui_i18n.h
  • _LIBC : getopt.h
  • _loadPersistentSettings() : Persistent.cpp
  • _LoadSysColorBitmap() : CJToolBar.h, CJToolBar.cpp
  • _Py_NoneStruct_glue : PythonGlue.impl.h
  • _Py_TrueStruct_glue : PythonGlue.impl.h
  • _Py_ZeroStruct_glue : PythonGlue.impl.h
  • _PyObject_New : PythonGlue.impl.h
  • _PyObject_New_glue : PythonGlue.impl.h
  • _RGB_TO_RGBQUAD : CJToolBar.cpp
  • _statcore() : Stat.cpp
  • _stderr_style : PythonGlue.cpp
  • _stdout_style : PythonGlue.cpp
  • _sysColorMap : CJToolBar.cpp
  • _TCL_CALLBACK : TclGlue.cpp
  • _tcl_cfm_macho() : TclGlue.mac.h
  • _trace_style : PythonGlue.cpp
  • _VC_VERSION_5 : CJLibrary.h, StdAfx.h

- a -

  • AboutDialog() : AboutDlg.h, AboutDlg.cpp
  • addAccel() : umenu.cpp
  • AdjustRectangle() : CJDockContext.cpp
  • AFX_ADMINOPTIONDLG_H__C9A89564_F0A4_4294_8C6C_18469D18BCB3__INCLUDED_ : AdminOptionDlg.h
  • AFX_ANNOTATEDLG_H__864729EE_838B_473D_8723_E1269829F781__INCLUDED_ : AnnotateDlg.h
  • AFX_ASKYESNO_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_ : AskYesNo.h
  • AFX_BROWSEFILEVIEW_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : BrowseFileView.h
  • AFX_BROWSERBAR_H__64721953_F9A8_11D2_BDEC_000000000000__INCLUDED_ : BrowserBar.h
  • AFX_CHECKOUTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : CheckoutDlg.h
  • AFX_CHILDFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_ : LogFrm.h
  • AFX_COLORSTATIC_H__4D2B055E_F042_428F_A662_09ABEA902DCE__INCLUDED_ : ColorStatic.h
  • AFX_COMMITDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : CommitDlg.h
  • AFX_CUSTOMIZEMENUS_H__28A6AE7E_C54B_47A5_A8F5_A127E2E9F3BF__INCLUDED_ : CustomizeMenus.h
  • AFX_CVSALERT_H__ACFE8C41_9836_11D1_AE50_00C0F0067852__INCLUDED_ : CvsAlert.h
  • AFX_CVSROOTDLG_H__E7B87F15_691C_407E_AFAE_910BE8E98A0A__INCLUDED_ : CvsRootDlg.h
  • AFX_CVSSANDBOXINFO_H__06D1CA4F_06C6_4F57_9787_C91C53E372D6__INCLUDED_ : CvsSandboxInfo.h
  • AFX_CVSSTATUSBAR_H__F549ACF2_ECFE_4933_A05D_5FC8248C3CD4__INCLUDED_ : CvsStatusBar.h
  • AFX_DIFFDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : DiffDlg.h
  • AFX_DLLGETVERSIONPROC : CJToolBar.cpp
  • AFX_EDITORMONDLG_H__5146BF16_567B_4017_A1FD_619A7BD07906__INCLUDED_ : EditorMonDlg.h
  • AFX_EXPLOREBAR_H__A132A164_1A90_11D3_B1A1_004095463819__INCLUDED_ : ExploreBar.h
  • AFX_FILEACTIONDLG_H__9C280EEF_16E5_4208_8A31_24AE6290E9D7__INCLUDED_ : FileActionDlg.h
  • AFX_FILETRAVERSAL_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : FileTraversal.h
  • AFX_FILTERMASKOPTDLG_H__8560F3E7_6DBF_4EB6_B33E_E438B3020000__INCLUDED_ : FilterMaskOptDlg.h
  • AFX_FILTERSELECTIONDLG_H__933ECF3F_C417_4C4E_AD6F_39769CCC4E6F__INCLUDED_ : FilterSelectionDlg.h
  • AFX_GETPASSWORD_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_ : GetPassword.h
  • AFX_GETPREFS_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : GetPrefs.h
  • AFX_GRAPHDOC_H__09F456C1_0018_11D2_BCAA_000000000000__INCLUDED_ : GraphDoc.h
  • AFX_GRAPHFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_ : GraphFrm.h
  • AFX_GRAPHOPTDLG_H__E05908EC_20A6_43FE_93C7_0964E6ABB6B1__INCLUDED_ : GraphOptDlg.h
  • AFX_GRAPHVIEW_H__7A07C311_03F9_11D2_BCB2_000000000000__INCLUDED_ : GraphView.h
  • AFX_HHELPSUPPORT_H__E97D92A1_F935_41B3_9748_8000F0A1A76C__INCLUDED_ : HHelpSupport.h
  • AFX_HISTCOMBOBOXEX_H__E330E7B9_8C79_44CB_8F07_01D395975365__INCLUDED_ : HistComboBoxEx.h
  • AFX_IDW_SIZEBAR_BOTTOM : CJControlBar.h
  • AFX_IDW_SIZEBAR_LEFT : CJControlBar.h
  • AFX_IDW_SIZEBAR_RIGHT : CJControlBar.h
  • AFX_IDW_SIZEBAR_TOP : CJControlBar.h
  • AFX_IMPORTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : ImportDlg.h
  • AFX_IMPORTFILDERDLG_H__CFB7AA41_BDDB_11D1_B965_0020AF51D9DA__INCLUDED_ : ImportFilterDlg.h
  • AFX_IMPORTFILTER_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : ImportFilter.h
  • AFX_INITDLG_H__155D02C3_2323_11D3_B1A6_004095463819__INCLUDED_ : InitDlg.h
  • AFX_ITEMLISTDLG_H__E6D16D27_1A84_4E8A_A926_3B76728E0F73__INCLUDED_ : ItemListDlg.h
  • AFX_KEYWORDCOMBOBOX_H__F5D656E1_FD93_49A0_A27B_231957D4AAC5__INCLUDED_ : KeywordComboBox.h
  • AFX_LAUNCHHANDLERS_H__26387DB1_9D2A_4909_A7A7_5ACAFA46A57B__INCLUDED_ : LaunchHandlers.h
  • AFX_LINECMD_H__5946A8C5_8517_11D1_8949_444553540000__INCLUDED_ : LineCmd.h
  • AFX_LOGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : LogDlg.h
  • AFX_LOGIN_MAIN_H__CF191044_0332_477E_ABD2_13E56D643C14__INCLUDED_ : LoginDlg.h
  • AFX_LOGPARSE_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : LogParse.h
  • AFX_MAINFRM_H__D2D77DCC_8299_11D1_8949_444553540000__INCLUDED_ : MainFrm.h
  • AFX_MFFILEDIALOG_H__66684391_7914_4A0D_9848_022A6CA7573C__INCLUDED_ : MfFileDialog.h
  • AFX_MMENUSTRING_H__6C55ACE9_20FB_42DE_B678_7EA6A3AF99B3__INCLUDED_ : MMenuString.h
  • AFX_MULTILINEENTRYDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : MultilineEntryDlg.h
  • AFX_NOPYTHON_H__F675DE42_0FA7_4785_8946_E8FC861BBA57__INCLUDED_ : NoPython.h
  • AFX_OPTIONALPROPERTYSHEET_H__F82DC8BB_73CD_4AEA_8635_1A0932F24C7D__INCLUDED_ : OptionalPropertySheet.h
  • AFX_PROGRESSDLG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_ : ProgressDlg.h
  • AFX_PSEUDODLG_H__9EDC5FE5_21FD_4ACE_9AEB_7A521350A2EE__INCLUDED_ : PseudoDlg.h
  • AFX_PSEUDOLIST_H__49AF86B3_E6AB_4885_843C_1CE5AC8C4980__INCLUDED_ : pseudolist.h
  • AFX_RELEASEDLG_H__12B5FA97_703E_4616_B361_F2917D45E54A__INCLUDED_ : ReleaseDlg.h
  • AFX_RTAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : RtagDlg.h
  • AFX_SAVESETTINGSDLG_H__73E4731F_7A3E_46B2_835A_056922641479__INCLUDED_ : SaveSettingsDlg.h
  • AFX_SELECTIONDETAILSDLG_H__42708DEE_6E9B_41FD_BAE6_0224C8EE09D8__INCLUDED_ : SelectionDetailsDlg.h
  • AFX_SMARTCOMBOBOX_H__E3F8DAE6_C2EF_49CE_AE52_3AE54F5A629C__INCLUDED_ : SmartComboBox.h
  • AFX_STATICDRAW_H__8DCC3165_D42E_4FAA_BCCF_F4328685535E__INCLUDED_ : PseudoDraw.h
  • AFX_STATUSDLG_H__5EEE9989_6C76_4FD3_83FC_2D90DEA0CE21__INCLUDED_ : StatusDlg.h
  • AFX_STDAFX_H__D2D77DCA_8299_11D1_8949_444553540000__INCLUDED_ : StdAfx.h
  • AFX_STDAFX_H__EDF5958A_92F6_11D3_9365_00C0F00AE104__INCLUDED_ : StdAfx.h
  • AFX_STDAFX_H__F235A078_2921_11D3_8733_000000000000__INCLUDED_ : StdAfx.h
  • AFX_TAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : TagDlg.h
  • AFX_TEMPLATEDLG_H__FB71138C_D374_42EE_88E8_59890D6DEDE2__INCLUDED_ : TemplateDlg.h
  • AFX_UPDATEDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : UpdateDlg.h
  • AFX_WINCVS_H__D2D77DC7_8299_11D1_8949_444553540000__INCLUDED_ : wincvs.h
  • AFX_WINCVSBROWSER_H__144A4971_CAB4_11D1_BC80_000000000000__INCLUDED_ : WinCvsBrowser.h
  • AFX_WINCVSDOC_H__D2D77DCE_8299_11D1_8949_444553540000__INCLUDED_ : wincvsDoc.h
  • AFX_WINCVSVIEW_H__D2D77DD0_8299_11D1_8949_444553540000__INCLUDED_ : wincvsView.h
  • ALT_STROKE : umenu.cpp
  • ANSI_SGM_BC_BLK : CTCP2Parse.cpp
  • ANSI_SGM_BC_BLU : CTCP2Parse.cpp
  • ANSI_SGM_BC_CYN : CTCP2Parse.cpp
  • ANSI_SGM_BC_DEFAULT : CTCP2Parse.cpp
  • ANSI_SGM_BC_GRN : CTCP2Parse.cpp
  • ANSI_SGM_BC_MAG : CTCP2Parse.cpp
  • ANSI_SGM_BC_RED : CTCP2Parse.cpp
  • ANSI_SGM_BC_WHT : CTCP2Parse.cpp
  • ANSI_SGM_BC_YEL : CTCP2Parse.cpp
  • ANSI_SGM_FC_BLK : CTCP2Parse.cpp
  • ANSI_SGM_FC_BLU : CTCP2Parse.cpp
  • ANSI_SGM_FC_CYN : CTCP2Parse.cpp
  • ANSI_SGM_FC_DEFAULT : CTCP2Parse.cpp
  • ANSI_SGM_FC_GRN : CTCP2Parse.cpp
  • ANSI_SGM_FC_MAG : CTCP2Parse.cpp
  • ANSI_SGM_FC_RED : CTCP2Parse.cpp
  • ANSI_SGM_FC_WHT : CTCP2Parse.cpp
  • ANSI_SGM_FC_YEL : CTCP2Parse.cpp
  • ANSI_SGM_TA_BLINK : CTCP2Parse.cpp
  • ANSI_SGM_TA_BLINK_OFF : CTCP2Parse.cpp
  • ANSI_SGM_TA_BOLD : CTCP2Parse.cpp
  • ANSI_SGM_TA_CONSEAL : CTCP2Parse.cpp
  • ANSI_SGM_TA_FAINT : CTCP2Parse.cpp
  • ANSI_SGM_TA_ITALIC : CTCP2Parse.cpp
  • ANSI_SGM_TA_ITALIC_OFF : CTCP2Parse.cpp
  • ANSI_SGM_TA_NORMAL : CTCP2Parse.cpp
  • ANSI_SGM_TA_RESET : CTCP2Parse.cpp
  • ANSI_SGM_TA_REV : CTCP2Parse.cpp
  • ANSI_SGM_TA_REV_OFF : CTCP2Parse.cpp
  • ANSI_SGM_TA_ULINE : CTCP2Parse.cpp
  • ANSI_SGM_TA_ULINE_OFF : CTCP2Parse.cpp
  • AppendMenu : CJMenu.h
  • AppendODMenu : CJMenu.h
  • AppendODPopupMenu : CJMenu.h
  • AskCreatePersistentSettings() : Persistent.h, Persistent.cpp
  • ATTRIBUTES : ndir.c
  • AUTO_INITALIZE : dll_garbage.c
  • AUTOCOMPLETE_DEFFLAGS : wincvs_winutil.h

- b -

  • BFT_BITMAP : dib.h
  • BLOCK_UPDATE_UI : UCvsFrame.cpp
  • BM_ALLOC : dib.h
  • BM_FREE : dib.h
  • bNotWin4 : GfxSplitterWnd.cpp
  • BROWSE_TYPE : CJBrowseEdit.h
  • BrowseForFile() : GetPrefs.cpp
  • BrowserGetDirectory() : PromptFiles.h, PromptFiles.cpp
  • BrowserGetMultiFiles() : PromptFiles.h, PromptFiles.cpp
  • BrowserGetSaveasFile() : PromptFiles.h, PromptFiles.cpp
  • BT_DIRECTORY : CJBrowseEdit.h
  • BT_FILE : CJBrowseEdit.h
  • BT_POPUPMENU : CJBrowseEdit.h
  • BTN_IMG_INDEX : CJControlBar.h
  • buf : CvsArgs.cpp
  • BuildIgnoredList() : CvsIgnore.h, CvsIgnore.cpp
  • BUTTONTITLE_CANCEL : CvsAlert.h
  • BUTTONTITLE_CONTINUE : CvsAlert.h
  • BUTTONTITLE_DELETE : CvsAlert.h
  • BUTTONTITLE_NO : CvsAlert.h
  • BUTTONTITLE_OK : CvsAlert.h
  • BUTTONTITLE_YES : CvsAlert.h

- c -

  • calloc : dll_garbage.h
  • CarbonCompatCloseLibrary() : TclGlue.mac.h
  • CarbonCompatLoadLibrary() : TclGlue.mac.h
  • CBOLD : CTCP2Parse.cpp
  • CBrowseFileView : UCvsFiles.cpp
  • CCOLOR : CTCP2Parse.cpp
  • CCTCP2 : CTCP2Parse.cpp
  • CFString_to_UStr() : MacMisc.h
  • CG_IDP_FILE_CORRUPT : resource.h
  • CG_IDS_DIDYOUKNOW : resource.h
  • CG_IDS_FILE_ABSENT : resource.h
  • CG_IDS_TIPOFTHEDAY : resource.h
  • CG_IDS_TIPOFTHEDAYHELP : resource.h
  • CG_IDS_TIPOFTHEDAYMENU : resource.h
  • CheckLocationDriveType() : wincvs_winutil.h, wincvs_winutil.cpp
  • CheckSelectionHandler() : CvsCommands.cpp
  • CHILD_BORDER : CJControlBar.h
  • CHR_FILEDETAILVIEW_COLUMN_DATASEP : BrowseFileView.h
  • CHR_KEYWORD_QUOTE : CvsRootDlg.cpp
  • CHR_KEYWORD_TOKEN_SEPARATOR : CvsRootDlg.cpp
  • CHR_PROTOCOL_TOKEN_SEPARATOR : CvsRootDlg.cpp
  • CHR_ROOT_TOKEN_SEPARATOR : CvsRootDlg.cpp
  • CJLibraryDLL : CJLibrary.cpp
  • CleanupLogMsg() : ustr.h, ustr.cpp
  • CListViews : CJTabView.h
  • CloneStr() : CvsEntries.cpp
  • closedir() : ndir.h, ndir.c
  • clsid : wincvs.cpp
  • CM_ONPUSHPINBUTTON : CJCaptionPopupWnd.h
  • CM_ONPUSHPINCANCEL : CJCaptionPopupWnd.h
  • cmdABOUT : UCvsCommands.h
  • cmdADD : UCvsCommands.h
  • cmdADDB : UCvsCommands.h
  • cmdADMINMACROS : UCvsCommands.h
  • cmdARRANGE : UCvsCommands.h
  • cmdBROWSER_BAR : UCvsCommands.h
  • cmdCASCADE : UCvsCommands.h
  • cmdCHECKOUT : UCvsCommands.h
  • cmdCLEAR_ALL : UCvsCommands.h
  • cmdCMDLINE : UCvsCommands.h
  • cmdCOMMIT : UCvsCommands.h
  • cmdCONSOLE_BAR : UCvsCommands.h
  • cmdCOPY : UCvsCommands.h
  • cmdCOPYRIGHTS : UCvsCommands.h
  • cmdCREDITS : UCvsCommands.h
  • cmdCUT : UCvsCommands.h
  • cmdCVS : UCvsCommands.h
  • cmdCVSCLIENT : UCvsCommands.h
  • cmdDIFF : UCvsCommands.h
  • cmdEDIT : UCvsCommands.h
  • cmdEDITORS : UCvsCommands.h
  • cmdEDITSEL : UCvsCommands.h
  • cmdEDITSELDEF : UCvsCommands.h
  • cmdEXIT : UCvsCommands.h
  • cmdEXPLORE : UCvsCommands.h
  • cmdFILES_BAR : UCvsCommands.h
  • cmdFIND : UCvsCommands.h
  • cmdFINDER : UCvsCommands.h
  • cmdFLAT : UCvsCommands.h
  • cmdFONT : UCvsCommands.h
  • cmdGRAPH : UCvsCommands.h
  • cmdHIDE_UNKNOWN : UCvsCommands.h
  • cmdIGNORE : UCvsCommands.h
  • CMDIMenuList : CJMDIFrameWnd.h
  • cmdIMPORT : UCvsCommands.h
  • cmdINIT : UCvsCommands.h
  • cmdLOCKF : UCvsCommands.h
  • cmdLOG : UCvsCommands.h
  • cmdLOGIN : UCvsCommands.h
  • cmdLOGOUT : UCvsCommands.h
  • cmdMACROADMIN : UCvsCommands.h
  • cmdMACROADMINEND : UCvsCommands.h
  • cmdMACROS : UCvsCommands.h
  • cmdMULTI_BAR : UCvsCommands.h
  • cmdOPEN : UCvsCommands.h
  • cmdPASTE : UCvsCommands.h
  • cmdPREFERENCES : UCvsCommands.h
  • cmdPRINT : UCvsCommands.h
  • cmdPRINT_PREVIEW : UCvsCommands.h
  • cmdPRINT_SETUP : UCvsCommands.h
  • cmdQUERYUPDATE : UCvsCommands.h
  • cmdRELEASE : UCvsCommands.h
  • cmdRELOAD : UCvsCommands.h
  • cmdREPEAT : UCvsCommands.h
  • cmdRESEDIT : UCvsCommands.h
  • cmdRMV : UCvsCommands.h
  • cmdRTAGBRANCH : UCvsCommands.h
  • cmdRTAGCREATE : UCvsCommands.h
  • cmdRTAGDELETE : UCvsCommands.h
  • cmdSAVE : UCvsCommands.h
  • cmdSAVE_AS : UCvsCommands.h
  • cmdSAVESETTINGS : UCvsCommands.h
  • cmdSELECT_ALL : UCvsCommands.h
  • cmdSELMACRO : UCvsCommands.h
  • cmdSELMACROEND : UCvsCommands.h
  • cmdSEND_MAIL : UCvsCommands.h
  • cmdSHELL : UCvsCommands.h
  • cmdSTATUS : UCvsCommands.h
  • cmdSTATUS_BAR : UCvsCommands.h
  • cmdSTOPCVS : UCvsCommands.h
  • cmdTAGBRANCH : UCvsCommands.h
  • cmdTAGDELETE : UCvsCommands.h
  • cmdTAGNEW : UCvsCommands.h
  • cmdTAGS_BAR : UCvsCommands.h
  • cmdTILE_HORZ : UCvsCommands.h
  • cmdTOOLBAR : UCvsCommands.h
  • cmdTRASH : UCvsCommands.h
  • cmdUNDO : UCvsCommands.h
  • cmdUNEDIT : UCvsCommands.h
  • cmdUNLOCKF : UCvsCommands.h
  • cmdUPDATE : UCvsCommands.h
  • cmdUPFOLDER : UCvsCommands.h
  • cmdUSE_PYSHELL : UCvsCommands.h
  • cmdUSE_TCLSHELL : UCvsCommands.h
  • cmdVIEW_ADDED : UCvsCommands.h
  • cmdVIEW_CHANGED : UCvsCommands.h
  • cmdVIEW_CONFLICT : UCvsCommands.h
  • cmdVIEW_FILEMASK : UCvsCommands.h
  • cmdVIEW_MISSING : UCvsCommands.h
  • cmdVIEW_MODIFIED : UCvsCommands.h
  • cmdVIEW_REMOVED : UCvsCommands.h
  • cmdVIEW_UNKNOWN : UCvsCommands.h
  • cmdWATCHERS : UCvsCommands.h
  • cmdWATCHOFF : UCvsCommands.h
  • cmdWATCHON : UCvsCommands.h
  • cmdWORKSPACE : UCvsCommands.h
  • COL_DESC : ImportFilterDlg.cpp
  • COL_KIND : ImportFilterDlg.cpp
  • COL_NUM : ImportFilterDlg.cpp
  • COL_STATE : ImportFilterDlg.cpp
  • COLOR_BLACK : CJControlBar.cpp
  • COLOR_WHITE : CJControlBar.cpp
  • columnsRecursive : BrowseViewColumn.cpp
  • columnsRegular : BrowseViewColumn.cpp
  • CompareTargetDate() : Stat.cpp
  • CompatBeginMoveToTrash() : MoveToTrash.h, MoveToTrash.cpp
  • CompatCallLibrary1 : dll_loader.h
  • CompatCallLibrary2 : dll_loader.h
  • CompatCallLibrary3 : dll_loader.h
  • CompatCloseLibrary() : dll_loader.h, dll_loader.c
  • CompatConnectID : dll_loader.h
  • CompatEndMoveToTrash() : MoveToTrash.h, MoveToTrash.cpp
  • CompatFuncArg : dll_loader.h
  • CompatGetAdminOptions() : AdminOptionDlg.h, AdminOptionDlg.cpp
  • CompatGetAnnotate() : AnnotateDlg.h, AnnotateDlg.cpp
  • CompatGetCheckout() : CheckoutDlg.h, CheckoutDlg.cpp
  • CompatGetCommand() : LineCmd.h, LineCmd.cpp
  • CompatGetCommit() : CommitDlg.h, CommitDlg.cpp
  • CompatGetCvsRoot() : CvsRootDlg.h, CvsRootDlg.cpp
  • CompatGetCvsTemplate() : TemplateDlg.h, TemplateDlg.cpp
  • CompatGetDiff() : DiffDlg.h, DiffDlg.cpp
  • CompatGetEditorMsg() : EditorMonDlg.h, EditorMonDlg.cpp
  • CompatGetFileAction() : FileActionDlg.h, FileActionDlg.cpp
  • CompatGetFilterMaskOptions() : FilterMaskOptDlg.h, FilterMaskOptDlg.cpp
  • CompatGetFilterSelection() : FilterSelectionDlg.h, FilterSelectionDlg.cpp
  • CompatGetGraphOptions() : GraphOptDlg.h, GraphOptDlg.cpp
  • CompatGetImport() : ImportDlg.h, ImportDlg.cpp
  • CompatGetInit() : InitDlg.h, InitDlg.cpp
  • CompatGetLog() : LogDlg.h, LogDlg.cpp
  • CompatGetLogin() : LoginDlg.h, LoginDlg.cpp
  • CompatGetModuleListItem() : ItemListDlg.h, ItemListDlg.cpp
  • CompatGetPassword() : GetPassword.h, GetPassword.cpp
  • CompatGetPrefs() : GetPrefs.h, GetPrefs.cpp
  • CompatGetRelease() : ReleaseDlg.h, ReleaseDlg.cpp
  • CompatGetRtag() : RtagDlg.h, RtagDlg.cpp
  • CompatGetSelectionDetails() : SelectionDetailsDlg.h, SelectionDetailsDlg.cpp
  • CompatGetStatus() : StatusDlg.h, StatusDlg.cpp
  • CompatGetTag() : TagDlg.h, TagDlg.cpp
  • CompatGetTagListItem() : ItemListDlg.h, ItemListDlg.cpp
  • CompatGetUpdate() : UpdateDlg.h, UpdateDlg.cpp
  • CompatImportFilter() : ImportFilterDlg.h, ImportFilterDlg.cpp
  • CompatLoadLibrary() : dll_loader.h, dll_loader.c
  • CompatMakeSurePathExists() : MakeSurePathExists.h, MakeSurePathExists.cpp
  • CompatMoveToTrash() : MoveToTrash.h, MoveToTrash.cpp
  • computeLR : SortList.h
  • computeNone : SortList.h
  • computeSort : SortList.h
  • conflictColumn : BrowseViewColumn.cpp
  • ConvertString() : MacMisc.h
  • copy_list_types() : ImportFilter.h, ImportFilter.cpp
  • CopyRect() : udraw.h
  • CopyScreenToBitmap() : dib.h, dib.c
  • CP_MODE_BK : CJColorPicker.h
  • CP_MODE_TEXT : CJColorPicker.h
  • CPInfo : CJMenu.cpp
  • CPN_CLOSEUP : CJColorPopup.h
  • CPN_DROPDOWN : CJColorPopup.h
  • CPN_SELCHANGE : CJColorPopup.h
  • CPN_SELENDCANCEL : CJColorPopup.h
  • CPN_SELENDOK : CJColorPopup.h
  • CPStr : ustr.h
  • CreateBrowseToolbar() : UCvsToolbar.h, UCvsToolbar.cpp
  • CreateDIB() : dib.h, dib.c
  • CreateFilterToolbar() : UCvsToolbar.h, UCvsToolbar.cpp
  • CreateFolder() : MakeSurePathExists.h, MakeSurePathExists.cpp
  • CreateMainMenubar() : UCvsMenubar.h, UCvsMenubar.cpp
  • CreateMainToolbar() : UCvsToolbar.h, UCvsToolbar.cpp
  • CREV : CTCP2Parse.cpp
  • CSTOP : CTCP2Parse.cpp
  • CStr : ustr.h
  • CTabList : CJFlatTabCtrl.h
  • CTabViews : CJTabCtrlBar.h
  • CTCP2_TOGGLE : CTCP2Parse.cpp
  • CTRL_STROKE : umenu.cpp
  • CTRLALT_STROKE : umenu.cpp
  • CTV_ITEM : CJTabView.h
  • CUNDR : CTCP2Parse.cpp
  • CustGetByKey() : CustomizeMenus.h, CustomizeMenus.cpp
  • CustMenuCompare() : CustomizeMenus.cpp
  • CUSTOM_BOX_VALUE : CJColorPopup.cpp
  • CustomizeMenus() : CustomizeMenus.h, CustomizeMenus.cpp
  • CVS_CMD : CvsArgs.h
  • cvs_err() : AppConsole.h, AppConsole.cpp
  • cvs_errstr() : AppConsole.h, AppConsole.cpp
  • CVS_EXTERN_C : AppGlue.cpp
  • cvs_out() : AppConsole.h, AppConsole.cpp
  • cvs_outstr() : AppConsole.h, AppConsole.cpp
  • CvsCmdAdd() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdAnnotate() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdCancelChanges() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdCheckoutModule() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdCommandLine() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdCommit() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdDiff() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdEdit() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdEditors() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdFileAction() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdImportModule() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdInit() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLaunch() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLock() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLog() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLogin() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLogout() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdMacrosAdmin() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdMoveToTrash() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdRelease() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdRemove() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdRtag() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdStatus() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdTag() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdUnedit() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdUnlock() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdUpdate() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdWatchers() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdWatchOff() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdWatchOn() : CvsCommands.h, CvsCommands.cpp
  • cvsgui_GetCvsEntries() : PythonGlue.cpp
  • cvsgui_GetFileModTime() : PythonGlue.cpp
  • cvsgui_GetHistoryAsXML() : PythonGlue.cpp
  • cvsgui_GetMainMenuWidget() : PythonGlue.cpp
  • cvsgui_GetSelection() : PythonGlue.cpp
  • cvsgui_GetTopMacroAdminMenu() : PythonGlue.cpp
  • cvsgui_GetTopMacroSelectionMenu() : PythonGlue.cpp
  • cvsgui_LaunchBrowser() : PythonGlue.cpp
  • cvsgui_LaunchTclMacro() : PythonGlue.cpp
  • cvsgui_methods : PythonGlue.cpp
  • cvsgui_PromptEditMessage() : PythonGlue.cpp
  • cvsgui_PromptMessage() : PythonGlue.cpp
  • cvsgui_RunCvs() : PythonGlue.cpp
  • cvsgui_write() : PythonGlue.cpp
  • CvsLogOutput() : LogParse.h, LogParse.cpp
  • CvsLogParse() : LogParse.h, LogParse.cpp
  • CvsProcess : AppGlue.h
  • CvsProtocolList : CvsRootDlg.h
  • CX_BORDER : GfxSplitterWnd.cpp
  • CX_BORDER_GRIPPER : CJToolBarBase.cpp
  • CX_GRIPPER : CJToolBarBase.cpp
  • CX_OVERLAP : CJToolBar.cpp
  • CY_BORDER : GfxSplitterWnd.cpp
  • CY_BORDER_GRIPPER : CJToolBarBase.cpp
  • CY_GRIPPER : CJToolBarBase.cpp

- d -

  • DATA_TYPE : CJSortClass.h
  • dateColumn : BrowseViewColumn.cpp
  • DD_BMAP : PseudoButton.h
  • DD_END : PseudoButton.h
  • DD_PIXMAP : PseudoButton.h
  • DD_RGB : PseudoButton.h
  • DDBtoDIB() : dib.h, dib.c
  • DDD_NONE : umain.h
  • DDV_CheckCVSROOT() : wincvs.h, wincvs.cpp
  • DDV_CheckPathExists() : wincvs.h, wincvs.cpp
  • DDV_CJMinMaxDateTime() : CJDateTimeCtrl.h, CJDateTimeCtrl.cpp
  • DDV_CJMinMaxMonth() : CJDateTimeCtrl.h, CJDateTimeCtrl.cpp
  • DDV_MinChars() : wincvs.h, wincvs.cpp
  • DDV_NONE : umain.h
  • DDX_CJColorPicker() : CJColorPicker.h, CJColorPicker.cpp
  • DDX_CJDateTimeCtrl() : CJDateTimeCtrl.h, CJDateTimeCtrl.cpp
  • DDX_CJMonthCalCtrl() : CJDateTimeCtrl.h, CJDateTimeCtrl.cpp
  • DDX_ComboMString() : wincvs.h, wincvs.cpp
  • DDX_OleDateTime() : CJMaskEdit.h, CJMaskEdit.cpp
  • DEC_GLUE : TclGlue.cpp, PythonGlue.impl.h
  • DECLC : TclGlue.cpp
  • DEF_CVS_CMD : LineCmd.h
  • DEFAULT_ALERT_TITLE : CvsAlert.cpp
  • DEFAULT_BOX_VALUE : CJColorPopup.cpp
  • DEFAULT_FILTERCHANGETIMEOUT : SortHeaderCtrl.cpp
  • DEFAULT_MATCH_ENTRIES_CASE : CvsPrefs.cpp
  • DeferClientPos() : GfxSplitterWnd.cpp
  • DIB_HEADER_MARKER : dib.h
  • DibCopyPalette() : dib.h, dib.c
  • DibGetPaletteSize() : dib.h, dib.c
  • DibNumColors() : dib.h, dib.c
  • DIBToBitmap() : dib.h, dib.c
  • DiffOptionsItem : DiffDlg.cpp
  • DIR : ndir.h
  • DIRTY_MCP_SUPPORT : CvsPrefs.h
  • DisposeStr() : CvsEntries.cpp
  • dllglue_consoleerr() : dll_glue.h, dll_glue.c
  • dllglue_consolein() : dll_glue.h, dll_glue.c
  • dllglue_consolein_func : dll_process.h
  • dllglue_consoleout() : dll_glue.h, dll_glue.c
  • dllglue_consoleout_func : dll_process.h
  • dllglue_decode_file() : dll_glue.h, dll_glue.c
  • dllglue_dispatchevent() : dll_glue.h, dll_glue.c
  • dllglue_exit() : dll_glue.h, dll_glue.c
  • dllglue_flushconsole() : dll_glue.h, dll_glue.c
  • dllglue_getenv() : dll_glue.h, dll_glue.c
  • dllglue_getenv_func : dll_process.h
  • dllglue_main() : dll_glue.h, dll_glue.c
  • dllglue_main_func : dll_process.h
  • dllglue_setconsoleerr() : dll_glue.h, dll_glue.c
  • dllglue_setconsolein() : dll_glue.h, dll_glue.c
  • dllglue_setconsoleout() : dll_glue.h, dll_glue.c
  • dllglue_seteventdispatch() : dll_glue.h, dll_glue.c
  • dllglue_setgetenv() : dll_glue.h, dll_glue.c
  • dllglue_setglue_func : dll_process.h
  • DllMain() : CJLibrary.cpp
  • dos : Stat.cpp
  • DrawNode() : GraphView.cpp, UCvsGraph.cpp
  • DrawOctangle() : GraphView.cpp
  • DT_DATETIME : CJSortClass.h
  • DT_DEC : CJSortClass.h
  • DT_INT : CJSortClass.h
  • DT_STRING : CJSortClass.h
  • dwSizeBarMap : CJControlBar.h
  • DYN_LIST : dll_garbage.c

- e -

  • EditStreamCallBack() : wincvsDoc.cpp
  • EGCS_CONST : ustr.h
  • ENABLE_WINCVSDEBUG : WinCvsDebug.h
  • EnableEditAutoComplete() : wincvs_winutil.h, wincvs_winutil.cpp
  • encodingColumn : BrowseViewColumn.cpp
  • END_UPDATE_UI : UCvsFrame.cpp
  • ENT_FILE : CvsEntries.h
  • ENT_SUBDIR : CvsEntries.h
  • ent_type : CvsEntries.h
  • Entries_Open() : CvsEntries.h, CvsEntries.cpp
  • Entries_SetMissing() : CvsEntries.h, CvsEntries.cpp
  • Entries_SetVisited() : CvsEntries.h, CvsEntries.cpp
  • ENTRY_CMDLINE_DESC_FORMAT : MultilineEntryDlg.cpp
  • ENTRY_DESCRIPTION_DESC_FORMAT : MultilineEntryDlg.cpp
  • ENTRY_LOGMESSAGE_DESC_FORMAT : MultilineEntryDlg.cpp
  • ENTRY_STATE_DESC_FORMAT : MultilineEntryDlg.cpp
  • epi_i : umain.h
  • epi_ii : umain.h
  • epi_iVP : umain.h
  • epi_V : umain.h
  • epi_VP : umain.h
  • epNone : umain.h
  • epV_I : umain.h
  • epV_i : umain.h
  • epV_ii : umain.h
  • epV_iii : umain.h
  • epV_iiVP : umain.h
  • epV_iVP : umain.h
  • epV_IVP : umain.h
  • epV_V : umain.h
  • epV_VP : umain.h
  • EqualRect() : udraw.h, udraw.cpp
  • err : Stat.cpp
  • errInternal : AppGlue.h
  • errNoCvsguiProtocol : AppGlue.h
  • errors : Stat.cpp
  • errThreadRunning : AppGlue.h
  • EV_BTNDBLDOWN : umain.h
  • EV_BTNDOWN : umain.h
  • EV_BTNUP : umain.h
  • EV_CHGCURSOR : umain.h
  • EV_CHGFOCUS : umain.h
  • EV_CMD : umain.h
  • EV_COMBO_APPEND : umain.h
  • EV_COMBO_DELSEL : umain.h
  • EV_COMBO_ENABLESEL : umain.h
  • EV_COMBO_GETCOUNT : umain.h
  • EV_COMBO_GETMENU : umain.h
  • EV_COMBO_GETSEL : umain.h
  • EV_COMBO_RESETALL : umain.h
  • EV_COMBO_SEL : umain.h
  • EV_COMBO_SETSEL : umain.h
  • EV_COMMAND_START : umain.h
  • EV_CREATE : umain.h
  • EV_CUSTOM_CLICK : umain.h
  • EV_CUSTOM_DRAW : umain.h
  • EV_DESTROY : umain.h
  • EV_DRAGQUERY : umain.h
  • EV_DROPIT : umain.h
  • EV_DROPQUERY : umain.h
  • EV_DROPQUERY_CMDID : umain.h
  • EV_DROPREF : umain.h
  • EV_EDITACTIVATE : umain.h
  • EV_EDITCHANGE : umain.h
  • EV_ENABLECMD : umain.h
  • EV_ENTER : umain.h
  • EV_EXPOSE : umain.h
  • EV_FETCHCMD : umain.h
  • EV_GET_SLIDERPROP : umain.h
  • EV_GETFLOAT : umain.h
  • EV_GETINTEGER : umain.h
  • EV_GETLOC : umain.h
  • EV_GETTEXT : umain.h
  • EV_INIT_TAB_WIDGET : umain.h
  • EV_INIT_WIDGET : umain.h
  • EV_INVALIDATE : umain.h
  • EV_KEYDOWN : umain.h
  • EV_LEAVE : umain.h
  • EV_LIST_ADDCOLUMNS : umain.h
  • EV_LIST_ADDSEL : umain.h
  • EV_LIST_DBLCLICK : umain.h
  • EV_LIST_DELROW : umain.h
  • EV_LIST_GETINFO : umain.h
  • EV_LIST_GETNEXT : umain.h
  • EV_LIST_GETNEXTSEL : umain.h
  • EV_LIST_HIDECOLUMNS : umain.h
  • EV_LIST_INSERT : umain.h
  • EV_LIST_NEWROW : umain.h
  • EV_LIST_POPUP : umain.h
  • EV_LIST_RESETALL : umain.h
  • EV_LIST_RESORT : umain.h
  • EV_LIST_ROWGETDATA : umain.h
  • EV_LIST_ROWSETDATA : umain.h
  • EV_LIST_SELCOLUMN : umain.h
  • EV_LIST_SELECTING : umain.h
  • EV_LIST_SETCOLTITLE : umain.h
  • EV_LIST_SETCOLWIDTH : umain.h
  • EV_LIST_SETFEEDBACK : umain.h
  • EV_LIST_SETSORTDIR : umain.h
  • EV_LIST_SHOWCOLUMNS : umain.h
  • EV_MMOVE : umain.h
  • ev_msg : umain.h
  • EV_NONE : umain.h
  • EV_NOTIFY : umain.h
  • EV_PAGE_CHANGED : umain.h
  • EV_QUERYSTATE : umain.h
  • EV_REDRAW : umain.h
  • EV_RESIZE : umain.h
  • EV_SCROLLCHANGE : umain.h
  • EV_SET_SLIDER : umain.h
  • EV_SET_SLIDERPROP : umain.h
  • EV_SETCURSOR : umain.h
  • EV_SETDEFAULT : umain.h
  • EV_SETFLOAT : umain.h
  • EV_SETICON : umain.h
  • EV_SETINTEGER : umain.h
  • EV_SETLOC : umain.h
  • EV_SETSTATE : umain.h
  • EV_SETTEXT : umain.h
  • EV_SETTOOLTIP : umain.h
  • EV_SHOW_WIDGET : umain.h
  • EV_SMARTCOMBO_SETFEATURE : umain.h
  • EV_SMARTCOMBO_SETITEMS : umain.h
  • EV_SMARTCOMBO_SETREADONLY : umain.h
  • EV_STATUSBAR_TEXT : umain.h
  • EV_TB_BUTTON : umain.h
  • EV_TB_CHECKBTN : umain.h
  • EV_TB_DROPDOWN : umain.h
  • EV_TB_END : umain.h
  • EV_TB_GETCOLOR : umain.h
  • EV_TB_INIT : umain.h
  • EV_TB_SEPARATOR : umain.h
  • EV_TIMER : umain.h
  • EV_TREE_DELETE : umain.h
  • EV_TREE_EXPAND : umain.h
  • EV_TREE_EXPANDING : umain.h
  • EV_TREE_GETINFO : umain.h
  • EV_TREE_GETSEL : umain.h
  • EV_TREE_INSERT : umain.h
  • EV_TREE_RESETALL : umain.h
  • EV_TREE_SELECT : umain.h
  • EV_TREE_SELECTING : umain.h
  • EV_TREE_SETDATA : umain.h
  • EV_TREE_SETICON : umain.h
  • EV_UPDATEFOCUS : umain.h
  • EV_UPDATEUI : umain.h
  • EV_UPDTCMD : umain.h
  • exchange() : getopt.c
  • exit : dll_glue.h
  • expandLF() : CvsArgs.cpp
  • extColumn : BrowseViewColumn.cpp
  • extractInfos() : UPseudoSupport.cpp

- f -

  • FILEACTION_TYPE : CvsPrefs.h
  • FILECHANGE_TIMER : BrowseFileView.cpp
  • FileIsBinary() : TextBinary.h, TextBinary.cpp
  • FileIsText() : TextBinary.h, TextBinary.cpp
  • FileIsUnicode() : TextBinary.h, TextBinary.cpp
  • FileTimeToUnixTime() : Stat.cpp
  • FileTraverse() : FileTraversal.h, FileTraversal.cpp
  • FillBuffer() : TextBinary.cpp
  • FILTER_ALL : PromptFiles.cpp
  • FILTER_DLL : PromptFiles.cpp
  • FILTER_END : PromptFiles.cpp
  • FILTER_EXECUTABLE : PromptFiles.cpp
  • FILTER_SEPARATOR : PromptFiles.cpp
  • FILTER_TOKEN_SEPARATORS : BrowseViewModel.h
  • filterFileMasks : UCvsFrame.cpp
  • FilterMaskContainer : BrowseViewModel.h
  • FindBestLastCvsroot() : CvsPrefs.h, CvsPrefs.cpp
  • FindBestLastModuleName() : CvsPrefs.h, CvsPrefs.cpp
  • FindExtension() : CvsEntries.cpp
  • findIdForWnd() : PseudoDlg.cpp
  • findmostright() : UPseudoSupport.cpp
  • FindNextChildWindow() : wincvs_winutil.cpp
  • FindNextSiblingWindow() : wincvs_winutil.cpp
  • FindNextWindow() : wincvs_winutil.h, wincvs_winutil.cpp
  • FindPrevSiblingWindow() : wincvs_winutil.cpp
  • FindPrevWindow() : wincvs_winutil.h, wincvs_winutil.cpp
  • first_nonopt : getopt.c
  • FlatenSubFolders() : ustr.h, ustr.cpp
  • flush_all() : dll_glue.c
  • FNM_NOESCAPE : fnmatch.h
  • FNM_NOMATCH : fnmatch.h
  • FNM_PATHNAME : fnmatch.h
  • FNM_PERIOD : fnmatch.h
  • fnmatch() : fnmatch.h, fnmatch.c
  • FNOBSERVER : BrowseViewModel.h
  • FOLD_FN_CHAR : fnmatch.h
  • FormatCvsRoot() : CvsRootDlg.cpp
  • FormatDefaultSettingsLoc() : Persistent.h, Persistent.cpp
  • FormatItemDescription() : ItemListDlg.cpp
  • FormatListPath() : ItemListDlg.cpp
  • FormatMillisecondTime() : wincvs_winutil.h, wincvs_winutil.cpp
  • frameRec : dll_garbage.c
  • free : dll_garbage.h
  • free_dircontents() : ndir.c
  • free_list_types() : ImportFilter.h, ImportFilter.cpp
  • FSSpec : TextBinary.h
  • fstat : StdAfx.h
  • FTS_BOTTOM : CJFlatTabCtrl.h
  • FTS_HASARROWS : CJFlatTabCtrl.h
  • FTS_HASHOMEEND : CJFlatTabCtrl.h

- g -

  • g_hMsgHook : CJMenuBar.cpp
  • g_pMenuBar : CJMenuBar.cpp
  • g_Shell : CJMenu.cpp
  • gAddBinControl : CvsPrefs.cpp
  • gAllMethods : PythonGlue.cpp
  • gAlwaysUseCvsroot : CvsPrefs.cpp
  • GAP : CJMenu.cpp
  • garby_alloc() : dll_garbage.c
  • GARBY_DEF_ALLOC : dll_garbage.c
  • GARBY_DEF_POOL : dll_garbage.c
  • garby_free() : dll_garbage.c
  • GARBY_KEY() : dll_garbage.c
  • garby_realloc() : dll_garbage.c
  • garbyAlloc : dll_garbage.c
  • garbyFree : dll_garbage.c
  • garbyNew() : dll_garbage.h, dll_garbage.c
  • garbyPtr : dll_garbage.c
  • garbyRealloc : dll_garbage.c
  • garbyRemove() : dll_garbage.h, dll_garbage.c
  • gAuthors : wincvs.cpp
  • gBrowser : CvsPrefs.cpp
  • gBrowserMenu : CustomizeMenus.cpp
  • gc_nBitmapRightMargin() : Splash.cpp
  • gCheckoutRO : CvsPrefs.cpp
  • gCheckValidEdits : CommitDlg.cpp
  • gCommitLogs : ImportDlg.cpp, CommitDlg.cpp, AdminOptionDlg.cpp
  • gCtrlPressedOnOK : CvsPrefs.cpp
  • gCvsConsole : CvsPrefs.cpp
  • gCvsguiErr : PythonContainer.h, PythonContainer.cpp
  • gCvsPrefs : CvsPrefs.h, CvsPrefs.cpp
  • gCvsVersion : CvsPrefs.cpp
  • gDateNames : UpdateDlg.cpp, ItemListDlg.h, AnnotateDlg.h
  • gDateOrRevNames : UpdateDlg.cpp, DiffDlg.cpp
  • gDiffOptions : DiffDlg.cpp
  • gDisableSplashScreen : CvsPrefs.cpp
  • gDisplayRecursive : BrowseViewModel.cpp
  • gDummyFile : WinCvsBrowser.cpp, UCvsFolders.cpp
  • gEncryptCommunication : CvsPrefs.cpp
  • GetAllPersistentSettings() : Persistent.h, Persistent.cpp
  • GetAsSystemTime() : CJDateTimeCtrl.cpp
  • GetCustomMenu() : CustomizeMenus.h, CustomizeMenus.cpp
  • GetDateTime() : CvsEntries.h, CvsEntries.cpp
  • GetDItemCtrlHdl() : MacMisc.h
  • GetDItemHdl() : MacMisc.h
  • GetDItemMenuSel() : MacMisc.h
  • GetEditTypeName() : CvsCommands.h, CvsCommands.cpp
  • GetEndOfDecendantWindow() : wincvs_winutil.cpp
  • getenv : dll_glue.h
  • GetEnvValue() : ustr.h, ustr.cpp
  • GetExtension() : ustr.h, ustr.cpp
  • GetIcon() : UCvsFolders.cpp
  • GetInvString() : CustomizeMenus.cpp
  • GETITEM_BUFFER_SIZE : SortHeaderCtrl.cpp
  • getLabelFromContainer() : stdafx.h
  • GetLaunchTypeName() : LaunchHandlers.h, LaunchHandlers.cpp
  • getline() : getline.h, getline.c
  • getLoc() : MacrosSetup.cpp
  • GetMenuEntry() : wincvs_winutil.h, wincvs_winutil.cpp
  • GetMenuTitle() : umenu.cpp
  • GetNextEntriesLine() : CvsEntries.cpp
  • GetNextParentWindow() : wincvs_winutil.cpp
  • getopt() : getopt.h, getopt.c
  • getopt_long() : getopt1.c, getopt.h
  • getopt_long_only() : getopt1.c, getopt.h
  • GetPrevFilter() : FilterSelectionDlg.h, FilterSelectionDlg.cpp
  • GetPrevParentWindow() : wincvs_winutil.cpp
  • GetPyFalse() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyFile_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyInt_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyNone() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyString_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyTrue() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyTuple_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyType_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetRtagTypeName() : CvsCommands.h, CvsCommands.cpp
  • getSettingName() : Persistent.cpp
  • getstr() : getline.h, getline.c
  • GetSubCMenu() : wincvs_winutil.h, wincvs_winutil.cpp
  • GetTagTypeName() : CvsCommands.h, CvsCommands.cpp
  • GetTimeZoneBias() : Stat.cpp
  • GetTopPopupMenu() : wincvs_winutil.h, wincvs_winutil.cpp
  • gExtdiff : CvsPrefs.cpp
  • gFileActionType : CvsPrefs.cpp
  • gFilesMenu : CustomizeMenus.cpp
  • gFileViewFilterMasksReactionSpeed : BrowseFileView.cpp
  • gFileViewIgnore : BrowseViewModel.cpp
  • gFileViewSort : BrowseFileView.cpp, UCvsFiles.cpp
  • gFileViewSortAsc : BrowseFileView.cpp, UCvsFiles.cpp
  • gFilterMasksEnable : BrowseViewModel.cpp
  • gGarbage : dll_garbage.c
  • gGraphBranchColor : GraphView.cpp
  • gGraphDeadNodeColor : GraphView.cpp
  • gGraphHeaderColor : GraphView.cpp
  • gGraphMergeColor : GraphView.cpp
  • gGraphNodeColor : GraphView.cpp
  • gGraphSelColor : GraphView.cpp
  • gGraphShadowColor : GraphView.cpp
  • gGraphTagColor : GraphView.cpp
  • gGraphUserStateNodeColor : GraphView.cpp
  • gHelper : CvsPrefs.cpp
  • gHideCommandDlgAnnotate : CvsPrefs.cpp
  • gHideCommandDlgDiff : CvsPrefs.cpp
  • gHideCommandDlgFileAction : CvsPrefs.cpp
  • gHideCommandDlgGraph : CvsPrefs.cpp
  • gHideCommandDlgLog : CvsPrefs.cpp
  • gHideCommandDlgStatus : CvsPrefs.cpp
  • gHideCommandDlgUpdate : CvsPrefs.cpp
  • gHideCommandDlgUseShift : CvsPrefs.cpp
  • gHistoryLocs : MainFrm.cpp, UCvsFolders.cpp
  • gHome : CvsPrefs.cpp
  • gICTextOption : CvsPrefs.cpp
  • gIgnoreCase : DiffDlg.cpp
  • gImportLocalFolder : ImportDlg.cpp
  • gImportModuleNames : ImportDlg.cpp
  • gIsoConvert : CvsPrefs.cpp
  • gItemListAutoRefreshModule : ItemListDlg.cpp
  • gItemListAutoRefreshTag : ItemListDlg.cpp
  • gItemListModuleList : ItemListDlg.cpp
  • gItemListTagRecurse : ItemListDlg.cpp
  • gKeywordModes : KeywordComboBox.cpp
  • gKserverPort : CvsPrefs.cpp
  • gLastCvsroot : CvsPrefs.cpp
  • gLastModuleName : CvsPrefs.cpp
  • gLastWorkingDir : CvsPrefs.cpp
  • gLogDateNames : LogDlg.cpp
  • gLogoutThread : wincvs.cpp
  • gLogoutTimeOut : CvsPrefs.cpp
  • gLogRevNames : LogDlg.cpp
  • gLogStateNames : LogDlg.cpp
  • gLogSupress : LogDlg.cpp
  • gLogUserNames : LogDlg.cpp
  • glue_consoleerr() : AppGlue.h, AppGlue.cpp
  • glue_consolein() : AppGlue.h, AppGlue.cpp
  • glue_consoleout() : AppGlue.h, AppGlue.cpp
  • glue_eventdispatcher() : AppGlue.mac.h
  • glue_exit() : AppGlue.h, AppGlue.cpp
  • glue_getenv() : AppGlue.h, AppGlue.cpp
  • glue_ondestroy() : AppGlue.h, AppGlue.cpp
  • GLUE_WRAP : TclGlue.cpp, PythonGlue.impl.h
  • gMacBinEncodeOnlyBinaryFiles : CvsPrefs.cpp
  • gMacBinEncoding : CvsPrefs.cpp
  • gMacLF : CvsPrefs.cpp
  • gMacrosAdmin : MacrosSetup.h, MacrosSetup.cpp
  • gMacrosSel : MacrosSetup.h, MacrosSetup.cpp
  • gMainPlacement : MainFrm.cpp
  • gMatchEntriesCase : CvsPrefs.cpp
  • gNoBlankLines : DiffDlg.cpp
  • gNoWhiteSpace : DiffDlg.cpp
  • gOldCvsroots : CvsPrefs.h, CvsPrefs.cpp
  • gOldLoc : HistComboBoxEx.cpp, UCvsFolders.cpp
  • gOldModules : RtagDlg.h, CheckoutDlg.h, CheckoutDlg.cpp
  • gPersistentShema : CvsPrefs.cpp
  • gPrevAltCvs : GetPrefs.cpp
  • gPrevCvsCmd : LineCmd.cpp
  • gPrevCvsCmdDir : LineCmd.cpp
  • gPrevCvsRootKeywords : CvsRootDlg.cpp
  • gPrevCVsRootRepositoryPaths : CvsRootDlg.cpp
  • gPrevFilterConflict : FilterSelectionDlg.cpp
  • gPrevFilterEncoding : FilterSelectionDlg.cpp
  • gPrevFilterExtention : FilterSelectionDlg.cpp
  • gPrevFilterName : FilterSelectionDlg.cpp
  • gPrevFilterOption : FilterSelectionDlg.cpp
  • gPrevFilterPath : FilterSelectionDlg.cpp
  • gPrevFilterRevision : FilterSelectionDlg.cpp
  • gPrevFilterState : FilterSelectionDlg.cpp
  • gPrevFilterStickyTag : FilterSelectionDlg.cpp
  • gPrevFilterTimeStamp : FilterSelectionDlg.cpp
  • gPrevStates : AdminOptionDlg.cpp
  • gProxyHost : CvsPrefs.cpp
  • gProxyPort : CvsPrefs.cpp
  • gPruneOption : CvsPrefs.cpp
  • gPserverPort : CvsPrefs.cpp
  • gPythonLibrary : CvsPrefs.cpp
  • gQuietOption : CvsPrefs.cpp
  • gReleasesNames : UpdateDlg.cpp, ImportDlg.cpp
  • gRevNames : UpdateDlg.cpp, MultilineEntryDlg.h, UpdateDlg.cpp, ItemListDlg.h, CommitDlg.h, AnnotateDlg.h
  • gRhostPort : CvsPrefs.cpp
  • GRIP_INTRASPACING : CJControlBar.cpp
  • GRIP_SIZE : CJControlBar.cpp
  • GRIP_START : CJControlBar.cpp
  • gRshName : CvsPrefs.cpp
  • gServerName : CvsPrefs.cpp
  • gSettingsFolder : CvsPrefs.cpp
  • gShowCvs : CvsPrefs.cpp
  • gSortParam : UCvsFiles.cpp
  • gStatusOutputType : CvsPrefs.cpp
  • gStrMonths : CvsEntries.cpp
  • gTclLibrary : CvsPrefs.cpp
  • gtkCompareWrap() : UCvsFiles.cpp
  • gTurnOffBroadcast : UPseudoSupport.h, UPseudoSupport.cpp
  • gUICache : PythonGlue.cpp
  • gUICacheObj : PythonGlue.cpp
  • gUICacheValid : PythonGlue.cpp
  • gUnifiedDiff : DiffDlg.cpp
  • gUnixLF : CvsPrefs.cpp
  • gUpdateCaseSensitiveNames : CvsPrefs.cpp
  • gUpdateLastCheckinTime : CvsPrefs.cpp
  • gUpdateThreeWayConflicts : CvsPrefs.cpp
  • gUseAltCvs : CvsPrefs.cpp
  • gUseExtDiff : DiffDlg.cpp
  • gUseProxy : CvsPrefs.cpp
  • gUseShell : CvsPrefs.cpp
  • gVendorBranchIds : ImportDlg.cpp
  • gVendorNames : ImportDlg.cpp
  • gViewAdded : BrowseViewModel.cpp
  • gViewChanged : BrowseViewModel.cpp
  • gViewConflicts : BrowseViewModel.cpp
  • gViewer : CvsPrefs.cpp
  • gViewFont : wincvsView.cpp
  • gViewHideMissing : BrowseViewModel.cpp
  • gViewHideUnknown : BrowseViewModel.cpp
  • gViewMissing : BrowseViewModel.cpp
  • gViewRemoved : BrowseViewModel.cpp
  • gViewUnknown : BrowseViewModel.cpp
  • gWarnPython : NoPython.cpp
  • gWhichCvs : CvsPrefs.cpp
  • gWordWrapLogMsg : CvsPrefs.cpp
  • gZ9Option : CvsPrefs.cpp
  • gZLevel : CvsPrefs.cpp

- h -

  • HALF_SECOND : CJDateTimeCtrl.cpp
  • HasPersistentSettings() : Persistent.h, Persistent.cpp
  • helpTopicEnd : HHelpSupport.h
  • helpTopicIgnore : HHelpSupport.h
  • hextable : CJHexEdit.cpp
  • HIDE_CONTRLBAR : CJControlBar.h
  • HIGHLIGHTSTYLE : CJMenu.h
  • HISTLOC_IMAGE_CX : HistComboBoxEx.h
  • HISTLOC_VISIBLEITEMS : HistComboBoxEx.h
  • HookWndProc() : Subclass.cpp
  • HORZF : CJDockContext.cpp

- i -

  • ID_ACCEL32911 : resource.h
  • ID_ADDBF : resource.h
  • ID_APP_CMDLINE : resource.h
  • ID_APP_COPYRIGHTS : resource.h
  • ID_APP_CREDITS : resource.h
  • ID_APP_LOGIN : resource.h
  • ID_APP_LOGOUT : resource.h
  • ID_APP_PREFERENCES : resource.h
  • ID_APP_RTAGBRANCH : resource.h
  • ID_APP_RTAGCREATE : resource.h
  • ID_APP_RTAGDELETE : resource.h
  • ID_BROWSER_OPEN : resource.h
  • ID_BUTTON32918 : resource.h
  • ID_BUTTON32919 : resource.h
  • ID_BUTTON32920 : resource.h
  • ID_BUTTON32921 : resource.h
  • ID_BUTTON32940 : resource.h
  • ID_CANCEL_EDIT_CNTR : resource.h
  • ID_COMMITBF : resource.h
  • ID_CUST_FILES_MENU : resource.h
  • ID_CUST_FOLDER_MENU : resource.h
  • ID_FILTERMASK : resource.h
  • ID_GFX_LARGEICON : CJResource.h
  • ID_GFX_REMOVEITEM : CJResource.h
  • ID_GFX_RENAMEITEM : CJResource.h
  • ID_GFX_SMALLICON : CJResource.h
  • ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE : resource.h
  • ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION : resource.h
  • ID_GRAPH_ADMINOPTIONS_SETSTATE : resource.h
  • ID_GRAPH_CLOSE : resource.h
  • ID_GRAPH_GRAPHOPTIONS : resource.h
  • ID_HELP_CVS : resource.h
  • ID_HISTORYBROWSE : resource.h
  • ID_MACRO_ADMIN : resource.h
  • ID_MACRO_END : resource.h
  • ID_MACRO_SEL : resource.h
  • ID_MACRO_START : resource.h
  • ID_MENUBAR : resource.h
  • ID_MENUITEM32840 : resource.h
  • ID_POPUP_CUSTOMIZE : CJResource.h
  • ID_QUERY_ANNOTATE : resource.h
  • ID_QUERY_PROPERTIES : resource.h
  • ID_QUERY_SHELLACTION_DEFAULT : resource.h
  • ID_SAVESETTINGS : resource.h
  • ID_STOPCVS : resource.h
  • ID_UPDATEBF : resource.h
  • ID_USE_PYSHELL : resource.h
  • ID_USE_TCLSHELL : resource.h
  • ID_VIEW_ADD : resource.h
  • ID_VIEW_ADDB : resource.h
  • ID_VIEW_ADDED : resource.h
  • ID_VIEW_ADDU : resource.h
  • ID_VIEW_BROWSELOCATION_REMOVEUNWANTED : resource.h
  • ID_VIEW_BROWSER_BAR : resource.h
  • ID_VIEW_CHANGED : resource.h
  • ID_VIEW_CHECKOUT : resource.h
  • ID_VIEW_CLEARALL : resource.h
  • ID_VIEW_COMMIT : resource.h
  • ID_VIEW_CONFLICT : resource.h
  • ID_VIEW_CONSOLE_BAR : resource.h
  • ID_VIEW_DELREV : resource.h
  • ID_VIEW_DIFF : resource.h
  • ID_VIEW_EDIT : resource.h
  • ID_VIEW_EDITORS : resource.h
  • ID_VIEW_EDITSEL : resource.h
  • ID_VIEW_EDITSELDEF : resource.h
  • ID_VIEW_EXPLORE : resource.h
  • ID_VIEW_FILES_BAR : resource.h
  • ID_VIEW_FILTER_BAR : resource.h
  • ID_VIEW_FILTERBAR_CLEARALL : resource.h
  • ID_VIEW_FILTERBAR_ENABLE : resource.h
  • ID_VIEW_FILTERBAR_OPTIONS : resource.h
  • ID_VIEW_FORCEEDIT : resource.h
  • ID_VIEW_FULLLIST : resource.h
  • ID_VIEW_GRAPH : resource.h
  • ID_VIEW_HIDEMISSING : resource.h
  • ID_VIEW_HIDEUNKNOWN : resource.h
  • ID_VIEW_IGNORE : resource.h
  • ID_VIEW_IMPORT : resource.h
  • ID_VIEW_INIT : resource.h
  • ID_VIEW_LOCKF : resource.h
  • ID_VIEW_LOG : resource.h
  • ID_VIEW_MISSING : resource.h
  • ID_VIEW_MODIFIED : resource.h
  • ID_VIEW_MULTI_BAR : resource.h
  • ID_VIEW_NEWINSTANCE : resource.h
  • ID_VIEW_OPENSEL : resource.h
  • ID_VIEW_OPENSELAS : resource.h
  • ID_VIEW_QUERYUPDATE : resource.h
  • ID_VIEW_RECURSIVE : resource.h
  • ID_VIEW_RELEASE : resource.h
  • ID_VIEW_RELOAD : resource.h
  • ID_VIEW_REMOVED : resource.h
  • ID_VIEW_RESERVEDEDIT : resource.h
  • ID_VIEW_RETRIEVE : resource.h
  • ID_VIEW_RETRIEVEAS : resource.h
  • ID_VIEW_RMV : resource.h
  • ID_VIEW_ROWDETAILS : resource.h
  • ID_VIEW_SELNONSIG : resource.h
  • ID_VIEW_SMALLICONS : resource.h
  • ID_VIEW_STATUS : resource.h
  • ID_VIEW_TAG : resource.h
  • ID_VIEW_TAGBRANCH : resource.h
  • ID_VIEW_TAGDELETE : resource.h
  • ID_VIEW_TAGNEW : resource.h
  • ID_VIEW_TAGS_BAR : resource.h
  • ID_VIEW_TRASH : resource.h
  • ID_VIEW_UNEDIT : resource.h
  • ID_VIEW_UNKNOWN : resource.h
  • ID_VIEW_UNLOCKF : resource.h
  • ID_VIEW_UPDATE : resource.h
  • ID_VIEW_UPONE : resource.h
  • ID_VIEW_WATCHERS : resource.h
  • ID_VIEW_WATCHOFF : resource.h
  • ID_VIEW_WATCHON : resource.h
  • ID_VIEW_WORKSPACE : resource.h
  • ID_VIEWW_INIT : resource.h
  • IDB_ABOUT : resource.h
  • IDB_BTN_ARROW : CJResource.h
  • IDB_BTN_EXPLORER : CJResource.h
  • IDB_BUTTON_IMAGES : CJResource.h
  • IDB_HISTLOC : resource.h
  • IDB_IDLE : resource.h
  • IDB_IMPORT : resource.h
  • IDB_LIGHTBULB : resource.h
  • IDB_LOCATE : resource.h
  • IDB_MODULES : resource.h
  • IDB_PUSHPIN : CJResource.h
  • IDB_PYTHON : resource.h
  • IDB_SMALLICONS : resource.h
  • IDB_SPLASH : resource.h
  • IDC_ACTION : resource.h
  • IDC_ACTION_DESC : resource.h
  • IDC_ADD : resource.h
  • IDC_ADD_DEFAULT : resource.h
  • IDC_ADD_SELECTION : resource.h
  • IDC_ALERT_MESSAGE : resource.h
  • IDC_ALLCMDS : resource.h
  • IDC_ALTERNATE_CVS : resource.h
  • IDC_ALTERNATE_SETTINGS : resource.h
  • IDC_ALWAYSROOT : resource.h
  • IDC_APPLY : resource.h
  • IDC_ATTIC : resource.h
  • IDC_AUTO_LOGOUT : resource.h
  • IDC_AUTO_LOGOUT_TIME : resource.h
  • IDC_AUTO_REFRESH : resource.h
  • IDC_BAR_BUTTON : CJResource.h
  • IDC_BAR_CAPTION : CJResource.h
  • IDC_BAR_TREE : resource.h
  • IDC_BRANCHID : resource.h
  • IDC_BRANCHPOINT_MERGE : resource.h
  • IDC_BROWSE_ALTERNATE_SETTINGS : resource.h
  • IDC_BROWSE_BRANCHID : resource.h
  • IDC_BROWSE_CVSROOT : resource.h
  • IDC_BROWSE_DIFFOPTIONS : resource.h
  • IDC_BROWSE_EXTERNAL_DIFF : resource.h
  • IDC_BROWSE_EXTERNAL_EDITOR : resource.h
  • IDC_BROWSE_FILENAME : resource.h
  • IDC_BROWSE_MODNAME : resource.h
  • IDC_BROWSE_PATH : resource.h
  • IDC_BROWSE_PYTHONDLL : resource.h
  • IDC_BROWSE_READ_FROM : resource.h
  • IDC_BROWSE_SELECTION : resource.h
  • IDC_BROWSE_TAG : resource.h
  • IDC_BROWSE_TAG1 : resource.h
  • IDC_BROWSE_TAG2 : resource.h
  • IDC_BROWSE_TCLDLL : resource.h
  • IDC_BULB : resource.h
  • IDC_BUTTON_HIDE : CJResource.h
  • IDC_BUTTON_MINI : CJResource.h
  • IDC_CAPT_BUTTON : CJResource.h
  • IDC_CASE_SENSITIVE_NAMES : resource.h
  • IDC_CHECK_UNMODIFIED : resource.h
  • IDC_CHECK_VALID_EDITS : resource.h
  • IDC_CHECKOUT_DIR : resource.h
  • IDC_CHECKOUT_READ_ONLY : resource.h
  • IDC_CLEAR_KEYWORD : resource.h
  • IDC_COLOR_BRANCH : resource.h
  • IDC_COLOR_DEAD : resource.h
  • IDC_COLOR_HEADER : resource.h
  • IDC_COLOR_MERGE : resource.h
  • IDC_COLOR_NODE : resource.h
  • IDC_COLOR_SELECTION : resource.h
  • IDC_COLOR_SHADOW : resource.h
  • IDC_COLOR_STATE : resource.h
  • IDC_COLOR_TAG : resource.h
  • IDC_COMPARE_TYPE : resource.h
  • IDC_COMPRESSION : resource.h
  • IDC_CONFLICT_DESC : resource.h
  • IDC_CONSOLE : resource.h
  • IDC_CONTROL_ADDED_FILES : resource.h
  • IDC_COPY_SETTINGS : resource.h
  • IDC_COPY_SETTINGS_NAME : resource.h
  • IDC_CREATE_MISSING_DIR : resource.h
  • IDC_CREATE_SANDBOX : resource.h
  • IDC_CTRL_PRESSED_ON_OK : resource.h
  • IDC_CURRENT_DIFF_OPTIONS : resource.h
  • IDC_CUSTOMIZE_BAR : CJToolBar.cpp
  • IDC_CVSGUISFURL : resource.h
  • IDC_CVSROOT : resource.h
  • IDC_DATE : resource.h
  • IDC_DATE1 : resource.h
  • IDC_DATE2 : resource.h
  • IDC_DEFAULT_BRANCH : resource.h
  • IDC_DEFAULT_CVSIGNORE : resource.h
  • IDC_DELETE_ALL_FILES : resource.h
  • IDC_DELETE_CVS_INFO : resource.h
  • IDC_DELETE_DIRECTORY : resource.h
  • IDC_DIFF : resource.h
  • IDC_DIFF_OPTION_DESCRIPTION : resource.h
  • IDC_DIFF_OPTION_LIST : resource.h
  • IDC_DIFFOPTIONS : resource.h
  • IDC_DONT_SHORTEN_PATHS : resource.h
  • IDC_DOWN : resource.h
  • IDC_DRAGGING : CJResource.h
  • IDC_EDIT_KEYWORD : resource.h
  • IDC_ENCRYPTION : resource.h
  • IDC_ENDBUTTON : CJResource.h
  • IDC_ENTRIES_LIST : resource.h
  • IDC_ENTRY : resource.h
  • IDC_ENTRY_EDIT : resource.h
  • IDC_ENTRYSTATE_FORCE_BINARY : resource.h
  • IDC_ENTRYSTATE_FORCE_TEXT : resource.h
  • IDC_ENTRYSTATE_FORCE_UNICODE : resource.h
  • IDC_ENTRYSTATE_IGNORE : resource.h
  • IDC_ENTRYSTATE_NO_CHANGE : resource.h
  • IDC_ENTRYSTATE_NO_EXPANSION : resource.h
  • IDC_EXPORT : resource.h
  • IDC_EXTERNAL_DIFF : resource.h
  • IDC_EXTERNAL_EDITOR : resource.h
  • IDC_FILENAME : resource.h
  • IDC_FILEPATH : resource.h
  • IDC_FILES_MODIFICATION_TIME : resource.h
  • IDC_FILETODIFF : resource.h
  • IDC_FILTER : resource.h
  • IDC_FILTER_CONTENTS : resource.h
  • IDC_FORCE_COMMIT : resource.h
  • IDC_FORCE_CVSROOT : resource.h
  • IDC_FORCE_HEAD_REV : resource.h
  • IDC_FORCE_KEY_CTRL : resource.h
  • IDC_FORCE_KEY_SHIFT : resource.h
  • IDC_FORCE_RECURSE : resource.h
  • IDC_FORCE_REVISION : resource.h
  • IDC_GET_CLEAN_COPY : resource.h
  • IDC_GROUP_OPTIONS : resource.h
  • IDC_GRPBOX_TEXT : resource.h
  • IDC_HANDCUR : CJResource.h
  • IDC_HAS_ALTERNATE_CVS : resource.h
  • IDC_HAS_ALTERNATE_SETTINGS : resource.h
  • IDC_HAS_BRANCHID : resource.h
  • IDC_HAS_COMPRESSION : resource.h
  • IDC_HAS_DATE : resource.h
  • IDC_HAS_DATE1 : resource.h
  • IDC_HAS_DATE2 : resource.h
  • IDC_HAS_EXTERNAL_DIFF : resource.h
  • IDC_HAS_PATH : resource.h
  • IDC_HAS_REV : resource.h
  • IDC_HAS_STATES : resource.h
  • IDC_HAS_USERS : resource.h
  • IDC_HEADERS : resource.h
  • IDC_HEADERS_DESC : resource.h
  • IDC_HELP_INIT : resource.h
  • IDC_HELPLOGIN : resource.h
  • IDC_HOME : resource.h
  • IDC_HOMEBUTTON : CJResource.h
  • IDC_HSPLITBAR : CJResource.h
  • IDC_ICON_STATIC : resource.h
  • IDC_IGNORECASE : resource.h
  • IDC_IGNOREWHITESPACE : resource.h
  • IDC_IMPORT_FILTER : resource.h
  • IDC_ISDATE : resource.h
  • IDC_ISDATE1 : resource.h
  • IDC_ISDATE2 : resource.h
  • IDC_ITEM : resource.h
  • IDC_ITEM_LABEL : resource.h
  • IDC_ITEM_LIST : resource.h
  • IDC_ITEM_LIST_OPTION : resource.h
  • IDC_KEYWORD_DESC : resource.h
  • IDC_KEYWORD_DESCRIPTION : resource.h
  • IDC_KEYWORD_OPT : resource.h
  • IDC_KEYWORD_VALUE : resource.h
  • IDC_KEYWORDLIST : resource.h
  • IDC_KEYWORDLIST_DESC : resource.h
  • IDC_LAST_CHECKIN_TIME : resource.h
  • IDC_LEFTBUTTON : CJResource.h
  • IDC_MATCH_ENTRIES_CASE : resource.h
  • IDC_MENULIST : resource.h
  • IDC_MERGE_TYPE : resource.h
  • IDC_MESSAGE_DETAILS : resource.h
  • IDC_MODNAME : resource.h
  • IDC_MODULEDESC_TEXT : resource.h
  • IDC_MOVDEL_BRANCH : resource.h
  • IDC_MULTILINE_ACTION : resource.h
  • IDC_MULTILINE_ENTRY : resource.h
  • IDC_MULTILINE_ENTRY_STATIC : resource.h
  • IDC_MULTILINE_ENTRY_WRAP : resource.h
  • IDC_MULTILINE_GO_ACTION : resource.h
  • IDC_MULTILINE_POSITION : resource.h
  • IDC_MULTILINE_PREV_ENTRY : resource.h
  • IDC_MULTILINE_TYPE : resource.h
  • IDC_MULTILINE_WORDWRAP : resource.h
  • IDC_NEXTTIP : resource.h
  • IDC_NO_MODULE_PROGRAM : resource.h
  • IDC_NO_SPLASH_SCREEN : resource.h
  • IDC_NO_VENDOR_RELEASE_TAGS : resource.h
  • IDC_NODRAGGING : CJResource.h
  • IDC_NORECURS : resource.h
  • IDC_NOTAGS : resource.h
  • IDC_OPTIONCHECK_BUTTON : resource.h
  • IDC_OTHER_BUTTON : resource.h
  • IDC_OUTPUT_QUICK : resource.h
  • IDC_OUTPUT_STANDARD : resource.h
  • IDC_OUTPUT_VERBOSE : resource.h
  • IDC_OVERRIDE_CHECKOUT_DIR : resource.h
  • IDC_OVERWRITE : resource.h
  • IDC_OVERWRITE_RELEASE_TAGS : resource.h
  • IDC_PASSWORD : resource.h
  • IDC_PATH : resource.h
  • IDC_PREVIEW_CVSROOT : resource.h
  • IDC_PREVIEWINFO : resource.h
  • IDC_PROGRESS : resource.h
  • IDC_PROGRESS_TEXT : resource.h
  • IDC_PROMPTEDIT : resource.h
  • IDC_PROTOCOL : resource.h
  • IDC_PROTOCOL_DESC : resource.h
  • IDC_PROTOCOL_KEYWORD : resource.h
  • IDC_PRUNE_EMPTY_DIR : resource.h
  • IDC_PYTHON_URL : resource.h
  • IDC_PYTHONDLL : resource.h
  • IDC_QUIET : resource.h
  • IDC_RANGE_DATE : resource.h
  • IDC_RANGE_REV_TAG : resource.h
  • IDC_RCS_FILENAMES_ONLY : resource.h
  • IDC_REACTION_SPEED : resource.h
  • IDC_REACTION_SPEED_SECONDS : resource.h
  • IDC_REACTION_SPEED_SPIN : resource.h
  • IDC_READ_FROM : resource.h
  • IDC_REFRESH_ITEMS : resource.h
  • IDC_RELEASE_TAG : resource.h
  • IDC_REMIND : resource.h
  • IDC_REMOVE : resource.h
  • IDC_REPOSITORY_PATH : resource.h
  • IDC_RESET_COLORS : resource.h
  • IDC_RESET_STICKY : resource.h
  • IDC_REV_TAG : resource.h
  • IDC_REV_TAG1 : resource.h
  • IDC_REV_TAG2 : resource.h
  • IDC_REV_TAG_DATE : resource.h
  • IDC_REVISION : resource.h
  • IDC_REVISION_SPIN : resource.h
  • IDC_RGB_BRANCH : resource.h
  • IDC_RGB_DEAD : resource.h
  • IDC_RGB_HEADER : resource.h
  • IDC_RGB_MERGE : resource.h
  • IDC_RGB_NODE : resource.h
  • IDC_RGB_SELECTION : resource.h
  • IDC_RGB_SHADOW : resource.h
  • IDC_RGB_STATE : resource.h
  • IDC_RGB_TAG : resource.h
  • IDC_RIGHTBUTTON : CJResource.h
  • IDC_SAME_ACTION_NEXT_TIME : resource.h
  • IDC_SELECTION : resource.h
  • IDC_SELECTION_LIST : resource.h
  • IDC_SETTINGS_NAME : resource.h
  • IDC_SHOW_CVS_METHOD : resource.h
  • IDC_SKIP_ANNOTATE : resource.h
  • IDC_SKIP_DIFF : resource.h
  • IDC_SKIP_FILEACTION : resource.h
  • IDC_SKIP_GRAPH : resource.h
  • IDC_SKIP_LOG : resource.h
  • IDC_SKIP_STATUS : resource.h
  • IDC_SKIP_UPDATE : resource.h
  • IDC_SPIN_AUTO_LOGOUT_TIME : resource.h
  • IDC_SPIN_COMPRESSION : resource.h
  • IDC_STARTUP : resource.h
  • IDC_STATES : resource.h
  • IDC_STATIC_CURRENTOPTIONS : resource.h
  • IDC_STATIC_OPTDESC : resource.h
  • IDC_STATICGROUP_SELECTOPTIONS : resource.h
  • IDC_STDOUT : resource.h
  • IDC_SUPRESS_HEADER : resource.h
  • IDC_TAB_CONTROL : CJResource.h
  • IDC_TAGDESC_TEXT : resource.h
  • IDC_TAGNAME : resource.h
  • IDC_TCLDLL : resource.h
  • IDC_TEMPFILE : resource.h
  • IDC_TEMPLATE_LIST : resource.h
  • IDC_TEMPLATE_PREVIEW : resource.h
  • IDC_THREE_WAY_CONFLICTS : resource.h
  • IDC_TIPSTRING : resource.h
  • IDC_UNIFIEDDIFF : resource.h
  • IDC_UNIX_LF : resource.h
  • IDC_UP : resource.h
  • IDC_URL_CODEJOCKEY : CJResource.h
  • IDC_USE_EXTERNAL_DIFF : resource.h
  • IDC_USERS : resource.h
  • IDC_VENDOR_TAG : resource.h
  • IDC_VSPLITBAR : CJResource.h
  • IDC_WARNING_DESC : resource.h
  • IDC_WINCVSURL : resource.h
  • IDC_WINCVSVER : resource.h
  • IDD_ABOUTBOX : resource.h
  • IDD_ADMINOPTION : resource.h
  • IDD_ALERT : resource.h
  • IDD_ANNOTATE_MAIN : resource.h
  • IDD_CHECKOUT_MAIN : resource.h
  • IDD_CMDLINE_MAIN : resource.h
  • IDD_COMMIT_MAIN : resource.h
  • IDD_COMMIT_OPTIONS : resource.h
  • IDD_CUSTOMIZE : resource.h
  • IDD_CVSROOT : resource.h
  • IDD_CVSTEMPLATE : resource.h
  • IDD_DIFF_MAIN : resource.h
  • IDD_DIFF_OPTIONS : resource.h
  • IDD_EDITKEYWORD : resource.h
  • IDD_EDITMESSAGE : resource.h
  • IDD_EDITORMON : resource.h
  • IDD_ENTRYDESC : resource.h
  • IDD_FILTER_SELECTION : resource.h
  • IDD_FILTERBAR_OPTIONS : resource.h
  • IDD_GRAPH_OPTIONS : resource.h
  • IDD_IMPORT_MAIN : resource.h
  • IDD_IMPORT_OPTIONS : resource.h
  • IDD_IMPORTFILTER : resource.h
  • IDD_INIT_MAIN : resource.h
  • IDD_ITEM_LIST : resource.h
  • IDD_LOG_FILTERS : resource.h
  • IDD_LOG_MAIN : resource.h
  • IDD_LOGIN_MAIN : resource.h
  • IDD_MULTILINE_ENTRY : resource.h
  • IDD_NOPYTHON : resource.h
  • IDD_OPEN_MAIN : resource.h
  • IDD_PASSWRD : resource.h
  • IDD_PREFS_CVS : resource.h
  • IDD_PREFS_CVSCMD_DIALOGS : resource.h
  • IDD_PREFS_GLOBALS : resource.h
  • IDD_PREFS_WINCVS : resource.h
  • IDD_PROGRESS : resource.h
  • IDD_RELEASE_MAIN : resource.h
  • IDD_RTAG_MAIN : resource.h
  • IDD_RTAG_OPTIONS : resource.h
  • IDD_SAVESETTINGS : resource.h
  • IDD_SELECTION_DETAILS : resource.h
  • IDD_STATUS_MAIN : resource.h
  • IDD_TAG_MAIN : resource.h
  • IDD_TIP : resource.h
  • IDD_UPDATE_MAIN : resource.h
  • IDD_UPDATE_MERGE : resource.h
  • IDD_UPDATE_OPTIONS : resource.h
  • IDD_WARNINGDESC : resource.h
  • IDH_ID_ACCEL32911 : wincvs.h
  • IDH_ID_ADDBF : wincvs.h
  • IDH_ID_APP_CMDLINE : wincvs.h
  • IDH_ID_APP_COPYRIGHTS : wincvs.h
  • IDH_ID_APP_CREDITS : wincvs.h
  • IDH_ID_APP_LOGIN : wincvs.h
  • IDH_ID_APP_LOGOUT : wincvs.h
  • IDH_ID_APP_PREFERENCES : wincvs.h
  • IDH_ID_APP_RTAGBRANCH : wincvs.h
  • IDH_ID_APP_RTAGCREATE : wincvs.h
  • IDH_ID_APP_RTAGDELETE : wincvs.h
  • IDH_ID_BROWSER_OPEN : wincvs.h
  • IDH_ID_BUTTON32918 : wincvs.h
  • IDH_ID_BUTTON32919 : wincvs.h
  • IDH_ID_BUTTON32920 : wincvs.h
  • IDH_ID_BUTTON32921 : wincvs.h
  • IDH_ID_BUTTON32940 : wincvs.h
  • IDH_ID_CANCEL_EDIT_CNTR : wincvs.h
  • IDH_ID_COMMITBF : wincvs.h
  • IDH_ID_CUST_FILES_MENU : wincvs.h
  • IDH_ID_CUST_FOLDER_MENU : wincvs.h
  • IDH_ID_FILTERMASK : wincvs.h
  • IDH_ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE : wincvs.h
  • IDH_ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION : wincvs.h
  • IDH_ID_GRAPH_ADMINOPTIONS_SETSTATE : wincvs.h
  • IDH_ID_GRAPH_CLOSE : wincvs.h
  • IDH_ID_GRAPH_GRAPHOPTIONS : wincvs.h
  • IDH_ID_HELP_CVS : wincvs.h
  • IDH_ID_HISTORYBROWSE : wincvs.h
  • IDH_ID_MACRO_ADMIN : wincvs.h
  • IDH_ID_MACRO_END : wincvs.h
  • IDH_ID_MACRO_SEL : wincvs.h
  • IDH_ID_MACRO_START : wincvs.h
  • IDH_ID_MENUBAR : wincvs.h
  • IDH_ID_MENUITEM32840 : wincvs.h
  • IDH_ID_QUERY_ANNOTATE : wincvs.h
  • IDH_ID_QUERY_PROPERTIES : wincvs.h
  • IDH_ID_QUERY_SHELLACTION_DEFAULT : wincvs.h
  • IDH_ID_SAVESETTINGS : wincvs.h
  • IDH_ID_STOPCVS : wincvs.h
  • IDH_ID_UPDATEBF : wincvs.h
  • IDH_ID_USE_PYSHELL : wincvs.h
  • IDH_ID_USE_TCLSHELL : wincvs.h
  • IDH_ID_VIEW_ADD : wincvs.h
  • IDH_ID_VIEW_ADDB : wincvs.h
  • IDH_ID_VIEW_ADDED : wincvs.h
  • IDH_ID_VIEW_ADDU : wincvs.h
  • IDH_ID_VIEW_BROWSELOCATION_REMOVEUNWANTED : wincvs.h
  • IDH_ID_VIEW_BROWSER_BAR : wincvs.h
  • IDH_ID_VIEW_CHANGED : wincvs.h
  • IDH_ID_VIEW_CHECKOUT : wincvs.h
  • IDH_ID_VIEW_CLEARALL : wincvs.h
  • IDH_ID_VIEW_COMMIT : wincvs.h
  • IDH_ID_VIEW_CONFLICT : wincvs.h
  • IDH_ID_VIEW_CONSOLE_BAR : wincvs.h
  • IDH_ID_VIEW_DELREV : wincvs.h
  • IDH_ID_VIEW_DIFF : wincvs.h
  • IDH_ID_VIEW_EDIT : wincvs.h
  • IDH_ID_VIEW_EDITORS : wincvs.h
  • IDH_ID_VIEW_EDITSEL : wincvs.h
  • IDH_ID_VIEW_EDITSELDEF : wincvs.h
  • IDH_ID_VIEW_EXPLORE : wincvs.h
  • IDH_ID_VIEW_FILES_BAR : wincvs.h
  • IDH_ID_VIEW_FILTER_BAR : wincvs.h
  • IDH_ID_VIEW_FILTERBAR_CLEARALL : wincvs.h
  • IDH_ID_VIEW_FILTERBAR_ENABLE : wincvs.h
  • IDH_ID_VIEW_FILTERBAR_OPTIONS : wincvs.h
  • IDH_ID_VIEW_FORCEEDIT : wincvs.h
  • IDH_ID_VIEW_FULLLIST : wincvs.h
  • IDH_ID_VIEW_GRAPH : wincvs.h
  • IDH_ID_VIEW_HIDEMISSING : wincvs.h
  • IDH_ID_VIEW_HIDEUNKNOWN : wincvs.h
  • IDH_ID_VIEW_IGNORE : wincvs.h
  • IDH_ID_VIEW_IMPORT : wincvs.h
  • IDH_ID_VIEW_INIT : wincvs.h
  • IDH_ID_VIEW_LOCKF : wincvs.h
  • IDH_ID_VIEW_LOG : wincvs.h
  • IDH_ID_VIEW_MISSING : wincvs.h
  • IDH_ID_VIEW_MODIFIED : wincvs.h
  • IDH_ID_VIEW_MULTI_BAR : wincvs.h
  • IDH_ID_VIEW_NEWINSTANCE : wincvs.h
  • IDH_ID_VIEW_OPENSEL : wincvs.h
  • IDH_ID_VIEW_OPENSELAS : wincvs.h
  • IDH_ID_VIEW_QUERYUPDATE : wincvs.h
  • IDH_ID_VIEW_RECURSIVE : wincvs.h
  • IDH_ID_VIEW_RELEASE : wincvs.h
  • IDH_ID_VIEW_RELOAD : wincvs.h
  • IDH_ID_VIEW_REMOVED : wincvs.h
  • IDH_ID_VIEW_RESERVEDEDIT : wincvs.h
  • IDH_ID_VIEW_RETRIEVE : wincvs.h
  • IDH_ID_VIEW_RETRIEVEAS : wincvs.h
  • IDH_ID_VIEW_RMV : wincvs.h
  • IDH_ID_VIEW_ROWDETAILS : wincvs.h
  • IDH_ID_VIEW_SELNONSIG : wincvs.h
  • IDH_ID_VIEW_SMALLICONS : wincvs.h
  • IDH_ID_VIEW_STATUS : wincvs.h
  • IDH_ID_VIEW_TAG : wincvs.h
  • IDH_ID_VIEW_TAGBRANCH : wincvs.h
  • IDH_ID_VIEW_TAGDELETE : wincvs.h
  • IDH_ID_VIEW_TAGNEW : wincvs.h
  • IDH_ID_VIEW_TAGS_BAR : wincvs.h
  • IDH_ID_VIEW_TRASH : wincvs.h
  • IDH_ID_VIEW_UNEDIT : wincvs.h
  • IDH_ID_VIEW_UNKNOWN : wincvs.h
  • IDH_ID_VIEW_UNLOCKF : wincvs.h
  • IDH_ID_VIEW_UPDATE : wincvs.h
  • IDH_ID_VIEW_UPONE : wincvs.h
  • IDH_ID_VIEW_WATCHERS : wincvs.h
  • IDH_ID_VIEW_WATCHOFF : wincvs.h
  • IDH_ID_VIEW_WATCHON : wincvs.h
  • IDH_ID_VIEW_WORKSPACE : wincvs.h
  • IDH_ID_VIEWW_INIT : wincvs.h
  • IDH_IDC_ACTION : wincvs.h
  • IDH_IDC_ACTION_DESC : wincvs.h
  • IDH_IDC_ADD : wincvs.h
  • IDH_IDC_ADD_DEFAULT : wincvs.h
  • IDH_IDC_ADD_SELECTION : wincvs.h
  • IDH_IDC_ALERT_MESSAGE : wincvs.h
  • IDH_IDC_ALLCMDS : wincvs.h
  • IDH_IDC_ALTERNATE_CVS : wincvs.h
  • IDH_IDC_ALTERNATE_SETTINGS : wincvs.h
  • IDH_IDC_ALWAYSROOT : wincvs.h
  • IDH_IDC_APPLY : wincvs.h
  • IDH_IDC_ATTIC : wincvs.h
  • IDH_IDC_AUTO_LOGOUT : wincvs.h
  • IDH_IDC_AUTO_LOGOUT_TIME : wincvs.h
  • IDH_IDC_AUTO_REFRESH : wincvs.h
  • IDH_IDC_BAR_TREE : wincvs.h
  • IDH_IDC_BRANCHID : wincvs.h
  • IDH_IDC_BRANCHPOINT_MERGE : wincvs.h
  • IDH_IDC_BROWSE_ALTERNATE_SETTINGS : wincvs.h
  • IDH_IDC_BROWSE_BRANCHID : wincvs.h
  • IDH_IDC_BROWSE_CVSROOT : wincvs.h
  • IDH_IDC_BROWSE_DIFFOPTIONS : wincvs.h
  • IDH_IDC_BROWSE_EXTERNAL_DIFF : wincvs.h
  • IDH_IDC_BROWSE_EXTERNAL_EDITOR : wincvs.h
  • IDH_IDC_BROWSE_FILENAME : wincvs.h
  • IDH_IDC_BROWSE_MODNAME : wincvs.h
  • IDH_IDC_BROWSE_PATH : wincvs.h
  • IDH_IDC_BROWSE_PYTHONDLL : wincvs.h
  • IDH_IDC_BROWSE_READ_FROM : wincvs.h
  • IDH_IDC_BROWSE_SELECTION : wincvs.h
  • IDH_IDC_BROWSE_TAG : wincvs.h
  • IDH_IDC_BROWSE_TAG1 : wincvs.h
  • IDH_IDC_BROWSE_TAG2 : wincvs.h
  • IDH_IDC_BROWSE_TCLDLL : wincvs.h
  • IDH_IDC_BULB : wincvs.h
  • IDH_IDC_CASE_SENSITIVE_NAMES : wincvs.h
  • IDH_IDC_CHECK_UNMODIFIED : wincvs.h
  • IDH_IDC_CHECK_VALID_EDITS : wincvs.h
  • IDH_IDC_CHECKOUT_DIR : wincvs.h
  • IDH_IDC_CHECKOUT_READ_ONLY : wincvs.h
  • IDH_IDC_CLEAR_KEYWORD : wincvs.h
  • IDH_IDC_COLOR_BRANCH : wincvs.h
  • IDH_IDC_COLOR_DEAD : wincvs.h
  • IDH_IDC_COLOR_HEADER : wincvs.h
  • IDH_IDC_COLOR_MERGE : wincvs.h
  • IDH_IDC_COLOR_NODE : wincvs.h
  • IDH_IDC_COLOR_SELECTION : wincvs.h
  • IDH_IDC_COLOR_SHADOW : wincvs.h
  • IDH_IDC_COLOR_STATE : wincvs.h
  • IDH_IDC_COLOR_TAG : wincvs.h
  • IDH_IDC_COMPARE_TYPE : wincvs.h
  • IDH_IDC_COMPRESSION : wincvs.h
  • IDH_IDC_CONFLICT_DESC : wincvs.h
  • IDH_IDC_CONSOLE : wincvs.h
  • IDH_IDC_CONTROL_ADDED_FILES : wincvs.h
  • IDH_IDC_COPY_SETTINGS : wincvs.h
  • IDH_IDC_COPY_SETTINGS_NAME : wincvs.h
  • IDH_IDC_CREATE_MISSING_DIR : wincvs.h
  • IDH_IDC_CREATE_SANDBOX : wincvs.h
  • IDH_IDC_CTRL_PRESSED_ON_OK : wincvs.h
  • IDH_IDC_CURRENT_DIFF_OPTIONS : wincvs.h
  • IDH_IDC_CVSGUISFURL : wincvs.h
  • IDH_IDC_CVSROOT : wincvs.h
  • IDH_IDC_DATE : wincvs.h
  • IDH_IDC_DATE1 : wincvs.h
  • IDH_IDC_DATE2 : wincvs.h
  • IDH_IDC_DEFAULT_BRANCH : wincvs.h
  • IDH_IDC_DEFAULT_CVSIGNORE : wincvs.h
  • IDH_IDC_DELETE_ALL_FILES : wincvs.h
  • IDH_IDC_DELETE_CVS_INFO : wincvs.h
  • IDH_IDC_DELETE_DIRECTORY : wincvs.h
  • IDH_IDC_DIFF : wincvs.h
  • IDH_IDC_DIFF_OPTION_DESCRIPTION : wincvs.h
  • IDH_IDC_DIFF_OPTION_LIST : wincvs.h
  • IDH_IDC_DIFFOPTIONS : wincvs.h
  • IDH_IDC_DONT_SHORTEN_PATHS : wincvs.h
  • IDH_IDC_DOWN : wincvs.h
  • IDH_IDC_EDIT_KEYWORD : wincvs.h
  • IDH_IDC_ENCRYPTION : wincvs.h
  • IDH_IDC_ENTRIES_LIST : wincvs.h
  • IDH_IDC_ENTRY : wincvs.h
  • IDH_IDC_ENTRY_EDIT : wincvs.h
  • IDH_IDC_ENTRYSTATE_FORCE_BINARY : wincvs.h
  • IDH_IDC_ENTRYSTATE_FORCE_TEXT : wincvs.h
  • IDH_IDC_ENTRYSTATE_FORCE_UNICODE : wincvs.h
  • IDH_IDC_ENTRYSTATE_IGNORE : wincvs.h
  • IDH_IDC_ENTRYSTATE_NO_CHANGE : wincvs.h
  • IDH_IDC_ENTRYSTATE_NO_EXPANSION : wincvs.h
  • IDH_IDC_EXPORT : wincvs.h
  • IDH_IDC_EXTERNAL_DIFF : wincvs.h
  • IDH_IDC_EXTERNAL_EDITOR : wincvs.h
  • IDH_IDC_FILENAME : wincvs.h
  • IDH_IDC_FILEPATH : wincvs.h
  • IDH_IDC_FILES_MODIFICATION_TIME : wincvs.h
  • IDH_IDC_FILETODIFF : wincvs.h
  • IDH_IDC_FILTER : wincvs.h
  • IDH_IDC_FILTER_CONTENTS : wincvs.h
  • IDH_IDC_FORCE_COMMIT : wincvs.h
  • IDH_IDC_FORCE_CVSROOT : wincvs.h
  • IDH_IDC_FORCE_HEAD_REV : wincvs.h
  • IDH_IDC_FORCE_KEY_CTRL : wincvs.h
  • IDH_IDC_FORCE_KEY_SHIFT : wincvs.h
  • IDH_IDC_FORCE_RECURSE : wincvs.h
  • IDH_IDC_FORCE_REVISION : wincvs.h
  • IDH_IDC_GET_CLEAN_COPY : wincvs.h
  • IDH_IDC_GROUP_OPTIONS : wincvs.h
  • IDH_IDC_GRPBOX_TEXT : wincvs.h
  • IDH_IDC_HAS_ALTERNATE_CVS : wincvs.h
  • IDH_IDC_HAS_ALTERNATE_SETTINGS : wincvs.h
  • IDH_IDC_HAS_BRANCHID : wincvs.h
  • IDH_IDC_HAS_COMPRESSION : wincvs.h
  • IDH_IDC_HAS_DATE : wincvs.h
  • IDH_IDC_HAS_DATE1 : wincvs.h
  • IDH_IDC_HAS_DATE2 : wincvs.h
  • IDH_IDC_HAS_EXTERNAL_DIFF : wincvs.h
  • IDH_IDC_HAS_PATH : wincvs.h
  • IDH_IDC_HAS_REV : wincvs.h
  • IDH_IDC_HAS_STATES : wincvs.h
  • IDH_IDC_HAS_USERS : wincvs.h
  • IDH_IDC_HEADERS : wincvs.h
  • IDH_IDC_HEADERS_DESC : wincvs.h
  • IDH_IDC_HELP_INIT : wincvs.h
  • IDH_IDC_HELPLOGIN : wincvs.h
  • IDH_IDC_HOME : wincvs.h
  • IDH_IDC_ICON_STATIC : wincvs.h
  • IDH_IDC_IGNORECASE : wincvs.h
  • IDH_IDC_IGNOREWHITESPACE : wincvs.h
  • IDH_IDC_IMPORT_FILTER : wincvs.h
  • IDH_IDC_ISDATE : wincvs.h
  • IDH_IDC_ISDATE1 : wincvs.h
  • IDH_IDC_ISDATE2 : wincvs.h
  • IDH_IDC_ITEM : wincvs.h
  • IDH_IDC_ITEM_LABEL : wincvs.h
  • IDH_IDC_ITEM_LIST : wincvs.h
  • IDH_IDC_ITEM_LIST_OPTION : wincvs.h
  • IDH_IDC_KEYWORD_DESC : wincvs.h
  • IDH_IDC_KEYWORD_DESCRIPTION : wincvs.h
  • IDH_IDC_KEYWORD_OPT : wincvs.h
  • IDH_IDC_KEYWORD_VALUE : wincvs.h
  • IDH_IDC_KEYWORDLIST : wincvs.h
  • IDH_IDC_KEYWORDLIST_DESC : wincvs.h
  • IDH_IDC_LAST_CHECKIN_TIME : wincvs.h
  • IDH_IDC_MATCH_ENTRIES_CASE : wincvs.h
  • IDH_IDC_MENULIST : wincvs.h
  • IDH_IDC_MERGE_TYPE : wincvs.h
  • IDH_IDC_MESSAGE_DETAILS : wincvs.h
  • IDH_IDC_MODNAME : wincvs.h
  • IDH_IDC_MODULEDESC_TEXT : wincvs.h
  • IDH_IDC_MOVDEL_BRANCH : wincvs.h
  • IDH_IDC_MULTILINE_ACTION : wincvs.h
  • IDH_IDC_MULTILINE_ENTRY : wincvs.h
  • IDH_IDC_MULTILINE_ENTRY_STATIC : wincvs.h
  • IDH_IDC_MULTILINE_ENTRY_WRAP : wincvs.h
  • IDH_IDC_MULTILINE_GO_ACTION : wincvs.h
  • IDH_IDC_MULTILINE_POSITION : wincvs.h
  • IDH_IDC_MULTILINE_PREV_ENTRY : wincvs.h
  • IDH_IDC_MULTILINE_TYPE : wincvs.h
  • IDH_IDC_MULTILINE_WORDWRAP : wincvs.h
  • IDH_IDC_NEXTTIP : wincvs.h
  • IDH_IDC_NO_MODULE_PROGRAM : wincvs.h
  • IDH_IDC_NO_SPLASH_SCREEN : wincvs.h
  • IDH_IDC_NO_VENDOR_RELEASE_TAGS : wincvs.h
  • IDH_IDC_NORECURS : wincvs.h
  • IDH_IDC_NOTAGS : wincvs.h
  • IDH_IDC_OPTIONCHECK_BUTTON : wincvs.h
  • IDH_IDC_OTHER_BUTTON : wincvs.h
  • IDH_IDC_OUTPUT_QUICK : wincvs.h
  • IDH_IDC_OUTPUT_STANDARD : wincvs.h
  • IDH_IDC_OUTPUT_VERBOSE : wincvs.h
  • IDH_IDC_OVERRIDE_CHECKOUT_DIR : wincvs.h
  • IDH_IDC_OVERWRITE : wincvs.h
  • IDH_IDC_OVERWRITE_RELEASE_TAGS : wincvs.h
  • IDH_IDC_PASSWORD : wincvs.h
  • IDH_IDC_PATH : wincvs.h
  • IDH_IDC_PREVIEW_CVSROOT : wincvs.h
  • IDH_IDC_PREVIEWINFO : wincvs.h
  • IDH_IDC_PROGRESS : wincvs.h
  • IDH_IDC_PROGRESS_TEXT : wincvs.h
  • IDH_IDC_PROMPTEDIT : wincvs.h
  • IDH_IDC_PROTOCOL : wincvs.h
  • IDH_IDC_PROTOCOL_DESC : wincvs.h
  • IDH_IDC_PROTOCOL_KEYWORD : wincvs.h
  • IDH_IDC_PRUNE_EMPTY_DIR : wincvs.h
  • IDH_IDC_PYTHON_URL : wincvs.h
  • IDH_IDC_PYTHONDLL : wincvs.h
  • IDH_IDC_QUIET : wincvs.h
  • IDH_IDC_RANGE_DATE : wincvs.h
  • IDH_IDC_RANGE_REV_TAG : wincvs.h
  • IDH_IDC_RCS_FILENAMES_ONLY : wincvs.h
  • IDH_IDC_REACTION_SPEED : wincvs.h
  • IDH_IDC_REACTION_SPEED_SECONDS : wincvs.h
  • IDH_IDC_REACTION_SPEED_SPIN : wincvs.h
  • IDH_IDC_READ_FROM : wincvs.h
  • IDH_IDC_REFRESH_ITEMS : wincvs.h
  • IDH_IDC_RELEASE_TAG : wincvs.h
  • IDH_IDC_REMIND : wincvs.h
  • IDH_IDC_REMOVE : wincvs.h
  • IDH_IDC_REPOSITORY_PATH : wincvs.h
  • IDH_IDC_RESET_COLORS : wincvs.h
  • IDH_IDC_RESET_STICKY : wincvs.h
  • IDH_IDC_REV_TAG : wincvs.h
  • IDH_IDC_REV_TAG1 : wincvs.h
  • IDH_IDC_REV_TAG2 : wincvs.h
  • IDH_IDC_REV_TAG_DATE : wincvs.h
  • IDH_IDC_REVISION : wincvs.h
  • IDH_IDC_REVISION_SPIN : wincvs.h
  • IDH_IDC_RGB_BRANCH : wincvs.h
  • IDH_IDC_RGB_DEAD : wincvs.h
  • IDH_IDC_RGB_HEADER : wincvs.h
  • IDH_IDC_RGB_MERGE : wincvs.h
  • IDH_IDC_RGB_NODE : wincvs.h
  • IDH_IDC_RGB_SELECTION : wincvs.h
  • IDH_IDC_RGB_SHADOW : wincvs.h
  • IDH_IDC_RGB_STATE : wincvs.h
  • IDH_IDC_RGB_TAG : wincvs.h
  • IDH_IDC_SAME_ACTION_NEXT_TIME : wincvs.h
  • IDH_IDC_SELECTION : wincvs.h
  • IDH_IDC_SELECTION_LIST : wincvs.h
  • IDH_IDC_SETTINGS_NAME : wincvs.h
  • IDH_IDC_SHOW_CVS_METHOD : wincvs.h
  • IDH_IDC_SKIP_ANNOTATE : wincvs.h
  • IDH_IDC_SKIP_DIFF : wincvs.h
  • IDH_IDC_SKIP_FILEACTION : wincvs.h
  • IDH_IDC_SKIP_GRAPH : wincvs.h
  • IDH_IDC_SKIP_LOG : wincvs.h
  • IDH_IDC_SKIP_STATUS : wincvs.h
  • IDH_IDC_SKIP_UPDATE : wincvs.h
  • IDH_IDC_SPIN_AUTO_LOGOUT_TIME : wincvs.h
  • IDH_IDC_SPIN_COMPRESSION : wincvs.h
  • IDH_IDC_STARTUP : wincvs.h
  • IDH_IDC_STATES : wincvs.h
  • IDH_IDC_STATIC_CURRENTOPTIONS : wincvs.h
  • IDH_IDC_STATIC_OPTDESC : wincvs.h
  • IDH_IDC_STATICGROUP_SELECTOPTIONS : wincvs.h
  • IDH_IDC_STDOUT : wincvs.h
  • IDH_IDC_SUPRESS_HEADER : wincvs.h
  • IDH_IDC_TAGDESC_TEXT : wincvs.h
  • IDH_IDC_TAGNAME : wincvs.h
  • IDH_IDC_TCLDLL : wincvs.h
  • IDH_IDC_TEMPFILE : wincvs.h
  • IDH_IDC_TEMPLATE_LIST : wincvs.h
  • IDH_IDC_TEMPLATE_PREVIEW : wincvs.h
  • IDH_IDC_THREE_WAY_CONFLICTS : wincvs.h
  • IDH_IDC_TIPSTRING : wincvs.h
  • IDH_IDC_UNIFIEDDIFF : wincvs.h
  • IDH_IDC_UNIX_LF : wincvs.h
  • IDH_IDC_UP : wincvs.h
  • IDH_IDC_USE_EXTERNAL_DIFF : wincvs.h
  • IDH_IDC_USERS : wincvs.h
  • IDH_IDC_VENDOR_TAG : wincvs.h
  • IDH_IDC_WARNING_DESC : wincvs.h
  • IDH_IDC_WINCVSURL : wincvs.h
  • IDH_IDC_WINCVSVER : wincvs.h
  • IDH_IDD_ABOUTBOX : wincvs.h
  • IDH_IDD_ADMINOPTION : wincvs.h
  • IDH_IDD_ALERT : wincvs.h
  • IDH_IDD_ANNOTATE_MAIN : wincvs.h
  • IDH_IDD_CHECKOUT_MAIN : wincvs.h
  • IDH_IDD_CMDLINE_MAIN : wincvs.h
  • IDH_IDD_COMMIT_MAIN : wincvs.h
  • IDH_IDD_COMMIT_OPTIONS : wincvs.h
  • IDH_IDD_CUSTOMIZE : wincvs.h
  • IDH_IDD_CVSROOT : wincvs.h
  • IDH_IDD_CVSTEMPLATE : wincvs.h
  • IDH_IDD_DIFF_MAIN : wincvs.h
  • IDH_IDD_DIFF_OPTIONS : wincvs.h
  • IDH_IDD_EDITKEYWORD : wincvs.h
  • IDH_IDD_EDITMESSAGE : wincvs.h
  • IDH_IDD_EDITORMON : wincvs.h
  • IDH_IDD_ENTRYDESC : wincvs.h
  • IDH_IDD_FILTER_SELECTION : wincvs.h
  • IDH_IDD_FILTERBAR_OPTIONS : wincvs.h
  • IDH_IDD_GRAPH_OPTIONS : wincvs.h
  • IDH_IDD_IMPORT_MAIN : wincvs.h
  • IDH_IDD_IMPORT_OPTIONS : wincvs.h
  • IDH_IDD_IMPORTFILTER : wincvs.h
  • IDH_IDD_INIT_MAIN : wincvs.h
  • IDH_IDD_ITEM_LIST : wincvs.h
  • IDH_IDD_LOG_FILTERS : wincvs.h
  • IDH_IDD_LOG_MAIN : wincvs.h
  • IDH_IDD_LOGIN_MAIN : wincvs.h
  • IDH_IDD_MULTILINE_ENTRY : wincvs.h
  • IDH_IDD_NOPYTHON : wincvs.h
  • IDH_IDD_OPEN_MAIN : wincvs.h
  • IDH_IDD_PASSWRD : wincvs.h
  • IDH_IDD_PREFS_CVS : wincvs.h
  • IDH_IDD_PREFS_CVSCMD_DIALOGS : wincvs.h
  • IDH_IDD_PREFS_GLOBALS : wincvs.h
  • IDH_IDD_PREFS_WINCVS : wincvs.h
  • IDH_IDD_PROGRESS : wincvs.h
  • IDH_IDD_RELEASE_MAIN : wincvs.h
  • IDH_IDD_RTAG_MAIN : wincvs.h
  • IDH_IDD_RTAG_OPTIONS : wincvs.h
  • IDH_IDD_SAVESETTINGS : wincvs.h
  • IDH_IDD_SELECTION_DETAILS : wincvs.h
  • IDH_IDD_STATUS_MAIN : wincvs.h
  • IDH_IDD_TAG_MAIN : wincvs.h
  • IDH_IDD_TIP : wincvs.h
  • IDH_IDD_UPDATE_MAIN : wincvs.h
  • IDH_IDD_UPDATE_MERGE : wincvs.h
  • IDH_IDD_UPDATE_OPTIONS : wincvs.h
  • IDH_IDD_WARNINGDESC : wincvs.h
  • IDH_IDP_FAILED_TO_CREATE : wincvs.h
  • IDH_IDP_OLE_INIT_FAILED : wincvs.h
  • IDH_IDP_SOCKETS_INIT_FAILED : wincvs.h
  • IDH_IDR_BROWSER : wincvs.h
  • IDH_IDR_CNTR_INPLACE : wincvs.h
  • IDH_IDR_CUSTMENUS : wincvs.h
  • IDH_IDR_FILELIST : wincvs.h
  • IDH_IDR_FILTER : wincvs.h
  • IDH_IDR_GRAPH : wincvs.h
  • IDH_IDR_ITEMLIST : wincvs.h
  • IDH_IDR_MAINFRAME : wincvs.h
  • IDH_IDR_MULTIUSER : wincvs.h
  • IDH_IDR_STATEICONS : wincvs.h
  • IDH_IDR_TAGS : wincvs.h
  • IDH_IDR_WINCVSTYPE : wincvs.h
  • IDH_IDR_WORKSPACE : wincvs.h
  • IDI_MB_EXCLAMATION : resource.h
  • IDI_MB_INFORMATION : resource.h
  • IDI_MB_QUESTION : resource.h
  • IDI_MB_STOP : resource.h
  • IDM_CBAR_MENU : CJResource.h
  • IDP_FAILED_TO_CREATE : resource.h
  • IDP_OLE_INIT_FAILED : resource.h
  • IDP_SOCKETS_INIT_FAILED : resource.h
  • IDR_BROWSER : resource.h
  • IDR_CBAR_POPUP : CJResource.h
  • IDR_CNTR_INPLACE : resource.h
  • IDR_CUSTMENUS : resource.h
  • IDR_FILELIST : resource.h
  • IDR_FILTER : resource.h
  • IDR_GFXOUTBAR : CJResource.h
  • IDR_GRAPH : resource.h
  • IDR_ITEMLIST : resource.h
  • IDR_MAINFRAME : resource.h
  • IDR_MULTIUSER : resource.h
  • IDR_POPUP_HEX_EDIT : CJResource.h
  • IDR_POPUP_TOOLBAR : CJResource.h
  • IDR_STATEICONS : resource.h
  • IDR_TAGS : resource.h
  • IDR_WINCVSTYPE : resource.h
  • IDR_WORKSPACE : resource.h
  • IDS_COLOR_AUTO : CJResource.h
  • IDS_COLOR_CUST : CJResource.h
  • IDS_COMBOBROWSER : resource.h
  • IDS_CONTRACT : CJResource.h
  • IDS_DEFFONT : resource.h
  • IDS_ENTRY : CJResource.h
  • IDS_EXPAND : CJResource.h
  • IDS_HIDE : CJResource.h
  • IDS_INVALID_VER : CJResource.h
  • IDS_MODIFIED : CJResource.h
  • IDS_NAME : CJResource.h
  • IDS_REGKEY : CJResource.h
  • IDS_REMOVEITEM : CJResource.h
  • IDS_RENAMEITEM : CJResource.h
  • IDS_SECTION : CJResource.h
  • IDS_SETTINGS : CJResource.h
  • IDS_SIZE : CJResource.h
  • IDS_TBAR_SETTINGS : CJResource.h
  • IDS_TYPE : CJResource.h
  • IDS_WIN_PLACEMENT : CJResource.h
  • IDS_WNDPOS : CJResource.h
  • ign_add() : CvsIgnore.cpp
  • IID_ITest : GraphDoc.cpp
  • IID_IWincvs : wincvsDoc.cpp
  • IMPLEMENT_DYNAMIC() : wincvs.cpp, Subclass.cpp
  • importlib() : wincvs.odl
  • InBetweenVSide() : UPseudoSupport.cpp
  • indicators : CvsStatusBar.cpp
  • InflateRect() : udraw.h, udraw.cpp
  • Inherited : UPseudoSupport.cpp
  • initialize_all() : dll_glue.c
  • InitializeInterp() : PythonGlue.cpp
  • InsertLastCvsroot() : CvsPrefs.h, CvsPrefs.cpp
  • InsertLastModuleName() : CvsPrefs.h, CvsPrefs.cpp
  • InsertMenu : CJMenu.h
  • InsertODMenu : CJMenu.h
  • INTERNAL_AUTHEN : Persistent.h
  • IntersectRect() : udraw.h, udraw.cpp
  • INVALID_Color : CJColorPopup.cpp
  • INVALID_SEQUENCE : CTCP2Parse.cpp
  • INVTAB : CustomizeMenus.cpp
  • IS_PSEUDO_CTL : PseudoDlg.cpp
  • IsAppEnabled() : MainFrm.cpp, UCvsApp.h, UCvsApp.cpp
  • IsCvsDirectory() : CheckoutDlg.cpp
  • IsDST() : Stat.cpp
  • IsHideCommandKeyPressed() : wincvs_winutil.h, wincvs_winutil.cpp
  • IsInInvertList() : CustomizeMenus.cpp
  • IsKeyMovingFocus() : LogFrm.cpp
  • IsLargeFonts() : wincvs_winutil.h, wincvs_winutil.cpp
  • IsLeapYear() : Stat.cpp
  • isn : CTCP2Parse.cpp
  • ISO8559 : CvsPrefs.h
  • ISO8559_1 : CvsPrefs.h
  • ISO8559_10 : CvsPrefs.h
  • ISO8559_1_MacCvsPro : CvsPrefs.h
  • ISO8559_2 : CvsPrefs.h
  • ISO8559_3 : CvsPrefs.h
  • ISO8559_4 : CvsPrefs.h
  • ISO8559_5 : CvsPrefs.h
  • ISO8559_6 : CvsPrefs.h
  • ISO8559_7 : CvsPrefs.h
  • ISO8559_8 : CvsPrefs.h
  • ISO8559_9 : CvsPrefs.h
  • ISO8559_none : CvsPrefs.h
  • IsRectEmpty() : udraw.cpp
  • IsShellType() : CJMenu.cpp
  • IsTargetWindow() : wincvs_winutil.cpp
  • IsValidHandle() : wincvs.cpp
  • ItemDescription : ItemListDlg.h
  • ItemList : ItemListDlg.h

- k -

  • kActionBrowseModule : MultilineEntryDlg.h
  • kActionBrowseTag : MultilineEntryDlg.h
  • kActionFormatCvsRoot : MultilineEntryDlg.h
  • kActionOpenEditor : MultilineEntryDlg.h
  • kActionOpenTemplate : MultilineEntryDlg.h
  • kActionType : MultilineEntryDlg.h
  • kAddBinary : CvsCommands.h
  • kAddCmdType : CvsCommands.h
  • kAddNormal : CvsCommands.h
  • kAddSettings : Persistent.h
  • kAddUnicode : CvsCommands.h
  • kAdminOptionDlgType : AdminOptionDlg.h
  • kAnnotateCmdType : CvsCommands.h
  • kAnnotateFile : CvsCommands.h
  • kAnnotateGraph : CvsCommands.h
  • kAutoRefreshAlways : ItemListDlg.h
  • kAutoRefreshDisable : ItemListDlg.h
  • kAutoRefreshFirstTime : ItemListDlg.h
  • kBinIsText : TextBinary.h
  • kBinIsUnicode : TextBinary.h
  • kBinWrongSig : TextBinary.h
  • kBlue : AppConsole.h
  • kBold : AppConsole.h
  • kBrown : AppConsole.h
  • kChangeLog : AdminOptionDlg.h
  • kClassPersistent : Persistent.h
  • kCompareAnotherRev : DiffDlg.h
  • kCompareSameRev : DiffDlg.h
  • kCompareTwoRev : DiffDlg.h
  • kConsoleColor : AppConsole.h
  • kContinueTraversal : FileTraversal.h
  • kCustomBrowserMenu : wincvs_winutil.h
  • kCustomFilesMenu : wincvs_winutil.h
  • kCvsAlertButtonType : CvsAlert.h
  • kCvsAlertCancelButton : CvsAlert.h
  • kCvsAlertIconType : CvsAlert.h
  • kCvsAlertNoIcon : CvsAlert.h
  • kCvsAlertNoteIcon : CvsAlert.h
  • kCvsAlertOKButton : CvsAlert.h
  • kCvsAlertOtherButton : CvsAlert.h
  • kCvsAlertQuestionIcon : CvsAlert.h
  • kCvsAlertStopIcon : CvsAlert.h
  • kCvsAlertWarningIcon : CvsAlert.h
  • kCvsRootDisplayData : CvsRootDlg.h
  • kCvsRootDisplayInfo : CvsRootDlg.h
  • kCvsRootDisplayType : CvsRootDlg.h
  • kCvsRootDisplayWait : CvsRootDlg.h
  • kDiffCmdType : CvsCommands.h
  • kDiffFile : CvsCommands.h
  • kDiffFolder : CvsCommands.h
  • kDiffGraph : CvsCommands.h
  • kEditCmdType : CvsCommands.h
  • kEditForce : CvsCommands.h
  • kEditNormal : CvsCommands.h
  • kEditReserved : CvsCommands.h
  • KEYWORD_MODE_COUNT : KeywordComboBox.cpp
  • KeywordDisplayInfoList : CvsRootDlg.h
  • KeywordList : CvsRootDlg.h
  • kFileIconAdded : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconBinary : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconBinaryAdded : BrowseFileView.h
  • kFileIconBinaryMod : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconConflict : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconIgnored : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconMiss : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconRemoved : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconText : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconTextMod : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconUnicode : BrowseFileView.h
  • kFileIconUnicodeAdded : BrowseFileView.h
  • kFileIconUnicodeMod : BrowseFileView.h
  • kFileIconUnknown : BrowseFileView.h, UCvsFiles.cpp
  • kFileInvalidName : TextBinary.h
  • kFileIsAlias : TextBinary.h
  • kFileIsOK : TextBinary.h
  • kFileMissing : TextBinary.h
  • kFilesSelectionType : PromptFiles.h
  • kFileType : TextBinary.h
  • kFileTypeBin : TextBinary.h
  • kFileTypeText : TextBinary.h
  • kFileTypeUnicode : TextBinary.h
  • kFilterAdded : BrowseViewModel.h
  • kFilterChanged : BrowseViewModel.h
  • kFilterConflicts : BrowseViewModel.h
  • kFilterHideMissing : BrowseViewModel.h
  • kFilterHideUnknown : BrowseViewModel.h
  • kFilterMissing : BrowseViewModel.h
  • kFilterModified : BrowseViewModel.h
  • kFilterNone : BrowseViewModel.h
  • kFilterRemoved : BrowseViewModel.h
  • kFilterUnknown : BrowseViewModel.h
  • kFolderIcon : BrowseFileView.h, UCvsFiles.cpp
  • kFolderIconIgnored : BrowseFileView.h, UCvsFiles.cpp
  • kFolderIconMiss : BrowseFileView.h, UCvsFiles.cpp
  • kFolderIconUnknown : BrowseFileView.h, UCvsFiles.cpp
  • kGreen : AppConsole.h
  • kHChildSpace : GraphView.cpp, UCvsGraph.cpp
  • kHierarchicalMax : UPseudoSupport.cpp
  • kHierarchicalMin : UPseudoSupport.cpp
  • kIconFolderClosed : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderCVSClosed : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderCVSOpened : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderIgnoreClosed : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderIgnoreLost : UCvsFolders.cpp
  • kIconFolderIgnoreOpened : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderLost : WinCvsBrowser.cpp
  • kIconFolderOpened : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kInflateNodeSpace : GraphView.cpp, UCvsGraph.cpp
  • kInfoCmd : CvsRootDlg.h
  • kInfoCmdType : CvsRootDlg.h
  • kItalic : AppConsole.h
  • kItemDisplayData : ItemListDlg.h
  • kItemDisplayInfo : ItemListDlg.h
  • kItemDisplayType : ItemListDlg.h
  • kItemDisplayWait : ItemListDlg.h
  • kItemListAutoRefreshType : ItemListDlg.h
  • kItemListDlg : ItemListDlg.h
  • kItemListModule : ItemListDlg.h
  • kItemListTag : ItemListDlg.h
  • kLaunchDefault : LaunchHandlers.h
  • kLaunchDefaultEdit : LaunchHandlers.h
  • kLaunchEdit : LaunchHandlers.h
  • kLaunchEnd : LaunchHandlers.h
  • kLaunchOpen : LaunchHandlers.h
  • kLaunchOpenAs : LaunchHandlers.h
  • kLaunchType : LaunchHandlers.h
  • kLocationIcon : HistComboBoxEx.h
  • kLocationIconErased : HistComboBoxEx.h
  • kLocationIconIgnored : HistComboBoxEx.h
  • kLocationIconMissing : HistComboBoxEx.h
  • kLocationIconUnknown : HistComboBoxEx.h
  • kMagenta : AppConsole.h
  • kMaxChar : ustr.cpp
  • kMultilineCmdLine : MultilineEntryDlg.h
  • kMultilineDescription : MultilineEntryDlg.h
  • kMultilineEntryType : MultilineEntryDlg.h
  • kMultilineLogMessage : MultilineEntryDlg.h
  • kMultilineState : MultilineEntryDlg.h
  • kNL : AppConsole.h
  • kNoClass : Persistent.h
  • kNodeShape : GraphView.h
  • kNormal : AppConsole.h
  • KoBranchTagHandler : BrowseViewHandlers.h
  • KoCreateTagHandler : BrowseViewHandlers.h
  • kOctangle : GraphView.h
  • KoDeleteTagHandler : BrowseViewHandlers.h
  • KoEditHandler : BrowseViewHandlers.h
  • KoForceEditHandler : BrowseViewHandlers.h
  • KoLaunchDefaultEditHandler : BrowseViewHandlers.h
  • KoLaunchDefaultHandler : BrowseViewHandlers.h
  • KoLaunchEditHandler : BrowseViewHandlers.h
  • KoLaunchOpenAsHandler : BrowseViewHandlers.h
  • KoLaunchOpenHandler : BrowseViewHandlers.h
  • KoReservedEditHandler : BrowseViewHandlers.h
  • KoRtagBranchHandler : BrowseViewHandlers.h
  • KoRtagCreateHandler : BrowseViewHandlers.h
  • KoRtagDeleteHandler : BrowseViewHandlers.h
  • kPathDelimiter : ustr.h
  • kProgressBar : ProgressDlg.h
  • kProgressFile : ProgressDlg.h
  • kProgressText : ProgressDlg.h
  • kProgressType : ProgressDlg.h
  • kProtocolCmd : CvsRootDlg.h
  • kRectangle : GraphView.h
  • kRed : AppConsole.h
  • kReleaseDelAll : ReleaseDlg.h
  • kReleaseDelCvsInfo : ReleaseDlg.h
  • kReleaseDelDir : ReleaseDlg.h
  • kReleaseDelType : ReleaseDlg.h
  • kReleaseNoDel : ReleaseDlg.h
  • kRoundRect : GraphView.h
  • kSelDetFile : SelectionDetailsDlg.h
  • kSelDetPath : SelectionDetailsDlg.h
  • kSelDetRevision : SelectionDetailsDlg.h
  • kSelDetType : SelectionDetailsDlg.h
  • kSelDir : BrowseViewHandlers.h
  • kSelectAny : PromptFiles.h
  • kSelectDll : PromptFiles.h
  • kSelectExecutable : PromptFiles.h
  • kSelFiles : BrowseViewHandlers.h
  • kSelNone : BrowseViewHandlers.h
  • kSelType : BrowseViewHandlers.h
  • kSetDescription : AdminOptionDlg.h
  • kSetState : AdminOptionDlg.h
  • kShellActionDefault : LaunchHandlers.cpp
  • kShellActionEdit : LaunchHandlers.cpp
  • kShellActionExplore : LaunchHandlers.cpp
  • kShellActionOpen : LaunchHandlers.cpp
  • kShellActionOpenAs : LaunchHandlers.cpp
  • kShellActionProperties : LaunchHandlers.cpp
  • kShellActionType : LaunchHandlers.cpp
  • kSkipFile : FileTraversal.h
  • kSpc : BrowseFileView.cpp
  • kStatusCVSROOT : CvsStatusBar.h
  • kStatusMain : CvsStatusBar.h
  • kStatusPaneId : CvsStatusBar.h
  • kStatusRepository : CvsStatusBar.h
  • kStatusThrobber : CvsStatusBar.h
  • kStopTraversal : FileTraversal.h
  • kTagBranch : CvsCommands.h
  • kTagCmdType : CvsCommands.h
  • kTagCreate : CvsCommands.h
  • kTagDelete : CvsCommands.h
  • kTCLPathDelimiter : TclGlue.h
  • kTclRes : TclGlue.h
  • kTContinue : GraphView.h
  • kTextBinTYPE : TextBinary.h
  • kTextEscapeChar : TextBinary.h
  • kTextIsBinary : TextBinary.h
  • kTextIsUnicode : TextBinary.h
  • kTextWrongLF : TextBinary.h
  • kTextWrongSig : TextBinary.h
  • kTGetDown : GraphView.h
  • kTGraph : GraphView.h
  • kTraversal : FileTraversal.h
  • kTraversalError : FileTraversal.h
  • kTStop : GraphView.h
  • kUCvsBrowseToolbarID : UCvsCommands.h
  • kUCvsFilesID : UCvsCommands.h
  • kUCvsFilterToolbarID : UCvsCommands.h
  • kUCvsFoldersID : UCvsCommands.h
  • kUCvsFrameID : UCvsCommands.h
  • kUCvsMenubarID : UCvsCommands.h
  • kUCvsStatusbarID : UCvsCommands.h
  • kUCvsToolbarID : UCvsCommands.h
  • kUMainConsoleID : UCvsCommands.h
  • kUMainWidget : uwidget.h
  • kUnderline : AppConsole.h
  • kUnicodeIsBinary : TextBinary.h
  • kUnicodeIsText : TextBinary.h
  • kVChildSpace : GraphView.cpp, UCvsGraph.cpp
  • kWin16 : CvsPrefs.h
  • kWin32 : CvsPrefs.h
  • kWinNT35 : CvsPrefs.h
  • kWinNT4 : CvsPrefs.h
  • kWinVersion : CvsPrefs.h

- l -

  • last_nonopt : getopt.c
  • launchCVS() : AppGlue.h, AppGlue.cpp
  • LaunchCvsRootCommand() : CvsRootDlg.cpp
  • LaunchDefaultEditor() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchDiff() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchEditor() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchExplore() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchHandler() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchItemListCommand() : ItemListDlg.cpp
  • LaunchNewInst() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchProperties() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchViewer() : LaunchHandlers.h, LaunchHandlers.cpp
  • LayoutRowCol() : GfxSplitterWnd.cpp
  • lf : ImportFilter.cpp
  • list_add_type() : ImportFilter.cpp
  • list_add_warning() : ImportFilter.cpp
  • list_all_types_recur() : ImportFilter.h, ImportFilter.cpp
  • listAddCell() : dll_garbage.c
  • listFree() : dll_garbage.c
  • listNew() : dll_garbage.c
  • ListPath : ItemListDlg.h
  • LOAD_CODEFRAG : TclGlue.cpp, PythonGlue.cpp
  • LoadDIB() : dib.h, dib.c
  • LoadPersistentSettings() : Persistent.h, Persistent.cpp
  • LoadSettingsInternal() : Persistent.cpp
  • LocalSystemTimeToUtcSystemTime() : Stat.cpp
  • lstat : StdAfx.h
  • LString_to_UTF8() : MacMisc.h

- m -

  • m_rectActualFrameSize : CJDockContext.cpp
  • m_rectActualSize : CJDockContext.cpp
  • m_rectFrameBorders : CJDockContext.cpp
  • m_rectRequestedSize : CJDockContext.cpp
  • MA_CHECK : UPseudoSupport.cpp
  • MA_DEFINE_CLASS_M0() : UPseudoSupport.cpp
  • MA_DEFINE_CLASS_M1() : UPseudoSupport.cpp
  • MAC_APPSINGLE : CvsPrefs.h
  • MAC_HQX : CvsPrefs.h
  • MAC_PLAIN_BINARY : CvsPrefs.h
  • macapp_workaround_adlib_bug() : UPseudoSupport.h, UPseudoSupport.cpp
  • MACBINMAP_COOKIEVALUE : MacBinMaps.h
  • MACENCODING : CvsPrefs.h
  • MacGetPrefsFolder() : MacMisc.h
  • MacGetSpecialFolder() : MacMisc.h
  • MacGetTempFolder() : MacMisc.h
  • macpp_fecthview() : UPseudoSupport.h, UPseudoSupport.cpp
  • macpp_findwindow() : UPseudoSupport.cpp
  • macpp_getattachwindow() : UPseudoSupport.h, UPseudoSupport.cpp
  • macpp_getcmdid() : UPseudoSupport.cpp
  • macpp_linkbroadcasters() : UPseudoSupport.h, UPseudoSupport.cpp
  • macpp_preparetable() : UPseudoSupport.h, UPseudoSupport.cpp
  • MACROS_FOLDER : MacrosSetup.h
  • MacrosFlushAll() : MacrosSetup.cpp
  • MacrosGetLoc() : MacrosSetup.h, MacrosSetup.cpp
  • MacrosReloadAll() : MacrosSetup.h, MacrosSetup.cpp
  • MACSPEC : ImportFilter.cpp
  • main() : dll_glue.c
  • MakeOleVariant() : CJHtmlView.cpp
  • MakeTmpFile() : ustr.h, ustr.cpp
  • malloc : dll_garbage.h
  • MatchIgnoredList() : CvsIgnore.h, CvsIgnore.cpp
  • MAX : udraw.cpp
  • MAX_ARGS : ustr.h
  • MAX_BUFLEN : TipDlg.cpp
  • MAX_CHAR_BY_LINE : wincvsView.h
  • MAX_CMD_LEN : ustr.h
  • MAX_ColorS : CJColorPopup.cpp
  • MAX_DATE : CJDateTimeCtrl.cpp
  • MAX_MACBIN_DESC : MacBinMaps.h
  • MAX_MACBIN_EXTENSION : MacBinMaps.h
  • MAX_PATH : FileTraversal.h
  • MAX_PRINT_ARG : CvsArgs.cpp
  • MAX_TEST_SIZE : TextBinary.cpp
  • MAX_TIME_BUFFER_SIZE : CJDateTimeCtrl.cpp
  • MAX_UNLINK_RETRY : wincvs_winutil.cpp
  • MAXI_H_DISABLE : CJControlBar.h
  • MAXI_H_ENABLED : CJControlBar.h
  • MAXI_V_DISABLE : CJControlBar.h
  • MAXI_V_ENABLED : CJControlBar.h
  • MAXNAMLEN : ndir.h
  • MigrateCvsrootList() : CvsPrefs.h, CvsPrefs.cpp
  • MIN : udraw.cpp
  • MIN_CHUNK : getline.c
  • MIN_DATE : CJDateTimeCtrl.cpp
  • MIN_IDLE : uevent.cpp
  • MIRC_TRANSPARENT : CTCP2Parse.cpp
  • modelRecursive : BrowseViewColumn.cpp
  • modelRegular : BrowseViewColumn.cpp
  • ModifyODMenu : CJMenu.h
  • MODULE_SIZE : dll_garbage.c
  • month_len : Stat.cpp
  • month_names : Stat.cpp
  • my_index : getopt.c
  • mystrdup() : CvsArgs.cpp
  • myTcl_CreateInterp() : TclGlue.cpp

- n -

  • nameColumn : BrowseViewColumn.cpp
  • NAMESPACE : UCvsFiles.cpp, MultiString.h, CvsEntries.cpp
  • NCOLORSHADES : CJControlBar.cpp
  • NEW : TclGlue.cpp, PythonGlue.cpp, Persistent.cpp, ImportFilter.cpp, CvsEntries.cpp, uwidget.cpp, utoolbar.cpp, UPseudoSupport.cpp
  • nextchar : getopt.c
  • nextLine() : PseudoButton.cpp
  • NM_FOLDERCHANGE : GfxOutBarCtrl.h
  • NM_OB_DRAGITEM : GfxOutBarCtrl.h
  • NM_OB_ITEMCLICK : GfxOutBarCtrl.h
  • NM_OB_ITEMHOVER : GfxOutBarCtrl.h
  • NM_OB_ONGROUPENDEDIT : GfxOutBarCtrl.h
  • NM_OB_ONLABELENDEDIT : GfxOutBarCtrl.h
  • nMonthDays : CJDateTimeCtrl.cpp
  • no_argument : getopt.h
  • NOEXPLOREVIEW : MainFrm.cpp
  • NONE : CJControlBar.h
  • NORM_H_DISABLE : CJControlBar.h
  • NORM_H_ENABLED : CJControlBar.h
  • NORM_V_DISABLE : CJControlBar.h
  • NORM_V_ENABLED : CJControlBar.h
  • Normal : CJMenu.h
  • NormalizeFileName() : ustr.h, ustr.cpp
  • NormalizeFn() : GraphDoc.cpp
  • NULL : getopt1.c
  • NUM_COLUMNS : CJColorPopup.cpp
  • NUM_CVSROOT : CvsPrefs.h
  • NUM_FILEMASKS : UCvsFrame.h
  • NumberToString_US() : UPseudoSupport.cpp

- o -

  • OB_CYBUTTON : CJOutlookBar.h
  • OBM_CHECK : CJMenu.cpp
  • OBN_SELENDOK : CJOutlookBar.h
  • OCTANGLE_COUNT : GraphView.h
  • OFFSET : UPseudoSupport.cpp
  • OffsetRect() : udraw.h, udraw.cpp
  • ON_CHGCURSOR : umain.h
  • ON_CHGFOCUS : umain.h
  • ON_COMBO_APPEND : umain.h
  • ON_COMBO_DELSEL : umain.h
  • ON_COMBO_ENABLESEL : umain.h
  • ON_COMBO_GETCOUNT : umain.h
  • ON_COMBO_GETMENU : umain.h
  • ON_COMBO_GETSEL : umain.h
  • ON_COMBO_RESETALL : umain.h
  • ON_COMBO_SEL : umain.h
  • ON_COMBO_SEL_RANGE : umain.h
  • ON_COMBO_SETSEL : umain.h
  • ON_CUSTOM_CLICK : umain.h
  • ON_CUSTOM_DRAW : umain.h
  • ON_CUSTOM_DRAW_RANGE : umain.h
  • ON_DRAGQUERY : umain.h
  • ON_DRAGQUERY_RANGE : umain.h
  • ON_DROPIT : umain.h
  • ON_DROPIT_RANGE : umain.h
  • ON_DROPQUERY : umain.h
  • ON_DROPQUERY_CMDID : umain.h
  • ON_DROPQUERY_RANGE : umain.h
  • ON_DROPREF : umain.h
  • ON_EDITACTIVATE : umain.h
  • ON_EDITACTIVATE_RANGE : umain.h
  • ON_EDITCHANGE : umain.h
  • ON_EDITCHANGE_RANGE : umain.h
  • ON_ENABLECMD : umain.h
  • ON_FETCHCMD : umain.h
  • ON_GET_SLIDERPROP : umain.h
  • ON_GETFLOAT : umain.h
  • ON_GETTEXT : umain.h
  • ON_INIT_TAB_WIDGET : umain.h
  • ON_INIT_WIDGET : umain.h
  • ON_INVALIDATE : umain.h
  • ON_KEYDOWN : umain.h
  • ON_LIST_ADDCOLUMNS : umain.h
  • ON_LIST_ADDSEL : umain.h
  • ON_LIST_DBLCLICK : umain.h
  • ON_LIST_DELROW : umain.h
  • ON_LIST_GETINFO : umain.h
  • ON_LIST_GETNEXT : umain.h
  • ON_LIST_GETNEXTSEL : umain.h
  • ON_LIST_HIDECOLUMNS : umain.h
  • ON_LIST_INSERT : umain.h
  • ON_LIST_NEWROW : umain.h
  • ON_LIST_POPUP : umain.h
  • ON_LIST_RESETALL : umain.h
  • ON_LIST_RESORT : umain.h
  • ON_LIST_ROWGETDATA : umain.h
  • ON_LIST_ROWSETDATA : umain.h
  • ON_LIST_SELCOLUMN : umain.h
  • ON_LIST_SELECTING : umain.h
  • ON_LIST_SETCOLTITLE : umain.h
  • ON_LIST_SETCOLWIDTH : umain.h
  • ON_LIST_SETFEEDBACK : umain.h
  • ON_LIST_SETSORTDIR : umain.h
  • ON_LIST_SHOWCOLUMNS : umain.h
  • ON_PAGE_CHANGED : umain.h
  • ON_QUERYSTATE : umain.h
  • ON_REDRAW : umain.h
  • ON_RESIZE : umain.h
  • ON_SCROLLCHANGE : umain.h
  • ON_SCROLLCHANGE_RANGE : umain.h
  • ON_SET_SLIDER : umain.h
  • ON_SET_SLIDERPROP : umain.h
  • ON_SETCURSOR : umain.h
  • ON_SETDEFAULT : umain.h
  • ON_SETFLOAT : umain.h
  • ON_SETICON : umain.h
  • ON_SETSTATE : umain.h
  • ON_SETTEXT : umain.h
  • ON_SHOW_WIDGET : umain.h
  • ON_SHOW_WIDGET_RANGE : umain.h
  • ON_SMARTCOMBO_SETFEATURE : umain.h
  • ON_SMARTCOMBO_SETITEMS : umain.h
  • ON_SMARTCOMBO_SETREADONLY : umain.h
  • ON_STATUSBAR_TEXT : umain.h
  • ON_TB_BUTTON : umain.h
  • ON_TB_CHECKBTN : umain.h
  • ON_TB_DROPDOWN : umain.h
  • ON_TB_END : umain.h
  • ON_TB_GETCOLOR : umain.h
  • ON_TB_INIT : umain.h
  • ON_TB_SEPARATOR : umain.h
  • ON_TIMER : umain.h
  • ON_TREE_DELETE : umain.h
  • ON_TREE_EXPAND : umain.h
  • ON_TREE_EXPANDING : umain.h
  • ON_TREE_GETINFO : umain.h
  • ON_TREE_GETSEL : umain.h
  • ON_TREE_INSERT : umain.h
  • ON_TREE_RESETALL : umain.h
  • ON_TREE_SELECT : umain.h
  • ON_TREE_SELECTING : umain.h
  • ON_TREE_SETDATA : umain.h
  • ON_TREE_SETICON : umain.h
  • ON_UBTNDBLDOWN : umain.h
  • ON_UBTNDOWN : umain.h
  • ON_UBTNUP : umain.h
  • ON_UCOMMAND : umain.h
  • ON_UCOMMAND_RANGE : umain.h
  • ON_UCOMMAND_RANGEEX : umain.h
  • ON_UCREATE : umain.h
  • ON_UDESTROY : umain.h
  • ON_UENTER : umain.h
  • ON_UEXPOSE : umain.h
  • ON_UGETLLOC : umain.h
  • ON_ULEAVE : umain.h
  • ON_UMMOVE : umain.h
  • ON_UNOTIFY : umain.h
  • ON_UPDATEFOCUS : umain.h
  • ON_UPDATEUI : umain.h
  • ON_USETLLOC : umain.h
  • ON_USETTOOLTIP : umain.h
  • ON_UUPDATECMD : umain.h
  • ON_UUPDATECMD_RANGE : umain.h
  • OnFilterBarChanged() : BrowseFileView.cpp
  • OnFilteringChanged() : WinCvsBrowser.cpp, BrowseFileView.cpp
  • onFilteringChanged() : UCvsFiles.cpp
  • OnIgnoreChanged() : WinCvsBrowser.cpp
  • onIgnoreChanged() : UCvsFrame.cpp
  • opendir() : ndir.h, ndir.c
  • optarg : getopt.h, getopt.c
  • opterr : getopt.h, getopt.c
  • optind : getopt.h, getopt.c
  • optional_argument : getopt.h
  • optionColumn : BrowseViewColumn.cpp
  • optopt : getopt.h, getopt.c
  • ordering : getopt.c
  • OUTLINE : CJControlBar.h
  • outputXML() : PythonGlue.cpp

- p -

  • PaletteSize() : dib.h, dib.c
  • ParseUMENU() : PythonImpl.cpp
  • pathColumn : BrowseViewColumn.cpp
  • PathNameFromDirID() : VolsPaths.h, VolsPaths.c
  • PathNameFromWD() : VolsPaths.h, VolsPaths.c
  • PERMUTE : getopt.c
  • PERSISTENT_CAST : Persistent.h
  • platform_calloc : dll_garbage.c
  • PLATFORM_COLUMN_WIDTH : BrowseViewColumn.cpp
  • platform_free : dll_garbage.c
  • platform_malloc : dll_garbage.c
  • platform_realloc : dll_garbage.c
  • poolAlloc() : dll_garbage.c
  • poolFree() : dll_garbage.c
  • poolPtr : dll_garbage.c
  • poolRemove() : dll_garbage.c
  • posixly_correct : getopt.c
  • PostGotoDlgCtrl() : wincvs_winutil.h, wincvs_winutil.cpp
  • PP_PASTE : version_fu.h
  • PP_STRINGIZE : version_fu.h
  • PREV_FILTER_SIZE : FilterSelectionDlg.cpp
  • print() : LogParse.cpp
  • PROFILE_NAME : Persistent.h
  • PromptEditMessage() : AskYesNo.h, AskYesNo.cpp
  • PtInRect() : udraw.h, udraw.cpp
  • PY_BEGIN_IMPL_METHOD : PythonMacros.h
  • Py_BuildValue : PythonGlue.impl.h
  • Py_BuildValue_glue : PythonGlue.impl.h
  • PY_DECL_CLASS : PythonMacros.h
  • PY_DECL_CLASS_INHERITED : PythonMacros.h
  • PY_DECL_METHOD : PythonMacros.h
  • PY_END_IMPL_METHOD : PythonMacros.h
  • Py_EndInterpreter : PythonGlue.impl.h
  • Py_EndInterpreter_glue : PythonGlue.impl.h
  • Py_Finalize : PythonGlue.impl.h
  • Py_Finalize_glue : PythonGlue.impl.h
  • Py_FindMethod : PythonGlue.impl.h
  • Py_FindMethod_glue : PythonGlue.impl.h
  • Py_GetPath : PythonGlue.impl.h
  • Py_GetPath_glue : PythonGlue.impl.h
  • PY_IMPL_CLASS : PythonMacros.h
  • PY_IMPL_METHOD : PythonMacros.h
  • Py_Initialize : PythonGlue.impl.h
  • Py_Initialize_glue : PythonGlue.impl.h
  • Py_InitModule4 : PythonGlue.impl.h
  • Py_InitModule4_glue : PythonGlue.impl.h
  • Py_IsInitialized : PythonGlue.impl.h
  • Py_IsInitialized_glue : PythonGlue.impl.h
  • Py_NewInterpreter : PythonGlue.impl.h
  • Py_NewInterpreter_glue : PythonGlue.impl.h
  • Py_SetProgramName : PythonGlue.impl.h
  • Py_SetProgramName_glue : PythonGlue.impl.h
  • PyAppendCache() : PythonGlue.h, PythonGlue.cpp
  • PyArg_ParseTuple : PythonGlue.impl.h
  • PyArg_ParseTuple_glue : PythonGlue.impl.h
  • PyDict_SetItemString : PythonGlue.impl.h
  • PyDict_SetItemString_glue : PythonGlue.impl.h
  • PyDoCmdUI() : PythonGlue.h, PythonGlue.cpp
  • PyDoPython() : PythonGlue.h, PythonGlue.cpp
  • PyErr_Clear : PythonGlue.impl.h
  • PyErr_Clear_glue : PythonGlue.impl.h
  • PyErr_NewException : PythonGlue.impl.h
  • PyErr_NewException_glue : PythonGlue.impl.h
  • PyErr_SetString : PythonGlue.impl.h
  • PyErr_SetString_glue : PythonGlue.impl.h
  • PyEval_InitThreads : PythonGlue.impl.h
  • PyEval_InitThreads_glue : PythonGlue.impl.h
  • PyFile_AsFile : PythonGlue.impl.h
  • PyFile_AsFile_glue : PythonGlue.impl.h
  • PyFile_Type_glue : PythonGlue.impl.h
  • PyHandleCvsguiError() : PythonMacros.h, PythonContainer.cpp
  • PyInt_Check : PythonGlue.impl.h
  • PyInt_FromLong : PythonGlue.impl.h
  • PyInt_FromLong_glue : PythonGlue.impl.h
  • PyInt_Type_glue : PythonGlue.impl.h
  • PyInvalUICache() : PythonGlue.h, PythonGlue.cpp
  • PyIsUICacheValid() : PythonGlue.h, PythonGlue.cpp
  • PyMacrosReloadAll() : PythonGlue.h, PythonGlue.cpp
  • PyModule_GetDict : PythonGlue.impl.h
  • PyModule_GetDict_glue : PythonGlue.impl.h
  • PyObject_Free : PythonGlue.impl.h
  • PyObject_Free_glue : PythonGlue.impl.h
  • PyRegistry_InitValues : PythonContainer.h
  • PyRun_SimpleFile : PythonGlue.impl.h
  • PyRun_SimpleFile_glue : PythonGlue.impl.h
  • PyRun_SimpleString : PythonGlue.impl.h
  • PyRun_SimpleString_glue : PythonGlue.impl.h
  • PyString_AsString : PythonGlue.impl.h
  • PyString_AsString_glue : PythonGlue.impl.h
  • PyString_Check : PythonGlue.impl.h
  • PyString_FromString : PythonGlue.impl.h
  • PyString_FromString_glue : PythonGlue.impl.h
  • PyString_Type_glue : PythonGlue.impl.h
  • PySys_SetPath : PythonGlue.impl.h
  • PySys_SetPath_glue : PythonGlue.impl.h
  • PYTHONGLUE_EXTERN : PythonImpl.cpp, PythonGlue.impl.h
  • PYTHONLIB_FOLDER : MacrosSetup.h
  • PythonLibGetLoc() : MacrosSetup.h, MacrosSetup.cpp
  • PyThreadState : PythonGlue.h
  • PyThreadState_Swap : PythonGlue.impl.h
  • PyThreadState_Swap_glue : PythonGlue.impl.h
  • PyTuple_Check : PythonGlue.impl.h
  • PyTuple_New : PythonGlue.impl.h
  • PyTuple_New_glue : PythonGlue.impl.h
  • PyTuple_Size : PythonGlue.impl.h
  • PyTuple_Size_glue : PythonGlue.impl.h
  • PyTuple_Type_glue : PythonGlue.impl.h
  • PyType_Type_glue : PythonGlue.impl.h
  • PyValidUICache() : PythonGlue.h, PythonGlue.cpp

- q -

  • qCvsDebug : StdAfx.h
  • qDebug : StdAfx.h
  • qMacAPP : stdafx.h
  • qMacPP : stdafx.h
  • qRangeCheck : dll_garbage.c, stdafx.h
  • qRelease : stdafx.h
  • qReleaseBuild : stdafx.h

- r -

  • RAISED : CJControlBar.h
  • ReadDIBFile() : dib.h, dib.c
  • ReadDIBRsrc() : dib.h, dib.c
  • readdir() : ndir.h, ndir.c
  • ReadIgnoredFile() : CvsIgnore.cpp
  • realloc : dll_garbage.h
  • reduceString() : CvsArgs.cpp
  • RELEASE : CJHtmlView.cpp
  • REQUIRE_ORDER : getopt.c
  • required_argument : getopt.h
  • RETURN_IN_ORDER : getopt.c
  • revisionColumn : BrowseViewColumn.cpp
  • rewinddir : ndir.h
  • RGB_DEF_BRANCH : GraphView.h
  • RGB_DEF_DEADNODE : GraphView.h
  • RGB_DEF_HEADER : GraphView.h
  • RGB_DEF_MERGE : GraphView.h
  • RGB_DEF_NODE : GraphView.h
  • RGB_DEF_SEL : GraphView.h
  • RGB_DEF_SHADOW : GraphView.h
  • RGB_DEF_TAG : GraphView.h
  • RGB_DEF_USERSTATENODE : GraphView.h
  • ROUND_RECT_PT : GraphView.h

- s -

  • sAllTargets : uevent.cpp
  • sAskingMainThread : MainFrm.cpp
  • SaveAllSettings() : Persistent.cpp
  • SaveAsPersistentSettings() : Persistent.cpp
  • SaveBmpFromDDB() : dib.h, dib.c
  • SaveDIB() : dib.h, dib.c
  • SavePersistentSettings() : Persistent.h, Persistent.cpp
  • sBuf : TextBinary.cpp
  • sBufSize : TextBinary.cpp
  • sCallTable : AppGlue.cpp
  • SCHEMA_0 : CvsPrefs.h
  • SCHEMA_1 : CvsPrefs.h
  • SCHEMA_2 : CvsPrefs.h
  • SCHEMA_CURRENT : CvsPrefs.h
  • SCHEMA_NUMBER : CvsPrefs.h
  • sCompatProc : dll_loader.h, dll_loader.c
  • sCvsContainerFileSpec : dll_glue.c
  • sDefBrowserMenu : CustomizeMenus.cpp
  • sDefDateNames : UpdateDlg.cpp
  • sDefFilesMenu : CustomizeMenus.cpp
  • sDefLogDateNames : LogDlg.cpp
  • sDefLogStateNames : LogDlg.cpp
  • sDefLogTagNames : LogDlg.cpp
  • sDefLogUserNames : LogDlg.cpp
  • sDefModuleNames : ImportDlg.cpp
  • sDefPrevCvsCmd : LineCmd.cpp
  • sDefReleases : ImportDlg.cpp
  • sDefRevDateNames : UpdateDlg.cpp
  • sDefStates : AdminOptionDlg.cpp
  • sDefTagNames : UpdateDlg.cpp
  • sDefVendorBranchIds : ImportDlg.cpp
  • sDefVendors : ImportDlg.cpp
  • sDiffOptions : DiffDlg.cpp
  • sDummyStarter : UPseudoSupport.cpp
  • seekdir() : ndir.h, ndir.c
  • SetDItemMenuSel() : MacMisc.h
  • SetEncoding() : CvsEntries.cpp
  • SetIcon() : WinCvsBrowser.cpp
  • SetListCtrlExtendedStyle() : wincvs_winutil.h, wincvs_winutil.cpp
  • setModule() : dll_garbage.c
  • SetRect() : udraw.h, udraw.cpp
  • SetRectEmpty() : udraw.h, udraw.cpp
  • SettingsGetLoc() : Persistent.cpp
  • sFileIconAddedIcon : UCvsFiles.cpp
  • sFileIconBinaryIcon : UCvsFiles.cpp
  • sFileIconBinaryModIcon : UCvsFiles.cpp
  • sFileIconConflictIcon : UCvsFiles.cpp
  • sFileIconIgnoredIcon : UCvsFiles.cpp
  • sFileIconMissIcon : UCvsFiles.cpp
  • sFileIconRemovedIcon : UCvsFiles.cpp
  • sFileIconTextIcon : UCvsFiles.cpp
  • sFileIconTextModIcon : UCvsFiles.cpp
  • sFileIconUnknownIcon : UCvsFiles.cpp
  • sFolderIcon : UCvsFolders.cpp
  • sFolderIconIcon : UCvsFiles.cpp
  • sFolderIconIgnoredIcon : UCvsFiles.cpp
  • sFolderIconMissIcon : UCvsFiles.cpp
  • sFolderIconUnknownIcon : UCvsFiles.cpp
  • sFolderIgnoredIcon : UCvsFolders.cpp
  • sFolderMissingIcon : UCvsFolders.cpp
  • sFolderUnknownIcon : UCvsFolders.cpp
  • sGetEnv() : MainFrm.cpp
  • sGetEnvResult : MainFrm.cpp
  • SHADOW_OFFSET_PT : GraphView.h
  • SHELL_KIND : CvsPrefs.h
  • SHELL_PYTHON : CvsPrefs.h
  • SHELL_TCL : CvsPrefs.h
  • ShellAction() : LaunchHandlers.cpp
  • SHELLACTION_SUCCEEDED : LaunchHandlers.cpp
  • shl_calloc() : dll_garbage.h, dll_garbage.c
  • shl_free() : dll_garbage.h, dll_garbage.c
  • shl_malloc() : dll_garbage.h, dll_garbage.c
  • shl_realloc() : dll_garbage.h, dll_garbage.c
  • SHOWCVS_HIDE : CvsPrefs.h
  • SHOWCVS_SHOWMINNOACTIVE : CvsPrefs.h
  • SHOWCVS_SHOWNOACTIVATE : CvsPrefs.h
  • SHOWCVS_SHOWNORMAL : CvsPrefs.h
  • SHOWCVS_TYPE : CvsPrefs.h
  • simple_diff() : Persistent.cpp
  • sInitInvTable : CustomizeMenus.cpp
  • sInvTable : CustomizeMenus.cpp
  • SIZEOF_BITMAPFILEHEADER_PACKED : dib.h
  • sLastExitCode : AppGlue.cpp
  • sLastIdle : uevent.cpp
  • split() : MultiFiles.cpp
  • SplitPath() : ustr.h, ustr.cpp
  • sRetainedMsgs : uevent.cpp
  • START_UPDATE_UI : UCvsFrame.cpp
  • STARTPOINT_PT : GraphView.h
  • stat : StdAfx.h, Stat.cpp, StdAfx.h
  • stateColumn : BrowseViewColumn.cpp
  • STATUSOUTPUT_QUICK : CvsPrefs.h
  • STATUSOUTPUT_STANDARD : CvsPrefs.h
  • STATUSOUTPUT_TYPE : CvsPrefs.h
  • STATUSOUTPUT_VERBOSE : CvsPrefs.h
  • sTclBrowser : TclGlue.cpp
  • STD : umain.h
  • sTemporaryTurnOffNotify : UCvsFolders.cpp
  • sTmpList : AppGlue.cpp
  • sTooltipHandler : uevent.cpp
  • stopCVS() : AppGlue.h, AppGlue.cpp
  • STR_DIFFDEFAULT_DATE : DiffDlg.cpp
  • STR_DIFFDEFAULT_REV : DiffDlg.cpp
  • STR_DIFFOPT_DESC_A : DiffDlg.cpp
  • STR_DIFFOPT_DESC_B : DiffDlg.cpp
  • STR_DIFFOPT_DESC_BB : DiffDlg.cpp
  • STR_DIFFOPT_DESC_BINARY : DiffDlg.cpp
  • STR_DIFFOPT_DESC_BRIEF : DiffDlg.cpp
  • STR_DIFFOPT_DESC_C : DiffDlg.cpp
  • STR_DIFFOPT_DESC_C_G_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_CC : DiffDlg.cpp
  • STR_DIFFOPT_DESC_D : DiffDlg.cpp
  • STR_DIFFOPT_DESC_E : DiffDlg.cpp
  • STR_DIFFOPT_DESC_E_T : DiffDlg.cpp
  • STR_DIFFOPT_DESC_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_F_E : DiffDlg.cpp
  • STR_DIFFOPT_DESC_FF : DiffDlg.cpp
  • STR_DIFFOPT_DESC_H_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_HH : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_A_S : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_B_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_C : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_M_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_S_C : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_T : DiffDlg.cpp
  • STR_DIFFOPT_DESC_IFDEF : DiffDlg.cpp
  • STR_DIFFOPT_DESC_II : DiffDlg.cpp
  • STR_DIFFOPT_DESC_L_C : DiffDlg.cpp
  • STR_DIFFOPT_DESC_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_LABEL : DiffDlg.cpp
  • STR_DIFFOPT_DESC_LL : DiffDlg.cpp
  • STR_DIFFOPT_DESC_MINIMAL : DiffDlg.cpp
  • STR_DIFFOPT_DESC_N : DiffDlg.cpp
  • STR_DIFFOPT_DESC_N_G_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_N_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_NN : DiffDlg.cpp
  • STR_DIFFOPT_DESC_O_G_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_O_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_PP : DiffDlg.cpp
  • STR_DIFFOPT_DESC_RCS : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_B_S : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_C_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_C_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_F_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_T : DiffDlg.cpp
  • STR_DIFFOPT_DESC_TEXT : DiffDlg.cpp
  • STR_DIFFOPT_DESC_TT : DiffDlg.cpp
  • STR_DIFFOPT_DESC_U : DiffDlg.cpp
  • STR_DIFFOPT_DESC_U_G_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_U_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_UU : DiffDlg.cpp
  • STR_DIFFOPT_DESC_W : DiffDlg.cpp
  • STR_DIFFOPT_DESC_WW : DiffDlg.cpp
  • STR_DIFFOPT_DESC_Y : DiffDlg.cpp
  • STR_DIFFOPT_OPT_A : DiffDlg.cpp
  • STR_DIFFOPT_OPT_B : DiffDlg.cpp
  • STR_DIFFOPT_OPT_BB : DiffDlg.cpp
  • STR_DIFFOPT_OPT_BINARY : DiffDlg.cpp
  • STR_DIFFOPT_OPT_BRIEF : DiffDlg.cpp
  • STR_DIFFOPT_OPT_C : DiffDlg.cpp
  • STR_DIFFOPT_OPT_C_G_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_CC : DiffDlg.cpp
  • STR_DIFFOPT_OPT_D : DiffDlg.cpp
  • STR_DIFFOPT_OPT_E : DiffDlg.cpp
  • STR_DIFFOPT_OPT_E_T : DiffDlg.cpp
  • STR_DIFFOPT_OPT_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_F_E : DiffDlg.cpp
  • STR_DIFFOPT_OPT_FF : DiffDlg.cpp
  • STR_DIFFOPT_OPT_H_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_HH : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_A_S : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_B_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_C : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_M_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_S_C : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_T : DiffDlg.cpp
  • STR_DIFFOPT_OPT_IFDEF : DiffDlg.cpp
  • STR_DIFFOPT_OPT_II : DiffDlg.cpp
  • STR_DIFFOPT_OPT_L_C : DiffDlg.cpp
  • STR_DIFFOPT_OPT_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_LABEL : DiffDlg.cpp
  • STR_DIFFOPT_OPT_LL : DiffDlg.cpp
  • STR_DIFFOPT_OPT_MINIMAL : DiffDlg.cpp
  • STR_DIFFOPT_OPT_N : DiffDlg.cpp
  • STR_DIFFOPT_OPT_N_G_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_N_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_NN : DiffDlg.cpp
  • STR_DIFFOPT_OPT_O_G_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_O_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_P : DiffDlg.cpp
  • STR_DIFFOPT_OPT_RCS : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_B_S : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_C_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_C_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_F_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_T : DiffDlg.cpp
  • STR_DIFFOPT_OPT_TEXT : DiffDlg.cpp
  • STR_DIFFOPT_OPT_TT : DiffDlg.cpp
  • STR_DIFFOPT_OPT_U : DiffDlg.cpp
  • STR_DIFFOPT_OPT_U_G_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_U_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_UU : DiffDlg.cpp
  • STR_DIFFOPT_OPT_W : DiffDlg.cpp
  • STR_DIFFOPT_OPT_WW : DiffDlg.cpp
  • STR_DIFFOPT_OPT_Y : DiffDlg.cpp
  • STR_DIFFOPT_OPTIONDESCRIPTION_FORMAT : DiffDlg.cpp
  • STR_ENCODING_BINARY : CvsEntries.cpp
  • STR_ENCODING_TEXT : CvsEntries.cpp
  • STR_ENCODING_UNICODE : CvsEntries.cpp
  • STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER : BrowseFileView.h
  • STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH : BrowseFileView.h
  • STR_FILEDETAILVIEW_COLUMN_PREFIX_FLAT : BrowseFileView.h
  • STR_FILEDETAILVIEW_COLUMN_PREFIX_REG : BrowseFileView.h
  • STR_FILEDETAILVIEW_COLUMN_SECTION : BrowseFileView.h
  • STR_ITEMLIST_BRANCH : ItemListDlg.cpp
  • STR_ITEMLIST_DIR : ItemListDlg.cpp
  • STR_ITEMLIST_REVISION : ItemListDlg.cpp
  • STR_ITEMLIST_UP_DIR : ItemListDlg.cpp
  • STR_STATE_CONFLICT : CvsEntries.cpp
  • STR_STATE_IGNORED : CvsEntries.cpp
  • STR_STATE_MISSING : CvsEntries.cpp
  • STR_STATE_MODIFIED : CvsEntries.cpp
  • STR_STATE_REMOVED : CvsEntries.cpp
  • STR_STATE_RESOLVED : CvsEntries.cpp
  • STR_STATE_UNKNOWN : CvsEntries.cpp
  • strdup() : stdafx.h, UPseudoSupport.cpp, stdafx.h
  • StringToArgv() : ustr.h, ustr.cpp
  • StrOrdICmp() : ustr.h, ustr.cpp
  • StrPathCmp() : ustr.h, ustr.cpp
  • StrSafeCopy() : ustr.h, ustr.cpp
  • STRUCT_DIRENT : FileTraversal.h
  • sTurnOffDispatching : uevent.cpp
  • STYLE_DEADNODE : GraphView.h
  • STYLE_USERSTATENODE : GraphView.h
  • SUNKEN : CJControlBar.h
  • SysEncoding_to_UTF8() : MacMisc.h
  • systemtime_second : Stat.cpp
  • szIntFilePos : TipDlg.cpp
  • szIntStartup : TipDlg.cpp
  • szSection : TipDlg.cpp
  • szTimeStamp : TipDlg.cpp

- t -

  • TABVIEW_BORDER : CJTabView.h
  • Tag_Open() : CvsEntries.h, CvsEntries.cpp
  • tagColumn : BrowseViewColumn.cpp
  • TBBS_AUTOSIZE : CJToolBar.h
  • TBBS_BUTTON : CJToolBar.h
  • TBBS_CHECKBOX : CJToolBar.h
  • TBBS_CHECKED : CJToolBar.h
  • TBBS_CHECKGROUP : CJToolBar.h
  • TBBS_DISABLED : CJToolBar.h
  • TBBS_DROPDOWN : CJToolBar.h
  • TBBS_ELLIPSES : CJToolBar.h
  • TBBS_GROUP : CJToolBar.h
  • TBBS_HIDDEN : CJToolBar.h
  • TBBS_INDETERMINATE : CJToolBar.h
  • TBBS_MARKED : CJToolBar.h
  • TBBS_NOPREFIX : CJToolBar.h
  • TBBS_PRESSED : CJToolBar.h
  • TBBS_SEPARATOR : CJToolBar.h
  • TBBS_WRAPPED : CJToolBar.h
  • tbeButton : utoolbar.cpp
  • tbeDropDown : utoolbar.cpp
  • tbeKind : utoolbar.cpp
  • tbeSeparator : utoolbar.cpp
  • TCB_ITEM : CJTabCtrlBar.h
  • Tcl_Alloc : TclGlue.cpp
  • Tcl_AppendResult : TclGlue.cpp
  • TCL_BREAK : TclGlue.h
  • Tcl_Concat : TclGlue.cpp
  • TCL_CONTINUE : TclGlue.h
  • Tcl_CreateCommand : TclGlue.cpp
  • Tcl_CreateInterp : TclGlue.cpp
  • Tcl_DeleteInterp : TclGlue.cpp
  • Tcl_DStringAppendElement : TclGlue.cpp
  • Tcl_DStringEndSublist : TclGlue.cpp
  • Tcl_DStringFree : TclGlue.cpp
  • Tcl_DStringInit : TclGlue.cpp
  • Tcl_DStringResult : TclGlue.cpp
  • Tcl_DStringStartSublist : TclGlue.cpp
  • TCL_ERROR : TclGlue.h
  • Tcl_Eval : TclGlue.cpp
  • Tcl_EvalFile : TclGlue.cpp
  • Tcl_ExprLong : TclGlue.cpp
  • Tcl_FindExecutable : TclGlue.cpp
  • Tcl_Free : TclGlue.cpp
  • Tcl_Init : TclGlue.cpp
  • Tcl_ListObjAppendElement : TclGlue.cpp
  • Tcl_NewListObj : TclGlue.cpp
  • Tcl_NewStringObj : TclGlue.cpp
  • TCL_OK : TclGlue.h
  • Tcl_Realloc : TclGlue.cpp
  • TCL_RETURN : TclGlue.h
  • Tcl_SetObjResult : TclGlue.cpp
  • Tcl_SetResult : TclGlue.cpp
  • Tcl_SetVar : TclGlue.cpp
  • Tcl_SetVar2 : TclGlue.cpp
  • Tcl_SourceRCFile : TclGlue.cpp
  • TclBrowserAppend() : TclGlue.h, TclGlue.cpp
  • TclBrowserReset() : TclGlue.h, TclGlue.cpp
  • tclCvsBrowserProc() : TclGlue.cpp
  • tclCvsEntriesDeleteProc() : TclGlue.cpp
  • tclCvsEntriesProc() : TclGlue.cpp
  • tclCvsErrProc() : TclGlue.cpp
  • tclCvsExitOnErrorProc() : TclGlue.cpp
  • tclCvsLastErrorCodeProc() : TclGlue.cpp
  • tclCvsOutProc() : TclGlue.cpp
  • tclCvsProc() : TclGlue.cpp
  • tclDirProc() : TclGlue.cpp
  • TclFreeObj : TclGlue.cpp
  • tclHelpProc() : TclGlue.cpp
  • tclSafeRemove() : TclGlue.cpp
  • telldir() : ndir.h, ndir.c
  • TestBuffer() : TextBinary.cpp
  • testCVS() : AppGlue.h, AppGlue.cpp
  • TestFileIsAlias() : TextBinary.cpp
  • TestValidName() : TextBinary.cpp
  • TextOnly : CJMenu.h
  • theApp : wincvs.cpp
  • theHookMap : Subclass.cpp
  • TIPDLG_H_INCLUDED_ : TipDlg.h
  • TmFromOleDate() : CJDateTimeCtrl.cpp
  • TOHEX : CJHexEdit.cpp
  • TOOLTIP_ID : CJHyperLink.cpp
  • TRACK_BORDER_SIZE : CJSizeDockBar.cpp, CJControlBar.cpp
  • TRACK_BUTTON : CJMenuBar.h
  • TRACK_NONE : CJMenuBar.h
  • TRACK_POPUP : CJMenuBar.h
  • TRACKINGSTATE : CJMenuBar.h
  • TraverseHistory() : HistComboBoxEx.cpp
  • typesRecursive : BrowseViewColumn.cpp
  • typesRegular : BrowseViewColumn.cpp

- u -

  • UAppConsole() : uconsole.h, uconsole.cpp
  • UASSERT : StdAfx.h, stdafx.h, StdAfx.h, stdafx.h
  • UBEGIN_MESSAGE_MAP : umain.h
  • UCMD_to_WINCMD : umain.h
  • UCMD_to_WINCTL : umain.h
  • UCOLORREF : udraw.h
  • UCreate_AboutDlg() : UCvsDialogs.h
  • UCreate_Alert() : UCvsDialogs.h
  • UCreate_AskYesNoDlg() : UCvsDialogs.h
  • UCreate_BranchDlg() : UCvsDialogs.h
  • UCreate_BranchModDlg() : UCvsDialogs.h
  • UCreate_CheckoutDlg() : UCvsDialogs.h
  • UCreate_CmdlineDlg() : UCvsDialogs.h
  • UCreate_CommitDlg() : UCvsDialogs.h
  • UCreate_DiffDlg() : UCvsDialogs.h
  • UCreate_gcvs_Settings() : UCvsDialogs.h
  • UCreate_GraphWindow() : UCvsDialogs.h
  • UCreate_ImpEntryDlg() : UCvsDialogs.h
  • UCreate_ImportDlg() : UCvsDialogs.h
  • UCreate_ImportFilterDlg() : UCvsDialogs.h
  • UCreate_ImpWarningDlg() : UCvsDialogs.h
  • UCreate_LogDlg() : UCvsDialogs.h
  • UCreate_MainWindow() : UCvsDialogs.h
  • UCreate_PasswdDlg() : UCvsDialogs.h
  • UCreate_pixmap() : UCvsDialogs.h, UCvsApp.cpp
  • UCreate_SelDetailsDlg() : UCvsDialogs.h
  • UCreate_SelTagBranchDlg() : UCvsDialogs.h
  • UCreate_SettingsDlg() : UCvsDialogs.h
  • UCreate_TagDlg() : UCvsDialogs.h
  • UCreate_TagModDlg() : UCvsDialogs.h
  • UCreate_UntagDlg() : UCvsDialogs.h
  • UCreate_UntagModDlg() : UCvsDialogs.h
  • UCreate_UpdateDlg() : UCvsDialogs.h
  • uCursArrow : umain.h
  • UCURSOR : umain.h
  • uCursWatch : umain.h
  • UDECLARE_DYNAMIC : uobject.h
  • UDECLARE_DYNCREATE : uobject.h
  • UDECLARE_MESSAGE_MAP : umain.h
  • UDYNAMIC_CAST : uobject.h
  • UEND_MESSAGE_MAP : umain.h
  • UEventGetTargets() : umain.h, uevent.cpp
  • UEventGetWidID() : umain.h, uevent.cpp
  • UEventGiveTime() : umain.h, uevent.cpp
  • UEventNotifyMessage() : umain.h, uevent.cpp
  • UEventParam : umain.h
  • UEventPostMessage() : umain.h, uevent.cpp
  • UEventQueryWidget() : umain.h, uevent.cpp
  • UEventRemoveWidID() : umain.h, uevent.cpp
  • UEventSendMessage() : umain.h, uevent.cpp
  • UEventSendMessageExt() : umain.h, uevent.cpp
  • UEventSetTooltipHandler() : umain.h, uevent.cpp
  • UEventType : umain.h
  • UEXPORT : uconfig.h
  • UFSSpec : TextBinary.h
  • UGetBValue : udraw.h
  • UGetGValue : udraw.h
  • UGetRValue : udraw.h
  • UHIWORD : umain.h
  • UIMPLEMENT_DYNAMIC : uobject.h
  • UIMPLEMENT_DYNCREATE : uobject.h
  • UIMPLEMENT_RUNTIMECLASS : uobject.h
  • UK_ADD : umain.h
  • UK_ALT : umain.h
  • UK_BACK : umain.h
  • UK_CANCEL : umain.h
  • UK_CLEAR : umain.h
  • UK_CONTROL : umain.h
  • UK_DECIMAL : umain.h
  • UK_DELETE : umain.h
  • UK_DIVIDE : umain.h
  • UK_DOWN : umain.h
  • UK_END : umain.h
  • UK_ESCAPE : umain.h
  • UK_F1 : umain.h
  • UK_F10 : umain.h
  • UK_F11 : umain.h
  • UK_F12 : umain.h
  • UK_F13 : umain.h
  • UK_F14 : umain.h
  • UK_F15 : umain.h
  • UK_F16 : umain.h
  • UK_F17 : umain.h
  • UK_F18 : umain.h
  • UK_F19 : umain.h
  • UK_F2 : umain.h
  • UK_F20 : umain.h
  • UK_F21 : umain.h
  • UK_F22 : umain.h
  • UK_F23 : umain.h
  • UK_F24 : umain.h
  • UK_F3 : umain.h
  • UK_F4 : umain.h
  • UK_F5 : umain.h
  • UK_F6 : umain.h
  • UK_F7 : umain.h
  • UK_F8 : umain.h
  • UK_F9 : umain.h
  • UK_HELP : umain.h
  • UK_HOME : umain.h
  • UK_INSERT : umain.h
  • UK_LBUTTON : umain.h
  • UK_LEFT : umain.h
  • UK_MBUTTON : umain.h
  • UK_MINUS : umain.h
  • UK_MULTIPLY : umain.h
  • UK_NEXT : umain.h
  • UK_NUMPAD0 : umain.h
  • UK_NUMPAD1 : umain.h
  • UK_NUMPAD2 : umain.h
  • UK_NUMPAD3 : umain.h
  • UK_NUMPAD4 : umain.h
  • UK_NUMPAD5 : umain.h
  • UK_NUMPAD6 : umain.h
  • UK_NUMPAD7 : umain.h
  • UK_NUMPAD8 : umain.h
  • UK_NUMPAD9 : umain.h
  • UK_PLUS : umain.h
  • UK_PRIOR : umain.h
  • UK_RBUTTON : umain.h
  • UK_RETURN : umain.h
  • UK_RIGHT : umain.h
  • UK_SEPARATOR : umain.h
  • UK_SHIFT : umain.h
  • UK_SPACE : umain.h
  • UK_SUBTRACT : umain.h
  • UK_TAB : umain.h
  • UK_UP : umain.h
  • UListSorter : umain.h
  • ULOWORD : umain.h
  • UMakeBitmap() : umenu.cpp, umain.h, PseudoButton.h, PseudoButton.cpp
  • UMAKEINT : umain.h
  • UMENU : umain.h
  • UMENU_NULL : umain.h
  • UMenuAddButton() : umenu.h, umenu.cpp
  • UMenuAddPulldown() : umenu.h, umenu.cpp
  • UMenuAddRadio() : umenu.h, umenu.cpp
  • UMenuAddSeparator() : umenu.h, umenu.cpp
  • UMenuAddToggle() : umenu.h, umenu.cpp
  • UMenuCount() : umenu.h, umenu.cpp
  • UMenuDelete() : umenu.h, umenu.cpp
  • UMenuDeleteByCmd() : umenu.h, umenu.cpp
  • UMSG_EXT : umain.h
  • UMSG_NOEXT : umain.h
  • UMSG_RANGE : umain.h
  • UNDEF_STDC : TclGlue.cpp
  • UnionRect() : udraw.h, udraw.cpp
  • UpdateUIMenu() : wincvs_winutil.h, wincvs_winutil.cpp
  • UPMSG : umain.h
  • UPS_SOLID : udraw.h
  • URGB : udraw.h
  • URUNTIME_CLASS : uobject.h
  • usage() : UCvsApp.cpp
  • USE_DL_EXPORT : PythonContainer.h
  • USE_PYTHON : PythonContainer.h
  • USE_TCL : TclGlue.cpp
  • UTB_DROP : umain.h
  • UTB_KIND : PseudoButton.h
  • UTB_SEPARATOR : umain.h
  • UTB_VAR : umain.h
  • UTextTableView_DoubleClick : UPseudoSupport.h
  • UTextTableView_SingleClick : UPseudoSupport.h
  • UTF8_to_LString() : MacMisc.h
  • UTF8_to_SysEncoding() : MacMisc.h
  • UTHROW : uconsole.h, stdafx.h
  • UTickCount() : umain.h, uevent.cpp
  • UTREEITEM : umain.h
  • UWinPseudoWindowProc() : uwidget.h, PseudoDlg.cpp
  • UWinToUMod() : PseudoDlg.cpp

- v -

  • VAR_GLUE : PythonGlue.impl.h
  • VC_EXTRALEAN : StdAfx.h
  • VerifyUnmodified() : CvsEntries.cpp
  • VERSION_IE3 : CJToolBar.h
  • VERSION_IE4 : CJToolBar.h
  • VERSION_IE401 : CJToolBar.h
  • VERSION_WIN4 : CJToolBar.h
  • VERTF : CJDockContext.cpp
  • VolName2VRef() : VolsPaths.h, VolsPaths.c
  • VOLSPATHS_C : VolsPaths.c
  • VRef2VolName() : VolsPaths.h, VolsPaths.c

- w -

  • WaitForCvs() : AppGlue.h, AppGlue.cpp
  • wantDebugging : stdafx.h
  • WarnNoPython() : NoPython.h, NoPython.cpp
  • WATCHER_BACKGROUND_TIMEOUT : FileViewWatcher.cpp
  • WATCHER_FOREGROUND_TIMEOUT : FileViewWatcher.cpp
  • WATCHER_IGNORE_FACTOR : FileViewWatcher.cpp
  • WATCHER_RAPID_FACTOR : FileViewWatcher.cpp
  • WATCHER_RAPID_THRESHOLD : FileViewWatcher.cpp
  • WCHARFORMAT : wincvsView.h, AppConsole.h
  • WCVS_DEBUG_BUILD_STRING_PREFIX : version_fu.h
  • WCVS_DEBUG_FLAG : version_fu.h
  • WCVS_PATCHED_FLAG : version_fu.h
  • WCVS_PRERELEASE_BUILD_STRING_PREFIX : version_fu.h
  • WCVS_PRERELEASE_FLAG : version_fu.h
  • WCVS_PRIVATE_BUILD_FLAG : version_fu.h
  • WCVS_PRIVATE_BUILD_STRING : version_fu.h
  • WCVS_PRIVATE_BUILD_STRING_PREFIX : version_fu.h
  • WCVS_SPECIAL_BUILD_FLAG : version_fu.h
  • WCVS_SPECIAL_BUILD_STRING : version_fu.h
  • WCVS_SPECIAL_BUILD_STRING_PREFIX : version_fu.h
  • WCVS_UNICODE_BUILD_STRING_PREFIX : version_fu.h
  • WIDTHBYTES : dib.h
  • WIDTHBYTES16 : dib.h
  • WIDTHBYTES8 : dib.h
  • Win32s : CJMenu.cpp
  • Win32Type : CJMenu.cpp
  • WINCMD_DLG_END : umain.h
  • WINCMD_DLG_START : umain.h
  • WINCMD_to_UCMD : umain.h
  • WINCTL_to_UCMD : umain.h
  • WINCVS_BETA_RELEASE : version_no.h
  • WINCVS_BUILD : version_no.h
  • WINCVS_FILE_MAJOR : version_no.h
  • WINCVS_FILE_MINOR : version_no.h
  • WINCVS_FILE_PATCHLEVEL : version_no.h
  • WINCVS_FILEVERSION : version_fu.h
  • WINCVS_FILEVERSION_STRING : version_fu.h
  • WINCVS_OFFICIAL_DISTRIBUTION : version_no.h
  • WINCVS_PRIVATE_BUILD : version_no.h
  • WINCVS_PRODUCT_MAJOR : version_no.h
  • WINCVS_PRODUCT_MINOR : version_no.h
  • WINCVS_PRODUCT_PATCHLEVEL : version_no.h
  • WINCVS_PRODUCTVERSION : version_fu.h
  • WINCVS_PRODUCTVERSION_STRING : version_fu.h
  • WINCVSDEBUG_H_INCLUDED : WinCvsDebug.h
  • Windoze95 : CJMenu.cpp
  • WinInitWidgets() : PseudoDlg.cpp
  • WinNT3 : CJMenu.cpp
  • WinNT4orHigher : CJMenu.cpp
  • WM_OUTBAR_NOTIFY : GfxOutBarCtrl.h
  • WM_READ_PROTOCOLS : CvsRootDlg.cpp
  • WM_RESETVIEW : WinCvsBrowser.cpp, BrowseFileView.cpp
  • WM_SMCB_MAX : SmartComboBox.h
  • WM_SMCB_MIN : SmartComboBox.h
  • WM_SMCB_SETFEATURE : SmartComboBox.h
  • WM_SMCB_SETITEMS : SmartComboBox.h
  • WM_SMCB_SETREADONLY : SmartComboBox.h
  • WNT_filename_classes : fnmatch.h, fnmatch.c
  • wnt_fstat() : StdAfx.h, Stat.cpp
  • wnt_lstat() : StdAfx.h, Stat.cpp
  • wnt_unlink() : wincvs_winutil.h, wincvs_winutil.cpp
  • WriteMapFileHeaderandConvertFromDwordAlignToPacked() : dib.h, dib.c
  • WS_EX_FLATEDGE : CJCaption.h
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Namespace Members

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions

Here is a list of all namespace members with links to the namespace documentation for each member:

  • importlib() : Wincvs
Generated on Sat Aug 7 22:58:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Page Index

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WinCvs Source Related Pages

Here is a list of all related documentation pages:
  • Todo List
Generated on Sat Aug 7 22:58:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Todo List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Todo List

Member CleanupLogMsg (const char *msg)
mac : ISO conversion
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Graphical Class Hierarchy

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WinCvs Source Graphical Class Hierarchy

Go to the textual class hierarchy

Generated on Sat Aug 7 22:59:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Alphabetical List

WinCvs Source Class Index

_ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | R | S | T | U | V | W

_
CCVSAlert_MAIN KiIgnoreModel CMultiLineEditDialogKeyHelper tagCTV_ITEM
_afxRichEditCookie UCvsApp KiRecursionModel CMultilineEntryDlg tagMENUITEMINFOA
_dircontents UCvsConsole KiSelectionHandler CMyShellTree CTagParserConsole
_dirdesc CCvsConsole KoAddBinaryHandler
N
tagTCB_ITEM
_frameRec UCvsFiles KoAddHandler CNoPython UTB_BUTTON
_sDiffOptionsItem UCvsFolders KoAddUnicodeHandler NotificationManager UTB_DROPDOWN
A
UCvsFrame KoAnnotateHandler NotificationManager::Node UTB_INIT
CAboutDlg UCvsGraph KoCancelChangesHandler
O
TBehavior
AddBinCvsArgs UCvsMenubar KoCheckoutHandler CObject TbEntry
AddCvsArgs CCvsProcessData KoColumnContext UObject TbEntryButton
AddUnicodeCvsArgs CCvsRootConsole KoCommandLineHandler ColorTableEntry TbEntryChkButton
CAdminOption_MAIN CCvsRootDlg KoCommitHandler ColumnIndex TbEntryDropDown
AFX_DLLVERSIONINFO CCvsRootParser KoConflictColumn ControlCvsArgs TbEntrySeparator
CAllTargets CCvsSandboxInfo KoDateColumn option TBrowserFill
CAnnotate_MAIN UCvsStatusbar KoDiffHandler COptionalPropertySheet TBrowserFillDummy
ansiAttrCvt CCvsStatusBar KoEditorsHandler OUTBAR_INFO TBuggyPopup
ansiAttrCvt::AnsiSeq CCvsStreamConsole KoEncodingColumn
P
CTcl_Interp
AREF UCvsToolbar KoExtColumn CPathBuffer CTCLBrowserEnt
aref
D
KoFileActionHandler PCPStr CTCLCvsConsole
awidget UDC KoFileRemoveHandler PCStr CTCP2Parse
B
CDialog KoFileViewTraversalContext UPen CTCP2Parse::RGBColor
CBarConsole CDiff_MAIN KoFilterMask CPersistent TEditHandler
CBrowseFileView CDiff_Options KoFilterModel CPersistent::CPersistentEntry TEditText
CBrowserBar CDiff_Options::CompareInfo KoGraphAnnotateHandler CPersistentBool CTemplateDlg
UBrush direct KoGraphDiffHandler CPersistentInt CTempToggleBool
CBuffer CDockBar KoGraphHandler CPersistentT TGraph
CButton CDockContext KoIgnoreModel UPoint TGraphCmdStatus
CButton Document (Wincvs) KoImportHandler UPOINT TGraphCurSelector
CButton CDocument KoLockHandler poolRec TGraphDelCmd
CButton DROPDOWNBUTTON KoLogHandler UPPMenu TGraphRectSelect
C
CDummyClass KoMoveToTrashHandler CProgress TGraphSelNonSig
CCharFormat DYN_LIST KoNameColumn CProgressDlg TIconButton
CCheckout_MAIN CDynToolBar KoOptionColumn UPromptMessage TIconCheckBox
CCJBrowseButton
E
KoPathColumn CPropertyPage TIconPopup
CCJBrowseEdit CEdit KoQueryUpdateHandler CPropertySheet UTimer
CCJCaption CEdit KoRecursionModel CProtocolParserConsole CTipDlg
CCJCaptionButton CEdit KoRecursiveModel CPseudoButton TKeyString
CCJCaptionPopupWnd CEdit KoRegularModel UPseudoCmdStatusWrapper TLaunchHandler
CCJCBarButton CEditKeywordDlg KoReleaseHandler CPseudoDlg TMPersistent
CCJColorPicker UEditMessage KoRevisionColumn CPseudoDraw CTmpFiles
CCJColorPopup CEditorMonDlg KoStateColumn UPseudoFakePane TMString
CCJComboBoxEx ENTNODE KoStatusHandler CPseudoItem UToolbar
CCJControlBar EntnodeData KoTagColumn CPseudoList CToolBarCtrl
CCJDateEdit EntnodeFile KoTraversalContext UPseudoPageHider CToolBarData
CCJDateTimeCtrl EntnodeFolder KoUneditHandler UPseudoPlaceHolder TOOLBARINFO
CCJDockBar EntnodePath KoUnlockHandler CPseudoRotButton TPopup
CCJDockContext CExploreBar KoUpdateHandler UPseudoRotButton TPseudoAppBehavior
CCJExplorerBar
F
KoUpdateMoveToTrashHandler CPseudoToggle TPseudoCustomView
CCJFlatButton CFileAction_MAIN KoWatcher UPStr TPseudoDoubleNumberText
CCJFlatComboBox CFileDialog KoWatchersHandler PyAutoObject TPseudoIconButton
CCJFlatHeaderCtrl FileEntry KoWatchOffHandler PyCmdUI TPseudoIconCheckBox
CCJFlatSplitterWnd CFillPyEntries KoWatchOnHandler PyCmdUI::obj_t TPseudoIconPopup
CCJFlatTabCtrl CFillTclEntries
L
PyColorConsole TPseudoRotateIconButton
CCJFontCombo CFilterMaskOptDlg LAttachment PyColorConsole::obj_t TPseudoScrollBar
CCJFrameWnd CFilterSelectionDlg LBevelButton PyContainer TPseudoTextListView
CCJHexEdit CFindSettings LCommander CPyCvsConsole TPseudoWinAdorner
CCJHtmlView CFormView ULIST_INFO PyCvsEntry TPseudoWinBehavior
CCJHyperLink CFrameWnd ULIST_INSERT PyCvsEntry::obj_t TraversalReport
CCJListBox
G
CListBox PyMenuMgr UTREE_INFO
CCJListCtrl garbyRec CListCtrl PyMenuMgr::obj_t UTREE_INSERT
CCJListView GetPassword CListCtrl PyPersistent CTreeCtrl
CCJLogoPane CGetPrefs_CVS CListParserConsole PyPersistent::obj_t CTreeView
CCJMaskEdit CGetPrefs_CVSCMD_DIALOGS CListView PyRegistry TRtagHandler
CCJMDIChildWnd CGetPrefs_GLOBALS LListener CPython_Interp TScrollBar
CCJMDIFrameWnd CGetPrefs_WINCVS LMainPseudoAttachment CPyThreadState TTagHandler
CCJMemFile CGfxGroupEdit CLogFilters
R
TTextListView
CCJMenu CGfxOutBarCtrl CLogFrame URect CTurnOffDispatching
CCJMenuBar CGfxOutBarCtrl::CBarFolder CLogin_MAIN URECT TView
CCJMenuBarFrameHook CGfxOutBarCtrl::CBarItem CLogMain CRectTracker TViewFill
CCJMenuData CGfxSplitterWnd CLogNodeData CRecursionLock
U
CCJMetaFileButton CGraphConsole CLogoutThread CRelease_MAIN CUpdateMain
CCJMiniDockFrameWnd CGraphDoc LOutlineItem RemoveCvsArgs CUpdateMerge
CCJMonthCalCtrl CGraphFrame LOutlineTable ReportConflict CUpdateOptions
CCJOutlookBar CGraphOptDlg LPane ReportWarning CustInvertTable
CCJPagerCtrl CGraphRectTracker LPeriodical CRevisionConsole
V
CCJReBar CGraphView LPlaceHolder CRichEditView vector (std)
CCJReBarCtrl
H
LPseudoDrawAttachment CRtag_MAIN CView
CCJShellTree CHARFORMAT LPseudoWinAttachment CRtag_OPTIONS CViewInfo
CCJSizeDockBar CHeaderCtrl LSReport URuntimeClass CvsAlert
CCJSortClass CHHelpDialog
M
S
CvsArgs
CCJSortClass::CSortItem CHHelpPropertyPage UMacAppMenu CSaveSettingsDlg CvsPrefs
CCJStatusBar CHHelpPropertySheet CMacBinItem CScrollView
W
CCJStatusBarPane CHHelpSupport MACBINMAP CSelectionChangeNotifier UWaitCursor
CCJStatusBarPaneControlInfo CHistComboBoxEx MACBINMAPENTRIES CSelectionDetailsDlg UWidget
CCJTabCtrl
I
MacBinMaps CSelectionDetailsDlg::CompareInfo Win32wstring
CCJTabCtrlBar CImport_MAIN CMacBinTable SelectionDisplayInfo CWinApp
CCJTabView CImport_OPTIONS CMacroEntry USemaphore CWincvsApp
CCJTimeEdit CImportEntry CMacroSet USize CWinCvsBrowser
CCJToolBar CImportFilterDlg MacroTraversal USIZE CWincvsDoc
CCJToolBarBase ImportReport CMainFrame USLIDER CWincvsView
CCJToolBarCtrl CImportWarning CMapPtrToPtr USmartCombo WINDOWPLACEMENT
CCJToolCmdUI CInfoParserConsole match_dir CSmartComboBox WININFO
CCJTreeCtrl CInit_MAIN CMDIChildWnd CSortHeaderCtrl CWinLogBranchData
CCJTreeCtrl::Color_Font irciiAttrCvt CMDIFrameWnd CSortList CWinLogData
CCJWindowPlacement ItemDisplayInfo CMemFile CSortParam CWinLogHeaderData
CCmdLine_MAIN CItemListConsole UMenu CSplashWnd CWinLogRevData
UCmdTarget CItemListDlg CMenu CSplitterWnd CWinLogTagData
CCmdUI CItemListDlg::CompareInfo CMenuItemInfo stat CWinPlacement
UCmdUI ItemRowInfo UMessageMapFunctions CStatic CWinThread
UCOLOR IWincvs (Wincvs) CMfFileDialog CStatic CWnd
UColor
J
CMiniDockFrameWnd CStatic CWnd
CColorConsole CJX_COLORMAP mircAttrCvt CStatic CWnd
CColorMenu CJX_CONTROLPOS CMKeyString CStaticAllocT CWnd
CColorStatic
K
CMMenuString CStatus_MAIN CWnd
CComboBox CKeyString CModuleParserConsole CStatusBar CWnd
CComboBoxEx CKeywordComboBox CMPString UStr CWnd
CCommit_MAIN KeywordDisplayInfo CMsg CStreamConsole CWnd
CCommit_OPTIONS KeywordInfo UMSGMAP CSubclassWnd CWnd
CContentItems keywordMode UMSGMAP_ENTRY CSubclassWndMap CWnd
CControlBar KiColumn CMString
T
CWndAutoCommand
CCtrlView KiColumnModel MultiFiles CTabCtrl CWndRedrawMngr
CCustInvertTable KiFilterBase MultiFilesEntry TAdorner wstring (std)
CCustomizeMenus KiFilterModel MultiFilesEntryIndex CTag_MAIN

_ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | R | S | T | U | V | W

Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class Members - Enumerations

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Properties | Related Functions

  • CharSpacingType : CTCP2Parse
  • ColorType : CTCP2Parse
  • DockFlatBorders : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • EDITMODE : CCJHexEdit
  • EncodingType : CTCP2Parse
  • Feature : USmartCombo
  • kInputChange : CDiff_MAIN
  • STATE : CCJFlatComboBox
  • UDispatchInfo : UCmdTarget
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class Members - Enumeration values

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Properties | Related Functions
a | b | c | d | e | f | g | h | i | k | l | m | n | p | r | u | w | y

- a -

  • AutoDropWidth : USmartCombo

- b -

  • Black : CTCP2Parse
  • Blue : CTCP2Parse
  • brdrAllRaised : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatAll : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatBottom : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatHorizontal : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatLeft : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatRight : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatTop : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • brdrFlatVertical : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd

- c -

  • CACHE_INTERVAL : TGraphCurSelector
  • class_ID : CMacBinTable, UPseudoPageHider, UPseudoPlaceHolder, UPseudoRotButton
  • Cyan : CTCP2Parse

- d -

  • DefaultFeature : USmartCombo

- e -

  • EDIT_ASCII : CCJHexEdit
  • EDIT_HIGH : CCJHexEdit
  • EDIT_LOW : CCJHexEdit
  • EDIT_NONE : CCJHexEdit

- f -

  • fAddGroups : CGfxOutBarCtrl
  • fAnimation : CGfxOutBarCtrl
  • fDragItems : CGfxOutBarCtrl
  • fEditGroups : CGfxOutBarCtrl
  • fEditItems : CGfxOutBarCtrl
  • Fixed : CTCP2Parse
  • fLargeIcon : CGfxOutBarCtrl
  • forceBinary : ReportConflict
  • forceNoKeywords : ReportConflict
  • forceText : ReportConflict
  • forceUnicode : ReportConflict
  • fRemoveGroups : CGfxOutBarCtrl
  • fRemoveItems : CGfxOutBarCtrl
  • fSelHighlight : CGfxOutBarCtrl
  • fSmallIcon : CGfxOutBarCtrl

- g -

  • Green : CTCP2Parse
  • Grey : CTCP2Parse

- h -

  • hasConflict : ReportConflict
  • hasExtension : ReportConflict
  • hasIgnore : ReportConflict
  • hasTypeCreatorConflict : ReportConflict
  • htDownScroll : CGfxOutBarCtrl
  • htFolder : CGfxOutBarCtrl
  • htItem : CGfxOutBarCtrl
  • htNothing : CGfxOutBarCtrl
  • htUpScroll : CGfxOutBarCtrl

- i -

  • IDD : CAboutDlg, CNoPython, CMultilineEntryDlg, CCustomizeMenus, CUpdateMerge, CUpdateOptions, CUpdateMain, CTemplateDlg, CTag_MAIN, CStatus_MAIN, CSelectionDetailsDlg, CSaveSettingsDlg, CRtag_OPTIONS, CRtag_MAIN, CRelease_MAIN, CProgressDlg, CLogin_MAIN, CLogFilters, CLogMain, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImportEntry, CImportWarning, CImportFilterDlg, CImport_OPTIONS, CImport_MAIN, CGraphOptDlg, CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CFileAction_MAIN, CEditorMonDlg, CDiff_Options, CDiff_MAIN, CEditKeywordDlg, CCvsRootDlg, CCVSAlert_MAIN, CCommit_OPTIONS, CCommit_MAIN, CCheckout_MAIN, CAnnotate_MAIN, CAdminOption_MAIN
  • ircAll : CGfxOutBarCtrl
  • ircIcon : CGfxOutBarCtrl
  • ircLabel : CGfxOutBarCtrl
  • isBinary : ReportConflict
  • iso8859_1 : CTCP2Parse
  • iso8859_2 : CTCP2Parse
  • iso8859_3 : CTCP2Parse
  • iso8859_4 : CTCP2Parse
  • iso8859_5 : CTCP2Parse
  • iso8859_6 : CTCP2Parse
  • iso8859_7 : CTCP2Parse
  • iso8859_8 : CTCP2Parse
  • iso8859_9 : CTCP2Parse
  • isUnicode : ReportConflict

- k -

  • kBrowserPopup : UCvsFrame
  • kCancel : UEditMessage, UPromptMessage
  • kConflict : EntnodeFile, ColumnIndex
  • kDefaultPrecision : TPseudoDoubleNumberText
  • kDefRev1Change : CDiff_MAIN
  • kDefRev2Change : CDiff_MAIN
  • kDefTypeChange : CDiff_MAIN
  • kDirCombo : UCvsFrame
  • kDrawing : UCvsGraph
  • kEdit : UEditMessage
  • kEncoding : EntnodeFile, ColumnIndex
  • kEnd : ColumnIndex
  • kEndHandle : KoWatcher
  • kExt : EntnodeFile
  • kExtention : ColumnIndex
  • Keyword : USmartCombo
  • kItemImgBlank : CItemListDlg
  • kItemImgBranch : CItemListDlg
  • kItemImgBranchAndRevision : CItemListDlg
  • kItemImgDir : CItemListDlg
  • kItemImgFile : CItemListDlg
  • kItemImgModule : CItemListDlg
  • kItemImgRevision : CItemListDlg
  • kItemImgUpDir : CItemListDlg
  • kMsg : UEditMessage, UPromptMessage
  • kMultiClickSelection : TPseudoTextListView
  • kName : EntnodeData, ColumnIndex
  • kNotifyHandle : KoWatcher
  • kOK : UEditMessage, UPromptMessage
  • kOption : EntnodeFile, ColumnIndex
  • kPath : EntnodeData, ColumnIndex
  • kProcessTimer : UCvsApp
  • kPseudoWinAdorner : TPseudoWinAdorner
  • kPseudoWinBehavior : TPseudoWinBehavior
  • kRevision : ColumnIndex
  • kSelectionChanged : TPseudoTextListView
  • kStartHandle : KoWatcher
  • kState : EntnodeData, ColumnIndex
  • kStdDoubleNumberText : TPseudoDoubleNumberText
  • kStickyTag : ColumnIndex
  • kTag : EntnodeFile
  • kTerminateHandle : KoWatcher
  • kTextStringListViewSignature : TPseudoTextListView
  • kTimeStamp : ColumnIndex
  • kTS : EntnodeFile
  • kUDispatchHandled : UCmdTarget
  • kUNoDispatchInfo : UCmdTarget
  • kVN : EntnodeFile

- l -

  • Lt_Blue : CTCP2Parse
  • Lt_Cyan : CTCP2Parse
  • Lt_Green : CTCP2Parse
  • Lt_Grey : CTCP2Parse
  • Lt_Magenta : CTCP2Parse
  • Lt_Red : CTCP2Parse
  • Lt_Yellow : CTCP2Parse

- m -

  • Magenta : CTCP2Parse
  • MAX_CHAR_BY_LINE : UCvsConsole

- n -

  • noConflict : ReportConflict
  • None : USmartCombo
  • NORMAL : CCJFlatComboBox

- p -

  • PRESSED : CCJFlatComboBox
  • Proportional : CTCP2Parse

- r -

  • RAISED : CCJFlatComboBox
  • ReadOnly : USmartCombo
  • Red : CTCP2Parse
  • RemoveItems : USmartCombo

- u -

  • userFlags : ReportConflict
  • UTF_8 : CTCP2Parse

- w -

  • White : CTCP2Parse
  • WM_FILECHANGE : KoWatcher

- y -

  • Yellow : CTCP2Parse
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class Members - Functions

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Properties | Related Functions
_ | a | b | c | d | e | f | g | h | i | k | l | m | n | o | p | q | r | s | t | u | v | w | z | ~

- _ -

  • _AddBar() : CCJReBar
  • _AddButton() : PyMenuMgr
  • _AddPulldown() : PyMenuMgr
  • _AddSeparator() : PyMenuMgr
  • _AddToggle() : PyMenuMgr
  • _afxRichEditCookie() : _afxRichEditCookie
  • _Count() : PyMenuMgr
  • _Delete() : PyMenuMgr
  • _DeleteByCmd() : PyMenuMgr
  • _Enable() : PyCmdUI
  • _GetBaseClass() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, CPersistentInt, CPersistentBool, CPersistent, CMPString, CMString, PCStr, PCPStr, UEditMessage, UPromptMessage, UWidget, UToolbar, UObject, UMenu, UCmdTarget, UMacAppMenu
  • _GetValue() : PyPersistent
  • _Print() : PyColorConsole
  • _SetCheck() : PyCmdUI
  • _SetText() : PyCmdUI
  • _SetValue() : PyPersistent

- a -

  • ActionBrowseModule() : CMultilineEntryDlg
  • ActionBrowseTag() : CMultilineEntryDlg
  • ActionFormatCvsRoot() : CMultilineEntryDlg
  • ActionOpenEditor() : CMultilineEntryDlg
  • ActionOpenTemplate() : CMultilineEntryDlg
  • ActivateBrowserView() : CWincvsApp
  • ActivateSelf() : UPseudoFakePane
  • AdaptToSuperFrameSize() : UPseudoFakePane
  • add() : MultiFilesEntry, CvsArgs
  • Add() : CSubclassWndMap, CMacroSet
  • AddAction() : CMultilineEntryDlg
  • AddBar() : CCJReBar
  • AddBitmapToImageList() : CCJMenu
  • AddButton() : PyMenuMgr
  • AddButtons() : CCJToolBar
  • AddColumn() : CCJListView, CCJListCtrl
  • AddColumns() : CBrowseFileView
  • AddControl() : CCJStatusBar, CvsPrefs
  • AddDropDownButton() : CCJToolBar
  • AddEntry() : MacBinMaps
  • addfile() : RemoveCvsArgs, ControlCvsArgs, CvsArgs
  • AddFolder() : CGfxOutBarCtrl
  • AddFolderBar() : CGfxOutBarCtrl
  • AddFromToolBar() : CCJMenu
  • AddIndicator() : CCJStatusBar
  • AddListener() : UWidget
  • AddPage() : UWidget
  • AddPattern() : ReportConflict
  • AddPulldown() : PyMenuMgr
  • AddReplaceBitmap() : CCJToolBar
  • AddSeparator() : PyMenuMgr
  • AddString() : CHistComboBoxEx, CCJComboBoxEx
  • AddStrings() : CCJToolBar
  • AddTimer() : UWidget
  • AddToggle() : PyMenuMgr
  • AddTooltip() : UWidget
  • AddToolTip() : CCJTabCtrlBar
  • AddView() : CCJTabView, CCJTabCtrlBar
  • AddWarning() : ReportWarning
  • AdjustSize() : CStaticAllocT< T >
  • AlwaysUseCvsroot() : CvsPrefs
  • AnimateFolderScroll() : CGfxOutBarCtrl
  • ansi2ctcp() : ansiAttrCvt
  • AnsiSeq() : ansiAttrCvt::AnsiSeq
  • append() : CBuffer
  • Append() : CCJMemFile
  • AppendColorMenuItem() : CColorMenu
  • AppendMenuA() : CCJMenu
  • AppendMenuW() : CCJMenu
  • AppendODMenuA() : CCJMenu
  • AppendODMenuW() : CCJMenu
  • AppendODPopupMenuA() : CCJMenu
  • AppendODPopupMenuW() : CCJMenu
  • aref() : aref
  • Argc() : CvsArgs
  • Argv() : CvsArgs
  • AskForQuitting() : UCvsFrame
  • AssociateImageIndexWithRuntimeClass() : CCJTabCtrlBar
  • AutoSaveColumns() : CCJListView, CCJListCtrl
  • AutoSize() : CCJToolBar
  • AutoSizeColumn() : CCJListView, CCJListCtrl
  • awidget() : awidget

- b -

  • BeforeNavigate2() : CCJHtmlView
  • BeforeUpdateUI() : UWidget
  • begin() : TMString< T >, MultiFiles
  • BeginDrag() : CCJReBarCtrl
  • BottomRight() : URect
  • Bounds() : CWinLogData
  • Browser() : CvsPrefs
  • BuildColumns() : CCJListView, CCJListCtrl

- c -

  • c_str() : UStr, UPStr
  • CAboutDlg() : CAboutDlg
  • CAdminOption_MAIN() : CAdminOption_MAIN
  • CalcDroppedWidth() : CHistComboBoxEx, CSmartComboBox, USmartCombo
  • CalcDynamicLayout() : CCJToolBar, CCJSizeDockBar, CCJReBar, CCJControlBar
  • CalcFixedLayout() : CCJToolBar, CCJReBar, CCJMenuBar, CCJDockBar
  • CalcImageSize() : CGraphView, UCvsGraph
  • CalcInsideRect() : CCJToolBarBase
  • CalcLayout() : CCJToolBar
  • CalcPos() : CCJHexEdit
  • CalcSize() : CCJToolBar
  • CalcSizeBarLayout() : CCJSizeDockBar
  • CalcViewRect() : CCJTabView
  • CalcWndTextSize() : CCVSAlert_MAIN
  • CallInitValues() : PyRegistry
  • CAllTargets() : CAllTargets
  • CancelMenuAndTrackNewOne() : CCJMenuBar
  • CanContinue() : UCmdUI
  • CanDockDockBar() : CCJDockContext
  • CAnnotate_MAIN() : CAnnotate_MAIN
  • CanPaste() : CWincvsView
  • CBarConsole() : CBarConsole
  • CBarFolder() : CGfxOutBarCtrl::CBarFolder
  • CBarItem() : CGfxOutBarCtrl::CBarItem
  • CBrowseFileView() : CBrowseFileView
  • CBrowserBar() : CBrowserBar
  • CBuffer() : CBuffer
  • CCharFormat() : CCharFormat
  • CCheckout_MAIN() : CCheckout_MAIN
  • CCJBrowseButton() : CCJBrowseButton
  • CCJBrowseEdit() : CCJBrowseEdit
  • CCJCaption() : CCJCaption
  • CCJCaptionPopupWnd() : CCJCaptionPopupWnd
  • CCJColorPicker() : CCJColorPicker
  • CCJColorPopup() : CCJColorPopup
  • CCJComboBoxEx() : CCJComboBoxEx
  • CCJControlBar() : CCJControlBar
  • CCJDateEdit() : CCJDateEdit
  • CCJDateTimeCtrl() : CCJDateTimeCtrl
  • CCJDockBar() : CCJDockBar
  • CCJDockContext() : CCJDockContext
  • CCJExplorerBar() : CCJExplorerBar
  • CCJFlatButton() : CCJFlatButton
  • CCJFlatComboBox() : CCJFlatComboBox
  • CCJFlatHeaderCtrl() : CCJFlatHeaderCtrl
  • CCJFlatSplitterWnd() : CCJFlatSplitterWnd
  • CCJFlatTabCtrl() : CCJFlatTabCtrl
  • CCJFontCombo() : CCJFontCombo
  • CCJFrameWnd() : CCJFrameWnd
  • CCJHexEdit() : CCJHexEdit
  • CCJHtmlView() : CCJHtmlView
  • CCJHyperLink() : CCJHyperLink
  • CCJListBox() : CCJListBox
  • CCJListCtrl() : CCJListCtrl
  • CCJListView() : CCJListView
  • CCJLogoPane() : CCJLogoPane
  • CCJMaskEdit() : CCJMaskEdit
  • CCJMDIChildWnd() : CCJMDIChildWnd
  • CCJMDIFrameWnd() : CCJMDIFrameWnd
  • CCJMemFile() : CCJMemFile
  • CCJMenu() : CCJMenu
  • CCJMenuBar() : CCJMenuBar
  • CCJMenuBarFrameHook() : CCJMenuBarFrameHook
  • CCJMenuData() : CCJMenuData
  • CCJMetaFileButton() : CCJMetaFileButton
  • CCJMiniDockFrameWnd() : CCJMiniDockFrameWnd
  • CCJMonthCalCtrl() : CCJMonthCalCtrl
  • CCJOutlookBar() : CCJOutlookBar
  • CCJPagerCtrl() : CCJPagerCtrl
  • CCJReBar() : CCJReBar
  • CCJReBarCtrl() : CCJReBarCtrl
  • CCJSizeDockBar() : CCJSizeDockBar
  • CCJSortClass() : CCJSortClass
  • CCJStatusBar() : CCJStatusBar
  • CCJStatusBarPane() : CCJStatusBarPane
  • CCJStatusBarPaneControlInfo() : CCJStatusBarPaneControlInfo
  • CCJTabCtrl() : CCJTabCtrl
  • CCJTabCtrlBar() : CCJTabCtrlBar
  • CCJTabView() : CCJTabView
  • CCJTimeEdit() : CCJTimeEdit
  • CCJToolBar() : CCJToolBar
  • CCJToolBarBase() : CCJToolBarBase
  • CCJToolBarCtrl() : CCJToolBarCtrl
  • CCJTreeCtrl() : CCJTreeCtrl
  • CCJWindowPlacement() : CCJWindowPlacement
  • CCmdLine_MAIN() : CCmdLine_MAIN
  • CColorConsole() : CColorConsole
  • CColorMenu() : CColorMenu
  • CColorStatic() : CColorStatic
  • CCommit_MAIN() : CCommit_MAIN
  • CCommit_OPTIONS() : CCommit_OPTIONS
  • CContentItems() : CContentItems
  • CCustInvertTable() : CCustInvertTable
  • CCustomizeMenus() : CCustomizeMenus
  • CCVSAlert_MAIN() : CCVSAlert_MAIN
  • CCvsProcessData() : CCvsProcessData
  • CCvsRootConsole() : CCvsRootConsole
  • CCvsRootDlg() : CCvsRootDlg
  • CCvsSandboxInfo() : CCvsSandboxInfo
  • CCvsStatusBar() : CCvsStatusBar
  • CCvsStreamConsole() : CCvsStreamConsole
  • CDiff_MAIN() : CDiff_MAIN
  • CDiff_Options() : CDiff_Options
  • CDummyClass() : CDummyClass
  • CDynToolBar() : CDynToolBar
  • CEditKeywordDlg() : CEditKeywordDlg
  • CEditorMonDlg() : CEditorMonDlg
  • CenterPoint() : URect
  • CExploreBar() : CExploreBar
  • CFileAction_MAIN() : CFileAction_MAIN
  • CFillPyEntries() : CFillPyEntries
  • CFillTclEntries() : CFillTclEntries
  • CFilterMaskOptDlg() : CFilterMaskOptDlg
  • CFilterSelectionDlg() : CFilterSelectionDlg
  • CFindSettings() : CFindSettings
  • CGetPrefs_CVS() : CGetPrefs_CVS
  • CGetPrefs_CVSCMD_DIALOGS() : CGetPrefs_CVSCMD_DIALOGS
  • CGetPrefs_GLOBALS() : CGetPrefs_GLOBALS
  • CGetPrefs_WINCVS() : CGetPrefs_WINCVS
  • CGfxGroupEdit() : CGfxGroupEdit
  • CGfxOutBarCtrl() : CGfxOutBarCtrl
  • CGfxSplitterWnd() : CGfxSplitterWnd
  • CGraphConsole() : CGraphConsole
  • CGraphDoc() : CGraphDoc
  • CGraphFrame() : CGraphFrame
  • CGraphOptDlg() : CGraphOptDlg
  • CGraphRectTracker() : CGraphRectTracker
  • CGraphView() : CGraphView
  • ChangeLocation() : CMainFrame
  • ChangeSelection() : CCJColorPopup
  • Check() : UCmdUI
  • CheckButton() : CCJToolBar
  • CheckChanges() : CBrowseFileView
  • CheckChar() : CCJMaskEdit
  • CheckIn() : NotificationManager
  • CheckOut() : NotificationManager
  • CheckoutRO() : CvsPrefs
  • CheckSettings() : CItemListDlg
  • CheckTextColor() : CCJColorPicker
  • CheckWindowSize() : LPseudoWinAttachment
  • CHHelpDialog() : CHHelpDialog
  • CHHelpPropertyPage() : CHHelpPropertyPage
  • CHHelpPropertySheet() : CHHelpPropertySheet
  • CHHelpSupport() : CHHelpSupport
  • CHistComboBoxEx() : CHistComboBoxEx
  • CImport_MAIN() : CImport_MAIN
  • CImport_OPTIONS() : CImport_OPTIONS
  • CImportEntry() : CImportEntry
  • CImportFilterDlg() : CImportFilterDlg
  • CImportWarning() : CImportWarning
  • CInfoParserConsole() : CInfoParserConsole
  • CInit_MAIN() : CInit_MAIN
  • CItemListConsole() : CItemListConsole
  • CItemListDlg() : CItemListDlg
  • CKeyString() : CKeyString
  • CKeywordComboBox() : CKeywordComboBox
  • Clear() : CPathBuffer, CGraphDoc, CCvsRootParser
  • clear() : UStr, UPStr
  • ClearAll() : KoFilterModel
  • ClearFilters() : CMainFrame
  • ClearSelection() : CCJTreeCtrl
  • CListParserConsole() : CListParserConsole
  • CLogFilters() : CLogFilters
  • CLogFrame() : CLogFrame
  • CLogin_MAIN() : CLogin_MAIN
  • CLogMain() : CLogMain
  • CLogoutThread() : CLogoutThread
  • Close() : CCJMemFile
  • ClosePythonSupport() : CPython_Interp
  • CMacBinItem() : CMacBinItem
  • CMacBinTable() : CMacBinTable
  • CMacroEntry() : CMacroEntry
  • CMacroSet() : CMacroSet
  • CMainFrame() : CMainFrame
  • CMenuItemInfo() : CMenuItemInfo
  • CMfFileDialog() : CMfFileDialog
  • CMKeyString() : CMKeyString
  • CMMenuString() : CMMenuString
  • CModuleParserConsole() : CModuleParserConsole
  • CMPString() : CMPString
  • CMsg() : CMsg
  • CMString() : CMString
  • CMultiLineEditDialogKeyHelper() : CMultiLineEditDialogKeyHelper
  • CMultilineEntryDlg() : CMultilineEntryDlg
  • CNoPython() : CNoPython
  • CollectMergePointPairPass1() : CWinLogData
  • CollectMergePointPairPass1Self() : CWinLogRevData, CWinLogData
  • CollectMergePointPairPass2() : CWinLogData
  • CollectMergePointPairPass2Self() : CWinLogRevData, CWinLogData
  • ColumnIndex() : ColumnIndex
  • CommandToIndex() : CCJToolBar
  • compare() : UStr
  • Compare() : CCJSortClass, CMKeyString, TKeyString< delimiter >, TMString< T >, ENTNODE, EntnodeData, KiColumn, KoConflictColumn, KoDateColumn, KoTagColumn, KoStateColumn, KoEncodingColumn, KoOptionColumn, KoRevisionColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • CompareItems() : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • CompareRevisions() : KoRevisionColumn
  • ComputeBounds() : CWinLogData
  • ComputeMenuTrackPoint() : CCJMenuBar
  • Concatenate() : TKeyString< delimiter >
  • ConsoleFont() : CvsPrefs
  • construct_() : TGraphCurSelector
  • ControlCvsArgs() : ControlCvsArgs
  • convert() : Win32wstring
  • COptionalPropertySheet() : COptionalPropertySheet
  • CopyRect() : URect
  • CopyReturn() : PyAutoObject< T >
  • CopyRow() : CCJListView, CCJListCtrl
  • Count() : PyMenuMgr
  • CPathBuffer() : CPathBuffer
  • CPersistent() : CPersistent
  • CPersistentBool() : CPersistentBool
  • CPersistentInt() : CPersistentInt
  • CPersistentT() : CPersistentT< T >
  • CProgress() : CProgress
  • CProgressDlg() : CProgressDlg
  • CProtocolParserConsole() : CProtocolParserConsole
  • CPseudoButton() : CPseudoButton
  • CPseudoDlg() : CPseudoDlg
  • CPseudoDraw() : CPseudoDraw
  • CPseudoItem() : CPseudoItem
  • CPseudoList() : CPseudoList
  • CPseudoRotButton() : CPseudoRotButton
  • CPseudoToggle() : CPseudoToggle
  • CPyCvsConsole() : CPyCvsConsole
  • CPython_Interp() : CPython_Interp
  • CPyThreadState() : CPyThreadState
  • Create() : CWinCvsBrowser, CSplashWnd, CMultilineEntryDlg, CMultiLineEditDialogKeyHelper, CExploreBar, CGfxOutBarCtrl, CCJToolBarCtrl, CCJToolBar, CCJTabCtrl, CCJReBarCtrl, CCJReBar, CCJPagerCtrl, CCJMiniDockFrameWnd, CCJMenuBar, CCJLogoPane, CCJHtmlView, CCJHexEdit, CCJExplorerBar, CCJMonthCalCtrl, CCJDateTimeCtrl, CCJControlBar, CCJComboBoxEx, CCJColorPopup, CCJCaptionPopupWnd, CCJCaption, CCJBrowseButton, CBrowserBar, SelectionDisplayInfo, PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry, CProgressDlg, ItemDisplayInfo, KeywordDisplayInfo
  • CreateAddressCaret() : CCJHexEdit
  • CreateEditCaret() : CCJHexEdit
  • CreateEx() : CCJToolBar, CCJMenuBar
  • CreateHelpIDsData() : CHHelpSupport
  • CreateLocationCombo() : CMainFrame
  • CreateNewData() : CWinLogData
  • CreateObject() : UObject, URuntimeClass
  • CreatePen() : UPen
  • CreateSolidBrush() : UBrush
  • CreateStatusBar() : CMainFrame
  • CreateTabFont() : CCJFlatTabCtrl
  • CreateTabListItem() : CCJTabCtrlBar
  • CreateTabView() : CCJTabCtrlBar
  • CreateToolbar() : CMainFrame
  • CreateToolTips() : CCJColorPopup
  • CRecursionLock() : CRecursionLock
  • CRelease_MAIN() : CRelease_MAIN
  • CRevisionConsole() : CRevisionConsole
  • CRtag_MAIN() : CRtag_MAIN
  • CRtag_OPTIONS() : CRtag_OPTIONS
  • CSaveSettingsDlg() : CSaveSettingsDlg
  • CSelectionChangeNotifier() : CSelectionChangeNotifier
  • CSelectionDetailsDlg() : CSelectionDetailsDlg
  • CSmartComboBox() : CSmartComboBox
  • CSortHeaderCtrl() : CSortHeaderCtrl
  • CSortItem() : CCJSortClass::CSortItem
  • CSortList() : CSortList< T >
  • CSortParam() : CSortParam
  • CSplashWnd() : CSplashWnd
  • CStaticAllocT() : CStaticAllocT< T >
  • CStatus_MAIN() : CStatus_MAIN
  • CStreamConsole() : CStreamConsole
  • CSubclassWnd() : CSubclassWnd
  • CSubclassWndMap() : CSubclassWndMap
  • CTag_MAIN() : CTag_MAIN
  • CTagParserConsole() : CTagParserConsole
  • CTcl_Interp() : CTcl_Interp
  • CTCLBrowserEnt() : CTCLBrowserEnt
  • CTCLCvsConsole() : CTCLCvsConsole
  • CTCP2Parse() : CTCP2Parse
  • CTemplateDlg() : CTemplateDlg
  • CTempToggleBool() : CTempToggleBool
  • CTipDlg() : CTipDlg
  • CtlColor() : CCJHyperLink
  • CTmpFiles() : CTmpFiles
  • CtrlPressedOnOK() : CvsPrefs
  • CTurnOffDispatching() : CTurnOffDispatching
  • CUpdateMain() : CUpdateMain
  • CUpdateMerge() : CUpdateMerge
  • CUpdateOptions() : CUpdateOptions
  • Customize() : CCJToolBar
  • cvs_err() : CGraphConsole, CTCLCvsConsole, CPyCvsConsole, CItemListConsole, CCvsRootConsole, CCvsStreamConsole, CCvsConsole
  • cvs_out() : CGraphConsole, CTCLCvsConsole, CPyCvsConsole, CItemListConsole, CCvsRootConsole, CCvsStreamConsole, CCvsConsole
  • CvsAlert() : CvsAlert
  • CvsArgs() : CvsArgs
  • CvsConsole() : CvsPrefs
  • CvsPrefs() : CvsPrefs
  • CvsVersion() : CvsPrefs
  • CWincvsApp() : CWincvsApp
  • CWinCvsBrowser() : CWinCvsBrowser
  • CWincvsDoc() : CWincvsDoc
  • CWincvsView() : CWincvsView
  • CWinLogBranchData() : CWinLogBranchData
  • CWinLogData() : CWinLogData
  • CWinLogHeaderData() : CWinLogHeaderData
  • CWinLogRevData() : CWinLogRevData
  • CWinLogTagData() : CWinLogTagData
  • CWinPlacement() : CWinPlacement
  • CWndAutoCommand() : CWndAutoCommand
  • CWndRedrawMngr() : CWndRedrawMngr

- d -

  • Data() : ENTNODE
  • DeactivateSelf() : UPseudoFakePane
  • dealloc() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • DECLARE_DYNAMIC() : CSubclassWnd
  • DECLARE_DYNCREATE() : CCJColorPicker
  • decodeColor() : CTCP2Parse
  • decodeToggle() : CTCP2Parse
  • Default() : CSubclassWnd
  • DeflateRect() : URect
  • DelegateRun() : KoWatcher
  • Delete() : CLogoutThread, CSortList< T >, PyMenuMgr
  • DeleteAllItems() : CWinCvsBrowser, CCJFlatTabCtrl, UCvsFolders, CSelectionDetailsDlg, CItemListDlg, CCvsRootDlg
  • DeleteBand() : CCJReBarCtrl
  • DeleteButton() : CCJToolBar
  • DeleteByCmd() : PyMenuMgr
  • DeleteColumns() : CBrowseFileView
  • DeleteItem() : CCJFlatTabCtrl, CCJComboBoxEx
  • DeleteMenu() : CCJMenu
  • DeleteMenuList() : CCJMenu
  • DeleteObject() : UBrush, UPen
  • DeleteView() : CCJTabCtrlBar
  • DelItemAt() : TPseudoTextListView
  • DelKeyTest() : CHistComboBoxEx, CSmartComboBox
  • DestroyMenu() : CCJMenu
  • Deunixfy() : CTcl_Interp
  • Dir() : CCJComboBoxEx
  • DisableColumnSizing() : CCJListView, CCJListCtrl
  • DisableCommon() : CWinCvsBrowser, CGraphView, CExploreBar, CMyShellTree, CBrowseFileView
  • DisableFlatLook() : CCJFlatButton
  • DisableFlatStyle() : CCJFlatSplitterWnd
  • DisableGeneric() : UCvsFolders, UCvsFiles
  • DisableSplashScreen() : CvsPrefs
  • DisableUpdate() : CGraphView
  • DisableUserSettings() : ReportConflict
  • Discard() : CCJMemFile
  • Dismiss() : UWidget
  • DisplayItems() : CItemListDlg
  • DisplayKeywords() : CCvsRootDlg
  • DisplaySelection() : CSelectionDetailsDlg
  • DitherBlt() : CCJMenu
  • DitherBlt2() : CCJMenu
  • do_C() : ansiAttrCvt
  • do_m() : ansiAttrCvt
  • DockControlBarLeftOf() : CMainFrame, CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • DockSizeBar() : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd, CCJDockContext
  • DocumentComplete() : CCJHtmlView
  • DoDataExchange() : CAboutDlg, CTipDlg, CNoPython, CMultilineEntryDlg, CHHelpDialog, CHHelpPropertyPage, CCustomizeMenus, CUpdateMerge, CUpdateOptions, CUpdateMain, CTemplateDlg, CTag_MAIN, CStatus_MAIN, CSelectionDetailsDlg, CSaveSettingsDlg, CRtag_OPTIONS, CRtag_MAIN, CRelease_MAIN, CProgressDlg, CLogin_MAIN, CLogFilters, CLogMain, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImportEntry, CImportWarning, CImportFilterDlg, CImport_OPTIONS, CImport_MAIN, CGraphOptDlg, CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CFileAction_MAIN, CEditorMonDlg, CDiff_Options, CDiff_MAIN, CEditKeywordDlg, CCvsRootDlg, CCVSAlert_MAIN, CCommit_OPTIONS, CCommit_MAIN, CCheckout_MAIN, UEditMessage, UPromptMessage, CAnnotate_MAIN, CAdminOption_MAIN, UWidget, CPseudoDlg
  • DoDrag() : CBrowseFileView
  • DoEvent() : TPseudoWinBehavior
  • DoFile() : CTcl_Interp, CPython_Interp
  • DoIdle() : TPseudoAppBehavior
  • DoKeyEvent() : TPseudoTextListView
  • DoMenuCommand() : TPseudoAppBehavior
  • DoModal() : CMfFileDialog, COptionalPropertySheet, UWidget
  • DoMouseCommand() : TPseudoTextListView
  • DoMouseCommand_SelectCells() : TPseudoTextListView
  • DoOnContextMenu() : CHHelpSupport
  • DoOnHelpInfo() : CHHelpSupport
  • DoPaint() : CCJToolBarBase, CCJSizeDockBar
  • DoPostCreate() : TBuggyPopup
  • DoRotate() : UPseudoPageHider, UPseudoPlaceHolder, UPseudoRotButton, CPseudoRotButton, TPseudoRotateIconButton
  • DoScript() : CTcl_Interp, CPython_Interp
  • DoScriptVar() : CTcl_Interp, CPython_Interp
  • DoSetupMenus() : TPseudoAppBehavior
  • DoToolboxEvent() : TPseudoAppBehavior
  • DoubleClick() : CMacBinItem, CPseudoItem
  • DoValidUI() : UWidget
  • DragMove() : CCJReBarCtrl
  • Draw() : TPseudoCustomView
  • Draw3DCheckmark() : CCJMenu
  • DrawAnimItem() : CGfxOutBarCtrl
  • DrawBitmap() : UDC
  • DrawBorders() : CCJToolBarBase, CCJSizeDockBar, CCJControlBar
  • DrawButtonBitmap() : CCJFlatButton, CPseudoButton
  • DrawButtonIcon() : CCJFlatButton, CCJCBarButton
  • DrawButtonText() : CCJFlatButton, CCJCaptionButton
  • DrawCaptionBack() : CCJCaption
  • DrawCaptionIcon() : CCJCaption
  • DrawCaptionText() : CCJCaption
  • DrawCell() : CCJColorPopup, CPseudoItem
  • DrawCheckMark() : CCJMenu
  • DrawCombo() : CCJFlatComboBox
  • DrawDragArrow() : CGfxOutBarCtrl
  • DrawFlatBorder() : CCJFlatHeaderCtrl
  • DrawFolder() : CGfxOutBarCtrl
  • DrawGriperCaption() : CCJControlBar
  • DrawGripper() : CCJToolBarBase, CCJControlBar
  • DrawItem() : CSortHeaderCtrl, CCvsStatusBar, CGfxOutBarCtrl, CCJOutlookBar, CCJMetaFileButton, CCJMenu, CCJFontCombo, CCJFlatHeaderCtrl, CCJFlatButton, CCJColorPicker, CColorMenu, CPseudoToggle, CPseudoButton
  • DrawRadioDot() : CCJMenu
  • DrawRowAdornments() : CMacBinItem, CPseudoItem
  • DrawTab() : CCJFlatTabCtrl
  • DropFiles() : CMainFrame
  • Duplicate() : CCJMemFile

- e -

  • EditCell() : CMacBinItem
  • EditSel() : UCvsFiles
  • empty() : UStr, UPStr
  • Empty() : KoFilterMask
  • Enable() : CCJToolCmdUI, PyCmdUI, UCmdUI
  • EnableAutoCompletion() : CCJFlatComboBox
  • EnableButton() : CCJToolBar
  • EnableButtons() : CCJFlatTabCtrl
  • EnableCmdLineDiffOptions() : CDiff_MAIN
  • EnableCompareType() : CDiff_MAIN
  • EnableControls() : CSelectionDetailsDlg, CItemListDlg, CCvsRootDlg
  • EnableDateRev() : CItemListDlg
  • EnableDocking() : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • EnableDockingOnSizeBar() : CCJControlBar
  • EnableDockingSizeBar() : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • EnableEditControls() : CCvsRootDlg
  • EnableFlatLook() : CCJControlBar
  • EnableHeaderFilters() : CSortHeaderCtrl
  • EnableMultiSelect() : CCJTreeCtrl
  • EnableSaveState() : CCJControlBar
  • EnableSplashScreen() : CSplashWnd
  • EnableToolTips() : CCJTabCtrlBar
  • EnableWndContextHelp() : CHHelpSupport
  • EncryptCommunication() : CvsPrefs
  • end() : TMString< T >, MultiFiles
  • EndDialog() : UWidget
  • EndDrag() : CCJReBarCtrl
  • EndDragDockBar() : CCJDockContext
  • EndModal() : UWidget
  • EndSelection() : CCJColorPopup
  • endsWith() : UStr, UPStr
  • EnsureSelchangeMatch() : CSmartComboBox
  • EnterDirectory() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, LSReport, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • EnterFolder() : CBrowseFileView
  • ENTNODE() : ENTNODE
  • EntnodeData() : EntnodeData
  • EntnodeFile() : EntnodeFile
  • EntnodeFolder() : EntnodeFolder
  • EntnodePath() : EntnodePath
  • Entries() : MacBinMaps
  • Entry() : CSortList< T >
  • EnumFontProc() : CCJFontCombo
  • EqualRect() : URect
  • EraseNonClient() : CCJToolBarBase, CCJSizeDockBar, CCJControlBar
  • Execute() : UCvsApp
  • ExecuteSelf() : LPseudoWinAttachment, LMainPseudoAttachment, UPseudoPageHider, LPseudoDrawAttachment
  • ExecWB() : CCJHtmlView
  • ExitDirectory() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, LSReport, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • ExitInstance() : CWincvsApp
  • ExtDiff() : CvsPrefs
  • Extract() : CCJMemFile
  • extractcolor() : mircAttrCvt

- f -

  • False() : PyContainer
  • FeedThisLine() : UCvsConsole
  • FileAction() : CGraphView
  • FileActionType() : CvsPrefs
  • FileEntry() : FileEntry
  • FileIsType() : AddUnicodeCvsArgs, AddBinCvsArgs, AddCvsArgs, ControlCvsArgs
  • FillProtocolsComboBox() : CCvsRootDlg
  • Find() : CPersistent, TMString< T >
  • find() : UStr
  • FindBestRoot() : CHistComboBoxEx
  • FindCellFromColor() : CCJColorPopup
  • FindData() : CCJMemFile
  • FindDropDownButton() : CCJToolBar
  • FindItem() : CCJTreeCtrl
  • FindKeyboardShortcut() : CCJMenu
  • FindMenuList() : CCJMenu
  • FindMenuOption() : CCJMenu
  • FindMethod() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • FindString() : CCJComboBoxEx
  • FinishCreateSelf() : CMacBinTable, UPseudoPlaceHolder
  • FlatBorder() : CCJSizeDockBar
  • Flush() : CCJMemFile, CMacroSet
  • FlushDisplay() : CProgressDlg
  • ForceAbort() : CProgress
  • ForceBinary() : ReportConflict
  • ForceNoKeywords() : ReportConflict
  • ForceText() : ReportConflict
  • ForceUnicode() : ReportConflict
  • FormatEntrryPrefix() : CBrowseFileView
  • FormatLineBreakHint() : CMultiLineEditDialogKeyHelper
  • FormatOleDateTime() : CCJTimeEdit, CCJDateEdit
  • ForwardMouse() : CCJPagerCtrl
  • FreshenFileMask() : UCvsFrame
  • fromHex() : CTCP2Parse

- g -

  • get() : MultiFilesEntry
  • Get() : CSortList< T >, CAllTargets
  • GetActiveView() : CCJTabView, CCJTabCtrlBar
  • GetAddressBar() : CCJHtmlView
  • GetAlertTitle() : CvsAlert
  • GetAllColors() : CGraphOptDlg
  • GetAllRevs() : TGraphDelCmd
  • GetAnchorHighlight() : CCJToolBarCtrl
  • GetAnimationTickCount() : CGfxOutBarCtrl
  • GetAppLibFolder() : UCvsApp
  • GetApplication() : CCJHtmlView
  • GetAppModule() : CWincvsApp
  • GetAppName() : UCvsApp
  • GetAppPath() : CWincvsApp
  • GetAppVersion() : CWincvsApp, UCvsApp
  • GetAt() : KiColumnModel, KoRecursiveModel, KoRegularModel
  • GetAttr() : PyCvsEntry, PyContainer
  • getattr() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • GetAutoSize() : CCJHyperLink
  • GetAvailableRect() : CCJSizeDockBar
  • GetBandBorders() : CCJReBarCtrl
  • GetBandCount() : CCJReBarCtrl
  • GetBandInfo() : CCJReBarCtrl
  • GetBarHeight() : CCJReBarCtrl
  • GetBarInfo() : CCJReBarCtrl
  • GetBaseMessageMap() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • GetBitmap() : CCJToolBar
  • GetBitmapFlags() : CCJToolBar
  • GetBitmapFromImageList() : CCJMenu
  • GetBkColor() : CCJReBarCtrl, CCJPagerCtrl, CCJColorPicker
  • GetBorder() : CCJPagerCtrl
  • GetBorders() : CCJToolBarBase
  • GetBoundsSelf() : CWinLogBranchData, CWinLogTagData, CWinLogRevData, CWinLogHeaderData, CWinLogData, CWinLogBranchData, CWinLogTagData, CWinLogRevData, CWinLogHeaderData, CWinLogData
  • GetBrowseHistory() : CMainFrame
  • GetBrowserView() : CWincvsApp, CMainFrame, CBrowserBar, UCvsApp
  • GetBuffer() : CPathBuffer
  • GetBusy() : CCJHtmlView
  • GetButton() : CCJToolBar
  • GetButtonCount() : CCJToolBar
  • GetButtonInfo() : CCJToolBarCtrl, CCJToolBar
  • GetButtonRect() : CCJControlBar
  • GetButtonSize() : CCJToolBarCtrl, CCJToolBar, CCJPagerCtrl
  • GetButtonState() : CCJPagerCtrl
  • GetButtonStyle() : CCJToolBar
  • GetButtonText() : CCJToolBar
  • GetButtonTitle() : CvsAlert
  • GetCellRect() : CCJColorPopup
  • GetChildRect() : CCJTabView, CCJTabCtrlBar, CCJExplorerBar, CCJControlBar
  • GetCmdLine() : CCmdLine_MAIN
  • GetColor() : CColorStatic, CCJMonthCalCtrl, CCJColorPopup, CCJColorPicker
  • GetColorName() : CCJColorPopup
  • GetColorScheme() : CCJReBarCtrl
  • GetColumn() : CCJColorPopup, KiColumnModel
  • GetColumnCount() : CCJListView, CCJListCtrl
  • GetColumnIndex() : KiColumn, KoConflictColumn, KoDateColumn, KoTagColumn, KoStateColumn, KoEncodingColumn, KoOptionColumn, KoRevisionColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • GetColumnModel() : CBrowseFileView, UCvsFiles
  • GetColumnName() : ColumnIndex
  • GetComboBoxCtrl() : CCJComboBoxEx
  • GetConflict() : EntnodeFile, EntnodeData
  • GetConsole() : UCvsApp
  • getConsoleFont() : CvsPrefs
  • GetConsoleView() : CWincvsApp, CMainFrame
  • GetContainer() : CCJHtmlView
  • GetCount() : KiColumnModel, KoRecursiveModel, KoRegularModel
  • GetCountPerPage() : CGfxOutBarCtrl
  • GetCountSel() : TGraphDelCmd
  • GetCurFormat() : CWincvsView
  • GetCurModal() : UWidget
  • GetCurrent() : CPseudoRotButton
  • GetCurrentMap() : CMacBinTable
  • GetCurrentState() : UPseudoRotButton
  • GetCurrentView() : UPseudoPlaceHolder
  • GetCurSel() : CCJFlatTabCtrl, CCJMonthCalCtrl
  • GetCurSelText() : CSmartComboBox
  • GetCvsConsole() : CCvsProcessData
  • GetCvsErr() : CItemListConsole, CCvsRootConsole
  • GetCvsExitOnError() : CTcl_Interp
  • GetCvsLastErrorCode() : CTcl_Interp
  • GetCvsProcess() : CWincvsApp, UCvsApp
  • GetCvsProtocolList() : CCvsRootParser, CInfoParserConsole
  • GetData() : CMMenuString, CWinPlacement, CWinLogData, CCJHexEdit, CWinLogData, CTCLBrowserEnt, CPersistentT< T >, CPersistent, TMString< T >, TMPersistent< T >, PCStr, PCPStr
  • GetDateTime() : CCJDateEdit
  • GetDelimiter() : TKeyString< delimiter >
  • GetDesc() : ReportWarning, ReportConflict
  • GetDescription() : ItemDisplayInfo
  • GetDescriptionEx() : ItemDisplayInfo
  • GetDeviceScrollPosition() : CScrollView
  • GetDiffOptions() : CDiff_Options
  • getdir() : MultiFiles, MultiFilesEntry
  • GetDir() : CGraphDoc
  • GetDisabledImageList() : CCJToolBarCtrl
  • GetDisableOldStyle() : CCJMenu
  • GetDiskNodeSel() : TGraphCurSelector
  • GetDockBar() : CCJDockContext
  • GetDockedSizeBar() : CCJSizeDockBar
  • GetDocument() : CWincvsView, CWincvsApp
  • GetDragItemRect() : CGfxOutBarCtrl
  • GetDrawContentsSelf() : CMacBinItem, CPseudoItem
  • GetDropTarget() : CCJToolBarCtrl, CCJReBarCtrl, CCJPagerCtrl
  • GetEditCtrl() : CCJComboBoxEx, CSmartComboBox
  • GetEntriesModTime() : CBrowseFileView, UCvsFiles
  • GetEntryInfo() : CGraphDoc
  • GetEntryTextID() : CMultilineEntryDlg
  • GetEntryTextWnd() : CMultilineEntryDlg
  • GetEnvMainThread() : CWincvsApp, CMainFrame
  • GetEnvPlainTypes() : MacBinMaps
  • GetEnvTypes() : MacBinMaps
  • GetExplorerView() : CWincvsApp, CMainFrame
  • GetExtendedStyle() : CCJToolBarCtrl, CCJListView, CCJListCtrl, CCJComboBoxEx
  • GetExtension() : EntnodeFile, EntnodeData
  • GetFileName() : SelectionDisplayInfo
  • GetFilesView() : UCvsApp
  • GetFileView() : CWincvsApp
  • GetFilterModel() : CWincvsApp, CMainFrame, UCvsFrame, UCvsApp
  • GetFilters() : KoFilterModel, KiFilterModel
  • GetFilterText() : CSortHeaderCtrl
  • GetFirstDayOfWeek() : CCJMonthCalCtrl
  • GetFirstSel() : TGraphCurSelector
  • GetFirstSelectedItem() : CCJTreeCtrl
  • GetFlag() : CGfxOutBarCtrl
  • GetFocus() : UWidget
  • GetFocusCmd() : UWidget
  • GetFolderChild() : CGfxOutBarCtrl
  • GetFolderCount() : CGfxOutBarCtrl
  • GetFolderData() : CGfxOutBarCtrl
  • GetFolderImageList() : CGfxOutBarCtrl
  • GetFolderPath() : EntnodeData, EntnodePath
  • GetFolderRect() : CGfxOutBarCtrl
  • GetFullName() : CCJHtmlView
  • GetFullPathName() : EntnodeData, EntnodePath
  • GetFullScreen() : CCJHtmlView
  • GetGripperRect() : CCJControlBar
  • GetGroup() : CPseudoToggle
  • GetHeight() : CCJHtmlView
  • GetHelpFilePath() : CHHelpSupport
  • GetHideCommandDlg() : COptionalPropertySheet
  • GetHideOption() : CvsAlert
  • GetHookMap() : CSubclassWndMap
  • GetHorzSize() : CCJControlBar
  • GetHotImageList() : CCJToolBarCtrl
  • GetHotItem() : CCJToolBarCtrl, CCJToolBar
  • GetHoverColor() : CCJHyperLink
  • GetHtmlDocument() : CCJHtmlView
  • GetIcon() : CCustomizeMenus, CvsAlert
  • GetIconRect() : CGfxOutBarCtrl
  • GetIdleTime() : CWincvsApp
  • GetIgnoreList() : ImportReport
  • GetIgnoreModel() : CWincvsApp, CMainFrame, UCvsFrame, UCvsApp
  • GetImageForEntry() : CBrowseFileView, UCvsFiles
  • GetImageForItem() : CItemListDlg
  • GetImageID() : CContentItems
  • GetImageIndexFromRuntimeClass() : CCJTabCtrlBar
  • GetImageList() : CGfxOutBarCtrl, CCJToolBarCtrl, CCJToolBar, CCJReBarCtrl, CCJComboBoxEx
  • GetImgList() : CGraphView
  • GetIndex() : CCJColorPopup, MultiFilesEntryIndex
  • GetInitializedMenu() : CCJMDIChildWnd
  • GetInsertMark() : CCJToolBarCtrl
  • GetInsertMarkColor() : CCJToolBarCtrl
  • GetInsideRect() : CGfxSplitterWnd, CGfxOutBarCtrl
  • GetItem() : TBrowserFillDummy, CCJComboBoxEx, ItemDisplayInfo
  • GetItemBold() : CCJTreeCtrl
  • GetItemByLocation() : CWinCvsBrowser, UCvsFolders
  • GetItemColor() : CCJTreeCtrl
  • GetItemCount() : CGfxOutBarCtrl, CGfxOutBarCtrl::CBarFolder, CCJFlatTabCtrl
  • GetItemData() : CGfxOutBarCtrl
  • GetItemFont() : CCJTreeCtrl
  • GetItemID() : CCJToolBar
  • GetItemImage() : CGfxOutBarCtrl
  • GetItemList() : CItemListConsole
  • GetItemRect() : CGfxOutBarCtrl, CCJToolBar, CCJFlatTabCtrl
  • GetItems() : USmartCombo
  • GetItemSize() : CGfxOutBarCtrl
  • GetItemText() : CGfxOutBarCtrl, TPseudoTextListView
  • GetIterator() : MultiFilesEntryIndex
  • GetKeyword() : USmartCombo
  • GetKeywordList() : CProtocolParserConsole
  • GetKindDesc() : ReportConflict
  • GetLabelRect() : CGfxOutBarCtrl
  • GetLastItem() : CCJTreeCtrl
  • GetLastSel() : TGraphCurSelector
  • GetLaunchRes() : CItemListConsole, CCvsRootConsole
  • GetLaunchType() : CFileAction_MAIN
  • GetLeft() : CCJHtmlView
  • GetLinkColor() : CCJHyperLink
  • GetLinkCursor() : CCJHyperLink
  • GetList() : CMMenuString, TMString< T >, TMPersistent< T >
  • GetListCtrl() : TViewFill
  • GetLocationName() : CCJHtmlView
  • GetLocationURL() : CCJHtmlView
  • GetLogGraph() : CWincvsApp
  • GetLogMsg() : CImport_MAIN, CCommit_MAIN
  • GetLogoText() : CCJLogoPane
  • GetMacCreator() : ReportConflict
  • GetMacType() : ReportConflict
  • GetMainFrame() : CWincvsApp, UCvsApp, CDynToolBar
  • GetMaxSelCount() : CCJMonthCalCtrl
  • GetMaxSize() : CCJToolBarCtrl
  • GetMaxTextRows() : CCJToolBarCtrl
  • GetMenu() : CCJMenuBar
  • GetMenuBar() : CCJHtmlView
  • GetMenuID() : CCJTabCtrl, CCJMDIChildWnd, CCJFlatHeaderCtrl, CCJControlBar
  • GetMenuList() : CMainFrame
  • GetMenuText() : CCJMenu
  • GetMessage() : CvsAlert
  • GetMessageDetails() : CvsAlert
  • GetMessageMap() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • GetMinExt() : CCJControlBar
  • GetMinReqRect() : CCJMonthCalCtrl
  • GetMonthCalColor() : CCJDateTimeCtrl
  • GetMonthCalCtrl() : CCJDateTimeCtrl
  • GetMonthCalFont() : CCJDateTimeCtrl
  • GetMonthDelta() : CCJMonthCalCtrl
  • GetMonthRange() : CCJMonthCalCtrl
  • GetName() : CGraphDoc, KeywordDisplayInfo, EntnodeData
  • GetNeedSelection() : KiSelectionHandler
  • GetNeedViewReset() : KiSelectionHandler
  • GetNewSel() : TGraphCurSelector
  • GetNextID() : CCJBrowseButton
  • GetNextItem() : CCJTreeCtrl
  • GetNextOrPrevButton() : CCJMenuBar
  • GetNextPathName() : CMfFileDialog
  • GetNextSelectedItem() : CCJTreeCtrl
  • GetNextTipString() : CTipDlg
  • GetNode() : CGraphDoc
  • GetNormalized() : CTCLBrowserEnt
  • GetNotificationManager() : CSortHeaderCtrl, KoIgnoreModel, KoRecursionModel, KoFilterModel, KiFilterBase
  • GetOffline() : CCJHtmlView
  • GetOldLoc() : CHistComboBoxEx
  • GetOnlyRev() : TGraphDelCmd
  • GetOptionCheckRect() : COptionalPropertySheet
  • GetOptionString() : CAdminOption_MAIN
  • GetOverideList() : UWidget
  • GetPadding() : CCJToolBar
  • GetPageValue() : LPseudoWinAttachment
  • GetPalette() : CCJReBarCtrl
  • GetPanControl() : CCJStatusBar
  • GetParentBrowser() : CCJHtmlView
  • GetPassword() : GetPassword
  • GetPath() : CBrowseFileView, UCvsFiles, SelectionDisplayInfo, CCvsRootParser, KoColumnContext
  • GetPathLength() : CBrowseFileView
  • GetPattern() : ReportConflict
  • GetPlacement() : CWinPlacement
  • GetPos() : CCJPagerCtrl
  • GetPrevItem() : CCJTreeCtrl
  • GetPrevSelectedItem() : CCJTreeCtrl
  • GetProperty() : CCJHtmlView
  • GetProtocol() : CCvsRootParser
  • GetPseudoID() : CDynToolBar
  • GetRange() : CCJMonthCalCtrl, CCJDateTimeCtrl
  • GetReadyState() : CCJHtmlView
  • GetReBarCtrl() : CCJReBar
  • GetRect() : CCJToolBar, CCJReBarCtrl
  • GetRecursionModel() : CWincvsApp, CMainFrame, UCvsFrame, UCvsApp
  • GetRecursiveModel() : KiColumnModel
  • GetRefRunning() : TraversalReport
  • GetRegisterAsBrowser() : CCJHtmlView
  • GetRegisterAsDropTarget() : CCJHtmlView
  • GetRegKey() : CCJHyperLink
  • GetRegularModel() : KiColumnModel
  • GetRelativePath() : EntnodeFile
  • GetRemoveDirectoryOption() : CRelease_MAIN
  • GetRepository() : CCvsSandboxInfo
  • GetRevision() : SelectionDisplayInfo
  • GetRoot() : CWinCvsBrowser, CWincvsApp, UCvsFolders, CCvsSandboxInfo
  • GetRow() : CCJColorPopup
  • GetRowCount() : CCJReBarCtrl
  • GetRowHeight() : CCJReBarCtrl
  • GetRowInfo() : ItemDisplayInfo, KeywordDisplayInfo
  • GetRows() : CCJToolBar
  • GetRuntimeClass() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, CPersistentInt, CPersistentBool, CPersistent, CMPString, CMString, PCStr, PCPStr, UEditMessage, UPromptMessage, UWidget, UToolbar, UObject, UMenu, UCmdTarget, UMacAppMenu
  • GetSel() : CCJHexEdit
  • GetSel1() : TGraphCmdStatus, TGraphCurSelector
  • GetSel2() : TGraphCmdStatus, TGraphCurSelector
  • GetSelCount() : TGraphCmdStatus
  • GetSelection() : KiSelectionHandler
  • GetSelectionChanged() : CWinCvsBrowser
  • GetSelectionMode() : CCJColorPicker
  • GetSelectionNotificationLocked() : CWinCvsBrowser
  • GetSelFolder() : CGfxOutBarCtrl
  • GetSelFont() : CCJFontCombo
  • GetSelRange() : CCJMonthCalCtrl
  • GetSelType() : KiSelectionHandler
  • GetSetupData() : KiColumn, KoConflictColumn, KoDateColumn, KoTagColumn, KoStateColumn, KoEncodingColumn, KoOptionColumn, KoRevisionColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • GetSilent() : CCJHtmlView
  • GetStandardSignature() : TPseudoDoubleNumberText, TPseudoTextListView
  • GetStartPosition() : CMfFileDialog
  • GetState() : CCJToolBar, EntnodeData, CPseudoToggle
  • GetStateDesc() : ReportWarning, ReportConflict
  • GetStatusBar() : CWincvsApp, CMainFrame, CCJHtmlView, UCvsApp
  • GetStatusPane() : CCJStatusBar
  • GetStoredWidth() : CCJListView, CCJListCtrl
  • GetStr() : CWinLogData
  • GetString() : CCJMenuData
  • GetStyle() : CCJToolBarCtrl
  • GetTabCtrl() : CCJTabView
  • GetTabFromPoint() : CCJTabCtrlBar
  • GetTabWidth() : CCJFlatTabCtrl
  • GetTemplateText() : CTemplateDlg
  • GetText() : CContentItems, KiColumn, KoConflictColumn, KoDateColumn, KoTagColumn, KoStateColumn, KoEncodingColumn, KoOptionColumn, KoRevisionColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • GetTextColor() : CCJReBarCtrl, CCJColorPicker
  • GetTextExtent() : UDC
  • GetTextHeight() : UDC
  • GetTheaterMode() : CCJHtmlView
  • GetThisMessageMap() : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • GetTime() : CCJDateTimeCtrl
  • GetTimeout() : KoWatcher
  • GetTimers() : UWidget
  • GetTimeStamp() : CPersistent
  • GetTipText() : CCJFlatTabCtrl
  • GetToday() : CCJMonthCalCtrl
  • GetToolBar() : CCJHtmlView
  • GetToolBarCtrl() : CCJToolBar
  • GetToolBarID() : CCJMDIChildWnd
  • GetToolBarIDs() : CCJMDIChildWnd
  • GetToolbarStyle() : CCJToolBar
  • GetTooltip() : UWidget
  • GetToolTip() : CCJTabCtrlBar
  • GetToolTips() : CCJToolBar, CCJReBarCtrl
  • GetTop() : CCJHtmlView
  • GetTopLevelContainer() : CCJHtmlView
  • GetTotalArrowWidth() : CCJFlatTabCtrl
  • GetTotalTabWidth() : CCJFlatTabCtrl
  • GetTrackingState() : CCJMenuBar
  • GetTrackSelection() : CCJColorPicker
  • GetTreeView() : CGraphDoc
  • GetType() : CWinLogData, CCJHtmlView, CWinLogData, PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry, EntnodeFolder, EntnodeFile, EntnodeData, KiColumnModel, KoRecursiveModel, KoRegularModel
  • GetUnderline() : CCJHyperLink
  • GetURL() : CCJHyperLink
  • GetUseShell() : CvsPrefs
  • GetValidationError() : TPseudoDoubleNumberText
  • GetValue() : PyPersistent, KeywordDisplayInfo, TPseudoDoubleNumberText
  • GetVertSize() : CCJControlBar
  • GetView() : CCJTabView, CCJTabCtrlBar, KoFileViewTraversalContext, TViewFill, CColorConsole
  • GetViewName() : CCJTabCtrlBar
  • GetViewType() : CBrowseFileView
  • GetVisible() : CCJHtmlView
  • GetVisibleRange() : CGfxOutBarCtrl
  • GetVisited() : CCJHyperLink
  • GetVisitedColor() : CCJHyperLink
  • GetWideString() : CCJMenuData
  • GetWidget() : UWidget
  • GetWidgets() : UWidget
  • GetWidID() : UCmdTarget, TPseudoWinBehavior
  • GetWindowDateTime() : CCJDateEdit
  • GetWindowText() : CSmartComboBox
  • GetWinInfo() : CDynToolBar
  • getWinLogData_() : TGraphCurSelector
  • GetWnd() : CHHelpSupport
  • GetWndTextExtent() : CCVSAlert_MAIN
  • GetWorkspace() : CMainFrame
  • GoBack() : CCJHtmlView
  • GoForward() : CCJHtmlView
  • GoHome() : CCJHtmlView
  • GoSearch() : CCJHtmlView
  • GotoURL() : CCJHyperLink

- h -

  • HasAborted() : CProgress
  • HasAnyModified() : KoFilterModel
  • HasConflict() : ReportConflict
  • HasEditChanged() : CCJComboBoxEx
  • HasFeature() : USmartCombo
  • HasFilter() : KoFilterModel
  • HasFilterMasks() : KoFilterModel
  • HasFilters() : KoFilterModel
  • HasFocus() : UWidget
  • HasForceBinary() : ReportConflict
  • HasForceNoKeywords() : ReportConflict
  • HasForceText() : ReportConflict
  • HasForceUnicode() : ReportConflict
  • HasIgnore() : ReportConflict
  • HasLoogedIn() : CvsPrefs
  • HasModal() : UWidget
  • HasProblem() : ControlCvsArgs
  • HasPython() : CWincvsApp
  • HasTCL() : CWincvsApp
  • HasTypeCreatorConflict() : ReportConflict
  • Height() : URect
  • Helper() : CvsPrefs
  • HideButton() : CCJToolBar
  • HideColumn() : CCJFlatSplitterWnd
  • HideColumns() : UCvsFiles
  • HideCommandDlgAnnotate() : CvsPrefs
  • HideCommandDlgDiff() : CvsPrefs
  • HideCommandDlgFileAction() : CvsPrefs
  • HideCommandDlgGraph() : CvsPrefs
  • HideCommandDlgLog() : CvsPrefs
  • HideCommandDlgStatus() : CvsPrefs
  • HideCommandDlgUpdate() : CvsPrefs
  • HideCommandDlgUseShift() : CvsPrefs
  • HideRow() : CCJFlatSplitterWnd
  • HideSplashScreen() : CSplashWnd
  • HighlightFolder() : CGfxOutBarCtrl
  • HighlightItem() : CGfxOutBarCtrl
  • HitTest() : CWinLogData, CCJToolBarCtrl, CCJToolBar, CCJSizeDockBar, CCJReBarCtrl, CCJMenuBar, CCJFlatTabCtrl, CCJMonthCalCtrl, CCJControlBar, CWinLogData
  • HitTestEx() : CGfxOutBarCtrl, CCJListView, CCJListCtrl
  • Home() : CCJFlatTabCtrl, CvsPrefs
  • HookWindow() : CSubclassWnd

- i -

  • ICTextOption() : CvsPrefs
  • IdleCvsProgress() : CWincvsApp
  • IDToIndex() : CCJReBarCtrl
  • Ignore() : ReportConflict
  • Import() : CCJMemFile
  • ImportFilter() : CImport_OPTIONS
  • ImportReport() : ImportReport
  • Indeterminate() : CCJToolBar
  • InflateRect() : URect
  • Init() : CRevisionConsole
  • InitHelpID() : CAboutDlg, CNoPython, CMultilineEntryDlg, CHHelpPropertySheet, CHHelpSupport, CCustomizeMenus, CUpdateMerge, CUpdateOptions, CUpdateMain, CTemplateDlg, CTag_MAIN, CStatus_MAIN, CSelectionDetailsDlg, CSaveSettingsDlg, CRtag_OPTIONS, CRtag_MAIN, CRelease_MAIN, COptionalPropertySheet, CLogin_MAIN, CLogFilters, CLogMain, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImportEntry, CImportWarning, CImportFilterDlg, CImport_OPTIONS, CImport_MAIN, CGraphOptDlg, CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CFileAction_MAIN, CEditorMonDlg, CDiff_Options, CDiff_MAIN, CEditKeywordDlg, CCvsRootDlg, CCommit_OPTIONS, CCommit_MAIN, CCheckout_MAIN, CAnnotate_MAIN, CAdminOption_MAIN
  • InitHTMLHelp() : CHHelpSupport
  • Initialise() : CCJColorPopup
  • Initialize() : CCustInvertTable
  • InitializeControl() : CCJBrowseEdit
  • InitializeDockingWindows() : CMainFrame
  • InitializeFonts() : CCJFontCombo
  • InitializeHeader() : CCJFlatHeaderCtrl
  • InitializeMenu() : CCJMDIFrameWnd, CCJFrameWnd
  • InitializeMenuList() : CCJMenu
  • InitialShowWindow() : CMainFrame
  • InitInstance() : CWincvsApp, CLogoutThread
  • InitItem() : TViewFill
  • InitListCtrl() : CItemListDlg, CCvsRootDlg
  • InitOptionCtrls() : CItemListDlg
  • InitPythonSupport() : CPython_Interp
  • InitValues() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • Insert() : CMMenuString, CCJMemFile, CSortList< T >, TMString< T >
  • InsertBand() : CCJReBarCtrl
  • InsertButton() : CCJToolBar
  • InsertControl() : CCJToolBar
  • InsertItem() : CGfxOutBarCtrl, CGfxOutBarCtrl::CBarFolder, CCJFlatTabCtrl, CCJComboBoxEx
  • InsertMarkHitTest() : CCJToolBarCtrl
  • InsertMenuA() : CCJMenu
  • InsertMenuW() : CCJMenu
  • InsertODMenuA() : CCJMenu
  • InsertODMenuW() : CCJMenu
  • InsertSpaces() : CCJMenu
  • InsertString() : CHistComboBoxEx, CCJComboBoxEx
  • Inside() : CSortList< T >
  • InsideAndInsert() : CSortList< T >
  • InsStringBefore() : TPseudoTextListView
  • InsStringFirst() : TPseudoTextListView
  • InsStringLast() : TPseudoTextListView
  • Install() : CCJMenuBarFrameHook
  • IntersectRect() : URect
  • InvalidateOldPos() : CCJToolBar
  • InvalidateRect() : CScrollView
  • InvalidateTabs() : CCJFlatTabCtrl
  • InvalidCache() : LPseudoWinAttachment
  • ircii2ctcp() : irciiAttrCvt
  • IsAdded() : KoFilterModel
  • IsAvail() : CTcl_Interp, CPython_Interp
  • IsBackgroundProcess() : CWincvsApp
  • IsBinary() : ReportConflict
  • IsBottomDocked() : CCJControlBar
  • IsButtonChecked() : CCJToolBar
  • IsButtonEnabled() : CCJToolBar
  • IsButtonHidden() : CCJToolBar
  • IsButtonHighlighted() : CCJToolBarCtrl
  • IsButtonIndeterminate() : CCJToolBar
  • IsButtonPressed() : CCJToolBar
  • IsChanged() : KoFilterModel
  • IsConflict() : KoFilterModel
  • IsCvsRunning() : CWincvsApp, UCvsApp, CvsPrefs
  • IsCvsStopping() : CWincvsApp, UCvsApp
  • IsDeadNode() : CWinLogData
  • IsDefaultAscending() : KiColumn, KoPathColumn, KoExtColumn, KoNameColumn
  • IsDefaultedRev() : CDiff_MAIN
  • IsDefaultMode() : KoFilterModel
  • IsDerivedFrom() : URuntimeClass
  • IsDiskNode() : CWinLogData
  • IsDockBar() : CCJSizeDockBar
  • IsDockSizeBar() : CCJSizeDockBar
  • IsEmpty() : CCvsRootParser
  • IsEnabled() : KoUpdateMoveToTrashHandler, UWidget
  • IsEnteredTwice() : USemaphore
  • IsError() : ReportWarning
  • IsExtension() : ReportConflict
  • IsFilterMasksEnable() : CMainFrame, KoFilterModel
  • IsFindValid() : CCJTreeCtrl
  • IsFloating() : CCJControlBar
  • IsHasOne() : CWinPlacement
  • IsHelpCtrl() : CHHelpSupport
  • IsHideMissing() : TBrowserFill, KoFilterModel
  • IsHideUnknown() : KoFileViewTraversalContext, KoFilterModel
  • IsHooked() : CSubclassWnd
  • IsHorzDocked() : CCJControlBar
  • IsIgnored() : EntnodeData
  • IsIgnoredCtrl() : CHHelpSupport
  • IsKindOf() : UObject
  • IsLastControlBar() : CCJSizeDockBar
  • IsLeftDocked() : CCJControlBar
  • IsLocked() : EntnodeData
  • IsMatch() : KoFileViewTraversalContext, KoTraversalContext, KoFilterModel, KoFilterMask, KiFilterModel
  • IsMenu() : CCJMenu
  • IsMissing() : EntnodeData, KoFilterModel
  • IsModeSet() : CCvsStreamConsole
  • IsModified() : KoFilterModel
  • IsNewShell() : CCJMenu
  • IsoConvert() : CvsPrefs
  • IsRadio() : CPseudoToggle
  • IsRectEmpty() : URect
  • IsRectNull() : URect
  • IsRecursive() : KoFileViewTraversalContext, TViewFill, KoTraversalContext
  • IsRemoved() : EntnodeData, KoFilterModel
  • IsResolved() : EntnodeData
  • IsRightDocked() : CCJControlBar
  • IsSamePath() : CBrowseFileView, CTCLBrowserEnt
  • IsSelected() : CWincvsView, CCJHexEdit
  • IsSelSingleNode() : CGraphView
  • IsShowIgnored() : KoFileViewTraversalContext, TViewFill, KoTraversalContext, KoIgnoreModel, KiIgnoreModel
  • IsShowMissing() : KoFileViewTraversalContext
  • IsShowModified() : KoFileViewTraversalContext
  • IsShowRecursive() : KoRecursionModel, KiRecursionModel
  • IsShowUnknown() : KoFileViewTraversalContext
  • IsSmallIconView() : CGfxOutBarCtrl
  • IsSortAscendant() : UCvsFiles
  • IsTclFileRunning() : CvsPrefs
  • IsTopDocked() : CCJControlBar
  • IsUIValid() : UWidget
  • IsUnicode() : ReportConflict
  • IsUnknown() : EntnodeData, KoFilterModel
  • IsUnmodified() : EntnodeData
  • IsUserState() : CWinLogData
  • IsValid() : PyAutoObject< T >
  • IsValidButton() : CCJMenuBar
  • IsValidItem() : CGfxOutBarCtrl
  • IsVertDocked() : CCJControlBar
  • IsVisited() : EntnodeData
  • IsWin95() : CCJFlatComboBox
  • items() : CToolBarData

- k -

  • KillChildWindow() : CCJCaption
  • KillThread() : CLogoutThread
  • Kind() : ReportWarning
  • KiSelectionHandler() : KiSelectionHandler
  • KoAddBinaryHandler() : KoAddBinaryHandler
  • KoAddHandler() : KoAddHandler
  • KoAddUnicodeHandler() : KoAddUnicodeHandler
  • KoAnnotateHandler() : KoAnnotateHandler
  • KoCancelChangesHandler() : KoCancelChangesHandler
  • KoCheckoutHandler() : KoCheckoutHandler
  • KoColumnContext() : KoColumnContext
  • KoCommandLineHandler() : KoCommandLineHandler
  • KoCommitHandler() : KoCommitHandler
  • KoDiffHandler() : KoDiffHandler
  • KoEditorsHandler() : KoEditorsHandler
  • KoFileActionHandler() : KoFileActionHandler
  • KoFileRemoveHandler() : KoFileRemoveHandler
  • KoFileViewTraversalContext() : KoFileViewTraversalContext
  • KoFilterModel() : KoFilterModel
  • KoGraphAnnotateHandler() : KoGraphAnnotateHandler
  • KoGraphDiffHandler() : KoGraphDiffHandler
  • KoGraphHandler() : KoGraphHandler
  • KoIgnoreModel() : KoIgnoreModel
  • KoImportHandler() : KoImportHandler
  • KoLockHandler() : KoLockHandler
  • KoLogHandler() : KoLogHandler
  • KoMoveToTrashHandler() : KoMoveToTrashHandler
  • KoQueryUpdateHandler() : KoQueryUpdateHandler
  • KoRecursionModel() : KoRecursionModel
  • KoReleaseHandler() : KoReleaseHandler
  • KoStatusHandler() : KoStatusHandler
  • KoTraversalContext() : KoTraversalContext
  • KoUneditHandler() : KoUneditHandler
  • KoUnlockHandler() : KoUnlockHandler
  • KoUpdateHandler() : KoUpdateHandler
  • KoUpdateMoveToTrashHandler() : KoUpdateMoveToTrashHandler
  • KoWatcher() : KoWatcher
  • KoWatchersHandler() : KoWatchersHandler
  • KoWatchOffHandler() : KoWatchOffHandler
  • KoWatchOnHandler() : KoWatchOnHandler
  • KserverPort() : CvsPrefs

- l -

  • LastWorkingDir() : CvsPrefs
  • Layout() : CCJToolBar
  • length() : UStr, UPStr
  • LineTo() : UDC
  • ListenToMessage() : LPseudoWinAttachment, UPseudoPageHider, UPseudoPlaceHolder
  • LMainPseudoAttachment() : LMainPseudoAttachment
  • load() : CvsPrefs
  • Load() : CCJMemFile
  • LoadAll() : CPersistent
  • LoadBarState() : CCJMDIFrameWnd, CCJFrameWnd, CCJControlBar
  • LoadBitmap() : CCJToolBar
  • LoadCheckmarkBitmap() : CCJMenu
  • LoadColumns() : CBrowseFileView, UCvsFiles
  • LoadColumnWidths() : CCJListView, CCJListCtrl
  • LoadDefaults() : MacBinMaps
  • LoadDockState() : CMainFrame
  • LoadFromResource() : CCJHtmlView
  • LoadFromToolBar() : CCJMenu
  • loadIcon() : CPseudoButton
  • LoadLocationSettings() : CMainFrame
  • LoadMenu() : CCJMenuBar, CCJMenu
  • LoadSettings() : KoIgnoreModel, KoRecursionModel, KoFilterModel, KiFilterBase
  • LoadSysColorBitmap() : CCJMenu
  • LoadToolbar() : CCJMenu
  • LoadToolBar() : CCJToolBar
  • LoadToolbars() : CCJMenu
  • LoadWindowPos() : CCJWindowPlacement
  • LoadXPM() : CPseudoButton
  • LoadXPMs() : CPseudoRotButton
  • Location() : CSortList< T >
  • LogoutTimeOut() : CvsPrefs
  • LookForResourceFile() : CWincvsApp
  • Lookup() : CSubclassWndMap
  • LPseudoDrawAttachment() : LPseudoDrawAttachment
  • LPseudoWinAttachment() : LPseudoWinAttachment
  • LSReport() : LSReport

- m -

  • MacBinEncodeBinariesOnly() : CvsPrefs
  • MacBinEncoding() : CvsPrefs
  • MacBinMaps() : MacBinMaps
  • MacLF() : CvsPrefs
  • MapAccelerator() : CCJToolBarCtrl, CCJToolBar
  • MarkButton() : CCJToolBarCtrl
  • Match() : ReportConflict
  • match_dir() : match_dir
  • MatchEntriesCase() : CvsPrefs
  • Maximize() : CCJSizeDockBar, CCJControlBar
  • MaximizeBand() : CCJReBarCtrl
  • MeasureItem() : CCJOutlookBar, CCJMenu, CCJFontCombo, CColorMenu
  • MenuInputFilter() : CCJMenuBar
  • Minimize() : CCJControlBar
  • MinimizeBand() : CCJReBarCtrl
  • mirc2ctcp() : mircAttrCvt
  • ModifyCaptionStyle() : CCJCaption
  • ModifyFlag() : CGfxOutBarCtrl
  • ModifyODMenuA() : CCJMenu
  • ModifyODMenuW() : CCJMenu
  • ModifyTabStyle() : CCJTabView, CCJTabCtrlBar
  • Move() : CCJHexEdit
  • MoveBand() : CCJReBarCtrl
  • MoveButton() : CCJToolBarCtrl
  • MoveDockBar() : CCJDockContext
  • MoveRow() : CCJListView, CCJListCtrl
  • MoveTo() : UDC
  • MulDiv() : URect
  • MultiFiles() : MultiFiles
  • MultiFilesEntry() : MultiFilesEntry
  • MultiFilesEntryIndex() : MultiFilesEntryIndex

- n -

  • Navigate() : CCJHtmlView
  • Navigate2() : CCJHtmlView
  • NavigateComplete2() : CCJHtmlView
  • NeedCvsrootMigration() : CvsPrefs
  • NeedSave() : CPersistent
  • NeedsNormalize() : CModuleParserConsole, KoAddUnicodeHandler, KoAddBinaryHandler, KoAddHandler, KoGraphHandler, KiSelectionHandler
  • New() : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • newdir() : MultiFiles
  • newfile() : MultiFiles
  • NewMenu() : CCJMDIFrameWnd, CCJFrameWnd
  • NewODMenu() : CCJMenu
  • NewRoot() : CHistComboBoxEx
  • Node() : NotificationManager::Node
  • Normalize() : CCJSizeDockBar, CCJControlBar, MultiFiles, CModuleParserConsole
  • NormalizeCvsRoot() : CCvsRootParser
  • NormalizeRect() : URect
  • NormalizeSel() : CCJHexEdit
  • NotificationManager() : NotificationManager
  • Notify() : KoWatcher
  • NotifyAll() : NotificationManager
  • NotifySelectionChange() : CWinCvsBrowser
  • NumDirs() : MultiFiles
  • NumFiles() : MultiFilesEntry
  • NumNodes() : CGraphDoc
  • NumOfElements() : CSortList< T >

- o -

  • Offset() : CWinLogData, UPoint
  • OffsetRect() : URect
  • OnAbout() : UCvsFrame
  • OnActionGo() : CMultilineEntryDlg
  • OnActivate() : CMainFrame
  • OnActivateApp() : CCJColorPopup
  • OnAdd() : CCustomizeMenus
  • OnAddSelection() : CCmdLine_MAIN
  • OnAlias() : TViewFill, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • OnAltcvschk() : CGetPrefs_CVS
  • OnAltcvssel() : CGetPrefs_CVS
  • OnAltsettingschk() : CGetPrefs_WINCVS
  • OnAnnotate() : CGraphView, CBrowseFileView
  • OnAnyDevice() : LSReport, TraversalReport
  • OnAppAbout() : CWincvsApp
  • OnAppCmdline() : CWincvsDoc, CWinCvsBrowser, CBrowseFileView
  • OnAppCopyrights() : CWincvsApp
  • OnAppCredits() : CWincvsApp
  • OnAppLogin() : CWincvsDoc
  • OnAppLogout() : CWincvsDoc
  • OnApplyNow() : CGraphOptDlg
  • OnAppPreferences() : CWincvsDoc
  • OnAppRtagBranch() : CWincvsDoc
  • OnAppRtagbranch() : CWinCvsBrowser, CBrowseFileView
  • OnAppRtagcreate() : CWinCvsBrowser, CBrowseFileView
  • OnAppRtagDelete() : CWincvsDoc
  • OnAppRtagdelete() : CWinCvsBrowser, CBrowseFileView
  • OnAppRtagNew() : CWincvsDoc
  • OnBarStyleChange() : CCJToolBar, CCJMenuBar
  • OnBeforeNavigate2() : CCJHtmlView
  • OnBegindrag() : CBrowseFileView
  • OnBeginPrinting() : CWincvsView, CGraphView, CBrowseFileView
  • OnBeginrdrag() : CBrowseFileView
  • OnBlockHandler() : UWidget
  • OnBranch() : CGraphOptDlg
  • OnBranchid() : CImport_OPTIONS
  • OnBroadcastCmdMsg() : CMainFrame
  • OnBrowseBranchid() : CImport_OPTIONS
  • OnBrowseModules() : CRtag_MAIN, CImport_MAIN, CCheckout_MAIN
  • OnBrowseReadfrom() : CItemListDlg
  • OnBrowserOpen() : CWincvsDoc
  • OnBrowserPopup() : UCvsFrame
  • OnBrowseTag() : CUpdateOptions, CTag_MAIN, CRtag_OPTIONS, CRtag_MAIN, CLogFilters, CItemListDlg, CCommit_OPTIONS, CAnnotate_MAIN
  • OnBrowseTag1() : CUpdateMerge, CImport_MAIN, CDiff_MAIN
  • OnBrowseTag2() : CUpdateMerge, CImport_MAIN, CDiff_MAIN
  • OnBtnClick() : UCvsGraph
  • OnBtnhome() : CGetPrefs_CVS
  • OnBtnPath() : CCheckout_MAIN
  • OnBtnpath() : CImport_OPTIONS
  • OnBtnsettings() : CGetPrefs_WINCVS
  • OnBtnviewer() : CGetPrefs_WINCVS
  • OnButtonClose() : CCJExplorerBar, CCJControlBar
  • OnButtonMinimize() : CCJControlBar
  • OnCancel() : CItemListDlg, CGraphOptDlg, CCvsRootDlg, CCVSAlert_MAIN, UPromptMessage
  • OnCaptButton() : CCJCaptionPopupWnd, CCJCaption
  • OnChangedRect() : CGraphRectTracker
  • OnChangeReactionSpeed() : CFilterMaskOptDlg
  • OnChar() : CGfxGroupEdit, CCJMaskEdit, CCJHexEdit, CPseudoToggle
  • OnCheck1() : CDiff_MAIN
  • OnCheck2() : CDiff_MAIN
  • OnCheckdate() : CItemListDlg
  • OnCheckdate1() : CUpdateMerge
  • OnCheckdate2() : CUpdateMerge
  • OnCheckOverridecheckoutdir() : CCheckout_MAIN
  • OnCheckpath() : CCmdLine_MAIN
  • OnCheckrev() : CItemListDlg
  • OnCheckunixlf() : CGetPrefs_GLOBALS
  • OnChgCursor() : UWidget
  • OnChgFocus() : UWidget
  • OnClear() : CCvsRootDlg
  • OnClicked() : CCJHyperLink, CCJColorPicker, CCJBrowseButton
  • OnClose() : CMainFrame, CLogFrame, CCJMDIFrameWnd, CCJFrameWnd
  • OnCmdAdd() : UCvsFolders, UCvsFiles
  • OnCmdAddb() : UCvsFiles
  • OnCmdCheckout() : UCvsFolders
  • OnCmdCmdline() : UCvsFrame
  • OnCmdCommit() : UCvsFolders, UCvsFiles
  • OnCmdDiff() : UCvsFolders, UCvsFiles
  • OnCmdEdit() : UCvsFolders, UCvsFiles
  • OnCmdEditors() : UCvsFolders, UCvsFiles
  • OnCmdEditsel() : UCvsFiles
  • OnCmdEditseldef() : UCvsFiles
  • OnCmdExplore() : UCvsFolders, UCvsFiles
  • OnCmdGraph() : UCvsFiles
  • OnCmdIgnore() : UCvsFrame
  • OnCmdImport() : UCvsFolders
  • OnCmdInit() : UCvsFrame
  • OnCmdLock() : UCvsFolders, UCvsFiles
  • OnCmdLog() : UCvsFolders, UCvsFiles
  • OnCmdLogin() : UCvsFrame
  • OnCmdLogout() : UCvsFrame
  • OnCmdMacroAdmin() : UCvsFrame
  • OnCmdMacrosSel() : UCvsFolders
  • OnCmdMsg() : CLogFrame, CGraphFrame
  • OnCmdPreferences() : UCvsFrame
  • OnCmdQueryUpdate() : UCvsFolders, UCvsFiles
  • OnCmdRelease() : UCvsFolders, UCvsFiles
  • OnCmdReload() : UCvsFrame
  • OnCmdResEdit() : UCvsFolders, UCvsFiles
  • OnCmdRmv() : UCvsFiles
  • OnCmdRtagBranch() : UCvsFrame
  • OnCmdRtagDelete() : UCvsFrame
  • OnCmdRtagNew() : UCvsFrame
  • OnCmdSaveSettings() : UCvsFrame
  • OnCmdStatus() : UCvsFolders, UCvsFiles
  • OnCmdStopcvs() : UCvsFrame
  • OnCmdTagBranch() : UCvsFolders, UCvsFiles
  • OnCmdTagDelete() : UCvsFolders, UCvsFiles
  • OnCmdTagNew() : UCvsFolders, UCvsFiles
  • OnCmdTrash() : UCvsFiles
  • OnCmdUIAdd() : UCvsFolders, UCvsFiles
  • OnCmdUIAddB() : UCvsFiles
  • OnCmdUIAnytime() : UCvsFrame
  • OnCmdUICheckout() : UCvsFolders
  • OnCmdUICvsCmd() : UCvsFrame
  • OnCmdUIEditseldef() : UCvsFiles
  • OnCmdUIEraseAll() : UCvsConsole
  • OnCmdUIExplore() : UCvsFolders, UCvsFiles
  • OnCmdUIFilterMask() : UCvsFrame
  • OnCmdUIGraph() : UCvsFiles
  • OnCmdUIHideUnknown() : UCvsFrame
  • OnCmdUIIgnore() : UCvsFrame
  • OnCmdUIImport() : UCvsFolders
  • OnCmdUIMacroAdmin() : UCvsFrame
  • OnCmdUIMacroSel() : UCvsFiles
  • OnCmdUIMacrosSel() : UCvsFolders
  • OnCmdUIPyMacro() : UCvsFrame
  • OnCmdUIQuit() : UCvsFrame
  • OnCmdUIRelease() : UCvsFiles
  • OnCmdUIReload() : UCvsFrame
  • OnCmdUIResEdit() : UCvsFolders, UCvsFiles
  • OnCmdUIRmv() : UCvsFiles
  • OnCmdUIStopcvs() : UCvsFrame
  • OnCmdUITrash() : UCvsFiles
  • OnCmdUIUpdate() : UCvsFolders, UCvsFiles
  • OnCmdUIUpone() : UCvsFiles
  • OnCmdUIUsePyShell() : UCvsFrame
  • OnCmdUIUseTclShell() : UCvsFrame
  • OnCmdUIViewAdded() : UCvsFrame
  • OnCmdUIViewChanged() : UCvsFrame
  • OnCmdUIViewConflict() : UCvsFrame
  • OnCmdUIViewIgnored() : UCvsFrame
  • OnCmdUIViewMissing() : UCvsFrame
  • OnCmdUIViewModified() : UCvsFrame
  • OnCmdUIViewRecursive() : UCvsFrame, UCvsFiles
  • OnCmdUIViewRemoved() : UCvsFrame
  • OnCmdUIViewUnknown() : UCvsFrame
  • OnCmdUnedit() : UCvsFolders, UCvsFiles
  • OnCmdUnlock() : UCvsFolders, UCvsFiles
  • OnCmdUpdate() : UCvsFolders, UCvsFiles
  • OnCmdUpone() : UCvsFiles
  • OnCmdUsePyShell() : UCvsFrame
  • OnCmdUseTclShell() : UCvsFrame
  • OnCmdWatchers() : UCvsFolders, UCvsFiles
  • OnCmdWatchOff() : UCvsFolders, UCvsFiles
  • OnCmdWatchOn() : UCvsFolders, UCvsFiles
  • OnColumnclick() : CBrowseFileView
  • OnColumnclickItemlist() : CItemListDlg
  • OnColumnclickOptionslist() : CDiff_Options
  • OnColumnclickSelectionlist() : CSelectionDetailsDlg
  • OnComboAppend() : UWidget
  • OnComboDelSel() : UWidget
  • OnComboEnableSel() : UWidget
  • OnComboGetCount() : UWidget
  • OnComboGetMenu() : UWidget
  • OnComboGetPos() : UWidget
  • OnComboResetAll() : UWidget
  • OnComboSelDir() : UCvsFrame
  • OnComboSetPos() : UWidget
  • OnCommand() : COptionalPropertySheet
  • OnCommands() : UToolbar, UMenu
  • OnCommandStateChange() : CCJHtmlView
  • OnConsole() : CGetPrefs_CVS
  • OnContextMenu() : CWincvsView, CWinCvsBrowser, CHHelpDialog, CHHelpPropertyPage, CHHelpPropertySheet, CGraphView, CCJHexEdit, CBrowseFileView
  • OnCopyrights() : UCvsFrame
  • OnCopySettings() : CSaveSettingsDlg
  • OnCreate() : CSplashWnd, CMainFrame, CCvsStatusBar, CBarConsole, CGfxOutBarCtrl, CGfxGroupEdit, CCJToolBarCtrl, CCJTabView, CCJTabCtrlBar, CCJFontCombo, CCJFlatTabCtrl, CCJFlatHeaderCtrl, CCJExplorerBar, CCJControlBar, CCJColorPicker, CCJBrowseEdit, UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole
  • OnCreateClient() : CLogFrame
  • OnCredits() : UCvsFrame
  • OnCtlColor() : CTipDlg
  • OnCustomdraw() : CSortHeaderCtrl
  • OnCustomDraw() : CCJListView, CCJListCtrl
  • OnCustomize() : CWinCvsBrowser, CBrowseFileView
  • OnDate() : CUpdateOptions, CRtag_OPTIONS, CLogFilters
  • OnDblClick() : UCvsFiles
  • OnDblclkAllcmds() : CCustomizeMenus
  • OnDblclkCombofilter() : CFilterSelectionDlg
  • OnDblclkItemlist() : CItemListDlg
  • OnDblclkKeywordlist() : CCvsRootDlg
  • OnDblclkListentries() : CImportFilterDlg
  • OnDblclkMenulist() : CCustomizeMenus
  • OnDblclkSelectionlist() : CSelectionDetailsDlg
  • OnDblclkTemplateList() : CTemplateDlg
  • OnDead() : CGraphOptDlg
  • OnDelcvsinfo() : CRelease_MAIN
  • OnDeldir() : CRelease_MAIN
  • OnDeleteallitems() : CBrowseFileView
  • OnDeleteitem() : CMyShellTree, CBrowseFileView
  • OnDelsticky() : CUpdateOptions
  • OnDeltaposRevisionSpin() : CSelectionDetailsDlg
  • OnDestroy() : CWincvsView, CWinCvsBrowser, CCJToolBar, CCJListView, CCJListCtrl, CCJHtmlView, CCJFontCombo, CCJCaptionPopupWnd, CBrowserBar, CBrowseFileView, UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, CSelectionDetailsDlg, CItemListDlg, CEditorMonDlg, CCvsRootDlg, CCommit_MAIN, UToolbar, CDynToolBar
  • OnDiff() : CCommit_MAIN
  • OnDirectory() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • OnDocumentComplete() : CCJHtmlView
  • OnDontcreatevendortag() : CImport_MAIN
  • OnDown() : CCustomizeMenus
  • OnDownloadBegin() : CCJHtmlView
  • OnDownloadComplete() : CCJHtmlView
  • OnDraw() : CWincvsView, CWinCvsBrowser, CGraphView, CExploreBar, CCJListView, CCJHtmlView, CBrowserBar
  • OnDrawing() : UCvsGraph
  • OnDrawSplitter() : CGfxSplitterWnd, CCJFlatSplitterWnd
  • OnDropdown() : CHistComboBoxEx, CSmartComboBox
  • OnDropDownButton() : CCJToolBar, CDynToolBar
  • OnDropFiles() : CWincvsView, CMainFrame
  • OnEdit() : CCvsRootDlg
  • OnEditchangePath() : CCvsRootDlg
  • OnEditClear() : CCJHexEdit
  • OnEditClearAll() : CWincvsView
  • OnEditCopy() : CCJHexEdit
  • OnEditCut() : CCJHexEdit
  • OnEditentry() : CImportFilterDlg
  • OnEditPaste() : CCJHexEdit
  • OnEditSelectAll() : CCJHexEdit, CBrowseFileView
  • OnEditUndo() : CCJHexEdit
  • OnEditUpdate() : CCJFlatComboBox
  • OnEnable() : CCJBrowseEdit
  • OnEnableCmd() : UWidget
  • OnEndArrow() : CCJFlatTabCtrl
  • OnEndLabelEdit() : CGfxOutBarCtrl
  • OnEndPrinting() : CWincvsView, CGraphView
  • OnEraseAll() : UCvsConsole
  • OnEraseBkgnd() : CMultilineEntryDlg, CGfxSplitterWnd, CGfxOutBarCtrl, CCJTreeCtrl, CCJToolBar, CCJTabView, CCJTabCtrl, CCJReBar, CCJOutlookBar, CCJMetaFileButton, CCJMDIChildWnd, CCJMaskEdit, CCJListView, CCJListCtrl, CCJListBox, CCJHtmlView, CCJHexEdit, CCJFontCombo, CCJFlatHeaderCtrl, CCJFlatComboBox, CCJFlatButton, CCJExplorerBar, CCJControlBar, CCJColorPopup, CCJColorPicker, CCJCaption
  • OnError() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, LSReport, CFillTclEntries, CFillPyEntries, CFindSettings, MacroTraversal, ImportReport, TraversalReport
  • OnExtdiff() : CGetPrefs_WINCVS, CDiff_MAIN
  • OnExtdiffsel() : CGetPrefs_WINCVS
  • OnFetchCmd() : UWidget
  • OnFile() : TViewFill, CFillTclEntries, CFillPyEntries, CFindSettings, MacroTraversal, ImportReport, TraversalReport
  • OnFileChange() : CBrowseFileView
  • OnFilename() : CSelectionDetailsDlg
  • OnFileNameChange() : CMfFileDialog
  • OnFileNew() : CWincvsApp
  • OnFilePrint() : CCJHtmlView
  • OnFiles() : TLaunchHandler< lauchType >, KoFileActionHandler, TRtagHandler< tagType >, KoCheckoutHandler, KoImportHandler, KoCommandLineHandler, KoCancelChangesHandler, KoGraphAnnotateHandler, KoAnnotateHandler, KoQueryUpdateHandler, KoUpdateHandler, KoCommitHandler, KoAddUnicodeHandler, KoAddBinaryHandler, KoAddHandler, KoUnlockHandler, KoLockHandler, KoFileRemoveHandler, KoStatusHandler, KoGraphHandler, KoLogHandler, KoGraphDiffHandler, KoDiffHandler, KoWatchOffHandler, KoWatchOnHandler, KoEditorsHandler, KoWatchersHandler, KoReleaseHandler, KoUneditHandler, TEditHandler< editType >, TTagHandler< tagType >, KoUpdateMoveToTrashHandler, KoMoveToTrashHandler, KiSelectionHandler
  • OnFilterBarChanged() : CBrowseFileView
  • OnFilterBtnClicked() : CSortHeaderCtrl
  • OnFilterChanged() : CSortHeaderCtrl
  • OnFilteringChanged() : CWinCvsBrowser, CBrowseFileView, UCvsFiles
  • OnFilterMaskEntered() : UCvsFrame
  • OnFolder() : TLaunchHandler< lauchType >, KoFileActionHandler, TRtagHandler< tagType >, KoCheckoutHandler, KoImportHandler, KoCommandLineHandler, KoCancelChangesHandler, KoGraphAnnotateHandler, KoAnnotateHandler, KoQueryUpdateHandler, KoUpdateHandler, KoCommitHandler, KoAddUnicodeHandler, KoAddBinaryHandler, KoAddHandler, KoUnlockHandler, KoLockHandler, KoFileRemoveHandler, KoStatusHandler, KoGraphHandler, KoLogHandler, KoGraphDiffHandler, KoDiffHandler, KoWatchOffHandler, KoWatchOnHandler, KoEditorsHandler, KoWatchersHandler, KoReleaseHandler, KoUneditHandler, TEditHandler< editType >, TTagHandler< tagType >, KoUpdateMoveToTrashHandler, KoMoveToTrashHandler, KiSelectionHandler
  • OnForcerevision() : CCommit_OPTIONS
  • OnForceroot() : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • OnFullScreen() : CCJHtmlView
  • OnGetDlgCode() : CWincvsView, CCJHexEdit
  • OnGetFloat() : UWidget
  • OnGetLoc() : UWidget
  • OnGetSliderProperty() : UWidget
  • OnGetState() : UWidget
  • OnGetText() : UWidget
  • OnGfxLargeicon() : CGfxOutBarCtrl
  • OnGfxRemoveitem() : CGfxOutBarCtrl
  • OnGfxRenameitem() : CGfxOutBarCtrl
  • OnGfxSmallicon() : CGfxOutBarCtrl
  • OnGraphChangelogmessage() : CGraphView
  • OnGraphGraphoptions() : CGraphView
  • OnGraphSetdescription() : CGraphView
  • OnGraphSetstate() : CGraphView
  • OnHeader() : CGraphOptDlg
  • OnHeaders() : CLogMain
  • OnHeadersdesc() : CLogMain
  • OnHeightChange() : CCJReBar
  • OnHelp() : CNoPython, CCustomizeMenus, CTemplateDlg, CSelectionDetailsDlg, CSaveSettingsDlg, CItemListDlg, CImportEntry, CImportWarning, CImportFilterDlg, CGraphOptDlg, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CEditorMonDlg, CDiff_Options, CEditKeywordDlg, CCvsRootDlg
  • OnHelpCvs() : CWincvsApp
  • OnHelpInfo() : CHHelpDialog, CHHelpPropertyPage, CHHelpPropertySheet
  • OnHideUnknown() : UCvsFrame
  • OnHistorySelect() : CMainFrame
  • OnHomeArrow() : CCJFlatTabCtrl
  • OnHScroll() : CCJHexEdit
  • OnIdle() : TBrowserFill, TBrowserFillDummy, TViewFill, TBrowserFill, TBrowserFillDummy, TViewFill, LSReport, CFillTclEntries, CFillPyEntries, ImportReport, TraversalReport
  • OnIgnoreChanged() : CWinCvsBrowser
  • OnImportfilter() : CImport_OPTIONS
  • OnInitDialog() : CAboutDlg, CTipDlg, CNoPython, CMultilineEntryDlg, CHHelpDialog, CHHelpPropertyPage, CHHelpPropertySheet, CCustomizeMenus, CUpdateOptions, CTemplateDlg, CTag_MAIN, CSelectionDetailsDlg, CSaveSettingsDlg, CRtag_OPTIONS, CRtag_MAIN, CProgressDlg, COptionalPropertySheet, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImportFilterDlg, CImport_MAIN, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS, GetPassword, CFilterSelectionDlg, CFilterMaskOptDlg, CFileAction_MAIN, CEditorMonDlg, CDiff_Options, CDiff_MAIN, CCvsRootDlg, CCVSAlert_MAIN, CCommit_MAIN, CCheckout_MAIN, CAnnotate_MAIN, CAdminOption_MAIN, CPseudoDlg
  • OnInitialUpdate() : CWincvsView, CWinCvsBrowser, CGraphView, CCJListView, CBrowseFileView
  • OnInitMenu() : CMainFrame
  • OnInitMenuPopup() : CGraphView, CCJTabCtrl, CCJMDIFrameWnd, CCJFrameWnd, CCJFlatHeaderCtrl, CCJControlBar
  • OnInitTabWidget() : UWidget
  • OnInitWidget() : UWidget
  • OnInvalidate() : UWidget
  • OnInvertTracker() : CGfxSplitterWnd, CCJSizeDockBar, CCJControlBar
  • OnIsdate() : CAnnotate_MAIN
  • OnIsEnabled() : UWidget
  • OnItemchanged() : CBrowseFileView
  • OnItemchangedAllcmds() : CCustomizeMenus
  • OnItemchangedItemlist() : CItemListDlg
  • OnItemchangedKeywordlist() : CCvsRootDlg
  • OnItemchangedMenulist() : CCustomizeMenus
  • OnItemchangedOptionslist() : CDiff_Options
  • OnItemchangedSelectionlist() : CSelectionDetailsDlg
  • OnItemchangedTemplateList() : CTemplateDlg
  • OnItemexpanding() : CWinCvsBrowser, CMyShellTree
  • OnKeydown() : CBrowseFileView
  • OnKeyDown() : CWincvsView, CGraphView, CCJMaskEdit, CCJHexEdit, CCJColorPopup, CPseudoToggle
  • OnKeyUp() : CSortHeaderCtrl
  • OnKillFocus() : CSortHeaderCtrl, CGfxGroupEdit, CCJHexEdit, CCJFlatComboBox, CCJColorPopup
  • OnLButtonDblClk() : CGraphView, CCJMetaFileButton, CCJHexEdit, CCJFlatButton, CBrowseFileView, CPseudoList
  • OnLButtonDown() : CGraphView, CGfxOutBarCtrl, CCJTreeCtrl, CCJOutlookBar, CCJMenuBar, CCJHexEdit, CCJFlatTabCtrl, CCJFlatComboBox, CCJFlatButton, CCJExplorerBar, CCJControlBar
  • OnLButtonUp() : CCJSizeDockBar, CCJOutlookBar, CCJHexEdit, CCJFlatComboBox, CCJFlatButton, CCJExplorerBar, CCJControlBar, CCJColorPopup, CPseudoToggle
  • OnLeftArrow() : CCJFlatTabCtrl
  • OnListAddColumns() : UWidget
  • OnListAddSel() : UWidget
  • OnListDelRow() : UWidget
  • OnListGetInfo() : UWidget
  • OnListGetNext() : UWidget
  • OnListGetNextSel() : UWidget
  • OnListHideColumns() : UWidget
  • OnListInsert() : UWidget
  • OnListNewRow() : UWidget
  • OnListPopup() : UWidget
  • OnListResetAll() : UWidget
  • OnListResort() : UWidget
  • OnListRowGetData() : UWidget
  • OnListRowSetData() : UWidget
  • OnListSetColTitle() : UWidget
  • OnListSetColWidth() : UWidget
  • OnListSetFeedback() : UWidget
  • OnListSetSortDir() : UWidget
  • OnListShowColumns() : UWidget
  • OnLogout() : CGetPrefs_GLOBALS
  • OnLogWindowIsPresent() : CWincvsApp
  • OnMacro() : CWinCvsBrowser, CBrowseFileView
  • OnMacroAdmin() : CWincvsDoc
  • OnMacroSel() : UCvsFiles
  • OnMainTimer() : UCvsApp
  • OnMeasureItem() : CCJTabCtrl, CCJMDIFrameWnd, CCJFrameWnd, CCJFlatHeaderCtrl, CCJControlBar
  • OnMenuBar() : CCJHtmlView
  • OnMenuChar() : CCJTabCtrl, CCJMDIFrameWnd, CCJFrameWnd, CCJFlatHeaderCtrl, CCJControlBar
  • OnMenuInput() : CCJMenuBar
  • OnMenuSelect() : CCJMenuBar
  • OnMerge() : CGraphOptDlg
  • OnMouseMove() : CGfxOutBarCtrl, CCJSizeDockBar, CCJOutlookBar, CCJMenuBar, CCJHyperLink, CCJHexEdit, CCJFlatComboBox, CCJFlatButton, CCJControlBar, CCJColorPopup
  • OnMove() : CCustomizeMenus
  • OnMyFormatFont() : CWincvsView
  • OnNavigateComplete2() : CCJHtmlView
  • OnNcCalcSize() : CCJToolBar, CCJSizeDockBar, CCJReBar
  • OnNcCreate() : CCJToolBar, CCJReBar
  • OnNcDestroy() : CCJColorPopup
  • OnNcHitTest() : CCvsStatusBar, CCJToolBar, CCJSizeDockBar, CCJControlBar
  • OnNcLButtonDblClk() : CCJMiniDockFrameWnd
  • OnNcLButtonDown() : CCJSizeDockBar, CCJMiniDockFrameWnd
  • OnNcPaint() : CCJToolBar, CCJSizeDockBar, CCJReBar, CCJControlBar
  • OnNewDocument() : CWincvsDoc, CGraphDoc
  • OnNewWindow2() : CCJHtmlView
  • OnNextTip() : CTipDlg
  • OnNode() : CGraphOptDlg
  • OnNotify() : CCJListView, CCJListCtrl
  • OnOK() : CTipDlg, CCustomizeMenus, CTemplateDlg, CProgressDlg, CItemListDlg, CGraphOptDlg, CFileAction_MAIN, CDiff_Options, CCVSAlert_MAIN, UPromptMessage
  • OnOption() : CItemListDlg
  • OnOptionsmenu() : CDiff_MAIN
  • OnOtherButton() : CCVSAlert_MAIN
  • OnPageChanged() : UWidget
  • OnPagerCalcSize() : CCJPagerCtrl
  • OnPagerScroll() : CCJPagerCtrl
  • OnPaint() : CTipDlg, CSplashWnd, CColorStatic, CGfxSplitterWnd, CGfxOutBarCtrl, CCJTreeCtrl, CCJToolBarBase, CCJToolBar, CCJTabCtrl, CCJReBar, CCJOutlookBar, CCJMetaFileButton, CCJMaskEdit, CCJLogoPane, CCJListCtrl, CCJListBox, CCJHtmlView, CCJHexEdit, CCJFontCombo, CCJFlatTabCtrl, CCJFlatSplitterWnd, CCJFlatHeaderCtrl, CCJFlatComboBox, CCJFlatButton, CCJControlBar, CCJColorPopup, CCJColorPicker, CCJCaptionPopupWnd, CCJCaption, CBrowserBar, CPseudoDraw
  • OnPaletteChanged() : CCJColorPopup
  • OnPath() : CSelectionDetailsDlg
  • OnPopup() : UCvsFiles
  • OnPreparePrinting() : CWincvsView, CGraphView, CBrowseFileView
  • OnPreserveZeroBorderHelper() : CCJToolBar
  • OnPrint() : CGraphView, CBrowseFileView
  • OnProgressChange() : CCJHtmlView
  • OnPropertyChange() : CCJHtmlView
  • OnPushPinButton() : CCJCaption
  • OnPushPinCancel() : CCJCaption
  • OnPythondllsel() : CGetPrefs_WINCVS
  • OnQueryNewPalette() : CCJColorPopup
  • OnQueryProperties() : CWinCvsBrowser, CBrowseFileView
  • OnQueryShellactionDefault() : CGraphView, CBrowseFileView
  • OnQuit() : CCJHtmlView, UCvsFrame
  • OnRButtonDown() : CWincvsView, CWinCvsBrowser, CGfxOutBarCtrl, CCJToolBar, CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • OnRclick() : CMyShellTree
  • OnReadProtocols() : CCvsRootDlg
  • OnRecalcParent() : CCJReBar
  • OnRedraw() : UWidget
  • OnRefresh() : CItemListDlg
  • OnRemove() : CCustomizeMenus
  • OnReset() : CGraphOptDlg
  • OnResetView() : CWinCvsBrowser, CBrowseFileView
  • OnRev() : CUpdateOptions, CRtag_OPTIONS, CLogFilters
  • OnRevision() : CSelectionDetailsDlg
  • OnRightArrow() : CCJFlatTabCtrl
  • OnSavesettings() : CWincvsDoc
  • OnScroll() : CGraphView
  • OnSelchange() : CCJTabView, CKeywordComboBox
  • OnSelChange() : CCJColorPicker
  • OnSelchangeAction() : CFileAction_MAIN
  • OnSelchangeAutoRefresh() : CItemListDlg
  • OnSelchangeCombo() : CMultilineEntryDlg
  • OnSelchangeCompareType() : CDiff_MAIN
  • OnSelchangeContentsCombo() : CFilterSelectionDlg
  • OnSelchanged() : CWinCvsBrowser, CMyShellTree
  • OnSelchangeFiletodiff() : CCommit_MAIN
  • OnSelchangeMergeType() : CUpdateMerge
  • OnSelchangePath() : CImport_OPTIONS, CCvsRootDlg
  • OnSelchangeProtocol() : CCvsRootDlg
  • OnSelchanging() : CWinCvsBrowser
  • OnSelColumn() : UCvsFiles
  • OnSelcvsroot() : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • OnSelection() : CItemListDlg, CGraphOptDlg
  • OnSelectString() : CSmartComboBox
  • OnSelEndCancel() : CCJColorPicker
  • OnSelEndOK() : CCJColorPicker
  • OnSelfolder() : CCmdLine_MAIN
  • OnSetBitmapSize() : CCJToolBar
  • OnSetButtonSize() : CCJToolBar
  • OnSetCursor() : CWinCvsBrowser, CGfxOutBarCtrl, CCJSizeDockBar, CCJHyperLink, CCJFlatButton, CCJControlBar, CBrowseFileView
  • OnSetDefault() : UWidget
  • OnSetFeature() : CSmartComboBox
  • OnSetFloat() : UWidget
  • OnSetFocus() : CWincvsView, CCJHexEdit, CCJFlatComboBox
  • OnSetfocusLogmsg() : CMultilineEntryDlg
  • OnSetfocusLogmsgWrap() : CMultilineEntryDlg
  • OnSetIcon() : UWidget
  • OnSetItems() : CSmartComboBox
  • OnSetLoc() : UWidget
  • OnSetReadOnly() : CSmartComboBox
  • OnSetSizeHelper() : CCJToolBar
  • OnSetSlider() : UWidget
  • OnSetSliderProperty() : UWidget
  • OnSetState() : UWidget
  • OnSetText() : UWidget
  • OnSetTooltip() : UWidget, UToolbar
  • OnShadow() : CGraphOptDlg
  • OnShowBand() : CCJReBar
  • OnShowWidget() : UWidget
  • OnShowWindow() : CCJBrowseEdit
  • OnSize() : CWincvsView, CCvsStatusBar, CGfxOutBarCtrl, CCJStatusBar, CCJMenuBar, CCJHtmlView, CCJFlatTabCtrl, CCJCaption
  • OnSmartComboSetFeature() : UWidget
  • OnSmartComboSetItems() : UWidget
  • OnSmartComboSetReadOnly() : UWidget
  • OnSpecifyRev() : CAnnotate_MAIN
  • OnState() : CLogFilters, CGraphOptDlg
  • OnStatusBar() : CCJHtmlView
  • OnStatusBarText() : UWidget
  • OnStatusTextChange() : CCJHtmlView
  • OnStopcvs() : CWincvsApp
  • OnSysColorChange() : CGfxOutBarCtrl, CCJToolBar, CCJOutlookBar, CCJFlatComboBox, CCJFlatButton, CCJCaption, CCJCaptionButton
  • OnSysCommand() : CMainFrame
  • OnTabSelChange() : CCJTabCtrlBar
  • OnTag() : CGraphOptDlg
  • OnTbButton() : UToolbar
  • OnTbCheckBtn() : UToolbar
  • OnTbDropDown() : UToolbar
  • OnTbEnd() : UToolbar
  • OnTbInit() : UToolbar
  • OnTbSeparator() : UToolbar
  • OnTcldllsel() : CGetPrefs_WINCVS
  • OnTcpip() : CGetPrefs_GLOBALS
  • OnTheaterMode() : CCJHtmlView
  • OnTimer() : CSplashWnd, CMainFrame, CCvsStatusBar, CGfxOutBarCtrl, CCJOutlookBar, CCJFlatComboBox, CCJFlatButton, CCJCaptionPopupWnd, CBrowseFileView, CEditorMonDlg
  • OnTitleChange() : CCJHtmlView
  • OnToolBar() : CCJHtmlView
  • OnToolBarBeginAdjust() : CCJToolBar
  • OnToolBarBeginDrag() : CCJToolBar
  • OnToolBarBtnDropDown() : CCJToolBar
  • OnToolBarChange() : CCJToolBar
  • OnToolBarCustomHelp() : CCJToolBar
  • OnToolBarEndAdjust() : CCJToolBar
  • OnToolBarEndDrag() : CCJToolBar
  • OnToolBarGetButtonInfo() : CCJToolBar
  • OnToolBarQueryDelete() : CCJToolBar
  • OnToolBarQueryInsert() : CCJToolBar
  • OnToolBarReset() : CCJToolBar
  • OnToolHitTest() : CCJToolBar, CCJReBar
  • OnTreeDelete() : UWidget
  • OnTreeExpand() : UWidget
  • OnTreeExpanding() : UCvsFolders
  • OnTreeGetInfo() : UWidget
  • OnTreeGetSel() : UWidget
  • OnTreeInsert() : UWidget
  • OnTreeResetAll() : UWidget
  • OnTreeSelect() : UWidget
  • OnTreeSelecting() : UCvsFolders
  • OnTreeSetData() : UWidget
  • OnTreeSetIcon() : UWidget
  • OnUnblockHandler() : UWidget
  • OnUp() : CCustomizeMenus
  • OnUpdateAppCmdline() : CWinCvsBrowser
  • OnUpdateButtonClose() : CCJExplorerBar, CCJControlBar
  • OnUpdateButtonMinimize() : CCJControlBar
  • OnUpdateCmd() : CWinCvsBrowser, CExploreBar
  • OnUpdateCmdUI() : CCJToolBar, CCJReBar, CCJControlBar
  • OnUpdateCustomize() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateCvsCmd() : CWincvsDoc, CBrowseFileView
  • OnUpdateFilterMask() : CMainFrame
  • OnUpdateFocus() : UWidget
  • OnUpdateGeneric() : UCvsFolders
  • OnUpdateGfxLargeicon() : CGfxOutBarCtrl
  • OnUpdateGfxRemoveitem() : CGfxOutBarCtrl
  • OnUpdateGfxRenameitem() : CGfxOutBarCtrl
  • OnUpdateGfxSmallicon() : CGfxOutBarCtrl
  • OnUpdateGraphChangelogmessage() : CGraphView
  • OnUpdateGraphSetdescription() : CGraphView
  • OnUpdateGraphSetstate() : CGraphView
  • OnUpdateHistory() : CMainFrame
  • OnUpdateMacro() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateMacroAdmin() : CWincvsDoc
  • OnUpdateMenuButton() : CCJMenuBar
  • OnUpdatePrefs() : CWincvsDoc
  • OnUpdateQueryProperties() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateSavesettings() : CWincvsDoc
  • OnUpdateStopcvs() : CWincvsApp
  • OnUpdateUI() : UWidget, UToolbar, UMenu, UMacAppMenu
  • OnUpdateUsePyshell() : CWincvsDoc
  • OnUpdateUseTclshell() : CWincvsDoc
  • OnUpdateViewAdd() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateViewAddB() : CBrowseFileView
  • OnUpdateViewAdded() : CMainFrame
  • OnUpdateViewAnnotate() : CBrowseFileView
  • OnUpdateViewChanged() : CMainFrame
  • OnUpdateViewCheckout() : CWinCvsBrowser, CExploreBar, CBrowseFileView
  • OnUpdateViewClearall() : CMainFrame
  • OnUpdateViewConflict() : CMainFrame
  • OnUpdateViewDelrev() : CGraphView
  • OnUpdateViewDiff() : CGraphView
  • OnUpdateViewEditseldef() : CBrowseFileView
  • OnUpdateViewExplore() : CWinCvsBrowser, CBrowseFileView
  • OnUpdateViewFilterbarClearall() : CMainFrame
  • OnUpdateViewFilterbarEnable() : CMainFrame
  • OnUpdateViewFilterbarOptions() : CMainFrame
  • OnUpdateViewFullRowDetails() : CBrowseFileView
  • OnUpdateViewGraph() : CBrowseFileView
  • OnUpdateViewHidemissing() : CMainFrame
  • OnUpdateViewHideunknown() : CMainFrame
  • OnUpdateViewIgnore() : CMainFrame
  • OnUpdateViewImport() : CWinCvsBrowser, CExploreBar, CBrowseFileView
  • OnUpdateViewList() : CBrowseFileView
  • OnUpdateViewMissing() : CMainFrame
  • OnUpdateViewModified() : CMainFrame
  • OnUpdateViewRecursive() : CMainFrame
  • OnUpdateViewRelease() : CBrowseFileView
  • OnUpdateViewReload() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnUpdateViewRemoved() : CMainFrame
  • OnUpdateViewRetrieve() : CGraphView
  • OnUpdateViewRmv() : CBrowseFileView
  • OnUpdateViewSelnonsig() : CGraphView
  • OnUpdateViewSmallIcons() : CBrowseFileView
  • OnUpdateViewTag() : CGraphView
  • OnUpdateViewTrash() : CBrowseFileView
  • OnUpdateViewUnknown() : CMainFrame
  • OnUpdateViewUnlockf() : CGraphView
  • OnUpdateViewUpdate() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnUpdateViewUpone() : CBrowseFileView
  • OnUsePyshell() : CWincvsDoc
  • OnUser() : CLogFilters
  • OnUseTclshell() : CWincvsDoc
  • OnViewAdd() : CWinCvsBrowser, CBrowseFileView
  • OnViewAddb() : CBrowseFileView
  • OnViewAdded() : CMainFrame, UCvsFrame
  • OnViewAddu() : CBrowseFileView
  • OnViewBrowselocationRemoveunwanted() : CWincvsDoc
  • OnViewChanged() : CMainFrame, UCvsFrame
  • OnViewCheckout() : CWinCvsBrowser, CExploreBar, CBrowseFileView
  • OnViewClearall() : CMainFrame
  • OnViewCommit() : CWinCvsBrowser, CBrowseFileView
  • OnViewConflict() : CMainFrame, UCvsFrame
  • OnViewDelrev() : CGraphView
  • OnViewDiff() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnViewEdit() : CWinCvsBrowser, CBrowseFileView
  • OnViewEditors() : CWinCvsBrowser, CBrowseFileView
  • OnViewEditsel() : CGraphView, CBrowseFileView
  • OnViewEditseldef() : CGraphView, CBrowseFileView
  • OnViewExplore() : CWinCvsBrowser, CBrowseFileView
  • OnViewFilterbarClearall() : CBrowseFileView
  • OnViewFilterbarEnable() : CBrowseFileView
  • OnViewFilterbarOptions() : CBrowseFileView
  • OnViewForceedit() : CWinCvsBrowser, CBrowseFileView
  • OnViewFullRowDetails() : CBrowseFileView
  • OnViewGraph() : CBrowseFileView
  • OnViewHidemissing() : CMainFrame
  • OnViewHideunknown() : CMainFrame
  • OnViewIgnore() : CMainFrame
  • OnViewIgnored() : UCvsFrame
  • OnViewImport() : CWinCvsBrowser, CExploreBar, CBrowseFileView
  • OnViewInit() : CWincvsDoc
  • OnViewList() : CBrowseFileView
  • OnViewLog() : CWinCvsBrowser, CBrowseFileView
  • OnViewMissing() : CMainFrame, UCvsFrame
  • OnViewModified() : CMainFrame, UCvsFrame
  • OnViewNewInstance() : CWinCvsBrowser, CBrowseFileView
  • OnViewOpensel() : CGraphView, CBrowseFileView
  • OnViewOpenselas() : CGraphView, CBrowseFileView
  • OnViewPathChanged() : CWincvsDoc
  • OnViewQueryUpdate() : CWinCvsBrowser, CBrowseFileView
  • OnViewRecursive() : CMainFrame, UCvsFrame, UCvsFiles
  • OnViewRelease() : CWinCvsBrowser, CBrowseFileView
  • OnViewReload() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnViewRemoved() : CMainFrame, UCvsFrame
  • OnViewReservededit() : CWinCvsBrowser, CBrowseFileView
  • OnViewRetrieve() : CGraphView
  • OnViewRetrieveAs() : CGraphView
  • OnViewRmv() : CBrowseFileView
  • OnViewSelnonsig() : CGraphView
  • OnViewSmallIcons() : CBrowseFileView
  • OnViewStatus() : CWinCvsBrowser, CBrowseFileView
  • OnViewTag() : CGraphView
  • OnViewTagBranch() : CWinCvsBrowser, CBrowseFileView
  • OnViewTagDelete() : CWinCvsBrowser, CBrowseFileView
  • OnViewTagNew() : CWinCvsBrowser, CBrowseFileView
  • OnViewTrash() : CBrowseFileView
  • OnViewUnedit() : CWinCvsBrowser, CBrowseFileView
  • OnViewUnknown() : CMainFrame, UCvsFrame
  • OnViewUnlock() : CWinCvsBrowser, CBrowseFileView
  • OnViewUnlockf() : CGraphView
  • OnViewUpdate() : CWinCvsBrowser, CGraphView, CBrowseFileView
  • OnViewUpone() : CBrowseFileView
  • OnViewWatchers() : CWinCvsBrowser, CBrowseFileView
  • OnViewWatchOff() : CWinCvsBrowser, CBrowseFileView
  • OnViewWatchOn() : CWinCvsBrowser, CBrowseFileView
  • OnVisible() : CCJHtmlView
  • OnVScroll() : CCJHexEdit
  • OnWindowPosChanged() : CExploreBar, CCJToolBar, CCJTabView, CCJTabCtrlBar, CCJFlatHeaderCtrl, CCJExplorerBar, CCJControlBar, CBrowserBar
  • OnWindowPosChanging() : CCJToolBarBase, CCJToolBar
  • OnWordwrap() : CMultilineEntryDlg
  • Open() : CCJMemFile, CCvsStreamConsole
  • operator &() : URect
  • operator &=() : URect
  • operator char *() : CBuffer
  • operator CHARFORMAT &() : CCharFormat
  • operator const bool &() : CPersistentBool
  • operator const char *() : PCStr, PCPStr, UStr, UPStr
  • operator const int &() : CPersistentInt
  • operator const T &() : CPersistentT< T >
  • operator const T *() : CStaticAllocT< T >
  • operator const unsigned char *() : PCPStr, UPStr
  • operator const URECT *() : URect
  • operator CRect() : URect
  • operator EntnodeData *() : PyCvsEntry, ENTNODE
  • operator HBITMAP() : aref
  • operator PyThreadState *() : CPython_Interp
  • operator T *() : PyAutoObject< T >, CStaticAllocT< T >
  • operator Tcl_Interp *() : CTcl_Interp
  • operator UMENU() : PyMenuMgr
  • operator URECT *() : URect
  • operator!=() : UStr, URect, UPoint, USize
  • operator()() : match_dir
  • operator+() : URect, UPoint, USize
  • operator+=() : CCJMemFile, UStr, URect, UPoint, USize
  • operator-() : URect, UPoint, USize
  • operator-=() : URect, UPoint, USize
  • operator->() : PyAutoObject< T >
  • operator<() : CMacroEntry, UStr
  • operator<<() : CColorConsole, UStr, UPStr
  • operator=() : CWinPlacement, CCJStatusBarPane, CContentItems, CCJMemFile, CTCLBrowserEnt, PyAutoObject< T >, CPersistentInt, CPersistentBool, CPersistentT< T >, MultiFilesEntry, FileEntry, CMacroEntry, MacBinMaps, CMacBinItem, CMacBinTable, ENTNODE, PCStr, PCPStr, NotificationManager::Node, UTimer, awidget, aref, UStr, UPStr, CMsg, URect, CPseudoItem
  • operator==() : CPersistentInt, CPersistentBool, CPersistentT< T >, CMacroEntry, UStr, URect, UPoint, USize
  • operator>() : UStr
  • operator[]() : CCJMemFile, EntnodeFolder, EntnodeFile, EntnodeData
  • operator|() : URect
  • operator|=() : URect
  • OutColor() : CWincvsView, UCvsConsole
  • OutConsole() : CWincvsView, UCvsConsole
  • OutLine() : CWincvsView
  • OverideMapWidget() : UWidget
  • OverkillAssert() : CCJTabCtrlBar

- p -

  • p_str() : UPStr
  • PaintItems() : CGfxOutBarCtrl
  • param() : ansiAttrCvt::AnsiSeq
  • paramc() : ansiAttrCvt::AnsiSeq
  • Parse() : CListParserConsole, CModuleParserConsole, CTagParserConsole, CItemListConsole, CCvsRootParser, CProtocolParserConsole, CInfoParserConsole, CCvsRootConsole
  • parse() : CvsArgs
  • ParseIt() : CTCP2Parse
  • PCPStr() : PCPStr
  • PCStr() : PCStr
  • PeekPumpAndIdle() : CWincvsApp, UCvsApp
  • PointInRect() : CCJFlatComboBox
  • PositionControls() : CCJStatusBar
  • PositionWindow() : CCJHyperLink
  • PostClickRefresh() : CItemListDlg
  • PostNcDestroy() : CSplashWnd, CGfxGroupEdit, CProgressDlg
  • PostReadProtocolsMsg() : CCvsRootDlg
  • PreCreateWindow() : CWincvsView, CWinCvsBrowser, CMainFrame, CCJTreeCtrl, CCJToolBar, CCJMDIFrameWnd, CCJHexEdit, CCJFrameWnd, CCJFlatTabCtrl, CBrowseFileView
  • PressButton() : CCJToolBar
  • PreSubclassWindow() : CCJHyperLink, CCJFontCombo, CCJFlatHeaderCtrl, CCJColorPicker, CCJBrowseEdit, CSmartComboBox, CKeywordComboBox
  • PreTranslateAppMessage() : CSplashWnd
  • PreTranslateMessage() : CWincvsApp, CMultilineEntryDlg, CLogFrame, CHistComboBoxEx, CCvsStatusBar, CGfxGroupEdit, CCJTabCtrlBar, CCJHyperLink, CCJFrameWnd, CCJFlatTabCtrl, CCJFlatComboBox, CCJControlBar, CCJColorPopup, CSmartComboBox, CItemListDlg
  • Print() : PyColorConsole
  • print() : CvsArgs
  • PrintOut() : ReportWarning, ReportConflict
  • ProcessMask() : CCJTimeEdit, CCJDateEdit, CCJMaskEdit
  • ProcessSelectionCommand() : CWinCvsBrowser, CBrowseFileView, UCvsFolders, UCvsFiles
  • PromptForColor() : CGraphOptDlg
  • ProxyHost() : CvsPrefs
  • ProxyPort() : CvsPrefs
  • PruneOption() : CvsPrefs
  • PserverPort() : CvsPrefs
  • PtInRect() : URect
  • push_back() : CTmpFiles
  • PushBackgroundColor() : CTCP2Parse
  • PushBlink() : CTCP2Parse
  • PushBold() : CTCP2Parse
  • PushEncoding() : CTCP2Parse
  • PushFontSize() : CTCP2Parse
  • PushForegroundColor() : CTCP2Parse
  • PushItalic() : CTCP2Parse
  • PushOut() : CTCP2Parse
  • PushOverstrike() : CTCP2Parse
  • PushReverse() : CTCP2Parse
  • PushSpacing() : CTCP2Parse
  • PushStart() : CTCP2Parse
  • PushTextSegment() : CTCP2Parse
  • PushUnderline() : CTCP2Parse
  • PushURL() : CTCP2Parse
  • PutProperty() : CCJHtmlView
  • PyAutoObject() : PyAutoObject< T >
  • PyCmdUI() : PyCmdUI
  • PyColorConsole() : PyColorConsole
  • PyContainer() : PyContainer
  • PyCvsEntry() : PyCvsEntry
  • PyMenuMgr() : PyMenuMgr
  • PyPersistent() : PyPersistent
  • PyRegistry() : PyRegistry
  • PythonLibrary() : CvsPrefs

- q -

  • QueryAcceptData() : CWincvsView
  • QueryStatusWB() : CCJHtmlView
  • QuietOption() : CvsPrefs

- r -

  • ReadAdminFile() : CCvsSandboxInfo
  • ReadAvailableProtocols() : CCvsRootDlg
  • ReadFields() : TPseudoDoubleNumberText, TPseudoIconCheckBox, TPseudoRotateIconButton, TPseudoIconButton, TPseudoIconPopup, TBuggyPopup
  • ReadIconsID() : UPseudoRotButton
  • ReadOleDateTime() : CCJDateEdit
  • ReadProtocolDetails() : CCvsRootDlg
  • ReadSelectedTemplate() : CTemplateDlg
  • ReadString() : CCJMemFile
  • RebuildBar() : UToolbar
  • RecalcAllExcept() : CCJSizeDockBar, CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • RecalcLayout() : CGfxSplitterWnd, CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • RecalcSize() : CCJPagerCtrl
  • RecomputeMenuLayout() : CCJMenuBar
  • RecomputeToolbarSize() : CCJMenuBar
  • Rectangle() : UDC
  • Ref() : PyAutoObject< T >, EntnodeData, EntnodePath, aref
  • Refresh() : CCJHtmlView
  • Refresh2() : CCJHtmlView
  • Register() : CPersistent
  • RegisterAllObjects() : PyRegistry
  • RegisterValue() : PyContainer
  • RelayEvent() : CMultiLineEditDialogKeyHelper
  • Remove() : CSubclassWndMap, TMString< T >
  • RemoveAll() : CSubclassWndMap, TMString< T >, TPseudoTextListView
  • RemoveAllTabs() : CCJTabCtrlBar
  • RemoveCell() : CMacBinItem
  • RemoveEntry() : MacBinMaps
  • RemoveFolder() : CGfxOutBarCtrl
  • RemoveItem() : CGfxOutBarCtrl, USmartCombo
  • RemoveListItem() : CCJTabCtrlBar
  • RemoveMenu() : CCJMenu
  • RemovePane() : CCJStatusBar
  • RemoveTimer() : UWidget
  • RemoveView() : CCJTabView, CCJTabCtrlBar
  • replace() : UStr, UPStr
  • ReplaceView() : CCJFlatSplitterWnd
  • ReportConflict() : ReportConflict
  • ReportError() : CCJHyperLink
  • ReportWarning() : ReportWarning
  • RepositionCaret() : CCJHexEdit
  • Reset() : CSortList< T >, MacBinMaps
  • reset() : MultiFiles, CvsArgs
  • ResetBrowser() : CWinCvsBrowser, UCvsFolders
  • ResetIdleTime() : CWincvsApp
  • ResetLastFilter() : CSortHeaderCtrl
  • ResetTimeStamp() : CPersistent
  • ResetToolTips() : CCJTabCtrlBar
  • ResetView() : CWinCvsBrowser, CBrowseFileView, UCvsFolders, UCvsFiles
  • Resize() : CCVSAlert_MAIN
  • ResizeWindow() : CCJFlatHeaderCtrl
  • Resort() : CBrowseFileView, UCvsFiles
  • RestartScriptEngine() : CWincvsApp, UCvsApp
  • RestoreState() : CCJToolBar
  • Result() : CSortList< T >
  • RetrievePath() : CWinCvsBrowser, UCvsFolders
  • RetrieveSel() : CGraphView
  • rfind() : UStr
  • RhostPort() : CvsPrefs
  • RoundRect() : UDC
  • RshName() : CvsPrefs
  • rtCMPString() : CMPString
  • rtCMString() : CMString
  • rtCPersistent() : CPersistent
  • rtCPersistentBool() : CPersistentBool
  • rtCPersistentInt() : CPersistentInt
  • rtPCPStr() : PCPStr
  • rtPCStr() : PCStr
  • rtrim() : UStr
  • rtUCmdTarget() : UCmdTarget
  • rtUCvsApp() : UCvsApp
  • rtUCvsConsole() : UCvsConsole
  • rtUCvsFiles() : UCvsFiles
  • rtUCvsFolders() : UCvsFolders
  • rtUCvsFrame() : UCvsFrame
  • rtUCvsGraph() : UCvsGraph
  • rtUCvsMenubar() : UCvsMenubar
  • rtUCvsStatusbar() : UCvsStatusbar
  • rtUCvsToolbar() : UCvsToolbar
  • rtUEditMessage() : UEditMessage
  • rtUMacAppMenu() : UMacAppMenu
  • rtUMenu() : UMenu
  • rtUObject() : UObject
  • rtUPromptMessage() : UPromptMessage
  • rtUToolbar() : UToolbar
  • rtUWidget() : UWidget
  • Run() : KoWatcher

- s -

  • Save() : CCJMemFile
  • save() : CvsPrefs
  • SaveAll() : CPersistent
  • SaveAllModified() : CWincvsApp
  • SaveAllSettings() : CPersistent
  • SaveBarState() : CCJMDIFrameWnd, CCJFrameWnd, CCJControlBar
  • SaveColumns() : CBrowseFileView, UCvsFiles
  • SaveColumnWidths() : CCJListView, CCJListCtrl
  • SaveDefaults() : MacBinMaps
  • SaveSel() : CGraphView
  • SaveSettings() : KoIgnoreModel, KoRecursionModel, KoFilterModel, KiFilterBase
  • SaveState() : CCJToolBar
  • SaveWindowPos() : CCJWindowPlacement
  • SayWelcome() : UCvsApp
  • ScrollIntoView() : CCJHexEdit
  • Search() : UCvsFiles, WININFO
  • searchAllPath() : CFindSettings
  • searchPath() : CFindSettings
  • SearchWidID() : LPseudoWinAttachment
  • SelDelete() : CCJHexEdit
  • Selected() : CWinLogData
  • SelectItem() : CItemListDlg
  • SelectItems() : CCJTreeCtrl
  • SelectObject() : UDC
  • SelfBounds() : CWinLogData
  • SelInsert() : CCJHexEdit
  • SendChar() : CCJMaskEdit
  • SendMessageC() : CCJToolBar
  • seq() : ansiAttrCvt::AnsiSeq
  • Serialize() : CWincvsDoc, CGraphDoc
  • ServerName() : CvsPrefs
  • set() : UStr, UPStr
  • SetAccelerators() : CCVSAlert_MAIN
  • SetActions() : CMultilineEntryDlg
  • SetActiveView() : CCJTabView, CCJTabCtrlBar
  • SetActualSize() : CCJSizeDockBar
  • SetAddControl() : CvsPrefs
  • SetAddressBar() : CCJHtmlView
  • SetAlertTitle() : CvsAlert
  • SetAlternateColors() : CCJFlatButton
  • SetAlwaysUseCvsroot() : CvsPrefs
  • SetAnchorHighlight() : CCJToolBarCtrl
  • SetAnimationTickCount() : CGfxOutBarCtrl
  • SetAnimSelHighlight() : CGfxOutBarCtrl
  • SetAnsiString() : CCJMenuData
  • SetAutoSize() : CCJHyperLink
  • SetBackgroundProcess() : CWincvsApp
  • SetBandInfo() : CCJReBarCtrl
  • SetBarInfo() : CCJReBarCtrl
  • SetBitmap() : CCJToolBar
  • SetBitmapBackground() : CCJMenu
  • SetBitmapSize() : CCJToolBar
  • SetBkColor() : CCJReBarCtrl, CCJPagerCtrl, CCJColorPicker
  • SetBorder() : CCJPagerCtrl
  • SetBorders() : CCJToolBarBase
  • SetBPR() : CCJHexEdit
  • SetBrowser() : CvsPrefs
  • SetButton() : CCJToolBar
  • SetButtonAccelerator() : CCVSAlert_MAIN
  • SetButtonFont() : CCJFlatButton
  • SetButtonInfo() : CCJToolBarCtrl, CCJToolBar
  • SetButtons() : CCJToolBar
  • SetButtonSize() : CCJToolBar, CCJPagerCtrl
  • SetButtonStructSize() : CCJToolBar
  • SetButtonStyle() : CCJToolBar, CCJCaptionButton
  • SetButtonText() : CCJToolBar
  • SetButtonTitle() : CvsAlert
  • SetButtonTitles() : CCVSAlert_MAIN
  • SetButtonWidth() : CCJToolBarCtrl
  • SetCaptionColors() : CCJCaption
  • SetCheck() : CCJToolCmdUI, PyCmdUI
  • SetCheckoutRO() : CvsPrefs
  • SetChild() : CCJPagerCtrl, CCJControlBar
  • SetChildWindow() : CCJCaption
  • SetCmdID() : CCJToolBar
  • SetColor() : CColorStatic, CCJMonthCalCtrl, CCJColorPicker
  • SetColors() : CCJHyperLink
  • SetColorScheme() : CCJReBarCtrl
  • SetColumnWidth() : CCJListView, CCJListCtrl
  • SetConflict() : ReportConflict
  • SetConsoleFont() : CvsPrefs
  • SetContext() : CMainFrame, KoFilterModel
  • SetContinue() : UCmdUI
  • SetCtrlHelpID() : CHHelpSupport
  • SetCtrlPressedOnOK() : CvsPrefs
  • SetCurrentMap() : CMacBinTable
  • SetCurSel() : CCJFlatTabCtrl, CCJMonthCalCtrl
  • SetCustomText() : CCJColorPicker
  • SetCvsConsole() : CvsPrefs, CCvsProcessData
  • SetCvsExitOnError() : CTcl_Interp
  • SetCvsLastErrorCode() : CTcl_Interp
  • SetCvsProcess() : CWincvsApp, UCvsApp
  • SetCvsRunning() : CWincvsApp, UCvsApp, CvsPrefs
  • SetCvsStopping() : CWincvsApp, UCvsApp
  • SetCvsVersion() : CvsPrefs
  • SetData() : CMMenuString, CWinPlacement, CCJHexEdit, CPersistentT< T >, CPersistent, TMString< T >, TMPersistent< T >, PCStr, PCPStr
  • SetDateTime() : CCJDateEdit
  • SetDayState() : CCJMonthCalCtrl
  • SetDefaultButton() : CCVSAlert_MAIN
  • SetDefaultCursor() : CCJHyperLink
  • SetDefaultInput() : CDiff_MAIN
  • SetDefaultRoot() : UCvsFolders
  • SetDefaults() : CTCP2Parse
  • SetDefaultText() : CCJColorPicker
  • SetDescription() : CKeywordComboBox
  • SetDescriptionWnd() : CKeywordComboBox
  • setdir() : MultiFilesEntry
  • SetDisabledImageList() : CCJToolBarCtrl
  • SetDisableOldStyle() : CCJMenu
  • SetDisableSplashScreen() : CvsPrefs
  • SetDlgDefExt() : CCJBrowseEdit
  • SetDlgFileName() : CCJBrowseEdit
  • SetDlgFilter() : CCJBrowseEdit
  • SetDlgOpenFile() : CCJBrowseEdit
  • SetDlgOwner() : CCJBrowseEdit
  • SetDlgStyle() : CCJBrowseEdit
  • SetDlgTitle() : CCJBrowseEdit
  • SetDrawTextFlags() : CCJToolBarCtrl
  • SetEditMask() : CCJMaskEdit
  • SetEditSel() : CCJComboBoxEx
  • SetEncoding() : EntnodeFile
  • SetEncryptCommunication() : CvsPrefs
  • SetEntryDescription() : CMultilineEntryDlg
  • SetExtDiff() : CvsPrefs
  • SetExtendedStyle() : CCJToolBarCtrl, CCJToolBar, CCJListView, CCJListCtrl, CCJComboBoxEx
  • SetFeature() : USmartCombo
  • SetFileActionType() : CvsPrefs
  • SetFilterBarMask() : CMainFrame
  • SetFilterChangeTimeout() : CSortHeaderCtrl
  • SetFilterText() : CSortHeaderCtrl
  • SetFirstDayOfWeek() : CCJMonthCalCtrl
  • SetFolderImageList() : CGfxOutBarCtrl
  • SetFolderText() : CGfxOutBarCtrl
  • setFont() : UCvsConsole
  • SetFontBold() : CCJFlatHeaderCtrl
  • SetFormat() : CCJDateTimeCtrl
  • SetFullScreen() : CCJHtmlView
  • SetGroup() : CPseudoToggle
  • SetHasLoogedIn() : CvsPrefs
  • SetHeight() : CCJToolBar, CCJHtmlView
  • SetHelper() : CvsPrefs
  • SetHideCommandDlgAnnotate() : CvsPrefs
  • SetHideCommandDlgDiff() : CvsPrefs
  • SetHideCommandDlgFileAction() : CvsPrefs
  • SetHideCommandDlgGraph() : CvsPrefs
  • SetHideCommandDlgLog() : CvsPrefs
  • SetHideCommandDlgStatus() : CvsPrefs
  • SetHideCommandDlgUpdate() : CvsPrefs
  • SetHideCommandDlgUseShift() : CvsPrefs
  • SetHideOption() : CvsAlert
  • SetHilightColors() : CCJFontCombo
  • SetHome() : CvsPrefs
  • SetHotImageList() : CCJToolBarCtrl
  • SetHotItem() : CCJToolBarCtrl, CCJToolBar
  • SetHours() : CCJTimeEdit
  • SetIcon() : CHistComboBoxEx, CCJFlatButton, CCVSAlert_MAIN
  • SetIconSize() : CCJMenu
  • SetICTextOption() : CvsPrefs
  • SetIgnored() : EntnodeData
  • SetImageList() : CGfxOutBarCtrl, CCJToolBarCtrl, CCJToolBar, CCJReBarCtrl, CCJComboBoxEx
  • SetImageLists() : CCJOutlookBar
  • SetIndent() : CCJToolBarCtrl, CCJToolBar
  • SetIndicators() : CCvsStatusBar
  • SetInsertMark() : CCJToolBarCtrl
  • SetInsertMarkColor() : CCJToolBarCtrl
  • SetIsoConvert() : CvsPrefs
  • SetItem() : CCJComboBoxEx
  • SetItemBold() : CCJTreeCtrl
  • SetItemColor() : CCJTreeCtrl
  • SetItemData() : CGfxOutBarCtrl
  • SetItemFont() : CCJTreeCtrl
  • SetItemImage() : CGfxOutBarCtrl
  • SetItems() : CCJOutlookBar, USmartCombo
  • SetItemText() : CGfxOutBarCtrl
  • SetKeyword() : USmartCombo
  • SetKserverPort() : CvsPrefs
  • SetLastWorkingDir() : CvsPrefs
  • SetLeft() : CCJHtmlView
  • SetLinkCursor() : CCJHyperLink
  • SetLocked() : EntnodeData
  • SetLogoFont() : CCJLogoPane
  • SetLogoText() : CCJLogoPane
  • SetLogoutTimeOut() : CvsPrefs
  • SetMacBinEncodeBinariesOnly() : CvsPrefs
  • SetMacBinEncoding() : CvsPrefs
  • SetMacLF() : CvsPrefs
  • SetMask() : KoFilterModel, KoFilterMask
  • SetMatchEntriesCase() : CvsPrefs
  • SetMaxSelCount() : CCJMonthCalCtrl
  • SetMaxTextRows() : CCJToolBarCtrl
  • SetMenuBar() : CCJHtmlView
  • SetMenuID() : CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • SetMessages() : CCVSAlert_MAIN
  • SetMetaFiles() : CCJMetaFileButton
  • SetMinimumColSize() : CCJListView, CCJListCtrl
  • SetMins() : CCJTimeEdit
  • SetMissing() : EntnodeData
  • SetMode() : CCvsStreamConsole
  • SetMonthCalColor() : CCJDateTimeCtrl
  • SetMonthCalFont() : CCJDateTimeCtrl
  • SetMonthDelta() : CCJMonthCalCtrl
  • SetMultilineEntry() : CAdminOption_MAIN
  • SetNewStyle() : CWinCvsBrowser
  • SetNode() : CGraphDoc
  • SetNormalColors() : CCJFontCombo
  • SetNormalSize() : CCJControlBar
  • SetOffline() : CCJHtmlView
  • SetOptions() : CCJHexEdit
  • SetOwner() : CCJToolBar, CCJReBarCtrl, CCJOutlookBar
  • SetPadding() : CCJToolBar
  • SetPageValue() : LPseudoWinAttachment
  • SetPalette() : CCJReBarCtrl
  • SetPaneWidth() : CCJStatusBar
  • SetPos() : CCJPagerCtrl
  • SetProblem() : ControlCvsArgs
  • SetProgress() : CProgressDlg, CProgress
  • SetProxyHost() : CvsPrefs
  • SetProxyPort() : CvsPrefs
  • SetPruneOption() : CvsPrefs
  • SetPserverPort() : CvsPrefs
  • SetPseudoID() : CDynToolBar
  • SetPseudoWidget() : TPseudoWinAdorner, TPseudoWinBehavior
  • SetPythonLibrary() : CvsPrefs
  • SetQuietOption() : CvsPrefs
  • SetRadio() : CPseudoToggle
  • SetRange() : CCJMonthCalCtrl, CCJDateTimeCtrl
  • SetReadOnly() : CSmartComboBox, USmartCombo
  • SetRect() : URect
  • SetRectEmpty() : URect
  • SetRecursive() : CBrowseFileView, UCvsFiles
  • SetRegisterAsBrowser() : CCJHtmlView
  • SetRegisterAsDropTarget() : CCJHtmlView
  • SetRemoved() : EntnodeData
  • SetResolved() : EntnodeData
  • SetResourceIDs() : CCJMDIChildWnd
  • SetRhostPort() : CvsPrefs
  • SetRowColors() : CCJListView, CCJListCtrl
  • SetRows() : CCJToolBar
  • SetRshName() : CvsPrefs
  • SetScrollArea() : CCJPagerCtrl
  • SetSearchType() : CCJBrowseEdit
  • SetSel() : CCJHexEdit
  • SetSelected() : CWinLogData
  • SetSelectExact() : CSmartComboBox
  • SetSelection() : TPseudoTextListView
  • SetSelectionChanged() : CWinCvsBrowser
  • SetSelectionMode() : CCJColorPicker
  • SetSelectionNotificationLocked() : CWinCvsBrowser
  • SetSelFolder() : CGfxOutBarCtrl
  • SetSelRange() : CCJMonthCalCtrl
  • SetServerName() : CvsPrefs
  • SetSettingsFolder() : CvsPrefs
  • SetShowCvs() : CvsPrefs
  • SetSilent() : CCJHtmlView
  • SetSizes() : CCJToolBar
  • SetSmallIconView() : CGfxOutBarCtrl
  • SetSortImage() : CSortHeaderCtrl, CCJFlatHeaderCtrl
  • SetState() : CCJToolBar, EntnodeData, CPseudoToggle
  • SetStatusBar() : CCJHtmlView
  • SetStatusBarText() : UCvsApp
  • SetStatusOutputType() : CvsPrefs
  • SetStyle() : CCJToolBarCtrl
  • SetTabImageList() : CCJTabView, CCJTabCtrlBar
  • SetTabMenuID() : CCJTabCtrlBar
  • SetTclFileRunning() : CvsPrefs
  • SetTclLibrary() : CvsPrefs
  • SetText() : CCJToolCmdUI, PyCmdUI, UCmdUI
  • SetTextColor() : CCJReBarCtrl, CCJColorPicker
  • SetTextStyle() : CCJCaption
  • SetTheaterMode() : CCJHtmlView
  • SetTime() : CCJDateTimeCtrl
  • SettingsFolder() : CvsPrefs
  • SetTipText() : CCJFlatTabCtrl
  • SetTitle() : CWincvsDoc, CCVSAlert_MAIN
  • SetToday() : CCJMonthCalCtrl
  • SetToolBar() : CCJHtmlView
  • SetToolbarStyle() : CCJToolBar
  • SetTooltip() : UCmdUI
  • SetToolTips() : CCJToolBar, CCJReBarCtrl
  • SetTop() : CCJHtmlView
  • SetTrackingState() : CCJMenuBar
  • SetTrackSelection() : CCJColorPicker
  • SetTypeCreatorConflict() : ReportConflict
  • SetUnderline() : CCJHyperLink
  • SetUnixLF() : CvsPrefs
  • SetUnknown() : EntnodeData
  • SetUnmodified() : EntnodeData
  • SetUpdateCaseSensitiveNames() : CvsPrefs
  • SetUpdateLastCheckinTime() : CvsPrefs
  • SetUpdateThreeWayConflicts() : CvsPrefs
  • SetURL() : CCJHyperLink
  • SetUseAltCvs() : CvsPrefs
  • SetUseProxy() : CvsPrefs
  • SetUseShell() : CvsPrefs
  • SetValue() : PyPersistent, KeywordDisplayInfo, TPseudoDoubleNumberText
  • SetViewer() : CvsPrefs
  • SetViewToolTip() : CCJTabCtrlBar
  • SetViewType() : CBrowseFileView
  • SetVisible() : CCJHtmlView
  • SetVisited() : CCJHyperLink, EntnodeData
  • SetWhichCvs() : CvsPrefs
  • SetWideString() : CCJMenuData
  • SetWidID() : UPseudoPageHider, UPseudoPlaceHolder
  • SetWindowSize() : CCJColorPopup, CCJColorPicker
  • SetWinInfo() : CDynToolBar
  • SetWordWrapLogMsg() : CvsPrefs
  • SetZ9Option() : CvsPrefs
  • SetZLevel() : CvsPrefs
  • ShowAlert() : CvsAlert
  • ShowBand() : CCJReBarCtrl
  • ShowColumn() : CCJFlatSplitterWnd
  • ShowColumns() : UCvsFiles
  • ShowCvs() : CvsPrefs
  • ShowFrameControls() : CCJControlBar
  • ShowHelp() : CHHelpSupport
  • ShowProtocolDescription() : CCvsRootDlg
  • ShowRow() : CCJFlatSplitterWnd
  • ShowSplashScreen() : CSplashWnd
  • ShowTipAtStartup() : CWincvsApp
  • ShowTipOfTheDay() : CWincvsApp
  • SignalStartWatch() : KoWatcher
  • SignalTerminate() : KoWatcher
  • SingleClick() : CPseudoItem
  • size() : CBuffer, CStaticAllocT< T >
  • Size() : URect
  • SizeMinReq() : CCJMonthCalCtrl
  • SizeOf() : CMMenuString, CWinPlacement, CPersistentT< T >, CPersistent, TMString< T >, TMPersistent< T >, PCStr, PCPStr
  • SizeTabView() : CCJTabCtrlBar
  • SizeToolBar() : CCJToolBar
  • SizeToRect() : CCJReBarCtrl
  • Sort() : CCJSortClass
  • SortItems() : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • SortList() : CCJListView, CCJListCtrl
  • SpendTime() : LMainPseudoAttachment
  • Split() : TKeyString< delimiter >
  • SplitCvsRoot() : CCvsRootParser
  • StartDragDockBar() : CCJDockContext
  • StartGroupEdit() : CGfxOutBarCtrl
  • StartItemEdit() : CGfxOutBarCtrl
  • StartResize() : CCJDockContext
  • StartScriptEngine() : CWincvsApp, UCvsApp
  • StartWatch() : KoWatcher
  • StatusOutputType() : CvsPrefs
  • StepToLocation() : CWinCvsBrowser, UCvsFolders
  • Stop() : CCJHtmlView
  • StopScriptEngine() : CWincvsApp, UCvsApp
  • StopWatch() : KoWatcher
  • StoreExpanded() : CWinCvsBrowser, UCvsFolders
  • StoreLocationSettings() : CMainFrame
  • StoreValues() : CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS
  • Stretch() : CCJDockContext
  • SubclassHeader() : CCJListView, CCJListCtrl
  • substr() : UStr
  • SwitchView() : CCJFlatSplitterWnd
  • SwitchWrapEdit() : CMultilineEntryDlg
  • SynchronizeMenu() : CCJMenu

- t -

  • TbEntry() : TbEntry
  • TbEntryButton() : TbEntryButton
  • TbEntryChkButton() : TbEntryChkButton
  • TbEntryDropDown() : TbEntryDropDown
  • TbEntrySeparator() : TbEntrySeparator
  • TBrowserFill() : TBrowserFill
  • TBrowserFillDummy() : TBrowserFillDummy
  • TBuggyPopup() : TBuggyPopup
  • TclLibrary() : CvsPrefs
  • TEditHandler() : TEditHandler< editType >
  • TextOutClipped() : UDC
  • TGraphCmdStatus() : TGraphCmdStatus
  • TGraphCurSelector() : TGraphCurSelector
  • TGraphDelCmd() : TGraphDelCmd
  • TGraphRectSelect() : TGraphRectSelect
  • TGraphSelNonSig() : TGraphSelNonSig
  • TKeyString() : TKeyString< delimiter >
  • TLaunchHandler() : TLaunchHandler< lauchType >
  • TMPersistent() : TMPersistent< T >
  • TMString() : TMString< T >
  • ToggleAdded() : KoFilterModel
  • ToggleBtn() : CPseudoToggle
  • ToggleChanged() : KoFilterModel
  • ToggleConflict() : KoFilterModel
  • ToggleDocking() : CCJDockContext
  • ToggleFilter() : KoFilterModel
  • ToggleFilterMasksEnable() : CMainFrame, KoFilterModel
  • ToggleHideMissing() : KoFilterModel
  • ToggleHideUnknown() : KoFilterModel
  • ToggleIgnore() : KoIgnoreModel
  • ToggleMissing() : KoFilterModel
  • ToggleModified() : KoFilterModel
  • ToggleRecursion() : KoRecursionModel
  • ToggleRemoved() : KoFilterModel
  • ToggleTrackButtonMode() : CCJMenuBar
  • ToggleUnknown() : KoFilterModel
  • TopLeft() : URect
  • TotalNumFiles() : MultiFiles
  • TouchTimeStamp() : CPersistent
  • TPseudoAppBehavior() : TPseudoAppBehavior
  • TPseudoCustomView() : TPseudoCustomView
  • TPseudoDoubleNumberText() : TPseudoDoubleNumberText
  • TPseudoIconButton() : TPseudoIconButton
  • TPseudoIconCheckBox() : TPseudoIconCheckBox
  • TPseudoIconPopup() : TPseudoIconPopup
  • TPseudoRotateIconButton() : TPseudoRotateIconButton
  • TPseudoScrollBar() : TPseudoScrollBar
  • TPseudoTextListView() : TPseudoTextListView
  • TPseudoWinAdorner() : TPseudoWinAdorner
  • TPseudoWinBehavior() : TPseudoWinBehavior
  • TrackDockBar() : CCJDockContext
  • TrackPopup() : CCJMenuBar
  • TrackScrollBar() : TPseudoScrollBar
  • TranslateFrameMessage() : CCJMenuBar
  • TraverseGraph() : TGraph
  • TraverseNode() : TGraphSelNonSig, TGraphDelCmd, TGraphCmdStatus, TGraphRectSelect, TGraph, TGraphCurSelector
  • trim() : UStr
  • TRtagHandler() : TRtagHandler< tagType >
  • True() : PyContainer
  • TTagHandler() : TTagHandler< tagType >
  • TViewFill() : TViewFill
  • TypeDesc() : AddUnicodeCvsArgs, AddBinCvsArgs, AddCvsArgs, ControlCvsArgs

- u -

  • UBrush() : UBrush
  • UCmdTarget() : UCmdTarget
  • UCmdUI() : UCmdUI
  • UCOLOR() : UCOLOR
  • UCvsApp() : UCvsApp
  • UCvsConsole() : UCvsConsole
  • UCvsFiles() : UCvsFiles
  • UCvsFolders() : UCvsFolders
  • UCvsFrame() : UCvsFrame
  • UCvsGraph() : UCvsGraph
  • UCvsMenubar() : UCvsMenubar
  • UCvsStatusbar() : UCvsStatusbar
  • UCvsToolbar() : UCvsToolbar
  • UDC() : UDC
  • UDispatchMessage() : UWidget, UToolbar, UCmdTarget
  • UEditMessage() : UEditMessage
  • UMacAppMenu() : UMacAppMenu
  • UMenu() : UMenu
  • UnionRect() : URect
  • Unixfy() : CTcl_Interp
  • UnixLF() : CvsPrefs
  • UnRef() : PyAutoObject< T >, EntnodeData, EntnodePath, aref
  • UnRegister() : CPersistent
  • UnselectAll() : CWinLogData
  • UnSetBitmapBackground() : CCJMenu
  • UnSetDisableOldStyle() : CCJMenu
  • UObject() : UObject
  • Update() : CWinLogData
  • UpdateAllDocsView() : CWincvsApp
  • UpdateCaption() : CCJCaption
  • UpdateCaptionBack() : CCJCaption
  • UpdateCaptionText() : CCJCaption
  • UpdateCaseSensitiveNames() : CvsPrefs
  • UpdateCvsRoot() : CCvsRootDlg
  • UpdateData() : CMultilineEntryDlg
  • UpdateFont() : CCJTabCtrl, CCJOutlookBar, CCJMenuBar, CCJMaskEdit, CCJFlatButton, CCJColorPopup, CCJCaption, CCJBrowseButton
  • UpdateInfo() : CMultilineEntryDlg
  • UpdateKeywords() : CCvsRootDlg
  • UpdateLastCheckinTime() : CvsPrefs
  • UpdateMenu() : CCJMenu
  • UpdateMergePoints() : CWinLogData
  • UpdatePathInfo() : CCvsStatusBar
  • UpdatePreviewInfo() : CCommit_MAIN
  • UpdateReactionSpeedInfo() : CFilterMaskOptDlg
  • UpdateScrollbars() : CCJHexEdit
  • UpdateSelect() : CSelectionDetailsDlg
  • UpdateSelf() : CWinLogBranchData, CWinLogTagData, CWinLogRevData, CWinLogHeaderData, CWinLogData, CWinLogBranchData, CWinLogTagData, CWinLogRevData, CWinLogHeaderData, CWinLogData
  • UpdateThreeWayConflicts() : CvsPrefs
  • UPen() : UPen
  • UPoint() : UPoint
  • UPPMenu() : UPPMenu
  • UPromptMessage() : UPromptMessage
  • UPseudoFakePane() : UPseudoFakePane
  • UPseudoPageHider() : UPseudoPageHider
  • UPseudoPlaceHolder() : UPseudoPlaceHolder
  • UPseudoRotButton() : UPseudoRotButton
  • UPStr() : UPStr
  • URect() : URect
  • URuntimeClass() : URuntimeClass
  • UseAltCvs() : CvsPrefs
  • UseKeyChain() : CvsPrefs
  • USemaphore() : USemaphore
  • UseProxy() : CvsPrefs
  • USize() : USize
  • USmartCombo() : USmartCombo
  • UStr() : UStr
  • UTimer() : UTimer
  • UToolbar() : UToolbar
  • UWaitCursor() : UWaitCursor
  • UWidget() : UWidget

- v -

  • verb() : ansiAttrCvt::AnsiSeq
  • ViewChangedFrame() : TPseudoWinAdorner
  • Viewer() : CvsPrefs
  • Void() : PyContainer

- w -

  • WhichCvs() : CvsPrefs
  • WhichVersion() : CvsPrefs
  • WidgetIsActive() : UWidget
  • Width() : URect
  • Win32wstring() : Win32wstring
  • WindowProc() : CHistComboBoxEx, CSubclassWnd, CCJToolBarBase, CCJReBar, CCJMenuBarFrameHook, CPseudoDlg
  • WinHelp() : CMainFrame
  • WININFO() : WININFO
  • WordWrapLogMsg() : CvsPrefs
  • WrapToolBar() : CCJToolBar
  • WriteFields() : TPseudoDoubleNumberText, TPseudoIconCheckBox, TPseudoRotateIconButton, TPseudoIconButton, TPseudoIconPopup, TBuggyPopup
  • WriteString() : CCJMemFile

- z -

  • Z9Option() : CvsPrefs
  • ZLevel() : CvsPrefs

- ~ -

  • ~AnsiSeq() : ansiAttrCvt::AnsiSeq
  • ~aref() : aref
  • ~awidget() : awidget
  • ~CAllTargets() : CAllTargets
  • ~CAnnotate_MAIN() : CAnnotate_MAIN
  • ~CBarConsole() : CBarConsole
  • ~CBarFolder() : CGfxOutBarCtrl::CBarFolder
  • ~CBarItem() : CGfxOutBarCtrl::CBarItem
  • ~CBrowseFileView() : CBrowseFileView
  • ~CBrowserBar() : CBrowserBar
  • ~CCheckout_MAIN() : CCheckout_MAIN
  • ~CCJBrowseButton() : CCJBrowseButton
  • ~CCJBrowseEdit() : CCJBrowseEdit
  • ~CCJCaption() : CCJCaption
  • ~CCJCaptionPopupWnd() : CCJCaptionPopupWnd
  • ~CCJColorPicker() : CCJColorPicker
  • ~CCJColorPopup() : CCJColorPopup
  • ~CCJComboBoxEx() : CCJComboBoxEx
  • ~CCJControlBar() : CCJControlBar
  • ~CCJDateTimeCtrl() : CCJDateTimeCtrl
  • ~CCJDockBar() : CCJDockBar
  • ~CCJDockContext() : CCJDockContext
  • ~CCJExplorerBar() : CCJExplorerBar
  • ~CCJFlatButton() : CCJFlatButton
  • ~CCJFlatComboBox() : CCJFlatComboBox
  • ~CCJFlatHeaderCtrl() : CCJFlatHeaderCtrl
  • ~CCJFlatSplitterWnd() : CCJFlatSplitterWnd
  • ~CCJFlatTabCtrl() : CCJFlatTabCtrl
  • ~CCJFontCombo() : CCJFontCombo
  • ~CCJFrameWnd() : CCJFrameWnd
  • ~CCJHexEdit() : CCJHexEdit
  • ~CCJHtmlView() : CCJHtmlView
  • ~CCJHyperLink() : CCJHyperLink
  • ~CCJListBox() : CCJListBox
  • ~CCJListCtrl() : CCJListCtrl
  • ~CCJListView() : CCJListView
  • ~CCJLogoPane() : CCJLogoPane
  • ~CCJMaskEdit() : CCJMaskEdit
  • ~CCJMDIChildWnd() : CCJMDIChildWnd
  • ~CCJMDIFrameWnd() : CCJMDIFrameWnd
  • ~CCJMemFile() : CCJMemFile
  • ~CCJMenu() : CCJMenu
  • ~CCJMenuBar() : CCJMenuBar
  • ~CCJMenuBarFrameHook() : CCJMenuBarFrameHook
  • ~CCJMenuData() : CCJMenuData
  • ~CCJMetaFileButton() : CCJMetaFileButton
  • ~CCJMiniDockFrameWnd() : CCJMiniDockFrameWnd
  • ~CCJMonthCalCtrl() : CCJMonthCalCtrl
  • ~CCJOutlookBar() : CCJOutlookBar
  • ~CCJPagerCtrl() : CCJPagerCtrl
  • ~CCJSizeDockBar() : CCJSizeDockBar
  • ~CCJSortClass() : CCJSortClass
  • ~CCJStatusBar() : CCJStatusBar
  • ~CCJStatusBarPane() : CCJStatusBarPane
  • ~CCJStatusBarPaneControlInfo() : CCJStatusBarPaneControlInfo
  • ~CCJTabCtrl() : CCJTabCtrl
  • ~CCJTabCtrlBar() : CCJTabCtrlBar
  • ~CCJTabView() : CCJTabView
  • ~CCJToolBar() : CCJToolBar
  • ~CCJToolBarBase() : CCJToolBarBase
  • ~CCJToolBarCtrl() : CCJToolBarCtrl
  • ~CCJTreeCtrl() : CCJTreeCtrl
  • ~CCJWindowPlacement() : CCJWindowPlacement
  • ~CCmdLine_MAIN() : CCmdLine_MAIN
  • ~CColorConsole() : CColorConsole
  • ~CColorMenu() : CColorMenu
  • ~CColorStatic() : CColorStatic
  • ~CCommit_MAIN() : CCommit_MAIN
  • ~CCommit_OPTIONS() : CCommit_OPTIONS
  • ~CCustInvertTable() : CCustInvertTable
  • ~CCvsRootConsole() : CCvsRootConsole
  • ~CCvsSandboxInfo() : CCvsSandboxInfo
  • ~CCvsStatusBar() : CCvsStatusBar
  • ~CCvsStreamConsole() : CCvsStreamConsole
  • ~CDiff_MAIN() : CDiff_MAIN
  • ~CDynToolBar() : CDynToolBar
  • ~CExploreBar() : CExploreBar
  • ~CFileAction_MAIN() : CFileAction_MAIN
  • ~CFillPyEntries() : CFillPyEntries
  • ~CFillTclEntries() : CFillTclEntries
  • ~CFindSettings() : CFindSettings
  • ~CGetPrefs_CVS() : CGetPrefs_CVS
  • ~CGetPrefs_CVSCMD_DIALOGS() : CGetPrefs_CVSCMD_DIALOGS
  • ~CGetPrefs_GLOBALS() : CGetPrefs_GLOBALS
  • ~CGetPrefs_WINCVS() : CGetPrefs_WINCVS
  • ~CGfxGroupEdit() : CGfxGroupEdit
  • ~CGfxOutBarCtrl() : CGfxOutBarCtrl
  • ~CGfxSplitterWnd() : CGfxSplitterWnd
  • ~CGraphDoc() : CGraphDoc
  • ~CGraphFrame() : CGraphFrame
  • ~CGraphView() : CGraphView
  • ~CHHelpPropertyPage() : CHHelpPropertyPage
  • ~CHHelpPropertySheet() : CHHelpPropertySheet
  • ~CHHelpSupport() : CHHelpSupport
  • ~CHistComboBoxEx() : CHistComboBoxEx
  • ~CImport_MAIN() : CImport_MAIN
  • ~CImport_OPTIONS() : CImport_OPTIONS
  • ~CInfoParserConsole() : CInfoParserConsole
  • ~CItemListConsole() : CItemListConsole
  • ~CKeyString() : CKeyString
  • ~CKeywordComboBox() : CKeywordComboBox
  • ~CListParserConsole() : CListParserConsole
  • ~CLogFilters() : CLogFilters
  • ~CLogFrame() : CLogFrame
  • ~CLogin_MAIN() : CLogin_MAIN
  • ~CLogMain() : CLogMain
  • ~CLogoutThread() : CLogoutThread
  • ~CMacBinItem() : CMacBinItem
  • ~CMacBinTable() : CMacBinTable
  • ~CMainFrame() : CMainFrame
  • ~CMKeyString() : CMKeyString
  • ~CMMenuString() : CMMenuString
  • ~CModuleParserConsole() : CModuleParserConsole
  • ~CMPString() : CMPString
  • ~CMString() : CMString
  • ~CMultilineEntryDlg() : CMultilineEntryDlg
  • ~COptionalPropertySheet() : COptionalPropertySheet
  • ~CPathBuffer() : CPathBuffer
  • ~CPersistent() : CPersistent
  • ~CPersistentBool() : CPersistentBool
  • ~CPersistentInt() : CPersistentInt
  • ~CPersistentT() : CPersistentT< T >
  • ~CProgress() : CProgress
  • ~CProtocolParserConsole() : CProtocolParserConsole
  • ~CPseudoButton() : CPseudoButton
  • ~CPseudoDlg() : CPseudoDlg
  • ~CPseudoDraw() : CPseudoDraw
  • ~CPseudoItem() : CPseudoItem
  • ~CPseudoList() : CPseudoList
  • ~CPseudoRotButton() : CPseudoRotButton
  • ~CPseudoToggle() : CPseudoToggle
  • ~CPyCvsConsole() : CPyCvsConsole
  • ~CPython_Interp() : CPython_Interp
  • ~CPyThreadState() : CPyThreadState
  • ~CRecursionLock() : CRecursionLock
  • ~CRelease_MAIN() : CRelease_MAIN
  • ~CRtag_MAIN() : CRtag_MAIN
  • ~CRtag_OPTIONS() : CRtag_OPTIONS
  • ~CSelectionChangeNotifier() : CSelectionChangeNotifier
  • ~CSmartComboBox() : CSmartComboBox
  • ~CSortHeaderCtrl() : CSortHeaderCtrl
  • ~CSortList() : CSortList< T >
  • ~CSplashWnd() : CSplashWnd
  • ~CStaticAllocT() : CStaticAllocT< T >
  • ~CStatus_MAIN() : CStatus_MAIN
  • ~CSubclassWnd() : CSubclassWnd
  • ~CSubclassWndMap() : CSubclassWndMap
  • ~CTag_MAIN() : CTag_MAIN
  • ~CTagParserConsole() : CTagParserConsole
  • ~CTcl_Interp() : CTcl_Interp
  • ~CTCLBrowserEnt() : CTCLBrowserEnt
  • ~CTCLCvsConsole() : CTCLCvsConsole
  • ~CTempToggleBool() : CTempToggleBool
  • ~CTipDlg() : CTipDlg
  • ~CTmpFiles() : CTmpFiles
  • ~CTurnOffDispatching() : CTurnOffDispatching
  • ~CUpdateMain() : CUpdateMain
  • ~CUpdateMerge() : CUpdateMerge
  • ~CUpdateOptions() : CUpdateOptions
  • ~CvsAlert() : CvsAlert
  • ~CvsArgs() : CvsArgs
  • ~CvsPrefs() : CvsPrefs
  • ~CWinCvsBrowser() : CWinCvsBrowser
  • ~CWincvsDoc() : CWincvsDoc
  • ~CWincvsView() : CWincvsView
  • ~CWinLogBranchData() : CWinLogBranchData
  • ~CWinLogData() : CWinLogData
  • ~CWinLogHeaderData() : CWinLogHeaderData
  • ~CWinLogRevData() : CWinLogRevData
  • ~CWinLogTagData() : CWinLogTagData
  • ~CWinPlacement() : CWinPlacement
  • ~CWndAutoCommand() : CWndAutoCommand
  • ~CWndRedrawMngr() : CWndRedrawMngr
  • ~ENTNODE() : ENTNODE
  • ~EntnodeData() : EntnodeData
  • ~EntnodeFile() : EntnodeFile
  • ~EntnodeFolder() : EntnodeFolder
  • ~EntnodePath() : EntnodePath
  • ~ImportReport() : ImportReport
  • ~KiSelectionHandler() : KiSelectionHandler
  • ~KoFilterModel() : KoFilterModel
  • ~KoIgnoreModel() : KoIgnoreModel
  • ~KoRecursionModel() : KoRecursionModel
  • ~KoWatcher() : KoWatcher
  • ~LMainPseudoAttachment() : LMainPseudoAttachment
  • ~LPseudoDrawAttachment() : LPseudoDrawAttachment
  • ~LPseudoWinAttachment() : LPseudoWinAttachment
  • ~MacBinMaps() : MacBinMaps
  • ~PCPStr() : PCPStr
  • ~PCStr() : PCStr
  • ~PyAutoObject() : PyAutoObject< T >
  • ~PyCmdUI() : PyCmdUI
  • ~PyColorConsole() : PyColorConsole
  • ~PyContainer() : PyContainer
  • ~PyCvsEntry() : PyCvsEntry
  • ~PyMenuMgr() : PyMenuMgr
  • ~PyPersistent() : PyPersistent
  • ~PyRegistry() : PyRegistry
  • ~ReportConflict() : ReportConflict
  • ~ReportWarning() : ReportWarning
  • ~TbEntry() : TbEntry
  • ~TbEntryButton() : TbEntryButton
  • ~TbEntryChkButton() : TbEntryChkButton
  • ~TbEntryDropDown() : TbEntryDropDown
  • ~TbEntrySeparator() : TbEntrySeparator
  • ~TBrowserFill() : TBrowserFill
  • ~TBrowserFillDummy() : TBrowserFillDummy
  • ~TBuggyPopup() : TBuggyPopup
  • ~TKeyString() : TKeyString< delimiter >
  • ~TMPersistent() : TMPersistent< T >
  • ~TMString() : TMString< T >
  • ~TPseudoAppBehavior() : TPseudoAppBehavior
  • ~TPseudoCustomView() : TPseudoCustomView
  • ~TPseudoDoubleNumberText() : TPseudoDoubleNumberText
  • ~TPseudoIconButton() : TPseudoIconButton
  • ~TPseudoIconCheckBox() : TPseudoIconCheckBox
  • ~TPseudoIconPopup() : TPseudoIconPopup
  • ~TPseudoRotateIconButton() : TPseudoRotateIconButton
  • ~TPseudoScrollBar() : TPseudoScrollBar
  • ~TPseudoTextListView() : TPseudoTextListView
  • ~TPseudoWinAdorner() : TPseudoWinAdorner
  • ~TPseudoWinBehavior() : TPseudoWinBehavior
  • ~TViewFill() : TViewFill
  • ~UBrush() : UBrush
  • ~UCmdTarget() : UCmdTarget
  • ~UCmdUI() : UCmdUI
  • ~UCvsApp() : UCvsApp
  • ~UCvsConsole() : UCvsConsole
  • ~UCvsFiles() : UCvsFiles
  • ~UCvsFolders() : UCvsFolders
  • ~UCvsFrame() : UCvsFrame
  • ~UCvsGraph() : UCvsGraph
  • ~UCvsMenubar() : UCvsMenubar
  • ~UCvsStatusbar() : UCvsStatusbar
  • ~UCvsToolbar() : UCvsToolbar
  • ~UDC() : UDC
  • ~UEditMessage() : UEditMessage
  • ~UMacAppMenu() : UMacAppMenu
  • ~UMenu() : UMenu
  • ~UObject() : UObject
  • ~UPen() : UPen
  • ~UPPMenu() : UPPMenu
  • ~UPromptMessage() : UPromptMessage
  • ~UPseudoFakePane() : UPseudoFakePane
  • ~UPseudoPageHider() : UPseudoPageHider
  • ~UPseudoPlaceHolder() : UPseudoPlaceHolder
  • ~UPseudoRotButton() : UPseudoRotButton
  • ~UPStr() : UPStr
  • ~URuntimeClass() : URuntimeClass
  • ~USemaphore() : USemaphore
  • ~USmartCombo() : USmartCombo
  • ~UStr() : UStr
  • ~UToolbar() : UToolbar
  • ~UWaitCursor() : UWaitCursor
  • ~UWidget() : UWidget
  • ~WININFO() : WININFO
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class Members - Properties

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Properties | Related Functions

  • ViewPath : Wincvs::IWincvs
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class Members - Related Functions

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Properties | Related Functions

  • HookWndProc : CSubclassWnd
  • UWinPseudoWindowProc : UWidget
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class Members - Typedefs

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Properties | Related Functions

  • const_iterator : MultiFiles
  • list_t : TMString< T >, TMPersistent< T >
  • QsortMethod : CSortList< T >
  • tHelpIDMap : CHHelpSupport
  • tHelpIDsData : CHHelpSupport
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Class Members - Variables

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Properties | Related Functions
_ | a | b | c | d | e | f | g | h | i | k | l | m | n | o | p | r | s | t | u | v | w | x | y

- _ -

  • _d_entry : _dircontents
  • _d_next : _dircontents
  • _in : ansiAttrCvt
  • _messageEntries : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • _notOf : ansiAttrCvt::AnsiSeq
  • _params : ansiAttrCvt::AnsiSeq
  • _seq : ansiAttrCvt, ansiAttrCvt::AnsiSeq
  • _verb : ansiAttrCvt::AnsiSeq

- a -

  • arFolder : CGfxOutBarCtrl
  • argc : CvsArgs
  • argv : CvsArgs
  • arItems : CGfxOutBarCtrl::CBarFolder

- b -

  • b : UCOLOR, UColor
  • B : CTCP2Parse::RGBColor
  • bDownArrow : CGfxOutBarCtrl
  • bDownPressed : CGfxOutBarCtrl
  • bEscapeKey : CGfxGroupEdit
  • bg : CTCP2Parse
  • bgColorMap : ansiAttrCvt
  • bgDef : CTCP2Parse
  • bgLast : CTCP2Parse
  • bitmap : CCJMenuData, awidget, AREF
  • blink : ansiAttrCvt
  • blinkCnt : CTCP2Parse
  • blinkLast : CTCP2Parse
  • bLooping : CGfxOutBarCtrl
  • bNoDown : CGfxGroupEdit
  • bold : UCvsConsole, ansiAttrCvt
  • boldCnt : CTCP2Parse
  • boldLast : CTCP2Parse
  • bottom : URECT
  • bPressedHighlight : CGfxOutBarCtrl
  • btns : UTB_DROPDOWN
  • btnText : TOOLBARINFO
  • bTRACE : CCJMenuBar
  • bUpArrow : CGfxOutBarCtrl
  • bUpPressed : CGfxOutBarCtrl
  • bWhiteLine : CGfxSplitterWnd

- c -

  • c_bShowSplashWnd : CSplashWnd
  • c_pSplashWnd : CSplashWnd
  • cbSize : AFX_DLLVERSIONINFO
  • checkmaps : CCJMenu
  • checkmapsshare : CCJMenu
  • child : UTREE_INFO
  • cItem : CGfxOutBarCtrl::CBarItem
  • classCMPString : CMPString
  • classCMString : CMString
  • classCPersistent : CPersistent
  • classCPersistentBool : CPersistentBool
  • classCPersistentInt : CPersistentInt
  • classPCPStr : PCPStr
  • classPCStr : PCStr
  • classUCmdTarget : UCmdTarget
  • classUCvsApp : UCvsApp
  • classUCvsConsole : UCvsConsole
  • classUCvsFiles : UCvsFiles
  • classUCvsFolders : UCvsFolders
  • classUCvsFrame : UCvsFrame
  • classUCvsGraph : UCvsGraph
  • classUCvsMenubar : UCvsMenubar
  • classUCvsStatusbar : UCvsStatusbar
  • classUCvsToolbar : UCvsToolbar
  • classUEditMessage : UEditMessage
  • classUMacAppMenu : UMacAppMenu
  • classUMenu : UMenu
  • classUObject : UObject
  • classUPromptMessage : UPromptMessage
  • classUToolbar : UToolbar
  • classUWidget : UWidget
  • cmd : CustInvertTable, awidget, UTB_BUTTON
  • cName : CGfxOutBarCtrl::CBarFolder
  • cnt : AREF
  • col : UCvsConsole, ULIST_INFO, ULIST_INSERT
  • color : CCJTreeCtrl::Color_Font
  • conflicts : ImportReport
  • cookie : MACBINMAPENTRIES
  • cp : CTCP2Parse
  • cpDef : CTCP2Parse
  • cpLast : CTCP2Parse
  • cr3dFace : CGfxOutBarCtrl
  • crBackGroundColor : CGfxOutBarCtrl
  • crBackGroundColor1 : CGfxOutBarCtrl
  • crColor : ColorTableEntry
  • crDkShadowBorder : CGfxOutBarCtrl
  • crHilightBorder : CGfxOutBarCtrl
  • crLightBorder : CGfxOutBarCtrl
  • crShadowBorder : CGfxOutBarCtrl
  • crTextColor : CGfxOutBarCtrl
  • cText : OUTBAR_INFO
  • current : DYN_LIST, TbEntryDropDown
  • currRev : FileEntry
  • cx : USIZE
  • cy : USIZE

- d -

  • d_ino : direct
  • d_name : direct
  • d_namlen : direct
  • d_reclen : direct
  • data : ULIST_INFO, UTREE_INFO, UTREE_INSERT
  • dd_contents : _dirdesc
  • dd_cp : _dirdesc
  • dd_id : _dirdesc
  • dd_loc : _dirdesc
  • defaultnumcells : DYN_LIST
  • desc : MACBINMAP, keywordMode
  • description : _sDiffOptionsItem
  • dir : MultiFilesEntry
  • dirPath : match_dir
  • dirs : MultiFiles
  • disable_old_style : CCJMenu
  • drop : UTB_BUTTON
  • dwBuildNumber : AFX_DLLVERSIONINFO
  • dwData : CGfxOutBarCtrl::CBarFolder, CGfxOutBarCtrl::CBarItem
  • dwDockBarMap : CCJMDIFrameWnd, CCJMDIChildWnd, CCJFrameWnd
  • dwFlags : CGfxOutBarCtrl
  • dwMajorVersion : AFX_DLLVERSIONINFO
  • dwMinorVersion : AFX_DLLVERSIONINFO
  • dwPlatformID : AFX_DLLVERSIONINFO

- e -

  • enc : CTCP2Parse
  • encDef : CTCP2Parse
  • encLast : CTCP2Parse
  • encod : MACBINMAP
  • entries : CMacroSet, MacBinMaps, WININFO
  • entry : _frameRec
  • escSeq : ansiAttrCvt
  • expanded : UTREE_INFO
  • ext : MACBINMAP, UMSGMAP_ENTRY
  • ext1 : UMSGMAP_ENTRY
  • ext2 : UMSGMAP_ENTRY

- f -

  • fAlloc : CTCLCvsConsole
  • fAllStrs : CMMenuString
  • fBuf : CMMenuString
  • fButtonStep : TPseudoScrollBar
  • fController : UPseudoPlaceHolder
  • fcreator : ReportConflict
  • fCurrentIcon : UPseudoRotButton, TPseudoRotateIconButton
  • fCurrentView : UPseudoPlaceHolder
  • fCurSel : UPseudoPageHider
  • fCvsRunningCounter : CvsPrefs
  • fDef : CSortList< T >
  • fElems : CSortList< T >
  • fExitOnError : CTcl_Interp
  • fg : CTCP2Parse
  • fgColorMap : ansiAttrCvt
  • fgDef : CTCP2Parse
  • fgLast : CTCP2Parse
  • fHasLoggedIn : CvsPrefs
  • fIconSuite : UPseudoRotButton, TPseudoRotateIconButton
  • file : FileEntry
  • files : MultiFilesEntry
  • fInterp : CTcl_Interp, LSReport, CTCLCvsConsole, CPython_Interp
  • first : DYN_LIST
  • firstentry : poolRec
  • firstfree : poolRec
  • flag : option
  • fLastErrorCode : CTcl_Interp
  • fLen : CTCLCvsConsole
  • fMap : CMacBinItem
  • fMax : CSortList< T >
  • fMaximum : TPseudoDoubleNumberText
  • fMaxStr : CMMenuString
  • fMethod : CSortList< T >
  • fMinimum : TPseudoDoubleNumberText
  • fNewOne : CSortList< T >
  • fntLast : CTCP2Parse
  • fntSize : CTCP2Parse
  • fNum : CSortList< T >
  • fPageCtrl : UPseudoPageHider
  • fPageStep : TPseudoScrollBar
  • fPrecision : TPseudoDoubleNumberText
  • fRealWidth : TBuggyPopup
  • fState : LSReport
  • fStringContainer : TPseudoTextListView
  • fTclFileRunningCounter : CvsPrefs
  • ftype : ReportConflict
  • fView : CColorConsole
  • fViewSuite : UPseudoPageHider, UPseudoPlaceHolder
  • fWidid : UPseudoPageHider, UPseudoPlaceHolder
  • fWidID : TPseudoWinAdorner, TPseudoWinBehavior

- g -

  • G : CTCP2Parse::RGBColor
  • g : UCOLOR, UColor
  • gApp : UCvsApp
  • gCurMacBinMap : CMacBinTable
  • gCvsProcess : UCvsApp
  • gCvsRunning : UCvsApp
  • gCvsStopping : UCvsApp

- h -

  • handler : NotificationManager::Node
  • has_arg : option
  • hDragCursor : CGfxOutBarCtrl
  • height : WININFO
  • heightbtn : UTB_INIT
  • hHandCursor : CGfxOutBarCtrl
  • hNoDragCursor : CGfxOutBarCtrl

- i -

  • icon : ULIST_INSERT, UTREE_INFO, UTREE_INSERT, UTB_BUTTON
  • icons : TbEntryDropDown
  • idButton : DROPDOWNBUTTON
  • idMenu : DROPDOWNBUTTON
  • iDragFrom : OUTBAR_INFO
  • iDragTo : OUTBAR_INFO
  • iFirstItem : CGfxOutBarCtrl
  • iFolderHeight : CGfxOutBarCtrl
  • iHitInternal1 : CGfxOutBarCtrl
  • iHitInternal2 : CGfxOutBarCtrl
  • iImageIndex : CGfxOutBarCtrl::CBarItem
  • iIndex : CGfxGroupEdit
  • iLastDragItemDraw : CGfxOutBarCtrl
  • iLastDragItemDrawType : CGfxOutBarCtrl
  • iLastFolderHighlighted : CGfxOutBarCtrl
  • iLastItemHighlighted : CGfxOutBarCtrl
  • iLastSel : CGfxOutBarCtrl
  • iLastSelectedFolder : CGfxOutBarCtrl
  • inc : USLIDER
  • index : OUTBAR_INFO
  • indexColor : CTCP2Parse
  • initialcmd : UTB_DROPDOWN
  • InUpdateUI : UCvsFrame
  • invalFlag : CMacroSet
  • ischeck : TbEntryButton
  • iSelAnimCount : CGfxOutBarCtrl
  • iSelAnimTiming : CGfxOutBarCtrl
  • iSelFolder : CGfxOutBarCtrl
  • iSysColorTo : CJX_COLORMAP
  • italic : UCvsConsole, ansiAttrCvt
  • italicCnt : CTCP2Parse
  • italicLast : CTCP2Parse
  • item : UTREE_INFO

- k -

  • key : CustInvertTable
  • kind : ReportWarning, TbEntry

- l -

  • lAnimationTickCount : CGfxOutBarCtrl
  • left : URECT
  • logfont : CCJTreeCtrl::Color_Font
  • lpEntries : UMSGMAP

- m -

  • m_abort : CProgressDlg, CProgress
  • m_actionCombo : CMultilineEntryDlg
  • m_addbtn : CCustomizeMenus
  • m_addDefault : CCmdLine_MAIN
  • m_addSelection : CCmdLine_MAIN
  • m_addSelectionCheck : CCmdLine_MAIN
  • m_alertMessage : CCVSAlert_MAIN
  • m_alertMessageEdit : CCVSAlert_MAIN
  • m_alertMessageFont : CCVSAlert_MAIN
  • m_alertTitle : CvsAlert
  • m_all : PyRegistry
  • m_allfiles : CTmpFiles
  • m_allItems : TMPersistent< T >
  • m_allowExtDiff : CDiff_MAIN
  • m_allRevs : TGraphDelCmd
  • m_allStrs : TMString< T >
  • m_AllSubMenus : CCJMenu
  • m_altCvs : CGetPrefs_CVS
  • m_altCvsCombo : CGetPrefs_CVS
  • m_alwaysroot : CGetPrefs_GLOBALS
  • m_annotateType : CAnnotate_MAIN
  • m_aPans : CCJStatusBar
  • m_apply : CGraphOptDlg
  • m_ar : _afxRichEditCookie
  • m_arg1 : CMsg
  • m_arg2 : CMsg
  • m_ArrowRect : CCJColorPicker
  • m_arStrings : CCJMenuBar
  • m_asc : CSelectionDetailsDlg::CompareInfo, CItemListDlg::CompareInfo, CDiff_Options::CompareInfo
  • m_ascendant : CBrowseFileView, UCvsFiles
  • m_Attach : UPseudoFakePane
  • m_autoClose : CCvsStreamConsole
  • m_autoDelete : KiSelectionHandler
  • m_autoRefreshCombo : CItemListDlg
  • m_bActive : CCJColorPicker
  • m_bAddressIsWide : CCJHexEdit
  • m_bAdjustToFit : CCJHyperLink
  • m_bAltColor : CCJFlatButton
  • m_bAscending : CCJListView, CCJListCtrl
  • m_bAutoComp : CCJFlatComboBox
  • m_bAutodelete : CCJStatusBarPaneControlInfo
  • m_bAutoRemoveFrameMenu : CCJMenuBar
  • m_bAutoSave : CCJListView, CCJListCtrl, CCJControlBar
  • m_bBoldFont : CCJFlatHeaderCtrl
  • m_bButtons : CCJControlBar
  • m_bDelayedButtonLayout : CCJToolBar
  • m_bDragging : CCJSizeDockBar, CCJControlBar
  • m_bEscapeWasPressed : CCJMenuBar
  • m_bExStyle : CCJToolBarBase
  • m_bFlatBorder : CCJSizeDockBar, CCJControlBar
  • m_bFlatGripper : CCJControlBar
  • m_bFlatLook : CCJFlatButton
  • m_bFlatSplitter : CCJFlatSplitterWnd
  • m_bFloating : CCJControlBar
  • m_bGripper : CCJControlBar
  • m_bHalfPage : CCJHexEdit
  • m_bHasArrows : CCJFlatTabCtrl
  • m_bHasFocus : CCJFlatComboBox
  • m_bHasHomeEnd : CCJFlatTabCtrl
  • m_bHeaderFilters : CSortHeaderCtrl
  • m_bHilight : CCJOutlookBar
  • m_bInReBar : CCJToolBarBase
  • m_bIsDockBar : CCJSizeDockBar
  • m_bitmap : CSplashWnd, CDynToolBar, CPseudoButton
  • m_bitmapBackground : CCJMenu
  • m_bitmapBackgroundFlag : CCJMenu
  • m_bitmaps : CPseudoRotButton
  • m_bLBDown : CCJOutlookBar
  • m_bLBtnDown : CCJFlatHeaderCtrl, CCJFlatComboBox, CCJFlatButton, CCJColorPicker
  • m_bMaskKeyInProgress : CCJMaskEdit
  • m_bMaximized : CCJControlBar
  • m_bMouseOver : CCJFlatButton
  • m_bMultiSelect : CCJTreeCtrl
  • m_bNoAddressChange : CCJHexEdit
  • m_bNoColSizing : CCJListView, CCJListCtrl
  • m_bOkToDrag : CCJSizeDockBar, CCJControlBar
  • m_BoldFont : CCJFlatTabCtrl
  • m_bOpen : CCJMemFile
  • m_bOpenFileDialog : CCJBrowseButton
  • m_bOptionChecked : COptionalPropertySheet
  • m_bOverControl : CCJHyperLink
  • m_bPainted : CCJFlatComboBox, CCJFlatButton
  • m_bpr : CCJHexEdit
  • m_bProcessLeftArrow : CCJMenuBar
  • m_bProcessRightArrow : CCJMenuBar
  • m_branchColor : CGraphOptDlg
  • m_branchPointMerge : CUpdateMerge
  • m_branchPointMergeCheck : CUpdateMerge
  • m_bRestart : TGraphCurSelector
  • m_bRestoreFocus : CMainFrame
  • m_browse1TagButton : CUpdateMerge
  • m_browse2TagButton : CUpdateMerge
  • m_browseHist : CMainFrame
  • m_browser : CBrowserBar
  • m_browseReadFromButton : CItemListDlg
  • m_browseTag1Button : CDiff_MAIN
  • m_browseTag2Button : CDiff_MAIN
  • m_browseTagButton : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CAnnotate_MAIN
  • m_brush : UDC
  • m_bShowAddress : CCJHexEdit
  • m_bShowAscii : CCJHexEdit
  • m_bShowDropArrow : CCJToolBar
  • m_bShowHex : CCJHexEdit
  • m_bSortAsc : CSortHeaderCtrl, CCJFlatHeaderCtrl
  • m_bStartup : CTipDlg
  • m_bTabsOnBottom : CCJFlatTabCtrl
  • m_btnBrowse : CCJBrowseEdit
  • m_btnClose : CCJControlBar
  • m_btnMinim : CCJControlBar
  • m_bToFit : CCJControlBar
  • m_bToolTipsEnabled : CCJTabCtrlBar
  • m_bTrackSelection : CCJColorPicker
  • m_buf : UCvsConsole, CBuffer, CStaticAllocT< T >
  • m_buffer : CPathBuffer, TMString< T >, TMPersistent< T >
  • m_bufferSize : CPathBuffer
  • m_bufsize : CStaticAllocT< T >
  • m_bUnderline : CCJHyperLink
  • m_bUnique : CCJControlBar
  • m_bUpdate : CCJHexEdit
  • m_bUseMask : CCJMaskEdit
  • m_bVisited : CCJHyperLink
  • m_c : PyRegistry
  • m_CacheWidgets : LPseudoWinAttachment
  • m_cancelButton : CProgressDlg, CItemListDlg, CCvsRootDlg, CCVSAlert_MAIN
  • m_cancelButtonTitle : CvsAlert
  • m_Caption : CCJExplorerBar, CCJCaptionPopupWnd
  • m_CaptionButton : CCJExplorerBar, CCJCaptionPopupWnd, CCJCaption
  • m_caseSensitiveNames : CUpdateOptions
  • m_checkChanges : CBrowseFileView
  • m_checkoutDir : CCheckout_MAIN
  • m_checkoutDirEdit : CCheckout_MAIN
  • m_checkoutro : CGetPrefs_GLOBALS
  • m_checkPath : CCmdLine_MAIN
  • m_checkPathCheck : CCmdLine_MAIN
  • m_checkUnmod : CTag_MAIN
  • m_checkUnmodCheck : CTag_MAIN
  • m_checkValidEdits : CCommit_OPTIONS
  • m_ClassNameToImageIndexMap : CCJTabCtrlBar
  • m_clearButton : CCvsRootDlg
  • m_clrAltHilite : CCJFlatButton
  • m_clrAltNormal : CCJFlatButton
  • m_clrAltShadow : CCJFlatButton
  • m_clrAltTextNm : CCJFlatButton
  • m_clrBackgnd : CCJCaption
  • m_clrBkgnd : CCJFontCombo
  • m_clrBorder : CCJCaption
  • m_clrBtnFace : CCJCaption
  • m_clrBtnHilite : CCJCaption
  • m_clrBtnShadow : CCJCaption
  • m_clrDkShad : CCJOutlookBar, CCJFlatButton
  • m_clrFont : CCJCaption
  • m_clrHilight : CCJFontCombo
  • m_clrHilightText : CCJFontCombo
  • m_clrHilite : CCJOutlookBar, CCJFlatComboBox, CCJFlatButton
  • m_clrNormal : CCJOutlookBar, CCJFlatComboBox, CCJFlatButton
  • m_clrNormalText : CCJFontCombo
  • m_clrShadow : CCJOutlookBar, CCJFlatComboBox, CCJFlatButton
  • m_clrText : CCJListView, CCJListCtrl
  • m_clrTextBk : CCJListView, CCJListCtrl
  • m_clrTextGy : CCJFlatButton
  • m_clrTextNm : CCJOutlookBar, CCJFlatButton
  • m_cmd : UTimer, CPseudoList
  • m_cmdid : CPseudoItem, LPseudoDrawAttachment, CPseudoDraw
  • m_cmdLine : CCmdLine_MAIN
  • m_cmdsList : CCustomizeMenus
  • m_cmdui : PyCmdUI
  • m_cncl : UPromptMessage
  • m_cntladd : CGetPrefs_GLOBALS
  • m_color : CColorStatic
  • m_column : CSelectionDetailsDlg::CompareInfo, CItemListDlg::CompareInfo, CDiff_Options::CompareInfo, CSortParam
  • m_columnAlt : CSortParam
  • m_columnIndex : CFilterSelectionDlg
  • m_compareType : CDiff_MAIN
  • m_compareTypeCombo : CDiff_MAIN
  • m_conflict : EntnodeFile
  • m_console : PyColorConsole
  • m_consolebar : CMainFrame
  • m_contentsCombo : CFilterSelectionDlg
  • m_context : TViewFill, KoFilterModel, CSortParam
  • m_continue : UCmdUI
  • m_copy : CSaveSettingsDlg
  • m_copyCheck : CSaveSettingsDlg
  • m_copyFrom : CSaveSettingsDlg
  • m_copyFromPathCombo : CSaveSettingsDlg
  • m_count : KoWatcher
  • m_countSel : TGraphDelCmd
  • m_crColor : CCJColorPopup
  • m_crColorBk : CCJColorPicker
  • m_crColors : CCJColorPopup
  • m_crColorText : CCJColorPicker
  • m_createmissdir : CUpdateMain
  • m_createSandbox : CImport_OPTIONS
  • m_crHoverColor : CCJHyperLink
  • m_crInitialColor : CCJColorPopup
  • m_crLinkColor : CCJHyperLink
  • m_crVisitedColor : CCJHyperLink
  • m_csText : CContentItems
  • m_cstr : PyPersistent
  • m_ctrlHeader : CBrowseFileView
  • m_ctrlPressedOnOK : CMultiLineEditDialogKeyHelper, CGetPrefs_CVSCMD_DIALOGS
  • m_curHSplitBar : CCJSizeDockBar
  • m_curindex : CPseudoRotButton
  • m_curModal : UWidget
  • m_currentAddress : CCJHexEdit
  • m_currentMode : CCJHexEdit
  • m_currentOptions : CDiff_Options
  • m_currentPage : UWidget
  • m_curSize : CBuffer
  • m_curVSplitBar : CCJSizeDockBar
  • m_CustomTextRect : CCJColorPopup
  • m_cvsConsole : CGetPrefs_CVS
  • m_cvsConsoleCheck : CGetPrefs_CVS
  • m_cvsErr : CItemListConsole, CCvsRootConsole
  • m_CvsGuiSfUrl : CAboutDlg
  • m_cvsOut : CItemListConsole, CCvsRootConsole
  • m_CvsProcess : CWincvsApp
  • m_cvsProtocolList : CCvsRootParser, CInfoParserConsole
  • m_cvsroot : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCvsRootDlg, CCheckout_MAIN
  • m_cvsrootCombo : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_cvsRootParser : CCvsRootDlg
  • m_cvsrootStatic : CCvsRootDlg
  • m_CvsRunning : CWincvsApp
  • m_cvsStopped : CItemListDlg, CCvsRootDlg
  • m_CvsStopping : CWincvsApp
  • m_cx : CCJCaption
  • m_cxOffset : CCJControlBar
  • m_cxText : CCJStatusBarPane
  • m_cy : CCJCaption
  • m_cyOffset : CCJControlBar
  • m_data : TBrowserFillDummy, UCvsGraph, TBrowserFillDummy, PyCvsEntry, CPseudoItem
  • m_date : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, EntnodeFile
  • m_date1 : CUpdateMerge
  • m_date1Combo : CUpdateMerge
  • m_date2 : CUpdateMerge
  • m_date2Combo : CUpdateMerge
  • m_dateCombo : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg
  • m_deadNodeColor : CGraphOptDlg
  • m_defaultButton : CCVSAlert_MAIN
  • m_DefaultTextRect : CCJColorPopup
  • m_defBranch : CLogMain
  • m_delAllCheck : CRelease_MAIN
  • m_delCvsInfoCheck : CRelease_MAIN
  • m_delDirCheck : CRelease_MAIN
  • m_desc : CImportEntry, CImportWarning
  • m_description : ItemDisplayInfo, ItemRowInfo, CEditKeywordDlg, KeywordInfo
  • m_descriptionEx : ItemDisplayInfo, ItemRowInfo
  • m_didInteract : CGetPrefs_CVSCMD_DIALOGS, CGetPrefs_CVS, CGetPrefs_WINCVS, CGetPrefs_GLOBALS
  • m_didSetIt : CTempToggleBool, CTurnOffDispatching
  • m_didSetSemaphore : USemaphore
  • m_diffOptions : CDiff_Options, CDiff_MAIN
  • m_diffOptionsCombo : CDiff_MAIN
  • m_diffProg : CGetPrefs_WINCVS
  • m_diffProgEdit : CGetPrefs_WINCVS
  • m_diffType : CDiff_MAIN
  • m_dir : UCvsGraph, CRelease_MAIN
  • m_dirname : TBrowserFillDummy
  • m_disableSplashScreen : CGetPrefs_GLOBALS
  • m_disbitmap : CPseudoButton
  • m_disbitmaps : CPseudoRotButton
  • m_diskNode : TGraphCurSelector
  • m_disknodeEntryInfo : TGraphCurSelector
  • m_dlg : CProgress
  • m_doc : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry, PyRegistry
  • m_dontCreateVendorTag : CImport_MAIN
  • m_dontCreateVendorTagCheck : CImport_MAIN
  • m_dontShortenPaths : CCheckout_MAIN
  • m_dontShortenPathsCheck : CCheckout_MAIN
  • m_downbtn : CCustomizeMenus
  • m_dwData : CCJSortClass::CSortItem
  • m_dwDragStart : CCJTreeCtrl
  • m_dwError : _afxRichEditCookie
  • m_dwExStyle : CCJCaption
  • m_dwFlags : CCJBrowseButton
  • m_dwTextStyle : CCJCaption
  • m_eAuxIndex : CCJControlBar
  • m_eChildBorder : CCJControlBar
  • m_edit : CImportFilterDlg, UEditMessage
  • m_editButton : CCvsRootDlg
  • m_editPos : CCJHexEdit
  • m_editPositionEdit : CMultilineEntryDlg
  • m_empty : TBrowserFillDummy
  • m_encoding : EntnodeFile
  • m_encryptCommunication : CGetPrefs_GLOBALS
  • m_enteredTwice : USemaphore
  • m_entries : TBrowserFill, TViewFill, TBrowserFill, UCvsFiles, TViewFill, CFillTclEntries, CFillPyEntries, CImportFilterDlg, CImport_OPTIONS
  • m_entriesLogMod : CBrowseFileView, UCvsFiles
  • m_entriesMod : CBrowseFileView, UCvsFiles
  • m_entryStatic : CMultilineEntryDlg
  • m_entryText : CMultilineEntryDlg
  • m_entryTextCtrl : CMultilineEntryDlg
  • m_entryTextCtrlWrap : CMultilineEntryDlg
  • m_err : CPyCvsConsole
  • m_eType : CCJBrowseEdit, CCJBrowseButton
  • m_ev : CMsg
  • m_export : CCheckout_MAIN
  • m_ext : EntnodeFile
  • m_extDiff : CDiff_MAIN
  • m_extDiffButton : CDiff_MAIN
  • m_extDiffSelButton : CGetPrefs_WINCVS
  • m_fAccendant : CSortParam
  • m_fAllEntries : CPersistent
  • m_fClass : CPersistent::CPersistentEntry
  • m_fData : CGraphDoc
  • m_fDefValue : CPersistentT< T >
  • m_fDir : CGraphDoc
  • m_feature : USmartCombo
  • m_fGroupSubDir : CSortParam
  • m_File : CCJMemFile
  • m_fileAction : CGetPrefs_CVSCMD_DIALOGS, CFileAction_MAIN
  • m_fileActionCombo : CFileAction_MAIN
  • m_fileActionDescStatic : CFileAction_MAIN
  • m_fileName : SelectionDisplayInfo
  • m_fileNameCheck : CSelectionDetailsDlg
  • m_fileOut : CCvsStreamConsole
  • m_filesBuffer : CMfFileDialog
  • m_fileToDiffCombo : CCommit_MAIN
  • m_filter : CMainFrame, KoFileViewTraversalContext, UCvsFrame, KoTraversalContext
  • m_filterBarFilters : CBrowseFileView
  • m_filterCombo : CFilterSelectionDlg
  • m_filterMask : KoFilterModel
  • m_filterMasksEnable : KoFilterModel
  • m_filters : KoFilterModel
  • m_filterText : CFilterSelectionDlg
  • m_firstFocus : CMultilineEntryDlg
  • m_firstSel : TGraphCurSelector
  • m_flag : CPseudoToggle
  • m_fName : CGraphDoc
  • m_fNode : CGraphDoc
  • m_folderBuffer : CMfFileDialog
  • m_folderLoc : CCmdLine_MAIN
  • m_folderLocCombo : CCmdLine_MAIN
  • m_font : UCvsConsole
  • m_Font : CCJTabCtrl, CCJOutlookBar, CCJMenuBar, CCJMaskEdit, CCJLogoPane, CCJHyperLink, CCJHexEdit, CCJFlatTabCtrl, CCJFlatHeaderCtrl, CCJFlatButton, CCJColorPopup, CCJCaption, CCJBrowseButton
  • m_fontNormal : CMainFrame
  • m_force : CAnnotate_MAIN
  • m_forceCheck : CAnnotate_MAIN
  • m_forceCommit : CCommit_OPTIONS
  • m_forceRecurse : CCommit_OPTIONS
  • m_forceRevision : CCommit_OPTIONS
  • m_forceRoot : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_forceRootCheck : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_foundIt : CFindSettings
  • m_frameHook : CCJMenuBar
  • m_fRtfFormat : CWincvsView
  • m_fSel1 : TGraphCmdStatus
  • m_fSel2 : TGraphCmdStatus
  • m_fTimeStamp : CPersistent
  • m_fullpath : EntnodeData, EntnodePath
  • m_fUniqueName : CPersistent::CPersistentEntry
  • m_fValue : CPersistentT< T >, CPersistent::CPersistentEntry
  • m_garbage : CCustInvertTable
  • m_getcleancopy : CUpdateMain
  • m_gotProblem : ControlCvsArgs
  • m_group : CPseudoToggle
  • m_grpBox : CTag_MAIN, CRtag_OPTIONS, CRtag_MAIN
  • m_handles : KoWatcher
  • m_hascvs : TBrowserFill, TBrowserFillDummy
  • m_hasDate : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg
  • m_hasDate1 : CUpdateMerge
  • m_hasDate1Check : CUpdateMerge
  • m_hasDate2 : CUpdateMerge
  • m_hasDate2Check : CUpdateMerge
  • m_hasDateCheck : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg
  • m_hasOne : CWinPlacement
  • m_hasPY : CWincvsApp, UCvsApp
  • m_hasRev : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CAnnotate_MAIN
  • m_hasRevCheck : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CAnnotate_MAIN
  • m_hasSelection : CCmdLine_MAIN
  • m_hasState : CLogFilters
  • m_hasStateCheck : CLogFilters
  • m_hasTCL : CWincvsApp, UCvsApp
  • m_hasUser : CLogFilters
  • m_hasUserCheck : CLogFilters
  • m_hasVendorBranch : CImport_OPTIONS
  • m_hAutoCommandWnd : CWndAutoCommand
  • m_hAuxIcon : CCJControlBar
  • m_hbmImageWell : CCJToolBar
  • m_hCursor : CCJFlatButton
  • m_hDesc : CKeywordComboBox
  • m_headerColor : CGraphOptDlg
  • m_headerCtrl : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • m_headerDesc : CLogMain
  • m_headerDescCheck : CLogMain
  • m_headerOnly : CLogMain
  • m_headerOnlyCheck : CLogMain
  • m_height : CColorMenu
  • m_heightOfLines : CBrowseFileView
  • m_helpinit : CInit_MAIN
  • m_helpLogin : CLogin_MAIN
  • m_hEndArrow : CCJFlatTabCtrl
  • m_hEndArrowDisabled : CCJFlatTabCtrl
  • m_hEnhMetaFile : CCJMetaFileButton
  • m_hEnhMetaFileDisabled : CCJMetaFileButton
  • m_hEnhMetaFileFocus : CCJMetaFileButton
  • m_hEnhMetaFileSel : CCJMetaFileButton
  • m_hhelpIDs : CHHelpSupport
  • m_hHomeArrow : CCJFlatTabCtrl
  • m_hHomeArrowDisabled : CCJFlatTabCtrl
  • m_hIcon : CCJExplorerBar, CCJControlBar, CCJCaption, CCJBrowseButton
  • m_hIconOff : CCJCaptionPopupWnd
  • m_hIconOn : CCJCaptionPopupWnd
  • m_hideAnnotate : CGetPrefs_CVSCMD_DIALOGS
  • m_hideDiff : CGetPrefs_CVSCMD_DIALOGS
  • m_hideGraph : CGetPrefs_CVSCMD_DIALOGS
  • m_hideLog : CGetPrefs_CVSCMD_DIALOGS
  • m_hideStatus : CGetPrefs_CVSCMD_DIALOGS
  • m_hideUpdate : CGetPrefs_CVSCMD_DIALOGS
  • m_hInstImageWell : CCJToolBar
  • m_hItemFirstSel : CCJTreeCtrl
  • m_hKeyRoot : CCJToolBar
  • m_hLeftArrow : CCJFlatTabCtrl
  • m_hLeftArrowDisabled : CCJFlatTabCtrl
  • m_hLinkCursor : CCJHyperLink
  • m_hMenu : CCJMDIChildWnd
  • m_hMenuTracking : CCJMenuBar
  • m_home : CGetPrefs_CVS
  • m_homeEdit : CGetPrefs_CVS
  • m_hParentDlg : CMultiLineEditDialogKeyHelper
  • m_hProcess : CEditorMonDlg
  • m_hPushed : CCJFlatButton
  • m_hRightArrow : CCJFlatTabCtrl
  • m_hRightArrowDisabled : CCJFlatTabCtrl
  • m_hRsrcImageWell : CCJToolBar
  • m_hWnd : KoWatcher, CSubclassWnd
  • m_hWndParent : CProgressDlg
  • m_iActualSize : CCJSizeDockBar
  • m_iClientHeight : CCJFlatTabCtrl
  • m_iClientWidth : CCJFlatTabCtrl
  • m_icon : CvsAlert
  • m_iconStatic : CCVSAlert_MAIN
  • m_iconX : CCJMenu
  • m_iconY : CCJMenu
  • m_iCurSel : CCJFlatTabCtrl
  • m_idletime : CWincvsApp
  • m_ignlist : TBrowserFill, TViewFill, TBrowserFill, TViewFill, CFillTclEntries, CFillPyEntries, ImportReport
  • m_ignore : CMainFrame, UCvsFrame
  • m_ignoreCase : CDiff_MAIN
  • m_ignoreCaseCheck : CDiff_MAIN
  • m_ignored : EntnodeData
  • m_ImageList : CCJControlBar
  • m_imageList : CWinCvsBrowser, CHistComboBoxEx, CGraphView, CImportFilterDlg
  • m_index : MultiFilesEntryIndex
  • m_indic : CCvsStatusBar
  • m_iNewPopup : CCJMenuBar
  • m_info : CDynToolBar
  • m_interruptable : CProgressDlg
  • m_iPopupTracking : CCJMenuBar
  • m_iSafeSpace : CCJSizeDockBar
  • m_isBackgroundProcess : CWincvsApp
  • m_isCheckout : CUpdateMerge
  • m_isDate : CAnnotate_MAIN
  • m_isDate1 : CDiff_MAIN
  • m_isDate1Check : CDiff_MAIN
  • m_isDate2 : CDiff_MAIN
  • m_isDate2Check : CDiff_MAIN
  • m_isDateCheck : CAnnotate_MAIN
  • m_isFiles : KoUpdateMoveToTrashHandler
  • m_isFilesChange : CBrowseFileView
  • m_isFolders : KoUpdateMoveToTrashHandler
  • m_isHideMissing : TBrowserFill
  • m_isHideUnknown : TBrowserFill
  • m_isIgnore : KoIgnoreModel
  • m_isRecursive : KoWatcher, CBrowseFileView, KoFileViewTraversalContext, UCvsFiles, KoTraversalContext, KoRecursionModel
  • m_isResetViewLocked : CBrowseFileView
  • m_isResetViewPending : CBrowseFileView
  • m_isShowIgnored : KoFileViewTraversalContext, TBrowserFill, TViewFill, KoTraversalContext
  • m_item : TBrowserFill, TBrowserFillDummy, TBrowserFill, TBrowserFillDummy, CItemListDlg, ItemDisplayInfo
  • m_itemEdit : CItemListDlg
  • m_itemLabelStatic : CItemListDlg
  • m_itemList : CItemListDlg, CItemListConsole
  • m_itemListCtrl : CItemListDlg
  • m_itemsImageList : CItemListDlg
  • m_iTotalTabWidth : CCJFlatTabCtrl
  • m_iTrackingState : CCJMenuBar
  • m_iXOffset : CCJFlatTabCtrl
  • m_keyForce : CGetPrefs_CVSCMD_DIALOGS
  • m_keyword : CUpdateOptions, USmartCombo, CDiff_MAIN, CEditKeywordDlg, KeywordInfo
  • m_keywordCombo : CUpdateOptions, CDiff_MAIN
  • m_keywordDescStatic : CUpdateOptions, CDiff_MAIN, CCvsRootDlg
  • m_keywordList : CCvsRootDlg, CProtocolParserConsole
  • m_lap : UTimer
  • m_lastCheckinTime : CUpdateOptions
  • m_lastlap : UTimer
  • m_lastRect : LPseudoWinAttachment
  • m_lastSel : TGraphCurSelector
  • m_launchRes : CItemListConsole, CCvsRootConsole
  • m_launchType : CFileAction_MAIN
  • m_length : CCJHexEdit
  • m_lineHeight : CCJHexEdit
  • m_list : CFindSettings, CImportFilterDlg
  • m_listeners : UWidget
  • m_listPath : CItemListDlg
  • m_locked : EntnodeData
  • m_logGraph : CWincvsApp
  • m_logMsg : CImport_MAIN, CCommit_MAIN
  • m_logout : CGetPrefs_GLOBALS
  • m_logoutCheck : CGetPrefs_GLOBALS
  • m_logoutEdit : CGetPrefs_GLOBALS
  • m_logoutSpinButton : CGetPrefs_GLOBALS
  • m_logoutTime : CGetPrefs_GLOBALS
  • m_logTempl : CWincvsApp
  • m_lookAttic : CRtag_MAIN
  • m_lpp : CCJHexEdit
  • m_lpszClassName : URuntimeClass
  • m_mainFrame : CWincvsApp, UCvsApp
  • m_mainInterpreter : CPython_Interp
  • m_manager : KoIgnoreModel, KoRecursionModel, KoFilterModel
  • m_mapColorFont : CCJTreeCtrl
  • m_mask : KoFilterMask
  • m_match : CUpdateOptions
  • m_matchCheck : CUpdateOptions
  • m_matchEntriesCase : CGetPrefs_GLOBALS
  • m_maxStr : TMString< T >
  • m_Menu : CCustomizeMenus
  • m_menu : CCJFrameWnd, PyMenuMgr
  • m_menuList : CCustomizeMenus, CCJMDIFrameWnd
  • m_MenuList : CCJMenu
  • m_mergeColor : CGraphOptDlg
  • m_mergeType : CUpdateMerge
  • m_mergeTypeCombo : CUpdateMerge
  • m_message : CvsAlert
  • m_messageDetails : CCVSAlert_MAIN, CvsAlert
  • m_messageDetailsEdit : CCVSAlert_MAIN
  • m_methods : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • m_mf : CMultilineEntryDlg, CMfFileDialog, CUpdateMerge, CUpdateOptions, CTemplateDlg, CTag_MAIN, CSelectionDetailsDlg, CRtag_OPTIONS, CRtag_MAIN, CLogFilters, CCmdLine_MAIN, CItemListDlg, CImport_OPTIONS, CImport_MAIN, CFileAction_MAIN, CDiff_MAIN, CCommit_OPTIONS, CCommit_MAIN, CCheckout_MAIN, CAnnotate_MAIN
  • m_mfi : MultiFilesEntryIndex
  • m_missing : EntnodeData
  • m_modalRes : UWidget
  • m_modelColumns : CBrowseFileView, UCvsFiles
  • m_modeSet : CCvsStreamConsole
  • m_moduleCombo : CRtag_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_moduleDescStatic : CRtag_MAIN
  • m_moduleName : CRtag_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_movDelBranch : CTag_MAIN, CRtag_MAIN
  • m_msg : UPromptMessage
  • m_multiLineEditDialogKeyHelper : CMultilineEntryDlg
  • m_multilineEntryDlg : CCmdLine_MAIN, CImport_MAIN, CCommit_MAIN, CAdminOption_MAIN
  • m_multilineEntryPlaceholder : CCmdLine_MAIN, CImport_MAIN, CCommit_MAIN, CAdminOption_MAIN
  • m_multilineEntryType : CMultilineEntryDlg
  • m_nActiveTab : CCJTabView, CCJTabCtrlBar
  • m_name : UCvsGraph, KeywordDisplayInfo, EntnodeData
  • m_nBarNumber : CCJToolBar
  • m_nBorder : CCJCaption
  • m_nBoxSize : CCJColorPopup
  • m_nButtons : CCJToolBar
  • m_nChosenColorSel : CCJColorPopup
  • m_nCount : CCJMDIChildWnd
  • m_nCurrentSel : CCJColorPopup
  • m_needSelection : KiSelectionHandler
  • m_needViewReset : KiSelectionHandler
  • m_newSel : TGraphCurSelector
  • m_next : PyRegistry
  • m_nFlags : CCJStatusBarPane
  • m_nHeight : CCJPagerCtrl
  • m_nHiddenCol : CCJFlatSplitterWnd
  • m_nHiddenRow : CCJFlatSplitterWnd
  • m_nID : CCJStatusBarPane, CCJControlBar, CCJBrowseButton, UCmdUI
  • m_nImageID : CContentItems
  • m_nIndex : CCJOutlookBar
  • m_nLastFilterChanged : CSortHeaderCtrl
  • m_nMargin : CCJColorPopup
  • m_nMaxColWidth : CCJListView, CCJListCtrl
  • m_nMenu : CCJBrowseEdit, CCJBrowseButton
  • m_nMenuID : CCJMenuBar, CCJMDIChildWnd
  • m_nMinColWidth : CCJListView, CCJListCtrl
  • m_nMinSize : CCJListView, CCJListCtrl
  • m_nNextToolTipId : CCJTabCtrlBar
  • m_nNumColors : CCJColorPopup
  • m_nNumColumns : CCJColorPopup
  • m_nNumItems : CCJOutlookBar
  • m_nNumRows : CCJColorPopup
  • m_nObjectSize : URuntimeClass
  • m_node : UCvsGraph
  • m_nodeColor : CGraphOptDlg
  • m_nodes : NotificationManager
  • m_noDispatch : UWidget
  • m_nOffset : CCJFlatHeaderCtrl, CCJCaption
  • m_noModuleProgram : CCommit_OPTIONS
  • m_noRecurs : CTag_MAIN, CStatus_MAIN, CRtag_MAIN, CLogMain, CDiff_MAIN
  • m_norecurs : CUpdateMain
  • m_noRecursCheck : CDiff_MAIN
  • m_noRecurse : CCommit_OPTIONS, CCheckout_MAIN, CAnnotate_MAIN
  • m_noRecurseCheck : CAnnotate_MAIN
  • m_noTags : CLogMain
  • m_notificationManager : CSortHeaderCtrl
  • m_notificationTime : KoWatcher
  • m_notify : CSelectionChangeNotifier
  • m_noWhiteSpace : CDiff_MAIN
  • m_noWhiteSpaceCheck : CDiff_MAIN
  • m_nPaneID : CCJStatusBarPaneControlInfo
  • m_nPointTab : CCJTabCtrlBar
  • m_nPos : CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • m_nSelectionMode : CCJColorPicker
  • m_nSortCol : CSortHeaderCtrl, CCJFlatHeaderCtrl
  • m_nSortedCol : CCJListView, CCJListCtrl
  • m_nStyle : CCJStatusBarPane
  • m_nSubMenuIndx : CCJBrowseEdit, CCJBrowseButton
  • m_nToolBarID : CCJMDIChildWnd
  • m_nToolBarIDs : CCJMDIChildWnd
  • m_nullWidth : CCJHexEdit
  • m_numberByPages : CBrowseFileView
  • m_numberOfLines : CBrowseFileView
  • m_numberOfPages : CGraphView, CBrowseFileView
  • m_numbuf : UCvsConsole
  • m_nWidth : CCJPagerCtrl
  • m_o : PyAutoObject< T >
  • m_object : PyPersistent::obj_t, PyCmdUI::obj_t, PyMenuMgr::obj_t, PyColorConsole::obj_t, PyCvsEntry::obj_t
  • m_offAddress : CCJHexEdit
  • m_offAscii : CCJHexEdit
  • m_offHex : CCJHexEdit
  • m_offset : TGraphCurSelector
  • m_ok : UPromptMessage
  • m_okButton : CTemplateDlg, CItemListDlg, CCvsRootDlg, CCVSAlert_MAIN
  • m_okButtonTitle : CvsAlert
  • m_onlyRCS : CLogMain
  • m_onlyRev : TGraphDelCmd
  • m_option : CItemListDlg::CompareInfo, CItemListDlg, EntnodeFile
  • m_optionCheck : COptionalPropertySheet, CItemListDlg
  • m_optionsListCtrl : CDiff_Options
  • m_optionsMenuButton : CDiff_MAIN
  • m_optionString : CAdminOption_MAIN
  • m_origBranchColor : CGraphOptDlg
  • m_origDeadNodeColor : CGraphOptDlg
  • m_origHeaderColor : CGraphOptDlg
  • m_origMergeColor : CGraphOptDlg
  • m_origNodeColor : CGraphOptDlg
  • m_origSelColor : CGraphOptDlg
  • m_origShadowColor : CGraphOptDlg
  • m_origTagColor : CGraphOptDlg
  • m_origUserStateNodeColor : CGraphOptDlg
  • m_otherButton : CCVSAlert_MAIN
  • m_otherButtonTitle : CvsAlert
  • m_out : CPyCvsConsole
  • m_outputType : CStatus_MAIN
  • m_overide : UWidget
  • m_overrideCoDir : CCheckout_MAIN
  • m_overrideCoDirCheck : CCheckout_MAIN
  • m_overwriteExisting : CTag_MAIN, CRtag_MAIN
  • m_overwriteExistingCheck : CTag_MAIN, CRtag_MAIN
  • m_overwriteReleaseTags : CImport_MAIN
  • m_overwriteReleaseTagsCheck : CImport_MAIN
  • m_p : CPyThreadState
  • m_pActiveView : CCJTabView, CCJTabCtrlBar
  • m_pageHeight : CGraphView
  • m_PageValues : LPseudoWinAttachment
  • m_Palette : CCJColorPopup
  • m_passwd : GetPassword
  • m_path : KoWatcher, CBrowseFileView, UCvsFiles, SelectionDisplayInfo, CSaveSettingsDlg, CImport_OPTIONS, CCvsSandboxInfo, CCvsRootParser, CCheckout_MAIN, KoColumnContext
  • m_pathCheck : CSelectionDetailsDlg
  • m_pathCombo : CImport_OPTIONS
  • m_pathEdit : CCheckout_MAIN
  • m_pathToFind : CFindSettings
  • m_pBarInfo : CCJToolBar
  • m_pBrowserApp : CCJHtmlView
  • m_pChildParent : CCJCaptionPopupWnd
  • m_pChildWnd : CCJControlBar, CCJCaptionPopupWnd, CCJCaption
  • m_pContents : CCJOutlookBar
  • m_pControls : CCJToolBar
  • m_pcvsAlert : CCVSAlert_MAIN
  • m_pCvsConsole : CCvsProcessData
  • m_pData : CCJHexEdit
  • m_pDlg : CMultiLineEditDialogKeyHelper
  • m_pDropButtons : CCJToolBar
  • m_pEditWnd : CCJBrowseButton
  • m_pen : UDC
  • m_pEndButton : CCJFlatTabCtrl
  • m_pError : CCJMemFile
  • m_pfnCreateObject : URuntimeClass
  • m_pfnGetBaseClass : URuntimeClass
  • m_pFont : CCJFlatButton, CCJCaption
  • m_pHeaderCtrl : CCJListView, CCJListCtrl
  • m_pHideOption : CvsAlert
  • m_pHomeButton : CCJFlatTabCtrl
  • m_pImageListLarge : CCJOutlookBar
  • m_pImageListSmall : CCJOutlookBar
  • m_placement : CWinPlacement
  • m_pLeftButton : CCJFlatTabCtrl
  • m_pListCtrl : CCJListView, CCJListCtrl
  • m_pMenuBar : CCJMenuBarFrameHook
  • m_pmf : KiSelectionHandler
  • m_pNext : CSubclassWnd
  • m_pNextClass : URuntimeClass
  • m_pNotifyWnd : CCJCaption
  • m_point : CCJOutlookBar
  • m_pOldWndProc : CSubclassWnd
  • m_popToolbarID : CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • m_popupMenu : CGfxOutBarCtrl, CCJTabCtrl, CCJMenuBar, CCJFlatHeaderCtrl, CCJControlBar
  • m_popupMenuID : CCJTabCtrl, CCJFlatHeaderCtrl, CCJControlBar
  • m_pOwner : CCJOutlookBar
  • m_pParent : CCJColorPopup, CProgressDlg
  • m_pParentWnd : CMultilineEntryDlg, CCJFlatHeaderCtrl, CCJColorPicker, CCJCaptionPopupWnd, CCJBrowseButton
  • m_pPreviousEntries : CMultilineEntryDlg
  • m_previewEdit : CTemplateDlg
  • m_previewInfo : CCommit_MAIN
  • m_prevLogsCombo : CMultilineEntryDlg
  • m_pRightButton : CCJFlatTabCtrl
  • m_progress : ImportReport
  • m_progressCtrl : CProgressDlg
  • m_progressTextStatic : CProgressDlg
  • m_progressType : CProgressDlg
  • m_protocol : CCvsRootDlg, CCvsRootParser
  • m_protocolCombo : CCvsRootDlg
  • m_protocolDescStatic : CCvsRootDlg
  • m_prune : CGetPrefs_GLOBALS
  • m_pseudo : CPseudoDraw, CPseudoDlg
  • m_pStream : CTipDlg
  • m_pStringMap : CCJToolBar
  • m_pstrItems : USmartCombo
  • m_pTabCtrl : CCJTabView
  • m_ptCurDrag : CCJSizeDockBar, CCJControlBar
  • m_ptCurrent : CCJSizeDockBar
  • m_ptMouse : CCJMenuBar
  • m_pToolTip : CCJTabView
  • m_ptOrig : CCJDockContext
  • m_ptStartDrag : CCJSizeDockBar, CCJControlBar
  • m_pWnd : CWndRedrawMngr, CCJStatusBarPaneControlInfo, CCJSortClass
  • m_pWndPopDown : CCJCaption
  • m_pythonDll : CGetPrefs_WINCVS
  • m_pythonDllEdit : CGetPrefs_WINCVS
  • m_quiet : CGetPrefs_GLOBALS
  • m_radio : CPseudoToggle
  • m_radios : CImportEntry
  • m_rapidNotificationCount : KoWatcher
  • m_rcChild : CCJCaption
  • m_rcClient : CCJCaption
  • m_rcOldPos : CCJToolBar
  • m_rcOldSize : CCJFlatHeaderCtrl
  • m_rcTrack : CCJSizeDockBar, CCJControlBar
  • m_reactionSpeed : CFilterMaskOptDlg
  • m_reactionSpeedSpin : CFilterMaskOptDlg
  • m_reactionSpeedStatic : CFilterMaskOptDlg
  • m_readFrom : CItemListDlg
  • m_readFromCombo : CItemListDlg
  • m_rect : TGraphRectSelect
  • m_recursion : CMainFrame, UCvsFrame
  • m_redraw : CWndRedrawMngr
  • m_ref : EntnodeData, EntnodePath
  • m_refreshButton : CItemListDlg
  • m_registry : PyPersistent, PyCmdUI, PyMenuMgr, PyColorConsole, PyCvsEntry
  • m_relativePath : EntnodeFile
  • m_remind : CNoPython
  • m_removebtn : CCustomizeMenus
  • m_removed : EntnodeData
  • m_removeDirectoryOption : CRelease_MAIN
  • m_repositoryPath : CCvsRootDlg
  • m_repositoryPathCombo : CCvsRootDlg
  • m_resetSticky : CUpdateOptions
  • m_resetStickyCheck : CUpdateOptions
  • m_resetViewPending : CWinCvsBrowser
  • m_resolved : EntnodeData
  • m_restartPointerCache : TGraphCurSelector
  • m_rev : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CCommit_OPTIONS, CAnnotate_MAIN
  • m_rev1 : CUpdateMerge, CDiff_MAIN
  • m_rev1Combo : CUpdateMerge, CDiff_MAIN
  • m_rev2 : CUpdateMerge, CDiff_MAIN
  • m_rev2Combo : CUpdateMerge, CDiff_MAIN
  • m_revCombo : CUpdateOptions, CRtag_OPTIONS, CLogFilters, CItemListDlg, CCommit_OPTIONS, CAnnotate_MAIN
  • m_revision : SelectionDisplayInfo
  • m_revisionCheck : CSelectionDetailsDlg
  • m_revisionSpinCtrl : CSelectionDetailsDlg
  • m_rgbBranch : CGraphOptDlg
  • m_rgbDead : CGraphOptDlg
  • m_rgbHeader : CGraphOptDlg
  • m_rgbMerge : CGraphOptDlg
  • m_rgbNode : CGraphOptDlg
  • m_rgbSelection : CGraphOptDlg
  • m_rgbShadow : CGraphOptDlg
  • m_rgbState : CGraphOptDlg
  • m_rgbTag : CGraphOptDlg
  • m_root : CWinCvsBrowser, TBrowserFill, TBrowserFillDummy, UCvsFolders, TBrowserFill, TBrowserFillDummy
  • m_rowInfo : ItemDisplayInfo, KeywordDisplayInfo
  • m_rtag : CImport_MAIN
  • m_rtagButton : CImport_MAIN
  • m_rtagCombo : CImport_MAIN
  • m_running : TraversalReport
  • m_sameActionNextTime : CFileAction_MAIN
  • m_sbuf : CWincvsView
  • m_sbuffer : EntnodeData
  • m_section : KoWatcher
  • m_sel1 : TGraphCurSelector
  • m_sel2 : TGraphCurSelector
  • m_selAltCvsButton : CGetPrefs_CVS
  • m_selColor : CGraphOptDlg
  • m_selCount : TGraphCmdStatus
  • m_selCvsrootButton : CRtag_MAIN, CLogin_MAIN, CCmdLine_MAIN, CItemListDlg, CInit_MAIN, CImport_MAIN, CCheckout_MAIN
  • m_selDetType : CSelectionDetailsDlg
  • m_selectcheck : CCJMenu
  • m_selectExact : CSmartComboBox
  • m_selection : CSelectionDetailsDlg
  • m_selectionButton : CItemListDlg
  • m_selectionChanged : CWinCvsBrowser
  • m_selectionEdit : CSelectionDetailsDlg
  • m_selectionListCtrl : CSelectionDetailsDlg
  • m_selectionNotificationLocked : CWinCvsBrowser
  • m_selEnd : CCJHexEdit
  • m_selFolderButton : CCmdLine_MAIN
  • m_selId : TGraphCurSelector
  • m_selStart : CCJHexEdit
  • m_selType : KiSelectionHandler
  • m_semaphore : CRecursionLock, USemaphore
  • m_settimer : CCvsStatusBar
  • m_settingName : CSaveSettingsDlg
  • m_settingsFile : CFindSettings
  • m_settingsFolder : CGetPrefs_WINCVS
  • m_settingsFolderButton : CGetPrefs_WINCVS
  • m_settingsFolderEdit : CGetPrefs_WINCVS
  • m_shadowColor : CGraphOptDlg
  • m_shiftOn : TGraphRectSelect
  • m_showCvs : CGetPrefs_CVS
  • m_showCvsCombo : CGetPrefs_CVS
  • m_sizeButton : CCJToolBar
  • m_sizeDesired : CCJControlBar
  • m_sizeFloat : CCJControlBar
  • m_sizeHorz : CCJControlBar
  • m_sizeIcon : CCJFlatButton
  • m_sizeImage : CCJToolBar
  • m_sizeNormal : CCJControlBar
  • m_sizeVert : CCJControlBar
  • m_SmallImageList : CCustomizeMenus
  • m_smallImageList : CBrowseFileView
  • m_snumbuf : CWincvsView
  • m_sort : CBrowseFileView, UCvsFiles
  • m_sortAsc : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • m_sortColumn : CSelectionDetailsDlg, CItemListDlg, CDiff_Options
  • m_startEvent : KoWatcher
  • m_state : CMainFrame, CLogFilters, EntnodeData
  • m_stateCombo : CLogFilters
  • m_stateImageList : CBrowseFileView
  • m_stdout : CUpdateOptions
  • m_step : CCvsStatusBar
  • m_str : UStr, UPStr
  • m_strCaption : CCJExplorerBar
  • m_strCommand : KiSelectionHandler
  • m_strCustomText : CCJColorPopup, CCJColorPicker
  • m_strDefault : CCJListView, CCJListCtrl
  • m_strDefaultText : CCJColorPopup, CCJColorPicker
  • m_strDefExt : CCJBrowseButton
  • m_strEntry : CCJListView, CCJListCtrl
  • m_strFileName : CCJBrowseButton
  • m_strFilter : CCJBrowseButton
  • m_strFormat : CCJWindowPlacement
  • m_strHours : CCJTimeEdit
  • m_strItemText : CCJSortClass::CSortItem
  • m_strLastInsertedFilterText : CSortHeaderCtrl
  • m_strLiteral : CCJMaskEdit
  • m_strLogoText : CCJLogoPane
  • m_strMask : CCJMaskEdit
  • m_strMaskLiteral : CCJMaskEdit
  • m_strMins : CCJTimeEdit
  • m_strRemoveItem : CGfxOutBarCtrl
  • m_strRenameItem : CGfxOutBarCtrl
  • m_strSection : CCJWindowPlacement, CCJListView, CCJListCtrl, CCJControlBar
  • m_strSubKey : CCJToolBar
  • m_strText : CCJStatusBarPane
  • m_strTip : CTipDlg
  • m_strTitle : CCJBrowseButton
  • m_strURL : CCJHyperLink
  • m_strValid : CCJMaskEdit
  • m_strValueName : CCJToolBar
  • m_strWindowText : CCJMaskEdit
  • m_strWindText : CCJCaption
  • m_strWndPos : CCJWindowPlacement
  • m_style : UPen
  • m_SubMenus : CCJMenu
  • m_supress : CLogMain
  • m_switchingWrap : CMultilineEntryDlg
  • m_syncObject : CWincvsView
  • m_szMenuText : CCJMenuData
  • m_TabCtrl : CCJTabCtrlBar
  • m_TabFont : CCJTabView
  • m_TabImages : CMainFrame
  • m_TabList : CCJFlatTabCtrl
  • m_tabs : UWidget
  • m_TabTipList : CCJFlatTabCtrl
  • m_tag : EntnodeFile
  • m_tagColor : CGraphOptDlg
  • m_tagCombo : CTag_MAIN, CRtag_MAIN
  • m_tagDescStatic : CTag_MAIN, CRtag_MAIN
  • m_tagName : CTag_MAIN, CRtag_MAIN
  • m_tclDll : CGetPrefs_WINCVS
  • m_tclDllEdit : CGetPrefs_WINCVS
  • m_tcpip : CGetPrefs_GLOBALS
  • m_tcpipCheck : CGetPrefs_GLOBALS
  • m_tempFile : CEditorMonDlg
  • m_templateList : CTemplateDlg
  • m_templateText : CTemplateDlg
  • m_term : CLogoutThread
  • m_terminateEvent : KoWatcher
  • m_texts : CPseudoItem
  • m_threeWayConflicts : CUpdateMerge
  • m_threeWayConflictsCheck : CUpdateMerge
  • m_timer : CEditorMonDlg
  • m_timers : UWidget
  • m_title : CProgressDlg, UPromptMessage
  • m_tokens : KoFilterMask
  • m_tooltip : CCvsStatusBar
  • m_ToolTip : CCJHyperLink, CCJFlatTabCtrl, CCJControlBar, CCJColorPopup
  • m_tooltips : UWidget
  • m_topfolder : CFindSettings
  • m_topindex : CCJHexEdit
  • m_tracking : CDynToolBar
  • m_treeCtrl : TBrowserFill, TBrowserFillDummy, TBrowserFill, TBrowserFillDummy
  • m_TreeCtrl : CExploreBar
  • m_ts : EntnodeFile
  • m_type : CTag_MAIN, CRtag_OPTIONS, CRtag_MAIN, PyRegistry, CItemListDlg::CompareInfo, CItemListDlg, CAdminOption_MAIN
  • m_uiCmd : CWndAutoCommand
  • m_uiFilechangeTimer : CBrowseFileView
  • m_uiOpenFlags : CCJMemFile
  • m_unifiedDiff : CDiff_MAIN
  • m_unifiedDiffCheck : CDiff_MAIN
  • m_unixlf : CGetPrefs_GLOBALS
  • m_unknown : EntnodeData
  • m_unmodified : EntnodeData
  • m_unselectcheck : CCJMenu
  • m_upBorder : CGfxSplitterWnd
  • m_upbtn : CCustomizeMenus
  • m_url : CNoPython
  • m_useAltCvs : CGetPrefs_CVS
  • m_useAltCvsCheck : CGetPrefs_CVS
  • m_useDefIgnore : CImport_OPTIONS
  • m_useExtDiff : CGetPrefs_WINCVS
  • m_useExtDiffCheck : CGetPrefs_WINCVS
  • m_useFilesTime : CImport_OPTIONS
  • m_useMostRecent : CRtag_OPTIONS
  • m_user : CLogFilters
  • m_userCombo : CLogFilters
  • m_userStateNodeColor : CGraphOptDlg
  • m_useSettingsFolder : CGetPrefs_WINCVS
  • m_useSettingsFolderCheck : CGetPrefs_WINCVS
  • m_v : PyRegistry
  • m_value : CTempToggleBool, CEditKeywordDlg, KeywordDisplayInfo
  • m_valueCombo : CEditKeywordDlg
  • m_vendorBranch : CImport_OPTIONS
  • m_vendorBranchButton : CImport_OPTIONS
  • m_vendorBranchCheck : CImport_OPTIONS
  • m_vendorBranchCombo : CImport_OPTIONS
  • m_vers : CAboutDlg
  • m_view : CSelectionChangeNotifier, CGraphRectTracker, TGraphSelNonSig, CGraphConsole, TGraphRectSelect, TGraphCurSelector, CBarConsole, KoFileViewTraversalContext, KoTraversalContext
  • m_viewer : CGetPrefs_WINCVS
  • m_viewerEdit : CGetPrefs_WINCVS
  • m_viewList : CCJTabCtrlBar
  • m_viewPath : CWincvsDoc
  • m_views : CCJTabView
  • m_visited : EntnodeData
  • m_vn : EntnodeFile
  • m_vtag : CImport_MAIN
  • m_vtagButton : CImport_MAIN
  • m_vtagCombo : CImport_MAIN
  • m_warnings : CImportFilterDlg, CImport_OPTIONS
  • m_wasLocked : CSelectionChangeNotifier
  • m_watch : CBrowseFileView
  • m_wid : CMsg, UDC, CPseudoList
  • m_widget : UCmdUI
  • m_widgets : UWidget
  • m_widid : CDynToolBar, UCmdTarget, CPseudoItem, LPseudoWinAttachment, LPseudoDrawAttachment
  • m_width : CColorMenu, UPen
  • m_WinCvsUrl : CAboutDlg
  • m_WindowRect : CCJColorPopup
  • m_winInfo : UToolbar
  • m_wndBrowser : CMainFrame, CCJHtmlView
  • m_wndFilter : CMainFrame
  • m_wndList : CMainFrame
  • m_wndMenuBar : CCJMDIFrameWnd, CCJFrameWnd
  • m_wndMultiUser : CMainFrame
  • m_wndStatusBar : CMainFrame
  • m_wndTags : CMainFrame
  • m_wndToolBar : CMainFrame, UToolbar
  • m_wndWorkspace : CMainFrame
  • m_wordWrap : CMultilineEntryDlg
  • m_wordWrapCtrl : CMultilineEntryDlg
  • m_zlevel : CGetPrefs_GLOBALS
  • m_zlevelEdit : CGetPrefs_GLOBALS
  • m_zspinSpinButton : CGetPrefs_GLOBALS
  • MA_DECLARE_CLASS : TPseudoDoubleNumberText, TPseudoTextListView, TPseudoCustomView, TPseudoWinAdorner, TPseudoWinBehavior, TPseudoAppBehavior, TPseudoIconCheckBox, TPseudoRotateIconButton, TPseudoIconButton, TPseudoIconPopup, TPseudoScrollBar, TBuggyPopup
  • maps : MACBINMAPENTRIES
  • max : USLIDER
  • maxWarnings : ReportWarning
  • menuIconNormal : CCJMenuData
  • messageMap : UCvsToolbar, UCvsStatusbar, UCvsMenubar, UCvsGraph, UCvsFrame, UCvsFolders, UCvsFiles, UCvsConsole, UCvsApp, UEditMessage, UPromptMessage, UWidget, UToolbar, UMenu, UCmdTarget, UMacAppMenu
  • min : USLIDER
  • mirc2ctcpmap : mircAttrCvt
  • mode : keywordMode
  • msgSend : CGfxGroupEdit

- n -

  • name : CMacroEntry, option
  • next : DROPDOWNBUTTON, ReportWarning, ReportConflict, DYN_LIST, _frameRec, UTREE_INFO
  • nFlags : CCJMenuData
  • nID : CCJMenuData, CJX_CONTROLPOS
  • nIndex : CJX_CONTROLPOS
  • nMessage : UMSGMAP_ENTRY
  • node : CTCLBrowserEnt
  • nSig : UMSGMAP_ENTRY
  • nul_void_ignore : CTCP2Parse::RGBColor
  • numentries : DYN_LIST
  • numMaps : MACBINMAPENTRIES

- o -

  • observer : NotificationManager::Node
  • oldFormat : CColorConsole
  • option : _sDiffOptionsItem
  • out : UCvsConsole
  • outEnabled : UPseudoCmdStatusWrapper
  • outMark : UPseudoCmdStatusWrapper
  • outName : UPseudoCmdStatusWrapper
  • outUsesMark : UPseudoCmdStatusWrapper
  • overCnt : CTCP2Parse
  • overLast : CTCP2Parse

- p -

  • parent : UTREE_INFO, UTREE_INSERT
  • path : CMacroEntry
  • pattern : ReportConflict
  • pBaseMap : UMSGMAP
  • pBlackPen : CGfxOutBarCtrl
  • pChild : CGfxOutBarCtrl::CBarFolder
  • pCmdUI : UCmdUI
  • pfn : UMSGMAP_ENTRY, UMessageMapFunctions
  • pfni_i : UMessageMapFunctions
  • pfni_ii : UMessageMapFunctions
  • pfni_iVP : UMessageMapFunctions
  • pfni_V : UMessageMapFunctions
  • pfni_VP : UMessageMapFunctions
  • pfnV_i : UMessageMapFunctions
  • pfnV_ii : UMessageMapFunctions
  • pfnV_iii : UMessageMapFunctions
  • pfnV_iiVP : UMessageMapFunctions
  • pfnV_iVP : UMessageMapFunctions
  • pfnV_V : UMessageMapFunctions
  • pfnV_VP : UMessageMapFunctions
  • pLargeImageList : CGfxOutBarCtrl, CGfxOutBarCtrl::CBarFolder
  • pNMHDR : UCmdUI
  • pool : poolRec
  • pools : garbyRec
  • pos : ansiAttrCvt, USLIDER
  • pSmallImageList : CGfxOutBarCtrl, CGfxOutBarCtrl::CBarFolder
  • pWnd : tagCTV_ITEM, tagTCB_ITEM

- r -

  • R : CTCP2Parse::RGBColor
  • r : UCOLOR, UColor
  • rcDownArrow : CGfxOutBarCtrl
  • rcUpArrow : CGfxOutBarCtrl
  • rectOldPos : CJX_CONTROLPOS
  • ref : aref
  • result : UTREE_INSERT
  • revCnt : CTCP2Parse
  • reverse : ansiAttrCvt
  • revLast : CTCP2Parse
  • RGB : CTCP2Parse::RGBColor
  • rgbqFrom : CJX_COLORMAP
  • right : URECT
  • row : ULIST_INFO, ULIST_INSERT

- s -

  • sAllURuntimeClass : URuntimeClass
  • sample1 : ReportConflict
  • sample2 : ReportConflict
  • samples : ReportWarning
  • segment : CTCP2Parse
  • sel : CWinLogData
  • selfB : CWinLogData
  • sFocusCmdID : UWidget
  • sFocusWidID : UWidget
  • shareData : ENTNODE
  • sig : MACBINMAP
  • sizeofcell : DYN_LIST
  • sMAMenuWidID : UMacAppMenu
  • spec : FileEntry
  • sPPMenuWidID : UPPMenu
  • st_atime : stat
  • st_ctime : stat
  • st_dev : stat
  • st_gid : stat
  • st_ino : stat
  • st_mode : stat
  • st_mtime : stat
  • st_nlink : stat
  • st_rdev : stat
  • st_size : stat
  • st_uid : stat
  • status : ReportConflict
  • sValidMenu : UWidget
  • syncflag : CCJMenuData
  • szLabel : tagCTV_ITEM
  • szName : ColorTableEntry
  • szTabLabel : tagTCB_ITEM
  • szToolTipLabel : tagTCB_ITEM

- t -

  • targets : CAllTargets
  • tbButton : TOOLBARINFO
  • text : CGfxGroupEdit
  • title : CustInvertTable, ULIST_INFO, ULIST_INSERT, UTREE_INFO, UTREE_INSERT, UTB_INIT
  • tokens : irciiAttrCvt, mircAttrCvt
  • tooltip : awidget, UTB_DROPDOWN, UTB_BUTTON
  • tooManyWarnings : ReportWarning
  • top : URECT
  • totB : CWinLogData
  • totpage : DYN_LIST

- u -

  • uiToolTipId : tagTCB_ITEM
  • underCnt : CTCP2Parse
  • underLast : CTCP2Parse
  • underline : UCvsConsole, ansiAttrCvt
  • urlCnt : CTCP2Parse
  • urlLast : CTCP2Parse
  • useDefault : MACBINMAP

- v -

  • val : option
  • var : awidget
  • varcode : UTB_BUTTON
  • view : CViewInfo

- w -

  • warnings : ImportReport
  • wHeight : CToolBarData
  • wid : TbEntryButton
  • width : WININFO
  • widthbtn : UTB_INIT
  • winid : UTB_INIT
  • wItemCount : CToolBarData
  • wVersion : CToolBarData
  • wWidth : CToolBarData

- x -

  • x : UPOINT
  • xLeftMargin : CGfxOutBarCtrl
  • xoffset : CCJMenuData
  • xSmallIconLabelOffset : CGfxOutBarCtrl

- y -

  • y : UPOINT
  • yLargeIconLabelOffset : CGfxOutBarCtrl
  • yLargeIconSpacing : CGfxOutBarCtrl
  • ySmallIconSpacing : CGfxOutBarCtrl
  • yTopMargin : CGfxOutBarCtrl
Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: File Members - Defines

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
_ | a | b | c | d | e | f | g | h | i | k | l | m | n | o | p | q | r | s | t | u | v | w

- _ -

  • __FNM_FLAGS : fnmatch.h
  • __GNU_LIBRARY__ : getopt.h
  • __PROTO : getline.h
  • __ssize_t : getline.h
  • __STDC__ : TclGlue.cpp, getopt.h, fnmatch.h
  • _CJX_COMMENT : CJLibrary.h
  • _CJX_EXT_CLASS : CJLibrary.h, StdAfx.h
  • _CJX_MESSAGE : CJLibrary.h
  • _CjxGetDlgCtrlID : CJReBar.cpp
  • _CJXLIB_INLINE : CJLibrary.h, StdAfx.h
  • _CLR_TO_RGBQUAD : CJToolBar.cpp
  • _COMMON_PY_DECL_CLASS : PythonMacros.h
  • _countof : BrowseViewColumn.cpp, uevent.cpp
  • _delete : CJLibrary.h, StdAfx.h
  • _destroyIcon : StdAfx.h
  • _DIFF_CPP_ : DiffDlg.cpp
  • _FNMATCH_H : fnmatch.h
  • _getline_h_ : getline.h
  • _GETOPT_H : getopt.h
  • _i18n : cvsgui_i18n.h
  • _LIBC : getopt.h
  • _PyObject_New : PythonGlue.impl.h
  • _RGB_TO_RGBQUAD : CJToolBar.cpp
  • _TCL_CALLBACK : TclGlue.cpp
  • _VC_VERSION_5 : CJLibrary.h, StdAfx.h

- a -

  • AFX_ADMINOPTIONDLG_H__C9A89564_F0A4_4294_8C6C_18469D18BCB3__INCLUDED_ : AdminOptionDlg.h
  • AFX_ANNOTATEDLG_H__864729EE_838B_473D_8723_E1269829F781__INCLUDED_ : AnnotateDlg.h
  • AFX_ASKYESNO_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_ : AskYesNo.h
  • AFX_BROWSEFILEVIEW_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : BrowseFileView.h
  • AFX_BROWSERBAR_H__64721953_F9A8_11D2_BDEC_000000000000__INCLUDED_ : BrowserBar.h
  • AFX_CHECKOUTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : CheckoutDlg.h
  • AFX_CHILDFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_ : LogFrm.h
  • AFX_COLORSTATIC_H__4D2B055E_F042_428F_A662_09ABEA902DCE__INCLUDED_ : ColorStatic.h
  • AFX_COMMITDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : CommitDlg.h
  • AFX_CUSTOMIZEMENUS_H__28A6AE7E_C54B_47A5_A8F5_A127E2E9F3BF__INCLUDED_ : CustomizeMenus.h
  • AFX_CVSALERT_H__ACFE8C41_9836_11D1_AE50_00C0F0067852__INCLUDED_ : CvsAlert.h
  • AFX_CVSROOTDLG_H__E7B87F15_691C_407E_AFAE_910BE8E98A0A__INCLUDED_ : CvsRootDlg.h
  • AFX_CVSSANDBOXINFO_H__06D1CA4F_06C6_4F57_9787_C91C53E372D6__INCLUDED_ : CvsSandboxInfo.h
  • AFX_CVSSTATUSBAR_H__F549ACF2_ECFE_4933_A05D_5FC8248C3CD4__INCLUDED_ : CvsStatusBar.h
  • AFX_DIFFDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : DiffDlg.h
  • AFX_EDITORMONDLG_H__5146BF16_567B_4017_A1FD_619A7BD07906__INCLUDED_ : EditorMonDlg.h
  • AFX_EXPLOREBAR_H__A132A164_1A90_11D3_B1A1_004095463819__INCLUDED_ : ExploreBar.h
  • AFX_FILEACTIONDLG_H__9C280EEF_16E5_4208_8A31_24AE6290E9D7__INCLUDED_ : FileActionDlg.h
  • AFX_FILETRAVERSAL_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : FileTraversal.h
  • AFX_FILTERMASKOPTDLG_H__8560F3E7_6DBF_4EB6_B33E_E438B3020000__INCLUDED_ : FilterMaskOptDlg.h
  • AFX_FILTERSELECTIONDLG_H__933ECF3F_C417_4C4E_AD6F_39769CCC4E6F__INCLUDED_ : FilterSelectionDlg.h
  • AFX_GETPASSWORD_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_ : GetPassword.h
  • AFX_GETPREFS_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : GetPrefs.h
  • AFX_GRAPHDOC_H__09F456C1_0018_11D2_BCAA_000000000000__INCLUDED_ : GraphDoc.h
  • AFX_GRAPHFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_ : GraphFrm.h
  • AFX_GRAPHOPTDLG_H__E05908EC_20A6_43FE_93C7_0964E6ABB6B1__INCLUDED_ : GraphOptDlg.h
  • AFX_GRAPHVIEW_H__7A07C311_03F9_11D2_BCB2_000000000000__INCLUDED_ : GraphView.h
  • AFX_HHELPSUPPORT_H__E97D92A1_F935_41B3_9748_8000F0A1A76C__INCLUDED_ : HHelpSupport.h
  • AFX_HISTCOMBOBOXEX_H__E330E7B9_8C79_44CB_8F07_01D395975365__INCLUDED_ : HistComboBoxEx.h
  • AFX_IDW_SIZEBAR_BOTTOM : CJControlBar.h
  • AFX_IDW_SIZEBAR_LEFT : CJControlBar.h
  • AFX_IDW_SIZEBAR_RIGHT : CJControlBar.h
  • AFX_IDW_SIZEBAR_TOP : CJControlBar.h
  • AFX_IMPORTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : ImportDlg.h
  • AFX_IMPORTFILDERDLG_H__CFB7AA41_BDDB_11D1_B965_0020AF51D9DA__INCLUDED_ : ImportFilterDlg.h
  • AFX_IMPORTFILTER_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : ImportFilter.h
  • AFX_INITDLG_H__155D02C3_2323_11D3_B1A6_004095463819__INCLUDED_ : InitDlg.h
  • AFX_ITEMLISTDLG_H__E6D16D27_1A84_4E8A_A926_3B76728E0F73__INCLUDED_ : ItemListDlg.h
  • AFX_KEYWORDCOMBOBOX_H__F5D656E1_FD93_49A0_A27B_231957D4AAC5__INCLUDED_ : KeywordComboBox.h
  • AFX_LAUNCHHANDLERS_H__26387DB1_9D2A_4909_A7A7_5ACAFA46A57B__INCLUDED_ : LaunchHandlers.h
  • AFX_LINECMD_H__5946A8C5_8517_11D1_8949_444553540000__INCLUDED_ : LineCmd.h
  • AFX_LOGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : LogDlg.h
  • AFX_LOGIN_MAIN_H__CF191044_0332_477E_ABD2_13E56D643C14__INCLUDED_ : LoginDlg.h
  • AFX_LOGPARSE_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : LogParse.h
  • AFX_MAINFRM_H__D2D77DCC_8299_11D1_8949_444553540000__INCLUDED_ : MainFrm.h
  • AFX_MFFILEDIALOG_H__66684391_7914_4A0D_9848_022A6CA7573C__INCLUDED_ : MfFileDialog.h
  • AFX_MMENUSTRING_H__6C55ACE9_20FB_42DE_B678_7EA6A3AF99B3__INCLUDED_ : MMenuString.h
  • AFX_MULTILINEENTRYDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : MultilineEntryDlg.h
  • AFX_NOPYTHON_H__F675DE42_0FA7_4785_8946_E8FC861BBA57__INCLUDED_ : NoPython.h
  • AFX_OPTIONALPROPERTYSHEET_H__F82DC8BB_73CD_4AEA_8635_1A0932F24C7D__INCLUDED_ : OptionalPropertySheet.h
  • AFX_PROGRESSDLG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_ : ProgressDlg.h
  • AFX_PSEUDODLG_H__9EDC5FE5_21FD_4ACE_9AEB_7A521350A2EE__INCLUDED_ : PseudoDlg.h
  • AFX_PSEUDOLIST_H__49AF86B3_E6AB_4885_843C_1CE5AC8C4980__INCLUDED_ : pseudolist.h
  • AFX_RELEASEDLG_H__12B5FA97_703E_4616_B361_F2917D45E54A__INCLUDED_ : ReleaseDlg.h
  • AFX_RTAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : RtagDlg.h
  • AFX_SAVESETTINGSDLG_H__73E4731F_7A3E_46B2_835A_056922641479__INCLUDED_ : SaveSettingsDlg.h
  • AFX_SELECTIONDETAILSDLG_H__42708DEE_6E9B_41FD_BAE6_0224C8EE09D8__INCLUDED_ : SelectionDetailsDlg.h
  • AFX_SMARTCOMBOBOX_H__E3F8DAE6_C2EF_49CE_AE52_3AE54F5A629C__INCLUDED_ : SmartComboBox.h
  • AFX_STATICDRAW_H__8DCC3165_D42E_4FAA_BCCF_F4328685535E__INCLUDED_ : PseudoDraw.h
  • AFX_STATUSDLG_H__5EEE9989_6C76_4FD3_83FC_2D90DEA0CE21__INCLUDED_ : StatusDlg.h
  • AFX_STDAFX_H__D2D77DCA_8299_11D1_8949_444553540000__INCLUDED_ : StdAfx.h
  • AFX_STDAFX_H__EDF5958A_92F6_11D3_9365_00C0F00AE104__INCLUDED_ : StdAfx.h
  • AFX_STDAFX_H__F235A078_2921_11D3_8733_000000000000__INCLUDED_ : StdAfx.h
  • AFX_TAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : TagDlg.h
  • AFX_TEMPLATEDLG_H__FB71138C_D374_42EE_88E8_59890D6DEDE2__INCLUDED_ : TemplateDlg.h
  • AFX_UPDATEDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_ : UpdateDlg.h
  • AFX_WINCVS_H__D2D77DC7_8299_11D1_8949_444553540000__INCLUDED_ : wincvs.h
  • AFX_WINCVSBROWSER_H__144A4971_CAB4_11D1_BC80_000000000000__INCLUDED_ : WinCvsBrowser.h
  • AFX_WINCVSDOC_H__D2D77DCE_8299_11D1_8949_444553540000__INCLUDED_ : wincvsDoc.h
  • AFX_WINCVSVIEW_H__D2D77DD0_8299_11D1_8949_444553540000__INCLUDED_ : wincvsView.h
  • ALT_STROKE : umenu.cpp
  • ANSI_SGM_BC_BLK : CTCP2Parse.cpp
  • ANSI_SGM_BC_BLU : CTCP2Parse.cpp
  • ANSI_SGM_BC_CYN : CTCP2Parse.cpp
  • ANSI_SGM_BC_DEFAULT : CTCP2Parse.cpp
  • ANSI_SGM_BC_GRN : CTCP2Parse.cpp
  • ANSI_SGM_BC_MAG : CTCP2Parse.cpp
  • ANSI_SGM_BC_RED : CTCP2Parse.cpp
  • ANSI_SGM_BC_WHT : CTCP2Parse.cpp
  • ANSI_SGM_BC_YEL : CTCP2Parse.cpp
  • ANSI_SGM_FC_BLK : CTCP2Parse.cpp
  • ANSI_SGM_FC_BLU : CTCP2Parse.cpp
  • ANSI_SGM_FC_CYN : CTCP2Parse.cpp
  • ANSI_SGM_FC_DEFAULT : CTCP2Parse.cpp
  • ANSI_SGM_FC_GRN : CTCP2Parse.cpp
  • ANSI_SGM_FC_MAG : CTCP2Parse.cpp
  • ANSI_SGM_FC_RED : CTCP2Parse.cpp
  • ANSI_SGM_FC_WHT : CTCP2Parse.cpp
  • ANSI_SGM_FC_YEL : CTCP2Parse.cpp
  • ANSI_SGM_TA_BLINK : CTCP2Parse.cpp
  • ANSI_SGM_TA_BLINK_OFF : CTCP2Parse.cpp
  • ANSI_SGM_TA_BOLD : CTCP2Parse.cpp
  • ANSI_SGM_TA_CONSEAL : CTCP2Parse.cpp
  • ANSI_SGM_TA_FAINT : CTCP2Parse.cpp
  • ANSI_SGM_TA_ITALIC : CTCP2Parse.cpp
  • ANSI_SGM_TA_ITALIC_OFF : CTCP2Parse.cpp
  • ANSI_SGM_TA_NORMAL : CTCP2Parse.cpp
  • ANSI_SGM_TA_RESET : CTCP2Parse.cpp
  • ANSI_SGM_TA_REV : CTCP2Parse.cpp
  • ANSI_SGM_TA_REV_OFF : CTCP2Parse.cpp
  • ANSI_SGM_TA_ULINE : CTCP2Parse.cpp
  • ANSI_SGM_TA_ULINE_OFF : CTCP2Parse.cpp
  • AppendMenu : CJMenu.h
  • AppendODMenu : CJMenu.h
  • AppendODPopupMenu : CJMenu.h
  • ATTRIBUTES : ndir.c
  • AUTO_INITALIZE : dll_garbage.c
  • AUTOCOMPLETE_DEFFLAGS : wincvs_winutil.h

- b -

  • BFT_BITMAP : dib.h
  • BLOCK_UPDATE_UI : UCvsFrame.cpp
  • BM_ALLOC : dib.h
  • BM_FREE : dib.h
  • BUTTONTITLE_CANCEL : CvsAlert.h
  • BUTTONTITLE_CONTINUE : CvsAlert.h
  • BUTTONTITLE_DELETE : CvsAlert.h
  • BUTTONTITLE_NO : CvsAlert.h
  • BUTTONTITLE_OK : CvsAlert.h
  • BUTTONTITLE_YES : CvsAlert.h

- c -

  • calloc : dll_garbage.h
  • CBOLD : CTCP2Parse.cpp
  • CBrowseFileView : UCvsFiles.cpp
  • CCOLOR : CTCP2Parse.cpp
  • CCTCP2 : CTCP2Parse.cpp
  • CG_IDP_FILE_CORRUPT : resource.h
  • CG_IDS_DIDYOUKNOW : resource.h
  • CG_IDS_FILE_ABSENT : resource.h
  • CG_IDS_TIPOFTHEDAY : resource.h
  • CG_IDS_TIPOFTHEDAYHELP : resource.h
  • CG_IDS_TIPOFTHEDAYMENU : resource.h
  • CHR_FILEDETAILVIEW_COLUMN_DATASEP : BrowseFileView.h
  • CHR_KEYWORD_QUOTE : CvsRootDlg.cpp
  • CHR_KEYWORD_TOKEN_SEPARATOR : CvsRootDlg.cpp
  • CHR_PROTOCOL_TOKEN_SEPARATOR : CvsRootDlg.cpp
  • CHR_ROOT_TOKEN_SEPARATOR : CvsRootDlg.cpp
  • CM_ONPUSHPINBUTTON : CJCaptionPopupWnd.h
  • CM_ONPUSHPINCANCEL : CJCaptionPopupWnd.h
  • COLOR_BLACK : CJControlBar.cpp
  • COLOR_WHITE : CJControlBar.cpp
  • CompatCallLibrary1 : dll_loader.h
  • CompatCallLibrary2 : dll_loader.h
  • CompatCallLibrary3 : dll_loader.h
  • CompatFuncArg : dll_loader.h
  • CP_MODE_BK : CJColorPicker.h
  • CP_MODE_TEXT : CJColorPicker.h
  • CPN_CLOSEUP : CJColorPopup.h
  • CPN_DROPDOWN : CJColorPopup.h
  • CPN_SELCHANGE : CJColorPopup.h
  • CPN_SELENDCANCEL : CJColorPopup.h
  • CPN_SELENDOK : CJColorPopup.h
  • CPStr : ustr.h
  • CREV : CTCP2Parse.cpp
  • CSTOP : CTCP2Parse.cpp
  • CStr : ustr.h
  • CTCP2_TOGGLE : CTCP2Parse.cpp
  • CTRL_STROKE : umenu.cpp
  • CTRLALT_STROKE : umenu.cpp
  • CUNDR : CTCP2Parse.cpp
  • CUSTOM_BOX_VALUE : CJColorPopup.cpp
  • CVS_CMD : CvsArgs.h
  • CVS_EXTERN_C : AppGlue.cpp
  • CX_BORDER : GfxSplitterWnd.cpp
  • CX_BORDER_GRIPPER : CJToolBarBase.cpp
  • CX_GRIPPER : CJToolBarBase.cpp
  • CX_OVERLAP : CJToolBar.cpp
  • CY_BORDER : GfxSplitterWnd.cpp
  • CY_BORDER_GRIPPER : CJToolBarBase.cpp
  • CY_GRIPPER : CJToolBarBase.cpp

- d -

  • DEC_GLUE : TclGlue.cpp, PythonGlue.impl.h
  • DECLC : TclGlue.cpp
  • DEF_CVS_CMD : LineCmd.h
  • DEFAULT_ALERT_TITLE : CvsAlert.cpp
  • DEFAULT_BOX_VALUE : CJColorPopup.cpp
  • DEFAULT_FILTERCHANGETIMEOUT : SortHeaderCtrl.cpp
  • DEFAULT_MATCH_ENTRIES_CASE : CvsPrefs.cpp
  • DIB_HEADER_MARKER : dib.h
  • DIRTY_MCP_SUPPORT : CvsPrefs.h

- e -

  • EGCS_CONST : ustr.h
  • ENABLE_WINCVSDEBUG : WinCvsDebug.h
  • END_UPDATE_UI : UCvsFrame.cpp
  • ENTRY_CMDLINE_DESC_FORMAT : MultilineEntryDlg.cpp
  • ENTRY_DESCRIPTION_DESC_FORMAT : MultilineEntryDlg.cpp
  • ENTRY_LOGMESSAGE_DESC_FORMAT : MultilineEntryDlg.cpp
  • ENTRY_STATE_DESC_FORMAT : MultilineEntryDlg.cpp
  • errInternal : AppGlue.h
  • errNoCvsguiProtocol : AppGlue.h
  • errThreadRunning : AppGlue.h
  • ev_msg : umain.h
  • exit : dll_glue.h

- f -

  • FILTER_ALL : PromptFiles.cpp
  • FILTER_DLL : PromptFiles.cpp
  • FILTER_END : PromptFiles.cpp
  • FILTER_EXECUTABLE : PromptFiles.cpp
  • FILTER_SEPARATOR : PromptFiles.cpp
  • FILTER_TOKEN_SEPARATORS : BrowseViewModel.h
  • FNM_NOESCAPE : fnmatch.h
  • FNM_NOMATCH : fnmatch.h
  • FNM_PATHNAME : fnmatch.h
  • FNM_PERIOD : fnmatch.h
  • FOLD_FN_CHAR : fnmatch.h
  • free : dll_garbage.h
  • fstat : StdAfx.h
  • FTS_BOTTOM : CJFlatTabCtrl.h
  • FTS_HASARROWS : CJFlatTabCtrl.h
  • FTS_HASHOMEEND : CJFlatTabCtrl.h

- g -

  • GAP : CJMenu.cpp
  • GARBY_DEF_ALLOC : dll_garbage.c
  • GARBY_DEF_POOL : dll_garbage.c
  • garbyAlloc : dll_garbage.c
  • garbyFree : dll_garbage.c
  • garbyRealloc : dll_garbage.c
  • getenv : dll_glue.h
  • GETITEM_BUFFER_SIZE : SortHeaderCtrl.cpp
  • GLUE_WRAP : TclGlue.cpp, PythonGlue.impl.h
  • GRIP_INTRASPACING : CJControlBar.cpp
  • GRIP_SIZE : CJControlBar.cpp
  • GRIP_START : CJControlBar.cpp

- h -

  • HALF_SECOND : CJDateTimeCtrl.cpp
  • HISTLOC_IMAGE_CX : HistComboBoxEx.h
  • HISTLOC_VISIBLEITEMS : HistComboBoxEx.h
  • HORZF : CJDockContext.cpp

- i -

  • ID_ACCEL32911 : resource.h
  • ID_ADDBF : resource.h
  • ID_APP_CMDLINE : resource.h
  • ID_APP_COPYRIGHTS : resource.h
  • ID_APP_CREDITS : resource.h
  • ID_APP_LOGIN : resource.h
  • ID_APP_LOGOUT : resource.h
  • ID_APP_PREFERENCES : resource.h
  • ID_APP_RTAGBRANCH : resource.h
  • ID_APP_RTAGCREATE : resource.h
  • ID_APP_RTAGDELETE : resource.h
  • ID_BROWSER_OPEN : resource.h
  • ID_BUTTON32918 : resource.h
  • ID_BUTTON32919 : resource.h
  • ID_BUTTON32920 : resource.h
  • ID_BUTTON32921 : resource.h
  • ID_BUTTON32940 : resource.h
  • ID_CANCEL_EDIT_CNTR : resource.h
  • ID_COMMITBF : resource.h
  • ID_CUST_FILES_MENU : resource.h
  • ID_CUST_FOLDER_MENU : resource.h
  • ID_FILTERMASK : resource.h
  • ID_GFX_LARGEICON : CJResource.h
  • ID_GFX_REMOVEITEM : CJResource.h
  • ID_GFX_RENAMEITEM : CJResource.h
  • ID_GFX_SMALLICON : CJResource.h
  • ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE : resource.h
  • ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION : resource.h
  • ID_GRAPH_ADMINOPTIONS_SETSTATE : resource.h
  • ID_GRAPH_CLOSE : resource.h
  • ID_GRAPH_GRAPHOPTIONS : resource.h
  • ID_HELP_CVS : resource.h
  • ID_HISTORYBROWSE : resource.h
  • ID_MACRO_ADMIN : resource.h
  • ID_MACRO_END : resource.h
  • ID_MACRO_SEL : resource.h
  • ID_MACRO_START : resource.h
  • ID_MENUBAR : resource.h
  • ID_MENUITEM32840 : resource.h
  • ID_POPUP_CUSTOMIZE : CJResource.h
  • ID_QUERY_ANNOTATE : resource.h
  • ID_QUERY_PROPERTIES : resource.h
  • ID_QUERY_SHELLACTION_DEFAULT : resource.h
  • ID_SAVESETTINGS : resource.h
  • ID_STOPCVS : resource.h
  • ID_UPDATEBF : resource.h
  • ID_USE_PYSHELL : resource.h
  • ID_USE_TCLSHELL : resource.h
  • ID_VIEW_ADD : resource.h
  • ID_VIEW_ADDB : resource.h
  • ID_VIEW_ADDED : resource.h
  • ID_VIEW_ADDU : resource.h
  • ID_VIEW_BROWSELOCATION_REMOVEUNWANTED : resource.h
  • ID_VIEW_BROWSER_BAR : resource.h
  • ID_VIEW_CHANGED : resource.h
  • ID_VIEW_CHECKOUT : resource.h
  • ID_VIEW_CLEARALL : resource.h
  • ID_VIEW_COMMIT : resource.h
  • ID_VIEW_CONFLICT : resource.h
  • ID_VIEW_CONSOLE_BAR : resource.h
  • ID_VIEW_DELREV : resource.h
  • ID_VIEW_DIFF : resource.h
  • ID_VIEW_EDIT : resource.h
  • ID_VIEW_EDITORS : resource.h
  • ID_VIEW_EDITSEL : resource.h
  • ID_VIEW_EDITSELDEF : resource.h
  • ID_VIEW_EXPLORE : resource.h
  • ID_VIEW_FILES_BAR : resource.h
  • ID_VIEW_FILTER_BAR : resource.h
  • ID_VIEW_FILTERBAR_CLEARALL : resource.h
  • ID_VIEW_FILTERBAR_ENABLE : resource.h
  • ID_VIEW_FILTERBAR_OPTIONS : resource.h
  • ID_VIEW_FORCEEDIT : resource.h
  • ID_VIEW_FULLLIST : resource.h
  • ID_VIEW_GRAPH : resource.h
  • ID_VIEW_HIDEMISSING : resource.h
  • ID_VIEW_HIDEUNKNOWN : resource.h
  • ID_VIEW_IGNORE : resource.h
  • ID_VIEW_IMPORT : resource.h
  • ID_VIEW_INIT : resource.h
  • ID_VIEW_LOCKF : resource.h
  • ID_VIEW_LOG : resource.h
  • ID_VIEW_MISSING : resource.h
  • ID_VIEW_MODIFIED : resource.h
  • ID_VIEW_MULTI_BAR : resource.h
  • ID_VIEW_NEWINSTANCE : resource.h
  • ID_VIEW_OPENSEL : resource.h
  • ID_VIEW_OPENSELAS : resource.h
  • ID_VIEW_QUERYUPDATE : resource.h
  • ID_VIEW_RECURSIVE : resource.h
  • ID_VIEW_RELEASE : resource.h
  • ID_VIEW_RELOAD : resource.h
  • ID_VIEW_REMOVED : resource.h
  • ID_VIEW_RESERVEDEDIT : resource.h
  • ID_VIEW_RETRIEVE : resource.h
  • ID_VIEW_RETRIEVEAS : resource.h
  • ID_VIEW_RMV : resource.h
  • ID_VIEW_ROWDETAILS : resource.h
  • ID_VIEW_SELNONSIG : resource.h
  • ID_VIEW_SMALLICONS : resource.h
  • ID_VIEW_STATUS : resource.h
  • ID_VIEW_TAG : resource.h
  • ID_VIEW_TAGBRANCH : resource.h
  • ID_VIEW_TAGDELETE : resource.h
  • ID_VIEW_TAGNEW : resource.h
  • ID_VIEW_TAGS_BAR : resource.h
  • ID_VIEW_TRASH : resource.h
  • ID_VIEW_UNEDIT : resource.h
  • ID_VIEW_UNKNOWN : resource.h
  • ID_VIEW_UNLOCKF : resource.h
  • ID_VIEW_UPDATE : resource.h
  • ID_VIEW_UPONE : resource.h
  • ID_VIEW_WATCHERS : resource.h
  • ID_VIEW_WATCHOFF : resource.h
  • ID_VIEW_WATCHON : resource.h
  • ID_VIEW_WORKSPACE : resource.h
  • ID_VIEWW_INIT : resource.h
  • IDB_ABOUT : resource.h
  • IDB_BTN_ARROW : CJResource.h
  • IDB_BTN_EXPLORER : CJResource.h
  • IDB_BUTTON_IMAGES : CJResource.h
  • IDB_HISTLOC : resource.h
  • IDB_IDLE : resource.h
  • IDB_IMPORT : resource.h
  • IDB_LIGHTBULB : resource.h
  • IDB_LOCATE : resource.h
  • IDB_MODULES : resource.h
  • IDB_PUSHPIN : CJResource.h
  • IDB_PYTHON : resource.h
  • IDB_SMALLICONS : resource.h
  • IDB_SPLASH : resource.h
  • IDC_ACTION : resource.h
  • IDC_ACTION_DESC : resource.h
  • IDC_ADD : resource.h
  • IDC_ADD_DEFAULT : resource.h
  • IDC_ADD_SELECTION : resource.h
  • IDC_ALERT_MESSAGE : resource.h
  • IDC_ALLCMDS : resource.h
  • IDC_ALTERNATE_CVS : resource.h
  • IDC_ALTERNATE_SETTINGS : resource.h
  • IDC_ALWAYSROOT : resource.h
  • IDC_APPLY : resource.h
  • IDC_ATTIC : resource.h
  • IDC_AUTO_LOGOUT : resource.h
  • IDC_AUTO_LOGOUT_TIME : resource.h
  • IDC_AUTO_REFRESH : resource.h
  • IDC_BAR_BUTTON : CJResource.h
  • IDC_BAR_CAPTION : CJResource.h
  • IDC_BAR_TREE : resource.h
  • IDC_BRANCHID : resource.h
  • IDC_BRANCHPOINT_MERGE : resource.h
  • IDC_BROWSE_ALTERNATE_SETTINGS : resource.h
  • IDC_BROWSE_BRANCHID : resource.h
  • IDC_BROWSE_CVSROOT : resource.h
  • IDC_BROWSE_DIFFOPTIONS : resource.h
  • IDC_BROWSE_EXTERNAL_DIFF : resource.h
  • IDC_BROWSE_EXTERNAL_EDITOR : resource.h
  • IDC_BROWSE_FILENAME : resource.h
  • IDC_BROWSE_MODNAME : resource.h
  • IDC_BROWSE_PATH : resource.h
  • IDC_BROWSE_PYTHONDLL : resource.h
  • IDC_BROWSE_READ_FROM : resource.h
  • IDC_BROWSE_SELECTION : resource.h
  • IDC_BROWSE_TAG : resource.h
  • IDC_BROWSE_TAG1 : resource.h
  • IDC_BROWSE_TAG2 : resource.h
  • IDC_BROWSE_TCLDLL : resource.h
  • IDC_BULB : resource.h
  • IDC_BUTTON_HIDE : CJResource.h
  • IDC_BUTTON_MINI : CJResource.h
  • IDC_CAPT_BUTTON : CJResource.h
  • IDC_CASE_SENSITIVE_NAMES : resource.h
  • IDC_CHECK_UNMODIFIED : resource.h
  • IDC_CHECK_VALID_EDITS : resource.h
  • IDC_CHECKOUT_DIR : resource.h
  • IDC_CHECKOUT_READ_ONLY : resource.h
  • IDC_CLEAR_KEYWORD : resource.h
  • IDC_COLOR_BRANCH : resource.h
  • IDC_COLOR_DEAD : resource.h
  • IDC_COLOR_HEADER : resource.h
  • IDC_COLOR_MERGE : resource.h
  • IDC_COLOR_NODE : resource.h
  • IDC_COLOR_SELECTION : resource.h
  • IDC_COLOR_SHADOW : resource.h
  • IDC_COLOR_STATE : resource.h
  • IDC_COLOR_TAG : resource.h
  • IDC_COMPARE_TYPE : resource.h
  • IDC_COMPRESSION : resource.h
  • IDC_CONFLICT_DESC : resource.h
  • IDC_CONSOLE : resource.h
  • IDC_CONTROL_ADDED_FILES : resource.h
  • IDC_COPY_SETTINGS : resource.h
  • IDC_COPY_SETTINGS_NAME : resource.h
  • IDC_CREATE_MISSING_DIR : resource.h
  • IDC_CREATE_SANDBOX : resource.h
  • IDC_CTRL_PRESSED_ON_OK : resource.h
  • IDC_CURRENT_DIFF_OPTIONS : resource.h
  • IDC_CUSTOMIZE_BAR : CJToolBar.cpp
  • IDC_CVSGUISFURL : resource.h
  • IDC_CVSROOT : resource.h
  • IDC_DATE : resource.h
  • IDC_DATE1 : resource.h
  • IDC_DATE2 : resource.h
  • IDC_DEFAULT_BRANCH : resource.h
  • IDC_DEFAULT_CVSIGNORE : resource.h
  • IDC_DELETE_ALL_FILES : resource.h
  • IDC_DELETE_CVS_INFO : resource.h
  • IDC_DELETE_DIRECTORY : resource.h
  • IDC_DIFF : resource.h
  • IDC_DIFF_OPTION_DESCRIPTION : resource.h
  • IDC_DIFF_OPTION_LIST : resource.h
  • IDC_DIFFOPTIONS : resource.h
  • IDC_DONT_SHORTEN_PATHS : resource.h
  • IDC_DOWN : resource.h
  • IDC_DRAGGING : CJResource.h
  • IDC_EDIT_KEYWORD : resource.h
  • IDC_ENCRYPTION : resource.h
  • IDC_ENDBUTTON : CJResource.h
  • IDC_ENTRIES_LIST : resource.h
  • IDC_ENTRY : resource.h
  • IDC_ENTRY_EDIT : resource.h
  • IDC_ENTRYSTATE_FORCE_BINARY : resource.h
  • IDC_ENTRYSTATE_FORCE_TEXT : resource.h
  • IDC_ENTRYSTATE_FORCE_UNICODE : resource.h
  • IDC_ENTRYSTATE_IGNORE : resource.h
  • IDC_ENTRYSTATE_NO_CHANGE : resource.h
  • IDC_ENTRYSTATE_NO_EXPANSION : resource.h
  • IDC_EXPORT : resource.h
  • IDC_EXTERNAL_DIFF : resource.h
  • IDC_EXTERNAL_EDITOR : resource.h
  • IDC_FILENAME : resource.h
  • IDC_FILEPATH : resource.h
  • IDC_FILES_MODIFICATION_TIME : resource.h
  • IDC_FILETODIFF : resource.h
  • IDC_FILTER : resource.h
  • IDC_FILTER_CONTENTS : resource.h
  • IDC_FORCE_COMMIT : resource.h
  • IDC_FORCE_CVSROOT : resource.h
  • IDC_FORCE_HEAD_REV : resource.h
  • IDC_FORCE_KEY_CTRL : resource.h
  • IDC_FORCE_KEY_SHIFT : resource.h
  • IDC_FORCE_RECURSE : resource.h
  • IDC_FORCE_REVISION : resource.h
  • IDC_GET_CLEAN_COPY : resource.h
  • IDC_GROUP_OPTIONS : resource.h
  • IDC_GRPBOX_TEXT : resource.h
  • IDC_HANDCUR : CJResource.h
  • IDC_HAS_ALTERNATE_CVS : resource.h
  • IDC_HAS_ALTERNATE_SETTINGS : resource.h
  • IDC_HAS_BRANCHID : resource.h
  • IDC_HAS_COMPRESSION : resource.h
  • IDC_HAS_DATE : resource.h
  • IDC_HAS_DATE1 : resource.h
  • IDC_HAS_DATE2 : resource.h
  • IDC_HAS_EXTERNAL_DIFF : resource.h
  • IDC_HAS_PATH : resource.h
  • IDC_HAS_REV : resource.h
  • IDC_HAS_STATES : resource.h
  • IDC_HAS_USERS : resource.h
  • IDC_HEADERS : resource.h
  • IDC_HEADERS_DESC : resource.h
  • IDC_HELP_INIT : resource.h
  • IDC_HELPLOGIN : resource.h
  • IDC_HOME : resource.h
  • IDC_HOMEBUTTON : CJResource.h
  • IDC_HSPLITBAR : CJResource.h
  • IDC_ICON_STATIC : resource.h
  • IDC_IGNORECASE : resource.h
  • IDC_IGNOREWHITESPACE : resource.h
  • IDC_IMPORT_FILTER : resource.h
  • IDC_ISDATE : resource.h
  • IDC_ISDATE1 : resource.h
  • IDC_ISDATE2 : resource.h
  • IDC_ITEM : resource.h
  • IDC_ITEM_LABEL : resource.h
  • IDC_ITEM_LIST : resource.h
  • IDC_ITEM_LIST_OPTION : resource.h
  • IDC_KEYWORD_DESC : resource.h
  • IDC_KEYWORD_DESCRIPTION : resource.h
  • IDC_KEYWORD_OPT : resource.h
  • IDC_KEYWORD_VALUE : resource.h
  • IDC_KEYWORDLIST : resource.h
  • IDC_KEYWORDLIST_DESC : resource.h
  • IDC_LAST_CHECKIN_TIME : resource.h
  • IDC_LEFTBUTTON : CJResource.h
  • IDC_MATCH_ENTRIES_CASE : resource.h
  • IDC_MENULIST : resource.h
  • IDC_MERGE_TYPE : resource.h
  • IDC_MESSAGE_DETAILS : resource.h
  • IDC_MODNAME : resource.h
  • IDC_MODULEDESC_TEXT : resource.h
  • IDC_MOVDEL_BRANCH : resource.h
  • IDC_MULTILINE_ACTION : resource.h
  • IDC_MULTILINE_ENTRY : resource.h
  • IDC_MULTILINE_ENTRY_STATIC : resource.h
  • IDC_MULTILINE_ENTRY_WRAP : resource.h
  • IDC_MULTILINE_GO_ACTION : resource.h
  • IDC_MULTILINE_POSITION : resource.h
  • IDC_MULTILINE_PREV_ENTRY : resource.h
  • IDC_MULTILINE_TYPE : resource.h
  • IDC_MULTILINE_WORDWRAP : resource.h
  • IDC_NEXTTIP : resource.h
  • IDC_NO_MODULE_PROGRAM : resource.h
  • IDC_NO_SPLASH_SCREEN : resource.h
  • IDC_NO_VENDOR_RELEASE_TAGS : resource.h
  • IDC_NODRAGGING : CJResource.h
  • IDC_NORECURS : resource.h
  • IDC_NOTAGS : resource.h
  • IDC_OPTIONCHECK_BUTTON : resource.h
  • IDC_OTHER_BUTTON : resource.h
  • IDC_OUTPUT_QUICK : resource.h
  • IDC_OUTPUT_STANDARD : resource.h
  • IDC_OUTPUT_VERBOSE : resource.h
  • IDC_OVERRIDE_CHECKOUT_DIR : resource.h
  • IDC_OVERWRITE : resource.h
  • IDC_OVERWRITE_RELEASE_TAGS : resource.h
  • IDC_PASSWORD : resource.h
  • IDC_PATH : resource.h
  • IDC_PREVIEW_CVSROOT : resource.h
  • IDC_PREVIEWINFO : resource.h
  • IDC_PROGRESS : resource.h
  • IDC_PROGRESS_TEXT : resource.h
  • IDC_PROMPTEDIT : resource.h
  • IDC_PROTOCOL : resource.h
  • IDC_PROTOCOL_DESC : resource.h
  • IDC_PROTOCOL_KEYWORD : resource.h
  • IDC_PRUNE_EMPTY_DIR : resource.h
  • IDC_PYTHON_URL : resource.h
  • IDC_PYTHONDLL : resource.h
  • IDC_QUIET : resource.h
  • IDC_RANGE_DATE : resource.h
  • IDC_RANGE_REV_TAG : resource.h
  • IDC_RCS_FILENAMES_ONLY : resource.h
  • IDC_REACTION_SPEED : resource.h
  • IDC_REACTION_SPEED_SECONDS : resource.h
  • IDC_REACTION_SPEED_SPIN : resource.h
  • IDC_READ_FROM : resource.h
  • IDC_REFRESH_ITEMS : resource.h
  • IDC_RELEASE_TAG : resource.h
  • IDC_REMIND : resource.h
  • IDC_REMOVE : resource.h
  • IDC_REPOSITORY_PATH : resource.h
  • IDC_RESET_COLORS : resource.h
  • IDC_RESET_STICKY : resource.h
  • IDC_REV_TAG : resource.h
  • IDC_REV_TAG1 : resource.h
  • IDC_REV_TAG2 : resource.h
  • IDC_REV_TAG_DATE : resource.h
  • IDC_REVISION : resource.h
  • IDC_REVISION_SPIN : resource.h
  • IDC_RGB_BRANCH : resource.h
  • IDC_RGB_DEAD : resource.h
  • IDC_RGB_HEADER : resource.h
  • IDC_RGB_MERGE : resource.h
  • IDC_RGB_NODE : resource.h
  • IDC_RGB_SELECTION : resource.h
  • IDC_RGB_SHADOW : resource.h
  • IDC_RGB_STATE : resource.h
  • IDC_RGB_TAG : resource.h
  • IDC_RIGHTBUTTON : CJResource.h
  • IDC_SAME_ACTION_NEXT_TIME : resource.h
  • IDC_SELECTION : resource.h
  • IDC_SELECTION_LIST : resource.h
  • IDC_SETTINGS_NAME : resource.h
  • IDC_SHOW_CVS_METHOD : resource.h
  • IDC_SKIP_ANNOTATE : resource.h
  • IDC_SKIP_DIFF : resource.h
  • IDC_SKIP_FILEACTION : resource.h
  • IDC_SKIP_GRAPH : resource.h
  • IDC_SKIP_LOG : resource.h
  • IDC_SKIP_STATUS : resource.h
  • IDC_SKIP_UPDATE : resource.h
  • IDC_SPIN_AUTO_LOGOUT_TIME : resource.h
  • IDC_SPIN_COMPRESSION : resource.h
  • IDC_STARTUP : resource.h
  • IDC_STATES : resource.h
  • IDC_STATIC_CURRENTOPTIONS : resource.h
  • IDC_STATIC_OPTDESC : resource.h
  • IDC_STATICGROUP_SELECTOPTIONS : resource.h
  • IDC_STDOUT : resource.h
  • IDC_SUPRESS_HEADER : resource.h
  • IDC_TAB_CONTROL : CJResource.h
  • IDC_TAGDESC_TEXT : resource.h
  • IDC_TAGNAME : resource.h
  • IDC_TCLDLL : resource.h
  • IDC_TEMPFILE : resource.h
  • IDC_TEMPLATE_LIST : resource.h
  • IDC_TEMPLATE_PREVIEW : resource.h
  • IDC_THREE_WAY_CONFLICTS : resource.h
  • IDC_TIPSTRING : resource.h
  • IDC_UNIFIEDDIFF : resource.h
  • IDC_UNIX_LF : resource.h
  • IDC_UP : resource.h
  • IDC_URL_CODEJOCKEY : CJResource.h
  • IDC_USE_EXTERNAL_DIFF : resource.h
  • IDC_USERS : resource.h
  • IDC_VENDOR_TAG : resource.h
  • IDC_VSPLITBAR : CJResource.h
  • IDC_WARNING_DESC : resource.h
  • IDC_WINCVSURL : resource.h
  • IDC_WINCVSVER : resource.h
  • IDD_ABOUTBOX : resource.h
  • IDD_ADMINOPTION : resource.h
  • IDD_ALERT : resource.h
  • IDD_ANNOTATE_MAIN : resource.h
  • IDD_CHECKOUT_MAIN : resource.h
  • IDD_CMDLINE_MAIN : resource.h
  • IDD_COMMIT_MAIN : resource.h
  • IDD_COMMIT_OPTIONS : resource.h
  • IDD_CUSTOMIZE : resource.h
  • IDD_CVSROOT : resource.h
  • IDD_CVSTEMPLATE : resource.h
  • IDD_DIFF_MAIN : resource.h
  • IDD_DIFF_OPTIONS : resource.h
  • IDD_EDITKEYWORD : resource.h
  • IDD_EDITMESSAGE : resource.h
  • IDD_EDITORMON : resource.h
  • IDD_ENTRYDESC : resource.h
  • IDD_FILTER_SELECTION : resource.h
  • IDD_FILTERBAR_OPTIONS : resource.h
  • IDD_GRAPH_OPTIONS : resource.h
  • IDD_IMPORT_MAIN : resource.h
  • IDD_IMPORT_OPTIONS : resource.h
  • IDD_IMPORTFILTER : resource.h
  • IDD_INIT_MAIN : resource.h
  • IDD_ITEM_LIST : resource.h
  • IDD_LOG_FILTERS : resource.h
  • IDD_LOG_MAIN : resource.h
  • IDD_LOGIN_MAIN : resource.h
  • IDD_MULTILINE_ENTRY : resource.h
  • IDD_NOPYTHON : resource.h
  • IDD_OPEN_MAIN : resource.h
  • IDD_PASSWRD : resource.h
  • IDD_PREFS_CVS : resource.h
  • IDD_PREFS_CVSCMD_DIALOGS : resource.h
  • IDD_PREFS_GLOBALS : resource.h
  • IDD_PREFS_WINCVS : resource.h
  • IDD_PROGRESS : resource.h
  • IDD_RELEASE_MAIN : resource.h
  • IDD_RTAG_MAIN : resource.h
  • IDD_RTAG_OPTIONS : resource.h
  • IDD_SAVESETTINGS : resource.h
  • IDD_SELECTION_DETAILS : resource.h
  • IDD_STATUS_MAIN : resource.h
  • IDD_TAG_MAIN : resource.h
  • IDD_TIP : resource.h
  • IDD_UPDATE_MAIN : resource.h
  • IDD_UPDATE_MERGE : resource.h
  • IDD_UPDATE_OPTIONS : resource.h
  • IDD_WARNINGDESC : resource.h
  • IDH_ID_ACCEL32911 : wincvs.h
  • IDH_ID_ADDBF : wincvs.h
  • IDH_ID_APP_CMDLINE : wincvs.h
  • IDH_ID_APP_COPYRIGHTS : wincvs.h
  • IDH_ID_APP_CREDITS : wincvs.h
  • IDH_ID_APP_LOGIN : wincvs.h
  • IDH_ID_APP_LOGOUT : wincvs.h
  • IDH_ID_APP_PREFERENCES : wincvs.h
  • IDH_ID_APP_RTAGBRANCH : wincvs.h
  • IDH_ID_APP_RTAGCREATE : wincvs.h
  • IDH_ID_APP_RTAGDELETE : wincvs.h
  • IDH_ID_BROWSER_OPEN : wincvs.h
  • IDH_ID_BUTTON32918 : wincvs.h
  • IDH_ID_BUTTON32919 : wincvs.h
  • IDH_ID_BUTTON32920 : wincvs.h
  • IDH_ID_BUTTON32921 : wincvs.h
  • IDH_ID_BUTTON32940 : wincvs.h
  • IDH_ID_CANCEL_EDIT_CNTR : wincvs.h
  • IDH_ID_COMMITBF : wincvs.h
  • IDH_ID_CUST_FILES_MENU : wincvs.h
  • IDH_ID_CUST_FOLDER_MENU : wincvs.h
  • IDH_ID_FILTERMASK : wincvs.h
  • IDH_ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE : wincvs.h
  • IDH_ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION : wincvs.h
  • IDH_ID_GRAPH_ADMINOPTIONS_SETSTATE : wincvs.h
  • IDH_ID_GRAPH_CLOSE : wincvs.h
  • IDH_ID_GRAPH_GRAPHOPTIONS : wincvs.h
  • IDH_ID_HELP_CVS : wincvs.h
  • IDH_ID_HISTORYBROWSE : wincvs.h
  • IDH_ID_MACRO_ADMIN : wincvs.h
  • IDH_ID_MACRO_END : wincvs.h
  • IDH_ID_MACRO_SEL : wincvs.h
  • IDH_ID_MACRO_START : wincvs.h
  • IDH_ID_MENUBAR : wincvs.h
  • IDH_ID_MENUITEM32840 : wincvs.h
  • IDH_ID_QUERY_ANNOTATE : wincvs.h
  • IDH_ID_QUERY_PROPERTIES : wincvs.h
  • IDH_ID_QUERY_SHELLACTION_DEFAULT : wincvs.h
  • IDH_ID_SAVESETTINGS : wincvs.h
  • IDH_ID_STOPCVS : wincvs.h
  • IDH_ID_UPDATEBF : wincvs.h
  • IDH_ID_USE_PYSHELL : wincvs.h
  • IDH_ID_USE_TCLSHELL : wincvs.h
  • IDH_ID_VIEW_ADD : wincvs.h
  • IDH_ID_VIEW_ADDB : wincvs.h
  • IDH_ID_VIEW_ADDED : wincvs.h
  • IDH_ID_VIEW_ADDU : wincvs.h
  • IDH_ID_VIEW_BROWSELOCATION_REMOVEUNWANTED : wincvs.h
  • IDH_ID_VIEW_BROWSER_BAR : wincvs.h
  • IDH_ID_VIEW_CHANGED : wincvs.h
  • IDH_ID_VIEW_CHECKOUT : wincvs.h
  • IDH_ID_VIEW_CLEARALL : wincvs.h
  • IDH_ID_VIEW_COMMIT : wincvs.h
  • IDH_ID_VIEW_CONFLICT : wincvs.h
  • IDH_ID_VIEW_CONSOLE_BAR : wincvs.h
  • IDH_ID_VIEW_DELREV : wincvs.h
  • IDH_ID_VIEW_DIFF : wincvs.h
  • IDH_ID_VIEW_EDIT : wincvs.h
  • IDH_ID_VIEW_EDITORS : wincvs.h
  • IDH_ID_VIEW_EDITSEL : wincvs.h
  • IDH_ID_VIEW_EDITSELDEF : wincvs.h
  • IDH_ID_VIEW_EXPLORE : wincvs.h
  • IDH_ID_VIEW_FILES_BAR : wincvs.h
  • IDH_ID_VIEW_FILTER_BAR : wincvs.h
  • IDH_ID_VIEW_FILTERBAR_CLEARALL : wincvs.h
  • IDH_ID_VIEW_FILTERBAR_ENABLE : wincvs.h
  • IDH_ID_VIEW_FILTERBAR_OPTIONS : wincvs.h
  • IDH_ID_VIEW_FORCEEDIT : wincvs.h
  • IDH_ID_VIEW_FULLLIST : wincvs.h
  • IDH_ID_VIEW_GRAPH : wincvs.h
  • IDH_ID_VIEW_HIDEMISSING : wincvs.h
  • IDH_ID_VIEW_HIDEUNKNOWN : wincvs.h
  • IDH_ID_VIEW_IGNORE : wincvs.h
  • IDH_ID_VIEW_IMPORT : wincvs.h
  • IDH_ID_VIEW_INIT : wincvs.h
  • IDH_ID_VIEW_LOCKF : wincvs.h
  • IDH_ID_VIEW_LOG : wincvs.h
  • IDH_ID_VIEW_MISSING : wincvs.h
  • IDH_ID_VIEW_MODIFIED : wincvs.h
  • IDH_ID_VIEW_MULTI_BAR : wincvs.h
  • IDH_ID_VIEW_NEWINSTANCE : wincvs.h
  • IDH_ID_VIEW_OPENSEL : wincvs.h
  • IDH_ID_VIEW_OPENSELAS : wincvs.h
  • IDH_ID_VIEW_QUERYUPDATE : wincvs.h
  • IDH_ID_VIEW_RECURSIVE : wincvs.h
  • IDH_ID_VIEW_RELEASE : wincvs.h
  • IDH_ID_VIEW_RELOAD : wincvs.h
  • IDH_ID_VIEW_REMOVED : wincvs.h
  • IDH_ID_VIEW_RESERVEDEDIT : wincvs.h
  • IDH_ID_VIEW_RETRIEVE : wincvs.h
  • IDH_ID_VIEW_RETRIEVEAS : wincvs.h
  • IDH_ID_VIEW_RMV : wincvs.h
  • IDH_ID_VIEW_ROWDETAILS : wincvs.h
  • IDH_ID_VIEW_SELNONSIG : wincvs.h
  • IDH_ID_VIEW_SMALLICONS : wincvs.h
  • IDH_ID_VIEW_STATUS : wincvs.h
  • IDH_ID_VIEW_TAG : wincvs.h
  • IDH_ID_VIEW_TAGBRANCH : wincvs.h
  • IDH_ID_VIEW_TAGDELETE : wincvs.h
  • IDH_ID_VIEW_TAGNEW : wincvs.h
  • IDH_ID_VIEW_TAGS_BAR : wincvs.h
  • IDH_ID_VIEW_TRASH : wincvs.h
  • IDH_ID_VIEW_UNEDIT : wincvs.h
  • IDH_ID_VIEW_UNKNOWN : wincvs.h
  • IDH_ID_VIEW_UNLOCKF : wincvs.h
  • IDH_ID_VIEW_UPDATE : wincvs.h
  • IDH_ID_VIEW_UPONE : wincvs.h
  • IDH_ID_VIEW_WATCHERS : wincvs.h
  • IDH_ID_VIEW_WATCHOFF : wincvs.h
  • IDH_ID_VIEW_WATCHON : wincvs.h
  • IDH_ID_VIEW_WORKSPACE : wincvs.h
  • IDH_ID_VIEWW_INIT : wincvs.h
  • IDH_IDC_ACTION : wincvs.h
  • IDH_IDC_ACTION_DESC : wincvs.h
  • IDH_IDC_ADD : wincvs.h
  • IDH_IDC_ADD_DEFAULT : wincvs.h
  • IDH_IDC_ADD_SELECTION : wincvs.h
  • IDH_IDC_ALERT_MESSAGE : wincvs.h
  • IDH_IDC_ALLCMDS : wincvs.h
  • IDH_IDC_ALTERNATE_CVS : wincvs.h
  • IDH_IDC_ALTERNATE_SETTINGS : wincvs.h
  • IDH_IDC_ALWAYSROOT : wincvs.h
  • IDH_IDC_APPLY : wincvs.h
  • IDH_IDC_ATTIC : wincvs.h
  • IDH_IDC_AUTO_LOGOUT : wincvs.h
  • IDH_IDC_AUTO_LOGOUT_TIME : wincvs.h
  • IDH_IDC_AUTO_REFRESH : wincvs.h
  • IDH_IDC_BAR_TREE : wincvs.h
  • IDH_IDC_BRANCHID : wincvs.h
  • IDH_IDC_BRANCHPOINT_MERGE : wincvs.h
  • IDH_IDC_BROWSE_ALTERNATE_SETTINGS : wincvs.h
  • IDH_IDC_BROWSE_BRANCHID : wincvs.h
  • IDH_IDC_BROWSE_CVSROOT : wincvs.h
  • IDH_IDC_BROWSE_DIFFOPTIONS : wincvs.h
  • IDH_IDC_BROWSE_EXTERNAL_DIFF : wincvs.h
  • IDH_IDC_BROWSE_EXTERNAL_EDITOR : wincvs.h
  • IDH_IDC_BROWSE_FILENAME : wincvs.h
  • IDH_IDC_BROWSE_MODNAME : wincvs.h
  • IDH_IDC_BROWSE_PATH : wincvs.h
  • IDH_IDC_BROWSE_PYTHONDLL : wincvs.h
  • IDH_IDC_BROWSE_READ_FROM : wincvs.h
  • IDH_IDC_BROWSE_SELECTION : wincvs.h
  • IDH_IDC_BROWSE_TAG : wincvs.h
  • IDH_IDC_BROWSE_TAG1 : wincvs.h
  • IDH_IDC_BROWSE_TAG2 : wincvs.h
  • IDH_IDC_BROWSE_TCLDLL : wincvs.h
  • IDH_IDC_BULB : wincvs.h
  • IDH_IDC_CASE_SENSITIVE_NAMES : wincvs.h
  • IDH_IDC_CHECK_UNMODIFIED : wincvs.h
  • IDH_IDC_CHECK_VALID_EDITS : wincvs.h
  • IDH_IDC_CHECKOUT_DIR : wincvs.h
  • IDH_IDC_CHECKOUT_READ_ONLY : wincvs.h
  • IDH_IDC_CLEAR_KEYWORD : wincvs.h
  • IDH_IDC_COLOR_BRANCH : wincvs.h
  • IDH_IDC_COLOR_DEAD : wincvs.h
  • IDH_IDC_COLOR_HEADER : wincvs.h
  • IDH_IDC_COLOR_MERGE : wincvs.h
  • IDH_IDC_COLOR_NODE : wincvs.h
  • IDH_IDC_COLOR_SELECTION : wincvs.h
  • IDH_IDC_COLOR_SHADOW : wincvs.h
  • IDH_IDC_COLOR_STATE : wincvs.h
  • IDH_IDC_COLOR_TAG : wincvs.h
  • IDH_IDC_COMPARE_TYPE : wincvs.h
  • IDH_IDC_COMPRESSION : wincvs.h
  • IDH_IDC_CONFLICT_DESC : wincvs.h
  • IDH_IDC_CONSOLE : wincvs.h
  • IDH_IDC_CONTROL_ADDED_FILES : wincvs.h
  • IDH_IDC_COPY_SETTINGS : wincvs.h
  • IDH_IDC_COPY_SETTINGS_NAME : wincvs.h
  • IDH_IDC_CREATE_MISSING_DIR : wincvs.h
  • IDH_IDC_CREATE_SANDBOX : wincvs.h
  • IDH_IDC_CTRL_PRESSED_ON_OK : wincvs.h
  • IDH_IDC_CURRENT_DIFF_OPTIONS : wincvs.h
  • IDH_IDC_CVSGUISFURL : wincvs.h
  • IDH_IDC_CVSROOT : wincvs.h
  • IDH_IDC_DATE : wincvs.h
  • IDH_IDC_DATE1 : wincvs.h
  • IDH_IDC_DATE2 : wincvs.h
  • IDH_IDC_DEFAULT_BRANCH : wincvs.h
  • IDH_IDC_DEFAULT_CVSIGNORE : wincvs.h
  • IDH_IDC_DELETE_ALL_FILES : wincvs.h
  • IDH_IDC_DELETE_CVS_INFO : wincvs.h
  • IDH_IDC_DELETE_DIRECTORY : wincvs.h
  • IDH_IDC_DIFF : wincvs.h
  • IDH_IDC_DIFF_OPTION_DESCRIPTION : wincvs.h
  • IDH_IDC_DIFF_OPTION_LIST : wincvs.h
  • IDH_IDC_DIFFOPTIONS : wincvs.h
  • IDH_IDC_DONT_SHORTEN_PATHS : wincvs.h
  • IDH_IDC_DOWN : wincvs.h
  • IDH_IDC_EDIT_KEYWORD : wincvs.h
  • IDH_IDC_ENCRYPTION : wincvs.h
  • IDH_IDC_ENTRIES_LIST : wincvs.h
  • IDH_IDC_ENTRY : wincvs.h
  • IDH_IDC_ENTRY_EDIT : wincvs.h
  • IDH_IDC_ENTRYSTATE_FORCE_BINARY : wincvs.h
  • IDH_IDC_ENTRYSTATE_FORCE_TEXT : wincvs.h
  • IDH_IDC_ENTRYSTATE_FORCE_UNICODE : wincvs.h
  • IDH_IDC_ENTRYSTATE_IGNORE : wincvs.h
  • IDH_IDC_ENTRYSTATE_NO_CHANGE : wincvs.h
  • IDH_IDC_ENTRYSTATE_NO_EXPANSION : wincvs.h
  • IDH_IDC_EXPORT : wincvs.h
  • IDH_IDC_EXTERNAL_DIFF : wincvs.h
  • IDH_IDC_EXTERNAL_EDITOR : wincvs.h
  • IDH_IDC_FILENAME : wincvs.h
  • IDH_IDC_FILEPATH : wincvs.h
  • IDH_IDC_FILES_MODIFICATION_TIME : wincvs.h
  • IDH_IDC_FILETODIFF : wincvs.h
  • IDH_IDC_FILTER : wincvs.h
  • IDH_IDC_FILTER_CONTENTS : wincvs.h
  • IDH_IDC_FORCE_COMMIT : wincvs.h
  • IDH_IDC_FORCE_CVSROOT : wincvs.h
  • IDH_IDC_FORCE_HEAD_REV : wincvs.h
  • IDH_IDC_FORCE_KEY_CTRL : wincvs.h
  • IDH_IDC_FORCE_KEY_SHIFT : wincvs.h
  • IDH_IDC_FORCE_RECURSE : wincvs.h
  • IDH_IDC_FORCE_REVISION : wincvs.h
  • IDH_IDC_GET_CLEAN_COPY : wincvs.h
  • IDH_IDC_GROUP_OPTIONS : wincvs.h
  • IDH_IDC_GRPBOX_TEXT : wincvs.h
  • IDH_IDC_HAS_ALTERNATE_CVS : wincvs.h
  • IDH_IDC_HAS_ALTERNATE_SETTINGS : wincvs.h
  • IDH_IDC_HAS_BRANCHID : wincvs.h
  • IDH_IDC_HAS_COMPRESSION : wincvs.h
  • IDH_IDC_HAS_DATE : wincvs.h
  • IDH_IDC_HAS_DATE1 : wincvs.h
  • IDH_IDC_HAS_DATE2 : wincvs.h
  • IDH_IDC_HAS_EXTERNAL_DIFF : wincvs.h
  • IDH_IDC_HAS_PATH : wincvs.h
  • IDH_IDC_HAS_REV : wincvs.h
  • IDH_IDC_HAS_STATES : wincvs.h
  • IDH_IDC_HAS_USERS : wincvs.h
  • IDH_IDC_HEADERS : wincvs.h
  • IDH_IDC_HEADERS_DESC : wincvs.h
  • IDH_IDC_HELP_INIT : wincvs.h
  • IDH_IDC_HELPLOGIN : wincvs.h
  • IDH_IDC_HOME : wincvs.h
  • IDH_IDC_ICON_STATIC : wincvs.h
  • IDH_IDC_IGNORECASE : wincvs.h
  • IDH_IDC_IGNOREWHITESPACE : wincvs.h
  • IDH_IDC_IMPORT_FILTER : wincvs.h
  • IDH_IDC_ISDATE : wincvs.h
  • IDH_IDC_ISDATE1 : wincvs.h
  • IDH_IDC_ISDATE2 : wincvs.h
  • IDH_IDC_ITEM : wincvs.h
  • IDH_IDC_ITEM_LABEL : wincvs.h
  • IDH_IDC_ITEM_LIST : wincvs.h
  • IDH_IDC_ITEM_LIST_OPTION : wincvs.h
  • IDH_IDC_KEYWORD_DESC : wincvs.h
  • IDH_IDC_KEYWORD_DESCRIPTION : wincvs.h
  • IDH_IDC_KEYWORD_OPT : wincvs.h
  • IDH_IDC_KEYWORD_VALUE : wincvs.h
  • IDH_IDC_KEYWORDLIST : wincvs.h
  • IDH_IDC_KEYWORDLIST_DESC : wincvs.h
  • IDH_IDC_LAST_CHECKIN_TIME : wincvs.h
  • IDH_IDC_MATCH_ENTRIES_CASE : wincvs.h
  • IDH_IDC_MENULIST : wincvs.h
  • IDH_IDC_MERGE_TYPE : wincvs.h
  • IDH_IDC_MESSAGE_DETAILS : wincvs.h
  • IDH_IDC_MODNAME : wincvs.h
  • IDH_IDC_MODULEDESC_TEXT : wincvs.h
  • IDH_IDC_MOVDEL_BRANCH : wincvs.h
  • IDH_IDC_MULTILINE_ACTION : wincvs.h
  • IDH_IDC_MULTILINE_ENTRY : wincvs.h
  • IDH_IDC_MULTILINE_ENTRY_STATIC : wincvs.h
  • IDH_IDC_MULTILINE_ENTRY_WRAP : wincvs.h
  • IDH_IDC_MULTILINE_GO_ACTION : wincvs.h
  • IDH_IDC_MULTILINE_POSITION : wincvs.h
  • IDH_IDC_MULTILINE_PREV_ENTRY : wincvs.h
  • IDH_IDC_MULTILINE_TYPE : wincvs.h
  • IDH_IDC_MULTILINE_WORDWRAP : wincvs.h
  • IDH_IDC_NEXTTIP : wincvs.h
  • IDH_IDC_NO_MODULE_PROGRAM : wincvs.h
  • IDH_IDC_NO_SPLASH_SCREEN : wincvs.h
  • IDH_IDC_NO_VENDOR_RELEASE_TAGS : wincvs.h
  • IDH_IDC_NORECURS : wincvs.h
  • IDH_IDC_NOTAGS : wincvs.h
  • IDH_IDC_OPTIONCHECK_BUTTON : wincvs.h
  • IDH_IDC_OTHER_BUTTON : wincvs.h
  • IDH_IDC_OUTPUT_QUICK : wincvs.h
  • IDH_IDC_OUTPUT_STANDARD : wincvs.h
  • IDH_IDC_OUTPUT_VERBOSE : wincvs.h
  • IDH_IDC_OVERRIDE_CHECKOUT_DIR : wincvs.h
  • IDH_IDC_OVERWRITE : wincvs.h
  • IDH_IDC_OVERWRITE_RELEASE_TAGS : wincvs.h
  • IDH_IDC_PASSWORD : wincvs.h
  • IDH_IDC_PATH : wincvs.h
  • IDH_IDC_PREVIEW_CVSROOT : wincvs.h
  • IDH_IDC_PREVIEWINFO : wincvs.h
  • IDH_IDC_PROGRESS : wincvs.h
  • IDH_IDC_PROGRESS_TEXT : wincvs.h
  • IDH_IDC_PROMPTEDIT : wincvs.h
  • IDH_IDC_PROTOCOL : wincvs.h
  • IDH_IDC_PROTOCOL_DESC : wincvs.h
  • IDH_IDC_PROTOCOL_KEYWORD : wincvs.h
  • IDH_IDC_PRUNE_EMPTY_DIR : wincvs.h
  • IDH_IDC_PYTHON_URL : wincvs.h
  • IDH_IDC_PYTHONDLL : wincvs.h
  • IDH_IDC_QUIET : wincvs.h
  • IDH_IDC_RANGE_DATE : wincvs.h
  • IDH_IDC_RANGE_REV_TAG : wincvs.h
  • IDH_IDC_RCS_FILENAMES_ONLY : wincvs.h
  • IDH_IDC_REACTION_SPEED : wincvs.h
  • IDH_IDC_REACTION_SPEED_SECONDS : wincvs.h
  • IDH_IDC_REACTION_SPEED_SPIN : wincvs.h
  • IDH_IDC_READ_FROM : wincvs.h
  • IDH_IDC_REFRESH_ITEMS : wincvs.h
  • IDH_IDC_RELEASE_TAG : wincvs.h
  • IDH_IDC_REMIND : wincvs.h
  • IDH_IDC_REMOVE : wincvs.h
  • IDH_IDC_REPOSITORY_PATH : wincvs.h
  • IDH_IDC_RESET_COLORS : wincvs.h
  • IDH_IDC_RESET_STICKY : wincvs.h
  • IDH_IDC_REV_TAG : wincvs.h
  • IDH_IDC_REV_TAG1 : wincvs.h
  • IDH_IDC_REV_TAG2 : wincvs.h
  • IDH_IDC_REV_TAG_DATE : wincvs.h
  • IDH_IDC_REVISION : wincvs.h
  • IDH_IDC_REVISION_SPIN : wincvs.h
  • IDH_IDC_RGB_BRANCH : wincvs.h
  • IDH_IDC_RGB_DEAD : wincvs.h
  • IDH_IDC_RGB_HEADER : wincvs.h
  • IDH_IDC_RGB_MERGE : wincvs.h
  • IDH_IDC_RGB_NODE : wincvs.h
  • IDH_IDC_RGB_SELECTION : wincvs.h
  • IDH_IDC_RGB_SHADOW : wincvs.h
  • IDH_IDC_RGB_STATE : wincvs.h
  • IDH_IDC_RGB_TAG : wincvs.h
  • IDH_IDC_SAME_ACTION_NEXT_TIME : wincvs.h
  • IDH_IDC_SELECTION : wincvs.h
  • IDH_IDC_SELECTION_LIST : wincvs.h
  • IDH_IDC_SETTINGS_NAME : wincvs.h
  • IDH_IDC_SHOW_CVS_METHOD : wincvs.h
  • IDH_IDC_SKIP_ANNOTATE : wincvs.h
  • IDH_IDC_SKIP_DIFF : wincvs.h
  • IDH_IDC_SKIP_FILEACTION : wincvs.h
  • IDH_IDC_SKIP_GRAPH : wincvs.h
  • IDH_IDC_SKIP_LOG : wincvs.h
  • IDH_IDC_SKIP_STATUS : wincvs.h
  • IDH_IDC_SKIP_UPDATE : wincvs.h
  • IDH_IDC_SPIN_AUTO_LOGOUT_TIME : wincvs.h
  • IDH_IDC_SPIN_COMPRESSION : wincvs.h
  • IDH_IDC_STARTUP : wincvs.h
  • IDH_IDC_STATES : wincvs.h
  • IDH_IDC_STATIC_CURRENTOPTIONS : wincvs.h
  • IDH_IDC_STATIC_OPTDESC : wincvs.h
  • IDH_IDC_STATICGROUP_SELECTOPTIONS : wincvs.h
  • IDH_IDC_STDOUT : wincvs.h
  • IDH_IDC_SUPRESS_HEADER : wincvs.h
  • IDH_IDC_TAGDESC_TEXT : wincvs.h
  • IDH_IDC_TAGNAME : wincvs.h
  • IDH_IDC_TCLDLL : wincvs.h
  • IDH_IDC_TEMPFILE : wincvs.h
  • IDH_IDC_TEMPLATE_LIST : wincvs.h
  • IDH_IDC_TEMPLATE_PREVIEW : wincvs.h
  • IDH_IDC_THREE_WAY_CONFLICTS : wincvs.h
  • IDH_IDC_TIPSTRING : wincvs.h
  • IDH_IDC_UNIFIEDDIFF : wincvs.h
  • IDH_IDC_UNIX_LF : wincvs.h
  • IDH_IDC_UP : wincvs.h
  • IDH_IDC_USE_EXTERNAL_DIFF : wincvs.h
  • IDH_IDC_USERS : wincvs.h
  • IDH_IDC_VENDOR_TAG : wincvs.h
  • IDH_IDC_WARNING_DESC : wincvs.h
  • IDH_IDC_WINCVSURL : wincvs.h
  • IDH_IDC_WINCVSVER : wincvs.h
  • IDH_IDD_ABOUTBOX : wincvs.h
  • IDH_IDD_ADMINOPTION : wincvs.h
  • IDH_IDD_ALERT : wincvs.h
  • IDH_IDD_ANNOTATE_MAIN : wincvs.h
  • IDH_IDD_CHECKOUT_MAIN : wincvs.h
  • IDH_IDD_CMDLINE_MAIN : wincvs.h
  • IDH_IDD_COMMIT_MAIN : wincvs.h
  • IDH_IDD_COMMIT_OPTIONS : wincvs.h
  • IDH_IDD_CUSTOMIZE : wincvs.h
  • IDH_IDD_CVSROOT : wincvs.h
  • IDH_IDD_CVSTEMPLATE : wincvs.h
  • IDH_IDD_DIFF_MAIN : wincvs.h
  • IDH_IDD_DIFF_OPTIONS : wincvs.h
  • IDH_IDD_EDITKEYWORD : wincvs.h
  • IDH_IDD_EDITMESSAGE : wincvs.h
  • IDH_IDD_EDITORMON : wincvs.h
  • IDH_IDD_ENTRYDESC : wincvs.h
  • IDH_IDD_FILTER_SELECTION : wincvs.h
  • IDH_IDD_FILTERBAR_OPTIONS : wincvs.h
  • IDH_IDD_GRAPH_OPTIONS : wincvs.h
  • IDH_IDD_IMPORT_MAIN : wincvs.h
  • IDH_IDD_IMPORT_OPTIONS : wincvs.h
  • IDH_IDD_IMPORTFILTER : wincvs.h
  • IDH_IDD_INIT_MAIN : wincvs.h
  • IDH_IDD_ITEM_LIST : wincvs.h
  • IDH_IDD_LOG_FILTERS : wincvs.h
  • IDH_IDD_LOG_MAIN : wincvs.h
  • IDH_IDD_LOGIN_MAIN : wincvs.h
  • IDH_IDD_MULTILINE_ENTRY : wincvs.h
  • IDH_IDD_NOPYTHON : wincvs.h
  • IDH_IDD_OPEN_MAIN : wincvs.h
  • IDH_IDD_PASSWRD : wincvs.h
  • IDH_IDD_PREFS_CVS : wincvs.h
  • IDH_IDD_PREFS_CVSCMD_DIALOGS : wincvs.h
  • IDH_IDD_PREFS_GLOBALS : wincvs.h
  • IDH_IDD_PREFS_WINCVS : wincvs.h
  • IDH_IDD_PROGRESS : wincvs.h
  • IDH_IDD_RELEASE_MAIN : wincvs.h
  • IDH_IDD_RTAG_MAIN : wincvs.h
  • IDH_IDD_RTAG_OPTIONS : wincvs.h
  • IDH_IDD_SAVESETTINGS : wincvs.h
  • IDH_IDD_SELECTION_DETAILS : wincvs.h
  • IDH_IDD_STATUS_MAIN : wincvs.h
  • IDH_IDD_TAG_MAIN : wincvs.h
  • IDH_IDD_TIP : wincvs.h
  • IDH_IDD_UPDATE_MAIN : wincvs.h
  • IDH_IDD_UPDATE_MERGE : wincvs.h
  • IDH_IDD_UPDATE_OPTIONS : wincvs.h
  • IDH_IDD_WARNINGDESC : wincvs.h
  • IDH_IDP_FAILED_TO_CREATE : wincvs.h
  • IDH_IDP_OLE_INIT_FAILED : wincvs.h
  • IDH_IDP_SOCKETS_INIT_FAILED : wincvs.h
  • IDH_IDR_BROWSER : wincvs.h
  • IDH_IDR_CNTR_INPLACE : wincvs.h
  • IDH_IDR_CUSTMENUS : wincvs.h
  • IDH_IDR_FILELIST : wincvs.h
  • IDH_IDR_FILTER : wincvs.h
  • IDH_IDR_GRAPH : wincvs.h
  • IDH_IDR_ITEMLIST : wincvs.h
  • IDH_IDR_MAINFRAME : wincvs.h
  • IDH_IDR_MULTIUSER : wincvs.h
  • IDH_IDR_STATEICONS : wincvs.h
  • IDH_IDR_TAGS : wincvs.h
  • IDH_IDR_WINCVSTYPE : wincvs.h
  • IDH_IDR_WORKSPACE : wincvs.h
  • IDI_MB_EXCLAMATION : resource.h
  • IDI_MB_INFORMATION : resource.h
  • IDI_MB_QUESTION : resource.h
  • IDI_MB_STOP : resource.h
  • IDM_CBAR_MENU : CJResource.h
  • IDP_FAILED_TO_CREATE : resource.h
  • IDP_OLE_INIT_FAILED : resource.h
  • IDP_SOCKETS_INIT_FAILED : resource.h
  • IDR_BROWSER : resource.h
  • IDR_CBAR_POPUP : CJResource.h
  • IDR_CNTR_INPLACE : resource.h
  • IDR_CUSTMENUS : resource.h
  • IDR_FILELIST : resource.h
  • IDR_FILTER : resource.h
  • IDR_GFXOUTBAR : CJResource.h
  • IDR_GRAPH : resource.h
  • IDR_ITEMLIST : resource.h
  • IDR_MAINFRAME : resource.h
  • IDR_MULTIUSER : resource.h
  • IDR_POPUP_HEX_EDIT : CJResource.h
  • IDR_POPUP_TOOLBAR : CJResource.h
  • IDR_STATEICONS : resource.h
  • IDR_TAGS : resource.h
  • IDR_WINCVSTYPE : resource.h
  • IDR_WORKSPACE : resource.h
  • IDS_COLOR_AUTO : CJResource.h
  • IDS_COLOR_CUST : CJResource.h
  • IDS_COMBOBROWSER : resource.h
  • IDS_CONTRACT : CJResource.h
  • IDS_DEFFONT : resource.h
  • IDS_ENTRY : CJResource.h
  • IDS_EXPAND : CJResource.h
  • IDS_HIDE : CJResource.h
  • IDS_INVALID_VER : CJResource.h
  • IDS_MODIFIED : CJResource.h
  • IDS_NAME : CJResource.h
  • IDS_REGKEY : CJResource.h
  • IDS_REMOVEITEM : CJResource.h
  • IDS_RENAMEITEM : CJResource.h
  • IDS_SECTION : CJResource.h
  • IDS_SETTINGS : CJResource.h
  • IDS_SIZE : CJResource.h
  • IDS_TBAR_SETTINGS : CJResource.h
  • IDS_TYPE : CJResource.h
  • IDS_WIN_PLACEMENT : CJResource.h
  • IDS_WNDPOS : CJResource.h
  • Inherited : UPseudoSupport.cpp
  • InsertMenu : CJMenu.h
  • InsertODMenu : CJMenu.h
  • INTERNAL_AUTHEN : Persistent.h
  • INVALID_Color : CJColorPopup.cpp
  • INVALID_SEQUENCE : CTCP2Parse.cpp
  • INVTAB : CustomizeMenus.cpp
  • IS_PSEUDO_CTL : PseudoDlg.cpp
  • isn : CTCP2Parse.cpp

- k -

  • KEYWORD_MODE_COUNT : KeywordComboBox.cpp
  • kTCLPathDelimiter : TclGlue.h
  • kUMainWidget : uwidget.h

- l -

  • LOAD_CODEFRAG : TclGlue.cpp, PythonGlue.cpp
  • lstat : StdAfx.h

- m -

  • m_rectActualFrameSize : CJDockContext.cpp
  • m_rectActualSize : CJDockContext.cpp
  • m_rectFrameBorders : CJDockContext.cpp
  • m_rectRequestedSize : CJDockContext.cpp
  • MA_CHECK : UPseudoSupport.cpp
  • MACBINMAP_COOKIEVALUE : MacBinMaps.h
  • MACROS_FOLDER : MacrosSetup.h
  • MACSPEC : ImportFilter.cpp
  • malloc : dll_garbage.h
  • MAX : udraw.cpp
  • MAX_ARGS : ustr.h
  • MAX_BUFLEN : TipDlg.cpp
  • MAX_CHAR_BY_LINE : wincvsView.h
  • MAX_CMD_LEN : ustr.h
  • MAX_ColorS : CJColorPopup.cpp
  • MAX_DATE : CJDateTimeCtrl.cpp
  • MAX_MACBIN_DESC : MacBinMaps.h
  • MAX_MACBIN_EXTENSION : MacBinMaps.h
  • MAX_PATH : FileTraversal.h
  • MAX_PRINT_ARG : CvsArgs.cpp
  • MAX_TEST_SIZE : TextBinary.cpp
  • MAX_TIME_BUFFER_SIZE : CJDateTimeCtrl.cpp
  • MAX_UNLINK_RETRY : wincvs_winutil.cpp
  • MAXNAMLEN : ndir.h
  • MIN : udraw.cpp
  • MIN_CHUNK : getline.c
  • MIN_DATE : CJDateTimeCtrl.cpp
  • MIN_IDLE : uevent.cpp
  • MIRC_TRANSPARENT : CTCP2Parse.cpp
  • ModifyODMenu : CJMenu.h
  • MODULE_SIZE : dll_garbage.c
  • my_index : getopt.c

- n -

  • NAMESPACE : UCvsFiles.cpp, MultiString.h, CvsEntries.cpp
  • NCOLORSHADES : CJControlBar.cpp
  • NEW : TclGlue.cpp, PythonGlue.cpp, Persistent.cpp, ImportFilter.cpp, CvsEntries.cpp, uwidget.cpp, utoolbar.cpp, UPseudoSupport.cpp
  • NM_FOLDERCHANGE : GfxOutBarCtrl.h
  • NM_OB_DRAGITEM : GfxOutBarCtrl.h
  • NM_OB_ITEMCLICK : GfxOutBarCtrl.h
  • NM_OB_ITEMHOVER : GfxOutBarCtrl.h
  • NM_OB_ONGROUPENDEDIT : GfxOutBarCtrl.h
  • NM_OB_ONLABELENDEDIT : GfxOutBarCtrl.h
  • no_argument : getopt.h
  • NOEXPLOREVIEW : MainFrm.cpp
  • NULL : getopt1.c
  • NUM_COLUMNS : CJColorPopup.cpp
  • NUM_CVSROOT : CvsPrefs.h
  • NUM_FILEMASKS : UCvsFrame.h

- o -

  • OB_CYBUTTON : CJOutlookBar.h
  • OBM_CHECK : CJMenu.cpp
  • OBN_SELENDOK : CJOutlookBar.h
  • OCTANGLE_COUNT : GraphView.h
  • OFFSET : UPseudoSupport.cpp
  • ON_CHGCURSOR : umain.h
  • ON_CHGFOCUS : umain.h
  • ON_COMBO_APPEND : umain.h
  • ON_COMBO_DELSEL : umain.h
  • ON_COMBO_ENABLESEL : umain.h
  • ON_COMBO_GETCOUNT : umain.h
  • ON_COMBO_GETMENU : umain.h
  • ON_COMBO_GETSEL : umain.h
  • ON_COMBO_RESETALL : umain.h
  • ON_COMBO_SEL : umain.h
  • ON_COMBO_SEL_RANGE : umain.h
  • ON_COMBO_SETSEL : umain.h
  • ON_CUSTOM_CLICK : umain.h
  • ON_CUSTOM_DRAW : umain.h
  • ON_CUSTOM_DRAW_RANGE : umain.h
  • ON_DRAGQUERY : umain.h
  • ON_DRAGQUERY_RANGE : umain.h
  • ON_DROPIT : umain.h
  • ON_DROPIT_RANGE : umain.h
  • ON_DROPQUERY : umain.h
  • ON_DROPQUERY_CMDID : umain.h
  • ON_DROPQUERY_RANGE : umain.h
  • ON_DROPREF : umain.h
  • ON_EDITACTIVATE : umain.h
  • ON_EDITACTIVATE_RANGE : umain.h
  • ON_EDITCHANGE : umain.h
  • ON_EDITCHANGE_RANGE : umain.h
  • ON_ENABLECMD : umain.h
  • ON_FETCHCMD : umain.h
  • ON_GET_SLIDERPROP : umain.h
  • ON_GETFLOAT : umain.h
  • ON_GETTEXT : umain.h
  • ON_INIT_TAB_WIDGET : umain.h
  • ON_INIT_WIDGET : umain.h
  • ON_INVALIDATE : umain.h
  • ON_KEYDOWN : umain.h
  • ON_LIST_ADDCOLUMNS : umain.h
  • ON_LIST_ADDSEL : umain.h
  • ON_LIST_DBLCLICK : umain.h
  • ON_LIST_DELROW : umain.h
  • ON_LIST_GETINFO : umain.h
  • ON_LIST_GETNEXT : umain.h
  • ON_LIST_GETNEXTSEL : umain.h
  • ON_LIST_HIDECOLUMNS : umain.h
  • ON_LIST_INSERT : umain.h
  • ON_LIST_NEWROW : umain.h
  • ON_LIST_POPUP : umain.h
  • ON_LIST_RESETALL : umain.h
  • ON_LIST_RESORT : umain.h
  • ON_LIST_ROWGETDATA : umain.h
  • ON_LIST_ROWSETDATA : umain.h
  • ON_LIST_SELCOLUMN : umain.h
  • ON_LIST_SELECTING : umain.h
  • ON_LIST_SETCOLTITLE : umain.h
  • ON_LIST_SETCOLWIDTH : umain.h
  • ON_LIST_SETFEEDBACK : umain.h
  • ON_LIST_SETSORTDIR : umain.h
  • ON_LIST_SHOWCOLUMNS : umain.h
  • ON_PAGE_CHANGED : umain.h
  • ON_QUERYSTATE : umain.h
  • ON_REDRAW : umain.h
  • ON_RESIZE : umain.h
  • ON_SCROLLCHANGE : umain.h
  • ON_SCROLLCHANGE_RANGE : umain.h
  • ON_SET_SLIDER : umain.h
  • ON_SET_SLIDERPROP : umain.h
  • ON_SETCURSOR : umain.h
  • ON_SETDEFAULT : umain.h
  • ON_SETFLOAT : umain.h
  • ON_SETICON : umain.h
  • ON_SETSTATE : umain.h
  • ON_SETTEXT : umain.h
  • ON_SHOW_WIDGET : umain.h
  • ON_SHOW_WIDGET_RANGE : umain.h
  • ON_SMARTCOMBO_SETFEATURE : umain.h
  • ON_SMARTCOMBO_SETITEMS : umain.h
  • ON_SMARTCOMBO_SETREADONLY : umain.h
  • ON_STATUSBAR_TEXT : umain.h
  • ON_TB_BUTTON : umain.h
  • ON_TB_CHECKBTN : umain.h
  • ON_TB_DROPDOWN : umain.h
  • ON_TB_END : umain.h
  • ON_TB_GETCOLOR : umain.h
  • ON_TB_INIT : umain.h
  • ON_TB_SEPARATOR : umain.h
  • ON_TIMER : umain.h
  • ON_TREE_DELETE : umain.h
  • ON_TREE_EXPAND : umain.h
  • ON_TREE_EXPANDING : umain.h
  • ON_TREE_GETINFO : umain.h
  • ON_TREE_GETSEL : umain.h
  • ON_TREE_INSERT : umain.h
  • ON_TREE_RESETALL : umain.h
  • ON_TREE_SELECT : umain.h
  • ON_TREE_SELECTING : umain.h
  • ON_TREE_SETDATA : umain.h
  • ON_TREE_SETICON : umain.h
  • ON_UBTNDBLDOWN : umain.h
  • ON_UBTNDOWN : umain.h
  • ON_UBTNUP : umain.h
  • ON_UCOMMAND : umain.h
  • ON_UCOMMAND_RANGE : umain.h
  • ON_UCOMMAND_RANGEEX : umain.h
  • ON_UCREATE : umain.h
  • ON_UDESTROY : umain.h
  • ON_UENTER : umain.h
  • ON_UEXPOSE : umain.h
  • ON_UGETLLOC : umain.h
  • ON_ULEAVE : umain.h
  • ON_UMMOVE : umain.h
  • ON_UNOTIFY : umain.h
  • ON_UPDATEFOCUS : umain.h
  • ON_UPDATEUI : umain.h
  • ON_USETLLOC : umain.h
  • ON_USETTOOLTIP : umain.h
  • ON_UUPDATECMD : umain.h
  • ON_UUPDATECMD_RANGE : umain.h
  • optional_argument : getopt.h

- p -

  • PERSISTENT_CAST : Persistent.h
  • platform_calloc : dll_garbage.c
  • PLATFORM_COLUMN_WIDTH : BrowseViewColumn.cpp
  • platform_free : dll_garbage.c
  • platform_malloc : dll_garbage.c
  • platform_realloc : dll_garbage.c
  • PP_PASTE : version_fu.h
  • PP_STRINGIZE : version_fu.h
  • PREV_FILTER_SIZE : FilterSelectionDlg.cpp
  • PROFILE_NAME : Persistent.h
  • PY_BEGIN_IMPL_METHOD : PythonMacros.h
  • Py_BuildValue : PythonGlue.impl.h
  • PY_DECL_CLASS : PythonMacros.h
  • PY_DECL_CLASS_INHERITED : PythonMacros.h
  • PY_DECL_METHOD : PythonMacros.h
  • PY_END_IMPL_METHOD : PythonMacros.h
  • Py_EndInterpreter : PythonGlue.impl.h
  • Py_Finalize : PythonGlue.impl.h
  • Py_FindMethod : PythonGlue.impl.h
  • Py_GetPath : PythonGlue.impl.h
  • PY_IMPL_CLASS : PythonMacros.h
  • PY_IMPL_METHOD : PythonMacros.h
  • Py_Initialize : PythonGlue.impl.h
  • Py_InitModule4 : PythonGlue.impl.h
  • Py_IsInitialized : PythonGlue.impl.h
  • Py_NewInterpreter : PythonGlue.impl.h
  • Py_SetProgramName : PythonGlue.impl.h
  • PyArg_ParseTuple : PythonGlue.impl.h
  • PyDict_SetItemString : PythonGlue.impl.h
  • PyErr_Clear : PythonGlue.impl.h
  • PyErr_NewException : PythonGlue.impl.h
  • PyErr_SetString : PythonGlue.impl.h
  • PyEval_InitThreads : PythonGlue.impl.h
  • PyFile_AsFile : PythonGlue.impl.h
  • PyInt_Check : PythonGlue.impl.h
  • PyInt_FromLong : PythonGlue.impl.h
  • PyModule_GetDict : PythonGlue.impl.h
  • PyObject_Free : PythonGlue.impl.h
  • PyRun_SimpleFile : PythonGlue.impl.h
  • PyRun_SimpleString : PythonGlue.impl.h
  • PyString_AsString : PythonGlue.impl.h
  • PyString_Check : PythonGlue.impl.h
  • PyString_FromString : PythonGlue.impl.h
  • PySys_SetPath : PythonGlue.impl.h
  • PYTHONGLUE_EXTERN : PythonImpl.cpp, PythonGlue.impl.h
  • PYTHONLIB_FOLDER : MacrosSetup.h
  • PyThreadState_Swap : PythonGlue.impl.h
  • PyTuple_Check : PythonGlue.impl.h
  • PyTuple_New : PythonGlue.impl.h
  • PyTuple_Size : PythonGlue.impl.h

- q -

  • qCvsDebug : StdAfx.h
  • qDebug : StdAfx.h
  • qMacAPP : stdafx.h
  • qMacPP : stdafx.h
  • qRangeCheck : dll_garbage.c, stdafx.h
  • qRelease : stdafx.h
  • qReleaseBuild : stdafx.h

- r -

  • realloc : dll_garbage.h
  • RELEASE : CJHtmlView.cpp
  • required_argument : getopt.h
  • rewinddir : ndir.h
  • RGB_DEF_BRANCH : GraphView.h
  • RGB_DEF_DEADNODE : GraphView.h
  • RGB_DEF_HEADER : GraphView.h
  • RGB_DEF_MERGE : GraphView.h
  • RGB_DEF_NODE : GraphView.h
  • RGB_DEF_SEL : GraphView.h
  • RGB_DEF_SHADOW : GraphView.h
  • RGB_DEF_TAG : GraphView.h
  • RGB_DEF_USERSTATENODE : GraphView.h
  • ROUND_RECT_PT : GraphView.h

- s -

  • SHADOW_OFFSET_PT : GraphView.h
  • SHELLACTION_SUCCEEDED : LaunchHandlers.cpp
  • SIZEOF_BITMAPFILEHEADER_PACKED : dib.h
  • START_UPDATE_UI : UCvsFrame.cpp
  • STARTPOINT_PT : GraphView.h
  • stat : StdAfx.h, Stat.cpp, StdAfx.h
  • STD : umain.h
  • STR_DIFFDEFAULT_DATE : DiffDlg.cpp
  • STR_DIFFDEFAULT_REV : DiffDlg.cpp
  • STR_DIFFOPT_DESC_A : DiffDlg.cpp
  • STR_DIFFOPT_DESC_B : DiffDlg.cpp
  • STR_DIFFOPT_DESC_BB : DiffDlg.cpp
  • STR_DIFFOPT_DESC_BINARY : DiffDlg.cpp
  • STR_DIFFOPT_DESC_BRIEF : DiffDlg.cpp
  • STR_DIFFOPT_DESC_C : DiffDlg.cpp
  • STR_DIFFOPT_DESC_C_G_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_CC : DiffDlg.cpp
  • STR_DIFFOPT_DESC_D : DiffDlg.cpp
  • STR_DIFFOPT_DESC_E : DiffDlg.cpp
  • STR_DIFFOPT_DESC_E_T : DiffDlg.cpp
  • STR_DIFFOPT_DESC_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_F_E : DiffDlg.cpp
  • STR_DIFFOPT_DESC_FF : DiffDlg.cpp
  • STR_DIFFOPT_DESC_H_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_HH : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_A_S : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_B_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_C : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_M_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_S_C : DiffDlg.cpp
  • STR_DIFFOPT_DESC_I_T : DiffDlg.cpp
  • STR_DIFFOPT_DESC_IFDEF : DiffDlg.cpp
  • STR_DIFFOPT_DESC_II : DiffDlg.cpp
  • STR_DIFFOPT_DESC_L_C : DiffDlg.cpp
  • STR_DIFFOPT_DESC_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_LABEL : DiffDlg.cpp
  • STR_DIFFOPT_DESC_LL : DiffDlg.cpp
  • STR_DIFFOPT_DESC_MINIMAL : DiffDlg.cpp
  • STR_DIFFOPT_DESC_N : DiffDlg.cpp
  • STR_DIFFOPT_DESC_N_G_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_N_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_NN : DiffDlg.cpp
  • STR_DIFFOPT_DESC_O_G_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_O_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_PP : DiffDlg.cpp
  • STR_DIFFOPT_DESC_RCS : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_B_S : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_C_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_C_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_F_L : DiffDlg.cpp
  • STR_DIFFOPT_DESC_S_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_T : DiffDlg.cpp
  • STR_DIFFOPT_DESC_TEXT : DiffDlg.cpp
  • STR_DIFFOPT_DESC_TT : DiffDlg.cpp
  • STR_DIFFOPT_DESC_U : DiffDlg.cpp
  • STR_DIFFOPT_DESC_U_G_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_U_L_F : DiffDlg.cpp
  • STR_DIFFOPT_DESC_UU : DiffDlg.cpp
  • STR_DIFFOPT_DESC_W : DiffDlg.cpp
  • STR_DIFFOPT_DESC_WW : DiffDlg.cpp
  • STR_DIFFOPT_DESC_Y : DiffDlg.cpp
  • STR_DIFFOPT_OPT_A : DiffDlg.cpp
  • STR_DIFFOPT_OPT_B : DiffDlg.cpp
  • STR_DIFFOPT_OPT_BB : DiffDlg.cpp
  • STR_DIFFOPT_OPT_BINARY : DiffDlg.cpp
  • STR_DIFFOPT_OPT_BRIEF : DiffDlg.cpp
  • STR_DIFFOPT_OPT_C : DiffDlg.cpp
  • STR_DIFFOPT_OPT_C_G_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_CC : DiffDlg.cpp
  • STR_DIFFOPT_OPT_D : DiffDlg.cpp
  • STR_DIFFOPT_OPT_E : DiffDlg.cpp
  • STR_DIFFOPT_OPT_E_T : DiffDlg.cpp
  • STR_DIFFOPT_OPT_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_F_E : DiffDlg.cpp
  • STR_DIFFOPT_OPT_FF : DiffDlg.cpp
  • STR_DIFFOPT_OPT_H_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_HH : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_A_S : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_B_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_C : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_M_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_S_C : DiffDlg.cpp
  • STR_DIFFOPT_OPT_I_T : DiffDlg.cpp
  • STR_DIFFOPT_OPT_IFDEF : DiffDlg.cpp
  • STR_DIFFOPT_OPT_II : DiffDlg.cpp
  • STR_DIFFOPT_OPT_L_C : DiffDlg.cpp
  • STR_DIFFOPT_OPT_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_LABEL : DiffDlg.cpp
  • STR_DIFFOPT_OPT_LL : DiffDlg.cpp
  • STR_DIFFOPT_OPT_MINIMAL : DiffDlg.cpp
  • STR_DIFFOPT_OPT_N : DiffDlg.cpp
  • STR_DIFFOPT_OPT_N_G_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_N_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_NN : DiffDlg.cpp
  • STR_DIFFOPT_OPT_O_G_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_O_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_P : DiffDlg.cpp
  • STR_DIFFOPT_OPT_RCS : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_B_S : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_C_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_C_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_F_L : DiffDlg.cpp
  • STR_DIFFOPT_OPT_S_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_T : DiffDlg.cpp
  • STR_DIFFOPT_OPT_TEXT : DiffDlg.cpp
  • STR_DIFFOPT_OPT_TT : DiffDlg.cpp
  • STR_DIFFOPT_OPT_U : DiffDlg.cpp
  • STR_DIFFOPT_OPT_U_G_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_U_L_F : DiffDlg.cpp
  • STR_DIFFOPT_OPT_UU : DiffDlg.cpp
  • STR_DIFFOPT_OPT_W : DiffDlg.cpp
  • STR_DIFFOPT_OPT_WW : DiffDlg.cpp
  • STR_DIFFOPT_OPT_Y : DiffDlg.cpp
  • STR_DIFFOPT_OPTIONDESCRIPTION_FORMAT : DiffDlg.cpp
  • STR_ENCODING_BINARY : CvsEntries.cpp
  • STR_ENCODING_TEXT : CvsEntries.cpp
  • STR_ENCODING_UNICODE : CvsEntries.cpp
  • STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER : BrowseFileView.h
  • STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH : BrowseFileView.h
  • STR_FILEDETAILVIEW_COLUMN_PREFIX_FLAT : BrowseFileView.h
  • STR_FILEDETAILVIEW_COLUMN_PREFIX_REG : BrowseFileView.h
  • STR_FILEDETAILVIEW_COLUMN_SECTION : BrowseFileView.h
  • STR_ITEMLIST_BRANCH : ItemListDlg.cpp
  • STR_ITEMLIST_DIR : ItemListDlg.cpp
  • STR_ITEMLIST_REVISION : ItemListDlg.cpp
  • STR_ITEMLIST_UP_DIR : ItemListDlg.cpp
  • STR_STATE_CONFLICT : CvsEntries.cpp
  • STR_STATE_IGNORED : CvsEntries.cpp
  • STR_STATE_MISSING : CvsEntries.cpp
  • STR_STATE_MODIFIED : CvsEntries.cpp
  • STR_STATE_REMOVED : CvsEntries.cpp
  • STR_STATE_RESOLVED : CvsEntries.cpp
  • STR_STATE_UNKNOWN : CvsEntries.cpp
  • STRUCT_DIRENT : FileTraversal.h
  • STYLE_DEADNODE : GraphView.h
  • STYLE_USERSTATENODE : GraphView.h

- t -

  • TABVIEW_BORDER : CJTabView.h
  • TBBS_AUTOSIZE : CJToolBar.h
  • TBBS_BUTTON : CJToolBar.h
  • TBBS_CHECKBOX : CJToolBar.h
  • TBBS_CHECKED : CJToolBar.h
  • TBBS_CHECKGROUP : CJToolBar.h
  • TBBS_DISABLED : CJToolBar.h
  • TBBS_DROPDOWN : CJToolBar.h
  • TBBS_ELLIPSES : CJToolBar.h
  • TBBS_GROUP : CJToolBar.h
  • TBBS_HIDDEN : CJToolBar.h
  • TBBS_INDETERMINATE : CJToolBar.h
  • TBBS_MARKED : CJToolBar.h
  • TBBS_NOPREFIX : CJToolBar.h
  • TBBS_PRESSED : CJToolBar.h
  • TBBS_SEPARATOR : CJToolBar.h
  • TBBS_WRAPPED : CJToolBar.h
  • Tcl_Alloc : TclGlue.cpp
  • Tcl_AppendResult : TclGlue.cpp
  • TCL_BREAK : TclGlue.h
  • Tcl_Concat : TclGlue.cpp
  • TCL_CONTINUE : TclGlue.h
  • Tcl_CreateCommand : TclGlue.cpp
  • Tcl_CreateInterp : TclGlue.cpp
  • Tcl_DeleteInterp : TclGlue.cpp
  • Tcl_DStringAppendElement : TclGlue.cpp
  • Tcl_DStringEndSublist : TclGlue.cpp
  • Tcl_DStringFree : TclGlue.cpp
  • Tcl_DStringInit : TclGlue.cpp
  • Tcl_DStringResult : TclGlue.cpp
  • Tcl_DStringStartSublist : TclGlue.cpp
  • TCL_ERROR : TclGlue.h
  • Tcl_Eval : TclGlue.cpp
  • Tcl_EvalFile : TclGlue.cpp
  • Tcl_ExprLong : TclGlue.cpp
  • Tcl_FindExecutable : TclGlue.cpp
  • Tcl_Free : TclGlue.cpp
  • Tcl_Init : TclGlue.cpp
  • Tcl_ListObjAppendElement : TclGlue.cpp
  • Tcl_NewListObj : TclGlue.cpp
  • Tcl_NewStringObj : TclGlue.cpp
  • TCL_OK : TclGlue.h
  • Tcl_Realloc : TclGlue.cpp
  • TCL_RETURN : TclGlue.h
  • Tcl_SetObjResult : TclGlue.cpp
  • Tcl_SetResult : TclGlue.cpp
  • Tcl_SetVar : TclGlue.cpp
  • Tcl_SetVar2 : TclGlue.cpp
  • Tcl_SourceRCFile : TclGlue.cpp
  • TclFreeObj : TclGlue.cpp
  • theHookMap : Subclass.cpp
  • TIPDLG_H_INCLUDED_ : TipDlg.h
  • TOHEX : CJHexEdit.cpp
  • TOOLTIP_ID : CJHyperLink.cpp
  • TRACK_BORDER_SIZE : CJSizeDockBar.cpp, CJControlBar.cpp

- u -

  • UASSERT : StdAfx.h, stdafx.h, StdAfx.h, stdafx.h
  • UBEGIN_MESSAGE_MAP : umain.h
  • UCMD_to_WINCMD : umain.h
  • UCMD_to_WINCTL : umain.h
  • UDECLARE_DYNAMIC : uobject.h
  • UDECLARE_DYNCREATE : uobject.h
  • UDECLARE_MESSAGE_MAP : umain.h
  • UDYNAMIC_CAST : uobject.h
  • UEND_MESSAGE_MAP : umain.h
  • UEXPORT : uconfig.h
  • UFSSpec : TextBinary.h
  • UGetBValue : udraw.h
  • UGetGValue : udraw.h
  • UGetRValue : udraw.h
  • UHIWORD : umain.h
  • UIMPLEMENT_DYNAMIC : uobject.h
  • UIMPLEMENT_DYNCREATE : uobject.h
  • UIMPLEMENT_RUNTIMECLASS : uobject.h
  • UK_ADD : umain.h
  • UK_ALT : umain.h
  • UK_BACK : umain.h
  • UK_CANCEL : umain.h
  • UK_CLEAR : umain.h
  • UK_CONTROL : umain.h
  • UK_DECIMAL : umain.h
  • UK_DELETE : umain.h
  • UK_DIVIDE : umain.h
  • UK_DOWN : umain.h
  • UK_END : umain.h
  • UK_ESCAPE : umain.h
  • UK_F1 : umain.h
  • UK_F10 : umain.h
  • UK_F11 : umain.h
  • UK_F12 : umain.h
  • UK_F13 : umain.h
  • UK_F14 : umain.h
  • UK_F15 : umain.h
  • UK_F16 : umain.h
  • UK_F17 : umain.h
  • UK_F18 : umain.h
  • UK_F19 : umain.h
  • UK_F2 : umain.h
  • UK_F20 : umain.h
  • UK_F21 : umain.h
  • UK_F22 : umain.h
  • UK_F23 : umain.h
  • UK_F24 : umain.h
  • UK_F3 : umain.h
  • UK_F4 : umain.h
  • UK_F5 : umain.h
  • UK_F6 : umain.h
  • UK_F7 : umain.h
  • UK_F8 : umain.h
  • UK_F9 : umain.h
  • UK_HELP : umain.h
  • UK_HOME : umain.h
  • UK_INSERT : umain.h
  • UK_LBUTTON : umain.h
  • UK_LEFT : umain.h
  • UK_MBUTTON : umain.h
  • UK_MINUS : umain.h
  • UK_MULTIPLY : umain.h
  • UK_NEXT : umain.h
  • UK_NUMPAD0 : umain.h
  • UK_NUMPAD1 : umain.h
  • UK_NUMPAD2 : umain.h
  • UK_NUMPAD3 : umain.h
  • UK_NUMPAD4 : umain.h
  • UK_NUMPAD5 : umain.h
  • UK_NUMPAD6 : umain.h
  • UK_NUMPAD7 : umain.h
  • UK_NUMPAD8 : umain.h
  • UK_NUMPAD9 : umain.h
  • UK_PLUS : umain.h
  • UK_PRIOR : umain.h
  • UK_RBUTTON : umain.h
  • UK_RETURN : umain.h
  • UK_RIGHT : umain.h
  • UK_SEPARATOR : umain.h
  • UK_SHIFT : umain.h
  • UK_SPACE : umain.h
  • UK_SUBTRACT : umain.h
  • UK_TAB : umain.h
  • UK_UP : umain.h
  • ULOWORD : umain.h
  • UMAKEINT : umain.h
  • UMENU_NULL : umain.h
  • UNDEF_STDC : TclGlue.cpp
  • UPS_SOLID : udraw.h
  • URGB : udraw.h
  • URUNTIME_CLASS : uobject.h
  • USE_DL_EXPORT : PythonContainer.h
  • USE_PYTHON : PythonContainer.h
  • USE_TCL : TclGlue.cpp
  • UTB_SEPARATOR : umain.h
  • UTextTableView_DoubleClick : UPseudoSupport.h
  • UTextTableView_SingleClick : UPseudoSupport.h
  • UTHROW : uconsole.h, stdafx.h

- v -

  • VAR_GLUE : PythonGlue.impl.h
  • VC_EXTRALEAN : StdAfx.h
  • VERSION_IE3 : CJToolBar.h
  • VERSION_IE4 : CJToolBar.h
  • VERSION_IE401 : CJToolBar.h
  • VERSION_WIN4 : CJToolBar.h
  • VERTF : CJDockContext.cpp
  • VOLSPATHS_C : VolsPaths.c

- w -

  • wantDebugging : stdafx.h
  • WATCHER_BACKGROUND_TIMEOUT : FileViewWatcher.cpp
  • WATCHER_FOREGROUND_TIMEOUT : FileViewWatcher.cpp
  • WATCHER_IGNORE_FACTOR : FileViewWatcher.cpp
  • WATCHER_RAPID_FACTOR : FileViewWatcher.cpp
  • WATCHER_RAPID_THRESHOLD : FileViewWatcher.cpp
  • WCHARFORMAT : wincvsView.h, AppConsole.h
  • WCVS_DEBUG_BUILD_STRING_PREFIX : version_fu.h
  • WCVS_DEBUG_FLAG : version_fu.h
  • WCVS_PATCHED_FLAG : version_fu.h
  • WCVS_PRERELEASE_BUILD_STRING_PREFIX : version_fu.h
  • WCVS_PRERELEASE_FLAG : version_fu.h
  • WCVS_PRIVATE_BUILD_FLAG : version_fu.h
  • WCVS_PRIVATE_BUILD_STRING : version_fu.h
  • WCVS_PRIVATE_BUILD_STRING_PREFIX : version_fu.h
  • WCVS_SPECIAL_BUILD_FLAG : version_fu.h
  • WCVS_SPECIAL_BUILD_STRING : version_fu.h
  • WCVS_SPECIAL_BUILD_STRING_PREFIX : version_fu.h
  • WCVS_UNICODE_BUILD_STRING_PREFIX : version_fu.h
  • WIDTHBYTES : dib.h
  • WIDTHBYTES16 : dib.h
  • WIDTHBYTES8 : dib.h
  • WINCMD_DLG_END : umain.h
  • WINCMD_DLG_START : umain.h
  • WINCMD_to_UCMD : umain.h
  • WINCTL_to_UCMD : umain.h
  • WINCVS_BETA_RELEASE : version_no.h
  • WINCVS_BUILD : version_no.h
  • WINCVS_FILE_MAJOR : version_no.h
  • WINCVS_FILE_MINOR : version_no.h
  • WINCVS_FILE_PATCHLEVEL : version_no.h
  • WINCVS_FILEVERSION : version_fu.h
  • WINCVS_FILEVERSION_STRING : version_fu.h
  • WINCVS_OFFICIAL_DISTRIBUTION : version_no.h
  • WINCVS_PRIVATE_BUILD : version_no.h
  • WINCVS_PRODUCT_MAJOR : version_no.h
  • WINCVS_PRODUCT_MINOR : version_no.h
  • WINCVS_PRODUCT_PATCHLEVEL : version_no.h
  • WINCVS_PRODUCTVERSION : version_fu.h
  • WINCVS_PRODUCTVERSION_STRING : version_fu.h
  • WINCVSDEBUG_H_INCLUDED : WinCvsDebug.h
  • WM_OUTBAR_NOTIFY : GfxOutBarCtrl.h
  • WM_READ_PROTOCOLS : CvsRootDlg.cpp
  • WS_EX_FLATEDGE : CJCaption.h
Generated on Sat Aug 7 22:58:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: File Members - Enumerations

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
b | c | d | e | h | i | k | m | s | t | u | w

- b -

  • BROWSE_TYPE : CJBrowseEdit.h
  • BTN_IMG_INDEX : CJControlBar.h

- c -

  • CHILD_BORDER : CJControlBar.h
  • computeSort : SortList.h

- d -

  • DATA_TYPE : CJSortClass.h

- e -

  • ent_type : CvsEntries.h

- h -

  • HIGHLIGHTSTYLE : CJMenu.h

- i -

  • ISO8559 : CvsPrefs.h

- k -

  • kActionType : MultilineEntryDlg.h
  • kAddCmdType : CvsCommands.h
  • kAdminOptionDlgType : AdminOptionDlg.h
  • kAnnotateCmdType : CvsCommands.h
  • kClassPersistent : Persistent.h
  • kConsoleColor : AppConsole.h
  • kCvsAlertButtonType : CvsAlert.h
  • kCvsAlertIconType : CvsAlert.h
  • kCvsRootDisplayType : CvsRootDlg.h
  • kDiffCmdType : CvsCommands.h
  • kEditCmdType : CvsCommands.h
  • kFilesSelectionType : PromptFiles.h
  • kFileType : TextBinary.h
  • kInfoCmdType : CvsRootDlg.h
  • kItemDisplayType : ItemListDlg.h
  • kItemListAutoRefreshType : ItemListDlg.h
  • kItemListDlg : ItemListDlg.h
  • kLaunchType : LaunchHandlers.h
  • kMultilineEntryType : MultilineEntryDlg.h
  • kNodeShape : GraphView.h
  • kProgressType : ProgressDlg.h
  • kReleaseDelType : ReleaseDlg.h
  • kSelDetType : SelectionDetailsDlg.h
  • kSelType : BrowseViewHandlers.h
  • kShellActionType : LaunchHandlers.cpp
  • kStatusPaneId : CvsStatusBar.h
  • kTagCmdType : CvsCommands.h
  • kTextBinTYPE : TextBinary.h
  • kTGraph : GraphView.h
  • kTraversal : FileTraversal.h
  • kWinVersion : CvsPrefs.h

- m -

  • MACENCODING : CvsPrefs.h

- s -

  • SCHEMA_NUMBER : CvsPrefs.h
  • SHELL_KIND : CvsPrefs.h
  • SHOWCVS_TYPE : CvsPrefs.h
  • STATUSOUTPUT_TYPE : CvsPrefs.h

- t -

  • tbeKind : utoolbar.cpp
  • TRACKINGSTATE : CJMenuBar.h

- u -

  • UCURSOR : umain.h
  • UEventParam : umain.h
  • UEventType : umain.h
  • UMSG_EXT : umain.h
  • UTB_DROP : umain.h
  • UTB_KIND : PseudoButton.h
  • UTB_VAR : umain.h

- w -

  • Win32Type : CJMenu.cpp
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: File Members - Enumeration values

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
_ | b | c | d | e | h | i | k | m | n | o | p | r | s | t | u | w

- _ -

  • _stderr_style : PythonGlue.cpp
  • _stdout_style : PythonGlue.cpp
  • _trace_style : PythonGlue.cpp

- b -

  • BT_DIRECTORY : CJBrowseEdit.h
  • BT_FILE : CJBrowseEdit.h
  • BT_POPUPMENU : CJBrowseEdit.h

- c -

  • cmdABOUT : UCvsCommands.h
  • cmdADD : UCvsCommands.h
  • cmdADDB : UCvsCommands.h
  • cmdADMINMACROS : UCvsCommands.h
  • cmdARRANGE : UCvsCommands.h
  • cmdBROWSER_BAR : UCvsCommands.h
  • cmdCASCADE : UCvsCommands.h
  • cmdCHECKOUT : UCvsCommands.h
  • cmdCLEAR_ALL : UCvsCommands.h
  • cmdCMDLINE : UCvsCommands.h
  • cmdCOMMIT : UCvsCommands.h
  • cmdCONSOLE_BAR : UCvsCommands.h
  • cmdCOPY : UCvsCommands.h
  • cmdCOPYRIGHTS : UCvsCommands.h
  • cmdCREDITS : UCvsCommands.h
  • cmdCUT : UCvsCommands.h
  • cmdCVS : UCvsCommands.h
  • cmdCVSCLIENT : UCvsCommands.h
  • cmdDIFF : UCvsCommands.h
  • cmdEDIT : UCvsCommands.h
  • cmdEDITORS : UCvsCommands.h
  • cmdEDITSEL : UCvsCommands.h
  • cmdEDITSELDEF : UCvsCommands.h
  • cmdEXIT : UCvsCommands.h
  • cmdEXPLORE : UCvsCommands.h
  • cmdFILES_BAR : UCvsCommands.h
  • cmdFIND : UCvsCommands.h
  • cmdFINDER : UCvsCommands.h
  • cmdFLAT : UCvsCommands.h
  • cmdFONT : UCvsCommands.h
  • cmdGRAPH : UCvsCommands.h
  • cmdHIDE_UNKNOWN : UCvsCommands.h
  • cmdIGNORE : UCvsCommands.h
  • cmdIMPORT : UCvsCommands.h
  • cmdINIT : UCvsCommands.h
  • cmdLOCKF : UCvsCommands.h
  • cmdLOG : UCvsCommands.h
  • cmdLOGIN : UCvsCommands.h
  • cmdLOGOUT : UCvsCommands.h
  • cmdMACROADMIN : UCvsCommands.h
  • cmdMACROADMINEND : UCvsCommands.h
  • cmdMACROS : UCvsCommands.h
  • cmdMULTI_BAR : UCvsCommands.h
  • cmdOPEN : UCvsCommands.h
  • cmdPASTE : UCvsCommands.h
  • cmdPREFERENCES : UCvsCommands.h
  • cmdPRINT : UCvsCommands.h
  • cmdPRINT_PREVIEW : UCvsCommands.h
  • cmdPRINT_SETUP : UCvsCommands.h
  • cmdQUERYUPDATE : UCvsCommands.h
  • cmdRELEASE : UCvsCommands.h
  • cmdRELOAD : UCvsCommands.h
  • cmdREPEAT : UCvsCommands.h
  • cmdRESEDIT : UCvsCommands.h
  • cmdRMV : UCvsCommands.h
  • cmdRTAGBRANCH : UCvsCommands.h
  • cmdRTAGCREATE : UCvsCommands.h
  • cmdRTAGDELETE : UCvsCommands.h
  • cmdSAVE : UCvsCommands.h
  • cmdSAVE_AS : UCvsCommands.h
  • cmdSAVESETTINGS : UCvsCommands.h
  • cmdSELECT_ALL : UCvsCommands.h
  • cmdSELMACRO : UCvsCommands.h
  • cmdSELMACROEND : UCvsCommands.h
  • cmdSEND_MAIL : UCvsCommands.h
  • cmdSHELL : UCvsCommands.h
  • cmdSTATUS : UCvsCommands.h
  • cmdSTATUS_BAR : UCvsCommands.h
  • cmdSTOPCVS : UCvsCommands.h
  • cmdTAGBRANCH : UCvsCommands.h
  • cmdTAGDELETE : UCvsCommands.h
  • cmdTAGNEW : UCvsCommands.h
  • cmdTAGS_BAR : UCvsCommands.h
  • cmdTILE_HORZ : UCvsCommands.h
  • cmdTOOLBAR : UCvsCommands.h
  • cmdTRASH : UCvsCommands.h
  • cmdUNDO : UCvsCommands.h
  • cmdUNEDIT : UCvsCommands.h
  • cmdUNLOCKF : UCvsCommands.h
  • cmdUPDATE : UCvsCommands.h
  • cmdUPFOLDER : UCvsCommands.h
  • cmdUSE_PYSHELL : UCvsCommands.h
  • cmdUSE_TCLSHELL : UCvsCommands.h
  • cmdVIEW_ADDED : UCvsCommands.h
  • cmdVIEW_CHANGED : UCvsCommands.h
  • cmdVIEW_CONFLICT : UCvsCommands.h
  • cmdVIEW_FILEMASK : UCvsCommands.h
  • cmdVIEW_MISSING : UCvsCommands.h
  • cmdVIEW_MODIFIED : UCvsCommands.h
  • cmdVIEW_REMOVED : UCvsCommands.h
  • cmdVIEW_UNKNOWN : UCvsCommands.h
  • cmdWATCHERS : UCvsCommands.h
  • cmdWATCHOFF : UCvsCommands.h
  • cmdWATCHON : UCvsCommands.h
  • cmdWORKSPACE : UCvsCommands.h
  • COL_DESC : ImportFilterDlg.cpp
  • COL_KIND : ImportFilterDlg.cpp
  • COL_NUM : ImportFilterDlg.cpp
  • COL_STATE : ImportFilterDlg.cpp
  • computeLR : SortList.h
  • computeNone : SortList.h

- d -

  • DD_BMAP : PseudoButton.h
  • DD_END : PseudoButton.h
  • DD_PIXMAP : PseudoButton.h
  • DD_RGB : PseudoButton.h
  • DDD_NONE : umain.h
  • DDV_NONE : umain.h
  • DT_DATETIME : CJSortClass.h
  • DT_DEC : CJSortClass.h
  • DT_INT : CJSortClass.h
  • DT_STRING : CJSortClass.h

- e -

  • ENT_FILE : CvsEntries.h
  • ENT_SUBDIR : CvsEntries.h
  • epi_i : umain.h
  • epi_ii : umain.h
  • epi_iVP : umain.h
  • epi_V : umain.h
  • epi_VP : umain.h
  • epNone : umain.h
  • epV_I : umain.h
  • epV_i : umain.h
  • epV_ii : umain.h
  • epV_iii : umain.h
  • epV_iiVP : umain.h
  • epV_iVP : umain.h
  • epV_IVP : umain.h
  • epV_V : umain.h
  • epV_VP : umain.h
  • EV_BTNDBLDOWN : umain.h
  • EV_BTNDOWN : umain.h
  • EV_BTNUP : umain.h
  • EV_CHGCURSOR : umain.h
  • EV_CHGFOCUS : umain.h
  • EV_CMD : umain.h
  • EV_COMBO_APPEND : umain.h
  • EV_COMBO_DELSEL : umain.h
  • EV_COMBO_ENABLESEL : umain.h
  • EV_COMBO_GETCOUNT : umain.h
  • EV_COMBO_GETMENU : umain.h
  • EV_COMBO_GETSEL : umain.h
  • EV_COMBO_RESETALL : umain.h
  • EV_COMBO_SEL : umain.h
  • EV_COMBO_SETSEL : umain.h
  • EV_COMMAND_START : umain.h
  • EV_CREATE : umain.h
  • EV_CUSTOM_CLICK : umain.h
  • EV_CUSTOM_DRAW : umain.h
  • EV_DESTROY : umain.h
  • EV_DRAGQUERY : umain.h
  • EV_DROPIT : umain.h
  • EV_DROPQUERY : umain.h
  • EV_DROPQUERY_CMDID : umain.h
  • EV_DROPREF : umain.h
  • EV_EDITACTIVATE : umain.h
  • EV_EDITCHANGE : umain.h
  • EV_ENABLECMD : umain.h
  • EV_ENTER : umain.h
  • EV_EXPOSE : umain.h
  • EV_FETCHCMD : umain.h
  • EV_GET_SLIDERPROP : umain.h
  • EV_GETFLOAT : umain.h
  • EV_GETINTEGER : umain.h
  • EV_GETLOC : umain.h
  • EV_GETTEXT : umain.h
  • EV_INIT_TAB_WIDGET : umain.h
  • EV_INIT_WIDGET : umain.h
  • EV_INVALIDATE : umain.h
  • EV_KEYDOWN : umain.h
  • EV_LEAVE : umain.h
  • EV_LIST_ADDCOLUMNS : umain.h
  • EV_LIST_ADDSEL : umain.h
  • EV_LIST_DBLCLICK : umain.h
  • EV_LIST_DELROW : umain.h
  • EV_LIST_GETINFO : umain.h
  • EV_LIST_GETNEXT : umain.h
  • EV_LIST_GETNEXTSEL : umain.h
  • EV_LIST_HIDECOLUMNS : umain.h
  • EV_LIST_INSERT : umain.h
  • EV_LIST_NEWROW : umain.h
  • EV_LIST_POPUP : umain.h
  • EV_LIST_RESETALL : umain.h
  • EV_LIST_RESORT : umain.h
  • EV_LIST_ROWGETDATA : umain.h
  • EV_LIST_ROWSETDATA : umain.h
  • EV_LIST_SELCOLUMN : umain.h
  • EV_LIST_SELECTING : umain.h
  • EV_LIST_SETCOLTITLE : umain.h
  • EV_LIST_SETCOLWIDTH : umain.h
  • EV_LIST_SETFEEDBACK : umain.h
  • EV_LIST_SETSORTDIR : umain.h
  • EV_LIST_SHOWCOLUMNS : umain.h
  • EV_MMOVE : umain.h
  • EV_NONE : umain.h
  • EV_NOTIFY : umain.h
  • EV_PAGE_CHANGED : umain.h
  • EV_QUERYSTATE : umain.h
  • EV_REDRAW : umain.h
  • EV_RESIZE : umain.h
  • EV_SCROLLCHANGE : umain.h
  • EV_SET_SLIDER : umain.h
  • EV_SET_SLIDERPROP : umain.h
  • EV_SETCURSOR : umain.h
  • EV_SETDEFAULT : umain.h
  • EV_SETFLOAT : umain.h
  • EV_SETICON : umain.h
  • EV_SETINTEGER : umain.h
  • EV_SETLOC : umain.h
  • EV_SETSTATE : umain.h
  • EV_SETTEXT : umain.h
  • EV_SETTOOLTIP : umain.h
  • EV_SHOW_WIDGET : umain.h
  • EV_SMARTCOMBO_SETFEATURE : umain.h
  • EV_SMARTCOMBO_SETITEMS : umain.h
  • EV_SMARTCOMBO_SETREADONLY : umain.h
  • EV_STATUSBAR_TEXT : umain.h
  • EV_TB_BUTTON : umain.h
  • EV_TB_CHECKBTN : umain.h
  • EV_TB_DROPDOWN : umain.h
  • EV_TB_END : umain.h
  • EV_TB_GETCOLOR : umain.h
  • EV_TB_INIT : umain.h
  • EV_TB_SEPARATOR : umain.h
  • EV_TIMER : umain.h
  • EV_TREE_DELETE : umain.h
  • EV_TREE_EXPAND : umain.h
  • EV_TREE_EXPANDING : umain.h
  • EV_TREE_GETINFO : umain.h
  • EV_TREE_GETSEL : umain.h
  • EV_TREE_INSERT : umain.h
  • EV_TREE_RESETALL : umain.h
  • EV_TREE_SELECT : umain.h
  • EV_TREE_SELECTING : umain.h
  • EV_TREE_SETDATA : umain.h
  • EV_TREE_SETICON : umain.h
  • EV_UPDATEFOCUS : umain.h
  • EV_UPDATEUI : umain.h
  • EV_UPDTCMD : umain.h

- h -

  • HIDE_CONTRLBAR : CJControlBar.h

- i -

  • ISO8559_1 : CvsPrefs.h
  • ISO8559_10 : CvsPrefs.h
  • ISO8559_1_MacCvsPro : CvsPrefs.h
  • ISO8559_2 : CvsPrefs.h
  • ISO8559_3 : CvsPrefs.h
  • ISO8559_4 : CvsPrefs.h
  • ISO8559_5 : CvsPrefs.h
  • ISO8559_6 : CvsPrefs.h
  • ISO8559_7 : CvsPrefs.h
  • ISO8559_8 : CvsPrefs.h
  • ISO8559_9 : CvsPrefs.h
  • ISO8559_none : CvsPrefs.h

- k -

  • kActionBrowseModule : MultilineEntryDlg.h
  • kActionBrowseTag : MultilineEntryDlg.h
  • kActionFormatCvsRoot : MultilineEntryDlg.h
  • kActionOpenEditor : MultilineEntryDlg.h
  • kActionOpenTemplate : MultilineEntryDlg.h
  • kAddBinary : CvsCommands.h
  • kAddNormal : CvsCommands.h
  • kAddSettings : Persistent.h
  • kAddUnicode : CvsCommands.h
  • kAnnotateFile : CvsCommands.h
  • kAnnotateGraph : CvsCommands.h
  • kAutoRefreshAlways : ItemListDlg.h
  • kAutoRefreshDisable : ItemListDlg.h
  • kAutoRefreshFirstTime : ItemListDlg.h
  • kBinIsText : TextBinary.h
  • kBinIsUnicode : TextBinary.h
  • kBinWrongSig : TextBinary.h
  • kBlue : AppConsole.h
  • kBold : AppConsole.h
  • kBrown : AppConsole.h
  • kChangeLog : AdminOptionDlg.h
  • kCompareAnotherRev : DiffDlg.h
  • kCompareSameRev : DiffDlg.h
  • kCompareTwoRev : DiffDlg.h
  • kContinueTraversal : FileTraversal.h
  • kCustomBrowserMenu : wincvs_winutil.h
  • kCustomFilesMenu : wincvs_winutil.h
  • kCvsAlertCancelButton : CvsAlert.h
  • kCvsAlertNoIcon : CvsAlert.h
  • kCvsAlertNoteIcon : CvsAlert.h
  • kCvsAlertOKButton : CvsAlert.h
  • kCvsAlertOtherButton : CvsAlert.h
  • kCvsAlertQuestionIcon : CvsAlert.h
  • kCvsAlertStopIcon : CvsAlert.h
  • kCvsAlertWarningIcon : CvsAlert.h
  • kCvsRootDisplayData : CvsRootDlg.h
  • kCvsRootDisplayInfo : CvsRootDlg.h
  • kCvsRootDisplayWait : CvsRootDlg.h
  • kDiffFile : CvsCommands.h
  • kDiffFolder : CvsCommands.h
  • kDiffGraph : CvsCommands.h
  • kEditForce : CvsCommands.h
  • kEditNormal : CvsCommands.h
  • kEditReserved : CvsCommands.h
  • kFileIconAdded : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconBinary : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconBinaryAdded : BrowseFileView.h
  • kFileIconBinaryMod : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconConflict : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconIgnored : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconMiss : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconRemoved : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconText : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconTextMod : BrowseFileView.h, UCvsFiles.cpp
  • kFileIconUnicode : BrowseFileView.h
  • kFileIconUnicodeAdded : BrowseFileView.h
  • kFileIconUnicodeMod : BrowseFileView.h
  • kFileIconUnknown : BrowseFileView.h, UCvsFiles.cpp
  • kFileInvalidName : TextBinary.h
  • kFileIsAlias : TextBinary.h
  • kFileIsOK : TextBinary.h
  • kFileMissing : TextBinary.h
  • kFileTypeBin : TextBinary.h
  • kFileTypeText : TextBinary.h
  • kFileTypeUnicode : TextBinary.h
  • kFilterAdded : BrowseViewModel.h
  • kFilterChanged : BrowseViewModel.h
  • kFilterConflicts : BrowseViewModel.h
  • kFilterHideMissing : BrowseViewModel.h
  • kFilterHideUnknown : BrowseViewModel.h
  • kFilterMissing : BrowseViewModel.h
  • kFilterModified : BrowseViewModel.h
  • kFilterNone : BrowseViewModel.h
  • kFilterRemoved : BrowseViewModel.h
  • kFilterUnknown : BrowseViewModel.h
  • kFolderIcon : BrowseFileView.h, UCvsFiles.cpp
  • kFolderIconIgnored : BrowseFileView.h, UCvsFiles.cpp
  • kFolderIconMiss : BrowseFileView.h, UCvsFiles.cpp
  • kFolderIconUnknown : BrowseFileView.h, UCvsFiles.cpp
  • kGreen : AppConsole.h
  • kHierarchicalMax : UPseudoSupport.cpp
  • kHierarchicalMin : UPseudoSupport.cpp
  • kIconFolderClosed : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderCVSClosed : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderCVSOpened : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderIgnoreClosed : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderIgnoreLost : UCvsFolders.cpp
  • kIconFolderIgnoreOpened : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kIconFolderLost : WinCvsBrowser.cpp
  • kIconFolderOpened : WinCvsBrowser.cpp, UCvsFolders.cpp
  • kInfoCmd : CvsRootDlg.h
  • kItalic : AppConsole.h
  • kItemDisplayData : ItemListDlg.h
  • kItemDisplayInfo : ItemListDlg.h
  • kItemDisplayWait : ItemListDlg.h
  • kItemListModule : ItemListDlg.h
  • kItemListTag : ItemListDlg.h
  • kLaunchDefault : LaunchHandlers.h
  • kLaunchDefaultEdit : LaunchHandlers.h
  • kLaunchEdit : LaunchHandlers.h
  • kLaunchEnd : LaunchHandlers.h
  • kLaunchOpen : LaunchHandlers.h
  • kLaunchOpenAs : LaunchHandlers.h
  • kLocationIcon : HistComboBoxEx.h
  • kLocationIconErased : HistComboBoxEx.h
  • kLocationIconIgnored : HistComboBoxEx.h
  • kLocationIconMissing : HistComboBoxEx.h
  • kLocationIconUnknown : HistComboBoxEx.h
  • kMagenta : AppConsole.h
  • kMultilineCmdLine : MultilineEntryDlg.h
  • kMultilineDescription : MultilineEntryDlg.h
  • kMultilineLogMessage : MultilineEntryDlg.h
  • kMultilineState : MultilineEntryDlg.h
  • kNL : AppConsole.h
  • kNoClass : Persistent.h
  • kNormal : AppConsole.h
  • kOctangle : GraphView.h
  • kProgressBar : ProgressDlg.h
  • kProgressFile : ProgressDlg.h
  • kProgressText : ProgressDlg.h
  • kProtocolCmd : CvsRootDlg.h
  • kRectangle : GraphView.h
  • kRed : AppConsole.h
  • kReleaseDelAll : ReleaseDlg.h
  • kReleaseDelCvsInfo : ReleaseDlg.h
  • kReleaseDelDir : ReleaseDlg.h
  • kReleaseNoDel : ReleaseDlg.h
  • kRoundRect : GraphView.h
  • kSelDetFile : SelectionDetailsDlg.h
  • kSelDetPath : SelectionDetailsDlg.h
  • kSelDetRevision : SelectionDetailsDlg.h
  • kSelDir : BrowseViewHandlers.h
  • kSelectAny : PromptFiles.h
  • kSelectDll : PromptFiles.h
  • kSelectExecutable : PromptFiles.h
  • kSelFiles : BrowseViewHandlers.h
  • kSelNone : BrowseViewHandlers.h
  • kSetDescription : AdminOptionDlg.h
  • kSetState : AdminOptionDlg.h
  • kShellActionDefault : LaunchHandlers.cpp
  • kShellActionEdit : LaunchHandlers.cpp
  • kShellActionExplore : LaunchHandlers.cpp
  • kShellActionOpen : LaunchHandlers.cpp
  • kShellActionOpenAs : LaunchHandlers.cpp
  • kShellActionProperties : LaunchHandlers.cpp
  • kSkipFile : FileTraversal.h
  • kStatusCVSROOT : CvsStatusBar.h
  • kStatusMain : CvsStatusBar.h
  • kStatusRepository : CvsStatusBar.h
  • kStatusThrobber : CvsStatusBar.h
  • kStopTraversal : FileTraversal.h
  • kTagBranch : CvsCommands.h
  • kTagCreate : CvsCommands.h
  • kTagDelete : CvsCommands.h
  • kTContinue : GraphView.h
  • kTextEscapeChar : TextBinary.h
  • kTextIsBinary : TextBinary.h
  • kTextIsUnicode : TextBinary.h
  • kTextWrongLF : TextBinary.h
  • kTextWrongSig : TextBinary.h
  • kTGetDown : GraphView.h
  • kTraversalError : FileTraversal.h
  • kTStop : GraphView.h
  • kUCvsBrowseToolbarID : UCvsCommands.h
  • kUCvsFilesID : UCvsCommands.h
  • kUCvsFilterToolbarID : UCvsCommands.h
  • kUCvsFoldersID : UCvsCommands.h
  • kUCvsFrameID : UCvsCommands.h
  • kUCvsMenubarID : UCvsCommands.h
  • kUCvsStatusbarID : UCvsCommands.h
  • kUCvsToolbarID : UCvsCommands.h
  • kUMainConsoleID : UCvsCommands.h
  • kUnderline : AppConsole.h
  • kUnicodeIsBinary : TextBinary.h
  • kUnicodeIsText : TextBinary.h
  • kWin16 : CvsPrefs.h
  • kWin32 : CvsPrefs.h
  • kWinNT35 : CvsPrefs.h
  • kWinNT4 : CvsPrefs.h

- m -

  • MAC_APPSINGLE : CvsPrefs.h
  • MAC_HQX : CvsPrefs.h
  • MAC_PLAIN_BINARY : CvsPrefs.h
  • MAXI_H_DISABLE : CJControlBar.h
  • MAXI_H_ENABLED : CJControlBar.h
  • MAXI_V_DISABLE : CJControlBar.h
  • MAXI_V_ENABLED : CJControlBar.h

- n -

  • NONE : CJControlBar.h
  • NORM_H_DISABLE : CJControlBar.h
  • NORM_H_ENABLED : CJControlBar.h
  • NORM_V_DISABLE : CJControlBar.h
  • NORM_V_ENABLED : CJControlBar.h
  • Normal : CJMenu.h

- o -

  • OUTLINE : CJControlBar.h

- p -

  • PERMUTE : getopt.c

- r -

  • RAISED : CJControlBar.h
  • REQUIRE_ORDER : getopt.c
  • RETURN_IN_ORDER : getopt.c

- s -

  • SCHEMA_0 : CvsPrefs.h
  • SCHEMA_1 : CvsPrefs.h
  • SCHEMA_2 : CvsPrefs.h
  • SCHEMA_CURRENT : CvsPrefs.h
  • SHELL_PYTHON : CvsPrefs.h
  • SHELL_TCL : CvsPrefs.h
  • SHOWCVS_HIDE : CvsPrefs.h
  • SHOWCVS_SHOWMINNOACTIVE : CvsPrefs.h
  • SHOWCVS_SHOWNOACTIVATE : CvsPrefs.h
  • SHOWCVS_SHOWNORMAL : CvsPrefs.h
  • STATUSOUTPUT_QUICK : CvsPrefs.h
  • STATUSOUTPUT_STANDARD : CvsPrefs.h
  • STATUSOUTPUT_VERBOSE : CvsPrefs.h
  • SUNKEN : CJControlBar.h

- t -

  • tbeButton : utoolbar.cpp
  • tbeDropDown : utoolbar.cpp
  • tbeSeparator : utoolbar.cpp
  • TextOnly : CJMenu.h
  • TRACK_BUTTON : CJMenuBar.h
  • TRACK_NONE : CJMenuBar.h
  • TRACK_POPUP : CJMenuBar.h

- u -

  • uCursArrow : umain.h
  • uCursWatch : umain.h
  • UMSG_NOEXT : umain.h
  • UMSG_RANGE : umain.h

- w -

  • Win32s : CJMenu.cpp
  • Windoze95 : CJMenu.cpp
  • WinNT3 : CJMenu.cpp
  • WinNT4orHigher : CJMenu.cpp
  • WM_SMCB_MAX : SmartComboBox.h
  • WM_SMCB_MIN : SmartComboBox.h
  • WM_SMCB_SETFEATURE : SmartComboBox.h
  • WM_SMCB_SETITEMS : SmartComboBox.h
  • WM_SMCB_SETREADONLY : SmartComboBox.h
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: File Members - Functions

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
_ | a | b | c | d | e | f | g | h | i | l | m | n | o | p | r | s | t | u | v | w

- _ -

  • __cvs_initialize() : dll_glue.c
  • __cvs_terminate() : dll_glue.c
  • __initialize() : dll_glue.c
  • __terminate() : dll_glue.c
  • _AfxRelease() : CJHtmlView.cpp
  • _ANSI_ARGS_() : TclGlue.cpp
  • _CarbonCompatCallLibrary() : TclGlue.mac.h
  • _CjxChildWindowFromPoint() : CJReBar.cpp
  • _Compare() : BrowseViewColumn.h, BrowseViewColumn.cpp
  • _CompatCallLibrary() : dll_loader.h, dll_loader.c
  • _dosmaperr() : Stat.cpp
  • _GetComCtlVersion() : CJToolBar.h, CJToolBar.cpp
  • _GetDropDownWidth() : CJToolBar.cpp
  • _GetMenuEntryRecurs() : wincvs_winutil.cpp
  • _getopt_initialize() : getopt.c
  • _getopt_internal() : getopt.h, getopt.c
  • _loadPersistentSettings() : Persistent.cpp
  • _LoadSysColorBitmap() : CJToolBar.h, CJToolBar.cpp
  • _statcore() : Stat.cpp
  • _tcl_cfm_macho() : TclGlue.mac.h

- a -

  • AboutDialog() : AboutDlg.h, AboutDlg.cpp
  • addAccel() : umenu.cpp
  • AdjustRectangle() : CJDockContext.cpp
  • AskCreatePersistentSettings() : Persistent.h, Persistent.cpp

- b -

  • BrowseForFile() : GetPrefs.cpp
  • BrowserGetDirectory() : PromptFiles.h, PromptFiles.cpp
  • BrowserGetMultiFiles() : PromptFiles.h, PromptFiles.cpp
  • BrowserGetSaveasFile() : PromptFiles.h, PromptFiles.cpp
  • BuildIgnoredList() : CvsIgnore.h, CvsIgnore.cpp

- c -

  • CarbonCompatCloseLibrary() : TclGlue.mac.h
  • CarbonCompatLoadLibrary() : TclGlue.mac.h
  • CFString_to_UStr() : MacMisc.h
  • CheckLocationDriveType() : wincvs_winutil.h, wincvs_winutil.cpp
  • CheckSelectionHandler() : CvsCommands.cpp
  • CleanupLogMsg() : ustr.h, ustr.cpp
  • CloneStr() : CvsEntries.cpp
  • closedir() : ndir.h, ndir.c
  • CompareTargetDate() : Stat.cpp
  • CompatBeginMoveToTrash() : MoveToTrash.h, MoveToTrash.cpp
  • CompatCloseLibrary() : dll_loader.h, dll_loader.c
  • CompatEndMoveToTrash() : MoveToTrash.h, MoveToTrash.cpp
  • CompatGetAdminOptions() : AdminOptionDlg.h, AdminOptionDlg.cpp
  • CompatGetAnnotate() : AnnotateDlg.h, AnnotateDlg.cpp
  • CompatGetCheckout() : CheckoutDlg.h, CheckoutDlg.cpp
  • CompatGetCommand() : LineCmd.h, LineCmd.cpp
  • CompatGetCommit() : CommitDlg.h, CommitDlg.cpp
  • CompatGetCvsRoot() : CvsRootDlg.h, CvsRootDlg.cpp
  • CompatGetCvsTemplate() : TemplateDlg.h, TemplateDlg.cpp
  • CompatGetDiff() : DiffDlg.h, DiffDlg.cpp
  • CompatGetEditorMsg() : EditorMonDlg.h, EditorMonDlg.cpp
  • CompatGetFileAction() : FileActionDlg.h, FileActionDlg.cpp
  • CompatGetFilterMaskOptions() : FilterMaskOptDlg.h, FilterMaskOptDlg.cpp
  • CompatGetFilterSelection() : FilterSelectionDlg.h, FilterSelectionDlg.cpp
  • CompatGetGraphOptions() : GraphOptDlg.h, GraphOptDlg.cpp
  • CompatGetImport() : ImportDlg.h, ImportDlg.cpp
  • CompatGetInit() : InitDlg.h, InitDlg.cpp
  • CompatGetLog() : LogDlg.h, LogDlg.cpp
  • CompatGetLogin() : LoginDlg.h, LoginDlg.cpp
  • CompatGetModuleListItem() : ItemListDlg.h, ItemListDlg.cpp
  • CompatGetPassword() : GetPassword.h, GetPassword.cpp
  • CompatGetPrefs() : GetPrefs.h, GetPrefs.cpp
  • CompatGetRelease() : ReleaseDlg.h, ReleaseDlg.cpp
  • CompatGetRtag() : RtagDlg.h, RtagDlg.cpp
  • CompatGetSelectionDetails() : SelectionDetailsDlg.h, SelectionDetailsDlg.cpp
  • CompatGetStatus() : StatusDlg.h, StatusDlg.cpp
  • CompatGetTag() : TagDlg.h, TagDlg.cpp
  • CompatGetTagListItem() : ItemListDlg.h, ItemListDlg.cpp
  • CompatGetUpdate() : UpdateDlg.h, UpdateDlg.cpp
  • CompatImportFilter() : ImportFilterDlg.h, ImportFilterDlg.cpp
  • CompatLoadLibrary() : dll_loader.h, dll_loader.c
  • CompatMakeSurePathExists() : MakeSurePathExists.h, MakeSurePathExists.cpp
  • CompatMoveToTrash() : MoveToTrash.h, MoveToTrash.cpp
  • ConvertString() : MacMisc.h
  • copy_list_types() : ImportFilter.h, ImportFilter.cpp
  • CopyRect() : udraw.h
  • CopyScreenToBitmap() : dib.h, dib.c
  • CreateBrowseToolbar() : UCvsToolbar.h, UCvsToolbar.cpp
  • CreateDIB() : dib.h, dib.c
  • CreateFilterToolbar() : UCvsToolbar.h, UCvsToolbar.cpp
  • CreateFolder() : MakeSurePathExists.h, MakeSurePathExists.cpp
  • CreateMainMenubar() : UCvsMenubar.h, UCvsMenubar.cpp
  • CreateMainToolbar() : UCvsToolbar.h, UCvsToolbar.cpp
  • CustGetByKey() : CustomizeMenus.h, CustomizeMenus.cpp
  • CustMenuCompare() : CustomizeMenus.cpp
  • CustomizeMenus() : CustomizeMenus.h, CustomizeMenus.cpp
  • cvs_err() : AppConsole.h, AppConsole.cpp
  • cvs_errstr() : AppConsole.h, AppConsole.cpp
  • cvs_out() : AppConsole.h, AppConsole.cpp
  • cvs_outstr() : AppConsole.h, AppConsole.cpp
  • CvsCmdAdd() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdAnnotate() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdCancelChanges() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdCheckoutModule() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdCommandLine() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdCommit() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdDiff() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdEdit() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdEditors() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdFileAction() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdImportModule() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdInit() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLaunch() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLock() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLog() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLogin() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdLogout() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdMacrosAdmin() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdMoveToTrash() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdRelease() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdRemove() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdRtag() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdStatus() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdTag() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdUnedit() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdUnlock() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdUpdate() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdWatchers() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdWatchOff() : CvsCommands.h, CvsCommands.cpp
  • CvsCmdWatchOn() : CvsCommands.h, CvsCommands.cpp
  • cvsgui_GetCvsEntries() : PythonGlue.cpp
  • cvsgui_GetFileModTime() : PythonGlue.cpp
  • cvsgui_GetHistoryAsXML() : PythonGlue.cpp
  • cvsgui_GetMainMenuWidget() : PythonGlue.cpp
  • cvsgui_GetSelection() : PythonGlue.cpp
  • cvsgui_GetTopMacroAdminMenu() : PythonGlue.cpp
  • cvsgui_GetTopMacroSelectionMenu() : PythonGlue.cpp
  • cvsgui_LaunchBrowser() : PythonGlue.cpp
  • cvsgui_LaunchTclMacro() : PythonGlue.cpp
  • cvsgui_PromptEditMessage() : PythonGlue.cpp
  • cvsgui_PromptMessage() : PythonGlue.cpp
  • cvsgui_RunCvs() : PythonGlue.cpp
  • cvsgui_write() : PythonGlue.cpp
  • CvsLogOutput() : LogParse.h, LogParse.cpp
  • CvsLogParse() : LogParse.h, LogParse.cpp

- d -

  • DDBtoDIB() : dib.h, dib.c
  • DDV_CheckCVSROOT() : wincvs.h, wincvs.cpp
  • DDV_CheckPathExists() : wincvs.h, wincvs.cpp
  • DDV_CJMinMaxDateTime() : CJDateTimeCtrl.h, CJDateTimeCtrl.cpp
  • DDV_CJMinMaxMonth() : CJDateTimeCtrl.h, CJDateTimeCtrl.cpp
  • DDV_MinChars() : wincvs.h, wincvs.cpp
  • DDX_CJColorPicker() : CJColorPicker.h, CJColorPicker.cpp
  • DDX_CJDateTimeCtrl() : CJDateTimeCtrl.h, CJDateTimeCtrl.cpp
  • DDX_CJMonthCalCtrl() : CJDateTimeCtrl.h, CJDateTimeCtrl.cpp
  • DDX_ComboMString() : wincvs.h, wincvs.cpp
  • DDX_OleDateTime() : CJMaskEdit.h, CJMaskEdit.cpp
  • DeferClientPos() : GfxSplitterWnd.cpp
  • DibCopyPalette() : dib.h, dib.c
  • DibGetPaletteSize() : dib.h, dib.c
  • DibNumColors() : dib.h, dib.c
  • DIBToBitmap() : dib.h, dib.c
  • DisposeStr() : CvsEntries.cpp
  • dllglue_consoleerr() : dll_glue.h, dll_glue.c
  • dllglue_consolein() : dll_glue.h, dll_glue.c
  • dllglue_consoleout() : dll_glue.h, dll_glue.c
  • dllglue_decode_file() : dll_glue.h, dll_glue.c
  • dllglue_dispatchevent() : dll_glue.h, dll_glue.c
  • dllglue_exit() : dll_glue.h, dll_glue.c
  • dllglue_flushconsole() : dll_glue.h, dll_glue.c
  • dllglue_getenv() : dll_glue.h, dll_glue.c
  • dllglue_main() : dll_glue.h, dll_glue.c
  • dllglue_setconsoleerr() : dll_glue.h, dll_glue.c
  • dllglue_setconsolein() : dll_glue.h, dll_glue.c
  • dllglue_setconsoleout() : dll_glue.h, dll_glue.c
  • dllglue_seteventdispatch() : dll_glue.h, dll_glue.c
  • dllglue_setgetenv() : dll_glue.h, dll_glue.c
  • DllMain() : CJLibrary.cpp
  • DrawNode() : GraphView.cpp, UCvsGraph.cpp
  • DrawOctangle() : GraphView.cpp

- e -

  • EditStreamCallBack() : wincvsDoc.cpp
  • EnableEditAutoComplete() : wincvs_winutil.h, wincvs_winutil.cpp
  • Entries_Open() : CvsEntries.h, CvsEntries.cpp
  • Entries_SetMissing() : CvsEntries.h, CvsEntries.cpp
  • Entries_SetVisited() : CvsEntries.h, CvsEntries.cpp
  • EqualRect() : udraw.h, udraw.cpp
  • exchange() : getopt.c
  • expandLF() : CvsArgs.cpp
  • extractInfos() : UPseudoSupport.cpp

- f -

  • FileIsBinary() : TextBinary.h, TextBinary.cpp
  • FileIsText() : TextBinary.h, TextBinary.cpp
  • FileIsUnicode() : TextBinary.h, TextBinary.cpp
  • FileTimeToUnixTime() : Stat.cpp
  • FileTraverse() : FileTraversal.h, FileTraversal.cpp
  • FillBuffer() : TextBinary.cpp
  • FindBestLastCvsroot() : CvsPrefs.h, CvsPrefs.cpp
  • FindBestLastModuleName() : CvsPrefs.h, CvsPrefs.cpp
  • FindExtension() : CvsEntries.cpp
  • findIdForWnd() : PseudoDlg.cpp
  • findmostright() : UPseudoSupport.cpp
  • FindNextChildWindow() : wincvs_winutil.cpp
  • FindNextSiblingWindow() : wincvs_winutil.cpp
  • FindNextWindow() : wincvs_winutil.h, wincvs_winutil.cpp
  • FindPrevSiblingWindow() : wincvs_winutil.cpp
  • FindPrevWindow() : wincvs_winutil.h, wincvs_winutil.cpp
  • FlatenSubFolders() : ustr.h, ustr.cpp
  • flush_all() : dll_glue.c
  • fnmatch() : fnmatch.h, fnmatch.c
  • FormatCvsRoot() : CvsRootDlg.cpp
  • FormatDefaultSettingsLoc() : Persistent.h, Persistent.cpp
  • FormatItemDescription() : ItemListDlg.cpp
  • FormatListPath() : ItemListDlg.cpp
  • FormatMillisecondTime() : wincvs_winutil.h, wincvs_winutil.cpp
  • free_dircontents() : ndir.c
  • free_list_types() : ImportFilter.h, ImportFilter.cpp

- g -

  • garby_alloc() : dll_garbage.c
  • garby_free() : dll_garbage.c
  • GARBY_KEY() : dll_garbage.c
  • garby_realloc() : dll_garbage.c
  • garbyNew() : dll_garbage.h, dll_garbage.c
  • garbyRemove() : dll_garbage.h, dll_garbage.c
  • gc_nBitmapRightMargin() : Splash.cpp
  • gDateNames() : UpdateDlg.cpp, ItemListDlg.h, AnnotateDlg.h
  • gDateOrRevNames() : UpdateDlg.cpp, DiffDlg.cpp
  • GetAllPersistentSettings() : Persistent.h, Persistent.cpp
  • GetAsSystemTime() : CJDateTimeCtrl.cpp
  • GetCustomMenu() : CustomizeMenus.h, CustomizeMenus.cpp
  • GetDateTime() : CvsEntries.h, CvsEntries.cpp
  • GetDItemCtrlHdl() : MacMisc.h
  • GetDItemHdl() : MacMisc.h
  • GetDItemMenuSel() : MacMisc.h
  • GetEditTypeName() : CvsCommands.h, CvsCommands.cpp
  • GetEndOfDecendantWindow() : wincvs_winutil.cpp
  • GetEnvValue() : ustr.h, ustr.cpp
  • GetExtension() : ustr.h, ustr.cpp
  • GetIcon() : UCvsFolders.cpp
  • GetInvString() : CustomizeMenus.cpp
  • getLabelFromContainer() : stdafx.h
  • GetLaunchTypeName() : LaunchHandlers.h, LaunchHandlers.cpp
  • getline() : getline.h, getline.c
  • getLoc() : MacrosSetup.cpp
  • GetMenuEntry() : wincvs_winutil.h, wincvs_winutil.cpp
  • GetMenuTitle() : umenu.cpp
  • GetNextEntriesLine() : CvsEntries.cpp
  • GetNextParentWindow() : wincvs_winutil.cpp
  • getopt() : getopt.h, getopt.c
  • getopt_long() : getopt1.c, getopt.h
  • getopt_long_only() : getopt1.c, getopt.h
  • GetPrevFilter() : FilterSelectionDlg.h, FilterSelectionDlg.cpp
  • GetPrevParentWindow() : wincvs_winutil.cpp
  • GetPyFalse() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyFile_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyInt_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyNone() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyString_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyTrue() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyTuple_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetPyType_Type() : PythonImpl.cpp, PythonGlue.impl.h
  • GetRtagTypeName() : CvsCommands.h, CvsCommands.cpp
  • getSettingName() : Persistent.cpp
  • getstr() : getline.h, getline.c
  • GetSubCMenu() : wincvs_winutil.h, wincvs_winutil.cpp
  • GetTagTypeName() : CvsCommands.h, CvsCommands.cpp
  • GetTimeZoneBias() : Stat.cpp
  • GetTopPopupMenu() : wincvs_winutil.h, wincvs_winutil.cpp
  • glue_consoleerr() : AppGlue.h, AppGlue.cpp
  • glue_consolein() : AppGlue.h, AppGlue.cpp
  • glue_consoleout() : AppGlue.h, AppGlue.cpp
  • glue_eventdispatcher() : AppGlue.mac.h
  • glue_exit() : AppGlue.h, AppGlue.cpp
  • glue_getenv() : AppGlue.h, AppGlue.cpp
  • glue_ondestroy() : AppGlue.h, AppGlue.cpp
  • gRevNames() : UpdateDlg.cpp, MultilineEntryDlg.h, UpdateDlg.cpp, ItemListDlg.h, CommitDlg.h, AnnotateDlg.h
  • gtkCompareWrap() : UCvsFiles.cpp

- h -

  • HasPersistentSettings() : Persistent.h, Persistent.cpp
  • HookWndProc() : Subclass.cpp

- i -

  • ign_add() : CvsIgnore.cpp
  • IMPLEMENT_DYNAMIC() : wincvs.cpp, Subclass.cpp
  • importlib() : wincvs.odl
  • InBetweenVSide() : UPseudoSupport.cpp
  • InflateRect() : udraw.h, udraw.cpp
  • initialize_all() : dll_glue.c
  • InitializeInterp() : PythonGlue.cpp
  • InsertLastCvsroot() : CvsPrefs.h, CvsPrefs.cpp
  • InsertLastModuleName() : CvsPrefs.h, CvsPrefs.cpp
  • IntersectRect() : udraw.h, udraw.cpp
  • IsAppEnabled() : MainFrm.cpp, UCvsApp.h, UCvsApp.cpp
  • IsCvsDirectory() : CheckoutDlg.cpp
  • IsDST() : Stat.cpp
  • IsHideCommandKeyPressed() : wincvs_winutil.h, wincvs_winutil.cpp
  • IsInInvertList() : CustomizeMenus.cpp
  • IsKeyMovingFocus() : LogFrm.cpp
  • IsLargeFonts() : wincvs_winutil.h, wincvs_winutil.cpp
  • IsLeapYear() : Stat.cpp
  • IsRectEmpty() : udraw.cpp
  • IsShellType() : CJMenu.cpp
  • IsTargetWindow() : wincvs_winutil.cpp
  • IsValidHandle() : wincvs.cpp

- l -

  • launchCVS() : AppGlue.h, AppGlue.cpp
  • LaunchCvsRootCommand() : CvsRootDlg.cpp
  • LaunchDefaultEditor() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchDiff() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchEditor() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchExplore() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchHandler() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchItemListCommand() : ItemListDlg.cpp
  • LaunchNewInst() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchProperties() : LaunchHandlers.h, LaunchHandlers.cpp
  • LaunchViewer() : LaunchHandlers.h, LaunchHandlers.cpp
  • LayoutRowCol() : GfxSplitterWnd.cpp
  • list_add_type() : ImportFilter.cpp
  • list_add_warning() : ImportFilter.cpp
  • list_all_types_recur() : ImportFilter.h, ImportFilter.cpp
  • listAddCell() : dll_garbage.c
  • listFree() : dll_garbage.c
  • listNew() : dll_garbage.c
  • LoadDIB() : dib.h, dib.c
  • LoadPersistentSettings() : Persistent.h, Persistent.cpp
  • LoadSettingsInternal() : Persistent.cpp
  • LocalSystemTimeToUtcSystemTime() : Stat.cpp
  • LString_to_UTF8() : MacMisc.h

- m -

  • MA_DEFINE_CLASS_M0() : UPseudoSupport.cpp
  • MA_DEFINE_CLASS_M1() : UPseudoSupport.cpp
  • macapp_workaround_adlib_bug() : UPseudoSupport.h, UPseudoSupport.cpp
  • MacGetPrefsFolder() : MacMisc.h
  • MacGetSpecialFolder() : MacMisc.h
  • MacGetTempFolder() : MacMisc.h
  • macpp_fecthview() : UPseudoSupport.h, UPseudoSupport.cpp
  • macpp_findwindow() : UPseudoSupport.cpp
  • macpp_getattachwindow() : UPseudoSupport.h, UPseudoSupport.cpp
  • macpp_getcmdid() : UPseudoSupport.cpp
  • macpp_linkbroadcasters() : UPseudoSupport.h, UPseudoSupport.cpp
  • macpp_preparetable() : UPseudoSupport.h, UPseudoSupport.cpp
  • MacrosFlushAll() : MacrosSetup.cpp
  • MacrosGetLoc() : MacrosSetup.h, MacrosSetup.cpp
  • MacrosReloadAll() : MacrosSetup.h, MacrosSetup.cpp
  • main() : dll_glue.c
  • MakeOleVariant() : CJHtmlView.cpp
  • MakeTmpFile() : ustr.h, ustr.cpp
  • MatchIgnoredList() : CvsIgnore.h, CvsIgnore.cpp
  • MigrateCvsrootList() : CvsPrefs.h, CvsPrefs.cpp
  • mystrdup() : CvsArgs.cpp
  • myTcl_CreateInterp() : TclGlue.cpp

- n -

  • nextLine() : PseudoButton.cpp
  • NormalizeFileName() : ustr.h, ustr.cpp
  • NormalizeFn() : GraphDoc.cpp
  • NumberToString_US() : UPseudoSupport.cpp

- o -

  • OffsetRect() : udraw.h, udraw.cpp
  • OnFilterBarChanged() : BrowseFileView.cpp
  • OnFilteringChanged() : WinCvsBrowser.cpp, BrowseFileView.cpp
  • onFilteringChanged() : UCvsFiles.cpp
  • OnIgnoreChanged() : WinCvsBrowser.cpp
  • onIgnoreChanged() : UCvsFrame.cpp
  • opendir() : ndir.h, ndir.c
  • outputXML() : PythonGlue.cpp

- p -

  • PaletteSize() : dib.h, dib.c
  • ParseUMENU() : PythonImpl.cpp
  • PathNameFromDirID() : VolsPaths.h, VolsPaths.c
  • PathNameFromWD() : VolsPaths.h, VolsPaths.c
  • poolAlloc() : dll_garbage.c
  • poolFree() : dll_garbage.c
  • poolRemove() : dll_garbage.c
  • PostGotoDlgCtrl() : wincvs_winutil.h, wincvs_winutil.cpp
  • print() : LogParse.cpp
  • PromptEditMessage() : AskYesNo.h, AskYesNo.cpp
  • PtInRect() : udraw.h, udraw.cpp
  • PyAppendCache() : PythonGlue.h, PythonGlue.cpp
  • PyDoCmdUI() : PythonGlue.h, PythonGlue.cpp
  • PyDoPython() : PythonGlue.h, PythonGlue.cpp
  • PyHandleCvsguiError() : PythonMacros.h, PythonContainer.cpp
  • PyInvalUICache() : PythonGlue.h, PythonGlue.cpp
  • PyIsUICacheValid() : PythonGlue.h, PythonGlue.cpp
  • PyMacrosReloadAll() : PythonGlue.h, PythonGlue.cpp
  • PythonLibGetLoc() : MacrosSetup.h, MacrosSetup.cpp
  • PyValidUICache() : PythonGlue.h, PythonGlue.cpp

- r -

  • ReadDIBFile() : dib.h, dib.c
  • ReadDIBRsrc() : dib.h, dib.c
  • readdir() : ndir.h, ndir.c
  • ReadIgnoredFile() : CvsIgnore.cpp
  • reduceString() : CvsArgs.cpp

- s -

  • SaveAllSettings() : Persistent.cpp
  • SaveAsPersistentSettings() : Persistent.cpp
  • SaveBmpFromDDB() : dib.h, dib.c
  • SaveDIB() : dib.h, dib.c
  • SavePersistentSettings() : Persistent.h, Persistent.cpp
  • seekdir() : ndir.h, ndir.c
  • SetDItemMenuSel() : MacMisc.h
  • SetEncoding() : CvsEntries.cpp
  • SetIcon() : WinCvsBrowser.cpp
  • SetListCtrlExtendedStyle() : wincvs_winutil.h, wincvs_winutil.cpp
  • setModule() : dll_garbage.c
  • SetRect() : udraw.h, udraw.cpp
  • SetRectEmpty() : udraw.h, udraw.cpp
  • SettingsGetLoc() : Persistent.cpp
  • sGetEnv() : MainFrm.cpp
  • ShellAction() : LaunchHandlers.cpp
  • shl_calloc() : dll_garbage.h, dll_garbage.c
  • shl_free() : dll_garbage.h, dll_garbage.c
  • shl_malloc() : dll_garbage.h, dll_garbage.c
  • shl_realloc() : dll_garbage.h, dll_garbage.c
  • simple_diff() : Persistent.cpp
  • split() : MultiFiles.cpp
  • SplitPath() : ustr.h, ustr.cpp
  • stat() : StdAfx.h, Stat.cpp, StdAfx.h
  • stopCVS() : AppGlue.h, AppGlue.cpp
  • strdup() : stdafx.h, UPseudoSupport.cpp, stdafx.h
  • StringToArgv() : ustr.h, ustr.cpp
  • StrOrdICmp() : ustr.h, ustr.cpp
  • StrPathCmp() : ustr.h, ustr.cpp
  • StrSafeCopy() : ustr.h, ustr.cpp
  • SysEncoding_to_UTF8() : MacMisc.h

- t -

  • Tag_Open() : CvsEntries.h, CvsEntries.cpp
  • TclBrowserAppend() : TclGlue.h, TclGlue.cpp
  • TclBrowserReset() : TclGlue.h, TclGlue.cpp
  • tclCvsBrowserProc() : TclGlue.cpp
  • tclCvsEntriesDeleteProc() : TclGlue.cpp
  • tclCvsEntriesProc() : TclGlue.cpp
  • tclCvsErrProc() : TclGlue.cpp
  • tclCvsExitOnErrorProc() : TclGlue.cpp
  • tclCvsLastErrorCodeProc() : TclGlue.cpp
  • tclCvsOutProc() : TclGlue.cpp
  • tclCvsProc() : TclGlue.cpp
  • tclDirProc() : TclGlue.cpp
  • tclHelpProc() : TclGlue.cpp
  • tclSafeRemove() : TclGlue.cpp
  • telldir() : ndir.h, ndir.c
  • TestBuffer() : TextBinary.cpp
  • testCVS() : AppGlue.h, AppGlue.cpp
  • TestFileIsAlias() : TextBinary.cpp
  • TestValidName() : TextBinary.cpp
  • TmFromOleDate() : CJDateTimeCtrl.cpp
  • TraverseHistory() : HistComboBoxEx.cpp

- u -

  • UAppConsole() : uconsole.h, uconsole.cpp
  • UCreate_AboutDlg() : UCvsDialogs.h
  • UCreate_Alert() : UCvsDialogs.h
  • UCreate_AskYesNoDlg() : UCvsDialogs.h
  • UCreate_BranchDlg() : UCvsDialogs.h
  • UCreate_BranchModDlg() : UCvsDialogs.h
  • UCreate_CheckoutDlg() : UCvsDialogs.h
  • UCreate_CmdlineDlg() : UCvsDialogs.h
  • UCreate_CommitDlg() : UCvsDialogs.h
  • UCreate_DiffDlg() : UCvsDialogs.h
  • UCreate_gcvs_Settings() : UCvsDialogs.h
  • UCreate_GraphWindow() : UCvsDialogs.h
  • UCreate_ImpEntryDlg() : UCvsDialogs.h
  • UCreate_ImportDlg() : UCvsDialogs.h
  • UCreate_ImportFilterDlg() : UCvsDialogs.h
  • UCreate_ImpWarningDlg() : UCvsDialogs.h
  • UCreate_LogDlg() : UCvsDialogs.h
  • UCreate_MainWindow() : UCvsDialogs.h
  • UCreate_PasswdDlg() : UCvsDialogs.h
  • UCreate_pixmap() : UCvsDialogs.h, UCvsApp.cpp
  • UCreate_SelDetailsDlg() : UCvsDialogs.h
  • UCreate_SelTagBranchDlg() : UCvsDialogs.h
  • UCreate_SettingsDlg() : UCvsDialogs.h
  • UCreate_TagDlg() : UCvsDialogs.h
  • UCreate_TagModDlg() : UCvsDialogs.h
  • UCreate_UntagDlg() : UCvsDialogs.h
  • UCreate_UntagModDlg() : UCvsDialogs.h
  • UCreate_UpdateDlg() : UCvsDialogs.h
  • UEventGetTargets() : umain.h, uevent.cpp
  • UEventGetWidID() : umain.h, uevent.cpp
  • UEventGiveTime() : umain.h, uevent.cpp
  • UEventNotifyMessage() : umain.h, uevent.cpp
  • UEventPostMessage() : umain.h, uevent.cpp
  • UEventQueryWidget() : umain.h, uevent.cpp
  • UEventRemoveWidID() : umain.h, uevent.cpp
  • UEventSendMessage() : umain.h, uevent.cpp
  • UEventSendMessageExt() : umain.h, uevent.cpp
  • UEventSetTooltipHandler() : umain.h, uevent.cpp
  • UMakeBitmap() : umenu.cpp, umain.h, PseudoButton.h, PseudoButton.cpp
  • UMenuAddButton() : umenu.h, umenu.cpp
  • UMenuAddPulldown() : umenu.h, umenu.cpp
  • UMenuAddRadio() : umenu.h, umenu.cpp
  • UMenuAddSeparator() : umenu.h, umenu.cpp
  • UMenuAddToggle() : umenu.h, umenu.cpp
  • UMenuCount() : umenu.h, umenu.cpp
  • UMenuDelete() : umenu.h, umenu.cpp
  • UMenuDeleteByCmd() : umenu.h, umenu.cpp
  • UnionRect() : udraw.h, udraw.cpp
  • UpdateUIMenu() : wincvs_winutil.h, wincvs_winutil.cpp
  • usage() : UCvsApp.cpp
  • UTF8_to_LString() : MacMisc.h
  • UTF8_to_SysEncoding() : MacMisc.h
  • UTickCount() : umain.h, uevent.cpp
  • UWinPseudoWindowProc() : uwidget.h, PseudoDlg.cpp
  • UWinToUMod() : PseudoDlg.cpp

- v -

  • VerifyUnmodified() : CvsEntries.cpp
  • VolName2VRef() : VolsPaths.h, VolsPaths.c
  • VRef2VolName() : VolsPaths.h, VolsPaths.c

- w -

  • WaitForCvs() : AppGlue.h, AppGlue.cpp
  • WarnNoPython() : NoPython.h, NoPython.cpp
  • WinInitWidgets() : PseudoDlg.cpp
  • wnt_fstat() : StdAfx.h, Stat.cpp
  • wnt_lstat() : StdAfx.h, Stat.cpp
  • wnt_unlink() : wincvs_winutil.h, wincvs_winutil.cpp
  • WriteMapFileHeaderandConvertFromDwordAlignToPacked() : dib.h, dib.c
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: File Members - Typedefs

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
a | c | d | f | g | i | k | l | p | t | u

- a -

  • AFX_DLLGETVERSIONPROC : CJToolBar.cpp

- c -

  • CListViews : CJTabView.h
  • CMDIMenuList : CJMDIFrameWnd.h
  • CompatConnectID : dll_loader.h
  • CTabList : CJFlatTabCtrl.h
  • CTabViews : CJTabCtrlBar.h
  • CTV_ITEM : CJTabView.h
  • CvsProcess : AppGlue.h
  • CvsProtocolList : CvsRootDlg.h

- d -

  • DiffOptionsItem : DiffDlg.cpp
  • DIR : ndir.h
  • dllglue_consolein_func : dll_process.h
  • dllglue_consoleout_func : dll_process.h
  • dllglue_getenv_func : dll_process.h
  • dllglue_main_func : dll_process.h
  • dllglue_setglue_func : dll_process.h
  • DYN_LIST : dll_garbage.c

- f -

  • FILEACTION_TYPE : CvsPrefs.h
  • FilterMaskContainer : BrowseViewModel.h
  • FNOBSERVER : BrowseViewModel.h
  • frameRec : dll_garbage.c
  • FSSpec : TextBinary.h

- g -

  • garbyPtr : dll_garbage.c

- i -

  • ItemDescription : ItemListDlg.h
  • ItemList : ItemListDlg.h

- k -

  • KeywordDisplayInfoList : CvsRootDlg.h
  • KeywordList : CvsRootDlg.h
  • KoBranchTagHandler : BrowseViewHandlers.h
  • KoCreateTagHandler : BrowseViewHandlers.h
  • KoDeleteTagHandler : BrowseViewHandlers.h
  • KoEditHandler : BrowseViewHandlers.h
  • KoForceEditHandler : BrowseViewHandlers.h
  • KoLaunchDefaultEditHandler : BrowseViewHandlers.h
  • KoLaunchDefaultHandler : BrowseViewHandlers.h
  • KoLaunchEditHandler : BrowseViewHandlers.h
  • KoLaunchOpenAsHandler : BrowseViewHandlers.h
  • KoLaunchOpenHandler : BrowseViewHandlers.h
  • KoReservedEditHandler : BrowseViewHandlers.h
  • KoRtagBranchHandler : BrowseViewHandlers.h
  • KoRtagCreateHandler : BrowseViewHandlers.h
  • KoRtagDeleteHandler : BrowseViewHandlers.h
  • kTclRes : TclGlue.h

- l -

  • ListPath : ItemListDlg.h

- p -

  • poolPtr : dll_garbage.c
  • PyRegistry_InitValues : PythonContainer.h
  • PyThreadState : PythonGlue.h

- t -

  • TCB_ITEM : CJTabCtrlBar.h

- u -

  • UCOLORREF : udraw.h
  • UListSorter : umain.h
  • UMENU : umain.h
  • UPMSG : umain.h
  • UTREEITEM : umain.h
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: File Members - Variables

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
_ | b | c | d | e | f | g | h | i | k | l | m | n | o | p | r | s | t | w

- _ -

  • __glue_consoleerr : dll_glue.c
  • __glue_consolein : dll_glue.c
  • __glue_consoleout : dll_glue.c
  • __glue_eventdispatch : dll_glue.c
  • __glue_exit_code : dll_glue.c
  • __glue_getenv : dll_glue.c
  • __no_msl_lf_convert : dll_glue.c
  • _ComCtlVersion : CJToolBar.h, CJToolBar.cpp
  • _dropDownWidth : CJToolBar.cpp
  • _glue_buf : dll_glue.c
  • _gnColumnWidth : ImportFilterDlg.cpp
  • _gszColumnLabel : ImportFilterDlg.cpp
  • _Py_NoneStruct_glue : PythonGlue.impl.h
  • _Py_TrueStruct_glue : PythonGlue.impl.h
  • _Py_ZeroStruct_glue : PythonGlue.impl.h
  • _PyObject_New_glue : PythonGlue.impl.h
  • _sysColorMap : CJToolBar.cpp

- b -

  • bNotWin4 : GfxSplitterWnd.cpp
  • buf : CvsArgs.cpp

- c -

  • CJLibraryDLL : CJLibrary.cpp
  • clsid : wincvs.cpp
  • columnsRecursive : BrowseViewColumn.cpp
  • columnsRegular : BrowseViewColumn.cpp
  • conflictColumn : BrowseViewColumn.cpp
  • CPInfo : CJMenu.cpp
  • cvsgui_methods : PythonGlue.cpp

- d -

  • dateColumn : BrowseViewColumn.cpp
  • dos : Stat.cpp
  • dwSizeBarMap : CJControlBar.h

- e -

  • encodingColumn : BrowseViewColumn.cpp
  • err : Stat.cpp
  • errors : Stat.cpp
  • extColumn : BrowseViewColumn.cpp

- f -

  • FILECHANGE_TIMER : BrowseFileView.cpp
  • filterFileMasks : UCvsFrame.cpp
  • first_nonopt : getopt.c

- g -

  • g_hMsgHook : CJMenuBar.cpp
  • g_pMenuBar : CJMenuBar.cpp
  • g_Shell : CJMenu.cpp
  • gAddBinControl : CvsPrefs.cpp
  • gAllMethods : PythonGlue.cpp
  • gAlwaysUseCvsroot : CvsPrefs.cpp
  • gAuthors : wincvs.cpp
  • gBrowser : CvsPrefs.cpp
  • gBrowserMenu : CustomizeMenus.cpp
  • gCheckoutRO : CvsPrefs.cpp
  • gCheckValidEdits : CommitDlg.cpp
  • gCommitLogs : ImportDlg.cpp, CommitDlg.cpp, AdminOptionDlg.cpp
  • gCtrlPressedOnOK : CvsPrefs.cpp
  • gCvsConsole : CvsPrefs.cpp
  • gCvsguiErr : PythonContainer.h, PythonContainer.cpp
  • gCvsPrefs : CvsPrefs.h, CvsPrefs.cpp
  • gCvsVersion : CvsPrefs.cpp
  • gDateNames : UpdateDlg.cpp, ItemListDlg.h, AnnotateDlg.h
  • gDateOrRevNames : UpdateDlg.cpp, DiffDlg.cpp
  • gDiffOptions : DiffDlg.cpp
  • gDisableSplashScreen : CvsPrefs.cpp
  • gDisplayRecursive : BrowseViewModel.cpp
  • gDummyFile : WinCvsBrowser.cpp, UCvsFolders.cpp
  • gEncryptCommunication : CvsPrefs.cpp
  • gExtdiff : CvsPrefs.cpp
  • gFileActionType : CvsPrefs.cpp
  • gFilesMenu : CustomizeMenus.cpp
  • gFileViewFilterMasksReactionSpeed : BrowseFileView.cpp
  • gFileViewIgnore : BrowseViewModel.cpp
  • gFileViewSort : BrowseFileView.cpp, UCvsFiles.cpp
  • gFileViewSortAsc : BrowseFileView.cpp, UCvsFiles.cpp
  • gFilterMasksEnable : BrowseViewModel.cpp
  • gGarbage : dll_garbage.c
  • gGraphBranchColor : GraphView.cpp
  • gGraphDeadNodeColor : GraphView.cpp
  • gGraphHeaderColor : GraphView.cpp
  • gGraphMergeColor : GraphView.cpp
  • gGraphNodeColor : GraphView.cpp
  • gGraphSelColor : GraphView.cpp
  • gGraphShadowColor : GraphView.cpp
  • gGraphTagColor : GraphView.cpp
  • gGraphUserStateNodeColor : GraphView.cpp
  • gHelper : CvsPrefs.cpp
  • gHideCommandDlgAnnotate : CvsPrefs.cpp
  • gHideCommandDlgDiff : CvsPrefs.cpp
  • gHideCommandDlgFileAction : CvsPrefs.cpp
  • gHideCommandDlgGraph : CvsPrefs.cpp
  • gHideCommandDlgLog : CvsPrefs.cpp
  • gHideCommandDlgStatus : CvsPrefs.cpp
  • gHideCommandDlgUpdate : CvsPrefs.cpp
  • gHideCommandDlgUseShift : CvsPrefs.cpp
  • gHistoryLocs : MainFrm.cpp, UCvsFolders.cpp
  • gHome : CvsPrefs.cpp
  • gICTextOption : CvsPrefs.cpp
  • gIgnoreCase : DiffDlg.cpp
  • gImportLocalFolder : ImportDlg.cpp
  • gImportModuleNames : ImportDlg.cpp
  • gIsoConvert : CvsPrefs.cpp
  • gItemListAutoRefreshModule : ItemListDlg.cpp
  • gItemListAutoRefreshTag : ItemListDlg.cpp
  • gItemListModuleList : ItemListDlg.cpp
  • gItemListTagRecurse : ItemListDlg.cpp
  • gKeywordModes : KeywordComboBox.cpp
  • gKserverPort : CvsPrefs.cpp
  • gLastCvsroot : CvsPrefs.cpp
  • gLastModuleName : CvsPrefs.cpp
  • gLastWorkingDir : CvsPrefs.cpp
  • gLogDateNames : LogDlg.cpp
  • gLogoutThread : wincvs.cpp
  • gLogoutTimeOut : CvsPrefs.cpp
  • gLogRevNames : LogDlg.cpp
  • gLogStateNames : LogDlg.cpp
  • gLogSupress : LogDlg.cpp
  • gLogUserNames : LogDlg.cpp
  • gMacBinEncodeOnlyBinaryFiles : CvsPrefs.cpp
  • gMacBinEncoding : CvsPrefs.cpp
  • gMacLF : CvsPrefs.cpp
  • gMacrosAdmin : MacrosSetup.h, MacrosSetup.cpp
  • gMacrosSel : MacrosSetup.h, MacrosSetup.cpp
  • gMainPlacement : MainFrm.cpp
  • gMatchEntriesCase : CvsPrefs.cpp
  • gNoBlankLines : DiffDlg.cpp
  • gNoWhiteSpace : DiffDlg.cpp
  • gOldCvsroots : CvsPrefs.h, CvsPrefs.cpp
  • gOldLoc : HistComboBoxEx.cpp, UCvsFolders.cpp
  • gOldModules : RtagDlg.h, CheckoutDlg.h, CheckoutDlg.cpp
  • gPersistentShema : CvsPrefs.cpp
  • gPrevAltCvs : GetPrefs.cpp
  • gPrevCvsCmd : LineCmd.cpp
  • gPrevCvsCmdDir : LineCmd.cpp
  • gPrevCvsRootKeywords : CvsRootDlg.cpp
  • gPrevCVsRootRepositoryPaths : CvsRootDlg.cpp
  • gPrevFilterConflict : FilterSelectionDlg.cpp
  • gPrevFilterEncoding : FilterSelectionDlg.cpp
  • gPrevFilterExtention : FilterSelectionDlg.cpp
  • gPrevFilterName : FilterSelectionDlg.cpp
  • gPrevFilterOption : FilterSelectionDlg.cpp
  • gPrevFilterPath : FilterSelectionDlg.cpp
  • gPrevFilterRevision : FilterSelectionDlg.cpp
  • gPrevFilterState : FilterSelectionDlg.cpp
  • gPrevFilterStickyTag : FilterSelectionDlg.cpp
  • gPrevFilterTimeStamp : FilterSelectionDlg.cpp
  • gPrevStates : AdminOptionDlg.cpp
  • gProxyHost : CvsPrefs.cpp
  • gProxyPort : CvsPrefs.cpp
  • gPruneOption : CvsPrefs.cpp
  • gPserverPort : CvsPrefs.cpp
  • gPythonLibrary : CvsPrefs.cpp
  • gQuietOption : CvsPrefs.cpp
  • gReleasesNames : UpdateDlg.cpp, ImportDlg.cpp
  • gRevNames : UpdateDlg.cpp, MultilineEntryDlg.h, UpdateDlg.cpp, ItemListDlg.h, CommitDlg.h, AnnotateDlg.h
  • gRhostPort : CvsPrefs.cpp
  • gRshName : CvsPrefs.cpp
  • gServerName : CvsPrefs.cpp
  • gSettingsFolder : CvsPrefs.cpp
  • gShowCvs : CvsPrefs.cpp
  • gSortParam : UCvsFiles.cpp
  • gStatusOutputType : CvsPrefs.cpp
  • gStrMonths : CvsEntries.cpp
  • gTclLibrary : CvsPrefs.cpp
  • gTurnOffBroadcast : UPseudoSupport.h, UPseudoSupport.cpp
  • gUICache : PythonGlue.cpp
  • gUICacheObj : PythonGlue.cpp
  • gUICacheValid : PythonGlue.cpp
  • gUnifiedDiff : DiffDlg.cpp
  • gUnixLF : CvsPrefs.cpp
  • gUpdateCaseSensitiveNames : CvsPrefs.cpp
  • gUpdateLastCheckinTime : CvsPrefs.cpp
  • gUpdateThreeWayConflicts : CvsPrefs.cpp
  • gUseAltCvs : CvsPrefs.cpp
  • gUseExtDiff : DiffDlg.cpp
  • gUseProxy : CvsPrefs.cpp
  • gUseShell : CvsPrefs.cpp
  • gVendorBranchIds : ImportDlg.cpp
  • gVendorNames : ImportDlg.cpp
  • gViewAdded : BrowseViewModel.cpp
  • gViewChanged : BrowseViewModel.cpp
  • gViewConflicts : BrowseViewModel.cpp
  • gViewer : CvsPrefs.cpp
  • gViewFont : wincvsView.cpp
  • gViewHideMissing : BrowseViewModel.cpp
  • gViewHideUnknown : BrowseViewModel.cpp
  • gViewMissing : BrowseViewModel.cpp
  • gViewRemoved : BrowseViewModel.cpp
  • gViewUnknown : BrowseViewModel.cpp
  • gWarnPython : NoPython.cpp
  • gWhichCvs : CvsPrefs.cpp
  • gWordWrapLogMsg : CvsPrefs.cpp
  • gZ9Option : CvsPrefs.cpp
  • gZLevel : CvsPrefs.cpp

- h -

  • helpTopicEnd : HHelpSupport.h
  • helpTopicIgnore : HHelpSupport.h
  • hextable : CJHexEdit.cpp

- i -

  • IID_ITest : GraphDoc.cpp
  • IID_IWincvs : wincvsDoc.cpp
  • indicators : CvsStatusBar.cpp

- k -

  • kHChildSpace : GraphView.cpp, UCvsGraph.cpp
  • kInflateNodeSpace : GraphView.cpp, UCvsGraph.cpp
  • kMaxChar : ustr.cpp
  • kPathDelimiter : ustr.h
  • kSpc : BrowseFileView.cpp
  • kVChildSpace : GraphView.cpp, UCvsGraph.cpp

- l -

  • last_nonopt : getopt.c
  • lf : ImportFilter.cpp

- m -

  • modelRecursive : BrowseViewColumn.cpp
  • modelRegular : BrowseViewColumn.cpp
  • month_len : Stat.cpp
  • month_names : Stat.cpp

- n -

  • nameColumn : BrowseViewColumn.cpp
  • nextchar : getopt.c
  • nMonthDays : CJDateTimeCtrl.cpp

- o -

  • optarg : getopt.h, getopt.c
  • opterr : getopt.h, getopt.c
  • optind : getopt.h, getopt.c
  • optionColumn : BrowseViewColumn.cpp
  • optopt : getopt.h, getopt.c
  • ordering : getopt.c

- p -

  • pathColumn : BrowseViewColumn.cpp
  • posixly_correct : getopt.c
  • Py_BuildValue_glue : PythonGlue.impl.h
  • Py_EndInterpreter_glue : PythonGlue.impl.h
  • Py_Finalize_glue : PythonGlue.impl.h
  • Py_FindMethod_glue : PythonGlue.impl.h
  • Py_GetPath_glue : PythonGlue.impl.h
  • Py_Initialize_glue : PythonGlue.impl.h
  • Py_InitModule4_glue : PythonGlue.impl.h
  • Py_IsInitialized_glue : PythonGlue.impl.h
  • Py_NewInterpreter_glue : PythonGlue.impl.h
  • Py_SetProgramName_glue : PythonGlue.impl.h
  • PyArg_ParseTuple_glue : PythonGlue.impl.h
  • PyDict_SetItemString_glue : PythonGlue.impl.h
  • PyErr_Clear_glue : PythonGlue.impl.h
  • PyErr_NewException_glue : PythonGlue.impl.h
  • PyErr_SetString_glue : PythonGlue.impl.h
  • PyEval_InitThreads_glue : PythonGlue.impl.h
  • PyFile_AsFile_glue : PythonGlue.impl.h
  • PyFile_Type_glue : PythonGlue.impl.h
  • PyInt_FromLong_glue : PythonGlue.impl.h
  • PyInt_Type_glue : PythonGlue.impl.h
  • PyModule_GetDict_glue : PythonGlue.impl.h
  • PyObject_Free_glue : PythonGlue.impl.h
  • PyRun_SimpleFile_glue : PythonGlue.impl.h
  • PyRun_SimpleString_glue : PythonGlue.impl.h
  • PyString_AsString_glue : PythonGlue.impl.h
  • PyString_FromString_glue : PythonGlue.impl.h
  • PyString_Type_glue : PythonGlue.impl.h
  • PySys_SetPath_glue : PythonGlue.impl.h
  • PyThreadState_Swap_glue : PythonGlue.impl.h
  • PyTuple_New_glue : PythonGlue.impl.h
  • PyTuple_Size_glue : PythonGlue.impl.h
  • PyTuple_Type_glue : PythonGlue.impl.h
  • PyType_Type_glue : PythonGlue.impl.h

- r -

  • revisionColumn : BrowseViewColumn.cpp

- s -

  • sAllTargets : uevent.cpp
  • sAskingMainThread : MainFrm.cpp
  • sBuf : TextBinary.cpp
  • sBufSize : TextBinary.cpp
  • sCallTable : AppGlue.cpp
  • sCompatProc : dll_loader.h, dll_loader.c
  • sCvsContainerFileSpec : dll_glue.c
  • sDefBrowserMenu : CustomizeMenus.cpp
  • sDefDateNames : UpdateDlg.cpp
  • sDefFilesMenu : CustomizeMenus.cpp
  • sDefLogDateNames : LogDlg.cpp
  • sDefLogStateNames : LogDlg.cpp
  • sDefLogTagNames : LogDlg.cpp
  • sDefLogUserNames : LogDlg.cpp
  • sDefModuleNames : ImportDlg.cpp
  • sDefPrevCvsCmd : LineCmd.cpp
  • sDefReleases : ImportDlg.cpp
  • sDefRevDateNames : UpdateDlg.cpp
  • sDefStates : AdminOptionDlg.cpp
  • sDefTagNames : UpdateDlg.cpp
  • sDefVendorBranchIds : ImportDlg.cpp
  • sDefVendors : ImportDlg.cpp
  • sDiffOptions : DiffDlg.cpp
  • sDummyStarter : UPseudoSupport.cpp
  • sFileIconAddedIcon : UCvsFiles.cpp
  • sFileIconBinaryIcon : UCvsFiles.cpp
  • sFileIconBinaryModIcon : UCvsFiles.cpp
  • sFileIconConflictIcon : UCvsFiles.cpp
  • sFileIconIgnoredIcon : UCvsFiles.cpp
  • sFileIconMissIcon : UCvsFiles.cpp
  • sFileIconRemovedIcon : UCvsFiles.cpp
  • sFileIconTextIcon : UCvsFiles.cpp
  • sFileIconTextModIcon : UCvsFiles.cpp
  • sFileIconUnknownIcon : UCvsFiles.cpp
  • sFolderIcon : UCvsFolders.cpp
  • sFolderIconIcon : UCvsFiles.cpp
  • sFolderIconIgnoredIcon : UCvsFiles.cpp
  • sFolderIconMissIcon : UCvsFiles.cpp
  • sFolderIconUnknownIcon : UCvsFiles.cpp
  • sFolderIgnoredIcon : UCvsFolders.cpp
  • sFolderMissingIcon : UCvsFolders.cpp
  • sFolderUnknownIcon : UCvsFolders.cpp
  • sGetEnvResult : MainFrm.cpp
  • sInitInvTable : CustomizeMenus.cpp
  • sInvTable : CustomizeMenus.cpp
  • sLastExitCode : AppGlue.cpp
  • sLastIdle : uevent.cpp
  • sRetainedMsgs : uevent.cpp
  • stateColumn : BrowseViewColumn.cpp
  • sTclBrowser : TclGlue.cpp
  • sTemporaryTurnOffNotify : UCvsFolders.cpp
  • sTmpList : AppGlue.cpp
  • sTooltipHandler : uevent.cpp
  • sTurnOffDispatching : uevent.cpp
  • systemtime_second : Stat.cpp
  • szIntFilePos : TipDlg.cpp
  • szIntStartup : TipDlg.cpp
  • szSection : TipDlg.cpp
  • szTimeStamp : TipDlg.cpp

- t -

  • tagColumn : BrowseViewColumn.cpp
  • theApp : wincvs.cpp
  • typesRecursive : BrowseViewColumn.cpp
  • typesRegular : BrowseViewColumn.cpp

- w -

  • WM_RESETVIEW : WinCvsBrowser.cpp, BrowseFileView.cpp
  • WNT_filename_classes : fnmatch.h, fnmatch.c
Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
Generated on Sat Aug 7 22:58:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Namespace Members - Functions

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions

  • importlib() : Wincvs
Generated on Sat Aug 7 22:58:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJCBarButton Member List

This is the complete list of members for CCJCBarButton, including all inherited members.

CCJFlatButton() | CCJFlatButton |
DisableFlatLook(BOOL bDisable=FALSE) | CCJFlatButton | [virtual]
DrawButtonBitmap(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawButtonIcon(CDC *pDC, UINT nState, CRect &rcItem) | CCJCBarButton | [protected, virtual]
DrawButtonText(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CCJFlatButton | [virtual]
m_bAltColor | CCJFlatButton | [protected]
m_bFlatLook | CCJFlatButton | [protected]
m_bLBtnDown | CCJFlatButton | [protected]
m_bMouseOver | CCJFlatButton | [protected]
m_bPainted | CCJFlatButton | [protected]
m_clrAltHilite | CCJFlatButton | [protected]
m_clrAltNormal | CCJFlatButton | [protected]
m_clrAltShadow | CCJFlatButton | [protected]
m_clrAltTextNm | CCJFlatButton | [protected]
m_clrDkShad | CCJFlatButton | [protected]
m_clrHilite | CCJFlatButton | [protected]
m_clrNormal | CCJFlatButton | [protected]
m_clrShadow | CCJFlatButton | [protected]
m_clrTextGy | CCJFlatButton | [protected]
m_clrTextNm | CCJFlatButton | [protected]
m_Font | CCJFlatButton | [protected]
m_hCursor | CCJFlatButton | [protected]
m_hPushed | CCJFlatButton | [protected]
m_pFont | CCJFlatButton | [protected]
m_sizeIcon | CCJFlatButton | [protected]
OnEraseBkgnd(CDC *pDC) | CCJFlatButton | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnPaint() | CCJFlatButton | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJFlatButton | [protected]
OnSysColorChange() | CCJFlatButton | [protected]
OnTimer(UINT nIDEvent) | CCJFlatButton | [protected]
SetAlternateColors(COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm) | CCJFlatButton | [virtual]
SetButtonFont(CFont *pFont) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, CSize size) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, HICON hPushed, CSize size) | CCJFlatButton | [virtual]
UpdateFont() | CCJFlatButton | [protected, virtual]
~CCJFlatButton() | CCJFlatButton | [virtual]

Generated on Sat Aug 7 22:48:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoScrollBar Member List

This is the complete list of members for TPseudoScrollBar, including all inherited members.

fButtonStep | TPseudoScrollBar | [private]
fPageStep | TPseudoScrollBar | [private]
MA_DECLARE_CLASS | TPseudoScrollBar | [private]
TPseudoScrollBar() | TPseudoScrollBar | [private]
TrackScrollBar(short partCode) | TPseudoScrollBar | [private, virtual]
~TPseudoScrollBar() | TPseudoScrollBar | [private, virtual]

Generated on Sat Aug 7 22:57:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PyCmdUI::obj_t Member List

This is the complete list of members for PyCmdUI::obj_t, including all inherited members.

m_object PyCmdUI::obj_t

Generated on Sat Aug 7 22:55:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CKeyString Member List

This is the complete list of members for CKeyString, including all inherited members.

_GetBaseClass() | CMString | [protected, static]
begin() const | TMString< UStr > | [inline]
CKeyString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | CKeyString |
classCMString | CMString | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | CMString |
Compare(const char *s1, const char *s2) const | TKeyString<'@'> | [protected, virtual]
Concatenate(UStr &res, const char *key, const char *value) const | TKeyString<'@'> | [virtual]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
end() const | TMString< UStr > | [inline]
Find(const char *instr) const | TMString< UStr > |
CPersistent::Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | TMString< UStr > | [protected, virtual]
GetDelimiter() const | TKeyString<'@'> |
GetList(void) const | TMString< UStr > | [inline]
GetRuntimeClass() const | CMString | [virtual]
GetTimeStamp() const | CPersistent | [inline]
Insert(const char *str) | TMString< UStr > |
IsKindOf(const URuntimeClass *pClass) const | UObject |
list_t typedef | TMString< UStr > |
LoadAll(const char *only=0L) | CPersistent | [static]
m_allStrs | TMString< UStr > | [protected]
m_buffer | TMString< UStr > | [mutable, protected]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_maxStr | TMString< UStr > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
Remove(const char *str) | TMString< UStr > |
RemoveAll() | TMString< UStr > |
ResetTimeStamp() | CPersistent | [inline]
rtCMString(void) | CMString | [static]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | TMString< UStr > | [protected, virtual]
SizeOf(void) const | TMString< UStr > | [protected, virtual]
Split(const char *str, UStr &key, UStr &value) const | TKeyString<'@'> | [virtual]
TKeyString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TKeyString<'@'> |
TMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TMString< UStr > |
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CKeyString() | CKeyString | [virtual]
~CMString() | CMString | [virtual]
~CPersistent() | CPersistent | [virtual]
~TKeyString() | TKeyString<'@'> | [virtual]
~TMString() | TMString< UStr > | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:53:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GetPassword.h Source File

common/GetPassword.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 #if !defined(AFX_GETPASSWORD_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_)
00022 #define AFX_GETPASSWORD_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_
00023
00024 #if _MSC_VER >= 1000
00025 #pragma once
00026 #endif // _MSC_VER >= 1000
00027 // GetPassword.h : header file
00028 //
00029
00030 #ifdef WIN32
00031 #   include "HHelpSupport.h"
00032 #endif
00033
00034 char* CompatGetPassword(const char* prompt);
00035
00036 #ifdef WIN32
00037
00038 // GetPassword dialog
00039
00040 class GetPassword : public CHHelpDialog
00041 {
00042 // Construction
00043 public:
00044     GetPassword(CWnd* pParent = NULL);   // standard constructor
00045
00046 // Dialog Data
00047     //{{AFX_DATA(GetPassword)
00048     enum { IDD = IDD_PASSWRD };
00049     CString m_passwd;
00050     //}}AFX_DATA
00051
00052
00053 // Overrides
00054     // ClassWizard generated virtual function overrides
00055     //{{AFX_VIRTUAL(GetPassword)
00056     protected:
00057     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00058     //}}AFX_VIRTUAL
00059
00060 // Implementation
00061 protected:
00062
00063     // Generated message map functions
00064     //{{AFX_MSG(GetPassword)
00065     virtual BOOL OnInitDialog();
00066     afx_msg void OnHelp();
00067     //}}AFX_MSG
00068     DECLARE_MESSAGE_MAP()
00069 private:
00070     // Methods
00071     virtual void InitHelpID();
00072 };
00073
00074 //{{AFX_INSERT_LOCATION}}
00075 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00076 #endif /* WIN32 */
00077
00078 #endif // !defined(AFX_GETPASSWORD_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CItemListDlg::CompareInfo Member List

This is the complete list of members for CItemListDlg::CompareInfo, including all inherited members.

m_asc | CItemListDlg::CompareInfo
m_column | CItemListDlg::CompareInfo
m_option | CItemListDlg::CompareInfo
m_type | CItemListDlg::CompareInfo

Generated on Sat Aug 7 22:53:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

MultiFilesEntry Member List

This is the complete list of members for MultiFilesEntry, including all inherited members.

add(const char *file, const FSSpec *spec=0L, const char *currRevision=0L) | MultiFilesEntry |
add(CvsArgs &args) const | MultiFilesEntry |
dir | MultiFilesEntry | [protected]
files | MultiFilesEntry | [protected]
get(int index, UStr &path, UStr &fileName, UStr &currRev) const | MultiFilesEntry |
getdir() const | MultiFilesEntry | [inline]
MultiFilesEntry() | MultiFilesEntry |
MultiFilesEntry(const char *path) | MultiFilesEntry |
MultiFilesEntry(const MultiFilesEntry &entries) | MultiFilesEntry |
NumFiles(void) const | MultiFilesEntry | [inline]
operator=(const MultiFilesEntry &entries) | MultiFilesEntry |
setdir(const char *newdir) | MultiFilesEntry |

Generated on Sat Aug 7 22:55:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/Resource.h Source File

WinCvs/CJLib/CJLibrary/Resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Visual C++ generated include file.
00003 // Used by CJLIBRARY.RC
00004 //
00005
00006 // Next default values for new objects
00007 //
00008 #ifdef APSTUDIO_INVOKED
00009 #ifndef APSTUDIO_READONLY_SYMBOLS
00010
00011 #define _APS_NEXT_RESOURCE_VALUE        129
00012 #define _APS_NEXT_COMMAND_VALUE         32771
00013 #define _APS_NEXT_CONTROL_VALUE         1000
00014 #define _APS_NEXT_SYMED_VALUE           101
00015 #endif
00016 #endif
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PyContainer Member List

This is the complete list of members for PyContainer, including all inherited members.

False() | PyContainer | [inline, static]
GetAttr(char *name) | PyContainer | [inline, virtual]
PyContainer() | PyContainer | [inline]
RegisterValue(PyObject *d, char *name, int value) | PyContainer | [static]
True() | PyContainer | [inline, static]
Void() | PyContainer | [inline, static]
~PyContainer() | PyContainer | [inline, virtual]

Generated on Sat Aug 7 22:55:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CPStr.cpp Source File

common/CPStr.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- January 1997
00019  */
00020
00021 /*
00022  * CPStr.cpp --- simple Pascal-C string
00023  * Moved in ustr.cpp
00024  */
00025
00026 #include "stdafx.h"
00027
00028 #include "CPStr.h"
00029
00031 // PCPStr
00032
00033 PCPStr::~PCPStr()
00034 {
00035 }
00036
00041 unsigned int PCPStr::SizeOf(void) const
00042 {
00043     return m_str != 0L ? length() + 1 : 1;
00044 }
00045
00050 const void* PCPStr::GetData(void) const
00051 {
00052     const void* res = (const char*)(*(CPStr*)this);
00053
00054     return res == 0L ? "" : res;
00055 }
00056
00062 void PCPStr::SetData(const void* ptr, unsigned int size)
00063 {
00064     if(strlen((const char*)ptr) == (size - 1))
00065         *(CPStr*)this = (const char*)ptr;
00066 }
00067
00069 // PCStr
00070
00071 PCStr::~PCStr()
00072 {
00073 }
00074
00079 unsigned int PCStr::SizeOf(void) const
00080 {
00081     return m_str != 0L ? length() + 1 : 0;
00082 }
00083
00088 const void* PCStr::GetData(void) const
00089 {
00090     const void* res = (const char*)(*(CStr*)this);
00091     return res == 0L ? "" : res;
00092 }
00093
00099 void PCStr::SetData(const void* ptr, unsigned int size)
00100 {
00101     if( strlen((const char*)ptr) == (size - 1) )
00102         *(CStr*)this = (const char*)ptr;
00103 }
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPseudoPageHider Member List

This is the complete list of members for UPseudoPageHider, including all inherited members.

class_ID enum value | UPseudoPageHider |
DoRotate(int entry) | UPseudoPageHider | [protected]
ExecuteSelf(MessageT inMessage, void *ioParam) | UPseudoPageHider | [protected, virtual]
fCurSel | UPseudoPageHider | [protected]
fPageCtrl | UPseudoPageHider | [protected]
fViewSuite | UPseudoPageHider | [protected]
fWidid | UPseudoPageHider | [protected]
ListenToMessage(MessageT inMessage, void *ioParam) | UPseudoPageHider | [virtual]
SetWidID(int widid) | UPseudoPageHider | [inline]
UPseudoPageHider(LStream *inStream) | UPseudoPageHider |
~UPseudoPageHider() | UPseudoPageHider | [virtual]

Generated on Sat Aug 7 22:55:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/resource.h Source File

WinCvs/resource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by wincvs.rc
00004 //
00005 #define IDR_CNTR_INPLACE                6
00006 #define IDD_ABOUTBOX                    100
00007 #define IDP_OLE_INIT_FAILED             100
00008 #define IDP_FAILED_TO_CREATE            102
00009 #define IDB_LIGHTBULB                   103
00010 #define IDP_SOCKETS_INIT_FAILED         104
00011 #define IDD_TIP                         105
00012 #define CG_IDS_TIPOFTHEDAY              106
00013 #define CG_IDS_TIPOFTHEDAYMENU          107
00014 #define CG_IDS_DIDYOUKNOW               108
00015 #define CG_IDS_FILE_ABSENT              109
00016 #define CG_IDP_FILE_CORRUPT             110
00017 #define CG_IDS_TIPOFTHEDAYHELP          111
00018 #define IDB_SPLASH                      112
00019 #define IDC_OPTIONCHECK_BUTTON          113
00020 #define IDR_MAINFRAME                   128
00021 #define IDR_WINCVSTYPE                  129
00022 #define IDS_DEFFONT                     129
00023 #define IDR_BROWSER                     129
00024 #define IDD_PASSWRD                     132
00025 #define IDD_ALERT                       134
00026 #define IDD_PREFS_GLOBALS               136
00027 #define IDD_CHECKOUT_MAIN               137
00028 #define IDD_COMMIT_MAIN                 138
00029 #define IDD_IMPORT_MAIN                 139
00030 #define IDD_IMPORT_OPTIONS              140
00031 #define IDD_CMDLINE_MAIN                142
00032 #define IDD_IMPORTFILTER                143
00033 #define IDD_WARNINGDESC                 145
00034 #define IDD_ENTRYDESC                   146
00035 #define IDD_UPDATE_MAIN                 147
00036 #define IDD_UPDATE_MERGE                149
00037 #define IDD_LOG_MAIN                    150
00038 #define IDD_LOG_FILTERS                 152
00039 #define IDB_SMALLICONS                  152
00040 #define IDD_DIFF_OPTIONS                153
00041 #define IDD_DIFF_MAIN                   154
00042 #define IDD_UPDATE_OPTIONS              155
00043 #define IDD_PREFS_WINCVS                156
00044 #define IDR_FILELIST                    157
00045 #define IDR_MULTIUSER                   158
00046 #define IDR_GRAPH                       161
00047 #define IDR_STATEICONS                  164
00048 #define IDR_TAGS                        165
00049 #define IDD_INIT_MAIN                   165
00050 #define IDR_WORKSPACE                   173
00051 #define IDB_LOCATE                      176
00052 #define IDD_PROGRESS                    177
00053 #define IDB_ABOUT                       180
00054 #define IDD_CUSTOMIZE                   181
00055 #define IDR_CUSTMENUS                   182
00056 #define IDB_PYTHON                      183
00057 #define IDD_SAVESETTINGS                184
00058 #define IDB_IDLE                        185
00059 #define IDR_FILTER                      186
00060 #define IDD_COMMIT_OPTIONS              186
00061 #define IDB_HISTLOC                     187
00062 #define IDD_PREFS_CVSCMD_DIALOGS        191
00063 #define IDD_ANNOTATE_MAIN               192
00064 #define IDD_GRAPH_OPTIONS               193
00065 #define IDD_EDITMESSAGE                 195
00066 #define IDD_ADMINOPTION                 196
00067 #define IDD_EDITORMON                   197
00068 #define IDD_NOPYTHON                    198
00069 #define IDD_TAG_MAIN                    199
00070 #define IDD_RTAG_MAIN                   200
00071 #define IDD_RTAG_OPTIONS                201
00072 #define IDD_STATUS_MAIN                 203
00073 #define IDD_ITEM_LIST                   205
00074 #define IDD_LOGIN_MAIN                  206
00075 #define IDR_ITEMLIST                    207
00076 #define IDD_PREFS_CVS                   207
00077 #define IDB_MODULES                     208
00078 #define IDD_RELEASE_MAIN                208
00079 #define IDB_IMPORT                      209
00080 #define IDD_SELECTION_DETAILS           209
00081 #define IDD_FILTERBAR_OPTIONS           212
00082 #define IDD_FILTER_SELECTION            213
00083 #define IDD_MULTILINE_ENTRY             214
00084 #define IDD_CVSTEMPLATE                 218
00085 #define IDD_OPEN_MAIN                   219
00086 #define IDI_MB_STOP                     220
00087 #define IDI_MB_INFORMATION              221
00088 #define IDI_MB_QUESTION                 222
00089 #define IDI_MB_EXCLAMATION              223
00090 #define IDD_CVSROOT                     224
00091 #define IDD_EDITKEYWORD                 226
00092 #define IDC_CVSROOT                     1000
00093 #define IDC_BULB                        1001
00094 #define IDC_CHECKOUT_READ_ONLY          1002
00095 #define IDC_STARTUP                     1003
00096 #define IDC_HAS_COMPRESSION             1004
00097 #define IDC_NEXTTIP                     1005
00098 #define IDC_PRUNE_EMPTY_DIR             1006
00099 #define IDC_TIPSTRING                   1007
00100 #define IDC_ENCRYPTION                  1008
00101 #define IDC_UNIX_LF                     1009
00102 #define IDC_NO_SPLASH_SCREEN            1011
00103 #define IDC_QUIET                       1012
00104 #define IDC_CONTROL_ADDED_FILES         1013
00105 #define IDC_FILEPATH                    1014
00106 #define IDC_PROMPTEDIT                  1015
00107 #define IDC_ALWAYSROOT                  1017
00108 #define IDC_PASSWORD                    1018
00109 #define IDC_AUTO_LOGOUT                 1019
00110 #define IDC_SPIN_AUTO_LOGOUT_TIME       1020
00111 #define IDC_MATCH_ENTRIES_CASE          1021
00112 #define IDC_BROWSE_CVSROOT              1024
00113 #define IDC_MULTILINE_ENTRY             1025
00114 #define IDC_STDOUT                      1027
00115 #define IDC_MODNAME                     1028
00116 #define IDC_BROWSE_PATH                 1029
00117 #define IDC_TAGNAME                     1030
00118 #define IDC_NORECURS                    1031
00119 #define IDC_PATH                        1032
00120 #define IDC_FORCE_HEAD_REV              1033
00121 #define IDC_ENTRY                       1034
00122 #define IDC_OVERWRITE                   1035
00123 #define IDC_HAS_REV                     1036
00124 #define IDC_MULTILINE_ENTRY_WRAP        1037
00125 #define IDC_RESET_STICKY                1038
00126 #define IDC_CREATE_MISSING_DIR          1039
00127 #define IDC_GET_CLEAN_COPY              1040
00128 #define IDC_ENTRIES_LIST                1048
00129 #define IDC_CONFLICT_DESC               1049
00130 #define IDC_ENTRY_EDIT                  1050
00131 #define IDC_WARNING_DESC                1051
00132 #define IDC_ENTRYSTATE_NO_CHANGE        1052
00133 #define IDC_HAS_DATE                    1053
00134 #define IDC_ENTRYSTATE_FORCE_TEXT       1054
00135 #define IDC_ENTRYSTATE_IGNORE           1055
00136 #define IDC_REV_TAG                     1056
00137 #define IDC_ENTRYSTATE_NO_EXPANSION     1057
00138 #define IDC_DATE1                       1059
00139 #define IDC_STATES                      1061
00140 #define IDC_DATE2                       1062
00141 #define IDC_REV_TAG2                    1063
00142 #define IDC_HAS_USERS                   1065
00143 #define IDC_NOTAGS                      1066
00144 #define IDC_HEADERS                     1068
00145 #define IDC_SUPRESS_HEADER              1069
00146 #define IDC_HAS_PATH                    1070
00147 #define IDC_HEADERS_DESC                1071
00148 #define IDC_ADD_SELECTION               1073
00149 #define IDC_HOME                        1074
00150 #define IDC_ADD_DEFAULT                 1075
00151 #define IDC_ENTRYSTATE_FORCE_BINARY     1076
00152 #define IDC_DATE                        1077
00153 #define IDC_ENTRYSTATE_FORCE_UNICODE    1078
00154 #define IDC_USERS                       1081
00155 #define IDC_DEFAULT_BRANCH              1082
00156 #define IDC_COLOR_STATE                 1083
00157 #define IDC_RCS_FILENAMES_ONLY          1084
00158 #define IDC_ISDATE1                     1085
00159 #define IDC_ISDATE2                     1086
00160 #define IDC_REV_TAG1                    1087
00161 #define IDC_BROWSE_EXTERNAL_EDITOR      1088
00162 #define IDC_RELEASE_TAG                 1089
00163 #define IDC_EXTERNAL_EDITOR             1090
00164 #define IDC_BAR_TREE                    1091
00165 #define IDC_USE_EXTERNAL_DIFF           1092
00166 #define IDC_BROWSE_ALTERNATE_SETTINGS   1093
00167 #define IDC_ATTIC                       1094
00168 #define IDC_HAS_EXTERNAL_DIFF           1095
00169 #define IDC_BROWSE_EXTERNAL_DIFF        1096
00170 #define IDC_EXTERNAL_DIFF               1097
00171 #define IDC_CHECK_UNMODIFIED            1098
00172 #define IDC_MULTILINE_POSITION          1099
00173 #define IDC_HAS_ALTERNATE_CVS           1100
00174 #define IDC_PYTHONDLL                   1101
00175 #define IDC_ALTERNATE_CVS               1102
00176 #define IDC_BROWSE_PYTHONDLL            1103
00177 #define IDC_MULTILINE_PREV_ENTRY        1104
00178 #define IDC_BROWSE_FILENAME             1105
00179 #define IDC_TCLDLL                      1106
00180 #define IDC_WINCVSVER                   1107
00181 #define IDC_BROWSE_TCLDLL               1108
00182 #define IDC_AUTO_LOGOUT_TIME            1110
00183 #define IDC_FORCE_CVSROOT               1114
00184 #define IDC_EXPORT                      1115
00185 #define IDC_HELP_INIT                   1116
00186 #define IDC_PROGRESS                    1118
00187 #define IDC_COMPRESSION                 1119
00188 #define IDC_SPIN_COMPRESSION            1120
00189 #define IDC_WINCVSURL                   1121
00190 #define IDC_ALLCMDS                     1122
00191 #define IDC_CVSGUISFURL                 1123
00192 #define IDC_ADD                         1125
00193 #define IDC_REMOVE                      1126
00194 #define IDC_UP                          1127
00195 #define IDC_DELETE_ALL_FILES            1128
00196 #define IDC_DOWN                        1129
00197 #define IDC_DELETE_CVS_INFO             1130
00198 #define IDC_MENULIST                    1131
00199 #define IDC_MULTILINE_WORDWRAP          1133
00200 #define IDC_IGNOREWHITESPACE            1135
00201 #define IDC_IGNORECASE                  1136
00202 #define IDC_UNIFIEDDIFF                 1138
00203 #define IDC_CHECKOUT_DIR                1139
00204 #define IDC_OVERRIDE_CHECKOUT_DIR       1140
00205 #define IDC_DEFAULT_CVSIGNORE           1141
00206 #define IDC_FORCE_COMMIT                1142
00207 #define IDC_FILES_MODIFICATION_TIME     1143
00208 #define IDC_FORCE_RECURSE               1144
00209 #define IDC_CREATE_SANDBOX              1145
00210 #define IDC_FORCE_REVISION              1146
00211 #define IDC_NO_MODULE_PROGRAM           1147
00212 #define IDC_VENDOR_TAG                  1148
00213 #define IDC_CHECK_VALID_EDITS           1149
00214 #define IDC_REPOSITORY_PATH             1150
00215 #define IDC_ALTERNATE_SETTINGS          1153
00216 #define IDC_COLOR_SELECTION             1154
00217 #define IDC_SKIP_UPDATE                 1155
00218 #define IDC_SKIP_DIFF                   1156
00219 #define IDC_SKIP_GRAPH                  1157
00220 #define IDC_SKIP_LOG                    1158
00221 #define IDC_FORCE_KEY_SHIFT             1159
00222 #define IDC_FORCE_KEY_CTRL              1160
00223 #define IDC_CONSOLE                     1161
00224 #define IDC_ISDATE                      1162
00225 #define IDC_SKIP_ANNOTATE               1163
00226 #define IDC_REV_TAG_DATE                1164
00227 #define IDC_SKIP_STATUS                 1165
00228 #define IDC_DIFF                        1166
00229 #define IDC_SKIP_FILEACTION             1167
00230 #define IDC_FILETODIFF                  1168
00231 #define IDC_COLOR_MERGE                 1169
00232 #define IDC_RESET_COLORS                1170
00233 #define IDC_COLOR_HEADER                1171
00234 #define IDC_COLOR_TAG                   1172
00235 #define IDC_RGB_HEADER                  1173
00236 #define IDC_RGB_TAG                     1174
00237 #define IDC_RGB_BRANCH                  1175
00238 #define IDC_RGB_NODE                    1176
00239 #define IDC_RGB_DEAD                    1177
00240 #define IDC_RGB_STATE                   1178
00241 #define IDC_COLOR_BRANCH                1179
00242 #define IDC_COLOR_NODE                  1180
00243 #define IDC_SELECTION                   1181
00244 #define IDC_COLOR_SHADOW                1182
00245 #define IDC_COLOR_DEAD                  1183
00246 #define IDC_RGB_SELECTION               1184
00247 #define IDC_RGB_SHADOW                  1185
00248 #define IDC_RGB_MERGE                   1186
00249 #define IDC_TEMPFILE                    1187
00250 #define IDC_REMIND                      1188
00251 #define IDC_PYTHON_URL                  1189
00252 #define IDC_PREVIEWINFO                 1190
00253 #define IDC_HAS_DATE1                   1192
00254 #define IDC_HAS_DATE2                   1193
00255 #define IDC_GRPBOX_TEXT                 1194
00256 #define IDC_TAGDESC_TEXT                1195
00257 #define IDC_MODULEDESC_TEXT             1196
00258 #define IDC_OUTPUT_QUICK                1197
00259 #define IDC_OUTPUT_VERBOSE              1198
00260 #define IDC_BROWSE_TAG                  1199
00261 #define IDC_OUTPUT_STANDARD             1200
00262 #define IDC_BROWSE_READ_FROM            1201
00263 #define IDC_BROWSE_TAG1                 1202
00264 #define IDC_BROWSE_TAG2                 1203
00265 #define IDC_BROWSE_MODNAME              1205
00266 #define IDC_ITEM_LIST                   1206
00267 #define IDC_REFRESH_ITEMS               1207
00268 #define IDC_READ_FROM                   1209
00269 #define IDC_ITEM                        1210
00270 #define IDC_ITEM_LABEL                  1211
00271 #define IDC_ITEM_LIST_OPTION            1212
00272 #define IDC_GROUP_OPTIONS               1215
00273 #define IDC_HELPLOGIN                   1216
00274 #define IDC_COMPARE_TYPE                1217
00275 #define IDC_KEYWORD_OPT                 1218
00276 #define IDC_KEYWORD_DESC                1219
00277 #define IDC_DIFFOPTIONS                 1220
00278 #define IDC_BROWSE_DIFFOPTIONS          1221
00279 #define IDC_HAS_ALTERNATE_SETTINGS      1222
00280 #define IDC_BROWSE_SELECTION            1223
00281 #define IDC_DELETE_DIRECTORY            1224
00282 #define IDC_PROGRESS_TEXT               1225
00283 #define IDC_SELECTION_LIST              1226
00284 #define IDC_FILENAME                    1227
00285 #define IDC_REVISION_SPIN               1228
00286 #define IDC_REVISION                    1229
00287 #define IDC_AUTO_REFRESH                1230
00288 #define IDC_HAS_BRANCHID                1231
00289 #define IDC_BRANCHID                    1232
00290 #define IDC_BROWSE_BRANCHID             1233
00291 #define IDC_MOVDEL_BRANCH               1234
00292 #define IDC_DONT_SHORTEN_PATHS          1235
00293 #define IDC_REACTION_SPEED              1236
00294 #define IDC_REACTION_SPEED_SPIN         1237
00295 #define IDC_FILTER_CONTENTS             1238
00296 #define IDC_FILTER                      1239
00297 #define IDC_REACTION_SPEED_SECONDS      1240
00298 #define IDC_CTRL_PRESSED_ON_OK          1241
00299 #define IDC_MULTILINE_TYPE              1242
00300 #define IDC_NO_VENDOR_RELEASE_TAGS      1243
00301 #define IDC_MULTILINE_ENTRY_STATIC      1244
00302 #define IDC_MULTILINE_GO_ACTION         1245
00303 #define IDC_OTHER_BUTTON                1246
00304 #define IDC_MULTILINE_ACTION            1247
00305 #define IDC_TEMPLATE_LIST               1248
00306 #define IDC_TEMPLATE_PREVIEW            1249
00307 #define IDC_ICON_STATIC                 1250
00308 #define IDC_MESSAGE_DETAILS             1251
00309 #define IDC_ALERT_MESSAGE               1252
00310 #define IDC_SHOW_CVS_METHOD             1253
00311 #define IDC_ACTION                      1254
00312 #define IDC_ACTION_DESC                 1255
00313 #define IDC_SAME_ACTION_NEXT_TIME       1256
00314 #define IDC_PROTOCOL_DESC               1257
00315 #define IDC_PROTOCOL                    1258
00316 #define IDC_KEYWORDLIST                 1259
00317 #define IDC_CLEAR_KEYWORD               1260
00318 #define IDC_KEYWORDLIST_DESC            1261
00319 #define IDC_EDIT_KEYWORD                1262
00320 #define IDC_PROTOCOL_KEYWORD            1263
00321 #define IDC_KEYWORD_DESCRIPTION         1264
00322 #define IDC_KEYWORD_VALUE               1265
00323 #define IDC_OVERWRITE_RELEASE_TAGS      1266
00324 #define IDC_IMPORT_FILTER               1267
00325 #define IDC_CURRENT_DIFF_OPTIONS        1268
00326 #define IDC_DIFF_OPTION_LIST            1269
00327 #define IDC_DIFF_OPTION_DESCRIPTION     1270
00328 #define IDC_STATICGROUP_SELECTOPTIONS   1271
00329 #define IDC_STATIC_CURRENTOPTIONS       1272
00330 #define IDC_STATIC_OPTDESC              1273
00331 #define IDC_APPLY                       1274
00332 #define IDC_SETTINGS_NAME               1275
00333 #define IDC_COPY_SETTINGS               1276
00334 #define IDC_COPY_SETTINGS_NAME          1277
00335 #define IDC_PREVIEW_CVSROOT             1278
00336 #define IDC_RANGE_REV_TAG               1279
00337 #define IDC_RANGE_DATE                  1280
00338 #define IDC_HAS_STATES                  1281
00339 #define IDC_LAST_CHECKIN_TIME           1282
00340 #define IDC_CASE_SENSITIVE_NAMES        1283
00341 #define IDC_THREE_WAY_CONFLICTS         1284
00342 #define IDC_BRANCHPOINT_MERGE           1285
00343 #define IDC_MERGE_TYPE                  1286
00344 #define ID_CANCEL_EDIT_CNTR             32768
00345 #define ID_APP_PREFERENCES              32775
00346 #define ID_APP_CMDLINE                  32776
00347 #define ID_APP_LOGIN                    32779
00348 #define ID_STOPCVS                      32795
00349 #define ID_BROWSER_OPEN                 32797
00350 #define ID_VIEW_BROWSER_BAR             32798
00351 #define ID_UPDATEBF                     32799
00352 #define ID_COMMITBF                     32800
00353 #define ID_ADDBF                        32801
00354 #define ID_VIEW_SMALLICONS              32802
00355 #define ID_VIEW_FULLLIST                32803
00356 #define ID_VIEW_ROWDETAILS              32804
00357 #define ID_VIEW_FILES_BAR               32805
00358 #define ID_VIEW_UPDATE                  32806
00359 #define ID_VIEW_COMMIT                  32807
00360 #define ID_VIEW_ADD                     32808
00361 #define ID_VIEW_WORKSPACE               32809
00362 #define ID_MENUBAR                      32810
00363 #define ID_VIEW_ADDB                    32811
00364 #define ID_VIEW_RMV                     32812
00365 #define IDS_COMBOBROWSER                32813
00366 #define ID_VIEW_RELOAD                  32814
00367 #define ID_VIEW_UPONE                   32826
00368 #define ID_VIEW_TRASH                   32830
00369 #define ID_VIEW_DIFF                    32833
00370 #define ID_VIEW_LOG                     32834
00371 #define ID_VIEW_STATUS                  32835
00372 #define ID_VIEW_LOCKF                   32836
00373 #define ID_VIEW_UNLOCKF                 32837
00374 #define ID_VIEW_MULTI_BAR               32838
00375 #define ID_MENUITEM32840                32840
00376 #define ID_VIEW_WATCHON                 32843
00377 #define ID_VIEW_WATCHOFF                32844
00378 #define ID_VIEW_EDIT                    32845
00379 #define ID_VIEW_UNEDIT                  32846
00380 #define ID_VIEW_RELEASE                 32847
00381 #define ID_VIEW_WATCHERS                32857
00382 #define ID_VIEW_EDITORS                 32858
00383 #define ID_CUST_FILES_MENU              32859
00384 #define ID_CUST_FOLDER_MENU             32860
00385 #define ID_APP_CREDITS                  32872
00386 #define ID_APP_COPYRIGHTS               32873
00387 #define ID_GRAPH_CLOSE                  32874
00388 #define ID_VIEW_GRAPH                   32875
00389 #define ID_APP_RTAGCREATE               32881
00390 #define ID_APP_RTAGDELETE               32882
00391 #define ID_APP_RTAGBRANCH               32883
00392 #define ID_VIEW_TAG                     32884
00393 #define ID_VIEW_TAGNEW                  32886
00394 #define ID_VIEW_TAGDELETE               32887
00395 #define ID_VIEW_TAGBRANCH               32888
00396 #define ID_VIEW_TAGS_BAR                32889
00397 #define ID_VIEW_CONSOLE_BAR             32898
00398 #define ID_VIEW_EXPLORE                 32899
00399 #define ID_HISTORYBROWSE                32900
00400 #define ID_VIEW_QUERYUPDATE             32901
00401 #define ID_VIEW_IGNORE                  32902
00402 #define ID_APP_LOGOUT                   32906
00403 #define ID_VIEW_EDITSEL                 32908
00404 #define ID_VIEW_EDITSELDEF              32909
00405 #define ID_ACCEL32911                   32911
00406 #define ID_VIEWW_INIT                   32912
00407 #define ID_VIEW_IMPORT                  32913
00408 #define ID_VIEW_INIT                    32914
00409 #define ID_VIEW_CHECKOUT                32915
00410 #define ID_VIEW_DELREV                  32916
00411 #define ID_VIEW_SELNONSIG               32917
00412 #define ID_BUTTON32918                  32918
00413 #define ID_BUTTON32919                  32919
00414 #define ID_BUTTON32920                  32920
00415 #define ID_BUTTON32921                  32921
00416 #define ID_SAVESETTINGS                 32922
00417 #define ID_VIEW_RETRIEVE                32923
00418 #define ID_VIEW_RECURSIVE               32924
00419 #define ID_VIEW_FILTER_BAR              32925
00420 #define ID_VIEW_MODIFIED                32927
00421 #define ID_FILTERMASK                   32928
00422 #define ID_VIEW_CONFLICT                32929
00423 #define ID_VIEW_UNKNOWN                 32931
00424 #define ID_VIEW_MISSING                 32932
00425 #define ID_VIEW_ADDED                   32935
00426 #define ID_VIEW_REMOVED                 32936
00427 #define ID_VIEW_CHANGED                 32937
00428 #define ID_VIEW_HIDEUNKNOWN             32938
00429 #define ID_VIEW_CLEARALL                32939
00430 #define ID_BUTTON32940                  32940
00431 #define ID_QUERY_ANNOTATE               32941
00432 #define ID_VIEW_BROWSELOCATION_REMOVEUNWANTED 32943
00433 #define ID_USE_TCLSHELL                 32944
00434 #define ID_USE_PYSHELL                  32945
00435 #define ID_GRAPH_GRAPHOPTIONS           32946
00436 #define ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE 32950
00437 #define ID_GRAPH_ADMINOPTIONS_SETSTATE  32951
00438 #define ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION 32952
00439 #define ID_VIEW_RESERVEDEDIT            32957
00440 #define ID_VIEW_FORCEEDIT               32958
00441 #define ID_VIEW_ADDU                    32960
00442 #define ID_VIEW_HIDEMISSING             32975
00443 #define ID_VIEW_FILTERBAR_ENABLE        32976
00444 #define ID_VIEW_FILTERBAR_CLEARALL      32977
00445 #define ID_VIEW_FILTERBAR_OPTIONS       32978
00446 #define ID_VIEW_RETRIEVEAS              32982
00447 #define ID_VIEW_OPENSEL                 32983
00448 #define ID_VIEW_OPENSELAS               32984
00449 #define ID_QUERY_SHELLACTION_DEFAULT    32986
00450 #define ID_HELP_CVS                     32987
00451 #define ID_QUERY_PROPERTIES             32988
00452 #define ID_VIEW_NEWINSTANCE             32989
00453 #define ID_MACRO_START                  34000
00454 #define ID_MACRO_SEL                    34100
00455 #define ID_MACRO_ADMIN                  34200
00456 #define ID_MACRO_END                    34200
00457
00458 // Next default values for new objects
00459 //
00460 #ifdef APSTUDIO_INVOKED
00461 #ifndef APSTUDIO_READONLY_SYMBOLS
00462 #define _APS_3D_CONTROLS                     1
00463 #define _APS_NEXT_RESOURCE_VALUE        232
00464 #define _APS_NEXT_COMMAND_VALUE         32990
00465 #define _APS_NEXT_CONTROL_VALUE         1287
00466 #define _APS_NEXT_SYMED_VALUE           115
00467 #endif
00468 #endif
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJSortClass.cpp Source File

WinCvs/CJLib/CJLibrary/CJSortClass.cpp

Go to the documentation of this file.
00001 // Copyright (c) Iuri Apollonio 1998
00002 // Use & modify as you want & need, and leave those 3 lines.
00003 // http://www.codeguru.com
00004 // class extended by Max Poliashenko.
00005 //
00006 // CJSortClass.cpp: implementation of the CCJSortClass class.
00007 //
00009 /****************************************************************************
00010  *
00011  * $Date: 1999/11/30 21:45:49 $
00012  * $Revision: 1.1.1.3 $
00013  * $Archive: /CodeJock/CJLibrary/CJSortClass.cpp $
00014  *
00015  * $History: CJSortClass.cpp $
00016  *
00017  * *****************  Version 4  *****************
00018  * User: Kirk Stowell Date: 10/14/99   Time: 12:19p
00019  * Updated in $/CodeJock/CJLibrary
00020  * Fixed assertion bug with constructior.
00021  *
00022  ***************************************************************************/
00024
00025 #include "stdafx.h"
00026 #include "CJSortClass.h"
00027
00028 #ifdef _DEBUG
00029 #undef THIS_FILE
00030 static char THIS_FILE[]=__FILE__;
00031 #define new DEBUG_NEW
00032 #endif
00033
00035 // Construction/Destruction
00037
00038 CCJSortClass::CCJSortClass(CListCtrl* pWnd, const int nCol)
00039 {
00040     ASSERT(pWnd);
00041     m_pWnd = pWnd;
00042
00043     int nCount = m_pWnd->GetItemCount();
00044     DWORD dwData;
00045     CString strItemText;
00046
00047     // replace Item data with pointer to CSortItem structure
00048     for (int i = 0; i < nCount; i++)
00049     {
00050         dwData = m_pWnd->GetItemData(i); // save current data to restore it later
00051         strItemText = m_pWnd->GetItemText(i, nCol);
00052         m_pWnd->SetItemData(i, (DWORD) new CSortItem(dwData, strItemText));
00053     }
00054 }
00055
00056 CCJSortClass::~CCJSortClass()
00057 {
00058     ASSERT(m_pWnd);
00059     int nCount = m_pWnd->GetItemCount();
00060     CSortItem * pItem;
00061     for (int i = 0; i < nCount; i++)
00062     {
00063         pItem = (CSortItem *) m_pWnd->GetItemData(i);
00064         ASSERT(pItem);
00065         m_pWnd->SetItemData(i, pItem->m_dwData);
00066         delete pItem;
00067     }
00068 }
00069
00070 void CCJSortClass::Sort(bool bAsc, DATA_TYPE eType)
00071 {
00072     long lParamSort = eType;
00073
00074     // if lParamSort positive - ascending sort order, negative - descending
00075     if (!bAsc)
00076         lParamSort *= -1;
00077
00078     m_pWnd->SortItems(Compare, lParamSort);
00079 }
00080
00081 int CALLBACK CCJSortClass::Compare(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
00082 {
00083     CSortItem* item1 = (CSortItem *) lParam1;
00084     CSortItem* item2 = (CSortItem *) lParam2;
00085
00086     ASSERT(item1 && item2);
00087
00088     // restore data type and sort order from lParamSort
00089     // if lParamSort positive - ascending sort order, negative - descending
00090     short     sOrder = lParamSort < 0 ? (short) -1 : (short) 1;
00091
00092     DATA_TYPE eType  = (DATA_TYPE) (lParamSort * sOrder); // get rid of sign
00093
00094     // declare typed buffers
00095     COleDateTime t1, t2;
00096
00097     switch (eType)
00098     {
00099     case DT_INT:
00100         return ( _ttol( item1->m_strItemText ) - _ttol( item2->m_strItemText )) * sOrder;
00101
00102     case DT_DEC:
00103 #ifdef _UNICODE
00104         {
00105             char szText1[ 256 ];
00106             char szText2[ 256 ];
00107
00108             WideCharToMultiByte( CP_ACP,
00109                                  0,
00110                                  item1->m_strItemText,
00111                                  -1,
00112                                  szText1,
00113                                  255,
00114                                  NULL,
00115                                  NULL );
00116
00117             WideCharToMultiByte( CP_ACP,
00118                                  0,
00119                                  item2->m_strItemText,
00120                                  -1,
00121                                  szText2,
00122                                  255,
00123                                  NULL,
00124                                  NULL );
00125
00126
00127             return ( atof( szText1 ) < atof( szText2 ) ? -1 : 1) * sOrder;
00128         }
00129 #else
00130         return ( atof ( item1->m_strItemText ) < atof( item2->m_strItemText ) ? -1 : 1) * sOrder;
00131 #endif
00132
00133     case DT_DATETIME:
00134         if( t1.ParseDateTime( item1->m_strItemText ) && t2.ParseDateTime( item2->m_strItemText ))
00135         {
00136             return (t1 < t2 ? -1 : 1 ) * sOrder;
00137         }
00138         return 0;
00139
00140     case DT_STRING:
00141         return item1->m_strItemText.CompareNoCase( item2->m_strItemText ) * sOrder;
00142
00143     default:
00144         ASSERT("Error: attempt to sort a column without type.");
00145         return 0;
00146     }
00147 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsMenubar Member List

This is the complete list of members for UCvsMenubar, including all inherited members.

_GetBaseClass() | UCvsMenubar | [protected, static]
_messageEntries | UCvsMenubar | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsMenubar | UCvsMenubar | [protected, static]
classUMenu | UMenu | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UCvsMenubar | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UCvsMenubar | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UCvsMenubar | [virtual]
GetThisMessageMap() | UCvsMenubar | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UCvsMenubar | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCommands(int cmd) | UMenu | [protected]
OnCreate() | UCvsMenubar | [protected]
OnDestroy() | UCvsMenubar | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UMenu | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsMenubar(void) | UCvsMenubar | [static]
rtUMenu(void) | UMenu | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsMenubar() | UCvsMenubar |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UMenu(int widid) | UMenu |
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsMenubar() | UCvsMenubar | [virtual]
~UMenu() | UMenu | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:51:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJToolBarBase.h Source File

WinCvs/CJLib/Include/CJToolBarBase.h

Go to the documentation of this file.
00001 // CJToolBarBase.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new IE4 controls'
00007 // http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/Include/CJToolBarBase.h $
00015  *
00016  * $History: CJToolBarBase.h $
00017  *
00018  * *****************  Version 8  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/Include
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 7  *****************
00024  * User: Kirk Stowell Date: 7/31/99    Time: 4:27p
00025  * Updated in $/CodeJockey/Include
00026  *
00027  * *****************  Version 5  *****************
00028  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00029  * Updated in $/CodeJockey/Include
00030  *
00031  * *****************  Version 4  *****************
00032  * User: Kirk Stowell Date: 7/25/99    Time: 12:12a
00033  * Updated in $/CodeJockey/Include
00034  *
00035  * *****************  Version 3  *****************
00036  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00037  * Updated in $/CodeJockey/Include
00038  *
00039  * *****************  Version 2  *****************
00040  * User: Kirk Stowell Date: 7/18/99    Time: 10:10p
00041  * Updated in $/CodeJockey/Include
00042  * Cleaned up inline functions, and import/export macro so that class will
00043  * be imported when linked to, and exported at compile time.
00044  *
00045  * *****************  Version 1  *****************
00046  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00047  * Created in $/CodeJockey/Include
00048  * Copied from MFC v6 and techno preview for v5. Added to extend
00049  * functionality to Visual C++ 5.0 users.
00050  *
00051  ***************************************************************************/
00053
00054 #ifndef __CCJTOOLBARBASE_H__
00055 #define __CCJTOOLBARBASE_H__
00056
00057 #ifdef _VC_VERSION_5
00058 typedef struct tagAFX_OLDTOOLINFO
00059 {
00060     UINT cbSize;
00061     UINT uFlags;
00062     HWND hwnd;
00063     UINT uId;
00064     RECT rect;
00065     HINSTANCE hinst;
00066     LPTSTR lpszText;
00067 } AFX_OLDTOOLINFO;
00068
00069 #define CBRS_GRIPPER                    0x00400000L
00070 #endif // _VC_VERSION_5
00071
00072 // CCJToolBarBase is a CControlBar derived class whis is used
00073 // by the CCJToolBar class.
00074 class _CJX_EXT_CLASS CCJToolBarBase : public CControlBar
00075 {
00076     DECLARE_DYNAMIC(CCJToolBarBase)
00077         // Construction
00078 protected:
00079     CCJToolBarBase();
00080
00081 // Attributes
00082     // getting and setting border space
00083     void SetBorders(LPCRECT lpRect);
00084     void SetBorders(int cxLeft = 0, int cyTop = 0, int cxRight = 0, int cyBottom = 0);
00085     CRect GetBorders() const;
00086
00087 // Implementation
00088 public:
00089     bool    m_bInReBar; // true if rebar is parent.
00090     bool    m_bExStyle; // true if created with the CreateEx style.
00091
00092     virtual ~CCJToolBarBase();
00093     virtual void DoPaint(CDC* pDC);
00094     void DrawGripper(CDC* pDC, const CRect& rect);
00095
00096     // implementation helpers
00097     virtual LRESULT WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam);
00098     void CalcInsideRect(CRect& rect, BOOL bHorz) const; // adjusts borders etc
00099     void EraseNonClient();
00100     void DrawBorders(CDC* pDC, CRect& rect);
00101
00102     //{{AFX_MSG(CCJToolBarBase)
00103     afx_msg void OnPaint();
00104     afx_msg void OnWindowPosChanging(LPWINDOWPOS lpWndPos);
00105     //}}AFX_MSG
00106     DECLARE_MESSAGE_MAP()
00107 };
00108
00110 // inline functions
00112
00113 _CJXLIB_INLINE void CCJToolBarBase::SetBorders(LPCRECT lpRect)
00114     { SetBorders(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); }
00115
00116 #endif //__CCJTOOLBARBASE_H__
00117
00119
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPersistentT< T > Member List

This is the complete list of members for CPersistentT< T >, including all inherited members.

_GetBaseClass() | CPersistent | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CPersistentT(const char *uniqueName, T defValue, kClassPersistent pclass) | CPersistentT< T > | [inline]
CreateObject(const char *className) | UObject | [static]
Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | CPersistentT< T > | [inline, virtual]
GetRuntimeClass() const | CPersistent | [virtual]
GetTimeStamp() const | CPersistent | [inline]
IsKindOf(const URuntimeClass *pClass) const | UObject |
LoadAll(const char *only=0L) | CPersistent | [static]
m_fAllEntries | CPersistent | [protected, static]
m_fDefValue | CPersistentT< T > | [protected]
m_fTimeStamp | CPersistent | [protected]
m_fValue | CPersistentT< T > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
operator const T &() const | CPersistentT< T > | [inline]
operator=(const T &val) | CPersistentT< T > | [inline]
operator==(const T &val) const | CPersistentT< T > | [inline]
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | CPersistentT< T > | [inline, virtual]
SizeOf(void) const | CPersistentT< T > | [inline, virtual]
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CPersistent() | CPersistent | [virtual]
~CPersistentT() | CPersistentT< T > | [inline, virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/DiffDlg.cpp Source File

common/DiffDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * DiffDlg.cpp : the cvs diff dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "OptionalPropertySheet.h"
00030 #   include "wincvs_winutil.h"
00031 #endif /* WIN32 */
00032
00033 #if qUnix
00034 #   include "UCvsDialogs.h"
00035 #endif
00036
00037 #ifdef qMacCvsPP
00038 #   include <UModalDialogs.h>
00039 #   include <LRadioButton.h>
00040 #   include <LEditText.h>
00041 #   include <LCheckBox.h>
00042 #   include <LMultiPanelView.h>
00043 #   include <LPopupGroupBox.h>
00044 #   include "LPopupFiller.h"
00045
00046 #   include "MacCvsConstant.h"
00047 # include "UCommandDialogs.h"
00048 #endif /* qMacCvsPP */
00049
00050 #define _DIFF_CPP_
00051
00052 #include "DiffDlg.h"
00053 #include "CvsPrefs.h"
00054 #include "MultiFiles.h"
00055 #include "UpdateDlg.h"
00056 #include "ItemListDlg.h"
00057
00058 extern CMString gDateOrRevNames;
00059
00060 CPersistentBool gUseExtDiff("P_DiffUseExtDiff", false);
00061 static CPersistentBool gIgnoreCase("P_IgnoreCase", false);
00062 static CPersistentBool gNoWhiteSpace("P_NoWhiteSpace", false);
00063 static CPersistentBool gNoBlankLines("P_NoBlankLines", false);
00064 static CPersistentBool gUnifiedDiff("P_UnifiedDiff", false);
00065
00066 CMString gDiffOptions(20, "P_DiffOptions");
00067
00068 #define STR_DIFFDEFAULT_REV     "HEAD"
00069 #define STR_DIFFDEFAULT_DATE    "yesterday"
00070
00071 // Option description format
00072 #define STR_DIFFOPT_OPTIONDESCRIPTION_FORMAT    "[%s]: %s"
00073
00074 // Diff options and descriptions strings
00075 #define STR_DIFFOPT_OPT_A       "-a"
00076 #define STR_DIFFOPT_DESC_A          "Treat all files as text and compare them line-by-line, even if they do not seem to be text"
00077 #define STR_DIFFOPT_OPT_B       "-b"
00078 #define STR_DIFFOPT_DESC_B          "Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent"
00079 #define STR_DIFFOPT_OPT_BB      "-B"
00080 #define STR_DIFFOPT_DESC_BB         "Ignore changes that just insert or delete blank lines"
00081 #define STR_DIFFOPT_OPT_BINARY  "--binary"
00082 #define STR_DIFFOPT_DESC_BINARY     "Read and write data in binary mode"
00083 #define STR_DIFFOPT_OPT_BRIEF   "--brief"
00084 #define STR_DIFFOPT_DESC_BRIEF      "Report only whether the files differ, not the details of the differences"
00085 #define STR_DIFFOPT_OPT_C       "-c"
00086 #define STR_DIFFOPT_DESC_C          "Use the context output format"
00087 #define STR_DIFFOPT_OPT_CC      "-C lines"
00088 #define STR_DIFFOPT_DESC_CC         "Use the context output format, showing lines (an integer) lines of context, or three if lines is not given. For proper operation, patch typically needs at least two lines of context"
00089 #define STR_DIFFOPT_OPT_C_G_F   "--changed-group-format=format"
00090 #define STR_DIFFOPT_DESC_C_G_F      "Use format to output a line group containing differing lines from both files in if-then-else format. See CVS manual for line group formats"
00091 #define STR_DIFFOPT_OPT_D       "-d"
00092 #define STR_DIFFOPT_DESC_D          "Change the algorithm to perhaps find a smaller set of changes. This makes diff slower (sometimes much slower)"
00093 #define STR_DIFFOPT_OPT_E       "-e"
00094 #define STR_DIFFOPT_DESC_E          "Make output that is a valid ed script"
00095 #define STR_DIFFOPT_OPT_E_T     "--expand-tabs"
00096 #define STR_DIFFOPT_DESC_E_T        "Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files"
00097 #define STR_DIFFOPT_OPT_F       "-f"
00098 #define STR_DIFFOPT_DESC_F          "Make output that looks vaguely like an ed script but has changes in the order they appear in the file"
00099 #define STR_DIFFOPT_OPT_FF      "-F regexp"
00100 #define STR_DIFFOPT_DESC_FF         "In context and unified format, for each hunk of differences, show some of the last preceding line that matches regexp"
00101 #define STR_DIFFOPT_OPT_F_E     "--forward-ed"
00102 #define STR_DIFFOPT_DESC_F_E        "Make output that looks vaguely like an ed script but has changes in the order they appear in the file"
00103 #define STR_DIFFOPT_OPT_HH      "-H"
00104 #define STR_DIFFOPT_DESC_HH         "Use heuristics to speed handling of large files that have numerous scattered small changes"
00105 #define STR_DIFFOPT_OPT_H_L     "--horizon-lines=lines"
00106 #define STR_DIFFOPT_DESC_H_L        "Do not discard the last lines lines of the common prefix and the first lines lines of the common suffix"
00107 #define STR_DIFFOPT_OPT_I       "-i"
00108 #define STR_DIFFOPT_DESC_I          "Ignore changes in case; consider upper- and lower-case letters equivalent"
00109 #define STR_DIFFOPT_OPT_II      "-I regexp"
00110 #define STR_DIFFOPT_DESC_II         "Ignore changes that just insert or delete lines that match regexp"
00111 #define STR_DIFFOPT_OPT_IFDEF   "--ifdef=name"
00112 #define STR_DIFFOPT_DESC_IFDEF      "Make merged if-then-else output using name"
00113 #define STR_DIFFOPT_OPT_I_A_S   "--ignore-all-space"
00114 #define STR_DIFFOPT_DESC_I_A_S      "Ignore white space when comparing lines"
00115 #define STR_DIFFOPT_OPT_I_B_L   "--ignore-blank-lines"
00116 #define STR_DIFFOPT_DESC_I_B_L      "Ignore changes that just insert or delete blank lines"
00117 #define STR_DIFFOPT_OPT_I_C     "--ignore-case"
00118 #define STR_DIFFOPT_DESC_I_C        "Ignore changes in case; consider upper- and lower-case to be the same"
00119 #define STR_DIFFOPT_OPT_I_M_L   "--ignore-matching-lines=regexp"
00120 #define STR_DIFFOPT_DESC_I_M_L      "Ignore changes that just insert or delete lines that match regexp"
00121 #define STR_DIFFOPT_OPT_I_S_C   "--ignore-space-change"
00122 #define STR_DIFFOPT_DESC_I_S_C      "Ignore trailing white space and consider all other sequences of one or more white space characters to be equivalent"
00123 #define STR_DIFFOPT_OPT_I_T     "--initial-tab"
00124 #define STR_DIFFOPT_DESC_I_T        "Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal"
00125 #define STR_DIFFOPT_OPT_LL      "-L label"
00126 #define STR_DIFFOPT_DESC_LL         "Use label instead of the file name in the context format and unified format headers"
00127 #define STR_DIFFOPT_OPT_LABEL   "--label=label"
00128 #define STR_DIFFOPT_DESC_LABEL      "Use label instead of the file name in the context format and unified format headers"
00129 #define STR_DIFFOPT_OPT_L_C     "--left-column"
00130 #define STR_DIFFOPT_DESC_L_C        "Print only the left column of two common lines in side by side format"
00131 #define STR_DIFFOPT_OPT_L_F     "--line-format=format"
00132 #define STR_DIFFOPT_DESC_L_F        "Use format to output all input lines in if-then-else format. See CVS manual for line formats"
00133 #define STR_DIFFOPT_OPT_MINIMAL "--minimal"
00134 #define STR_DIFFOPT_DESC_MINIMAL    "Change the algorithm to perhaps find a smaller set of changes. This makes diff slower (sometimes much slower)"
00135 #define STR_DIFFOPT_OPT_N       "-n"
00136 #define STR_DIFFOPT_DESC_N          "Output RCS-format diffs; like `-f' except that each command specifies the number of lines affected"
00137 #define STR_DIFFOPT_OPT_NN      "-N"
00138 #define STR_DIFFOPT_DESC_NN         "In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory"
00139 #define STR_DIFFOPT_OPT_N_G_F   "--new-group-format=format"
00140 #define STR_DIFFOPT_DESC_N_G_F      "Use format to output a group of lines taken from just the second file in if-then-else format. See section A.9.1.1 Line group formats"
00141 #define STR_DIFFOPT_OPT_N_L_F   "--new-line-format=format"
00142 #define STR_DIFFOPT_DESC_N_L_F      "Use format to output a line taken from just the second file in if-then-else format. See CVS manual for line formats"
00143 #define STR_DIFFOPT_OPT_O_G_F   "--old-group-format=format"
00144 #define STR_DIFFOPT_DESC_O_G_F      "Use format to output a group of lines taken from just the first file in if-then-else format. See section A.9.1.1 Line group formats"
00145 #define STR_DIFFOPT_OPT_O_L_F   "--old-line-format=format"
00146 #define STR_DIFFOPT_DESC_O_L_F      "Use format to output a line taken from just the first file in if-then-else format. See CVS manual for line formats"
00147 #define STR_DIFFOPT_OPT_P       "-p"
00148 #define STR_DIFFOPT_DESC_PP         "Show which C function each change is in"
00149 #define STR_DIFFOPT_OPT_RCS     "--rcs"
00150 #define STR_DIFFOPT_DESC_RCS        "Output RCS-format diffs; like `-f' except that each command specifies the number of lines affected"
00151 #define STR_DIFFOPT_OPT_S       "-s"
00152 #define STR_DIFFOPT_DESC_S          "Report when two files are the same"
00153 #define STR_DIFFOPT_OPT_S_C_F   "--show-c-function"
00154 #define STR_DIFFOPT_DESC_S_C_F      "Show which C function each change is in"
00155 #define STR_DIFFOPT_OPT_S_F_L   "--show-function-line=regexp"
00156 #define STR_DIFFOPT_DESC_S_F_L      "In context and unified format, for each hunk of differences, show some of the last preceding line that matches regexp"
00157 #define STR_DIFFOPT_OPT_S_B_S   "--side-by-side"
00158 #define STR_DIFFOPT_DESC_S_B_S      "Use the side by side output format"
00159 #define STR_DIFFOPT_OPT_S_L_F   "--speed-large-files"
00160 #define STR_DIFFOPT_DESC_S_L_F      "Use heuristics to speed handling of large files that have numerous scattered small changes"
00161 #define STR_DIFFOPT_OPT_S_C_L   "--suppress-common-lines"
00162 #define STR_DIFFOPT_DESC_S_C_L      "Do not print common lines in side by side format"
00163 #define STR_DIFFOPT_OPT_T       "-t"
00164 #define STR_DIFFOPT_DESC_T          "Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files"
00165 #define STR_DIFFOPT_OPT_TT      "-T"
00166 #define STR_DIFFOPT_DESC_TT         "Output a tab rather than a space before the text of a line in normal or context format. This causes the alignment of tabs in the line to look normal"
00167 #define STR_DIFFOPT_OPT_TEXT    "--text"
00168 #define STR_DIFFOPT_DESC_TEXT       "Treat all files as text and compare them line-by-line, even if they do not appear to be text"
00169 #define STR_DIFFOPT_OPT_U       "-u"
00170 #define STR_DIFFOPT_DESC_U          "Use the unified output format"
00171 #define STR_DIFFOPT_OPT_U_G_F   "--unchanged-group-format=format"
00172 #define STR_DIFFOPT_DESC_U_G_F      "Use format to output a group of common lines taken from both files in if-then-else format. See section A.9.1.1 Line group formats"
00173 #define STR_DIFFOPT_OPT_U_L_F   "--unchanged-line-format=format"
00174 #define STR_DIFFOPT_DESC_U_L_F      "Use format to output a line common to both files in if-then-else format. See CVS manual for line formats"
00175 #define STR_DIFFOPT_OPT_UU      "-U lines"
00176 #define STR_DIFFOPT_DESC_UU         "Use the unified output format, showing lines (an integer) lines of context, or three if lines is not given. For proper operation, patch typically needs at least two lines of context"
00177 #define STR_DIFFOPT_OPT_W       "-w"
00178 #define STR_DIFFOPT_DESC_W          "Ignore white space when comparing lines"
00179 #define STR_DIFFOPT_OPT_WW      "-W columns"
00180 #define STR_DIFFOPT_DESC_WW         "Use an output width of columns in side by side format"
00181 #define STR_DIFFOPT_OPT_Y       "-y"
00182 #define STR_DIFFOPT_DESC_Y          "Use the side by side output format"
00183
00185 typedef struct _sDiffOptionsItem{
00186     const char* option;
00187     const char* description;
00188 }DiffOptionsItem;
00189
00191 static DiffOptionsItem sDiffOptions[] =
00192 {
00193     { STR_DIFFOPT_OPT_A,        STR_DIFFOPT_DESC_A          },
00194     { STR_DIFFOPT_OPT_B,        STR_DIFFOPT_DESC_B          },
00195     { STR_DIFFOPT_OPT_BB,       STR_DIFFOPT_DESC_BB         },
00196     { STR_DIFFOPT_OPT_BINARY,   STR_DIFFOPT_DESC_BINARY     },
00197     { STR_DIFFOPT_OPT_BRIEF,    STR_DIFFOPT_DESC_BRIEF      },
00198     { STR_DIFFOPT_OPT_C,        STR_DIFFOPT_DESC_C          },
00199     { STR_DIFFOPT_OPT_CC,       STR_DIFFOPT_DESC_CC         },
00200     { STR_DIFFOPT_OPT_C_G_F,    STR_DIFFOPT_DESC_C_G_F      },
00201     { STR_DIFFOPT_OPT_D,        STR_DIFFOPT_DESC_D          },
00202     { STR_DIFFOPT_OPT_E,        STR_DIFFOPT_DESC_E          },
00203     { STR_DIFFOPT_OPT_E_T,      STR_DIFFOPT_DESC_E_T        },
00204     { STR_DIFFOPT_OPT_F,        STR_DIFFOPT_DESC_F          },
00205     { STR_DIFFOPT_OPT_FF,       STR_DIFFOPT_DESC_FF         },
00206     { STR_DIFFOPT_OPT_F_E,      STR_DIFFOPT_DESC_F_E        },
00207     { STR_DIFFOPT_OPT_HH,       STR_DIFFOPT_DESC_HH         },
00208     { STR_DIFFOPT_OPT_H_L,      STR_DIFFOPT_DESC_H_L        },
00209     { STR_DIFFOPT_OPT_I,        STR_DIFFOPT_DESC_I          },
00210     { STR_DIFFOPT_OPT_II,       STR_DIFFOPT_DESC_II         },
00211     { STR_DIFFOPT_OPT_IFDEF,    STR_DIFFOPT_DESC_IFDEF      },
00212     { STR_DIFFOPT_OPT_I_A_S,    STR_DIFFOPT_DESC_I_A_S      },
00213     { STR_DIFFOPT_OPT_I_B_L,    STR_DIFFOPT_DESC_I_B_L      },
00214     { STR_DIFFOPT_OPT_I_C,      STR_DIFFOPT_DESC_I_C        },
00215     { STR_DIFFOPT_OPT_I_M_L,    STR_DIFFOPT_DESC_I_M_L      },
00216     { STR_DIFFOPT_OPT_I_S_C,    STR_DIFFOPT_DESC_I_S_C      },
00217     { STR_DIFFOPT_OPT_I_T,      STR_DIFFOPT_DESC_I_T        },
00218     { STR_DIFFOPT_OPT_LL,       STR_DIFFOPT_DESC_LL         },
00219     { STR_DIFFOPT_OPT_LABEL,    STR_DIFFOPT_DESC_LABEL      },
00220     { STR_DIFFOPT_OPT_L_C,      STR_DIFFOPT_DESC_L_C        },
00221     { STR_DIFFOPT_OPT_L_F,      STR_DIFFOPT_DESC_L_F        },
00222     { STR_DIFFOPT_OPT_MINIMAL,  STR_DIFFOPT_DESC_MINIMAL    },
00223     { STR_DIFFOPT_OPT_N,        STR_DIFFOPT_DESC_N          },
00224     { STR_DIFFOPT_OPT_NN,       STR_DIFFOPT_DESC_NN         },
00225     { STR_DIFFOPT_OPT_N_G_F,    STR_DIFFOPT_DESC_N_G_F      },
00226     { STR_DIFFOPT_OPT_N_L_F,    STR_DIFFOPT_DESC_N_L_F      },
00227     { STR_DIFFOPT_OPT_O_G_F,    STR_DIFFOPT_DESC_O_G_F      },
00228     { STR_DIFFOPT_OPT_O_L_F,    STR_DIFFOPT_DESC_O_L_F      },
00229     { STR_DIFFOPT_OPT_P,        STR_DIFFOPT_DESC_PP         },
00230     { STR_DIFFOPT_OPT_RCS,      STR_DIFFOPT_DESC_RCS        },
00231     { STR_DIFFOPT_OPT_S,        STR_DIFFOPT_DESC_S          },
00232     { STR_DIFFOPT_OPT_S_C_F,    STR_DIFFOPT_DESC_S_C_F      },
00233     { STR_DIFFOPT_OPT_S_F_L,    STR_DIFFOPT_DESC_S_F_L      },
00234     { STR_DIFFOPT_OPT_S_B_S,    STR_DIFFOPT_DESC_S_B_S      },
00235     { STR_DIFFOPT_OPT_S_L_F,    STR_DIFFOPT_DESC_S_L_F      },
00236     { STR_DIFFOPT_OPT_S_C_L,    STR_DIFFOPT_DESC_S_C_L      },
00237     { STR_DIFFOPT_OPT_T,        STR_DIFFOPT_DESC_T          },
00238     { STR_DIFFOPT_OPT_TT,       STR_DIFFOPT_DESC_TT         },
00239     { STR_DIFFOPT_OPT_TEXT,     STR_DIFFOPT_DESC_TEXT       },
00240     { STR_DIFFOPT_OPT_U,        STR_DIFFOPT_DESC_U          },
00241     { STR_DIFFOPT_OPT_U_G_F,    STR_DIFFOPT_DESC_U_G_F      },
00242     { STR_DIFFOPT_OPT_U_L_F,    STR_DIFFOPT_DESC_U_L_F      },
00243     { STR_DIFFOPT_OPT_UU,       STR_DIFFOPT_DESC_UU         },
00244     { STR_DIFFOPT_OPT_W,        STR_DIFFOPT_DESC_W          },
00245     { STR_DIFFOPT_OPT_WW,       STR_DIFFOPT_DESC_WW         },
00246     { STR_DIFFOPT_OPT_Y,        STR_DIFFOPT_DESC_Y          },
00247 };
00248
00249 //{ Win32 - Part
00250 #ifdef WIN32
00251 #include "GetPrefs.h"
00252
00253 #ifdef _DEBUG
00254 #define new DEBUG_NEW
00255 #undef THIS_FILE
00256 static char THIS_FILE[] = __FILE__;
00257 #endif
00258
00259 IMPLEMENT_DYNAMIC(CDiff_MAIN, CHHelpPropertyPage)
00260
00261 CDiff_MAIN::CDiff_MAIN(const MultiFiles* mf, kDiffCmdType diffType,
00262                        const char* rev1, const char* rev2,
00263                        bool allowExtDiff, bool useExtDiff,
00264                        bool unifiedDiff, bool noWhiteSpace, bool ignoreCase,
00265                        const char* keyword, const char* diffOptions)
00266                        : m_mf(mf), m_diffType(diffType), m_compareTypeCombo(USmartCombo::AutoDropWidth), m_allowExtDiff(allowExtDiff),
00267                        CHHelpPropertyPage(CDiff_MAIN::IDD)
00268 {
00269     //{{AFX_DATA_INIT(CDiff_MAIN)
00270     m_isDate1 = FALSE;
00271     m_isDate2 = FALSE;
00272     m_rev1 = rev1;
00273     m_rev2 = rev2;
00274     m_noWhiteSpace = noWhiteSpace;
00275     m_ignoreCase = ignoreCase;
00276     m_compareType = kCompareSameRev;
00277     m_unifiedDiff = unifiedDiff;
00278     m_keyword = keyword;
00279     m_noRecurs = FALSE;
00280     m_extDiff = useExtDiff;
00281     m_diffOptions = diffOptions;
00282     //}}AFX_DATA_INIT
00283
00284     if( kDiffGraph != m_diffType )
00285     {
00286         m_rev1Combo.SetItems(m_isDate1 ? &gDateNames : &gRevNames);
00287         m_rev2Combo.SetItems(m_isDate2 ? &gDateNames : &gRevNames);
00288     }
00289     else
00290     {
00291         m_compareType = m_mf->TotalNumFiles() == 1 ? kCompareAnotherRev : kCompareTwoRev;
00292
00293         m_rev1Combo.SetFeature(USmartCombo::AutoDropWidth | USmartCombo::ReadOnly);
00294         m_rev2Combo.SetFeature(USmartCombo::AutoDropWidth | USmartCombo::ReadOnly);
00295
00296         if( m_mf && m_mf->TotalNumFiles() )
00297         {
00298             MultiFiles::const_iterator mfi;
00299             for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
00300             {
00301                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
00302                 {
00303                     UStr path;
00304                     UStr fileName;
00305                     UStr currRev;
00306
00307                     mfi->get(nIndex, path, fileName, currRev);
00308
00309                     switch( nIndex )
00310                     {
00311                     case 0:
00312                         m_rev1 = currRev.c_str();
00313                         break;
00314                     case 1:
00315                         m_rev2 = currRev.c_str();
00316                         break;
00317                     default:
00318                         ASSERT(FALSE);  // there should be no more than 2 files in the selection
00319                         break;
00320                     }
00321                 }
00322             }
00323         }
00324     }
00325
00326     m_diffOptionsCombo.SetItems(&gDiffOptions);
00327 }
00328
00329 CDiff_MAIN::~CDiff_MAIN()
00330 {
00331 }
00332
00333 void CDiff_MAIN::DoDataExchange(CDataExchange* pDX)
00334 {
00335     CHHelpPropertyPage::DoDataExchange(pDX);
00336     //{{AFX_DATA_MAP(CDiff_MAIN)
00337     DDX_Control(pDX, IDC_DIFFOPTIONS, m_diffOptionsCombo);
00338     DDX_Control(pDX, IDC_IGNOREWHITESPACE, m_noWhiteSpaceCheck);
00339     DDX_Control(pDX, IDC_IGNORECASE, m_ignoreCaseCheck);
00340     DDX_Control(pDX, IDC_USE_EXTERNAL_DIFF, m_extDiffButton);
00341     DDX_Control(pDX, IDC_BROWSE_DIFFOPTIONS, m_optionsMenuButton);
00342     DDX_Control(pDX, IDC_NORECURS, m_noRecursCheck);
00343     DDX_Control(pDX, IDC_UNIFIEDDIFF, m_unifiedDiffCheck);
00344     DDX_Control(pDX, IDC_KEYWORD_DESC, m_keywordDescStatic);
00345     DDX_Control(pDX, IDC_KEYWORD_OPT, m_keywordCombo);
00346     DDX_Control(pDX, IDC_BROWSE_TAG2, m_browseTag2Button);
00347     DDX_Control(pDX, IDC_BROWSE_TAG1, m_browseTag1Button);
00348     DDX_Control(pDX, IDC_ISDATE2, m_isDate2Check);
00349     DDX_Control(pDX, IDC_ISDATE1, m_isDate1Check);
00350     DDX_Control(pDX, IDC_COMPARE_TYPE, m_compareTypeCombo);
00351     DDX_Control(pDX, IDC_REV_TAG2, m_rev2Combo);
00352     DDX_Control(pDX, IDC_REV_TAG1, m_rev1Combo);
00353     DDX_Check(pDX, IDC_ISDATE1, m_isDate1);
00354     DDX_Check(pDX, IDC_ISDATE2, m_isDate2);
00355     DDX_CBString(pDX, IDC_REV_TAG1, m_rev1);
00356     DDX_CBString(pDX, IDC_REV_TAG2, m_rev2);
00357     DDX_Check(pDX, IDC_IGNOREWHITESPACE, m_noWhiteSpace);
00358     DDX_Check(pDX, IDC_IGNORECASE, m_ignoreCase);
00359     DDX_CBIndex(pDX, IDC_COMPARE_TYPE, m_compareType);
00360     DDX_Check(pDX, IDC_UNIFIEDDIFF, m_unifiedDiff);
00361     DDX_CBString(pDX, IDC_KEYWORD_OPT, m_keyword);
00362     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00363     DDX_Check(pDX, IDC_USE_EXTERNAL_DIFF, m_extDiff);
00364     DDX_CBString(pDX, IDC_DIFFOPTIONS, m_diffOptions);
00365     //}}AFX_DATA_MAP
00366
00367     if( kDiffGraph != m_diffType )
00368     {
00369         if( kCompareAnotherRev == m_compareType || kCompareTwoRev == m_compareType )
00370         {
00371             DDV_MinChars(pDX, m_rev1, 1);
00372         }
00373
00374         if( kCompareTwoRev == m_compareType )
00375         {
00376             DDV_MinChars(pDX, m_rev2, 1);
00377         }
00378
00379         if( !pDX->m_bSaveAndValidate )
00380         {
00381             EnableCompareType(m_compareType);
00382         }
00383
00384         DDX_ComboMString(pDX, IDC_REV_TAG1, m_rev1Combo);
00385         DDX_ComboMString(pDX, IDC_REV_TAG2, m_rev2Combo);
00386
00387         DDX_ComboMString(pDX, IDC_DIFFOPTIONS, m_diffOptionsCombo);
00388     }
00389
00390     m_extDiffButton.EnableWindow(m_allowExtDiff ? true : false);
00391
00392     OnExtdiff();
00393 }
00394
00395 BEGIN_MESSAGE_MAP(CDiff_MAIN, CHHelpPropertyPage)
00396     //{{AFX_MSG_MAP(CDiff_MAIN)
00397     ON_BN_CLICKED(IDC_USE_EXTERNAL_DIFF, OnExtdiff)
00398     ON_BN_CLICKED(IDC_ISDATE1, OnCheck1)
00399     ON_BN_CLICKED(IDC_ISDATE2, OnCheck2)
00400     ON_BN_CLICKED(IDC_BROWSE_TAG1, OnBrowseTag1)
00401     ON_BN_CLICKED(IDC_BROWSE_TAG2, OnBrowseTag2)
00402     ON_CBN_SELCHANGE(IDC_COMPARE_TYPE, OnSelchangeCompareType)
00403     ON_BN_CLICKED(IDC_BROWSE_DIFFOPTIONS, OnOptionsmenu)
00404     //}}AFX_MSG_MAP
00405 END_MESSAGE_MAP()
00406
00408 // CDiff_MAIN message handlers
00409
00411 void CDiff_MAIN::OnExtdiff()
00412 {
00413     EnableCmdLineDiffOptions(!m_extDiffButton.GetCheck() || !m_extDiffButton.IsWindowEnabled());
00414 }
00415
00420 void CDiff_MAIN::EnableCmdLineDiffOptions(bool enable)
00421 {
00422     m_unifiedDiffCheck.EnableWindow(enable);
00423     m_ignoreCaseCheck.EnableWindow(enable);
00424     m_noWhiteSpaceCheck.EnableWindow(enable);
00425     m_noRecursCheck.EnableWindow(enable);
00426     m_keywordCombo.EnableWindow(enable);
00427     m_keywordDescStatic.EnableWindow(enable);
00428     m_diffOptionsCombo.EnableWindow(enable);
00429     m_optionsMenuButton.EnableWindow(enable);
00430 }
00431
00433 void CDiff_MAIN::OnCheck1()
00434 {
00435     BOOL isDate = m_isDate1Check.GetCheck();
00436
00437     m_rev1Combo.SetItems(isDate ? &gDateNames : &gRevNames);
00438     DDX_ComboMString(NULL, IDC_REV_TAG1, m_rev1Combo);
00439
00440     m_browseTag1Button.EnableWindow(!isDate);
00441
00442     SetDefaultInput(kDefRev1Change, m_compareTypeCombo.GetCurSel());
00443 }
00444
00446 void CDiff_MAIN::OnCheck2()
00447 {
00448     BOOL isDate = m_isDate2Check.GetCheck();
00449
00450     m_rev2Combo.SetItems(isDate ? &gDateNames : &gRevNames);
00451     DDX_ComboMString(NULL, IDC_REV_TAG2, m_rev2Combo);
00452
00453     m_browseTag2Button.EnableWindow(!isDate);
00454
00455     SetDefaultInput(kDefRev2Change, m_compareTypeCombo.GetCurSel());
00456 }
00457
00459 void CDiff_MAIN::OnBrowseTag1()
00460 {
00461     CStr tagName;
00462     if( CompatGetTagListItem(m_mf, tagName) )
00463     {
00464         m_rev1 = (const char*)tagName;
00465         m_rev1Combo.SetWindowText(m_rev1);
00466     }
00467 }
00468
00470 void CDiff_MAIN::OnBrowseTag2()
00471 {
00472     CStr tagName;
00473     if( CompatGetTagListItem(m_mf, tagName) )
00474     {
00475         m_rev2 = (const char*)tagName;
00476         m_rev2Combo.SetWindowText(m_rev2);
00477     }
00478 }
00479
00481 void CDiff_MAIN::OnSelchangeCompareType()
00482 {
00483     const int compareType = m_compareTypeCombo.GetCurSel();
00484
00485     EnableCompareType(compareType);
00486     SetDefaultInput(kDefTypeChange, compareType);
00487 }
00488
00493 void CDiff_MAIN::EnableCompareType(const int compareType)
00494 {
00495     bool hasRev1 = false;
00496     bool hasRev2 = false;
00497
00498     switch( compareType )
00499     {
00500     default:
00501         ASSERT(FALSE);  //unknown compare type
00502     case kCompareSameRev:
00503         hasRev1 = hasRev2 = false;
00504         break;
00505     case kCompareAnotherRev:
00506         hasRev1 = true;
00507         hasRev2 = false;
00508         break;
00509     case kCompareTwoRev:
00510         hasRev1 = true;
00511         hasRev2 = true;
00512         break;
00513     }
00514
00515     m_rev1Combo.EnableWindow(hasRev1);
00516     m_isDate1Check.EnableWindow(hasRev1);
00517     m_browseTag1Button.EnableWindow(hasRev1);
00518
00519     m_rev2Combo.EnableWindow(hasRev2);
00520     m_isDate2Check.EnableWindow(hasRev2);
00521     m_browseTag2Button.EnableWindow(hasRev2);
00522 }
00523
00529 void CDiff_MAIN::SetDefaultInput(const kInputChange inputChange, const int compareType)
00530 {
00531     CString strRev1;
00532     CString strRev2;
00533
00534     m_rev1Combo.GetWindowText(strRev1);
00535     m_rev2Combo.GetWindowText(strRev2);
00536
00537     switch( inputChange )
00538     {
00539     case kDefRev1Change:
00540         if( strRev1.IsEmpty() || IsDefaultedRev(&m_rev1Combo) )
00541         {
00542             m_rev1Combo.SetWindowText(m_isDate1Check.GetCheck() ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV);
00543         }
00544         break;
00545     case kDefRev2Change:
00546         if( strRev2.IsEmpty() || IsDefaultedRev(&m_rev2Combo) )
00547         {
00548             m_rev2Combo.SetWindowText(m_isDate2Check.GetCheck() ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV);
00549         }
00550         break;
00551     case kDefTypeChange:
00552         {
00553             // Set the input
00554             switch( compareType )
00555             {
00556             default:
00557                 ASSERT(FALSE);  //unknown compare type
00558             case kCompareSameRev:
00559                 break;
00560             case kCompareTwoRev:
00561                 if( strRev2.IsEmpty() )
00562                 {
00563                     m_rev2Combo.SetWindowText(m_isDate2Check.GetCheck() ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV);
00564                 }
00565
00566                 // Fall thru
00567
00568             case kCompareAnotherRev:
00569                 if( strRev1.IsEmpty() )
00570                 {
00571                     m_rev1Combo.SetWindowText(m_isDate1Check.GetCheck() ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV);
00572                 }
00573                 break;
00574             }
00575
00576             // Reset unneeded input
00577             if( !m_rev1Combo.IsWindowEnabled() )
00578             {
00579                 if( IsDefaultedRev(&m_rev1Combo) )
00580                 {
00581                     m_rev1Combo.SetWindowText("");
00582                 }
00583             }
00584
00585             if( !m_rev2Combo.IsWindowEnabled() )
00586             {
00587                 if( IsDefaultedRev(&m_rev2Combo) )
00588                 {
00589                     m_rev2Combo.SetWindowText("");
00590                 }
00591             }
00592         }
00593
00594         break;
00595
00596     default:
00597         ASSERT(FALSE); // unknown input change
00598         break;
00599     }
00600 }
00601
00607 bool CDiff_MAIN::IsDefaultedRev(const CComboBox* comboBox)
00608 {
00609     bool res = false;
00610
00611     if( comboBox )
00612     {
00613         CString strRev;
00614         comboBox->GetWindowText(strRev);
00615
00616         if( (STR_DIFFDEFAULT_REV == strRev || STR_DIFFDEFAULT_DATE == strRev) &&
00617             comboBox->FindStringExact(-1, strRev) == CB_ERR )
00618         {
00619             res = true;
00620         }
00621     }
00622     else
00623     {
00624         ASSERT(FALSE);  // Bad pointer
00625     }
00626
00627     return res;
00628 }
00629
00631 BOOL CDiff_MAIN::OnInitDialog()
00632 {
00633     CHHelpPropertyPage::OnInitDialog();
00634
00635     // Extra initialization
00636     m_keywordCombo.SetDescriptionWnd(m_keywordDescStatic.m_hWnd);
00637
00638     // Special setup for the diff invoked using the graph view
00639     if( kDiffGraph == m_diffType )
00640     {
00641         m_compareTypeCombo.SetCurSel(m_mf->TotalNumFiles() == 1 ? kCompareAnotherRev : kCompareTwoRev);
00642         m_compareTypeCombo.EnableWindow(FALSE);
00643
00644         m_browseTag1Button.EnableWindow(FALSE);
00645         m_browseTag2Button.EnableWindow(FALSE);
00646
00647         m_isDate1Check.EnableWindow(FALSE);
00648         m_isDate2Check.EnableWindow(FALSE);
00649
00650         m_rev1Combo.SetReadOnly(TRUE);
00651         m_rev1Combo.ResetContent();
00652
00653         if( !m_rev1.IsEmpty() )
00654         {
00655             m_rev1Combo.AddString(m_rev1);
00656             m_rev1Combo.SetWindowText(m_rev1);
00657         }
00658
00659         if( m_mf && m_mf->TotalNumFiles() == 2 )
00660         {
00661             m_rev2Combo.SetReadOnly(TRUE);
00662             m_rev2Combo.ResetContent();
00663
00664             if( !m_rev2.IsEmpty() )
00665             {
00666                 m_rev2Combo.AddString(m_rev2);
00667                 m_rev2Combo.SetWindowText(m_rev2);
00668             }
00669         }
00670         else
00671         {
00672             m_rev2Combo.EnableWindow(FALSE);
00673         }
00674     }
00675
00676     return TRUE;  // return TRUE unless you set the focus to a control
00677                   // EXCEPTION: OCX Property Pages should return FALSE
00678 }
00679
00680 void CDiff_MAIN::InitHelpID()
00681 {
00682     SetCtrlHelpID(IDC_COMPARE_TYPE,         IDH_IDC_COMPARE_TYPE);
00683     SetCtrlHelpID(IDC_REV_TAG1,             IDH_IDC_REV_TAG_DATE);
00684     SetCtrlHelpID(IDC_BROWSE_TAG1,          IDH_IDC_BROWSE_TAG);
00685     SetCtrlHelpID(IDC_ISDATE1,              IDH_IDC_ISDATE);
00686     SetCtrlHelpID(IDC_REV_TAG2,             IDH_IDC_REV_TAG_DATE);
00687     SetCtrlHelpID(IDC_BROWSE_TAG2,          IDH_IDC_BROWSE_TAG);
00688     SetCtrlHelpID(IDC_ISDATE2,              IDH_IDC_ISDATE);
00689     SetCtrlHelpID(IDC_USE_EXTERNAL_DIFF,    IDH_IDC_USE_EXTERNAL_DIFF);
00690     SetCtrlHelpID(IDC_UNIFIEDDIFF,          IDH_IDC_UNIFIEDDIFF);
00691     SetCtrlHelpID(IDC_IGNORECASE,           IDH_IDC_IGNORECASE);
00692     SetCtrlHelpID(IDC_IGNOREWHITESPACE,     IDH_IDC_IGNOREWHITESPACE);
00693     SetCtrlHelpID(IDC_NORECURS,             IDH_IDC_NORECURS);
00694     SetCtrlHelpID(IDC_KEYWORD_OPT,          IDH_IDC_KEYWORD_OPT);
00695     SetCtrlHelpID(IDC_KEYWORD_DESC,         IDH_IDC_KEYWORD_DESC);
00696     SetCtrlHelpID(IDC_DIFFOPTIONS,          IDH_IDC_DIFFOPTIONS);
00697     SetCtrlHelpID(IDC_BROWSE_DIFFOPTIONS,   IDH_IDC_BROWSE_DIFFOPTIONS);
00698 }
00699
00701 void CDiff_MAIN::OnOptionsmenu()
00702 {
00703     CDiff_Options diffOptionsDlg;
00704
00705     CString currentOptions;
00706     m_diffOptionsCombo.GetWindowText(currentOptions);
00707     diffOptionsDlg.m_currentOptions = currentOptions;
00708
00709     if( diffOptionsDlg.DoModal() == IDOK )
00710     {
00711         CString diffOptions = diffOptionsDlg.GetDiffOptions();
00712         if( !diffOptions.IsEmpty() )
00713         {
00714             currentOptions.TrimRight();
00715             currentOptions += currentOptions.IsEmpty() ? "" : " ";
00716             m_diffOptionsCombo.SetWindowText(currentOptions + diffOptions);
00717             GotoDlgCtrl(&m_diffOptionsCombo);
00718         }
00719     }
00720 }
00721
00722
00724 // CDiff_Options dialog
00725
00726 CDiff_Options::CDiff_Options(CWnd* pParent /*=NULL*/)
00727     : CHHelpDialog(CDiff_Options::IDD, pParent)
00728 {
00729     //{{AFX_DATA_INIT(CDiff_Options)
00730     m_currentOptions = _T("");
00731     //}}AFX_DATA_INIT
00732
00733     m_sortAsc = false;
00734     m_sortColumn = 0;
00735 }
00736
00737
00738 void CDiff_Options::DoDataExchange(CDataExchange* pDX)
00739 {
00740     CHHelpDialog::DoDataExchange(pDX);
00741     //{{AFX_DATA_MAP(CDiff_Options)
00742     DDX_Control(pDX, IDC_DIFF_OPTION_LIST, m_optionsListCtrl);
00743     DDX_Text(pDX, IDC_CURRENT_DIFF_OPTIONS, m_currentOptions);
00744     //}}AFX_DATA_MAP
00745 }
00746
00747
00748 BEGIN_MESSAGE_MAP(CDiff_Options, CHHelpDialog)
00749     //{{AFX_MSG_MAP(CDiff_Options)
00750     ON_NOTIFY(LVN_ITEMCHANGED, IDC_DIFF_OPTION_LIST, OnItemchangedOptionslist)
00751     ON_NOTIFY(LVN_COLUMNCLICK, IDC_DIFF_OPTION_LIST, OnColumnclickOptionslist)
00752     ON_BN_CLICKED(IDHELP, OnHelp)
00753     //}}AFX_MSG_MAP
00754 END_MESSAGE_MAP()
00755
00757 // CDiff_Options message handlers
00758
00763 CString CDiff_Options::GetDiffOptions()
00764 {
00765     return m_diffOptions;
00766 }
00767
00769 void CDiff_Options::OnOK()
00770 {
00771     for(int nIndex = 0; nIndex < m_optionsListCtrl.GetItemCount(); nIndex++)
00772     {
00773         if( m_optionsListCtrl.GetCheck(nIndex) )
00774         {
00775             m_diffOptions += m_optionsListCtrl.GetItemText(nIndex, 0);
00776             m_diffOptions += " ";
00777         }
00778     }
00779
00780     m_diffOptions.TrimRight();
00781
00782     CHHelpDialog::OnOK();
00783 }
00784
00786 void CDiff_Options::OnItemchangedOptionslist(NMHDR* pNMHDR, LRESULT* pResult)
00787 {
00788     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00789     if( pNMListView->iItem > -1 &&
00790         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
00791     {
00792         CString item;
00793         item.Format(STR_DIFFOPT_OPTIONDESCRIPTION_FORMAT,
00794             m_optionsListCtrl.GetItemText(pNMListView->iItem, 0),
00795             m_optionsListCtrl.GetItemText(pNMListView->iItem, 1));
00796
00797         SetDlgItemText(IDC_DIFF_OPTION_DESCRIPTION, item);
00798     }
00799
00800     *pResult = 0;
00801 }
00802
00804 void CDiff_Options::OnColumnclickOptionslist(NMHDR* pNMHDR, LRESULT* pResult)
00805 {
00806     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00807
00808     if( m_sortColumn != pNMListView->iSubItem )
00809     {
00810         m_sortAsc = false;
00811     }
00812     else
00813     {
00814         m_sortAsc = !m_sortAsc;
00815     }
00816
00817     m_sortColumn = pNMListView->iSubItem;
00818
00819     SortItems(m_sortColumn, m_sortAsc);
00820
00821     *pResult = 0;
00822 }
00823
00825 BOOL CDiff_Options::OnInitDialog()
00826 {
00827     CHHelpDialog::OnInitDialog();
00828
00829     // Extra initialization
00830
00831     // Set the control's style
00832     SetListCtrlExtendedStyle(&m_optionsListCtrl, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES | LVS_EX_LABELTIP);
00833
00834     // Setup controls
00835     CHeaderCtrl* headerCtrl = m_optionsListCtrl.GetHeaderCtrl();
00836     if( headerCtrl )
00837     {
00838         m_headerCtrl.SubclassWindow(headerCtrl->m_hWnd);
00839     }
00840
00841     // Get the client area width to properly size columns
00842     CRect rect;
00843     m_optionsListCtrl.GetClientRect(rect);
00844
00845     const int listCtrlWidth = rect.Width();
00846     const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
00847
00848     // Insert columns
00849     m_optionsListCtrl.InsertColumn(0, "Option", LVCFMT_LEFT, 65);
00850     m_optionsListCtrl.InsertColumn(1, "Description", LVCFMT_LEFT, listCtrlWidthNoScroll - 65);
00851
00852     // Insert options
00853     const int itemsCount = (sizeof(sDiffOptions) / sizeof(DiffOptionsItem));
00854     for(int nIndex = 0; nIndex < itemsCount; nIndex++)
00855     {
00856         const int item = m_optionsListCtrl.InsertItem(m_optionsListCtrl.GetItemCount(), sDiffOptions[nIndex].option);
00857         if( item > -1 )
00858         {
00859             m_optionsListCtrl.SetItemText(item, 1, sDiffOptions[nIndex].description);
00860             m_optionsListCtrl.SetItemData(item, (DWORD)&sDiffOptions[nIndex]);
00861         }
00862     }
00863
00864     return TRUE;  // return TRUE unless you set the focus to a control
00865                   // EXCEPTION: OCX Property Pages should return FALSE
00866 }
00867
00868 void CDiff_Options::InitHelpID()
00869 {
00870     SetCtrlHelpID(IDC_DIFF_OPTION_LIST,         IDH_IDC_DIFF_OPTION_LIST);
00871     SetCtrlHelpID(IDC_DIFF_OPTION_DESCRIPTION,  IDH_IDC_DIFF_OPTION_DESCRIPTION);
00872     SetCtrlHelpID(IDC_CURRENT_DIFF_OPTIONS,     IDH_IDC_CURRENT_DIFF_OPTIONS);
00873 }
00874
00876 void CDiff_Options::OnHelp()
00877 {
00878     ShowHelp();
00879 }
00880
00887 void CDiff_Options::SortItems(int column, bool asc)
00888 {
00889     m_headerCtrl.SetSortImage(column, asc);
00890
00891     CompareInfo info = { 0 };
00892
00893     info.m_column = column;
00894     info.m_asc = asc;
00895
00896     m_optionsListCtrl.SortItems(CompareItems, (DWORD)&info);
00897 }
00898
00906 int CALLBACK CDiff_Options::CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam)
00907 {
00908     int res = 0;
00909
00910     const CompareInfo* info = (CompareInfo*)lParam;
00911     if( info )
00912     {
00913         DiffOptionsItem* diffOptionsItem1 = (DiffOptionsItem*)itemData1;
00914         DiffOptionsItem* diffOptionsItem2 = (DiffOptionsItem*)itemData2;
00915
00916         switch( info->m_column )
00917         {
00918         case 0:
00919             res = stricmp(diffOptionsItem1->option, diffOptionsItem2->option);
00920             break;
00921         case 1:
00922             res = stricmp(diffOptionsItem1->description, diffOptionsItem2->description);
00923             break;
00924         default:
00925             ASSERT(FALSE); // should not come here
00926             break;
00927         }
00928     }
00929
00930     if( res )
00931     {
00932         if( info->m_asc )
00933         {
00934             res *= -1;
00935         }
00936     }
00937
00938     return res;
00939 }
00940
00941 #endif /* WIN32 */
00942 //} Win32 - Part
00943
00944 //{ Mac - Part
00945 #ifdef qMacCvsPP
00946 static void DoDataExchange_DiffMain(LWindow *theDialog, const MultiFiles* mf, bool & noRecurs, bool & isDate1, bool & isDate2,
00947     CStr & sLastRev1, CStr & sLastRev2, bool & hasRev1, bool & hasRev2,
00948   bool& unifiedDiff, bool& noWhiteSpace, bool& noBlankLines, bool& ignoreCase,
00949     bool & extDiff, bool allowExtDiff, CStr& diffTool, bool putValue)
00950 {
00951     LRadioButton *chkHasRev = dynamic_cast<LRadioButton*>
00952         (theDialog->FindPaneByID(item_CheckRevTag1));
00953     LEditText *editRev = dynamic_cast<LEditText*>
00954         (theDialog->FindPaneByID(item_EditRevTag1));
00955     LRadioButton *chkHasRev2 = dynamic_cast<LRadioButton*>
00956         (theDialog->FindPaneByID(item_CheckRevTag2));
00957     LEditText *editRev2 = dynamic_cast<LEditText*>
00958         (theDialog->FindPaneByID(item_EditRevTag2));
00959     LCheckBox *chkHasDate1 = dynamic_cast<LCheckBox*>
00960         (theDialog->FindPaneByID(item_CheckDate1));
00961     LCheckBox *chkHasDate2 = dynamic_cast<LCheckBox*>
00962         (theDialog->FindPaneByID(item_CheckDate2));
00963     LPopupFiller *fill1 = dynamic_cast<LPopupFiller*>
00964         (theDialog->FindPaneByID(item_FillerRev1));
00965     LPopupFiller *fill2 = dynamic_cast<LPopupFiller*>
00966         (theDialog->FindPaneByID(item_FillerRev2));
00967     LCheckBox *chkUnifiedDiff = dynamic_cast<LCheckBox*>
00968         (theDialog->FindPaneByID(item_UnifiedDiff));
00969     LCheckBox *chkIgnoreCase = dynamic_cast<LCheckBox*>
00970         (theDialog->FindPaneByID(item_IgnoreCaseInDiff));
00971     LCheckBox *chkIgnoreWhiteSpace = dynamic_cast<LCheckBox*>
00972         (theDialog->FindPaneByID(item_IgnoreWhiteSpaceInDiff));
00973     LCheckBox *chkIgnoreEmptyLines = dynamic_cast<LCheckBox*>
00974         (theDialog->FindPaneByID(item_IgnoreEmptyLinesInDiff));
00975
00976     if(putValue)
00977     {
00978         chkHasDate1->SetValue(isDate1 ? Button_On : Button_Off);
00979         chkHasDate2->SetValue(isDate2 ? Button_On : Button_Off);
00980         if(hasRev1 && hasRev2)
00981             theDialog->SetValueForPaneID (item_CheckRevTag2, Button_On);
00982         else if(hasRev1)
00983             theDialog->SetValueForPaneID (item_CheckRevTag1, Button_On);
00984         else
00985             theDialog->SetValueForPaneID (item_MergeNone, Button_On);
00986
00987         if( sLastRev1.empty() )
00988           editRev->SetText((Ptr)(isDate1 ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV), strlen(isDate1 ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV));
00989         else
00990           editRev->SetText((Ptr)(const char *)sLastRev1, sLastRev1.length());
00991
00992         if( sLastRev2.empty() )
00993           editRev2->SetText((Ptr)(isDate2 ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV), strlen(isDate2 ? STR_DIFFDEFAULT_DATE : STR_DIFFDEFAULT_REV));
00994     else
00995         editRev2->SetText((Ptr)(const char *)sLastRev2, sLastRev2.length());
00996
00997         LTagWrapper *wrapper1 = putValue ? NEW LTagWrapper(fill1, mf) : 0L;
00998         fill1->DoDataExchange(gRevNames, putValue, wrapper1);
00999         LTagWrapper *wrapper2 = putValue ? NEW LTagWrapper(fill2, mf) : 0L;
01000         fill2->DoDataExchange(gRevNames, putValue, wrapper2);
01001
01002         chkUnifiedDiff->SetValue(unifiedDiff ? Button_On : Button_Off);
01003         chkIgnoreCase->SetValue(ignoreCase ? Button_On : Button_Off);
01004         chkIgnoreWhiteSpace->SetValue(noWhiteSpace ? Button_On : Button_Off);
01005         chkIgnoreEmptyLines->SetValue(noBlankLines ? Button_On : Button_Off);
01006
01007         DoDataExchange_DiffTool(theDialog, diffTool, extDiff, allowExtDiff, true);
01008     }
01009     else
01010     {
01011         isDate1 = chkHasDate1->GetValue() == Button_On;
01012         isDate2 = chkHasDate2->GetValue() == Button_On;
01013
01014         if(theDialog->GetValueForPaneID (item_CheckRevTag2) == Button_On)
01015         {
01016             hasRev1 = hasRev2 = true;
01017         }
01018         else if (theDialog->GetValueForPaneID (item_CheckRevTag1) == Button_On)
01019         {
01020             hasRev1 = true;
01021             hasRev2 = false;
01022         }
01023         else
01024         {
01025             hasRev1 = hasRev2 = false;
01026         }
01027
01028         fill1->DoDataExchange(isDate1 ? gDateNames : gRevNames, putValue);
01029         fill2->DoDataExchange(isDate2 ? gDateNames : gRevNames, putValue);
01030
01031         char str[255];
01032         Size len;
01033
01034         if ( hasRev1 ) {
01035           editRev->GetText(str, 254, &len);
01036         sLastRev1.set(str, len);
01037     }
01038     if ( hasRev2 ) {
01039         editRev2->GetText(str, 254, &len);
01040         sLastRev2.set(str, len);
01041     }
01042
01043         unifiedDiff = chkUnifiedDiff->GetValue() == Button_On;
01044         ignoreCase = chkIgnoreCase->GetValue() == Button_On;
01045         noWhiteSpace = chkIgnoreWhiteSpace->GetValue() == Button_On;
01046         noBlankLines = chkIgnoreEmptyLines->GetValue() == Button_On;
01047
01048         DoDataExchange_DiffTool(theDialog, diffTool, extDiff, allowExtDiff, false);
01049     }
01050 }
01051 #endif /* qMacCvsPP */
01052 //}
01053 //{ Unix - Part
01054 #ifdef qUnix
01055 int UCvsDiff::OnOK(void)
01056 {
01057     EndModal(true);
01058     return 0;
01059 }
01060
01061 int UCvsDiff::OnCancel(void)
01062 {
01063     EndModal(false);
01064     return 0;
01065 }
01066
01067 void UCvsDiff::DoDataExchange(bool fill)
01068 {
01069     if(fill)
01070     {
01071     }
01072     else
01073     {
01074     }
01075 }
01076
01077 UCvsDiff_MAIN::UCvsDiff_MAIN(const char *rev1, const char *rev2, bool allowExtDiff, bool unifiedDiff,
01078                              bool noWhiteSpace, bool noBlankLines, bool ignoreCase) : UWidget(::UEventGetWidID())
01079 {
01080     m_check1 = false;
01081     m_check2 = false;
01082     m_rev1 = rev1;
01083     m_rev2 = rev2;
01084     m_diff = 0;
01085     m_noWhiteSpace = gNoWhiteSpace;
01086     m_noBlankLines = noBlankLines;
01087     m_ignoreCase = gIgnoreCase;
01088     m_norecurs = false;
01089     m_extdiff = gUseExtDiff;
01090     m_unifiedDiff = unifiedDiff;
01091     m_allowExtDiff = allowExtDiff;
01092
01093 }
01094
01095 int UCvsDiff_MAIN::OnDiff(int cmd)
01096 {
01097     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDiff1, 0L);
01098     if(state)
01099     {
01100         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kCheckDate1, 0), 0L);
01101         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev1, 0), 0L);
01102         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kCheckDate2, 0), 0L);
01103         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev2, 0), 0L);
01104     }
01105     else
01106     {
01107         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kCheckDate1, 1), 0L);
01108         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev1, 1), 0L);
01109         state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDiff2, 0L);
01110         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kCheckDate2, state == 0), 0L);
01111         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev2, state == 0), 0L);
01112     }
01113     return 0;
01114 }
01115
01116 void UCvsDiff_MAIN::DoDataExchange(bool fill)
01117 {
01118     ::DoDataExchange(fill, GetWidID(), kComboRev1, gDateOrRevNames);
01119     ::DoDataExchange(fill, GetWidID(), kComboRev2, gDateOrRevNames);
01120
01121     if(fill)
01122     {
01123         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kCheckExtDiff, m_allowExtDiff), 0L);
01124
01125         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckDate1, m_check1), 0L);
01126         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckDate2, m_check2), 0L);
01127         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurs, m_norecurs), 0L);
01128         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckExtDiff, m_extdiff), 0L);
01129         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckUnifiedDiff, m_unifiedDiff), 0L);
01130         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckDiff1 + m_diff, 1), 0L);
01131         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckNoWhiteSpace, m_noWhiteSpace), 0L);
01132         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckNoBlankLines, m_noBlankLines), 0L);
01133         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckIgnoreCase,   m_ignoreCase), 0L);
01134
01135         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboRev1, (void *)(const char *)m_rev1);
01136         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboRev2, (void *)(const char *)m_rev2);
01137
01138         OnDiff(kCheckDiff1 + m_diff);
01139     }
01140     else
01141     {
01142         m_check1       = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate1, 0L);
01143         m_check2       = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate2, 0L);
01144         m_norecurs     = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurs, 0L);
01145         m_extdiff      = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckExtDiff, 0L);
01146         m_unifiedDiff  = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckUnifiedDiff, 0L);
01147         m_noWhiteSpace = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckNoWhiteSpace, 0L);
01148         m_noBlankLines = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckNoBlankLines, 0L);
01149         m_ignoreCase   = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckIgnoreCase, 0L);
01150
01151         if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDiff1, 0L))
01152             m_diff = 0;
01153         else if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDiff2, 0L))
01154             m_diff = 1;
01155         else
01156             m_diff = 2;
01157
01158         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboRev1, &m_rev1);
01159         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboRev2, &m_rev2);
01160     }
01161 }
01162 #endif // qUnix
01163 //} Unix - Part
01164
01166 bool CompatGetDiff(const MultiFiles* mf, kDiffCmdType diffType,
01167                    bool& noRecurs, bool& isDate1, bool& isDate2,
01168                    CStr& rev1, CStr& rev2, bool& useExtDiff, CStr& extDiffTool,
01169                    bool& unifiedDiff, bool& noWhiteSpace, bool& noBlankLines, bool& ignoreCase,
01170                    CStr& keyword, CStr& diffOptions,
01171                    bool allowExtDiff /*= false*/)
01172 {
01173     bool userHitOK = false;
01174
01175     static CStr sLastRev1;
01176     static CStr sLastRev2;
01177     static CStr sLastKeyword;
01178     static CStr sLastDiffOptions;
01179
01180     bool hasRev1;
01181     bool hasRev2;
01182     CStr initialRev1, initialRev2;
01183
01184     // Graph view diff supplies initial revisions, so don't override them
01185     if( diffType == kDiffGraph )
01186     {
01187         initialRev1 = rev1;
01188         initialRev2 = rev2;
01189         hasRev1 = !rev1.empty();
01190         hasRev2 = !rev2.empty();
01191     }
01192     else
01193     {
01194         rev1 = "";
01195         rev2 = "";
01196         hasRev1 = false;
01197         hasRev2 = false;
01198         initialRev1 = sLastRev1;
01199         initialRev2 = sLastRev2;
01200     }
01201
01202     noRecurs = false;
01203     isDate1 = false;
01204     isDate2 = false;
01205     useExtDiff = (bool)gUseExtDiff;
01206     noWhiteSpace = (bool)gNoWhiteSpace;
01207     noBlankLines = (bool)gNoBlankLines;
01208     ignoreCase = (bool)gIgnoreCase;
01209     unifiedDiff = (bool)gUnifiedDiff;
01210     extDiffTool = gCvsPrefs.ExtDiff();
01211
01212 //{ Win32 - Part
01213 #ifdef WIN32
01214     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgDiff(), "Diff settings");
01215     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01216
01217     CDiff_MAIN page1(mf, diffType, initialRev1, initialRev2, allowExtDiff, useExtDiff, unifiedDiff, noWhiteSpace, ignoreCase, sLastKeyword, sLastDiffOptions);
01218     CGetPrefs_GLOBALS page2;
01219
01220     pages.AddPage(&page1);
01221     pages.AddPage(&page2);
01222
01223     if( pages.DoModal() == IDOK )
01224     {
01225         noRecurs = page1.m_noRecurs ? true : false;
01226
01227         sLastRev1 = page1.m_rev1;
01228         sLastRev2 = page1.m_rev2;
01229         isDate1 = page1.m_isDate1 ? true : false;
01230         isDate2 = page1.m_isDate2 ? true : false;
01231
01232         gUseExtDiff = page1.m_extDiff ? true : false;
01233
01234         switch( page1.m_compareType )
01235         {
01236         default:
01237             ASSERT(FALSE);  //unknown compare type
01238         case kCompareSameRev:
01239             hasRev1 = hasRev2 = false;
01240             break;
01241         case kCompareAnotherRev:
01242             hasRev1 = true;
01243             hasRev2 = false;
01244             break;
01245         case kCompareTwoRev:
01246             hasRev1 = true;
01247             hasRev2 = true;
01248             break;
01249         }
01250
01251         gUnifiedDiff = page1.m_unifiedDiff ? true : false;
01252         gNoWhiteSpace = page1.m_noWhiteSpace ? true : false;
01253         gIgnoreCase = page1.m_ignoreCase ? true : false;
01254
01255         sLastKeyword = page1.m_keyword;
01256         sLastDiffOptions = page1.m_diffOptions;
01257
01258         page2.StoreValues();
01259         gCvsPrefs.SetHideCommandDlgDiff(pages.GetHideCommandDlg());
01260         userHitOK = true;
01261     }
01262 #endif /* WIN32 */
01263 //} Win32 - Part
01264 //{ Mac - Part
01265 #ifdef qMacCvsPP
01266     StOptionalDialogHandler theHandler(dlg_Diff, gCvsPrefs.HideCommandDlgDiff(), LCommander::GetTopCommander());
01267     LWindow *theDialog = theHandler.GetDialog();
01268     ThrowIfNil_(theDialog);
01269     static UInt16 sRuntimePanel = 1;
01270
01271     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01272         (theDialog->FindPaneByID(item_MultiViewPrefs));
01273     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01274
01275     multiView->SwitchToPanel(2);
01276     DoDataExchange_Globals(theDialog, true);
01277     multiView->SwitchToPanel(1);
01278     DoDataExchange_DiffMain(theDialog, mf, noRecurs, isDate1, isDate2, initialRev1, initialRev2,
01279         hasRev1, hasRev2, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, useExtDiff, allowExtDiff, extDiffTool, true);
01280     if ( diffType == kDiffGraph )
01281     {
01282       // disable label chooser view
01283       LPane   *labelOptionsGroup = theDialog->FindPaneByID(item_DiffLabelOptions);
01284       if ( labelOptionsGroup ) labelOptionsGroup->Disable();
01285     }
01286     groupView->SetValue(sRuntimePanel);
01287     // skip dialog when option key is pressed
01288   MessageT hitMessage;
01289     theHandler.ShowDialog();
01290     while (true)
01291     {       // Let DialogHandler process events
01292         hitMessage = theHandler.DoDialog();
01293
01294         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01295             break;
01296
01297       HandleHitMessage_DiffTool(theDialog, hitMessage);
01298     }
01299     theDialog->Hide();
01300     sRuntimePanel = groupView->GetValue();
01301
01302     if(hitMessage == msg_OK)
01303     {
01304         multiView->SwitchToPanel(1);
01305         DoDataExchange_DiffMain(theDialog, mf, noRecurs, isDate1, isDate2, sLastRev1, sLastRev2,
01306           hasRev1, hasRev2, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, useExtDiff, allowExtDiff, extDiffTool, false);
01307         gNoWhiteSpace   = noWhiteSpace;
01308         gNoBlankLines   = noBlankLines;
01309         gIgnoreCase     = ignoreCase;
01310         gUnifiedDiff    = unifiedDiff;
01311         gUseExtDiff     = useExtDiff;
01312         multiView->SwitchToPanel(2);
01313         DoDataExchange_Globals(theDialog, false);
01314         gCvsPrefs.SetHideCommandDlgDiff(theHandler.GetHideCommandDlg());
01315         userHitOK = true;
01316     }
01317 #endif /* qMacCvsPP */
01318 //} Mac - Part
01319 //{ Unix - Part
01320 #if qUnix
01321     void *wid = UCreate_DiffDlg();
01322
01323     UCvsDiff *dlg = new UCvsDiff();
01324     UCvsDiff_MAIN *tab1 = new UCvsDiff_MAIN(sLastRev1, sLastRev2, allowExtDiff, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase);
01325     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01326     dlg->AddPage(tab1, UCvsDiff::kTabGeneral, 0);
01327
01328     if(dlg->DoModal())
01329     {
01330         noRecurs = tab1->m_norecurs;
01331
01332         gNoWhiteSpace   = tab1->m_noWhiteSpace != 0;
01333         gNoBlankLines   = tab1->m_noBlankLines != 0;
01334         gIgnoreCase     = tab1->m_ignoreCase != 0;
01335         gUnifiedDiff    = tab1->m_unifiedDiff != 0;
01336         gUseExtDiff     = tab1->m_extdiff;
01337
01338         sLastRev1 = tab1->m_rev1;
01339         sLastRev2 = tab1->m_rev2;
01340         isDate1 = tab1->m_check1;
01341         isDate2 = tab1->m_check2;
01342
01343         if(tab1->m_diff == 0)
01344         {
01345             hasRev1 = hasRev2 = false;
01346         }
01347         else if(tab1->m_diff == 1)
01348         {
01349             hasRev1 = true;
01350             hasRev2 = false;
01351         }
01352         else
01353         {
01354             hasRev1 = true;
01355             hasRev2 = true;
01356         }
01357
01358         userHitOK = true;
01359     }
01360
01361     delete dlg;
01362 #endif // qUnix
01363 //} Unix - Part
01364
01365     if( userHitOK )
01366     {
01367         if( hasRev1 )
01368             rev1 = sLastRev1;
01369
01370         if( hasRev2 )
01371             rev2 = sLastRev2;
01372
01373         useExtDiff     = (bool)gUseExtDiff;
01374         noWhiteSpace   = (bool)gNoWhiteSpace;
01375         noBlankLines   = (bool)gNoBlankLines;
01376         unifiedDiff    = (bool)gUnifiedDiff;
01377         ignoreCase     = (bool)gIgnoreCase;
01378
01379         if( !sLastDiffOptions.empty() )
01380         {
01381             diffOptions = sLastDiffOptions;
01382         }
01383
01384         if( !sLastKeyword.empty() )
01385         {
01386             keyword = sLastKeyword;
01387         }
01388
01389         gCvsPrefs.save();
01390     }
01391
01392     return userHitOK;
01393 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/WinCvsBrowser.h Source File

WinCvs/WinCvsBrowser.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(AFX_WINCVSBROWSER_H__144A4971_CAB4_11D1_BC80_000000000000__INCLUDED_)
00022 #define AFX_WINCVSBROWSER_H__144A4971_CAB4_11D1_BC80_000000000000__INCLUDED_
00023
00024 #if _MSC_VER >= 1000
00025 #pragma once
00026 #endif // _MSC_VER >= 1000
00027 // WinCvsBrowser.h : header file
00028 //
00029
00030 #include <afxcview.h>
00031 #include "CPStr.h"
00032 #include "FileTraversal.h"
00033 #include "BrowseFileView.h"
00034
00035 class KiSelectionHandler;
00036 class CWinCvsBrowser;
00037 class EntnodeData;
00038
00043 class CSelectionChangeNotifier
00044 {
00045 public:
00046     // Construction
00047     CSelectionChangeNotifier(CWinCvsBrowser* view, bool notify);
00048     virtual ~CSelectionChangeNotifier();
00049
00050 private:
00051     // Data members
00052     bool m_notify;
00053     bool m_wasLocked;
00054     CWinCvsBrowser* m_view;
00055 };
00056
00058 class TBrowserFillDummy : public TraversalReport
00059 {
00060 public:
00061     // Construction
00062     TBrowserFillDummy(CTreeCtrl& treeCtrl, HTREEITEM root, HTREEITEM item, EntnodeData* data);
00063
00064 private:
00065     // Data members
00066     HTREEITEM m_root;
00067     HTREEITEM m_item;
00068     CTreeCtrl& m_treeCtrl;
00069     bool m_empty;
00070     bool m_hascvs;
00071     EntnodeData* m_data;
00073     // Methods
00074     virtual kTraversal EnterDirectory(const char* fullpath, const char* dirname, const FSSpec* macspec);
00075     virtual kTraversal ExitDirectory(const char* fullpath);
00076     virtual kTraversal OnError(const char* err, int errcode);
00077     virtual kTraversal OnIdle(const char* fullpath);
00078     virtual kTraversal OnDirectory(const char* fullpath, const char* fullname, const char* name,
00079         const struct stat& dir, const FSSpec* macspec);
00080
00081 public:
00082     // Interface
00083
00085     inline HTREEITEM GetItem() const { return m_item; };
00086 };
00087
00089 class TBrowserFill : public TraversalReport
00090 {
00091 public:
00092     // Construction
00093     TBrowserFill(CTreeCtrl& treeCtrl, HTREEITEM root, HTREEITEM item, CSortList<ENTNODE>& entries);
00094
00095 private:
00096     // Data members
00097     HTREEITEM m_root;
00098     HTREEITEM m_item;
00099     CTreeCtrl& m_treeCtrl;
00101     bool m_hascvs;
00102     CSortList<ENTNODE>& m_entries;
00103     vector<CStr> m_ignlist;
00105     bool m_isShowIgnored;
00106     bool m_isHideUnknown;
00107     bool m_isHideMissing;
00109     // Methods
00110     virtual kTraversal EnterDirectory(const char* fullpath, const char* dirname, const FSSpec* macspec);
00111     virtual kTraversal ExitDirectory(const char* fullpath);
00112     virtual kTraversal OnError(const char* err, int errcode);
00113     virtual kTraversal OnIdle(const char* fullpath);
00114     virtual kTraversal OnDirectory(const char* fullpath, const char* fullname, const char* name,
00115         const struct stat& dir, const FSSpec* macspec);
00116
00117 public:
00118     // Interface
00119     bool IsHideMissing() const;
00120 };
00121
00123 // CWinCvsBrowser view
00124
00125 class CWinCvsBrowser : public CTreeView
00126 {
00127 protected:
00128     DECLARE_DYNCREATE(CWinCvsBrowser)
00129
00130     CWinCvsBrowser();           // protected constructor used by dynamic creation
00131     virtual ~CWinCvsBrowser();
00132
00133 // Attributes
00134 protected:
00135
00136 // Operations
00137 public:
00138
00139 // Overrides
00140     // ClassWizard generated virtual function overrides
00141     //{{AFX_VIRTUAL(CWinCvsBrowser)
00142     public:
00143     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00144     virtual void OnInitialUpdate();
00145     protected:
00146     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00147     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00148     //}}AFX_VIRTUAL
00149
00150 // Implementation
00151 protected:
00152
00153
00154 #ifdef _DEBUG
00155     virtual void AssertValid() const;
00156     virtual void Dump(CDumpContext& dc) const;
00157 #endif
00158
00159     // Generated message map functions
00160 protected:
00161     //{{AFX_MSG(CWinCvsBrowser)
00162     afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
00163     afx_msg void OnSelchanging(NMHDR* pNMHDR, LRESULT* pResult);
00164     afx_msg void OnUpdateViewAdd(CCmdUI* pCmdUI);
00165     afx_msg void OnUpdateViewUpdate(CCmdUI* pCmdUI);
00166     afx_msg void OnViewAdd();
00167     afx_msg void OnViewCommit();
00168     afx_msg void OnViewUpdate();
00169     afx_msg void OnViewQueryUpdate();
00170     afx_msg void OnViewDiff();
00171     afx_msg void OnViewLog();
00172     afx_msg void OnViewStatus();
00173     afx_msg void OnViewUnlock();
00174     afx_msg void OnViewWatchOn();
00175     afx_msg void OnViewWatchOff();
00176     afx_msg void OnViewEdit();
00177     afx_msg void OnViewUnedit();
00178     afx_msg void OnViewWatchers();
00179     afx_msg void OnViewEditors();
00180     afx_msg void OnViewRelease();
00181     afx_msg void OnViewTagNew();
00182     afx_msg void OnViewTagDelete();
00183     afx_msg void OnViewTagBranch();
00184     afx_msg void OnViewExplore();
00185     afx_msg void OnUpdateViewExplore(CCmdUI* pCmdUI);
00186     afx_msg void OnUpdateViewReload(CCmdUI* pCmdUI);
00187     afx_msg void OnViewReload();
00188     afx_msg void OnViewCheckout();
00189     afx_msg void OnUpdateViewCheckout(CCmdUI* pCmdUI);
00190     afx_msg void OnViewImport();
00191     afx_msg void OnUpdateViewImport(CCmdUI* pCmdUI);
00192     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00193     afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
00194     afx_msg void OnDestroy();
00195     afx_msg void OnViewReservededit();
00196     afx_msg void OnViewForceedit();
00197     afx_msg void OnAppCmdline();
00198     afx_msg void OnAppRtagbranch();
00199     afx_msg void OnAppRtagcreate();
00200     afx_msg void OnAppRtagdelete();
00201     afx_msg void OnUpdateAppCmdline(CCmdUI* pCmdUI);
00202     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00203     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00204     afx_msg void OnQueryProperties();
00205     afx_msg void OnUpdateQueryProperties(CCmdUI* pCmdUI);
00206     afx_msg void OnViewNewInstance();
00207     //}}AFX_MSG
00208     afx_msg void OnUpdateMacro(CCmdUI* pCmdUI);
00209     afx_msg BOOL OnMacro(UINT nID);
00210     afx_msg void OnUpdateCustomize(CCmdUI* pCmdUI);
00211     afx_msg BOOL OnCustomize(UINT nID);
00212     afx_msg LRESULT OnResetView(WPARAM, LPARAM);
00213
00214     DECLARE_MESSAGE_MAP()
00215 private:
00216     // Data members
00217     CStr m_root;
00218     static CImageList m_imageList;
00220     bool m_selectionNotificationLocked;
00221     bool m_selectionChanged;
00222     bool m_resetViewPending;
00224     // Methods
00225     void StoreExpanded(std::vector<CStr>& allExpanded, HTREEITEM root = 0L);
00226
00227     bool DisableCommon();
00228     void OnUpdateCmd(CCmdUI* pCmdUI, BOOL needCvsInfos);
00229
00230     void SetNewStyle(long lStyleMask, BOOL bSetBits);
00231     HTREEITEM GetItemByLocation(const char* path);
00232     void DeleteAllItems(HTREEITEM root = 0L);
00233     void RetrievePath(HTREEITEM item, CStr& path);
00234
00235     bool ProcessSelectionCommand(KiSelectionHandler* handler);
00236
00237 public:
00238     // Interface
00239     void ResetView(bool forceReload = false, bool notifyView = false);
00240     bool StepToLocation(const char* path, bool notifyView = false);
00241     void ResetBrowser(const char* path, bool notifyView = false);
00242
00243     void OnIgnoreChanged();
00244     void OnFilteringChanged();
00245     void NotifySelectionChange();
00246
00247     inline const CStr& GetRoot(void) const;
00248     inline bool GetSelectionNotificationLocked() const;
00249     inline void SetSelectionNotificationLocked(bool selectionNotificationLocked);
00250     inline bool GetSelectionChanged() const;
00251     inline void SetSelectionChanged(bool selectionChanged);
00252 };
00253
00255 inline const CStr& CWinCvsBrowser::GetRoot(void) const
00256 {
00257     return m_root;
00258 }
00259
00261 inline bool CWinCvsBrowser::GetSelectionNotificationLocked() const
00262 {
00263     return m_selectionNotificationLocked;
00264 }
00265
00267 inline void CWinCvsBrowser::SetSelectionNotificationLocked(bool selectionNotificationLocked)
00268 {
00269     m_selectionNotificationLocked = selectionNotificationLocked;
00270 }
00271
00273 inline bool CWinCvsBrowser::GetSelectionChanged() const
00274 {
00275     return m_selectionChanged;
00276 }
00277
00279 inline void CWinCvsBrowser::SetSelectionChanged(bool selectionChanged)
00280 {
00281     m_selectionChanged = selectionChanged;
00282 }
00283
00285
00286 //{{AFX_INSERT_LOCATION}}
00287 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00288
00289 #endif // !defined(AFX_WINCVSBROWSER_H__144A4971_CAB4_11D1_BC80_000000000000__INCLUDED_)
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/FileViewWatcher.cpp Source File

WinCvs/FileViewWatcher.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018 * Author : V.Antonevich <v_antonevich@hotmail.com> --- November 2000
00019 */
00020
00021 /*
00022 * FileViewWatcher.cpp --- file modification watcher thread
00023 */
00024
00025 #include "stdafx.h"
00026 #include "wincvs.h"
00027 #include "FileViewWatcher.h"
00028
00029 #ifdef _DEBUG
00030 #define new DEBUG_NEW
00031 #undef THIS_FILE
00032 static char THIS_FILE[] = __FILE__;
00033 #endif
00034
00036 #define WATCHER_FOREGROUND_TIMEOUT  1000
00037
00039 #define WATCHER_BACKGROUND_TIMEOUT  5000
00040
00042 #define WATCHER_IGNORE_FACTOR       0.8f
00043
00045 #define WATCHER_RAPID_FACTOR        1.2f
00046
00048 #define WATCHER_RAPID_THRESHOLD     5
00049
00051 // KoWatcher
00052
00053 KoWatcher::KoWatcher(HWND hWnd)
00054     : m_isRecursive(false), m_hWnd(hWnd), m_notificationTime(0)
00055 {
00056     m_handles[kStartHandle] = m_startEvent;
00057     m_handles[kTerminateHandle] = m_terminateEvent;
00058     m_count = 2;
00059     *m_path = 0;
00060
00061     // Start the thread immediately
00062     AfxBeginThread(DelegateRun, (LPVOID)this);
00063 }
00064
00066 KoWatcher::~KoWatcher()
00067 {
00068 }
00069
00075 UINT KoWatcher::DelegateRun(LPVOID pWatcher)
00076 {
00077     KoWatcher* watcher = (KoWatcher*)pWatcher;
00078     return watcher->Run();
00079 }
00080
00085 UINT KoWatcher::Run()
00086 {
00087     DWORD timeout = INFINITE;
00088
00089     for( ; ; )
00090     {
00091         const DWORD wait = WaitForMultipleObjects(m_count, m_handles, FALSE, timeout);
00092         switch( wait )
00093         {
00094         case WAIT_OBJECT_0 + kStartHandle:
00095             {
00096                 // Process signal to start watching
00097                 StopWatch();
00098                 StartWatch();
00099
00100                 m_startEvent.Unlock();
00101                 timeout = INFINITE;
00102                 break;
00103             }
00104         case WAIT_OBJECT_0 + kTerminateHandle:
00105             {
00106                 // Process signal to terminate
00107                 StopWatch();
00108                 delete this;
00109                 return 0;
00110             }
00111         case WAIT_OBJECT_0 + kNotifyHandle:
00112             {
00113                 StopWatch();
00114                 timeout = GetTimeout();
00115
00116                 if( !m_notificationTime || (GetTickCount() - m_notificationTime > WATCHER_BACKGROUND_TIMEOUT) )
00117                 {
00118                     Notify();
00119                 }
00120                 else
00121                 {
00122                     StartWatch();
00123
00124                     const DWORD ignoreTimeout = GetTimeout(true);
00125
00126                     // Ignore some possible notifications to reduce the thread's load
00127                     if( WaitForSingleObject(m_handles[kTerminateHandle], ignoreTimeout) == WAIT_OBJECT_0 )
00128                     {
00129                         // Process signal to terminate
00130                         StopWatch();
00131                         delete this;
00132                         return 0;
00133                     }
00134
00135                     timeout /= 2;
00136                 }
00137
00138                 m_startEvent.Unlock();
00139                 break;
00140             }
00141         case WAIT_TIMEOUT:
00142             {
00143                 StopWatch();
00144                 Notify();
00145
00146                 timeout = INFINITE;
00147                 break;
00148             }
00149         }
00150     }
00151
00152     return 0;
00153 }
00154
00160 void KoWatcher::SignalStartWatch(LPCTSTR path, bool isRecursive)
00161 {
00162     // Store parameters
00163     m_section.Lock();
00164
00165     if( stricmp(m_path, path) != 0 )
00166     {
00167         m_notificationTime = 0;
00168     }
00169
00170     _tcscpy(m_path, path);
00171     m_isRecursive = isRecursive;
00172
00173     m_section.Unlock();
00174     m_startEvent.SetEvent();
00175 }
00176
00180 void KoWatcher::SignalTerminate()
00181 {
00182     m_terminateEvent.SetEvent();
00183 }
00184
00189 bool KoWatcher::StartWatch()
00190 {
00191     // Retrieve parameters first
00192     TCHAR path[_MAX_PATH];
00193     bool isRecursive;
00194
00195     m_section.Lock();
00196
00197     lstrcpyn(path, m_path, _MAX_PATH);
00198     isRecursive = m_isRecursive;
00199
00200     m_section.Unlock();
00201
00202     // Start watching
00203     const HANDLE notifyHandle = FindFirstChangeNotification(path,
00204         isRecursive,
00205         FILE_NOTIFY_CHANGE_FILE_NAME |
00206         FILE_NOTIFY_CHANGE_DIR_NAME |
00207         //FILE_NOTIFY_CHANGE_SIZE |
00208         FILE_NOTIFY_CHANGE_LAST_WRITE |
00209         //FILE_NOTIFY_CHANGE_LAST_ACCESS |
00210 #if _MSC_VER >= 1200
00211         //FILE_NOTIFY_CHANGE_CREATION | (makes Win98 fail)
00212 #endif
00213         //FILE_NOTIFY_CHANGE_SECURITY |
00214         FILE_NOTIFY_CHANGE_ATTRIBUTES);
00215
00216     if( notifyHandle != INVALID_HANDLE_VALUE )
00217     {
00218         m_handles[kNotifyHandle] = notifyHandle;
00219         m_count = kEndHandle;
00220     }
00221
00222     return m_count == kEndHandle;
00223 }
00224
00228 void KoWatcher::StopWatch()
00229 {
00230     if( m_count == kEndHandle && m_handles[kNotifyHandle] != INVALID_HANDLE_VALUE )
00231     {
00232         // Reset and close the handle
00233         FindNextChangeNotification(m_handles[kNotifyHandle]);
00234         FindCloseChangeNotification(m_handles[kNotifyHandle]);
00235         m_handles[kNotifyHandle] = INVALID_HANDLE_VALUE;
00236         m_count = 2;
00237     }
00238 }
00239
00244 BOOL KoWatcher::Notify()
00245 {
00246     const DWORD notificationTime = m_notificationTime;
00247
00248     m_notificationTime = GetTickCount();
00249     if( m_notificationTime - notificationTime < WATCHER_FOREGROUND_TIMEOUT * WATCHER_RAPID_FACTOR )
00250     {
00251         m_rapidNotificationCount++;
00252     }
00253     else
00254     {
00255         m_rapidNotificationCount--;
00256         if( m_rapidNotificationCount < 0 )
00257         {
00258             m_rapidNotificationCount = 0;
00259         }
00260     }
00261
00262     return PostMessage(m_hWnd, WM_FILECHANGE, 0, 0);
00263 }
00264
00270 DWORD KoWatcher::GetTimeout(const bool ignoreTimeout /*= false*/)
00271 {
00272     const bool backgroundProcess = ((CWincvsApp*)AfxGetApp())->IsBackgroundProcess();
00273
00274     DWORD timeout = backgroundProcess ? WATCHER_BACKGROUND_TIMEOUT : WATCHER_FOREGROUND_TIMEOUT;
00275
00276     if( ignoreTimeout )
00277     {
00278         timeout = DWORD((float)timeout * WATCHER_IGNORE_FACTOR);
00279         if( !backgroundProcess && m_rapidNotificationCount > WATCHER_RAPID_THRESHOLD )
00280         {
00281             timeout *= 2;
00282         }
00283     }
00284
00285     return timeout;
00286 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ControlCvsArgs Member List

This is the complete list of members for ControlCvsArgs, including all inherited members.

add(const char *arg) | CvsArgs | [virtual]
addfile(const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L) | ControlCvsArgs | [virtual]
argc | CvsArgs | [protected]
Argc(void) const | CvsArgs |
argv | CvsArgs | [protected]
Argv(void) const | CvsArgs |
ControlCvsArgs() | ControlCvsArgs | [inline]
CvsArgs(bool defargs=true) | CvsArgs |
CvsArgs(char *const *fromargv, int fromargc) | CvsArgs |
FileIsType(const char *arg, const char *dir, const FSSpec *spec=0L)=0 | ControlCvsArgs | [protected, pure virtual]
HasProblem(void) const | ControlCvsArgs |
m_gotProblem | ControlCvsArgs | [private]
parse(const char *arg) | CvsArgs | [virtual]
print(const char *indirectory=0L) | CvsArgs |
reset(bool defargs=true) | CvsArgs |
SetProblem(bool newState) | ControlCvsArgs |
TypeDesc()=0 | ControlCvsArgs | [protected, pure virtual]
~CvsArgs() | CvsArgs | [virtual]

Generated on Sat Aug 7 22:55:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJFontCombo Member List

This is the complete list of members for CCJFontCombo, including all inherited members.

CCJFontCombo() | CCJFontCombo |
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CCJFontCombo | [virtual]
EnumFontProc(LPLOGFONT lpLogFont, LPTEXTMETRIC lpTextMetric, short nFontType, LPHANDLE lpData) | CCJFontCombo | [static]
GetSelFont(LOGFONT &logFont) | CCJFontCombo | [virtual]
InitializeFonts() | CCJFontCombo | [protected, virtual]
m_clrBkgnd | CCJFontCombo | [protected]
m_clrHilight | CCJFontCombo | [protected]
m_clrHilightText | CCJFontCombo | [protected]
m_clrNormalText | CCJFontCombo | [protected]
MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJFontCombo | [virtual]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJFontCombo | [protected]
OnDestroy() | CCJFontCombo | [protected]
OnEraseBkgnd(CDC *pDC) | CCJFontCombo | [protected]
OnPaint() | CCJFontCombo | [protected]
PreSubclassWindow() | CCJFontCombo | [protected, virtual]
SetHilightColors(COLORREF clrHilight, COLORREF clrHilightText) | CCJFontCombo | [virtual]
SetNormalColors(COLORREF clrBkgnd, COLORREF clrNormalText) | CCJFontCombo | [virtual]
~CCJFontCombo() | CCJFontCombo | [virtual]

Generated on Sat Aug 7 22:49:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatHeaderCtrl.h Source File

WinCvs/CJLib/Include/CJFlatHeaderCtrl.h

Go to the documentation of this file.
00001 // CJFlatHeaderCtrl.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2002/01/05 16:46:43 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/Include/CJFlatHeaderCtrl.h $
00011  *
00012  * $History: CJFlatHeaderCtrl.h $
00013  *
00014  * *****************  Version 16  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:01p
00016  * Updated in $/CodeJock/Include
00017  * Further Updates to OnEraseBkgnd(...) and OnPaint() for flicker free
00018  * drawing.
00019  *
00020  * *****************  Version 15  *****************
00021  * User: Kirk Stowell Date: 10/30/99   Time: 2:23p
00022  * Updated in $/CodeJock/Include
00023  * Overrode OnPaint(...) for flicker free drawing and fixed bug where
00024  * column is resized and border leaves a trail.
00025  *
00026  * *****************  Version 14  *****************
00027  * User: Kirk Stowell Date: 10/26/99   Time: 10:39p
00028  * Updated in $/CodeJock/Include
00029  * Made class methods virtual for inheritance purposes.
00030  *
00031  * *****************  Version 13  *****************
00032  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00033  * Updated in $/CodeJock/Include
00034  * Fixed potential resource and memory leak problems.
00035  *
00036  * *****************  Version 12  *****************
00037  * User: Kirk Stowell Date: 10/14/99   Time: 8:23p
00038  * Updated in $/CodeJock/Include
00039  * Fixed size bug with header control where the end does not display
00040  * correctly.
00041  *
00042  * *****************  Version 11  *****************
00043  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00044  * Updated in $/CodeJockey/Include
00045  * Updated copyright and contact information.
00046  *
00047  * *****************  Version 10  *****************
00048  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00049  * Updated in $/CodeJockey/Include
00050  *
00051  * *****************  Version 9  *****************
00052  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00053  * Updated in $/CodeJockey/Include
00054  *
00055  * *****************  Version 8  *****************
00056  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00057  * Updated in $/CodeJockey/Include
00058  * Cleaned up inline functions, and import/export macro so that class will
00059  * be imported when linked to, and exported at compile time.
00060  *
00061  * *****************  Version 7  *****************
00062  * User: Kirk Stowell Date: 6/14/99    Time: 10:43p
00063  * Updated in $/CodeJockey/Include
00064  * Cleaned up code to eliminate level 4 compilier warnings.
00065  *
00066  * *****************  Version 6  *****************
00067  * User: Kirk Stowell Date: 5/17/99    Time: 8:00p
00068  * Updated in $/CodeJockey/Include
00069  * Added popup menu support and vc5 compatibility.
00070  *
00071  * *****************  Version 5  *****************
00072  * User: Kirk Stowell Date: 4/15/99    Time: 4:27p
00073  * Updated in $/CodeJockey/Include
00074  * Igor Ostriz [iostriz@usa.net] - fixed bug with drag/drop and changing
00075  * column order.
00076  *
00077  * *****************  Version 4  *****************
00078  * User: Kirk Stowell Date: 4/03/99    Time: 4:26p
00079  * Updated in $/CodeJockey/Include
00080  * Added comments and cleaned up code.
00081  *
00082  * *****************  Version 3  *****************
00083  * User: Kirk Stowell Date: 2/24/99    Time: 4:26p
00084  * Updated in $/CodeJockey/Include
00085  * Fixed repainting problem when header is moved or window is resized. The
00086  * class now uses log font instead of hard coded Tahoma font.
00087  *
00088  * *****************  Version 2  *****************
00089  * User: Kirk Stowell Date: 1/31/99    Time: 4:27p
00090  * Updated in $/CodeJockey/Include
00091  * Fixed problem with sort arrow drawn. If hditem has an associated
00092  * bitmap, the arrow is not drawn.
00093  *
00094  * *****************  Version 1  *****************
00095  * User: Kirk Stowell Date: 1/16/99    Time: 4:26p
00096  * Created in $/CodeJockey/Include
00097  * Initial release.
00098  *
00099  ***************************************************************************/
00101
00102 #ifndef __CJFLATHEADERCTRL_H__
00103 #define __CJFLATHEADERCTRL_H__
00104
00105 #if _MSC_VER >= 1000
00106 #pragma once
00107 #endif // _MSC_VER >= 1000
00108
00109 #include "CJMenu.h"        // CCJMenu class declaration
00110
00111 // CCJFlatHeaderCtrl is a CHeaderCtrl derived class which is simular
00112 // to the listbox flat header controls seen in Visual Studio and Outlook.
00113 class _CJX_EXT_CLASS CCJFlatHeaderCtrl : public CHeaderCtrl
00114 {
00115
00116 public:
00117
00118     // Default constructor
00119     //
00120     CCJFlatHeaderCtrl();
00121
00122     // Virtual destructor
00123     //
00124     virtual ~CCJFlatHeaderCtrl();
00125
00126 protected:
00127     UINT    m_popToolbarID; // popup menu toolbar resource id, associates
00128                             // toolbar icons with the popup menu.
00129
00130     UINT    m_popupMenuID;  // popup menu resource id
00131     CCJMenu m_popupMenu;    // popup menu
00132     int     m_nPos;         // index of the pop-up menu contained in the menu
00133     BOOL    m_bBoldFont;    // true for bold fonts see SetFontBold(...)
00134     BOOL    m_bLBtnDown;    // true if left mouse button is pressed
00135     BOOL    m_bSortAsc;     // used when column is pressed to draw sort arrow.
00136     CFont   m_Font;         // font the header will use
00137     int     m_nOffset;      // ammount to offset the sort arrow.
00138     int     m_nSortCol;     // last column pressed during sort.
00139     CWnd*   m_pParentWnd;   // holds a pointer to the parent window.
00140     CRect   m_rcOldSize;
00141
00142 public:
00143
00144     // this member function is called to associate a menu and toolbar
00145     // resource with the context menu.
00146     //
00147     virtual void SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0);
00148
00149     // this member function returns the menu resource associated with
00150     // the tab control.
00151     //
00152     virtual UINT GetMenuID();
00153
00154     // this member function must be called after creation to initialize the
00155     // font the header will use.
00156     //
00157     virtual void InitializeHeader(bool bBoldFont);
00158
00159     // this member function can be used to toggle the font from bold to
00160     // normal.
00161     //
00162     virtual void SetFontBold(BOOL bBoldFont = TRUE);
00163
00164     // this member function is called by the header during sort
00165     // operations
00166     //
00167     virtual int SetSortImage( int nCol, BOOL bAsc );
00168
00169 protected:
00170
00171     // this member function is called by the header during paint
00172     // operations.
00173     //
00174     virtual void DrawFlatBorder(CDC* pDC);
00175     virtual void ResizeWindow();
00176
00177 #ifdef _VC_VERSION_5
00178     // this member function was added for vc5 support. It returns the number
00179     // of columns currently in the header.
00180     //
00181     virtual int GetItemCount() const;
00182     virtual BOOL GetOrderArray(LPINT piArray, int iCount= -1);
00183 #endif
00184
00185 // Overrides
00186     // ClassWizard generated virtual function overrides
00187     //{{AFX_VIRTUAL(CCJFlatHeaderCtrl)
00188     public:
00189     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00190     protected:
00191     virtual void PreSubclassWindow();
00192     //}}AFX_VIRTUAL
00193
00194     // Generated message map functions
00195 protected:
00196     //{{AFX_MSG(CCJFlatHeaderCtrl)
00197     afx_msg void OnPaint();
00198     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00199     afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00200     afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu);
00201     afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00202     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00203     afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00204     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00205     //}}AFX_MSG
00206
00207     DECLARE_MESSAGE_MAP()
00208 };
00209
00211 //  Inline Functions
00213
00214 _CJXLIB_INLINE void CCJFlatHeaderCtrl::SetMenuID(UINT popupMenuID, UINT popToolbarID, int nPos)
00215     { ASSERT(::IsWindow(m_hWnd)); m_popupMenuID=popupMenuID; m_popToolbarID=popToolbarID; m_nPos=nPos; }
00216
00217 _CJXLIB_INLINE UINT CCJFlatHeaderCtrl::GetMenuID()
00218     { ASSERT(::IsWindow(m_hWnd)); return m_popupMenuID; }
00219
00220 _CJXLIB_INLINE void CCJFlatHeaderCtrl::SetFontBold(BOOL bBoldFont)
00221     { ASSERT(::IsWindow(m_hWnd)); m_bBoldFont = bBoldFont; }
00222
00223 #ifdef _VC_VERSION_5
00224 _CJXLIB_INLINE int CCJFlatHeaderCtrl::GetItemCount() const
00225     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, HDM_GETITEMCOUNT, 0, 0L); }
00226 #endif
00227
00229
00230 //{{AFX_INSERT_LOCATION}}
00231 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00232
00233 #endif // __CJFLATHEADERCTRL_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoRecursionModel Member List

This is the complete list of members for KoRecursionModel, including all inherited members.

GetNotificationManager() | KoRecursionModel | [virtual]
IsShowRecursive() | KoRecursionModel | [virtual]
KoRecursionModel() | KoRecursionModel |
LoadSettings() | KoRecursionModel | [virtual]
m_isRecursive | KoRecursionModel | [private]
m_manager | KoRecursionModel | [private]
SaveSettings() | KoRecursionModel | [virtual]
ToggleRecursion() | KoRecursionModel |
~KoRecursionModel() | KoRecursionModel | [virtual]

Generated on Sat Aug 7 22:54:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/dib.h Source File

rf/support/mfc/dib.h

Go to the documentation of this file.
00001 #ifndef DIB_H
00002 #define DIB_H
00003
00004 #define DIB_HEADER_MARKER   ((WORD) ('M' << 8) | 'B')
00005 /* Macro to determine to round off the given value to the closest byte */
00006 #define WIDTHBYTES(i)   ((i+31)/32*4)
00007 #define WIDTHBYTES16(i)   ((i+15)/16*2)
00008 #define WIDTHBYTES8(i)   ((i+7)/8)
00009
00010 /* Pour les Bitmaps, surchage de Alloc() et utilisation
00011  * de l'allocateur Windows GlobalAlloc() pour afficher des
00012  * bitmaps > 64 Ko sous Windows 3.1.
00013  */
00014
00015 #define BM_ALLOC(nb, size) GlobalAllocPtr( GHND, (nb)*(size) )
00016 #define BM_FREE(ptr) GlobalFreePtr(ptr)
00017
00018 #define BFT_BITMAP 0x4d42   /* 'BM' */
00019
00020 /*****************************************************/
00021 /* make new sizeof structs to cover dword alignment  */
00022 /*****************************************************/
00023
00024 #define SIZEOF_BITMAPFILEHEADER_PACKED  (   \
00025     sizeof(WORD) +      /* bfType      */   \
00026     sizeof(DWORD) +     /* bfSize      */   \
00027     sizeof(WORD) +      /* bfReserved1 */   \
00028     sizeof(WORD) +      /* bfReserved2 */   \
00029     sizeof(DWORD))      /* bfOffBits   */
00030
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034
00035 /* Prototypes */
00036 VOID DibCopyPalette(HBITMAP , HBITMAP );
00037 WORD PaletteSize (VOID FAR *);
00038 WORD DibNumColors (VOID FAR *);
00039 WORD DibGetPaletteSize (VOID FAR *);
00040 VOID WriteMapFileHeaderandConvertFromDwordAlignToPacked(HFILE, LPBITMAPFILEHEADER);
00041 HANDLE ReadDIBFile(HANDLE);
00042 HANDLE ReadDIBRsrc(HINSTANCE, HRSRC);
00043 HBITMAP LoadDIB(LPSTR);
00044 BOOL SaveDIB(HBITMAP, LPSTR);
00045 HBITMAP CreateDIB(DWORD, DWORD, WORD, HPALETTE);
00046 HBITMAP CopyScreenToBitmap(HWND, LPRECT);
00047 HBITMAP DIBToBitmap(HBITMAP);
00048 HANDLE DDBtoDIB(HBITMAP, WORD, HPALETTE);
00049 BOOL SaveBmpFromDDB(HDC, HBITMAP, PSTR);
00050
00051 #ifdef __cplusplus
00052 }
00053 #endif
00054
00055 #endif /* DIB_H */
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportFilter.cpp Source File

common/ImportFilter.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * ImportFilter.cpp : filter the imported files before importing
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "resource.h"
00029 #endif /* WIN32 */
00030
00031 #ifdef TARGET_OS_MAC
00032 #   include "GUSIInternal.h"
00033 #   include "GUSIFileSpec.h"
00034 #   include "MacMisc.h"
00035 #endif /* TARGET_OS_MAC */
00036
00037 #include "ImportFilter.h"
00038 #include "AppConsole.h"
00039
00040 //
00041 // MN - Apply $HOME/.cvsignore to import filter
00042 //
00043 // list_add_type function uses ignore filter to decided whether
00044 // a file should be ignored in importing (user can change this
00045 // in import dialogbox, but this is a default). If user imports
00046 // a whole subdirectory instead of a file then this will
00047 // eliminate ignored files.
00048 //
00049 #include "CvsIgnore.h"
00050
00051 #if qCvsDebug
00052 #   include "CvsAlert.h"
00053 #endif /* qCvsDebug */
00054
00055 #ifdef TARGET_OS_MAC
00056     static const char *lf = "\r";
00057 #elif defined(WIN32)
00058     static const char *lf = "\r\n";
00059 #else
00060     static const char *lf = "\n";
00061 #endif
00062
00063 #ifdef WIN32
00064 #   ifdef _DEBUG
00065 #   define new DEBUG_NEW
00066 #   undef THIS_FILE
00067     static char THIS_FILE[] = __FILE__;
00068 #   endif
00069 #endif /* WIN32 */
00070
00071 #ifndef NEW
00072 #define NEW new
00073 #endif
00074
00081 static void list_add_warning(ReportWarning*& warnings, kTextBinTYPE warn, const char* sample)
00082 {
00083     // Find if it exists already a same kind of warning
00084     ReportWarning* tmp = warnings;
00085     while( tmp != 0L )
00086     {
00087         if( tmp->Kind() == warn )
00088             break;
00089
00090         tmp = tmp->next;
00091     }
00092
00093     if( tmp != 0L && tmp->Kind() == warn )
00094     {
00095         tmp->AddWarning(sample);
00096         return;
00097     }
00098
00099     // Insert new one
00100     tmp = NEW ReportWarning(warn);
00101     if( tmp == 0L )
00102     {
00103         cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportWarning));
00104         return;
00105     }
00106
00107     tmp->AddWarning(sample);
00108
00109     if( warnings == 0L )
00110     {
00111         warnings = tmp;
00112     }
00113     else
00114     {
00115         tmp->next = warnings;
00116         warnings = tmp;
00117     }
00118 }
00119
00132 static void list_add_type(ImportReport* impReport, ReportConflict*& conflicts, kFileType fileType,
00133                           const char* sample, const char* fullname,
00134                           int mac_type, int mac_creator)
00135 {
00136     // Look for a matching entry
00137     ReportConflict* entry = conflicts;
00138     while( entry != 0L )
00139     {
00140         if( entry->Match(sample) )
00141         {
00142             if( entry->HasConflict() )
00143                 return;
00144
00145             if( entry->IsBinary() ^ (kFileTypeBin == fileType) )
00146                 entry->SetConflict(fullname);
00147
00148             if( entry->IsUnicode() ^ (kFileTypeUnicode == fileType) )
00149                 entry->SetConflict(fullname);
00150
00151             // Mac only
00152             if( entry->GetMacType() != mac_type || entry->GetMacCreator() != mac_creator )
00153                 entry->SetTypeCreatorConflict(fullname);
00154
00155             // It matches perfectly
00156             return;
00157         }
00158
00159         entry = entry->next;
00160     }
00161
00162     // Find the extension
00163     const char* tmp = sample, *ext = 0L;
00164
00165     while( (tmp = strchr(tmp, '.')) != 0L )
00166     {
00167         ext = tmp++;
00168     }
00169
00170     // Add a new entry
00171     ReportConflict* newc = NEW ReportConflict(mac_type, mac_creator);
00172     if( newc == 0L )
00173     {
00174         cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportConflict));
00175         return;
00176     }
00177
00178     newc->AddPattern(ext != 0L ? ext : sample, fileType, ext != 0L, fullname);
00179
00180     if( conflicts == 0L )
00181     {
00182         conflicts = newc;
00183     }
00184     else
00185     {
00186         newc->next = conflicts;
00187         conflicts = newc;
00188     }
00189
00190     // MN - Apply ignore filter. If $HOME/.cvsignore tells that
00191     // file should be ignored then set object to ignored state.
00192     if( MatchIgnoredList(sample, impReport->GetIgnoreList()) )
00193         newc->Ignore();
00194 }
00195
00203 kTraversal list_all_types_recur(const char* path, ReportWarning*& warnings, ReportConflict*& conflicts)
00204 {
00205     ImportReport report(path, warnings, conflicts);
00206     return FileTraverse(path, report);
00207 }
00208
00214 void free_list_types(ReportWarning*& warnings, ReportConflict*& conflicts)
00215 {
00216     ReportWarning* warn = warnings;
00217     while( warn != 0L )
00218     {
00219         ReportWarning* tmpwarn = warn;
00220         warn = warn->next;
00221         delete tmpwarn;
00222     }
00223
00224     ReportConflict* conf = conflicts;
00225     while( conf != 0L )
00226     {
00227         ReportConflict* tmpconf = conf;
00228         conf = conf->next;
00229         delete tmpconf;
00230     }
00231
00232     warnings = NULL;
00233     conflicts = NULL;
00234 }
00235
00243 void copy_list_types(const ReportWarning* srcWarnings, const ReportConflict* srcConflicts, ReportWarning*& warnings, ReportConflict*& conflicts)
00244 {
00245     const ReportWarning* warn = srcWarnings;
00246     ReportWarning* lastWarn = NULL;
00247     while( warn != 0L )
00248     {
00249         ReportWarning* neww = new ReportWarning(kFileIsOK);
00250         if( neww == 0L )
00251         {
00252             cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportWarning));
00253             return;
00254         }
00255
00256         *neww = *warn;
00257         neww->next = NULL;
00258
00259         if( warnings == 0L )
00260         {
00261             warnings = neww;
00262         }
00263         else
00264         {
00265             lastWarn->next = neww;
00266         }
00267
00268         lastWarn = neww;
00269         warn = warn->next;
00270     }
00271
00272     const ReportConflict* conf = srcConflicts;
00273     ReportConflict* lastConf = NULL;
00274     while( conf != 0L )
00275     {
00276         ReportConflict* newc = new ReportConflict(0, 0);
00277         if( newc == 0L )
00278         {
00279             cvs_err("Impossible to allocate %d bytes !\n", sizeof(ReportConflict));
00280             return;
00281         }
00282
00283         *newc = *conf;
00284         newc->next = NULL;
00285
00286         if( conflicts == 0L )
00287         {
00288             conflicts = newc;
00289         }
00290         else
00291         {
00292             lastConf->next = newc;
00293         }
00294
00295         lastConf = newc;
00296         conf = conf->next;
00297     }
00298 }
00299
00300 #if qCvsDebug
00301 bool list_all_types(const char* path)
00302 {
00303     ReportWarning* warnings = 0L;
00304     ReportConflict* conflicts = 0L;
00305     list_all_types_recur(path, warnings, conflicts);
00306
00307     cvs_out("Reporting warnings :\n");
00308     ReportWarning* warn = warnings;
00309
00310     while( warn != 0L )
00311     {
00312         warn->PrintOut();
00313         warn = warn->next;
00314     }
00315
00316     cvs_out("Reporting types :\n");
00317     ReportConflict* conf = conflicts;
00318
00319     while( conf != 0L )
00320     {
00321         conf->PrintOut();
00322         conf = conf->next;
00323     }
00324
00325     free_list_types(warnings, conflicts);
00326
00327     CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00328         _i18n("Continue importing?"), NULL,
00329         BUTTONTITLE_CONTINUE, BUTTONTITLE_CANCEL);
00330
00331     return cvsAlert.ShowAlert() == kCvsAlertOKButton;
00332 }
00333 #endif /* qCvsDebug */
00334
00336 // ReportConflict
00337
00338 ReportConflict::ReportConflict(int mac_type, int mac_creator)
00339 {
00340     next = 0L;
00341     status = noConflict;
00342     ftype = mac_type;
00343     fcreator = mac_creator;
00344 }
00345
00346 void ReportConflict::PrintOut(CStr& out) const
00347 {
00348     out = "";
00349     if( HasConflict() )
00350     {
00351         out << "Text/Binary conflict, at least these files :";
00352         out << lf;
00353
00354         if( !sample1.empty() && !sample2.empty() )
00355         {
00356             out << "    ";
00357             out << sample1;
00358             out << " and ";
00359             out << sample2;
00360             out << lf;
00361         }
00362     }
00363     else if( HasTypeCreatorConflict() )
00364     {
00365         out << "Mac signature mismatch for this type, at least these files :";
00366         out << lf;
00367
00368         if( !sample1.empty() && !sample2.empty() )
00369         {
00370             out << "    ";
00371             out << sample1;
00372             out << " and ";
00373             out << sample2;
00374             out << lf;
00375         }
00376     }
00377 }
00378
00379 #if qCvsDebug
00380 void ReportConflict::PrintOut(void) const
00381 {
00382     if( pattern.empty() )
00383         return;
00384
00385     cvs_out("  New type : %s%s (%s)\n",
00386         (status & hasExtension) ? "*" : "",
00387         (const char*)pattern,
00388         (status & isBinary) ? "BINARY" : "TEXT");
00389
00390     if( !sample1.empty() && !sample2.empty() )
00391     {
00392         if( HasConflict() )
00393             cvs_out("    Text/Binary CONFLICT ! %s and %s\n",
00394             (const char*)sample1, (const char*)sample2);
00395
00396         else if( HasTypeCreatorConflict() )
00397             cvs_out("    Mac signature mismatch ! %s and %s\n",
00398             (const char*)sample1, (const char*)sample2);
00399     }
00400 }
00401 #endif /* qCvsDebug */
00402
00403 ReportConflict::~ReportConflict()
00404 {
00405 }
00406
00414 void ReportConflict::AddPattern(const char* newpat, kFileType fileType, bool isExt, const char* sample)
00415 {
00416     pattern = newpat;
00417     sample1 = sample;
00418
00419     switch( fileType )
00420     {
00421     case kFileTypeBin:
00422         status |= isBinary;
00423         break;
00424     case kFileTypeUnicode:
00425         status |= isUnicode;
00426         break;
00427     default:
00428         // nothing to do
00429         break;
00430     }
00431
00432     if( isExt )
00433         status |= hasExtension;
00434 }
00435
00442 bool ReportConflict::Match(const char* pat)
00443 {
00444     if( pat == 0L || pattern.empty() )
00445         return false;
00446
00447     int len = strlen(pat);
00448     int patlen = pattern.length();
00449
00450     if( status & hasExtension )
00451     {
00452         if( len < patlen )
00453             return false;
00454
00455         return strcmp(pattern, pat + len - patlen) == 0;
00456     }
00457
00458     return strcmp(pattern, pat) == 0;
00459 }
00460
00465 void ReportConflict::SetConflict(const char* sample)
00466 {
00467     // one is enough !
00468     if( HasConflict() )
00469         return;
00470
00471     sample2 = sample;
00472     status |= hasConflict;
00473 }
00474
00479 void ReportConflict::SetTypeCreatorConflict(const char* sample)
00480 {
00481     // one is enough !
00482     if( HasTypeCreatorConflict() || HasConflict() )
00483         return;
00484
00485     sample2 = sample;
00486     status |= hasTypeCreatorConflict;
00487 }
00488
00493 bool ReportConflict::HasConflict(void) const
00494 {
00495     return (status & hasConflict) != 0;
00496 }
00497
00503 bool ReportConflict::HasTypeCreatorConflict(void) const
00504 {
00505     return (status & hasTypeCreatorConflict) != 0;
00506 }
00507
00512 bool ReportConflict::IsBinary(void) const
00513 {
00514     return (status & isBinary) != 0;
00515 }
00516
00521 bool ReportConflict::IsUnicode(void) const
00522 {
00523     return (status & isUnicode) != 0;
00524 }
00525
00530 bool ReportConflict::IsExtension(void) const
00531 {
00532     return (status & hasExtension) != 0;
00533 }
00534
00539 const char* ReportConflict::GetPattern(void) const
00540 {
00541     return pattern;
00542 }
00543
00549 int ReportConflict::GetMacType(void) const
00550 {
00551     return ftype;
00552 }
00553
00559 int ReportConflict::GetMacCreator(void) const
00560 {
00561     return fcreator;
00562 }
00563
00567 void ReportConflict::ForceBinary(void)
00568 {
00569     status &= ~(int)userFlags;
00570     status |= (int)forceBinary;
00571 }
00572
00576 void ReportConflict::ForceText(void)
00577 {
00578     status &= ~(int)userFlags;
00579     status |= (int)forceText;
00580 }
00581
00585 void ReportConflict::ForceUnicode(void)
00586 {
00587     status &= ~(int)userFlags;
00588     status |= (int)forceUnicode;
00589 }
00590
00594 void ReportConflict::Ignore(void)
00595 {
00596     status &= ~(int)userFlags;
00597     status |= (int)hasIgnore;
00598 }
00599
00603 void ReportConflict::ForceNoKeywords(void)
00604 {
00605     status &= ~(int)userFlags;
00606     status |= (int)forceNoKeywords;
00607 }
00608
00613 bool ReportConflict::HasForceBinary(void) const
00614 {
00615     return (status & forceBinary) != 0;
00616 }
00617
00622 bool ReportConflict::HasForceText(void) const
00623 {
00624     return (status & forceText) != 0;
00625 }
00626
00631 bool ReportConflict::HasForceUnicode(void) const
00632 {
00633     return (status & forceUnicode) != 0;
00634 }
00635
00640 bool ReportConflict::HasIgnore(void) const
00641 {
00642     return (status & hasIgnore) != 0;
00643 }
00644
00649 bool ReportConflict::HasForceNoKeywords(void) const
00650 {
00651     return (status & forceNoKeywords) != 0;
00652 }
00653
00657 void ReportConflict::DisableUserSettings(void)
00658 {
00659     status &= ~(int)userFlags;
00660 }
00661
00666 CPStr ReportConflict::GetStateDesc() const
00667 {
00668     return HasConflict() ? "Error" : "OK";
00669 }
00670
00675 CPStr ReportConflict::GetDesc() const
00676 {
00677     CPStr desc;
00678
00679     desc << "Type ";
00680     desc << (IsExtension() ? "*" : "");
00681     desc << GetPattern();
00682
00683     return desc;
00684 }
00685
00690 CPStr ReportConflict::GetKindDesc() const
00691 {
00692     if( HasForceBinary() )
00693     {
00694         return "FORCE BINARY";
00695     }
00696     else if( HasForceUnicode() )
00697     {
00698         return "FORCE UNICODE";
00699     }
00700     else if( HasForceText() )
00701     {
00702         return "FORCE TEXT";
00703     }
00704     else if( HasForceNoKeywords() )
00705     {
00706         return "FORCE NO KEYWORDS";
00707     }
00708     else if( HasIgnore() )
00709     {
00710         return "IGNORE";
00711     }
00712     else if( IsBinary() )
00713     {
00714         return "BINARY";
00715     }
00716     else if( IsUnicode() )
00717     {
00718         return "UNICODE";
00719     }
00720
00721     return "TEXT";
00722 }
00723
00725 // ReportWarning
00726
00727 const size_t ReportWarning::maxWarnings = 10;
00728
00729 ReportWarning::ReportWarning(kTextBinTYPE akind)
00730 {
00731     kind = akind;
00732     next = 0L;
00733     tooManyWarnings = false;
00734 }
00735
00736 ReportWarning::~ReportWarning()
00737 {
00738 }
00739
00744 void ReportWarning::PrintOut(CStr& out) const
00745 {
00746     out = "";
00747
00748     if( samples.size() == 0 )
00749         return;
00750
00751     out = "Warning : ";
00752     switch(kind)
00753     {
00754     default:
00755     case kFileIsOK:
00756         out << "Files are OK";
00757         break;
00758     case kFileMissing:
00759         out << "Files are missing or unreadable";
00760         break;
00761     case kFileIsAlias:
00762         out << "Files are aliases";
00763         break;
00764     case kFileInvalidName:
00765         out << "Files have invalid name";
00766         break;
00767     case kTextWrongLF:
00768         out << "Files have the wrong line feed";
00769         break;
00770     case kTextIsBinary:
00771         out << "Files are binary";
00772         break;
00773     case kTextEscapeChar:
00774         out << "Files have escape characters in it";
00775         break;
00776     case kTextWrongSig:
00777         out << "Text files have the wrong signature";
00778         break;
00779     case kBinIsText:
00780         out << "Files are text, should be binary";
00781         break;
00782     case kBinWrongSig:
00783         out << "Binary files have the wrong signature";
00784         break;
00785     case kTextIsUnicode:
00786         out << "Files are unicode, should be text";
00787         break;
00788     case kBinIsUnicode:
00789         out << "Files are unicode, should be binary";
00790         break;
00791     }
00792
00793     out << lf;
00794
00795     std::vector<CStr>::const_iterator i;
00796     for(i = samples.begin(); i != samples.end(); ++i)
00797     {
00798         out << "    ";
00799         out << *i;
00800         out << lf;
00801     }
00802
00803     if( tooManyWarnings )
00804     {
00805         out << "    More files follow";
00806         out << lf;
00807     }
00808 }
00809
00810 #if qCvsDebug
00811 void ReportWarning::PrintOut(void) const
00812 {
00813     if( samples.size() == 0 )
00814         return;
00815
00816     cvs_out("  Warning : ");
00817     switch(kind)
00818     {
00819     default:
00820     case kFileIsOK:
00821         cvs_out("Files are OK\n");
00822         break;
00823     case kFileMissing:
00824         cvs_out("Files are missing or unreadable\n");
00825         break;
00826     case kFileIsAlias:
00827         cvs_out("Files are aliases\n");
00828         break;
00829     case kFileInvalidName:
00830         cvs_out("Files have invalid name\n");
00831         break;
00832     case kTextWrongLF:
00833         cvs_out("Files have the wrong line feed\n");
00834         break;
00835     case kTextIsBinary:
00836         cvs_out("Files are binary\n");
00837         break;
00838     case kTextEscapeChar:
00839         cvs_out("Files have escape characters in it\n");
00840         break;
00841     case kTextWrongSig:
00842         cvs_out("Text files have the wrong signature\n");
00843         break;
00844     case kBinIsText:
00845         cvs_out("Files are text, should be binary\n");
00846         break;
00847     case kBinWrongSig:
00848         cvs_out("Binary files have the wrong signature\n");
00849         break;
00850     case kTextIsUnicode:
00851         cvs_out("Files are unicode, should be text\n");
00852         break;
00853     case kBinIsUnicode:
00854         cvs_out("Files are unicode, should be binary\n");
00855         break;
00856     }
00857
00858     std::vector<CStr>::const_iterator i;
00859     for(i = samples.begin(); i != samples.end(); ++i)
00860     {
00861         cvs_out("    %s\n", (const char*)(*i));
00862     }
00863
00864     if( tooManyWarnings )
00865         cvs_out("    More files follow\n");
00866 }
00867 #endif /* qCvsDebug */
00868
00873 void ReportWarning::AddWarning(const char* sample)
00874 {
00875     // it's enough !
00876     if( samples.size() >= maxWarnings )
00877     {
00878         tooManyWarnings = true;
00879         return;
00880     }
00881
00882     samples.push_back(CStr(sample));
00883 }
00884
00889 kTextBinTYPE ReportWarning::Kind(void) const
00890 {
00891     return kind;
00892 }
00893
00899 bool ReportWarning::IsError() const
00900 {
00901     return Kind() == kFileIsOK || Kind() == kTextEscapeChar;
00902 }
00903
00908 CPStr ReportWarning::GetStateDesc() const
00909 {
00910     if( IsError() )
00911     {
00912         return "Error";
00913     }
00914
00915     return "Warning";
00916 }
00917
00922 CPStr ReportWarning::GetDesc() const
00923 {
00924     CPStr desc;
00925
00926     switch( Kind() )
00927     {
00928     case kFileIsOK:
00929         desc = "File is OK";
00930         break;
00931     case kFileMissing:
00932         desc = "File is missing or unreadable";
00933         break;
00934     case kFileIsAlias:
00935         desc = "File is an alias";
00936         break;
00937     case kFileInvalidName:
00938         desc = "File has an invalid name";
00939         break;
00940     case kTextWrongLF:
00941         desc = "File has the wrong line feed for this machine";
00942         break;
00943     case kTextIsBinary:
00944         desc = "File seems to be binary, while expecting text";
00945         break;
00946     case kTextEscapeChar:
00947         desc = "File has some escape characters in it (0x00-0x20, 0x80-0xFF)";
00948         break;
00949     case kTextIsUnicode:
00950         desc = "File seems to be unicode, while expecting text";
00951         break;
00952     case kBinIsUnicode:
00953         desc = "File seems to be unicode, while expecting binary";
00954         break;
00955     case kTextWrongSig:
00956         desc = "Text File has a wrong mac signature";
00957         break;
00958     case kBinWrongSig:
00959         desc = "Binary File has a wrong mac signature";
00960         break;
00961     default:
00962         desc = "File has some unknown problem";
00963         break;
00964     }
00965
00966     return desc;
00967 }
00968
00970 // ImportReport
00971
00972 ImportReport::ImportReport(const char* path, ReportWarning*& w, ReportConflict*& c)
00973     : warnings(w), conflicts(c), m_progress(true, "Filtering files to import...", kProgressFile)
00974 {
00975     // MN - Apply ignore filter to import file list
00976     BuildIgnoredList(m_ignlist, path);
00977 }
00978
00979 ImportReport::~ImportReport()
00980 {
00981 }
00982
00983 kTraversal ImportReport::EnterDirectory(const char* fullpath, const char* dirname, const UFSSpec* macspec)
00984 {
00985     cvs_out("Filtering \'%s\'...\n", fullpath);
00986     return kContinueTraversal;
00987 }
00988
00989 kTraversal ImportReport::ExitDirectory(const char* fullpath)
00990 {
00991     return kContinueTraversal;
00992 }
00993
00994 kTraversal ImportReport::OnError(const char* err, int errcode)
00995 {
00996     list_add_warning(warnings, kFileMissing, err);
00997     return kContinueTraversal;
00998 }
00999
01000 kTraversal ImportReport::OnIdle(const char* fullpath)
01001 {
01002     if( m_progress.HasAborted() )
01003     {
01004         return kStopTraversal;
01005     }
01006
01007     m_progress.SetProgress(fullpath);
01008
01009     return kContinueTraversal;
01010 }
01011
01012 kTraversal ImportReport::OnDirectory(const char* fullpath, const char* fullname, const char* name,
01013                                      const struct stat& dir, const UFSSpec* macspec)
01014 {
01015 #if defined(WIN32) || defined(TARGET_OS_MAC)
01016     if(stricmp(name, "CVS") == 0)
01017 #else
01018     if(strcmp(name, "CVS") == 0)
01019 #endif
01020         return kSkipFile;
01021
01022     return kContinueTraversal;
01023 }
01024
01025 kTraversal ImportReport::OnFile(const char* fullpath, const char* fullname, const char* name,
01026                                 const struct stat& dir, const UFSSpec* macspec)
01027 {
01028     int mac_type = 0;
01029     int mac_creator = 0;
01030
01031 #ifdef TARGET_OS_MAC
01032 #   define MACSPEC , &fsSpec
01033     GUSIFileSpec inspec(fullname);
01034     FInfo finfo;
01035     memcpy(&finfo, inspec.CatInfo()->Info().finderInfo, 2 * sizeof(OSType));
01036     mac_type = finfo.fdType;
01037     mac_creator = finfo.fdCreator;
01038     UFSSpec fsSpec = inspec;
01039 #else /* !TARGET_OS_MAC */
01040 #   define MACSPEC
01041 #endif /* !TARGET_OS_MAC */
01042
01043     kFileType newType = kFileTypeText;
01044     kTextBinTYPE filetype = FileIsText(name, fullpath MACSPEC);
01045
01046     if( kTextIsBinary == filetype || kTextWrongSig == filetype )
01047     {
01048         kTextBinTYPE bintype = FileIsBinary(name, fullpath MACSPEC);
01049         if( kFileIsOK != bintype )
01050         {
01051             list_add_warning(warnings, bintype, fullname);
01052         }
01053         else if( kTextWrongSig == filetype )
01054         {
01055             list_add_warning(warnings, filetype, fullname);
01056             filetype = kTextIsBinary;
01057             newType = kFileTypeBin;
01058         }
01059
01060         if( kFileIsOK == bintype )
01061         {
01062             newType = kFileTypeBin;
01063         }
01064     }
01065     else if( kTextIsUnicode == filetype )
01066     {
01067         newType = kFileTypeUnicode;
01068     }
01069     else if( kFileIsOK != filetype )
01070     {
01071         list_add_warning(warnings, filetype, fullname);
01072     }
01073
01074     // Add the type
01075     list_add_type(this, conflicts, newType, name, fullname, mac_type, mac_creator);
01076
01077     return kContinueTraversal;
01078 }
01079
01080 kTraversal ImportReport::OnAlias(const char* fullpath, const char* fullname, const char* name,
01081                                  const struct stat& dir, const UFSSpec* macspec)
01082 {
01083     list_add_warning(warnings, kFileIsAlias, fullname);
01084     return kContinueTraversal;
01085 }
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsMenubar.cpp Source File

common/UCvsMenubar.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include "UCvsMenubar.h"
00028 #include "UCvsCommands.h"
00029 #include "MacrosSetup.h"
00030
00031 UIMPLEMENT_DYNAMIC(UCvsMenubar, UMenu)
00032
00033 UBEGIN_MESSAGE_MAP(UCvsMenubar, UMenu)
00034     ON_UDESTROY(UCvsMenubar)
00035     ON_UCREATE(UCvsMenubar)
00036 UEND_MESSAGE_MAP()
00037
00038 UCvsMenubar::UCvsMenubar() : UMenu(kUCvsMenubarID)
00039 {
00040 }
00041
00042 UCvsMenubar::~UCvsMenubar()
00043 {
00044 }
00045
00046 void UCvsMenubar::OnDestroy(void)
00047 {
00048     delete this;
00049 }
00050
00051 void UCvsMenubar::OnCreate(void)
00052 {
00053 }
00054
00055 void CreateMainMenubar(int widid)
00056 {
00057     std::vector<CMacroEntry>::const_iterator i;
00058     int cnt;
00059
00060     UMENU menu = UMenuAddPulldown(widid, _i18n("&File"), UMENU_NULL);
00061     UMenuAddButton(widid, _i18n("&Save\tCtrl+S"), menu, 0L, cmdSAVE);
00062     UMenuAddButton(widid, _i18n("Save &As..."), menu, 0L, cmdSAVE_AS);
00063     UMenuAddSeparator(widid, menu);
00064     UMenuAddButton(widid, _i18n("&Print...\tCtrl+P"), menu, 0L, cmdPRINT);
00065     UMenuAddButton(widid, _i18n("Print Pre&view"), menu, 0L, cmdPRINT_PREVIEW);
00066     UMenuAddButton(widid, _i18n("P&rint Setup..."), menu, 0L, cmdPRINT_SETUP);
00067     UMenuAddSeparator(widid, menu);
00068     UMenuAddButton(widid, _i18n("Sen&d..."), menu, 0L, cmdSEND_MAIL);
00069     UMenuAddSeparator(widid, menu);
00070     UMenuAddButton(widid, _i18n("E&xit\tCtrl+Q"), menu, 0L, cmdEXIT);
00071
00072     menu = UMenuAddPulldown(widid, _i18n("&Edit"), UMENU_NULL);
00073     UMenuAddButton(widid, _i18n("&Undo\tCtrl+Z"), menu, 0L, cmdUNDO);
00074     UMenuAddSeparator(widid, menu);
00075     UMenuAddButton(widid, _i18n("Cu&t\tCtrl+X"), menu, 0L, cmdCUT);
00076     UMenuAddButton(widid, _i18n("&Copy\tCtrl+C"), menu, 0L, cmdCOPY);
00077     UMenuAddButton(widid, _i18n("&Paste\tCtrl+V"), menu, 0L, cmdPASTE);
00078     UMenuAddSeparator(widid, menu);
00079     UMenuAddButton(widid, _i18n("Select &All\tCtrl+A"), menu, 0L, cmdSELECT_ALL);
00080     UMenuAddButton(widid, _i18n("&Erase all"), menu, 0L, cmdCLEAR_ALL);
00081     UMenuAddSeparator(widid, menu);
00082     UMenuAddButton(widid, _i18n("&Find...\tCtrl+F"), menu, 0L, cmdFIND);
00083     UMenuAddButton(widid, _i18n("Find next\tF3"), menu, 0L, cmdREPEAT);
00084     UMenuAddSeparator(widid, menu);
00085     UMenuAddButton(widid, _i18n("F&ont..."), menu, 0L, cmdFONT);
00086     menu = UMenuAddPulldown(widid, _i18n("&Shell"), menu, cmdSHELL);
00087     UMenuAddRadio(widid, _i18n("&Tcl"), menu, 0L, cmdUSE_TCLSHELL);
00088     UMenuAddRadio(widid, _i18n("&Python"), menu, 0L, cmdUSE_PYSHELL);
00089
00090     menu = UMenuAddPulldown(widid, _i18n("&View"), UMENU_NULL);
00091     UMenuAddButton(widid, _i18n("&Toolbar"), menu, 0L, cmdTOOLBAR);
00092     UMenuAddButton(widid, _i18n("&Status Bar"), menu, 0L, cmdSTATUS_BAR);
00093     UMenuAddButton(widid, _i18n("&Browser Bar"), menu, 0L, cmdBROWSER_BAR);
00094     UMenuAddButton(widid, _i18n("&Files Bar"), menu, 0L, cmdFILES_BAR);
00095     UMenuAddButton(widid, _i18n("&Multi-Users Bar"), menu, 0L, cmdMULTI_BAR);
00096     UMenuAddButton(widid, _i18n("T&ags Bar"), menu, 0L, cmdTAGS_BAR);
00097     UMenuAddButton(widid, _i18n("&Console Bar"), menu, 0L, cmdCONSOLE_BAR);
00098     UMenuAddButton(widid, _i18n("&Workspace Bar"), menu, 0L, cmdWORKSPACE);
00099     UMenuAddSeparator(widid, menu);
00100     UMenuAddButton(widid, _i18n("Change browser &location..."), menu, 0L, cmdOPEN);
00101     UMenuAddButton(widid, _i18n("S&ave settings for location..."), menu, 0L, cmdSAVESETTINGS);
00102
00103     menu = UMenuAddPulldown(widid, _i18n("&Admin"), UMENU_NULL);
00104     UMenuAddButton(widid, _i18n("Pr&eferences...\tCtrl+F1"), menu, 0L, cmdPREFERENCES);
00105     UMenuAddButton(widid, _i18n("&Command Line..."), menu, 0L, cmdCMDLINE);
00106     UMenuAddSeparator(widid, menu);
00107     UMenuAddButton(widid, _i18n("&Login..."), menu, 0L, cmdLOGIN);
00108     UMenuAddButton(widid, _i18n("Lo&gout"), menu, 0L, cmdLOGOUT);
00109     UMenuAddSeparator(widid, menu);
00110     UMenuAddButton(widid, _i18n("&Stop cvs"), menu, 0L, cmdSTOPCVS);
00111     menu = UMenuAddPulldown(widid, _i18n("Macros admin"), menu, cmdADMINMACROS);
00112     for(cnt = 0, i = gMacrosAdmin.entries.begin(); i != gMacrosAdmin.entries.end(); ++i, cnt++)
00113     {
00114         UMenuAddButton(widid, (*i).name, menu, 0L, cmdMACROADMIN + cnt);
00115     }
00116
00117     menu = UMenuAddPulldown(widid, _i18n("&Remote"), UMENU_NULL);
00118     UMenuAddButton(widid, _i18n("&Create a new repository..."), menu, 0L, cmdINIT);
00119     UMenuAddSeparator(widid, menu);
00120     UMenuAddButton(widid, _i18n("Import module..."), menu, 0L, cmdIMPORT);
00121     UMenuAddButton(widid, _i18n("Checkout module..."), menu, 0L, cmdCHECKOUT);
00122     UMenuAddSeparator(widid, menu);
00123     UMenuAddButton(widid, _i18n("&Create a tag by module..."), menu, 0L, cmdRTAGCREATE);
00124     UMenuAddButton(widid, _i18n("&Delete a tag by module..."), menu, 0L, cmdRTAGDELETE);
00125     UMenuAddButton(widid, _i18n("Create a &branch by module..."), menu, 0L, cmdRTAGBRANCH);
00126
00127     menu = UMenuAddPulldown(widid, _i18n("&Modify"), UMENU_NULL);
00128     UMenuAddButton(widid, _i18n("&Update selection...\tCtrl+U"), menu, 0L, cmdUPDATE);
00129     UMenuAddButton(widid, _i18n("Co&mmit selection...\tCtrl+M"), menu, 0L, cmdCOMMIT);
00130     UMenuAddSeparator(widid, menu);
00131     UMenuAddButton(widid, _i18n("&Add selection"), menu, 0L, cmdADD);
00132     UMenuAddButton(widid, _i18n("Add selection binar&y"), menu, 0L, cmdADDB);
00133     UMenuAddButton(widid, _i18n("&Remove selection"), menu, 0L, cmdRMV);
00134     UMenuAddSeparator(widid, menu);
00135     UMenuAddButton(widid, _i18n("Erase &selection\tCtrl+Backspace"), menu, 0L, cmdTRASH);
00136     UMenuAddSeparator(widid, menu);
00137     UMenuAddButton(widid, _i18n("&Create a tag on selection..."), menu, 0L, cmdTAGNEW);
00138     UMenuAddButton(widid, _i18n("&Delete a tag on selection..."), menu, 0L, cmdTAGDELETE);
00139     UMenuAddButton(widid, _i18n("Create a &branch on selection..."), menu, 0L, cmdTAGBRANCH);
00140
00141     menu = UMenuAddPulldown(widid, _i18n("&Query"), UMENU_NULL);
00142     UMenuAddButton(widid, _i18n("E&xplore selection\tF2"), menu, 0L, cmdEXPLORE);
00143     UMenuAddButton(widid, _i18n("&Query Update\tF4"), menu, 0L, cmdQUERYUPDATE);
00144     UMenuAddButton(widid, _i18n("R&eload view\tF5"), menu, 0L, cmdRELOAD);
00145     UMenuAddSeparator(widid, menu);
00146     UMenuAddButton(widid, _i18n("View selection\tF7"), menu, 0L, cmdEDITSEL);
00147     UMenuAddButton(widid, _i18n("View default"), menu, 0L, cmdEDITSELDEF);
00148     UMenuAddSeparator(widid, menu);
00149     UMenuAddButton(widid, _i18n("&Diff selection\tCtrl+D"), menu, 0L, cmdDIFF);
00150     UMenuAddButton(widid, _i18n("&Log selection"), menu, 0L, cmdLOG);
00151     UMenuAddButton(widid, _i18n("Status sele&ction"), menu, 0L, cmdSTATUS);
00152     UMenuAddButton(widid, _i18n("Graph selection\tCtrl+G"), menu, 0L, cmdGRAPH);
00153
00154     menu = UMenuAddPulldown(widid, _i18n("&Trace"), UMENU_NULL);
00155     UMenuAddButton(widid, _i18n("Lock selection"), menu, 0L, cmdLOCKF);
00156     UMenuAddButton(widid, _i18n("Unlock selection"), menu, 0L, cmdUNLOCKF);
00157     UMenuAddButton(widid, _i18n("Edit selection"), menu, 0L, cmdEDIT);
00158     UMenuAddButton(widid, _i18n("Reserved edit selection"), menu, 0L, cmdRESEDIT);
00159     UMenuAddButton(widid, _i18n("Unedit selection"), menu, 0L, cmdUNEDIT);
00160     UMenuAddButton(widid, _i18n("Add a Watch on selection"), menu, 0L, cmdWATCHON);
00161     UMenuAddButton(widid, _i18n("Remove a watch from selection"), menu, 0L, cmdWATCHOFF);
00162     UMenuAddSeparator(widid, menu);
00163     UMenuAddButton(widid, _i18n("Release selection"), menu, 0L, cmdRELEASE);
00164     UMenuAddSeparator(widid, menu);
00165     UMenuAddButton(widid, _i18n("Watchers of selection"), menu, 0L, cmdWATCHERS);
00166     UMenuAddButton(widid, _i18n("Editors of selection"), menu, 0L, cmdEDITORS);
00167
00168     menu = UMenuAddPulldown(widid, _i18n("Macro&s"), UMENU_NULL, cmdMACROS);
00169     for(cnt = 0, i = gMacrosSel.entries.begin(); i != gMacrosSel.entries.end(); ++i, cnt++)
00170     {
00171 #ifdef USE_PYTHON
00172         UMenuAddButton(widid, (*i).name, menu, 0L, cmdPyMACROS + cnt);
00173 #else
00174         UMenuAddButton(widid, (*i).name, menu, 0L, cmdSELMACRO + cnt);
00175 #endif
00176     }
00177
00178     menu = UMenuAddPulldown(widid, _i18n("&Window"), UMENU_NULL);
00179     UMenuAddButton(widid, _i18n("&Cascade"), menu, 0L, cmdCASCADE);
00180     UMenuAddButton(widid, _i18n("&Tile"), menu, 0L, cmdTILE_HORZ);
00181     UMenuAddButton(widid, _i18n("&Arrange Icons"), menu, 0L, cmdARRANGE);
00182
00183     menu = UMenuAddPulldown(widid, _i18n("&Help"), UMENU_NULL);
00184     UMenuAddButton(widid, _i18n("&Help Topics"), menu, 0L, cmdFINDER);
00185     UMenuAddButton(widid, _i18n("Help on cvs-1.10"), menu, 0L, cmdCVS);
00186     UMenuAddButton(widid, _i18n("Help on cvs client"), menu, 0L, cmdCVSCLIENT);
00187     UMenuAddSeparator(widid, menu);
00188     UMenuAddButton(widid, _i18n("&Credits"), menu, 0L, cmdCREDITS);
00189     UMenuAddButton(widid, _i18n("C&opyrights"), menu, 0L, cmdCOPYRIGHTS);
00190     UMenuAddSeparator(widid, menu);
00191 #ifdef WIN32
00192     UMenuAddButton(widid, _i18n("&About wincvs..."), menu, 0L, cmdABOUT);
00193 #endif
00194 #ifdef qUnix
00195     UMenuAddButton(widid, _i18n("&About gcvs..."), menu, 0L, cmdABOUT);
00196 #endif
00197 }
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

MACBINMAPENTRIES Member List

This is the complete list of members for MACBINMAPENTRIES, including all inherited members.

cookie | MACBINMAPENTRIES
maps | MACBINMAPENTRIES
numMaps | MACBINMAPENTRIES

Generated on Sat Aug 7 22:54:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsAlert.h Source File

common/CvsAlert.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // CvsAlert.h : header file
00022 //
00023
00024 #if !defined(AFX_CVSALERT_H__ACFE8C41_9836_11D1_AE50_00C0F0067852__INCLUDED_)
00025 #define AFX_CVSALERT_H__ACFE8C41_9836_11D1_AE50_00C0F0067852__INCLUDED_
00026
00027 #if _MSC_VER >= 1000
00028 #pragma once
00029 #endif // _MSC_VER >= 1000
00030
00031 #include <string>
00032
00033 #include "uwidget.h"
00034 #include "cvsgui_i18n.h"
00035
00037 #define BUTTONTITLE_OK          _i18n("OK")
00038
00040 #define BUTTONTITLE_CANCEL      _i18n("Cancel")
00041
00043 #define BUTTONTITLE_CONTINUE    _i18n("Continue")
00044
00046 #define BUTTONTITLE_YES         _i18n("Yes")
00047
00049 #define BUTTONTITLE_NO          _i18n("No")
00050
00052 #define BUTTONTITLE_DELETE      _i18n("Delete")
00053
00054 class CPersistentBool;
00055
00057 typedef enum {
00058     kCvsAlertNoIcon,
00059     kCvsAlertStopIcon,
00060     kCvsAlertNoteIcon,
00061     kCvsAlertWarningIcon,
00062     kCvsAlertQuestionIcon
00063 }kCvsAlertIconType;
00064
00066 typedef enum {
00067     kCvsAlertOKButton,
00068     kCvsAlertCancelButton,
00069     kCvsAlertOtherButton
00070 }kCvsAlertButtonType;
00071
00073 class CvsAlert
00074 {
00075 public:
00076     // Construction
00077     CvsAlert(const kCvsAlertIconType icon,
00078         const char* message, const char* messageDetails = NULL,
00079         const char* okButtonTitle = BUTTONTITLE_OK, const char* cancelButtonTitle = BUTTONTITLE_CANCEL);
00080     virtual ~CvsAlert() {}
00081
00082 private:
00083     // Data members
00084     kCvsAlertIconType m_icon;
00086     std::string m_message;
00087     std::string m_messageDetails;
00089     std::string m_alertTitle;
00091     std::string m_okButtonTitle;
00092     std::string m_cancelButtonTitle;
00093     std::string m_otherButtonTitle;
00095     CPersistentBool* m_pHideOption;
00097 public:
00098     // Interface
00099     virtual kCvsAlertButtonType ShowAlert(const kCvsAlertButtonType defaultButton = kCvsAlertOKButton);
00100
00101     void SetAlertTitle(const char* alertTitle);
00102     void SetButtonTitle(const kCvsAlertButtonType buttonType, const char* buttonTitle);
00103     void SetHideOption(CPersistentBool* pHideOption);
00104
00105     kCvsAlertIconType GetIcon() const;
00106     std::string GetMessage() const;
00107     std::string GetMessageDetails() const;
00108     std::string GetAlertTitle() const;
00109     std::string GetButtonTitle(const kCvsAlertButtonType buttonType) const;
00110     CPersistentBool* GetHideOption() const;
00111 };
00112
00114 // CCVSAlert_MAIN dialog
00115
00116 #ifdef WIN32
00117 class CCVSAlert_MAIN : public CDialog
00118 {
00119 // Construction
00120 public:
00121     CCVSAlert_MAIN(const CvsAlert* pcvsAlert, const kCvsAlertButtonType defaultButton, CWnd* pParent = NULL);   // standard constructor
00122
00123 // Dialog Data
00124     //{{AFX_DATA(CCVSAlert_MAIN)
00125     enum { IDD = IDD_ALERT };
00126     CEdit   m_alertMessageEdit;
00127     CEdit   m_messageDetailsEdit;
00128     CButton m_okButton;
00129     CButton m_cancelButton;
00130     CButton m_otherButton;
00131     CStatic m_iconStatic;
00132     CString m_messageDetails;
00133     CString m_alertMessage;
00134     //}}AFX_DATA
00135
00136 // Overrides
00137     // ClassWizard generated virtual function overrides
00138     //{{AFX_VIRTUAL(CCVSAlert_MAIN)
00139     protected:
00140     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00141     //}}AFX_VIRTUAL
00142
00143 // Implementation
00144 protected:
00145
00146     // Generated message map functions
00147     //{{AFX_MSG(CCVSAlert_MAIN)
00148     virtual BOOL OnInitDialog();
00149     afx_msg void OnOtherButton();
00150     virtual void OnOK();
00151     virtual void OnCancel();
00152     //}}AFX_MSG
00153     DECLARE_MESSAGE_MAP()
00154 private:
00155     // Data members
00156     const CvsAlert* m_pcvsAlert;
00157     kCvsAlertButtonType m_defaultButton;
00159     CFont m_alertMessageFont;
00161     // Methods
00162     void SetIcon();
00163     void SetTitle();
00164     void SetMessages();
00165     void Resize();
00166     void SetButtonTitles();
00167     void SetAccelerators();
00168     void SetDefaultButton();
00169
00170     static void SetButtonAccelerator(CButton& button);
00171     static CSize GetWndTextExtent(CWnd* wnd, const char* text);
00172     static CSize CalcWndTextSize(CWnd* wnd, const char* text, const int width);
00173 };
00174 #endif /* WIN32 */
00175
00176 #ifdef qUnix
00177 class CCVSAlert_MAIN : public UWidget
00178 {
00179     UDECLARE_DYNAMIC(CCVSAlert_MAIN)
00180
00181 // Construction
00182 public:
00183     CCVSAlert_MAIN(const CvsAlert* pcvsAlert, const kCvsAlertButtonType defaultButton);
00184     virtual ~CCVSAlert_MAIN() {}
00185
00186 // Dialog Data
00187     enum
00188     {
00189         kOK = EV_COMMAND_START, // 0
00190         kCancel,                // 1
00191         kOtherBtn,          // 2
00192         kIcon,                  // 3
00193         kMessage,               // 4
00194         kMessageDetails // 5
00195     };
00196
00197     UStr m_messageDetails;
00198     UStr m_alertMessage;
00199
00200 // Overrides
00201     protected:
00202     virtual void DoDataExchange(bool fill);
00203
00204 // Implementation
00205 protected:
00206     virtual bool OnInitDialog();
00207     ev_msg void OnOtherButton();
00208     virtual void OnOK();
00209     virtual void OnCancel();
00210
00211     UDECLARE_MESSAGE_MAP()
00212 private:
00213     // Data members
00214     const CvsAlert* m_pcvsAlert;
00215     kCvsAlertButtonType m_defaultButton;
00217     // Methods
00218     void SetIcon();
00219     void SetTitle();
00220     void SetMessages();
00221     void Resize();
00222     void SetButtonTitles();
00223     void SetAccelerators();
00224     void SetDefaultButton();
00225
00226     void SetDefID(unsigned int defID);
00227 };
00228 #endif /* qUnix */
00229
00230 //{{AFX_INSERT_LOCATION}}
00231 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00232
00233 #endif // !defined(AFX_CVSALERT_H__ACFE8C41_9836_11D1_AE50_00C0F0067852__INCLUDED_)
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJWindowPlacement.h Source File

WinCvs/CJLib/Include/CJWindowPlacement.h

Go to the documentation of this file.
00001 // CJWindowPlacement.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJWindowPlacement.h $
00011  *
00012  * $History: CJWindowPlacement.h $
00013  *
00014  * *****************  Version 7  *****************
00015  * User: Kirk Stowell Date: 10/26/99   Time: 10:49p
00016  * Updated in $/CodeJock/Include
00017  * Made class methods virtual for inheritance purposes.
00018  *
00019  * *****************  Version 6  *****************
00020  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00021  * Updated in $/CodeJockey/Include
00022  * Updated copyright and contact information.
00023  *
00024  * *****************  Version 5  *****************
00025  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00026  * Updated in $/CodeJockey/Include
00027  *
00028  * *****************  Version 4  *****************
00029  * User: Kirk Stowell Date: 7/18/99    Time: 10:09p
00030  * Updated in $/CodeJockey/Include
00031  * Cleaned up inline functions, and import/export macro so that class will
00032  * be imported when linked to, and exported at compile time.
00033  *
00034  * *****************  Version 3  *****************
00035  * User: Kirk Stowell Date: 6/11/99    Time: 10:15p
00036  * Updated in $/CodeJockey/Include
00037  * Modified LoadWindowPos(...) to allow registry names to be directly
00038  * passed in.
00039  *
00040  * *****************  Version 2  *****************
00041  * User: Kirk Stowell Date: 6/11/99    Time: 9:41p
00042  * Updated in $/CodeJockey/Include
00043  * Initial creation.
00044  *
00045  * *****************  Version 1  *****************
00046  * User: Kirk Stowell Date: 6/01/99    Time: 9:30p
00047  * Created in $/CodeJockey/Include
00048  *
00049  ***************************************************************************/
00051
00052 #ifndef __CJWINDOWPLACEMENT_H__
00053 #define __CJWINDOWPLACEMENT_H__
00054
00055 // CCJWindowPlacement is a WINDOWPLACEMENT derived class which is used to
00056 // save and restore your applications window position.
00057 class _CJX_EXT_CLASS CCJWindowPlacement : public WINDOWPLACEMENT
00058 {
00059 public:
00060
00061     // Default constructor
00062     //
00063     CCJWindowPlacement();
00064
00065     // Virtual destructor
00066     //
00067     virtual ~CCJWindowPlacement();
00068
00069 private:
00070
00071     CString     m_strFormat;    // format string for registry settings.
00072     CString     m_strSection;   // registry section name.
00073     CString     m_strWndPos;    // registry entry name.
00074
00075 public:
00076
00077     // call this member function to load your applications previously saved
00078     // window position. To use, add a member variable to your CWinApp derived
00079     // class ie: CCJWindowPlacement m_wndPlacement; then replace the call
00080     // to pMainFrame->ShowWindow(...) with m_wndPlacement.LoadWindowPos( pMainFrame );
00081     //
00082     virtual BOOL LoadWindowPos( CFrameWnd* pFrameWnd, LPCTSTR lpszFormat=NULL, LPCTSTR lpszSection=NULL, LPCTSTR lpszWndPos=NULL );
00083
00084     // call this member function to save your applications window position. To
00085     // use, add the ON_WM_CLOSE message handler to your CFrameWnd derived class,
00086     // then make a call to theApp.m_wndPlacement.SaveWindowPos( this ); just before
00087     // you call the base class OnClose().
00088     //
00089     virtual void SaveWindowPos( CFrameWnd* pFrameWnd );
00090 };
00091
00093
00094 #endif // __CJWINDOWPLACEMENT_H__
00095
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatSplitterWnd.cpp Source File

WinCvs/CJLib/CJLibrary/CJFlatSplitterWnd.cpp

Go to the documentation of this file.
00001 // CJFlatSplitterWnd.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the CSplitterWndEx class written by Oleg G. Galkin.
00006 // mailto:OlegGa@vest.msk.ru
00007 // http://www.codeguru.com/splitter/show_hide_static_panes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 2002/06/15 17:49:37 $
00013  * $Revision: 1.2 $
00014  * $Archive: /CodeJock/CJLibrary/CJFlatSplitterWnd.cpp $
00015  *
00016  * $History: CJFlatSplitterWnd.cpp $
00017  *
00018  * *****************  Version 6  *****************
00019  * User: Kirk Stowell Date: 10/14/99   Time: 9:25p
00020  * Updated in $/CodeJock/CJLibrary
00021  * Fixed bug with hiding or showing panes where the incorrect splitter
00022  * control id was used.
00023  *
00024  * *****************  Version 5  *****************
00025  * User: Kirk Stowell Date: 9/13/99    Time: 5:44a
00026  * Updated in $/CodeJockey/CJLibrary
00027  * Fixed assertion when using ReplaceView to display a CFormView derived
00028  * class in a debug build - Tom
00029  *
00030  * *****************  Version 4  *****************
00031  * User: Kirk Stowell Date: 9/13/99    Time: 5:40a
00032  * Updated in $/CodeJockey/CJLibrary
00033  * Fixed bug with GetPane() call in ShowRow() where row and col arguments
00034  * were switched. - Francis
00035  *
00036  * *****************  Version 3  *****************
00037  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00038  * Updated in $/CodeJockey/CJLibrary
00039  * Updated copyright and contact information.
00040  *
00041  * *****************  Version 2  *****************
00042  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00043  * Updated in $/CodeJockey/CJLibrary
00044  *
00045  * *****************  Version 1  *****************
00046  * User: Kirk Stowell Date: 7/14/99    Time: 10:00p
00047  * Created in $/CodeJockey/CJLibrary
00048  * Class added to support flat splitters, removable splitter views and
00049  * view manipulation.
00050  *
00051  ***************************************************************************/
00053
00054 #include "StdAfx.h"
00055 #include "CJFlatSplitterWnd.h"
00056
00057 #ifdef _DEBUG
00058 #define new DEBUG_NEW
00059 #undef THIS_FILE
00060 static char THIS_FILE[] = __FILE__;
00061 #endif
00062
00064 // CCJFlatSplitterWnd
00065
00066 CCJFlatSplitterWnd::CCJFlatSplitterWnd()
00067 {
00068     m_bFlatSplitter = TRUE;
00069     m_nHiddenCol    = -1;
00070     m_nHiddenRow    = -1;
00071 }
00072
00073 CCJFlatSplitterWnd::~CCJFlatSplitterWnd()
00074 {
00075
00076 }
00077
00078 BEGIN_MESSAGE_MAP(CCJFlatSplitterWnd, CSplitterWnd)
00079     //{{AFX_MSG_MAP(CCJFlatSplitterWnd)
00080     ON_WM_PAINT()
00081     //}}AFX_MSG_MAP
00082 END_MESSAGE_MAP()
00083
00085 // CCJFlatSplitterWnd message handlers
00086
00087 void CCJFlatSplitterWnd::OnDrawSplitter(CDC* pDC, ESplitType nType,
00088     const CRect& rectArg)
00089 {
00090     if( m_bFlatSplitter )
00091     {
00092         // if pDC == NULL, then just invalidate
00093         if (pDC == NULL)
00094         {
00095             RedrawWindow(rectArg, NULL, RDW_INVALIDATE|RDW_NOCHILDREN);
00096             return;
00097         }
00098         ASSERT_VALID(pDC);
00099
00100         // otherwise, actually draw
00101         CRect rect = rectArg;
00102         switch (nType)
00103         {
00104         case splitBorder:
00105 #if _MFC_VER < 0x700
00106             ASSERT(afxData.bWin4);
00107 #endif
00108             pDC->Draw3dRect(rect, afxData.clrBtnFace, afxData.clrBtnFace);
00109             rect.InflateRect(-CX_BORDER, -CY_BORDER);
00110             pDC->Draw3dRect(rect, afxData.clrBtnShadow, afxData.clrBtnHilite);
00111             return;
00112
00113         case splitIntersection:
00114 #if _MFC_VER < 0x700
00115             ASSERT(!afxData.bWin4);
00116 #endif
00117             break;
00118
00119         case splitBox:
00120 #if _MFC_VER < 0x700
00121             if (afxData.bWin4)
00122 #endif
00123             {
00124                 pDC->Draw3dRect(rect, afxData.clrBtnFace, afxData.clrWindowFrame);
00125                 rect.InflateRect(-CX_BORDER, -CY_BORDER);
00126                 pDC->Draw3dRect(rect, afxData.clrBtnHilite, afxData.clrBtnShadow);
00127                 rect.InflateRect(-CX_BORDER, -CY_BORDER);
00128                 break;
00129             }
00130             // fall through...
00131         case splitBar:
00132 #if _MFC_VER < 0x700
00133             if (!afxData.bWin4)
00134 #endif
00135             {
00136                 pDC->Draw3dRect(rect, afxData.clrBtnHilite, afxData.clrBtnShadow);
00137                 rect.InflateRect(-CX_BORDER, -CY_BORDER);
00138             }
00139             break;
00140
00141         default:
00142             ASSERT(FALSE);  // unknown splitter type
00143         }
00144
00145         // fill the middle
00146         pDC->FillSolidRect(rect, afxData.clrBtnFace);
00147     }
00148
00149     else {
00150         CSplitterWnd::OnDrawSplitter(pDC, nType, rectArg);
00151     }
00152 }
00153
00154 void CCJFlatSplitterWnd::OnPaint()
00155 {
00156     if( m_bFlatSplitter )
00157     {
00158         ASSERT_VALID(this);
00159         CPaintDC dc(this);
00160
00161         CRect rectClient;
00162         GetClientRect(&rectClient);
00163
00164         CRect rectInside;
00165         GetInsideRect(rectInside);
00166         rectInside.InflateRect(4,4);
00167
00168         // draw the splitter boxes
00169         if (m_bHasVScroll && m_nRows < m_nMaxRows)
00170         {
00171             OnDrawSplitter(&dc, splitBox,
00172                 CRect(rectInside.right, rectClient.top,
00173                 rectClient.right, rectClient.top + m_cySplitter));
00174         }
00175
00176         if (m_bHasHScroll && m_nCols < m_nMaxCols)
00177         {
00178             OnDrawSplitter(&dc, splitBox,
00179                 CRect(rectClient.left, rectInside.bottom,
00180                 rectClient.left + m_cxSplitter, rectClient.bottom));
00181         }
00182
00183         // extend split bars to window border (past margins)
00184         DrawAllSplitBars(&dc, rectInside.right, rectInside.bottom);
00185
00186         // draw splitter intersections (inside only)
00187         GetInsideRect(rectInside);
00188         dc.IntersectClipRect(rectInside);
00189         CRect rect;
00190         rect.top = rectInside.top;
00191         for (int row = 0; row < m_nRows - 1; row++)
00192         {
00193             rect.top += m_pRowInfo[row].nCurSize + m_cyBorderShare;
00194             rect.bottom = rect.top + m_cySplitter;
00195             rect.left = rectInside.left;
00196             for (int col = 0; col < m_nCols - 1; col++)
00197             {
00198                 rect.left += m_pColInfo[col].nCurSize + m_cxBorderShare;
00199                 rect.right = rect.left + m_cxSplitter;
00200                 OnDrawSplitter(&dc, splitIntersection, rect);
00201                 rect.left = rect.right + m_cxBorderShare;
00202             }
00203             rect.top = rect.bottom + m_cxBorderShare;
00204         }
00205     }
00206     else {
00207         CSplitterWnd::OnPaint();
00208     }
00209 }
00210
00211 void CCJFlatSplitterWnd::HideRow(int nRowHide)
00212 {
00213     ASSERT_VALID( this );
00214     ASSERT( m_nRows > 1 );
00215     ASSERT( nRowHide < m_nRows );
00216     ASSERT( m_nHiddenRow == -1 );
00217     m_nHiddenRow = nRowHide;
00218
00219     int nActiveRow, nActiveCol;
00220
00221     // if the nRow has an active window -- change it
00222     if( GetActivePane( &nActiveRow, &nActiveCol ) != NULL )
00223     {
00224         if( nActiveRow == nRowHide )
00225         {
00226             if( ++nActiveRow >= m_nRows )
00227                 nActiveRow = 0;
00228             SetActivePane( nActiveRow, nActiveCol );
00229         }
00230     }
00231
00232     // hide all nRow panes.
00233     for( int nCol = 0; nCol < m_nCols; ++nCol )
00234     {
00235         CWnd* pPaneHide = GetPane( nRowHide, nCol );
00236         ASSERT( pPaneHide != NULL );
00237
00238         pPaneHide->ShowWindow( SW_HIDE );
00239         pPaneHide->SetDlgCtrlID( AFX_IDW_PANE_FIRST+nCol + 16*m_nRows );
00240
00241         for( int nRow = nRowHide+1; nRow < m_nRows; ++nRow )
00242         {
00243             CWnd* pPane = GetPane( nRow, nCol );
00244             ASSERT( pPane != NULL );
00245
00246             pPane->SetDlgCtrlID( IdFromRowCol( nRow-1, nCol ));
00247         }
00248     }
00249
00250     m_nRows--;
00251     m_pRowInfo[m_nRows].nCurSize = m_pRowInfo[nRowHide].nCurSize;
00252     RecalcLayout();
00253 }
00254
00255 void CCJFlatSplitterWnd::ShowRow()
00256 {
00257     ASSERT_VALID( this );
00258     ASSERT( m_nRows < m_nMaxRows );
00259     ASSERT( m_nHiddenRow != -1 );
00260
00261     int nShowRow = m_nHiddenRow;
00262     m_nHiddenRow = -1;
00263
00264     int cyNew = m_pRowInfo[m_nRows].nCurSize;
00265     m_nRows++;  // add a nRow
00266
00267     ASSERT( m_nRows == m_nMaxRows );
00268
00269     int nRow;
00270
00271     // Show the hidden nRow
00272     for( int nCol = 0; nCol < m_nCols; ++nCol )
00273     {
00274         CWnd* pPaneShow = GetDlgItem( AFX_IDW_PANE_FIRST+nCol + 16*m_nRows );
00275         ASSERT( pPaneShow != NULL );
00276         pPaneShow->ShowWindow( SW_SHOWNA );
00277
00278         for( nRow = m_nRows - 2; nRow >= nShowRow; --nRow )
00279         {
00280             CWnd* pPane = GetPane( nRow, nCol );
00281             ASSERT( pPane != NULL );
00282             pPane->SetDlgCtrlID( IdFromRowCol( nRow + 1, nCol ));
00283         }
00284
00285         pPaneShow->SetDlgCtrlID( IdFromRowCol( nShowRow, nCol ));
00286     }
00287
00288     // new panes have been created -- recalculate layout
00289     for( nRow = nShowRow+1; nRow < m_nRows; nRow++ )
00290         m_pRowInfo[nRow].nIdealSize = m_pRowInfo[nRow - 1].nCurSize;
00291
00292     m_pRowInfo[nShowRow].nIdealSize = cyNew;
00293     RecalcLayout();
00294 }
00295
00296 void CCJFlatSplitterWnd::HideColumn(int nColHide)
00297 {
00298     ASSERT_VALID( this );
00299     ASSERT( m_nCols > 1 );
00300     ASSERT( nColHide < m_nCols );
00301     ASSERT( m_nHiddenCol == -1 );
00302     m_nHiddenCol = nColHide;
00303
00304     // if the column has an active window -- change it
00305     int nActiveRow, nActiveCol;
00306     if( GetActivePane( &nActiveRow, &nActiveCol ) != NULL )
00307     {
00308         if( nActiveCol == nColHide )
00309         {
00310             if( ++nActiveCol >= m_nCols )
00311                 nActiveCol = 0;
00312             SetActivePane( nActiveRow, nActiveCol );
00313         }
00314     }
00315
00316     // hide all column panes
00317     for( int nRow = 0; nRow < m_nRows; nRow++)
00318     {
00319         CWnd* pPaneHide = GetPane(nRow, nColHide);
00320         ASSERT( pPaneHide != NULL );
00321
00322         pPaneHide->ShowWindow(SW_HIDE);
00323         pPaneHide->SetDlgCtrlID( AFX_IDW_PANE_FIRST+m_nCols + 16*nRow );
00324
00325         for( int nCol = nColHide + 1; nCol < m_nCols; nCol++ )
00326         {
00327             CWnd* pPane = GetPane( nRow, nCol );
00328             ASSERT( pPane != NULL );
00329
00330             pPane->SetDlgCtrlID( IdFromRowCol( nRow, nCol - 1 ));
00331         }
00332     }
00333
00334     m_nCols--;
00335     m_pColInfo[m_nCols].nCurSize = m_pColInfo[nColHide].nCurSize;
00336     RecalcLayout();
00337 }
00338
00339 void CCJFlatSplitterWnd::ShowColumn()
00340 {
00341     ASSERT_VALID( this );
00342     ASSERT( m_nCols < m_nMaxCols );
00343     ASSERT( m_nHiddenCol != -1 );
00344
00345     int nShowCol = m_nHiddenCol;
00346     m_nHiddenCol = -1;
00347
00348     int cxNew = m_pColInfo[m_nCols].nCurSize;
00349     m_nCols++;  // add a column
00350
00351     ASSERT( m_nCols == m_nMaxCols );
00352
00353     int nCol;
00354
00355     // Show the hidden column
00356     for( int nRow = 0; nRow < m_nRows; ++nRow )
00357     {
00358         CWnd* pPaneShow = GetDlgItem( AFX_IDW_PANE_FIRST+m_nCols + 16*nRow );
00359         ASSERT( pPaneShow != NULL );
00360         pPaneShow->ShowWindow( SW_SHOWNA );
00361
00362         for( nCol = m_nCols - 2; nCol >= nShowCol; --nCol )
00363         {
00364             CWnd* pPane = GetPane( nRow, nCol );
00365             ASSERT( pPane != NULL );
00366             pPane->SetDlgCtrlID( IdFromRowCol( nRow, nCol + 1 ));
00367         }
00368
00369         pPaneShow->SetDlgCtrlID( IdFromRowCol( nRow, nShowCol ));
00370     }
00371
00372     // new panes have been created -- recalculate layout
00373     for( nCol = nShowCol+1; nCol < m_nCols; nCol++ )
00374         m_pColInfo[nCol].nIdealSize = m_pColInfo[nCol - 1].nCurSize;
00375
00376     m_pColInfo[nShowCol].nIdealSize = cxNew;
00377     RecalcLayout();
00378 }
00379
00380 BOOL CCJFlatSplitterWnd::ReplaceView(int nRow, int nCol, CRuntimeClass *pViewClass)
00381 {
00382     CView *pView = DYNAMIC_DOWNCAST( CView, GetPane( nRow, nCol ));
00383     ASSERT_KINDOF( CView, pView );
00384
00385     if( pView->IsKindOf( pViewClass ))
00386         return FALSE;
00387
00388     // Get pointer to CDocument object so that it can be used in the creation
00389     // process of the new view
00390     CDocument *pDoc = pView->GetDocument();
00391
00392     int nID = pView->GetDlgCtrlID();
00393     int nWidth, nHeight, nMinWidth, nMinHeight;
00394
00395     GetRowInfo( nRow, nWidth, nMinWidth );
00396     GetColumnInfo( nCol, nHeight, nMinHeight );
00397
00398     // Delete existing view
00399     DeleteView(nRow, nCol);
00400
00401     // Create new view
00402     CCreateContext context;
00403     context.m_pCurrentDoc = pDoc;
00404     CreateView( nRow, nCol, pViewClass, CSize( nWidth, nHeight ), &context );
00405     pView = DYNAMIC_DOWNCAST( CView, GetPane( nRow, nCol ));
00406     ASSERT_KINDOF( CView, pView );
00407
00408     pView->SetDlgCtrlID( nID );
00409
00410     SetRowInfo( nRow, nWidth, nMinWidth );
00411     SetColumnInfo( nCol, nHeight, nMinHeight );
00412     RecalcLayout();
00413
00414     return TRUE;
00415 }
00416
00417 BOOL CCJFlatSplitterWnd::SwitchView(int nRow, int nCol, CView *pNewView)
00418 {
00419     CView *pOldView = DYNAMIC_DOWNCAST( CView, GetPane( nRow, nCol ));
00420     ASSERT_KINDOF( CView, pOldView );
00421
00422     if( pOldView == pNewView )
00423         return FALSE;
00424
00425     int nOldID, nNewID;
00426
00427     nOldID = pOldView->GetDlgCtrlID();
00428     nNewID = pNewView->GetDlgCtrlID();
00429
00430     pOldView->ShowWindow(SW_HIDE);
00431     pNewView->ShowWindow(SW_SHOW);
00432
00433     pOldView->SetDlgCtrlID(nNewID);
00434     pNewView->SetDlgCtrlID(nOldID);
00435
00436     RecalcLayout();
00437
00438     return TRUE;
00439 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TRtagHandler< tagType > Member List

This is the complete list of members for TRtagHandler< tagType >, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | TRtagHandler< tagType > | [inline, virtual]
OnFolder(const char *fullpath) | TRtagHandler< tagType > | [inline, virtual]
TRtagHandler() | TRtagHandler< tagType > | [inline]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:57:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoRecursiveModel Member List

This is the complete list of members for KoRecursiveModel, including all inherited members.

GetAt(const int pos) const | KoRecursiveModel | [inline, virtual]
GetColumn(const int type) const | KiColumnModel | [virtual]
GetCount() const | KoRecursiveModel | [inline, virtual]
GetRecursiveModel() | KiColumnModel | [static]
GetRegularModel() | KiColumnModel | [static]
GetType(const int pos) const | KoRecursiveModel | [inline, virtual]

Generated on Sat Aug 7 22:54:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TBrowserFillDummy Member List

This is the complete list of members for TBrowserFillDummy, including all inherited members.

EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TBrowserFillDummy | [inline, virtual]
EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TBrowserFillDummy | [private, virtual]
ExitDirectory(const char *fullpath) | TBrowserFillDummy | [inline, virtual]
ExitDirectory(const char *fullpath) | TBrowserFillDummy | [private, virtual]
GetItem() const | TBrowserFillDummy | [inline]
GetRefRunning() | TraversalReport | [static]
m_data | TBrowserFillDummy |
m_data | TBrowserFillDummy | [private]
m_dirname | TBrowserFillDummy |
m_empty | TBrowserFillDummy |
m_hascvs | TBrowserFillDummy |
m_item | TBrowserFillDummy |
m_item | TBrowserFillDummy | [private]
m_root | TBrowserFillDummy |
m_root | TBrowserFillDummy | [private]
m_treeCtrl | TBrowserFillDummy |
m_treeCtrl | TBrowserFillDummy | [private]
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TBrowserFillDummy | [inline, virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TBrowserFillDummy | [private, virtual]
OnError(const char *err, int errcode) | TBrowserFillDummy | [inline, virtual]
OnError(const char *err, int errcode) | TBrowserFillDummy | [private, virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnIdle(const char *fullpath) | TBrowserFillDummy | [inline, virtual]
OnIdle(const char *fullpath) | TBrowserFillDummy | [private, virtual]
TBrowserFillDummy(UCvsFolders *treeCtrl, UTREEITEM root, UTREEITEM item, EntnodeData *data) | TBrowserFillDummy | [inline]
TBrowserFillDummy(CTreeCtrl &treeCtrl, HTREEITEM root, HTREEITEM item, EntnodeData *data) | TBrowserFillDummy |
~TBrowserFillDummy() | TBrowserFillDummy | [inline, virtual]

Generated on Sat Aug 7 22:56:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMaskEdit Member List

This is the complete list of members for CCJMaskEdit, including all inherited members.

CCJMaskEdit() | CCJMaskEdit |
CheckChar(UINT nChar) | CCJMaskEdit | [virtual]
m_bMaskKeyInProgress | CCJMaskEdit |
m_bUseMask | CCJMaskEdit |
m_Font | CCJMaskEdit |
m_strLiteral | CCJMaskEdit |
m_strMask | CCJMaskEdit |
m_strMaskLiteral | CCJMaskEdit |
m_strValid | CCJMaskEdit |
m_strWindowText | CCJMaskEdit |
OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJMaskEdit | [protected]
OnEraseBkgnd(CDC *pDC) | CCJMaskEdit | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJMaskEdit | [protected]
OnPaint() | CCJMaskEdit | [protected]
ProcessMask(UINT nChar, int nEndPos) | CCJMaskEdit | [virtual]
SendChar(UINT nChar) | CCJMaskEdit | [virtual]
SetEditMask(LPCTSTR lpszMask, LPCTSTR lpszLiteral, LPCTSTR lpszWindowText) | CCJMaskEdit | [virtual]
UpdateFont() | CCJMaskEdit | [virtual]
~CCJMaskEdit() | CCJMaskEdit | [virtual]

Generated on Sat Aug 7 22:49:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/InitDlg.cpp Source File

common/InitDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- June 1999
00019  */
00020
00021 /*
00022  * InitDlg.cpp : the cvs init dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "wincvs_winutil.h"
00030 #endif /* WIN32 */
00031
00032 #include "InitDlg.h"
00033 #include "CvsPrefs.h"
00034 #include "CvsRootDlg.h"
00035
00036 #ifdef WIN32
00037 #   include "GetPrefs.h"
00038 #   include "PromptFiles.h"
00039 #   ifdef _DEBUG
00040 #   define new DEBUG_NEW
00041 #   undef THIS_FILE
00042     static char THIS_FILE[] = __FILE__;
00043 #   endif
00044
00046 // CInit_MAIN dialog
00047
00048 CInit_MAIN::CInit_MAIN(bool forceRoot, const char* cvsroot)
00049     : CHHelpPropertyPage(CInit_MAIN::IDD)
00050 {
00051     m_forceRoot = forceRoot;
00052     m_cvsroot = cvsroot;
00053
00054     m_cvsrootCombo.SetItems(&gOldCvsroots);
00055
00056     m_helpinit = _T("If the CVSROOT is set to ""local"", "
00057         "the CVSROOT should be a Windows path (i.e. c:\\cvsroot). "
00058         "If the CVSROOT points on a remote machine, the path should be a Unix path "
00059         "(i.e. /fscvs/cvsroot : make sure you got the relevant security rights in "
00060         "order to create such a directory on the remote machine.");
00061 }
00062
00063 void CInit_MAIN::DoDataExchange(CDataExchange* pDX)
00064 {
00065     CHHelpPropertyPage::DoDataExchange(pDX);
00066     //{{AFX_DATA_MAP(CInit_MAIN)
00067     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00068     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00069     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00070     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00071     DDX_Text(pDX, IDC_HELP_INIT, m_helpinit);
00072     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00073     //}}AFX_DATA_MAP
00074
00075     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00076
00077     if( m_forceRoot )
00078     {
00079         DDV_MinChars(pDX, m_cvsroot, 1);
00080     }
00081
00082     if( !pDX->m_bSaveAndValidate )
00083     {
00084         m_selCvsrootButton.EnableWindow(m_forceRoot);
00085     }
00086 }
00087
00088 BEGIN_MESSAGE_MAP(CInit_MAIN, CHHelpPropertyPage)
00089     //{{AFX_MSG_MAP(CInit_MAIN)
00090     ON_BN_CLICKED(IDC_FORCE_CVSROOT, OnForceroot)
00091     ON_BN_CLICKED(IDC_BROWSE_CVSROOT, OnSelcvsroot)
00092     //}}AFX_MSG_MAP
00093 END_MESSAGE_MAP()
00094
00095 IMPLEMENT_DYNAMIC(CInit_MAIN, CHHelpPropertyPage)
00096
00098 // CInit_MAIN message handlers
00099
00101 BOOL CInit_MAIN::OnInitDialog()
00102 {
00103     CHHelpPropertyPage::OnInitDialog();
00104
00105     // Extra initialization
00106     OnForceroot();
00107     PostGotoDlgCtrl(this, m_forceRoot ? (CWnd*)&m_cvsrootCombo : (CWnd*)&m_forceRootCheck);
00108
00109     return TRUE;  // return TRUE unless you set the focus to a control
00110                   // EXCEPTION: OCX Property Pages should return FALSE
00111 }
00112
00113 void CInit_MAIN::InitHelpID()
00114 {
00115     SetCtrlHelpID(IDC_HELP_INIT,        IDH_IDC_HELP_INIT);
00116     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
00117     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
00118     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
00119 }
00120
00122 void CInit_MAIN::OnForceroot()
00123 {
00124     const BOOL enable = m_forceRootCheck.GetCheck();
00125
00126     m_selCvsrootButton.EnableWindow(enable);
00127     m_cvsrootCombo.EnableWindow(enable);
00128 }
00129
00131 void CInit_MAIN::OnSelcvsroot()
00132 {
00133     CString strCvsroot;
00134     m_cvsrootCombo.GetWindowText(strCvsroot);
00135
00136     CStr cvsroot(strCvsroot);
00137     if( CompatGetCvsRoot(cvsroot) )
00138     {
00139         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00140     }
00141 }
00142
00143 #endif
00144
00146 bool CompatGetInit(bool& forceCvsroot, CStr& cvsroot)
00147 {
00148     bool userHitOK = false;
00149
00150     static bool lastForceCvsroot = true;
00151     static CStr sLastCvsroot("");
00152
00153 #ifdef WIN32
00154     CHHelpPropertySheet pages("Init settings");
00155     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00156
00157     CInit_MAIN page1(lastForceCvsroot, sLastCvsroot);
00158     CGetPrefs_GLOBALS page2;
00159
00160     pages.AddPage(&page1);
00161     pages.AddPage(&page2);
00162
00163     if(pages.DoModal() == IDOK)
00164     {
00165         lastForceCvsroot = page1.m_forceRoot == TRUE;
00166         sLastCvsroot = page1.m_cvsroot;
00167
00168         page2.StoreValues();
00169
00170         userHitOK = true;
00171     }
00172 #endif /* WIN32 */
00173
00174     if( userHitOK )
00175     {
00176         forceCvsroot = lastForceCvsroot;
00177         cvsroot = sLastCvsroot;
00178
00179         gCvsPrefs.save();
00180     }
00181
00182     return userHitOK;
00183 }
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacMisc.h Source File

common/MacMisc.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * MacMisc.cpp --- misc. utilities for mac
00023  */
00024
00025 #ifndef MACMISC_H
00026 #define MACMISC_H
00027
00028 #include "TextBinary.h"
00029 #include "ustr.h"
00030 #include <Dialogs.h>
00031
00032 Handle GetDItemHdl(DialogPtr dlg, SInt16 Id);
00033 ControlHandle GetDItemCtrlHdl(DialogPtr dlg, SInt16 Id);
00034 SInt16 GetDItemMenuSel(DialogPtr dlg, SInt16 Id);
00035 void SetDItemMenuSel(DialogPtr dlg, SInt16 Id, SInt16 sel);
00036
00037 OSErr MacGetSpecialFolder(UFSSpec & theFolder, UStr & thePath, OSType inType,
00038     const char* inDesc, bool createFolder = false);
00039 OSErr MacGetTempFolder(UFSSpec & theFolder, UStr & thePath);
00040 OSErr MacGetPrefsFolder(UFSSpec & theFolder, UStr & thePath);
00041
00042 UStr ConvertString(const char* inStringToConvert, CFStringEncoding inInputEncoding, CFStringEncoding inOutputEncoding, bool allowLossyConversion=false);
00043 UStr SysEncoding_to_UTF8(const char* sysEncodedString, bool allowLossyConversion=false);
00044 UStr UTF8_to_SysEncoding(const char* utf8EncodedString, bool allowLossyConversion=false);
00045 UStr LString_to_UTF8(const LString& inString, bool allowLossyConversion=false);
00046 LStr255 UTF8_to_LString(const char* inString, bool allowLossyConversion=false);
00047 UStr CFString_to_UStr(CFStringRef inStringToConvert, CFStringEncoding inRequestedEncoding, bool *outConversionSuccessful=NULL);
00048
00049 #endif /* MACMISC_H */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CProtocolParserConsole Member List

This is the complete list of members for CProtocolParserConsole, including all inherited members.

CCvsRootConsole() | CCvsRootConsole |
CProtocolParserConsole() | CProtocolParserConsole |
cvs_err(const char *txt, long len) | CCvsRootConsole | [virtual]
cvs_out(const char *txt, long len) | CCvsRootConsole | [virtual]
GetCvsErr() | CCvsRootConsole |
GetKeywordList() const | CProtocolParserConsole |
GetLaunchRes() const | CCvsRootConsole |
m_cvsErr | CCvsRootConsole | [protected]
m_cvsOut | CCvsRootConsole | [protected]
m_keywordList | CProtocolParserConsole | [private]
m_launchRes | CCvsRootConsole | [protected]
Parse(int launchRes) | CProtocolParserConsole | [virtual]
~CCvsRootConsole() | CCvsRootConsole | [virtual]
~CProtocolParserConsole() | CProtocolParserConsole | [virtual]

Generated on Sat Aug 7 22:55:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TbEntrySeparator Member List

This is the complete list of members for TbEntrySeparator, including all inherited members.

kind | TbEntry |
TbEntry(tbeKind k) | TbEntry | [inline]
TbEntrySeparator() | TbEntrySeparator | [inline]
~TbEntry() | TbEntry | [inline, virtual]
~TbEntrySeparator() | TbEntrySeparator | [inline, virtual]

Generated on Sat Aug 7 22:56:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LogParse.h Source File

common/LogParse.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * LogParse.h : parse the cvs log output
00023  */
00024
00025 #if !defined(AFX_LOGPARSE_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_LOGPARSE_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #   pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 class CvsArgs;
00033 class CLogNode;
00034 class CColorConsole;
00035
00036 void CvsLogParse(const char* dir, const CvsArgs& args, const bool outGraph = false, void* defWnd = 0L);
00037 void CvsLogOutput(CColorConsole& out, CLogNode* node);
00038
00039 #ifdef qMacCvsPP
00040   #include "Persistent.h"
00041   enum {
00042     kMsgEncodingUTF8 = 1,
00043     kMsgEncodingMacOSRoman,
00044     kMsgEncodingISO8859
00045   };
00046   extern CPersistentInt    sCommitMsgEncoding;
00047 #endif
00048
00049 #endif // !defined(AFX_LOGPARSE_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSubclassWnd Member List

This is the complete list of members for CSubclassWnd, including all inherited members.

CSubclassWnd() | CSubclassWnd |
DECLARE_DYNAMIC(CSubclassWnd) | CSubclassWnd |
Default() | CSubclassWnd | [protected, virtual]
HookWindow(HWND hwnd) | CSubclassWnd | [virtual]
HookWindow(CWnd *pWnd) | CSubclassWnd | [inline, virtual]
HookWndProc(HWND, UINT, WPARAM, LPARAM) | CSubclassWnd | [friend]
IsHooked() | CSubclassWnd | [inline, virtual]
m_hWnd | CSubclassWnd | [protected]
m_pNext | CSubclassWnd | [protected]
m_pOldWndProc | CSubclassWnd | [protected]
WindowProc(UINT msg, WPARAM wp, LPARAM lp) | CSubclassWnd | [protected, virtual]
~CSubclassWnd() | CSubclassWnd |

Generated on Sat Aug 7 22:56:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CScrollView Member List

This is the complete list of members for CScrollView, including all inherited members.

GetDeviceScrollPosition() | CScrollView | [inline]
InvalidateRect(const URECT *r) | CScrollView | [inline]

Generated on Sat Aug 7 22:56:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CFindSettings Member List

This is the complete list of members for CFindSettings, including all inherited members.

CFindSettings(const char *findPath) | CFindSettings | [inline]
CFindSettings(std::map< UStr, UStr > &list) | CFindSettings | [inline]
EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TraversalReport | [virtual]
ExitDirectory(const char *fullpath) | TraversalReport | [virtual]
GetRefRunning() | TraversalReport | [static]
m_foundIt | CFindSettings |
m_list | CFindSettings |
m_pathToFind | CFindSettings |
m_settingsFile | CFindSettings |
m_topfolder | CFindSettings |
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnError(const char *err, int errcode) | CFindSettings | [inline, virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | CFindSettings | [virtual]
OnIdle(const char *fullpath) | TraversalReport | [virtual]
searchAllPath(const char *token, const char *value, void *data) | CFindSettings | [static]
searchPath(const char *token, const char *value, void *data) | CFindSettings | [static]
~CFindSettings() | CFindSettings | [inline, virtual]

Generated on Sat Aug 7 22:52:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsMenubar.h Source File

common/UCvsMenubar.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSMENU_H
00026 #define UCVSMENU_H
00027
00028 #include "umenu.h"
00029
00030 class UCvsMenubar : public UMenu
00031 {
00032     UDECLARE_DYNAMIC(UCvsMenubar)
00033 public:
00034     UCvsMenubar();
00035     virtual ~UCvsMenubar();
00036
00037 protected:
00038
00039     ev_msg void OnDestroy();
00040     ev_msg void OnCreate();
00041     //ev_msg void GetMenu();
00042
00043     UDECLARE_MESSAGE_MAP()
00044 };
00045
00046 void CreateMainMenubar(int widid);
00047
00048 #endif
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMetaFileButton.cpp Source File

WinCvs/CJLib/CJLibrary/CJMetaFileButton.cpp

Go to the documentation of this file.
00001 // CJMetaFileButton.cpp : implementation file
00002 //
00003 // Copyright © 1999 Ian Brumby
00004 //
00005 // This source code may be used in compiled form in any way you desire.
00006 // Source file(s) may be redistributed unmodified by any means PROVIDING
00007 // they are not sold for profit without the authors expressed written consent,
00008 // and providing that this notice and the authors name and all copyright
00009 // notices remain intact.
00010 //
00011 // ==========================================================================
00012 // HISTORY:
00013 // ==========================================================================
00014 //          1.20    21 Apr 1999 - Initial release.
00015 // ==========================================================================
00017 /****************************************************************************
00018  *
00019  * $Date: 1999/11/30 21:45:49 $
00020  * $Revision: 1.1.1.2 $
00021  * $Archive: /CodeJock/CJLibrary/CJMetaFileButton.cpp $
00022  *
00023  * $History: CJMetaFileButton.cpp $
00024  *
00025  * *****************  Version 6  *****************
00026  * User: Kirk Stowell Date: 10/31/99   Time: 11:04p
00027  * Updated in $/CodeJock/CJLibrary
00028  * Overrode OnEraseBkgnd(...) and OnPaint() for flicker free drawing.
00029  *
00030  * *****************  Version 5  *****************
00031  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00032  * Updated in $/CodeJock/CJLibrary
00033  * Modified resource include for static builds.
00034  *
00035  * *****************  Version 4  *****************
00036  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00037  * Updated in $/CodeJock/CJLibrary
00038  * Fixed potential resource and memory leak problems.
00039  *
00040  * *****************  Version 3  *****************
00041  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00042  * Updated in $/CodeJock/CJLibrary
00043  * Added source control history to file header.
00044  *
00045  ***************************************************************************/
00047
00048 #include "stdafx.h"
00049 #include "CJResource.h"
00050 #include "CJMetaFileButton.h"
00051
00052 #ifdef _DEBUG
00053 #define new DEBUG_NEW
00054 #undef THIS_FILE
00055 static char THIS_FILE[] = __FILE__;
00056 #endif
00057
00059 // CCJMetaFileButton
00060
00061 CCJMetaFileButton::CCJMetaFileButton()
00062 {
00063 }
00064
00065 CCJMetaFileButton::~CCJMetaFileButton()
00066 {
00067 }
00068
00069 void CCJMetaFileButton::SetMetaFiles(HENHMETAFILE hMetaFile,
00070     HENHMETAFILE hMetaFileSel, HENHMETAFILE hMetaFileFocus, HENHMETAFILE hMetaFileDisabled)
00071 {
00072     m_hEnhMetaFile         = hMetaFile;
00073     m_hEnhMetaFileSel      = hMetaFileSel;
00074     m_hEnhMetaFileFocus    = hMetaFileFocus;
00075     m_hEnhMetaFileDisabled = hMetaFileDisabled;
00076 }
00077
00078
00079 BEGIN_MESSAGE_MAP(CCJMetaFileButton, CButton)
00080     //{{AFX_MSG_MAP(CCJMetaFileButton)
00081     ON_WM_LBUTTONDBLCLK()
00082     ON_WM_ERASEBKGND()
00083     ON_WM_PAINT()
00084     //}}AFX_MSG_MAP
00085 END_MESSAGE_MAP()
00086
00088 // CCJMetaFileButton message handlers
00089
00090 void CCJMetaFileButton::OnLButtonDblClk(UINT nFlags, CPoint point)
00091 {
00092     // Fix for the double click problem with owner drawn buttons
00093     POINT pt;
00094     ::GetCursorPos(&pt);
00095     ::MapWindowPoints(NULL, (HWND)(m_hWnd), &pt, 1);
00096     ::SendMessage((HWND)(m_hWnd), WM_LBUTTONDOWN, 0, MAKELPARAM(pt.x, pt.y));
00097     CButton::OnLButtonDblClk(nFlags, point);
00098 }
00099
00100 void CCJMetaFileButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00101 {
00102     ASSERT(lpDrawItemStruct != NULL);
00103
00104     // define some temporary variables.
00105     CDC*  pDC    = CDC::FromHandle( lpDrawItemStruct->hDC );
00106     CRect rcItem = lpDrawItemStruct->rcItem;
00107     int   nState = lpDrawItemStruct->itemState;
00108
00109     // Paint the background.
00110     pDC->FillSolidRect(rcItem, ::GetSysColor(COLOR_3DFACE));
00111
00112     // draw 3D button outline
00113     CPen penOutline(PS_SOLID, 1, GetSysColor(COLOR_BTNTEXT));
00114     CPen penLight(PS_SOLID, 1, GetSysColor(COLOR_BTNHIGHLIGHT));
00115     CPen penDark(PS_SOLID, 1, GetSysColor(COLOR_BTNSHADOW));
00116     CPen* pOldPen = NULL;
00117
00118     if (nState & ODS_SELECTED)
00119     {
00120         pOldPen = pDC->SelectObject(&penDark);
00121         pDC->MoveTo(0, rcItem.bottom - 1);
00122         pDC->LineTo(0, 1);
00123         pDC->LineTo(rcItem.right - 1, 1);
00124     }
00125     else
00126     {
00127         pOldPen = pDC->SelectObject(&penLight);
00128         pDC->MoveTo(0, rcItem.bottom - 2);
00129         pDC->LineTo(0, 1);
00130         pDC->LineTo(rcItem.right - 2, 1);
00131         pDC->SelectObject(&penDark);
00132         pDC->MoveTo(0, rcItem.bottom - 1);
00133         pDC->LineTo(rcItem.right - 2, rcItem.bottom - 1);
00134         pDC->LineTo(rcItem.right - 2, 0);
00135         pDC->MoveTo(1, rcItem.bottom - 2);
00136         pDC->LineTo(rcItem.right - 3, rcItem.bottom - 2);
00137         pDC->LineTo(rcItem.right - 3, 1);
00138     }
00139     pDC->SelectObject(&penOutline);
00140     pDC->MoveTo(0, 0);
00141     pDC->LineTo(rcItem.right - 1, 0);
00142     pDC->LineTo(rcItem.right - 1, rcItem.bottom);
00143
00144     HENHMETAFILE hMetaFile = m_hEnhMetaFile;
00145     if ((nState & ODS_SELECTED) && m_hEnhMetaFileSel != NULL)
00146         hMetaFile = m_hEnhMetaFileSel;
00147     else if ((nState & ODS_FOCUS) && m_hEnhMetaFileFocus != NULL)
00148         hMetaFile = m_hEnhMetaFileFocus;   // third image for focused
00149     else if ((nState & ODS_DISABLED) && m_hEnhMetaFileDisabled != NULL)
00150         hMetaFile = m_hEnhMetaFileDisabled;   // last image for disabled
00151
00152     ASSERT(hMetaFile != NULL);
00153
00154     CRect rcBounds(5,4,0,0);
00155     int iButtonHeight = rcItem.Height();
00156     if (iButtonHeight > 15)
00157         iButtonHeight = 15;
00158     else if (iButtonHeight < 11)
00159         iButtonHeight = 11;
00160     int iArrowWidth = (iButtonHeight / 2) - 3;
00161     rcBounds.right = rcBounds.left + iArrowWidth - 1;
00162     rcBounds.bottom = rcBounds.top + (iArrowWidth * 2) - 2;
00163
00164     if (nState & ODS_SELECTED)
00165         rcBounds += CPoint(1, 1);
00166     pDC->PlayMetaFile(hMetaFile, rcBounds);
00167
00168     // fix potential resource leak - KStowell - 10-21-99
00169     pDC->SelectObject(pOldPen);
00170     penOutline.DeleteObject();
00171     penLight.DeleteObject();
00172     penDark.DeleteObject();
00173 }
00174
00175 BOOL CCJMetaFileButton::OnEraseBkgnd(CDC* pDC)
00176 {
00177     // KStowell - overridden for flicker-free drawing.
00178     UNUSED_ALWAYS(pDC);
00179     return TRUE;
00180 }
00181
00182 void CCJMetaFileButton::OnPaint()
00183 {
00184     CPaintDC dc(this); // device context for painting
00185
00186     // KStowell - Get the client rect.
00187     CRect rcClient, rcClip;
00188     dc.GetClipBox( &rcClip );
00189     GetClientRect( &rcClient );
00190
00191     // KStowell - Create a memory device-context. This is done to help reduce
00192     // screen flicker, since we will paint the entire control to the
00193     // off screen device context first.
00194     CDC memDC;
00195     CBitmap bitmap;
00196     memDC.CreateCompatibleDC(&dc);
00197     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00198     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00199
00200     // KStowell - Repaint the background.
00201     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00202
00203     // let the control do its default drawing.
00204     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00205
00206     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00207     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00208         rcClip.left, rcClip.top, SRCCOPY );
00209
00210     // KStowell - Cleanup resources.
00211     memDC.SelectObject(pOldBitmap);
00212     memDC.DeleteDC();
00213     bitmap.DeleteObject();
00214 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsRootDlg.h Source File

common/CvsRootDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- March 2004
00019  */
00020
00021 #if !defined(AFX_CVSROOTDLG_H__E7B87F15_691C_407E_AFAE_910BE8E98A0A__INCLUDED_)
00022 #define AFX_CVSROOTDLG_H__E7B87F15_691C_407E_AFAE_910BE8E98A0A__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // CvsRootDlg.h : header file
00028 //
00029
00030 #include "AppGlue.h"
00031 #include "SmartComboBox.h"
00032
00033 #ifdef WIN32
00034 #   include "HHelpSupport.h"
00035 #endif
00036
00037 #include <string>
00038 #include <sstream>
00039 #include <set>
00040 #include <list>
00041 #include <map>
00042 #include <algorithm>
00043
00044 using namespace std;
00045
00046 bool CompatGetCvsRoot(CStr& cvsRoot);
00047
00049 typedef enum
00050 {
00051     kInfoCmd,
00052     kProtocolCmd
00053 } kInfoCmdType;
00054
00056 typedef std::map<string, string> CvsProtocolList;
00057
00059 typedef struct
00060 {
00061     string m_keyword;
00062     string m_description;
00063 } KeywordInfo;
00064
00066 typedef std::vector<KeywordInfo> KeywordList;
00067
00069 class CCvsRootConsole : public CCvsConsole
00070 {
00071 public:
00072     // Construction
00073     CCvsRootConsole();
00074     virtual ~CCvsRootConsole();
00075
00076     // Interface
00077     virtual long cvs_out(const char* txt, long len);
00078     virtual long cvs_err(const char* txt, long len);
00079     virtual void Parse(int launchRes) = 0L;
00080
00081 protected:
00082     // Data members
00083     stringstream m_cvsOut;
00084     stringstream m_cvsErr;
00085     int m_launchRes;
00087 public:
00088     int GetLaunchRes() const;
00089     stringstream& GetCvsErr();
00090 };
00091
00093 class CInfoParserConsole : public CCvsRootConsole
00094 {
00095 public:
00096     // Construction
00097     CInfoParserConsole();
00098     virtual ~CInfoParserConsole();
00099
00100 private:
00101     // Data members
00102     CvsProtocolList m_cvsProtocolList;
00104 public:
00105     // Interface
00106     virtual void Parse(int launchRes);
00107
00108     const CvsProtocolList& GetCvsProtocolList() const;
00109 };
00110
00112 class CProtocolParserConsole : public CCvsRootConsole
00113 {
00114 public:
00115     // Construction
00116     CProtocolParserConsole();
00117     virtual ~CProtocolParserConsole();
00118
00119 private:
00120     // Data members
00121     KeywordList m_keywordList;
00123 public:
00124     // Interface
00125     virtual void Parse(int launchRes);
00126
00127     const KeywordList& GetKeywordList() const;
00128 };
00129
00131 class CCvsRootParser
00132 {
00133 private:
00134     // Data members
00135     string m_protocol;
00136     string m_path;
00137     CvsProtocolList m_cvsProtocolList;
00139     // Methods
00140     bool SplitCvsRoot(const char* cvsRoot, string& protocol, string& keywords, string& path) const;
00141     int NormalizeCvsRoot(string& strCvsRoot, const char tokenSeparator) const;
00142
00143 public:
00144     // Interface
00145     bool Parse(const char* cvsRoot, const bool clearData = true);
00146     void Clear();
00147
00148     bool IsEmpty() const;
00149
00150     const string& GetProtocol() const;
00151     const string& GetPath() const;
00152     const CvsProtocolList& GetCvsProtocolList() const;
00153 };
00154
00156 typedef enum
00157 {
00158     kCvsRootDisplayWait,
00159     kCvsRootDisplayData,
00160     kCvsRootDisplayInfo
00161 } kCvsRootDisplayType;
00162
00164 class KeywordDisplayInfo
00165 {
00166 private:
00167     // Data members
00168     string m_name;
00169     string m_value;
00171     KeywordInfo m_rowInfo;
00173 public:
00174     // Interface
00175     void Create(const KeywordInfo& rowInfo);
00176
00177     const string& GetName() const;
00178
00179     const string& GetValue() const;
00180     void SetValue(const char* value);
00181
00182     const KeywordInfo& GetRowInfo() const;
00183 };
00184
00186 typedef std::vector<const KeywordDisplayInfo*> KeywordDisplayInfoList;
00187
00188 #ifdef WIN32
00189
00191 // CCvsRootDlg dialog
00192
00193 class CCvsRootDlg : public CHHelpDialog
00194 {
00195 // Construction
00196 public:
00197     CCvsRootDlg(const char* cvsRoot, CWnd* pParent = NULL);   // standard constructor
00198
00199 // Dialog Data
00200     //{{AFX_DATA(CCvsRootDlg)
00201     enum { IDD = IDD_CVSROOT };
00202     CSmartComboBox  m_repositoryPathCombo;
00203     CEdit   m_cvsrootStatic;
00204     CStatic m_keywordDescStatic;
00205     CButton m_okButton;
00206     CButton m_cancelButton;
00207     CStatic m_protocolDescStatic;
00208     CButton m_clearButton;
00209     CButton m_editButton;
00210     CListCtrl   m_keywordList;
00211     CSmartComboBox  m_protocolCombo;
00212     CString m_protocol;
00213     CString m_cvsroot;
00214     CString m_repositoryPath;
00215     //}}AFX_DATA
00216
00217
00218 // Overrides
00219     // ClassWizard generated virtual function overrides
00220     //{{AFX_VIRTUAL(CCvsRootDlg)
00221     protected:
00222     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00223     //}}AFX_VIRTUAL
00224
00225 // Implementation
00226 protected:
00227
00228     // Generated message map functions
00229     //{{AFX_MSG(CCvsRootDlg)
00230     virtual BOOL OnInitDialog();
00231     virtual void OnCancel();
00232     afx_msg void OnDblclkKeywordlist(NMHDR* pNMHDR, LRESULT* pResult);
00233     afx_msg void OnItemchangedKeywordlist(NMHDR* pNMHDR, LRESULT* pResult);
00234     afx_msg void OnDestroy();
00235     afx_msg void OnSelchangeProtocol();
00236     afx_msg void OnEdit();
00237     afx_msg void OnClear();
00238     afx_msg void OnEditchangePath();
00239     afx_msg void OnSelchangePath();
00240     afx_msg void OnHelp();
00241     //}}AFX_MSG
00242     afx_msg void OnReadProtocols();
00243     DECLARE_MESSAGE_MAP()
00244 private:
00245     // Data members
00246     bool m_cvsStopped;
00247     CCvsRootParser m_cvsRootParser;
00249     // Methods
00250     virtual void InitHelpID();
00251
00252     void InitListCtrl(const kCvsRootDisplayType displayType);
00253     void EnableControls(BOOL enable);
00254
00255     void EnableEditControls(const KeywordDisplayInfo* displayInfo);
00256
00257     BOOL PostReadProtocolsMsg();
00258
00259     void ReadAvailableProtocols();
00260     void ReadProtocolDetails();
00261     void ShowProtocolDescription();
00262
00263     void FillProtocolsComboBox(CInfoParserConsole& infoParserConsole);
00264     void DisplayKeywords(CProtocolParserConsole& protocolParserConsole);
00265     void UpdateKeywords(const CvsProtocolList& protocolList);
00266
00267     void DeleteAllItems();
00268
00269     void UpdateCvsRoot();
00270 };
00271
00273 // CEditKeywordDlg dialog
00274
00275 class CEditKeywordDlg : public CHHelpDialog
00276 {
00277 // Construction
00278 public:
00279     CEditKeywordDlg(const char* description, const char* keyword, const char* value,
00280         CWnd* pParent = NULL);   // standard constructor
00281
00282 // Dialog Data
00283     //{{AFX_DATA(CEditKeywordDlg)
00284     enum { IDD = IDD_EDITKEYWORD };
00285     CSmartComboBox  m_valueCombo;
00286     CString m_description;
00287     CString m_keyword;
00288     CString m_value;
00289     //}}AFX_DATA
00290
00291
00292 // Overrides
00293     // ClassWizard generated virtual function overrides
00294     //{{AFX_VIRTUAL(CEditKeywordDlg)
00295     protected:
00296     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00297     //}}AFX_VIRTUAL
00298
00299 // Implementation
00300 protected:
00301
00302     // Generated message map functions
00303     //{{AFX_MSG(CEditKeywordDlg)
00304     afx_msg void OnHelp();
00305     //}}AFX_MSG
00306     DECLARE_MESSAGE_MAP()
00307 private:
00308     // Methods
00309     virtual void InitHelpID();
00310 };
00311 //{{AFX_INSERT_LOCATION}}
00312 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00313 #endif // WIN32
00314
00315 #endif // !defined(AFX_CVSROOTDLG_H__E7B87F15_691C_407E_AFAE_910BE8E98A0A__INCLUDED_)
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPoint Member List

This is the complete list of members for UPoint, including all inherited members.

Offset(int xOffset, int yOffset) | UPoint | [inline]
Offset(UPOINT point) | UPoint | [inline]
Offset(USIZE size) | UPoint | [inline]
operator!=(UPOINT point) const | UPoint | [inline]
operator+(USIZE size) const | UPoint | [inline]
operator+(UPOINT point) const | UPoint | [inline]
operator+(const URECT *lpRect) const | UPoint | [inline]
operator+=(USIZE size) | UPoint | [inline]
operator+=(UPOINT point) | UPoint | [inline]
operator-(USIZE size) const | UPoint | [inline]
operator-() const | UPoint | [inline]
operator-(UPOINT point) const | UPoint | [inline]
operator-(const URECT *lpRect) const | UPoint | [inline]
operator-=(USIZE size) | UPoint | [inline]
operator-=(UPOINT point) | UPoint | [inline]
operator==(UPOINT point) const | UPoint | [inline]
UPoint() | UPoint | [inline]
UPoint(int initX, int initY) | UPoint | [inline]
UPoint(UPOINT initPt) | UPoint | [inline]
UPoint(USIZE initSize) | UPoint | [inline]
x | UPOINT |
y | UPOINT |

Generated on Sat Aug 7 22:55:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJWindowPlacement.cpp Source File

WinCvs/CJLib/CJLibrary/CJWindowPlacement.cpp

Go to the documentation of this file.
00001 // CJWindowPlacement.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJWindowPlacement.cpp $
00011  *
00012  * $History: CJWindowPlacement.cpp $
00013  *
00014  * *****************  Version 7  *****************
00015  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Modified resource include for static builds.
00018  *
00019  * *****************  Version 6  *****************
00020  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00021  * Updated in $/CodeJockey/CJLibrary
00022  * Updated copyright and contact information.
00023  *
00024  * *****************  Version 5  *****************
00025  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00026  * Updated in $/CodeJockey/CJLibrary
00027  * Added Unicode compliance, thanks to Barry Burton for his help with
00028  * this.
00029  *
00030  *
00031  * *****************  Version 4  *****************
00032  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00033  * Updated in $/CodeJockey/CJLibrary
00034  *
00035  * *****************  Version 3  *****************
00036  * User: Kirk Stowell Date: 6/11/99    Time: 10:15p
00037  * Updated in $/CodeJockey/CJ60Lib
00038  * Modified LoadWindowPos(...) to allow registry names to be directly
00039  * passed in.
00040  *
00041  * *****************  Version 2  *****************
00042  * User: Kirk Stowell Date: 6/11/99    Time: 9:41p
00043  * Updated in $/CodeJockey/CJ60Lib
00044  * Initial creation.
00045  *
00046  * *****************  Version 1  *****************
00047  * User: Kirk Stowell Date: 6/01/99    Time: 9:29p
00048  * Created in $/CodeJockey/CJ60Lib
00049  *
00050  ***************************************************************************/
00052
00053 #include "StdAfx.h"
00054 #include "CJResource.h"
00055 #include "CJWindowPlacement.h"
00056
00058 // CCJWindowPlacement
00059
00060 CCJWindowPlacement::CCJWindowPlacement()
00061 {
00062     length                  = sizeof( WINDOWPLACEMENT );
00063     flags                   = NULL;
00064     showCmd                 = SW_SHOWMAXIMIZED;
00065     ptMinPosition.x         = 0;
00066     ptMinPosition.y         = 0;
00067     ptMaxPosition.x         = 0;
00068     ptMaxPosition.y         = 0;
00069     rcNormalPosition.left   = 0;
00070     rcNormalPosition.top    = 0;
00071     rcNormalPosition.right  = 0;
00072     rcNormalPosition.bottom = 0;
00073 }
00074
00075 CCJWindowPlacement::~CCJWindowPlacement()
00076 {
00077 }
00078
00080
00081 void CCJWindowPlacement::SaveWindowPos(CFrameWnd *pFrameWnd)
00082 {
00083     ASSERT_VALID( pFrameWnd ); // must be valid.
00084
00085     // Get the current window position.
00086     pFrameWnd->GetWindowPlacement( this );
00087
00088     // Save position to registry.
00089     CString strBuffer;
00090     strBuffer.Format( m_strFormat,
00091         flags,
00092         showCmd,
00093         ptMinPosition.x,
00094         ptMinPosition.y,
00095         ptMaxPosition.x,
00096         ptMaxPosition.y,
00097         rcNormalPosition.left,
00098         rcNormalPosition.top,
00099         rcNormalPosition.right,
00100         rcNormalPosition.bottom);
00101
00102     AfxGetApp()->WriteProfileString( m_strSection, m_strWndPos, strBuffer );
00103 }
00104
00105 BOOL CCJWindowPlacement::LoadWindowPos( CFrameWnd* pFrameWnd, LPCTSTR lpszFormat/*=NULL*/, LPCTSTR lpszSection/*=NULL*/, LPCTSTR lpszWndPos/*=NULL*/ )
00106 {
00107     ASSERT_VALID( pFrameWnd ); // must be valid.
00108
00109     // load the strings for the registry.
00110     if( lpszFormat == NULL )
00111         m_strFormat.LoadString( IDS_WIN_PLACEMENT );
00112     else
00113         m_strFormat = lpszFormat;
00114
00115     if( lpszSection == NULL )
00116         m_strSection.LoadString( IDS_SETTINGS );
00117     else
00118         m_strSection = lpszSection;
00119
00120     if( lpszWndPos == NULL )
00121         m_strWndPos.LoadString( IDS_WNDPOS  );
00122     else
00123         m_strWndPos = lpszWndPos;
00124
00125     // Load the previous window placement settings.
00126     CString strBuffer = AfxGetApp()->GetProfileString( m_strSection, m_strWndPos, NULL );
00127
00128     int nRead = _stscanf( strBuffer, m_strFormat,
00129         &flags,
00130         &showCmd,
00131         &ptMinPosition.x,
00132         &ptMinPosition.y,
00133         &ptMaxPosition.x,
00134         &ptMaxPosition.y,
00135         &rcNormalPosition.left,
00136         &rcNormalPosition.top,
00137         &rcNormalPosition.right,
00138         &rcNormalPosition.bottom);
00139
00140     // Set the window position.
00141     if( nRead == 10 )
00142     {
00143         pFrameWnd->SetWindowPlacement( this );
00144         pFrameWnd->ShowWindow( showCmd );
00145         pFrameWnd->UpdateWindow();
00146         return TRUE;
00147     }
00148
00149     return FALSE;
00150 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSortParam Member List

This is the complete list of members for CSortParam, including all inherited members.

CSortParam(bool fAccendant, bool fGroupSubDir, const KiColumn *column, const KiColumn *columnAlt, KoColumnContext *context) | CSortParam | [inline]
m_column | CSortParam |
m_columnAlt | CSortParam |
m_context | CSortParam |
m_fAccendant | CSortParam |
m_fGroupSubDir | CSortParam |

Generated on Sat Aug 7 22:56:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJHtmlView Member List

This is the complete list of members for CCJHtmlView, including all inherited members.

BeforeNavigate2(LPDISPATCH pDisp, VARIANT *URL, VARIANT *Flags, VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers, BOOL *Cancel) | CCJHtmlView | [protected, virtual]
CCJHtmlView() | CCJHtmlView | [protected]
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CCJHtmlView | [virtual]
DocumentComplete(LPDISPATCH pDisp, VARIANT *URL) | CCJHtmlView | [protected, virtual]
ExecWB(OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) | CCJHtmlView |
GetAddressBar() const | CCJHtmlView |
GetApplication() const | CCJHtmlView |
GetBusy() const | CCJHtmlView |
GetContainer() const | CCJHtmlView |
GetFullName() const | CCJHtmlView |
GetFullScreen() const | CCJHtmlView |
GetHeight() const | CCJHtmlView |
GetHtmlDocument() const | CCJHtmlView |
GetLeft() const | CCJHtmlView |
GetLocationName() const | CCJHtmlView |
GetLocationURL() const | CCJHtmlView |
GetMenuBar() const | CCJHtmlView |
GetOffline() const | CCJHtmlView |
GetParentBrowser() const | CCJHtmlView |
GetProperty(LPCTSTR lpszProperty, CString &strValue) | CCJHtmlView |
GetProperty(LPCTSTR lpszProperty) | CCJHtmlView |
GetReadyState() const | CCJHtmlView |
GetRegisterAsBrowser() const | CCJHtmlView |
GetRegisterAsDropTarget() const | CCJHtmlView |
GetSilent() const | CCJHtmlView |
GetStatusBar() const | CCJHtmlView |
GetTheaterMode() const | CCJHtmlView |
GetToolBar() const | CCJHtmlView |
GetTop() const | CCJHtmlView |
GetTopLevelContainer() const | CCJHtmlView |
GetType() const | CCJHtmlView |
GetVisible() const | CCJHtmlView |
GoBack() | CCJHtmlView |
GoForward() | CCJHtmlView |
GoHome() | CCJHtmlView |
GoSearch() | CCJHtmlView |
LoadFromResource(LPCTSTR lpszResource) | CCJHtmlView |
LoadFromResource(UINT nRes) | CCJHtmlView |
m_pBrowserApp | CCJHtmlView | [protected]
m_wndBrowser | CCJHtmlView |
Navigate(LPCTSTR URL, DWORD dwFlags=0, LPCTSTR lpszTargetFrameName=NULL, LPCTSTR lpszHeaders=NULL, LPVOID lpvPostData=NULL, DWORD dwPostDataLen=0) | CCJHtmlView |
Navigate2(LPITEMIDLIST pIDL, DWORD dwFlags=0, LPCTSTR lpszTargetFrameName=NULL) | CCJHtmlView |
Navigate2(LPCTSTR lpszURL, DWORD dwFlags=0, LPCTSTR lpszTargetFrameName=NULL, LPCTSTR lpszHeaders=NULL, LPVOID lpvPostData=NULL, DWORD dwPostDataLen=0) | CCJHtmlView |
Navigate2(LPCTSTR lpszURL, DWORD dwFlags, CByteArray &baPostedData, LPCTSTR lpszTargetFrameName=NULL, LPCTSTR lpszHeader=NULL) | CCJHtmlView |
NavigateComplete2(LPDISPATCH pDisp, VARIANT *URL) | CCJHtmlView | [protected, virtual]
OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray &baPostedData, LPCTSTR lpszHeaders, BOOL *pbCancel) | CCJHtmlView | [virtual]
OnCommandStateChange(long nCommand, BOOL bEnable) | CCJHtmlView | [virtual]
OnDestroy() | CCJHtmlView | [protected]
OnDocumentComplete(LPCTSTR lpszURL) | CCJHtmlView | [virtual]
OnDownloadBegin() | CCJHtmlView | [virtual]
OnDownloadComplete() | CCJHtmlView | [virtual]
OnDraw(CDC *pDC) | CCJHtmlView | [virtual]
OnEraseBkgnd(CDC *pDC) | CCJHtmlView | [protected]
OnFilePrint() | CCJHtmlView | [protected]
OnFullScreen(BOOL bFullScreen) | CCJHtmlView | [virtual]
OnMenuBar(BOOL bMenuBar) | CCJHtmlView | [virtual]
OnNavigateComplete2(LPCTSTR strURL) | CCJHtmlView | [virtual]
OnNewWindow2(LPDISPATCH *ppDisp, BOOL *Cancel) | CCJHtmlView | [virtual]
OnPaint() | CCJHtmlView | [protected]
OnProgressChange(long nProgress, long nProgressMax) | CCJHtmlView | [virtual]
OnPropertyChange(LPCTSTR lpszProperty) | CCJHtmlView | [virtual]
OnQuit() | CCJHtmlView | [virtual]
OnSize(UINT nType, int cx, int cy) | CCJHtmlView | [protected]
OnStatusBar(BOOL bStatusBar) | CCJHtmlView | [virtual]
OnStatusTextChange(LPCTSTR lpszText) | CCJHtmlView | [virtual]
OnTheaterMode(BOOL bTheaterMode) | CCJHtmlView | [virtual]
OnTitleChange(LPCTSTR lpszText) | CCJHtmlView | [virtual]
OnToolBar(BOOL bToolBar) | CCJHtmlView | [virtual]
OnVisible(BOOL bVisible) | CCJHtmlView | [virtual]
PutProperty(LPCTSTR lpszProperty, const VARIANT &vtValue) | CCJHtmlView |
PutProperty(LPCTSTR lpszPropertyName, double dValue) | CCJHtmlView |
PutProperty(LPCTSTR lpszPropertyName, LPCTSTR lpszValue) | CCJHtmlView |
PutProperty(LPCTSTR lpszPropertyName, long lValue) | CCJHtmlView |
PutProperty(LPCTSTR lpszPropertyName, short nValue) | CCJHtmlView |
QueryStatusWB(OLECMDID cmdID) const | CCJHtmlView |
Refresh() | CCJHtmlView |
Refresh2(int nLevel) | CCJHtmlView |
SetAddressBar(BOOL bNewValue) | CCJHtmlView |
SetFullScreen(BOOL bNewValue) | CCJHtmlView |
SetHeight(long nNewValue) | CCJHtmlView |
SetLeft(long nNewValue) | CCJHtmlView |
SetMenuBar(BOOL bNewValue) | CCJHtmlView |
SetOffline(BOOL bNewValue) | CCJHtmlView |
SetRegisterAsBrowser(BOOL bNewValue) | CCJHtmlView |
SetRegisterAsDropTarget(BOOL bNewValue) | CCJHtmlView |
SetSilent(BOOL bNewValue) | CCJHtmlView |
SetStatusBar(BOOL bNewValue) | CCJHtmlView |
SetTheaterMode(BOOL bNewValue) | CCJHtmlView |
SetToolBar(int nNewValue) | CCJHtmlView |
SetTop(long nNewValue) | CCJHtmlView |
SetVisible(BOOL bNewValue) | CCJHtmlView |
Stop() | CCJHtmlView |
~CCJHtmlView() | CCJHtmlView | [protected, virtual]

Generated on Sat Aug 7 22:49:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSplashWnd Member List

This is the complete list of members for CSplashWnd, including all inherited members.

c_bShowSplashWnd | CSplashWnd | [protected, static]
c_pSplashWnd | CSplashWnd | [protected, static]
Create(CWnd *pParentWnd=NULL) | CSplashWnd | [protected]
CSplashWnd() | CSplashWnd | [protected]
EnableSplashScreen(BOOL bEnable=TRUE) | CSplashWnd | [static]
HideSplashScreen() | CSplashWnd | [protected]
m_bitmap | CSplashWnd |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CSplashWnd | [protected]
OnPaint() | CSplashWnd | [protected]
OnTimer(UINT nIDEvent) | CSplashWnd | [protected]
PostNcDestroy() | CSplashWnd | [virtual]
PreTranslateAppMessage(MSG *pMsg) | CSplashWnd | [static]
ShowSplashScreen(CWnd *pParentWnd=NULL) | CSplashWnd | [static]
~CSplashWnd() | CSplashWnd |

Generated on Sat Aug 7 22:56:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJDockBar Member List

This is the complete list of members for CCJDockBar, including all inherited members.

CalcFixedLayout(BOOL bStretch, BOOL bHorz) | CCJDockBar | [virtual]
CCJDockBar() | CCJDockBar |
~CCJDockBar() | CCJDockBar | [virtual]

Generated on Sat Aug 7 22:49:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMMenuString Member List

This is the complete list of members for CMMenuString, including all inherited members.

_GetBaseClass() | CPersistent | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CMMenuString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L) | CMMenuString |
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
fAllStrs | CMMenuString | [protected]
fBuf | CMMenuString | [protected]
Find(const char *uniqueName) | CPersistent | [static]
fMaxStr | CMMenuString | [protected]
GetData(void) const | CMMenuString | [virtual]
GetList(void) const | CMMenuString | [inline]
GetList(void) | CMMenuString | [inline]
GetRuntimeClass() const | CPersistent | [virtual]
GetTimeStamp() const | CPersistent | [inline]
Insert(const char *newstr) | CMMenuString |
IsKindOf(const URuntimeClass *pClass) const | UObject |
LoadAll(const char *only=0L) | CPersistent | [static]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | CMMenuString | [virtual]
SizeOf(void) const | CMMenuString | [virtual]
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CMMenuString() | CMMenuString | [virtual]
~CPersistent() | CPersistent | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

SelectionDisplayInfo Member List

This is the complete list of members for SelectionDisplayInfo, including all inherited members.

Create(const string &fileName, const string &revision, const string &path) | SelectionDisplayInfo |
GetFileName() const | SelectionDisplayInfo |
GetPath() const | SelectionDisplayInfo |
GetRevision() const | SelectionDisplayInfo |
m_fileName | SelectionDisplayInfo | [private]
m_path | SelectionDisplayInfo | [private]
m_revision | SelectionDisplayInfo | [private]

Generated on Sat Aug 7 22:56:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/Persistent.h Source File

common/Persistent.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * Persistent.h --- utilities to store persistent values
00023  */
00024
00025 #ifndef PERSISTENT_H
00026 #define PERSISTENT_H
00027
00028 #include <string.h>
00029 #include <vector>
00030 #include <map>
00031 #include "uobject.h"
00032
00033 #ifdef TARGET_OS_MAC
00034 #   include <Files.h>
00035 #endif /* TARGET_OS_MAC */
00036
00037 #if TARGET_OS_MAC
00038 #   define kCVS_prefID 'cprf'
00039 #   define kCVS_prefName "\pMacCvs Prefs"
00040 #endif
00041
00042 #if defined(WIN32)
00043
00044 #   define INTERNAL_AUTHEN 0
00045 #else
00046
00047 #   define INTERNAL_AUTHEN 1
00048 #endif /* !WIN32 */
00049
00050 #ifdef WIN32
00051
00052 #   define PROFILE_NAME "CVS settings"
00053 #endif /* WIN32 */
00054
00056 #define PERSISTENT_CAST(T) \
00057     inline operator const T&() const {return m_fValue;} \
00058     inline T& operator=(const T& val) { TouchTimeStamp(); return m_fValue = val;} \
00059     inline bool operator==(const T& val) const {return m_fValue == val;}
00060     /* inline const T * operator ->() const {return &fValue;} */ \
00061
00063 typedef enum
00064 {
00065     kNoClass = 0x00,
00066     kAddSettings = 0x01
00067 } kClassPersistent;
00068
00069 class UStr;
00070
00071 // Persistent settings API
00072 void LoadPersistentSettings(const char* path, bool quiet = false);
00073 bool HasPersistentSettings(const char* path);
00074 void AskCreatePersistentSettings(const char* path);
00075 void SavePersistentSettings(const char* path, bool quiet = false);
00076 bool FormatDefaultSettingsLoc(UStr& path);
00077
00078 bool GetAllPersistentSettings(std::map<UStr, UStr>& res);
00079
00081 class CPersistent : public UObject
00082 {
00083     UDECLARE_DYNAMIC(CPersistent)
00084 public:
00085     CPersistent(const char* uniqueName, kClassPersistent pclass);
00086     virtual ~CPersistent();
00087
00088 protected:
00090     virtual unsigned int SizeOf(void) const = 0L;
00091
00093     virtual const void* GetData(void) const = 0L;
00094
00096     virtual void SetData(const void* ptr, unsigned int size) = 0L;
00097
00098 public:
00099     static void SaveAll(void);
00100     static bool LoadAll(const char* only = 0L);
00101
00102     static bool SaveAllSettings(const char* settingFileName, const char* filePath);
00103
00105     struct CPersistentEntry
00106     {
00107         const char* m_fUniqueName;
00108         CPersistent* m_fValue;
00109         kClassPersistent m_fClass;
00110     };
00111
00112     static CPersistentEntry* Find(const char* uniqueName);
00113
00115     inline void ResetTimeStamp() { m_fTimeStamp = 0; }
00116
00118     inline long GetTimeStamp() const { return m_fTimeStamp; }
00119
00121     inline void TouchTimeStamp() { m_fTimeStamp++; }
00122
00123     static bool NeedSave(bool onlySettings = false);
00124
00125 private:
00126     static void Register(CPersistent* value, const char* uniqueName, kClassPersistent pclass);
00127     static void UnRegister(CPersistent* value);
00128
00129 protected:
00130     long m_fTimeStamp;
00131     static std::vector<CPersistentEntry>* m_fAllEntries;
00132 };
00133
00135 template <class T>
00136 class CPersistentT : public CPersistent
00137 {
00138 public:
00139     CPersistentT(const char* uniqueName, T defValue, kClassPersistent pclass) : CPersistent(uniqueName, pclass)
00140     {
00141         m_fValue = m_fDefValue = defValue;
00142     }
00143
00144     virtual ~CPersistentT()
00145     {
00146     }
00147
00148     PERSISTENT_CAST(T)
00149
00150     virtual unsigned int SizeOf(void) const {return sizeof(T);}
00151     virtual const void* GetData(void) const {return &m_fValue;}
00152     virtual void SetData(const void* ptr, unsigned int size)
00153     {
00154         if( size == sizeof(T) )
00155             memcpy(&m_fValue, ptr, size);
00156     }
00157
00158 protected:
00159     T m_fDefValue;
00160     T m_fValue;
00161 };
00162
00164 class CPersistentBool : public CPersistentT<bool>
00165 {
00166     UDECLARE_DYNAMIC(CPersistentBool)
00167 public:
00168     CPersistentBool(const char* uniqueName, bool defValue,
00169         kClassPersistent pclass = kNoClass) :
00170       CPersistentT<bool>(uniqueName, defValue, pclass)
00171     {
00172     }
00173
00174     virtual ~CPersistentBool()
00175     {
00176     }
00177
00178     PERSISTENT_CAST(bool)
00179 };
00180
00182 class CPersistentInt : public CPersistentT<int>
00183 {
00184     UDECLARE_DYNAMIC(CPersistentInt)
00185 public:
00186     CPersistentInt(const char* uniqueName, int defValue,
00187         kClassPersistent pclass = kNoClass) :
00188             CPersistentT<int>(uniqueName, defValue, pclass)
00189     {
00190     }
00191
00192     virtual ~CPersistentInt()
00193     {
00194     }
00195
00196     PERSISTENT_CAST(int)
00197 };
00198
00199 #endif /* PERSISTENT_H */
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJColorPopup.cpp Source File

WinCvs/CJLib/CJLibrary/CJColorPopup.cpp

Go to the documentation of this file.
00001 // CJColorPopup.cpp : implementation file
00002 //
00003 // Written by Chris Maunder (chrismaunder@codeguru.com)
00004 // Extended by Alexander Bischofberger (bischofb@informatik.tu-muenchen.de)
00005 // Copyright (c) 1998.
00006 //
00007 // Updated 30 May 1998 to allow any number of Colors, and to
00008 //                     make the appearance closer to Office 97.
00009 //                     Also added "Default" text area.         (CJM)
00010 //
00011 //         13 June 1998 Fixed change of focus bug (CJM)
00012 //         30 June 1998 Fixed bug caused by focus bug fix (D'oh!!)
00013 //                      Solution suggested by Paul Wilkerson.
00014 //
00015 // CJColorPopup is a helper class for the Color picker control
00016 // CJColorPicker. Check out the header file or the accompanying
00017 // HTML doc file for details.
00018 //
00019 // This code may be used in compiled form in any way you desire. This
00020 // file may be redistributed unmodified by any means PROVIDING it is
00021 // not sold for profit without the authors written consent, and
00022 // providing that this notice and the authors name is included.
00023 //
00024 // This file is provided "as is" with no expressed or implied warranty.
00025 // The author accepts no liability if it causes any damage to you or your
00026 // computer whatsoever. It's free, so don't hassle me about it.
00027 //
00028 // Expect bugs.
00029 //
00030 // Please use and enjoy. Please let me know of any bugs/mods/improvements
00031 // that you have found/implemented and I will fix/incorporate them into this
00032 // file.
00033 //
00035 /****************************************************************************
00036  *
00037  * $Date: 2002/06/15 17:49:37 $
00038  * $Revision: 1.2 $
00039  * $Archive: /CodeJock/CJLibrary/CJColorPopup.cpp $
00040  *
00041  * $History: CJColorPopup.cpp $
00042  *
00043  * *****************  Version 9  *****************
00044  * User: Kirk Stowell Date: 10/31/99   Time: 11:54p
00045  * Updated in $/CodeJock/CJLibrary
00046  * Overrode OnEraseBkgnd(...) and made modifications to OnPaint(...) to
00047  * handle flicker free drawing.
00048  *
00049  * Modified resource include for static builds.
00050  *
00051  * Fixed potential resource and memory leak problems.
00052  *
00053  * Made class methods virtual for inheritance purposes.
00054  *
00055  * *****************  Version 8  *****************
00056  * User: Kirk Stowell Date: 10/14/99   Time: 12:23p
00057  * Updated in $/CodeJock/CJLibrary
00058  * Added source control history to file header.
00059  *
00060  ***************************************************************************/
00062
00063 #include "stdafx.h"
00064 #include <math.h>
00065 #include "CJColorPicker.h"
00066 #include "CJColorPopup.h"
00067 #include "CJResource.h"
00068
00069 #ifdef _DEBUG
00070 #define new DEBUG_NEW
00071 #undef THIS_FILE
00072 static char THIS_FILE[] = __FILE__;
00073 #endif
00074
00075 #define DEFAULT_BOX_VALUE -3
00076 #define CUSTOM_BOX_VALUE  -2
00077 #define INVALID_Color    -1
00078
00079 #define MAX_ColorS          100
00080 #define NUM_COLUMNS         10
00081
00082 ColorTableEntry CCJColorPopup::m_crColors[] =
00083 {
00084     { RGB(0x00, 0x00, 0x00),    _T("Black")             },
00085     { RGB(0xA5, 0x2A, 0x00),    _T("Brown")             },
00086     { RGB(0x00, 0x40, 0x40),    _T("Dark Olive Green")  },
00087     { RGB(0x00, 0x55, 0x00),    _T("Dark Green")        },
00088     { RGB(0x00, 0x00, 0x5E),    _T("Dark Teal")         },
00089     { RGB(0x00, 0x00, 0x8B),    _T("Dark blue")         },
00090     { RGB(0x4B, 0x00, 0x82),    _T("Indigo")            },
00091     { RGB(0x28, 0x28, 0x28),    _T("Dark grey")         },
00092
00093     { RGB(0x8B, 0x00, 0x00),    _T("Dark red")          },
00094     { RGB(0xFF, 0x68, 0x20),    _T("Orange")            },
00095     { RGB(0x8B, 0x8B, 0x00),    _T("Dark yellow")       },
00096     { RGB(0x00, 0x93, 0x00),    _T("Green")             },
00097     { RGB(0x38, 0x8E, 0x8E),    _T("Teal")              },
00098     { RGB(0x00, 0x00, 0xFF),    _T("Blue")              },
00099     { RGB(0x7B, 0x7B, 0xC0),    _T("Blue-grey")         },
00100     { RGB(0x66, 0x66, 0x66),    _T("Grey - 40")         },
00101
00102     { RGB(0xFF, 0x00, 0x00),    _T("Red")               },
00103     { RGB(0xFF, 0xAD, 0x5B),    _T("Light orange")      },
00104     { RGB(0x32, 0xCD, 0x32),    _T("Lime")              },
00105     { RGB(0x3C, 0xB3, 0x71),    _T("Sea green")         },
00106     { RGB(0x7F, 0xFF, 0xD4),    _T("Aqua")              },
00107     { RGB(0x7D, 0x9E, 0xC0),    _T("Light blue")        },
00108     { RGB(0x80, 0x00, 0x80),    _T("Violet")            },
00109     { RGB(0x7F, 0x7F, 0x7F),    _T("Grey - 50")         },
00110
00111     { RGB(0xFF, 0xC0, 0xCB),    _T("Pink")              },
00112     { RGB(0xFF, 0xD7, 0x00),    _T("Gold")              },
00113     { RGB(0xFF, 0xFF, 0x00),    _T("Yellow")            },
00114     { RGB(0x00, 0xFF, 0x00),    _T("Bright green")      },
00115     { RGB(0x40, 0xE0, 0xD0),    _T("Turquoise")         },
00116     { RGB(0xC0, 0xFF, 0xFF),    _T("Skyblue")           },
00117     { RGB(0x48, 0x00, 0x48),    _T("Plum")              },
00118     { RGB(0xC0, 0xC0, 0xC0),    _T("Light grey")        },
00119
00120     { RGB(0xFF, 0xE4, 0xE1),    _T("Rose")              },
00121     { RGB(0xD2, 0xB4, 0x8C),    _T("Tan")               },
00122     { RGB(0xFF, 0xFF, 0xE0),    _T("Light yellow")      },
00123     { RGB(0x98, 0xFB, 0x98),    _T("Pale green ")       },
00124     { RGB(0xAF, 0xEE, 0xEE),    _T("Pale turquoise")    },
00125     { RGB(0x68, 0x83, 0x8B),    _T("Pale blue")         },
00126     { RGB(0xE6, 0xE6, 0xFA),    _T("Lavender")          },
00127     { RGB(0xFF, 0xFF, 0xFF),    _T("White")             }
00128 };
00129
00131 // CCJColorPopup
00132
00133 CCJColorPopup::CCJColorPopup()
00134 {
00135     Initialise();
00136 }
00137
00138 CCJColorPopup::CCJColorPopup(CPoint p, COLORREF crColor, CWnd* pParentWnd,
00139                            LPCTSTR szDefaultText /* = NULL */,
00140                            LPCTSTR szCustomText  /* = NULL */)
00141 {
00142     Initialise();
00143
00144     m_crColor       = m_crInitialColor = crColor;
00145     m_pParent        = pParentWnd;
00146
00147 // 1999-06-11 begin mods KStowell
00148     if( szDefaultText == NULL )
00149         m_strDefaultText.LoadString( IDS_COLOR_AUTO );
00150     else
00151         m_strDefaultText = szDefaultText;
00152
00153     if( szCustomText == NULL )
00154         m_strCustomText.LoadString( IDS_COLOR_CUST );
00155     else
00156         m_strCustomText = szCustomText;
00157 // 1999-06-11 end mods KStowell
00158
00159     CCJColorPopup::Create(p, crColor, pParentWnd, szDefaultText, szCustomText);
00160 }
00161
00162 void CCJColorPopup::Initialise()
00163 {
00164     m_nNumColors       = sizeof(m_crColors)/sizeof(ColorTableEntry);
00165     ASSERT(m_nNumColors <= MAX_ColorS);
00166     if (m_nNumColors > MAX_ColorS)
00167         m_nNumColors = MAX_ColorS;
00168
00169     m_nNumColumns       = 0;
00170     m_nNumRows          = 0;
00171     m_nBoxSize          = 18;
00172     m_nMargin           = ::GetSystemMetrics(SM_CXEDGE);
00173     m_nCurrentSel       = INVALID_Color;
00174     m_nChosenColorSel  = INVALID_Color;
00175     m_pParent           = NULL;
00176     m_crColor          = m_crInitialColor = RGB(0,0,0);
00177
00178     // Idiot check: Make sure the Color square is at least 5 x 5;
00179     if (m_nBoxSize - 2*m_nMargin - 2 < 5) m_nBoxSize = 5 + 2*m_nMargin + 2;
00180
00181     // Create the palette
00182     struct {
00183         LOGPALETTE    LogPalette;
00184         PALETTEENTRY  PalEntry[MAX_ColorS];
00185     } pal;
00186
00187     LOGPALETTE* pLogPalette = (LOGPALETTE*) &pal;
00188     pLogPalette->palVersion    = 0x300;
00189     pLogPalette->palNumEntries = (WORD) m_nNumColors;
00190
00191     for (int i = 0; i < m_nNumColors; i++)
00192     {
00193         pLogPalette->palPalEntry[i].peRed   = GetRValue(m_crColors[i].crColor);
00194         pLogPalette->palPalEntry[i].peGreen = GetGValue(m_crColors[i].crColor);
00195         pLogPalette->palPalEntry[i].peBlue  = GetBValue(m_crColors[i].crColor);
00196         pLogPalette->palPalEntry[i].peFlags = 0;
00197     }
00198
00199     m_Palette.CreatePalette(pLogPalette);
00200 }
00201
00202 CCJColorPopup::~CCJColorPopup()
00203 {
00204     m_Font.DeleteObject();
00205     m_Palette.DeleteObject();
00206 }
00207
00208 BOOL CCJColorPopup::Create(CPoint p, COLORREF crColor, CWnd* pParentWnd,
00209                           LPCTSTR szDefaultText /* = NULL */,
00210                           LPCTSTR szCustomText  /* = NULL */)
00211 {
00212     ASSERT(pParentWnd && ::IsWindow(pParentWnd->GetSafeHwnd()));
00213     ASSERT(pParentWnd->IsKindOf(RUNTIME_CLASS(CCJColorPicker)));
00214
00215     m_pParent  = pParentWnd;
00216     m_crColor = m_crInitialColor = crColor;
00217
00218     // Get the class name and create the window
00219     CString szClassName = AfxRegisterWndClass(CS_CLASSDC|CS_SAVEBITS|CS_HREDRAW|CS_VREDRAW,
00220                                               0,
00221                                               (HBRUSH) (COLOR_BTNFACE+1),
00222                                               0);
00223
00224     if (!CWnd::CreateEx(0, szClassName, _T(""), WS_VISIBLE|WS_POPUP,
00225                         p.x, p.y, 100, 100, // size updated soon
00226                         pParentWnd->GetSafeHwnd(), 0, NULL))
00227         return FALSE;
00228
00229     UpdateFont();
00230
00231     // Store the Custom text
00232     if (szCustomText != NULL)
00233         m_strCustomText = szCustomText;
00234
00235     // Store the Default Area text
00236     if (szDefaultText != NULL)
00237         m_strDefaultText = szDefaultText;
00238
00239     // Set the window size
00240     SetWindowSize();
00241
00242     // Create the tooltips
00243     CreateToolTips();
00244
00245     // Find which cell (if any) corresponds to the initial Color
00246     FindCellFromColor(crColor);
00247
00248     // Capture all mouse events for the life of this window
00249     SetCapture();
00250
00251     return TRUE;
00252 }
00253
00254 BEGIN_MESSAGE_MAP(CCJColorPopup, CWnd)
00255     //{{AFX_MSG_MAP(CCJColorPopup)
00256     ON_WM_NCDESTROY()
00257     ON_WM_LBUTTONUP()
00258     ON_WM_PAINT()
00259     ON_WM_MOUSEMOVE()
00260     ON_WM_KEYDOWN()
00261     ON_WM_QUERYNEWPALETTE()
00262     ON_WM_PALETTECHANGED()
00263     ON_WM_KILLFOCUS()
00264     ON_WM_ACTIVATEAPP()
00265     ON_WM_ERASEBKGND()
00266     //}}AFX_MSG_MAP
00267 END_MESSAGE_MAP()
00268
00270 // CCJColorPopup message handlers
00271
00272 // For tooltips
00273 BOOL CCJColorPopup::PreTranslateMessage(MSG* pMsg)
00274 {
00275     m_ToolTip.RelayEvent(pMsg);
00276     return CWnd::PreTranslateMessage(pMsg);
00277 }
00278
00279 // If an arrow key is pressed, then move the selection
00280 void CCJColorPopup::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00281 {
00282     int row = GetRow(m_nCurrentSel),
00283         col = GetColumn(m_nCurrentSel);
00284
00285     if (nChar == VK_DOWN)
00286     {
00287         if (row == DEFAULT_BOX_VALUE)
00288             row = col = 0;
00289         else if (row == CUSTOM_BOX_VALUE)
00290         {
00291             if (m_strDefaultText.GetLength())
00292                 row = col = DEFAULT_BOX_VALUE;
00293             else
00294                 row = col = 0;
00295         }
00296         else
00297         {
00298             row++;
00299             if (GetIndex(row,col) < 0)
00300             {
00301                 if (m_strCustomText.GetLength())
00302                     row = col = CUSTOM_BOX_VALUE;
00303                 else if (m_strDefaultText.GetLength())
00304                     row = col = DEFAULT_BOX_VALUE;
00305                 else
00306                     row = col = 0;
00307             }
00308         }
00309         ChangeSelection(GetIndex(row, col));
00310     }
00311
00312     if (nChar == VK_UP)
00313     {
00314         if (row == DEFAULT_BOX_VALUE)
00315         {
00316             if (m_strCustomText.GetLength())
00317                 row = col = CUSTOM_BOX_VALUE;
00318             else
00319            {
00320                 row = GetRow(m_nNumColors-1);
00321                 col = GetColumn(m_nNumColors-1);
00322             }
00323         }
00324         else if (row == CUSTOM_BOX_VALUE)
00325         {
00326             row = GetRow(m_nNumColors-1);
00327             col = GetColumn(m_nNumColors-1);
00328         }
00329         else if (row > 0) row--;
00330         else /* row == 0 */
00331         {
00332             if (m_strDefaultText.GetLength())
00333                 row = col = DEFAULT_BOX_VALUE;
00334             else if (m_strCustomText.GetLength())
00335                 row = col = CUSTOM_BOX_VALUE;
00336             else
00337             {
00338                 row = GetRow(m_nNumColors-1);
00339                 col = GetColumn(m_nNumColors-1);
00340             }
00341         }
00342         ChangeSelection(GetIndex(row, col));
00343     }
00344
00345     if (nChar == VK_RIGHT)
00346     {
00347         if (row == DEFAULT_BOX_VALUE)
00348             row = col = 0;
00349         else if (row == CUSTOM_BOX_VALUE)
00350         {
00351             if (m_strDefaultText.GetLength())
00352                 row = col = DEFAULT_BOX_VALUE;
00353             else
00354                 row = col = 0;
00355         }
00356         else if (col < m_nNumColumns-1)
00357             col++;
00358         else
00359         {
00360             col = 0; row++;
00361         }
00362
00363         if (GetIndex(row,col) == INVALID_Color)
00364         {
00365             if (m_strCustomText.GetLength())
00366                 row = col = CUSTOM_BOX_VALUE;
00367             else if (m_strDefaultText.GetLength())
00368                 row = col = DEFAULT_BOX_VALUE;
00369             else
00370                 row = col = 0;
00371         }
00372
00373         ChangeSelection(GetIndex(row, col));
00374     }
00375
00376     if (nChar == VK_LEFT)
00377     {
00378         if (row == DEFAULT_BOX_VALUE)
00379         {
00380             if (m_strCustomText.GetLength())
00381                 row = col = CUSTOM_BOX_VALUE;
00382             else
00383            {
00384                 row = GetRow(m_nNumColors-1);
00385                 col = GetColumn(m_nNumColors-1);
00386             }
00387         }
00388         else if (row == CUSTOM_BOX_VALUE)
00389         {
00390             row = GetRow(m_nNumColors-1);
00391             col = GetColumn(m_nNumColors-1);
00392         }
00393         else if (col > 0) col--;
00394         else /* col == 0 */
00395         {
00396             if (row > 0) { row--; col = m_nNumColumns-1; }
00397             else
00398             {
00399                 if (m_strDefaultText.GetLength())
00400                     row = col = DEFAULT_BOX_VALUE;
00401                 else if (m_strCustomText.GetLength())
00402                     row = col = CUSTOM_BOX_VALUE;
00403                 else
00404                 {
00405                     row = GetRow(m_nNumColors-1);
00406                     col = GetColumn(m_nNumColors-1);
00407                 }
00408             }
00409         }
00410         ChangeSelection(GetIndex(row, col));
00411     }
00412
00413     if (nChar == VK_ESCAPE)
00414     {
00415         m_crColor = m_crInitialColor;
00416         EndSelection(CPN_SELENDCANCEL);
00417         return;
00418     }
00419
00420     if (nChar == VK_RETURN || nChar == VK_SPACE)
00421     {
00422         EndSelection(CPN_SELENDOK);
00423         return;
00424     }
00425
00426     CWnd::OnKeyDown(nChar, nRepCnt, nFlags);
00427 }
00428
00429 // auto-deletion
00430 void CCJColorPopup::OnNcDestroy()
00431 {
00432     CWnd::OnNcDestroy();
00433     delete this;
00434 }
00435
00436 void CCJColorPopup::OnPaint()
00437 {
00438     CPaintDC dc(this); // device context for painting
00439
00440     // KStowell - Get the client rect for this control.
00441     CRect rcClient;
00442     GetClientRect(&rcClient);
00443
00444     // KStowell - Create a memory device-context. This is done to help reduce
00445     // screen flicker, since we will paint the entire control to the
00446     // off screen device context first.
00447     CDC memDC;
00448     memDC.CreateCompatibleDC(&dc);
00449     CBitmap bitmap;
00450     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00451     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00452     memDC.FillSolidRect(rcClient, ::GetSysColor(COLOR_BTNFACE));
00453
00454     // Draw the Default Area text
00455     if (m_strDefaultText.GetLength())
00456         DrawCell(&memDC, DEFAULT_BOX_VALUE);
00457
00458     // Draw Color cells
00459     for (int i = 0; i < m_nNumColors; i++)
00460         DrawCell(&memDC, i);
00461
00462     // Draw custom text
00463     if (m_strCustomText.GetLength())
00464         DrawCell(&memDC, CUSTOM_BOX_VALUE);
00465
00466     // Draw raised window edge (ex-window style WS_EX_WINDOWEDGE is sposed to do this,
00467     // but for some reason isn't
00468     CRect rect;
00469     GetClientRect(rect);
00470     memDC.DrawEdge(rect, EDGE_RAISED, BF_RECT);
00471
00472     // KStowell - copy the memory device context back into the original DC via BitBlt().
00473     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00474
00475     // KStowell - cleanup.
00476     memDC.SelectObject(pOldBitmap);
00477     memDC.DeleteDC();
00478     bitmap.DeleteObject();
00479 }
00480
00481 void CCJColorPopup::OnMouseMove(UINT nFlags, CPoint point)
00482 {
00483     int nNewSelection = INVALID_Color;
00484
00485     // Translate points to be relative raised window edge
00486     point.x -= m_nMargin;
00487     point.y -= m_nMargin;
00488
00489     // First check we aren't in text box
00490     if (m_strCustomText.GetLength() && m_CustomTextRect.PtInRect(point))
00491         nNewSelection = CUSTOM_BOX_VALUE;
00492     else if (m_strDefaultText.GetLength() && m_DefaultTextRect.PtInRect(point))
00493         nNewSelection = DEFAULT_BOX_VALUE;
00494     else
00495     {
00496         // Take into account text box
00497         if (m_strDefaultText.GetLength())
00498             point.y -= m_DefaultTextRect.Height();
00499
00500         // Get the row and column
00501         nNewSelection = GetIndex(point.y / m_nBoxSize, point.x / m_nBoxSize);
00502
00503         // In range? If not, default and exit
00504         if (nNewSelection < 0 || nNewSelection >= m_nNumColors)
00505         {
00506             CWnd::OnMouseMove(nFlags, point);
00507             return;
00508         }
00509     }
00510
00511     // OK - we have the row and column of the current selection (may be CUSTOM_BOX_VALUE)
00512     // Has the row/col selection changed? If yes, then redraw old and new cells.
00513     if (nNewSelection != m_nCurrentSel)
00514         ChangeSelection(nNewSelection);
00515
00516     CWnd::OnMouseMove(nFlags, point);
00517 }
00518
00519 // End selection on LButtonUp
00520 void CCJColorPopup::OnLButtonUp(UINT nFlags, CPoint point)
00521 {
00522     CWnd::OnLButtonUp(nFlags, point);
00523
00524     DWORD pos = GetMessagePos();
00525     point = CPoint(LOWORD(pos), HIWORD(pos));
00526
00527     if (m_WindowRect.PtInRect(point))
00528         EndSelection(CPN_SELENDOK);
00529     else
00530         EndSelection(CPN_SELENDCANCEL);
00531 }
00532
00534 // CCJColorPopup implementation
00535
00536 int CCJColorPopup::GetIndex(int row, int col) const
00537 {
00538     if ((row == CUSTOM_BOX_VALUE || col == CUSTOM_BOX_VALUE) && m_strCustomText.GetLength())
00539         return CUSTOM_BOX_VALUE;
00540     else if ((row == DEFAULT_BOX_VALUE || col == DEFAULT_BOX_VALUE) && m_strDefaultText.GetLength())
00541         return DEFAULT_BOX_VALUE;
00542     else if (row < 0 || col < 0 || row >= m_nNumRows || col >= m_nNumColumns)
00543         return INVALID_Color;
00544     else
00545     {
00546         if (row*m_nNumColumns + col >= m_nNumColors)
00547             return INVALID_Color;
00548         else
00549             return row*m_nNumColumns + col;
00550     }
00551 }
00552
00553 int CCJColorPopup::GetRow(int nIndex) const
00554 {
00555     if (nIndex == CUSTOM_BOX_VALUE && m_strCustomText.GetLength())
00556         return CUSTOM_BOX_VALUE;
00557     else if (nIndex == DEFAULT_BOX_VALUE && m_strDefaultText.GetLength())
00558         return DEFAULT_BOX_VALUE;
00559     else if (nIndex < 0 || nIndex >= m_nNumColors)
00560         return INVALID_Color;
00561     else
00562         return nIndex / m_nNumColumns;
00563 }
00564
00565 int CCJColorPopup::GetColumn(int nIndex) const
00566 {
00567     if (nIndex == CUSTOM_BOX_VALUE && m_strCustomText.GetLength())
00568         return CUSTOM_BOX_VALUE;
00569     else if (nIndex == DEFAULT_BOX_VALUE && m_strDefaultText.GetLength())
00570         return DEFAULT_BOX_VALUE;
00571     else if (nIndex < 0 || nIndex >= m_nNumColors)
00572         return INVALID_Color;
00573     else
00574         return nIndex % m_nNumColumns;
00575 }
00576
00577 void CCJColorPopup::FindCellFromColor(COLORREF crColor)
00578 {
00579     if (crColor == CLR_DEFAULT && m_strDefaultText.GetLength())
00580     {
00581         m_nChosenColorSel = DEFAULT_BOX_VALUE;
00582         return;
00583     }
00584
00585     for (int i = 0; i < m_nNumColors; i++)
00586     {
00587         if (GetColor(i) == crColor)
00588         {
00589             m_nChosenColorSel = i;
00590             return;
00591         }
00592     }
00593
00594     if (m_strCustomText.GetLength())
00595         m_nChosenColorSel = CUSTOM_BOX_VALUE;
00596     else
00597         m_nChosenColorSel = INVALID_Color;
00598 }
00599
00600 // Gets the dimensions of the Color cell given by (row,col)
00601 BOOL CCJColorPopup::GetCellRect(int nIndex, const LPRECT& rect)
00602 {
00603     if (nIndex == CUSTOM_BOX_VALUE)
00604     {
00605         ::SetRect(rect,
00606                   m_CustomTextRect.left,  m_CustomTextRect.top,
00607                   m_CustomTextRect.right, m_CustomTextRect.bottom);
00608         return TRUE;
00609     }
00610     else if (nIndex == DEFAULT_BOX_VALUE)
00611     {
00612         ::SetRect(rect,
00613                   m_DefaultTextRect.left,  m_DefaultTextRect.top,
00614                   m_DefaultTextRect.right, m_DefaultTextRect.bottom);
00615         return TRUE;
00616     }
00617
00618     if (nIndex < 0 || nIndex >= m_nNumColors)
00619         return FALSE;
00620
00621     rect->left = GetColumn(nIndex) * m_nBoxSize + m_nMargin;
00622     rect->top  = GetRow(nIndex) * m_nBoxSize + m_nMargin;
00623
00624     // Move everything down if we are displaying a default text area
00625     if (m_strDefaultText.GetLength())
00626         rect->top += (m_nMargin + m_DefaultTextRect.Height());
00627
00628     rect->right = rect->left + m_nBoxSize;
00629     rect->bottom = rect->top + m_nBoxSize;
00630
00631     return TRUE;
00632 }
00633
00634 // Works out an appropriate size and position of this window
00635 void CCJColorPopup::SetWindowSize()
00636 {
00637     CSize TextSize;
00638
00639     // If we are showing a custom or default text area, get the font and text size.
00640     if (m_strCustomText.GetLength() || m_strDefaultText.GetLength())
00641     {
00642         CClientDC dc(this);
00643         CFont* pOldFont = (CFont*) dc.SelectObject(&m_Font);
00644
00645         // Get the size of the custom text (if there IS custom text)
00646         TextSize = CSize(0,0);
00647         if (m_strCustomText.GetLength())
00648             TextSize = dc.GetTextExtent(m_strCustomText);
00649
00650         // Get the size of the default text (if there IS default text)
00651         if (m_strDefaultText.GetLength())
00652         {
00653             CSize DefaultSize = dc.GetTextExtent(m_strDefaultText);
00654             if (DefaultSize.cx > TextSize.cx) TextSize.cx = DefaultSize.cx;
00655             if (DefaultSize.cy > TextSize.cy) TextSize.cy = DefaultSize.cy;
00656         }
00657
00658         dc.SelectObject(pOldFont);
00659         TextSize += CSize(2*m_nMargin,2*m_nMargin);
00660
00661         // Add even more space to draw the horizontal line
00662         TextSize.cy += 2*m_nMargin + 2;
00663     }
00664
00665     // Get the number of columns and rows
00666     //m_nNumColumns = (int) sqrt((double)m_nNumColors);    // for a square window (yuk)
00667     m_nNumColumns = NUM_COLUMNS;
00668     m_nNumRows = m_nNumColors / m_nNumColumns;
00669     if (m_nNumColors % m_nNumColumns) m_nNumRows++;
00670
00671     // Get the current window position, and set the new size
00672     CRect rect;
00673     GetWindowRect(rect);
00674
00675     m_WindowRect.SetRect(rect.left, rect.top,
00676                          rect.left + m_nNumColumns*m_nBoxSize + 2*m_nMargin,
00677                          rect.top  + m_nNumRows*m_nBoxSize + 2*m_nMargin);
00678
00679     // if custom text, then expand window if necessary, and set text width as
00680     // window width
00681     if (m_strDefaultText.GetLength())
00682     {
00683         if (TextSize.cx > m_WindowRect.Width())
00684             m_WindowRect.right = m_WindowRect.left + TextSize.cx;
00685         TextSize.cx = m_WindowRect.Width()-2*m_nMargin;
00686
00687         // Work out the text area
00688         m_DefaultTextRect.SetRect(m_nMargin, m_nMargin,
00689                                   m_nMargin+TextSize.cx, 2*m_nMargin+TextSize.cy);
00690         m_WindowRect.bottom += m_DefaultTextRect.Height() + 2*m_nMargin;
00691     }
00692
00693     // if custom text, then expand window if necessary, and set text width as
00694     // window width
00695     if (m_strCustomText.GetLength())
00696     {
00697         if (TextSize.cx > m_WindowRect.Width())
00698             m_WindowRect.right = m_WindowRect.left + TextSize.cx;
00699         TextSize.cx = m_WindowRect.Width()-2*m_nMargin;
00700
00701         // Work out the text area
00702         m_CustomTextRect.SetRect(m_nMargin, m_WindowRect.Height(),
00703                                  m_nMargin+TextSize.cx,
00704                                  m_WindowRect.Height()+m_nMargin+TextSize.cy);
00705         m_WindowRect.bottom += m_CustomTextRect.Height() + 2*m_nMargin;
00706    }
00707
00708     // Need to check it'll fit on screen: Too far right?
00709     CSize ScreenSize(::GetSystemMetrics(SM_CXSCREEN), ::GetSystemMetrics(SM_CYSCREEN));
00710     if (m_WindowRect.right > ScreenSize.cx)
00711         m_WindowRect.OffsetRect(-(m_WindowRect.right - ScreenSize.cx), 0);
00712
00713     // Too far left?
00714     if (m_WindowRect.left < 0)
00715         m_WindowRect.OffsetRect( -m_WindowRect.left, 0);
00716
00717     // Bottom falling out of screen?
00718     if (m_WindowRect.bottom > ScreenSize.cy)
00719     {
00720         CRect ParentRect;
00721         m_pParent->GetWindowRect(ParentRect);
00722         m_WindowRect.OffsetRect(0, -(ParentRect.Height() + m_WindowRect.Height()));
00723     }
00724
00725     // Set the window size and position
00726     MoveWindow(m_WindowRect, TRUE);
00727 }
00728
00729 void CCJColorPopup::CreateToolTips()
00730 {
00731     // Create the tool tip
00732     if (!m_ToolTip.Create(this)) return;
00733
00734     // Add a tool for each cell
00735     for (int i = 0; i < m_nNumColors; i++)
00736     {
00737         CRect rect;
00738         if (!GetCellRect(i, rect)) continue;
00739             m_ToolTip.AddTool(this, GetColorName(i), rect, 1);
00740     }
00741 }
00742
00743 void CCJColorPopup::ChangeSelection(int nIndex)
00744 {
00745     CClientDC dc(this);        // device context for drawing
00746
00747     if (nIndex > m_nNumColors)
00748         nIndex = CUSTOM_BOX_VALUE;
00749
00750     if ((m_nCurrentSel >= 0 && m_nCurrentSel < m_nNumColors) ||
00751         m_nCurrentSel == CUSTOM_BOX_VALUE || m_nCurrentSel == DEFAULT_BOX_VALUE)
00752     {
00753         // Set Current selection as invalid and redraw old selection (this way
00754         // the old selection will be drawn unselected)
00755         int OldSel = m_nCurrentSel;
00756         m_nCurrentSel = INVALID_Color;
00757         DrawCell(&dc, OldSel);
00758     }
00759
00760     // Set the current selection as row/col and draw (it will be drawn selected)
00761     m_nCurrentSel = nIndex;
00762     DrawCell(&dc, m_nCurrentSel);
00763
00764     // Store the current Color
00765     if (m_nCurrentSel == CUSTOM_BOX_VALUE)
00766         m_pParent->SendMessage(CPN_SELCHANGE, (WPARAM) m_crInitialColor, 0);
00767     else if (m_nCurrentSel == DEFAULT_BOX_VALUE)
00768     {
00769         m_crColor = CLR_DEFAULT;
00770         m_pParent->SendMessage(CPN_SELCHANGE, (WPARAM) CLR_DEFAULT, 0);
00771     }
00772     else
00773     {
00774         m_crColor = GetColor(m_nCurrentSel);
00775         m_pParent->SendMessage(CPN_SELCHANGE, (WPARAM) m_crColor, 0);
00776     }
00777 }
00778
00779 void CCJColorPopup::EndSelection(int nMessage)
00780 {
00781     ReleaseCapture();
00782
00783     // If custom text selected, perform a custom Color selection
00784     if (nMessage != CPN_SELENDCANCEL && m_nCurrentSel == CUSTOM_BOX_VALUE)
00785     {
00786         CColorDialog dlg(m_crInitialColor, CC_FULLOPEN | CC_ANYCOLOR, this);
00787
00788         if (dlg.DoModal() == IDOK)
00789             m_crColor = dlg.GetColor();
00790         else
00791             nMessage = CPN_SELENDCANCEL;
00792     }
00793
00794     if (nMessage == CPN_SELENDCANCEL)
00795         m_crColor = m_crInitialColor;
00796
00797     m_pParent->SendMessage(nMessage, (WPARAM) m_crColor, 0);
00798
00799     DestroyWindow();
00800 }
00801
00802 void CCJColorPopup::DrawCell(CDC* pDC, int nIndex)
00803 {
00804     // For the Custom Text area
00805     if (m_strCustomText.GetLength() && nIndex == CUSTOM_BOX_VALUE)
00806     {
00807         // The extent of the actual text button
00808         CRect TextButtonRect = m_CustomTextRect;
00809         TextButtonRect.top += 2*m_nMargin;
00810
00811         // Fill background
00812         pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DFACE));
00813
00814         // Draw horizontal line
00815         pDC->FillSolidRect(m_CustomTextRect.left+2*m_nMargin, m_CustomTextRect.top,
00816                            m_CustomTextRect.Width()-4*m_nMargin, 1, ::GetSysColor(COLOR_3DSHADOW));
00817         pDC->FillSolidRect(m_CustomTextRect.left+2*m_nMargin, m_CustomTextRect.top+1,
00818                            m_CustomTextRect.Width()-4*m_nMargin, 1, ::GetSysColor(COLOR_3DHILIGHT));
00819
00820         TextButtonRect.DeflateRect(1,1);
00821
00822         // fill background
00823         if (m_nChosenColorSel == nIndex && m_nCurrentSel != nIndex)
00824             pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DLIGHT));
00825         else
00826             pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DFACE));
00827
00828         // Draw button
00829         if (m_nCurrentSel == nIndex)
00830             pDC->DrawEdge(TextButtonRect, BDR_RAISEDINNER, BF_RECT);
00831         else if (m_nChosenColorSel == nIndex)
00832             pDC->DrawEdge(TextButtonRect, BDR_SUNKENOUTER, BF_RECT);
00833
00834         // Draw custom text
00835         CFont *pOldFont = (CFont*) pDC->SelectObject(&m_Font);
00836         pDC->SetBkMode(TRANSPARENT);
00837         pDC->DrawText(m_strCustomText, TextButtonRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
00838         pDC->SelectObject(pOldFont);
00839
00840         return;
00841     }
00842
00843     // For the Default Text area
00844     if (m_strDefaultText.GetLength() && nIndex == DEFAULT_BOX_VALUE)
00845     {
00846         // Fill background
00847         pDC->FillSolidRect(m_DefaultTextRect, ::GetSysColor(COLOR_3DFACE));
00848
00849         // The extent of the actual text button
00850         CRect TextButtonRect = m_DefaultTextRect;
00851         TextButtonRect.DeflateRect(1,1);
00852
00853         // fill background
00854         if (m_nChosenColorSel == nIndex && m_nCurrentSel != nIndex)
00855             pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DLIGHT));
00856         else
00857             pDC->FillSolidRect(TextButtonRect, ::GetSysColor(COLOR_3DFACE));
00858
00859         // Draw thin line around text
00860         CRect LineRect = TextButtonRect;
00861         LineRect.DeflateRect(2*m_nMargin,2*m_nMargin);
00862         CPen pen(PS_SOLID, 1, ::GetSysColor(COLOR_3DSHADOW));
00863         CPen* pOldPen = pDC->SelectObject(&pen);
00864         pDC->SelectStockObject(NULL_BRUSH);
00865         pDC->Rectangle(LineRect);
00866         pDC->SelectObject(pOldPen);
00867
00868         // Draw button
00869         if (m_nCurrentSel == nIndex)
00870             pDC->DrawEdge(TextButtonRect, BDR_RAISEDINNER, BF_RECT);
00871         else if (m_nChosenColorSel == nIndex)
00872             pDC->DrawEdge(TextButtonRect, BDR_SUNKENOUTER, BF_RECT);
00873
00874         // Draw custom text
00875         CFont *pOldFont = (CFont*) pDC->SelectObject(&m_Font);
00876         pDC->SetBkMode(TRANSPARENT);
00877         pDC->DrawText(m_strDefaultText, TextButtonRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
00878         pDC->SelectObject(pOldFont);
00879
00880         // fix potential resource leak - KStowell - 10-21-99
00881         pen.DeleteObject();
00882         return;
00883     }
00884
00885     CRect rect;
00886     if (!GetCellRect(nIndex, rect)) return;
00887
00888     // Select and realize the palette
00889     CPalette* pOldPalette = NULL;
00890     if (pDC->GetDeviceCaps(RASTERCAPS) & RC_PALETTE)
00891     {
00892         pOldPalette = pDC->SelectPalette(&m_Palette, FALSE);
00893         pDC->RealizePalette();
00894     }
00895
00896     // fill background
00897     if (m_nChosenColorSel == nIndex && m_nCurrentSel != nIndex)
00898         pDC->FillSolidRect(rect, ::GetSysColor(COLOR_3DHILIGHT));
00899     else
00900         pDC->FillSolidRect(rect, ::GetSysColor(COLOR_3DFACE));
00901
00902     // Draw button
00903     if (m_nCurrentSel == nIndex)
00904         pDC->DrawEdge(rect, BDR_RAISEDINNER, BF_RECT);
00905     else if (m_nChosenColorSel == nIndex)
00906         pDC->DrawEdge(rect, BDR_SUNKENOUTER, BF_RECT);
00907
00908     CBrush brush(PALETTERGB(GetRValue(GetColor(nIndex)),
00909                             GetGValue(GetColor(nIndex)),
00910                             GetBValue(GetColor(nIndex)) ));
00911     CPen   pen;
00912     pen.CreatePen(PS_SOLID, 1, ::GetSysColor(COLOR_3DSHADOW));
00913
00914     CBrush* pOldBrush = (CBrush*) pDC->SelectObject(&brush);
00915     CPen*   pOldPen   = (CPen*)   pDC->SelectObject(&pen);
00916
00917     // Draw the cell Color
00918     rect.DeflateRect(m_nMargin+1, m_nMargin+1);
00919     pDC->Rectangle(rect);
00920
00921     // restore DC and cleanup
00922     pDC->SelectObject(pOldBrush);
00923     pDC->SelectObject(pOldPen);
00924     brush.DeleteObject();
00925     pen.DeleteObject();
00926
00927     if (pOldPalette && pDC->GetDeviceCaps(RASTERCAPS) & RC_PALETTE)
00928         pDC->SelectPalette(pOldPalette, FALSE);
00929 }
00930
00931 BOOL CCJColorPopup::OnQueryNewPalette()
00932 {
00933     Invalidate();
00934     return CWnd::OnQueryNewPalette();
00935 }
00936
00937 void CCJColorPopup::OnPaletteChanged(CWnd* pFocusWnd)
00938 {
00939     CWnd::OnPaletteChanged(pFocusWnd);
00940
00941     if (pFocusWnd->GetSafeHwnd() != GetSafeHwnd())
00942         Invalidate();
00943 }
00944
00945 void CCJColorPopup::OnKillFocus(CWnd* pNewWnd)
00946 {
00947     CWnd::OnKillFocus(pNewWnd);
00948
00949     ReleaseCapture();
00950     //DestroyWindow(); - causes crash when Custom Color dialog appears.
00951 }
00952
00953 // KillFocus problem fix suggested by Paul Wilkerson.
00954 #if _MFC_VER < 0x700
00955 void CCJColorPopup::OnActivateApp(BOOL bActive, HTASK hTask)
00956 #else
00957 void CCJColorPopup::OnActivateApp(BOOL bActive, DWORD hTask)
00958 #endif
00959 {
00960     CWnd::OnActivateApp(bActive, hTask);
00961
00962     // If Deactivating App, cancel this selection
00963     if (!bActive)
00964          EndSelection(CPN_SELENDCANCEL);
00965 }
00966
00967 void CCJColorPopup::UpdateFont()
00968 {
00969     m_Font.DeleteObject();
00970     NONCLIENTMETRICS ncm;
00971     ncm.cbSize = sizeof(ncm);
00972     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00973     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00974     SetFont(&m_Font);
00975 }
00976
00977 BOOL CCJColorPopup::OnEraseBkgnd(CDC* pDC)
00978 {
00979     // KStowell - overridden for flicker-free drawing.
00980     UNUSED_ALWAYS(pDC);
00981     return TRUE;
00982 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TGraphCurSelector Member List

This is the complete list of members for TGraphCurSelector, including all inherited members.

CACHE_INTERVAL enum value | TGraphCurSelector | [private]
construct_() | TGraphCurSelector | [inline, private]
GetDiskNodeSel() const | TGraphCurSelector | [inline]
GetFirstSel() const | TGraphCurSelector | [inline]
GetLastSel() const | TGraphCurSelector | [inline]
GetNewSel() const | TGraphCurSelector | [inline]
GetSel1() const | TGraphCurSelector | [inline]
GetSel2() const | TGraphCurSelector | [inline]
getWinLogData_(CLogNode *node) const | TGraphCurSelector | [inline, private]
m_bRestart | TGraphCurSelector | [private]
m_diskNode | TGraphCurSelector | [private]
m_disknodeEntryInfo | TGraphCurSelector | [private]
m_firstSel | TGraphCurSelector | [private]
m_lastSel | TGraphCurSelector | [private]
m_newSel | TGraphCurSelector | [private]
m_offset | TGraphCurSelector | [private]
m_restartPointerCache | TGraphCurSelector | [private]
m_sel1 | TGraphCurSelector | [private]
m_sel2 | TGraphCurSelector | [private]
m_selId | TGraphCurSelector | [private]
m_view | TGraphCurSelector | [private]
TGraphCurSelector(int offset_from_sel, CGraphView *view, CLogNode *sel1, CLogNode *sel2) | TGraphCurSelector | [inline, private]
TGraphCurSelector(int offset_from_sel, CGraphView *view) | TGraphCurSelector | [inline]
TraverseGraph(CLogNode *node) | TGraph |
TraverseNode(CLogNode *node) | TGraphCurSelector | [inline, virtual]

Generated on Sat Aug 7 22:57:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/TipDlg.cpp Source File

WinCvs/TipDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #include "stdafx.h"
00022 #include "resource.h"
00023 // CG: This file added by 'Tip of the Day' component.
00024
00025 #include <winreg.h>
00026 #include <sys\stat.h>
00027 #include <sys\types.h>
00028
00029 #include "wincvs.h"
00030 #include "CPStr.h"
00031 #include "CvsAlert.h"
00032
00033 #ifdef _DEBUG
00034 #define new DEBUG_NEW
00035 #undef THIS_FILE
00036 static char THIS_FILE[] = __FILE__;
00037 #endif
00038
00040 // CTipDlg dialog
00041
00042 #define MAX_BUFLEN 1000
00043
00044 static const TCHAR szSection[] = _T("Tip");
00045 static const TCHAR szIntFilePos[] = _T("FilePos");
00046 static const TCHAR szTimeStamp[] = _T("TimeStamp");
00047 static const TCHAR szIntStartup[] = _T("StartUp");
00048
00049 CTipDlg::CTipDlg(CWnd* pParent /*=NULL*/)
00050     : CDialog(IDD_TIP, pParent)
00051 {
00052     //{{AFX_DATA_INIT(CTipDlg)
00053     m_bStartup = TRUE;
00054     //}}AFX_DATA_INIT
00055
00056     // We need to find out what the startup and file position parameters are
00057     // If startup does not exist, we assume that the Tips on startup is checked TRUE.
00058     CWincvsApp* pApp = (CWincvsApp *)AfxGetApp();
00059     m_bStartup = !pApp->GetProfileInt(szSection, szIntStartup, 0);
00060     UINT iFilePos = pApp->GetProfileInt(szSection, szIntFilePos, 0);
00061     CStr tips;
00062     pApp->GetAppPath(tips);
00063     if(!tips.empty() && !tips.endsWith(kPathDelimiter))
00064     {
00065         tips << kPathDelimiter;
00066     }
00067     tips << "tips.txt";
00068
00069     // Now try to open the tips file
00070     m_pStream = fopen(tips, "r");
00071     if (m_pStream == NULL)
00072     {
00073         m_strTip.LoadString(CG_IDS_FILE_ABSENT);
00074         return;
00075     }
00076
00077     // If the timestamp in the INI file is different from the timestamp of
00078     // the tips file, then we know that the tips file has been modified
00079     // Reset the file position to 0 and write the latest timestamp to the
00080     // ini file
00081     struct _stat buf;
00082     _fstat(_fileno(m_pStream), &buf);
00083     CString strCurrentTime = ctime(&buf.st_ctime);
00084     strCurrentTime.TrimRight();
00085     CString strStoredTime =
00086         pApp->GetProfileString(szSection, szTimeStamp, NULL);
00087     if (strCurrentTime != strStoredTime)
00088     {
00089         iFilePos = 0;
00090         pApp->WriteProfileString(szSection, szTimeStamp, strCurrentTime);
00091     }
00092
00093     if (fseek(m_pStream, iFilePos, SEEK_SET) != 0)
00094     {
00095         CString errorMsg;
00096         errorMsg.LoadString(CG_IDP_FILE_CORRUPT);
00097
00098         CvsAlert(kCvsAlertStopIcon,
00099             errorMsg, NULL,
00100             BUTTONTITLE_OK, NULL).ShowAlert();
00101     }
00102     else
00103     {
00104         GetNextTipString(m_strTip);
00105     }
00106 }
00107
00108 CTipDlg::~CTipDlg()
00109 {
00110     // This destructor is executed whether the user had pressed the escape key
00111     // or clicked on the close button. If the user had pressed the escape key,
00112     // it is still required to update the filepos in the ini file with the
00113     // latest position so that we don't repeat the tips!
00114
00115     // But make sure the tips file existed in the first place....
00116     if (m_pStream != NULL)
00117     {
00118         CWinApp* pApp = AfxGetApp();
00119         pApp->WriteProfileInt(szSection, szIntFilePos, ftell(m_pStream));
00120         fclose(m_pStream);
00121     }
00122 }
00123
00124 void CTipDlg::DoDataExchange(CDataExchange* pDX)
00125 {
00126     CDialog::DoDataExchange(pDX);
00127     //{{AFX_DATA_MAP(CTipDlg)
00128     DDX_Check(pDX, IDC_STARTUP, m_bStartup);
00129     DDX_Text(pDX, IDC_TIPSTRING, m_strTip);
00130     //}}AFX_DATA_MAP
00131 }
00132
00133 BEGIN_MESSAGE_MAP(CTipDlg, CDialog)
00134     //{{AFX_MSG_MAP(CTipDlg)
00135     ON_BN_CLICKED(IDC_NEXTTIP, OnNextTip)
00136     ON_WM_CTLCOLOR()
00137     ON_WM_PAINT()
00138     //}}AFX_MSG_MAP
00139 END_MESSAGE_MAP()
00140
00142 // CTipDlg message handlers
00143
00144 void CTipDlg::OnNextTip()
00145 {
00146     GetNextTipString(m_strTip);
00147     UpdateData(FALSE);
00148 }
00149
00150 void CTipDlg::GetNextTipString(CString& strNext)
00151 {
00152     LPTSTR lpsz = strNext.GetBuffer(MAX_BUFLEN);
00153
00154     // This routine identifies the next string that needs to be
00155     // read from the tips file
00156     BOOL bStop = FALSE;
00157     while (!bStop)
00158     {
00159         if (_fgetts(lpsz, MAX_BUFLEN, m_pStream) == NULL)
00160         {
00161             // We have either reached EOF or encountered some problem
00162             // In both cases reset the pointer to the beginning of the file
00163             // This behavior is same as VC++ Tips file
00164             if (fseek(m_pStream, 0, SEEK_SET) != 0)
00165             {
00166                 CString errorMsg;
00167                 errorMsg.LoadString(CG_IDP_FILE_CORRUPT);
00168
00169                 CvsAlert(kCvsAlertStopIcon,
00170                     errorMsg, NULL,
00171                     BUTTONTITLE_OK, NULL).ShowAlert();
00172             }
00173         }
00174         else
00175         {
00176             if (*lpsz != ' ' && *lpsz != '\t' &&
00177                 *lpsz != '\n' && *lpsz != ';')
00178             {
00179                 // There should be no space at the beginning of the tip
00180                 // This behavior is same as VC++ Tips file
00181                 // Comment lines are ignored and they start with a semicolon
00182                 bStop = TRUE;
00183             }
00184         }
00185     }
00186     strNext.ReleaseBuffer();
00187 }
00188
00189 HBRUSH CTipDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
00190 {
00191     if (pWnd->GetDlgCtrlID() == IDC_TIPSTRING)
00192         return (HBRUSH)GetStockObject(WHITE_BRUSH);
00193
00194     return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
00195 }
00196
00197 void CTipDlg::OnOK()
00198 {
00199     CDialog::OnOK();
00200
00201     // Update the startup information stored in the INI file
00202     CWinApp* pApp = AfxGetApp();
00203     pApp->WriteProfileInt(szSection, szIntStartup, !m_bStartup);
00204 }
00205
00206 BOOL CTipDlg::OnInitDialog()
00207 {
00208     CDialog::OnInitDialog();
00209
00210     // If Tips file does not exist then disable NextTip
00211     if (m_pStream == NULL)
00212         GetDlgItem(IDC_NEXTTIP)->EnableWindow(FALSE);
00213
00214     return TRUE;  // return TRUE unless you set the focus to a control
00215 }
00216
00217 void CTipDlg::OnPaint()
00218 {
00219     CPaintDC dc(this); // device context for painting
00220
00221     // Get paint area for the big static control
00222     CWnd* pStatic = GetDlgItem(IDC_BULB);
00223     CRect rect;
00224     pStatic->GetWindowRect(&rect);
00225     ScreenToClient(&rect);
00226
00227     // Paint the background white.
00228     CBrush brush;
00229     brush.CreateStockObject(WHITE_BRUSH);
00230     dc.FillRect(rect, &brush);
00231
00232     // Load bitmap and get dimensions of the bitmap
00233     CBitmap bmp;
00234     bmp.LoadBitmap(IDB_LIGHTBULB);
00235     BITMAP bmpInfo;
00236     bmp.GetBitmap(&bmpInfo);
00237
00238     // Draw bitmap in top corner and validate only top portion of window
00239     CDC dcTmp;
00240     dcTmp.CreateCompatibleDC(&dc);
00241     dcTmp.SelectObject(&bmp);
00242     rect.bottom = bmpInfo.bmHeight + rect.top;
00243     dc.BitBlt(rect.left, rect.top, rect.Width(), rect.Height(),
00244         &dcTmp, 0, 0, SRCCOPY);
00245
00246     // Draw out "Did you know..." message next to the bitmap
00247     CString strMessage;
00248     strMessage.LoadString(CG_IDS_DIDYOUKNOW);
00249     rect.left += bmpInfo.bmWidth;
00250     dc.DrawText(strMessage, rect, DT_VCENTER | DT_SINGLELINE);
00251
00252     // Do not call CDialog::OnPaint() for painting messages
00253 }
00254
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoCommandLineHandler Member List

This is the complete list of members for KoCommandLineHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoCommandLineHandler() | KoCommandLineHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoCommandLineHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoCommandLineHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CProgress Member List

This is the complete list of members for CProgress, including all inherited members.

CProgress(bool interruptable, const char *title=0L, kProgressType progressType=kProgressBar) | CProgress |
ForceAbort(void) | CProgress | [private]
HasAborted(void) const | CProgress | [inline]
m_abort | CProgress | [private]
m_dlg | CProgress | [private]
SetProgress(int percent) | CProgress |
SetProgress(const char *text) | CProgress |
~CProgress() | CProgress | [virtual]

Generated on Sat Aug 7 22:55:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFontCombo.h Source File

WinCvs/CJLib/Include/CJFontCombo.h

Go to the documentation of this file.
00001
00002 // CJFontCombo.h : header file
00003 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00004 // See ReadMe.txt for TERMS OF USE.
00005 //
00006 // Based on the article 'Owner Drawn Font Selection ComboBox' by Girish Bharadwaj
00007 // http://www.codeguru.com/misc/font_selection_combo.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/Include/CJFontCombo.h $
00015  *
00016  * $History: CJFontCombo.h $
00017  *
00018  * *****************  Version 4  *****************
00019  * User: Kirk Stowell Date: 10/31/99   Time: 11:01p
00020  * Updated in $/CodeJock/Include
00021  * Overrode OnEraseBkgnd(...) and OnPaint() for flicker free drawing.
00022  *
00023  * *****************  Version 3  *****************
00024  * User: Kirk Stowell Date: 10/26/99   Time: 10:41p
00025  * Updated in $/CodeJock/Include
00026  * Made class methods virtual for inheritance purposes. Added the
00027  * DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC macros to CCJFontCombo for access
00028  * to run-time information
00029  *
00030  * *****************  Version 2  *****************
00031  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00032  * Updated in $/CodeJockey/Include
00033  * Updated copyright and contact information.
00034  *
00035  * *****************  Version 1  *****************
00036  * User: Kirk Stowell Date: 7/26/99    Time: 2:11p
00037  * Created in $/CodeJockey/Include
00038  *
00039  ***************************************************************************/
00041
00042 #ifndef __CJFONTCOMBO_H__
00043 #define __CJFONTCOMBO_H__
00044
00045 #if _MSC_VER >= 1000
00046 #pragma once
00047 #endif // _MSC_VER >= 1000
00048
00050 // CCJFontCombo window
00051 class _CJX_EXT_CLASS CCJFontCombo : public CComboBox
00052 {
00053     DECLARE_DYNAMIC(CCJFontCombo)
00054
00055 // Construction
00056 public:
00057      CCJFontCombo();
00058
00059 // Attributes
00060 protected:
00061
00062     COLORREF    m_clrHilight;
00063     COLORREF    m_clrNormalText;
00064     COLORREF    m_clrHilightText;
00065     COLORREF    m_clrBkgnd;
00066
00067 // Operations
00068 public:
00069
00070     virtual int GetSelFont(LOGFONT& logFont);
00071     virtual void SetHilightColors(COLORREF clrHilight,COLORREF clrHilightText);
00072     virtual void SetNormalColors(COLORREF clrBkgnd,COLORREF clrNormalText);
00073     static BOOL CALLBACK EnumFontProc(LPLOGFONT lpLogFont, LPTEXTMETRIC lpTextMetric, short nFontType, LPHANDLE lpData);
00074
00075 protected:
00076
00077     virtual void InitializeFonts();
00078
00079 // Overrides
00080     // ClassWizard generated virtual function overrides
00081     //{{AFX_VIRTUAL(CCJFontCombo)
00082     public:
00083     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00084     virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00085     protected:
00086     virtual void PreSubclassWindow();
00087     //}}AFX_VIRTUAL
00088
00089 // Implementation
00090 public:
00091      virtual ~CCJFontCombo();
00092
00093 // Generated message map functions
00094 protected:
00095
00096     //{{AFX_MSG(CCJFontCombo)
00097     afx_msg void OnDestroy();
00098     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00099     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00100     afx_msg void OnPaint();
00101     //}}AFX_MSG
00102     DECLARE_MESSAGE_MAP()
00103 };
00104
00106 //  Inline Functions
00108
00109 _CJXLIB_INLINE void CCJFontCombo::SetHilightColors( COLORREF clrHilight, COLORREF clrHilightText )
00110     { m_clrHilight = clrHilight; m_clrHilightText = clrHilightText; };
00111
00112 _CJXLIB_INLINE void CCJFontCombo::SetNormalColors( COLORREF clrBkgnd, COLORREF clrNormalText )
00113     { m_clrNormalText = clrNormalText; m_clrBkgnd = clrBkgnd; };
00114
00116
00117 //{{AFX_INSERT_LOCATION}}
00118 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00119
00120 #endif // __CJFONTCOMBO_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportFilterDlg.h Source File

common/ImportFilterDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * ImportFilterDlg.h - edit filtered import
00023  */
00024
00025 #if !defined(AFX_IMPORTFILDERDLG_H__CFB7AA41_BDDB_11D1_B965_0020AF51D9DA__INCLUDED_)
00026 #define AFX_IMPORTFILDERDLG_H__CFB7AA41_BDDB_11D1_B965_0020AF51D9DA__INCLUDED_
00027
00028 #include "ImportFilter.h"
00029
00030 #ifdef WIN32
00031 #   include "HHelpSupport.h"
00032 #endif
00033
00034 bool CompatImportFilter(const char* path, ReportConflict*& entries, ReportWarning*& warnings);
00035
00036 #if _MSC_VER >= 1000
00037 #pragma once
00038 #endif // _MSC_VER >= 1000
00039
00040 #ifdef WIN32
00041
00042 // CImportFilterDlg dialog
00043
00044 class CImportFilterDlg : public CHHelpDialog
00045 {
00046 // Construction
00047 public:
00048     CImportFilterDlg(ReportConflict* entries, ReportWarning* warnings,
00049         CWnd* pParent = NULL);   // standard constructor
00050
00051 // Dialog Data
00052     //{{AFX_DATA(CImportFilterDlg)
00053     enum { IDD = IDD_IMPORTFILTER };
00054     CListCtrl   m_list;
00055     CButton m_edit;
00056     //}}AFX_DATA
00057
00058
00059 // Overrides
00060     // ClassWizard generated virtual function overrides
00061     //{{AFX_VIRTUAL(CImportFilterDlg)
00062     protected:
00063     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00064     //}}AFX_VIRTUAL
00065
00066 // Implementation
00067 protected:
00068     // Generated message map functions
00069     //{{AFX_MSG(CImportFilterDlg)
00070     afx_msg void OnEditentry();
00071     virtual BOOL OnInitDialog();
00072     afx_msg void OnDblclkListentries(NMHDR* pNMHDR, LRESULT* pResult);
00073     afx_msg void OnHelp();
00074     //}}AFX_MSG
00075     DECLARE_MESSAGE_MAP()
00076 private:
00077     // Data members
00078     CImageList m_imageList;
00079     ReportConflict* m_entries;
00080     ReportWarning* m_warnings;
00082     // Methods
00083     virtual void InitHelpID();
00084 };
00085
00086 class CImportWarning : public CHHelpDialog
00087 {
00088 // Construction
00089 public:
00090     CImportWarning(ReportWarning* warn, CWnd* pParent = NULL);   // standard constructor
00091
00092 // Dialog Data
00093     //{{AFX_DATA(CImportWarning)
00094     enum { IDD = IDD_WARNINGDESC };
00095     CString m_desc;
00096     //}}AFX_DATA
00097
00098
00099 // Overrides
00100     // ClassWizard generated virtual function overrides
00101     //{{AFX_VIRTUAL(CImportWarning)
00102     protected:
00103     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00104     //}}AFX_VIRTUAL
00105
00106 // Implementation
00107 protected:
00108
00109     // Generated message map functions
00110     //{{AFX_MSG(CImportWarning)
00111     afx_msg void OnHelp();
00112     //}}AFX_MSG
00113     DECLARE_MESSAGE_MAP()
00114 private:
00115     // Methods
00116     virtual void InitHelpID();
00117 };
00118
00119 class CImportEntry : public CHHelpDialog
00120 {
00121 // Construction
00122 public:
00123     CImportEntry(ReportConflict* entry, CWnd* pParent = NULL);   // standard constructor
00124
00125 // Dialog Data
00126     //{{AFX_DATA(CImportEntry)
00127     enum { IDD = IDD_ENTRYDESC };
00128     CString m_desc;
00129     int m_radios;
00130     //}}AFX_DATA
00131
00132
00133 // Overrides
00134     // ClassWizard generated virtual function overrides
00135     //{{AFX_VIRTUAL(CImportEntry)
00136     protected:
00137     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00138     //}}AFX_VIRTUAL
00139
00140 // Implementation
00141 protected:
00142
00143     // Generated message map functions
00144     //{{AFX_MSG(CImportEntry)
00145     afx_msg void OnHelp();
00146     //}}AFX_MSG
00147     DECLARE_MESSAGE_MAP()
00148 private:
00149     // Methods
00150     virtual void InitHelpID();
00151 };
00152
00153 //{{AFX_INSERT_LOCATION}}
00154 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00155
00156 #endif /* WIN32 */
00157
00158 #ifdef qMacCvsPP
00159 #include <LOutlineTable.h>
00160 #include <LCommander.h>
00161 #include <LOutlineItem.h>
00162 #include <LString.h>
00163
00164 class COutlineTable : public LOutlineTable, public LCommander
00165 {
00166 public:
00167     enum { class_ID = 'Cout' };
00168
00169     COutlineTable( LStream *inStream );
00170     virtual ~COutlineTable();
00171 protected:
00172     virtual void FinishCreateSelf();
00173 private:
00174     // defensive programming
00175     COutlineTable();
00176     COutlineTable( const COutlineTable &inOriginal );
00177     COutlineTable&      operator=( const COutlineTable &inOriginal );
00178 };
00179
00180 class CImportItem : public LOutlineItem
00181 {
00182 public:
00183     virtual void EditImportCell(void) = 0;
00184 };
00185
00186 class CEntryItem : public CImportItem
00187 {
00188 public:
00189     CEntryItem(ReportConflict * entry);
00190     virtual ~CEntryItem();
00191
00192     virtual void EditImportCell(void);
00193 protected:
00194
00195     virtual void GetDrawContentsSelf(const STableCell& inCell, SOutlineDrawContents& ioDrawContents);
00196
00197     virtual void DrawRowAdornments(const Rect& inLocalRowRect);
00198
00199     virtual void DoubleClick(const STableCell& inCell, const SMouseDownEvent& inMouseDown,
00200         const SOutlineDrawContents& inDrawContents, Boolean inHitText);
00201
00202     ReportConflict * mEntry;
00203 private:
00204     // defensive programming
00205     CEntryItem();
00206     CEntryItem( const CEntryItem &inOriginal );
00207     CEntryItem& operator=( const CEntryItem &inOriginal );
00208 };
00209
00210 class CWarningItem : public CImportItem
00211 {
00212 public:
00213     CWarningItem(ReportWarning * warn);
00214     virtual ~CWarningItem();
00215
00216     virtual void EditImportCell(void);
00217 protected:
00218
00219     virtual void GetDrawContentsSelf(const STableCell& inCell, SOutlineDrawContents& ioDrawContents);
00220
00221     virtual void DrawRowAdornments(const Rect& inLocalRowRect);
00222
00223     virtual void DoubleClick(const STableCell& inCell, const SMouseDownEvent& inMouseDown,
00224         const SOutlineDrawContents& inDrawContents, Boolean inHitText);
00225
00226     ReportWarning * mEntry;
00227 private:
00228     // defensive programming
00229     CWarningItem();
00230     CWarningItem( const CWarningItem &inOriginal );
00231     CWarningItem&   operator=( const CWarningItem &inOriginal );
00232 };
00233 #endif /* qMacCvsPP */
00234
00235 #endif // !defined(AFX_IMPORTFILDERDLG_H__CFB7AA41_BDDB_11D1_B965_0020AF51D9DA__INCLUDED_)
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGraphRectTracker Member List

This is the complete list of members for CGraphRectTracker, including all inherited members.

CGraphRectTracker(CGraphView *view) | CGraphRectTracker | [inline]
m_view | CGraphRectTracker | [protected]
OnChangedRect(const CRect &rectOld) | CGraphRectTracker | [virtual]

Generated on Sat Aug 7 22:52:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UColor Member List

This is the complete list of members for UColor, including all inherited members.

b | UColor
g | UColor
r | UColor

Generated on Sat Aug 7 22:50:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

EntnodePath Member List

This is the complete list of members for EntnodePath, including all inherited members.

EntnodePath(const char *path) | EntnodePath |
GetFolderPath() const | EntnodePath | [inline]
GetFullPathName(UStr &resPath, const char *name) const | EntnodePath |
m_fullpath | EntnodePath | [protected]
m_ref | EntnodePath | [protected]
Ref() | EntnodePath | [inline]
UnRef() | EntnodePath | [inline]
~EntnodePath() | EntnodePath | [protected, virtual]

Generated on Sat Aug 7 22:52:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJHyperLink.cpp Source File

WinCvs/CJLib/CJLibrary/CJHyperLink.cpp

Go to the documentation of this file.
00001 // CJHyperLink.cpp : implementation file
00002 //
00003 // CCJHyperLink static control. Will open the default browser with the given URL
00004 // when the user clicks on the link.
00005 //
00006 // Copyright (C) 1997, 1998 Chris Maunder
00007 // All rights reserved. May not be sold for profit.
00008 //
00009 // Thanks to Pål K. Tønder for auto-size and window caption changes.
00010 //
00011 // "GotoURL" function by Stuart Patterson
00012 // As seen in the August, 1997 Windows Developer's Journal.
00013 // Copyright 1997 by Miller Freeman, Inc. All rights reserved.
00014 // Modified by Chris Maunder to use TCHARs instead of chars.
00015 //
00016 // "Default hand cursor" from Paul DiLascia's Jan 1998 MSJ article.
00017 //
00019 /****************************************************************************
00020  *
00021  * $Date: 1999/11/30 21:45:49 $
00022  * $Revision: 1.1.1.3 $
00023  * $Archive: /CodeJock/CJLibrary/CJHyperLink.cpp $
00024  *
00025  * $History: CJHyperLink.cpp $
00026  *
00027  * *****************  Version 5  *****************
00028  * User: Kirk Stowell Date: 10/14/99   Time: 11:46p
00029  * Updated in $/CodeJock/CJLibrary
00030  * Fixed memory leak caused by not freeing link cursor. Thanks to Matt
00031  * Davies [matt.davies@codehammer.com] for help with this.
00032  *
00033  * *****************  Version 4  *****************
00034  * User: Kirk Stowell Date: 10/14/99   Time: 12:26p
00035  * Updated in $/CodeJock/CJLibrary
00036  * Added source control history to file header.
00037  *
00038  ***************************************************************************/
00040
00041 #include "stdafx.h"
00042 #include "CJHyperLink.h"
00043
00044 #ifdef _DEBUG
00045 #define new DEBUG_NEW
00046 #undef THIS_FILE
00047 static char THIS_FILE[] = __FILE__;
00048 #endif
00049
00050 #define TOOLTIP_ID 1
00051
00053 // CCJHyperLink
00054
00055 CCJHyperLink::CCJHyperLink()
00056 {
00057     m_hLinkCursor       = NULL;                 // No cursor as yet
00058     m_crLinkColor      = RGB(  0,   0, 238);   // Blue
00059     m_crVisitedColor   = RGB( 85,  26, 139);   // Purple
00060     m_crHoverColor     = ::GetSysColor(COLOR_HIGHLIGHT);
00061     m_bOverControl      = FALSE;                // Cursor not yet over control
00062     m_bVisited          = FALSE;                // Hasn't been visited yet.
00063     m_bUnderline        = TRUE;                 // Underline the link?
00064     m_bAdjustToFit      = TRUE;                 // Resize the window to fit the text?
00065     m_strURL.Empty();
00066 }
00067
00068 CCJHyperLink::~CCJHyperLink()
00069 {
00070     m_Font.DeleteObject();
00071     if (m_hLinkCursor) {
00072         DestroyCursor(m_hLinkCursor);
00073     }
00074 }
00075
00076 BEGIN_MESSAGE_MAP(CCJHyperLink, CStatic)
00077     //{{AFX_MSG_MAP(CCJHyperLink)
00078     ON_CONTROL_REFLECT(STN_CLICKED, OnClicked)
00079     ON_WM_CTLCOLOR_REFLECT()
00080     ON_WM_SETCURSOR()
00081     ON_WM_MOUSEMOVE()
00082     //}}AFX_MSG_MAP
00083 END_MESSAGE_MAP()
00084
00086 // CCJHyperLink message handlers
00087
00088 BOOL CCJHyperLink::PreTranslateMessage(MSG* pMsg)
00089 {
00090     m_ToolTip.RelayEvent(pMsg);
00091     return CStatic::PreTranslateMessage(pMsg);
00092 }
00093
00094 void CCJHyperLink::OnClicked()
00095 {
00096     int result = (int)GotoURL(m_strURL, SW_SHOW);
00097     m_bVisited = (result > HINSTANCE_ERROR);
00098     if (!m_bVisited) {
00099         MessageBeep(MB_ICONEXCLAMATION);     // Unable to follow link
00100         ReportError(result);
00101     } else
00102         SetVisited();                        // Repaint to show visited Color
00103 }
00104
00105 HBRUSH CCJHyperLink::CtlColor(CDC* pDC, UINT nCtlColor)
00106 {
00107 #ifdef _DEBUG
00108     ASSERT(nCtlColor == CTLCOLOR_STATIC);
00109 #else
00110     UNUSED_ALWAYS( nCtlColor );
00111 #endif
00112
00113     if (m_bOverControl)
00114         pDC->SetTextColor(m_crHoverColor);
00115     else if (m_bVisited)
00116         pDC->SetTextColor(m_crVisitedColor);
00117     else
00118         pDC->SetTextColor(m_crLinkColor);
00119
00120     // transparent text.
00121     pDC->SetBkMode(TRANSPARENT);
00122     return (HBRUSH)GetStockObject(NULL_BRUSH);
00123 }
00124
00125 void CCJHyperLink::OnMouseMove(UINT nFlags, CPoint point)
00126 {
00127     CStatic::OnMouseMove(nFlags, point);
00128
00129     if (m_bOverControl)        // Cursor is currently over control
00130     {
00131         CRect rect;
00132         GetClientRect(rect);
00133
00134         if (!rect.PtInRect(point))
00135         {
00136             m_bOverControl = FALSE;
00137             ReleaseCapture();
00138             RedrawWindow();
00139             return;
00140         }
00141     }
00142     else                      // Cursor has just moved over control
00143     {
00144         m_bOverControl = TRUE;
00145         RedrawWindow();
00146         SetCapture();
00147     }
00148 }
00149
00150 BOOL CCJHyperLink::OnSetCursor(CWnd* /*pWnd*/, UINT /*nHitTest*/, UINT /*message*/)
00151 {
00152     if (m_hLinkCursor)
00153     {
00154         ::SetCursor(m_hLinkCursor);
00155         return TRUE;
00156     }
00157     return FALSE;
00158 }
00159
00160 void CCJHyperLink::PreSubclassWindow()
00161 {
00162     // We want to get mouse clicks via STN_CLICKED
00163     DWORD dwStyle = GetStyle();
00164     ::SetWindowLong(GetSafeHwnd(), GWL_STYLE, dwStyle | SS_NOTIFY);
00165
00166     // Set the URL as the window text
00167     if (m_strURL.IsEmpty())
00168         GetWindowText(m_strURL);
00169
00170     // Check that the window text isn't empty. If it is, set it as the URL.
00171     CString strWndText;
00172     GetWindowText(strWndText);
00173     if (strWndText.IsEmpty()) {
00174         ASSERT(!m_strURL.IsEmpty());    // Window and URL both NULL. DUH!
00175         SetWindowText(m_strURL);
00176     }
00177
00178     // Create the font
00179     LOGFONT lf;
00180     GetFont()->GetLogFont(&lf);
00181     lf.lfUnderline = (char)m_bUnderline;
00182     m_Font.CreateFontIndirect(&lf);
00183     SetFont(&m_Font);
00184
00185     PositionWindow();        // Adjust size of window to fit URL if necessary
00186     SetDefaultCursor();      // Try and load up a "hand" cursor
00187
00188     // Create the tooltip
00189     CRect rect;
00190     GetClientRect(rect);
00191     m_ToolTip.Create(this);
00192     m_ToolTip.AddTool(this, m_strURL, rect, TOOLTIP_ID);
00193
00194     CStatic::PreSubclassWindow();
00195 }
00196
00198 // CCJHyperLink operations
00199
00200 void CCJHyperLink::SetURL(CString strURL)
00201 {
00202     m_strURL = strURL;
00203
00204     if (::IsWindow(GetSafeHwnd())) {
00205         PositionWindow();
00206         m_ToolTip.UpdateTipText(strURL, this, TOOLTIP_ID);
00207     }
00208 }
00209
00210 CString CCJHyperLink::GetURL() const
00211 {
00212     return m_strURL;
00213 }
00214
00215 void CCJHyperLink::SetColors(COLORREF crLinkColor, COLORREF crVisitedColor,
00216                             COLORREF crHoverColor /* = -1 */)
00217 {
00218     m_crLinkColor    = crLinkColor;
00219     m_crVisitedColor = crVisitedColor;
00220
00221     if (crHoverColor == -1)
00222         m_crHoverColor = ::GetSysColor(COLOR_HIGHLIGHT);
00223     else
00224         m_crHoverColor = crHoverColor;
00225
00226     if (::IsWindow(m_hWnd))
00227         Invalidate();
00228 }
00229
00230 COLORREF CCJHyperLink::GetLinkColor() const
00231 {
00232     return m_crLinkColor;
00233 }
00234
00235 COLORREF CCJHyperLink::GetVisitedColor() const
00236 {
00237     return m_crVisitedColor;
00238 }
00239
00240 COLORREF CCJHyperLink::GetHoverColor() const
00241 {
00242     return m_crHoverColor;
00243 }
00244
00245 void CCJHyperLink::SetVisited(BOOL bVisited /* = TRUE */)
00246 {
00247     m_bVisited = bVisited;
00248
00249     if (::IsWindow(GetSafeHwnd()))
00250         Invalidate();
00251 }
00252
00253 BOOL CCJHyperLink::GetVisited() const
00254 {
00255     return m_bVisited;
00256 }
00257
00258 void CCJHyperLink::SetLinkCursor(HCURSOR hCursor)
00259 {
00260     m_hLinkCursor = hCursor;
00261     if (m_hLinkCursor == NULL)
00262         SetDefaultCursor();
00263 }
00264
00265 HCURSOR CCJHyperLink::GetLinkCursor() const
00266 {
00267     return m_hLinkCursor;
00268 }
00269
00270 void CCJHyperLink::SetUnderline(BOOL bUnderline /* = TRUE */)
00271 {
00272     m_bUnderline = bUnderline;
00273
00274     if (::IsWindow(GetSafeHwnd()))
00275     {
00276         LOGFONT lf;
00277         GetFont()->GetLogFont(&lf);
00278         lf.lfUnderline = (char)m_bUnderline;
00279
00280         m_Font.DeleteObject();
00281         m_Font.CreateFontIndirect(&lf);
00282         SetFont(&m_Font);
00283
00284         Invalidate();
00285     }
00286 }
00287
00288 BOOL CCJHyperLink::GetUnderline() const
00289 {
00290     return m_bUnderline;
00291 }
00292
00293 void CCJHyperLink::SetAutoSize(BOOL bAutoSize /* = TRUE */)
00294 {
00295     m_bAdjustToFit = bAutoSize;
00296
00297     if (::IsWindow(GetSafeHwnd()))
00298         PositionWindow();
00299 }
00300
00301 BOOL CCJHyperLink::GetAutoSize() const
00302 {
00303     return m_bAdjustToFit;
00304 }
00305
00306
00307 // Move and resize the window so that the window is the same size
00308 // as the hyperlink text. This stops the hyperlink cursor being active
00309 // when it is not directly over the text. If the text is left justified
00310 // then the window is merely shrunk, but if it is centred or right
00311 // justified then the window will have to be moved as well.
00312 //
00313 // Suggested by Pål K. Tønder
00314
00315 void CCJHyperLink::PositionWindow()
00316 {
00317     if (!::IsWindow(GetSafeHwnd()) || !m_bAdjustToFit)
00318         return;
00319
00320     // Get the current window position
00321     CRect rect;
00322     GetWindowRect(rect);
00323
00324     CWnd* pParent = GetParent();
00325     if (pParent)
00326         pParent->ScreenToClient(rect);
00327
00328     // Get the size of the window text
00329     CString strWndText;
00330     GetWindowText(strWndText);
00331
00332     CDC* pDC = GetDC();
00333     CFont* pOldFont = pDC->SelectObject(&m_Font);
00334     CSize Extent = pDC->GetTextExtent(strWndText);
00335     pDC->SelectObject(pOldFont);
00336     ReleaseDC(pDC);
00337
00338     // Get the text justification via the window style
00339     DWORD dwStyle = GetStyle();
00340
00341     // Recalc the window size and position based on the text justification
00342     if (dwStyle & SS_CENTERIMAGE)
00343         rect.DeflateRect(0, (rect.Height() - Extent.cy)/2);
00344     else
00345         rect.bottom = rect.top + Extent.cy;
00346
00347     if (dwStyle & SS_CENTER)
00348         rect.DeflateRect((rect.Width() - Extent.cx)/2, 0);
00349     else if (dwStyle & SS_RIGHT)
00350         rect.left  = rect.right - Extent.cx;
00351     else // SS_LEFT = 0, so we can't test for it explicitly
00352         rect.right = rect.left + Extent.cx;
00353
00354     // Move the window
00355     SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOZORDER);
00356 }
00357
00359 // CCJHyperLink implementation
00360
00361 // The following appeared in Paul DiLascia's Jan 1998 MSJ articles.
00362 // It loads a "hand" cursor from the winhlp32.exe module
00363 void CCJHyperLink::SetDefaultCursor()
00364 {
00365     if (m_hLinkCursor == NULL)                // No cursor handle - load our own
00366     {
00367         // Get the windows directory
00368         CString strWndDir;
00369         GetWindowsDirectory(strWndDir.GetBuffer(MAX_PATH), MAX_PATH);
00370         strWndDir.ReleaseBuffer();
00371
00372         strWndDir += _T("\\winhlp32.exe");
00373         // This retrieves cursor #106 from winhlp32.exe, which is a hand pointer
00374         HMODULE hModule = LoadLibrary(strWndDir);
00375         if (hModule) {
00376             HCURSOR hHandCursor = ::LoadCursor(hModule, MAKEINTRESOURCE(106));
00377             if (hHandCursor)
00378                 m_hLinkCursor = CopyCursor(hHandCursor);
00379         }
00380         FreeLibrary(hModule);
00381     }
00382 }
00383
00384 LONG CCJHyperLink::GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata)
00385 {
00386     HKEY hkey;
00387     LONG retval = RegOpenKeyEx(key, subkey, 0, KEY_QUERY_VALUE, &hkey);
00388
00389     if (retval == ERROR_SUCCESS) {
00390         long datasize = MAX_PATH;
00391         TCHAR data[MAX_PATH];
00392         RegQueryValue(hkey, NULL, data, &datasize);
00393         _tcscpy(retdata,data);
00394         RegCloseKey(hkey);
00395     }
00396
00397     return retval;
00398 }
00399
00400 void CCJHyperLink::ReportError(int nError)
00401 {
00402     CString str;
00403     switch (nError) {
00404         case 0:                       str = _T("The operating system is out\nof memory or resources."); break;
00405         case SE_ERR_PNF:              str = _T("The specified path was not found."); break;
00406         case SE_ERR_FNF:              str = _T("The specified file was not found."); break;
00407         case ERROR_BAD_FORMAT:        str = _T("The .EXE file is invalid\n(non-Win32 .EXE or error in .EXE image)."); break;
00408         case SE_ERR_ACCESSDENIED:     str = _T("The operating system denied\naccess to the specified file."); break;
00409         case SE_ERR_ASSOCINCOMPLETE:  str = _T("The filename association is\nincomplete or invalid."); break;
00410         case SE_ERR_DDEBUSY:          str = _T("The DDE transaction could not\nbe completed because other DDE transactions\nwere being processed."); break;
00411         case SE_ERR_DDEFAIL:          str = _T("The DDE transaction failed."); break;
00412         case SE_ERR_DDETIMEOUT:       str = _T("The DDE transaction could not\nbe completed because the request timed out."); break;
00413         case SE_ERR_DLLNOTFOUND:      str = _T("The specified dynamic-link library was not found."); break;
00414         case SE_ERR_NOASSOC:          str = _T("There is no application associated\nwith the given filename extension."); break;
00415         case SE_ERR_OOM:              str = _T("There was not enough memory to complete the operation."); break;
00416         case SE_ERR_SHARE:            str = _T("A sharing violation occurred. ");
00417         default:                      str.Format(_T("Unknown Error (%d) occurred."), nError); break;
00418     }
00419     str = _T("Unable to open hyperlink:\n\n") + str;
00420     AfxMessageBox(str, MB_ICONEXCLAMATION | MB_OK);
00421 }
00422
00423 HINSTANCE CCJHyperLink::GotoURL( LPCTSTR url, int showcmd )
00424 {
00425     TCHAR key[MAX_PATH + MAX_PATH];
00426
00427     // First try ShellExecute()
00428     HINSTANCE result = ShellExecute( NULL, _T("open"), url, NULL, NULL, showcmd );
00429
00430     // If it failed, get the .htm regkey and lookup the program
00431     if((UINT)result <= HINSTANCE_ERROR)
00432     {
00433         if( GetRegKey( HKEY_CLASSES_ROOT, _T(".htm"), key ) == ERROR_SUCCESS )
00434         {
00435             lstrcat( key, _T("\\shell\\open\\command"));
00436
00437             if( GetRegKey( HKEY_CLASSES_ROOT, key, key ) == ERROR_SUCCESS )
00438             {
00439                 LPTSTR pos;
00440
00441                 pos = _tcsstr(key, _T("\"%1\""));
00442
00443                 if( pos == NULL )                       // No quotes found
00444                 {
00445                     pos = _tcsstr( key, _T("%1"));      // Check for %1, without quotes
00446
00447                     if( pos == NULL )                   // No parameter at all...
00448                     {
00449                         pos = key + _tcslen( key ) - 1;
00450                     }
00451                     else
00452                     {
00453                         *pos = _T('\0');                // Remove the parameter
00454                     }
00455                 }
00456                 else
00457                 {
00458                     *pos = _T('\0');                    // Remove the parameter
00459                 }
00460
00461                 lstrcat( pos, _T(" "));
00462                 lstrcat( pos, url );
00463
00464                 PROCESS_INFORMATION pi;
00465
00466                 STARTUPINFO         si;
00467
00468                 ::ZeroMemory( &si, sizeof( si ));
00469
00470                 si.cb = sizeof( si );
00471
00472                 if( ::CreateProcess( NULL,
00473                                      pos,
00474                                      NULL,
00475                                      NULL,
00476                                      FALSE,
00477                                      0,
00478                                      NULL,
00479                                      NULL,
00480                                      &si,
00481                                     &pi ) == FALSE )
00482                 {
00483                     return NULL;
00484                 }
00485
00486                 result = (HINSTANCE) pi.hProcess;
00487             }
00488         }
00489     }
00490
00491     return result;
00492 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPromptMessage Member List

This is the complete list of members for UPromptMessage, including all inherited members.

_GetBaseClass() | UPromptMessage | [protected, static]
_messageEntries | UPromptMessage | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUObject | UObject | [protected, static]
classUPromptMessage | UPromptMessage | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool fill) | UPromptMessage | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UPromptMessage | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UPromptMessage | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UPromptMessage | [virtual]
GetThisMessageMap() | UPromptMessage | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kCancel enum value | UPromptMessage |
kMsg enum value | UPromptMessage |
kOK enum value | UPromptMessage |
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_cncl | UPromptMessage | [protected]
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_msg | UPromptMessage | [protected]
m_noDispatch | UWidget | [protected]
m_ok | UPromptMessage | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_title | UPromptMessage | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UPromptMessage | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnCancel(void) | UPromptMessage | [protected]
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnOK(void) | UPromptMessage | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUObject() | UObject | [static]
rtUPromptMessage(void) | UPromptMessage | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UObject() | UObject | [inline, protected]
UPromptMessage(const char *msg, const char *title, const char *def, const char *cncl) | UPromptMessage | [inline]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UObject() | UObject | [inline, virtual]
~UPromptMessage() | UPromptMessage | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:55:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TemplateDlg.h Source File

common/TemplateDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2003
00019  */
00020
00021 /*
00022  * TemplateDlg.h : CVS Template entry
00023  */
00024
00025 #if !defined(AFX_TEMPLATEDLG_H__FB71138C_D374_42EE_88E8_59890D6DEDE2__INCLUDED_)
00026 #define AFX_TEMPLATEDLG_H__FB71138C_D374_42EE_88E8_59890D6DEDE2__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #ifdef WIN32
00033 #   include "HHelpSupport.h"
00034 #endif
00035
00036 class MultiFiles;
00037
00038 bool CompatGetCvsTemplate(const MultiFiles* mf, CStr& templateText);
00039
00040 #ifdef WIN32
00041
00043 // CTemplateDlg dialog
00044
00045 class CTemplateDlg : public CHHelpDialog
00046 {
00047 // Construction
00048 public:
00049     CTemplateDlg(const MultiFiles* mf, CWnd* pParent = NULL);   // standard constructor
00050
00051 // Dialog Data
00052     //{{AFX_DATA(CTemplateDlg)
00053     enum { IDD = IDD_CVSTEMPLATE };
00054     CButton m_okButton;
00055     CEdit   m_previewEdit;
00056     CListCtrl   m_templateList;
00057     //}}AFX_DATA
00058
00059
00060 // Overrides
00061     // ClassWizard generated virtual function overrides
00062     //{{AFX_VIRTUAL(CTemplateDlg)
00063     protected:
00064     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00065     //}}AFX_VIRTUAL
00066
00067 // Implementation
00068 protected:
00069
00070     // Generated message map functions
00071     //{{AFX_MSG(CTemplateDlg)
00072     virtual BOOL OnInitDialog();
00073     virtual void OnOK();
00074     afx_msg void OnDblclkTemplateList(NMHDR* pNMHDR, LRESULT* pResult);
00075     afx_msg void OnItemchangedTemplateList(NMHDR* pNMHDR, LRESULT* pResult);
00076     afx_msg void OnHelp();
00077     //}}AFX_MSG
00078     DECLARE_MESSAGE_MAP()
00079 private:
00080     // Data members
00081     const MultiFiles* m_mf;
00083     CStr m_templateText;
00085     // Methods
00086     virtual void InitHelpID();
00087
00088     bool ReadSelectedTemplate(CStr& templateText);
00089
00090 public:
00091     // Interface
00092     const char* GetTemplateText() const;
00093 };
00094
00095 //{{AFX_INSERT_LOCATION}}
00096 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00097 #endif /* WIN32 */
00098
00099 #endif // !defined(AFX_TEMPLATEDLG_H__FB71138C_D374_42EE_88E8_59890D6DEDE2__INCLUDED_)
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ULIST_INFO Member List

This is the complete list of members for ULIST_INFO, including all inherited members.

col | ULIST_INFO
data | ULIST_INFO
row | ULIST_INFO
title | ULIST_INFO

Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPseudoToggle Member List

This is the complete list of members for CPseudoToggle, including all inherited members.

CCJFlatButton() | CCJFlatButton |
CPseudoButton() | CPseudoButton |
CPseudoToggle() | CPseudoToggle |
DisableFlatLook(BOOL bDisable=FALSE) | CCJFlatButton | [virtual]
DrawButtonBitmap(CDC *pDC, UINT nState, CRect &rcItem) | CPseudoButton | [protected, virtual]
DrawButtonIcon(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawButtonText(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CPseudoToggle | [virtual]
GetGroup(void) const | CPseudoToggle | [inline]
GetState(void) const | CPseudoToggle | [inline]
IsRadio(void) const | CPseudoToggle | [inline]
loadIcon(CString &icon, int rsrcid) | CPseudoButton | [static]
LoadXPM(int rsrcid) | CPseudoButton | [virtual]
m_bAltColor | CCJFlatButton | [protected]
m_bFlatLook | CCJFlatButton | [protected]
m_bitmap | CPseudoButton | [protected]
m_bLBtnDown | CCJFlatButton | [protected]
m_bMouseOver | CCJFlatButton | [protected]
m_bPainted | CCJFlatButton | [protected]
m_clrAltHilite | CCJFlatButton | [protected]
m_clrAltNormal | CCJFlatButton | [protected]
m_clrAltShadow | CCJFlatButton | [protected]
m_clrAltTextNm | CCJFlatButton | [protected]
m_clrDkShad | CCJFlatButton | [protected]
m_clrHilite | CCJFlatButton | [protected]
m_clrNormal | CCJFlatButton | [protected]
m_clrShadow | CCJFlatButton | [protected]
m_clrTextGy | CCJFlatButton | [protected]
m_clrTextNm | CCJFlatButton | [protected]
m_disbitmap | CPseudoButton | [protected]
m_flag | CPseudoToggle | [protected]
m_Font | CCJFlatButton | [protected]
m_group | CPseudoToggle | [protected]
m_hCursor | CCJFlatButton | [protected]
m_hPushed | CCJFlatButton | [protected]
m_pFont | CCJFlatButton | [protected]
m_radio | CPseudoToggle | [protected]
m_sizeIcon | CCJFlatButton | [protected]
OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) | CPseudoToggle |
OnEraseBkgnd(CDC *pDC) | CCJFlatButton | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CPseudoToggle |
OnLButtonDblClk(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CPseudoToggle |
OnMouseMove(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnPaint() | CCJFlatButton | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJFlatButton | [protected]
OnSysColorChange() | CCJFlatButton | [protected]
OnTimer(UINT nIDEvent) | CCJFlatButton | [protected]
SetAlternateColors(COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm) | CCJFlatButton | [virtual]
SetButtonFont(CFont *pFont) | CCJFlatButton | [virtual]
SetGroup(const char *group) | CPseudoToggle | [inline]
SetIcon(HICON hIcon, CSize size) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, HICON hPushed, CSize size) | CCJFlatButton | [virtual]
SetRadio(bool state) | CPseudoToggle | [inline]
SetState(int state) | CPseudoToggle | [virtual]
ToggleBtn() | CPseudoToggle | [inline]
UpdateFont() | CCJFlatButton | [protected, virtual]
~CCJFlatButton() | CCJFlatButton | [virtual]
~CPseudoButton() | CPseudoButton | [virtual]
~CPseudoToggle() | CPseudoToggle |

Generated on Sat Aug 7 22:55:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJTabView.h Source File

WinCvs/CJLib/Include/CJTabView.h

Go to the documentation of this file.
00001 // CJTabView.h: interface for the CCJTabView class.
00002 //
00003 // Copyright © 1999 Mike Manzo
00004 // mailto:mmanzo@ieee.org
00005 //
00007 /****************************************************************************
00008  *
00009  * $Date: 1999/11/30 21:45:51 $
00010  * $Revision: 1.1.1.3 $
00011  * $Archive: /CodeJock/Include/CJTabView.h $
00012  *
00013  * $History: CJTabView.h $
00014  *
00015  * *****************  Version 10  *****************
00016  * User: Kirk Stowell Date: 10/30/99   Time: 2:17p
00017  * Updated in $/CodeJock/Include
00018  * Overrode OnEraseBkgnd(...) for flicker free drawing.
00019  *
00020  * *****************  Version 9  *****************
00021  * User: Kirk Stowell Date: 10/26/99   Time: 10:48p
00022  * Updated in $/CodeJock/Include
00023  * Made class methods virtual for inheritance purposes.
00024  *
00025  * *****************  Version 8  *****************
00026  * User: Kirk Stowell Date: 10/24/99   Time: 3:15a
00027  * Updated in $/CodeJock/Include
00028  *
00029  * *****************  Version 7  *****************
00030  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00031  * Updated in $/CodeJock/Include
00032  * Added source control history to file header.
00033  *
00034  ***************************************************************************/
00036
00037 #ifndef __CJTABVIEW_H__
00038 #define __CJTABVIEW_H__
00039
00040 #if _MSC_VER > 1000
00041 #pragma once
00042 #endif // _MSC_VER > 1000
00043 // CJTabView.h : header file
00044 //
00045
00046 typedef struct tagCTV_ITEM
00047 {
00048     CWnd *pWnd;
00049     TCHAR szLabel[32];
00050 } CTV_ITEM;
00051
00052 #define TABVIEW_BORDER 3
00053
00054 // template list used to contain tab information
00055 typedef CList <CTV_ITEM*, CTV_ITEM *> CListViews;
00056
00057 // CCJTabView is a CCtrlView derived class which can be used to
00058 // create a view that contains a tab control
00059 class _CJX_EXT_CLASS CCJTabView : public CCtrlView
00060 {
00061     DECLARE_DYNCREATE(CCJTabView)
00062
00063 protected:
00064
00065     // Default constructor
00066     //
00067     CCJTabView();
00068
00069     // Virtual destructor
00070     //
00071     virtual ~CCJTabView();
00072
00073 protected:
00074
00075     CView*          m_pActiveView;  // pointer to the active view
00076     int             m_nActiveTab;   // index of the active tab
00077     CTabCtrl*       m_pTabCtrl;     // pointer to the tab control
00078     CToolTipCtrl*   m_pToolTip;     // pointer to the tooltip control
00079     CFont           m_TabFont;      // font used by tab control
00080     CListViews      m_views;        // template list containing tab information
00081
00082 public:
00083
00084     // this member function is called to add a view to the tab control
00085     //
00086     virtual BOOL AddView(
00087         // tab text
00088         LPCTSTR lpszLabel,
00089         // CView object associated with tab
00090         CRuntimeClass *pViewClass,
00091         // CDocument associated with view
00092         CDocument* pDoc = NULL,
00093         // create context for view
00094         CCreateContext *pContext = NULL);
00095
00096     // this member function will modify the style for the
00097     // tab control associated with this control.
00098     //
00099     virtual BOOL ModifyTabStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags=0);
00100
00101     // this member function will set a view active
00102     // based on a CView object
00103     //
00104     virtual void SetActiveView(CRuntimeClass *pViewClass);
00105
00106     // this member function will set a view active
00107     // based on index
00108     //
00109     virtual void SetActiveView(int nNewTab);
00110
00111     // this member function will remove a view based on its index
00112     //
00113     virtual void RemoveView(int nView);
00114
00115     // this member function returns a pointer to a view
00116     // based on a CView object
00117     //
00118     virtual CView* GetView(CRuntimeClass *pViewClass);
00119
00120     // this member function returns a pointer to a view
00121     // based on its index
00122     //
00123     virtual CView* GetView(int nView);
00124
00125     // this member function returns a pointer to the
00126     // active view in the tab control
00127     //
00128     virtual CView* GetActiveView();
00129
00130     // this member function initializes the image list
00131     // for the tab control
00132     //
00133     virtual CImageList* SetTabImageList(CImageList *pImageList);
00134
00135     // this member function returns a pointer to the
00136     // tab control associated with this control
00137     //
00138     virtual CTabCtrl* GetTabCtrl();
00139
00140     // this member function is called by the view, and
00141     // can be overloaded in derived classes to return the rect
00142     // for the child window associated with the control bar.
00143     //
00144     virtual void GetChildRect(
00145         // reference to a CRect object which contains the size of
00146         // the child window associated with the control bar.
00147         CRect &rect);
00148
00149 private:
00150
00151     void CalcViewRect(CRect* pRect);
00152
00153 // Overrides
00154     // ClassWizard generated virtual function overrides
00155     //{{AFX_VIRTUAL(CCJTabView)
00156     //}}AFX_VIRTUAL
00157
00158     // Generated message map functions
00159 protected:
00160     //{{AFX_MSG(CCJTabView)
00161     afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00162     afx_msg void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult);
00163     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00164     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00165     //}}AFX_MSG
00166     DECLARE_MESSAGE_MAP()
00167 };
00168
00170 //  Inline Functions
00172
00173 _CJXLIB_INLINE CTabCtrl* CCJTabView::GetTabCtrl()
00174     { return m_pTabCtrl; }
00175
00176 _CJXLIB_INLINE CView* CCJTabView::GetActiveView()
00177     { return m_pActiveView; }
00178
00180
00181 //{{AFX_INSERT_LOCATION}}
00182 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00183
00184 #endif // __CJTABVIEW_H__
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SelectionDetailsDlg.h Source File

common/SelectionDetailsDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- January 2003
00019  */
00020
00021 #if !defined(AFX_SELECTIONDETAILSDLG_H__42708DEE_6E9B_41FD_BAE6_0224C8EE09D8__INCLUDED_)
00022 #define AFX_SELECTIONDETAILSDLG_H__42708DEE_6E9B_41FD_BAE6_0224C8EE09D8__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // SelectionDetailsDlg.h : header file
00028 //
00029
00030 #include "MultiFiles.h"
00031
00032 #ifdef WIN32
00033 #   include "SortHeaderCtrl.h"
00034 #   include "HHelpSupport.h"
00035 #endif
00036
00038 typedef enum
00039 {
00040     kSelDetFile,
00041     kSelDetRevision,
00042     kSelDetPath
00043 } kSelDetType;
00044
00045
00046 bool CompatGetSelectionDetails(const MultiFiles* mf, kSelDetType& selDetType, CStr& selection);
00047
00048
00049 #ifdef WIN32
00050
00052 class SelectionDisplayInfo
00053 {
00054 private:
00055     // Data members
00056     string m_fileName;
00057     string m_revision;
00058     string m_path;
00060 public:
00061     // Interface
00062     void Create(const string& fileName, const string& revision, const string& path);
00063
00064     const string& GetFileName() const;
00065     const string& GetRevision() const;
00066     const string& GetPath() const;
00067 };
00068
00070 // CSelectionDetailsDlg dialog
00071
00072 class CSelectionDetailsDlg : public CHHelpDialog
00073 {
00074 // Construction
00075 public:
00076     CSelectionDetailsDlg(const MultiFiles* mf, const kSelDetType selDetType, const char* selection,
00077         CWnd* pParent = NULL);   // standard constructor
00078
00079 // Dialog Data
00080     //{{AFX_DATA(CSelectionDetailsDlg)
00081     enum { IDD = IDD_SELECTION_DETAILS };
00082     CButton m_revisionCheck;
00083     CButton m_fileNameCheck;
00084     CButton m_pathCheck;
00085     CEdit   m_selectionEdit;
00086     CSpinButtonCtrl m_revisionSpinCtrl;
00087     CListCtrl   m_selectionListCtrl;
00088     CString m_selection;
00089     int     m_selDetType;
00090     //}}AFX_DATA
00091
00092
00093 // Overrides
00094     // ClassWizard generated virtual function overrides
00095     //{{AFX_VIRTUAL(CSelectionDetailsDlg)
00096     protected:
00097     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00098     //}}AFX_VIRTUAL
00099
00100 // Implementation
00101 protected:
00102
00103     // Generated message map functions
00104     //{{AFX_MSG(CSelectionDetailsDlg)
00105     virtual BOOL OnInitDialog();
00106     afx_msg void OnDblclkSelectionlist(NMHDR* pNMHDR, LRESULT* pResult);
00107     afx_msg void OnColumnclickSelectionlist(NMHDR* pNMHDR, LRESULT* pResult);
00108     afx_msg void OnItemchangedSelectionlist(NMHDR* pNMHDR, LRESULT* pResult);
00109     afx_msg void OnDeltaposRevisionSpin(NMHDR* pNMHDR, LRESULT* pResult);
00110     afx_msg void OnFilename();
00111     afx_msg void OnPath();
00112     afx_msg void OnRevision();
00113     afx_msg void OnDestroy();
00114     afx_msg void OnHelp();
00115     //}}AFX_MSG
00116     DECLARE_MESSAGE_MAP()
00117 private:
00118     // Data members
00119     const MultiFiles* m_mf;
00121     // Methods
00122     virtual void InitHelpID();
00123
00124     void DisplaySelection();
00125     void DeleteAllItems();
00126
00127     void EnableControls();
00128     void UpdateSelect(int item);
00129
00130     // Sorting
00131
00133     typedef struct
00134     {
00135         int m_column;
00136         bool m_asc;
00137     } CompareInfo;
00138
00139     bool m_sortAsc;
00140     int m_sortColumn;
00141     CSortHeaderCtrl m_headerCtrl;
00142
00143     void SortItems(int column, bool asc);
00144     static int CALLBACK CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam);
00145 };
00146
00147 //{{AFX_INSERT_LOCATION}}
00148 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00149 #endif /* !WIN32 */
00150
00151 #endif // !defined(AFX_SELECTIONDETAILSDLG_H__42708DEE_6E9B_41FD_BAE6_0224C8EE09D8__INCLUDED_)
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoConflictColumn Member List

This is the complete list of members for KoConflictColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoConflictColumn | [inline, virtual]
GetColumnIndex() const | KoConflictColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoConflictColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoConflictColumn | [inline, virtual]
IsDefaultAscending() const | KiColumn | [inline, virtual]

Generated on Sat Aug 7 22:53:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportDlg.cpp Source File

common/ImportDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * ImportDlg.cpp : the cvs import dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "wincvs_winutil.h"
00030 #endif /* WIN32 */
00031
00032 #if qUnix
00033 #   include "UCvsDialogs.h"
00034 #   include "CheckoutDlg.h"
00035 #endif
00036
00037 #ifdef qMacCvsPP
00038 #   include <UModalDialogs.h>
00039 #   include <LMultiPanelView.h>
00040 #   include <LPopupGroupBox.h>
00041 #   include <LCheckBox.h>
00042 #   include <LTextEditView.h>
00043 #   include <LEditText.h>
00044 #   include <LPushButton.h>
00045
00046 #   include "MacCvsConstant.h"
00047 #endif /* qMacCvsPP */
00048
00049 #include "ImportDlg.h"
00050 #include "CvsPrefs.h"
00051 #include "MultiFiles.h"
00052 #include "MultiString.h"
00053 #include "PromptFiles.h"
00054 #include "ItemListDlg.h"
00055 #include "CvsCommands.h"
00056 #include "CvsAlert.h"
00057 #include "CvsRootDlg.h"
00058 #include "ImportFilterDlg.h"
00059
00061 static char* sDefReleases[] =
00062 {
00063     "V10",
00064     "V101",
00065     0L
00066 };
00067
00069 static char* sDefVendors[] =
00070 {
00071     "GNU",
00072     0L
00073 };
00074
00076 static char* sDefModuleNames[] =
00077 {
00078     "Module",
00079     "Project",
00080     0L
00081 };
00082
00084 static char* sDefVendorBranchIds[] =
00085 {
00086     "1.1.7",
00087     "1.1.6",
00088     "1.1.5",
00089     "1.1.4",
00090     "1.1.3",
00091     "1.1.2",
00092     "1.1.1",
00093     0L
00094 };
00095
00096 static CMString gVendorNames(20, "P_VendorNames", sDefVendors);
00097 CMString gReleasesNames(20, "P_ReleaseNames", sDefReleases);
00098 static CMString gImportModuleNames(20, "P_ImportModuleNames", sDefModuleNames);
00099 static CMString gVendorBranchIds(20, "P_VendorBranchIds", sDefVendorBranchIds);
00100 static CMString gImportLocalFolder(20, "P_ImportLocalFolder");
00101
00102 #ifdef WIN32
00103 #   include "GetPrefs.h"
00104
00105 #   ifdef _DEBUG
00106 #   define new DEBUG_NEW
00107 #   undef THIS_FILE
00108     static char THIS_FILE[] = __FILE__;
00109 #   endif
00110
00111 extern CMString gCommitLogs;
00112
00113
00115 // CImport_MAIN
00116
00117 IMPLEMENT_DYNAMIC(CImport_MAIN, CHHelpPropertyPage)
00118
00119 CImport_MAIN::CImport_MAIN(const MultiFiles* mf,
00120                            const char* logMsg, const char* modname,
00121                            const char* rtag, const char* vtag, const bool dontCreateVendorTag, const bool overwriteReleaseTags,
00122                            bool forceRoot, const char* cvsroot)
00123                            : m_mf(mf), m_multilineEntryDlg(mf), CHHelpPropertyPage(CImport_MAIN::IDD)
00124 {
00125     //{{AFX_DATA_INIT(CImport_MAIN)
00126     m_vtag = vtag;
00127     m_rtag = rtag;
00128     m_moduleName = modname;
00129     m_dontCreateVendorTag = dontCreateVendorTag;
00130     m_cvsroot = cvsroot;
00131     m_forceRoot = forceRoot;
00132     m_overwriteReleaseTags = overwriteReleaseTags;
00133     //}}AFX_DATA_INIT
00134
00135     m_logMsg = logMsg;
00136
00137     m_moduleCombo.SetItems(&gImportModuleNames);
00138     m_rtagCombo.SetItems(&gReleasesNames);
00139     m_vtagCombo.SetItems(&gVendorNames);
00140     m_cvsrootCombo.SetItems(&gOldCvsroots);
00141 }
00142
00143 CImport_MAIN::~CImport_MAIN()
00144 {
00145 }
00146
00147 void CImport_MAIN::DoDataExchange(CDataExchange* pDX)
00148 {
00149     CHHelpPropertyPage::DoDataExchange(pDX);
00150
00151     //{{AFX_DATA_MAP(CImport_MAIN)
00152     DDX_Control(pDX, IDC_OVERWRITE_RELEASE_TAGS, m_overwriteReleaseTagsCheck);
00153     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00154     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00155     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00156     DDX_Control(pDX, IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryPlaceholder);
00157     DDX_Control(pDX, IDC_BROWSE_TAG2, m_vtagButton);
00158     DDX_Control(pDX, IDC_BROWSE_TAG1, m_rtagButton);
00159     DDX_Control(pDX, IDC_NO_VENDOR_RELEASE_TAGS, m_dontCreateVendorTagCheck);
00160     DDX_Control(pDX, IDC_REPOSITORY_PATH, m_moduleCombo);
00161     DDX_Control(pDX, IDC_RELEASE_TAG, m_rtagCombo);
00162     DDX_Control(pDX, IDC_VENDOR_TAG, m_vtagCombo);
00163     DDX_CBString(pDX, IDC_VENDOR_TAG, m_vtag);
00164     DDX_CBString(pDX, IDC_RELEASE_TAG, m_rtag);
00165     DDX_CBString(pDX, IDC_REPOSITORY_PATH, m_moduleName);
00166     DDX_Check(pDX, IDC_NO_VENDOR_RELEASE_TAGS, m_dontCreateVendorTag);
00167     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00168     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00169     DDX_Check(pDX, IDC_OVERWRITE_RELEASE_TAGS, m_overwriteReleaseTags);
00170     //}}AFX_DATA_MAP
00171
00172     DDV_MinChars(pDX, m_moduleName, 1);
00173     DDV_MinChars(pDX, m_rtag, 1);
00174     DDV_MinChars(pDX, m_vtag, 1);
00175     DDX_ComboMString(pDX, IDC_REPOSITORY_PATH, m_moduleCombo);
00176     DDX_ComboMString(pDX, IDC_VENDOR_TAG, m_vtagCombo);
00177     DDX_ComboMString(pDX, IDC_RELEASE_TAG, m_rtagCombo);
00178     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00179
00180     if( m_forceRoot )
00181     {
00182         DDV_MinChars(pDX, m_cvsroot, 1);
00183     }
00184
00185     // Error if the vendor and release tags are same
00186     if( pDX->m_bSaveAndValidate )
00187     {
00188         if( !m_dontCreateVendorTag && m_vtag == m_rtag )
00189         {
00190             CvsAlert(kCvsAlertWarningIcon,
00191                 "Invalid Vendor and Release tags.", "Vendor Tag and Release Tag can't have the same values.",
00192                 BUTTONTITLE_OK, NULL).ShowAlert();
00193
00194             pDX->Fail();
00195         }
00196     }
00197
00198     if( !pDX->m_bSaveAndValidate )
00199     {
00200         OnDontcreatevendortag();
00201         m_selCvsrootButton.EnableWindow(m_forceRoot);
00202     }
00203
00204     m_multilineEntryDlg.UpdateData(pDX->m_bSaveAndValidate, m_logMsg);
00205 }
00206
00207
00208 BEGIN_MESSAGE_MAP(CImport_MAIN, CHHelpPropertyPage)
00209     //{{AFX_MSG_MAP(CImport_MAIN)
00210     ON_BN_CLICKED(IDC_BROWSE_TAG1, OnBrowseTag1)
00211     ON_BN_CLICKED(IDC_BROWSE_TAG2, OnBrowseTag2)
00212     ON_BN_CLICKED(IDC_BROWSE_MODNAME, OnBrowseModules)
00213     ON_BN_CLICKED(IDC_NO_VENDOR_RELEASE_TAGS, OnDontcreatevendortag)
00214     ON_BN_CLICKED(IDC_FORCE_CVSROOT, OnForceroot)
00215     ON_BN_CLICKED(IDC_BROWSE_CVSROOT, OnSelcvsroot)
00216     //}}AFX_MSG_MAP
00217 END_MESSAGE_MAP()
00218
00220 // CImport_MAIN message handlers
00221
00223 BOOL CImport_MAIN::OnInitDialog()
00224 {
00225     CHHelpPropertyPage::OnInitDialog();
00226
00227     // Extra initialization
00228     m_multilineEntryDlg.Create(kMultilineLogMessage, &gCommitLogs, &m_multilineEntryPlaceholder, this);
00229
00230     OnForceroot();
00231
00232     return TRUE;  // return TRUE unless you set the focus to a control
00233     // EXCEPTION: OCX Property Pages should return FALSE
00234 }
00235
00236 void CImport_MAIN::InitHelpID()
00237 {
00238     SetCtrlHelpID(IDC_REPOSITORY_PATH,          IDH_IDC_REPOSITORY_PATH);
00239     SetCtrlHelpID(IDC_BROWSE_MODNAME,           IDH_IDC_BROWSE_MODNAME);
00240     SetCtrlHelpID(IDC_VENDOR_TAG,               IDH_IDC_VENDOR_TAG);
00241     SetCtrlHelpID(IDC_BROWSE_TAG1,              IDH_IDC_BROWSE_TAG);
00242     SetCtrlHelpID(IDC_RELEASE_TAG,              IDH_IDC_RELEASE_TAG);
00243     SetCtrlHelpID(IDC_BROWSE_TAG2,              IDH_IDC_BROWSE_TAG);
00244     SetCtrlHelpID(IDC_NO_VENDOR_RELEASE_TAGS,   IDH_IDC_NO_VENDOR_RELEASE_TAGS);
00245     SetCtrlHelpID(IDC_OVERWRITE_RELEASE_TAGS,   IDH_IDC_OVERWRITE_RELEASE_TAGS);
00246     SetCtrlHelpID(IDC_FORCE_CVSROOT,            IDH_IDC_FORCE_CVSROOT);
00247     SetCtrlHelpID(IDC_CVSROOT,                  IDH_IDC_CVSROOT);
00248     SetCtrlHelpID(IDC_BROWSE_CVSROOT,           IDH_IDC_BROWSE_CVSROOT);
00249 }
00250
00252 void CImport_MAIN::OnBrowseTag1()
00253 {
00254     CStr tagName;
00255     if( CompatGetTagListItem(m_mf, tagName) )
00256     {
00257         m_vtag = (const char*)tagName;
00258         m_vtagCombo.SetWindowText(m_vtag);
00259     }
00260 }
00261
00263 void CImport_MAIN::OnBrowseTag2()
00264 {
00265     CStr tagName;
00266     if( CompatGetTagListItem(m_mf, tagName) )
00267     {
00268         m_rtag = (const char*)tagName;
00269         m_rtagCombo.SetWindowText(m_rtag);
00270     }
00271 }
00272
00274 void CImport_MAIN::OnBrowseModules()
00275 {
00276     CStr moduleName;
00277     if( CompatGetModuleListItem(m_mf, moduleName) )
00278     {
00279         m_moduleName = (const char*)moduleName;
00280         m_moduleCombo.SetWindowText(m_moduleName);
00281     }
00282 }
00283
00285 void CImport_MAIN::OnDontcreatevendortag()
00286 {
00287     const bool enable = m_dontCreateVendorTagCheck.GetCheck() == 0;
00288
00289     m_rtagCombo.EnableWindow(enable);
00290     m_rtagButton.EnableWindow(enable);
00291
00292     m_vtagCombo.EnableWindow(enable);
00293     m_vtagButton.EnableWindow(enable);
00294
00295     m_overwriteReleaseTagsCheck.EnableWindow(enable);
00296 }
00297
00302 CString CImport_MAIN::GetLogMsg() const
00303 {
00304     return m_logMsg;
00305 }
00306
00308 void CImport_MAIN::OnForceroot()
00309 {
00310     const BOOL enable = m_forceRootCheck.GetCheck();
00311
00312     m_selCvsrootButton.EnableWindow(enable);
00313     m_cvsrootCombo.EnableWindow(enable);
00314 }
00315
00317 void CImport_MAIN::OnSelcvsroot()
00318 {
00319     CString strCvsroot;
00320     m_cvsrootCombo.GetWindowText(strCvsroot);
00321
00322     CStr cvsroot(strCvsroot);
00323     if( CompatGetCvsRoot(cvsroot) )
00324     {
00325         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00326     }
00327 }
00328
00330 // CImport_OPTIONS
00331
00332 IMPLEMENT_DYNAMIC(CImport_OPTIONS, CHHelpPropertyPage)
00333
00334 CImport_OPTIONS::CImport_OPTIONS(const MultiFiles* mf,
00335                                  ReportConflict*& entries, ReportWarning*& warnings,
00336                                  const char* path, const bool useDefIgnore, const bool useFilesTime, const bool createSandbox)
00337                                  : m_mf(mf), m_entries(entries), m_warnings(warnings),
00338                                  CHHelpPropertyPage(CImport_OPTIONS::IDD)
00339 {
00340     //{{AFX_DATA_INIT(CImport_OPTIONS)
00341     m_useDefIgnore = useDefIgnore;
00342     m_useFilesTime = useFilesTime;
00343     m_hasVendorBranch = FALSE;
00344     m_vendorBranch = _T("");
00345     m_createSandbox = createSandbox;
00346     m_path = path;
00347     //}}AFX_DATA_INIT
00348
00349     m_vendorBranchCombo.SetItems(&gVendorBranchIds);
00350     m_pathCombo.SetItems(&gImportLocalFolder);
00351     m_pathCombo.SetReadOnly();
00352 }
00353
00354 CImport_OPTIONS::~CImport_OPTIONS()
00355 {
00356 }
00357
00358 void CImport_OPTIONS::DoDataExchange(CDataExchange* pDX)
00359 {
00360     CHHelpPropertyPage::DoDataExchange(pDX);
00361
00362     //{{AFX_DATA_MAP(CImport_OPTIONS)
00363     DDX_Control(pDX, IDC_PATH, m_pathCombo);
00364     DDX_Control(pDX, IDC_BRANCHID, m_vendorBranchCombo);
00365     DDX_Control(pDX, IDC_BROWSE_BRANCHID, m_vendorBranchButton);
00366     DDX_Control(pDX, IDC_HAS_BRANCHID, m_vendorBranchCheck);
00367     DDX_Check(pDX, IDC_DEFAULT_CVSIGNORE, m_useDefIgnore);
00368     DDX_Check(pDX, IDC_FILES_MODIFICATION_TIME, m_useFilesTime);
00369     DDX_Check(pDX, IDC_HAS_BRANCHID, m_hasVendorBranch);
00370     DDX_CBString(pDX, IDC_BRANCHID, m_vendorBranch);
00371     DDX_Check(pDX, IDC_CREATE_SANDBOX, m_createSandbox);
00372     DDX_CBString(pDX, IDC_PATH, m_path);
00373     //}}AFX_DATA_MAP
00374
00375     DDV_CheckPathExists(pDX, IDC_PATH, m_path, false);
00376     DDX_ComboMString(pDX, IDC_BRANCHID, m_vendorBranchCombo);
00377     DDX_ComboMString(pDX, IDC_PATH, m_pathCombo);
00378
00379     if( !pDX->m_bSaveAndValidate )
00380     {
00381         OnBranchid();
00382     }
00383 }
00384
00385
00386 BEGIN_MESSAGE_MAP(CImport_OPTIONS, CHHelpPropertyPage)
00387     //{{AFX_MSG_MAP(CImport_OPTIONS)
00388     ON_BN_CLICKED(IDC_BROWSE_PATH, OnBtnpath)
00389     ON_BN_CLICKED(IDC_BROWSE_BRANCHID, OnBrowseBranchid)
00390     ON_BN_CLICKED(IDC_HAS_BRANCHID, OnBranchid)
00391     ON_BN_CLICKED(IDC_IMPORT_FILTER, OnImportfilter)
00392     ON_CBN_SELCHANGE(IDC_PATH, OnSelchangePath)
00393     //}}AFX_MSG_MAP
00394 END_MESSAGE_MAP()
00395
00397 // CImport_OPTIONS message handlers
00398
00399 void CImport_OPTIONS::InitHelpID()
00400 {
00401     SetCtrlHelpID(IDC_PATH,                     IDH_IDC_PATH);
00402     SetCtrlHelpID(IDC_BROWSE_PATH,              IDH_IDC_BROWSE_PATH);
00403     SetCtrlHelpID(IDC_IMPORT_FILTER,            IDH_IDC_IMPORT_FILTER);
00404     SetCtrlHelpID(IDC_DEFAULT_CVSIGNORE,        IDH_IDC_DEFAULT_CVSIGNORE);
00405     SetCtrlHelpID(IDC_FILES_MODIFICATION_TIME,  IDH_IDC_FILES_MODIFICATION_TIME);
00406     SetCtrlHelpID(IDC_CREATE_SANDBOX,           IDH_IDC_CREATE_SANDBOX);
00407     SetCtrlHelpID(IDC_HAS_BRANCHID,             IDH_IDC_HAS_BRANCHID);
00408     SetCtrlHelpID(IDC_BRANCHID,                 IDH_IDC_BRANCHID);
00409     SetCtrlHelpID(IDC_BROWSE_BRANCHID,          IDH_IDC_BROWSE_BRANCHID);
00410 }
00411
00413 void CImport_OPTIONS::OnBtnpath()
00414 {
00415     CString strPath;
00416     m_pathCombo.GetWindowText(strPath);
00417
00418     CStr path(strPath);
00419     if( BrowserGetDirectory("Select a directory to import from", path, IsWindow(m_hWnd) ? this : NULL) )
00420     {
00421         if( strPath.CompareNoCase(path) )
00422         {
00423             if( !ImportFilter(path) )
00424                 return;
00425         }
00426
00427         m_pathCombo.SetWindowText(path);
00428     }
00429 }
00430
00432 void CImport_OPTIONS::OnImportfilter()
00433 {
00434     CString strPath;
00435     m_pathCombo.GetWindowText(strPath);
00436
00437     ReportConflict* entries = NULL;
00438     ReportWarning* warnings = NULL;
00439
00440     copy_list_types(m_warnings, m_entries, warnings, entries);
00441
00442     if( CompatImportFilter(strPath, entries, warnings) )
00443     {
00444         // Free the previous filters and use the new selection instead
00445         free_list_types(m_warnings, m_entries);
00446
00447         m_entries = entries;
00448         m_warnings = warnings;
00449     }
00450     else
00451     {
00452         free_list_types(warnings, entries);
00453     }
00454 }
00455
00457 void CImport_OPTIONS::OnSelchangePath()
00458 {
00459     CString strPrevPath;
00460     m_pathCombo.GetWindowText(strPrevPath);
00461
00462     m_pathCombo.EnsureSelchangeMatch();
00463
00464     CString strPath;
00465     m_pathCombo.GetWindowText(strPath);
00466
00467     if( strPrevPath.CompareNoCase(strPath) )
00468     {
00469         if( !ImportFilter(strPath) )
00470         {
00471             m_pathCombo.SelectString(-1, strPrevPath);
00472         }
00473     }
00474 }
00475
00479 bool CImport_OPTIONS::ImportFilter(const char* path)
00480 {
00481     bool res = false;
00482
00483     ReportConflict* entries = NULL;
00484     ReportWarning* warnings = NULL;
00485
00486     if( CompatImportFilter(path, entries, warnings) )
00487     {
00488         // Free the previous filters and use the new selection instead
00489         free_list_types(m_warnings, m_entries);
00490
00491         m_entries = entries;
00492         m_warnings = warnings;
00493
00494         res = true;
00495     }
00496
00497     return res;
00498 }
00499
00501 void CImport_OPTIONS::OnBrowseBranchid()
00502 {
00503     CStr branchName;
00504     if( CompatGetTagListItem(m_mf, branchName) )
00505     {
00506         m_vendorBranch = (const char*)branchName;
00507         m_vendorBranchCombo.SetWindowText(m_vendorBranch);
00508     }
00509 }
00510
00512 void CImport_OPTIONS::OnBranchid()
00513 {
00514     m_vendorBranchCombo.EnableWindow(m_vendorBranchCheck.GetCheck());
00515     m_vendorBranchButton.EnableWindow(m_vendorBranchCheck.GetCheck());
00516 }
00517
00518 #endif /* WIN32 */
00519
00520 #ifdef qMacCvsPP
00521 static void DoDataExchange_ImportMain(LWindow *theDialog, CStr & modname, CStr & logmsg, bool putValue)
00522 {
00523     LEditText *mname = dynamic_cast<LEditText*>
00524         (theDialog->FindPaneByID(item_ModuleName));
00525     LTextEditView *editLog = dynamic_cast<LTextEditView*>
00526         (theDialog->FindPaneByID(item_LogMsg));
00527
00528     if(putValue)
00529     {
00530         mname->SetText((Ptr)(const char *)modname, modname.length());
00531         editLog->SetTextPtr((Ptr)(const char *)logmsg, logmsg.length());
00532         theDialog->SetLatentSub(mname);
00533
00534         // this will take care about an empty module name
00535         mname->AddListener(GetDlgHandler());
00536         if(modname.length() == 0)
00537         {
00538             LPushButton *theOK = dynamic_cast<LPushButton*>
00539                                         (theDialog->FindPaneByID(item_OK));
00540             Assert_(theOK != 0L);
00541             theOK->Disable();
00542         }
00543     }
00544     else
00545     {
00546         Handle hdl = editLog->GetTextHandle();
00547         Assert_(hdl != 0L);
00548         logmsg.set(*hdl, GetHandleSize(hdl));
00549
00550         char buf[512];
00551         Size len;
00552         mname->GetText(buf, 511, &len);
00553         modname.set(buf, len);
00554
00555     }
00556 }
00557
00558 static void DoDataExchange_ImportTags(LWindow *theDialog, CStr & vendortag, CStr & reltag, bool putValue)
00559 {
00560     LEditText *vtag = dynamic_cast<LEditText*>
00561         (theDialog->FindPaneByID(item_Vendortag));
00562     LEditText *rtag = dynamic_cast<LEditText*>
00563         (theDialog->FindPaneByID(item_Reltag));
00564
00565     if(putValue)
00566     {
00567         vtag->SetText((Ptr)(const char *)vendortag, vendortag.length());
00568         rtag->SetText((Ptr)(const char *)reltag, reltag.length());
00569         theDialog->SetLatentSub(vtag);
00570     }
00571     else
00572     {
00573         char buf[512];
00574         Size len;
00575         vtag->GetText(buf, 511, &len);
00576         vendortag.set(buf, len);
00577         rtag->GetText(buf, 511, &len);
00578         reltag.set(buf, len);
00579
00580     }
00581 }
00582 #endif /* qMacCvsPP */
00583
00584 #if qUnix
00585 class UCvsImport : public UWidget
00586 {
00587     UDECLARE_DYNAMIC(UCvsImport)
00588 public:
00589     UCvsImport() : UWidget(::UEventGetWidID()) {}
00590     virtual ~UCvsImport() {}
00591
00592     enum
00593     {
00594         kOK = EV_COMMAND_START, // 0
00595         kCancel,                // 1
00596         kTabGeneral             // 2
00597     };
00598
00599     virtual void DoDataExchange(bool fill);
00600
00601 protected:
00602     ev_msg int OnOK(void);
00603     ev_msg int OnCancel(void);
00604
00605     UDECLARE_MESSAGE_MAP()
00606 };
00607
00608 UIMPLEMENT_DYNAMIC(UCvsImport, UWidget)
00609
00610 UBEGIN_MESSAGE_MAP(UCvsImport, UWidget)
00611     ON_UCOMMAND(UCvsImport::kOK, UCvsImport::OnOK)
00612     ON_UCOMMAND(UCvsImport::kCancel, UCvsImport::OnCancel)
00613 UEND_MESSAGE_MAP()
00614
00615 int UCvsImport::OnOK(void)
00616 {
00617     EndModal(true);
00618     return 0;
00619 }
00620
00621 int UCvsImport::OnCancel(void)
00622 {
00623     EndModal(false);
00624     return 0;
00625 }
00626
00627 void UCvsImport::DoDataExchange(bool fill)
00628 {
00629     if(fill)
00630     {
00631     }
00632     else
00633     {
00634     }
00635 }
00636
00637 class UCvsImport_MAIN : public UWidget
00638 {
00639     UDECLARE_DYNAMIC(UCvsImport_MAIN)
00640 public:
00641     UCvsImport_MAIN(const char *logmsg, const char *modname,
00642                     const char *rtag, const char *vtag);
00643     virtual ~UCvsImport_MAIN() {}
00644
00645     enum
00646     {
00647         kEditModule = EV_COMMAND_START, // 0
00648         kEditLog,                       // 1
00649         kEditVendor,                    // 2
00650         kEditRelease                    // 3
00651     };
00652
00653     virtual void DoDataExchange(bool fill);
00654
00655     UStr m_logmsg;
00656     UStr m_modname;
00657     UStr m_rtag;
00658     UStr m_vtag;
00659 protected:
00660
00661     UDECLARE_MESSAGE_MAP()
00662 };
00663
00664 UIMPLEMENT_DYNAMIC(UCvsImport_MAIN, UWidget)
00665
00666 UBEGIN_MESSAGE_MAP(UCvsImport_MAIN, UWidget)
00667 UEND_MESSAGE_MAP()
00668
00669 UCvsImport_MAIN::UCvsImport_MAIN(const char *logmsg, const char *modname,
00670                                  const char *rtag, const char *vtag) : UWidget(::UEventGetWidID())
00671 {
00672     m_logmsg = logmsg;
00673     m_modname = modname;
00674     m_rtag = rtag;
00675     m_vtag = vtag;
00676 }
00677
00678 void UCvsImport_MAIN::DoDataExchange(bool fill)
00679 {
00680     ::DoDataExchange(fill, GetWidID(), kEditModule, gOldModules);
00681     ::DoDataExchange(fill, GetWidID(), kEditRelease, gReleasesNames);
00682     ::DoDataExchange(fill, GetWidID(), kEditVendor, gVendorNames);
00683
00684     if(fill)
00685     {
00686         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditLog, (void *)(const char *)m_logmsg);
00687         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditModule, (void *)(const char *)m_modname);
00688         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditRelease, (void *)(const char *)m_rtag);
00689         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditVendor, (void *)(const char *)m_vtag);
00690     }
00691     else
00692     {
00693         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditLog, &m_logmsg);
00694         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditModule, &m_modname);
00695         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditRelease, &m_rtag);
00696         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditVendor, &m_vtag);
00697     }
00698 }
00699
00700 class UCvsImport_OPTIONS : public UWidget
00701 {
00702     UDECLARE_DYNAMIC(UCvsImport_OPTIONS)
00703 public:
00704     UCvsImport_OPTIONS(const char *path);
00705     virtual ~UCvsImport_OPTIONS() {}
00706
00707     enum
00708     {
00709         kStatPath = EV_COMMAND_START,   // 0
00710         kBtnChange                      // 1
00711     };
00712
00713     virtual void DoDataExchange(bool fill);
00714
00715     UStr m_path;
00716 protected:
00717
00718     ev_msg int OnChange(void);
00719
00720     UDECLARE_MESSAGE_MAP()
00721 };
00722
00723 UIMPLEMENT_DYNAMIC(UCvsImport_OPTIONS, UWidget)
00724
00725 UBEGIN_MESSAGE_MAP(UCvsImport_OPTIONS, UWidget)
00726     ON_UCOMMAND(UCvsImport_OPTIONS::kBtnChange, UCvsImport_OPTIONS::OnChange)
00727 UEND_MESSAGE_MAP()
00728
00729 UCvsImport_OPTIONS::UCvsImport_OPTIONS(const char *path) : UWidget(::UEventGetWidID())
00730 {
00731     m_path = path;
00732 }
00733
00734 int UCvsImport_OPTIONS::OnChange()
00735 {
00736     CStr dir;
00737     if( BrowserGetDirectory("Select a directory to import from", dir) )
00738     {
00739         UEventSendMessage(GetWidID(), EV_SETTEXT, kStatPath, (void*)dir.c_str());
00740     }
00741
00742     return 0;
00743 }
00744
00745 void UCvsImport_OPTIONS::DoDataExchange(bool fill)
00746 {
00747     if(fill)
00748     {
00749         UEventSendMessage(GetWidID(), EV_SETTEXT, kStatPath, (void *)(const char *)m_path);
00750     }
00751     else
00752     {
00753         UEventSendMessage(GetWidID(), EV_GETTEXT, kStatPath, &m_path);
00754     }
00755 }
00756 #endif // qUnix
00757
00759 bool CompatGetImport(const MultiFiles* mf,
00760                      ReportConflict*& entries, ReportWarning*& warnings,
00761                      CStr& modname, CStr& logmsg,
00762                      CStr& vendortag, CStr& reltag, CStr& vendorBranchId, CStr& path,
00763                      bool& useDefIgnore, bool& useFilesTime, bool& createSandbox,
00764                      bool& dontCreateVendorTag, bool& overwriteReleaseTags,
00765                      bool& forceCvsroot, CStr& cvsroot)
00766 {
00767     bool userHitOK = false;
00768
00769     modname = "";
00770     logmsg = "";
00771     vendortag = "";
00772     reltag = "";
00773     vendorBranchId = "";
00774     useDefIgnore = false;
00775     useFilesTime = false;
00776     createSandbox = false;
00777     dontCreateVendorTag = false;
00778     overwriteReleaseTags = false;
00779
00780     static CStr sLastModName;   /*Obsolete - remove it and always use sFolder! Get rid after all platforms have combo boxes for recent modules!*/
00781
00782     static CStr sFolder;
00783     static CStr sLastMsg;
00784     static CStr sLastVTag("avendor");
00785     static CStr sLastRTag("arelease");
00786     static bool lastForceCvsroot = true;
00787     static CStr sLastCvsroot("");
00788
00789     bool hasVendorBranchId = false;
00790
00791     // Find out the folder so we can suggest the module name
00792     CStr uppath, folder;
00793     if( SplitPath(path, uppath, folder) )
00794         sFolder = folder;
00795
00796     if( sLastModName.length() == 0L )   /*Obsolete - see above*/
00797     {
00798         sLastModName = folder;
00799     }
00800
00801     FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00802
00803 #ifdef WIN32
00804     CHHelpPropertySheet pages("Import settings");
00805     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00806
00807     CImport_MAIN page1(mf, sLastMsg, sFolder, sLastRTag, sLastVTag, dontCreateVendorTag, overwriteReleaseTags, lastForceCvsroot, sLastCvsroot);
00808     CImport_OPTIONS page2(mf, entries, warnings, path, useDefIgnore, useFilesTime, createSandbox);
00809     CGetPrefs_GLOBALS page3;
00810
00811     pages.AddPage(&page1);
00812     pages.AddPage(&page2);
00813     pages.AddPage(&page3);
00814
00815     if( pages.DoModal() == IDOK )
00816     {
00817         sLastModName = (const char*)page1.m_moduleName;
00818         sLastMsg = (const char*)page1.GetLogMsg();
00819         sLastVTag = (const char*)page1.m_vtag;
00820         sLastRTag = (const char*)page1.m_rtag;
00821         dontCreateVendorTag = page1.m_dontCreateVendorTag != FALSE;
00822         overwriteReleaseTags = page1.m_overwriteReleaseTags != FALSE;
00823         lastForceCvsroot = page1.m_forceRoot == TRUE;
00824         sLastCvsroot = page1.m_cvsroot;
00825
00826         hasVendorBranchId = page2.m_hasVendorBranch != FALSE;
00827         vendorBranchId = (const char*)page2.m_vendorBranch;
00828         path = (const char*)page2.m_path;
00829         useDefIgnore = page2.m_useDefIgnore != FALSE;
00830         useFilesTime = page2.m_useFilesTime != FALSE;
00831         createSandbox = page2.m_createSandbox != FALSE;
00832
00833         page3.StoreValues();
00834
00835         userHitOK = true;
00836     }
00837 #endif /* WIN32 */
00838
00839 #ifdef qMacCvsPP
00840     StDialogHandler theHandler(dlg_Import, LCommander::GetTopCommander());
00841     LWindow *theDialog = theHandler.GetDialog();
00842     ThrowIfNil_(theDialog);
00843     static UInt16 sRuntimePanel = 1;
00844
00845     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00846         (theDialog->FindPaneByID(item_MultiViewPrefs));
00847     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00848
00849     multiView->SwitchToPanel(3);
00850     DoDataExchange_Globals(theDialog, true);
00851     multiView->SwitchToPanel(2);
00852     DoDataExchange (theDialog, item_ImportCvsIgnore, useDefIgnore, true);
00853     DoDataExchange (theDialog, item_ShowPath, path, true);
00854     dynamic_cast<LControl*> (theDialog->FindPaneByID (item_EditPath))->AddListener (&theHandler);
00855
00856     multiView->SwitchToPanel(1);
00857     DoDataExchange_ImportMain(theDialog, sLastModName, sLastMsg, true);
00858     DoDataExchange_ImportTags(theDialog, sLastVTag, sLastRTag, true);
00859
00860
00861     groupView->SetValue(sRuntimePanel);
00862     theDialog->Show();
00863     MessageT hitMessage;
00864     while (true)
00865     {       // Let DialogHandler process events
00866         hitMessage = theHandler.DoDialog();
00867
00868         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00869             break;
00870
00871         if(hitMessage == item_EditPath)
00872         {
00873             CStr dir;
00874             if( BrowserGetDirectory("Select a directory to import from", dir) )
00875             {
00876                 CPStr tmp(dir.c_str());
00877                 theDialog->SetDescriptorForPaneID(item_ShowPath, tmp);
00878             }
00879         }
00880     }
00881     theDialog->Hide();
00882     sRuntimePanel = groupView->GetValue();
00883
00884     if(hitMessage == msg_OK)
00885     {
00886         multiView->SwitchToPanel(1);
00887         DoDataExchange_ImportMain(theDialog, sLastModName, sLastMsg, false);
00888         DoDataExchange_ImportTags(theDialog, sLastVTag, sLastRTag, false);
00889         multiView->SwitchToPanel(2);
00890         DoDataExchange (theDialog, item_ImportCvsIgnore, useDefIgnore, false);
00891         DoDataExchange (theDialog, item_ShowPath, path, false);
00892         multiView->SwitchToPanel(3);
00893         DoDataExchange_Globals(theDialog, false);
00894
00895         Assert_(sLastModName.length() != 0);
00896
00897         userHitOK = true;
00898     }
00899 #endif /* qMacCvsPP */
00900
00901 #if qUnix
00902     void *wid = UCreate_ImportDlg();
00903
00904     UCvsImport *dlg = new UCvsImport();
00905     UCvsImport_MAIN *tab1 = new UCvsImport_MAIN(sLastMsg, sLastModName, sLastRTag, sLastVTag);
00906     UCvsImport_OPTIONS *tab2 = new UCvsImport_OPTIONS(path);
00907     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00908     dlg->AddPage(tab1, UCvsImport::kTabGeneral, 0);
00909     dlg->AddPage(tab2, UCvsImport::kTabGeneral, 1);
00910
00911     if(dlg->DoModal())
00912     {
00913         sLastModName = tab1->m_modname;
00914         sLastMsg = tab1->m_logmsg;
00915         sLastVTag = tab1->m_vtag;
00916         sLastRTag = tab1->m_rtag;
00917         path = tab2->m_path;
00918
00919         userHitOK = true;
00920     }
00921
00922     delete dlg;
00923 #endif // qUnix
00924
00925     if( userHitOK )
00926     {
00927         gCvsPrefs.save();
00928
00929         if( sLastMsg.length() == 0 )
00930             sLastMsg = "no message";
00931
00932         if( sLastVTag.length() == 0 )
00933             sLastVTag = "initial";
00934
00935         if( sLastRTag.length() == 0 )
00936             sLastRTag = "start";
00937
00938         if( !hasVendorBranchId )
00939         {
00940             vendorBranchId = "";
00941         }
00942
00943         modname = sLastModName;
00944         logmsg = sLastMsg;
00945         vendortag = sLastVTag;
00946         reltag = sLastRTag;
00947
00948 #ifdef TARGET_OS_MAC
00949         logmsg.replace('\015', '\012');
00950 #endif /* TARGET_OS_MAC */
00951
00952         forceCvsroot = lastForceCvsroot;
00953         cvsroot = sLastCvsroot;
00954
00955         if( forceCvsroot )
00956         {
00957             InsertLastCvsroot(path, cvsroot);
00958         }
00959
00960         gCvsPrefs.save();
00961     }
00962
00963     return userHitOK;
00964 }
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CAdminOption_MAIN Member List

This is the complete list of members for CAdminOption_MAIN, including all inherited members.

CAdminOption_MAIN(const MultiFiles *mf, kAdminOptionDlgType type, const char *optionString, CWnd *pParent=NULL) | CAdminOption_MAIN |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CAdminOption_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetOptionString() const | CAdminOption_MAIN |
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CAdminOption_MAIN |
InitHelpID() | CAdminOption_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_multilineEntryDlg | CAdminOption_MAIN | [private]
m_multilineEntryPlaceholder | CAdminOption_MAIN |
m_optionString | CAdminOption_MAIN | [private]
m_type | CAdminOption_MAIN | [private]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CAdminOption_MAIN | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
SetMultilineEntry() | CAdminOption_MAIN | [private]
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:48:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGfxOutBarCtrl Member List

This is the complete list of members for CGfxOutBarCtrl, including all inherited members.

AddFolder(LPCTSTR cFolderName, const DWORD exData) | CGfxOutBarCtrl | [virtual]
AddFolderBar(LPCTSTR pFolder, CWnd *pSon, const DWORD exData=0) | CGfxOutBarCtrl | [virtual]
AnimateFolderScroll(const int iFrom, const int iTo) | CGfxOutBarCtrl | [virtual]
arFolder | CGfxOutBarCtrl |
bDownArrow | CGfxOutBarCtrl |
bDownPressed | CGfxOutBarCtrl |
bLooping | CGfxOutBarCtrl |
bPressedHighlight | CGfxOutBarCtrl |
bUpArrow | CGfxOutBarCtrl |
bUpPressed | CGfxOutBarCtrl |
CGfxOutBarCtrl() | CGfxOutBarCtrl |
cr3dFace | CGfxOutBarCtrl |
crBackGroundColor | CGfxOutBarCtrl |
crBackGroundColor1 | CGfxOutBarCtrl |
crDkShadowBorder | CGfxOutBarCtrl |
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, const DWORD dwFlag=fDragItems|fEditGroups|fEditItems|fRemoveGroups|fRemoveItems|fAddGroups|fAnimation|fSelHighlight) | CGfxOutBarCtrl | [virtual]
crHilightBorder | CGfxOutBarCtrl |
crLightBorder | CGfxOutBarCtrl |
crShadowBorder | CGfxOutBarCtrl |
crTextColor | CGfxOutBarCtrl |
DrawAnimItem(const int xoffset, const int yoffset, const int index) | CGfxOutBarCtrl | [virtual]
DrawDragArrow(CDC *pDC, const int iFrom, const int iTo) | CGfxOutBarCtrl | [virtual]
DrawFolder(CDC *pDC, const int iIdx, CRect rect, const bool bSelected) | CGfxOutBarCtrl | [protected]
DrawItem(CDC *pDC, const int iFolder, CRect rc, const int index, const bool bOnlyImage=false) | CGfxOutBarCtrl | [virtual]
dwFlags | CGfxOutBarCtrl |
fAddGroups enum value | CGfxOutBarCtrl |
fAnimation enum value | CGfxOutBarCtrl |
fDragItems enum value | CGfxOutBarCtrl |
fEditGroups enum value | CGfxOutBarCtrl |
fEditItems enum value | CGfxOutBarCtrl |
fLargeIcon enum value | CGfxOutBarCtrl |
fRemoveGroups enum value | CGfxOutBarCtrl |
fRemoveItems enum value | CGfxOutBarCtrl |
fSelHighlight enum value | CGfxOutBarCtrl |
fSmallIcon enum value | CGfxOutBarCtrl |
GetAnimationTickCount() | CGfxOutBarCtrl | [inline, virtual]
GetCountPerPage() const | CGfxOutBarCtrl | [virtual]
GetDragItemRect(const int index, CRect &rect) | CGfxOutBarCtrl | [virtual]
GetFlag() const | CGfxOutBarCtrl | [virtual]
GetFolderChild(int iFolder=-1) | CGfxOutBarCtrl | [virtual]
GetFolderCount() const | CGfxOutBarCtrl | [virtual]
GetFolderData(int iFolder=-1) | CGfxOutBarCtrl | [virtual]
GetFolderImageList(const int index, const bool bSmall) const | CGfxOutBarCtrl | [virtual]
GetFolderRect(const int iIndex, CRect &rect) const | CGfxOutBarCtrl | [virtual]
GetIconRect(const int iFolder, const int iIndex, CRect &rect) | CGfxOutBarCtrl | [virtual]
GetImageList(CImageList *pImageList, int nImageList) | CGfxOutBarCtrl | [virtual]
GetInsideRect(CRect &rect) const | CGfxOutBarCtrl | [virtual]
GetItemCount() const | CGfxOutBarCtrl | [virtual]
GetItemData(const int index) const | CGfxOutBarCtrl | [virtual]
GetItemImage(const int index) const | CGfxOutBarCtrl | [virtual]
GetItemRect(const int iFolder, const int iIndex, CRect &rect) | CGfxOutBarCtrl | [virtual]
GetItemSize(const int iFolder, const int index, const int type) | CGfxOutBarCtrl | [virtual]
GetItemText(const int index) | CGfxOutBarCtrl | [virtual]
GetLabelRect(const int iFolder, const int iIndex, CRect &rect) | CGfxOutBarCtrl | [virtual]
GetSelFolder() const | CGfxOutBarCtrl | [virtual]
GetVisibleRange(const int iFolder, int &first, int &last) | CGfxOutBarCtrl | [virtual]
hDragCursor | CGfxOutBarCtrl |
hHandCursor | CGfxOutBarCtrl |
HighlightFolder(const int index) | CGfxOutBarCtrl | [virtual]
HighlightItem(const int index, const bool bPressed=false) | CGfxOutBarCtrl | [virtual]
HitTestEx(const CPoint &point, int &index) | CGfxOutBarCtrl | [virtual]
hNoDragCursor | CGfxOutBarCtrl |
htDownScroll enum value | CGfxOutBarCtrl |
htFolder enum value | CGfxOutBarCtrl |
htItem enum value | CGfxOutBarCtrl |
htNothing enum value | CGfxOutBarCtrl |
htUpScroll enum value | CGfxOutBarCtrl |
iFirstItem | CGfxOutBarCtrl |
iFolderHeight | CGfxOutBarCtrl |
iHitInternal1 | CGfxOutBarCtrl |
iHitInternal2 | CGfxOutBarCtrl |
iLastDragItemDraw | CGfxOutBarCtrl |
iLastDragItemDrawType | CGfxOutBarCtrl |
iLastFolderHighlighted | CGfxOutBarCtrl |
iLastItemHighlighted | CGfxOutBarCtrl |
iLastSel | CGfxOutBarCtrl |
iLastSelectedFolder | CGfxOutBarCtrl |
InsertItem(const int folder, const int index, LPCTSTR text, const int image=-1, const DWORD exData=0) | CGfxOutBarCtrl | [virtual]
ircAll enum value | CGfxOutBarCtrl |
ircIcon enum value | CGfxOutBarCtrl |
ircLabel enum value | CGfxOutBarCtrl |
iSelAnimCount | CGfxOutBarCtrl |
iSelAnimTiming | CGfxOutBarCtrl |
iSelFolder | CGfxOutBarCtrl |
IsSmallIconView() const | CGfxOutBarCtrl | [virtual]
IsValidItem(const int index) const | CGfxOutBarCtrl | [virtual]
lAnimationTickCount | CGfxOutBarCtrl |
m_popupMenu | CGfxOutBarCtrl |
m_strRemoveItem | CGfxOutBarCtrl |
m_strRenameItem | CGfxOutBarCtrl |
ModifyFlag(const DWORD &dwRemove, const DWORD &dwAdd, const UINT redraw=0) | CGfxOutBarCtrl | [virtual]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CGfxOutBarCtrl | [protected]
OnEndLabelEdit(WPARAM wParam, LPARAM lParam) | CGfxOutBarCtrl | [protected]
OnEraseBkgnd(CDC *pDC) | CGfxOutBarCtrl | [protected]
OnGfxLargeicon() | CGfxOutBarCtrl | [protected]
OnGfxRemoveitem() | CGfxOutBarCtrl | [protected]
OnGfxRenameitem() | CGfxOutBarCtrl | [protected]
OnGfxSmallicon() | CGfxOutBarCtrl | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CGfxOutBarCtrl | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CGfxOutBarCtrl | [protected]
OnPaint() | CGfxOutBarCtrl | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CGfxOutBarCtrl | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CGfxOutBarCtrl | [protected]
OnSize(UINT nType, int cx, int cy) | CGfxOutBarCtrl | [protected]
OnSysColorChange() | CGfxOutBarCtrl | [protected]
OnTimer(UINT nIDEvent) | CGfxOutBarCtrl | [protected]
OnUpdateGfxLargeicon(CCmdUI *pCmdUI) | CGfxOutBarCtrl | [protected]
OnUpdateGfxRemoveitem(CCmdUI *pCmdUI) | CGfxOutBarCtrl | [protected]
OnUpdateGfxRenameitem(CCmdUI *pCmdUI) | CGfxOutBarCtrl | [protected]
OnUpdateGfxSmallicon(CCmdUI *pCmdUI) | CGfxOutBarCtrl | [protected]
PaintItems(CDC *pDC, const int iFolder, CRect rc) | CGfxOutBarCtrl | [virtual]
pBlackPen | CGfxOutBarCtrl |
pLargeImageList | CGfxOutBarCtrl |
pSmallImageList | CGfxOutBarCtrl |
rcDownArrow | CGfxOutBarCtrl |
rcUpArrow | CGfxOutBarCtrl |
RemoveFolder(const int index) | CGfxOutBarCtrl | [virtual]
RemoveItem(const int index) | CGfxOutBarCtrl | [virtual]
SetAnimationTickCount(const long value) | CGfxOutBarCtrl | [inline, virtual]
SetAnimSelHighlight(const int iTime) | CGfxOutBarCtrl | [virtual]
SetFolderImageList(const int folder, CImageList *pImageList, int nImageList) | CGfxOutBarCtrl | [virtual]
SetFolderText(const int index, LPCTSTR text) | CGfxOutBarCtrl | [virtual]
SetImageList(CImageList *pImageList, int nImageList) | CGfxOutBarCtrl | [virtual]
SetItemData(const int index, const DWORD dwData) | CGfxOutBarCtrl | [virtual]
SetItemImage(const int index, const int iImage) | CGfxOutBarCtrl | [virtual]
SetItemText(const int index, LPCTSTR text) | CGfxOutBarCtrl | [virtual]
SetSelFolder(const int index) | CGfxOutBarCtrl | [virtual]
SetSmallIconView(const bool bSet) | CGfxOutBarCtrl | [virtual]
StartGroupEdit(const int index) | CGfxOutBarCtrl | [virtual]
StartItemEdit(const int index) | CGfxOutBarCtrl | [virtual]
xLeftMargin | CGfxOutBarCtrl |
xSmallIconLabelOffset | CGfxOutBarCtrl |
yLargeIconLabelOffset | CGfxOutBarCtrl |
yLargeIconSpacing | CGfxOutBarCtrl |
ySmallIconSpacing | CGfxOutBarCtrl |
yTopMargin | CGfxOutBarCtrl |
~CGfxOutBarCtrl() | CGfxOutBarCtrl | [virtual]

Generated on Sat Aug 7 22:52:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWinLogTagData Member List

This is the complete list of members for CWinLogTagData, including all inherited members.

Bounds(void) | CWinLogData | [inline]
Bounds(void) | CWinLogData | [inline]
CollectMergePointPairPass1(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass1Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected, virtual]
CollectMergePointPairPass2(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass2Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected, virtual]
ComputeBounds(const UPoint &topLeft, UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
ComputeBounds(const CPoint &topLeft, CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
CreateNewData(CLogNode *node) | CWinLogData | [static]
CreateNewData(CLogNode *node) | CWinLogData | [static]
CWinLogData(CLogNode *node) | CWinLogData |
CWinLogData(CLogNode *node) | CWinLogData |
CWinLogTagData(CLogNode *node) | CWinLogTagData | [inline]
CWinLogTagData(CLogNode *node) | CWinLogTagData | [inline]
GetBoundsSelf(UDC &hdc, EntnodeData *entryInfo) | CWinLogTagData | [protected, virtual]
GetBoundsSelf(CDC &dc, EntnodeData *entryInfo) | CWinLogTagData | [protected, virtual]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetStr(void) | CWinLogData |
GetStr(void) | CWinLogData |
GetType(void) const | CWinLogData | [inline]
GetType(void) const | CWinLogData | [inline]
HitTest(UPoint point) | CWinLogData |
HitTest(CPoint point) | CWinLogData |
IsDeadNode() | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsUserState() | CWinLogData |
Offset(UPoint o) | CWinLogData |
Offset(CPoint offset) | CWinLogData |
sel | CWinLogData | [protected]
Selected(void) const | CWinLogData | [inline]
Selected(void) const | CWinLogData | [inline]
selfB | CWinLogData | [protected]
SelfBounds(void) | CWinLogData | [inline]
SelfBounds(void) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
SetSelected(bool state) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
totB | CWinLogData | [protected]
UnselectAll(CScrollView *view) | CWinLogData |
UnselectAll(void) | CWinLogData |
UnselectAll(CScrollView *view) | CWinLogData |
Update(UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
Update(CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
UpdateMergePoints(CDC &dc) | CWinLogData |
UpdateSelf(UDC &hdc, EntnodeData *entryInfo) | CWinLogTagData | [protected, virtual]
UpdateSelf(CDC &dc, EntnodeData *entryInfo) | CWinLogTagData | [protected, virtual]
~CWinLogData() | CWinLogData | [virtual]
~CWinLogData() | CWinLogData | [virtual]
~CWinLogTagData() | CWinLogTagData | [inline, virtual]
~CWinLogTagData() | CWinLogTagData | [inline, virtual]

Generated on Sat Aug 7 22:58:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWinLogRevData Member List

This is the complete list of members for CWinLogRevData, including all inherited members.

Bounds(void) | CWinLogData | [inline]
Bounds(void) | CWinLogData | [inline]
CollectMergePointPairPass1(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass1Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogRevData | [protected, virtual]
CollectMergePointPairPass2(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass2Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogRevData | [protected, virtual]
ComputeBounds(const UPoint &topLeft, UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
ComputeBounds(const CPoint &topLeft, CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
CreateNewData(CLogNode *node) | CWinLogData | [static]
CreateNewData(CLogNode *node) | CWinLogData | [static]
CWinLogData(CLogNode *node) | CWinLogData |
CWinLogData(CLogNode *node) | CWinLogData |
CWinLogRevData(CLogNode *node) | CWinLogRevData | [inline]
CWinLogRevData(CLogNode *node) | CWinLogRevData | [inline]
GetBoundsSelf(UDC &hdc, EntnodeData *entryInfo) | CWinLogRevData | [protected, virtual]
GetBoundsSelf(CDC &dc, EntnodeData *entryInfo) | CWinLogRevData | [protected, virtual]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetStr(void) | CWinLogData |
GetStr(void) | CWinLogData |
GetType(void) const | CWinLogData | [inline]
GetType(void) const | CWinLogData | [inline]
HitTest(UPoint point) | CWinLogData |
HitTest(CPoint point) | CWinLogData |
IsDeadNode() | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsUserState() | CWinLogData |
Offset(UPoint o) | CWinLogData |
Offset(CPoint offset) | CWinLogData |
sel | CWinLogData | [protected]
Selected(void) const | CWinLogData | [inline]
Selected(void) const | CWinLogData | [inline]
selfB | CWinLogData | [protected]
SelfBounds(void) | CWinLogData | [inline]
SelfBounds(void) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
SetSelected(bool state) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
totB | CWinLogData | [protected]
UnselectAll(CScrollView *view) | CWinLogData |
UnselectAll(void) | CWinLogData |
UnselectAll(CScrollView *view) | CWinLogData |
Update(UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
Update(CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
UpdateMergePoints(CDC &dc) | CWinLogData |
UpdateSelf(UDC &hdc, EntnodeData *entryInfo) | CWinLogRevData | [protected, virtual]
UpdateSelf(CDC &dc, EntnodeData *entryInfo) | CWinLogRevData | [protected, virtual]
~CWinLogData() | CWinLogData | [virtual]
~CWinLogData() | CWinLogData | [virtual]
~CWinLogRevData() | CWinLogRevData | [inline, virtual]
~CWinLogRevData() | CWinLogRevData | [inline, virtual]

Generated on Sat Aug 7 22:58:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MultiString.cpp Source File

common/MultiString.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- August 1998
00019  */
00020
00021 /*
00022  * MultiString.cpp --- remember several unique persistents strings
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include "MultiString.h"
00028
00029 #if qUnix
00030 #   include "uwidget.h"
00031 #endif
00032
00033 #ifdef WIN32
00034 #   ifdef _DEBUG
00035 #   define new DEBUG_NEW
00036 #   undef THIS_FILE
00037     static char THIS_FILE[] = __FILE__;
00038 #   endif
00039 #   pragma warning (disable : 4660)
00040 #endif /* WIN32 */
00041
00042 UIMPLEMENT_DYNAMIC(CMString, CPersistent)
00043 UIMPLEMENT_DYNAMIC(CMPString, CPersistent)
00044
00045 #if qUnix
00046 void DoDataExchange(bool fill, int widid, int cmdid, CMString& mstr)
00047 {
00048     if(fill)
00049     {
00050         UEventSendMessage(widid, EV_COMBO_RESETALL, cmdid, 0L);
00051         const NAMESPACE(std) vector<CStr> & list = mstr.GetList();
00052         NAMESPACE(std) vector<CStr>::const_iterator i;
00053         for(i = list.begin(); i != list.end(); ++i)
00054         {
00055             UEventSendMessage(widid, EV_COMBO_APPEND, cmdid, (void*)(const char*)*i);
00056         }
00057     }
00058     else
00059     {
00060         UStr value;
00061         UEventSendMessage(widid, EV_GETTEXT, cmdid, &value);
00062         if(!value.empty())
00063         {
00064             mstr.Insert(value);
00065         }
00066     }
00067 }
00068 #endif // qUnix
00069
00071 // TMPersistent
00072
00074 // TMString
00075
00077 template<class T>
00078 TMString<T>::TMString(unsigned int maxstr, const char* uniqueName,
00079                       char* const* defaultStr /*= 0L*/, kClassPersistent pclass /*= kNoClass*/)
00080     : CPersistent(uniqueName, pclass), m_maxStr(maxstr)
00081 {
00082     if( defaultStr != 0L )
00083     {
00084         int i = 0;
00085         while( defaultStr[i] != 0L )
00086         {
00087             Insert(defaultStr[i++]);
00088         }
00089     }
00090 }
00091
00092 template<class T>
00093 TMString<T>::~TMString()
00094 {
00095 }
00096
00097 template<class T>
00098 unsigned int TMString<T>::SizeOf(void) const
00099 {
00100     unsigned int thesize = sizeof(int);
00101
00102     for(typename list_t::const_iterator i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00103     {
00104         thesize += (*i).length() + 1;
00105     }
00106
00107     return thesize;
00108 }
00109
00110 template<class T>
00111 const void* TMString<T>::GetData(void) const
00112 {
00113     unsigned int thesize = SizeOf(), tmpsize;
00114     ((TMString*)this)->m_buffer.AdjustSize(thesize);
00115
00116     char* tmp = ((TMString*)this)->m_buffer;
00117     *(int*)tmp = m_allStrs.size();
00118     tmp += sizeof(int) / sizeof(char);
00119
00120     for(typename list_t::const_iterator i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00121     {
00122         tmpsize = (*i).length() + 1;
00123         memcpy(tmp, (const char*)(*i), tmpsize * sizeof(char));
00124         tmp += tmpsize;
00125     }
00126
00127     return (char*)m_buffer;
00128 }
00129
00130 template<class T>
00131 void TMString<T>::SetData(const void* ptr, unsigned int size)
00132 {
00133     const char* tmp = (char*)ptr;
00134     unsigned int thesize;
00135
00136     m_allStrs.erase(m_allStrs.begin(), m_allStrs.end());
00137     thesize = *(int*)tmp;
00138     tmp += sizeof(int) / sizeof(char);
00139
00140     for(unsigned int i = 0; i < thesize && i < m_maxStr; i++)
00141     {
00142         m_allStrs.push_back(T(tmp));
00143         tmp += strlen(tmp) + 1;
00144     }
00145 }
00146
00153 template<class T>
00154 typename TMString<T>::list_t::const_iterator TMString<T>::Find(const char* instr) const
00155 {
00156 #if (__GNUC__ > 2)
00157     // prevent compiler warnings if gcc 3.x is used
00158     typename TMString<T>::list_t::const_iterator i;
00159 #else
00160     TMString<T>::list_t::const_iterator i;
00161 #endif
00162
00163     for(i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00164     {
00165         if( Compare(*i, instr) == 0 )
00166             break;
00167     }
00168
00169     return i;
00170 }
00171
00176 template<class T>
00177 void TMString<T>::Insert(const char* str)
00178 {
00179     TouchTimeStamp();
00180
00181     for(typename list_t::iterator i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00182     {
00183         if( Compare(*i, str) == 0 )
00184         {
00185             m_allStrs.erase(i);
00186             m_allStrs.insert(m_allStrs.begin(), T(str));
00187             return;
00188         }
00189     }
00190
00191     m_allStrs.insert(m_allStrs.begin(), T(str));
00192
00193     if( m_allStrs.size() > m_maxStr )
00194     {
00195         m_allStrs.erase(m_allStrs.begin() + m_maxStr, m_allStrs.end());
00196     }
00197 }
00198
00204 template<class T>
00205 bool TMString<T>::Remove(const char* str)
00206 {
00207     for(typename list_t::iterator i = m_allStrs.begin(); i != m_allStrs.end(); ++i)
00208     {
00209         if( Compare(*i, str) == 0 )
00210         {
00211             TouchTimeStamp();
00212             m_allStrs.erase(i);
00213             return true;
00214         }
00215     }
00216
00217     return false;
00218 }
00219
00223 template <class T>
00224 void TMString<T>::RemoveAll()
00225 {
00226     TouchTimeStamp();
00227     m_allStrs.clear();
00228 }
00229
00231 // CMString
00232
00233 CMString::CMString(unsigned int maxstr, const char* uniqueName,
00234          char* const* defaultStr /*= 0L*/, kClassPersistent pclass /*= kNoClass*/)
00235          : TMString<CStr>(maxstr, uniqueName, defaultStr, pclass)
00236 {
00237 }
00238
00239 CMString::~CMString()
00240 {
00241 }
00242
00244 // CMPString
00245
00246 CMPString::CMPString(unsigned int maxstr, const char* uniqueName,
00247     char* const* defaultStr /*= 0L*/, kClassPersistent pclass /*= kNoClass*/)
00248     : TMString<CPStr>(maxstr, uniqueName, defaultStr, pclass)
00249 {
00250 }
00251
00252 CMPString::~CMPString()
00253 {
00254 }
00255
00257 // TKeyString
00258
00259 template<char delimiter>
00260 TKeyString<delimiter>::TKeyString(unsigned int maxstr, const char* uniqueName,
00261                                   char* const* defaultStr /*= 0L*/, kClassPersistent pclass /*= kNoClass*/)
00262                                   : CMString(maxstr, uniqueName, defaultStr, pclass)
00263 {
00264 }
00265
00266 template<char delimiter>
00267 TKeyString<delimiter>::~TKeyString()
00268 {
00269 }
00270
00277 template<char delimiter>
00278 void TKeyString<delimiter>::Concatenate(UStr& res, const char* key, const char* value) const
00279 {
00280     char c;
00281     while( (c = *key++) != '\0' )
00282     {
00283         if( c == delimiter || c == '\\' )
00284             res << '\\';
00285
00286         res << c;
00287     }
00288
00289     res << delimiter;
00290     while( (c = *value++) != '\0' )
00291     {
00292         if( c == delimiter || c == '\\' )
00293             res << '\\';
00294
00295         res << c;
00296     }
00297 }
00298
00305 template<char delimiter>
00306 void TKeyString<delimiter>::Split(const char* str, UStr& key, UStr& value) const
00307 {
00308     key.clear();
00309     value.clear();
00310
00311     bool inKey = true;
00312
00313     char c;
00314     while( (c = *str++) != 0 )
00315     {
00316         if( c == '\\' )
00317         {
00318             c = *str++;
00319         }
00320         else if( c == delimiter )
00321         {
00322             inKey = false;
00323             continue;
00324         }
00325
00326         if( inKey )
00327             key << c;
00328         else
00329             value << c;
00330     }
00331 }
00332
00333 template<char delimiter>
00334 int TKeyString<delimiter>::Compare(const char* s1, const char* s2) const
00335 {
00336     UStr key1, key2, val1, val2;
00337
00338     Split(s1, key1, val1);
00339     Split(s2, key2, val2);
00340
00341     return strcmp(key1, key2);
00342 }
00343
00348 template<char delimiter>
00349 const char TKeyString<delimiter>::GetDelimiter() const
00350 {
00351     return delimiter;
00352 }
00353
00355 // CKeyString
00356
00357 CKeyString::CKeyString(unsigned int maxstr, const char* uniqueName,
00358                        char* const* defaultStr /*= 0L*/, kClassPersistent pclass /*= kNoClass*/)
00359                        : TKeyString<'@'>(maxstr, uniqueName, defaultStr, pclass)
00360 {
00361 }
00362
00363 CKeyString::~CKeyString()
00364 {
00365 }
00366
00368 // CMKeyString
00369
00370 CMKeyString::CMKeyString(unsigned int maxstr, const char* uniqueName,
00371                        char* const* defaultStr /*= 0L*/, kClassPersistent pclass /*= kNoClass*/)
00372                        : TKeyString<'\x01'>(maxstr, uniqueName, defaultStr, pclass)
00373 {
00374 }
00375
00376 CMKeyString::~CMKeyString()
00377 {
00378 }
00379
00380 int CMKeyString::Compare(const char* s1, const char* s2) const
00381 {
00382     return CMString::Compare(s1, s2);
00383 }
00384
00385 // this needs to be at the end for Metrowerks
00386 template class TMString<CStr>;
00387 template class TMString<CPStr>;
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CColorMenu Member List

This is the complete list of members for CColorMenu, including all inherited members.

AppendColorMenuItem(UINT nID, awidget *what) | CColorMenu |
CColorMenu(int width, int height) | CColorMenu |
DrawItem(LPDRAWITEMSTRUCT lpDIS) | CColorMenu | [virtual]
m_height | CColorMenu |
m_width | CColorMenu |
MeasureItem(LPMEASUREITEMSTRUCT lpMIS) | CColorMenu | [virtual]
~CColorMenu() | CColorMenu | [virtual]

Generated on Sat Aug 7 22:50:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UStr Member List

This is the complete list of members for UStr, including all inherited members.

c_str() const | UStr | [inline]
clear(void) | UStr |
compare(const char *thestr) const | UStr | [inline]
empty(void) const | UStr | [inline]
endsWith(char c) const | UStr | [inline]
find(const char *thestr) const | UStr |
find(char thechar) const | UStr |
length(void) const | UStr | [inline]
m_str | UStr | [protected]
operator const char *() const | UStr | [inline]
operator!=(const UStr &str) const | UStr | [inline]
operator!=(const char *str) const | UStr | [inline]
operator+=(int addToStr) | UStr | [inline]
operator+=(const char *addToStr) | UStr | [inline]
operator+=(const UStr &addToStr) | UStr | [inline]
operator<(const UStr &str) const | UStr | [inline]
operator<<(const char *addToStr) | UStr |
operator<<(char addToStr) | UStr |
operator<<(int addToStr) | UStr |
operator=(const char *newstr) | UStr |
operator=(const unsigned char *newstr) | UStr |
operator=(const UStr &newstr) | UStr |
operator==(const UStr &str) const | UStr | [inline]
operator==(const char *str) const | UStr | [inline]
operator>(const UStr &str) const | UStr | [inline]
replace(char which, char bywhich) | UStr |
rfind(const char *thestr) const | UStr |
rfind(char thechar) const | UStr |
rtrim(char c) | UStr |
rtrim(const char *MatchList) | UStr |
set(const char *buf, unsigned int len) | UStr |
substr(int idx, int len) const | UStr |
trim(char c= ' ') | UStr |
UStr() | UStr | [inline]
UStr(const char *newstr) | UStr | [inline]
UStr(const unsigned char *newstr) | UStr | [inline]
UStr(const UStr &newstr) | UStr | [inline]
~UStr() | UStr | [virtual]

Generated on Sat Aug 7 22:56:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGetPrefs_CVSCMD_DIALOGS Member List

This is the complete list of members for CGetPrefs_CVSCMD_DIALOGS, including all inherited members.

CGetPrefs_CVSCMD_DIALOGS() | CGetPrefs_CVSCMD_DIALOGS |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CGetPrefs_CVSCMD_DIALOGS | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CGetPrefs_CVSCMD_DIALOGS |
InitHelpID() | CGetPrefs_CVSCMD_DIALOGS | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_ctrlPressedOnOK | CGetPrefs_CVSCMD_DIALOGS |
m_didInteract | CGetPrefs_CVSCMD_DIALOGS | [private]
m_fileAction | CGetPrefs_CVSCMD_DIALOGS |
m_hideAnnotate | CGetPrefs_CVSCMD_DIALOGS |
m_hideDiff | CGetPrefs_CVSCMD_DIALOGS |
m_hideGraph | CGetPrefs_CVSCMD_DIALOGS |
m_hideLog | CGetPrefs_CVSCMD_DIALOGS |
m_hideStatus | CGetPrefs_CVSCMD_DIALOGS |
m_hideUpdate | CGetPrefs_CVSCMD_DIALOGS |
m_keyForce | CGetPrefs_CVSCMD_DIALOGS |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
StoreValues() | CGetPrefs_CVSCMD_DIALOGS |
~CGetPrefs_CVSCMD_DIALOGS() | CGetPrefs_CVSCMD_DIALOGS |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TBuggyPopup Member List

This is the complete list of members for TBuggyPopup, including all inherited members.

DoPostCreate(TDocument *itsDocument) | TBuggyPopup | [private, virtual]
fRealWidth | TBuggyPopup | [protected]
MA_DECLARE_CLASS | TBuggyPopup | [private]
ReadFields(CStream_AC *aStream) | TBuggyPopup | [private, virtual]
TBuggyPopup() | TBuggyPopup | [private]
WriteFields(CStream_AC *aStream) const | TBuggyPopup | [private, virtual]
~TBuggyPopup() | TBuggyPopup | [private, virtual]

Generated on Sat Aug 7 22:56:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMfFileDialog Member List

This is the complete list of members for CMfFileDialog, including all inherited members.

CMfFileDialog(MultiFiles &mf, LPCTSTR lpszDefExt=NULL, LPCTSTR lpszFileName=NULL, DWORD dwFlags=OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter=NULL, CWnd *pParentWnd=NULL) | CMfFileDialog |
DoModal() | CMfFileDialog | [virtual]
GetNextPathName(POSITION &pos) const | CMfFileDialog | [private]
GetStartPosition() const | CMfFileDialog | [private]
m_filesBuffer | CMfFileDialog | [private]
m_folderBuffer | CMfFileDialog | [private]
m_mf | CMfFileDialog | [private]
OnFileNameChange() | CMfFileDialog | [private, virtual]

Generated on Sat Aug 7 22:55:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPOINT Member List

This is the complete list of members for UPOINT, including all inherited members.

x | UPOINT
y | UPOINT

Generated on Sat Aug 7 22:55:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoDateColumn Member List

This is the complete list of members for KoDateColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoDateColumn | [inline, virtual]
GetColumnIndex() const | KoDateColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoDateColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoDateColumn | [inline, virtual]
IsDefaultAscending() const | KiColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoUpdateHandler Member List

This is the complete list of members for KoUpdateHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoUpdateHandler() | KoUpdateHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoUpdateHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoUpdateHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCustInvertTable Member List

This is the complete list of members for CCustInvertTable, including all inherited members.

CCustInvertTable() | CCustInvertTable |
Initialize() | CCustInvertTable |
m_garbage | CCustInvertTable | [protected]
~CCustInvertTable() | CCustInvertTable | [virtual]

Generated on Sat Aug 7 22:50:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CustInvertTable Member List

This is the complete list of members for CustInvertTable, including all inherited members.

cmd | CustInvertTable
key | CustInvertTable
title | CustInvertTable

Generated on Sat Aug 7 22:57:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMenuBar.h Source File

WinCvs/CJLib/Include/CJMenuBar.h

Go to the documentation of this file.
00001 // CJMenuBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the code written by Paul DiLascia for MSJ.
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:51 $
00011  * $Revision: 1.1.1.3 $
00012  * $Archive: /CodeJockey/Include/CJMenuBar.h $
00013  *
00014  * $History: CJMenuBar.h $
00015  *
00016  * *****************  Version 5  *****************
00017  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00018  * Updated in $/CodeJockey/Include
00019  * Updated copyright and contact information.
00020  *
00021  * *****************  Version 4  *****************
00022  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00023  * Updated in $/CodeJockey/Include
00024  *
00025  * *****************  Version 3  *****************
00026  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00027  * Updated in $/CodeJockey/Include
00028  *
00029  * *****************  Version 2  *****************
00030  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00031  * Updated in $/CodeJockey/Include
00032  * Cleaned up inline functions, and import/export macro so that class will
00033  * be imported when linked to, and exported at compile time.
00034  *
00035  * *****************  Version 1  *****************
00036  * User: Kirk Stowell Date: 7/15/99    Time: 12:34a
00037  * Created in $/CodeJockey/Include
00038  * Initial creation. Extended the original class written by Paul DiLascia
00039  * for MSJ. Class uses CCJMenu and fixes some bugs with the original
00040  * class.
00041  *
00042  ***************************************************************************/
00044
00045 #ifndef __CJMENUBAR_H__
00046 #define __CJMENUBAR_H__
00047
00048 #if _MSC_VER > 1000
00049 #pragma once
00050 #endif // _MSC_VER > 1000
00051
00052 #include "CJToolBar.h"
00053 #include "CJMenu.h"        // CCJMenu class declaration
00054 #include "Subclass.h"
00055
00057 // CCJMenuBar uses this private class to intercept messages on behalf
00058 // of its owning frame, as well as the MDI client window. Conceptually,
00059 // these should be two different hooks, but I want to save code.
00060 //
00061 class _CJX_EXT_CLASS CCJMenuBarFrameHook : public CSubclassWnd {
00062 protected:
00063    friend class CCJMenuBar;
00064    CCJMenuBar* m_pMenuBar;
00065    CCJMenuBarFrameHook();
00066    ~CCJMenuBarFrameHook();
00067    BOOL Install(CCJMenuBar* pMenuBar, HWND hWndToHook);
00068    virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp);
00069 };
00070
00071 typedef enum TRACKINGSTATE { // menubar has three states:
00072     TRACK_NONE = 0,   // * normal, not tracking anything
00073     TRACK_BUTTON,     // * tracking buttons (F10/Alt mode)
00074     TRACK_POPUP       // * tracking popups
00075 };
00076
00078 // CCJMenuBar implements an Office 97-style menu bar. Use it the way you would
00079 // a CToolBar, only you need not call LoadToolbar. All you have to do is
00080 //
00081 // * Create the CCJMenuBar from your OnCreate or OnCreateBands handler.
00082 //
00083 // * Call LoadMenu to load a menu. This will set your frame's menu to NULL.
00084 //
00085 // * Implemenent your frame's PreTranslateMessage function, to call
00086 //   CCJMenuBar::TranslateFrameMessage.
00087 //
00088 class _CJX_EXT_CLASS CCJMenuBar : public CCJToolBar
00089 {
00090     DECLARE_DYNAMIC(CCJMenuBar)
00091 // Construction
00092 public:
00093     CCJMenuBar();
00094     virtual ~CCJMenuBar();
00095
00096     virtual BOOL Create(CWnd* pParentWnd,
00097         DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP,
00098         UINT nID = AFX_IDW_TOOLBAR);
00099
00100     virtual BOOL CreateEx(CWnd* pParentWnd, DWORD dwCtrlStyle = TBSTYLE_FLAT,
00101         DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP,
00102         CRect rcBorders = CRect(0, 0, 0, 0),
00103         UINT nID = AFX_IDW_TOOLBAR);
00104
00105 // Attributes
00106 public:
00107
00108     BOOL                m_bAutoRemoveFrameMenu; // set frame's menu to NULL
00109
00110 protected:
00111
00112     friend class CCJMenuBarFrameHook;
00113
00114     CCJMenuBarFrameHook m_frameHook;            // hooks frame window messages
00115     CStringArray        m_arStrings;            // array of menu item names
00116     int                 m_nMenuID;              // menu resource id.
00117     CCJMenu             m_popupMenu;            // the menu.
00118
00119     // menu tracking stuff:
00120     int                 m_iPopupTracking;       // which popup I'm tracking if any
00121     int                 m_iNewPopup;            // next menu to track
00122     BOOL                m_bProcessRightArrow;   // process l/r arrow keys?
00123     BOOL                m_bProcessLeftArrow;    // ...
00124     BOOL                m_bEscapeWasPressed;    // user pressed escape to exit menu
00125     CPoint              m_ptMouse;              // mouse location when tracking popup
00126     HMENU               m_hMenuTracking;        // current popup I'm tracking
00127     CFont               m_Font;                 // menu font.
00128
00129     TRACKINGSTATE       m_iTrackingState;       // current tracking state
00130
00131 // Operations
00132 public:
00133
00134     BOOL LoadMenu(UINT nID);
00135     CCJMenu* GetMenu(); // get current menu
00136     TRACKINGSTATE GetTrackingState(int& iPopup);
00137     static BOOL bTRACE;                      // set TRUE to see TRACE msgs
00138
00139 protected:
00140
00141     // helpers
00142     void RecomputeToolbarSize();
00143     void RecomputeMenuLayout();
00144     void UpdateFont();
00145     int GetNextOrPrevButton(int iButton, BOOL bPrev);
00146     void SetTrackingState(TRACKINGSTATE iState, int iButton=-1);
00147     void TrackPopup(int iButton);
00148     void ToggleTrackButtonMode();
00149     void CancelMenuAndTrackNewOne(int iButton);
00150     void OnMenuSelect(HMENU hmenu, UINT nItemID);
00151     CPoint ComputeMenuTrackPoint(const CRect& rcButn, TPMPARAMS& tpm);
00152     BOOL IsValidButton(int iButton) const;
00153     int HitTest(CPoint p) const;
00154
00155 #ifdef _DEBUG
00156     virtual void AssertValid() const;
00157     virtual void Dump(CDumpContext& dc) const;
00158 #endif
00159
00160 public:
00161 // Overrides
00162     // ClassWizard generated virtual function overrides
00163     //{{AFX_VIRTUAL(CCJMenuBar)
00164     public:
00165     virtual BOOL TranslateFrameMessage(MSG* pMsg);
00166     protected:
00167     virtual BOOL OnMenuInput(MSG& m);    // handle popup menu input
00168     virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle);
00169     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
00170     //}}AFX_VIRTUAL
00171
00172 // Implementation
00173 public:
00174
00175     // Generated message map functions
00176 protected:
00177     //{{AFX_MSG(CCJMenuBar)
00178     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00179     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00180     afx_msg void OnSize(UINT nType, int cx, int cy);
00181     afx_msg void OnUpdateMenuButton(CCmdUI* pCmdUI);
00182     //}}AFX_MSG
00183     DECLARE_MESSAGE_MAP()
00184
00185     static LRESULT CALLBACK MenuInputFilter(int code, WPARAM wp, LPARAM lp);
00186 };
00187
00189 //  Inline Functions
00191
00192 _CJXLIB_INLINE BOOL CCJMenuBar::IsValidButton(int iButton) const
00193     { return 0 <= iButton && iButton < GetButtonCount(); }
00194
00195 _CJXLIB_INLINE CCJMenu* CCJMenuBar::GetMenu()
00196     { return &m_popupMenu; }
00197
00198 _CJXLIB_INLINE TRACKINGSTATE CCJMenuBar::GetTrackingState(int& iPopup)
00199     { iPopup = m_iPopupTracking; return m_iTrackingState; }
00200
00201 //{{AFX_INSERT_LOCATION}}
00202 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00203
00204 #endif // __CJMENUBAR_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_garbage.c Source File

common/dll_garbage.c

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * dll_garbage.c --- memory garbage collection for the dll
00023  */
00024
00025 #ifdef HAVE_CONFIG_H
00026 #include "config.h"
00027 #endif /* HAVE_CONFIG_H */
00028
00029 #include <stdio.h>
00030
00031 #ifdef HAVE_STRING_H
00032 #   include <string.h>
00033 #endif /* HAVE_STRING_H */
00034
00035 #include "dll_garbage.h"
00036
00037 #undef malloc
00038 #undef free
00039 #undef calloc
00040 #undef realloc
00041
00042 #if qMFC || qCvsDebug
00043     /* to intercept static C++ allocations */
00044 #   define AUTO_INITALIZE 1
00045 #else /* !macintosh */
00046 #   define AUTO_INITALIZE 0
00047 #endif /* !macintosh */
00048
00049 #if qCvsDebug && defined(macintosh)
00050 #   define qRangeCheck 0
00051 #else /* !qCvsDebug */
00052 #   define qRangeCheck 0
00053 #endif /* !qCvsDebug */
00054
00055 #if qRangeCheck && defined(macintosh)
00056 #include <MacMemory.h>
00057 static void *   platform_calloc(size_t nmemb, size_t size)
00058 {
00059     size_t tot = nmemb * size;
00060     void *res = NewPtr(tot);
00061     if(res != 0L)
00062         memset(res, 0, tot);
00063     return res;
00064 }
00065
00066 static void *   platform_malloc(size_t size)
00067 {
00068     return NewPtr(size);
00069 }
00070
00071 static void *   platform_realloc(void * ptr, size_t size)
00072 {
00073     void *newptr = NewPtr(size);
00074     if(newptr != 0L && ptr != 0L)
00075     {
00076         Size oldS = GetPtrSize((Ptr)ptr);
00077         if(oldS != 0)
00078         {
00079             size_t copySize = size < oldS ? size : oldS;
00080             memcpy(newptr, ptr, copySize);
00081         }
00082         DisposePtr((Ptr)ptr);
00083     }
00084     return newptr;
00085 }
00086
00087 static void platform_free(void *ptr)
00088 {
00089     if(ptr != 0L)
00090         DisposePtr((Ptr)ptr);
00091 }
00092 #else
00093 #   define platform_calloc(s1, s2) calloc(s1, s2)
00094 #   define platform_malloc(s) malloc(s)
00095 #   define platform_realloc(p, s) realloc(p, s)
00096 #   define platform_free(p) free(p)
00097 #endif
00098
00099 #if qRangeCheck
00100 #   include <assert.h>
00101 #   ifdef macintosh
00102 #       define ASSERT_RANGE(cond) do {if(!(cond)) DebugStr("\pRange check failed !");} while(0)
00103 #   else /* !macintosh */
00104 #       define ASSERT_RANGE(cond) assert(cond)
00105 #   endif /* !macintosh */
00106     static void garbyRangeCheck(void);
00107
00108 #   define RANGE_MAGIC_SIZE (3 * sizeof(size_t))
00109 #   define RANGE_TO_PTR(ptr) ((void *)(((size_t *)(ptr))+2))
00110 #   define PTR_TO_RANGE(ptr) ((void *)(((size_t *)(ptr))-2))
00111 #   define SIZE_FROM_PTR(ptr) (((size_t *)(ptr))[-2])
00112 #   define MAGIC1_FROM_PTR(ptr) ((void *)&(((size_t *)(ptr))[-1]))
00113 #   define MAGIC2_FROM_PTR(ptr) ((void *)&(((char *)(ptr))[SIZE_FROM_PTR(ptr)]))
00114 #   define RANGE_MAGIC ((char)0xFC)
00115     static void FILL_MAGIC(void *ptr)
00116     {
00117         char *tmp = (char *)ptr;
00118         *tmp++ = RANGE_MAGIC;
00119         *tmp++ = RANGE_MAGIC;
00120         *tmp++ = RANGE_MAGIC;
00121         *tmp = RANGE_MAGIC;
00122     }
00123
00124     static void CHECK_MAGIC(void *ptr)
00125     {
00126         char *tmp = (char *)ptr;
00127         ASSERT_RANGE(*tmp++ == RANGE_MAGIC);
00128         ASSERT_RANGE(*tmp++ == RANGE_MAGIC);
00129         ASSERT_RANGE(*tmp++ == RANGE_MAGIC);
00130         ASSERT_RANGE(*tmp == RANGE_MAGIC);
00131     }
00132
00133     static void *malloc_check(size_t size)
00134     {
00135         void *result, *range;
00136
00137         garbyRangeCheck();
00138
00139         if(size == 0)
00140             return 0L;
00141
00142         range = platform_malloc(size + RANGE_MAGIC_SIZE);
00143         if(range == 0L)
00144             return 0L;
00145
00146         result = RANGE_TO_PTR(range);
00147         SIZE_FROM_PTR(result) = size;
00148         FILL_MAGIC(MAGIC1_FROM_PTR(result));
00149         FILL_MAGIC(MAGIC2_FROM_PTR(result));
00150
00151         return result;
00152     }
00153
00154     static void *calloc_check(size_t nmemb, size_t size)
00155     {
00156         void *result;
00157         size_t totsize = nmemb * size;
00158
00159         garbyRangeCheck();
00160
00161         if(totsize == 0)
00162             return 0L;
00163
00164         result = malloc_check(totsize);
00165         if(result == 0L)
00166             return 0L;
00167
00168         memset(result, 0, totsize);
00169         return result;
00170     }
00171
00172     static void free_check(void *ptr)
00173     {
00174         void *range;
00175
00176         garbyRangeCheck();
00177
00178         if(ptr == 0L)
00179             return;
00180
00181         ASSERT_RANGE(SIZE_FROM_PTR(ptr) > 0);
00182         CHECK_MAGIC(MAGIC1_FROM_PTR(ptr));
00183         CHECK_MAGIC(MAGIC2_FROM_PTR(ptr));
00184
00185         range = PTR_TO_RANGE(ptr);
00186         memset(range, 0xFC, SIZE_FROM_PTR(ptr) + RANGE_MAGIC_SIZE);
00187         platform_free(range);
00188     }
00189
00190     static void *realloc_check(void *ptr, size_t size)
00191     {
00192         void *result, *range;
00193
00194         garbyRangeCheck();
00195
00196         if(ptr == 0L)
00197             return malloc_check(size);
00198         if(size == 0)
00199         {
00200             free_check(ptr);
00201             return 0L;
00202         }
00203
00204         ASSERT_RANGE(SIZE_FROM_PTR(ptr) > 0);
00205         CHECK_MAGIC(MAGIC1_FROM_PTR(ptr));
00206         CHECK_MAGIC(MAGIC2_FROM_PTR(ptr));
00207
00208         range = PTR_TO_RANGE(ptr);
00209         range = platform_realloc(range, size + RANGE_MAGIC_SIZE);
00210         if(range == 0L)
00211             return 0L;
00212
00213         result = RANGE_TO_PTR(range);
00214         SIZE_FROM_PTR(result) = size;
00215         FILL_MAGIC(MAGIC1_FROM_PTR(result));
00216         FILL_MAGIC(MAGIC2_FROM_PTR(result));
00217
00218         return result;
00219     }
00220 #   define platform_malloc malloc_check
00221 #   define platform_free free_check
00222 #   define platform_calloc calloc_check
00223 #   define platform_realloc realloc_check
00224 #endif /* qRangeCheck */
00225
00226 #if qRangeCheck && defined(macintosh)
00227 #ifdef __cplusplus
00228 extern "C"
00229 #endif
00230 void *  calloc(size_t nmemb, size_t   s)
00231 {
00232     return shl_calloc(nmemb, s, 0, 0L);
00233 }
00234
00235 #ifdef __cplusplus
00236 extern "C"
00237 #endif
00238 void    free(void *  p)
00239 {
00240     shl_free(p);
00241 }
00242
00243 #ifdef __cplusplus
00244 extern "C"
00245 #endif
00246 void *  malloc(size_t   s)
00247 {
00248     return shl_malloc(s, 0, 0L);
00249 }
00250
00251 #ifdef __cplusplus
00252 extern "C"
00253 #endif
00254 void *  realloc(void *   p, size_t   s)
00255 {
00256     return shl_realloc(p, s, 0, 0L);
00257 }
00258
00259 #endif
00260
00261 #define GARBY_DEF_ALLOC 20
00262 #define GARBY_DEF_POOL 20
00263 #define MODULE_SIZE 8
00264
00265 typedef struct _frameRec
00266 {
00267     void *entry;
00268 #if qCvsDebug
00269     char module[MODULE_SIZE];
00270     short line;
00271 #endif
00272     struct _frameRec *next;
00273 } frameRec;
00274
00275 typedef struct DYN_LIST
00276 {
00277     int numentries;
00278     int defaultnumcells;
00279     int sizeofcell;
00280     int totpage;
00281
00282     void *first;
00283     struct DYN_LIST *next;
00284     struct DYN_LIST *current;
00285 #ifdef hpux /* align 8 bytes for hpux */
00286     void *nothing;
00287 #endif /* hpux */
00288 } DYN_LIST;
00289
00290 typedef struct
00291 {
00292     frameRec *firstentry;
00293     frameRec *firstfree;
00294     DYN_LIST *pool;
00295 } poolRec, *poolPtr;
00296
00297 typedef struct
00298 {
00299     poolRec pools[GARBY_DEF_POOL];
00300 } garbyRec, *garbyPtr;
00301
00302 static garbyPtr gGarbage = NULL;
00303
00304 static DYN_LIST *
00305 listNew(int sizeOfCell, int numOfDefaultCell)
00306 {
00307     DYN_LIST *result;
00308
00309     result = (DYN_LIST *)platform_malloc(sizeof(DYN_LIST) + sizeOfCell * numOfDefaultCell);
00310     if(result == NULL)
00311     {
00312         fprintf(stderr, "failed to allocate %d bytes\n", sizeof(DYN_LIST) + sizeOfCell * numOfDefaultCell);
00313         exit(-1);
00314     }
00315
00316     result->numentries = result->totpage = 0;
00317     result->defaultnumcells = numOfDefaultCell;
00318     result->sizeofcell = sizeOfCell;
00319     result->next = NULL;
00320     result->current = result;
00321
00322     return result;
00323 }
00324
00325 static void
00326 listFree(DYN_LIST *list)
00327 {
00328     DYN_LIST *ptc1, *ptc2;
00329
00330     ptc1 = list;
00331     while(ptc1 != NULL)
00332     {
00333         ptc2 = ptc1;
00334         ptc1 = ptc1->next;
00335         platform_free(ptc2);
00336     }
00337 }
00338
00339 static void *
00340 listAddCell(DYN_LIST *list)
00341 {
00342     DYN_LIST *current;
00343
00344     current = list->current;
00345
00346     if(current->numentries == list->defaultnumcells)
00347     {
00348         current->next = (DYN_LIST *)platform_malloc(sizeof(DYN_LIST) + list->sizeofcell * list->defaultnumcells);
00349         if(current->next == NULL)
00350         {
00351             fprintf(stderr, "failed to allocate %d bytes\n", sizeof(DYN_LIST) + list->sizeofcell * list->defaultnumcells);
00352             exit(-1);
00353         }
00354
00355         current = current->next;
00356         current->numentries = 0;
00357         current->next = NULL;
00358         list->current = current;
00359         list->totpage++;
00360     }
00361
00362     return (char *)(current + 1) + current->numentries++ * list->sizeofcell;
00363 }
00364
00365 static int
00366 GARBY_KEY(void *address)
00367 {
00368     register unsigned long add = (unsigned long)address;
00369
00370     return (add >> 8) % GARBY_DEF_POOL;
00371 }
00372
00373 void
00374 garbyNew(void)
00375 {
00376     int i;
00377
00378 #if AUTO_INITALIZE
00379     if(gGarbage != 0L)
00380         return;
00381 #endif /* AUTO_INITALIZE */
00382
00383     gGarbage = (garbyPtr) platform_malloc(sizeof(garbyRec));
00384     if(gGarbage == NULL)
00385     {
00386         fprintf(stderr, "failed to allocate %d bytes\n", sizeof(garbyRec));
00387         exit(-1);
00388     }
00389
00390 #if qRangeCheck
00391     for(i = 0; i < GARBY_DEF_POOL; i++)
00392     {
00393         gGarbage->pools[i].firstentry = NULL;
00394         gGarbage->pools[i].firstfree = NULL;
00395         gGarbage->pools[i].pool = 0L;
00396     }
00397 #endif /* qRangeCheck */
00398     for(i = 0; i < GARBY_DEF_POOL; i++)
00399     {
00400         gGarbage->pools[i].firstentry = NULL;
00401         gGarbage->pools[i].firstfree = NULL;
00402         gGarbage->pools[i].pool = listNew(sizeof(frameRec), GARBY_DEF_ALLOC);
00403     }
00404 }
00405
00406 static void
00407 poolRemove(poolPtr collector, int reallyRemove, int verboseMemoryLeak, int *numLeaks)
00408 {
00409     frameRec *frame = collector->firstentry;
00410
00411 #if qRangeCheck
00412     DYN_LIST *pool;
00413     if(reallyRemove)
00414     {
00415         collector->firstentry = 0L;
00416         collector->firstfree = 0L;
00417     }
00418 #endif /* qRangeCheck */
00419
00420     while(frame != NULL)
00421     {
00422 #if qCvsDebug
00423         if(verboseMemoryLeak)
00424             fprintf(stderr, "MEMORY LEAK!: %s line:%d\n", frame->module, frame->line);
00425 #endif
00426         if(reallyRemove)
00427             platform_free(frame->entry);
00428         frame = frame->next;
00429         (*numLeaks)++;
00430     }
00431     if(reallyRemove)
00432     {
00433 #if qRangeCheck
00434         pool = collector->pool;
00435         collector->pool = 0L;
00436         listFree(pool);
00437 #else /* !qRangeCheck */
00438         listFree(collector->pool);
00439 #endif /* !qRangeCheck */
00440     }
00441 }
00442
00443 void
00444 garbyRemove(int verboseSummary, int verboseMemoryLeak)
00445 {
00446     int i;
00447     int numLeaks = 0;
00448     int reallyRemove = !verboseSummary;
00449
00450     if(gGarbage == NULL)
00451         return;
00452
00453     for(i = 0; i < GARBY_DEF_POOL; i++)
00454         poolRemove(&gGarbage->pools[i], reallyRemove, verboseMemoryLeak, &numLeaks);
00455
00456     if(reallyRemove)
00457     {
00458         platform_free(gGarbage);
00459         gGarbage = NULL;
00460     }
00461
00462 #if qCvsDebug
00463     if(verboseSummary)
00464         fprintf(stderr, "\nGarbage collection : purged %d allocations\n", numLeaks);
00465 #endif
00466 }
00467
00468 #if qRangeCheck
00469 static void
00470 garbyRangeCheck(void)
00471 {
00472     poolPtr collector;
00473     frameRec *frame;
00474     DYN_LIST *pool;
00475     int i;
00476
00477     if(gGarbage == 0L)
00478         return;
00479
00480     for(i = 0; i < GARBY_DEF_POOL; i++)
00481     {
00482         collector = &gGarbage->pools[i];
00483         pool = collector->pool;
00484         while(pool != 0L)
00485         {
00486             ASSERT_RANGE(SIZE_FROM_PTR(pool) > 0);
00487             CHECK_MAGIC(MAGIC1_FROM_PTR(pool));
00488             CHECK_MAGIC(MAGIC2_FROM_PTR(pool));
00489             pool = pool->next;
00490         }
00491
00492         frame = collector->firstentry;
00493
00494         while(frame != NULL)
00495         {
00496             ASSERT_RANGE(SIZE_FROM_PTR(frame->entry) > 0);
00497             CHECK_MAGIC(MAGIC1_FROM_PTR(frame->entry));
00498             CHECK_MAGIC(MAGIC2_FROM_PTR(frame->entry));
00499             frame = frame->next;
00500         }
00501     }
00502 }
00503 #endif /* qRangeCheck */
00504
00505 static void
00506 setModule(char *where, const char *what)
00507 {
00508     int len, cp;
00509
00510     if(what == 0L)
00511     {
00512         strcpy(where, "Unknown");
00513         return;
00514     }
00515
00516     cp = len = strlen(what);
00517     if(len > (MODULE_SIZE - 1))
00518         cp = MODULE_SIZE - 1;
00519
00520     memcpy(where, what + len - cp, cp * sizeof(char));
00521     where[cp] = '\0';
00522 }
00523
00524 #if qCvsDebug
00525 static void * poolAlloc(poolPtr pool, void *ptr, int line, const char *file)
00526 #else
00527 static void * poolAlloc(poolPtr pool, void *ptr)
00528 #endif
00529 {
00530     frameRec *newframe;
00531
00532     if(pool->firstfree != NULL)
00533     {
00534         /*
00535          * there is place already free inside collector
00536          */
00537         newframe = pool->firstfree;
00538         pool->firstfree = newframe->next;
00539     }
00540     else
00541     {
00542         /*
00543          * create a new entry into the pool
00544          */
00545         newframe = (frameRec *)listAddCell(pool->pool);
00546     }
00547
00548     newframe->entry = ptr;
00549     newframe->next = pool->firstentry;
00550     pool->firstentry = newframe;
00551
00552 #if qCvsDebug
00553     setModule(newframe->module, file);
00554     newframe->line = line;
00555 #endif
00556
00557     return ptr;
00558 }
00559
00560 static void * poolFree(register poolPtr garb, void *ptr)
00561 {
00562     frameRec *frame, *prev;
00563
00564     /*
00565      * if failed, collector is corrupted
00566      */
00567     frame = garb->firstentry;
00568     if(frame == NULL)
00569     {
00570 #ifdef macintosh
00571         /* only  on mac cause we are sure to intercept every allocations */
00572         fprintf(stderr, "panic ! memory collector is corrupted !\n");
00573         return NULL;
00574 #else /* !macintosh */
00575         return ptr;
00576 #endif /* !macintosh */
00577     }
00578
00579     /*
00580      * - we mark the entry to be free
00581      */
00582     if(frame->entry == ptr)
00583     {
00584         frame = garb->firstentry;
00585         garb->firstentry = frame->next;
00586     }
00587     else
00588     {
00589         prev = NULL;
00590         while(frame->entry != ptr)
00591         {
00592             prev = frame;
00593             frame = frame->next;
00594             /*
00595              * if failed, collector is corrupted
00596              */
00597             if(frame == NULL)
00598             {
00599 #ifdef macintosh
00600                 /* only  on mac cause we are sure to intercept every allocations */
00601                 fprintf(stderr, "panic ! memory collector is corrupted !\n");
00602                 return NULL;
00603 #else /* !macintosh */
00604                 return ptr;
00605 #endif /* !macintosh */
00606             }
00607         }
00608         prev->next = frame->next;
00609     }
00610
00611     /*
00612      * insert frame into free list
00613      */
00614     frame->next = garb->firstfree;
00615     garb->firstfree = frame;
00616
00617     return ptr;
00618 }
00619
00620 static void *garby_free(void *ptr);
00621 #define garbyFree(ptr) garby_free(ptr)
00622
00623 #if qCvsDebug
00624     static void *garby_alloc(void *ptr, int line, const char *file);
00625     static void *garby_realloc(void *ptr, void *newptr, int line, const char *file);
00626
00627 #   define garbyAlloc(ptr, line, file) garby_alloc(ptr, line, file)
00628 #   define garbyRealloc(ptr, NewPtr, line, file) garby_realloc(ptr, NewPtr, line, file)
00629 #else
00630     static void *garby_alloc(void *ptr);
00631     static void *garby_realloc(void *ptr, void *newptr);
00632
00633 #   define garbyAlloc(ptr, line, file) garby_alloc(ptr)
00634 #   define garbyRealloc(ptr, NewPtr, line, file) garby_realloc(ptr, NewPtr)
00635 #endif
00636
00637 #if qCvsDebug
00638 static void *garby_alloc(void *ptr, int line, const char *file)
00639 #else
00640 static void *garby_alloc(void *ptr)
00641 #endif
00642 {
00643 #if AUTO_INITALIZE
00644     if(gGarbage == 0L)
00645         garbyNew();
00646 #endif /* AUTO_INITALIZE */
00647
00648     if(gGarbage == NULL || ptr == NULL)
00649         return ptr;
00650
00651 #if qCvsDebug
00652     return poolAlloc(&gGarbage->pools[GARBY_KEY(ptr)], ptr, line, file);
00653 #else
00654     return poolAlloc(&gGarbage->pools[GARBY_KEY(ptr)], ptr);
00655 #endif
00656 }
00657
00658 static void *garby_free(void *ptr)
00659 {
00660     if(gGarbage == NULL || ptr == NULL)
00661         return ptr;
00662
00663     return poolFree(&gGarbage->pools[GARBY_KEY(ptr)], ptr);
00664 }
00665
00666 #if qCvsDebug
00667 static void *garby_realloc(void *ptr, void *newptr, int line, const char *file)
00668 #else
00669 static void *garby_realloc(void *ptr, void *newptr)
00670 #endif
00671 {
00672 #if AUTO_INITALIZE
00673     if(gGarbage == 0L)
00674         garbyNew();
00675 #endif /* AUTO_INITALIZE */
00676
00677     garby_free(ptr);
00678 #if qCvsDebug
00679     return garby_alloc(newptr, line, file);
00680 #else
00681     return garby_alloc(newptr);
00682 #endif
00683 }
00684
00685 #if qCvsDebug
00686 void *  shl_malloc(size_t size, int line, const char *file)
00687 #else
00688 void *  shl_malloc(size_t size)
00689 #endif
00690 {
00691     char *ptr;
00692
00693     if (size == 0)
00694         return NULL;
00695
00696     ptr = (char *)platform_malloc(size);
00697     return garbyAlloc(ptr, line, file);
00698 }
00699
00700 #if qCvsDebug
00701 void *  shl_calloc(size_t nmemb, size_t size, int line, const char *file)
00702 #else
00703 void *  shl_calloc(size_t nmemb, size_t size)
00704 #endif
00705 {
00706     char *ptr;
00707
00708     if (nmemb == 0 || size == 0)
00709         return NULL;
00710
00711     ptr = (char *)platform_calloc(nmemb, size);
00712     return garbyAlloc(ptr, line, file);
00713 }
00714
00715 #if qCvsDebug
00716 void *  shl_realloc(void * ptr, size_t size, int line, const char *file)
00717 #else
00718 void *  shl_realloc(void * ptr, size_t size)
00719 #endif
00720 {
00721     char *Newptr;
00722
00723     if (ptr == NULL)
00724     {
00725         Newptr = (char *)platform_malloc(size);
00726         return garbyAlloc(Newptr, line, file);
00727     }
00728
00729     if (size == 0)
00730     {
00731         platform_free(garbyFree(ptr));
00732         return NULL;
00733     }
00734
00735     Newptr = (char *)platform_realloc(ptr, size);
00736     if(Newptr == ptr)
00737         return ptr;
00738
00739     return garbyRealloc(ptr, Newptr, line, file);
00740 }
00741
00742 void    shl_free(void *ptr)
00743 {
00744     if (ptr != NULL)
00745         platform_free (garbyFree(ptr));
00746 }
00747
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMacBinItem Member List

This is the complete list of members for CMacBinItem, including all inherited members.

CMacBinItem(const MACBINMAP &map) | CMacBinItem |
CMacBinItem() | CMacBinItem | [private]
CMacBinItem(const CMacBinItem &inOriginal) | CMacBinItem | [private]
DoubleClick(const STableCell &inCell, const SMouseDownEvent &inMouseDown, const SOutlineDrawContents &inDrawContents, Boolean inHitText) | CMacBinItem | [protected, virtual]
DrawRowAdornments(const Rect &inLocalRowRect) | CMacBinItem | [protected, virtual]
EditCell(void) | CMacBinItem | [virtual]
fMap | CMacBinItem | [protected]
GetDrawContentsSelf(const STableCell &inCell, SOutlineDrawContents &ioDrawContents) | CMacBinItem | [protected, virtual]
operator=(const CMacBinItem &inOriginal) | CMacBinItem | [private]
RemoveCell(void) | CMacBinItem | [virtual]
~CMacBinItem() | CMacBinItem | [virtual]

Generated on Sat Aug 7 22:54:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacrosSetup.cpp Source File

common/MacrosSetup.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- August 1998
00019  */
00020
00021 /*
00022  * MacrosSetup.cpp --- hook the macros files
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifndef WIN32
00028 #   include <ctype.h>
00029 #endif /* !WIN32 */
00030
00031 #ifdef HAVE_STRING_H
00032 #   include <string.h>
00033 #endif
00034
00035 #ifdef HAVE_STRINGS_H
00036 #   include <strings.h>
00037 #endif
00038
00039 #ifdef HAVE_ERRNO_H
00040 #   include <errno.h>
00041 #endif
00042
00043 #include "MacrosSetup.h"
00044 #include "AppConsole.h"
00045 #include "FileTraversal.h"
00046 #include "CvsArgs.h"
00047 #include "CvsCommands.h"
00048
00049 #ifdef TARGET_OS_MAC
00050 #   include "MacMisc.h"
00051 #   include <errno.h>
00052 #endif
00053
00054 #ifdef qMacCvsPP
00055 #   include "MacCvsApp.h"
00056 #   include "getline.h"
00057 #endif /* qMacCvsPP */
00058
00059 #ifdef __CYGWIN32__
00060 #   include "getline.h"
00061 #endif
00062
00063 #include "getopt.h"
00064
00065 #ifdef WIN32
00066 #   include "wincvs.h"
00067 #   include "getline.h"
00068
00069 #   ifdef _DEBUG
00070 #   define new DEBUG_NEW
00071 #   undef THIS_FILE
00072     static char THIS_FILE[] = __FILE__;
00073 #   endif
00074 #endif /* WIN32 */
00075
00076 CMacroSet gMacrosAdmin;
00077 CMacroSet gMacrosSel;
00078
00079 static void getLoc(CStr & path, const char *subFolder)
00080 {
00081     path = "";
00082 #ifdef WIN32
00083     CWincvsApp* pApp = (CWincvsApp *)AfxGetApp();
00084     pApp->GetAppPath(path);
00085
00086     CString appPath = path;
00087     // first the macro folder may be ./macro
00088     CString test = appPath;
00089     test.TrimRight('\\');
00090     test += "\\";
00091     test += subFolder;
00092
00093     struct stat sb;
00094     if(stat(test, &sb) != -1 && S_ISDIR(sb.st_mode))
00095     {
00096         path = test;
00097         return;
00098     }
00099
00100     CStr uppath, file;
00101     while(SplitPath(appPath, uppath, file) && !uppath.empty())
00102     {
00103         test = uppath;
00104         test.TrimRight('\\');
00105         test += "\\";
00106         test += subFolder;
00107
00108         if(stat(test, &sb) != -1 && S_ISDIR(sb.st_mode))
00109         {
00110             path = test;
00111             return;
00112         }
00113         appPath = uppath;
00114     }
00115     path = test;
00116 #elif defined(qUnix)
00117     struct stat sb;
00118     path = PACKAGE_DATA_DIR;
00119     if(stat(path, &sb) == -1 || !S_ISDIR(sb.st_mode))
00120     {
00121         path = PACKAGE_SOURCE_DIR;
00122         CStr uppath, folder;
00123         SplitPath(path, uppath, folder);
00124         path = uppath;
00125         if(!path.endsWith(kPathDelimiter))
00126             path << kPathDelimiter;
00127         path << subFolder;
00128     }
00129 #elif qMacCvsPP
00130     UStr appPath = CMacCvsApp::GetAppPath();
00131     if(!appPath.endsWith(kPathDelimiter))
00132         appPath << kPathDelimiter;
00133     UStr test = appPath;
00134     test << subFolder;
00135
00136     struct stat sb;
00137     if(stat(test, &sb) != -1 && S_ISDIR(sb.st_mode))
00138     {
00139         path = test;
00140         return;
00141     }
00142
00143     UStr uppath, file;
00144     while(SplitPath(appPath, uppath, file) && !uppath.empty())
00145     {
00146         test = uppath;
00147         if(!test.endsWith(kPathDelimiter))
00148             test << kPathDelimiter;
00149         test << subFolder;
00150
00151         if(stat(test, &sb) != -1 && S_ISDIR(sb.st_mode))
00152         {
00153             path = test;
00154             return;
00155         }
00156         appPath = uppath;
00157     }
00158     path = test;
00159 #else
00160     if(!path.empty() && !path.endsWith(kPathDelimiter))
00161     {
00162         path << kPathDelimiter;
00163     }
00164     path << subFolder;
00165 #endif
00166 }
00167
00168 void MacrosGetLoc(CStr & path)
00169 {
00170     getLoc(path, MACROS_FOLDER);
00171 }
00172
00173 void PythonLibGetLoc(CStr & path)
00174 {
00175     getLoc(path, PYTHONLIB_FOLDER);
00176 }
00177
00178 static void MacrosFlushAll(void)
00179 {
00180     gMacrosAdmin.Flush();
00181     gMacrosSel.Flush();
00182 }
00183
00184 class MacroTraversal : public TraversalReport
00185 {
00186 public:
00187     virtual kTraversal OnError(const char *err, int errcode)
00188     {
00189         cvs_err(err);
00190         cvs_err("\n");
00191         return kTraversalError;
00192     }
00193
00194     virtual kTraversal OnFile(const char *fullpath,
00195         const char *fullname,
00196         const char *name,
00197         const struct stat & dir, const UFSSpec * macspec);
00198 };
00199
00200 kTraversal MacroTraversal::OnFile(const char *fullpath,
00201     const char *fullname,
00202     const char *name,
00203     const struct stat & dir, const UFSSpec * macspec)
00204 {
00205     if(stricmp(name + strlen(name) - 4, ".tcl"))
00206         return kContinueTraversal;
00207
00208     FILE *fpin = fopen(fullname, "r");
00209     if(fpin == 0L)
00210     {
00211         cvs_err("Impossible to open '%s' (error %d)\n", fullname, errno);
00212         return kContinueTraversal;
00213     }
00214
00215     char *oldline = 0L;
00216     int line_length;
00217     size_t line_chars_allocated = 0;
00218     CvsArgs args(false);
00219     args.add("dummy");
00220
00221     if((line_length = getline (&oldline, &line_chars_allocated, fpin)) > 0 &&
00222         strnicmp(oldline, "#!CVSGUI1.0", strlen("#!CVSGUI1.0")) == 0)
00223     {
00224         char *line = oldline + strlen("#!CVSGUI1.0");
00225
00226         while(*line)
00227         {
00228             int hasQuote = 0;
00229             char *temp;
00230
00231             // Search for the non space char
00232             while(*line && isspace(*line))
00233                 ++line;
00234
00235             // handle the quote
00236             if((*line) == '"')
00237             {
00238                 hasQuote = 1;
00239                 line++;
00240             }
00241             for(temp=line;*line;++line)
00242             {
00243                 if((*line) == '"')
00244                 {
00245                     if(hasQuote)
00246                     {
00247                         hasQuote = 0; /* ok doc */
00248                         break;
00249                     }
00250                 }
00251                 if(isspace(*line) && !hasQuote)
00252                     break;
00253             }
00254             if(hasQuote) /* mismatch quote */
00255                 temp = line;
00256
00257             if(temp != line)
00258             {
00259                 CStr arg;
00260                 arg.set(temp, line - temp);
00261                 args.add(arg);
00262             }
00263         }
00264
00265         static struct option long_options[] =
00266         {
00267             {"admin", no_argument, 0L, 1},
00268             {"selection", no_argument, 0L, 2},
00269             {"name", required_argument, 0L, 3},
00270             {0, 0, 0, 0}
00271         };
00272         bool hasAdmin = false;
00273         bool hasSel = false;
00274         CStr dispname;
00275
00276         optind = 0;
00277         int option_index = 0, c;
00278         while ((c = getopt_long
00279             (args.Argc(), args.Argv(), "+", long_options, &option_index)) != EOF)
00280         {
00281             switch (c)
00282             {
00283             case 1:
00284                 hasAdmin = true;
00285                 break;
00286             case 2:
00287                 hasSel = true;
00288                 break;
00289             case 3:
00290                 dispname = optarg;
00291                 break;
00292             default:
00293                 cvs_err("Warning : unknown option in the file '%s'\n", fullname);
00294                 break;
00295             }
00296         }
00297
00298         if(dispname.empty())
00299         {
00300             dispname = name;
00301         }
00302
00303         if(hasAdmin)
00304         {
00305             gMacrosAdmin.Add(fullname, dispname);
00306         }
00307         else if(hasSel)
00308         {
00309             gMacrosSel.Add(fullname, dispname);
00310         }
00311         else
00312         {
00313             cvs_err("Warning : no option <admin|selection> in the file '%s'\n", fullname);
00314         }
00315     }
00316
00317     free (oldline);
00318
00319     fclose(fpin);
00320
00321     return kContinueTraversal;
00322 }
00323
00324 void MacrosReloadAll(void)
00325 {
00326     MacrosFlushAll();
00327
00328     // get the macro folder
00329     CStr path;
00330     MacrosGetLoc(path);
00331
00332     // traverse the macro folder
00333     MacroTraversal traverse;
00334     FileTraverse(path, traverse);
00335 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/Win32wstring.hpp Source File

WinCvs/Win32wstring.hpp

Go to the documentation of this file.
00001 // RCS: @(#) $Id: Win32wstring.hpp,v 1.1 2001/01/13 14:42:51 davygrvy Exp $
00002
00003 #include <string>
00004 #include <windows.h>
00005
00006
00007 // Wide (unicode) strings, windows style.
00008 class Win32wstring : public std::wstring
00009 {
00010 public:
00011     Win32wstring(unsigned int codepage, std::string *s)
00012     {
00013         convert(codepage, s->c_str(), s->length());
00014     }
00015
00016     Win32wstring(unsigned int codepage, std::string &s)
00017     {
00018         convert(codepage, s.c_str(), s.length());
00019     }
00020
00021 private:
00022     void convert(unsigned int codepage, const char *s, int inLen)
00023     {
00024         register int outLen;
00025         register wchar_t *buff = NULL;
00026
00027         // I read this in the msdn docs:
00028         // "Windows NT 4.0 and Windows 2000: Translate using UTF-8.
00029         //  When this is set, dwFlags must be zero."
00030         //
00031         // Does this mean UTF-8 conversions don't work on win 95/98 ???
00032         //
00033         DWORD flags = (codepage == CP_UTF8 ? 0 : MB_USEGLYPHCHARS);
00034
00035         // calc size needed
00036         outLen = ::MultiByteToWideChar(codepage, flags, s, inLen, buff, 0);
00037
00038         buff = new wchar_t [outLen];
00039
00040         // do it
00041         ::MultiByteToWideChar(codepage, flags, s, inLen, buff, outLen);
00042
00043         // set the string into our base class.
00044         assign(buff, outLen);
00045
00046         // discard the scratch space.
00047         delete [] buff;
00048     }
00049 };
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsPrefs.cpp Source File

common/CvsPrefs.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * CvsPrefs.cpp --- class to handle CVS settings
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <string.h>
00028 #include <stdlib.h>
00029 #include <algorithm>
00030 #include <string>
00031 #include "CvsPrefs.h"
00032 #include "Authen.h"
00033 #include "AppConsole.h"
00034 #include "CvsArgs.h"
00035 #include "MultiString.h"
00036 #include "FileTraversal.h"
00037
00038 #ifdef TARGET_OS_MAC
00039 #   define PCVS "\pCVSROOT"
00040 #   include <Resources.h>
00041 #   include <Folders.h>
00042 #   include <MacErrors.h>
00043 #   include <TextUtils.h>
00044 #   include "VolsPaths.h"
00045 #   include "MacMisc.h"
00046 #   include "AppGlue.h"
00047 #endif /* TARGET_OS_MAC */
00048
00049 #ifdef HAVE_UNISTD_H
00050 #   include <unistd.h>
00051 #endif
00052
00053 #ifdef HAVE_PWD_H
00054 #   include <pwd.h>
00055 #endif
00056
00057 #ifdef WIN32
00058 #   include "WinCvsBrowser.h"
00059 #   include "wincvs.h"
00060 #   include "wincvs_winutil.h"
00061 #   ifdef _DEBUG
00062 #   define new DEBUG_NEW
00063 #   undef THIS_FILE
00064     static char THIS_FILE[] = __FILE__;
00065 #   endif
00066 #endif /* WIN32 */
00067
00068 #ifdef qMacCvsPP
00069 #   include "GUSIInternal.h"
00070 #   include "GUSIFileSpec.h"
00071 #   include "MacCvsApp.h"
00072 #   include <UProcess.h>
00073 #endif
00074
00075 #if qUnix
00076 #   include "UCvsApp.h"
00077 #   include "UCvsFolders.h"
00078 #endif
00079
00080 #ifndef WIN32
00081 #   define DEFAULT_MATCH_ENTRIES_CASE true
00082 #else
00083 #   define DEFAULT_MATCH_ENTRIES_CASE false
00084 #endif
00085
00086 CvsPrefs gCvsPrefs;
00087
00088 static CPersistentInt gPersistentShema("P_PersistentShema", SCHEMA_0);
00089
00090 static CPersistentBool gCheckoutRO("P_CheckoutRO", false, kAddSettings);
00091 static CPersistentBool gZ9Option("P_Z9Option", false, kAddSettings);
00092 static CPersistentBool gPruneOption("P_PruneOption", true, kAddSettings);
00093 static CPersistentBool gQuietOption("P_QuietOption", false);
00094 static CPersistentInt gIsoConvert("P_NIsoConvert", ISO8559_none, kAddSettings);
00095 static CPersistentBool gICTextOption("P_ICTextOption", false, kAddSettings);
00096 static CPersistentBool gAddBinControl("P_AddBinControl", true);
00097 static CPersistentInt gMacBinEncoding("P_NMacBinEncoding", MAC_HQX, kAddSettings);
00098 static CPersistentBool gMacBinEncodeOnlyBinaryFiles("P_MacBinOnlyBinaries", true, kAddSettings);
00099 static CPersistentInt gUseShell("P_UseShell", SHELL_TCL);
00100 static CPersistentBool gMatchEntriesCase("P_MatchEntriesCase", DEFAULT_MATCH_ENTRIES_CASE);
00101
00102 #ifndef WIN32
00103 // Obsolete, replaced by gFileActionType
00104 static CPersistentBool gUseViewerAlways("P_UseViewerAlways", false, kAddSettings);
00105 #endif
00106
00107 #if INTERNAL_AUTHEN
00108 static PCPStr gCvsroot("P_Cvsroot");
00109 #endif /*# INTERNAL_AUTHEN */
00110
00111 CMString gOldCvsroots(NUM_CVSROOT, "P_OldCvsroots");
00112 static CKeyString gLastCvsroot(100, "P_LastCvsroot");
00113 static CKeyString gLastModuleName(100, "P_LastModuleName");
00114
00115 static CPersistentInt gKserverPort("P_KserverPort", -1, kAddSettings);
00116 static CPersistentInt gPserverPort("P_PserverPort", -1, kAddSettings);
00117 static CPersistentInt gRhostPort("P_RhostPort", -1, kAddSettings);
00118 static PCPStr gServerName("P_ServerName", 0L, kAddSettings);
00119 static PCStr gRshName("P_RshName", 0L, kAddSettings);
00120 static CPersistentBool gEncryptCommunication("P_EncryptCommunication", false, kAddSettings);
00121
00122 #if !qUnix && !TARGET_RT_MAC_MACHO
00123 static PCStr gHome("P_Home", 0L, kAddSettings);
00124 #endif /* !qUnix */
00125
00126 #ifdef qUnix
00127 static PCStr gConsoleFont("P_ConsoleFont", "-adobe-courier-medium-r-*-*-12-*-*-*-*-*-iso8859-1");
00128 #endif
00129
00130 #ifdef qUnix
00131 static PCStr gViewer("P_Viewer", "emacs"); // not vi ;-)
00132 #elif defined(qMacCvsPP)
00133 static PCStr gViewer("P_Viewer", "");
00134 #else
00135 static PCStr gViewer("P_Viewer", "Notepad");
00136 #endif
00137
00138 static PCStr gHelper("P_Helper", "netscape");
00139 static PCStr gBrowser("P_Browser", "gmc");
00140
00141 #ifdef qUnix
00142 static PCStr gExtdiff("P_Extdiff", "emacs");
00143 #elif TARGET_RT_MAC_MACHO
00144 static PCStr gExtdiff("P_Extdiff", "/usr/bin/opendiff");
00145 #else
00146 static PCStr gExtdiff("P_Extdiff", "");
00147 #endif
00148
00149 #if DIRTY_MCP_SUPPORT
00150 static CPersistentBool gDirtySupport("P_DirtySupport", true, kAddSettings);
00151 #endif
00152
00153 static CPersistentBool gAlwaysUseCvsroot("P_AlwaysUseCvsroot", false, kAddSettings);
00154 static CPersistentInt gLogoutTimeOut("P_LogoutTimeOut", 0);
00155 static PCStr gProxyHost("P_ProxyHost", "www.mydomain", kAddSettings);
00156 static CPersistentInt gProxyPort("P_ProxyPort", 8888, kAddSettings);
00157 static CPersistentBool gUseProxy("P_UseProxy", false, kAddSettings);
00158 static CPersistentBool gUnixLF("P_UnixLF", false, kAddSettings);
00159 static CPersistentBool gMacLF("P_MacLF", false, kAddSettings);
00160 static CPersistentInt gZLevel("P_ZLevel", 9, kAddSettings);
00161 static CPersistentInt gCvsVersion("P_CvsVersion", 0, kAddSettings);
00162 static CPersistentBool gCvsConsole("P_CvsConsole", false, kAddSettings);
00163 static CPersistentInt gWordWrapLogMsg("P_WordWrapLogMsg", 0, kAddSettings);
00164 static PCStr gLastWorkingDir("P_LastWorkingDir", 0L, kAddSettings);
00165
00166 static CPersistentBool gDisableSplashScreen("P_DisableSplashScreen", false);
00167
00168 static CPersistentInt gStatusOutputType("P_StatusOutputType", STATUSOUTPUT_VERBOSE);
00169 static CPersistentInt gFileActionType("P_FileActionType", 0);
00170 static CPersistentBool gUpdateCaseSensitiveNames("P_UpdateCaseSensitiveNames", false, kAddSettings);
00171 static CPersistentBool gUpdateLastCheckinTime("P_UpdateLastCheckinTime", false, kAddSettings);
00172 static CPersistentBool gUpdateThreeWayConflicts("P_UpdateThreeWayConflicts", false, kAddSettings);
00173
00174 static CPersistentBool gHideCommandDlgUpdate("P_HideCommandDlgUpdate", false);
00175 static CPersistentBool gHideCommandDlgDiff("P_HideCommandDlgDiff", false);
00176 static CPersistentBool gHideCommandDlgLog("P_HideCommandDlgLog", false);
00177 static CPersistentBool gHideCommandDlgGraph("P_HideCommandDlgGraph", false);
00178 static CPersistentBool gHideCommandDlgAnnotate("P_HideCommandDlgAnnotate", false);
00179 static CPersistentBool gHideCommandDlgStatus("P_HideCommandDlgStatus", false);
00180 static CPersistentBool gHideCommandDlgFileAction("P_HideCommandDlgFileAction", false);
00181 static CPersistentBool gHideCommandDlgUseShift("P_HideCommandDlgUseShift", true);
00182 static CPersistentBool gCtrlPressedOnOK("P_CtrlPressedOnOK", true);
00183
00184 CKeyString gWhichCvs(20, "P_WhichCvs");
00185 static CPersistentBool gUseAltCvs("P_UseAltCvs", false, kAddSettings);
00186 static PCStr gSettingsFolder("P_SettingsFolder", 0L);
00187 static CPersistentInt gShowCvs("P_ShowCvs", SHOWCVS_HIDE, kAddSettings);
00188
00189 static PCStr gTclLibrary("P_TclLibrary", 0L);
00190 static PCStr gPythonLibrary("P_PythonLibrary", 0L);
00191
00192 bool CvsPrefs::CheckoutRO(void) const {return gCheckoutRO;}
00193 bool CvsPrefs::Z9Option(void) const {return gZ9Option;}
00194 bool CvsPrefs::PruneOption(void) const {return gPruneOption;}
00195 bool CvsPrefs::QuietOption(void) const {return gQuietOption;}
00196 ISO8559 CvsPrefs::IsoConvert(void) const {return (ISO8559)(int)gIsoConvert;}
00197 bool CvsPrefs::ICTextOption(void) const {return gICTextOption;}
00198 bool CvsPrefs::AddControl(void) const {return gAddBinControl;}
00199 bool CvsPrefs::MacBinEncodeBinariesOnly(void) const {return gMacBinEncodeOnlyBinaryFiles;}
00200 MACENCODING CvsPrefs::MacBinEncoding(void) const {return (MACENCODING)(int)gMacBinEncoding;}
00201 int CvsPrefs::KserverPort(void) const {return gKserverPort;}
00202 int CvsPrefs::PserverPort(void) const {return gPserverPort;}
00203 int CvsPrefs::RhostPort(void) const {return gRhostPort;}
00204 bool CvsPrefs::MatchEntriesCase(void) const {return gMatchEntriesCase;}
00205
00206 #ifndef WIN32
00207 bool CvsPrefs::UseViewerAlways(void) const {return gUseViewerAlways;}
00208 #endif
00209
00210 const char* CvsPrefs::ServerName(void) const {return gServerName.empty() ? 0L : (const char*)gServerName;}
00211 const char* CvsPrefs::RshName(void) const {return gRshName.empty() ? 0L : (const char*)gRshName;}
00212 bool CvsPrefs::EncryptCommunication(void) const {return gEncryptCommunication;}
00213
00214 const char* CvsPrefs::Home(void) const
00215 {
00216 #if !qUnix && !TARGET_RT_MAC_MACHO
00217 #   ifdef WIN32
00218     // Windows 98 doesn't like C:\/.cvspass
00219     gHome.rtrim (kPathDelimiter);
00220 #   endif
00221     return gHome.empty() ? 0L : (const char*)gHome;
00222 #else /* qUnix || TARGET_RT_MAC_MACHO */
00223     static CStr home;
00224     if (!home.empty())
00225         return home;
00226
00227     char *env = getenv ("HOME");
00228     struct passwd *pw;
00229     if (env)
00230         home = env;
00231     else if ((pw = (struct passwd *) getpwuid (getuid ()))
00232              && pw->pw_dir)
00233         home = pw->pw_dir;
00234     else
00235         return 0L;
00236
00237     return home;
00238 #endif /* qUnix ||ÊTARGET_RT_MAC_MACHO */
00239 }
00240
00241 #ifdef qUnix
00242 const char* CvsPrefs::ConsoleFont(void) const {return gConsoleFont.empty() ? 0L : (const char*)gConsoleFont;}
00243 #endif
00244
00245 #if DIRTY_MCP_SUPPORT
00246 bool CvsPrefs::DirtySupport(void) const {return gDirtySupport;}
00247 #endif
00248
00249 const char* CvsPrefs::Viewer(void) const {return gViewer.empty() ? 0L : (const char*)gViewer;}
00250 const char* CvsPrefs::Helper(void) const {return gHelper.empty() ? 0L : (const char*)gHelper;}
00251 const char* CvsPrefs::Browser(void) const {return gBrowser.empty() ? 0L : (const char*)gBrowser;}
00252 const char* CvsPrefs::ExtDiff(void) const {return gExtdiff.empty() ? 0L : (const char*)gExtdiff;}
00253
00254 int CvsPrefs::LogoutTimeOut(void) const {return gLogoutTimeOut;}
00255 bool CvsPrefs::AlwaysUseCvsroot(void) const {return gAlwaysUseCvsroot;}
00256 const char* CvsPrefs::ProxyHost(void) const {return gProxyHost;}
00257 int CvsPrefs::ProxyPort(void) const {return gProxyPort;}
00258 bool CvsPrefs::UseProxy(void) const {return gUseProxy;}
00259 bool CvsPrefs::UnixLF(void) const {return gUnixLF;}
00260 bool CvsPrefs::MacLF(void) const {return gMacLF;}
00261 int CvsPrefs::ZLevel(void) const {return gZLevel;}
00262 int CvsPrefs::CvsVersion(void) const {return gCvsVersion;}
00263 bool CvsPrefs::CvsConsole(void) const {return gCvsConsole;}
00264 int CvsPrefs::WordWrapLogMsg(void) const {return gWordWrapLogMsg;}
00265 SHELL_KIND CvsPrefs::GetUseShell(void) const {return (SHELL_KIND)(int)gUseShell;}
00266 bool CvsPrefs::DisableSplashScreen(void) const {return gDisableSplashScreen;}
00267
00268 STATUSOUTPUT_TYPE CvsPrefs::StatusOutputType(void) const {return (STATUSOUTPUT_TYPE)(int)gStatusOutputType;}
00269 FILEACTION_TYPE CvsPrefs::FileActionType(void) const {return (FILEACTION_TYPE)(int)gFileActionType;}
00270 bool CvsPrefs::UpdateCaseSensitiveNames(void) const {return gUpdateCaseSensitiveNames;}
00271 bool CvsPrefs::UpdateLastCheckinTime(void) const {return gUpdateLastCheckinTime;}
00272 bool CvsPrefs::UpdateThreeWayConflicts(void) const {return gUpdateThreeWayConflicts;}
00273
00274
00275 const char* CvsPrefs::SettingsFolder(void) const {return gSettingsFolder.empty() ? 0L : (const char*)gSettingsFolder;};
00276 const char* CvsPrefs::TclLibrary(void) const {return gTclLibrary.empty() ? 0L : (const char*)gTclLibrary;};
00277 const char* CvsPrefs::PythonLibrary(void) const {return gPythonLibrary.empty() ? 0L : (const char*)gPythonLibrary;};
00278
00279 /* Return the current working dir (last working dir).   */
00280 /* This directory is automatically selected when WinCVS */
00281 /* is opened the next time. */
00282 const char* CvsPrefs::LastWorkingDir(void) const
00283 {
00284     return gLastWorkingDir.empty() ? 0L : (const char*)gLastWorkingDir;
00285 }
00286
00287 bool CvsPrefs::HideCommandDlgUpdate(void) const {return gHideCommandDlgUpdate;}
00288 bool CvsPrefs::HideCommandDlgDiff(void) const {return gHideCommandDlgDiff;}
00289 bool CvsPrefs::HideCommandDlgLog(void) const {return gHideCommandDlgLog;}
00290 bool CvsPrefs::HideCommandDlgGraph(void) const {return gHideCommandDlgGraph;}
00291 bool CvsPrefs::HideCommandDlgAnnotate(void) const {return gHideCommandDlgAnnotate;}
00292 bool CvsPrefs::HideCommandDlgStatus(void) const {return gHideCommandDlgStatus;}
00293 bool CvsPrefs::HideCommandDlgFileAction(void) const {return gHideCommandDlgFileAction;}
00294 bool CvsPrefs::HideCommandDlgUseShift(void) const {return gHideCommandDlgUseShift;}
00295 bool CvsPrefs::CtrlPressedOnOK(void) const {return gCtrlPressedOnOK;}
00296
00297 void CvsPrefs::SetCheckoutRO(bool newState) {gCheckoutRO = newState;}
00298 void CvsPrefs::SetZ9Option(bool newState) {gZ9Option = newState;}
00299 void CvsPrefs::SetPruneOption(bool newState) {gPruneOption = newState;}
00300 void CvsPrefs::SetQuietOption(bool newState) {gQuietOption = newState;}
00301 void CvsPrefs::SetIsoConvert(ISO8559 newState) {gIsoConvert = (int)newState;}
00302 void CvsPrefs::SetICTextOption(bool newState) {gICTextOption = newState;}
00303 void CvsPrefs::SetAddControl(bool newState) {gAddBinControl = newState;}
00304 void CvsPrefs::SetMacBinEncodeBinariesOnly(bool newState) {gMacBinEncodeOnlyBinaryFiles = newState;}
00305 void CvsPrefs::SetMacBinEncoding(MACENCODING newState) {gMacBinEncoding = (int)newState;}
00306 void CvsPrefs::SetKserverPort(int newState) {gKserverPort = newState;}
00307 void CvsPrefs::SetPserverPort(int newState) {gPserverPort = newState;}
00308 void CvsPrefs::SetRhostPort(int newState) {gRhostPort = newState;}
00309 void CvsPrefs::SetServerName(const char* newservername) {gServerName = newservername;}
00310 void CvsPrefs::SetRshName(const char* newrshname) {gRshName = newrshname;}
00311 void CvsPrefs::SetEncryptCommunication(bool newState) {gEncryptCommunication = newState;}
00312 void CvsPrefs::SetMatchEntriesCase(bool newState) {gMatchEntriesCase = newState;}
00313
00314 #ifndef WIN32
00315 void CvsPrefs::SetUseViewerAlways(bool newState) {gUseViewerAlways = newState;}
00316 #endif
00317
00318 void CvsPrefs::SetHome(const char* newhome)
00319 {
00320 #if !qUnix && !TARGET_RT_MAC_MACHO
00321     gHome = newhome;
00322 #   ifdef WIN32
00323     // Windows 98 doesn't like C:\/.cvspass
00324     gHome.rtrim (kPathDelimiter);
00325 #   endif
00326 #endif /* !qUnix && !TARGET_RT_MAC_MACHO */
00327 }
00328
00329 #ifdef qUnix
00330 void CvsPrefs::SetConsoleFont(const char* newFont) {gConsoleFont = newFont;}
00331 #endif
00332
00333 #if DIRTY_MCP_SUPPORT
00334 void CvsPrefs::SetDirtySupport(bool newState) {gDirtySupport = newState;}
00335 #endif
00336
00337 void CvsPrefs::SetViewer(const char* newviewer) {gViewer = newviewer;}
00338 void CvsPrefs::SetBrowser(const char* newviewer) {gBrowser = newviewer;}
00339 void CvsPrefs::SetHelper(const char* newviewer) {gHelper = newviewer;}
00340 void CvsPrefs::SetExtDiff(const char* newdiff) {gExtdiff = newdiff;}
00341
00342 void CvsPrefs::SetLogoutTimeOut(int newTimeout) {gLogoutTimeOut = newTimeout;}
00343 void CvsPrefs::SetAlwaysUseCvsroot(bool newState) {gAlwaysUseCvsroot = newState;}
00344 void CvsPrefs::SetUseProxy(bool useit) {gUseProxy = useit;}
00345 void CvsPrefs::SetUnixLF(bool useit) {gUnixLF = useit;}
00346 void CvsPrefs::SetMacLF(bool useit) {gMacLF = useit;}
00347 void CvsPrefs::SetZLevel(int level) {gZLevel = level;}
00348 void CvsPrefs::SetProxyHost(const char* newhost) {gProxyHost = newhost;}
00349 void CvsPrefs::SetProxyPort(int newport) {gProxyPort = newport;}
00350 void CvsPrefs::SetCvsVersion(int vers) {gCvsVersion = vers;}
00351 void CvsPrefs::SetCvsConsole(bool console) {gCvsConsole = console;}
00352 void CvsPrefs::SetWordWrapLogMsg(int wordwrap) {gWordWrapLogMsg = wordwrap;}
00353 void CvsPrefs::SetLastWorkingDir(const char* workdir) {gLastWorkingDir = workdir;}
00354 void CvsPrefs::SetUseShell(SHELL_KIND shell) {gUseShell = shell;}
00355 void CvsPrefs::SetDisableSplashScreen(bool newState) {gDisableSplashScreen = newState;}
00356
00357 void CvsPrefs::SetStatusOutputType(STATUSOUTPUT_TYPE outputType) {gStatusOutputType = outputType;}
00358 void CvsPrefs::SetFileActionType(FILEACTION_TYPE fileActionType) {gFileActionType = fileActionType;}
00359 void CvsPrefs::SetUpdateCaseSensitiveNames(bool newState) {gUpdateCaseSensitiveNames = newState;}
00360 void CvsPrefs::SetUpdateLastCheckinTime(bool newState) {gUpdateLastCheckinTime = newState;}
00361 void CvsPrefs::SetUpdateThreeWayConflicts(bool newState) {gUpdateThreeWayConflicts = newState;}
00362
00363 void CvsPrefs::SetSettingsFolder(const char* settingsFolder) {gSettingsFolder = settingsFolder;}
00364 void CvsPrefs::SetTclLibrary(const char* tclLibrary) {gTclLibrary = tclLibrary;}
00365 void CvsPrefs::SetPythonLibrary(const char* pythonLibrary) {gPythonLibrary = pythonLibrary;}
00366
00367 void CvsPrefs::SetHideCommandDlgUpdate(bool newState) {gHideCommandDlgUpdate = newState;}
00368 void CvsPrefs::SetHideCommandDlgDiff(bool newState) {gHideCommandDlgDiff = newState;}
00369 void CvsPrefs::SetHideCommandDlgLog(bool newState) {gHideCommandDlgLog = newState;}
00370 void CvsPrefs::SetHideCommandDlgGraph(bool newState) {gHideCommandDlgGraph = newState;}
00371 void CvsPrefs::SetHideCommandDlgAnnotate(bool newState) {gHideCommandDlgAnnotate = newState;}
00372 void CvsPrefs::SetHideCommandDlgStatus(bool newState) {gHideCommandDlgStatus = newState;}
00373 void CvsPrefs::SetHideCommandDlgFileAction(bool newState) {gHideCommandDlgFileAction = newState;}
00374 void CvsPrefs::SetHideCommandDlgUseShift(bool newState) {gHideCommandDlgUseShift = newState;}
00375 void CvsPrefs::SetCtrlPressedOnOK(bool newState) {gCtrlPressedOnOK = newState;}
00376
00377 #if INTERNAL_AUTHEN
00378 bool CvsPrefs::empty(void) const  { return gCvsroot.empty();  }
00379 int  CvsPrefs::length(void) const { return gCvsroot.length(); }
00380
00381 CvsPrefs::operator const char*() const {    return (const char*)gCvsroot; }
00382 CvsPrefs::operator const unsigned char *() const {return (const unsigned char *)gCvsroot;}
00383 const char* CvsPrefs::operator=(const char*newstr) {    return gCvsroot = newstr; }
00384 const unsigned char *CvsPrefs::operator=(const unsigned char *newstr) { return gCvsroot = newstr; }
00385 #endif /* INTERNAL_AUTHEN */
00386
00387 void CvsPrefs::save(bool quiet /*= false*/)
00388 {
00389 #if INTERNAL_AUTHEN
00390     if( empty() )
00391         return;
00392 #endif /* INTERNAL_AUTHEN */
00393
00394     if( SCHEMA_CURRENT != gPersistentShema )
00395     {
00396         gPersistentShema = SCHEMA_CURRENT;
00397     }
00398
00399     bool needSave = CPersistent::NeedSave();
00400     bool needSaveSettings = CPersistent::NeedSave(true);
00401     if( !needSave )
00402         return;
00403
00404     CPersistent::SaveAll();
00405
00406     if( !needSaveSettings )
00407         return;
00408
00409 #ifdef WIN32
00410     {
00411         extern PCPStr gOldLoc;
00412         SavePersistentSettings(gOldLoc, quiet);
00413     }
00414 #endif
00415 #ifdef qMacCvsPP
00416     CMacCvsApp::SavePersistentSettings(quiet);
00417 #endif /* qMacCvsPP */
00418 #if qUnix
00419     UCvsFolders *browser = UCvsApp::gApp->GetBrowserView();
00420     if(browser != 0L && browser->GetRoot() != 0L)
00421         SavePersistentSettings(browser->GetRoot(), quiet);
00422 #endif
00423 }
00424
00425 void CvsPrefs::load(void)
00426 {
00427     bool loaded = CPersistent::LoadAll();
00428
00429     if( loaded )
00430     {
00431         if( NeedCvsrootMigration() )
00432         {
00433             MigrateCvsrootList();
00434         }
00435
00436         return;
00437     }
00438
00439     // backward compatibility
00440 #ifdef WIN32
00441     UINT value;
00442
00443     CString cstr;
00444 #if INTERNAL_AUTHEN
00445     cstr = AfxGetApp()->GetProfileString(PROFILE_NAME, "CVSROOT");
00446     if(!cstr.IsEmpty())
00447         *this = (const char*)cstr;
00448 #endif /* INTERNAL_AUTHEN */
00449
00450     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "CheckoutRO", -1)) != -1)
00451         SetCheckoutRO(value ? 1 : 0);
00452     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "Z9Option", -1)) != -1)
00453         SetZ9Option(value ? 1 : 0);
00454     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "QuietOption", -1)) != -1)
00455         SetQuietOption(value ? 1 : 0);
00456     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "PruneOption", -1)) != -1)
00457         SetPruneOption(value ? 1 : 0);
00458
00459 #if INTERNAL_AUTHEN
00460     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "Authentication", -1)) != -1)
00461         gAuthen.setkind((AuthenKind)value);
00462 #endif /* INTERNAL_AUTHEN */
00463
00464     if((value = AfxGetApp()->GetProfileInt(PROFILE_NAME, "AddControl", -1)) != -1)
00465         SetAddControl(value ? 1 : 0);
00466
00467     char tmp[20];
00468     for(int i = 0; i < NUM_CVSROOT; i++)
00469     {
00470         sprintf(tmp, "CVSROOTLIST%d", i);
00471         cstr = AfxGetApp()->GetProfileString(PROFILE_NAME, tmp);
00472         if(!cstr.IsEmpty())
00473             gOldCvsroots.Insert((const char*)cstr);
00474     }
00475
00476 #endif /* WIN32 */
00477
00478 }
00479
00485 bool CvsPrefs::NeedCvsrootMigration()
00486 {
00487     bool res = false;
00488
00489 #ifdef WIN32
00490     if( SCHEMA_0 == gPersistentShema )
00491     {
00492         res = true;
00493     }
00494 #endif /* WIN32 */
00495
00496 #if qUnix
00497     if( SCHEMA_0 == gPersistentShema || SCHEMA_1 == gPersistentShema )
00498     {
00499         res = true;
00500     }
00501 #endif // qUnix
00502
00503 #if qMacCvsPP
00504 #endif // qMacCvsPP
00505
00506     return res;
00507 }
00508
00515 bool FindBestLastCvsroot(const char* path, CStr& lastCvsroot)
00516 {
00517     bool res = false;
00518
00519     CStr bestCvsrootPath;
00520     CStr bestCvsroot;
00521
00522     const std::vector<CStr>& list = gLastCvsroot.GetList();
00523     for(std::vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00524     {
00525         CStr key;
00526         CStr value;
00527
00528         gLastCvsroot.Split((*i).c_str(), key, value);
00529         if( StrPathCmp(key, path) == 0 )
00530         {
00531             lastCvsroot = value;
00532             res = true;
00533             break;
00534         }
00535
00536         std::string strKey = key.c_str();
00537         std::string strPath = path;
00538
00539         strKey.erase(strKey.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00540         strPath.erase(strPath.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00541
00542         std::transform(strKey.begin(), strKey.end(), strKey.begin(), tolower);
00543         std::transform(strPath.begin(), strPath.end(), strPath.begin(), tolower);
00544
00545         if( strPath.find(strKey) != std::string::npos && strKey.length() > bestCvsrootPath.length() )
00546         {
00547             bestCvsrootPath = key;
00548             bestCvsroot = value;
00549         }
00550     }
00551
00552     if( !res && !bestCvsroot.empty() )
00553     {
00554         lastCvsroot = bestCvsroot;
00555         res = true;
00556     }
00557
00558     return res;
00559 }
00560
00566 void InsertLastCvsroot(const char* path, const char* cvsroot)
00567 {
00568     CStr mapValue;
00569     gLastCvsroot.Concatenate(mapValue, path, cvsroot);
00570     gLastCvsroot.Insert(mapValue);
00571 }
00572
00579 bool FindBestLastModuleName(const char* path, CStr& lastModuleName)
00580 {
00581     bool res = false;
00582
00583     CStr bestModuleNamePath;
00584     CStr bestModuleName;
00585
00586     const std::vector<CStr>& list = gLastModuleName.GetList();
00587     for(std::vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00588     {
00589         CStr key;
00590         CStr value;
00591
00592         gLastModuleName.Split((*i).c_str(), key, value);
00593         if( StrPathCmp(key, path) == 0 )
00594         {
00595             lastModuleName = value;
00596             res = true;
00597             break;
00598         }
00599
00600         std::string strKey = key.c_str();
00601         std::string strPath = path;
00602
00603         strKey.erase(strKey.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00604         strPath.erase(strPath.find_last_not_of(kPathDelimiter) + 1, std::string::npos);
00605
00606         std::transform(strKey.begin(), strKey.end(), strKey.begin(), tolower);
00607         std::transform(strPath.begin(), strPath.end(), strPath.begin(), tolower);
00608
00609         if( strPath.find(strKey) != std::string::npos && strKey.length() > bestModuleName.length() )
00610         {
00611             bestModuleNamePath = key;
00612             bestModuleName = value;
00613         }
00614     }
00615
00616     if( !res && !bestModuleName.empty() )
00617     {
00618         lastModuleName = bestModuleName;
00619         res = true;
00620     }
00621
00622     return res;
00623 }
00624
00630 void InsertLastModuleName(const char* path, const char* moduleName)
00631 {
00632     CStr mapValue;
00633     gLastModuleName.Concatenate(mapValue, path, moduleName);
00634     gLastModuleName.Insert(mapValue);
00635 }
00636
00640 void MigrateCvsrootList()
00641 {
00642     for(int nIndex = 0; nIndex <= NUM_CVSROOT; nIndex++)
00643     {
00644         CStr cvsroot;
00645         char tmp[20];
00646         sprintf(tmp, "P_Cvsroot%d", nIndex);
00647
00648 #ifdef WIN32
00649         BYTE* ppData;
00650         UINT pBytes = 0;
00651
00652         if( !AfxGetApp()->GetProfileBinary(PROFILE_NAME, tmp, &ppData, &pBytes) )
00653         {
00654             continue;
00655         }
00656
00657         cvsroot = (char*)ppData;
00658         delete ppData;
00659 #endif /* WIN32 */
00660
00661 #if qUnix
00662         /* remove unused entries */
00663         gOldCvsroots.Remove(tmp);
00664 #endif // qUnix
00665
00666 #if qMacCvsPP
00667 #endif // qMacCvsPP
00668
00669         if( !cvsroot.empty() )
00670         {
00671             gOldCvsroots.Insert(cvsroot);
00672         }
00673     }
00674 }
00675
00676 #ifdef WIN32
00677 kWinVersion CvsPrefs::WhichVersion()
00678 {
00679     DWORD dwVersion = GetVersion(); // Get major and minor version numbers of Windows
00680     DWORD dwWindowsMajorVersion =  (DWORD)(LOBYTE(LOWORD(dwVersion)));
00681     DWORD dwWindowsMinorVersion =  (DWORD)(HIBYTE(LOWORD(dwVersion)));
00682     DWORD dwBuild;
00683
00684     // Get build numbers for Windows NT or Win32s
00685     if (dwVersion < 0x80000000)                // Windows NT
00686     {
00687         dwBuild = (DWORD)(HIWORD(dwVersion));
00688         return dwWindowsMajorVersion == 3 ? kWinNT35 : kWinNT4;
00689     }
00690     else if (dwWindowsMajorVersion < 4)        // Win16s
00691     {
00692         dwBuild = (DWORD)(HIWORD(dwVersion));
00693         return kWin16;
00694     }
00695
00696     // Windows 95 -- No build numbers provided    dwBuild =  0;
00697     return kWin32;
00698 }
00699 #endif /* WIN32 */
00700
00701
00702 //
00703 // TODO: If we sometimes implement multi-threaded CVS/TCL macro
00704 // execution then we have to implement thread synchronization in
00705 // IsXXXRunning and SetXXXRunning methods.
00706 //
00707 // NOTE! IsCvsRunning and SetCvsRunning methods are not yet
00708 // used in Mac/Unix/WinCVS. Each of these version have had
00709 // their own app.gCvsRunning variable. I haven't cleaned up
00710 // the code and changed them to use this "one and only"
00711 // CvsRunning methods.
00712 //
00713 bool CvsPrefs::IsCvsRunning(void) const
00714 {
00715     return(fCvsRunningCounter > 0);
00716 }
00717
00718 int CvsPrefs::SetCvsRunning(bool launched)
00719 {
00720     if(launched)
00721         fCvsRunningCounter++;
00722     else if(fCvsRunningCounter > 0)
00723         fCvsRunningCounter--;
00724
00725     return fCvsRunningCounter;
00726 }
00727
00728 bool CvsPrefs::IsTclFileRunning(void) const
00729 {
00730     return(fTclFileRunningCounter > 0);
00731 }
00732
00733 int CvsPrefs::SetTclFileRunning(bool launched)
00734 {
00735     if(launched)
00736         fTclFileRunningCounter++;
00737     else if(fTclFileRunningCounter > 0)
00738         fTclFileRunningCounter--;
00739
00740     return fTclFileRunningCounter;
00741 }
00742
00743 bool CvsPrefs::UseAltCvs(void) const
00744 {
00745     return gUseAltCvs;
00746 }
00747
00748 void CvsPrefs::SetUseAltCvs(bool useit)
00749 {
00750     gUseAltCvs = useit;
00751 }
00752
00753 void CvsPrefs::SetWhichCvs(const char* cvsPath)
00754 {
00755     UStr appPath;
00756
00757 #ifdef WIN32
00758     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00759     pApp->GetAppModule(appPath);
00760
00761     CString strAppPath(appPath);
00762     strAppPath.MakeLower();
00763     appPath = strAppPath;
00764 #elif qUnix
00765     appPath << EXECLIB << "/" << "cvs";
00766 #elif TARGET_RT_MAC_MACHO
00767     appPath = CMacCvsApp::gApp->GetAppPath();
00768 #endif
00769
00770     if( !appPath.empty() )
00771     {
00772         UStr value;
00773         gWhichCvs.Concatenate(value, appPath, cvsPath);
00774         gWhichCvs.Insert(value);
00775     }
00776     else
00777     {
00778         gWhichCvs.Insert(cvsPath);
00779     }
00780 }
00781
00782 const char* CvsPrefs::WhichCvs(UStr& path, bool userOnly) const
00783 {
00784     path.clear();
00785
00786     UStr appPath;
00787
00788 #ifdef WIN32
00789     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00790     pApp->GetAppModule(appPath);
00791
00792     CString strAppPath(appPath);
00793     strAppPath.MakeLower();
00794     appPath = strAppPath;
00795 #elif qUnix
00796     appPath << EXECLIB << "/" << "cvs";
00797 #elif TARGET_RT_MAC_MACHO
00798     appPath = CMacCvsApp::gApp->GetAppPath();
00799 #endif
00800
00801     // search if beside the default cvs, the user defined one to use
00802     // with this application only.
00803     UStr candidate;
00804     if( !appPath.empty() )
00805     {
00806         UStr value;
00807         gWhichCvs.Concatenate(value, appPath, "");
00808         TMString<UStr>::list_t::const_iterator i = gWhichCvs.Find(value);
00809         if( i != gWhichCvs.end() )
00810         {
00811             UStr key;
00812             gWhichCvs.Split(*i, key, candidate);
00813         }
00814     }
00815
00816     // verify this cvs exe is still there
00817     struct stat sb;
00818     if( !candidate.empty() && stat(candidate, &sb) != -1 && S_ISREG(sb.st_mode) )
00819     {
00820         path = candidate;
00821         return path.c_str();
00822     }
00823
00824     // fallback to the default one.
00825     if( userOnly )
00826         return 0L;
00827
00828 #ifdef WIN32
00829     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00830
00831     app->GetAppPath(path);
00832     if( !path.endsWith(kPathDelimiter) )
00833         path << kPathDelimiter;
00834
00835     path << "cvsnt" << kPathDelimiter;
00836     path << (gCvsPrefs.WhichVersion() == kWin32 ? "cvs95.exe" : "cvs.exe");
00837 #elif qUnix
00838     if( path.empty() )
00839         path = EXECLIB;
00840
00841     if(!path.endsWith(kPathDelimiter))
00842         path << kPathDelimiter;
00843
00844     path << "cvs";
00845 #elif TARGET_RT_MAC_MACHO
00846     path = CMacCvsApp::gApp->GetAppResourcesPath();
00847     if(!path.endsWith(kPathDelimiter))
00848         path << kPathDelimiter;
00849     path << "cvsgui";
00850 #endif
00851
00852     return path.c_str();
00853 }
00854
00855 SHOWCVS_TYPE CvsPrefs::ShowCvs(void) const
00856 {
00857     return (SHOWCVS_TYPE)(int)gShowCvs;
00858 }
00859
00860 void CvsPrefs::SetShowCvs(SHOWCVS_TYPE showCvs)
00861 {
00862     gShowCvs = showCvs;
00863 }
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ansiAttrCvt::AnsiSeq Member List

This is the complete list of members for ansiAttrCvt::AnsiSeq, including all inherited members.

_notOf | ansiAttrCvt::AnsiSeq | [private, static]
_params | ansiAttrCvt::AnsiSeq | [private]
_seq | ansiAttrCvt::AnsiSeq | [private]
_verb | ansiAttrCvt::AnsiSeq | [private]
AnsiSeq(std::string *in, int pos) | ansiAttrCvt::AnsiSeq |
param(int index) | ansiAttrCvt::AnsiSeq | [inline]
paramc() | ansiAttrCvt::AnsiSeq | [inline]
seq() | ansiAttrCvt::AnsiSeq | [inline]
verb() | ansiAttrCvt::AnsiSeq | [inline]
~AnsiSeq() | ansiAttrCvt::AnsiSeq |

Generated on Sat Aug 7 22:48:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFiles.cpp Source File

common/UCvsFiles.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #if qGTK
00028 #   include <gtk/gtk.h>
00029 #   include <gdk/gdkkeysyms.h>
00030 #   include "support.h"
00031 #endif
00032
00033 #ifdef HAVE_UNISTD_H
00034 #include <unistd.h>
00035 #endif
00036
00037 #ifdef HAVE_STRINGS_H
00038 #include <strings.h>
00039 #endif
00040
00041 #include <string>
00042
00043 #include "BrowseViewModel.h"
00044 #include "BrowseViewColumn.h"
00045 #include "UCvsFiles.h"
00046 #include "UCvsDialogs.h"
00047 #include "UCvsFolders.h"
00048 #include "UCvsCommands.h"
00049 #include "UCvsFrame.h"
00050 #include "UCvsApp.h"
00051 #include "CvsPrefs.h"
00052 #include "FileTraversal.h"
00053 #include "MultiFiles.h"
00054 #include "CvsCommands.h"
00055 #include "CvsArgs.h"
00056 #include "TclGlue.h"
00057 #ifdef USE_PYTHON
00058 #   include "PythonGlue.h"
00059 #endif
00060 #include "AppConsole.h"
00061 #include "MoveToTrash.h"
00062 #include "MacrosSetup.h"
00063
00064 #ifndef NAMESPACE
00065 #       if defined(_MSC_VER) || defined(__MWERKS__) || (__GNUC__ > 2)
00066 #               define NAMESPACE(w) w::
00067 #       else
00068 #               define NAMESPACE(w) ::
00069 #       endif
00070 #endif
00071
00072 #define CBrowseFileView UCvsFiles
00073
00074 UIMPLEMENT_DYNAMIC(UCvsFiles, UWidget)
00075
00076 UBEGIN_MESSAGE_MAP(UCvsFiles, UWidget)
00077     ON_UUPDATECMD(cmdUPDATE, UCvsFiles::OnCmdUIUpdate)
00078     ON_UUPDATECMD(cmdCOMMIT, UCvsFiles::OnCmdUIUpdate)
00079     ON_UUPDATECMD(cmdDIFF, UCvsFiles::OnCmdUIUpdate)
00080     ON_UUPDATECMD(cmdEDIT, UCvsFiles::OnCmdUIUpdate)
00081     ON_UUPDATECMD(cmdRESEDIT, UCvsFiles::OnCmdUIResEdit)
00082     ON_UUPDATECMD(cmdEDITORS, UCvsFiles::OnCmdUIUpdate)
00083     ON_UUPDATECMD(cmdLOCKF, UCvsFiles::OnCmdUIUpdate)
00084     ON_UUPDATECMD(cmdLOG, UCvsFiles::OnCmdUIUpdate)
00085     ON_UUPDATECMD(cmdTAGNEW, UCvsFiles::OnCmdUIUpdate)
00086     ON_UUPDATECMD(cmdTAGDELETE, UCvsFiles::OnCmdUIUpdate)
00087     ON_UUPDATECMD(cmdTAGBRANCH, UCvsFiles::OnCmdUIUpdate)
00088     ON_UUPDATECMD(cmdSTATUS, UCvsFiles::OnCmdUIUpdate)
00089     ON_UUPDATECMD(cmdUNEDIT, UCvsFiles::OnCmdUIUpdate)
00090     ON_UUPDATECMD(cmdQUERYUPDATE, UCvsFiles::OnCmdUIUpdate)
00091     ON_UUPDATECMD(cmdUNLOCKF, UCvsFiles::OnCmdUIUpdate)
00092     ON_UUPDATECMD(cmdWATCHERS, UCvsFiles::OnCmdUIUpdate)
00093     ON_UUPDATECMD(cmdWATCHON, UCvsFiles::OnCmdUIUpdate)
00094     ON_UUPDATECMD(cmdWATCHOFF, UCvsFiles::OnCmdUIUpdate)
00095     ON_UUPDATECMD(cmdADD, UCvsFiles::OnCmdUIAdd)
00096     ON_UUPDATECMD(cmdADDB, UCvsFiles::OnCmdUIAddB)
00097     ON_UUPDATECMD(cmdRELEASE, UCvsFiles::OnCmdUIRelease)
00098     ON_UUPDATECMD(cmdRMV, UCvsFiles::OnCmdUIRmv)
00099     ON_UUPDATECMD(cmdGRAPH, UCvsFiles::OnCmdUIGraph)
00100     ON_UUPDATECMD(cmdEDITSELDEF, UCvsFiles::OnCmdUIEditseldef)
00101     ON_UUPDATECMD(cmdUPFOLDER, UCvsFiles::OnCmdUIUpone)
00102     ON_UUPDATECMD(cmdTRASH, UCvsFiles::OnCmdUITrash)
00103     ON_UUPDATECMD(cmdEXPLORE, UCvsFiles::OnCmdUIExplore)
00104     ON_UUPDATECMD(cmdEDITSEL, UCvsFiles::OnCmdUITrash)
00105 #ifdef USE_PYTHON
00106     ON_UUPDATECMD_RANGE(cmdPyMACROS, cmdPyMACROSEND, UCvsFiles::OnCmdUIMacroSel)
00107 #else
00108     ON_UUPDATECMD_RANGE(cmdSELMACRO, cmdSELMACROEND, UCvsFiles::OnCmdUIMacroSel)
00109 #endif
00110     ON_UUPDATECMD(cmdFLAT, UCvsFiles::OnCmdUIViewRecursive)
00111     ON_UCOMMAND(cmdUPDATE, UCvsFiles::OnCmdUpdate)
00112     ON_UCOMMAND(cmdADD, UCvsFiles::OnCmdAdd)
00113     ON_UCOMMAND(cmdADDB, UCvsFiles::OnCmdAddb)
00114     ON_UCOMMAND(cmdCOMMIT, UCvsFiles::OnCmdCommit)
00115     ON_UCOMMAND(cmdRMV, UCvsFiles::OnCmdRmv)
00116     ON_UCOMMAND(cmdQUERYUPDATE, UCvsFiles::OnCmdQueryUpdate)
00117     ON_UCOMMAND(cmdUPFOLDER, UCvsFiles::OnCmdUpone)
00118     ON_UCOMMAND(cmdTRASH, UCvsFiles::OnCmdTrash)
00119     ON_UCOMMAND(cmdDIFF, UCvsFiles::OnCmdDiff)
00120     ON_UCOMMAND(cmdLOG, UCvsFiles::OnCmdLog)
00121     ON_UCOMMAND(cmdGRAPH, UCvsFiles::OnCmdGraph)
00122     ON_UCOMMAND(cmdSTATUS, UCvsFiles::OnCmdStatus)
00123     ON_UCOMMAND(cmdLOCKF, UCvsFiles::OnCmdLock)
00124     ON_UCOMMAND(cmdUNLOCKF, UCvsFiles::OnCmdUnlock)
00125     ON_UCOMMAND(cmdWATCHON, UCvsFiles::OnCmdWatchOn)
00126     ON_UCOMMAND(cmdWATCHOFF, UCvsFiles::OnCmdWatchOff)
00127     ON_UCOMMAND(cmdEDIT, UCvsFiles::OnCmdEdit)
00128     ON_UCOMMAND(cmdRESEDIT, UCvsFiles::OnCmdResEdit)
00129     ON_UCOMMAND(cmdUNEDIT, UCvsFiles::OnCmdUnedit)
00130     ON_UCOMMAND(cmdWATCHERS, UCvsFiles::OnCmdWatchers)
00131     ON_UCOMMAND(cmdEDITORS, UCvsFiles::OnCmdEditors)
00132     ON_UCOMMAND(cmdRELEASE, UCvsFiles::OnCmdRelease)
00133     ON_UCOMMAND(cmdTAGNEW, UCvsFiles::OnCmdTagNew)
00134     ON_UCOMMAND(cmdTAGDELETE, UCvsFiles::OnCmdTagDelete)
00135     ON_UCOMMAND(cmdTAGBRANCH, UCvsFiles::OnCmdTagBranch)
00136     ON_UCOMMAND(cmdEXPLORE, UCvsFiles::OnCmdExplore)
00137     ON_UCOMMAND(cmdEDITSEL, UCvsFiles::OnCmdEditsel)
00138     ON_UCOMMAND(cmdEDITSELDEF, UCvsFiles::OnCmdEditseldef)
00139     ON_UCOMMAND(cmdFLAT, UCvsFiles::OnViewRecursive)
00140 #ifdef USE_PYTHON
00141     ON_UCOMMAND_RANGE(cmdPyMACROS, cmdPyMACROSEND, UCvsFiles::OnMacroSel)
00142 #else
00143     ON_UCOMMAND_RANGE(cmdSELMACRO, cmdSELMACROEND, UCvsFiles::OnMacroSel)
00144 #endif
00145     ON_LIST_DBLCLICK(kUMainWidget, UCvsFiles::OnDblClick)
00146     ON_LIST_POPUP(kUMainWidget, UCvsFiles::OnPopup)
00147     ON_LIST_SELCOLUMN(kUMainWidget, UCvsFiles::OnSelColumn)
00148     ON_UDESTROY(UCvsFiles)
00149
00150     ON_UCREATE(UCvsFiles)
00151 UEND_MESSAGE_MAP()
00152
00153 #if _0_
00154     ON_UUPDATECMD(cmdSMALLICONS, OnCmdUISmallIcons)
00155     ON_UUPDATECMD(cmdFULLLIST, OnCmdUIList)
00156     ON_UUPDATECMD(cmdROWDETAILS, OnCmdUIFullRowDetails)
00157     ON_COMMAND(ID_VIEW_SMALLICONS, OnViewSmallIcons)
00158     ON_COMMAND(ID_VIEW_FULLLIST, OnViewList)
00159     ON_COMMAND(ID_VIEW_ROWDETAILS, OnViewFullRowDetails)
00160     ON_WM_LBUTTONDOWN()
00161     ON_WM_RBUTTONDOWN()
00162     ON_NOTIFY_REFLECT(LVN_COLUMNCLICK, OnColumnclick)
00163     ON_NOTIFY_REFLECT(LVN_KEYDOWN, OnKeydown)
00164     ON_WM_TIMER()
00165
00166     //}}AFX_MSG_MAP
00167     ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00168     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00169 #endif
00170
00171 static void *sFileIconTextIcon = NULL;
00172 static void *sFileIconBinaryIcon;
00173 static void *sFileIconUnknownIcon;
00174 static void *sFileIconAddedIcon;
00175 static void *sFileIconConflictIcon;
00176 static void *sFileIconMissIcon;
00177 static void *sFolderIconIcon;
00178 static void *sFolderIconUnknownIcon;
00179 static void *sFolderIconMissIcon;
00180 static void *sFileIconTextModIcon;
00181 static void *sFileIconBinaryModIcon;
00182 static void *sFileIconIgnoredIcon;
00183 static void *sFolderIconIgnoredIcon;
00184 static void *sFileIconRemovedIcon;
00185
00186 /*
00187 kFileIconText,cvsfile
00188 kFileIconBinary,binfile
00189 kFileIconUnknown,unkfile
00190 kFileIconAdded,addfile
00191 kFileIconConflict,conflict
00192 kFileIconMiss,missfile
00193 kFolderIcon,folder
00194 kFolderIconUnknown,foldunk
00195 kFolderIconMiss,foldmiss
00196 kFileIconTextMod,modfile
00197 kFileIconBinaryMod,modbin
00198 kFileIconIgnored,ignfile
00199 kFolderIconIgnored,foldign
00200 kFileIconRemoved,delfile
00201 */
00202
00203 enum
00204 {
00205     kFileIconText = 0,
00206     kFileIconBinary,
00207     kFileIconUnknown,
00208     kFileIconAdded,
00209     kFileIconConflict,
00210     kFileIconMiss,
00211     kFolderIcon,
00212     kFolderIconUnknown,
00213     kFolderIconMiss,
00214     kFileIconTextMod,
00215     kFileIconBinaryMod,
00216     kFileIconIgnored,
00217     kFolderIconIgnored,
00218     kFileIconRemoved
00219 };
00220
00221 #ifdef _0_
00222 static const char * month_names[12] =
00223 {
00224         "Jan", "Feb", "Mar", "Apr",
00225         "May", "Jun", "Jul", "Aug",
00226         "Sep", "Oct", "Nov", "Dec"
00227 };
00228 #endif
00229
00230 CPersistentInt gFileViewSort("P_FileViewSort", EntnodeData::kName);
00231 CPersistentBool gFileViewSortAsc("P_FileViewSortAsc", false);
00232 static struct CSortParam *gSortParam = NULL;
00233
00234 // context for traversing
00235 class KoTraversalContext
00236 {
00237     bool m_isRecursive;
00238     bool m_isShowIgnored;
00239     KiFilterModel* m_filter;
00240
00241 public:
00242     CBrowseFileView* m_view;
00243
00244     KoTraversalContext(CBrowseFileView* view)
00245         : m_isRecursive(false), m_isShowIgnored(false), m_filter(NULL), m_view(view)
00246     {
00247 #ifdef WIN32
00248         CWincvsApp* app = (CWincvsApp *)AfxGetApp()
00249 #elif qUnix
00250         UCvsApp* app = UCvsApp::gApp;
00251 #elif TARGET_RT_MAC_MACHO
00252         CMacCvsApp* app = CMacCvsApp::gApp;
00253 #endif
00254         if (app)
00255         {
00256             m_filter = app->GetFilterModel();
00257             m_isRecursive = app->GetRecursionModel()->IsShowRecursive();
00258             m_isShowIgnored = app->GetIgnoreModel()->IsShowIgnored();
00259         }
00260     }
00261
00262     bool IsRecursive() const
00263     {
00264         return m_isRecursive;
00265     }
00266
00267     bool IsShowIgnored() const
00268     {
00269         return m_isShowIgnored;
00270     }
00271
00272     bool IsMatch(EntnodeData* data) const
00273     {
00274         return m_filter->IsMatch(data);
00275     }
00276 };
00277
00278 #ifdef qUnix
00279 static guint lastKey = GDK_VoidSymbol;
00280 void ResetKeyState()
00281 {
00282     lastKey = GDK_VoidSymbol;
00283 }
00284
00285 short GetAsyncKeyState(unsigned int keyFlag)
00286 {
00287     short ret = (lastKey != GDK_VoidSymbol) && (lastKey == keyFlag);
00288
00289     return ret;
00290 }
00291 #endif
00292
00293 class TViewFill : public TraversalReport
00294 {
00295 public:
00296     CSortList<ENTNODE> /*&*/ m_entries;
00297
00298     NAMESPACE(std) vector<CStr> m_ignlist;
00299     const KoTraversalContext *m_context;
00300     bool m_isShowIgnored;
00301
00302     TViewFill(const KoTraversalContext* context) :
00303         m_entries(200, ENTNODE::Compare), m_context(context) {}
00304
00305     TViewFill(const KoTraversalContext* context, CSortList<ENTNODE> & entries) :
00306         m_entries(entries), m_context(context) {}
00307
00308
00309     virtual ~TViewFill() {}
00310
00311     UCvsFiles* GetView() const
00312     {
00313         return m_context->m_view;
00314     }
00315
00316     int GetListCtrl() const
00317     {
00318         return GetView()->GetWidID();
00319     }
00320
00321     bool IsRecursive() const
00322     {
00323         return m_context->IsRecursive();
00324     }
00325
00326     bool IsShowIgnored() const
00327     {
00328         return m_context->IsShowIgnored();
00329     }
00330
00331     // initializes and adds new item to list view
00332     int InitItem(EntnodeData *data, void* iImage, const char *tag = 0L)
00333     {
00334             KoColumnContext context(GetView()->GetPath());
00335             char buf[256];
00336             GetView()->GetColumnModel()->GetAt(0)->GetText(&context, data, buf, 256);
00337
00338             int rownum;
00339             UEventSendMessage(GetListCtrl(), EV_LIST_NEWROW, kUMainWidget, &rownum);
00340             UEventSendMessage(GetListCtrl(), EV_LIST_ROWSETDATA, UMAKEINT(kUMainWidget, rownum), data);
00341             ULIST_INSERT entry;
00342             entry.row = rownum;
00343             entry.col = 0;
00344             entry.title = buf;
00345             entry.icon = /*UCvsFiles::GetImageForEntry(data);*/iImage;
00346             UEventSendMessage(GetListCtrl(), EV_LIST_INSERT, kUMainWidget, &entry);
00347
00348             entry.icon = 0L;
00349
00350             if(rownum >= 0) {
00351                 data->Ref();
00352
00353 #if 0 /* TODO */
00354             lvi.state = data->IsLocked() ?
00355                 INDEXTOSTATEIMAGEMASK(2) : INDEXTOSTATEIMAGEMASK(1);
00356 #endif
00357             KiColumnModel* model = GetView()->GetColumnModel();
00358
00359             // set item text for additional columns
00360             int columnCount = model->GetCount();
00361             for(int j = 1; j < columnCount; j++)
00362             {
00363                 char buf[256];
00364                 model->GetAt(j)->GetText(&context, data, buf, 256);
00365
00366                 if(buf[0] != 0L)
00367                 {
00368                     entry.col = j;
00369                     entry.title = buf;
00370                     UEventSendMessage(GetListCtrl(), EV_LIST_INSERT, kUMainWidget, &entry);
00371                 }
00372             }
00373
00374             // set tag column to given special tag
00375             if(tag != 0L && tag[0] != '\0' && !IsRecursive()) {
00376                 entry.col = model->GetColumn(EntnodeFile::kTag);
00377                 entry.title = tag == 0L ? "" : (const char *)tag;
00378                 UEventSendMessage(GetListCtrl(), EV_LIST_INSERT, kUMainWidget, &entry);
00379             }
00380         }
00381
00382         return rownum;
00383     }
00384
00385     virtual kTraversal EnterDirectory(const char *fullpath, const char *dirname, const FSSpec * macspec)
00386     {
00387         Entries_Open (m_entries, fullpath);
00388         BuildIgnoredList(m_ignlist, fullpath);
00389
00390         return kContinueTraversal;
00391     }
00392
00393     virtual kTraversal ExitDirectory(const char *fullpath)
00394     {
00395         // add the missing files
00396         Entries_SetMissing(m_entries);
00397
00398         int numEntries = m_entries.NumOfElements();
00399         for(int i = 0; i < numEntries; i++)
00400         {
00401             const ENTNODE & theNode = m_entries.Get(i);
00402             EntnodeData *data = theNode.Data();
00403             if (data->IsMissing() && m_context->IsMatch(data))
00404             {
00405                 if (!IsRecursive() || data->GetType() == ENT_FILE)
00406                 {
00407                     InitItem(data, UCvsFiles::GetImageForEntry(data));
00408                 }
00409             }
00410         }
00411
00412         m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00413         return kContinueTraversal;
00414     }
00415
00416     virtual kTraversal OnError(const char *err, int errcode)
00417     {
00418         return kTraversalError;
00419     }
00420
00421     virtual kTraversal OnIdle(const char *fullpath)
00422     {
00423 #ifdef qUnix
00424         // Allow to stop traversing using the escape key
00425         bool escState = GetAsyncKeyState(GDK_Escape);
00426
00427         if( escState == TRUE)
00428         {
00429             return kStopTraversal;
00430         }
00431 #endif
00432
00433         return kContinueTraversal;
00434     }
00435
00436     virtual kTraversal OnDirectory(const char *fullpath,
00437         const char *fullname,
00438         const char *name,
00439         const struct stat & dir, const FSSpec * macspec)
00440     {
00441 #if qUnix
00442         if(strcmp(name, "CVS") == 0)
00443 #else
00444         if(stricmp(name, "CVS") == 0)
00445 #endif
00446             return kSkipFile;
00447
00448         EntnodeData *data = Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00449         if(!IsShowIgnored() && data->IsIgnored())
00450             return kSkipFile;
00451
00452         if (IsRecursive())
00453         {
00454             if (!data->IsIgnored() && !data->IsUnknown() && !data->IsMissing())
00455             {
00456                 TViewFill traverse(m_context);
00457                 FileTraverse(fullname, traverse);
00458             }
00459             return kSkipFile;
00460         }
00461
00462         // get the tag
00463         CStr subCVS;
00464         CStr tagName;
00465         subCVS = fullname;
00466         if(!subCVS.endsWith(kPathDelimiter))
00467             subCVS << kPathDelimiter;
00468         subCVS << "CVS";
00469         if(chdir(subCVS) == 0)
00470             Tag_Open(tagName, subCVS);
00471         if(chdir(fullpath) != 0)
00472             return kTraversalError;
00473
00474         InitItem(data, UCvsFiles::GetImageForEntry(data), tagName);
00475
00476         return kSkipFile;
00477     }
00478
00479     virtual kTraversal OnAlias(const char *fullpath,
00480         const char *fullname,
00481         const char *name,
00482         const struct stat & dir, const FSSpec * macspec)
00483     {
00484         return OnFile(fullpath, fullname, name, dir, macspec);
00485     }
00486
00487     virtual kTraversal OnFile(const char *fullpath,
00488         const char *fullname,
00489         const char *name,
00490         const struct stat & dir, const FSSpec * macspec)
00491     {
00492         EntnodeData *data = Entries_SetVisited(fullpath, m_entries, name, dir, false, &m_ignlist);
00493         if(!IsShowIgnored() && data->IsIgnored())
00494             return kContinueTraversal;
00495
00496         if( m_context->IsMatch(data) )
00497         {
00498             InitItem(data, UCvsFiles::GetImageForEntry(data));
00499         }
00500
00501         return kContinueTraversal;
00502     }
00503 };
00504
00505 #if qGTK
00506 extern "C"
00507 {
00508     static int gtkkeypress(GtkWidget *widget, GdkEventKey * event, gpointer user_data)
00509     {
00510         lastKey = event->keyval;
00511
00512         return FALSE;
00513     }
00514 }
00515 #endif
00516
00517 UCvsFiles::UCvsFiles() : UWidget(kUCvsFilesID), m_entries(200, ENTNODE::Compare), m_entriesMod(0), m_entriesLogMod(0)
00518
00519 {
00520     m_sort = (int)gFileViewSort;
00521     m_ascendant = (bool)gFileViewSortAsc;
00522
00523     SetRecursive(false);
00524 }
00525
00526 UCvsFiles::~UCvsFiles()
00527 {
00528     gFileViewSort = m_sort;
00529     gFileViewSortAsc = m_ascendant;
00530 }
00531
00532 int UCvsFiles::ProcessSelectionCommand(KiSelectionHandler& handler)
00533 {
00534   int nItem = -1;
00535
00536   MultiFiles mf;
00537   mf.newdir(GetPath());
00538   int pathLen = GetPath().length();
00539
00540   // first add the folders
00541   while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
00542   {
00543     EntnodeData *data;
00544     UStr buf;
00545
00546     UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
00547     const char* fullpath = data->GetFullPathName(buf);
00548
00549     if(data->GetType() == ENT_SUBDIR)
00550     {
00551         handler.OnFolder(fullpath);
00552     }
00553     else
00554     {
00555         const char* fn = data->GetFullPathName(buf) + pathLen;
00556         if(*fn == kPathDelimiter ) {
00557             fn++;
00558         }
00559
00560
00561         mf.newfile(fn, 0, (*data)[EntnodeFile::kVN]);
00562     }
00563   }
00564   if(mf.TotalNumFiles() != 0)
00565   {
00566     handler.OnFiles(&mf);
00567
00568     ResetView(handler.GetNeedViewReset(), false);
00569   }
00570
00571   return 0;
00572 }
00573
00574 void UCvsFiles::OnDestroy(void)
00575 {
00576     // unregister notifications
00577     if (UCvsApp* app = UCvsApp::gApp)
00578     {
00579         app->GetFilterModel()->GetNotificationManager()->CheckOut(this);
00580         app->GetRecursionModel()->GetNotificationManager()->CheckOut(this);
00581         app->GetIgnoreModel()->GetNotificationManager()->CheckOut(this);
00582     }
00583
00584     delete this;
00585 }
00586
00587 static void onFilteringChanged(CObject* obj)
00588 {
00589         ((UCvsFiles *)obj)->OnFilteringChanged();
00590 }
00591
00592 void UCvsFiles::OnCreate(void)
00593 {
00594     KoTraversalContext context(this);
00595     bool recursive;
00596
00597     if(sFileIconTextIcon == 0L)
00598     {
00599         sFileIconTextIcon = UCreate_pixmap(this, "cvsfile.xpm");
00600         sFileIconBinaryIcon = UCreate_pixmap(this, "binfile.xpm");
00601         sFileIconUnknownIcon = UCreate_pixmap(this, "unkfile.xpm");
00602         sFileIconAddedIcon = UCreate_pixmap(this, "addfile.xpm");
00603         sFileIconConflictIcon = UCreate_pixmap(this, "conflict.xpm");
00604         sFileIconMissIcon = UCreate_pixmap(this, "missfile.xpm");
00605         sFolderIconIcon = UCreate_pixmap(this, "folder.xpm");
00606         sFolderIconUnknownIcon = UCreate_pixmap(this, "foldunk.xpm");
00607         sFolderIconMissIcon = UCreate_pixmap(this, "foldmiss.xpm");
00608         sFileIconTextModIcon = UCreate_pixmap(this, "modfile.xpm");
00609         sFileIconBinaryModIcon = UCreate_pixmap(this, "modbin.xpm");
00610         sFileIconIgnoredIcon = UCreate_pixmap(this, "ignfile.xpm");
00611         sFolderIconIgnoredIcon = UCreate_pixmap(this, "foldign.xpm");
00612         sFileIconRemovedIcon = UCreate_pixmap(this, "delfile.xpm");
00613     }
00614
00615     UEventSendMessage(GetWidID(), EV_LIST_SETFEEDBACK, UMAKEINT(kUMainWidget, 0), 0L);
00616
00617     recursive = context.IsRecursive();
00618
00619     SetRecursive(!recursive);
00620     HideColumns();
00621
00622     SetRecursive(recursive);
00623     ShowColumns();
00624
00625     if( UCvsApp* app = UCvsApp::gApp ) {
00626         app->GetFilterModel()->GetNotificationManager()->CheckIn(this, onFilteringChanged);
00627         app->GetRecursionModel()->GetNotificationManager()->CheckIn(this, onFilteringChanged);
00628         app->GetIgnoreModel()->GetNotificationManager()->CheckIn(this, onFilteringChanged);
00629     }
00630     UEventSendMessage(GetWidID(), EV_LIST_SETFEEDBACK, UMAKEINT(kUMainWidget, 1), 0L);
00631 }
00632
00633 void UCvsFiles::ResetView(const char *path, bool notifyBrowser)
00634 {
00635     m_path = path;
00636     ResetView(true, false);
00637
00638     UStr title(UCvsApp::gApp->GetAppName());
00639     title << ": ";
00640     title << GetPath();
00641     UEventSendMessage(kUCvsFrameID, EV_SETTEXT, kUMainWidget, (void *)(const char *)title);
00642
00643     if(notifyBrowser)
00644     {
00645         // notify the tree
00646         UCvsApp::gApp->GetBrowserView()->StepToLocation(path);
00647     }
00648 }
00649
00650 void UCvsFiles::ResetView(UStr path, bool notifyBrowser)
00651 {
00652     ResetView(path.c_str(), notifyBrowser);
00653 }
00654
00655 void UCvsFiles::GetEntriesModTime(time_t & newEntriesMod, time_t & newEntriesLogMod)
00656 {
00657     newEntriesMod = 0;
00658     newEntriesLogMod = 0;
00659     if(chdir(GetPath()) != 0)
00660         return;
00661     if(chdir("CVS") != 0)
00662         return;
00663
00664     struct stat sb;
00665     if (stat("Entries", &sb) != -1)
00666         newEntriesMod = sb.st_mtime;
00667     if (stat("Entries.log", &sb) != -1)
00668         newEntriesLogMod = sb.st_mtime;
00669     chdir(GetPath());
00670 }
00671
00672 int UCvsFiles::Search(const char *title)
00673 {
00674     int row = -1;
00675     while((row = UEventSendMessage(GetWidID(), EV_LIST_GETNEXT,
00676                                      UMAKEINT(kUMainWidget, row), 0L)) != -1)
00677     {
00678         ULIST_INFO info;
00679         info.col = 0;
00680         info.row = row;
00681         UEventSendMessage(GetWidID(), EV_LIST_GETINFO, kUMainWidget, &info);
00682         if(info.title == 0L)
00683             continue;
00684
00685 #if qUnix
00686         if(strcmp(title, info.title) == 0)
00687 #else
00688         if(stricmp(title, info.title) == 0)
00689 #endif
00690             return row;
00691     }
00692
00693     return -1;
00694 }
00695
00696 void UCvsFiles::ResetView(bool forceReload, bool notifyBrowser)
00697 {
00698     UWaitCursor wait;
00699
00700     static bool sSemaphore = false;
00701     USemaphore policeman(sSemaphore);
00702     if(policeman.IsEnteredTwice())
00703         return;
00704
00705     // - check if we really need to reload (forceReload == false)
00706     // - wait a bit for the watcher in order to let him tell us
00707     // if something was modified.
00708     time_t newEntriesMod;
00709     time_t newEntriesLogMod;
00710     GetEntriesModTime(newEntriesMod, newEntriesLogMod);
00711     if(!forceReload)
00712     {
00713         if(m_entriesMod == newEntriesMod && m_entriesLogMod == newEntriesLogMod)
00714             return;
00715     }
00716
00717     // reset all the watchers
00718     m_entriesMod = newEntriesMod;
00719     m_entriesLogMod = newEntriesLogMod;
00720
00721     // get the selection to later try to restore it
00722     CvsArgs selection(false);
00723     int nItem = -1;
00724     UStr buf;
00725
00726     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL,
00727                                      UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
00728     {
00729         EntnodeData *data;
00730         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
00731         //selection.add((*data)[EntnodeData::kName]);
00732         selection.add(data->GetFullPathName(buf));
00733     }
00734
00735     UEventSendMessage(GetWidID(), EV_LIST_RESETALL, kUMainWidget, 0L);
00736
00737     UEventSendMessage(GetWidID(), EV_CHGFOCUS, kUMainWidget, 0L);
00738
00739 #if qGTK
00740     void *wid = GetWidget(kUMainWidget);
00741     guint sigHandler;
00742
00743     if(wid != 0L)
00744     {
00745         sigHandler = gtk_signal_connect (GTK_OBJECT (wid), "key_press_event",
00746                         GTK_SIGNAL_FUNC(gtkkeypress), (gpointer)this);
00747
00748         ResetKeyState();
00749     }
00750 #endif
00751
00752     // make sure columns are ok
00753     KoTraversalContext context(this);
00754
00755     if ((context.IsRecursive() && !m_isRecursive) || (!context.IsRecursive() && m_isRecursive))
00756     {
00757
00758         KiColumnModel* oldModel = GetColumnModel();
00759         int oldCount = oldModel->GetCount();
00760         const KiColumn* oldColumn = (0 <= m_sort && m_sort < oldCount) ? oldModel->GetAt(m_sort) : NULL;
00761         HideColumns();
00762
00763         SetRecursive(context.IsRecursive());
00764         ShowColumns();
00765
00766         if (oldColumn == NULL)
00767         {
00768                 m_sort = 0;
00769         }
00770         else
00771         {
00772             KiColumnModel* newModel = GetColumnModel();
00773             int newCount = newModel->GetCount();
00774             int sort = -1;
00775             for (int pos = 0; pos < newCount && sort == -1; pos++)
00776             {
00777                 if (newModel->GetAt(pos) == oldColumn)
00778                 {
00779                     sort = pos;
00780                 }
00781             }
00782             m_sort = (sort >= 0) ? sort : 0;
00783         }
00784     }
00785
00786     // refetch all items
00787     TViewFill traverse(/*this, */&context, m_entries);
00788     /*kTraversal res = */FileTraverse(GetPath(), traverse);
00789
00790     // add the missing files
00791     Entries_SetMissing(m_entries);
00792
00793     int numEntries = m_entries.NumOfElements();
00794     for(int i = 0; i < numEntries; i++)
00795     {
00796         const ENTNODE & theNode = m_entries.Get(i);
00797         EntnodeData *data = ((ENTNODE *)&theNode)->Data();
00798         if(!data->IsMissing())
00799             continue;
00800
00801         //TViewFill::
00802         traverse.InitItem(data, UCvsFiles::GetImageForEntry(data));
00803 #ifdef _0_
00804         int rownum;
00805         UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kUMainWidget, &rownum);
00806         UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kUMainWidget, rownum), data);
00807         ULIST_INSERT entry;
00808         entry.row = rownum;
00809
00810         entry.col = 0;
00811         entry.title = (*data)[EntnodeData::kName];
00812         entry.icon = UCvsFiles::GetImageForEntry(data);
00813         UEventSendMessage(GetWidID(), EV_LIST_INSERT, kUMainWidget, &entry);
00814
00815         entry.icon = 0L;
00816
00817         // set item text for additional columns
00818         for(int j = 1; j < m_modelColumns->GetCount(); j++)
00819         {
00820             const char *info = (*data)[j];
00821             if(info != 0L)
00822             {
00823                 entry.col = j;
00824                 entry.title = info;
00825                 UEventSendMessage(GetWidID(), EV_LIST_INSERT, kUMainWidget, &entry);
00826             }
00827         }
00828         entry.col = EntnodeData::kState;
00829         entry.title = data->GetDesc();
00830         UEventSendMessage(GetWidID(), EV_LIST_INSERT, kUMainWidget, &entry);
00831 #endif
00832     }
00833
00834     Resort();
00835
00836     // now restore the selection
00837     int argc = selection.Argc(), c;
00838     char * const *argv = selection.Argv();
00839     for(c = 0; c < argc; c++)
00840     {
00841         int row = Search(argv[c]);
00842         if(row != -1)
00843             UEventSendMessage(GetWidID(), EV_LIST_ADDSEL, UMAKEINT(kUMainWidget, row), 0L);
00844     }
00845
00846     if(notifyBrowser)
00847     {
00848         // notify the tree
00849         UCvsApp::gApp->GetBrowserView()->ResetView(forceReload);
00850     }
00851 #ifdef GTK
00852     if(wid != 0L)
00853     {
00854         gtk_signal_disconnect (GTK_OBJECT (wid), sigHandler);
00855     }
00856 #endif
00857
00858 }
00859
00860 void *UCvsFiles::GetImageForEntry(EntnodeData *data)
00861 {
00862     int result;
00863     void *resIcon = 0L;
00864
00865     if(data->GetType() == ENT_FILE)
00866     {
00867         const char *info = 0L;
00868         if(data->IsIgnored())
00869         {
00870             result = kFileIconIgnored;
00871         }
00872         else if(data->IsUnknown())
00873         {
00874             result = kFileIconUnknown;
00875         }
00876         else if(data->IsMissing())
00877         {
00878             result = data->IsRemoved() ? kFileIconRemoved : kFileIconMiss;
00879         }
00880         else if((*data)[EntnodeFile::kConflict] != 0L)
00881         {
00882             result = kFileIconConflict;
00883         }
00884         else if(data->IsRemoved())
00885         {
00886             result = kFileIconRemoved;
00887         }
00888         else if((info = (*data)[EntnodeFile::kOption]) != 0L && strcmp(info, "-kb") == 0)
00889         {
00890             result = data->IsUnmodified() ? kFileIconBinary : kFileIconBinaryMod;
00891         }
00892         else
00893         {
00894             result = data->IsUnmodified() ? kFileIconText : kFileIconTextMod;
00895         }
00896     }
00897     else
00898     {
00899         if(data->IsIgnored())
00900         {
00901             result = kFolderIconIgnored;
00902         }
00903         else if(data->IsUnknown())
00904         {
00905             result = kFolderIconUnknown;
00906         }
00907         else if(data->IsMissing())
00908         {
00909             result = kFolderIconMiss;
00910         }
00911         else
00912         {
00913             result = kFolderIcon;
00914         }
00915     }
00916
00917 #if qGTK
00918     void *pixmap = 0L;
00919     switch(result)
00920     {
00921     case kFileIconText:
00922         pixmap = sFileIconTextIcon;
00923         break;
00924     case kFileIconBinary:
00925         pixmap = sFileIconBinaryIcon;
00926         break;
00927     case kFileIconUnknown:
00928         pixmap = sFileIconUnknownIcon;
00929         break;
00930     case kFileIconAdded:
00931         pixmap = sFileIconAddedIcon;
00932         break;
00933     case kFileIconConflict:
00934         pixmap = sFileIconConflictIcon;
00935         break;
00936     case kFileIconMiss:
00937         pixmap = sFileIconMissIcon;
00938         break;
00939     case kFolderIcon:
00940         pixmap = sFolderIconIcon;
00941         break;
00942     case kFolderIconUnknown:
00943         pixmap = sFolderIconUnknownIcon;
00944         break;
00945     case kFolderIconMiss:
00946         pixmap = sFolderIconMissIcon;
00947         break;
00948     case kFileIconTextMod:
00949         pixmap = sFileIconTextModIcon;
00950         break;
00951     case kFileIconBinaryMod:
00952         pixmap = sFileIconBinaryModIcon;
00953         break;
00954     case kFileIconIgnored:
00955         pixmap = sFileIconIgnoredIcon;
00956         break;
00957     case kFolderIconIgnored:
00958         pixmap = sFolderIconIgnoredIcon;
00959         break;
00960     case kFileIconRemoved:
00961         pixmap = sFileIconRemovedIcon;
00962         break;
00963     }
00964     if(pixmap != 0L)
00965     {
00966         resIcon = gtk_pixmap_new (GTK_PIXMAP(pixmap)->pixmap, GTK_PIXMAP(pixmap)->mask);
00967     }
00968 #endif
00969
00970     return resIcon;
00971 }
00972
00973
00974 int UCvsFiles::OnCmdUpdate(void)
00975 {
00976   KoUpdateHandler handler;
00977
00978   return ProcessSelectionCommand(handler);
00979 }
00980
00981 bool UCvsFiles::DisableGeneric(bool needSelection)
00982 {
00983     return ((UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, -1), 0L) == -1) && needSelection) ||
00984         UCvsApp::gApp->IsCvsRunning() || gCvsPrefs.empty() || !HasFocus();
00985 }
00986
00987 bool UCvsFiles::DisableGeneric()
00988 {
00989     return DisableGeneric(true);
00990 }
00991
00992 void UCvsFiles::OnCmdUIUpdate(UCmdUI *pCmdUI)
00993 {
00994     if(DisableGeneric())
00995     {
00996         pCmdUI->Enable(false);
00997         return;
00998     }
00999
01000     int nItem = -1;
01001     bool res = true;
01002     int numFiles = 0;
01003     int numFolders = 0;
01004
01005     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01006     {
01007         EntnodeData *data;
01008         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01009
01010         if(data->IsUnknown())
01011         {
01012             res = false;
01013             break;
01014         }
01015         if(data->GetType() == ENT_FILE)
01016             numFiles++;
01017         else
01018             numFolders++;
01019
01020         if((numFiles != 0) && (numFolders != 0))
01021         {
01022             res = false;
01023             break;
01024         }
01025     }
01026
01027     pCmdUI->Enable(res);
01028 }
01029
01030 void UCvsFiles::OnCmdUIAdd(UCmdUI *pCmdUI)
01031 {
01032     if(DisableGeneric())
01033     {
01034         pCmdUI->Enable(false);
01035         return;
01036     }
01037
01038     int nItem = -1;
01039     bool res = true;
01040     int numFiles = 0;
01041     int numFolders = 0;
01042
01043     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01044     {
01045         EntnodeData *data;
01046         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01047
01048         if(!(data->IsUnknown() || (data->IsRemoved() && data->IsMissing())))
01049         {
01050             res = false;
01051             break;
01052         }
01053         if(data->GetType() == ENT_FILE)
01054         {
01055             numFiles++;
01056         }
01057         else
01058             numFolders++;
01059
01060         if((numFiles != 0) && (numFolders != 0))
01061         {
01062             res = false;
01063             break;
01064         }
01065     }
01066
01067     pCmdUI->Enable(res);
01068 }
01069
01070 void UCvsFiles::OnCmdUIAddB(UCmdUI *pCmdUI)
01071 {
01072     if(DisableGeneric())
01073     {
01074         pCmdUI->Enable(false);
01075         return;
01076     }
01077
01078     int nItem = -1;
01079     bool res = true;
01080
01081     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01082     {
01083         EntnodeData *data;
01084         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01085
01086         if(data->GetType() != ENT_FILE)
01087         {
01088             res = false;
01089             break;
01090         }
01091         if(!(data->IsUnknown() || (data->IsRemoved() && data->IsMissing())))
01092         {
01093             res = false;
01094             break;
01095         }
01096     }
01097
01098     pCmdUI->Enable(res);
01099 }
01100
01101 void UCvsFiles::OnCmdUIRelease(UCmdUI *pCmdUI)
01102 {
01103     if(DisableGeneric())
01104     {
01105         pCmdUI->Enable(false);
01106         return;
01107     }
01108
01109     int nItem = -1;
01110     bool res = true;
01111     int numFolders = 0;
01112
01113     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01114     {
01115         EntnodeData *data;
01116         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01117
01118         if(data->IsUnknown() || data->GetType() != ENT_SUBDIR)
01119         {
01120             res = false;
01121             break;
01122         }
01123         numFolders++;
01124
01125         if(numFolders > 1)
01126         {
01127             res = false;
01128             break;
01129         }
01130     }
01131
01132     pCmdUI->Enable(res);
01133 }
01134
01135 void UCvsFiles::OnCmdUIRmv(UCmdUI *pCmdUI)
01136 {
01137     if(DisableGeneric())
01138     {
01139         pCmdUI->Enable(false);
01140         return;
01141     }
01142
01143     int nItem = -1;
01144     bool res = true;
01145
01146     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01147     {
01148         EntnodeData *data;
01149         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01150
01151         if(data->IsUnknown() || data->IsRemoved() || data->GetType() == ENT_SUBDIR)
01152         {
01153             res = false;
01154             break;
01155         }
01156     }
01157
01158     pCmdUI->Enable(res);
01159 }
01160
01161 void UCvsFiles::OnCmdUIGraph(UCmdUI *pCmdUI)
01162 {
01163     if(DisableGeneric())
01164     {
01165         pCmdUI->Enable(false);
01166         return;
01167     }
01168
01169     int nItem = -1;
01170     bool res = true;
01171
01172     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01173     {
01174         EntnodeData *data;
01175         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01176
01177         if(data->IsUnknown() || data->GetType() == ENT_SUBDIR)
01178         {
01179             res = false;
01180             break;
01181         }
01182     }
01183
01184     pCmdUI->Enable(res);
01185 }
01186
01187 void UCvsFiles::OnCmdUIEditseldef(UCmdUI *pCmdUI)
01188 {
01189     if(DisableGeneric())
01190     {
01191         pCmdUI->Enable(false);
01192         return;
01193     }
01194
01195     int nItem = -1;
01196     bool res = true;
01197
01198     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01199     {
01200         EntnodeData *data;
01201         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01202
01203         if(data->GetType() == ENT_SUBDIR || data->IsMissing())
01204         {
01205             res = false;
01206             break;
01207         }
01208     }
01209
01210     pCmdUI->Enable(res);
01211     if(gCvsPrefs.Viewer() != 0L)
01212     {
01213         CStr title(_i18n("Edit with "));
01214         title << gCvsPrefs.Viewer();
01215         pCmdUI->SetText(title);
01216     }
01217 }
01218
01219 void UCvsFiles::OnCmdUIUpone(UCmdUI *pCmdUI)
01220 {
01221     pCmdUI->Enable(!DisableGeneric());
01222 }
01223
01224 void UCvsFiles::OnCmdUITrash(UCmdUI *pCmdUI)
01225 {
01226     if(DisableGeneric())
01227     {
01228         pCmdUI->Enable(false);
01229         return;
01230     }
01231
01232     int nItem = -1;
01233     bool res = true;
01234
01235     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01236     {
01237         EntnodeData *data;
01238         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01239         if(data->GetType() == ENT_SUBDIR || data->IsMissing())
01240         {
01241             res = false;
01242             break;
01243         }
01244     }
01245
01246     pCmdUI->Enable(res);
01247 }
01248
01249 void UCvsFiles::OnCmdUIExplore(UCmdUI *pCmdUI)
01250 {
01251     if(DisableGeneric())
01252     {
01253         pCmdUI->Enable(false);
01254         return;
01255     }
01256
01257     int nItem = -1;
01258     bool res = true;
01259     int numItem = 0;
01260
01261     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01262     {
01263         EntnodeData *data;
01264         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01265
01266         if(data->IsMissing() || ++numItem > 1)
01267         {
01268             res = false;
01269             break;
01270         }
01271     }
01272
01273     pCmdUI->Enable(res);
01274 }
01275
01276 void UCvsFiles::OnCmdUIViewRecursive(UCmdUI *pCmdUI)
01277 {
01278     KoRecursionModel *m_recursion = (KoRecursionModel *)UCvsApp::gApp->GetRecursionModel();
01279     pCmdUI->Enable(!UCvsApp::gApp->IsCvsRunning());
01280     pCmdUI->Check(m_recursion->IsShowRecursive());
01281 }
01282
01283 void UCvsFiles::OnCmdUIMacroSel(int cmd, UCmdUI *pCmdUI)
01284 {
01285     if(DisableGeneric())
01286     {
01287         pCmdUI->Enable(false);
01288         return;
01289     }
01290
01291 #ifdef USE_PYTHON
01292     if( !PyIsUICacheValid() )
01293     {
01294         int nItem = -1;
01295         while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01296         {
01297             fprintf(stderr, "%d\n", nItem);
01298             EntnodeData *data;
01299             UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01300             PyAppendCache(data);
01301         }
01302     }
01303
01304     UCmdUI ucmdui((pCmdUI->m_nID));
01305     ucmdui.pCmdUI = pCmdUI;
01306     PyDoCmdUI(&ucmdui);
01307 #else
01308     int nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, -1), 0L);
01309     pCmdUI->Enable(nItem != -1 && CTcl_Interp::IsAvail());
01310 #endif
01311 }
01312
01313 int UCvsFiles::OnCmdAdd(void)
01314 {
01315   KoAddHandler handler;
01316
01317   return ProcessSelectionCommand(handler);
01318 }
01319
01320 int UCvsFiles::OnViewRecursive(void)
01321 {
01322     KoRecursionModel *m_recursion = (KoRecursionModel *)UCvsApp::gApp->GetRecursionModel();
01323     m_recursion->ToggleRecursion();
01324     ResetView(true, true);
01325
01326     UCvsApp::gApp->GetMainFrame()->OnFilterMaskEntered();
01327
01328     return 0;
01329 }
01330
01331 int UCvsFiles::OnCmdAddb(void)
01332 {
01333   KoAddBinaryHandler handler;
01334
01335   return ProcessSelectionCommand(handler);
01336 }
01337
01338 int UCvsFiles::OnCmdCommit(void)
01339 {
01340   KoCommitHandler handler;
01341   return ProcessSelectionCommand(handler);
01342 }
01343
01344 int UCvsFiles::OnCmdRmv(void)
01345 {
01346   KoFileRemoveHandler handler;
01347
01348   return ProcessSelectionCommand(handler);
01349 }
01350
01351 int UCvsFiles::OnCmdQueryUpdate(void)
01352 {
01353   KoQueryUpdateHandler handler;
01354
01355   return ProcessSelectionCommand(handler);
01356 }
01357
01358 int UCvsFiles::OnCmdUpone(void)
01359 {
01360     UStr uppath, filename;
01361     SplitPath(GetPath(), uppath, filename);
01362     ResetView( /*(const char*)*/uppath, true);
01363     return 0;
01364 }
01365
01366 int UCvsFiles::OnCmdTrash(void)
01367 {
01368   KoMoveToTrashHandler handler;
01369
01370   return ProcessSelectionCommand(handler);
01371 }
01372
01373 int UCvsFiles::OnCmdDiff(void)
01374 {
01375   KoDiffHandler handler;
01376
01377   return ProcessSelectionCommand(handler);
01378 }
01379
01380 int UCvsFiles::OnCmdLog(void)
01381 {
01382   KoLogHandler handler;
01383
01384   return ProcessSelectionCommand(handler);
01385 }
01386
01387 int UCvsFiles::OnCmdGraph(void)
01388 {
01389   KoGraphHandler handler;
01390
01391   return ProcessSelectionCommand(handler);
01392 }
01393
01394 int UCvsFiles::OnCmdStatus(void)
01395 {
01396   KoStatusHandler handler;
01397
01398   return ProcessSelectionCommand(handler);
01399 }
01400
01401 int UCvsFiles::OnCmdLock(void)
01402 {
01403   KoLockHandler handler;
01404
01405   return ProcessSelectionCommand(handler);
01406 }
01407
01408 int UCvsFiles::OnCmdUnlock(void)
01409 {
01410   KoUnlockHandler handler;
01411
01412   return ProcessSelectionCommand(handler);
01413 }
01414
01415 int UCvsFiles::OnCmdWatchOn(void)
01416 {
01417   KoWatchOnHandler handler;
01418
01419   return ProcessSelectionCommand(handler);
01420 }
01421
01422 int UCvsFiles::OnCmdWatchOff(void)
01423 {
01424   KoWatchOnHandler handler;
01425
01426   return ProcessSelectionCommand(handler);
01427 }
01428
01429 int UCvsFiles::OnCmdEdit(void)
01430 {
01431   KoEditHandler handler;
01432
01433   return ProcessSelectionCommand(handler);
01434 }
01435
01436 void UCvsFiles::OnCmdUIResEdit(UCmdUI *pCmdUI)
01437 {
01438   if(gCvsPrefs.CvsVersion() == 1)
01439     OnCmdUIUpdate(pCmdUI);
01440 }
01441
01442 int UCvsFiles::OnCmdResEdit(void)
01443 {
01444   KoReservedEditHandler handler;
01445
01446   return ProcessSelectionCommand(handler);
01447 }
01448
01449 int UCvsFiles::OnCmdUnedit(void)
01450 {
01451   KoUneditHandler handler;
01452
01453   return ProcessSelectionCommand(handler);
01454 }
01455
01456 int UCvsFiles::OnCmdWatchers(void)
01457 {
01458   KoWatchersHandler handler;
01459
01460   return ProcessSelectionCommand(handler);
01461 }
01462
01463 int UCvsFiles::OnCmdEditors(void)
01464 {
01465   KoEditorsHandler handler;
01466
01467   return ProcessSelectionCommand(handler);
01468 }
01469
01470 int UCvsFiles::OnCmdRelease(void)
01471 {
01472   KoReleaseHandler handler;
01473
01474   return ProcessSelectionCommand(handler);
01475 }
01476
01477
01478 int UCvsFiles::OnCmdTagNew(void)
01479 {
01480   KoCreateTagHandler handler;
01481
01482   return ProcessSelectionCommand(handler);
01483 }
01484
01485 int UCvsFiles::OnCmdTagDelete(void)
01486 {
01487   KoDeleteTagHandler handler;
01488
01489   return ProcessSelectionCommand(handler);
01490 }
01491
01492 int UCvsFiles::OnCmdTagBranch(void)
01493 {
01494   KoBranchTagHandler handler;
01495
01496   return ProcessSelectionCommand(handler);
01497 }
01498
01499
01500 int UCvsFiles::OnCmdExplore(void)
01501 {
01502     const char* fullpath = GetPath();
01503
01504     int nItem = -1;
01505
01506     // first add the folders
01507     if((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01508     {
01509         EntnodeData *data;
01510         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01511
01512         UStr buf;
01513         fullpath = data->GetFullPathName(buf);
01514
01515 #ifdef WIN32
01516         HINSTANCE hInst = ShellExecute(*AfxGetMainWnd(), "explore", fullpath,
01517                                        0L, 0L, SW_SHOWDEFAULT);
01518         if((long)hInst < 32)
01519         {
01520             cvs_err(_i18n("Unable to explore '%s' (error %d)\n", (char *)GetPath(), GetLastError());
01521         }
01522 #endif
01523 #ifdef qUnix
01524         CvsArgs args(false);
01525         args.add(gCvsPrefs.Browser());
01526         args.add(fullpath);
01527         UCvsApp::gApp->Execute(args.Argc(), args.Argv());
01528 #endif
01529     }
01530     return 0;
01531 }
01532
01533 int UCvsFiles::OnCmdEditsel(void)
01534 {
01535     int nItem = -1;
01536
01537     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01538     {
01539         EntnodeData *data;
01540         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01541         EditSel(data);
01542     }
01543     return 0;
01544 }
01545
01546 int UCvsFiles::OnCmdEditseldef(void)
01547 {
01548     int nItem = -1;
01549
01550     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01551     {
01552         EntnodeData *data;
01553         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01554         EditSel(data, true);
01555     }
01556     return 0;
01557 }
01558
01559 int UCvsFiles::OnMacroSel(int cmd)
01560 {
01561
01562 #ifdef USE_PYTHON
01563     PyDoPython(cmd);
01564 #else
01565     CTcl_Interp interp;
01566     CMacroEntry & entry = gMacrosSel.entries[cmd - cmdSELMACRO];
01567     CStr path = entry.path;
01568     CTcl_Interp::Unixfy(path);
01569
01570     TclBrowserReset();
01571
01572     int nItem = -1;
01573     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01574     {
01575         EntnodeData *data;
01576         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01577         TclBrowserAppend(GetPath(), data);
01578     }
01579
01580     interp.DoScriptVar("source \"%s\"", (const char *)path);
01581 #endif
01582     ResetView(true, true);
01583
01584     return 0;
01585 }
01586
01587 void UCvsFiles::EditSel(EntnodeData *data, bool useDefault)
01588 {
01589     UStr buf;
01590     CStr fullpath = data->GetFullPathName(buf);
01591
01592     if(data->GetType() == ENT_SUBDIR)
01593     {
01594         ResetView( /*(const char*)*/fullpath, true);
01595     }
01596     else
01597     {
01598 #ifdef WIN32
01599         // This replaces huge chunk of code for now, even thought it's not ever called
01600         LaunchViewer((*data)[EntnodeData::kName]);
01601 #endif
01602 #ifdef qUnix
01603         CStr fullpath = data->GetFullPathName(buf);
01604
01605         CvsArgs args(false);
01606         args.add(gCvsPrefs.Viewer());
01607         args.add(fullpath);
01608         UCvsApp::gApp->Execute(args.Argc(), args.Argv());
01609 #endif
01610     }
01611 }
01612
01613 void UCvsFiles::OnDblClick(void)
01614 {
01615     int nItem = -1;
01616
01617     while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
01618     {
01619         EntnodeData *data;
01620         UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
01621         EditSel(data);
01622     }
01623 }
01624
01625 void UCvsFiles::OnPopup(void)
01626 {
01627     fprintf(stderr, "UCvsFiles: Popup called\n");
01628 }
01629
01630 #ifdef _0_
01631 static int compareName(UWidget *wid, void *data1, void *data2)
01632 {
01633     UCvsFiles *w = (UCvsFiles *)wid;
01634     EntnodeData *d1 = (EntnodeData *)data1;
01635     EntnodeData *d2 = (EntnodeData *)data2;
01636     int res = stricmp((*d1)[EntnodeData::kName], (*d2)[EntnodeData::kName]);
01637     return w->IsSortAscendant() ? res : -res;
01638 }
01639
01640 static int compareStatus(UWidget *wid, void *data1, void *data2)
01641 {
01642     UCvsFiles *w = (UCvsFiles *)wid;
01643     EntnodeData *d1 = (EntnodeData *)data1;
01644     EntnodeData *d2 = (EntnodeData *)data2;
01645     int res = stricmp((*d1)[EntnodeData::kState], (*d2)[EntnodeData::kState]);
01646     if(res == 0)
01647         res = stricmp((*d1)[EntnodeData::kName], (*d2)[EntnodeData::kName]);
01648     return w->IsSortAscendant() ? res : -res;
01649 }
01650
01651 static int compareOption(UWidget *wid, void *data1, void *data2)
01652 {
01653     UCvsFiles *w = (UCvsFiles *)wid;
01654     EntnodeData *d1 = (EntnodeData *)data1;
01655     EntnodeData *d2 = (EntnodeData *)data2;
01656     const char *s1 = (*d1)[EntnodeFile::kOption];
01657     const char *s2 = (*d2)[EntnodeFile::kOption];
01658     int res;
01659     if(s1 != 0L && s2 != 0L)
01660         res = strcmp(s1, s2);
01661     else
01662         res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
01663     if(res == 0)
01664         res = stricmp((*d1)[EntnodeData::kName], (*d2)[EntnodeData::kName]);
01665     return w->IsSortAscendant() ? res : -res;
01666 }
01667
01668 static int revcmp(const char *rev1, const char *rev2)
01669 {
01670     if(rev1 == 0L && rev2 == 0L)
01671         return 0;
01672     else if(rev1 == 0L || rev2 == 0L)
01673         return rev1 == 0L ? -1 : 1;
01674
01675     CStr r1(rev1), r2(rev2);
01676     CStr q1, q2;
01677     char *tmp;
01678     int v1, v2;
01679
01680     if((tmp = strchr(r1, '.')) != 0L)
01681     {
01682         tmp[0] = '\0';
01683         q1 = tmp + 1;
01684     }
01685
01686     v1 = atoi(r1);
01687
01688     if((tmp = strchr(r2, '.')) != 0L)
01689     {
01690         tmp[0] = '\0';
01691         q2 = tmp + 1;
01692     }
01693     v2 = atoi(r2);
01694
01695     if(v1 == v2)
01696         return revcmp(q1.empty() ? (char *)0L : (const char *)q1, q2.empty() ? (char *)0L : (const char *)q2);
01697
01698     return v1 < v2 ? -1 : 1;
01699 }
01700
01701 static int compareRevs(UWidget *wid, void * data1, void * data2)
01702 {
01703     UCvsFiles *w = (UCvsFiles *)wid;
01704     EntnodeData *d1 = (EntnodeData *)data1;
01705     EntnodeData *d2 = (EntnodeData *)data2;
01706     const char *s1 = (*d1)[EntnodeFile::kVN];
01707     const char *s2 = (*d2)[EntnodeFile::kVN];
01708     int res;
01709     if(s1 != 0L && s2 != 0L)
01710         res = revcmp(s1, s2);
01711     else
01712         res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
01713     if(res == 0)
01714         res = stricmp((*d1)[EntnodeData::kName], (*d2)[EntnodeData::kName]);
01715     return w->IsSortAscendant() ? res : -res;
01716 }
01717
01718 static int compareTag(UWidget *wid, void * data1, void * data2)
01719 {
01720     UCvsFiles *w = (UCvsFiles *)wid;
01721     EntnodeData *d1 = (EntnodeData *)data1;
01722     EntnodeData *d2 = (EntnodeData *)data2;
01723     const char *s1 = (*d1)[EntnodeFile::kTag];
01724     const char *s2 = (*d2)[EntnodeFile::kTag];
01725     int res;
01726     if(s1 != 0L && s2 != 0L)
01727         res = strcmp(s1, s2);
01728     else
01729         res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
01730     if(res == 0)
01731         res = stricmp((*d1)[EntnodeData::kName], (*d2)[EntnodeData::kName]);
01732     return w->IsSortAscendant() ? res : -res;
01733 }
01734
01735 static int compareConflict(UWidget *wid, void * data1, void * data2)
01736 {
01737     UCvsFiles *w = (UCvsFiles *)wid;
01738     EntnodeData *d1 = (EntnodeData *)data1;
01739     EntnodeData *d2 = (EntnodeData *)data2;
01740     const char *s1 = (*d1)[EntnodeFile::kConflict];
01741     const char *s2 = (*d2)[EntnodeFile::kConflict];
01742     int res;
01743     if(s1 != 0L && s2 != 0L)
01744         res = strcmp(s1, s2);
01745     else
01746         res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
01747     if(res == 0)
01748         res = stricmp((*d1)[EntnodeData::kName], (*d2)[EntnodeData::kName]);
01749     return w->IsSortAscendant() ? res : -res;
01750 }
01751
01752 static int compareTimestamp(UWidget *wid, void *data1, void *data2)
01753 {
01754     UCvsFiles *w = (UCvsFiles *)wid;
01755     EntnodeData *d1 = (EntnodeData *)data1;
01756     EntnodeData *d2 = (EntnodeData *)data2;
01757
01758     const char *s1 = (*d1)[EntnodeFile::kTS];
01759     const char *s2 = (*d2)[EntnodeFile::kTS];
01760
01761     int res;
01762
01763     if(s1 != 0L && s2 != 0L ) {
01764         UStr str[2] = {s1, s2};
01765
01766         UStr t[2];
01767
01768         for(int i=0; i < 2; i++) {
01769             // put the year in front of the date string
01770             t[i] = str[i].substr(str[i].rfind(' ')+1, 4);
01771             t[i] += " ";
01772
01773             // convert month name to month number
01774             for(int j=0; j < 12; j++) {
01775                 if( !(strcmp(str[i].substr(4,3), month_names[j]) ) ) {
01776                     if(j<9)
01777                         t[i] += "0";
01778
01779                     t[i] += j+1;
01780
01781                     break;
01782                 }
01783             }
01784
01785             t[i] += " ";
01786             // paste day and time to time string
01787             t[i] += str[i].substr(8, str[i].rfind(' ')-4);
01788         }
01789
01790         res = t[0].compare(t[1]);
01791
01792 #ifdef DEBUG
01793         fprintf(stderr, "%s %c %s\n", t[0].c_str(), (res==1?'<':'>') , t[1].c_str());
01794 #endif
01795
01796     } else {
01797         res = s1 < s2 ? -1 : (s1 > s2 ? 1 : 0);
01798     }
01799
01800     if(res == 0)
01801         res = stricmp((*d1)[EntnodeData::kName], (*d2)[EntnodeData::kName]);
01802
01803     return w->IsSortAscendant() ? res : -res;
01804 }
01805 #endif
01806
01807 static int gtkCompareWrap(UWidget *wid, void *data1, void *data2)
01808 {
01809     return _Compare(data1, data2, gSortParam);
01810 }
01811
01812 void UCvsFiles::Resort(void)
01813 {
01814     KiColumnModel* model = GetColumnModel();
01815     KoColumnContext context(GetPath());
01816     gSortParam = new CSortParam (m_ascendant, true, model->GetAt(m_sort), model->GetAt(EntnodeData::kName), &context);
01817
01818     UEventSendMessage(GetWidID(), EV_LIST_RESORT, UMAKEINT(kUMainWidget, m_sort), (void *)gtkCompareWrap);
01819     UEventSendMessage(GetWidID(), EV_LIST_SETSORTDIR, UMAKEINT(kUMainWidget, m_sort), (void *)m_ascendant);
01820 }
01821
01822 void UCvsFiles::OnSelColumn(int column)
01823 {
01824     if(column == m_sort)
01825         m_ascendant = !m_ascendant;
01826     else
01827     {
01828         m_ascendant = true;
01829         switch(column)
01830         {
01831         case EntnodeData::kName:
01832         case EntnodeData::kState:
01833         case EntnodeFile::kEncoding:
01834         case EntnodeFile::kExt:
01835         case EntnodeFile::kOption:
01836         case EntnodeFile::kTag:
01837         case EntnodeFile::kConflict:
01838         case EntnodeFile::kTS:
01839         case EntnodeFile::kVN:
01840             m_sort = column;
01841             break;
01842         }
01843     }
01844
01845     Resort();
01846 }
01847
01848 void UCvsFiles::SetRecursive(bool isRecursive)
01849 {
01850     m_isRecursive = isRecursive;
01851     m_modelColumns = (m_isRecursive) ? KiColumnModel::GetRecursiveModel() : KiColumnModel::GetRegularModel();
01852 }
01853
01854 void UCvsFiles::ShowColumns(void)
01855 {
01856     KiColumnModel* model = GetColumnModel();
01857     int columnCount = model->GetCount();
01858
01859     UEventSendMessage(GetWidID(), EV_LIST_SHOWCOLUMNS, UMAKEINT(kUMainWidget, columnCount), 0L);
01860
01861     for(int i = 0; i<columnCount; i++)
01862     {
01863         LV_COLUMN lv;
01864
01865         m_modelColumns->GetAt(i)->GetSetupData(&lv);
01866         UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kUMainWidget, i), (char*)lv.name);
01867         UEventSendMessage(GetWidID(), EV_LIST_SETCOLWIDTH, UMAKEINT(kUMainWidget, i), (void *)lv.width);
01868     }
01869 }
01870
01871 void UCvsFiles::HideColumns(void)
01872 {
01873     KiColumnModel* model = GetColumnModel();
01874     int columnCount = model->GetCount();
01875
01876     UEventSendMessage(GetWidID(), EV_LIST_HIDECOLUMNS, UMAKEINT(kUMainWidget, columnCount), 0L);
01877 }
01878
01879 void UCvsFiles::OnFilteringChanged()
01880 {
01881     ResetView(true, false);
01882 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

_afxRichEditCookie Member List

This is the complete list of members for _afxRichEditCookie, including all inherited members.

_afxRichEditCookie(CArchive &ar) | _afxRichEditCookie | [inline]
m_ar | _afxRichEditCookie |
m_dwError | _afxRichEditCookie |

Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoRevisionColumn Member List

This is the complete list of members for KoRevisionColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoRevisionColumn | [inline, virtual]
CompareRevisions(const char *rev1, const char *rev2) | KoRevisionColumn | [inline, private, static]
GetColumnIndex() const | KoRevisionColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoRevisionColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoRevisionColumn | [inline, virtual]
IsDefaultAscending() const | KiColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJShellTree.h Source File

WinCvs/CJLib/Include/CJShellTree.h

Go to the documentation of this file.
00001 // CJShellTree.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based upon the MFCENUM example. MFCENUM is a companion sample application
00006 // for Chapter 14 in "Programming the Windows 95 User Interface" by Nancy Cluts,
00007 // available in the Microsoft(R) Development Library.
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/Include/CJShellTree.h $
00015  *
00016  * $History: CJShellTree.h $
00017  *
00018  * *****************  Version 10  *****************
00019  * User: Kirk Stowell Date: 10/30/99   Time: 2:19p
00020  * Updated in $/CodeJock/Include
00021  * Changed base class from CTreeCtrl to CCJTreeCtrl for flicker free
00022  * drawing.
00023  *
00024  * *****************  Version 9  *****************
00025  * User: Kirk Stowell Date: 10/26/99   Time: 10:47p
00026  * Updated in $/CodeJock/Include
00027  * Made class methods virtual for inheritance purposes.
00028  *
00029  * *****************  Version 8  *****************
00030  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00031  * Updated in $/CodeJockey/Include
00032  * Updated copyright and contact information.
00033  *
00034  * *****************  Version 7  *****************
00035  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00036  * Updated in $/CodeJockey/Include
00037  *
00038  * *****************  Version 6  *****************
00039  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00040  * Updated in $/CodeJockey/Include
00041  *
00042  * *****************  Version 5  *****************
00043  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00044  * Updated in $/CodeJockey/Include
00045  * Cleaned up inline functions, and import/export macro so that class will
00046  * be imported when linked to, and exported at compile time.
00047  *
00048  * *****************  Version 4  *****************
00049  * User: Kirk Stowell Date: 6/11/99    Time: 10:14p
00050  * Updated in $/CodeJockey/Include
00051  * Cleaned up system image list initialization.
00052  *
00053  * *****************  Version 3  *****************
00054  * User: Kirk Stowell Date: 5/02/99    Time: 3:38p
00055  * Updated in $/CodeJockey/Include
00056  * Added version macro  _WIN32_IE, you will need to have at IE4 or greater
00057  * installed to use this class. This will ensure that the version of
00058  * SHELL32.DLL is compatible.
00059  *
00060  * *****************  Version 2  *****************
00061  * User: Kirk Stowell Date: 3/19/99    Time: 11:05p
00062  * Updated in $/CodeJockey/Include
00063  * Initial re-write and release.
00064  *
00065  * *****************  Version 1  *****************
00066  * User: Kirk Stowell Date: 2/24/99    Time: 11:05p
00067  * Created in $/CodeJockey/Include
00068  * Overloaded PopulateTree(LPCTSTR lpszPath) in the class CCJShellTree to
00069  * fill the tree based upon path. Takehiko Mizoguti
00070  * [mizoguti@m2.sys.to.casio.co.jp]
00071  *
00072  ***************************************************************************/
00074
00075 #ifndef __CJSHELLTREE_H__
00076 #define __CJSHELLTREE_H__
00077
00078 #if _WIN32_IE >= 0x0400 // Need to have at IE4 or greater installed.
00079
00080 #if _MSC_VER > 1000
00081 #pragma once
00082 #endif // _MSC_VER > 1000
00083
00084 #include "CJShell.h"
00085 #include "CJTreeCtrl.h"
00086
00087 // class forwards
00088 class CCJShellList;
00089
00090 // CCJShellTree is a CCJTreeCtrl derived class which is used to display
00091 // system files and folders, typically associated with a CCJShellList object
00092 class _CJX_EXT_CLASS CCJShellTree : public CCJTreeCtrl
00093 {
00094     DECLARE_DYNAMIC(CCJShellTree)
00095
00096 public:
00097
00098     // Default constructor
00099     //
00100     CCJShellTree();
00101
00102     // Virtual destructor
00103     //
00104     virtual ~CCJShellTree();
00105
00106 public:
00107
00108     CCJShell        m_shell;        // used for shell operations
00109     CCJShellList*   m_pListCtrl;    // CCJShellList that is associated with this control
00110     CComboBox*      m_pComboBox;    // CComboBox that is associated with this control see AssociateCombo(...)
00111     bool            m_bRefresh;     // true when the control is to be refreshed
00112     bool            m_bOutaHere;    // true when the control is destroyed
00113     HTREEITEM       m_htiCurrent;   // currently selected tree item
00114
00115     // enumeration that holds the type of object folder or drive
00116     //
00117     enum FindAttribs { type_drive, type_folder };
00118
00119 public:
00120
00121     // this member function obtains a handle to the system image
00122     // list and attaches it to the tree control. DO NOT DELETE the imagelist
00123     //
00124     virtual BOOL InitSystemImageLists();
00125
00126     // this member function fills a branch of the TreeView control. Given the
00127     // shell folder, enumerate the subitems of this folder,
00128     // and add the appropriate items to the tree.
00129     //
00130     // This function enumerates the items in the folder identifed by lpsf.
00131     // Note that since we are filling the left hand pane, we will only add
00132     // items that are folders and/or have sub-folders.  We *could* put all
00133     // items in here if we wanted, but that's not the intent.
00134     //
00135     virtual void FillTreeView(
00136         // pointer to shell folder that we want to enumerate items
00137         LPSHELLFOLDER lpsf,
00138         // fully qualified item id list to the item that we are enumerating
00139         // items for.  In other words, this is the PIDL to the item
00140         // identified by the lpsf parameter.
00141         LPITEMIDLIST lpifq,
00142         // parent node
00143         HTREEITEM hParent);
00144
00145     // this member function processes the File.Fill/RefreshTree command
00146     //
00147     virtual void OnFill(
00148         // true when refreshing tree
00149         bool bRefresh=false);
00150
00151     // this member function populates tree based upon path. this method was
00152     // written by Takehiko Mizoguti [mizoguti@m2.sys.to.casio.co.jp]
00153     //
00154     virtual void PopulateTree(
00155         // path to populate
00156         LPCTSTR lpszPath);
00157
00158     // this member function will "tunnel" the tree to find the specified path.
00159     // this will only work when the OnFill(...) method is used to populate the tree
00160     // written by Selom Ofori [sofori@chat.carleton.ca]
00161     //
00162     virtual void TunnelTree(
00163         // path to find
00164         CString szFindPath);
00165
00166     // this member function is used to associate a CComboBox object with the
00167     // control. whenever the path changes, the combo is updated.
00168     //
00169     virtual void AssociateCombo(
00170         // combo box to associate
00171         CComboBox *pComboBox);
00172
00173     // this member function is used to associate a CCJShellList object with the
00174     // control. whenever the path changes, the list is updated.
00175     //
00176     virtual void AssociateList(
00177         // list control to associate
00178         CCJShellList *pListCtrl);
00179
00180     // this member function retrieves the path of a folder item, does not have
00181     // to be selected. Pass a CString object that will hold the folder path.
00182     // If the path is not in the filesystem(eg MyComputer)
00183     // or none is selected it returns FALSE.
00184     //
00185     virtual BOOL GetFolderItemPath(
00186         // tree item to get path for
00187         HTREEITEM hItem,
00188         // reference to a CString object to contain folder path
00189         CString &strFolderPath);
00190
00191     // this member function retrieves the path of a folder item, does not have
00192     // to be selected. Pass a CString object that will hold the folder path.
00193     // If the path is not in the filesystem(eg MyComputer)
00194     // or none is selected it returns FALSE.
00195     // written by Selom Ofori [sofori@chat.carleton.ca]
00196     //
00197     virtual BOOL GetSelectedFolderPath(
00198         // reference to a CString object to contain folder path
00199         CString &strFolderPath);
00200
00201     // this member function searchs the tree for a specified folder
00202     // written by Selom Ofori [sofori@chat.carleton.ca]
00203     //
00204     virtual BOOL SearchTree(
00205         // tree item to begin search from
00206         HTREEITEM treeNode,
00207         // string to search for
00208         CString szSearchName,
00209         // looking for folder or drive
00210         FindAttribs attr);
00211
00212     // Callback routine for sorting tree
00213     //
00214     static int CALLBACK TreeViewCompareProc(LPARAM lparam1, LPARAM lparam2, LPARAM lparamSort);
00215
00216 // Overrides
00217     // ClassWizard generated virtual function overrides
00218     //{{AFX_VIRTUAL(CCJShellTree)
00219     protected:
00220     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00221     //}}AFX_VIRTUAL
00222
00223     // Generated message map functions
00224 protected:
00225     //{{AFX_MSG(CCJShellTree)
00226     afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);
00227     afx_msg void OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult);
00228     afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
00229     afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
00230     afx_msg void OnDestroy();
00231     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00232     //}}AFX_MSG
00233
00234     DECLARE_MESSAGE_MAP()
00235 };
00236
00238 //  Inline Functions
00240
00241 _CJXLIB_INLINE void CCJShellTree::AssociateList(CCJShellList *pListCtrl)
00242     { ASSERT( pListCtrl != NULL ); m_pListCtrl = pListCtrl; }
00243
00244 _CJXLIB_INLINE void CCJShellTree::AssociateCombo(CComboBox *pComboBox)
00245     { ASSERT( pComboBox != NULL );  m_pComboBox = pComboBox; }
00246
00248
00249 //{{AFX_INSERT_LOCATION}}
00250 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00251
00252 #endif // _WIN32_IE >= 0x0400
00253 #endif // __CJSHELLTREE_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatComboBox.h Source File

WinCvs/CJLib/Include/CJFlatComboBox.h

Go to the documentation of this file.
00001 // CJFlatComboBox.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJFlatComboBox.h $
00011  *
00012  * $History: CJFlatComboBox.h $
00013  *
00014  * *****************  Version 17  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 6:01p
00016  * Updated in $/CodeJock/Include
00017  * Overrode OnEraseBkgnd(...) and re-wrote OnPaint() to handle flicker
00018  * free drawing.
00019  *
00020  * *****************  Version 16  *****************
00021  * User: Kirk Stowell Date: 10/30/99   Time: 2:24p
00022  * Updated in $/CodeJock/Include
00023  * Added COLORREF members to class to eliminate continuous calls to
00024  * GetSysColor(...). Overrode OnSysColorChange() to re-initialize COLORREF
00025  * variables.
00026  *
00027  * *****************  Version 15  *****************
00028  * User: Kirk Stowell Date: 10/26/99   Time: 10:39p
00029  * Updated in $/CodeJock/Include
00030  * Made class methods virtual for inheritance purposes.
00031  *
00032  * *****************  Version 14  *****************
00033  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00034  * Updated in $/CodeJockey/Include
00035  * Updated copyright and contact information.
00036  *
00037  * *****************  Version 13  *****************
00038  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00039  * Updated in $/CodeJockey/Include
00040  *
00041  * *****************  Version 12  *****************
00042  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00043  * Updated in $/CodeJockey/Include
00044  *
00045  * *****************  Version 11  *****************
00046  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00047  * Updated in $/CodeJockey/Include
00048  *
00049  * *****************  Version 10  *****************
00050  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00051  * Updated in $/CodeJockey/Include
00052  * Cleaned up inline functions, and import/export macro so that class will
00053  * be imported when linked to, and exported at compile time.
00054  *
00055  * *****************  Version 9  *****************
00056  * User: Kirk Stowell Date: 5/17/99    Time: 9:24p
00057  * Updated in $/CodeJockey/Include
00058  * Gilberto Botaro [seafox@techno.com.br] - Added code for auto
00059  * completion.
00060  *
00061  * *****************  Version 8  *****************
00062  * User: Kirk Stowell Date: 5/03/99    Time: 10:44p
00063  * Updated in $/CodeJockey/Include
00064  * Fixed code ommisions.
00065  *
00066  * *****************  Version 7  *****************
00067  * User: Kirk Stowell Date: 5/03/99    Time: 8:42p
00068  * Updated in $/CodeJockey/Include
00069  * Danilo Lax [Danilo_Lax@www2.alpeng.com] - The control is painted flat
00070  * when the mouse leaves the box, even if the control has the focus, now
00071  * checking for the focus in OnTimer(.
00072  *
00073  * Removed, unhandled msgs are processed by
00074  * CComboBox::PreTranslateMessage(pMsg). Used reflected msgs
00075  * BN_GETFOCUS/CBN_KILLFOCUS instead of WM_GETFOCUS/WM_KILLFOCUS.
00076  *
00077  * ::GetFocus() doesn't return CFlatComboBox::m_hWnd, even if the control
00078  * has the focus (don't know why, maybe ::GetFocus() only returns the
00079  * handle to the EditField part of the ComboBox), used flag m_bHasFocus
00080  * instead.
00081  *
00082  * *****************  Version 6  *****************
00083  * User: Kirk Stowell Date: 4/03/99    Time: 4:26p
00084  * Updated in $/CodeJockey/Include
00085  * Added comments and cleaned up code.
00086  *
00087  * *****************  Version 5  *****************
00088  * User: Kirk Stowell Date: 1/22/99    Time: 4:26p
00089  * Updated in $/CodeJockey/Include
00090  * Fixed accelerator problem reported by YOSH YAMASHITA
00091  * (yosh@muj.biglobe.ne.jp) with Matt Weagle's solution of overloading
00092  * PreTranslateMessage().
00093  *
00094  * *****************  Version 4  *****************
00095  * User: Kirk Stowell Date: 1/02/99    Time: 4:25p
00096  * Updated in $/CodeJockey/Include
00097  * Renamed class from CJComboBox to CCJFlatComboBox, changed DRAWSTATE to
00098  * enum, removed method Offset(), and replaced with a direct call to
00099  * ::GetSystemMetrics().
00100  *
00101  * *****************  Version 3  *****************
00102  * User: Kirk Stowell Date: 11/02/98   Time: 4:24p
00103  * Updated in $/CodeJockey/Include
00104  * Added OnSetFocus(), OnKillFocus() and modified OnPaint() so the control
00105  * remains beveled until it actually looses focus - (Vachik
00106  * Hovhannissian).
00107  *
00108  * *****************  Version 2  *****************
00109  * User: Kirk Stowell Date: 10/05/98   Time: 4:24p
00110  * Updated in $/CodeJockey/Include
00111  * Fixed offset bug to use GetSystemMetrics(), instead of hard coded
00112  * values -
00113  * Todd Brannam (tbrannam@msn.com).
00114  *
00115  * *****************  Version 1  *****************
00116  * User: Kirk Stowell Date: 10/02/98   Time: 4:23p
00117  * Created in $/CodeJockey/Include
00118  * First release version.
00119  *
00120  ***************************************************************************/
00122
00123 #ifndef __CJFLATCOMBOBOX_H__
00124 #define __CJFLATCOMBOBOX_H__
00125
00126 #if _MSC_VER > 1000
00127 #pragma once
00128 #endif // _MSC_VER > 1000
00129
00130 // CCJFlatComboBox is a CComboBox derived class which is simular to
00131 // the flat combobox as seen in the Microsoft office products.
00132 class _CJX_EXT_CLASS CCJFlatComboBox : public CComboBox
00133 {
00134     DECLARE_DYNAMIC(CCJFlatComboBox)
00135
00136 public:
00137
00138     // Default constructor
00139     //
00140     CCJFlatComboBox();
00141
00142     // Virtual destructor
00143     //
00144     virtual ~CCJFlatComboBox();
00145
00146 protected:
00147
00148     // enum used to determine the state the combo box should be
00149     //
00150     enum STATE { NORMAL = 1, RAISED = 2, PRESSED = 3 };
00151
00152     BOOL        m_bLBtnDown;        // TRUE if left mouse button is pressed
00153     BOOL        m_bPainted;         // used during paint operations
00154     BOOL        m_bHasFocus;        // TRUE if control has focus
00155     BOOL        m_bAutoComp;        // Used by Autocompleting.
00156     COLORREF    m_clrHilite;        // set to ::GetSysColor(COLOR_BTNHIGHLIGHT)
00157     COLORREF    m_clrShadow;        // set to ::GetSysColor(COLOR_BTNSHADOW)
00158     COLORREF    m_clrNormal;        // set to ::GetSysColor(COLOR_BTNFACE)
00159
00160 public:
00161     BOOL IsWin95();
00162
00163     // Call this member function to enable auto completion.
00164     //
00165     virtual void EnableAutoCompletion(BOOL bEnable=TRUE);
00166
00167     // This member function determines if the mouse is within
00168     // the controls rect.
00169     //
00170     virtual BOOL PointInRect();
00171
00172 protected:
00173
00174     // this member function is called by the combo box whenever a paint
00175     // operation should occur.
00176     //
00177     virtual void DrawCombo(STATE eState, COLORREF clrTopLeft, COLORREF clrBottomRight, CDC* pDC=NULL);
00178
00179 // Overrides
00180     // ClassWizard generated virtual function overrides
00181     //{{AFX_VIRTUAL(CCJFlatComboBox)
00182     public:
00183     virtual BOOL PreTranslateMessage(MSG* pMsg);
00184     //}}AFX_VIRTUAL
00185
00186     // Generated message map functions
00187 protected:
00188     //{{AFX_MSG(CCJFlatComboBox)
00189     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00190     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00191     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00192     afx_msg void OnTimer(UINT nIDEvent);
00193     afx_msg void OnPaint();
00194     afx_msg void OnSetFocus();
00195     afx_msg void OnKillFocus();
00196     afx_msg void OnEditUpdate();
00197     afx_msg void OnSysColorChange();
00198     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00199     //}}AFX_MSG
00200
00201     DECLARE_MESSAGE_MAP()
00202 };
00203
00205 //  Inline Functions
00207
00208 _CJXLIB_INLINE void CCJFlatComboBox::EnableAutoCompletion(BOOL bEnable/*=TRUE*/)
00209     { ASSERT(::IsWindow(m_hWnd)); m_bAutoComp = bEnable; }
00210
00211 _CJXLIB_INLINE BOOL CCJFlatComboBox::PointInRect()
00212     { ASSERT(::IsWindow(m_hWnd)); CPoint pt; GetCursorPos(&pt); CRect rcItem; GetWindowRect(&rcItem); return rcItem.PtInRect(pt); }
00213
00214 //{{AFX_INSERT_LOCATION}}
00215 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00216
00217 #endif // __CJCOMBOBOX_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UDC Member List

This is the complete list of members for UDC, including all inherited members.

DrawBitmap(void *bitmap, UPOINT where) | UDC |
GetTextExtent(const char *lpszString, int nCount) const | UDC |
GetTextHeight(void) const | UDC |
LineTo(int x, int y) | UDC |
m_brush | UDC | [protected]
m_pen | UDC | [protected]
m_wid | UDC | [protected]
MoveTo(int x, int y) | UDC |
Rectangle(const URECT *lpRect) | UDC |
RoundRect(const URECT *lpRect, UPOINT point) | UDC |
SelectObject(UPen *pPen) | UDC |
SelectObject(UBrush *pBrush) | UDC |
TextOutClipped(int x, int y, const URECT *lpRect, const char *lpszString, int nCount) | UDC |
UDC(int widid, int cmdid) | UDC |
~UDC() | UDC |

Generated on Sat Aug 7 22:51:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJFlatComboBox Member List

This is the complete list of members for CCJFlatComboBox, including all inherited members.

CCJFlatComboBox() | CCJFlatComboBox |
DrawCombo(STATE eState, COLORREF clrTopLeft, COLORREF clrBottomRight, CDC *pDC=NULL) | CCJFlatComboBox | [protected, virtual]
EnableAutoCompletion(BOOL bEnable=TRUE) | CCJFlatComboBox | [virtual]
IsWin95() | CCJFlatComboBox |
m_bAutoComp | CCJFlatComboBox | [protected]
m_bHasFocus | CCJFlatComboBox | [protected]
m_bLBtnDown | CCJFlatComboBox | [protected]
m_bPainted | CCJFlatComboBox | [protected]
m_clrHilite | CCJFlatComboBox | [protected]
m_clrNormal | CCJFlatComboBox | [protected]
m_clrShadow | CCJFlatComboBox | [protected]
NORMAL enum value | CCJFlatComboBox | [protected]
OnEditUpdate() | CCJFlatComboBox | [protected]
OnEraseBkgnd(CDC *pDC) | CCJFlatComboBox | [protected]
OnKillFocus() | CCJFlatComboBox | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJFlatComboBox | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJFlatComboBox | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJFlatComboBox | [protected]
OnPaint() | CCJFlatComboBox | [protected]
OnSetFocus() | CCJFlatComboBox | [protected]
OnSysColorChange() | CCJFlatComboBox | [protected]
OnTimer(UINT nIDEvent) | CCJFlatComboBox | [protected]
PointInRect() | CCJFlatComboBox | [virtual]
PRESSED enum value | CCJFlatComboBox | [protected]
PreTranslateMessage(MSG *pMsg) | CCJFlatComboBox | [virtual]
RAISED enum value | CCJFlatComboBox | [protected]
STATE enum name | CCJFlatComboBox | [protected]
~CCJFlatComboBox() | CCJFlatComboBox | [virtual]

Generated on Sat Aug 7 22:49:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PyCvsEntry::obj_t Member List

This is the complete list of members for PyCvsEntry::obj_t, including all inherited members.

m_object PyCvsEntry::obj_t

Generated on Sat Aug 7 22:56:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportFilter.h Source File

common/ImportFilter.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * ImportFilter.h : filter the imported files before importing
00023  */
00024
00025 #if !defined(AFX_IMPORTFILTER_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_IMPORTFILTER_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include <vector>
00033 #include "CPStr.h"
00034 #include "FileTraversal.h"
00035 #include "ProgressDlg.h"
00036
00037 #ifdef _MSC_VER
00038     using namespace std;
00039 #endif
00040
00041 class ReportWarning;
00042 class ReportConflict;
00043 class ImportReport;
00044
00045 kTraversal list_all_types_recur(const char* path, ReportWarning*& warnings, ReportConflict*& conflicts);
00046 void free_list_types(ReportWarning*& warnings, ReportConflict*& conflicts);
00047 void copy_list_types(const ReportWarning* srcWarnings, const ReportConflict* srcConflicts, ReportWarning*& warnings, ReportConflict*& conflicts);
00048
00049 #if qCvsDebug
00050     bool list_all_types(const char* path);
00051 #endif /* qCvsDebug */
00052
00054 class ReportConflict
00055 {
00056 public:
00057     ReportConflict(int mac_type, int mac_creator);
00058     virtual ~ReportConflict();
00059
00060     ReportConflict* next;
00062
00063     enum
00064     {
00065         noConflict =                0x0000,
00066         hasConflict =               0x0001,
00067         hasExtension =              0x0002,
00068         isBinary =                  0x0004,
00069         forceBinary =               0x0008,
00070         forceText =                 0x0010,
00071         hasIgnore =                 0x0020,
00072         hasTypeCreatorConflict =    0x0040,
00073         forceNoKeywords =           0x0080,
00074         isUnicode =                 0x0100,
00075         forceUnicode =              0x0200,
00076         userFlags = forceText | forceBinary | forceUnicode | hasIgnore | forceNoKeywords
00077     };
00078
00079     void AddPattern(const char* newpat, kFileType fileType, bool isExtension, const char* sample);
00080     void SetConflict(const char* sample);
00081     void SetTypeCreatorConflict(const char* sample); /* mac only */
00082     bool Match(const char* pat);
00083
00084     bool HasConflict(void) const;
00085     bool HasTypeCreatorConflict(void) const;
00086     bool IsBinary(void) const;
00087     bool IsUnicode(void) const;
00088     bool IsExtension(void) const;
00089     const char* GetPattern(void) const;
00090     int GetMacType(void) const;
00091     int GetMacCreator(void) const;
00092
00093     void ForceBinary(void);
00094     void ForceText(void);
00095     void ForceUnicode(void);
00096     void Ignore(void);
00097     void ForceNoKeywords(void);
00098     bool HasForceBinary(void) const;
00099     bool HasForceText(void) const;
00100     bool HasForceUnicode(void) const;
00101     bool HasIgnore(void) const;
00102     bool HasForceNoKeywords(void) const;
00103
00104     void DisableUserSettings(void);
00105
00106     CPStr GetStateDesc() const;
00107     CPStr GetDesc() const;
00108     CPStr GetKindDesc() const;
00109
00110     void PrintOut(CStr& out) const;
00111
00112 #if qCvsDebug
00113     void PrintOut(void) const;
00114 #endif /* qCvsDebug */
00115
00116 protected:
00117     int status;
00118     CStr pattern;
00119     CStr sample1;
00120     CStr sample2;
00121     int ftype;
00122     int fcreator;
00123 };
00124
00126 class ReportWarning
00127 {
00128 public:
00129     ReportWarning(kTextBinTYPE akind);
00130     virtual ~ReportWarning();
00131
00132     ReportWarning* next;
00133     static const size_t maxWarnings;
00135     void AddWarning(const char* sample);
00136     kTextBinTYPE Kind(void) const;
00137
00138     bool IsError() const;
00139     CPStr GetStateDesc() const;
00140     CPStr GetDesc() const;
00141
00142     void PrintOut(CStr& out) const;
00143
00144 #if qCvsDebug
00145     void PrintOut(void) const;
00146 #endif /* qCvsDebug */
00147
00148 protected:
00149     kTextBinTYPE kind;
00150
00151     std::vector<CStr> samples;
00152     bool tooManyWarnings;
00153 };
00154
00156 class ImportReport : public TraversalReport
00157 {
00158 public:
00159     // Construction
00160     ImportReport(const char* path, ReportWarning*& w, ReportConflict*& c);
00161     virtual ~ImportReport();
00162
00163 private:
00164     // Data members
00165     ReportWarning*& warnings;
00166     ReportConflict*& conflicts;
00167     std::vector<CStr> m_ignlist;
00169     CProgress m_progress;
00171 public:
00172     // Interface
00173
00175     std::vector<CStr>& GetIgnoreList() { return m_ignlist; }
00176
00177     virtual kTraversal EnterDirectory(const char* fullpath, const char* dirname, const UFSSpec* macspec);
00178     virtual kTraversal ExitDirectory(const char* fullpath);
00179     virtual kTraversal OnError(const char* err, int errcode);
00180     virtual kTraversal OnIdle(const char* fullpath);
00181
00182     virtual kTraversal OnDirectory(const char* fullpath, const char* fullname, const char* name,
00183         const struct stat& dir, const UFSSpec* macspec);
00184
00185     virtual kTraversal OnFile(const char* fullpath, const char* fullname, const char* name,
00186         const struct stat& dir, const UFSSpec* macspec);
00187
00188     virtual kTraversal OnAlias(const char*fullpath, const char* fullname, const char* name,
00189         const struct stat& dir, const UFSSpec* macspec);
00190 };
00191
00192 #endif // !defined(AFX_IMPORTFILTER_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TTagHandler< tagType > Member List

This is the complete list of members for TTagHandler< tagType >, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | TTagHandler< tagType > | [inline, virtual]
OnFolder(const char *fullpath) | TTagHandler< tagType > | [inline, virtual]
TTagHandler() | TTagHandler< tagType > | [inline]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:57:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CImportEntry Member List

This is the complete list of members for CImportEntry, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CImportEntry(ReportConflict *entry, CWnd *pParent=NULL) | CImportEntry |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CImportEntry | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CImportEntry |
InitHelpID() | CImportEntry | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_desc | CImportEntry |
m_radios | CImportEntry |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelp() | CImportEntry | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CHHelpDialog | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UWaitCursor Member List

This is the complete list of members for UWaitCursor, including all inherited members.

UWaitCursor() | UWaitCursor | [inline]
~UWaitCursor() | UWaitCursor | [inline, virtual]

Generated on Sat Aug 7 22:57:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoDraw.cpp Source File

rf/support/mfc/PseudoDraw.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // PseudoDraw.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #include "PseudoDraw.h"
00027 #include "uwidget.h"
00028
00029 #ifdef _DEBUG
00030 #define new DEBUG_NEW
00031 #undef THIS_FILE
00032 static char THIS_FILE[] = __FILE__;
00033 #endif
00034
00036 // CPseudoDraw
00037
00038 CPseudoDraw::CPseudoDraw(UWidget *pseudo, int cmdid) : m_pseudo(pseudo), m_cmdid(cmdid)
00039 {
00040 }
00041
00042 CPseudoDraw::~CPseudoDraw()
00043 {
00044 }
00045
00046
00047 BEGIN_MESSAGE_MAP(CPseudoDraw, CStatic)
00048     //{{AFX_MSG_MAP(CPseudoDraw)
00049     ON_WM_PAINT()
00050     //}}AFX_MSG_MAP
00051 END_MESSAGE_MAP()
00052
00054 // CPseudoDraw message handlers
00055
00056 void CPseudoDraw::OnPaint()
00057 {
00058     CPaintDC dc(this); // device context for painting
00059
00060     if(m_pseudo != 0L)
00061         UEventSendMessage(m_pseudo->GetWidID(), EV_CUSTOM_DRAW, m_cmdid, &dc);
00062 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uwidget.cpp Source File

rf/uwidget.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #include <stdio.h>
00028
00029 #include "uwidget.h"
00030 #include "uconsole.h"
00031 #include "udraw.h"
00032 #include "umenu.h"
00033 #include "SmartComboBox.h"
00034
00035 #if qMacAPP
00036 #   include "UPseudoSupport.h"
00037 #   include "UButton.h"
00038 #   include "UDialogBehavior.h"
00039 #   include "URadio.h"
00040 #   include "UCheckbox.h"
00041 #   include "UNumberText.h"
00042 #   include "UPopup.h"
00043 #   include "UWindow.h"
00044 #   include "UViewServer.h"
00045 #   include "USlider.h"
00046 #   include "UDispatcher.h"
00047 #   include "UTabbedView.h"
00048 #   include "UProgressIndicator.h"
00049 #endif
00050
00051 #ifdef qMacPP
00052 #   include "UPseudoSupport.h"
00053 #   include <LCheckBox.h>
00054 #   include <LRadioButton.h>
00055 #   include <LEditText.h>
00056 #   include <LStaticText.h>
00057 #   include <UModalDialogs.h>
00058 #   include <LPopupButton.h>
00059 #   include <LOutlineTable.h>
00060 #   include <LOutlineItem.h>
00061 #   include <UTableHelpers.h>
00062 #   include <LTextTableView.h>
00063 #   include <LCheckBoxGroupBox.h>
00064 #   include <LPageController.h>
00065 #   include <LTabsControl.h>
00066 #endif
00067
00068 #ifdef WIN32
00069 #   include "PseudoDlg.h"
00070 #   include "PseudoButton.h"
00071 #endif
00072
00073 #if defined(_DEBUG) && defined(WIN32)
00074 #   define new DEBUG_NEW
00075 #   undef THIS_FILE
00076     static char THIS_FILE[] = __FILE__;
00077 #endif
00078
00079 #ifndef NEW
00080 #   define NEW new
00081 #endif
00082
00083 UIMPLEMENT_DYNAMIC(UWidget, UCmdTarget)
00084
00085 UBEGIN_MESSAGE_MAP(UWidget, UCmdTarget)
00086     ON_UPDATEUI(UWidget)
00087     ON_UPDATEFOCUS(UWidget)
00088     ON_INIT_WIDGET(UWidget, 0, 0xFFFF)
00089     ON_INIT_TAB_WIDGET(UWidget, 0, 0xFFFF)
00090     ON_PAGE_CHANGED(UWidget, 0, 0xFFFF)
00091     ON_FETCHCMD(UWidget, 0, 0xFFFF)
00092     ON_QUERYSTATE(0, 0xFFFF, UWidget::OnGetState)
00093     ON_SETSTATE(0, 0xFFFF, UWidget::OnSetState)
00094     ON_ENABLECMD(0, 0xFFFF, UWidget::OnEnableCmd)
00095     ON_CHGFOCUS(UWidget, 0, 0xFFFF)
00096     ON_SETDEFAULT(UWidget, 0, 0xFFFF)
00097     ON_INVALIDATE(UWidget, 0, 0xFFFF)
00098     ON_REDRAW(UWidget, 0, 0xFFFF)
00099     ON_SHOW_WIDGET_RANGE(0, 0xFFFF, UWidget::OnShowWidget)
00100     ON_SETICON(0, 0xFFFF, UWidget::OnSetIcon)
00101     ON_SETTEXT(0, 0xFFFF, UWidget::OnSetText)
00102     ON_GETTEXT(0, 0xFFFF, UWidget::OnGetText)
00103     ON_SETFLOAT(UWidget, 0, 0xFFFF)
00104     ON_GETFLOAT(UWidget, 0, 0xFFFF)
00105     ON_SET_SLIDER(UWidget, 0, 0xFFFF)
00106     ON_GET_SLIDERPROP(UWidget, 0, 0xFFFF)
00107     ON_SET_SLIDERPROP(UWidget, 0, 0xFFFF)
00108     ON_CHGCURSOR(UWidget, 0, 0xFFFF)
00109     ON_USETTOOLTIP(0, 0xFFFF, UWidget::OnSetTooltip)
00110     ON_USETLLOC(0, 0xFFFF, UWidget::OnSetLoc)
00111     ON_UGETLLOC(0, 0xFFFF, UWidget::OnGetLoc)
00112     ON_TREE_RESETALL(UWidget, 0, 0xFFFF)
00113     ON_TREE_INSERT(UWidget, 0, 0xFFFF)
00114     ON_TREE_GETINFO(UWidget, 0, 0xFFFF)
00115     ON_TREE_DELETE(UWidget, 0, 0xFFFF)
00116     ON_TREE_EXPAND(UWidget, 0, 0xFFFF)
00117     ON_TREE_SELECT(UWidget, 0, 0xFFFF)
00118     ON_TREE_SETDATA(UWidget, 0, 0xFFFF)
00119     ON_TREE_SETICON(UWidget, 0, 0xFFFF)
00120     ON_TREE_GETSEL(UWidget, 0, 0xFFFF)
00121     ON_LIST_SETCOLTITLE(UWidget, 0, 0xFFFF)
00122     ON_LIST_SETCOLTITLE(UWidget, 0, 0xFFFF)
00123     ON_LIST_SETCOLWIDTH(UWidget, 0, 0xFFFF)
00124     ON_LIST_RESETALL(UWidget, 0, 0xFFFF)
00125     ON_LIST_ADDSEL(UWidget, 0, 0xFFFF)
00126     ON_LIST_DELROW(UWidget, 0, 0xFFFF)
00127     ON_LIST_SETFEEDBACK(UWidget, 0, 0xFFFF)
00128     ON_LIST_NEWROW(UWidget, 0, 0xFFFF)
00129     ON_LIST_INSERT(UWidget, 0, 0xFFFF)
00130     ON_LIST_ROWSETDATA(UWidget, 0, 0xFFFF)
00131     ON_LIST_ROWGETDATA(UWidget, 0, 0xFFFF)
00132     ON_LIST_GETNEXTSEL(UWidget, 0, 0xFFFF)
00133     ON_LIST_GETNEXT(UWidget, 0, 0xFFFF)
00134     ON_LIST_GETINFO(UWidget, 0, 0xFFFF)
00135     ON_LIST_ADDCOLUMNS(UWidget, 0, 0xFFFF)
00136     ON_LIST_SHOWCOLUMNS(UWidget, 0, 0xFFFF)
00137     ON_LIST_HIDECOLUMNS(UWidget, 0, 0xFFFF)
00138     ON_LIST_RESORT(UWidget, 0, 0xFFFF)
00139     ON_LIST_SETSORTDIR(UWidget, 0, 0xFFFF)
00140     //ON_LIST_POPUP(UWidget, 0, 0xFFFF)
00141     ON_COMBO_RESETALL(UWidget, 0, 0xFFFF)
00142     ON_COMBO_APPEND(UWidget, 0, 0xFFFF)
00143     ON_COMBO_SETSEL(UWidget, 0, 0xFFFF)
00144     ON_COMBO_GETSEL(UWidget, 0, 0xFFFF)
00145     ON_COMBO_GETCOUNT(UWidget, 0, 0xFFFF)
00146     ON_COMBO_DELSEL(UWidget, 0, 0xFFFF)
00147     ON_COMBO_ENABLESEL(UWidget, 0, 0xFFFF)
00148     ON_COMBO_GETMENU(UWidget, 0, 0xFFFF)
00149     ON_SMARTCOMBO_SETFEATURE(UWidget, 0, 0xFFFF)
00150     ON_SMARTCOMBO_SETITEMS(UWidget, 0, 0xFFFF)
00151     ON_SMARTCOMBO_SETREADONLY(UWidget, 0, 0xFFFF)
00152     ON_STATUSBAR_TEXT(UWidget, 0, 0xFFFF)
00153 UEND_MESSAGE_MAP()
00154
00155 bool UWidget::sValidMenu = false;
00156 int UWidget::sFocusWidID = -1;
00157 int UWidget::sFocusCmdID;
00158
00159 bool UWidget::IsUIValid() { return sValidMenu; }
00160 void UWidget::DoValidUI(bool how) { sValidMenu = how; }
00161 int UWidget::GetFocus(void) { return sFocusWidID; }
00162 int UWidget::GetFocusCmd(void) { return sFocusCmdID; }
00163
00164 #if qGTK
00165 extern "C"
00166 {
00167     static void gtkdestroy(GtkWidget *widget, gpointer user_data)
00168     {
00169         UWidget *wid = (UWidget *)user_data;
00170         UEventSendMessage(wid->GetWidID(), EV_DESTROY, 0, 0L);
00171     }
00172
00173     static int gtkkeypress(GtkWidget *widget, GdkEventKey * event, gpointer user_data)
00174     {
00175         UWidget *wid = (UWidget *)user_data;
00176         UEventSendMessage(wid->GetWidID(), EV_KEYDOWN, event->keyval, 0L);
00177         return FALSE;
00178     }
00179
00180     static guint focus_in_signal_id;
00181     static guint focus_out_signal_id;
00182
00183     static gboolean gtkeventwatcher(GtkObject *object, guint signal_id, guint n_params, GtkArg *params, gpointer data)
00184     {
00185 #if 0
00186         g_print ("Watch: \"%s\" emitted for %s\n",
00187                  gtk_signal_name (signal_id),
00188                  gtk_type_name (GTK_OBJECT_TYPE (object)));
00189 #endif
00190
00191         // for a tree, we are interested to know about the tree, not just the item
00192         if(GTK_IS_TREE_ITEM(object))
00193         {
00194             GtkTree *parent = GTK_TREE(GTK_WIDGET(object)->parent);
00195             // now find the upper tree
00196             while(1)
00197             {
00198                 gpointer data = gtk_object_get_data(GTK_OBJECT(parent), "rf_treeparent");
00199                 if(data != 0L)
00200                     parent = GTK_TREE(GTK_WIDGET(data)->parent);
00201                 else
00202                     break;
00203             }
00204             object = GTK_OBJECT(parent);
00205         }
00206
00207         if(signal_id == focus_out_signal_id)
00208         {
00209             UEventNotifyMessage(EV_UPDATEFOCUS, 1, object);
00210         }
00211         else if(signal_id == focus_in_signal_id)
00212         {
00213             UEventNotifyMessage(EV_UPDATEFOCUS, 0, object);
00214         }
00215
00216         return TRUE;
00217     }
00218
00219     static void gtkmaindoevent(GdkEvent *event)
00220     {
00221         gtk_main_do_event(event);
00222
00223         switch(event->type)
00224         {
00225         case GDK_BUTTON_PRESS:
00226         case GDK_2BUTTON_PRESS:
00227         case GDK_3BUTTON_PRESS:
00228         case GDK_BUTTON_RELEASE:
00229         case GDK_KEY_PRESS:
00230         case GDK_KEY_RELEASE:
00231         case GDK_FOCUS_CHANGE:
00232             UWidget::DoValidUI(false);
00233             break;
00234         default:
00235             break;
00236         }
00237     }
00238
00239     static void gtkclicked(GtkButton *button, gpointer user_data)
00240     {
00241         int widid = ULOWORD((int)user_data);
00242         int cmdid = UHIWORD((int)user_data);
00243         UEventSendMessage(widid, EV_CMD, cmdid, 0L);
00244     }
00245
00246     static void gtkmenuitemactivate(GtkMenuItem *menuitem, gpointer user_data)
00247     {
00248         int widid = ULOWORD((int)user_data);
00249         int cmdid = UHIWORD((int)user_data);
00250         UEventSendMessage(widid, EV_CMD, cmdid, 0L);
00251     }
00252
00253     static void gtkselectclist(GtkWidget *clist, gint row, gint column,
00254                                GdkEventButton *event, gpointer user_data)
00255     {
00256         int widid = ULOWORD((int)user_data);
00257         int cmdid = UHIWORD((int)user_data);
00258         gchar *text;
00259         gtk_clist_get_text(GTK_CLIST(clist), row, column, &text);
00260         UEventSendMessage(widid, EV_LIST_SELECTING, UMAKEINT(cmdid, row), text);
00261         //if(event) fprintf(stderr, "Button %d\n", event->button);
00262     }
00263
00264     static void gtkselectclistcolumn(GtkCList *clist, gint column, gpointer user_data)
00265     {
00266         int widid = ULOWORD((int)user_data);
00267         int cmdid = UHIWORD((int)user_data);
00268         UEventSendMessage(widid, EV_LIST_SELCOLUMN, UMAKEINT(cmdid, column), 0L);
00269     }
00270
00271     static gint gtkclistdblclick(GtkWidget *widget, GdkEventButton *event, gpointer data)
00272     {
00273         int widid = ULOWORD((int)data);
00274         int cmdid = UHIWORD((int)data);
00275
00276         //fprintf(stderr, "Button %d\n", event->button);
00277
00278         if (event->button == 3)
00279         {
00280             UEventSendMessage(widid, EV_LIST_POPUP, cmdid, 0L);
00281         }
00282
00283         if (event->type == GDK_2BUTTON_PRESS)
00284         {
00285             UEventSendMessage(widid, EV_LIST_DBLCLICK, cmdid, 0L);
00286             return FALSE;
00287         }
00288         return TRUE;
00289     }
00290
00291     static void gtkcomboclicked(GtkWidget *widget, gpointer user_data)
00292     {
00293         int widid = ULOWORD((int)user_data);
00294         int cmdid = UHIWORD((int)user_data);
00295
00296         GtkList *list = GTK_LIST(widget->parent);
00297         GList *selection = list->selection;
00298         int count = -1;
00299         UStr selTxt;
00300         if (selection)
00301         {
00302             GtkBin *bin = GTK_BIN( selection->data );
00303             gchar *txt;
00304             gtk_label_get(GTK_LABEL(bin->child), &txt);
00305             selTxt = txt;
00306             GList *child = list->children;
00307             count = 0;
00308             while (child)
00309             {
00310                 if (child->data == selection->data)
00311                     break;
00312                 count++;
00313                 child = child->next;
00314             }
00315             g_assert(child != 0L);
00316         }
00317         UEventSendMessage(widid, EV_COMBO_SEL, UMAKEINT(cmdid, count), (void *)(const char *)selTxt);
00318     }
00319
00320     GtkLabel *getLabelFromContainer(GtkContainer *w)
00321     {
00322         GList *list = gtk_container_children(w);
00323         GtkLabel *label = 0L;
00324         while(list != 0L)
00325         {
00326             GtkWidget *wid = GTK_WIDGET(list->data);
00327             if(GTK_IS_LABEL(wid))
00328             {
00329                 label = GTK_LABEL(wid);
00330                 break;
00331             }
00332             list = (GList *)g_list_next(list);
00333         }
00334         return label;
00335     }
00336
00337     static void gtkmenuactivated(GtkWidget *widget, gpointer user_data)
00338     {
00339         int widid = ULOWORD((int)user_data);
00340         int cmdid = UHIWORD((int)user_data);
00341
00342         UStr selTxt;
00343
00344         // fix me: where to find the label of the item ?
00345 #if 1
00346         selTxt = (char *)gtk_object_get_data(GTK_OBJECT(widget), "rf_menuitemtext");
00347 #else
00348         GtkLabel *label = getLabelFromContainer(GTK_CONTAINER(widget));
00349         gchar *txt;
00350         gtk_label_get(label, &txt);
00351         selTxt = txt;
00352 #endif
00353
00354         GtkMenu *menu = GTK_MENU(widget->parent);
00355         GList *list = GTK_MENU_SHELL(menu)->children;
00356         int count = 0;
00357         while(list != 0L)
00358         {
00359             GtkWidget *wid = GTK_WIDGET(list->data);
00360             if(wid == widget)
00361                 break;
00362             list = (GList *)g_list_next(list);
00363             count++;
00364         }
00365         g_assert(list != 0L);
00366         UEventSendMessage(widid, EV_COMBO_SEL, UMAKEINT(cmdid, count), (void *)(const char *)selTxt);
00367     }
00368
00369     static gint gtkcancel(GtkWidget *widget, GdkEvent* event, gpointer user_data)
00370     {
00371         static bool sSemaphore = false;
00372         USemaphore policeman(sSemaphore);
00373         if(policeman.IsEnteredTwice())
00374             return TRUE;
00375
00376         UWidget *wid = (UWidget *)user_data;
00377         wid->EndModal(false);
00378         return TRUE;
00379     }
00380
00381     static bool matchToken(const char *str, int &cmd)
00382     {
00383         if(str == 0L)
00384             return false;
00385
00386         const char *origStr = str;
00387         size_t len = strlen(kUgtkPrefixToken);
00388         if(strncmp(str, kUgtkPrefixToken, len) != 0)
00389             return false;
00390
00391         str += len;
00392         if(*str && *str != '_')
00393             str++;
00394         if(*str && *str == '_')
00395             str++;
00396
00397         if(sscanf(str, "%d", &cmd) == 1 && cmd >=0 && cmd < (32767 - EV_COMMAND_START))
00398         {
00399             cmd += EV_COMMAND_START;
00400             return true;
00401         }
00402         else
00403             g_warning("The widget '%s' has a wrong pseudo command '%d'\n", origStr, cmd);
00404
00405         return false;
00406     }
00407
00408     static void dataForeach(GQuark key_id, gpointer data, gpointer user_data)
00409     {
00410         const char *str = g_quark_to_string(key_id);
00411         int id = (int)user_data;
00412         int cmd;
00413         if(matchToken(str, cmd))
00414         {
00415             UASSERT(GTK_IS_WIDGET(data));
00416
00417             GtkWidget *w = (GtkWidget *)data;
00418             w = w->parent;
00419             while(w != 0L)
00420             {
00421                 if(GTK_IS_NOTEBOOK(w))
00422                 {
00423                     // don't extract widgets children of a notebook at this point
00424                     return;
00425                 }
00426                 w = w->parent;
00427             }
00428
00429             UEventSendMessage(id, EV_INIT_WIDGET, cmd, data);
00430         }
00431     }
00432
00433     typedef struct
00434     {
00435         int widid;
00436         int pageid;
00437         int pagenum;
00438     } _dataTabForeach;
00439
00440     static void dataTabForeach(GQuark key_id, gpointer data, gpointer user_data)
00441     {
00442         const char *str = g_quark_to_string(key_id);
00443         _dataTabForeach *mydata = (_dataTabForeach *)user_data;
00444         int cmd;
00445         if(matchToken(str, cmd))
00446         {
00447             UASSERT(GTK_IS_WIDGET(data));
00448             GtkWidget *w = (GtkWidget *)data;
00449             w = w->parent;
00450             while(w != 0L)
00451             {
00452                 if(GTK_IS_NOTEBOOK(w))
00453                 {
00454                     break;
00455                 }
00456                 w = w->parent;
00457             }
00458             if(w == 0L)
00459             {
00460                 // this is not a child of a notebook
00461                 return;
00462             }
00463
00464             gchar *name = gtk_widget_get_name(w);
00465             int pagecmd;
00466             if(!matchToken(name, pagecmd) || pagecmd != mydata->pageid)
00467                 return;
00468
00469             GtkNotebook *n = GTK_NOTEBOOK(w);
00470             w = (GtkWidget *)data;
00471             int pagenum = -1;
00472             while(w != 0L && pagenum == -1)
00473             {
00474                 int i = 0;
00475                 GtkWidget *p;
00476                 while((p = gtk_notebook_get_nth_page(n, i)) != 0L)
00477                 {
00478                     if(w == p)
00479                     {
00480                         pagenum = i;
00481                         break;
00482                     }
00483                     i++;
00484                 }
00485                 w = w->parent;
00486             }
00487
00488             if(pagenum == -1)
00489             {
00490                 g_warning("Could not find the page of the widget '%s'\n", str);
00491                 return;
00492             }
00493
00494             if(pagenum != mydata->pagenum)
00495                 return;
00496
00497             UEventSendMessage(mydata->widid, EV_INIT_WIDGET, cmd, data);
00498         }
00499     }
00500
00501     static void gtkpacktreeitem(GtkBox *m_box, const char *title, GtkPixmap *icon)
00502     {
00503         if(icon != 0L)
00504         {
00505             gtk_misc_set_alignment (GTK_MISC (icon), 0.0, 0.5);
00506             gtk_box_pack_start(m_box, GTK_WIDGET(icon), FALSE, FALSE, 0);
00507             gtk_widget_show (GTK_WIDGET(icon));
00508         }
00509
00510         GtkLabel *m_label_widget = GTK_LABEL(gtk_label_new (title != 0L ? title : ""));
00511         gtk_misc_set_alignment (GTK_MISC (m_label_widget), 0.5, 0.5);
00512         gtk_box_pack_start(m_box, GTK_WIDGET(m_label_widget), FALSE, FALSE, 0);
00513         gtk_widget_show (GTK_WIDGET(m_label_widget));
00514
00515         gtk_widget_show(GTK_WIDGET(m_box));
00516     }
00517
00518     static GtkTreeItem *gtknewtreeitem(const char *title, GtkPixmap *icon)
00519     {
00520         GtkTreeItem *item;
00521         item = GTK_TREE_ITEM(gtk_tree_item_new());
00522
00523         GtkHBox *m_box = GTK_HBOX(gtk_hbox_new(FALSE, 2));
00524         gtk_container_add (GTK_CONTAINER (item), GTK_WIDGET(m_box));
00525
00526         gtkpacktreeitem(GTK_BOX(m_box), title, icon);
00527
00528         return item;
00529     }
00530
00531     static void gtktreeexpand(GtkWidget *item, gpointer user_data)
00532     {
00533         int widid = ULOWORD((int)user_data);
00534         int cmdid = UHIWORD((int)user_data);
00535         g_assert(GTK_IS_TREE_ITEM(item));
00536         UEventSendMessage(widid, EV_TREE_EXPANDING, UMAKEINT(cmdid, 0), item);
00537     }
00538
00539     static void gtktreecollapse(GtkWidget *item, gpointer user_data)
00540     {
00541         int widid = ULOWORD((int)user_data);
00542         int cmdid = UHIWORD((int)user_data);
00543         g_assert(GTK_IS_TREE_ITEM(item));
00544         UEventSendMessage(widid, EV_TREE_EXPANDING, UMAKEINT(cmdid, 1), item);
00545     }
00546
00547     static void gtktreeselect(GtkWidget *item, gpointer user_data)
00548     {
00549         int widid = ULOWORD((int)user_data);
00550         int cmdid = UHIWORD((int)user_data);
00551         g_assert(GTK_IS_TREE_ITEM(item));
00552         UEventSendMessage(widid, EV_TREE_SELECTING, UMAKEINT(cmdid, 0), item);
00553     }
00554
00555     static void gtktreedeselect(GtkWidget *item, gpointer user_data)
00556     {
00557         int widid = ULOWORD((int)user_data);
00558         int cmdid = UHIWORD((int)user_data);
00559         g_assert(GTK_IS_TREE_ITEM(item));
00560         UEventSendMessage(widid, EV_TREE_SELECTING, UMAKEINT(cmdid, 1), item);
00561     }
00562
00563     static GtkLabel *gtktreegetlabel(GtkWidget *item)
00564     {
00565         GtkBox *box = GTK_BOX (GTK_BIN (item)->child);
00566         GList *list = box->children;
00567         GtkLabel *label = 0L;
00568         while(list != 0L)
00569         {
00570             GtkWidget *wid = ((GtkBoxChild *)list->data)->widget;
00571             if(GTK_IS_LABEL(wid))
00572             {
00573                 label = (GtkLabel *)wid;
00574                 break;
00575             }
00576             list = (GList *)g_list_next(list);
00577         }
00578         return label;
00579     }
00580
00581   static gint treeListSort(gconstpointer ptr1, gconstpointer ptr2)
00582   {
00583     GtkLabel *label1, *label2;
00584     gchar *title1, *title2;
00585
00586     label1 = gtktreegetlabel((GtkWidget*)ptr1);
00587     label2 = gtktreegetlabel((GtkWidget*)ptr2);
00588
00589     gtk_label_get(label1, &title1);
00590     gtk_label_get(label2, &title2);
00591
00592 #ifdef qUnix
00593     return strcmp(title1, title2);
00594 #else
00595     return _stricmp(title1, title2);
00596 #endif
00597   }
00598
00599   static void gtktreesort(GtkTree *w)
00600   {
00601     if(w == 0L)
00602       return;
00603
00604 # if qGTK
00605     if(!GTK_IS_TREE(w))
00606       return;
00607
00608     GtkTree *parent = GTK_TREE(w);
00609
00610     GList *list = GTK_TREE(parent)->children;
00611
00612     g_list_sort(list, treeListSort);
00613
00614     parent->children = g_list_first(list);
00615 #endif
00616   }
00617
00618     static void gtksettreeitemicon(GtkTreeItem *item, GtkPixmap *icon)
00619     {
00620         gchar *title = 0L;
00621         GtkLabel *label = gtktreegetlabel(GTK_WIDGET(item));
00622         if(label != 0L)
00623             gtk_label_get(label, &title);
00624         UStr str(title);
00625
00626         GtkBox *m_box = GTK_BOX(GTK_BIN (item)->child);
00627         GList *list = g_list_copy(m_box->children);
00628         while(list != 0L)
00629         {
00630             GtkWidget *wid = ((GtkBoxChild *)list->data)->widget;
00631             gtk_container_remove(GTK_CONTAINER(m_box), wid);
00632
00633             list = (GList *)g_list_next(list);
00634         }
00635         g_list_free(list);
00636
00637         gtkpacktreeitem(m_box, str, icon);
00638     }
00639
00640     // TODO: remove that when the GTK one is working
00641     static gint gtk_clist_get_text_is_buggy(GtkCList  *clist,
00642                                             gint       row,
00643                                             gint       column,
00644                                             gchar    **text)
00645     {
00646         GtkCListRow *clist_row;
00647
00648         g_return_val_if_fail (clist != NULL, 0);
00649         g_return_val_if_fail (GTK_IS_CLIST (clist), 0);
00650
00651         if (row < 0 || row >= clist->rows)
00652             return 0;
00653         if (column < 0 || column >= clist->columns)
00654             return 0;
00655
00656         clist_row = (GtkCListRow *)(g_list_nth (clist->row_list, row))->data;
00657
00658         if (clist_row->cell[column].type == GTK_CELL_TEXT)
00659         {
00660             if (text)
00661                 *text = GTK_CELL_TEXT (clist_row->cell[column])->text;
00662         }
00663         else if (clist_row->cell[column].type == GTK_CELL_PIXTEXT)
00664         {
00665             if (text)
00666                 *text = GTK_CELL_PIXTEXT(clist_row->cell[column])->text;
00667         }
00668         else
00669             return 0;
00670
00671         return 1;
00672     }
00673
00674     static void
00675     gtkswitchpage(GtkWidget       *w,
00676                   GtkNotebookPage *page,
00677                   gint             page_num,
00678                   gpointer         data)
00679     {
00680         int widid = ULOWORD((int)data);
00681         int cmdid = UHIWORD((int)data);
00682
00683         UEventSendMessage(widid, EV_PAGE_CHANGED, UMAKEINT(cmdid, page_num), 0L);
00684     }
00685
00686     static UListSorter sGtkClistDiff = 0L;
00687     static UWidget *sGtkClistWid = 0L;
00688
00689     static gint gtkclistdefcompare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
00690     {
00691         if(sGtkClistDiff == 0L)
00692             return 0;
00693
00694         GtkCListRow *row1 = (GtkCListRow *) ptr1;
00695         GtkCListRow *row2 = (GtkCListRow *) ptr2;
00696         return sGtkClistDiff(sGtkClistWid, row1->data, row2->data);
00697     }
00698
00699     static gint gtkexposeevent(GtkWidget *widget, GdkEvent *event, gpointer user_data)
00700     {
00701         int widid = ULOWORD((int)user_data);
00702         int cmdid = UHIWORD((int)user_data);
00703
00704         UEventSendMessage(widid, EV_CUSTOM_DRAW, cmdid, event);
00705         return TRUE;
00706     }
00707
00708     static gint gtklayoutclicked(GtkWidget *widget, GdkEvent *event, gpointer user_data)
00709     {
00710         int widid = ULOWORD((int)user_data);
00711         int cmdid = UHIWORD((int)user_data);
00712
00713         UEventSendMessage(widid, EV_CUSTOM_CLICK, cmdid, event);
00714         return TRUE;
00715     }
00716 } // extern "C"
00717
00718 #endif /* qGTK */
00719
00720 #if qMacAPP
00721     static bool macapp_getcmdid(TView *view, int & cmdid)
00722     {
00723         IDType atype = view->GetIdentifier();
00724         const char *atypestr = (char *)&atype;
00725         if(atypestr[0] != 'p' && atypestr[1] != 's')
00726             return false;
00727
00728         char cmd[3] = {atypestr[2], atypestr[3], 0};
00729         return sscanf(cmd, "%d", &cmdid) == 1;
00730     }
00731
00732     static void macapp_fecthview(int widid, TView *view)
00733     {
00734         if(view == 0L)
00735             return;
00736
00737         int cmdid;
00738         if(macapp_getcmdid(view, cmdid))
00739         {
00740             UEventSendMessage(widid, EV_INIT_WIDGET, cmdid + EV_COMMAND_START, view);
00741         }
00742
00743         if(MA_MEMBER(view, TTabbedView))
00744         {
00745             TTabbedView *tab = (TTabbedView *)view;
00746             TView *tabview;
00747             SInt32 tabIndex = 1;
00748             while((tabview = tab->GetPanelView(tabIndex++)) != 0L)
00749             {
00750                 macapp_fecthview(widid, tabview);
00751             }
00752         }
00753
00754         macapp_fecthview(widid, view->GetNextView());
00755         macapp_fecthview(widid, view->GetSubView());
00756     }
00757 #endif /* qMacAPP */
00758
00759 UWidget::UWidget(int widid) : UCmdTarget(widid), m_currentPage(-1)
00760 #if qGTK || qMacPP
00761     , m_modalLoop(false)
00762 #endif
00763 #ifdef WIN32
00764     , m_curModal(0L), m_noDispatch(false)
00765 #endif
00766 {
00767 #if qMacAPP
00768     static bool firstTime = true;
00769     if(firstTime)
00770     {
00771         firstTime = false;
00772         gDispatcher->AddBehavior(new TPseudoAppBehavior);
00773             // this behavior takes care about menu routing and giving time
00774             // to the pseudo-events.
00775         new UMacAppMenu();
00776             // for MacApp, we can create automatically the pseudo menu handling.
00777     }
00778 #endif
00779 #if qMacPP
00780     static bool firstTime = true;
00781     if(firstTime && LCommander::GetTopCommander() != 0L)
00782     {
00783         firstTime = false;
00784         LCommander::GetTopCommander()->AddAttachment(NEW LMainPseudoAttachment());
00785     }
00786 #endif
00787 }
00788
00789 UWidget::~UWidget()
00790 {
00791     std::vector<UCmdTarget *>::iterator i;
00792     for(i = m_listeners.begin(); i != m_listeners.end(); ++i)
00793     {
00794         delete *i;
00795     }
00796     std::map<int, UWidget *>::iterator j;
00797     for(j = m_tabs.begin(); j != m_tabs.end(); ++j)
00798     {
00799         delete (*j).second;
00800     }
00801     if(HasFocus())
00802         sFocusWidID = -1;
00803 }
00804
00805 void UWidget::AddListener(UCmdTarget * listener)
00806 {
00807     m_listeners.push_back(listener);
00808 }
00809
00810 int UWidget::UDispatchMessage(int/*UEventType*/ evt, int arg1, void *arg2, UDispatchInfo & dispatchInfo)
00811 {
00812     std::vector<UCmdTarget *>::iterator i;
00813     for(i = m_listeners.begin(); i != m_listeners.end(); ++i)
00814     {
00815         (*i)->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00816     }
00817     return UCmdTarget::UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00818 }
00819
00820 void *UWidget::GetWidget(int cmd) const
00821 {
00822     std::map<int, void *>::const_iterator i = m_widgets.find(cmd);
00823     if(i == m_widgets.end())
00824     {
00825         UAppConsole("Unable to find widget id : %d (file %s:%d)\n", cmd, __FILE__, __LINE__);
00826 #ifdef DEBUG
00827         printf( "Valid Ids are:\n");
00828         for ( i = m_widgets.begin(); i != m_widgets.end(); ++i) {
00829             printf( "    Id: %d, Addr: 0x%x\n", (*i).first, (unsigned int)(*i).second);
00830         }
00831 #endif
00832         return 0L;
00833     }
00834     return (*i).second;
00835 }
00836
00837 const char *UWidget::GetTooltip(int cmd) const
00838 {
00839     std::map<int, UStr>::const_iterator i = m_tooltips.find(cmd);
00840     if(i == m_tooltips.end())
00841     {
00842         UAppConsole("Unable to find widget id : %d (file %s:%d)\n", cmd, __FILE__, __LINE__);
00843 #ifdef DEBUG
00844         printf( "Valid Ids are:\n");
00845         for ( i = m_tooltips.begin(); i != m_tooltips.end(); ++i) {
00846             printf( "    Id: %d, Str: '%s'\n", (*i).first, (*i).second.c_str());
00847         }
00848 #endif
00849         return 0L;
00850     }
00851     return (*i).second;
00852 }
00853
00854 void UWidget::OnGetLoc(int cmd, URECT * r)
00855 {
00856     r->left = 0; // sanity
00857     r->right = 0;
00858     r->top = 0;
00859     r->bottom = 0;
00860
00861     void *w = GetWidget(cmd);
00862     if(w == 0L)
00863         return;
00864
00865 #if qMacAPP
00866     TView *view = (TView *)w;
00867     CViewRect mr = view->GetFrame();
00868     view->SuperViewToLocal(mr);
00869     view->LocalToRootView(mr);
00870     r->left = mr.left;
00871     r->right = mr.right;
00872     r->top = mr.top;
00873     r->bottom = mr.bottom;
00874 #endif
00875 #if qMacPP
00876     LPane *view = (LPane *)w;
00877     SPoint32 outLocation;
00878     SDimension16 outSize;
00879     view->GetFrameLocation(outLocation);
00880     view->GetFrameSize(outSize);
00881
00882     *r = URect(UPoint(outLocation.h, outLocation.v), USize(outSize.width, outSize.height));
00883 #endif
00884 #ifdef WIN32
00885     CRect mr;
00886     CWnd *wnd = (CWnd *)w;
00887     wnd->GetClientRect(mr);
00888     CWnd *parent = wnd->GetParent();
00889     if(parent != 0L)
00890     {
00891         wnd->ClientToScreen(mr);
00892         parent->ScreenToClient(mr);
00893     }
00894     r->left = mr.left;
00895     r->right = mr.right;
00896     r->top = mr.top;
00897     r->bottom = mr.bottom;
00898 #endif
00899 }
00900
00901 void UWidget::OnSetLoc(int cmd, const URECT * r)
00902 {
00903     void *w = GetWidget(cmd);
00904     if(w == 0L)
00905         return;
00906
00907 #if qMacAPP
00908     TView *view = (TView *)w;
00909     CViewRect mr(r->left, r->top, r->right, r->bottom);
00910     if(mr.right < mr.left)
00911         mr.right = mr.left;
00912     if(mr.bottom < mr.top)
00913         mr.bottom = mr.top;
00914     view->RootViewToLocal(mr);
00915     view->LocalToSuperView(mr);
00916     view->SetFrame(mr, true);
00917 #endif
00918 #if qMacPP
00919     LPane *view = (LPane *)w;
00920     SPoint32 oldLocation;
00921     view->GetFrameLocation(oldLocation);
00922     URect newDim(*r);
00923     UPoint offset = newDim.TopLeft() - UPoint(oldLocation.h, oldLocation.v);
00924     view->ResizeFrameTo(newDim.Width(), newDim.Height(), true);
00925     view->MoveBy(offset.x, offset.y, true);
00926 #endif
00927 #ifdef WIN32
00928     CRect wr(r->left, r->top, r->right, r->bottom);
00929     CWnd *wnd = (CWnd *)w;
00930     wnd->MoveWindow(wr, TRUE);
00931 #endif
00932 }
00933
00934 void UWidget::OnSetTooltip(int cmd, UCmdUI *pCmdUI)
00935 {
00936     const char *tooltip = GetTooltip(cmd);
00937     if(tooltip == 0L)
00938         return;
00939
00940     pCmdUI->SetTooltip(tooltip);
00941 }
00942
00943 bool UWidget::WidgetIsActive(int cmd) const
00944 {
00945     void *w = GetWidget(cmd);
00946     if(w == 0L)
00947         return false;
00948
00949 #ifdef WIN32
00950     CWnd *wnd = (CWnd *)w;
00951
00952     bool res = false;
00953
00954     CWnd* parent = wnd->GetOwner();
00955     if(parent && (HWND)*parent->GetFocus() == (HWND)*wnd)
00956         res = true;
00957
00958     return res;
00959 #endif
00960     return false;
00961 }
00962
00963 void UWidget::AddTooltip(int cmd, const char *tooltipID)
00964 {
00965     std::map<int, UStr>::value_type val(cmd, UStr(tooltipID));
00966     m_tooltips.insert(val);
00967 }
00968
00969 void UWidget::OnInitWidget(int cmd, void *widget)
00970 {
00971     std::map<int, void *>::value_type val(cmd, widget);
00972     m_widgets.insert(val);
00973
00974 #ifdef WIN32
00975
00976 #endif
00977 #if qMacPP
00978     LPane *view = (LPane *)widget;
00979     if(view != 0L)
00980     {
00981         // fetch the inside widgets and add them the the widget list
00982         static bool sSemaphore = false;
00983         USemaphore policeman(sSemaphore);
00984         if(!policeman.IsEnteredTwice())
00985         {
00986             macpp_fecthview(GetWidID(), view);
00987         }
00988
00989         LWindow *wind = dynamic_cast<LWindow*>(view);
00990         if(wind != 0L)
00991         {
00992             LPseudoWinAttachment *attach = NEW LPseudoWinAttachment(GetWidID());
00993             wind->AddAttachment(attach);
00994             macpp_linkbroadcasters(wind, attach);
00995
00996             SPaneInfo inPaneInfo;
00997             memset(&inPaneInfo, 0, sizeof(SPaneInfo));
00998             inPaneInfo.superView = wind;
00999             NEW UPseudoFakePane(inPaneInfo, attach);
01000
01001             // call the create callback
01002             UEventSendMessage(GetWidID(), EV_CREATE, 0, 0L);
01003         }
01004     }
01005 #endif
01006 #if qMacAPP
01007     TView *view = (TView *)widget;
01008     if(MA_MEMBER(view, TView))
01009     {
01010         // fetch the inside widgets and add them the the widget list
01011         static bool sSemaphore = false;
01012         USemaphore policeman(sSemaphore);
01013         if(!policeman.IsEnteredTwice())
01014         {
01015             macapp_fecthview(GetWidID(), view);
01016             //macapp_workaround_adlib_bug(view);
01017         }
01018
01019         if(MA_MEMBER(view, TWindow))
01020         {
01021             // add the pseudo behaviour which re-routes the events to the pseudo-widget
01022             TPseudoWinBehavior *psbehavior = dynamic_cast_AC(TPseudoWinBehavior*,
01023                 view->GetBehaviorWithIdentifier(TPseudoWinBehavior::kPseudoWinBehavior));
01024
01025             if(psbehavior == 0L)
01026             {
01027                 psbehavior = TH_new TPseudoWinBehavior;
01028                 view->AddBehavior(psbehavior);
01029             }
01030             psbehavior->SetPseudoWidget(GetWidID());
01031
01032             // add the pseudo adorner which intercepts the frame size changes
01033             TPseudoWinAdorner *psadorner = dynamic_cast_AC(TPseudoWinAdorner*,
01034                 view->AdornerWithID(TPseudoWinAdorner::kPseudoWinAdorner));
01035
01036             if(psadorner == 0L)
01037             {
01038                 psadorner = TH_new TPseudoWinAdorner;
01039                 view->AddAdorner(psadorner, kAdornLast, false);
01040             }
01041             psadorner->SetPseudoWidget(GetWidID());
01042
01043             // call the create callback
01044             UEventSendMessage(GetWidID(), EV_CREATE, 0, 0L);
01045         }
01046     }
01047 #endif
01048 #if qGTK
01049     static bool firstTime = true;
01050     if(firstTime)
01051     {
01052         // for the disable/enable handling notification (EV_UPDATEUI)
01053         gdk_event_handler_set((GdkEventFunc)gtkmaindoevent, NULL, NULL);
01054
01055         // listen focus events
01056         focus_in_signal_id = gtk_signal_lookup ("focus_in_event", GTK_TYPE_WIDGET);
01057         gtk_signal_add_emission_hook (focus_in_signal_id, gtkeventwatcher, NULL);
01058         focus_out_signal_id = gtk_signal_lookup ("focus_out_event", GTK_TYPE_WIDGET);
01059         gtk_signal_add_emission_hook (focus_out_signal_id, gtkeventwatcher, NULL);
01060
01061         firstTime = false;
01062     }
01063
01064     // so for every widget mapped, we'll be able to find the pseudo-widget associated with.
01065     gtk_object_set_data(GTK_OBJECT(widget), kUgtkDataToken, (gpointer)UMAKEINT(GetWidID(), cmd));
01066
01067     // we are only interesting about the main widgets here
01068     if(GTK_IS_WIDGET(widget))
01069     {
01070         if(cmd == kUMainWidget)
01071         {
01072             // extract and map to the pseudo widget the sub-widgets begining with 'kUgtkPrefixToken'
01073             g_datalist_foreach (&GTK_OBJECT(widget)->object_data, dataForeach, (gpointer)GetWidID());
01074
01075             // map the destroy callback
01076             gtk_signal_connect (GTK_OBJECT(widget), "destroy",
01077                                 GTK_SIGNAL_FUNC(gtkdestroy), (gpointer)this);
01078
01079             gtk_signal_connect (GTK_OBJECT(widget), "key_press_event",
01080                                 GTK_SIGNAL_FUNC(gtkkeypress), (gpointer)this);
01081
01082             // call the create callback
01083             UEventSendMessage(GetWidID(), EV_CREATE, 0, 0L);
01084         }
01085     }
01086
01087     if(GTK_IS_NOTEBOOK(widget))
01088     {
01089         gtk_signal_connect (GTK_OBJECT(widget), "switch_page",
01090                             GTK_SIGNAL_FUNC(gtkswitchpage),
01091                             (gpointer)UMAKEINT(GetWidID(), cmd));
01092     }
01093
01094     if(GTK_IS_BUTTON(widget))
01095     {
01096         gtk_signal_connect (GTK_OBJECT(widget), "clicked",
01097             GTK_SIGNAL_FUNC(gtkclicked), (gpointer)UMAKEINT(GetWidID(), cmd));
01098     }
01099
01100     if(GTK_IS_MENU_ITEM(widget))
01101     {
01102         gtk_signal_connect(GTK_OBJECT(widget), "activate",
01103             GTK_SIGNAL_FUNC(gtkmenuitemactivate), (gpointer)UMAKEINT(GetWidID(), cmd));
01104     }
01105
01106     if(GTK_IS_COMBO(widget))
01107     {
01108         gtk_signal_connect(GTK_OBJECT(GTK_COMBO(widget)->entry), "activate",
01109             GTK_SIGNAL_FUNC(gtkclicked), (gpointer)UMAKEINT(GetWidID(), cmd));
01110     }
01111
01112     if(GTK_IS_CLIST(widget))
01113     {
01114         gtk_signal_connect (GTK_OBJECT(widget), "select_row",
01115             GTK_SIGNAL_FUNC(gtkselectclist), (gpointer)UMAKEINT(GetWidID(), cmd));
01116
01117         gtk_signal_connect (GTK_OBJECT(widget), "click_column",
01118             GTK_SIGNAL_FUNC(gtkselectclistcolumn), (gpointer)UMAKEINT(GetWidID(), cmd));
01119
01120         gtk_signal_connect_after (GTK_OBJECT (widget), "button_press_event",
01121                                   GTK_SIGNAL_FUNC (gtkclistdblclick), (gpointer)UMAKEINT(GetWidID(), cmd));
01122     }
01123
01124     if(GTK_IS_DRAWING_AREA(widget))
01125     {
01126         gtk_signal_connect_after (GTK_OBJECT(widget), "button_press_event",
01127                                   GTK_SIGNAL_FUNC(gtklayoutclicked), (gpointer)UMAKEINT(GetWidID(), cmd));
01128         gtk_signal_connect (GTK_OBJECT(widget), "expose_event",
01129                             GTK_SIGNAL_FUNC (gtkexposeevent), (gpointer)UMAKEINT(GetWidID(), cmd));
01130         gtk_widget_set_events (GTK_WIDGET(widget), GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
01131     }
01132
01133     if(GTK_IS_LAYOUT(widget))
01134     {
01135         gtk_signal_connect_after (GTK_OBJECT(widget), "button_press_event",
01136                                   GTK_SIGNAL_FUNC(gtklayoutclicked), (gpointer)UMAKEINT(GetWidID(), cmd));
01137         gtk_signal_connect (GTK_OBJECT(widget), "expose_event",
01138                             GTK_SIGNAL_FUNC (gtkexposeevent), (gpointer)UMAKEINT(GetWidID(), cmd));
01139         gtk_widget_set_events (GTK_WIDGET(widget), GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
01140     }
01141 #endif /* qGTK */
01142 }
01143
01144 void UWidget::OnInitTabWidget(int cmd, int page, void *widget)
01145 {
01146 #if qGTK
01147     if(GTK_IS_WIDGET(widget))
01148     {
01149         // extract and map to the pseudo widget the sub-widgets begining with 'kUgtkPrefixToken'
01150         _dataTabForeach data = {GetWidID(), cmd, page};
01151         g_datalist_foreach (&GTK_OBJECT(widget)->object_data, dataTabForeach, (gpointer)&data);
01152     }
01153 #endif /* qGTK */
01154 }
01155
01156 void UWidget::OnBlockHandler(void* widget, int cmd, int event)
01157 {
01158 #ifdef qGTK
01159     if(event == GDK_EXPOSE) {
01160         gtk_signal_handler_block_by_func( GTK_OBJECT(widget),
01161                                           GTK_SIGNAL_FUNC (gtkexposeevent),
01162                                           (gpointer)UMAKEINT(GetWidID(), cmd) );
01163     }
01164 #endif
01165 }
01166
01167 void UWidget::OnUnblockHandler(void* widget, int cmd, int event)
01168 {
01169 #ifdef qGTK
01170     if(event == GDK_EXPOSE) {
01171         gtk_signal_handler_unblock_by_func( GTK_OBJECT(widget),
01172                                             GTK_SIGNAL_FUNC (gtkexposeevent),
01173                                             (gpointer)UMAKEINT(GetWidID(), cmd));
01174     }
01175 #endif
01176 }
01177
01178 int UWidget::OnGetState(int cmd)
01179 {
01180     void *w = GetWidget(cmd);
01181     if(w == 0L)
01182         return 0;
01183
01184     int state = 0; // sanity
01185
01186 #ifdef WIN32
01187     CWnd *wnd = (CWnd *)w;
01188
01189     if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoRotButton)))
01190     {
01191         CPseudoRotButton *btn = (CPseudoRotButton *)wnd;
01192         state = btn->GetCurrent();
01193     }
01194     else if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoToggle)))
01195     {
01196         CPseudoToggle *btn = (CPseudoToggle *)wnd;
01197         state = btn->GetState();
01198     }
01199     else if(wnd->IsKindOf(RUNTIME_CLASS(CButton)))
01200     {
01201         CButton *btn = (CButton *)wnd;
01202         state = btn->GetCheck() != 0;
01203     }
01204     else
01205     {
01206         CString s;
01207         wnd->GetWindowText(s);
01208         sscanf(s, "%d", &state);
01209     }
01210 #endif
01211 #if qGTK
01212     if(GTK_IS_TOGGLE_BUTTON(w))
01213     {
01214         state = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)) != 0;
01215     }
01216     else if(GTK_IS_ENTRY(w))
01217     {
01218         gchar *text = gtk_entry_get_text(GTK_ENTRY(w));
01219         sscanf(text, "%d", &state);
01220     }
01221 #endif
01222 #if qMacPP
01223     LPane *view = (LPane *)w;
01224     LCheckBox *check;
01225     LRadioButton *rad;
01226     LEditText *edit;
01227     LStaticText *stat;
01228     LBevelButton *bevel;
01229     UPseudoRotButton *rot;
01230     LCheckBoxGroupBox *groupbox;
01231     LPageController *tabctrl;
01232     LTabsControl *tabctrl2;
01233     LControl *ctrl;
01234     if((check = dynamic_cast<LCheckBox *>(view)) != 0L)
01235     {
01236         state = check->GetValue() == Button_On ? 1 : 0;
01237     }
01238     else if((rad = dynamic_cast<LRadioButton *>(view)) != 0L)
01239     {
01240         state = rad->GetValue() == Button_On ? 1 : 0;
01241     }
01242     else if((edit = dynamic_cast<LEditText *>(view)) != 0L)
01243     {
01244         LStr255 pstr;
01245         edit->GetText(pstr);
01246         state = (SInt32)pstr;
01247     }
01248     else if((stat = dynamic_cast<LStaticText *>(view)) != 0L)
01249     {
01250         LStr255 pstr;
01251         stat->GetText(pstr);
01252         state = (SInt32)pstr;
01253     }
01254     else if((groupbox = dynamic_cast<LCheckBoxGroupBox *>(view)) != 0L)
01255     {
01256         state = groupbox->GetValue() == Button_On ? 1 : 0;
01257     }
01258     else if((rot = dynamic_cast<UPseudoRotButton *>(view)) != 0L)
01259     {
01260         state = rot->GetCurrentState();
01261     }
01262     else if((bevel = dynamic_cast<LBevelButton *>(view)) != 0L)
01263     {
01264         state = bevel->GetValue() == Button_On ? 1 : 0;
01265     }
01266     else if((tabctrl = dynamic_cast<LPageController *>(view)) != 0L)
01267     {
01268         state = tabctrl->GetCurrentPageIndex() - 1;
01269     }
01270     else if((tabctrl2 = dynamic_cast<LTabsControl *>(view)) != 0L)
01271     {
01272         state = tabctrl2->GetValue() - 1;
01273     }
01274     else if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
01275     {
01276         state = ctrl->GetValue();
01277     }
01278 #endif
01279 #if qMacAPP
01280     TView *view = (TView *)w;
01281     if(MA_MEMBER(view, TCheckBox))
01282     {
01283         TCheckBox *check = (TCheckBox *)view;
01284         state = check->GetState();
01285     }
01286     else if(MA_MEMBER(view, TRadio))
01287     {
01288         TRadio *rad = (TRadio *)view;
01289         state = rad->GetState();
01290     }
01291     else if(MA_MEMBER(view, TNumberText))
01292     {
01293         TNumberText *num = (TNumberText *)view;
01294         state = num->GetValue();
01295     }
01296 #endif
01297
01298     return state;
01299 }
01300
01301 void UWidget::OnGetFloat(int cmd, float *f)
01302 {
01303     *f = 0.0; // sanity
01304
01305     void *w = GetWidget(cmd);
01306     if(w == 0L)
01307         return;
01308
01309 #if qMacPP
01310     LPane *view = (LPane *)w;
01311     LEditText *edit;
01312     LStaticText *stat;
01313     if((edit = dynamic_cast<LEditText *>(view)) != 0L)
01314     {
01315         LStr255 pstr;
01316         edit->GetText(pstr);
01317         *f = (double)pstr;
01318     }
01319     else if((stat = dynamic_cast<LStaticText *>(view)) != 0L)
01320     {
01321         LStr255 pstr;
01322         stat->GetText(pstr);
01323         *f = (double)pstr;
01324     }
01325 #endif
01326 #if qMacAPP
01327     TView *view = (TView *)w;
01328     if(MA_MEMBER(view, TPseudoDoubleNumberText))
01329     {
01330         TPseudoDoubleNumberText *num = (TPseudoDoubleNumberText *)view;
01331         *f = num->GetValue();
01332     }
01333 #endif
01334 #ifdef WIN32
01335     CWnd *wnd = (CWnd *)w;
01336
01337     CString s;
01338     wnd->GetWindowText(s);
01339     sscanf(s, "%f", f);
01340 #endif
01341 }
01342
01343 void UWidget::OnSetState(int cmd, int state)
01344 {
01345     void *w = GetWidget(cmd);
01346     if(w == 0L)
01347         return;
01348
01349 #ifdef WIN32
01350     CWnd *wnd = (CWnd *)w;
01351
01352     if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoRotButton)))
01353     {
01354         CPseudoRotButton *btn = (CPseudoRotButton *)wnd;
01355         btn->DoRotate(state);
01356     }
01357     else if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoToggle)))
01358     {
01359         CPseudoToggle *btn = (CPseudoToggle *)wnd;
01360         btn->SetState(state);
01361     }
01362     else if(wnd->IsKindOf(RUNTIME_CLASS(CButton)))
01363     {
01364         CButton *btn = (CButton *)wnd;
01365         btn->SetCheck(state != 0);
01366     }
01367     else
01368     {
01369         USemaphore policeman(m_noDispatch);
01370         char tmp[100];
01371         sprintf(tmp, "%d", state);
01372         wnd->SetWindowText(tmp);
01373     }
01374 #endif
01375 #if qGTK
01376     if(GTK_IS_TOGGLE_BUTTON(w))
01377     {
01378         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), state != 0);
01379     }
01380     else if(GTK_IS_ENTRY(w))
01381     {
01382         char tmp[20];
01383         sprintf(tmp, "%d", state);
01384         gtk_entry_set_text(GTK_ENTRY(w), tmp);
01385     }
01386 #endif
01387 #if qMacPP
01388     USemaphore policeman(gTurnOffBroadcast);
01389
01390     LPane *view = (LPane *)w;
01391     LCheckBox *check;
01392     LRadioButton *rad;
01393     LEditText *edit;
01394     LStaticText *stat;
01395     UPseudoRotButton *rot;
01396     LCheckBoxGroupBox *groupbox;
01397     LPageController *tabctrl;
01398     LTabsControl *tabctrl2;
01399     LControl *ctrl;
01400     if((check = dynamic_cast<LCheckBox *>(view)) != 0L)
01401     {
01402         check->SetValue(state ? Button_On : Button_Off);
01403     }
01404     else if((rad = dynamic_cast<LRadioButton *>(view)) != 0L)
01405     {
01406         rad->SetValue(state ? Button_On : Button_Off);
01407     }
01408     else if((groupbox = dynamic_cast<LCheckBoxGroupBox *>(view)) != 0L)
01409     {
01410         groupbox->SetValue(state ? Button_On : Button_Off);
01411     }
01412     else if((edit = dynamic_cast<LEditText *>(view)) != 0L)
01413     {
01414         LStr255 pstr((SInt32)state);
01415         edit->SetText(pstr);
01416     }
01417     else if((stat = dynamic_cast<LStaticText *>(view)) != 0L)
01418     {
01419         LStr255 pstr((SInt32)state);
01420         stat->SetText(pstr);
01421     }
01422     else if((rot = dynamic_cast<UPseudoRotButton *>(view)) != 0L)
01423     {
01424         rot->DoRotate(state);
01425     }
01426     else if((tabctrl = dynamic_cast<LPageController *>(view)) != 0L)
01427     {
01428         tabctrl->SetSelectedPageButtonByIndex(state + 1, false);
01429     }
01430     else if((tabctrl2 = dynamic_cast<LTabsControl *>(view)) != 0L)
01431     {
01432         tabctrl2->SetValue(state + 1);
01433     }
01434     else if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
01435     {
01436         ctrl->SetValue(state);
01437     }
01438 #endif
01439 #if qMacAPP
01440     TView *view = (TView *)w;
01441     if(MA_MEMBER(view, TCheckBox))
01442     {
01443         TCheckBox *check = (TCheckBox *)view;
01444         check->SetState(state, true);
01445     }
01446     else if(MA_MEMBER(view, TRadio))
01447     {
01448         TRadio *rad = (TRadio *)view;
01449         rad->SetState(state, true);
01450     }
01451     else if(MA_MEMBER(view, TNumberText))
01452     {
01453         TNumberText *num = (TNumberText *)view;
01454         num->SetValue(state, true);
01455     }
01456     else if(MA_MEMBER(view, TPseudoRotateIconButton))
01457     {
01458         TPseudoRotateIconButton *rot = (TPseudoRotateIconButton *)view;
01459         rot->DoRotate(state);
01460     }
01461     else if(MA_MEMBER(view, TProgressIndicator))
01462     {
01463         TProgressIndicator *progress = (TProgressIndicator *)view;
01464         progress->SetValue(state, true);
01465     }
01466 #endif
01467 }
01468
01469 void UWidget::OnSetFloat(int cmd, const float *f)
01470 {
01471     void *w = GetWidget(cmd);
01472     if(w == 0L)
01473         return;
01474
01475 #if qMacAPP
01476     TView *view = (TView *)w;
01477     if(MA_MEMBER(view, TPseudoDoubleNumberText))
01478     {
01479         TPseudoDoubleNumberText *num = (TPseudoDoubleNumberText *)view;
01480         num->SetValue(*f, true);
01481     }
01482 #endif
01483 #if qMacPP
01484     USemaphore policeman(gTurnOffBroadcast);
01485
01486     LPane *view = (LPane *)w;
01487     LEditText *edit;
01488     LStaticText *stat;
01489     if((edit = dynamic_cast<LEditText *>(view)) != 0L)
01490     {
01491         LStr255 pstr((long double)*f, "\p#####.##");
01492         edit->SetText(pstr);
01493     }
01494     else if((stat = dynamic_cast<LStaticText *>(view)) != 0L)
01495     {
01496         LStr255 pstr((long double)*f, "\p#####.##");
01497         stat->SetText(pstr);
01498     }
01499 #endif
01500 #ifdef WIN32
01501     USemaphore policeman(m_noDispatch);
01502     CWnd *wnd = (CWnd *)w;
01503
01504     char tmp[100];
01505     sprintf(tmp, "%f", *f);
01506     wnd->SetWindowText(tmp);
01507 #endif
01508 }
01509
01510 void UWidget::OnEnableCmd(int cmd, int state)
01511 {
01512     void *w = GetWidget(cmd);
01513     if(w == 0L)
01514         return;
01515
01516 #if qMacPP
01517     LPane *view = (LPane *)w;
01518     if(state)
01519         view->Enable();
01520     else
01521         view->Disable();
01522 #endif
01523 #if qMacAPP
01524     TView *view = (TView *)w;
01525     if(MA_MEMBER(view, TView))
01526     {
01527         view->SetActiveState(state != 0, true);
01528     }
01529 #endif
01530 #if qGTK
01531     if(GTK_IS_WIDGET(w))
01532     {
01533         gtk_widget_set_sensitive(GTK_WIDGET(w), state != 0);
01534     }
01535 #endif
01536 #ifdef WIN32
01537     CWnd *wnd = (CWnd *)w;
01538
01539     wnd->EnableWindow(state != 0);
01540 #endif
01541 }
01542
01543 bool UWidget::IsEnabled(int cmd)
01544 {
01545     void *w = GetWidget(cmd);
01546     if(w == 0L)
01547         return false;
01548
01549 #ifdef qGTK
01550     return GTK_WIDGET_SENSITIVE(GTK_WIDGET(w));
01551 #else
01552     return true;
01553 #endif
01554
01555 }
01556
01557 void UWidget::OnChgFocus(int cmd)
01558 {
01559     void *w = GetWidget(cmd);
01560     if(w == 0L)
01561         return;
01562
01563 #if qMacPP
01564     LPane *pane = (LPane *)w;
01565     LCommander *target = dynamic_cast<LCommander *>(pane);
01566     if(target != 0L)
01567     {
01568         LCommander::SwitchTarget(target);
01569     }
01570 #endif
01571 #if qMacAPP
01572     TView *view = (TView *)w;
01573     if(MA_MEMBER(view, TView))
01574     {
01575         if(view->GetWindow() != 0L)
01576             view->GetWindow()->SetWindowTarget(view);
01577     }
01578 #endif
01579 #if qGTK
01580     if(GTK_IS_WIDGET(w))
01581     {
01582         gtk_widget_grab_focus(GTK_WIDGET(w)); // TODO doesn't work
01583
01584         UEventNotifyMessage(EV_UPDATEFOCUS, 0, GTK_OBJECT(w));
01585     }
01586
01587 #endif
01588 #ifdef WIN32
01589     CWnd *wnd = (CWnd *)w;
01590
01591     wnd->SetFocus();
01592 #endif
01593 }
01594
01595 void UWidget::OnSetDefault(int cmd)
01596 {
01597     void *w = GetWidget(cmd);
01598     if(w == 0L)
01599         return;
01600
01601 #if qMacPP
01602 #endif
01603 #if qMacAPP
01604 #endif
01605 #if qGTK
01606     if(GTK_IS_WIDGET(w))
01607     {
01608         gtk_widget_grab_default(GTK_WIDGET(w));
01609     }
01610 #endif
01611 #ifdef WIN32
01612 #endif
01613 }
01614 void UWidget::OnInvalidate(int cmd)
01615 {
01616     void *w = GetWidget(cmd);
01617     if(w == 0L)
01618         return;
01619
01620 #if qMacAPP
01621     TView *view = (TView *)w;
01622     if(MA_MEMBER(view, TView))
01623     {
01624         view->ForceRedraw();
01625     }
01626 #endif
01627 #if qMacPP
01628     LPane *pane = (LPane *)w;
01629     pane->Refresh();
01630 #endif
01631 #ifdef WIN32
01632     CWnd *wnd = (CWnd *)w;
01633
01634     wnd->Invalidate();
01635 #endif
01636 }
01637
01638 void UWidget::OnRedraw(int cmd)
01639 {
01640     void *w = GetWidget(cmd);
01641     if(w == 0L)
01642         return;
01643
01644 #if qMacAPP
01645     TView *view = (TView *)w;
01646     if(MA_MEMBER(view, TView))
01647     {
01648         view->ForceRedraw();
01649     }
01650 #endif
01651 #if qMacPP
01652     LPane *pane = (LPane *)w;
01653     pane->Draw(nil);
01654 #endif
01655 #ifdef WIN32
01656     CWnd *wnd = (CWnd *)w;
01657
01658     wnd->Invalidate();
01659 #endif
01660 }
01661
01662
01663 void UWidget::OnSetIcon(int cmd, void *p)
01664 {
01665     void *w = GetWidget(cmd);
01666     if(w == 0L)
01667         return;
01668
01669 #ifdef qUnix
01670     if(GTK_IS_PIXMAP(w))
01671     {
01672         GtkPixmap *widget = GTK_PIXMAP(w);
01673         GtkPixmap *pix = GTK_PIXMAP(p);
01674         gtk_pixmap_set(widget, pix->pixmap, pix->mask);
01675     }
01676 #endif
01677 }
01678
01679 void UWidget::OnSetText(int cmd, const char *text)
01680 {
01681     void *w = GetWidget(cmd);
01682     if(w == 0L)
01683         return;
01684
01685 #ifdef WIN32
01686     USemaphore policeman(m_noDispatch);
01687     CWnd *wnd = (CWnd *)w;
01688     wnd->SetWindowText(text);
01689 #endif
01690 #if qGTK
01691     if(GTK_IS_WINDOW(w))
01692     {
01693         gtk_window_set_title(GTK_WINDOW(w), text);
01694     }
01695     else if(GTK_IS_BUTTON(w))
01696     {
01697         GtkLabel *label = getLabelFromContainer(GTK_CONTAINER(w));
01698         if(label != 0L)
01699             gtk_label_set_text(label, text);
01700         else
01701             g_warning("Cannot find the label of '%s'\n", gtk_widget_get_name(GTK_WIDGET(w)));
01702     }
01703     else if(GTK_IS_TEXT(w))
01704     {
01705         GtkText *t = GTK_TEXT(w);
01706         gtk_text_set_point(t, 0);
01707         gtk_text_forward_delete(t, gtk_text_get_length(t));
01708         gtk_text_insert(t, 0L, 0L, 0L, text, -1);
01709     }
01710     else if(GTK_IS_ENTRY(w))
01711     {
01712         gtk_entry_set_text(GTK_ENTRY(w), text);
01713     }
01714     else if(GTK_IS_COMBO(w))
01715     {
01716         gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(w)->entry), text);
01717     }
01718     else if(GTK_IS_LABEL(w))
01719     {
01720         GtkLabel *t = GTK_LABEL(w);
01721         gtk_label_set_text(t, text);
01722     }
01723 #endif
01724 #if qMacPP
01725     USemaphore policeman(gTurnOffBroadcast);
01726
01727     LPane *view = (LPane *)w;
01728     LTextEditView *txt;
01729     if((txt = dynamic_cast<LTextEditView *>(view)) != 0L)
01730     {
01731         txt->SetTextPtr((Ptr)text, strlen(text));
01732     }
01733     else
01734     {
01735         LStr255 pstr(text);
01736         LStr255 oldstr;
01737         view->GetDescriptor(oldstr);
01738         if(oldstr != pstr)
01739             view->SetDescriptor(pstr);
01740     }
01741 #endif
01742 #if qMacAPP
01743     TView *view = (TView *)w;
01744     if(MA_MEMBER(view, TCtlMgr))
01745     {
01746         TCtlMgr *ctrl = (TCtlMgr *)view;
01747         CStr255_AC pstr(text);
01748         ctrl->SetText(pstr, true);
01749     }
01750     else if(MA_MEMBER(view, TStaticText))
01751     {
01752         TStaticText *ctrl = (TStaticText *)view;
01753         CStr255_AC pstr(text);
01754         ctrl->SetText(pstr, true);
01755     }
01756     else if(MA_MEMBER(view, TWindow))
01757     {
01758         TWindow *ctrl = (TWindow *)view;
01759         CStr255_AC pstr(text);
01760         ctrl->SetTitle(pstr);
01761     }
01762 #endif
01763 }
01764
01765 void UWidget::OnGetText(int cmd, UStr *text)
01766 {
01767     *text = ""; // sanity
01768
01769     void *w = GetWidget(cmd);
01770     if(w == 0L)
01771         return;
01772
01773 #ifdef WIN32
01774     CWnd *wnd = (CWnd *)w;
01775
01776     CString s;
01777     wnd->GetWindowText(s);
01778     *text = s;
01779 #endif
01780 #if qGTK
01781     if(GTK_IS_WINDOW(w))
01782     {
01783         *text = GTK_WINDOW(w)->title;
01784     }
01785     else if(GTK_IS_BUTTON(w))
01786     {
01787         GtkLabel *label = getLabelFromContainer(GTK_CONTAINER(w));
01788         if(label != 0L)
01789         {
01790             gchar *str;
01791             gtk_label_get(label, &str);
01792
01793             if(str != 0L)
01794                                 *text = str;
01795         }
01796         else
01797             g_warning("Cannot find the label of '%s'\n", gtk_widget_get_name(GTK_WIDGET(w)));
01798     }
01799     else if(GTK_IS_ENTRY(w))
01800     {
01801         *text = gtk_entry_get_text(GTK_ENTRY(w));
01802     }
01803     else if(GTK_IS_COMBO(w))
01804     {
01805         *text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(w)->entry));
01806     }
01807     else if(GTK_IS_TEXT(w))
01808     {
01809         GtkText *t = GTK_TEXT(w);
01810         size_t size = gtk_text_get_length(t);
01811         size_t idx;
01812
01813         for (idx = 0; idx < size; idx++) {
01814             *text << (char)GTK_TEXT_INDEX(t,idx);
01815         }
01816     }
01817     else if(GTK_IS_LABEL(w))
01818     {
01819         GtkLabel *t = GTK_LABEL(w);
01820         gchar *str;
01821         gtk_label_get(t, &str);
01822         if(str != 0L)
01823             *text = str;
01824     }
01825 #endif
01826 #if qMacPP
01827     LPane *view = (LPane *)w;
01828     LTextEditView *txt;
01829     if((txt = dynamic_cast<LTextEditView *>(view)) != 0L)
01830     {
01831         LStr255 pstr;
01832         Handle hdl = txt->GetTextHandle();
01833         text->set((const char *)*hdl, ::GetHandleSize(hdl));
01834     }
01835     else
01836     {
01837         LStr255 pstr;
01838         view->GetDescriptor(pstr);
01839         *text = pstr;
01840     }
01841 #endif
01842 #if qMacAPP
01843     TView *view = (TView *)w;
01844     if(MA_MEMBER(view, TCtlMgr))
01845     {
01846         TCtlMgr *ctrl = (TCtlMgr *)view;
01847         CStr255_AC pstr = ctrl->GetText();
01848         *text = pstr;
01849     }
01850     else if(MA_MEMBER(view, TStaticText))
01851     {
01852         TStaticText *ctrl = (TStaticText *)view;
01853         CStr255_AC pstr = ctrl->GetText();
01854         *text = pstr;
01855     }
01856     else if(MA_MEMBER(view, TWindow))
01857     {
01858         TWindow *ctrl = (TWindow *)view;
01859         CStr255_AC pstr = ctrl->GetTitle();
01860         *text = pstr;
01861     }
01862 #endif
01863 }
01864
01865 void UWidget::OnShowWidget(int cmd, int state)
01866 {
01867     void *w = GetWidget(cmd);
01868     if(w == 0L)
01869         return;
01870
01871 #ifdef WIN32
01872     CWnd *wnd = (CWnd *)w;
01873
01874     wnd->ShowWindow(state ? SW_SHOWNORMAL : SW_HIDE);
01875 #endif
01876 #if qGTK
01877     GtkWidget *wid = (GtkWidget *)w;
01878     if(state)
01879         gtk_widget_show(wid);
01880     else
01881         gtk_widget_hide(wid);
01882 #endif
01883 #if qMacAPP
01884     TView *view = (TView *)w;
01885     view->Show(state != 0, true);
01886 #endif
01887 #if qMacPP
01888     LPane *view = (LPane *)w;
01889     if(state)
01890         view->Show();
01891     else
01892         view->Hide();
01893 #endif
01894 }
01895
01896
01897 //{ functions for slider
01898 void UWidget::OnSetSlider(int cmd, int pos)
01899 {
01900     void *w = GetWidget(cmd);
01901     if(w == 0L)
01902         return;
01903
01904 #ifdef WIN32
01905     CWnd *wnd = (CWnd *)w;
01906
01907     if(wnd->IsKindOf(RUNTIME_CLASS(CSliderCtrl)))
01908     {
01909         CSliderCtrl *slider = (CSliderCtrl *)wnd;
01910         slider->SetPos(pos);
01911     }
01912     else if(wnd->IsKindOf(RUNTIME_CLASS(CScrollBar)))
01913     {
01914         CScrollBar *scroll = (CScrollBar *)wnd;
01915         scroll->SetScrollPos(pos);
01916     }
01917 #endif
01918 #if qMacAPP
01919     TView *view = (TView *)w;
01920     if(MA_MEMBER(view, TSlider) || MA_MEMBER(view, TScrollBar))
01921     {
01922         TCtlMgr *ctrl = (TCtlMgr *)view;
01923         ctrl->SetValue(pos, true);
01924     }
01925 #endif
01926 #if qMacPP
01927     USemaphore policeman(gTurnOffBroadcast);
01928
01929     LPane *view = (LPane *)w;
01930     LControl *ctrl;
01931     if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
01932     {
01933         ctrl->SetValue(pos);
01934     }
01935 #endif
01936 }
01937
01938
01939 void UWidget::OnGetSliderProperty(int cmd, USLIDER *prop)
01940 {
01941     void *w = GetWidget(cmd);
01942     if(w == 0L)
01943         return;
01944
01945 #ifdef WIN32
01946     CWnd *wnd = (CWnd *)w;
01947
01948     if(wnd->IsKindOf(RUNTIME_CLASS(CSliderCtrl)))
01949     {
01950         CSliderCtrl *slider = (CSliderCtrl *)wnd;
01951         prop->max = slider->GetRangeMax();
01952         prop->min = slider->GetRangeMin();
01953         prop->inc = slider->GetPageSize();
01954         prop->pos = slider->GetPos();
01955     }
01956     else if(wnd->IsKindOf(RUNTIME_CLASS(CScrollBar)))
01957     {
01958         SCROLLINFO info;
01959         CScrollBar *scroll = (CScrollBar *)wnd;
01960         VERIFY(scroll->GetScrollInfo(&info));
01961         prop->max = info.nMax;
01962         prop->min = info.nMin;
01963         prop->inc = info.nPage;
01964         prop->pos = info.nPos;
01965     }
01966 #endif
01967 #if qMacAPP
01968     TView *view = (TView *)w;
01969     if(MA_MEMBER(view, TSlider) || MA_MEMBER(view, TScrollBar))
01970     {
01971         TCtlMgr *ctrl = (TCtlMgr *)view;
01972         prop->max = ctrl->GetMaximum();
01973         prop->min = ctrl->GetMinimum();
01974         if(MA_MEMBER(ctrl, TPseudoScrollBar))
01975             prop->inc = ((TPseudoScrollBar *)ctrl)->fPageStep;
01976         else
01977             prop->inc = 1;
01978         prop->pos = ctrl->GetValue();
01979     }
01980 #endif
01981 #if qMacPP
01982     LPane *view = (LPane *)w;
01983     LControl *ctrl;
01984     if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
01985     {
01986         prop->max = ctrl->GetMaxValue();
01987         prop->min = ctrl->GetMinValue();
01988         LPseudoWinAttachment *attach = macpp_getattachwindow(this);
01989         prop->inc = attach != 0L ? attach->GetPageValue(cmd) : 1;
01990         prop->pos = ctrl->GetValue();
01991     }
01992 #endif
01993 }
01994
01995 void UWidget::OnSetSliderProperty(int cmd, const USLIDER *prop)
01996 {
01997     void *w = GetWidget(cmd);
01998     if(w == 0L)
01999         return;
02000
02001 #ifdef WIN32
02002     CWnd *wnd = (CWnd *)w;
02003
02004     if(wnd->IsKindOf(RUNTIME_CLASS(CSliderCtrl)))
02005     {
02006         CSliderCtrl *slider = (CSliderCtrl *)wnd;
02007         slider->SetRange(prop->min, prop->max);
02008         slider->SetPos(prop->pos);
02009         slider->SetPageSize(prop->inc);
02010     }
02011     else if(wnd->IsKindOf(RUNTIME_CLASS(CScrollBar)))
02012     {
02013         SCROLLINFO info;
02014         memset(&info, 0, sizeof(info));
02015         info.cbSize = sizeof(info);
02016         info.fMask = SIF_DISABLENOSCROLL | SIF_PAGE | SIF_POS | SIF_RANGE;
02017         info.nMax = prop->max;
02018         info.nMin = prop->min;
02019         info.nPos = prop->pos;
02020         info.nPage = prop->inc;
02021         if(info.nPage > (UINT)(info.nMax - info.nMin))
02022             info.nPage = (UINT)(info.nMax - info.nMin) / 2;
02023         CScrollBar *scroll = (CScrollBar *)wnd;
02024         VERIFY(scroll->SetScrollInfo(&info));
02025         if(prop->max != prop->min)
02026             scroll->EnableWindow(TRUE);
02027     }
02028 #endif
02029 #if qMacAPP
02030     TView *view = (TView *)w;
02031     if(MA_MEMBER(view, TSlider) || MA_MEMBER(view, TScrollBar))
02032     {
02033         TCtlMgr *ctrl = (TCtlMgr *)view;
02034         ctrl->SetValues(prop->pos, prop->min, prop->max, true);
02035         if(MA_MEMBER(ctrl, TPseudoScrollBar))
02036             ((TPseudoScrollBar *)ctrl)->fPageStep = prop->inc;
02037     }
02038 #endif
02039 #if qMacPP
02040     USemaphore policeman(gTurnOffBroadcast);
02041
02042     LPane *view = (LPane *)w;
02043     LControl *ctrl;
02044     if((ctrl = dynamic_cast<LControl *>(view)) != 0L)
02045     {
02046         ctrl->SetMaxValue(prop->max);
02047         ctrl->SetMinValue(prop->min);
02048         ctrl->SetValue(prop->pos);
02049         LPseudoWinAttachment *attach = macpp_getattachwindow(this);
02050         if(attach != 0L)
02051             attach->SetPageValue(cmd, prop->inc);
02052     }
02053 #endif
02054 }
02055
02056 //}
02057 //{ functions for timer
02058 void UWidget::AddTimer(long lap, int cmd)
02059 {
02060     UTimer timer(lap, ::UTickCount(), cmd);
02061     m_timers.push_back(timer);
02062 }
02063
02064 void UWidget::RemoveTimer(int cmd)
02065 {
02066     std::vector<UTimer>::iterator i;
02067     for(i = m_timers.begin(); i != m_timers.end(); i++)
02068     {
02069         if((*i).m_cmd == cmd)
02070         {
02071             (*i).m_cmd = 0; // delay removing
02072             break;
02073         }
02074     }
02075 }
02076
02077 std::vector<UTimer> & UWidget::GetTimers(void)
02078 {
02079     // removed the delayed items
02080     std::vector<UTimer>::iterator i;
02081     for(i = m_timers.begin(); i != m_timers.end(); ++i)
02082     {
02083         if((*i).m_cmd == 0)
02084         {
02085             m_timers.erase(i);
02086             break;
02087         }
02088     }
02089
02090     return m_timers;
02091 }
02092
02093 //}
02094 void UWidget::OnUpdateUI()
02095 {
02096     std::map<int, void *>::const_iterator i;
02097     for(i = m_widgets.begin(); i != m_widgets.end(); ++i)
02098     {
02099         UCmdUI pUI((*i).first);
02100         pUI.m_widget = (*i).second;
02101         UEventSendMessage(GetWidID(), EV_UPDTCMD, pUI.m_nID, &pUI);
02102     }
02103 }
02104
02105 int UWidget::DoModal(int id)
02106 {
02107     bool result = false;
02108
02109 #if !defined(qMacAPP) && !defined(qMacPP) && !defined(WIN32)
02110     void *w = GetWidget(kUMainWidget);
02111     if(w == 0L)
02112     {
02113         UAppConsole("Unable to find widget id : %d (file %s:%d)\n", kUMainWidget, __FILE__, __LINE__);
02114         return result;
02115     }
02116 #endif // !qMacAPP && !WIN32
02117
02118 #if qGTK || qMacPP
02119     if(m_modalLoop)
02120     {
02121         UAppConsole("Trying to break a modal state\n");
02122         return result;
02123     }
02124 #endif
02125
02126 #ifdef WIN32
02127     CPseudoDlg dlg(id, this);
02128     m_curModal = &dlg;
02129     result = dlg.DoModal() == IDOK;
02130     if(!result)
02131         Dismiss();
02132     m_curModal = 0L;
02133 #endif
02134 #if qMacAPP
02135     TWindow *view = gViewServer->NewTemplateWindow(id, nil);
02136     ThrowIfNULL_AC(view);
02137
02138     UEventSendMessage(GetWidID(), EV_INIT_WIDGET, kUMainWidget, view);
02139
02140     DoDataExchange(true);
02141     IDType resid = view->PoseModally();
02142
02143     TDialogBehavior* dlgb;
02144     if((dlgb = view->GetDialogBehavior()) != 0L)
02145     {
02146         result = resid == dlgb->fDefaultItem;
02147     }
02148
02149     if(result)
02150         DoDataExchange(false);
02151     else
02152         Dismiss();
02153
02154     view->Close();
02155 #endif
02156 #if qMacPP
02157     StDialogHandler theHandler(id, LCommander::GetTopCommander());
02158     LWindow *theDialog = theHandler.GetDialog();
02159
02160     if(theDialog != 0L)
02161     {
02162         UEventSendMessage(GetWidID(), EV_INIT_WIDGET, kUMainWidget, theDialog);
02163
02164         DoDataExchange(true);
02165         theDialog->Show();
02166         theHandler.SetSleepTime(6);
02167
02168         m_modalLoop = true;
02169         MessageT hitMessage;
02170         while (m_modalLoop)
02171         {       // Let DialogHandler process events
02172             hitMessage = theHandler.DoDialog();
02173
02174             if (hitMessage == msg_OK || hitMessage == msg_Cancel)
02175                 break;
02176         }
02177
02178         result = m_modalLoop ? hitMessage == msg_OK : m_modalRes;
02179
02180         if(result)
02181             DoDataExchange(false);
02182         else
02183             Dismiss();
02184
02185         //theDialog->Hide();
02186         //theDialog->DoClose();
02187     }
02188 #endif
02189 #if qGTK
02190     if(GTK_IS_WINDOW(w))
02191     {
02192         // emulate the click in tab 1
02193         std::map<int, UWidget *>::iterator i;
02194         for(i = m_tabs.begin(); i != m_tabs.end(); ++i)
02195         {
02196             int cmdid = ULOWORD((*i).first);
02197             int pagenum = UHIWORD((*i).first);
02198             if(pagenum == 0)
02199             {
02200                 UEventSendMessage(GetWidID(), EV_PAGE_CHANGED, UMAKEINT(cmdid, pagenum), 0L);
02201                 break;
02202             }
02203         }
02204         gtk_signal_connect(GTK_OBJECT(w),"delete_event", GTK_SIGNAL_FUNC(gtkcancel), this);
02205         DoDataExchange(true);
02206         gtk_widget_show(GTK_WIDGET(w));
02207         m_modalLoop = true;
02208         gtk_grab_add (GTK_WIDGET(w));
02209         while (m_modalLoop)
02210         {
02211             if( gtk_main_iteration_do(TRUE))
02212                 break;
02213         }
02214         gtk_grab_remove (GTK_WIDGET(w));
02215         result = m_modalRes;
02216         m_modalLoop = false; // sanity...
02217         if(result)
02218         {
02219             UEventSendMessage(GetWidID(), EV_PAGE_CHANGED, UMAKEINT(0, -1), 0L);
02220             DoDataExchange(false);
02221         }
02222         else
02223         {
02224             Dismiss();
02225         }
02226         gtk_widget_destroy(GTK_WIDGET(w));
02227     }
02228     else
02229         g_warning("Trying to modal on a non-window\n");
02230 #endif
02231
02232     return result;
02233 }
02234
02235 void UWidget::EndDialog(int result)
02236 {
02237     m_modalRes = result;
02238 #if qGTK || qMacPP
02239     if(!m_modalLoop)
02240         UAppConsole("EndModal called twice\n");
02241
02242     m_modalLoop = false;
02243 #endif
02244 #if qMacAPP
02245     void *w = GetWidget(kUMainWidget);
02246     if(w == 0L)
02247         return;
02248
02249     TWindow *wind = (TWindow *)w;
02250     TDialogBehavior* dlgb;
02251     if(MA_MEMBER(wind, TWindow) && (dlgb = wind->GetDialogBehavior()) != 0L)
02252     {
02253         wind->Dismiss(result ? dlgb->fDefaultItem : dlgb->fCancelItem, result);
02254     }
02255 #endif
02256 #ifdef WIN32
02257     if(m_curModal != 0L)
02258     {
02259         if (result && !m_curModal->UpdateData(TRUE))
02260         {
02261             TRACE0("UpdateData failed during dialog termination.\n");
02262             // the UpdateData routine will set focus to correct item
02263             return;
02264         }
02265         m_curModal->EndDialog(result ? IDOK : IDCANCEL);
02266     }
02267 #endif
02268 }
02269
02270 void UWidget::EndModal(bool result)
02271 {
02272     EndDialog((int)result);
02273 }
02274
02275 void UWidget::OnChgCursor(int cmd, UCURSOR cursor)
02276 {
02277     void *w = GetWidget(cmd);
02278     if(w == 0L)
02279         return;
02280
02281 #if qGTK
02282     if(GTK_IS_WIDGET(w) && GTK_WIDGET(w)->window != 0L)
02283     {
02284         static GdkCursor *cursor_arrow=0L;
02285         static GdkCursor *cursor_watch=0L;
02286         if(cursor_arrow == 0L)
02287         {
02288             cursor_arrow = gdk_cursor_new (GDK_TOP_LEFT_ARROW);
02289             cursor_watch = gdk_cursor_new (GDK_WATCH);
02290         }
02291         if(cursor == uCursArrow)
02292             gdk_window_set_cursor (GTK_WIDGET(w)->window, cursor_arrow);
02293         else if(cursor == uCursWatch)
02294             gdk_window_set_cursor (GTK_WIDGET(w)->window, cursor_watch);
02295     }
02296 #endif
02297 }
02298
02299 //{ functions for tree
02300 void UWidget::OnTreeResetAll(int cmd)
02301 {
02302     void *w = GetWidget(cmd);
02303     if(w == 0L)
02304         return;
02305
02306 #if qGTK
02307     if(!GTK_IS_TREE(w))
02308         return;
02309
02310     GtkTree *tree = GTK_TREE(w);
02311     GList *list = g_list_copy(tree->children);
02312     GList *head = list;
02313     while(list != 0L)
02314     {
02315         GtkWidget *wid = GTK_WIDGET(list->data);
02316         gtk_container_remove(GTK_CONTAINER(tree), wid);
02317         list = (GList *)g_list_next(list);
02318     }
02319     g_list_free(head);
02320 #endif
02321 }
02322
02323 void UWidget::OnTreeInsert(int cmd, UTREE_INSERT *data)
02324 {
02325     data->result = 0L; // sanity
02326
02327     void *w = GetWidget(cmd);
02328     if(w == 0L)
02329         return;
02330
02331 #if qGTK
02332   if(!GTK_IS_TREE(w))
02333         return;
02334
02335     GtkTree *root;
02336     if(data->parent == 0L)
02337         root = GTK_TREE(w);
02338     else
02339     {
02340         GtkTreeItem *item = GTK_TREE_ITEM(data->parent);
02341
02342         if(item->subtree != 0L) {
02343             root = GTK_TREE(item->subtree);
02344         }
02345         else
02346         {
02347             root = GTK_TREE(gtk_tree_new());
02348             gtk_object_set_data(GTK_OBJECT(root), "rf_treeparent", item);
02349             gtk_tree_set_selection_mode (root, GTK_SELECTION_BROWSE); // TODO : find out it with the root
02350             gtk_tree_set_view_mode (root, GTK_TREE_VIEW_ITEM); // TODO : find out it with the root
02351             gtk_tree_item_set_subtree (item, GTK_WIDGET(root));
02352         }
02353     }
02354
02355   GtkTreeItem *item = gtknewtreeitem(data->title, data->icon == 0L ? 0L : GTK_PIXMAP(data->icon));
02356     gtk_object_set_data(GTK_OBJECT(item), "rf_treeitemdata", data->data);
02357     gtk_signal_connect(GTK_OBJECT(item), "select",
02358                        GTK_SIGNAL_FUNC(gtktreeselect), (gpointer)UMAKEINT(GetWidID(), cmd));
02359     gtk_signal_connect(GTK_OBJECT(item), "deselect",
02360                        GTK_SIGNAL_FUNC(gtktreedeselect), (gpointer)UMAKEINT(GetWidID(), cmd));
02361     gtk_signal_connect (GTK_OBJECT(item), "expand",
02362                         GTK_SIGNAL_FUNC(gtktreeexpand), (gpointer)UMAKEINT(GetWidID(), cmd));
02363     gtk_signal_connect (GTK_OBJECT(item), "collapse",
02364                         GTK_SIGNAL_FUNC(gtktreecollapse), (gpointer)UMAKEINT(GetWidID(), cmd));
02365
02366     gtk_tree_append(GTK_TREE(root), GTK_WIDGET(item));
02367   gtk_widget_show (GTK_WIDGET(item));
02368
02369     data->result = (UTREEITEM)item;
02370 #endif
02371 }
02372
02373 void UWidget::OnTreeSetData(int cmd, UTREE_INFO *data)
02374 {
02375     void *w = GetWidget(cmd);
02376     if(w == 0L)
02377         return;
02378
02379 #if qGTK
02380     if(!GTK_IS_TREE(w))
02381         return;
02382
02383     gtk_object_set_data(GTK_OBJECT(data->item), "rf_treeitemdata", data->data);
02384 #endif
02385 }
02386
02387 void UWidget::OnTreeSetIcon(int cmd, UTREE_INFO *data)
02388 {
02389     void *w = GetWidget(cmd);
02390     if(w == 0L)
02391         return;
02392
02393 #if qGTK
02394     if(!GTK_IS_TREE(w))
02395         return;
02396
02397     gtksettreeitemicon(GTK_TREE_ITEM(data->item), GTK_PIXMAP(data->icon));
02398 #endif
02399 }
02400
02401 void UWidget::OnTreeGetSel(int cmd, UTREEITEM *item)
02402 {
02403     *item = 0L; // sanity
02404
02405     void *w = GetWidget(cmd);
02406     if(w == 0L)
02407         return;
02408
02409 #if qGTK
02410     if(!GTK_IS_TREE(w))
02411         return;
02412
02413     GList *sel = GTK_TREE(w)->selection;
02414     if(sel == 0L || !GTK_IS_TREE_ITEM(sel->data))
02415         return;
02416
02417     *item = sel->data;
02418 #endif
02419 }
02420
02421 void UWidget::OnTreeGetInfo(int cmd, UTREE_INFO *desc)
02422 {
02423     // sanity
02424     desc->parent = 0L;
02425     desc->next = 0L;
02426     desc->child = 0L;
02427     desc->data = 0L;
02428     desc->title = 0L;
02429     desc->icon = 0L;
02430     desc->expanded = 0;
02431
02432     void *w = GetWidget(cmd);
02433     if(w == 0L)
02434         return;
02435
02436 #if qGTK
02437     if(!GTK_IS_TREE(w))
02438         return;
02439
02440     GtkTreeItem *item;
02441     if(desc->item == 0L)
02442     {
02443         GList *list = g_list_first(GTK_TREE(w)->children);
02444         GList *next = g_list_next(list);
02445         item = list != 0L ? GTK_TREE_ITEM(list->data) : 0L;
02446         desc->item = item;
02447         desc->next = next != 0L ? GTK_TREE_ITEM(next->data) : 0L;
02448     }
02449     else
02450     {
02451         GtkTree *parent = GTK_TREE(GTK_WIDGET(desc->item)->parent);
02452         GList *list = g_list_find(GTK_TREE(parent)->children, desc->item);
02453         GList *next = g_list_next(list);
02454         item = list != 0L ? GTK_TREE_ITEM(list->data) : 0L;
02455         desc->item = item;
02456         // the only way I found to guess the TREE_ITEM parent
02457         desc->parent = parent == w ? 0L : GTK_TREE_ITEM(gtk_object_get_data(GTK_OBJECT(parent), "rf_treeparent"));
02458         g_assert(desc->parent == 0L || GTK_IS_TREE_ITEM(desc->parent));
02459         desc->next = next != 0L ? GTK_TREE_ITEM(next->data) : 0L;
02460     }
02461     if(item != 0L)
02462     {
02463         if(item->subtree != 0L)
02464         {
02465             GtkTree *subtree = GTK_TREE(item->subtree);
02466             GList *list = g_list_first(GTK_TREE(subtree)->children);
02467             desc->child = list != 0L ? GTK_TREE_ITEM(list->data) : 0L;
02468         }
02469         desc->data = gtk_object_get_data(GTK_OBJECT(item), "rf_treeitemdata");
02470         GtkLabel *label = gtktreegetlabel(GTK_WIDGET(item));
02471         if(label != 0L)
02472             gtk_label_get(label, &desc->title);
02473         desc->expanded = item->expanded;
02474     }
02475 #endif
02476 }
02477
02478 void UWidget::OnTreeDelete(int cmd, UTREEITEM item)
02479 {
02480     // sanity
02481     void *w = GetWidget(cmd);
02482     if(w == 0L)
02483         return;
02484
02485 #if qGTK
02486     if(!GTK_IS_TREE(w) || item == 0L)
02487         return;
02488
02489     GtkTreeItem *i = GTK_TREE_ITEM(item);
02490
02491     GtkTree *parent = GTK_TREE(GTK_WIDGET(i)->parent);
02492     if (parent == 0L)
02493         return;
02494
02495     gtk_container_remove(GTK_CONTAINER(parent), GTK_WIDGET(i));
02496 #endif
02497 }
02498
02499 void UWidget::OnTreeExpand(int cmd, int collapse, UTREEITEM item)
02500 {
02501     // sanity
02502     void *w = GetWidget(cmd);
02503     if(w == 0L)
02504         return;
02505
02506 #if qGTK
02507   if(!GTK_IS_TREE(w) || item == 0L)
02508         return;
02509
02510   GtkTreeItem *i = GTK_TREE_ITEM(item);
02511
02512   gtktreesort(GTK_TREE(i->subtree));
02513
02514     int collapsed = !i->expanded;
02515     if((collapsed != 0) ^ (collapse != 0))
02516     {
02517         if(!collapse)
02518             gtk_tree_item_expand(i);
02519         else
02520             gtk_tree_item_collapse(i);
02521     }
02522 #endif
02523 }
02524
02525 void UWidget::OnTreeSelect(int cmd, int deselect, UTREEITEM item)
02526 {
02527     // sanity
02528     void *w = GetWidget(cmd);
02529     if(w == 0L)
02530         return;
02531
02532 #if qGTK
02533     if(!GTK_IS_TREE(w) || item == 0L)
02534         return;
02535
02536     GList *sel = GTK_TREE(w)->selection;
02537     while(sel)
02538     {
02539         gtk_tree_item_deselect(GTK_TREE_ITEM(sel->data));
02540         sel = g_list_next(sel);
02541     }
02542
02543     GtkWidget *i = GTK_WIDGET(item);
02544     if(!deselect)
02545         gtk_tree_select_child(GTK_TREE(w), i);
02546     else
02547         gtk_tree_unselect_child(GTK_TREE(w), i);
02548 #endif
02549 }
02550
02551 //}
02552 //{ functions for comboboxes
02553 void UWidget::OnComboResetAll(int cmd)
02554 {
02555     void *w = GetWidget(cmd);
02556     if(w == 0L)
02557         return;
02558
02559 #ifdef WIN32
02560     CWnd *wnd = (CWnd *)w;
02561
02562     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02563     {
02564         CComboBox *combo = (CComboBox *)wnd;
02565         combo->ResetContent();
02566     }
02567 #endif
02568 #if qGTK
02569     if(GTK_IS_COMBO(w))
02570     {
02571         GtkList *listbox = GTK_LIST( GTK_COMBO(w)->list );
02572         if(listbox && listbox->children != 0L)
02573             gtk_list_remove_items( listbox, g_list_copy(listbox->children));
02574     }
02575     else if(GTK_IS_OPTION_MENU(w))
02576     {
02577         GtkWidget *menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(w));
02578         GList *list = g_list_copy(GTK_MENU_SHELL(menu)->children);
02579         GList *head = list;
02580         while(list != 0L)
02581         {
02582             GtkWidget *wid = GTK_WIDGET(list->data);
02583             gtk_container_remove(GTK_CONTAINER(menu), wid);
02584             list = (GList *)g_list_next(list);
02585         }
02586         g_list_free(head);
02587     }
02588 #endif
02589 #if qMacPP
02590     LPane *view = (LPane *)w;
02591     LMenuController *popup;
02592     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02593     {
02594         USemaphore policeman(gTurnOffBroadcast);
02595
02596         popup->DeleteAllMenuItems();
02597     }
02598 #endif
02599 #if qMacAPP
02600     TView *view = (TView *)w;
02601     if(MA_MEMBER(view, TPopup))
02602     {
02603         TPopup *popup = (TPopup *)view;
02604         while(popup->GetNumberOfItems() > 0)
02605             popup->DeleteItem(1);
02606     }
02607 #endif
02608 }
02609
02610 void UWidget::OnComboAppend(int cmd, const char *txt)
02611 {
02612     void *w = GetWidget(cmd);
02613     if(w == 0L)
02614         return;
02615
02616 #ifdef WIN32
02617     CWnd *wnd = (CWnd *)w;
02618
02619     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02620     {
02621         CComboBox *combo = (CComboBox *)wnd;
02622         combo->InsertString(-1, txt);
02623     }
02624 #endif
02625 #if qGTK
02626     if(GTK_IS_COMBO(w))
02627     {
02628         GtkWidget *list = GTK_COMBO(w)->list;
02629         GtkWidget *list_item = gtk_list_item_new_with_label(txt);
02630         gtk_container_add( GTK_CONTAINER(list), list_item );
02631         gtk_widget_show( list_item );
02632
02633         gtk_signal_connect( GTK_OBJECT(list_item), "select",
02634                             GTK_SIGNAL_FUNC(gtkcomboclicked), (gpointer)UMAKEINT(GetWidID(), cmd) );
02635     }
02636     else if(GTK_IS_OPTION_MENU(w))
02637     {
02638         GtkWidget *menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(w));
02639         GtkWidget *item = gtk_menu_item_new_with_label(txt);
02640         // fix me: where to find the label of the item ?
02641         gtk_object_set_data_full(GTK_OBJECT(item), "rf_menuitemtext", strdup(txt), (GtkDestroyNotify)free);
02642         gtk_signal_connect (GTK_OBJECT(item), "activate",
02643             GTK_SIGNAL_FUNC(gtkmenuactivated), (gpointer)UMAKEINT(GetWidID(), cmd));
02644         gtk_widget_show(item);
02645         gtk_menu_append(GTK_MENU(menu), item);
02646     }
02647 #endif
02648 #if qMacPP
02649     LPane *view = (LPane *)w;
02650     LMenuController *popup;
02651     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02652     {
02653         USemaphore policeman(gTurnOffBroadcast);
02654
02655         if(strcmp(txt, "-") == 0)
02656             popup->InsertMenuItem("\p(-", max_Int16, false);
02657         else
02658             popup->InsertMenuItem(LStr255(txt), max_Int16);
02659     }
02660 #endif
02661 #if qMacAPP
02662     TView *view = (TView *)w;
02663     if(MA_MEMBER(view, TPopup))
02664     {
02665         TPopup *popup = (TPopup *)view;
02666         if(strcmp(txt, "-") == 0)
02667             popup->AddSeparator();
02668         else
02669             popup->AddItem(CStr255_AC(txt));
02670     }
02671 #endif
02672 }
02673
02674 void UWidget::OnComboSetPos(int cmd, int sel)
02675 {
02676     void *w = GetWidget(cmd);
02677     if(w == 0L)
02678         return;
02679
02680 #ifdef WIN32
02681     CWnd *wnd = (CWnd *)w;
02682
02683     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02684     {
02685         CComboBox *combo = (CComboBox *)wnd;
02686         combo->SetCurSel(sel);
02687     }
02688 #endif
02689 #if qGTK
02690     if(GTK_IS_COMBO(w))
02691     {
02692         GtkWidget *list = GTK_COMBO(w)->list;
02693         gtk_list_select_item(GTK_LIST(list), sel);
02694     }
02695     else if(GTK_IS_OPTION_MENU(w))
02696     {
02697         gtk_option_menu_set_history (GTK_OPTION_MENU(w), sel);
02698     }
02699
02700 #endif
02701 #if qMacAPP
02702     TView *view = (TView *)w;
02703     if(MA_MEMBER(view, TPopup))
02704     {
02705         TPopup *popup = (TPopup *)view;
02706         popup->SetCurrentItem(sel + 1, true);
02707     }
02708 #endif
02709 #if qMacPP
02710     LPane *view = (LPane *)w;
02711     LMenuController *popup;
02712     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02713     {
02714         USemaphore policeman(gTurnOffBroadcast);
02715
02716         popup->SetCurrentMenuItem(sel + 1);
02717     }
02718 #endif
02719 }
02720
02721 void UWidget::OnComboDelSel(int cmd, int sel)
02722 {
02723     void *w = GetWidget(cmd);
02724     if(w == 0L)
02725         return;
02726
02727 #ifdef WIN32
02728     CWnd *wnd = (CWnd *)w;
02729
02730     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02731     {
02732         CComboBox *combo = (CComboBox *)wnd;
02733         combo->DeleteString(sel);
02734     }
02735 #endif
02736 #if qMacPP
02737     LPane *view = (LPane *)w;
02738     LMenuController *popup;
02739     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02740     {
02741         USemaphore policeman(gTurnOffBroadcast);
02742
02743         popup->DeleteMenuItem(sel + 1);
02744     }
02745 #endif
02746 }
02747
02748 void UWidget::OnComboEnableSel(int cmd, int sel, int state)
02749 {
02750     void *w = GetWidget(cmd);
02751     if(w == 0L)
02752         return;
02753
02754 #ifdef WIN32
02755     CWnd *wnd = (CWnd *)w;
02756
02757     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02758     {
02759     }
02760 #endif
02761 #if qMacPP
02762     LPane *view = (LPane *)w;
02763     LMenuController *popup;
02764     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02765     {
02766         if(state)
02767             ::EnableMenuItem(popup->GetMacMenuH(), sel + 1);
02768         else
02769             ::DisableMenuItem(popup->GetMacMenuH(), sel + 1);
02770     }
02771 #endif
02772 }
02773
02774 void UWidget::OnComboGetMenu(int cmd, UMENU *menu)
02775 {
02776     *menu = UMENU_NULL; // sanity
02777
02778     void *w = GetWidget(cmd);
02779     if(w == 0L)
02780         return;
02781
02782 #ifdef WIN32
02783     CWnd *wnd = (CWnd *)w;
02784
02785     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02786     {
02787     }
02788 #endif
02789 #if qMacPP
02790     LPane *view = (LPane *)w;
02791     LMenuController *popup;
02792     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02793     {
02794         MenuHandle hdl = popup->GetMacMenuH();
02795         if(hdl != 0L)
02796 #   if ACCESSOR_CALLS_ARE_FUNCTIONS
02797             *menu = GetMenuID(hdl);
02798 #   else
02799             *menu = (**hdl).menuID;
02800 #   endif
02801     }
02802 #endif
02803 }
02804
02805 int UWidget::OnComboGetPos(int cmd, UStr *txt)
02806 {
02807     int res = -1; // sanity
02808     if(txt != 0L)
02809         *txt = "";
02810
02811     void *w = GetWidget(cmd);
02812     if(w == 0L)
02813         return res;
02814
02815 #ifdef WIN32
02816     CWnd *wnd = (CWnd *)w;
02817
02818     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02819     {
02820         CComboBox *combo = (CComboBox *)wnd;
02821         res = combo->GetCurSel();
02822         if(res != -1 && txt != 0L)
02823         {
02824             CString s;
02825             combo->GetLBText(res, s);
02826             *txt = s;
02827         }
02828     }
02829 #endif
02830 #ifdef qGTK
02831     if(GTK_IS_COMBO(w))
02832     {
02833         GtkList *list = (GtkList*)GTK_COMBO(w)->list;
02834         GtkWidget *data = (GtkWidget*) list->selection->data;
02835
02836         res = gtk_list_child_position(GTK_LIST(list), (GtkWidget*)data);
02837     }
02838     else if(GTK_IS_OPTION_MENU(w))
02839     {
02840
02841     }
02842 #endif
02843 #if qMacAPP
02844     TView *view = (TView *)w;
02845     if(MA_MEMBER(view, TPopup))
02846     {
02847         TPopup *popup = (TPopup *)view;
02848         res = popup->GetCurrentItem() - 1;
02849         if(txt != 0L)
02850         {
02851             CStr255_AC pstr = popup->GetItemText(res + 1);
02852             *txt = pstr;
02853         }
02854     }
02855 #endif
02856 #if qMacPP
02857     LPane *view = (LPane *)w;
02858     LMenuController *popup;
02859     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02860     {
02861         res = popup->GetCurrentMenuItem() - 1;
02862         if(txt != 0L)
02863         {
02864             LStr255 pstr;
02865             popup->GetMenuItemText(res + 1, pstr);
02866             *txt = pstr;
02867         }
02868     }
02869 #endif
02870
02871     return res;
02872 }
02873
02874
02875
02876 int UWidget::OnComboGetCount(int cmd)
02877 {
02878     int res = 0; // sanity
02879
02880     void *w = GetWidget(cmd);
02881     if(w == 0L)
02882         return res;
02883
02884 #ifdef WIN32
02885     CWnd *wnd = (CWnd *)w;
02886
02887     if(wnd->IsKindOf(RUNTIME_CLASS(CComboBox)))
02888     {
02889         CComboBox *combo = (CComboBox *)wnd;
02890         res = combo->GetCount();
02891     }
02892 #endif
02893 #if qGTK
02894     if(GTK_IS_COMBO(w))
02895     {
02896         GtkList *list = GTK_LIST(GTK_COMBO(w)->list);
02897         if ( list)
02898         {
02899             GList *tmp_list;
02900             for( tmp_list = list->children; tmp_list; tmp_list = tmp_list->next)
02901                 ++res;
02902         }
02903     }
02904     else if(GTK_IS_OPTION_MENU(w))
02905     {
02906         GtkMenu *mm = GTK_MENU(gtk_option_menu_get_menu( GTK_OPTION_MENU(w)));
02907         if ( mm)
02908         {
02909             GList *tmp_list;
02910             for( tmp_list = mm->menu_shell.children; tmp_list; tmp_list = tmp_list->next)
02911                 ++res;
02912         }
02913     }
02914
02915 #endif
02916 #if qMacAPP
02917     TView *view = (TView *)w;
02918     if(MA_MEMBER(view, TPopup))
02919     {
02920         TPopup *popup = (TPopup *)view;
02921         res = popup->GetNumberOfItems();
02922     }
02923 #endif
02924 #if qMacPP
02925     LPane *view = (LPane *)w;
02926     LMenuController *popup;
02927     if((popup = dynamic_cast<LMenuController *>(view)) != 0L)
02928     {
02929         res = ::CountMenuItems(popup->GetMacMenuH());
02930     }
02931 #endif
02932
02933     return res;
02934 }
02935
02936 void UWidget::OnSmartComboSetFeature(int cmd, int feature)
02937 {
02938     void *w = GetWidget(cmd);
02939     if( w == 0L )
02940         return;
02941
02942 #ifdef WIN32
02943     CWnd* wnd = (CWnd*)w;
02944
02945     if( wnd->IsKindOf(RUNTIME_CLASS(CComboBox)) )
02946     {
02947         CComboBox* combo = (CComboBox*)wnd;
02948         combo->SendMessage(WM_SMCB_SETFEATURE, WPARAM(feature));
02949     }
02950 #endif
02951 #if qMacPP
02952 #endif
02953 }
02954
02955 void UWidget::OnSmartComboSetItems(int cmd, CMString* items)
02956 {
02957     void *w = GetWidget(cmd);
02958     if( w == 0L )
02959         return;
02960
02961 #ifdef WIN32
02962     CWnd* wnd = (CWnd*)w;
02963
02964     if( wnd->IsKindOf(RUNTIME_CLASS(CComboBox)) )
02965     {
02966         CComboBox* combo = (CComboBox*)wnd;
02967         combo->SendMessage(WM_SMCB_SETITEMS, WPARAM(items));
02968     }
02969 #endif
02970 #if qMacPP
02971 #endif
02972 }
02973
02974 void UWidget::OnSmartComboSetReadOnly(int cmd, bool readOnly)
02975 {
02976     void *w = GetWidget(cmd);
02977     if( w == 0L )
02978         return;
02979
02980 #ifdef WIN32
02981     CWnd* wnd = (CWnd*)w;
02982
02983     if( wnd->IsKindOf(RUNTIME_CLASS(CComboBox)) )
02984     {
02985         CComboBox* combo = (CComboBox*)wnd;
02986         combo->SendMessage(WM_SMCB_SETREADONLY, WPARAM(readOnly));
02987     }
02988 #endif
02989 #if qMacPP
02990 #endif
02991 }
02992
02993 //}
02994 //{ functions for lists
02995 void UWidget::OnListHideColumns(int cmd, int num)
02996 {
02997     void *w = GetWidget(cmd);
02998     if(w == 0L)
02999         return;
03000
03001 #if qGTK
03002     if(!GTK_IS_CLIST(w))
03003         return;
03004
03005     GtkCList *list = GTK_CLIST(w);
03006
03007     // one must always be visible. We use the first one
03008     for(int i=1; i< num; i++)
03009         gtk_clist_set_column_visibility (list, i, false);
03010 #endif
03011 }
03012
03013 void UWidget::OnListShowColumns(int cmd, int num)
03014 {
03015     void *w = GetWidget(cmd);
03016     if(w == 0L)
03017         return;
03018
03019 #if qGTK
03020     if(!GTK_IS_CLIST(w))
03021         return;
03022
03023     GtkCList *list = GTK_CLIST(w);
03024
03025     // one must always be visible. We use the first one
03026     for(int i=1; i< num; i++)
03027         gtk_clist_set_column_visibility (list, i, true);
03028 #endif
03029 }
03030
03031 void UWidget::OnListAddColumns(int cmd, int num)
03032 {
03033     void *w = GetWidget(cmd);
03034     if(w == 0L)
03035         return;
03036
03037 #if qGTK
03038     if(!GTK_IS_CLIST(w))
03039         return;
03040
03041     //GtkCList *list = GTK_CLIST(w);
03042         // don't know how to do that, for now it relies on glade settings
03043
03044 #endif
03045 #ifdef WIN32
03046     CWnd *wnd = (CWnd *)w;
03047
03048     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03049     {
03050         CListCtrl *list = (CListCtrl *)wnd;
03051         DWORD dwExStyle = ListView_GetExtendedListViewStyle(list->m_hWnd);
03052         dwExStyle |= LVS_EX_FULLROWSELECT;
03053         ListView_SetExtendedListViewStyle(list->m_hWnd, dwExStyle);
03054
03055         while(num--)
03056             list->InsertColumn(0, "", LVCFMT_LEFT, 80);
03057     }
03058 #endif
03059 #if qMacPP
03060     LPane *view = (LPane *)w;
03061     LOutlineTable *table;
03062     LTextTableView *tabtext;
03063     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03064     {
03065         macpp_preparetable(table);
03066         table->InsertCols( num, 0, nil, nil, false );
03067     }
03068     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03069     {
03070         macpp_preparetable(GetWidget(kUMainWidget), tabtext);
03071         tabtext->InsertCols( num, 0, nil, nil, false );
03072     }
03073 #endif
03074 }
03075
03076 void UWidget::OnListSetColTitle(int cmd, int num, const char *title)
03077 {
03078     void *w = GetWidget(cmd);
03079     if(w == 0L)
03080         return;
03081
03082 #if qGTK
03083     if(!GTK_IS_CLIST(w))
03084         return;
03085
03086     GtkCList *list = GTK_CLIST(w);
03087     gtk_clist_set_column_title (list, num, title);
03088 #endif
03089 #ifdef WIN32
03090     CWnd *wnd = (CWnd *)w;
03091
03092     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03093     {
03094         CListCtrl *list = (CListCtrl *)wnd;
03095         LVCOLUMN col;
03096         memset(&col, 0, sizeof(col));
03097         col.mask = LVCF_TEXT;
03098         col.pszText = (char *)title;
03099         VERIFY(list->SetColumn(num, &col));
03100     }
03101 #endif
03102 }
03103
03104 void UWidget::OnListSetColWidth(int cmd, int num, int width)
03105 {
03106     void *w = GetWidget(cmd);
03107     if(w == 0L)
03108         return;
03109
03110 #if qGTK
03111     if(!GTK_IS_CLIST(w))
03112         return;
03113
03114     GtkCList *list = GTK_CLIST(w);
03115     gtk_clist_set_column_width(list, num, width);
03116 #endif
03117 #ifdef WIN32
03118     CWnd *wnd = (CWnd *)w;
03119
03120     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03121     {
03122         CListCtrl *list = (CListCtrl *)wnd;
03123         LVCOLUMN col;
03124         memset(&col, 0, sizeof(col));
03125         col.mask = LVCF_WIDTH;
03126         col.cx = width;
03127         VERIFY(list->SetColumn(num, &col));
03128     }
03129 #endif
03130 #if qMacPP
03131     LPane *view = (LPane *)w;
03132     LOutlineTable *table;
03133     LTextTableView *tabtext;
03134     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03135     {
03136         macpp_preparetable(table);
03137         LTableGeometry *geom = table->GetTableGeometry();
03138         if(geom != 0L)
03139             geom->SetColWidth(width, num + 1, num + 1);
03140     }
03141     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03142     {
03143         macpp_preparetable(GetWidget(kUMainWidget), tabtext);
03144         LTableGeometry *geom = tabtext->GetTableGeometry();
03145         if(geom != 0L)
03146             geom->SetColWidth(width, num + 1, num + 1);
03147     }
03148 #endif
03149 }
03150
03151 void UWidget::OnListResetAll(int cmd)
03152 {
03153     void *w = GetWidget(cmd);
03154     if(w == 0L)
03155         return;
03156
03157 #if qGTK
03158     if(!GTK_IS_CLIST(w))
03159         return;
03160
03161     GtkCList *list = GTK_CLIST(w);
03162     gtk_clist_clear(list);
03163 #endif
03164 #if qMacAPP
03165     TView *view = (TView *)w;
03166     if(MA_MEMBER(view, TPseudoTextListView))
03167     {
03168         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03169         txt->RemoveAll();
03170     }
03171 #endif
03172 #if qMacPP
03173     LPane *view = (LPane *)w;
03174     LOutlineTable *table;
03175     LTextTableView *tabtext;
03176     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03177     {
03178         macpp_preparetable(table);
03179         LArrayIterator iter(table->GetFirstLevelItems());
03180         LOutlineItem* item;
03181         while (iter.Next(&item))
03182         {
03183             table->RemoveItem(item, false, false);
03184         }
03185         table->AdjustImageSize(false);
03186         table->Refresh();
03187     }
03188     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03189     {
03190         macpp_preparetable(GetWidget(kUMainWidget), tabtext);
03191         tabtext->RemoveAllRows(false);
03192         tabtext->Refresh();
03193     }
03194 #endif
03195 #ifdef WIN32
03196     CWnd *wnd = (CWnd *)w;
03197
03198     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03199     {
03200         CListCtrl *list = (CListCtrl *)wnd;
03201         VERIFY(list->DeleteAllItems());
03202     }
03203 #endif
03204 }
03205
03206 void UWidget::OnListAddSel(int cmd, int entry)
03207 {
03208     void *w = GetWidget(cmd);
03209     if(w == 0L)
03210         return;
03211
03212 #if qMacAPP
03213     TView *view = (TView *)w;
03214     if(MA_MEMBER(view, TPseudoTextListView))
03215     {
03216         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03217         txt->SelectItem(entry + 1, false, true, true);
03218     }
03219 #endif
03220 #if qGTK
03221     if(!GTK_IS_CLIST(w))
03222         return;
03223
03224     GtkCList *list = GTK_CLIST(w);
03225     gtk_clist_select_row(list, entry, 0);
03226 #endif
03227 #ifdef WIN32
03228     CWnd *wnd = (CWnd *)w;
03229
03230     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03231     {
03232         CListCtrl *list = (CListCtrl *)wnd;
03233         VERIFY(list->SetItemState(entry, LVIS_SELECTED, LVIS_SELECTED));
03234         VERIFY(list->EnsureVisible(entry, true));
03235     }
03236 #endif
03237 #if qMacPP
03238     LPane *view = (LPane *)w;
03239     LTableView *table;
03240     if((table = dynamic_cast<LTableView *>(view)) != 0L)
03241     {
03242         STableCell cell(entry + 1, 1);
03243         table->SelectCell(cell);
03244         table->ScrollCellIntoFrame(cell);
03245     }
03246 #endif
03247 }
03248
03249 void UWidget::OnListDelRow(int cmd, int entry)
03250 {
03251     void *w = GetWidget(cmd);
03252     if(w == 0L)
03253         return;
03254
03255 #if qMacAPP
03256     TView *view = (TView *)w;
03257     if(MA_MEMBER(view, TPseudoTextListView))
03258     {
03259         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03260         txt->DelItemAt(entry + 1, 1);
03261     }
03262 #endif
03263 #if qGTK
03264     if(!GTK_IS_CLIST(w))
03265         return;
03266
03267     GtkCList *list = GTK_CLIST(w);
03268     gtk_clist_remove(list, entry);
03269 #endif
03270 #ifdef WIN32
03271     CWnd *wnd = (CWnd *)w;
03272
03273     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03274     {
03275         CListCtrl *list = (CListCtrl *)wnd;
03276         VERIFY(list->DeleteItem(entry));
03277     }
03278 #endif
03279 #if qMacPP
03280     LPane *view = (LPane *)w;
03281     LOutlineTable *table;
03282     LTextTableView *tabtext;
03283     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03284     {
03285         LOutlineItem* item = table->FindItemForRow(entry + 1);
03286         if(item != 0L)
03287         {
03288             table->RemoveItem(item);
03289         }
03290     }
03291     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03292     {
03293         tabtext->RemoveRows(1, entry + 1, true);
03294     }
03295 #endif
03296 }
03297
03298 void UWidget::OnListSetFeedback(int cmd, int turnOn)
03299 {
03300     void *w = GetWidget(cmd);
03301     if(w == 0L)
03302         return;
03303
03304 #if qGTK
03305     if(!GTK_IS_CLIST(w))
03306         return;
03307
03308     GtkCList *list = GTK_CLIST(w);
03309     if(turnOn)
03310         gtk_clist_thaw(list);
03311     else
03312         gtk_clist_freeze(list);
03313 #endif
03314 }
03315
03316 void UWidget::OnListNewRow(int cmd, int *num)
03317 {
03318     *num = 0; // sanity
03319
03320     void *w = GetWidget(cmd);
03321     if(w == 0L)
03322         return;
03323
03324 #if qGTK
03325     if(!GTK_IS_CLIST(w))
03326         return;
03327
03328     gchar *emptyTxts[] = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""};
03329
03330     GtkCList *list = GTK_CLIST(w);
03331     *num = gtk_clist_append  (list, emptyTxts);
03332 #endif
03333 #if qMacAPP
03334     TView *view = (TView *)w;
03335     if(MA_MEMBER(view, TPseudoTextListView))
03336     {
03337         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03338         *num = txt->GetNumOfRows();
03339     }
03340 #endif
03341 #ifdef WIN32
03342     CWnd *wnd = (CWnd *)w;
03343
03344     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03345     {
03346         CListCtrl *list = (CListCtrl *)wnd;
03347         *num = list->GetItemCount();
03348     }
03349 #endif
03350 #if qMacPP
03351     LPane *view = (LPane *)w;
03352     LOutlineTable *table;
03353     LTextTableView *tabtext;
03354     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03355     {
03356         // Store this information in the list view
03357         CPseudoItem *theItem = NEW CPseudoItem(GetWidID(), cmd);
03358         if(theItem != 0L)
03359         {
03360             TableIndexT outRows, outCols;
03361             table->GetTableSize(outRows, outCols);
03362             // and insert it at the end of the table
03363             LOutlineItem *lastItem = table->FindItemForRow(outRows);
03364             table->InsertItem( theItem, nil, lastItem );
03365             *num = outRows;
03366         }
03367     }
03368     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03369     {
03370         TableIndexT outRows, outCols;
03371         tabtext->GetTableSize(outRows, outCols);
03372         tabtext->InsertRows(1, outRows);
03373         tabtext->AdjustImageSize(false);
03374         *num = outRows;
03375     }
03376 #endif
03377 }
03378
03379 void UWidget::OnListRowSetData(int cmd, int num, void *data)
03380 {
03381     void *w = GetWidget(cmd);
03382     if(w == 0L)
03383         return;
03384
03385 #if qGTK
03386     if(!GTK_IS_CLIST(w))
03387         return;
03388
03389     GtkCList *list = GTK_CLIST(w);
03390     gtk_clist_set_row_data(list, num, data);
03391 #endif
03392 #if qMacPP
03393     LPane *view = (LPane *)w;
03394     LOutlineTable *table;
03395     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03396     {
03397         // Store this information in the list view
03398         LOutlineItem *item = table->FindItemForRow(num + 1);
03399         CPseudoItem *theItem;
03400         if((theItem = dynamic_cast<CPseudoItem *>(item)) != 0L)
03401         {
03402             theItem->m_data = data;
03403         }
03404     }
03405 #endif
03406 }
03407
03408 void UWidget::OnListRowGetData(int cmd, int row, void **data)
03409 {
03410     *data = 0L; // sanity
03411
03412     void *w = GetWidget(cmd);
03413     if(w == 0L)
03414         return;
03415
03416 #if qGTK
03417     if(!GTK_IS_CLIST(w))
03418         return;
03419
03420     GtkCList *list = GTK_CLIST(w);
03421     *data = gtk_clist_get_row_data(list, row);
03422 #endif
03423 #if qMacPP
03424     LPane *view = (LPane *)w;
03425     LOutlineTable *table;
03426     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03427     {
03428         // Store this information in the list view
03429         LOutlineItem *item = table->FindItemForRow(row + 1);
03430         CPseudoItem *theItem;
03431         if((theItem = dynamic_cast<CPseudoItem *>(item)) != 0L)
03432         {
03433             *data = theItem->m_data;
03434         }
03435     }
03436 #endif
03437 }
03438
03439 int UWidget::OnListGetNextSel(int cmd, int selectedCell)
03440 {
03441     void *w = GetWidget(cmd);
03442     if(w == 0L)
03443         return -1;
03444
03445 #if qGTK
03446     if(!GTK_IS_CLIST(w))
03447         return -1;
03448
03449     GList *sel = GTK_CLIST(w)->selection;
03450     if(sel == 0L)
03451         return -1;
03452
03453     while(sel != 0L)
03454     {
03455         gint row = GPOINTER_TO_INT(sel->data);
03456         if(selectedCell == -1)
03457             return row;
03458
03459         sel = (GList *)g_list_next(sel);
03460
03461         if(selectedCell == row)
03462         {
03463             return sel == 0L ? -1 : GPOINTER_TO_INT(sel->data);
03464         }
03465     }
03466 #endif
03467 #if qMacAPP
03468     TView *view = (TView *)w;
03469     if(MA_MEMBER(view, TPseudoTextListView))
03470     {
03471         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03472         if(txt->FirstSelectedItem() == 0)
03473             return -1;
03474
03475         for(GridCoordinate c = 0; c < txt->GetNumOfRows(); ++c)
03476         {
03477             if(!txt->IsItemSelected(c + 1))
03478                 continue;
03479
03480             if(selectedCell == -1)
03481                 return c;
03482
03483             if(selectedCell == c)
03484                 selectedCell = -1; // so the next pick is the one
03485         }
03486     }
03487 #endif
03488 #ifdef WIN32
03489     CWnd *wnd = (CWnd *)w;
03490
03491     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03492     {
03493         CListCtrl *list = (CListCtrl *)wnd;
03494         return list->GetNextItem(selectedCell, LVNI_SELECTED);
03495     }
03496 #endif
03497 #if qMacPP
03498     LPane *view = (LPane *)w;
03499     LTableView *table;
03500     if((table = dynamic_cast<LTableView *>(view)) != 0L)
03501     {
03502         STableCell sel;
03503         if(selectedCell == -1)
03504         {
03505             sel = table->GetFirstSelectedCell();
03506             return sel.row - 1;
03507         }
03508
03509         sel.row = selectedCell + 1;
03510         sel.col = 1;
03511         while(table->GetNextSelectedCell(sel))
03512         {
03513             if(sel.row != selectedCell + 1)
03514                 return sel.row - 1;
03515         }
03516     }
03517 #endif
03518
03519     return -1;
03520 }
03521
03522 int UWidget::OnListGetNext(int cmd, int whichCell)
03523 {
03524     void *w = GetWidget(cmd);
03525     if(w == 0L)
03526         return -1;
03527
03528 #if qGTK
03529     if(!GTK_IS_CLIST(w))
03530         return -1;
03531
03532     if(whichCell == -1)
03533         whichCell = 0;
03534     else
03535         whichCell++;
03536
03537     if(whichCell >= GTK_CLIST(w)->rows)
03538         whichCell = -1;
03539
03540     return whichCell;
03541 #endif
03542 #ifdef WIN32
03543     CWnd *wnd = (CWnd *)w;
03544
03545     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03546     {
03547         CListCtrl *list = (CListCtrl *)wnd;
03548         return list->GetNextItem(whichCell, LVNI_ALL);
03549     }
03550 #endif
03551 #if qMacPP
03552     LPane *view = (LPane *)w;
03553     LTableView *table;
03554     if((table = dynamic_cast<LTableView *>(view)) != 0L)
03555     {
03556         STableCell sel;
03557
03558         if(whichCell != -1)
03559         {
03560             sel.row = whichCell + 1;
03561             sel.col = 1;
03562         }
03563
03564         while(table->GetNextCell(sel))
03565         {
03566             if(sel.row != whichCell + 1)
03567                 return sel.row - 1;
03568         }
03569     }
03570 #endif
03571
03572     return -1;
03573 }
03574
03575 void UWidget::OnListInsert(int cmd, ULIST_INSERT *data)
03576 {
03577     void *w = GetWidget(cmd);
03578     if(w == 0L)
03579         return;
03580
03581 #if qGTK
03582     if(!GTK_IS_CLIST(w))
03583         return;
03584
03585     GtkCList *list = GTK_CLIST(w);
03586
03587     if(data->title == 0L && data->icon == 0L)
03588         g_warning("Got an empty cell !\n");
03589     else if(data->title == 0L)
03590     {
03591         GtkPixmap *pix = GTK_PIXMAP(data->icon);
03592         gtk_clist_set_pixmap(list, data->row, data->col, pix->pixmap, pix->mask);
03593     }
03594     else if(data->icon == 0L)
03595     {
03596         gtk_clist_set_text(list, data->row, data->col, data->title);
03597     }
03598     else
03599     {
03600         GtkPixmap *pix = GTK_PIXMAP(data->icon);
03601         gtk_clist_set_pixtext(list, data->row, data->col, data->title, 2, pix->pixmap, pix->mask);
03602     }
03603 #endif
03604 #if qMacAPP
03605     TView *view = (TView *)w;
03606     if(MA_MEMBER(view, TPseudoTextListView))
03607     {
03608         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03609         //txt->InsStringBefore(data->row + 1, data->title);
03610         txt->InsStringLast(data->title);
03611     }
03612 #endif
03613 #ifdef WIN32
03614     CWnd *wnd = (CWnd *)w;
03615
03616     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03617     {
03618         CListCtrl *list = (CListCtrl *)wnd;
03619         if(data->col == 0)
03620         {
03621             LV_ITEM lvi;
03622             memset(&lvi, 0, sizeof(lvi));
03623             lvi.mask = LVIF_TEXT;
03624             lvi.iItem = data->row;
03625             lvi.iSubItem = 0;
03626             lvi.pszText = (char *)data->title;
03627
03628             list->InsertItem(&lvi);
03629         }
03630         else
03631         {
03632             list->SetItemText(data->row, data->col, data->title);
03633         }
03634     }
03635 #endif
03636 #if qMacPP
03637     LPane *view = (LPane *)w;
03638     LOutlineTable *table;
03639     LTextTableView *tabtext;
03640     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03641     {
03642         LOutlineItem *item = table->FindItemForRow(data->row + 1);
03643         CPseudoItem *theItem;
03644         if((theItem = dynamic_cast<CPseudoItem *>(item)) != 0L)
03645         {
03646             std::map<int, UStr>::value_type val(data->col + 1, UStr(data->title));
03647             theItem->m_texts.insert(val);
03648         }
03649     }
03650     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03651     {
03652         STableCell cell(data->row + 1, data->col + 1);
03653         tabtext->SetCellData(cell, data->title, strlen(data->title));
03654     }
03655 #endif
03656 }
03657
03658 void UWidget::OnListGetInfo(int cmd, ULIST_INFO *desc)
03659 {
03660     // sanity
03661     desc->data = 0L;
03662     desc->title = 0L;
03663
03664     void *w = GetWidget(cmd);
03665     if(w == 0L)
03666         return;
03667
03668 #if qMacAPP
03669     TView *view = (TView *)w;
03670     if(MA_MEMBER(view, TPseudoTextListView))
03671     {
03672         static UStr cstr; // no good
03673
03674         TPseudoTextListView *txt = (TPseudoTextListView *)view;
03675         CStr255_AC name = txt->GetItemText(desc->row + 1);
03676         cstr = name;
03677         desc->title = cstr;
03678     }
03679 #endif
03680 #if qGTK
03681     if(!GTK_IS_CLIST(w))
03682         return;
03683
03684     GtkCList *list = GTK_CLIST(w);
03685     desc->data = gtk_clist_get_row_data(list, desc->row);
03686     gtk_clist_get_text_is_buggy(list, desc->row, desc->col, (gchar **)&desc->title);
03687 #endif
03688 #ifdef WIN32
03689     CWnd *wnd = (CWnd *)w;
03690
03691     if(wnd->IsKindOf(RUNTIME_CLASS(CListCtrl)))
03692     {
03693         CListCtrl *list = (CListCtrl *)wnd;
03694
03695         desc->data = (void *)list->GetItemData(desc->row);
03696         static CString s;
03697         s = list->GetItemText(desc->row, desc->col);
03698         desc->title = s;
03699     }
03700 #endif
03701 #if qMacPP
03702     LPane *view = (LPane *)w;
03703     LOutlineTable *table;
03704     LTextTableView *tabtext;
03705     if((table = dynamic_cast<LOutlineTable *>(view)) != 0L)
03706     {
03707         LOutlineItem *item = table->FindItemForRow(desc->row + 1);
03708         CPseudoItem *theItem;
03709         if((theItem = dynamic_cast<CPseudoItem *>(item)) != 0L)
03710         {
03711             std::map<int, UStr>::iterator i = theItem->m_texts.find(desc->col + 1);
03712             if(i != theItem->m_texts.end())
03713             {
03714                 desc->title = (*i).second;
03715             }
03716             desc->data = theItem->m_data;
03717         }
03718     }
03719     else if((tabtext = dynamic_cast<LTextTableView *>(view)) != 0L)
03720     {
03721         STableCell cell(desc->row + 1, desc->col + 1);
03722         UInt32 ioDataSize = 255;
03723         char tmp[255];
03724         tabtext->GetCellData(cell, tmp, ioDataSize);
03725         static UStr res;
03726         res.set(tmp, ioDataSize);
03727         desc->title = res;
03728     }
03729 #endif
03730 }
03731
03732 void UWidget::OnListResort(int cmd, int column, UListSorter s)
03733 {
03734     void *w = GetWidget(cmd);
03735     if(w == 0L)
03736         return;
03737
03738 #if qGTK
03739     if(!GTK_IS_CLIST(w))
03740         return;
03741
03742     GtkCList *list = GTK_CLIST(w);
03743
03744     sGtkClistDiff = s;
03745     sGtkClistWid = this;
03746     gtk_clist_set_compare_func(list, gtkclistdefcompare);
03747     gtk_clist_set_sort_column(list, column);
03748     gtk_clist_sort(list);
03749     gtk_clist_set_compare_func(list, 0L);
03750 #endif
03751 }
03752
03753 void UWidget::OnListSetSortDir(int cmd, int column, bool dir)
03754 {
03755     void *w = GetWidget(cmd);
03756     if(w == 0L)
03757         return;
03758
03759 #if qGTK
03760     if(!GTK_IS_CLIST(w))
03761         return;
03762
03763     GtkCList *list = GTK_CLIST(w);
03764     gchar *text;
03765     guint8 spacing;
03766     GdkPixmap *pixmap;
03767     GdkBitmap *mask;
03768
03769     gtk_clist_get_pixtext (list, 0, column, &text, &spacing, &pixmap, &mask);
03770     gtk_clist_set_pixtext (list, 0, column, text, spacing, pixmap, mask);
03771 #endif
03772 }
03773
03774 //}
03775 void UWidget::OnStatusBarText(int cmd, const char *txt)
03776 {
03777     void *w = GetWidget(cmd);
03778     if( (w == 0L) || (txt == 0L) )
03779         return;
03780
03781 #if qGTK
03782     if(!GTK_IS_STATUSBAR(w))
03783         return;
03784
03785     GtkStatusbar *bar = GTK_STATUSBAR(w);
03786
03787     gtk_statusbar_pop(bar, 1);
03788     gtk_statusbar_push(bar, 1, txt);
03789 #endif
03790 }
03791
03792 int UWidget::OnUpdateFocus(int leave, void *widget)
03793 {
03794     std::map<int, void *>::const_iterator i;
03795
03796     for(i = m_widgets.begin(); i != m_widgets.end(); ++i)
03797     {
03798         if((*i).second == widget)
03799             break;
03800     }
03801     if(i == m_widgets.end())
03802         return 0; // continue notification
03803
03804     if(leave)
03805     {
03806         if(sFocusWidID == GetWidID())
03807             sFocusWidID = -1;
03808     }
03809     else
03810     {
03811         sFocusWidID = GetWidID();
03812         sFocusCmdID = (*i).first;
03813     }
03814
03815     return 1; // stop notification
03816 }
03817
03818 bool UWidget::HasModal(void)
03819 {
03820 #if qGTK
03821     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
03822     STD map<int, UCmdTarget *>::const_iterator i;
03823     for(i = targets.begin(); i != targets.end(); ++i)
03824     {
03825         UCmdTarget *target = (*i).second;
03826         if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
03827             continue;
03828
03829         UWidget *wid = (UWidget *)target;
03830         if(wid->m_modalLoop)
03831             return true;
03832     }
03833 #endif
03834     return false;
03835 }
03836
03837 int UWidget::OnFetchCmd(int cmd, void *widget)
03838 {
03839     std::map<int, void *>::const_iterator i;
03840     for(i = m_widgets.begin(); i != m_widgets.end(); ++i)
03841     {
03842         if(widget == (*i).second)
03843             return (*i).first;
03844     }
03845     return -1;
03846 }
03847
03848 void UWidget::AddPage(UWidget *page, int pagecmd, int num_page)
03849 {
03850     void *wid = GetWidget(kUMainWidget);
03851     if(wid == 0L)
03852         return;
03853
03854     UEventSendMessage(page->GetWidID(), EV_INIT_TAB_WIDGET, UMAKEINT(pagecmd, num_page), wid);
03855     std::map<int, UWidget *>::value_type val(UMAKEINT(pagecmd, num_page), page);
03856     m_tabs.insert(val);
03857
03858 #if qMacPP
03859     // emulate the click in tab 1
03860     if(num_page == 0)
03861     {
03862         // emulate the click in tab 1
03863         UEventSendMessage(GetWidID(), EV_PAGE_CHANGED, UMAKEINT(pagecmd, num_page), 0L);
03864     }
03865 #endif /* qMacPP */
03866 }
03867
03868 void UWidget::OnPageChanged(int cmdid, int num_page)
03869 {
03870     if(m_currentPage == UMAKEINT(cmdid, num_page))
03871         return;
03872
03873     std::map<int, UWidget *>::iterator i;
03874     if(m_currentPage != -1)
03875     {
03876         i = m_tabs.find(m_currentPage);
03877         if(i != m_tabs.end())
03878         {
03879             UWidget *tab = (*i).second;
03880             tab->DoDataExchange(false);
03881
03882 #if qMacPP
03883             LPseudoWinAttachment *attach = macpp_getattachwindow(this);
03884             if(attach != 0L)
03885             {
03886                 attach->InvalidCache(tab);
03887             }
03888
03889             tab->m_widgets.erase(tab->m_widgets.begin(), tab->m_widgets.end());
03890 #endif /* qMacPP */
03891         }
03892     }
03893
03894     if(num_page == -1)
03895     {
03896         m_currentPage = -1;
03897         return;
03898     }
03899
03900     i = m_tabs.find(UMAKEINT(cmdid, num_page));
03901     if(i != m_tabs.end())
03902     {
03903         UWidget *tab = (*i).second;
03904
03905 #if qMacPP
03906         UPseudoPlaceHolder *holder = dynamic_cast<UPseudoPlaceHolder *>((LPane *)GetWidget(cmdid));
03907         if(holder != 0L)
03908         {
03909             macpp_fecthview(tab->GetWidID(), holder->GetCurrentView());
03910
03911             LPseudoWinAttachment *attach = macpp_getattachwindow(this);
03912             if(attach != 0L)
03913             {
03914                 macpp_linkbroadcasters(holder->GetCurrentView(), attach);
03915             }
03916         }
03917 #endif /* qMacPP */
03918
03919         tab->DoDataExchange(true);
03920     }
03921     m_currentPage = UMAKEINT(cmdid, num_page);
03922 }
03923
03924 #ifdef WIN32
03925 void UWidget::OverideMapWidget(int cmdid, CRuntimeClass *widClass)
03926 {
03927     std::map<int, CRuntimeClass *>::value_type val(cmdid, widClass);
03928     m_overide.insert(val);
03929 }
03930 #endif
03931
03932 #if qMacPP || qMacAPP
03933 SInt32 UWidget::GetPaneID(int cmdid)
03934 {
03935     cmdid -= EV_COMMAND_START;
03936     unsigned char tmp[50];
03937     unsigned char res[5] = {'p', 's', '\0', '\0', '\0'};
03938     sprintf((char *)tmp, "%d", cmdid);
03939     if(strlen((char *)tmp) > 2 || cmdid < 0)
03940     {
03941         UAppConsole("cmdid too big (%d)\n", cmdid);
03942     }
03943     else if(strlen((char *)tmp) == 2)
03944     {
03945         res[2] = tmp[0];
03946         res[3] = tmp[1];
03947     }
03948     else
03949     {
03950         res[2] = '0';
03951         res[3] = tmp[0];
03952     }
03953
03954     SInt32 num = (res[0] << 24) | (res[1] << 16) | (res[2] << 8) | res[3];
03955     return num;
03956 }
03957 #endif
Generated on Sat Aug 7 22:43:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UTREE_INSERT Member List

This is the complete list of members for UTREE_INSERT, including all inherited members.

data | UTREE_INSERT
icon | UTREE_INSERT
parent | UTREE_INSERT
result | UTREE_INSERT
title | UTREE_INSERT

Generated on Sat Aug 7 22:57:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonImpl.h Source File

common/PythonImpl.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- September 2001
00019  */
00020
00021 #ifndef __PYIMPL
00022 #define __PYIMPL
00023
00024 #include "PythonContainer.h"
00025
00026 #if USE_PYTHON
00027 #include "CvsEntries.h"
00028 #include "AppConsole.h"
00029 #include "CPStr.h"
00030 #include "umain.h"
00031
00033 class PyCvsEntry : public PyContainer
00034 {
00035     PY_DECL_CLASS(CvsEntry)
00036
00037 public:
00038     PyCvsEntry(EntnodeData* data) : m_data(data)
00039     {
00040     }
00041
00042     virtual ~PyCvsEntry()
00043     {
00044     }
00045
00046     virtual PyObject* GetAttr(char* name);
00047
00049     inline operator EntnodeData* (void) const { return m_data; }
00050
00051 protected:
00052     ENTNODE m_data;
00053 };
00054
00056 class PyColorConsole : public PyContainer
00057 {
00058     PY_DECL_CLASS(ColorConsole)
00059     PY_DECL_METHOD(ColorConsole, Print)
00060
00061 public:
00062     PyColorConsole()
00063     {
00064     }
00065
00066     virtual ~PyColorConsole()
00067     {
00068     }
00069
00070 protected:
00071     CColorConsole m_console;
00072 };
00073
00075 class PyMenuMgr : public PyContainer
00076 {
00077     PY_DECL_CLASS(MenuMgr)
00078     PY_DECL_METHOD(MenuMgr, AddPulldown)
00079     PY_DECL_METHOD(MenuMgr, AddToggle)
00080     PY_DECL_METHOD(MenuMgr, AddButton)
00081     PY_DECL_METHOD(MenuMgr, AddSeparator)
00082     PY_DECL_METHOD(MenuMgr, Delete)
00083     PY_DECL_METHOD(MenuMgr, DeleteByCmd)
00084     PY_DECL_METHOD(MenuMgr, Count)
00085
00086 public:
00087     PyMenuMgr(UMENU menu) : m_menu(menu)
00088     {
00089     }
00090
00091     virtual ~PyMenuMgr()
00092     {
00093     }
00094
00096     inline operator UMENU() const { return m_menu; }
00097
00098 protected:
00099     UMENU m_menu;
00100 };
00101
00103 class PyCmdUI : public PyContainer
00104 {
00105     PY_DECL_CLASS(CmdUI)
00106     PY_DECL_METHOD(CmdUI, Enable)
00107     PY_DECL_METHOD(CmdUI, SetCheck)
00108     PY_DECL_METHOD(CmdUI, SetText)
00109
00110 public:
00111     PyCmdUI(UCmdUI* cmdui) : m_cmdui(cmdui)
00112     {
00113     }
00114
00115     virtual ~PyCmdUI()
00116     {
00117     }
00118
00119 protected:
00120     UCmdUI* m_cmdui;
00121 };
00122
00123 class PyPersistent : public PyContainer
00124 {
00125     PY_DECL_CLASS(Persistent)
00126     PY_DECL_METHOD(Persistent, GetValue)
00127     PY_DECL_METHOD(Persistent, SetValue)
00128
00129 public:
00130     PyPersistent(const char* uniqueName, const char* defValue, kClassPersistent pclass) :
00131         m_cstr(uniqueName, defValue, pclass)
00132     {
00133     }
00134
00135     virtual ~PyPersistent()
00136     {
00137     }
00138
00139 protected:
00140     PCStr m_cstr;
00141 };
00142 #endif // USE_PYTHON
00143
00144 #endif
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/RtagDlg.cpp Source File

common/RtagDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- July 1998
00019  */
00020
00021 /*
00022  * RtagDlg.cpp : the cvs rtag dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "GetPrefs.h"
00030 #endif /* WIN32 */
00031
00032 #ifdef qMacCvsPP
00033 #   include <UModalDialogs.h>
00034 #   include <LMultiPanelView.h>
00035 #   include <LCheckBox.h>
00036 #   include <LEditText.h>
00037 #   include <LPopupGroupBox.h>
00038 #   include <LRadioButton.h>
00039 #   include "LPopupFiller.h"
00040
00041 #   include "MacCvsApp.h"
00042 #   include "MacCvsConstant.h"
00043 #endif /* qMacCvsPP */
00044
00045 #if qUnix
00046 #   include "UCvsDialogs.h"
00047 #endif
00048
00049 #include "RtagDlg.h"
00050 #include "CvsPrefs.h"
00051 #include "MultiFiles.h"
00052 #include "UpdateDlg.h"
00053 #include "ItemListDlg.h"
00054 #include "CvsRootDlg.h"
00055
00056 #ifdef WIN32
00057 #   ifdef _DEBUG
00058 #   define new DEBUG_NEW
00059 #   undef THIS_FILE
00060     static char THIS_FILE[] = __FILE__;
00061 #   endif
00062 #endif /* WIN32 */
00063
00064 #ifdef WIN32
00065
00066 // CRtag_MAIN property page
00067
00068 IMPLEMENT_DYNAMIC(CRtag_MAIN, CHHelpPropertyPage)
00069
00070 CRtag_MAIN::CRtag_MAIN(const MultiFiles* mf, const kTagCmdType type,
00071                        const char* sLastModule, const char* sLastTag,
00072                        bool noRecurs, bool movDelBranch, bool lookAttic,
00073                        bool forceRoot, const char* cvsroot,
00074                        bool overwriteExist /*= false*/)
00075                        : m_mf(mf), CHHelpPropertyPage(CRtag_MAIN::IDD)
00076 {
00077     //{{AFX_DATA_INIT(CRtag_MAIN)
00078     //}}AFX_DATA_INIT
00079
00080     m_forceRoot = forceRoot;
00081     m_cvsroot = cvsroot;
00082
00083     m_type = type;
00084
00085     m_tagName = sLastTag;
00086     m_moduleName = sLastModule;
00087
00088     m_noRecurs = noRecurs;
00089     m_movDelBranch = movDelBranch;
00090
00091     m_lookAttic = lookAttic;
00092     m_overwriteExisting = overwriteExist;
00093
00094     m_moduleCombo.SetItems(&gOldModules);
00095     m_tagCombo.SetItems(&gRevNames);
00096     m_cvsrootCombo.SetItems(&gOldCvsroots);
00097 }
00098
00099 CRtag_MAIN::~CRtag_MAIN()
00100 {
00101 }
00102
00103 void CRtag_MAIN::DoDataExchange(CDataExchange* pDX)
00104 {
00105     CHHelpPropertyPage::DoDataExchange(pDX);
00106     //{{AFX_DATA_MAP(CRtag_MAIN)
00107     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00108     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00109     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00110     DDX_Control(pDX, IDC_OVERWRITE, m_overwriteExistingCheck);
00111     DDX_Control(pDX, IDC_MODULEDESC_TEXT, m_moduleDescStatic);
00112     DDX_Control(pDX, IDC_TAGDESC_TEXT, m_tagDescStatic);
00113     DDX_Control(pDX, IDC_GRPBOX_TEXT, m_grpBox);
00114     DDX_Control(pDX, IDC_MODNAME, m_moduleCombo);
00115     DDX_Control(pDX, IDC_TAGNAME, m_tagCombo);
00116     DDX_CBString(pDX, IDC_TAGNAME, m_tagName);
00117     DDX_CBString(pDX, IDC_MODNAME, m_moduleName);
00118     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00119     DDX_Check(pDX, IDC_ATTIC, m_lookAttic);
00120     DDX_Check(pDX, IDC_OVERWRITE, m_overwriteExisting);
00121     DDX_Check(pDX, IDC_MOVDEL_BRANCH, m_movDelBranch);
00122     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00123     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00124     //}}AFX_DATA_MAP
00125
00126     DDV_MinChars(pDX, m_moduleName, 1);
00127     DDV_MinChars(pDX, m_tagName, 1);
00128
00129     DDX_ComboMString(pDX, IDC_MODNAME, m_moduleCombo);
00130     DDX_ComboMString(pDX, IDC_TAGNAME, m_tagCombo);
00131     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00132
00133     if( m_forceRoot )
00134     {
00135         DDV_MinChars(pDX, m_cvsroot, 1);
00136     }
00137
00138     if( !pDX->m_bSaveAndValidate )
00139     {
00140         m_selCvsrootButton.EnableWindow(m_forceRoot);
00141     }
00142 }
00143
00144
00145 BEGIN_MESSAGE_MAP(CRtag_MAIN, CHHelpPropertyPage)
00146     //{{AFX_MSG_MAP(CRtag_MAIN)
00147     ON_BN_CLICKED(IDC_BROWSE_TAG, OnBrowseTag)
00148     ON_BN_CLICKED(IDC_BROWSE_MODNAME, OnBrowseModules)
00149     ON_BN_CLICKED(IDC_FORCE_CVSROOT, OnForceroot)
00150     ON_BN_CLICKED(IDC_BROWSE_CVSROOT, OnSelcvsroot)
00151     //}}AFX_MSG_MAP
00152 END_MESSAGE_MAP()
00153
00155 // CRtag_MAIN message handlers
00156
00158 BOOL CRtag_MAIN::OnInitDialog()
00159 {
00160     CHHelpPropertyPage::OnInitDialog();
00161
00162     // Set the type-specific data
00163     CString strGrpBox;
00164     CString strTagDesc;
00165     CString strmoduleDesc;
00166
00167     switch( m_type )
00168     {
00169     case kTagCreate:
00170         strGrpBox = "Enter the tag name and which module to tag:";
00171         strTagDesc = "New &tag name:";
00172         strmoduleDesc = "&Module to tag:";
00173         break;
00174     case kTagDelete:
00175         strGrpBox = "Enter the tag name to delete and which module to untag:";
00176         strTagDesc = "Delete &tag name:";
00177         strmoduleDesc = "&Module to untag:";
00178
00179         m_overwriteExistingCheck.ShowWindow(SW_HIDE);
00180         break;
00181     case kTagBranch:
00182         strGrpBox = "Enter the branch name and which module to fork:";
00183         strTagDesc = "New &branch name:";
00184         strmoduleDesc = "&Module to fork:";
00185         break;
00186     default:
00187         ASSERT(FALSE); //unknown type
00188     }
00189
00190     m_grpBox.SetWindowText(strGrpBox);
00191     m_tagDescStatic.SetWindowText(strTagDesc);
00192     m_moduleDescStatic.SetWindowText(strmoduleDesc);;
00193
00194     OnForceroot();
00195
00196     return TRUE;  // return TRUE unless you set the focus to a control
00197                   // EXCEPTION: OCX Property Pages should return FALSE
00198 }
00199
00200 void CRtag_MAIN::InitHelpID()
00201 {
00202     SetCtrlHelpID(IDC_TAGNAME,          IDH_IDC_TAGNAME);
00203     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00204     SetCtrlHelpID(IDC_MODNAME,          IDH_IDC_MODNAME);
00205     SetCtrlHelpID(IDC_BROWSE_MODNAME,   IDH_IDC_BROWSE_MODNAME);
00206     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
00207     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
00208     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
00209     SetCtrlHelpID(IDC_NORECURS,         IDH_IDC_NORECURS);
00210     SetCtrlHelpID(IDC_MOVDEL_BRANCH,    IDH_IDC_MOVDEL_BRANCH);
00211     SetCtrlHelpID(IDC_ATTIC,            IDH_IDC_ATTIC);
00212     SetCtrlHelpID(IDC_OVERWRITE,        IDH_IDC_OVERWRITE);
00213 }
00214
00215
00217 void CRtag_MAIN::OnBrowseTag()
00218 {
00219     CStr tagName;
00220     if( CompatGetTagListItem(m_mf, tagName) )
00221     {
00222         m_tagName = (const char*)tagName;
00223         m_tagCombo.SetWindowText(m_tagName);
00224     }
00225 }
00226
00228 void CRtag_MAIN::OnBrowseModules()
00229 {
00230     CStr moduleName;
00231     if( CompatGetModuleListItem(m_mf, moduleName) )
00232     {
00233         m_moduleName = (const char*)moduleName;
00234         m_moduleCombo.SetWindowText(m_moduleName);
00235     }
00236 }
00237
00239 void CRtag_MAIN::OnForceroot()
00240 {
00241     const BOOL enable = m_forceRootCheck.GetCheck();
00242
00243     m_selCvsrootButton.EnableWindow(enable);
00244     m_cvsrootCombo.EnableWindow(enable);
00245 }
00246
00248 void CRtag_MAIN::OnSelcvsroot()
00249 {
00250     CString strCvsroot;
00251     m_cvsrootCombo.GetWindowText(strCvsroot);
00252
00253     CStr cvsroot(strCvsroot);
00254     if( CompatGetCvsRoot(cvsroot) )
00255     {
00256         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00257     }
00258 }
00259
00261 // CRtag_OPTIONS property page
00262
00263 IMPLEMENT_DYNAMIC(CRtag_OPTIONS, CHHelpPropertyPage)
00264
00265 CRtag_OPTIONS::CRtag_OPTIONS(const MultiFiles* mf, const kTagCmdType type,
00266                              bool hasDate, bool hasRev,
00267                              const char *sLastDate, const char *sLastRev,
00268                              bool useMostRecent)
00269                              : m_mf(mf), CHHelpPropertyPage(CRtag_OPTIONS::IDD)
00270 {
00271     m_type = type;
00272
00273     m_date = sLastDate;
00274     m_rev = sLastRev;
00275     m_hasDate = hasDate;
00276     m_hasRev = hasRev;
00277     m_useMostRecent = useMostRecent;
00278
00279     m_revCombo.SetItems(&gRevNames);
00280     m_dateCombo.SetItems(&gDateNames);
00281 }
00282
00283 CRtag_OPTIONS::CRtag_OPTIONS() : CHHelpPropertyPage(CRtag_OPTIONS::IDD)
00284 {
00285     //{{AFX_DATA_INIT(CRtag_OPTIONS)
00286     m_date = _T("");
00287     m_rev = _T("");
00288     m_hasDate = FALSE;
00289     m_hasRev = FALSE;
00290     m_useMostRecent = FALSE;
00291     //}}AFX_DATA_INIT
00292 }
00293
00294 CRtag_OPTIONS::~CRtag_OPTIONS()
00295 {
00296 }
00297
00298 void CRtag_OPTIONS::DoDataExchange(CDataExchange* pDX)
00299 {
00300     CHHelpPropertyPage::DoDataExchange(pDX);
00301     //{{AFX_DATA_MAP(CRtag_OPTIONS)
00302     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00303     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00304     DDX_Control(pDX, IDC_HAS_DATE, m_hasDateCheck);
00305     DDX_Control(pDX, IDC_REV_TAG, m_revCombo);
00306     DDX_Control(pDX, IDC_DATE, m_dateCombo);
00307     DDX_Control(pDX, IDC_GRPBOX_TEXT, m_grpBox);
00308     DDX_CBString(pDX, IDC_DATE, m_date);
00309     DDX_CBString(pDX, IDC_REV_TAG, m_rev);
00310     DDX_Check(pDX, IDC_HAS_DATE, m_hasDate);
00311     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00312     DDX_Check(pDX, IDC_FORCE_HEAD_REV, m_useMostRecent);
00313     //}}AFX_DATA_MAP
00314
00315     if( m_hasRev )
00316     {
00317         DDV_MinChars(pDX, m_rev, 1);
00318     }
00319
00320     if( m_hasDate )
00321     {
00322         DDV_MinChars(pDX, m_date, 1);
00323     }
00324
00325     if( !pDX->m_bSaveAndValidate )
00326     {
00327         OnDate();
00328         OnRev();
00329     }
00330
00331     DDX_ComboMString(pDX, IDC_REV_TAG, m_revCombo);
00332     DDX_ComboMString(pDX, IDC_DATE, m_dateCombo);
00333 }
00334
00335
00336 BEGIN_MESSAGE_MAP(CRtag_OPTIONS, CHHelpPropertyPage)
00337     //{{AFX_MSG_MAP(CRtag_OPTIONS)
00338     ON_BN_CLICKED(IDC_HAS_DATE, OnDate)
00339     ON_BN_CLICKED(IDC_HAS_REV, OnRev)
00340     ON_BN_CLICKED(IDC_BROWSE_TAG, OnBrowseTag)
00341     //}}AFX_MSG_MAP
00342 END_MESSAGE_MAP()
00343
00345 // CRtag_OPTIONS message handlers
00346
00348 void CRtag_OPTIONS::OnDate()
00349 {
00350     m_dateCombo.EnableWindow(m_hasDateCheck.GetCheck());
00351 }
00352
00354 void CRtag_OPTIONS::OnRev()
00355 {
00356     const BOOL enable = m_hasRevCheck.GetCheck();
00357
00358     m_revCombo.EnableWindow(enable);
00359     m_browseTagButton.EnableWindow(enable);
00360 }
00361
00363 BOOL CRtag_OPTIONS::OnInitDialog()
00364 {
00365     CHHelpPropertyPage::OnInitDialog();
00366
00367     // Set the type-specific data
00368     CString strGrpBox;
00369
00370     switch( m_type )
00371     {
00372     case kTagCreate:
00373         strGrpBox = "Optionally use this revision/tag/date to create the tag:";
00374         break;
00375     case kTagDelete:
00376         ASSERT(FALSE); //delete tag has no options
00377         break;
00378     case kTagBranch:
00379         strGrpBox = "Optionally use this revision/tag/date to create the branch:";
00380         break;
00381     default:
00382         ASSERT(FALSE); //unknown type
00383     }
00384
00385     m_grpBox.SetWindowText(strGrpBox);
00386
00387     return TRUE;  // return TRUE unless you set the focus to a control
00388                   // EXCEPTION: OCX Property Pages should return FALSE
00389 }
00390
00391 void CRtag_OPTIONS::InitHelpID()
00392 {
00393     SetCtrlHelpID(IDC_HAS_DATE,         IDH_IDC_HAS_DATE);
00394     SetCtrlHelpID(IDC_DATE,             IDH_IDC_DATE);
00395     SetCtrlHelpID(IDC_HAS_REV,          IDH_IDC_HAS_REV);
00396     SetCtrlHelpID(IDC_REV_TAG,          IDH_IDC_REV_TAG);
00397     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00398     SetCtrlHelpID(IDC_FORCE_HEAD_REV,   IDH_IDC_FORCE_HEAD_REV);
00399 }
00400
00402 void CRtag_OPTIONS::OnBrowseTag()
00403 {
00404     CStr tagName;
00405     if( CompatGetTagListItem(m_mf, tagName) )
00406     {
00407         m_rev = (const char*)tagName;
00408         m_revCombo.SetWindowText(m_rev);
00409     }
00410 }
00411
00412 #endif /* WIN32 */
00413
00414 #ifdef qMacCvsPP
00415 static void DoDataExchange_RtagCreateMain(LWindow *theDialog, const MultiFiles* mf,
00416     CStr & sLastModule, CStr & sLastTag,
00417     bool & hasDate, bool & hasRev,
00418     CStr & sLastDate, CStr & sLastRev,
00419     bool & useMostRecent, bool & lookAttic, bool putValue)
00420 {
00421     LEditText *mname = dynamic_cast<LEditText*>
00422         (theDialog->FindPaneByID(item_ModuleName));
00423     LEditText *tname = dynamic_cast<LEditText*>
00424         (theDialog->FindPaneByID(item_BranchRev));
00425     LCheckBox *chkHasDate = dynamic_cast<LCheckBox*>
00426         (theDialog->FindPaneByID(item_CheckDate));
00427     LCheckBox *chkHasRev = dynamic_cast<LCheckBox*>
00428         (theDialog->FindPaneByID(item_CheckRevTag));
00429     LCheckBox *chkMostRecent = dynamic_cast<LCheckBox*>
00430         (theDialog->FindPaneByID(item_MostRecentRev));
00431     LCheckBox *chkLookAttic = dynamic_cast<LCheckBox*>
00432         (theDialog->FindPaneByID(item_InAttic));
00433     LEditText *editDate = dynamic_cast<LEditText*>
00434         (theDialog->FindPaneByID(item_EditDate));
00435     LEditText *editRev = dynamic_cast<LEditText*>
00436         (theDialog->FindPaneByID(item_EditRevTag));
00437     LPopupFiller *fillRev = dynamic_cast<LPopupFiller*>
00438         (theDialog->FindPaneByID(item_FillerRev1));
00439     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*>
00440         (theDialog->FindPaneByID(item_FillerTag));
00441     LPopupFiller *fillDate = dynamic_cast<LPopupFiller*>
00442         (theDialog->FindPaneByID(item_FillerDate));
00443
00444     LTagWrapper *wrapper1 = putValue ? NEW LTagWrapper(fillRev, mf) : 0L;
00445     fillRev->DoDataExchange(gRevNames, putValue, wrapper1);
00446     LTagWrapper *wrapper2 = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00447     fillTag->DoDataExchange(gRevNames, putValue, wrapper2);
00448     fillDate->DoDataExchange(gDateNames, putValue);
00449
00450     if(putValue)
00451     {
00452         mname->SetText((Ptr)(const char *)sLastModule, sLastModule.length());
00453         tname->SetText((Ptr)(const char *)sLastTag, sLastTag.length());
00454         chkHasDate->SetValue(hasDate ? Button_On : Button_Off);
00455         chkHasRev->SetValue(hasRev ? Button_On : Button_Off);
00456         chkMostRecent->SetValue(useMostRecent ? Button_On : Button_Off);
00457         chkLookAttic->SetValue(lookAttic ? Button_On : Button_Off);
00458         editDate->SetText((Ptr)(const char *)sLastDate, sLastDate.length());
00459         editRev->SetText((Ptr)(const char *)sLastRev, sLastRev.length());
00460     }
00461     else
00462     {
00463         hasDate = chkHasDate->GetValue() == Button_On;
00464         hasRev = chkHasRev->GetValue() == Button_On;
00465         useMostRecent = chkMostRecent->GetValue() == Button_On;
00466         lookAttic = chkLookAttic->GetValue() == Button_On;
00467
00468         char str[255];
00469         Size len;
00470
00471         mname->GetText(str, 254, &len);
00472         sLastModule.set(str, len);
00473         tname->GetText(str, 254, &len);
00474         sLastTag.set(str, len);
00475         editDate->GetText(str, 254, &len);
00476         sLastDate.set(str, len);
00477         editRev->GetText(str, 254, &len);
00478         sLastRev.set(str, len);
00479     }
00480 }
00481
00482 static void DoDataExchange_RtagCreateOptions(LWindow *theDialog,
00483     bool & noRecurs, bool & overwriteExist, bool putValue)
00484 {
00485     LCheckBox *chkNoRecurs = dynamic_cast<LCheckBox*>
00486         (theDialog->FindPaneByID(item_NoRecurs));
00487     LCheckBox *chkOverwrite = dynamic_cast<LCheckBox*>
00488         (theDialog->FindPaneByID(item_OverwriteRev));
00489
00490     if(putValue)
00491     {
00492         chkNoRecurs->SetValue(noRecurs ? Button_On : Button_Off);
00493         chkOverwrite->SetValue(overwriteExist ? Button_On : Button_Off);
00494     }
00495     else
00496     {
00497         noRecurs = chkNoRecurs->GetValue() == Button_On;
00498         overwriteExist = chkOverwrite->GetValue() == Button_On;
00499     }
00500 }
00501
00502 static void DoDataExchange_RtagDeleteMain(LWindow *theDialog, const MultiFiles* mf,
00503     CStr & sLastModule, CStr & sLastTag,
00504     bool & noRecurs, bool & lookAttic, bool putValue)
00505 {
00506     LEditText *mname = dynamic_cast<LEditText*>
00507         (theDialog->FindPaneByID(item_ModuleName));
00508     LEditText *tname = dynamic_cast<LEditText*>
00509         (theDialog->FindPaneByID(item_BranchRev));
00510     LCheckBox *chkLookAttic = dynamic_cast<LCheckBox*>
00511         (theDialog->FindPaneByID(item_InAttic));
00512     LCheckBox *chkNoRecurs = dynamic_cast<LCheckBox*>
00513         (theDialog->FindPaneByID(item_NoRecurs));
00514     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*>
00515         (theDialog->FindPaneByID(item_FillerTag));
00516
00517     LTagWrapper *wrapper = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00518     fillTag->DoDataExchange(gRevNames, putValue, wrapper);
00519
00520     if(putValue)
00521     {
00522         mname->SetText((Ptr)(const char *)sLastModule, sLastModule.length());
00523         tname->SetText((Ptr)(const char *)sLastTag, sLastTag.length());
00524         chkLookAttic->SetValue(lookAttic ? Button_On : Button_Off);
00525         chkNoRecurs->SetValue(noRecurs ? Button_On : Button_Off);
00526     }
00527     else
00528     {
00529         lookAttic = chkLookAttic->GetValue() == Button_On;
00530         noRecurs = chkNoRecurs->GetValue() == Button_On;
00531
00532         char str[255];
00533         Size len;
00534
00535         mname->GetText(str, 254, &len);
00536         sLastModule.set(str, len);
00537         tname->GetText(str, 254, &len);
00538         sLastTag.set(str, len);
00539     }
00540 }
00541
00542 static void DoDataExchange_RtagBranchMain(LWindow *theDialog, const MultiFiles* mf,
00543     CStr & sLastModule, CStr & sLastBranch,
00544     bool & hasDate, bool & hasRev,
00545     CStr & sLastDate, CStr & sLastRev,
00546     bool & useMostRecent, bool & lookAttic, bool putValue)
00547 {
00548     LEditText *mname = dynamic_cast<LEditText*>
00549         (theDialog->FindPaneByID(item_ModuleName));
00550     LEditText *tname = dynamic_cast<LEditText*>
00551         (theDialog->FindPaneByID(item_BranchRev));
00552     LCheckBox *chkHasDate = dynamic_cast<LCheckBox*>
00553         (theDialog->FindPaneByID(item_CheckDate));
00554     LCheckBox *chkHasRev = dynamic_cast<LCheckBox*>
00555         (theDialog->FindPaneByID(item_CheckRevTag));
00556     LCheckBox *chkMostRecent = dynamic_cast<LCheckBox*>
00557         (theDialog->FindPaneByID(item_MostRecentRev));
00558     LCheckBox *chkLookAttic = dynamic_cast<LCheckBox*>
00559         (theDialog->FindPaneByID(item_InAttic));
00560     LEditText *editDate = dynamic_cast<LEditText*>
00561         (theDialog->FindPaneByID(item_EditDate));
00562     LEditText *editRev = dynamic_cast<LEditText*>
00563         (theDialog->FindPaneByID(item_EditRevTag));
00564     LPopupFiller *fillRev = dynamic_cast<LPopupFiller*>
00565         (theDialog->FindPaneByID(item_FillerRev1));
00566     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*>
00567         (theDialog->FindPaneByID(item_FillerTag));
00568     LPopupFiller *fillDate = dynamic_cast<LPopupFiller*>
00569         (theDialog->FindPaneByID(item_FillerDate));
00570
00571     LTagWrapper *wrapper1 = putValue ? NEW LTagWrapper(fillRev, mf) : 0L;
00572     fillRev->DoDataExchange(gRevNames, putValue, wrapper1);
00573     LTagWrapper *wrapper2 = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00574     fillTag->DoDataExchange(gRevNames, putValue, wrapper2);
00575     fillDate->DoDataExchange(gDateNames, putValue);
00576
00577     if(putValue)
00578     {
00579         mname->SetText((Ptr)(const char *)sLastModule, sLastModule.length());
00580         tname->SetText((Ptr)(const char *)sLastBranch, sLastBranch.length());
00581         chkHasDate->SetValue(hasDate ? Button_On : Button_Off);
00582         chkHasRev->SetValue(hasRev ? Button_On : Button_Off);
00583         chkMostRecent->SetValue(useMostRecent ? Button_On : Button_Off);
00584         chkLookAttic->SetValue(lookAttic ? Button_On : Button_Off);
00585         editDate->SetText((Ptr)(const char *)sLastDate, sLastDate.length());
00586         editRev->SetText((Ptr)(const char *)sLastRev, sLastRev.length());
00587     }
00588     else
00589     {
00590         hasDate = chkHasDate->GetValue() == Button_On;
00591         hasRev = chkHasRev->GetValue() == Button_On;
00592         useMostRecent = chkMostRecent->GetValue() == Button_On;
00593         lookAttic = chkLookAttic->GetValue() == Button_On;
00594
00595         char str[255];
00596         Size len;
00597
00598         mname->GetText(str, 254, &len);
00599         sLastModule.set(str, len);
00600         tname->GetText(str, 254, &len);
00601         sLastBranch.set(str, len);
00602         editDate->GetText(str, 254, &len);
00603         sLastDate.set(str, len);
00604         editRev->GetText(str, 254, &len);
00605         sLastRev.set(str, len);
00606     }
00607 }
00608
00609 static void DoDataExchange_RtagBranchOptions(LWindow *theDialog,
00610     bool & noRecurs, bool putValue)
00611 {
00612     LCheckBox *chkNoRecurs = dynamic_cast<LCheckBox*>
00613         (theDialog->FindPaneByID(item_NoRecurs));
00614
00615     if(putValue)
00616     {
00617         chkNoRecurs->SetValue(noRecurs ? Button_On : Button_Off);
00618     }
00619     else
00620     {
00621         noRecurs = chkNoRecurs->GetValue() == Button_On;
00622     }
00623 }
00624 #endif /* qMacCvsPP */
00625
00626 #if qUnix
00627 class UCvsRtagCreate : public UWidget
00628 {
00629     UDECLARE_DYNAMIC(UCvsRtagCreate)
00630 public:
00631     UCvsRtagCreate() : UWidget(::UEventGetWidID()) {}
00632     virtual ~UCvsRtagCreate() {}
00633
00634     enum
00635     {
00636         kOK = EV_COMMAND_START, // 0
00637         kCancel,                // 1
00638         kTabGeneral             // 2
00639     };
00640
00641     virtual void DoDataExchange(bool fill);
00642
00643 protected:
00644     ev_msg int OnOK(void);
00645     ev_msg int OnCancel(void);
00646
00647     UDECLARE_MESSAGE_MAP()
00648 };
00649
00650 UIMPLEMENT_DYNAMIC(UCvsRtagCreate, UWidget)
00651
00652 UBEGIN_MESSAGE_MAP(UCvsRtagCreate, UWidget)
00653     ON_UCOMMAND(UCvsRtagCreate::kOK, UCvsRtagCreate::OnOK)
00654     ON_UCOMMAND(UCvsRtagCreate::kCancel, UCvsRtagCreate::OnCancel)
00655 UEND_MESSAGE_MAP()
00656
00657 int UCvsRtagCreate::OnOK(void)
00658 {
00659     EndModal(true);
00660     return 0;
00661 }
00662
00663 int UCvsRtagCreate::OnCancel(void)
00664 {
00665     EndModal(false);
00666     return 0;
00667 }
00668
00669 void UCvsRtagCreate::DoDataExchange(bool fill)
00670 {
00671     if(fill)
00672     {
00673     }
00674     else
00675     {
00676     }
00677 }
00678
00679 class UCvsRtagCreate_MAIN : public UWidget
00680 {
00681     UDECLARE_DYNAMIC(UCvsRtagCreate_MAIN)
00682 public:
00683     UCvsRtagCreate_MAIN(const char * sLastModule, const char * sLastTag,
00684                         bool hasDate, bool hasRev,
00685                         const char * sLastDate, const char * sLastRev,
00686                         bool noRecurs, bool overwriteExist,
00687                         bool useMostRecent, bool lookAttic);
00688     virtual ~UCvsRtagCreate_MAIN() {}
00689
00690     enum
00691     {
00692         kEditTag = EV_COMMAND_START,    // 0
00693         kEditMod,           // 1
00694         kCheckRev,          // 2
00695         kCheckDate,         // 3
00696         kComboRev,          // 4
00697         kComboDate,         // 5
00698         kCheckRecurs,       // 6
00699         kCheckAttic,        // 7
00700         kCheckOverwrite,    // 8
00701         kCheckMatch         // 9
00702     };
00703
00704     virtual void DoDataExchange(bool fill);
00705
00706     bool m_attic;
00707     UStr m_date;
00708     UStr m_rev;
00709     bool m_hasdate;
00710     bool m_hasrev;
00711     bool m_norecurs;
00712     bool m_match;
00713     UStr m_modname;
00714     UStr m_tagname;
00715     bool m_overwrite;
00716 protected:
00717     ev_msg int OnChecks(int cmd);
00718
00719     UDECLARE_MESSAGE_MAP()
00720 };
00721
00722 UIMPLEMENT_DYNAMIC(UCvsRtagCreate_MAIN, UWidget)
00723
00724 UBEGIN_MESSAGE_MAP(UCvsRtagCreate_MAIN, UWidget)
00725     ON_UCOMMAND_RANGE(UCvsRtagCreate_MAIN::kCheckRev, UCvsRtagCreate_MAIN::kCheckDate, UCvsRtagCreate_MAIN::OnChecks)
00726 UEND_MESSAGE_MAP()
00727
00728 UCvsRtagCreate_MAIN::UCvsRtagCreate_MAIN(const char * sLastModule, const char * sLastTag,
00729                                          bool hasDate, bool hasRev,
00730                                          const char * sLastDate, const char * sLastRev,
00731                                          bool noRecurs, bool overwriteExist,
00732                                          bool useMostRecent, bool lookAttic) : UWidget(::UEventGetWidID())
00733 {
00734     m_attic = lookAttic;
00735     m_date = sLastDate;
00736     m_rev = sLastRev;
00737     m_hasdate = hasDate;
00738     m_hasrev = hasRev;
00739     m_norecurs = noRecurs;
00740     m_match = useMostRecent;
00741     m_modname = sLastModule;
00742     m_tagname = sLastTag;
00743     m_overwrite = overwriteExist;
00744 }
00745
00746 int UCvsRtagCreate_MAIN::OnChecks(int cmd)
00747 {
00748     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, cmd, 0L);
00749     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(cmd + 2, state), 0L);
00750     return 0;
00751 }
00752
00753 void UCvsRtagCreate_MAIN::DoDataExchange(bool fill)
00754 {
00755     ::DoDataExchange(fill, GetWidID(), kComboRev, gRevNames);
00756     ::DoDataExchange(fill, GetWidID(), kComboDate, gDateNames);
00757
00758     if(fill)
00759     {
00760         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditTag, (void *)(const char *)m_tagname);
00761         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditMod, (void *)(const char *)m_modname);
00762         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboRev, (void *)(const char *)m_rev);
00763         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboDate, (void *)(const char *)m_date);
00764
00765         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckDate, m_hasdate), 0L);
00766         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRev, m_hasrev), 0L);
00767         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckAttic, m_attic), 0L);
00768         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurs, m_norecurs), 0L);
00769         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckOverwrite, m_overwrite), 0L);
00770         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckMatch, m_match), 0L);
00771
00772         OnChecks(kCheckRev);
00773         OnChecks(kCheckDate);
00774     }
00775     else
00776     {
00777         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditTag, &m_tagname);
00778         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditMod, &m_modname);
00779         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboRev, &m_rev);
00780         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboDate, &m_date);
00781
00782         m_hasdate = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate, 0L);
00783         m_hasrev = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRev, 0L);
00784         m_attic = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckAttic, 0L);
00785         m_norecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurs, 0L);
00786         m_overwrite = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckOverwrite, 0L);
00787         m_match = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckMatch, 0L);
00788     }
00789 }
00790
00791 class UCvsRtagDel : public UWidget
00792 {
00793     UDECLARE_DYNAMIC(UCvsRtagDel)
00794 public:
00795     UCvsRtagDel() : UWidget(::UEventGetWidID()) {}
00796     virtual ~UCvsRtagDel() {}
00797
00798     enum
00799     {
00800         kOK = EV_COMMAND_START, // 0
00801         kCancel,                // 1
00802         kTabGeneral             // 2
00803     };
00804
00805     virtual void DoDataExchange(bool fill);
00806
00807 protected:
00808     ev_msg int OnOK(void);
00809     ev_msg int OnCancel(void);
00810
00811     UDECLARE_MESSAGE_MAP()
00812 };
00813
00814 UIMPLEMENT_DYNAMIC(UCvsRtagDel, UWidget)
00815
00816 UBEGIN_MESSAGE_MAP(UCvsRtagDel, UWidget)
00817     ON_UCOMMAND(UCvsRtagDel::kOK, UCvsRtagDel::OnOK)
00818     ON_UCOMMAND(UCvsRtagDel::kCancel, UCvsRtagDel::OnCancel)
00819 UEND_MESSAGE_MAP()
00820
00821 int UCvsRtagDel::OnOK(void)
00822 {
00823     EndModal(true);
00824     return 0;
00825 }
00826
00827 int UCvsRtagDel::OnCancel(void)
00828 {
00829     EndModal(false);
00830     return 0;
00831 }
00832
00833 void UCvsRtagDel::DoDataExchange(bool fill)
00834 {
00835     if(fill)
00836     {
00837     }
00838     else
00839     {
00840     }
00841 }
00842
00843 class UCvsRtagDel_MAIN : public UWidget
00844 {
00845     UDECLARE_DYNAMIC(UCvsRtagDel_MAIN)
00846 public:
00847     UCvsRtagDel_MAIN(const char * sLastModule,
00848                      const char * sLastTag, bool noRecurs,
00849                      bool lookAttic);
00850     virtual ~UCvsRtagDel_MAIN() {}
00851
00852     enum
00853     {
00854         kEditTag = EV_COMMAND_START,    // 0
00855         kEditMod,           // 1
00856         kCheckRecurs,       // 2
00857         kCheckAttic         // 3
00858     };
00859
00860     virtual void DoDataExchange(bool fill);
00861
00862     bool m_attic;
00863     bool m_norecurs;
00864     UStr m_modname;
00865     UStr m_tagname;
00866 protected:
00867
00868     UDECLARE_MESSAGE_MAP()
00869 };
00870
00871 UIMPLEMENT_DYNAMIC(UCvsRtagDel_MAIN, UWidget)
00872
00873 UBEGIN_MESSAGE_MAP(UCvsRtagDel_MAIN, UWidget)
00874 UEND_MESSAGE_MAP()
00875
00876 UCvsRtagDel_MAIN::UCvsRtagDel_MAIN(const char * sLastModule,
00877                                    const char * sLastTag, bool noRecurs,
00878                                    bool lookAttic) : UWidget(::UEventGetWidID())
00879 {
00880     m_attic = lookAttic;
00881     m_norecurs = noRecurs;
00882     m_modname = sLastModule;
00883     m_tagname = sLastTag;
00884 }
00885
00886 void UCvsRtagDel_MAIN::DoDataExchange(bool fill)
00887 {
00888     if(fill)
00889     {
00890         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditTag, (void *)(const char *)m_tagname);
00891         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditMod, (void *)(const char *)m_modname);
00892
00893         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckAttic, m_attic), 0L);
00894         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurs, m_norecurs), 0L);
00895     }
00896     else
00897     {
00898         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditTag, &m_tagname);
00899         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditMod, &m_modname);
00900
00901         m_attic = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckAttic, 0L);
00902         m_norecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurs, 0L);
00903     }
00904 }
00905
00906 class UCvsRtagBranch : public UWidget
00907 {
00908     UDECLARE_DYNAMIC(UCvsRtagBranch)
00909 public:
00910     UCvsRtagBranch() : UWidget(::UEventGetWidID()) {}
00911     virtual ~UCvsRtagBranch() {}
00912
00913     enum
00914     {
00915         kOK = EV_COMMAND_START, // 0
00916         kCancel,                // 1
00917         kTabGeneral             // 2
00918     };
00919
00920     virtual void DoDataExchange(bool fill);
00921
00922 protected:
00923     ev_msg int OnOK(void);
00924     ev_msg int OnCancel(void);
00925
00926     UDECLARE_MESSAGE_MAP()
00927 };
00928
00929 UIMPLEMENT_DYNAMIC(UCvsRtagBranch, UWidget)
00930
00931 UBEGIN_MESSAGE_MAP(UCvsRtagBranch, UWidget)
00932     ON_UCOMMAND(UCvsRtagBranch::kOK, UCvsRtagBranch::OnOK)
00933     ON_UCOMMAND(UCvsRtagBranch::kCancel, UCvsRtagBranch::OnCancel)
00934 UEND_MESSAGE_MAP()
00935
00936 int UCvsRtagBranch::OnOK(void)
00937 {
00938     EndModal(true);
00939     return 0;
00940 }
00941
00942 int UCvsRtagBranch::OnCancel(void)
00943 {
00944     EndModal(false);
00945     return 0;
00946 }
00947
00948 void UCvsRtagBranch::DoDataExchange(bool fill)
00949 {
00950     if(fill)
00951     {
00952     }
00953     else
00954     {
00955     }
00956 }
00957
00958 class UCvsRtagBranch_MAIN : public UWidget
00959 {
00960     UDECLARE_DYNAMIC(UCvsRtagBranch_MAIN)
00961 public:
00962     UCvsRtagBranch_MAIN(const char * sLastModule, const char * sLastTag,
00963                         bool hasDate, bool hasRev,
00964                         const char * sLastDate, const char * sLastRev,
00965                         bool noRecurs, bool useMostRecent, bool lookAttic);
00966     virtual ~UCvsRtagBranch_MAIN() {}
00967
00968     enum
00969     {
00970         kEditTag = EV_COMMAND_START,    // 0
00971         kEditMod,           // 1
00972         kCheckRev,          // 2
00973         kCheckDate,         // 3
00974         kComboRev,          // 4
00975         kComboDate,         // 5
00976         kCheckRecurs,       // 6
00977         kCheckAttic,        // 7
00978         kCheckMatch         // 9
00979     };
00980
00981     virtual void DoDataExchange(bool fill);
00982
00983     bool m_attic;
00984     UStr m_date;
00985     UStr m_rev;
00986     bool m_hasdate;
00987     bool m_hasrev;
00988     bool m_norecurs;
00989     bool m_match;
00990     UStr m_modname;
00991     UStr m_tagname;
00992 protected:
00993     ev_msg int OnChecks(int cmd);
00994
00995     UDECLARE_MESSAGE_MAP()
00996 };
00997
00998 UIMPLEMENT_DYNAMIC(UCvsRtagBranch_MAIN, UWidget)
00999
01000 UBEGIN_MESSAGE_MAP(UCvsRtagBranch_MAIN, UWidget)
01001     ON_UCOMMAND_RANGE(UCvsRtagBranch_MAIN::kCheckRev, UCvsRtagBranch_MAIN::kCheckDate, UCvsRtagBranch_MAIN::OnChecks)
01002 UEND_MESSAGE_MAP()
01003
01004 UCvsRtagBranch_MAIN::UCvsRtagBranch_MAIN(const char * sLastModule, const char * sLastTag,
01005                                              bool hasDate, bool hasRev, const char * sLastDate,
01006                                              const char * sLastRev, bool noRecurs, bool useMostRecent,
01007                                              bool lookAttic) : UWidget(::UEventGetWidID())
01008 {
01009     m_attic = lookAttic;
01010     m_date = sLastDate;
01011     m_rev = sLastRev;
01012     m_hasdate = hasDate;
01013     m_hasrev = hasRev;
01014     m_norecurs = noRecurs;
01015     m_match = useMostRecent;
01016     m_modname = sLastModule;
01017     m_tagname = sLastTag;
01018 }
01019
01020 int UCvsRtagBranch_MAIN::OnChecks(int cmd)
01021 {
01022     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, cmd, 0L);
01023     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(cmd + 2, state), 0L);
01024     return 0;
01025 }
01026
01027 void UCvsRtagBranch_MAIN::DoDataExchange(bool fill)
01028 {
01029     ::DoDataExchange(fill, GetWidID(), kComboRev, gRevNames);
01030     ::DoDataExchange(fill, GetWidID(), kComboDate, gDateNames);
01031
01032     if(fill)
01033     {
01034         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditTag, (void *)(const char *)m_tagname);
01035         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditMod, (void *)(const char *)m_modname);
01036         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboRev, (void *)(const char *)m_rev);
01037         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboDate, (void *)(const char *)m_date);
01038
01039         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckDate, m_hasdate), 0L);
01040         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRev, m_hasrev), 0L);
01041         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckAttic, m_attic), 0L);
01042         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurs, m_norecurs), 0L);
01043         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckMatch, m_match), 0L);
01044
01045         OnChecks(kCheckRev);
01046         OnChecks(kCheckDate);
01047     }
01048     else
01049     {
01050         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditTag, &m_tagname);
01051         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditMod, &m_modname);
01052         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboRev, &m_rev);
01053         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboDate, &m_date);
01054
01055         m_hasdate = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate, 0L);
01056         m_hasrev = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRev, 0L);
01057         m_attic = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckAttic, 0L);
01058         m_norecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurs, 0L);
01059         m_match = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckMatch, 0L);
01060     }
01061 }
01062
01063 #endif // qUnix
01064
01066 bool CompatGetRtag(const MultiFiles* mf, const kTagCmdType tagType,
01067                    bool& noRecurs, bool& movDelBranch,
01068                    bool& overwriteExisting, CStr& tagName,
01069                    CStr& modName, CStr& date, CStr& rev,
01070                    bool& useMostRecent, bool& lookAttic,
01071                    bool& forceCvsroot, CStr& cvsroot)
01072 {
01073     bool userHitOK = false;
01074
01075     static CStr sLastModule;
01076     static CStr sLastTag;
01077     static CStr sLastDate;
01078     static CStr sLastRev;
01079     static bool lastForceCvsroot = true;
01080     static CStr sLastCvsroot;
01081
01082     bool hasDate = false;
01083     bool hasRev = false;
01084
01085     date = "";
01086     rev = "";
01087     tagName = "";
01088     modName = "";
01089     noRecurs = false;
01090     movDelBranch = false;
01091     overwriteExisting = false;
01092     useMostRecent = false;
01093     lookAttic = false;
01094
01095     if( mf && mf->NumDirs() > 0 )
01096     {
01097         CStr path;
01098         mf->getdir(0, path);
01099
01100         FindBestLastCvsroot(path.c_str(), sLastCvsroot);
01101         FindBestLastModuleName(path.c_str(), sLastModule);
01102     }
01103
01104 #ifdef WIN32
01105     const char* title = "Tag settings";
01106
01107     switch( tagType )
01108     {
01109     case kTagCreate:
01110         title = "Create tag settings";
01111         break;
01112     case kTagDelete:
01113         title = "Delete tag settings";
01114         break;
01115     case kTagBranch:
01116         title = "Create branch settings";
01117         break;
01118     default:
01119         break;
01120     }
01121
01122     CHHelpPropertySheet pages(title);
01123     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01124
01125     CRtag_MAIN page1(mf, tagType, sLastModule, sLastTag, noRecurs, movDelBranch, lookAttic, lastForceCvsroot, sLastCvsroot, overwriteExisting);
01126     CRtag_OPTIONS page2(mf, tagType, hasDate, hasRev, sLastDate, sLastRev, useMostRecent);
01127     CGetPrefs_GLOBALS page3;
01128
01129     pages.AddPage(&page1);
01130
01131     if( tagType != kTagDelete )
01132     {
01133         pages.AddPage(&page2);
01134     }
01135
01136     pages.AddPage(&page3);
01137
01138     if( pages.DoModal() == IDOK )
01139     {
01140         sLastModule = page1.m_moduleName;
01141         sLastTag = page1.m_tagName;
01142         noRecurs = page1.m_noRecurs == TRUE;
01143         movDelBranch = page1.m_movDelBranch == TRUE;
01144         overwriteExisting = page1.m_overwriteExisting == TRUE;
01145         lookAttic = page1.m_lookAttic == TRUE;
01146         lastForceCvsroot = page1.m_forceRoot == TRUE;
01147         sLastCvsroot = page1.m_cvsroot;
01148
01149         if( tagType != kTagDelete )
01150         {
01151             sLastDate = page2.m_date;
01152             sLastRev = page2.m_rev;
01153             hasDate = page2.m_hasDate == TRUE;
01154             hasRev = page2.m_hasRev == TRUE;
01155             useMostRecent = page2.m_useMostRecent == TRUE;
01156         }
01157
01158         page3.StoreValues();
01159
01160         userHitOK = true;
01161     }
01162 #endif /* WIN32 */
01163 #if qUnix
01164 //  }
01165     switch( tagType )
01166     {
01167     case kTagCreate:
01168         {
01169             void *wid = UCreate_TagModDlg();
01170
01171             UCvsRtagCreate *dlg = new UCvsRtagCreate();
01172             UCvsRtagCreate_MAIN *tab1 =
01173                 new UCvsRtagCreate_MAIN(sLastModule, sLastTag, hasDate, hasRev,
01174                 sLastDate, sLastRev, noRecurs, overwriteExisting,
01175                 useMostRecent, lookAttic);
01176             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01177             dlg->AddPage(tab1, UCvsRtagCreate::kTabGeneral, 0);
01178
01179             if(dlg->DoModal())
01180             {
01181                 lookAttic = tab1->m_attic;
01182                 sLastDate = tab1->m_date;
01183                 sLastRev = tab1->m_rev;
01184                 hasDate = tab1->m_hasdate;
01185                 hasRev = tab1->m_hasrev;
01186                 noRecurs = tab1->m_norecurs;
01187                 useMostRecent = tab1->m_match;
01188                 sLastModule = tab1->m_modname;
01189                 sLastTag = tab1->m_tagname;
01190                 overwriteExisting = tab1->m_overwrite;
01191
01192                 userHitOK = true;
01193             }
01194
01195             delete dlg;
01196         }
01197         break;
01198     case kTagDelete:
01199         {
01200             void *wid = UCreate_UntagModDlg();
01201
01202             UCvsRtagDel *dlg = new UCvsRtagDel();
01203             UCvsRtagDel_MAIN *tab1 = new UCvsRtagDel_MAIN(sLastModule, sLastTag,
01204                 noRecurs, lookAttic);
01205             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01206             dlg->AddPage(tab1, UCvsRtagDel::kTabGeneral, 0);
01207
01208             if(dlg->DoModal())
01209             {
01210                 lookAttic = tab1->m_attic;
01211                 noRecurs = tab1->m_norecurs;
01212                 sLastModule = tab1->m_modname;
01213                 sLastTag = tab1->m_tagname;
01214
01215                 userHitOK = true;
01216             }
01217
01218             delete dlg;
01219         }
01220         break;
01221     case kTagBranch:
01222         {
01223             void *wid = UCreate_BranchModDlg();
01224
01225             UCvsRtagBranch *dlg = new UCvsRtagBranch();
01226             UCvsRtagBranch_MAIN *tab1 =
01227                 new UCvsRtagBranch_MAIN(sLastModule, sLastTag, hasDate, hasRev,
01228                 sLastDate, sLastRev, noRecurs, useMostRecent,
01229                 lookAttic);
01230             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01231             dlg->AddPage(tab1, UCvsRtagBranch::kTabGeneral, 0);
01232
01233             if(dlg->DoModal())
01234             {
01235                 lookAttic = tab1->m_attic;
01236                 sLastDate = tab1->m_date;
01237                 sLastRev = tab1->m_rev;
01238                 hasDate = tab1->m_hasdate;
01239                 hasRev = tab1->m_hasrev;
01240                 noRecurs = tab1->m_norecurs;
01241                 useMostRecent = tab1->m_match;
01242                 sLastModule = tab1->m_modname;
01243                 sLastTag = tab1->m_tagname;
01244
01245                 userHitOK = true;
01246             }
01247
01248             delete dlg;
01249         }
01250         break;
01251     default:
01252         break;
01253     }
01254
01255 #endif // qUnix
01256 #ifdef qMacCvsPP
01257     switch( tagType )
01258     {
01259     case kTagCreate:
01260         {
01261             StDialogHandler theHandler(dlg_RtagCreate, LCommander::GetTopCommander());
01262             LWindow *theDialog = theHandler.GetDialog();
01263             ThrowIfNil_(theDialog);
01264             static UInt16 sRuntimePanel = 1;
01265
01266             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01267                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01268             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01269
01270             multiView->SwitchToPanel(3);
01271             DoDataExchange_Globals(theDialog, true);
01272             multiView->SwitchToPanel(2);
01273             DoDataExchange_RtagCreateOptions(theDialog, noRecurs, overwriteExisting, true);
01274             multiView->SwitchToPanel(1);
01275             DoDataExchange_RtagCreateMain(theDialog, mf, sLastModule, sLastTag,
01276                 hasDate, hasRev, sLastDate, sLastRev,
01277                 useMostRecent, lookAttic, true);
01278
01279             groupView->SetValue(sRuntimePanel);
01280             theDialog->Show();
01281             MessageT hitMessage;
01282             while (true)
01283             {       // Let DialogHandler process events
01284                 hitMessage = theHandler.DoDialog();
01285
01286                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01287                     break;
01288             }
01289             theDialog->Hide();
01290             sRuntimePanel = groupView->GetValue();
01291
01292             if(hitMessage == msg_OK)
01293             {
01294                 multiView->SwitchToPanel(1);
01295                 DoDataExchange_RtagCreateMain(theDialog, mf, sLastModule, sLastTag,
01296                     hasDate, hasRev, sLastDate, sLastRev,
01297                     useMostRecent, lookAttic, false);
01298                 multiView->SwitchToPanel(2);
01299                 DoDataExchange_RtagCreateOptions(theDialog, noRecurs, overwriteExisting, false);
01300                 multiView->SwitchToPanel(3);
01301                 DoDataExchange_Globals(theDialog, false);
01302                 userHitOK = true;
01303             }
01304         }
01305         break;
01306     case kTagDelete:
01307         {
01308             StDialogHandler theHandler(dlg_RtagDelete, LCommander::GetTopCommander());
01309             LWindow *theDialog = theHandler.GetDialog();
01310             ThrowIfNil_(theDialog);
01311             static UInt16 sRuntimePanel = 1;
01312
01313             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01314                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01315             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01316
01317             multiView->SwitchToPanel(2);
01318             DoDataExchange_Globals(theDialog, true);
01319             multiView->SwitchToPanel(1);
01320             DoDataExchange_RtagDeleteMain(theDialog, mf, sLastModule, sLastTag,
01321                 noRecurs, lookAttic, true);
01322
01323             groupView->SetValue(sRuntimePanel);
01324             theDialog->Show();
01325             MessageT hitMessage;
01326             while (true)
01327             {       // Let DialogHandler process events
01328                 hitMessage = theHandler.DoDialog();
01329
01330                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01331                     break;
01332             }
01333             theDialog->Hide();
01334             sRuntimePanel = groupView->GetValue();
01335
01336             if(hitMessage == msg_OK)
01337             {
01338                 multiView->SwitchToPanel(1);
01339                 DoDataExchange_RtagDeleteMain(theDialog, mf, sLastModule, sLastTag,
01340                     noRecurs, lookAttic, false);
01341                 multiView->SwitchToPanel(2);
01342                 DoDataExchange_Globals(theDialog, false);
01343                 userHitOK = true;
01344             }
01345         }
01346         break;
01347     case kTagBranch:
01348         {
01349             StDialogHandler theHandler(dlg_RtagBranch, LCommander::GetTopCommander());
01350             LWindow *theDialog = theHandler.GetDialog();
01351             ThrowIfNil_(theDialog);
01352             static UInt16 sRuntimePanel = 1;
01353
01354             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01355                 (theDialog->FindPaneByID(item_MultiViewPrefs));
01356             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01357
01358             multiView->SwitchToPanel(3);
01359             DoDataExchange_Globals(theDialog, true);
01360             multiView->SwitchToPanel(2);
01361             DoDataExchange_RtagBranchOptions(theDialog, noRecurs, true);
01362             multiView->SwitchToPanel(1);
01363             DoDataExchange_RtagBranchMain(theDialog, mf, sLastModule, sLastTag,
01364                 hasDate, hasRev, sLastDate, sLastRev,
01365                 useMostRecent, lookAttic, true);
01366
01367             groupView->SetValue(sRuntimePanel);
01368             theDialog->Show();
01369             MessageT hitMessage;
01370             while (true)
01371             {       // Let DialogHandler process events
01372                 hitMessage = theHandler.DoDialog();
01373
01374                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01375                     break;
01376             }
01377             theDialog->Hide();
01378             sRuntimePanel = groupView->GetValue();
01379
01380             if(hitMessage == msg_OK)
01381             {
01382                 multiView->SwitchToPanel(1);
01383                 DoDataExchange_RtagBranchMain(theDialog, mf, sLastModule, sLastTag,
01384                     hasDate, hasRev, sLastDate, sLastRev,
01385                     useMostRecent, lookAttic, false);
01386                 multiView->SwitchToPanel(2);
01387                 DoDataExchange_RtagBranchOptions(theDialog, noRecurs, false);
01388                 multiView->SwitchToPanel(3);
01389                 DoDataExchange_Globals(theDialog, false);
01390                 userHitOK = true;
01391             }
01392         }
01393         break;
01394     default:
01395         break;
01396     }
01397 #endif /* qMacCvsPP */
01398
01399     if( userHitOK )
01400     {
01401         if( tagType != kTagDelete )
01402         {
01403             if( hasDate && !sLastDate.empty() )
01404                 date = sLastDate;
01405
01406             if( hasRev && !sLastRev.empty() )
01407                 rev = sLastRev;
01408         }
01409
01410         tagName = sLastTag;
01411         modName = sLastModule;
01412
01413         forceCvsroot = lastForceCvsroot;
01414         cvsroot = sLastCvsroot;
01415
01416         if( mf && mf->NumDirs() > 0 && forceCvsroot )
01417         {
01418             CStr path;
01419             mf->getdir(0, path);
01420
01421             InsertLastCvsroot(path, cvsroot);
01422             InsertLastModuleName(path, modName);
01423         }
01424
01425         gCvsPrefs.save();
01426     }
01427
01428     return userHitOK;
01429 }
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSelectionDetailsDlg Member List

This is the complete list of members for CSelectionDetailsDlg, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam) | CSelectionDetailsDlg | [private, static]
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CSelectionDetailsDlg(const MultiFiles *mf, const kSelDetType selDetType, const char *selection, CWnd *pParent=NULL) | CSelectionDetailsDlg |
DeleteAllItems() | CSelectionDetailsDlg | [private]
DisplaySelection() | CSelectionDetailsDlg | [private]
DoDataExchange(CDataExchange *pDX) | CSelectionDetailsDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableControls() | CSelectionDetailsDlg | [private]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CSelectionDetailsDlg |
InitHelpID() | CSelectionDetailsDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_fileNameCheck | CSelectionDetailsDlg |
m_headerCtrl | CSelectionDetailsDlg | [private]
m_mf | CSelectionDetailsDlg | [private]
m_pathCheck | CSelectionDetailsDlg |
m_revisionCheck | CSelectionDetailsDlg |
m_revisionSpinCtrl | CSelectionDetailsDlg |
m_selDetType | CSelectionDetailsDlg |
m_selection | CSelectionDetailsDlg |
m_selectionEdit | CSelectionDetailsDlg |
m_selectionListCtrl | CSelectionDetailsDlg |
m_sortAsc | CSelectionDetailsDlg | [private]
m_sortColumn | CSelectionDetailsDlg | [private]
OnColumnclickSelectionlist(NMHDR *pNMHDR, LRESULT *pResult) | CSelectionDetailsDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDblclkSelectionlist(NMHDR *pNMHDR, LRESULT *pResult) | CSelectionDetailsDlg | [protected]
OnDeltaposRevisionSpin(NMHDR *pNMHDR, LRESULT *pResult) | CSelectionDetailsDlg | [protected]
OnDestroy() | CSelectionDetailsDlg | [protected]
OnFilename() | CSelectionDetailsDlg | [protected]
OnHelp() | CSelectionDetailsDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CSelectionDetailsDlg | [protected, virtual]
OnItemchangedSelectionlist(NMHDR *pNMHDR, LRESULT *pResult) | CSelectionDetailsDlg | [protected]
OnPath() | CSelectionDetailsDlg | [protected]
OnRevision() | CSelectionDetailsDlg | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
SortItems(int column, bool asc) | CSelectionDetailsDlg | [private]
UpdateSelect(int item) | CSelectionDetailsDlg | [private]
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:56:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJCaption Member List

This is the complete list of members for CCJCaption, including all inherited members.

CCJCaption() | CCJCaption |
Create(CWnd *pParentWnd, LPCTSTR lpszWindowName, DWORD dwExStyle=0x01, DWORD dwStyle=WS_VISIBLE|SS_CENTER|SS_CENTERIMAGE, const CRect &rect=CRect(0, 0, 0, 0), UINT nID=0xffff) | CCJCaption | [virtual]
DrawCaptionBack(CDC *pDC, CRect &rcItem) | CCJCaption | [virtual]
DrawCaptionIcon(CDC *pDC, CRect &rcItem) | CCJCaption | [virtual]
DrawCaptionText(CDC *pDC, CRect &rcItem) | CCJCaption | [virtual]
KillChildWindow() | CCJCaption | [virtual]
m_CaptionButton | CCJCaption | [protected]
m_clrBackgnd | CCJCaption | [protected]
m_clrBorder | CCJCaption | [protected]
m_clrBtnFace | CCJCaption | [protected]
m_clrBtnHilite | CCJCaption | [protected]
m_clrBtnShadow | CCJCaption | [protected]
m_clrFont | CCJCaption | [protected]
m_cx | CCJCaption | [protected]
m_cy | CCJCaption | [protected]
m_dwExStyle | CCJCaption | [protected]
m_dwTextStyle | CCJCaption | [protected]
m_Font | CCJCaption | [protected]
m_hIcon | CCJCaption | [protected]
m_nBorder | CCJCaption | [protected]
m_nOffset | CCJCaption | [protected]
m_pChildWnd | CCJCaption | [protected]
m_pFont | CCJCaption | [protected]
m_pNotifyWnd | CCJCaption | [protected]
m_pWndPopDown | CCJCaption | [protected]
m_rcChild | CCJCaption | [protected]
m_rcClient | CCJCaption | [protected]
m_strWindText | CCJCaption | [protected]
ModifyCaptionStyle(int nBorderSize, CFont *pFont=NULL, LPCTSTR lpszWindText=NULL, HICON hIcon=NULL) | CCJCaption | [virtual]
OnCaptButton() | CCJCaption | [protected]
OnEraseBkgnd(CDC *pDC) | CCJCaption | [protected]
OnPaint() | CCJCaption | [protected]
OnPushPinButton(UINT lParam, LONG wParam) | CCJCaption | [protected]
OnPushPinCancel(UINT lParam, LONG wParam) | CCJCaption | [protected]
OnSize(UINT nType, int cx, int cy) | CCJCaption | [protected]
OnSysColorChange() | CCJCaption | [protected]
SetCaptionColors(COLORREF clrBorder, COLORREF clrBackground, COLORREF clrFont) | CCJCaption | [virtual]
SetChildWindow(CWnd *pChild, CWnd *pNotifyWnd) | CCJCaption | [virtual]
SetTextStyle(DWORD dwStyle) | CCJCaption | [virtual]
UpdateCaption(LPCTSTR lpszWindowText, HICON hIcon) | CCJCaption | [virtual]
UpdateCaptionBack(CDC *pDC, CRect &rcItem) | CCJCaption | [virtual]
UpdateCaptionText(CDC *pDC, CRect &rcItem) | CCJCaption | [virtual]
UpdateFont() | CCJCaption | [virtual]
~CCJCaption() | CCJCaption | [virtual]

Generated on Sat Aug 7 22:48:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_loader.c Source File

common/dll_loader.c

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * dll_loader.cpp --- code to load dynamic code
00023  */
00024
00025 #ifdef HAVE_CONFIG_H
00026 #   include "config.h"
00027 #endif /* HAVE_CONFIG_H */
00028
00029 #if !defined(WIN32) && !defined(TARGET_OS_MAC)
00030 #   include "dynl.h"
00031 #endif /* !WIN32 && !TARGET_OS_MAC */
00032
00033 #ifdef WIN32
00034 #   include <windows.h>
00035 #endif /* WIN32 */
00036
00037 #include <string.h>
00038
00039 #include "dll_loader.h"
00040
00041 void* sCompatProc;
00042
00043 #ifdef TARGET_OS_MAC
00044 #   include <TextUtils.h>
00045     static ProcPtr getSymFunction(CompatConnectID connID, const Str255 name)
00046     {
00047         long symCount;
00048         Ptr symAddr;
00049         int i;
00050         OSErr err = CountSymbols(connID, &symCount);
00051         if(err != noErr)
00052             return 0L;
00053
00054         for(i = 0; i < symCount; i++)
00055         {
00056             CFragSymbolClass symClass;
00057             Str255 symName;
00058             err = GetIndSymbol(connID, i, symName, &symAddr, &symClass);
00059             if(err != noErr)
00060                 return 0L;
00061             if(memcmp(symName, name, name[0]) == 0)
00062                 break;
00063         }
00064         if(i == symCount)
00065             return 0L;
00066         return (ProcPtr)symAddr;
00067     }
00068 #endif /* TARGET_OS_MAC */
00069
00076 int CompatLoadLibrary(CompatConnectID* connID, const char* name_dll)
00077 {
00078     if( connID == 0L )
00079         return 0;
00080
00081 #ifdef TARGET_OS_MAC
00082     {
00083         OSErr err;
00084         Ptr mainAddr;
00085         Str255 errMessage;
00086         Str255 pname;
00087
00088         c2pstrcpy(pname, name_dll);
00089         err = GetSharedLibrary(pname, kPowerPCCFragArch, kPrivateCFragCopy, connID, &mainAddr, errMessage);
00090         return err == noErr;
00091     }
00092 #elif defined(WIN32)
00093     *connID = LoadLibrary(name_dll);
00094     return (*connID) != 0L;
00095 #else
00096     *connID = dynl_link(name_dll);
00097     return (*connID) != 0L;
00098 #endif
00099 }
00100
00106 int CompatCloseLibrary(CompatConnectID* connID)
00107 {
00108     if( connID == 0L )
00109         return 0;
00110
00111 #ifdef TARGET_OS_MAC
00112     CloseConnection(connID);
00113 #elif defined(WIN32)
00114     FreeLibrary(*connID);
00115     connID = 0L;
00116 #else
00117     dynl_unlink(*connID);
00118     connID = 0L;
00119 #endif
00120
00121     return 1;
00122 }
00123
00130 void* _CompatCallLibrary(CompatConnectID connID, const char* name_func)
00131 {
00132 #ifdef TARGET_OS_MAC
00133     ProcPtr symAddr;
00134     Str255 pname;
00135
00136     c2pstrcpy(pname, name_func);
00137
00138     symAddr = getSymFunction(connID, pname);
00139     return symAddr;
00140 #elif defined(WIN32)
00141     return GetProcAddress(connID, name_func);
00142 #else
00143     return dynl_func(name_func, connID);
00144 #endif
00145 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCvsConsole Member List

This is the complete list of members for CCvsConsole, including all inherited members.

cvs_err(const char *txt, long len)=0L | CCvsConsole | [pure virtual]
cvs_out(const char *txt, long len)=0L | CCvsConsole | [pure virtual]

Generated on Sat Aug 7 22:50:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonImpl.cpp Source File

common/PythonImpl.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- September 2001
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #include "PythonImpl.h"
00024 #include "CvsPrefs.h"
00025 #include "umenu.h"
00026
00027 #if USE_PYTHON
00028
00029 PY_IMPL_CLASS(CvsEntry, "Class for an entry in CVS/Entries")
00030
00031 PY_BEGIN_IMPL_METHOD(CvsEntry)
00032 PY_END_IMPL_METHOD
00033
00034 PyObject* PyCvsEntry::Create(PyObject* selfptr, PyObject* args)
00035 {
00036     if( !PyArg_ParseTuple(args, ":CCvsEntry") )
00037         return NULL;
00038
00039     PyAutoObject<PyCvsEntry::obj_t> self = PyCvsEntry::New();
00040     if( !self.IsValid() )
00041         return NULL;
00042
00043     TRY
00044     {
00045         self->m_object = new PyCvsEntry(0L);
00046     }
00047     CATCH_ALL(e)
00048     {
00049         PyHandleCvsguiError(e);
00050         return NULL;
00051     }
00052     END_CATCH_ALL
00053
00054     return self.CopyReturn();
00055 }
00056
00057 void PyCvsEntry::InitValues(PyObject* d)
00058 {
00059 }
00060
00061 PyObject* PyCvsEntry::GetAttr(char* name)
00062 {
00063     UStr buf;
00064     EntnodeData* data = m_data;
00065
00066     if( strcmp(name, "name") == 0 )
00067         return PyString_FromString(data->GetName());
00068     else if( strcmp(name, "fullname") == 0 )
00069         return PyString_FromString(data->GetFullPathName(buf));
00070     else if( strcmp(name, "version") == 0 )
00071     {
00072         const char* str = (*data)[EntnodeFile::kVN];
00073         return PyString_FromString(str ? str : "");
00074     }
00075     else if( strcmp(name, "timeutc") == 0 )
00076     {
00077         const char* str = (*data)[EntnodeFile::kTS];
00078         return PyString_FromString(str ? str : "");
00079     }
00080     else if( strcmp(name, "keyword") == 0 )
00081     {
00082         const char* str = (*data)[EntnodeFile::kOption];
00083         return PyString_FromString(str ? str : "");
00084     }
00085     else if( strcmp(name, "tag") == 0 )
00086     {
00087         const char* str = (*data)[EntnodeFile::kTag];
00088         return PyString_FromString(str ? str : "");
00089     }
00090     else if( strcmp(name, "isfile") == 0 )
00091         return data->GetType() == ENT_FILE ? True() : False();
00092     else if( strcmp(name, "modified") == 0 )
00093         return data->IsUnmodified() ? False() : True();
00094     else if( strcmp(name, "missing") == 0 )
00095         return data->IsMissing() ? True() : False();
00096     else if( strcmp(name, "unknown") == 0 )
00097         return data->IsUnknown() ? True() : False();
00098     else if( strcmp(name, "ignored") == 0 )
00099         return data->IsIgnored() ? True() : False();
00100     else if( strcmp(name, "readonly") == 0 )
00101         return data->IsLocked() ? True() : False();
00102     else if( strcmp(name, "removed") == 0 )
00103         return data->IsRemoved() ? True() : False();
00104     else if( strcmp(name, "added") == 0 )
00105     {
00106         const char* vn = (*data)[EntnodeFile::kVN];
00107         bool isAdded = vn && (strcmp(vn, "0") == 0);
00108         return isAdded ? True() : False();
00109     }
00110     else if( strcmp(name, "state") == 0 )
00111         return PyString_FromString(data->GetState() ? data->GetState() : "");
00112     else if( strcmp(name, "encoding") == 0 )
00113         return PyString_FromString((*data)[EntnodeFile::kEncoding] ? (*data)[EntnodeFile::kEncoding] : "");
00114     else if( strcmp(name, "conflict") == 0 )
00115         return PyString_FromString(data->GetConflict() ? data->GetConflict() : "");
00116
00117     return NULL;
00118 }
00119
00120 PY_IMPL_CLASS(ColorConsole, "Class printing in color in the console")
00121
00122 PY_BEGIN_IMPL_METHOD(ColorConsole)
00123     PY_IMPL_METHOD(ColorConsole, Print, "Print in color")
00124 PY_END_IMPL_METHOD
00125
00126 PyObject* PyColorConsole::Create(PyObject* selfptr, PyObject* args)
00127 {
00128     if( !PyArg_ParseTuple(args, ":CColorConsole") )
00129         return NULL;
00130
00131     PyAutoObject<PyColorConsole::obj_t> self = PyColorConsole::New();
00132     if( !self.IsValid() )
00133         return NULL;
00134
00135     TRY
00136     {
00137         self->m_object = new PyColorConsole();
00138     }
00139     CATCH_ALL(e)
00140     {
00141         PyHandleCvsguiError(e);
00142         return NULL;
00143     }
00144     END_CATCH_ALL
00145
00146     return self.CopyReturn();
00147 }
00148
00149
00150 void PyColorConsole::InitValues(PyObject* d)
00151 {
00152     RegisterValue(d, "kNormal", kNormal);
00153     RegisterValue(d, "kBrown", kBrown);
00154     RegisterValue(d, "kGreen", kGreen);
00155     RegisterValue(d, "kMagenta", kMagenta);
00156     RegisterValue(d, "kRed", kRed);
00157     RegisterValue(d, "kBlue", kBlue);
00158     RegisterValue(d, "kBold", kBold);
00159     RegisterValue(d, "kItalic", kItalic);
00160     RegisterValue(d, "kUnderline", kUnderline);
00161     RegisterValue(d, "kNL", kNL);
00162 }
00163
00164 PyObject* PyColorConsole::Print(PyObject* args)
00165 {
00166     int style;
00167
00168     if( PyArg_ParseTuple(args, "i", &style) )
00169     {
00170         m_console << kConsoleColor(style);
00171         return Void();
00172     }
00173
00174     PyErr_Clear();
00175
00176     char* str;
00177     if( PyArg_ParseTuple(args, "s", &str) )
00178     {
00179         m_console << str;
00180         return Void();
00181     }
00182
00183     return NULL;
00184 }
00185
00186 PY_IMPL_CLASS(MenuMgr, "Class to manipulate menus")
00187
00188 PY_BEGIN_IMPL_METHOD(MenuMgr)
00189     PY_IMPL_METHOD(MenuMgr, AddPulldown, "Add a new menu")
00190     PY_IMPL_METHOD(MenuMgr, AddToggle, "Add a toggle menu entry")
00191     PY_IMPL_METHOD(MenuMgr, AddButton, "Add a regular menu entry")
00192     PY_IMPL_METHOD(MenuMgr, AddSeparator, "Add a separator menu entry")
00193     PY_IMPL_METHOD(MenuMgr, Delete, "Delete a menu entry by index")
00194     PY_IMPL_METHOD(MenuMgr, DeleteByCmd, "Delete a menu entry by command")
00195     PY_IMPL_METHOD(MenuMgr, Count, "Count the number of entries in the menu")
00196 PY_END_IMPL_METHOD
00197
00198 static int ParseUMENU(PyObject* v, UMENU* menu)
00199 {
00200     if(v->ob_type == PyMenuMgr::GetType())
00201     {
00202         *menu = *((PyMenuMgr::obj_t*)v)->m_object;
00203         return 1;
00204     }
00205
00206     return 0;
00207 }
00208
00209 PyObject* PyMenuMgr::Create(PyObject* selfptr, PyObject* args)
00210 {
00211     UMENU menu;
00212
00213     if( !PyArg_ParseTuple(args, "i:CMenuMgr", &menu) )
00214         return NULL;
00215
00216     PyAutoObject<PyMenuMgr::obj_t> self = PyMenuMgr::New();
00217     if( !self.IsValid() )
00218         return NULL;
00219
00220     TRY
00221     {
00222         self->m_object = new PyMenuMgr(menu);
00223     }
00224     CATCH_ALL(e)
00225     {
00226         PyHandleCvsguiError(e);
00227         return NULL;
00228     }
00229     END_CATCH_ALL
00230
00231     return self.CopyReturn();
00232 }
00233
00234 void PyMenuMgr::InitValues(PyObject* d)
00235 {
00236 }
00237
00238 PyObject* PyMenuMgr::AddPulldown(PyObject* args)
00239 {
00240     int widid;
00241     char* name;
00242
00243     if( !PyArg_ParseTuple(args, "is", &widid, &name) )
00244         return NULL;
00245
00246     PyAutoObject<PyMenuMgr::obj_t> res = PyMenuMgr::New();
00247     if( !res.IsValid() )
00248         return NULL;
00249
00250     res->m_object = new PyMenuMgr(UMenuAddPulldown(widid, name, m_menu));
00251
00252     return res.CopyReturn();
00253 }
00254
00255 PyObject* PyMenuMgr::AddToggle(PyObject* args)
00256 {
00257     int widid, cmd;
00258     char *name, *pixmap = 0L;
00259
00260     if( !PyArg_ParseTuple(args, "isi|s", &widid, &name, &cmd, &pixmap) )
00261         return NULL;
00262
00263     UMenuAddToggle(widid, name, m_menu, pixmap, cmd);
00264
00265     return Void();
00266 }
00267
00268 PyObject* PyMenuMgr::AddButton(PyObject* args)
00269 {
00270     int widid, cmd;
00271     char *name, *pixmap = 0L;
00272
00273     if( !PyArg_ParseTuple(args, "isi|s", &widid, &name, &cmd, &pixmap) )
00274         return NULL;
00275
00276     UMenuAddButton(widid, name, m_menu, pixmap, cmd);
00277
00278     return Void();
00279 }
00280
00281 PyObject* PyMenuMgr::AddSeparator(PyObject* args)
00282 {
00283     int widid;
00284
00285     if( !PyArg_ParseTuple(args, "i", &widid) )
00286         return NULL;
00287
00288     UMenuAddSeparator(widid, m_menu);
00289
00290     return Void();
00291 }
00292
00293 PyObject* PyMenuMgr::Delete(PyObject* args)
00294 {
00295     int afterIndex;
00296
00297     if( !PyArg_ParseTuple(args, "i", &afterIndex) )
00298         return NULL;
00299
00300     UMenuDelete(m_menu, afterIndex);
00301
00302     return Void();
00303 }
00304
00305 PyObject* PyMenuMgr::DeleteByCmd(PyObject* args)
00306 {
00307     int cmd;
00308
00309     if( !PyArg_ParseTuple(args, "i", &cmd) )
00310         return NULL;
00311
00312     UMenuDeleteByCmd(m_menu, cmd);
00313
00314     return Void();
00315 }
00316
00317 PyObject* PyMenuMgr::Count(PyObject* args)
00318 {
00319     int res;
00320
00321     if( !PyArg_ParseTuple(args, "") )
00322         return NULL;
00323
00324     res = UMenuCount(m_menu);
00325
00326     return PyInt_FromLong(res);
00327 }
00328
00329 PY_IMPL_CLASS(CmdUI, "Class to update an interface object state")
00330
00331 PY_BEGIN_IMPL_METHOD(CmdUI)
00332     PY_IMPL_METHOD(CmdUI, Enable, "Enable/Disable the object")
00333     PY_IMPL_METHOD(CmdUI, SetCheck, "Check/uncheck the object")
00334     PY_IMPL_METHOD(CmdUI, SetText, "Rename the object")
00335 PY_END_IMPL_METHOD
00336
00337 PyObject* PyCmdUI::Create(PyObject* selfptr, PyObject* args)
00338 {
00339     UCmdUI *cmdui;
00340
00341 #if defined(SIZEOF_VOID_P) && (SIZEOF_VOID_P == 8)
00342     if( !PyArg_ParseTuple(args, "K:CCmdUI", &cmdui) )
00343         return NULL;
00344 #else
00345     if( !PyArg_ParseTuple(args, "i:CCmdUI", &cmdui) )
00346         return NULL;
00347 #endif
00348     PyAutoObject<PyCmdUI::obj_t> self = PyCmdUI::New();
00349     if( !self.IsValid() )
00350         return NULL;
00351
00352     TRY
00353     {
00354         self->m_object = new PyCmdUI(cmdui);
00355     }
00356     CATCH_ALL(e)
00357     {
00358         PyHandleCvsguiError(e);
00359         return NULL;
00360     }
00361     END_CATCH_ALL
00362
00363     return self.CopyReturn();
00364 }
00365
00366 void PyCmdUI::InitValues(PyObject* d)
00367 {
00368 }
00369
00370 PyObject* PyCmdUI::Enable(PyObject* args)
00371 {
00372     int state;
00373
00374     if( !PyArg_ParseTuple(args, "i", &state) )
00375         return NULL;
00376
00377     m_cmdui->Enable(state != 0);
00378
00379     return Void();
00380 }
00381
00382 PyObject* PyCmdUI::SetCheck(PyObject* args)
00383 {
00384     int state;
00385
00386     if( !PyArg_ParseTuple(args, "i", &state) )
00387         return NULL;
00388
00389     m_cmdui->Check(state != 0);
00390
00391     return Void();
00392 }
00393
00394 PyObject* PyCmdUI::SetText(PyObject* args)
00395 {
00396     char* text;
00397
00398     if( !PyArg_ParseTuple(args, "s", &text) )
00399         return NULL;
00400
00401     m_cmdui->SetText(text);
00402
00403     return Void();
00404 }
00405
00406 PY_IMPL_CLASS(Persistent, "Class to store persistent values on disk")
00407
00408 PY_BEGIN_IMPL_METHOD(Persistent)
00409     PY_IMPL_METHOD(Persistent, GetValue, "Get the persistent value")
00410     PY_IMPL_METHOD(Persistent, SetValue, "Set the persistent value")
00411 PY_END_IMPL_METHOD
00412
00413 PyObject* PyPersistent::Create(PyObject* selfptr, PyObject* args)
00414 {
00415     char *uniqueName, *defValue = 0L;
00416     int addToSettings = 0;
00417
00418     if( !PyArg_ParseTuple(args, "s|si:CPersistent", &uniqueName, &defValue, &addToSettings) )
00419         return NULL;
00420
00421     PyAutoObject<PyPersistent::obj_t> self = PyPersistent::New();
00422     if( !self.IsValid() )
00423         return NULL;
00424
00425     TRY
00426     {
00427         self->m_object = new PyPersistent(uniqueName, defValue, addToSettings ? kAddSettings : kNoClass);
00428
00429         CPersistent::LoadAll(uniqueName);
00430     }
00431     CATCH_ALL(e)
00432     {
00433         PyHandleCvsguiError(e);
00434         return NULL;
00435     }
00436     END_CATCH_ALL
00437
00438     return self.CopyReturn();
00439 }
00440
00441 void PyPersistent::InitValues(PyObject* d)
00442 {
00443 }
00444
00445 PyObject* PyPersistent::SetValue(PyObject* args)
00446 {
00447     char* s;
00448
00449     if( !PyArg_ParseTuple(args, "s", &s) )
00450         return NULL;
00451
00452     m_cstr = s;
00453
00454     gCvsPrefs.save(true);
00455
00456     return Void();
00457 }
00458
00459 PyObject* PyPersistent::GetValue(PyObject* args)
00460 {
00461     if( !PyArg_ParseTuple(args, "") )
00462         return NULL;
00463
00464     return PyString_FromString(m_cstr);
00465 }
00466
00467 #if (defined(WIN32) && !qCvsDebug) || TARGET_RT_MAC_MACHO
00468
00469 #undef PYTHONGLUE_IMPL_H
00470 #undef PYTHONGLUE_EXTERN
00471 #define PYTHONGLUE_EXTERN
00472 #include "PythonGlue.impl.h"
00473
00474 PyTypeObject* GetPyType_Type()
00475 {
00476     return PyType_Type_glue;
00477 }
00478
00479 PyTypeObject* GetPyFile_Type()
00480 {
00481     return PyFile_Type_glue;
00482 }
00483
00484 PyTypeObject* GetPyString_Type()
00485 {
00486     return PyString_Type_glue;
00487 }
00488
00489 PyTypeObject* GetPyTuple_Type()
00490 {
00491     return PyTuple_Type_glue;
00492 }
00493
00494 PyTypeObject* GetPyInt_Type()
00495 {
00496     return PyInt_Type_glue;
00497 }
00498
00499 PyObject* GetPyNone()
00500 {
00501     return _Py_NoneStruct_glue;
00502 }
00503
00504 PyObject* GetPyTrue()
00505 {
00506     return _Py_TrueStruct_glue;
00507 }
00508
00509 PyObject* GetPyFalse()
00510 {
00511     return _Py_ZeroStruct_glue;
00512 }
00513 #endif // WIN32 && !qCvsDebug
00514
00515 #endif // USE_PYTHON
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJHtmlView.cpp Source File

WinCvs/CJLib/CJLibrary/CJHtmlView.cpp

Go to the documentation of this file.
00001 // CJHtmlView.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Iuri Apollonio's article 'Doc / View -
00007 // Using HtmlView apart from Tecno Preview' http://www.codeguru.com/doc_view/htmlview.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:49 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/CJLibrary/CJHtmlView.cpp $
00015  *
00016  * $History: CJHtmlView.cpp $
00017  *
00018  * *****************  Version 8  *****************
00019  * User: Kirk Stowell Date: 10/14/99   Time: 10:05a
00020  * Updated in $/CodeJock/CJLibrary
00021  * Overrode OnEraseBkgnd(...) to help to eliminate screen flicker.
00022  *
00023  * *****************  Version 7  *****************
00024  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00025  * Updated in $/CodeJockey/CJLibrary
00026  * Updated copyright and contact information.
00027  *
00028  * *****************  Version 6  *****************
00029  * User: Kirk Stowell Date: 7/31/99    Time: 4:26p
00030  * Updated in $/CodeJockey/CJLibrary
00031  *
00032  * *****************  Version 4  *****************
00033  * User: Kirk Stowell Date: 7/25/99    Time: 1:29a
00034  * Updated in $/CodeJockey/CJLibrary
00035  *
00036  * *****************  Version 3  *****************
00037  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00038  * Updated in $/CodeJockey/CJLibrary
00039  *
00040  * *****************  Version 2  *****************
00041  * User: Kirk Stowell Date: 7/18/99    Time: 10:27p
00042  * Updated in $/CodeJockey/CJLibrary
00043  * Added vc5 compatibility.
00044  *
00045  * *****************  Version 1  *****************
00046  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00047  * Created in $/CodeJockey/CJLibrary
00048  * Copied from MFC v6 and techno preview for v5. Added to extend
00049  * functionality to Visual C++ 5.0 users.
00050  *
00051  ***************************************************************************/
00053
00054 #include "StdAfx.h"
00055 #include "CJHtmlView.h"
00056
00057 #ifdef _DEBUG
00058 #define new DEBUG_NEW
00059 #undef THIS_FILE
00060 static char THIS_FILE[] = __FILE__;
00061 #endif
00062
00063 DWORD AFXAPI _AfxRelease(LPUNKNOWN* lplpUnknown)
00064 {
00065     ASSERT(lplpUnknown != NULL);
00066     if (*lplpUnknown != NULL)
00067     {
00068         DWORD dwRef = (*lplpUnknown)->Release();
00069         *lplpUnknown = NULL;
00070         return dwRef;
00071     }
00072     return 0;
00073 }
00074
00075 // helper for reliable and small Release calls
00076 DWORD AFXAPI _AfxRelease(LPUNKNOWN* plpUnknown);
00077 #ifndef _DEBUG
00078 // generate smaller code in release build
00079 #define RELEASE(lpUnk) _AfxRelease((LPUNKNOWN*)&lpUnk)
00080 #else
00081 // generate larger but typesafe code in debug build
00082 #define RELEASE(lpUnk) do \
00083     { if ((lpUnk) != NULL) { (lpUnk)->Release(); (lpUnk) = NULL; } } while (0)
00084 #endif
00085
00087 // CCJHtmlView
00088
00089 BEGIN_MESSAGE_MAP(CCJHtmlView, CFormView)
00090     //{{AFX_MSG_MAP(CCJHtmlView)
00091     ON_WM_SIZE()
00092     ON_WM_PAINT()
00093     ON_WM_DESTROY()
00094     ON_WM_ERASEBKGND()
00095     ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
00096     //}}AFX_MSG_MAP
00097 END_MESSAGE_MAP()
00098
00099 BEGIN_EVENTSINK_MAP(CCJHtmlView, CFormView)
00100     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 102 /* StatusTextChange */, OnStatusTextChange, VTS_BSTR)
00101     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 108 /* ProgressChange */, OnProgressChange, VTS_I4 VTS_I4)
00102     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 105 /* CommandStateChange */, OnCommandStateChange, VTS_I4 VTS_BOOL)
00103     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 106 /* DownloadBegin */, OnDownloadBegin, VTS_NONE)
00104     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 104 /* DownloadComplete */, OnDownloadComplete, VTS_NONE)
00105     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 113 /* TitleChange */, OnTitleChange, VTS_BSTR)
00106     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 252 /* NavigateComplete2 */, NavigateComplete2, VTS_DISPATCH VTS_PVARIANT)
00107     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 250 /* BeforeNavigate2 */, BeforeNavigate2, VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PBOOL)
00108     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 112 /* PropertyChange */, OnPropertyChange, VTS_BSTR)
00109     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 251 /* NewWindow2 */, OnNewWindow2, VTS_PDISPATCH VTS_PBOOL)
00110     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 259 /* DocumentComplete */, DocumentComplete, VTS_DISPATCH VTS_PVARIANT)
00111     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 253 /* OnQuit */, OnQuit, VTS_NONE)
00112     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 254 /* OnVisible */, OnVisible, VTS_BOOL)
00113     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 255 /* OnToolBar */, OnToolBar, VTS_BOOL)
00114     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 256 /* OnMenuBar */, OnMenuBar, VTS_BOOL)
00115     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 257 /* OnStatusBar */, OnStatusBar, VTS_BOOL)
00116     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 258 /* OnFullScreen */, OnFullScreen, VTS_BOOL)
00117     ON_EVENT(CCJHtmlView, AFX_IDW_PANE_FIRST, 260 /* OnTheaterMode */, OnTheaterMode, VTS_BOOL)
00118 END_EVENTSINK_MAP()
00119
00121 // CCJHtmlView construction/destruction
00122
00123 CCJHtmlView::CCJHtmlView()
00124     : CFormView((LPCTSTR) NULL)
00125 {
00126     m_pBrowserApp = NULL;
00127 }
00128
00129 CCJHtmlView::~CCJHtmlView()
00130 {
00131     if (m_pBrowserApp != NULL)
00132         m_pBrowserApp->Release();
00133 }
00134
00136 // CCJHtmlView drawing
00137
00138 void CCJHtmlView::OnDraw(CDC* /* pDC */)
00139 {
00140     // this class should never do its own drawing;
00141     // the browser control should handle everything
00142
00143     ASSERT(FALSE);
00144 }
00145
00147 // CCJHtmlView printing
00148
00149 void CCJHtmlView::OnFilePrint()
00150 {
00151     // get the HTMLDocument
00152
00153     if (m_pBrowserApp != NULL)
00154     {
00155         LPOLECOMMANDTARGET lpTarget = NULL;
00156         LPDISPATCH lpDisp = GetHtmlDocument();
00157
00158         if (lpDisp != NULL)
00159         {
00160             // the control will handle all printing UI
00161
00162             if (SUCCEEDED(lpDisp->QueryInterface(IID_IOleCommandTarget,
00163                     (LPVOID*) &lpTarget)))
00164             {
00165                 lpTarget->Exec(NULL, OLECMDID_PRINT, 0, NULL, NULL);
00166                 lpTarget->Release();
00167             }
00168             lpDisp->Release();
00169         }
00170     }
00171 }
00172
00174 // CCJHtmlView diagnostics
00175
00176 #ifdef _DEBUG
00177 void CCJHtmlView::AssertValid() const
00178 {
00179     CFormView::AssertValid();
00180 }
00181
00182 void CCJHtmlView::Dump(CDumpContext& dc) const
00183 {
00184     CFormView::Dump(dc);
00185 }
00186 #endif //_DEBUG
00187
00189 // CCJHtmlView message handlers
00190
00191 void CCJHtmlView::OnDestroy()
00192 {
00193     RELEASE(m_pBrowserApp);
00194 }
00195
00196 void CCJHtmlView::OnSize(UINT nType, int cx, int cy)
00197 {
00198     CFormView::OnSize(nType, cx, cy);
00199
00200     if (::IsWindow(m_wndBrowser.m_hWnd))
00201     {
00202         // need to push non-client borders out of the client area
00203         CRect rect;
00204         GetClientRect(rect);
00205         ::AdjustWindowRectEx(rect,
00206             m_wndBrowser.GetStyle(), FALSE, WS_EX_CLIENTEDGE);
00207         m_wndBrowser.SetWindowPos(NULL, rect.left, rect.top,
00208             rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
00209     }
00210 }
00211
00212 void CCJHtmlView::OnPaint()
00213 {
00214     Default();
00215 }
00216
00218 // CCJHtmlView operations
00219
00220 BOOL CCJHtmlView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
00221                         DWORD dwStyle, const RECT& rect, CWnd* pParentWnd,
00222                         UINT nID, CCreateContext* pContext)
00223 {
00224     // create the view window itself
00225     m_pCreateContext = pContext;
00226     if (!CView::Create(lpszClassName, lpszWindowName,
00227                 dwStyle, rect, pParentWnd,  nID, pContext))
00228     {
00229         return FALSE;
00230     }
00231
00232     AfxEnableControlContainer();
00233
00234     RECT rectClient;
00235     GetClientRect(&rectClient);
00236
00237     // create the control window
00238     // AFX_IDW_PANE_FIRST is a safe but arbitrary ID
00239     if (!m_wndBrowser.CreateControl(CLSID_WebBrowser, lpszWindowName,
00240                 WS_VISIBLE | WS_CHILD, rectClient, this, AFX_IDW_PANE_FIRST))
00241     {
00242         DestroyWindow();
00243         return FALSE;
00244     }
00245
00246     LPUNKNOWN lpUnk = m_wndBrowser.GetControlUnknown();
00247     HRESULT hr = lpUnk->QueryInterface(IID_IWebBrowser2, (void**) &m_pBrowserApp);
00248     if (!SUCCEEDED(hr))
00249     {
00250         m_pBrowserApp = NULL;
00251         m_wndBrowser.DestroyWindow();
00252         DestroyWindow();
00253         return FALSE;
00254     }
00255
00256     return TRUE;
00257 }
00258
00260 // CCJHtmlView properties
00261
00262 CString CCJHtmlView::GetType() const
00263 {
00264     ASSERT(m_pBrowserApp != NULL);
00265
00266     BSTR bstr;
00267     m_pBrowserApp->get_Type(&bstr);
00268     CString retVal(bstr);
00269     return retVal;
00270 }
00271
00272 long CCJHtmlView::GetLeft() const
00273 {
00274     ASSERT(m_pBrowserApp != NULL);
00275
00276     long result;
00277     m_pBrowserApp->get_Left(&result);
00278     return result;
00279 }
00280
00281
00282 long CCJHtmlView::GetTop() const
00283 {
00284     ASSERT(m_pBrowserApp != NULL);
00285     long result;
00286     m_pBrowserApp->get_Top(&result);
00287     return result;
00288 }
00289
00290 int CCJHtmlView::GetToolBar() const
00291 {
00292     ASSERT(m_pBrowserApp != NULL);
00293     int result;
00294     m_pBrowserApp->get_ToolBar(&result);
00295     return result;
00296 }
00297
00298 long CCJHtmlView::GetHeight() const
00299 {
00300     ASSERT(m_pBrowserApp != NULL);
00301     long result;
00302     m_pBrowserApp->get_Height(&result);
00303     return result;
00304 }
00305
00306 BOOL CCJHtmlView::GetVisible() const
00307 {
00308     ASSERT(m_pBrowserApp != NULL);
00309
00310     VARIANT_BOOL result;
00311     m_pBrowserApp->get_Visible(&result);
00312     return result;
00313 }
00314
00315 CString CCJHtmlView::GetLocationName() const
00316 {
00317     ASSERT(m_pBrowserApp != NULL);
00318
00319     BSTR bstr;
00320     m_pBrowserApp->get_LocationName(&bstr);
00321     CString retVal(bstr);
00322     return retVal;
00323 }
00324
00325 CString CCJHtmlView::GetLocationURL() const
00326 {
00327     ASSERT(m_pBrowserApp != NULL);
00328
00329     BSTR bstr;
00330     m_pBrowserApp->get_LocationURL(&bstr);
00331     CString retVal(bstr);
00332     return retVal;
00333 }
00334
00335 BOOL CCJHtmlView::GetBusy() const
00336 {
00337     ASSERT(m_pBrowserApp != NULL);
00338
00339     VARIANT_BOOL result;
00340     m_pBrowserApp->get_Busy(&result);
00341     return result;
00342 }
00343
00344 READYSTATE CCJHtmlView::GetReadyState() const
00345 {
00346     ASSERT(m_pBrowserApp != NULL);
00347
00348     READYSTATE result;
00349     m_pBrowserApp->get_ReadyState(&result);
00350     return result;
00351 }
00352
00353 BOOL CCJHtmlView::GetOffline() const
00354 {
00355     ASSERT(m_pBrowserApp != NULL);
00356
00357     VARIANT_BOOL result;
00358     m_pBrowserApp->get_Offline(&result);
00359     return result;
00360 }
00361
00362 BOOL CCJHtmlView::GetSilent() const
00363 {
00364     ASSERT(m_pBrowserApp != NULL);
00365
00366     VARIANT_BOOL result;
00367     m_pBrowserApp->get_Silent(&result);
00368     return result;
00369 }
00370
00371 LPDISPATCH CCJHtmlView::GetApplication() const
00372 {
00373     ASSERT(m_pBrowserApp != NULL);
00374
00375     LPDISPATCH result;
00376     m_pBrowserApp->get_Application(&result);
00377     return result;
00378 }
00379
00380
00381 LPDISPATCH CCJHtmlView::GetParentBrowser() const
00382 {
00383     ASSERT(m_pBrowserApp != NULL);
00384
00385     LPDISPATCH result;
00386     m_pBrowserApp->get_Parent(&result);
00387     return result;
00388 }
00389
00390 LPDISPATCH CCJHtmlView::GetContainer() const
00391 {
00392     ASSERT(m_pBrowserApp != NULL);
00393
00394     LPDISPATCH result;
00395     m_pBrowserApp->get_Container(&result);
00396     return result;
00397 }
00398
00399 LPDISPATCH CCJHtmlView::GetHtmlDocument() const
00400 {
00401     ASSERT(m_pBrowserApp != NULL);
00402
00403     LPDISPATCH result;
00404     m_pBrowserApp->get_Document(&result);
00405     return result;
00406 }
00407
00408 BOOL CCJHtmlView::GetTopLevelContainer() const
00409 {
00410     ASSERT(m_pBrowserApp != NULL);
00411
00412     VARIANT_BOOL result;
00413     m_pBrowserApp->get_TopLevelContainer(&result);
00414     return result;
00415 }
00416
00417 BOOL CCJHtmlView::GetMenuBar() const
00418 {
00419     ASSERT(m_pBrowserApp != NULL);
00420
00421     VARIANT_BOOL result;
00422     m_pBrowserApp->get_MenuBar(&result);
00423     return result;
00424 }
00425
00426 BOOL CCJHtmlView::GetFullScreen() const
00427 {
00428     ASSERT(m_pBrowserApp != NULL);
00429
00430     VARIANT_BOOL result;
00431     m_pBrowserApp->get_FullScreen(&result);
00432     return result;
00433 }
00434
00435 BOOL CCJHtmlView::GetStatusBar() const
00436 {
00437     ASSERT(m_pBrowserApp != NULL);
00438
00439     VARIANT_BOOL result;
00440     m_pBrowserApp->get_StatusBar(&result);
00441     return result;
00442 }
00443
00444 OLECMDF CCJHtmlView::QueryStatusWB(OLECMDID cmdID) const
00445 {
00446     ASSERT(m_pBrowserApp != NULL);
00447
00448     OLECMDF result;
00449     m_pBrowserApp->QueryStatusWB(cmdID, &result);
00450     return result;
00451 }
00452
00453 void CCJHtmlView::ExecWB(OLECMDID cmdID, OLECMDEXECOPT cmdexecopt,
00454     VARIANT* pvaIn, VARIANT* pvaOut)
00455 {
00456     ASSERT(m_pBrowserApp != NULL);
00457
00458     m_pBrowserApp->ExecWB(cmdID, cmdexecopt, pvaIn, pvaOut);
00459 }
00460
00461 BOOL CCJHtmlView::GetRegisterAsBrowser() const
00462 {
00463     ASSERT(m_pBrowserApp != NULL);
00464
00465     VARIANT_BOOL result;
00466     m_pBrowserApp->get_RegisterAsBrowser(&result);
00467     return result;
00468 }
00469
00470 BOOL CCJHtmlView::GetRegisterAsDropTarget() const
00471 {
00472     ASSERT(m_pBrowserApp != NULL);
00473
00474     VARIANT_BOOL result;
00475     m_pBrowserApp->get_RegisterAsDropTarget(&result);
00476     return result;
00477 }
00478
00479 BOOL CCJHtmlView::GetTheaterMode() const
00480 {
00481     ASSERT(m_pBrowserApp != NULL);
00482
00483     VARIANT_BOOL result;
00484     m_pBrowserApp->get_TheaterMode(&result);
00485     return result;
00486 }
00487
00488 BOOL CCJHtmlView::GetAddressBar() const
00489 {
00490     ASSERT(m_pBrowserApp != NULL);
00491
00492     VARIANT_BOOL result;
00493     m_pBrowserApp->get_AddressBar(&result);
00494     return result;
00495 }
00496
00498 // CCJHtmlView operations
00499
00500 BOOL CCJHtmlView::LoadFromResource(LPCTSTR lpszResource)
00501 {
00502     HINSTANCE hInstance = AfxGetResourceHandle();
00503     ASSERT(hInstance != NULL);
00504
00505     CString strResourceURL;
00506     BOOL bRetVal = TRUE;
00507     LPTSTR lpszModule = new TCHAR[_MAX_PATH];
00508
00509     if (GetModuleFileName(hInstance, lpszModule, _MAX_PATH))
00510     {
00511         strResourceURL.Format(_T("res://%s/%s"), lpszModule, lpszResource);
00512         Navigate(strResourceURL, 0, 0, 0);
00513     }
00514     else
00515         bRetVal = FALSE;
00516
00517     delete [] lpszModule;
00518     return bRetVal;
00519 }
00520
00521 BOOL CCJHtmlView::LoadFromResource(UINT nRes)
00522 {
00523     HINSTANCE hInstance = AfxGetResourceHandle();
00524     ASSERT(hInstance != NULL);
00525
00526     CString strResourceURL;
00527     BOOL bRetVal = TRUE;
00528     LPTSTR lpszModule = new TCHAR[_MAX_PATH];
00529
00530     if (GetModuleFileName(hInstance, lpszModule, _MAX_PATH))
00531     {
00532         strResourceURL.Format(_T("res://%s/%d"), lpszModule, nRes);
00533         Navigate(strResourceURL, 0, 0, 0);
00534     }
00535     else
00536         bRetVal = FALSE;
00537
00538     delete [] lpszModule;
00539     return bRetVal;
00540 }
00541
00542 void CCJHtmlView::Navigate(LPCTSTR lpszURL, DWORD dwFlags /* = 0 */,
00543     LPCTSTR lpszTargetFrameName /* = NULL */ ,
00544     LPCTSTR lpszHeaders /* = NULL */, LPVOID lpvPostData /* = NULL */,
00545     DWORD dwPostDataLen /* = 0 */)
00546 {
00547     CString strURL(lpszURL);
00548     BSTR bstrURL = strURL.AllocSysString();
00549
00550     COleSafeArray vPostData;
00551     if (lpvPostData != NULL)
00552     {
00553         if (dwPostDataLen == 0)
00554             dwPostDataLen = lstrlen((LPCTSTR) lpvPostData);
00555
00556         vPostData.CreateOneDim(VT_UI1, dwPostDataLen, lpvPostData);
00557     }
00558
00559     m_pBrowserApp->Navigate(bstrURL,
00560         COleVariant((long) dwFlags, VT_I4),
00561         COleVariant(lpszTargetFrameName, VT_BSTR),
00562         vPostData,
00563         COleVariant(lpszHeaders, VT_BSTR));
00564 }
00565
00566 #ifdef _VC_VERSION_5
00567 void MakeOleVariant(COleVariant &ov, LPCITEMIDLIST pidl)
00568 {
00569     AfxVariantInit(&ov);
00570
00571     if (pidl != NULL)
00572     {
00573         // walk through entries in the list and accumulate their size
00574
00575         UINT cbTotal = 0;
00576         SAFEARRAY *psa = NULL;
00577         LPCITEMIDLIST pidlWalker = pidl;
00578
00579         while (pidlWalker->mkid.cb)
00580         {
00581             cbTotal += pidlWalker->mkid.cb;
00582             pidlWalker = (LPCITEMIDLIST)
00583                 (((LPBYTE)pidlWalker) + pidlWalker->mkid.cb);
00584         }
00585
00586         // add the base structure size
00587         cbTotal += sizeof(ITEMIDLIST);
00588
00589         // get a safe array for them
00590         psa = SafeArrayCreateVector(VT_UI1, 0, cbTotal);
00591
00592         // copy it and set members
00593         if (psa != NULL)
00594         {
00595             memcpy(psa->pvData, (LPBYTE) pidl, cbTotal);
00596             ov.vt = VT_ARRAY | VT_UI1;
00597             ov.parray = psa;
00598         }
00599     }
00600 }
00601 #endif
00602
00603 void CCJHtmlView::Navigate2(LPITEMIDLIST pIDL, DWORD dwFlags /* = 0 */,
00604     LPCTSTR lpszTargetFrameName /* = NULL */)
00605 {
00606     ASSERT(m_pBrowserApp != NULL);
00607
00608 #ifdef _VC_VERSION_5
00609     COleVariant vPIDL;
00610     MakeOleVariant(vPIDL, pIDL);
00611 #else
00612     COleVariant vPIDL(pIDL);
00613 #endif
00614     COleVariant empty;
00615
00616     m_pBrowserApp->Navigate2(vPIDL,
00617         COleVariant((long) dwFlags, VT_I4),
00618         COleVariant(lpszTargetFrameName, VT_BSTR),
00619         empty, empty);
00620 }
00621
00622 void CCJHtmlView::Navigate2(LPCTSTR lpszURL, DWORD dwFlags /* = 0 */,
00623     LPCTSTR lpszTargetFrameName /* = NULL */,
00624     LPCTSTR lpszHeaders /* = NULL */,
00625     LPVOID lpvPostData /* = NULL */, DWORD dwPostDataLen /* = 0 */)
00626 {
00627     ASSERT(m_pBrowserApp != NULL);
00628
00629     COleSafeArray vPostData;
00630     if (lpvPostData != NULL)
00631     {
00632         if (dwPostDataLen == 0)
00633             dwPostDataLen = lstrlen((LPCTSTR) lpvPostData);
00634
00635         vPostData.CreateOneDim(VT_UI1, dwPostDataLen, lpvPostData);
00636     }
00637
00638     COleVariant vURL(lpszURL, VT_BSTR);
00639     COleVariant vHeaders(lpszHeaders, VT_BSTR);
00640     COleVariant vTargetFrameName(lpszTargetFrameName, VT_BSTR);
00641     COleVariant vFlags((long) dwFlags, VT_I4);
00642
00643     m_pBrowserApp->Navigate2(vURL,
00644         vFlags, vTargetFrameName, vPostData, vHeaders);
00645 }
00646
00647 void CCJHtmlView::Navigate2(LPCTSTR lpszURL, DWORD dwFlags,
00648     CByteArray& baPostData, LPCTSTR lpszTargetFrameName /* = NULL */,
00649     LPCTSTR lpszHeaders /* = NULL */)
00650 {
00651     ASSERT(m_pBrowserApp != NULL);
00652
00653     COleVariant vPostData = baPostData;
00654     COleVariant vURL(lpszURL, VT_BSTR);
00655     COleVariant vHeaders(lpszHeaders, VT_BSTR);
00656     COleVariant vTargetFrameName(lpszTargetFrameName, VT_BSTR);
00657     COleVariant vFlags((long) dwFlags, VT_I4);
00658
00659     ASSERT(m_pBrowserApp != NULL);
00660
00661     m_pBrowserApp->Navigate2(vURL, vFlags, vTargetFrameName,
00662         vPostData, vHeaders);
00663 }
00664
00665 void CCJHtmlView::PutProperty(LPCTSTR lpszProperty, const VARIANT& vtValue)
00666 {
00667     ASSERT(m_pBrowserApp != NULL);
00668
00669     CString strProp(lpszProperty);
00670     BSTR bstrProp = strProp.AllocSysString();
00671     m_pBrowserApp->PutProperty(bstrProp, vtValue);
00672     ::SysFreeString(bstrProp);
00673 }
00674
00675 BOOL CCJHtmlView::GetProperty(LPCTSTR lpszProperty, CString& strValue)
00676 {
00677     ASSERT(m_pBrowserApp != NULL);
00678
00679     CString strProperty(lpszProperty);
00680     BSTR bstrProperty = strProperty.AllocSysString();
00681
00682     BOOL bResult = FALSE;
00683     VARIANT vReturn;
00684     vReturn.vt = VT_BSTR;
00685     vReturn.bstrVal = NULL;
00686     HRESULT hr = m_pBrowserApp->GetProperty(bstrProperty, &vReturn);
00687
00688     if (SUCCEEDED(hr))
00689     {
00690         strValue = CString(vReturn.bstrVal);
00691         bResult = TRUE;
00692     }
00693
00694     ::SysFreeString(bstrProperty);
00695     return bResult;
00696 }
00697
00698 COleVariant CCJHtmlView::GetProperty(LPCTSTR lpszProperty)
00699 {
00700     COleVariant result;
00701
00702     static BYTE parms[] =
00703         VTS_BSTR;
00704     m_wndBrowser.InvokeHelper(0x12f, DISPATCH_METHOD,
00705         VT_VARIANT, (void*)&result, parms, lpszProperty);
00706
00707     return result;
00708 }
00709
00710 CString CCJHtmlView::GetFullName() const
00711 {
00712     ASSERT(m_pBrowserApp != NULL);
00713
00714     BSTR bstr;
00715     m_pBrowserApp->get_FullName(&bstr);
00716     CString retVal(bstr);
00717     return retVal;
00718 }
00719
00721 // CCJHtmlView event reflectors
00722
00723 void CCJHtmlView::NavigateComplete2(LPDISPATCH /* pDisp */, VARIANT* URL)
00724 {
00725     ASSERT(V_VT(URL) == VT_BSTR);
00726
00727     USES_CONVERSION;
00728
00729     CString str = OLE2T(V_BSTR(URL));
00730     OnNavigateComplete2(str);
00731 }
00732
00733 void CCJHtmlView::BeforeNavigate2(LPDISPATCH /* pDisp */, VARIANT* URL,
00734         VARIANT* Flags, VARIANT* TargetFrameName,
00735         VARIANT* PostData, VARIANT* Headers, BOOL* Cancel)
00736 {
00737     ASSERT(V_VT(URL) == VT_BSTR);
00738     ASSERT(V_VT(TargetFrameName) == VT_BSTR);
00739     ASSERT(V_VT(PostData) == (VT_VARIANT | VT_BYREF));
00740     ASSERT(V_VT(Headers) == VT_BSTR);
00741     ASSERT(Cancel != NULL);
00742
00743     USES_CONVERSION;
00744
00745     VARIANT* vtPostedData = V_VARIANTREF(PostData);
00746     CByteArray array;
00747     if (V_VT(vtPostedData) & VT_ARRAY)
00748     {
00749         // must be a vector of bytes
00750         ASSERT(vtPostedData->parray->cDims == 1 && vtPostedData->parray->cbElements == 1);
00751
00752         vtPostedData->vt |= VT_UI1;
00753         COleSafeArray safe(vtPostedData);
00754
00755         DWORD dwSize = safe.GetOneDimSize();
00756         LPVOID pVoid;
00757         safe.AccessData(&pVoid);
00758
00759         array.SetSize(dwSize);
00760         LPBYTE lpByte = array.GetData();
00761
00762         memcpy(lpByte, pVoid, dwSize);
00763         safe.UnaccessData();
00764     }
00765     // make real parameters out of the notification
00766
00767     CString strTargetFrameName(V_BSTR(TargetFrameName));
00768     CString strURL = V_BSTR(URL);
00769     CString strHeaders = V_BSTR(Headers);
00770     DWORD nFlags = V_I4(Flags);
00771
00772     // notify the user's class
00773     OnBeforeNavigate2(strURL, nFlags, strTargetFrameName,
00774         array, strHeaders, Cancel);
00775 }
00776
00777 void CCJHtmlView::DocumentComplete(LPDISPATCH pDisp, VARIANT* URL)
00778 {
00779     UNUSED_ALWAYS(pDisp);
00780     ASSERT(V_VT(URL) == VT_BSTR);
00781
00782     CString str(V_BSTR(URL));
00783     OnDocumentComplete(str);
00784 }
00785
00787 // CCJHtmlView Events
00788
00789 void CCJHtmlView::OnProgressChange(long lProgress, long lProgressMax)
00790 {
00791     // user will override to handle this notification
00792     UNUSED_ALWAYS(lProgress);
00793     UNUSED_ALWAYS(lProgressMax);
00794 }
00795
00796 void CCJHtmlView::OnCommandStateChange(long lCommand, BOOL bEnable)
00797 {
00798     // user will override to handle this notification
00799     UNUSED_ALWAYS(lCommand);
00800     UNUSED_ALWAYS(bEnable);
00801 }
00802
00803 void CCJHtmlView::OnDownloadBegin()
00804 {
00805     // user will override to handle this notification
00806 }
00807
00808 void CCJHtmlView::OnDownloadComplete()
00809 {
00810     // user will override to handle this notification
00811 }
00812
00813 void CCJHtmlView::OnTitleChange(LPCTSTR lpszText)
00814 {
00815     // user will override to handle this notification
00816     UNUSED_ALWAYS(lpszText);
00817 }
00818
00819 void CCJHtmlView::OnPropertyChange(LPCTSTR lpszProperty)
00820 {
00821     // user will override to handle this notification
00822     UNUSED_ALWAYS(lpszProperty);
00823 }
00824
00825 void CCJHtmlView::OnNewWindow2(LPDISPATCH* ppDisp, BOOL* bCancel)
00826 {
00827     // default to continuing
00828     bCancel = FALSE;
00829
00830     // user will override to handle this notification
00831     UNUSED_ALWAYS(ppDisp);
00832 }
00833
00834 void CCJHtmlView::OnDocumentComplete(LPCTSTR lpszURL)
00835 {
00836     // user will override to handle this notification
00837     UNUSED_ALWAYS(lpszURL);
00838 }
00839
00840 void CCJHtmlView::OnQuit()
00841 {
00842     // user will override to handle this notification
00843 }
00844
00845 void CCJHtmlView::OnVisible(BOOL bVisible)
00846 {
00847     // user will override to handle this notification
00848     UNUSED_ALWAYS(bVisible);
00849 }
00850
00851 void CCJHtmlView::OnToolBar(BOOL bToolBar)
00852 {
00853     // user will override to handle this notification
00854     UNUSED_ALWAYS(bToolBar);
00855 }
00856
00857 void CCJHtmlView::OnMenuBar(BOOL bMenuBar)
00858 {
00859     // user will override to handle this notification
00860     UNUSED_ALWAYS(bMenuBar);
00861 }
00862
00863 void CCJHtmlView::OnStatusBar(BOOL bStatusBar)
00864 {
00865     // user will override to handle this notification
00866     UNUSED_ALWAYS(bStatusBar);
00867 }
00868
00869 void CCJHtmlView::OnFullScreen(BOOL bFullScreen)
00870 {
00871     // user will override to handle this notification
00872     UNUSED_ALWAYS(bFullScreen);
00873 }
00874
00875 void CCJHtmlView::OnTheaterMode(BOOL bTheaterMode)
00876 {
00877     // user will override to handle this notification
00878     UNUSED_ALWAYS(bTheaterMode);
00879 }
00880
00881 void CCJHtmlView::OnNavigateComplete2(LPCTSTR lpszURL)
00882 {
00883     // user will override to handle this notification
00884     UNUSED_ALWAYS(lpszURL);
00885 }
00886
00887 void CCJHtmlView::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags,
00888     LPCTSTR lpszTargetFrameName, CByteArray& baPostData,
00889     LPCTSTR lpszHeaders, BOOL* bCancel)
00890 {
00891     // default to continuing
00892     bCancel = FALSE;
00893
00894     // user will override to handle this notification
00895     UNUSED_ALWAYS(lpszURL);
00896     UNUSED_ALWAYS(nFlags);
00897     UNUSED_ALWAYS(lpszTargetFrameName);
00898     UNUSED_ALWAYS(baPostData);
00899     UNUSED_ALWAYS(lpszHeaders);
00900 }
00901
00902 void CCJHtmlView::OnStatusTextChange(LPCTSTR pszText)
00903 {
00904     // try to set the status bar text via the frame
00905
00906     CFrameWnd* pFrame = GetParentFrame();
00907     if (pFrame != NULL)
00908         pFrame->SetMessageText(pszText);
00909 }
00910
00912 // Helps to eliminate screen flicker.
00913
00914 BOOL CCJHtmlView::OnEraseBkgnd(CDC* pDC)
00915 {
00916     CRect rectClient;
00917     GetClientRect( &rectClient );
00918     pDC->ExcludeClipRect( &rectClient );
00919     return CFormView::OnEraseBkgnd(pDC);
00920 }
00921
00923 // Pre-startup code
00924
00925 #ifdef AFX_INIT_SEG
00926 #pragma code_seg(AFX_INIT_SEG)
00927 #endif
00928
00929 IMPLEMENT_DYNCREATE(CCJHtmlView, CFormView)
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/VolsPaths.h Source File

common/VolsPaths.h

Go to the documentation of this file.
00001 /*
00002  * Stollen from POV and added to MacCVS by
00003  * Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00004  */
00005
00006 /*==============================================================================
00007 Project:    POV-Ray
00008
00009 Version:    3
00010
00011 File:   VolsPaths.h
00012
00013 Description:
00014     Various volume and pathname handling routines.
00015 ------------------------------------------------------------------------------
00016 Author:
00017     Eduard [esp] Schwan
00018 ------------------------------------------------------------------------------
00019     from Persistence of Vision(tm) Ray Tracer
00020     Copyright 1996 Persistence of Vision Team
00021 ------------------------------------------------------------------------------
00022     NOTICE: This source code file is provided so that users may experiment
00023     with enhancements to POV-Ray and to port the software to platforms other
00024     than those supported by the POV-Ray Team.  There are strict rules under
00025     which you are permitted to use this file.  The rules are in the file
00026     named POVLEGAL.DOC which should be distributed with this file. If
00027     POVLEGAL.DOC is not available or for more info please contact the POV-Ray
00028     Team Coordinator by leaving a message in CompuServe's Graphics Developer's
00029     Forum.  The latest version of POV-Ray may be found there as well.
00030
00031     This program is based on the popular DKB raytracer version 2.12.
00032     DKBTrace was originally written by David K. Buck.
00033     DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
00034 ------------------------------------------------------------------------------
00035 Change History:
00036     941221  [esp]   Created
00037 ==============================================================================*/
00038
00039 #ifndef VOLSPATHS_H
00040 #define VOLSPATHS_H
00041
00042
00043 /*==== Macintosh-specific headers ====*/
00044 #include <MacTypes.h>
00045
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif
00049
00050 /*==== Prototypes =====*/
00051
00052 OSErr VRef2VolName(short theVRef, StringPtr theVolName);
00053
00054 OSErr VolName2VRef(StringPtr myPVolName, short * theVRefPtr);
00055
00056 OSErr PathNameFromDirID(const long          aDirID,
00057                         const short         avRefNum,
00058                         char                * aPath);
00059
00060 #if !TARGET_API_MAC_CARBON
00061 OSErr PathNameFromWD(   const short         avRefNum,
00062                         char                * aPath);
00063 #endif
00064
00065 #ifdef __cplusplus
00066 }
00067 #endif
00068
00069 #endif //  VOLSPATHS_H
00070
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TclGlue.mac.h Source File

common/TclGlue.mac.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2001
00019  */
00020
00021 /*
00022  * TclGlue.mac.h --- glue to the TCL language specific to mac/carbon
00023  */
00024
00025 #ifndef TCLGLUEMAC_H
00026 #define TCLGLUEMAC_H
00027
00028 #include "dll_loader.h"
00029
00030 int CarbonCompatLoadLibrary(CompatConnectID * connID, const char *name_dll);
00031 int CarbonCompatCloseLibrary(CompatConnectID * connID);
00032 void *_CarbonCompatCallLibrary(CompatConnectID connID, const char *name_func);
00033 void *_tcl_cfm_macho(void *func);
00034
00035 #endif // TCLGLUEMAC_H
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ansiAttrCvt Member List

This is the complete list of members for ansiAttrCvt, including all inherited members.

_in | ansiAttrCvt | [private]
_seq | ansiAttrCvt | [private]
ansi2ctcp(std::string *in) | ansiAttrCvt |
bgColorMap | ansiAttrCvt | [private, static]
blink | ansiAttrCvt | [private]
bold | ansiAttrCvt | [private]
do_C() | ansiAttrCvt | [private]
do_m() | ansiAttrCvt | [private]
escSeq | ansiAttrCvt | [private, static]
fgColorMap | ansiAttrCvt | [private, static]
italic | ansiAttrCvt | [private]
pos | ansiAttrCvt | [private]
reverse | ansiAttrCvt | [private]
underline | ansiAttrCvt | [private]

Generated on Sat Aug 7 22:48:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewHandlers.h Source File

common/BrowseViewHandlers.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 #ifndef _BROWSEVIEWHANDLERS_H_
00018 #define _BROWSEVIEWHANDLERS_H_
00019
00020 #include "CvsCommands.h"
00021 #include "CPStr.h"
00022 #include "cvsgui_i18n.h"
00023
00025 typedef enum
00026 {
00027     kSelNone,
00028     kSelFiles,
00029     kSelDir
00030 } kSelType;
00031
00032 // Forward declaration
00033 class MultiFiles;
00034
00052 class KiSelectionHandler
00053 {
00054 private:
00055     CStr m_strCommand;
00057     MultiFiles* m_pmf;
00058     kSelType m_selType;
00060     bool m_autoDelete;
00062 protected:
00063     bool m_needSelection;
00064     bool m_needViewReset;
00066 public:
00067     KiSelectionHandler(const char* strCommand, bool needSelection = true, bool needResetView = false);
00068     virtual ~KiSelectionHandler();
00069
00070     kSelType GetSelType() const;
00071     bool GetNeedSelection() const;
00072     bool GetNeedViewReset() const;
00073
00074     virtual void OnFolder(const char* fullpath) = 0;
00075     virtual void OnFiles(MultiFiles* pmf) = 0;
00076     virtual MultiFiles* GetSelection();
00077     virtual bool NeedsNormalize();
00078 };
00079
00081 class KoMoveToTrashHandler : public KiSelectionHandler
00082 {
00083 public:
00084     KoMoveToTrashHandler()
00085         : KiSelectionHandler(_i18n("Move To Trash"), true, true)
00086     {}
00087
00088     virtual void OnFolder(const char* fullpath)
00089     { /* ignore */ }
00090
00091     virtual void OnFiles(MultiFiles* pmf)
00092     {
00093         KiSelectionHandler::OnFiles(pmf);
00094         CvsCmdMoveToTrash(*this);
00095     }
00096 };
00097
00099 class KoUpdateMoveToTrashHandler : public KiSelectionHandler
00100 {
00101 // Attributes
00102     bool m_isFolders;
00103     bool m_isFiles;
00104
00105 public:
00106     KoUpdateMoveToTrashHandler()
00107         : KiSelectionHandler(_i18n("Update Move To Trash")), m_isFolders(false), m_isFiles(false)
00108     {}
00109
00110     virtual void OnFolder(const char* fullpath)
00111     {
00112         m_isFolders = true;
00113     }
00114
00115     virtual void OnFiles(MultiFiles* pmf)
00116     {
00117         m_isFiles = true;
00118     }
00119
00120     bool IsEnabled() const
00121     {
00122         return !m_isFolders && m_isFiles;
00123     }
00124 };
00125
00127 template<kTagCmdType tagType>
00128 class TTagHandler : public KiSelectionHandler
00129 {
00130 public:
00131     TTagHandler()
00132         : KiSelectionHandler(GetTagTypeName(tagType))
00133     {}
00134
00135     virtual void OnFolder(const char* fullpath)
00136     {
00137         KiSelectionHandler::OnFolder(fullpath);
00138         CvsCmdTag(*this, tagType);
00139     }
00140
00141     virtual void OnFiles(MultiFiles* pmf)
00142     {
00143         KiSelectionHandler::OnFiles(pmf);
00144         CvsCmdTag(*this, tagType);
00145     }
00146 };
00147
00148 typedef TTagHandler<kTagCreate> KoCreateTagHandler;
00149 typedef TTagHandler<kTagDelete> KoDeleteTagHandler;
00150 typedef TTagHandler<kTagBranch> KoBranchTagHandler;
00151
00153 template<kEditCmdType editType>
00154 class TEditHandler : public KiSelectionHandler
00155 {
00156 public:
00157     TEditHandler()
00158         : KiSelectionHandler(GetEditTypeName(editType))
00159     {}
00160
00161     virtual void OnFolder(const char* fullpath)
00162     {
00163         KiSelectionHandler::OnFolder(fullpath);
00164         CvsCmdEdit(*this, editType);
00165     }
00166
00167     virtual void OnFiles(MultiFiles* pmf)
00168     {
00169         KiSelectionHandler::OnFiles(pmf);
00170         CvsCmdEdit(*this, editType);
00171     }
00172 };
00173
00174 typedef TEditHandler<kEditNormal> KoEditHandler;
00175 typedef TEditHandler<kEditReserved> KoReservedEditHandler;
00176 typedef TEditHandler<kEditForce> KoForceEditHandler;
00177
00179 class KoUneditHandler : public KiSelectionHandler
00180 {
00181 public:
00182     KoUneditHandler()
00183         : KiSelectionHandler(_i18n("Unedit"))
00184     {}
00185
00186     virtual void OnFolder(const char* fullpath)
00187     {
00188         KiSelectionHandler::OnFolder(fullpath);
00189         CvsCmdUnedit(*this);
00190     }
00191
00192     virtual void OnFiles(MultiFiles* pmf)
00193     {
00194         KiSelectionHandler::OnFiles(pmf);
00195         CvsCmdUnedit(*this);
00196     }
00197 };
00198
00200 class KoReleaseHandler : public KiSelectionHandler
00201 {
00202 public:
00203     KoReleaseHandler()
00204         : KiSelectionHandler(_i18n("Release"))
00205     {}
00206
00207     virtual void OnFolder(const char* fullpath)
00208     {
00209         KiSelectionHandler::OnFolder(fullpath);
00210         CvsCmdRelease(*this);
00211     }
00212
00213     virtual void OnFiles(MultiFiles* pmf)
00214     {   }
00215 };
00216
00218 class KoWatchersHandler : public KiSelectionHandler
00219 {
00220 public:
00221     KoWatchersHandler()
00222         : KiSelectionHandler(_i18n("Watchers"))
00223     {}
00224
00225     virtual void OnFolder(const char* fullpath)
00226     {
00227         KiSelectionHandler::OnFolder(fullpath);
00228         CvsCmdWatchers(*this);
00229     }
00230
00231     virtual void OnFiles(MultiFiles* pmf)
00232     {
00233         KiSelectionHandler::OnFiles(pmf);
00234         CvsCmdWatchers(*this);
00235     }
00236 };
00237
00239 class KoEditorsHandler : public KiSelectionHandler
00240 {
00241 public:
00242     KoEditorsHandler()
00243         : KiSelectionHandler(_i18n("Editors"))
00244     {}
00245
00246     virtual void OnFolder(const char* fullpath)
00247     {
00248         KiSelectionHandler::OnFolder(fullpath);
00249         CvsCmdEditors(*this);
00250     }
00251
00252     virtual void OnFiles(MultiFiles* pmf)
00253     {
00254         KiSelectionHandler::OnFiles(pmf);
00255         CvsCmdEditors(*this);
00256     }
00257 };
00258
00260 class KoWatchOnHandler : public KiSelectionHandler
00261 {
00262 public:
00263     KoWatchOnHandler()
00264         : KiSelectionHandler(_i18n("Watch On"))
00265     {}
00266
00267     virtual void OnFolder(const char* fullpath)
00268     {
00269         KiSelectionHandler::OnFolder(fullpath);
00270         CvsCmdWatchOn(*this);
00271     }
00272
00273     virtual void OnFiles(MultiFiles* pmf)
00274     {
00275         KiSelectionHandler::OnFiles(pmf);
00276         CvsCmdWatchOn(*this);
00277     }
00278 };
00279
00281 class KoWatchOffHandler : public KiSelectionHandler
00282 {
00283 public:
00284     KoWatchOffHandler()
00285         : KiSelectionHandler(_i18n("Watch Off"))
00286     {}
00287
00288     virtual void OnFolder(const char* fullpath)
00289     {
00290         KiSelectionHandler::OnFolder(fullpath);
00291         CvsCmdWatchOff(*this);
00292     }
00293
00294     virtual void OnFiles(MultiFiles* pmf)
00295     {
00296         KiSelectionHandler::OnFiles(pmf);
00297         CvsCmdWatchOff(*this);
00298     }
00299 };
00300
00302 class KoDiffHandler : public KiSelectionHandler
00303 {
00304 public:
00305     KoDiffHandler()
00306         : KiSelectionHandler(_i18n("Diff"))
00307     {}
00308
00309     virtual void OnFolder(const char* fullpath)
00310     {
00311         KiSelectionHandler::OnFolder(fullpath);
00312         CvsCmdDiff(*this, kDiffFolder);
00313     }
00314
00315     virtual void OnFiles(MultiFiles* pmf)
00316     {
00317         KiSelectionHandler::OnFiles(pmf);
00318         CvsCmdDiff(*this, kDiffFile);
00319     }
00320 };
00321
00323 class KoGraphDiffHandler : public KiSelectionHandler
00324 {
00325 public:
00326     KoGraphDiffHandler()
00327         : KiSelectionHandler(_i18n("Diff"))
00328     {}
00329
00330     virtual void OnFolder(const char* fullpath)
00331     {   }
00332
00333     virtual void OnFiles(MultiFiles* pmf)
00334     {
00335         KiSelectionHandler::OnFiles(pmf);
00336         CvsCmdDiff(*this, kDiffGraph);
00337     }
00338 };
00339
00341 class KoLogHandler : public KiSelectionHandler
00342 {
00343 public:
00344     KoLogHandler()
00345         : KiSelectionHandler(_i18n("Log"))
00346     {}
00347
00348     virtual void OnFolder(const char* fullpath)
00349     {
00350         KiSelectionHandler::OnFolder(fullpath);
00351         CvsCmdLog(*this);
00352     }
00353
00354     virtual void OnFiles(MultiFiles* pmf)
00355     {
00356         KiSelectionHandler::OnFiles(pmf);
00357         CvsCmdLog(*this);
00358     }
00359 };
00360
00362 class KoGraphHandler : public KiSelectionHandler
00363 {
00364 public:
00365     KoGraphHandler()
00366         : KiSelectionHandler(_i18n("Graph"))
00367     {}
00368
00369     virtual void OnFolder(const char* fullpath)
00370     {
00371         /*we avoid processing directory*/
00372     }
00373
00374     virtual void OnFiles(MultiFiles* pmf)
00375     {
00376         KiSelectionHandler::OnFiles(pmf);
00377         CvsCmdLog(*this, true);
00378     }
00379
00380     virtual bool NeedsNormalize()
00381     {
00382         return true;
00383     }
00384 };
00385
00387 class KoStatusHandler : public KiSelectionHandler
00388 {
00389 public:
00390     KoStatusHandler()
00391         : KiSelectionHandler(_i18n("Status"))
00392     {}
00393
00394     virtual void OnFolder(const char* fullpath)
00395     {
00396         KiSelectionHandler::OnFolder(fullpath);
00397         CvsCmdStatus(*this);
00398     }
00399
00400     virtual void OnFiles(MultiFiles* pmf)
00401     {
00402         KiSelectionHandler::OnFiles(pmf);
00403         CvsCmdStatus(*this);
00404     }
00405 };
00406
00408 class KoFileRemoveHandler : public KiSelectionHandler
00409 {
00410 public:
00411     KoFileRemoveHandler()
00412         : KiSelectionHandler(_i18n("Remove"), true, true)
00413     {}
00414
00415     virtual void OnFolder(const char* fullpath)
00416     { /* folder cannot be removed */ }
00417
00418     virtual void OnFiles(MultiFiles* pmf)
00419     {
00420         KiSelectionHandler::OnFiles(pmf);
00421         CvsCmdRemove(*this);
00422     }
00423 };
00424
00426 class KoLockHandler : public KiSelectionHandler
00427 {
00428 public:
00429     KoLockHandler()
00430         : KiSelectionHandler(_i18n("Lock"))
00431     {}
00432
00433     virtual void OnFolder(const char* fullpath)
00434     {
00435         KiSelectionHandler::OnFolder(fullpath);
00436         CvsCmdLock(*this);
00437     }
00438
00439     virtual void OnFiles(MultiFiles* pmf)
00440     {
00441         KiSelectionHandler::OnFiles(pmf);
00442         CvsCmdLock(*this);
00443     }
00444 };
00445
00447 class KoUnlockHandler : public KiSelectionHandler
00448 {
00449 public:
00450     KoUnlockHandler()
00451         : KiSelectionHandler(_i18n("Unlock"))
00452     {}
00453     virtual void OnFolder(const char* fullpath)
00454     {
00455         KiSelectionHandler::OnFolder(fullpath);
00456         CvsCmdUnlock(*this);
00457     }
00458
00459     virtual void OnFiles(MultiFiles* pmf)
00460     {
00461         KiSelectionHandler::OnFiles(pmf);
00462         CvsCmdUnlock(*this);
00463     }
00464 };
00465
00467 class KoAddHandler : public KiSelectionHandler
00468 {
00469 public:
00470     KoAddHandler()
00471         : KiSelectionHandler(_i18n("Add"), true, true)
00472     {}
00473
00474     virtual void OnFolder(const char* fullpath)
00475     {
00476         KiSelectionHandler::OnFolder(fullpath);
00477         CvsCmdAdd(*this);
00478     }
00479
00480     virtual void OnFiles(MultiFiles* pmf)
00481     {
00482         KiSelectionHandler::OnFiles(pmf);
00483         CvsCmdAdd(*this);
00484     }
00485
00486     virtual bool NeedsNormalize()
00487     {
00488         return true;
00489     }
00490 };
00491
00493 class KoAddBinaryHandler : public KiSelectionHandler
00494 {
00495 public:
00496     KoAddBinaryHandler()
00497         : KiSelectionHandler(_i18n("Add Binary"), true, true)
00498     {}
00499
00500     virtual void OnFolder(const char* fullpath)
00501     {
00502         KiSelectionHandler::OnFolder(fullpath);
00503         CvsCmdAdd(*this);
00504     }
00505
00506     virtual void OnFiles(MultiFiles* pmf)
00507     {
00508         KiSelectionHandler::OnFiles(pmf);
00509         CvsCmdAdd(*this, kAddBinary);
00510     }
00511
00512     virtual bool NeedsNormalize()
00513     {
00514         return true;
00515     }
00516 };
00517
00519 class KoAddUnicodeHandler : public KiSelectionHandler
00520 {
00521 public:
00522     KoAddUnicodeHandler()
00523         : KiSelectionHandler(_i18n("Add Unicode"), true, true)
00524     {}
00525
00526     virtual void OnFolder(const char* fullpath)
00527     {
00528         KiSelectionHandler::OnFolder(fullpath);
00529         CvsCmdAdd(*this);
00530     }
00531
00532     virtual void OnFiles(MultiFiles* pmf)
00533     {
00534         KiSelectionHandler::OnFiles(pmf);
00535         CvsCmdAdd(*this, kAddUnicode);
00536     }
00537
00538     virtual bool NeedsNormalize()
00539     {
00540         return true;
00541     }
00542 };
00543
00545 class KoCommitHandler : public KiSelectionHandler
00546 {
00547 public:
00548     KoCommitHandler()
00549         : KiSelectionHandler(_i18n("Commit"), true, true)
00550     {}
00551
00552     virtual void OnFolder(const char* fullpath)
00553     {
00554         KiSelectionHandler::OnFolder(fullpath);
00555         CvsCmdCommit(*this);
00556     }
00557
00558     virtual void OnFiles(MultiFiles* pmf)
00559     {
00560         KiSelectionHandler::OnFiles(pmf);
00561         CvsCmdCommit(*this);
00562     }
00563 };
00564
00566 class KoUpdateHandler : public KiSelectionHandler
00567 {
00568 public:
00569     KoUpdateHandler()
00570         : KiSelectionHandler(_i18n("Update"), true, true)
00571     {}
00572
00573     virtual void OnFolder(const char* fullpath)
00574     {
00575         KiSelectionHandler::OnFolder(fullpath);
00576         CvsCmdUpdate(*this);
00577     }
00578
00579     virtual void OnFiles(MultiFiles* pmf)
00580     {
00581         KiSelectionHandler::OnFiles(pmf);
00582         CvsCmdUpdate(*this);
00583     }
00584 };
00585
00587 class KoQueryUpdateHandler : public KiSelectionHandler
00588 {
00589 public:
00590     KoQueryUpdateHandler()
00591         : KiSelectionHandler(_i18n("Query Update"))
00592     {}
00593
00594     virtual void OnFolder(const char* fullpath)
00595     {
00596         KiSelectionHandler::OnFolder(fullpath);
00597         CvsCmdUpdate(*this, true);
00598     }
00599
00600     virtual void OnFiles(MultiFiles* pmf)
00601     {
00602         KiSelectionHandler::OnFiles(pmf);
00603         CvsCmdUpdate(*this, true);
00604     }
00605 };
00606
00608 class KoAnnotateHandler : public KiSelectionHandler
00609 {
00610 public:
00611     KoAnnotateHandler()
00612         : KiSelectionHandler(_i18n("Annotate"))
00613     {}
00614
00615     virtual void OnFolder(const char* fullpath)
00616     {
00617         /*we avoid processing directory*/
00618     }
00619
00620     virtual void OnFiles(MultiFiles* pmf)
00621     {
00622         KiSelectionHandler::OnFiles(pmf);
00623         CvsCmdAnnotate(*this);
00624     }
00625 };
00626
00628 class KoGraphAnnotateHandler : public KiSelectionHandler
00629 {
00630 public:
00631     KoGraphAnnotateHandler()
00632         : KiSelectionHandler(_i18n("Annotate"))
00633     {}
00634
00635     virtual void OnFolder(const char* fullpath)
00636     { }
00637
00638     virtual void OnFiles(MultiFiles* pmf)
00639     {
00640         KiSelectionHandler::OnFiles(pmf);
00641         CvsCmdAnnotate(*this, kAnnotateGraph);
00642     }
00643 };
00644
00645
00647 class KoCancelChangesHandler : public KiSelectionHandler
00648 {
00649 public:
00650     KoCancelChangesHandler()
00651         : KiSelectionHandler(_i18n("Cancel Changes"))
00652     {}
00653
00654     virtual void OnFolder(const char* fullpath)
00655     {
00656         /*we avoid processing directory*/
00657     }
00658
00659     virtual void OnFiles(MultiFiles* pmf)
00660     {
00661         KiSelectionHandler::OnFiles(pmf);
00662         CvsCmdCancelChanges(*this);
00663     }
00664 };
00665
00667 class KoCommandLineHandler : public KiSelectionHandler
00668 {
00669 public:
00670     KoCommandLineHandler()
00671         : KiSelectionHandler(_i18n("Command Line"), false)
00672     {}
00673
00674     virtual void OnFolder(const char* fullpath)
00675     {
00676         KiSelectionHandler::OnFolder(fullpath);
00677         CvsCmdCommandLine(*this);
00678     }
00679
00680     virtual void OnFiles(MultiFiles* pmf)
00681     {
00682         KiSelectionHandler::OnFiles(pmf);
00683         CvsCmdCommandLine(*this);
00684     }
00685 };
00686
00688 class KoImportHandler : public KiSelectionHandler
00689 {
00690 public:
00691     KoImportHandler()
00692         : KiSelectionHandler(_i18n("Import"), true, true)
00693     {}
00694
00695     virtual void OnFolder(const char* fullpath)
00696     {
00697         KiSelectionHandler::OnFolder(fullpath);
00698         CvsCmdImportModule(*this);
00699     }
00700
00701     virtual void OnFiles(MultiFiles* pmf)
00702     {
00703         KiSelectionHandler::OnFiles(pmf);
00704         CvsCmdImportModule(*this);
00705     }
00706 };
00707
00709 class KoCheckoutHandler : public KiSelectionHandler
00710 {
00711 public:
00712     KoCheckoutHandler()
00713         : KiSelectionHandler(_i18n("Checkout"), true, true)
00714     {}
00715
00716     virtual void OnFolder(const char* fullpath)
00717     {
00718         KiSelectionHandler::OnFolder(fullpath);
00719         CvsCmdCheckoutModule(*this);
00720     }
00721
00722     virtual void OnFiles(MultiFiles* pmf)
00723     {
00724         KiSelectionHandler::OnFiles(pmf);
00725         CvsCmdCheckoutModule(*this);
00726     }
00727 };
00728
00730 template<kTagCmdType tagType>
00731 class TRtagHandler : public KiSelectionHandler
00732 {
00733 public:
00734     TRtagHandler()
00735         : KiSelectionHandler(GetRtagTypeName(tagType))
00736     {}
00737
00738     virtual void OnFolder(const char* fullpath)
00739     {
00740         KiSelectionHandler::OnFolder(fullpath);
00741         CvsCmdRtag(*this, tagType);
00742     }
00743
00744     virtual void OnFiles(MultiFiles* pmf)
00745     {
00746         KiSelectionHandler::OnFiles(pmf);
00747         CvsCmdRtag(*this, tagType);
00748     }
00749 };
00750
00751 typedef TRtagHandler<kTagCreate> KoRtagCreateHandler;
00752 typedef TRtagHandler<kTagDelete> KoRtagDeleteHandler;
00753 typedef TRtagHandler<kTagBranch> KoRtagBranchHandler;
00754
00756 class KoFileActionHandler : public KiSelectionHandler
00757 {
00758 public:
00759     KoFileActionHandler()
00760         : KiSelectionHandler(_i18n("File Action"), true)
00761     {}
00762
00763     virtual void OnFolder(const char* fullpath)
00764     { /* ignore */ }
00765
00766     virtual void OnFiles(MultiFiles* pmf)
00767     {
00768         KiSelectionHandler::OnFiles(pmf);
00769         CvsCmdFileAction(*this);
00770     }
00771 };
00772
00774 template<kLaunchType lauchType>
00775 class TLaunchHandler : public KiSelectionHandler
00776 {
00777 public:
00778     TLaunchHandler()
00779         : KiSelectionHandler(GetLaunchTypeName(lauchType), true)
00780     {}
00781
00782     virtual void OnFolder(const char* fullpath)
00783     { /* ignore */ }
00784
00785     virtual void OnFiles(MultiFiles* pmf)
00786     {
00787         KiSelectionHandler::OnFiles(pmf);
00788         CvsCmdLaunch(*this, lauchType);
00789     }
00790 };
00791
00792 typedef TLaunchHandler<kLaunchEdit> KoLaunchEditHandler;
00793 typedef TLaunchHandler<kLaunchDefaultEdit> KoLaunchDefaultEditHandler;
00794 typedef TLaunchHandler<kLaunchOpen> KoLaunchOpenHandler;
00795 typedef TLaunchHandler<kLaunchOpenAs> KoLaunchOpenAsHandler;
00796 typedef TLaunchHandler<kLaunchDefault> KoLaunchDefaultHandler;
00797
00798 #endif
00799 // OWSEVIEWHANDLERS_H_
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/macapp/UPseudoSupport.h Source File

rf/support/macapp/UPseudoSupport.h

Go to the documentation of this file.
00001 #ifndef UPSEUDOSUPPORT_H
00002 #define UPSEUDOSUPPORT_H
00003
00004 #include "uwidget.h"
00005 #include "umenu.h"
00006
00007 #include "UBehavior.h"
00008 #include "UGridView.h"
00009 #include "UEditText.h"
00010 #include "UIconButton.h"
00011 #include <vector>
00012
00013 class TBuggyPopup : public TPopup
00014 {
00015     MA_DECLARE_CLASS;
00016
00017     TBuggyPopup();
00018     virtual ~TBuggyPopup();
00019
00020     virtual void ReadFields(CStream_AC* aStream);
00021     virtual void WriteFields(CStream_AC* aStream) const;
00022     virtual void DoPostCreate(TDocument* itsDocument);
00023 protected:
00024     int fRealWidth;
00025 };
00026
00027 class TPseudoScrollBar : public TScrollBar
00028 {
00029     MA_DECLARE_CLASS;
00030
00031     TPseudoScrollBar();
00032     virtual ~TPseudoScrollBar();
00033
00034     virtual void TrackScrollBar(short partCode);
00035
00036     int fPageStep;
00037     int fButtonStep;
00038 };
00039
00040 class TPseudoIconPopup : public TIconPopup
00041 {
00042     MA_DECLARE_CLASS;
00043
00044     TPseudoIconPopup();
00045     virtual ~TPseudoIconPopup();
00046
00047     virtual void ReadFields(CStream_AC* aStream);
00048     virtual void WriteFields(CStream_AC* aStream) const;
00049 };
00050
00051 class TPseudoIconButton : public TIconButton
00052 {
00053     MA_DECLARE_CLASS;
00054
00055     TPseudoIconButton();
00056     virtual ~TPseudoIconButton();
00057
00058     virtual void ReadFields(CStream_AC* aStream);
00059     virtual void WriteFields(CStream_AC* aStream) const;
00060 };
00061
00062 class TPseudoRotateIconButton : public TPseudoIconButton
00063 {
00064     MA_DECLARE_CLASS;
00065
00066     TPseudoRotateIconButton();
00067     virtual ~TPseudoRotateIconButton();
00068
00069     virtual void ReadFields(CStream_AC* aStream);
00070     virtual void WriteFields(CStream_AC* aStream) const;
00071
00072     void DoRotate(int icon);
00073
00074 protected:
00075     std::vector<short> fIconSuite;
00076     int fCurrentIcon;
00077 };
00078
00079 class TPseudoIconCheckBox : public TIconCheckBox
00080 {
00081     MA_DECLARE_CLASS;
00082
00083     TPseudoIconCheckBox();
00084     virtual ~TPseudoIconCheckBox();
00085
00086     virtual void ReadFields(CStream_AC* aStream);
00087     virtual void WriteFields(CStream_AC* aStream) const;
00088 };
00089
00090 class UMacAppMenu : public UMenu
00091 {
00092     UDECLARE_DYNAMIC(UMacAppMenu)
00093
00094 public:
00095     UMacAppMenu();
00096     virtual ~UMacAppMenu();
00097
00098     static int sMAMenuWidID;
00099
00100     ev_msg void OnUpdateUI(void);
00101
00102     UDECLARE_MESSAGE_MAP()
00103 };
00104
00105 class TPseudoAppBehavior : public TBehavior
00106 {
00107     MA_DECLARE_CLASS;
00108 public:
00109     TPseudoAppBehavior();
00110     virtual ~TPseudoAppBehavior();
00111
00112     virtual bool DoIdle(IdlePhase phase);
00113     virtual void DoMenuCommand(CommandNumber aCommandNumber);
00114     virtual void DoSetupMenus();
00115     virtual bool DoToolboxEvent(TToolboxEvent* event);
00116
00117 protected:
00118 };
00119
00120 class TPseudoWinBehavior : public TBehavior
00121 {
00122     MA_DECLARE_CLASS;
00123 public:
00124
00125     enum
00126     {
00127         kPseudoWinBehavior = 'pswb'
00128     };
00129
00130     TPseudoWinBehavior();
00131     virtual ~TPseudoWinBehavior();
00132
00133     virtual void DoEvent(EventNumber eventNumber, TEventHandler* source, TEvent* event);
00134
00135     inline int GetWidID() const { return fWidID; }
00136 protected:
00137     inline void SetPseudoWidget(int widid) { fWidID = widid; }
00138
00139     int fWidID;
00140
00141     friend class UWidget;
00142 };
00143
00144 class TPseudoWinAdorner : public TAdorner
00145 {
00146     MA_DECLARE_CLASS;
00147 public:
00148
00149     enum
00150     {
00151         kPseudoWinAdorner = 'pswa'
00152     };
00153
00154     TPseudoWinAdorner();
00155     virtual ~TPseudoWinAdorner();
00156
00157     virtual void ViewChangedFrame (TView* itsView,
00158                                             const CViewRect& oldFrame,
00159                                             const CViewRect& newFrame,
00160                                             bool    invalidate);
00161
00162 protected:
00163     inline void SetPseudoWidget(int widid) { fWidID = widid; }
00164
00165     int fWidID;
00166
00167     friend class UWidget;
00168 };
00169
00170 class TPseudoCustomView : public TView
00171 {
00172     MA_DECLARE_CLASS;
00173 public:
00174
00175     TPseudoCustomView();
00176     virtual ~TPseudoCustomView();
00177
00178     virtual void Draw(const CViewRect& area);
00179 };
00180
00181 class TPseudoTextListView : public TTextListView
00182 {
00183     MA_DECLARE_CLASS;
00184
00185 public:
00186     enum
00187     {
00188         kTextStringListViewSignature = 'TxLv',
00189
00190         kSelectionChanged = 'TxSC',
00191         kMultiClickSelection = 'TxMu'
00192     };
00193
00194     TPseudoTextListView();
00195     virtual ~TPseudoTextListView();
00196
00197     virtual IDType GetStandardSignature(void) const;
00198
00199     virtual CStr255_AC GetItemText(GridCoordinate) const;
00200
00201     virtual void InsStringBefore(short anItem, const char * string);
00202     virtual void InsStringFirst(const char * string);
00203     virtual void InsStringLast(const char * string);
00204
00205     virtual void DelItemAt(GridCoordinate anItem, GridCoordinate numOfItems);
00206     virtual void RemoveAll(void);
00207
00208     virtual void DoKeyEvent(TToolboxEvent * event);
00209     virtual void DoMouseCommand(CViewPoint & theMouse, TToolboxEvent * event, CPoint_AC);
00210     virtual void SetSelection(const TGridViewDesignator* cellsToSelect,
00211                         bool extendSelection, bool highlight, bool select);
00212
00213 protected:
00214     virtual bool DoMouseCommand_SelectCells(GridCell whichCell, class TToolboxEvent * event);
00215
00216     std::vector<CStr255_AC> fStringContainer;
00217 };
00218
00219 class TPseudoDoubleNumberText : public TEditText
00220 {
00221     MA_DECLARE_CLASS;
00222
00223 public:
00224     enum
00225     {
00226         kDefaultPrecision = 5,
00227         kStdDoubleNumberText = 'dNum'
00228     };
00229
00230     TPseudoDoubleNumberText();
00231     virtual ~TPseudoDoubleNumberText();
00232
00233     virtual IDType GetStandardSignature() const;
00234     virtual void ReadFields(CStream_AC* aStream);
00235     virtual void WriteFields(CStream_AC* aStream) const;
00236     virtual long GetValidationError();
00237         // Overrides
00238
00239     virtual double GetValue();
00240     virtual void SetValue(double newValue, bool redraw);
00241 protected:
00242     double fMinimum;
00243     double fMaximum;
00244     short fPrecision;
00245 };
00246
00247 void macapp_workaround_adlib_bug(TView *view);
00248
00249 #endif
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJShellTree.cpp Source File

WinCvs/CJLib/CJLibrary/CJShellTree.cpp

Go to the documentation of this file.
00001 // CJShellTree.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based upon the MFCENUM example. MFCENUM is a companion sample application
00006 // for Chapter 14 in "Programming the Windows 95 User Interface" by Nancy Cluts,
00007 // available in the Microsoft(R) Development Library.
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 2000/03/01 21:24:34 $
00013  * $Revision: 1.2 $
00014  * $Archive: /CodeJock/CJLibrary/CJShellTree.cpp $
00015  *
00016  * $History: CJShellTree.cpp $
00017  *
00018  * *****************  Version 11  *****************
00019  * User: Kirk Stowell Date: 10/30/99   Time: 1:59p
00020  * Updated in $/CodeJock/CJLibrary
00021  * Changed base class from CTreeCtrl to CCJTreeCtrl for flicker free
00022  * drawing.
00023  *
00024  * *****************  Version 10  *****************
00025  * User: Kirk Stowell Date: 9/13/99    Time: 5:52a
00026  * Updated in $/CodeJockey/CJLibrary
00027  * Fixed build errors which occured with UNICODE builds.
00028  *
00029  * *****************  Version 9  *****************
00030  * User: Kirk Stowell Date: 8/31/99    Time: 4:39a
00031  * Updated in $/CodeJockey/CJLibrary
00032  * Updated copyright and contact information.
00033  *
00034  * *****************  Version 8  *****************
00035  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00036  * Updated in $/CodeJockey/CJLibrary
00037  *
00038  * *****************  Version 7  *****************
00039  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00040  * Updated in $/CodeJockey/CJLibrary
00041  *
00042  * *****************  Version 6  *****************
00043  * User: Kirk Stowell Date: 6/11/99    Time: 10:14p
00044  * Updated in $/CodeJockey/CJ60Lib
00045  * Cleaned up system image list initialization.
00046  *
00047  * *****************  Version 5  *****************
00048  * User: Kirk Stowell Date: 5/12/99    Time: 5:32a
00049  * Updated in $/CodeJockey/CJ60Lib
00050  * Added support for vc5 compatibility
00051  *
00052  * *****************  Version 4  *****************
00053  * User: Kirk Stowell Date: 5/12/99    Time: 1:41a
00054  * Updated in $/CodeJockey/CJ60Lib
00055  * Added wait cursor for lengthly processing.
00056  *
00057  * *****************  Version 3  *****************
00058  * User: Kirk Stowell Date: 5/02/99    Time: 3:38p
00059  * Updated in $/CodeJockey/CJ60Lib
00060  * Added version macro  _WIN32_IE, you will need to have at IE4 or greater
00061  * installed to use this class. This will ensure that the version of
00062  * SHELL32.DLL is compatible.
00063  *
00064  * *****************  Version 2  *****************
00065  * User: Kirk Stowell Date: 3/19/99    Time: 11:05p
00066  * Updated in $/CodeJockey/CJ60Lib
00067  * Initial re-write and release.
00068  *
00069  * *****************  Version 1  *****************
00070  * User: Kirk Stowell Date: 2/24/99    Time: 11:05p
00071  * Created in $/CodeJockey/CJ60Lib
00072  * Overloaded PopulateTree(LPCTSTR lpszPath) in the class CCJShellTree to
00073  * fill the tree based upon path. Takehiko Mizoguti
00074  * [mizoguti@m2.sys.to.casio.co.jp]
00075  *
00076  ***************************************************************************/
00078
00079 #include "stdafx.h"
00080 #include "CJShellTree.h"
00081 #include "CJShellList.h"
00082 #include "CJShell.h"
00083 #include "CJFlatComboBox.h"
00084 #include <direct.h>
00085
00086 #ifdef _DEBUG
00087 #define new DEBUG_NEW
00088 #undef THIS_FILE
00089 static char THIS_FILE[] = __FILE__;
00090 #endif
00091
00092 #if _WIN32_IE >= 0x0400 // Need to have at IE4 or greater installed.
00093 #include <Shlwapi.h>
00094
00096 // CCJShellTree
00097
00098 CCJShellTree::CCJShellTree()
00099 {
00100     m_pListCtrl     = NULL;
00101     m_pComboBox     = NULL;
00102     m_bRefresh      = false;
00103     m_bOutaHere     = false;
00104     m_htiCurrent    = NULL;
00105 }
00106
00107 CCJShellTree::~CCJShellTree()
00108 {
00109 }
00110
00111 IMPLEMENT_DYNAMIC(CCJShellTree, CCJTreeCtrl)
00112
00113 BEGIN_MESSAGE_MAP(CCJShellTree, CCJTreeCtrl)
00114     //{{AFX_MSG_MAP(CCJShellTree)
00115     ON_NOTIFY_REFLECT(NM_RCLICK, OnRclick)
00116     ON_NOTIFY_REFLECT(TVN_DELETEITEM, OnDeleteitem)
00117     ON_NOTIFY_REFLECT(TVN_SELCHANGED, OnSelchanged)
00118     ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, OnItemexpanding)
00119     ON_WM_DESTROY()
00120     ON_WM_CREATE()
00121     //}}AFX_MSG_MAP
00122 END_MESSAGE_MAP()
00123
00125 // CCJShellTree message handlers
00126
00127 void CCJShellTree::OnFill(bool bRefresh/*=false*/)
00128 {
00129     LPSHELLFOLDER lpsf=NULL;
00130     HRESULT hr;
00131     TV_SORTCB      tvscb;
00132
00133     m_bRefresh = bRefresh;
00134
00135     // Get a pointer to the desktop folder.
00136     hr=SHGetDesktopFolder(&lpsf);
00137
00138     if (SUCCEEDED(hr))
00139     {
00140         // Initialize the tree view to be empty.
00141         DeleteAllItems();
00142
00143         // Fill in the tree view from the root.
00144         FillTreeView(lpsf,
00145             NULL,
00146             TVI_ROOT);
00147         // Release the folder pointer.
00148         lpsf->Release();
00149     }
00150     tvscb.hParent     = TVI_ROOT;
00151     tvscb.lParam      = 0;
00152     tvscb.lpfnCompare = TreeViewCompareProc;
00153
00154     // Sort the items in the tree view
00155     SortChildrenCB(&tvscb/*, FALSE*/);
00156
00157     Expand(GetRootItem(), TVE_EXPAND);
00158 }
00159
00160 void CCJShellTree::FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST  lpifq, HTREEITEM hParent)
00161 {
00162     TV_ITEM         tvi;                          // TreeView Item.
00163     TV_INSERTSTRUCT tvins;                        // TreeView Insert Struct.
00164     HTREEITEM       hPrev = NULL;                 // Previous Item Added.
00165     LPENUMIDLIST    lpe=0;
00166     LPITEMIDLIST    lpi=0, lpifqThisItem=0;
00167     LPTVITEMDATA    lptvid=0;
00168     LPMALLOC        lpMalloc=0;
00169     ULONG           ulFetched;
00170     HRESULT         hr;
00171     TCHAR           szBuff[MAX_PATH];
00172     HWND            hwnd=GetParent()->GetSafeHwnd();
00173
00174     hr=SHGetMalloc(&lpMalloc);
00175     if (FAILED(hr))
00176        return;
00177
00178     // Hourglass on!
00179
00180     SetCapture();
00181     CWaitCursor wait;   // display wait cursor
00182
00183     if (SUCCEEDED(hr))
00184     {
00185         SetRedraw(FALSE);
00186
00187         hr=lpsf->EnumObjects(hwnd,
00188             SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, &lpe);
00189
00190         if (SUCCEEDED(hr))
00191         {
00192             while (S_OK==lpe->Next(1, &lpi, &ulFetched))
00193             {
00194                 //Create a fully qualified path to the current item
00195                 //The SH* shell api's take a fully qualified path pidl,
00196                 //(see GetIcon above where I call SHGetFileInfo) whereas the
00197                 //interface methods take a relative path pidl.
00198
00199                 ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER;
00200
00201                 lpsf->GetAttributesOf(1, (const struct _ITEMIDLIST **)&lpi, &ulAttrs);
00202
00203                 if (ulAttrs & (SFGAO_HASSUBFOLDER | SFGAO_FOLDER))
00204                 {
00205                    //We need this next if statement so that we don't add things like
00206                    //the MSN to our tree.  MSN is not a folder, but according to the
00207                    //shell is has subfolders....
00208
00209                    if (ulAttrs & SFGAO_FOLDER)
00210                    {
00211                       tvi.mask            = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE |
00212                                             TVIF_PARAM;
00213
00214                       if (ulAttrs & SFGAO_HASSUBFOLDER)
00215                       {
00216                          //This item has sub-folders, so let's put the + in the TreeView.
00217                          //The first time the user clicks on the item, we'll populate the
00218                          //sub-folders then.
00219
00220                          tvi.cChildren=1;
00221                          tvi.mask |= TVIF_CHILDREN;
00222                       }
00223
00224                       //OK, let's get some memory for our ITEMDATA struct
00225
00226                       lptvid = (LPTVITEMDATA)lpMalloc->Alloc(sizeof(TVITEMDATA));
00227                       if (!lptvid)
00228                          goto Done;
00229
00230                       //Now get the friendly name that we'll put in the treeview...
00231
00232                       if( m_shell.GetName(lpsf, lpi, SHGDN_NORMAL, szBuff) == FALSE ) {
00233                          goto Done;
00234                       }
00235
00236                       tvi.pszText    = szBuff;
00237                       tvi.cchTextMax = MAX_PATH;
00238
00239                       lpifqThisItem=m_shell.ConcatPidls(lpifq, lpi);
00240
00241                       //Now, make a copy of the ITEMIDLIST
00242
00243                       lptvid->lpi=m_shell.CopyITEMID(lpMalloc, lpi);
00244
00245                       m_shell.GetNormalAndSelectedIcons(lpifqThisItem, &tvi);
00246
00247                       lptvid->lpsfParent=lpsf;    //Store the parent folders SF
00248                       lpsf->AddRef();
00249
00250                       //So, you ask, what's the story here?  Why do we have 2
00251                       //functions that apparently do the same thing?  Well,
00252                       //ParseDisplayName() (used in GetFullyQualPidl) does not
00253                       //work well for non-file system objects such as the My
00254                       //Computer and Net Hood.  So, since we know that these
00255                       //guys will only show up when we are enumerating the root
00256                       //of the namespace (as identified by an hParent of TVI_ROOT),
00257                       //we special case this here.  You *could* use ConcatPidls()
00258                       //in ALL cases, but the GetFullyQualPidl() is shown for
00259                       //demonstration purposes, since it's the more intuative way.
00260
00261 //Commented out for now, since we need ConcatPidls for *any* non-file system object.
00262 //This includes things like Control Panel, et al.
00263
00264 //                      if (hParent==TVI_ROOT)
00265                          lptvid->lpifq=m_shell.ConcatPidls(lpifq, lpi);
00266 //                      else
00267 //                         lptvid->lpifq=GetFullyQualPidl(lpsf, lpi);
00268
00269                       tvi.lParam = (LPARAM)lptvid;
00270
00271                       // Populate the TreeVeiw Insert Struct
00272                       // The item is the one filled above.
00273                       // Insert it after the last item inserted at this level.
00274                       // And indicate this is a root entry.
00275
00276                       tvins.item         = tvi;
00277                       tvins.hInsertAfter = hPrev;
00278                       tvins.hParent      = hParent;
00279
00280                       // Add the item to the tree
00281
00282                       hPrev = InsertItem(&tvins);
00283                    }
00284
00285                    lpMalloc->Free(lpifqThisItem);
00286                    lpifqThisItem=0;
00287                 }
00288
00289                 lpMalloc->Free(lpi);  //Finally, free the pidl that the shell gave us...
00290                 lpi=0;
00291             }
00292         }
00293
00294     }
00295     else {
00296         SetRedraw();
00297         return;
00298     }
00299
00300 Done:
00301
00302     // Hourglass off!
00303
00304     ReleaseCapture();
00305
00306     if (lpe)  lpe->Release();
00307
00308     //The following 2 if statements will only be TRUE if we got here on an
00309     //error condition from the "goto" statement.  Otherwise, we free this memory
00310     //at the end of the while loop above.
00311     if (lpi && lpMalloc)           lpMalloc->Free(lpi);
00312     if (lpifqThisItem && lpMalloc) lpMalloc->Free(lpifqThisItem);
00313
00314     if (lpMalloc) lpMalloc->Release();
00315     SetRedraw();
00316 }
00317
00318 void CCJShellTree::OnRclick(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00319 {
00320     *pResult = 0;
00321
00322     POINT           pt;
00323     LPTVITEMDATA    lptvid;  //Long pointer to TreeView item data
00324     static char     szBuff[MAX_PATH];
00325     TV_HITTESTINFO  tvhti;
00326     TV_ITEM         tvi;
00327
00328     ::GetCursorPos((LPPOINT)&pt);
00329     ::ScreenToClient(m_hWnd, &pt);
00330     tvhti.pt=pt;
00331     HitTest(&tvhti);
00332     SelectItem(tvhti.hItem);
00333     if (tvhti.flags & TVHT_ONITEMLABEL)
00334     {
00335         ::ClientToScreen(m_hWnd, &pt);
00336         tvi.mask=TVIF_PARAM;
00337         tvi.hItem=tvhti.hItem;
00338
00339         if (!GetItem(&tvi))
00340             return;
00341
00342         lptvid=(LPTVITEMDATA)tvi.lParam;
00343
00344         m_shell.DoTheMenuThing(::GetParent(m_hWnd),
00345             lptvid->lpsfParent, lptvid->lpi, &pt);
00346     }
00347 }
00348
00349 void CCJShellTree::OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult)
00350 {
00351     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00352     *pResult = 0;
00353
00354     HRESULT        hr;
00355     LPMALLOC       lpMalloc;
00356     LPTVITEMDATA   lptvid;  //Long pointer to TreeView item data
00357
00358     //Let's free the memory for the TreeView item data...
00359     hr=SHGetMalloc(&lpMalloc);
00360     if (FAILED(hr))
00361         return;
00362
00363     lptvid=(LPTVITEMDATA)pNMTreeView->itemOld.lParam;
00364     lptvid->lpsfParent->Release();
00365     lpMalloc->Free(lptvid->lpi);
00366     lpMalloc->Free(lptvid->lpifq);
00367     lpMalloc->Free(lptvid);
00368     lpMalloc->Release();
00369 }
00370
00371 void CCJShellTree::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
00372 {
00373     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00374     LPTVITEMDATA    lptvid;  //Long pointer to TreeView item data
00375     LPSHELLFOLDER   lpsf2=NULL;
00376     HRESULT         hr;
00377
00378     SetRedraw(FALSE);
00379     //Do this only if we are not exiting the application...
00380     if (!m_bOutaHere)
00381     {
00382         lptvid=(LPTVITEMDATA)pNMTreeView->itemNew.lParam;
00383         if (lptvid)
00384         {
00385             hr=lptvid->lpsfParent->BindToObject(lptvid->lpi,
00386                 0,IID_IShellFolder,(LPVOID *)&lpsf2);
00387
00388             if (SUCCEEDED(hr) && (m_bRefresh == false))
00389             {
00390                 // get the current directory.
00391                 CString strFolderPath;
00392                 GetSelectedFolderPath(strFolderPath);
00393
00394                 // get a handle to the currently selected item and set the
00395                 // working directory.
00396                 m_htiCurrent = pNMTreeView->itemNew.hItem;
00397                 SetCurrentDirectory( strFolderPath );
00398
00399                 if (m_pListCtrl->GetSafeHwnd())
00400                 {
00401                     m_pListCtrl->PopulateListView(lptvid,lpsf2);
00402                     lpsf2->Release();
00403                 }
00404                 if( m_pComboBox->GetSafeHwnd( ))
00405                 {
00406                     int nFound = m_pComboBox->FindString(-1, strFolderPath);
00407                     if (nFound == CB_ERR) {
00408                         m_pComboBox->SetCurSel( m_pComboBox->AddString( strFolderPath ));
00409                     }
00410                     else {
00411                         m_pComboBox->SetCurSel(nFound);
00412                     }
00413                 }
00414             }
00415         }
00416     }
00417
00418     SetRedraw();
00419     *pResult = 0;
00420 }
00421
00422 void CCJShellTree::OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult)
00423 {
00424     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00425     *pResult = 0;
00426
00427     LPTVITEMDATA   lptvid;  //Long pointer to TreeView item data
00428     HRESULT        hr;
00429     LPSHELLFOLDER  lpsf2=NULL;
00430     static char    szBuff[MAX_PATH];
00431     TV_SORTCB      tvscb;
00432
00433     if ((pNMTreeView->itemNew.state & TVIS_EXPANDEDONCE))
00434         return;
00435
00436     SetRedraw(FALSE);
00437     lptvid=(LPTVITEMDATA)pNMTreeView->itemNew.lParam;
00438     if (lptvid)
00439     {
00440         hr=lptvid->lpsfParent->BindToObject(lptvid->lpi,
00441             0, IID_IShellFolder,(LPVOID *)&lpsf2);
00442
00443         if (SUCCEEDED(hr))
00444         {
00445             FillTreeView(lpsf2,
00446                 lptvid->lpifq,
00447                 pNMTreeView->itemNew.hItem);
00448         }
00449
00450         tvscb.hParent     = pNMTreeView->itemNew.hItem;
00451         tvscb.lParam      = 0;
00452         tvscb.lpfnCompare = TreeViewCompareProc;
00453
00454         SortChildrenCB(&tvscb/*, FALSE*/);
00455     }
00456     SetRedraw();
00457 }
00458
00459 int CALLBACK CCJShellTree::TreeViewCompareProc(LPARAM lparam1, LPARAM lparam2, LPARAM /*lparamSort*/)
00460 {
00461     LPTVITEMDATA lptvid1=(LPTVITEMDATA)lparam1;
00462     LPTVITEMDATA lptvid2=(LPTVITEMDATA)lparam2;
00463     HRESULT   hr;
00464
00465     hr = lptvid1->lpsfParent->CompareIDs(0, lptvid1->lpi, lptvid2->lpi);
00466
00467     if (FAILED(hr))
00468        return 0;
00469
00470     return (short)SCODE_CODE(GetScode(hr));
00471 }
00472
00473 BOOL CCJShellTree::InitSystemImageLists()
00474 {
00475     SHFILEINFO sfi;
00476
00477     HIMAGELIST hImageList = (HIMAGELIST)::SHGetFileInfo( _T("C:\\"), 0, &sfi,
00478         sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON );
00479
00480     if( hImageList ) {
00481         SetImageList( CImageList::FromHandle( hImageList ), TVSIL_NORMAL  );
00482         return TRUE;
00483     }
00484
00485     return FALSE;
00486 }
00487
00488 void CCJShellTree::OnDestroy()
00489 {
00490     m_bOutaHere = false;
00491     CCJTreeCtrl::OnDestroy();
00492 }
00493
00494 void CCJShellTree::TunnelTree(CString strFindPath)
00495 {
00496     HTREEITEM subNode = GetRootItem();
00497     CString szPathHop;
00498     char drive[_MAX_DRIVE];
00499     char dir[_MAX_DIR];
00500     char fname[_MAX_FNAME];
00501     char ext[_MAX_EXT];
00502     char delimiter[]="\\";
00503
00504     m_bRefresh = false;
00505
00506     if(!m_shell.Exist(strFindPath))
00507     {
00508         if (strFindPath.GetLength() == 3)
00509         {
00510         }
00511
00512         else
00513         {
00514             MessageBox(strFindPath,_T("Folder not found"),MB_ICONERROR);
00515             return;
00516         }
00517     }
00518
00519     if(strFindPath.ReverseFind(_T('\\')) != strFindPath.GetLength()-1)
00520     {
00521         strFindPath += _T("\\");
00522     }
00523
00524     m_shell.SplitPath(strFindPath,drive,dir,fname,ext);
00525
00526     //search the drive first
00527     szPathHop=drive;
00528     subNode=GetChildItem(subNode);
00529
00530     if(subNode)
00531     {
00532         if(SearchTree(subNode,szPathHop, CCJShellTree::type_drive))
00533         {
00534             SetRedraw(FALSE);
00535             //break down subfolders and search
00536             char *p=strtok(dir,delimiter);
00537             while(p)
00538             {
00539                 subNode = GetSelectedItem();
00540                 Expand(subNode, TVE_EXPAND);
00541                 subNode = GetChildItem(subNode);
00542
00543                 if(SearchTree(subNode,p,CCJShellTree::type_folder))
00544                     p=strtok(NULL,delimiter);
00545                 else
00546                     p=NULL;
00547             }
00548             SetRedraw();
00549         }
00550     }
00551 }
00552
00553 BOOL CCJShellTree::SearchTree(HTREEITEM treeNode, CString szSearchName, FindAttribs attr)
00554 {
00555     LPTVITEMDATA    lptvid;  //Long pointer to TreeView item data
00556     LPSHELLFOLDER   lpsf2=NULL;
00557     char    drive[_MAX_DRIVE];
00558     char    dir[_MAX_DIR];
00559     char    fname[_MAX_FNAME];
00560     char    ext[_MAX_EXT];
00561     BOOL    bRet=FALSE;
00562     HRESULT hr;
00563     CString strCompare;
00564
00565     szSearchName.MakeUpper();
00566     while(treeNode && bRet==FALSE)
00567     {
00568         lptvid=(LPTVITEMDATA)GetItemData(treeNode);
00569         if (lptvid && lptvid->lpsfParent && lptvid->lpi)
00570         {
00571             hr=lptvid->lpsfParent->BindToObject(lptvid->lpi,
00572                 0,IID_IShellFolder,(LPVOID *)&lpsf2);
00573             if (SUCCEEDED(hr))
00574             {
00575                 ULONG ulAttrs = SFGAO_FILESYSTEM;
00576                 lptvid->lpsfParent->GetAttributesOf(1, (const struct _ITEMIDLIST **)&lptvid->lpi, &ulAttrs);
00577                 if (ulAttrs & (SFGAO_FILESYSTEM))
00578                 {
00579                     if(SHGetPathFromIDList(lptvid->lpifq,strCompare.GetBuffer(MAX_PATH)))
00580                     {
00581                         switch(attr)
00582                         {
00583                         case type_drive:
00584                             m_shell.SplitPath(strCompare,drive,dir,fname,ext);
00585                             strCompare=drive;
00586                             break;
00587                         case type_folder:
00588                             strCompare = GetItemText(treeNode);
00589                             break;
00590                         }
00591                         strCompare.MakeUpper();
00592                         if(strCompare == szSearchName)
00593                         {
00594                             EnsureVisible(treeNode);
00595                             SelectItem(treeNode);
00596                             bRet=TRUE;
00597                         }
00598                     }
00599                 }
00600                 lpsf2->Release();
00601             }
00602         }
00603         treeNode = GetNextSiblingItem(treeNode);
00604     }
00605     return bRet;
00606 }
00607
00608 BOOL CCJShellTree::GetSelectedFolderPath(CString &strFolderPath)
00609 {
00610     LPTVITEMDATA    lptvid;  //Long pointer to TreeView item data
00611     LPSHELLFOLDER   lpsf2=NULL;
00612     static TCHAR    szBuff[MAX_PATH];
00613     HTREEITEM       hItem = GetSelectedItem();
00614     HRESULT         hr;
00615     BOOL            bRet=FALSE;
00616
00617     if( hItem != NULL )
00618     {
00619         lptvid=(LPTVITEMDATA)GetItemData(hItem);
00620
00621         if (lptvid && lptvid->lpsfParent && lptvid->lpi)
00622         {
00623             hr=lptvid->lpsfParent->BindToObject(lptvid->lpi,
00624                 0,IID_IShellFolder,(LPVOID *)&lpsf2);
00625
00626             if (SUCCEEDED(hr))
00627             {
00628                 ULONG ulAttrs = SFGAO_FOLDER;
00629
00630                 // Determine what type of object we have.
00631                 lptvid->lpsfParent->GetAttributesOf(1,
00632                     (const struct _ITEMIDLIST **)&lptvid->lpi, &ulAttrs);
00633
00634                 if (ulAttrs & (SFGAO_FOLDER))
00635                 {
00636                     if(SHGetPathFromIDList(lptvid->lpifq,szBuff)){
00637                         strFolderPath = szBuff;
00638                         bRet = TRUE;
00639                     }
00640                 }
00641             }
00642
00643         }
00644         if(lpsf2)
00645             lpsf2->Release();
00646     }
00647
00648     return bRet;
00649 }
00650
00651 BOOL CCJShellTree::GetFolderItemPath(HTREEITEM hItem, CString &strFolderPath)
00652 {
00653     LPTVITEMDATA    lptvid;  //Long pointer to TreeView item data
00654     LPSHELLFOLDER   lpsf2=NULL;
00655     static TCHAR    szBuff[MAX_PATH];
00656     HRESULT         hr;
00657     BOOL            bRet=FALSE;
00658
00659     lptvid=(LPTVITEMDATA)GetItemData(hItem);
00660
00661     if (lptvid && lptvid->lpsfParent && lptvid->lpi)
00662     {
00663         hr=lptvid->lpsfParent->BindToObject(lptvid->lpi,
00664             0,IID_IShellFolder,(LPVOID *)&lpsf2);
00665
00666         if (SUCCEEDED(hr))
00667         {
00668             ULONG ulAttrs = SFGAO_FILESYSTEM;
00669
00670             // Determine what type of object we have.
00671             lptvid->lpsfParent->GetAttributesOf(1, (const struct _ITEMIDLIST **)&lptvid->lpi, &ulAttrs);
00672
00673             if (ulAttrs & (SFGAO_FILESYSTEM))
00674             {
00675                 if(SHGetPathFromIDList(lptvid->lpifq,szBuff)){
00676                     strFolderPath = szBuff;
00677                     bRet = TRUE;
00678                 }
00679             }
00680         }
00681
00682         if(lpsf2)
00683             lpsf2->Release();
00684     }
00685
00686     return bRet;
00687 }
00688
00689 void CCJShellTree::PopulateTree(LPCTSTR lpszPath)
00690 {
00691     LPSHELLFOLDER lpsf=NULL,lpsf2=NULL;
00692     LPITEMIDLIST  lpi=NULL;
00693     HRESULT hr;
00694     TV_SORTCB      tvscb;
00695     LPTSTR          lpFolder = (LPTSTR)lpszPath;
00696     LPTSTR          lpNextFolder;
00697     TCHAR           strPath[_MAX_PATH];
00698
00699     LPMALLOC pMalloc;
00700     if (::SHGetMalloc(&pMalloc) == NOERROR)
00701     {
00702
00703         // Get a pointer to the desktop folder.
00704         hr=SHGetDesktopFolder(&lpsf);
00705
00706         if (SUCCEEDED(hr))
00707         {
00708             USES_CONVERSION;
00709
00710             // Initialize the tree view to be empty.
00711             DeleteAllItems();
00712
00713             do{
00714
00715                 // Get the Next Component
00716                 lpNextFolder = PathFindNextComponent( lpFolder );
00717                 if( lpNextFolder && *lpNextFolder ){
00718                     memcpy( strPath, lpFolder, ( lpNextFolder - lpFolder ) );
00719                     strPath[lpNextFolder - lpFolder] = _T('\0');
00720                 }
00721                 else{
00722                     _tcscpy( strPath, lpFolder );
00723                     lpNextFolder = NULL;
00724                 }
00725
00726                 // Get ShellFolder Pidl
00727                 ULONG eaten;
00728                 hr = lpsf->ParseDisplayName( NULL, NULL, T2OLE(strPath), &eaten, &lpi, NULL );
00729                 if( FAILED( hr ) ){
00730                     break;
00731                 }
00732                 hr=lpsf->BindToObject(lpi, 0, IID_IShellFolder,(LPVOID *)&lpsf2);
00733                 if( FAILED( hr ) ){
00734                     break;
00735                 }
00736
00737                 pMalloc->Free( lpi );
00738
00739                 // Release the Parent Folder pointer.
00740                 lpsf->Release();
00741
00742                 // Chenge Folder Info
00743                 lpsf = lpsf2;
00744                 lpFolder = lpNextFolder;
00745             }
00746             while( lpNextFolder );
00747
00748             FillTreeView(lpsf,NULL,TVI_ROOT);
00749
00750         }
00751     }
00752     tvscb.hParent     = TVI_ROOT;
00753     tvscb.lParam      = 0;
00754     tvscb.lpfnCompare = TreeViewCompareProc;
00755
00756     // Sort the items in the tree view
00757     SortChildrenCB(&tvscb/*, FALSE*/);
00758
00759     HTREEITEM hItem;
00760     hItem = GetRootItem();
00761     Expand(hItem,TVE_EXPAND);
00762     Select(GetRootItem(),TVGN_CARET);
00763 }
00764
00765 int CCJShellTree::OnCreate(LPCREATESTRUCT lpCreateStruct)
00766 {
00767     if (CCJTreeCtrl::OnCreate(lpCreateStruct) == -1)
00768         return -1;
00769
00770     // Attach the system image list, and build the tree.
00771     InitSystemImageLists();
00772     OnFill();
00773
00774     return 0;
00775 }
00776
00777 BOOL CCJShellTree::PreCreateWindow(CREATESTRUCT& cs)
00778 {
00779     if( !CCJTreeCtrl::PreCreateWindow(cs))
00780         return FALSE;
00781
00782     cs.style |= TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS;
00783
00784     return TRUE;
00785 }
00786
00787 #endif // (_WIN32_IE >= 0x0400)
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMenuData Member List

This is the complete list of members for CCJMenuData, including all inherited members.

bitmap | CCJMenuData |
CCJMenuData() | CCJMenuData | [inline]
GetString(void) | CCJMenuData |
GetWideString(void) | CCJMenuData | [inline]
m_szMenuText | CCJMenuData | [private]
menuIconNormal | CCJMenuData |
nFlags | CCJMenuData |
nID | CCJMenuData |
SetAnsiString(LPCSTR szAnsiString) | CCJMenuData |
SetWideString(const wchar_t *szWideString) | CCJMenuData |
syncflag | CCJMenuData |
xoffset | CCJMenuData |
~CCJMenuData() | CCJMenuData |

Generated on Sat Aug 7 22:49:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/ustr.cpp Source File

rf/ustr.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- January 1997
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #include <stdlib.h>
00024 #include <errno.h>
00025 #include <stdio.h>
00026 #include <new>
00027 #if defined (WIN32)
00028 #include <io.h>
00029 #endif
00030 #if defined (TARGET_OS_MAC)
00031 #include "MacMisc.h"
00032 #endif
00033
00034 #include "cvsgui_i18n.h"
00035
00036 #include "ustr.h"
00037 #include "uconsole.h"
00038 #include "FileTraversal.h"
00039 #include "AppConsole.h"
00040
00041 #if qMacAPP
00042 #   include <Errors.h>
00043 #endif
00044
00045 #ifdef WIN32
00046 #   ifdef _DEBUG
00047 #   define new DEBUG_NEW
00048 #   undef THIS_FILE
00049     static char THIS_FILE[] = __FILE__;
00050 #   endif
00051 #endif /* WIN32 */
00052
00053 #if TARGET_RT_MAC_MACHO || qUnix
00054 #   ifndef HAVE_STRICMP
00055 #       define stricmp strcasecmp
00056 #   endif
00057 #   ifndef HAVE_STRNICMP
00058 #       define strnicmp strncasecmp
00059 #   endif
00060 #endif
00061
00062 static const unsigned int kMaxChar = 255;
00063
00070 char* CleanupLogMsg(const char* msg)
00071 {
00072     static CStaticAllocT<char> buf;
00073
00074     size_t len = strlen(msg);
00075     buf.AdjustSize(len + 1);
00076
00077     char* tmp = buf;
00078     char c;
00079
00080
00081     while( (c = *msg++) != '\0' )
00082     {
00083 #ifdef WIN32
00084         if(c == '\r')
00085             continue;
00086 #endif /* WIN32 */
00087 #ifdef TARGET_OS_MAC
00088         if(c == '\r')
00089             c = '\n';
00090 #endif /* TARGET_OS_MAC */
00091         *tmp++ = c;
00092     }
00093
00094     *tmp++ = '\0';
00095
00096     return buf;
00097 }
00098
00108 bool SplitPath(const char* dir, UStr& uppath, UStr& folder, bool dontSkipDelimiter /*= false*/)
00109 {
00110     char newDir[MAX_PATH * 2] = "";
00111     char oldDir[MAX_PATH * 2] = "";
00112     char newFile[MAX_PATH] = "";
00113
00114     if( !dir )
00115     {
00116         // Null pointer
00117         return false;
00118     }
00119
00120     int dirLen = strlen(dir);
00121     if( dirLen > 0 )
00122     {
00123         strcpy(oldDir, dir);
00124
00125         if( !dontSkipDelimiter && (dir[dirLen - 1] == kPathDelimiter) )
00126         {
00127             oldDir[dirLen - 1] = '\0';
00128             --dirLen;
00129         }
00130
00131         const char* tmp = oldDir;
00132         const char* prev = oldDir;
00133
00134         while( (tmp = strchr(tmp, kPathDelimiter)) != 0L )
00135         {
00136             prev = ++tmp;
00137         }
00138
00139         strcpy(newDir, oldDir);
00140         newDir[prev - oldDir] = '\0';
00141         strcpy(newFile, prev);
00142     }
00143
00144     uppath = newDir;
00145     folder = newFile;
00146
00147     return true;
00148 }
00149
00158 bool MakeTmpFile(UStr& file, const char* prefix, const char* extension /*= 0L*/, bool create /*= false*/)
00159 {
00160     static int count = 0;
00161
00162     UStr tmpPath;
00163     UStr ext;
00164     UStr prf;
00165
00166     if( extension != 0L && extension[0] != '\0' )
00167     {
00168         if( extension[0] != '.' )
00169             ext = ".";
00170
00171         ext << extension;
00172     }
00173
00174     if( prefix != 0L && prefix[0] != '\0' )
00175     {
00176         prf = prefix;
00177     }
00178     else
00179     {
00180         prf = "cvsgui";
00181     }
00182
00183 #ifdef WIN32
00184     char* ptr;
00185     ptr = getenv(_T("TMP"));
00186     if( ptr != 0L && _access(ptr, 0) != -1 )
00187     {
00188         tmpPath = ptr;
00189     }
00190     else
00191     {
00192         tmpPath = ".";
00193     }
00194 #endif /* !WIN32 */
00195 #ifdef TARGET_OS_MAC
00196     UFSSpec theFolder;
00197     OSErr err;
00198
00199     if( (err = MacGetTempFolder(theFolder, tmpPath)) != noErr )
00200     {
00201         cvs_err(_i18n("Unable to locate the preferences folder (error %d) !\n"), err);
00202         return 0L;
00203     }
00204 #endif /* !TARGET_OS_MAC */
00205 #if qUnix
00206     tmpPath = "/tmp";
00207 #endif
00208
00209     struct stat sb;
00210     if( stat(tmpPath, &sb) == -1 || !S_ISDIR(sb.st_mode) )
00211     {
00212         cvs_err(_i18n("Unable to access '%s' (error %d) !\n"), (const char*)tmpPath, errno);
00213         return false;
00214     }
00215
00216     if( !tmpPath.endsWith(kPathDelimiter) )
00217         tmpPath << kPathDelimiter;
00218
00219     int maxtry = 10000;
00220     while( true )
00221     {
00222         UStr name;
00223
00224         {
00225             char filename[MAX_PATH];
00226
00227             sprintf(filename, "%s%d%s", (const char*)prf, count++, (const char*)ext);
00228             name = filename;
00229         }
00230
00231         NormalizeFileName(name);
00232         file = tmpPath;
00233         file << name;
00234
00235         if( stat(file, &sb) == -1 && errno == ENOENT )
00236         {
00237             if( create )
00238             {
00239                 FILE* stream = fopen(file, "w");
00240                 if( stream )
00241                 {
00242                     fclose(stream);
00243                 }
00244             }
00245
00246             return true;
00247         }
00248
00249         if( maxtry-- == 0 )
00250         {
00251             cvs_err(_i18n("Time out to access '%s' !\n"), (const char*)tmpPath);
00252             break;
00253         }
00254     }
00255
00256     return false;
00257 }
00258
00265 void GetExtension(const char* file, UStr& base, UStr& ext)
00266 {
00267     const char* tmp = strrchr(file, '.');
00268
00269     if( tmp == 0L )
00270     {
00271         ext = "";
00272         base = file;
00273     }
00274     else
00275     {
00276         ext = tmp + 1;
00277 //      UStr(file).substr( 0, tmp - file, base); // strange ??
00278         base = UStr(file).substr( 0, tmp - file); // strange ??
00279     }
00280 }
00281
00289 bool GetEnvValue(const char* cmd, const char* key, UStr& value)
00290 {
00291     const char* tmp = strstr(cmd, key);
00292     if( tmp == 0L )
00293         return false;
00294
00295     tmp = strchr(tmp, '=');
00296     if( tmp == 0L )
00297         return false;
00298
00299     tmp++;
00300
00301     const char* tmp2 = strchr(tmp, '&');
00302     if( tmp2 == 0L )
00303         value = tmp;
00304     else
00305         value.set(tmp, tmp2 - tmp);
00306
00307     return true;
00308 }
00309
00316 int StringToArgv(const char* cmdLine, char** argv)
00317 {
00318     int argc = 0;
00319
00320     char Quote = '\0';              /*  Contains the quote character if we are inside "" or '', or \0 otherwise */
00321     const char* walker1 = cmdLine;  /*  walker1 traverses the original command line */
00322     char* walker2;                  /*  walker2 traverses the parsed copy of the commandline */
00323     char theChar;                   /*  theChar is the character we are currently parsing */
00324     char arguments[MAX_CMD_LEN];    /*  Will contain a parsed copy of the command line */
00325
00326     /* Copy into arguments */
00327     walker2 = arguments;
00328
00329     /* Parse command line to \0 */
00330     while( (theChar = *walker1++) != '\0' )
00331     {
00332         /* Skip leading space before an argument */
00333         if( theChar == ' ' )
00334             continue;
00335
00336         /* Set argv to point to the space where we copy the next argument */
00337         argv [argc++] = walker2;
00338
00339         /* If we filled argv, skip the rest */
00340         if( argc > MAX_ARGS)
00341         {
00342             argc--;
00343             break;
00344         }
00345
00346         do
00347         {
00348             /* Parse an argument skip \s */
00349             if( theChar == '\\' && *walker1++ )
00350             {
00351                 theChar = *walker1++;
00352             }
00353             else
00354             {
00355                 /* When we find a quote... */
00356                 if( theChar == '"' || theChar == '\'' )
00357                 {
00358                     /* If we are not inside quotes already, */
00359                     if( Quote == '\0' )
00360                     {
00361                         /* Remember we are inside quotes now */
00362                         Quote = theChar;
00363
00364                         /* Go to the next character */
00365                         continue;
00366                     }
00367
00368                     /* If we are already inside that kind of quotes */
00369                     if( theChar == Quote )
00370                     {
00371                         /* Close quotes */
00372                         Quote = '\0';
00373
00374                         /* Go to the next character */
00375                         continue;
00376                     }
00377                 }
00378             }
00379
00380             /* Copy the character into args */
00381             *walker2++ = theChar;
00382
00383             /* Repeat until we reach the end of arguments or we reach a space that is not inside quotes */
00384         }while( (*walker1 != '\0') && (((theChar = *walker1++) != ' ') || (Quote != '\0')) );
00385
00386         /* Null-terminate the last argument */
00387         *walker2++ = 0;
00388     }
00389
00390     return argc;
00391 }
00392
00393 #if defined(WIN32) || defined(qUnix)
00394
00401 void FlatenSubFolders(UStr& tmpf)
00402 {
00403     tmpf.replace( kPathDelimiter, '.');
00404 }
00405
00406 #elif TARGET_OS_MAC
00407 void FlatenSubFolders(UStr& tmpf)
00408 {
00409     char *tmp;
00410     if((tmp = strrchr(tmpf, kPathDelimiter)) != NULL)
00411     {
00412         UStr newStr(++tmp);
00413         tmpf = newStr;
00414     }
00415 }
00416 #else
00417 #define FlatenSubFolders(tmpf) // no-op on other platforms
00418 #endif
00419
00425 UStr& NormalizeFileName(UStr& fileName)
00426 {
00427     fileName.replace('*', '_');
00428     fileName.replace('?', '_');
00429     fileName.replace(':', '_');
00430     fileName.replace('/', '_');
00431     fileName.replace('\\', '_');
00432     fileName.replace('"', '_');
00433     fileName.replace('$', '_');
00434
00435     return fileName;
00436 }
00437
00444 void StrSafeCopy(char* buffer, const char* value, const int bufferSize)
00445 {
00446     if( value && *value )
00447     {
00448         strncpy(buffer, value, bufferSize);
00449     }
00450     else
00451     {
00452         *buffer = 0;
00453     }
00454 }
00455
00462 int StrOrdICmp(const char* s1, const char* s2)
00463 {
00464     if( int rc = stricmp(s1, s2) )
00465         return rc;
00466
00467     return strcmp(s1, s2);
00468 }
00469
00476 int StrPathCmp(const char* s1, const char* s2)
00477 {
00478     CStr str1(s1);
00479     CStr str2(s2);
00480
00481     str1.rtrim(kPathDelimiter);
00482     str2.rtrim(kPathDelimiter);
00483
00484 #ifdef WIN32
00485     return stricmp(str1.c_str(), str2.c_str());
00486 #else
00487     return strcmp(str1.c_str(), str2.c_str());
00488 #endif
00489 }
00490
00492 // UPStr
00493
00494 UPStr::~UPStr()
00495 {
00496     clear();
00497 }
00498
00502 void UPStr::clear(void)
00503 {
00504     if( m_str )
00505     {
00506         free(m_str);
00507         m_str = 0L;
00508     }
00509 }
00510
00512 UPStr& UPStr::operator=(const char* newstr)
00513 {
00514     if( newstr == 0L )
00515         newstr = "";
00516
00517     size_t l = strlen(newstr);
00518     if( l > kMaxChar )
00519         l = kMaxChar;
00520
00521     char* newvalue = (char*)malloc((l + 2) * sizeof(char));
00522     if(newvalue == 0L)
00523         UTHROW(std::bad_alloc());
00524
00525     strncpy(newvalue + 1, newstr, l);
00526     newvalue[0] = l;
00527     newvalue[l + 1] = '\0';
00528
00529     clear();
00530
00531     m_str = newvalue;
00532
00533     return *this;
00534 }
00535
00537 UPStr& UPStr::operator=(const unsigned char* newstr)
00538 {
00539     if( newstr == 0L )
00540         newstr = (unsigned char*)"";
00541
00542     int l = newstr[0];
00543     char* newvalue = (char*)malloc((l + 2) * sizeof(char));
00544     if( newvalue == 0L )
00545         UTHROW(std::bad_alloc());
00546
00547     memcpy(newvalue + 1, (char*)newstr + 1, l * sizeof(char));
00548     newvalue[0] = l;
00549     newvalue[l + 1] = '\0';
00550
00551     clear();
00552
00553     m_str = newvalue;
00554
00555     return *this;
00556 }
00557
00559 UPStr& UPStr::operator=(const UPStr& newstr)
00560 {
00561     *this = (const char*)newstr;
00562     return *this;
00563 }
00564
00566 UPStr& UPStr::set(const char* buf, unsigned int len)
00567 {
00568     clear();
00569
00570     if( len == 0 )
00571     {
00572         *this = "";
00573         return *this;
00574     }
00575
00576     if( len > kMaxChar )
00577         len = kMaxChar;
00578
00579     m_str = (char*)malloc((len + 2) * sizeof(char));
00580     if( m_str == 0L )
00581     {
00582         UAppConsole("Impossible to allocate %d bytes !\n", (len + 2) * sizeof(char));
00583         return *this;
00584     }
00585
00586     memcpy(m_str + 1, buf, len * sizeof(char));
00587     m_str[0] = len;
00588     m_str[len + 1] = '\0';
00589
00590     return *this;
00591 }
00592
00599 UPStr& UPStr::replace(char which, char bywhich)
00600 {
00601     if( !empty() )
00602     {
00603         char* buf = m_str + 1;
00604         while( *buf )
00605         {
00606             if( *buf == which )
00607                 *buf++ = bywhich;
00608             else
00609                 buf++;
00610         }
00611     }
00612
00613     return *this;
00614 }
00615
00617 UPStr& UPStr::operator<<(const char* addToStr)
00618 {
00619     if( addToStr == 0L )
00620         return *this;
00621
00622     if( m_str == 0L )
00623     {
00624         *this = addToStr;
00625         return *this;
00626     }
00627
00628     size_t len = strlen(addToStr);
00629     unsigned curlen = length();
00630
00631     if( len + length() > kMaxChar )
00632         len = kMaxChar - length();
00633
00634     if( len == 0 )
00635         return *this;
00636
00637     m_str = (char*)realloc(m_str, (len + curlen + 2) * sizeof(char));
00638     memcpy(m_str + curlen + 1, addToStr, len * sizeof(char));
00639     m_str[0] = len + curlen;
00640     m_str[len + curlen + 1] = '\0';
00641
00642     return *this;
00643 }
00644
00646 UPStr& UPStr::operator<<(char addToStr)
00647 {
00648     char astr[2] = {'\0', '\0'};
00649     astr[0] = addToStr;
00650     return *this << astr;
00651 }
00652
00654 UPStr& UPStr::operator<<(int addToStr)
00655 {
00656     char astr[50];
00657     sprintf(astr, "%d", addToStr);
00658     return *this << astr;
00659 }
00660
00662 // UStr
00663
00664 UStr::~UStr()
00665 {
00666     clear();
00667 }
00668
00672 void UStr::clear(void)
00673 {
00674     if( m_str )
00675     {
00676         free(m_str);
00677         m_str = 0L;
00678     }
00679 }
00680
00682 UStr& UStr::operator=(const char* newstr)
00683 {
00684     if( newstr == 0L )
00685         newstr = "";
00686
00687     int l = strlen(newstr);
00688     char* newvalue = (char*)malloc((l + 1) * sizeof(char));
00689     if( newvalue == 0L )
00690         UTHROW(std::bad_alloc());
00691
00692     strcpy(newvalue, newstr);
00693
00694     clear();
00695
00696     m_str = newvalue;
00697
00698     return *this;
00699 }
00700
00702 UStr& UStr::operator=(const unsigned char* newstr)
00703 {
00704     if( newstr == 0L )
00705         newstr = (unsigned char*)"";
00706
00707     int l = newstr[0];
00708     char* newvalue = (char*)malloc((l + 1) * sizeof(char));
00709     if( newvalue == 0L )
00710         UTHROW(std::bad_alloc());
00711
00712     memcpy(newvalue, newstr + 1, l * sizeof(char));
00713     newvalue[l] = '\0';
00714
00715     clear();
00716
00717     m_str = newvalue;
00718
00719     return *this;
00720 }
00721
00723 UStr& UStr::operator=(const UStr& newstr)
00724 {
00725     *this = (const char*)newstr;
00726
00727     return *this;
00728 }
00729
00731 UStr& UStr::set(const char* buf, unsigned int len)
00732 {
00733     clear();
00734
00735     if( len == 0 )
00736         return *this;
00737
00738     m_str = (char*)malloc((len + 1) * sizeof(char));
00739     if( m_str == 0L )
00740     {
00741         UAppConsole("Impossible to allocate %d bytes !\n", (len + 1) * sizeof(char));
00742         return *this;
00743     }
00744
00745     memcpy(m_str, buf, len * sizeof(char));
00746     m_str[len] = '\0';
00747
00748     return *this;
00749 }
00750
00757 UStr& UStr::replace(char which, char bywhich)
00758 {
00759     if( !empty() )
00760     {
00761         char* buf = m_str;
00762         while( *buf )
00763         {
00764             if( *buf == which )
00765                 *buf++ = bywhich;
00766             else
00767                 buf++;
00768         }
00769     }
00770
00771     return *this;
00772 }
00773
00775 UStr& UStr::operator<<(const char *addToStr)
00776 {
00777     if( addToStr == 0L )
00778         return *this;
00779
00780     if( m_str == 0L )
00781     {
00782         *this = addToStr;
00783         return *this;
00784     }
00785
00786     unsigned int len = strlen(addToStr);
00787     if( len == 0 )
00788         return *this;
00789
00790     unsigned int curlen = length();
00791     char* newstr = (char*)malloc((len + curlen + 1) * sizeof(char));
00792     if( newstr == 0L )
00793         UTHROW(std::bad_alloc());
00794
00795     memcpy(newstr, m_str, curlen * sizeof(char));
00796     memcpy(newstr + curlen, addToStr, len * sizeof(char));
00797     newstr[len + curlen] = '\0';
00798
00799     clear();
00800
00801     m_str = newstr;
00802
00803     return *this;
00804 }
00805
00807 UStr& UStr::operator<<(char addToStr)
00808 {
00809     char astr[2] = {'\0', '\0'};
00810     astr[0] = addToStr;
00811
00812     return *this << astr;
00813 }
00814
00816 UStr& UStr::operator<<(int addToStr)
00817 {
00818     char astr[50];
00819     sprintf(astr, "%d", addToStr);
00820
00821     return *this << astr;
00822 }
00823
00829 int UStr::find(const char* thestr) const
00830 {
00831     if( thestr != NULL && !empty() )
00832     {
00833         char* buf;
00834         buf = strstr(m_str, thestr);
00835
00836         if( buf != NULL )
00837             return buf - m_str;
00838     }
00839
00840     return 0;
00841 }
00842
00848 int UStr::find(char thechar) const
00849 {
00850     if( !empty() )
00851     {
00852         char* buf;
00853         buf = strchr(m_str, thechar);
00854
00855         if( buf != NULL )
00856             return buf - m_str;
00857     }
00858
00859     return 0;
00860 }
00861
00867 int UStr::rfind(const char* thestr) const
00868 {
00869     if( thestr != NULL && !empty() )
00870     {
00871         char* buf = m_str;
00872         char* last_buf = NULL;
00873
00874         while( buf )
00875         {
00876             last_buf = buf;
00877             buf++;
00878
00879             buf = strstr(buf, thestr);
00880         }
00881
00882         if( last_buf != NULL )
00883             return last_buf - m_str;
00884     }
00885
00886     return 0;
00887 }
00888
00894 int UStr::rfind(char thechar) const
00895 {
00896     if( !empty() )
00897     {
00898         char* buf;
00899         buf = strrchr(m_str, thechar);
00900
00901         if( buf != NULL )
00902             return buf - m_str;
00903     }
00904
00905     return 0;
00906 }
00907
00908
00909 #if 0
00910
00916 char* UStr::substr(int idx, int len) const
00917 {
00918     char* newvalue = (char*)malloc((len + 1) * sizeof(char));
00919
00920     if( newvalue == 0L )
00921         UTHROW(std::bad_alloc());
00922
00923     for(int i = 0; i < len; i++)
00924     {
00925         newvalue[i] = m_str[i+idx];
00926     }
00927
00928     newvalue[len] = '\0';
00929
00930     return newvalue;
00931 }
00932 #endif
00933
00940 UStr UStr::substr(int idx, int len) const
00941 {
00942     UStr rs;
00943
00944     if( !empty() )
00945     {
00946         int l = strlen (m_str);
00947
00948         if( idx < l )
00949         {
00950             rs.set(&m_str[idx], (idx + len < l) ? len : (l - idx));
00951         }
00952     }
00953
00954     return rs;
00955 }
00956
00962 UStr& UStr::trim(char c)
00963 {
00964     if( !empty() )
00965     {
00966         const char *p = m_str;
00967
00968         while( *p && (*p == c))
00969             ++p;
00970
00971         if( p != m_str)
00972             *this = p;
00973     }
00974
00975     return *this;
00976 }
00977
00983 UStr& UStr::rtrim(char c)
00984 {
00985     if( !empty() )
00986     {
00987         char* p = m_str + strlen(m_str);
00988         for( ; p != m_str; --p)
00989         {
00990             if( *(p-1) != c)
00991                 break;
00992         }
00993
00994         *p = '\0';
00995     }
00996
00997     return *this;
00998 }
00999
01000 UStr& UStr::rtrim (const char *MatchList)
01001 {
01002     if( !empty() )
01003     {
01004         char* p = m_str + strlen(m_str);
01005         for( ; p != m_str; --p)
01006         {
01007             if( !strchr( MatchList, *(p-1)) )
01008                 break;
01009         }
01010
01011         *p = '\0';
01012     }
01013
01014     return *this;
01015 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CUpdateOptions Member List

This is the complete list of members for CUpdateOptions, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CUpdateOptions(const MultiFiles *mf, const char *rev, const char *date, const char *keyword, const bool resetSticky, const bool caseSensitiveNames, const bool lastCheckinTime) | CUpdateOptions |
DoDataExchange(CDataExchange *pDX) | CUpdateOptions | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CUpdateOptions |
InitHelpID() | CUpdateOptions | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_browseTagButton | CUpdateOptions |
m_caseSensitiveNames | CUpdateOptions |
m_date | CUpdateOptions |
m_dateCombo | CUpdateOptions |
m_hasDate | CUpdateOptions |
m_hasDateCheck | CUpdateOptions |
m_hasRev | CUpdateOptions |
m_hasRevCheck | CUpdateOptions |
m_keyword | CUpdateOptions |
m_keywordCombo | CUpdateOptions |
m_keywordDescStatic | CUpdateOptions |
m_lastCheckinTime | CUpdateOptions |
m_match | CUpdateOptions |
m_matchCheck | CUpdateOptions |
m_mf | CUpdateOptions | [private]
m_resetSticky | CUpdateOptions |
m_resetStickyCheck | CUpdateOptions |
m_rev | CUpdateOptions |
m_revCombo | CUpdateOptions |
m_stdout | CUpdateOptions |
OnBrowseTag() | CUpdateOptions | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnDate() | CUpdateOptions | [protected]
OnDelsticky() | CUpdateOptions | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CUpdateOptions | [protected, virtual]
OnRev() | CUpdateOptions | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CUpdateOptions() | CUpdateOptions |

Generated on Sat Aug 7 22:57:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SmartComboBox.cpp Source File

common/SmartComboBox.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- December 2001
00019  */
00020
00021 // SmartComboBox.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "SmartComboBox.h"
00026
00027 #ifdef WIN32
00028 #   include "resource.h"
00029 #endif /* WIN32 */
00030
00031 #include "MultiString.h"
00032 #include "CvsAlert.h"
00033
00034 #ifdef WIN32
00035
00036 #ifdef _DEBUG
00037 #define new DEBUG_NEW
00038 #undef THIS_FILE
00039 static char THIS_FILE[] = __FILE__;
00040 #endif
00041
00042 #endif /* WIN32 */
00043
00045 USmartCombo::USmartCombo(int feature)
00046     : m_feature(feature)
00047 {
00048     m_pstrItems = NULL;
00049 }
00050
00052 USmartCombo::~USmartCombo()
00053 {
00054 }
00055
00061 void USmartCombo::SetFeature(int feature)
00062 {
00063     m_feature = feature;
00064     SetReadOnly(0 != (m_feature & USmartCombo::ReadOnly));
00065 }
00066
00072 bool USmartCombo::HasFeature(int feature) const
00073 {
00074     return (m_feature & feature) != 0;
00075 }
00076
00085 void USmartCombo::SetItems(CMString* pstrItems)
00086 {
00087     m_pstrItems = pstrItems;
00088     if( m_pstrItems )
00089     {
00090         m_feature |= USmartCombo::RemoveItems;
00091     }
00092     else
00093     {
00094         m_feature &= ~USmartCombo::RemoveItems;
00095     }
00096 }
00097
00103 CMString* USmartCombo::GetItems()
00104 {
00105     return m_pstrItems;
00106 }
00107
00113 void USmartCombo::SetKeyword(const char* keyword)
00114 {
00115     m_keyword = keyword;
00116     m_feature |= USmartCombo::Keyword;
00117 }
00118
00123 CStr USmartCombo::GetKeyword() const
00124 {
00125     return m_keyword;
00126 }
00127
00133 int USmartCombo::CalcDroppedWidth()
00134 {
00135     return 0;
00136 }
00137
00143 void USmartCombo::SetReadOnly(bool readOnly /*= true*/)
00144 {
00145     if( readOnly )
00146     {
00147         m_feature |= USmartCombo::ReadOnly;
00148     }
00149     else
00150     {
00151         m_feature &= ~USmartCombo::ReadOnly;
00152     }
00153 }
00154
00161 bool USmartCombo::RemoveItem(const char* strItem)
00162 {
00163     bool res = false;
00164
00165     std::string item("Item: ");
00166     item += strItem;
00167
00168     CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00169         _i18n("Do you want to remove item from the list?"), item.c_str(),
00170         BUTTONTITLE_YES, BUTTONTITLE_NO);
00171
00172     if( cvsAlert.ShowAlert() == kCvsAlertOKButton )
00173     {
00174         if( HasFeature(Feature::Keyword) )
00175         {
00176             CMKeyString* pMKeyString = dynamic_cast<CMKeyString*>(GetItems());
00177             if( pMKeyString )
00178             {
00179                 CStr mapValue;
00180                 pMKeyString->Concatenate(mapValue, GetKeyword(), strItem);
00181
00182                 res = m_pstrItems->Remove(mapValue);
00183             }
00184             else
00185             {
00186                 CKeyString* pKeyString = dynamic_cast<CKeyString*>(GetItems());
00187                 if( pKeyString )
00188                 {
00189                     std::vector<CStr> keyList;
00190
00191                     const std::vector<CStr>& list = pKeyString->GetList();
00192                     std::vector<CStr>::const_iterator i;
00193                     for(i = list.begin(); i != list.end(); ++i)
00194                     {
00195                         CStr key;
00196                         CStr value;
00197
00198                         pKeyString->Split((*i).c_str(), key, value);
00199                         if( key.compare(GetKeyword()) == 0 )
00200                         {
00201                             keyList.push_back(key);
00202                         }
00203                     }
00204
00205                     for(i = keyList.begin(); i != keyList.end() ; ++i)
00206                     {
00207                         CStr mapValue;
00208                         pKeyString->Concatenate(mapValue, *i, strItem);
00209                         res = m_pstrItems->Remove(mapValue);
00210                     }
00211                 }
00212             }
00213         }
00214         else
00215         {
00216             res = m_pstrItems->Remove(strItem);
00217         }
00218     }
00219
00220     return res;
00221 }
00222
00223 #ifdef WIN32
00224
00225 // CSmartComboBox
00226
00227 CSmartComboBox::CSmartComboBox(int feature /*= USmartCombo::DefaultFeature*/)
00228     : USmartCombo(feature), m_selectExact(true)
00229 {
00230 }
00231
00232 CSmartComboBox::~CSmartComboBox()
00233 {
00234 }
00235
00236
00237 BEGIN_MESSAGE_MAP(CSmartComboBox, CComboBox)
00238     //{{AFX_MSG_MAP(CSmartComboBox)
00239     ON_CONTROL_REFLECT(CBN_DROPDOWN, OnDropdown)
00240     //}}AFX_MSG_MAP
00241     ON_MESSAGE(CB_SELECTSTRING, OnSelectString)
00242
00243     ON_MESSAGE(WM_SMCB_SETFEATURE, OnSetFeature)
00244     ON_MESSAGE(WM_SMCB_SETITEMS, OnSetItems)
00245     ON_MESSAGE(WM_SMCB_SETREADONLY, OnSetReadOnly)
00246 END_MESSAGE_MAP()
00247
00249 // CSmartComboBox message handlers
00250
00252 void CSmartComboBox::OnDropdown()
00253 {
00254     if( HasFeature(USmartCombo::AutoDropWidth) )
00255     {
00256         SetDroppedWidth(CalcDroppedWidth());
00257     }
00258 }
00259
00261 LRESULT CSmartComboBox::OnSelectString(WPARAM wParam, LPARAM lParam)
00262 {
00263     LRESULT result = CB_ERR;
00264
00265     LRESULT findRes = SendMessage(m_selectExact ? CB_FINDSTRINGEXACT : CB_FINDSTRING, wParam, lParam);
00266     if( findRes != CB_ERR )
00267     {
00268         // Check whether there is a better match
00269         if( m_selectExact )
00270         {
00271             CString strLBText;
00272             for(int nIndex = 0; nIndex < GetCount(); nIndex++)
00273             {
00274                 GetLBText(nIndex, strLBText);
00275                 if( strLBText.Compare((LPCSTR)lParam) == 0 )
00276                 {
00277                     // Perfect match found
00278                     findRes = nIndex;
00279                     break;
00280                 }
00281             }
00282         }
00283
00284         result = SendMessage(CB_SETCURSEL, (WPARAM)findRes, 0);
00285     }
00286
00287     return result;
00288 }
00289
00291 BOOL CSmartComboBox::PreTranslateMessage(MSG* pMsg)
00292 {
00293     if( HasFeature(USmartCombo::RemoveItems) )
00294     {
00295         if( DelKeyTest(pMsg) )
00296         {
00297             return TRUE;
00298         }
00299     }
00300
00301     return CComboBox::PreTranslateMessage(pMsg);
00302 }
00303
00305 int CSmartComboBox::CalcDroppedWidth()
00306 {
00307     int maxSize = 0;
00308
00309     CClientDC ClientDC(this);
00310     int savedDC = ClientDC.SaveDC();
00311     ClientDC.SelectObject(GetFont());
00312
00313     CString strLBText;
00314     for(int nIndex = 0; nIndex < GetCount(); nIndex++)
00315     {
00316         GetLBText(nIndex, strLBText);
00317         CSize size = ClientDC.GetTextExtent(strLBText);
00318
00319         if( size.cx > maxSize )
00320         {
00321             maxSize = size.cx;
00322         }
00323     }
00324
00325     ClientDC.RestoreDC(savedDC);
00326
00327     maxSize += ::GetSystemMetrics(SM_CXVSCROLL) + 3*::GetSystemMetrics(SM_CXEDGE);
00328
00329     CRect rect;
00330     GetWindowRect(rect);
00331     maxSize = min(ClientDC.GetDeviceCaps(HORZRES) - rect.TopLeft().x, maxSize);
00332
00333     return maxSize;
00334 }
00335
00342 BOOL CSmartComboBox::DelKeyTest(MSG* pMsg)
00343 {
00344     CMString* pstrItems = GetItems();
00345     ASSERT(pstrItems != NULL);
00346
00347     BOOL bRes = FALSE;
00348
00349     if( WM_KEYDOWN == pMsg->message &&
00350         VK_DELETE == (int)pMsg->wParam &&
00351         pstrItems &&
00352         GetDroppedState() )
00353     {
00354         int sel = GetCurSel();
00355         if( CB_ERR < sel )
00356         {
00357             CString strItem;
00358             GetLBText(sel, strItem);
00359
00360             if( RemoveItem(strItem) )
00361             {
00362                 DeleteString(sel);
00363             }
00364
00365             //we have to prevent it going to another window
00366             bRes = TRUE;
00367         }
00368     }
00369
00370     return bRes;
00371 }
00372
00374 void CSmartComboBox::PreSubclassWindow()
00375 {
00376     if( HasFeature(USmartCombo::ReadOnly) )
00377     {
00378         SetReadOnly();
00379     }
00380
00381     CComboBox::PreSubclassWindow();
00382 }
00383
00389 void CSmartComboBox::SetReadOnly(bool readOnly /*= true*/)
00390 {
00391     USmartCombo::SetReadOnly(readOnly);
00392
00393     if( IsWindow(m_hWnd) )
00394     {
00395         CEdit* pEdit = (CEdit*)GetDlgItem(1001);
00396         if( pEdit && IsWindow(pEdit->m_hWnd) )
00397         {
00398             pEdit->SetReadOnly(readOnly);
00399         }
00400     }
00401 }
00402
00407 void CSmartComboBox::SetSelectExact(bool selectExact /*= true*/)
00408 {
00409     m_selectExact = selectExact;
00410 }
00411
00418 LRESULT CSmartComboBox::OnSetFeature(WPARAM wParam, LPARAM lParam)
00419 {
00420     SetFeature((int)wParam);
00421     return 0;
00422 }
00423
00430 LRESULT CSmartComboBox::OnSetItems(WPARAM wParam, LPARAM lParam)
00431 {
00432     SetItems((CMString*)wParam);
00433     return 0;
00434 }
00435
00442 LRESULT CSmartComboBox::OnSetReadOnly(WPARAM wParam, LPARAM lParam)
00443 {
00444     SetReadOnly(0 != wParam);
00445     return 0;
00446 }
00447
00448 #endif /* WIN32 */
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewColumn.h Source File

common/BrowseViewColumn.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 #ifndef __BROWSEVIEW_COLUMN_H__
00018 #define __BROWSEVIEW_COLUMN_H__
00019
00020 class EntnodeData;
00021
00022 #include "ustr.h"
00023
00025 #ifdef WIN32
00026 int CALLBACK _Compare(LPARAM data1, LPARAM data2, LPARAM data);
00027 #else
00028 int _Compare(void* data1, void* data2, void* data);
00029 #endif
00030
00031 #ifndef WIN32
00032
00033 struct LV_COLUMN
00034 {
00035     int width;
00036     const char* name;
00037 };
00038 #endif
00039
00041 class KoColumnContext
00042 {
00043 public:
00044     // Construction
00045     KoColumnContext(const char* path);
00046
00047 private:
00048     // Data members
00049     UStr m_path;
00051 public:
00052     // Interface
00053     const UStr& GetPath() const;
00054 };
00055
00057 class KiColumn
00058 {
00059 public:
00060     // Interface
00061
00066     virtual int GetColumnIndex() const = 0;
00067
00072     virtual void GetSetupData(LV_COLUMN* lvc) const = 0;
00073
00081     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const = 0;
00082
00090     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const = 0;
00091
00097     virtual bool IsDefaultAscending() const
00098     {
00099         return true;
00100     }
00101 };
00102
00104 class KiColumnModel
00105 {
00106 public:
00107     // Interface
00108
00114     virtual const KiColumn* GetAt(const int pos) const = 0;
00115
00121     virtual int GetType(const int pos) const = 0;
00122
00127     virtual int GetCount() const = 0;
00128
00129     virtual int GetColumn(const int type) const;
00130
00131     // Factory methods
00132     static KiColumnModel* GetRecursiveModel();
00133     static KiColumnModel* GetRegularModel();
00134 };
00135
00137 struct CSortParam
00138 {
00139     // Construction
00140     CSortParam(bool fAccendant, bool fGroupSubDir,
00141         const KiColumn* column, const KiColumn* columnAlt, KoColumnContext* context)
00142         : m_column(column), m_columnAlt(columnAlt), m_context(context),
00143         m_fAccendant(fAccendant), m_fGroupSubDir(fGroupSubDir)
00144     {
00145     }
00146
00147     // Data members
00148     const KiColumn* m_column;
00149     const KiColumn* m_columnAlt;
00150     KoColumnContext* m_context;
00152     bool m_fAccendant;
00153     bool m_fGroupSubDir;
00154 };
00155
00156 #endif
00157 // __BROWSEVIEW_COLUMN_H__
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMonthCalCtrl Member List

This is the complete list of members for CCJMonthCalCtrl, including all inherited members.

CCJMonthCalCtrl() | CCJMonthCalCtrl |
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CCJMonthCalCtrl |
Create(DWORD dwStyle, const POINT &pt, CWnd *pParentWnd, UINT nID) | CCJMonthCalCtrl |
GetColor(int nRegion) const | CCJMonthCalCtrl |
GetCurSel(LPSYSTEMTIME pDateTime) const | CCJMonthCalCtrl |
GetCurSel(CTime &refDateTime) const | CCJMonthCalCtrl |
GetCurSel(COleDateTime &refDateTime) const | CCJMonthCalCtrl |
GetFirstDayOfWeek(BOOL *pbLocal=NULL) const | CCJMonthCalCtrl |
GetMaxSelCount() const | CCJMonthCalCtrl |
GetMinReqRect(RECT *pRect) const | CCJMonthCalCtrl |
GetMonthDelta() const | CCJMonthCalCtrl |
GetMonthRange(COleDateTime &refMinRange, COleDateTime &refMaxRange, DWORD dwFlags) const | CCJMonthCalCtrl |
GetMonthRange(CTime &refMinRange, CTime &refMaxRange, DWORD dwFlags) const | CCJMonthCalCtrl |
GetMonthRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange, DWORD dwFlags) const | CCJMonthCalCtrl |
GetRange(COleDateTime *pMinRange, COleDateTime *pMaxRange) const | CCJMonthCalCtrl |
GetRange(CTime *pMinRange, CTime *pMaxRange) const | CCJMonthCalCtrl |
GetRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const | CCJMonthCalCtrl |
GetSelRange(COleDateTime &refMinRange, COleDateTime &refMaxRange) const | CCJMonthCalCtrl |
GetSelRange(CTime &refMinRange, CTime &refMaxRange) const | CCJMonthCalCtrl |
GetSelRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const | CCJMonthCalCtrl |
GetToday(CTime &refTime) const | CCJMonthCalCtrl |
GetToday(COleDateTime &refDateTime) const | CCJMonthCalCtrl |
GetToday(LPSYSTEMTIME pDateTime) const | CCJMonthCalCtrl |
HitTest(PMCHITTESTINFO pMCHitTest) | CCJMonthCalCtrl |
SetColor(int nRegion, COLORREF ref) | CCJMonthCalCtrl |
SetCurSel(const LPSYSTEMTIME pDateTime) | CCJMonthCalCtrl |
SetCurSel(const CTime &refDateTime) | CCJMonthCalCtrl |
SetCurSel(const COleDateTime &refDateTime) | CCJMonthCalCtrl |
SetDayState(int nMonths, LPMONTHDAYSTATE pStates) | CCJMonthCalCtrl |
SetFirstDayOfWeek(int iDay, int *lpnOld=NULL) | CCJMonthCalCtrl |
SetMaxSelCount(int nMax) | CCJMonthCalCtrl |
SetMonthDelta(int iDelta) | CCJMonthCalCtrl |
SetRange(const COleDateTime *pMinRange, const COleDateTime *pMaxRange) | CCJMonthCalCtrl |
SetRange(const CTime *pMinRange, const CTime *pMaxRange) | CCJMonthCalCtrl |
SetRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange) | CCJMonthCalCtrl |
SetSelRange(const COleDateTime &pMinRange, const COleDateTime &pMaxRange) | CCJMonthCalCtrl |
SetSelRange(const CTime &pMinRange, const CTime &pMaxRange) | CCJMonthCalCtrl |
SetSelRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange) | CCJMonthCalCtrl |
SetToday(const COleDateTime &refDateTime) | CCJMonthCalCtrl |
SetToday(const CTime *pDateTime) | CCJMonthCalCtrl |
SetToday(const LPSYSTEMTIME pDateTime) | CCJMonthCalCtrl |
SizeMinReq(BOOL bRepaint=TRUE) | CCJMonthCalCtrl |
~CCJMonthCalCtrl() | CCJMonthCalCtrl | [virtual]

Generated on Sat Aug 7 22:49:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFrame.cpp Source File

common/UCvsFrame.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #if qGTK
00028 #   include <gtk/gtk.h>
00029 #endif
00030
00031 #include "UCvsFrame.h"
00032 #include "UCvsApp.h"
00033 #include "UCvsCommands.h"
00034 #include "UCvsConsole.h"
00035 #include "UCvsFolders.h"
00036 #include "UCvsFiles.h"
00037 #include "UCvsToolbar.h"
00038 #include "CvsAlert.h"
00039 #include "PromptFiles.h"
00040 #include "CvsPrefs.h"
00041 #include "AppConsole.h"
00042 #include "CvsCommands.h"
00043 #include "TclGlue.h"
00044 #include "MacrosSetup.h"
00045 #include "GetPrefs.h"
00046 #include "UCvsDialogs.h"
00047 #include "BrowseViewHandlers.h"
00048 #include "AboutDlg.h"
00049 #include "MultiString.h"
00050 #ifdef USE_PYTHON
00051 #   include "PythonGlue.h"
00052 #endif
00053
00054 UIMPLEMENT_DYNAMIC(UCvsFrame, UWidget)
00055
00056 UBEGIN_MESSAGE_MAP(UCvsFrame, UWidget)
00057     ON_UUPDATECMD_RANGE(cmdABOUT, cmdABOUT, UCvsFrame::OnCmdUIAnytime)
00058     ON_UUPDATECMD_RANGE(cmdCREDITS, cmdCOPYRIGHTS, UCvsFrame::OnCmdUIAnytime)
00059     ON_UUPDATECMD_RANGE(UCvsFrame::kDirCombo, UCvsFrame::kBrowserPopup, UCvsFrame::OnCmdUIAnytime)
00060     ON_UUPDATECMD(cmdEXIT, UCvsFrame::OnCmdUIQuit)
00061     ON_UUPDATECMD_RANGE(cmdPREFERENCES, cmdPREFERENCES, UCvsFrame::OnCmdUIAnytime)
00062     ON_UUPDATECMD(cmdSTOPCVS, UCvsFrame::OnCmdUIStopcvs)
00063     ON_UUPDATECMD(cmdRTAGCREATE, UCvsFrame::OnCmdUICvsCmd)
00064     ON_UUPDATECMD(cmdOPEN, UCvsFrame::OnCmdUICvsCmd)
00065     ON_UUPDATECMD(cmdSAVESETTINGS, UCvsFrame::OnCmdUICvsCmd)
00066     ON_UUPDATECMD(cmdIGNORE, UCvsFrame::OnCmdUIViewIgnored)
00067     ON_UUPDATECMD(cmdVIEW_FILEMASK, UCvsFrame::OnCmdUIFilterMask)
00068     ON_UUPDATECMD(cmdVIEW_ADDED, UCvsFrame::OnCmdUIViewAdded)
00069     ON_UUPDATECMD(cmdVIEW_MODIFIED, UCvsFrame::OnCmdUIViewModified)
00070     ON_UUPDATECMD(cmdVIEW_CONFLICT, UCvsFrame::OnCmdUIViewConflict)
00071     ON_UUPDATECMD(cmdVIEW_MISSING, UCvsFrame::OnCmdUIViewMissing)
00072     ON_UUPDATECMD(cmdVIEW_UNKNOWN, UCvsFrame::OnCmdUIViewUnknown)
00073     ON_UUPDATECMD(cmdVIEW_REMOVED, UCvsFrame::OnCmdUIViewRemoved)
00074     ON_UUPDATECMD(cmdVIEW_CHANGED, UCvsFrame::OnCmdUIViewChanged)
00075     ON_UUPDATECMD(cmdHIDE_UNKNOWN, UCvsFrame::OnCmdUIHideUnknown)
00076     ON_UUPDATECMD(cmdRELOAD, UCvsFrame::OnCmdUIReload)
00077     ON_UUPDATECMD(cmdINIT, UCvsFrame::OnCmdUICvsCmd)
00078     ON_UUPDATECMD(cmdRTAGDELETE, UCvsFrame::OnCmdUICvsCmd)
00079     ON_UUPDATECMD(cmdRTAGBRANCH, UCvsFrame::OnCmdUICvsCmd)
00080     ON_UUPDATECMD(cmdCMDLINE, UCvsFrame::OnCmdUICvsCmd)
00081     ON_UUPDATECMD(cmdLOGIN, UCvsFrame::OnCmdUICvsCmd)
00082     ON_UUPDATECMD(cmdLOGOUT, UCvsFrame::OnCmdUICvsCmd)
00083 #ifdef USE_PYTHON
00084     ON_UUPDATECMD(cmdUSE_TCLSHELL, UCvsFrame::OnCmdUIUseTclShell)
00085     ON_UUPDATECMD(cmdUSE_PYSHELL, UCvsFrame::OnCmdUIUsePyShell)
00086     ON_UUPDATECMD_RANGE(cmdPyMACROS, cmdPyMACROSEND, UCvsFrame::OnCmdUIMacroAdmin)
00087 #else
00088     ON_UUPDATECMD_RANGE(cmdMACROADMIN, cmdMACROADMINEND, UCvsFrame::OnCmdUIMacroAdmin)
00089 #endif
00090     ON_COMBO_SEL(UCvsFrame::kDirCombo, UCvsFrame::OnComboSelDir)
00091     ON_COMBO_SEL(cmdVIEW_FILEMASK, UCvsFrame::OnCmdReload)
00092     ON_UCOMMAND(cmdVIEW_FILEMASK, UCvsFrame::OnCmdReload)
00093     ON_UCOMMAND(UCvsFrame::kBrowserPopup, UCvsFrame::OnBrowserPopup)
00094     ON_UCOMMAND(cmdOPEN, UCvsFrame::OnBrowserPopup)
00095     ON_UCOMMAND(cmdCOPYRIGHTS, UCvsFrame::OnCopyrights)
00096     ON_UCOMMAND(cmdCREDITS, UCvsFrame::OnCredits)
00097     ON_UCOMMAND(cmdABOUT, UCvsFrame::OnAbout)
00098     ON_UCOMMAND(cmdEXIT, UCvsFrame::OnQuit)
00099     ON_UCOMMAND(cmdPREFERENCES, UCvsFrame::OnCmdPreferences)
00100     ON_UCOMMAND(cmdSAVESETTINGS, UCvsFrame::OnCmdSaveSettings)
00101     ON_UCOMMAND(cmdRTAGCREATE, UCvsFrame::OnCmdRtagNew)
00102     ON_UCOMMAND(cmdRTAGDELETE, UCvsFrame::OnCmdRtagDelete)
00103     ON_UCOMMAND(cmdRTAGBRANCH, UCvsFrame::OnCmdRtagBranch)
00104     ON_UCOMMAND(cmdCMDLINE, UCvsFrame::OnCmdCmdline)
00105     ON_UCOMMAND(cmdLOGIN, UCvsFrame::OnCmdLogin)
00106     ON_UCOMMAND(cmdLOGOUT, UCvsFrame::OnCmdLogout)
00107     ON_UCOMMAND(cmdSTOPCVS, UCvsFrame::OnCmdStopcvs)
00108     ON_UCOMMAND(cmdINIT, UCvsFrame::OnCmdInit)
00109     ON_UCOMMAND(cmdIGNORE, UCvsFrame::OnCmdIgnore)
00110     ON_UCOMMAND(cmdVIEW_ADDED, UCvsFrame::OnViewAdded)
00111     ON_UCOMMAND(cmdVIEW_MODIFIED, UCvsFrame::OnViewModified)
00112     ON_UCOMMAND(cmdVIEW_CONFLICT, UCvsFrame::OnViewConflict)
00113     ON_UCOMMAND(cmdVIEW_MISSING, UCvsFrame::OnViewMissing)
00114     ON_UCOMMAND(cmdVIEW_UNKNOWN, UCvsFrame::OnViewUnknown)
00115     ON_UCOMMAND(cmdVIEW_REMOVED, UCvsFrame::OnViewRemoved)
00116     ON_UCOMMAND(cmdVIEW_CHANGED, UCvsFrame::OnViewChanged)
00117     ON_UCOMMAND(cmdHIDE_UNKNOWN, UCvsFrame::OnHideUnknown)
00118     ON_UCOMMAND(cmdRELOAD, UCvsFrame::OnCmdReload)
00119 #ifdef USE_PYTHON
00120     ON_UCOMMAND(cmdUSE_TCLSHELL, UCvsFrame::OnCmdUseTclShell)
00121     ON_UCOMMAND(cmdUSE_PYSHELL, UCvsFrame::OnCmdUsePyShell)
00122     ON_UCOMMAND_RANGE(cmdPyMACROS, cmdPyMACROSEND, UCvsFrame::OnCmdMacroAdmin)
00123 #else
00124     ON_UCOMMAND_RANGE(cmdMACROADMIN, cmdMACROADMINEND, UCvsFrame::OnCmdMacroAdmin)
00125 #endif
00126     ON_UCREATE(UCvsFrame)
00127     ON_UDESTROY(UCvsFrame)
00128 UEND_MESSAGE_MAP()
00129
00130 #if 0
00131     //}}AFX_MSG_MAP
00132     // Enable default OLE container implementation
00133     //ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, CDocument::OnUpdatePasteMenu)
00134     ON_COMMAND_EX_RANGE(ID_MACRO_ADMIN, ID_MACRO_ADMIN + 99, OnMacroAdmin)
00135     ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00136     ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00137 #endif
00138
00139 #if qGTK
00140 # define BLOCK_UPDATE_UI {if(InUpdateUI) return 0;}
00141 # define START_UPDATE_UI {InUpdateUI = true;}
00142 # define END_UPDATE_UI {InUpdateUI = false;}
00143 #else
00144 # define BLOCK_UPDATE_UI
00145 # define START_UPDATE_UI
00146 # define END_UPDATE_UI
00147 #endif
00148
00149 CKeyString filterFileMasks(NUM_FILEMASKS, "P_OldFilterFileMasks");
00150
00151 UCvsFrame::UCvsFrame() : UWidget(kUCvsFrameID), InUpdateUI(false)
00152 {
00153 }
00154
00155 UCvsFrame::~UCvsFrame()
00156 {
00157 }
00158
00159 void onIgnoreChanged(CObject *obj)
00160 {
00161     ((UCvsFrame *)obj)->OnCmdIgnore();
00162 }
00163
00164 void UCvsFrame::OnCreate()
00165 {
00166     if( UCvsApp* app = UCvsApp::gApp )
00167         app->GetIgnoreModel()->GetNotificationManager()->CheckIn((CObject*)this, onIgnoreChanged);
00168 }
00169
00170 void UCvsFrame::OnDestroy(void)
00171 {
00172 #if qGTK
00173     gtk_main_quit();
00174 #endif /* qGTK */
00175
00176     if( UCvsApp* app = UCvsApp::gApp )
00177         app->GetIgnoreModel()->GetNotificationManager()->CheckOut((CObject*)this);
00178     delete this;
00179 }
00180
00181 void UCvsFrame::OnComboSelDir(int pos, const char *txt)
00182 {
00183     UCvsApp::gApp->GetBrowserView()->ResetBrowser(txt, true);
00184 }
00185
00186 int UCvsFrame::OnBrowserPopup(void)
00187 {
00188     CStr newPath;
00189     if( BrowserGetDirectory(_i18n("Select a folder to open with the browser"), newPath) )
00190     {
00191         UCvsApp::gApp->GetBrowserView()->ResetBrowser(newPath, true);
00192     }
00193
00194     return 0;
00195 }
00196
00197 int UCvsFrame::OnQuit(void)
00198 {
00199     if(UCvsApp::gApp->IsCvsRunning()) {
00200         CvsAlert al(kCvsAlertNoteIcon, _i18n("Cvs is currently running."),
00201                  _i18n("Stop CVS first before exiting."), BUTTONTITLE_OK, NULL);
00202
00203         al.ShowAlert(kCvsAlertOKButton);
00204
00205         return 0;
00206     }
00207
00208     gCvsPrefs.save();
00209
00210 #if qGTK
00211     gtk_main_quit();
00212 #endif /* qGTK */
00213
00214     return 0;
00215 }
00216
00217 void UCvsFrame::OnCmdUIQuit(UCmdUI *pCmdUI)
00218 {
00219     pCmdUI->Enable(true);
00220 }
00221
00222 void UCvsFrame::OnCmdUIAnytime(int cmd, UCmdUI *pCmdUI)
00223 {
00224     pCmdUI->Enable(!UCvsApp::gApp->IsCvsRunning());
00225 }
00226
00227 int UCvsFrame::OnAbout()
00228 {
00229     AboutDialog();
00230     return 0;
00231 }
00232
00233 int UCvsFrame::OnCopyrights()
00234 {
00235     const char *appName = UCvsApp::gApp->GetAppName();
00236
00237     cvs_out(_i18n("\nBoth %s and CVS are distributed under the terms of\n"
00238               "the GNU General Public License (GPL).\n\n"), appName);
00239     cvs_out(_i18n("* %s : maintained by Alexandre Parenteau (aubonbeurre@hotmail.com)\n"), appName);
00240     cvs_out(_i18n("* CVS : Copyright © 1989-1998 Brian Berliner, david d `zoo' zuhn,\n"));
00241     cvs_out(_i18n("        Jeff Polk, and other authors\n"));
00242 #ifdef macintosh
00243     printf("* MacCVS : Mike Ladwig, Matthias Neeracher, Alexandre Parenteau\n");
00244     printf("* GUSI : Copyright © 1992-1997 Matthias Neeracher\n");
00245     printf("* Waste : Copyright © 1993-1998 Marco Piovanelli\n");
00246     printf("* CWASTEEdit : Copyright © 1995-1997 Timothy Paustian\n");
00247     printf(_i18n("* ABalloon : Freeware of James W. Walker (jwwalker@kagi.com)\n"));
00248     printf("* Metrowerks Standard Library, PowerPlant & CodeWarrior :\n");
00249     printf("    Copyright © 1996-1997 Metrowerks Inc.\n");
00250     printf("* MPW, MoreFiles : Copyright © Apple Computer Inc.\n");
00251 #endif
00252 #ifdef WIN32
00253     cvs_out(_i18n("* WinCvs documentation : Copyright © 1999 Don Harper <don@lamrc.com>.\n"));
00254     cvs_out(_i18n("* CJLIB : Copyright © 1998-99 Kirk Stowell <kstowell@codejockeys.com>\n"));
00255     cvs_out(_i18n("* MFC : Copyright © 1992-1997 Microsoft Corporation\n"));
00256 #endif
00257     cvs_out(_i18n("* Kerberos : Copyright © 1997 Massachusetts Institute of Technology\n"));
00258     cvs_out(_i18n("* TCL : Copyright © Sun Microsystems Inc.\n"));
00259     cvs_out(_i18n("\nSome others copyrights may apply, check the source code for details.\n"));
00260     return 0;
00261 }
00262
00263 int UCvsFrame::OnCredits()
00264 {
00265     const char *appName = UCvsApp::gApp->GetAppName();
00266     const char *appVers = UCvsApp::gApp->GetAppVersion();
00267
00268 #ifndef macintosh
00269     cvs_out(_i18n("\n%s %s - Client/Local\n"), appName, appVers);
00270 #else
00271     cvs_out(_i18n("\n%s %s - Client\n"), appName, appVers);
00272 #endif
00273     cvs_out(_i18n("%s is maintained by Alexandre Parenteau\n"), appName);
00274     cvs_out(_i18n("- WinCvs/MacCvs/gcvs page : http://www.wincvs.org or http://cvsgui.sourceforge.net/\n"));
00275     cvs_out(_i18n("- cvs page : http://www.cvshome.org\n"));
00276 #ifdef WIN32
00277     cvs_out(_i18n("- WinCvs documentation : Don Harper <don@lamrc.com>.\n"));
00278     cvs_out(_i18n("- WinHelp cvs documentation : Norbert Klamann.\n"));
00279 #endif
00280 #ifdef macintosh
00281     printf(_i18n("- Mac port :\n"));
00282     printf("\t* Mike Ladwig <mike@twinpeaks.prc.com>\n");
00283     printf("\t* Matthias Neeracher <neeri@iis.ee.ethz.ch>\n");
00284     printf("\t* Alexandre Parenteau <aubonbeurre@hotmail.com>\n");
00285     printf(_i18n("- With contributions of :\n");
00286     printf("\t* Miro Jurisic <meeroh@mit.edu> (Kerberos)\n");
00287     printf("\t* Aleks Totic <atotic@netscape.com> (AppleSingle)\n");
00288     printf("\t* Jocelyn Houle <houlejo@IRO.UMontreal.CA> (Help balloons)\n");
00289 #endif
00290     cvs_out(_i18n("- Special thanks to :\n"));
00291     cvs_out(_i18n("\t* Gary Bringhurst from C3D Digital who gives me time, resources,\n"
00292               "\t  help and ideas for doing this project (http://www.3d.com)\n"));
00293     cvs_out(_i18n("\t* The Freeware community for providing cvs, Linux, Perl, GTK, gcc\n"
00294               "\t  and so many others valuables tools\n"));
00295     cvs_out(_i18n("\t* The users of the CvsGui project (WinCvs, MacCvs, gcvs) who have\n"
00296               "\t  defined all the functionnalities and help every day to enhance it\n"));
00297     cvs_out(_i18n("- Cvs contributors :\n"));
00298     cvs_out(_i18n("\t* Too many to be listed here, see the 'ChangeLog' instead !\n"));
00299     return 0;
00300 }
00301
00302 int UCvsFrame::OnCmdPreferences(void)
00303 {
00304     UCvsConsole* console = UCvsApp::gApp->GetConsole();
00305     CompatGetPrefs();
00306
00307     if(console != 0l)
00308         console->setFont(gCvsPrefs.ConsoleFont());
00309     return 0;
00310 }
00311
00312 int UCvsFrame::OnCmdSaveSettings(void)
00313 {
00314     UCvsFolders *browser = UCvsApp::gApp->GetBrowserView();
00315     if(browser != 0L && browser->GetRoot() != 0L)
00316         AskCreatePersistentSettings(browser->GetRoot());
00317     return 0;
00318 }
00319
00320 int UCvsFrame::OnCmdRtagNew(void)
00321 {
00322   KoRtagCreateHandler handler;
00323     CvsCmdRtag(handler, kTagCreate);
00324
00325     return 0;
00326 }
00327
00328 int UCvsFrame::OnCmdRtagDelete(void)
00329 {
00330   KoRtagDeleteHandler handler;
00331     CvsCmdRtag(handler, kTagDelete);
00332     return 0;
00333 }
00334
00335 int UCvsFrame::OnCmdRtagBranch(void)
00336 {
00337   KoRtagBranchHandler handler;
00338     CvsCmdRtag(handler, kTagBranch);
00339     return 0;
00340 }
00341
00342 int UCvsFrame::OnCmdCmdline(void)
00343 {
00344   KoCommandLineHandler handler;
00345     CvsCmdCommandLine(handler);
00346     return 0;
00347 }
00348
00349 int UCvsFrame::OnCmdLogin(void)
00350 {
00351     CvsCmdLogin();
00352     return 0;
00353 }
00354
00355 int UCvsFrame::OnCmdLogout(void)
00356 {
00357     CvsCmdLogout();
00358     return 0;
00359 }
00360
00361 int UCvsFrame::OnCmdStopcvs(void)
00362 {
00363     UCvsApp::gApp->SetCvsStopping(true);
00364     if(UCvsApp::gApp->GetCvsProcess() != 0L && cvs_process_is_active(UCvsApp::gApp->GetCvsProcess()))
00365     {
00366         cvs_process_stop(UCvsApp::gApp->GetCvsProcess());
00367         cvs_out(_i18n("***** CVS stopped on user request !!! *****\n\n"));
00368     }
00369
00370     return 0;
00371 }
00372
00373 int UCvsFrame::OnCmdInit(void)
00374 {
00375     CvsCmdInit();
00376     return 0;
00377 }
00378
00379 int UCvsFrame::OnCmdMacroAdmin(int cmd)
00380 {
00381 #ifndef USE_PYTHON
00382     CMacroEntry & entry = gMacrosAdmin.entries[cmd - cmdMACROADMIN];
00383     CvsCmdMacrosAdmin(entry.path);
00384 #else
00385     PyDoPython(cmd);
00386 #endif
00387     return 0;
00388 }
00389
00390 void UCvsFrame::OnCmdUIStopcvs(UCmdUI *pCmdUI)
00391 {
00392     pCmdUI->Enable(UCvsApp::gApp->IsCvsRunning() && !UCvsApp::gApp->IsCvsStopping());
00393 }
00394
00395 void UCvsFrame::OnCmdUICvsCmd(UCmdUI *pCmdUI)
00396 {
00397     pCmdUI->Enable(IsAppEnabled());
00398 }
00399
00400 void UCvsFrame::OnCmdUIMacroAdmin(int cmd, UCmdUI *pCmdUI)
00401 {
00402 #ifndef USE_PYTHON
00403     pCmdUI->Enable(IsAppEnabled() && CTcl_Interp::IsAvail());
00404 #else
00405     if(!IsAppEnabled())
00406     {
00407         pCmdUI->Enable(false);
00408         return;
00409     }
00410     if( !PyIsUICacheValid() )
00411     {
00412         int nItem = -1;
00413         while((nItem = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL, UMAKEINT(kUMainWidget, nItem), 0L)) != -1)
00414         {
00415             EntnodeData *data;
00416             bool deleteData = false;
00417             UEventSendMessage(GetWidID(), EV_LIST_ROWGETDATA, UMAKEINT(kUMainWidget, nItem), &data);
00418
00419             PyAppendCache(data);
00420         }
00421     } {
00422
00423     UCmdUI ucmdui(pCmdUI->m_nID);
00424     ucmdui.pCmdUI = pCmdUI;
00425     PyDoCmdUI(&ucmdui);
00426     }
00427 #endif
00428 }
00429
00430 int UCvsFrame::OnViewIgnored()
00431 {
00432     BLOCK_UPDATE_UI
00433     m_ignore.ToggleIgnore();
00434     m_ignore.GetNotificationManager()->NotifyAll();
00435     OnFilterMaskEntered();
00436
00437     return 0;
00438 }
00439
00440 void UCvsFrame::OnCmdUIViewIgnored(UCmdUI* pCmdUI)
00441 {
00442     START_UPDATE_UI
00443     pCmdUI->Enable(IsAppEnabled());
00444     pCmdUI->Check(m_ignore.IsShowIgnored());
00445     END_UPDATE_UI
00446 }
00447
00448 void UCvsFrame::OnCmdUIFilterMask(UCmdUI* pCmdUI)
00449 {
00450     START_UPDATE_UI
00451     pCmdUI->Enable(IsAppEnabled());
00452     END_UPDATE_UI
00453 }
00454
00455 bool UCvsFrame::FreshenFileMask(void)
00456 {
00457     UStr strFileMask;
00458     UCvsToolbar* toolbar = (UCvsToolbar *)::UEventQueryWidget(kUCvsFilterToolbarID);
00459
00460     UEventSendMessage(toolbar->GetWidID(), EV_GETTEXT, cmdVIEW_FILEMASK, &strFileMask);
00461
00462     filterFileMasks.Insert(strFileMask);
00463
00464     ::DoDataExchange(true, toolbar->GetWidID(), cmdVIEW_FILEMASK, filterFileMasks);
00465
00466     return m_filter.SetMask(EntnodeData::kName, strFileMask);
00467 }
00468
00469 int UCvsFrame::OnViewModified()
00470 {
00471     BLOCK_UPDATE_UI
00472     m_filter.ToggleModified();
00473     FreshenFileMask();
00474     m_filter.GetNotificationManager()->NotifyAll();
00475
00476     return 0;
00477 }
00478
00479 void UCvsFrame::OnCmdUIViewModified(UCmdUI* pCmdUI)
00480 {
00481     START_UPDATE_UI
00482     pCmdUI->Enable(IsAppEnabled());
00483     pCmdUI->Check(m_filter.IsModified());
00484     END_UPDATE_UI
00485 }
00486
00487 void UCvsFrame::OnFilterMaskEntered()
00488 {
00489 //  BLOCK_UPDATE_UI
00490     if (FreshenFileMask())
00491     {
00492         m_filter.GetNotificationManager()->NotifyAll();
00493     }
00494 }
00495
00496 int UCvsFrame::OnViewConflict()
00497 {
00498     BLOCK_UPDATE_UI
00499     m_filter.ToggleConflict();
00500     FreshenFileMask();
00501     m_filter.GetNotificationManager()->NotifyAll();
00502
00503     return 0;
00504 }
00505
00506 void UCvsFrame::OnCmdUIViewConflict(UCmdUI* pCmdUI)
00507 {
00508     START_UPDATE_UI
00509     pCmdUI->Enable(IsAppEnabled());
00510     pCmdUI->Check(m_filter.IsConflict());
00511     END_UPDATE_UI
00512 }
00513
00514 int UCvsFrame::OnViewUnknown()
00515 {
00516     BLOCK_UPDATE_UI
00517     m_filter.ToggleUnknown();
00518     FreshenFileMask();
00519     m_filter.GetNotificationManager()->NotifyAll();
00520
00521     return 0;
00522 }
00523
00524 void UCvsFrame::OnCmdUIViewUnknown(UCmdUI* pCmdUI)
00525 {
00526     START_UPDATE_UI
00527     pCmdUI->Enable(IsAppEnabled());
00528     pCmdUI->Check(m_filter.IsUnknown());
00529     END_UPDATE_UI
00530 }
00531
00532 int UCvsFrame::OnViewMissing()
00533 {
00534     BLOCK_UPDATE_UI
00535     m_filter.ToggleMissing();
00536     FreshenFileMask();
00537     m_filter.GetNotificationManager()->NotifyAll();
00538
00539     return 0;
00540 }
00541
00542 void UCvsFrame::OnCmdUIViewMissing(UCmdUI* pCmdUI)
00543 {
00544     START_UPDATE_UI
00545     pCmdUI->Enable(IsAppEnabled());
00546     pCmdUI->Check(m_filter.IsMissing());
00547     END_UPDATE_UI
00548 }
00549
00550 int UCvsFrame::OnViewAdded()
00551 {
00552     BLOCK_UPDATE_UI
00553     m_filter.ToggleAdded();
00554     FreshenFileMask();
00555     m_filter.GetNotificationManager()->NotifyAll();
00556
00557     return 0;
00558 }
00559
00560 void UCvsFrame::OnCmdUIViewAdded(UCmdUI* pCmdUI)
00561 {
00562     START_UPDATE_UI
00563     pCmdUI->Enable(IsAppEnabled());
00564     pCmdUI->Check(m_filter.IsAdded());
00565     END_UPDATE_UI
00566 }
00567
00568 void UCvsFrame::OnCmdUIViewRemoved(UCmdUI* pCmdUI)
00569 {
00570     START_UPDATE_UI
00571     pCmdUI->Enable(IsAppEnabled());
00572     pCmdUI->Check(m_filter.IsRemoved());
00573     END_UPDATE_UI
00574 }
00575
00576 int UCvsFrame::OnViewRemoved()
00577 {
00578     BLOCK_UPDATE_UI
00579     m_filter.ToggleRemoved();
00580     FreshenFileMask();
00581     m_filter.GetNotificationManager()->NotifyAll();
00582
00583     return 0;
00584 }
00585
00586 int UCvsFrame::OnViewChanged()
00587 {
00588     BLOCK_UPDATE_UI
00589     m_filter.ToggleChanged();
00590     FreshenFileMask();
00591     m_filter.GetNotificationManager()->NotifyAll();
00592
00593     return 0;
00594 }
00595
00596 void UCvsFrame::OnCmdUIViewChanged(UCmdUI* pCmdUI)
00597 {
00598     START_UPDATE_UI
00599     pCmdUI->Enable(IsAppEnabled());
00600     pCmdUI->Check(m_filter.IsChanged());
00601     END_UPDATE_UI
00602 }
00603
00604 int UCvsFrame::OnHideUnknown()
00605 {
00606     BLOCK_UPDATE_UI
00607     m_filter.ToggleHideUnknown();
00608     FreshenFileMask();
00609     m_filter.GetNotificationManager()->NotifyAll();
00610
00611     return 0;
00612 }
00613
00614 void UCvsFrame::OnCmdUIHideUnknown(UCmdUI* pCmdUI)
00615 {
00616     START_UPDATE_UI
00617     pCmdUI->Enable(IsAppEnabled() && m_filter.IsDefaultMode());
00618     pCmdUI->Check(m_filter.IsHideUnknown());
00619     END_UPDATE_UI
00620 }
00621
00622 int UCvsFrame::OnCmdReload()
00623 {
00624     BLOCK_UPDATE_UI
00625     FreshenFileMask();
00626     m_filter.GetNotificationManager()->NotifyAll();
00627
00628     return 0;
00629 }
00630
00631 void UCvsFrame::OnCmdUIReload(UCmdUI *pCmdUI)
00632 {
00633     START_UPDATE_UI
00634     pCmdUI->Enable(IsAppEnabled());
00635     END_UPDATE_UI
00636 }
00637
00638 #ifdef USE_PYTHON
00639 int UCvsFrame::OnCmdUsePyShell()
00640 {
00641     BLOCK_UPDATE_UI
00642     if( gCvsPrefs.GetUseShell() == SHELL_PYTHON)
00643         return 0;
00644     gCvsPrefs.SetUseShell(SHELL_PYTHON);
00645     cvs_out("Switching the shell to Python...\n");
00646
00647     UCvsApp* app = UCvsApp::gApp;
00648     if( app )
00649     {
00650         app->RestartScriptEngine();
00651     }
00652
00653     return 0;
00654 }
00655
00656 void UCvsFrame::OnCmdUIUsePyShell(UCmdUI * pCmdUI)
00657 {
00658     START_UPDATE_UI
00659     pCmdUI->Enable(CPython_Interp::IsAvail());
00660     pCmdUI->Check(gCvsPrefs.GetUseShell() == SHELL_PYTHON);
00661     END_UPDATE_UI
00662 }
00663
00664 int UCvsFrame::OnCmdUseTclShell()
00665 {
00666     BLOCK_UPDATE_UI
00667     if( gCvsPrefs.GetUseShell() == SHELL_TCL)
00668         return 0;
00669     gCvsPrefs.SetUseShell(SHELL_TCL);
00670     cvs_out("Switching the shell to TCL...\n");
00671
00672     UCvsApp* app = UCvsApp::gApp;
00673     if( app )
00674     {
00675         app->RestartScriptEngine();
00676
00677     }
00678
00679     return 0;
00680 }
00681
00682 void UCvsFrame::OnCmdUIUseTclShell(UCmdUI * pCmdUI)
00683 {
00684     START_UPDATE_UI
00685     pCmdUI->Enable(CTcl_Interp::IsAvail());
00686     pCmdUI->Check(gCvsPrefs.GetUseShell() == SHELL_TCL);
00687     END_UPDATE_UI
00688 }
00689 #endif
00690
00691 int UCvsFrame::OnCmdIgnore(void)
00692 {
00693     BLOCK_UPDATE_UI
00694     KoIgnoreModel *m_ignore = (KoIgnoreModel *)UCvsApp::gApp->GetIgnoreModel();
00695     m_ignore->ToggleIgnore();
00696
00697     UCvsApp::gApp->GetBrowserView()->ResetView(true, true);
00698     return 0;
00699 }
00700
00701 void UCvsFrame::OnCmdUIIgnore(UCmdUI *pCmdUI)
00702 {
00703     START_UPDATE_UI
00704     KoIgnoreModel *m_ignore = (KoIgnoreModel *)UCvsApp::gApp->GetIgnoreModel();
00705     pCmdUI->Enable(IsAppEnabled());
00706     pCmdUI->Check(m_ignore->IsShowIgnored());
00707     END_UPDATE_UI
00708 }
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/SortHeaderCtrl.cpp Source File

WinCvs/SortHeaderCtrl.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : V.Antonevich <v_antonevich@hotmail.com>
00019  */
00020
00021 #include "stdafx.h"
00022 #include "wincvs.h"
00023 #include "SortHeaderCtrl.h"
00024 #include "AppConsole.h"
00025 #include "FilterSelectionDlg.h"
00026 #include "BrowseFileView.h"
00027 #include "BrowseViewColumn.h"
00028
00030 #define GETITEM_BUFFER_SIZE 256
00031
00032 // Default filter change timeout
00033 #define DEFAULT_FILTERCHANGETIMEOUT (5 * 60 * 1000)
00034
00036 // CSortHeaderCtrl
00037
00038 IMPLEMENT_DYNAMIC(CSortHeaderCtrl, CHeaderCtrl)
00039
00040 BEGIN_MESSAGE_MAP(CSortHeaderCtrl, CHeaderCtrl)
00041     //{{AFX_MSG_MAP(CSortHeaderCtrl)
00042     ON_WM_KILLFOCUS()
00043     ON_WM_KEYUP()
00044     //}}AFX_MSG_MAP
00045     ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomdraw)
00046     ON_NOTIFY_REFLECT(HDN_FILTERCHANGE, OnFilterChanged)
00047     ON_NOTIFY_REFLECT(HDN_FILTERBTNCLICK, OnFilterBtnClicked)
00048 END_MESSAGE_MAP()
00049
00050 CSortHeaderCtrl::CSortHeaderCtrl()
00051 {
00052     m_bSortAsc = TRUE;
00053     m_nSortCol = -1;
00054     m_bHeaderFilters = FALSE;
00055
00056     ResetLastFilter();
00057 }
00058
00059 CSortHeaderCtrl::~CSortHeaderCtrl()
00060 {
00061 }
00062
00069 int CSortHeaderCtrl::SetSortImage(const int nCol, const BOOL bAsc)
00070 {
00071     const int nPrevCol = m_nSortCol;
00072
00073     m_nSortCol = nCol;
00074     m_bSortAsc = bAsc;
00075
00076     // Invalidate header control so that it gets redrawn
00077     Invalidate();
00078
00079     return nPrevCol;
00080 }
00081
00091 void CSortHeaderCtrl::DrawItem(const UINT itemID, const RECT rcItem,
00092                                const BOOL bSelected, const BOOL bSortCol, const BOOL bSortAsc,
00093                                const HDC hDC)
00094 {
00095     CDC dc;
00096
00097     dc.Attach(hDC);
00098
00099     // Get the column rect
00100     CRect rcLabel(rcItem);
00101
00102     // Save DC
00103     int nSavedDC = dc.SaveDC();
00104
00105     // Set clipping region to limit drawing within column
00106     CRgn rgn;
00107     rgn.CreateRectRgnIndirect(&rcLabel);
00108     dc.SelectObject(&rgn);
00109     rgn.DeleteObject();
00110
00111     // Draw the header "button"
00112     dc.DrawFrameControl(&rcLabel, DFC_BUTTON, DFCS_BUTTONPUSH | (bSelected ? DFCS_PUSHED : 0));
00113
00114     // Labels are offset by a certain amount
00115     // This offset is related to the width of a space character
00116     int offset = dc.GetTextExtent(_T(" "), 1).cx * 2;
00117
00118     // Get the column text and format
00119     TCHAR buf[GETITEM_BUFFER_SIZE];
00120     HD_ITEM hditem;
00121
00122     hditem.mask = HDI_TEXT | HDI_FORMAT;
00123     hditem.pszText = buf;
00124     hditem.cchTextMax = GETITEM_BUFFER_SIZE - 1;
00125
00126     GetItem(itemID, &hditem);
00127
00128     // Determine format for drawing column label
00129     UINT uFormat = DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER | DT_END_ELLIPSIS;
00130
00131     if( hditem.fmt & HDF_CENTER)
00132     {
00133         uFormat |= DT_CENTER;
00134     }
00135     else if( hditem.fmt & HDF_RIGHT)
00136     {
00137         uFormat |= DT_RIGHT;
00138     }
00139     else
00140     {
00141         uFormat |= DT_LEFT;
00142     }
00143
00144     // Adjust the rect if the mouse button is pressed on it
00145     if( bSelected )
00146     {
00147         rcLabel.left++;
00148         rcLabel.top += 2;
00149         rcLabel.right++;
00150     }
00151
00152     // Adjust the rect further if Sort arrow is to be displayed
00153     if( bSortCol )
00154     {
00155         rcLabel.right -= 3 * offset;
00156     }
00157
00158     rcLabel.left += offset;
00159     rcLabel.right -= offset;
00160
00161     // Draw column label
00162     if( rcLabel.left < rcLabel.right )
00163     {
00164         const int prevBkMode = dc.SetBkMode(TRANSPARENT);
00165         const COLORREF prevTextColor = dc.SetTextColor(GetSysColor(COLOR_BTNTEXT));
00166
00167         dc.DrawText(buf, -1, rcLabel, uFormat);
00168
00169         dc.SetBkMode(prevBkMode);
00170         dc.SetTextColor(prevTextColor);
00171     }
00172
00173     // Draw the Sort arrow
00174     if( bSortCol )
00175     {
00176         CRect rcIcon(rcItem);
00177
00178         // Set up pens to use for drawing the triangle
00179         CPen penLight(PS_SOLID, 1, GetSysColor(COLOR_3DHILIGHT));
00180         CPen penShadow(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW));
00181         CPen* pOldPen = dc.SelectObject(&penLight);
00182
00183         offset = (rcIcon.bottom - rcIcon.top) / 4;
00184
00185         if( bSortAsc )
00186         {
00187             // Draw triangle pointing downwards
00188             dc.MoveTo(rcIcon.right - offset-1, offset);
00189             dc.LineTo(rcIcon.right - 2*offset-1, rcIcon.bottom - offset);
00190             dc.MoveTo(rcIcon.right - 2*offset-2, rcIcon.bottom - offset);
00191
00192             dc.SelectObject( &penShadow );
00193             dc.LineTo(rcIcon.right - 3*offset-1, offset);
00194             dc.LineTo(rcIcon.right - offset-1, offset);
00195         }
00196         else
00197         {
00198             // Draw triangle pointing upwards
00199             dc.MoveTo(rcIcon.right - 2* offset, offset);
00200             dc.LineTo(rcIcon.right - offset, rcIcon.bottom - offset-1);
00201             dc.LineTo(rcIcon.right - 3*offset-2, rcIcon.bottom - offset-1);
00202             dc.MoveTo(rcIcon.right - 3*offset-1, rcIcon.bottom - offset-1);
00203
00204             dc.SelectObject(&penShadow);
00205             dc.LineTo(rcIcon.right - 2*offset, offset-1);
00206         }
00207
00208         // Restore the pen
00209         dc.SelectObject(pOldPen);
00210     }
00211
00212     // Restore dc
00213     dc.RestoreDC(nSavedDC);
00214
00215     // Detach the dc before returning
00216     dc.Detach();
00217 }
00218
00224 BOOL CSortHeaderCtrl::EnableHeaderFilters(const BOOL enable /*= TRUE*/)
00225 {
00226     const BOOL blnPrevEnable = m_bHeaderFilters;
00227
00228     if( enable != m_bHeaderFilters )
00229     {
00230         m_bHeaderFilters = enable;
00231
00232         if( m_bHeaderFilters )
00233         {
00234             ModifyStyle(0, HDS_FILTERBAR);
00235             SetFilterChangeTimeout(DEFAULT_FILTERCHANGETIMEOUT);
00236         }
00237         else
00238         {
00239             ModifyStyle(HDS_FILTERBAR, 0);
00240         }
00241
00242         Invalidate();
00243     }
00244
00245     return blnPrevEnable;
00246 }
00247
00249 void CSortHeaderCtrl::OnCustomdraw(NMHDR* pNMHDR, LRESULT* pResult)
00250 {
00251     LPNMCUSTOMDRAW pNmcustomdraw = (LPNMCUSTOMDRAW)pNMHDR;
00252
00253     if( CDDS_ITEM & pNmcustomdraw->dwDrawStage )
00254     {
00255         if( (const int)pNmcustomdraw->dwItemSpec == m_nSortCol )
00256         {
00257             if( CDDS_PREPAINT & pNmcustomdraw->dwDrawStage )
00258             {
00259                 // Ask for the post-paint notification so we can draw sort indicator
00260                 *pResult = CDRF_NOTIFYPOSTPAINT;
00261                 return;
00262             }
00263             else if( CDDS_POSTPAINT & pNmcustomdraw->dwDrawStage )
00264             {
00265                 RECT rcItem = pNmcustomdraw->rc;
00266
00267                 if( m_bHeaderFilters )
00268                 {
00269                     // Reduce the size to assure filter bar is visible
00270                     rcItem.bottom = (rcItem.bottom - rcItem.top) / 2;
00271                 }
00272
00273                 DrawItem(pNmcustomdraw->dwItemSpec, rcItem,
00274                     pNmcustomdraw->uItemState & CDIS_SELECTED, TRUE, m_bSortAsc,
00275                     pNmcustomdraw->hdc);
00276             }
00277         }
00278     }
00279
00280     if( CDDS_PREPAINT == pNmcustomdraw->dwDrawStage )
00281     {
00282         // We want notifications for all items
00283         *pResult = CDRF_NOTIFYITEMDRAW;
00284         return;
00285     }
00286
00287     *pResult = 0;
00288 }
00289
00291 void CSortHeaderCtrl::OnFilterChanged(NMHDR* pNMHDR, LRESULT* pResult)
00292 {
00293     LPNMHEADER pNMHeader = (LPNMHEADER)pNMHDR;
00294
00295     CWnd* pFocusWnd = GetFocus();
00296     const bool hasFocus = pFocusWnd && pFocusWnd->GetParent() && (pFocusWnd->GetParent()->GetSafeHwnd() == GetSafeHwnd());
00297
00298     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00299     CBrowseFileView* pBrowseFileView = pApp->GetFileView();
00300
00301     if( pBrowseFileView )
00302     {
00303         CMString* prevFilter = GetPrevFilter(pBrowseFileView->GetColumnModel()->GetType(pNMHeader->iItem));
00304         if( prevFilter )
00305         {
00306             const CString strFilterText = GetFilterText(pNMHeader->iItem);
00307             if( !strFilterText.IsEmpty() )
00308             {
00309                 const bool overrideLast = hasFocus && pNMHeader->iItem == m_nLastFilterChanged;
00310                 if( overrideLast && !m_strLastInsertedFilterText.IsEmpty() )
00311                 {
00312                     prevFilter->Remove(m_strLastInsertedFilterText);
00313                 }
00314
00315                 prevFilter->Insert(strFilterText);
00316                 m_strLastInsertedFilterText = strFilterText;
00317             }
00318         }
00319     }
00320
00321     if( hasFocus )
00322     {
00323         m_nLastFilterChanged = pNMHeader->iItem;
00324     }
00325     else
00326     {
00327         ResetLastFilter();
00328     }
00329
00330     m_notificationManager.NotifyAll();
00331
00332     *pResult = 0;
00333 }
00334
00336 void CSortHeaderCtrl::OnFilterBtnClicked(NMHDR* pNMHDR, LRESULT* pResult)
00337 {
00338     LPNMHDFILTERBTNCLICK pNMBClick = (LPNMHDFILTERBTNCLICK)pNMHDR;
00339
00340     *pResult = 0;
00341
00342     CStr filterText = GetFilterText(pNMBClick->iItem);
00343     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00344     CBrowseFileView* pBrowseFileView = pApp->GetFileView();
00345
00346     if( pBrowseFileView &&
00347         CompatGetFilterSelection(pBrowseFileView->GetColumnModel()->GetType(pNMBClick->iItem), filterText) )
00348     {
00349         if( !filterText.empty() )
00350         {
00351             SetFilterText(pNMBClick->iItem, filterText.c_str());
00352             *pResult = TRUE;
00353         }
00354     }
00355 }
00356
00361 NotificationManager* CSortHeaderCtrl::GetNotificationManager()
00362 {
00363     return &m_notificationManager;
00364 }
00365
00371 CString CSortHeaderCtrl::GetFilterText(const int intItem)
00372 {
00373     TCHAR buffer[GETITEM_BUFFER_SIZE] = { 0 };
00374     strcpy(buffer, "");
00375
00376     if( intItem >= 0 && intItem < GetItemCount() )
00377     {
00378         HDITEM hdItem = { 0 };
00379         HDTEXTFILTER hdTextFilter = { 0 };
00380
00381         hdTextFilter.pszText = buffer;
00382         hdTextFilter.cchTextMax = GETITEM_BUFFER_SIZE - 1;
00383
00384         hdItem.mask = HDI_FILTER;
00385         hdItem.type = HDFT_ISSTRING;
00386         hdItem.pvFilter = &hdTextFilter;
00387
00388         if( !GetItem(intItem, &hdItem) )
00389         {
00390             // Copy an empty string just to be sure the return value is correct
00391             strcpy(buffer, "");
00392         }
00393     }
00394
00395     return buffer;
00396 }
00397
00404 BOOL CSortHeaderCtrl::SetFilterText(const int intItem, const char* text)
00405 {
00406     ASSERT(intItem >= 0 && intItem < GetItemCount()); //item out-of-bound
00407
00408     TCHAR buffer[GETITEM_BUFFER_SIZE] = { 0 };
00409     HDITEM hdItem = { 0 };
00410     HDTEXTFILTER hdTextFilter = { 0 };
00411
00412     hdTextFilter.pszText = buffer;
00413     hdTextFilter.cchTextMax = GETITEM_BUFFER_SIZE - 1;
00414
00415     hdItem.mask = HDI_FILTER;
00416     hdItem.type = HDFT_ISSTRING;
00417     hdItem.pvFilter = &hdTextFilter;
00418
00419     strncpy(buffer, text, hdTextFilter.cchTextMax);
00420
00421     return SetItem(intItem, &hdItem);
00422 }
00423
00428 void CSortHeaderCtrl::SetFilterChangeTimeout(const int nFilterChangeTimeout)
00429 {
00430     Header_SetFilterChangeTimeout(m_hWnd, nFilterChangeTimeout);
00431 }
00432
00434 void CSortHeaderCtrl::OnKillFocus(CWnd* pNewWnd)
00435 {
00436     CHeaderCtrl::OnKillFocus(pNewWnd);
00437
00438     ResetLastFilter();
00439 }
00440
00444 void CSortHeaderCtrl::ResetLastFilter()
00445 {
00446     m_nLastFilterChanged = -1;
00447     m_strLastInsertedFilterText.Empty();
00448 }
00449
00451 void CSortHeaderCtrl::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
00452 {
00453     if( VK_RETURN == nChar )
00454     {
00455         ResetLastFilter();
00456     }
00457
00458     CHeaderCtrl::OnKeyUp(nChar, nRepCnt, nFlags);
00459 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJTabCtrl Member List

This is the complete list of members for CCJTabCtrl, including all inherited members.

CCJTabCtrl() | CCJTabCtrl |
Create(CWnd *pParentWnd, UINT nID=AFX_IDC_TAB_CONTROL, DWORD dwStyle=WS_VISIBLE|WS_CHILD|TCS_BOTTOM|TCS_TOOLTIPS|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, const CRect &rect=CRect(0, 0, 0, 0)) | CCJTabCtrl | [virtual]
GetMenuID() | CCJTabCtrl | [virtual]
m_Font | CCJTabCtrl |
m_nPos | CCJTabCtrl |
m_popToolbarID | CCJTabCtrl |
m_popupMenu | CCJTabCtrl |
m_popupMenuID | CCJTabCtrl |
OnEraseBkgnd(CDC *pDC) | CCJTabCtrl | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJTabCtrl | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJTabCtrl | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJTabCtrl | [protected]
OnPaint() | CCJTabCtrl | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJTabCtrl | [protected]
SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0) | CCJTabCtrl | [virtual]
UpdateFont() | CCJTabCtrl | [virtual]
~CCJTabCtrl() | CCJTabCtrl | [virtual]

Generated on Sat Aug 7 22:50:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uconsole.cpp Source File

rf/uconsole.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #ifdef WIN32
00028 #   ifdef _DEBUG
00029 #       include <crtdbg.h>
00030 #   endif
00031 #endif
00032
00033 #if qMacAPP && qDebug
00034 #   include "Debug_AC.h"
00035 #endif
00036
00037 #include <stdio.h>
00038 #include <stdarg.h>
00039
00040 #include "uconsole.h"
00041
00042 void UAppConsole(const char *format, ...)
00043 {
00044     va_list args;
00045     char mess[1024] = {'\0'};
00046
00047     UASSERT(format != NULL);
00048
00049     va_start (args, format);
00050     vsprintf (mess, format, args);
00051     va_end (args);
00052
00053 #if qGTK
00054     g_warning(mess);
00055 #elif defined(qUnix)
00056 #elif qMacAPP
00057 #   if qDebug
00058     DebugWarning_AC(1, mess, __FILE__, __LINE__);
00059 #   endif
00060 #elif qMacPP
00061     SignalString_(mess);
00062 #elif defined(WIN32)
00063 #   ifdef _DEBUG
00064     _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, mess);
00065 #   endif
00066 #else
00067     (void)printf(mess);
00068     (void)fflush(stdout);
00069 #endif
00070 }
00071
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatTabCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJFlatTabCtrl.cpp

Go to the documentation of this file.
00001 // FlatTab.cpp : implementation file
00002 //
00003 // Copyright © 1999 Ian Brumby
00004 //
00005 // This source code may be used in compiled form in any way you desire.
00006 // Source file(s) may be redistributed unmodified by any means PROVIDING
00007 // they are not sold for profit without the authors expressed written consent,
00008 // and providing that this notice and the authors name and all copyright
00009 // notices remain intact.
00010 //
00011 // ==========================================================================
00012 // HISTORY:
00013 // ==========================================================================
00014 //          1.4     21 Jul 1999 - Initial release.
00015 //          1.5     30 Aug 1999 - Several enhancements by Phil Baxter
00016 //                  <Phil.Baxter@mrjinx.demon.co.uk>
00017 // ==========================================================================
00018
00019 // Excel uses FF_ROMAN and Font Height = ~(control's height - 4)
00020 // Excel draws its tabs right to left
00021 // Excel has 3DLIGHT highlighting on the left diagonal
00022 // Excel has home/end buttons
00023 // Excel's buttons change width as the control's height changes
00024 //
00026 /****************************************************************************
00027  *
00028  * $Date: 1999/11/30 21:45:49 $
00029  * $Revision: 1.1.1.3 $
00030  * $Archive: /CodeJock/CJLibrary/CJFlatTabCtrl.cpp $
00031  *
00032  * $History: CJFlatTabCtrl.cpp $
00033  *
00034  * *****************  Version 11  *****************
00035  * User: Kirk Stowell Date: 10/26/99   Time: 10:52p
00036  * Updated in $/CodeJock/CJLibrary
00037  * Fixed bug with flat tab where in some cases tabs were not completely
00038  * painted.
00039  *
00040  * *****************  Version 10  *****************
00041  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00042  * Updated in $/CodeJock/CJLibrary
00043  * Modified resource include for static builds.
00044  *
00045  * *****************  Version 9  *****************
00046  * User: Kirk Stowell Date: 10/24/99   Time: 12:15a
00047  * Updated in $/CodeJock/CJLibrary
00048  * Fixed minor bug with tab font creation.
00049  *
00050  * *****************  Version 8  *****************
00051  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00052  * Updated in $/CodeJock/CJLibrary
00053  * Fixed potential resource and memory leak problems.
00054  *
00055  * *****************  Version 7  *****************
00056  * User: Kirk Stowell Date: 10/14/99   Time: 11:37p
00057  * Updated in $/CodeJock/CJLibrary
00058  * Fixed bug with flat tab control that would have kept one from disabling
00059  * the l/r arrow buttons, which caused an exception to be thrown. Thanks
00060  * to Ted Crow [crowtc@surge.net] for help with this.
00061  *
00062  * *****************  Version 6  *****************
00063  * User: Kirk Stowell Date: 10/14/99   Time: 12:25p
00064  * Updated in $/CodeJock/CJLibrary
00065  * Added source control history to file header.
00066  *
00067  ***************************************************************************/
00069
00070 #include "stdafx.h"
00071 #include "CJResource.h"
00072 #include "CJFlatTabCtrl.h"
00073
00074 #ifdef _DEBUG
00075 #define new DEBUG_NEW
00076 #undef THIS_FILE
00077 static char THIS_FILE[] = __FILE__;
00078 #endif
00079
00081 // CCJFlatTabCtrl
00082
00083 CCJFlatTabCtrl::CCJFlatTabCtrl()
00084 {
00085     m_bHasArrows          = false;
00086     m_bHasHomeEnd         = false;
00087     m_bTabsOnBottom       = false;
00088     m_iCurSel             = -1;
00089     m_pLeftButton         = NULL;
00090     m_pRightButton        = NULL;
00091     m_pHomeButton         = NULL;
00092     m_pEndButton          = NULL;
00093     m_hLeftArrow          = NULL;
00094     m_hLeftArrowDisabled  = NULL;
00095     m_hRightArrow         = NULL;
00096     m_hRightArrowDisabled = NULL;
00097     m_hHomeArrow          = NULL;
00098     m_hHomeArrowDisabled  = NULL;
00099     m_hEndArrow           = NULL;
00100     m_hEndArrowDisabled   = NULL;
00101     m_iXOffset            = 0;
00102 }
00103
00104 CCJFlatTabCtrl::~CCJFlatTabCtrl()
00105 {
00106     _delete(m_pLeftButton);
00107     _delete(m_pRightButton);
00108     _delete(m_pHomeButton);
00109     _delete(m_pEndButton);
00110
00111     // free HENHMETAFILE handles.
00112     if(m_hLeftArrow) {
00113         ::DeleteEnhMetaFile(m_hLeftArrow);
00114     }
00115     if(m_hLeftArrowDisabled) {
00116         ::DeleteEnhMetaFile(m_hLeftArrowDisabled);
00117     }
00118     if(m_hRightArrow) {
00119         ::DeleteEnhMetaFile(m_hRightArrow);
00120     }
00121     if(m_hRightArrowDisabled) {
00122         ::DeleteEnhMetaFile(m_hRightArrowDisabled);
00123     }
00124     if(m_hHomeArrow) {
00125         ::DeleteEnhMetaFile(m_hHomeArrow);
00126     }
00127     if(m_hHomeArrowDisabled) {
00128         ::DeleteEnhMetaFile(m_hHomeArrowDisabled);
00129     }
00130     if(m_hEndArrow) {
00131         ::DeleteEnhMetaFile(m_hEndArrow);
00132     }
00133     if(m_hEndArrowDisabled) {
00134         ::DeleteEnhMetaFile(m_hEndArrowDisabled);
00135     }
00136     while(!m_TabList.IsEmpty()) {
00137         CString* pItem = m_TabList.RemoveTail();
00138         _delete(pItem);
00139     }
00140     while(!m_TabTipList.IsEmpty()) {
00141         CString* pItem = m_TabTipList.RemoveTail();
00142         _delete(pItem);
00143     }
00144
00145     // fix potential resource leak - KStowell - 10-21-99
00146     m_Font.DeleteObject();
00147     m_BoldFont.DeleteObject();
00148 }
00149
00150 void CCJFlatTabCtrl::CreateTabFont(const int iTabHeight)
00151 {
00152     int iHeight = -(iTabHeight - 6);
00153
00154     m_Font.DeleteObject();
00155     m_Font.CreateFont(iHeight, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
00156         OUT_STROKE_PRECIS, CLIP_STROKE_PRECIS, PROOF_QUALITY, FF_SWISS, NULL);
00157
00158     m_BoldFont.DeleteObject();
00159     m_BoldFont.CreateFont(iHeight, 0, 0, 0, FW_EXTRABOLD, FALSE, FALSE, FALSE, ANSI_CHARSET,
00160         OUT_STROKE_PRECIS, CLIP_STROKE_PRECIS, PROOF_QUALITY, FF_SWISS, NULL);
00161 }
00162
00163 int CCJFlatTabCtrl::GetTabWidth(const int nItem) const
00164 {
00165     CDC dc;
00166     dc.CreateCompatibleDC(NULL);
00167     CFont* pOldFont = dc.SelectObject((CFont*)&m_BoldFont);
00168     CSize size(dc.GetTextExtent(*m_TabList.GetAt(m_TabList.FindIndex(nItem))));
00169
00170     // fix potential resource leak - KStowell - 10-20-99.
00171     dc.SelectObject(pOldFont);
00172     dc.DeleteDC();
00173
00174     return size.cx + m_iClientHeight + (m_iClientHeight / 2);
00175 }
00176
00177 int CCJFlatTabCtrl::GetTotalTabWidth(void) const
00178 {
00179     int iWidth = 0;
00180     for (int i = 0; i < m_TabList.GetCount(); i++)
00181     {
00182         iWidth += GetTabWidth(i);
00183         if (i != m_TabList.GetCount()-1) {
00184             iWidth -= (m_iClientHeight / 2);
00185         }
00186     }
00187     return iWidth + 2;
00188 }
00189
00190 int CCJFlatTabCtrl::GetTotalArrowWidth(void) const
00191 {
00192     int iWidth = 1;
00193     if (m_bHasArrows)
00194         iWidth += 32;
00195     if (m_bHasHomeEnd)
00196         iWidth += 32;
00197     return iWidth;
00198 }
00199
00200 void CCJFlatTabCtrl::InvalidateTabs(void)
00201 {
00202     if (GetSafeHwnd())
00203     {
00204         // invalidate the visible tab area
00205         // to minimise flicker - don't erase the background
00206         CRect rcTabs;
00207
00208         rcTabs.left = GetTotalArrowWidth();
00209         rcTabs.top = 0;
00210         rcTabs.right = rcTabs.left + (m_iTotalTabWidth - m_iXOffset);
00211         rcTabs.bottom = m_iClientHeight;
00212         InvalidateRect(&rcTabs, false);
00213         // invalidate the blank area to the right of the tabs
00214         if (rcTabs.right < m_iClientWidth)
00215         {
00216             rcTabs.left = rcTabs.right;
00217             rcTabs.right = m_iClientWidth;
00218             InvalidateRect(&rcTabs, true);
00219         }
00220     }
00221 }
00222
00223 void CCJFlatTabCtrl::EnableButtons(void)
00224 {
00225     if (m_bHasArrows)  //TCC: ADDED to handle situations where ther are no arrows
00226     {
00227         m_pLeftButton->EnableWindow(m_iXOffset);
00228         if (m_iClientWidth + m_iXOffset < m_iTotalTabWidth + GetTotalArrowWidth() + 1)
00229             m_pRightButton->EnableWindow(true);
00230         else
00231             m_pRightButton->EnableWindow(false);
00232         if (m_bHasHomeEnd)
00233         {
00234             m_pHomeButton->EnableWindow(m_iXOffset);
00235             m_pEndButton->EnableWindow(m_pRightButton->IsWindowEnabled());
00236         }
00237     }
00238 }
00239
00240 int CCJFlatTabCtrl::DrawTab(CDC &dc, const int x, const int y, const int iHeight, bool bSelected, bool bBottom, LPCTSTR lpszTab) const
00241 {
00242     CFont* pOldFont = dc.SelectObject((CFont*)&m_BoldFont);
00243     CSize size(dc.GetTextExtent(lpszTab));
00244     CRect rcText;
00245     rcText.left = iHeight + x - 4;
00246     rcText.top = 2 + y;
00247     rcText.right = size.cx + iHeight + x - 4;
00248     rcText.bottom = size.cy + 2 + y;
00249
00250     int iHalf = iHeight / 2;
00251     int iWidth = iHeight + iHalf;
00252
00253     COLORREF crBack;
00254     COLORREF crFore;
00255     if (bSelected) {
00256         crBack = GetSysColor(COLOR_WINDOW);
00257         crFore = GetSysColor(COLOR_WINDOWTEXT);
00258     } else {
00259         crBack = GetSysColor(COLOR_3DFACE);
00260         crFore = GetSysColor(COLOR_BTNTEXT);
00261     }
00262
00263     CPen penOutline(PS_SOLID, 1, GetSysColor(COLOR_BTNTEXT));
00264     CPen penShadow(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW));
00265     CBrush brush;
00266     brush.CreateSolidBrush(crBack);
00267
00268     POINT points[4];
00269     points[0].x = x;                     points[0].y = iHeight + y - 1;
00270     points[1].x = iHalf + x;             points[1].y = y;
00271     points[2].x = size.cx + iHeight + x; points[2].y = y;
00272     points[3].x = size.cx + iWidth + x;  points[3].y = iHeight + y - 1;
00273
00274     if (bBottom) {
00275         // swap vertical coordinates
00276         points[0].y = points[1].y;
00277         points[2].y = points[3].y;
00278         points[1].y = points[2].y;
00279         points[3].y = points[0].y;
00280     }
00281
00282     CPen* pOldPen = dc.SelectObject(&penOutline);
00283     dc.SetBkColor(crBack);
00284     CBrush* pOldBrush = dc.SelectObject(&brush);
00285     dc.Polygon(points, 4);
00286     dc.SelectObject(bSelected ? (CFont*)&m_BoldFont : (CFont*)&m_Font);
00287     dc.SetTextColor(crFore);
00288     dc.DrawText(lpszTab, rcText, DT_CENTER);
00289     dc.SelectObject(&penShadow);
00290
00291     if (bSelected) {
00292         dc.MoveTo(iHalf + x + 1, points[1].y);
00293         dc.LineTo(size.cx + iHeight + x, points[1].y);
00294         CPen penBack(PS_SOLID, 1, crBack);
00295         dc.SelectObject(&penBack);
00296         dc.MoveTo(x + 1, points[0].y);
00297         dc.LineTo(size.cx + iWidth + x, points[0].y);
00298     } else {
00299         dc.MoveTo(iHalf + x + 1, points[1].y);
00300         dc.LineTo(size.cx + iHeight + x - 1, points[1].y);
00301         dc.LineTo(size.cx + iWidth + x - 1, points[0].y);
00302     }
00303
00304     // fix potential resource leak - KStowell - 10-21-99
00305     dc.SelectObject(pOldFont);
00306     dc.SelectObject(pOldPen);
00307     dc.SelectObject(pOldBrush);
00308     penOutline.DeleteObject();
00309     penShadow.DeleteObject();
00310     brush.DeleteObject();
00311
00312     return size.cx + iWidth;
00313 }
00314
00315 BOOL CCJFlatTabCtrl::InsertItem(const int nItem, LPCTSTR lpszItem)
00316 {
00317     if (nItem < 0 || nItem > m_TabList.GetCount())
00318         return -1;
00319
00320     // add tab to our list
00321     CString* pItem = new CString;
00322     ASSERT(pItem);
00323
00324     *pItem = lpszItem;
00325     m_TabList.AddTail(pItem);
00326
00327     // PGB - Add the tabs tip text to the list
00328
00329     CString* pTipItem = new CString;
00330     ASSERT(pTipItem);
00331
00332     *pTipItem = lpszItem;
00333     m_TabTipList.AddTail(pTipItem);
00334
00335     //
00336
00337     if (m_TabList.GetCount() == 1)
00338         m_iCurSel = 0;
00339
00340     m_iTotalTabWidth = GetTotalTabWidth();      // PGB - Recalculate the total tab width now we have added a new item
00341
00342     EnableButtons();
00343     InvalidateTabs();
00344
00345     return nItem;
00346 }
00347
00348 BOOL CCJFlatTabCtrl::DeleteItem(int nItem)
00349 {
00350     if (nItem < 0 || nItem >= m_TabList.GetCount())
00351         return FALSE;
00352
00353     POSITION pos = m_TabList.FindIndex(nItem);
00354     ASSERT(pos);
00355
00356     CString* pItem = m_TabList.GetAt(pos);
00357     m_TabList.RemoveAt(pos);
00358     _delete(pItem);
00359
00360     // PGB - Stole the following code from the OnLButtonDown() function
00361     // in order to cause the tab control to show the newly selected item
00362     // after deleting an item from the list
00363
00364     // warn parent that the selection is about to change
00365     int id = GetDlgCtrlID();
00366     NMHDR hdr;
00367     hdr.hwndFrom = m_hWnd;
00368     hdr.idFrom = id;
00369     hdr.code = TCN_SELCHANGING;
00370     if (GetParent()->SendMessage(WM_NOTIFY, id, (LPARAM)&hdr) == 0)
00371     {
00372         if (m_iCurSel >= m_TabList.GetCount())
00373         {
00374             SetCurSel(m_TabList.GetCount() - 1); // PGB - Reset the currently selected tab to the last one in the list
00375             InvalidateTabs();
00376         }
00377
00378         // notify parent that the selection has changed
00379         hdr.hwndFrom = m_hWnd;
00380         hdr.idFrom = id;
00381         hdr.code = TCN_SELCHANGE;
00382         GetParent()->SendMessage(WM_NOTIFY, id, (LPARAM)&hdr);
00383     }
00384
00385     m_iTotalTabWidth = GetTotalTabWidth();      // PGB - Recalculate the total tab width now we have deleted an item
00386
00387     EnableButtons();
00388     InvalidateTabs();
00389
00390     return TRUE;
00391 }
00392
00393 BOOL CCJFlatTabCtrl::DeleteAllItems()
00394 {
00395     while(!m_TabList.IsEmpty()) {
00396         CString* pItem = m_TabList.RemoveTail();
00397         _delete(pItem);
00398     }
00399
00400     while(!m_TabTipList.IsEmpty()) {
00401         CString* pItem = m_TabTipList.RemoveTail();
00402         _delete(pItem);
00403     }
00404
00405     m_iCurSel = -1;                             // PGB - Reset the currently selected tab to -1 as we have no tabs in our list now.
00406
00407     m_iTotalTabWidth = GetTotalTabWidth();      // PGB - Recalculate the total tab width now we have deleted all items
00408
00409     EnableButtons();
00410     InvalidateTabs();
00411
00412     return TRUE;
00413 }
00414
00415 BOOL CCJFlatTabCtrl::GetItemRect(int nItem, LPRECT lpRect)
00416 {
00417     if (nItem < 0 || nItem >= m_TabList.GetCount())
00418         return FALSE;
00419
00420     int x = GetTotalArrowWidth();
00421     for (int i = 0; i < nItem; i++)
00422     {
00423         x += GetTabWidth(i);
00424         if (i != m_TabList.GetCount())
00425             x -= (m_iClientHeight / 2) + 2;
00426     }
00427     lpRect->left = x - m_iXOffset;
00428     lpRect->top = 0;
00429     lpRect->right = lpRect->left + GetTabWidth(nItem);
00430     lpRect->bottom = m_iClientHeight;
00431     return TRUE;
00432 }
00433
00434 int CCJFlatTabCtrl::HitTest(TCHITTESTINFO *pHitTestInfo) const
00435 {
00436     // ignore hits on the buttons
00437     int iHitX = pHitTestInfo->pt.x;
00438     if (iHitX < GetTotalArrowWidth())
00439         return -1;
00440
00441     // check if any tabs were hit
00442     int x = GetTotalArrowWidth() - m_iXOffset;
00443     for (int i = 0; i < m_TabList.GetCount(); i++)
00444     {
00445         int iTabWidth = GetTabWidth(i);
00446         if (i != m_TabList.GetCount())
00447             iTabWidth -= (m_iClientHeight / 2) + 2;
00448         if ((x <= iHitX) && (iHitX <= x + iTabWidth))
00449             return i;
00450         x += iTabWidth;
00451     }
00452
00453     // hit point is right of rightmost tab
00454     return -1;
00455 }
00456
00457 int CCJFlatTabCtrl::SetCurSel(int nItem)
00458 {
00459     if (nItem < 0 || nItem >= m_TabList.GetCount())
00460         return -1;
00461
00462     int iPrevSel = m_iCurSel;
00463     m_iCurSel = nItem;
00464
00465     // test if we need to center on the selected tab
00466     CRect rcItem;
00467     if (GetItemRect(nItem, &rcItem))
00468     {
00469         // test if the tab is off on the left
00470         int iTotalArrowWidth = GetTotalArrowWidth();
00471         rcItem.left -= iTotalArrowWidth;
00472         if (rcItem.left < 0)
00473             m_iXOffset += rcItem.left;
00474         else
00475         {
00476             // test if the tab is off on the right
00477             rcItem.right -= iTotalArrowWidth;
00478             int iTabAreaWidth = m_iClientWidth - iTotalArrowWidth;
00479             if (rcItem.right > iTabAreaWidth)
00480                 m_iXOffset += (rcItem.right - iTabAreaWidth);
00481         }
00482     }
00483
00484     EnableButtons();
00485     InvalidateTabs();
00486
00487     return iPrevSel;
00488 }
00489
00490 BEGIN_MESSAGE_MAP(CCJFlatTabCtrl, CWnd)
00491     //{{AFX_MSG_MAP(CCJFlatTabCtrl)
00492     ON_WM_PAINT()
00493     ON_WM_LBUTTONDOWN()
00494     ON_WM_SIZE()
00495     ON_WM_CREATE()
00496     ON_BN_CLICKED(IDC_LEFTBUTTON, OnLeftArrow)
00497     ON_BN_CLICKED(IDC_RIGHTBUTTON, OnRightArrow)
00498     ON_BN_CLICKED(IDC_HOMEBUTTON, OnHomeArrow)
00499     ON_BN_CLICKED(IDC_ENDBUTTON, OnEndArrow)
00500     //}}AFX_MSG_MAP
00501 END_MESSAGE_MAP()
00502
00504 // CCJFlatTabCtrl message handlers
00505
00506 BOOL CCJFlatTabCtrl::PreCreateWindow(CREATESTRUCT& cs)
00507 {
00508     if (!CWnd::PreCreateWindow(cs))
00509         return FALSE;
00510
00511     cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,
00512             ::LoadCursor(NULL, IDC_ARROW), NULL, NULL);
00513
00514     return TRUE;
00515 }
00516
00517 BOOL CCJFlatTabCtrl::PreTranslateMessage(MSG* pMsg)
00518 {
00519     ASSERT_VALID(this);
00520
00521     if (::IsWindow(m_ToolTip.m_hWnd))
00522                                                                                                                                                                                                                                                                                                                                                                                                                            {
00523         if(pMsg->message == WM_MOUSEMOVE && pMsg->hwnd == m_hWnd)
00524         {
00525             CPoint Point(LOWORD(pMsg->lParam), HIWORD(pMsg->lParam));
00526
00527             TCHITTESTINFO test;
00528             test.pt = Point;
00529             int iTab = HitTest(&test);
00530
00531             if (iTab >= 0)
00532             {
00533                 CString strText;
00534
00535                 strText = (LPCTSTR) *m_TabTipList.GetAt(m_TabTipList.FindIndex(iTab));
00536
00537                 TRACE2("Mouse over tab %d : %s\n", iTab, strText);
00538
00539                 m_ToolTip.UpdateTipText(strText, this);
00540                 m_ToolTip.RelayEvent(pMsg);
00541             } else  {
00542                 // VC5 compatibility - Kirk Stowell - 10-21-99
00543                 ::SendMessage(m_ToolTip.m_hWnd, TTM_POP, 0, 0L);
00544             }
00545         }
00546         else {
00547             // VC5 compatibility - Kirk Stowell - 10-21-99
00548             ::SendMessage(m_ToolTip.m_hWnd, TTM_POP, 0, 0L);
00549         }
00550     }
00551
00552     return CWnd::PreTranslateMessage(pMsg);
00553 }
00554
00555 void CCJFlatTabCtrl::OnPaint()
00556 {
00557     CPaintDC dc(this); // device context for painting
00558
00559     CBrush brush;
00560     brush.CreateSysColorBrush(COLOR_3DFACE);
00561     CPen penBlack(PS_SOLID, 1, RGB(0,0,0));
00562
00563     // draw the black line along the left of the control
00564     CPen* pOldPen = dc.SelectObject(&penBlack);
00565     dc.MoveTo(0, 0);
00566     dc.LineTo(0, m_iClientHeight);
00567
00568     // draw the black line along the top/bottom of the control
00569     int iTotalArrowWidth = GetTotalArrowWidth();
00570     int iEndOfTab = iTotalArrowWidth + m_iTotalTabWidth - m_iXOffset;
00571     dc.MoveTo(iEndOfTab, m_bTabsOnBottom ? 0 : m_iClientHeight - 1);
00572     dc.LineTo(m_iClientWidth, m_bTabsOnBottom ? 0 : m_iClientHeight - 1);
00573
00574     // fill the empty background area
00575     int iFillHeight = m_iClientHeight - (m_bTabsOnBottom ? 0 : 1);
00576     CRect rcBack(iEndOfTab, m_bTabsOnBottom ? 1 : 0, m_iClientWidth, iFillHeight);
00577     dc.FillRect(rcBack, &brush);
00578
00579     // create a bitmap of all the tabs
00580     CDC dcMem;
00581     dcMem.CreateCompatibleDC(NULL);
00582     CBitmap bitmap;
00583     bitmap.CreateCompatibleBitmap(&dc, m_iTotalTabWidth, m_iClientHeight);
00584     CBitmap* pOldBitmap = dcMem.SelectObject(&bitmap);
00585     CBrush* pOldBrush = dcMem.SelectObject(&brush);
00586     CRect rc(0, m_bTabsOnBottom ? 1 : 0, m_iTotalTabWidth, iFillHeight);
00587     dcMem.FillRect(rc, &brush);
00588
00589     int iOverlap = (m_iClientHeight / 2) + 2;
00590     int x = 0;
00591     int iSelX = 0;
00592     for (int i = 0; i < m_TabList.GetCount(); i++)
00593     {
00594         if (i != m_iCurSel)
00595             x += DrawTab(dcMem, x, 0, m_iClientHeight, false, m_bTabsOnBottom, *m_TabList.GetAt(m_TabList.FindIndex(i))) - iOverlap;
00596         else
00597         {
00598             iSelX = x;
00599             x += GetTabWidth(i) - iOverlap;
00600         }
00601     }
00602     if (m_iCurSel >= 0)
00603         DrawTab(dcMem, iSelX, 0, m_iClientHeight, true, m_bTabsOnBottom, *m_TabList.GetAt(m_TabList.FindIndex(m_iCurSel)));
00604
00605     // blit the bitmap onto the control
00606     dc.BitBlt(iTotalArrowWidth, 0, m_iClientWidth - iTotalArrowWidth, m_iClientHeight, &dcMem, m_iXOffset, 0, SRCCOPY);
00607
00608     // fix potential resource leak - KStowell - 10-21-99.
00609     dcMem.SelectObject(pOldPen);
00610     dcMem.SelectObject(pOldBitmap);
00611     dcMem.SelectObject(pOldBrush);
00612     dcMem.DeleteDC();
00613     brush.DeleteObject();
00614     penBlack.DeleteObject();
00615     bitmap.DeleteObject();
00616 }
00617
00618 void CCJFlatTabCtrl::OnLButtonDown(UINT nFlags, CPoint point)
00619 {
00620     // TODO: Add your message handler code here and/or call default
00621     TCHITTESTINFO test;
00622     test.pt = point;
00623     int iTab = HitTest(&test);
00624     if ((iTab != -1) && (iTab != m_iCurSel))
00625     {
00626         // warn parent that the selection is about to change
00627         int id = GetDlgCtrlID();
00628         NMHDR hdr;
00629         hdr.hwndFrom = m_hWnd;
00630         hdr.idFrom = id;
00631         hdr.code = TCN_SELCHANGING;
00632         if (GetParent()->SendMessage(WM_NOTIFY, id, (LPARAM)&hdr) == 0)
00633         {
00634             // parent has given permission for the selection to change
00635             SetCurSel(iTab);
00636             InvalidateTabs();
00637
00638             // notify parent that the selection has changed
00639             hdr.hwndFrom = m_hWnd;
00640             hdr.idFrom = id;
00641             hdr.code = TCN_SELCHANGE;
00642             GetParent()->SendMessage(WM_NOTIFY, id, (LPARAM)&hdr);
00643         }
00644     }
00645
00646     CWnd::OnLButtonDown(nFlags, point);
00647 }
00648
00649 void CCJFlatTabCtrl::OnSize(UINT nType, int cx, int cy)
00650 {
00651     CWnd::OnSize(nType, cx, cy);
00652
00653     // TODO: Add your message handler code here
00654     if (m_bHasHomeEnd) {
00655         m_pHomeButton->MoveWindow(1, 0, 16, cy);
00656         m_pLeftButton->MoveWindow(17, 0, 16, cy);
00657         m_pRightButton->MoveWindow(33, 0, 16, cy);
00658         m_pEndButton->MoveWindow(49, 0, 16, cy);
00659     } else {
00660         if (m_bHasArrows) { //TCC: ADDED to handle situations where ther are no arrows
00661             m_pLeftButton->MoveWindow(1, 0, 16, cy);
00662             m_pRightButton->MoveWindow(17, 0, 16, cy);
00663         }
00664     }
00665
00666     m_iClientWidth  = cx;
00667     m_iClientHeight = cy;
00668
00669     CreateTabFont(cy);
00670
00671     m_iTotalTabWidth = GetTotalTabWidth();
00672     EnableButtons();
00673 }
00674
00675 int CCJFlatTabCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
00676 {
00677     if (CWnd::OnCreate(lpCreateStruct) == -1)
00678         return -1;
00679
00680     // TODO: Add your specialized creation code here
00681     if (lpCreateStruct->style & FTS_BOTTOM) {
00682         m_bTabsOnBottom = true;
00683     }
00684
00685     if (lpCreateStruct->style & TCS_TOOLTIPS) {
00686         m_ToolTip.Create(this);
00687         m_ToolTip.Activate(TRUE);
00688         m_ToolTip.AddTool(this, _T("Flat Tab Tool Tip"));
00689         m_ToolTip.SendMessage(TTM_SETMAXTIPWIDTH, 0, SHRT_MAX); // Allow multiline tooltips
00690     }
00691
00692     if (lpCreateStruct->style & FTS_HASARROWS)
00693     {
00694         m_bHasArrows = true;
00695         POINT points[4];
00696         points[0].x = 100; points[0].y = 0;
00697         points[1].x = 0;   points[1].y = 50;
00698         points[2].x = 100; points[2].y = 100;
00699         points[3].x = 100; points[3].y = 0;
00700
00702         // This portion of the code was re-written to help eliminate a nasty resource
00703         // leak. It would seem that the CMetaFileDC was not freeing the GDI resources
00704         // completely whenever CMetaFileDC::CloseEnhanced() was called. This may be due
00705         // to a BUG in MFC or perhaps this class, in any event, this seems to resolve
00706         // the issue. - KStowell - 10-23-99.
00708         HPEN   hPen           = ::CreatePen( PS_SOLID, 1, RGB( 0,0,0 ));
00709         HPEN   hPenDisabled   = ::CreatePen( PS_SOLID, 1, RGB( 128,128,128 ));
00710         HBRUSH hBrush         = ::CreateSolidBrush( RGB( 0,0,0 ));
00711         HBRUSH hBrushDisabled = ::CreateSolidBrush( RGB( 128,128,128 ));;
00712
00713         // create left arrow metafile
00714         HDC hMetaDC      = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00715         HPEN hOldPen     = (HPEN)::SelectObject( hMetaDC, hPen );
00716         HBRUSH hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrush );
00717         ::Polygon( hMetaDC, points, 4 );
00718         ::SelectObject( hMetaDC, hOldPen );
00719         ::SelectObject( hMetaDC, hOldBrush );
00720         m_hLeftArrow = ::CloseEnhMetaFile( hMetaDC );
00721
00722         // create disabled left arrow metafile
00723         hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00724         hOldPen   = (HPEN)::SelectObject( hMetaDC, hPenDisabled );
00725         hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrushDisabled );
00726         ::Polygon( hMetaDC, points, 4 );
00727         ::SelectObject( hMetaDC, hOldPen );
00728         ::SelectObject( hMetaDC, hOldBrush );
00729         m_hLeftArrowDisabled = ::CloseEnhMetaFile( hMetaDC );
00730
00731         points[0].x = 0;   points[0].y = 0;
00732         points[1].x = 100; points[1].y = 50;
00733         points[2].x = 0;   points[2].y = 100;
00734         points[3].x = 0;   points[3].y = 0;
00735
00736         // create right arrow metafile
00737         hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00738         hOldPen   = (HPEN)::SelectObject( hMetaDC, hPen );
00739         hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrush );
00740         ::Polygon( hMetaDC, points, 4 );
00741         ::SelectObject( hMetaDC, hOldPen );
00742         ::SelectObject( hMetaDC, hOldBrush );
00743         m_hRightArrow = ::CloseEnhMetaFile( hMetaDC );
00744
00745         // create disabled right arrow metafile
00746         hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00747         hOldPen   = (HPEN)::SelectObject( hMetaDC, hPenDisabled );
00748         hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrushDisabled );
00749         ::Polygon( hMetaDC, points, 4 );
00750         ::SelectObject( hMetaDC, hOldPen );
00751         ::SelectObject( hMetaDC, hOldBrush );
00752         m_hRightArrowDisabled = ::CloseEnhMetaFile( hMetaDC );
00753
00754         CRect rcButton(0, 0, 16, 16);
00755         m_pLeftButton = new CCJMetaFileButton;
00756         m_pLeftButton->Create(NULL, WS_CHILD | WS_VISIBLE | WS_DISABLED | BS_OWNERDRAW, rcButton, this, IDC_LEFTBUTTON);
00757         m_pLeftButton->SetMetaFiles(m_hLeftArrow, 0, 0, m_hLeftArrowDisabled);
00758
00759         m_pRightButton = new CCJMetaFileButton;
00760         m_pRightButton->Create(NULL, WS_CHILD | WS_VISIBLE | WS_DISABLED | BS_OWNERDRAW, rcButton, this, IDC_RIGHTBUTTON);
00761         m_pRightButton->SetMetaFiles(m_hRightArrow, 0, 0, m_hRightArrowDisabled);
00762
00763         if (lpCreateStruct->style & FTS_HASHOMEEND)
00764         {
00765             m_bHasHomeEnd = true;
00766
00767             // Setup the Home arrow button
00768             points[0].x = 100;   points[0].y = 0;
00769             points[1].x = 0;     points[1].y = 50;
00770             points[2].x = 100;   points[2].y = 100;
00771             points[3].x = 100;   points[3].y = 0;
00772
00773             // create right arrow metafile
00774             HDC hMetaDC      = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00775             HPEN hOldPen     = (HPEN)::SelectObject( hMetaDC, hPen );
00776             HBRUSH hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrush );
00777             ::Polygon( hMetaDC, points, 4 );
00778             ::MoveToEx( hMetaDC, 0, 0, NULL );
00779             ::LineTo( hMetaDC, 0, 100 );
00780             ::SelectObject( hMetaDC, hOldPen );
00781             ::SelectObject( hMetaDC, hOldBrush );
00782             m_hHomeArrow = ::CloseEnhMetaFile( hMetaDC );
00783
00784             // create disabled right arrow metafile
00785             hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00786             hOldPen   = (HPEN)::SelectObject( hMetaDC, hPenDisabled );
00787             hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrushDisabled );
00788             ::Polygon( hMetaDC, points, 4 );
00789             ::MoveToEx( hMetaDC, 0, 0, NULL );
00790             ::LineTo( hMetaDC, 0, 100 );
00791             ::SelectObject( hMetaDC, hOldPen );
00792             ::SelectObject( hMetaDC, hOldBrush );
00793             m_hHomeArrowDisabled = ::CloseEnhMetaFile( hMetaDC );
00794
00795             m_pHomeButton = new CCJMetaFileButton;
00796             m_pHomeButton->Create(NULL, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, rcButton, this, IDC_HOMEBUTTON);
00797             m_pHomeButton->SetMetaFiles(m_hHomeArrow, 0, 0, m_hHomeArrowDisabled);
00798
00799             // Setup the End arrow button
00800             points[0].x = 0;   points[0].y = 0;
00801             points[1].x = 100; points[1].y = 50;
00802             points[2].x = 0;   points[2].y = 100;
00803             points[3].x = 0;   points[3].y = 0;
00804
00805             // create right arrow metafile
00806             hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00807             hOldPen   = (HPEN)::SelectObject( hMetaDC, hPen );
00808             hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrush );
00809             ::Polygon( hMetaDC, points, 4 );
00810             ::MoveToEx( hMetaDC, 100, 0, NULL );
00811             ::LineTo( hMetaDC, 100, 100 );
00812             ::SelectObject( hMetaDC, hOldPen );
00813             ::SelectObject( hMetaDC, hOldBrush );
00814             m_hEndArrow = ::CloseEnhMetaFile( hMetaDC );
00815
00816             // create disabled right arrow metafile
00817             hMetaDC   = ::CreateEnhMetaFile( NULL, NULL, NULL, NULL );
00818             hOldPen   = (HPEN)::SelectObject( hMetaDC, hPenDisabled );
00819             hOldBrush = (HBRUSH)::SelectObject( hMetaDC, hBrushDisabled );
00820             ::Polygon( hMetaDC, points, 4 );
00821             ::MoveToEx( hMetaDC, 100, 0, NULL );
00822             ::LineTo( hMetaDC, 100, 100 );
00823             ::SelectObject( hMetaDC, hOldPen );
00824             ::SelectObject( hMetaDC, hOldBrush );
00825             m_hEndArrowDisabled = ::CloseEnhMetaFile( hMetaDC );
00826
00827             m_pEndButton = new CCJMetaFileButton;
00828             m_pEndButton->Create(NULL, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, rcButton, this, IDC_ENDBUTTON);
00829             m_pEndButton->SetMetaFiles(m_hEndArrow, 0, 0, m_hEndArrowDisabled);
00830
00831             m_pHomeButton->MoveWindow(1, 0, 16, 16);
00832             m_pLeftButton->MoveWindow(17, 0, 16, 16);
00833             m_pRightButton->MoveWindow(33, 0, 16, 16);
00834             m_pEndButton->MoveWindow(49, 0, 16, 16);
00835
00836         } else {
00837             m_pLeftButton->MoveWindow(1, 0, 16, 16);
00838             m_pRightButton->MoveWindow(17, 0, 16, 16);
00839         }
00840
00841         // fix potential resource leak - KStowell - 10-23-99
00842         ::DeleteObject(hPen);
00843         ::DeleteObject(hPenDisabled);
00844         ::DeleteObject(hBrush);
00845         ::DeleteObject(hBrushDisabled);
00846     }
00847
00848     return 0;
00849 }
00850
00851 void CCJFlatTabCtrl::OnLeftArrow()
00852 {
00853     // Move the tabs right, ensuring that we move right by one
00854     // whole tab each time ala Microsoft Access
00855
00856     CPoint Point(GetTotalArrowWidth()+1, 1);
00857
00858     TCHITTESTINFO test;
00859     test.pt = Point;
00860     int iTab = HitTest(&test);
00861
00862     if (iTab != -1)
00863     {
00864         m_iXOffset = 0;
00865         for (int iLoop = 0; iLoop <= iTab - 1; iLoop++)
00866         {
00867             RECT rect;
00868             if (GetItemRect(iLoop, &rect))
00869             {
00870                 m_iXOffset += rect.left;
00871             }
00872         }
00873         m_iXOffset -= GetTotalArrowWidth();
00874
00875         EnableButtons();
00876         InvalidateTabs();
00877     }
00878 }
00879
00880 void CCJFlatTabCtrl::OnRightArrow()
00881 {
00882     // Move the tabs left, ensuring that we move left by one
00883     // whole tab each time ala Microsoft Access
00884
00885     CPoint Point(GetTotalArrowWidth()+1, 1);
00886
00887     TCHITTESTINFO test;
00888     test.pt = Point;
00889     int iTab = HitTest(&test);
00890
00891     if (iTab != -1)
00892     {
00893         m_iXOffset = 0;
00894         for (int iLoop = 0; iLoop <= iTab + 1; iLoop++)
00895         {
00896             RECT rect;
00897             if (GetItemRect(iLoop, &rect))
00898             {
00899                 m_iXOffset += rect.left;
00900             }
00901         }
00902         m_iXOffset -= GetTotalArrowWidth();
00903
00904         EnableButtons();
00905         InvalidateTabs();
00906     }
00907 }
00908
00909 void CCJFlatTabCtrl::OnHomeArrow()
00910 {
00911     // TODO: Add your control notification handler code here
00912     m_iXOffset = 0;
00913     EnableButtons();
00914     InvalidateTabs();
00915 }
00916
00917 void CCJFlatTabCtrl::OnEndArrow()
00918 {
00919     // TODO: Add your control notification handler code here
00920     m_iXOffset = m_iTotalTabWidth + GetTotalArrowWidth() - m_iClientWidth + 1;
00921     EnableButtons();
00922     InvalidateTabs();
00923 }
00924
00925 void CCJFlatTabCtrl::SetTipText(int nItem, LPCTSTR lpszTabTip)
00926 {
00927     if (nItem < m_TabList.GetCount())
00928     {
00929         for (int i = 0; i < m_TabList.GetCount(); i++)
00930         {
00931             if (i == nItem)
00932             {
00933                 CString *pTipItem = m_TabTipList.GetAt(m_TabTipList.FindIndex(nItem));
00934
00935                 *pTipItem = lpszTabTip;
00936
00937                 break;
00938             }
00939         }
00940     }
00941
00942     return;
00943 }
00944
00945 CString CCJFlatTabCtrl::GetTipText(int nItem)
00946 {
00947     CString strText;
00948
00949     if (nItem < m_TabList.GetCount())
00950     {
00951         for (int i = 0; i < m_TabList.GetCount(); i++)
00952         {
00953             if (i == nItem)
00954             {
00955                 strText = *m_TabTipList.GetAt(m_TabTipList.FindIndex(nItem));
00956                 break;
00957             }
00958         }
00959     }
00960
00961     return strText;
00962 }
00963
00964 void CCJFlatTabCtrl::Home()
00965 {
00966     OnHomeArrow();
00967 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getline.h Source File

common/getline.h

Go to the documentation of this file.
00001 /* getline.c -- Replacement for GNU C library function getline
00002
00003 Copyright (C) 1993 Free Software Foundation, Inc.
00004
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License as
00007 published by the Free Software Foundation; either version 2 of the
00008 License, or (at your option) any later version.
00009
00010 This program is distributed in the hope that it will be useful, but
00011 WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 General Public License for more details.  */
00014
00015 /* Written by Jan Brittenson, bson@gnu.ai.mit.edu.  */
00016
00017 /*
00018  * Modified for WinCvs/MacCVS : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 #ifndef _getline_h_
00022 #define _getline_h_ 1
00023
00024 #include <stdio.h>
00025
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029
00030 #if defined (__GNUC__) || (defined (__STDC__) && __STDC__) || defined(__cplusplus)
00031 #define __PROTO(args) args
00032 #else
00033 #define __PROTO(args) ()
00034 #endif  /* GCC.  */
00035
00036 #ifndef __ssize_t_defined
00037 #define __ssize_t int
00038 #endif
00039 __ssize_t
00040   getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
00041 int
00042   getstr __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
00043            char _terminator, int _offset));
00044
00045 #ifdef __cplusplus
00046 }
00047 #endif
00048
00049 #endif /* _getline_h_ */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWinLogHeaderData Member List

This is the complete list of members for CWinLogHeaderData, including all inherited members.

Bounds(void) | CWinLogData | [inline]
Bounds(void) | CWinLogData | [inline]
CollectMergePointPairPass1(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass1Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected, virtual]
CollectMergePointPairPass2(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass2Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected, virtual]
ComputeBounds(const UPoint &topLeft, UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
ComputeBounds(const CPoint &topLeft, CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
CreateNewData(CLogNode *node) | CWinLogData | [static]
CreateNewData(CLogNode *node) | CWinLogData | [static]
CWinLogData(CLogNode *node) | CWinLogData |
CWinLogData(CLogNode *node) | CWinLogData |
CWinLogHeaderData(CLogNode *node) | CWinLogHeaderData | [inline]
CWinLogHeaderData(CLogNode *node) | CWinLogHeaderData | [inline]
GetBoundsSelf(UDC &hdc, EntnodeData *entryInfo) | CWinLogHeaderData | [protected, virtual]
GetBoundsSelf(CDC &dc, EntnodeData *entryInfo) | CWinLogHeaderData | [protected, virtual]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetStr(void) | CWinLogData |
GetStr(void) | CWinLogData |
GetType(void) const | CWinLogData | [inline]
GetType(void) const | CWinLogData | [inline]
HitTest(UPoint point) | CWinLogData |
HitTest(CPoint point) | CWinLogData |
IsDeadNode() | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsUserState() | CWinLogData |
Offset(UPoint o) | CWinLogData |
Offset(CPoint offset) | CWinLogData |
sel | CWinLogData | [protected]
Selected(void) const | CWinLogData | [inline]
Selected(void) const | CWinLogData | [inline]
selfB | CWinLogData | [protected]
SelfBounds(void) | CWinLogData | [inline]
SelfBounds(void) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
SetSelected(bool state) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
totB | CWinLogData | [protected]
UnselectAll(CScrollView *view) | CWinLogData |
UnselectAll(void) | CWinLogData |
UnselectAll(CScrollView *view) | CWinLogData |
Update(UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
Update(CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
UpdateMergePoints(CDC &dc) | CWinLogData |
UpdateSelf(UDC &hdc, EntnodeData *entryInfo) | CWinLogHeaderData | [protected, virtual]
UpdateSelf(CDC &dc, EntnodeData *entryInfo) | CWinLogHeaderData | [protected, virtual]
~CWinLogData() | CWinLogData | [virtual]
~CWinLogData() | CWinLogData | [virtual]
~CWinLogHeaderData() | CWinLogHeaderData | [inline, virtual]
~CWinLogHeaderData() | CWinLogHeaderData | [inline, virtual]

Generated on Sat Aug 7 22:58:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CommitDlg.cpp Source File

common/CommitDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 1998
00019  */
00020
00021 /*
00022  * CommitDlg.cpp : the cvs commit dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include <process.h>
00030 #else /* !WIN32 */
00031 #   include <ctype.h>
00032 #endif /* !WIN32 */
00033
00034 #if qUnix
00035 #   include "UCvsDialogs.h"
00036 #endif
00037
00038 #ifdef qMacCvsPP
00039 #   include <UModalDialogs.h>
00040 #   include <LMultiPanelView.h>
00041 #   include <LPopupGroupBox.h>
00042 #   include <LCheckBox.h>
00043 #   include <LTextEditView.h>
00044 #   include <LPushButton.h>
00045 #   include "LPopupFiller.h"
00046
00047 #   include "MacCvsConstant.h"
00048 # include "MacMisc.h"
00049 # include "LogParse.h"
00050 #endif /* qMacCvsPP */
00051
00052 #include "CommitDlg.h"
00053 #include "CvsPrefs.h"
00054 #include "MultiFiles.h"
00055 #include "getline.h"
00056 #include "MultiString.h"
00057 #include "CvsCommands.h"
00058 #include "EditorMonDlg.h"
00059 #include "ItemListDlg.h"
00060 #include "BrowseViewHandlers.h"
00061
00062 CMString gCommitLogs(20, "P_CommitLogs");
00063 static CPersistentBool gCheckValidEdits("P_CheckValidEdits", false, kAddSettings);
00064
00065 #ifndef WIN32
00066
00070 void combozify(CStr& str)
00071 {
00072     // extract the first xxx words
00073     const char* tmp = str;
00074     CStr result;
00075     int numWords = 0;
00076 #   define HOWMUCH_WORDS 5
00077     while(*tmp != '\0' && numWords < HOWMUCH_WORDS)
00078     {
00079         while(*tmp != '\0' && isspace(*tmp))
00080             tmp++;
00081
00082         while(*tmp != '\0' && !isspace(*tmp))
00083             result << *tmp ++;
00084
00085         if( *tmp != '\0' )
00086             result << ' ';
00087
00088         numWords++;
00089     }
00090
00091     if( *tmp != '\0' )
00092     {
00093         result << "...";
00094     }
00095
00096     str = result;
00097 }
00098 #endif
00099
00100 #ifdef WIN32
00101 #   include "GetPrefs.h"
00102
00103 #   ifdef _DEBUG
00104 #       define new DEBUG_NEW
00105 #       undef THIS_FILE
00106         static char THIS_FILE[] = __FILE__;
00107 #   endif
00108
00109 IMPLEMENT_DYNAMIC(CCommit_MAIN, CHHelpPropertyPage)
00110
00111 CCommit_MAIN::CCommit_MAIN(const MultiFiles* mf, const char* logMsg)
00112     : m_mf(mf), m_multilineEntryDlg(mf), m_fileToDiffCombo(USmartCombo::AutoDropWidth | USmartCombo::ReadOnly),
00113     CHHelpPropertyPage(CCommit_MAIN::IDD)
00114 {
00115     //{{AFX_DATA_INIT(CCommit_MAIN)
00116     m_logMsg = logMsg;
00117     //}}AFX_DATA_INIT
00118 }
00119
00120 CCommit_MAIN::~CCommit_MAIN()
00121 {
00122 }
00123
00124 void CCommit_MAIN::DoDataExchange(CDataExchange* pDX)
00125 {
00126     CHHelpPropertyPage::DoDataExchange(pDX);
00127     //{{AFX_DATA_MAP(CCommit_MAIN)
00128     DDX_Control(pDX, IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryPlaceholder);
00129     DDX_Control(pDX, IDC_PREVIEWINFO, m_previewInfo);
00130     DDX_Control(pDX, IDC_FILETODIFF, m_fileToDiffCombo);
00131     //}}AFX_DATA_MAP
00132
00133     m_multilineEntryDlg.UpdateData(pDX->m_bSaveAndValidate, m_logMsg);
00134 }
00135
00136 BEGIN_MESSAGE_MAP(CCommit_MAIN, CHHelpPropertyPage)
00137     //{{AFX_MSG_MAP(CCommit_MAIN)
00138     ON_BN_CLICKED(IDC_DIFF, OnDiff)
00139     ON_CBN_SELCHANGE(IDC_FILETODIFF, OnSelchangeFiletodiff)
00140     ON_WM_DESTROY()
00141     //}}AFX_MSG_MAP
00142 END_MESSAGE_MAP()
00143
00145 void CCommit_MAIN::UpdatePreviewInfo()
00146 {
00147     CString strPreviewInfo;
00148     int nSelInfo = m_fileToDiffCombo.GetCurSel();
00149     if( nSelInfo < 0 || !m_fileToDiffCombo.GetCount() )
00150     {
00151         nSelInfo = 0;
00152     }
00153     else
00154     {
00155         nSelInfo++;
00156     }
00157
00158     strPreviewInfo.Format("Preview file changes (%d/%d):", nSelInfo, m_fileToDiffCombo.GetCount());
00159     m_previewInfo.SetWindowText(strPreviewInfo);
00160 }
00161
00163 void CCommit_MAIN::OnSelchangeFiletodiff()
00164 {
00165     UpdatePreviewInfo();
00166 }
00167
00169 void CCommit_MAIN::OnDiff()
00170 {
00171     const int nComboIndex = m_fileToDiffCombo.GetCurSel();
00172     if( nComboIndex > CB_ERR )
00173     {
00174         MultiFilesEntryIndex* entryIndex = (MultiFilesEntryIndex*)m_fileToDiffCombo.GetItemData(nComboIndex);
00175         CStr path;
00176         CStr fileName;
00177         CStr currRev;
00178
00179         if( entryIndex && entryIndex->GetIterator()->get(entryIndex->GetIndex(), path, fileName, currRev) )
00180         {
00181             MultiFiles mf;
00182             mf.newdir(path);
00183             mf.newfile(fileName, 0, currRev);
00184
00185             KoDiffHandler handler;
00186             handler.OnFiles(&mf);
00187         }
00188     }
00189 }
00190
00192 BOOL CCommit_MAIN::OnInitDialog()
00193 {
00194     CHHelpPropertyPage::OnInitDialog();
00195
00196     // Extra initialization here
00197     m_multilineEntryDlg.Create(kMultilineLogMessage, &gCommitLogs, &m_multilineEntryPlaceholder, this);
00198
00199     if( m_mf && m_mf->TotalNumFiles() )
00200     {
00201         MultiFiles::const_iterator mfi;
00202         for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
00203         {
00204             for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
00205             {
00206                 UStr path;
00207                 UStr fileName;
00208                 UStr currRev;
00209
00210                 mfi->get(nIndex, path, fileName, currRev);
00211                 if( !path.empty() && !path.endsWith(kPathDelimiter) )
00212                     path << kPathDelimiter;
00213
00214                 path << fileName;
00215
00216                 const int nComboIndex = m_fileToDiffCombo.AddString(path);
00217
00218                 MultiFilesEntryIndex* entryIndex = new MultiFilesEntryIndex(nComboIndex, mfi);
00219                 m_fileToDiffCombo.SetItemData(nComboIndex, (DWORD)entryIndex);
00220             }
00221         }
00222     }
00223
00224     if( m_fileToDiffCombo.GetCount() )
00225     {
00226         m_fileToDiffCombo.SetCurSel(0);
00227     }
00228     else
00229     {
00230         m_fileToDiffCombo.EnableWindow(FALSE);
00231         CWnd* pButton = GetDlgItem(IDC_DIFF);
00232         if( pButton )
00233         {
00234             pButton->EnableWindow(FALSE);
00235         }
00236     }
00237
00238     UpdatePreviewInfo();
00239
00240     return TRUE;  // return TRUE unless you set the focus to a control
00241                   // EXCEPTION: OCX Property Pages should return FALSE
00242 }
00243
00244 void CCommit_MAIN::InitHelpID()
00245 {
00246     SetCtrlHelpID(IDC_PREVIEWINFO,  helpTopicIgnore);
00247     SetCtrlHelpID(IDC_FILETODIFF,   IDH_IDC_FILETODIFF);
00248     SetCtrlHelpID(IDC_DIFF,         IDH_IDC_DIFF);
00249 }
00250
00252 void CCommit_MAIN::OnDestroy()
00253 {
00254     const int count = m_fileToDiffCombo.GetCount();
00255     for(int nIndex = 0; nIndex < count; nIndex++)
00256     {
00257         MultiFilesEntryIndex* entryIndex = (MultiFilesEntryIndex*)m_fileToDiffCombo.GetItemData(nIndex);
00258         delete entryIndex;
00259     }
00260
00261     CHHelpPropertyPage::OnDestroy();
00262 }
00263
00268 CString CCommit_MAIN::GetLogMsg() const
00269 {
00270     return m_logMsg;
00271 }
00272
00274 // CCommit_OPTIONS property page
00275
00276 IMPLEMENT_DYNAMIC(CCommit_OPTIONS, CHHelpPropertyPage)
00277
00278 CCommit_OPTIONS::CCommit_OPTIONS(const MultiFiles* mf)
00279     : m_mf(mf), CHHelpPropertyPage(CCommit_OPTIONS::IDD)
00280 {
00281     //{{AFX_DATA_INIT(CCommit_OPTIONS)
00282     m_forceCommit = FALSE;
00283     m_rev = _T("");
00284     m_forceRecurse = FALSE;
00285     m_forceRevision = FALSE;
00286     m_noModuleProgram = FALSE;
00287     m_noRecurse = FALSE;
00288     m_checkValidEdits = FALSE;
00289     //}}AFX_DATA_INIT
00290
00291     m_checkValidEdits = (bool)gCheckValidEdits;
00292     m_revCombo.SetItems(&gRevNames);
00293 }
00294
00295 CCommit_OPTIONS::~CCommit_OPTIONS()
00296 {
00297 }
00298
00299 void CCommit_OPTIONS::DoDataExchange(CDataExchange* pDX)
00300 {
00301     CHHelpPropertyPage::DoDataExchange(pDX);
00302     //{{AFX_DATA_MAP(CCommit_OPTIONS)
00303     DDX_Control(pDX, IDC_REV_TAG, m_revCombo);
00304     DDX_Check(pDX, IDC_FORCE_COMMIT, m_forceCommit);
00305     DDX_CBString(pDX, IDC_REV_TAG, m_rev);
00306     DDX_Check(pDX, IDC_FORCE_RECURSE, m_forceRecurse);
00307     DDX_Check(pDX, IDC_FORCE_REVISION, m_forceRevision);
00308     DDX_Check(pDX, IDC_NO_MODULE_PROGRAM, m_noModuleProgram);
00309     DDX_Check(pDX, IDC_NORECURS, m_noRecurse);
00310     DDX_Check(pDX, IDC_CHECK_VALID_EDITS, m_checkValidEdits);
00311     //}}AFX_DATA_MAP
00312
00313     if( m_forceRevision )
00314     {
00315         DDV_MinChars(pDX, m_rev, 1);
00316     }
00317
00318     if( !pDX->m_bSaveAndValidate )
00319     {
00320         OnForcerevision();
00321     }
00322
00323     DDX_ComboMString(pDX, IDC_REV_TAG, m_revCombo);
00324 }
00325
00326
00327 BEGIN_MESSAGE_MAP(CCommit_OPTIONS, CHHelpPropertyPage)
00328 //{{AFX_MSG_MAP(CCommit_OPTIONS)
00329     ON_BN_CLICKED(IDC_FORCE_REVISION, OnForcerevision)
00330     ON_BN_CLICKED(IDC_BROWSE_TAG, OnBrowseTag)
00331     //}}AFX_MSG_MAP
00332 END_MESSAGE_MAP()
00333
00335 // CCommit_OPTIONS message handlers
00336
00337 void CCommit_OPTIONS::InitHelpID()
00338 {
00339     SetCtrlHelpID(IDC_NORECURS,             IDH_IDC_NORECURS);
00340     SetCtrlHelpID(IDC_FORCE_COMMIT,         IDH_IDC_FORCE_COMMIT);
00341     SetCtrlHelpID(IDC_FORCE_REVISION,       IDH_IDC_HAS_REV);
00342     SetCtrlHelpID(IDC_REV_TAG,              IDH_IDC_REV_TAG);
00343     SetCtrlHelpID(IDC_BROWSE_TAG,           IDH_IDC_BROWSE_TAG);
00344     SetCtrlHelpID(IDC_FORCE_RECURSE,        IDH_IDC_FORCE_RECURSE);
00345     SetCtrlHelpID(IDC_NO_MODULE_PROGRAM,    IDH_IDC_NO_MODULE_PROGRAM);
00346     SetCtrlHelpID(IDC_CHECK_VALID_EDITS,    IDH_IDC_CHECK_VALID_EDITS);
00347 }
00348
00350 void CCommit_OPTIONS::OnForcerevision()
00351 {
00352     CButton* but = (CButton*)GetDlgItem(IDC_FORCE_REVISION);
00353
00354     CWnd* wnd = GetDlgItem(IDC_REV_TAG);
00355     if( wnd )
00356     {
00357         wnd->EnableWindow(but->GetCheck());
00358     }
00359
00360     wnd = GetDlgItem(IDC_BROWSE_TAG);
00361     if( wnd )
00362     {
00363         wnd->EnableWindow(but->GetCheck());
00364     }
00365 }
00366
00368 void CCommit_OPTIONS::OnBrowseTag()
00369 {
00370     CStr tagName;
00371     if( CompatGetTagListItem(m_mf, tagName) )
00372     {
00373         m_rev = (const char*)tagName;
00374         m_revCombo.SetWindowText(m_rev);
00375     }
00376 }
00377
00378 #endif /* WIN32 */
00379
00380 #ifdef qMacCvsPP
00381 class LLogFillerWrapper : public LFillerWrapper
00382 {
00383 public:
00384     LLogFillerWrapper(LMenuController *menu, CMString & mstr, const char *pathTmpl) :
00385         LFillerWrapper(menu), fMStr(mstr), fFirstTime(true)
00386     {
00387         fTmplPath = pathTmpl;
00388         if(!fTmplPath.empty())
00389         {
00390             if(!fTmplPath.endsWith(kPathDelimiter))
00391                 fTmplPath << kPathDelimiter;
00392             fTmplPath << "CVS";
00393             fTmplPath << kPathDelimiter;
00394             fTmplPath << "Template";
00395         }
00396
00397     }
00398
00399     virtual void OnAddingItem(CStr & str)
00400     {
00401         if(fFirstTime)
00402         {
00403             fMenu->InsertMenuItem("\pInsert CVS/Template", max_Int16);
00404             mTmplItem = ::CountMenuItems(fMenu->GetMacMenuH());
00405             fMenu->InsertMenuItem("\p(-", max_Int16, false);
00406             fFirstTime = false;
00407         }
00408
00409         combozify(str);
00410         fMenu->InsertMenuItem(UTF8_to_LString(str, true), max_Int16);
00411     }
00412
00413     virtual bool OnSelectingItem(SInt32 inItem, CStr & str)
00414     {
00415         str = "";
00416         if(inItem == mTmplItem)
00417         {
00418             bool gotIt = false;
00419             FILE *output;
00420             if(!fTmplPath.empty() && (output = fopen(fTmplPath, "r")) != 0L)
00421             {
00422                 char *line = 0L;
00423                 size_t line_chars_allocated = 0;
00424                 int line_length;
00425                 while ((line_length = getline (&line, &line_chars_allocated, output)) > 0)
00426                 {
00427                     str << line;
00428                 }
00429
00430                 gotIt = true;
00431                 if (line_length < 0 && !feof (output))
00432                     gotIt = false;
00433
00434                 if(line != 0L)
00435                     free (line);
00436
00437                 fclose(output);
00438             }
00439             if(!gotIt)
00440                 str << "*found no CVS/Template file*";
00441             return true;
00442         }
00443         else if(inItem >= mTmplItem + 2)
00444         {
00445             str = fMStr.GetList()[inItem - 4];
00446             return true;
00447         }
00448
00449         return false;
00450     }
00451 protected:
00452     CMString & fMStr;
00453     CStr fTmplPath;
00454     SInt32 mTmplItem;
00455     bool fFirstTime;
00456 };
00457
00458 static void DoDataExchange_Commit(LWindow *theDialog, CStr & commit,
00459     const char *pathTmpl, UInt16 & msgEncoding, bool putValue)
00460 {
00461     LTextEditView *editLog = dynamic_cast<LTextEditView*>
00462         (theDialog->FindPaneByID(item_LogMsg));
00463     LPopupFiller *fillLog = dynamic_cast<LPopupFiller*>
00464         (theDialog->FindPaneByID(item_FillerRev1));
00465     LLogFillerWrapper *wrapper = putValue ? NEW LLogFillerWrapper(fillLog, gCommitLogs, pathTmpl) : 0L;
00466     LPopupButton *messageEncoding = dynamic_cast<LPopupButton*>(theDialog->FindPaneByID(item_LogMsgEncoding));
00467
00468     fillLog->DoDataExchange(gCommitLogs, putValue, wrapper);
00469
00470     if(putValue)
00471     {
00472       CStr    sysEncodedString(UTF8_to_SysEncoding(commit));
00473         editLog->SetTextPtr((Ptr)(const char *)sysEncodedString, sysEncodedString.length());
00474         theDialog->SetLatentSub(editLog);
00475         if ( messageEncoding ) messageEncoding->SetValue(msgEncoding);
00476     }
00477     else
00478     {
00479         Handle hdl = editLog->GetTextHandle();
00480         Assert_(hdl != 0L);
00481         CStr    str;
00482         str.set(*hdl, GetHandleSize(hdl));
00483         commit = SysEncoding_to_UTF8(str);
00484         if ( messageEncoding ) msgEncoding = messageEncoding->GetValue();
00485     }
00486 }
00487
00488 static void
00489 DoDataExchange_CommitOptions(
00490     LView *theDialog,
00491     const MultiFiles* mf,
00492     bool & norecurs,
00493     bool & forceCommit,
00494     bool & forceRecurse,
00495     bool & hasRev,
00496     CStr & lastRev,
00497     bool & noModuleProgram,
00498     bool putValue)
00499 {
00500     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*> (theDialog->FindPaneByID(item_FillerTag));
00501     LTagWrapper *wrapper = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00502     fillTag->DoDataExchange(gRevNames, putValue, wrapper);
00503
00504     DoDataExchange (theDialog, item_NoRecurs, norecurs, putValue);
00505     DoDataExchange (theDialog, item_ForceCommit, forceCommit, putValue);
00506     DoDataExchange (theDialog, item_ForceRecurse, forceRecurse, putValue);
00507     DoDataExchange (theDialog, item_NoModuleProgram, noModuleProgram, putValue);
00508     DoDataExchange (theDialog, item_CheckRevTag, hasRev, putValue);
00509     DoDataExchange (theDialog, item_EditRevTag, lastRev, putValue);
00510 }
00511 #endif /* qMacCvsPP */
00512
00513 #if qUnix
00514 class UCvsCommit : public UWidget
00515 {
00516     UDECLARE_DYNAMIC(UCvsCommit)
00517 public:
00518     UCvsCommit() : UWidget(::UEventGetWidID()) {}
00519     virtual ~UCvsCommit() {}
00520
00521     enum
00522     {
00523         kOK = EV_COMMAND_START, // 0
00524         kCancel,                // 1
00525         kTabGeneral             // 2
00526     };
00527
00528     virtual void DoDataExchange(bool fill);
00529
00530 protected:
00531     ev_msg int OnOK(void);
00532     ev_msg int OnCancel(void);
00533
00534     UDECLARE_MESSAGE_MAP()
00535 };
00536
00537 UIMPLEMENT_DYNAMIC(UCvsCommit, UWidget)
00538
00539 UBEGIN_MESSAGE_MAP(UCvsCommit, UWidget)
00540     ON_UCOMMAND(UCvsCommit::kOK, UCvsCommit::OnOK)
00541     ON_UCOMMAND(UCvsCommit::kCancel, UCvsCommit::OnCancel)
00542 UEND_MESSAGE_MAP()
00543
00544 int UCvsCommit::OnOK(void)
00545 {
00546     EndModal(true);
00547     return 0;
00548 }
00549
00550 int UCvsCommit::OnCancel(void)
00551 {
00552     EndModal(false);
00553     return 0;
00554 }
00555
00556 void UCvsCommit::DoDataExchange(bool fill)
00557 {
00558     if(fill)
00559     {
00560     }
00561     else
00562     {
00563     }
00564 }
00565
00566 class UCvsCommit_MAIN : public UWidget
00567 {
00568     UDECLARE_DYNAMIC(UCvsCommit_MAIN)
00569 public:
00570     UCvsCommit_MAIN( const MultiFiles *mf, const char *logmsg, const char *pathTmpl);
00571     virtual ~UCvsCommit_MAIN() {}
00572
00573     enum
00574     {
00575         kEditLog = EV_COMMAND_START,    // 0
00576         kComboLog,              // 1
00577         kComboDiffSelection,     // 2
00578         kExecDiff                // 3
00579     };
00580
00581     virtual void DoDataExchange(bool fill);
00582
00583     UStr m_logmsg;
00584     UStr m_tmplPath;
00585
00586 protected:
00587
00588     ev_msg void OnComboSel(int pos, const char *txt);
00589     ev_msg void OnComboDiffSel(int pos, const char *txt);
00590     ev_msg int OnExecDiff(void);
00591
00592     UDECLARE_MESSAGE_MAP()
00593 private:
00594     const MultiFiles* m_mf;
00595     int m_selected_diff_file;
00596 };
00597
00598 UIMPLEMENT_DYNAMIC(UCvsCommit_MAIN, UWidget)
00599
00600 UBEGIN_MESSAGE_MAP(UCvsCommit_MAIN, UWidget)
00601     ON_COMBO_SEL(UCvsCommit_MAIN::kComboLog, UCvsCommit_MAIN::OnComboSel)
00602     ON_COMBO_SEL(UCvsCommit_MAIN::kComboDiffSelection, UCvsCommit_MAIN::OnComboDiffSel)
00603     ON_UCOMMAND(UCvsCommit_MAIN::kExecDiff, UCvsCommit_MAIN::OnExecDiff)
00604 UEND_MESSAGE_MAP()
00605
00606 UCvsCommit_MAIN::UCvsCommit_MAIN( const MultiFiles *mf, const char *logmsg, const char *pathTmpl)
00607     : UWidget(::UEventGetWidID())
00608 {
00609     m_mf = mf;
00610     m_logmsg = logmsg;
00611     m_tmplPath = pathTmpl;
00612     m_selected_diff_file = 0;
00613
00614     if(!m_tmplPath.empty())
00615     {
00616         if(!m_tmplPath.endsWith(kPathDelimiter))
00617             m_tmplPath << kPathDelimiter;
00618         m_tmplPath << "CVS";
00619         m_tmplPath << kPathDelimiter;
00620         m_tmplPath << "Template";
00621     }
00622 }
00623
00624 void UCvsCommit_MAIN::OnComboSel(int pos, const char *txt)
00625 {
00626     if(pos == 0)
00627     {
00628         bool gotIt = false;
00629         FILE *output;
00630
00631         if(!m_tmplPath.empty() && (output = fopen(m_tmplPath, "r")) != 0L)
00632         {
00633             char *line = 0L;
00634             size_t line_chars_allocated = 0;
00635             int line_length;
00636             while ((line_length = getline (&line, &line_chars_allocated, output)) > 0)
00637             {
00638                 UEventSendMessage(GetWidID(), EV_SETTEXT, kEditLog, line);
00639             }
00640
00641             gotIt = true;
00642             if (line_length < 0 && !feof (output))
00643                 gotIt = false;
00644
00645             if(line != 0L)
00646                 free (line);
00647
00648             fclose(output);
00649         }
00650         if(!gotIt)
00651             UEventSendMessage(GetWidID(), EV_SETTEXT, kEditLog, (void *)"*found no CVS/Template file*");
00652     }
00653     else
00654     {
00655         const std::vector<CStr> & list = gCommitLogs.GetList();
00656         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditLog, (void *)(const char *)list[pos - 1]);
00657     }
00658 }
00659
00660 void UCvsCommit_MAIN::OnComboDiffSel(int pos, const char *txt)
00661 {
00662     m_selected_diff_file = pos;
00663     printf( "selected file %d, '%s'\n", pos, txt);
00664 }
00665
00666 void UCvsCommit_MAIN::DoDataExchange(bool fill)
00667 {
00668     if(fill)
00669     {
00670         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditLog, (void *)(const char *)m_logmsg);
00671
00672         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kComboLog, 0L);
00673         UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kComboLog,
00674                           (void *)"Insert CVS/Template");
00675         const std::vector<CStr> & list = gCommitLogs.GetList();
00676         std::vector<CStr>::const_iterator i;
00677         for(i = list.begin(); i != list.end(); ++i)
00678         {
00679             CStr str = *i;
00680             combozify(str);
00681             UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kComboLog, (void *)(const char *)str);
00682         }
00683
00684         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kComboDiffSelection, 0L);
00685         if( m_mf && m_mf->TotalNumFiles() )
00686         {
00687             MultiFiles::const_iterator mfi;
00688             for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
00689             {
00690                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
00691                 {
00692                     UStr path;
00693                     UStr fileName;
00694                     UStr currRev;
00695
00696                     mfi->get(nIndex, path, fileName, currRev);
00697                     if( !path.empty() && !path.endsWith(kPathDelimiter) )
00698                         path << kPathDelimiter;
00699
00700                     path << fileName;
00701
00702                     UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kComboDiffSelection,
00703                           (void *)(const char*)path);
00704                 }
00705             }
00706         }
00707
00708     }
00709     else
00710     {
00711         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditLog, &m_logmsg);
00712         if(!m_logmsg.empty())
00713             gCommitLogs.Insert(m_logmsg);
00714     }
00715 }
00716
00717 int UCvsCommit_MAIN::OnExecDiff(void)
00718 {
00719     if( m_mf && m_mf->TotalNumFiles() )
00720     {
00721         MultiFiles::const_iterator mfi;
00722         int diff_idx;
00723         for( diff_idx = 0, mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
00724         {
00725             for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++, diff_idx++ )
00726             {
00727                 if( diff_idx == m_selected_diff_file)
00728                 {
00729                     UStr path;
00730                     UStr fileName;
00731                     UStr currRev;
00732
00733                     mfi->get(nIndex, path, fileName, currRev);
00734
00735                     MultiFiles mf;
00736                     mf.newdir(path);
00737                     mf.newfile(fileName, 0, currRev);
00738
00739                     KoDiffHandler handler;
00740                     handler.OnFiles(&mf);
00741                     return 0;
00742                 }
00743             }
00744         }
00745         // oops! file not found!
00746     }
00747     return 0;
00748 }
00749
00750 // - - - - - - - - - - - - - - - - - - - - -
00751
00752 class UCvsCommit_OPTIONS : public UWidget
00753 {
00754     UDECLARE_DYNAMIC(UCvsCommit_OPTIONS)
00755 public:
00756     UCvsCommit_OPTIONS( const MultiFiles *mf);
00757     virtual ~UCvsCommit_OPTIONS() {}
00758
00759     enum
00760     {
00761         kNoRecurse = EV_COMMAND_START,  // 0
00762         kForceCommit,               // 1
00763         kForceRevision,     // 2
00764         kRevList,                // 3
00765         kBrowseRev, // 4
00766         kForceRecurse, // 5
00767         kNoRunModuleProgram, // 6
00768         kCheckValidEdits, // 7
00769     };
00770
00771     virtual void DoDataExchange(bool fill);
00772
00773     bool    m_forceCommit;
00774     bool    m_forceRecurse;
00775     bool    m_forceRevision;
00776     bool    m_noModuleProgram;
00777     bool    m_noRecurse;
00778     bool    m_checkValidEdits;
00779     UStr    m_rev;
00780
00781 protected:
00782
00783     ev_msg int OnBrowseRevision(void);
00784     ev_msg int OnForceHit(void);
00785     ev_msg void OnRevisionSel(int pos, const char *txt);
00786
00787     UDECLARE_MESSAGE_MAP()
00788 private:
00789     const MultiFiles* m_mf;
00790     bool m_localforcerev;
00791 };
00792
00793 UIMPLEMENT_DYNAMIC(UCvsCommit_OPTIONS, UWidget)
00794
00795 UBEGIN_MESSAGE_MAP(UCvsCommit_OPTIONS, UWidget)
00796     ON_UCOMMAND(UCvsCommit_OPTIONS::kBrowseRev, UCvsCommit_OPTIONS::OnBrowseRevision)
00797     ON_UCOMMAND(UCvsCommit_OPTIONS::kForceRevision, UCvsCommit_OPTIONS::OnForceHit)
00798     ON_COMBO_SEL(UCvsCommit_OPTIONS::kRevList, UCvsCommit_OPTIONS::OnRevisionSel)
00799 UEND_MESSAGE_MAP()
00800
00801 UCvsCommit_OPTIONS::UCvsCommit_OPTIONS( const MultiFiles *mf)
00802     : UWidget(::UEventGetWidID())
00803 {
00804     m_mf              = mf;
00805     m_localforcerev   = false;
00806     m_forceCommit     = false;
00807     m_forceRecurse    = false;
00808     m_forceRevision   = false;
00809     m_noModuleProgram = false;
00810     m_noRecurse       = false;
00811     m_checkValidEdits = (bool)gCheckValidEdits;
00812 }
00813
00814 void UCvsCommit_OPTIONS::DoDataExchange(bool fill)
00815 {
00816     if(fill)
00817     {
00818         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kForceCommit, m_forceCommit), 0L);
00819         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kForceRecurse, m_forceRecurse), 0L);
00820         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kForceRevision, m_forceRevision), 0L);
00821         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kNoRunModuleProgram, m_noModuleProgram), 0L);
00822         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kNoRecurse, m_noRecurse), 0L);
00823         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckValidEdits, m_checkValidEdits), 0L);
00824
00825         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kRevList, 0L);
00826         const std::vector<UStr> & list = gRevNames.GetList();
00827         std::vector<UStr>::const_iterator i;
00828         for(i = list.begin(); i != list.end(); ++i)
00829         {
00830             UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kRevList, (void *)(const char *)(*i));
00831         }
00832         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRevList, m_forceRevision), 0L);
00833         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kBrowseRev, m_forceRevision), 0L);
00834     }
00835     else
00836     {
00837         m_forceCommit = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceCommit, 0L);
00838         m_forceRecurse = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceRecurse, 0L);
00839         m_forceRevision = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceRevision, 0L);
00840         m_noModuleProgram = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kNoRunModuleProgram, 0L);
00841         m_noRecurse = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kNoRecurse, 0L);
00842         m_checkValidEdits = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckValidEdits, 0L);
00843         UEventSendMessage(GetWidID(), EV_GETTEXT, kRevList, &m_rev);
00844     }
00845 }
00846
00847 ev_msg int UCvsCommit_OPTIONS::OnBrowseRevision(void)
00848 {
00849     CStr tagName;
00850     if( CompatGetTagListItem(m_mf, tagName) )
00851     {
00852         m_rev = (const char*)tagName;
00853         if( !m_rev.empty())
00854         {
00855             UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kRevList, (void *)(const char *)tagName);
00856             int sel = UEventSendMessage(GetWidID(), EV_COMBO_GETCOUNT, kRevList, 0L);
00857             UEventSendMessage(GetWidID(), EV_COMBO_SETSEL, UMAKEINT(kRevList, sel-1), 0L);
00858         }
00859     }
00860     return 0;
00861 }
00862
00863 ev_msg int UCvsCommit_OPTIONS::OnForceHit(void)
00864 {
00865     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceRevision, 0L);
00866     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRevList, state), 0L);
00867     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kBrowseRev, state), 0L);
00868     return 0;
00869 }
00870
00871 void UCvsCommit_OPTIONS::OnRevisionSel(int pos, const char *txt)
00872 {
00873     m_rev = txt;
00874 }
00875
00876
00877 #endif // qUnix
00878
00882 bool CompatGetCommit(const MultiFiles* mf,
00883                      CStr& commit, bool& norecurs,
00884                      bool& forceCommit, bool& forceRecurse, CStr& rev, bool& noModuleProgram,
00885                      bool& checkValidEdits)
00886 {
00887     bool userHitOK = false;
00888
00889     static CStr sLastMsg;
00890     static CStr sLastRev;
00891
00892     bool hasRev = false;
00893
00894     norecurs = false;
00895     commit = "";
00896     forceCommit = false;
00897     forceRecurse = false;
00898     rev = "";
00899     noModuleProgram = false;
00900     checkValidEdits = (bool)gCheckValidEdits;
00901
00902 #ifdef WIN32
00903     CHHelpPropertySheet pages("Commit settings");
00904     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00905
00906     CCommit_MAIN page1(mf, sLastMsg);
00907     CCommit_OPTIONS page2(mf);
00908     CGetPrefs_GLOBALS page3;
00909
00910     pages.AddPage(&page1);
00911     pages.AddPage(&page2);
00912     pages.AddPage(&page3);
00913
00914     if( pages.DoModal() == IDOK )
00915     {
00916         commit = (const char*)page1.GetLogMsg();
00917         sLastMsg = (const char*)page1.GetLogMsg();
00918
00919         norecurs = page2.m_noRecurse ? true : false;
00920         forceCommit = page2.m_forceCommit ? true : false;
00921         forceRecurse = page2.m_forceRecurse ? true : false;
00922         hasRev = page2.m_forceRevision ? true : false;
00923         sLastRev = page2.m_rev;
00924         noModuleProgram = page2.m_noModuleProgram ? true : false;
00925         gCheckValidEdits = page2.m_checkValidEdits ? true : false;
00926
00927         page3.StoreValues();
00928
00929         userHitOK = true;
00930     }
00931 #endif /* WIN32 */
00932
00933 #ifndef WIN32
00934     // Redundant, to be phased out since it can be extracted in the dialog itself
00935     const char* pathTmpl = 0L;
00936     CStr tmpl;
00937     if( mf->NumDirs() > 0 )
00938     {
00939         if( mf->getdir(0, tmpl) )
00940         {
00941             pathTmpl = tmpl.c_str();
00942         }
00943     }
00944 #endif
00945
00946 #ifdef qMacCvsPP
00947     StDialogHandler theHandler(dlg_Commit, LCommander::GetTopCommander());
00948     LWindow *theDialog = theHandler.GetDialog();
00949     ThrowIfNil_(theDialog);
00950     static UInt16 sRuntimePanel = 1;
00951     UInt16      msgEncoding(sCommitMsgEncoding);
00952
00953     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00954         (theDialog->FindPaneByID(item_MultiViewPrefs));
00955     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00956
00957     multiView->SwitchToPanel(3);
00958     DoDataExchange_Globals(theDialog, true);
00959     multiView->SwitchToPanel(2);
00960     DoDataExchange_CommitOptions(theDialog, mf, norecurs, forceCommit, forceRecurse, hasRev, sLastRev, noModuleProgram, true);
00961     multiView->SwitchToPanel(1);
00962     DoDataExchange_Commit(theDialog, sLastMsg, pathTmpl, msgEncoding, true);
00963
00964     LPopupButton *previewDiff = dynamic_cast<LPopupButton*>
00965                                 (theDialog->FindPaneByID(item_PreviewDiffPopup));
00966     LPushButton *previewBtn = dynamic_cast<LPushButton*>
00967                                 (theDialog->FindPaneByID(item_PreviewDiffBtn));
00968     previewBtn->AddListener(&theHandler);
00969     previewDiff->DeleteAllMenuItems();
00970     if( mf && mf->TotalNumFiles() )
00971     {
00972         MultiFiles::const_iterator mfi;
00973         for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00974         {
00975             for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
00976             {
00977                 UStr path;
00978                 UStr fileName, currRev;
00979
00980                 mfi->get(nIndex, path, fileName, currRev);
00981                 if(!path.empty() && !path.endsWith(kPathDelimiter))
00982                     path << kPathDelimiter;
00983                 path << fileName;
00984                 previewDiff->InsertMenuItem(LStr255(path), ::CountMenuItems(previewDiff->GetMacMenuH()));
00985             }
00986         }
00987     }
00988     else
00989     {
00990         previewDiff->Disable();
00991         previewBtn->Disable();
00992     }
00993
00994     groupView->SetValue(sRuntimePanel);
00995     theDialog->Show();
00996     MessageT hitMessage;
00997     while (true)
00998     {       // Let DialogHandler process events
00999         hitMessage = theHandler.DoDialog();
01000
01001         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01002             break;
01003
01004         if(hitMessage == item_PreviewDiffBtn)
01005         {
01006             int file = previewDiff->GetCurrentMenuItem(), count = 1;
01007             MultiFiles::const_iterator mfi;
01008             for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01009             {
01010                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++, count++)
01011                 {
01012                     if(count == file)
01013                     {
01014                         UStr path;
01015                         UStr fileName, currRev;
01016                         mfi->get(nIndex, path, fileName, currRev);
01017
01018                         MultiFiles mf;
01019                         mf.newdir(path);
01020                         mf.newfile(fileName, 0, currRev);
01021
01022                         KoDiffHandler handler;
01023                         handler.OnFiles(&mf);
01024                         break;
01025                     }
01026                 }
01027             }
01028         }
01029     }
01030     theDialog->Hide();
01031     sRuntimePanel = groupView->GetValue();
01032
01033     if(hitMessage == msg_OK)
01034     {
01035         multiView->SwitchToPanel(1);
01036         DoDataExchange_Commit(theDialog, sLastMsg, pathTmpl, msgEncoding, false);
01037         multiView->SwitchToPanel(2);
01038         DoDataExchange_CommitOptions(theDialog, mf, norecurs, forceCommit, forceRecurse, hasRev, sLastRev, noModuleProgram, false);
01039         multiView->SwitchToPanel(3);
01040         DoDataExchange_Globals(theDialog, false);
01041         sCommitMsgEncoding = msgEncoding;
01042         if ( msgEncoding == kMsgEncodingUTF8 ) {
01043         commit = sLastMsg;
01044         } else {
01045           commit = ConvertString(sLastMsg, kCFStringEncodingUTF8, msgEncoding == kMsgEncodingMacOSRoman ? kCFStringEncodingMacRoman : kCFStringEncodingISOLatin1, true);
01046         }
01047         commit.replace('\015', '\012');
01048         userHitOK = true;
01049     }
01050 #endif /* qMacCvsPP */
01051 #if qUnix
01052     void *wid = UCreate_CommitDlg();
01053
01054     UCvsCommit *dlg = new UCvsCommit();
01055     UCvsCommit_MAIN *tab1 = new UCvsCommit_MAIN( mf, sLastMsg, pathTmpl);
01056     UCvsCommit_OPTIONS *tab2 = new UCvsCommit_OPTIONS( mf);
01057
01058     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01059     dlg->AddPage(tab1, UCvsCommit::kTabGeneral, 0);
01060     dlg->AddPage(tab2, UCvsCommit::kTabGeneral, 1);
01061
01062     if(dlg->DoModal())
01063     {
01064         commit = tab1->m_logmsg;
01065         sLastMsg = tab1->m_logmsg;
01066         norecurs = tab2->m_noRecurse;
01067         forceCommit = tab2->m_forceCommit;
01068         forceRecurse = tab2->m_forceRecurse;
01069         hasRev = tab2->m_forceRevision;
01070         sLastRev = tab2->m_rev;
01071         noModuleProgram = tab2->m_noModuleProgram;
01072         gCheckValidEdits = tab2->m_checkValidEdits;
01073
01074         userHitOK = true;
01075     }
01076
01077     delete dlg;
01078 #endif // qUnix
01079
01080     if( userHitOK )
01081     {
01082         if( commit.length() == 0 )
01083             commit = "no message";
01084
01085         if( hasRev && !sLastRev.empty() )
01086             rev = sLastRev;
01087
01088         checkValidEdits = (bool)gCheckValidEdits;
01089
01090         gCvsPrefs.save();
01091     }
01092
01093     return userHitOK;
01094 }
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFolders.cpp Source File

common/UCvsFolders.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #if qGTK
00028 #   include <gtk/gtk.h>
00029 #endif
00030
00031 #ifdef HAVE_UNISTD_H
00032 #include <unistd.h>
00033 #endif
00034
00035 #include "UCvsFolders.h"
00036 #include "UCvsDialogs.h"
00037 #include "UCvsApp.h"
00038 #include "UCvsFiles.h"
00039 #include "UCvsCommands.h"
00040 #include "UCvsFrame.h"
00041 #include "MultiString.h"
00042 #include "FileTraversal.h"
00043 #include "CvsEntries.h"
00044 #include "CvsPrefs.h"
00045 #include "AppConsole.h"
00046 #include "CvsCommands.h"
00047 #include "TclGlue.h"
00048 #ifdef USE_PYTHON
00049 #   include "PythonGlue.h"
00050 #endif
00051 #include "MacrosSetup.h"
00052 #include "CvsArgs.h"
00053 #include "CvsAlert.h"
00054
00055 #ifdef WIN32
00056 static PCPStr gOldLoc("P_BrowserLoc", "C:\\");
00057 #endif
00058
00059 #ifdef qUnix
00060 static PCPStr gOldLoc("P_BrowserLoc");
00061 #endif
00062
00063 static const char *gDummyFile = "@@@dummy file@@@";
00064
00065 static CMString gHistoryLocs(100, "P_BrowserLocs");
00066
00067 static void *sFolderIcon;
00068 static void *sFolderUnknownIcon;
00069 static void *sFolderIgnoredIcon;
00070 static void *sFolderMissingIcon;
00071
00072 enum
00073 {
00074     kIconFolderClosed,
00075     kIconFolderOpened,
00076     kIconFolderCVSClosed,
00077     kIconFolderCVSOpened,
00078     kIconFolderIgnoreClosed,
00079     kIconFolderIgnoreOpened,
00080     kIconFolderIgnoreLost
00081 };
00082
00083 UIMPLEMENT_DYNAMIC(UCvsFolders, UWidget)
00084
00085 UBEGIN_MESSAGE_MAP(UCvsFolders, UWidget)
00086     ON_UUPDATECMD(cmdUPDATE, UCvsFolders::OnCmdUIUpdate)
00087     ON_UUPDATECMD(cmdCOMMIT, UCvsFolders::OnCmdUIUpdate)
00088     ON_UUPDATECMD(cmdDIFF, UCvsFolders::OnCmdUIUpdate)
00089     ON_UUPDATECMD(cmdEDIT, UCvsFolders::OnCmdUIUpdate)
00090     ON_UUPDATECMD(cmdRESEDIT, UCvsFolders::OnCmdUIResEdit)
00091     ON_UUPDATECMD(cmdEDITORS, UCvsFolders::OnCmdUIUpdate)
00092     ON_UUPDATECMD(cmdLOCKF, UCvsFolders::OnCmdUIUpdate)
00093     ON_UUPDATECMD(cmdLOG, UCvsFolders::OnCmdUIUpdate)
00094     ON_UUPDATECMD(cmdRELEASE, UCvsFolders::OnCmdUIUpdate)
00095     ON_UUPDATECMD(cmdSTATUS, UCvsFolders::OnCmdUIUpdate)
00096     ON_UUPDATECMD(cmdUNEDIT, UCvsFolders::OnCmdUIUpdate)
00097     ON_UUPDATECMD(cmdUPDATE, UCvsFolders::OnCmdUIUpdate)
00098     ON_UUPDATECMD(cmdQUERYUPDATE, UCvsFolders::OnCmdUIUpdate)
00099     ON_UUPDATECMD(cmdUNLOCKF, UCvsFolders::OnCmdUIUpdate)
00100     ON_UUPDATECMD(cmdWATCHERS, UCvsFolders::OnCmdUIUpdate)
00101     ON_UUPDATECMD(cmdWATCHON, UCvsFolders::OnCmdUIUpdate)
00102     ON_UUPDATECMD(cmdWATCHOFF, UCvsFolders::OnCmdUIUpdate)
00103     ON_UUPDATECMD(cmdTAGNEW, UCvsFolders::OnCmdUIUpdate)
00104     ON_UUPDATECMD(cmdTAGDELETE, UCvsFolders::OnCmdUIUpdate)
00105     ON_UUPDATECMD(cmdTAGBRANCH, UCvsFolders::OnCmdUIUpdate)
00106     ON_UUPDATECMD(cmdADD, UCvsFolders::OnCmdUIAdd)
00107     ON_UUPDATECMD(cmdEXPLORE, UCvsFolders::OnCmdUIExplore)
00108     ON_UUPDATECMD(cmdCHECKOUT, UCvsFolders::OnCmdUICheckout)
00109     ON_UUPDATECMD(cmdIMPORT, UCvsFolders::OnCmdUIImport)
00110 #ifdef USE_PYTHON
00111     ON_UUPDATECMD_RANGE(cmdPyMACROS, cmdPyMACROSEND, UCvsFolders::OnCmdUIMacrosSel)
00112 #else
00113     ON_UUPDATECMD_RANGE(cmdSELMACRO, cmdSELMACROEND, UCvsFolders::OnCmdUIMacrosSel)
00114 #endif
00115     ON_UDESTROY(UCvsFolders)
00116     ON_UCREATE(UCvsFolders)
00117     ON_TREE_EXPANDING(kUMainWidget, UCvsFolders::OnTreeExpanding)
00118     ON_TREE_SELECTING(kUMainWidget, UCvsFolders::OnTreeSelecting)
00119     ON_UCOMMAND(cmdUPDATE, UCvsFolders::OnCmdUpdate)
00120     ON_UCOMMAND(cmdADD, UCvsFolders::OnCmdAdd)
00121     ON_UCOMMAND(cmdCOMMIT, UCvsFolders::OnCmdCommit)
00122     ON_UCOMMAND(cmdQUERYUPDATE, UCvsFolders::OnCmdQueryUpdate)
00123     ON_UCOMMAND(cmdDIFF, UCvsFolders::OnCmdDiff)
00124     ON_UCOMMAND(cmdLOG, UCvsFolders::OnCmdLog)
00125     ON_UCOMMAND(cmdSTATUS, UCvsFolders::OnCmdStatus)
00126     ON_UCOMMAND(cmdLOCKF, UCvsFolders::OnCmdLock)
00127     ON_UCOMMAND(cmdUNLOCKF, UCvsFolders::OnCmdUnlock)
00128     ON_UCOMMAND(cmdWATCHON, UCvsFolders::OnCmdWatchOn)
00129     ON_UCOMMAND(cmdWATCHOFF, UCvsFolders::OnCmdWatchOff)
00130     ON_UCOMMAND(cmdEDIT, UCvsFolders::OnCmdEdit)
00131     ON_UCOMMAND(cmdRESEDIT, UCvsFolders::OnCmdResEdit)
00132     ON_UCOMMAND(cmdUNEDIT, UCvsFolders::OnCmdUnedit)
00133     ON_UCOMMAND(cmdWATCHERS, UCvsFolders::OnCmdWatchers)
00134     ON_UCOMMAND(cmdEDITORS, UCvsFolders::OnCmdEditors)
00135     ON_UCOMMAND(cmdRELEASE, UCvsFolders::OnCmdRelease)
00136     ON_UCOMMAND(cmdTAGNEW, UCvsFolders::OnCmdTagNew)
00137     ON_UCOMMAND(cmdTAGDELETE, UCvsFolders::OnCmdTagDelete)
00138     ON_UCOMMAND(cmdTAGBRANCH, UCvsFolders::OnCmdTagBranch)
00139     ON_UCOMMAND(cmdEXPLORE, UCvsFolders::OnCmdExplore)
00140     ON_UCOMMAND(cmdCHECKOUT, UCvsFolders::OnCmdCheckout)
00141     ON_UCOMMAND(cmdIMPORT, UCvsFolders::OnCmdImport)
00142 #ifdef USE_PYTHON
00143     ON_UCOMMAND_RANGE(cmdPyMACROS, cmdPyMACROSEND, UCvsFolders::OnCmdMacrosSel)
00144 #else
00145     ON_UCOMMAND_RANGE(cmdSELMACRO, cmdSELMACROEND, UCvsFolders::OnCmdMacrosSel)
00146 #endif
00147 UEND_MESSAGE_MAP()
00148
00149 #if 0
00150     ON_WM_RBUTTONDOWN() // TODO
00151 #endif
00152
00153 static bool sTemporaryTurnOffNotify = false;
00154
00155 class CTempToggleBool
00156 {
00157 public:
00158     CTempToggleBool(bool & value) : m_value(value), m_didSetIt(false)
00159     {
00160         if(!m_value)
00161         {
00162             m_didSetIt = true;
00163             m_value = true;
00164         }
00165     }
00166
00167     ~CTempToggleBool()
00168     {
00169         if(m_didSetIt)
00170             m_value = false;
00171     }
00172 protected:
00173     bool & m_value;
00174     bool m_didSetIt;
00175 };
00176
00177 static void *GetIcon(UCvsFolders *treeCrtl, UTREEITEM item, bool hasCvsInfos, bool expand, EntnodeData *data)
00178 {
00179     int newImage;
00180     void *result = 0L;
00181
00182     if(data == 0L)
00183     {
00184         if(expand)
00185             newImage = hasCvsInfos ? kIconFolderCVSOpened : kIconFolderOpened;
00186         else
00187             newImage = hasCvsInfos ? kIconFolderCVSClosed : kIconFolderClosed;
00188     }
00189     else
00190     {
00191         if(expand)
00192         {
00193             if(data->IsIgnored())
00194                 newImage = kIconFolderIgnoreOpened;
00195             else if(data->IsUnknown())
00196                 newImage = kIconFolderOpened;
00197             else if(data->IsMissing())
00198                 newImage = kIconFolderIgnoreLost;
00199             else
00200                 newImage = kIconFolderCVSOpened;
00201         }
00202         else
00203         {
00204             if(data->IsIgnored())
00205                 newImage = kIconFolderIgnoreClosed;
00206             else if(data->IsUnknown())
00207                 newImage = kIconFolderClosed;
00208             else if(data->IsMissing())
00209                 newImage = kIconFolderIgnoreLost;
00210             else
00211                 newImage = kIconFolderCVSClosed;
00212         }
00213     }
00214
00215 #if qGTK
00216     void *pixmap = 0L;
00217     switch(newImage)
00218     {
00219     case kIconFolderClosed:
00220     case kIconFolderOpened:
00221         pixmap = sFolderUnknownIcon;
00222         break;
00223     case kIconFolderCVSClosed:
00224     case kIconFolderCVSOpened:
00225         pixmap = sFolderIcon;
00226         break;
00227     case kIconFolderIgnoreClosed:
00228     case kIconFolderIgnoreOpened:
00229         pixmap = sFolderIgnoredIcon;
00230         break;
00231     case kIconFolderIgnoreLost:
00232         pixmap = sFolderMissingIcon;
00233         break;
00234     }
00235     if(pixmap != 0L)
00236     {
00237         result = gtk_pixmap_new (GTK_PIXMAP(pixmap)->pixmap, GTK_PIXMAP(pixmap)->mask);
00238     }
00239 #endif
00240
00241     return result;
00242 }
00243
00244 // regarding a path and a root item, create an
00245 // item with a dummy item inside if and only if
00246 // the folder is not empty.
00247 class TBrowserFillDummy : public TraversalReport
00248 {
00249 public:
00250     UTREEITEM   m_root;
00251     UTREEITEM   m_item;
00252     UCvsFolders *m_treeCtrl;
00253     bool        m_empty;
00254     bool        m_hascvs;
00255     EntnodeData *m_data;
00256     UStr        m_dirname;
00257
00258     TBrowserFillDummy(UCvsFolders *treeCtrl, UTREEITEM root, UTREEITEM item, EntnodeData *data) :
00259         m_root(root), m_item(item), m_treeCtrl(treeCtrl), m_empty(true),
00260         m_hascvs(false), m_data(data) {}
00261
00262     virtual ~TBrowserFillDummy() {}
00263
00264     virtual kTraversal EnterDirectory(const char *fullpath, const char *dirname, const FSSpec * macspec)
00265     {
00266         m_dirname = dirname;
00267 #if qUnix
00268         if(m_dirname.empty())
00269             m_dirname = fullpath; // '/'
00270 #endif
00271         return kContinueTraversal;
00272     }
00273
00274     virtual kTraversal ExitDirectory(const char *fullpath)
00275     {
00276         if(m_item == 0L)
00277         {
00278             UTREE_INSERT insert;
00279             insert.parent = m_root;
00280             insert.icon = GetIcon(m_treeCtrl, m_item, m_hascvs, false, m_data);
00281             insert.title = m_dirname;
00282             insert.data = 0L;
00283             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_INSERT, kUMainWidget, &insert);
00284             m_item = insert.result;
00285         }
00286
00287         // assign the entries to this item
00288         UTREE_INFO query;
00289         query.item = m_item;
00290         if(m_data != 0L)
00291         {
00292             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00293             EntnodeData *data = (EntnodeData *)query.data;
00294
00295             if(m_data != 0L)
00296                 m_data->Ref();
00297
00298             query.data = m_data;
00299             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_SETDATA, kUMainWidget, &query);
00300
00301             if(data != 0L)
00302                 data->UnRef();
00303         }
00304         else
00305         {
00306             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00307             m_data = (EntnodeData *)query.data;
00308         }
00309
00310         if(m_empty)
00311             return kContinueTraversal;
00312
00313         // add a dummy item to simulate the folder
00314         // is not empty. This dummy item will be
00315         // replaced by a complete listing when the
00316         // node is expanding...
00317
00318         UTREE_INSERT insert;
00319         insert.parent = m_item;
00320         insert.icon = 0L;
00321         insert.title = gDummyFile;
00322         insert.data = 0L;
00323         UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_INSERT, kUMainWidget, &insert);
00324
00325         return kContinueTraversal;
00326     }
00327
00328     virtual kTraversal OnError(const char *err, int errcode)
00329     {
00330     cvs_err(err);
00331     cvs_err("\n");
00332     cvs_err(strerror(errcode));
00333     cvs_err("\n");
00334         return kTraversalError;
00335     }
00336
00337     virtual kTraversal OnIdle(const char *fullpath)
00338     {
00339         return kContinueTraversal;
00340     }
00341
00342     virtual kTraversal OnDirectory(const char *fullpath,
00343         const char *fullname,
00344         const char *name,
00345         const struct stat & dir, const FSSpec * macspec)
00346     {
00347 #if qUnix
00348         if(strcmp(name, "CVS") == 0)
00349 #else
00350         if(stricmp(name, "cvs") == 0)
00351 #endif
00352             m_hascvs = true;
00353         else
00354             m_empty = false;
00355
00356         return kSkipFile;
00357     }
00358 };
00359
00360 // regarding a path and a root item, create an
00361 // item with all the subdirectories inside.
00362 class TBrowserFill : public TraversalReport
00363 {
00364 public:
00365     UTREEITEM m_root;
00366     UTREEITEM m_item;
00367     UCvsFolders *m_treeCtrl;
00368     CSortList<ENTNODE> & m_entries;
00369     std::vector<UStr> m_ignlist;
00370     bool m_isShowIgnored;
00371
00372     TBrowserFill(UCvsFolders *treeCtrl, UTREEITEM root, UTREEITEM item, CSortList<ENTNODE> & entries) :
00373             m_root(root), m_item(item), m_treeCtrl(treeCtrl),
00374             m_entries(entries), m_isShowIgnored(false)
00375     {
00376         if( UCvsApp* app = UCvsApp::gApp )
00377             m_isShowIgnored = app->GetIgnoreModel()->IsShowIgnored();
00378     }
00379
00380     virtual ~TBrowserFill() {}
00381
00382     virtual kTraversal EnterDirectory(const char *fullpath, const char *dirname, const FSSpec * macspec)
00383     {
00384         ASSERT(m_item != 0L);
00385
00386         // assign the entries to this item
00387         Entries_Open (m_entries, fullpath);
00388         BuildIgnoredList(m_ignlist, fullpath);
00389
00390         return kContinueTraversal;
00391     }
00392
00393     virtual kTraversal ExitDirectory(const char *fullpath)
00394     {
00395         m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00396
00397         UTREE_INFO query;
00398         query.item = m_item;
00399         UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00400         query.icon = GetIcon(m_treeCtrl, m_item, true /*ignored*/, true, (EntnodeData *)query.data);
00401         UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_SETICON, kUMainWidget, &query);
00402
00403         return kContinueTraversal;
00404     }
00405
00406     virtual kTraversal OnError(const char *err, int errcode)
00407     {
00408         return kTraversalError;
00409     }
00410
00411     virtual kTraversal OnIdle(const char *fullpath)
00412     {
00413         return kContinueTraversal;
00414     }
00415
00416     virtual kTraversal OnDirectory(const char *fullpath,
00417         const char *fullname,
00418         const char *name,
00419         const struct stat & dir, const FSSpec * macspec)
00420     {
00421 #if qUnix
00422         if(strcmp(name, "CVS") == 0)
00423 #else
00424         if(stricmp(name, "cvs") == 0)
00425 #endif
00426             return kSkipFile;
00427
00428         // is the sub-directory ignored ?
00429         EntnodeData *data = Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00430         if(!m_isShowIgnored && data->IsIgnored())
00431             return kSkipFile;
00432
00433 #if qUnix
00434         // suppress hidden directories
00435         if( name[0] == '.')
00436             return kSkipFile;
00437 #endif
00438
00439         // create the item for the sub-directory
00440         TBrowserFillDummy traverse(m_treeCtrl, m_item, 0L, data);
00441         /*kTraversal res = */FileTraverse(fullname, traverse);
00442
00443         // assign the icon regarding our Entries info
00444         if(traverse.m_item != 0L)
00445         {
00446             UTREE_INFO query;
00447             query.item = traverse.m_item;
00448             query.icon = GetIcon(m_treeCtrl, m_item, true /*ignored*/, false, data);
00449             UEventSendMessage(m_treeCtrl->GetWidID(), EV_TREE_SETICON, kUMainWidget, &query);
00450         }
00451
00452         return kSkipFile;
00453     }
00454 };
00455
00456 UCvsFolders::UCvsFolders() : UWidget(kUCvsFoldersID)
00457 {
00458 }
00459
00460 UCvsFolders::~UCvsFolders()
00461 {
00462 }
00463
00464 // Process the selection handler command
00465 // param:  handler Command selection handler
00466 // return: true if the command was processed, false otherwise
00467
00468 int UCvsFolders::ProcessSelectionCommand(KiSelectionHandler& handler)
00469 {
00470   bool res = false;
00471   UTREEITEM *selItem;
00472
00473     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
00474
00475   if( selItem ) {
00476     UStr path;
00477     RetrievePath(selItem, path);
00478
00479     handler.OnFolder(path);
00480     res = true;
00481   } else {
00482     CvsAlert alert(kCvsAlertWarningIcon,
00483                    "Checkout folder required",
00484                    "Please select a folder before checking out a module",
00485                    BUTTONTITLE_OK,
00486                    NULL
00487                    );
00488     alert.ShowAlert();  }
00489
00490   return res;
00491 }
00492
00493 void UCvsFolders::OnDestroy(void)
00494 {
00495     delete this;
00496 }
00497
00498 void UCvsFolders::OnCreate(void)
00499 {
00500     if(sFolderIcon == 0L)
00501     {
00502         sFolderIcon = UCreate_pixmap(this, "folder.xpm");
00503         sFolderUnknownIcon = UCreate_pixmap(this, "foldunk.xpm");
00504         sFolderIgnoredIcon = UCreate_pixmap(this, "foldign.xpm");
00505         sFolderMissingIcon = UCreate_pixmap(this, "foldmiss.xpm");
00506     }
00507     UStr newpath;
00508     newpath = (const char *)gOldLoc;
00509     if(newpath.empty())
00510         newpath = gCvsPrefs.Home();
00511
00512     // set the initial root
00513     ResetBrowser(newpath, true);
00514 }
00515
00516 void UCvsFolders::ResetBrowser(const char *path, bool notifyView)
00517 {
00518     UWaitCursor wait;
00519
00520     // Must make a copy of 'path' before calling DeleteAllItems(), since
00521     // this function may have been called with 'm_root' passed as the first
00522     // parameter (in fact it is in several places in the code) whose value
00523     // gets deleted by the call to DeleteAllItems() below, making 'path'
00524     // point to an invalid memory location
00525     CStr pathCopy(path);
00526     DeleteAllItems();
00527     bool isReload = !pathCopy.empty() && !m_root.empty() && stricmp(m_root, pathCopy) == 0;
00528
00529     m_root = pathCopy;
00530
00531     if( pathCopy.empty() )
00532         return;
00533
00534     if(!isReload)
00535     {
00536         if(HasPersistentSettings(m_root))
00537             LoadPersistentSettings(m_root);
00538         else
00539         {
00540             // check if the path has a CVS folder. If not,
00541             // we don't want the user to be prompted (like when
00542             // WinCvs is starting for the first time).
00543             UStr cvsFolder(m_root);
00544             if(!cvsFolder.endsWith(kPathDelimiter))
00545                 cvsFolder << kPathDelimiter;
00546             cvsFolder << "CVS";
00547             struct stat sb;
00548             if (stat(cvsFolder, &sb) != -1 && S_ISDIR(sb.st_mode))
00549                 AskCreatePersistentSettings(m_root);
00550         }
00551     }
00552
00553     if(stricmp(gOldLoc, m_root) != 0)
00554         gOldLoc = m_root;
00555
00556     // update the history combo
00557     gHistoryLocs.Insert(m_root);
00558     UEventSendMessage(kUCvsFrameID, EV_COMBO_RESETALL, UCvsFrame::kDirCombo, 0L);
00559     const std::vector<UStr> & list = gHistoryLocs.GetList();
00560     std::vector<UStr>::const_iterator i;
00561     int pos = 0;
00562     for(i = list.begin(); i != list.end(); ++i, pos++)
00563     {
00564         UEventSendMessage(kUCvsFrameID, EV_COMBO_APPEND,
00565                           UCvsFrame::kDirCombo, (void *)(const char *)*i);
00566     }
00567     UEventSendMessage(kUCvsFrameID, EV_COMBO_SETSEL, UMAKEINT(UCvsFrame::kDirCombo, 0), 0L);
00568
00569     // fill the browser
00570     TBrowserFillDummy traverse(this, 0L, 0L, 0L);
00571     /*kTraversal res = */FileTraverse(m_root, traverse);
00572
00573     if(traverse.m_item != 0L)
00574     {
00575         UEventSendMessage(GetWidID(), EV_TREE_EXPAND, UMAKEINT(kUMainWidget, 0), traverse.m_item);
00576         if(notifyView && UCvsApp::gApp->GetFilesView())
00577             UCvsApp::gApp->GetFilesView()->ResetView(pathCopy, false);
00578     }
00579 }
00580
00581 void UCvsFolders::ResetView(bool forceReload, bool notifyView)
00582 {
00583     UWaitCursor doWait;
00584
00585     std::vector<UStr> allExpanded;
00586     StoreExpanded(allExpanded);
00587
00588     bool contentChanged = false;
00589     UStr selPath;
00590     UTREEITEM selItem;
00591     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
00592     if(selItem != 0L)
00593         RetrievePath(selItem, selPath);
00594
00595     if(forceReload)
00596     {
00597         ResetBrowser(m_root);
00598         contentChanged = true;
00599     }
00600
00601     if(contentChanged)
00602     {
00603         // restore the expanded paths and the selected item
00604         std::vector<UStr>::const_iterator i;
00605         for(i = allExpanded.begin(); i != allExpanded.end(); ++i)
00606         {
00607             StepToLocation(*i);
00608         }
00609         if(!selPath.empty())
00610         {
00611             selItem = GetItemByLocation(selPath);
00612             if(selItem != 0L)
00613                 UEventSendMessage(GetWidID(), EV_TREE_SELECT, UMAKEINT(kUMainWidget, 0), selItem);
00614         }
00615     }
00616
00617     // we don't need to notify the file view if we force the reload
00618     // because that's already done
00619     if(notifyView)
00620     {
00621         UCvsApp::gApp->GetFilesView()->ResetView(forceReload, false);
00622     }
00623     UEventSendMessage(GetWidID(), EV_CHGFOCUS, kUMainWidget, 0L);
00624 }
00625
00626 void UCvsFolders::StoreExpanded(std::vector<UStr> & allExpanded, UTREEITEM root)
00627 {
00628     UTREE_INFO query;
00629     query.item = root;
00630     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00631
00632     UTREEITEM item = query.item;
00633     if(item == 0L)
00634         return;
00635
00636     if(query.expanded)
00637     {
00638         UStr path;
00639         RetrievePath(item, path);
00640         allExpanded.push_back(path);
00641     }
00642
00643     UTREEITEM childItem = query.child;
00644
00645     while(childItem != 0L)
00646     {
00647         StoreExpanded(allExpanded, childItem);
00648         query.item = childItem;
00649         UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00650         childItem = query.next;
00651     }
00652 }
00653
00654 void UCvsFolders::StepToLocation(const char *path, bool notifyView)
00655 {
00656     UStr root(m_root);
00657     if(!root.endsWith(kPathDelimiter))
00658         root << kPathDelimiter;
00659     UStr subpath(path);
00660     if(!subpath.endsWith(kPathDelimiter))
00661         subpath << kPathDelimiter;
00662
00663     // check if it is a sub-path
00664     if(strncmp(root, subpath, root.length()) != 0)
00665         return;
00666
00667     UTREE_INFO query;
00668     query.item = 0L;
00669     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00670
00671     UTREEITEM item = query.item;
00672     UTREEITEM lastitem = 0L;
00673     if(item == 0L)
00674         return;
00675
00676     // step inside synchronized
00677     const char *tmp = (const char *)subpath + root.length() - 1;
00678     while((tmp = strchr(tmp, kPathDelimiter)) != 0L)
00679     {
00680         const char *name = ++tmp;
00681         if(name[0] == '\0')
00682             break;
00683
00684         UStr subname;
00685         const char *tmp2 = strchr(name, kPathDelimiter);
00686         if(tmp2 == 0L)
00687             subname = name;
00688         else
00689             subname.set(name, tmp2 - name);
00690
00691         query.item = item;
00692         UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00693         UTREEITEM childItem = query.child;
00694
00695         // find the subitem which matches this name
00696         while(childItem != 0L)
00697         {
00698             query.item = childItem;
00699             UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00700             EntnodeData *data = (EntnodeData *)query.data;
00701             if(data != 0L)
00702             {
00703 #ifdef qUnix
00704                 if(strcmp((*data)[EntnodeData::kName], subname) == 0)
00705 #else
00706                 if(_stricmp((*data)[EntnodeData::kName], subname) == 0)
00707 #endif
00708                 {
00709                     // found it !
00710                     lastitem = item = childItem;
00711                     UEventSendMessage(GetWidID(), EV_TREE_EXPAND, UMAKEINT(kUMainWidget, 0), item);
00712                     break;
00713                 }
00714             }
00715
00716             childItem = query.next;
00717         }
00718     }
00719
00720     // in case this is called by the view, turn off notifying
00721     // when the item gets selected
00722     if(lastitem != 0L)
00723     {
00724         if(!notifyView)
00725         {
00726             CTempToggleBool toggler(sTemporaryTurnOffNotify);
00727             UEventSendMessage(GetWidID(), EV_TREE_SELECT, UMAKEINT(kUMainWidget, 0), lastitem);
00728         }
00729         else
00730         {
00731             UEventSendMessage(GetWidID(), EV_TREE_SELECT, UMAKEINT(kUMainWidget, 0), lastitem);
00732         }
00733     }
00734 }
00735
00736 UTREEITEM UCvsFolders::GetItemByLocation(const char *path)
00737 {
00738     UStr root(m_root);
00739     if(!root.endsWith(kPathDelimiter))
00740         root << kPathDelimiter;
00741     UStr subpath(path);
00742     if(!subpath.endsWith(kPathDelimiter))
00743         subpath << kPathDelimiter;
00744
00745     // check if it is a sub-path
00746     if(strncmp(root, subpath, root.length()) != 0)
00747         return 0L;
00748
00749     UTREE_INFO query;
00750     query.item = 0L;
00751     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00752     UTREEITEM item = query.item;
00753     if(item == 0L)
00754         return 0L;
00755
00756     // step inside synchronized
00757     const char *tmp = (const char *)subpath + root.length() - 1;
00758     while((tmp = strchr(tmp, kPathDelimiter)) != 0L)
00759     {
00760         const char *name = ++tmp;
00761         if(name[0] == '\0')
00762             break;
00763
00764         CStr subname;
00765         const char *tmp2 = strchr(name, kPathDelimiter);
00766         if(tmp2 == 0L)
00767             subname = name;
00768         else
00769             subname.set(name, tmp2 - name);
00770
00771         UTREEITEM childItem = query.child;
00772
00773         // find the subitem which matches this name
00774         while(childItem != 0L)
00775         {
00776             query.item = childItem;
00777             UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00778             EntnodeData *data = (EntnodeData *)query.data;
00779             if(data != 0L)
00780             {
00781 #if qUnix
00782                 if(strcmp((*data)[EntnodeData::kName], subname) == 0)
00783 #else
00784                 if(_stricmp((*data)[EntnodeData::kName], subname) == 0)
00785 #endif
00786                 {
00787                     item = childItem;
00788                     break;
00789                 }
00790             }
00791
00792             childItem = query.next;
00793         }
00794         if(childItem == 0L)
00795             return 0L;
00796     }
00797
00798     return item;
00799 }
00800
00801 void UCvsFolders::OnTreeExpanding(int collapse, UTREEITEM item)
00802 {
00803     // many situations make that we enter here twice. Fortunately enough
00804     // we only dare the first signal.
00805     static bool sSemaphore = false;
00806     USemaphore policeman(sSemaphore);
00807     if(policeman.IsEnteredTwice())
00808         return;
00809
00810     UWaitCursor wait;
00811
00812     UTREE_INFO query;
00813     query.item = item;
00814     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00815     EntnodeData *data = (EntnodeData *)query.data;
00816
00817     // we refuse to expand in this case cause the folder is not really here
00818     if(data != 0L && data->IsMissing())
00819     {
00820         UEventSendMessage(GetWidID(), EV_TREE_EXPAND, UMAKEINT(kUMainWidget, 1), item);
00821         return;
00822     }
00823
00824     // erase all the childs
00825     DeleteAllItems(item);
00826
00827     UStr path;
00828     RetrievePath(item, path);
00829
00830     if(collapse)
00831     {
00832         TBrowserFillDummy traverse(this, 0L, item, 0L);
00833         /*kTraversal res = */FileTraverse(path, traverse);
00834     }
00835     else
00836     {
00837         CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00838         TBrowserFill traverse(this, 0L, item, entries);
00839         /*kTraversal res = */FileTraverse(path, traverse);
00840
00841 #if qGTK
00842         // gtk is closing the tree when we removed everything in it
00843         UEventSendMessage(GetWidID(), EV_TREE_EXPAND, UMAKEINT(kUMainWidget, 0), item);
00844 #endif
00845
00846         // add the missing folders
00847         Entries_SetMissing(entries);
00848         int numEntries = entries.NumOfElements();
00849         for(int i = 0; i < numEntries; i++)
00850         {
00851             const ENTNODE & theNode = entries.Get(i);
00852             EntnodeData *data = ((ENTNODE *)&theNode)->Data();
00853             if(!data->IsMissing() || data->GetType() != ENT_SUBDIR)
00854                 continue;
00855
00856             UTREE_INSERT insert;
00857             insert.parent = item;
00858             insert.icon = GetIcon(this, item, false, false, data->Ref());
00859             insert.title = (*data)[EntnodeData::kName];
00860             insert.data = data;
00861             UEventSendMessage(GetWidID(), EV_TREE_INSERT, kUMainWidget, &insert);
00862         }
00863     }
00864 }
00865
00866 void UCvsFolders::OnTreeSelecting(int deselect, UTREEITEM item)
00867 {
00868     if(deselect)
00869         return;
00870
00871     UTREE_INFO query;
00872     query.item = item;
00873     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00874     EntnodeData *data = (EntnodeData *)query.data;
00875     if(data != 0L && data->IsMissing())
00876         return;
00877
00878     UCvsFiles *fileView = UCvsApp::gApp->GetFilesView();
00879
00880     if(!sTemporaryTurnOffNotify && fileView)
00881     {
00882         UStr path;
00883         RetrievePath(item, path);
00884
00885         // reset file view only if path changes
00886         if(fileView->GetPath() != path)
00887         {
00888             ASSERT(fileView->IsKindOf(URUNTIME_CLASS(UCvsFiles)));
00889             fileView->ResetView(path.c_str(), false);
00890         }
00891
00892         /* recover the focus */
00893         UEventSendMessage(GetWidID(), EV_CHGFOCUS, kUMainWidget, 0L);
00894     }
00895 }
00896
00897 void UCvsFolders::SetDefaultRoot(const char *root)
00898 {
00899     struct stat sb;
00900
00901     if (stat(root, &sb) == -1 || !S_ISDIR(sb.st_mode))
00902     {
00903         cvs_err(_i18n("Cannot access directory '%s' (error %d)\n"), root, errno);
00904         return;
00905     }
00906
00907     gOldLoc = root;
00908 }
00909
00910 void UCvsFolders::RetrievePath(UTREEITEM item, UStr & path)
00911 {
00912     UStr tmp, newPath;
00913     path = "";
00914
00915     do
00916     {
00917         UTREE_INFO query;
00918         query.item = item;
00919         UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00920
00921         item = query.parent;
00922
00923         tmp = path;
00924         newPath = item == 0L ? (const char *)m_root : query.title;
00925         if(!newPath.endsWith(kPathDelimiter))
00926             newPath << kPathDelimiter;
00927         newPath << path;
00928         path = newPath;
00929     } while(item != 0L);
00930 }
00931
00932 void UCvsFolders::DeleteAllItems(void)
00933 {
00934     DeleteAllItems(NULL);
00935 }
00936
00937 void UCvsFolders::DeleteAllItems(UTREEITEM root)
00938 {
00939     // we don't want the file view to be notified when things get deleted
00940     CTempToggleBool toggler(sTemporaryTurnOffNotify);
00941
00942     UTREE_INFO query;
00943     bool eraseRoot = false;
00944     query.item = root;
00945     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
00946     if(root == 0L)
00947     {
00948         root = query.item;
00949         eraseRoot = true;
00950     }
00951
00952     if(root == 0L)
00953         return;
00954
00955     UTREEITEM childItem = query.child;
00956
00957     // erase all the childs
00958     while(childItem != 0L)
00959     {
00960         UTREE_INFO queryChild;
00961         queryChild.item = childItem;
00962         UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &queryChild);
00963
00964         EntnodeData *data = (EntnodeData *)queryChild.data;
00965         if(data != 0L)
00966         {
00967             queryChild.data = 0L; // So that subsequent references after UnRef() won't SEGV
00968             UEventSendMessage(GetWidID(), EV_TREE_SETDATA, kUMainWidget, &queryChild);
00969             data->UnRef();  // Or move this one after DeleteAllItems? so we don't loose one system call. For now, safe way
00970         }
00971
00972         DeleteAllItems(childItem);
00973
00974         UEventSendMessage(GetWidID(), EV_TREE_DELETE, kUMainWidget, childItem);
00975         childItem = queryChild.next;
00976     }
00977
00978     // erase the root only if initially root was 0L
00979     if(eraseRoot)
00980     {
00981         EntnodeData *data = (EntnodeData *)query.data;
00982         ASSERT(data == 0L);
00983
00984         UEventSendMessage(GetWidID(), EV_TREE_DELETE, kUMainWidget, root);
00985     }
00986 }
00987
00988 bool UCvsFolders::DisableGeneric()
00989 {
00990     UCvsApp *app = UCvsApp::gApp;
00991     return app->IsCvsRunning() || gCvsPrefs.empty() || !HasFocus();
00992 }
00993
00994 void UCvsFolders::OnUpdateGeneric(UCmdUI* pCmdUI, bool needCvsInfos)
00995 {
00996     if(DisableGeneric())
00997     {
00998         pCmdUI->Enable(false);
00999         return;
01000     }
01001
01002     UTREEITEM *item;
01003     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &item);
01004     if(item == 0L)
01005     {
01006         pCmdUI->Enable(false);
01007         return;
01008     }
01009
01010     UStr path;
01011     RetrievePath(item, path);
01012     if(!path.endsWith(kPathDelimiter))
01013         path << kPathDelimiter;
01014     path << "CVS";
01015
01016     struct stat sb;
01017     if (stat(path, &sb) == -1 || !S_ISDIR(sb.st_mode))
01018         pCmdUI->Enable(!needCvsInfos);
01019     else
01020         pCmdUI->Enable(needCvsInfos);
01021 }
01022
01023
01024
01025 int UCvsFolders::OnCmdUpdate(void)
01026 {
01027   KoUpdateHandler handler;
01028   return ProcessSelectionCommand(handler);
01029 }
01030
01031 void UCvsFolders::OnCmdUIUpdate(UCmdUI *pCmdUI)
01032 {
01033     OnUpdateGeneric(pCmdUI, true);
01034 }
01035
01036 int UCvsFolders::OnCmdAdd(void)
01037 {
01038     KoAddHandler handler;
01039     return ProcessSelectionCommand(handler);
01040 }
01041
01042 int UCvsFolders::OnCmdCommit(void)
01043 {
01044     KoCommitHandler handler;
01045     return ProcessSelectionCommand(handler);
01046 }
01047
01048 int UCvsFolders::OnCmdQueryUpdate(void)
01049 {
01050     KoQueryUpdateHandler handler;
01051     return ProcessSelectionCommand(handler);
01052 }
01053
01054 int UCvsFolders::OnCmdDiff(void)
01055 {
01056     KoDiffHandler handler;
01057     return ProcessSelectionCommand(handler);
01058 }
01059
01060 int UCvsFolders::OnCmdLog(void)
01061 {
01062     KoLogHandler handler;
01063     return ProcessSelectionCommand(handler);
01064 }
01065
01066 int UCvsFolders::OnCmdStatus(void)
01067 {
01068     KoStatusHandler handler;
01069     return ProcessSelectionCommand(handler);
01070 }
01071
01072 int UCvsFolders::OnCmdLock(void)
01073 {
01074     KoLockHandler handler;
01075     return ProcessSelectionCommand(handler);
01076 }
01077
01078 int UCvsFolders::OnCmdUnlock(void)
01079 {
01080     KoUnlockHandler handler;
01081     return ProcessSelectionCommand(handler);
01082 }
01083
01084 int UCvsFolders::OnCmdWatchOn(void)
01085 {
01086     KoWatchOnHandler handler;
01087     return ProcessSelectionCommand(handler);
01088 }
01089
01090 int UCvsFolders::OnCmdWatchOff(void)
01091 {
01092     KoWatchOffHandler handler;
01093     return ProcessSelectionCommand(handler);
01094 }
01095
01096 int UCvsFolders::OnCmdEdit(void)
01097 {
01098     KoEditHandler handler;
01099     return ProcessSelectionCommand(handler);
01100 }
01101
01102 int UCvsFolders::OnCmdResEdit(void)
01103 {
01104     KoReservedEditHandler handler;
01105     return ProcessSelectionCommand(handler);
01106 }
01107
01108 void UCvsFolders::OnCmdUIResEdit(UCmdUI *pCmdUI)
01109 {
01110     if(gCvsPrefs.CvsVersion() == 1)
01111         OnCmdUIUpdate(pCmdUI);
01112 }
01113
01114 int UCvsFolders::OnCmdUnedit(void)
01115 {
01116     KoUneditHandler handler;
01117     return ProcessSelectionCommand(handler);
01118 }
01119
01120 int UCvsFolders::OnCmdWatchers(void)
01121 {
01122     KoWatchersHandler handler;
01123     return ProcessSelectionCommand(handler);
01124 }
01125
01126 int UCvsFolders::OnCmdEditors(void)
01127 {
01128     KoEditorsHandler handler;
01129     return ProcessSelectionCommand(handler);
01130 }
01131
01132 int UCvsFolders::OnCmdRelease(void)
01133 {
01134     KoReleaseHandler handler;
01135     return ProcessSelectionCommand(handler);
01136 }
01137
01138 int UCvsFolders::OnCmdTagNew(void)
01139 {
01140     KoCreateTagHandler handler;
01141     return ProcessSelectionCommand(handler);
01142 }
01143
01144 int UCvsFolders::OnCmdTagDelete(void)
01145 {
01146     KoDeleteTagHandler handler;
01147     return ProcessSelectionCommand(handler);
01148 }
01149
01150 int UCvsFolders::OnCmdTagBranch(void)
01151 {
01152     KoBranchTagHandler handler;
01153     return ProcessSelectionCommand(handler);
01154 }
01155
01156 int UCvsFolders::OnCmdExplore(void)
01157 {
01158     UTREEITEM *item;
01159     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &item);
01160     ASSERT(item != 0L);
01161
01162     UStr path;
01163     RetrievePath(item, path);
01164
01165 #ifdef WIN32
01166     HINSTANCE hInst = ShellExecute(*AfxGetMainWnd(), "explore", path,
01167             0L, 0L, SW_SHOWDEFAULT);
01168     if((long)hInst < 32)
01169     {
01170         cvs_err(_i18n("Unable to explore '%s' (error %d)\n"), (const char *)path, GetLastError());
01171     }
01172 #endif
01173 #ifdef qUnix
01174     CvsArgs args(false);
01175     args.add(gCvsPrefs.Browser());
01176     args.add(path);
01177     UCvsApp::gApp->Execute(args.Argc(), args.Argv());
01178 #endif
01179
01180     return 0;
01181 }
01182
01183 int UCvsFolders::OnCmdCheckout(void)
01184 {
01185   KoCheckoutHandler handler;
01186   return ProcessSelectionCommand(handler);
01187 }
01188
01189 int UCvsFolders::OnCmdImport(void)
01190 {
01191   KoImportHandler handler;
01192   return ProcessSelectionCommand(handler);
01193 }
01194
01195 void UCvsFolders::OnCmdUIAdd(UCmdUI *pCmdUI)
01196 {
01197     OnUpdateGeneric(pCmdUI, false);
01198 }
01199
01200 void UCvsFolders::OnCmdUIExplore(UCmdUI *pCmdUI)
01201 {
01202     if(DisableGeneric())
01203     {
01204         pCmdUI->Enable(false);
01205         return;
01206     }
01207     UTREEITEM selItem;
01208     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
01209     pCmdUI->Enable(selItem != 0L);
01210 }
01211
01212 void UCvsFolders::OnCmdUICheckout(UCmdUI *pCmdUI)
01213 {
01214     UCvsApp *app = UCvsApp::gApp;
01215     pCmdUI->Enable(!app->IsCvsRunning() && !gCvsPrefs.empty());
01216 }
01217
01218 void UCvsFolders::OnCmdUIImport(UCmdUI *pCmdUI)
01219 {
01220     UCvsApp *app = UCvsApp::gApp;
01221     pCmdUI->Enable(!app->IsCvsRunning() && !gCvsPrefs.empty());
01222 }
01223
01224 void UCvsFolders::OnCmdUIMacrosSel(int cmd, UCmdUI *pCmdUI)
01225 {
01226     if(DisableGeneric())
01227     {
01228         pCmdUI->Enable(false);
01229         return;
01230     }
01231 #ifdef USE_PYTHON
01232     // Fill the cache with current selection
01233     if( !PyIsUICacheValid() )
01234     {
01235         UTREEITEM selItem;
01236         UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
01237     }
01238
01239     UCmdUI ucmdui((pCmdUI->m_nID));
01240     ucmdui.pCmdUI = pCmdUI;
01241     PyDoCmdUI(&ucmdui);
01242 #else
01243     UTREEITEM selItem;
01244     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
01245     pCmdUI->Enable(selItem != 0L && CTcl_Interp::IsAvail());
01246 #endif
01247 }
01248
01249 int UCvsFolders::OnCmdMacrosSel(int cmd)
01250 {
01251 #ifdef USE_PYTHON
01252     PyDoPython(cmd);
01253 #else
01254     CTcl_Interp interp;
01255     CMacroEntry & entry = gMacrosSel.entries[cmd - cmdSELMACRO];
01256     CStr path = entry.path;
01257     CTcl_Interp::Unixfy(path);
01258
01259     UTREEITEM selItem;
01260     UEventSendMessage(GetWidID(), EV_TREE_GETSEL, kUMainWidget, &selItem);
01261
01262     CStr selPath;
01263     RetrievePath(selItem, selPath);
01264     CStr uppath, folder;
01265     SplitPath(selPath, uppath, folder);
01266
01267     UTREE_INFO query;
01268     query.item = selItem;
01269     UEventSendMessage(GetWidID(), EV_TREE_GETINFO, kUMainWidget, &query);
01270     bool deleteData = false;
01271     EntnodeData *data = (EntnodeData *)query.data;
01272     if(data == 0L)
01273     {
01274         deleteData = true;
01275         EntnodePath *apath = new EntnodePath(uppath);
01276         data = new EntnodeFolder(folder, apath);
01277         apath->UnRef();
01278     }
01279
01280     TclBrowserReset();
01281     TclBrowserAppend(uppath, data);
01282
01283     interp.DoScriptVar("source \"%s\"", (const char *)path);
01284
01285     if(deleteData)
01286         data->UnRef();
01287 #endif
01288
01289     ResetView(true, true);
01290
01291     return 0;
01292 }
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

USIZE Member List

This is the complete list of members for USIZE, including all inherited members.

cx | USIZE
cy | USIZE

Generated on Sat Aug 7 22:56:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AskYesNo.cpp Source File

common/AskYesNo.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 // AskYesNo.cpp : ask yes or no !
00022
00023 #include "stdafx.h"
00024
00025 #ifdef WIN32
00026 #   include "resource.h"
00027 #endif /* WIN32 */
00028
00029 #ifdef qMacCvsPP
00030 #   include "CvsAlert.h"
00031 #   include "MacCvsApp.h"
00032 #   include "MacCvsConstant.h"
00033 #   include "LogWindow.h"
00034 # include <memory>
00035 #endif /* qMacCvsPP */
00036
00037 #include "AskYesNo.h"
00038 #include "uwidget.h"
00039
00040 #ifdef qUnix
00041 #   include "UCvsDialogs.h"
00042 #endif /* qUnix */
00043
00044 #include "cvsgui_i18n.h"
00045
00046 #ifdef _DEBUG
00047 #define new DEBUG_NEW
00048 #undef THIS_FILE
00049 static char THIS_FILE[] = __FILE__;
00050 #endif
00051
00052 class UPromptMessage : public UWidget
00053 {
00054     UDECLARE_DYNAMIC(UPromptMessage)
00055 public:
00056     UPromptMessage(const char *msg, const char *title, const char *def,
00057         const char *cncl) : UWidget(UEventGetWidID()), m_msg(msg), m_title(title),
00058         m_ok(def), m_cncl(cncl)
00059     {
00060     }
00061
00062     virtual ~UPromptMessage() {}
00063
00064     enum
00065     {
00066         kOK = EV_COMMAND_START, // 0
00067         kCancel,                // 1
00068         kMsg                    // 2
00069     };
00070
00071     virtual void DoDataExchange(bool fill)
00072     {
00073         if(fill)
00074         {
00075             UEventSendMessage(GetWidID(), EV_SETTEXT, kOK, (void *)m_ok.c_str());
00076             UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, (void *)m_title.c_str());
00077             UEventSendMessage(GetWidID(), EV_SETTEXT, kCancel, (void *)m_cncl.c_str());
00078             UEventSendMessage(GetWidID(), EV_SETTEXT, kMsg, (void *)m_msg.c_str());
00079         }
00080         else
00081         {
00082         }
00083     }
00084
00085 protected:
00086     UStr m_msg, m_title, m_ok, m_cncl;
00087
00088     ev_msg int OnOK(void);
00089     ev_msg int OnCancel(void);
00090
00091     UDECLARE_MESSAGE_MAP()
00092 };
00093
00094 UIMPLEMENT_DYNAMIC(UPromptMessage, UWidget)
00095
00096 UBEGIN_MESSAGE_MAP(UPromptMessage, UWidget)
00097     ON_UCOMMAND(kOK, UPromptMessage::OnOK)
00098     ON_UCOMMAND(kCancel, UPromptMessage::OnCancel)
00099 UEND_MESSAGE_MAP()
00100
00101 int UPromptMessage::OnOK(void)
00102 {
00103     EndModal(true);
00104     return 0;
00105 }
00106
00107 int UPromptMessage::OnCancel(void)
00108 {
00109     EndModal(false);
00110     return 0;
00111 }
00112
00113 class UEditMessage : public UPromptMessage
00114 {
00115     UDECLARE_DYNAMIC(UEditMessage)
00116 public:
00117     UEditMessage(const char *msg, const char *edit, const char *title, const char *def,
00118         const char *cncl) : UPromptMessage(msg, title, def, cncl), m_edit(edit)
00119     {
00120     }
00121
00122     virtual ~UEditMessage() {}
00123
00124     enum
00125     {
00126         kOK = EV_COMMAND_START, // 0
00127         kCancel,                // 1
00128         kMsg,                   // 2
00129         kEdit                   // 3
00130     };
00131
00132     virtual void DoDataExchange(bool fill)
00133     {
00134         UPromptMessage::DoDataExchange(fill);
00135
00136         if(fill)
00137         {
00138             UEventSendMessage(GetWidID(), EV_SETTEXT, kEdit, (void *)m_edit.c_str());
00139         }
00140         else
00141         {
00142             UEventSendMessage(GetWidID(), EV_GETTEXT, kEdit, &m_edit);
00143         }
00144     }
00145
00146     UStr m_edit;
00147
00148 protected:
00149
00150     UDECLARE_MESSAGE_MAP()
00151 };
00152
00153 UIMPLEMENT_DYNAMIC(UEditMessage, UPromptMessage)
00154
00155 UBEGIN_MESSAGE_MAP(UEditMessage, UPromptMessage)
00156 UEND_MESSAGE_MAP()
00157
00158 bool PromptEditMessage(const char *msg, UStr & edit, const char *title, const char *def, const char *cncl)
00159 {
00160     bool res = false;
00161 #if qUnix
00162     void *wid = UCreate_AskYesNoDlg();
00163     UEditMessage* dlg = new UEditMessage(msg, edit, title, def, cncl);
00164     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00165     res = dlg->DoModal();
00166
00167 #else
00168
00169     std::auto_ptr<UEditMessage> dlg(new UEditMessage(msg, edit, title, def, cncl));
00170
00171 #ifdef WIN32
00172     res = dlg->DoModal(IDD_EDITMESSAGE);
00173 #endif
00174 #ifdef qMacCvsPP
00175     res = dlg->DoModal(dlg_PromptEditCommand);
00176 #endif
00177
00178 #endif
00179     if(res)
00180         edit = dlg->m_edit;
00181
00182     return res;
00183 }
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LogDlg.cpp Source File

common/LogDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * LogDlg.cpp : the cvs log dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "OptionalPropertySheet.h"
00030 #endif /* WIN32 */
00031
00032 #ifdef qMacCvsPP
00033 #   include <UModalDialogs.h>
00034 #   include <LMultiPanelView.h>
00035 #   include <LCheckBox.h>
00036 #   include <LEditText.h>
00037 #   include <LPopupGroupBox.h>
00038 #   include <LRadioButton.h>
00039 #   include "LPopupFiller.h"
00040
00041 #   include "MacCvsConstant.h"
00042 # include "UCommandDialogs.h"
00043 # include "LogParse.h"
00044 #endif /* qMacCvsPP */
00045
00046 #ifdef WIN32
00047 #   ifdef _DEBUG
00048 #   define new DEBUG_NEW
00049 #   undef THIS_FILE
00050     static char THIS_FILE[] = __FILE__;
00051 #   endif
00052 #endif /* WIN32 */
00053
00054 #if qUnix
00055 #   include "UCvsDialogs.h"
00056 #endif
00057
00058 #include "LogDlg.h"
00059 #include "CvsPrefs.h"
00060 #include "MultiFiles.h"
00061 #include "MultiString.h"
00062 #include "ItemListDlg.h"
00063
00065 char* sDefLogTagNames[] =
00066 {
00067     "1.32:1.35",
00068     "1.32:",
00069     ":1.35",
00070     "branch-release1-0",
00071     "HEAD",
00072     0L
00073 };
00074
00076 char* sDefLogDateNames[] =
00077 {
00078     ">1998-3-24",
00079     "<1998-1-24",
00080     "1998-1-24<1998-3-24",
00081     "<=3-24",
00082     0L
00083 };
00084
00086 char* sDefLogStateNames[] =
00087 {
00088     "mystate",
00089     "dead",
00090     "exp",
00091     "mystate,mystate2",
00092     0L
00093 };
00094
00096 char* sDefLogUserNames[] =
00097 {
00098     "johna",
00099     "garyb",
00100     "johna,garyb",
00101     0L
00102 };
00103
00104 static CMString gLogRevNames(10, "P_LogTagNames", sDefLogTagNames);
00105 static CMString gLogDateNames(10, "P_LogDateNames", sDefLogDateNames);
00106 static CMString gLogStateNames(10, "P_LogStateNames", sDefLogStateNames);
00107 static CMString gLogUserNames(10, "P_LogUserNames", sDefLogUserNames);
00108
00109 static CPersistentBool gLogSupress("P_LogSupress", false, kAddSettings);
00110
00111
00112 #ifdef WIN32
00113 #include "GetPrefs.h"
00114
00116 // CLogMain
00117
00118 IMPLEMENT_DYNAMIC(CLogMain, CHHelpPropertyPage)
00119
00120 CLogMain::CLogMain(bool supress) : CHHelpPropertyPage(CLogMain::IDD)
00121 {
00122     //{{AFX_DATA_INIT(CLogMain)
00123     m_supress = supress;
00124     m_defBranch = FALSE;
00125     m_noRecurs = FALSE;
00126     m_noTags = FALSE;
00127     m_onlyRCS = FALSE;
00128     m_headerOnly = FALSE;
00129     m_headerDesc = FALSE;
00130     //}}AFX_DATA_INIT
00131 }
00132
00133 CLogMain::~CLogMain()
00134 {
00135 }
00136
00137 void CLogMain::DoDataExchange(CDataExchange* pDX)
00138 {
00139     CHHelpPropertyPage::DoDataExchange(pDX);
00140     //{{AFX_DATA_MAP(CLogMain)
00141     DDX_Control(pDX, IDC_HEADERS_DESC, m_headerDescCheck);
00142     DDX_Control(pDX, IDC_HEADERS, m_headerOnlyCheck);
00143     DDX_Check(pDX, IDC_SUPRESS_HEADER, m_supress);
00144     DDX_Check(pDX, IDC_DEFAULT_BRANCH, m_defBranch);
00145     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00146     DDX_Check(pDX, IDC_NOTAGS, m_noTags);
00147     DDX_Check(pDX, IDC_RCS_FILENAMES_ONLY, m_onlyRCS);
00148     DDX_Check(pDX, IDC_HEADERS, m_headerOnly);
00149     DDX_Check(pDX, IDC_HEADERS_DESC, m_headerDesc);
00150     //}}AFX_DATA_MAP
00151 }
00152
00153
00154 BEGIN_MESSAGE_MAP(CLogMain, CHHelpPropertyPage)
00155     //{{AFX_MSG_MAP(CLogMain)
00156     ON_BN_CLICKED(IDC_HEADERS, OnHeaders)
00157     ON_BN_CLICKED(IDC_HEADERS_DESC, OnHeadersdesc)
00158     //}}AFX_MSG_MAP
00159 END_MESSAGE_MAP()
00160
00162 // CLogFilters message handlers
00163
00164 void CLogMain::InitHelpID()
00165 {
00166     SetCtrlHelpID(IDC_SUPRESS_HEADER,       IDH_IDC_SUPRESS_HEADER);
00167     SetCtrlHelpID(IDC_DEFAULT_BRANCH,       IDH_IDC_DEFAULT_BRANCH);
00168     SetCtrlHelpID(IDC_NORECURS,             IDH_IDC_NORECURS);
00169     SetCtrlHelpID(IDC_RCS_FILENAMES_ONLY,   IDH_IDC_RCS_FILENAMES_ONLY);
00170     SetCtrlHelpID(IDC_NOTAGS,               IDH_IDC_NOTAGS);
00171     SetCtrlHelpID(IDC_HEADERS,              IDH_IDC_HEADERS);
00172     SetCtrlHelpID(IDC_HEADERS_DESC,         IDH_IDC_HEADERS_DESC);
00173 }
00174
00176 void CLogMain::OnHeaders()
00177 {
00178     if( m_headerOnlyCheck.GetCheck() && m_headerDescCheck.GetCheck() )
00179     {
00180         m_headerDescCheck.SetCheck(0);
00181     }
00182 }
00183
00185 void CLogMain::OnHeadersdesc()
00186 {
00187     if( m_headerDescCheck.GetCheck() && m_headerOnlyCheck.GetCheck() )
00188     {
00189         m_headerOnlyCheck.SetCheck(0);
00190     }
00191 }
00192
00194 // CLogFilters
00195
00196 IMPLEMENT_DYNAMIC(CLogFilters, CHHelpPropertyPage)
00197
00198 CLogFilters::CLogFilters(const MultiFiles* mf,
00199                          const char* sLastDate, const char* sLastRev,
00200                          const char* sLastUsers, const char* sLastStates)
00201                          : m_mf(mf), CHHelpPropertyPage(CLogFilters::IDD)
00202 {
00203     //{{AFX_DATA_INIT(CLogFilters)
00204     m_date = sLastDate;
00205     m_rev = sLastRev;
00206     m_state = sLastStates;
00207     m_user = sLastUsers;
00208     m_hasDate = FALSE;
00209     m_hasRev = FALSE;
00210     m_hasState = FALSE;
00211     m_hasUser = FALSE;
00212     //}}AFX_DATA_INIT
00213
00214     m_revCombo.SetItems(&gLogRevNames);
00215     m_dateCombo.SetItems(&gLogDateNames);
00216     m_userCombo.SetItems(&gLogUserNames);
00217     m_stateCombo.SetItems(&gLogStateNames);
00218 }
00219
00220 CLogFilters::~CLogFilters()
00221 {
00222 }
00223
00224 void CLogFilters::DoDataExchange(CDataExchange* pDX)
00225 {
00226     CHHelpPropertyPage::DoDataExchange(pDX);
00227     //{{AFX_DATA_MAP(CLogFilters)
00228     DDX_Control(pDX, IDC_HAS_USERS, m_hasUserCheck);
00229     DDX_Control(pDX, IDC_HAS_STATES, m_hasStateCheck);
00230     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00231     DDX_Control(pDX, IDC_HAS_DATE, m_hasDateCheck);
00232     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00233     DDX_Control(pDX, IDC_USERS, m_userCombo);
00234     DDX_Control(pDX, IDC_STATES, m_stateCombo);
00235     DDX_Control(pDX, IDC_RANGE_REV_TAG, m_revCombo);
00236     DDX_Control(pDX, IDC_RANGE_DATE, m_dateCombo);
00237     DDX_CBString(pDX, IDC_RANGE_DATE, m_date);
00238     DDX_CBString(pDX, IDC_RANGE_REV_TAG, m_rev);
00239     DDX_CBString(pDX, IDC_STATES, m_state);
00240     DDX_CBString(pDX, IDC_USERS, m_user);
00241     DDX_Check(pDX, IDC_HAS_DATE, m_hasDate);
00242     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00243     DDX_Check(pDX, IDC_HAS_STATES, m_hasState);
00244     DDX_Check(pDX, IDC_HAS_USERS, m_hasUser);
00245     //}}AFX_DATA_MAP
00246
00247     if( m_hasDate )
00248     {
00249         DDV_MinChars(pDX, m_date, 1);
00250     }
00251
00252     if( m_hasState )
00253     {
00254         DDV_MinChars(pDX, m_state, 1);
00255     }
00256
00257     if( !pDX->m_bSaveAndValidate )
00258     {
00259         OnRev();
00260         OnDate();
00261         OnState();
00262         OnUser();
00263     }
00264
00265     DDX_ComboMString(pDX, IDC_RANGE_REV_TAG, m_revCombo);
00266     DDX_ComboMString(pDX, IDC_RANGE_DATE, m_dateCombo);
00267     DDX_ComboMString(pDX, IDC_USERS, m_userCombo);
00268     DDX_ComboMString(pDX, IDC_STATES, m_stateCombo);
00269 }
00270
00271
00272 BEGIN_MESSAGE_MAP(CLogFilters, CHHelpPropertyPage)
00273     //{{AFX_MSG_MAP(CLogFilters)
00274     ON_BN_CLICKED(IDC_HAS_DATE, OnDate)
00275     ON_BN_CLICKED(IDC_HAS_REV, OnRev)
00276     ON_BN_CLICKED(IDC_HAS_STATES, OnState)
00277     ON_BN_CLICKED(IDC_HAS_USERS, OnUser)
00278     ON_BN_CLICKED(IDC_BROWSE_TAG, OnBrowseTag)
00279     //}}AFX_MSG_MAP
00280 END_MESSAGE_MAP()
00281
00283 // CLogFilters message handlers
00284
00285 void CLogFilters::InitHelpID()
00286 {
00287     SetCtrlHelpID(IDC_HAS_REV,          IDH_IDC_HAS_REV);
00288     SetCtrlHelpID(IDC_RANGE_REV_TAG,    IDH_IDC_RANGE_REV_TAG);
00289     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00290     SetCtrlHelpID(IDC_HAS_DATE,         IDH_IDC_HAS_DATE);
00291     SetCtrlHelpID(IDC_RANGE_DATE,       IDH_IDC_RANGE_DATE);
00292     SetCtrlHelpID(IDC_HAS_STATES,       IDH_IDC_HAS_STATES);
00293     SetCtrlHelpID(IDC_STATES,           IDH_IDC_STATES);
00294     SetCtrlHelpID(IDC_HAS_USERS,        IDH_IDC_HAS_USERS);
00295     SetCtrlHelpID(IDC_USERS,            IDH_IDC_USERS);
00296 }
00297
00299 void CLogFilters::OnDate()
00300 {
00301     m_dateCombo.EnableWindow(m_hasDateCheck.GetCheck());
00302 }
00303
00305 void CLogFilters::OnRev()
00306 {
00307     m_revCombo.EnableWindow(m_hasRevCheck.GetCheck());
00308     m_browseTagButton.EnableWindow(m_hasRevCheck.GetCheck());
00309 }
00310
00312 void CLogFilters::OnBrowseTag()
00313 {
00314     CStr tagName;
00315     if( CompatGetTagListItem(m_mf, tagName) )
00316     {
00317         m_rev = tagName.c_str();
00318         m_revCombo.SetWindowText(m_rev);
00319     }
00320 }
00321
00323 void CLogFilters::OnState()
00324 {
00325     m_stateCombo.EnableWindow(m_hasStateCheck.GetCheck());
00326 }
00327
00329 void CLogFilters::OnUser()
00330 {
00331     m_userCombo.EnableWindow(m_hasUserCheck.GetCheck());
00332 }
00333 #endif /* WIN32 */
00334
00335 #ifdef qMacCvsPP
00336 static void DoDataExchange_LogFilters(LWindow *theDialog, bool & hasDate, bool & hasStates,
00337         bool & hasRev, bool & hasUsers,
00338         CStr & sLastDate, CStr & sLastRev,
00339         CStr & sLastUsers, CStr & sLastStates, bool putValue)
00340 {
00341     LCheckBox *chkd = dynamic_cast<LCheckBox*>
00342         (theDialog->FindPaneByID(item_LogCheckByDate));
00343     LEditText *editd = dynamic_cast<LEditText*>
00344         (theDialog->FindPaneByID(item_LogEditByDate));
00345     LCheckBox *chks = dynamic_cast<LCheckBox*>
00346         (theDialog->FindPaneByID(item_LogCheckByState));
00347     LEditText *edits = dynamic_cast<LEditText*>
00348         (theDialog->FindPaneByID(item_LogEditByState));
00349     LCheckBox *chkr = dynamic_cast<LCheckBox*>
00350         (theDialog->FindPaneByID(item_LogCheckByRev));
00351     LEditText *editr = dynamic_cast<LEditText*>
00352         (theDialog->FindPaneByID(item_LogEditByRev));
00353     LCheckBox *chku = dynamic_cast<LCheckBox*>
00354         (theDialog->FindPaneByID(item_LogCheckByUser));
00355     LEditText *editu = dynamic_cast<LEditText*>
00356         (theDialog->FindPaneByID(item_LogEditByUser));
00357     LPopupFiller *fillDate = dynamic_cast<LPopupFiller*>
00358         (theDialog->FindPaneByID(item_LogFillByDate));
00359     LPopupFiller *fillState = dynamic_cast<LPopupFiller*>
00360         (theDialog->FindPaneByID(item_LogFillByState));
00361     LPopupFiller *fillRev = dynamic_cast<LPopupFiller*>
00362         (theDialog->FindPaneByID(item_LogFillByRev));
00363     LPopupFiller *fillUser = dynamic_cast<LPopupFiller*>
00364         (theDialog->FindPaneByID(item_LogFillByUser));
00365
00366     fillDate->DoDataExchange(gLogDateNames, putValue);
00367     fillState->DoDataExchange(gLogStateNames, putValue);
00368     fillRev->DoDataExchange(gLogRevNames, putValue);
00369     fillUser->DoDataExchange(gLogUserNames, putValue);
00370
00371     if(putValue)
00372     {
00373         chkd->SetValue(hasDate ? Button_On : Button_Off);
00374         editd->SetText((Ptr)(const char *)sLastDate, sLastDate.length());
00375
00376         chks->SetValue(hasStates ? Button_On : Button_Off);
00377         edits->SetText((Ptr)(const char *)sLastStates, sLastStates.length());
00378
00379         chkr->SetValue(hasRev ? Button_On : Button_Off);
00380         editr->SetText((Ptr)(const char *)sLastRev, sLastRev.length());
00381
00382         chku->SetValue(hasUsers ? Button_On : Button_Off);
00383         editu->SetText((Ptr)(const char *)sLastUsers, sLastUsers.length());
00384     }
00385     else
00386     {
00387         char str[255];
00388         Size len;
00389
00390         hasDate = chkd->GetValue() == Button_On;
00391         editd->GetText(str, 254, &len);
00392         sLastDate.set(str, len);
00393
00394         hasStates = chks->GetValue() == Button_On;
00395         edits->GetText(str, 254, &len);
00396         sLastStates.set(str, len);
00397
00398         hasRev = chkr->GetValue() == Button_On;
00399         editr->GetText(str, 254, &len);
00400         sLastRev.set(str, len);
00401
00402         hasUsers = chku->GetValue() == Button_On;
00403         editu->GetText(str, 254, &len);
00404         sLastUsers.set(str, len);
00405     }
00406 }
00407
00408 static void DoDataExchange_LogSettings(LWindow *theDialog, bool & noRecurs, bool & defBranch,
00409     bool & headerOnly, bool & noTags, bool & onlyRCSfile, UInt16 & msgEncoding, bool putValue)
00410 {
00411     LCheckBox *chkNoRecurs = dynamic_cast<LCheckBox*>
00412         (theDialog->FindPaneByID(item_NoRecurs));
00413     LCheckBox *chkDefBranch = dynamic_cast<LCheckBox*>
00414         (theDialog->FindPaneByID(item_LogDefBranch));
00415     LCheckBox *chkHeaderOnly = dynamic_cast<LCheckBox*>
00416         (theDialog->FindPaneByID(item_LogNoUserLogs));
00417     LCheckBox *chkNoTags = dynamic_cast<LCheckBox*>
00418         (theDialog->FindPaneByID(item_LogNoTags));
00419     LCheckBox *chkOnlyRCSfile = dynamic_cast<LCheckBox*>
00420         (theDialog->FindPaneByID(item_LogOnlyRcs));
00421     LPopupButton *messageEncoding = dynamic_cast<LPopupButton*>
00422       (theDialog->FindPaneByID(item_LogMsgEncoding));
00423
00424     if(putValue)
00425     {
00426         chkNoRecurs->SetValue(noRecurs ? Button_On : Button_Off);
00427         chkDefBranch->SetValue(defBranch ? Button_On : Button_Off);
00428         chkHeaderOnly->SetValue(headerOnly ? Button_On : Button_Off);
00429         chkNoTags->SetValue(noTags ? Button_On : Button_Off);
00430         chkOnlyRCSfile->SetValue(onlyRCSfile ? Button_On : Button_Off);
00431         messageEncoding->SetValue(msgEncoding);
00432     }
00433     else
00434     {
00435         noRecurs = chkNoRecurs->GetValue() == Button_On;
00436         defBranch = chkDefBranch->GetValue() == Button_On;
00437         headerOnly = chkHeaderOnly->GetValue() == Button_On;
00438         noTags = chkNoTags->GetValue() == Button_On;
00439         onlyRCSfile = chkOnlyRCSfile->GetValue() == Button_On;
00440         msgEncoding = messageEncoding->GetValue();
00441     }
00442 }
00443 #endif /* qMacCvsPP */
00444
00445 #if qUnix
00446 class UCvsLog : public UWidget
00447 {
00448     UDECLARE_DYNAMIC(UCvsLog)
00449 public:
00450     UCvsLog() : UWidget(::UEventGetWidID()) {}
00451     virtual ~UCvsLog() {}
00452
00453     enum
00454     {
00455         kOK = EV_COMMAND_START, // 0
00456         kCancel,                // 1
00457         kTabGeneral             // 2
00458     };
00459
00460     virtual void DoDataExchange(bool fill);
00461
00462 protected:
00463     ev_msg int OnOK(void);
00464     ev_msg int OnCancel(void);
00465
00466     UDECLARE_MESSAGE_MAP()
00467 };
00468
00469 UIMPLEMENT_DYNAMIC(UCvsLog, UWidget)
00470
00471 UBEGIN_MESSAGE_MAP(UCvsLog, UWidget)
00472     ON_UCOMMAND(UCvsLog::kOK, UCvsLog::OnOK)
00473     ON_UCOMMAND(UCvsLog::kCancel, UCvsLog::OnCancel)
00474 UEND_MESSAGE_MAP()
00475
00476 int UCvsLog::OnOK(void)
00477 {
00478     EndModal(true);
00479     return 0;
00480 }
00481
00482 int UCvsLog::OnCancel(void)
00483 {
00484     EndModal(false);
00485     return 0;
00486 }
00487
00488 void UCvsLog::DoDataExchange(bool fill)
00489 {
00490     if(fill)
00491     {
00492     }
00493     else
00494     {
00495     }
00496 }
00497
00498 class UCvsLog_MAIN : public UWidget
00499 {
00500     UDECLARE_DYNAMIC(UCvsLog_MAIN)
00501 public:
00502     UCvsLog_MAIN();
00503     virtual ~UCvsLog_MAIN() {}
00504
00505     enum
00506     {
00507         kCheckBranch = EV_COMMAND_START,    // 0
00508         kCheckRecurs,           // 1
00509         kCheckRCS,              // 2
00510         kCheckTags,             // 3
00511         kCheckUsers             // 4
00512     };
00513
00514     virtual void DoDataExchange(bool fill);
00515
00516     bool m_defbranch;
00517     bool m_norecurs;
00518     bool m_notags;
00519     bool m_nousers;
00520     bool m_onlyrcs;
00521
00522 protected:
00523     UDECLARE_MESSAGE_MAP()
00524 };
00525
00526 UIMPLEMENT_DYNAMIC(UCvsLog_MAIN, UWidget)
00527
00528 UBEGIN_MESSAGE_MAP(UCvsLog_MAIN, UWidget)
00529 UEND_MESSAGE_MAP()
00530
00531 UCvsLog_MAIN::UCvsLog_MAIN() : UWidget(::UEventGetWidID())
00532 {
00533     m_defbranch = false;
00534     m_norecurs = false;
00535     m_notags = false;
00536     m_nousers = false;
00537     m_onlyrcs = false;
00538 }
00539
00540 void UCvsLog_MAIN::DoDataExchange(bool fill)
00541 {
00542     if(fill)
00543     {
00544         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckBranch, m_defbranch), 0L);
00545         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurs, m_norecurs), 0L);
00546         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckTags, m_notags), 0L);
00547         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckUsers, m_nousers), 0L);
00548         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRCS, m_onlyrcs), 0L);
00549     }
00550     else
00551     {
00552         m_defbranch = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckBranch, 0L);
00553         m_norecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurs, 0L);
00554         m_notags = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckTags, 0L);
00555         m_nousers = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckUsers, 0L);
00556         m_onlyrcs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRCS, 0L);
00557     }
00558 }
00559
00560 class UCvsLog_FILTERS : public UWidget
00561 {
00562     UDECLARE_DYNAMIC(UCvsLog_FILTERS)
00563 public:
00564     UCvsLog_FILTERS(const char * sLastDate, const char * sLastRev,
00565         const char * sLastUsers, const char * sLastStates);
00566     virtual ~UCvsLog_FILTERS() {}
00567
00568     enum
00569     {
00570         kCheckTag = EV_COMMAND_START,   // 0
00571         kCheckDate,         // 1
00572         kCheckState,        // 2
00573         kCheckUser,         // 3
00574         kComboTag,          // 4
00575         kComboDate,         // 5
00576         kComboState,        // 6
00577         kComboUser          // 7
00578     };
00579
00580     virtual void DoDataExchange(bool fill);
00581
00582     UStr m_date;
00583     UStr m_rev;
00584     UStr m_state;
00585     UStr m_user;
00586     bool m_hasrev;
00587     bool m_hasuser;
00588     bool m_hasdate;
00589     bool m_hasstate;
00590 protected:
00591
00592     ev_msg int OnSelect(int cmd);
00593
00594     UDECLARE_MESSAGE_MAP()
00595 };
00596
00597 UIMPLEMENT_DYNAMIC(UCvsLog_FILTERS, UWidget)
00598
00599 UBEGIN_MESSAGE_MAP(UCvsLog_FILTERS, UWidget)
00600     ON_UCOMMAND_RANGE(UCvsLog_FILTERS::kCheckTag, UCvsLog_FILTERS::kCheckUser, UCvsLog_FILTERS::OnSelect)
00601 UEND_MESSAGE_MAP()
00602
00603 UCvsLog_FILTERS::UCvsLog_FILTERS(const char * sLastDate, const char * sLastRev,
00604         const char * sLastUsers, const char * sLastStates) : UWidget(::UEventGetWidID())
00605 {
00606     m_date = sLastDate;
00607     m_rev = sLastRev;
00608     m_state = sLastStates;
00609     m_user = sLastUsers;
00610     m_hasrev = false;
00611     m_hasuser = false;
00612     m_hasdate = false;
00613     m_hasstate = false;
00614 }
00615
00616 int UCvsLog_FILTERS::OnSelect(int cmd)
00617 {
00618     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, cmd, 0L);
00619     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(cmd + 4, state), 0L);
00620     return 0;
00621 }
00622
00623 void UCvsLog_FILTERS::DoDataExchange(bool fill)
00624 {
00625     ::DoDataExchange(fill, GetWidID(), kComboTag, gLogRevNames);
00626     ::DoDataExchange(fill, GetWidID(), kComboDate, gLogDateNames);
00627     ::DoDataExchange(fill, GetWidID(), kComboUser, gLogUserNames);
00628     ::DoDataExchange(fill, GetWidID(), kComboState, gLogStateNames);
00629
00630     if(fill)
00631     {
00632         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckDate, m_hasdate), 0L);
00633         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckTag, m_hasrev), 0L);
00634         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckState, m_hasstate), 0L);
00635         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckUser, m_hasuser), 0L);
00636
00637         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboDate, (void *)(const char *)m_date);
00638         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboTag, (void *)(const char *)m_rev);
00639         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboState, (void *)(const char *)m_state);
00640         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboUser, (void *)(const char *)m_user);
00641
00642         OnSelect(kCheckDate);
00643         OnSelect(kCheckTag);
00644         OnSelect(kCheckUser);
00645         OnSelect(kCheckState);
00646     }
00647     else
00648     {
00649         m_hasdate = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate, 0L);
00650         m_hasrev = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckTag, 0L);
00651         m_hasstate = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckState, 0L);
00652         m_hasuser = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckUser, 0L);
00653
00654         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboDate, &m_date);
00655         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboTag, &m_rev);
00656         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboState, &m_state);
00657         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboUser, &m_user);
00658     }
00659 }
00660 #endif // qUnix
00661
00663 bool CompatGetLog(const MultiFiles* mf,
00664                   bool& noRecurs, bool& defBranch, CStr& date,
00665                   bool& headerOnly, bool& headerDesc, bool& supress,
00666                   bool& noTags, bool& onlyRCSfile, bool& hasRev,
00667                   CStr& rev, CStr& states, bool& hasUsers, CStr& users,
00668                   bool outGraph /*= false*/)
00669 {
00670     bool userHitOK = false;
00671
00672     static CStr sLastDate;
00673     static CStr sLastRev;
00674     static CStr sLastUsers;
00675     static CStr sLastStates;
00676
00677     bool hasDate = false;
00678     bool hasStates = false;
00679
00680     hasRev = false;
00681     hasUsers = false;
00682     date = "";
00683     rev = "";
00684     states = "";
00685     users = "";
00686     noRecurs = false;
00687     defBranch = false;
00688     headerOnly = false;
00689     headerDesc = false;
00690     supress = (bool)gLogSupress;
00691     noTags = false;
00692     onlyRCSfile = false;
00693
00694 #ifdef WIN32
00695     COptionalPropertySheet pages(outGraph ? gCvsPrefs.HideCommandDlgGraph() : gCvsPrefs.HideCommandDlgLog(),
00696         outGraph ? "Graph settings" : "Log settings");
00697     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00698
00699     CLogMain page1(supress);
00700     CLogFilters page2(mf, sLastDate, sLastRev, sLastUsers, sLastStates);
00701     CGetPrefs_GLOBALS page3;
00702
00703     pages.AddPage(&page1);
00704     pages.AddPage(&page2);
00705     pages.AddPage(&page3);
00706
00707     if( pages.DoModal() == IDOK )
00708     {
00709         gLogSupress = page1.m_supress ? true : false;
00710
00711         noRecurs = page1.m_noRecurs == TRUE;
00712         defBranch = page1.m_defBranch == TRUE;
00713         headerOnly = page1.m_headerOnly == TRUE;
00714         headerDesc = page1.m_headerDesc == TRUE;
00715         noTags = page1.m_noTags == TRUE;
00716         onlyRCSfile = page1.m_onlyRCS == TRUE;
00717
00718         sLastDate = page2.m_date;
00719         sLastRev = page2.m_rev;
00720         sLastUsers = page2.m_user;
00721         sLastStates = page2.m_state;
00722
00723         hasRev = page2.m_hasRev == TRUE;
00724         hasUsers = page2.m_hasUser == TRUE;
00725         hasDate = page2.m_hasDate == TRUE;
00726         hasStates = page2.m_hasState == TRUE;
00727
00728         page3.StoreValues();
00729
00730         if( outGraph )
00731         {
00732             gCvsPrefs.SetHideCommandDlgGraph(pages.GetHideCommandDlg());
00733         }
00734         else
00735         {
00736             gCvsPrefs.SetHideCommandDlgLog(pages.GetHideCommandDlg());
00737         }
00738
00739         userHitOK = true;
00740     }
00741 #endif /* WIN32 */
00742 #ifdef qMacCvsPP
00743     StOptionalDialogHandler theHandler(dlg_Log, gCvsPrefs.HideCommandDlgLog(), LCommander::GetTopCommander());
00744     LWindow *theDialog = theHandler.GetDialog();
00745     ThrowIfNil_(theDialog);
00746     static UInt16 sRuntimePanel = 1;
00747     UInt16      msgEncoding(sCommitMsgEncoding);
00748
00749     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00750         (theDialog->FindPaneByID(item_MultiViewPrefs));
00751     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00752
00753     multiView->SwitchToPanel(3);
00754     DoDataExchange_Globals(theDialog, true);
00755     multiView->SwitchToPanel(2);
00756     DoDataExchange_LogFilters(theDialog, hasDate, hasStates, hasRev, hasUsers,
00757         sLastDate, sLastRev, sLastUsers, sLastStates, true);
00758     multiView->SwitchToPanel(1);
00759     DoDataExchange_LogSettings(theDialog, noRecurs, defBranch, headerOnly, noTags, onlyRCSfile, msgEncoding, true);
00760
00761     groupView->SetValue(sRuntimePanel);
00762     theHandler.ShowDialog();
00763     MessageT hitMessage;
00764     while (true)
00765     {       // Let DialogHandler process events
00766         hitMessage = theHandler.DoDialog();
00767
00768         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00769             break;
00770     }
00771     theDialog->Hide();
00772     sRuntimePanel = groupView->GetValue();
00773
00774     if(hitMessage == msg_OK)
00775     {
00776         multiView->SwitchToPanel(1);
00777         DoDataExchange_LogSettings(theDialog, noRecurs, defBranch, headerOnly, noTags, onlyRCSfile, msgEncoding, false);
00778         sCommitMsgEncoding = msgEncoding;
00779         multiView->SwitchToPanel(2);
00780         DoDataExchange_LogFilters(theDialog, hasDate, hasStates, hasRev, hasUsers,
00781         sLastDate, sLastRev, sLastUsers, sLastStates, false);
00782         multiView->SwitchToPanel(3);
00783         DoDataExchange_Globals(theDialog, false);
00784         gCvsPrefs.SetHideCommandDlgLog(theHandler.GetHideCommandDlg());
00785         userHitOK = true;
00786     }
00787 #endif /* qMacCvsPP */
00788 #if qUnix
00789     void *wid = UCreate_LogDlg();
00790
00791     UCvsLog *dlg = new UCvsLog();
00792     UCvsLog_MAIN *tab1 = new UCvsLog_MAIN();
00793     UCvsLog_FILTERS *tab2 = new UCvsLog_FILTERS(sLastDate, sLastRev, sLastUsers, sLastStates);
00794     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00795     dlg->AddPage(tab1, UCvsLog::kTabGeneral, 0);
00796     dlg->AddPage(tab2, UCvsLog::kTabGeneral, 1);
00797
00798     if(dlg->DoModal())
00799     {
00800         noRecurs = tab1->m_norecurs;
00801         defBranch = tab1->m_defbranch;
00802         headerOnly = tab1->m_nousers;
00803         noTags = tab1->m_notags;
00804         onlyRCSfile = tab1->m_onlyrcs;
00805
00806         sLastDate = tab2->m_date;
00807         sLastRev = tab2->m_rev;
00808         sLastUsers = tab2->m_user;
00809         sLastStates = tab2->m_state;
00810
00811         hasRev = tab2->m_hasrev;
00812         hasUsers = tab2->m_hasuser;
00813         hasDate = tab2->m_hasdate;
00814         hasStates = tab2->m_hasstate;
00815
00816         userHitOK = true;
00817     }
00818
00819     delete dlg;
00820 #endif // qUnix
00821
00822     if( userHitOK )
00823     {
00824         supress = (bool)gLogSupress;
00825
00826         if( hasDate && !sLastDate.empty() )
00827             date = sLastDate;
00828
00829         if( hasRev )
00830             rev = sLastRev;
00831
00832         if( hasUsers )
00833             users = sLastUsers;
00834
00835         if( hasStates && !sLastStates.empty() )
00836             states = sLastStates;
00837
00838         gCvsPrefs.save();
00839     }
00840
00841     return userHitOK;
00842 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KiFilterModel Member List

This is the complete list of members for KiFilterModel, including all inherited members.

GetFilters() const =0 | KiFilterModel | [pure virtual]
GetNotificationManager()=0 | KiFilterBase | [pure virtual]
IsMatch(const EntnodeData *data) const =0 | KiFilterModel | [pure virtual]
LoadSettings()=0 | KiFilterBase | [pure virtual]
SaveSettings()=0 | KiFilterBase | [pure virtual]

Generated on Sat Aug 7 22:53:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSaveSettingsDlg Member List

This is the complete list of members for CSaveSettingsDlg, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CSaveSettingsDlg(const char *path, const char *oldname, CWnd *pParent=NULL) | CSaveSettingsDlg |
DoDataExchange(CDataExchange *pDX) | CSaveSettingsDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CSaveSettingsDlg |
InitHelpID() | CSaveSettingsDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_copy | CSaveSettingsDlg |
m_copyCheck | CSaveSettingsDlg |
m_copyFrom | CSaveSettingsDlg |
m_copyFromPathCombo | CSaveSettingsDlg |
m_path | CSaveSettingsDlg |
m_settingName | CSaveSettingsDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnCopySettings() | CSaveSettingsDlg | [protected]
OnHelp() | CSaveSettingsDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CSaveSettingsDlg | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:56:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SaveSettingsDlg.h Source File

common/SaveSettingsDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2004
00019  */
00020
00021 #if !defined(AFX_SAVESETTINGSDLG_H__73E4731F_7A3E_46B2_835A_056922641479__INCLUDED_)
00022 #define AFX_SAVESETTINGSDLG_H__73E4731F_7A3E_46B2_835A_056922641479__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // SaveSettingsDlg.h : header file
00028 //
00029
00030 #include "SmartComboBox.h"
00031
00032 #ifdef WIN32
00033 #   include "HHelpSupport.h"
00034 #endif
00035
00036 #ifdef WIN32
00037
00039 // CSaveSettingsDlg dialog
00040
00041 class CSaveSettingsDlg : public CHHelpDialog
00042 {
00043 // Construction
00044 public:
00045     CSaveSettingsDlg(const char* path, const char* oldname, CWnd* pParent = NULL);   // standard constructor
00046
00047 // Dialog Data
00048     //{{AFX_DATA(CSaveSettingsDlg)
00049     enum { IDD = IDD_SAVESETTINGS };
00050     CButton m_copyCheck;
00051     CSmartComboBox  m_copyFromPathCombo;
00052     CString m_settingName;
00053     CString m_copyFrom;
00054     CString m_path;
00055     BOOL    m_copy;
00056     //}}AFX_DATA
00057
00058
00059 // Overrides
00060     // ClassWizard generated virtual function overrides
00061     //{{AFX_VIRTUAL(CSaveSettingsDlg)
00062     protected:
00063     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00064     //}}AFX_VIRTUAL
00065
00066 // Implementation
00067 protected:
00068
00069     // Generated message map functions
00070     //{{AFX_MSG(CSaveSettingsDlg)
00071     virtual BOOL OnInitDialog();
00072     afx_msg void OnHelp();
00073     afx_msg void OnCopySettings();
00074     //}}AFX_MSG
00075     DECLARE_MESSAGE_MAP()
00076 private:
00077     // Methods
00078     virtual void InitHelpID();
00079 };
00080
00081 //{{AFX_INSERT_LOCATION}}
00082 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00083
00084 #endif
00085
00086 #endif // !defined(AFX_SAVESETTINGSDLG_H__73E4731F_7A3E_46B2_835A_056922641479__INCLUDED_)
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJTabCtrlBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJTabCtrlBar.cpp

Go to the documentation of this file.
00001 // CJTabCtrlBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJTabCtrlBar.cpp $
00011  *
00012  * $History: CJTabCtrlBar.cpp $
00013  *
00014  * *****************  Version 22  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:29p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Enabled OnInitialUpdate() to be called for tab views added to
00018  * CCJTabCtrlBar whenever the control bar is floating.
00019  *
00020  * Fixed potential resource and memory leak problems.
00021  *
00022  * Fixed problems with AddView(...) setting the wrong view index to
00023  * active.
00024  *
00025  * Added  EnableToolTips method which enables and disables the tooltips.
00026  * Thanks to Phil Baxter for help with this.
00027  *
00028  * Fixed problem with dangling pointer in DeleteView. Thanks to Gero Kuehn
00029  * [gero.kuehn@isc-soft.de] for help with this.
00030  *
00031  * Fixed potential bug with CCJTabControlBar returning image index, fixed
00032  * bug with GetTabFromPoint(...) returning invalid index.
00033  *
00034  * Made class methods virtual for inhertance purposes.
00035  *
00036  * *****************  Version 20  *****************
00037  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00038  * Updated in $/CodeJockey/CJLibrary
00039  * Updated copyright and contact information.
00040  *
00041  * *****************  Version 19  *****************
00042  * User: Kirk Stowell Date: 8/30/99    Time: 12:46a
00043  * Updated in $/CodeJockey/CJLibrary
00044  * Gero Kuehn <gero.kuehn@isc-soft.de> - Added fixes for tab view
00045  * activation and removal.
00046  *
00047  * *****************  Version 18  *****************
00048  * User: Kirk Stowell Date: 8/29/99    Time: 9:54p
00049  * Updated in $/CodeJockey/CJLibrary
00050  * Fixed debug assert when adding a view with no associated document.
00051  *
00052  * *****************  Version 17  *****************
00053  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00054  * Updated in $/CodeJockey/CJLibrary
00055  * Added Unicode compliance, thanks to Barry Burton for his help with
00056  * this.
00057  *
00058  *
00059  * *****************  Version 16  *****************
00060  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00061  * Updated in $/CodeJockey/CJLibrary
00062  *
00063  * *****************  Version 15  *****************
00064  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00065  * Updated in $/CodeJockey/CJLibrary
00066  *
00067  * *****************  Version 14  *****************
00068  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00069  * Updated in $/CodeJockey/CJLibrary
00070  *
00071  * *****************  Version 13  *****************
00072  * User: Kirk Stowell Date: 7/14/99    Time: 9:43p
00073  * Updated in $/CodeJockey/CJLibrary
00074  * Added _DYNAMIC macros for access to the CObject::IsKindOf to determine
00075  * the class object at runtime. Added method GetTabFromPoint which returns
00076  * the tab index based upon cursor position. Thanks to Sid Price
00077  * [sidprice@softtools.com] for suggesting this.
00078  *
00079  * *****************  Version 12  *****************
00080  * User: Kirk Stowell Date: 6/11/99    Time: 10:17p
00081  * Updated in $/CodeJockey/CJ60Lib
00082  * Minor modifications to fix level 4 compilier warnings.
00083  *
00084  * *****************  Version 11  *****************
00085  * User: Kirk Stowell Date: 5/17/99    Time: 9:07p
00086  * Updated in $/CodeJockey/CJ60Lib
00087  * Paul [RowingWolf@aol.com] - Added the following support methods:
00088  * void SetActiveView(CView* pUserView)
00089  * void AssociateImageIndexWithRuntimeClass(int nIndex, CRuntimeClass*
00090  * pRuntimeClass)
00091  * void AssociateImageIndexWithRuntimeClass(int nIndex, LPCTSTR
00092  * lpszRuntimeClassName)
00093  * short GetImageIndexFromRuntimeClass(CRuntimeClass* pRuntimeClass)
00094  * BOOL RemoveAllTabs().
00095  *
00096  * *****************  Version 10  *****************
00097  * User: Kirk Stowell Date: 5/12/99    Time: 5:32a
00098  * Updated in $/CodeJockey/CJ60Lib
00099  * Added support for vc5 compatibility
00100  *
00101  * *****************  Version 9  *****************
00102  * User: Kirk Stowell Date: 5/11/99    Time: 10:02p
00103  * Updated in $/CodeJockey/CJ60Lib
00104  * After much frustration, a class re-write. Fixed many of the issues with
00105  * painting, invalid pointers and memory leaks. Added document support for
00106  * views associated with the tab control.
00107  *
00108  * *****************  Version 8  *****************
00109  * User: Kirk Stowell Date: 4/14/99    Time: 11:53p
00110  * Updated in $/CodeJockey/CJ60Lib
00111  * Added context popupMenu for CJTabCtrl to use Brent Corkum's BCMenu (CCJMenu).
00112  *
00113  * *****************  Version 7  *****************
00114  * User: Kirk Stowell Date: 4/03/99    Time: 11:52p
00115  * Updated in $/CodeJockey/CJ60Lib
00116  * Added comments and cleaned up code, modified AddView(...) to allow a
00117  * CDocument to be associated with the view added to the tab control.
00118  *
00119  * *****************  Version 6  *****************
00120  * User: Kirk Stowell Date: 3/14/99    Time: 11:51p
00121  * Updated in $/CodeJockey/CJ60Lib
00122  * Gonzalo Pereyra [ persys@adinet.com.uy ] - I wanted to trap NM_RETURN
00123  * notifications in my CTreeView Class. I couldn't... It turns out that
00124  * CControlbar::PreTranslateMessage() will eat all dialog messages...It
00125  * will never get dispatched to my window. So I Overrided it in :
00126  * CCJTabCtrlBar::PreTranslateMessage(). this will allow for message
00127  * reflection and we will get NM_RETURN. I don't know if this a good
00128  * solution but for now , it works.
00129  *
00130  * *****************  Version 5  *****************
00131  * User: Kirk Stowell Date: 2/24/99    Time: 11:49p
00132  * Updated in $/CodeJockey/CJ60Lib
00133  * Phil Baxter [pgb@mrjinx.demon.co.uk] - Fixed the following problems
00134  * when tabs are added after creation:
00135  * 1. The tab was created, but the view that was showing on the tab was
00136  * not visible.
00137  * 2. Get an assertion when the AddView function attempts to perform the
00138  * AddTool function.
00139  * 3. When a new view is added, although you set it to be the active view,
00140  * it isn't raised to the top of the stack in the display.
00141  * 4. The Tab name as stored in the TCB_ITEM structure is now a CString,
00142  * this removes the 32 byte limit that it previously had.
00143  * 5. New methods for obtaining the name as stored in the TCB_ITEM
00144  * structure.
00145  * 6. New Methods for deleting a view from the control, this removes the
00146  * view entirely including its  associated tab.
00147  * 7. Some minor fixes around assertions when trying to manipulate the
00148  * control when it has not had any tabs created.
00149  * 8. Added two new member functions:
00150  * void SetViewToolTip(int nView, LPCTSTR lpszLabel);
00151  * void SetViewToolTip(CRuntimeClass *pViewClass, LPCTSTR lpszLabel);
00152  *
00153  * *****************  Version 4  *****************
00154  * User: Kirk Stowell Date: 1/31/99    Time: 11:48p
00155  * Updated in $/CodeJockey/CJ60Lib
00156  * Commented out 2 calls to SetActiveView(). This somewhat fixes the
00157  * problem with CTRL+TAB in activatation of MDI child windows, however if
00158  * you click inside the view, this breaks CTRL+TAB again, will look at
00159  * this when I get some free time. Thanks to Pierre Guimont
00160  * (Pierre_Guimont@mitel.com) for pointing this out.
00161  *
00162  * Added m_TabCtrl.GetRowCount() as per Rashid Thadha
00163  * rashidt@consort.co.uk) request.
00164  *
00165  * *****************  Version 3  *****************
00166  * User: Kirk Stowell Date: 1/17/99    Time: 11:46p
00167  * Updated in $/CodeJockey/CJ60Lib
00168  * Added helper class CCJTabCtrl to eliminate re-painting problems such as
00169  * when the app is minimized then restored.
00170  *
00171  * *****************  Version 2  *****************
00172  * User: Kirk Stowell Date: 1/03/99    Time: 11:46p
00173  * Updated in $/CodeJockey/CJ60Lib
00174  * Application freezing bug fixed by
00175  * LiangYiBin.Donald(mailto:lybd@yahoo.com)
00176  *
00177  * *****************  Version 1  *****************
00178  * User: Kirk Stowell Date: 10/17/98   Time: 11:45p
00179  * Created in $/CodeJockey/CJ60Lib
00180  * Initial re-write and release.
00181  *
00182  ***************************************************************************/
00184
00185 #include "stdafx.h"
00186 #include "CJTabCtrlBar.h"
00187 #include "CJResource.h"
00188
00189 #ifdef _DEBUG
00190 #define new DEBUG_NEW
00191 #undef THIS_FILE
00192 static char THIS_FILE[] = __FILE__;
00193 #endif
00194
00196 // CCJTabCtrlBar
00197
00198 CCJTabCtrlBar::CCJTabCtrlBar()
00199 {
00200     m_nActiveTab        = 0;
00201     m_nNextToolTipId    = 0;
00202     m_bToolTipsEnabled  = TRUE;
00203 }
00204
00205 CCJTabCtrlBar::~CCJTabCtrlBar()
00206 {
00207     while(!m_viewList.IsEmpty())
00208     {
00209         TCB_ITEM *pMember = m_viewList.RemoveHead();
00210         _delete(pMember);
00211     }
00212 }
00213
00214 IMPLEMENT_DYNAMIC(CCJTabCtrlBar, CCJControlBar)
00215
00216 BEGIN_MESSAGE_MAP(CCJTabCtrlBar, CCJControlBar)
00217     //{{AFX_MSG_MAP(CCJTabCtrlBar)
00218     ON_WM_CREATE()
00219     ON_WM_WINDOWPOSCHANGED()
00220     ON_NOTIFY(TCN_SELCHANGE, IDC_TAB_CONTROL, OnTabSelChange)
00221     //}}AFX_MSG_MAP
00222 END_MESSAGE_MAP()
00223
00225 // CCJTabCtrlBar message handlers
00226
00227 void CCJTabCtrlBar::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
00228 {
00229     // Get a pointer to the parent frame.
00230     CFrameWnd* pFrame = GetParentFrame();
00231     ASSERT(pFrame != NULL);
00232
00233     POSITION pos = m_viewList.GetHeadPosition();
00234     while( pos != NULL )
00235     {
00236         // Get the item for this position.
00237         TCB_ITEM *pItem = (TCB_ITEM*)m_viewList.GetNext(pos);
00238         ASSERT(pItem != NULL);
00239
00240         // To avoid mainwindow freezing, we must
00241         // deativate the view, it's not visible now.
00242         if (pFrame->GetActiveView() == pItem->pWnd) {
00243             pFrame->SetActiveView(NULL);
00244         }
00245
00246         // Resize the tab view.
00247         SizeTabView(pItem->pWnd);
00248     }
00249
00250     CCJControlBar::OnWindowPosChanged(lpwndpos);
00251 }
00252
00253 int CCJTabCtrlBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00254 {
00255     if (CCJControlBar::OnCreate(lpCreateStruct) == -1)
00256         return -1;
00257
00258     // Create the Tab Control
00259     if (!m_TabCtrl.Create(this, IDC_TAB_CONTROL))
00260     {
00261         TRACE0( "Unable to create tab control bar\n" );
00262         return -1;
00263     }
00264
00265     // Associate the child window.
00266     SetChild(&m_TabCtrl);
00267
00268     return 0;
00269 }
00270
00271 BOOL CCJTabCtrlBar::PreTranslateMessage(MSG* pMsg)
00272 {
00273     if (pMsg->message == WM_KEYDOWN)
00274     {
00275         switch (pMsg->wParam)
00276         {
00277         case VK_RETURN:
00278             m_pActiveView->SendMessage(pMsg->message,
00279                 pMsg->wParam, pMsg->lParam);
00280             return TRUE;
00281         }
00282     }
00283
00284     return CCJControlBar::PreTranslateMessage(pMsg);
00285 }
00286
00287 void CCJTabCtrlBar::OnTabSelChange(NMHDR* /*pNMHDR*/, LRESULT* /*pResult*/)
00288 {
00289     SetActiveView(m_TabCtrl.GetCurSel());
00290 }
00291
00292 void CCJTabCtrlBar::GetChildRect(CRect &rect)
00293 {
00294     CCJControlBar::GetChildRect(rect);
00295
00296     if (IsFloating()) {
00297         rect.DeflateRect(2,2);
00298     }
00299 }
00300
00301 BOOL CCJTabCtrlBar::CreateTabView(CRuntimeClass *pViewClass, CDocument *pDocument, CCreateContext *pContext)
00302 {
00303     CWnd* pWnd = NULL;
00304
00305     // if no context specified, generate one
00306     // from the currently selected client if possible...
00307     if (pContext == NULL)
00308     {
00309         CCreateContext context;
00310
00311         context.m_pNewViewClass     = pViewClass;
00312         context.m_pCurrentDoc       = pDocument;
00313         context.m_pNewDocTemplate   = pDocument?pDocument->GetDocTemplate() : NULL;
00314         context.m_pLastView         = GetParentFrame()->GetActiveView();
00315         context.m_pCurrentFrame     = GetParentFrame();
00316
00317         pContext = &context;
00318     }
00319
00320     TRY
00321     {
00322         // Create the object.
00323         pWnd = DYNAMIC_DOWNCAST(CWnd, pViewClass->CreateObject());
00324         if (!pWnd) AfxThrowMemoryException();
00325     }
00326     CATCH_ALL(e)
00327     {
00328         TRACE0( "Out of memory creating a view.\n" );
00329         // Note: DELETE_EXCEPTION(e) not required
00330         return FALSE;
00331     }
00332     END_CATCH_ALL
00333
00334     ASSERT_KINDOF(CWnd, pWnd);
00335     ASSERT(pWnd->m_hWnd == NULL); // not yet created.
00336
00337     // Create with the right size and position
00338     if (!pWnd->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
00339         CRect(0,0,0,0), this, 0, pContext))
00340     {
00341         TRACE0( "Warning: couldn't create client pane for view.\n" );
00342         // pWnd will be cleaned up by PostNcDestroy
00343         return FALSE;
00344     }
00345
00346     // Set the newly create view as the active view.
00347     m_pActiveView = DYNAMIC_DOWNCAST(CView, pWnd);
00348     ASSERT_KINDOF(CView, m_pActiveView);
00349
00350     // If we were floating last, call OnInitialUpdate for the view
00351     // since CMiniDockFrameWnd does not do this for us.
00352     if( m_bFloating && m_pActiveView ) {
00353         m_pActiveView->OnInitialUpdate();
00354     }
00355
00356     return TRUE;
00357 }
00358
00359 TCB_ITEM* CCJTabCtrlBar::CreateTabListItem(LPCTSTR lpszLabel)
00360 {
00361     // Allocate a new TCB_ITEM object.
00362     TCB_ITEM* pMember = new TCB_ITEM;
00363
00364     pMember->pWnd           = m_pActiveView;
00365     pMember->szTabLabel     = lpszLabel;
00366     pMember->szToolTipLabel = lpszLabel;
00367     pMember->uiToolTipId    = m_nNextToolTipId++;
00368
00369     // Add the new TCB_ITEM to the tab item list.
00370     m_viewList.AddTail(pMember);
00371
00372     // Create the ToolTip for the tab.
00373     AddToolTip(pMember, lpszLabel);
00374
00375     return pMember;
00376 }
00377
00378 CToolTipCtrl* CCJTabCtrlBar::GetToolTip()
00379 {
00380     // Get a pointer to the tab control's CToolTipCtrl.
00381 #ifdef _VC_VERSION_5
00382     CToolTipCtrl* pToolTip = m_TabCtrl.GetTooltips();
00383     ASSERT(pToolTip != NULL);
00384 #else
00385     CToolTipCtrl* pToolTip = m_TabCtrl.GetToolTips();
00386     ASSERT(pToolTip != NULL);
00387 #endif // _VC_VERSION_5
00388
00389     return pToolTip;
00390 }
00391
00392 void CCJTabCtrlBar::AddToolTip(TCB_ITEM *pMember, LPCTSTR lpszLabel)
00393 {
00394     // Get the tool tips for the tab control.
00395     CToolTipCtrl* pToolTip = GetToolTip();
00396
00397     // Add the tool tip.
00398     if( pMember->uiToolTipId == 0 ) {
00399         pToolTip->AddTool( &m_TabCtrl, lpszLabel,
00400             NULL, pMember->uiToolTipId );
00401     }
00402     else {
00403         pToolTip->AddTool( &m_TabCtrl, lpszLabel,
00404             CRect(0,0,0,0), pMember->uiToolTipId );
00405     }
00406 }
00407
00408 void CCJTabCtrlBar::ResetToolTips(CToolTipCtrl* pToolTip)
00409 {
00410     if (pToolTip)
00411     {
00412         int nIndex = 0;
00413         POSITION pos;
00414         for( pos = m_viewList.GetHeadPosition(); pos; m_viewList.GetNext(pos) )
00415         {
00416             // Get the next item in the list.
00417             TCB_ITEM* pMember = m_viewList.GetAt( pos );
00418
00419             // Update the tooltip for the view
00420             pMember->uiToolTipId = nIndex;
00421             pToolTip->UpdateTipText( pMember->szToolTipLabel, &m_TabCtrl,
00422                 pMember->uiToolTipId );
00423
00424             nIndex++;
00425         }
00426
00427         m_nNextToolTipId = ( nIndex == 0 )?1:nIndex;
00428     }
00429 }
00430
00431 BOOL CCJTabCtrlBar::AddView(LPCTSTR lpszLabel, CRuntimeClass *pViewClass,
00432     CDocument* pDoc/*=NULL*/, UINT nIndex/*=-1*/, CCreateContext *pContext/*=NULL*/)
00433 {
00434     OverkillAssert(pViewClass);
00435
00436     // Create the view to be associate with tab.
00437     if (!CreateTabView(pViewClass, pDoc, pContext))
00438         return FALSE;
00439
00440     // Create the tab list item.
00441     if (CreateTabListItem(lpszLabel) == NULL)
00442         return FALSE;
00443
00444     // Since the tool tip count has changed,
00445     // re-initialize the tooltips.
00446     ResetToolTips(GetToolTip());
00447
00448     int nViews = ( nIndex == -1 )?m_viewList.GetCount():nIndex;
00449     if( nViews != 1 ) {
00450         m_pActiveView->EnableWindow(FALSE);
00451         m_pActiveView->ShowWindow(SW_HIDE);
00452     }
00453
00454     // Insert the new tab item.
00455     TC_ITEM tci;
00456     tci.mask    = TCIF_TEXT | TCIF_IMAGE;
00457     tci.pszText = (LPTSTR)(LPCTSTR)lpszLabel;
00458     tci.iImage  = nViews-1;
00459     m_TabCtrl.InsertItem(m_viewList.GetCount()-1, &tci);
00460
00461     // Resize the tab view.
00462     SizeTabView(m_pActiveView);
00463
00464     return TRUE;
00465 }
00466
00467 void CCJTabCtrlBar::SizeTabView(CWnd *pWnd)
00468 {
00469     // Get the new window size.
00470     CRect rcChild;
00471     GetChildRect(rcChild);
00472     rcChild.DeflateRect(3,3);
00473     rcChild.bottom -= (21 * m_TabCtrl.GetRowCount());
00474
00475     // Resize the window.
00476     pWnd->MoveWindow(rcChild);
00477     pWnd->SetWindowPos(NULL, 0,0,0,0,
00478         SWP_NOSIZE|SWP_NOMOVE);
00479 }
00480
00481 void CCJTabCtrlBar::OverkillAssert(CRuntimeClass *pViewClass)
00482 {
00483 #ifdef _DEBUG
00484     ASSERT_VALID(this);
00485     ASSERT(pViewClass != NULL);
00486     ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CWnd)));
00487     ASSERT(AfxIsValidAddress(pViewClass, sizeof(CRuntimeClass), FALSE));
00488 #else
00489     UNUSED_ALWAYS( pViewClass );
00490 #endif
00491 }
00492
00493 void CCJTabCtrlBar::RemoveListItem(POSITION pos)
00494 {
00495     if( pos != NULL )
00496     {
00497         // remove the page from internal list
00498         TCB_ITEM *pMember = m_viewList.GetAt(pos);
00499         ASSERT(pMember);
00500
00501         // And delete the member window, freeing our stored
00502         // values relating to it
00503         if (pMember->pWnd != NULL) {
00504             pMember->pWnd->DestroyWindow();
00505             pMember->pWnd = NULL;
00506         }
00507
00508         // Remove from list and free memory.
00509         m_viewList.RemoveAt(pos);
00510         _delete(pMember);
00511     }
00512 }
00513
00514 void CCJTabCtrlBar::DeleteView(int nView)
00515 {
00516     ASSERT_VALID( this );
00517     ASSERT(( nView >= 0 ) && (m_TabCtrl.GetItemCount() > nView));
00518
00519     TRACE2("***DeleteView: %d ( /%d )\n", nView,m_viewList.GetCount());
00520
00521     // Now find the view we want to delete and remove it
00522     POSITION pos = m_viewList.FindIndex(nView);
00523     if( pos != NULL )
00524     {
00525         CView *pOldActiveView;
00526         pOldActiveView = m_pActiveView;
00527
00528         // Ensure that we get no dangling pointers
00529         // DO NOT (RE-)MOVE THIS CODE ! Gero Kuehn [gero.kuehn@isc-soft.de]
00530         if(GetParentFrame()->GetActiveView() == DYNAMIC_DOWNCAST( CView, m_viewList.GetAt(pos)->pWnd))
00531             GetParentFrame()->SetActiveView( NULL , FALSE);
00532
00533         // Remove item from list, and free memory.
00534         RemoveListItem( pos );
00535
00536         // Remove it from the tab control
00537         m_TabCtrl.DeleteItem(nView);
00538
00539         // Finally, if we have just deleted the active view, reset the
00540         // active tab to be the first view in the list
00541         if (nView == m_nActiveTab)
00542         {
00543             m_nActiveTab = -1;
00544             m_pActiveView = NULL; // Gero Kuehn [gero.kuehn@isc-soft.de]
00545         }
00546         else
00547         {
00548             // ** GK/ISC
00549             if((m_nActiveTab - 1)>=0) {
00550                 SetActiveView(m_nActiveTab - 1);
00551             }
00552         }
00553
00554         // Reset the tooltips for the views we have left...
00555         ResetToolTips(GetToolTip());
00556     }
00557 }
00558
00559 void CCJTabCtrlBar::DeleteView(CRuntimeClass *pViewClass)
00560 {
00561     OverkillAssert(pViewClass);
00562
00563     int nIndex = 0;
00564     for( POSITION pos = m_viewList.GetHeadPosition(); pos; m_viewList.GetNext( pos ))
00565     {
00566         TCB_ITEM *pMember = m_viewList.GetAt(pos);
00567         ASSERT(pMember);
00568
00569         if (pMember->pWnd->IsKindOf(pViewClass)) {
00570             DeleteView(nIndex);
00571             return;
00572         }
00573         nIndex++;
00574     }
00575 }
00576
00577 void CCJTabCtrlBar::RemoveView(int nView)
00578 {
00579     ASSERT_VALID( this );
00580     ASSERT(( nView >= 0 ) && (m_TabCtrl.GetItemCount() > nView));
00581     RemoveListItem( m_viewList.FindIndex( nView ));
00582 }
00583
00584 void CCJTabCtrlBar::SetViewToolTip(int nView, LPCTSTR lpszLabel)
00585 {
00586     ASSERT_VALID(this);
00587     ASSERT(( nView >= 0 ) && (m_TabCtrl.GetItemCount() > nView));
00588
00589     // Find the view we want to change the tooltip for and
00590     // reset its tooltip text
00591     POSITION pos = m_viewList.FindIndex( nView );
00592     if( pos != NULL )
00593     {
00594         // Get the private data for the view
00595         TCB_ITEM *pMember = m_viewList.GetAt(pos);
00596
00597         // Reset the tooltip text to the new value
00598         pMember->szToolTipLabel = lpszLabel;
00599
00600         // Update the tooltip for the view
00601         GetToolTip()->UpdateTipText( pMember->szToolTipLabel,
00602             &m_TabCtrl, pMember->uiToolTipId );
00603     }
00604 }
00605
00606 void CCJTabCtrlBar::SetViewToolTip(CRuntimeClass *pViewClass, LPCTSTR lpszLabel)
00607 {
00608     OverkillAssert(pViewClass);
00609
00610     int nIndex=0;
00611     for (POSITION pos=m_viewList.GetHeadPosition(); pos; m_viewList.GetNext(pos))
00612     {
00613         TCB_ITEM *pMember=m_viewList.GetAt(pos);
00614         if (pMember->pWnd->IsKindOf(pViewClass))
00615         {
00616             SetViewToolTip(nIndex, lpszLabel);
00617             break;
00618         }
00619         nIndex++;
00620     }
00621     return;
00622 }
00623
00624 CView* CCJTabCtrlBar::GetView(int nView)
00625 {
00626     ASSERT_VALID(this);
00627     ASSERT(( nView >= 0 ) && ( m_TabCtrl.GetItemCount() > nView ));
00628
00629     if( nView != -1 )
00630     {
00631         POSITION pos = m_viewList.FindIndex( nView );
00632         if( pos != NULL )
00633         {
00634             TCB_ITEM* pMember = m_viewList.GetAt( pos );
00635             return ( pMember )?(CView*)pMember->pWnd:NULL;
00636         }
00637
00638         return NULL;
00639     }
00640
00641     return NULL;
00642 }
00643
00644 CView* CCJTabCtrlBar::GetView(CRuntimeClass *pViewClass)
00645 {
00646     OverkillAssert(pViewClass);
00647
00648     for( POSITION pos = m_viewList.GetHeadPosition(); pos; m_viewList.GetNext( pos ))
00649     {
00650         TCB_ITEM *pMember = m_viewList.GetAt( pos );
00651         if( pMember->pWnd->IsKindOf( pViewClass )) {
00652             return (CView*)pMember->pWnd;
00653         }
00654     }
00655     return NULL;
00656 }
00657
00658 LPCTSTR CCJTabCtrlBar::GetViewName(int nView)
00659 {
00660     ASSERT_VALID(this);
00661     ASSERT(( nView >= 0 ) && ( m_TabCtrl.GetItemCount() > nView ));
00662
00663     if( nView != -1 )
00664     {
00665         POSITION pos = m_viewList.FindIndex( nView );
00666         if( pos != NULL )
00667         {
00668             TCB_ITEM* pMember = m_viewList.GetAt( pos );
00669             return ( pMember )?(LPCTSTR)pMember->szTabLabel:NULL;
00670         }
00671
00672         return NULL;
00673     }
00674
00675     return NULL;
00676 }
00677
00678 LPCTSTR CCJTabCtrlBar::GetViewName(CRuntimeClass *pViewClass)
00679 {
00680     OverkillAssert(pViewClass);
00681
00682     for( POSITION pos = m_viewList.GetHeadPosition(); pos; m_viewList.GetNext( pos ))
00683     {
00684         TCB_ITEM *pMember = m_viewList.GetAt( pos );
00685         if( pMember->pWnd->IsKindOf( pViewClass )) {
00686             return (LPCTSTR)pMember->szTabLabel;
00687         }
00688     }
00689     return NULL;
00690 }
00691
00692 void CCJTabCtrlBar::SetActiveView(int nView)
00693 {
00694     ASSERT_VALID(this);
00695     ASSERT(( nView >= 0 ) && ( m_TabCtrl.GetItemCount() > nView ));
00696
00697     if(( nView != -1 ) && ( nView != m_nActiveTab ))
00698     {
00699         POSITION pos = m_viewList.FindIndex( nView );
00700         if( pos != NULL )
00701         {
00702             // Hide the old view we are changing.
00703             // GK/ISC
00704             POSITION oldPos = NULL;
00705             if( m_nActiveTab >= 0) {
00706                 oldPos = m_viewList.FindIndex( m_nActiveTab );
00707             }
00708
00709             if( oldPos )
00710             {
00711                 TCB_ITEM* pOldItem = m_viewList.GetAt( oldPos );
00712                 pOldItem->pWnd->EnableWindow(FALSE);
00713                 pOldItem->pWnd->ShowWindow(SW_HIDE);
00714             }
00715
00716             // Show the newly selected view.
00717             TCB_ITEM* pMember = m_viewList.GetAt( pos );
00718             pMember->pWnd->EnableWindow(TRUE);
00719             pMember->pWnd->ShowWindow(SW_SHOW);
00720             pMember->pWnd->SetFocus();
00721
00722             // select the tab (if tab programmatically changed)
00723             m_nActiveTab = nView;
00724             m_TabCtrl.SetCurSel( m_nActiveTab );
00725
00726             // Set the active view.
00727             m_pActiveView = DYNAMIC_DOWNCAST( CView, pMember->pWnd );
00728             ASSERT_KINDOF( CView, m_pActiveView );
00729             GetParentFrame()->SetActiveView( m_pActiveView );
00730         }
00731     }
00732 }
00733
00734 void CCJTabCtrlBar::SetActiveView(CRuntimeClass *pViewClass)
00735 {
00736     OverkillAssert(pViewClass);
00737
00738     int nView = 0;
00739     for (POSITION pos=m_viewList.GetHeadPosition(); pos; m_viewList.GetNext(pos))
00740     {
00741         TCB_ITEM *pMember=m_viewList.GetAt(pos);
00742         if (pMember->pWnd->IsKindOf(pViewClass))
00743         {
00744             //first hide old first view
00745             m_pActiveView->EnableWindow(FALSE);
00746             m_pActiveView->ShowWindow(SW_HIDE);
00747
00748             // set new active view
00749             m_pActiveView = (CView*)pMember->pWnd;
00750
00751             // enable, show, set focus to new view
00752             m_pActiveView->EnableWindow(TRUE);
00753             m_pActiveView->ShowWindow(SW_SHOW);
00754             m_pActiveView->SetFocus();
00755
00756             m_nActiveTab = nView;
00757
00758             // select the tab
00759             m_TabCtrl.SetCurSel(m_nActiveTab);
00760
00761             break;
00762         }
00763         nView++;
00764     }
00765 }
00766
00767 void CCJTabCtrlBar::SetActiveView(CView* pUserView)
00768 {
00769     // Walk through the tabs
00770     for (POSITION pos=m_viewList.GetHeadPosition(); pos; m_viewList.GetNext(pos))
00771     {
00772         // Get the tab's view
00773         CView* pTabView = (CView *)(m_viewList.GetAt(pos)->pWnd);
00774
00775         // Does the tab view match the requested view?
00776         if (pTabView == pUserView)
00777         {
00778             // Change the active view
00779             m_pActiveView = pTabView;
00780             ((CFrameWnd *)GetParent())->SetActiveView((CView *)m_pActiveView);
00781         }
00782     }
00783 }
00784
00785 void CCJTabCtrlBar::AssociateImageIndexWithRuntimeClass(int nIndex, CRuntimeClass* pRuntimeClass)
00786 {
00787     CString szClassName(pRuntimeClass->m_lpszClassName);
00788     m_ClassNameToImageIndexMap[szClassName] = (short*)nIndex;
00789 }
00790
00791 void CCJTabCtrlBar::AssociateImageIndexWithRuntimeClass(int nIndex, LPCTSTR lpszRuntimeClassName)
00792 {
00793     CString szClassName(lpszRuntimeClassName);
00794     m_ClassNameToImageIndexMap[szClassName] = (short*)nIndex;
00795 }
00796
00797 short CCJTabCtrlBar::GetImageIndexFromRuntimeClass(CRuntimeClass* pRuntimeClass)
00798 {
00799     ASSERT(m_ClassNameToImageIndexMap.GetCount() > 0);
00800     CString szClassName(pRuntimeClass->m_lpszClassName);
00801
00802     // Look for class name
00803     short* psValue;
00804     if (FALSE == m_ClassNameToImageIndexMap.Lookup(szClassName, (void*&)psValue))
00805         return -1;
00806
00807     // return the de-referenced pointer.
00808     return *psValue;
00809
00810 }
00811
00812 BOOL CCJTabCtrlBar::RemoveAllTabs()
00813 {
00814     // Itterate the tab views
00815     while(!m_viewList.IsEmpty())
00816     {
00817         RemoveView(0);  // Remove the view from the bar
00818         m_TabCtrl.DeleteItem(0);
00819     }
00820     m_pActiveView = NULL;
00821     ((CFrameWnd *)GetParent())->SetActiveView(NULL);
00822     Invalidate();
00823     return TRUE;
00824 }
00825
00826 int CCJTabCtrlBar::GetTabFromPoint(CPoint point)
00827 {
00828     TCHITTESTINFO tch;
00829     memset(&tch, 0, sizeof(TCHITTESTINFO));
00830
00831     if( point == CPoint(0,0) ) {
00832         CPoint pt;
00833         GetCursorPos(&pt);
00834         ScreenToClient(&pt);
00835         tch.pt = pt;
00836     } else {
00837         tch.pt = point;
00838     }
00839
00840     int iTab = m_TabCtrl.HitTest(&tch);
00841
00842     if( iTab != -1 ) {
00843         m_nPointTab = iTab ;
00844     }
00845
00846     return iTab;
00847 }
00848
00849 BOOL CCJTabCtrlBar::EnableToolTips(BOOL bEnable)
00850 {
00851     BOOL bPrev = m_bToolTipsEnabled;
00852
00853     m_bToolTipsEnabled = bEnable;
00854
00855     // Get the tool tips for the tab control.
00856     CToolTipCtrl* pToolTip = GetToolTip();
00857
00858     if (pToolTip)
00859         pToolTip->Activate(m_bToolTipsEnabled);
00860     else
00861         m_bToolTipsEnabled = bPrev;
00862
00863     return bPrev;
00864 }
00865
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCharFormat Member List

This is the complete list of members for CCharFormat, including all inherited members.

CCharFormat() | CCharFormat | [inline]
CCharFormat(const CHARFORMAT &newf) | CCharFormat | [inline]
operator CHARFORMAT &() | CCharFormat | [inline]

Generated on Sat Aug 7 22:48:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CEditKeywordDlg Member List

This is the complete list of members for CEditKeywordDlg, including all inherited members.

CEditKeywordDlg(const char *description, const char *keyword, const char *value, CWnd *pParent=NULL) | CEditKeywordDlg |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CEditKeywordDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CEditKeywordDlg |
InitHelpID() | CEditKeywordDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_description | CEditKeywordDlg |
m_keyword | CEditKeywordDlg |
m_value | CEditKeywordDlg |
m_valueCombo | CEditKeywordDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelp() | CEditKeywordDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CHHelpDialog | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoWatchOffHandler Member List

This is the complete list of members for KoWatchOffHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoWatchOffHandler() | KoWatchOffHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoWatchOffHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoWatchOffHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJFlatButton Member List

This is the complete list of members for CCJFlatButton, including all inherited members.

CCJFlatButton() | CCJFlatButton |
DisableFlatLook(BOOL bDisable=FALSE) | CCJFlatButton | [virtual]
DrawButtonBitmap(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawButtonIcon(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawButtonText(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CCJFlatButton | [virtual]
m_bAltColor | CCJFlatButton | [protected]
m_bFlatLook | CCJFlatButton | [protected]
m_bLBtnDown | CCJFlatButton | [protected]
m_bMouseOver | CCJFlatButton | [protected]
m_bPainted | CCJFlatButton | [protected]
m_clrAltHilite | CCJFlatButton | [protected]
m_clrAltNormal | CCJFlatButton | [protected]
m_clrAltShadow | CCJFlatButton | [protected]
m_clrAltTextNm | CCJFlatButton | [protected]
m_clrDkShad | CCJFlatButton | [protected]
m_clrHilite | CCJFlatButton | [protected]
m_clrNormal | CCJFlatButton | [protected]
m_clrShadow | CCJFlatButton | [protected]
m_clrTextGy | CCJFlatButton | [protected]
m_clrTextNm | CCJFlatButton | [protected]
m_Font | CCJFlatButton | [protected]
m_hCursor | CCJFlatButton | [protected]
m_hPushed | CCJFlatButton | [protected]
m_pFont | CCJFlatButton | [protected]
m_sizeIcon | CCJFlatButton | [protected]
OnEraseBkgnd(CDC *pDC) | CCJFlatButton | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnPaint() | CCJFlatButton | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJFlatButton | [protected]
OnSysColorChange() | CCJFlatButton | [protected]
OnTimer(UINT nIDEvent) | CCJFlatButton | [protected]
SetAlternateColors(COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm) | CCJFlatButton | [virtual]
SetButtonFont(CFont *pFont) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, CSize size) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, HICON hPushed, CSize size) | CCJFlatButton | [virtual]
UpdateFont() | CCJFlatButton | [protected, virtual]
~CCJFlatButton() | CCJFlatButton | [virtual]

Generated on Sat Aug 7 22:49:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TbEntryDropDown Member List

This is the complete list of members for TbEntryDropDown, including all inherited members.

current | TbEntryDropDown |
icons | TbEntryDropDown |
kind | TbEntry |
TbEntry(tbeKind k) | TbEntry | [inline]
TbEntryDropDown() | TbEntryDropDown | [inline]
~TbEntry() | TbEntry | [inline, virtual]
~TbEntryDropDown() | TbEntryDropDown | [inline, virtual]

Generated on Sat Aug 7 22:56:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CExploreBar Member List

This is the complete list of members for CExploreBar, including all inherited members.

CExploreBar() | CExploreBar | [protected]
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CExploreBar | [virtual]
DisableCommon() | CExploreBar | [protected]
m_TreeCtrl | CExploreBar |
OnDraw(CDC *pDC) | CExploreBar | [protected, virtual]
OnUpdateCmd(CCmdUI *pCmdUI) | CExploreBar | [protected]
OnUpdateViewCheckout(CCmdUI *pCmdUI) | CExploreBar | [protected]
OnUpdateViewImport(CCmdUI *pCmdUI) | CExploreBar | [protected]
OnViewCheckout() | CExploreBar | [protected]
OnViewImport() | CExploreBar | [protected]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CExploreBar | [protected]
~CExploreBar() | CExploreBar | [protected, virtual]

Generated on Sat Aug 7 22:52:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/version_fu.h Source File

WinCvs/version_fu.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jonathan M. Gilligan <jonathan.gilligan@vanderbilt.edu> --- 23 June 2001
00019  */
00020
00021 /*
00022  * version_fu.h -- Macros used for version numbering
00023  */
00024
00025 #pragma once
00026
00028 // Documentation
00029 //
00030 // The macros below generate a number of strings that describe aspects of
00031 // the current build.
00032 //
00033 // Principal aspects include a number of MS-specified flags:
00034 //
00035 // Debug build:         Self-explanatory.
00036 //
00037 // Prerelease build:    An experimental or alpha or beta build. If either
00038 //                      of the symbols WINCVS_ALPHA_RELEASE or
00039 //                      WINCVS_BETA_RELEASE is defined, then the build is
00040 //                      automatically tagged as prerelease.
00041 //
00042 //                      The build is automatically flagged as a prerelease
00043 //                      build if the flag WINCVS_RELEASE is NOT defined.
00044 //                      Moreover, if either WINCVS_ALPHA_RELEASE or
00045 //                      WINCVS_BETA_RELEASE is defined, it overrides
00046 //                      WINCVS_RELEASE.
00047 //
00048 // Private Build:       A non-standard build. We use the private build
00049 //                      flag to indicate that the build was not an
00050 //                  `   official release. As checked out with CVS, the
00051 //                      sources are set up to build as a private build.
00052 //
00053 //                      To build an official release, the flag
00054 //                      WINCVS_OFFICIAL_DISTRIBUTION should be
00055 //                      defined at build time.
00056 //
00057 // Special Build:       Some other kind of non-standard build. We do not
00058 //                      currently define special builds, but the plumbing
00059 //                      is in place in version_fu to handle special builds
00060 //                      if the flag WINCVS_SPECIAL_BUILD is defined.
00061 //
00062 //
00063 // Strings and other macros generated by version_fu:
00064 //
00065 // WINCVS_FILEVERSION,
00066 // WINCVS_PRODUCTVERSION:   Version tokens to be used in the VERSION_INFO
00067 //                      resource. These tokens have the form x,x,x,x where
00068 //                      x is a decimal number indicating
00069 //                      major,minor,patch,build.
00070 //
00071 //                      File version refers to the specific executable file
00072 //                      (WinCvs.exe or cvs.exe). Product version refers to
00073 //                      the WinCvs package as a whole.
00074 //
00075 // WINCVS_FILEVERSION_STRING,
00076 // WINCVS_PRODUCTVERSION_STRING:    Double-quoted string equivalents of the
00077 //                      above. The format is:
00078 //                      "N x.x.x.x r (s p u d Build x)",
00079 //                      Where
00080 //                      N = name (of file or product)
00081 //                      x.x.x.x = major.minor.patchlevel.build,
00082 //                      r = prerelease build string,
00083 //                      s = special build string,
00084 //                      p = private build string,
00085 //                      u = unicode build string,
00086 //                      d = debug build string.
00087 //
00088 //                      Example:
00089 //                      "WinCvs 1.3.2.7 Beta 2 (Special Private Unicode Debug Build 7)"
00090 //
00091 // WCVS_PATCHED_FLAG,
00092 // WCVS_SPECIAL_BUILD_FLAG,
00093 // WCVS_PRIVATE_BUILD_FLAG,
00094 // WCVS_PRERELEASE_FLAG,
00095 // WVVS_DEBUG_BUILD_FLAG:   These are flags (numbers, which can be OR'ed together
00096 //                          for the FILEFLAGS member of VERSION_INFO.
00097 //
00098 // WCVS_UNICODE_BUILD_STRING_PREFIX,
00099 // WCVS_DEBUG_BUILD_STRING_PREFIX,
00100 // WCVS_SPECIAL_BUILD_STRING_PREFIX,
00101 // WCVS_PRIVATE_BUILD_STRING_PREFIX,
00102 // WCVS_PRERELEASE_BUILD_STRING_PREFIX:    These are strings (ending with
00103 //                          a space) that can be concatenated together
00104 //                          to produce a description of the various
00105 //                          build conditions. The _PREFIX part of the name
00106 //                          indicates that these are in a form to be
00107 //                          concatenated together.
00108 //
00109 //                          The order these fields appear in the File
00110 //                          Description and Product Description fields of
00111 //                          VERSION_INFO are: PRERELEASE, PRIVATE, SPECIAL,
00112 //                          UNICODE, and DEBUG.
00113 //
00114 // WCVS_SPECIAL_BUILD_STRING,
00115 // WCVS_PRIVATE_BUILD_STRING:    the _PREFIX versions with "build"
00116 //                          concatenated to the end.
00117 //
00118 //
00119
00121
00123 // Preprocessor definitions (for version_no.h)
00124 //
00125 // Preprocessor flags (empty #defines):
00126 // These should be #defined in version_no.h
00127 //
00128 // WINCVS_OFFICIAL_DISTRIBUTION:    #define this only when making
00129 //                      an official distribution package. This flag should
00130 //                      never be defined in anything checked into the cvs
00131 //                      repository.
00132 //
00133 // WINCVS_RELEASE:      define this if this is a release (as opposed to a
00134 //                      prerelease) build.
00135 //
00136 // WINCVS_ALPHA_RELEASE:    define this if this is a alpha release. The
00137 //                      alpha number (e.g., alpha 2) will be taken from
00138 //                      the product patch level (see below).
00139 //
00140 // WINCVS_BETA_RELEASE: define this if this is a beta release. The beta
00141 //                      number (e.g., beta 2) will be taken from the
00142 //                      product patch level (see below).
00143 //
00144 // Preprocessor values (#defines with contents):
00145 // These should be #defined in version_no.h
00146 //
00147 // WINCVS_FILE_MAJOR,
00148 // WINCVS_FILE_MINOR,
00149 // WINCVS_FILE_PATCHLEVEL,
00150 //
00151 // WINCVS_PRODUCT_MAJOR,
00152 // WINCVS_PRODUCT_MINOR,
00153 // WINCVS_PRODUCT_PATCHLEVEL,
00154 //
00155 // WINCVS_BUILD:        That macro indicates parts of the version
00156 //                      number. *FILE* indicates specific numbers for the
00157 //                      .exe files (WinCvs.exe, cvs.exe). The *PRODUCT*
00158 //                      numbers indicate the version of the package as a
00159 //                      whole.
00160 //
00161 //                      At this time, WinCvs.exe is at version 1.3.2.x
00162 //                      (WinCvs 1.3 beta 2, build x), cvs.exe is at
00163 //                      1.11.1.x (cvs 1.11 patch level 1, build x). Both
00164 //                      files are part of the WinCvs 1.3 beta 2
00165 //                      distribution.
00166 //
00167 //                      The build numbers for both files should be
00168 //                      incremented (by hand editing version_no.h) at
00169 //                      least once for every build posted publicly at
00170 //                      wincvs.org.
00171 //
00172 //                      EXAMPLE:
00173 //
00174 //                      #define WINCVS_FILE_MAJOR           1
00175 //                      #define WINCVS_FILE_MINOR           3
00176 //                      #define WINCVS_FILE_PATCHLEVEL      2
00177 //
00178 //                      #define WINCVS_PRODUCT_MAJOR        1
00179 //                      #define WINCVS_PRODUCT_MINOR        3
00180 //                      #define WINCVS_PRODUCT_PATCHLEVEL   2
00181 //
00182 //                      #define WINCVS_BUILD                1
00183 //
00184 //
00185 // WINCVS_SPECIAL_BUILD,
00186 // WINCVS_PRIVATE_BUILD:    These should be #defined to a double-quoted
00187 //                      string that will be used to create a prefix for
00188 //                      the build description string. E.g., the following:
00189 //
00190 //                      #define WINCVS_SPECIAL_BUILD "anomalous"
00191 //                      #define WINCVS_PRIVATE_BUILD "in house"
00192 //
00193 //                      Will produce the text "in house anomalous build"
00194 //                      in the file and product description strings,
00195 //                      "anomalous build" in the Special Build Description
00196 //                      string, and "in house build" in the Private Build
00197 //                      string in the VERSION_INFO resource.
00198 //
00199 // All other necessary preprocessor definitions are synthesized by
00200 // version_fu.h
00201 //
00203
00205 // We need two macros because token expansion occurs when PP_STRINGIZE
00206 // expands x when passing it to PP_PASTE.
00207 #define PP_PASTE(x) #x
00208 #define PP_STRINGIZE(x) PP_PASTE(x)
00209
00210 #define WINCVS_FILEVERSION WINCVS_FILE_MAJOR,WINCVS_FILE_MINOR,WINCVS_FILE_PATCHLEVEL,WINCVS_BUILD
00211 #define WINCVS_PRODUCTVERSION WINCVS_PRODUCT_MAJOR,WINCVS_PRODUCT_MINOR,WINCVS_PRODUCT_PATCHLEVEL,WINCVS_BUILD
00212
00213 #if defined(_UNICODE)
00214 #define WCVS_UNICODE_BUILD_STRING_PREFIX "Unicode "
00215 #else
00216 #define WCVS_UNICODE_BUILD_STRING_PREFIX
00217 #endif
00218
00219 #if defined(WCVS_PATCH)
00220 #define WCVS_PATCHED_FLAG VS_FF_PATCHED
00221 #else   // defined(WCVS_PATCH)
00222 #define WCVS_PATCHED_FLAG 0
00223 #endif  // defined(WCVS_PATCH)
00224
00225 #if defined(WINCVS_SPECIAL_BUILD)
00226 #define WCVS_SPECIAL_BUILD_STRING_PREFIX WINCVS_SPECIAL_BUILD " "
00227 #define WCVS_SPECIAL_BUILD_STRING WCVS_SPECIAL_BUILD_STRING_PREFIX "build"
00228 #define WCVS_SPECIAL_BUILD_FLAG VS_FF_SPECIALBUILD
00229 #else   // defined(WINCVS_SPECIAL_BUILD)
00230 #define WCVS_SPECIAL_BUILD_STRING_PREFIX
00231 #define WCVS_SPECIAL_BUILD_STRING
00232 #define WCVS_SPECIAL_BUILD_FLAG 0
00233 #endif  // defined(WINCVS_SPECIAL_BUILD)
00234
00235 #if defined(WINCVS_OFFICIAL_DISTRIBUTION)
00236 #define WCVS_PRIVATE_BUILD_STRING_PREFIX
00237 #define WCVS_PRIVATE_BUILD_STRING
00238 #define WCVS_PRIVATE_BUILD_FLAG 0
00239 #else   // defined(WINCVS_OFFICIAL_DISTRIBUTION)
00240 #   if defined(WINCVS_PRIVATE_BUILD)
00241 #       define WCVS_PRIVATE_BUILD_STRING_PREFIX WINCVS_PRIVATE_BUILD " "
00242 #   else    // defined(WINCVS_PRIVATE_BUILD)
00243 #       define WCVS_PRIVATE_BUILD_STRING_PREFIX "Local "
00244 #   endif   // defined(WINCVS_PRIVATE_BUILD)
00245 #define WCVS_PRIVATE_BUILD_STRING WCVS_PRIVATE_BUILD_STRING_PREFIX "build"
00246 #define WCVS_PRIVATE_BUILD_FLAG VS_FF_PRIVATEBUILD
00247 #endif  // defined(WINCVS_OFFICIAL_DISTRIBUTION)
00248
00249 #if defined(WINCVS_ALPHA_RELEASE)
00250 #   if defined(WINCVS_RELEASE)
00251 #       undef WINCVS_RELEASE
00252 #   endif   // defined(WINCVS_RELEASE)
00253 #   if defined(WINCVS_BETA_RELEASE)
00254 #       undef WINCVS_BETA_RELEASE
00255 #   endif   // defined(WINCVS_BETA_RELEASE)
00256 #elif defined(WINCVS_BETA_RELEASE)      // defined(WINCVS_ALPHA_RELEASE)
00257 #   if defined(WINCVS_RELEASE)
00258 #       undef WINCVS_RELEASE
00259 #   endif   // defined(WINCVS_RELEASE)
00260 #endif  // defined(WINCVS_ALPHA_RELEASE)
00261
00262 #if defined(WINCVS_RELEASE)
00263 #define WCVS_PRERELEASE_BUILD_STRING_PREFIX
00264 #define WCVS_PRERELEASE_FLAG 0
00265 #else   // defined(WINCVS_RELEASE)
00266 #   if defined(WINCVS_ALPHA_RELEASE)
00267 #       define WCVS_PRERELEASE_BUILD_STRING_PREFIX PP_STRINGIZE(Alpha WINCVS_PRODUCT_PATCHLEVEL) " "
00268 #   elif defined(WINCVS_BETA_RELEASE)   // defined(WINCVS_ALPHA_RELEASE)
00269 #       define WCVS_PRERELEASE_BUILD_STRING_PREFIX PP_STRINGIZE(Beta WINCVS_PRODUCT_PATCHLEVEL) " "
00270 #   else    // defined(WINCVS_ALPHA_RELEASE)
00271 #       define WCVS_PRERELEASE_BUILD_STRING_PREFIX "Prerelease "
00272 #   endif   // defined(WINCVS_ALPHA_VERSION) ...
00273 #define WCVS_PRERELEASE_FLAG VS_FF_PRERELEASE
00274 #endif  // defined(WINCVS_RELEASE)
00275
00276 #if defined(_DEBUG)
00277 #define WCVS_DEBUG_FLAG VS_FF_DEBUG
00278 #define WCVS_DEBUG_BUILD_STRING_PREFIX "Debug "
00279 #else   // defined(_DEBUG)
00280 #define WCVS_DEBUG_BUILD_STRING_PREFIX
00281 #define WCVS_DEBUG_FLAG 0
00282 #endif  // defined(_DEBUG)
00283
00284 //
00285 //  Resource Compiler chokes if we break these long lines with line continuation characters '\'
00286 //
00287 #define WINCVS_FILEVERSION_STRING PP_STRINGIZE(WINCVS_FILE_MAJOR.WINCVS_FILE_MINOR.WINCVS_FILE_PATCHLEVEL.WINCVS_BUILD) " " WCVS_PRERELEASE_BUILD_STRING_PREFIX "(" WCVS_PRIVATE_BUILD_STRING_PREFIX WCVS_SPECIAL_BUILD_STRING_PREFIX WCVS_UNICODE_BUILD_STRING_PREFIX WCVS_DEBUG_BUILD_STRING_PREFIX PP_STRINGIZE(Build WINCVS_BUILD) ")"
00288
00289 #define WINCVS_PRODUCTVERSION_STRING PP_STRINGIZE(WINCVS_FILE_MAJOR.WINCVS_FILE_MINOR.WINCVS_FILE_PATCHLEVEL.WINCVS_BUILD) " " WCVS_PRERELEASE_BUILD_STRING_PREFIX "(" WCVS_PRIVATE_BUILD_STRING_PREFIX WCVS_SPECIAL_BUILD_STRING_PREFIX WCVS_UNICODE_BUILD_STRING_PREFIX WCVS_DEBUG_BUILD_STRING_PREFIX PP_STRINGIZE(Build WINCVS_BUILD) ")"
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/udraw.h Source File

rf/udraw.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 2000
00019  */
00020
00021 #ifndef UDRAW_H
00022 #define UDRAW_H
00023
00024 #include "uconfig.h"
00025 #include "umain.h"
00026
00027 #if qGTK
00028 #   include <gtk/gtk.h>
00029 #endif
00030
00031 #ifdef __cplusplus
00032
00033 extern UEXPORT bool PtInRect(const URECT *r, UPOINT pt);
00034 extern UEXPORT void SetRect(URECT *r, int x1, int y1, int x2, int y2);
00035 extern UEXPORT void SetRectEmpty(URECT *r);
00036 extern UEXPORT bool EqualRect(const URECT *r1, const URECT *r2);
00037 extern UEXPORT void InflateRect(URECT *r, int x, int y);
00038 extern UEXPORT void OffsetRect(URECT *r, int x, int y);
00039 extern UEXPORT bool UnionRect(URECT *dest, const URECT *src1, const URECT *src2);
00040 extern UEXPORT bool IntersectRect(URECT *dest, const URECT *src1, const URECT *src2);
00041
00042 inline void CopyRect(URECT *dst, const URECT *src) { *dst = *src; }
00043
00044 class UPoint;
00045 class URect;
00046
00047 class USize : public USIZE
00048 {
00049 public:
00050
00051 /* Constructors */
00052     /* construct an uninitialized size */
00053     USize();
00054     /* create from two integers */
00055     USize(int initCX, int initCY);
00056     /* create from another size */
00057     USize(USIZE initSize);
00058     /* create from a point */
00059     USize(UPOINT initPt);
00060
00061 /* Operations */
00062     bool operator==(USIZE size) const;
00063     bool operator!=(USIZE size) const;
00064     void operator+=(USIZE size);
00065     void operator-=(USIZE size);
00066
00067 /* Operators returning USize values */
00068     USize operator+(USIZE size) const;
00069     USize operator-(USIZE size) const;
00070     USize operator-() const;
00071
00072 /* Operators returning UPoint values */
00073     UPoint operator+(UPOINT point) const;
00074     UPoint operator-(UPOINT point) const;
00075
00076 /* Operators returning URect values */
00077     URect operator+(const URECT* lpRect) const;
00078     URect operator-(const URECT* lpRect) const;
00079 };
00080
00081 class UPoint : public UPOINT
00082 {
00083 public:
00084 /* Constructors */
00085
00086     /* create an uninitialized point */
00087     UPoint();
00088     /* create from two integers */
00089     UPoint(int initX, int initY);
00090     /* create from another point */
00091     UPoint(UPOINT initPt);
00092     /* create from a size */
00093     UPoint(USIZE initSize);
00094
00095 /* Operations */
00096
00097 /* translate the point */
00098     void Offset(int xOffset, int yOffset);
00099     void Offset(UPOINT point);
00100     void Offset(USIZE size);
00101
00102     bool operator==(UPOINT point) const;
00103     bool operator!=(UPOINT point) const;
00104     void operator+=(USIZE size);
00105     void operator-=(USIZE size);
00106     void operator+=(UPOINT point);
00107     void operator-=(UPOINT point);
00108
00109 /* Operators returning UPoint values */
00110     UPoint operator+(USIZE size) const;
00111     UPoint operator-(USIZE size) const;
00112     UPoint operator-() const;
00113     UPoint operator+(UPOINT point) const;
00114
00115 /* Operators returning USize values */
00116     USize operator-(UPOINT point) const;
00117
00118 /* Operators returning URect values */
00119     URect operator+(const URECT* lpRect) const;
00120     URect operator-(const URECT* lpRect) const;
00121 };
00122
00123 class URect : public URECT
00124 {
00125 public:
00126
00127 /* Constructors */
00128
00129     /* uninitialized rectangle */
00130     URect();
00131     /* from left, top, right, and bottom */
00132     URect(int l, int t, int r, int b);
00133     /* copy constructor */
00134     URect(const URECT& srURect);
00135     /* from a pointer to another rect */
00136     URect(const URECT* lpSrURect);
00137     /* from a point and size */
00138     URect(UPOINT point, USIZE size);
00139     /* from two points */
00140     URect(UPOINT topLeft, UPOINT bottomRight);
00141 #ifdef __QUICKDRAW__
00142     URect(const Rect & macRect);
00143 #endif
00144 #ifdef __AFX_H__
00145     URect(const CRect & winRect);
00146 #endif
00147
00148 /* Attributes (in addition to RECT members) */
00149
00150     /* retrieves the width */
00151     int Width() const;
00152     /* returns the height */
00153     int Height() const;
00154     /* returns the size */
00155     USize Size() const;
00156     /* reference to the top-left point */
00157     UPoint& TopLeft();
00158     /* reference to the bottom-right point */
00159     UPoint& BottomRight();
00160     /* const reference to the top-left point */
00161     const UPoint& TopLeft() const;
00162     /* const reference to the bottom-right point */
00163     const UPoint& BottomRight() const;
00164     /* the geometric center point of the rectangle */
00165     UPoint CenterPoint() const;
00166
00167     /* convert between URect and LPRECT/const RECT* (no need for &) */
00168     operator URECT*();
00169     operator const URECT*() const;
00170 #ifdef __QUICKDRAW__
00171     operator Rect() const;
00172 #endif
00173 #ifdef __AFX_H__
00174     operator CRect() const;
00175 #endif
00176
00177     /* returns TRUE if rectangle has no area */
00178     bool IsRectEmpty() const;
00179     /* returns TRUE if rectangle is at (0,0) and has no area */
00180     bool IsRectNull() const;
00181     /* returns TRUE if point is within rectangle */
00182     bool PtInRect(UPOINT point) const;
00183
00184 /* Operations */
00185
00186     /* set rectangle from left, top, right, and bottom */
00187     void SetRect(int x1, int y1, int x2, int y2);
00188     void SetRect(UPOINT topLeft, UPOINT bottomRight);
00189     /* empty the rectangle */
00190     void SetRectEmpty();
00191     /* copy from another rectangle */
00192     void CopyRect(const URECT* lpSrURect);
00193     /* TRUE if exactly the same as another rectangle */
00194     bool EqualRect(const URECT* lpRect) const;
00195
00196     /* inflate rectangle's width and height without */
00197     /* moving its top or left */
00198     void InflateRect(int x, int y);
00199     void InflateRect(USIZE size);
00200     void InflateRect(const URECT* lpRect);
00201     void InflateRect(int l, int t, int r, int b);
00202     /* deflate the rectangle's width and height without */
00203     /* moving its top or left */
00204     void DeflateRect(int x, int y);
00205     void DeflateRect(USIZE size);
00206     void DeflateRect(const URECT* lpRect);
00207     void DeflateRect(int l, int t, int r, int b);
00208
00209     /* translate the rectangle by moving its top and left */
00210     void OffsetRect(int x, int y);
00211     void OffsetRect(USIZE size);
00212     void OffsetRect(UPOINT point);
00213     void NormalizeRect();
00214
00215     /* set this rectangle to intersection of two others */
00216     bool IntersectRect(const URECT* lpRect1, const URECT* lpRect2);
00217
00218     /* set this rectangle to bounding union of two others */
00219     bool UnionRect(const URECT* lpRect1, const URECT* lpRect2);
00220
00221     /* set this rectangle to minimum of two others */
00222 /*      bool SubtractRect(const RECT* lpRectSrc1, const RECT* lpRectSrc2); */
00223
00224 /* Additional Operations */
00225     void operator=(const URECT& srURect);
00226     bool operator==(const URECT& rect) const;
00227     bool operator!=(const URECT& rect) const;
00228     void operator+=(UPOINT point);
00229     void operator+=(USIZE size);
00230     void operator+=(const URECT* lpRect);
00231     void operator-=(UPOINT point);
00232     void operator-=(USIZE size);
00233     void operator-=(const URECT* lpRect);
00234     void operator&=(const URECT& rect);
00235     void operator|=(const URECT& rect);
00236
00237 /* Operators returning URect values */
00238     URect operator+(UPOINT point) const;
00239     URect operator-(UPOINT point) const;
00240     URect operator+(const URECT* lpRect) const;
00241     URect operator+(USIZE size) const;
00242     URect operator-(USIZE size) const;
00243     URect operator-(const URECT* lpRect) const;
00244     URect operator&(const URECT& rect2) const;
00245     URect operator|(const URECT& rect2) const;
00246     URect MulDiv(int nMultiplier, int nDivisor) const;
00247 };
00248
00249 /* USize */
00250 inline USize::USize()
00251     { /* random filled */ }
00252 inline USize::USize(int initCX, int initCY)
00253     { cx = initCX; cy = initCY; }
00254 inline USize::USize(USIZE initSize)
00255     { *(USIZE*)this = initSize; }
00256 inline USize::USize(UPOINT initPt)
00257     { *(UPOINT*)this = initPt; }
00258 inline bool USize::operator==(USIZE size) const
00259     { return (cx == size.cx && cy == size.cy); }
00260 inline bool USize::operator!=(USIZE size) const
00261     { return (cx != size.cx || cy != size.cy); }
00262 inline void USize::operator+=(USIZE size)
00263     { cx += size.cx; cy += size.cy; }
00264 inline void USize::operator-=(USIZE size)
00265     { cx -= size.cx; cy -= size.cy; }
00266 inline USize USize::operator+(USIZE size) const
00267     { return USize(cx + size.cx, cy + size.cy); }
00268 inline USize USize::operator-(USIZE size) const
00269     { return USize(cx - size.cx, cy - size.cy); }
00270 inline USize USize::operator-() const
00271     { return USize(-cx, -cy); }
00272 inline UPoint USize::operator+(UPOINT point) const
00273     { return UPoint(cx + point.x, cy + point.y); }
00274 inline UPoint USize::operator-(UPOINT point) const
00275     { return UPoint(cx - point.x, cy - point.y); }
00276 inline URect USize::operator+(const URECT* lpRect) const
00277     { return URect(lpRect) + *this; }
00278 inline URect USize::operator-(const URECT* lpRect) const
00279     { return URect(lpRect) - *this; }
00280
00281 /* UPoint */
00282 inline UPoint::UPoint()
00283     { /* random filled */ }
00284 inline UPoint::UPoint(int initX, int initY)
00285     { x = initX; y = initY; }
00286 inline UPoint::UPoint(UPOINT initPt)
00287     { *(UPOINT*)this = initPt; }
00288 inline UPoint::UPoint(USIZE initSize)
00289     { *(USIZE*)this = initSize; }
00290 inline void UPoint::Offset(int xOffset, int yOffset)
00291     { x += xOffset; y += yOffset; }
00292 inline void UPoint::Offset(UPOINT point)
00293     { x += point.x; y += point.y; }
00294 inline void UPoint::Offset(USIZE size)
00295     { x += size.cx; y += size.cy; }
00296 inline bool UPoint::operator==(UPOINT point) const
00297     { return (x == point.x && y == point.y); }
00298 inline bool UPoint::operator!=(UPOINT point) const
00299     { return (x != point.x || y != point.y); }
00300 inline void UPoint::operator+=(USIZE size)
00301     { x += size.cx; y += size.cy; }
00302 inline void UPoint::operator-=(USIZE size)
00303     { x -= size.cx; y -= size.cy; }
00304 inline void UPoint::operator+=(UPOINT point)
00305     { x += point.x; y += point.y; }
00306 inline void UPoint::operator-=(UPOINT point)
00307     { x -= point.x; y -= point.y; }
00308 inline UPoint UPoint::operator+(USIZE size) const
00309     { return UPoint(x + size.cx, y + size.cy); }
00310 inline UPoint UPoint::operator-(USIZE size) const
00311     { return UPoint(x - size.cx, y - size.cy); }
00312 inline UPoint UPoint::operator-() const
00313     { return UPoint(-x, -y); }
00314 inline UPoint UPoint::operator+(UPOINT point) const
00315     { return UPoint(x + point.x, y + point.y); }
00316 inline USize UPoint::operator-(UPOINT point) const
00317     { return USize(x - point.x, y - point.y); }
00318 inline URect UPoint::operator+(const URECT* lpRect) const
00319     { return URect(lpRect) + *this; }
00320 inline URect UPoint::operator-(const URECT* lpRect) const
00321     { return URect(lpRect) - *this; }
00322
00323 /* URect */
00324 inline URect::URect()
00325     { /* random filled */ }
00326 inline URect::URect(int l, int t, int r, int b)
00327     { left = l; top = t; right = r; bottom = b; }
00328 inline URect::URect(const URECT& srURect)
00329     { ::CopyRect(this, &srURect); }
00330 inline URect::URect(const URECT* lpSrURect)
00331     { ::CopyRect(this, lpSrURect); }
00332 inline URect::URect(UPOINT point, USIZE size)
00333     { right = (left = point.x) + size.cx; bottom = (top = point.y) + size.cy; }
00334 inline URect::URect(UPOINT topLeft, UPOINT bottomRight)
00335     { left = topLeft.x; top = topLeft.y;
00336         right = bottomRight.x; bottom = bottomRight.y; }
00337 #ifdef __QUICKDRAW__
00338 inline URect::URect(const Rect & macRect)
00339     { left = macRect.left; right = macRect.right; top = macRect.top; bottom = macRect.bottom; }
00340 #endif
00341 #ifdef __AFX_H__
00342 inline URect::URect(const CRect & winRect)
00343     { left = winRect.left; right = winRect.right; top = winRect.top; bottom = winRect.bottom; }
00344 #endif
00345 inline int URect::Width() const
00346     { return right - left; }
00347 inline int URect::Height() const
00348     { return bottom - top; }
00349 inline USize URect::Size() const
00350     { return USize(right - left, bottom - top); }
00351 inline UPoint& URect::TopLeft()
00352     { return *((UPoint*)this); }
00353 inline UPoint& URect::BottomRight()
00354     { return *((UPoint*)this+1); }
00355 inline const UPoint& URect::TopLeft() const
00356     { return *((UPoint*)this); }
00357 inline const UPoint& URect::BottomRight() const
00358     { return *((UPoint*)this+1); }
00359 inline UPoint URect::CenterPoint() const
00360     { return UPoint((left+right)/2, (top+bottom)/2); }
00361 inline URect::operator URECT*()
00362     { return this; }
00363 inline URect::operator const URECT*() const
00364     { return this; }
00365 #ifdef __QUICKDRAW__
00366 inline URect::operator Rect() const
00367 {
00368     Rect r; ::MacSetRect(&r, left, top, right, bottom); return r;
00369 }
00370 #endif
00371 #ifdef __AFX_H__
00372 inline URect::operator CRect() const
00373 {
00374     return CRect(left, top, right, bottom);
00375 }
00376 #endif
00377 inline bool URect::IsRectEmpty() const
00378     { return left == right || top == bottom; }
00379 inline bool URect::IsRectNull() const
00380     { return (left == 0 && right == 0 && top == 0 && bottom == 0); }
00381 inline bool URect::PtInRect(UPOINT point) const
00382     { return ::PtInRect(this, point); }
00383 inline void URect::SetRect(int x1, int y1, int x2, int y2)
00384     { ::SetRect(this, x1, y1, x2, y2); }
00385 inline void URect::SetRect(UPOINT topLeft, UPOINT bottomRight)
00386     { ::SetRect(this, topLeft.x, topLeft.y, bottomRight.x, bottomRight.y); }
00387 inline void URect::SetRectEmpty()
00388     { ::SetRectEmpty(this); }
00389 inline void URect::CopyRect(const URECT* lpSrURect)
00390     { ::CopyRect(this, lpSrURect); }
00391 inline bool URect::EqualRect(const URECT* lpRect) const
00392     { return ::EqualRect(this, lpRect); }
00393 inline void URect::InflateRect(int x, int y)
00394     { ::InflateRect(this, x, y); }
00395 inline void URect::InflateRect(USIZE size)
00396     { ::InflateRect(this, size.cx, size.cy); }
00397 inline void URect::DeflateRect(int x, int y)
00398     { ::InflateRect(this, -x, -y); }
00399 inline void URect::DeflateRect(USIZE size)
00400     { ::InflateRect(this, -size.cx, -size.cy); }
00401 inline void URect::OffsetRect(int x, int y)
00402     { ::OffsetRect(this, x, y); }
00403 inline void URect::OffsetRect(UPOINT point)
00404     { ::OffsetRect(this, point.x, point.y); }
00405 inline void URect::OffsetRect(USIZE size)
00406     { ::OffsetRect(this, size.cx, size.cy); }
00407 inline bool URect::IntersectRect(const URECT* lpRect1, const URECT* lpRect2)
00408     { return ::IntersectRect(this, lpRect1, lpRect2);}
00409 inline bool URect::UnionRect(const URECT* lpRect1, const URECT* lpRect2)
00410     { return ::UnionRect(this, lpRect1, lpRect2); }
00411 inline void URect::operator=(const URECT& srURect)
00412     { ::CopyRect(this, &srURect); }
00413 inline bool URect::operator==(const URECT& rect) const
00414     { return ::EqualRect(this, &rect); }
00415 inline bool URect::operator!=(const URECT& rect) const
00416     { return !::EqualRect(this, &rect); }
00417 inline void URect::operator+=(UPOINT point)
00418     { ::OffsetRect(this, point.x, point.y); }
00419 inline void URect::operator+=(USIZE size)
00420     { ::OffsetRect(this, size.cx, size.cy); }
00421 inline void URect::operator+=(const URECT* lpRect)
00422     { InflateRect(lpRect); }
00423 inline void URect::operator-=(UPOINT point)
00424     { ::OffsetRect(this, -point.x, -point.y); }
00425 inline void URect::operator-=(USIZE size)
00426     { ::OffsetRect(this, -size.cx, -size.cy); }
00427 inline void URect::operator-=(const URECT* lpRect)
00428     { DeflateRect(lpRect); }
00429 inline void URect::operator&=(const URECT& rect)
00430     { ::IntersectRect(this, this, &rect); }
00431 inline void URect::operator|=(const URECT& rect)
00432     { ::UnionRect(this, this, &rect); }
00433 inline URect URect::operator+(UPOINT pt) const
00434     { URect rect(*this); ::OffsetRect(&rect, pt.x, pt.y); return rect; }
00435 inline URect URect::operator-(UPOINT pt) const
00436     { URect rect(*this); ::OffsetRect(&rect, -pt.x, -pt.y); return rect; }
00437 inline URect URect::operator+(USIZE size) const
00438     { URect rect(*this); ::OffsetRect(&rect, size.cx, size.cy); return rect; }
00439 inline URect URect::operator-(USIZE size) const
00440     { URect rect(*this); ::OffsetRect(&rect, -size.cx, -size.cy); return rect; }
00441 inline URect URect::operator+(const URECT* lpRect) const
00442     { URect rect(this); rect.InflateRect(lpRect); return rect; }
00443 inline URect URect::operator-(const URECT* lpRect) const
00444     { URect rect(this); rect.DeflateRect(lpRect); return rect; }
00445 inline URect URect::operator&(const URECT& rect2) const
00446     { URect rect; ::IntersectRect(&rect, this, &rect2);
00447         return rect; }
00448 inline URect URect::operator|(const URECT& rect2) const
00449     { URect rect; ::UnionRect(&rect, this, &rect2);
00450         return rect; }
00451 /*  inline bool URect::SubtractRect(const URECT* lpRectSrc1, const URECT* lpRectSrc2)
00452     { return ::SubtractRect(this, lpRectSrc1, lpRectSrc2); }*/
00453
00454 typedef long UCOLORREF;
00455 #define URGB(r,g,b) ((UCOLORREF)(((unsigned char)(r)|((unsigned short)((unsigned char)(g))<<8))|(((unsigned int)(unsigned char)(b))<<16)))
00456 #define UGetRValue(rgb)      ((unsigned char)(rgb))
00457 #define UGetGValue(rgb)      ((unsigned char)(((unsigned short)(rgb)) >> 8))
00458 #define UGetBValue(rgb)      ((unsigned char)((rgb)>>16))
00459
00460 #define UPS_SOLID 0
00461
00462 class UPen
00463 {
00464 public:
00465     UPen();
00466     ~UPen();
00467
00468     bool DeleteObject(void);
00469
00470     bool CreatePen(int nPenStyle, int nWidth, UCOLORREF crColor);
00471 protected:
00472     int m_width;
00473     int m_style;
00474 #if qGTK
00475     GdkColor m_col;
00476     bool m_set;
00477 #endif
00478
00479 friend class UDC;
00480 };
00481
00482 class UBrush
00483 {
00484 public:
00485     UBrush();
00486     ~UBrush();
00487
00488     bool DeleteObject(void);
00489
00490     bool CreateSolidBrush(UCOLORREF crColor);
00491 protected:
00492 #if qGTK
00493     GdkColor m_col;
00494     bool m_set;
00495 #endif
00496
00497 friend class UDC;
00498 };
00499
00500 class UWidget;
00501
00502 class UDC
00503 {
00504 public:
00505     UDC(int widid, int cmdid);
00506     ~UDC();
00507
00508     USize GetTextExtent(const char *lpszString, int nCount) const;
00509     int GetTextHeight(void) const;
00510     bool TextOutClipped(int x, int y, const URECT *lpRect,
00511                         const char *lpszString, int nCount);
00512
00513     void MoveTo(int x, int y);
00514     void LineTo(int x, int y);
00515     bool DrawBitmap(void *bitmap, UPOINT where);
00516
00517     UPen *SelectObject(UPen* pPen);
00518     UBrush *SelectObject(UBrush* pBrush);
00519
00520     bool Rectangle(const URECT *lpRect);
00521     bool RoundRect(const URECT *lpRect, UPOINT point);
00522 protected:
00523     void *m_wid;
00524     UPen *m_pen;
00525     UBrush *m_brush;
00526 #if qGTK
00527     GdkGC *m_gc;
00528     UPoint m_penloc;
00529     GdkColor m_foreground, m_background;
00530     GdkFont *m_font;
00531     GdkDrawable *m_drawable;
00532     UPoint m_orig;
00533 #endif
00534 };
00535 #endif /* __cplusplus */
00536
00537 #endif /* UDRAW_H */
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TMPersistent< T > Member List

This is the complete list of members for TMPersistent< T >, including all inherited members.

_GetBaseClass() | CPersistent | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | TMPersistent< T > | [protected, virtual]
GetList(void) const | TMPersistent< T > | [inline, protected]
GetList(void) | TMPersistent< T > | [inline, protected]
GetRuntimeClass() const | CPersistent | [virtual]
GetTimeStamp() const | CPersistent | [inline]
IsKindOf(const URuntimeClass *pClass) const | UObject |
list_t typedef | TMPersistent< T > | [protected]
LoadAll(const char *only=0L) | CPersistent | [static]
m_allItems | TMPersistent< T > | [private]
m_buffer | TMPersistent< T > | [mutable, private]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | TMPersistent< T > | [protected, virtual]
SizeOf(void) const | TMPersistent< T > | [inline, protected, virtual]
TMPersistent(const char *uniqueName, kClassPersistent pclass=kNoClass) | TMPersistent< T > |
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CPersistent() | CPersistent | [virtual]
~TMPersistent() | TMPersistent< T > | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:57:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CheckoutDlg.h Source File

common/CheckoutDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * CheckoutDlg.cpp : the cvs checkout dialog
00023  */
00024
00025 #if !defined(AFX_CHECKOUTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_CHECKOUTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "CPStr.h"
00033 #include "SmartComboBox.h"
00034 #include "KeywordComboBox.h"
00035
00036 #ifdef WIN32
00037 #   include "HHelpSupport.h"
00038 #endif
00039
00040 class MultiFiles;
00041
00042 bool CompatGetCheckout(const MultiFiles* mf,
00043                        CStr& modname, CStr& path, bool& norecurs,
00044                        bool& toStdout, CStr& date, CStr& rev,
00045                        bool& useMostRecent,
00046                        CStr& rev1, CStr& rev2,
00047                        bool& branchPointMerge,
00048                        bool& threeWayConflicts,
00049                        bool& doexport,
00050                        bool& forceCvsroot, CStr& cvsroot,
00051                        bool& overrideCheckoutDir, CStr& checkoutDir,
00052                        CStr& keyword,
00053                        bool& resetSticky,
00054                        bool& dontShortenPaths,
00055                        bool& caseSensitiveNames,
00056                        bool& lastCheckinTime);
00057
00058 extern CMString gOldModules;
00059
00060 #ifdef WIN32
00061
00063 class CCheckout_MAIN : public CHHelpPropertyPage
00064 {
00065     DECLARE_DYNAMIC(CCheckout_MAIN)
00066
00067 // Construction
00068 public:
00069     CCheckout_MAIN(const MultiFiles* mf,
00070         const char* modname, const char* path, const bool dontShortenPaths,
00071         bool forceRoot, const char* cvsroot);
00072     ~CCheckout_MAIN();
00073
00074 // Dialog Data
00075     //{{AFX_DATA(CCheckout_MAIN)
00076     enum { IDD = IDD_CHECKOUT_MAIN };
00077     CButton m_selCvsrootButton;
00078     CButton m_forceRootCheck;
00079     CSmartComboBox  m_cvsrootCombo;
00080     CButton m_dontShortenPathsCheck;
00081     CEdit   m_checkoutDirEdit;
00082     CButton m_overrideCoDirCheck;
00083     CEdit   m_pathEdit;
00084     CSmartComboBox  m_moduleCombo;
00085     CString m_moduleName;
00086     CString m_path;
00087     BOOL    m_noRecurse;
00088     BOOL    m_overrideCoDir;
00089     CString m_checkoutDir;
00090     BOOL    m_dontShortenPaths;
00091     CString m_cvsroot;
00092     BOOL    m_forceRoot;
00093     BOOL    m_export;
00094     //}}AFX_DATA
00095
00096
00097 // Overrides
00098     // ClassWizard generate virtual function overrides
00099     //{{AFX_VIRTUAL(CCheckout_MAIN)
00100     protected:
00101     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00102     //}}AFX_VIRTUAL
00103
00104 // Implementation
00105 protected:
00106     // Generated message map functions
00107     //{{AFX_MSG(CCheckout_MAIN)
00108     afx_msg void OnBtnPath();
00109     afx_msg void OnCheckOverridecheckoutdir();
00110     afx_msg void OnBrowseModules();
00111     virtual BOOL OnInitDialog();
00112     afx_msg void OnForceroot();
00113     afx_msg void OnSelcvsroot();
00114     //}}AFX_MSG
00115     DECLARE_MESSAGE_MAP()
00116 private:
00117     // Data members
00118     const MultiFiles* m_mf;
00119
00120     // Methods
00121     virtual void InitHelpID();
00122 };
00123
00124 //{{AFX_INSERT_LOCATION}}
00125 #endif /* WIN32 */
00126
00127 #endif // !defined(AFX_CHECKOUTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/LogFrm.cpp Source File

WinCvs/LogFrm.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // ChildFrm.cpp : implementation of the CLogFrame class
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026
00027 #include "LogFrm.h"
00028 #include "WinCvsBrowser.h"
00029 #include "BrowseFileView.h"
00030 #include "WincvsView.h"
00031 #include "MainFrm.h"
00032
00033 #include "wincvs_winutil.h"
00034
00035 #ifdef _DEBUG
00036 #define new DEBUG_NEW
00037 #undef THIS_FILE
00038 static char THIS_FILE[] = __FILE__;
00039 #endif
00040
00042 // inline function(s)
00043
00044 inline BOOL IsKeyMovingFocus(MSG* pMsg)
00045 {
00046      return ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_TAB) &&
00047          (!(0x8000 & GetKeyState(VK_CONTROL)))
00048          );
00049 }
00050
00052 // CLogFrame
00053
00054 IMPLEMENT_DYNCREATE(CLogFrame, CCJMDIChildWnd)
00055
00056 BEGIN_MESSAGE_MAP(CLogFrame, CCJMDIChildWnd)
00057     //{{AFX_MSG_MAP(CLogFrame)
00058     ON_WM_CLOSE()
00059     ON_WM_DESTROY()
00060     //}}AFX_MSG_MAP
00061 END_MESSAGE_MAP()
00062
00064 // CLogFrame construction/destruction
00065
00066 CLogFrame::CLogFrame()
00067 {
00068     // TODO: add member initialization code here
00069
00070 }
00071
00072 CLogFrame::~CLogFrame()
00073 {
00074 }
00075
00076 BOOL CLogFrame::OnCreateClient(LPCREATESTRUCT lpcs,
00077      CCreateContext* pContext)
00078 {
00079     BOOL res = CCJMDIChildWnd::OnCreateClient(lpcs, pContext);
00080     MDIMaximize();
00081
00082     return res;
00083 }
00084
00086 // CLogFrame diagnostics
00087
00088 #ifdef _DEBUG
00089 void CLogFrame::AssertValid() const
00090 {
00091     CCJMDIChildWnd::AssertValid();
00092 }
00093
00094 void CLogFrame::Dump(CDumpContext& dc) const
00095 {
00096     CCJMDIChildWnd::Dump(dc);
00097 }
00098
00099 #endif //_DEBUG
00100
00102 // CLogFrame message handlers
00103
00104 void CLogFrame::OnClose()
00105 {
00106     // prevent from closing the main frame
00107     //CCJMDIChildWnd::OnClose();
00108 }
00109
00110 BOOL CLogFrame::PreTranslateMessage(MSG* pMsg)
00111 {
00112 /*  if (IsKeyMovingFocus(pMsg))
00113     {
00114         CWnd* pWnd;
00115         if (0x8000 & GetKeyState(VK_SHIFT))
00116             pWnd = FindPrevWindow(GetFocus());
00117         else
00118             pWnd = FindNextWindow(GetFocus());
00119         if(pWnd)
00120         {
00121             LRESULT DlgCode = ::SendMessage(pMsg->hwnd, WM_GETDLGCODE, 0, 0);
00122             if (!(DlgCode & (DLGC_WANTTAB | DLGC_WANTALLKEYS)))
00123             {
00124                 if (pWnd->IsKindOf(RUNTIME_CLASS(CView)))
00125                     SetActiveView((CView*)pWnd, TRUE);
00126                 else
00127                     pWnd->SetFocus();
00128             }
00129         }
00130         return TRUE;
00131     }*/
00132
00133     return CCJMDIChildWnd::PreTranslateMessage(pMsg);
00134 }
00135
00136 BOOL CLogFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
00137 {
00138     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00139     if( app->GetMainFrame()->OnBroadcastCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00140         return TRUE;
00141
00142     return CCJMDIChildWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00143 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJTabCtrl.h Source File

WinCvs/CJLib/Include/CJTabCtrl.h

Go to the documentation of this file.
00001 // CJTabCtrl.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJTabCtrl.h $
00011  *
00012  * $History: CJTabCtrl.h $
00013  *
00014  * *****************  Version 11  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 2:18p
00016  * Updated in $/CodeJock/Include
00017  * OverrodeOnEraseBkgnd(...) and OnPaint() for flicker free drawing.
00018  *
00019  * *****************  Version 10  *****************
00020  * User: Kirk Stowell Date: 10/26/99   Time: 10:48p
00021  * Updated in $/CodeJock/Include
00022  * Made class methods virtual for inheritance purposes.
00023  *
00024  * *****************  Version 9  *****************
00025  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00026  * Updated in $/CodeJockey/Include
00027  * Updated copyright and contact information.
00028  *
00029  * *****************  Version 8  *****************
00030  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00031  * Updated in $/CodeJockey/Include
00032  *
00033  * *****************  Version 7  *****************
00034  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00035  * Updated in $/CodeJockey/Include
00036  *
00037  * *****************  Version 6  *****************
00038  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00039  * Updated in $/CodeJockey/Include
00040  * Cleaned up inline functions, and import/export macro so that class will
00041  * be imported when linked to, and exported at compile time.
00042  *
00043  * *****************  Version 5  *****************
00044  * User: Kirk Stowell Date: 7/14/99    Time: 9:44p
00045  * Updated in $/CodeJockey/Include
00046  * Added _DYNAMIC macros for access to the CObject::IsKindOf to determine
00047  * the class object at runtime. Thanks to Sid Price
00048  * [sidprice@softtools.com] for suggesting this.
00049  *
00050  * *****************  Version 4  *****************
00051  * User: Kirk Stowell Date: 6/14/99    Time: 10:47p
00052  * Updated in $/CodeJockey/Include
00053  * Cleaned up code to eliminate level 4 compilier warnings.
00054  *
00055  * *****************  Version 3  *****************
00056  * User: Kirk Stowell Date: 5/11/99    Time: 9:33p
00057  * Updated in $/CodeJockey/Include
00058  * Renamed popup menu resource id to m_popupMenuID to be consistent with
00059  * other classes.  Added member variable m_popToolbarID to contain the
00060  * toolbar resource to be used for popup menus  and m_nPos to contain the
00061  * index of the submenu in the menu resource. Added
00062  * CCJTabCtrl::Create(...) to simplify the creation process, and to set
00063  * the tab font.  Cleaned up OnRButtonDown(..) message handler which
00064  * activates the popup menu. Modified SetMenuID(...) to accept the index
00065  * of the popup menu in the menu resource.
00066  *
00067  * *****************  Version 2  *****************
00068  * User: Kirk Stowell Date: 5/02/99    Time: 5:25p
00069  * Updated in $/CodeJockey/Include
00070  * Removed class from CCJTabCtrlBar files into its own files. Added popup
00071  * menu support for CCJMenus.
00072  *
00073  * *****************  Version 1  *****************
00074  * User: Kirk Stowell Date: 5/02/99    Time: 4:34p
00075  * Created in $/CodeJockey/Include
00076  *
00077  ***************************************************************************/
00079
00080 #ifndef __CJTABCTRL_H__
00081 #define __CJTABCTRL_H__
00082
00083 #if _MSC_VER >= 1000
00084 #pragma once
00085 #endif // _MSC_VER >= 1000
00086
00087 #include "CJMenu.h"        // CCJMenu class declaration
00088
00089 // CCJTabCtrl is a CTabCtrl derived class which is used by CCJTabCtrl
00090 // to help fix problems with repainting in the tab control
00091 class _CJX_EXT_CLASS CCJTabCtrl : public CTabCtrl
00092 {
00093     DECLARE_DYNAMIC(CCJTabCtrl)
00094
00095 public:
00096
00097     // Default constructor
00098     //
00099     CCJTabCtrl();
00100
00101     // Virtual destructor
00102     //
00103     virtual ~CCJTabCtrl();
00104
00105 public:
00106
00107     UINT            m_popToolbarID; // popup menu toolbar resource id, associates
00108                                     // toolbar icons with the popup menu.
00109
00110     UINT            m_popupMenuID;  // popup menu resource id
00111     CCJMenu         m_popupMenu;    // popup menu
00112     int             m_nPos;         // index of the pop-up menu contained in the menu
00113     CFont           m_Font;         // font used by tab control.
00114
00115 public:
00116     virtual void UpdateFont();
00117
00118     // this member function is called to associate a menu and toolbar
00119     // resource with the context menu.
00120     //
00121     virtual void SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0);
00122
00123     // this member function returns the menu resource associated with
00124     // the tab control.
00125     //
00126     virtual UINT GetMenuID();
00127
00128 // Overrides
00129     // ClassWizard generated virtual function overrides
00130     //{{AFX_VIRTUAL(CCJTabCtrl)
00131     public:
00132     virtual BOOL Create(CWnd* pParentWnd, UINT nID=AFX_IDC_TAB_CONTROL, DWORD dwStyle=WS_VISIBLE|WS_CHILD|TCS_BOTTOM|TCS_TOOLTIPS|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, const CRect& rect=CRect(0,0,0,0));
00133     //}}AFX_VIRTUAL
00134
00135 // Generated message map functions
00136 protected:
00137     //{{AFX_MSG(CCJTabCtrl)
00138     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00139     afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00140     afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu);
00141     afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00142     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00143     afx_msg void OnPaint();
00144     //}}AFX_MSG
00145     DECLARE_MESSAGE_MAP()
00146 };
00147
00149 //  Inline Functions
00151
00152 _CJXLIB_INLINE void CCJTabCtrl::SetMenuID(UINT popupMenuID, UINT popToolbarID, int nPos)
00153     { m_popupMenuID = popupMenuID; m_popToolbarID = popToolbarID; m_nPos = nPos; }
00154
00155 _CJXLIB_INLINE UINT CCJTabCtrl::GetMenuID()
00156     { return m_popupMenuID; }
00157
00159
00160 //{{AFX_INSERT_LOCATION}}
00161 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00162
00163 #endif // __CJTABCTRL_H__
00164
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TGraphSelNonSig Member List

This is the complete list of members for TGraphSelNonSig, including all inherited members.

m_view | TGraphSelNonSig | [private]
TGraphSelNonSig(CGraphView *view) | TGraphSelNonSig |
TraverseGraph(CLogNode *node) | TGraph |
TraverseNode(CLogNode *node) | TGraphSelNonSig | [virtual]

Generated on Sat Aug 7 22:57:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoTextListView Member List

This is the complete list of members for TPseudoTextListView, including all inherited members.

DelItemAt(GridCoordinate anItem, GridCoordinate numOfItems) | TPseudoTextListView | [virtual]
DoKeyEvent(TToolboxEvent *event) | TPseudoTextListView | [virtual]
DoMouseCommand(CViewPoint &theMouse, TToolboxEvent *event, CPoint_AC) | TPseudoTextListView | [virtual]
DoMouseCommand_SelectCells(GridCell whichCell, class TToolboxEvent *event) | TPseudoTextListView | [protected, virtual]
fStringContainer | TPseudoTextListView | [protected]
GetItemText(GridCoordinate) const | TPseudoTextListView | [virtual]
GetStandardSignature(void) const | TPseudoTextListView | [virtual]
InsStringBefore(short anItem, const char *string) | TPseudoTextListView | [virtual]
InsStringFirst(const char *string) | TPseudoTextListView | [virtual]
InsStringLast(const char *string) | TPseudoTextListView | [virtual]
kMultiClickSelection enum value | TPseudoTextListView |
kSelectionChanged enum value | TPseudoTextListView |
kTextStringListViewSignature enum value | TPseudoTextListView |
MA_DECLARE_CLASS | TPseudoTextListView | [private]
RemoveAll(void) | TPseudoTextListView | [virtual]
SetSelection(const TGridViewDesignator *cellsToSelect, bool extendSelection, bool highlight, bool select) | TPseudoTextListView | [virtual]
TPseudoTextListView() | TPseudoTextListView |
~TPseudoTextListView() | TPseudoTextListView | [virtual]

Generated on Sat Aug 7 22:57:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/Subclass.h Source File

WinCvs/CJLib/Include/Subclass.h

Go to the documentation of this file.
00001 #ifndef _SUBCLASSW_H
00002 #define _SUBCLASSW_H
00003
00005 // Copyright 1998 Paul DiLascia
00006 // If this code works, it was written by Paul DiLascia.
00007 // If not, I don't know who wrote it.
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.2 $
00014  * $Archive: /CodeJock/Include/Subclass.h $
00015  *
00016  * $History: Subclass.h $
00017  *
00018  * *****************  Version 4  *****************
00019  * User: Kirk Stowell Date: 10/26/99   Time: 10:50p
00020  * Updated in $/CodeJock/Include
00021  * Made class methods virtual for inheritance purposes.
00022  *
00023  * *****************  Version 3  *****************
00024  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00025  * Updated in $/CodeJock/Include
00026  * Added source control history to file header.
00027  *
00028  ***************************************************************************/
00030
00032 // Generic class to hook messages on behalf of a CWnd.
00033 // Once hooked, all messages go to CSubclassWnd::WindowProc before going
00034 // to the window. Specific subclasses can trap messages and do something.
00035 //
00036 // To use:
00037 //
00038 // * Derive a class from CSubclassWnd.
00039 //
00040 // * Override CSubclassWnd::WindowProc to handle messages. Make sure you call
00041 //   CSubclassWnd::WindowProc if you don't handle the message, or your
00042 //   window will never get messages. If you write seperate message handlers,
00043 //   you can call Default() to pass the message to the window.
00044 //
00045 // * Instantiate your derived class somewhere and call HookWindow(pWnd)
00046 //   to hook your window, AFTER it has been created.
00047 //    To unhook, call HookWindow(NULL).
00048 //
00049 // This is a very important class, crucial to many of the widgets Window
00050 // widgets implemented in PixieLib. To see how it works, look at the HOOK
00051 // sample program.
00052 //
00053 class _CJX_EXT_CLASS CSubclassWnd : public CObject {
00054 public:
00055     DECLARE_DYNAMIC(CSubclassWnd);
00056     CSubclassWnd();
00057     ~CSubclassWnd();
00058
00059     // Subclass a window. Hook(NULL) to unhook (automatic on WM_NCDESTROY)
00060     virtual BOOL    HookWindow(HWND  hwnd);
00061     virtual BOOL    HookWindow(CWnd* pWnd)  { return HookWindow(pWnd->GetSafeHwnd()); }
00062     virtual BOOL    IsHooked()                  { return m_hWnd!=NULL; }
00063
00064     friend LRESULT CALLBACK HookWndProc(HWND, UINT, WPARAM, LPARAM);
00065     friend class CSubclassWndMap;
00066
00067 #ifdef _DEBUG
00068     virtual void AssertValid() const;
00069     virtual void Dump(CDumpContext& dc) const;
00070 #endif
00071
00072 protected:
00073     HWND                m_hWnd;             // the window hooked
00074     WNDPROC         m_pOldWndProc;      // ..and original window proc
00075     CSubclassWnd*   m_pNext;                // next in chain of hooks for this window
00076
00077     // Override this to handle messages in specific handlers
00078     virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp);
00079     virtual LRESULT Default();              // call this at the end of handler fns
00080 };
00081
00082 #endif // _SUBCLASSW_H
00083
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UTB_DROPDOWN Member List

This is the complete list of members for UTB_DROPDOWN, including all inherited members.

btns | UTB_DROPDOWN
initialcmd | UTB_DROPDOWN
tooltip | UTB_DROPDOWN

Generated on Sat Aug 7 22:56:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoFileActionHandler Member List

This is the complete list of members for KoFileActionHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoFileActionHandler() | KoFileActionHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoFileActionHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoFileActionHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoEditorsHandler Member List

This is the complete list of members for KoEditorsHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoEditorsHandler() | KoEditorsHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoEditorsHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoEditorsHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsFrame Member List

This is the complete list of members for UCvsFrame, including all inherited members.

_GetBaseClass() | UCvsFrame | [protected, static]
_messageEntries | UCvsFrame | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
AskForQuitting(void) | UCvsFrame |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsFrame | UCvsFrame | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
FreshenFileMask(void) | UCvsFrame |
GetBaseMessageMap() | UCvsFrame | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFilterModel(void) | UCvsFrame | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetIgnoreModel(void) | UCvsFrame | [inline]
GetMessageMap() const | UCvsFrame | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRecursionModel(void) | UCvsFrame | [inline]
GetRuntimeClass() const | UCvsFrame | [virtual]
GetThisMessageMap() | UCvsFrame | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
InUpdateUI | UCvsFrame | [protected]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kBrowserPopup enum value | UCvsFrame |
kDirCombo enum value | UCvsFrame |
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_filter | UCvsFrame | [protected]
m_ignore | UCvsFrame | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_recursion | UCvsFrame | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UCvsFrame | [protected, static]
OnAbout(void) | UCvsFrame | [protected]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnBrowserPopup(void) | UCvsFrame | [protected]
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnCmdCmdline(void) | UCvsFrame | [protected]
OnCmdIgnore(void) | UCvsFrame |
OnCmdInit(void) | UCvsFrame | [protected]
OnCmdLogin(void) | UCvsFrame | [protected]
OnCmdLogout(void) | UCvsFrame | [protected]
OnCmdMacroAdmin(int cmd) | UCvsFrame | [protected]
OnCmdPreferences(void) | UCvsFrame | [protected]
OnCmdReload(void) | UCvsFrame | [protected]
OnCmdRtagBranch(void) | UCvsFrame | [protected]
OnCmdRtagDelete(void) | UCvsFrame | [protected]
OnCmdRtagNew(void) | UCvsFrame | [protected]
OnCmdSaveSettings(void) | UCvsFrame | [protected]
OnCmdStopcvs(void) | UCvsFrame | [protected]
OnCmdUIAnytime(int cmd, UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUICvsCmd(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIFilterMask(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIHideUnknown(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIIgnore(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIMacroAdmin(int cmd, UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIPyMacro(int cmd, UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIQuit(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIReload(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIStopcvs(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIUsePyShell(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIUseTclShell(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewAdded(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewChanged(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewConflict(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewIgnored(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewMissing(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewModified(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewRecursive(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewRemoved(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUIViewUnknown(UCmdUI *pCmdUI) | UCvsFrame | [protected]
OnCmdUsePyShell(void) | UCvsFrame | [protected]
OnCmdUseTclShell(void) | UCvsFrame | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSelDir(int pos, const char *txt) | UCvsFrame | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCopyrights(void) | UCvsFrame | [protected]
OnCreate(void) | UCvsFrame | [protected]
OnCredits(void) | UCvsFrame | [protected]
OnDestroy(void) | UCvsFrame | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnFilterMaskEntered(void) | UCvsFrame |
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnHideUnknown(void) | UCvsFrame | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnQuit(void) | UCvsFrame | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
OnViewAdded(void) | UCvsFrame | [protected]
OnViewChanged(void) | UCvsFrame | [protected]
OnViewConflict(void) | UCvsFrame | [protected]
OnViewIgnored(void) | UCvsFrame | [protected]
OnViewMissing(void) | UCvsFrame | [protected]
OnViewModified(void) | UCvsFrame | [protected]
OnViewRecursive(void) | UCvsFrame | [protected]
OnViewRemoved(void) | UCvsFrame | [protected]
OnViewUnknown(void) | UCvsFrame | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsFrame(void) | UCvsFrame | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsFrame() | UCvsFrame |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsFrame() | UCvsFrame | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:51:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/umenu.cpp Source File

rf/umenu.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #include <stdlib.h>
00028 #include <stdio.h>
00029 #include <math.h>
00030 #include <string.h>
00031 #include <float.h>
00032 #include <vector>
00033 #include <map>
00034
00035 #ifdef HAVE_MALLOC_H
00036 #include <malloc.h>
00037 #endif
00038
00039 #ifdef HAVE_UNISTD_H
00040 #include <unistd.h>
00041 #endif
00042
00043 #include "umenu.h"
00044 #include "uconsole.h"
00045
00046 #ifdef WIN32
00047 #include "dib.h"
00048 #endif
00049
00050 #ifdef qMacAPP
00051 #include "UMenuMgr.h"
00052 #include "UDispatcher.h"
00053 #endif
00054
00055 #if qMacPP
00056 #include <UConditionalMenus.h>
00057 #include <UAppearanceMenus.h>
00058 #endif
00059
00060 #ifdef qGTK
00061 extern "C"
00062 {
00063     // from glade's support.h
00064     GtkWidget *create_pixmap(GtkWidget *widget, const gchar *filename);
00065 }
00066 #endif
00067
00068 #if defined(_DEBUG) && defined(WIN32)
00069 #   define new DEBUG_NEW
00070 #   undef THIS_FILE
00071     static char THIS_FILE[] = __FILE__;
00072 #endif
00073
00074 UIMPLEMENT_DYNAMIC(UMenu, UWidget)
00075
00076 UBEGIN_MESSAGE_MAP(UMenu, UWidget)
00077     ON_UPDATEUI(UMenu)
00078     ON_UCOMMAND_RANGE(0, 0xFFFF, UMenu::OnCommands)
00079 UEND_MESSAGE_MAP()
00080
00081 UMenu::UMenu(int widid) : UWidget(widid)
00082 #if qGTK
00083     , fAccelGroup(0L), fRadioGroup(0L)
00084 #endif
00085 {
00086 #if qGTK
00087     fAccelGroup = gtk_accel_group_new ();
00088 #endif
00089 }
00090
00091 UMenu::~UMenu()
00092 {
00093 }
00094
00095 #ifdef WIN32
00096 // create a HBITMAP from a pixmap
00097 HBITMAP UMakeBitmap(char **icon, int & width, int & height, COLORREF back)
00098 {
00099     BYTE **src = (BYTE **)icon;
00100
00101     // read the header
00102     int w, h, nc, cpp, i, x, y;
00103     if(sscanf((char *)*src++, "%d%d%d%d", &w, &h, &nc, &cpp) != 4)
00104         return 0L;
00105
00106     width = w;
00107     height = h;
00108
00109     HBITMAP hbitmap = CreateDIB(w, h, 8, 0L);
00110     LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00111     BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00112     RGBQUAD *pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00113
00114     // read the colormap
00115     std::map<short, BYTE> colors;
00116     for(i = 0; i < nc; i++)
00117     {
00118         const BYTE *line = *src++;
00119         short aref;
00120         if(cpp == 1)
00121         {
00122             aref = line[0];
00123             line += 4;
00124         }
00125         else if(cpp == 2)
00126         {
00127             aref = ((short)line[1] << 8)  | line[0];
00128             line += 5;
00129         }
00130         else
00131             ASSERT(0);
00132
00133         COLORREF color;
00134
00135         if(strcmp((char *)line, "None") == 0)
00136         {
00137             color = back;
00138         }
00139         else
00140         {
00141             if(*line++ != '#')
00142                 return 0L;
00143
00144             if(strlen((char *)line) < 6)
00145                 return 0L;
00146
00147             int comp[6], c;
00148             int j;
00149             for(j = 0; j < 6; j++)
00150             {
00151                 c = *line++;
00152                 if(c >= '0' && c <= '9')
00153                     comp[j] = c - '0';
00154                 else if(c >= 'a' && c <= 'f')
00155                     comp[j] = c - 'a' + 10;
00156                 else if(c >= 'A' && c <= 'F')
00157                     comp[j] = c - 'A' + 10;
00158                 else
00159                     return 0L;
00160             }
00161
00162             color = RGB(comp[0]*16+comp[1],comp[2]*16+comp[3],comp[4]*16+comp[5]);
00163         }
00164
00165         colors.insert(std::make_pair(aref, i));
00166
00167         pRgb->rgbRed = GetRValue(color);
00168         pRgb->rgbGreen = GetGValue(color);
00169         pRgb->rgbBlue = GetBValue(color);
00170         pRgb->rgbReserved = 0;
00171         pRgb++;
00172     }
00173
00174     if(nc != colors.size() || nc > 256)
00175         return 0L;
00176
00177     // make the bitmap
00178     for(y = 0; y < h; y++)
00179     {
00180         const BYTE *line = *src++;
00181         BYTE *ptr = image + WIDTHBYTES(w * 8) * (h - y - 1);
00182         for(x = 0; x < w; x++)
00183         {
00184             short aref;
00185             if(cpp == 1)
00186             {
00187                 aref = line[0];
00188                 line++;
00189             }
00190             else if(cpp == 2)
00191             {
00192                 aref = ((short)line[1] << 8)  | line[0];
00193                 line += 2;
00194             }
00195             std::map<short, BYTE>::iterator pos = colors.find(aref);
00196             if(pos == colors.end())
00197                 return 0L;
00198             *ptr++ = (*pos).second;
00199         }
00200     }
00201
00202     GlobalUnlock(hbitmap);
00203
00204     HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00205     GlobalFree((HGLOBAL)hbitmap);
00206
00207     return ddbbmap;
00208 }
00209
00210 HBITMAP UMakeBitmap(char **icon)
00211 {
00212     int w, h;
00213     return UMakeBitmap(icon, w, h, ::GetSysColor(COLOR_BTNFACE));
00214 }
00215
00216 UEXPORT HBITMAP UMakeBitmap(const char *icon)
00217 {
00218     std::vector<UStr> icstr;
00219     const char *tmp;
00220     while((tmp = strchr(icon, '\n')) != 0L)
00221     {
00222         UStr str;
00223         str.set(icon, tmp - icon);
00224         icon = tmp + 1;
00225         icstr.push_back(str);
00226     }
00227     if(icon[0] != '\0')
00228     {
00229         icstr.push_back(UStr(icon));
00230     }
00231
00232     std::vector<UStr>::const_iterator i;
00233     std::vector<const char *> ic;
00234     for(i = icstr.begin(); i != icstr.end(); ++i)
00235     {
00236         ic.push_back((*i).c_str());
00237     }
00238     return UMakeBitmap((char **)&ic[0]);
00239 }
00240 #endif
00241
00242 #define CTRLALT_STROKE "Ctrl+Alt+"
00243 #define CTRL_STROKE "Ctrl+"
00244 #define ALT_STROKE "Alt+"
00245
00246 static void GetMenuTitle(const char *name, UStr & title, int cmd,
00247                          char & mnemonic, int & mod, int & key)
00248 {
00249     title = "";
00250     mod = 0;
00251     key = 0;
00252     mnemonic = '\0';
00253
00254     // get the accelerator
00255     UStr copy(name);
00256     char *tmp;
00257     if((tmp = strchr(copy, '\t')) != 0L)
00258     {
00259         *tmp++ = '\0';
00260         if(strncmp(tmp, CTRLALT_STROKE, strlen(CTRLALT_STROKE)) == 0)
00261         {
00262             mod = UK_CONTROL | UK_ALT;
00263             key = tmp[strlen(CTRLALT_STROKE)];
00264         }
00265         else if(strncmp(tmp, CTRL_STROKE, strlen(CTRL_STROKE)) == 0)
00266         {
00267             mod = UK_CONTROL;
00268             key = tmp[strlen(CTRL_STROKE)];
00269         }
00270         else if(strncmp(tmp, ALT_STROKE, strlen(ALT_STROKE)) == 0)
00271         {
00272             mod = UK_ALT;
00273             key = tmp[strlen(ALT_STROKE)];
00274         }
00275         name = copy;
00276     }
00277
00278     title = name;
00279 #ifndef WIN32
00280     if((tmp = strchr(title, '&')) != 0L)
00281     {
00282         size_t l = tmp - (const char *)title;
00283         memmove((char *)&title[l], &title[l + 1], title.length() - l);
00284     }
00285 #endif
00286 }
00287
00288 UMENU UMenuAddPulldown(int widid, const char *name, UMENU top, int cmd)
00289 {
00290     UStr title;
00291     int  mod, key;
00292     char mnemonic;
00293     GetMenuTitle(name, title, 0, mnemonic, mod, key);
00294
00295 #ifdef qMacAPP
00296     return UMENU_NULL;
00297 #endif
00298 #ifdef qMacPP
00299     if(top == UMENU_NULL)
00300     {
00301         Assert_(0); // TODO
00302     }
00303     else
00304     {
00305         LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00306         LMenu *menu = menuBar->FetchMenu(top);
00307         if(menu == 0L)
00308             return UMENU_NULL;
00309
00310         LStr255 pstr(name);
00311         LMenu *newMenu = new LMenu(::UniqueID('MENU'), pstr);
00312         menuBar->InstallMenu(newMenu, hierMenu);
00313
00314         menu->InsertCommand(pstr, cmd_UseMenuItem, max_Int16 - 1);
00315         UAppearanceMenus::SetItemHierID(menu->GetMacMenuH(), ::CountMenuItems(menu->GetMacMenuH()),
00316             newMenu->GetMenuID());
00317         return newMenu->GetMenuID();
00318     }
00319     return UMENU_NULL;
00320 #endif
00321 #ifdef qGTK
00322     GtkWidget *parent = 0L;
00323
00324     if(top == UMENU_NULL)
00325     {
00326         // try to find the menubar : the menu bar should be mapped
00327         // to a UMenu object as the main widget
00328         const UCmdTarget *target = UEventQueryWidget(widid);
00329         UMenu *menu = 0L;
00330         if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00331             return UMENU_NULL;
00332
00333         menu = (UMenu *)target;
00334         if(menu == 0L)
00335             return UMENU_NULL;
00336
00337         GtkWidget *wid = (GtkWidget *)menu->GetWidget(kUMainWidget);
00338         if(wid == 0L || !GTK_IS_MENU_SHELL(wid))
00339             return UMENU_NULL;
00340
00341         parent = wid;
00342     }
00343     else
00344     {
00345         if(!GTK_IS_MENU_SHELL(top))
00346             return UMENU_NULL;
00347         parent = (GtkWidget *)top;
00348     }
00349
00350     GtkWidget *menuitem = gtk_menu_item_new_with_label(title);
00351     gtk_widget_show(menuitem);
00352     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00353
00354     GtkWidget *menu = gtk_menu_new();
00355     gtk_menu_item_set_submenu(GTK_MENU_ITEM (menuitem), menu);
00356     gtk_menu_ensure_uline_accel_group (GTK_MENU (menu));
00357     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menu);
00358     return (UMENU)menu;
00359 #endif
00360 #ifdef WIN32
00361     if(top == UMENU_NULL)
00362     {
00363         CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00364         CMenu menu;
00365         menu.CreatePopupMenu();
00366         pTopMenu->AppendMenu(MF_POPUP, (UINT)menu.GetSafeHmenu(), name);
00367
00368         static bool firsttime = true;
00369         if(firsttime)
00370         {
00371             pTopMenu->DeleteMenu(0, MF_BYPOSITION);
00372             firsttime = false;
00373         }
00374         return (UMENU)menu.Detach();
00375     }
00376     else
00377     {
00378         HMENU menuhdl = (HMENU)top;
00379         CMenu parent;
00380         CMenu menu;
00381         menu.CreatePopupMenu();
00382         VERIFY(parent.Attach(menuhdl));
00383         parent.AppendMenu(MF_POPUP, (UINT)menu.GetSafeHmenu(), name);
00384         parent.Detach();
00385         return (UMENU)menu.Detach();
00386     }
00387 #endif
00388 }
00389
00390 #ifdef WIN32
00391 static void addAccel(int cmd, int mod, int key)
00392 {
00393     if(key == 0)
00394         return;
00395
00396     // Save the current accelerator table.
00397     CWnd *wnd = AfxGetMainWnd();
00398     CFrameWnd *frame = 0L;
00399     if(wnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))
00400         frame = (CFrameWnd *)wnd;
00401     else
00402         frame = wnd->GetParentFrame();
00403     if(frame == 0L)
00404         return;
00405
00406     HACCEL haccelOld = frame->m_hAccelTable;
00407
00408     // Count the number of entries in the current
00409     // table, allocate a buffer for the table, and
00410     // then copy the table into the buffer.
00411
00412     int cAccelerators = CopyAcceleratorTable(haccelOld, NULL, 0);
00413     LPACCEL lpaccelNew = (LPACCEL) LocalAlloc(LPTR, (cAccelerators + 1) * sizeof(ACCEL));
00414     if (lpaccelNew == NULL)
00415         return;
00416
00417     CopyAcceleratorTable(haccelOld, lpaccelNew, cAccelerators);
00418
00419     // Find the accelerator that the user modified
00420     // and change its flags and virtual-key code
00421     // as appropriate.
00422
00423     for (int i = 0; i < cAccelerators; i++)
00424     {
00425         if(lpaccelNew[i].cmd == cmd)
00426         {
00427             lpaccelNew[i].fVirt = FVIRTKEY;
00428             if(mod & UK_ALT)
00429                 lpaccelNew[i].fVirt |= FALT;
00430             if(mod & UK_CONTROL)
00431                 lpaccelNew[i].fVirt |= FCONTROL;
00432             lpaccelNew[i].key = key;
00433             break;
00434         }
00435     }
00436
00437     if(i == cAccelerators)
00438     {
00439         lpaccelNew[i].cmd = cmd;
00440         lpaccelNew[i].fVirt = FVIRTKEY;
00441         if(mod & UK_ALT)
00442             lpaccelNew[i].fVirt |= FALT;
00443         if(mod & UK_CONTROL)
00444             lpaccelNew[i].fVirt |= FCONTROL;
00445         lpaccelNew[i].key = key;
00446         cAccelerators++;
00447     }
00448
00449     // Create the new accelerator table, and
00450     // destroy the old one.
00451     DestroyAcceleratorTable(haccelOld);
00452     frame->m_hAccelTable = CreateAcceleratorTable(lpaccelNew, cAccelerators);
00453     LocalFree(lpaccelNew);
00454 }
00455 #endif
00456
00457 #ifdef qGTK
00458 static void addToAccelGroup(GtkAccelGroup *accelGroup, GtkWidget *menuitem, int mod, int key)
00459 {
00460     if(key == 0 || accelGroup == 0L)
00461         return;
00462
00463     int gdkmod = 0;
00464     if(mod & UK_CONTROL)
00465         gdkmod |= GDK_CONTROL_MASK;
00466     if(mod & UK_ALT)
00467         gdkmod |= GDK_MOD1_MASK;
00468
00469     gtk_widget_add_accelerator (menuitem, "activate",
00470                                 accelGroup, key, gdkmod, GTK_ACCEL_VISIBLE);
00471 }
00472
00473 static GtkWidget* gtk_menu_item_new_with_label_pixmap(const gchar *label, const void *pixmap)
00474 {
00475 // FIX ME !
00476 #if 1
00477     return gtk_menu_item_new_with_label(label);
00478 #else
00479     if(pixmap == 0L)
00480         return gtk_menu_item_new_with_label(label);
00481
00482     GtkWidget *menu_item = gtk_menu_item_new ();
00483
00484     GtkPixmap *gtkpix = GTK_PIXMAP(create_pixmap(menu_item, (const gchar *)pixmap));
00485     gtk_misc_set_alignment (GTK_MISC (gtkpix), 0.0, 0.5);
00486     gtk_container_add (GTK_CONTAINER (menu_item), GTK_WIDGET(gtkpix));
00487     gtk_widget_show (GTK_WIDGET(gtkpix));
00488
00489     GtkWidget *accel_label = gtk_accel_label_new (label);
00490     gtk_misc_set_alignment (GTK_MISC (accel_label), 0.0, 0.5);
00491
00492     gtk_container_add (GTK_CONTAINER (menu_item), accel_label);
00493     gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (accel_label), menu_item);
00494     gtk_widget_show (accel_label);
00495
00496     return menu_item;
00497 #endif
00498 }
00499 #endif // qGTK
00500
00501 void UMenuDelete(UMENU top, int afterIndex)
00502 {
00503     UASSERT(top != UMENU_NULL);
00504
00505 #ifdef qMacAPP
00506     MenuRef menu = MAGetMenu(top);
00507     if(menu)
00508     {
00509         short numItems = ::CountMenuItems(menu);
00510         afterIndex++;
00511         while (numItems >= afterIndex)
00512         {
00513             ::DeleteMenuItem(menu, numItems);
00514             --numItems;
00515         }
00516     }
00517 #endif
00518 #ifdef qMacPP
00519     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00520     LMenu *menu = menuBar->FetchMenu(top);
00521     if(menu)
00522     {
00523         short numItems = ::CountMenuItems(menu->GetMacMenuH());
00524         afterIndex++;
00525         while (numItems >= afterIndex)
00526         {
00527             menu->RemoveItem(numItems);
00528             --numItems;
00529         }
00530     }
00531     else
00532     {
00533         MenuHandle mhdl = ::GetMenu(top);
00534         if(mhdl != 0L)
00535         {
00536             short numItems = ::CountMenuItems(mhdl);
00537             afterIndex++;
00538             while (numItems >= afterIndex)
00539             {
00540                 ::DeleteMenuItem(mhdl, numItems);
00541                 --numItems;
00542             }
00543         }
00544     }
00545 #endif
00546 #ifdef WIN32
00547     CMenu parent;
00548     HMENU menuhdl = (HMENU)top;
00549     VERIFY(parent.Attach(menuhdl));
00550
00551     int numItems = (int)parent.GetMenuItemCount() - 1;
00552     while (numItems >= afterIndex)
00553     {
00554         VERIFY(parent.DeleteMenu(numItems, MF_BYPOSITION));
00555         --numItems;
00556     }
00557     parent.Detach();
00558 #endif
00559 #ifdef qUnix
00560     if(!GTK_IS_MENU_SHELL(top))
00561         return;
00562
00563     GtkWidget *parent = (GtkWidget *)top;
00564
00565     GList *list = gtk_container_children(GTK_CONTAINER (parent));
00566     GList *items = g_list_nth(list, afterIndex);
00567
00568     while(items != 0L)
00569     {
00570         GtkWidget *wid = GTK_WIDGET(items->data);
00571         gtk_container_remove(GTK_CONTAINER(parent), wid);
00572         items = (GList *)g_list_next(items);
00573     }
00574 #endif
00575 }
00576
00577 int UMenuCount(UMENU top)
00578 {
00579     UASSERT(top != UMENU_NULL);
00580
00581 #ifdef qMacAPP
00582     MenuRef menu = MAGetMenu(top);
00583     if(menu)
00584     {
00585         return ::CountMenuItems(menu);
00586     }
00587 #endif
00588 #ifdef qMacPP
00589     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00590     LMenu *menu = menuBar->FetchMenu(top);
00591     if(menu)
00592     {
00593         return ::CountMenuItems(menu->GetMacMenuH());
00594     }
00595     else
00596     {
00597         MenuHandle mhdl = ::GetMenu(top);
00598         if(mhdl != 0L)
00599         {
00600             return ::CountMenuItems(mhdl);
00601         }
00602     }
00603 #endif
00604 #ifdef WIN32
00605     CMenu parent;
00606     HMENU menuhdl = (HMENU)top;
00607     VERIFY(parent.Attach(menuhdl));
00608
00609     UINT numItems = parent.GetMenuItemCount();
00610     parent.Detach();
00611
00612     return numItems;
00613 #endif
00614 #ifdef qUnix
00615     if(!GTK_IS_MENU_SHELL(top))
00616         return 0;
00617
00618     GtkWidget *parent = (GtkWidget *)top;
00619
00620     GList* items = gtk_container_children(GTK_CONTAINER (parent));
00621
00622     return g_list_length(items);
00623 #endif
00624
00625     return 0;
00626 }
00627
00628 void UMenuDeleteByCmd(UMENU top, int cmd)
00629 {
00630     UASSERT(top != UMENU_NULL);
00631
00632 #ifdef qMacAPP
00633     MenuID menuNo;
00634     short itemNo;
00635     MenuRef menu = CommandToComponents(cmd, menuNo, itemNo);
00636     if(menu)
00637     {
00638         ::DeleteMenuItem(menu, itemNo);
00639     }
00640 #endif
00641 #ifdef qMacPP
00642     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00643     LMenu *menu = menuBar->FetchMenu(top);
00644     if(menu)
00645     {
00646         menu->RemoveCommand(cmd);
00647     }
00648 #endif
00649 #ifdef WIN32
00650     CMenu parent;
00651     HMENU menuhdl = (HMENU)top;
00652     VERIFY(parent.Attach(menuhdl));
00653
00654     VERIFY(parent.DeleteMenu(cmd, MF_BYCOMMAND));
00655
00656     parent.Detach();
00657 #endif
00658 #ifdef qUnix
00659     if(!GTK_IS_MENU_SHELL(top))
00660         return;
00661
00662     GtkWidget *parent = (GtkWidget *)top;
00663
00664     GList *list = gtk_container_children(GTK_CONTAINER (parent));
00665
00666     while(list != 0L)
00667     {
00668         GtkWidget *wid = GTK_WIDGET(list->data);
00669
00670         if(UHIWORD(gtk_object_get_data(GTK_OBJECT(wid), kUgtkDataToken)) == cmd) {
00671             gtk_container_remove(GTK_CONTAINER(parent), wid);
00672             break;
00673         }
00674
00675         list = (GList *)g_list_next(list);
00676     }
00677 #endif
00678 }
00679
00680 UMENU UMenuAddButton(int widid, const char *name, UMENU top, const void *pixmap, int cmd)
00681 {
00682     UStr title;
00683     int  mod, key;
00684     char mnemonic;
00685     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00686     UASSERT(top != UMENU_NULL);
00687
00688 #ifdef qMacPP
00689     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00690     LMenu *menu = menuBar->FetchMenu(top);
00691     if(menu)
00692     {
00693         LStr255 pstr(title);
00694         menu->InsertCommand(pstr, cmd, max_Int16 - 1);
00695     }
00696     else
00697     {
00698         MenuHandle mhdl = ::GetMenu(top);
00699         if(mhdl != 0L)
00700         {
00701             SInt16  menuLength = ::CountMenuItems(mhdl);
00702             LStr255 pstr(title);
00703             ::MacInsertMenuItem(mhdl, pstr, menuLength);
00704         }
00705     }
00706
00707     return UMENU_NULL;
00708 #endif
00709 #ifdef qMacAPP
00710     MenuRef menu = MAGetMenu(top);
00711     if(menu)
00712     {
00713         CStr255_AC pstr(title);
00714         gDispatcher->DoMakeMenuBarManager();
00715         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), cmd);
00716     }
00717
00718     return UMENU_NULL;
00719 #endif
00720 #ifdef qGTK
00721     UCmdTarget *target = UEventQueryWidget(widid);
00722     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00723         return UMENU_NULL;
00724     UMenu *pmenu = (UMenu *)target;
00725
00726     if(!GTK_IS_MENU_SHELL(top))
00727         return UMENU_NULL;
00728     GtkWidget *parent = (GtkWidget *)top;
00729
00730     GtkWidget *menuitem = gtk_menu_item_new_with_label_pixmap(title, pixmap);
00731     gtk_widget_show (menuitem);
00732     gtk_container_add (GTK_CONTAINER (parent), menuitem);
00733     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00734     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00735     return UMENU_NULL;
00736 #endif
00737 #ifdef WIN32
00738     HMENU menuhdl = (HMENU)top;
00739     CMenu parent;
00740     VERIFY(parent.Attach(menuhdl));
00741
00742     parent.AppendMenu(MF_STRING, UCMD_to_WINCMD(cmd), name);
00743     addAccel(UCMD_to_WINCMD(cmd), mod, key);
00744
00745     if(pixmap != 0L && strlen((const char *)pixmap))
00746     {
00747         HBITMAP bmap = UMakeBitmap((const char *)pixmap);
00748         CBitmap b;
00749         VERIFY(b.Attach(bmap));
00750         parent.SetMenuItemBitmaps(UCMD_to_WINCMD(cmd), MF_BYCOMMAND, &b, &b);
00751         b.Detach();
00752     }
00753
00754     parent.Detach();
00755     return UMENU_NULL;
00756 #endif
00757 }
00758
00759 UMENU UMenuAddToggle(int widid, const char *name, UMENU top, const void *pixmap, int cmd)
00760 {
00761     UStr title;
00762     int  mod, key;
00763     char mnemonic;
00764     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00765
00766 #ifdef qMacPP
00767     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00768     LMenu *menu = menuBar->FetchMenu(top);
00769     if(menu)
00770     {
00771         LStr255 pstr(title);
00772         menu->InsertCommand(pstr, cmd, max_Int16 - 1);
00773     }
00774     else
00775     {
00776         MenuHandle mhdl = ::GetMenu(top);
00777         if(mhdl != 0L)
00778         {
00779             SInt16  menuLength = ::CountMenuItems(mhdl);
00780             LStr255 pstr(title);
00781             ::MacInsertMenuItem(mhdl, pstr, menuLength);
00782         }
00783     }
00784
00785     return UMENU_NULL;
00786 #endif
00787 #ifdef qMacAPP
00788     MenuRef menu = MAGetMenu(top);
00789     if(menu)
00790     {
00791         CStr255_AC pstr(title);
00792         gDispatcher->DoMakeMenuBarManager();
00793         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), cmd);
00794     }
00795
00796     return UMENU_NULL;
00797 #endif
00798 #ifdef qGTK
00799     UCmdTarget *target = UEventQueryWidget(widid);
00800     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00801         return UMENU_NULL;
00802     UMenu *pmenu = (UMenu *)target;
00803
00804     if(!GTK_IS_MENU_SHELL(top))
00805         return UMENU_NULL;
00806     GtkWidget *parent = (GtkWidget *)top;
00807
00808     GtkWidget *menuitem = gtk_check_menu_item_new_with_label(title);
00809     gtk_widget_show(menuitem);
00810     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00811     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00812 //      gtk_tooltips_set_tip (tooltips, quit1, "Quit the application", NULL);
00813     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00814
00815     return UMENU_NULL;
00816 #endif
00817 #ifdef WIN32
00818     ASSERT(top != UMENU_NULL);
00819
00820     HMENU menuhdl = (HMENU)top;
00821     CMenu parent;
00822     VERIFY(parent.Attach(menuhdl));
00823
00824     parent.AppendMenu(MF_STRING, UCMD_to_WINCMD(cmd), name);
00825     addAccel(UCMD_to_WINCMD(cmd), mod, key);
00826
00827     if(pixmap != 0L && strlen((const char *)pixmap))
00828     {
00829         HBITMAP bmap = UMakeBitmap((const char *)pixmap);
00830         CBitmap b;
00831         VERIFY(b.Attach(bmap));
00832         parent.SetMenuItemBitmaps(UCMD_to_WINCMD(cmd), MF_BYCOMMAND, &b, &b);
00833         b.Detach();
00834     }
00835
00836     parent.Detach();
00837     return UMENU_NULL;
00838 #endif
00839 }
00840
00841 UMENU UMenuAddRadio(int widid, const char *name, UMENU top, const void *pixmap, int cmd)
00842 {
00843     UStr title;
00844     int  mod, key;
00845     char mnemonic;
00846     GetMenuTitle(name, title, cmd, mnemonic, mod, key);
00847
00848 #ifdef qMacPP
00849     return UMENU_NULL;
00850 #endif
00851 #ifdef qMacAPP
00852     return UMENU_NULL;
00853 #endif
00854 #ifdef qGTK
00855     UCmdTarget *target = UEventQueryWidget(widid);
00856     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UMenu)))
00857         return UMENU_NULL;
00858     UMenu *pmenu = (UMenu *)target;
00859
00860     if(!GTK_IS_MENU_SHELL(top))
00861         return UMENU_NULL;
00862     GtkWidget *parent = (GtkWidget *)top;
00863     GSList* group = (GSList*)pmenu->GetRadioGroup();
00864
00865     GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, title);
00866
00867     if(group == 0L) {
00868         group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
00869         pmenu->SetRadioGroup(group);
00870     }
00871
00872     gtk_widget_show(menuitem);
00873     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00874     addToAccelGroup((GtkAccelGroup *)pmenu->GetAccelGroup(), menuitem, mod, key);
00875     UEventSendMessage(widid, EV_INIT_WIDGET, cmd, menuitem);
00876
00877     return UMENU_NULL;
00878 #endif
00879 #ifdef WIN32
00880     return UMENU_NULL;
00881 #endif
00882 }
00883
00884 UMENU UMenuAddSeparator(int widid, UMENU top)
00885 {
00886     UASSERT(top != UMENU_NULL);
00887
00888 #ifdef qMacPP
00889     LMenuBar *menuBar = LMenuBar::GetCurrentMenuBar();
00890     LMenu *menu = menuBar->FetchMenu(top);
00891     if(menu)
00892     {
00893         menu->InsertCommand("\p-", 0, max_Int16 - 1);
00894     }
00895     else
00896     {
00897         MenuHandle mhdl = ::GetMenu(top);
00898         if(mhdl != 0L)
00899         {
00900             SInt16  menuLength = ::CountMenuItems(mhdl);
00901             ::MacInsertMenuItem(mhdl, "\p-", menuLength);
00902         }
00903     }
00904
00905     return UMENU_NULL;
00906 #endif
00907 #ifdef qMacAPP
00908     MenuRef menu = MAGetMenu(top);
00909     if(menu)
00910     {
00911         CStr255_AC pstr("-");
00912         gDispatcher->DoMakeMenuBarManager();
00913         TMenuBarManager::fgMenuBarManager->AddMenuItem(pstr, top, ::CountMenuItems(menu), 0);
00914     }
00915
00916     return UMENU_NULL;
00917 #endif
00918 #ifdef qGTK
00919     if(!GTK_IS_MENU_SHELL(top))
00920         return UMENU_NULL;
00921     GtkWidget *parent = (GtkWidget *)top;
00922
00923     GtkWidget *menuitem = gtk_menu_item_new();
00924     gtk_widget_show(menuitem);
00925     gtk_container_add(GTK_CONTAINER (parent), menuitem);
00926     gtk_widget_set_sensitive(menuitem, FALSE);
00927     return UMENU_NULL;
00928 #endif
00929 #ifdef WIN32
00930     HMENU menuhdl = (HMENU)top;
00931     CMenu parent;
00932     VERIFY(parent.Attach(menuhdl));
00933     parent.AppendMenu(MF_SEPARATOR);
00934     parent.Detach();
00935     return UMENU_NULL;
00936 #endif
00937 }
00938
00939 void UMenu::OnUpdateUI()
00940 {
00941     // for WIN32, the UpdateUI on the menus is better handled by MFC
00942 #ifndef WIN32
00943     static bool sSemaphore = false;
00944     USemaphore policeman(sSemaphore);
00945     if(policeman.IsEnteredTwice())
00946         return;
00947
00948     // this is the interesting thing about the toolbar : it resends the
00949     // update UI to other widgets according to the focus information and
00950     // allows the update to be handled several times if the handler asks for it
00951     // (by using UCmdUI::SetContinue)
00952
00953     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00954     std::map<int, void *>::iterator w;
00955     int cmdid;
00956
00957     for(w = m_widgets.begin(); w != m_widgets.end(); ++w)
00958     {
00959         void *widget = (*w).second;
00960         cmdid = (*w).first;
00961
00962         if(cmdid == kUMainWidget)
00963             continue;
00964
00965 #if qGTK
00966         if(!GTK_IS_MENU_ITEM(widget))
00967             continue;
00968 #endif
00969
00970         // first forward the command to the focused widget : if it doesn't want it
00971         // we give it to the next pseudo widget.
00972         if(sFocusWidID != -1 && sFocusWidID != GetWidID())
00973         {
00974             UCmdUI pUI(cmdid);
00975             pUI.m_widget = widget;
00976             UEventSendMessage(sFocusWidID, EV_UPDTCMD, pUI.m_nID, &pUI);
00977             if(!pUI.CanContinue())
00978                 continue;
00979         }
00980
00981         STD map<int, UCmdTarget *>::const_iterator i;
00982         for(i = targets.begin(); i != targets.end(); ++i)
00983         {
00984             int widid = (*i).first;
00985             if(widid == sFocusWidID || widid == GetWidID())
00986                 continue;
00987
00988             UCmdUI pUI(cmdid);
00989             pUI.m_widget = widget;
00990             UEventSendMessage(widid, EV_UPDTCMD, pUI.m_nID, &pUI);
00991             if(!pUI.CanContinue())
00992                 break;
00993         }
00994         if(i == targets.end())
00995         {
00996             //UAppConsole("The cmd %d of the menubar has no update handler, it's gonna be disabled\n", cmdid);
00997             UCmdUI pUI(cmdid);
00998             pUI.m_widget = widget;
00999             pUI.Enable(false);
01000         }
01001     }
01002 #endif
01003 }
01004
01005 int UMenu::OnCommands(int cmd)
01006 {
01007 #if 0
01008     static bool sSemaphore = false;
01009     USemaphore policeman(sSemaphore);
01010     if(policeman.IsEnteredTwice())
01011         return 1;
01012 #endif
01013
01014     // this is the interesting thing about the toolbar : it resends the
01015     // commands to other widgets according to the focus information and
01016     // allows the command to be handled several times if the handler return 1
01017
01018     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
01019     int res = 0;
01020     int handledFlag;
01021
01022     // first forward the command to the focused widget : if it doesn't want it
01023     // we give it to the next pseudo widget.
01024     if(sFocusWidID != -1 && sFocusWidID != GetWidID())
01025     {
01026         res = UEventSendMessageExt(sFocusWidID, EV_CMD, cmd, 0L, &handledFlag);
01027         if(/*res == 0 &&*/ handledFlag)
01028             return 0;// may be we should retuen res here?
01029     }
01030
01031     STD map<int, UCmdTarget *>::const_iterator i;
01032     for(i = targets.begin(); i != targets.end(); ++i)
01033     {
01034         int widid = (*i).first;
01035         if(widid == sFocusWidID || widid == GetWidID())
01036             continue;
01037         res = UEventSendMessageExt(widid, EV_CMD, cmd, 0L, &handledFlag);
01038         if(/*res == 0 &&*/ handledFlag)
01039             return 0;
01040     }
01041
01042     //UAppConsole("The cmd %d of the menubar has no command handler\n", cmd);
01043
01044     return 1;
01045 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPersistent Member List

This is the complete list of members for CPersistent, including all inherited members.

_GetBaseClass() | CPersistent | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const =0L | CPersistent | [protected, pure virtual]
GetRuntimeClass() const | CPersistent | [virtual]
GetTimeStamp() const | CPersistent | [inline]
IsKindOf(const URuntimeClass *pClass) const | UObject |
LoadAll(const char *only=0L) | CPersistent | [static]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
Register(CPersistent *value, const char *uniqueName, kClassPersistent pclass) | CPersistent | [private, static]
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size)=0L | CPersistent | [protected, pure virtual]
SizeOf(void) const =0L | CPersistent | [protected, pure virtual]
TouchTimeStamp() | CPersistent | [inline]
UnRegister(CPersistent *value) | CPersistent | [private, static]
UObject() | UObject | [inline, protected]
~CPersistent() | CPersistent | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MfFileDialog.cpp Source File

WinCvs/MfFileDialog.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- December 2002
00019  */
00020
00021 /*
00022  * MfFileDialog.cpp --- class to pick set of files
00023  */
00024
00025 // MfFileDialog.cpp : implementation file
00026 //
00027
00028 #include "stdafx.h"
00029 #include "MfFileDialog.h"
00030 #include "MultiFiles.h"
00031 #include "CvsCommands.h"
00032
00033 #include <cderr.h>
00034 #include <sstream>
00035
00036 #ifdef _DEBUG
00037 #define new DEBUG_NEW
00038 #undef THIS_FILE
00039 static char THIS_FILE[] = __FILE__;
00040 #endif
00041
00043 // CPathBuffer
00044
00045 CPathBuffer::CPathBuffer()
00046 {
00047     m_bufferSize = 0;
00048     m_buffer = NULL;
00049 }
00050
00051 CPathBuffer::~CPathBuffer()
00052 {
00053     Clear();
00054 }
00055
00057 void CPathBuffer::Clear()
00058 {
00059     m_bufferSize = 0;
00060     delete [] m_buffer;
00061     m_buffer = NULL;
00062 }
00063
00069 TCHAR* CPathBuffer::GetBuffer(int size /*= 0*/)
00070 {
00071     if( size > m_bufferSize )
00072     {
00073         Clear();
00074
00075         m_bufferSize = size;
00076         m_buffer = new TCHAR[size];
00077     }
00078
00079     return m_buffer;
00080 }
00081
00082
00084 // CMfFileDialog
00085
00086 IMPLEMENT_DYNAMIC(CMfFileDialog, CFileDialog)
00087
00088 CMfFileDialog::CMfFileDialog(MultiFiles& mf, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
00089         DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) : m_mf(mf),
00090         CFileDialog(TRUE, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
00091 {
00092 }
00093
00094 BEGIN_MESSAGE_MAP(CMfFileDialog, CFileDialog)
00095     //{{AFX_MSG_MAP(CMfFileDialog)
00096     //}}AFX_MSG_MAP
00097 END_MESSAGE_MAP()
00098
00100 int CMfFileDialog::DoModal()
00101 {
00102     m_filesBuffer.Clear();
00103     m_folderBuffer.Clear();
00104
00105     int modalResult = CFileDialog::DoModal();
00106     if( IDCANCEL == modalResult )
00107     {
00108         // Override the "buffer too small" error since we provide our own buffer
00109         if( CommDlgExtendedError() == FNERR_BUFFERTOOSMALL )
00110         {
00111             modalResult = IDOK;
00112         }
00113     }
00114
00115     if( IDOK == modalResult && m_filesBuffer.GetBuffer() && m_folderBuffer.GetBuffer() )
00116     {
00117         if( m_ofn.Flags & OFN_ALLOWMULTISELECT )
00118         {
00119             m_mf.newdir(m_folderBuffer.GetBuffer());
00120
00121             // Fill the selection
00122             string selFile;
00123             stringstream filesStream;
00124             filesStream << m_filesBuffer.GetBuffer();
00125
00126             while( getline(filesStream, selFile, '\"') )
00127             {
00128                 if( selFile.size() > 0 && !isspace(selFile.c_str()[0]) )
00129                 {
00130                     m_mf.newfile(selFile.c_str());
00131                 }
00132             }
00133         }
00134         else
00135         {
00136             CStr uppath;
00137             CStr file;
00138
00139             if( SplitPath(GetPathName(), uppath, file) )
00140             {
00141                 m_mf.newdir(uppath);
00142                 m_mf.newfile(file);
00143             }
00144         }
00145     }
00146
00147     return modalResult;
00148 }
00149
00151 void CMfFileDialog::OnFileNameChange()
00152 {
00153     const CWnd* pParent = GetParent();
00154     if( pParent )
00155     {
00156         const HWND hParent = pParent->m_hWnd;
00157
00158         // Get the buffer size required
00159         const int filesBufferSize = CommDlg_OpenSave_GetSpec(hParent, NULL, 0);
00160         const int folderBufferSize = CommDlg_OpenSave_GetFolderPath(hParent, NULL, 0);
00161
00162         CommDlg_OpenSave_GetSpec(hParent, m_filesBuffer.GetBuffer(filesBufferSize), filesBufferSize);
00163         CommDlg_OpenSave_GetFolderPath(hParent, m_folderBuffer.GetBuffer(folderBufferSize), folderBufferSize);
00164     }
00165 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGraphConsole Member List

This is the complete list of members for CGraphConsole, including all inherited members.

CGraphConsole() | CGraphConsole |
cvs_err(const char *txt, long len) | CGraphConsole | [virtual]
cvs_out(const char *txt, long len) | CGraphConsole | [virtual]
m_view | CGraphConsole | [private]

Generated on Sat Aug 7 22:52:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CFileAction_MAIN Member List

This is the complete list of members for CFileAction_MAIN, including all inherited members.

CFileAction_MAIN(const MultiFiles *mf, kLaunchType launchType) | CFileAction_MAIN |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CFileAction_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetLaunchType() const | CFileAction_MAIN |
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CFileAction_MAIN |
InitHelpID() | CFileAction_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_fileAction | CFileAction_MAIN |
m_fileActionCombo | CFileAction_MAIN |
m_fileActionDescStatic | CFileAction_MAIN |
m_launchType | CFileAction_MAIN | [private]
m_mf | CFileAction_MAIN | [private]
m_sameActionNextTime | CFileAction_MAIN |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CFileAction_MAIN | [protected, virtual]
OnOK() | CFileAction_MAIN | [virtual]
OnSelchangeAction() | CFileAction_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CFileAction_MAIN() | CFileAction_MAIN |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMenuBar Member List

This is the complete list of members for CCJMenuBar, including all inherited members.

AddButtons(int nNumButtons, LPTBBUTTON lpButtons) | CCJToolBar |
AddDropDownButton(UINT nIDButton, UINT nIDMenu, BOOL bArrow=TRUE) | CCJToolBar |
AddReplaceBitmap(HBITMAP hbmImageWell) | CCJToolBar |
AddStrings(LPCTSTR lpszStrings) | CCJToolBar |
AutoSize() | CCJToolBar |
bTRACE | CCJMenuBar | [static]
CalcDynamicLayout(int nLength, DWORD nMode) | CCJToolBar | [virtual]
CalcFixedLayout(BOOL bStretch, BOOL bHorz) | CCJMenuBar | [protected, virtual]
CalcInsideRect(CRect &rect, BOOL bHorz) const | CCJToolBarBase |
CalcLayout(DWORD nMode, int nLength=-1) | CCJToolBar | [protected]
CalcSize(TBBUTTON *pData, int nCount) | CCJToolBar | [protected]
CancelMenuAndTrackNewOne(int iButton) | CCJMenuBar | [protected]
CCJMenuBar() | CCJMenuBar |
CCJToolBar() | CCJToolBar |
CCJToolBarBase() | CCJToolBarBase | [protected]
CheckButton(int nID, BOOL bCheck) | CCJToolBar |
CommandToIndex(UINT nIDFind) const | CCJToolBar |
ComputeMenuTrackPoint(const CRect &rcButn, TPMPARAMS &tpm) | CCJMenuBar | [protected]
Create(CWnd *pParentWnd, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_TOP, UINT nID=AFX_IDW_TOOLBAR) | CCJMenuBar | [virtual]
CreateEx(CWnd *pParentWnd, DWORD dwCtrlStyle=TBSTYLE_FLAT, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP, CRect rcBorders=CRect(0, 0, 0, 0), UINT nID=AFX_IDW_TOOLBAR) | CCJMenuBar | [virtual]
Customize() | CCJToolBar |
DeleteButton(int nIndex) | CCJToolBar |
DoPaint(CDC *pDC) | CCJToolBarBase | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJToolBarBase |
DrawGripper(CDC *pDC, const CRect &rect) | CCJToolBarBase |
EnableButton(int nID, BOOL bEnable) | CCJToolBar |
EraseNonClient() | CCJToolBarBase |
FindDropDownButton(UINT nID) | CCJToolBar |
GetBitmap(UINT nIdButton) const | CCJToolBar |
GetBitmapFlags() const | CCJToolBar |
GetBorders() const | CCJToolBarBase | [protected]
GetButton(int nIndex, TBBUTTON *pButton) const | CCJToolBar |
GetButtonCount() const | CCJToolBar |
GetButtonInfo(int nIndex, UINT &nID, UINT &nStyle, int &iImage) const | CCJToolBar |
GetButtonSize(TBBUTTON *pData, int iButton) | CCJToolBar | [virtual]
GetButtonStyle(int nIndex) const | CCJToolBar |
GetButtonText(int nIndex) const | CCJToolBar |
GetButtonText(int nIndex, CString &rString) const | CCJToolBar |
GetHotItem() const | CCJToolBar |
GetImageList() const | CCJToolBar |
GetItemID(int nIndex) const | CCJToolBar |
GetItemRect(int nIndex, LPRECT lpRect) const | CCJToolBar | [virtual]
GetMenu() | CCJMenuBar |
GetNextOrPrevButton(int iButton, BOOL bPrev) | CCJMenuBar | [protected]
GetPadding() const | CCJToolBar |
GetRect(UINT nIdButton, RECT &rc) const | CCJToolBar |
GetRows() const | CCJToolBar |
GetState(int nID) const | CCJToolBar |
GetToolBarCtrl() const | CCJToolBar |
GetToolbarStyle() const | CCJToolBar |
GetToolTips() const | CCJToolBar |
GetTrackingState(int &iPopup) | CCJMenuBar |
HideButton(int nID, BOOL bHide) | CCJToolBar |
HitTest(CPoint p) const | CCJMenuBar | [protected]
Indeterminate(int nID, BOOL bIndeterminate) | CCJToolBar |
InsertButton(int nIndex, LPTBBUTTON lpButton) | CCJToolBar |
InsertControl(CRuntimeClass *pClass, LPCTSTR lpszWindowName, CRect &rect, UINT nID, DWORD dwStyle) | CCJToolBar |
InsertControl(CWnd *pCtrl, CRect &rect, UINT nID) | CCJToolBar |
InvalidateOldPos(const CRect &rcInvalid) | CCJToolBar | [virtual]
IsButtonChecked(int nID) const | CCJToolBar |
IsButtonEnabled(int nID) const | CCJToolBar |
IsButtonHidden(int nID) const | CCJToolBar |
IsButtonIndeterminate(int nID) const | CCJToolBar |
IsButtonPressed(int nID) const | CCJToolBar |
IsValidButton(int iButton) const | CCJMenuBar | [protected]
Layout() | CCJToolBar | [protected]
LoadBitmap(LPCTSTR lpszResourceName) | CCJToolBar |
LoadBitmap(UINT nIDResource) | CCJToolBar |
LoadMenu(UINT nID) | CCJMenuBar |
LoadToolBar(LPCTSTR lpszResourceName, TOOLBARINFO *pBarInfo=NULL) | CCJToolBar |
LoadToolBar(UINT nIDResource, TOOLBARINFO *pBarInfo=NULL) | CCJToolBar |
m_arStrings | CCJMenuBar | [protected]
m_bAutoRemoveFrameMenu | CCJMenuBar |
m_bDelayedButtonLayout | CCJToolBar | [protected]
m_bEscapeWasPressed | CCJMenuBar | [protected]
m_bExStyle | CCJToolBarBase |
m_bInReBar | CCJToolBarBase |
m_bProcessLeftArrow | CCJMenuBar | [protected]
m_bProcessRightArrow | CCJMenuBar | [protected]
m_bShowDropArrow | CCJToolBar | [protected]
m_Font | CCJMenuBar | [protected]
m_frameHook | CCJMenuBar | [protected]
m_hbmImageWell | CCJToolBar | [protected]
m_hInstImageWell | CCJToolBar | [protected]
m_hKeyRoot | CCJToolBar | [protected]
m_hMenuTracking | CCJMenuBar | [protected]
m_hRsrcImageWell | CCJToolBar | [protected]
m_iNewPopup | CCJMenuBar | [protected]
m_iPopupTracking | CCJMenuBar | [protected]
m_iTrackingState | CCJMenuBar | [protected]
m_nBarNumber | CCJToolBar | [protected, static]
m_nButtons | CCJToolBar | [protected]
m_nMenuID | CCJMenuBar | [protected]
m_pBarInfo | CCJToolBar | [protected]
m_pControls | CCJToolBar | [protected]
m_pDropButtons | CCJToolBar | [protected]
m_popupMenu | CCJMenuBar | [protected]
m_pStringMap | CCJToolBar | [protected]
m_ptMouse | CCJMenuBar | [protected]
m_rcOldPos | CCJToolBar | [protected]
m_sizeButton | CCJToolBar | [protected]
m_sizeImage | CCJToolBar | [protected]
m_strSubKey | CCJToolBar | [protected]
m_strValueName | CCJToolBar | [protected]
MapAccelerator(TCHAR ch, UINT &nID) const | CCJToolBar |
MenuInputFilter(int code, WPARAM wp, LPARAM lp) | CCJMenuBar | [protected, static]
OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle) | CCJMenuBar | [protected, virtual]
OnDestroy() | CCJToolBar | [protected]
OnDropDownButton(const NMTOOLBAR &nmtb, UINT nID, CRect rc) | CCJToolBar | [virtual]
OnEraseBkgnd(CDC *pDC) | CCJToolBar | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJMenuBar | [protected]
OnMenuInput(MSG &m) | CCJMenuBar | [protected, virtual]
OnMenuSelect(HMENU hmenu, UINT nItemID) | CCJMenuBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJMenuBar | [protected]
OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS *) | CCJToolBar | [protected]
OnNcCreate(LPCREATESTRUCT) | CCJToolBar | [protected]
OnNcHitTest(CPoint) | CCJToolBar | [protected]
OnNcPaint() | CCJToolBar | [protected]
OnPaint() | CCJToolBar | [protected]
OnPreserveZeroBorderHelper(WPARAM, LPARAM) | CCJToolBar | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJToolBar | [protected]
OnSetBitmapSize(WPARAM, LPARAM) | CCJToolBar | [protected]
OnSetButtonSize(WPARAM, LPARAM) | CCJToolBar | [protected]
OnSetSizeHelper(CSize &size, LPARAM lParam) | CCJToolBar | [protected]
OnSize(UINT nType, int cx, int cy) | CCJMenuBar | [protected]
OnSysColorChange() | CCJToolBar | [protected]
OnToolBarBeginAdjust(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarBeginDrag(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarBtnDropDown(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarChange(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarCustomHelp(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarEndAdjust(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarEndDrag(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarGetButtonInfo(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarQueryDelete(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarQueryInsert(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarReset(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolHitTest(CPoint point, TOOLINFO *pTI) const | CCJToolBar | [virtual]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CCJToolBar | [virtual]
OnUpdateMenuButton(CCmdUI *pCmdUI) | CCJMenuBar | [protected]
OnWindowPosChanged(WINDOWPOS *lpwndpos) | CCJToolBar | [protected]
OnWindowPosChanging(LPWINDOWPOS) | CCJToolBar | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCJToolBar | [virtual]
PressButton(int nID, BOOL bPress) | CCJToolBar |
RecomputeMenuLayout() | CCJMenuBar | [protected]
RecomputeToolbarSize() | CCJMenuBar | [protected]
RestoreState() | CCJToolBar |
SaveState() | CCJToolBar |
SendMessageC(UINT m, WPARAM wp=0, LPARAM lp=0) const | CCJToolBar |
SetBitmap(HBITMAP hbmImageWell) | CCJToolBar |
SetBitmapSize(CSize sz) | CCJToolBar |
SetBorders(LPCRECT lpRect) | CCJToolBarBase | [protected]
SetBorders(int cxLeft=0, int cyTop=0, int cxRight=0, int cyBottom=0) | CCJToolBarBase | [protected]
SetButton(int nIndex, TBBUTTON *pButton) | CCJToolBar |
SetButtonInfo(int nIndex, UINT nID, UINT nStyle, int iImage) | CCJToolBar |
SetButtons(const UINT *lpIDArray, int nIDCount) | CCJToolBar |
SetButtonSize(CSize sz) | CCJToolBar |
SetButtonStructSize(int nSize) | CCJToolBar |
SetButtonStyle(int nIndex, UINT nStyle) | CCJToolBar |
SetButtonText(int nIndex, LPCTSTR lpszText) | CCJToolBar |
SetCmdID(int nIndex, UINT nID) | CCJToolBar |
SetExtendedStyle(DWORD dwStyle) | CCJToolBar |
SetHeight(int cyHeight) | CCJToolBar |
SetHotItem(int iHot) | CCJToolBar |
SetImageList(HIMAGELIST hImgList) | CCJToolBar |
SetIndent(int indent) | CCJToolBar |
SetOwner(CWnd *pOwnerWnd) | CCJToolBar |
SetPadding(CSize sz) | CCJToolBar |
SetRows(int nRows, BOOL bLarger, LPRECT lpRect) | CCJToolBar |
SetSizes(SIZE sizeButton, SIZE sizeImage) | CCJToolBar |
SetState(int nID, UINT nState) | CCJToolBar |
SetToolbarStyle(DWORD dwStyle) | CCJToolBar |
SetToolTips(CToolTipCtrl *pTip) | CCJToolBar |
SetTrackingState(TRACKINGSTATE iState, int iButton=-1) | CCJMenuBar | [protected]
SizeToolBar(TBBUTTON *pData, int nCount, int nLength, BOOL bVert=FALSE) | CCJToolBar | [protected]
ToggleTrackButtonMode() | CCJMenuBar | [protected]
TrackPopup(int iButton) | CCJMenuBar | [protected]
TranslateFrameMessage(MSG *pMsg) | CCJMenuBar | [virtual]
UpdateFont() | CCJMenuBar | [protected]
WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam) | CCJToolBarBase | [virtual]
WrapToolBar(TBBUTTON *pData, int nCount, int nWidth) | CCJToolBar | [protected]
~CCJMenuBar() | CCJMenuBar | [virtual]
~CCJToolBar() | CCJToolBar | [virtual]
~CCJToolBarBase() | CCJToolBarBase | [virtual]

Generated on Sat Aug 7 22:49:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KiSelectionHandler Member List

This is the complete list of members for KiSelectionHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
m_autoDelete | KiSelectionHandler | [private]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
m_pmf | KiSelectionHandler | [private]
m_selType | KiSelectionHandler | [private]
m_strCommand | KiSelectionHandler | [private]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf)=0 | KiSelectionHandler | [pure virtual]
OnFolder(const char *fullpath)=0 | KiSelectionHandler | [pure virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs.h Source File

WinCvs/wincvs.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // wincvs.h : main header file for the WINCVS application
00022 //
00023
00024 #if !defined(AFX_WINCVS_H__D2D77DC7_8299_11D1_8949_444553540000__INCLUDED_)
00025 #define AFX_WINCVS_H__D2D77DC7_8299_11D1_8949_444553540000__INCLUDED_
00026
00027 #if _MSC_VER >= 1000
00028 #pragma once
00029 #endif // _MSC_VER >= 1000
00030
00031 #ifndef __AFXWIN_H__
00032     #error include 'stdafx.h' before including this file for PCH
00033 #endif
00034
00035 #include "resource.h"       // main symbols
00036 #include "MultiString.h"
00037 #include "SmartComboBox.h"
00038 #include "cvsgui_process.h"
00039
00040 void AFXAPI DDV_CheckPathExists(CDataExchange* pDX, int nIDC, CString& value, bool promptForCreation = true);
00041 void AFXAPI DDV_MinChars(CDataExchange* pDX, CString const& value, int nChars);
00042 void AFXAPI DDV_CheckCVSROOT(CDataExchange* pDX, CString& value);
00043 void AFXAPI DDX_ComboMString(CDataExchange* pDX, int nIDC, CSmartComboBox& combo);
00044
00046 // CWincvsApp:
00047 // See wincvs.cpp for the implementation of this class
00048 //
00049
00050 class CWincvsView;
00051 class CWinCvsBrowser;
00052 class CBrowseFileView;
00053 class CStr;
00054 class CMainFrame;
00055 class CStatusBar;
00056 class KiFilterModel;
00057 class KiRecursionModel;
00058 class KiIgnoreModel;
00059
00060 class CWincvsApp : public CWinApp
00061 {
00062 public:
00063     // Construction
00064     CWincvsApp();
00065
00066 // Overrides
00067     // ClassWizard generated virtual function overrides
00068     //{{AFX_VIRTUAL(CWincvsApp)
00069     public:
00070     virtual BOOL InitInstance();
00071     virtual int ExitInstance();
00072     virtual BOOL SaveAllModified();
00073     virtual BOOL PreTranslateMessage(MSG* pMsg);
00074     //}}AFX_VIRTUAL
00075
00076 protected:
00077
00078
00079 // Implementation
00080
00081     //{{AFX_MSG(CWincvsApp)
00082     afx_msg void OnAppAbout();
00083     afx_msg void OnAppCopyrights();
00084     afx_msg void OnAppCredits();
00085     afx_msg void OnLogWindowIsPresent(CCmdUI* pCmdUI);
00086     afx_msg void OnStopcvs();
00087     afx_msg void OnUpdateStopcvs(CCmdUI* pCmdUI);
00088     afx_msg void OnHelpCvs();
00089     //}}AFX_MSG
00090     afx_msg void OnFileNew();
00091
00092     DECLARE_MESSAGE_MAP()
00093 private:
00094     // Data members
00095     DWORD m_idletime;
00096     CMainFrame* m_mainFrame;
00097
00098     _CvsProcess* m_CvsProcess;
00099     bool m_CvsRunning;
00100     bool m_CvsStopping;
00102     bool m_isBackgroundProcess;
00104     CMultiDocTemplate* m_logTempl;
00105     CMultiDocTemplate* m_logGraph;
00107     bool m_hasTCL;
00108     bool m_hasPY;
00110     // Methods
00111     void LookForResourceFile(const char* what, CStr& path);
00112
00113     void ShowTipAtStartup(void);
00114     void ShowTipOfTheDay(void);
00115
00116 public:
00117     // Interface
00118     inline CMultiDocTemplate* GetLogGraph();
00119
00120     inline bool IsBackgroundProcess(void) const;
00121     inline void SetBackgroundProcess(const bool isBackgroundProcess);
00122
00123     CWincvsView* GetConsoleView(void);
00124
00125     CWinCvsBrowser* GetBrowserView(void);
00126     void ActivateBrowserView(void);
00127
00128     inline CMainFrame* GetMainFrame(void) const;
00129     CCJShellTree* GetExplorerView(void);
00130     CBrowseFileView* GetFileView(void);
00131     CDocument* GetDocument(void);
00132     CStatusBar* GetStatusBar();
00133
00134     CString GetRoot();
00135
00136     void PeekPumpAndIdle(bool doIdle);
00137
00138     void SetCvsProcess(CvsProcess* proc);
00139     CvsProcess* GetCvsProcess(void) const;
00140
00141     void SetCvsRunning(bool state);
00142     bool IsCvsRunning(void) const;
00143
00144     void SetCvsStopping(bool state);
00145     bool IsCvsStopping(void) const;
00146
00147     void UpdateAllDocsView();
00148
00149     void GetAppPath(CStr& path) const;
00150     void GetAppModule(CStr& module) const;
00151
00152     bool GetAppVersion(CStr& vers) const;
00153
00154     inline DWORD GetIdleTime(void) const;
00155     inline void ResetIdleTime(void);
00156
00157     void IdleCvsProgress(void);
00158
00159     KiFilterModel* GetFilterModel() const;
00160     KiRecursionModel* GetRecursionModel() const;
00161     KiIgnoreModel* GetIgnoreModel() const;
00162
00163     const char* GetEnvMainThread(const char* name);
00164
00165     void StartScriptEngine(const bool forceReload = false);
00166     void StopScriptEngine();
00167     void RestartScriptEngine();
00168
00169     bool HasTCL() const;
00170     bool HasPython() const;
00171 };
00172
00174 // Inline implementation
00175
00180 inline CMultiDocTemplate* CWincvsApp::GetLogGraph()
00181 {
00182     return m_logGraph;
00183 }
00184
00189 inline bool CWincvsApp::IsBackgroundProcess(void) const
00190 {
00191     return m_isBackgroundProcess;
00192 }
00193
00198 inline void CWincvsApp::SetBackgroundProcess(const bool isBackgroundProcess)
00199 {
00200     m_isBackgroundProcess = isBackgroundProcess;
00201 }
00202
00207 inline CMainFrame* CWincvsApp::GetMainFrame(void) const
00208 {
00209     return m_mainFrame;
00210 }
00211
00216 inline void CWincvsApp::SetCvsProcess(CvsProcess* proc)
00217 {
00218     m_CvsProcess = proc;
00219 }
00220
00225 inline CvsProcess* CWincvsApp::GetCvsProcess(void) const
00226 {
00227     return m_CvsProcess;
00228 }
00229
00234 inline void CWincvsApp::SetCvsRunning(bool state)
00235 {
00236     m_CvsRunning = state;
00237 }
00238
00243 inline bool CWincvsApp::IsCvsRunning(void) const
00244 {
00245     return m_CvsRunning;
00246 }
00247
00252 inline void CWincvsApp::SetCvsStopping(bool state)
00253 {
00254     m_CvsStopping = state;
00255 }
00256
00261 inline bool CWincvsApp::IsCvsStopping(void) const
00262 {
00263     return m_CvsStopping;
00264 }
00265
00270 inline DWORD CWincvsApp::GetIdleTime(void) const
00271 {
00272     return m_idletime;
00273 }
00274
00278 inline void CWincvsApp::ResetIdleTime(void)
00279 {
00280     m_idletime = 0;
00281 }
00282
00287 inline bool CWincvsApp::HasTCL() const
00288 {
00289     return m_hasTCL;
00290 }
00291
00296 inline bool CWincvsApp::HasPython() const
00297 {
00298     return m_hasPY;
00299 }
00300
00302
00303 //{{AFX_INSERT_LOCATION}}
00304 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00305
00306 #endif // !defined(AFX_WINCVS_H__D2D77DC7_8299_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJColorPopup.h Source File

WinCvs/CJLib/Include/CJColorPopup.h

Go to the documentation of this file.
00001 #ifndef __CJCOLORPOPUP_H__
00002 #define __CJCOLORPOPUP_H__
00003
00004 #if _MSC_VER >= 1000
00005 #pragma once
00006 #endif // _MSC_VER >= 1000
00007
00008 // CJColorPopup.h : header file
00009 //
00010 // Written by Chris Maunder (chrismaunder@codeguru.com)
00011 // Extended by Alexander Bischofberger (bischofb@informatik.tu-muenchen.de)
00012 // Copyright (c) 1998.
00013 //
00014 // This code may be used in compiled form in any way you desire. This
00015 // file may be redistributed unmodified by any means PROVIDING it is
00016 // not sold for profit without the authors written consent, and
00017 // providing that this notice and the authors name is included. If
00018 // the source code in  this file is used in any commercial application
00019 // then a simple email would be nice.
00020 //
00021 // This file is provided "as is" with no expressed or implied warranty.
00022 // The author accepts no liability if it causes any damage whatsoever.
00023 // It's free - so you get what you pay for.
00024 //
00026 /****************************************************************************
00027  *
00028  * $Date: 2002/06/15 17:49:37 $
00029  * $Revision: 1.2 $
00030  * $Archive: /CodeJock/Include/CJColorPopup.h $
00031  *
00032  * $History: CJColorPopup.h $
00033  *
00034  * *****************  Version 7  *****************
00035  * User: Kirk Stowell Date: 10/31/99   Time: 11:53p
00036  * Updated in $/CodeJock/Include
00037  * Overrode OnEraseBkgnd(...) and made modifications to OnPaint(...) to
00038  * handle flicker free drawing.
00039  *
00040  * Modified resource include for static builds.
00041  *
00042  * Fixed potential resource and memory leak problems.
00043  *
00044  * Made class methods virtual for inheritance purposes.
00045  *
00046  * *****************  Version 6  *****************
00047  * User: Kirk Stowell Date: 10/14/99   Time: 12:23p
00048  * Updated in $/CodeJock/Include
00049  * Added source control history to file header.
00050  *
00051  ***************************************************************************/
00053
00054 // CCJColorPopup messages
00055 #define CPN_SELCHANGE        WM_USER + 1001        // Color Picker Selection change
00056 #define CPN_DROPDOWN         WM_USER + 1002        // Color Picker drop down
00057 #define CPN_CLOSEUP          WM_USER + 1003        // Color Picker close up
00058 #define CPN_SELENDOK         WM_USER + 1004        // Color Picker end OK
00059 #define CPN_SELENDCANCEL     WM_USER + 1005        // Color Picker end (cancelled)
00060
00061 // forward declaration
00062 class CColorPicker;
00063
00064 // To hold the Colors and their names
00065 typedef struct {
00066     COLORREF crColor;
00067     TCHAR    *szName;
00068 } ColorTableEntry;
00069
00071 // CCJColorPopup window
00072
00073 class _CJX_EXT_CLASS CCJColorPopup : public CWnd
00074 {
00075 // Construction
00076 public:
00077     CCJColorPopup();
00078     CCJColorPopup(CPoint p, COLORREF crColor, CWnd* pParentWnd,
00079                  LPCTSTR szDefaultText = NULL, LPCTSTR szCustomText = NULL);
00080     virtual void Initialise();
00081
00082 // Attributes
00083 public:
00084
00085 // Operations
00086 public:
00087     virtual BOOL Create(CPoint p, COLORREF crColor, CWnd* pParentWnd,
00088                 LPCTSTR szDefaultText = NULL, LPCTSTR szCustomText = NULL);
00089
00090 // Overrides
00091     // ClassWizard generated virtual function overrides
00092     //{{AFX_VIRTUAL(CCJColorPopup)
00093     public:
00094     virtual BOOL PreTranslateMessage(MSG* pMsg);
00095     //}}AFX_VIRTUAL
00096
00097 // Implementation
00098 public:
00099     virtual void UpdateFont();
00100     virtual ~CCJColorPopup();
00101
00102 protected:
00103     virtual BOOL GetCellRect(int nIndex, const LPRECT& rect);
00104     virtual void FindCellFromColor(COLORREF crColor);
00105     virtual void SetWindowSize();
00106     virtual void CreateToolTips();
00107     virtual void ChangeSelection(int nIndex);
00108     virtual void EndSelection(int nMessage);
00109     virtual void DrawCell(CDC* pDC, int nIndex);
00110
00111     virtual COLORREF GetColor(int nIndex)              { return m_crColors[nIndex].crColor; }
00112     virtual LPCTSTR GetColorName(int nIndex)           { return m_crColors[nIndex].szName; }
00113     virtual int  GetIndex(int row, int col) const;
00114     virtual int  GetRow(int nIndex) const;
00115     virtual int  GetColumn(int nIndex) const;
00116
00117 // protected attributes
00118 protected:
00119     static ColorTableEntry m_crColors[];
00120     int            m_nNumColors;
00121     int            m_nNumColumns, m_nNumRows;
00122     int            m_nBoxSize, m_nMargin;
00123     int            m_nCurrentSel;
00124     int            m_nChosenColorSel;
00125     CString        m_strDefaultText;
00126     CString        m_strCustomText;
00127     CRect          m_CustomTextRect, m_DefaultTextRect, m_WindowRect;
00128     CFont          m_Font;
00129     CPalette       m_Palette;
00130     COLORREF       m_crInitialColor, m_crColor;
00131     CToolTipCtrl   m_ToolTip;
00132     CWnd*          m_pParent;
00133
00134     // Generated message map functions
00135 protected:
00136     //{{AFX_MSG(CCJColorPopup)
00137     afx_msg void OnNcDestroy();
00138     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00139     afx_msg void OnPaint();
00140     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00141     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00142     afx_msg BOOL OnQueryNewPalette();
00143     afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
00144     afx_msg void OnKillFocus(CWnd* pNewWnd);
00145     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00146     //}}AFX_MSG
00147 #if _MFC_VER < 0x700
00148     afx_msg void OnActivateApp(BOOL bActive, HTASK hTask);
00149 #else
00150     afx_msg void OnActivateApp(BOOL bActive, DWORD hTask);
00151 #endif
00152     DECLARE_MESSAGE_MAP()
00153 };
00154
00156
00157 //{{AFX_INSERT_LOCATION}}
00158 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00159
00160 #endif // !defined(__CJCOLORPOPUP_H__)
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MultilineEntryDlg.h Source File

WinCvs/MultilineEntryDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2003
00019  */
00020
00021 /*
00022  * MultilineEntryDlg.h : Multiline entry complex
00023  */
00024
00025 #if !defined(AFX_MULTILINEENTRYDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_MULTILINEENTRYDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "SmartComboBox.h"
00033
00034 #ifdef WIN32
00035 #   include "wincvs_winutil.h"
00036 #   include "HHelpSupport.h"
00037 #endif
00038
00039 class MultiFiles;
00040
00041 extern CMString gRevNames;
00042
00044 typedef enum {
00045     kMultilineLogMessage = 0,
00046     kMultilineCmdLine,
00047     kMultilineState,
00048     kMultilineDescription,
00049 }kMultilineEntryType;
00050
00052 typedef enum {
00053     kActionOpenEditor = 0,
00054     kActionOpenTemplate,
00055     kActionBrowseTag,
00056     kActionBrowseModule,
00057     kActionFormatCvsRoot
00058 }kActionType;
00059
00061 class CMultiLineEditDialogKeyHelper
00062 {
00063 public:
00064     // Construction
00065     CMultiLineEditDialogKeyHelper();
00066
00067 private:
00068     // Data members
00069     CDialog* m_pDlg;
00070     HWND m_hParentDlg;
00072     BOOL m_ctrlPressedOnOK;
00074 public:
00075     // Interface
00076     void Create(const ctrlPressedOnOK, CDialog* pDlg, const HWND hParentDlg = NULL);
00077     BOOL RelayEvent(const MSG* pMsg);
00078
00079     const char* FormatLineBreakHint() const;
00080 };
00081
00083 class CMultilineEntryDlg : public CHHelpPropertyPage
00084 {
00085     DECLARE_DYNAMIC(CMultilineEntryDlg)
00086
00087 // Construction
00088 public:
00089     CMultilineEntryDlg(const MultiFiles* mf);
00090     ~CMultilineEntryDlg();
00091
00092 // Dialog Data
00093     //{{AFX_DATA(CMultilineEntryDlg)
00094     enum { IDD = IDD_MULTILINE_ENTRY };
00095     CEdit   m_editPositionEdit;
00096     CSmartComboBox  m_actionCombo;
00097     CButton m_entryStatic;
00098     CButton m_wordWrapCtrl;
00099     CEdit   m_entryTextCtrlWrap;
00100     CEdit   m_entryTextCtrl;
00101     CSmartComboBox  m_prevLogsCombo;
00102     CString m_entryText;
00103     BOOL    m_wordWrap;
00104     //}}AFX_DATA
00105
00106 // Overrides
00107     // ClassWizard generate virtual function overrides
00108     //{{AFX_VIRTUAL(CMultilineEntryDlg)
00109     public:
00110     virtual BOOL PreTranslateMessage(MSG* pMsg);
00111     protected:
00112     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00113     //}}AFX_VIRTUAL
00114
00115 // Implementation
00116 protected:
00117     // Generated message map functions
00118     //{{AFX_MSG(CMultilineEntryDlg)
00119     afx_msg void OnSelchangeCombo();
00120     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00121     afx_msg void OnWordwrap();
00122     virtual BOOL OnInitDialog();
00123     afx_msg void OnActionGo();
00124     afx_msg void OnSetfocusLogmsg();
00125     afx_msg void OnSetfocusLogmsgWrap();
00126     //}}AFX_MSG
00127     DECLARE_MESSAGE_MAP()
00128 private:
00129     // Data members
00130     const MultiFiles* m_mf;
00131     kMultilineEntryType m_multilineEntryType;
00133     CDialog* m_pParentWnd;
00134     CMString* m_pPreviousEntries;
00136     bool m_switchingWrap;
00137     bool m_firstFocus;
00139     CMultiLineEditDialogKeyHelper m_multiLineEditDialogKeyHelper;
00140
00141     // Methods
00142     virtual void InitHelpID();
00143
00144     void SwitchWrapEdit(const BOOL bWordWrap);
00145     void SetEntryDescription();
00146     void SetActions();
00147
00148     void AddAction(const kActionType actionType, const char* actionDescription, const bool select = false);
00149     void UpdateInfo();
00150
00151     int GetEntryTextID();
00152     CWnd* GetEntryTextWnd();
00153
00154     void ActionOpenEditor();
00155     void ActionOpenTemplate();
00156     void ActionBrowseTag();
00157     void ActionBrowseModule();
00158     void ActionFormatCvsRoot();
00159
00160 public:
00161     // Interface
00162     BOOL Create(const kMultilineEntryType multilineEntryType, CMString* pPreviousEntries,
00163         const CWnd* pWndInsertAfter, CDialog* pParentWnd, const bool updateData = true);
00164
00165     BOOL UpdateData(BOOL bSaveAndValidate, CString& entryText);
00166 };
00167
00168 //{{AFX_INSERT_LOCATION}}
00169
00170 #endif // !defined(AFX_MULTILINEENTRYDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMacroEntry Member List

This is the complete list of members for CMacroEntry, including all inherited members.

CMacroEntry() | CMacroEntry | [inline]
CMacroEntry(const char *fullname, const char *dispname) | CMacroEntry | [inline]
CMacroEntry(const CMacroEntry &anentry) | CMacroEntry | [inline]
name | CMacroEntry |
operator<(const CMacroEntry &anentry) const | CMacroEntry | [inline]
operator=(const CMacroEntry &anentry) | CMacroEntry | [inline]
operator==(const CMacroEntry &anentry) const | CMacroEntry | [inline]
path | CMacroEntry |

Generated on Sat Aug 7 22:54:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJStatusBarPane Member List

This is the complete list of members for CCJStatusBarPane, including all inherited members.

CCJStatusBarPane() | CCJStatusBarPane |
CCJStatusBarPane(CCJStatusBarPane &rPane) | CCJStatusBarPane |
m_cxText | CCJStatusBarPane |
m_nFlags | CCJStatusBarPane |
m_nID | CCJStatusBarPane |
m_nStyle | CCJStatusBarPane |
m_strText | CCJStatusBarPane |
operator=(CCJStatusBarPane &rPane) | CCJStatusBarPane |
~CCJStatusBarPane() | CCJStatusBarPane | [virtual]

Generated on Sat Aug 7 22:50:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FilterSelectionDlg.cpp Source File

common/FilterSelectionDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- September 2003
00019  */
00020
00021 /*
00022  * FilterSelectionDlg.cpp : the filter selection dialog
00023  */
00024
00025
00026 #include "stdafx.h"
00027
00028 #ifdef WIN32
00029 #   include "wincvs.h"
00030 #endif  /* WIN32 */
00031
00032 #include "FilterSelectionDlg.h"
00033
00035 #define PREV_FILTER_SIZE 100
00036
00037 static CMString gPrevFilterName(PREV_FILTER_SIZE,       "P_PrevFilterName");
00038 static CMString gPrevFilterExtention(PREV_FILTER_SIZE,  "P_PrevFilterExtention");
00039 static CMString gPrevFilterRevision(PREV_FILTER_SIZE,   "P_PrevFilterRevision");
00040 static CMString gPrevFilterOption(PREV_FILTER_SIZE,     "P_PrevFilterOption");
00041 static CMString gPrevFilterState(PREV_FILTER_SIZE,      "P_PrevFilterState");
00042 static CMString gPrevFilterEncoding(PREV_FILTER_SIZE,   "P_PrevFilterEncoding");
00043 static CMString gPrevFilterStickyTag(PREV_FILTER_SIZE,  "P_PrevFilterStickyTag");
00044 static CMString gPrevFilterTimeStamp(PREV_FILTER_SIZE,  "P_PrevFilterTimeStamp");
00045 static CMString gPrevFilterConflict(PREV_FILTER_SIZE,   "P_PrevFilterConflict");
00046 static CMString gPrevFilterPath(PREV_FILTER_SIZE,       "P_PrevFilterPath");
00047
00053 CMString* GetPrevFilter(const int columnIndex)
00054 {
00055     CMString* pRes = NULL;
00056
00057     if( columnIndex >= 0 && columnIndex < ColumnIndex::kEnd )
00058     {
00059         static CMString* prevFilters[ColumnIndex::kEnd] = { 0 };
00060
00061         if( !prevFilters[0] )
00062         {
00063             prevFilters[ColumnIndex::kName     ] = &gPrevFilterName;
00064             prevFilters[ColumnIndex::kExtention] = &gPrevFilterExtention;
00065             prevFilters[ColumnIndex::kRevision ] = &gPrevFilterRevision ;
00066             prevFilters[ColumnIndex::kOption   ] = &gPrevFilterOption;
00067             prevFilters[ColumnIndex::kState    ] = &gPrevFilterState;
00068             prevFilters[ColumnIndex::kEncoding ] = &gPrevFilterEncoding;
00069             prevFilters[ColumnIndex::kStickyTag] = &gPrevFilterStickyTag;
00070             prevFilters[ColumnIndex::kTimeStamp] = &gPrevFilterTimeStamp;
00071             prevFilters[ColumnIndex::kConflict ] = &gPrevFilterConflict;
00072             prevFilters[ColumnIndex::kPath     ] = &gPrevFilterPath;
00073         }
00074
00075         pRes = prevFilters[columnIndex];
00076     }
00077
00078     return pRes;
00079 }
00080
00081 #ifdef WIN32
00082 #   ifdef _DEBUG
00083 #   define new DEBUG_NEW
00084 #   undef THIS_FILE
00085     static char THIS_FILE[] = __FILE__;
00086 #   endif
00087
00089 // CFilterSelectionDlg dialog
00090
00091
00092 CFilterSelectionDlg::CFilterSelectionDlg(const int columnIndex, const char* filterText,
00093                                          CWnd* pParent /*=NULL*/)
00094     : m_contentsCombo(USmartCombo::AutoDropWidth), m_filterCombo(USmartCombo::RemoveItems),
00095     CHHelpDialog(CFilterSelectionDlg::IDD, pParent)
00096 {
00097     //{{AFX_DATA_INIT(CFilterSelectionDlg)
00098     m_filterText = _T("");
00099     //}}AFX_DATA_INIT
00100
00101     m_columnIndex = columnIndex;
00102     m_filterText = filterText;
00103 }
00104
00105
00106 void CFilterSelectionDlg::DoDataExchange(CDataExchange* pDX)
00107 {
00108     CHHelpDialog::DoDataExchange(pDX);
00109     //{{AFX_DATA_MAP(CFilterSelectionDlg)
00110     DDX_Control(pDX, IDC_FILTER, m_filterCombo);
00111     DDX_Control(pDX, IDC_FILTER_CONTENTS, m_contentsCombo);
00112     DDX_CBString(pDX, IDC_FILTER, m_filterText);
00113     //}}AFX_DATA_MAP
00114
00115     if( pDX->m_bSaveAndValidate )
00116     {
00117         if( !m_filterText.IsEmpty() )
00118         {
00119             CMString* prevFilter = GetPrevFilter(m_columnIndex);
00120             if( prevFilter )
00121             {
00122                 prevFilter->Insert(m_filterText);
00123             }
00124         }
00125     }
00126     else
00127     {
00128         // Display only
00129         DDX_ComboMString(pDX, IDC_FILTER, m_filterCombo);
00130     }
00131 }
00132
00133
00134 BEGIN_MESSAGE_MAP(CFilterSelectionDlg, CHHelpDialog)
00135     //{{AFX_MSG_MAP(CFilterSelectionDlg)
00136     ON_CBN_SELCHANGE(IDC_FILTER_CONTENTS, OnSelchangeContentsCombo)
00137     ON_CBN_DBLCLK(IDC_FILTER, OnDblclkCombofilter)
00138     ON_BN_CLICKED(IDHELP, OnHelp)
00139     //}}AFX_MSG_MAP
00140 END_MESSAGE_MAP()
00141
00143 // CFilterSelectionDlg message handlers
00144
00146 BOOL CFilterSelectionDlg::OnInitDialog()
00147 {
00148     // Extra initialization
00149     CMString* prevFilter = GetPrevFilter(m_columnIndex);
00150     if( prevFilter )
00151     {
00152         m_filterCombo.SetItems(prevFilter);
00153     }
00154
00155     CHHelpDialog::OnInitDialog();
00156
00157     // Add the columns to the contents combo
00158     for(int index = 0; index != ColumnIndex::kEnd; index++)
00159     {
00160         const int item = m_contentsCombo.AddString(ColumnIndex::GetColumnName(index, false));
00161         if( item > -1  )
00162         {
00163             m_contentsCombo.SetItemData(item, (DWORD)index);
00164         }
00165     }
00166
00167     // Find and set the filter column
00168     for(int nIndex = 0; nIndex < m_contentsCombo.GetCount(); nIndex++)
00169     {
00170         if( m_contentsCombo.GetItemData(nIndex) == (DWORD)m_columnIndex )
00171         {
00172             m_contentsCombo.SetCurSel(nIndex);
00173             break;
00174         }
00175     }
00176
00177     // Select the item in the list
00178     const int itemIndex = m_filterCombo.FindStringExact(-1, m_filterText);
00179     if( itemIndex > -1 )
00180     {
00181         m_filterCombo.SetCurSel(itemIndex);
00182     }
00183
00184     // Set the dialog window title
00185     CString strTitle;
00186     strTitle.Format("Select %s Filter", ColumnIndex::GetColumnName(m_columnIndex, false));
00187     SetWindowText(strTitle);
00188
00189     return TRUE;  // return TRUE unless you set the focus to a control
00190                   // EXCEPTION: OCX Property Pages should return FALSE
00191 }
00192
00193 void CFilterSelectionDlg::InitHelpID()
00194 {
00195     SetCtrlHelpID(IDC_FILTER,           IDH_IDC_FILTER);
00196     SetCtrlHelpID(IDC_FILTER_CONTENTS,  IDH_IDC_FILTER_CONTENTS);
00197 }
00198
00200 void CFilterSelectionDlg::OnHelp()
00201 {
00202     ShowHelp();
00203 }
00204
00206 void CFilterSelectionDlg::OnSelchangeContentsCombo()
00207 {
00208     const int selection = m_contentsCombo.GetCurSel();
00209     if( selection > -1 )
00210     {
00211         // Store the filter text
00212         CString filterText;
00213         m_filterCombo.GetWindowText(filterText);
00214
00215         // Set the items
00216         const int columnIndex = (int)m_contentsCombo.GetItemData(selection);
00217         CMString* prevFilter = GetPrevFilter(columnIndex);
00218         if( prevFilter )
00219         {
00220             m_filterCombo.SetItems(prevFilter);
00221         }
00222
00223         UpdateData(FALSE);
00224
00225         // Restore the filter text and the selection
00226         m_filterCombo.SetWindowText(filterText);
00227
00228         const int itemIndex = m_filterCombo.FindStringExact(-1, filterText);
00229         if( itemIndex > -1 )
00230         {
00231             m_filterCombo.SetCurSel(itemIndex);
00232         }
00233     }
00234 }
00235
00237 void CFilterSelectionDlg::OnDblclkCombofilter()
00238 {
00239     OnOK();
00240 }
00241
00242 #endif  /* WIN32 */
00243
00250 bool CompatGetFilterSelection(const int columnIndex, CStr& filterText)
00251 {
00252     bool userHitOK = false;
00253
00254 #ifdef WIN32
00255     CFilterSelectionDlg filterSelection(columnIndex, filterText.c_str());
00256
00257     if( filterSelection.DoModal() == IDOK )
00258     {
00259         filterText = filterSelection.m_filterText;
00260
00261         userHitOK = true;
00262     }
00263 #endif /* WIN32 */
00264
00265 #ifdef qMacCvsPP
00266 #endif /* qMacCvsPP */
00267
00268 #if qUnix
00269 #endif // qUnix
00270
00271     return userHitOK;
00272 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJReBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJReBar.cpp

Go to the documentation of this file.
00001 // CJReBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new IE4 controls'
00007 // http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:49 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/CJLibrary/CJReBar.cpp $
00015  *
00016  * $History: CJReBar.cpp $
00017  *
00018  * *****************  Version 8  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/CJLibrary
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 7  *****************
00024  * User: Kirk Stowell Date: 7/31/99    Time: 4:26p
00025  * Updated in $/CodeJockey/CJLibrary
00026  *
00027  * *****************  Version 5  *****************
00028  * User: Kirk Stowell Date: 6/23/99    Time: 12:13a
00029  * Updated in $/CodeJockey/CJLibrary
00030  *
00031  * *****************  Version 4  *****************
00032  * User: Kirk Stowell Date: 7/25/99    Time: 12:51a
00033  * Updated in $/CodeJockey/CJLibrary
00034  *
00035  * *****************  Version 3  *****************
00036  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00037  * Updated in $/CodeJockey/CJLibrary
00038  *
00039  * *****************  Version 2  *****************
00040  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00041  * Updated in $/CodeJockey/CJLibrary
00042  *
00043  * *****************  Version 1  *****************
00044  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00045  * Created in $/CodeJockey/CJLibrary
00046  * Copied from MFC v6 and techno preview for v5. Added to extend
00047  * functionality to Visual C++ 5.0 users.
00048  *
00049  ***************************************************************************/
00051
00052 #include "stdafx.h"
00053 #include "CJReBar.h"
00054 #include "CJToolBar.h"
00055
00056 #ifdef _DEBUG
00057 #define new DEBUG_NEW
00058 #undef THIS_FILE
00059 static char THIS_FILE[] = __FILE__;
00060 #endif
00061
00062 #define _CjxGetDlgCtrlID(hWnd)          ((UINT)(WORD)::GetDlgCtrlID(hWnd))
00063
00064 static HWND _CjxChildWindowFromPoint(HWND hWnd, POINT pt)
00065 {
00066   ASSERT(hWnd != NULL);
00067
00068   // check child windows
00069   ::ClientToScreen(hWnd, &pt);
00070   HWND hWndChild = ::GetWindow(hWnd, GW_CHILD);
00071   for (; hWndChild != NULL; hWndChild = ::GetWindow(hWndChild, GW_HWNDNEXT))
00072   {
00073     if (_CjxGetDlgCtrlID(hWndChild) != (WORD)-1 &&
00074       (::GetWindowLong(hWndChild, GWL_STYLE) & WS_VISIBLE))
00075     {
00076       // see if point hits the child window
00077       CRect rect;
00078       ::GetWindowRect(hWndChild, rect);
00079       if (rect.PtInRect(pt))
00080         return hWndChild;
00081     }
00082   }
00083
00084   return NULL;    // not found
00085 }
00086
00088 // CCJReBar
00089
00090 BEGIN_MESSAGE_MAP(CCJReBar, CCJToolBarBase)
00091     //{{AFX_MSG_MAP(CCJReBar)
00092     ON_WM_NCCREATE()
00093     ON_WM_PAINT()
00094     ON_WM_NCCALCSIZE()
00095     ON_WM_ERASEBKGND()
00096     ON_WM_NCPAINT()
00097     ON_NOTIFY_REFLECT(RBN_HEIGHTCHANGE, OnHeightChange)
00098     ON_NOTIFY_REFLECT(RBN_ENDDRAG, OnHeightChange)
00099     ON_MESSAGE(RB_SHOWBAND, OnShowBand)
00100     ON_MESSAGE_VOID(WM_RECALCPARENT, OnRecalcParent)
00101     //}}AFX_MSG_MAP
00102 END_MESSAGE_MAP()
00103
00104 CCJReBar::CCJReBar()
00105 {
00106     SetBorders();
00107 }
00108
00109 void CCJReBar::OnRecalcParent()
00110 {
00111     CFrameWnd* pFrameWnd = GetParentFrame();
00112     ASSERT(pFrameWnd != NULL);
00113     pFrameWnd->RecalcLayout();
00114 }
00115
00116 void CCJReBar::OnHeightChange(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00117 {
00118     CFrameWnd* pFrameWnd = GetParentFrame();
00119     if (pFrameWnd != NULL)
00120         pFrameWnd->RecalcLayout();
00121     *pResult = 0;
00122 }
00123
00124 LRESULT CCJReBar::OnShowBand(WPARAM wParam, LPARAM)
00125 {
00126     LRESULT lResult = Default();
00127     if (lResult)
00128     {
00129         // keep window visible state in sync with band visible state
00130         REBARBANDINFO rbBand;
00131         rbBand.cbSize = sizeof(rbBand);
00132         rbBand.fMask = RBBIM_CHILD|RBBIM_STYLE;
00133         VERIFY(DefWindowProc(RB_GETBANDINFO, wParam, (LPARAM)&rbBand));
00134         CCJToolBarBase* pBar = DYNAMIC_DOWNCAST(CCJToolBarBase, CWnd::FromHandlePermanent(rbBand.hwndChild));
00135         BOOL bWindowVisible;
00136         if (pBar != NULL)
00137             bWindowVisible = pBar->IsVisible();
00138         else
00139             bWindowVisible =  (::GetWindowLong(rbBand.hwndChild, GWL_STYLE) & WS_VISIBLE) != 0;
00140         BOOL bBandVisible = (rbBand.fStyle & RBBS_HIDDEN) == 0;
00141         if (bWindowVisible != bBandVisible)
00142             VERIFY(::ShowWindow(rbBand.hwndChild, bBandVisible ? SW_SHOW : SW_HIDE));
00143     }
00144     return lResult;
00145 }
00146
00147 BOOL CCJReBar::_AddBar(CWnd* pBar, REBARBANDINFO* pRBBI)
00148 {
00149     ASSERT_VALID(this);
00150     ASSERT(::IsWindow(m_hWnd));
00151     ASSERT(pBar != NULL);
00152     ASSERT(::IsWindow(pBar->m_hWnd));
00153
00154     pRBBI->cbSize = sizeof(REBARBANDINFO);
00155     pRBBI->fMask |= RBBIM_CHILD | RBBIM_CHILDSIZE;
00156     pRBBI->hwndChild = pBar->m_hWnd;
00157
00158     CSize size;
00159     CCJToolBarBase* pTemp = DYNAMIC_DOWNCAST(CCJToolBarBase, pBar);
00160     if (pTemp != NULL)
00161     {
00162         pTemp->m_bInReBar = true;
00163         size = pTemp->CalcFixedLayout(FALSE, m_dwStyle & CBRS_ORIENT_HORZ);
00164     }
00165     else
00166     {
00167         CRect rect;
00168         pBar->GetWindowRect(&rect);
00169         size = rect.Size();
00170     }
00171     //WINBUG: COMCTL32.DLL is off by 4 pixels in its sizing logic.  Whatever
00172     //  is specified as the minimum size, the system rebar will allow that band
00173     //  to be 4 actual pixels smaller!  That's why we add 4 to the size here.
00174     pRBBI->cxMinChild = size.cx + 4;
00175     pRBBI->cyMinChild = size.cy;
00176     BOOL bResult = (BOOL)DefWindowProc(RB_INSERTBAND, (WPARAM)-1, (LPARAM)pRBBI);
00177
00178     CFrameWnd* pFrameWnd = GetParentFrame();
00179     if (pFrameWnd != NULL)
00180         pFrameWnd->RecalcLayout();
00181
00182     return bResult;
00183 }
00184
00185 BOOL CCJReBar::AddBar(CWnd* pBar, LPCTSTR pszText, CBitmap* pbmp, DWORD dwStyle)
00186 {
00187     REBARBANDINFO rbBand;
00188     rbBand.fMask = RBBIM_STYLE;
00189     rbBand.fStyle = dwStyle;
00190     if (pszText != NULL)
00191     {
00192         rbBand.fMask |= RBBIM_TEXT;
00193         rbBand.lpText = const_cast<LPTSTR>(pszText);
00194     }
00195     if (pbmp != NULL)
00196     {
00197         rbBand.fMask |= RBBIM_BACKGROUND;
00198         rbBand.hbmBack = (HBITMAP)*pbmp;
00199     }
00200     return _AddBar(pBar, &rbBand);
00201 }
00202
00203 BOOL CCJReBar::AddBar(CWnd* pBar, COLORREF clrFore, COLORREF clrBack, LPCTSTR pszText, DWORD dwStyle)
00204 {
00205     REBARBANDINFO rbBand;
00206     rbBand.fMask = RBBIM_STYLE | RBBIM_COLORS;
00207     rbBand.fStyle = dwStyle;
00208     rbBand.clrFore = clrFore;
00209     rbBand.clrBack = clrBack;
00210     if (pszText != NULL)
00211     {
00212         rbBand.fMask |= RBBIM_TEXT;
00213         rbBand.lpText = const_cast<LPTSTR>(pszText);
00214     }
00215     return _AddBar(pBar, &rbBand);
00216 }
00217
00218 CSize CCJReBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
00219 {
00220     ASSERT_VALID(this);
00221     ASSERT(::IsWindow(m_hWnd));
00222
00223     // the union of the band rectangles is the total bounding rect
00224     int nCount = DefWindowProc(RB_GETBANDCOUNT, 0, 0);
00225     REBARBANDINFO rbBand;
00226     rbBand.cbSize = sizeof(rbBand);
00227     int nTemp;
00228
00229     // sync up hidden state of the bands
00230     for (nTemp = nCount; nTemp--; )
00231     {
00232         rbBand.fMask = RBBIM_CHILD|RBBIM_STYLE;
00233         VERIFY(DefWindowProc(RB_GETBANDINFO, nTemp, (LPARAM)&rbBand));
00234         CCJToolBarBase* pBar = DYNAMIC_DOWNCAST(CCJToolBarBase, CWnd::FromHandlePermanent(rbBand.hwndChild));
00235         BOOL bWindowVisible;
00236         if (pBar != NULL)
00237             bWindowVisible = pBar->IsVisible();
00238         else
00239             bWindowVisible =  (::GetWindowLong(rbBand.hwndChild, GWL_STYLE) & WS_VISIBLE) != 0;
00240         BOOL bBandVisible = (rbBand.fStyle & RBBS_HIDDEN) == 0;
00241         if (bWindowVisible != bBandVisible)
00242             VERIFY(DefWindowProc(RB_SHOWBAND, nTemp, bWindowVisible));
00243     }
00244
00245     // determine bounding rect of all visible bands
00246     CRect rectBound; rectBound.SetRectEmpty();
00247     for (nTemp = nCount; nTemp--; )
00248     {
00249         rbBand.fMask = RBBIM_STYLE;
00250         VERIFY(DefWindowProc(RB_GETBANDINFO, nTemp, (LPARAM)&rbBand));
00251         if ((rbBand.fStyle & RBBS_HIDDEN) == 0)
00252         {
00253             CRect rect;
00254             VERIFY(DefWindowProc(RB_GETRECT, nTemp, (LPARAM)&rect));
00255             rectBound |= rect;
00256         }
00257     }
00258
00259     // add borders as part of bounding rect
00260     if (!rectBound.IsRectEmpty())
00261     {
00262         CRect rect; rect.SetRectEmpty();
00263         CalcInsideRect(rect, bHorz);
00264         rectBound.right -= rect.Width();
00265         rectBound.bottom -= rect.Height();
00266     }
00267
00268     return CSize((bHorz && bStretch) ? 32767 : rectBound.Width(),
00269         (!bHorz && bStretch) ? 32767 : rectBound.Height());
00270 }
00271
00272 CSize CCJReBar::CalcDynamicLayout(int /*nLength*/, DWORD dwMode)
00273 {
00274     if (dwMode & LM_HORZDOCK)
00275         ASSERT(dwMode & LM_HORZ);
00276     return CalcFixedLayout(dwMode & LM_STRETCH, dwMode & LM_HORZ);
00277 }
00278
00279 BOOL CCJReBar::Create(CWnd* pParentWnd, DWORD dwCtrlStyle, DWORD dwStyle, UINT nID)
00280 {
00281     ASSERT_VALID(pParentWnd);   // must have a parent
00282     ASSERT (!((dwStyle & CBRS_SIZE_FIXED) && (dwStyle & CBRS_SIZE_DYNAMIC)));
00283
00284     // save the style
00285     m_dwStyle = (dwStyle & CBRS_ALL);
00286     if (nID == AFX_IDW_REBAR)
00287         m_dwStyle |= CBRS_HIDE_INPLACE;
00288
00289     dwStyle &= ~CBRS_ALL;
00290     dwStyle |= CCS_NOPARENTALIGN|CCS_NOMOVEY|CCS_NODIVIDER|CCS_NORESIZE|RBS_VARHEIGHT;
00291     dwStyle |= dwCtrlStyle;
00292
00293     // initialize common controls
00294 #if _MSC_VER >= 1200
00295     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_COOL_REG));
00296 #else
00297     INITCOMMONCONTROLSEX icex;
00298     icex.dwSize = sizeof(icex);
00299     icex.dwICC = ICC_COOL_CLASSES;
00300     VERIFY(InitCommonControlsEx(&icex));
00301 #endif
00302
00303     _GetComCtlVersion();
00304     ASSERT(_ComCtlVersion != -1);
00305
00306     // create the HWND
00307     CRect rect; rect.SetRectEmpty();
00308     if (!CWnd::Create(REBARCLASSNAME, NULL, dwStyle, rect, pParentWnd, nID))
00309         return FALSE;
00310
00311     // Note: Parent must resize itself for control bar to be resized
00312     m_bInReBar = true;
00313
00314     return TRUE;
00315 }
00316
00317 void CCJReBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHandler)
00318 {
00319     UpdateDialogControls(pTarget, bDisableIfNoHandler);
00320 }
00321
00322 BOOL CCJReBar::OnNcCreate(LPCREATESTRUCT lpCreateStruct)
00323 {
00324     if (!CCJToolBarBase::OnNcCreate(lpCreateStruct))
00325         return FALSE;
00326
00327     // if the owner was set before the rebar was created, set it now
00328     if (m_hWndOwner != NULL)
00329         DefWindowProc(RB_SETPARENT, (WPARAM)m_hWndOwner, 0);
00330
00331     return TRUE;
00332 }
00333
00334 BOOL CCJReBar::OnEraseBkgnd(CDC*)
00335 {
00336     return (BOOL)Default();
00337 }
00338
00339 void CCJReBar::OnNcCalcSize(BOOL /*bCalcValidRects*/, NCCALCSIZE_PARAMS* lpncsp)
00340 {
00341     // calculate border space (will add to top/bottom, subtract from right/bottom)
00342     CRect rect; rect.SetRectEmpty();
00343     BOOL bHorz = (m_dwStyle & CBRS_ORIENT_HORZ) != 0;
00344     CCJToolBarBase::CalcInsideRect(rect, bHorz);
00345
00346     // adjust non-client area for border space
00347     lpncsp->rgrc[0].left += rect.left;
00348     lpncsp->rgrc[0].top += rect.top;
00349     lpncsp->rgrc[0].right += rect.right;
00350     lpncsp->rgrc[0].bottom += rect.bottom;
00351 }
00352
00353 void CCJReBar::OnNcPaint()
00354 {
00355     EraseNonClient();
00356 }
00357
00358 void CCJReBar::OnPaint()
00359 {
00360     Default();
00361 }
00362
00363 int CCJReBar::OnToolHitTest(CPoint point, TOOLINFO* pTI) const
00364 {
00365     ASSERT_VALID(this);
00366     ASSERT(::IsWindow(m_hWnd));
00367
00368     HWND hWndChild = _CjxChildWindowFromPoint(m_hWnd, point);
00369     CWnd* pWnd = CWnd::FromHandlePermanent(hWndChild);
00370     if (pWnd == NULL)
00371         return CCJToolBarBase::OnToolHitTest(point, pTI);
00372
00373     ASSERT(pWnd->m_hWnd == hWndChild);
00374     return pWnd->OnToolHitTest(point, pTI);
00375 }
00376
00377 LRESULT CCJReBar::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
00378 {
00379     // special handling for certain messages (forwarding to owner/parent)
00380     switch (message)
00381     {
00382     case WM_POPMESSAGESTRING:
00383     case WM_SETMESSAGESTRING:
00384         return GetOwner()->SendMessage(message, wParam, lParam);
00385     }
00386     return CCJToolBarBase::WindowProc(message, wParam, lParam);
00387 }
00388
00389 #ifdef AFX_INIT_SEG
00390 #pragma code_seg(AFX_INIT_SEG)
00391 #endif
00392
00393 IMPLEMENT_DYNAMIC(CCJReBar, CCJToolBarBase)
00394
00395
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJToolBarCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJToolBarCtrl.cpp

Go to the documentation of this file.
00001 // CJToolBarCtrl.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new IE4 controls'
00007 // http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:49 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/CJLibrary/CJToolBarCtrl.cpp $
00015  *
00016  * $History: CJToolBarCtrl.cpp $
00017  *
00018  * *****************  Version 5  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/CJLibrary
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 4  *****************
00024  * User: Kirk Stowell Date: 7/28/99    Time: 12:38a
00025  * Updated in $/CodeJockey/CJLibrary
00026  * Final pass for release 6.08.
00027  *
00028  * *****************  Version 3  *****************
00029  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00030  * Updated in $/CodeJockey/CJLibrary
00031  *
00032  * *****************  Version 2  *****************
00033  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00034  * Updated in $/CodeJockey/CJLibrary
00035  *
00036  * *****************  Version 1  *****************
00037  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00038  * Created in $/CodeJockey/CJLibrary
00039  * Copied from MFC v6 and techno preview for v5. Added to extend
00040  * functionality to Visual C++ 5.0 users.
00041  *
00042  ***************************************************************************/
00043
00044 #include "stdafx.h"
00045 #include "CJToolBarCtrl.h"
00046
00047 #ifdef _DEBUG
00048 #define new DEBUG_NEW
00049 #undef THIS_FILE
00050 static char THIS_FILE[] = __FILE__;
00051 #endif
00052
00054 // CCJToolBarCtrl
00055
00056 CCJToolBarCtrl::~CCJToolBarCtrl()
00057 {
00058   DestroyWindow();
00059 }
00060
00061
00062 BEGIN_MESSAGE_MAP(CCJToolBarCtrl, CToolBarCtrl)
00063   //{{AFX_MSG_MAP(CCJToolBarCtrl)
00064   ON_WM_CREATE()
00065   //}}AFX_MSG_MAP
00066 END_MESSAGE_MAP()
00067
00069 // CCJToolBarCtrl message handlers
00070
00071 CCJToolBarCtrl::CCJToolBarCtrl()
00072 {
00073   // initialize common controls
00074   INITCOMMONCONTROLSEX icex;
00075   icex.dwSize = sizeof(icex);
00076   icex.dwICC = ICC_BAR_CLASSES;
00077   VERIFY(InitCommonControlsEx(&icex));
00078 }
00079
00080 BOOL CCJToolBarCtrl::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd,
00081                             UINT nID)
00082 {
00083   CWnd* pWnd = this;
00084   BOOL bCreated = pWnd->Create(TOOLBARCLASSNAME, NULL, dwStyle, rect, pParentWnd, nID);
00085
00086   return bCreated;
00087 }
00088
00089 int CCJToolBarCtrl::OnCreate(LPCREATESTRUCT lpcs)
00090 {
00091   if (CWnd::OnCreate(lpcs) == -1)
00092     return -1;
00093   SetButtonStructSize(sizeof(TBBUTTON));
00094   return 0;
00095 }
00096
00097 HRESULT CCJToolBarCtrl::GetDropTarget(IDropTarget** ppDropTarget) const
00098 {
00099   ASSERT(::IsWindow(m_hWnd));
00100   ASSERT(ppDropTarget);
00101   return (HRESULT) ::SendMessage(m_hWnd, TB_GETOBJECT, (WPARAM)&IID_IDropTarget, (LPARAM)ppDropTarget);
00102 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

LPseudoDrawAttachment Member List

This is the complete list of members for LPseudoDrawAttachment, including all inherited members.

ExecuteSelf(MessageT inMessage, void *ioParam) | LPseudoDrawAttachment | [protected, virtual]
LPseudoDrawAttachment(int widid, int cmdid) | LPseudoDrawAttachment |
m_cmdid | LPseudoDrawAttachment | [protected]
m_widid | LPseudoDrawAttachment | [protected]
~LPseudoDrawAttachment() | LPseudoDrawAttachment | [virtual]

Generated on Sat Aug 7 22:54:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSortList< T > Member List

This is the complete list of members for CSortList< T >, including all inherited members.

CSortList(int def_size, QsortMethod method_sort) | CSortList< T > | [inline]
Delete(const T &entry) | CSortList< T > | [inline]
Entry(int num_elem) const | CSortList< T > | [inline, private]
fDef | CSortList< T > | [private]
fElems | CSortList< T > | [private]
fMax | CSortList< T > | [private]
fMethod | CSortList< T > | [private]
fNewOne | CSortList< T > | [private]
fNum | CSortList< T > | [private]
Get(int index) const | CSortList< T > | [inline]
Insert(const T &entry, bool replaceIfAlreadyExists=false) | CSortList< T > | [inline]
Inside(const T &entry, int *indexptr=0L) const | CSortList< T > | [inline]
InsideAndInsert(const T &entry, int *indexptr=0L, bool replaceIfAlreadyExists=false) | CSortList< T > | [inline]
Location(const T &entry) | CSortList< T > | [inline, private]
NumOfElements(void) | CSortList< T > | [inline]
QsortMethod typedef | CSortList< T > |
Reset(void) | CSortList< T > | [inline]
Result(int *num_elem) | CSortList< T > | [inline]
~CSortList() | CSortList< T > | [inline]

Generated on Sat Aug 7 22:56:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMenuBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJMenuBar.cpp

Go to the documentation of this file.
00001 // CJMenuBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the code written by Paul DiLascia for MSJ.
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:49 $
00011  * $Revision: 1.1.1.3 $
00012  * $Archive: /CodeJock/CJLibrary/CJMenuBar.cpp $
00013  *
00014  * $History: CJMenuBar.cpp $
00015  *
00016  * *****************  Version 11  *****************
00017  * User: Kirk Stowell Date: 10/24/99   Time: 9:12p
00018  * Updated in $/CodeJock/CJLibrary
00019  * Fixed potential resource and memory leak problems.
00020  *
00021  * *****************  Version 10  *****************
00022  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00023  * Updated in $/CodeJockey/CJLibrary
00024  * Updated copyright and contact information.
00025  *
00026  * *****************  Version 9  *****************
00027  * User: Kirk Stowell Date: 8/29/99    Time: 9:36p
00028  * Updated in $/CodeJockey/CJLibrary
00029  * Fixed bug with left arrow tracking - Tim Lewis <timlewis@home.com>
00030  *
00031  * *****************  Version 8  *****************
00032  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00033  * Updated in $/CodeJockey/CJLibrary
00034  * Added Unicode compliance, thanks to Barry Burton for his help with
00035  * this.
00036  *
00037  *
00038  * *****************  Version 7  *****************
00039  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00040  * Updated in $/CodeJockey/CJLibrary
00041  *
00042  * *****************  Version 6  *****************
00043  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00044  * Updated in $/CodeJockey/CJLibrary
00045  *
00046  * *****************  Version 5  *****************
00047  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00048  * Updated in $/CodeJockey/CJLibrary
00049  *
00050  * *****************  Version 4  *****************
00051  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00052  * Updated in $/CodeJockey/CJLibrary
00053  *
00054  * *****************  Version 3  *****************
00055  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00056  * Updated in $/CodeJockey/CJLibrary
00057  *
00058  * *****************  Version 2  *****************
00059  * User: Kirk Stowell Date: 7/18/99    Time: 10:28p
00060  * Updated in $/CodeJockey/CJLibrary
00061  * Further cleanup to handle CCJMenu class.
00062  *
00063  * *****************  Version 1  *****************
00064  * User: Kirk Stowell Date: 7/15/99    Time: 12:34a
00065  * Created in $/CodeJockey/CJLibrary
00066  * Initial creation. Extended the original class written by Paul DiLascia
00067  * for MSJ. Class uses CCJMenu and fixes some bugs with the original
00068  * class.
00069  *
00070  ***************************************************************************/
00072
00073 #include "stdafx.h"
00074 #include "CJMenuBar.h"
00075 #include "CJMenu.h"        // CCJMenu class declaration
00076
00077 #ifdef _DEBUG
00078 #define new DEBUG_NEW
00079 #undef THIS_FILE
00080 static char THIS_FILE[] = __FILE__;
00081 #endif
00082
00084 // CCJMenuBar
00085
00086 CCJMenuBar::CCJMenuBar()
00087 {
00088     m_iTrackingState        = TRACK_NONE;   // initial state: not tracking
00089     m_iPopupTracking        = -1;
00090     m_iNewPopup             = -1;           // invalid
00091     m_bAutoRemoveFrameMenu  = TRUE;         // set frame's menu to NULL
00092 }
00093
00094 CCJMenuBar::~CCJMenuBar()
00095 {
00096     // fix potential resource leak - KStowell - 10-15-99
00097     m_Font.DeleteObject();
00098 }
00099
00100 IMPLEMENT_DYNAMIC(CCJMenuBar, CCJToolBar)
00101
00102 BEGIN_MESSAGE_MAP(CCJMenuBar, CCJToolBar)
00103     //{{AFX_MSG_MAP(CCJMenuBar)
00104     ON_WM_LBUTTONDOWN()
00105     ON_WM_MOUSEMOVE()
00106     ON_WM_SIZE()
00107     ON_UPDATE_COMMAND_UI_RANGE(0, 256, OnUpdateMenuButton)
00108     //}}AFX_MSG_MAP
00109 END_MESSAGE_MAP()
00110
00111 BOOL CCJMenuBar::Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID)
00112 {
00113     return CreateEx(pParentWnd, NULL, dwStyle,
00114         CRect(m_cxLeftBorder, m_cyTopBorder, m_cxRightBorder, m_cyBottomBorder), nID);
00115 }
00116
00117 BOOL CCJMenuBar::CreateEx(CWnd* pParentWnd, DWORD dwCtrlStyle, DWORD dwStyle, CRect rcBorders, UINT nID)
00118 {
00119     if( !CCJToolBar::CreateEx( pParentWnd, dwCtrlStyle, dwStyle, rcBorders, nID))
00120         return FALSE;
00121
00122     UpdateFont();
00123     m_frameHook.Install(this, *pParentWnd);
00124
00125     SetWindowText(_T("Menu Bar"));
00126     return TRUE;
00127 }
00128
00130 // CCJMenuBar message handlers
00131 CSize CCJMenuBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
00132 {
00133     if( m_bInReBar ) {
00134         return CCJToolBar::CalcFixedLayout(bStretch, bHorz);
00135     }
00136
00137     else
00138     {
00139         CSize size = CCJToolBar::CalcFixedLayout(bStretch, bHorz);
00140         CRect rcClient;
00141         GetParentFrame()->GetClientRect(&rcClient);
00142
00143         if( bHorz ) {
00144             size.cx = rcClient.Width();
00145         }
00146         else {
00147             size.cy = rcClient.Height();
00148         }
00149
00150         return size;
00151     }
00152 }
00153
00155 // Set menu bar font from current system menu font
00156 //
00157 void CCJMenuBar::UpdateFont()
00158 {
00159     m_Font.DeleteObject();
00160     NONCLIENTMETRICS ncm;
00161     ncm.cbSize = sizeof(ncm);
00162     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00163     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMenuFont));
00164     SetFont(&m_Font);
00165 }
00166
00168 // The reason for having this is so MFC won't automatically disable
00169 // the menu buttons. Assumes < 256 top-level menu items. The ID of
00170 // the ith menu button is i. IOW, the index and ID are the same.
00171 //
00172 void CCJMenuBar::OnUpdateMenuButton(CCmdUI* pCmdUI)
00173 {
00174     ASSERT_VALID(this);
00175     if (IsValidButton(pCmdUI->m_nID))
00176         pCmdUI->Enable(TRUE);
00177 }
00178
00180 // Recompute layout of menu bar
00181 //
00182 void CCJMenuBar::RecomputeMenuLayout()
00183 {
00184     SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE |
00185         SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
00186 }
00187
00189 // Make frame recalculate control bar sizes after menu change
00190 //
00191 void CCJMenuBar::RecomputeToolbarSize()
00192 {
00193     // Force toolbar to recompute size
00194     CFrameWnd* pFrame = (CFrameWnd*)GetParentFrame();
00195     ASSERT_VALID(pFrame);
00196     ASSERT(pFrame->IsFrameWnd());
00197     pFrame->RecalcLayout();
00198
00199     // floating frame
00200     pFrame = GetParentFrame();
00201     if (pFrame->IsKindOf(RUNTIME_CLASS(CMiniFrameWnd)))
00202         pFrame->RecalcLayout();
00203 }
00204
00206 // Set tracking state: none, button, or popup
00207 //
00208 void CCJMenuBar::SetTrackingState(TRACKINGSTATE iState, int iButton)
00209 {
00210     ASSERT_VALID(this);
00211     if (iState != m_iTrackingState) {
00212         if (iState == TRACK_NONE)
00213             iButton = -1;
00214
00215         SetHotItem(iButton);                     // could be none (-1)
00216
00217         if (iState==TRACK_POPUP) {
00218             // set related state stuff
00219             m_bEscapeWasPressed = FALSE;     // assume Esc key not pressed
00220             m_bProcessRightArrow =           // assume left/right arrow..
00221                 m_bProcessLeftArrow = TRUE; // ..will move to prev/next popup
00222             m_iPopupTracking = iButton;  // which popup I'm tracking
00223         }
00224         m_iTrackingState = iState;
00225     }
00226 }
00227
00229 // Toggle state from home state to button-tracking and back
00230 //
00231 void CCJMenuBar::ToggleTrackButtonMode()
00232 {
00233     ASSERT_VALID(this);
00234     if (m_iTrackingState == TRACK_NONE || m_iTrackingState == TRACK_BUTTON) {
00235         SetTrackingState(m_iTrackingState == TRACK_NONE ?
00236             TRACK_BUTTON : TRACK_NONE, 0);
00237     }
00238 }
00239
00241 // Get button index before/after a given button
00242 //
00243 int CCJMenuBar::GetNextOrPrevButton(int iButton, BOOL bPrev)
00244 {
00245     ASSERT_VALID(this);
00246     if (bPrev) {
00247         iButton--;
00248         if (iButton <0)
00249             iButton = GetButtonCount() - 1;
00250     } else {
00251         iButton++;
00252         if (iButton >= GetButtonCount())
00253             iButton = 0;
00254     }
00255     return iButton;
00256 }
00257
00259 // This is to correct a bug in the system toolbar control: TB_HITTEST only
00260 // looks at the buttons, not the size of the window. So it returns a button
00261 // hit even if that button is totally outside the size of the window!
00262 //
00263 int CCJMenuBar::HitTest(CPoint p) const
00264 {
00265     int iHit = CCJToolBar::HitTest(p);
00266     if (iHit>0) {
00267         CRect rc;
00268         GetClientRect(&rc);
00269         if (!rc.PtInRect(p)) // if point is outside window
00270             iHit = -1;          // can't be a hit!
00271     }
00272     return iHit;
00273 }
00274
00276 // Load menu from resource
00277 //
00278
00279 BOOL CCJMenuBar::LoadMenu(UINT nID)
00280 {
00281     CFrameWnd* pFrame = GetParentFrame();
00282     ASSERT_VALID(pFrame);
00283
00284     pFrame->GetMenu()->DestroyMenu();
00285     pFrame->SetMenu(NULL);
00286
00287     CMenu menu;
00288     menu.LoadMenu(nID);
00289     m_nMenuID = nID;
00290
00291     // delete existing buttons
00292     int nCount = GetButtonCount();
00293     while (nCount--) {
00294         VERIFY(DeleteButton(0));
00295     }
00296
00297     DWORD dwStyle = GetStyle();
00298     BOOL bModifyStyle = ModifyStyle(0, TBSTYLE_FLAT|TBSTYLE_TRANSPARENT);
00299
00300     SetImageList(NULL);
00301     UINT nMenuItems = menu.GetMenuItemCount();
00302
00303     for( UINT i = 0; i < nMenuItems; i++ )
00304     {
00305         CString strName;
00306         if( menu.GetMenuString(i, strName, MF_BYPOSITION ))
00307         {
00308             TBBUTTON tbb;
00309             memset( &tbb, 0, sizeof( TBBUTTON ));
00310             tbb.idCommand = menu.GetMenuItemID(i);
00311
00312             // Because the toolbar is too brain-damaged to know if it already has
00313             // a string, and is also too brain-dead to even let you delete strings,
00314             // I have to determine if each string has been added already. Otherwise
00315             // in a MDI app, as the menus are repeatedly switched between doc and
00316             // no-doc menus, I will keep adding strings until somebody runs out of
00317             // memory. Sheesh!
00318             //
00319             int iString = -1;
00320             for (int j=0; j<m_arStrings.GetSize(); j++) {
00321                 if (m_arStrings[j] == strName) {
00322                     iString = j; // found it
00323                     break;
00324                 }
00325             }
00326             if (iString <0) {
00327                 // string not found: add it
00328                 iString = AddStrings(strName);
00329                 m_arStrings.SetAtGrow(iString, strName);
00330             }
00331
00332             tbb.iString = iString;
00333             tbb.fsState = TBSTATE_ENABLED;
00334             tbb.fsStyle = TBSTYLE_AUTOSIZE;
00335             tbb.iBitmap = -1;
00336             tbb.idCommand = i;
00337             VERIFY(AddButtons(1, &tbb));
00338         }
00339     }
00340
00341     if( bModifyStyle ) {
00342         SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
00343     }
00344
00345     if( ::IsMenu( menu )) {
00346         AutoSize();                              // size buttons
00347         RecomputeToolbarSize();              // and menubar itself
00348     }
00349
00350     menu.DestroyMenu();
00351     return TRUE;
00352 }
00353
00355 // Handle mouse click: if clicked on button, press it
00356 // and go into main menu loop.
00357 //
00358 void CCJMenuBar::OnLButtonDown(UINT nFlags, CPoint pt)
00359 {
00360     ASSERT_VALID(this);
00361     int iButton = HitTest(pt);
00362     if (iButton >= 0 && iButton<GetButtonCount()) // if mouse is over a button:
00363         TrackPopup(iButton);                                 //   track it
00364     else                                                         // otherwise:
00365         CCJToolBar::OnLButtonDown(nFlags, pt);   //   pass it on...
00366 }
00367
00369 // Handle mouse movement
00370 //
00371 void CCJMenuBar::OnMouseMove(UINT nFlags, CPoint pt)
00372 {
00373     ASSERT_VALID(this);
00374
00375     if (m_iTrackingState==TRACK_BUTTON) {
00376
00377         // In button-tracking state, ignore mouse-over to non-button area.
00378         // Normally, the toolbar would de-select the hot item in this case.
00379         //
00380         // Only change the hot item if the mouse has actually moved.
00381         // This is necessary to avoid a bug where the user moves to a different
00382         // button from the one the mouse is over, and presses arrow-down to get
00383         // the menu, then Esc to cancel it. Without this code, the button will
00384         // jump to wherever the mouse is--not right.
00385
00386         int iHot = HitTest(pt);
00387         if (IsValidButton(iHot) && pt != m_ptMouse)
00388             SetHotItem(iHot);
00389         return;          // don't let toolbar get it
00390     }
00391     m_ptMouse = pt; // remember point
00392     CCJToolBar::OnMouseMove(nFlags, pt);
00393 }
00394
00396 // Window was resized: need to recompute layout
00397 //
00398 void CCJMenuBar::OnSize(UINT nType, int cx, int cy)
00399 {
00400     CCJToolBar::OnSize(nType, cx, cy);
00401     RecomputeMenuLayout();
00402 }
00403
00405 // Bar style changed: eg, moved from left to right dock or floating
00406 //
00407 void CCJMenuBar::OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle)
00408 {
00409     CCJToolBar::OnBarStyleChange(dwOldStyle, dwNewStyle);
00410     RecomputeMenuLayout();
00411 }
00412
00414 // When user selects a new menu item, note whether it has a submenu
00415 // and/or parent menu, so I know whether right/left arrow should
00416 // move to the next popup.
00417 //
00418 void CCJMenuBar::OnMenuSelect(HMENU hmenu, UINT iItem)
00419 {
00420     if (m_iTrackingState > 0) {
00421         // process right-arrow if item is NOT a submenu
00422         m_bProcessRightArrow = (::GetSubMenu(hmenu, iItem) == NULL);
00423         // process left-arrow if curent menu is one I'm tracking
00424         m_bProcessLeftArrow = TRUE;
00425     }
00426 }
00427
00428 // globals--yuk! But no other way using windows hooks.
00429 //
00430 static CCJMenuBar*  g_pMenuBar = NULL;
00431 static HHOOK        g_hMsgHook = NULL;
00432
00434 // Menu filter hook just passes to virtual CCJMenuBar function
00435 //
00436 LRESULT CALLBACK
00437 CCJMenuBar::MenuInputFilter(int code, WPARAM wp, LPARAM lp)
00438 {
00439     return (code==MSGF_MENU && g_pMenuBar &&
00440         g_pMenuBar->OnMenuInput(*((MSG*)lp))) ? TRUE
00441         : CallNextHookEx(g_hMsgHook, code, wp, lp);
00442 }
00443
00445 // Handle menu input event: Look for left/right to change popup menu,
00446 // mouse movement over over a different menu button for "hot" popup effect.
00447 // Returns TRUE if message handled (to eat it).
00448 //
00449 BOOL CCJMenuBar::OnMenuInput(MSG& m)
00450 {
00451     ASSERT_VALID(this);
00452     ASSERT(m_iTrackingState == TRACK_POPUP); // sanity check
00453     int msg = m.message;
00454
00455     if (msg==WM_KEYDOWN) {
00456         // handle left/right-arow.
00457         TCHAR vkey = static_cast<TCHAR>(m.wParam);
00458
00459         if ((vkey == VK_LEFT  && m_bProcessLeftArrow) ||
00460             (vkey == VK_RIGHT && m_bProcessRightArrow)) {
00461
00462             CancelMenuAndTrackNewOne(
00463                 GetNextOrPrevButton(m_iPopupTracking, vkey==VK_LEFT));
00464             return TRUE; // eat it
00465
00466         } else if (vkey == VK_ESCAPE) {
00467             m_bEscapeWasPressed = TRUE;  // (menu will abort itself)
00468         }
00469
00470     } else if (msg==WM_MOUSEMOVE || msg==WM_LBUTTONDOWN) {
00471         // handle mouse move or click
00472         CPoint pt = m.lParam;
00473         ScreenToClient(&pt);
00474
00475         if (msg == WM_MOUSEMOVE) {
00476             if (pt != m_ptMouse) {
00477                 int iButton = HitTest(pt);
00478                 if (IsValidButton(iButton) && iButton != m_iPopupTracking) {
00479                     // user moved mouse over a different button: track its popup
00480                     CancelMenuAndTrackNewOne(iButton);
00481                 }
00482                 m_ptMouse = pt;
00483             }
00484
00485         } else if (msg == WM_LBUTTONDOWN) {
00486             if (HitTest(pt) == m_iPopupTracking) {
00487                 // user clicked on same button I am tracking: cancel menu
00488                 CancelMenuAndTrackNewOne(-1);
00489                 return TRUE; // eat it
00490             }
00491         }
00492     }
00493     return FALSE; // not handled
00494 }
00495
00497 // Cancel the current popup menu by posting WM_CANCELMODE, and track a new
00498 // menu. iNewPopup is which new popup to track (-1 to quit).
00499 //
00500 void CCJMenuBar::CancelMenuAndTrackNewOne(int iNewPopup)
00501 {
00502     ASSERT_VALID(this);
00503     if (iNewPopup != m_iPopupTracking) {
00504         GetParentFrame()->PostMessage(WM_CANCELMODE); // quit menu loop
00505         m_iNewPopup = iNewPopup;                     // go to this popup (-1 = quit)
00506     }
00507 }
00508
00510 // Track the popup submenu associated with the i'th button in the menu bar.
00511 // This fn actually goes into a loop, tracking different menus until the user
00512 // selects a command or exits the menu.
00513 //
00514 void CCJMenuBar::TrackPopup(int iButton)
00515 {
00516     ASSERT_VALID(this);
00517
00518     m_popupMenu.LoadMenu(m_nMenuID);
00519     m_popupMenu.LoadToolbar(m_nMenuID);
00520     ASSERT(::IsMenu(m_popupMenu));
00521
00522     while (iButton >= 0) {                   // while user selects another menu
00523
00524         m_iNewPopup = -1;                        // assume quit after this
00525         PressButton(iButton, TRUE);      // press the button
00526         UpdateWindow();                      // and force repaint now
00527
00528         // post a simulated arrow-down into the message stream
00529         // so TrackPopupMenu will read it and move to the first item
00530         GetParentFrame()->PostMessage(WM_KEYDOWN, VK_DOWN, 1);
00531         GetParentFrame()->PostMessage(WM_KEYUP, VK_DOWN, 1);
00532
00533         SetTrackingState(TRACK_POPUP, iButton); // enter tracking state
00534
00535         // Need to install a hook to trap menu input in order to make
00536         // left/right-arrow keys and "hot" mouse tracking work.
00537         //
00538         ASSERT(g_pMenuBar == NULL);
00539         g_pMenuBar = this;
00540         ASSERT(g_hMsgHook == NULL);
00541         g_hMsgHook = SetWindowsHookEx(WH_MSGFILTER,
00542             MenuInputFilter, NULL, ::GetCurrentThreadId());
00543
00544         // get submenu and display it beneath button
00545         TPMPARAMS tpm;
00546         CRect rcButton;
00547         GetRect(iButton, rcButton);
00548         ClientToScreen(&rcButton);
00549         CPoint pt = ComputeMenuTrackPoint(rcButton, tpm);
00550
00551         CCJMenu* pPopupMenu = (CCJMenu*)m_popupMenu.GetSubMenu(iButton);
00552         pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,
00553             pt.x, pt.y, GetParentFrame());
00554
00555         // uninstall hook.
00556         ::UnhookWindowsHookEx(g_hMsgHook);
00557         g_hMsgHook = NULL;
00558         g_pMenuBar = NULL;
00559
00560         PressButton(iButton, FALSE);     // un-press button
00561         UpdateWindow();                  // and force repaint now
00562
00563         // If the user exited the menu loop by pressing Escape,
00564         // return to track-button state; otherwise normal non-tracking state.
00565         SetTrackingState(m_bEscapeWasPressed ?
00566             TRACK_BUTTON : TRACK_NONE, iButton);
00567
00568         // If the user moved mouse to a new top-level popup (eg from File to
00569         // Edit button), I will have posted a WM_CANCELMODE to quit
00570         // the first popup, and set m_iNewPopup to the new menu to show.
00571         // Otherwise, m_iNewPopup will be -1 as set above.
00572         // So just set iButton to the next popup menu and keep looping...
00573         iButton = m_iNewPopup;
00574     }
00575
00576     // fix potential resource leak - KStowell - 10-15-99
00577     m_popupMenu.DestroyMenu();
00578 }
00579
00581 // Given button rectangle, compute point and "exclude rect" for
00582 // TrackPopupMenu, based on current docking style, so that the menu will
00583 // appear always inside the window.
00584 //
00585 CPoint CCJMenuBar::ComputeMenuTrackPoint(const CRect& rcButn, TPMPARAMS& tpm)
00586 {
00587     tpm.cbSize = sizeof(tpm);
00588     DWORD dwStyle = m_dwStyle;
00589     CPoint pt;
00590     CRect& rcExclude = (CRect&)tpm.rcExclude;
00591     rcExclude = rcButn;
00592     ::GetWindowRect(::GetDesktopWindow(), &rcExclude);
00593
00594     switch (dwStyle & CBRS_ALIGN_ANY) {
00595     case CBRS_ALIGN_BOTTOM:
00596         pt = CPoint(rcButn.left, rcButn.top);
00597         rcExclude.top = rcButn.top;
00598         break;
00599
00600     case CBRS_ALIGN_LEFT:
00601         pt = CPoint(rcButn.right, rcButn.top);
00602         rcExclude.right = rcButn.right;
00603         break;
00604
00605     case CBRS_ALIGN_RIGHT:
00606         pt = CPoint(rcButn.left, rcButn.top);
00607         rcExclude.left = rcButn.left;
00608         break;
00609
00610     default: // case CBRS_ALIGN_TOP:
00611         pt = CPoint(rcButn.left, rcButn.bottom);
00612         break;
00613     }
00614     return pt;
00615 }
00616
00618 // This function translates special menu keys and mouse actions.
00619 // You must call it from your frame's PreTranslateMessage.
00620 //
00621 BOOL CCJMenuBar::TranslateFrameMessage(MSG* pMsg)
00622 {
00623     ASSERT_VALID(this);
00624     ASSERT(pMsg);
00625     UINT msg = pMsg->message;
00626     if (WM_LBUTTONDOWN <= msg && msg <= WM_MOUSELAST) {
00627         if (pMsg->hwnd != m_hWnd && m_iTrackingState > 0) {
00628             // user clicked outside menu bar: exit tracking mode
00629             SetTrackingState(TRACK_NONE);
00630         }
00631
00632     } else if (msg==WM_SYSKEYDOWN || msg==WM_SYSKEYUP || msg==WM_KEYDOWN) {
00633
00634         TCHAR vkey = static_cast<TCHAR>(pMsg->wParam);  // get virt key
00635
00636         BOOL  bAlt = HIWORD(pMsg->lParam) & KF_ALTDOWN;     // Alt key down
00637
00638         if (vkey==VK_MENU ||
00639             (vkey==VK_F10 && !((GetKeyState(VK_SHIFT) & 0x80000000) ||
00640                                (GetKeyState(VK_CONTROL) & 0x80000000) || bAlt))) {
00641
00642             // key is VK_MENU or F10 with no alt/ctrl/shift: toggle menu mode
00643             if (msg==WM_SYSKEYUP) {
00644                 ToggleTrackButtonMode();
00645             }
00646             return TRUE;
00647
00648         } else if ((msg==WM_SYSKEYDOWN || msg==WM_KEYDOWN)) {
00649             if (m_iTrackingState == TRACK_BUTTON) {
00650                 // I am tracking: handle left/right/up/down/space/Esc
00651                 switch (vkey) {
00652                 case VK_LEFT:
00653                 case VK_RIGHT:
00654                     // left or right-arrow: change hot button if tracking buttons
00655                     SetHotItem(GetNextOrPrevButton(GetHotItem(), vkey==VK_LEFT));
00656                     return TRUE;
00657
00658                 case VK_SPACE:  // (personally, I like SPACE to enter menu too)
00659                 case VK_UP:
00660                 case VK_DOWN:
00661                     // up or down-arrow: move into current menu, if any
00662                     TrackPopup(GetHotItem());
00663                     return TRUE;
00664
00665                 case VK_ESCAPE:
00666                     // escape key: exit tracking mode
00667                     SetTrackingState(TRACK_NONE);
00668                     return TRUE;
00669                 }
00670             }
00671
00672             // Handle alphanumeric key: invoke menu. Note that Alt-X
00673             // chars come through as WM_SYSKEYDOWN, plain X as WM_KEYDOWN.
00674             if ((bAlt || m_iTrackingState == TRACK_BUTTON) && isalnum(vkey)) {
00675                 // Alt-X, or else X while in tracking mode
00676                 UINT nID;
00677                 if (MapAccelerator(vkey, nID)) {
00678                     TrackPopup(nID);     // found menu mnemonic: track it
00679                     return TRUE;         // handled
00680                 } else if (m_iTrackingState==TRACK_BUTTON && !bAlt) {
00681                     MessageBeep(0);
00682                     return TRUE;
00683                 }
00684             }
00685
00686             // Default for any key not handled so far: return to no-menu state
00687             if (m_iTrackingState > 0) {
00688                 SetTrackingState(TRACK_NONE);
00689             }
00690         }
00691     }
00692     return FALSE; // not handled, pass along
00693 }
00694
00695 #ifdef _DEBUG
00696 void CCJMenuBar::AssertValid() const
00697 {
00698     CCJToolBar::AssertValid();
00699     ASSERT(TRACK_NONE<=m_iTrackingState && m_iTrackingState<=TRACK_POPUP);
00700     m_frameHook.AssertValid();
00701 }
00702
00703 void CCJMenuBar::Dump(CDumpContext& dc) const
00704 {
00705     CCJToolBar::Dump(dc);
00706 }
00707 #endif
00708
00710 // CCJMenuBarFrameHook is used to trap menu-related messages sent to the owning
00711 // frame. The same class is also used to trap messages sent to the MDI client
00712 // window in an MDI app. I should really use two classes for this,
00713 // but it uses less code to chare the same class. Note however: there
00714 // are two different INSTANCES of CCJMenuBarFrameHook in CCJMenuBar: one for
00715 // the frame and one for the MDI client window.
00716 //
00717 CCJMenuBarFrameHook::CCJMenuBarFrameHook()
00718 {
00719 }
00720
00721 CCJMenuBarFrameHook::~CCJMenuBarFrameHook()
00722 {
00723     HookWindow((HWND)NULL); // (unhook)
00724 }
00725
00727 // Install hook to trap window messages sent to frame or MDI client.
00728 //
00729 BOOL CCJMenuBarFrameHook::Install(CCJMenuBar* pMenuBar, HWND hWndToHook)
00730 {
00731     ASSERT_VALID(pMenuBar);
00732     m_pMenuBar = pMenuBar;
00733     return HookWindow(hWndToHook);
00734 }
00735
00737 // Trap frame/MDI client messages specific to menubar.
00738 //
00739 LRESULT CCJMenuBarFrameHook::WindowProc(UINT msg, WPARAM wp, LPARAM lp)
00740 {
00741     CCJMenuBar& mb = *m_pMenuBar;
00742
00743     switch (msg) {
00744     // The following messages are trapped for the frame window
00745     case WM_SYSCOLORCHANGE:
00746         mb.UpdateFont();
00747         break;
00748
00749     case WM_MENUSELECT:
00750         mb.OnMenuSelect((HMENU)lp, (UINT)LOWORD(wp));
00751         break;
00752     }
00753     return CSubclassWnd::WindowProc(msg, wp, lp);
00754 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJDockContext.h Source File

WinCvs/CJLib/Include/CJDockContext.h

Go to the documentation of this file.
00001 // CJDockContext.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJockey/Include/CJDockContext.h $
00011  *
00012  * $History: CJDockContext.h $
00013  *
00014  * *****************  Version 9  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/Include
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 8  *****************
00020  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00021  * Updated in $/CodeJockey/Include
00022  *
00023  * *****************  Version 7  *****************
00024  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00025  * Updated in $/CodeJockey/Include
00026  * Cleaned up inline functions, and import/export macro so that class will
00027  * be imported when linked to, and exported at compile time.
00028  *
00029  * *****************  Version 6  *****************
00030  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00031  * Updated in $/CodeJockey/Include
00032  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00033  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00034  * message handler, this is now automatically handled by the base class.
00035  * Added redraw flags to the create method and modified paint and layout
00036  * handlers to reduce flicker and un-necessary command handling. Dragging
00037  * rect now reflects actual control bar docked size. Added "flat" look to
00038  * the control bars, the control bars can now use the classic DevStudio
00039  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00040  * docking windows now handle dragging, docking and floating much better,
00041  * and behave more like DevStudio.
00042  *
00043  * *****************  Version 5  *****************
00044  * User: Kirk Stowell Date: 4/14/99    Time: 12:57p
00045  * Updated in $/CodeJockey/Include
00046  * Daniel Harth [danielh@mail.matco.ro] - Added support for diagonal
00047  * sizing.
00048  *
00049  * *****************  Version 4  *****************
00050  * User: Kirk Stowell Date: 4/03/99    Time: 12:56p
00051  * Updated in $/CodeJockey/Include
00052  * Added comments and cleaned up code.
00053  *
00054  * *****************  Version 3  *****************
00055  * User: Kirk Stowell Date: 3/10/99    Time: 12:56p
00056  * Updated in $/CodeJockey/Include
00057  * Added support for toggle docking.
00058  *
00059  * *****************  Version 2  *****************
00060  * User: Kirk Stowell Date: 3/03/99    Time: 12:54p
00061  * Updated in $/CodeJockey/Include
00062  * Scott Killen [s_killen@yahoo.com] - If your frame is not your main
00063  * window in your app, you cannot dock a floating CCJControlBar. Changed
00064  * (CFrameWnd*)AfxGetApp()->m_pMainWnd to (CFrameWnd*)m_pDockSite in
00065  * CanDockDockBar() and DockSizeBar()
00066  *
00067  * *****************  Version 1  *****************
00068  * User: Kirk Stowell Date: 1/12/99    Time: 12:53p
00069  * Created in $/CodeJockey/Include
00070  * Initial creation to add side-by-side docking support for CCJControlBar
00071  * class.
00072  *
00073  ***************************************************************************/
00075
00076 #ifndef __CJDOCKCONTEXT_H__
00077 #define __CJDOCKCONTEXT_H__
00078
00079 #if _MSC_VER >= 1000
00080 #pragma once
00081 #endif // _MSC_VER >= 1000
00082
00083 // class forwards
00084 class CCJSizeDockBar;
00085 class CCJControlBar;
00086
00087 // CCJDockContext is a CDockContext derived class which is used by
00088 // CCJControlBar and CCJMiniDockFrameWnd for docking / sizing control bars.
00089 class _CJX_EXT_CLASS CCJDockContext : public CDockContext
00090 {
00091 public:
00092
00093     // Default constructor
00094     //
00095     CCJDockContext(CControlBar* pBar);
00096
00097     // Virtual destructor
00098     //
00099     virtual ~CCJDockContext();
00100
00101 public:
00102
00103     CPoint      m_ptOrig; // Yiannhs: trying to handle some extra use
00104
00105 public:
00106
00107     // this member function is called by CCJDockContext when a drag
00108     // operation completes.
00109     //
00110     void EndDragDockBar();
00111
00112     // this member function is called by CCJDockContext during a
00113     // drag process.
00114     //
00115     void MoveDockBar(CPoint pt);
00116
00117     // this member function is called by CCJControlBar and CCJMiniDockFrameWnd
00118     // whenever a drag operation begins.
00119     //
00120     void StartDragDockBar(CPoint pt);
00121
00122     // this member function is called by CCJDockContext to determine
00123     // wether a control bar is dockable.
00124     //
00125     DWORD CanDockDockBar();
00126
00127     // this member function is called by CCJDockContext to determine
00128     // wether a control bar is dockable.
00129     //
00130     DWORD CanDockDockBar(CRect rect, DWORD dwDockStyle, CDockBar** ppDockBar = NULL);
00131
00132     // this member function is called by CCJDockContext
00133     // whenever a drag operation begins.
00134     //
00135     BOOL TrackDockBar();
00136
00137     // this member function is called by CCJDockContext
00138     // and returns a CCJSizeDock bar pointer.
00139     //
00140     CCJSizeDockBar* GetDockBar(DWORD dwOverDockStyle);
00141
00142     // this member function is used by the framework to dock a
00143     // control bar.
00144     //
00145     void DockSizeBar(CControlBar *,CCJSizeDockBar* =NULL,LPRECT =NULL);
00146
00147     // this member function is used to toggle the docked state of
00148     // a control bar.
00149     //
00150     virtual void ToggleDocking();
00151
00152     // this member function is called to enable diagonal sizing
00153     // for the control bar.
00154     //
00155     void Stretch(CPoint pt);
00156     virtual void StartResize(int nHitTest, CPoint pt);
00157 };
00158
00160
00161 #endif // __CJDOCKCONTEXT_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PyPersistent::obj_t Member List

This is the complete list of members for PyPersistent::obj_t, including all inherited members.

m_object PyPersistent::obj_t

Generated on Sat Aug 7 22:56:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FilterSelectionDlg.h Source File

common/FilterSelectionDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- September 2003
00019  */
00020
00021 /*
00022  * FilterSelectionDlg.h : the filter selection dialog
00023  */
00024
00025 #if !defined(AFX_FILTERSELECTIONDLG_H__933ECF3F_C417_4C4E_AD6F_39769CCC4E6F__INCLUDED_)
00026 #define AFX_FILTERSELECTIONDLG_H__933ECF3F_C417_4C4E_AD6F_39769CCC4E6F__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #include "CvsEntries.h"
00033
00034 #ifdef WIN32
00035 #   include "HHelpSupport.h"
00036 #endif
00037
00038 bool CompatGetFilterSelection(const int columnIndex, CStr& filterText);
00039
00040 CMString* GetPrevFilter(const int columnIndex);
00041
00042 #ifdef WIN32
00043
00045 // CFilterSelectionDlg dialog
00046
00047 class CFilterSelectionDlg : public CHHelpDialog
00048 {
00049 // Construction
00050 public:
00051     CFilterSelectionDlg(const int columnIndex, const char* filterText,
00052         CWnd* pParent = NULL);   // standard constructor
00053
00054 // Dialog Data
00055     //{{AFX_DATA(CFilterSelectionDlg)
00056     enum { IDD = IDD_FILTER_SELECTION };
00057     CSmartComboBox  m_filterCombo;
00058     CSmartComboBox  m_contentsCombo;
00059     CString m_filterText;
00060     //}}AFX_DATA
00061
00062
00063 // Overrides
00064     // ClassWizard generated virtual function overrides
00065     //{{AFX_VIRTUAL(CFilterSelectionDlg)
00066     protected:
00067     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00068     //}}AFX_VIRTUAL
00069
00070 // Implementation
00071 protected:
00072
00073     // Generated message map functions
00074     //{{AFX_MSG(CFilterSelectionDlg)
00075     virtual BOOL OnInitDialog();
00076     afx_msg void OnSelchangeContentsCombo();
00077     afx_msg void OnDblclkCombofilter();
00078     afx_msg void OnHelp();
00079     //}}AFX_MSG
00080     DECLARE_MESSAGE_MAP()
00081 private:
00082     // Data members
00083     int m_columnIndex;
00085     // Methods
00086     virtual void InitHelpID();
00087 };
00088
00089 //{{AFX_INSERT_LOCATION}}
00090 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00091
00092 #endif  /* WIN32 */
00093
00094 #endif // !defined(AFX_FILTERSELECTIONDLG_H__933ECF3F_C417_4C4E_AD6F_39769CCC4E6F__INCLUDED_)
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

mircAttrCvt Member List

This is the complete list of members for mircAttrCvt, including all inherited members.

extractcolor(std::string *in, int start, short *fg, short *bg) | mircAttrCvt | [private]
mirc2ctcp(std::string *in) | mircAttrCvt |
mirc2ctcpmap | mircAttrCvt | [private, static]
tokens | mircAttrCvt | [private, static]

Generated on Sat Aug 7 22:55:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFontCombo.cpp Source File

WinCvs/CJLib/CJLibrary/CJFontCombo.cpp

Go to the documentation of this file.
00001
00002 // CJFontCombo.cpp : implementation file
00003 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00004 // See ReadMe.txt for TERMS OF USE.
00005 //
00006 // Based on the article 'Owner Drawn Font Selection ComboBox' by Girish Bharadwaj
00007 // http://www.codeguru.com/misc/font_selection_combo.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:49 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/CJLibrary/CJFontCombo.cpp $
00015  *
00016  * $History: CJFontCombo.cpp $
00017  *
00018  * *****************  Version 6  *****************
00019  * User: Kirk Stowell Date: 10/31/99   Time: 11:01p
00020  * Updated in $/CodeJock/CJLibrary
00021  * Overrode OnEraseBkgnd(...) and OnPaint() for flicker free drawing.
00022  *
00023  * *****************  Version 5  *****************
00024  * User: Kirk Stowell Date: 10/26/99   Time: 10:53p
00025  * Updated in $/CodeJock/CJLibrary
00026  * Added the DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC macros to CCJFontCombo
00027  * for access to run-time information.
00028  *
00029  * *****************  Version 4  *****************
00030  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00031  * Updated in $/CodeJockey/CJLibrary
00032  * Updated copyright and contact information.
00033  *
00034  * *****************  Version 3  *****************
00035  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00036  * Updated in $/CodeJockey/CJLibrary
00037  * Added Unicode compliance, thanks to Barry Burton for his help with
00038  * this.
00039  *
00040  *
00041  * *****************  Version 2  *****************
00042  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00043  * Updated in $/CodeJockey/CJLibrary
00044  *
00045  * *****************  Version 1  *****************
00046  * User: Kirk Stowell Date: 7/26/99    Time: 2:11p
00047  * Created in $/CodeJockey/CJLibrary
00048  *
00049  ***************************************************************************/
00051
00052 #include "stdafx.h"
00053 #include "CJFontCombo.h"
00054
00055 #ifdef _DEBUG
00056 #define new DEBUG_NEW
00057 #undef THIS_FILE
00058 static char THIS_FILE[] = __FILE__;
00059 #endif
00060
00062 // CCJFontCombo
00063
00064 CCJFontCombo::CCJFontCombo()
00065 {
00066      m_clrHilight       = ::GetSysColor(COLOR_HIGHLIGHT);
00067      m_clrNormalText    = ::GetSysColor(COLOR_WINDOWTEXT);
00068      m_clrHilightText   = ::GetSysColor(COLOR_HIGHLIGHTTEXT);
00069      m_clrBkgnd         = ::GetSysColor(COLOR_WINDOW);
00070 }
00071
00072 CCJFontCombo::~CCJFontCombo()
00073 {
00074 }
00075
00076 IMPLEMENT_DYNAMIC(CCJFontCombo, CComboBox)
00077
00078 BEGIN_MESSAGE_MAP(CCJFontCombo, CComboBox)
00079     //{{AFX_MSG_MAP(CCJFontCombo)
00080     ON_WM_DESTROY()
00081     ON_WM_CREATE()
00082     ON_WM_ERASEBKGND()
00083     ON_WM_PAINT()
00084     //}}AFX_MSG_MAP
00085 END_MESSAGE_MAP()
00086
00088 // CCJFontCombo message handlers
00089
00090 void CCJFontCombo::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00091 {
00092     CDC*      pDC      = CDC::FromHandle(lpDrawItemStruct->hDC);
00093     CRect     rect     = lpDrawItemStruct->rcItem;
00094     int       nState   = lpDrawItemStruct->itemState;
00095     int       nItem    = lpDrawItemStruct->itemID;
00096     LPLOGFONT pLogFont = (LPLOGFONT)lpDrawItemStruct->itemData;
00097
00098     pDC->SetBkMode( TRANSPARENT );
00099
00100     if( nState & ODS_SELECTED ) {
00101         pDC->FillSolidRect( rect, m_clrHilight );
00102         pDC->SetTextColor( m_clrHilightText );
00103     }
00104     else {
00105         pDC->FillSolidRect( rect, m_clrBkgnd );
00106         pDC->SetTextColor( m_clrNormalText );
00107     }
00108
00109     if( nItem >= 0 )
00110     {
00111         CString strText;
00112         GetLBText( nItem, strText );
00113
00114         CFont newFont;
00115         pLogFont->lfHeight = 90; //9 point size
00116         pLogFont->lfWidth  = 0;
00117         newFont.CreatePointFontIndirect( pLogFont );
00118
00119         CFont *pOldFont = pDC->SelectObject( &newFont );
00120         pDC->DrawText(strText, rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
00121         pDC->SelectObject( pOldFont );
00122         newFont.DeleteObject();
00123     }
00124 }
00125
00126 void CCJFontCombo::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
00127 {
00128     UNUSED_ALWAYS( lpMeasureItemStruct );
00129 }
00130
00131 void CCJFontCombo::InitializeFonts()
00132 {
00133     // Clear the combobox.
00134      ResetContent();
00135
00136      HDC hDC  = ::GetDC(m_hWnd);
00137      ::EnumFonts( hDC, NULL, (FONTENUMPROC)EnumFontProc, (LPARAM)this );//Enumerate
00138      ::ReleaseDC(m_hWnd, hDC);
00139 }
00140
00141 BOOL CALLBACK CCJFontCombo::EnumFontProc(LPLOGFONT lpLogFont, LPTEXTMETRIC lpTextMetric, short nFontType, LPHANDLE lpData)
00142 {
00143     UNUSED_ALWAYS( lpTextMetric );
00144
00145     if((nFontType == TRUETYPE_FONTTYPE) && (lpLogFont->lfCharSet != SYMBOL_CHARSET))
00146      {
00147          CCJFontCombo* pCombo = (CCJFontCombo*)lpData;
00148          ASSERT(pCombo);
00149
00150          int nIndex = pCombo->AddString(lpLogFont->lfFaceName);
00151          LPLOGFONT pLogFont = new LOGFONT;
00152
00153          ::CopyMemory((PVOID)pLogFont, (CONST VOID*)lpLogFont, (DWORD)sizeof( LOGFONT ));
00154          pCombo->SetItemData( nIndex, (DWORD)pLogFont );
00155      }
00156
00157      return TRUE;
00158 }
00159
00160 void CCJFontCombo::OnDestroy()
00161 {
00162     for( int nIndex = 0; nIndex <  GetCount(); ++nIndex ) {
00163         LPLOGFONT pLogFont = (LPLOGFONT)GetItemData(nIndex);
00164         _delete( pLogFont );
00165     }
00166
00167      CComboBox::OnDestroy();
00168 }
00169
00170 int CCJFontCombo::GetSelFont(LOGFONT& logFont)
00171 {
00172      int nIndex = GetCurSel ();
00173      if(nIndex != LB_ERR)
00174      {
00175         LPLOGFONT pLogFont = (LPLOGFONT)GetItemData(nIndex);
00176         ::CopyMemory((PVOID)&logFont, (CONST VOID*)pLogFont, sizeof(LOGFONT));
00177         return nIndex;
00178      }
00179
00180      return LB_ERR;
00181 }
00182
00183 int CCJFontCombo::OnCreate(LPCREATESTRUCT lpCreateStruct)
00184 {
00185     if (CComboBox::OnCreate(lpCreateStruct) == -1)
00186         return -1;
00187
00188     InitializeFonts();
00189     return 0;
00190 }
00191
00192 void CCJFontCombo::PreSubclassWindow()
00193 {
00194     CComboBox::PreSubclassWindow();
00195     InitializeFonts();
00196 }
00197
00198 BOOL CCJFontCombo::OnEraseBkgnd(CDC* pDC)
00199 {
00200     // KStowell - overridden for flicker-free drawing.
00201     UNUSED_ALWAYS(pDC);
00202     return TRUE;
00203 }
00204
00205 void CCJFontCombo::OnPaint()
00206 {
00207     CPaintDC dc(this); // device context for painting
00208
00209     // KStowell - Get the client rect.
00210     CRect rcClient, rcClip;
00211     dc.GetClipBox( &rcClip );
00212     GetClientRect( &rcClient );
00213
00214     // KStowell - Create a memory device-context. This is done to help reduce
00215     // screen flicker, since we will paint the entire control to the
00216     // off screen device context first.
00217     CDC memDC;
00218     CBitmap bitmap;
00219     memDC.CreateCompatibleDC(&dc);
00220     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00221     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00222
00223     // KStowell - Repaint the background.
00224     memDC.FillSolidRect(rcClient, ::GetSysColor(COLOR_WINDOW));
00225
00226     // let the control do its default drawing.
00227     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00228
00229     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00230     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00231         rcClip.left, rcClip.top, SRCCOPY );
00232
00233     // KStowell - Cleanup resources.
00234     memDC.SelectObject(pOldBitmap);
00235     memDC.DeleteDC();
00236     bitmap.DeleteObject();
00237 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/pseudolist.h Source File

rf/support/mfc/pseudolist.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(AFX_PSEUDOLIST_H__49AF86B3_E6AB_4885_843C_1CE5AC8C4980__INCLUDED_)
00022 #define AFX_PSEUDOLIST_H__49AF86B3_E6AB_4885_843C_1CE5AC8C4980__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // PseudoList.h : header file
00028 //
00029
00031 // CPseudoList window
00032
00033 class CPseudoList : public CListCtrl
00034 {
00035 // Construction
00036 public:
00037     CPseudoList(int wid, int cmd);
00038
00039 // Attributes
00040 public:
00041
00042 // Operations
00043 public:
00044
00045 // Overrides
00046     // ClassWizard generated virtual function overrides
00047     //{{AFX_VIRTUAL(CPseudoList)
00048     //}}AFX_VIRTUAL
00049
00050 // Implementation
00051 public:
00052     virtual ~CPseudoList();
00053
00054     // Generated message map functions
00055 protected:
00056     int m_cmd, m_wid;
00057
00058     //{{AFX_MSG(CPseudoList)
00059     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00060     //}}AFX_MSG
00061
00062     DECLARE_MESSAGE_MAP()
00063 };
00064
00066
00067 //{{AFX_INSERT_LOCATION}}
00068 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00069
00070 #endif // !defined(AFX_PSEUDOLIST_H__49AF86B3_E6AB_4885_843C_1CE5AC8C4980__INCLUDED_)
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoDlg.h Source File

rf/support/mfc/PseudoDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 #if !defined(AFX_PSEUDODLG_H__9EDC5FE5_21FD_4ACE_9AEB_7A521350A2EE__INCLUDED_)
00022 #define AFX_PSEUDODLG_H__9EDC5FE5_21FD_4ACE_9AEB_7A521350A2EE__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // PseudoDlg.h : header file
00028 //
00029
00030 class UWidget;
00031
00033 // CPseudoDlg dialog
00034
00035 class CPseudoDlg : public CDialog
00036 {
00037 // Construction
00038 public:
00039     CPseudoDlg(int dlgid, UWidget *pseudo, CWnd* pParent = NULL);   // standard constructor
00040     virtual ~CPseudoDlg();
00041
00042 // Dialog Data
00043     //{{AFX_DATA(CPseudoDlg)
00044     //}}AFX_DATA
00045
00046
00047 // Overrides
00048     // ClassWizard generated virtual function overrides
00049     //{{AFX_VIRTUAL(CPseudoDlg)
00050     protected:
00051     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00052     //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 protected:
00056     UWidget *m_pseudo;
00057     virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
00058
00059     // Generated message map functions
00060     //{{AFX_MSG(CPseudoDlg)
00061     virtual BOOL OnInitDialog();
00062     //}}AFX_MSG
00063     DECLARE_MESSAGE_MAP()
00064 };
00065
00066 //{{AFX_INSERT_LOCATION}}
00067 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00068
00069 #endif // !defined(AFX_PSEUDODLG_H__9EDC5FE5_21FD_4ACE_9AEB_7A521350A2EE__INCLUDED_)
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

URuntimeClass Member List

This is the complete list of members for URuntimeClass, including all inherited members.

CreateObject() | URuntimeClass |
IsDerivedFrom(const URuntimeClass *pBaseClass) const | URuntimeClass |
m_lpszClassName | URuntimeClass |
m_nObjectSize | URuntimeClass |
m_pfnCreateObject | URuntimeClass |
m_pfnGetBaseClass | URuntimeClass |
m_pNextClass | URuntimeClass |
sAllURuntimeClass | URuntimeClass | [static]
URuntimeClass(const char *lpszClassName, int nObjectSize, UObject *(*pfnCreateObject)(), const URuntimeClass *(*pfnGetBaseClass)()) | URuntimeClass |
~URuntimeClass() | URuntimeClass |

Generated on Sat Aug 7 22:56:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/RtagDlg.h Source File

common/RtagDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- July 1998
00019  */
00020
00021 /*
00022  * RtagDlg.h : the cvs rtag dialog
00023  */
00024
00025 #if !defined(AFX_RTAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_RTAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "SmartComboBox.h"
00033 #include "CvsCommands.h"
00034
00035 #ifdef WIN32
00036 #   include "HHelpSupport.h"
00037 #endif
00038
00039 class MultiFiles;
00040
00041 bool CompatGetRtag(const MultiFiles* mf, const kTagCmdType tagType,
00042                    bool& noRecurs, bool& movDelBranch,
00043                    bool& overwriteExisting, CStr& tagName,
00044                    CStr& modName, CStr& date, CStr& rev,
00045                    bool& useMostRecent, bool& lookAttic,
00046                    bool& forceCvsroot, CStr& cvsroot);
00047
00048 extern CMString gOldModules;
00049
00050 #ifdef WIN32
00051
00052 // CRtag_MAIN dialog
00053
00054 class CRtag_MAIN : public CHHelpPropertyPage
00055 {
00056     DECLARE_DYNAMIC(CRtag_MAIN)
00057
00058 // Construction
00059 public:
00060     CRtag_MAIN(const MultiFiles* mf, const kTagCmdType type,
00061         const char* sLastModule, const char* sLastTag,
00062         bool noRecurs, bool movDelBranch, bool lookAttic,
00063         bool forceRoot, const char* cvsroot,
00064         bool overwriteExist = false);
00065     ~CRtag_MAIN();
00066
00067 // Dialog Data
00068     //{{AFX_DATA(CRtag_MAIN)
00069     enum { IDD = IDD_RTAG_MAIN };
00070     CButton m_forceRootCheck;
00071     CButton m_selCvsrootButton;
00072     CSmartComboBox  m_cvsrootCombo;
00073     CButton m_overwriteExistingCheck;
00074     CStatic m_moduleDescStatic;
00075     CStatic m_tagDescStatic;
00076     CButton m_grpBox;
00077     CSmartComboBox  m_moduleCombo;
00078     CSmartComboBox  m_tagCombo;
00079     CString m_tagName;
00080     CString m_moduleName;
00081     BOOL    m_noRecurs;
00082     BOOL    m_lookAttic;
00083     BOOL    m_overwriteExisting;
00084     BOOL    m_movDelBranch;
00085     BOOL    m_forceRoot;
00086     CString m_cvsroot;
00087     //}}AFX_DATA
00088
00089
00090 // Overrides
00091     // ClassWizard generate virtual function overrides
00092     //{{AFX_VIRTUAL(CRtag_MAIN)
00093     protected:
00094     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00095     //}}AFX_VIRTUAL
00096
00097 // Implementation
00098 protected:
00099     // Generated message map functions
00100     //{{AFX_MSG(CRtag_MAIN)
00101     virtual BOOL OnInitDialog();
00102     afx_msg void OnBrowseTag();
00103     afx_msg void OnBrowseModules();
00104     afx_msg void OnForceroot();
00105     afx_msg void OnSelcvsroot();
00106     //}}AFX_MSG
00107     DECLARE_MESSAGE_MAP()
00108 private:
00109     // Data members
00110     const MultiFiles* m_mf;
00111     kTagCmdType m_type;
00112
00113     // Methods
00114     virtual void InitHelpID();
00115 };
00116
00118 // CRtag_OPTIONS dialog
00119
00120 class CRtag_OPTIONS : public CHHelpPropertyPage
00121 {
00122     DECLARE_DYNAMIC(CRtag_OPTIONS)
00123
00124 // Construction
00125 public:
00126     CRtag_OPTIONS(const MultiFiles* mf, const kTagCmdType type,
00127         bool hasDate, bool hasRev,
00128         const char* sLastDate, const char* sLastRev,
00129         bool useMostRecent);
00130     CRtag_OPTIONS();
00131     ~CRtag_OPTIONS();
00132
00133 // Dialog Data
00134     //{{AFX_DATA(CRtag_OPTIONS)
00135     enum { IDD = IDD_RTAG_OPTIONS };
00136     CButton m_browseTagButton;
00137     CButton m_hasRevCheck;
00138     CButton m_hasDateCheck;
00139     CSmartComboBox  m_revCombo;
00140     CSmartComboBox  m_dateCombo;
00141     CButton m_grpBox;
00142     CString m_date;
00143     CString m_rev;
00144     BOOL    m_hasDate;
00145     BOOL    m_hasRev;
00146     BOOL    m_useMostRecent;
00147     //}}AFX_DATA
00148
00149
00150 // Overrides
00151     // ClassWizard generate virtual function overrides
00152     //{{AFX_VIRTUAL(CRtag_OPTIONS)
00153     protected:
00154     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00155     //}}AFX_VIRTUAL
00156
00157 // Implementation
00158 protected:
00159     // Generated message map functions
00160     //{{AFX_MSG(CRtag_OPTIONS)
00161     afx_msg void OnDate();
00162     afx_msg void OnRev();
00163     virtual BOOL OnInitDialog();
00164     afx_msg void OnBrowseTag();
00165     //}}AFX_MSG
00166     DECLARE_MESSAGE_MAP()
00167 private:
00168     // Data members
00169     const MultiFiles* m_mf;
00170     kTagCmdType m_type;
00171
00172     // Methods
00173     virtual void InitHelpID();
00174 };
00175
00176 //{{AFX_INSERT_LOCATION}}
00177 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00178 #endif /* WIN32 */
00179
00180 #endif // !defined(AFX_RTAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJDateTimeCtrl Member List

This is the complete list of members for CCJDateTimeCtrl, including all inherited members.

CCJDateTimeCtrl() | CCJDateTimeCtrl |
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CCJDateTimeCtrl |
GetMonthCalColor(int iColor) const | CCJDateTimeCtrl |
GetMonthCalCtrl() const | CCJDateTimeCtrl |
GetMonthCalFont() const | CCJDateTimeCtrl |
GetRange(COleDateTime *pMinRange, COleDateTime *pMaxRange) const | CCJDateTimeCtrl |
GetRange(CTime *pMinRange, CTime *pMaxRange) const | CCJDateTimeCtrl |
GetTime(CTime &timeDest) const | CCJDateTimeCtrl |
GetTime(COleDateTime &timeDest) const | CCJDateTimeCtrl |
GetTime(LPSYSTEMTIME pTimeDest) const | CCJDateTimeCtrl |
SetFormat(LPCTSTR pstrFormat) | CCJDateTimeCtrl |
SetMonthCalColor(int iColor, COLORREF ref) | CCJDateTimeCtrl |
SetMonthCalFont(HFONT hFont, BOOL bRedraw=TRUE) | CCJDateTimeCtrl |
SetRange(const COleDateTime *pMinRange, const COleDateTime *pMaxRange) | CCJDateTimeCtrl |
SetRange(const CTime *pMinRange, const CTime *pMaxRange) | CCJDateTimeCtrl |
SetTime(const CTime *pTimeNew) | CCJDateTimeCtrl |
SetTime(const COleDateTime &timeNew) | CCJDateTimeCtrl |
SetTime(LPSYSTEMTIME pTimeNew=NULL) | CCJDateTimeCtrl |
~CCJDateTimeCtrl() | CCJDateTimeCtrl | [virtual]

Generated on Sat Aug 7 22:49:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/OptionalPropertySheet.cpp Source File

common/OptionalPropertySheet.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2001
00019  */
00020
00021 // OptionalPropertySheet.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include "OptionalPropertySheet.h"
00027 #include "CvsPrefs.h"
00028 #include "wincvs_winutil.h"
00029
00030
00031 #ifdef _DEBUG
00032 #define new DEBUG_NEW
00033 #undef THIS_FILE
00034 static char THIS_FILE[] = __FILE__;
00035 #endif
00036
00038 // COptionalPropertySheet
00039
00040 IMPLEMENT_DYNAMIC(COptionalPropertySheet, CHHelpPropertySheet)
00041
00042 COptionalPropertySheet::COptionalPropertySheet(bool bOptionChecked, UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00043     :CHHelpPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00044 {
00045     m_bOptionChecked = bOptionChecked;
00046 }
00047
00048 COptionalPropertySheet::COptionalPropertySheet(bool bOptionChecked, LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
00049     :CHHelpPropertySheet(pszCaption, pParentWnd, iSelectPage)
00050 {
00051     m_bOptionChecked = bOptionChecked;
00052 }
00053
00054 COptionalPropertySheet::~COptionalPropertySheet()
00055 {
00056 }
00057
00058
00059 BEGIN_MESSAGE_MAP(COptionalPropertySheet, CHHelpPropertySheet)
00060 //{{AFX_MSG_MAP(COptionalPropertySheet)
00061     //}}AFX_MSG_MAP
00062 END_MESSAGE_MAP()
00063
00065 // COptionalPropertySheet message handlers
00066
00068 BOOL COptionalPropertySheet::OnInitDialog()
00069 {
00070     CHHelpPropertySheet::OnInitDialog();
00071
00072     // Add the option check box
00073     CRect rectWnd;
00074     GetOptionCheckRect(rectWnd);
00075
00076     CString strOptionText;
00077     strOptionText.Format(_T("Display only if %s key is down"), gCvsPrefs.HideCommandDlgUseShift() ? "Shift" : "Ctrl");
00078
00079     m_optionCheck.Create(strOptionText,
00080         WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | WS_TABSTOP,
00081         rectWnd, this, IDC_OPTIONCHECK_BUTTON);
00082
00083     m_optionCheck.SetFont(GetFont());
00084
00085     // Set the checkbox
00086     m_optionCheck.SetCheck(m_bOptionChecked);
00087
00088     return TRUE;  // return TRUE unless you set the focus to a control
00089                   // EXCEPTION: OCX Property Pages should return FALSE
00090 }
00091
00092 void COptionalPropertySheet::InitHelpID()
00093 {
00094     SetCtrlHelpID(IDC_OPTIONCHECK_BUTTON, IDH_IDC_OPTIONCHECK_BUTTON);
00095 }
00096
00101 void COptionalPropertySheet::GetOptionCheckRect(LPRECT lpRect)
00102 {
00103     if( lpRect )
00104     {
00105         CWnd* pOkWnd = GetDlgItem(IDOK);
00106         if( pOkWnd )
00107         {
00108             CRect rectOkWnd;
00109             pOkWnd->GetWindowRect(rectOkWnd);
00110
00111             CRect rectWnd;
00112             GetWindowRect(rectWnd);
00113
00114             const int margin = rectWnd.bottom - rectOkWnd.bottom;
00115             const int height = IsLargeFonts() ? 19 : 16;
00116             const int width = rectOkWnd.left  - rectWnd.left - (margin * 2);
00117
00118             GetClientRect(rectWnd);
00119
00120             lpRect->left = rectWnd.left + margin;
00121             lpRect->right = lpRect->left + width;
00122
00123             lpRect->bottom = rectWnd.bottom - margin - (rectOkWnd.Height() - height) / 4;
00124             lpRect->top = lpRect->bottom - height;
00125         }
00126         else
00127         {
00128             ASSERT(FALSE);  // Can't get the OK button window?
00129
00130             CRect rectWnd;
00131             GetClientRect(rectWnd);
00132
00133             rectWnd.bottom -= 13;
00134             rectWnd.left   += 7;
00135             rectWnd.top     = rectWnd.bottom - (IsLargeFonts() ? 19 : 16);
00136             rectWnd.right   = rectWnd.left   + (IsLargeFonts() ? 235 : 180);
00137
00138             lpRect->bottom = rectWnd.bottom;
00139             lpRect->left = rectWnd.left;
00140             lpRect->top = rectWnd.top;
00141             lpRect->right = rectWnd.right;
00142         }
00143     }
00144     else
00145     {
00146         ASSERT(FALSE);  // Bad pointer
00147     }
00148 }
00149
00151 int COptionalPropertySheet::DoModal()
00152 {
00153     return !m_bOptionChecked || (m_bOptionChecked && IsHideCommandKeyPressed()) ? CHHelpPropertySheet::DoModal() : IDOK;
00154 }
00155
00157 BOOL COptionalPropertySheet::OnCommand(WPARAM wParam, LPARAM lParam)
00158 {
00159     if( wParam == IDOK )
00160     {
00161         // Save the check state of the display option
00162         m_bOptionChecked = (m_optionCheck.GetCheck() == 1);
00163     }
00164
00165     return CHHelpPropertySheet::OnCommand(wParam, lParam);
00166 }
00167
00169 bool COptionalPropertySheet::GetHideCommandDlg()
00170 {
00171     return m_bOptionChecked;
00172 }
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

GetPassword Member List

This is the complete list of members for GetPassword, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | GetPassword | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetPassword(CWnd *pParent=NULL) | GetPassword |
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | GetPassword |
InitHelpID() | GetPassword | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_passwd | GetPassword |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelp() | GetPassword | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | GetPassword | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsToolbar Member List

This is the complete list of members for UCvsToolbar, including all inherited members.

_GetBaseClass() | UCvsToolbar | [protected, static]
_messageEntries | UCvsToolbar | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsToolbar | UCvsToolbar | [protected, static]
classUObject | UObject | [protected, static]
classUToolbar | UToolbar | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UCvsToolbar | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UCvsToolbar | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UCvsToolbar | [virtual]
GetThisMessageMap() | UCvsToolbar | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
m_winInfo | UToolbar | [protected]
m_wndToolBar | UToolbar | [protected]
messageMap | UCvsToolbar | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCommands(int cmd) | UToolbar | [protected]
OnCreate() | UCvsToolbar | [protected]
OnDestroy() | UCvsToolbar | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UToolbar | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTbButton(UTB_BUTTON *info) | UToolbar | [protected]
OnTbCheckBtn(UTB_BUTTON *info) | UToolbar | [protected]
OnTbDropDown(UTB_DROPDOWN *info) | UToolbar | [protected]
OnTbEnd(void) | UToolbar | [protected]
OnTbInit(UTB_INIT *info) | UToolbar | [protected]
OnTbSeparator(void) | UToolbar | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UToolbar | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RebuildBar(bool onlyBitmap=true) | UToolbar | [protected]
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsToolbar(void) | UCvsToolbar | [static]
rtUObject() | UObject | [static]
rtUToolbar(void) | UToolbar | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsToolbar(int widid) | UCvsToolbar |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UToolbar | [virtual]
UObject() | UObject | [inline, protected]
UToolbar(int widid) | UToolbar |
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsToolbar() | UCvsToolbar | [virtual]
~UObject() | UObject | [inline, virtual]
~UToolbar() | UToolbar | [virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:51:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJColorPicker.h Source File

WinCvs/CJLib/Include/CJColorPicker.h

Go to the documentation of this file.
00001 #ifndef __CJCOLORPICKER_H__
00002 #define __CJCOLORPICKER_H__
00003
00004 #if _MSC_VER >= 1000
00005 #pragma once
00006 #endif // _MSC_VER >= 1000
00007
00008 // CJColorPicker.h : header file
00009 //
00010 // Written by Chris Maunder (chrismaunder@codeguru.com)
00011 // Extended by Alexander Bischofberger (bischofb@informatik.tu-muenchen.de)
00012 // Copyright (c) 1998.
00013 //
00014 // This code may be used in compiled form in any way you desire. This
00015 // file may be redistributed unmodified by any means PROVIDING it is
00016 // not sold for profit without the authors written consent, and
00017 // providing that this notice and the authors name is included. If
00018 // the source code in  this file is used in any commercial application
00019 // then a simple email would be nice.
00020 //
00021 // This file is provided "as is" with no expressed or implied warranty.
00022 // The author accepts no liability if it causes any damage whatsoever.
00023 // It's free - so you get what you pay for.
00024 //
00026 /****************************************************************************
00027  *
00028  * $Date: 1999/11/30 21:45:49 $
00029  * $Revision: 1.1.1.3 $
00030  * $Archive: /CodeJock/Include/CJColorPicker.h $
00031  *
00032  * $History: CJColorPicker.h $
00033  *
00034  * *****************  Version 6  *****************
00035  * User: Kirk Stowell Date: 10/31/99   Time: 11:50p
00036  * Updated in $/CodeJock/Include
00037  * Overrode OnEraseBkgnd(...), OnPaint() and made modifications to
00038  * DrawItem(...) for flicker free drawing.
00039  *
00040  * Modified resource include for static builds.
00041  *
00042  * Added method CheckTextColor(...) which tests if the intensity of the
00043  * color is greater as 128. If the intensity < 128 => color is dark, so
00044  * the text must be light. Stephane Routelous
00045  * [routelous@cad-cam-concept.de]
00046  *
00047  * Fixed potential resource and memory leak problems.
00048  *
00049  * Removed un-necessary calls to GetParent(), a call is made only once at
00050  * initialization, to ensure we are working with a valid handle.
00051  *
00052  * Made class methods virtual for inheritance purposes.
00053  *
00054  * *****************  Version 5  *****************
00055  * User: Kirk Stowell Date: 10/14/99   Time: 12:22p
00056  * Updated in $/CodeJock/Include
00057  * Added source control history to file header.
00058  *
00059  ***************************************************************************/
00061
00062 #include "CJColorPopup.h"
00063
00065 // CCJColorPicker window
00066
00067 void AFXAPI DDX_CJColorPicker(CDataExchange *pDX, int nIDC, COLORREF& crColor);
00068
00070 // CCJColorPicker window
00071
00072 #define CP_MODE_TEXT 1  // edit text Color
00073 #define CP_MODE_BK   2  // edit background Color (default)
00074
00075 class _CJX_EXT_CLASS CCJColorPicker : public CButton
00076 {
00077 // Construction
00078 public:
00079     CCJColorPicker();
00080     DECLARE_DYNCREATE(CCJColorPicker);
00081
00082 // Attributes
00083 public:
00084     virtual COLORREF GetColor();
00085     virtual void     SetColor(COLORREF crColor);
00086
00087     virtual void     SetDefaultText(LPCTSTR szDefaultText);
00088     virtual void     SetCustomText(LPCTSTR szCustomText);
00089
00090     virtual void     SetTrackSelection(BOOL bTracking = TRUE)  { m_bTrackSelection = bTracking; }
00091     virtual BOOL     GetTrackSelection()                       { return m_bTrackSelection; }
00092
00093     virtual void     SetSelectionMode(UINT nMode)              { m_nSelectionMode = nMode; }
00094     virtual UINT     GetSelectionMode()                        { return m_nSelectionMode; };
00095
00096     virtual void     SetBkColor(COLORREF crColorBk);
00097     virtual COLORREF GetBkColor()                             { return m_crColorBk; }
00098
00099     virtual void     SetTextColor(COLORREF crColorText);
00100     virtual COLORREF GetTextColor()                           { return m_crColorText;}
00101
00102     virtual void     CheckTextColor(COLORREF crColor);
00103
00104 // Operations
00105 public:
00106
00107 // Overrides
00108     // ClassWizard generated virtual function overrides
00109     //{{AFX_VIRTUAL(CCJColorPicker)
00110     public:
00111     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00112     protected:
00113     virtual void PreSubclassWindow();
00114     //}}AFX_VIRTUAL
00115
00116 // Implementation
00117 public:
00118     virtual ~CCJColorPicker();
00119
00120 protected:
00121     void SetWindowSize();
00122
00123 // protected attributes
00124 protected:
00125     BOOL     m_bActive,                // Is the dropdown active?
00126              m_bTrackSelection;        // track Color changes?
00127     COLORREF m_crColorBk;
00128     COLORREF m_crColorText;
00129     UINT     m_nSelectionMode;
00130     CRect    m_ArrowRect;
00131     CString  m_strDefaultText;
00132     CString  m_strCustomText;
00133     bool     m_bLBtnDown;
00134     CWnd*    m_pParentWnd;              // holds a pointer to the parent window.
00135
00136     // Generated message map functions
00137 protected:
00138     //{{AFX_MSG(CCJColorPicker)
00139     afx_msg BOOL OnClicked();
00140     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00141     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00142     afx_msg void OnPaint();
00143     //}}AFX_MSG
00144     afx_msg LONG OnSelEndOK(UINT lParam, LONG wParam);
00145     afx_msg LONG OnSelEndCancel(UINT lParam, LONG wParam);
00146     afx_msg LONG OnSelChange(UINT lParam, LONG wParam);
00147
00148     DECLARE_MESSAGE_MAP()
00149 };
00150
00152
00153 //{{AFX_INSERT_LOCATION}}
00154 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00155
00156 #endif // !defined(__CJCOLORPICKER_H__)
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LaunchHandlers.h Source File

common/LaunchHandlers.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- January 2004
00019  */
00020
00021 /*
00022  * LaunchHandlers.cpp : Launch helper functions
00023  */
00024
00025 #if !defined(AFX_LAUNCHHANDLERS_H__26387DB1_9D2A_4909_A7A7_5ACAFA46A57B__INCLUDED_)
00026 #define AFX_LAUNCHHANDLERS_H__26387DB1_9D2A_4909_A7A7_5ACAFA46A57B__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00033 typedef enum{
00034     kLaunchEdit,
00035     kLaunchDefaultEdit,
00036     kLaunchOpen,
00037     kLaunchOpenAs,
00038     kLaunchDefault,
00039     kLaunchEnd
00040 }kLaunchType;
00041
00042 const char* GetLaunchTypeName(const kLaunchType launchType, const bool shortName = true);
00043
00044 bool LaunchDiff(const char* file1, const char* file2,
00045                 const char* diffTool = 0L, bool unifiedDiff = false, bool noWhiteSpace = false, bool noBlankLines = false, bool ignoreCase = false);
00046
00047 bool LaunchHandler(const kLaunchType launchType, const char* filePath);
00048
00049 bool LaunchViewer(const char* filePath, bool useOpenAs = false);
00050 bool LaunchEditor(const char* filePath, bool useDefault = false);
00051 bool LaunchDefaultEditor(const char* filePath, void* par = 0L);
00052
00053 void LaunchExplore(const char* path);
00054 void LaunchNewInst(const char* path);
00055 void LaunchProperties(const char* path);
00056
00057 #endif // !defined(AFX_LAUNCHHANDLERS_H__26387DB1_9D2A_4909_A7A7_5ACAFA46A57B__INCLUDED_)
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJToolBarBase.cpp Source File

WinCvs/CJLib/CJLibrary/CJToolBarBase.cpp

Go to the documentation of this file.
00001 // CJToolBarBase.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new IE4 controls'
00007 // http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 2002/06/15 17:49:37 $
00013  * $Revision: 1.2 $
00014  * $Archive: /CodeJockey/CJLibrary/CJToolBarBase.cpp $
00015  *
00016  * $History: CJToolBarBase.cpp $
00017  *
00018  * *****************  Version 5  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/CJLibrary
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 4  *****************
00024  * User: Kirk Stowell Date: 7/28/99    Time: 12:38a
00025  * Updated in $/CodeJockey/CJLibrary
00026  * Final pass for release 6.08.
00027  *
00028  * *****************  Version 3  *****************
00029  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00030  * Updated in $/CodeJockey/CJLibrary
00031  *
00032  * *****************  Version 2  *****************
00033  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00034  * Updated in $/CodeJockey/CJLibrary
00035  *
00036  * *****************  Version 1  *****************
00037  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00038  * Created in $/CodeJockey/CJLibrary
00039  * Copied from MFC v6 and techno preview for v5. Added to extend
00040  * functionality to Visual C++ 5.0 users.
00041  *
00042  ***************************************************************************/
00043
00044 #include "stdafx.h"
00045 #include "CJToolBarBase.h"
00046
00047 #ifdef _DEBUG
00048 #define new DEBUG_NEW
00049 #undef THIS_FILE
00050 static char THIS_FILE[] = __FILE__;
00051 #endif
00052
00054 // CCJToolBarBase
00055
00056 CCJToolBarBase::CCJToolBarBase()
00057 {
00058     m_bInReBar = false;
00059     m_bExStyle = false;
00060 }
00061
00062 CCJToolBarBase::~CCJToolBarBase()
00063 {
00064
00065 }
00066
00067 BEGIN_MESSAGE_MAP(CCJToolBarBase, CControlBar)
00068     //{{AFX_MSG_MAP(CCJToolBarBase)
00069     ON_WM_PAINT()
00070     ON_WM_WINDOWPOSCHANGING()
00071     //}}AFX_MSG_MAP
00072 END_MESSAGE_MAP()
00073
00074 void CCJToolBarBase::SetBorders(int cxLeft, int cyTop, int cxRight, int cyBottom)
00075 {
00076     ASSERT(cxLeft >= 0);
00077     ASSERT(cyTop >= 0);
00078     ASSERT(cxRight >= 0);
00079     ASSERT(cyBottom >= 0);
00080
00081     m_cxLeftBorder = cxLeft;
00082     m_cyTopBorder = cyTop;
00083     m_cxRightBorder = cxRight;
00084     m_cyBottomBorder = cyBottom;
00085 }
00086
00087 LRESULT CCJToolBarBase::WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam)
00088 {
00089     ASSERT_VALID(this);
00090
00091     LRESULT lResult;
00092     switch (nMsg)
00093     {
00094     case WM_NOTIFY:
00095     case WM_COMMAND:
00096     case WM_DRAWITEM:
00097     case WM_MEASUREITEM:
00098     case WM_DELETEITEM:
00099     case WM_COMPAREITEM:
00100     case WM_VKEYTOITEM:
00101     case WM_CHARTOITEM:
00102         // send these messages to the owner if not handled
00103         if (OnWndMsg(nMsg, wParam, lParam, &lResult))
00104             return lResult;
00105         else
00106         {
00107             // try owner next
00108             lResult = GetOwner()->SendMessage(nMsg, wParam, lParam);
00109
00110             // special case for TTN_NEEDTEXTA and TTN_NEEDTEXTW
00111             if(nMsg == WM_NOTIFY)
00112             {
00113                 NMHDR* pNMHDR = (NMHDR*)lParam;
00114                 if (pNMHDR->code == TTN_NEEDTEXTA || pNMHDR->code == TTN_NEEDTEXTW)
00115                 {
00116                     TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
00117                     TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
00118                     if ((pNMHDR->code == TTN_NEEDTEXTA && (!pTTTA->lpszText || !*pTTTA->lpszText)) ||
00119                         (pNMHDR->code == TTN_NEEDTEXTW && (!pTTTW->lpszText || !*pTTTW->lpszText)))
00120                     {
00121                         // not handled by owner, so let bar itself handle it
00122                         lResult = CWnd::WindowProc(nMsg, wParam, lParam);
00123                     }
00124                 }
00125             }
00126             return lResult;
00127         }
00128     }
00129
00130     // otherwise, just handle in default way
00131     lResult = CWnd::WindowProc(nMsg, wParam, lParam);
00132     return lResult;
00133 }
00134
00135 void CCJToolBarBase::OnWindowPosChanging(LPWINDOWPOS lpWndPos)
00136 {
00137     // WINBUG: We call DefWindowProc here instead of CWnd::OnWindowPosChanging
00138     //  (which calls CWnd::Default, which calls through the super wndproc)
00139     //  because certain control bars that are system implemented (such as
00140     //  CToolBar with TBSTYLE_FLAT) do not implement WM_WINDOWPOSCHANGING
00141     //  correctly, causing repaint problems.  This code bypasses that whole
00142     //  mess.
00143     ::DefWindowProc(m_hWnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)lpWndPos);
00144
00145     if (lpWndPos->flags & SWP_NOSIZE)
00146         return;
00147
00148     // invalidate borders on the right
00149     CRect rect;
00150     GetWindowRect(&rect);
00151     CSize sizePrev = rect.Size();
00152     int cx = lpWndPos->cx;
00153     int cy = lpWndPos->cy;
00154     if (cx != sizePrev.cx && (m_dwStyle & CBRS_BORDER_RIGHT))
00155     {
00156         rect.SetRect(cx-afxData.cxBorder2, 0, cx, cy);
00157         InvalidateRect(&rect);
00158         rect.SetRect(sizePrev.cx-afxData.cxBorder2, 0, sizePrev.cx, cy);
00159         InvalidateRect(&rect);
00160     }
00161
00162     // invalidate borders on the bottom
00163     if (cy != sizePrev.cy && (m_dwStyle & CBRS_BORDER_BOTTOM))
00164     {
00165         rect.SetRect(0, cy-afxData.cyBorder2, cx, cy);
00166         InvalidateRect(&rect);
00167         rect.SetRect(0, sizePrev.cy-afxData.cyBorder2, cx, sizePrev.cy);
00168         InvalidateRect(&rect);
00169     }
00170 }
00171
00172 void CCJToolBarBase::OnPaint()
00173 {
00174     // background is already filled in gray
00175     CPaintDC dc(this);
00176
00177     // erase background now
00178     if (IsVisible())
00179         DoPaint(&dc);       // delegate to paint helper
00180 }
00181
00182 void CCJToolBarBase::EraseNonClient()
00183 {
00184     // get window DC that is clipped to the non-client area
00185     CWindowDC dc(this);
00186     CRect rectClient;
00187     GetClientRect(rectClient);
00188     CRect rectWindow;
00189     GetWindowRect(rectWindow);
00190     ScreenToClient(rectWindow);
00191     rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);
00192     dc.ExcludeClipRect(rectClient);
00193
00194     // draw borders in non-client area
00195     rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);
00196     DrawBorders(&dc, rectWindow);
00197
00198     // erase parts not drawn
00199     dc.IntersectClipRect(rectWindow);
00200     SendMessage(WM_ERASEBKGND, (WPARAM)dc.m_hDC);
00201
00202     // draw gripper in non-client area
00203     DrawGripper(&dc, rectWindow);
00204 }
00205
00206 void CCJToolBarBase::DoPaint(CDC* pDC)
00207 {
00208     ASSERT_VALID(this);
00209     ASSERT_VALID(pDC);
00210
00211     // paint inside client area
00212     CRect rect;
00213     GetClientRect(rect);
00214     DrawBorders(pDC, rect);
00215     DrawGripper(pDC, rect);
00216 }
00217
00218 void CCJToolBarBase::DrawBorders(CDC* pDC, CRect& rect)
00219 {
00220     ASSERT_VALID(this);
00221     ASSERT_VALID(pDC);
00222
00223     DWORD dwStyle = m_dwStyle;
00224     if (!(dwStyle & CBRS_BORDER_ANY))
00225         return;
00226
00227     // prepare for dark lines
00228     ASSERT(rect.top == 0 && rect.left == 0);
00229     if(m_bInReBar)
00230     {
00231         CRect rect1, rect2;
00232         rect1 = rect;
00233         rect2 = rect;
00234
00235 #if _MFC_VER >= 0x700
00236         COLORREF clr = afxData.clrBtnShadow;
00237 #else
00238         COLORREF clr = afxData.bWin4 ? afxData.clrBtnShadow : afxData.clrWindowFrame;
00239 #endif
00240
00241         // draw dark line one pixel back/up
00242         if (dwStyle & CBRS_BORDER_3D)
00243         {
00244             rect1.right -= CX_BORDER;
00245             rect1.bottom -= CY_BORDER;
00246         }
00247         if (dwStyle & CBRS_BORDER_TOP)
00248             rect2.top += afxData.cyBorder2;
00249         if (dwStyle & CBRS_BORDER_BOTTOM)
00250             rect2.bottom -= afxData.cyBorder2;
00251
00252         // draw left and top
00253         if (dwStyle & CBRS_BORDER_LEFT)
00254             pDC->FillSolidRect(0, rect2.top, CX_BORDER, rect2.Height(), clr);
00255         if (dwStyle & CBRS_BORDER_TOP)
00256             pDC->FillSolidRect(0, 0, rect.right, CY_BORDER, clr);
00257
00258         // draw right and bottom
00259         if (dwStyle & CBRS_BORDER_RIGHT)
00260             pDC->FillSolidRect(rect1.right, rect2.top, -CX_BORDER, rect2.Height(), clr);
00261         if (dwStyle & CBRS_BORDER_BOTTOM)
00262             pDC->FillSolidRect(0, rect1.bottom, rect.right, -CY_BORDER, clr);
00263
00264         if (dwStyle & CBRS_BORDER_3D)
00265         {
00266             // prepare for hilite lines
00267             clr = afxData.clrBtnHilite;
00268
00269             // draw left and top
00270             if (dwStyle & CBRS_BORDER_LEFT)
00271                 pDC->FillSolidRect(1, rect2.top, CX_BORDER, rect2.Height(), clr);
00272             if (dwStyle & CBRS_BORDER_TOP)
00273                 pDC->FillSolidRect(0, 1, rect.right, CY_BORDER, clr);
00274
00275             // draw right and bottom
00276             if (dwStyle & CBRS_BORDER_RIGHT)
00277                 pDC->FillSolidRect(rect.right, rect2.top, -CX_BORDER, rect2.Height(), clr);
00278             if (dwStyle & CBRS_BORDER_BOTTOM)
00279                 pDC->FillSolidRect(0, rect.bottom, rect.right, -CY_BORDER, clr);
00280         }
00281
00282         if (dwStyle & CBRS_BORDER_LEFT)
00283             rect.left += afxData.cxBorder2;
00284         if (dwStyle & CBRS_BORDER_TOP)
00285             rect.top += afxData.cyBorder2;
00286         if (dwStyle & CBRS_BORDER_RIGHT)
00287             rect.right -= afxData.cxBorder2;
00288         if (dwStyle & CBRS_BORDER_BOTTOM)
00289             rect.bottom -= afxData.cyBorder2;
00290     }
00291     else
00292     {
00293         if(dwStyle & CBRS_BORDER_RIGHT) {
00294             pDC->FillSolidRect(rect.right-1, 0, rect.right, rect.bottom, afxData.clrBtnShadow);
00295             rect.right--;
00296         }
00297         if(dwStyle & CBRS_BORDER_BOTTOM) {
00298             pDC->FillSolidRect(0, rect.bottom-1, rect.right, rect.bottom, afxData.clrBtnShadow);
00299             rect.bottom--;
00300         }
00301         if(dwStyle & CBRS_BORDER_TOP) {
00302             pDC->FillSolidRect(0, 0, rect.right, 1, afxData.clrBtnHilite);
00303             rect.top++;
00304         }
00305         if(dwStyle & CBRS_BORDER_LEFT) {
00306             pDC->FillSolidRect(0, 0, 1, rect.bottom, afxData.clrBtnHilite);
00307             rect.left++;
00308         }
00309     }
00310 }
00311
00312 #define CX_GRIPPER          3
00313 #define CY_GRIPPER          3
00314 #define CX_BORDER_GRIPPER   2
00315 #define CY_BORDER_GRIPPER   2
00316
00317 void CCJToolBarBase::DrawGripper(CDC* pDC, const CRect& rect)
00318 {
00319     // if we are floating return.
00320     if( m_dwStyle & CBRS_FLOATING ) {
00321         return;
00322     }
00323
00324     // if we are to draw the extended "office" style gripper.
00325     if(( m_dwStyle & CBRS_GRIPPER ) && ( m_bExStyle == true ))
00326     {
00327         // draw the gripper in the border
00328         if (m_dwStyle & CBRS_ORIENT_HORZ)
00329         {
00330             // Draw the first gripper.
00331             pDC->Draw3dRect( rect.left+3, rect.top+2, 3, rect.Height()-4,
00332                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00333
00334             pDC->SetPixel( rect.left+3, rect.top+2+rect.Height()-5,
00335                 afxData.clrBtnHilite);
00336
00337             // Draw the second gripper.
00338             pDC->Draw3dRect( rect.left+6, rect.top+2, 3, rect.Height()-4,
00339                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00340
00341             pDC->SetPixel( rect.left+6, rect.top+2+rect.Height()-5,
00342                 afxData.clrBtnHilite);
00343         }
00344         else
00345         {
00346             // Draw the first gripper.
00347             pDC->Draw3dRect( rect.left+2, rect.top+3, rect.Width()-4, 3,
00348                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00349
00350             pDC->SetPixel( rect.left+2+rect.Width()-5, rect.top+3,
00351                 afxData.clrBtnHilite);
00352
00353             // Draw the second gripper.
00354             pDC->Draw3dRect( rect.left+2, rect.top+6, rect.Width()-4, 3,
00355                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00356
00357             pDC->SetPixel( rect.left+2+rect.Width()-5, rect.top+6,
00358                 afxData.clrBtnHilite);
00359         }
00360
00361         GdiFlush();
00362     }
00363
00364     // if we are to draw the "ReBar" style gripper.
00365     else
00366     if(( m_dwStyle & CBRS_GRIPPER ) && ( m_bInReBar == true ))
00367     {
00368         // draw the gripper in the border
00369         if (m_dwStyle & CBRS_ORIENT_HORZ)
00370         {
00371             // Draw the first gripper.
00372             pDC->Draw3dRect( rect.left+CX_BORDER_GRIPPER, rect.top+m_cyTopBorder,
00373                 CX_GRIPPER, rect.Height()-m_cyTopBorder-m_cyBottomBorder,
00374                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00375         }
00376         else
00377         {
00378             // Draw the first gripper.
00379             pDC->Draw3dRect( rect.left+m_cyTopBorder, rect.top+CY_BORDER_GRIPPER,
00380                 rect.Width()-m_cyTopBorder-m_cyBottomBorder, CY_GRIPPER,
00381                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00382         }
00383
00384         GdiFlush();
00385     }
00386
00387     // by default, we will draw the "visual studio" style gripper.
00388     else
00389     if( m_dwStyle & CBRS_GRIPPER )
00390     {
00391         // draw the gripper in the border
00392         if (m_dwStyle & CBRS_ORIENT_HORZ)
00393         {
00394             // Draw the first gripper.
00395             pDC->Draw3dRect( rect.left+1, rect.top+2, 3, rect.Height()-4,
00396                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00397
00398             // Draw the second gripper.
00399             pDC->Draw3dRect( rect.left+5, rect.top+2, 3, rect.Height()-4,
00400                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00401         }
00402         else
00403         {
00404             // Draw the first gripper.
00405             pDC->Draw3dRect( rect.left+2, rect.top+1, rect.Width()-4, 3,
00406                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00407
00408             // Draw the second gripper.
00409             pDC->Draw3dRect( rect.left+2, rect.top+5, rect.Width()-4, 3,
00410                 afxData.clrBtnHilite, afxData.clrBtnShadow);
00411         }
00412
00413         GdiFlush();
00414     }
00415 }
00416
00417 // input CRect should be client rectangle size
00418 void CCJToolBarBase::CalcInsideRect(CRect& rect, BOOL bHorz) const
00419 {
00420     ASSERT_VALID(this);
00421     DWORD dwStyle = m_dwStyle;
00422
00423     if (dwStyle & CBRS_BORDER_LEFT)
00424         rect.left += afxData.cxBorder2;
00425     if (dwStyle & CBRS_BORDER_TOP)
00426         rect.top += afxData.cyBorder2;
00427     if (dwStyle & CBRS_BORDER_RIGHT)
00428         rect.right -= afxData.cxBorder2;
00429     if (dwStyle & CBRS_BORDER_BOTTOM)
00430         rect.bottom -= afxData.cyBorder2;
00431
00432     // inset the top and bottom.
00433     if (bHorz)
00434     {
00435         rect.left += m_cxLeftBorder;
00436         rect.top += m_cyTopBorder;
00437         rect.right -= m_cxRightBorder;
00438         rect.bottom -= m_cyBottomBorder;
00439         if ((m_dwStyle & (CBRS_GRIPPER|CBRS_FLOATING)) == CBRS_GRIPPER)
00440         {
00441             rect.left += CX_BORDER_GRIPPER+CX_GRIPPER+CX_BORDER_GRIPPER;
00442
00443             if( m_bExStyle == true ) {
00444                 rect.left += CX_GRIPPER;
00445             }
00446
00447             if(( m_bExStyle == false ) && ( m_bInReBar == false )) {
00448                 rect.left -= CX_BORDER_GRIPPER+CX_GRIPPER;
00449             }
00450         }
00451     }
00452     else
00453     {
00454         rect.left += m_cyTopBorder;
00455         rect.top += m_cxLeftBorder;
00456         rect.right -= m_cyBottomBorder;
00457         rect.bottom -= m_cxRightBorder;
00458         if ((m_dwStyle & (CBRS_GRIPPER|CBRS_FLOATING)) == CBRS_GRIPPER)
00459         {
00460             rect.top += CY_BORDER_GRIPPER+CY_GRIPPER+CY_BORDER_GRIPPER;
00461
00462             if( m_bExStyle == true ) {
00463                 rect.top += CY_GRIPPER;
00464             }
00465
00466             if(( m_bExStyle == false ) && ( m_bInReBar == false )) {
00467                 rect.top -= CY_BORDER_GRIPPER+CY_GRIPPER;
00468             }
00469         }
00470     }
00471 }
00472
00474
00475 IMPLEMENT_DYNAMIC(CCJToolBarBase, CControlBar)
00476
00477
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJHyperLink Member List

This is the complete list of members for CCJHyperLink, including all inherited members.

CCJHyperLink() | CCJHyperLink |
CtlColor(CDC *pDC, UINT nCtlColor) | CCJHyperLink | [protected]
GetAutoSize() const | CCJHyperLink | [virtual]
GetHoverColor() const | CCJHyperLink | [virtual]
GetLinkColor() const | CCJHyperLink | [virtual]
GetLinkCursor() const | CCJHyperLink | [virtual]
GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata) | CCJHyperLink | [protected, virtual]
GetUnderline() const | CCJHyperLink | [virtual]
GetURL() const | CCJHyperLink | [virtual]
GetVisited() const | CCJHyperLink | [virtual]
GetVisitedColor() const | CCJHyperLink | [virtual]
GotoURL(LPCTSTR url, int showcmd) | CCJHyperLink | [virtual]
m_bAdjustToFit | CCJHyperLink | [protected]
m_bOverControl | CCJHyperLink | [protected]
m_bUnderline | CCJHyperLink | [protected]
m_bVisited | CCJHyperLink | [protected]
m_crHoverColor | CCJHyperLink | [protected]
m_crLinkColor | CCJHyperLink | [protected]
m_crVisitedColor | CCJHyperLink | [protected]
m_Font | CCJHyperLink | [protected]
m_hLinkCursor | CCJHyperLink | [protected]
m_strURL | CCJHyperLink | [protected]
m_ToolTip | CCJHyperLink | [protected]
OnClicked() | CCJHyperLink | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJHyperLink | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJHyperLink | [protected]
PositionWindow() | CCJHyperLink | [protected, virtual]
PreSubclassWindow() | CCJHyperLink | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CCJHyperLink | [virtual]
ReportError(int nError) | CCJHyperLink | [protected, virtual]
SetAutoSize(BOOL bAutoSize=TRUE) | CCJHyperLink | [virtual]
SetColors(COLORREF crLinkColor, COLORREF crVisitedColor, COLORREF crHoverColor=-1) | CCJHyperLink | [virtual]
SetDefaultCursor() | CCJHyperLink | [protected, virtual]
SetLinkCursor(HCURSOR hCursor) | CCJHyperLink | [virtual]
SetUnderline(BOOL bUnderline=TRUE) | CCJHyperLink | [virtual]
SetURL(CString strURL) | CCJHyperLink | [virtual]
SetVisited(BOOL bVisited=TRUE) | CCJHyperLink | [virtual]
~CCJHyperLink() | CCJHyperLink | [virtual]

Generated on Sat Aug 7 22:49:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPyCvsConsole Member List

This is the complete list of members for CPyCvsConsole, including all inherited members.

CPyCvsConsole() | CPyCvsConsole | [inline]
cvs_err(const char *txt, long len) | CPyCvsConsole | [inline, virtual]
cvs_out(const char *txt, long len) | CPyCvsConsole | [inline, virtual]
m_err | CPyCvsConsole |
m_out | CPyCvsConsole |
~CPyCvsConsole() | CPyCvsConsole | [inline, virtual]

Generated on Sat Aug 7 22:56:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/GfxSplitterWnd.cpp Source File

WinCvs/CJLib/CJLibrary/GfxSplitterWnd.cpp

Go to the documentation of this file.
00001 // Copyright (c) Iuri Apollonio 1998
00002 // Use & modify as you want & need, and leave those 3 lines.
00003 // http://www.codeguru.com
00004 //
00005 // GfxSplitterWnd.cpp: implementation of the CGfxSplitterWnd class.
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:49 $
00011  * $Revision: 1.1.1.2 $
00012  * $Archive: /CodeJock/CJLibrary/GfxSplitterWnd.cpp $
00013  *
00014  * $History: GfxSplitterWnd.cpp $
00015  *
00016  * *****************  Version 5  *****************
00017  * User: Kirk Stowell Date: 10/31/99   Time: 11:14p
00018  * Updated in $/CodeJock/CJLibrary
00019  * Modified tracker to use halftone brush so that it is more consistent
00020  * with other controls.
00021  *
00022  * *****************  Version 4  *****************
00023  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00024  * Updated in $/CodeJock/CJLibrary
00025  * Fixed potential resource and memory leak problems.
00026  *
00027  * *****************  Version 3  *****************
00028  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00029  * Updated in $/CodeJock/CJLibrary
00030  * Added source control history to file header.
00031  *
00032  ***************************************************************************/
00034
00035 #include "stdafx.h"
00036 #include "GfxSplitterWnd.h"
00037
00038 #ifdef _DEBUG
00039 #undef THIS_FILE
00040 static char THIS_FILE[]=__FILE__;
00041 #define new DEBUG_NEW
00042 #endif
00043
00044 #define CX_BORDER   1
00045 #define CY_BORDER   1
00046
00047 #include <afxpriv.h>
00048
00049 static BOOL bNotWin4;
00050
00052 // Construction/Destruction
00054
00055 BEGIN_MESSAGE_MAP(CGfxSplitterWnd, CSplitterWnd)
00056     //{{AFX_MSG_MAP(CGfxSplitterWnd)
00057     ON_WM_ERASEBKGND()
00058     ON_WM_PAINT()
00059     //}}AFX_MSG_MAP
00060 END_MESSAGE_MAP()
00061
00062 CGfxSplitterWnd::CGfxSplitterWnd()
00063 {
00064     m_cxBorder = 0;
00065     m_cyBorder = 0;
00066     m_cxSplitter = m_cySplitter = 2 + 2;
00067     m_cxSplitterGap = m_cySplitterGap = 2 + 2;
00068
00069
00070     DWORD dwVersion = ::GetVersion();
00071     BOOL bWin4 = (BYTE)dwVersion >= 4;
00072     bNotWin4 = 1 - bWin4;   // for convenience
00073
00074     m_upBorder = 5;
00075     bWhiteLine = false;
00076 }
00077
00078 CGfxSplitterWnd::~CGfxSplitterWnd()
00079 {
00080
00081 }
00082
00083 void CGfxSplitterWnd::OnDrawSplitter(CDC* pDC, ESplitType nType, const CRect& rectArg)
00084 {
00085     if (pDC == NULL)
00086     {
00087         RedrawWindow(rectArg, NULL, RDW_INVALIDATE|RDW_NOCHILDREN);
00088         return;
00089     }
00090     ASSERT_VALID(pDC);
00091     CRect rect = rectArg;
00092     switch (nType)
00093     {
00094     case splitBorder:
00095         return;
00096     case splitBox:
00097         pDC->Draw3dRect(rect, GetSysColor(COLOR_3DFACE), GetSysColor(COLOR_WINDOWFRAME));
00098         rect.InflateRect(-CX_BORDER, -CY_BORDER);
00099         pDC->Draw3dRect(rect, GetSysColor(COLOR_BTNHIGHLIGHT), GetSysColor(COLOR_BTNSHADOW));
00100         rect.InflateRect(-CX_BORDER, -CY_BORDER);
00101         break;
00102     }
00103
00104     COLORREF clr = GetSysColor(COLOR_3DFACE);
00105     pDC->FillSolidRect(rect, clr);
00106 }
00107
00108 void CGfxSplitterWnd::OnInvertTracker(const CRect & rect)
00109 {
00110     ASSERT_VALID(this);
00111     ASSERT(!rect.IsRectEmpty());
00112     ASSERT((GetStyle() & WS_CLIPCHILDREN) == 0);
00113
00114     CDC* pDC = GetDC();
00115     CBrush* pBrush = CDC::GetHalftoneBrush();
00116     CBrush* pOldBrush = NULL;
00117
00118     if (pBrush != NULL) {
00119         pOldBrush = pDC->SelectObject(pBrush);
00120     }
00121
00122     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATINVERT);
00123
00124     if (pOldBrush != NULL) {
00125         pDC->SelectObject(pOldBrush);
00126     }
00127     ReleaseDC(pDC);
00128 }
00129
00130 // repositions client area of specified window
00131 // assumes everything has WS_BORDER or is inset like it does
00132 //  (includes scroll bars)
00133 static void AFXAPI DeferClientPos(AFX_SIZEPARENTPARAMS* lpLayout,
00134     CWnd* pWnd, int x, int y, int cx, int cy, BOOL bScrollBar)
00135 {
00136     ASSERT(pWnd != NULL);
00137     ASSERT(pWnd->m_hWnd != NULL);
00138
00139     if (bScrollBar)
00140     {
00141         // if there is enough room, draw scroll bar without border
00142         // if there is not enough room, set the WS_BORDER bit so that
00143         //   we will at least get a proper border drawn
00144         BOOL bNeedBorder = (cx <= CX_BORDER || cy <= CY_BORDER);
00145         pWnd->ModifyStyle(bNeedBorder ? 0 : WS_BORDER,
00146             bNeedBorder ? WS_BORDER : 0);
00147     }
00148     CRect rect(x, y, x+cx, y+cy);
00149
00150     // adjust for border size (even if zero client size)
00151
00152     // adjust for 3d border (splitter windows have implied border)
00153     if ((pWnd->GetExStyle() & WS_EX_CLIENTEDGE) ||
00154           pWnd->IsKindOf(RUNTIME_CLASS(CSplitterWnd)))
00155         rect.InflateRect(CX_BORDER*2, CY_BORDER*2);
00156
00157     // first check if the new rectangle is the same as the current
00158     CRect rectOld;
00159     pWnd->GetWindowRect(rectOld);
00160     pWnd->GetParent()->ScreenToClient(&rectOld);
00161     if (rect != rectOld)
00162         AfxRepositionWindow(lpLayout, pWnd->m_hWnd, rect);
00163 }
00164
00165
00166 static void AFXAPI LayoutRowCol(CSplitterWnd::CRowColInfo* pInfoArray,
00167     int nMax, int nSize, int nSizeSplitter)
00168 {
00169     ASSERT(pInfoArray != NULL);
00170     ASSERT(nMax > 0);
00171     ASSERT(nSizeSplitter > 0);
00172
00173     CSplitterWnd::CRowColInfo* pInfo;
00174     int i;
00175
00176     if (nSize < 0)
00177         nSize = 0;  // if really too small, layout as zero size
00178
00179     // start with ideal sizes
00180     for (i = 0, pInfo = pInfoArray; i < nMax-1; i++, pInfo++)
00181     {
00182         if (pInfo->nIdealSize < pInfo->nMinSize)
00183             pInfo->nIdealSize = 0;      // too small to see
00184         pInfo->nCurSize = pInfo->nIdealSize;
00185     }
00186     pInfo->nCurSize = INT_MAX;  // last row/column takes the rest
00187
00188     for (i = 0, pInfo = pInfoArray; i < nMax; i++, pInfo++)
00189     {
00190         ASSERT(nSize >= 0);
00191         if (nSize == 0)
00192         {
00193             // no more room (set pane to be invisible)
00194             pInfo->nCurSize = 0;
00195             continue;       // don't worry about splitters
00196         }
00197         else if (nSize < pInfo->nMinSize && i != 0)
00198         {
00199             // additional panes below the recommended minimum size
00200             //   aren't shown and the size goes to the previous pane
00201             pInfo->nCurSize = 0;
00202
00203             // previous pane already has room for splitter + border
00204             //   add remaining size and remove the extra border
00205             ASSERT(CX_BORDER*2 == CY_BORDER*2);
00206             (pInfo-1)->nCurSize += nSize + CX_BORDER*2;
00207             nSize = 0;
00208         }
00209         else
00210         {
00211             // otherwise we can add the second pane
00212             ASSERT(nSize > 0);
00213             if (pInfo->nCurSize == 0)
00214             {
00215                 // too small to see
00216                 if (i != 0)
00217                     pInfo->nCurSize = 0;
00218             }
00219             else if (nSize < pInfo->nCurSize)
00220             {
00221                 // this row/col won't fit completely - make as small as possible
00222                 pInfo->nCurSize = nSize;
00223                 nSize = 0;
00224             }
00225             else
00226             {
00227                 // can fit everything
00228                 nSize -= pInfo->nCurSize;
00229             }
00230         }
00231
00232         // see if we should add a splitter
00233         ASSERT(nSize >= 0);
00234         if (i != nMax - 1)
00235         {
00236             // should have a splitter
00237             if (nSize > nSizeSplitter)
00238             {
00239                 nSize -= nSizeSplitter; // leave room for splitter + border
00240                 ASSERT(nSize > 0);
00241             }
00242             else
00243             {
00244                 // not enough room - add left over less splitter size
00245                 ASSERT(CX_BORDER*2 == CY_BORDER*2);
00246                 pInfo->nCurSize += nSize;
00247                 if (pInfo->nCurSize > (nSizeSplitter - CX_BORDER*2))
00248                     pInfo->nCurSize -= (nSizeSplitter - CY_BORDER*2);
00249                 nSize = 0;
00250             }
00251         }
00252     }
00253     ASSERT(nSize == 0); // all space should be allocated
00254 }
00255
00256 void CGfxSplitterWnd::RecalcLayout()
00257 {
00258     ASSERT_VALID(this);
00259     ASSERT(m_nRows > 0 && m_nCols > 0); // must have at least one pane
00260
00261     CRect rectClient;
00262     GetClientRect(rectClient);
00263     rectClient.InflateRect(-m_cxBorder, -m_cyBorder);
00264     rectClient.top += m_upBorder;
00265
00266     CRect rectInside;
00267     GetInsideRect(rectInside);
00268
00269     // layout columns (restrict to possible sizes)
00270     LayoutRowCol(m_pColInfo, m_nCols, rectInside.Width(), m_cxSplitterGap);
00271     LayoutRowCol(m_pRowInfo, m_nRows, rectInside.Height(), m_cySplitterGap);
00272
00273     // adjust the panes (and optionally scroll bars)
00274
00275     // give the hint for the maximum number of HWNDs
00276     AFX_SIZEPARENTPARAMS layout;
00277     layout.hDWP = ::BeginDeferWindowPos((m_nCols + 1) * (m_nRows + 1) + 1);
00278
00279     // size of scrollbars
00280     int cx = (rectClient.right - rectInside.right - bNotWin4);// - afxData.bNotWin4;
00281     int cy = (rectClient.bottom - rectInside.bottom - bNotWin4);// - afxData.bNotWin4;
00282
00283     // reposition size box
00284     if (m_bHasHScroll && m_bHasVScroll)
00285     {
00286         CWnd* pScrollBar = GetDlgItem(AFX_IDW_SIZE_BOX);
00287         ASSERT(pScrollBar != NULL);
00288
00289         // fix style if necessary
00290         BOOL bSizingParent = (GetSizingParent() != NULL);
00291         // modifyStyle returns TRUE if style changes
00292         if (pScrollBar->ModifyStyle(SBS_SIZEGRIP|SBS_SIZEBOX,
00293                 bSizingParent ? SBS_SIZEGRIP : SBS_SIZEBOX))
00294             pScrollBar->Invalidate();
00295         pScrollBar->EnableWindow(bSizingParent);
00296
00297         // reposition the size box
00298         DeferClientPos(&layout, pScrollBar,
00299             rectInside.right + bNotWin4,
00300             rectInside.bottom + bNotWin4, cx, cy, TRUE);
00301     }
00302
00303     // reposition scroll bars
00304     if (m_bHasHScroll)
00305     {
00306         int cxSplitterBox = m_cxSplitter + bNotWin4;// split box bigger
00307         int x = rectClient.left;
00308         int y = rectInside.bottom + bNotWin4;
00309         for (int col = 0; col < m_nCols; col++)
00310         {
00311             CWnd* pScrollBar = GetDlgItem(AFX_IDW_HSCROLL_FIRST + col);
00312             ASSERT(pScrollBar != NULL);
00313             int cx = m_pColInfo[col].nCurSize;
00314             if (col == 0 && m_nCols < m_nMaxCols)
00315                 x += cxSplitterBox, cx -= cxSplitterBox;
00316             DeferClientPos(&layout, pScrollBar, x, y, cx, cy, TRUE);
00317             x += cx + m_cxSplitterGap;
00318         }
00319     }
00320
00321     if (m_bHasVScroll)
00322     {
00323         int cySplitterBox = m_cySplitter + bNotWin4;// split box bigger
00324         int x = rectInside.right + bNotWin4;
00325         int y = rectClient.top;
00326         for (int row = 0; row < m_nRows; row++)
00327         {
00328             CWnd* pScrollBar = GetDlgItem(AFX_IDW_VSCROLL_FIRST + row);
00329             ASSERT(pScrollBar != NULL);
00330             int cy = m_pRowInfo[row].nCurSize;
00331             if (row == 0 && m_nRows < m_nMaxRows)
00332                 y += cySplitterBox, cy -= cySplitterBox;
00333             DeferClientPos(&layout, pScrollBar, x, y, cx, cy, TRUE);
00334             y += cy + m_cySplitterGap;
00335         }
00336     }
00337
00338     //BLOCK: Reposition all the panes
00339     {
00340         int x = rectClient.left;
00341         for (int col = 0; col < m_nCols; col++)
00342         {
00343             int cx = m_pColInfo[col].nCurSize;
00344             int y = rectClient.top;
00345             for (int row = 0; row < m_nRows; row++)
00346             {
00347                 int cy = m_pRowInfo[row].nCurSize;
00348                 CWnd* pWnd = GetPane(row, col);
00349                 DeferClientPos(&layout, pWnd, x, y, cx, cy, FALSE);
00350                 y += cy + m_cySplitterGap;
00351             }
00352             x += cx + m_cxSplitterGap;
00353         }
00354     }
00355
00356     // move and resize all the windows at once!
00357     if (layout.hDWP == NULL || !::EndDeferWindowPos(layout.hDWP))
00358         TRACE0("Warning: DeferWindowPos failed - low system resources.\n");
00359
00360     // invalidate all the splitter bars (with NULL pDC)
00361     DrawAllSplitBars(NULL, rectInside.right, rectInside.bottom);
00362 }
00363
00364 void CGfxSplitterWnd::GetInsideRect(CRect& rect) const
00365 {
00366     CSplitterWnd::GetInsideRect(rect);
00367     rect.top += m_upBorder;
00368 /*  ASSERT_VALID(this);
00369
00370     GetClientRect(rect);
00371     ASSERT(rect.left == 0 && rect.top == 0);
00372
00373     // subtract space for 3d borders
00374     rect.InflateRect(-m_cxBorder, -m_cyBorder);
00375     rect.top += m_upBorder;
00376
00377     // subtract scrollbar clearance
00378     if (m_bHasVScroll)
00379         rect.right -= GetSystemMetrics(SM_CXVSCROLL);
00380     if (m_bHasHScroll)
00381         rect.bottom -= GetSystemMetrics(SM_CYHSCROLL);*/
00382 }
00383
00384 BOOL CGfxSplitterWnd::OnEraseBkgnd(CDC* pDC)
00385 {
00386 //  return CSplitterWnd::OnEraseBkgnd(pDC);
00387
00388     CRect rectClient;
00389     GetClientRect(rectClient);
00390     rectClient.InflateRect(-m_cxBorder, -m_cyBorder);
00391     rectClient.bottom = rectClient.top + m_upBorder;
00392     pDC->FillSolidRect(rectClient, GetSysColor(COLOR_3DFACE));
00393     return true;
00394 }
00395
00396 void CGfxSplitterWnd::OnPaint()
00397 {
00398     CSplitterWnd::OnPaint();
00399     if (bWhiteLine)
00400     {
00401         CClientDC dc(this);
00402         CRect rectClient;
00403         GetClientRect(rectClient);
00404         CPen pn(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW));
00405         CPen * op = dc.SelectObject(&pn);
00406         dc.MoveTo(rectClient.left, rectClient.top);
00407         dc.LineTo(rectClient.right, rectClient.top);
00408         CPen pn1(PS_SOLID, 1, GetSysColor(COLOR_3DHILIGHT));
00409         dc.SelectObject(&pn1);
00410         dc.MoveTo(rectClient.left, rectClient.top+1);
00411         dc.LineTo(rectClient.right, rectClient.top+1);
00412         dc.SelectObject(op);
00413
00414         // fix potential resource leak - KStowell - 10-21-99
00415         pn.DeleteObject();
00416         pn1.DeleteObject();
00417     }
00418 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/macapp/UPseudoSupport.cpp Source File

rf/support/macapp/UPseudoSupport.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002
00003 #include <stdlib.h>
00004 #include <Errors.h>
00005
00006 #include "UPseudoSupport.h"
00007 #include "UPopup.h"
00008 #include "UDialogTEView.h"
00009 #include "UEditText.h"
00010 #include "UWindow.h"
00011 #include "USlider.h"
00012
00013 #include "uconsole.h"
00014
00015 #define MA_CHECK(cond) Assertion_AC(cond, #cond)
00016
00017 extern "C" char *strdup(const char *str)
00018 {
00019     if(str == 0L)
00020         return 0L;
00021
00022     size_t len = strlen(str);
00023     char *res = (char *)malloc((len + 1) * sizeof(char));
00024     if(res == 0L)
00025         throw CException_AC(mFulErr);
00026     strcpy(res, str);
00027     return res;
00028 }
00029
00030 #undef Inherited
00031 #define Inherited TBehavior
00032
00033 MA_DEFINE_CLASS_M1(TPseudoWinBehavior, Inherited);
00034
00035 TPseudoWinBehavior::TPseudoWinBehavior() : TBehavior(kPseudoWinBehavior), fWidID(-1)
00036 {
00037 }
00038
00039 TPseudoWinBehavior::~TPseudoWinBehavior()
00040 {
00041 }
00042
00043 void TPseudoWinBehavior::DoEvent(EventNumber eventNumber, TEventHandler* source, TEvent* event)
00044 {
00045     // find out the command who fired the event (if any)
00046     int cmdid = -1;
00047
00048     // the typing event is originated by a sub-view of an TEditText field
00049     TEventHandler* ourSource = source;
00050     if(eventNumber == cTyping && MA_MEMBER(ourSource, TDialogTEView))
00051     {
00052         ourSource = ((TDialogTEView *)ourSource)->fEditText;
00053     }
00054
00055     if(fWidID != -1)
00056         cmdid = UEventSendMessage(fWidID, EV_FETCHCMD, 0, ourSource);
00057
00058     if(cmdid != -1) switch(eventNumber)
00059     {
00060         case mBecameTarget:
00061         case mResignedTarget:
00062             UEventNotifyMessage(EV_UPDATEFOCUS, eventNumber == mResignedTarget, ourSource);
00063             break;
00064         case mButtonHit:
00065         case mRadioHit:
00066         case mCheckBoxHit:
00067             UEventSendMessage(fWidID, EV_CMD, cmdid, 0L);
00068             break;
00069         case mHScrollBarHit:
00070         case mVScrollBarHit:
00071             if(MA_MEMBER(ourSource, TSlider) || MA_MEMBER(ourSource, TScrollBar))
00072             {
00073                 TCtlMgr *slider = (TCtlMgr *)ourSource;
00074                 UEventSendMessage(fWidID, EV_SCROLLCHANGE, cmdid, (void *)slider->GetValue());
00075             }
00076             break;
00077         case mPopupHit:
00078             if(MA_MEMBER(ourSource, TPopup))
00079             {
00080                 TPopup *popup = (TPopup *)ourSource;
00081                 short cur = popup->GetCurrentItem();
00082                 CStr255_AC pstr = popup->GetItemText(cur);
00083                 UPStr content(pstr);
00084                 UEventSendMessage(fWidID, EV_COMBO_SEL, UMAKEINT(cmdid, cur - 1),
00085                     (void *)(const char *)content);
00086             }
00087             break;
00088         case mControlHit:
00089             if(MA_MEMBER(ourSource, TSlider))
00090             {
00091                 TSlider *slider = (TSlider *)ourSource;
00092                 UEventSendMessage(fWidID, EV_SCROLLCHANGE, cmdid, (void *)slider->GetValue());
00093             }
00094             break;
00095         case cTyping:
00096             if(MA_MEMBER(ourSource, TEditText))
00097             {
00098                 UEventSendMessage(fWidID, EV_EDITCHANGE, cmdid, 0L);
00099             }
00100             break;
00101         case TPseudoTextListView::kSelectionChanged:
00102         case TPseudoTextListView::kMultiClickSelection:
00103             if(MA_MEMBER(ourSource, TPseudoTextListView))
00104             {
00105                 TPseudoTextListView *txt = (TPseudoTextListView *)ourSource;
00106                 short entry = txt->FirstSelectedItem();
00107                 CChar255_AC name;
00108                 if(entry > 0)
00109                     name = txt->GetItemText(entry);
00110
00111                 UEventSendMessage(fWidID,
00112                     eventNumber == TPseudoTextListView::kSelectionChanged ?
00113                     EV_LIST_SELECTING : EV_LIST_DBLCLICK, UMAKEINT(cmdid, entry - 1),
00114                     (void *)(const char *)name);
00115             }
00116             break;
00117     }
00118
00119     Inherited::DoEvent(eventNumber, source, event);
00120 }
00121
00122
00123 #undef Inherited
00124 #define Inherited TTextListView
00125 MA_DEFINE_CLASS_M0(TPseudoTextListView);
00126
00127 TPseudoTextListView::TPseudoTextListView()
00128 {
00129 }
00130
00131
00132
00133 TPseudoTextListView::~TPseudoTextListView()
00134 {
00135 }
00136
00137
00138 IDType TPseudoTextListView::GetStandardSignature(void) const
00139 {
00140     return TPseudoTextListView::kTextStringListViewSignature;
00141 }
00142
00143 CStr255_AC TPseudoTextListView::GetItemText(GridCoordinate anItem) const
00144 {
00145     MA_CHECK(this->fNumOfRows == this->fStringContainer.size());
00146     MA_CHECK(1 <= anItem && this->fStringContainer.size() >= anItem);
00147
00148     CStr255_AC aString = this->fStringContainer[anItem - 1];
00149     return aString;
00150 }
00151
00152 void TPseudoTextListView::InsStringBefore(short anItem, const char * string)
00153 {
00154     MA_CHECK(1 <= anItem && this->fStringContainer.size() >= anItem - 1);
00155
00156     std::vector<CStr255_AC>::iterator iter = this->fStringContainer.end();
00157
00158     try
00159     {
00160         iter = this->fStringContainer.insert(
00161                     this->fStringContainer.begin() + (anItem - 1), string);
00162     }
00163     catch(CException_AC& theException)
00164     {
00165         if (iter != this->fStringContainer.end())
00166         {
00167             this->fStringContainer.erase(iter);
00168                 // Put it back like it was.  This will maintain internal consistency.
00169         }
00170         throw;
00171     }
00172
00173     this->InsItemBefore(anItem, 1);
00174 }
00175
00176 void TPseudoTextListView::InsStringFirst(const char * string)
00177 {
00178     this->InsStringBefore(1, string);
00179 }
00180
00181 void TPseudoTextListView::InsStringLast(const char * string)
00182 {
00183     this->InsStringBefore(this->fNumOfRows + 1, string);
00184 }
00185
00186 void TPseudoTextListView::DelItemAt(GridCoordinate anItem, GridCoordinate numOfItems)
00187 {
00188     this->fStringContainer.erase(
00189             this->fStringContainer.begin() + (anItem - 1),
00190             this->fStringContainer.begin() + (anItem - 1 + numOfItems));
00191
00192     this->Inherited::DelItemAt(anItem, numOfItems);
00193 }
00194
00195 void TPseudoTextListView::RemoveAll(void)
00196 {
00197     this->DelItemFirst(this->fNumOfRows);
00198 }
00199
00200 bool TPseudoTextListView::DoMouseCommand_SelectCells(GridCell whichCell, TToolboxEvent * event)
00201 {
00202     MA_CHECK(nil != event);
00203
00204     bool selectionChanged = false;
00205         // Will be true if the selection changed.
00206
00207     if (this->CanSelectCell(whichCell))
00208     {
00209         bool shifted = event->IsShiftKeyPressed();
00210         bool commandKey = event->IsCommandKeyPressed();
00211
00212         if (commandKey)
00213         {
00214             this->SelectCell(whichCell, !this->fSingleSelection,
00215                     kHighlight, !this->IsCellSelected(whichCell));
00216
00217             selectionChanged = true;
00218         }
00219         else if (shifted && !this->fSingleSelection)
00220         {
00221             GridCell runner = whichCell;
00222
00223             if (this->IsCellSelected(whichCell))
00224             {
00225                 for ( ; runner.v <= this->fNumOfRows; runner.v++)
00226                 {
00227                     if (!this->IsCellSelected(runner))
00228                     {
00229                         break;
00230                     }
00231
00232                     this->SelectCell(runner, kExtend, kHighlight, kDeSelect);
00233                 }
00234             }
00235             else
00236             {
00237                 for ( ; runner.v > 0; runner.v--)
00238                 {
00239                     if (this->IsCellSelected(runner))
00240                     {
00241                         break;
00242                     }
00243
00244                     this->SelectCell(runner, kExtend, kHighlight, kSelect);
00245                 }
00246             }
00247
00248             selectionChanged = true;
00249         }
00250         else if (!this->IsCellSelected(whichCell))
00251         {
00252             this->SelectCell(whichCell, kDontExtend, kHighlight, kSelect);
00253
00254             selectionChanged = true;
00255         }
00256     }
00257
00258     return selectionChanged;
00259 }
00260
00261 void TPseudoTextListView::DoMouseCommand(CViewPoint & theMouse, TToolboxEvent * event, CPoint_AC)
00262 {
00263     GridCell aCell;
00264
00265     if (badChoice != this->IdentifyPoint(theMouse, aCell))
00266     {
00267         this->DoMouseCommand_SelectCells(aCell, event);
00268             // First be sure to select/deselect the cell they clicked on.
00269
00270         if (event->GetClickCount() > 1)
00271         {
00272             this->HandleEvent(kMultiClickSelection, this, event);
00273         }
00274     }
00275 }
00276
00277 void TPseudoTextListView::DoKeyEvent(TToolboxEvent* event)// override
00278 {
00279     Boolean handledCharacter = false;
00280
00281     if (this->IsEnabled() && this->Focus())     // if view is not enabled then we don't take ANY keystrokes
00282     {
00283         GridCell selected;
00284         unsigned char ch = event->GetText()[1];
00285
00286         if (ch == chUp)
00287         {
00288             selected = this->FirstSelectedCell();
00289             selected.v -= 1;
00290
00291             this->DoMouseCommand_SelectCells(selected, event);
00292
00293             handledCharacter = true;
00294         }
00295         else if (ch == chDown)
00296         {
00297             selected = this->LastSelectedCell();
00298             selected.v += 1;
00299
00300             this->DoMouseCommand_SelectCells(selected, event);
00301
00302             handledCharacter = true;
00303         }
00304     }
00305
00306     if (!handledCharacter)
00307         Inherited::DoKeyEvent(event);
00308 }
00309
00310 void TPseudoTextListView::SetSelection(const TGridViewDesignator* cellsToSelect,
00311                         bool extendSelection, bool highlight, bool select)
00312 {
00313     this->Inherited::SetSelection(cellsToSelect, extendSelection, highlight, select);
00314
00315     this->Changed(kSelectionChanged, this);
00316     this->HandleEvent(kSelectionChanged, this, nil);
00317 }
00318
00319 #undef Inherited
00320 #define Inherited TView
00321
00322 MA_DEFINE_CLASS_M1(TPseudoCustomView, Inherited);
00323
00324 TPseudoCustomView::TPseudoCustomView()
00325 {
00326 }
00327
00328 TPseudoCustomView::~TPseudoCustomView()
00329 {
00330 }
00331
00332 void TPseudoCustomView::Draw(const CViewRect& area)
00333 {
00334     TWindow *wind = GetWindow();
00335     if(wind != 0L)
00336     {
00337         TPseudoWinBehavior *pseudo = dynamic_cast_AC(TPseudoWinBehavior*,
00338             wind->GetBehaviorWithIdentifier(TPseudoWinBehavior::kPseudoWinBehavior));
00339         if(pseudo != 0L)
00340         {
00341             int cmdid = UEventSendMessage(pseudo->GetWidID(), EV_FETCHCMD, 0, this);
00342             if(cmdid != -1)
00343                 UEventSendMessage(pseudo->GetWidID(), EV_CUSTOM_DRAW, cmdid, this);
00344         }
00345     }
00346 }
00347
00348
00349 #undef Inherited
00350 #define Inherited TEditText
00351
00352 MA_DEFINE_CLASS_M1(TPseudoDoubleNumberText, Inherited);
00353
00354 TPseudoDoubleNumberText::TPseudoDoubleNumberText() : fMaximum(DBL_MAX), fMinimum(DBL_MIN),
00355     fPrecision(kDefaultPrecision)
00356 {
00357 }
00358
00359 TPseudoDoubleNumberText::~TPseudoDoubleNumberText()
00360 {
00361 }
00362
00363 IDType TPseudoDoubleNumberText::GetStandardSignature() const
00364 {
00365     return kStdDoubleNumberText;
00366 }
00367
00368 void TPseudoDoubleNumberText::ReadFields(CStream_AC* aStream)
00369 {
00370     Inherited::ReadFields(aStream);
00371
00372     CStr255_AC theString;
00373     theString = aStream->ReadString(255);
00374     sscanf(CChar255_AC(theString), "%lf", &fMinimum);
00375     theString = aStream->ReadString(255);
00376     sscanf(CChar255_AC(theString), "%lf", &fMaximum);
00377     fPrecision = aStream->ReadInteger();
00378 }
00379
00380 void TPseudoDoubleNumberText::WriteFields(CStream_AC* aStream) const
00381 {
00382     Inherited::WriteFields(aStream);
00383
00384     char tmp[255];
00385     sprintf(tmp, "%lf", fMinimum);
00386     aStream->WriteString(CStr255_AC(tmp));
00387     sprintf(tmp, "%lf", fMaximum);
00388     aStream->WriteString(CStr255_AC(tmp));
00389     aStream->WriteLong(fPrecision);
00390 }
00391
00392
00393 double TPseudoDoubleNumberText::GetValue()
00394 {
00395     double theValue = 0.0;
00396     CStr255_AC theString = GetText();
00397
00398     if (!theString.IsEmpty())
00399     {
00400         sscanf(CChar255_AC(theString), "%lf", &theValue);
00401     }
00402
00403     return theValue;
00404 }
00405
00406 static void NumberToString_US(double n, UStr & s, int decimalPlaces)
00407 {
00408     char tmp[255];
00409     if(decimalPlaces > 0)
00410         sprintf(tmp, "%0.*f", decimalPlaces, n);
00411     else
00412         sprintf(tmp, "%ld", round(n));
00413     s = tmp;
00414 }
00415
00416 void TPseudoDoubleNumberText::SetValue(double newValue, bool redraw)
00417 {
00418     newValue = fMinimum >= newValue ? fMinimum : newValue;
00419     newValue = newValue <= fMaximum ? newValue : fMaximum;
00420
00421     UStr aString;
00422     NumberToString_US(newValue, aString, fPrecision);
00423
00424     CStr255_AC tempString = aString;
00425     SetText(tempString, redraw);
00426 }
00427
00428 long TPseudoDoubleNumberText::GetValidationError()
00429 {
00430     CStr255_AC theString = GetText();
00431
00432     if (!theString.IsEmpty())
00433     {
00434         double extValue;
00435         bool valid = sscanf(CChar255_AC(theString), "%lf", &extValue) == 1;
00436
00437         if (!valid)
00438             return kNonNumericCharacters;
00439         else if (extValue < fMinimum)
00440             return kValueTooSmall;
00441         else if (extValue > fMaximum)
00442             return kValueTooLarge;
00443     }
00444
00445     return kValidValue;
00446 }
00447
00448 #undef Inherited
00449 #define Inherited TBehavior
00450
00451 MA_DEFINE_CLASS_M1(TPseudoAppBehavior, Inherited);
00452
00453 TPseudoAppBehavior::TPseudoAppBehavior() : TBehavior()
00454 {
00455     SetIdleFreq(0); // ASAP
00456 }
00457
00458 TPseudoAppBehavior::~TPseudoAppBehavior()
00459 {
00460 }
00461
00462 bool TPseudoAppBehavior::DoIdle(IdlePhase phase)
00463 {
00464     ::UEventGiveTime();
00465     return false;
00466 }
00467
00468 void TPseudoAppBehavior::DoMenuCommand(CommandNumber aCommandNumber)
00469 {
00470     if(UMacAppMenu::sMAMenuWidID != -1)
00471     {
00472         int handledFlag;
00473         int res = UEventSendMessageExt(UMacAppMenu::sMAMenuWidID, EV_CMD,
00474             aCommandNumber, 0L, &handledFlag);
00475         if(res == 0 && handledFlag)
00476             return;
00477     }
00478
00479     // regular MacApp handling
00480     Inherited::DoMenuCommand(aCommandNumber);
00481 }
00482
00483 void TPseudoAppBehavior::DoSetupMenus()
00484 {
00485     UWidget::DoValidUI(false);
00486     ::UEventGiveTime();
00487
00488     Inherited::DoSetupMenus();
00489 }
00490
00491 bool TPseudoAppBehavior::DoToolboxEvent(TToolboxEvent* event)
00492 {
00493     if(event && event->GetIdentifier() == activateEvt)
00494     {
00495         bool activate = ((event->GetModifiers()) & activeFlag) != 0;
00496         TWindow * aWindow = TWindow::WMgrToWindow((WindowRef)(event->GetMessage()));
00497         if(aWindow)
00498         {
00499             UEventNotifyMessage(EV_UPDATEFOCUS, !activate, aWindow);
00500                 // so the pseudo widget update its current widget.
00501                 // it's important for the menu handling.
00502         }
00503     }
00504
00505     return Inherited::DoToolboxEvent(event);
00506 }
00507
00508 #undef Inherited
00509 #define Inherited TIconButton
00510
00511 MA_DEFINE_CLASS_M1(TPseudoIconButton, Inherited);
00512
00513 TPseudoIconButton::TPseudoIconButton()
00514 {
00515 }
00516
00517 TPseudoIconButton::~TPseudoIconButton()
00518 {
00519 }
00520
00521 void TPseudoIconButton::ReadFields(CStream_AC* aStream)
00522 {
00523     Inherited::ReadFields(aStream);
00524
00525     *aStream >> fContentType;
00526     SetContentRsrcID(fContentType, fRsrcID);
00527 }
00528
00529 void TPseudoIconButton::WriteFields(CStream_AC* aStream) const
00530 {
00531     Inherited::WriteFields(aStream);
00532
00533     *aStream << fContentType;
00534 }
00535
00536 #undef Inherited
00537 #define Inherited TPopup
00538
00539 MA_DEFINE_CLASS_M1(TBuggyPopup, Inherited);
00540
00541 TBuggyPopup::TBuggyPopup()
00542 {
00543 }
00544
00545 TBuggyPopup::~TBuggyPopup()
00546 {
00547 }
00548
00549 void TBuggyPopup::ReadFields(CStream_AC* aStream)
00550 {
00551     Inherited::ReadFields(aStream);
00552
00553     *aStream >> fRealWidth;
00554 }
00555
00556 void TBuggyPopup::WriteFields(CStream_AC* aStream) const
00557 {
00558     Inherited::WriteFields(aStream);
00559
00560     *aStream << fRealWidth;
00561 }
00562
00563 void TBuggyPopup::DoPostCreate(TDocument* itsDocument)
00564 {
00565     if(fRealWidth > 0)
00566     {
00567         CViewRect r = GetExtent();
00568         Resize(CViewPoint(fRealWidth, r.Height()), true);
00569     }
00570 }
00571
00572 #undef Inherited
00573 #define Inherited TIconPopup
00574
00575 MA_DEFINE_CLASS_M1(TPseudoIconPopup, Inherited);
00576
00577 TPseudoIconPopup::TPseudoIconPopup()
00578 {
00579 }
00580
00581 TPseudoIconPopup::~TPseudoIconPopup()
00582 {
00583 }
00584
00585 void TPseudoIconPopup::ReadFields(CStream_AC* aStream)
00586 {
00587     Inherited::ReadFields(aStream);
00588
00589     *aStream >> fContentType;
00590     SetContentRsrcID(fContentType, fRsrcID);
00591 }
00592
00593 void TPseudoIconPopup::WriteFields(CStream_AC* aStream) const
00594 {
00595     Inherited::WriteFields(aStream);
00596
00597     *aStream << fContentType;
00598 }
00599
00600 #undef Inherited
00601 #define Inherited TScrollBar
00602
00603 MA_DEFINE_CLASS_M1(TPseudoScrollBar, Inherited);
00604
00605 TPseudoScrollBar::TPseudoScrollBar() : fPageStep(1), fButtonStep(1)
00606 {
00607 }
00608
00609 TPseudoScrollBar::~TPseudoScrollBar()
00610 {
00611 }
00612
00613 void TPseudoScrollBar::TrackScrollBar(short partCode)
00614 {
00615     switch (partCode)
00616     {
00617         case kControlPageUpPart:
00618             if (GetValue() > GetMinimum())
00619                 DeltaValue(-fPageStep);
00620             break;
00621         case kControlUpButtonPart:
00622             if (GetValue() > GetMinimum())
00623                 DeltaValue(-fButtonStep);
00624             break;
00625         case kControlPageDownPart:
00626             if (GetValue() < GetMaximum())
00627                 DeltaValue(fPageStep);
00628             break;
00629         case kControlDownButtonPart:
00630             if (GetValue() < GetMaximum())
00631                 DeltaValue(fButtonStep);
00632             break;
00633     }
00634 }
00635
00636 #undef Inherited
00637 #define Inherited TPseudoIconButton
00638
00639 MA_DEFINE_CLASS_M1(TPseudoRotateIconButton, Inherited);
00640
00641 TPseudoRotateIconButton::TPseudoRotateIconButton() : fCurrentIcon(0)
00642 {
00643 }
00644
00645 TPseudoRotateIconButton::~TPseudoRotateIconButton()
00646 {
00647 }
00648
00649 void TPseudoRotateIconButton::ReadFields(CStream_AC* aStream)
00650 {
00651     Inherited::ReadFields(aStream);
00652
00653     CChar255_AC str(aStream->ReadString(255));
00654     const char *ptr = str;
00655     while(ptr != 0L)
00656     {
00657         int v;
00658         const char *tmp = strchr(ptr, ',');
00659         if(tmp != 0L)
00660         {
00661             CChar255_AC stmp;
00662             size_t offset = tmp - ptr;
00663             stmp.CopyFrom(ptr, offset);
00664             ptr += offset + 1;
00665             if(sscanf(stmp, "%d", &v) == 1)
00666                 fIconSuite.push_back(v);
00667         }
00668         else
00669         {
00670             if(sscanf(ptr, "%d", &v) == 1)
00671                 fIconSuite.push_back(v);
00672             ptr = 0;
00673         }
00674     }
00675
00676     if(fIconSuite.size() != 0)
00677         SetContentRsrcID(fContentType, fIconSuite[0]);
00678 }
00679
00680 void TPseudoRotateIconButton::WriteFields(CStream_AC* aStream) const
00681 {
00682     Inherited::WriteFields(aStream);
00683
00684     // do we really need to write ?
00685     *aStream << "";
00686     UASSERT(0);
00687 }
00688
00689 void TPseudoRotateIconButton::DoRotate(int icon)
00690 {
00691     if(fCurrentIcon != icon && icon >= 0 && icon < fIconSuite.size())
00692     {
00693         fCurrentIcon = icon;
00694         SetContentRsrcID(fContentType, fIconSuite[fCurrentIcon]);
00695         ForceRedraw();
00696     }
00697 }
00698
00699 #undef Inherited
00700 #define Inherited TIconCheckBox
00701
00702 MA_DEFINE_CLASS_M1(TPseudoIconCheckBox, Inherited);
00703
00704 TPseudoIconCheckBox::TPseudoIconCheckBox()
00705 {
00706 }
00707
00708 TPseudoIconCheckBox::~TPseudoIconCheckBox()
00709 {
00710 }
00711
00712 void TPseudoIconCheckBox::ReadFields(CStream_AC* aStream)
00713 {
00714     Inherited::ReadFields(aStream);
00715
00716     *aStream >> fContentType;
00717     SetContentRsrcID(fContentType, fRsrcID);
00718 }
00719
00720 void TPseudoIconCheckBox::WriteFields(CStream_AC* aStream) const
00721 {
00722     Inherited::WriteFields(aStream);
00723
00724     *aStream << fContentType;
00725 }
00726
00727 #undef Inherited
00728 #define Inherited TAdorner
00729
00730 MA_DEFINE_CLASS_M1(TPseudoWinAdorner, Inherited);
00731
00732 TPseudoWinAdorner::TPseudoWinAdorner() : TAdorner(kPseudoWinAdorner), fWidID(-1)
00733 {
00734 }
00735
00736 TPseudoWinAdorner::~TPseudoWinAdorner()
00737 {
00738     if(fWidID != -1)
00739         UEventSendMessage(fWidID, EV_DESTROY, 0, 0L);
00740 }
00741
00742 void TPseudoWinAdorner::ViewChangedFrame (TView* itsView,
00743                             const CViewRect& oldFrame,
00744                             const CViewRect& newFrame,
00745                             bool    invalidate)
00746 {
00747     TWindow *wind = itsView->GetWindow();
00748     if(wind != 0L && fWidID != -1)
00749     {
00750         int cmdid = UEventSendMessage(fWidID, EV_FETCHCMD, 0, itsView);
00751         if(cmdid != -1)
00752         {
00753             URECT r;
00754             r.left = newFrame.left;
00755             r.right = newFrame.right;
00756             r.top = newFrame.top;
00757             r.bottom = newFrame.bottom;
00758
00759             UEventSendMessage(fWidID, EV_RESIZE, cmdid, &r);
00760         }
00761     }
00762 }
00763
00764 UIMPLEMENT_DYNAMIC(UMacAppMenu, UMenu)
00765
00766 UBEGIN_MESSAGE_MAP(UMacAppMenu, UMenu)
00767     ON_UPDATEUI(UMacAppMenu)
00768 UEND_MESSAGE_MAP()
00769
00770 int UMacAppMenu::sMAMenuWidID = -1;
00771
00772 UMacAppMenu::UMacAppMenu() : UMenu(::UEventGetWidID())
00773 {
00774     sMAMenuWidID = GetWidID();
00775 }
00776
00777 UMacAppMenu::~UMacAppMenu()
00778 {
00779 }
00780
00781 // If hierarchical the range of IDs for applications is restricted.  See IM V-236.
00782 // If the menu isn't managed by MacApp and is in a TPopup, its ID must be outside this range.
00783 enum
00784 {
00785     kHierarchicalMin = 0,
00786     kHierarchicalMax = 235
00787 };
00788
00789 void UMacAppMenu::OnUpdateUI()
00790 {
00791     static bool sSemaphore = false;
00792     USemaphore policeman(sSemaphore);
00793     if(policeman.IsEnteredTwice())
00794         return;
00795
00796     // this is the interesting thing about the toolbar : it resends the
00797     // update UI to other widgets according to the focus information and
00798     // allows the update to be handled several times if the handler asks for it
00799     // (by using UCmdUI::SetContinue)
00800
00801     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00802     std::map<int, void *>::iterator w;
00803     int cmdid;
00804     int widFocus = UWidget::GetFocus();
00805
00806     for(CMenuIterator iter; iter.Current(); ++iter)
00807     {
00808         MenuRef menu = iter;
00809         short menuID = (**menu).menuID;
00810
00811         // see UMenuMgr.cpp from MacApp
00812         if (menuID < kHierarchicalMin || menuID > kHierarchicalMax)
00813             continue;
00814
00815         short numitems = ::CountMItems(menu);
00816         for(int j = 1; j <= numitems; j++)
00817         {
00818             cmdid = CommandFromMenuItem(menuID, j);
00819             if(cmdid < 0)
00820             {
00821                 UAppConsole("The item %d of the menu %d has not a MacApp cmd\n", j, menuID);
00822             }
00823             else
00824             {
00825                 if(cmdid == kUMainWidget)
00826                     continue;
00827
00828                 // first forward the command to the focused widget : if it doesn't want it
00829                 // we give it to the next pseudo widget.
00830                 if(widFocus != -1 && widFocus != GetWidID())
00831                 {
00832                     UCmdUI pUI(cmdid);
00833                     UEventSendMessage(widFocus, EV_UPDTCMD, pUI.m_nID, &pUI);
00834                     if(!pUI.CanContinue())
00835                         continue;
00836                 }
00837
00838                 STD map<int, UCmdTarget *>::const_iterator i;
00839                 for(i = targets.begin(); i != targets.end(); ++i)
00840                 {
00841                     int widid = (*i).first;
00842                     if(widid == widFocus || widid == GetWidID())
00843                         continue;
00844
00845                     UCmdUI pUI(cmdid);
00846                     UEventSendMessage(widid, EV_UPDTCMD, pUI.m_nID, &pUI);
00847                     if(!pUI.CanContinue())
00848                         break;
00849                 }
00850                 if(i == targets.end())
00851                 {
00852                     //UAppConsole("The cmd %d of the menubar has no update handler, it's gonna be disabled\n", cmdid);
00853                     UCmdUI pUI(cmdid);
00854                     pUI.Enable(false);
00855                 }
00856             }
00857         }
00858     }
00859 }
00860
00861 class CDummyClass
00862 {
00863 public:
00864     CDummyClass()
00865     {
00866         InitUSlider();
00867         if (!gUGridViewInitialized)
00868         {
00869             InitUGridView();
00870         }
00871         MA_REGISTER_CLASS(TPseudoAppBehavior);
00872         MA_REGISTER_CLASS(TPseudoIconButton);
00873         MA_REGISTER_CLASS(TPseudoIconPopup);
00874         MA_REGISTER_CLASS(TPseudoScrollBar);
00875         MA_REGISTER_CLASS(TPseudoRotateIconButton);
00876         MA_REGISTER_CLASS(TPseudoIconCheckBox);
00877         MA_REGISTER_CLASS(TBuggyPopup);
00878         MA_REGISTER_CLASS(TPseudoWinBehavior);
00879         MA_REGISTER_CLASS(TPseudoCustomView);
00880         MA_REGISTER_CLASS(TPseudoWinAdorner);
00881         MA_REGISTER_SIGNATURE(TPseudoTextListView,
00882                 TPseudoTextListView::kTextStringListViewSignature);
00883         MA_REGISTER_CLASS(TPseudoDoubleNumberText);
00884     }
00885
00886 } sDummyStarter;
00887
00888 typedef struct CViewInfo
00889 {
00890     TView *view;
00891 };
00892
00893 static void extractInfos(std::vector<CViewInfo> & infos, std::vector<TPopup *> & popups, TView *view)
00894 {
00895     if(view == 0L)
00896         return;
00897
00898     if(MA_MEMBER(view, TPopup) && !MA_MEMBER(view, TIconPopup))
00899     {
00900         popups.push_back((TPopup *)view);
00901     }
00902     else
00903     {
00904         CViewInfo info;
00905         info.view = view;
00906         infos.push_back(info);
00907     }
00908
00909     extractInfos(infos, popups, view->GetNextView());
00910     extractInfos(infos, popups, view->GetSubView());
00911 }
00912
00913 static bool InBetweenVSide(const CViewRect & popPos, const CViewRect & pos)
00914 {
00915     return (popPos.top >= pos.top && popPos.top <= pos.bottom) ||
00916         (popPos.bottom >= pos.top && popPos.bottom <= pos.bottom) ||
00917          (pos.top >= popPos.top && pos.top <= popPos.bottom) ||
00918         (pos.bottom >= popPos.top && pos.bottom <= popPos.bottom);
00919 }
00920
00921 static int findmostright(TPopup *popup, const std::vector<CViewInfo> & infos)
00922 {
00923     int most_right = popup->GetWindow()->GetExtent().right;
00924     CViewRect popPos = popup->GetFrame();
00925     popPos = popup->GetSuperView()->LocalToRootView(popPos);
00926
00927     std::vector<CViewInfo>::const_iterator i;
00928     for(i = infos.begin(); i != infos.end(); ++i)
00929     {
00930         TView *view = (*i).view;
00931
00932         CViewRect pos = view->GetFrame();
00933         pos = view->GetSuperView()->LocalToRootView(pos);
00934         if(pos.left > popPos.right && InBetweenVSide(popPos, pos))
00935         {
00936             // the top/bottom popup is inside the top/bottom view
00937             if(pos.left < most_right)
00938                 most_right = pos.left;
00939         }
00940     }
00941
00942     return most_right;
00943 }
00944
00945 void macapp_workaround_adlib_bug(TView *view)
00946 {
00947     std::vector<TPopup *> popups;
00948     std::vector<CViewInfo> infos;
00949     extractInfos(infos, popups, view->GetSubView());
00950 #   define OFFSET 40
00951
00952     std::vector<TPopup *>::iterator p;
00953     for(p = popups.begin(); p != popups.end(); ++p)
00954     {
00955         TPopup *popup = *p;
00956
00957         int most_right = findmostright(popup, infos);
00958         CViewRect oldPos = popup->GetFrame();
00959         oldPos = popup->GetSuperView()->LocalToRootView(oldPos);
00960         if(most_right > (oldPos.right + OFFSET))
00961         {
00962             oldPos.right = most_right - OFFSET;
00963             oldPos = popup->GetSuperView()->RootViewToLocal(oldPos);
00964             popup->SetFrame(oldPos, true);
00965         }
00966     }
00967 }
00968
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJLibrary.cpp Source File

WinCvs/CJLib/CJLibrary/CJLibrary.cpp

Go to the documentation of this file.
00001 // CJLibrary.cpp : Defines the initialization routines for the DLL.
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJLibrary.cpp $
00011  *
00012  * $History: CJLibrary.cpp $
00013  *
00014  * *****************  Version 8  *****************
00015  * User: Kirk Stowell Date: 10/25/99   Time: 11:02p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Moved check for common control dll to DLL_PROCESS_ATTACH portion of
00018  * DllMain.
00019  *
00020  * *****************  Version 7  *****************
00021  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00022  * Updated in $/CodeJock/CJLibrary
00023  * Added source control history to file header.
00024  *
00025  ***************************************************************************/
00027
00028 #include "stdafx.h"
00029 #include <afxdllx.h>
00030 #include "CJToolBar.h"
00031
00032 #ifdef _DEBUG
00033 #define new DEBUG_NEW
00034 #undef THIS_FILE
00035 static char THIS_FILE[] = __FILE__;
00036 #endif
00037
00038
00039 static AFX_EXTENSION_MODULE CJLibraryDLL = { NULL, NULL };
00040
00041 extern "C" int APIENTRY
00042 DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
00043 {
00044     // Remove this if you use lpReserved
00045     UNREFERENCED_PARAMETER(lpReserved);
00046
00047     if (dwReason == DLL_PROCESS_ATTACH)
00048     {
00049         TRACE0("CJLIBRARY.DLL Initializing!\n");
00050
00051         // Extension DLL one-time initialization
00052         if (!AfxInitExtensionModule(CJLibraryDLL, hInstance))
00053             return 0;
00054
00055         // see what version of the common control we are using.
00056         _GetComCtlVersion();
00057         if (_ComCtlVersion < VERSION_IE4) {
00058             ::MessageBox(NULL, _T("Invalid Common Control DLL!\nYou need version 4.70 or higher to use CJLibrary...\nAborting!\n\nCopyright © 1999 CodeJock.com and Copyright © 1998-1999 Kirk W. Stowell, All Rights Reserved\nmailto:kstowell@codejock.com\nhttp://www.codejock.com"), _T("Invalid COMCTL32.DLL"), MB_ICONSTOP);
00059             return 0;
00060         }
00061
00062         // Insert this DLL into the resource chain
00063         // NOTE: If this Extension DLL is being implicitly linked to by
00064         //  an MFC Regular DLL (such as an ActiveX Control)
00065         //  instead of an MFC application, then you will want to
00066         //  remove this line from DllMain and put it in a separate
00067         //  function exported from this Extension DLL.  The Regular DLL
00068         //  that uses this Extension DLL should then explicitly call that
00069         //  function to initialize this Extension DLL.  Otherwise,
00070         //  the CDynLinkLibrary object will not be attached to the
00071         //  Regular DLL's resource chain, and serious problems will
00072         //  result.
00073
00074         new CDynLinkLibrary(CJLibraryDLL);
00075     }
00076     else if (dwReason == DLL_PROCESS_DETACH)
00077     {
00078         TRACE0("CJLIBRARY.DLL Terminating!\n");
00079         // Terminate the library before destructors are called
00080         AfxTermExtensionModule(CJLibraryDLL);
00081     }
00082     return 1;   // ok
00083 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CInit_MAIN Member List

This is the complete list of members for CInit_MAIN, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CInit_MAIN(bool forceRoot, const char *cvsroot) | CInit_MAIN |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CInit_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CInit_MAIN |
InitHelpID() | CInit_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_cvsroot | CInit_MAIN |
m_cvsrootCombo | CInit_MAIN |
m_forceRoot | CInit_MAIN |
m_forceRootCheck | CInit_MAIN |
m_helpinit | CInit_MAIN |
m_selCvsrootButton | CInit_MAIN |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnForceroot() | CInit_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CInit_MAIN | [protected, virtual]
OnSelcvsroot() | CInit_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ItemRowInfo Member List

This is the complete list of members for ItemRowInfo, including all inherited members.

m_description | ItemRowInfo
m_descriptionEx | ItemRowInfo

Generated on Sat Aug 7 22:53:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/GfxOutBarCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/GfxOutBarCtrl.cpp

Go to the documentation of this file.
00001 // Copyright (c) Iuri Apollonio 1998
00002 // Use & modify as you want & need, and leave those 3 lines.
00003 // http://www.codeguru.com
00004 //
00005 // GfxOutBarCtrl.cpp : implementation file
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:49 $
00011  * $Revision: 1.1.1.3 $
00012  * $Archive: /CodeJock/CJLibrary/GfxOutBarCtrl.cpp $
00013  *
00014  * $History: GfxOutBarCtrl.cpp $
00015  *
00016  * *****************  Version 9  *****************
00017  * User: Kirk Stowell Date: 10/25/99   Time: 10:54p
00018  * Updated in $/CodeJock/CJLibrary
00019  * Added resource includes for static builds, type cast popup menu calls
00020  * to call CMenu base class.
00021  *
00022  * *****************  Version 8  *****************
00023  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00024  * Updated in $/CodeJock/CJLibrary
00025  * Fixed potential resource and memory leak problems.
00026  *
00027  * *****************  Version 7  *****************
00028  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00029  * Updated in $/CodeJock/CJLibrary
00030  * Added source control history to file header.
00031  *
00032  ***************************************************************************/
00034
00035 #include "stdafx.h"
00036 #include "CJResource.h"
00037 #include "GfxOutBarCtrl.h"
00038 #include "GfxGroupEdit.h"
00039
00040 #include "CJMenu.h"        // CCJMenu class declaration
00041
00042 #ifdef _DEBUG
00043 #define new DEBUG_NEW
00044 #undef THIS_FILE
00045 static char THIS_FILE[] = __FILE__;
00046 #endif
00047
00049 // CGfxOutBarCtrl
00050
00051 IMPLEMENT_DYNCREATE(CGfxOutBarCtrl, CWnd)
00052
00053 CGfxOutBarCtrl::CGfxOutBarCtrl()
00054 {
00055     crBackGroundColor   = ::GetSysColor(COLOR_3DSHADOW);//RGB(0,128,128);//
00056     crBackGroundColor1  = ::GetSysColor(COLOR_3DSHADOW);
00057     crTextColor         = ::GetSysColor(COLOR_WINDOW);
00058     cr3dFace            = ::GetSysColor(COLOR_3DFACE);
00059     crLightBorder       = ::GetSysColor(COLOR_3DLIGHT);
00060     crHilightBorder     = ::GetSysColor(COLOR_3DHILIGHT);
00061     crShadowBorder      = ::GetSysColor(COLOR_3DSHADOW);
00062     crDkShadowBorder    = ::GetSysColor(COLOR_3DDKSHADOW);
00063
00064     pBlackPen = new CPen(PS_SOLID, 1, RGB(0,0,0));
00065
00066     iFolderHeight = 22;
00067
00068     dwFlags = fDragItems|fEditGroups|fEditItems|fRemoveGroups|fRemoveItems|fAddGroups|fAnimation|fSelHighlight;
00069
00070     iSelFolder = 0;
00071
00072     iLastFolderHighlighted = -1;
00073     iLastSelectedFolder = -1;
00074
00075     pLargeImageList = NULL;
00076     pSmallImageList = NULL;
00077
00078     iFirstItem = 0;
00079
00080     xSmallIconLabelOffset = 4;
00081     yLargeIconLabelOffset = 3;
00082
00083     ySmallIconSpacing = 10;
00084     yLargeIconSpacing = 8;
00085
00086     xLeftMargin = 5;
00087     yTopMargin = 5;
00088
00089     bUpArrow = bDownArrow = false;
00090
00091     hHandCursor = AfxGetApp()->LoadCursor(IDC_HANDCUR);
00092     rcUpArrow = rcDownArrow = CRect(0,0,0,0);
00093
00094     bUpPressed = bDownPressed = false;
00095
00096     bLooping = false;
00097
00098     iLastItemHighlighted = -1;
00099     bPressedHighlight = false;
00100
00101     iLastDragItemDraw = -1;
00102
00103     lAnimationTickCount = 10;
00104
00105     hDragCursor = AfxGetApp()->LoadCursor(IDC_DRAGGING);
00106     hNoDragCursor = AfxGetApp()->LoadCursor(IDC_NODRAGGING);
00107
00108     iLastSel = -1;
00109     iSelAnimCount = 0;
00110
00111     iSelAnimTiming = 0;
00112
00113     m_strRemoveItem.LoadString(IDS_REMOVEITEM);
00114     m_strRenameItem.LoadString(IDS_RENAMEITEM);
00115 }
00116
00117 CGfxOutBarCtrl::~CGfxOutBarCtrl()
00118 {
00119     for (int t = 0; t < arFolder.GetSize(); t++)
00120     {
00121         if (arFolder.GetAt(t)) delete (CBarFolder*) arFolder.GetAt(t);
00122     }
00123
00124     arFolder.RemoveAll();
00125
00126     delete pBlackPen;
00127 }
00128
00129
00130 BEGIN_MESSAGE_MAP(CGfxOutBarCtrl, CWnd)
00131     //{{AFX_MSG_MAP(CGfxOutBarCtrl)
00132     ON_WM_CREATE()
00133     ON_WM_TIMER()
00134     ON_WM_PAINT()
00135     ON_WM_ERASEBKGND()
00136     ON_WM_MOUSEMOVE()
00137     ON_WM_LBUTTONDOWN()
00138     ON_WM_SETCURSOR()
00139     ON_WM_SIZE()
00140     ON_WM_RBUTTONDOWN()
00141     ON_COMMAND(ID_GFX_LARGEICON, OnGfxLargeicon)
00142     ON_UPDATE_COMMAND_UI(ID_GFX_LARGEICON, OnUpdateGfxLargeicon)
00143     ON_COMMAND(ID_GFX_SMALLICON, OnGfxSmallicon)
00144     ON_UPDATE_COMMAND_UI(ID_GFX_SMALLICON, OnUpdateGfxSmallicon)
00145     ON_COMMAND(ID_GFX_REMOVEITEM, OnGfxRemoveitem)
00146     ON_UPDATE_COMMAND_UI(ID_GFX_REMOVEITEM, OnUpdateGfxRemoveitem)
00147     ON_COMMAND(ID_GFX_RENAMEITEM, OnGfxRenameitem)
00148     ON_UPDATE_COMMAND_UI(ID_GFX_RENAMEITEM, OnUpdateGfxRenameitem)
00149     ON_WM_SYSCOLORCHANGE()
00150     //}}AFX_MSG_MAP
00151     ON_MESSAGE(WM_OUTBAR_NOTIFY, OnEndLabelEdit)
00152 END_MESSAGE_MAP()
00153
00154
00156 // CGfxOutBarCtrl message handlers
00157
00158 long CGfxOutBarCtrl::OnEndLabelEdit(WPARAM wParam, LPARAM lParam)
00159 {
00160     if (wParam == NM_OB_ONGROUPENDEDIT)
00161     {
00162         CGfxGroupEdit* pEdit = (CGfxGroupEdit*) lParam;
00163
00164         OUTBAR_INFO ob;
00165
00166         ob.index = pEdit->iIndex;
00167         ob.cText = (LPCTSTR) pEdit->text;
00168
00169         if (GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_ONGROUPENDEDIT, (LPARAM) &ob))
00170         {
00171             SetFolderText(pEdit->iIndex, pEdit->text);
00172             CRect rc;
00173             GetFolderRect(pEdit->iIndex, rc);
00174             InvalidateRect(rc, false);
00175         }
00176     }
00177
00178     if (wParam == NM_OB_ONLABELENDEDIT)
00179     {
00180         CGfxGroupEdit * pEdit = (CGfxGroupEdit *) lParam;
00181         OUTBAR_INFO ob;
00182         ob.index = pEdit->iIndex;
00183         ob.cText = pEdit->text;
00184
00185         if (GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_ONLABELENDEDIT, (LPARAM) &ob))
00186         {
00187             SetItemText(pEdit->iIndex, pEdit->text);
00188             CRect rc;
00189             GetInsideRect(rc);
00190             InvalidateRect(rc, true);
00191         }
00192     }
00193
00194     return 0;
00195 }
00196
00197 void CGfxOutBarCtrl::SetFolderText( const int index, LPCTSTR text )
00198 {
00199     ASSERT(index >= 0 && index < GetFolderCount());
00200
00201     CBarFolder* pbf = (CBarFolder *) arFolder.GetAt(index);
00202
00203     if( pbf->cName )
00204     {
00205         delete [] pbf->cName;
00206         pbf->cName = NULL;
00207     }
00208
00209     pbf->cName = new TCHAR[ _tcslen( text ) + 1 ];
00210
00211     _tcscpy( pbf->cName, text );
00212 }
00213
00214 void CGfxOutBarCtrl::SetItemText( const int index, LPCTSTR text )
00215 {
00216     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
00217
00218     CBarFolder* pbf = (CBarFolder*) arFolder.GetAt(iSelFolder);
00219
00220     CBarItem*   pi  = (CBarItem*) pbf->arItems.GetAt(index);
00221
00222     if (pi->cItem)
00223     {
00224         delete [] pi->cItem;
00225         pi->cItem = NULL;
00226     }
00227
00228     pi->cItem = new TCHAR[ _tcslen( text ) + 1 ];
00229
00230     _tcscpy( pi->cItem, text );
00231 }
00232
00233 BOOL CGfxOutBarCtrl::Create(DWORD dwStyle, const RECT & rect, CWnd * pParentWnd, UINT nID, const DWORD dwFlag)
00234 {
00235     dwFlags = dwFlag;
00236     return CWnd::CreateEx(WS_EX_STATICEDGE, NULL, NULL, dwStyle|WS_CHILD, rect, pParentWnd, nID);
00237     //GFXOUTBARCTRL_CLASSNAME
00238 }
00239
00240 bool CGfxOutBarCtrl::IsSmallIconView() const
00241 {
00242     return dwFlags&fSmallIcon;
00243 }
00244
00245 void CGfxOutBarCtrl::SetSmallIconView(const bool bSet)
00246 {
00247     iFirstItem = 0;
00248
00249     if (bSet)
00250     {
00251         if (!IsSmallIconView())
00252         {
00253             dwFlags |= fSmallIcon;
00254             CRect rc;
00255             GetInsideRect(rc);
00256             InvalidateRect(rc, false);
00257         }
00258     }
00259     else
00260     {
00261         if (IsSmallIconView())
00262         {
00263             dwFlags &= ~fSmallIcon;
00264             CRect rc;
00265             GetInsideRect(rc);
00266             InvalidateRect(rc, false);
00267         }
00268     }
00269 }
00270
00271 DWORD CGfxOutBarCtrl::GetFlag() const
00272 {
00273     return dwFlags;
00274 }
00275
00276 void CGfxOutBarCtrl::ModifyFlag(const DWORD & dwRemove, const DWORD & dwAdd, const UINT redraw)
00277 {
00278     if (dwRemove)   dwFlags &= ~(dwRemove);
00279     if (dwAdd)      dwFlags |= dwAdd;
00280
00281     if (GetSafeHwnd())
00282     {
00283         if (redraw != 0) SetWindowPos(0,0,0,0,0,SWP_NOZORDER|SWP_NOSIZE|SWP_NOMOVE|redraw);
00284         else Invalidate();
00285     }
00286 }
00287
00288 int CGfxOutBarCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
00289 {
00290     if (CWnd::OnCreate(lpCreateStruct) == -1)
00291         return -1;
00292
00293     // TODO: Add your specialized creation code here
00294
00295     return 0;
00296 }
00297
00298 void CGfxOutBarCtrl::OnTimer(UINT nIDEvent)
00299 {
00300     if (nIDEvent == 1)
00301     {
00302         CPoint pt(GetMessagePos());
00303
00304         ScreenToClient(&pt);
00305
00306         CRect rc;
00307         GetClientRect(&rc);
00308         if (!(rc.PtInRect(pt)))
00309         {
00310             HighlightFolder(-1);
00311             HighlightItem(-1);
00312             KillTimer(1);
00313         }
00314     }
00315     else if (nIDEvent == 3 && iLastSel >= 0)
00316     {
00317         iSelAnimCount ++;
00318         if (iSelAnimCount > 10) iSelAnimCount = -1;
00319         if (iSelAnimCount == 0)
00320             DrawAnimItem(-1, 1, iLastSel);
00321         if (iSelAnimCount == 1)
00322             DrawAnimItem(0, 0, iLastSel);
00323         if (iSelAnimCount == 2)
00324             DrawAnimItem(1, 1, iLastSel);
00325         if (iSelAnimCount == 3)
00326             DrawAnimItem(0, 0, iLastSel);
00327     }
00328     CWnd::OnTimer(nIDEvent);
00329 }
00330
00331 void CGfxOutBarCtrl::DrawAnimItem(const int xoffset, const int yoffset, const int index)
00332 {
00333     CImageList * ima = GetFolderImageList(iSelFolder, IsSmallIconView());
00334
00335     CRect rc, irc;
00336     GetInsideRect(irc);
00337     GetItemRect(iSelFolder, iLastSel, rc);
00338
00339     if (iLastSel >= iFirstItem && irc.bottom > rc.bottom && irc.top < rc.top)
00340     {
00341         ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
00342         CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
00343
00344         ASSERT(index >= 0 && index < pbf->GetItemCount());
00345         CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
00346
00347         ASSERT(pi && ima);
00348
00349         CClientDC dc(this);
00350
00351         if (IsSmallIconView())
00352         {
00353             if (ima)
00354             {
00355                 IMAGEINFO ii;
00356                 ima->GetImageInfo(pi->iImageIndex, &ii);
00357                 CSize szImage = CRect(ii.rcImage).Size();
00358                 CPoint pt;
00359                 pt.x = rc.left + 2;
00360                 pt.y = rc.top + (rc.Height() - szImage.cy) / 2;
00361
00362                 CRect rcBck(pt.x-1, pt.y-1, pt.x + szImage.cx+2, pt.y + szImage.cy+2);
00363                 dc.FillSolidRect(rcBck, crBackGroundColor);
00364
00365                 pt.x += xoffset;
00366                 pt.y += yoffset;
00367
00368                 ima->Draw(&dc, pi->iImageIndex, pt, ILD_NORMAL);
00369
00370             }
00371         }
00372         else
00373         {
00374             if (ima)
00375             {
00376                 IMAGEINFO ii;
00377                 ima->GetImageInfo(pi->iImageIndex, &ii);
00378                 CSize szImage = CRect(ii.rcImage).Size();
00379                 CPoint pt;
00380                 pt.x = rc.left + (rc.Width() - szImage.cx) / 2;
00381                 pt.y = rc.top;
00382
00383                 CRect rcBck(pt.x-1, pt.y-1, pt.x + szImage.cx+2, pt.y + szImage.cy+2);
00384                 dc.FillSolidRect(rcBck, crBackGroundColor);
00385
00386                 pt.x += xoffset;
00387                 pt.y += yoffset;
00388
00389                 ima->Draw(&dc, pi->iImageIndex, pt, ILD_NORMAL);
00390             }
00391         }
00392     }
00393 }
00394
00395 void CGfxOutBarCtrl::OnPaint()
00396 {
00397     CRect clientRc;
00398     GetClientRect(&clientRc);
00399     CPaintDC dc(this);
00400     CDC memDC;
00401     memDC.CreateCompatibleDC(&dc);
00402     CBitmap bmp;
00403     bmp.CreateCompatibleBitmap(&dc, clientRc.Width(), clientRc.Height());
00404     CBitmap * obmp = memDC.SelectObject(&bmp);
00405
00406     CDC * pDC = &memDC;
00407
00408     CRect rc;
00409     GetInsideRect(rc);
00410     if (!GetFolderChild()) pDC->FillSolidRect(rc, crBackGroundColor);
00411
00412
00413     int max = arFolder.GetSize();
00414     CRect frc;
00415     for (int t = 0; t < max; t++)
00416     {
00417         GetFolderRect(t, frc);
00418         DrawFolder(pDC, t, frc, false);
00419     }
00420     if (!GetFolderChild())
00421     {
00422         int f,l;
00423         GetVisibleRange(iSelFolder, f,l);
00424         rcUpArrow.SetRect(0,0,GetSystemMetrics(SM_CXVSCROLL), GetSystemMetrics(SM_CXVSCROLL));
00425         rcDownArrow = rcUpArrow;
00426         rcUpArrow.OffsetRect(rc.right - 5 - GetSystemMetrics(SM_CXVSCROLL), rc.top +5);
00427         rcDownArrow.OffsetRect(rc.right - 5 - GetSystemMetrics(SM_CXVSCROLL), rc.bottom - 5 - GetSystemMetrics(SM_CXVSCROLL));
00428
00429         if (f > 0)
00430         {
00431             if (bUpPressed) pDC->DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP|DFCS_PUSHED);
00432             else pDC->DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP);
00433             bUpArrow = true;
00434             pDC->ExcludeClipRect(rcUpArrow);
00435         }
00436         else bUpArrow = false;
00437
00438         if (l < GetItemCount() - 1)
00439         {
00440             if (bDownPressed) pDC->DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN|DFCS_PUSHED);
00441             else pDC->DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN);
00442             bDownArrow = true;
00443             pDC->ExcludeClipRect(rcDownArrow);
00444         }
00445         else bDownArrow = false;
00446
00447         PaintItems(pDC, iSelFolder, rc);
00448     }
00449
00450     dc.BitBlt(clientRc.left, clientRc.top, clientRc.Width(), clientRc.Height(), &memDC, 0,0, SRCCOPY);
00451
00452     memDC.SelectObject(obmp);
00453
00454     if (iLastFolderHighlighted >= 0)
00455     {
00456         int i = iLastFolderHighlighted;
00457         iLastFolderHighlighted = -1;
00458         HighlightFolder(i);
00459     }
00460     if (iLastItemHighlighted >= 0)
00461     {
00462         int i = iLastItemHighlighted;
00463         iLastItemHighlighted = -1;
00464         HighlightItem(i, bPressedHighlight);
00465     }
00466
00467     // fix potential resource leak - KStowell - 10-21-99
00468     memDC.DeleteDC();
00469     bmp.DeleteObject();
00470 }
00471
00472 BOOL CGfxOutBarCtrl::OnEraseBkgnd(CDC* /*pDC*/)
00473 {
00474     return true;
00475 }
00476
00477 bool CGfxOutBarCtrl::GetFolderRect(const int iIndex, CRect & rect) const
00478 {
00479     int max = arFolder.GetSize();
00480     ASSERT(iIndex >= 0 && iIndex < max);
00481
00482     if (iIndex >= 0 && iIndex < max)
00483     {
00484         CRect rc;
00485         GetClientRect(rc);
00486         if (iIndex > iSelFolder)
00487             rect.SetRect(rc.left, rc.bottom - ((max - iIndex)) * iFolderHeight, rc.right,
00488             rc.bottom - (max - iIndex - 1) * iFolderHeight);
00489         else
00490             rect.SetRect(rc.left, rc.top + iIndex * iFolderHeight - 1, rc.right,
00491             rc.top + (1 + iIndex) * iFolderHeight - 1);
00492         return true;
00493     }
00494     return false;
00495 }
00496
00497 void CGfxOutBarCtrl::GetItemRect(const int iFolder, const int iIndex, CRect & rect)
00498 {
00499     CRect rc;
00500     GetInsideRect(rc);
00501     int top = rc.top;
00502     CSize sz(0,0);
00503     int y = 0;
00504     for (int t = 0; t < iIndex; t++)
00505     {
00506         sz = GetItemSize(iFolder, t, ircAll);
00507         top += sz.cy;
00508
00509         if (IsSmallIconView())
00510         {
00511             top += ySmallIconSpacing;
00512         }
00513         else
00514         {
00515             top += yLargeIconSpacing;
00516         }
00517         if (t == iFirstItem - 1) y = top - rc.top;
00518     }
00519     sz = GetItemSize(iFolder, iIndex, ircAll);
00520     rect.SetRect(rc.left, top, rc.left + sz.cx, top + sz.cy);
00521
00522     rect.top -= y;
00523     rect.bottom -= y;
00524
00525     rect.left += xLeftMargin;
00526     rect.top  += yTopMargin;
00527     rect.bottom += yTopMargin;
00528
00529     if (!IsSmallIconView())
00530     {
00531         rect.left = rc.left;
00532         rect.right = rc.right;
00533     }
00534 }
00535
00536 void CGfxOutBarCtrl::DrawFolder(CDC * pDC, const int iIdx, CRect rect, const bool bSelected)
00537 {
00538     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iIdx);
00539
00540     if (!bSelected)
00541     {
00542         CPen pn1(PS_SOLID, 1, crBackGroundColor1);
00543         CPen * op = pDC->SelectObject(&pn1);
00544         pDC->MoveTo(rect.left, rect.top);
00545         pDC->LineTo(rect.right, rect.top);
00546         pDC->SelectObject(op);
00547
00548         // fix potential resource leak - KStowell - 10-21-99
00549         pn1.DeleteObject();
00550
00551         rect.top ++;
00552
00553         pDC->Draw3dRect(rect, crHilightBorder, crBackGroundColor1);
00554         rect.InflateRect(-1,-1);
00555         pDC->FillSolidRect(rect, cr3dFace);
00556         int obk = pDC->SetBkMode(TRANSPARENT);
00557         CFont * of = pDC->SelectObject(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));
00558         pDC->DrawText(CString(pbf->cName), rect, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
00559         pDC->SetBkMode(obk);
00560         pDC->SelectObject(of);
00561     }
00562     else
00563     {
00564         CPen pn1(PS_SOLID, 1, crBackGroundColor1);
00565         CPen * op = pDC->SelectObject(&pn1);
00566         pDC->MoveTo(rect.left+1, rect.top);
00567         pDC->LineTo(rect.right, rect.top);
00568         pDC->SelectObject(op);
00569
00570         // fix potential resource leak - KStowell - 10-21-99
00571         pn1.DeleteObject();
00572
00573         rect.top ++;
00574
00575         pDC->Draw3dRect(rect, crDkShadowBorder, crHilightBorder);
00576         rect.InflateRect(-1,-1);
00577         pDC->Draw3dRect(rect, crBackGroundColor1, cr3dFace);
00578         rect.InflateRect(-1,-1);
00579
00580         pDC->FillSolidRect(rect, cr3dFace);
00581
00582         int obk = pDC->SetBkMode(TRANSPARENT);
00583         CFont * of = pDC->SelectObject(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));
00584         pDC->DrawText(CString(pbf->cName), rect, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
00585         pDC->SetBkMode(obk);
00586         pDC->SelectObject(of);
00587     }
00588 }
00589
00590 int CGfxOutBarCtrl::AddFolder( LPCTSTR cFolderName, const DWORD exData )
00591 {
00592     CBarFolder* pbf = new CBarFolder(cFolderName, exData);
00593
00594     ASSERT(pbf);
00595
00596     arFolder.Add((void *)pbf);
00597
00598     return arFolder.GetSize() - 1;
00599 }
00600
00601 CGfxOutBarCtrl::CBarFolder::CBarFolder( LPCTSTR name, DWORD exData)
00602 {
00603     cName  = NULL;
00604     dwData = exData;
00605
00606     if( name )
00607     {
00608         cName = new TCHAR[ _tcslen( name ) + 1 ];
00609
00610         ASSERT(cName);
00611
00612         _tcscpy( cName, name );
00613     }
00614
00615     pLargeImageList = NULL;
00616     pSmallImageList = NULL;
00617     pChild          = NULL;
00618 }
00619
00620 CGfxOutBarCtrl::CBarFolder::~CBarFolder()
00621 {
00622     if (cName) delete [] cName;
00623     for (int t = 0; t < arItems.GetSize(); t++)
00624         if (arItems.GetAt(t)) delete (CBarFolder*) arItems.GetAt(t);
00625
00626     arItems.RemoveAll();
00627 }
00628
00629 void CGfxOutBarCtrl::GetInsideRect(CRect & rect) const
00630 {
00631     GetClientRect(rect);
00632     if (arFolder.GetSize() > 0)
00633     {
00634         int max = arFolder.GetSize();
00635         rect.top += iFolderHeight * (iSelFolder + 1) - 1;//+ 2;
00636         rect.bottom -= (max - iSelFolder - 1)*iFolderHeight;
00637         return;
00638     }
00639 }
00640
00641 void CGfxOutBarCtrl::OnMouseMove(UINT nFlags, CPoint point)
00642 {
00643     int index, ht = HitTestEx(point, index);
00644
00645     if (ht != htFolder && iLastFolderHighlighted >= 0) HighlightFolder(-1);
00646     if (ht != htItem   && iLastItemHighlighted   >= 0) HighlightItem(-1);
00647
00648     if (ht == htFolder)
00649     {
00650         HighlightFolder(index);
00651         SetTimer(1,100,NULL);
00652     }
00653     else if (ht == htItem)
00654     {
00655         HighlightItem(index);
00656         SetTimer(1,100,NULL);
00657     }
00658
00659     CWnd::OnMouseMove(nFlags, point);
00660 }
00661
00662 int CGfxOutBarCtrl::HitTestEx(const CPoint & point, int &index)
00663 {
00664     if (bUpArrow && rcUpArrow.PtInRect(point)) return htUpScroll;
00665     if (bDownArrow && rcDownArrow.PtInRect(point)) return htDownScroll;
00666
00667     int max = arFolder.GetSize(), t;
00668
00669     CRect rc;
00670     for (t = 0; t < max; t++)
00671     {
00672         GetFolderRect(t, rc);
00673         if (rc.PtInRect(point))
00674         {
00675             index = t;
00676             return htFolder;
00677         }
00678     }
00679     GetInsideRect(rc);
00680     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
00681     max = pbf->GetItemCount();
00682     for (t = iFirstItem; t < max; t++)
00683     {
00684         CRect itemRc;
00685         if (!IsSmallIconView())
00686         {
00687             GetIconRect(iSelFolder, t, itemRc);
00688             if (itemRc.PtInRect(point))
00689             {
00690                 index = t;
00691                 return htItem;
00692             }
00693             else if (itemRc.top > rc.bottom) break;
00694             GetLabelRect(iSelFolder, t, itemRc);
00695             itemRc.top -= yLargeIconLabelOffset;
00696
00697             if (itemRc.PtInRect(point))
00698             {
00699                 index = t;
00700                 return htItem;
00701             }
00702             else if (itemRc.top > rc.bottom) break;
00703         }
00704         else
00705         {
00706             GetItemRect(iSelFolder, t, itemRc);
00707             if (itemRc.PtInRect(point))
00708             {
00709                 index = t;
00710                 return htItem;
00711             }
00712             else if (itemRc.top > rc.bottom) break;
00713         }
00714     }
00715     return htNothing;
00716 }
00717
00718 void CGfxOutBarCtrl::HighlightFolder(const int index)
00719 {
00720     CWnd * pf = GetFocus();
00721     if (pf != NULL && pf != this && IsChild(pf)) return;
00722
00723     if (iLastFolderHighlighted == index) return;
00724
00725     if (iLastFolderHighlighted >= 0)
00726     {
00727         CRect rc;
00728         if (GetFolderRect(iLastFolderHighlighted, rc))
00729         {
00730             CClientDC dc(this);
00731             CPen pn(PS_SOLID, 1, crBackGroundColor1);//crShadowBorder);
00732             CPen * op = dc.SelectObject(&pn);
00733             dc.MoveTo(rc.left, rc.bottom-1);
00734             dc.LineTo(rc.right-1, rc.bottom-1);
00735             dc.LineTo(rc.right-1, rc.top);
00736             CPen pn1(PS_SOLID, 1, cr3dFace);
00737             dc.SelectObject(&pn1);
00738             dc.MoveTo(rc.left+1, rc.bottom-2);
00739             dc.LineTo(rc.right-2, rc.bottom-2);
00740             dc.LineTo(rc.right-2, rc.top+1);
00741             dc.SelectObject(op);
00742
00743             // fix potential resource leak - KStowell - 10-21-99
00744             pn.DeleteObject();
00745         }
00746     }
00747     iLastFolderHighlighted = index;
00748     if (iLastFolderHighlighted >= 0)
00749     {
00750         CRect rc;
00751         if (GetFolderRect(iLastFolderHighlighted, rc))
00752         {
00753             CClientDC dc(this);
00754             CPen pn(PS_SOLID, 1, crDkShadowBorder);
00755             CPen * op = dc.SelectObject(&pn);
00756             dc.MoveTo(rc.left, rc.bottom-1);
00757             dc.LineTo(rc.right-1, rc.bottom-1);
00758             dc.LineTo(rc.right-1, rc.top);
00759             CPen pn1(PS_SOLID, 1, crBackGroundColor1);
00760             dc.SelectObject(&pn1);
00761             dc.MoveTo(rc.left+1, rc.bottom-2);
00762             dc.LineTo(rc.right-2, rc.bottom-2);
00763             dc.LineTo(rc.right-2, rc.top+1);
00764             dc.SelectObject(op);
00765
00766             // fix potential resource leak - KStowell - 10-21-99
00767             pn.DeleteObject();
00768         }
00769     }
00770 }
00771
00772 void CGfxOutBarCtrl::OnLButtonDown(UINT nFlags, CPoint point)
00773 {
00774     if (GetFocus() != this) SetFocus();
00775
00776     int index, ht = HitTestEx(point, index);
00777     iLastDragItemDrawType = -1;
00778
00779     CRect inRc;
00780     GetInsideRect(inRc);
00781
00782     if (ht == htFolder)
00783     {
00784         bool bHigh = true;
00785         CRect rc;
00786         GetFolderRect(index, rc);
00787
00788         if (::GetCapture() == NULL)
00789         {
00790             SetCapture();
00791             ASSERT(this == GetCapture());
00792             CClientDC dc(this);
00793             DrawFolder(&dc, index, rc, true);
00794             AfxLockTempMaps();
00795             for (;;)
00796             {
00797                 MSG msg;
00798                 VERIFY(::GetMessage(&msg, NULL, 0, 0));
00799
00800                 if (CWnd::GetCapture() != this) break;
00801
00802                 switch (msg.message)
00803                 {
00804                 case WM_MOUSEMOVE:
00805                     {
00806                         CPoint pt(msg.lParam);
00807                         int idx, ht1 = HitTestEx(pt, idx);
00808                         if (ht1 == htFolder && idx == index)
00809                         {
00810                             if (!bHigh)
00811                             {
00812                                 DrawFolder(&dc, index, rc, true);
00813                                 bHigh = true;
00814                             }
00815                         }
00816                         else
00817                         {
00818                             if (bHigh)
00819                             {
00820                                 DrawFolder(&dc, index, rc, false);
00821                                 bHigh = false;
00822                             }
00823                         }
00824                     }
00825                     break;
00826
00827                 case WM_LBUTTONUP:
00828                     {
00829                         if (bHigh)
00830                         {
00831                             DrawFolder(&dc, index, rc, false);
00832                             bHigh = false;
00833                         }
00834                         CPoint pt(msg.lParam);
00835                         int idx, ht1 = HitTestEx(pt, idx);
00836                         if (ht1 == htFolder && idx != iSelFolder)
00837                             SetSelFolder(idx);
00838                     }
00839
00840                     goto ExitLoop2;
00841
00842                 case WM_KEYDOWN:
00843                     if (msg.wParam != VK_ESCAPE)
00844                         break;
00845
00846                 default:
00847                     DispatchMessage(&msg);
00848                     break;
00849                 }
00850             }
00851
00852         ExitLoop2:
00853             ReleaseCapture();
00854             AfxUnlockTempMaps(FALSE);
00855         }
00856         if (bHigh) InvalidateRect(rc, false);
00857     }
00858     else iLastSelectedFolder = -1;
00859
00860     if (ht == htItem)
00861     {
00862         iLastDragItemDraw = -1;
00863         bool bHigh = true, bDragging = false;
00864         CRect rc;
00865         GetItemRect(iSelFolder, index, rc);
00866
00867         HCURSOR hCur = GetCursor();
00868
00869         if (::GetCapture() == NULL)
00870         {
00871             SetCapture();
00872             ASSERT(this == GetCapture());
00873             CClientDC dc(this);
00874             HighlightItem(index, true);
00875             AfxLockTempMaps();
00876             for (;;)
00877             {
00878                 MSG msg;
00879                 VERIFY(::GetMessage(&msg, NULL, 0, 0));
00880
00881                 if (CWnd::GetCapture() != this) break;
00882
00883                 switch (msg.message)
00884                 {
00885                 case WM_MOUSEMOVE:
00886                     {
00887                         CPoint pt(msg.lParam);
00888                         int idx, ht1 = HitTestEx(pt, idx);
00889                         if (bDragging)
00890                         {
00891                             if (ht1 == htItem)
00892                             {
00893                                 DrawDragArrow(&dc, index, idx);
00894                                 SetCursor(hDragCursor);
00895                                 hCur = hDragCursor;
00896                             }
00897                             else
00898                             {
00899                                 CRect rcItem;
00900                                 GetItemRect(iSelFolder, GetItemCount() - 1, rcItem);
00901                                 if (pt.y > rcItem.bottom && pt.y < inRc.bottom)
00902                                 {
00903                                     DrawDragArrow(&dc, index, GetItemCount());
00904                                     SetCursor(hDragCursor);
00905                                     hCur = hDragCursor;
00906                                 }
00907                                 else
00908                                 {
00909                                     DrawDragArrow(&dc, index, -1);
00910                                     SetCursor(hNoDragCursor);
00911                                     hCur = hNoDragCursor;
00912                                 }
00913                             }
00914                         }
00915                         else
00916                         {
00917                             if (ht1 == htItem && idx == index)
00918                             {
00919                                 if (!bHigh)
00920                                 {
00921                                     HighlightItem(index, true);
00922                                     bHigh = true;
00923                                     bPressedHighlight = true;
00924                                 }
00925                             }
00926                             else
00927                             {
00928                                 if (ht1 == htItem)
00929                                 {
00930                                     if (bHigh)
00931                                     {
00932                                         HighlightItem(index, false);
00933                                         bHigh = false;
00934                                         bPressedHighlight = false;
00935                                     }
00936                                 }
00937                                 else
00938                                 {
00939                                     if (dwFlags&fDragItems)
00940                                     {
00941                                         HighlightItem(index, true);
00942                                         bHigh = true;
00943                                         bDragging = true;
00944
00945                                         SetCursor(hDragCursor);
00946                                         hCur = hDragCursor;
00947
00948                                         bPressedHighlight = true;
00949                                     }
00950                                 }
00951                             }
00952                         }
00953                     }
00954                     break;
00955
00956                 case WM_SETCURSOR:
00957                     SetCursor(hCur);
00958                     break;
00959
00960                 case WM_LBUTTONUP:
00961                     {
00962                         if (bHigh)
00963                         {
00964                             HighlightItem(-1);
00965                             bHigh = false;
00966                         }
00967                         CPoint pt(msg.lParam);
00968                         int idx, ht1 = HitTestEx(pt, idx);
00969                         if (!bDragging)
00970                         {
00971                             if (ht1 == htItem && idx == index)
00972                             {
00973                                 if (iSelAnimTiming > 0 && index != iLastSel && iLastSel >= 0)
00974                                 {
00975                                     DrawAnimItem(0, 0, iLastSel);
00976                                 }
00977
00978                                 if (dwFlags&fSelHighlight && iLastSel >= 0)
00979                                 {
00980                                     CRect rc;
00981                                     GetIconRect(iSelFolder, iLastSel, rc);
00982                                     rc.InflateRect(1,1);
00983                                     InvalidateRect(rc);
00984                                 }
00985
00986                                 iLastSel = index;
00987
00988                                 if (dwFlags&fSelHighlight && iLastSel >= 0)
00989                                 {
00990                                     CRect rc;
00991                                     GetIconRect(iSelFolder, iLastSel, rc);
00992                                     rc.InflateRect(1,1);
00993                                     InvalidateRect(rc);
00994                                 }
00995
00996                                 GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_ITEMCLICK, idx);
00997                             }
00998                         }
00999                         else
01000                         {
01001                             if (ht1 == htItem)
01002                             {
01003                                 if (idx != index)
01004                                 {
01005                                     OUTBAR_INFO ob;
01006                                     ob.iDragFrom = iSelFolder;
01007                                     ob.iDragTo = index;
01008                                     if (GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_DRAGITEM, (LPARAM) &ob))
01009                                     {
01010                                         CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01011                                         CBarItem * piFrom = (CBarItem *) pbf->arItems.GetAt(index);
01012                                         pbf->arItems.RemoveAt(index);
01013                                         if (idx > index) idx --;
01014                                         pbf->arItems.InsertAt(idx, piFrom);
01015                                     }
01016                                 }
01017                             }
01018                             else
01019                             {
01020                                 CRect rcItem;
01021                                 GetItemRect(iSelFolder, GetItemCount() - 1, rcItem);
01022                                 if (pt.y > rcItem.bottom && pt.y < inRc.bottom)
01023                                 {
01024                                     OUTBAR_INFO ob;
01025                                     ob.iDragFrom = iSelFolder;
01026                                     ob.iDragTo = index;
01027                                     if (GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_OB_DRAGITEM, (LPARAM) &ob))
01028                                     {
01029                                         CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01030                                         CBarItem * piFrom = (CBarItem *) pbf->arItems.GetAt(index);
01031                                         pbf->arItems.RemoveAt(index);
01032                                         pbf->arItems.Add((void *) piFrom);
01033                                     }
01034                                 }
01035                             }
01036                         }
01037                     }
01038
01039                     goto ExitLoop4;
01040
01041                 default:
01042                     DispatchMessage(&msg);
01043                     break;
01044                 }
01045             }
01046
01047         ExitLoop4:
01048             ReleaseCapture();
01049             AfxUnlockTempMaps(FALSE);
01050             if (bDragging)
01051             {
01052                 Invalidate();
01053             }
01054         }
01055         bPressedHighlight = false;
01056         if (bHigh) InvalidateRect(rc, false);
01057     }
01058     else iLastItemHighlighted = -1;
01059
01060     if (ht == htDownScroll)
01061     {
01062         bLooping = true;
01063         bool bHigh = true;
01064
01065         if (::GetCapture() == NULL)
01066         {
01067             SetCapture();
01068             ASSERT(this == GetCapture());
01069             CClientDC dc(this);
01070             dc.DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN|DFCS_PUSHED);
01071             SetTimer(2,300,NULL);
01072             AfxLockTempMaps();
01073             for (;;)
01074             {
01075                 MSG msg;
01076                 VERIFY(::GetMessage(&msg, NULL, 0, 0));
01077
01078                 if (CWnd::GetCapture() != this) break;
01079
01080                 switch (msg.message)
01081                 {
01082                 case WM_MOUSEMOVE:
01083                     {
01084                         CPoint pt(msg.lParam);
01085                         if (rcDownArrow.PtInRect(pt))
01086                         {
01087                             if (bHigh == false)
01088                             {
01089                                 dc.DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN|DFCS_PUSHED);
01090                                 bHigh = true;
01091                                 bDownArrow = true;
01092                                 bDownPressed = true;
01093                             }
01094                         }
01095                         else
01096                         {
01097                             if (bHigh == true)
01098                             {
01099                                 dc.DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN);
01100                                 bHigh = false;
01101                                 bDownArrow = false;
01102                                 bDownPressed = false;
01103                             }
01104                         }
01105                     }
01106                     break;
01107
01108                 case WM_LBUTTONUP:
01109                     {
01110                         if (bHigh)
01111                         {
01112                             dc.DrawFrameControl(rcDownArrow, DFC_SCROLL, DFCS_SCROLLDOWN);
01113                             bHigh = false;
01114                         }
01115                         bDownArrow = false;
01116                         CPoint pt(msg.lParam);
01117                         if (rcDownArrow.PtInRect(pt))
01118                         {
01119                             CRect itrc;
01120                             GetItemRect(iSelFolder, GetItemCount() - 1, itrc);
01121                             CRect crc;
01122                             GetInsideRect(crc);
01123                             if (itrc.bottom > crc.bottom)
01124                             {
01125                                 iFirstItem ++;
01126                                 InvalidateRect(crc, true);
01127                             }
01128                         }
01129                     }
01130                     goto ExitLoop3;
01131
01132
01133                 case WM_TIMER:
01134                     {
01135                         if (msg.wParam == 2)
01136                         {
01137                             if (bHigh)
01138                             {
01139                                 CPoint pt(msg.pt);
01140                                 ScreenToClient(&pt);
01141                                 if (rcDownArrow.PtInRect(pt))
01142                                 {
01143                                     bDownPressed = true;
01144                                     CRect itrc;
01145                                     GetItemRect(iSelFolder, GetItemCount() - 1, itrc);
01146                                     CRect crc;
01147                                     GetInsideRect(crc);
01148                                     if (itrc.bottom > crc.bottom)
01149                                     {
01150                                         iFirstItem ++;
01151                                         InvalidateRect(crc, true);
01152                                     }
01153                                     else goto ExitLoop3;
01154                                 }
01155                                 else bDownPressed = false;
01156                             }
01157                         }
01158                         break;
01159                     }
01160
01161                 case WM_KEYDOWN:
01162                     if (msg.wParam != VK_ESCAPE)
01163                         break;
01164
01165                 default:
01166                     DispatchMessage(&msg);
01167                     break;
01168                 }
01169             }
01170
01171         ExitLoop3:
01172             KillTimer(2);
01173             ReleaseCapture();
01174             AfxUnlockTempMaps(FALSE);
01175             bLooping = false;
01176             bDownPressed = false;
01177             bDownArrow = false;
01178             CRect crc;
01179             GetInsideRect(crc);
01180             InvalidateRect(crc, true);
01181         }
01182     }
01183
01184     if (ht == htUpScroll)
01185     {
01186         bLooping = true;
01187         bool bHigh = true;
01188
01189         if (::GetCapture() == NULL)
01190         {
01191             SetCapture();
01192             ASSERT(this == GetCapture());
01193             CClientDC dc(this);
01194             dc.DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP|DFCS_PUSHED);
01195             SetTimer(2,300,NULL);
01196             AfxLockTempMaps();
01197             for (;;)
01198             {
01199                 MSG msg;
01200                 VERIFY(::GetMessage(&msg, NULL, 0, 0));
01201
01202                 if (CWnd::GetCapture() != this) break;
01203
01204                 switch (msg.message)
01205                 {
01206                 case WM_MOUSEMOVE:
01207                     {
01208                         CPoint pt(msg.lParam);
01209                         if (rcUpArrow.PtInRect(pt))
01210                         {
01211                             if (bHigh == false)
01212                             {
01213                                 dc.DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP|DFCS_PUSHED);
01214                                 bHigh = true;
01215                                 bUpArrow = true;
01216                                 bUpPressed = true;
01217                             }
01218                         }
01219                         else
01220                         {
01221                             if (bHigh == true)
01222                             {
01223                                 dc.DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP);
01224                                 bHigh = false;
01225                                 bUpArrow = false;
01226                                 bUpPressed = false;
01227                             }
01228                         }
01229                     }
01230                     break;
01231
01232                 case WM_LBUTTONUP:
01233                     {
01234                         if (bHigh)
01235                         {
01236                             dc.DrawFrameControl(rcUpArrow, DFC_SCROLL, DFCS_SCROLLUP);
01237                             bHigh = false;
01238                         }
01239                         bUpArrow = false;
01240                         CPoint pt(msg.lParam);
01241                         if (rcUpArrow.PtInRect(pt))
01242                         {
01243                             if (iFirstItem > 0 )
01244                             {
01245                                 iFirstItem --;
01246                                 CRect crc;
01247                                 GetInsideRect(crc);
01248                                 InvalidateRect(crc, true);
01249                             }
01250                         }
01251                     }
01252
01253                     goto ExitLoop;
01254
01255                 case WM_TIMER:
01256                     {
01257                         if (msg.wParam == 2)
01258                         {
01259                             if (bHigh)
01260                             {
01261                                 CPoint pt(msg.pt);
01262                                 ScreenToClient(&pt);
01263                                 if (rcUpArrow.PtInRect(pt))
01264                                 {
01265                                     bUpPressed = true;
01266                                     if (iFirstItem > 0)
01267                                     {
01268                                         iFirstItem --;
01269                                         CRect crc;
01270                                         GetInsideRect(crc);
01271                                         InvalidateRect(crc, true);
01272                                     }
01273                                     else goto ExitLoop;
01274                                 }
01275                                 else bUpPressed = false;
01276                             }
01277                         }
01278                         break;
01279                     }
01280                 case WM_KEYDOWN:
01281                     if (msg.wParam != VK_ESCAPE) break;
01282
01283                 default:
01284                     DispatchMessage(&msg);
01285                     break;
01286                 }
01287             }
01288
01289         ExitLoop:
01290             KillTimer(2);
01291             ReleaseCapture();
01292             AfxUnlockTempMaps(FALSE);
01293             bLooping = false;
01294             bUpPressed = false;
01295             bUpArrow = false;
01296             CRect crc;
01297             GetInsideRect(crc);
01298             InvalidateRect(crc, true);
01299         }
01300     }
01301
01302     CWnd::OnLButtonDown(nFlags, point);
01303 }
01304
01305
01306 int CGfxOutBarCtrl::InsertItem(const int folder, const int index, LPCTSTR text, const int image, const DWORD exData)
01307 {
01308     ASSERT(folder >= 0 && folder < GetFolderCount());
01309
01310     CBarFolder* pbf = (CBarFolder*) arFolder.GetAt(folder);
01311
01312     return pbf->InsertItem(index, text, image, exData);
01313 }
01314
01315 int CGfxOutBarCtrl::GetItemCount() const
01316 {
01317     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
01318     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01319     return  pbf->GetItemCount();
01320 }
01321
01322 void CGfxOutBarCtrl::SetSelFolder(const int index)
01323 {
01324     ASSERT(index >= 0 && index < GetFolderCount());
01325 //  if (index == iSelFolder) return;
01326
01327     CWnd * pc = GetFolderChild();
01328     if (pc) pc->ShowWindow(SW_HIDE);
01329
01330     if (index != iSelFolder)
01331     {
01332         if (dwFlags&fAnimation && lAnimationTickCount >= 0) AnimateFolderScroll(iSelFolder, index);
01333     }
01334
01335     iSelFolder = index;
01336     iFirstItem = 0;
01337     iLastSel = -1;
01338
01339     pc = GetFolderChild();
01340     if (pc)
01341     {
01342         CRect rc;
01343         GetInsideRect(rc);
01344         pc->MoveWindow(rc);
01345         pc->ShowWindow(SW_SHOW);
01346     }
01347
01348     GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_FOLDERCHANGE, (LPARAM) iSelFolder);
01349
01350     Invalidate();
01351 }
01352
01353 int CGfxOutBarCtrl::GetFolderCount() const
01354 {
01355     return arFolder.GetSize();
01356 }
01357
01358 int CGfxOutBarCtrl::GetSelFolder() const
01359 {
01360     return iSelFolder;
01361 }
01362
01363 void CGfxOutBarCtrl::RemoveFolder(const int index)
01364 {
01365     ASSERT(index >= 0 && index < GetFolderCount());
01366     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(index);
01367     delete pbf;
01368     arFolder.RemoveAt(index);
01369     if (iSelFolder >= index) iSelFolder = index - 1;
01370     if (iSelFolder < 0 && GetFolderCount() > 0) iSelFolder = 0;
01371     Invalidate();
01372 }
01373
01374 int CGfxOutBarCtrl::CBarFolder::InsertItem(int index, LPCTSTR text, const int image, const DWORD exData)
01375 {
01376     if (index < 0 || index > GetItemCount()) index = GetItemCount();
01377
01378     int c = GetItemCount();
01379
01380     CBarItem* pbf = new CBarItem(text, image, exData);
01381
01382     ASSERT(pbf);
01383
01384     if( index < GetItemCount())
01385     {
01386         arItems.InsertAt(index, (void *) pbf);
01387     }
01388     else
01389     {
01390         arItems.Add((void *) pbf);
01391     }
01392
01393     c = GetItemCount();
01394
01395     return index;
01396 }
01397
01398 int CGfxOutBarCtrl::GetCountPerPage() const
01399 {
01400     return 0;
01401 }
01402
01403 CImageList * CGfxOutBarCtrl::SetImageList(CImageList * pImageList, int nImageList)
01404 {
01405     CImageList * o = NULL;
01406     if (nImageList == fSmallIcon)
01407     {
01408         o = pSmallImageList;
01409         pSmallImageList = pImageList;
01410     }
01411     else if (nImageList == fLargeIcon)
01412     {
01413         o = pLargeImageList;
01414         pLargeImageList = pImageList;
01415     }
01416     return o;
01417 }
01418
01419 CImageList * CGfxOutBarCtrl::GetImageList(CImageList* /*pImageList*/, int nImageList)
01420 {
01421     if (nImageList == fSmallIcon) return pSmallImageList;
01422     else if (nImageList == fLargeIcon) return pLargeImageList;
01423     return NULL;
01424 }
01425
01426 CImageList * CGfxOutBarCtrl::SetFolderImageList(const int folder, CImageList * pImageList, int nImageList)
01427 {
01428     ASSERT(folder >= 0 && folder < GetFolderCount());
01429     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(folder);
01430     CImageList * o = NULL;
01431     if (nImageList == fSmallIcon)
01432     {
01433         o = pbf->pSmallImageList;
01434         pbf->pSmallImageList = pImageList;
01435     }
01436     else if (nImageList == fLargeIcon)
01437     {
01438         o = pbf->pLargeImageList;
01439         pbf->pLargeImageList = pImageList;
01440     }
01441     return o;
01442 }
01443
01444 CGfxOutBarCtrl::CBarItem::CBarItem( LPCTSTR name, const int image, DWORD exData )
01445 {
01446     cItem       = NULL;
01447     iImageIndex = image;
01448     dwData      = exData;
01449
01450     if( name )
01451     {
01452         cItem = new TCHAR[ _tcslen( name ) + 1 ];
01453
01454         ASSERT(cItem);
01455
01456         _tcscpy( cItem, name );
01457     }
01458 }
01459
01460 CGfxOutBarCtrl::CBarItem::~CBarItem()
01461 {
01462     if (cItem) delete [] cItem;
01463 }
01464
01465 int CGfxOutBarCtrl::CBarFolder::GetItemCount()
01466 {
01467     return arItems.GetSize();
01468 }
01469
01470 void CGfxOutBarCtrl::PaintItems(CDC * pDC, const int iFolder, CRect rc)
01471 {
01472     ASSERT(iFolder >= 0 && iFolder < GetFolderCount());
01473     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
01474     int max = pbf->GetItemCount(), t;
01475     CRect irc;
01476     GetInsideRect(irc);
01477     int isdc = pDC->SaveDC();
01478     CRgn itemRegion;
01479     itemRegion.CreateRectRgnIndirect(&irc);
01480     pDC->SelectClipRgn(&itemRegion);
01481     itemRegion.DeleteObject();
01482     for (t = iFirstItem; t < max; t++)
01483     {
01484         CRect itemRc;
01485         GetItemRect(iFolder, t, itemRc);
01486         if (itemRc.top > rc.bottom) break;
01487         else DrawItem(pDC, iFolder, itemRc, t);
01488     }
01489     pDC->RestoreDC(isdc);
01490 }
01491
01492
01493 CSize CGfxOutBarCtrl::GetItemSize(const int iFolder, const int index, const int type)
01494 {
01495     ASSERT(iFolder >= 0 && iFolder < GetFolderCount());
01496     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
01497
01498     ASSERT(index >= 0 && index < pbf->GetItemCount());
01499     CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
01500
01501     CSize szImage(0,0);
01502     CSize szLabel(0,0);
01503     CSize szAll(0,0);
01504
01505     if (pi->iImageIndex >= 0)
01506     {
01507         if (type != ircLabel)
01508         {
01509             CImageList * il = GetFolderImageList(iFolder, IsSmallIconView());
01510             ASSERT(il);
01511             if (il)
01512             {
01513                 IMAGEINFO ii;
01514                 il->GetImageInfo(pi->iImageIndex, &ii);
01515                 szImage = CRect(ii.rcImage).Size();
01516             }
01517         }
01518     }
01519     if (pi->cItem)
01520     {
01521         if (type != ircIcon)
01522         {
01523             CClientDC dc(this);
01524             CFont * oft = (CFont *) dc.SelectObject(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));
01525             if (IsSmallIconView())
01526             {
01527                 szLabel = dc.GetTextExtent(pi->cItem, lstrlen(pi->cItem));
01528             }
01529             else
01530             {
01531                 CRect rc;
01532                 GetInsideRect(rc);
01533                 rc.bottom = rc.top;
01534                 dc.DrawText(pi->cItem, lstrlen(pi->cItem), rc, DT_CALCRECT|DT_CENTER|DT_WORDBREAK);
01535                 szLabel = rc.Size();
01536             }
01537             dc.SelectObject(oft);
01538         }
01539     }
01540     if (IsSmallIconView())
01541     {
01542         if (type == ircIcon) szAll = szImage;
01543         else if (type == ircLabel) szAll = szLabel;
01544         else if (type == ircAll) szAll = CSize(szImage.cx + szLabel.cx + xSmallIconLabelOffset, szImage.cy > szLabel.cy ? szImage.cy : szLabel.cy);
01545     }
01546     else
01547     {
01548         if (type == ircIcon) szAll = szImage;
01549         else if (type == ircLabel) szAll = szLabel;
01550         else if (type == ircAll)
01551         {
01552             szAll = CSize(szImage.cx > szLabel.cx ? szImage.cx : szLabel.cx, szLabel.cy + szImage.cy + yLargeIconLabelOffset + yLargeIconSpacing);
01553         }
01554     }
01555     return szAll;
01556 }
01557
01558 CImageList * CGfxOutBarCtrl::GetFolderImageList(const int index, const bool bSmall) const
01559 {
01560     ASSERT(index >= 0 && index < GetFolderCount());
01561     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(index);
01562     if (bSmall)
01563     {
01564         if (pbf->pSmallImageList) return pbf->pSmallImageList; else return pSmallImageList;
01565     }
01566     if (pbf->pLargeImageList) return pbf->pLargeImageList; else return pLargeImageList;
01567 }
01568
01569 void CGfxOutBarCtrl::DrawItem(CDC * pDC, const int iFolder, CRect rc, const int index, const bool bOnlyImage)
01570 {
01571     CImageList * ima = GetFolderImageList(iFolder, IsSmallIconView());
01572
01573     ASSERT(iFolder >= 0 && iFolder < GetFolderCount());
01574     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
01575
01576     ASSERT(index >= 0 && index < pbf->GetItemCount());
01577     CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
01578
01579     ASSERT(pi && ima);
01580
01581     CFont * oft = (CFont *) pDC->SelectObject(CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)));
01582     COLORREF ocr = pDC->SetTextColor(crTextColor);
01583     int obk = pDC->SetBkMode(TRANSPARENT);
01584
01585     if (IsSmallIconView())
01586     {
01587         if (ima)
01588         {
01589             IMAGEINFO ii;
01590             ima->GetImageInfo(pi->iImageIndex, &ii);
01591             CSize szImage = CRect(ii.rcImage).Size();
01592             CPoint pt;
01593             pt.x = rc.left + 2;
01594             pt.y = rc.top + (rc.Height() - szImage.cy) / 2;
01595             ima->Draw(pDC, pi->iImageIndex, pt, ILD_NORMAL);
01596
01597             if (!bOnlyImage)
01598             {
01599                 rc.left += szImage.cx + xSmallIconLabelOffset;
01600                 pDC->TextOut(rc.left, rc.top, CString(pi->cItem));
01601             }
01602
01603         }
01604     }
01605     else
01606     {
01607         if (ima)
01608         {
01609             IMAGEINFO ii;
01610             ima->GetImageInfo(pi->iImageIndex, &ii);
01611             CSize szImage = CRect(ii.rcImage).Size();
01612             CPoint pt;
01613             pt.x = rc.left + (rc.Width() - szImage.cx) / 2;
01614             pt.y = rc.top;// + (rc.Height() - szImage.cy) / 2;
01615             ima->Draw(pDC, pi->iImageIndex, pt, ILD_NORMAL);
01616             if (!bOnlyImage)
01617             {
01618                 rc.top += szImage.cy + yLargeIconLabelOffset;
01619                 pDC->DrawText(pi->cItem, lstrlen(pi->cItem), rc, DT_CENTER|DT_WORDBREAK);
01620             }
01621         }
01622     }
01623
01624     if (dwFlags&fSelHighlight && iLastSel == index && iLastSel >= 0)
01625     {
01626         CRect rc;
01627         GetIconRect(iSelFolder, iLastSel, rc);
01628         rc.InflateRect(1,1);
01629         pDC->Draw3dRect(rc, crDkShadowBorder, cr3dFace);
01630     }
01631
01632     pDC->SetTextColor(ocr);
01633     pDC->SelectObject(oft);
01634     pDC->SetBkMode(obk);
01635
01636 }
01637
01638
01639 BOOL CGfxOutBarCtrl::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
01640 {
01641     CPoint pt(GetMessagePos());
01642     ScreenToClient(&pt);
01643     int index, ht = HitTestEx(pt, index);
01644     if (ht == htFolder)
01645     {
01646         SetCursor(hHandCursor);
01647         return true;
01648     }
01649
01650     return CWnd::OnSetCursor(pWnd, nHitTest, message);
01651 }
01652
01653 void CGfxOutBarCtrl::GetVisibleRange(const int iFolder, int & first, int & last)
01654 {
01655     first = iFirstItem;
01656     CRect rc;
01657     GetInsideRect(rc);
01658
01659     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
01660     int max = pbf->GetItemCount(), t;
01661     for (t = iFirstItem; t < max; t++)
01662     {
01663         CRect itemRc;
01664         GetItemRect(iFolder, t, itemRc);
01665         if (itemRc.bottom > rc.bottom)
01666         {
01667             last = t - 1;
01668             break;
01669         }
01670         else last = t;
01671     }
01672 }
01673
01674 void CGfxOutBarCtrl::OnSize(UINT nType, int cx, int cy)
01675 {
01676     bUpArrow = bDownArrow = false;
01677
01678     CWnd::OnSize(nType, cx, cy);
01679
01680     int t, max = GetFolderCount();
01681     CRect rc;
01682     GetInsideRect(rc);
01683
01684     for (t = 0; t < max; t++)
01685     {
01686         CWnd * pc = GetFolderChild(t);
01687         if (pc) pc->SetWindowPos(0, rc.left, rc.top, rc.Width(), rc.Height(), SWP_NOZORDER);
01688     }
01689 }
01690
01691 void CGfxOutBarCtrl::HighlightItem(const int index, const bool bPressed)
01692 {
01693     CWnd * pf = GetFocus();
01694     if (pf != NULL && pf != this && IsChild(pf)) return;
01695
01696     static bool bOldPressed = false;
01697     if (iLastItemHighlighted == index && bOldPressed == bPressed) return;
01698
01699     bOldPressed = bPressed;
01700
01701     CClientDC dc(this);
01702
01703     CRect irc;
01704     GetInsideRect(irc);
01705     int isdc = dc.SaveDC();
01706     CRgn itemRegion;
01707     itemRegion.CreateRectRgnIndirect(&irc);
01708     dc.SelectClipRgn(&itemRegion);
01709     itemRegion.DeleteObject();
01710
01711
01712     if (iLastItemHighlighted >= 0 && IsValidItem(iLastItemHighlighted))
01713     {
01714         CRect rc;
01715         GetIconRect(iSelFolder, iLastItemHighlighted, rc);
01716         rc.InflateRect(1,1);
01717         dc.Draw3dRect(rc, crBackGroundColor, crBackGroundColor);
01718     }
01719     if (iSelAnimTiming > 0 && index == iLastSel)
01720     {
01721         iLastItemHighlighted = -1;
01722         return;
01723     }
01724     if (dwFlags&fSelHighlight && iLastSel == index)
01725     {
01726         iLastItemHighlighted = -1;
01727         return;
01728     }
01729
01730     iLastItemHighlighted = index;
01731     if (iLastItemHighlighted >= 0 && IsValidItem(iLastItemHighlighted))
01732     {
01733         CRect rc;
01734         GetIconRect(iSelFolder, iLastItemHighlighted, rc);
01735         rc.InflateRect(1,1);
01736         if (bPressed)
01737             dc.Draw3dRect(rc, crDkShadowBorder, cr3dFace);
01738         else
01739             dc.Draw3dRect(rc, cr3dFace, crDkShadowBorder);
01740     }
01741     dc.RestoreDC(isdc);
01742     GetOwner()->SendMessage(WM_OUTBAR_NOTIFY,NM_OB_ITEMHOVER,index);
01743 }
01744
01745 void CGfxOutBarCtrl::GetIconRect(const int iFolder, const int iIndex, CRect & rect)
01746 {
01747     CRect rc;
01748     GetInsideRect(rc);
01749     int top = rc.top;
01750     CSize sz(0,0);
01751     int y = 0;
01752     int spacing = IsSmallIconView() ? ySmallIconSpacing : yLargeIconSpacing;
01753
01754     for (int t = 0; t < iIndex; t++)
01755     {
01756         sz = GetItemSize(iFolder, t, ircAll);
01757         top += sz.cy;
01758         top += spacing;
01759         if (t == iFirstItem - 1) y = top - rc.top;
01760     }
01761     top += spacing;
01762
01763     sz = GetItemSize(iFolder, iIndex, ircIcon);
01764     if (IsSmallIconView())
01765     {
01766         rect.SetRect(rc.left, top, rc.left + sz.cx, top + sz.cy);
01767         rect.left += xLeftMargin + 2;
01768         rect.right += xLeftMargin + 2;
01769         rect.top -= yTopMargin;
01770         rect.bottom -= yTopMargin;
01771
01772         rect.top -= y;
01773         rect.bottom -= y;
01774     }
01775     else
01776     {
01777         rect.SetRect(rc.left + (rc.Width() - sz.cx)/2, top, rc.left + (rc.Width() - sz.cx)/2 + sz.cx, top + sz.cy);
01778         rect.top -= y + 3;
01779         rect.bottom -= y + 2;
01780     }
01781 }
01782
01783 void CGfxOutBarCtrl::GetLabelRect(const int iFolder, const int iIndex, CRect & rect)
01784 {
01785     CRect rc;
01786     GetInsideRect(rc);
01787     int top = rc.top;
01788     CSize sz(0,0);
01789     int y = 0;
01790     int spacing = IsSmallIconView() ? ySmallIconSpacing : yLargeIconSpacing;
01791
01792     for (int t = 0; t < iIndex; t++)
01793     {
01794         sz = GetItemSize(iFolder, t, ircAll);
01795         top += sz.cy;
01796         top += spacing;
01797         if (t == iFirstItem - 1) y = top - rc.top;
01798     }
01799     top += spacing;
01800
01801     sz = GetItemSize(iFolder, iIndex, ircAll);
01802
01803     CSize szLabel = GetItemSize(iFolder, iIndex, ircLabel);
01804
01805     if (IsSmallIconView())
01806     {
01807         rect.SetRect(rc.left, top, rc.left + sz.cx, top + sz.cy);
01808         rect.left += xLeftMargin + 2;
01809         rect.right += xLeftMargin + 2;
01810         rect.top  += yTopMargin - 5;
01811         rect.bottom += yTopMargin - 5;
01812     }
01813     else
01814     {
01815         rect.SetRect(rc.left + (rc.Width() - sz.cx)/2, top, rc.left + (rc.Width() - sz.cx)/2 + sz.cx, top + sz.cy);
01816         rect.top -= y + 3;
01817         rect.bottom -= y + 2;
01818
01819         rect.bottom -=  yLargeIconSpacing;
01820         rect.top    = rect.bottom - szLabel.cy;
01821     }
01822 }
01823
01824
01825 void CGfxOutBarCtrl::StartGroupEdit(const int index)
01826 {
01827     CGfxGroupEdit * pEdit = new CGfxGroupEdit;
01828     pEdit->iIndex = index;
01829     CRect rc;
01830     GetFolderRect(index, rc);
01831     rc.InflateRect(-2,-2);
01832     pEdit->Create(WS_CHILD|WS_VISIBLE|ES_CENTER|ES_MULTILINE,rc,this,1);
01833     pEdit->msgSend = NM_OB_ONGROUPENDEDIT;
01834     pEdit->ModifyStyleEx(0, WS_EX_CLIENTEDGE, SWP_FRAMECHANGED);
01835     ASSERT(index >= 0 && index < GetFolderCount());
01836     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(index);
01837     pEdit->SetWindowText(pbf->cName);
01838     pEdit->SetFocus();
01839 }
01840
01841 void CGfxOutBarCtrl::StartItemEdit(const int index)
01842 {
01843     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
01844     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01845     ASSERT(index >= 0 && index < pbf->GetItemCount());
01846     CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
01847
01848     CGfxGroupEdit * pEdit = new CGfxGroupEdit;
01849     pEdit->iIndex = index;
01850     CRect rc, crc;
01851     GetLabelRect(iSelFolder, index, rc);
01852     GetInsideRect(crc);
01853
01854     DWORD dwFlag = WS_CHILD|WS_VISIBLE|WS_BORDER;
01855
01856     if (!IsSmallIconView())
01857     {
01858         rc.left = crc.left + 5;
01859         rc.right = crc.right - 5;
01860         rc.bottom += 5;
01861         dwFlag |= ES_CENTER|ES_MULTILINE;
01862     }
01863     else
01864     {
01865         CRect irc;
01866         GetIconRect(iSelFolder, index, irc);
01867         dwFlag |= ES_AUTOHSCROLL;
01868         rc.OffsetRect(irc.Width()+1, -6);
01869         pEdit->bNoDown = true;
01870     }
01871
01872     pEdit->Create(dwFlag, rc, this, 1);
01873     pEdit->msgSend = NM_OB_ONLABELENDEDIT;
01874
01875     pEdit->SetWindowText(pi->cItem);
01876     pEdit->SetFocus();
01877
01878 }
01879
01880 void CGfxOutBarCtrl::OnRButtonDown(UINT nFlags, CPoint point)
01881 {
01882     iHitInternal1 = HitTestEx(point, iHitInternal2);
01883
01884     SetCapture();
01885
01886     CPoint pt = point;
01887     ClientToScreen(&pt);
01888
01889     // Load the popup menu.
01890     VERIFY(m_popupMenu.LoadMenu(IDR_GFXOUTBAR));
01891     CCJMenu* pPopup = (CCJMenu*)m_popupMenu.GetSubMenu(0);
01892     ASSERT(pPopup != NULL);
01893
01894     // Load toolbar resource if any for menu icons.
01895     pPopup->LoadToolbar(IDR_GFXOUTBAR);
01896
01897     if (iHitInternal1 == htItem)
01898     {
01899         if (dwFlags&fRemoveItems || dwFlags&fEditItems)
01900         {
01901             pPopup->AppendMenu(MF_SEPARATOR);
01902             if (dwFlags&fRemoveItems)
01903                 ((CMenu*)pPopup)->AppendMenu(MF_STRING, ID_GFX_REMOVEITEM, m_strRemoveItem);
01904
01905             if (dwFlags&fEditItems)
01906                 ((CMenu*)pPopup)->AppendMenu(MF_STRING, ID_GFX_RENAMEITEM, m_strRenameItem);
01907         }
01908     }
01909     else if (iHitInternal1 == htFolder)
01910     {
01911         if (dwFlags&fRemoveGroups || dwFlags&fEditGroups)
01912         {
01913             ((CMenu*)pPopup)->AppendMenu(MF_SEPARATOR);
01914
01915             if (dwFlags&fRemoveGroups)
01916                 ((CMenu*)pPopup)->AppendMenu(MF_STRING, ID_GFX_REMOVEITEM, m_strRemoveItem);
01917
01918             if (dwFlags&fEditGroups)
01919                 ((CMenu*)pPopup)->AppendMenu(MF_STRING, ID_GFX_RENAMEITEM, m_strRenameItem);
01920         }
01921     }
01922
01923     // Display the popup menu, use the main window as its parent.
01924     pPopup->TrackPopupMenu( TPM_LEFTALIGN | TPM_RIGHTBUTTON,
01925         pt.x, pt.y, this );
01926
01927     m_popupMenu.DestroyMenu();
01928     ReleaseCapture();
01929
01930     CWnd::OnRButtonDown(nFlags, point);
01931 }
01932
01933 void CGfxOutBarCtrl::OnGfxLargeicon()
01934 {
01935     SetSmallIconView(false);
01936     Invalidate();
01937 }
01938
01939 void CGfxOutBarCtrl::OnUpdateGfxLargeicon(CCmdUI* pCmdUI)
01940 {
01941     pCmdUI->Enable(IsSmallIconView());
01942 }
01943
01944 void CGfxOutBarCtrl::OnGfxSmallicon()
01945 {
01946     SetSmallIconView(true);
01947     Invalidate();
01948 }
01949
01950 void CGfxOutBarCtrl::OnUpdateGfxSmallicon(CCmdUI* pCmdUI)
01951 {
01952     pCmdUI->Enable(!IsSmallIconView());
01953 }
01954
01955 void CGfxOutBarCtrl::OnGfxRemoveitem()
01956 {
01957     if (iHitInternal1 == htFolder)
01958     {
01959         RemoveFolder(iHitInternal2);
01960     }
01961     else if (iHitInternal1 == htItem)
01962     {
01963         RemoveItem(iHitInternal2);
01964     }
01965 }
01966
01967 void CGfxOutBarCtrl::OnUpdateGfxRemoveitem(CCmdUI* /*pCmdUI*/)
01968 {
01969
01970 }
01971
01972 void CGfxOutBarCtrl::OnGfxRenameitem()
01973 {
01974     if (iHitInternal1 == htFolder)
01975     {
01976         StartGroupEdit(iHitInternal2);
01977     }
01978     else if (iHitInternal1 == htItem)
01979     {
01980         StartItemEdit(iHitInternal2);
01981     }
01982 }
01983
01984 void CGfxOutBarCtrl::OnUpdateGfxRenameitem(CCmdUI* /*pCmdUI*/)
01985 {
01986 }
01987
01988 void CGfxOutBarCtrl::RemoveItem(const int index)
01989 {
01990     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
01991     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
01992     ASSERT(index >= 0 && index < pbf->GetItemCount());
01993     if (IsValidItem(index))
01994     {
01995         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
01996         delete i;
01997
01998         pbf->arItems.RemoveAt(index);
01999         CRect rc;
02000         GetInsideRect(rc);
02001         InvalidateRect(rc);
02002     }
02003 }
02004
02005 bool CGfxOutBarCtrl::IsValidItem(const int index) const
02006 {
02007     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02008     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02009     return (index >= 0 && index < pbf->GetItemCount());
02010 }
02011
02012 DWORD CGfxOutBarCtrl::GetItemData(const int index) const
02013 {
02014     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02015     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02016     if (IsValidItem(index))
02017     {
02018         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
02019         return i->dwData;
02020     }
02021     return 0;
02022 }
02023
02024 int CGfxOutBarCtrl::GetItemImage(const int index) const
02025 {
02026     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02027     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02028     if (IsValidItem(index))
02029     {
02030         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
02031         return i->iImageIndex;
02032     }
02033     return 0;
02034 }
02035
02036 void CGfxOutBarCtrl::SetItemData(const int index, const DWORD dwData)
02037 {
02038     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02039     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02040     if (IsValidItem(index))
02041     {
02042         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
02043         i->dwData = dwData;
02044     }
02045 }
02046
02047 void CGfxOutBarCtrl::SetItemImage(const int index, const int iImage)
02048 {
02049     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02050     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02051     if (IsValidItem(index))
02052     {
02053         CBarItem * i = (CBarItem *) pbf->arItems.GetAt(index);
02054         i->iImageIndex = iImage;
02055     }
02056 }
02057
02058 void CGfxOutBarCtrl::DrawDragArrow(CDC * pDC, const int /*iFrom*/, const int iTo)
02059 {
02060     if (iTo == iLastDragItemDraw) return;
02061     CRect rc1;
02062     if (iLastDragItemDraw >= 0)
02063     {
02064         GetDragItemRect(iLastDragItemDraw, rc1);
02065         if (iLastDragItemDrawType == 0) rc1.bottom = rc1.top + 5;
02066         else if (iLastDragItemDrawType == 1) { rc1.top -= 4; rc1.bottom = rc1.top + 9; }
02067         else if (iLastDragItemDrawType == 2) { rc1.top -= 4; rc1.bottom = rc1.top + 5; }
02068         InvalidateRect(rc1, true);
02069         UpdateWindow();
02070     }
02071     iLastDragItemDraw = iTo;
02072
02073     if (iLastDragItemDraw >= 0)
02074     {
02075         iLastDragItemDrawType = GetDragItemRect(iLastDragItemDraw, rc1);
02076
02077         CPen * op = pDC->SelectObject(pBlackPen);
02078
02079         pDC->MoveTo(rc1.left, rc1.top);
02080         pDC->LineTo(rc1.right, rc1.top);
02081
02082         if (iLastDragItemDrawType != 2)
02083         {
02084             pDC->MoveTo(rc1.left, rc1.top+1);
02085             pDC->LineTo(rc1.left + 7, rc1.top+1);
02086             pDC->MoveTo(rc1.left, rc1.top+2);
02087             pDC->LineTo(rc1.left + 5, rc1.top+2);
02088             pDC->MoveTo(rc1.left, rc1.top+3);
02089             pDC->LineTo(rc1.left + 3, rc1.top+3);
02090             pDC->MoveTo(rc1.left, rc1.top+4);
02091             pDC->LineTo(rc1.left + 1, rc1.top+4);
02092
02093             pDC->MoveTo(rc1.right-1, rc1.top+1);
02094             pDC->LineTo(rc1.right - 7, rc1.top+1);
02095             pDC->MoveTo(rc1.right-1, rc1.top+2);
02096             pDC->LineTo(rc1.right - 5, rc1.top+2);
02097             pDC->MoveTo(rc1.right-1, rc1.top+3);
02098             pDC->LineTo(rc1.right - 3, rc1.top+3);
02099         }
02100         if (iLastDragItemDrawType != 0)
02101         {
02102             pDC->MoveTo(rc1.left, rc1.top-1);
02103             pDC->LineTo(rc1.left + 7, rc1.top-1);
02104             pDC->MoveTo(rc1.left, rc1.top-2);
02105             pDC->LineTo(rc1.left + 5, rc1.top-2);
02106             pDC->MoveTo(rc1.left, rc1.top-3);
02107             pDC->LineTo(rc1.left + 3, rc1.top-3);
02108             pDC->MoveTo(rc1.left, rc1.top-4);
02109             pDC->LineTo(rc1.left + 1, rc1.top-4);
02110
02111             pDC->MoveTo(rc1.right-1, rc1.top-1);
02112             pDC->LineTo(rc1.right - 7, rc1.top-1);
02113             pDC->MoveTo(rc1.right-1, rc1.top-2);
02114             pDC->LineTo(rc1.right - 5, rc1.top-2);
02115             pDC->MoveTo(rc1.right-1, rc1.top-3);
02116             pDC->LineTo(rc1.right - 3, rc1.top-3);
02117             pDC->MoveTo(rc1.right-1, rc1.top-4);
02118             pDC->LineTo(rc1.right - 1, rc1.top-4);
02119         }
02120
02121         pDC->SelectObject(op);
02122     }
02123 }
02124
02125 int CGfxOutBarCtrl::GetDragItemRect(const int index, CRect & rect)
02126 {
02127     CRect rc, crc;
02128     GetInsideRect(crc);
02129     crc.InflateRect(-2, 0);
02130
02131     GetItemRect(iSelFolder, index < GetItemCount() ? index : index - 1, rc);
02132     int line = 0;
02133     if (index < GetItemCount())
02134     {
02135         line = rc.top - 4;
02136     }
02137     else
02138     {
02139         line = rc.bottom + 6;
02140     }
02141     int tpe;
02142     if (index == 0)
02143     {
02144         rect.SetRect(crc.left, line+2, crc.right, line + 7);
02145         tpe = 0;
02146     }
02147     else if (index < GetItemCount())
02148     {
02149         rect.SetRect(crc.left, line - 9, crc.right, line);
02150         tpe = 1;
02151         if (IsSmallIconView())
02152         {
02153             rect.top += 8;
02154             rect.bottom += 8;
02155         }
02156     }
02157     else
02158     {
02159         rect.SetRect(crc.left, line, crc.right, line + 5);
02160         tpe = 2;
02161     }
02162     return tpe;
02163 }
02164
02165
02166 void CGfxOutBarCtrl::AnimateFolderScroll(const int iFrom, const int iTo)
02167 {
02168     ASSERT(iFrom >= 0 && iFrom < GetFolderCount());
02169     ASSERT(iTo >= 0 && iTo < GetFolderCount());
02170
02171     CRect rc, rc1, frc, frc1;
02172     GetInsideRect(rc);
02173     rc1.SetRect(0,0,rc.Width(),rc.Height());
02174     GetFolderRect(iTo, frc);
02175     frc1 = frc;
02176
02177     CClientDC dc(this);
02178     CDC memDC;
02179     memDC.CreateCompatibleDC(&dc);
02180     CBitmap bmpFrom, bmpTo;
02181     bmpFrom.CreateCompatibleBitmap(&dc, rc1.Width(), rc1.Height() + frc.Height() * 2);
02182     bmpTo.CreateCompatibleBitmap(&dc, rc1.Width(), rc1.Height() + frc.Height() * 2);
02183     CDC * pDC = &memDC;
02184
02185     CWnd * pWnd1 = GetFolderChild(iFrom);
02186     CWnd * pWnd2 = GetFolderChild(iTo);
02187
02188     CBitmap * obmp = pDC->SelectObject(&bmpFrom);
02189     if (iTo > iFrom)
02190     {
02191         rc1.bottom += frc.Height() * 2;
02192         pDC->FillSolidRect(rc1, crBackGroundColor);
02193         if (pWnd1)
02194         {
02195             BOOL bPrev = pWnd1->ShowWindow(SW_SHOW);
02196             pWnd1->SendMessage(WM_ERASEBKGND, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02197             pWnd1->SendMessage(WM_PAINT, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02198             if (!bPrev) pWnd1->ShowWindow(SW_HIDE);
02199         }
02200         else PaintItems(pDC, iFrom, rc1);
02201
02202         pDC->SelectObject(&bmpTo);
02203         frc.SetRect(0,0,frc.Width(),frc.Height());
02204         rc1.SetRect(0,frc.Height(),rc.Width(), rc.Height()+frc.Height() * 2);
02205         pDC->FillSolidRect(rc1, crBackGroundColor);
02206
02207         if (pWnd2)
02208         {
02209             CPoint ovpt = pDC->SetViewportOrg(0, frc.Height());
02210             BOOL bPrev = pWnd2->ShowWindow(SW_SHOW);
02211             pWnd2->SendMessage(WM_ERASEBKGND, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02212             pWnd2->SendMessage(WM_PAINT, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02213             if (!bPrev) pWnd2->ShowWindow(SW_HIDE);
02214             pDC->SetViewportOrg(ovpt);
02215         }
02216         else PaintItems(pDC, iTo, rc1);
02217         DrawFolder(pDC, iTo, frc, false);
02218     }
02219     else
02220     {
02221         frc.SetRect(0,0,frc.Width(),frc.Height());
02222         rc1.top += frc.Height();
02223         rc1.bottom += frc.Height() * 2;
02224         pDC->FillSolidRect(rc1, crBackGroundColor);
02225         if (pWnd1)
02226         {
02227             CPoint ovpt = pDC->SetViewportOrg(0, frc.Height());
02228             BOOL bPrev = pWnd1->ShowWindow(SW_SHOW);
02229             pWnd1->SendMessage(WM_ERASEBKGND, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02230             pWnd1->SendMessage(WM_PAINT, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02231             if (!bPrev) pWnd1->ShowWindow(SW_HIDE);
02232             pDC->SetViewportOrg(ovpt);
02233         }
02234         else PaintItems(pDC, iFrom, rc1);
02235
02236         DrawFolder(pDC, iFrom, frc, false);
02237
02238         pDC->SelectObject(&bmpTo);
02239         rc1.SetRect(0,0,rc.Width(), rc.Height() + frc.Height() * 2);
02240         pDC->FillSolidRect(rc1, crBackGroundColor);
02241
02242         if (pWnd2)
02243         {
02244             BOOL bPrev = pWnd2->ShowWindow(SW_SHOW);
02245             pWnd2->SendMessage(WM_ERASEBKGND, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02246             pWnd2->SendMessage(WM_PAINT, (WPARAM) pDC->GetSafeHdc(), (LPARAM) 0);
02247             if (!bPrev) pWnd2->ShowWindow(SW_HIDE);
02248         }
02249         else PaintItems(pDC, iTo, rc1);
02250     }
02251
02252     if (iTo > iFrom)
02253     {
02254         CRect rcFrom, rcTo;
02255         GetFolderRect(iFrom, rcFrom);
02256         GetFolderRect(iTo, rcTo);
02257         int fh = rcFrom.Height();
02258         for (int y = rcTo.top - fh; y > rcFrom.bottom; y -= fh)
02259         {
02260             pDC->SelectObject(&bmpFrom);
02261             dc.BitBlt(rc.left, rcFrom.bottom + 1, rc.Width(), y - rcFrom.bottom - 1, pDC, 0,fh, SRCCOPY);
02262             pDC->SelectObject(&bmpTo);
02263             dc.BitBlt(rc.left, y, rc.Width(), rc.bottom - y + fh, pDC, 0,0, SRCCOPY);
02264             Sleep(lAnimationTickCount);
02265         }
02266     }
02267     else
02268     {
02269         CRect rcFrom, rcTo;
02270         GetFolderRect(iFrom, rcFrom);
02271         int fh = rcFrom.Height();
02272         rcTo.SetRect(rc.left, rc.bottom, rc.right, rc.bottom - fh);
02273         for (int y = rcFrom.top + 1; y < rcTo.top - fh; y += fh)
02274         {
02275             pDC->SelectObject(&bmpTo);
02276             dc.BitBlt(rc.left, rcFrom.top, rc.Width(), y - rcFrom.top - 1, pDC, 0, fh*2, SRCCOPY);
02277             pDC->SelectObject(&bmpFrom);
02278             dc.BitBlt(rc.left, y, rc.Width(), rc.bottom - y, pDC, 0,0, SRCCOPY);
02279             Sleep(lAnimationTickCount);
02280         }
02281     }
02282
02283     pDC->SelectObject(obmp);
02284     // fix potential resource leak - KStowell - 10-21-99
02285     memDC.DeleteDC();
02286     bmpFrom.DeleteObject();
02287     bmpTo.DeleteObject();
02288 }
02289
02290
02291
02292
02293 CString CGfxOutBarCtrl::GetItemText(const int index)
02294 {
02295     CString item;
02296
02297     ASSERT(iSelFolder >= 0 && iSelFolder < GetFolderCount());
02298     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iSelFolder);
02299     if (IsValidItem(index))
02300     {
02301         CBarItem * pi = (CBarItem *) pbf->arItems.GetAt(index);
02302         if (pi->cItem) item = pi->cItem;
02303     }
02304     return item;
02305 }
02306
02307 int CGfxOutBarCtrl::AddFolderBar( LPCTSTR pFolder, CWnd* pSon, const DWORD exData )
02308 {
02309     CBarFolder* pbf = new CBarFolder( pFolder, exData );
02310
02311     ASSERT( pbf );
02312
02313     pbf->pChild = pSon;
02314
02315     arFolder.Add((void*) pbf);
02316
02317     return arFolder.GetSize() - 1;
02318 }
02319
02320 CWnd * CGfxOutBarCtrl::GetFolderChild(int iFolder)
02321 {
02322     if (GetFolderCount())
02323     {
02324         if (iFolder < 0) iFolder = iSelFolder;
02325
02326         CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
02327         return pbf->pChild;
02328     }
02329     return NULL;
02330 }
02331
02332 DWORD CGfxOutBarCtrl::GetFolderData(int iFolder)
02333 {
02334     if (iFolder < 0) iFolder = iSelFolder;
02335     CBarFolder * pbf = (CBarFolder *) arFolder.GetAt(iFolder);
02336     return pbf->dwData;
02337 }
02338
02339 void CGfxOutBarCtrl::SetAnimSelHighlight(const int iTime)
02340 {
02341     if (iTime <= 0) KillTimer(3);
02342     else SetTimer(3, iTime, NULL);
02343     iSelAnimTiming = iTime;
02344 }
02345
02346 void CGfxOutBarCtrl::OnSysColorChange()
02347 {
02348     // TODO: Add your message handler code here
02349     crBackGroundColor   = ::GetSysColor(COLOR_3DSHADOW);//RGB(0,128,128);//
02350     crBackGroundColor1  = ::GetSysColor(COLOR_3DSHADOW);
02351     crTextColor         = ::GetSysColor(COLOR_WINDOW);
02352     cr3dFace            = ::GetSysColor(COLOR_3DFACE);
02353     crLightBorder       = ::GetSysColor(COLOR_3DLIGHT);
02354     crHilightBorder     = ::GetSysColor(COLOR_3DHILIGHT);
02355     crShadowBorder      = ::GetSysColor(COLOR_3DSHADOW);
02356     crDkShadowBorder    = ::GetSysColor(COLOR_3DDKSHADOW);
02357
02358     CWnd::OnSysColorChange();
02359 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ReportWarning Member List

This is the complete list of members for ReportWarning, including all inherited members.

AddWarning(const char *sample) | ReportWarning |
GetDesc() const | ReportWarning |
GetStateDesc() const | ReportWarning |
IsError() const | ReportWarning |
Kind(void) const | ReportWarning |
kind | ReportWarning | [protected]
maxWarnings | ReportWarning | [static]
next | ReportWarning |
PrintOut(UStr &out) const | ReportWarning |
ReportWarning(kTextBinTYPE akind) | ReportWarning |
samples | ReportWarning | [protected]
tooManyWarnings | ReportWarning | [protected]
~ReportWarning() | ReportWarning | [virtual]

Generated on Sat Aug 7 22:56:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTurnOffDispatching Member List

This is the complete list of members for CTurnOffDispatching, including all inherited members.

CTurnOffDispatching() | CTurnOffDispatching | [inline]
m_didSetIt | CTurnOffDispatching | [protected]
~CTurnOffDispatching() | CTurnOffDispatching | [inline]

Generated on Sat Aug 7 22:57:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

USemaphore Member List

This is the complete list of members for USemaphore, including all inherited members.

IsEnteredTwice() const | USemaphore | [inline]
m_didSetSemaphore | USemaphore | [protected]
m_enteredTwice | USemaphore | [protected]
m_semaphore | USemaphore | [protected]
USemaphore(bool &semaphore) | USemaphore | [inline]
~USemaphore() | USemaphore | [inline]

Generated on Sat Aug 7 22:56:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJShellList.h Source File

WinCvs/CJLib/Include/CJShellList.h

Go to the documentation of this file.
00001 // CJShellList.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based upon the MFCENUM example. MFCENUM is a companion sample application
00006 // for Chapter 14 in "Programming the Windows 95 User Interface" by Nancy Cluts,
00007 // available in the Microsoft(R) Development Library.
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/Include/CJShellList.h $
00015  *
00016  * $History: CJShellList.h $
00017  *
00018  * *****************  Version 9  *****************
00019  * User: Kirk Stowell Date: 10/26/99   Time: 10:46p
00020  * Updated in $/CodeJock/Include
00021  * Made class methods virtual for inheritance purposes.
00022  *
00023  * *****************  Version 8  *****************
00024  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00025  * Updated in $/CodeJockey/Include
00026  * Updated copyright and contact information.
00027  *
00028  * *****************  Version 7  *****************
00029  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00030  * Updated in $/CodeJockey/Include
00031  *
00032  * *****************  Version 6  *****************
00033  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00034  * Updated in $/CodeJockey/Include
00035  *
00036  * *****************  Version 5  *****************
00037  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00038  * Updated in $/CodeJockey/Include
00039  * Cleaned up inline functions, and import/export macro so that class will
00040  * be imported when linked to, and exported at compile time.
00041  *
00042  * *****************  Version 4  *****************
00043  * User: Kirk Stowell Date: 6/12/99    Time: 3:00a
00044  * Updated in $/CodeJockey/Include
00045  * Cleaned up image list, view initialization and sorting to use base
00046  * class virtual function SortList(...).
00047  *
00048  * *****************  Version 3  *****************
00049  * User: Kirk Stowell Date: 5/02/99    Time: 3:38p
00050  * Updated in $/CodeJockey/Include
00051  * Added version macro  _WIN32_IE, you will need to have at IE4 or greater
00052  * installed to use this class. This will ensure that the version of
00053  * SHELL32.DLL is compatible.
00054  *
00055  * *****************  Version 2  *****************
00056  * User: Kirk Stowell Date: 5/02/99    Time: 2:05a
00057  * Updated in $/CodeJockey/Include
00058  * Added flag m_bBuildingList, set to true whenever the list is refreshed
00059  * or initialized.
00060  *
00061  * *****************  Version 1  *****************
00062  * User: Kirk Stowell Date: 3/19/99    Time: 11:03p
00063  * Created in $/CodeJockey/Include
00064  * Initial release.
00065  *
00066  ***************************************************************************/
00068
00069 #ifndef __CJSHELLLIST_H__
00070 #define __CJSHELLLIST_H__
00071
00072 #if _WIN32_IE >= 0x0400 // Need to have at IE4 or greater installed.
00073
00074 #if _MSC_VER > 1000
00075 #pragma once
00076 #endif // _MSC_VER > 1000
00077
00078 #include "CJShell.h"
00079 #include "CJListCtrl.h"
00080
00081 // class forwards
00082 class CCJShellTree;
00083
00084 // CCJShellList is a CCJListCtrl derived class which is used to display
00085 // system files and folders, typically associated with a CCJShellTree object
00086 class _CJX_EXT_CLASS CCJShellList : public CCJListCtrl
00087 {
00088     DECLARE_DYNAMIC(CCJShellList)
00089
00090 public:
00091
00092     // Default constructor
00093     //
00094     CCJShellList();
00095
00096     // Virtual destructor
00097     //
00098     virtual ~CCJShellList();
00099
00100 public:
00101
00102     CCJShell        m_shell;            // used for shell operations
00103     CCJShellTree*   m_pTreeCtrl;        // points to a CCJShellTree that is associated with this control
00104     BOOL            m_bBuildingList;
00105     BOOL            m_bShowHidden;
00106
00107 public:
00108     virtual void BuildDefaultColumns();
00109
00110     // this member function rebuilds the current directory list.
00111     //
00112     virtual void RefreshList();
00113
00114     // call this member function to associate a CCJShellTree object with
00115     // this control
00116     //
00117     virtual void AssociateTree(CCJShellTree *pTreeCtrl);
00118
00119     // this member function is called to initialize the system image list
00120     // used by the list control
00121     //
00122     virtual BOOL InitSystemImageLists();
00123
00124     // this member function is called to initialize the list control items
00125     //
00126     virtual BOOL InitListViewItems(
00127         // Pointer to TreeView item data
00128         LPTVITEMDATA lptvid,
00129         // Pointer to parent shell folder
00130         LPSHELLFOLDER lpsf);
00131
00132     // this member function is called to actually populate the list control
00133     // items
00134     //
00135     virtual BOOL PopulateListView(LPTVITEMDATA lptvid, LPSHELLFOLDER lpsf);
00136
00137     // this member function is called to insert a single item into the
00138     // list control
00139     //
00140     virtual int InsertListItem(CString strFileName, BOOL bParse=TRUE);
00141
00142     // Callback routine for sorting list
00143     //
00144     static int CALLBACK ListViewCompareProc(LPARAM, LPARAM, LPARAM);
00145
00146     // override this member function in your derived class to
00147     // peform custom sort routines.
00148     //
00149     virtual bool SortList(
00150         // passed in from control, index of column clicked.
00151         int nCol,
00152         // passed in from control, true if sort order should be ascending.
00153         bool bAscending );
00154
00155 // Overrides
00156     // ClassWizard generated virtual function overrides
00157     //{{AFX_VIRTUAL(CCJShellList)
00158     //}}AFX_VIRTUAL
00159
00160     // Generated message map functions
00161 protected:
00162     //{{AFX_MSG(CCJShellList)
00163     afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);
00164     afx_msg void OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult);
00165     afx_msg void OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult);
00166     //}}AFX_MSG
00167     afx_msg long OnShellNotify(WPARAM wParam, LPARAM lParam);
00168
00169     DECLARE_MESSAGE_MAP()
00170 };
00171
00173 //  Inline Functions
00175
00176 _CJXLIB_INLINE void CCJShellList::AssociateTree(CCJShellTree *pTreeCtrl)
00177     { ASSERT( pTreeCtrl ); m_pTreeCtrl = pTreeCtrl; }
00178
00180
00181 //{{AFX_INSERT_LOCATION}}
00182 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00183
00184 #endif // _WIN32_IE >= 0x0400
00185 #endif // __CJSHELLLIST_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTipDlg Member List

This is the complete list of members for CTipDlg, including all inherited members.

CTipDlg(CWnd *pParent=NULL) | CTipDlg |
DoDataExchange(CDataExchange *pDX) | CTipDlg | [protected, virtual]
GetNextTipString(CString &strNext) | CTipDlg | [protected]
m_bStartup | CTipDlg |
m_pStream | CTipDlg |
m_strTip | CTipDlg |
OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor) | CTipDlg | [protected]
OnInitDialog() | CTipDlg | [protected, virtual]
OnNextTip() | CTipDlg | [protected]
OnOK() | CTipDlg | [protected, virtual]
OnPaint() | CTipDlg | [protected]
~CTipDlg() | CTipDlg | [virtual]

Generated on Sat Aug 7 22:57:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJStatusBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJStatusBar.cpp

Go to the documentation of this file.
00001 // CJStatusBar.cpp : implementation file
00002 //
00003 // Copyright © 1999 Pierre MELLINAND
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2002/06/15 17:49:37 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/CJLibrary/CJStatusBar.cpp $
00011  *
00012  * $History: CJStatusBar.cpp $
00013  *
00014  * *****************  Version 2  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 1:58p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Minor fix for UNICODE builds.
00018  *
00019  * *****************  Version 1  *****************
00020  * User: Kirk Stowell Date: 10/26/99   Time: 11:08p
00021  * Created in $/CodeJock/CJLibrary
00022  *
00023  ***************************************************************************/
00025
00026 #include "StdAfx.h"
00027 #include "CJStatusBar.h"
00028
00029 #ifdef _DEBUG
00030 #define new DEBUG_NEW
00031 #undef THIS_FILE
00032 static char THIS_FILE[] = __FILE__;
00033 #endif
00034
00036 // CCJStatusBarPaneControlInfo
00037
00038 CCJStatusBarPaneControlInfo::CCJStatusBarPaneControlInfo()
00039 {
00040     m_pWnd        = NULL;
00041     m_bAutodelete = TRUE;
00042     m_nPaneID     = 0;
00043 }
00044
00045 CCJStatusBarPaneControlInfo::~CCJStatusBarPaneControlInfo()
00046 {
00047     // TODO: add destruction code here.
00048 }
00049
00050 IMPLEMENT_DYNCREATE(CCJStatusBarPaneControlInfo, CObject)
00051
00052
00053 // CCJStatusBarPane
00054
00055 CCJStatusBarPane::CCJStatusBarPane()
00056 {
00057     // TODO: add construction code here.
00058 }
00059
00060 CCJStatusBarPane::CCJStatusBarPane(CCJStatusBarPane& rPane)
00061 {
00062     m_nID     = rPane.m_nID;
00063     m_cxText  = rPane.m_cxText;
00064     m_nStyle  = rPane.m_nStyle;
00065     m_nFlags  = rPane.m_nFlags;
00066     m_strText = rPane.m_strText;
00067 }
00068
00069 CCJStatusBarPane::~CCJStatusBarPane()
00070 {
00071     // TODO: add destruction code here.
00072 }
00073
00074 CCJStatusBarPane& CCJStatusBarPane::operator=(CCJStatusBarPane& rPane)
00075 {
00076     m_nID     = rPane.m_nID;
00077     m_cxText  = rPane.m_cxText;
00078     m_nStyle  = rPane.m_nStyle;
00079     m_nFlags  = rPane.m_nFlags;
00080     m_strText = rPane.m_strText;
00081     return *this;
00082 }
00083
00085 // CCJStatusBar
00086
00087 CCJStatusBar::CCJStatusBar()
00088 {
00089     // TODO: add construction code here.
00090 }
00091
00092 CCJStatusBar::~CCJStatusBar()
00093 {
00094     for( int i = 0; i < m_aPans.GetSize(); i++ )
00095     {
00096         if( m_aPans[i]->m_pWnd && ::IsWindow(m_aPans[i]->m_pWnd->m_hWnd) )
00097             m_aPans[i]->m_pWnd->CloseWindow();
00098         if( m_aPans[i]->m_bAutodelete )
00099         {
00100             delete m_aPans[i]->m_pWnd;
00101         }
00102         delete m_aPans[i];
00103     }
00104 }
00105
00106 IMPLEMENT_DYNCREATE(CCJStatusBar, CStatusBar)
00107
00108 BEGIN_MESSAGE_MAP(CCJStatusBar, CStatusBar)
00109     //{{AFX_MSG_MAP(CCJStatusBar)
00110     ON_WM_SIZE()
00111     //}}AFX_MSG_MAP
00112 END_MESSAGE_MAP()
00113
00115 // CCJStatusBar message handlers
00116
00117 void CCJStatusBar::OnSize(UINT nType, int cx, int cy)
00118 {
00119     CStatusBar::OnSize(nType, cx, cy);
00120     PositionControls();
00121 }
00122
00123 void CCJStatusBar::PositionControls()
00124 {
00125     int h,v,s;
00126     GetStatusBarCtrl( ).GetBorders( h, v, s ) ;
00127
00128
00129     for(int i = 0; i < m_aPans.GetSize(); i++ )
00130     {
00131         CRect rect;
00132
00133         int index = CommandToIndex( m_aPans[i]->m_nPaneID );
00134         GetItemRect(index,rect);
00135         if( (GetPaneStyle(index) & SBPS_NOBORDERS) == SBPS_NOBORDERS)
00136             m_aPans[i]->m_pWnd->MoveWindow(rect);
00137         else
00138         {
00139             rect.top+=v;
00140             rect.bottom-=v;
00141             rect.left+=h+s;
00142             rect.right-=(h+s);
00143             m_aPans[i]->m_pWnd->MoveWindow(rect);
00144         }
00145
00146     }
00147 }
00148
00149 CCJStatusBarPaneControlInfo * CCJStatusBar::GetPanControl(int nPaneID)
00150 {
00151     for(int i = 0; i < m_aPans.GetSize(); i++ )
00152     {
00153         if( m_aPans[i]->m_nPaneID == nPaneID )
00154             return m_aPans[i];
00155     }
00156     return NULL;
00157 }
00158
00159 BOOL CCJStatusBar::AddControl(CWnd * pWnd, int paneID, BOOL bAutodeleteControl)
00160 {
00161
00162     CCJStatusBarPaneControlInfo * pPanInfo = GetPanControl(paneID);
00163     if( pPanInfo )
00164         return FALSE;
00165
00166     int idx = CommandToIndex( paneID ) ;
00167     if( idx == -1 )
00168         return FALSE;
00169
00170     CCJStatusBarPaneControlInfo * pPan = new CCJStatusBarPaneControlInfo;
00171     pPan->m_nPaneID =  paneID;
00172     pPan->m_pWnd    =  pWnd;
00173     pPan->m_bAutodelete = bAutodeleteControl;
00174
00175     m_aPans.Add(pPan);
00176     PositionControls();
00177     Invalidate(TRUE);
00178     return TRUE;
00179 }
00180
00181 void CCJStatusBar::SetPaneWidth(int index, int cxWidth)
00182 {
00183     UINT nID,nStyle;
00184     int width;
00185     GetPaneInfo(index,nID,nStyle,width);
00186     SetPaneInfo(index,nID,nStyle,cxWidth);
00187 }
00188
00189 BOOL CCJStatusBar::GetStatusPane(int nIndex, CCJStatusBarPane & rPane)
00190 {
00191     if( nIndex < m_nCount  && nIndex >= 0 )
00192     {
00193         GetPaneInfo( nIndex,  rPane.m_nID, rPane.m_nStyle, rPane.m_cxText ) ;
00194         GetPaneText( nIndex , rPane.m_strText );
00195         return TRUE;
00196     }
00197     return FALSE;
00198 }
00199
00200 BOOL CCJStatusBar::AddIndicator( int position, UINT paneID )
00201 {
00202     CArray<CCJStatusBarPane,CCJStatusBarPane> arPanes;
00203
00204     CCJStatusBarPane statusPane;
00205     int i;
00206
00207     i = 0;
00208     while( GetStatusPane(i,statusPane) )
00209     {
00210         arPanes.Add( statusPane );
00211         i++;
00212     }
00213     if( position < 0 )
00214         position = 0;
00215     if( position > arPanes.GetSize() )
00216         position = arPanes.GetSize()-1;
00217
00218     for(i = 0; i < arPanes.GetSize(); i ++ )
00219     {
00220         if( paneID == arPanes[i].m_nID )
00221         {
00222             TRACE0( "CCJStatusBar::AddIndicator(): Pane ID already exists \n" );
00223             return FALSE;
00224         }
00225     }
00226
00227     CCJStatusBarPane new_statusPane;
00228     new_statusPane.m_nID = paneID;
00229     if( arPanes.GetSize() )
00230         arPanes.InsertAt(position,new_statusPane);
00231     else
00232         arPanes.Add(new_statusPane);
00233
00234     UINT * pIndicators = new UINT[arPanes.GetSize()];
00235     for(i=0;i<arPanes.GetSize();i++)
00236         pIndicators[i]=arPanes[i].m_nID;
00237
00238     SetRedraw(FALSE);
00239     SetIndicators(pIndicators,arPanes.GetSize());
00240
00241     // Replace infos of indicators ..
00242     for(i = 0; i < arPanes.GetSize(); i++ )
00243     {
00244         if( arPanes[i].m_nID != paneID )
00245         {
00246             SetPaneInfo(i,arPanes[i].m_nID,arPanes[i].m_nStyle,arPanes[i].m_cxText);
00247             SetPaneText(i,arPanes[i].m_strText);
00248         }
00249         else
00250         {
00251             SetPaneWidth(i,50);
00252             SetPaneText(i,arPanes[i].m_strText);
00253         }
00254
00255     }
00256
00257     delete [] pIndicators;
00258     SetRedraw(TRUE);
00259     PositionControls();
00260     Invalidate(TRUE);
00261     return TRUE;
00262 }
00263
00264 void CCJStatusBar::RemovePane(int nPaneID)
00265 {
00266     SetRedraw(FALSE);
00267     CWnd * pwnd = NULL;
00268     for( int i = 0; i < m_aPans.GetSize(); i++ )
00269     {
00270         if( m_aPans[i]->m_nPaneID == nPaneID )
00271         {
00272             if( m_aPans[i]->m_bAutodelete )
00273                 pwnd = m_aPans[i]->m_pWnd;
00274             delete m_aPans[i];
00275             m_aPans.RemoveAt(i);
00276             break;
00277         }
00278     }
00279     if( pwnd )
00280     {
00281         pwnd->DestroyWindow();
00282         delete pwnd;
00283     }
00284
00285     CArray<CCJStatusBarPane,CCJStatusBarPane> arPanes;
00286     CCJStatusBarPane statusPane;
00287     i = 0;
00288     while( GetStatusPane(i,statusPane) )
00289     {
00290         if( statusPane.m_nID != (UINT)nPaneID )
00291             arPanes.Add( statusPane );
00292         i++;
00293     }
00294     // Now remove the indicator
00295     UINT * pIndicators = new UINT[arPanes.GetSize()];
00296     for(i=0;i<arPanes.GetSize();i++)
00297         pIndicators[i]=arPanes[i].m_nID;
00298     SetIndicators(pIndicators,arPanes.GetSize());
00299
00300     // Replace infos of indicators ..
00301     for(i = 0; i < arPanes.GetSize(); i++ )
00302     {
00303         SetPaneInfo(i,arPanes[i].m_nID,arPanes[i].m_nStyle,arPanes[i].m_cxText);
00304         SetPaneText(i,arPanes[i].m_strText);
00305     }
00306
00307     delete [] pIndicators;
00308     SetRedraw(TRUE);
00309     PositionControls();
00310     Invalidate(TRUE);
00311 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

irciiAttrCvt Member List

This is the complete list of members for irciiAttrCvt, including all inherited members.

ircii2ctcp(std::string *in) | irciiAttrCvt |
tokens | irciiAttrCvt | [private, static]

Generated on Sat Aug 7 22:53:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJBrowseEdit.cpp Source File

WinCvs/CJLib/CJLibrary/CJBrowseEdit.cpp

Go to the documentation of this file.
00001 // CJBrowseEdit.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:48 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJBrowseEdit.cpp $
00011  *
00012  * $History: CJBrowseEdit.cpp $
00013  *
00014  * *****************  Version 14  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:35p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Modified resource include for static builds.
00018  *
00019  * Fixed potential resource and memory leak problems.
00020  *
00021  * Made class methods virtual for inheritance purposes.
00022  *
00023  * *****************  Version 13  *****************
00024  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00025  * Updated in $/CodeJockey/CJLibrary
00026  * Updated copyright and contact information.
00027  *
00028  * *****************  Version 12  *****************
00029  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00030  * Updated in $/CodeJockey/CJLibrary
00031  * Added Unicode compliance, thanks to Barry Burton for his help with
00032  * this.
00033  *
00034  * *****************  Version 11  *****************
00035  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00036  * Updated in $/CodeJockey/CJLibrary
00037  *
00038  * *****************  Version 10  *****************
00039  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00040  * Updated in $/CodeJockey/CJLibrary
00041  *
00042  * *****************  Version 9  *****************
00043  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00044  * Updated in $/CodeJockey/CJLibrary
00045  *
00046  * *****************  Version 8  *****************
00047  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00048  * Updated in $/CodeJockey/CJLibrary
00049  *
00050  * *****************  Version 7  *****************
00051  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00052  * Updated in $/CodeJockey/CJLibrary
00053  *
00054  * *****************  Version 6  *****************
00055  * User: Kirk Stowell Date: 6/25/99    Time: 11:03a
00056  * Updated in $/CodeJockey/CJLibrary
00057  * Chaned image list color mask and export macros.
00058  *
00059  * *****************  Version 5  *****************
00060  * User: Kirk Stowell Date: 6/14/99    Time: 10:41p
00061  * Updated in $/CodeJockey/CJ60Lib
00062  * Cleaned up control and pointer initialization, creation and activation.
00063  * Added support for CCJMenu popup.
00064  *
00065  * *****************  Version 4  *****************
00066  * User: Kirk Stowell Date: 6/01/99    Time: 11:57p
00067  * Updated in $/CodeJockey/CJ60Lib
00068  * Minor fix with build using error level 4 warning.
00069  *
00070  * *****************  Version 3  *****************
00071  * User: Kirk Stowell Date: 5/29/99    Time: 12:53a
00072  * Updated in $/CodeJockey/CJ60Lib
00073  * Changed reference to CCJShellFile to CCJShell, to reflect class
00074  * renaming.
00075  *
00076  * *****************  Version 2  *****************
00077  * User: Kirk Stowell Date: 4/03/99    Time: 10:54p
00078  * Updated in $/CodeJockey/CJ60Lib
00079  * Added comments and cleaned up code.
00080  *
00081  * *****************  Version 1  *****************
00082  * User: Kirk Stowell Date: 1/16/99    Time: 10:53p
00083  * Created in $/CodeJockey/CJ60Lib
00084  * Initial release.
00085  *
00086  ***************************************************************************/
00088
00089 #include "stdafx.h"
00090 #include "CJBrowseEdit.h"
00091 #include "CJShell.h"
00092 #include "CJMenu.h"        // CCJMenu class declaration
00093 #include "CJResource.h"
00094
00095 #ifdef _DEBUG
00096 #define new DEBUG_NEW
00097 #undef THIS_FILE
00098 static char THIS_FILE[] = __FILE__;
00099 #endif
00100
00102 // CCJBrowseButton class
00104
00105 CCJBrowseButton::CCJBrowseButton()
00106 {
00107     m_pParentWnd = NULL;
00108     m_pEditWnd   = NULL;
00109     m_hIcon      = NULL;
00110 }
00111
00112 CCJBrowseButton::~CCJBrowseButton()
00113 {
00114     // fix potential resource leak - KStowell - 10-22-99.
00115     m_Font.DeleteObject();
00116     _destroyIcon(m_hIcon);
00117 }
00118
00119 BEGIN_MESSAGE_MAP(CCJBrowseButton, CButton)
00120     //{{AFX_MSG_MAP(CCJBrowseButton)
00121     ON_CONTROL_REFLECT(BN_CLICKED, OnClicked)
00122     //}}AFX_MSG_MAP
00123 END_MESSAGE_MAP()
00124
00125 BOOL CCJBrowseButton::Create(CWnd* pWnd, BROWSE_TYPE eType, UINT nMenu, UINT nSubMenuIndx)
00126 {
00127     ASSERT( eType );
00128     ASSERT_VALID( pWnd );
00129     ASSERT_VALID( pWnd->GetParent() );
00130
00131     m_pEditWnd      = pWnd;
00132     m_pParentWnd    = m_pEditWnd->GetParent();
00133     m_eType         = eType;
00134     m_nMenu         = nMenu;
00135     m_nSubMenuIndx  = nSubMenuIndx;
00136
00137     CRect rc;
00138     m_pEditWnd->GetWindowRect( &rc );
00139     m_pEditWnd->SetWindowPos( NULL, 0, 0, rc.Width()-23, rc.Height(), SWP_NOZORDER|SWP_NOMOVE );
00140     m_pParentWnd->ScreenToClient( &rc );
00141     rc.left = rc.right-18;
00142
00143     DWORD dwStyle = WS_VISIBLE|WS_CHILD|WS_TABSTOP|BS_CENTER|BS_VCENTER;
00144
00145     // if this is a browse for directory or file edit control.
00146     if(( m_eType == BT_DIRECTORY ) || ( m_eType == BT_FILE ))
00147     {
00148         if( !CButton::Create(_T("..."), dwStyle, rc, m_pParentWnd, GetNextID( m_pParentWnd )))
00149         {
00150             TRACE0( "Failed to create browse edit browse button.\n" );
00151             return FALSE;
00152         }
00153
00154         // set the tab order and font, enable the window based on parent's state.
00155         SetWindowPos( m_pEditWnd, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );
00156         EnableWindow( m_pEditWnd->IsWindowEnabled( ));
00157         UpdateFont();
00158
00159         return TRUE;
00160     }
00161
00162     // if this is a popup menu edit control.
00163     else if( m_eType == BT_POPUPMENU )
00164     {
00165         if( !CButton::Create( NULL, dwStyle|BS_ICON, rc, m_pParentWnd, GetNextID( m_pParentWnd )))
00166         {
00167             TRACE0( "Failed to create browse edit browse button.\n" );
00168             return FALSE;
00169         }
00170
00171         // set the tab order and font, enable the window based on parent's state.
00172         SetWindowPos( m_pEditWnd, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );
00173         EnableWindow( m_pEditWnd->IsWindowEnabled( ));
00174         UpdateFont();
00175
00176         // create the icon arrow that is displayed on the button.
00177         CImageList imageList;
00178         CBitmap    bitmap;
00179
00180         bitmap.LoadBitmap( IDB_BTN_ARROW );
00181         imageList.Create( 15, 17, ILC_COLORDDB|ILC_MASK, 1, 1 );
00182         imageList.Add( &bitmap, RGB( 255,0,255 ));
00183
00184         // set the icon and free resources.
00185         // fix potential resource leak - KStowell - 10-22-99.
00186         m_hIcon = imageList.ExtractIcon( 0 );
00187         SetIcon(m_hIcon);
00188         imageList.Detach();
00189         bitmap.DeleteObject();
00190
00191         return TRUE;
00192     }
00193
00194     return FALSE;
00195 }
00196
00197 void CCJBrowseButton::OnClicked()
00198 {
00199     if( m_eType == BT_DIRECTORY )
00200     {
00201         CCJShell sfi;
00202         sfi.m_strTitle = m_strTitle;
00203
00204         if( sfi.BrowseForFolder( m_pParentWnd ) == IDOK ) {
00205             m_pEditWnd->SetWindowText( sfi.m_strPath );
00206         }
00207     }
00208
00209     else if( m_eType == BT_FILE )
00210     {
00211         CFileDialog dlg( m_bOpenFileDialog, m_strDefExt, m_strFileName,
00212             m_dwFlags, m_strFilter, m_pParentWnd );
00213
00214         if( dlg.DoModal() == IDOK ) {
00215             m_pEditWnd->SetWindowText( dlg.GetPathName( ));
00216         }
00217     }
00218
00219     else if( m_eType == BT_POPUPMENU )
00220     {
00221         ASSERT( m_nMenu != 0 );
00222         SetState( true );
00223
00224         CRect rc;
00225         GetWindowRect( &rc );
00226
00227         CMenu menu;
00228         VERIFY( menu.LoadMenu( m_nMenu ));
00229
00230         CCJMenu* pPopup = (CCJMenu*)menu.GetSubMenu( m_nSubMenuIndx );
00231         ASSERT( pPopup != NULL );
00232
00233         pPopup->TrackPopupMenu( TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_VERTICAL,
00234             rc.right, rc.top, m_pParentWnd, &rc );
00235
00236         // Return the button state to normal.
00237         SetState( false );
00238     }
00239 }
00240
00241 void CCJBrowseButton::UpdateFont()
00242 {
00243     m_Font.DeleteObject();
00244     NONCLIENTMETRICS ncm;
00245     ncm.cbSize = sizeof(ncm);
00246     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00247     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00248     SetFont(&m_Font);
00249 }
00250
00252 // CCJBrowseEdit
00253
00254 CCJBrowseEdit::CCJBrowseEdit() : m_eType( BT_DIRECTORY ), m_nMenu( (UINT)-1 )
00255 {
00256
00257 }
00258
00259 CCJBrowseEdit::~CCJBrowseEdit()
00260 {
00261 }
00262
00263 BEGIN_MESSAGE_MAP(CCJBrowseEdit, CEdit)
00264     //{{AFX_MSG_MAP(CCJBrowseEdit)
00265     ON_WM_ENABLE()
00266     ON_WM_SHOWWINDOW()
00267     ON_WM_CREATE()
00268     //}}AFX_MSG_MAP
00269 END_MESSAGE_MAP()
00270
00272 // CCJBrowseEdit message handlers
00273
00274 void CCJBrowseEdit::OnEnable(BOOL bEnable)
00275 {
00276     CEdit::OnEnable(bEnable);
00277     m_btnBrowse.EnableWindow(bEnable);
00278 }
00279
00280 void CCJBrowseEdit::OnShowWindow(BOOL bShow, UINT nStatus)
00281 {
00282     CEdit::OnShowWindow( bShow, nStatus );
00283     m_btnBrowse.ShowWindow( bShow?SW_SHOW:SW_HIDE );
00284 }
00285
00286 void CCJBrowseEdit::PreSubclassWindow()
00287 {
00288     CEdit::PreSubclassWindow();
00289
00290     // initialize control to defaults.
00291     InitializeControl();
00292 }
00293
00294 int CCJBrowseEdit::OnCreate(LPCREATESTRUCT lpCreateStruct)
00295 {
00296     if (CEdit::OnCreate(lpCreateStruct) == -1)
00297         return -1;
00298
00299     // initialize control to defaults.
00300     InitializeControl();
00301
00302     return 0;
00303 }
00304
00305 void CCJBrowseEdit::InitializeControl()
00306 {
00307     // create the browse button associated with this control.
00308     if( m_btnBrowse.Create( this, m_eType, m_nMenu, m_nSubMenuIndx ))
00309     {
00310         // initialize some defaults
00311         SetDlgOpenFile();
00312         SetDlgDefExt( _T( "*.*" ));
00313         SetDlgFileName();
00314         SetDlgStyle( OFN_HIDEREADONLY|OFN_FILEMUSTEXIST|OFN_EXPLORER );
00315         SetDlgFilter( _T( "All Files (*.*)|*.*||" ));
00316         SetDlgOwner( GetParent( ));
00317         SetDlgTitle( _T( "Select Folder" ));
00318     }
00319 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJTreeCtrl.h Source File

WinCvs/CJLib/Include/CJTreeCtrl.h

Go to the documentation of this file.
00001 // CJTreeCtrl.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the CTreeView articles from http://www.codeguru.com/treeview
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:51 $
00011  * $Revision: 1.1.1.2 $
00012  * $Archive: /CodeJock/Include/CJTreeCtrl.h $
00013  *
00014  * $History: CJTreeCtrl.h $
00015  *
00016  * *****************  Version 6  *****************
00017  * User: Kirk Stowell Date: 10/30/99   Time: 2:17p
00018  * Updated in $/CodeJock/Include
00019  * Overrode OnEraseBkgnd(...) for flicker free drawing.
00020  *
00021  * *****************  Version 5  *****************
00022  * User: Kirk Stowell Date: 10/26/99   Time: 10:49p
00023  * Updated in $/CodeJock/Include
00024  * Made class methods virtual for inheritance purposes.
00025  *
00026  * *****************  Version 4  *****************
00027  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00028  * Updated in $/CodeJockey/Include
00029  *
00030  * *****************  Version 3  *****************
00031  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00032  * Updated in $/CodeJockey/Include
00033  *
00034  * *****************  Version 2  *****************
00035  * User: Kirk Stowell Date: 6/23/99    Time: 12:09a
00036  * Updated in $/CodeJockey/Include
00037  *
00038  * *****************  Version 1  *****************
00039  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00040  * Created in $/CodeJockey/Include
00041  * Initial creation.
00042  *
00043  ***************************************************************************/
00045
00046 #ifndef __CJTREECTRL_H__
00047 #define __CJTREECTRL_H__
00048
00049 #if _MSC_VER >= 1000
00050 #pragma once
00051 #endif // _MSC_VER >= 1000
00052
00053 #include <afxtempl.h>
00054
00055 // CCJTreeCtrl is a CTreeCtrl derived class which extends the base class to add
00056 // additional functionality and enhancements.
00057 class _CJX_EXT_CLASS CCJTreeCtrl : public CTreeCtrl
00058 {
00059     DECLARE_DYNAMIC(CCJTreeCtrl)
00060
00061 public:
00062
00063     // Default constructor
00064     //
00065     CCJTreeCtrl();
00066
00067     // Virtual destructor
00068     //
00069     virtual ~CCJTreeCtrl();
00070
00071 protected:
00072
00073     HTREEITEM   m_hItemFirstSel;    // first selected item in a multi selection tree control.
00074     DWORD       m_dwDragStart;      // the number of milliseconds that have elapsed since the system was started.
00075     BOOL        m_bMultiSelect;     // TRUE for a multiselection tree control.
00076
00077     struct Color_Font { COLORREF color; LOGFONT logfont; };
00078     CMap< void*, void*, Color_Font, Color_Font& > m_mapColorFont ;
00079
00080 public:
00081
00082     // Call this function to retrieve the tree view item that has the specified
00083     // relationship, indicated by the nCode parameter, to hItem.
00084     // Returns The handle of the next item if successful; otherwise NULL.
00085     virtual HTREEITEM GetNextItem(
00086         // Handle of a tree item.
00087         HTREEITEM hItem,
00088         // A flag indicating the type of relation to hItem. This flag can be one of the
00089         // following values:
00090         // TVGN_CARET   Retrieves the currently selected item.
00091         // TVGN_CHILD   Retrieves the first child item. The hItem parameter must be NULL.
00092         // TVGN_DROPHILITE   Retrieves the item that is the target of a drag-and-drop operation.
00093         // TVGN_FIRSTVISIBLE   Retrieves the first visible item.
00094         // TVGN_NEXT   Retrieves the next sibling item.
00095         // TVGN_NEXTVISIBLE   Retrieves the next visible item that follows the specified item.
00096         // TVGN_PARENT   Retrieves the parent of the specified item.
00097         // TVGN_PREVIOUS   Retrieves the previous sibling item.
00098         // TVGN_PREVIOUSVISIBLE   Retrieves the first visible item that precedes the specified item.
00099         // TVGN_ROOT   Retrieves the first child item of the root item of which the specified item is a part.
00100         UINT nCode );
00101
00102     // Get next item as if outline was completely expanded
00103     // Returns the item immediately below the reference item.
00104     //
00105     virtual HTREEITEM GetNextItem(
00106         // The reference item
00107         HTREEITEM hItem );
00108
00109     // Get previous item as if outline was completely expanded.
00110     // Returns the item immediately above the reference item.
00111     //
00112     virtual HTREEITEM GetPrevItem(
00113         // The reference item
00114         HTREEITEM hItem );
00115
00116     // Gets last item in the branch, returns the last item.
00117     //
00118     virtual HTREEITEM GetLastItem(
00119         // Node identifying the branch. NULL will return the last item in outine.
00120         HTREEITEM hItem );
00121
00122     // Returns the previously selected tree item in a multi selection tree control.
00123     //
00124     virtual HTREEITEM GetPrevSelectedItem(
00125         // The reference item.
00126         HTREEITEM hItem );
00127
00128     // Returns the next selected item in a multi selection tree control.
00129     virtual HTREEITEM GetNextSelectedItem(
00130         // The reference item.
00131         HTREEITEM hItem );
00132
00133     // Returns the first selected item in a multi selection tree control.
00134     //
00135     virtual HTREEITEM GetFirstSelectedItem();
00136
00137     // Returns the RGB text value for the referenced tree item.
00138     // Returns (COLORREF)-1 if color was not set.
00139     //
00140     virtual COLORREF GetItemColor(
00141         // The reference item
00142         HTREEITEM hItem);
00143
00144     // Clears all selections from multi selection tree control.
00145     //
00146     virtual void ClearSelection();
00147
00148     // sets the font for the reference tree item.
00149     //
00150     virtual void SetItemFont(
00151         // The reference item
00152         HTREEITEM hItem,
00153         // new font for tree item.
00154         LOGFONT& logfont);
00155
00156     // sets the font to bold for the refernece tree item.
00157     //
00158     virtual void SetItemBold(
00159         // The reference item
00160         HTREEITEM hItem,
00161         // TRUE for bold font.
00162         BOOL bBold=TRUE);
00163
00164     // Sets the text color for the tree item.
00165     //
00166     virtual void SetItemColor(
00167         // The reference item
00168         HTREEITEM hItem,
00169         // RGB value for the tree items text.
00170         COLORREF color);
00171
00172     // enables multi selection tree control.
00173     //
00174     virtual void EnableMultiSelect(
00175         // TRUE for multi selection tree control.
00176         BOOL bMultiSelect=TRUE);
00177
00178     // returns the current font used by the tree item.
00179     //
00180     virtual BOOL GetItemFont(
00181         // The reference item
00182         HTREEITEM hItem,
00183         // item font.
00184         LOGFONT * plogfont);
00185
00186     // returns TRUE if the tree item has a bold font.
00187     virtual BOOL GetItemBold(
00188         // The reference item
00189         HTREEITEM hItem);
00190
00191     // Selects items from hItemFrom to hItemTo in a multi selection tree control.
00192     // Does not select child item if parent is collapsed. Removes selection from
00193     // all other items.
00194     //
00195     virtual BOOL SelectItems(
00196         // item to start selecting from.
00197         HTREEITEM hItemFrom,
00198         // item to end selection at.
00199         HTREEITEM hItemTo);
00200
00201     // Finds an item that contains the search string, returns the handle
00202     // to the item or NULL.
00203     //
00204     virtual HTREEITEM FindItem(
00205         // String to search for.
00206         LPCTSTR lpszSearch,
00207         // Should the search be case sensitive.
00208         BOOL bCaseSensitive = FALSE,
00209         // Search direction - TRUE for down.
00210         BOOL bDownDir = TRUE,
00211         // True if search should match whole words.
00212         BOOL bWholeWord = FALSE,
00213         // Item to start searching from. NULL for currently selected item.
00214         HTREEITEM hItem = NULL);
00215
00216 protected:
00217
00218     // Virtual function used by FindItem to allow this function to filter the
00219     // result of FindItem returns TRUE if item matches the criteria.
00220     //
00221     virtual BOOL IsFindValid(
00222         // Handle of the item
00223         HTREEITEM hti);
00224
00225 // Overrides
00226     // ClassWizard generated virtual function overrides
00227     //{{AFX_VIRTUAL(CCJTreeCtrl)
00228     protected:
00229     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00230     //}}AFX_VIRTUAL
00231
00232     // Generated message map functions
00233 protected:
00234     //{{AFX_MSG(CCJTreeCtrl)
00235     afx_msg void OnPaint();
00236     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00237     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00238     //}}AFX_MSG
00239
00240     DECLARE_MESSAGE_MAP()
00241 };
00242
00244 //  Inline Functions
00246
00247 _CJXLIB_INLINE HTREEITEM CCJTreeCtrl::GetNextItem( HTREEITEM hItem, UINT nCode )
00248     { return CTreeCtrl::GetNextItem( hItem, nCode ); }
00249
00250 _CJXLIB_INLINE void CCJTreeCtrl::EnableMultiSelect(BOOL bMultiSelect)
00251     { m_bMultiSelect = bMultiSelect; }
00252
00254
00255 //{{AFX_INSERT_LOCATION}}
00256 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00257
00258 #endif // __CJTREECTRL_H__
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SortList.h Source File

common/SortList.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * SortList.cpp --- sorted list using binary sort
00023  */
00024
00025 #ifndef SORTLIST_H
00026 #define SORTLIST_H
00027
00028 #include <stdlib.h>
00029 #include <string.h>
00030 #include <errno.h>
00031
00032 #include <assert.h>
00033
00034 // Note : this templates require to have a ref. counting
00035 // and a correct operator= if the instancied class
00036 // has some allocations inside.
00037
00038 typedef enum
00039 {
00040     computeNone,
00041     computeLR
00042 } computeSort;
00043
00044 template <class T> class CSortList
00045 {
00046 public :
00047     // method to sort elements (similar to qsort, return -1, 0, 1)
00048     typedef int (*QsortMethod)(const T &, const T &);
00049
00050     CSortList(int def_size, QsortMethod method_sort)
00051     {
00052         assert(def_size > 1 && method_sort != 0L);
00053
00054         fDef = def_size;
00055         fMethod = method_sort;
00056         fMax = fNum = 0;
00057         fElems = 0L;
00058         fNewOne = false;
00059     }
00060
00061     ~CSortList()
00062     {
00063         Reset();
00064     }
00065
00066     // - insert or ignore (if already exists) an element in the list.
00067     // - return the location of the element in the list.
00068     int Insert(const T & entry, bool replaceIfAlreadyExists = false)
00069     {
00070         int index = Location(entry), i;
00071
00072         if(!fNewOne)
00073         {
00074             if(replaceIfAlreadyExists)
00075                 fElems[index] = entry;
00076
00077             return index;
00078         }
00079
00080         // check memory
00081         if(fNum == fMax)
00082         {
00083             T *newElems = 0L;
00084
00085             try
00086             {
00087                 newElems = new T[fMax + fDef];
00088
00089                 for(i = 0; i < fNum + 1; i++)
00090                 {
00091                     if(i < index)
00092                         newElems[i] = fElems[i];
00093                     else if(i == index)
00094                         newElems[i] = entry;
00095                     else
00096                         newElems[i] = fElems[i - 1];
00097                 }
00098             }
00099             catch(...)
00100             {
00101                 if(newElems != 0L)
00102                     delete[] newElems;
00103                 throw;
00104             }
00105
00106             fMax += fDef;
00107             fNum++;
00108             if(fElems != 0L)
00109                 delete[] fElems;
00110             fElems = newElems;
00111             return index;
00112         }
00113
00114         for(i = fNum - 1; i >= index; i--)
00115         {
00116             fElems[i + 1] = fElems[i];
00117         }
00118
00119         fElems[index] = entry;
00120         fNum++;
00121         return index;
00122     }
00123
00124     // say if this entry is already in the list
00125     // and return its index in the list (does not
00126     // change the row list).
00127     bool Inside(const T & entry, int *indexptr = 0L) const
00128     {
00129         int index = ((CSortList*)this)->Location(entry);
00130
00131         if(indexptr != 0L)
00132             *indexptr = fNewOne ? -1 : index;
00133
00134         return !fNewOne;
00135     }
00136
00137     // - insert or ignore (if already exists) an element in the list.
00138     // - return true if the information was ALREADY in the sorted list.
00139     bool InsideAndInsert(const T & entry, int * indexptr = 0L,
00140         bool replaceIfAlreadyExists = false)
00141     {
00142         int index = Insert(entry, replaceIfAlreadyExists);
00143         if(indexptr != 0L)
00144             *indexptr = index;
00145
00146         return !fNewOne;
00147     }
00148
00149     // delete the entry from the sorted list which matches
00150     // this entry. Returns false if no matching entry was found.
00151     bool Delete(const T & entry)
00152     {
00153         int index = Location(entry), i;
00154
00155         if(fNewOne)
00156             return false;
00157
00158         if(fNum == 1)
00159         {
00160             Reset();
00161             return true;
00162         }
00163
00164         for(i = index; i < fNum - 1; i++)
00165         {
00166             fElems[i] = fElems[i + 1];
00167         }
00168         --fNum;
00169         return true;
00170     }
00171
00172     // return an allocated copy of the sorted list.
00173     T *Result(int *num_elem)
00174     {
00175         *num_elem = 0;
00176
00177         if(fNum == 0)
00178             return 0L;
00179
00180         *num_elem = fNum;
00181         T *res = new T[fNum];
00182         for(int i = 0; i < fNum; i++)
00183         {
00184             res[i] = fElems[i];
00185         }
00186
00187         return res;
00188     }
00189
00190     // return an element of the list.
00191     inline const T & Get(int index) const
00192     {
00193         return Entry(index);
00194     }
00195
00196     // get ready for a new sorted list (another "Init" call is not necessary,
00197     // but you can do it to start another kind of sorted list)
00198     void Reset(void)
00199     {
00200         if(fElems != 0L)
00201             delete[] fElems;
00202         fMax = fNum = 0;
00203         fElems = 0L;
00204     }
00205
00206     // # elements in the sorted list at this time
00207     inline int NumOfElements(void) {return fNum;}
00208 private :
00209     QsortMethod fMethod;
00210     int fDef;       // default num of elem (ex: 100)
00211     int fNum;       // number of element
00212     int fMax;       // number of element allocated
00213     T *fElems;      // elements stored
00214     bool fNewOne;   // set by 'Location'
00215
00216     // return the element pointer by index.
00217     inline const T & Entry(int num_elem) const
00218     {
00219         assert(num_elem >= 0 && num_elem < fNum);
00220
00221         return fElems[num_elem];
00222     }
00223
00224     // - return the location of the element in the
00225     // sorted list (does not change the list).
00226     int Location(const T & entry)
00227     {
00228         int left, right, cmp_left = 0, cmp_right = 0;
00229         int cmp_middle, middle;
00230         computeSort compute;
00231
00232         if(fNum == 0)
00233         {
00234             fNewOne = true;
00235             return 0;
00236         }
00237
00238         fNewOne = false;
00239         left = 0;
00240         right = fNum - 1;
00241         compute = computeLR;
00242
00243         while(1)
00244         {
00245             middle = (left + right) / 2;
00246
00247             if(compute == computeLR)
00248             {
00249                 // firstime only
00250                 cmp_left = fMethod(Entry(left), entry);
00251                 cmp_right = fMethod(Entry(right), entry);
00252             }
00253             cmp_middle = fMethod(Entry(middle), entry);
00254
00255             // entry already exist (E == L || E == R)
00256             if(cmp_left == 0 || cmp_right == 0)
00257             {
00258                 return cmp_left == 0 ? left : right;
00259             }
00260
00261             // found an entry superior to the right (E > R && E < R + 1)
00262             if(cmp_right < 0)
00263             {
00264                 fNewOne = true;
00265                 return right + 1;
00266             }
00267
00268             // found an entry inferior to the left (L - 1 < E < L)
00269             if(cmp_left > 0)
00270             {
00271                 fNewOne = true;
00272                 return left;
00273             }
00274
00275             // found an entry inferior to the right (E > R - 1 && E < R)
00276             if(middle == left)
00277             {
00278                 fNewOne = true;
00279                 return right;
00280             }
00281
00282             // entry already exist (E == M)
00283             if(cmp_middle == 0)
00284                 return middle;
00285             // restart search (E > M && E < R)
00286             else if(cmp_middle < 0)
00287             {
00288                 compute = computeNone;
00289                 left = middle;
00290                 cmp_left = cmp_middle;
00291                 cmp_right = 1;
00292             }
00293             // restart search (E > L && E < M)
00294             else
00295             {
00296                 compute = computeNone;
00297                 right = middle;
00298                 cmp_right = cmp_middle;
00299                 cmp_left = -1;
00300             }
00301         }
00302         assert(0);
00303         return 0;
00304     }
00305 };
00306
00307 #endif // SORTLIST_H
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPseudoRotButton Member List

This is the complete list of members for UPseudoRotButton, including all inherited members.

class_ID enum value | UPseudoRotButton |
DoRotate(int icon, bool refresh=true) | UPseudoRotButton | [virtual]
fCurrentIcon | UPseudoRotButton | [protected]
fIconSuite | UPseudoRotButton | [protected]
GetCurrentState(void) const | UPseudoRotButton | [inline]
ReadIconsID(LStream *inStream, std::vector< short > &res) | UPseudoRotButton | [protected]
UPseudoRotButton(LStream *inStream, ClassIDT inImpID=LBevelButton::imp_class_ID) | UPseudoRotButton |
~UPseudoRotButton() | UPseudoRotButton | [virtual]

Generated on Sat Aug 7 22:55:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPersistentInt Member List

This is the complete list of members for CPersistentInt, including all inherited members.

_GetBaseClass() | CPersistentInt | [protected, static]
classCPersistent | CPersistent | [protected, static]
classCPersistentInt | CPersistentInt | [protected, static]
classUObject | UObject | [protected, static]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CPersistentInt(const char *uniqueName, int defValue, kClassPersistent pclass=kNoClass) | CPersistentInt | [inline]
CPersistentT(const char *uniqueName, intdefValue, kClassPersistent pclass) | CPersistentT< int > | [inline]
CreateObject(const char *className) | UObject | [static]
Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | CPersistentT< int > | [inline, virtual]
GetRuntimeClass() const | CPersistentInt | [virtual]
GetTimeStamp() const | CPersistent | [inline]
IsKindOf(const URuntimeClass *pClass) const | UObject |
LoadAll(const char *only=0L) | CPersistent | [static]
m_fAllEntries | CPersistent | [protected, static]
m_fDefValue | CPersistentT< int > | [protected]
m_fTimeStamp | CPersistent | [protected]
m_fValue | CPersistentT< int > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
operator const int &() const | CPersistentInt | [inline]
operator const T &() const | CPersistentT< int > | [inline]
operator=(const int &val) | CPersistentInt | [inline]
operator==(const int &val) const | CPersistentInt | [inline]
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtCPersistentInt(void) | CPersistentInt | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | CPersistentT< int > | [inline, virtual]
SizeOf(void) const | CPersistentT< int > | [inline, virtual]
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CPersistent() | CPersistent | [virtual]
~CPersistentInt() | CPersistentInt | [inline, virtual]
~CPersistentT() | CPersistentT< int > | [inline, virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ndir.h Source File

WinCvs/ndir.h

Go to the documentation of this file.
00001 /*  ndir.c - portable directory routines
00002     Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
00003
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation; either version 1, or (at your option)
00007     any later version.
00008
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.  */
00013
00014 /* Everything non trivial in this code is taken from: @(#)msd_dir.c 1.4
00015    87/11/06.  A public domain implementation of BSD directory routines
00016    for MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield),
00017    August 1897 */
00018
00019 /*
00020  * Modified for WinCvs : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00021  */
00022
00023 #if _MSC_VER > 1000
00024 #pragma once
00025 #endif
00026
00027 #ifndef _NDIR_H
00028 #define _NDIR_H
00029
00030 #include <sys/types.h>  /* ino_t definition */
00031
00032 #define rewinddir(dirp) seekdir(dirp, 0L)
00033
00034 /* 255 is said to be big enough for Windows NT.  The more elegant
00035    solution would be declaring d_name as one byte long and allocating
00036    it to the actual size needed.  */
00037 #define MAXNAMLEN   255
00038
00039 struct direct
00040 {
00041   ino_t d_ino;          /* a bit of a farce */
00042   int d_reclen;         /* more farce */
00043   int d_namlen;         /* length of d_name */
00044   char d_name[MAXNAMLEN + 1];   /* garentee null termination */
00045 };
00046
00047 struct _dircontents
00048 {
00049   char *_d_entry;
00050   struct _dircontents *_d_next;
00051 };
00052
00053 typedef struct _dirdesc
00054 {
00055   int dd_id;            /* uniquely identify each open directory */
00056   long dd_loc;          /* where we are in directory entry is this */
00057   struct _dircontents *dd_contents; /* pointer to contents of dir */
00058   struct _dircontents *dd_cp;   /* pointer to current position */
00059 } DIR;
00060
00061 #ifdef __cplusplus
00062 extern "C" {
00063 #endif /* __cplusplus */
00064
00065 extern void seekdir (DIR *, long);
00066 extern long telldir (DIR *);
00067 extern DIR *opendir (const char *);
00068 extern void closedir (DIR *);
00069 extern struct direct *readdir (DIR *);
00070
00071 #ifdef __cplusplus
00072 }
00073 #endif /* __cplusplus */
00074
00075
00076 /*
00077  * Local Variables:
00078  * mode:C
00079  * ChangeLog:ChangeLog
00080  * compile-command:make
00081  * End:
00082  */
00083 #endif /* _NDIR_H */
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

match_dir Member List

This is the complete list of members for match_dir, including all inherited members.

dirPath | match_dir |
match_dir(const UStr &inDirPath) | match_dir | [inline]
operator()(const MultiFilesEntry &inEntry) const | match_dir | [inline]

Generated on Sat Aug 7 22:55:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MainFrm.cpp Source File

WinCvs/MainFrm.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // MainFrm.cpp : implementation of the CMainFrame class
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026
00027 #include "MainFrm.h"
00028 #include "WinCvsBrowser.h"
00029 #include "BrowseFileView.h"
00030 #include "WincvsView.h"
00031 #include "Persistent.h"
00032 #include "AppConsole.h"
00033 #include "Splash.h"
00034 #include "BrowserBar.h"
00035 #include "ExploreBar.h"
00036 #include "CvsPrefs.h"
00037 #include "AppGlue.h"
00038 #include "wincvs_winutil.h"
00039 #include "CvsAlert.h"
00040
00041 #ifdef _DEBUG
00042 #define new DEBUG_NEW
00043 #undef THIS_FILE
00044 static char THIS_FILE[] = __FILE__;
00045 #endif
00046
00048 #define NOEXPLOREVIEW
00049
00050 CMString gHistoryLocs(100, "P_BrowserLocs");
00051 static CWinPlacement gMainPlacement("P_MainPlacement");
00052
00053 static bool sAskingMainThread;
00054 static UStr sGetEnvResult;
00055
00056 static CSemaphore sGetEnv(0);
00057
00062 static bool IsAppEnabled()
00063 {
00064     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00065     return !app->IsCvsRunning();
00066 }
00067
00069 // CWinPlacement
00070
00071 CWinPlacement::CWinPlacement(const char* uniqueName)
00072     : CPersistent(uniqueName, kNoClass)
00073 {
00074     m_hasOne = false;
00075 }
00076
00077 CWinPlacement::~CWinPlacement()
00078 {
00079 }
00080
00081 unsigned int CWinPlacement::SizeOf(void) const
00082 {
00083     return m_hasOne ? sizeof(WINDOWPLACEMENT) : 0;
00084 }
00085
00086 const void* CWinPlacement::GetData(void) const
00087 {
00088     return m_hasOne ? &m_placement : 0L;
00089 }
00090
00091 void CWinPlacement::SetData(const void* ptr, unsigned int size)
00092 {
00093     if( size == sizeof(WINDOWPLACEMENT) )
00094     {
00095         memcpy(&m_placement, ptr, sizeof(WINDOWPLACEMENT));
00096         m_hasOne = true;
00097     }
00098 }
00099
00100 CWinPlacement& CWinPlacement::operator=(const WINDOWPLACEMENT& newplace)
00101 {
00102     TouchTimeStamp();
00103
00104     memcpy(&m_placement, &newplace, sizeof(WINDOWPLACEMENT));
00105     m_hasOne = true;
00106
00107     return *this;
00108 }
00109
00111 WINDOWPLACEMENT CWinPlacement::GetPlacement() const
00112 {
00113     return m_placement;
00114 }
00115
00117 bool CWinPlacement::IsHasOne() const
00118 {
00119     return m_hasOne;
00120 }
00121
00123 // CMainFrame
00124
00125 IMPLEMENT_DYNAMIC(CMainFrame, CCJMDIFrameWnd)
00126
00127 BEGIN_MESSAGE_MAP(CMainFrame, CCJMDIFrameWnd)
00128     ON_WM_INITMENU()
00129     //{{AFX_MSG_MAP(CMainFrame)
00130     ON_WM_CREATE()
00131     ON_WM_CLOSE()
00132     ON_WM_DROPFILES()
00133     ON_CBN_SELCHANGE(ID_HISTORYBROWSE, OnHistorySelect)
00134     ON_WM_ACTIVATE()
00135     ON_WM_SYSCOMMAND()
00136     ON_COMMAND(ID_VIEW_RECURSIVE, OnViewRecursive)
00137     ON_COMMAND(ID_VIEW_MODIFIED, OnViewModified)
00138     ON_UPDATE_COMMAND_UI(ID_VIEW_MODIFIED, OnUpdateViewModified)
00139     ON_UPDATE_COMMAND_UI(ID_VIEW_RECURSIVE, OnUpdateViewRecursive)
00140     ON_COMMAND(ID_VIEW_CONFLICT, OnViewConflict)
00141     ON_UPDATE_COMMAND_UI(ID_VIEW_CONFLICT, OnUpdateViewConflict)
00142     ON_COMMAND(ID_VIEW_UNKNOWN, OnViewUnknown)
00143     ON_UPDATE_COMMAND_UI(ID_VIEW_UNKNOWN, OnUpdateViewUnknown)
00144     ON_COMMAND(ID_VIEW_MISSING, OnViewMissing)
00145     ON_UPDATE_COMMAND_UI(ID_VIEW_MISSING, OnUpdateViewMissing)
00146     ON_COMMAND(ID_VIEW_IGNORE, OnViewIgnore)
00147     ON_UPDATE_COMMAND_UI(ID_VIEW_IGNORE, OnUpdateViewIgnore)
00148     ON_UPDATE_COMMAND_UI(ID_FILTERMASK, OnUpdateFilterMask)
00149     ON_UPDATE_COMMAND_UI(ID_HISTORYBROWSE, OnUpdateHistory)
00150     ON_COMMAND(ID_VIEW_ADDED, OnViewAdded)
00151     ON_UPDATE_COMMAND_UI(ID_VIEW_ADDED, OnUpdateViewAdded)
00152     ON_UPDATE_COMMAND_UI(ID_VIEW_REMOVED, OnUpdateViewRemoved)
00153     ON_COMMAND(ID_VIEW_REMOVED, OnViewRemoved)
00154     ON_COMMAND(ID_VIEW_CHANGED, OnViewChanged)
00155     ON_UPDATE_COMMAND_UI(ID_VIEW_CHANGED, OnUpdateViewChanged)
00156     ON_COMMAND(ID_VIEW_HIDEUNKNOWN, OnViewHideunknown)
00157     ON_UPDATE_COMMAND_UI(ID_VIEW_HIDEUNKNOWN, OnUpdateViewHideunknown)
00158     ON_WM_TIMER()
00159     ON_COMMAND(ID_VIEW_CLEARALL, OnViewClearall)
00160     ON_UPDATE_COMMAND_UI(ID_VIEW_CLEARALL, OnUpdateViewClearall)
00161     ON_COMMAND(ID_VIEW_HIDEMISSING, OnViewHidemissing)
00162     ON_UPDATE_COMMAND_UI(ID_VIEW_HIDEMISSING, OnUpdateViewHidemissing)
00163     ON_UPDATE_COMMAND_UI(ID_VIEW_FILTERBAR_ENABLE, OnUpdateViewFilterbarEnable)
00164     ON_UPDATE_COMMAND_UI(ID_VIEW_FILTERBAR_CLEARALL, OnUpdateViewFilterbarClearall)
00165     ON_UPDATE_COMMAND_UI(ID_VIEW_FILTERBAR_OPTIONS, OnUpdateViewFilterbarOptions)
00166     //}}AFX_MSG_MAP
00167     ON_COMMAND_EX(ID_VIEW_BROWSER_BAR, CCJMDIFrameWnd::OnBarCheck)
00168     ON_COMMAND_EX(ID_VIEW_FILES_BAR, CCJMDIFrameWnd::OnBarCheck)
00169     ON_COMMAND_EX(ID_VIEW_FILTER_BAR, CCJMDIFrameWnd::OnBarCheck)
00170     ON_COMMAND_EX(ID_VIEW_MULTI_BAR, CCJMDIFrameWnd::OnBarCheck)
00171     ON_COMMAND_EX(ID_VIEW_TAGS_BAR, CCJMDIFrameWnd::OnBarCheck)
00172     ON_COMMAND_EX(ID_VIEW_CONSOLE_BAR, CCJMDIFrameWnd::OnBarCheck)
00173     ON_COMMAND_EX(ID_VIEW_WORKSPACE, CCJMDIFrameWnd::OnBarCheck)
00174     ON_UPDATE_COMMAND_UI(ID_VIEW_BROWSER_BAR, CCJMDIFrameWnd::OnUpdateControlBarMenu)
00175     ON_UPDATE_COMMAND_UI(ID_VIEW_FILES_BAR, CCJMDIFrameWnd::OnUpdateControlBarMenu)
00176     ON_UPDATE_COMMAND_UI(ID_VIEW_FILTER_BAR, CCJMDIFrameWnd::OnUpdateControlBarMenu)
00177     ON_UPDATE_COMMAND_UI(ID_VIEW_MULTI_BAR, CCJMDIFrameWnd::OnUpdateControlBarMenu)
00178     ON_UPDATE_COMMAND_UI(ID_VIEW_TAGS_BAR, CCJMDIFrameWnd::OnUpdateControlBarMenu)
00179     ON_UPDATE_COMMAND_UI(ID_VIEW_CONSOLE_BAR, CCJMDIFrameWnd::OnUpdateControlBarMenu)
00180     ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE, CCJMDIFrameWnd::OnUpdateControlBarMenu)
00181     // Global help commands
00182     //ON_COMMAND(ID_HELP_FINDER, CCJMDIFrameWnd::OnHelpFinder)
00183     ON_COMMAND(ID_HELP, CCJMDIFrameWnd::OnHelp)
00184     //ON_COMMAND(ID_CONTEXT_HELP, CCJMDIFrameWnd::OnContextHelp)
00185     //ON_COMMAND(ID_DEFAULT_HELP, CCJMDIFrameWnd::OnHelpFinder)
00186 END_MESSAGE_MAP()
00187
00189 // CMainFrame construction/destruction
00190
00191 CMainFrame::CMainFrame()
00192 {
00193     m_bRestoreFocus = FALSE;
00194
00195     LoadLocationSettings();
00196 }
00197
00198 CMainFrame::~CMainFrame()
00199 {
00200 }
00201
00206 BOOL CMainFrame::InitializeDockingWindows()
00207 {
00208     // Initial size when docked: top, bottom, left, right.
00209     // ??? SetInitialSize(125,225,225,225);
00210
00211     if( !m_wndWorkspace.Create(this, ID_VIEW_WORKSPACE, _T("Workspace"), CSize(200, 100), CBRS_LEFT) )
00212     {
00213         TRACE0("Failed to create dialog bar (Workspace)\n");
00214         return FALSE;       // fail to create
00215     }
00216
00217     m_wndWorkspace.AddView(_T("Modules"), RUNTIME_CLASS(CBrowserBar));
00218
00219 #ifndef NOEXPLOREVIEW
00220     m_wndWorkspace.AddView(_T("Explore"), RUNTIME_CLASS(CExploreBar));
00221 #endif
00222
00223     m_wndWorkspace.SetActiveView(0);
00224
00225     // Define the image list to use with the tab control
00226     m_TabImages.Create(IDR_WORKSPACE, 16, 1, RGB(255,255,255));
00227     m_wndWorkspace.SetTabImageList(&m_TabImages);
00228
00229     //m_wndWorkspace.SetMenuID(IDR_POPUP);
00230     m_wndWorkspace.EnableDockingOnSizeBar(CBRS_ALIGN_ANY);
00231
00232     if( !m_consolebar.Create(this, ID_VIEW_CONSOLE_BAR, _T("Output"), CSize(300, 100), CBRS_BOTTOM) )
00233     {
00234         TRACE0("Failed to create dialog bar (Output)\n");
00235         return FALSE;       // fail to create
00236     }
00237
00238     //m_consolebar.SetMenuID(IDR_POPUP);
00239     m_consolebar.EnableDockingOnSizeBar(CBRS_ALIGN_ANY);
00240
00241     EnableDockingSizeBar(CBRS_ALIGN_ANY);
00242     DockSizeBar(&m_wndWorkspace);
00243     DockSizeBar(&m_consolebar);
00244
00245     return TRUE;
00246 }
00247
00249 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00250 {
00251     if( CCJMDIFrameWnd::OnCreate(lpCreateStruct) == -1 )
00252         return -1;
00253
00254     if( !CreateStatusBar() )
00255     {
00256         return -1;
00257     }
00258
00259     EnableDocking(CBRS_ALIGN_ANY);
00260
00261     if( !CreateToolbar("Standard", IDR_MAINFRAME, &m_wndToolBar) ||
00262         !CreateToolbar("Browse", IDR_BROWSER, &m_wndBrowser, &m_wndToolBar, ID_VIEW_BROWSER_BAR) ||
00263         !CreateToolbar("Files", IDR_FILELIST, &m_wndList, &m_wndBrowser, ID_VIEW_FILES_BAR) ||
00264         !CreateToolbar("Multi-Users", IDR_MULTIUSER, &m_wndMultiUser, &m_wndList, ID_VIEW_MULTI_BAR) ||
00265         !CreateToolbar("Tags", IDR_TAGS, &m_wndTags, &m_wndMultiUser, ID_VIEW_TAGS_BAR) ||
00266         !CreateToolbar("Filter", IDR_FILTER, &m_wndFilter, &m_wndTags, ID_VIEW_FILTER_BAR) )
00267     {
00268         return -1;
00269     }
00270
00271     if( !CreateLocationCombo() )
00272     {
00273         return -1;
00274     }
00275
00276     if( !InitializeDockingWindows() )
00277     {
00278         TRACE0("Failed to initialize docking windows\n");
00279         return -1;  // fail to create
00280     }
00281
00282     LoadDockState();
00283
00284     // CG: The following line was added by the Splash Screen component.
00285     CSplashWnd::ShowSplashScreen(this);
00286
00287     SetTimer(99, 200, 0L);
00288
00289     return 0;
00290 }
00291
00296 BOOL CMainFrame::CreateStatusBar()
00297 {
00298     if( !m_wndStatusBar.Create(this) )
00299     {
00300         TRACE0("Failed to create status bar\n");
00301         return FALSE;   // fail to create
00302     }
00303
00304     return TRUE;
00305 }
00306
00317 BOOL CMainFrame::CreateToolbar(const char* title, const UINT toolbarID, CToolBar* toolBar, CToolBar* dockToolBar /*= NULL*/, UINT childID /*= AFX_IDW_TOOLBAR*/)
00318 {
00319     if( !toolBar->CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, CRect(0, 0, 0, 0), childID) ||
00320         !toolBar->LoadToolBar(toolbarID) )
00321     {
00322         TRACE1("Failed to create toolbar (%s)\n", title);
00323         return FALSE;   // fail to create
00324     }
00325
00326     toolBar->SetWindowText(title);
00327     toolBar->SetHeight(28);
00328     toolBar->SetBarStyle(toolBar->GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00329     toolBar->EnableDocking(CBRS_ALIGN_ANY);
00330
00331     if( dockToolBar )
00332     {
00333         DockControlBarLeftOf(toolBar, dockToolBar);
00334     }
00335     else
00336     {
00337         DockControlBar(toolBar, AFX_IDW_DOCKBAR_TOP);
00338     }
00339
00340     return TRUE;
00341 }
00342
00348 void CMainFrame::DockControlBarLeftOf(CToolBar* toolBar, CToolBar* dockToolBar)
00349 {
00350     // Get MFC to adjust the dimensions of all docked ToolBars so that GetWindowRect will be accurate
00351     RecalcLayout();
00352
00353     CRect rect;
00354     dockToolBar->GetWindowRect(&rect);
00355     rect.OffsetRect(1, 0);
00356     DWORD dwLeftOfStyle = dockToolBar->GetBarStyle();
00357
00358     UINT dockBarID = 0;
00359     dockBarID = (dwLeftOfStyle & CBRS_ALIGN_TOP)                        ? AFX_IDW_DOCKBAR_TOP : dockBarID;
00360     dockBarID = (dwLeftOfStyle & CBRS_ALIGN_BOTTOM && dockBarID == 0)   ? AFX_IDW_DOCKBAR_BOTTOM : dockBarID;
00361     dockBarID = (dwLeftOfStyle & CBRS_ALIGN_LEFT && dockBarID == 0)     ? AFX_IDW_DOCKBAR_LEFT : dockBarID;
00362     dockBarID = (dwLeftOfStyle & CBRS_ALIGN_RIGHT && dockBarID == 0)    ? AFX_IDW_DOCKBAR_RIGHT : dockBarID;
00363
00364     // When we take the default parameters on rect, DockControlBar will dock
00365     // each Toolbar on a separate line.  By calculating a rectangle, we in effect
00366     // are simulating a Toolbar being dragged to that location and docked.
00367     DockControlBar(toolBar, dockBarID, &rect);
00368 }
00369
00374 BOOL CMainFrame::CreateLocationCombo()
00375 {
00376     m_wndBrowser.SetButtonInfo(3, ID_SEPARATOR, TBBS_SEPARATOR, 200);
00377
00378     CRect rect;
00379     m_wndBrowser.GetItemRect(3, &rect);
00380     rect.bottom += HISTLOC_VISIBLEITEMS * HISTLOC_IMAGE_CX + rect.bottom % HISTLOC_IMAGE_CX;
00381
00382     m_browseHist.SetItems(&gHistoryLocs);
00383
00384     if( !m_browseHist.Create(CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | WS_HSCROLL, rect, &m_wndBrowser, ID_HISTORYBROWSE) )
00385     {
00386         TRACE0("Failed to create combobox (Browse History)\n");
00387         return FALSE;   // fail to create
00388     }
00389
00390     // Older versions of Windows* (NT 3.51 for instance) fail with DEFAULT_GUI_FONT
00391     if( !m_fontNormal.CreateStockObject(DEFAULT_GUI_FONT) )
00392     {
00393         if( !m_fontNormal.CreatePointFont(80, "MS Sans Serif") )
00394         {
00395             TRACE0("Failed to create default GUI font\n");
00396             return FALSE;
00397         }
00398     }
00399
00400     // Make browse history use default GUI font
00401     m_browseHist.SetFont(&m_fontNormal);
00402
00403     return TRUE;
00404 }
00405
00409 void CMainFrame::LoadDockState()
00410 {
00411 #if 1
00412     //
00413     CDockState state;
00414     state.LoadState(_T("Bar State"));
00415
00416     for(int i = 0; i < state.m_arrBarInfo.GetSize(); i++)
00417     {
00418         CControlBarInfo* pInfo = (CControlBarInfo*)state.m_arrBarInfo[i];
00419         ASSERT(pInfo != NULL);
00420         if( !pInfo->m_bFloating )
00421         {
00422             pInfo->m_pBar = GetControlBar(pInfo->m_nBarID);
00423             if( pInfo->m_pBar == NULL )
00424             {
00425                 delete (CControlBarInfo*)state.m_arrBarInfo[i];
00426                 state.m_arrBarInfo.RemoveAt(i);
00427                 i--;
00428             }
00429         }
00430     }
00431
00432     SetDockState(state);
00433 #else
00434     LoadBarState(_T("Bar State"));
00435 #endif
00436     m_state.LoadWindowPos(this);
00437 }
00438
00440 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00441 {
00442     return CCJMDIFrameWnd::PreCreateWindow(cs);
00443 }
00444
00446 // CMainFrame diagnostics
00447
00448 #ifdef _DEBUG
00449 void CMainFrame::AssertValid() const
00450 {
00451     CCJMDIFrameWnd::AssertValid();
00452 }
00453
00454 void CMainFrame::Dump(CDumpContext& dc) const
00455 {
00456     CCJMDIFrameWnd::Dump(dc);
00457 }
00458
00459 #endif //_DEBUG
00460
00462 // CMainFrame message handlers
00463
00465 void CMainFrame::OnClose()
00466 {
00467     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00468     if( app->IsCvsRunning() )
00469     {
00470         CvsAlert(kCvsAlertStopIcon,
00471             "CVS is currently running.", "Stop CVS first before exiting.",
00472             BUTTONTITLE_OK, NULL).ShowAlert();
00473
00474         return;
00475     }
00476
00477     // Write all persistent settings
00478     StoreLocationSettings();
00479
00480     // Charybids Ltd's suggested fix:
00481     // Saving the window positions whilst iconic trashes the registry.
00482     if( !IsIconic() )
00483     {
00484         m_state.SaveWindowPos(this);
00485         SaveBarState(_T("Bar State"));
00486
00487         WINDOWPLACEMENT wp;
00488         wp.length = sizeof wp;
00489         if( GetWindowPlacement(&wp) )
00490         {
00491             wp.flags &= WPF_RESTORETOMAXIMIZED;
00492             gMainPlacement = wp;
00493         }
00494     }
00495
00496     // Only way I found to notify the browser and to prevent the memory leak support
00497     app->GetBrowserView()->ResetBrowser(0L);
00498
00499     CCJMDIFrameWnd::OnClose();
00500
00501     gCvsPrefs.save(true);
00502 }
00503
00505 void CMainFrame::OnDropFiles(HDROP hDropInfo)
00506 {
00507     SetActiveWindow();  // activate us first !
00508     UINT nFiles = ::DragQueryFile(hDropInfo, (UINT)-1, NULL, 0);
00509
00510     CWinApp* pApp = AfxGetApp();
00511     for(UINT iFile = 0; iFile < nFiles; iFile++)
00512     {
00513         TCHAR szFileName[_MAX_PATH];
00514         ::DragQueryFile(hDropInfo, iFile, szFileName, _MAX_PATH);
00515
00516         if( iFile == 0 )
00517         {
00518             CColorConsole out;
00519             out << kBold << "Locating: " << kNormal << kUnderline << szFileName << kNormal <<  kNormal << kNL;
00520
00521             CWincvsApp* pApp = (CWincvsApp *)AfxGetApp();
00522             if( pApp )
00523             {
00524                 const TCHAR *p1, *p2 = szFileName;
00525
00526                 while( p2 )
00527                 {
00528                     p1 = ++p2;
00529                     p2 = strchr(p2, _T('\\'));
00530                 }
00531
00532                 CWinCvsBrowser* pBrowser = pApp->GetBrowserView();
00533                 if( pBrowser )
00534                 {
00535                     if( pBrowser->StepToLocation(szFileName, true) )
00536                     {
00537                         pApp->GetFileView()->ResetView(false, p1);
00538                     }
00539                 }
00540             }
00541         }
00542
00543         // replace \ by /
00544         TCHAR *tmp = szFileName;
00545         while( (tmp = strchr(tmp, '\\')) != 0L )
00546         {
00547             *tmp++ = '/';
00548         }
00549
00550         cvs_out("%s\n", szFileName);
00551
00552         //pApp->OpenDocumentFile(szFileName);
00553     }//end for
00554
00555     ::DragFinish(hDropInfo);
00556 }
00557
00559 void CMainFrame::DropFiles(HDROP hDropInfo)
00560 {
00561     OnDropFiles(hDropInfo);
00562 }
00563
00565 void CMainFrame::OnInitMenu(CMenu* pMenu)
00566 {
00567     CCJMDIFrameWnd::OnInitMenu(pMenu);
00568 }
00569
00574 void CMainFrame::InitialShowWindow(int nCmdShow)
00575 {
00576     if( gMainPlacement.IsHasOne() )
00577     {
00578         WINDOWPLACEMENT wp = gMainPlacement.GetPlacement();
00579
00580         if( nCmdShow != SW_SHOWNORMAL )
00581             wp.showCmd = nCmdShow;
00582         else if( wp.showCmd & SW_SHOWMINIMIZED )
00583             wp.showCmd = (wp.flags & WPF_RESTORETOMAXIMIZED) ? SW_MAXIMIZE : SW_SHOWNORMAL;
00584
00585         SetWindowPlacement(&wp);
00586     }
00587     else
00588     {
00589         ShowWindow(nCmdShow);
00590     }
00591 }
00592
00594 void CMainFrame::OnHistorySelect()
00595 {
00596     ChangeLocation();
00597 }
00598
00600 void CMainFrame::ChangeLocation()
00601 {
00602     const int curSel = m_browseHist.GetCurSel();
00603     if( curSel > CB_ERR )
00604     {
00605         CString setText;
00606         m_browseHist.GetLBText(curSel, setText);
00607
00608         if( !setText.IsEmpty() )
00609         {
00610             CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00611             if( app )
00612             {
00613                 CheckLocationDriveType(setText);
00614                 app->GetBrowserView()->ResetBrowser(setText, true);
00615                 app->ActivateBrowserView();
00616             }
00617         }
00618     }
00619 }
00620
00624 void CMainFrame::LoadLocationSettings()
00625 {
00626     m_filter.LoadSettings();
00627     m_recursion.LoadSettings();
00628     m_ignore.LoadSettings();
00629
00630     m_filter.GetNotificationManager()->NotifyAll();
00631     m_recursion.GetNotificationManager()->NotifyAll();
00632     m_ignore.GetNotificationManager()->NotifyAll();
00633 }
00634
00638 void CMainFrame::StoreLocationSettings()
00639 {
00640     m_filter.SaveSettings();
00641     m_recursion.SaveSettings();
00642     m_ignore.SaveSettings();
00643 }
00644
00646 CWinCvsBrowser* CMainFrame::GetBrowserView()
00647 {
00648     CBrowserBar* bar = (CBrowserBar*)m_wndWorkspace.GetView(0);
00649
00650     return bar->GetBrowserView();
00651 }
00652
00654 CCJShellTree* CMainFrame::GetExplorerView()
00655 {
00656     CExploreBar* bar = (CExploreBar*)m_wndWorkspace.GetView(1);
00657     return &bar->m_TreeCtrl;
00658 }
00659
00661 BOOL CMainFrame::OnBroadcastCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
00662 {
00663     CPushRoutingFrame push(this);
00664
00665     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00666
00667     // pump through dock bars FIRST
00668     CWinCvsBrowser* bView = app->GetBrowserView();
00669     if( bView != NULL && bView == CWnd::GetFocus() && bView->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00670         return TRUE;
00671
00672 #ifndef NOEXPLOREVIEW
00673     // pump through dock bars FIRST
00674     CCJShellTree* eView = app->GetExplorerView();
00675     if( eView != NULL && eView == CWnd::GetFocus() )
00676     {
00677         if( eView->GetParent()->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00678             return TRUE;
00679     }
00680 #endif
00681
00682     CWincvsView* cView = app->GetConsoleView();
00683     if( cView != NULL && cView == CWnd::GetFocus() && cView->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00684         return TRUE;
00685
00686     return FALSE;
00687 }
00688
00690 void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
00691 {
00692     CCJMDIFrameWnd::OnActivate(nState, pWndOther, bMinimized);
00693
00694     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00695     ASSERT(pApp);
00696
00697     if( WA_INACTIVE == nState && !m_bRestoreFocus )
00698     {
00699         m_bRestoreFocus = BOOL( GetFocus() == pApp->GetFileView() );
00700         pApp->SetBackgroundProcess(true);
00701     }
00702     else
00703     {
00704         pApp->SetBackgroundProcess(false);
00705
00706         if( !bMinimized && m_bRestoreFocus )
00707         {
00708             m_bRestoreFocus = FALSE;
00709             CBrowseFileView* pBrowseFileView = pApp->GetFileView();
00710
00711             if( pBrowseFileView )
00712             {
00713                 pBrowseFileView->SetFocus();
00714             }
00715         }
00716     }
00717 }
00718
00720 void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
00721 {
00722     if( SC_MINIMIZE == nID )
00723     {
00724         CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00725         ASSERT(pApp);
00726
00727         m_bRestoreFocus = BOOL(GetFocus() == pApp->GetFileView());
00728     }
00729
00730     CCJMDIFrameWnd::OnSysCommand(nID, lParam);
00731 }
00732
00736 void CMainFrame::ToggleFilterMasksEnable()
00737 {
00738     m_filter.ToggleFilterMasksEnable();
00739 }
00740
00745 bool CMainFrame::IsFilterMasksEnable() const
00746 {
00747     return m_filter.IsFilterMasksEnable();
00748 }
00749
00755 void CMainFrame::SetFilterBarMask(CSortHeaderCtrl& ctrlHeader, const KiColumnModel* columnModel)
00756 {
00757     const int columnCount = columnModel->GetCount();
00758     for(int nIndex = 0; nIndex < columnCount; nIndex++)
00759     {
00760         std::string filterText = ctrlHeader.GetFilterText(nIndex);
00761         const int filterType = columnModel->GetType(nIndex);
00762
00763         m_filter.SetMask(filterType, filterText.c_str());
00764     }
00765 }
00766
00770 void CMainFrame::ClearFilters()
00771 {
00772     m_filter.ClearAll();
00773 }
00774
00779 void CMainFrame::SetContext(const KoColumnContext* context)
00780 {
00781     m_filter.SetContext(context);
00782 }
00783
00785 void CMainFrame::OnViewRecursive()
00786 {
00787     m_recursion.ToggleRecursion();
00788     m_recursion.GetNotificationManager()->NotifyAll();
00789 }
00790
00792 void CMainFrame::OnUpdateViewRecursive(CCmdUI* pCmdUI)
00793 {
00794     pCmdUI->Enable(IsAppEnabled());
00795     pCmdUI->SetCheck(m_recursion.IsShowRecursive());
00796 }
00797
00799 void CMainFrame::OnViewClearall()
00800 {
00801     m_filter.ClearAll();
00802
00803     if( m_ignore.IsShowIgnored() )
00804     {
00805         m_ignore.ToggleIgnore();
00806     }
00807
00808     m_filter.GetNotificationManager()->NotifyAll();
00809 }
00810
00812 void CMainFrame::OnUpdateViewClearall(CCmdUI* pCmdUI)
00813 {
00814     pCmdUI->Enable(IsAppEnabled() && (m_filter.HasFilters() || m_ignore.IsShowIgnored()));
00815 }
00816
00818 void CMainFrame::OnViewModified()
00819 {
00820     m_filter.ToggleModified();
00821     m_filter.GetNotificationManager()->NotifyAll();
00822 }
00823
00825 void CMainFrame::OnUpdateViewModified(CCmdUI* pCmdUI)
00826 {
00827     pCmdUI->Enable(IsAppEnabled());
00828     pCmdUI->SetCheck(m_filter.IsModified());
00829 }
00830
00832 void CMainFrame::OnViewConflict()
00833 {
00834     m_filter.ToggleConflict();
00835     m_filter.GetNotificationManager()->NotifyAll();
00836 }
00837
00839 void CMainFrame::OnUpdateViewConflict(CCmdUI* pCmdUI)
00840 {
00841     pCmdUI->Enable(IsAppEnabled());
00842     pCmdUI->SetCheck(m_filter.IsConflict());
00843 }
00844
00846 void CMainFrame::OnViewUnknown()
00847 {
00848     m_filter.ToggleUnknown();
00849     m_filter.GetNotificationManager()->NotifyAll();
00850 }
00851
00853 void CMainFrame::OnUpdateViewUnknown(CCmdUI* pCmdUI)
00854 {
00855     pCmdUI->Enable(IsAppEnabled());
00856     pCmdUI->SetCheck(m_filter.IsUnknown());
00857 }
00858
00860 void CMainFrame::OnViewMissing()
00861 {
00862     m_filter.ToggleMissing();
00863     m_filter.GetNotificationManager()->NotifyAll();
00864 }
00865
00867 void CMainFrame::OnUpdateViewMissing(CCmdUI* pCmdUI)
00868 {
00869     pCmdUI->Enable(IsAppEnabled());
00870     pCmdUI->SetCheck(m_filter.IsMissing());
00871 }
00872
00874 void CMainFrame::OnViewHidemissing()
00875 {
00876     m_filter.ToggleHideMissing();
00877     m_filter.GetNotificationManager()->NotifyAll();
00878 }
00879
00881 void CMainFrame::OnUpdateViewHidemissing(CCmdUI* pCmdUI)
00882 {
00883     pCmdUI->Enable(IsAppEnabled() && !m_filter.HasAnyModified());
00884     pCmdUI->SetCheck(m_filter.IsHideMissing());
00885 }
00886
00888 void CMainFrame::OnViewIgnore()
00889 {
00890     m_ignore.ToggleIgnore();
00891     m_ignore.GetNotificationManager()->NotifyAll();
00892 }
00893
00895 void CMainFrame::OnUpdateViewIgnore(CCmdUI* pCmdUI)
00896 {
00897     pCmdUI->Enable(IsAppEnabled());
00898     pCmdUI->SetCheck(m_ignore.IsShowIgnored());
00899 }
00900
00902 void CMainFrame::OnViewAdded()
00903 {
00904     m_filter.ToggleAdded();
00905     m_filter.GetNotificationManager()->NotifyAll();
00906 }
00907
00909 void CMainFrame::OnUpdateViewAdded(CCmdUI* pCmdUI)
00910 {
00911     pCmdUI->Enable(IsAppEnabled());
00912     pCmdUI->SetCheck(m_filter.IsAdded());
00913 }
00914
00916 void CMainFrame::OnUpdateViewRemoved(CCmdUI* pCmdUI)
00917 {
00918     pCmdUI->Enable(IsAppEnabled());
00919     pCmdUI->SetCheck(m_filter.IsRemoved());
00920 }
00921
00923 void CMainFrame::OnViewRemoved()
00924 {
00925     m_filter.ToggleRemoved();
00926     m_filter.GetNotificationManager()->NotifyAll();
00927 }
00928
00930 void CMainFrame::OnViewChanged()
00931 {
00932     m_filter.ToggleChanged();
00933     m_filter.GetNotificationManager()->NotifyAll();
00934 }
00935
00937 void CMainFrame::OnUpdateViewChanged(CCmdUI* pCmdUI)
00938 {
00939     pCmdUI->Enable(IsAppEnabled());
00940     pCmdUI->SetCheck(m_filter.IsChanged());
00941 }
00942
00944 void CMainFrame::OnViewHideunknown()
00945 {
00946     m_filter.ToggleHideUnknown();
00947     m_filter.GetNotificationManager()->NotifyAll();
00948 }
00949
00951 void CMainFrame::OnUpdateViewHideunknown(CCmdUI* pCmdUI)
00952 {
00953     pCmdUI->Enable(IsAppEnabled() && m_filter.IsDefaultMode());
00954     pCmdUI->SetCheck(m_filter.IsHideUnknown());
00955 }
00956
00958 void CMainFrame::OnUpdateFilterMask(CCmdUI* pCmdUI)
00959 {
00960     pCmdUI->Enable(IsAppEnabled());
00961 }
00962
00964 void CMainFrame::OnUpdateHistory(CCmdUI* pCmdUI)
00965 {
00966     pCmdUI->Enable(IsAppEnabled());
00967 }
00968
00975 const char* CMainFrame::GetEnvMainThread(const char* name)
00976 {
00977     ASSERT(::GetCurrentThreadId() != AfxGetApp()->m_nThreadID);
00978
00979     sGetEnvResult = name;
00980     sAskingMainThread = true;
00981
00982     sGetEnv.Lock();
00983
00984     return sGetEnvResult;
00985 }
00986
00988 void CMainFrame::OnTimer(UINT nIDEvent)
00989 {
00990     if( sAskingMainThread )
00991     {
00992         sAskingMainThread = false;
00993
00994         sGetEnvResult = glue_getenv(sGetEnvResult, NULL); // FIXME -> temporary
00995         sGetEnv.Unlock();
00996     }
00997 }
00998
01000 void CMainFrame::OnUpdateViewFilterbarEnable(CCmdUI* pCmdUI)
01001 {
01002     pCmdUI->Enable(IsAppEnabled());
01003     pCmdUI->SetCheck(m_filter.IsFilterMasksEnable());
01004 }
01005
01007 void CMainFrame::OnUpdateViewFilterbarClearall(CCmdUI* pCmdUI)
01008 {
01009     pCmdUI->Enable(IsAppEnabled() && m_filter.IsFilterMasksEnable() && m_filter.HasFilterMasks());
01010 }
01011
01013 void CMainFrame::OnUpdateViewFilterbarOptions(CCmdUI* pCmdUI)
01014 {
01015     pCmdUI->Enable(IsAppEnabled());
01016 }
01017
01019 void CMainFrame::WinHelp(DWORD dwData, UINT nCmd)
01020 {
01021     HtmlHelp(m_hWnd, AfxGetApp()->m_pszHelpFilePath, HH_HELP_CONTEXT, nCmd == HELP_CONTEXT ? dwData : 0);
01022
01023     //CCJMDIFrameWnd::WinHelp(dwData, nCmd);
01024 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJTabCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJTabCtrl.cpp

Go to the documentation of this file.
00001 // CJTabCtrl.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJTabCtrl.cpp $
00011  *
00012  * $History: CJTabCtrl.cpp $
00013  *
00014  * *****************  Version 15  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 1:58p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Overrode OnEraseBkgnd(...) and OnPaint() for flicker free drawing.
00018  *
00019  * *****************  Version 14  *****************
00020  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00021  * Updated in $/CodeJock/CJLibrary
00022  * Fixed potential resource and memory leak problems.
00023  *
00024  * *****************  Version 13  *****************
00025  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00026  * Updated in $/CodeJockey/CJLibrary
00027  * Updated copyright and contact information.
00028  *
00029  * *****************  Version 12  *****************
00030  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00031  * Updated in $/CodeJockey/CJLibrary
00032  * Added Unicode compliance, thanks to Barry Burton for his help with
00033  * this.
00034  *
00035  *
00036  * *****************  Version 11  *****************
00037  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00038  * Updated in $/CodeJockey/CJLibrary
00039  *
00040  * *****************  Version 10  *****************
00041  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00042  * Updated in $/CodeJockey/CJLibrary
00043  *
00044  * *****************  Version 9  *****************
00045  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00046  * Updated in $/CodeJockey/CJLibrary
00047  *
00048  * *****************  Version 8  *****************
00049  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00050  * Updated in $/CodeJockey/CJLibrary
00051  *
00052  * *****************  Version 7  *****************
00053  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00054  * Updated in $/CodeJockey/CJLibrary
00055  *
00056  * *****************  Version 6  *****************
00057  * User: Kirk Stowell Date: 7/14/99    Time: 9:44p
00058  * Updated in $/CodeJockey/CJLibrary
00059  * Added _DYNAMIC macros for access to the CObject::IsKindOf to determine
00060  * the class object at runtime. Thanks to Sid Price
00061  * [sidprice@softtools.com] for suggesting this.
00062  *
00063  * *****************  Version 5  *****************
00064  * User: Kirk Stowell Date: 6/14/99    Time: 10:45p
00065  * Updated in $/CodeJockey/CJ60Lib
00066  * Cleaned up code to eliminate level 4 compilier warnings.
00067  *
00068  * *****************  Version 4  *****************
00069  * User: Kirk Stowell Date: 5/17/99    Time: 8:01p
00070  * Updated in $/CodeJockey/CJ60Lib
00071  * Changed popup menu parent from GetParentFrame() to  AfxGetMainWnd()
00072  *
00073  * *****************  Version 3  *****************
00074  * User: Kirk Stowell Date: 5/11/99    Time: 9:33p
00075  * Updated in $/CodeJockey/CJ60Lib
00076  * Renamed popup menu resource id to m_popupMenuID to be consistent with
00077  * other classes.  Added member variable m_popToolbarID to contain the
00078  * toolbar resource to be used for popup menus  and m_nPos to contain the
00079  * index of the submenu in the menu resource. Added
00080  * CCJTabCtrl::Create(...) to simplify the creation process, and to set
00081  * the tab font.  Cleaned up OnRButtonDown(..) message handler which
00082  * activates the popup menu. Modified SetMenuID(...) to accept the index
00083  * of the popup menu in the menu resource.
00084  *
00085  * *****************  Version 2  *****************
00086  * User: Kirk Stowell Date: 5/02/99    Time: 5:25p
00087  * Updated in $/CodeJockey/CJ60Lib
00088  * Removed class from CCJTabCtrlBar files into its own files. Added popup
00089  * menu support for CCJMenu.
00090  *
00091  * *****************  Version 1  *****************
00092  * User: Kirk Stowell Date: 5/02/99    Time: 4:33p
00093  * Created in $/CodeJockey/CJ60Lib
00094  *
00095  ***************************************************************************/
00097
00098 #include "StdAfx.h"
00099 #include "CJTabCtrl.h"
00100
00101 #ifdef _DEBUG
00102 #define new DEBUG_NEW
00103 #undef THIS_FILE
00104 static char THIS_FILE[] = __FILE__;
00105 #endif
00106
00108 // CCJTabCtrl
00109
00110 CCJTabCtrl::CCJTabCtrl()
00111 {
00112     m_popupMenuID   = 0;
00113     m_popToolbarID  = 0;
00114     m_nPos          = 0;
00115 }
00116
00117 CCJTabCtrl::~CCJTabCtrl()
00118 {
00119     // fix potential resource leak - KStowell - 10-22-99.
00120     m_Font.DeleteObject();
00121 }
00122
00123 IMPLEMENT_DYNAMIC(CCJTabCtrl, CTabCtrl)
00124
00125 BEGIN_MESSAGE_MAP(CCJTabCtrl, CTabCtrl)
00126     //{{AFX_MSG_MAP(CCJTabCtrl)
00127     ON_WM_RBUTTONDOWN()
00128     ON_WM_MEASUREITEM()
00129     ON_WM_MENUCHAR()
00130     ON_WM_INITMENUPOPUP()
00131     ON_WM_ERASEBKGND()
00132     ON_WM_PAINT()
00133     //}}AFX_MSG_MAP
00134 END_MESSAGE_MAP()
00135
00137 // CCJTabCtrl message handlers
00138
00139 void CCJTabCtrl::OnRButtonDown(UINT /*nFlags*/, CPoint point)
00140 {
00141     // No menu was defined...
00142     if (!m_popupMenuID) {
00143         TRACE0( "Warning: No menu resource was associated with CCJTabCtrl.\n" );
00144     }
00145
00146     else
00147     {
00148         // Since we are using the main window as the
00149         // parent, we need to convert the point to screen
00150         // coordinates...
00151         CPoint pt = point;
00152         ClientToScreen(&pt);
00153
00154         // Load the popup menu.
00155         VERIFY(m_popupMenu.LoadMenu(m_popupMenuID));
00156         CCJMenu* pPopup = (CCJMenu*)m_popupMenu.GetSubMenu(m_nPos);
00157         ASSERT(pPopup != NULL);
00158
00159         // Load toolbar resource if any for menu icons.
00160         if (m_popToolbarID) {
00161             pPopup->LoadToolbar(m_popToolbarID);
00162         }
00163
00164         // Display the popup menu, use the main window as its parent.
00165         pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
00166             pt.x, pt.y, AfxGetMainWnd());
00167
00168         m_popupMenu.DestroyMenu();
00169     }
00170 }
00171
00172 void CCJTabCtrl::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
00173 {
00174     if (lpMeasureItemStruct->CtlType == ODT_MENU)
00175     {
00176         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
00177             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
00178
00179             if (m_popupMenu.IsMenu(pMenu)) {
00180                 m_popupMenu.MeasureItem(lpMeasureItemStruct);
00181                 return;
00182             }
00183         }
00184     }
00185
00186     CTabCtrl::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
00187 }
00188
00189 LRESULT CCJTabCtrl::OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu)
00190 {
00191     if (m_popupMenu.IsMenu(pMenu)) {
00192         return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
00193     }
00194
00195     return CTabCtrl::OnMenuChar(nChar, nFlags, pMenu);
00196 }
00197
00198 void CCJTabCtrl::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
00199 {
00200     CTabCtrl::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
00201
00202     if(!bSysMenu) {
00203         if (m_popupMenu.IsMenu(pPopupMenu)) {
00204             CCJMenu::UpdateMenu(pPopupMenu);
00205         }
00206     }
00207 }
00208
00209 BOOL CCJTabCtrl::Create(CWnd* pParentWnd, UINT nID, DWORD dwStyle, const CRect& rect)
00210 {
00211     if (!CTabCtrl::Create(dwStyle, rect, pParentWnd, nID))
00212         return FALSE;
00213
00214     UpdateFont();
00215     return TRUE;
00216 }
00217
00218 BOOL CCJTabCtrl::OnEraseBkgnd(CDC* pDC)
00219 {
00220     // KStowell - overridden for flicker-free drawing.
00221     UNUSED_ALWAYS(pDC);
00222     return TRUE;
00223 }
00224
00225 void CCJTabCtrl::UpdateFont()
00226 {
00227     m_Font.DeleteObject();
00228     NONCLIENTMETRICS ncm;
00229     ncm.cbSize = sizeof(ncm);
00230     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00231     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00232     SetFont(&m_Font);
00233 }
00234
00235 void CCJTabCtrl::OnPaint()
00236 {
00237     CPaintDC dc(this); // device context for painting
00238
00239
00240     // KStowell - Get the client rect.
00241     CRect rcClient;
00242     GetClientRect( &rcClient );
00243
00244     // KStowell - Create a memory device-context. This is done to help reduce
00245     // screen flicker, since we will paint the entire control to the
00246     // off screen device context first.
00247     CDC memDC;
00248     CBitmap bitmap;
00249     memDC.CreateCompatibleDC(&dc);
00250     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00251     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00252
00253     // KStowell - Repaint the background.
00254     memDC.FillSolidRect( rcClient, afxData.clrBtnFace );
00255
00256     // let the control do its default drawing.
00257     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00258
00259     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00260     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00261
00262     // KStowell - Cleanup resources.
00263     memDC.SelectObject(pOldBitmap);
00264     memDC.DeleteDC();
00265     bitmap.DeleteObject();
00266 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoButton.cpp Source File

rf/support/mfc/PseudoButton.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00018
00019 /*
00020  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00021  */
00022
00023 #include "stdafx.h"
00024 #include "umain.h"
00025 #include "PseudoButton.h"
00026 #include "dib.h"
00027 #include <map>
00028 #include <string.h>
00029
00030 #ifdef _DEBUG
00031 #define new DEBUG_NEW
00032 #undef THIS_FILE
00033 static char THIS_FILE[] = __FILE__;
00034 #endif
00035
00037 // CPseudoButton
00038
00039 IMPLEMENT_DYNAMIC(CPseudoButton, CCJFlatButton)
00040
00041 CPseudoButton::CPseudoButton() : m_bitmap(0L), m_disbitmap(0L)
00042 {
00043 }
00044
00045 CPseudoButton::~CPseudoButton()
00046 {
00047     if(m_bitmap != 0L)
00048         AfxDeleteObject((HGDIOBJ*)&m_bitmap);
00049     if(m_disbitmap != 0L)
00050         AfxDeleteObject((HGDIOBJ*)&m_disbitmap);
00051 }
00052
00053 void CPseudoButton::DrawItem(LPDRAWITEMSTRUCT lpDIS)
00054 {
00055     BOOL oldFlag = m_bFlatLook;
00056     if(lpDIS->itemState & ODS_DISABLED)
00057         m_bFlatLook = true;
00058     CCJFlatButton::DrawItem(lpDIS);
00059     m_bFlatLook = oldFlag;
00060 }
00061
00062 bool CPseudoButton::loadIcon(CString & icon, int rsrcid)
00063 {
00064     icon = "";
00065     bool res = false;
00066
00067     HINSTANCE inst = ::AfxGetResourceHandle();
00068     HRSRC hRsrc = FindResource(inst, MAKEINTRESOURCE(rsrcid), "CICN");
00069     if (hRsrc != 0L)
00070     {
00071         HGLOBAL hg = LoadResource(inst, hRsrc);
00072         if (hg != 0L)
00073         {
00074             DWORD size = SizeofResource(inst, hRsrc);
00075             char *rsrcptr = (char *)LockResource(hg);
00076             icon = CString(rsrcptr, size);
00077             FreeResource(hg);
00078             res = true;
00079         }
00080     }
00081
00082     return res;
00083 }
00084
00085 bool CPseudoButton::LoadXPM(int rsrcid)
00086 {
00087     CString sicon;
00088
00089     if(!CPseudoButton::loadIcon(sicon, rsrcid))
00090         return false;
00091
00092     COLORREF back = ::GetSysColor(COLOR_BTNFACE);
00093     COLORREF fore = ::GetSysColor(COLOR_GRAYTEXT);
00094
00095     int w, h;
00096     HBITMAP bmap = UMakeBitmap((const char *)sicon, w, h, DD_PIXMAP, back, fore);
00097     if(bmap == 0L)
00098         return false;
00099
00100     SetBitmap(bmap);
00101     if(m_bitmap != 0L)
00102         AfxDeleteObject((HGDIOBJ*)&m_bitmap);
00103     m_bitmap = bmap;
00104
00105     bmap = UMakeBitmap((const char *)sicon, w, h, DD_PIXMAP, back, fore, false);
00106     if(bmap == 0L)
00107         return false;
00108     if(m_disbitmap != 0L)
00109         AfxDeleteObject((HGDIOBJ*)&m_disbitmap);
00110     m_disbitmap = bmap;
00111     return true;
00112 }
00113
00114 void CPseudoButton::DrawButtonBitmap(CDC* pDC, UINT nState, CRect& rcItem)
00115 {
00116     // get the handle to the bitmap (if any) associated
00117     // with this button.
00118     HBITMAP hBitmap = GetBitmap();
00119     if( hBitmap == NULL ) {
00120         return;
00121     }
00122
00123     CRect rc = rcItem;
00124
00125     // if the button is selected.
00126     if( nState & ODS_SELECTED ) {
00127         rcItem.OffsetRect(1,1);
00128     }
00129
00130     // draw the bitmap associated with this button.
00131     if((nState & ODS_DISABLED) != 0 && m_disbitmap != 0L)
00132         pDC->DrawState( rc.TopLeft(), rc.Size(), m_disbitmap,
00133             DSS_NORMAL, (HBRUSH)NULL );
00134     else if(m_bitmap != 0L)
00135         pDC->DrawState( rc.TopLeft(), rc.Size(), m_bitmap,
00136             DSS_NORMAL, (HBRUSH)NULL );
00137     else
00138         pDC->DrawState( rc.TopLeft(), rc.Size(), hBitmap,
00139             ( nState & ODS_DISABLED )?DSS_DISABLED:DSS_NORMAL, (HBRUSH)NULL );
00140 }
00141
00142 BEGIN_MESSAGE_MAP(CPseudoButton, CCJFlatButton)
00143     //{{AFX_MSG_MAP(CPseudoButton)
00144     //}}AFX_MSG_MAP
00145 END_MESSAGE_MAP()
00146
00148 // CPseudoRotButton
00149
00150 IMPLEMENT_DYNAMIC(CPseudoRotButton, CPseudoButton)
00151
00152 CPseudoRotButton::CPseudoRotButton() : m_curindex(-1)
00153 {
00154 }
00155
00156 CPseudoRotButton::~CPseudoRotButton()
00157 {
00158     m_bitmap = 0L;
00159     m_disbitmap = 0L;
00160     std::vector<HBITMAP>::iterator i;
00161     for(i = m_bitmaps.begin(); i != m_bitmaps.end(); ++i)
00162     {
00163         HBITMAP bmap = *i;
00164         AfxDeleteObject((HGDIOBJ*)&bmap);
00165     }
00166     for(i = m_disbitmaps.begin(); i != m_disbitmaps.end(); ++i)
00167     {
00168         HBITMAP bmap = *i;
00169         AfxDeleteObject((HGDIOBJ*)&bmap);
00170     }
00171 }
00172
00173 bool CPseudoRotButton::LoadXPMs(const int *rsrcid, int numrsrc)
00174 {
00175     CString sicon;
00176     COLORREF back = ::GetSysColor(COLOR_BTNFACE);
00177     COLORREF fore = ::GetSysColor(COLOR_GRAYTEXT);
00178
00179     for(int i = 0; i < numrsrc; i++)
00180     {
00181         if(!CPseudoButton::loadIcon(sicon, rsrcid[i]))
00182             return false;
00183
00184         int w, h;
00185         HBITMAP bmap = UMakeBitmap((const char *)sicon, w, h, DD_PIXMAP, back, fore);
00186         if(bmap == 0L)
00187             return false;
00188
00189         HBITMAP disbmap = UMakeBitmap((const char *)sicon, w, h, DD_PIXMAP, back, fore, false);
00190         if(disbmap == 0L)
00191             return false;
00192
00193         m_bitmaps.push_back(bmap);
00194         m_disbitmaps.push_back(disbmap);
00195     }
00196
00197     DoRotate(0);
00198     return true;
00199 }
00200
00201 void CPseudoRotButton::DoRotate(int index)
00202 {
00203     if(index < 0 || index > (int)m_bitmaps.size() || index > (int)m_disbitmaps.size() ||
00204         m_curindex == index)
00205         return;
00206
00207     SetBitmap(m_bitmaps[index]);
00208     Invalidate(TRUE);
00209     m_curindex = index;
00210     m_bitmap = m_bitmaps[index];
00211     m_disbitmap = m_disbitmaps[index];
00212 }
00213
00214 BEGIN_MESSAGE_MAP(CPseudoRotButton, CPseudoButton)
00215     //{{AFX_MSG_MAP(CPseudoRotButton)
00216     //}}AFX_MSG_MAP
00217 END_MESSAGE_MAP()
00218
00220
00221 IMPLEMENT_DYNAMIC(CPseudoToggle, CPseudoButton)
00222
00223 CPseudoToggle::CPseudoToggle()
00224 {
00225     m_flag = 0;
00226     m_radio = false;
00227 }
00228
00229 CPseudoToggle::~CPseudoToggle()
00230 {
00231 }
00232
00233 void CPseudoToggle::SetState(int state)
00234 {
00235     int newstate = state ? 1 : 0;
00236     if(m_flag == newstate)
00237         return;
00238
00239     m_flag = newstate;
00240     Invalidate(TRUE);
00241
00242     if(state && IsRadio() && !m_group.IsEmpty())
00243     {
00244         CWnd *hwndChild, *parent = GetParent();
00245         for (hwndChild = parent->GetTopWindow(); hwndChild != 0L; hwndChild = hwndChild->GetNextWindow())
00246         {
00247             if(hwndChild != this && hwndChild->IsWindowEnabled() && hwndChild->IsKindOf(RUNTIME_CLASS(CPseudoToggle)))
00248             {
00249                 CPseudoToggle *btn = (CPseudoToggle *)hwndChild;
00250                 if(btn->IsRadio() && m_group == btn->GetGroup())
00251                 {
00252                     btn->SetState(0);
00253                     break;
00254                 }
00255             }
00256         }
00257     }
00258 }
00259
00260 void CPseudoToggle::DrawItem(LPDRAWITEMSTRUCT lpDIS)
00261 {
00262     if(m_flag)
00263         lpDIS->itemState |= ODS_SELECTED;
00264     CPseudoButton::DrawItem(lpDIS);
00265 }
00266
00267 void CPseudoToggle::OnLButtonUp(UINT nFlags, CPoint point)
00268 {
00269     CRect rect;
00270     GetClientRect(&rect);
00271
00272     //check you are still on the button
00273     if(PtInRect(rect, point))
00274         ToggleBtn();
00275
00276     CPseudoButton::OnLButtonUp(nFlags, point);
00277 }
00278
00279 BEGIN_MESSAGE_MAP(CPseudoToggle, CPseudoButton)
00280     //{{AFX_MSG_MAP(CPseudoToggle)
00281     ON_WM_LBUTTONUP()
00282     //}}AFX_MSG_MAP
00283 END_MESSAGE_MAP()
00284
00285 static const BYTE *nextLine(const BYTE *src, CString & line)
00286 {
00287     const char *tmp = strchr((const char *)src, '\n');
00288     if(tmp == 0L)
00289         return 0L;
00290
00291     line = CString((const char *)src, tmp - (const char *)src - 1);
00292     src = (const BYTE *)tmp + 1;
00293     return src;
00294 }
00295
00296 HBITMAP UMakeBitmap(const void *icon, int & width, int & height, UTB_KIND kind,
00297                     COLORREF back, COLORREF fore, bool enabled)
00298 {
00299     if( kind == DD_BMAP)
00300     {
00301         HBITMAP hbitmap;
00302         LPBITMAPINFO header;
00303         BYTE *image, *src = (BYTE *)icon, c, k;
00304         RGBQUAD *pRgb;
00305
00306         hbitmap = CreateDIB(width, height, 1, 0L);
00307         header = (LPBITMAPINFO)GlobalLock(hbitmap);
00308         image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00309         pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00310
00311         pRgb->rgbRed = GetRValue(back);
00312         pRgb->rgbGreen = GetGValue(back);
00313         pRgb->rgbBlue = GetBValue(back);
00314         pRgb->rgbReserved = 0;
00315         pRgb++;
00316         pRgb->rgbRed = GetRValue(fore);
00317         pRgb->rgbGreen = GetGValue(fore);
00318         pRgb->rgbBlue = GetBValue(fore);
00319         pRgb->rgbReserved = 0;
00320
00321         int row = WIDTHBYTES(width * 1);
00322         int row2 = WIDTHBYTES8(width * 1);
00323         for(int y = 0; y < height; y++)
00324         {
00325             BYTE *ptr = image + row * (height - y - 1);
00326             for(int x = 0; x < row2; x++)
00327             {
00328                 c = *src++;
00329                 k = 0;
00330                 int n = 8;
00331                 while(n--)
00332                 {
00333                     if(c & 1)
00334                         k |= 1 << n;
00335                     c = c >> 1;
00336                 }
00337                 *ptr++ = k;
00338             }
00339         }
00340
00341         GlobalUnlock(hbitmap);
00342
00343         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00344         GlobalFree((HGLOBAL)hbitmap);
00345
00346         return ddbbmap;
00347     }
00348     else if(kind == DD_PIXMAP)
00349     {
00350         const BYTE *src = (BYTE *)icon;
00351         CString aline;
00352
00353         src = nextLine(src, aline);
00354         if(src == 0L)
00355             return 0L;
00356
00357         // read the header
00358         int w, h, nc, cpp, i, x, y;
00359         if(sscanf(aline, "%d%d%d%d", &w, &h, &nc, &cpp) != 4)
00360             return 0L;
00361
00362         width = w;
00363         height = h;
00364
00365         HBITMAP hbitmap = CreateDIB(w, h, 8, 0L);
00366         LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00367         BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00368         RGBQUAD *pRgb = (RGBQUAD *)((LPBYTE)header + header->bmiHeader.biSize);
00369
00370         // read the colormap
00371         std::map<short, BYTE> colors;
00372         for(i = 0; i < nc; i++)
00373         {
00374             src = nextLine(src, aline);
00375             if(src == 0L)
00376                 return 0L;
00377
00378             const BYTE *line = (const BYTE *)(const char *)aline;
00379             short aref;
00380             if(cpp == 1)
00381             {
00382                 aref = line[0];
00383                 line += 1;
00384             }
00385             else if(cpp == 2)
00386             {
00387                 aref = ((short)line[1] << 8)  | line[0];
00388                 line += 2;
00389             }
00390             else
00391             {
00392                 ASSERT(0);
00393                 return 0L;
00394             }
00395
00396             while(isspace(*line) && *line)
00397                 line++;
00398             if(*line++ != 'c')
00399                 return 0L;
00400
00401             while(isspace(*line) && *line)
00402                 line++;
00403             if(*line == '\0')
00404                 return 0L;
00405
00406             if(*line == '#')
00407             {
00408                 line++;
00409
00410                 if(strlen((char *)line) < 6)
00411                     return 0L;
00412
00413                 int comp[6], c;
00414                 int j;
00415                 for(j = 0; j < 6; j++)
00416                 {
00417                     c = *line++;
00418                     if(c >= '0' && c <= '9')
00419                         comp[j] = c - '0';
00420                     else if(c >= 'a' && c <= 'f')
00421                         comp[j] = c - 'a' + 10;
00422                     else if(c >= 'A' && c <= 'F')
00423                         comp[j] = c - 'A' + 10;
00424                     else
00425                         return 0L;
00426                 }
00427
00428                 colors.insert(std::make_pair(aref, i));
00429
00430                 if(i == 0)
00431                 {
00432                     COLORREF bk = back;
00433                     pRgb->rgbRed = GetRValue(bk);
00434                     pRgb->rgbGreen = GetGValue(bk);
00435                     pRgb->rgbBlue = GetBValue(bk);
00436                     pRgb->rgbReserved = 0;
00437                 }
00438                 else
00439                 {
00440                     COLORREF color = RGB(comp[0]*16+comp[1],comp[2]*16+comp[3],comp[4]*16+comp[5]);
00441                     if(!enabled)
00442                         color = fore;
00443                     pRgb->rgbRed = GetRValue(color);
00444                     pRgb->rgbGreen = GetGValue(color);
00445                     pRgb->rgbBlue = GetBValue(color);
00446                     pRgb->rgbReserved = 0;
00447                 }
00448             }
00449             else if(strcmp((char *)line, "None") == 0)
00450             {
00451                 colors.insert(std::make_pair(aref, i));
00452                 COLORREF bk = back;
00453                 pRgb->rgbRed = GetRValue(bk);
00454                 pRgb->rgbGreen = GetGValue(bk);
00455                 pRgb->rgbBlue = GetBValue(bk);
00456                 pRgb->rgbReserved = 0;
00457             }
00458             else
00459                 return 0L;
00460             pRgb++;
00461         }
00462
00463         if(nc != colors.size() || nc > 256)
00464             return 0L;
00465
00466         // make the bitmap
00467         for(y = 0; y < h; y++)
00468         {
00469             src = nextLine(src, aline);
00470             if(src == 0L)
00471                 return 0L;
00472
00473             const BYTE *line = (const BYTE *)(const char *)aline;
00474             BYTE *ptr = image + WIDTHBYTES(w * 8) * (h - y - 1);
00475             for(x = 0; x < w; x++)
00476             {
00477                 short aref;
00478                 if(cpp == 1)
00479                 {
00480                     aref = line[0];
00481                     line++;
00482                 }
00483                 else if(cpp == 2)
00484                 {
00485                     aref = ((short)line[1] << 8)  | line[0];
00486                     line += 2;
00487                 }
00488                 std::map<short, BYTE>::iterator pos = colors.find(aref);
00489                 if(pos == colors.end())
00490                     return 0L;
00491                 *ptr++ = (*pos).second;
00492             }
00493         }
00494
00495         GlobalUnlock(hbitmap);
00496
00497         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00498         GlobalFree((HGLOBAL)hbitmap);
00499
00500         return ddbbmap;
00501     }
00502     else if(kind == DD_RGB)
00503     {
00504         BYTE *src = (BYTE *)icon;
00505
00506         // read the header
00507         int w = width, h = height, x, y;
00508
00509         HBITMAP hbitmap = CreateDIB(w, h, 24, 0L);
00510         LPBITMAPINFO header = (LPBITMAPINFO)GlobalLock(hbitmap);
00511         BYTE *image = (LPBYTE)header + header->bmiHeader.biSize + PaletteSize(header);
00512
00513         // make the bitmap
00514         for(y = 0; y < h; y++)
00515         {
00516 #if 0
00517             BYTE *ptr = image + WIDTHBYTES(w * 24) * (h - y - 1);
00518 #else
00519             BYTE *ptr = image + WIDTHBYTES(w * 24) * y;
00520 #endif
00521             for(x = 0; x < w; x++)
00522             {
00523                 ptr[2] = *src++;
00524                 ptr[1] = *src++;
00525                 ptr[0] = *src++;
00526                 ptr += 3;
00527                 src++;
00528             }
00529         }
00530
00531         GlobalUnlock(hbitmap);
00532
00533         HBITMAP ddbbmap = DIBToBitmap(hbitmap);
00534         GlobalFree((HGLOBAL)hbitmap);
00535
00536         return ddbbmap;
00537     }
00538
00539     return 0L;
00540 }
00541
00542 HBITMAP UMakeBitmap(const void *icon, int width, int height, UTB_KIND kind, bool enabled)
00543 {
00544     return UMakeBitmap(icon, width, height, kind,
00545         ::GetSysColor(COLOR_BTNFACE), ::GetSysColor(COLOR_BTNTEXT), enabled);
00546 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJReBarCtrl Member List

This is the complete list of members for CCJReBarCtrl, including all inherited members.

BeginDrag(UINT uBand, DWORD dwPos=(DWORD)-1) | CCJReBarCtrl
CCJReBarCtrl() | CCJReBarCtrl
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CCJReBarCtrl
DeleteBand(UINT uBand) | CCJReBarCtrl
DragMove(DWORD dwPos=(DWORD)-1) | CCJReBarCtrl
EndDrag() | CCJReBarCtrl
GetBandBorders(UINT uBand, LPRECT prc) const | CCJReBarCtrl
GetBandCount() const | CCJReBarCtrl
GetBandInfo(UINT uBand, REBARBANDINFO *prbbi) const | CCJReBarCtrl
GetBarHeight() const | CCJReBarCtrl
GetBarInfo(REBARINFO *prbi) const | CCJReBarCtrl
GetBkColor() const | CCJReBarCtrl
GetColorScheme(COLORSCHEME *lpcs) | CCJReBarCtrl
GetDropTarget() const | CCJReBarCtrl
GetImageList() const | CCJReBarCtrl
GetPalette() const | CCJReBarCtrl
GetRect(UINT uBand, LPRECT prc) const | CCJReBarCtrl
GetRowCount() const | CCJReBarCtrl
GetRowHeight(UINT uRow) const | CCJReBarCtrl
GetTextColor() const | CCJReBarCtrl
GetToolTips() const | CCJReBarCtrl
HitTest(RBHITTESTINFO *prbht) | CCJReBarCtrl
IDToIndex(UINT uBandID) const | CCJReBarCtrl
InsertBand(UINT uIndex, REBARBANDINFO *prbbi) | CCJReBarCtrl
MaximizeBand(UINT uBand) | CCJReBarCtrl
MinimizeBand(UINT uBand) | CCJReBarCtrl
MoveBand(UINT uFrom, UINT uTo) | CCJReBarCtrl
SetBandInfo(UINT uBand, REBARBANDINFO *prbbi) | CCJReBarCtrl
SetBarInfo(REBARINFO *prbi) | CCJReBarCtrl
SetBkColor(COLORREF clr) | CCJReBarCtrl
SetColorScheme(const COLORSCHEME *lpcs) | CCJReBarCtrl
SetImageList(CImageList *pImageList) | CCJReBarCtrl
SetOwner(CWnd *pWnd) | CCJReBarCtrl
SetPalette(HPALETTE hPal) | CCJReBarCtrl
SetTextColor(COLORREF clr) | CCJReBarCtrl
SetToolTips(CToolTipCtrl *pToolTip) | CCJReBarCtrl
ShowBand(UINT uBand, BOOL fShow=TRUE) | CCJReBarCtrl
SizeToRect(CRect &rect) | CCJReBarCtrl

Generated on Sat Aug 7 22:50:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvsDoc.h Source File

WinCvs/wincvsDoc.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // wincvsDoc.h : interface of the CWincvsDoc class
00022 //
00024
00025 #if !defined(AFX_WINCVSDOC_H__D2D77DCE_8299_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_WINCVSDOC_H__D2D77DCE_8299_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 class CWincvsDoc : public CDocument
00033 {
00034 public:
00035     DECLARE_DYNCREATE(CWincvsDoc)
00036
00037 // Attributes
00038     CWincvsDoc();
00039
00040     //virtual CRichEditCntrItem* CreateClientItem(REOBJECT* preo = NULL) const;
00041
00042     // Operations
00043 public:
00044
00045 // Overrides
00046     // ClassWizard generated virtual function overrides
00047     //{{AFX_VIRTUAL(CWincvsDoc)
00048     public:
00049     virtual BOOL OnNewDocument();
00050     virtual void Serialize(CArchive& ar);
00051     virtual void SetTitle(LPCTSTR lpszTitle);
00052     //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 public:
00056     virtual ~CWincvsDoc();
00057 #ifdef _DEBUG
00058     virtual void AssertValid() const;
00059     virtual void Dump(CDumpContext& dc) const;
00060 #endif
00061
00062 protected:
00063
00064 // Generated message map functions
00065 protected:
00066     //{{AFX_MSG(CWincvsDoc)
00067     afx_msg void OnAppPreferences();
00068     afx_msg void OnAppRtagNew();
00069     afx_msg void OnAppRtagDelete();
00070     afx_msg void OnAppRtagBranch();
00071     afx_msg void OnAppCmdline();
00072     afx_msg void OnUpdateCvsCmd(CCmdUI* pCmdUI);
00073     afx_msg void OnUpdatePrefs(CCmdUI* pCmdUI);
00074     afx_msg void OnBrowserOpen();
00075     afx_msg void OnAppLogin();
00076     afx_msg BOOL OnMacroAdmin(UINT nID);
00077     afx_msg void OnUpdateMacroAdmin(CCmdUI* pCmdUI);
00078     afx_msg void OnAppLogout();
00079     afx_msg void OnViewInit();
00080     afx_msg void OnSavesettings();
00081     afx_msg void OnUpdateSavesettings(CCmdUI* pCmdUI);
00082     afx_msg void OnViewBrowselocationRemoveunwanted();
00083     afx_msg void OnUsePyshell();
00084     afx_msg void OnUpdateUsePyshell(CCmdUI* pCmdUI);
00085     afx_msg void OnUseTclshell();
00086     afx_msg void OnUpdateUseTclshell(CCmdUI* pCmdUI);
00087     //}}AFX_MSG
00088     DECLARE_MESSAGE_MAP()
00089
00090     // Generated OLE dispatch map functions
00091     //{{AFX_DISPATCH(CWincvsDoc)
00092     CString m_viewPath;
00093     afx_msg void OnViewPathChanged();
00094     //}}AFX_DISPATCH
00095     DECLARE_DISPATCH_MAP()
00096     DECLARE_INTERFACE_MAP()
00097 };
00098
00100
00101 //{{AFX_INSERT_LOCATION}}
00102 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00103
00104 #endif // !defined(AFX_WINCVSDOC_H__D2D77DCE_8299_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsIgnore.h Source File

common/CvsIgnore.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- June 1998
00019  */
00020
00021 /*
00022  * CvsIgnore.h --- parse the .cvsignore
00023  */
00024
00025 #ifndef CVSIGNORE_H
00026 #define CVSIGNORE_H
00027
00028 #include <vector>
00029 #include "CPStr.h"
00030
00031 #ifdef _MSC_VER
00032     using namespace std;
00033 #endif
00034
00035 void BuildIgnoredList(std::vector<CStr>& ignlist, const char* path);
00036 bool MatchIgnoredList(const char* filename, const std::vector<CStr>& ignlist);
00037
00038 #endif /* CVSIGNORE_H */
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJToolBarBase Member List

This is the complete list of members for CCJToolBarBase, including all inherited members.

CalcInsideRect(CRect &rect, BOOL bHorz) const | CCJToolBarBase |
CCJToolBarBase() | CCJToolBarBase | [protected]
DoPaint(CDC *pDC) | CCJToolBarBase | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJToolBarBase |
DrawGripper(CDC *pDC, const CRect &rect) | CCJToolBarBase |
EraseNonClient() | CCJToolBarBase |
GetBorders() const | CCJToolBarBase | [protected]
m_bExStyle | CCJToolBarBase |
m_bInReBar | CCJToolBarBase |
OnPaint() | CCJToolBarBase |
OnWindowPosChanging(LPWINDOWPOS lpWndPos) | CCJToolBarBase |
SetBorders(LPCRECT lpRect) | CCJToolBarBase | [protected]
SetBorders(int cxLeft=0, int cyTop=0, int cxRight=0, int cyBottom=0) | CCJToolBarBase | [protected]
WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam) | CCJToolBarBase | [virtual]
~CCJToolBarBase() | CCJToolBarBase | [virtual]

Generated on Sat Aug 7 22:50:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsApp.h Source File

common/UCvsApp.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSAPP_H
00026 #define UCVSAPP_H
00027
00028 #include "uwidget.h"
00029 #include "cvsgui_process.h"
00030 #include "BrowseViewModel.h"
00031
00032 class UCvsConsole;
00033 class UCvsFrame;
00034 class UCvsFiles;
00035 class UCvsFolders;
00036 class UCvsStatusbar;
00037
00038 class UCvsApp : public UWidget
00039 {
00040     UDECLARE_DYNAMIC(UCvsApp)
00041 public:
00042     UCvsApp(int argc, char **argv);
00043     virtual ~UCvsApp();
00044
00045     static UCvsApp *gApp;
00046         // a pointer on the pseudo application
00047
00048     void SayWelcome(void);
00049         // make the greetings and ask for the CVSROOT if necessary
00050
00051     inline void SetCvsProcess(CvsProcess* proc) { gCvsProcess = proc; };
00052     inline CvsProcess *GetCvsProcess(void) { return gCvsProcess; }
00053         // the cvs processus (or thread) when running
00054
00055     void SetCvsRunning(bool state);
00056     inline bool IsCvsRunning(void) { return gCvsRunning; }
00057         // when the cvs processus (or thread) is running
00058
00059     void SetCvsStopping(bool state);
00060     inline bool IsCvsStopping(void) { return gCvsStopping; }
00061         // when the cvs processus is stopping (it may take a while)
00062
00063
00064     void SetStatusBarText(const char*);
00065         // set new statusbar text
00066
00067     UCvsStatusbar *GetStatusBar(void);
00068         // get the statusbar
00069
00070     UCvsFolders *GetBrowserView(void);
00071         // get the left pane browser tree
00072
00073     UCvsFiles *GetFilesView(void);
00074         // get the right pane file list
00075
00076     UCvsConsole *GetConsole(void);
00077         // get the right pane console
00078
00079     const char *GetAppName(void) const;
00080     const char *GetAppLibFolder(void) const;
00081     const char *GetAppVersion(void) const;
00082
00083     void Execute(int argc, char * const *argv);
00084
00085     void PeekPumpAndIdle(bool);
00086
00087     KiFilterModel* GetFilterModel() const;
00088         // retrieve filtering model to use
00089
00090     KiRecursionModel* GetRecursionModel() const;
00091         // retrieve recursion model to use
00092
00093     KiIgnoreModel* GetIgnoreModel() const;
00094         // ignore model in use
00095
00096     UCvsFrame* GetMainFrame(void) { return m_mainFrame; }
00097         // get the document
00098
00099     void StartScriptEngine(const bool forceReload = false);
00100         // Start the script engine
00101
00102     void StopScriptEngine();
00103         // Stop the script engine
00104
00105     void RestartScriptEngine();
00106         // Restart the script engine
00107
00108     enum
00109     {
00110         kProcessTimer = EV_COMMAND_START
00111     };
00112
00113 protected:
00114     UCvsFrame* m_mainFrame;
00115
00116     // please use public function to change or read
00117     bool gCvsRunning;
00118     bool gCvsStopping;
00119
00120     bool m_hasTCL;
00121     bool m_hasPY;
00123     // the running process (if any)
00124     static CvsProcess *gCvsProcess;
00125
00126     ev_msg void OnMainTimer(long time);
00127
00128     UDECLARE_MESSAGE_MAP()
00129 };
00130
00131 bool IsAppEnabled(void);
00132
00133 #endif
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJToolBarCtrl.h Source File

WinCvs/CJLib/Include/CJToolBarCtrl.h

Go to the documentation of this file.
00001 // CJToolBarCtrl.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new IE4 controls'
00007 // http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/Include/CJToolBarCtrl.h $
00015  *
00016  * $History: CJToolBarCtrl.h $
00017  *
00018  * *****************  Version 8  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/Include
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 7  *****************
00024  * User: Kirk Stowell Date: 7/31/99    Time: 4:27p
00025  * Updated in $/CodeJockey/Include
00026  *
00027  * *****************  Version 5  *****************
00028  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00029  * Updated in $/CodeJockey/Include
00030  *
00031  * *****************  Version 4  *****************
00032  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00033  * Updated in $/CodeJockey/Include
00034  *
00035  * *****************  Version 3  *****************
00036  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00037  * Updated in $/CodeJockey/Include
00038  *
00039  * *****************  Version 2  *****************
00040  * User: Kirk Stowell Date: 7/18/99    Time: 10:10p
00041  * Updated in $/CodeJockey/Include
00042  * Cleaned up inline functions, and import/export macro so that class will
00043  * be imported when linked to, and exported at compile time.
00044  *
00045  * *****************  Version 1  *****************
00046  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00047  * Created in $/CodeJockey/Include
00048  * Copied from MFC v6 and techno preview for v5. Added to extend
00049  * functionality to Visual C++ 5.0 users.
00050  *
00051  ***************************************************************************/
00052
00053 #ifndef __CJTOOLBARCTRL_H__
00054 #define __CJTOOLBARCTRL_H__
00055
00056 // The CCJToolBarCtrl class provides the functionality of the Windows toolbar
00057 // common control. This control (and therefore the CCJToolBarCtrl class) is available
00058 // only to programs running under Windows 95 and Windows NT version 3.51 and later.
00059 class _CJX_EXT_CLASS CCJToolBarCtrl : public CToolBarCtrl
00060 {
00061 // Construction
00062 public:
00063   CCJToolBarCtrl();
00064   BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
00065
00066 // Attributes
00067 public:
00068     DWORD GetButtonSize() const;
00069     CImageList* GetDisabledImageList() const;
00070     CImageList* GetHotImageList() const;
00071     CImageList* GetImageList() const;
00072     DWORD GetStyle() const;
00073     int GetMaxTextRows() const;
00074     BOOL IsButtonHighlighted(int nID) const;
00075     BOOL SetButtonWidth(int cxMin, int cxMax);
00076     CImageList* SetDisabledImageList(CImageList* pImageList);
00077     CImageList* SetHotImageList(CImageList* pImageList);
00078     CImageList* SetImageList(CImageList* pImageList);
00079     HRESULT GetDropTarget(IDropTarget** ppDropTarget) const;;
00080     BOOL SetIndent(int iIndent);
00081     BOOL SetMaxTextRows(int iMaxRows);
00082     void SetStyle(DWORD dwStyle);
00083     BOOL GetButtonInfo(int nID, TBBUTTONINFO* ptbbi) const;
00084     BOOL SetButtonInfo(int nID, TBBUTTONINFO* ptbbi);
00085     DWORD SetDrawTextFlags(DWORD dwMask, DWORD dwDTFlags);
00086     BOOL GetAnchorHighlight() const;
00087     BOOL SetAnchorHighlight(BOOL fAnchor = TRUE);
00088     int GetHotItem() const;
00089     int SetHotItem(int nHot);
00090     void GetInsertMark(TBINSERTMARK* ptbim) const;
00091     void SetInsertMark(TBINSERTMARK* ptbim);
00092     BOOL GetMaxSize(LPSIZE pSize) const;
00093     BOOL InsertMarkHitTest(LPPOINT ppt, LPTBINSERTMARK ptbim) const;
00094     DWORD GetExtendedStyle() const;
00095     DWORD SetExtendedStyle(DWORD dwExStyle);
00096     COLORREF GetInsertMarkColor() const;
00097     COLORREF SetInsertMarkColor(COLORREF clrNew);
00098
00099 // Operations
00100 public:
00101     BOOL MapAccelerator(TCHAR chAccel, UINT* pIDBtn);
00102     BOOL MarkButton(int nID, BOOL bHighlight = TRUE);
00103     BOOL MoveButton(UINT nOldPos, UINT nNewPos);
00104     int HitTest(LPPOINT ppt) const;
00105
00106 // Overrides
00107     // ClassWizard generated virtual function overrides
00108     //{{AFX_VIRTUAL(CCJToolBarCtrl)
00109     //}}AFX_VIRTUAL
00110
00111 // Implementation
00112 public:
00113     virtual ~CCJToolBarCtrl();
00114
00115     // Generated message map functions
00116 protected:
00117     //{{AFX_MSG(CCJToolBarCtrl)
00118     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00119     //}}AFX_MSG
00120
00121     DECLARE_MESSAGE_MAP()
00122 };
00123
00125 // inline functions
00127
00128 _CJXLIB_INLINE DWORD CCJToolBarCtrl::GetButtonSize() const
00129     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETBUTTONSIZE, 0, 0L); }
00130
00131 _CJXLIB_INLINE CImageList* CCJToolBarCtrl::GetDisabledImageList() const
00132     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETDISABLEDIMAGELIST, 0, 0)); }
00133
00134 _CJXLIB_INLINE CImageList* CCJToolBarCtrl::GetHotImageList() const
00135     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETHOTIMAGELIST, 0, 0)); }
00136
00137 _CJXLIB_INLINE CImageList* CCJToolBarCtrl::GetImageList() const
00138     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETIMAGELIST, 0, 0)); }
00139
00140 _CJXLIB_INLINE DWORD CCJToolBarCtrl::GetStyle() const
00141     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETSTYLE, 0, 0L); }
00142
00143 _CJXLIB_INLINE int CCJToolBarCtrl::GetMaxTextRows() const
00144     { ASSERT(::IsWindow(m_hWnd)); return (INT) ::SendMessage(m_hWnd, TB_GETTEXTROWS, 0, 0L); }
00145
00146 _CJXLIB_INLINE BOOL CCJToolBarCtrl::IsButtonHighlighted(int nID) const
00147     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONHIGHLIGHTED, nID, 0); }
00148
00149 _CJXLIB_INLINE BOOL CCJToolBarCtrl::SetButtonWidth(int cxMin, int cxMax)
00150     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONWIDTH, 0, MAKELPARAM(cxMin, cxMax)); }
00151
00152 _CJXLIB_INLINE CImageList* CCJToolBarCtrl::SetDisabledImageList(CImageList* pImageList)
00153     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETDISABLEDIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
00154
00155 _CJXLIB_INLINE CImageList* CCJToolBarCtrl::SetHotImageList(CImageList* pImageList)
00156     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETHOTIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
00157
00158 _CJXLIB_INLINE CImageList* CCJToolBarCtrl::SetImageList(CImageList* pImageList)
00159     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
00160
00161 _CJXLIB_INLINE BOOL CCJToolBarCtrl::SetIndent(int iIndent)
00162     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETINDENT, iIndent, 0L); }
00163
00164 _CJXLIB_INLINE BOOL CCJToolBarCtrl::SetMaxTextRows(int iMaxRows)
00165     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETMAXTEXTROWS, iMaxRows, 0L); }
00166
00167 _CJXLIB_INLINE void CCJToolBarCtrl::SetStyle(DWORD dwStyle)
00168     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETSTYLE, 0, dwStyle); }
00169
00170 _CJXLIB_INLINE BOOL CCJToolBarCtrl::GetButtonInfo(int nID, TBBUTTONINFO* ptbbi) const
00171     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETBUTTONINFO, nID, (LPARAM)ptbbi); }
00172
00173 _CJXLIB_INLINE BOOL CCJToolBarCtrl::SetButtonInfo(int nID, TBBUTTONINFO* ptbbi)
00174     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONINFO, nID, (LPARAM)ptbbi); }
00175
00176 _CJXLIB_INLINE DWORD CCJToolBarCtrl::SetDrawTextFlags(DWORD dwMask, DWORD dwDTFlags)
00177     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_SETDRAWTEXTFLAGS, dwMask, dwDTFlags); }
00178
00179 _CJXLIB_INLINE BOOL CCJToolBarCtrl::GetAnchorHighlight() const
00180     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETANCHORHIGHLIGHT, 0, 0); }
00181
00182 _CJXLIB_INLINE BOOL CCJToolBarCtrl::SetAnchorHighlight(BOOL fAnchor)
00183     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETANCHORHIGHLIGHT, fAnchor, 0); }
00184
00185 _CJXLIB_INLINE int CCJToolBarCtrl::GetHotItem() const
00186     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_GETHOTITEM, 0, 0); }
00187
00188 _CJXLIB_INLINE int CCJToolBarCtrl::SetHotItem(int nHot)
00189     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_SETHOTITEM, nHot, 0); }
00190
00191 _CJXLIB_INLINE void CCJToolBarCtrl::GetInsertMark(TBINSERTMARK* ptbim) const
00192     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_GETINSERTMARK, 0, (LPARAM)ptbim); }
00193
00194 _CJXLIB_INLINE void CCJToolBarCtrl::SetInsertMark(TBINSERTMARK* ptbim)
00195     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETINSERTMARK, 0, (LPARAM)ptbim); }
00196
00197 _CJXLIB_INLINE BOOL CCJToolBarCtrl::GetMaxSize(LPSIZE pSize) const
00198     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETMAXSIZE, 0, (LPARAM)pSize); }
00199
00200 _CJXLIB_INLINE BOOL CCJToolBarCtrl::InsertMarkHitTest(LPPOINT ppt, LPTBINSERTMARK ptbim) const
00201     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_INSERTMARKHITTEST, (WPARAM)ppt, (LPARAM)ptbim); }
00202
00203 _CJXLIB_INLINE DWORD CCJToolBarCtrl::GetExtendedStyle() const
00204     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETEXTENDEDSTYLE, 0, 0L); }
00205
00206 _CJXLIB_INLINE DWORD CCJToolBarCtrl::SetExtendedStyle(DWORD dwExStyle)
00207     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_SETEXTENDEDSTYLE, 0, dwExStyle); }
00208
00209 _CJXLIB_INLINE COLORREF CCJToolBarCtrl::GetInsertMarkColor() const
00210     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TB_GETINSERTMARKCOLOR, 0, 0); }
00211
00212 _CJXLIB_INLINE COLORREF CCJToolBarCtrl::SetInsertMarkColor(COLORREF clrNew)
00213     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TB_SETINSERTMARKCOLOR, 0, (LPARAM) clrNew); }
00214
00215 _CJXLIB_INLINE BOOL CCJToolBarCtrl::MapAccelerator(TCHAR chAccel, UINT* pIDBtn)
00216     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MAPACCELERATOR, (WPARAM)chAccel, (LPARAM)pIDBtn); }
00217
00218 _CJXLIB_INLINE BOOL CCJToolBarCtrl::MarkButton(int nID, BOOL bHighlight)
00219     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MARKBUTTON, nID, MAKELPARAM(bHighlight, 0)); }
00220
00221 _CJXLIB_INLINE BOOL CCJToolBarCtrl::MoveButton(UINT nOldPos, UINT nNewPos)
00222     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MOVEBUTTON, nOldPos, nNewPos); }
00223
00224 _CJXLIB_INLINE int CCJToolBarCtrl::HitTest(LPPOINT ppt) const
00225     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_HITTEST, 0, (LPARAM)ppt); }
00226
00227 #endif //__CJTOOLBARCTRL_H__
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TbEntryChkButton Member List

This is the complete list of members for TbEntryChkButton, including all inherited members.

ischeck | TbEntryButton |
kind | TbEntry |
TbEntry(tbeKind k) | TbEntry | [inline]
TbEntryButton(HBITMAP b, int c, const char *t, UTB_VAR v) | TbEntryButton | [inline]
TbEntryChkButton(HBITMAP b, int c, const char *t, UTB_VAR v) | TbEntryChkButton | [inline]
wid | TbEntryButton |
~TbEntry() | TbEntry | [inline, virtual]
~TbEntryButton() | TbEntryButton | [inline, virtual]
~TbEntryChkButton() | TbEntryChkButton | [inline, virtual]

Generated on Sat Aug 7 22:56:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoColumnContext Member List

This is the complete list of members for KoColumnContext, including all inherited members.

GetPath() const | KoColumnContext |
KoColumnContext(const char *path) | KoColumnContext |
m_path | KoColumnContext | [private]

Generated on Sat Aug 7 22:53:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppGlue.mac.h Source File

common/AppGlue.mac.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * AppGlue.mac.h --- glue code to access CVS shared library
00023  */
00024
00025 #ifndef APPGLUEMAC_H
00026 #define APPGLUEMAC_H
00027
00028 #include "dll_loader.h"
00029
00030 extern "C" int glue_eventdispatcher(EventRecord *ev);
00031
00032 #endif /* APPGLUEMAC_H */
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoDiffHandler Member List

This is the complete list of members for KoDiffHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoDiffHandler() | KoDiffHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoDiffHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoDiffHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AboutDlg.h Source File

common/AboutDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Karl-Heinz Brünen <k.bruenen@yahoo.com> --- March 2002
00019  */
00020
00021 // AboutDlg.h
00022 #ifndef ABOUT_DLG_H
00023 #define ABOUT_DLG_H
00024
00025 extern void AboutDialog(void);
00026
00027 #ifdef qUnix
00028 class UAboutDlg : public UWidget
00029 {
00030     UDECLARE_DYNAMIC(UAboutDlg)
00031 public:
00032     UAboutDlg() : UWidget(::UEventGetWidID()) {}
00033
00034     virtual ~UAboutDlg() {}
00035
00036     enum
00037     {
00038         kOK = EV_COMMAND_START, // 0
00039         kAppPix,                // 1
00040         kAppName,               // 2
00041         kAppURL                 // 3
00042     };
00043
00044     virtual void DoDataExchange(bool fill);
00045
00046 protected:
00047     ev_msg int OnOk(void);
00048     ev_msg int OnURL(void);
00049
00050     UDECLARE_MESSAGE_MAP()
00051 };
00052 #endif // qUnix
00053
00054 #endif // ABOUT_DLG_H
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPseudoRotButton Member List

This is the complete list of members for CPseudoRotButton, including all inherited members.

CCJFlatButton() | CCJFlatButton |
CPseudoButton() | CPseudoButton |
CPseudoRotButton() | CPseudoRotButton |
DisableFlatLook(BOOL bDisable=FALSE) | CCJFlatButton | [virtual]
DoRotate(int index) | CPseudoRotButton | [virtual]
DrawButtonBitmap(CDC *pDC, UINT nState, CRect &rcItem) | CPseudoButton | [protected, virtual]
DrawButtonIcon(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawButtonText(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CPseudoButton | [virtual]
GetCurrent(void) const | CPseudoRotButton | [inline]
loadIcon(CString &icon, int rsrcid) | CPseudoButton | [static]
LoadXPM(int rsrcid) | CPseudoButton | [virtual]
LoadXPMs(const int *rsrcid, int numrsrc) | CPseudoRotButton | [virtual]
m_bAltColor | CCJFlatButton | [protected]
m_bFlatLook | CCJFlatButton | [protected]
m_bitmap | CPseudoButton | [protected]
m_bitmaps | CPseudoRotButton | [protected]
m_bLBtnDown | CCJFlatButton | [protected]
m_bMouseOver | CCJFlatButton | [protected]
m_bPainted | CCJFlatButton | [protected]
m_clrAltHilite | CCJFlatButton | [protected]
m_clrAltNormal | CCJFlatButton | [protected]
m_clrAltShadow | CCJFlatButton | [protected]
m_clrAltTextNm | CCJFlatButton | [protected]
m_clrDkShad | CCJFlatButton | [protected]
m_clrHilite | CCJFlatButton | [protected]
m_clrNormal | CCJFlatButton | [protected]
m_clrShadow | CCJFlatButton | [protected]
m_clrTextGy | CCJFlatButton | [protected]
m_clrTextNm | CCJFlatButton | [protected]
m_curindex | CPseudoRotButton | [protected]
m_disbitmap | CPseudoButton | [protected]
m_disbitmaps | CPseudoRotButton | [protected]
m_Font | CCJFlatButton | [protected]
m_hCursor | CCJFlatButton | [protected]
m_hPushed | CCJFlatButton | [protected]
m_pFont | CCJFlatButton | [protected]
m_sizeIcon | CCJFlatButton | [protected]
OnEraseBkgnd(CDC *pDC) | CCJFlatButton | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnPaint() | CCJFlatButton | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJFlatButton | [protected]
OnSysColorChange() | CCJFlatButton | [protected]
OnTimer(UINT nIDEvent) | CCJFlatButton | [protected]
SetAlternateColors(COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm) | CCJFlatButton | [virtual]
SetButtonFont(CFont *pFont) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, CSize size) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, HICON hPushed, CSize size) | CCJFlatButton | [virtual]
UpdateFont() | CCJFlatButton | [protected, virtual]
~CCJFlatButton() | CCJFlatButton | [virtual]
~CPseudoButton() | CPseudoButton | [virtual]
~CPseudoRotButton() | CPseudoRotButton | [virtual]

Generated on Sat Aug 7 22:55:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CHistComboBoxEx Member List

This is the complete list of members for CHistComboBoxEx, including all inherited members.

AddString(LPCTSTR lpszString) | CHistComboBoxEx |
AutoDropWidth enum value | USmartCombo |
CalcDroppedWidth() | CHistComboBoxEx | [private, virtual]
CHistComboBoxEx(int feature=USmartCombo::DefaultFeature) | CHistComboBoxEx |
DefaultFeature enum value | USmartCombo |
DelKeyTest(MSG *pMsg) | CHistComboBoxEx | [private]
Feature enum name | USmartCombo |
FindBestRoot(CMString &strItems, const char *path, bool mustExist=false) | CHistComboBoxEx | [static]
GetItems() | USmartCombo |
GetKeyword() const | USmartCombo |
GetOldLoc() | CHistComboBoxEx |
HasFeature(int feature) const | USmartCombo |
InsertString(int nIndex, LPCTSTR lpszString) | CHistComboBoxEx |
Keyword enum value | USmartCombo |
m_imageList | CHistComboBoxEx | [private]
NewRoot(const char *root) | CHistComboBoxEx |
None enum value | USmartCombo |
OnDropdown() | CHistComboBoxEx | [protected]
PreTranslateMessage(MSG *pMsg) | CHistComboBoxEx | [virtual]
ReadOnly enum value | USmartCombo |
RemoveItem(const char *strItem) | USmartCombo | [virtual]
RemoveItems enum value | USmartCombo |
SetFeature(int feature) | USmartCombo |
SetIcon(COMBOBOXEXITEM cbi, bool showStatus) | CHistComboBoxEx |
SetItems(CMString *pstrItems) | USmartCombo |
SetKeyword(const char *keyword) | USmartCombo |
SetReadOnly(bool readOnly=true) | USmartCombo | [virtual]
USmartCombo(int feature) | USmartCombo |
WindowProc(UINT message, WPARAM wParam, LPARAM lParam) | CHistComboBoxEx | [protected, virtual]
~CHistComboBoxEx() | CHistComboBoxEx | [virtual]
~USmartCombo() | USmartCombo | [virtual]

Generated on Sat Aug 7 22:53:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsCommands.h Source File

common/UCvsCommands.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSCOMMANDS_H
00026 #define UCVSCOMMANDS_H
00027
00028 #include "umain.h"
00029
00030 // the global pseudo-widgets have fixed assigned IDs in order
00031 // to be able to access them from anywhere.
00032 enum
00033 {
00034     kUCvsFrameID = 1,           /* the main frane */
00035     kUMainConsoleID,            /* the pseudo-console */
00036     kUCvsFoldersID,             /* the folder tree */
00037     kUCvsFilesID,               /* the files list */
00038     kUCvsToolbarID,             /* the toolbar */
00039     kUCvsBrowseToolbarID,       /* the browse toolbar */
00040     kUCvsFilterToolbarID,       /* the filter toolbar */
00041     kUCvsMenubarID,             /* the menubar */
00042     kUCvsStatusbarID
00043 };
00044
00045 // commands shared over the pseudo-widgets : these commands are dispatched
00046 // mainly by the toolbar and the menubar.
00047 enum
00048 {
00049     cmdSAVE = EV_COMMAND_START + 100,
00050     cmdSAVE_AS,
00051     cmdPRINT,
00052     cmdPRINT_PREVIEW,
00053     cmdPRINT_SETUP,
00054     cmdSEND_MAIL,
00055     cmdEXIT,
00056     cmdUNDO,
00057     cmdCUT,
00058     cmdCOPY,
00059     cmdPASTE,
00060     cmdSELECT_ALL,
00061     cmdCLEAR_ALL,
00062     cmdFIND,
00063     cmdREPEAT,
00064     cmdFONT,
00065     cmdSHELL,
00066     cmdUSE_TCLSHELL,
00067     cmdUSE_PYSHELL,
00068     cmdTOOLBAR,
00069     cmdSTATUS_BAR,
00070     cmdBROWSER_BAR,
00071     cmdFILES_BAR,
00072     cmdMULTI_BAR,
00073     cmdTAGS_BAR,
00074     cmdCONSOLE_BAR,
00075     cmdWORKSPACE,
00076     cmdOPEN,
00077     cmdPREFERENCES,
00078     cmdCMDLINE,
00079     cmdLOGIN,
00080     cmdLOGOUT,
00081     cmdSTOPCVS,
00082     cmdINIT,
00083     cmdIMPORT,
00084     cmdCHECKOUT,
00085     cmdRTAGCREATE,
00086     cmdRTAGDELETE,
00087     cmdRTAGBRANCH,
00088     cmdUPDATE,
00089     cmdCOMMIT,
00090     cmdADD,
00091     cmdADDB,
00092     cmdRMV,
00093     cmdTRASH,
00094     cmdTAGNEW,
00095     cmdTAGDELETE,
00096     cmdTAGBRANCH,
00097     cmdEXPLORE,
00098     cmdQUERYUPDATE,
00099     cmdRELOAD,
00100     cmdEDITSEL,
00101     cmdEDITSELDEF,
00102     cmdDIFF,
00103     cmdLOG,
00104     cmdSTATUS,
00105     cmdGRAPH,
00106     cmdLOCKF,
00107     cmdUNLOCKF,
00108     cmdEDIT,
00109     cmdRESEDIT,
00110     cmdUNEDIT,
00111     cmdWATCHON,
00112     cmdWATCHOFF,
00113     cmdRELEASE,
00114     cmdWATCHERS,
00115     cmdEDITORS,
00116     cmdCASCADE,
00117     cmdTILE_HORZ,
00118     cmdARRANGE,
00119     cmdFINDER,
00120     cmdCVS,
00121     cmdCVSCLIENT,
00122     cmdABOUT,
00123     cmdIGNORE,
00124     cmdUPFOLDER,
00125     cmdSAVESETTINGS,
00126     cmdFLAT,
00127     cmdVIEW_ADDED,
00128     cmdVIEW_REMOVED,
00129     cmdVIEW_CHANGED,
00130     cmdHIDE_UNKNOWN,
00131     cmdVIEW_UNKNOWN,
00132     cmdVIEW_MODIFIED,
00133     cmdVIEW_MISSING,
00134     cmdVIEW_CONFLICT,
00135     cmdVIEW_FILEMASK,
00136
00137     cmdMACROS,
00138
00139 #ifndef USE_PYTHON
00140     cmdSELMACRO, // contiguous BEGIN
00141     cmdSELMACROEND = cmdSELMACRO + 30,
00142 #endif
00143
00144     cmdADMINMACROS,
00145     cmdMACROADMIN, // contiguous BEGIN
00146     cmdMACROADMINEND = cmdMACROADMIN + 20,
00147
00148     cmdCREDITS,
00149     cmdCOPYRIGHTS,
00150
00151 #ifdef USE_PYTHON
00152     cmdPyMACROS = 10000,  // contiguous BEGIN
00153     cmdPyMACROSEND = cmdPyMACROS + 100
00154 #endif
00155 };
00156
00157 #endif
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsApp Member List

This is the complete list of members for UCvsApp, including all inherited members.

_GetBaseClass() | UCvsApp | [protected, static]
_messageEntries | UCvsApp | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsApp | UCvsApp | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
Execute(int argc, char *const *argv) | UCvsApp |
gApp | UCvsApp | [static]
gCvsProcess | UCvsApp | [protected, static]
gCvsRunning | UCvsApp | [protected]
gCvsStopping | UCvsApp | [protected]
GetAppLibFolder(void) const | UCvsApp |
GetAppName(void) const | UCvsApp |
GetAppVersion(void) const | UCvsApp |
GetBaseMessageMap() | UCvsApp | [protected, static]
GetBrowserView(void) | UCvsApp |
GetConsole(void) | UCvsApp |
GetCurModal() const | UWidget | [inline]
GetCvsProcess(void) | UCvsApp | [inline]
GetFilesView(void) | UCvsApp |
GetFilterModel() const | UCvsApp |
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetIgnoreModel() const | UCvsApp |
GetMainFrame(void) | UCvsApp | [inline]
GetMessageMap() const | UCvsApp | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRecursionModel() const | UCvsApp |
GetRuntimeClass() const | UCvsApp | [virtual]
GetStatusBar(void) | UCvsApp |
GetThisMessageMap() | UCvsApp | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsCvsRunning(void) | UCvsApp | [inline]
IsCvsStopping(void) | UCvsApp | [inline]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kProcessTimer enum value | UCvsApp |
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_hasPY | UCvsApp | [protected]
m_hasTCL | UCvsApp | [protected]
m_listeners | UWidget | [protected]
m_mainFrame | UCvsApp | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UCvsApp | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnMainTimer(long time) | UCvsApp | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
PeekPumpAndIdle(bool) | UCvsApp |
RemoveTimer(int cmd) | UWidget |
RestartScriptEngine() | UCvsApp |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsApp(void) | UCvsApp | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
SayWelcome(void) | UCvsApp |
SetCvsProcess(CvsProcess *proc) | UCvsApp | [inline]
SetCvsRunning(bool state) | UCvsApp |
SetCvsStopping(bool state) | UCvsApp |
SetStatusBarText(const char *) | UCvsApp |
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
StartScriptEngine(const bool forceReload=false) | UCvsApp |
StopScriptEngine() | UCvsApp |
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsApp(int argc, char **argv) | UCvsApp |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsApp() | UCvsApp | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:50:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCvsProcessData Member List

This is the complete list of members for CCvsProcessData, including all inherited members.

CCvsProcessData() | CCvsProcessData |
GetCvsConsole() const | CCvsProcessData |
GetCvsConsole() | CCvsProcessData |
m_pCvsConsole | CCvsProcessData | [private]
SetCvsConsole(CCvsConsole *pCvsConsole) | CCvsProcessData |

Generated on Sat Aug 7 22:51:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTCLCvsConsole Member List

This is the complete list of members for CTCLCvsConsole, including all inherited members.

CTCLCvsConsole(Tcl_Interp *interp) | CTCLCvsConsole | [inline]
cvs_err(const char *txt, long len) | CTCLCvsConsole | [inline, virtual]
cvs_out(const char *txt, long len) | CTCLCvsConsole | [inline, virtual]
fAlloc | CTCLCvsConsole | [protected]
fInterp | CTCLCvsConsole | [protected]
fLen | CTCLCvsConsole | [protected]
~CTCLCvsConsole() | CTCLCvsConsole | [inline, virtual]

Generated on Sat Aug 7 22:56:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UTREE_INFO Member List

This is the complete list of members for UTREE_INFO, including all inherited members.

child | UTREE_INFO
data | UTREE_INFO
expanded | UTREE_INFO
icon | UTREE_INFO
item | UTREE_INFO
next | UTREE_INFO
parent | UTREE_INFO
title | UTREE_INFO

Generated on Sat Aug 7 22:57:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGfxSplitterWnd Member List

This is the complete list of members for CGfxSplitterWnd, including all inherited members.

bWhiteLine | CGfxSplitterWnd |
CGfxSplitterWnd() | CGfxSplitterWnd |
GetInsideRect(CRect &rect) const | CGfxSplitterWnd | [protected, virtual]
m_upBorder | CGfxSplitterWnd |
OnDrawSplitter(CDC *pDC, ESplitType nType, const CRect &rectArg) | CGfxSplitterWnd | [virtual]
OnEraseBkgnd(CDC *pDC) | CGfxSplitterWnd | [protected]
OnInvertTracker(const CRect &rect) | CGfxSplitterWnd | [virtual]
OnPaint() | CGfxSplitterWnd | [protected]
RecalcLayout() | CGfxSplitterWnd | [virtual]
~CGfxSplitterWnd() | CGfxSplitterWnd | [virtual]

Generated on Sat Aug 7 22:52:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsStatusbar Member List

This is the complete list of members for UCvsStatusbar, including all inherited members.

_GetBaseClass() | UCvsStatusbar | [protected, static]
_messageEntries | UCvsStatusbar | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsStatusbar | UCvsStatusbar | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UCvsStatusbar | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UCvsStatusbar | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UCvsStatusbar | [virtual]
GetThisMessageMap() | UCvsStatusbar | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UCvsStatusbar | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCreate() | UCvsStatusbar | [protected]
OnDestroy() | UCvsStatusbar | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsStatusbar(void) | UCvsStatusbar | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsStatusbar() | UCvsStatusbar |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsStatusbar() | UCvsStatusbar | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:51:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonGlue.h Source File

common/PythonGlue.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- August 2001
00019  */
00020
00021 /*
00022  * PythonGlue.h --- glue to the Python language
00023  */
00024
00025 #ifndef PYTHONGLUE_H
00026 #define PYTHONGLUE_H
00027
00028 class UCmdUI;
00029 class EntnodeData;
00030
00031 typedef struct _ts PyThreadState;
00032
00033 void PyMacrosReloadAll(void);
00034 void PyDoCmdUI(UCmdUI* ucmdui);
00035 void PyDoPython(int cmd);
00036
00037 bool PyIsUICacheValid();
00038 void PyValidUICache();
00039 void PyInvalUICache();
00040 void PyAppendCache(EntnodeData* data);
00041
00043 class CPython_Interp
00044 {
00045 public:
00046     // Construction
00047     CPython_Interp(bool mainInterp = true);
00048     ~CPython_Interp();
00049
00050 private:
00051     // Data members
00052     PyThreadState* fInterp;
00054     static PyThreadState* m_mainInterpreter;
00056 public:
00057     // Interface
00058     static bool IsAvail(const bool forceReload = false);
00059
00060     int DoScriptVar(const char* format, ...);
00061     int DoScript(const char* script);
00062     int DoFile(const char* file);
00063
00064     static void InitPythonSupport(const bool forceReload = false);
00065     static void ClosePythonSupport(void);
00066
00067     inline operator PyThreadState*(void);
00068 };
00069
00071 // Inline implementation
00072
00074 inline CPython_Interp::operator PyThreadState*(void)
00075 {
00076     return fInterp;
00077 }
00078
00079 #endif /* PYTHONGLUE_H */
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoOptionColumn Member List

This is the complete list of members for KoOptionColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoOptionColumn | [inline, virtual]
GetColumnIndex() const | KoOptionColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoOptionColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoOptionColumn | [inline, virtual]
IsDefaultAscending() const | KiColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/macapp/stdafx.h Source File

rf/support/macapp/stdafx.h

Go to the documentation of this file.
00001 #ifndef __stdafx__
00002 #define __stdafx__
00003
00004 #define qMacAPP 1
00005
00006 #if qDebug
00007 #   define qRangeCheck 1
00008 #   define qReleaseBuild 0
00009 #else
00010 #   define qRangeCheck 0
00011 #   define qReleaseBuild 1
00012 #endif
00013
00014 #undef qRelease
00015 #define qRelease qReleaseBuild
00016
00017 #define wantDebugging qDebug
00018
00019 #include "MacAppTypes.h"
00020
00021 /* the MacAPP assert */
00022 #if qDebug
00023 #   define UASSERT(cond) DebugAssert_AC((cond), #cond, __FILE__, __LINE__)
00024 #else
00025 #   define UASSERT(cond)
00026 #endif
00027 #define UTHROW(err) throw CException_AC(mFulErr)
00028
00029 extern "C" char *strdup(const char *str);
00030
00031 #endif // __stdafx__
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoUneditHandler Member List

This is the complete list of members for KoUneditHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoUneditHandler() | KoUneditHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoUneditHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoUneditHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMultiLineEditDialogKeyHelper Member List

This is the complete list of members for CMultiLineEditDialogKeyHelper, including all inherited members.

CMultiLineEditDialogKeyHelper() | CMultiLineEditDialogKeyHelper |
Create(const ctrlPressedOnOK, CDialog *pDlg, const HWND hParentDlg=NULL) | CMultiLineEditDialogKeyHelper |
FormatLineBreakHint() const | CMultiLineEditDialogKeyHelper |
m_ctrlPressedOnOK | CMultiLineEditDialogKeyHelper | [private]
m_hParentDlg | CMultiLineEditDialogKeyHelper | [private]
m_pDlg | CMultiLineEditDialogKeyHelper | [private]
RelayEvent(const MSG *pMsg) | CMultiLineEditDialogKeyHelper |

Generated on Sat Aug 7 22:55:20 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPen Member List

This is the complete list of members for UPen, including all inherited members.

CreatePen(int nPenStyle, int nWidth, UCOLORREF crColor) | UPen |
DeleteObject(void) | UPen |
m_style | UPen | [protected]
m_width | UPen | [protected]
UPen() | UPen |
~UPen() | UPen |

Generated on Sat Aug 7 22:55:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsCommands.cpp Source File

common/CvsCommands.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * CvsCommands.cpp --- set of CVS commands
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <errno.h>
00028
00029 #ifdef WIN32
00030 #   include <process.h>
00031 #   include "wincvs.h"
00032
00033 #   ifdef _DEBUG
00034 #   define new DEBUG_NEW
00035 #   undef THIS_FILE
00036     static char THIS_FILE[] = __FILE__;
00037 #   endif
00038 #endif /* WIN32 */
00039
00040 #include "CvsCommands.h"
00041 #include "CvsArgs.h"
00042 #include "MultiFiles.h"
00043 #include "PromptFiles.h"
00044 #include "AppConsole.h"
00045 #include "AppGlue.h"
00046 #include "MoveToTrash.h"
00047 #include "LineCmd.h"
00048 #include "CvsAlert.h"
00049 #include "CommitDlg.h"
00050 #include "ImportDlg.h"
00051 #include "CheckoutDlg.h"
00052 #include "TclGlue.h"
00053 #include "ImportFilterDlg.h"
00054 #include "UpdateDlg.h"
00055 #include "LogDlg.h"
00056 #include "DiffDlg.h"
00057 #include "LogParse.h"
00058 #include "RtagDlg.h"
00059 #include "TagDlg.h"
00060 #include "InitDlg.h"
00061 #include "ReleaseDlg.h"
00062 #include "AnnotateDlg.h"
00063 #include "StatusDlg.h"
00064 #include "LoginDlg.h"
00065 #include "BrowseViewHandlers.h"
00066 #include "LaunchHandlers.h"
00067 #include "FileActionDlg.h"
00068 #include "Authen.h"
00069
00070 #ifdef qMacCvsPP
00071 #   include "AppGlue.mac.h"
00072 #   include "MacMisc.h"
00073 #   include "MacCvsApp.h"
00074 #   include "GUSIFileSpec.h"
00075 #   include <LaunchServices.h>
00076 #endif
00077
00078 #ifdef qUnix
00079 #include "UCvsApp.h"
00080 #endif
00081
00087 const char* GetEditTypeName(const kEditCmdType editType)
00088 {
00089     const char* res = _i18n("Unknown");
00090
00091     switch( editType )
00092     {
00093     case kEditNormal:
00094         res = _i18n("Edit");
00095         break;
00096     case kEditReserved:
00097         res = _i18n("Reserved Edit");
00098         break;
00099     case kEditForce:
00100         res = _i18n("Force Edit");
00101         break;
00102     default:
00103         break;
00104     }
00105
00106     return res;
00107 }
00108
00114 const char* GetTagTypeName(const kTagCmdType tagType)
00115 {
00116     const char* res = _i18n("Unknown");
00117
00118     switch( tagType )
00119     {
00120     case kTagCreate:
00121         res = _i18n("Create Tag");
00122         break;
00123     case kTagDelete:
00124         res = _i18n("Delete Tag");
00125         break;
00126     case kTagBranch:
00127         res = _i18n("Branch");
00128         break;
00129     default:
00130         break;
00131     }
00132
00133     return res;
00134 }
00135
00141 const char* GetRtagTypeName(const kTagCmdType tagType)
00142 {
00143     const char* res = _i18n("Unknown");
00144
00145     switch( tagType )
00146     {
00147     case kTagCreate:
00148         res = _i18n("Rtag Create");
00149         break;
00150     case kTagDelete:
00151         res = _i18n("Rtag Delete");
00152         break;
00153     case kTagBranch:
00154         res = _i18n("RTag Branch");
00155         break;
00156     default:
00157         break;
00158     }
00159
00160     return res;
00161 }
00162
00167 void CvsCmdMacrosAdmin(const char* macroName)
00168 {
00169     if(
00170 #if INTERNAL_AUTHEN
00171         gCvsPrefs.empty() ||
00172 #endif /* INTERNAL_AUTHEN */
00173         !CTcl_Interp::IsAvail() )
00174         return;
00175
00176     CTcl_Interp interp;
00177     CStr path = macroName;
00178     CTcl_Interp::Unixfy(path);
00179     interp.DoScriptVar("source \"%s\"", (const char*)path);
00180 }
00181
00189 static bool CheckSelectionHandler(KiSelectionHandler& handler, MultiFiles*& mf, bool forceNormalize=false)
00190 {
00191 #if INTERNAL_AUTHEN
00192     if( gCvsPrefs.empty() )
00193     {
00194         return false;
00195     }
00196 #endif /* INTERNAL_AUTHEN */
00197
00198     mf = handler.GetSelection();
00199     if( !mf && handler.GetNeedSelection() )
00200     {
00201         return false;
00202     }
00203
00204     return ( forceNormalize || handler.NeedsNormalize() ) ? mf->Normalize() : true;
00205 }
00206
00210 void CvsCmdInit()
00211 {
00212 #if INTERNAL_AUTHEN
00213     if( gCvsPrefs.empty() )
00214         return;
00215 #endif /* INTERNAL_AUTHEN */
00216
00217     bool forceCvsroot;
00218     CStr cvsroot;
00219
00220     if( !CompatGetInit(forceCvsroot, cvsroot) )
00221         return;
00222
00223     CvsArgs args;
00224
00225     if( forceCvsroot )
00226     {
00227 #if INTERNAL_AUTHEN
00228         args.addcvsroot();
00229 #else
00230         args.add("-d");
00231         args.add(cvsroot);
00232 #endif /* INTERNAL_AUTHEN */
00233     }
00234
00235     args.add("init");
00236
00237     args.print();
00238     launchCVS(0L, args.Argc(), args.Argv());
00239 }
00240
00244 void CvsCmdLogin(void)
00245 {
00246 #if INTERNAL_AUTHEN
00247     if( gCvsPrefs.empty() )
00248         return;
00249 #endif /* INTERNAL_AUTHEN */
00250
00251     bool forceCvsroot;
00252     CStr cvsroot;
00253
00254     if( !CompatGetLogin(forceCvsroot, cvsroot) )
00255         return;
00256
00257 #if INTERNAL_AUTHEN
00258     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00259     if( !curModel->HasLogin() )
00260     {
00261         cvs_err(_i18n("Logging in is required for 'pserver' or 'sspi' authentication only (see Preferences dialog).\n"
00262             "Please consult the CVS manual for more details.\n"));
00263     }
00264 #endif /* INTERNAL_AUTHEN */
00265
00266     if( gCvsPrefs.HasLoogedIn() && gCvsPrefs.LogoutTimeOut() > 0 )
00267     {
00268         cvs_err(_i18n("Making automatic logout:\n"));
00269         CvsCmdLogout();
00270         WaitForCvs();
00271     }
00272
00273     gCvsPrefs.SetHasLoogedIn(true);
00274
00275     CvsArgs args;
00276
00277     if( forceCvsroot )
00278     {
00279 #if INTERNAL_AUTHEN
00280         args.addcvsroot();
00281 #else
00282         args.add("-d");
00283         args.add(cvsroot);
00284 #endif /* INTERNAL_AUTHEN */
00285     }
00286
00287     args.add("login");
00288
00289     args.print();
00290     launchCVS(0L, args.Argc(), args.Argv());
00291 }
00292
00296 void CvsCmdLogout(void)
00297 {
00298 #if INTERNAL_AUTHEN
00299     if( gCvsPrefs.empty() )
00300         return;
00301
00302     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00303     if( !curModel->HasLogin() )
00304     {
00305         cvs_err(_i18n("Logging out is required for 'pserver' or 'sspi' authentication only (see Preferences dialog).\n"
00306             "Please consult the CVS manual for more details.\n"));
00307     }
00308 #endif /* INTERNAL_AUTHEN */
00309
00310     gCvsPrefs.SetHasLoogedIn(false);
00311
00312     CvsArgs args;
00313
00314     args.add("logout");
00315
00316     args.print();
00317     launchCVS(0L, args.Argc(), args.Argv());
00318 }
00319
00325 void CvsCmdRtag(KiSelectionHandler& handler, const kTagCmdType tagType)
00326 {
00327     MultiFiles* mf = NULL;
00328     if( !CheckSelectionHandler(handler, mf) )
00329         return;
00330
00331     bool norecurs;
00332     bool movDelBranch;
00333     bool overwriteExisting;
00334     bool useMostRecent;
00335     bool lookAttic;
00336     CStr modname;
00337     CStr tagname;
00338     CStr date;
00339     CStr rev;
00340     bool forceCvsroot;
00341     CStr cvsroot;
00342
00343     if( !CompatGetRtag(mf, tagType, norecurs, movDelBranch, overwriteExisting, tagname, modname, date, rev, useMostRecent, lookAttic, forceCvsroot, cvsroot) )
00344         return;
00345
00346     CvsArgs args;
00347
00348     if( forceCvsroot )
00349     {
00350 #if INTERNAL_AUTHEN
00351         args.addcvsroot();
00352 #else
00353         args.add("-d");
00354         args.add(cvsroot);
00355 #endif /* INTERNAL_AUTHEN */
00356     }
00357
00358     args.add("rtag");
00359
00360     switch( tagType )
00361     {
00362     case kTagCreate:
00363         // Nothing to do
00364         break;
00365     case kTagDelete:
00366         args.add("-d");
00367         break;
00368     case kTagBranch:
00369         args.add("-b");
00370         break;
00371     default:
00372         break;
00373     }
00374
00375     if( norecurs )
00376         args.add("-l");
00377
00378     if( movDelBranch )
00379         args.add("-B");
00380
00381     if( lookAttic )
00382         args.add("-a");
00383
00384     if( tagType == kTagCreate || tagType == kTagBranch )
00385     {
00386         if( useMostRecent )
00387             args.add("-f");
00388
00389         if( overwriteExisting )
00390             args.add("-F");
00391
00392         if( !date.empty() )
00393         {
00394             args.add("-D");
00395             args.add(date);
00396         }
00397
00398         if( !rev.empty() )
00399         {
00400             args.add("-r");
00401             args.add(rev);
00402         }
00403     }
00404
00405     args.add(tagname);
00406     args.add(modname);
00407
00408     args.print();
00409     launchCVS(0L, args.Argc(), args.Argv());
00410 }
00411
00416 void CvsCmdCheckoutModule(KiSelectionHandler& handler)
00417 {
00418     MultiFiles* mf = NULL;
00419     if( !CheckSelectionHandler(handler, mf) )
00420         return;
00421
00422     MultiFiles::const_iterator mfi = mf->begin();
00423     const char* dir = mfi->getdir();
00424
00425     bool norecurs;
00426     CStr modname;
00427     CStr path(dir);
00428     bool toStdout;
00429     CStr date;
00430     CStr rev;
00431     bool useMostRecent;
00432     CStr rev1;
00433     CStr rev2;
00434     bool branchPointMerge;
00435     bool threeWayConflicts;
00436     bool doexport;
00437     bool forceCvsroot;
00438     CStr cvsroot;
00439     bool overrideCheckoutDir;
00440     CStr checkoutDir;
00441     CStr keyword;
00442     bool resetSticky;
00443     bool dontShortenPaths;
00444     bool caseSensitiveNames;
00445     bool lastCheckinTime;
00446
00447     if( !CompatGetCheckout(mf, modname, path, norecurs,
00448         toStdout, date, rev, useMostRecent, rev1, rev2, branchPointMerge, threeWayConflicts,
00449         doexport, forceCvsroot, cvsroot, overrideCheckoutDir, checkoutDir, keyword, resetSticky, dontShortenPaths,
00450         caseSensitiveNames, lastCheckinTime) )
00451     {
00452         return;
00453     }
00454
00455     CvsArgs args;
00456
00457     if( forceCvsroot )
00458     {
00459 #if INTERNAL_AUTHEN
00460         args.addcvsroot();
00461 #else
00462         args.add("-d");
00463         args.add(cvsroot);
00464 #endif /* INTERNAL_AUTHEN */
00465     }
00466
00467     args.add(doexport ? "export" : "checkout");
00468
00469     if( gCvsPrefs.PruneOption() && !doexport )
00470         args.add("-P");
00471
00472     if( norecurs )
00473         args.add("-l");
00474
00475     if( toStdout )
00476         args.add("-p");
00477
00478     if( caseSensitiveNames )
00479         args.add("-S");
00480
00481     if( lastCheckinTime )
00482         args.add("-t");
00483
00484     if( resetSticky )
00485     {
00486         args.add("-A");
00487     }
00488     else
00489     {
00490         if( !keyword.empty() )
00491         {
00492             args.add(keyword);
00493         }
00494
00495         if( useMostRecent )
00496         {
00497             args.add("-f");
00498         }
00499
00500         if( !date.empty() )
00501         {
00502             args.add("-D");
00503             args.add(date);
00504         }
00505
00506         if( !rev.empty() )
00507         {
00508             args.add("-r");
00509             args.add(rev);
00510         }
00511     }
00512
00513     if( !rev1.empty() )
00514     {
00515         if( branchPointMerge )
00516             args.add("-b");
00517
00518         if( threeWayConflicts )
00519             args.add("-3");
00520
00521         CStr tmp;
00522         tmp = "-j";
00523         tmp << rev1;
00524         args.add(tmp);
00525     }
00526
00527     if( !rev2.empty() )
00528     {
00529         CStr tmp;
00530         tmp = "-j";
00531         tmp << rev2;
00532         args.add(tmp);
00533     }
00534
00535     if( doexport && rev.empty() && date.empty() )
00536     {
00537         args.add("-r");
00538         args.add("HEAD");
00539     }
00540
00541     if( overrideCheckoutDir )
00542     {
00543         if( dontShortenPaths )
00544             args.add("-N");
00545
00546         args.add("-d");
00547         args.add(checkoutDir);
00548     }
00549
00550     args.add(modname);
00551
00552     args.print(path);
00553     launchCVS(path, args.Argc(), args.Argv());
00554 }
00555
00560 void CvsCmdImportModule(KiSelectionHandler& handler)
00561 {
00562     MultiFiles* mf = NULL;
00563     if( !CheckSelectionHandler(handler, mf) )
00564         return;
00565
00566     MultiFiles::const_iterator mfi;
00567     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00568     {
00569         const char* dir = mfi->getdir();
00570         ReportConflict* entries = NULL;
00571         ReportWarning* warnings = NULL;
00572
00573         if( !CompatImportFilter(dir, entries, warnings) )
00574             return;
00575
00576         CStr modname, vendortag, reltag, path(dir), vendorBranchId;
00577         CStr logmsg;
00578         bool useDefIgnore;
00579         bool useFilesTime;
00580         bool createSandbox;
00581         bool dontCreateVendorTag;
00582         bool overwriteReleaseTags;
00583         bool forceCvsroot;
00584         CStr cvsroot;
00585
00586         if( !CompatGetImport(mf, entries, warnings, modname, logmsg, vendortag, reltag, vendorBranchId, path, useDefIgnore, useFilesTime, createSandbox, dontCreateVendorTag, overwriteReleaseTags, forceCvsroot, cvsroot) )
00587             return;
00588
00589         CvsArgs args;
00590
00591         if( forceCvsroot )
00592         {
00593 #if INTERNAL_AUTHEN
00594             args.addcvsroot();
00595 #else
00596             args.add("-d");
00597             args.add(cvsroot);
00598 #endif /* INTERNAL_AUTHEN */
00599         }
00600
00601         args.add("import");
00602
00603         if( createSandbox )
00604         {
00605             args.add("-C");
00606         }
00607
00608         if( useFilesTime )
00609         {
00610             args.add("-d");
00611         }
00612
00613         if( !dontCreateVendorTag && overwriteReleaseTags )
00614         {
00615             args.add("-f");
00616         }
00617
00618         // Fill the wrappers
00619         ReportConflict* tmpentry = entries;
00620
00621         if( !useDefIgnore )
00622         {
00623             args.add("-I"); // no default (core, *.o...)
00624             args.add("!");
00625             args.add("-I"); // but ignore the CVS folders
00626             args.add("CVS");
00627         }
00628
00629         while( tmpentry != 0L )
00630         {
00631             if( tmpentry->HasIgnore() )
00632             {
00633                 CPStr ign;
00634                 args.add("-I");
00635
00636                 if( tmpentry->IsExtension() )
00637                     ign << '*';
00638
00639                 ign << tmpentry->GetPattern();
00640                 args.add(ign);
00641             }
00642             else if( !tmpentry->HasForceText() &&
00643                 (tmpentry->IsBinary() || tmpentry->HasForceBinary() || tmpentry->HasForceNoKeywords() ||
00644                 tmpentry->IsUnicode() || tmpentry->HasForceUnicode()) )
00645             {
00646                 CPStr wrap;
00647                 const char* pattern = tmpentry->GetPattern();
00648                 bool hasSpace = strchr(pattern, ' ') != 0L;
00649                 args.add("-W");
00650
00651                 if( hasSpace )
00652                     wrap << '"';
00653
00654                 if( tmpentry->IsExtension() )
00655                     wrap << '*';
00656
00657                 wrap << pattern;
00658
00659                 if( hasSpace )
00660                     wrap << '"';
00661
00662                 if( tmpentry->HasForceNoKeywords() )
00663                 {
00664                     wrap << " -k 'o'";
00665                 }
00666                 else if( tmpentry->HasForceBinary() )
00667                 {
00668                     wrap << " -k 'b'";
00669                 }
00670                 else if( tmpentry->HasForceUnicode() )
00671                 {
00672                     wrap << " -k 'u'";
00673                 }
00674                 else if( tmpentry->IsBinary() )
00675                 {
00676                     wrap << " -k 'b'";
00677                 }
00678                 else if( tmpentry->IsUnicode() )
00679                 {
00680                     wrap << " -k 'u'";
00681                 }
00682
00683                 args.add(wrap);
00684             }
00685
00686             tmpentry = tmpentry->next;
00687         }
00688
00689         free_list_types(warnings, entries);
00690
00691         if( !vendorBranchId.empty() )
00692         {
00693             args.add("-b");
00694             args.add(vendorBranchId);
00695         }
00696
00697         args.add("-m");
00698         args.add(CleanupLogMsg(logmsg));
00699
00700         if( dontCreateVendorTag )
00701         {
00702             args.add("-n");
00703             args.add(modname);
00704         }
00705         else
00706         {
00707             args.add(modname);
00708             args.add(vendortag);
00709             args.add(reltag);
00710         }
00711
00712         args.print(path);
00713         launchCVS(path, args.Argc(), args.Argv());
00714     }
00715 }
00716
00721 void CvsCmdCommandLine(KiSelectionHandler& handler)
00722 {
00723     MultiFiles* mf = NULL;
00724     if( !CheckSelectionHandler(handler, mf) )
00725         return;
00726
00727     CStr dir;
00728     CStr cmd;
00729     bool addDefault;
00730     bool addSelection;
00731     bool forceCvsroot;
00732     CStr cvsroot;
00733
00734     if( !CompatGetCommand(mf, cmd, dir, addDefault, addSelection, forceCvsroot, cvsroot) )
00735         return;
00736
00737     char* argv[MAX_ARGS];
00738     int argc = StringToArgv(cmd.c_str(), argv);
00739
00740     if( addSelection )
00741     {
00742         MultiFiles::const_iterator mfi;
00743         for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00744         {
00745             CvsArgs args(addDefault);
00746
00747             if( addDefault && forceCvsroot )
00748             {
00749 #if INTERNAL_AUTHEN
00750                 args.addcvsroot();
00751 #else
00752                 args.add("-d");
00753                 args.add(cvsroot);
00754 #endif /* INTERNAL_AUTHEN */
00755             }
00756
00757             for(int i = 0; i < argc; i++)
00758             {
00759                 if( addDefault && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00760                 {
00761                     // Skip the "cvs" arguments as it's already added by args constructor
00762                     continue;
00763                 }
00764
00765                 args.add(argv[i]);
00766
00767                 if( !addDefault && forceCvsroot && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00768                 {
00769 #if INTERNAL_AUTHEN
00770                     args.addcvsroot();
00771 #else
00772                     args.add("-d");
00773                     args.add(cvsroot);
00774 #endif /* INTERNAL_AUTHEN */
00775                 }
00776             }
00777
00778             const char* dir = mfi->add(args);
00779             args.print(dir);
00780             launchCVS(dir, args.Argc(), args.Argv());
00781         }
00782     }
00783     else
00784     {
00785         CvsArgs args(addDefault);
00786
00787         if( addDefault && forceCvsroot )
00788         {
00789 #if INTERNAL_AUTHEN
00790             args.addcvsroot();
00791 #else
00792             args.add("-d");
00793             args.add(cvsroot);
00794 #endif /* INTERNAL_AUTHEN */
00795         }
00796
00797         for(int i = 0; i < argc; i++)
00798         {
00799             if( addDefault && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00800             {
00801                 // Skip the "cvs" arguments as it's already added by args constructor
00802                 continue;
00803             }
00804
00805             args.add(argv[i]);
00806
00807             if( !addDefault && forceCvsroot && i == 0 && strcmp(argv[i], CVS_CMD) == 0 )
00808             {
00809 #if INTERNAL_AUTHEN
00810                 args.addcvsroot();
00811 #else
00812                 args.add("-d");
00813                 args.add(cvsroot);
00814 #endif /* INTERNAL_AUTHEN */
00815             }
00816         }
00817
00818         args.print(dir);
00819         launchCVS(dir, args.Argc(), args.Argv());
00820     }
00821 }
00822
00827 void CvsCmdCancelChanges(KiSelectionHandler& handler)
00828 {
00829     MultiFiles* mf = NULL;
00830     if( !CheckSelectionHandler(handler, mf) )
00831         return;
00832
00833     MultiFiles::const_iterator mfi;
00834     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00835     {
00836         RemoveCvsArgs args;
00837         args.add("update");
00838
00839         const char* dir = mfi->add(args);
00840         args.print(dir);
00841         launchCVS(dir, args.Argc(), args.Argv());
00842     }
00843 }
00844
00850 void CvsCmdUpdate(KiSelectionHandler& handler, bool queryOnly)
00851 {
00852     MultiFiles* mf = NULL;
00853     if( !CheckSelectionHandler(handler, mf) )
00854         return;
00855
00856     bool toStdout;
00857     bool noRecurs;
00858     bool resetSticky;
00859     CStr date;
00860     CStr rev;
00861     bool useMostRecent;
00862     CStr rev1;
00863     CStr rev2;
00864     bool branchPointMerge;
00865     bool threeWayConflicts;
00866     bool createMissDir;
00867     bool getCleanCopy;
00868     CStr keyword;
00869     bool caseSensitiveNames;
00870     bool lastCheckinTime;
00871
00872     if( !queryOnly && !CompatGetUpdate(mf, toStdout, noRecurs, resetSticky,
00873         date, rev, useMostRecent, rev1, rev2, branchPointMerge, threeWayConflicts,
00874         createMissDir, getCleanCopy, keyword, caseSensitiveNames, lastCheckinTime) )
00875         return;
00876
00877     MultiFiles::const_iterator mfi;
00878     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00879     {
00880         CvsArgs args;
00881
00882         if( queryOnly )
00883             args.add("-n");
00884
00885         args.add("update");
00886
00887         if( !keyword.empty() )
00888         {
00889             args.add(keyword);
00890         }
00891
00892         if( gCvsPrefs.PruneOption() )
00893             args.add("-P");
00894
00895         if( caseSensitiveNames )
00896             args.add("-S");
00897
00898         if( lastCheckinTime )
00899             args.add("-t");
00900
00901         if( !queryOnly )
00902         {
00903             if( resetSticky )
00904                 args.add("-A");
00905
00906             if( createMissDir )
00907                 args.add("-d");
00908
00909             if( getCleanCopy )
00910                 args.add("-C");
00911
00912             if( !date.empty() )
00913             {
00914                 args.add("-D");
00915                 args.add(date);
00916             }
00917
00918             if( useMostRecent )
00919                 args.add("-f");
00920
00921             if( !rev1.empty() )
00922             {
00923                 if( branchPointMerge )
00924                     args.add("-b");
00925
00926                 if( threeWayConflicts )
00927                     args.add("-3");
00928
00929                 CStr tmp;
00930                 tmp = "-j";
00931                 tmp << rev1;
00932                 args.add(tmp);
00933             }
00934
00935             if( !rev2.empty() )
00936             {
00937                 CStr tmp;
00938                 tmp = "-j";
00939                 tmp << rev2;
00940                 args.add(tmp);
00941             }
00942
00943             if( noRecurs )
00944                 args.add("-l");
00945
00946             if( toStdout )
00947                 args.add("-p");
00948
00949             if( !rev.empty() )
00950             {
00951                 args.add("-r");
00952                 args.add(rev);
00953             }
00954         }
00955
00956         const char* dir = mfi->add(args);
00957         args.print(dir);
00958         launchCVS(dir, args.Argc(), args.Argv());
00959     }
00960 }
00961
00966 void CvsCmdCommit(KiSelectionHandler& handler)
00967 {
00968     MultiFiles* mf = NULL;
00969     if( !CheckSelectionHandler(handler, mf) )
00970         return;
00971
00972     bool norecurs;
00973     CStr logmsg;
00974     bool forceCommit;
00975     bool forceRecurse;
00976     CStr rev;
00977     bool noModuleProgram;
00978     bool checkValidEdits;
00979
00980     if( !CompatGetCommit(mf, logmsg, norecurs, forceCommit, forceRecurse, rev, noModuleProgram, checkValidEdits) )
00981         return;
00982
00983     MultiFiles::const_iterator mfi;
00984     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
00985     {
00986         CvsArgs args;
00987         args.add("commit");
00988
00989         if( checkValidEdits )
00990             args.add("-c");
00991
00992         if( norecurs )
00993             args.add("-l");
00994
00995         if( noModuleProgram )
00996             args.add("-n");
00997
00998         if( forceCommit )
00999             args.add("-f");
01000
01001         if( forceRecurse )
01002             args.add("-R");
01003
01004         args.add("-m");
01005         args.add(CleanupLogMsg(logmsg));
01006
01007         if( !rev.empty() )
01008         {
01009             args.add("-r");
01010             args.add(rev);
01011         }
01012
01013         const char* dir = mfi->add(args);
01014         args.print(dir);
01015         launchCVS(dir, args.Argc(), args.Argv());
01016     }
01017 }
01018
01024 void CvsCmdDiff(KiSelectionHandler& handler, kDiffCmdType diffType)
01025 {
01026     MultiFiles* mf = NULL;
01027     if( !CheckSelectionHandler(handler, mf) )
01028         return;
01029
01030     bool noRecurs;
01031     bool isDate1;
01032     bool isDate2;
01033     bool useExtDiff;
01034     CStr rev1;
01035     CStr rev2;
01036     bool unifiedDiff;
01037     bool noWhiteSpace;
01038     bool noBlankLines;
01039     bool ignoreCase;
01040     bool extDiffResult;
01041     CStr diffOptions;
01042     CStr keyword;
01043     CStr  diffTool;
01044
01045     if( diffType == kDiffGraph )
01046     {
01047         // determine initial revision settings
01048         if( mf->TotalNumFiles() > 0 )
01049         {
01050             const MultiFilesEntry& mfe = *mf->begin();
01051             CStr ignorePath, ignoreName, rev;
01052
01053             switch( mfe.NumFiles() )
01054             {
01055             case 2:
01056                 if( mfe.get(1, ignorePath, ignoreName, rev) )
01057                     rev2 = rev;
01058
01059                 // fall thru
01060             case 1:
01061                 if( mfe.get(0, ignorePath, ignoreName, rev) )
01062                     rev1 = rev;
01063
01064                 break;
01065             }
01066         }
01067     }
01068
01069     if( !CompatGetDiff(mf, diffType, noRecurs, isDate1, isDate2, rev1, rev2, useExtDiff, diffTool,
01070         unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase, keyword, diffOptions,
01071         mf->TotalNumFiles() > 0) )
01072     {
01073         return;
01074     }
01075
01076     MultiFiles::const_iterator mfi;
01077     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01078     {
01079         extDiffResult = false;
01080
01081         if( mfi->NumFiles() && useExtDiff )
01082         {
01083             CStr path, filename, ext, base, currRev;
01084             CStr file1, file2;
01085
01086             for(int i = 0; ; i++)
01087             {
01088                 if( !mfi->get(i, path, filename, currRev) )
01089                     break;
01090
01091                 if( 0 < i && kDiffGraph == diffType )
01092                 {
01093                     // Graph diff contains two files, but it's actually the same one
01094                     break;
01095                 }
01096
01097                 // note that filename can contain subfolders
01098
01099                 GetExtension(filename, base, ext);
01100
01101                 CvsArgs args;
01102                 CStr tmpf(base);
01103                 tmpf << '_';
01104
01105                 if( !rev1.empty() )
01106                     tmpf << rev1;
01107                 else
01108                     tmpf << currRev;
01109
01110                 tmpf << '_';
01111
01112                 // convert subfolder names to regular name
01113                 FlatenSubFolders(tmpf);
01114
01115                 args.add("update");
01116                 args.add("-p");
01117
01118                 if( !rev1.empty() )
01119                 {
01120                     args.add(isDate1 ? "-D" : "-r");
01121                     args.add(rev1);
01122                 }
01123                 else if( !currRev.empty() )
01124                 {
01125                     args.add("-r");
01126                     args.add(currRev);
01127                 }
01128
01129                 args.add(filename);
01130                 args.print(path);
01131                 file1 = launchCVS(path, args, (const char *)tmpf, ext);
01132
01133                 if( rev2.empty() )
01134                 {
01135                     file2 = path;
01136
01137                     if( !file2.endsWith(kPathDelimiter) )
01138                         file2 << kPathDelimiter;
01139
01140                     file2 << filename;
01141                 }
01142                 else
01143                 {
01144                     CvsArgs args2;
01145
01146                     tmpf = base;
01147                     tmpf << '_';
01148                     tmpf << rev2;
01149                     tmpf << '_';
01150
01151                     // convert subfolder names to regular name
01152                     FlatenSubFolders(tmpf);
01153
01154                     args2.add("update");
01155                     args2.add("-p");
01156                     args2.add(isDate2 ? "-D" : "-r");
01157                     args2.add(rev2);
01158                     args2.add(filename);
01159                     args2.print(path);
01160                     file2 = launchCVS(path, args2, (const char *)tmpf, ext);
01161                 }
01162
01163                 if( file1.empty() || file2.empty() )
01164                     continue;
01165
01166                 extDiffResult = LaunchDiff(file1, file2, diffTool, unifiedDiff, noWhiteSpace, noBlankLines, ignoreCase);
01167             }
01168         }
01169
01170         if( !mfi->NumFiles() || !useExtDiff || !extDiffResult )
01171         {
01172             CvsArgs args;
01173             args.add("diff");
01174
01175             if( noRecurs )
01176                 args.add("-l");
01177
01178             if( !rev1.empty() )
01179             {
01180                 args.add(isDate1 ? "-D" : "-r");
01181                 args.add(rev1);
01182             }
01183
01184             if( !rev2.empty() )
01185             {
01186                 args.add(isDate2 ? "-D" : "-r");
01187                 args.add(rev2);
01188             }
01189
01190             if( unifiedDiff )
01191                 args.add("-u");     // --unified, -u
01192
01193             if( noWhiteSpace )
01194                 args.add("-wb");    //--ignore-all-space --ignore-space-change
01195
01196             if( noBlankLines )
01197                 args.add("-B");     //--ignore-blank-lines
01198
01199             if( ignoreCase )
01200                 args.add("-i");     //--ignore-case
01201
01202             if( !keyword.empty() )
01203             {
01204                 args.add(keyword);
01205             }
01206
01207             if( !diffOptions.empty() )
01208             {
01209                 args.parse(diffOptions);
01210             }
01211
01212             const char* dir = mfi->add(args);
01213             args.print(dir);
01214             launchCVS(dir, args.Argc(), args.Argv());
01215         }
01216     }
01217 }
01218
01224 void CvsCmdAdd(KiSelectionHandler& handler, kAddCmdType addType /*= kAddNormal*/)
01225 {
01226     MultiFiles* mf = NULL;
01227     if( !CheckSelectionHandler(handler, mf) )
01228         return;
01229
01230     MultiFiles::const_iterator mfi;
01231     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01232     {
01233         if( mfi->NumFiles() > 0 )
01234         {
01235             // Files
01236             ControlCvsArgs* args = NULL;
01237             switch( addType )
01238             {
01239             default:
01240             case kAddNormal:
01241                 args = new AddCvsArgs;
01242                 break;
01243             case kAddBinary:
01244                 args = new AddBinCvsArgs;
01245                 break;
01246             case kAddUnicode:
01247                 args = new AddUnicodeCvsArgs;
01248                 break;
01249             }
01250
01251             if( !args )
01252             {
01253                 cvs_err("Unable to allocate memory for arguments list\n");
01254                 return;
01255             }
01256
01257             args->add("add");
01258
01259             if( addType == kAddBinary )
01260             {
01261                 args->add("-kb");
01262             }
01263             else if( addType == kAddUnicode )
01264             {
01265                 args->add("-ku");
01266             }
01267
01268             const char* dir = mfi->add(*args);
01269
01270             CvsAlert cvsAlert(kCvsAlertWarningIcon,
01271                 _i18n("Do you want to continue?"), _i18n("Some problems have been found while adding files and should be corrected. See the console window for details."),
01272                 BUTTONTITLE_CONTINUE, BUTTONTITLE_CANCEL);
01273
01274             if( !args->HasProblem() || cvsAlert.ShowAlert() == kCvsAlertOKButton )
01275             {
01276                 args->print(dir);
01277                 launchCVS(dir, args->Argc(), args->Argv());
01278             }
01279
01280             delete args;
01281         }
01282         else
01283         {
01284             // Directory
01285             const char* dir = mfi->getdir();
01286             CStr uppath, folder;
01287
01288             if( !SplitPath(dir, uppath, folder) )
01289             {
01290                 cvs_err(_i18n("Unable to convert path name '%s'\n"), dir);
01291                 return;
01292             }
01293
01294             CvsArgs args;
01295             args.add("add");
01296             args.add(folder);
01297
01298             args.print(uppath);
01299             launchCVS(uppath, args.Argc(), args.Argv());
01300         }
01301     }
01302 }
01303
01308 void CvsCmdRemove(KiSelectionHandler& handler)
01309 {
01310     MultiFiles* mf = NULL;
01311     if( !CheckSelectionHandler(handler, mf) )
01312         return;
01313
01314     MultiFiles::const_iterator mfi;
01315     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01316     {
01317         RemoveCvsArgs args;
01318
01319         CompatBeginMoveToTrash();
01320
01321         args.add("remove");
01322         const char* dir = mfi->add(args);
01323         args.print(dir);
01324
01325         CompatEndMoveToTrash();
01326
01327         launchCVS(dir, args.Argc(), args.Argv());
01328     }
01329 }
01330
01337 void CvsCmdLog(KiSelectionHandler& handler, bool outGraph, void* defWnd)
01338 {
01339     MultiFiles* mf = NULL;
01340     if( !CheckSelectionHandler(handler, mf) )
01341         return;
01342
01343     bool noRecurs;
01344     bool defBranch;
01345     CStr date;
01346     bool headerOnly;
01347     bool headerDesc;
01348     bool supress;
01349     bool noTags;
01350     bool onlyRCSfile;
01351     bool hasRev;
01352     CStr rev;
01353     CStr states;
01354     bool hasUser;
01355     CStr users;
01356
01357     if( !CompatGetLog(mf, noRecurs, defBranch, date,
01358         headerOnly, headerDesc, supress,
01359         noTags, onlyRCSfile, hasRev,
01360         rev, states, hasUser, users,
01361         outGraph) )
01362     {
01363         return;
01364     }
01365
01366     MultiFiles::const_iterator mfi;
01367     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01368     {
01369         CvsArgs args;
01370         args.add("log");
01371
01372         if( noRecurs )
01373             args.add("-l");
01374
01375         if( defBranch )
01376             args.add("-b");
01377
01378         if( headerDesc )
01379         {
01380             args.add("-t");
01381         }
01382         else
01383         {
01384             if( headerOnly )
01385                 args.add("-h");
01386         }
01387
01388         if( supress )
01389             args.add("-S");
01390
01391         if( noTags )
01392             args.add("-N");
01393
01394         if( onlyRCSfile )
01395             args.add("-R");
01396
01397         if( !date.empty() )
01398         {
01399             args.add("-d");
01400             args.add(date);
01401         }
01402
01403         if( !states.empty() )
01404         {
01405             args.add("-s");
01406             args.add(states);
01407         }
01408
01409         if( hasRev )
01410         {
01411             CStr tmp;
01412             tmp = "-r";
01413             tmp << rev;
01414             args.add(tmp);
01415         }
01416
01417         if( hasUser )
01418         {
01419             CStr tmp;
01420             tmp = "-w";
01421             tmp << users;
01422             args.add(tmp);
01423         }
01424
01425         const char* dir = mfi->add(args);
01426         args.print(dir);
01427         CvsLogParse(dir, args, outGraph, defWnd);
01428     }
01429 }
01430
01435 void CvsCmdStatus(KiSelectionHandler& handler)
01436 {
01437     MultiFiles* mf = NULL;
01438     if( !CheckSelectionHandler(handler, mf) )
01439         return;
01440
01441     bool noRecurs = false;
01442     STATUSOUTPUT_TYPE outputType = STATUSOUTPUT_VERBOSE;
01443
01444     if( !CompatGetStatus(mf, noRecurs, outputType) )
01445         return;
01446
01447     MultiFiles::const_iterator mfi;
01448     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01449     {
01450         CvsArgs args;
01451         args.add("status");
01452
01453         if( noRecurs )
01454             args.add("-l");
01455
01456         if( STATUSOUTPUT_VERBOSE == outputType )
01457         {
01458             args.add("-v");
01459         }
01460         else if( STATUSOUTPUT_QUICK == outputType )
01461         {
01462             args.add("-q");
01463         }
01464
01465         const char* dir = mfi->add(args);
01466         args.print(dir);
01467         launchCVS(dir, args.Argc(), args.Argv());
01468     }
01469 }
01470
01475 void CvsCmdLock(KiSelectionHandler& handler)
01476 {
01477     MultiFiles* mf = NULL;
01478     if( !CheckSelectionHandler(handler, mf) )
01479         return;
01480
01481     MultiFiles::const_iterator mfi;
01482     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01483     {
01484         CvsArgs args;
01485         args.add("admin");
01486         args.add("-l");
01487
01488         const char* dir = mfi->add(args);
01489         args.print(dir);
01490         launchCVS(dir, args.Argc(), args.Argv());
01491     }
01492 }
01493
01498 void CvsCmdUnlock(KiSelectionHandler& handler)
01499 {
01500     MultiFiles* mf = NULL;
01501     if( !CheckSelectionHandler(handler, mf) )
01502         return;
01503
01504     MultiFiles::const_iterator mfi;
01505     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01506     {
01507         CvsArgs args;
01508         args.add("admin");
01509         args.add("-u");
01510
01511         const char* dir = mfi->add(args);
01512         args.print(dir);
01513         launchCVS(dir, args.Argc(), args.Argv());
01514     }
01515 }
01516
01522 void CvsCmdTag(KiSelectionHandler& handler, const kTagCmdType tagType)
01523 {
01524     MultiFiles* mf = NULL;
01525     if( !CheckSelectionHandler(handler, mf) )
01526         return;
01527
01528     bool noRecurs;
01529     bool movDelBranch;
01530     bool overwriteExisting;
01531     bool checkUnmod;
01532     CStr tagName;
01533
01534     if( !CompatGetTag(mf, tagType, noRecurs, movDelBranch, overwriteExisting, tagName, checkUnmod) )
01535         return;
01536
01537     MultiFiles::const_iterator mfi;
01538     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01539     {
01540         CvsArgs args;
01541         args.add("tag");
01542
01543         switch( tagType )
01544         {
01545         case kTagCreate:
01546             // Nothing to do
01547             break;
01548         case kTagDelete:
01549             args.add("-d");
01550             break;
01551         case kTagBranch:
01552             args.add("-b");
01553             break;
01554         default:
01555             break;
01556         }
01557
01558         if( noRecurs )
01559             args.add("-l");
01560
01561         if( movDelBranch )
01562             args.add("-B");
01563
01564         if( tagType == kTagCreate || tagType == kTagBranch )
01565         {
01566             if( overwriteExisting )
01567                 args.add("-F");
01568
01569             if( checkUnmod )
01570                 args.add("-c");
01571         }
01572
01573         args.add(tagName);
01574
01575         const char* dir = mfi->add(args);
01576         args.print(dir);
01577         launchCVS(dir, args.Argc(), args.Argv());
01578     }
01579 }
01580
01586 void CvsCmdEdit(KiSelectionHandler& handler, kEditCmdType editType /*= kNormal*/)
01587 {
01588     MultiFiles* mf = NULL;
01589     if( !CheckSelectionHandler(handler, mf) )
01590         return;
01591
01592     MultiFiles::const_iterator mfi;
01593     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01594     {
01595         CvsArgs args;
01596         args.add("edit");
01597
01598         switch( editType )
01599         {
01600         default:
01601         case kEditNormal:
01602             // intentionally blank
01603             break;
01604         case kEditReserved:
01605             args.add("-c");
01606             break;
01607         case kEditForce:
01608             args.add("-f");
01609             break;
01610         }
01611
01612         const char* dir = mfi->add(args);
01613         args.print(dir);
01614         launchCVS(dir, args.Argc(), args.Argv());
01615     }
01616 }
01617
01622 void CvsCmdUnedit(KiSelectionHandler& handler)
01623 {
01624     MultiFiles* mf = NULL;
01625     if( !CheckSelectionHandler(handler, mf) )
01626         return;
01627
01628     MultiFiles::const_iterator mfi;
01629     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01630     {
01631         CvsArgs args;
01632         args.add("unedit");
01633
01634         const char* dir = mfi->add(args);
01635         args.print(dir);
01636         launchCVS(dir, args.Argc(), args.Argv());
01637     }
01638 }
01639
01644 void CvsCmdWatchOn(KiSelectionHandler& handler)
01645 {
01646     MultiFiles* mf = NULL;
01647     if( !CheckSelectionHandler(handler, mf) )
01648         return;
01649
01650     MultiFiles::const_iterator mfi;
01651     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01652     {
01653         CvsArgs args;
01654         args.add("watch");
01655         args.add("add");
01656
01657         const char* dir = mfi->add(args);
01658         args.print(dir);
01659         launchCVS(dir, args.Argc(), args.Argv());
01660     }
01661 }
01662
01667 void CvsCmdWatchOff(KiSelectionHandler& handler)
01668 {
01669     MultiFiles* mf = NULL;
01670     if( !CheckSelectionHandler(handler, mf) )
01671         return;
01672
01673     MultiFiles::const_iterator mfi;
01674     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01675     {
01676         CvsArgs args;
01677         args.add("watch");
01678         args.add("remove");
01679
01680         const char* dir = mfi->add(args);
01681         args.print(dir);
01682         launchCVS(dir, args.Argc(), args.Argv());
01683     }
01684 }
01685
01690 void CvsCmdRelease(KiSelectionHandler& handler)
01691 {
01692     MultiFiles* mf = NULL;
01693     if( !CheckSelectionHandler(handler, mf) )
01694         return;
01695
01696     CStr dir;
01697     if( !mf->getdir(0, dir) )
01698     {
01699         return;
01700     }
01701
01702     CStr uppath, folder;
01703     if( !SplitPath(dir, uppath, folder) )
01704     {
01705         cvs_err(_i18n("Unable to convert path name '%s'\n"), dir.c_str());
01706
01707         // Even thought something didn't work we will try to continue and put all the responsibility onto the user
01708         uppath = dir;
01709         folder = ".";
01710     }
01711
01712     kReleaseDelType removeDirectoryOption = kReleaseNoDel;
01713
01714     if( !CompatGetRelease(mf, dir, removeDirectoryOption) )
01715     {
01716         return;
01717     }
01718
01719     CvsArgs args;
01720     args.add("release");
01721
01722     switch( removeDirectoryOption )
01723     {
01724     default:
01725     case kReleaseNoDel:
01726         break;
01727     case kReleaseDelDir:
01728         args.add("-d");
01729         break;
01730     case kReleaseDelAll:
01731         args.add("-d");
01732         args.add("-f");
01733         break;
01734     case kReleaseDelCvsInfo:
01735         args.add("-e");
01736         break;
01737     }
01738
01739     args.add(folder);
01740
01741     args.print(uppath);
01742     launchCVS(uppath, args.Argc(), args.Argv());
01743 }
01744
01749 void CvsCmdWatchers(KiSelectionHandler& handler)
01750 {
01751     MultiFiles* mf = NULL;
01752     if( !CheckSelectionHandler(handler, mf) )
01753         return;
01754
01755     MultiFiles::const_iterator mfi;
01756     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01757     {
01758         CvsArgs args;
01759         args.add("watchers");
01760
01761         const char* dir = mfi->add(args);
01762         args.print(dir);
01763         launchCVS(dir, args.Argc(), args.Argv());
01764     }
01765 }
01766
01771 void CvsCmdEditors(KiSelectionHandler& handler)
01772 {
01773     MultiFiles* mf = NULL;
01774     if( !CheckSelectionHandler(handler, mf) )
01775         return;
01776
01777     MultiFiles::const_iterator mfi;
01778     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01779     {
01780         CvsArgs args;
01781         args.add("editors");
01782
01783         const char* dir = mfi->add(args);
01784         args.print(dir);
01785         launchCVS(dir, args.Argc(), args.Argv());
01786     }
01787 }
01788
01794 void CvsCmdAnnotate(KiSelectionHandler& handler, kAnnotateCmdType annotateType)
01795 {
01796     MultiFiles* mf = NULL;
01797     if( !CheckSelectionHandler(handler, mf) )
01798         return;
01799
01800     bool noRecurs;
01801     bool isDate;
01802     CPStr rev;
01803     bool force;
01804
01805     if( annotateType == kAnnotateGraph )
01806     {
01807         if( mf->TotalNumFiles() == 1 )
01808         {
01809             const MultiFilesEntry& mfe = *mf->begin();
01810
01811             if( mfe.NumFiles() == 1 )
01812             {
01813               CStr ignorePath, ignoreName, revision;
01814
01815               if( mfe.get(0, ignorePath, ignoreName, revision) )
01816                   rev = revision;
01817             }
01818         }
01819     }
01820
01821     if( !CompatGetAnnotate(mf, annotateType, noRecurs, isDate, rev, force) )
01822         return;
01823
01824     MultiFiles::const_iterator mfi;
01825     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01826     {
01827         CStr path, filename, ext, base, currRev;
01828         CStr file;
01829
01830         for(int i = 0; ; i++)
01831         {
01832             if( !mfi->get(i, path, filename, currRev) )
01833                 break;
01834
01835             // note that filename can contain subfolders
01836
01837             GetExtension(filename, base, ext);
01838
01839             CvsArgs args;
01840             CStr tmpf(base);
01841
01842             if( !rev.empty() )
01843             {
01844                 tmpf << "_ann_";
01845                 tmpf << rev;
01846                 tmpf << '_';
01847             }
01848             else
01849                 tmpf << "_ann_";
01850
01851             // convert subfolder names to regular name
01852             FlatenSubFolders(tmpf);
01853
01854             args.add("annotate");
01855
01856             if( noRecurs )
01857             {
01858                 args.add("-l");
01859             }
01860
01861             if( force )
01862             {
01863                 args.add("-f");
01864             }
01865
01866             if( !rev.empty() )
01867             {
01868                 args.add(isDate ? "-D" : "-r");
01869                 args.add(rev);
01870             }
01871
01872             args.add(filename);
01873             args.print(path);
01874             file = launchCVS(path, args, (const char *)tmpf, ext);
01875
01876             if( file.empty() )
01877                 continue;
01878
01879             LaunchDefaultEditor(file);
01880         }
01881     }
01882 }
01883
01888 void CvsCmdMoveToTrash(KiSelectionHandler& handler)
01889 {
01890     MultiFiles* mf = NULL;
01891     if( !CheckSelectionHandler(handler, mf) )
01892         return;
01893
01894     const char* primaryMsg = NULL;
01895     const char* secondaryMsg = NULL;
01896     kCvsAlertButtonType defaultButton = kCvsAlertCancelButton;
01897
01898 #if defined (TARGET_OS_MAC)
01899     primaryMsg = _i18n("Are you sure you want to move the selected files to the trash?");
01900     secondaryMsg = _i18n("The files will be moved into the trash just as if you deleted them from the Finder.");
01901     defaultButton = kCvsAlertOKButton;
01902 #elif defined (WIN32)
01903     primaryMsg = _i18n("Are you sure you want to move the selected files to the recycle bin?");
01904 #else
01905     primaryMsg = _i18n("Are you sure you want to remove the selected files?");
01906 #endif
01907
01908     CvsAlert cvsAlert(kCvsAlertQuestionIcon,
01909         primaryMsg, secondaryMsg);
01910
01911     if( cvsAlert.ShowAlert(defaultButton) != kCvsAlertOKButton )
01912     {
01913         return;
01914     }
01915
01916     CompatBeginMoveToTrash();
01917
01918     MultiFiles::const_iterator mfi;
01919     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01920     {
01921         int count = mfi->NumFiles();
01922         for(int i = 0; i < count; i++)
01923         {
01924             CStr path, fileName, currRev;
01925             if( mfi->get(i, path, fileName, currRev) )
01926             {
01927                 UStr fn(path);
01928                 if( !fn.endsWith(kPathDelimiter) )
01929                     fn << kPathDelimiter;
01930
01931                 fn << fileName;
01932
01933                 if( !CompatMoveToTrash(fn) )
01934                 {
01935                     UStr errText;
01936
01937                     // HINT for translate: "Unable to remove '<FILE>' (error <ERROR>)\n"
01938                     errText << _i18n("Unable to remove '") << fn << _i18n("' (error ") << errno << ")\n";
01939
01940                     cvs_err( errText.c_str() );
01941                 }
01942                 else
01943                 {
01944                     UStr errText;
01945 #if defined (TARGET_OS_MAC)
01946                     errText << "'" << fn << _i18n("' has been moved successfully to the trash ...\n");
01947 #elif defined (WIN32)
01948                     errText << "'" << fn << _i18n("' has been moved successfully to the recycle bin ...\n");
01949 #else
01950                     errText << "'" << fn << _i18n("' has been removed successfully ...\n");
01951 #endif
01952                     cvs_out( errText.c_str() );
01953                 }
01954             }
01955         }
01956     }
01957
01958     CompatEndMoveToTrash();
01959 }
01960
01965 void CvsCmdFileAction(KiSelectionHandler& handler)
01966 {
01967     MultiFiles* mf = NULL;
01968     if( !CheckSelectionHandler(handler, mf) )
01969         return;
01970
01971     bool noRecurs = false;
01972     kLaunchType launchType = kLaunchEdit;
01973
01974     if( !CompatGetFileAction(mf, launchType) )
01975         return;
01976
01977     MultiFiles::const_iterator mfi;
01978     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
01979     {
01980         for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
01981         {
01982             UStr path;
01983             UStr fileName;
01984             UStr currRev;
01985
01986             mfi->get(nIndex, path, fileName, currRev);
01987             if( !path.empty() && !path.endsWith(kPathDelimiter) )
01988                 path << kPathDelimiter;
01989
01990             path << fileName;
01991
01992             LaunchHandler(launchType, path);
01993         }
01994     }
01995 }
01996
02002 void CvsCmdLaunch(KiSelectionHandler& handler, const kLaunchType launchType)
02003 {
02004     MultiFiles* mf = NULL;
02005     if( !CheckSelectionHandler(handler, mf) )
02006         return;
02007
02008     MultiFiles::const_iterator mfi;
02009     for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
02010     {
02011         for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
02012         {
02013             UStr path;
02014             UStr fileName;
02015             UStr currRev;
02016
02017             mfi->get(nIndex, path, fileName, currRev);
02018             if( !path.empty() && !path.endsWith(kPathDelimiter) )
02019                 path << kPathDelimiter;
02020
02021             path << fileName;
02022
02023             LaunchHandler(launchType, path);
02024         }
02025     }
02026 }
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uconfig.h Source File

rf/uconfig.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #ifndef UCONFIG_H
00022 #define UCONFIG_H
00023
00024 #if defined(_MSC_VER) || defined(__MWERKS__)
00025 #   define UEXPORT __declspec(dllexport)
00026 #else
00027 #   define UEXPORT
00028 #endif
00029
00030 #endif /* UCONFIG_H */
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CJX_COLORMAP Member List

This is the complete list of members for CJX_COLORMAP, including all inherited members.

iSysColorTo | CJX_COLORMAP
rgbqFrom | CJX_COLORMAP

Generated on Sat Aug 7 22:53:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatHeaderCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJFlatHeaderCtrl.cpp

Go to the documentation of this file.
00001 // CJFlatHeaderCtrl.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJFlatHeaderCtrl.cpp $
00011  *
00012  * $History: CJFlatHeaderCtrl.cpp $
00013  *
00014  * *****************  Version 21  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:01p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Further Updates to OnEraseBkgnd(...) and OnPaint() for flicker free
00018  * drawing.
00019  *
00020  * *****************  Version 20  *****************
00021  * User: Kirk Stowell Date: 10/30/99   Time: 2:11p
00022  * Updated in $/CodeJock/CJLibrary
00023  * Overrode OnPaint(...) for flicker free drawing and fixed bug where
00024  * column is resized and border leaves a trail.
00025  *
00026  * *****************  Version 19  *****************
00027  * User: Kirk Stowell Date: 10/24/99   Time: 7:34p
00028  * Updated in $/CodeJock/CJLibrary
00029  * 1. Fixed bug with flat header control where header items were not drawn
00030  * correctly whenever header items were dragged to a new location. Ioannhs
00031  * Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr]
00032  *
00033  * *****************  Version 18  *****************
00034  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00035  * Updated in $/CodeJock/CJLibrary
00036  * Fixed potential resource and memory leak problems.
00037  *
00038  * *****************  Version 17  *****************
00039  * User: Kirk Stowell Date: 10/14/99   Time: 8:23p
00040  * Updated in $/CodeJock/CJLibrary
00041  * Fixed size bug with header control where the end does not display
00042  * correctly.
00043  *
00044  * *****************  Version 16  *****************
00045  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00046  * Updated in $/CodeJockey/CJLibrary
00047  * Updated copyright and contact information.
00048  *
00049  * *****************  Version 15  *****************
00050  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00051  * Updated in $/CodeJockey/CJLibrary
00052  * Added Unicode compliance, thanks to Barry Burton for his help with
00053  * this.
00054  *
00055  *
00056  * *****************  Version 14  *****************
00057  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00058  * Updated in $/CodeJockey/CJLibrary
00059  *
00060  * *****************  Version 13  *****************
00061  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00062  * Updated in $/CodeJockey/CJLibrary
00063  *
00064  * *****************  Version 12  *****************
00065  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00066  * Updated in $/CodeJockey/CJLibrary
00067  *
00068  * *****************  Version 11  *****************
00069  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00070  * Updated in $/CodeJockey/CJLibrary
00071  *
00072  * *****************  Version 10  *****************
00073  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00074  * Updated in $/CodeJockey/CJLibrary
00075  *
00076  * *****************  Version 9  *****************
00077  * User: Kirk Stowell Date: 7/18/99    Time: 10:27p
00078  * Updated in $/CodeJockey/CJLibrary
00079  * Added vc5 compatibility.
00080  *
00081  * *****************  Version 8  *****************
00082  * User: Kirk Stowell Date: 6/14/99    Time: 10:43p
00083  * Updated in $/CodeJockey/CJ60Lib
00084  * Cleaned up code to eliminate level 4 compilier warnings.
00085  *
00086  * *****************  Version 7  *****************
00087  * User: Kirk Stowell Date: 5/17/99    Time: 8:00p
00088  * Updated in $/CodeJockey/CJ60Lib
00089  * Added popup menu support and vc5 compatibility.
00090  *
00091  * *****************  Version 6  *****************
00092  * User: Kirk Stowell Date: 5/12/99    Time: 5:32a
00093  * Updated in $/CodeJockey/CJ60Lib
00094  * Added support for vc5 compatibility
00095  *
00096  * *****************  Version 5  *****************
00097  * User: Kirk Stowell Date: 4/15/99    Time: 4:27p
00098  * Updated in $/CodeJockey/CJ60Lib
00099  * Igor Ostriz [iostriz@usa.net] - fixed bug with drag/drop and changing
00100  * column order.
00101  *
00102  * *****************  Version 4  *****************
00103  * User: Kirk Stowell Date: 4/03/99    Time: 4:26p
00104  * Updated in $/CodeJockey/CJ60Lib
00105  * Added comments and cleaned up code.
00106  *
00107  * *****************  Version 3  *****************
00108  * User: Kirk Stowell Date: 2/24/99    Time: 4:26p
00109  * Updated in $/CodeJockey/CJ60Lib
00110  * Fixed repainting problem when header is moved or window is resized. The
00111  * class now uses log font instead of hard coded Tahoma font.
00112  *
00113  * *****************  Version 2  *****************
00114  * User: Kirk Stowell Date: 1/31/99    Time: 4:27p
00115  * Updated in $/CodeJockey/CJ60Lib
00116  * Fixed problem with sort arrow drawn. If hditem has an associated
00117  * bitmap, the arrow is not drawn.
00118  *
00119  * *****************  Version 1  *****************
00120  * User: Kirk Stowell Date: 1/16/99    Time: 4:26p
00121  * Created in $/CodeJockey/CJ60Lib
00122  * Initial release.
00123  *
00124  ***************************************************************************/
00126
00127 #include "stdafx.h"
00128 #include "CJFlatHeaderCtrl.h"
00129
00130 #ifdef _DEBUG
00131 #define new DEBUG_NEW
00132 #undef THIS_FILE
00133 static char THIS_FILE[] = __FILE__;
00134 #endif
00135
00137 // CCJFlatHeaderCtrl
00138
00139 CCJFlatHeaderCtrl::CCJFlatHeaderCtrl()
00140 {
00141     m_nSortCol      = -1;
00142     m_bBoldFont     = FALSE;
00143     m_nOffset       = 6;
00144     m_bLBtnDown     = FALSE;
00145     m_popupMenuID   = 0;
00146     m_popToolbarID  = 0;
00147     m_nPos          = 0;
00148     m_pParentWnd    = NULL;
00149 }
00150
00151 CCJFlatHeaderCtrl::~CCJFlatHeaderCtrl()
00152 {
00153     // fix potential resource leak - KStowell - 10-22-99.
00154     m_Font.DeleteObject();
00155 }
00156
00157 BEGIN_MESSAGE_MAP(CCJFlatHeaderCtrl, CHeaderCtrl)
00158     //{{AFX_MSG_MAP(CCJFlatHeaderCtrl)
00159     ON_WM_PAINT()
00160     ON_WM_RBUTTONDOWN()
00161     ON_WM_MEASUREITEM()
00162     ON_WM_MENUCHAR()
00163     ON_WM_INITMENUPOPUP()
00164     ON_WM_CREATE()
00165     ON_WM_WINDOWPOSCHANGED()
00166     ON_WM_ERASEBKGND()
00167     //}}AFX_MSG_MAP
00168 END_MESSAGE_MAP()
00169
00171 // CCJFlatHeaderCtrl message handlers
00172
00173 void CCJFlatHeaderCtrl::InitializeHeader(bool bBoldFont)
00174 {
00175     m_Font.DeleteObject();
00176     NONCLIENTMETRICS ncm;
00177     ncm.cbSize = sizeof(ncm);
00178     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00179     if(bBoldFont)
00180         ncm.lfMessageFont.lfWeight = 700;
00181     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00182     SetFont(&m_Font);
00183
00184     m_bBoldFont = bBoldFont;
00185 }
00186
00187 int CCJFlatHeaderCtrl::SetSortImage(int nCol, BOOL bAsc)
00188 {
00189     int nPrevCol = m_nSortCol;
00190
00191     m_nSortCol = nCol;
00192     m_bSortAsc = bAsc;
00193
00194     // Change the item to ownder drawn
00195     HD_ITEM hditem;
00196
00197     hditem.mask = HDI_BITMAP | HDI_FORMAT;
00198     GetItem( nCol, &hditem );
00199     if (hditem.hbm == NULL)
00200     {
00201         hditem.fmt |= HDF_OWNERDRAW;
00202         SetItem( nCol, &hditem );
00203
00204         // Invalidate header control so that it gets redrawn
00205         Invalidate();
00206     }
00207
00208     return nPrevCol;
00209 }
00210
00211 void CCJFlatHeaderCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00212 {
00213     ASSERT(lpDrawItemStruct != NULL);
00214
00215     // define some temporary variables.
00216     CDC*    pDC         = CDC::FromHandle( lpDrawItemStruct->hDC );
00217     CRect   rcItem      = lpDrawItemStruct->rcItem;
00218     CRect   rcIcon      = lpDrawItemStruct->rcItem;
00219     int     nState      = lpDrawItemStruct->itemState;
00220     int     nItemID     = lpDrawItemStruct->itemID;
00221     int     nSavedDC    = pDC->SaveDC();
00222
00223     // Paint the background.
00224     pDC->FillSolidRect(rcItem, afxData.clrBtnFace);
00225     pDC->SetBkMode(TRANSPARENT);
00226
00227     // Set clipping region to limit drawing within column
00228     CRgn rgn;
00229     rgn.CreateRectRgnIndirect( &rcItem );
00230     pDC->SelectObject( &rgn );
00231     rgn.DeleteObject();
00232
00233     // Get the column text and format
00234     TCHAR buf[256];
00235     HD_ITEM hditem;
00236
00237     hditem.mask = HDI_TEXT | HDI_FORMAT;
00238     hditem.pszText = buf;
00239     hditem.cchTextMax = 255;
00240
00241     GetItem( nItemID, &hditem );
00242
00243     // Determine format for drawing column label
00244     UINT uFormat = DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP
00245         | DT_VCENTER | DT_END_ELLIPSIS ;
00246
00247     if( hditem.fmt & HDF_CENTER) {
00248         uFormat |= DT_CENTER;
00249     } else if( hditem.fmt & HDF_RIGHT) {
00250         uFormat |= DT_RIGHT;
00251     } else {
00252         uFormat |= DT_LEFT;
00253     }
00254
00255     // Adjust the rect if the mouse button is pressed on it
00256     if( nState == ODS_SELECTED ) {
00257         rcItem.left++;
00258         rcItem.top += 2;
00259         rcItem.right++;
00260     }
00261
00262     // Adjust the rect further if Sort arrow is to be displayed
00263     if( nItemID == m_nSortCol ) {
00264         rcItem.right -= 3 * m_nOffset;
00265     }
00266
00267     rcItem.left += m_nOffset;
00268     rcItem.right -= m_nOffset;
00269
00270     // Draw column label
00271     if( rcItem.left < rcItem.right ) {
00272         if (m_bBoldFont) {
00273             CFont* pOldFont = pDC->SelectObject(&m_Font);
00274             pDC->DrawText(buf,-1,rcItem, uFormat);
00275             pDC->SelectObject(pOldFont);
00276         } else {
00277             pDC->DrawText(buf,-1,rcItem, uFormat);
00278         }
00279     }
00280
00281     // Draw the Sort arrow
00282     if( nItemID == m_nSortCol )
00283     {
00284         // Set up pens to use for drawing the triangle
00285         CPen penLite(PS_SOLID, 1, afxData.clrBtnHilite);
00286         CPen penShad(PS_SOLID, 1, afxData.clrBtnShadow);
00287         CPen *pOldPen = pDC->SelectObject( &penLite );
00288
00289         if( m_bSortAsc )
00290         {
00291             // Draw triangle pointing upwards
00292             pDC->MoveTo( rcIcon.right - 2*m_nOffset, m_nOffset-1);
00293             pDC->LineTo( rcIcon.right - 3*m_nOffset/2, rcIcon.bottom - m_nOffset );
00294             pDC->LineTo( rcIcon.right - 5*m_nOffset/2-2, rcIcon.bottom - m_nOffset );
00295             pDC->MoveTo( rcIcon.right - 5*m_nOffset/2-1, rcIcon.bottom - m_nOffset-1 );
00296
00297             pDC->SelectObject( &penShad );
00298             pDC->LineTo( rcIcon.right - 2*m_nOffset, m_nOffset-2);
00299         }
00300         else
00301         {
00302             // Draw triangle pointing downwords
00303             pDC->MoveTo( rcIcon.right - 3*m_nOffset/2, m_nOffset-1);
00304             pDC->LineTo( rcIcon.right - 2*m_nOffset-1, rcIcon.bottom - m_nOffset + 1 );
00305             pDC->MoveTo( rcIcon.right - 2*m_nOffset-1, rcIcon.bottom - m_nOffset );
00306
00307             pDC->SelectObject( &penShad );
00308             pDC->LineTo( rcIcon.right - 5*m_nOffset/2-1, m_nOffset -1 );
00309             pDC->LineTo( rcIcon.right - 3*m_nOffset/2, m_nOffset -1);
00310         }
00311
00312         // Restore the pen
00313         pDC->SelectObject( pOldPen );
00314
00315         // fix potential resource leak - KStowell - 10-21-99
00316         penLite.DeleteObject();
00317         penShad.DeleteObject();
00318     }
00319
00320     // restore the device context
00321     pDC->RestoreDC(nSavedDC);
00322 }
00323
00324 void CCJFlatHeaderCtrl::OnPaint()
00325 {
00326     CPaintDC dc(this); // device context for painting
00327
00328     // KStowell - Get the client rect.
00329     CRect rcClient;
00330     GetClientRect( &rcClient );
00331
00332     // KStowell - Create a memory device-context. This is done to help reduce
00333     // screen flicker, since we will paint the entire control to the
00334     // off screen device context first.
00335     CDC memDC;
00336     CBitmap bitmap;
00337     memDC.CreateCompatibleDC(&dc);
00338     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00339     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00340     memDC.FillSolidRect(rcClient, afxData.clrBtnFace);
00341
00342     // First let the control do its default drawing.
00343     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00344
00345     // KStowell - Repaint the background.
00346     DrawFlatBorder(&memDC);
00347
00348     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00349     dc.BitBlt( rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC,
00350         rcClient.left, rcClient.top, SRCCOPY );
00351
00352     // KStowell - Cleanup resources.
00353     memDC.SelectObject(pOldBitmap);
00354     memDC.DeleteDC();
00355     bitmap.DeleteObject();
00356 }
00357
00358 void CCJFlatHeaderCtrl::DrawFlatBorder(CDC* pDC)
00359 {
00360     CRect rci;
00361     GetWindowRect(&rci);
00362     ScreenToClient(&rci);
00363
00364     // Cover up thick 3D border.
00365     pDC->Draw3dRect(rci, afxData.clrBtnFace, afxData.clrBtnFace);
00366     rci.DeflateRect(1,1);
00367     pDC->Draw3dRect(rci, afxData.clrBtnFace, afxData.clrBtnFace);
00368
00369     // Draw flat style border around entire header.
00370     rci.InflateRect(1,1);
00371     pDC->Draw3dRect(rci, afxData.clrBtnHilite, afxData.clrBtnShadow);
00372
00373     // Create the pens for further cover-up.
00374     CPen penLite(PS_SOLID, 1, afxData.clrBtnHilite);
00375     CPen penShad(PS_SOLID, 1, afxData.clrBtnShadow);
00376     CPen penFace(PS_SOLID, 1, afxData.clrBtnFace);
00377     CPen *pOldPen = pDC->SelectObject( &penLite );
00378
00379     // Set up the header item struct.
00380     HD_ITEM hdi;
00381     memset (&hdi, 0, sizeof(HD_ITEM));
00382     hdi.fmt  = HDF_STRING | HDF_LEFT | HDF_OWNERDRAW;
00383     hdi.mask = HDI_WIDTH | HDI_TEXT | HDI_FORMAT | HDI_ORDER; // Yiannhs :1999-10-19
00384     int cx = 0;
00385
00386     long j = GetItemCount();    //Yiannhs
00387     long i = 0;                 //Yiannhs
00388
00389     long * ItemOrders = new long[j];    //Yiannhs :1999-10-19
00390     for( i=0; i<j; i++ ) {              //Yiannhs :1999-10-19
00391         GetItem(i, &hdi);               //Yiannhs :1999-10-19
00392         ItemOrders[hdi.iOrder] = i;     //Yiannhs :1999-10-19
00393     }
00394
00395     hdi.fmt  = HDF_STRING | HDF_LEFT | HDF_OWNERDRAW;   //Yiannhs :1999-10-19
00396     hdi.mask = HDI_WIDTH | HDI_TEXT | HDI_FORMAT;       //Yiannhs :1999-10-19
00397
00398     // For each header item found, do further cover up.
00399     for (i = 0; i < j; ++i)
00400     {
00401         GetItem( ItemOrders[i], &hdi);
00402         cx += hdi.cxy;
00403
00404         pDC->SelectObject(&penShad);
00405         pDC->MoveTo(cx, 2);
00406         pDC->LineTo(cx, rci.bottom-2);
00407
00408         pDC->SelectObject(&penLite);
00409         pDC->MoveTo(cx+1, 2);
00410         pDC->LineTo(cx+1, rci.bottom-2);
00411
00412         pDC->SelectObject(&penFace);
00413         pDC->MoveTo(cx-1, 2);
00414         pDC->LineTo(cx-1, rci.bottom-2);
00415
00416         pDC->SelectObject(&penFace);
00417         pDC->MoveTo(cx-2, 2);
00418         pDC->LineTo(cx-2, rci.bottom-2);
00419     }
00420
00421     delete [] ItemOrders; //Yiannhs :1999-10-19
00422
00423     // Restore the pen and release device context.
00424     pDC->SelectObject( pOldPen );
00425
00426     // fix potential resource leak - KStowell - 10-21-99
00427     penLite.DeleteObject();
00428     penShad.DeleteObject();
00429     penFace.DeleteObject();
00430 }
00431
00432 void CCJFlatHeaderCtrl::OnRButtonDown(UINT /*nFlags*/, CPoint point)
00433 {
00434     // No menu was defined...
00435     if (!m_popupMenuID) {
00436         TRACE0( "Warning: No menu resource was associated with CCJTabCtrl.\n" );
00437         return;
00438     }
00439
00440     // Since we are using the main window as the
00441     // parent, we need to convert the point to screen
00442     // coordinates...
00443     CPoint pt = point;
00444     ClientToScreen(&pt);
00445
00446     // Load the popup menu.
00447     VERIFY(m_popupMenu.LoadMenu(m_popupMenuID));
00448     CCJMenu* pPopup = (CCJMenu*)m_popupMenu.GetSubMenu(m_nPos);
00449     ASSERT(pPopup != NULL);
00450
00451     // Load toolbar resource if any for menu icons.
00452     if (m_popToolbarID) {
00453         pPopup->LoadToolbar(m_popToolbarID);
00454     }
00455
00456     // Display the popup menu, use the main window as its parent.
00457     pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
00458         pt.x, pt.y, AfxGetMainWnd());
00459
00460     m_popupMenu.DestroyMenu();
00461 }
00462
00463 void CCJFlatHeaderCtrl::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
00464 {
00465     if (lpMeasureItemStruct->CtlType == ODT_MENU)
00466     {
00467         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
00468             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
00469
00470             if (m_popupMenu.IsMenu(pMenu)) {
00471                 m_popupMenu.MeasureItem(lpMeasureItemStruct);
00472                 return;
00473             }
00474         }
00475     }
00476
00477     CHeaderCtrl::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
00478 }
00479
00480 LRESULT CCJFlatHeaderCtrl::OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu)
00481 {
00482     if (m_popupMenu.IsMenu(pMenu)) {
00483         return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
00484     }
00485
00486     return CHeaderCtrl::OnMenuChar(nChar, nFlags, pMenu);
00487 }
00488
00489 void CCJFlatHeaderCtrl::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
00490 {
00491     CHeaderCtrl::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
00492
00493     if(!bSysMenu) {
00494         if (m_popupMenu.IsMenu(pPopupMenu)) {
00495             CCJMenu::UpdateMenu(pPopupMenu);
00496         }
00497     }
00498 }
00499
00500 #ifdef _VC_VERSION_5
00501 BOOL CCJFlatHeaderCtrl::GetOrderArray(LPINT piArray, int iCount /* = -1 */)
00502 {
00503     ASSERT(::IsWindow(m_hWnd));
00504
00505     // if -1 was passed, find the count ourselves
00506
00507     int nCount = iCount;
00508     if (nCount == -1)
00509     {
00510         nCount = GetItemCount();
00511
00512         if (nCount == -1)
00513             return FALSE;
00514     }
00515
00516     ASSERT(AfxIsValidAddress(piArray, iCount * sizeof(int)));
00517
00518     return (BOOL) ::SendMessage(m_hWnd, HDM_GETORDERARRAY,
00519         (WPARAM) iCount, (LPARAM) piArray);
00520 }
00521 #endif // _VC_VERSION_5
00522
00523 void CCJFlatHeaderCtrl::PreSubclassWindow()
00524 {
00525     CHeaderCtrl::PreSubclassWindow();
00526
00527     m_pParentWnd = GetParent();
00528     ASSERT(m_pParentWnd);
00529
00530     ResizeWindow();
00531 }
00532
00533 int CCJFlatHeaderCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
00534 {
00535     if (CHeaderCtrl::OnCreate(lpCreateStruct) == -1)
00536         return -1;
00537
00538     m_pParentWnd = CWnd::FromHandle(lpCreateStruct->hwndParent);
00539     ASSERT(m_pParentWnd);
00540
00541     ResizeWindow();
00542     return 0;
00543 }
00544
00545 void CCJFlatHeaderCtrl::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
00546 {
00547     CHeaderCtrl::OnWindowPosChanged(lpwndpos);
00548     ResizeWindow();
00549 }
00550
00551 void CCJFlatHeaderCtrl::ResizeWindow()
00552 {
00553     ASSERT_VALID(this);
00554     ASSERT_VALID(m_pParentWnd);
00555
00556     // Get the client size of the parent window, this will give us the
00557     // actual width of the header we are looking for.
00558     CRect rcParent;
00559     m_pParentWnd->GetClientRect(&rcParent);
00560
00561     // Get the size of the header control, we will need this for the
00562     // height of the header.
00563     CRect rcWnd;
00564     GetWindowRect(&rcWnd);
00565
00566     // Now, resize the window.
00567     SetWindowPos(NULL, 0, 0, rcParent.Width(), rcWnd.Height(),
00568         SWP_NOMOVE|SWP_FRAMECHANGED);
00569 }
00570
00571 BOOL CCJFlatHeaderCtrl::OnEraseBkgnd(CDC* pDC)
00572 {
00573     // KStowell - overridden for flicker-free drawing.
00574     UNUSED_ALWAYS(pDC);
00575     return TRUE;
00576 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoStatusHandler Member List

This is the complete list of members for KoStatusHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoStatusHandler() | KoStatusHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoStatusHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoStatusHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TKeyString< delimiter > Member List

This is the complete list of members for TKeyString< delimiter >, including all inherited members.

_GetBaseClass() | CMString | [protected, static]
begin() const | TMString< UStr > | [inline]
classCMString | CMString | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | CMString |
Compare(const char *s1, const char *s2) const | TKeyString< delimiter > | [protected, virtual]
Concatenate(UStr &res, const char *key, const char *value) const | TKeyString< delimiter > | [virtual]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
end() const | TMString< UStr > | [inline]
Find(const char *instr) const | TMString< UStr > |
CPersistent::Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | TMString< UStr > | [protected, virtual]
GetDelimiter() const | TKeyString< delimiter > |
GetList(void) const | TMString< UStr > | [inline]
GetRuntimeClass() const | CMString | [virtual]
GetTimeStamp() const | CPersistent | [inline]
Insert(const char *str) | TMString< UStr > |
IsKindOf(const URuntimeClass *pClass) const | UObject |
list_t typedef | TMString< UStr > |
LoadAll(const char *only=0L) | CPersistent | [static]
m_allStrs | TMString< UStr > | [protected]
m_buffer | TMString< UStr > | [mutable, protected]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_maxStr | TMString< UStr > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
Remove(const char *str) | TMString< UStr > |
RemoveAll() | TMString< UStr > |
ResetTimeStamp() | CPersistent | [inline]
rtCMString(void) | CMString | [static]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | TMString< UStr > | [protected, virtual]
SizeOf(void) const | TMString< UStr > | [protected, virtual]
Split(const char *str, UStr &key, UStr &value) const | TKeyString< delimiter > | [virtual]
TKeyString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TKeyString< delimiter > |
TMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TMString< UStr > |
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CMString() | CMString | [virtual]
~CPersistent() | CPersistent | [virtual]
~TKeyString() | TKeyString< delimiter > | [virtual]
~TMString() | TMString< UStr > | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:57:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJResource.h Source File

WinCvs/CJLib/Include/CJResource.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by CJResource.rc
00004 //
00005 #define IDR_POPUP_HEX_EDIT              103
00006 #define IDS_HIDE                        5000
00007 #define IDC_NODRAGGING                  5001
00008 #define IDS_NAME                        5001
00009 #define IDS_EXPAND                      5002
00010 #define IDC_DRAGGING                    5003
00011 #define IDS_SIZE                        5003
00012 #define IDS_CONTRACT                    5004
00013 #define IDC_HANDCUR                     5005
00014 #define IDS_TYPE                        5005
00015 #define IDB_BUTTON_IMAGES               5006
00016 #define IDS_MODIFIED                    5006
00017 #define IDC_TAB_CONTROL                 5007
00018 #define IDS_REGKEY                      5007
00019 #define IDR_CBAR_POPUP                  5008
00020 #define IDS_INVALID_VER                 5008
00021 #define IDC_URL_CODEJOCKEY              5009
00022 #define IDS_WIN_PLACEMENT               5009
00023 #define IDB_BTN_EXPLORER                5010
00024 #define IDS_COLOR_AUTO                  5010
00025 #define IDM_CBAR_MENU                   5011
00026 #define IDS_COLOR_CUST                  5011
00027 #define IDC_BUTTON_HIDE                 5012
00028 #define IDS_SECTION                     5012
00029 #define IDC_BUTTON_MINI                 5013
00030 #define IDS_ENTRY                       5013
00031 #define IDC_BAR_BUTTON                  5014
00032 #define IDS_REMOVEITEM                  5014
00033 #define IDC_BAR_CAPTION                 5015
00034 #define IDS_RENAMEITEM                  5015
00035 #define IDB_BTN_ARROW                   5016
00036 #define ID_GFX_LARGEICON                5017
00037 #define ID_GFX_SMALLICON                5018
00038 #define ID_GFX_REMOVEITEM               5019
00039 #define IDC_VSPLITBAR                   5020
00040 #define ID_GFX_RENAMEITEM               5021
00041 #define IDC_HSPLITBAR                   5022
00042 #define IDR_GFXOUTBAR                   5023
00043 #define IDR_POPUP_TOOLBAR               5024
00044 #define IDS_SETTINGS                    5025
00045 #define IDS_TBAR_SETTINGS               5026
00046 #define ID_POPUP_CUSTOMIZE              5027
00047 #define IDS_WNDPOS                      5028
00048 #define IDC_CAPT_BUTTON                 5029
00049 #define IDB_PUSHPIN                     5030
00050 #define IDC_LEFTBUTTON                  5031
00051 #define IDC_RIGHTBUTTON                 5032
00052 #define IDC_HOMEBUTTON                  5033
00053 #define IDC_ENDBUTTON                   5034
00054
00055 // Next default values for new objects
00056 //
00057 #ifdef APSTUDIO_INVOKED
00058 #ifndef APSTUDIO_READONLY_SYMBOLS
00059 #define _APS_NEXT_RESOURCE_VALUE        5032
00060 #define _APS_NEXT_COMMAND_VALUE         32773
00061 #define _APS_NEXT_CONTROL_VALUE         5030
00062 #define _APS_NEXT_SYMED_VALUE           101
00063 #endif
00064 #endif
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMultilineEntryDlg Member List

This is the complete list of members for CMultilineEntryDlg, including all inherited members.

ActionBrowseModule() | CMultilineEntryDlg | [private]
ActionBrowseTag() | CMultilineEntryDlg | [private]
ActionFormatCvsRoot() | CMultilineEntryDlg | [private]
ActionOpenEditor() | CMultilineEntryDlg | [private]
ActionOpenTemplate() | CMultilineEntryDlg | [private]
AddAction(const kActionType actionType, const char *actionDescription, const bool select=false) | CMultilineEntryDlg | [private]
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CMultilineEntryDlg(const MultiFiles *mf) | CMultilineEntryDlg |
Create(const kMultilineEntryType multilineEntryType, CMString *pPreviousEntries, const CWnd *pWndInsertAfter, CDialog *pParentWnd, const bool updateData=true) | CMultilineEntryDlg |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CMultilineEntryDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetEntryTextID() | CMultilineEntryDlg | [private]
GetEntryTextWnd() | CMultilineEntryDlg | [private]
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CMultilineEntryDlg |
InitHelpID() | CMultilineEntryDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_actionCombo | CMultilineEntryDlg |
m_editPositionEdit | CMultilineEntryDlg |
m_entryStatic | CMultilineEntryDlg |
m_entryText | CMultilineEntryDlg |
m_entryTextCtrl | CMultilineEntryDlg |
m_entryTextCtrlWrap | CMultilineEntryDlg |
m_firstFocus | CMultilineEntryDlg | [private]
m_mf | CMultilineEntryDlg | [private]
m_multiLineEditDialogKeyHelper | CMultilineEntryDlg | [private]
m_multilineEntryType | CMultilineEntryDlg | [private]
m_pParentWnd | CMultilineEntryDlg | [private]
m_pPreviousEntries | CMultilineEntryDlg | [private]
m_prevLogsCombo | CMultilineEntryDlg |
m_switchingWrap | CMultilineEntryDlg | [private]
m_wordWrap | CMultilineEntryDlg |
m_wordWrapCtrl | CMultilineEntryDlg |
OnActionGo() | CMultilineEntryDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnEraseBkgnd(CDC *pDC) | CMultilineEntryDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CMultilineEntryDlg | [protected, virtual]
OnSelchangeCombo() | CMultilineEntryDlg | [protected]
OnSetfocusLogmsg() | CMultilineEntryDlg | [protected]
OnSetfocusLogmsgWrap() | CMultilineEntryDlg | [protected]
OnWordwrap() | CMultilineEntryDlg | [protected]
PreTranslateMessage(MSG *pMsg) | CMultilineEntryDlg | [virtual]
SetActions() | CMultilineEntryDlg | [private]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
SetEntryDescription() | CMultilineEntryDlg | [private]
ShowHelp() | CHHelpSupport |
SwitchWrapEdit(const BOOL bWordWrap) | CMultilineEntryDlg | [private]
UpdateData(BOOL bSaveAndValidate, CString &entryText) | CMultilineEntryDlg |
UpdateInfo() | CMultilineEntryDlg | [private]
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CMultilineEntryDlg() | CMultilineEntryDlg |

Generated on Sat Aug 7 22:55:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/GfxGroupEdit.cpp Source File

WinCvs/CJLib/CJLibrary/GfxGroupEdit.cpp

Go to the documentation of this file.
00001 // Copyright (c) Iuri Apollonio 1998
00002 // Use & modify as you want & need, and leave those 4 lines.
00003 // Strongly based on article "Inplace edit control" of Mario Contestabile and "Editable subitems" of Zafir
00004 // http://www.codeguru.com
00005 //
00006 // GfxGroupEdit.cpp : implementation file
00007 //
00009 /****************************************************************************
00010  *
00011  * $Date: 1999/11/30 21:45:49 $
00012  * $Revision: 1.1.1.2 $
00013  * $Archive: /CodeJock/CJLibrary/GfxGroupEdit.cpp $
00014  *
00015  * $History: GfxGroupEdit.cpp $
00016  *
00017  * *****************  Version 4  *****************
00018  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00019  * Updated in $/CodeJock/CJLibrary
00020  * Added source control history to file header.
00021  *
00022  ***************************************************************************/
00024
00025 #include "stdafx.h"
00026 #include "GfxGroupEdit.h"
00027 #include "GfxOutBarCtrl.h"
00028
00029 #ifdef _DEBUG
00030 #define new DEBUG_NEW
00031 #undef THIS_FILE
00032 static char THIS_FILE[] = __FILE__;
00033 #endif
00034
00036 // CGfxGroupEdit
00037
00038 CGfxGroupEdit::CGfxGroupEdit()
00039 {
00040     bEscapeKey = FALSE;
00041     iIndex = -1;
00042     msgSend = NM_OB_ONGROUPENDEDIT;
00043     bNoDown = false;
00044 }
00045
00046 CGfxGroupEdit::~CGfxGroupEdit()
00047 {
00048 }
00049
00050
00051 BEGIN_MESSAGE_MAP(CGfxGroupEdit, CEdit)
00052     //{{AFX_MSG_MAP(CGfxGroupEdit)
00053     ON_WM_KILLFOCUS()
00054     ON_WM_CREATE()
00055     ON_WM_CHAR()
00056     //}}AFX_MSG_MAP
00057 END_MESSAGE_MAP()
00058
00060 // CGfxGroupEdit message handlers
00061
00062 void CGfxGroupEdit::OnKillFocus(CWnd* /*pNewWnd*/)
00063 {
00064     PostMessage(WM_CLOSE, 0, 0);
00065     if (!bEscapeKey)
00066     {
00067         GetWindowText(text);
00068         if (text != "") GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, msgSend, (LPARAM) this);
00069     }
00070 }
00071
00072 BOOL CGfxGroupEdit::PreTranslateMessage(MSG* pMsg)
00073 {
00074     if (pMsg->wParam == VK_RETURN)
00075     {
00076         PostMessage(WM_CLOSE, 0, 0);
00077         return TRUE;
00078     }
00079     else if (pMsg->wParam == VK_ESCAPE)
00080     {
00081         PostMessage(WM_CLOSE, 0, 0);
00082         return bEscapeKey = TRUE;
00083     }
00084
00085     return CEdit::PreTranslateMessage(pMsg);
00086 }
00087
00088 void CGfxGroupEdit::PostNcDestroy()
00089 {
00090     CEdit::PostNcDestroy();
00091     delete this;
00092 }
00093
00094 int CGfxGroupEdit::OnCreate(LPCREATESTRUCT lpCreateStruct)
00095 {
00096     if (CEdit::OnCreate(lpCreateStruct) == -1)
00097         return -1;
00098
00099     SendMessage(WM_SETFONT,(WPARAM) GetStockObject(DEFAULT_GUI_FONT),MAKELPARAM(TRUE,0));
00100     return 0;
00101 }
00102
00103 void CGfxGroupEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
00104 {
00105     if (msgSend == NM_OB_ONGROUPENDEDIT)
00106     {
00107         CEdit::OnChar(nChar, nRepCnt, nFlags);
00108         return;
00109     }
00110
00111     if (nChar == VK_ESCAPE || nChar == VK_RETURN)
00112     {
00113         if (nChar == VK_ESCAPE) bEscapeKey = TRUE;
00114         GetParent()->SetFocus();
00115         return;
00116     }
00117     CEdit::OnChar(nChar, nRepCnt, nFlags);
00118     CString str;
00119     CRect rect, parentrect;
00120     GetClientRect(&rect);
00121     GetParent()->GetClientRect(&parentrect);
00122     ClientToScreen(&rect);
00123     GetParent()->ScreenToClient(&rect);
00124     GetWindowText(str);
00125     CWindowDC dc(this);
00126     CFont *pFont = GetParent()->GetFont();
00127     CFont *pFontDC = dc.SelectObject(pFont);
00128     CRect szrc(rect);
00129     szrc.bottom = szrc.top;
00130
00131     if (bNoDown == true)
00132     {
00133         dc.DrawText(str, szrc, DT_CALCRECT);
00134         if (szrc.right >= parentrect.right - 1) rect.right = parentrect.right - 1;
00135         else rect.right = szrc.right;
00136         MoveWindow(&rect);
00137         return;
00138     }
00139
00140     dc.DrawText(str, szrc, DT_WORDBREAK|DT_CENTER|DT_CALCRECT);
00141     dc.SelectObject(pFontDC);
00142     CSize size = szrc.Size();
00143
00144     if (size.cx > rect.Width())
00145     {
00146         if (size.cx + rect.left < parentrect.right) rect.right = rect.left + size.cx;
00147         else rect.right = parentrect.right;
00148         MoveWindow(&rect);
00149     }
00150     else if (size.cy > rect.Height())
00151     {
00152         if (size.cy + rect.bottom < parentrect.bottom) rect.bottom = rect.top + size.cy;
00153         else rect.bottom = parentrect.bottom;
00154         MoveWindow(&rect);
00155     }
00156 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJToolCmdUI Member List

This is the complete list of members for CCJToolCmdUI, including all inherited members.

Enable(BOOL bOn) | CCJToolCmdUI | [virtual]
SetCheck(int nCheck) | CCJToolCmdUI | [virtual]
SetText(LPCTSTR lpszText) | CCJToolCmdUI | [virtual]

Generated on Sat Aug 7 22:50:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGraphFrame Member List

This is the complete list of members for CGraphFrame, including all inherited members.

brdrAllRaised enum value | CCJMDIChildWnd | [protected]
brdrFlatAll enum value | CCJMDIChildWnd | [protected]
brdrFlatBottom enum value | CCJMDIChildWnd | [protected]
brdrFlatHorizontal enum value | CCJMDIChildWnd | [protected]
brdrFlatLeft enum value | CCJMDIChildWnd | [protected]
brdrFlatRight enum value | CCJMDIChildWnd | [protected]
brdrFlatTop enum value | CCJMDIChildWnd | [protected]
brdrFlatVertical enum value | CCJMDIChildWnd | [protected]
CCJMDIChildWnd() | CCJMDIChildWnd |
CGraphFrame() | CGraphFrame |
DockControlBarLeftOf(CControlBar *Bar, CControlBar *LeftOf) | CCJMDIChildWnd | [protected, virtual]
DockFlatBorders enum name | CCJMDIChildWnd | [protected]
DockSizeBar(CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL) | CCJMDIChildWnd | [protected, virtual]
dwDockBarMap | CCJMDIChildWnd | [protected, static]
EnableDocking(DWORD dwDockStyle) | CCJMDIChildWnd | [protected, virtual]
EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised) | CCJMDIChildWnd | [protected, virtual]
GetInitializedMenu(UINT nMenuID, UINT nToolBarID) | CCJMDIChildWnd | [virtual]
GetInitializedMenu(UINT nMenuID, UINT *nToolbarIDs, int nSize) | CCJMDIChildWnd | [virtual]
GetMenuID() | CCJMDIChildWnd | [virtual]
GetToolBarID() | CCJMDIChildWnd | [virtual]
GetToolBarIDs(int &nCount) | CCJMDIChildWnd | [virtual]
m_hMenu | CCJMDIChildWnd | [protected]
m_nCount | CCJMDIChildWnd | [protected]
m_nMenuID | CCJMDIChildWnd | [protected]
m_nToolBarID | CCJMDIChildWnd | [protected]
m_nToolBarIDs | CCJMDIChildWnd | [protected]
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CGraphFrame | [virtual]
OnEraseBkgnd(CDC *pDC) | CCJMDIChildWnd | [protected]
RecalcAllExcept(CCJSizeDockBar *pBar) | CCJMDIChildWnd | [protected, virtual]
RecalcLayout(BOOL bNotify=TRUE) | CCJMDIChildWnd | [virtual]
SetResourceIDs(UINT nMenuID, UINT nToolBarID) | CCJMDIChildWnd | [virtual]
SetResourceIDs(UINT nMenuID, UINT *nToolBarIDs, int nCount) | CCJMDIChildWnd | [virtual]
~CCJMDIChildWnd() | CCJMDIChildWnd | [virtual]
~CGraphFrame() | CGraphFrame | [virtual]

Generated on Sat Aug 7 22:52:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ReleaseDlg.cpp Source File

common/ReleaseDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2000
00019  */
00020
00021 /*
00022  * ReleaseDlg.cpp : the cvs release dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #endif /* WIN32 */
00030
00031 #include "ReleaseDlg.h"
00032 #include "MultiFiles.h"
00033 #include "GetPrefs.h"
00034
00035 #ifdef WIN32
00036 #   ifdef _DEBUG
00037 #   define new DEBUG_NEW
00038 #   undef THIS_FILE
00039     static char THIS_FILE[] = __FILE__;
00040 #   endif
00041 #endif /* WIN32 */
00042
00043 #ifdef WIN32
00044
00045 // CRelease_MAIN property page
00046
00047 IMPLEMENT_DYNAMIC(CRelease_MAIN, CHHelpPropertyPage)
00048
00049 CRelease_MAIN::CRelease_MAIN(const char* dir)
00050     : CHHelpPropertyPage(CRelease_MAIN::IDD)
00051 {
00052     //{{AFX_DATA_INIT(CRelease_MAIN)
00053     m_dir = dir;
00054     //}}AFX_DATA_INIT
00055
00056     m_removeDirectoryOption = kReleaseNoDel;
00057 }
00058
00059 CRelease_MAIN::~CRelease_MAIN()
00060 {
00061 }
00062
00063 void CRelease_MAIN::DoDataExchange(CDataExchange* pDX)
00064 {
00065     CHHelpPropertyPage::DoDataExchange(pDX);
00066     //{{AFX_DATA_MAP(CRelease_MAIN)
00067     DDX_Control(pDX, IDC_DELETE_DIRECTORY, m_delDirCheck);
00068     DDX_Control(pDX, IDC_DELETE_CVS_INFO, m_delCvsInfoCheck);
00069     DDX_Control(pDX, IDC_DELETE_ALL_FILES, m_delAllCheck);
00070     DDX_Text(pDX, IDC_PATH, m_dir);
00071     //}}AFX_DATA_MAP
00072
00073     if( pDX->m_bSaveAndValidate )
00074     {
00075         if( m_delCvsInfoCheck.GetCheck() )
00076         {
00077             m_removeDirectoryOption = kReleaseDelCvsInfo;
00078         }
00079         else if( m_delDirCheck.GetCheck() )
00080         {
00081             m_removeDirectoryOption = m_delAllCheck.GetCheck() ? kReleaseDelAll : kReleaseDelDir;
00082         }
00083     }
00084 }
00085
00086
00087 BEGIN_MESSAGE_MAP(CRelease_MAIN, CHHelpPropertyPage)
00088     //{{AFX_MSG_MAP(CRelease_MAIN)
00089     ON_BN_CLICKED(IDC_DELETE_CVS_INFO, OnDelcvsinfo)
00090     ON_BN_CLICKED(IDC_DELETE_DIRECTORY, OnDeldir)
00091     //}}AFX_MSG_MAP
00092 END_MESSAGE_MAP()
00093
00095 // CRelease_MAIN message handlers
00096
00097 void CRelease_MAIN::InitHelpID()
00098 {
00099     SetCtrlHelpID(IDC_PATH,             IDH_IDC_PATH);
00100     SetCtrlHelpID(IDC_DELETE_CVS_INFO,  IDH_IDC_DELETE_CVS_INFO);
00101     SetCtrlHelpID(IDC_DELETE_DIRECTORY, IDH_IDC_DELETE_DIRECTORY);
00102     SetCtrlHelpID(IDC_DELETE_ALL_FILES, IDH_IDC_DELETE_ALL_FILES);
00103 }
00104
00109 kReleaseDelType CRelease_MAIN::GetRemoveDirectoryOption() const
00110 {
00111     return m_removeDirectoryOption;
00112 }
00113
00115 void CRelease_MAIN::OnDelcvsinfo()
00116 {
00117     if( m_delCvsInfoCheck.GetCheck() )
00118     {
00119         m_delAllCheck.EnableWindow(FALSE);
00120
00121         m_delAllCheck.SetCheck(0);
00122         m_delDirCheck.SetCheck(0);
00123     }
00124 }
00125
00127 void CRelease_MAIN::OnDeldir()
00128 {
00129     m_delAllCheck.EnableWindow(m_delDirCheck.GetCheck());
00130     m_delCvsInfoCheck.SetCheck(0);
00131     m_delAllCheck.SetCheck(0);
00132 }
00133 #endif /* WIN32 */
00134
00136 bool CompatGetRelease(const MultiFiles* mf, const char* dir, kReleaseDelType& removeDirectoryOption)
00137 {
00138     bool userHitOK = false;
00139
00140 #ifdef WIN32
00141     CHHelpPropertySheet pages(_i18n("Release settings"));
00142     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00143
00144     CRelease_MAIN page1(dir);
00145     CGetPrefs_GLOBALS page2;
00146     pages.AddPage(&page1);
00147     pages.AddPage(&page2);
00148
00149     if( pages.DoModal() == IDOK )
00150     {
00151         removeDirectoryOption = page1.GetRemoveDirectoryOption();
00152
00153         page2.StoreValues();
00154         userHitOK = true;
00155     }
00156
00157 #endif /* WIN32 */
00158
00159 #ifdef qMacCvsPP
00160     userHitOK = true;
00161 #endif /* qMacCvsPP */
00162
00163 #if qUnix
00164     userHitOK = true;
00165 #endif // qUnix
00166
00167     return userHitOK;
00168 }
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UTB_BUTTON Member List

This is the complete list of members for UTB_BUTTON, including all inherited members.

cmd | UTB_BUTTON
drop | UTB_BUTTON
icon | UTB_BUTTON
tooltip | UTB_BUTTON
varcode | UTB_BUTTON

Generated on Sat Aug 7 22:56:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJColorPopup Member List

This is the complete list of members for CCJColorPopup, including all inherited members.

CCJColorPopup() | CCJColorPopup |
CCJColorPopup(CPoint p, COLORREF crColor, CWnd *pParentWnd, LPCTSTR szDefaultText=NULL, LPCTSTR szCustomText=NULL) | CCJColorPopup |
ChangeSelection(int nIndex) | CCJColorPopup | [protected, virtual]
Create(CPoint p, COLORREF crColor, CWnd *pParentWnd, LPCTSTR szDefaultText=NULL, LPCTSTR szCustomText=NULL) | CCJColorPopup | [virtual]
CreateToolTips() | CCJColorPopup | [protected, virtual]
DrawCell(CDC *pDC, int nIndex) | CCJColorPopup | [protected, virtual]
EndSelection(int nMessage) | CCJColorPopup | [protected, virtual]
FindCellFromColor(COLORREF crColor) | CCJColorPopup | [protected, virtual]
GetCellRect(int nIndex, const LPRECT &rect) | CCJColorPopup | [protected, virtual]
GetColor(int nIndex) | CCJColorPopup | [inline, protected, virtual]
GetColorName(int nIndex) | CCJColorPopup | [inline, protected, virtual]
GetColumn(int nIndex) const | CCJColorPopup | [protected, virtual]
GetIndex(int row, int col) const | CCJColorPopup | [protected, virtual]
GetRow(int nIndex) const | CCJColorPopup | [protected, virtual]
Initialise() | CCJColorPopup | [virtual]
m_crColor | CCJColorPopup | [protected]
m_crColors | CCJColorPopup | [protected, static]
m_crInitialColor | CCJColorPopup | [protected]
m_CustomTextRect | CCJColorPopup | [protected]
m_DefaultTextRect | CCJColorPopup | [protected]
m_Font | CCJColorPopup | [protected]
m_nBoxSize | CCJColorPopup | [protected]
m_nChosenColorSel | CCJColorPopup | [protected]
m_nCurrentSel | CCJColorPopup | [protected]
m_nMargin | CCJColorPopup | [protected]
m_nNumColors | CCJColorPopup | [protected]
m_nNumColumns | CCJColorPopup | [protected]
m_nNumRows | CCJColorPopup | [protected]
m_Palette | CCJColorPopup | [protected]
m_pParent | CCJColorPopup | [protected]
m_strCustomText | CCJColorPopup | [protected]
m_strDefaultText | CCJColorPopup | [protected]
m_ToolTip | CCJColorPopup | [protected]
m_WindowRect | CCJColorPopup | [protected]
OnActivateApp(BOOL bActive, HTASK hTask) | CCJColorPopup | [protected]
OnEraseBkgnd(CDC *pDC) | CCJColorPopup | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJColorPopup | [protected]
OnKillFocus(CWnd *pNewWnd) | CCJColorPopup | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJColorPopup | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJColorPopup | [protected]
OnNcDestroy() | CCJColorPopup | [protected]
OnPaint() | CCJColorPopup | [protected]
OnPaletteChanged(CWnd *pFocusWnd) | CCJColorPopup | [protected]
OnQueryNewPalette() | CCJColorPopup | [protected]
PreTranslateMessage(MSG *pMsg) | CCJColorPopup | [virtual]
SetWindowSize() | CCJColorPopup | [protected, virtual]
UpdateFont() | CCJColorPopup | [virtual]
~CCJColorPopup() | CCJColorPopup | [virtual]

Generated on Sat Aug 7 22:48:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SaveSettingsDlg.cpp Source File

common/SaveSettingsDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2004
00019  */
00020
00021 // SaveSettingsDlg.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #ifdef WIN32
00027 #   include "wincvs.h"
00028 #endif
00029
00030 #include "SaveSettingsDlg.h"
00031
00032
00033 #ifdef _DEBUG
00034 #define new DEBUG_NEW
00035 #undef THIS_FILE
00036 static char THIS_FILE[] = __FILE__;
00037 #endif
00038
00039 #ifdef WIN32
00040
00042 // CSaveSettingsDlg dialog
00043
00044
00045 CSaveSettingsDlg::CSaveSettingsDlg(const char* path, const char* oldname, CWnd* pParent /*=NULL*/)
00046 : m_copyFromPathCombo(USmartCombo::AutoDropWidth), CHHelpDialog(CSaveSettingsDlg::IDD, pParent)
00047 {
00048     UStr strOldName = oldname;
00049
00050     UStr defname;
00051     if( strOldName.empty() )
00052     {
00053         UStr uppath;
00054         SplitPath(path, uppath, defname);
00055     }
00056     else
00057         defname = oldname;
00058
00059     //{{AFX_DATA_INIT(CSaveSettingsDlg)
00060     m_settingName = defname;
00061     m_copyFrom = _T("");
00062     m_path = path;
00063     m_copy = FALSE;
00064     //}}AFX_DATA_INIT
00065 }
00066
00067
00068 void CSaveSettingsDlg::DoDataExchange(CDataExchange* pDX)
00069 {
00070     CHHelpDialog::DoDataExchange(pDX);
00071     //{{AFX_DATA_MAP(CSaveSettingsDlg)
00072     DDX_Control(pDX, IDC_COPY_SETTINGS, m_copyCheck);
00073     DDX_Control(pDX, IDC_COPY_SETTINGS_NAME, m_copyFromPathCombo);
00074     DDX_Text(pDX, IDC_SETTINGS_NAME, m_settingName);
00075     DDX_CBString(pDX, IDC_COPY_SETTINGS_NAME, m_copyFrom);
00076     DDX_Text(pDX, IDC_PATH, m_path);
00077     DDX_Check(pDX, IDC_COPY_SETTINGS, m_copy);
00078     //}}AFX_DATA_MAP
00079 }
00080
00081
00082 BEGIN_MESSAGE_MAP(CSaveSettingsDlg, CHHelpDialog)
00083     //{{AFX_MSG_MAP(CSaveSettingsDlg)
00084     ON_BN_CLICKED(IDHELP, OnHelp)
00085     ON_BN_CLICKED(IDC_COPY_SETTINGS, OnCopySettings)
00086     //}}AFX_MSG_MAP
00087 END_MESSAGE_MAP()
00088
00090 // CSaveSettingsDlg message handlers
00091
00093 BOOL CSaveSettingsDlg::OnInitDialog()
00094 {
00095     CHHelpDialog::OnInitDialog();
00096
00097     // Extra initialization
00098     // Fill the "copy from" combo
00099     std :: map<UStr, UStr> settingsList;
00100     if( GetAllPersistentSettings(settingsList) )
00101     {
00102         std::map<UStr, UStr>::const_iterator i;
00103         for(i = settingsList.begin(); i != settingsList.end(); ++i)
00104         {
00105             m_copyFromPathCombo.AddString((*i).first.c_str());
00106         }
00107     }
00108
00109     OnCopySettings();
00110
00111     return TRUE;  // return TRUE unless you set the focus to a control
00112                   // EXCEPTION: OCX Property Pages should return FALSE
00113 }
00114
00115 void CSaveSettingsDlg::InitHelpID()
00116 {
00117     SetCtrlHelpID(IDC_SETTINGS_NAME,        IDH_IDC_SETTINGS_NAME);
00118     SetCtrlHelpID(IDC_PATH,                 IDH_IDC_PATH);
00119     SetCtrlHelpID(IDC_COPY_SETTINGS,        IDH_IDC_COPY_SETTINGS);
00120     SetCtrlHelpID(IDC_COPY_SETTINGS_NAME,   IDH_IDC_COPY_SETTINGS_NAME);
00121 }
00122
00124 void CSaveSettingsDlg::OnHelp()
00125 {
00126     ShowHelp();
00127 }
00128
00130 void CSaveSettingsDlg::OnCopySettings()
00131 {
00132     m_copyFromPathCombo.EnableWindow(m_copyCheck.GetCheck());
00133
00134     if( !m_copyCheck.GetCheck() )
00135     {
00136         m_copyFromPathCombo.SetCurSel(-1);
00137     }
00138 }
00139
00140 #endif
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CHHelpDialog Member List

This is the complete list of members for CHHelpDialog, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CHHelpDialog | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
InitHelpID()=0 | CHHelpSupport | [protected, pure virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CHHelpDialog | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TLaunchHandler< lauchType > Member List

This is the complete list of members for TLaunchHandler< lauchType >, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | TLaunchHandler< lauchType > | [inline, virtual]
OnFolder(const char *fullpath) | TLaunchHandler< lauchType > | [inline, virtual]
TLaunchHandler() | TLaunchHandler< lauchType > | [inline]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:57:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJShell.h Source File

WinCvs/CJLib/Include/CJShell.h

Go to the documentation of this file.
00001 // CJShell.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based upon the MFCENUM example. MFCENUM is a companion sample application
00006 // for Chapter 14 in "Programming the Windows 95 User Interface" by Nancy Cluts,
00007 // available in the Microsoft(R) Development Library.
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/Include/CJShell.h $
00015  *
00016  * $History: CJShell.h $
00017  *
00018  * *****************  Version 13  *****************
00019  * User: Kirk Stowell Date: 10/26/99   Time: 10:46p
00020  * Updated in $/CodeJock/Include
00021  * Made class methods virtual for inheritance purposes.
00022  *
00023  * *****************  Version 12  *****************
00024  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00025  * Updated in $/CodeJock/Include
00026  * Fixed potential resource and memory leak problems.
00027  *
00028  * *****************  Version 11  *****************
00029  * User: Kirk Stowell Date: 10/14/99   Time: 10:25a
00030  * Updated in $/CodeJock/Include
00031  * Added four new shell methods which deal with PIDL's including a new
00032  * version of an Explorer context menu called DoExplorerMenu(...) which
00033  * can be used in place of the existing DoTheMenuThing(...) method.
00034  *
00035  * *****************  Version 10  *****************
00036  * User: Kirk Stowell Date: 9/13/99    Time: 5:52a
00037  * Updated in $/CodeJockey/Include
00038  * Fixed build errors which occured with UNICODE builds.
00039  *
00040  * *****************  Version 9  *****************
00041  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00042  * Updated in $/CodeJockey/Include
00043  * Updated copyright and contact information.
00044  *
00045  * *****************  Version 8  *****************
00046  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00047  * Updated in $/CodeJockey/Include
00048  * Added Unicode compliance, thanks to Barry Burton for his help with
00049  * this.
00050  *
00051  *
00052  * *****************  Version 5  *****************
00053  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00054  * Updated in $/CodeJockey/Include
00055  *
00056  * *****************  Version 4  *****************
00057  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00058  * Updated in $/CodeJockey/Include
00059  * Cleaned up inline functions, and import/export macro so that class will
00060  * be imported when linked to, and exported at compile time.
00061  *
00062  * *****************  Version 3  *****************
00063  * User: Kirk Stowell Date: 6/11/99    Time: 10:06p
00064  * Updated in $/CodeJockey/Include
00065  * Renamed class from CCJShellFile to CCJShell.
00066  *
00067  * *****************  Version 2  *****************
00068  * User: Kirk Stowell Date: 5/02/99    Time: 3:38p
00069  * Updated in $/CodeJockey/Include
00070  * Added version macro  _WIN32_IE, you will need to have at IE4 or greater
00071  * installed to use this class. This will ensure that the version of
00072  * SHELL32.DLL is compatible.
00073  *
00074  * *****************  Version 1  *****************
00075  * User: Kirk Stowell Date: 3/19/99    Time: 11:01p
00076  * Created in $/CodeJockey/Include
00077  * Initial re-write and release.
00078  *
00079  ***************************************************************************/
00081
00082 #ifndef __CJSHELL_H__
00083 #define __CJSHELL_H__
00084
00085 #if _WIN32_IE >= 0x0400 // Need to have at IE4 or greater installed.
00086
00087 #if _MSC_VER > 1000
00088 #pragma once
00089 #endif // _MSC_VER > 1000
00090
00091 #include <shlobj.h>
00092
00093 #define WM_SHELL_NOTIFY     WM_USER + 1
00094 #define NM_SH_SHELLMENU     1
00095
00096 // helper struct that holds list item data
00097 typedef struct tagLVID
00098 {
00099    LPSHELLFOLDER lpsfParent;
00100    LPITEMIDLIST  lpi;
00101    ULONG         ulAttribs;
00102 } LVITEMDATA, *LPLVITEMDATA;
00103
00104 // helper struct that holds tree item data
00105 typedef struct tagTVID
00106 {
00107    LPSHELLFOLDER lpsfParent;
00108    LPITEMIDLIST  lpi;
00109    LPITEMIDLIST  lpifq;
00110 } TVITEMDATA, *LPTVITEMDATA;
00111
00112 // CCJShell class is used to perform shell file operations
00113 class _CJX_EXT_CLASS CCJShell
00114 {
00115
00116 public:
00117
00118     // Default constructor
00119     //
00120     CCJShell(LPCTSTR lpszFileName=NULL);
00121
00122     // Virtual destructor
00123     //
00124     virtual ~CCJShell();
00125
00126 public:
00127
00128     int         m_iImageIndex;  // index into system image list
00129     CString     m_strPath;      // full file path used with BrowseForFolder(...)
00130     CString     m_strInitDir;   // start directory used with BrowseForFolder(...)
00131     CString     m_strSelDir;    // selected directory used with BrowseForFolder(...)
00132     CString     m_strTitle;     // dialog title used with BrowseForFolder(...)
00133
00134 protected:
00135
00136     CString     m_strFileName;          // contains the full path to a file or folder
00137     char        m_szDrive[_MAX_DRIVE];  // contains the drive letter
00138     char        m_szDir[_MAX_DIR];      // contains the directory string
00139     char        m_szFname[_MAX_FNAME];  // contains the file name minus path and ext
00140     char        m_szExt[_MAX_EXT];      // contains the file extension
00141
00142 public:
00143     virtual void SplitPath(CString strFileName, char* szDrive, char* szDir, char* szFile, char* szExt);
00144
00145     // this member function is used to retrieve a key from the registry
00146     //
00147     virtual LONG GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata);
00148
00149     // this member funciont is used to perform execute command
00150     //
00151     virtual HINSTANCE ShellExec(LPCTSTR lpszExec, int nShow);
00152
00153     // this member function returns the size of the file formatted in KB.
00154     //
00155     virtual CString GetFileSizeString(
00156         // a string containing the system file size
00157         LPCTSTR lpszFileSize);
00158
00159     // this member function returns a formatted string for the last
00160     // time file was written to.
00161     //
00162     virtual CString GetLastWriteTime(
00163         // points to a CTime object
00164         CTime* pTime);
00165
00166     // retrieves the path only of the current filename. if the filename
00167     // is "c:\incoming\hello.txt", this function returns "c:"
00168     //
00169     virtual CString GetFileDrive(
00170         // full path of file name to parse
00171         LPCTSTR lpszFileName=NULL);
00172
00173     // this member function determines whether a file or directory exists.
00174     //
00175     virtual BOOL Exist(
00176         // full path of file or directory name
00177         LPCTSTR lpszFileName=NULL);
00178
00179     // this member function returns the icon index of the file or folder
00180     //
00181     virtual int GetIconIndex(
00182         // full path of file or directory name.
00183         LPCTSTR lpszFileName=NULL,
00184         // can be large or small icon
00185         UINT uFlags=SHGFI_SMALLICON);
00186
00187     // this member function returns the system display name for the file.
00188     //
00189     virtual CString GetDisplayName(
00190         // full path of file or directory name.
00191         LPCTSTR lpszFileName=NULL);
00192
00193     // this member function returns the system description for the file.
00194     //
00195     virtual CString GetFileType(
00196         // full path of file or directory name.
00197         LPCTSTR lpszFileName=NULL);
00198
00199     // this member function retrieves the file extension. if the filename is
00200     // "c:\incoming\hello.txt", this function returns "txt".
00201     //
00202     virtual CString GetFileExt(
00203         // full path of file or directory name.
00204         LPCTSTR lpszFileName=NULL);
00205
00206     // this member function retrieves the title of the filename excluding
00207     // the path and extension. if the filename is "c:\incoming\hello.txt",
00208     // this function returns "hello".
00209     //
00210     virtual CString GetFileTitle(
00211         // full path of file or directory name.
00212         LPCTSTR lpszFileName=NULL);
00213
00214     // this member function retrieves the path only of the current filename.
00215     // if the filename is "c:\incoming\hello.txt", this function returns "c:\incoming\".
00216     //
00217     virtual CString GetRoot(
00218         // full path of file or directory name.
00219         LPCTSTR lpszFileName=NULL);
00220
00221     // this member function retrieves current filename minus the path if the
00222     // filename is "c:\incoming\hello.txt", this function returns "hello.txt".
00223     //
00224     virtual CString GetFileName(
00225         // full path of file or directory name.
00226         LPCTSTR lpszFileName=NULL);
00227
00228     // this member function returns the system image list for small and large icons.
00229     // if you use this method, you must call CImageList::Detach() for both
00230     // image lists
00231     //
00232     virtual void GetSystemImageList(
00233         // points to a CImageList object that contains small icons
00234         CImageList* pSmallList,
00235         // points to a CImageList object that contains large icons
00236         CImageList* pLargeList);
00237
00238     // this member function displays browse for folder dialog.
00239     //
00240     virtual BOOL BrowseForFolder(
00241         // points to the parent window
00242         CWnd* pParentWnd);
00243
00244     // callback function for the BrowseForFolder method.
00245     //
00246     static int CALLBACK BrowseCtrlCallback(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
00247
00248 // FUNCTIONS THAT DEAL WITH PIDLs
00249
00250     // this member function gets the next PIDL in the list
00251     //
00252     virtual LPITEMIDLIST Next(LPCITEMIDLIST pidl);
00253
00254     // this member function gets the size of the PIDL
00255     //
00256     virtual UINT GetSize(LPCITEMIDLIST pidl);
00257
00258     // this member function allocates a PIDL
00259     //
00260     virtual LPITEMIDLIST Create(UINT cbSize);
00261
00262     // this member function concatenates two PIDLs
00263     //
00264     virtual LPITEMIDLIST ConcatPidls(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
00265
00266     // this member function copies the ITEMID
00267     //
00268     virtual LPITEMIDLIST CopyITEMID(LPMALLOC lpMalloc, LPITEMIDLIST lpi);
00269
00270     // this member function gets the friendly name for the folder
00271     //
00272     virtual BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPTSTR lpFriendlyName);
00273
00274     // this member function gets the Fully qualified Pidls for the folder
00275     //
00276     virtual LPITEMIDLIST GetFullyQualPidl(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi);
00277
00278     // this member function Displays a popup context menu, given a parent shell folder,
00279     // relative item id and screen location. returns TRUE on success, FALSE on failure
00280     //
00281     virtual BOOL DoTheMenuThing(
00282         // parent window handle
00283         HWND hwnd,
00284         // pointer to parent shell folder
00285         LPSHELLFOLDER lpsfParent,
00286         // pointer to item id that is relative to lpsfParent
00287         LPITEMIDLIST lpi,
00288         // screen location of where to popup the menu
00289         LPPOINT lppt);
00290
00291     // this member function gets the index for the current icon. Index is
00292     // index into system image list. returns icon index for current item.
00293     //
00294     virtual int GetIcon(
00295         // fully qualified item id list for current item.
00296         LPITEMIDLIST lpi,
00297         // flags for SHGetFileInfo()
00298         UINT uFlags);
00299
00300     // this member function gets the index for the normal and
00301     // selected icons for the current item.
00302     //
00303     virtual void GetNormalAndSelectedIcons(
00304         // fully qualified item id list for current item.
00305         LPITEMIDLIST lpifq,
00306         // pointer to treeview item we are about to add to the tree.
00307         LPTV_ITEM lptvitem);
00308
00309     // Makes a copy of the next item in an item ID list. Returns pointer to
00310     // an ITEMIDLIST containing the copied item ID.
00311     //
00312     virtual LPITEMIDLIST DuplicateItem (
00313         // Pointer to an IMalloc interface.
00314         LPMALLOC pMalloc,
00315         // Pointer to an item ID list.
00316         LPITEMIDLIST pidl);
00317
00318     // Finds the next item in an item ID list. Returns pointer to the next item.
00319     //
00320     virtual LPITEMIDLIST GetNextItem (
00321         // Pointer to an item ID list.
00322         LPITEMIDLIST pidl);
00323
00324     // Computes the number of item IDs in an item ID list. Returns number
00325     // of item IDs in the list.
00326     virtual UINT GetItemCount (
00327         // Pointer to an item ID list.
00328         LPITEMIDLIST pidl);
00329
00330     // Given a path name to a file or folder object, displays the shell's context
00331     // menu for that object and executes the menu command (if any) selected by the user.
00332     //
00333     virtual BOOL DoExplorerMenu (
00334         // Handle of the window in which the menu will be displayed.
00335         HWND hwnd,
00336         // Pointer to an ANSI or Unicode string specifying the path to the object.
00337         LPCTSTR pszPath,
00338         // x and y coordinates of the point where the menu's upper left corner should be
00339         // located, in client coordinates relative to hwnd.
00340         POINT point);
00341 };
00342
00344
00345 #endif // _WIN32_IE >= 0x0400
00346 #endif // __CJSHELL_H__
00347
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CStaticAllocT< T > Member List

This is the complete list of members for CStaticAllocT< T >, including all inherited members.

AdjustSize(size_t size) | CStaticAllocT< T > |
CStaticAllocT() | CStaticAllocT< T > |
m_buf | CStaticAllocT< T > | [protected]
m_bufsize | CStaticAllocT< T > | [protected]
operator const T *(void) const | CStaticAllocT< T > | [inline]
operator T *(void) const | CStaticAllocT< T > | [inline]
size() const | CStaticAllocT< T > | [inline]
~CStaticAllocT() | CStaticAllocT< T > |

Generated on Sat Aug 7 22:56:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJExplorerBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJExplorerBar.cpp

Go to the documentation of this file.
00001 // CJExplorerBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJExplorerBar.cpp $
00011  *
00012  * $History: CJExplorerBar.cpp $
00013  *
00014  * *****************  Version 12  *****************
00015  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Modified resource include for static builds.
00018  *
00019  * *****************  Version 11  *****************
00020  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00021  * Updated in $/CodeJock/CJLibrary
00022  * Fixed potential resource and memory leak problems.
00023  *
00024  * *****************  Version 10  *****************
00025  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00026  * Updated in $/CodeJockey/CJLibrary
00027  * Updated copyright and contact information.
00028  *
00029  * *****************  Version 9  *****************
00030  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00031  * Updated in $/CodeJockey/CJLibrary
00032  * Added Unicode compliance, thanks to Barry Burton for his help with
00033  * this.
00034  *
00035  *
00036  * *****************  Version 8  *****************
00037  * User: Kirk Stowell Date: 6/23/99    Time: 7:24a
00038  * Updated in $/CodeJockey/CJLibrary
00039  *
00040  * *****************  Version 7  *****************
00041  * User: Kirk Stowell Date: 6/23/99    Time: 2:07a
00042  * Updated in $/CodeJockey/CJLibrary
00043  *
00044  * *****************  Version 6  *****************
00045  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00046  * Updated in $/CodeJockey/CJLibrary
00047  *
00048  * *****************  Version 5  *****************
00049  * User: Kirk Stowell Date: 7/18/99    Time: 10:26p
00050  * Updated in $/CodeJockey/CJLibrary
00051  * Cleaned up caption creation.
00052  *
00053  * *****************  Version 4  *****************
00054  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00055  * Updated in $/CodeJockey/CJ60Lib
00056  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00057  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00058  * message handler, this is now automatically handled by the base class.
00059  * Added redraw flags to the create method and modified paint and layout
00060  * handlers to reduce flicker and un-necessary command handling. Dragging
00061  * rect now reflects actual control bar docked size. Added "flat" look to
00062  * the control bars, the control bars can now use the classic DevStudio
00063  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00064  * docking windows now handle dragging, docking and floating much better,
00065  * and behave more like DevStudio.
00066  *
00067  * *****************  Version 3  *****************
00068  * User: Kirk Stowell Date: 4/03/99    Time: 4:23p
00069  * Updated in $/CodeJockey/CJ60Lib
00070  * Added comments and cleaned up code.
00071  *
00072  * *****************  Version 2  *****************
00073  * User: Kirk Stowell Date: 1/31/99    Time: 4:23p
00074  * Updated in $/CodeJockey/CJ60Lib
00075  * Made some cosmetic enhancements to more closely match the windows
00076  * explorer bar.
00077  *
00078  * *****************  Version 1  *****************
00079  * User: Kirk Stowell Date: 1/16/99    Time: 4:22p
00080  * Created in $/CodeJockey/CJ60Lib
00081  * Initial release
00082  *
00083  ***************************************************************************/
00085
00086 #include "stdafx.h"
00087 #include "CJResource.h"
00088 #include "CJExplorerBar.h"
00089
00090 #ifdef _DEBUG
00091 #define new DEBUG_NEW
00092 #undef THIS_FILE
00093 static char THIS_FILE[] = __FILE__;
00094 #endif
00095
00097 // CCJExplorerBar
00098
00099 CCJExplorerBar::CCJExplorerBar()
00100 {
00101     m_hIcon = NULL;
00102     m_strCaption = _T("");
00103 }
00104
00105 CCJExplorerBar::~CCJExplorerBar()
00106 {
00107     // fix potential resource leak - KStowell - 10-22-99.
00108     _destroyIcon(m_hIcon);
00109 }
00110
00111 IMPLEMENT_DYNAMIC(CCJExplorerBar, CCJControlBar)
00112
00113 BEGIN_MESSAGE_MAP(CCJExplorerBar, CCJControlBar)
00114     //{{AFX_MSG_MAP(CCJExplorerBar)
00115     ON_WM_CREATE()
00116     ON_COMMAND(IDC_BAR_BUTTON, OnButtonClose)
00117     ON_UPDATE_COMMAND_UI(IDC_BAR_BUTTON, OnUpdateButtonClose)
00118     ON_WM_WINDOWPOSCHANGED()
00119     ON_WM_ERASEBKGND()
00120     ON_WM_LBUTTONDOWN()
00121     ON_WM_LBUTTONUP()
00122     //}}AFX_MSG_MAP
00123 END_MESSAGE_MAP()
00124
00126 // CCJExplorerBar message handlers
00127
00128 BOOL CCJExplorerBar::Create(CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName, CSize sizeDefault, DWORD dwStyle)
00129 {
00130     m_strCaption = lpszWindowName;
00131
00132     if(!CCJControlBar::Create(pParentWnd, nID, lpszWindowName, sizeDefault, dwStyle)) {
00133         return FALSE;
00134     }
00135
00136     ShowFrameControls(FALSE, FALSE);
00137     return TRUE;
00138 }
00139
00140 int CCJExplorerBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00141 {
00142     if (CCJControlBar::OnCreate(lpCreateStruct) == -1)
00143         return -1;
00144
00145     // Create the caption.
00146     if (!m_Caption.Create(this, m_strCaption))
00147     {
00148         TRACE0( "Unable to create caption.\n" );
00149         return -1;
00150     }
00151
00152     // Create the caption button.
00153     if (!m_CaptionButton.Create(NULL, WS_VISIBLE|BS_ICON|BS_OWNERDRAW|BS_CENTER|BS_VCENTER,
00154         CRect(0,0,0,0), this, IDC_BAR_BUTTON))
00155     {
00156         TRACE0( "Unable to create caption button.\n" );
00157         return -1;
00158     }
00159
00160     // Create the image list used by frame buttons.
00161     CImageList imageList;
00162     imageList.Create(IDB_PUSHPIN, 16, 1, RGB(255,0,255));
00163     m_hIcon = imageList.ExtractIcon(2);
00164
00165     // Associate the button icon
00166     m_CaptionButton.SetIcon(m_hIcon, CSize(16,15));
00167     imageList.DeleteImageList();
00168
00169     return 0;
00170 }
00171
00172 void CCJExplorerBar::OnButtonClose()
00173 {
00174     GetDockingFrame()->ShowControlBar(this, FALSE, FALSE);
00175 }
00176
00177 void CCJExplorerBar::OnUpdateButtonClose(CCmdUI* pCmdUI)
00178 {
00179     pCmdUI->Enable(TRUE);
00180 }
00181
00182 void CCJExplorerBar::GetChildRect(CRect &rect)
00183 {
00184     GetClientRect(&rect);
00185
00186     if (!IsFloating())
00187     {
00188         rect.left   += 1;
00189         rect.right  -= 1;
00190         rect.top    += (IsVertDocked()?26:22);
00191     }
00192
00193     else
00194         rect.DeflateRect(2,2);
00195 }
00196
00197 void CCJExplorerBar::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
00198 {
00199     CControlBar::OnWindowPosChanged(lpwndpos);
00200
00201     int nCmdShow = IsFloating() ? SW_HIDE:SW_SHOW;
00202     m_Caption.ShowWindow(nCmdShow);
00203     m_CaptionButton.ShowWindow(nCmdShow);
00204
00205     if (!IsFloating())
00206     {
00207         if (IsVertDocked())
00208         {
00209             m_Caption.MoveWindow(1,4,lpwndpos->cx-1,22);
00210             m_CaptionButton.MoveWindow(CRect(lpwndpos->cx-25,
00211                 7, lpwndpos->cx-5, 24));
00212         }
00213         else
00214         {
00215             m_Caption.MoveWindow(1,0,lpwndpos->cx-1,22);
00216             m_CaptionButton.MoveWindow(CRect(lpwndpos->cx-25,
00217                 3, lpwndpos->cx-5, 20));
00218         }
00219     }
00220
00221     if (m_pChildWnd->GetSafeHwnd())
00222     {
00223         CRect rc;
00224         GetChildRect(rc);
00225         m_pChildWnd->MoveWindow(rc);
00226     }
00227 }
00228
00229 BOOL CCJExplorerBar::OnEraseBkgnd(CDC* pDC)
00230 {
00231     int result = CControlBar::OnEraseBkgnd(pDC);
00232
00233     CRect rect;
00234     GetClientRect(rect);
00235     rect.top+=(IsVertDocked()?3:-1);
00236     rect.bottom += 1;
00237     //Yiannhs This was a side effect of removing the variables
00238     pDC->Draw3dRect(rect, afxData.clrBtnShadow, afxData.clrBtnShadow);
00239     //pDC->Draw3dRect(rect, m_clrBtnShadow, m_clrBtnShadow);
00240     return result;
00241 }
00242
00243 void CCJExplorerBar::OnLButtonDown(UINT /*nFlags*/, CPoint /*point*/)
00244 {
00245     // bypass CCJControlBar.
00246 }
00247
00248 void CCJExplorerBar::OnLButtonUp(UINT /*nFlags*/, CPoint /*point*/)
00249 {
00250     // bypass CCJControlBar.
00251 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoIconCheckBox Member List

This is the complete list of members for TPseudoIconCheckBox, including all inherited members.

MA_DECLARE_CLASS | TPseudoIconCheckBox | [private]
ReadFields(CStream_AC *aStream) | TPseudoIconCheckBox | [private, virtual]
TPseudoIconCheckBox() | TPseudoIconCheckBox | [private]
WriteFields(CStream_AC *aStream) const | TPseudoIconCheckBox | [private, virtual]
~TPseudoIconCheckBox() | TPseudoIconCheckBox | [private, virtual]

Generated on Sat Aug 7 22:57:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJLogoPane Member List

This is the complete list of members for CCJLogoPane, including all inherited members.

CCJLogoPane() | CCJLogoPane |
Create(LPCTSTR lpszWindowName, DWORD dwStyle, CWnd *pParentWnd, UINT nID) | CCJLogoPane | [virtual]
GetLogoText() | CCJLogoPane | [virtual]
m_Font | CCJLogoPane |
m_strLogoText | CCJLogoPane |
OnPaint() | CCJLogoPane | [protected]
SetLogoFont(LPCTSTR lpszFontName, int nHeight=24, int nWeight=FW_BOLD, BOOL bItalic=TRUE, BOOL bUnderline=FALSE) | CCJLogoPane | [virtual]
SetLogoText(LPCTSTR lpszLogoText) | CCJLogoPane | [virtual]
~CCJLogoPane() | CCJLogoPane | [virtual]

Generated on Sat Aug 7 22:49:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/umain.h Source File

rf/umain.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #ifndef UEVENT_H
00022 #define UEVENT_H
00023
00024 #include "uobject.h"
00025
00026 /*
00027  * The routing of the messages is copied from the MFC scheme :
00028  * A message has a sort of "prototype" associated with it and
00029  * is dispatched using a virtual message map : the message goes
00030  * to the child first, then get up to the parents if it was not handled.
00031  */
00032
00033 typedef enum
00034 {
00035     EV_NONE,
00036
00037     /* system events */
00038     EV_CREATE,      /* void OnCreate(void) */
00039     EV_DESTROY,     /* void OnDestroy(void) */
00040     EV_ENTER,       /* void OnEnter(void *data) */
00041     EV_LEAVE,       /* void OnLeave(void) */
00042     EV_EXPOSE,      /* void OnExpose(void) */
00043     EV_MMOVE,       /* void OnMouseMove(int x, int y, int mod) */
00044     EV_BTNDOWN,     /* void OnBtnDown(int x, int y, int mod) */
00045     EV_BTNUP,       /* void OnBtnUp(int x, int y, int mod) */
00046     EV_BTNDBLDOWN,  /* void OnBtnDblDown(int x, int y, int mod) */
00047     EV_KEYDOWN,     /* void OnKeyDown(int c) */
00048     EV_SETCURSOR,   /* void OnSetCursor(void) */
00049     EV_CHGCURSOR,   /* void OnChgCursor(int cmd, UCURSOR cursor) */
00050     EV_RESIZE,      /* void OnResize(const URECT * r) */
00051     EV_GETLOC,      /* void OnGetLoc<Cmd>(int cmd, URECT *) */
00052     EV_SETLOC,      /* void OnSetLoc<Cmd>(int cmd, const URECT *) */
00053
00054     /* generic */
00055     EV_CMD,         /* int On<Cmd>(void) */
00056     EV_UPDTCMD,     /* void OnUpdate<Cmd>(UCmdUI *pCmdUI) */
00057     EV_ENABLECMD,   /* void OnEnableCmd<Cmd>(int cmd, int enabled) */
00058     EV_FETCHCMD,    /* int OnFetchCmd(int cmd, void *widget) */
00059     EV_SETTOOLTIP,  /* void OnSetTooltip<Cmd>(int cmd, UCmdUI *pCmdUI) */
00060     EV_QUERYSTATE,  /* int OnQueryState<Cmd>(int cmd) */
00061     EV_GETINTEGER = EV_QUERYSTATE,
00062     EV_SETSTATE,    /* void OnSetState<Cmd>(int cmd, int state) */
00063     EV_SETINTEGER = EV_SETSTATE,
00064     EV_CHGFOCUS,    /* void OnChgFocus(int cmd) */
00065     EV_SETDEFAULT,  /* void OnSetDefault(int cmd) */
00066     EV_INVALIDATE,  /* void OnInvalidate(int cmd) */
00067     EV_REDRAW,      /* void OnRedraw(int cmd) */
00068     EV_GETTEXT,     /* void OnGetText(int cmd, UStr *text); */
00069     EV_SETTEXT,     /* void OnSetText(int cmd, const char *text); */
00070     EV_SETICON,     /* void OnSetIcon(int cmd, void *pixmap); */
00071     EV_GETFLOAT,    /* void OnGetFloat(int cmd, float *f); */
00072     EV_SETFLOAT,    /* void OnSetFloat(int cmd, const float *f); */
00073     EV_INIT_WIDGET, /* void OnInitWidget(int cmd, void *widget); */
00074     EV_INIT_TAB_WIDGET, /* void OnInitTabWidget(int cmd, int page, void *widget); */
00075     EV_SHOW_WIDGET, /* void OnShowWidget<Cmd>(int cmd, int state) */
00076     EV_PAGE_CHANGED,    /* void OnPageChanged<Cmd>(int cmd, int pagenum) */
00077     EV_STATUSBAR_TEXT,  /* void OnStatusBarText(int cmd, const char *text) */
00078
00079
00080     /* notifying */
00081     EV_NOTIFY,          /* void OnNotify<Cmd>(void) */
00082     EV_EDITCHANGE,      /* void OnEditChange<Cmd>(void) */
00083     EV_EDITACTIVATE,    /* void OnEditActivate<Cmd>(void) */
00084     EV_TIMER,           /* void OnTimer<Cmd>(long time) */
00085     EV_UPDATEUI,        /* void OnUpdateUI(void) */
00086     EV_UPDATEFOCUS,     /* int OnUpdateFocus(int leave, void *widget) */
00087
00088     /* drag'n drop */
00089     EV_DRAGQUERY,       /* void OnDragQuery<Cmd>(UDragable *) */
00090     EV_DROPQUERY,       /* void OnDropQuery<Cmd>(UDropable **) */
00091     EV_DROPIT,          /* void OnDropIt<Cmd>(const UDragable *) */
00092     EV_DROPQUERY_CMDID, /* void OnDropQueryCmdID<Cmd>(int x, int y, int *cmdid) */
00093     EV_DROPREF,     /* void OnDropRef<Cmd>(int cmd, int nbref, long *ref) */
00094
00095     /* toolbar manager */
00096     EV_TB_INIT,         /* void OnTbInit(UTB_INIT *info) */
00097     EV_TB_END,          /* void OnTbEnd(void) */
00098     EV_TB_BUTTON,       /* void OnTbButton(UTB_BUTTON *info) */
00099     EV_TB_DROPDOWN,     /* void OnTbDropDown(UTB_DROPDOWN *info) */
00100     EV_TB_CHECKBTN,     /* void OnTbCheckBtn(UTB_BUTTON *info) */
00101     EV_TB_SEPARATOR,    /* void OnTbSeparator(void) */
00102     EV_TB_GETCOLOR,     /* void OnTbGetColor(int cmd, float *color) */
00103
00104     /* slider */
00105     EV_SET_SLIDER,      /* void OnSetSlider(int cmd, int pos) */
00106     EV_GET_SLIDERPROP,  /* void OnGetSliderProperty(int cmd, USLIDER *prop) */
00107     EV_SET_SLIDERPROP,  /* void OnSetSliderProperty(int cmd, const USLIDER *prop) */
00108     EV_SCROLLCHANGE,    /* void OnScrollChange<Cmd>(int pos) */
00109
00110     /* custom drawing */
00111     EV_CUSTOM_DRAW,     /* void OnCustomDraw<Cmd>(void *drawInfo) */
00112     EV_CUSTOM_CLICK,    /* void OnCustimClick<Cmd>(void *drawInfo) */
00113
00114     /* tree */
00115     EV_TREE_RESETALL,   /* void OnTreeResetAll(int cmd) */
00116     EV_TREE_INSERT,     /* void OnTreeInsert(int cmd, UTREE_INSERT *data) */
00117     EV_TREE_GETINFO,    /* void OnTreeGetInfo(int cmd, UTREE_INFO *data) */
00118     EV_TREE_SETDATA,    /* void OnTreeSetData(int cmd, UTREE_INFO *data) */
00119     EV_TREE_SETICON,    /* void OnTreeSetIcon(int cmd, UTREE_INFO *data) */
00120     EV_TREE_DELETE,     /* void OnTreeDelete(int cmd, UTREEITEM item) */
00121     EV_TREE_EXPANDING,  /* void OnTreeExpanding<cmd>(int collapse, UTREEITEM item) */
00122     EV_TREE_SELECTING,  /* void OnTreeSelecting<cmd>(int deselecting, UTREEITEM item) */
00123     EV_TREE_EXPAND,     /* void OnTreeExpand(int cmd, int collapse, UTREEITEM item) */
00124     EV_TREE_SELECT,     /* void OnTreeSelect(int cmd, int deselect, UTREEITEM item) */
00125     EV_TREE_GETSEL,     /* void OnTreeGetSel(int cmd, UTREEITEM *item) */
00126
00127     /* list */
00128     EV_LIST_POPUP,          /* void OnListChange<Cmd>(int entry, const char *txt) */
00129     EV_LIST_SELECTING,      /* void OnListChange<Cmd>(int entry, const char *txt) */
00130     EV_LIST_SELCOLUMN,      /* void OnListSelColumn<Cmd>(int entry) */
00131     EV_LIST_RESORT,         /* void OnListResort(int cmd, int column, UListSorter s) */
00132     EV_LIST_SETSORTDIR,     /* void OnListSetSortDir(int cmd, int column, bool dir) */
00133     EV_LIST_DBLCLICK,       /* void OnListDblClick<Cmd>(void) */
00134     EV_LIST_RESETALL,       /* void OnListResetAll(int cmd) */
00135     EV_LIST_SETFEEDBACK,    /* void OnListSetFeedback(int cmd, int turnOn) */
00136     EV_LIST_ADDCOLUMNS,     /* void OnListAddColumns(int cmd, int num) */
00137     EV_LIST_SHOWCOLUMNS,    /* void OnListShowColumns(int cmd, int num) */
00138     EV_LIST_HIDECOLUMNS,    /* void OnListHideColumns(int cmd, int num) */
00139     EV_LIST_SETCOLTITLE,    /* void OnListSetColTitle(int cmd, int num, const char *title) */
00140     EV_LIST_SETCOLWIDTH,    /* void OnListSetColWidth(int cmd, int num, int width) */
00141     EV_LIST_NEWROW,         /* void OnListNewRow(int cmd, int *num) */
00142     EV_LIST_ROWSETDATA,     /* void OnListRowSetData(int cmd, int row, void *data) */
00143     EV_LIST_ROWGETDATA,     /* void OnListRowGetData(int cmd, int row, void **data) */
00144     EV_LIST_INSERT,         /* void OnListInsert(int cmd, ULIST_INSERT *data) */
00145     EV_LIST_ADDSEL,         /* void OnListAddSel(int cmd, int entry) */
00146     EV_LIST_DELROW,         /* void OnListDelRow(int cmd, int row) */
00147     EV_LIST_GETNEXTSEL,     /* int OnListGetNextSel(int cmd, int selectedCell) */
00148     EV_LIST_GETINFO,        /* void OnListGetInfo(int cmd, ULIST_INFO *data) */
00149     EV_LIST_GETNEXT,        /* int OnListGetNext(int cmd, int whichCell) */
00150
00151     /* combo */
00152     EV_COMBO_RESETALL,  /* void OnComboResetAll(int cmd) */
00153     EV_COMBO_APPEND,    /* void OnComboAppend(int cmd, const char *str) */
00154     EV_COMBO_SETSEL,    /* void OnComboSetPos(int cmd, int pos) */
00155     EV_COMBO_GETSEL,    /* int OnComboGetPos(int cmd, UStr *txt) */
00156     EV_COMBO_SEL,       /* void OnComboSel<Cmd>(int pos, const char *txt) */
00157     EV_COMBO_GETCOUNT,  /* int OnComboGetCount(int cmd) */
00158     EV_COMBO_DELSEL,    /* void OnComboDelSel(int cmd, int pos) */
00159     EV_COMBO_ENABLESEL, /* void OnComboEnableSel(int cmd, int pos, int state) */
00160     EV_COMBO_GETMENU,   /* void OnComboGetMenu(int cmd, UMENU *menu) */
00161
00162     /* smart combo (Win32 only at the moment)*/
00163     EV_SMARTCOMBO_SETFEATURE,   /* void OnSmartComboSetFeature(int cmd, int feature) */
00164     EV_SMARTCOMBO_SETITEMS  ,   /* void OnSmartComboSetItems(int cmd, CMString* items) */
00165     EV_SMARTCOMBO_SETREADONLY,  /* void OnSmartComboSetReadOnly(int cmd, bool readOnly) */
00166
00167     /* user defined */
00168     EV_COMMAND_START = 1000
00169 } UEventType;
00170
00171 #ifdef __cplusplus
00172
00173 #ifndef STD
00174 #   define STD std::
00175 #endif
00176
00177 class UCmdTarget;
00178 class UWidget;
00179 class UDragable;
00180 class UDropable;
00181
00182 typedef void (UCmdTarget::*UPMSG)(void);
00183 //{ #define ON_*
00184 #define ON_UCREATE(baseClass) \
00185     { EV_CREATE, epV_V, UMSG_NOEXT, 0, 0, \
00186         (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnCreate },
00187
00188 #define ON_UDESTROY(baseClass) \
00189     { EV_DESTROY, epV_V, UMSG_NOEXT, 0, 0, \
00190         (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnDestroy },
00191
00192 #define ON_UENTER(baseClass) \
00193     { EV_ENTER, epV_VP, UMSG_NOEXT, 0, 0, \
00194         (UPMSG)(void (UCmdTarget::*)(void *))&baseClass::OnEnter },
00195
00196 #define ON_ULEAVE(baseClass) \
00197     { EV_LEAVE, epV_V, UMSG_NOEXT, 0, 0, \
00198         (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnLeave },
00199
00200 #define ON_UEXPOSE(baseClass) \
00201     { EV_EXPOSE, epV_V, UMSG_NOEXT, 0, 0, \
00202         (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnExpose },
00203
00204 #define ON_UMMOVE(baseClass) \
00205     { EV_MMOVE, epV_iii, UMSG_NOEXT, 0, 0, \
00206         (UPMSG)(void (UCmdTarget::*)(int x, int y, int mod))&baseClass::OnMouseMove },
00207
00208 #define ON_UBTNDOWN(baseClass) \
00209     { EV_BTNDOWN, epV_iii, UMSG_NOEXT, 0, 0, \
00210         (UPMSG)(void (UCmdTarget::*)(int x, int y, int mod))&baseClass::OnBtnDown },
00211
00212 #define ON_UBTNUP(baseClass) \
00213     { EV_BTNUP, epV_iii, UMSG_NOEXT, 0, 0, \
00214         (UPMSG)(void (UCmdTarget::*)(int x, int y, int mod))&baseClass::OnBtnUp },
00215
00216 #define ON_UBTNDBLDOWN(baseClass) \
00217     { EV_BTNDBLDOWN, epV_iii, UMSG_NOEXT, 0, 0, \
00218         (UPMSG)(void (UCmdTarget::*)(int x, int y, int mod))&baseClass::OnBtnDblDown },
00219
00220 #define ON_KEYDOWN(baseClass) \
00221     { EV_KEYDOWN, epV_i, UMSG_NOEXT, 0, 0, \
00222         (UPMSG)(void (UCmdTarget::*)(int c))&baseClass::OnKeyDown },
00223
00224 #define ON_RESIZE(cmd, hook) \
00225     { EV_RESIZE, epV_VP, UMSG_RANGE, cmd, cmd, \
00226         (UPMSG)(void (UCmdTarget::*)(const URECT * r))&hook },
00227
00228 #define ON_SETCURSOR(baseClass) \
00229     { EV_SETCURSOR, epV_V, UMSG_NOEXT, 0, 0, \
00230         (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnSetCursor },
00231
00232 #define ON_CHGCURSOR(baseClass, cmdmin, cmdmax) \
00233     { EV_CHGCURSOR, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00234         (UPMSG)(void (UCmdTarget::*)(int cmd, UCURSOR cursor))&baseClass::OnChgCursor },
00235
00236 #define ON_TB_INIT(baseClass) \
00237     { EV_TB_INIT, epV_VP, UMSG_NOEXT, 0, 0, \
00238         (UPMSG)(void (UCmdTarget::*)(UTB_INIT *info))&baseClass::OnTbInit },
00239
00240 #define ON_TB_END(baseClass) \
00241     { EV_TB_END, epV_V, UMSG_NOEXT, 0, 0, \
00242         (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnTbEnd },
00243
00244 #define ON_TB_BUTTON(baseClass) \
00245     { EV_TB_BUTTON, epV_VP, UMSG_NOEXT, 0, 0, \
00246         (UPMSG)(void (UCmdTarget::*)(UTB_BUTTON *info))&baseClass::OnTbButton },
00247
00248 #define ON_TB_DROPDOWN(baseClass) \
00249     { EV_TB_DROPDOWN, epV_VP, UMSG_NOEXT, 0, 0, \
00250         (UPMSG)(void (UCmdTarget::*)(UTB_DROPDOWN *info))&baseClass::OnTbDropDown },
00251
00252 #define ON_TB_CHECKBTN(baseClass) \
00253     { EV_TB_CHECKBTN, epV_VP, UMSG_NOEXT, 0, 0, \
00254         (UPMSG)(void (UCmdTarget::*)(UTB_BUTTON *info))&baseClass::OnTbCheckBtn },
00255
00256 #define ON_TB_GETCOLOR(baseClass) \
00257     { EV_TB_GETCOLOR, epV_iVP, UMSG_NOEXT, 0, 0, \
00258         (UPMSG)(void (UCmdTarget::*)(int cmd, float *color))&baseClass::OnTbGetColor },
00259
00260 #define ON_TB_SEPARATOR(baseClass) \
00261     { EV_TB_SEPARATOR, epV_V, UMSG_NOEXT, 0, 0, \
00262         (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnTbSeparator },
00263
00264 #define ON_UCOMMAND(cmd, hook) \
00265     { EV_CMD, epi_V, UMSG_RANGE, cmd, cmd, \
00266         (UPMSG)(int (UCmdTarget::*)(void))&hook },
00267
00268 #define ON_UCOMMAND_RANGE(cmdmin, cmdmax, hook) \
00269     { EV_CMD, epi_i, UMSG_RANGE, cmdmin, cmdmax, \
00270         (UPMSG)(int (UCmdTarget::*)(int cmd))&hook },
00271
00272 #define ON_UCOMMAND_RANGEEX(cmdmin, cmdmax, hook) \
00273     { EV_CMD, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00274         (UPMSG)(int (UCmdTarget::*)(int cmd, void *data))&hook },
00275
00276 #define ON_UUPDATECMD(cmd, hook) \
00277     { EV_UPDTCMD, epV_VP, UMSG_RANGE, cmd, cmd, \
00278         (UPMSG)(void (UCmdTarget::*)(UCmdUI *pCmdUI))&hook },
00279
00280 #define ON_FETCHCMD(baseClass, cmdmin, cmdmax) \
00281     { EV_FETCHCMD, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00282         (UPMSG)(int (UCmdTarget::*)(int cmd, void *widget))&baseClass::OnFetchCmd },
00283
00284 #define ON_UUPDATECMD_RANGE(cmdmin, cmdmax, hook) \
00285     { EV_UPDTCMD, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00286         (UPMSG)(void (UCmdTarget::*)(int cmd, UCmdUI *pCmdUI))&hook },
00287
00288 #define ON_USETTOOLTIP(cmdmin, cmdmax, hook) \
00289     { EV_SETTOOLTIP, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00290         (UPMSG)(void (UCmdTarget::*)(int cmd, UCmdUI *pCmdUI))&hook },
00291
00292 #define ON_UGETLLOC(cmdmin, cmdmax, hook) \
00293     { EV_GETLOC, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00294         (UPMSG)(void (UCmdTarget::*)(int cmd, URECT *r))&hook },
00295
00296 #define ON_USETLLOC(cmdmin, cmdmax, hook) \
00297     { EV_SETLOC, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00298         (UPMSG)(void (UCmdTarget::*)(int cmd, const URECT *r))&hook },
00299
00300 #define ON_QUERYSTATE(cmdmin, cmdmax, hook) \
00301     { EV_QUERYSTATE, epi_i, UMSG_RANGE, cmdmin, cmdmax, \
00302         (UPMSG)(int (UCmdTarget::*)(int cmd))&hook },
00303
00304 #define ON_EDITCHANGE(cmd, hook) \
00305     { EV_EDITCHANGE, epV_V, UMSG_RANGE, cmd, cmd, \
00306         (UPMSG)(void (UCmdTarget::*)(void))&hook },
00307
00308 #define ON_EDITCHANGE_RANGE(cmdmin, cmdmax, hook) \
00309     { EV_EDITCHANGE, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00310         (UPMSG)(void (UCmdTarget::*)(int cmd))&hook },
00311
00312 #define ON_EDITACTIVATE(cmd, hook) \
00313     { EV_EDITACTIVATE, epV_V, UMSG_RANGE, cmd, cmd, \
00314         (UPMSG)(void (UCmdTarget::*)(void))&hook },
00315
00316 #define ON_EDITACTIVATE_RANGE(cmdmin, cmdmax, hook) \
00317     { EV_EDITACTIVATE, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00318         (UPMSG)(void (UCmdTarget::*)(int cmd))&hook },
00319
00320 #define ON_SCROLLCHANGE(cmd, hook) \
00321     { EV_SCROLLCHANGE, epV_VP, UMSG_RANGE, cmd, cmd, \
00322         (UPMSG)(void (UCmdTarget::*)(int pos))&hook },
00323
00324 #define ON_SCROLLCHANGE_RANGE(cmdmin, cmdmax, hook) \
00325     { EV_SCROLLCHANGE, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00326         (UPMSG)(void (UCmdTarget::*)(int cmd, int pos))&hook },
00327
00328 #define ON_TIMER(cmd, hook) \
00329     { EV_TIMER, epV_VP, UMSG_RANGE, cmd, cmd, \
00330         (UPMSG)(void (UCmdTarget::*)(long time))&hook },
00331
00332 #define ON_UPDATEUI(baseClass) \
00333     { EV_UPDATEUI, epV_V, UMSG_NOEXT, 0, 0, \
00334         (UPMSG)(void (UCmdTarget::*)(void))&baseClass::OnUpdateUI },
00335
00336 #define ON_UPDATEFOCUS(baseClass) \
00337     { EV_UPDATEFOCUS, epi_iVP, UMSG_NOEXT, 0, 0, \
00338         (UPMSG)(int (UCmdTarget::*)(int leave, void *widget))&baseClass::OnUpdateFocus },
00339
00340 #define ON_SETSTATE(cmdmin, cmdmax, hook) \
00341     { EV_SETSTATE, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00342         (UPMSG)(void (UCmdTarget::*)(int cmd, int state))&hook },
00343
00344 #define ON_ENABLECMD(cmdmin, cmdmax, hook) \
00345     { EV_ENABLECMD, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00346         (UPMSG)(void (UCmdTarget::*)(int cmd, int state))&hook },
00347
00348 #define ON_CHGFOCUS(baseClass, cmdmin, cmdmax) \
00349     { EV_CHGFOCUS, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00350         (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnChgFocus },
00351
00352 #define ON_SETDEFAULT(baseClass, cmdmin, cmdmax) \
00353     { EV_SETDEFAULT, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00354         (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnSetDefault },
00355
00356 #define ON_INVALIDATE(baseClass, cmdmin, cmdmax) \
00357     { EV_INVALIDATE, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00358         (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnInvalidate },
00359
00360 #define ON_REDRAW(baseClass, cmdmin, cmdmax) \
00361     { EV_REDRAW, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00362         (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnRedraw },
00363
00364 #define ON_SHOW_WIDGET(cmd, hook) \
00365     { EV_SHOW_WIDGET, epV_I, UMSG_RANGE, cmd, cmd, \
00366         (UPMSG)(void (UCmdTarget::*)(int state))&hook },
00367
00368 #define ON_PAGE_CHANGED(baseClass, cmdmin, cmdmax) \
00369     { EV_PAGE_CHANGED, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00370         (UPMSG)(void (UCmdTarget::*)(int cmd, int pagenum))&baseClass::OnPageChanged },
00371
00372 #define ON_SHOW_WIDGET_RANGE(cmdmin, cmdmax, hook) \
00373     { EV_SHOW_WIDGET, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00374         (UPMSG)(void (UCmdTarget::*)(int cmd, int state))&hook },
00375
00376 #define ON_DROPREF(cmdmin, cmdmax, hook) \
00377     { EV_DROPREF, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00378         (UPMSG)(void (UCmdTarget::*)(int cmd, int numref, long *refs))&hook },
00379
00380 #define ON_UNOTIFY(cmd, hook) \
00381     { EV_NOTIFY, epV_V, UMSG_RANGE, cmd, cmd, \
00382         (UPMSG)(void (UCmdTarget::*)(void))&hook },
00383
00384 #define ON_INIT_WIDGET(baseClass, cmdmin, cmdmax) \
00385     { EV_INIT_WIDGET, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00386         (UPMSG)(void (UCmdTarget::*)(int, void *))&baseClass::OnInitWidget },
00387
00388 #define ON_INIT_TAB_WIDGET(baseClass, cmdmin, cmdmax) \
00389     { EV_INIT_TAB_WIDGET, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00390         (UPMSG)(void (UCmdTarget::*)(int, int, void *))&baseClass::OnInitTabWidget },
00391
00392 #define ON_SETICON(cmdmin, cmdmax, hook) \
00393     { EV_SETICON, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00394         (UPMSG)(void (UCmdTarget::*)(int, void *))&hook },
00395
00396 #define ON_SETTEXT(cmdmin, cmdmax, hook) \
00397     { EV_SETTEXT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00398         (UPMSG)(void (UCmdTarget::*)(int, const char *))&hook },
00399
00400 #define ON_GETTEXT(cmdmin, cmdmax, hook) \
00401     { EV_GETTEXT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00402         (UPMSG)(void (UCmdTarget::*)(int, UStr *))&hook },
00403
00404 #define ON_SETFLOAT(baseClass, cmdmin, cmdmax) \
00405     { EV_SETFLOAT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00406         (UPMSG)(void (UCmdTarget::*)(int cmd, const float *f))&baseClass::OnSetFloat },
00407
00408 #define ON_GETFLOAT(baseClass, cmdmin, cmdmax) \
00409     { EV_GETFLOAT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00410         (UPMSG)(void (UCmdTarget::*)(int cmd, float *f))&baseClass::OnGetFloat },
00411
00412 #define ON_DRAGQUERY(cmd, hook) \
00413     { EV_DRAGQUERY, epV_VP, UMSG_RANGE, cmd, cmd, \
00414         (UPMSG)(void (UCmdTarget::*)(UDragable *))&hook },
00415
00416 #define ON_DROPQUERY(cmd, hook) \
00417     { EV_DROPQUERY, epV_VP, UMSG_RANGE, cmd, cmd, \
00418         (UPMSG)(void (UCmdTarget::*)(UDropable **))&hook },
00419
00420 #define ON_DROPIT(cmd, hook) \
00421     { EV_DROPIT, epV_VP, UMSG_RANGE, cmd, cmd, \
00422         (UPMSG)(void (UCmdTarget::*)(const UDragable *))&hook },
00423
00424 #define ON_DRAGQUERY_RANGE(cmdmin, cmdmax, hook) \
00425     { EV_DRAGQUERY, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00426         (UPMSG)(void (UCmdTarget::*)(int, UDragable *))&hook },
00427
00428 #define ON_DROPQUERY_RANGE(cmdmin, cmdmax, hook) \
00429     { EV_DROPQUERY, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00430         (UPMSG)(void (UCmdTarget::*)(int, UDropable **))&hook },
00431
00432 #define ON_DROPIT_RANGE(cmdmin, cmdmax, hook) \
00433     { EV_DROPIT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00434         (UPMSG)(void (UCmdTarget::*)(int, const UDragable *))&hook },
00435
00436 #define ON_DROPQUERY_CMDID(baseClass) \
00437     { EV_DROPQUERY_CMDID, epV_iiVP, UMSG_NOEXT, 0, 0, \
00438         (UPMSG)(void (UCmdTarget::*)(int, int, int *))&baseClass::OnDropQueryCmdID },
00439
00440 #define ON_SET_SLIDER(baseClass, cmdmin, cmdmax) \
00441     { EV_SET_SLIDER, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00442         (UPMSG)(void (UCmdTarget::*)(int cmd, int pos))&baseClass::OnSetSlider },
00443
00444 #define ON_GET_SLIDERPROP(baseClass, cmdmin, cmdmax) \
00445     { EV_GET_SLIDERPROP, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00446         (UPMSG)(void (UCmdTarget::*)(int cmd, USLIDER *prop))&baseClass::OnGetSliderProperty },
00447
00448 #define ON_SET_SLIDERPROP(baseClass, cmdmin, cmdmax) \
00449     { EV_SET_SLIDERPROP, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00450         (UPMSG)(void (UCmdTarget::*)(int cmd, const USLIDER *prop))&baseClass::OnSetSliderProperty },
00451
00452 #define ON_TREE_RESETALL(baseClass, cmdmin, cmdmax) \
00453     { EV_TREE_RESETALL, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00454         (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnTreeResetAll },
00455
00456 #define ON_TREE_INSERT(baseClass, cmdmin, cmdmax) \
00457     { EV_TREE_INSERT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00458         (UPMSG)(void (UCmdTarget::*)(int cmd, UTREE_INSERT *data))&baseClass::OnTreeInsert },
00459
00460 #define ON_TREE_GETINFO(baseClass, cmdmin, cmdmax) \
00461     { EV_TREE_GETINFO, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00462         (UPMSG)(void (UCmdTarget::*)(int cmd, UTREE_INFO *data))&baseClass::OnTreeGetInfo },
00463
00464 #define ON_TREE_SETDATA(baseClass, cmdmin, cmdmax) \
00465     { EV_TREE_SETDATA, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00466         (UPMSG)(void (UCmdTarget::*)(int cmd, UTREE_INFO *data))&baseClass::OnTreeSetData },
00467
00468 #define ON_TREE_SETICON(baseClass, cmdmin, cmdmax) \
00469     { EV_TREE_SETICON, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00470         (UPMSG)(void (UCmdTarget::*)(int cmd, UTREE_INFO *data))&baseClass::OnTreeSetIcon },
00471
00472 #define ON_TREE_DELETE(baseClass, cmdmin, cmdmax) \
00473     { EV_TREE_DELETE, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00474         (UPMSG)(void (UCmdTarget::*)(int cmd, UTREEITEM item))&baseClass::OnTreeDelete },
00475
00476 #define ON_TREE_EXPAND(baseClass, cmdmin, cmdmax) \
00477     { EV_TREE_EXPAND, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00478         (UPMSG)(void (UCmdTarget::*)(int cmd, int collapse, UTREEITEM item))&baseClass::OnTreeExpand },
00479
00480 #define ON_TREE_SELECT(baseClass, cmdmin, cmdmax) \
00481     { EV_TREE_SELECT, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00482         (UPMSG)(void (UCmdTarget::*)(int cmd, int deselect, UTREEITEM item))&baseClass::OnTreeSelect },
00483
00484 #define ON_TREE_GETSEL(baseClass, cmdmin, cmdmax) \
00485     { EV_TREE_GETSEL, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00486         (UPMSG)(void (UCmdTarget::*)(int cmd, UTREEITEM *item))&baseClass::OnTreeGetSel },
00487
00488 #define ON_TREE_EXPANDING(cmd, hook) \
00489     { EV_TREE_EXPANDING, epV_IVP, UMSG_RANGE, cmd, cmd, \
00490         (UPMSG)(void (UCmdTarget::*)(int collapse, UTREEITEM item))&hook },
00491
00492 #define ON_TREE_SELECTING(cmd, hook) \
00493     { EV_TREE_SELECTING, epV_IVP, UMSG_RANGE, cmd, cmd, \
00494         (UPMSG)(void (UCmdTarget::*)(int deselect, UTREEITEM item))&hook },
00495
00496 #define ON_LIST_SELECTING(cmd, hook) \
00497     { EV_LIST_SELECTING, epV_IVP, UMSG_RANGE, cmd, cmd, \
00498         (UPMSG)(void (UCmdTarget::*)(int entry, const char *txt))&hook },
00499
00500 #define ON_LIST_SELCOLUMN(cmd, hook) \
00501     { EV_LIST_SELCOLUMN, epV_I, UMSG_RANGE, cmd, cmd, \
00502         (UPMSG)(void (UCmdTarget::*)(int entry))&hook },
00503
00504 #define ON_LIST_RESORT(baseClass, cmdmin, cmdmax) \
00505     { EV_LIST_RESORT, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00506         (UPMSG)(void (UCmdTarget::*)(int cmd, int column, UListSorter s))&baseClass::OnListResort },
00507
00508 #define ON_LIST_SETSORTDIR(baseClass, cmdmin, cmdmax) \
00509     { EV_LIST_RESORT, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00510         (UPMSG)(void (UCmdTarget::*)(int cmd, int column, bool dir))&baseClass::OnListSetSortDir },
00511
00512 #define ON_LIST_DBLCLICK(cmd, hook) \
00513     { EV_LIST_DBLCLICK, epV_V, UMSG_RANGE, cmd, cmd, \
00514         (UPMSG)(void (UCmdTarget::*)(void))&hook },
00515
00516 #define ON_LIST_POPUP(cmd, hook) \
00517     { EV_LIST_POPUP, epV_IVP, UMSG_RANGE, cmd, cmd, \
00518         (UPMSG)(void (UCmdTarget::*)(void))&hook },
00519
00520 #define ON_LIST_ADDSEL(baseClass, cmdmin, cmdmax) \
00521     { EV_LIST_ADDSEL, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00522         (UPMSG)(void (UCmdTarget::*)(int cmd, int entry))&baseClass::OnListAddSel },
00523
00524 #define ON_LIST_DELROW(baseClass, cmdmin, cmdmax) \
00525     { EV_LIST_DELROW, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00526         (UPMSG)(void (UCmdTarget::*)(int cmd, int row))&baseClass::OnListDelRow },
00527
00528 #define ON_LIST_RESETALL(baseClass, cmdmin, cmdmax) \
00529     { EV_LIST_RESETALL, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00530         (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnListResetAll },
00531
00532 #define ON_LIST_ADDCOLUMNS(baseClass, cmdmin, cmdmax) \
00533     { EV_LIST_ADDCOLUMNS, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00534         (UPMSG)(void (UCmdTarget::*)(int cmd, int num))&baseClass::OnListAddColumns },
00535
00536 #define ON_LIST_SHOWCOLUMNS(baseClass, cmdmin, cmdmax) \
00537     { EV_LIST_SHOWCOLUMNS, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00538         (UPMSG)(void (UCmdTarget::*)(int cmd, int num))&baseClass::OnListShowColumns },
00539
00540 #define ON_LIST_HIDECOLUMNS(baseClass, cmdmin, cmdmax) \
00541     { EV_LIST_HIDECOLUMNS, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00542         (UPMSG)(void (UCmdTarget::*)(int cmd, int num))&baseClass::OnListHideColumns },
00543
00544 #define ON_LIST_SETFEEDBACK(baseClass, cmdmin, cmdmax) \
00545     { EV_LIST_SETFEEDBACK, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00546         (UPMSG)(void (UCmdTarget::*)(int cmd, int turnOn))&baseClass::OnListSetFeedback },
00547
00548 #define ON_LIST_SETCOLTITLE(baseClass, cmdmin, cmdmax) \
00549     { EV_LIST_SETCOLTITLE, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00550         (UPMSG)(void (UCmdTarget::*)(int cmd, int num, const char *title))&baseClass::OnListSetColTitle },
00551
00552 #define ON_LIST_SETCOLWIDTH(baseClass, cmdmin, cmdmax) \
00553     { EV_LIST_SETCOLWIDTH, epV_iii, UMSG_RANGE, cmdmin, cmdmax, \
00554         (UPMSG)(void (UCmdTarget::*)(int cmd, int num, int width))&baseClass::OnListSetColWidth },
00555
00556 #define ON_LIST_NEWROW(baseClass, cmdmin, cmdmax) \
00557     { EV_LIST_NEWROW, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00558         (UPMSG)(void (UCmdTarget::*)(int cmd, int *num))&baseClass::OnListNewRow },
00559
00560 #define ON_LIST_ROWSETDATA(baseClass, cmdmin, cmdmax) \
00561     { EV_LIST_ROWSETDATA, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00562         (UPMSG)(void (UCmdTarget::*)(int cmd, int row, void *data))&baseClass::OnListRowSetData },
00563
00564 #define ON_LIST_ROWGETDATA(baseClass, cmdmin, cmdmax) \
00565     { EV_LIST_ROWGETDATA, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00566         (UPMSG)(void (UCmdTarget::*)(int cmd, int row, void **data))&baseClass::OnListRowGetData },
00567
00568 #define ON_LIST_INSERT(baseClass, cmdmin, cmdmax) \
00569     { EV_LIST_INSERT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00570         (UPMSG)(void (UCmdTarget::*)(int cmd, ULIST_INSERT *data))&baseClass::OnListInsert },
00571
00572 #define ON_LIST_GETNEXTSEL(baseClass, cmdmin, cmdmax) \
00573     { EV_LIST_GETNEXTSEL, epi_ii, UMSG_RANGE, cmdmin, cmdmax, \
00574         (UPMSG)(int (UCmdTarget::*)(int cmd, int selectedCell))&baseClass::OnListGetNextSel },
00575
00576 #define ON_LIST_GETNEXT(baseClass, cmdmin, cmdmax) \
00577     { EV_LIST_GETNEXT, epi_ii, UMSG_RANGE, cmdmin, cmdmax, \
00578         (UPMSG)(int (UCmdTarget::*)(int cmd, int whichCell))&baseClass::OnListGetNext },
00579
00580 #define ON_LIST_GETINFO(baseClass, cmdmin, cmdmax) \
00581     { EV_LIST_GETINFO, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00582         (UPMSG)(void (UCmdTarget::*)(int cmd, ULIST_INFO *data))&baseClass::OnListGetInfo },
00583
00584 #define ON_COMBO_RESETALL(baseClass, cmdmin, cmdmax) \
00585     { EV_COMBO_RESETALL, epV_i, UMSG_RANGE, cmdmin, cmdmax, \
00586         (UPMSG)(void (UCmdTarget::*)(int cmd))&baseClass::OnComboResetAll },
00587
00588 #define ON_COMBO_APPEND(baseClass, cmdmin, cmdmax) \
00589     { EV_COMBO_APPEND, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00590         (UPMSG)(void (UCmdTarget::*)(int cmd, const char *txt))&baseClass::OnComboAppend },
00591
00592 #define ON_COMBO_SETSEL(baseClass, cmdmin, cmdmax) \
00593     { EV_COMBO_SETSEL, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00594         (UPMSG)(void (UCmdTarget::*)(int cmd, int sel))&baseClass::OnComboSetPos },
00595
00596 #define ON_COMBO_DELSEL(baseClass, cmdmin, cmdmax) \
00597     { EV_COMBO_DELSEL, epV_ii, UMSG_RANGE, cmdmin, cmdmax, \
00598         (UPMSG)(void (UCmdTarget::*)(int cmd, int sel))&baseClass::OnComboDelSel },
00599
00600 #define ON_COMBO_ENABLESEL(baseClass, cmdmin, cmdmax) \
00601     { EV_COMBO_ENABLESEL, epV_iii, UMSG_RANGE, cmdmin, cmdmax, \
00602         (UPMSG)(void (UCmdTarget::*)(int cmd, int sel, int state))&baseClass::OnComboEnableSel },
00603
00604 #define ON_COMBO_GETSEL(baseClass, cmdmin, cmdmax) \
00605     { EV_COMBO_GETSEL, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00606         (UPMSG)(int (UCmdTarget::*)(int cmd, UStr *txt))&baseClass::OnComboGetPos },
00607
00608 #define ON_COMBO_GETMENU(baseClass, cmdmin, cmdmax) \
00609     { EV_COMBO_GETMENU, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00610         (UPMSG)(void (UCmdTarget::*)(int cmd, UMENU *menu))&baseClass::OnComboGetMenu },
00611
00612 #define ON_COMBO_GETCOUNT(baseClass, cmdmin, cmdmax) \
00613     { EV_COMBO_GETCOUNT, epi_i, UMSG_RANGE, cmdmin, cmdmax, \
00614         (UPMSG)(int (UCmdTarget::*)(int cmd))&baseClass::OnComboGetCount },
00615
00616 #define ON_COMBO_SEL(cmd, hook) \
00617     { EV_COMBO_SEL, epV_IVP, UMSG_RANGE, cmd, cmd, \
00618         (UPMSG)(void (UCmdTarget::*)(int pos, const char *txt))&hook },
00619
00620 #define ON_COMBO_SEL_RANGE(cmdmin, cmdmax, hook) \
00621     { EV_COMBO_SEL, epV_iiVP, UMSG_RANGE, cmdmin, cmdmax, \
00622         (UPMSG)(void (UCmdTarget::*)(int cmd, int pos, const char *txt))&hook },
00623
00624 #define ON_SMARTCOMBO_SETFEATURE(baseClass, cmdmin, cmdmax) \
00625     { EV_SMARTCOMBO_SETFEATURE, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00626         (UPMSG)(void (UCmdTarget::*)(int cmd, int feature))&baseClass::OnSmartComboSetFeature },
00627
00628 #define ON_SMARTCOMBO_SETITEMS(baseClass, cmdmin, cmdmax) \
00629     { EV_SMARTCOMBO_SETITEMS, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00630         (UPMSG)(void (UCmdTarget::*)(int cmd, CMString* items))&baseClass::OnSmartComboSetItems },
00631
00632 #define ON_SMARTCOMBO_SETREADONLY(baseClass, cmdmin, cmdmax) \
00633     { EV_SMARTCOMBO_SETREADONLY, epi_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00634         (UPMSG)(void (UCmdTarget::*)(int cmd, bool readOnly))&baseClass::OnSmartComboSetReadOnly },
00635
00636 #define ON_CUSTOM_CLICK(cmd, hook) \
00637     { EV_CUSTOM_CLICK, epV_VP, UMSG_RANGE, cmd, cmd, \
00638         (UPMSG)(void (UCmdTarget::*)(void *drawInfo))&hook },
00639 #define ON_CUSTOM_DRAW(cmd, hook) \
00640     { EV_CUSTOM_DRAW, epV_VP, UMSG_RANGE, cmd, cmd, \
00641         (UPMSG)(void (UCmdTarget::*)(void *drawInfo))&hook },
00642
00643 #define ON_CUSTOM_DRAW_RANGE(cmdmin, cmdmax, hook) \
00644     { EV_CUSTOM_DRAW, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00645         (UPMSG)(void (UCmdTarget::*)(int cmd, void *drawInfo))&hook },
00646
00647 #define ON_STATUSBAR_TEXT(baseClass, cmdmin, cmdmax) \
00648     { EV_STATUSBAR_TEXT, epV_iVP, UMSG_RANGE, cmdmin, cmdmax, \
00649         (UPMSG)(void (UCmdTarget::*)(int cmd, const char *txt))&baseClass::OnStatusBarText },
00650 //}
00651
00652 typedef enum
00653 {
00654     epNone,
00655     epV_V,      // void (void)
00656     epV_VP,     // void (arg2)
00657     epV_iVP,    // void (arg1, arg2)
00658     epV_IVP,    // void (HI(arg1), arg2)
00659     epV_i,      // void (arg1)
00660     epV_I,      // void (HI(arg1))
00661     epV_ii,     // void (LO(arg1), HI(arg1))
00662     epV_iii,    // void (LO(arg1), HI(arg1), (int)arg2)
00663     epV_iiVP,   // void (LO(arg1), HI(arg1), arg2)
00664     epi_i,      // int (arg1)
00665     epi_V,      // int (void)
00666     epi_ii,     // int (LO(arg1), HI(arg1))
00667     epi_iVP,    // int (arg1, arg2)
00668     epi_VP      // int (arg2)
00669 } UEventParam;
00670
00671 typedef enum
00672 {
00673     UMSG_NOEXT,
00674     UMSG_RANGE
00675 } UMSG_EXT;
00676
00677 struct UMSGMAP_ENTRY
00678 {
00679     int/*UEventType*/ nMessage;   // message
00680     UEventParam nSig;       // signature type (parameters)
00681     UMSG_EXT ext;
00682     int ext1;
00683     int ext2;
00684     UPMSG pfn;    // routine to call
00685 };
00686
00687 struct UMSGMAP
00688 {
00689     const UMSGMAP* pBaseMap;
00690     const UMSGMAP_ENTRY* lpEntries;
00691 };
00692
00693 //{ #define UDECLARE_MESSAGE_MAP()
00694 #define UDECLARE_MESSAGE_MAP() \
00695 private: \
00696     static const UMSGMAP_ENTRY _messageEntries[]; \
00697 protected: \
00698     static const UMSGMAP messageMap; \
00699     static const UMSGMAP* GetBaseMessageMap(); \
00700     static const UMSGMAP* GetThisMessageMap(); \
00701     virtual const UMSGMAP* GetMessageMap() const; \
00702
00703 //}
00704
00705 //{ #define UBEGIN_MESSAGE_MAP(theClass, baseClass)
00706 #define UBEGIN_MESSAGE_MAP(theClass, baseClass) \
00707     const UMSGMAP* theClass::GetBaseMessageMap() \
00708         { return baseClass::GetThisMessageMap(); } \
00709     const UMSGMAP* theClass::GetThisMessageMap() \
00710         { return &theClass::messageMap; } \
00711     const UMSGMAP* theClass::GetMessageMap() const \
00712         { return &theClass::messageMap; } \
00713     const UMSGMAP theClass::messageMap = \
00714     { baseClass::GetThisMessageMap(), &theClass::_messageEntries[0] }; \
00715     const UMSGMAP_ENTRY theClass::_messageEntries[] = \
00716     { \
00717
00718 //}
00719
00720 //{ #define UEND_MESSAGE_MAP()
00721 #define UEND_MESSAGE_MAP() \
00722         {EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 } \
00723     }; \
00724 //}
00725
00726 #define ev_msg // intentional placeholder
00727
00728 class UEXPORT UCmdTarget : public UObject
00729 {
00730     UDECLARE_DYNAMIC(UCmdTarget)
00731 public:
00732     UCmdTarget(int widid);
00733     virtual ~UCmdTarget();
00734
00735     typedef enum
00736     {
00737         kUNoDispatchInfo,
00738         kUDispatchHandled = 0x01
00739     } UDispatchInfo;
00740
00742     virtual int UDispatchMessage(int/*UEventType*/ evt, int arg1, void *arg2, UDispatchInfo & dispatchInfo);
00743
00744     inline int GetWidID(void) const { return m_widid; }
00745 private:
00746     int m_widid;
00747
00748     UDECLARE_MESSAGE_MAP()
00749 };
00750
00751 // the interface will ask regularly the widget if they want to be
00752 // disabled, checked (EV_UPDTCMD)...
00753 class UCmdUI
00754 {
00755 public:
00756     UCmdUI(int id) : m_nID(id)
00757 #ifdef qUnix
00758     , pCmdUI(0L)
00759 #endif
00760 #ifdef WIN32
00761     , pCmdUI(0L)
00762     , pNMHDR(0L)
00763 #endif
00764 #ifdef qMacPP
00765     , m_wrapper(0L)
00766 #endif
00767     , m_widget(0L)
00768     , m_continue(true)
00769         {}
00770     virtual ~UCmdUI() {}
00771
00772 // Attributes
00773     int m_nID;
00774
00775 // Operations to do in ON_UUPDATECMD
00776     virtual void Enable(bool bOn = true);
00777     virtual void Check(bool bOn = true);
00778     virtual void SetText(const char *title);
00779         // by default this sets the continue state to false.
00780
00781     inline void SetContinue(bool state) { m_continue = state; }
00782     inline bool CanContinue(void) { return m_continue; }
00783
00784 // Operations to do in ON_USETTOOLTIP
00785     virtual void SetTooltip(const char *tooltip);
00786 #ifdef qUnix
00787     class UCmdUI *pCmdUI;
00788 #endif
00789 #ifdef WIN32
00790     class CCmdUI *pCmdUI;
00791     void *pNMHDR;
00792 #endif
00793 #ifdef qMacPP
00794     struct UPseudoCmdStatusWrapper *m_wrapper;
00795 #endif
00796     void *m_widget;
00797     bool m_continue;
00798 };
00799
00800 class USemaphore
00801 {
00802 public:
00803     USemaphore(bool & semaphore) : m_semaphore(semaphore), m_didSetSemaphore(false),
00804         m_enteredTwice(false)
00805     {
00806         if(m_semaphore)
00807         {
00808             m_enteredTwice = true;
00809             return;
00810         }
00811         m_semaphore = true;
00812         m_didSetSemaphore = true;
00813     }
00814
00815     ~USemaphore()
00816     {
00817         if(m_didSetSemaphore)
00818             m_semaphore = false;
00819     }
00820
00821     inline bool IsEnteredTwice() const { return m_enteredTwice; }
00822
00823 protected:
00824     bool & m_semaphore;
00825     bool m_didSetSemaphore;
00826     bool m_enteredTwice;
00827 };
00828 #endif /* __cplusplus */
00829
00830 #define UMAKEINT(a, b)       ((int)(((short)(a)) | ((int)((short)(b))) << 16))
00831 #define ULOWORD(l)           ((short)(l))
00832 #define UHIWORD(l)           ((short)(((int)(l) >> 16) & 0xFFFF))
00833
00834 //{ #define UK_*
00835 /* Modifier codes */
00836 #define UK_LBUTTON        0x01
00837 #define UK_MBUTTON        0x02
00838 #define UK_RBUTTON        0x04
00839 #define UK_CONTROL        0x08
00840 #define UK_SHIFT          0x10
00841 #define UK_ALT            0x20
00842
00843 /* Keyboard codes (non listed are ASCII codes) */
00844 #define UK_CANCEL         0x03
00845 #define UK_BACK           0x08
00846 #define UK_TAB            0x09
00847 #define UK_CLEAR          0x0C
00848 #define UK_RETURN         0x0D
00849 #define UK_ESCAPE         0x1B
00850 #define UK_SPACE          0x20
00851 #define UK_PRIOR          0x21
00852 #define UK_NEXT           0x22
00853 #define UK_END            0x23
00854 #define UK_HOME           0x24
00855 #define UK_LEFT           0x25
00856 #define UK_UP             0x26
00857 #define UK_RIGHT          0x27
00858 #define UK_DOWN           0x28
00859 #define UK_INSERT         0x2D
00860 #define UK_DELETE         0x2E
00861 #define UK_HELP           0x2F
00862
00863 #define UK_PLUS           0x6B
00864 #define UK_MINUS          0x6D
00865
00866 #define UK_NUMPAD0        0x60
00867 #define UK_NUMPAD1        0x61
00868 #define UK_NUMPAD2        0x62
00869 #define UK_NUMPAD3        0x63
00870 #define UK_NUMPAD4        0x64
00871 #define UK_NUMPAD5        0x65
00872 #define UK_NUMPAD6        0x66
00873 #define UK_NUMPAD7        0x67
00874 #define UK_NUMPAD8        0x68
00875 #define UK_NUMPAD9        0x69
00876 #define UK_MULTIPLY       0x6A
00877 #define UK_ADD            0x6B
00878 #define UK_SEPARATOR      0x6C
00879 #define UK_SUBTRACT       0x6D
00880 #define UK_DECIMAL        0x6E
00881 #define UK_DIVIDE         0x6F
00882 #define UK_F1             0x70
00883 #define UK_F2             0x71
00884 #define UK_F3             0x72
00885 #define UK_F4             0x73
00886 #define UK_F5             0x74
00887 #define UK_F6             0x75
00888 #define UK_F7             0x76
00889 #define UK_F8             0x77
00890 #define UK_F9             0x78
00891 #define UK_F10            0x79
00892 #define UK_F11            0x7A
00893 #define UK_F12            0x7B
00894 #define UK_F13            0x7C
00895 #define UK_F14            0x7D
00896 #define UK_F15            0x7E
00897 #define UK_F16            0x7F
00898 #define UK_F17            0x80
00899 #define UK_F18            0x81
00900 #define UK_F19            0x82
00901 #define UK_F20            0x83
00902 #define UK_F21            0x84
00903 #define UK_F22            0x85
00904 #define UK_F23            0x86
00905 #define UK_F24            0x87
00906 //}
00907
00908 #ifdef WIN32
00909 #   define WINCMD_DLG_START 2000
00910 #   define WINCMD_DLG_END 3000
00911 #   define UCMD_to_WINCMD(cmd) (cmd)
00912 #   define WINCMD_to_UCMD(cmd) (cmd)
00913 #   define UCMD_to_WINCTL(cmd) ((cmd)-EV_COMMAND_START+WINCMD_DLG_START)
00914 #   define WINCTL_to_UCMD(cmd) ((cmd)-WINCMD_DLG_START+EV_COMMAND_START)
00915 #endif
00916
00917 /* see umenu.h */
00918 typedef long UMENU;
00919 #define UMENU_NULL ((UMENU)0L)
00920
00921 /* toolbar manager */
00922 #define UTB_SEPARATOR (-1)
00923 typedef struct
00924 {
00925     int widthbtn, heightbtn;    /* dimensions of each icon */
00926     const char *title;          /* title bar */
00927 #ifdef WIN32
00928     int winid;                  /* if for the toolbar (WIN32 only) */
00929 #endif
00930 } UTB_INIT;
00931
00932 typedef enum
00933 {
00934     DDV_NONE
00935 } UTB_VAR;
00936
00937 typedef enum
00938 {
00939     DDD_NONE = 0x00
00940 } UTB_DROP;
00941
00942 typedef struct
00943 {
00944     const void *icon;       /* icon data (XPM) */
00945     int cmd;                /* associated command */
00946     UTB_VAR varcode;        /* misc. option */
00947     UTB_DROP drop;          /* for drag'n drop */
00948     const char *tooltip;    /* status tooltip/nprompt tooltip */
00949 } UTB_BUTTON;
00950
00951 typedef struct
00952 {
00953     int initialcmd;         /* initial value */
00954     UTB_BUTTON *btns;       /* all the dropdown buttons */
00955     const char *tooltip;    /* status tooltip/nprompt tooltip */
00956 } UTB_DROPDOWN;
00957
00958 typedef struct
00959 {
00960     int max; /* maximum of the scroll range */
00961     int min; /* minimum of the scroll range */
00962     int inc; /* increment of the scroll */
00963     int pos; /* current position of the slider */
00964 } USLIDER;
00965
00966 typedef enum
00967 {
00968     uCursArrow,
00969     uCursWatch
00970 } UCURSOR;
00971
00972 typedef struct
00973 {
00974     int cx, cy;
00975 } USIZE;
00976
00977 typedef struct
00978 {
00979     int x, y;
00980 } UPOINT;
00981
00982 typedef struct
00983 {
00984     int left, top, right, bottom;
00985 } URECT;
00986
00987 typedef void *UTREEITEM;
00988
00989 typedef struct
00990 {
00991     const char *title;          /* tree item title */
00992     UTREEITEM parent;           /* 0L if root */
00993     UTREEITEM result;           /* pointer on the result item */
00994     void *icon;                 /* icon of the item, 0L if any */
00995     void *data;                 /* user data of the item, 0L if any */
00996 } UTREE_INSERT;
00997
00998 typedef struct
00999 {
01000     UTREEITEM item;         /* pointer on the item */
01001     UTREEITEM parent;       /* pointer on the parent (0L if any) */
01002     UTREEITEM next;         /* pointer on the next item (0L if any) */
01003     UTREEITEM child;        /* pointer on the first child item (0L if any) */
01004     void *data;             /* data of the item */
01005     char *title;            /* title of the item */
01006     void *icon;             /* icon of the item */
01007     int expanded;           /* item is expanded */
01008 } UTREE_INFO;
01009
01010 typedef struct
01011 {
01012     int row, col;               /* the coordinates of the entry */
01013     const char *title;          /* the title of the entry (0L if any) */
01014     void *icon;                 /* the icon of the entry (0L if any) */
01015 } ULIST_INSERT;
01016
01017 typedef int (*UListSorter)(UWidget *wid, void *data1, void *data2);
01018
01019 typedef struct
01020 {
01021     int row, col;               /* the coordinates of the entry */
01022     const char *title;          /* the title of the entry (0L if any) */
01023     void *data;                 /* the user data */
01024 } ULIST_INFO;
01025
01026 #ifdef __cplusplus
01027 extern "C" {
01028 #endif
01029
01030 UEXPORT int UEventSendMessage(int wid, int/*UEventType*/ evt, int arg1, void *arg2);
01031     /* send a message to a pseudo-widget */
01032
01033 UEXPORT int UEventSendMessageExt(int wid, int/*UEventType*/ evt, int arg1, void *arg2, int * handledFlag);
01034     /* send a message to a pseudo-widget and tells if the message was handled */
01035
01036 UEXPORT int UEventPostMessage(int wid, int/*UEventType*/ evt, int arg1, void *arg2);
01037     /* post a message to a pseudo-widget (get executed later) */
01038
01039 UEXPORT int UEventNotifyMessage(int/*UEventType*/ evt, int arg1, void *arg2);
01040     /* send a message to all the current pseudo-widget */
01041
01042 UEXPORT int UEventGetWidID(void);
01043     /* create a new widget id */
01044
01045 UEXPORT void UEventRemoveWidID(int widid);
01046     /* remove the widget from the broadcast list */
01047
01048 UEXPORT void UEventSetTooltipHandler(void (*handler) (const char *));
01049     /* set the handler (usually a status bar) called when happens a tooltip call */
01050
01051 UEXPORT void UEventGiveTime(void);
01052     /* give some time to the event manager for handling internal timers */
01053
01054 UEXPORT long UTickCount(void);
01055     /* in milliseconds */
01056
01057 #ifdef __cplusplus
01058 }
01059 #endif
01060
01061 #ifdef __cplusplus
01062 #   include <map>
01063
01064     UEXPORT UCmdTarget *UEventQueryWidget(int widid);
01065         /* search for a widget (0L if failed) */
01066
01067     UEXPORT const STD map<int, UCmdTarget *> & UEventGetTargets(void);
01068         /* return the list of the current pseudo targets */
01069
01070 #   ifdef WIN32
01071         // XPM wrappers
01072         UEXPORT HBITMAP UMakeBitmap(const char *icon);
01073         UEXPORT HBITMAP UMakeBitmap(char **icon);
01074         UEXPORT HBITMAP UMakeBitmap(char **icon, int & width, int & height, COLORREF back);
01075 #   else /* !WIN32 */
01076 #       define UMakeBitmap(b) 0L
01077 #   endif /* !WIN32 */
01078 #endif
01079
01080 #endif /* UEVENT_H */
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/EditorMonDlg.cpp Source File

common/EditorMonDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2001
00019  */
00020
00021 /*
00022  * EditorMonDlg.cpp --- editor monitor dialog
00023  */
00024
00025 #include "stdafx.h"
00026 #include "CvsPrefs.h"
00027 #include "CvsCommands.h"
00028
00029 #ifdef WIN32
00030 #include "wincvs.h"
00031 #include "EditorMonDlg.h"
00032 #endif /* WIN32 */
00033
00034 #include "CvsAlert.h"
00035 #include "LaunchHandlers.h"
00036
00037 #ifdef _DEBUG
00038 #define new DEBUG_NEW
00039 #undef THIS_FILE
00040 static char THIS_FILE[] = __FILE__;
00041 #endif
00042
00044 // CEditorMonDlg dialog
00045
00046 #ifdef WIN32
00047
00048 CEditorMonDlg::CEditorMonDlg(CWnd* pParent /*=NULL*/)
00049     : CHHelpDialog(CEditorMonDlg::IDD, pParent)
00050 {
00051     //{{AFX_DATA_INIT(CEditorMonDlg)
00052     m_tempFile = _T("");
00053     //}}AFX_DATA_INIT
00054 }
00055
00056
00057 void CEditorMonDlg::DoDataExchange(CDataExchange* pDX)
00058 {
00059     CHHelpDialog::DoDataExchange(pDX);
00060     //{{AFX_DATA_MAP(CEditorMonDlg)
00061     DDX_Text(pDX, IDC_TEMPFILE, m_tempFile);
00062     //}}AFX_DATA_MAP
00063 }
00064
00065
00066 BEGIN_MESSAGE_MAP(CEditorMonDlg, CHHelpDialog)
00067     //{{AFX_MSG_MAP(CEditorMonDlg)
00068     ON_WM_DESTROY()
00069     ON_WM_TIMER()
00070     ON_BN_CLICKED(IDHELP, OnHelp)
00071     //}}AFX_MSG_MAP
00072 END_MESSAGE_MAP()
00073
00075 // CEditorMonDlg message handlers
00076
00078 void CEditorMonDlg::OnDestroy()
00079 {
00080     if( m_timer )
00081     {
00082         KillTimer(m_timer);
00083     }
00084
00085     CHHelpDialog::OnDestroy();
00086 }
00087
00089 BOOL CEditorMonDlg::OnInitDialog()
00090 {
00091     CHHelpDialog::OnInitDialog();
00092
00093     // Extra initialization
00094     m_timer = SetTimer(2048, 200, NULL);
00095
00096     return TRUE;  // return TRUE unless you set the focus to a control
00097                   // EXCEPTION: OCX Property Pages should return FALSE
00098 }
00099
00100 void CEditorMonDlg::InitHelpID()
00101 {
00102     SetCtrlHelpID(IDC_TEMPFILE, IDH_IDC_TEMPFILE);
00103 }
00104
00106 void CEditorMonDlg::OnHelp()
00107 {
00108     ShowHelp();
00109 }
00110
00112 void CEditorMonDlg::OnTimer(UINT nIDEvent)
00113 {
00114     if( nIDEvent == m_timer && INVALID_HANDLE_VALUE != m_hProcess )
00115     {
00116         const DWORD status = WaitForSingleObject(m_hProcess, 0);
00117         if( status == WAIT_OBJECT_0 )
00118         {
00119             EndDialog(IDOK);
00120         }
00121     }
00122
00123     CHHelpDialog::OnTimer(nIDEvent);
00124 }
00125
00126 #endif /* WIN32 */
00127
00129 bool CompatGetEditorMsg(UStr& message)
00130 {
00131     bool msgOK = false;
00132
00133     if( gCvsPrefs.Viewer() == 0L )
00134     {
00135         CvsAlert(kCvsAlertStopIcon,
00136             "No default editor specified.", "You need to define a default editor in the preferences",
00137             BUTTONTITLE_OK, NULL).ShowAlert();
00138
00139         return msgOK;
00140     }
00141
00142 #ifdef WIN32
00143     CStr tmpFile;
00144     if( MakeTmpFile(tmpFile, "LogMsg", "tmp", true) )
00145     {
00146         // Launch editor
00147         PROCESS_INFORMATION sProcessInformation;
00148         if( LaunchDefaultEditor(tmpFile, (void*)&sProcessInformation) )
00149         {
00150             // We don't need the thread's handle so close it now
00151             CloseHandle(sProcessInformation.hThread);
00152
00153             // Track the editor until it closes
00154             CStr uppath, folder;
00155             SplitPath(tmpFile, uppath, folder);
00156
00157             CEditorMonDlg editorMonDlg;
00158             editorMonDlg.m_hProcess = sProcessInformation.hProcess;
00159             editorMonDlg.m_tempFile = folder;
00160
00161             if( editorMonDlg.DoModal() == IDOK )
00162             {
00163                 msgOK = true;
00164             }
00165             else
00166             {
00167                 if( PostThreadMessage(sProcessInformation.dwThreadId, WM_QUIT, (WPARAM)EXIT_SUCCESS, 0) )
00168                 {
00169                     WaitForSingleObject(sProcessInformation.hProcess, 500);
00170                 }
00171
00172                 int nStatus = WaitForSingleObject(sProcessInformation.hProcess, 0);
00173                 if( nStatus != WAIT_OBJECT_0 )
00174                 {
00175                     TerminateProcess(sProcessInformation.hProcess, EXIT_SUCCESS);
00176                 }
00177             }
00178
00179             CloseHandle(sProcessInformation.hProcess);
00180         }
00181
00182         // Copy the file into message string
00183         FILE* stream = fopen(tmpFile, "r");
00184         if( stream )
00185         {
00186             char line[100];
00187             while( fgets(line, 100, stream) )
00188             {
00189                 message << line;
00190             }
00191
00192             fclose(stream);
00193         }
00194
00195         // Cleanup
00196         ::DeleteFile(tmpFile);
00197     }
00198
00199 #endif /* WIN32 */
00200
00201 // the code below might help to do stuff on Unix or Mac later on
00202 #if 0
00203     const char * argv[2] = { 0L, 0L };
00204     CStr program;
00205     if(strchr(gCvsPrefs.Viewer(), ' ') != 0L)
00206     {
00207         program << '\"';
00208         program << gCvsPrefs.Viewer();
00209         program << '\"';
00210     }
00211     else
00212         program = gCvsPrefs.Viewer();
00213
00214     argv[0] = program;
00215     int process = _spawnvp(_P_NOWAIT, gCvsPrefs.Viewer(), argv);
00216 #endif
00217
00218
00219 #ifdef qMacCvsPP
00220 #endif /* qMacCvsPP */
00221 #if qUnix
00222 #endif // qUnix
00223
00224     return msgOK;
00225 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MakeSurePathExists.h Source File

common/MakeSurePathExists.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * MakeSurePathExists.h --- check if the directory exists and prompt to create one if it doesn't
00019  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- January 27, 2001
00020  * Modified :
00021  */
00022
00023 #ifndef __MAKESUREPATHEXISTS_H__
00024 #define __MAKESUREPATHEXISTS_H__
00025
00026 bool CreateFolder(const char* fn);
00027 bool CompatMakeSurePathExists(const char* path, bool promptForCreation = true);
00028
00029 #endif //__MAKESUREPATHEXISTS_H__
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MultilineEntryDlg.cpp Source File

WinCvs/MultilineEntryDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2003
00019  */
00020
00021 /*
00022  * CommitDlg.cpp : Multiline entry complex
00023  */
00024
00025 #include "stdafx.h"
00026 #include "wincvs.h"
00027 #include <process.h>
00028
00029 #include "MultilineEntryDlg.h"
00030 #include "CvsPrefs.h"
00031 #include "MultiFiles.h"
00032 #include "getline.h"
00033 #include "MultiString.h"
00034 #include "CvsCommands.h"
00035 #include "EditorMonDlg.h"
00036 #include "ItemListDlg.h"
00037 #include "BrowseViewHandlers.h"
00038 #include "GetPrefs.h"
00039 #include "TemplateDlg.h"
00040 #include "LineCmd.h"
00041 #include "CvsRootDlg.h"
00042
00043 #ifdef _DEBUG
00044 #define new DEBUG_NEW
00045 #undef THIS_FILE
00046 static char THIS_FILE[] = __FILE__;
00047 #endif
00048
00049 #define ENTRY_LOGMESSAGE_DESC_FORMAT    "Enter the log &message (%s):"
00050 #define ENTRY_CMDLINE_DESC_FORMAT       "Enter the &command line (%s):"
00051 #define ENTRY_STATE_DESC_FORMAT         "Enter the &state (%s):"
00052 #define ENTRY_DESCRIPTION_DESC_FORMAT   "Enter the &description (%s):"
00053
00055 // CMultiLineEditDialogKeyHelper
00056
00057 CMultiLineEditDialogKeyHelper::CMultiLineEditDialogKeyHelper()
00058     : m_pDlg(NULL), m_hParentDlg(NULL), m_ctrlPressedOnOK(FALSE)
00059 {
00060 }
00061
00068 void CMultiLineEditDialogKeyHelper::Create(const ctrlPressedOnOK, CDialog* pDlg, const HWND hParentDlg /*= NULL*/)
00069 {
00070     m_ctrlPressedOnOK = ctrlPressedOnOK;
00071
00072     m_pDlg = pDlg;
00073     m_hParentDlg = hParentDlg;
00074 }
00075
00081 BOOL CMultiLineEditDialogKeyHelper::RelayEvent(const MSG* pMsg)
00082 {
00083     BOOL res = FALSE;
00084
00085     if( pMsg->message == WM_KEYDOWN )
00086     {
00087         switch( (int)pMsg->wParam )
00088         {
00089         case VK_ESCAPE:
00090             {
00091                 if( m_pDlg )
00092                 {
00093                     m_pDlg->EndDialog(IDCANCEL);
00094                     res = TRUE;
00095                 }
00096
00097                 if( m_hParentDlg )
00098                 {
00099                     CDialog* pDialog = (CDialog*)CWnd::FromHandle(m_hParentDlg);
00100                     if( pDialog )
00101                     {
00102                         pDialog->EndDialog(IDCANCEL);
00103                         res = TRUE;
00104                     }
00105                 }
00106
00107             }
00108             break;
00109         case VK_RETURN:
00110             {
00111                 const BOOL ctrlKeyPressed = ::GetKeyState(VK_CONTROL) < 0;
00112
00113                 if( !m_ctrlPressedOnOK && !ctrlKeyPressed ||
00114                     m_ctrlPressedOnOK && ctrlKeyPressed )
00115                 {
00116                     if( m_pDlg )
00117                     {
00118                         res = TRUE;
00119
00120                         if( m_pDlg->UpdateData() )
00121                         {
00122                             m_pDlg->EndDialog(IDOK);
00123                         }
00124                         else
00125                         {
00126                             break;
00127                         }
00128                     }
00129
00130                     if( m_hParentDlg )
00131                     {
00132                         CDialog* pDialog = (CDialog*)CWnd::FromHandle(m_hParentDlg);
00133                         if( pDialog )
00134                         {
00135                             if( pDialog->UpdateData() )
00136                             {
00137                                 pDialog->EndDialog(IDOK);
00138                             }
00139
00140                             res = TRUE;
00141                         }
00142                     }
00143                 }
00144             }
00145             break;
00146         default:
00147             // Nothing to do
00148             break;
00149         }
00150     }
00151
00152     return res;
00153 }
00154
00159 const char* CMultiLineEditDialogKeyHelper::FormatLineBreakHint() const
00160 {
00161     return m_ctrlPressedOnOK ? "Enter for line break, Ctrl+Enter to confirm dialog" : "Ctrl+Enter for line break, Enter to confirm dialog";
00162 }
00163
00165 // CMultilineEntryDlg
00166
00167 IMPLEMENT_DYNAMIC(CMultilineEntryDlg, CHHelpPropertyPage)
00168
00169 CMultilineEntryDlg::CMultilineEntryDlg(const MultiFiles* mf)
00170     : m_mf(mf), m_actionCombo(CSmartComboBox::AutoDropWidth), CHHelpPropertyPage(CMultilineEntryDlg::IDD)
00171 {
00172     //{{AFX_DATA_INIT(CMultilineEntryDlg)
00173     m_entryText = _T("");
00174     m_wordWrap = FALSE;
00175     //}}AFX_DATA_INIT
00176
00177     m_switchingWrap = false;
00178     m_firstFocus = true;
00179     m_wordWrap = gCvsPrefs.WordWrapLogMsg();
00180 }
00181
00182 CMultilineEntryDlg::~CMultilineEntryDlg()
00183 {
00184 }
00185
00186 void CMultilineEntryDlg::DoDataExchange(CDataExchange* pDX)
00187 {
00188     CHHelpPropertyPage::DoDataExchange(pDX);
00189     //{{AFX_DATA_MAP(CMultilineEntryDlg)
00190     DDX_Control(pDX, IDC_MULTILINE_POSITION, m_editPositionEdit);
00191     DDX_Control(pDX, IDC_MULTILINE_ACTION, m_actionCombo);
00192     DDX_Control(pDX, IDC_MULTILINE_TYPE, m_entryStatic);
00193     DDX_Control(pDX, IDC_MULTILINE_WORDWRAP, m_wordWrapCtrl);
00194     DDX_Control(pDX, IDC_MULTILINE_ENTRY_WRAP, m_entryTextCtrlWrap);
00195     DDX_Control(pDX, IDC_MULTILINE_ENTRY, m_entryTextCtrl);
00196     DDX_Control(pDX, IDC_MULTILINE_PREV_ENTRY, m_prevLogsCombo);
00197     DDX_Check(pDX, IDC_MULTILINE_WORDWRAP, m_wordWrap);
00198     //}}AFX_DATA_MAP
00199
00200     if( !pDX->m_bSaveAndValidate )
00201     {
00202         DDX_Text(pDX, IDC_MULTILINE_ENTRY_WRAP, m_entryText);
00203         DDX_Text(pDX, IDC_MULTILINE_ENTRY, m_entryText);
00204     }
00205     else
00206     {
00207         DDX_Text(pDX, GetEntryTextID(), m_entryText);
00208     }
00209
00210     if( pDX->m_bSaveAndValidate )
00211     {
00212         if( !m_entryText.IsEmpty() )
00213         {
00214             m_pPreviousEntries->Insert(m_entryText);
00215         }
00216     }
00217     else
00218     {
00219         DDX_ComboMString(pDX, IDC_MULTILINE_PREV_ENTRY, m_prevLogsCombo);
00220     }
00221 }
00222
00223 BEGIN_MESSAGE_MAP(CMultilineEntryDlg, CHHelpPropertyPage)
00224     //{{AFX_MSG_MAP(CMultilineEntryDlg)
00225     ON_CBN_SELCHANGE(IDC_MULTILINE_PREV_ENTRY, OnSelchangeCombo)
00226     ON_WM_ERASEBKGND()
00227     ON_BN_CLICKED(IDC_MULTILINE_WORDWRAP, OnWordwrap)
00228     ON_BN_CLICKED(IDC_MULTILINE_GO_ACTION, OnActionGo)
00229     ON_EN_SETFOCUS(IDC_MULTILINE_ENTRY, OnSetfocusLogmsg)
00230     ON_EN_SETFOCUS(IDC_MULTILINE_ENTRY_WRAP, OnSetfocusLogmsgWrap)
00231     //}}AFX_MSG_MAP
00232 END_MESSAGE_MAP()
00233
00235 // Message handlers
00236
00246 BOOL CMultilineEntryDlg::Create(const kMultilineEntryType multilineEntryType, CMString* pPreviousEntries,
00247                                 const CWnd* pWndInsertAfter, CDialog* pParentWnd, const bool updateData /*= true*/)
00248 {
00249     BOOL res = FALSE;
00250
00251     ASSERT(pWndInsertAfter != NULL);    // Invalid pointer
00252     ASSERT(pParentWnd != NULL);         // Invalid pointer
00253     ASSERT(pPreviousEntries != NULL);   // Invalid pointer
00254
00255     m_multilineEntryType = multilineEntryType;
00256     m_pParentWnd = pParentWnd;
00257     m_pPreviousEntries = pPreviousEntries;
00258
00259     m_prevLogsCombo.SetItems(m_pPreviousEntries);
00260
00261     if( CHHelpPropertyPage::Create(CMultilineEntryDlg::IDD, m_pParentWnd) )
00262     {
00263         CRect windowRect;
00264         pWndInsertAfter->GetWindowRect(windowRect);
00265         pParentWnd->ScreenToClient(windowRect);
00266
00267         SetWindowPos(pWndInsertAfter, windowRect.left, windowRect.top, windowRect.Width(), windowRect.Height(), SWP_SHOWWINDOW);
00268
00269         if( updateData )
00270         {
00271             m_pParentWnd->UpdateData(FALSE);
00272         }
00273
00274         res = TRUE;
00275     }
00276
00277     return res;
00278 }
00279
00281 BOOL CMultilineEntryDlg::OnInitDialog()
00282 {
00283     CHHelpPropertyPage::OnInitDialog();
00284
00285     // Extra initialization
00286     m_multiLineEditDialogKeyHelper.Create(gCvsPrefs.CtrlPressedOnOK(), m_pParentWnd, m_pParentWnd->GetParent()->GetSafeHwnd());
00287
00288     SwitchWrapEdit(gCvsPrefs.WordWrapLogMsg());
00289     SetEntryDescription();
00290     SetActions();
00291
00292     return TRUE;  // return TRUE unless you set the focus to a control
00293                   // EXCEPTION: OCX Property Pages should return FALSE
00294 }
00295
00296 void CMultilineEntryDlg::InitHelpID()
00297 {
00298     SetCtrlHelpID(IDC_MULTILINE_TYPE,       helpTopicIgnore);
00299     SetCtrlHelpID(IDC_MULTILINE_ENTRY,      IDH_IDC_MULTILINE_ENTRY);
00300     SetCtrlHelpID(IDC_MULTILINE_ENTRY_WRAP, IDH_IDC_MULTILINE_ENTRY_WRAP);
00301     SetCtrlHelpID(IDC_MULTILINE_PREV_ENTRY, IDH_IDC_MULTILINE_PREV_ENTRY);
00302     SetCtrlHelpID(IDC_MULTILINE_ACTION,     IDH_IDC_MULTILINE_ACTION);
00303     SetCtrlHelpID(IDC_MULTILINE_GO_ACTION,  IDH_IDC_MULTILINE_GO_ACTION);
00304     SetCtrlHelpID(IDC_MULTILINE_WORDWRAP,   IDH_IDC_MULTILINE_WORDWRAP);
00305     SetCtrlHelpID(IDC_MULTILINE_POSITION,   IDH_IDC_MULTILINE_POSITION);
00306 }
00307
00314 BOOL CMultilineEntryDlg::UpdateData(BOOL bSaveAndValidate, CString& entryText)
00315 {
00316     BOOL res = FALSE;
00317
00318     if( ::IsWindow(GetSafeHwnd()) )
00319     {
00320         if( bSaveAndValidate )
00321         {
00322             CHHelpPropertyPage::UpdateData(TRUE);
00323             entryText = m_entryText;
00324         }
00325         else
00326         {
00327             m_entryText = entryText;
00328             CHHelpPropertyPage::UpdateData(FALSE);
00329         }
00330     }
00331
00332     return res;
00333 }
00334
00336 void CMultilineEntryDlg::OnSelchangeCombo()
00337 {
00338     int sel = m_prevLogsCombo.GetCurSel();
00339     if( sel == CB_ERR )
00340         return;
00341
00342     CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00343     pEdit->SetSel(0, -1);
00344
00345     const NAMESPACE(std) vector<CStr>& list = m_pPreviousEntries->GetList();
00346     pEdit->ReplaceSel(list[sel]);
00347 }
00348
00350 BOOL CMultilineEntryDlg::PreTranslateMessage(MSG* pMsg)
00351 {
00352     if( pMsg->message >= WM_KEYFIRST ||
00353         pMsg->message <= WM_KEYLAST ||
00354         pMsg->message == WM_COPY || pMsg->message == WM_CUT || pMsg->message == WM_PASTE )
00355     {
00356         UpdateInfo();
00357     }
00358
00359     if( m_multiLineEditDialogKeyHelper.RelayEvent(pMsg) )
00360     {
00361         return TRUE;
00362     }
00363
00364     return CHHelpPropertyPage::PreTranslateMessage(pMsg);
00365 }
00366
00373 void CMultilineEntryDlg::AddAction(const kActionType actionType, const char* actionDescription, const bool select /*= false*/)
00374 {
00375     const int item = m_actionCombo.AddString(actionDescription);
00376     if( item > -1 )
00377     {
00378         m_actionCombo.SetItemData(item, (DWORD)actionType);
00379
00380         if( select )
00381         {
00382             m_actionCombo.SetCurSel(item);
00383         }
00384     }
00385 }
00386
00390 void CMultilineEntryDlg::UpdateInfo()
00391 {
00392     CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00393
00394     const int nLineNumber = pEdit->LineFromChar();
00395     const int nLineLenght = pEdit->LineLength(pEdit->LineIndex());
00396
00397     CString strInfo;
00398     strInfo.Format("Line %d (%d chars)", nLineNumber + 1, nLineLenght);
00399
00400     CString strOldInfo;
00401     m_editPositionEdit.GetWindowText(strOldInfo);
00402
00403     if( strOldInfo != strInfo )
00404     {
00405         m_editPositionEdit.SetWindowText(strInfo);
00406     }
00407 }
00408
00413 void CMultilineEntryDlg::SwitchWrapEdit(const BOOL bWordWrap)
00414 {
00415     CString strMessage;
00416
00417     if( bWordWrap )
00418     {
00419         m_entryTextCtrl.GetWindowText(strMessage);
00420         m_entryTextCtrlWrap.SetWindowText(strMessage);
00421
00422         m_switchingWrap = true;
00423         m_entryTextCtrl.ShowWindow(SW_HIDE);
00424         m_entryTextCtrlWrap.ShowWindow(SW_SHOW);
00425         m_switchingWrap = false;
00426     }
00427     else
00428     {
00429         m_entryTextCtrlWrap.GetWindowText(strMessage);
00430         m_entryTextCtrl.SetWindowText(strMessage);
00431
00432         m_switchingWrap = true;
00433         m_entryTextCtrlWrap.ShowWindow(SW_HIDE);
00434         m_entryTextCtrl.ShowWindow(SW_SHOW);
00435         m_switchingWrap = false;
00436     }
00437 }
00438
00442 void CMultilineEntryDlg::SetEntryDescription()
00443 {
00444     CString entryDescription;
00445
00446     switch( m_multilineEntryType )
00447     {
00448     default:
00449         ASSERT(FALSE); // Unknown type
00450     case kMultilineLogMessage:
00451         entryDescription.Format(ENTRY_LOGMESSAGE_DESC_FORMAT, m_multiLineEditDialogKeyHelper.FormatLineBreakHint());
00452         break;
00453     case kMultilineCmdLine:
00454         entryDescription.Format(ENTRY_CMDLINE_DESC_FORMAT, m_multiLineEditDialogKeyHelper.FormatLineBreakHint());
00455         break;
00456     case kMultilineState:
00457         entryDescription.Format(ENTRY_STATE_DESC_FORMAT, m_multiLineEditDialogKeyHelper.FormatLineBreakHint());
00458         break;
00459     case kMultilineDescription:
00460         entryDescription.Format(ENTRY_DESCRIPTION_DESC_FORMAT, m_multiLineEditDialogKeyHelper.FormatLineBreakHint());
00461         break;
00462     }
00463
00464     if( !entryDescription.IsEmpty() )
00465     {
00466         m_entryStatic.SetWindowText(entryDescription);
00467     }
00468 }
00469
00473 void CMultilineEntryDlg::SetActions()
00474 {
00475     switch( m_multilineEntryType )
00476     {
00477     default:
00478         ASSERT(FALSE); // Unknown type
00479     case kMultilineLogMessage:
00480         AddAction(kActionOpenEditor, "Editor", true);
00481         AddAction(kActionOpenTemplate, "Template");
00482         break;
00483     case kMultilineCmdLine:
00484         AddAction(kActionBrowseTag, "Tag", true);
00485         AddAction(kActionBrowseModule, "Module");
00486         AddAction(kActionFormatCvsRoot, "CVSROOT");
00487         break;
00488     case kMultilineState:
00489         AddAction(kActionOpenEditor, "Editor", true);
00490         break;
00491     case kMultilineDescription:
00492         AddAction(kActionOpenEditor, "Editor", true);
00493         break;
00494     }
00495 }
00496
00501 int CMultilineEntryDlg::GetEntryTextID()
00502 {
00503     return m_wordWrapCtrl.GetCheck() ? IDC_MULTILINE_ENTRY_WRAP : IDC_MULTILINE_ENTRY;
00504 }
00505
00510 CWnd* CMultilineEntryDlg::GetEntryTextWnd()
00511 {
00512     return GetDlgItem(GetEntryTextID());
00513 }
00514
00516 BOOL CMultilineEntryDlg::OnEraseBkgnd(CDC* pDC)
00517 {
00518     if( m_switchingWrap )
00519     {
00520         return TRUE;
00521     }
00522
00523     return CHHelpPropertyPage::OnEraseBkgnd(pDC);
00524 }
00525
00527 void CMultilineEntryDlg::OnWordwrap()
00528 {
00529     gCvsPrefs.SetWordWrapLogMsg(m_wordWrapCtrl.GetCheck());
00530     SwitchWrapEdit(gCvsPrefs.WordWrapLogMsg());
00531 }
00532
00534 void CMultilineEntryDlg::OnActionGo()
00535 {
00536     const int selItem = m_actionCombo.GetCurSel();
00537     if( selItem > -1 )
00538     {
00539         const kActionType action = (kActionType)m_actionCombo.GetItemData(selItem);
00540
00541         switch( action )
00542         {
00543         case kActionOpenEditor:
00544             ActionOpenEditor();
00545             break;
00546         case kActionOpenTemplate:
00547             ActionOpenTemplate();
00548             break;
00549         case kActionBrowseTag:
00550             ActionBrowseTag();
00551             break;
00552         case kActionBrowseModule:
00553             ActionBrowseModule();
00554             break;
00555         case kActionFormatCvsRoot:
00556             ActionFormatCvsRoot();
00557             break;
00558         default:
00559             ASSERT(FALSE);  // Unknown action
00560             break;
00561         }
00562     }
00563 }
00564
00568 void CMultilineEntryDlg::ActionOpenEditor()
00569 {
00570     UStr message;
00571
00572     if( CompatGetEditorMsg(message) )
00573     {
00574         CString strMessage(message);
00575         strMessage.Replace("\n", "\r\n");
00576
00577         if( !strMessage.IsEmpty() )
00578         {
00579             CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00580             pEdit->SetSel(0, -1);
00581             pEdit->ReplaceSel(strMessage, TRUE);
00582         }
00583     }
00584
00585     GotoDlgCtrl(GetEntryTextWnd());
00586 }
00587
00591 void CMultilineEntryDlg::ActionOpenTemplate()
00592 {
00593     UStr message;
00594
00595     if( CompatGetCvsTemplate(m_mf, message) )
00596     {
00597         CString strMessage(message);
00598         strMessage.Replace("\n", "\r\n");
00599
00600         if( !strMessage.IsEmpty() )
00601         {
00602             CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00603             pEdit->SetSel(0, -1);
00604             pEdit->ReplaceSel(strMessage, TRUE);
00605         }
00606     }
00607
00608     GotoDlgCtrl(GetEntryTextWnd());
00609 }
00610
00614 void CMultilineEntryDlg::ActionBrowseTag()
00615 {
00616     CStr tagName;
00617     if( CompatGetTagListItem(m_mf, tagName) )
00618     {
00619         CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00620         pEdit->ReplaceSel(tagName.c_str(), TRUE);
00621     }
00622 }
00623
00627 void CMultilineEntryDlg::ActionBrowseModule()
00628 {
00629     CStr moduleName;
00630     if( CompatGetModuleListItem(m_mf, moduleName) )
00631     {
00632         CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00633         pEdit->ReplaceSel(moduleName.c_str(), TRUE);
00634     }
00635 }
00636
00640 void CMultilineEntryDlg::ActionFormatCvsRoot()
00641 {
00642     CStr cvsRoot;
00643     if( CompatGetCvsRoot(cvsRoot) )
00644     {
00645         CEdit* pEdit = (CEdit*)GetEntryTextWnd();
00646         pEdit->ReplaceSel(cvsRoot.c_str(), TRUE);
00647     }
00648 }
00649
00651 void CMultilineEntryDlg::OnSetfocusLogmsg()
00652 {
00653     if( m_firstFocus )
00654     {
00655         m_firstFocus = false;
00656
00657         if( kMultilineCmdLine == m_multilineEntryType )
00658         {
00659             CString cmdLine;
00660             m_entryTextCtrl.GetWindowText(cmdLine);
00661
00662             if( DEF_CVS_CMD == cmdLine )
00663             {
00664                 m_entryTextCtrl.SetSel(-1, -1);
00665             }
00666         }
00667     }
00668 }
00669
00671 void CMultilineEntryDlg::OnSetfocusLogmsgWrap()
00672 {
00673     if( m_firstFocus )
00674     {
00675         m_firstFocus = false;
00676
00677         if( kMultilineCmdLine == m_multilineEntryType )
00678         {
00679             CString cmdLine;
00680             m_entryTextCtrlWrap.GetWindowText(cmdLine);
00681
00682             if( DEF_CVS_CMD == cmdLine )
00683             {
00684                 m_entryTextCtrlWrap.SetSel(-1, -1);
00685             }
00686         }
00687     }
00688 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

tagTCB_ITEM Member List

This is the complete list of members for tagTCB_ITEM, including all inherited members.

pWnd | tagTCB_ITEM
szTabLabel | tagTCB_ITEM
szToolTipLabel | tagTCB_ITEM
uiToolTipId | tagTCB_ITEM

Generated on Sat Aug 7 22:56:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ItemDisplayInfo Member List

This is the complete list of members for ItemDisplayInfo, including all inherited members.

Create(const string &item, const ItemRowInfo &rowInfo) | ItemDisplayInfo |
GetDescription() const | ItemDisplayInfo |
GetDescriptionEx() const | ItemDisplayInfo |
GetItem() const | ItemDisplayInfo |
GetRowInfo() const | ItemDisplayInfo |
m_description | ItemDisplayInfo | [private]
m_descriptionEx | ItemDisplayInfo | [private]
m_item | ItemDisplayInfo | [private]
m_rowInfo | ItemDisplayInfo | [private]

Generated on Sat Aug 7 22:53:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWinLogData Member List

This is the complete list of members for CWinLogData, including all inherited members.

Bounds(void) | CWinLogData | [inline]
Bounds(void) | CWinLogData | [inline]
CollectMergePointPairPass1(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass1Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected, virtual]
CollectMergePointPairPass2(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass2Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected, virtual]
ComputeBounds(const UPoint &topLeft, UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
ComputeBounds(const CPoint &topLeft, CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
CreateNewData(CLogNode *node) | CWinLogData | [static]
CreateNewData(CLogNode *node) | CWinLogData | [static]
CWinLogData(CLogNode *node) | CWinLogData |
CWinLogData(CLogNode *node) | CWinLogData |
GetBoundsSelf(UDC &hdc, EntnodeData *entryInfo)=0 | CWinLogData | [protected, pure virtual]
GetBoundsSelf(CDC &dc, EntnodeData *entryInfo)=0 | CWinLogData | [protected, pure virtual]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetStr(void) | CWinLogData |
GetStr(void) | CWinLogData |
GetType(void) const | CWinLogData | [inline]
GetType(void) const | CWinLogData | [inline]
HitTest(UPoint point) | CWinLogData |
HitTest(CPoint point) | CWinLogData |
IsDeadNode() | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsUserState() | CWinLogData |
Offset(UPoint o) | CWinLogData |
Offset(CPoint offset) | CWinLogData |
sel | CWinLogData | [protected]
Selected(void) const | CWinLogData | [inline]
Selected(void) const | CWinLogData | [inline]
selfB | CWinLogData | [protected]
selfB | CWinLogData | [private]
SelfBounds(void) | CWinLogData | [inline]
SelfBounds(void) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
SetSelected(bool state) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
totB | CWinLogData | [protected]
totB | CWinLogData | [private]
UnselectAll(CScrollView *view) | CWinLogData |
UnselectAll(void) | CWinLogData |
UnselectAll(CScrollView *view) | CWinLogData |
Update(UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
Update(CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
UpdateMergePoints(CDC &dc) | CWinLogData |
UpdateSelf(UDC &hdc, EntnodeData *entryInfo)=0 | CWinLogData | [protected, pure virtual]
UpdateSelf(CDC &dc, EntnodeData *entryInfo)=0 | CWinLogData | [protected, pure virtual]
~CWinLogData() | CWinLogData | [virtual]
~CWinLogData() | CWinLogData | [virtual]

Generated on Sat Aug 7 22:58:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GraphOptDlg.h Source File

common/GraphOptDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- September 2001
00019  */
00020
00021 /*
00022  * GraphOptDlg.h --- graph options dialog
00023  */
00024
00025 #if !defined(AFX_GRAPHOPTDLG_H__E05908EC_20A6_43FE_93C7_0964E6ABB6B1__INCLUDED_)
00026 #define AFX_GRAPHOPTDLG_H__E05908EC_20A6_43FE_93C7_0964E6ABB6B1__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #ifdef WIN32
00033 #   include "ColorStatic.h"
00034 #   include "HHelpSupport.h"
00035 #endif /* WIN32 */
00036
00037 bool CompatGetGraphOptions(CPersistentInt& selColor, CPersistentInt& shadowColor,
00038                            CPersistentInt& headerColor, CPersistentInt& tagColor, CPersistentInt& branchColor,
00039                            CPersistentInt& nodeColor, CPersistentInt& deadNodeColor, CPersistentInt& userStateNodeColor,
00040                            CPersistentInt& mergeColor);
00041
00042
00043 #ifdef WIN32
00044
00046 // CGraphOptDlg dialog
00047
00048 class CGraphOptDlg : public CHHelpDialog
00049 {
00050 // Construction
00051 public:
00052     CGraphOptDlg(CPersistentInt& selColor, CPersistentInt& shadowColor,
00053         CPersistentInt& headerColor, CPersistentInt& tagColor, CPersistentInt& branchColor,
00054         CPersistentInt& nodeColor, CPersistentInt& deadNodeColor, CPersistentInt& userStateNodeColor,
00055         CPersistentInt& mergeColor, CWnd* pParent = NULL);   // standard constructor
00056
00057 // Dialog Data
00058     //{{AFX_DATA(CGraphOptDlg)
00059     enum { IDD = IDD_GRAPH_OPTIONS };
00060     CButton m_apply;
00061     CColorStatic    m_rgbShadow;
00062     CColorStatic    m_rgbSelection;
00063     CColorStatic    m_rgbState;
00064     CColorStatic    m_rgbDead;
00065     CColorStatic    m_rgbNode;
00066     CColorStatic    m_rgbBranch;
00067     CColorStatic    m_rgbTag;
00068     CColorStatic    m_rgbHeader;
00069     CColorStatic    m_rgbMerge;
00070     //}}AFX_DATA
00071
00072
00073 // Overrides
00074     // ClassWizard generated virtual function overrides
00075     //{{AFX_VIRTUAL(CGraphOptDlg)
00076     protected:
00077     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00078     //}}AFX_VIRTUAL
00079
00080 // Implementation
00081 protected:
00082
00083     // Generated message map functions
00084     //{{AFX_MSG(CGraphOptDlg)
00085     virtual void OnOK();
00086     afx_msg void OnHeader();
00087     afx_msg void OnTag();
00088     afx_msg void OnBranch();
00089     afx_msg void OnNode();
00090     afx_msg void OnDead();
00091     afx_msg void OnState();
00092     afx_msg void OnSelection();
00093     afx_msg void OnShadow();
00094     afx_msg void OnReset();
00095     virtual void OnCancel();
00096     afx_msg void OnMerge();
00097     afx_msg void OnHelp();
00098     afx_msg void OnApplyNow();
00099     //}}AFX_MSG
00100     DECLARE_MESSAGE_MAP()
00101 private:
00102     // Data members
00103     CPersistentInt& m_selColor;
00104     CPersistentInt& m_shadowColor;
00105     CPersistentInt& m_headerColor;
00106     CPersistentInt& m_tagColor;
00107     CPersistentInt& m_branchColor;
00108     CPersistentInt& m_nodeColor;
00109     CPersistentInt& m_deadNodeColor;
00110     CPersistentInt& m_userStateNodeColor;
00111     CPersistentInt& m_mergeColor;
00112
00113     int m_origSelColor;
00114     int m_origShadowColor;
00115     int m_origHeaderColor;
00116     int m_origTagColor;
00117     int m_origBranchColor;
00118     int m_origNodeColor;
00119     int m_origDeadNodeColor;
00120     int m_origUserStateNodeColor;
00121     int m_origMergeColor;
00122
00123     // Methods
00124     virtual void InitHelpID();
00125
00126     void PromptForColor(CColorStatic& colorStatic);
00127     void GetAllColors();
00128 };
00129
00130 //{{AFX_INSERT_LOCATION}}
00131 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00132
00133 #endif /* WIN32 */
00134
00135 #endif // !defined(AFX_GRAPHOPTDLG_H__E05908EC_20A6_43FE_93C7_0964E6ABB6B1__INCLUDED_)
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SelectionDetailsDlg.cpp Source File

common/SelectionDetailsDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- January 2003
00019  */
00020
00021 // SelectionDetailsDlg.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #if qUnix
00027 #   include "UCvsDialogs.h"
00028 #endif
00029
00030 #ifdef WIN32
00031 #   include "wincvs.h"
00032 #   include "wincvs_winutil.h"
00033 #endif /* !WIN32 */
00034
00035 #include "SelectionDetailsDlg.h"
00036 #include "CvsEntries.h"
00037
00038 #ifdef _DEBUG
00039 #define new DEBUG_NEW
00040 #undef THIS_FILE
00041 static char THIS_FILE[] = __FILE__;
00042 #endif
00043
00044
00045 #ifdef WIN32
00046
00048 // SelectionDisplayInfo
00049
00056 void SelectionDisplayInfo::Create(const string& fileName, const string& revision, const string& path)
00057 {
00058     m_fileName = fileName;
00059     m_revision = revision;
00060     m_path = path;
00061 }
00062
00064 const string& SelectionDisplayInfo::GetFileName() const
00065 {
00066     return m_fileName;
00067 }
00068
00070 const string& SelectionDisplayInfo::GetRevision() const
00071 {
00072     return m_revision;
00073 }
00074
00076 const string& SelectionDisplayInfo::GetPath() const
00077 {
00078     return m_path;
00079 }
00080
00081
00089 int CALLBACK CSelectionDetailsDlg::CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam)
00090 {
00091     int res = 0;
00092
00093     const CompareInfo* info = (CompareInfo*)lParam;
00094     if( info )
00095     {
00096         SelectionDisplayInfo* displayInfo1 = (SelectionDisplayInfo*)itemData1;
00097         SelectionDisplayInfo* displayInfo2 = (SelectionDisplayInfo*)itemData2;
00098
00099         if( displayInfo1 && displayInfo2 )
00100         {
00101             switch( info->m_column )
00102             {
00103             case 0:
00104                 res = stricmp(displayInfo1->GetFileName().c_str(), displayInfo2->GetFileName().c_str());
00105                 break;
00106             case 1:
00107                 res = stricmp(displayInfo1->GetRevision().c_str(), displayInfo2->GetRevision().c_str());
00108                 break;
00109             case 2:
00110                 res = stricmp(displayInfo1->GetPath().c_str(), displayInfo2->GetPath().c_str());
00111                 break;
00112             default:
00113                 ASSERT(FALSE); // should not come here
00114                 break;
00115             }
00116         }
00117     }
00118
00119     if( res )
00120     {
00121         if( info->m_asc )
00122         {
00123             res *= -1;
00124         }
00125     }
00126
00127     return res;
00128 }
00129
00131 // CSelectionDetailsDlg dialog
00132
00133 CSelectionDetailsDlg::CSelectionDetailsDlg(const MultiFiles* mf, const kSelDetType selDetType, const char* selection,
00134                                            CWnd* pParent /*=NULL*/)
00135     : m_mf(mf), CHHelpDialog(CSelectionDetailsDlg::IDD, pParent)
00136 {
00137     //{{AFX_DATA_INIT(CSelectionDetailsDlg)
00138     m_selection = selection;
00139     m_selDetType = selDetType;
00140     //}}AFX_DATA_INIT
00141
00142     m_sortAsc = false;
00143     m_sortColumn = 0;
00144 }
00145
00146
00147 void CSelectionDetailsDlg::DoDataExchange(CDataExchange* pDX)
00148 {
00149     CHHelpDialog::DoDataExchange(pDX);
00150     //{{AFX_DATA_MAP(CSelectionDetailsDlg)
00151     DDX_Control(pDX, IDC_REVISION, m_revisionCheck);
00152     DDX_Control(pDX, IDC_FILENAME, m_fileNameCheck);
00153     DDX_Control(pDX, IDC_FILEPATH, m_pathCheck);
00154     DDX_Control(pDX, IDC_SELECTION, m_selectionEdit);
00155     DDX_Control(pDX, IDC_REVISION_SPIN, m_revisionSpinCtrl);
00156     DDX_Control(pDX, IDC_SELECTION_LIST, m_selectionListCtrl);
00157     DDX_Text(pDX, IDC_SELECTION, m_selection);
00158     DDX_Radio(pDX, IDC_FILENAME, m_selDetType);
00159     //}}AFX_DATA_MAP
00160 }
00161
00162
00163 BEGIN_MESSAGE_MAP(CSelectionDetailsDlg, CHHelpDialog)
00164     //{{AFX_MSG_MAP(CSelectionDetailsDlg)
00165     ON_NOTIFY(NM_DBLCLK, IDC_SELECTION_LIST, OnDblclkSelectionlist)
00166     ON_NOTIFY(LVN_COLUMNCLICK, IDC_SELECTION_LIST, OnColumnclickSelectionlist)
00167     ON_NOTIFY(LVN_ITEMCHANGED, IDC_SELECTION_LIST, OnItemchangedSelectionlist)
00168     ON_NOTIFY(UDN_DELTAPOS, IDC_REVISION_SPIN, OnDeltaposRevisionSpin)
00169     ON_BN_CLICKED(IDC_FILENAME, OnFilename)
00170     ON_BN_CLICKED(IDC_FILEPATH, OnPath)
00171     ON_BN_CLICKED(IDC_REVISION, OnRevision)
00172     ON_WM_DESTROY()
00173     ON_BN_CLICKED(IDHELP, OnHelp)
00174     //}}AFX_MSG_MAP
00175 END_MESSAGE_MAP()
00176
00178 // CSelectionDetailsDlg message handlers
00179
00181 BOOL CSelectionDetailsDlg::OnInitDialog()
00182 {
00183     CHHelpDialog::OnInitDialog();
00184
00185     // Extra initialization
00186     // Initialize controls
00187     SetListCtrlExtendedStyle(&m_selectionListCtrl, LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
00188
00189     m_revisionSpinCtrl.SetRange(0, 100);
00190
00191     // Setup controls
00192     CHeaderCtrl* headerCtrl = m_selectionListCtrl.GetHeaderCtrl();
00193     if( headerCtrl )
00194     {
00195         m_headerCtrl.SubclassWindow(headerCtrl->m_hWnd);
00196     }
00197
00198     EnableControls();
00199
00200     // Display items
00201     DisplaySelection();
00202
00203     return TRUE;  // return TRUE unless you set the focus to a control
00204                   // EXCEPTION: OCX Property Pages should return FALSE
00205 }
00206
00207 void CSelectionDetailsDlg::InitHelpID()
00208 {
00209     SetCtrlHelpID(IDC_SELECTION,        IDH_IDC_SELECTION);
00210     SetCtrlHelpID(IDC_REVISION_SPIN,    IDH_IDC_REVISION_SPIN);
00211     SetCtrlHelpID(IDC_FILENAME,         IDH_IDC_FILENAME);
00212     SetCtrlHelpID(IDC_REVISION,         IDH_IDC_REVISION);
00213     SetCtrlHelpID(IDC_FILEPATH,         IDH_IDC_FILEPATH);
00214     SetCtrlHelpID(IDC_SELECTION_LIST,   IDH_IDC_SELECTION_LIST);
00215 }
00216
00218 void CSelectionDetailsDlg::OnHelp()
00219 {
00220     ShowHelp();
00221 }
00222
00226 void CSelectionDetailsDlg::DisplaySelection()
00227 {
00228     CWndRedrawMngr redrawMngr(&m_selectionListCtrl);
00229
00230     // Get the client area width to properly size columns
00231     CRect rect;
00232     m_selectionListCtrl.GetClientRect(rect);
00233
00234     const int listCtrlWidth = rect.Width();
00235     const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
00236
00237     // Insert columns
00238     m_selectionListCtrl.InsertColumn(0, ColumnIndex::GetColumnName(ColumnIndex::kName, false), LVCFMT_LEFT, 200);
00239     m_selectionListCtrl.InsertColumn(1, ColumnIndex::GetColumnName(ColumnIndex::kRevision, false), LVCFMT_LEFT, 60);
00240     m_selectionListCtrl.InsertColumn(2, ColumnIndex::GetColumnName(ColumnIndex::kPath, false), LVCFMT_LEFT, listCtrlWidthNoScroll - 60 - 200);
00241
00242     // The browser selection
00243     if( m_mf )
00244     {
00245         if( m_mf->TotalNumFiles() )
00246         {
00247             MultiFiles::const_iterator mfi;
00248             for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
00249             {
00250                 for(int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++)
00251                 {
00252                     CStr fileName;
00253                     CStr currRev;
00254                     CStr path;
00255
00256                     if( mfi->get(nIndex, path, fileName, currRev) )
00257                     {
00258                         const int itemIndex = m_selectionListCtrl.InsertItem(m_selectionListCtrl.GetItemCount(), fileName.c_str());
00259                         if( itemIndex > -1 )
00260                         {
00261                             m_selectionListCtrl.SetItemText(itemIndex, 1, currRev.c_str());
00262                             m_selectionListCtrl.SetItemText(itemIndex, 2, path.c_str());
00263
00264                             SelectionDisplayInfo* displayInfo = new SelectionDisplayInfo;
00265                             if( displayInfo )
00266                             {
00267                                 displayInfo->Create(string(fileName.c_str()), string(currRev.c_str()), string(path.c_str()));
00268                                 if( !m_selectionListCtrl.SetItemData(itemIndex, (DWORD)displayInfo) )
00269                                 {
00270                                     delete displayInfo;
00271                                 }
00272                             }
00273                         }
00274                     }
00275                 }
00276             }
00277         }
00278         else if( m_mf->NumDirs() )
00279         {
00280             for(int nIndex = 0; nIndex < m_mf->NumDirs(); nIndex++)
00281             {
00282                 CStr path;
00283                 if( m_mf->getdir(nIndex, path) )
00284                 {
00285                     const int itemIndex = m_selectionListCtrl.InsertItem(m_selectionListCtrl.GetItemCount(), "");
00286                     if( itemIndex > -1 )
00287                     {
00288                         m_selectionListCtrl.SetItemText(itemIndex, 2, path.c_str());
00289
00290                         SelectionDisplayInfo* displayInfo = new SelectionDisplayInfo;
00291                         if( displayInfo )
00292                         {
00293                             displayInfo->Create(string(""), string(""), string(path.c_str()));
00294                             if( !m_selectionListCtrl.SetItemData(itemIndex, (DWORD)displayInfo) )
00295                             {
00296                                 delete displayInfo;
00297                             }
00298                         }
00299                     }
00300                 }
00301             }
00302         }
00303     }
00304 }
00305
00309 void CSelectionDetailsDlg::DeleteAllItems()
00310 {
00311     for(int nIndex = 0; nIndex < m_selectionListCtrl.GetItemCount(); nIndex++)
00312     {
00313         SelectionDisplayInfo* displayInfo = (SelectionDisplayInfo*)m_selectionListCtrl.GetItemData(nIndex);
00314         delete displayInfo;
00315     }
00316
00317     m_selectionListCtrl.DeleteAllItems();
00318 }
00319
00321 void CSelectionDetailsDlg::OnDestroy()
00322 {
00323     DeleteAllItems();
00324
00325     CHHelpDialog::OnDestroy();
00326 }
00327
00329 void CSelectionDetailsDlg::OnDblclkSelectionlist(NMHDR* pNMHDR, LRESULT* pResult)
00330 {
00331     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00332     if( pNMListView->iItem > -1 )
00333     {
00334         OnOK();
00335     }
00336
00337     *pResult = 0;
00338 }
00339
00341 void CSelectionDetailsDlg::OnColumnclickSelectionlist(NMHDR* pNMHDR, LRESULT* pResult)
00342 {
00343     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00344
00345     if( m_sortColumn != pNMListView->iSubItem )
00346     {
00347         m_sortAsc = false;
00348     }
00349     else
00350     {
00351         m_sortAsc = !m_sortAsc;
00352     }
00353
00354     m_sortColumn = pNMListView->iSubItem;
00355
00356     SortItems(m_sortColumn, m_sortAsc);
00357
00358     *pResult = 0;
00359 }
00360
00367 void CSelectionDetailsDlg::SortItems(int column, bool asc)
00368 {
00369     m_headerCtrl.SetSortImage(column, asc);
00370
00371     CompareInfo info = { 0 };
00372
00373     info.m_column = column;
00374     info.m_asc = asc;
00375
00376     m_selectionListCtrl.SortItems(CompareItems, (DWORD)&info);
00377 }
00378
00380 void CSelectionDetailsDlg::OnItemchangedSelectionlist(NMHDR* pNMHDR, LRESULT* pResult)
00381 {
00382     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00383     if( pNMListView->iItem > -1 &&
00384         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
00385     {
00386         UpdateSelect(pNMListView->iItem);
00387     }
00388
00389     *pResult = 0;
00390 }
00391
00393 void CSelectionDetailsDlg::OnDeltaposRevisionSpin(NMHDR* pNMHDR, LRESULT* pResult)
00394 {
00395     NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00396
00397     if( m_revisionCheck.GetCheck() )
00398     {
00399         CString selection;
00400         m_selectionEdit.GetWindowText(selection);
00401
00402         const int dotPos = selection.ReverseFind('.');
00403         if( dotPos > 0 && dotPos < selection.GetLength() - 1 )
00404         {
00405             CString revLast = selection.Mid(dotPos + 1);
00406             int revLastNum = atoi(revLast);
00407             if( revLastNum > 0 )
00408             {
00409                 revLastNum += pNMUpDown->iDelta;
00410                 if( revLastNum > 0 )
00411                 {
00412                     revLast.Format("%d", revLastNum);
00413                     selection = selection.Left(dotPos + 1) + revLast;
00414
00415                     m_selectionEdit.SetWindowText(selection);
00416                 }
00417             }
00418         }
00419     }
00420
00421     // We do not allow to change position
00422     *pResult = 1;
00423 }
00424
00426 void CSelectionDetailsDlg::OnFilename()
00427 {
00428     EnableControls();
00429     UpdateSelect(-1);
00430 }
00431
00433 void CSelectionDetailsDlg::OnPath()
00434 {
00435     EnableControls();
00436     UpdateSelect(-1);
00437 }
00438
00440 void CSelectionDetailsDlg::OnRevision()
00441 {
00442     EnableControls();
00443     UpdateSelect(-1);
00444 }
00445
00449 void CSelectionDetailsDlg::EnableControls()
00450 {
00451     m_revisionSpinCtrl.EnableWindow(m_revisionCheck.GetCheck());
00452 }
00453
00458 void CSelectionDetailsDlg::UpdateSelect(int item)
00459 {
00460     if( item < 0 )
00461     {
00462         // Get the currently selected item
00463         POSITION pos = m_selectionListCtrl.GetFirstSelectedItemPosition();
00464         if( pos )
00465         {
00466             item = m_selectionListCtrl.GetNextSelectedItem(pos);
00467         }
00468     }
00469
00470     if( item > -1 && item < m_selectionListCtrl.GetItemCount() )
00471     {
00472         // Update the select edit box
00473         int subItem = 0;
00474
00475         if( m_revisionCheck.GetCheck() )
00476         {
00477             subItem = 1;
00478         }
00479         else if( m_pathCheck.GetCheck() )
00480         {
00481             subItem = 2;
00482         }
00483
00484         m_selectionEdit.SetWindowText(m_selectionListCtrl.GetItemText(item, subItem));
00485     }
00486 }
00487
00488 #endif /* !WIN32 */
00489
00490 #if qUnix
00491 class UCvsSelectionDetailsDlg : public UWidget
00492 {
00493     UDECLARE_DYNAMIC(UCvsSelectionDetailsDlg)
00494 public:
00495     UCvsSelectionDetailsDlg(const MultiFiles* mf, const kSelDetType selDetType, const char* selection);
00496     virtual ~UCvsSelectionDetailsDlg() {}
00497
00498     enum
00499     {
00500         kOK = EV_COMMAND_START, // 0
00501         kCancel,                // 1
00502     };
00503
00504     virtual void DoDataExchange(bool fill);
00505 public:
00506     UStr    m_selection;
00507     kSelDetType  m_selDetType;
00508
00509 protected:
00510     ev_msg int OnOK(void);
00511     ev_msg int OnCancel(void);
00512
00513     UDECLARE_MESSAGE_MAP()
00514 private:
00515     const MultiFiles* m_mf;
00516 };
00517
00518 UIMPLEMENT_DYNAMIC(UCvsSelectionDetailsDlg, UWidget)
00519
00520 UBEGIN_MESSAGE_MAP(UCvsSelectionDetailsDlg, UWidget)
00521     ON_UCOMMAND(UCvsSelectionDetailsDlg::kOK, UCvsSelectionDetailsDlg::OnOK)
00522     ON_UCOMMAND(UCvsSelectionDetailsDlg::kCancel, UCvsSelectionDetailsDlg::OnCancel)
00523 UEND_MESSAGE_MAP()
00524
00525 UCvsSelectionDetailsDlg::UCvsSelectionDetailsDlg(const MultiFiles* mf, const kSelDetType selDetType, const char* selection)
00526     : UWidget(::UEventGetWidID()), m_selection( selection), m_selDetType( selDetType), m_mf(mf)
00527 {
00528 }
00529
00530 int UCvsSelectionDetailsDlg::OnOK(void)
00531 {
00532     EndModal(true);
00533     return 0;
00534 }
00535
00536 int UCvsSelectionDetailsDlg::OnCancel(void)
00537 {
00538     EndModal(false);
00539     return 0;
00540 }
00541
00542 void UCvsSelectionDetailsDlg::DoDataExchange(bool fill)
00543 {
00544     if(fill)
00545     {
00546     }
00547     else
00548     {
00549     }
00550 }
00551
00552 #endif /* qUnix */
00553
00555 bool CompatGetSelectionDetails(const MultiFiles* mf, kSelDetType& selDetType, CStr& selection)
00556 {
00557     bool userHitOK = false;
00558
00559 #ifdef WIN32
00560     CSelectionDetailsDlg selectionDetailsDlg(mf, selDetType, selection.c_str());
00561
00562     if( selectionDetailsDlg.DoModal() == IDOK )
00563     {
00564         selection = selectionDetailsDlg.m_selection;
00565         selDetType = (kSelDetType)selectionDetailsDlg.m_selDetType;
00566
00567         userHitOK = true;
00568     }
00569 #endif /* WIN32 */
00570
00571 #if qUnix
00572     void *wid;
00573 #   if qGTK
00574     wid = UCreate_SelDetailsDlg();
00575 #   endif
00576
00577     UCvsSelectionDetailsDlg *dlg = new UCvsSelectionDetailsDlg( mf, selDetType, selection.c_str());
00578     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00579     if(dlg->DoModal())
00580     {
00581         selection = dlg->m_selection;
00582         selDetType = dlg->m_selDetType;
00583
00584         userHitOK = true;
00585     }
00586     delete dlg;
00587
00588 #endif // qUnix
00589
00590 #ifdef qMacCvsPP
00591 #endif /* qMacCvsPP */
00592
00593     return userHitOK;
00594 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGraphOptDlg Member List

This is the complete list of members for CGraphOptDlg, including all inherited members.

CGraphOptDlg(CPersistentInt &selColor, CPersistentInt &shadowColor, CPersistentInt &headerColor, CPersistentInt &tagColor, CPersistentInt &branchColor, CPersistentInt &nodeColor, CPersistentInt &deadNodeColor, CPersistentInt &userStateNodeColor, CPersistentInt &mergeColor, CWnd *pParent=NULL) | CGraphOptDlg |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CGraphOptDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetAllColors() | CGraphOptDlg | [private]
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CGraphOptDlg |
InitHelpID() | CGraphOptDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_apply | CGraphOptDlg |
m_branchColor | CGraphOptDlg | [private]
m_deadNodeColor | CGraphOptDlg | [private]
m_headerColor | CGraphOptDlg | [private]
m_mergeColor | CGraphOptDlg | [private]
m_nodeColor | CGraphOptDlg | [private]
m_origBranchColor | CGraphOptDlg | [private]
m_origDeadNodeColor | CGraphOptDlg | [private]
m_origHeaderColor | CGraphOptDlg | [private]
m_origMergeColor | CGraphOptDlg | [private]
m_origNodeColor | CGraphOptDlg | [private]
m_origSelColor | CGraphOptDlg | [private]
m_origShadowColor | CGraphOptDlg | [private]
m_origTagColor | CGraphOptDlg | [private]
m_origUserStateNodeColor | CGraphOptDlg | [private]
m_rgbBranch | CGraphOptDlg |
m_rgbDead | CGraphOptDlg |
m_rgbHeader | CGraphOptDlg |
m_rgbMerge | CGraphOptDlg |
m_rgbNode | CGraphOptDlg |
m_rgbSelection | CGraphOptDlg |
m_rgbShadow | CGraphOptDlg |
m_rgbState | CGraphOptDlg |
m_rgbTag | CGraphOptDlg |
m_selColor | CGraphOptDlg | [private]
m_shadowColor | CGraphOptDlg | [private]
m_tagColor | CGraphOptDlg | [private]
m_userStateNodeColor | CGraphOptDlg | [private]
OnApplyNow() | CGraphOptDlg | [protected]
OnBranch() | CGraphOptDlg | [protected]
OnCancel() | CGraphOptDlg | [protected, virtual]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDead() | CGraphOptDlg | [protected]
OnHeader() | CGraphOptDlg | [protected]
OnHelp() | CGraphOptDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CHHelpDialog | [protected, virtual]
OnMerge() | CGraphOptDlg | [protected]
OnNode() | CGraphOptDlg | [protected]
OnOK() | CGraphOptDlg | [protected, virtual]
OnReset() | CGraphOptDlg | [protected]
OnSelection() | CGraphOptDlg | [protected]
OnShadow() | CGraphOptDlg | [protected]
OnState() | CGraphOptDlg | [protected]
OnTag() | CGraphOptDlg | [protected]
PromptForColor(CColorStatic &colorStatic) | CGraphOptDlg | [private]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LogDlg.h Source File

common/LogDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * LogDlg.h : the cvs log dialog
00023  */
00024
00025 #if !defined(AFX_LOGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_LOGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "SmartComboBox.h"
00033
00034 #ifdef WIN32
00035 #   include "HHelpSupport.h"
00036 #endif
00037
00038 class MultiFiles;
00039
00040 bool CompatGetLog(const MultiFiles* mf,
00041                   bool& noRecurs, bool& defBranch, CStr& date,
00042                   bool& headerOnly, bool& headerDesc, bool& supress,
00043                   bool& noTags, bool& onlyRCSfile, bool& hasRev,
00044                   CStr& rev, CStr& states, bool& hasUser, CStr& users,
00045                   bool outGraph = false);
00046
00047 #ifdef WIN32
00048
00050 class CLogMain : public CHHelpPropertyPage
00051 {
00052     DECLARE_DYNAMIC(CLogMain)
00053
00054 // Construction
00055 public:
00056     CLogMain(bool supress);
00057     ~CLogMain();
00058
00059 // Dialog Data
00060     //{{AFX_DATA(CLogMain)
00061     enum { IDD = IDD_LOG_MAIN };
00062     CButton m_headerDescCheck;
00063     CButton m_headerOnlyCheck;
00064     BOOL    m_supress;
00065     BOOL    m_defBranch;
00066     BOOL    m_noRecurs;
00067     BOOL    m_noTags;
00068     BOOL    m_onlyRCS;
00069     BOOL    m_headerOnly;
00070     BOOL    m_headerDesc;
00071     //}}AFX_DATA
00072
00073
00074 // Overrides
00075     // ClassWizard generate virtual function overrides
00076     //{{AFX_VIRTUAL(CLogMain)
00077     protected:
00078     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00079     //}}AFX_VIRTUAL
00080
00081 // Implementation
00082 protected:
00083     // Generated message map functions
00084     //{{AFX_MSG(CLogMain)
00085     afx_msg void OnHeaders();
00086     afx_msg void OnHeadersdesc();
00087     //}}AFX_MSG
00088     DECLARE_MESSAGE_MAP()
00089 private:
00090     // Methods
00091     virtual void InitHelpID();
00092 };
00093
00095 class CLogFilters : public CHHelpPropertyPage
00096 {
00097     DECLARE_DYNAMIC(CLogFilters)
00098
00099 // Construction
00100 public:
00101     CLogFilters(const MultiFiles* mf,
00102         const char* sLastDate, const char* sLastRev,
00103         const char* sLastUsers, const char* sLastStates);
00104     ~CLogFilters();
00105
00106 // Dialog Data
00107     //{{AFX_DATA(CLogFilters)
00108     enum { IDD = IDD_LOG_FILTERS };
00109     CButton m_hasUserCheck;
00110     CButton m_hasStateCheck;
00111     CButton m_hasRevCheck;
00112     CButton m_hasDateCheck;
00113     CButton m_browseTagButton;
00114     CSmartComboBox  m_userCombo;
00115     CSmartComboBox  m_stateCombo;
00116     CSmartComboBox  m_revCombo;
00117     CSmartComboBox  m_dateCombo;
00118     CString m_date;
00119     CString m_rev;
00120     CString m_state;
00121     CString m_user;
00122     BOOL    m_hasDate;
00123     BOOL    m_hasRev;
00124     BOOL    m_hasState;
00125     BOOL    m_hasUser;
00126     //}}AFX_DATA
00127
00128
00129 // Overrides
00130     // ClassWizard generate virtual function overrides
00131     //{{AFX_VIRTUAL(CLogFilters)
00132     protected:
00133     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00134     //}}AFX_VIRTUAL
00135
00136 // Implementation
00137 protected:
00138     // Generated message map functions
00139     //{{AFX_MSG(CLogFilters)
00140     afx_msg void OnDate();
00141     afx_msg void OnRev();
00142     afx_msg void OnState();
00143     afx_msg void OnUser();
00144     afx_msg void OnBrowseTag();
00145     //}}AFX_MSG
00146     DECLARE_MESSAGE_MAP()
00147 private:
00148     // Data members
00149     const MultiFiles* m_mf;
00150
00151     // Methods
00152     virtual void InitHelpID();
00153 };
00154
00155 //{{AFX_INSERT_LOCATION}}
00156 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00157 #endif /* WIN32 */
00158
00159 #endif // !defined(AFX_LOGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

LPseudoWinAttachment Member List

This is the complete list of members for LPseudoWinAttachment, including all inherited members.

CheckWindowSize(void) | LPseudoWinAttachment |
ExecuteSelf(MessageT inMessage, void *ioParam) | LPseudoWinAttachment | [protected, virtual]
GetPageValue(int cmdid) const | LPseudoWinAttachment |
InvalidCache(UWidget *tab_wid) | LPseudoWinAttachment |
ListenToMessage(MessageT inMessage, void *ioParam) | LPseudoWinAttachment | [protected, virtual]
LPseudoWinAttachment(int widid) | LPseudoWinAttachment |
m_CacheWidgets | LPseudoWinAttachment | [protected]
m_lastRect | LPseudoWinAttachment | [protected]
m_PageValues | LPseudoWinAttachment | [protected]
m_widid | LPseudoWinAttachment | [protected]
SearchWidID(LPane *pane) | LPseudoWinAttachment |
SetPageValue(int cmdid, int value) | LPseudoWinAttachment |
~LPseudoWinAttachment() | LPseudoWinAttachment | [virtual]

Generated on Sat Aug 7 22:54:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMemFile.cpp Source File

WinCvs/CJLib/CJLibrary/CJMemFile.cpp

Go to the documentation of this file.
00001 // CJMemFile.cpp: implementation of Maxallion's CCJMemFile class.
00002 //
00003 // Copyright © 1999 Maxallion
00004 // mailto:XFile@maxallion.8m.com
00005 // ICQ# 32304418
00006 //
00007 // CXFile - Extended Memory File - Beta - w/o a lot of error checking
00008 // - Is used like a normal CFile or CStdioFile or CMemFile object
00009 // - String Functions : ReadString, WriteString
00010 // - Loads physical files into memory on creation and saves them back to disk on destruction
00011 // - Can duplicate itself to other CFile derived objects
00012 // - Has a Search function
00013 // - can be read-accessed like an array
00014 //
00015 // OVERLOADED OPERATORS:
00016 // = Imports from another file or sets file Position
00017 // += Appends another file
00018 // [] reads a byte like an array
00019 //
00021 /****************************************************************************
00022  *
00023  * $Date: 2002/08/15 02:23:25 $
00024  * $Revision: 1.2 $
00025  * $Archive: /CodeJock/CJLibrary/CJMemFile.cpp $
00026  *
00027  * $History: CJMemFile.cpp $
00028  *
00029  * *****************  Version 2  *****************
00030  * User: Kirk Stowell Date: 10/24/99   Time: 3:06a
00031  * Updated in $/CodeJock/CJLibrary
00032  * Added UNICODE modifications.
00033  *
00034  * *****************  Version 1  *****************
00035  * User: Kirk Stowell Date: 10/24/99   Time: 3:01a
00036  * Created in $/CodeJock/CJLibrary
00037  * Initial creation.
00038  *
00039  ***************************************************************************/
00041
00042 #include "stdafx.h"
00043 #include "CJMemFile.h"
00044
00045 #ifdef _DEBUG
00046 #undef THIS_FILE
00047 static char THIS_FILE[]=__FILE__;
00048 #define new DEBUG_NEW
00049 #endif
00050
00052 // Construction/Destruction
00054
00055 CCJMemFile::CCJMemFile( UINT nGrowBytes)
00056 {
00057     // Modified default constructor
00058
00059     m_File.m_hFile = NULL;
00060     m_bOpen = false;
00061     m_uiOpenFlags = 0;
00062     CMemFile::CMemFile(nGrowBytes);
00063 }
00064
00065 CCJMemFile::CCJMemFile( BYTE* lpBuffer, UINT nBufferSize, UINT nGrowBytes )
00066 {
00067     // Modified default constructor
00068
00069     m_File.m_hFile = NULL;
00070     m_bOpen = false;
00071     m_uiOpenFlags = 0;
00072     CMemFile::CMemFile(lpBuffer,nBufferSize, nGrowBytes );
00073 }
00074
00075 CCJMemFile::CCJMemFile(LPCTSTR lpszFilename, UINT uiOpenFlags)
00076 {
00077     // CFile compatible constructor
00078
00079     m_File.m_hFile = NULL;
00080     m_bOpen = false;
00081     m_uiOpenFlags = uiOpenFlags;
00082     Open(lpszFilename,uiOpenFlags);
00083 }
00084
00085 CCJMemFile::~CCJMemFile()
00086 {
00087     if (m_bOpen)
00088         Close();
00089     m_File.m_hFile = NULL;
00090     m_uiOpenFlags = 0;
00091     CMemFile::~CMemFile();
00092 }
00093
00094 // Implementation
00095
00096 BOOL CCJMemFile::ReadString(CString& rString)
00097 {
00098     // Readstring Beta Version
00099
00100     rString.Empty();
00101     char ch;
00102
00103     bool bFound = false;
00104     while (GetPosition() < GetLength())
00105     {
00106         Read(&ch,1);
00107
00108         bFound = (ch == '\x0D');
00109         if (bFound || (ch == '\x0'))
00110             break;
00111         else
00112             rString = rString + ch;
00113     }
00114     if (bFound)
00115     {
00116         Read(&ch,1);
00117         if (ch != '\x0A')
00118             Seek(-1,current);
00119     }
00120
00121     if (rString.GetLength() > 0)
00122         return true;
00123     return false;
00124 }
00125
00126 void CCJMemFile::WriteString( LPCTSTR lpsz )
00127 {
00128     // WriteString Beta Version
00129
00130     if (_tcslen(lpsz) > 0)
00131     {
00132         for (UINT iCount = 0; iCount < _tcslen(lpsz); iCount++)
00133             if ((lpsz[iCount] != '\x0D') && (lpsz[iCount] != '\x00'))
00134                 Write(&lpsz[iCount],1);
00135     }
00136     char ch = '\x0D';
00137     Write(&ch,1);
00138     ch = '\x0A';
00139     Write(&ch,1);
00140
00141 }
00142
00143 bool CCJMemFile::Duplicate(CFile *fDuplicate)
00144 {
00145     // Standard Copy Routine
00146
00147     BYTE *pbData = new BYTE[1024];
00148 #if _MFC_VER < 0x700
00149     DWORD dwPos = GetPosition();
00150 #else
00151     ULONGLONG dwPos = GetPosition();
00152 #endif
00153     SeekToBegin();
00154     fDuplicate->SetLength(0);
00155     while (GetPosition() < GetLength())
00156     {
00157         DWORD dwRead = Read(pbData,1024);
00158         fDuplicate->Write(pbData,dwRead);
00159     }
00160     Seek(dwPos,fDuplicate->begin);
00161     delete pbData;
00162     return true;
00163 }
00164
00165 bool CCJMemFile::Duplicate(CString strDup)
00166 {
00167     // Duplicate With CString compatibility
00168
00169     CFile file(strDup,CFile::modeCreate | CFile::modeWrite);
00170     bool bResult = Duplicate(&file);
00171     file.Close();
00172     return bResult;
00173 }
00174
00175 bool CCJMemFile::Open(CString strFilename, UINT uiOpenFlags,CFileException *pError)
00176 {
00177     // CFile compatible Open
00178
00179     if (m_File.m_hFile != NULL)
00180         return false;
00181     if (m_File.Open(strFilename,uiOpenFlags,pError))
00182     {
00183         m_uiOpenFlags = uiOpenFlags;
00184         Load();
00185         m_bOpen = true;
00186         return true;
00187     }
00188     else
00189         return false;
00190 }
00191
00192 bool CCJMemFile::Save()
00193 {
00194     if (m_File.m_hFile == NULL)
00195         return false;
00196     CString str;
00197
00198     // Check if the physical file has write access
00199     if (!(m_uiOpenFlags & modeWrite) && !(m_uiOpenFlags & modeReadWrite))
00200     {
00201         return false;
00202     }
00203
00204 #if _MFC_VER < 0x700
00205     DWORD dwPos = GetPosition();
00206 #else
00207     ULONGLONG dwPos = GetPosition();
00208 #endif
00209     DWORD dwLength = 1024;
00210     BYTE *pData = new BYTE[dwLength];
00211     if (pData == NULL)
00212         return false;
00213     SeekToBegin();
00214     m_File.SetLength(0);
00215     while (GetPosition() < GetLength())
00216     {
00217         DWORD dwRead = Read(pData,dwLength);
00218         m_File.Write(pData,dwRead);
00219     }
00220     Seek(dwPos,begin);
00221     delete pData;
00222     m_File.Flush();
00223     return true;
00224 }
00225
00226 bool CCJMemFile::Load()
00227 {
00228     if (m_File.m_hFile == NULL)
00229         return false;
00230
00231     DWORD dwLength = 1024;
00232     BYTE *pData = new BYTE[dwLength];
00233     if (pData == NULL)
00234         return false;
00235     SeekToBegin();
00236     SetLength(0);
00237     m_File.SeekToBegin();
00238     while (m_File.GetPosition() < m_File.GetLength())
00239     {
00240         DWORD dwRead = m_File.Read(pData,dwLength);
00241         Write(pData,dwRead);
00242     }
00243
00244     delete pData;
00245     return true;
00246 }
00247
00248
00249 void CCJMemFile::Close()
00250 {
00251     if ((m_File.m_hFile != NULL) && m_bOpen)
00252     {
00253         m_bOpen = false;
00254         Save();
00255         m_File.Close();
00256         m_File.m_hFile = NULL;
00257     }
00258 }
00259
00260 void CCJMemFile::Flush()
00261 {
00262     CMemFile::Flush();
00263     Save();
00264 }
00265
00266 bool CCJMemFile::Discard()
00267 {
00268     return Load();
00269 }
00270
00271 bool CCJMemFile::Import(CFile *fImp)
00272 {
00273     if ((fImp == NULL) || (fImp->m_hFile == NULL))
00274         return false;
00275
00276     DWORD dwLength = 1024;
00277     BYTE *pData = new BYTE[dwLength];
00278     if (pData == NULL)
00279         return false;
00280     SeekToBegin();
00281     SetLength(0);
00282     fImp->SeekToBegin();
00283     while (fImp->GetPosition() < fImp->GetLength())
00284     {
00285         DWORD dwRead = fImp->Read(pData,dwLength);
00286         Write(pData,dwRead);
00287     }
00288
00289     delete pData;
00290     return true;
00291 }
00292
00293 bool CCJMemFile::Append(CFile *fApp)
00294 {
00295     if ((fApp == NULL) || (fApp->m_hFile == NULL))
00296         return false;
00297
00298     DWORD dwLength = 1024;
00299     BYTE *pData = new BYTE[dwLength];
00300     if (pData == NULL)
00301         return false;
00302     SeekToEnd();
00303     fApp->SeekToBegin();
00304     while (fApp->GetPosition() < fApp->GetLength())
00305     {
00306         DWORD dwRead = fApp->Read(pData,dwLength);
00307         Write(pData,dwRead);
00308     }
00309
00310     delete pData;
00311     return true;
00312 }
00313
00314 DWORD CCJMemFile::Insert(CFile *fSrc, DWORD dwSourcePos, DWORD dwDestPos, DWORD dwBytes)
00315 {
00316     if (dwBytes == 0)
00317         return 0;
00318
00319     CCJMemFile fPreIns;
00320     CCJMemFile fIns;
00321     CCJMemFile fPostIns;
00322     CCJMemFile fComplete;
00323
00324     Extract(&fPreIns,0,dwDestPos); // Extract Data BEFORE insertion point
00325     Extract(&fPostIns,dwDestPos,GetLength() - dwDestPos); // Extract Data AFTER intertion point
00326
00327     // Extract the "to be inserted" Data from the (fSrc) Source file
00328     {
00329         DWORD dwLength = 1024;
00330         DWORD dwCounter = 0;
00331         BYTE *pData = new BYTE[dwLength];
00332         if (pData == NULL)
00333             return 0;
00334         fSrc->Seek(dwSourcePos,begin);
00335
00336         while (((fSrc->GetPosition() - dwSourcePos) < dwBytes) && (fSrc->GetPosition() < fSrc->GetLength()) )
00337         {
00338             DWORD dwRead = fSrc->Read(pData,dwLength);
00339             if (dwCounter + dwRead > dwSourcePos + dwBytes)
00340                 dwRead = dwBytes - dwCounter;
00341             fIns.Write(pData,dwRead);
00342             dwCounter += dwRead;
00343         }
00344         delete pData;
00345     } // Finished Extraction
00346
00347
00348     fComplete += &fPreIns; // Append BEFORE Data
00349     fComplete += &fIns; // Append the "to be inserted" Data
00350     fComplete += &fPostIns;  // Append the AFTER Data
00351
00352     *this = &fComplete; // Copy completed File
00353
00354     return fIns.GetLength();
00355 }
00356
00357 DWORD CCJMemFile::Insert(CString strSrc, DWORD dwSourcePos, DWORD dwDestPos, DWORD dwBytes)
00358 {
00359     CFile file(strSrc,CFile::modeRead);
00360     DWORD dwResult = Insert(&file, dwSourcePos, dwDestPos, dwBytes);
00361     file.Close();
00362     return dwResult;
00363 }
00364
00365 DWORD CCJMemFile::Extract(CFile *fDest, DWORD dwStartPos, DWORD dwBytes)
00366 {
00367     if (dwBytes == 0)
00368         return 0;
00369 #if _MFC_VER < 0x700
00370     DWORD dwPos = GetPosition();
00371 #else
00372     ULONGLONG dwPos = GetPosition();
00373 #endif
00374     DWORD dwLength = 1024;
00375     DWORD dwCounter = 0;
00376     BYTE *pData = new BYTE[dwLength];
00377     if (pData == NULL)
00378         return 0;
00379     Seek(dwStartPos,begin);
00380
00381     while (((GetPosition() - dwStartPos) < dwBytes) && (GetPosition() < GetLength()) )
00382     {
00383         DWORD dwRead = Read(pData,dwLength);
00384         if (dwCounter + dwRead > dwStartPos + dwBytes)
00385             dwRead = dwBytes - dwCounter;
00386         fDest->Write(pData,dwRead);
00387         dwCounter += dwRead;
00388     }
00389     Seek(dwPos,begin);
00390     delete pData;
00391     fDest->Flush();
00392     return dwCounter;
00393
00394 }
00395
00396 DWORD CCJMemFile::Extract(CString strDest, DWORD dwStartPos, DWORD dwBytes)
00397 {
00398     CFile file(strDest,CFile::modeCreate | CFile::modeWrite);
00399     DWORD dwResult = Extract(&file,dwStartPos,dwBytes);
00400     file.Close();
00401     return dwResult;
00402 }
00403
00404 // Overloaded Operators
00405
00406 void CCJMemFile::operator =(CFile *fDup)
00407 {
00408     Import(fDup);
00409 }
00410
00411 void CCJMemFile::operator =(CString strDup)
00412 {
00413     CFile file;
00414     if (file.Open(strDup,CFile::modeRead))
00415     {
00416         Import(&file);
00417         file.Close();
00418     }
00419 }
00420
00421 void CCJMemFile::operator =(DWORD dwFilePos)
00422 {
00423     Seek(dwFilePos,begin);
00424 }
00425
00426
00427 void CCJMemFile::operator +=(CFile *fApp)
00428 {
00429     Append(fApp);
00430 }
00431
00432 void CCJMemFile::operator +=(CString strApp)
00433 {
00434     CFile file;
00435     if (file.Open(strApp,CFile::modeRead))
00436     {
00437         Append(&file);
00438         file.Close();
00439     }
00440 }
00441
00442 // Indexing Operators
00443
00444 BYTE CCJMemFile::operator [](DWORD dwFilePos)
00445 {
00446     if (dwFilePos > GetLength() -1)
00447         return 0;
00448
00449     BYTE bTemp;
00450     Seek(dwFilePos,begin);
00451     Read(&bTemp,sizeof(BYTE));
00452     return bTemp;
00453 }
00454
00455 LONG CCJMemFile::FindData(void* pData, DWORD dwDataLen, LONG lStartPos)
00456 {
00457     BYTE* pBytes = (BYTE*)pData;
00458
00459
00460     Seek(lStartPos,begin);
00461
00462     bool bFoundAll = false;
00463     LONG lPos = -1;
00464
00465     while ((!bFoundAll) && (GetPosition() < GetLength()))
00466     {
00467         bool bFoundFirst = false;
00468
00469         while ((!bFoundFirst) && (GetPosition() < GetLength()))
00470         {
00471             lPos = GetPosition();
00472             BYTE read;
00473             Read(&read,1);
00474             if (read != pBytes[0])
00475                 continue;
00476
00477             bFoundFirst = true;
00478             break;
00479         }
00480
00481         //Hier Die Restlichen Bytes (dwDataLen -1) vergleichen
00482
00483         DWORD i = 1;
00484         bool bFound = true;
00485
00486         while ((i < dwDataLen) && (GetPosition() < GetLength()) && bFoundFirst)
00487         {
00488             BYTE read;
00489             Read(&read,1);
00490             if (read == pBytes[i++])
00491                 continue;
00492
00493             bFound = false;
00494             Seek(lPos+1,begin);
00495             break;
00496         }
00497
00498         bFoundAll = bFound && bFoundFirst;
00499     }
00500
00501     lPos = bFoundAll ? lPos : -1;
00502 //  while (bFound && (iPos < strSeek.GetLength())
00503 //  {
00504 //  }
00505     return lPos;
00506 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KiColumnModel Member List

This is the complete list of members for KiColumnModel, including all inherited members.

GetAt(const int pos) const =0 | KiColumnModel | [pure virtual]
GetColumn(const int type) const | KiColumnModel | [virtual]
GetCount() const =0 | KiColumnModel | [pure virtual]
GetRecursiveModel() | KiColumnModel | [static]
GetRegularModel() | KiColumnModel | [static]
GetType(const int pos) const =0 | KiColumnModel | [pure virtual]

Generated on Sat Aug 7 22:53:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJDockBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJDockBar.cpp

Go to the documentation of this file.
00001 // CJDockBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJockey/CJLibrary/CJDockBar.cpp $
00011  *
00012  * $History: CJDockBar.cpp $
00013  *
00014  * *****************  Version 5  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/CJLibrary
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 4  *****************
00020  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00021  * Updated in $/CodeJockey/CJLibrary
00022  *
00023  * *****************  Version 3  *****************
00024  * User: Kirk Stowell Date: 7/18/99    Time: 10:25p
00025  * Updated in $/CodeJockey/CJLibrary
00026  * Added derived button class to handle control bar caption button
00027  * updates. Cleaned up inline functions, and import/export macro so that
00028  * class will be imported when linked to, and exported at compile time.
00029  * Added save and restore control bar size and state functionality.
00030  *
00031  * *****************  Version 2  *****************
00032  * User: Kirk Stowell Date: 4/03/99    Time: 12:53p
00033  * Updated in $/CodeJockey/CJ60Lib
00034  * Added comments and cleaned up code.
00035  *
00036  * *****************  Version 1  *****************
00037  * User: Kirk Stowell Date: 10/17/98   Time: 12:53p
00038  * Created in $/CodeJockey/CJ60Lib
00039  * Initial re-write and release.
00040  *
00041  ***************************************************************************/
00043
00044 #include "stdafx.h"
00045 #include "CJDockBar.h"
00046 #include "CJToolBar.h"
00047
00048 #ifdef _DEBUG
00049 #define new DEBUG_NEW
00050 #undef THIS_FILE
00051 static char THIS_FILE[] = __FILE__;
00052 #endif
00053
00055 // CCJDockBar
00056
00057 CCJDockBar::CCJDockBar()
00058 {
00059     // TODO: add construction code here.
00060 }
00061
00062 CCJDockBar::~CCJDockBar()
00063 {
00064     // TODO: add destruction code here.
00065 }
00066
00067 IMPLEMENT_DYNAMIC(CCJDockBar, CDockBar)
00068
00069 BEGIN_MESSAGE_MAP(CCJDockBar, CDockBar)
00070     //{{AFX_MSG_MAP(CCJDockBar)
00071         // NOTE - the ClassWizard will add and remove mapping macros here.
00072         //    DO NOT EDIT what you see in these blocks of generated code!
00073     //}}AFX_MSG_MAP
00074 END_MESSAGE_MAP()
00075
00077 // CCJDockBar message handlers
00078
00079 CSize CCJDockBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
00080 {
00081     ASSERT_VALID(this);
00082
00083     CSize sizeFixed = CControlBar::CalcFixedLayout(bStretch, bHorz);
00084
00085     // get max size
00086     CSize sizeMax;
00087     if (!m_rectLayout.IsRectEmpty())
00088         sizeMax = m_rectLayout.Size();
00089     else
00090     {
00091         CRect rectFrame;
00092         CFrameWnd* pFrame = GetParentFrame();
00093         pFrame->GetClientRect(&rectFrame);
00094         sizeMax = rectFrame.Size();
00095     }
00096
00097     const int NormalcxBorder2=GetSystemMetrics(SM_CYBORDER)*2;
00098     const int NormalcyBorder2=2;
00099     const int AltcxBorder2=0;
00100     const int AltcyBorder2=0;
00101     int cxBorder2=0;
00102     int cyBorder2=0;
00103
00104     // prepare for layout
00105     AFX_SIZEPARENTPARAMS layout;
00106     layout.hDWP = m_bLayoutQuery ?
00107         NULL : ::BeginDeferWindowPos(m_arrBars.GetSize());
00108     CPoint pt(-cxBorder2, -NormalcyBorder2);
00109     int nWidth = 0;
00110
00111     BOOL bWrapped = FALSE;
00112
00113     // layout all the control bars
00114     for (int nPos = 0; nPos < m_arrBars.GetSize(); nPos++)
00115     {
00116         CControlBar* pBar = GetDockedControlBar(nPos);
00117         void* pVoid = m_arrBars[nPos];
00118
00119         if (pBar != NULL)
00120         {
00121             if (pBar->IsVisible())
00122             {
00123                 if(pBar->IsKindOf(RUNTIME_CLASS(CCJToolBar)))
00124                 {
00125                     cxBorder2=AltcxBorder2;
00126                     cyBorder2=AltcyBorder2;
00127                 }
00128                 else
00129                 {
00130                     cxBorder2=NormalcxBorder2;
00131                     cyBorder2=NormalcyBorder2;
00132                 }
00133                 // get ideal rect for bar
00134                 DWORD dwMode = 0;
00135                 if ((pBar->m_dwStyle & CBRS_SIZE_DYNAMIC) &&
00136                     (pBar->m_dwStyle & CBRS_FLOATING))
00137                     dwMode |= LM_HORZ | LM_MRUWIDTH;
00138                 else if (pBar->m_dwStyle & CBRS_ORIENT_HORZ)
00139                     dwMode |= LM_HORZ | LM_HORZDOCK;
00140                 else
00141                     dwMode |=  LM_VERTDOCK;
00142
00143                 CSize sizeBar = pBar->CalcDynamicLayout(-1, dwMode);
00144
00145                 CRect rect(pt, sizeBar);
00146
00147                 // get current rect for bar
00148                 CRect rectBar;
00149                 pBar->GetWindowRect(&rectBar);
00150                 ScreenToClient(&rectBar);
00151
00152                 if (bHorz)
00153                 {
00154                     // Offset Calculated Rect out to Actual
00155                     if (rectBar.left > rect.left && !m_bFloating)
00156                         rect.OffsetRect(rectBar.left - rect.left, 0);
00157
00158                     // If ControlBar goes off the right, then right justify
00159                     if (rect.right > sizeMax.cx && !m_bFloating)
00160                     {
00161                         int x = rect.Width() - cxBorder2;
00162                         x = max(sizeMax.cx - x, pt.x);
00163                         rect.OffsetRect(x - rect.left, 0);
00164                     }
00165
00166                     // If ControlBar has been wrapped, then left justify
00167                     if (bWrapped)
00168                     {
00169                         bWrapped = FALSE;
00170                         rect.OffsetRect(-(rect.left + cxBorder2), 0);
00171                     }
00172                     // If ControlBar is completely invisible, then wrap it
00173                     else if ((rect.left >= (sizeMax.cx - cxBorder2)) &&
00174                         (nPos > 0) && (m_arrBars[nPos - 1] != NULL))
00175                     {
00176                         m_arrBars.InsertAt(nPos, (CObject*)NULL);
00177                         pBar = NULL; pVoid = NULL;
00178                         bWrapped = TRUE;
00179                     }
00180                     if (!bWrapped)
00181                     {
00182                         if (rect != rectBar)
00183                         {
00184                             if (!m_bLayoutQuery &&
00185                                 !(pBar->m_dwStyle & CBRS_FLOATING))
00186                             {
00187                                 pBar->m_pDockContext->m_rectMRUDockPos = rect;
00188                             }
00189                             AfxRepositionWindow(&layout, pBar->m_hWnd, &rect);
00190                         }
00191                         pt.x = rect.left + sizeBar.cx - cxBorder2;
00192                         nWidth = max(nWidth, sizeBar.cy);
00193                     }
00194                 }
00195                 else
00196                 {
00197                     // Offset Calculated Rect out to Actual
00198                     if (rectBar.top > rect.top && !m_bFloating)
00199                         rect.OffsetRect(0, rectBar.top - rect.top);
00200
00201                     // If ControlBar goes off the bottom, then bottom justify
00202                     if (rect.bottom > sizeMax.cy && !m_bFloating)
00203                     {
00204                         int y = rect.Height() - cyBorder2;
00205                         y = max(sizeMax.cy - y, pt.y);
00206                         rect.OffsetRect(0, y - rect.top);
00207                     }
00208
00209                     // If ControlBar has been wrapped, then top justify
00210                     if (bWrapped)
00211                     {
00212                         bWrapped = FALSE;
00213                         rect.OffsetRect(0, -(rect.top + cyBorder2));
00214                     }
00215                     // If ControlBar is completely invisible, then wrap it
00216                     else if ((rect.top >= (sizeMax.cy - cyBorder2)) &&
00217                         (nPos > 0) && (m_arrBars[nPos - 1] != NULL))
00218                     {
00219                         m_arrBars.InsertAt(nPos, (CObject*)NULL);
00220                         pBar = NULL; pVoid = NULL;
00221                         bWrapped = TRUE;
00222                     }
00223                     if (!bWrapped)
00224                     {
00225                         if (rect != rectBar)
00226                         {
00227                             if (!m_bLayoutQuery &&
00228                                 !(pBar->m_dwStyle & CBRS_FLOATING))
00229                             {
00230                                 pBar->m_pDockContext->m_rectMRUDockPos = rect;
00231                             }
00232                             AfxRepositionWindow(&layout, pBar->m_hWnd, &rect);
00233                         }
00234                         pt.y = rect.top + sizeBar.cy - cyBorder2;
00235                         nWidth = max(nWidth, sizeBar.cx);
00236                     }
00237                 }
00238             }
00239             if (!bWrapped)
00240             {
00241                 // handle any delay/show hide for the bar
00242                 pBar->RecalcDelayShow(&layout);
00243             }
00244         }
00245         if (pBar == NULL && pVoid == NULL && nWidth != 0)
00246         {
00247             // end of row because pBar == NULL
00248             if (bHorz)
00249             {
00250                 pt.y += nWidth - cyBorder2;
00251                 sizeFixed.cx = max(sizeFixed.cx, pt.x);
00252                 sizeFixed.cy = max(sizeFixed.cy, pt.y);
00253                 pt.x = -cxBorder2;
00254             }
00255             else
00256             {
00257                 pt.x += nWidth - cxBorder2;
00258                 sizeFixed.cx = max(sizeFixed.cx, pt.x);
00259                 sizeFixed.cy = max(sizeFixed.cy, pt.y);
00260                 pt.y = -cyBorder2;
00261             }
00262             nWidth = 0;
00263         }
00264     }
00265     if (!m_bLayoutQuery)
00266     {
00267         // move and resize all the windows at once!
00268         if (layout.hDWP == NULL || !::EndDeferWindowPos(layout.hDWP))
00269             TRACE0("Warning: DeferWindowPos failed - low system resources.\n");
00270     }
00271
00272     // adjust size for borders on the dock bar itself
00273     CRect rect;
00274     rect.SetRectEmpty();
00275     CalcInsideRect(rect, bHorz);
00276
00277     if ((!bStretch || !bHorz) && sizeFixed.cx != 0)
00278         sizeFixed.cx += -rect.right + rect.left;
00279     if ((!bStretch || bHorz) && sizeFixed.cy != 0)
00280         sizeFixed.cy += -rect.bottom + rect.top;
00281
00282     return sizeFixed;
00283 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FilterMaskOptDlg.cpp Source File

common/FilterMaskOptDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- August 2003
00019  */
00020
00021 /*
00022  * FilterMaskOptDlg.cpp --- filter mask options dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #include "wincvs.h"
00029 #endif /* WIN32 */
00030
00031 #include "FilterMaskOptDlg.h"
00032
00033 #ifdef _DEBUG
00034 #define new DEBUG_NEW
00035 #undef THIS_FILE
00036 static char THIS_FILE[] = __FILE__;
00037 #endif
00038
00039 #ifdef WIN32
00040
00042 // CFilterMaskOptDlg dialog
00043
00044
00045 CFilterMaskOptDlg::CFilterMaskOptDlg(const int reactionSpeed, CWnd* pParent /*=NULL*/)
00046     : CHHelpDialog(CFilterMaskOptDlg::IDD, pParent)
00047 {
00048     //{{AFX_DATA_INIT(CFilterMaskOptDlg)
00049     m_reactionSpeed = reactionSpeed;
00050     //}}AFX_DATA_INIT
00051 }
00052
00053
00054 void CFilterMaskOptDlg::DoDataExchange(CDataExchange* pDX)
00055 {
00056     CHHelpDialog::DoDataExchange(pDX);
00057     //{{AFX_DATA_MAP(CFilterMaskOptDlg)
00058     DDX_Control(pDX, IDC_REACTION_SPEED_SECONDS, m_reactionSpeedStatic);
00059     DDX_Control(pDX, IDC_REACTION_SPEED_SPIN, m_reactionSpeedSpin);
00060     DDX_Text(pDX, IDC_REACTION_SPEED, m_reactionSpeed);
00061     DDV_MinMaxInt(pDX, m_reactionSpeed, 0, 1000000);
00062     //}}AFX_DATA_MAP
00063 }
00064
00065
00066 BEGIN_MESSAGE_MAP(CFilterMaskOptDlg, CHHelpDialog)
00067     //{{AFX_MSG_MAP(CFilterMaskOptDlg)
00068     ON_EN_CHANGE(IDC_REACTION_SPEED, OnChangeReactionSpeed)
00069     ON_BN_CLICKED(IDHELP, OnHelp)
00070     //}}AFX_MSG_MAP
00071 END_MESSAGE_MAP()
00072
00074 // CFilterMaskOptDlg message handlers
00075
00077 BOOL CFilterMaskOptDlg::OnInitDialog()
00078 {
00079     CHHelpDialog::OnInitDialog();
00080
00081     // Extra initialization
00082     m_reactionSpeedSpin.SetRange(0, 1000000);
00083
00084     UpdateReactionSpeedInfo();
00085
00086     return TRUE;  // return TRUE unless you set the focus to a control
00087     // EXCEPTION: OCX Property Pages should return FALSE
00088 }
00089
00090 void CFilterMaskOptDlg::InitHelpID()
00091 {
00092     SetCtrlHelpID(IDC_REACTION_SPEED,           IDH_IDC_REACTION_SPEED);
00093     SetCtrlHelpID(IDC_REACTION_SPEED_SPIN,      IDH_IDC_REACTION_SPEED_SPIN);
00094     SetCtrlHelpID(IDC_REACTION_SPEED_SECONDS,   IDH_IDC_REACTION_SPEED_SECONDS);
00095 }
00096
00098 void CFilterMaskOptDlg::OnHelp()
00099 {
00100     ShowHelp();
00101 }
00102
00104 void CFilterMaskOptDlg::OnChangeReactionSpeed()
00105 {
00106     UpdateReactionSpeedInfo();
00107 }
00108
00112 void CFilterMaskOptDlg::UpdateReactionSpeedInfo()
00113 {
00114     if( ::IsWindow(m_reactionSpeedStatic.GetSafeHwnd()) )
00115     {
00116         BOOL trans = FALSE;
00117         const int reactionSpeed = GetDlgItemInt(IDC_REACTION_SPEED, &trans);
00118
00119         CString reactionSpeedInfo;
00120         if( trans )
00121         {
00122             const double secReactionSpeed = (double)reactionSpeed / 1000;
00123
00124             CString strSecReactionSpeed;
00125             strSecReactionSpeed.Format("%f", secReactionSpeed);
00126             strSecReactionSpeed.TrimRight("0");
00127             strSecReactionSpeed.TrimRight(".");
00128
00129             if( !strSecReactionSpeed.IsEmpty() )
00130             {
00131                 reactionSpeedInfo.Format("(%s second%s)", strSecReactionSpeed, secReactionSpeed >= 2 ? "s" : "");
00132             }
00133         }
00134
00135         m_reactionSpeedStatic.SetWindowText(reactionSpeedInfo);
00136     }
00137 }
00138 #endif /* WIN32 */
00139
00141 bool CompatGetFilterMaskOptions(int& reactionSpeed)
00142 {
00143     bool userHitOK = false;
00144
00145 #ifdef WIN32
00146     CFilterMaskOptDlg filterMaskOptDlg(reactionSpeed);
00147
00148     if( filterMaskOptDlg.DoModal() == IDOK )
00149     {
00150         reactionSpeed = filterMaskOptDlg.m_reactionSpeed;
00151
00152         userHitOK = true;
00153     }
00154 #endif /* WIN32 */
00155
00156 #ifdef qMacCvsPP
00157 #endif /* qMacCvsPP */
00158
00159 #if qUnix
00160 #endif // qUnix
00161
00162     return userHitOK;
00163 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatButton.h Source File

WinCvs/CJLib/Include/CJFlatButton.h

Go to the documentation of this file.
00001 // CJFlatButton.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2000/02/29 22:28:40 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/Include/CJFlatButton.h $
00011  *
00012  * $History: CJFlatButton.h $
00013  *
00014  * *****************  Version 17  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:00p
00016  * Updated in $/CodeJock/Include
00017  * Further Updates to OnEraseBkgnd(...) and OnPaint() for flicker free
00018  * drawing.
00019  *
00020  * *****************  Version 16  *****************
00021  * User: Kirk Stowell Date: 10/30/99   Time: 2:25p
00022  * Updated in $/CodeJock/Include
00023  * Overrode OnEraseBkgnd(...) and made modifications to DrawItem(...) to
00024  * handle flicker free drawing.
00025  *
00026  * *****************  Version 15  *****************
00027  * User: Kirk Stowell Date: 10/26/99   Time: 10:39p
00028  * Updated in $/CodeJock/Include
00029  * Made class methods virtual for inheritance purposes.
00030  *
00031  * *****************  Version 14  *****************
00032  * User: Kirk Stowell Date: 10/24/99   Time: 4:28p
00033  * Updated in $/CodeJock/Include
00034  * Added method SetAlternateColors(...) which will allow the user to
00035  * define the "face", "hilight" and "shadow" colors used by the control
00036  * rather than used the system defaults. Thanks to Ronen Magid
00037  * [ronenm@simplement.co.il] for his suggestions.
00038  *
00039  * *****************  Version 13  *****************
00040  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00041  * Updated in $/CodeJock/Include
00042  * Fixed potential resource and memory leak problems.
00043  *
00044  * *****************  Version 12  *****************
00045  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00046  * Updated in $/CodeJockey/Include
00047  * Updated copyright and contact information.
00048  *
00049  * *****************  Version 11  *****************
00050  * User: Kirk Stowell Date: 8/29/99    Time: 9:46p
00051  * Updated in $/CodeJockey/Include
00052  * Fixed bug when the button is pressed 2 times very quickly, the button
00053  * is only pressed once - Stephan Neumann <neumann@dialogs.de>
00054  *
00055  * *****************  Version 10  *****************
00056  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00057  * Updated in $/CodeJockey/Include
00058  *
00059  * *****************  Version 9  *****************
00060  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00061  * Updated in $/CodeJockey/Include
00062  *
00063  * *****************  Version 8  *****************
00064  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00065  * Updated in $/CodeJockey/Include
00066  *
00067  * *****************  Version 7  *****************
00068  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00069  * Updated in $/CodeJockey/Include
00070  * Cleaned up inline functions, and import/export macro so that class will
00071  * be imported when linked to, and exported at compile time.
00072  *
00073  * *****************  Version 6  *****************
00074  * User: Kirk Stowell Date: 7/14/99    Time: 9:58p
00075  * Updated in $/CodeJockey/Include
00076  * Re-wrote class to handle icons, text and bitmaps and added additional
00077  * functionality which was needed by the CCJCaption class.
00078  *
00079  * *****************  Version 5  *****************
00080  * User: Kirk Stowell Date: 6/09/99    Time: 8:45p
00081  * Updated in $/CodeJockey/Include
00082  * cleaned up _CJXLIB_INLINE functions, added validation assert.
00083  *
00084  * *****************  Version 4  *****************
00085  * User: Kirk Stowell Date: 4/03/99    Time: 4:23p
00086  * Updated in $/CodeJockey/Include
00087  * Added comments and cleaned up code.
00088  *
00089  * *****************  Version 3  *****************
00090  * User: Kirk Stowell Date: 3/13/99    Time: 4:24p
00091  * Updated in $/CodeJockey/Include
00092  * Patrick Bergeron [patb@softimage.com] fixed the following bugs:
00093  *
00094  * Moving the cursor over the flat button doesn't raise the button right
00095  * away. We have to wait for the first timer message to arrive, which is a
00096  * bit annoying. It gives the impression that the system isn't very
00097  * responsive. So in the OnMouseMove method, we call OnTimer(1) to force
00098  * the initial update of the button.
00099  *
00100  * Sometimes, a CJFlatButton would stay in a raised state when moving the
00101  * mouse quickly over the client area of a few CJFlatButtons. The reason
00102  * turned out to be the use of a static (ahem, global) variable
00103  * "bPainted". The simple fix for this was to put bPainted as a member
00104  * variable ("m_bPainted") and use this member variable instead.
00105  *
00106  * Flat buttons are now much more responsive and behave correctly in all
00107  * cases.
00108  *
00109  * *****************  Version 2  *****************
00110  * User: Kirk Stowell Date: 10/17/98   Time: 4:24p
00111  * Updated in $/CodeJockey/Include
00112  * Code clean up and re-organization, renamed CCJButton to CCJFlatButton.
00113  *
00114  * *****************  Version 1  *****************
00115  * User: Kirk Stowell Date: 10/17/98   Time: 4:23p
00116  * Created in $/CodeJockey/Include
00117  * Initial re-write and release.
00118  *
00119  ***************************************************************************/
00121
00122 #ifndef __CJFLATBUTTON_H__
00123 #define __CJFLATBUTTON_H__
00124
00125 #if _MSC_VER > 1000
00126 #pragma once
00127 #endif // _MSC_VER > 1000
00128
00129 // CCJFlatButton is a CButton derived class used to create flat buttons.
00130 // this class can only be used with the BS_OWNERDRAW style bit set.
00131 class _CJX_EXT_CLASS CCJFlatButton : public CButton
00132 {
00133     DECLARE_DYNAMIC(CCJFlatButton)
00134
00135 public:
00136
00137     // Default constructor
00138     //
00139     CCJFlatButton();
00140
00141     // Virtual destructor
00142     //
00143     virtual ~CCJFlatButton();
00144
00145 protected:
00146
00147     BOOL        m_bMouseOver;
00148     BOOL        m_bLBtnDown;    // true if left mouse button is pressed
00149     BOOL        m_bFlatLook;    // true for flat buttons see DisableFlatLook()
00150     CSize       m_sizeIcon;     // size of the icon if any associated with the button
00151     COLORREF    m_clrHilite;    // set to ::GetSysColor(COLOR_BTNHIGHLIGHT)
00152     COLORREF    m_clrShadow;    // set to ::GetSysColor(COLOR_BTNSHADOW)
00153     COLORREF    m_clrDkShad;    // set to ::GetSysColor(COLOR_3DDKSHADOW)
00154     COLORREF    m_clrNormal;    // set to ::GetSysColor(COLOR_BTNFACE)
00155     COLORREF    m_clrTextGy;    // set to ::GetSysColor(COLOR_GRAYTEXT)
00156     COLORREF    m_clrTextNm;    // set to ::GetSysColor(COLOR_BTNTEXT)
00157     COLORREF    m_clrAltNormal; // user defined replacement for face color.
00158     COLORREF    m_clrAltHilite; // user defined replacement for hilite color.
00159     COLORREF    m_clrAltShadow; // user defined replacement for shadow color.
00160     COLORREF    m_clrAltTextNm; // user defined replacement for text color.
00161     BOOL        m_bAltColor;    // TRUE if user defined colors are used.
00162     BOOL        m_bPainted;     // used during paint operations
00163     HICON       m_hPushed;
00164     CFont*      m_pFont;
00165     CFont       m_Font;         // default font created by control if m_pFont is NULL
00166     HCURSOR     m_hCursor;
00167
00168 public:
00169
00170     virtual void SetButtonFont(CFont* pFont);
00171
00172     // this method will allow the user to define the default colors for the background
00173     // shadow and hilight colors for the button.
00174     //
00175     virtual void SetAlternateColors(COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm);
00176
00177     // this member function is used to disable or enable the flat
00178     // look for the button
00179     //
00180     virtual void DisableFlatLook(
00181         // set to true to disable the flat look.
00182         BOOL bDisable = FALSE);
00183
00184     // this memeber function is used to associate an icon with the
00185     // flat button.
00186     //
00187     virtual void SetIcon(
00188         // handle to icon to be associated with button.
00189         HICON hIcon,
00190         // desired size of the icon, must be smaller than
00191         // button size for best results.
00192         CSize size);
00193
00194     // this memeber function is used to associate an icon with the
00195     // flat button.
00196     //
00197     virtual void SetIcon(
00198         // handle to icon to be associated with button.
00199         HICON hIcon,
00200         // handle of the pushed icon to be associated with button.
00201         HICON hPushed,
00202         // desired size of the icon, must be smaller than
00203         // button size for best results.
00204         CSize size);
00205
00206 protected:
00207
00208     // these memeber functions are called by the control during paint
00209     // operations.
00210     //
00211     virtual void DrawButtonIcon(CDC* pDC, UINT nState, CRect& rcItem);
00212     virtual void DrawButtonText(CDC* pDC, UINT nState, CRect& rcItem);
00213     virtual void DrawButtonBitmap(CDC* pDC, UINT nState, CRect& rcItem);
00214
00215     // used by the control to initialize the default font.
00216     //
00217     virtual void UpdateFont();
00218
00219 // Overrides
00220     // ClassWizard generated virtual function overrides
00221     //{{AFX_VIRTUAL(CCJFlatButton)
00222     public:
00223     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00224     //}}AFX_VIRTUAL
00225
00226     // Generated message map functions
00227 protected:
00228     //{{AFX_MSG(CCJFlatButton)
00229     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00230     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00231     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00232     afx_msg void OnTimer(UINT nIDEvent);
00233     afx_msg void OnSysColorChange();
00234     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00235     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00236     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00237     afx_msg void OnPaint();
00238     //}}AFX_MSG
00239
00240     DECLARE_MESSAGE_MAP()
00241 };
00242
00244 //  Inline Functions
00246
00247 _CJXLIB_INLINE void CCJFlatButton::DisableFlatLook(BOOL bDisable)
00248     { ASSERT(::IsWindow(m_hWnd)); m_bFlatLook = bDisable; Invalidate(); }
00249
00250 _CJXLIB_INLINE void CCJFlatButton::SetIcon(HICON hIcon, CSize size)
00251     { ASSERT(::IsWindow(m_hWnd)); m_sizeIcon = size; CButton::SetIcon(hIcon); }
00252
00253 _CJXLIB_INLINE void CCJFlatButton::SetIcon(HICON hIcon, HICON hPushed, CSize size)
00254     { ASSERT(::IsWindow(m_hWnd)); m_hPushed = hPushed; SetIcon(hIcon, size); }
00255
00256 _CJXLIB_INLINE void CCJFlatButton::SetButtonFont(CFont *pFont)
00257     { ASSERT(::IsWindow(m_hWnd)); m_pFont = pFont; }
00258
00260
00261 //{{AFX_INSERT_LOCATION}}
00262 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00263
00264 #endif // __CJFLATBUTTON_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/StdAfx.cpp Source File

WinCvs/CJLib/CJLibrary/StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  CJLibrary.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004 //
00005 // Copyright © 1999 CodeJock.com and
00006 // Copyright © 1998-1999 Kirk W. Stowell, All Rights Reserved.
00007 //
00008 // mailto:kstowell@codejock.com
00009 // http://www.codejock.com
00010 //
00011 // Not to be used or distributed without proper registration.
00012 //
00014 /****************************************************************************
00015  *
00016  * $Date: 1999/11/30 21:45:49 $
00017  * $Revision: 1.1.1.3 $
00018  * $Archive: /CodeJockey/CJLibrary/StdAfx.cpp $
00019  *
00020  * $History: StdAfx.cpp $
00021  *
00022  * *****************  Version 4  *****************
00023  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00024  * Updated in $/CodeJockey/CJLibrary
00025  * Updated copyright and contact information.
00026  *
00027  * *****************  Version 3  *****************
00028  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00029  * Updated in $/CodeJockey/CJLibrary
00030  *
00031  * *****************  Version 2  *****************
00032  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00033  * Updated in $/CodeJockey/CJLibrary
00034  *
00035  * *****************  Version 1  *****************
00036  * User: Kirk Stowell Date: 6/23/99    Time: 12:05a
00037  * Created in $/CodeJockey/CJLibrary
00038  *
00039  ***************************************************************************/
00041
00042 #include "stdafx.h"
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs.odl Source File

WinCvs/wincvs.odl

Go to the documentation of this file.
00001 // wincvs.odl : type library source for wincvs.exe
00002
00003 // This file will be processed by the MIDL compiler to produce the
00004 // type library (wincvs.tlb).
00005
00006 [ uuid(D2D77DC3-8299-11D1-8949-444553540000), version(1.0) ]
00007 library Wincvs
00008 {
00009     importlib("stdole32.tlb");
00010
00011
00012     //  Primary dispatch interface for CWincvsDoc
00013
00014     [ uuid(D2D77DC4-8299-11D1-8949-444553540000) ]
00015     dispinterface IWincvs
00016     {
00017         properties:
00018             // NOTE - ClassWizard will maintain property information here.
00019             //    Use extreme caution when editing this section.
00020             //{{AFX_ODL_PROP(CWincvsDoc)
00021             [id(1)] BSTR ViewPath;
00022             //}}AFX_ODL_PROP
00023
00024         methods:
00025             // NOTE - ClassWizard will maintain method information here.
00026             //    Use extreme caution when editing this section.
00027             //{{AFX_ODL_METHOD(CWincvsDoc)
00028             //}}AFX_ODL_METHOD
00029
00030     };
00031
00032     //  Class information for CWincvsDoc
00033
00034     [ uuid(D2D77DC2-8299-11D1-8949-444553540000) ]
00035     coclass Document
00036     {
00037         [default] dispinterface IWincvs;
00038     };
00039
00040     //{{AFX_APPEND_ODL}}
00041     //}}AFX_APPEND_ODL}}
00042 };
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportFilterDlg.cpp Source File

common/ImportFilterDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * ImportFilterDlg.cpp - edit filtered import
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "wincvs_winutil.h"
00030 #endif /* WIN32 */
00031
00032 #if qUnix
00033 #   include "UCvsDialogs.h"
00034 #endif
00035
00036 #ifdef qMacCvsPP
00037 #   include <Icons.h>
00038 #include "FSRefGetFileIcon.h"
00039
00040 #   include <UModalDialogs.h>
00041 #   include <LTableMultiGeometry.h>
00042 #   include <LOutlineKeySelector.h>
00043 #   include <LTableSingleSelector.h>
00044 #   include <LOutlineRowSelector.h>
00045 #   include <UAttachments.h>
00046 #   include <UGAColorRamp.h>
00047 #   include <LTextEditView.h>
00048
00049 #   include "MacCvsConstant.h"
00050 #endif /* qMacCvsPP */
00051
00052 #include "ImportFilterDlg.h"
00053 #include "AppConsole.h"
00054
00055 #ifdef WIN32
00056 #   ifdef _DEBUG
00057 #   define new DEBUG_NEW
00058 #   undef THIS_FILE
00059     static char THIS_FILE[] = __FILE__;
00060 #   endif
00061 #endif /* WIN32 */
00062
00063
00065 enum
00066 {
00067     COL_STATE = 0,
00068     COL_DESC,
00069     COL_KIND,
00070     COL_NUM
00071 };
00072
00073
00075 static char* _gszColumnLabel[COL_NUM] =
00076 {
00077     "Entry state", "Entry description", "Entry kind"
00078 };
00079
00081 static int _gnColumnWidth[COL_NUM] =
00082 {
00083 #if qUnix
00084     80, 270, 80
00085 #else
00086     80, 270, 140
00087 #endif
00088 };
00089
00090
00091 #ifdef WIN32
00092
00094 // CImportWarning
00095
00096 CImportWarning::CImportWarning(ReportWarning* warn, CWnd* pParent /*=NULL*/)
00097     : CHHelpDialog(CImportWarning::IDD, pParent)
00098 {
00099     CStr print;
00100     warn->PrintOut(print);
00101
00102     //{{AFX_DATA_INIT(CImportWarning)
00103     m_desc = print;
00104     //}}AFX_DATA_INIT
00105 }
00106
00107
00108 void CImportWarning::DoDataExchange(CDataExchange* pDX)
00109 {
00110     CHHelpDialog::DoDataExchange(pDX);
00111     //{{AFX_DATA_MAP(CImportWarning)
00112     DDX_Text(pDX, IDC_WARNING_DESC, m_desc);
00113     //}}AFX_DATA_MAP
00114 }
00115
00116
00117 BEGIN_MESSAGE_MAP(CImportWarning, CHHelpDialog)
00118     //{{AFX_MSG_MAP(CImportWarning)
00119     ON_BN_CLICKED(IDHELP, OnHelp)
00120     //}}AFX_MSG_MAP
00121 END_MESSAGE_MAP()
00122
00124 // CImportWarning message handlers
00125
00126 void CImportWarning::InitHelpID()
00127 {
00128     SetCtrlHelpID(IDC_WARNING_DESC, IDH_IDC_WARNING_DESC);
00129 }
00130
00132 void CImportWarning::OnHelp()
00133 {
00134     ShowHelp();
00135 }
00136
00138 // CImportEntry
00139
00140 CImportEntry::CImportEntry(ReportConflict* entry, CWnd* pParent /*=NULL*/)
00141     : CHHelpDialog(CImportEntry::IDD, pParent)
00142 {
00143     CStr print;
00144     entry->PrintOut(print);
00145
00146     //{{AFX_DATA_INIT(CImportEntry)
00147     //}}AFX_DATA_INIT
00148
00149     //keep these outside MFC remarks
00150     m_desc = print;
00151
00152     if( entry->HasForceBinary() )
00153         m_radios = 1;
00154     else if( entry->HasForceUnicode() )
00155         m_radios = 2;
00156     else if( entry->HasForceText() )
00157         m_radios = 3;
00158     else if( entry->HasForceNoKeywords() )
00159         m_radios = 4;
00160     else if( entry->HasIgnore() )
00161         m_radios = 5;
00162     else
00163         m_radios = 0;
00164 }
00165
00166
00167 void CImportEntry::DoDataExchange(CDataExchange* pDX)
00168 {
00169     CHHelpDialog::DoDataExchange(pDX);
00170     //{{AFX_DATA_MAP(CImportEntry)
00171     DDX_Text(pDX, IDC_CONFLICT_DESC, m_desc);
00172     DDX_Radio(pDX, IDC_ENTRYSTATE_NO_CHANGE, m_radios);
00173     //}}AFX_DATA_MAP
00174 }
00175
00176
00177 BEGIN_MESSAGE_MAP(CImportEntry, CHHelpDialog)
00178     //{{AFX_MSG_MAP(CImportEntry)
00179     ON_BN_CLICKED(IDHELP, OnHelp)
00180     //}}AFX_MSG_MAP
00181 END_MESSAGE_MAP()
00182
00184 // CImportEntry message handlers
00185
00186 void CImportEntry::InitHelpID()
00187 {
00188     SetCtrlHelpID(IDC_ENTRYSTATE_NO_CHANGE,     IDH_IDC_ENTRYSTATE_NO_CHANGE);
00189     SetCtrlHelpID(IDC_ENTRYSTATE_FORCE_BINARY,  IDH_IDC_ENTRYSTATE_FORCE_BINARY);
00190     SetCtrlHelpID(IDC_ENTRYSTATE_FORCE_UNICODE, IDH_IDC_ENTRYSTATE_FORCE_UNICODE);
00191     SetCtrlHelpID(IDC_ENTRYSTATE_FORCE_TEXT,    IDH_IDC_ENTRYSTATE_FORCE_TEXT);
00192     SetCtrlHelpID(IDC_ENTRYSTATE_NO_EXPANSION,  IDH_IDC_ENTRYSTATE_NO_EXPANSION);
00193     SetCtrlHelpID(IDC_ENTRYSTATE_IGNORE,        IDH_IDC_ENTRYSTATE_IGNORE);
00194     SetCtrlHelpID(IDC_CONFLICT_DESC,            IDH_IDC_CONFLICT_DESC);
00195 }
00196
00198 void CImportEntry::OnHelp()
00199 {
00200     ShowHelp();
00201 }
00202
00204 // CImportFilterDlg dialog
00205
00206 CImportFilterDlg::CImportFilterDlg(ReportConflict* entries, ReportWarning* warnings,
00207                                    CWnd* pParent /*=NULL*/)
00208     : CHHelpDialog(CImportFilterDlg::IDD, pParent)
00209 {
00210     //{{AFX_DATA_INIT(CImportFilterDlg)
00211     m_entries = entries;
00212     m_warnings = warnings;
00213     //}}AFX_DATA_INIT
00214 }
00215
00216
00217 void CImportFilterDlg::DoDataExchange(CDataExchange* pDX)
00218 {
00219     CHHelpDialog::DoDataExchange(pDX);
00220     //{{AFX_DATA_MAP(CImportFilterDlg)
00221     DDX_Control(pDX, IDC_ENTRIES_LIST, m_list);
00222     DDX_Control(pDX, IDC_ENTRY_EDIT, m_edit);
00223     //}}AFX_DATA_MAP
00224 }
00225
00226
00227 BEGIN_MESSAGE_MAP(CImportFilterDlg, CHHelpDialog)
00228     //{{AFX_MSG_MAP(CImportFilterDlg)
00229     ON_BN_CLICKED(IDC_ENTRY_EDIT, OnEditentry)
00230     ON_NOTIFY(NM_DBLCLK, IDC_ENTRIES_LIST, OnDblclkListentries)
00231     ON_BN_CLICKED(IDHELP, OnHelp)
00232     //}}AFX_MSG_MAP
00233 END_MESSAGE_MAP()
00234
00236 // CImportFilterDlg message handlers
00237
00239 void CImportFilterDlg::OnEditentry()
00240 {
00241     // The user wants to edit an entry.
00242     // Start at the top of the list and walk through it until an item
00243     // that is selected is found.
00244     int nItem = m_list.GetNextItem(-1, LVNI_ALL);
00245     while( nItem != -1 )
00246     {
00247         UINT nState = m_list.GetItemState(nItem, LVIS_SELECTED);
00248         if( (nState & LVIS_SELECTED) == LVIS_SELECTED )
00249             break;
00250
00251         nItem = m_list.GetNextItem(nItem, LVNI_ALL);
00252     }
00253
00254     if( nItem == -1 )
00255         return;
00256
00257     int i = 0;
00258     ReportWarning* warn = m_warnings;
00259     while( warn != 0L )
00260     {
00261         if( i == nItem )
00262         {
00263             CImportWarning dlg(warn);
00264             dlg.DoModal();
00265             return;
00266         }
00267
00268         warn = warn->next;
00269         i++;
00270     }
00271
00272     ReportConflict* conf = m_entries;
00273     while( conf != 0L )
00274     {
00275         if( i == nItem )
00276         {
00277             CImportEntry dlg(conf);
00278             if( dlg.DoModal() == IDOK )
00279             {
00280                 switch(dlg.m_radios)
00281                 {
00282                 case 0:
00283                     conf->DisableUserSettings();
00284                     break;
00285                 case 1:
00286                     conf->ForceBinary();
00287                     break;
00288                 case 2:
00289                     conf->ForceUnicode();
00290                     break;
00291                 case 3:
00292                     conf->ForceText();
00293                     break;
00294                 case 4:
00295                     conf->ForceNoKeywords();
00296                     break;
00297                 case 5:
00298                     conf->Ignore();
00299                     break;
00300                 }
00301
00302                 m_list.SetItemText(nItem, COL_KIND, conf->GetKindDesc());
00303             }
00304
00305             return;
00306         }
00307
00308         conf = conf->next;
00309         i++;
00310     }
00311 }
00312
00314 void CImportFilterDlg::OnDblclkListentries(NMHDR* pNMHDR, LRESULT* pResult)
00315 {
00316     OnEditentry();
00317     *pResult = 0;
00318 }
00319
00321 BOOL CImportFilterDlg::OnInitDialog()
00322 {
00323     CHHelpDialog::OnInitDialog();
00324
00325     // Extra initialization
00326
00327     // Need to set up to display the little icons next to each entry
00328     if( m_imageList.m_hImageList == 0L )
00329         m_imageList.Create(IDB_IMPORT, 16, 1, RGB(255, 255, 255));
00330
00331     m_list.SetImageList(&m_imageList, LVSIL_SMALL);
00332
00333     // Full row selection
00334     SetListCtrlExtendedStyle(&m_list, LVS_EX_FULLROWSELECT | LVS_EX_ONECLICKACTIVATE | LVS_EX_UNDERLINEHOT | LVS_EX_LABELTIP);
00335
00336     // Set up columns inside the list view
00337     m_list.InsertColumn(COL_STATE,  _gszColumnLabel[COL_STATE], LVCFMT_LEFT, _gnColumnWidth[COL_STATE]);
00338     m_list.InsertColumn(COL_DESC,   _gszColumnLabel[COL_DESC], LVCFMT_LEFT, _gnColumnWidth[COL_DESC]);
00339     m_list.InsertColumn(COL_KIND,   _gszColumnLabel[COL_KIND], LVCFMT_LEFT, _gnColumnWidth[COL_KIND]);
00340
00341     int i = 0;
00342     ReportWarning* warn = m_warnings;
00343     while( warn != 0L )
00344     {
00345         // Store this information in the list view
00346         m_list.InsertItem(i, "", warn->IsError() ? 0 : 1);
00347
00348         m_list.SetItemText(i, COL_DESC, warn->GetDesc());
00349         m_list.SetItemText(i, COL_STATE, warn->GetStateDesc());
00350
00351         warn = warn->next;
00352         i++;
00353     }
00354
00355     ReportConflict* conf = m_entries;
00356     while( conf != 0L )
00357     {
00358         // Store this information in the list view
00359         m_list.InsertItem(i, "", conf->HasConflict() ? 0 : 1);
00360
00361         m_list.SetItemText(i, COL_STATE, conf->GetStateDesc());
00362         m_list.SetItemText(i, COL_DESC, conf->GetDesc());
00363         m_list.SetItemText(i, COL_KIND, conf->GetKindDesc());
00364
00365         conf = conf->next;
00366         i++;
00367     }
00368
00369     return TRUE;  // return TRUE unless you set the focus to a control
00370                   // EXCEPTION: OCX Property Pages should return FALSE
00371 }
00372
00373 void CImportFilterDlg::InitHelpID()
00374 {
00375     SetCtrlHelpID(IDC_ENTRIES_LIST, IDH_IDC_ENTRIES_LIST);
00376     SetCtrlHelpID(IDC_ENTRY_EDIT,   IDH_IDC_ENTRY_EDIT);
00377 }
00378
00380 void CImportFilterDlg::OnHelp()
00381 {
00382     ShowHelp();
00383 }
00384
00385 #endif /* WIN32 */
00386
00387 #ifdef qMacCvsPP
00388 static ReportConflict * gEntries;
00389 static ReportWarning * gWarnings;
00390
00391 COutlineTable::COutlineTable(
00392     LStream *inStream )
00393         : LOutlineTable( inStream )
00394 {
00395     // set the table geometry
00396     LTableMultiGeometry *geom = NEW LTableMultiGeometry(this, 50, 20);
00397     ThrowIfNil_(geom);
00398     SetTableGeometry(geom);
00399
00400     // set the table selector
00401     SetTableSelector(NEW LTableSingleSelector( this )/*LOutlineRowSelector*/ );
00402
00403     // and note that we don't set the table storage....
00404
00405     // most of the table classes not only maintain the graphical
00406     // representation of your data but also the data itself. But
00407     // LOutlineTable doesn't really do this...it mostly handles
00408     // graphical representation... you need to handle your data
00409     // maintenance elsewhere by yourself.
00410
00411     // insert a couple columns (name and size)
00412     InsertCols( 3, 0, nil, nil, false );
00413     geom->SetColWidth(100, 1, 1);
00414     geom->SetColWidth(310, 2, 2);
00415     geom->SetColWidth(90, 3, 3);
00416
00417     // Set up keyboard selection and scrolling.
00418     AddAttachment(NEW LOutlineKeySelector(this, msg_AnyMessage));
00419     AddAttachment(NEW LKeyScrollAttachment(this));
00420
00421     // Try to become default commander in the window.
00422     if (mSuperCommander != nil)
00423         mSuperCommander->SetLatentSub(this);
00424 }
00425
00426 COutlineTable::~COutlineTable()
00427 {
00428 }
00429
00430 void COutlineTable::FinishCreateSelf()
00431 {
00432     // insert the root level of the disk into the table
00433     LOutlineItem *theItem = nil;
00434     LOutlineItem *lastItem = nil;
00435
00436     ReportWarning * warn = gWarnings;
00437     while(warn != 0L)
00438     {
00439         // Store this information in the list view
00440         CWarningItem *theItem = NEW CWarningItem(warn);
00441         ThrowIfNil_(theItem);
00442
00443         // and insert it at the end of the table
00444         InsertItem( theItem, nil, lastItem );
00445         lastItem = theItem;
00446
00447         warn = warn->next;
00448     }
00449
00450     ReportConflict * conf = gEntries;
00451     while(conf != 0L)
00452     {
00453         // Store this information in the list view
00454         CEntryItem *theItem = NEW CEntryItem(conf);
00455         ThrowIfNil_(theItem);
00456
00457         // and insert it at the end of the table
00458         InsertItem( theItem, nil, lastItem );
00459         lastItem = theItem;
00460
00461         conf = conf->next;
00462     }
00463 }
00464
00465 CWarningItem::CWarningItem(ReportWarning * entry)
00466 {
00467     mEntry = entry;
00468 }
00469
00470 CWarningItem::~CWarningItem()
00471 {
00472 }
00473
00474 // this is the routine called to know what to draw within the
00475 // table cell. See the comments in LOutlineItem.cp for more info.
00476 void
00477 CWarningItem::GetDrawContentsSelf(
00478     const STableCell&       inCell,
00479     SOutlineDrawContents&   ioDrawContents)
00480 {
00481     switch (inCell.col)
00482     {
00483     case 1:
00484     {
00485             bool isError = mEntry->Kind() != kFileIsOK && mEntry->Kind() != kTextEscapeChar;
00486         ioDrawContents.outShowSelection = true;
00487         ioDrawContents.outHasIcon = true;
00488
00489         if(isError)
00490         {
00491           CIconRef    errIcon;
00492       if ( ::GetSysIcon( kAlertStopIcon, kSelectorAllAvailableData, errIcon ) == noErr )
00493         ioDrawContents.outIconSuite = errIcon.GetIconSuite();
00494       else
00495             ioDrawContents.outHasIcon = false;
00496             LString::CopyPStr("\pError", ioDrawContents.outTextString);
00497             ioDrawContents.outTextTraits.style = bold;
00498         }
00499         else
00500         {
00501           CIconRef    warnIcon;
00502       if ( ::GetSysIcon( kAlertCautionIcon, kSelectorAllAvailableData, warnIcon ) == noErr )
00503         ioDrawContents.outIconSuite = warnIcon.GetIconSuite();
00504       else
00505             ioDrawContents.outHasIcon = false;
00506             LString::CopyPStr("\pWarning", ioDrawContents.outTextString);
00507             ioDrawContents.outTextTraits.style = 0;
00508         }
00509     }
00510     break;
00511         case 2:
00512         ioDrawContents.outShowSelection = true;
00513         ioDrawContents.outTextTraits.style = 0;
00514
00515         LString::CopyPStr(mEntry->GetDesc(), ioDrawContents.outTextString);
00516         break;
00517     case 3:
00518         ioDrawContents.outShowSelection = false;
00519         break;
00520     }
00521 }
00522
00523 // just to be cute, we'll draw an adornment (again, see the LOutlineItem.cp
00524 // comments for more information). We'll draw a groovy gray background
00525 void
00526 CWarningItem::DrawRowAdornments(
00527     const Rect&     inLocalRowRect )
00528 {
00529     ShadeRow(UGAColorRamp::GetColor(0), inLocalRowRect);
00530 }
00531
00532 void CWarningItem::EditImportCell(void)
00533 {
00534     StDialogHandler theHandler(dlg_ImpFilterWarn, LCommander::GetTopCommander());
00535     LWindow *theDialog = theHandler.GetDialog();
00536     ThrowIfNil_(theDialog);
00537
00538     LTextEditView *warn = dynamic_cast<LTextEditView*>
00539         (theDialog->FindPaneByID(item_ImpEditWarn));
00540     CStr print;
00541     mEntry->PrintOut(print);
00542     warn->SetTextPtr((Ptr)(const char *)print, print.length());
00543
00544     theDialog->Show();
00545     MessageT hitMessage;
00546     while (true)
00547     {       // Let DialogHandler process events
00548         hitMessage = theHandler.DoDialog();
00549
00550         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00551             break;
00552     }
00553     theDialog->Hide();
00554 }
00555
00556 void
00557 CWarningItem::DoubleClick(
00558     const STableCell&           /* inCell */,
00559     const SMouseDownEvent&      /* inMouseDown */,
00560     const SOutlineDrawContents& /* inDrawContents */,
00561     Boolean                     /* inHitText */)
00562 {
00563     EditImportCell();
00564 }
00565
00566 CEntryItem::CEntryItem( ReportConflict * entry)
00567 {
00568     mEntry = entry;
00569 }
00570
00571 CEntryItem::~CEntryItem()
00572 {
00573 }
00574
00575 // this is the routine called to know what to draw within the
00576 // table cell. See the comments in LOutlineItem.cp for more info.
00577 void
00578 CEntryItem::GetDrawContentsSelf(
00579     const STableCell&       inCell,
00580     SOutlineDrawContents&   ioDrawContents)
00581 {
00582     CPStr str;
00583
00584     switch (inCell.col)
00585     {
00586     case 1:
00587         ioDrawContents.outShowSelection = true;
00588         ioDrawContents.outHasIcon = true;
00589
00590         if(mEntry->HasConflict())
00591         {
00592             str << "Conflict";
00593             ioDrawContents.outTextTraits.style = bold;
00594           CIconRef    icon;
00595           if ( ::GetSysIcon(kAlertStopIcon, kSelectorAllAvailableData, icon) == noErr )
00596             ioDrawContents.outIconSuite = icon.GetIconSuite();
00597           else
00598             ioDrawContents.outHasIcon = false;
00599         }
00600         else if(mEntry->HasTypeCreatorConflict())
00601         {
00602             str << "Warning";
00603             ioDrawContents.outTextTraits.style = 0;
00604           CIconRef    icon;
00605           if ( ::GetSysIcon(kAlertCautionIcon, kSelectorAllAvailableData, icon) == noErr )
00606             ioDrawContents.outIconSuite = icon.GetIconSuite();
00607           else
00608             ioDrawContents.outHasIcon = false;
00609         }
00610         else
00611         {
00612             str << "OK";
00613             ioDrawContents.outTextTraits.style = 0;
00614           CIconRef    icon;
00615           if ( ::GetSysIcon(kAlertNoteIcon, kSelectorAllAvailableData, icon) == noErr )
00616             ioDrawContents.outIconSuite = icon.GetIconSuite();
00617           else
00618             ioDrawContents.outHasIcon = false;
00619         }
00620         LString::CopyPStr(str, ioDrawContents.outTextString);
00621         break;
00622
00623     case 2:
00624         ioDrawContents.outShowSelection = true;
00625         ioDrawContents.outHasIcon = false/*true*/;
00626         ioDrawContents.outIconSuite = 0L/*mIconH*/;
00627         ioDrawContents.outTextTraits.style = 0;
00628
00629         str << mEntry->GetDesc();
00630         LString::CopyPStr(str, ioDrawContents.outTextString);
00631         break;
00632
00633     case 3:
00634         ioDrawContents.outShowSelection = true;
00635         ioDrawContents.outHasIcon = false;
00636         ioDrawContents.outTextTraits.style = 0;
00637
00638         if(mEntry->HasForceBinary())
00639         {
00640             LString::CopyPStr("\pFORCE BINARY", ioDrawContents.outTextString);
00641             ioDrawContents.outTextTraits.style = bold;
00642         }
00643         else if(mEntry->HasForceText())
00644         {
00645             LString::CopyPStr("\pFORCE TEXT", ioDrawContents.outTextString);
00646             ioDrawContents.outTextTraits.style = bold;
00647         }
00648         else if(mEntry->HasIgnore())
00649         {
00650             LString::CopyPStr("\pIGNORE", ioDrawContents.outTextString);
00651             ioDrawContents.outTextTraits.style = bold;
00652         }
00653         else if(mEntry->IsBinary())
00654         {
00655             LString::CopyPStr("\pBINARY", ioDrawContents.outTextString);
00656             ioDrawContents.outTextTraits.style = 0;
00657         }
00658         else
00659         {
00660             LString::CopyPStr("\pTEXT", ioDrawContents.outTextString);
00661             ioDrawContents.outTextTraits.style = 0;
00662         }
00663         break;
00664     }
00665 }
00666
00667 // just to be cute, we'll draw an adornment (again, see the LOutlineItem.cp
00668 // comments for more information). We'll draw a groovy gray background
00669 void
00670 CEntryItem::DrawRowAdornments(
00671     const Rect&     inLocalRowRect )
00672 {
00673     ShadeRow(UGAColorRamp::GetColor(0), inLocalRowRect);
00674 }
00675
00676 static void DoDataExchange_ImpEditEntry(LWindow *theDialog, ReportConflict * mEntry, bool putValue)
00677 {
00678     LTextEditView *warn = dynamic_cast<LTextEditView*>
00679         (theDialog->FindPaneByID(item_ImpEditWarn));
00680
00681     if(putValue)
00682     {
00683         if(mEntry->HasForceBinary())
00684             theDialog->SetValueForPaneID (item_ImpEntryFBin, Button_On);
00685         else if(mEntry->HasForceText())
00686             theDialog->SetValueForPaneID (item_ImpEntryFText, Button_On);
00687         else if(mEntry->HasIgnore())
00688             theDialog->SetValueForPaneID (item_ImpEntryFIgn, Button_On);
00689         else
00690             theDialog->SetValueForPaneID (item_ImpEntryUnch, Button_On);
00691         CStr print;
00692         mEntry->PrintOut(print);
00693         warn->SetTextPtr((Ptr)(const char *)print, print.length());
00694     }
00695     else
00696     {
00697         if(theDialog->GetValueForPaneID (item_ImpEntryFBin) == Button_On)
00698             mEntry->ForceBinary();
00699         else if(theDialog->GetValueForPaneID (item_ImpEntryFText) == Button_On)
00700             mEntry->ForceText();
00701         else if(theDialog->GetValueForPaneID (item_ImpEntryFIgn) == Button_On)
00702             mEntry->Ignore();
00703         else
00704             mEntry->DisableUserSettings();
00705     }
00706 }
00707
00708 void CEntryItem::EditImportCell(void)
00709 {
00710     StDialogHandler theHandler(dlg_ImpFilterEntry, LCommander::GetTopCommander());
00711     LWindow *theDialog = theHandler.GetDialog();
00712     ThrowIfNil_(theDialog);
00713
00714     DoDataExchange_ImpEditEntry(theDialog, mEntry, true);
00715
00716     theDialog->Show();
00717     MessageT hitMessage;
00718     while (true)
00719     {       // Let DialogHandler process events
00720         hitMessage = theHandler.DoDialog();
00721
00722         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00723             break;
00724     }
00725     theDialog->Hide();
00726
00727     if(hitMessage == msg_OK)
00728     {
00729         DoDataExchange_ImpEditEntry(theDialog, mEntry, false);
00730         mOutlineTable->Refresh();
00731     }
00732 }
00733
00734 void
00735 CEntryItem::DoubleClick(
00736     const STableCell&           /* inCell */,
00737     const SMouseDownEvent&      /* inMouseDown */,
00738     const SOutlineDrawContents& /* inDrawContents */,
00739     Boolean                     /* inHitText */)
00740 {
00741     EditImportCell();
00742 }
00743 #endif /* qMacCvsPP */
00744
00745 #if qUnix
00746 class UCvsImpWarning : public UWidget
00747 {
00748     UDECLARE_DYNAMIC(UCvsImpWarning)
00749 public:
00750     UCvsImpWarning(ReportWarning * warn);
00751     virtual ~UCvsImpWarning() {}
00752
00753     enum
00754     {
00755         kOK = EV_COMMAND_START, // 0
00756         kDesc                   // 1
00757     };
00758
00759     virtual void DoDataExchange(bool fill);
00760
00761 protected:
00762     UStr m_desc;
00763
00764     ev_msg int OnOK(void);
00765
00766     UDECLARE_MESSAGE_MAP()
00767 };
00768
00769 UIMPLEMENT_DYNAMIC(UCvsImpWarning, UWidget)
00770
00771 UBEGIN_MESSAGE_MAP(UCvsImpWarning, UWidget)
00772     ON_UCOMMAND(UCvsImpWarning::kOK, UCvsImpWarning::OnOK)
00773 UEND_MESSAGE_MAP()
00774
00775 UCvsImpWarning::UCvsImpWarning(ReportWarning * warn) : UWidget(::UEventGetWidID())
00776 {
00777     warn->PrintOut(m_desc);
00778 }
00779
00780 int UCvsImpWarning::OnOK(void)
00781 {
00782     EndModal(true);
00783     return 0;
00784 }
00785
00786 void UCvsImpWarning::DoDataExchange(bool fill)
00787 {
00788     if(fill)
00789     {
00790         UEventSendMessage(GetWidID(), EV_SETTEXT, kDesc, (void *)(const char *)m_desc);
00791     }
00792     else
00793     {
00794     }
00795 }
00796
00797 class UCvsImpEntry : public UWidget
00798 {
00799     UDECLARE_DYNAMIC(UCvsImpEntry)
00800 public:
00801     UCvsImpEntry(ReportConflict * entry);
00802     virtual ~UCvsImpEntry() {}
00803
00804     enum
00805     {
00806         kOK = EV_COMMAND_START, // 0
00807         kCancel,                // 1
00808         kRadUnchanged,          // 2
00809         kRadBinary,             // 3
00810         kRadText,               // 4
00811         kRadIgnore,             // 5
00812         kDesc                   // 6
00813     };
00814
00815     virtual void DoDataExchange(bool fill);
00816
00817     int m_radios;
00818 protected:
00819     UStr m_desc;
00820
00821     ev_msg int OnOK(void);
00822     ev_msg int OnCancel(void);
00823     ev_msg int OnRadios(int cmd);
00824
00825     UDECLARE_MESSAGE_MAP()
00826 };
00827
00828 UIMPLEMENT_DYNAMIC(UCvsImpEntry, UWidget)
00829
00830 UBEGIN_MESSAGE_MAP(UCvsImpEntry, UWidget)
00831     ON_UCOMMAND(UCvsImpEntry::kOK, UCvsImpEntry::OnOK)
00832     ON_UCOMMAND(UCvsImpEntry::kCancel, UCvsImpEntry::OnCancel)
00833     ON_UCOMMAND_RANGE(UCvsImpEntry::kRadUnchanged, UCvsImpEntry::kRadIgnore, UCvsImpEntry::OnRadios)
00834 UEND_MESSAGE_MAP()
00835
00836 UCvsImpEntry::UCvsImpEntry(ReportConflict * entry) : UWidget(::UEventGetWidID())
00837 {
00838     entry->PrintOut(m_desc);
00839
00840     if(entry->HasForceBinary())
00841         m_radios = 1;
00842     else if(entry->HasForceText())
00843         m_radios = 2;
00844     else if(entry->HasIgnore())
00845         m_radios = 3;
00846     else
00847         m_radios = 0;
00848 }
00849
00850 int UCvsImpEntry::OnOK(void)
00851 {
00852     EndModal(true);
00853     return 0;
00854 }
00855
00856 int UCvsImpEntry::OnCancel(void)
00857 {
00858     EndModal(false);
00859     return 0;
00860 }
00861
00862 int UCvsImpEntry::OnRadios(int cmd)
00863 {
00864     m_radios = cmd - kRadUnchanged;
00865     return 0;
00866 }
00867
00868 void UCvsImpEntry::DoDataExchange(bool fill)
00869 {
00870     if(fill)
00871     {
00872         UEventSendMessage(GetWidID(), EV_SETTEXT, kDesc, (void *)(const char *)m_desc);
00873         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kRadUnchanged + m_radios, 1), 0L);
00874     }
00875     else
00876     {
00877     }
00878 }
00879
00880 #if qGTK
00881 static void *sWarningIcon;
00882 static void *sErrorIcon;
00883 #endif
00884
00885 class UCvsImpFilter : public UWidget
00886 {
00887     UDECLARE_DYNAMIC(UCvsImpFilter)
00888 public:
00889     UCvsImpFilter(ReportConflict * entries, ReportWarning * warnings);
00890     virtual ~UCvsImpFilter() {}
00891
00892     enum
00893     {
00894         kOK = EV_COMMAND_START, // 0
00895         kCancel,                // 1
00896         kList,                  // 2
00897         kEdit                   // 3
00898     };
00899
00900     virtual void DoDataExchange(bool fill);
00901
00902 protected:
00903     ReportConflict *m_entries;
00904     ReportWarning *m_warnings;
00905
00906     ev_msg int OnOK(void);
00907     ev_msg int OnCancel(void);
00908     ev_msg int OnEdit(void);
00909     ev_msg void OnDblClick(void);
00910
00911     UDECLARE_MESSAGE_MAP()
00912 };
00913
00914 UIMPLEMENT_DYNAMIC(UCvsImpFilter, UWidget)
00915
00916 UBEGIN_MESSAGE_MAP(UCvsImpFilter, UWidget)
00917     ON_UCOMMAND(UCvsImpFilter::kOK, UCvsImpFilter::OnOK)
00918     ON_UCOMMAND(UCvsImpFilter::kCancel, UCvsImpFilter::OnCancel)
00919     ON_UCOMMAND(UCvsImpFilter::kEdit, UCvsImpFilter::OnEdit)
00920     ON_LIST_DBLCLICK(UCvsImpFilter::kList, UCvsImpFilter::OnDblClick)
00921 UEND_MESSAGE_MAP()
00922
00923 UCvsImpFilter::UCvsImpFilter(ReportConflict * entries, ReportWarning * warnings) :
00924     UWidget(::UEventGetWidID())
00925 {
00926     m_entries = entries;
00927     m_warnings = warnings;
00928 }
00929
00930 int UCvsImpFilter::OnOK(void)
00931 {
00932     EndModal(true);
00933     return 0;
00934 }
00935
00936 int UCvsImpFilter::OnCancel(void)
00937 {
00938     EndModal(false);
00939     return 0;
00940 }
00941
00942 void UCvsImpFilter::OnDblClick(void)
00943 {
00944     OnEdit();
00945 }
00946
00947 void UCvsImpFilter::DoDataExchange(bool fill)
00948 {
00949     if(sWarningIcon == 0L)
00950     {
00951         sWarningIcon = UCreate_pixmap(this, "warning.xpm");
00952         sErrorIcon = UCreate_pixmap(this, "error.xpm");
00953     }
00954
00955     if(fill)
00956     {
00957         UEventSendMessage(GetWidID(), EV_LIST_SETFEEDBACK, UMAKEINT(kList, 0), 0L);
00958         UEventSendMessage(GetWidID(), EV_LIST_ADDCOLUMNS, UMAKEINT(kList, COL_NUM), 0L);
00959         for(int i = 0; i < COL_NUM; i++)
00960         {
00961             UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kList, i),
00962                               _gszColumnLabel[i]);
00963             UEventSendMessage(GetWidID(), EV_LIST_SETCOLWIDTH, UMAKEINT(kList, i),
00964                               (void *)_gnColumnWidth[i]);
00965         }
00966         UEventSendMessage(GetWidID(), EV_LIST_SETFEEDBACK, UMAKEINT(kList, 1), 0L);
00967
00968         UEventSendMessage(GetWidID(), EV_LIST_RESETALL, kList, 0L);
00969
00970         ReportWarning * warn = m_warnings;
00971         while(warn != 0L)
00972         {
00973             int rownum;
00974             UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kList, &rownum);
00975             UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kList, rownum), warn);
00976             ULIST_INSERT entry;
00977             entry.row = rownum;
00978
00979             entry.col = 0;
00980             entry.title = warn->GetStateDesc();
00981             entry.icon = 0L;
00982 #if qGTK
00983             entry.icon = warn->IsError() ? sErrorIcon : sWarningIcon;
00984 #endif
00985             UEventSendMessage(GetWidID(), EV_LIST_INSERT, kList, &entry);
00986
00987             entry.col = 1;
00988             entry.title = warn->GetDesc();
00989             entry.icon = 0L;
00990             UEventSendMessage(GetWidID(), EV_LIST_INSERT, kList, &entry);
00991
00992             warn = warn->next;
00993         }
00994
00995         ReportConflict * conf = m_entries;
00996         while(conf != 0L)
00997         {
00998             int rownum;
00999             UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kList, &rownum);
01000             UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kList, rownum), conf);
01001             ULIST_INSERT entry;
01002             entry.row = rownum;
01003
01004             entry.col = 0;
01005             entry.title = conf->GetStateDesc();
01006             entry.icon = 0L;
01007 #if qGTK
01008             entry.icon = conf->HasConflict() ? sErrorIcon : sWarningIcon;
01009 #endif
01010             UEventSendMessage(GetWidID(), EV_LIST_INSERT, kList, &entry);
01011
01012             entry.col = 1;
01013             entry.title = conf->GetDesc();
01014             entry.icon = 0L;
01015             UEventSendMessage(GetWidID(), EV_LIST_INSERT, kList, &entry);
01016
01017             entry.col = 2;
01018             entry.title = conf->GetKindDesc();
01019             entry.icon = 0L;
01020             UEventSendMessage(GetWidID(), EV_LIST_INSERT, kList, &entry);
01021
01022             conf = conf->next;
01023         }
01024     }
01025     else
01026     {
01027     }
01028 }
01029
01030 int UCvsImpFilter::OnEdit()
01031 {
01032     int row = -1;
01033     if((row = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL,
01034                                 UMAKEINT(kList, row), 0L)) == -1)
01035         return 0;
01036
01037     ULIST_INFO info;
01038     info.col = 0;
01039     info.row = row;
01040     UEventSendMessage(GetWidID(), EV_LIST_GETINFO, kList, &info);
01041
01042     ReportWarning * warn = m_warnings;
01043     while(warn != 0L)
01044     {
01045         if(warn == info.data)
01046         {
01047             void *wid = UCreate_ImpWarningDlg();
01048             UCvsImpWarning *dlg = new UCvsImpWarning(warn);
01049             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01050             dlg->DoModal();
01051             delete dlg;
01052             return 0;
01053         }
01054         warn = warn->next;
01055     }
01056
01057     ReportConflict * conf = m_entries;
01058     while(conf != 0L)
01059     {
01060         if(conf == info.data)
01061         {
01062             void *wid = UCreate_ImpEntryDlg();
01063             UCvsImpEntry *dlg = new UCvsImpEntry(conf);
01064             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01065             if(dlg->DoModal())
01066             {
01067                 ULIST_INSERT entry;
01068                 entry.row = row;
01069
01070                 entry.col = 2;
01071                 entry.title = 0L;
01072                 entry.icon = /*UCvsFiles::GetImageForEntry(data)*/0L;
01073                 switch(dlg->m_radios)
01074                 {
01075                 case 0:
01076                     conf->DisableUserSettings();
01077                     break;
01078                 case 1:
01079                     conf->ForceBinary();
01080                     break;
01081                 case 2:
01082                     conf->ForceText();
01083                     break;
01084                 case 3:
01085                     conf->Ignore();
01086                     break;
01087                 }
01088
01089                 entry.title = conf->GetKindDesc();
01090
01091                 if( entry.title != 0L )
01092                     UEventSendMessage(GetWidID(), EV_LIST_INSERT, kList, &entry);
01093             }
01094             delete dlg;
01095             return 0;
01096         }
01097
01098         conf = conf->next;
01099     }
01100     return 0;
01101 }
01102 #endif /* qUnix */
01103
01105 bool CompatImportFilter(const char* path, ReportConflict*& entries, ReportWarning*& warnings)
01106 {
01107     bool result = false;
01108
01109     bool searched = false;
01110
01111     if( !entries && !warnings )
01112     {
01113         searched = true;
01114
01115         const kTraversal traversalResult = list_all_types_recur(path, warnings, entries);
01116         if( traversalResult != kContinueTraversal )
01117         {
01118             cvs_err("Import filtering aborted on user's request.\n");
01119
01120             free_list_types(warnings, entries);
01121             entries = 0L;
01122             warnings = 0L;
01123
01124             return false;
01125         }
01126     }
01127
01128     if( entries == 0L && warnings == 0L )
01129     {
01130         cvs_err("Import filtering aborted - nothing to import.\n");
01131         return false;
01132     }
01133
01134 #ifdef WIN32
01135     CImportFilterDlg pages(entries, warnings);
01136     if( pages.DoModal() == IDOK )
01137     {
01138         result = true;
01139     }
01140     else
01141     {
01142         if( searched )
01143         {
01144             cvs_err("Import filtering aborted.\n");
01145         }
01146     }
01147 #endif /* WIN32 */
01148 #ifdef qMacCvsPP
01149     gWarnings = warnings;
01150     gEntries = entries;
01151
01152     StDialogHandler theHandler(dlg_ImpFilter, LCommander::GetTopCommander());
01153     LWindow *theDialog = theHandler.GetDialog();
01154     ThrowIfNil_(theDialog);
01155
01156     theDialog->Show();
01157     MessageT hitMessage;
01158     while (true)
01159     {       // Let DialogHandler process events
01160         hitMessage = theHandler.DoDialog();
01161
01162         if(hitMessage == item_ImpPushEdit)
01163         {
01164             // simulate dbl click
01165             LOutlineTable *tab = dynamic_cast<LOutlineTable*>
01166                 (theDialog->FindPaneByID(item_ImpFilterList));
01167
01168             STableCell  cell = tab->GetFirstSelectedCell();
01169             if(!cell.IsNullCell())
01170             {
01171                 //TableIndexT index;
01172                 //tab->CellToIndex(cell, index);
01173                 CImportItem *item = dynamic_cast<CImportItem*>(tab->FindItemForRow(cell.row));
01174                 Assert_(item != 0L);
01175                 if(item != 0L)
01176                     item->EditImportCell();
01177             }
01178         }
01179
01180         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01181             break;
01182     }
01183     theDialog->Hide();
01184
01185     if(hitMessage == msg_OK)
01186     {
01187         result = true;
01188     }
01189 #endif /* qMacCvsPP */
01190 #if qUnix
01191     void *wid = UCreate_ImportFilterDlg();
01192
01193     UCvsImpFilter *dlg = new UCvsImpFilter(entries, warnings);
01194     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01195
01196     if(dlg->DoModal())
01197     {
01198         result = true;
01199     }
01200
01201     delete dlg;
01202 #endif // qUnix
01203
01204     if( !result && searched )
01205     {
01206         free_list_types(warnings, entries);
01207         entries = 0L;
01208         warnings = 0L;
01209     }
01210
01211     return result;
01212 }
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PyCvsEntry Member List

This is the complete list of members for PyCvsEntry, including all inherited members.

Create(PyObject *selfptr, PyObject *args) | PyCvsEntry | [static]
dealloc(obj_t *self) | PyCvsEntry | [static]
False() | PyContainer | [inline, static]
FindMethod(PyObject *self, char *name) | PyCvsEntry | [inline, static]
getattr(obj_t *self, char *name) | PyCvsEntry | [static]
GetAttr(char *name) | PyCvsEntry | [virtual]
GetType(void) | PyCvsEntry | [inline, static]
InitValues(PyObject *d) | PyCvsEntry | [static]
m_data | PyCvsEntry | [protected]
m_doc | PyCvsEntry | [static]
m_methods | PyCvsEntry | [static]
m_registry | PyCvsEntry | [static]
New(void) | PyCvsEntry | [static]
operator EntnodeData *(void) const | PyCvsEntry | [inline]
PyContainer() | PyContainer | [inline]
PyCvsEntry(EntnodeData *data) | PyCvsEntry | [inline]
RegisterValue(PyObject *d, char *name, int value) | PyContainer | [static]
True() | PyContainer | [inline, static]
Void() | PyContainer | [inline, static]
~PyContainer() | PyContainer | [inline, virtual]
~PyCvsEntry() | PyCvsEntry | [inline, virtual]

Generated on Sat Aug 7 22:56:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MultiFiles.cpp Source File

common/MultiFiles.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * MultiFiles.h --- class to store multiple files by directory
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <stdlib.h>
00028 #include <string.h>
00029
00030 #include "MultiFiles.h"
00031 #include "CvsArgs.h"
00032 #include "AppConsole.h"
00033 #include "CPStr.h"
00034 #include "AppGlue.h"
00035
00036 #include <errno.h>
00037 #include <map>
00038 #include <utility>
00039 #include <algorithm>
00040
00041 #ifdef WIN32
00042 #   ifdef _DEBUG
00043 #   define new DEBUG_NEW
00044 #   undef THIS_FILE
00045     static char THIS_FILE[] = __FILE__;
00046 #   endif
00047 #endif /* WIN32 */
00048
00050 //
00051
00052 FileEntry::FileEntry()
00053 {
00054 }
00055
00056 FileEntry::FileEntry(const char* filename, const UFSSpec* macspec /*= 0L*/, const char* currRevision /*= 0L*/)
00057 {
00058     file = filename;
00059
00060     if( currRevision != 0L )
00061         currRev = currRevision;
00062
00063     if( macspec != 0L )
00064         spec = *macspec;
00065 }
00066
00067 FileEntry::FileEntry(const FileEntry& entry)
00068 {
00069     *this = entry;
00070 }
00071
00072 FileEntry& FileEntry::operator=(const FileEntry& entry)
00073 {
00074     file = entry.file;
00075     currRev = entry.currRev;
00076     spec = entry.spec;
00077     return *this;
00078 }
00079
00080
00082 // MultiFilesEntry
00083
00084 MultiFilesEntry::MultiFilesEntry()
00085 {
00086 }
00087
00088 MultiFilesEntry::MultiFilesEntry(const char* path)
00089 {
00090     dir = path;
00091 }
00092
00093 MultiFilesEntry::MultiFilesEntry(const MultiFilesEntry& entries)
00094 {
00095     *this = entries;
00096 }
00097
00098 MultiFilesEntry& MultiFilesEntry::operator=(const MultiFilesEntry& entries)
00099 {
00100     dir = entries.dir;
00101     files = entries.files;
00102     return *this;
00103 }
00104
00106 void MultiFilesEntry::setdir(const char* newdir)
00107 {
00108     dir = newdir;
00109 }
00110
00112 void MultiFilesEntry::add(const char* file, const UFSSpec* spec, const char* currRevision)
00113 {
00114     FileEntry entry(file, spec, currRevision);
00115     files.push_back(entry);
00116 }
00117
00119 bool MultiFilesEntry::get(int index, CStr& path, CStr& fileName, CStr& currRev) const
00120 {
00121     if( index < 0 || (size_t)index >= files.size() )
00122         return false;
00123
00124     path = dir;
00125     fileName = files[index].file;
00126     currRev = files[index].currRev;
00127
00128     return true;
00129 }
00130
00132 const char* MultiFilesEntry::add(CvsArgs& args) const
00133 {
00134     std::vector<FileEntry>::const_iterator i;
00135     for(i = files.begin(); i != files.end(); ++i)
00136     {
00137         args.addfile((*i).file, dir, &(*i).spec, (*i).currRev);
00138     }
00139
00140     return dir;
00141 }
00142
00144 // MultiFiles
00145
00146 MultiFiles::MultiFiles()
00147 {
00148 }
00149
00151 void MultiFiles::newdir(const char* dir)
00152 {
00153     MultiFilesEntry entry(dir);
00154     dirs.push_back(dir);
00155 }
00156
00158 void MultiFiles::newfile(const char* file, const UFSSpec* spec, const char* currRevision)
00159 {
00160     if( dirs.size() == 0 )
00161         return;
00162
00163     MultiFilesEntry& entry = dirs[dirs.size() - 1];
00164     entry.add(file, spec, currRevision);
00165 }
00166
00168 bool MultiFiles::getdir(int index, CStr& path) const
00169 {
00170     if( index < 0 || index >= (int)dirs.size() )
00171         return false;
00172
00173     const MultiFilesEntry& entry = dirs[index];
00174
00175     path = entry.dir;
00176
00177     return true;
00178 }
00179
00181 void MultiFiles::reset()
00182 {
00183     dirs.erase(dirs.begin(), dirs.end());
00184 }
00185
00187 int MultiFiles::TotalNumFiles(void) const
00188 {
00189     int total = 0;
00190
00191     std::vector<MultiFilesEntry>::const_iterator i;
00192     for(i = dirs.begin(); i != dirs.end(); ++i)
00193     {
00194         total += i->NumFiles();
00195     }
00196
00197     return total;
00198 }
00199
00201 // \result returns true when the name passed was indeed a partial path
00202 static bool split(const CStr& inPartialPath, CStr& outPath, CStr& outName)
00203 {
00204     int     delimiterPos(inPartialPath.rfind(kPathDelimiter));
00205     if ( delimiterPos )
00206     {
00207         outName = inPartialPath.substr(delimiterPos+1, inPartialPath.length()-delimiterPos-1);
00208         outPath = inPartialPath.substr(0, delimiterPos+1); // includes trailing delimiter
00209         return true;
00210     }
00211     else
00212     {
00213         outName = inPartialPath;
00214         outPath = (const char*)NULL;
00215         return false;
00216     }
00217 }
00218
00220 struct match_dir
00221 {
00222     const CStr& dirPath;
00223     match_dir(const CStr& inDirPath) : dirPath(inDirPath) {}
00224     bool operator()(const MultiFilesEntry& inEntry) const
00225     {
00226         return dirPath == inEntry.getdir();
00227     }
00228 };
00229
00231 bool MultiFiles::Normalize()
00232 {
00233     std::vector<MultiFilesEntry>    workingCopy(dirs);
00234     dirs.clear();
00235
00236     for ( std::vector<MultiFilesEntry>::const_iterator i(workingCopy.begin()); i != workingCopy.end(); ++i )
00237       if ( i->files.empty() )
00238       {
00239         // special case for empty directories in MultiFiles:
00240         // just add the directory to our directory list
00241         //
00242             std::vector<MultiFilesEntry>::iterator      found;
00243             found = std::find_if(dirs.begin(), dirs.end(), match_dir(i->dir));
00244             if ( found == dirs.end() )
00245             {
00246                 // directory not found in list -> create new directory
00247                 this->newdir(i->dir);
00248             }
00249       }
00250         else for ( std::vector<FileEntry>::const_iterator j(i->files.begin()); j != i->files.end(); j++ )
00251         {
00252             // split into partial path and name
00253             //
00254             CStr        fullDirPath, dir, name;
00255             if ( split(j->file, dir, name) )
00256             {
00257                 // insert current directory path in front of partial path
00258                 //
00259                 fullDirPath = i->dir;
00260                 if ( !i->dir.endsWith(kPathDelimiter) )
00261                     fullDirPath << kPathDelimiter;
00262                 fullDirPath << dir;
00263             }
00264             else fullDirPath = i->dir; // file does not have a partial path
00265
00266             std::vector<MultiFilesEntry>::iterator      found;
00267             found = std::find_if(dirs.begin(), dirs.end(), match_dir(fullDirPath));
00268             if ( found != dirs.end() )
00269             {
00270                 // directory already in list -> just append the new file entry
00271                 found->add(name, &j->spec, j->currRev);
00272             }
00273             else
00274             {
00275                 // directory not found in list -> create new directory and append the file to the new directory
00276                 this->newdir(fullDirPath);
00277                 this->newfile(name, &j->spec, j->currRev);
00278             }
00279         }
00280
00281     return true;
00282 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJColorPicker.cpp Source File

WinCvs/CJLib/CJLibrary/CJColorPicker.cpp

Go to the documentation of this file.
00001 // CJColorPicker.cpp : implementation file
00002 //
00003 // CJColorPicker is a drop-in Color picker control. Check out the
00004 // header file or the accompanying HTML doc file for details.
00005 //
00006 // Written by Chris Maunder (chrismaunder@codeguru.com)
00007 // Extended by Alexander Bischofberger (bischofb@informatik.tu-muenchen.de)
00008 // Copyright (c) 1998.
00009 //
00010 // This code may be used in compiled form in any way you desire. This
00011 // file may be redistributed unmodified by any means PROVIDING it is
00012 // not sold for profit without the authors written consent, and
00013 // providing that this notice and the authors name is included. If
00014 // the source code in  this file is used in any commercial application
00015 // then a simple email would be nice.
00016 //
00017 // This file is provided "as is" with no expressed or implied warranty.
00018 // The author accepts no liability if it causes any damage to your
00019 // computer, causes your pet cat to fall ill, increases baldness or
00020 // makes you car start emitting strange noises when you start it up.
00021 //
00022 // Expect bugs.
00023 //
00024 // Please use and enjoy. Please let me know of any bugs/mods/improvements
00025 // that you have found/implemented and I will fix/incorporate them into this
00026 // file.
00027 //
00028 // Updated 16 May 1998
00029 //         31 May 1998 - added Default text (CJM)
00030 //          9 Jan 1999 - minor vis update
00031 //
00033 /****************************************************************************
00034  *
00035  * $Date: 1999/11/30 21:45:48 $
00036  * $Revision: 1.1.1.3 $
00037  * $Archive: /CodeJock/CJLibrary/CJColorPicker.cpp $
00038  *
00039  * $History: CJColorPicker.cpp $
00040  *
00041  * *****************  Version 5  *****************
00042  * User: Kirk Stowell Date: 10/31/99   Time: 11:49p
00043  * Updated in $/CodeJock/CJLibrary
00044  * Overrode OnEraseBkgnd(...), OnPaint() and made modifications to
00045  * DrawItem(...) for flicker free drawing.
00046  *
00047  * Modified resource include for static builds.
00048  *
00049  * Added method CheckTextColor(...) which tests if the intensity of the
00050  * color is greater as 128. If the intensity < 128 => color is dark, so
00051  * the text must be light. Stephane Routelous
00052  * [routelous@cad-cam-concept.de]
00053  *
00054  * Fixed potential resource and memory leak problems.
00055  *
00056  * Removed un-necessary calls to GetParent(), a call is made only once at
00057  * initialization, to ensure we are working with a valid handle.
00058  *
00059  * Made class methods virtual for inheritance purposes.
00060  *
00061  * *****************  Version 4  *****************
00062  * User: Kirk Stowell Date: 10/14/99   Time: 12:22p
00063  * Updated in $/CodeJock/CJLibrary
00064  * Added source control history to file header.
00065  *
00066  ***************************************************************************/
00068
00069 #include "stdafx.h"
00070 #include "CJColorPopup.h"
00071 #include "CJColorPicker.h"
00072 #include "CJResource.h"
00073
00074 #ifdef _DEBUG
00075 #define new DEBUG_NEW
00076 #undef THIS_FILE
00077 static char THIS_FILE[] = __FILE__;
00078 #endif
00079
00080 void AFXAPI DDX_CJColorPicker(CDataExchange *pDX, int nIDC, COLORREF& crColor)
00081 {
00082     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
00083     ASSERT (hWndCtrl != NULL);
00084
00085     CCJColorPicker* pColorPicker = (CCJColorPicker*) CWnd::FromHandle(hWndCtrl);
00086     if (pDX->m_bSaveAndValidate)
00087     {
00088         crColor = pColorPicker->GetColor();
00089     }
00090     else // initializing
00091     {
00092         pColorPicker->SetColor(crColor);
00093     }
00094 }
00095
00097 // CCJColorPicker
00098
00099 CCJColorPicker::CCJColorPicker()
00100 {
00101     SetBkColor(GetSysColor(COLOR_3DFACE));
00102     SetTextColor(GetSysColor(COLOR_BTNTEXT));
00103
00104     m_bTrackSelection = FALSE;
00105     m_nSelectionMode = CP_MODE_BK;
00106     m_bActive = FALSE;
00107
00108 // 1999-06-11 begin mods KStowell
00109     m_strDefaultText.LoadString( IDS_COLOR_AUTO );
00110     m_strCustomText.LoadString( IDS_COLOR_CUST );
00111 // 1999-06-11 end mods KStowell
00112
00113 // 10-14-1999 - Kirk Stowell
00114     m_pParentWnd = NULL;
00115 }
00116
00117 CCJColorPicker::~CCJColorPicker()
00118 {
00119 }
00120
00121 IMPLEMENT_DYNCREATE(CCJColorPicker, CButton)
00122
00123 BEGIN_MESSAGE_MAP(CCJColorPicker, CButton)
00124     //{{AFX_MSG_MAP(CCJColorPicker)
00125     ON_CONTROL_REFLECT_EX(BN_CLICKED, OnClicked)
00126     ON_WM_CREATE()
00127     ON_WM_ERASEBKGND()
00128     ON_WM_PAINT()
00129     //}}AFX_MSG_MAP
00130     ON_MESSAGE(CPN_SELENDOK,     OnSelEndOK)
00131     ON_MESSAGE(CPN_SELENDCANCEL, OnSelEndCancel)
00132     ON_MESSAGE(CPN_SELCHANGE,    OnSelChange)
00133 END_MESSAGE_MAP()
00134
00136 // CCJColorPicker message handlers
00137
00138 LONG CCJColorPicker::OnSelEndOK(UINT lParam, LONG /*wParam*/)
00139 {
00140     COLORREF crNewColor = (COLORREF) lParam;
00141     m_bActive = FALSE;
00142     SetColor(crNewColor);
00143     //BEGIN SRO
00144     CheckTextColor(crNewColor);
00145     //END SRO
00146
00147     // 10-14-1999 - Kirk Stowell - Removed redundant calls to GetParent().
00148     if (m_pParentWnd) {
00149         m_pParentWnd->SendMessage(CPN_CLOSEUP, lParam, (WPARAM) GetDlgCtrlID());
00150         m_pParentWnd->SendMessage(CPN_SELENDOK, lParam, (WPARAM) GetDlgCtrlID());
00151     }
00152
00153     if (crNewColor != GetColor()) {
00154         if (m_pParentWnd) {
00155             m_pParentWnd->SendMessage(CPN_SELCHANGE, lParam, (WPARAM) GetDlgCtrlID());
00156         }
00157     }
00158
00159     return TRUE;
00160 }
00161
00162 LONG CCJColorPicker::OnSelEndCancel(UINT lParam, LONG /*wParam*/)
00163 {
00164     m_bActive = FALSE;
00165     SetColor((COLORREF) lParam);
00166     //BEGIN SRO
00167     CheckTextColor((COLORREF) lParam);
00168     //END SRO
00169
00170     // 10-14-1999 - Kirk Stowell - Removed redundant calls to GetParent().
00171     if (m_pParentWnd) {
00172         m_pParentWnd->SendMessage(CPN_CLOSEUP, lParam, (WPARAM) GetDlgCtrlID());
00173         m_pParentWnd->SendMessage(CPN_SELENDCANCEL, lParam, (WPARAM) GetDlgCtrlID());
00174     }
00175
00176     return TRUE;
00177 }
00178
00179 LONG CCJColorPicker::OnSelChange(UINT lParam, LONG /*wParam*/)
00180 {
00181     if (m_bTrackSelection) {
00182         SetColor((COLORREF) lParam);
00183         //BEGIN SRO
00184         CheckTextColor((COLORREF) lParam);
00185         //END SRO
00186     }
00187
00188     // 10-14-1999 - Kirk Stowell - Removed redundant calls to GetParent().
00189     if (m_pParentWnd) {
00190         m_pParentWnd->SendMessage(CPN_SELCHANGE, lParam, (WPARAM) GetDlgCtrlID());
00191     }
00192
00193     return TRUE;
00194 }
00195
00196 int CCJColorPicker::OnCreate(LPCREATESTRUCT lpCreateStruct)
00197 {
00198     if (CButton::OnCreate(lpCreateStruct) == -1)
00199         return -1;
00200
00201     SetWindowSize();    // resize appropriately
00202     return 0;
00203 }
00204
00205 // On mouse click, create and show a CJColorPopup window for Color selection
00206 BOOL CCJColorPicker::OnClicked()
00207 {
00208     m_bActive = TRUE;
00209
00210     CRect rect;
00211     GetWindowRect(rect);
00212     new CCJColorPopup(CPoint(rect.left, rect.bottom),    // Point to display popup
00213                      GetColor(),                       // Selected Color
00214                      this,                              // parent
00215                      m_strDefaultText,                  // "Default" text area
00216                      m_strCustomText);                  // Custom Text
00217
00218     // 10-14-1999 - Kirk Stowell - Removed redundant calls to GetParent().
00219     if (m_pParentWnd) {
00220         m_pParentWnd->SendMessage(CPN_DROPDOWN, (LPARAM)GetColor(), (WPARAM) GetDlgCtrlID());
00221     }
00222
00223     // Docs say I should return FALSE to stop the parent also getting the message.
00224     // HA! What a joke.
00225
00226     return TRUE;
00227 }
00228
00229 // 1999-06-11 begin mods KStowell
00230 void CCJColorPicker::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00231 {
00232     ASSERT(lpDrawItemStruct != NULL);
00233
00234     // define some temporary variables.
00235     CDC*    pDC         = CDC::FromHandle( lpDrawItemStruct->hDC );
00236     CRect   rcItem      = lpDrawItemStruct->rcItem;
00237     int     nState      = lpDrawItemStruct->itemState;
00238     DWORD   dwState     = EDGE_RAISED;
00239     DWORD   dwArrow     = DFCS_SCROLLDOWN;
00240
00241     // Paint the background.
00242     pDC->FillSolidRect(rcItem, ::GetSysColor(COLOR_3DFACE));
00243
00244     // set display flags based on state.
00245     if((nState & ODS_SELECTED) || (m_bActive == TRUE)) {
00246         dwState = EDGE_SUNKEN;
00247         dwArrow = DFCS_SCROLLDOWN|DFCS_PUSHED;
00248     }
00249     if(nState & ODS_DISABLED) {
00250         dwArrow = DFCS_SCROLLDOWN|DFCS_INACTIVE;
00251     }
00252
00253     // Draw the drop arrow.
00254     CRect rcArrow( rcItem );
00255     rcArrow.left = rcArrow.Width()-::GetSystemMetrics( SM_CXHTHUMB );
00256     pDC->DrawFrameControl( &rcArrow, DFC_SCROLL, dwArrow );
00257     pDC->Draw3dRect( rcArrow, ::GetSysColor( COLOR_3DFACE ), ::GetSysColor( COLOR_3DFACE ));
00258     rcArrow.DeflateRect( 1,1 );
00259     pDC->Draw3dRect( rcArrow, ::GetSysColor( COLOR_3DFACE ), ::GetSysColor( COLOR_3DFACE ));
00260
00261     if((nState & ODS_SELECTED) || (m_bActive == TRUE))
00262         rcArrow.OffsetRect( 1,1 );
00263
00264     // draw the seperator line.
00265     CPen penShadow( PS_SOLID, 1, ::GetSysColor( COLOR_3DSHADOW  ));
00266     CPen* pOldPen = pDC->SelectObject( &penShadow );
00267     pDC->MoveTo( rcArrow.left-1, rcArrow.top+2 );
00268     pDC->LineTo( rcArrow.left-1, rcArrow.bottom-2 );
00269
00270     CPen penHilite( PS_SOLID, 1, ::GetSysColor( COLOR_3DHILIGHT ));
00271     pDC->SelectObject( &penHilite );
00272     pDC->MoveTo( rcArrow.left, rcArrow.top+2 );
00273     pDC->LineTo( rcArrow.left, rcArrow.bottom-2 );
00274
00275     // draw the control border.
00276     pDC->DrawEdge( rcItem, dwState, BF_RECT );
00277
00278     // draw the focus rect.
00279     rcItem.DeflateRect( 2, 2 );
00280     pDC->Draw3dRect( rcItem, ::GetSysColor( COLOR_3DFACE ), ::GetSysColor( COLOR_3DFACE ) );
00281     if( nState & ODS_FOCUS ) {
00282         pDC->DrawFocusRect( rcItem );
00283     }
00284
00285     // draw the color box.
00286     if((nState & ODS_SELECTED) || (m_bActive == TRUE))
00287         rcItem.OffsetRect( 1,1 );
00288
00289     rcItem.DeflateRect( 2, 2 );
00290     rcItem.right = rcArrow.left-4;
00291
00292     CBrush brush( ((nState & ODS_DISABLED) || m_crColorBk == CLR_DEFAULT)?
00293         ::GetSysColor(COLOR_3DFACE) : m_crColorBk);
00294     CBrush* pOldBrush = (CBrush*)pDC->SelectObject( &brush );
00295     pDC->SelectStockObject(( nState & ODS_DISABLED )?WHITE_PEN:BLACK_PEN );
00296     pDC->Rectangle( rcItem );
00297
00298     // Draw the window text (if any)
00299     CString strText;
00300     GetWindowText(strText);
00301     if (strText.GetLength())
00302     {
00303         pDC->SetBkMode(TRANSPARENT);
00304         if (nState & ODS_DISABLED)
00305         {
00306             rcItem.OffsetRect(1,1);
00307             pDC->SetTextColor(::GetSysColor(COLOR_3DHILIGHT));
00308             pDC->DrawText(strText, rcItem, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
00309             rcItem.OffsetRect(-1,-1);
00310             pDC->SetTextColor(::GetSysColor(COLOR_3DSHADOW));
00311             pDC->DrawText(strText, rcItem, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
00312         }
00313         else
00314         {
00315             pDC->SetTextColor((m_crColorText == CLR_DEFAULT)? 0 : m_crColorText);
00316             pDC->DrawText(strText, rcItem, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
00317         }
00318     }
00319
00320     // fix potential resource leak - KStowell - 10-21-99
00321     pDC->SelectObject( pOldPen );
00322     pDC->SelectObject( pOldBrush );
00323     brush.DeleteObject();
00324     penHilite.DeleteObject();
00325     penHilite.DeleteObject();
00326 }
00327 // 1999-06-11 end mods KStowell
00328
00330 // CCJColorPicker overrides
00331
00332 void CCJColorPicker::PreSubclassWindow()
00333 {
00334     ModifyStyle(0, BS_OWNERDRAW);        // Make it owner drawn
00335     CButton::PreSubclassWindow();
00336     SetWindowSize();                     // resize appropriately
00337 }
00338
00340 // CCJColorPicker attributes
00341
00342 COLORREF CCJColorPicker::GetColor()
00343 {
00344     return (m_nSelectionMode == CP_MODE_TEXT)?
00345         GetTextColor(): GetBkColor();
00346 }
00347
00348 void CCJColorPicker::SetColor(COLORREF crColor)
00349 {
00350     (m_nSelectionMode == CP_MODE_TEXT)?
00351         SetTextColor(crColor): SetBkColor(crColor);
00352 }
00353
00354 void CCJColorPicker::SetBkColor(COLORREF crColorBk)
00355 {
00356     m_crColorBk = crColorBk;
00357
00358     //BEGIN SRO
00359     CheckTextColor(crColorBk);
00360     //END SRO
00361
00362     if (IsWindow(m_hWnd)) RedrawWindow();
00363 }
00364
00365 void CCJColorPicker::SetTextColor(COLORREF crColorText)
00366 {
00367     m_crColorText = crColorText;
00368     if (IsWindow(m_hWnd)) RedrawWindow();
00369 }
00370
00371 void CCJColorPicker::SetDefaultText(LPCTSTR szDefaultText)
00372 {
00373     m_strDefaultText = (szDefaultText)? szDefaultText : _T("");
00374 }
00375
00376 void CCJColorPicker::SetCustomText(LPCTSTR szCustomText)
00377 {
00378     m_strCustomText = (szCustomText)? szCustomText : _T("");
00379 }
00380
00382 // CCJColorPicker implementation
00383
00384 void CCJColorPicker::SetWindowSize()
00385 {
00386     // 10-14-1999 - Kirk Stowell - Added to help reduce flicker, we only need to make
00387     // a call to GetParent() once at initialization.
00388     m_pParentWnd = GetParent();
00389
00390     // Get size dimensions of edges
00391     CSize MarginSize(::GetSystemMetrics(SM_CXEDGE), ::GetSystemMetrics(SM_CYEDGE));
00392
00393     // Get size of dropdown arrow
00394     int nArrowWidth = max(::GetSystemMetrics(SM_CXHTHUMB), 5*MarginSize.cx);
00395     int nArrowHeight = max(::GetSystemMetrics(SM_CYVTHUMB), 5*MarginSize.cy);
00396     CSize ArrowSize(max(nArrowWidth, nArrowHeight), max(nArrowWidth, nArrowHeight));
00397
00398     // Get window size
00399     CRect rect;
00400     GetWindowRect(rect);
00401
00402     if (m_pParentWnd) {
00403         m_pParentWnd->ScreenToClient(rect);
00404     }
00405
00406     // Set window size at least as wide as 2 arrows, and as high as arrow + margins
00407     int nWidth = max(rect.Width(), 2*ArrowSize.cx + 2*MarginSize.cx);
00408     MoveWindow(rect.left, rect.top, nWidth, ArrowSize.cy+2*MarginSize.cy, TRUE);
00409
00410     // Get the new coords of this window
00411     GetWindowRect(rect);
00412     ScreenToClient(rect);
00413
00414     // Get the rect where the arrow goes, and convert to client coords.
00415     m_ArrowRect.SetRect(rect.right - ArrowSize.cx - MarginSize.cx,
00416                         rect.top + MarginSize.cy, rect.right - MarginSize.cx,
00417                         rect.bottom - MarginSize.cy);
00418 }
00419
00420 void CCJColorPicker::CheckTextColor(COLORREF crColor)
00421 {
00422     int R = GetRValue(crColor);
00423     int G = GetGValue(crColor);
00424     int B = GetBValue(crColor);
00425
00426     double Intensity = .299 * R + .587 * G + .114 * B ;
00427
00428     if ( Intensity >= 127 ) {
00429         SetTextColor(RGB(0,0,0));
00430     } else {
00431         SetTextColor(RGB(255,255,255));
00432     }
00433 }
00434
00435 BOOL CCJColorPicker::OnEraseBkgnd(CDC* pDC)
00436 {
00437     // overridden for flicker-free drawing.
00438     UNUSED_ALWAYS(pDC);
00439     return TRUE;
00440 }
00441
00442 void CCJColorPicker::OnPaint()
00443 {
00444     CPaintDC dc(this); // device context for painting
00445
00446     // KStowell - Get the client rect.
00447     CRect rcClient, rcClip;
00448     dc.GetClipBox( &rcClip );
00449     GetClientRect( &rcClient );
00450
00451     // KStowell - Create a memory device-context. This is done to help reduce
00452     // screen flicker, since we will paint the entire control to the
00453     // off screen device context first.
00454     CDC memDC;
00455     CBitmap bitmap;
00456     memDC.CreateCompatibleDC(&dc);
00457     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00458     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00459
00460     // KStowell - Repaint the background.
00461     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00462
00463     // let the control do its default drawing.
00464     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00465
00466     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00467     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00468         rcClip.left, rcClip.top, SRCCOPY );
00469
00470     // KStowell - Cleanup resources.
00471     memDC.SelectObject(pOldBitmap);
00472     memDC.DeleteDC();
00473     bitmap.DeleteObject();
00474 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PyColorConsole::obj_t Member List

This is the complete list of members for PyColorConsole::obj_t, including all inherited members.

m_object PyColorConsole::obj_t

Generated on Sat Aug 7 22:55:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KiFilterBase Member List

This is the complete list of members for KiFilterBase, including all inherited members.

GetNotificationManager()=0 | KiFilterBase | [pure virtual]
LoadSettings()=0 | KiFilterBase | [pure virtual]
SaveSettings()=0 | KiFilterBase | [pure virtual]

Generated on Sat Aug 7 22:53:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoCheckoutHandler Member List

This is the complete list of members for KoCheckoutHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoCheckoutHandler() | KoCheckoutHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoCheckoutHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoCheckoutHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJDateTimeCtrl.h Source File

WinCvs/CJLib/Include/CJDateTimeCtrl.h

Go to the documentation of this file.
00001 // CJDateTimeCtrl.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new
00007 // IE4 controls' http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:49 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/Include/CJDateTimeCtrl.h $
00015  *
00016  * $History: CJDateTimeCtrl.h $
00017  *
00018  * *****************  Version 7  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/Include
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 6  *****************
00024  * User: Kirk Stowell Date: 7/31/99    Time: 4:27p
00025  * Updated in $/CodeJockey/Include
00026  *
00027  * *****************  Version 4  *****************
00028  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00029  * Updated in $/CodeJockey/Include
00030  *
00031  * *****************  Version 3  *****************
00032  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00033  * Updated in $/CodeJockey/Include
00034  *
00035  * *****************  Version 2  *****************
00036  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00037  * Updated in $/CodeJockey/Include
00038  * Cleaned up inline functions, and import/export macro so that class will
00039  * be imported when linked to, and exported at compile time.
00040  *
00041  * *****************  Version 1  *****************
00042  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00043  * Created in $/CodeJockey/Include
00044  * Copied from MFC, Visual C++ 6 and vc5 Tech. Preview. Added to extend
00045  * functionality to Visual C++ 5 users.
00046  *
00047  ***************************************************************************/
00049
00050 #ifndef __CJDATETIMECTRL_H__
00051 #define __CJDATETIMECTRL_H__
00052
00053
00054 class CCJMonthCalCtrl;
00055
00056 // A CCJDateTimeCtrl object encapsulates the functionality of a date and time picker
00057 // control. The date and time picker control (DTP control) provides a simple interface
00058 // to exchange date and time information with a user. This interface contains fields,
00059 // each of which displays a part of the date and time information stored in the control.
00060 // The user can change the information stored in the control by changing the content of
00061 // the string in a given field. The user can move from field to field using the mouse or
00062 // the keyboard.
00063 class _CJX_EXT_CLASS CCJDateTimeCtrl : public CWnd
00064 {
00065     DECLARE_DYNAMIC(CCJDateTimeCtrl)
00066
00067 // Construction / destruction
00068 public:
00069
00070     // Constructs a CDateTimeCtrl object.
00071     //
00072     CCJDateTimeCtrl();
00073
00074     // Destroys a CDateTimeCtrl object.
00075     //
00076     virtual ~CCJDateTimeCtrl();
00077
00078 // Initialization
00079 public:
00080
00081     // Creates the date and time picker control and attaches it to the
00082     // CDateTimeCtrl object. Returns nonzero if creation was successful;
00083     // otherwise 0.
00084     //
00085     BOOL Create(
00086         // Specifies the combination of date time control styles. SeeDate
00087         // and Time Picker Control Styles in the Platform SDK for more information
00088         //about date and time picker styles.
00089         DWORD dwStyle,
00090         // A reference to aRECT structure, which is the position and size of the
00091         // date and time picker control.
00092         const RECT& rect,
00093         // A pointer to a CWnd object that is the parent window of the date and
00094         // time picker control. It must not be NULL.
00095         CWnd* pParentWnd,
00096         // Specifies the date and time picker control's control ID.
00097         UINT nID);
00098
00099 // Attributes
00100 public:
00101
00102     // Retrieves the color for a given portion of the month calendar within the
00103     // date and time picker control. Returns a COLORREF value that represents the
00104     // color setting for the specified portion of the month calendar control if
00105     // successful. The function returns -1 if unsuccessful.
00106     //
00107     COLORREF GetMonthCalColor(
00108         // An int value specifying which color area of the month calendar to
00109         // retrieve. For a list of values, see the iColor parameter for
00110         // SetMonthCalColor.
00111         int iColor) const;
00112
00113     // Sets the color for a given portion of the month calendar within a date
00114     // and time picker control. Returns a COLORREF value that represents the
00115     // previous color setting for the specified portion of the month calendar
00116     // control if successful. Otherwise, the message returns -1.
00117     //
00118     COLORREF SetMonthCalColor(
00119         // int value specifying which area of the month calendar control to set.
00120         // This value can be one of the following.
00121         //
00122         // Value                Meaning
00123         // MCSC_BACKGROUND      Set the background color displayed between months.
00124         // MCSC_MONTHBK         Set the background color displayed within a month.
00125         // MCSC_TEXT            Set the color used to display text within a month.
00126         // MCSC_TITLEBK         Set the background color displayed in the calendar's title.
00127         // MCSC_TITLETEXT       Set the color used to display text within the calendar's title.
00128         // MCSC_TRAILINGTEXT    Set the color used to display header and trailing-day text. Header and trailing days are the days from the previous and following months that appear on the current calendar.
00129         int iColor,
00130         // A COLORREF value representing the color that will be set for the specified
00131         // area of the month calendar.
00132         COLORREF ref);
00133
00134     // Sets the display of a date and time picker control based on a given format string.
00135     // Returns nonzero if successful; otherwise 0.
00136     //
00137     BOOL SetFormat(
00138         // A pointer to a zero-terminated format string that defines the desired display.
00139         // Setting this parameter to NULL will reset the control to the default format
00140         // string for the current style.
00141         LPCTSTR pstrFormat);
00142
00143     // Retrieves the date and time picker's child month calendar control.
00144     // Returns a pointer to a CMonthCalCtrl object, or NULL if unsuccessful or if
00145     // the window is not visible.
00146     //
00147     CCJMonthCalCtrl* GetMonthCalCtrl() const;
00148
00149     // Retrieves the font currently used by the date and time picker control's child
00150     // month calendar control. Returns a pointer to a CFont object, or NULL if unsuccessful.
00151     //
00152     CFont* GetMonthCalFont() const;
00153
00154     // Sets the font to be used by the date and time picker control's child month
00155     // calendar control.
00156     void SetMonthCalFont(
00157         // Handle to the font that will be set.
00158         HFONT hFont,
00159         // Specifies whether the control should be redrawn immediately upon setting the
00160         // font. Setting this parameter to TRUE causes the control to redraw itself.
00161         BOOL bRedraw = TRUE);
00162
00163     // Sets the minimum and maximum allowable system times for a date and time
00164     // picker control. Returns nonzero if successful; otherwise 0.
00165     //
00166     BOOL SetRange(
00167         // A pointer to a COleDateTime object containing the
00168         // earliest time allowed in the CDateTimeCtrl object.
00169         const COleDateTime* pMinRange,
00170         // A pointer to a COleDateTime object containing the
00171         // latest time allowed in the CDateTimeCtrl object.
00172         const COleDateTime* pMaxRange);
00173
00174     // Sets the minimum and maximum allowable system times for a date and time
00175     // picker control. Returns nonzero if successful; otherwise 0.
00176     //
00177     BOOL SetRange(
00178         // A pointer to a CTime object containing the
00179         // earliest time allowed in the CDateTimeCtrl object.
00180         const CTime* pMinRange,
00181         // A pointer to a CTime object containing the
00182         // latest time allowed in the CDateTimeCtrl object.
00183         const CTime* pMaxRange);
00184
00185     // Retrieves the current minimum and maximum allowable system times for a date
00186     // and time picker control. Returns a DWORD value containing flags that indicate
00187     // which ranges are set.
00188     //
00189     DWORD GetRange(
00190         // A pointer to a COleDateTime object containing the
00191         // earliest time allowed in the CDateTimeCtrl object.
00192         COleDateTime* pMinRange,
00193         // A pointer to a COleDateTime object containing the
00194         // latest time allowed in the CDateTimeCtrl object.
00195         COleDateTime* pMaxRange) const;
00196
00197     // Retrieves the current minimum and maximum allowable system times for a date
00198     // and time picker control. Returns a DWORD value containing flags that indicate
00199     // which ranges are set.
00200     //
00201     DWORD GetRange(
00202         // A pointer to a CTime object containing the
00203         // earliest time allowed in the CDateTimeCtrl object.
00204         CTime* pMinRange,
00205         // A pointer to a CTime object containing the
00206         // latest time allowed in the CDateTimeCtrl object.
00207         CTime* pMaxRange) const;
00208
00209 // Operations
00210 public:
00211
00212     // Sets the time in a date and time picker control. Returns nonzero if successful;
00213     // otherwise 0.
00214     //
00215     BOOL SetTime(
00216         // A pointer to a CTime object containing the time to which the control will be set.
00217         const CTime* pTimeNew);
00218
00219     // Sets the time in a date and time picker control. Returns nonzero if successful;
00220     // otherwise 0.
00221     //
00222     BOOL SetTime(
00223         // A reference to a COleDateTime object containing the to which the control
00224         // will be set.
00225         const COleDateTime& timeNew);
00226
00227     // Sets the time in a date and time picker control. Returns nonzero if successful;
00228     // otherwise 0.
00229     //
00230     BOOL SetTime(
00231         // A pointer to a SYSTEMTIME structure containing the time to which the control
00232         // will be set.
00233         LPSYSTEMTIME pTimeNew = NULL);
00234
00235     // Retrieves the currently selected time from a date and time picker control and
00236     // places it in a specified SYSTEMTIME structure. Returns a DWORD value equal to
00237     // the dwFlag member set in theNMDATETIMECHANGE structure
00238     //
00239     DWORD GetTime(
00240         // a reference to a CTime object that will receive the system time information
00241         CTime& timeDest) const;
00242
00243     // Retrieves the currently selected time from a date and time picker control and
00244     // places it in a specified SYSTEMTIME structure. Returns nonzero if the time is
00245     // successfully written to the COleDateTime object; otherwise 0.
00246     //
00247     BOOL GetTime(
00248         // a reference to a COleDateTime object that will receive the system
00249         // time information
00250         COleDateTime& timeDest) const;
00251
00252     // Retrieves the currently selected time from a date and time picker control and
00253     // places it in a specified SYSTEMTIME structure. Returns a DWORD value equal to
00254     // the dwFlag member set in theNMDATETIMECHANGE structure
00255     //
00256     DWORD GetTime(
00257         // A pointer to theSYSTEMTIME structure to receive the system time information.
00258         // Must not be NULL.
00259         LPSYSTEMTIME pTimeDest) const;
00260 };
00261
00262 // A CCJMonthCalCtrl object encapsulates the functionality of a month calendar control.
00263 // The month calendar control provides the user with a simple calendar interface, from
00264 // which the user can select a date.
00265 class _CJX_EXT_CLASS CCJMonthCalCtrl : public CWnd
00266 {
00267   DECLARE_DYNAMIC(CCJMonthCalCtrl)
00268
00269
00270 // Construction / destruction
00271 public:
00272
00273     // Constructs a CCJMonthCalCtrl object.
00274     //
00275     CCJMonthCalCtrl();
00276
00277     // Destroys a CCJMonthCalCtrl object.
00278     //
00279     virtual ~CCJMonthCalCtrl();
00280
00281 // Initialization
00282 public:
00283
00284     // Creates a month calendar control and attaches it to the CMonthCalCtrl object.
00285     // Returns nonzero if initialization was successful; otherwise 0.
00286     //
00287     BOOL Create(
00288         // Specifies the combination of Windows styles applied to the month
00289         // calendar control. SeeMonth Calendar Control Styles in the Platform
00290         // SDK for more information about the styles.
00291         DWORD dwStyle,
00292         // A reference to aRECT structure. Contains the position and size of
00293         // the month calendar control
00294         const RECT& rect,
00295         // A pointer to a CWnd object that is the parent window of the month
00296         // calendar control. It must not be NULL.
00297         CWnd* pParentWnd,
00298         // Specifies the month calendar control’s control ID.
00299         UINT nID);
00300
00301     // Creates a month calendar control and attaches it to the CMonthCalCtrl object.
00302     // Returns nonzero if initialization was successful; otherwise 0.
00303     //
00304     BOOL Create(
00305         // Specifies the combination of Windows styles applied to the month
00306         // calendar control. SeeMonth Calendar Control Styles in the Platform
00307         // SDK for more information about the styles.
00308         DWORD dwStyle,
00309         // A reference to aPOINT structure that identifies the location of
00310         // the month calendar control
00311         const POINT& pt,
00312         // A pointer to a CWnd object that is the parent window of the month
00313         // calendar control. It must not be NULL.
00314         CWnd* pParentWnd,
00315         // Specifies the month calendar control’s control ID.
00316         UINT nID);
00317
00318 //Attributes
00319 public:
00320
00321     // Retrieves the minimum size required to show a full month in a month calendar
00322     // control. Returns nonzero and lpRect receives the applicable bounding information.
00323     // If unsuccessful, the member function returns 0.
00324     //
00325     BOOL GetMinReqRect(
00326         // A pointer to aRECT structure that will receive bounding rectangle information.
00327         // This parameter must be a valid address and cannot be NULL.
00328         RECT* pRect) const;
00329
00330     // Sets the scroll rate for a month calendar control. Returns the previous scroll
00331     // rate. If the scroll rate has not been previously set, the return value is 0.
00332     //
00333     int SetMonthDelta(
00334         // The number of months to be set as the control's scroll rate. If this value
00335         // is zero, the month delta is reset to the default, which is the number of
00336         // months displayed in the control.
00337         int iDelta);
00338
00339     // Retrieves the scroll rate for a month calendar control. Returns The scroll rate
00340     // for the month calendar control. The scroll rate is the number of months that the
00341     // control moves its display when the user clicks a scroll button once.
00342     //
00343     int GetMonthDelta() const;
00344
00345     // Sets the day of week to be displayed in the leftmost column of the calendar.
00346     // Returns nonzero if the previous first day of the week is set to a value other
00347     // than that of LOCALE_IFIRSTDAYOFWEEK, which is the day indicated in the control
00348     // panel setting. Otherwise, this function returns 0.
00349     BOOL SetFirstDayOfWeek(
00350         // An integer value representing which day is to be set as the first day of
00351         // the week. This value must be one of the day numbers. See GetFirstDayOfWeek
00352         // for a description of the day numbers.
00353         int iDay,
00354         // A pointer to an integer indicating the first day of the week previously set.
00355         int* lpnOld = NULL);
00356
00357     // Gets the first day of the week to be displayed in the leftmost column of the
00358     // calendar. Returns an integer value that represents the first day of the week.
00359     // The days of the week are represented as integers, as follows.
00360     //
00361     // Value    Day of the Week
00362     // 0        Monday
00363     // 1        Tuesday
00364     // 2        Wednesday
00365     // 3        Thursday
00366     // 4        Friday
00367     // 5        Saturday
00368     // 6        Sunday
00369     //
00370     int GetFirstDayOfWeek(
00371         // A pointer to a BOOL value. If the value is non-zero, the control's setting
00372         // does not match the setting in the control panel.
00373         BOOL* pbLocal = NULL) const;
00374
00375     // Gets the color of a specified area of a month calendar control. Returns a COLORREF
00376     // value specifying the color associated with the portion of the month calendar
00377     // control, if successful. Otherwise, this member function returns -1.
00378     //
00379     COLORREF GetColor(
00380         // The region of the month calendar control from which the color is retrieved.
00381         // For a list of values, see the nRegion parameter of  SetColor.
00382         int nRegion) const;
00383
00384     // Sets the color of a specified area of a month calendar control. Returns a COLORREF
00385     // value that represents the previous color setting for the specified portion of the
00386     // month calendar control, if successful. Otherwise this message returns -1.
00387     //
00388     COLORREF SetColor(
00389         // An integer value specifying which month calendar color to set. This value can be one of the following.
00390         //
00391         // Value                Meaning
00392         // MCSC_BACKGROUND      The background color displayed between months.
00393         // MCSC_MONTHBK         The background color displayed within the month.
00394         // MCSC_TEXT            The color used to display text within a month.
00395         // MCSC_TITLEBK         The background color displayed in the calendar's title.
00396         // MCSC_TITLETEXT       The color used to display text within the calendar's title.
00397         // MCSC_TRAILINGTEXT    The color used to display header and trailing-day text. Header and trailing days are the days from the previous and following months that appear on the current calendar.
00398         //
00399         int nRegion,
00400         // A COLORREF value for the new color setting for the specified portion of the
00401         // month calendar control
00402         COLORREF ref);
00403
00404 // Operations
00405 public:
00406
00407     // Repaints the month calendar control to its minimum, one-month size. Returns
00408     // nonzero if the month calendar control is sized to its minimum; otherwise 0.
00409     //
00410     BOOL SizeMinReq(
00411         // Specifies whether the control is to be repainted. By default, TRUE.
00412         // If FALSE, no repainting occurs.
00413         BOOL bRepaint = TRUE);
00414
00415     // Sets the calendar control for the current day.
00416     //
00417     void SetToday(
00418         // A reference to a COleDateTime object that contains the current date.
00419         const COleDateTime& refDateTime);
00420
00421     // Sets the calendar control for the current day.
00422     //
00423     void SetToday(
00424         // A pointer to a CTime object containing the current date information.
00425         const CTime* pDateTime);
00426
00427     // Sets the calendar control for the current day.
00428     //
00429     void SetToday(
00430         // A pointer to aSYSTEMTIME structure that contains the current date information.
00431         const LPSYSTEMTIME pDateTime);
00432
00433     // Retrieves the date information for the date specified as "today" for a month
00434     // calendar control. Returns nonzero if successful; otherwise 0.
00435     //
00436     BOOL GetToday(
00437         // A reference to a CTime object indicating the current day.
00438         CTime& refTime) const;
00439
00440     // Retrieves the date information for the date specified as "today" for a month
00441     // calendar control. Returns nonzero if successful; otherwise 0.
00442     //
00443     BOOL GetToday(
00444         // A reference to a COleDateTime object indicating the current day.
00445         COleDateTime& refDateTime) const;
00446
00447     // Retrieves the date information for the date specified as "today" for a month
00448     // calendar control. Returns nonzero if successful; otherwise 0.
00449     //
00450     BOOL GetToday(
00451         // A pointer to aSYSTEMTIME structure that will receive the date information.
00452         // This parameter must be a valid address and cannot be NULL.
00453         LPSYSTEMTIME pDateTime) const;
00454
00455     // Retrieves the system time as indicated by the currently-selected date. Returns
00456     // nonzero if successful; otherwize 0.
00457     //
00458     BOOL GetCurSel(
00459         // A pointer to aSYSTEMTIME structure that will receive the currently-selected
00460         // date information. This parameter must be a valid address and cannot be NULL.
00461         LPSYSTEMTIME pDateTime) const;
00462
00463     // Retrieves the system time as indicated by the currently-selected date. Returns
00464     // nonzero if successful; otherwize 0.
00465     //
00466     BOOL GetCurSel(
00467         // A reference to a CTime object. Receives the current time.
00468         CTime& refDateTime) const;
00469
00470     // Retrieves the system time as indicated by the currently-selected date. Returns
00471     // nonzero if successful; otherwize 0.
00472     //
00473     BOOL GetCurSel(
00474         // A reference to a COleDateTime object. Receives the current time.
00475         COleDateTime& refDateTime) const;
00476
00477     // Sets the currently-selected date for a month calendar control. Returns
00478     // nonzero if successful; otherwise 0.
00479     //
00480     BOOL SetCurSel(
00481         // Pointer to aSYSTEMTIME structure that contains the date to be set
00482         // as the current selection.
00483         const LPSYSTEMTIME pDateTime);
00484
00485     // Sets the currently-selected date for a month calendar control. Returns
00486     // nonzero if successful; otherwise 0.
00487     //
00488     BOOL SetCurSel(
00489         // A reference to a CTime object indicating the currently-selected
00490         // month calendar control.
00491         const CTime& refDateTime);
00492
00493     // Sets the currently-selected date for a month calendar control. Returns
00494     // nonzero if successful; otherwise 0.
00495     //
00496     BOOL SetCurSel(
00497         // A reference to a COleDateTime indicating the currently-selected month
00498         // calendar control.
00499         const COleDateTime& refDateTime);
00500
00501     // Sets the display for days in a month calendar control. Returns nonzero
00502     // if successful; otherwise 0.
00503     //
00504     BOOL SetDayState(
00505         // Value indicating how many elements are in the array that pStates
00506         // points to.
00507         int nMonths,
00508         // A pointer to aMONTHDAYSTATE array of values that define how the month
00509         // calendar control will draw each day in its display. The MONTHDAYSTATE
00510         // data type is a bit field, where each bit (1 through 31) represents the
00511         // state of a day in a month. If a bit is on, the corresponding day will be
00512         // displayed in bold; otherwise it will be displayed with no emphasis.
00513         LPMONTHDAYSTATE pStates);
00514
00515     // Sets the maximum number of days that can be selected in a month
00516     // calendar control. Returns nonzero if successful; otherwise 0.
00517     //
00518     BOOL SetMaxSelCount(
00519         //
00520         int nMax);
00521
00522     // Retrieves the current maximum number of days that can be selected
00523     // in a month calendar control. Returns an integer value that represents
00524     // the total number of days that can be selected for the control.
00525     //
00526     int GetMaxSelCount() const;
00527
00528     // Sets the minimum and maximum allowable dates for a month calendar control.
00529     // Returns nonzero if successful; otherwise 0.
00530     //
00531     BOOL SetRange(
00532         // A pointer to a COleDateTime object containing the date at the lowest
00533         // end of the range.
00534         const COleDateTime* pMinRange,
00535         // A pointer to a COleDateTime object containing the date at the highest
00536         // end of the range.
00537         const COleDateTime* pMaxRange);
00538
00539     // Sets the minimum and maximum allowable dates for a month calendar control.
00540     // Returns nonzero if successful; otherwise 0.
00541     //
00542     BOOL SetRange(
00543         // A pointer to a CTime object containing the date at the lowest
00544         // end of the range.
00545         const CTime* pMinRange,
00546         // A pointer to a CTime object containing the date at the highest
00547         // end of the range.
00548         const CTime* pMaxRange);
00549
00550     // Sets the minimum and maximum allowable dates for a month calendar control.
00551     // Returns nonzero if successful; otherwise 0.
00552     //
00553     BOOL SetRange(
00554         // A pointer to a SYSTEMTIME structure containing the date at the lowest
00555         // end of the range.
00556         const LPSYSTEMTIME pMinRange,
00557         // A pointer to a SYSTEMTIME structure containing the date at the highest
00558         // end of the range.
00559         const LPSYSTEMTIME pMaxRange);
00560
00561     // Retrieves the current minimum and maximum dates set in a month calendar control.
00562     // Returns A DWORD that can be zero (no limits are set) or a combination of the
00563     // following values that specify limit information.
00564     //
00565     // Value        Meaning
00566     // GDTR_MAX     A maximum limit is set for the control;
00567     //              pMaxRange is valid and contains the applicable date information.
00568     // GDTR_MIN     A minimum limit is set for the control;
00569     //              pMinRange is valid and contains the applicable date information.
00570     //
00571     DWORD GetRange(
00572         // A pointer to a COleDateTime object containing the date at the lowest end
00573         // of the range.
00574         COleDateTime* pMinRange,
00575         // A pointer to a COleDateTime object containing the date at the highest end
00576         // of the range.
00577         COleDateTime* pMaxRange) const;
00578
00579     // Retrieves the current minimum and maximum dates set in a month calendar control.
00580     // Returns A DWORD that can be zero (no limits are set) or a combination of the
00581     // following values that specify limit information.
00582     //
00583     // Value        Meaning
00584     // GDTR_MAX     A maximum limit is set for the control;
00585     //              pMaxRange is valid and contains the applicable date information.
00586     // GDTR_MIN     A minimum limit is set for the control;
00587     //              pMinRange is valid and contains the applicable date information.
00588     //
00589     DWORD GetRange(
00590         // A pointer to a CTime object containing the date at the lowest end of the range.
00591         CTime* pMinRange,
00592         // A pointer to a CTime object containing the date at the highest end of the range.
00593         CTime* pMaxRange) const;
00594
00595     // Retrieves the current minimum and maximum dates set in a month calendar control.
00596     // Returns A DWORD that can be zero (no limits are set) or a combination of the
00597     // following values that specify limit information.
00598     //
00599     // Value        Meaning
00600     // GDTR_MAX     A maximum limit is set for the control;
00601     //              pMaxRange is valid and contains the applicable date information.
00602     // GDTR_MIN     A minimum limit is set for the control;
00603     //              pMinRange is valid and contains the applicable date information.
00604     //
00605     DWORD GetRange(
00606         // A pointer to a SYSTEMTIME structure containing the date at the
00607         // lowest end of the range.
00608         LPSYSTEMTIME pMinRange,
00609         // A pointer to a COleDateTime object, a CTime object, orSYSTEMTIME structure
00610         // containing the date at the highest end of the range.
00611         LPSYSTEMTIME pMaxRange) const;
00612
00613     // Retrieves date information representing the high and low limits of a month
00614     // calendar control's display. Returns An integer that represents the range,
00615     // in months, spanned by the two limits indicated by refMinRange and
00616     // refMaxRange.
00617     //
00618     int GetMonthRange(
00619         // A reference to a COleDateTime object containing the minimum date allowed.
00620         COleDateTime& refMinRange,
00621         // A reference to a COleDateTime object containing the maximum date allowed.
00622         COleDateTime& refMaxRange,
00623         // Value specifying the scope of the range limits to be retrieved. This value must be one of the following.
00624         //
00625         // Value            Meaning
00626         // GMR_DAYSTATE     Include preceding and trailing months of visible range that are only partially displayed.
00627         // GMR_VISIBLE      Include only those months that are entirely displayed.
00628         DWORD dwFlags) const;
00629
00630     // Retrieves date information representing the high and low limits of a month
00631     // calendar control's display. Returns An integer that represents the range,
00632     // in months, spanned by the two limits indicated by refMinRange and
00633     // refMaxRange.
00634     //
00635     int GetMonthRange(
00636         // A reference to a CTime object containing the minimum date allowed.
00637         CTime& refMinRange,
00638         // A reference to a CTime object containing the maximum date allowed.
00639         CTime& refMaxRange,
00640         // Value specifying the scope of the range limits to be retrieved. This value must be one of the following.
00641         //
00642         // Value            Meaning
00643         // GMR_DAYSTATE     Include preceding and trailing months of visible range that are only partially displayed.
00644         // GMR_VISIBLE      Include only those months that are entirely displayed.
00645         DWORD dwFlags) const;
00646
00647     // Retrieves date information representing the high and low limits of a month
00648     // calendar control's display. Returns An integer that represents the range,
00649     // in months, spanned by the two limits indicated by pMinRange and pMaxRange.
00650     //
00651     int GetMonthRange(
00652         // A pointer to aSYSTEMTIME structure containing the date at the lowest
00653         // end of the range.
00654         LPSYSTEMTIME pMinRange,
00655         // A pointer to a SYSTEMTIME structure containing the date at the highest
00656         // end of the range.
00657         LPSYSTEMTIME pMaxRange,
00658         // Value specifying the scope of the range limits to be retrieved. This value must be one of the following.
00659         //
00660         // Value            Meaning
00661         // GMR_DAYSTATE     Include preceding and trailing months of visible range that are only partially displayed.
00662         // GMR_VISIBLE      Include only those months that are entirely displayed.
00663         DWORD dwFlags) const;
00664
00665     // Sets the selection for a month calendar control to a given date range.
00666     // Returns nonzero if successful; otherwise 0.
00667     //
00668     BOOL SetSelRange(
00669         // A pointer to a COleDateTime object containing the date at the lowest
00670         // end of the range.
00671         const COleDateTime& pMinRange,
00672         // A pointer to a COleDateTime object containing the date at the highest
00673         // end of the range.
00674         const COleDateTime& pMaxRange);
00675
00676     // Sets the selection for a month calendar control to a given date range.
00677     // Returns nonzero if successful; otherwise 0.
00678     //
00679     BOOL SetSelRange(
00680         // A pointer to a CTime object containing the date at the lowest
00681         // end of the range.
00682         const CTime& pMinRange,
00683         // A pointer to a CTime object containing the date at the highest
00684         // end of the range.
00685         const CTime& pMaxRange);
00686
00687     // Sets the selection for a month calendar control to a given date range.
00688     // Returns nonzero if successful; otherwise 0.
00689     //
00690     BOOL SetSelRange(
00691         // A pointer to a SYSTEMTIME structure containing the date at the lowest
00692         // end of the range.
00693         const LPSYSTEMTIME pMinRange,
00694         // A pointer to a SYSTEMTIME structure containing the date at the highest
00695         // end of the range.
00696         const LPSYSTEMTIME pMaxRange);
00697
00698     // Retrieves date information representing the upper and lower limits of
00699     // the date range currently selected by the user. Returns nonzero if successful;
00700     // otherwise 0.
00701     //
00702     BOOL GetSelRange(
00703         // A reference to a COleDateTime object containing the minimum date allowed.
00704         COleDateTime& refMinRange,
00705         // A reference to a COleDateTime object containing the maximum date allowed.
00706         COleDateTime& refMaxRange) const;
00707
00708     // Retrieves date information representing the upper and lower limits of
00709     // the date range currently selected by the user. Returns nonzero if successful;
00710     // otherwise 0.
00711     //
00712     BOOL GetSelRange(
00713         // A reference to a CTime object containing the minimum date allowed.
00714         CTime& refMinRange,
00715         // A reference to a CTime object containing the maximum date allowed.
00716         CTime& refMaxRange) const;
00717
00718     // Retrieves date information representing the upper and lower limits of
00719     // the date range currently selected by the user. Returns nonzero if successful;
00720     // otherwise 0.
00721     //
00722     BOOL GetSelRange(
00723         // A pointer to aSYSTEMTIME structure containing the date at the lowest
00724         // end of the range.
00725         LPSYSTEMTIME pMinRange,
00726         // A pointer to a SYSTEMTIME structure containing the date at the highest
00727         // end of the range.
00728         LPSYSTEMTIME pMaxRange) const;
00729
00730     // Determines which portion of a month calendar control is at a given point on
00731     // the screen. Returns A DWORD value. Equal to the uHit member of the MCHITTESTINFO
00732     // structure.
00733     //
00734     DWORD HitTest(
00735         // A pointer to aMCHITTESTINFO structure containing hit testing points for the
00736         // month calendar control.
00737         PMCHITTESTINFO pMCHitTest);
00738 };
00739
00741 // Standard Dialog Data Exchange routines
00743
00744 void AFXAPI DDX_CJDateTimeCtrl(CDataExchange* pDX, int nIDC, COleDateTime& value);
00745 void AFXAPI DDX_CJDateTimeCtrl(CDataExchange* pDX, int nIDC, CTime& value);
00746 void AFXAPI DDX_CJMonthCalCtrl(CDataExchange* pDX, int nIDC, COleDateTime& value);
00747 void AFXAPI DDX_CJMonthCalCtrl(CDataExchange* pDX, int nIDC, CTime& value);
00748
00750 // Standard Dialog Data Validation routines
00752
00753 void AFXAPI DDV_CJMinMaxDateTime(CDataExchange* pDX, CTime& refValue, const CTime* pMinRange, const CTime* pMaxRange);
00754 void AFXAPI DDV_CJMinMaxDateTime(CDataExchange* pDX,  COleDateTime& refValue, const COleDateTime* pMinRange, const COleDateTime* pMaxRange);
00755 void AFXAPI DDV_CJMinMaxMonth(CDataExchange* pDX, CTime& refValue, const CTime* pMinRange, const CTime* pMaxRange);
00756 void AFXAPI DDV_CJMinMaxMonth(CDataExchange* pDX, COleDateTime& refValue, const COleDateTime* pMinRange, const COleDateTime* pMaxRange);
00757
00759 //  Inline Functions
00761
00762 //CJDateTimeCtrl
00763 _CJXLIB_INLINE CCJDateTimeCtrl::CCJDateTimeCtrl()
00764     { }
00765 _CJXLIB_INLINE CFont* CCJDateTimeCtrl::GetMonthCalFont() const
00766     { ASSERT(::IsWindow(m_hWnd)); return CFont::FromHandle((HFONT) ::SendMessage(m_hWnd, DTM_GETMCFONT, 0, 0)); }
00767 _CJXLIB_INLINE CCJMonthCalCtrl* CCJDateTimeCtrl::GetMonthCalCtrl() const
00768     { ASSERT(::IsWindow(m_hWnd)); return (CCJMonthCalCtrl*) CWnd::FromHandle((HWND) ::SendMessage(m_hWnd, DTM_GETMONTHCAL, 0, 0)); }
00769 _CJXLIB_INLINE void CCJDateTimeCtrl::SetMonthCalFont(HFONT hFont, BOOL bRedraw /* = TRUE */)
00770     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, DTM_SETMCFONT, (WPARAM) hFont, MAKELONG(bRedraw, 0)); }
00771 _CJXLIB_INLINE COLORREF CCJDateTimeCtrl::SetMonthCalColor(int iColor, COLORREF ref)
00772     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, DTM_SETMCCOLOR, (WPARAM) iColor, (LPARAM) ref); }
00773 _CJXLIB_INLINE DWORD CCJDateTimeCtrl::GetTime(LPSYSTEMTIME pTimeDest) const
00774     { ASSERT(::IsWindow(m_hWnd)); ASSERT(pTimeDest != NULL); return (DWORD) ::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM) pTimeDest); }
00775 _CJXLIB_INLINE COLORREF CCJDateTimeCtrl::GetMonthCalColor(int iColor) const
00776     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, DTM_GETMCCOLOR, (WPARAM) iColor, 0); }
00777 _CJXLIB_INLINE BOOL CCJDateTimeCtrl::SetFormat(LPCTSTR pstrFormat)
00778     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, DTM_SETFORMAT, 0, (LPARAM) pstrFormat); }
00779
00780 //CCJMonthCalCtrl
00781 _CJXLIB_INLINE CCJMonthCalCtrl::CCJMonthCalCtrl()
00782     { }
00783 _CJXLIB_INLINE DWORD CCJMonthCalCtrl::HitTest(PMCHITTESTINFO pMCHitTest)
00784     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, MCM_HITTEST, 0, (LPARAM) pMCHitTest); }
00785 _CJXLIB_INLINE BOOL CCJMonthCalCtrl::GetMinReqRect(RECT* pRect) const
00786     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETMINREQRECT, 0, (LPARAM) pRect); }
00787 _CJXLIB_INLINE int CCJMonthCalCtrl::SetMonthDelta(int iDelta)
00788     { ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_SETMONTHDELTA, (WPARAM) iDelta, 0); }
00789 _CJXLIB_INLINE int CCJMonthCalCtrl::GetMonthDelta() const
00790     { ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_GETMONTHDELTA, 0, 0); }
00791 _CJXLIB_INLINE COLORREF CCJMonthCalCtrl::GetColor(int nRegion) const
00792     { ASSERT(m_hWnd != NULL); return (COLORREF) ::SendMessage(m_hWnd, MCM_GETCOLOR, (WPARAM) nRegion, 0); }
00793 _CJXLIB_INLINE COLORREF CCJMonthCalCtrl::SetColor(int nRegion, COLORREF ref)
00794     { ASSERT(m_hWnd != NULL); return (COLORREF) ::SendMessage(m_hWnd, MCM_SETCOLOR, (WPARAM) nRegion, (LPARAM) ref); }
00795 _CJXLIB_INLINE BOOL CCJMonthCalCtrl::SetMaxSelCount(int nMax)
00796     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_SETMAXSELCOUNT, nMax, 0); }
00797 _CJXLIB_INLINE int CCJMonthCalCtrl::GetMaxSelCount() const
00798     { ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_GETMAXSELCOUNT, 0, 0); }
00799 _CJXLIB_INLINE void CCJMonthCalCtrl::SetToday(const LPSYSTEMTIME pDateTime)
00800     { ASSERT(m_hWnd != NULL); ::SendMessage(m_hWnd, MCM_SETTODAY, 0, (LPARAM) pDateTime); }
00801 _CJXLIB_INLINE BOOL CCJMonthCalCtrl::GetToday(LPSYSTEMTIME pDateTime) const
00802     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETTODAY, 0, (LPARAM) pDateTime); }
00803 _CJXLIB_INLINE BOOL CCJMonthCalCtrl::SetCurSel(const LPSYSTEMTIME pDateTime)
00804     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_SETCURSEL, 0, (LPARAM) pDateTime); }
00805 _CJXLIB_INLINE BOOL CCJMonthCalCtrl::GetCurSel(LPSYSTEMTIME pDateTime) const
00806     { ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETCURSEL, 0, (LPARAM) pDateTime); }
00807
00808 #endif //__CJDATETIMECTRL_H__
00809
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJShell.cpp Source File

WinCvs/CJLib/CJLibrary/CJShell.cpp

Go to the documentation of this file.
00001 // CJShell.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based upon the MFCENUM example. MFCENUM is a companion sample application
00006 // for Chapter 14 in "Programming the Windows 95 User Interface" by Nancy Cluts,
00007 // available in the Microsoft(R) Development Library.
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 2004/06/21 20:37:18 $
00013  * $Revision: 1.3 $
00014  * $Archive: /CodeJock/CJLibrary/CJShell.cpp $
00015  *
00016  * $History: CJShell.cpp $
00017  *
00018  * *****************  Version 10  *****************
00019  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00020  * Updated in $/CodeJock/CJLibrary
00021  * Fixed potential resource and memory leak problems.
00022  *
00023  * *****************  Version 9  *****************
00024  * User: Kirk Stowell Date: 10/14/99   Time: 10:25a
00025  * Updated in $/CodeJock/CJLibrary
00026  * Added four new shell methods which deal with PIDL's including a new
00027  * version of an Explorer context menu called DoExplorerMenu(...) which
00028  * can be used in place of the existing DoTheMenuThing(...) method.
00029  *
00030  * *****************  Version 8  *****************
00031  * User: Kirk Stowell Date: 9/13/99    Time: 5:52a
00032  * Updated in $/CodeJockey/CJLibrary
00033  * Fixed build errors which occured with UNICODE builds.
00034  *
00035  * *****************  Version 7  *****************
00036  * User: Kirk Stowell Date: 8/31/99    Time: 4:39a
00037  * Updated in $/CodeJockey/CJLibrary
00038  * Updated copyright and contact information.
00039  *
00040  * *****************  Version 6  *****************
00041  * User: Kirk Stowell Date: 7/31/99    Time: 4:26p
00042  * Updated in $/CodeJockey/CJLibrary
00043  *
00044  * *****************  Version 4  *****************
00045  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00046  * Updated in $/CodeJockey/CJLibrary
00047  *
00048  * *****************  Version 3  *****************
00049  * User: Kirk Stowell Date: 6/11/99    Time: 10:06p
00050  * Updated in $/CodeJockey/CJ60Lib
00051  * Renamed class from CCJShellFile to CCJShell.
00052  *
00053  * *****************  Version 2  *****************
00054  * User: Kirk Stowell Date: 5/02/99    Time: 3:38p
00055  * Updated in $/CodeJockey/CJ60Lib
00056  * Added version macro  _WIN32_IE, you will need to have at IE4 or greater
00057  * installed to use this class. This will ensure that the version of
00058  * SHELL32.DLL is compatible.
00059  *
00060  * *****************  Version 1  *****************
00061  * User: Kirk Stowell Date: 3/19/99    Time: 11:01p
00062  * Created in $/CodeJockey/CJ60Lib
00063  * Initial re-write and release.
00064  *
00065  ***************************************************************************/
00067
00068 #include "StdAfx.h"
00069 #include "CJShell.h"
00070
00071 #if _WIN32_IE >= 0x0400 // Need to have at IE4 or greater installed.
00072
00074 // CCJShell
00075
00076 CCJShell::CCJShell(LPCTSTR lpszFileName)
00077 {
00078     m_strFileName = lpszFileName;
00079     SplitPath(m_strFileName, m_szDrive, m_szDir, m_szFname, m_szExt);
00080 }
00081
00082 CCJShell::~CCJShell()
00083 {
00084 }
00085
00086 int CALLBACK CCJShell::BrowseCtrlCallback(HWND hwnd, UINT uMsg, LPARAM /*lParam*/, LPARAM lpData)
00087 {
00088     CCJShell* pCJShellInfo = (CCJShell*)lpData;
00089
00090     if (pCJShellInfo->m_strSelDir.IsEmpty())
00091         return FALSE;
00092
00093     switch (uMsg)
00094     {
00095     case BFFM_INITIALIZED:
00096         ::SendMessage(hwnd, BFFM_SETSELECTION, TRUE,
00097             (LPARAM)(LPCTSTR)pCJShellInfo->m_strSelDir);
00098         break;
00099
00100     case BFFM_SELCHANGED:
00101         break;
00102     }
00103
00104     return FALSE;
00105 }
00106
00107 BOOL CCJShell::BrowseForFolder(CWnd *pParentWnd)
00108 {
00109     ASSERT(pParentWnd);
00110
00111     LPMALLOC pMalloc;
00112     if (::SHGetMalloc(&pMalloc)!= NOERROR)
00113         return FALSE;
00114
00115     BROWSEINFO bInfo;
00116     LPITEMIDLIST pidl;
00117     ZeroMemory ( (PVOID) &bInfo,sizeof (BROWSEINFO));
00118
00119     if (!m_strInitDir.IsEmpty ())
00120     {
00121         OLECHAR       olePath[MAX_PATH];
00122         ULONG         chEaten;
00123         ULONG         dwAttributes;
00124         HRESULT       hr;
00125         LPSHELLFOLDER pDesktopFolder;
00126         //
00127         // Get a pointer to the Desktop's IShellFolder interface.
00128         //
00129         if (SUCCEEDED(SHGetDesktopFolder(&pDesktopFolder)))
00130         {
00131             //
00132             // IShellFolder::ParseDisplayName requires the file name be in Unicode.
00133             //
00134 #if defined( _UNICODE )
00135             _tcsncpy( olePath, m_strInitDir, MAX_PATH );
00136 #else
00137             MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, m_strInitDir,
00138                                  -1, olePath, MAX_PATH);
00139 #endif
00140             //
00141             // Convert the path to an ITEMIDLIST.
00142             //
00143             hr = pDesktopFolder->ParseDisplayName(NULL,
00144                 NULL,
00145                 olePath,
00146                 &chEaten,
00147                 &pidl,
00148                 &dwAttributes);
00149             if (FAILED(hr))
00150             {
00151                 pMalloc ->Free (pidl);
00152                 pMalloc ->Release ();
00153                 // fix potential memory leak - KStowell 10-22-99
00154                 pDesktopFolder ->Release ();
00155                 return FALSE;
00156             }
00157             bInfo.pidlRoot = pidl;
00158             // fix potential memory leak - KStowell 10-22-99
00159             pDesktopFolder ->Release ();
00160         }
00161     }
00162
00163     bInfo.hwndOwner      = pParentWnd->GetSafeHwnd();
00164     bInfo.pszDisplayName = m_strPath.GetBuffer (MAX_PATH);
00165     bInfo.lpszTitle      = (m_strTitle.IsEmpty()) ? _T("Open"):m_strTitle;
00166     bInfo.ulFlags        = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS | BIF_USENEWUI;
00167     bInfo.lpfn           = BrowseCtrlCallback;  // address of callback function
00168     bInfo.lParam         = (LPARAM)this;        // pass address of object to callback function
00169
00170     if ((pidl = ::SHBrowseForFolder(&bInfo)) == NULL)
00171     {
00172         return FALSE;
00173     }
00174     m_strPath.ReleaseBuffer();
00175     m_iImageIndex = bInfo.iImage;
00176
00177     if (::SHGetPathFromIDList(pidl,m_strPath.GetBuffer(MAX_PATH)) == FALSE)
00178     {
00179         pMalloc ->Free(pidl);
00180         pMalloc ->Release();
00181         return FALSE;
00182     }
00183
00184     m_strPath.ReleaseBuffer();
00185
00186     pMalloc ->Free(pidl);
00187     pMalloc ->Release();
00188
00189     return TRUE;
00190 }
00191
00192 void CCJShell::GetSystemImageList(CImageList *pSmallList, CImageList *pLargeList)
00193 {
00194     ASSERT(pSmallList);
00195     ASSERT(pLargeList);
00196
00197     //image list setup
00198     SHFILEINFO  ssfi, lsfi;
00199
00200     // Get a handle to the system small icon list
00201     HIMAGELIST hSystemSmallImageList = (HIMAGELIST)
00202         ::SHGetFileInfo((LPCTSTR)_T("C:\\"), 0, &ssfi,
00203         sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
00204
00205     // Attach it to the small image list
00206     // DON'T FORGET TO PUT pSmallList->Detach(); in your destructor
00207     pSmallList->Attach(hSystemSmallImageList);
00208
00209     // Get a handle to the system large icon list
00210     HIMAGELIST hSystemLargeImageList =  (HIMAGELIST)
00211         ::SHGetFileInfo((LPCTSTR)_T("C:\\"), 0, &lsfi,
00212         sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_ICON);
00213
00214     // Attach it to the large image list
00215     // DON'T FORGET TO PUT pLargeList->Detach(); in your destructor
00216     pLargeList->Attach(hSystemLargeImageList);
00217 }
00218
00219 CString CCJShell::GetFileName(LPCTSTR lpszFileName/*=NULL*/)
00220 {
00221     // Parse the file path.
00222     if (lpszFileName != NULL) {
00223         SplitPath(lpszFileName, m_szDrive, m_szDir, m_szFname, m_szExt);
00224     }
00225
00226     // Just return the file name + extension.
00227     CString str; str.Format(_T("%s%s"), m_szFname, m_szExt);
00228     return str;
00229 }
00230
00231 CString CCJShell::GetFileDrive(LPCTSTR lpszFileName/*=NULL*/)
00232 {
00233     // Parse the file path.
00234     if (lpszFileName != NULL) {
00235         SplitPath(lpszFileName, m_szDrive, m_szDir, m_szFname, m_szExt);
00236     }
00237
00238     return m_szDrive;
00239 }
00240
00241 CString CCJShell::GetRoot(LPCTSTR lpszFileName/*=NULL*/)
00242 {
00243     // Parse the file path.
00244     if (lpszFileName != NULL) {
00245         SplitPath(lpszFileName, m_szDrive, m_szDir, m_szFname, m_szExt);
00246     }
00247
00248     // Just return the file name + extension.
00249     CString str; str.Format(_T("%s%s"), m_szDrive, m_szDir);
00250     return str;
00251 }
00252
00253 CString CCJShell::GetFileTitle(LPCTSTR lpszFileName/*=NULL*/)
00254 {
00255     // Parse the file path.
00256     if (lpszFileName != NULL) {
00257         SplitPath(lpszFileName, m_szDrive, m_szDir, m_szFname, m_szExt);
00258     }
00259
00260     return m_szFname;
00261 }
00262
00263 CString CCJShell::GetFileExt(LPCTSTR lpszFileName/*=NULL*/)
00264 {
00265     // Parse the file path.
00266     if (lpszFileName != NULL) {
00267         SplitPath(lpszFileName, m_szDrive, m_szDir, m_szFname, m_szExt);
00268     }
00269
00270     return m_szExt;
00271 }
00272
00273 CString CCJShell::GetFileType(LPCTSTR lpszFileName/*=NULL*/)
00274 {
00275     SHFILEINFO  sfi;
00276
00277     ::SHGetFileInfo((lpszFileName==NULL)?m_strFileName:lpszFileName,
00278         0, &sfi, sizeof(SHFILEINFO), SHGFI_TYPENAME);
00279
00280    return sfi.szTypeName;
00281 }
00282
00283 CString CCJShell::GetDisplayName(LPCTSTR lpszFileName/*=NULL*/)
00284 {
00285     SHFILEINFO sfi;
00286
00287     ::SHGetFileInfo((lpszFileName==NULL)?m_strFileName:lpszFileName,
00288         0, &sfi, sizeof(SHFILEINFO), SHGFI_DISPLAYNAME);
00289
00290     return sfi.szDisplayName;
00291 }
00292
00293 int CCJShell::GetIconIndex(LPCTSTR lpszFileName/*=NULL*/, UINT uFlags/*=SHGFI_SMALLICON*/)
00294 {
00295     SHFILEINFO sfi;
00296
00297     ::SHGetFileInfo((lpszFileName==NULL)?m_strFileName:lpszFileName,
00298         0, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | uFlags);
00299
00300     return sfi.iIcon;
00301 }
00302
00303 BOOL CCJShell::Exist(LPCTSTR lpszFileName/*=NULL*/)
00304 {
00305     WIN32_FIND_DATA fd;
00306     HANDLE hFind = FindFirstFile( (lpszFileName==NULL)?m_strFileName:lpszFileName, &fd );
00307
00308     if ( hFind != INVALID_HANDLE_VALUE )
00309         FindClose( hFind );
00310
00311     return (hFind != INVALID_HANDLE_VALUE);
00312 }
00313
00314 CString CCJShell::GetLastWriteTime(CTime *pTime)
00315 {
00316     if (!pTime)
00317         return _T("");
00318
00319     CString strTime;
00320
00321     // Format the date time string.
00322     strTime.Format( _T("%.2d/%.2d/%d %.2d:%.2d"), pTime->GetMonth(), pTime->GetDay(),
00323         pTime->GetYear(), pTime->GetHour(), pTime->GetSecond());
00324
00325     return strTime;
00326 }
00327
00328 CString CCJShell::GetFileSizeString(LPCTSTR lpszFileSize)
00329 {
00330     CString strFileSize(lpszFileSize);
00331
00332     UINT nSize = _ttoi(strFileSize);
00333     if (nSize == 0) return _T("0KB");
00334
00335     nSize /= 1000;
00336     if (nSize == 0) return _T("1KB");
00337
00338     strFileSize.Format(_T("%dKB"), nSize);
00339     return strFileSize;
00340 }
00341
00342 //
00343 // FUNCTIONS THAT DEAL WITH PIDLs
00344 //
00345
00346 LPITEMIDLIST CCJShell::Next(LPCITEMIDLIST pidl)
00347 {
00348    LPSTR lpMem=(LPSTR)pidl;
00349
00350    lpMem+=pidl->mkid.cb;
00351
00352    return (LPITEMIDLIST)lpMem;
00353 }
00354
00355 UINT CCJShell::GetSize(LPCITEMIDLIST pidl)
00356 {
00357     UINT cbTotal = 0;
00358     if (pidl)
00359     {
00360         cbTotal += sizeof(pidl->mkid.cb);       // Null terminator
00361         while (pidl->mkid.cb)
00362         {
00363             cbTotal += pidl->mkid.cb;
00364             pidl = Next(pidl);
00365         }
00366     }
00367
00368     return cbTotal;
00369 }
00370
00371 LPITEMIDLIST CCJShell::Create(UINT cbSize)
00372 {
00373     LPMALLOC lpMalloc;
00374     HRESULT  hr;
00375     LPITEMIDLIST pidl=NULL;
00376
00377     hr=SHGetMalloc(&lpMalloc);
00378
00379     if (FAILED(hr))
00380        return 0;
00381
00382     pidl=(LPITEMIDLIST)lpMalloc->Alloc(cbSize);
00383
00384     if (pidl)
00385         memset(pidl, 0, cbSize);      // zero-init for external task   alloc
00386
00387     if (lpMalloc) lpMalloc->Release();
00388
00389     return pidl;
00390 }
00391
00392 LPITEMIDLIST CCJShell::ConcatPidls(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
00393 {
00394     LPITEMIDLIST pidlNew;
00395     UINT cb1;
00396     UINT cb2;
00397
00398     if (pidl1)  //May be NULL
00399        cb1 = GetSize(pidl1) - sizeof(pidl1->mkid.cb);
00400     else
00401        cb1 = 0;
00402
00403     cb2 = GetSize(pidl2);
00404
00405     pidlNew = Create(cb1 + cb2);
00406     if (pidlNew)
00407     {
00408         if (pidl1)
00409            memcpy(pidlNew, pidl1, cb1);
00410         memcpy(((LPSTR)pidlNew) + cb1, pidl2, cb2);
00411     }
00412     return pidlNew;
00413 }
00414
00415 LPITEMIDLIST CCJShell::CopyITEMID(LPMALLOC lpMalloc, LPITEMIDLIST lpi)
00416 {
00417    LPITEMIDLIST lpiTemp;
00418
00419    lpiTemp=(LPITEMIDLIST)lpMalloc->Alloc(lpi->mkid.cb+sizeof(lpi->mkid.cb));
00420    CopyMemory((PVOID)lpiTemp, (CONST VOID *)lpi, lpi->mkid.cb+sizeof(lpi->mkid.cb));
00421
00422    return lpiTemp;
00423 }
00424
00425 BOOL CCJShell::GetName( LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPTSTR lpFriendlyName )
00426 {
00427    BOOL   bSuccess=TRUE;
00428    STRRET str;
00429
00430    if (NOERROR==lpsf->GetDisplayNameOf(lpi,dwFlags, &str))
00431    {
00432       switch (str.uType)
00433       {
00434          case STRRET_WSTR:
00435 #if defined( _UNICODE )
00436             _tcscpy( lpFriendlyName, str.pOleStr );
00437 #else
00438             WideCharToMultiByte(CP_ACP,                 // CodePage
00439                                 0,                     // dwFlags
00440                                 str.pOleStr,            // lpWideCharStr
00441                                 -1,                     // cchWideChar
00442                                 lpFriendlyName,         // lpMultiByteStr
00443                                 MAX_PATH,
00444                                 //sizeof(lpFriendlyName), // cchMultiByte, wrong. sizeof on a pointer, psk, psk
00445                                 NULL,                   // lpDefaultChar,
00446                                 NULL);                  // lpUsedDefaultChar
00447 #endif
00448              break;
00449
00450          case STRRET_OFFSET:
00451 #if defined( _UNICODE )
00452             MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, (LPSTR)lpi+str.uOffset,
00453                 -1, lpFriendlyName, MAX_PATH);
00454 #else
00455              _tcscpy(lpFriendlyName, (LPSTR)lpi+str.uOffset);
00456 #endif
00457             break;
00458
00459          case STRRET_CSTR:
00460 #if defined( _UNICODE )
00461             MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, str.cStr,
00462                 -1, lpFriendlyName, MAX_PATH);
00463 #else
00464              _tcscpy(lpFriendlyName, (LPSTR)str.cStr);
00465 #endif
00466              break;
00467
00468          default:
00469              bSuccess = FALSE;
00470              break;
00471       }
00472    }
00473    else
00474       bSuccess = FALSE;
00475
00476    return bSuccess;
00477 }
00478
00479 LPITEMIDLIST CCJShell::GetFullyQualPidl(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi)
00480 {
00481    TCHAR szBuff[MAX_PATH];
00482    OLECHAR szOleChar[MAX_PATH];
00483    LPSHELLFOLDER lpsfDeskTop;
00484    LPITEMIDLIST  lpifq;
00485    ULONG ulEaten, ulAttribs;
00486    HRESULT hr;
00487
00488     if( GetName(lpsf, lpi, SHGDN_FORPARSING, szBuff) == FALSE ) {
00489         return NULL;
00490     }
00491
00492    hr=SHGetDesktopFolder(&lpsfDeskTop);
00493
00494    if (FAILED(hr))
00495       return NULL;
00496
00497 #if defined( _UNICODE )
00498    hr=lpsfDeskTop->ParseDisplayName(NULL, NULL, szOleChar, &ulEaten,
00499         &lpifq, &ulAttribs );
00500 #else
00501    MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szBuff,
00502         -1, (USHORT*)szOleChar, sizeof(szOleChar));
00503
00504    hr=lpsfDeskTop->ParseDisplayName(NULL, NULL, szOleChar, &ulEaten,
00505         &lpifq, &ulAttribs );
00506 #endif
00507
00508    lpsfDeskTop->Release();
00509
00510    if (FAILED(hr))
00511       return NULL;
00512
00513    return lpifq;
00514 }
00515
00516 BOOL CCJShell::DoTheMenuThing(HWND hwnd, LPSHELLFOLDER lpsfParent,
00517      LPITEMIDLIST  lpi, LPPOINT lppt)
00518 {
00519     LPCONTEXTMENU lpcm;
00520     HRESULT       hr;
00521     TCHAR          szTemp[64];
00522     CMINVOKECOMMANDINFO cmi;
00523     int                 idCmd;
00524     CMenu               menu;
00525     BOOL                bSuccess=TRUE;
00526
00527     hr=lpsfParent->GetUIObjectOf(hwnd,
00528         1,  //Number of objects to get attributes of
00529         (const struct _ITEMIDLIST **)&lpi,
00530         IID_IContextMenu,
00531         0,
00532         (LPVOID *)&lpcm);
00533     if (SUCCEEDED(hr))
00534     {
00535        if (menu.CreatePopupMenu())
00536        {
00537           hr=lpcm->QueryContextMenu(menu, 0, 1, 0x7fff, CMF_EXPLORE);
00538           if (SUCCEEDED(hr))
00539           {
00540              idCmd=menu.TrackPopupMenu(
00541                 TPM_LEFTALIGN | TPM_RETURNCMD | TPM_RIGHTBUTTON,
00542                 lppt->x, lppt->y, CWnd::FromHandle(hwnd) );
00543
00544              if (idCmd)
00545              {
00546                 cmi.cbSize       = sizeof(CMINVOKECOMMANDINFO);
00547                 cmi.fMask        = 0;
00548                 cmi.hwnd         = hwnd;
00549                 cmi.lpVerb       = (LPCSTR)MAKEINTRESOURCE(idCmd-1);
00550                 cmi.lpParameters = NULL;
00551                 cmi.lpDirectory  = NULL;
00552                 cmi.nShow        = SW_SHOWNORMAL;
00553                 cmi.dwHotKey     = 0;
00554                 cmi.hIcon        = NULL;
00555
00556                 hr=lpcm->InvokeCommand(&cmi);
00557
00558                 if (!SUCCEEDED(hr))
00559                 {
00560                    wsprintf(szTemp, _T("InvokeCommand failed. hr=%lx"), hr);
00561                    AfxMessageBox(szTemp);
00562                 }
00563                 else
00564                 {
00565                     ::SendMessage(hwnd, WM_SHELL_NOTIFY,
00566                         NM_SH_SHELLMENU, (LPARAM)0);
00567                 }
00568              }
00569
00570           }
00571           else
00572              bSuccess = FALSE;
00573        }
00574        else
00575           bSuccess = FALSE;
00576
00577        lpcm->Release();
00578     }
00579     else
00580     {
00581        wsprintf(szTemp, _T("GetUIObjectOf failed! hr=%lx"), hr);
00582        AfxMessageBox(szTemp );
00583        bSuccess = FALSE;
00584     }
00585     return bSuccess;
00586 }
00587
00588 int CCJShell::GetIcon(LPITEMIDLIST lpi, UINT uFlags)
00589 {
00590     SHFILEINFO    sfi;
00591
00592     SHGetFileInfo((LPCTSTR)lpi, 0, &sfi,
00593         sizeof(SHFILEINFO), uFlags);
00594
00595     return sfi.iIcon;
00596 }
00597
00598 void CCJShell::GetNormalAndSelectedIcons(LPITEMIDLIST lpifq, LPTV_ITEM lptvitem)
00599 {
00600    //Note that we don't check the return value here because if GetIcon()
00601    //fails, then we're in big trouble...
00602
00603    lptvitem->iImage = GetIcon(lpifq, SHGFI_PIDL |
00604                               SHGFI_SYSICONINDEX |
00605                               SHGFI_SMALLICON);
00606
00607    lptvitem->iSelectedImage = GetIcon(lpifq, SHGFI_PIDL |
00608                                       SHGFI_SYSICONINDEX |
00609                                       SHGFI_SMALLICON |
00610                                       SHGFI_OPENICON);
00611
00612    return;
00613 }
00614
00615 LONG CCJShell::GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata)
00616 {
00617     HKEY hkey;
00618     LONG retval = RegOpenKeyEx(key, subkey, 0, KEY_QUERY_VALUE, &hkey);
00619
00620     if (retval == ERROR_SUCCESS) {
00621         long datasize = MAX_PATH;
00622         TCHAR data[MAX_PATH];
00623         RegQueryValue(hkey, NULL, data, &datasize);
00624         _tcscpy(retdata,data);
00625         RegCloseKey(hkey);
00626     }
00627
00628     return retval;
00629 }
00630
00631 HINSTANCE CCJShell::ShellExec(LPCTSTR lpszExec, int nShow)
00632 {
00633     TCHAR key[MAX_PATH + MAX_PATH];
00634
00635     // First try ShellExecute()
00636     HINSTANCE result = ShellExecute(NULL, _T("open"), lpszExec, NULL,NULL, nShow);
00637
00638     // If it failed, get the .htm regkey and lookup the program
00639     if ((UINT)result <= HINSTANCE_ERROR) {
00640
00641         if (GetRegKey(HKEY_CLASSES_ROOT, _T(".htm"), key) == ERROR_SUCCESS) {
00642             lstrcat(key, _T("\\shell\\open\\command"));
00643
00644             if (GetRegKey(HKEY_CLASSES_ROOT,key,key) == ERROR_SUCCESS) {
00645                 TCHAR *pos;
00646                 pos = _tcsstr(key, _T("\"%1\""));
00647                 if (pos == NULL) {                     // No quotes found
00648                     pos = _tcsstr(key, _T("%1"));       // Check for %1, without quotes
00649                     if (pos == NULL)                   // No parameter at all...
00650                         pos = key+_tcslen(key)-1;
00651                     else
00652                         *pos = _T('\0');                   // Remove the parameter
00653                 }
00654                 else
00655                     *pos = _T('\0');                       // Remove the parameter
00656
00657                 lstrcat(pos, _T(" "));
00658                 lstrcat(pos, lpszExec);
00659                 PROCESS_INFORMATION pi;
00660
00661                 STARTUPINFO         si;
00662
00663                 ::ZeroMemory( &si, sizeof( si ));
00664
00665                 si.cb = sizeof( si );
00666
00667                 if( ::CreateProcess( NULL,
00668                                      pos,
00669                                      NULL,
00670                                      NULL,
00671                                      FALSE,
00672                                      0,
00673                                      NULL,
00674                                      NULL,
00675                                      &si,
00676                                     &pi ) == FALSE )
00677                 {
00678                     return NULL;
00679                 }
00680
00681                 result = (HINSTANCE) pi.hProcess;
00682             }
00683         }
00684     }
00685
00686     return result;
00687 }
00688
00689 void CCJShell::SplitPath(CString strFileName, char* szDrive, char* szDir, char* szFile, char* szExt)
00690 {
00691 #if defined( _UNICODE )
00692     char szFileName[ MAX_PATH ];
00693     ::WideCharToMultiByte( CP_ACP, 0, strFileName, -1,
00694         szFileName, MAX_PATH, NULL, NULL );
00695     _splitpath( szFileName, szDrive, szDir, szFile, szExt );
00696 #else
00697     _splitpath( strFileName, szDrive, szDir, szFile, szExt );
00698 #endif
00699 }
00700
00702 // New Context menu functions
00704
00705 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00706 //
00707 //  FUNCTION:       DuplicateItem
00708 //
00709 //  DESCRIPTION:    Makes a copy of the next item in an item ID list.
00710 //
00711 //  INPUT:          pMalloc = Pointer to an IMalloc interface.
00712 //                  pidl    = Pointer to an item ID list.
00713 //
00714 //  RETURNS:        Pointer to an ITEMIDLIST containing the copied item ID.
00715 //
00716 //  NOTES:          It is the caller's responsibility to free the memory
00717 //                  allocated by this function when the item ID is no longer
00718 //                  needed. Example:
00719 //
00720 //                    pidlItem = DuplicateItem (pMalloc, pidl);
00721 //                      .
00722 //                      .
00723 //                      .
00724 //                    pMalloc->Free (pMalloc, pidlItem);
00725 //
00726 //                  Failure to free the ITEMIDLIST will result in memory
00727 //                  leaks.
00728 //
00729 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00730
00731 LPITEMIDLIST CCJShell::DuplicateItem (LPMALLOC pMalloc, LPITEMIDLIST pidl)
00732 {
00733     USHORT nLen;
00734     LPITEMIDLIST pidlNew;
00735
00736     nLen = pidl->mkid.cb;
00737     if (nLen == 0)
00738         return NULL;
00739
00740     pidlNew = (LPITEMIDLIST) pMalloc->Alloc (nLen + sizeof (USHORT));
00741     if (pidlNew == NULL)
00742         return NULL;
00743
00744     CopyMemory (pidlNew, pidl, nLen);
00745     *((USHORT*) (((LPBYTE) pidlNew) + nLen)) = 0;
00746
00747     return pidlNew;
00748 }
00749
00750 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00751 //
00752 //  FUNCTION:       GetNextItem
00753 //
00754 //  DESCRIPTION:    Finds the next item in an item ID list.
00755 //
00756 //  INPUT:          pidl = Pointer to an item ID list.
00757 //
00758 //  RETURNS:        Pointer to the next item.
00759 //
00760 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00761
00762 LPITEMIDLIST CCJShell::GetNextItem (LPITEMIDLIST pidl)
00763 {
00764     USHORT nLen;
00765
00766     if ((nLen = pidl->mkid.cb) == 0)
00767         return NULL;
00768
00769     return (LPITEMIDLIST) (((LPBYTE) pidl) + nLen);
00770 }
00771
00772 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00773 //
00774 //  FUNCTION:       GetItemCount
00775 //
00776 //  DESCRIPTION:    Computes the number of item IDs in an item ID list.
00777 //
00778 //  INPUT:          pidl = Pointer to an item ID list.
00779 //
00780 //  RETURNS:        Number of item IDs in the list.
00781 //
00782 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00783
00784 UINT CCJShell::GetItemCount (LPITEMIDLIST pidl)
00785 {
00786     USHORT nLen;
00787     UINT nCount;
00788
00789     nCount = 0;
00790     while ((nLen = pidl->mkid.cb) != 0) {
00791         pidl = GetNextItem (pidl);
00792         nCount++;
00793     }
00794     return nCount;
00795 }
00796
00797 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00798 //
00799 //  FUNCTION:       DoExplorerMenu
00800 //
00801 //  DESCRIPTION:    Given a path name to a file or folder object, displays
00802 //                  the shell's context menu for that object and executes
00803 //                  the menu command (if any) selected by the user.
00804 //
00805 //  INPUT:          hwnd    = Handle of the window in which the menu will be
00806 //                            displayed.
00807 //
00808 //                  pszPath = Pointer to an ANSI or Unicode string
00809 //                            specifying the path to the object.
00810 //
00811 //                  point   = x and y coordinates of the point where the
00812 //                            menu's upper left corner should be located, in
00813 //                            client coordinates relative to hwnd.
00814 //
00815 //  RETURNS:        TRUE if successful, FALSE if not.
00816 //
00817 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00818
00819 BOOL CCJShell::DoExplorerMenu (HWND hwnd, LPCTSTR pszPath, POINT point)
00820 {
00821     LPMALLOC pMalloc;
00822     LPSHELLFOLDER psfFolder, psfNextFolder;
00823     LPITEMIDLIST pidlMain, pidlItem, pidlNextItem, *ppidl;
00824     LPCONTEXTMENU pContextMenu;
00825     CMINVOKECOMMANDINFO ici;
00826     ULONG ulCount, ulAttr;
00827     TCHAR tchPath[MAX_PATH];
00828     WCHAR wchPath[MAX_PATH];
00829     UINT nCount, nCmd;
00830     BOOL bResult;
00831     HMENU hMenu;
00832
00833     //
00834     // Make sure the file name is fully qualified and in Unicode format.
00835     //
00836     GetFullPathName (pszPath, sizeof (tchPath) / sizeof (TCHAR), tchPath, NULL);
00837
00838 #if defined( _UNICODE )
00839     _tcscpy( wchPath, tchPath );
00840 #else
00841     MultiByteToWideChar (CP_ACP, 0, pszPath, -1, wchPath,
00842         sizeof (wchPath) / sizeof (WCHAR));
00843 #endif
00844
00845     //
00846     // Get pointers to the shell's IMalloc interface and the desktop's
00847     // IShellFolder interface.
00848     //
00849     bResult = FALSE;
00850
00851     if (!SUCCEEDED (SHGetMalloc (&pMalloc)))
00852         return bResult;
00853
00854     if (!SUCCEEDED (SHGetDesktopFolder (&psfFolder))) {
00855         pMalloc->Release();
00856         return bResult;
00857     }
00858
00859     //
00860     // Convert the path name into a pointer to an item ID list (pidl).
00861     //
00862     if (SUCCEEDED (psfFolder->ParseDisplayName (hwnd,
00863         NULL, wchPath, &ulCount, &pidlMain, &ulAttr)) && (pidlMain != NULL))
00864     {
00865         nCount = GetItemCount (pidlMain);
00866
00867         if (nCount) // nCount must be > 0
00868         {
00869             //
00870             // Initialize psfFolder with a pointer to the IShellFolder
00871             // interface of the folder that contains the item whose context
00872             // menu we're after, and initialize pidlItem with a pointer to
00873             // the item's item ID. If nCount > 1, this requires us to walk
00874             // the list of item IDs stored in pidlMain and bind to each
00875             // subfolder referenced in the list.
00876             //
00877             pidlItem = pidlMain;
00878
00879             while (nCount)
00880             {
00881                 --nCount;
00882
00883                 //
00884                 // Create a 1-item item ID list for the next item in pidlMain.
00885                 //
00886                 pidlNextItem = DuplicateItem (pMalloc, pidlItem);
00887                 if (pidlNextItem == NULL) {
00888                     pMalloc->Free (pidlMain);
00889                     psfFolder->Release();
00890                     pMalloc->Release();
00891                     return bResult;
00892                 }
00893
00894                 //
00895                 // Bind to the folder specified in the new item ID list.
00896                 //
00897                 if (!SUCCEEDED (psfFolder->BindToObject (
00898                     pidlNextItem, NULL, IID_IShellFolder, (LPVOID*)&psfNextFolder))) {
00899                     pMalloc->Free (pidlNextItem);
00900                     pMalloc->Free (pidlMain);
00901                     psfFolder->Release ();
00902                     pMalloc->Release ();
00903                     return bResult;
00904                 }
00905
00906                 //
00907                 // Release the IShellFolder pointer to the parent folder
00908                 // and set psfFolder equal to the IShellFolder pointer for
00909                 // the current folder.
00910                 //
00911                 psfFolder->Release ();
00912                 psfFolder = psfNextFolder;
00913
00914                 //
00915                 // Release the storage for the 1-item item ID list we created
00916                 // just a moment ago and initialize pidlItem so that it points
00917                 // to the next item in pidlMain.
00918                 //
00919                 pMalloc->Free (pidlNextItem);
00920                 pidlItem = GetNextItem (pidlItem);
00921             }
00922
00923             //
00924             // Get a pointer to the item's IContextMenu interface and call
00925             // IContextMenu::QueryContextMenu to initialize a context menu.
00926             //
00927             ppidl = &pidlItem;
00928             if (SUCCEEDED (psfFolder->GetUIObjectOf (
00929                 hwnd, 1, (const struct _ITEMIDLIST **)ppidl, IID_IContextMenu, NULL, (LPVOID*)&pContextMenu))) {
00930
00931                 hMenu = CreatePopupMenu ();
00932                 if (SUCCEEDED (pContextMenu->QueryContextMenu (
00933                     hMenu, 0, 1, 0x7FFF, CMF_EXPLORE))) {
00934
00935                     //
00936                     // Display the context menu.
00937                     //
00938                     nCmd = TrackPopupMenu (hMenu, TPM_LEFTALIGN |
00939                         TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD,
00940                         point.x, point.y, 0, hwnd, NULL);
00941
00942                     //
00943                     // If a command was selected from the menu, execute it.
00944                     //
00945                     if (nCmd) {
00946                         ici.cbSize          = sizeof (CMINVOKECOMMANDINFO);
00947                         ici.fMask           = 0;
00948                         ici.hwnd            = hwnd;
00949                         ici.lpVerb          = (LPCSTR)MAKEINTRESOURCE (nCmd - 1);
00950                         ici.lpParameters    = NULL;
00951                         ici.lpDirectory     = NULL;
00952                         ici.nShow           = SW_SHOWNORMAL;
00953                         ici.dwHotKey        = 0;
00954                         ici.hIcon           = NULL;
00955
00956                         if (SUCCEEDED (
00957                             pContextMenu->InvokeCommand (&ici)))
00958                             bResult = TRUE;
00959                     }
00960                 }
00961                 DestroyMenu (hMenu);
00962                 pContextMenu->Release ();
00963             }
00964         }
00965         pMalloc->Free (pidlMain);
00966     }
00967
00968     //
00969     // Clean up and return.
00970     //
00971     psfFolder->Release ();
00972     pMalloc->Release ();
00973
00974     return bResult;
00975 }
00976
00977 #endif // (_WIN32_IE >= 0x0400)
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/KeywordComboBox.cpp Source File

common/KeywordComboBox.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- November 2002
00019  */
00020
00021 // KeywordComboBox.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "KeywordComboBox.h"
00026
00027 #ifdef _DEBUG
00028 #define new DEBUG_NEW
00029 #undef THIS_FILE
00030 static char THIS_FILE[] = __FILE__;
00031 #endif
00032
00034 struct keywordMode
00035 {
00036   const char* mode;
00037   const char* desc;
00038 };
00039
00040 #define KEYWORD_MODE_COUNT 8
00041
00043 static struct keywordMode gKeywordModes[KEYWORD_MODE_COUNT] = {
00044     {"",        "Current"},
00045     {"-kkv",    "Default"},
00046     {"-kkvl",   "Default with locker's name"},
00047     {"-kk",     "Only keyword names"},
00048     {"-ko",     "Disable"},
00049     {"-kb",     "Binary"},
00050     {"-ku",     "Unicode"},
00051     {"-kv",     "Only keyword values"}
00052 };
00053
00054 #ifdef WIN32
00055
00057 // CKeywordComboBox
00058
00059 CKeywordComboBox::CKeywordComboBox()
00060     : CSmartComboBox(USmartCombo::AutoDropWidth)
00061 {
00062     m_hDesc = NULL;
00063 }
00064
00065 CKeywordComboBox::~CKeywordComboBox()
00066 {
00067 }
00068
00069
00070 BEGIN_MESSAGE_MAP(CKeywordComboBox, CSmartComboBox)
00071     //{{AFX_MSG_MAP(CKeywordComboBox)
00072     ON_CONTROL_REFLECT(CBN_SELCHANGE, OnSelchange)
00073     //}}AFX_MSG_MAP
00074 END_MESSAGE_MAP()
00075
00077 // CKeywordComboBox message handlers
00078
00080 void CKeywordComboBox::OnSelchange()
00081 {
00082     SetDescription();
00083 }
00084
00089 void CKeywordComboBox::SetDescription()
00090 {
00091     if( m_hDesc && ::IsWindow(m_hDesc) )
00092     {
00093         const char* desc = gKeywordModes[0].desc;
00094         const int selItem = GetCurSel();
00095         if( selItem > -1 )
00096         {
00097             desc = (const char*)GetItemData(selItem);
00098         }
00099
00100         ::SetWindowText(m_hDesc, desc);
00101     }
00102 }
00103
00109 void CKeywordComboBox::SetDescriptionWnd(HWND hDesc)
00110 {
00111     m_hDesc = hDesc;
00112     SetDescription();
00113 }
00114
00116 void CKeywordComboBox::PreSubclassWindow()
00117 {
00118     CSmartComboBox::PreSubclassWindow();
00119
00120     for(int nIndex = 0; nIndex < KEYWORD_MODE_COUNT; nIndex++)
00121     {
00122         const int itemIndex = AddString(gKeywordModes[nIndex].mode);
00123         if( itemIndex > -1 )
00124         {
00125             SetItemData(itemIndex, (DWORD)gKeywordModes[nIndex].desc);
00126         }
00127     }
00128 }
00129
00130 #endif /* WIN32 */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPseudoFakePane Member List

This is the complete list of members for UPseudoFakePane, including all inherited members.

ActivateSelf() | UPseudoFakePane | [protected, virtual]
AdaptToSuperFrameSize(SInt32 inSurrWidthDelta, SInt32 inSurrHeightDelta, Boolean inRefresh) | UPseudoFakePane | [virtual]
DeactivateSelf() | UPseudoFakePane | [protected, virtual]
m_Attach | UPseudoFakePane | [protected]
UPseudoFakePane(const SPaneInfo &inPaneInfo, LPseudoWinAttachment *inAttach) | UPseudoFakePane |
~UPseudoFakePane() | UPseudoFakePane | [virtual]

Generated on Sat Aug 7 22:55:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CStatus_MAIN Member List

This is the complete list of members for CStatus_MAIN, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CStatus_MAIN(bool noRecurs, STATUSOUTPUT_TYPE outputType) | CStatus_MAIN |
DoDataExchange(CDataExchange *pDX) | CStatus_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CStatus_MAIN |
InitHelpID() | CStatus_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_noRecurs | CStatus_MAIN |
m_outputType | CStatus_MAIN |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CStatus_MAIN() | CStatus_MAIN |

Generated on Sat Aug 7 22:56:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewModel.cpp Source File

common/BrowseViewModel.cpp

Go to the documentation of this file.
00001  /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 #include "stdafx.h"
00018
00019 #include "BrowseViewModel.h"
00020 #include "Persistent.h"
00021 #include "CvsEntries.h"
00022 #include "BrowseViewColumn.h"
00023
00024 #if qMacPP
00025 #   include "MacMisc.h"
00026 #endif
00027
00028 static CPersistentBool gViewChanged("P_ViewChanged", false, kAddSettings);
00029 static CPersistentBool gViewAdded("P_ViewAdded", false, kAddSettings);
00030 static CPersistentBool gViewRemoved("P_ViewRemoved", false, kAddSettings);
00031 static CPersistentBool gViewConflicts("P_ViewConflicts", false, kAddSettings);
00032 static CPersistentBool gViewUnknown("P_ViewUnknown", false, kAddSettings);
00033 static CPersistentBool gViewHideUnknown("P_ViewHideUnknown", false, kAddSettings);
00034 static CPersistentBool gViewMissing("P_ViewMissing", false, kAddSettings);
00035 static CPersistentBool gViewHideMissing("P_ViewHideMissing", false, kAddSettings);
00036
00037 static CPersistentBool gDisplayRecursive("P_DisplayRecursive", false, kAddSettings);
00038
00039 static CPersistentBool gFileViewIgnore("P_FileViewIgnore", true, kAddSettings);
00040
00041 static CPersistentBool gFilterMasksEnable("P_FilterMasksEnable", true, kAddSettings);
00042
00044 // NotificationManager
00045
00046 NotificationManager::NotificationManager()
00047 {
00048 }
00049
00051 NotificationManager::Node::Node()
00052     : observer(NULL), handler(NULL)
00053 {
00054 }
00055
00057 NotificationManager::Node::Node(CObject* o, FNOBSERVER h)
00058     : observer(o), handler(h)
00059 {
00060 }
00061
00062 NotificationManager::Node::Node(const Node& n)
00063 {
00064     observer = n.observer;
00065     handler = n.handler;
00066 }
00067
00068 NotificationManager::Node& NotificationManager::Node::operator=(const Node& n)
00069 {
00070     observer = n.observer;
00071     handler = n.handler;
00072     return *this;
00073 }
00074
00076 void NotificationManager::CheckIn(CObject* observer, FNOBSERVER handler)
00077 {
00078     m_nodes.push_back(Node(observer, handler));
00079 }
00080
00082 void NotificationManager::CheckOut(CObject* observer)
00083 {
00084     for(std::vector<Node>::iterator i = m_nodes.begin(); i != m_nodes.end(); i++)
00085     {
00086         if( (*i).observer == observer )
00087         {
00088             m_nodes.erase(i);
00089             break;
00090         }
00091     }
00092 }
00093
00095 void NotificationManager::NotifyAll()
00096 {
00097     for(std::vector<Node>::iterator i = m_nodes.begin(); i != m_nodes.end(); i++)
00098     {
00099         // Make a local copy so that observers can freely unregister during the process
00100         Node& node = *i;
00101         node.handler(node.observer);
00102     }
00103 }
00104
00106 // KoFilterMask
00107
00113 bool KoFilterMask::SetMask(const char* mask)
00114 {
00115     bool changed = m_mask.empty() || stricmp(m_mask.c_str(), mask) != 0;
00116     if( changed )
00117     {
00118         m_mask = mask;
00119         m_tokens.clear();
00120
00121         if( !m_mask.empty() )
00122         {
00123             // Build token list
00124             char* buffer = strdup(mask);
00125             static const char separators[] = FILTER_TOKEN_SEPARATORS;
00126
00127             for(char* token = strtok(buffer, separators); token; token = strtok(NULL, separators))
00128             {
00129                 m_tokens.push_back(UStr(token));
00130             }
00131
00132             free(buffer);
00133         }
00134     }
00135
00136     if( m_mask.empty() )
00137     {
00138         m_tokens.clear();
00139     }
00140
00141     return changed;
00142 }
00143
00153 bool KoFilterMask::IsMatch(const int type, const EntnodeData* data, const KoColumnContext* context) const
00154 {
00155     bool res = false;
00156
00157     switch( type )
00158     {
00159     case ColumnIndex::kName:
00160         if( MatchIgnoredList(data->GetName(), m_tokens) )
00161         {
00162             res = true;
00163         }
00164         break;
00165     case ColumnIndex::kExtention:
00166         if( MatchIgnoredList(data->GetExtension(), m_tokens) )
00167         {
00168             res = true;
00169         }
00170         break;
00171     case ColumnIndex::kRevision:
00172         {
00173             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00174             if( node )
00175             {
00176                 if( MatchIgnoredList((*node)[EntnodeFile::kVN], m_tokens) )
00177                 {
00178                     res = true;
00179                 }
00180             }
00181         }
00182         break;
00183     case ColumnIndex::kOption:
00184         {
00185             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00186             if( node )
00187             {
00188                 if( MatchIgnoredList((*node)[EntnodeFile::kOption], m_tokens) )
00189                 {
00190                     res = true;
00191                 }
00192             }
00193         }
00194         break;
00195     case ColumnIndex::kEncoding:
00196         {
00197             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00198             if( node )
00199             {
00200                 if( MatchIgnoredList((*node)[EntnodeFile::kEncoding], m_tokens) )
00201                 {
00202                     res = true;
00203                 }
00204             }
00205         }
00206         break;
00207     case ColumnIndex::kState:
00208         if( MatchIgnoredList((*data)[EntnodeData::kState], m_tokens) )
00209         {
00210             res = true;
00211         }
00212         break;
00213     case ColumnIndex::kStickyTag:
00214         {
00215             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00216             if( node )
00217             {
00218                 if( MatchIgnoredList((*node)[EntnodeFile::kTag], m_tokens) )
00219                 {
00220                     res = true;
00221                 }
00222             }
00223         }
00224         break;
00225     case ColumnIndex::kTimeStamp:
00226         {
00227             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00228             if( node )
00229             {
00230                 if( MatchIgnoredList((*node)[EntnodeFile::kTS], m_tokens) )
00231                 {
00232                     res = true;
00233                 }
00234             }
00235         }
00236         break;
00237     case ColumnIndex::kConflict:
00238         if( MatchIgnoredList(data->GetConflict(), m_tokens) )
00239         {
00240             res = true;
00241         }
00242         break;
00243     case ColumnIndex::kPath:
00244         {
00245             const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00246             if( node )
00247             {
00248                 if( MatchIgnoredList(node->GetRelativePath(context), m_tokens) )
00249                 {
00250                     res = true;
00251                 }
00252             }
00253         }
00254         break;
00255     default:
00256         // Nothing to do
00257         break;
00258     }
00259
00260     return res;
00261 }
00262
00267 bool KoFilterMask::Empty() const
00268 {
00269     return m_tokens.empty();
00270 }
00271
00273 // KoFilterModel
00274
00275 KoFilterModel::KoFilterModel()
00276     : m_filters(kFilterNone), m_context(NULL)
00277 {
00278 }
00279
00280 KoFilterModel::~KoFilterModel()
00281 {
00282     delete m_context;
00283 }
00284
00285 void KoFilterModel::LoadSettings()
00286 {
00287     m_filters = kFilterNone;
00288
00289     m_filters |= gViewChanged       ? kFilterChanged : 0;
00290     m_filters |= gViewAdded         ? kFilterAdded : 0;
00291     m_filters |= gViewRemoved       ? kFilterRemoved : 0;
00292     m_filters |= gViewConflicts     ? kFilterConflicts : 0;
00293     m_filters |= gViewMissing       ? kFilterMissing : 0;
00294     m_filters |= gViewHideMissing   ? kFilterHideMissing : 0;
00295     m_filters |= gViewUnknown       ? kFilterUnknown : 0;
00296     m_filters |= gViewHideUnknown   ? kFilterHideUnknown : 0;
00297
00298     m_filterMasksEnable = gFilterMasksEnable;
00299 }
00300
00301 void KoFilterModel::SaveSettings()
00302 {
00303     gViewChanged        = HasFilter(kFilterChanged);
00304     gViewAdded      = HasFilter(kFilterAdded);
00305     gViewRemoved        = HasFilter(kFilterRemoved);
00306     gViewConflicts      = HasFilter(kFilterConflicts);
00307     gViewMissing        = HasFilter(kFilterMissing);
00308     gViewHideMissing    = HasFilter(kFilterHideMissing);
00309     gViewUnknown        = HasFilter(kFilterUnknown);
00310     gViewHideUnknown    = HasFilter(kFilterHideUnknown);
00311
00312     gFilterMasksEnable = m_filterMasksEnable;
00313 }
00314
00315 NotificationManager* KoFilterModel::GetNotificationManager()
00316 {
00317     return &m_manager;
00318 }
00319
00321 bool KoFilterModel::IsDefaultMode() const
00322 {
00323     return !((kFilterConflicts | kFilterChanged | kFilterMissing | kFilterAdded | kFilterRemoved) & m_filters);
00324 }
00325
00326 bool KoFilterModel::IsMatch(const EntnodeData* data) const
00327 {
00328     if( m_filterMasksEnable )
00329     {
00330         // Check to see if any filter matches
00331         for(FilterMaskContainer::const_iterator i = m_filterMask.begin(); i != m_filterMask.end(); ++i)
00332         {
00333             if( !(*i).second.Empty() && !(*i).second.IsMatch((*i).first, data, m_context) )
00334             {
00335                 return false;
00336             }
00337         }
00338     }
00339
00340     if( IsDefaultMode() && !HasFilter(kFilterUnknown) )
00341     {
00342         // Check if unknown files are to be hidden
00343         if( data->IsUnknown() && HasFilter(kFilterHideUnknown) )
00344         {
00345             // Unknown item match
00346             return false;
00347         }
00348
00349         if( data->IsMissing() && HasFilter(kFilterHideMissing) )
00350         {
00351             // Hide missing item match
00352             return false;
00353         }
00354
00355         return true;
00356     }
00357
00358     if( data->IsMissing() && data->IsRemoved() && HasFilter(kFilterRemoved) )
00359     {
00360         // Removed item match
00361         return true;
00362     }
00363
00364     if( data->IsMissing() && !data->IsRemoved() && HasFilter(kFilterMissing) )
00365     {
00366         // Missing item match
00367         return true;
00368     }
00369
00370     if( data->IsUnknown() && HasFilter(kFilterUnknown) )
00371     {
00372         // Unknown item match
00373         return true;
00374     }
00375
00376     if( (data->GetConflict() != NULL) && HasFilter(kFilterConflicts) )
00377     {
00378         // Conflict match
00379         return true;
00380     }
00381
00382     if( !data->IsUnmodified() )
00383     {
00384         // Can be either changed or added
00385         const char* vn = (*data)[EntnodeFile::kVN];
00386         const bool isAdded = vn && (strcmp(vn, "0") == 0);
00387
00388         if( isAdded && HasFilter(kFilterAdded) )
00389         {
00390             // Added file match
00391             return true;
00392         }
00393
00394         if( !isAdded && HasFilter(kFilterChanged) && !data->GetConflict() )
00395         {
00396             // Changed file match
00397             return true;
00398         }
00399     }
00400
00401     // No match
00402     return false;
00403 }
00404
00410 bool KoFilterModel::HasFilters() const
00411 {
00412     return kFilterNone != m_filters;
00413 }
00414
00419 bool KoFilterModel::HasAnyModified() const
00420 {
00421     return kFilterNone != (kFilterModified & m_filters);
00422 }
00423
00427 void KoFilterModel::ClearAll()
00428 {
00429     m_filters = kFilterNone;
00430 }
00431
00433 void KoFilterModel::ToggleModified()
00434 {
00435     if( IsModified() )
00436     {
00437         m_filters &= ~kFilterModified;
00438     }
00439     else
00440     {
00441         m_filters |= kFilterModified;
00442     }
00443 }
00444
00446 bool KoFilterModel::IsModified() const
00447 {
00448     return (kFilterModified & m_filters) == kFilterModified;
00449 }
00450
00451 int KoFilterModel::GetFilters() const
00452 {
00453     return m_filters;
00454 }
00455
00457 void KoFilterModel::ToggleFilterMasksEnable()
00458 {
00459     m_filterMasksEnable = !m_filterMasksEnable;
00460 }
00461
00463 bool KoFilterModel::IsFilterMasksEnable() const
00464 {
00465     return m_filterMasksEnable;
00466 }
00467
00472 bool KoFilterModel::HasFilterMasks() const
00473 {
00474     return m_filterMask.size() > 0;
00475 }
00476
00483 bool KoFilterModel::SetMask(int type, const char* mask)
00484 {
00485     bool res = false;
00486
00487     if ( mask == NULL ) mask = ""; // safeguard arguments
00488
00489     FilterMaskContainer::iterator i = m_filterMask.find(type);
00490     if( i != m_filterMask.end() )
00491     {
00492         res = (*i).second.SetMask(mask);
00493
00494         if( (*i).second.Empty() )
00495         {
00496             // Empty mask can be removed
00497             m_filterMask.erase(i);
00498         }
00499     }
00500     else
00501     {
00502         KoFilterMask filterMask;
00503         filterMask.SetMask(mask);
00504
00505         if( !filterMask.Empty() )
00506         {
00507             m_filterMask.insert(std::make_pair(type, filterMask));
00508             res = true;
00509         }
00510     }
00511
00512     return res;
00513 }
00514
00519 void KoFilterModel::SetContext(const KoColumnContext* context)
00520 {
00521     if( context )
00522     {
00523         delete m_context;
00524         m_context = new KoColumnContext(context->GetPath());
00525     }
00526 }
00527
00529 bool KoFilterModel::HasFilter(const int filter) const
00530 {
00531     return (m_filters & filter) != 0;
00532 }
00533
00535 void KoFilterModel::ToggleFilter(int filter)
00536 {
00537     if( HasFilter(filter) )
00538     {
00539         m_filters &= ~filter;
00540     }
00541     else
00542     {
00543         m_filters |= filter;
00544     }
00545 }
00546
00548 void KoFilterModel::ToggleConflict()
00549 {
00550     ToggleFilter(kFilterConflicts);
00551 }
00552
00554 bool KoFilterModel::IsConflict() const
00555 {
00556     return HasFilter(kFilterConflicts);
00557 }
00558
00560 void KoFilterModel::ToggleUnknown()
00561 {
00562     ToggleFilter(kFilterUnknown);
00563
00564     if( HasFilter(kFilterUnknown) )
00565     {
00566         m_filters &= ~kFilterHideUnknown;
00567     }
00568 }
00569
00571 bool KoFilterModel::IsUnknown() const
00572 {
00573     return HasFilter(kFilterUnknown);
00574 }
00575
00577 void KoFilterModel::ToggleHideUnknown()
00578 {
00579     ToggleFilter(kFilterHideUnknown);
00580
00581     if( HasFilter(kFilterHideUnknown) )
00582     {
00583         m_filters &= ~kFilterUnknown;
00584     }
00585 }
00586
00588 bool KoFilterModel::IsHideUnknown() const
00589 {
00590     return HasFilter(kFilterHideUnknown);
00591 }
00592
00594 void KoFilterModel::ToggleMissing()
00595 {
00596     ToggleFilter(kFilterMissing);
00597
00598     if( HasFilter(kFilterMissing) )
00599     {
00600         m_filters &= ~kFilterHideMissing;
00601     }
00602 }
00603
00605 bool KoFilterModel::IsMissing() const
00606 {
00607     return HasFilter(kFilterMissing);
00608 }
00609
00611 void KoFilterModel::ToggleHideMissing()
00612 {
00613     ToggleFilter(kFilterHideMissing);
00614
00615     if( HasFilter(kFilterHideMissing) )
00616     {
00617         m_filters &= ~kFilterMissing;
00618     }
00619 }
00620
00622 bool KoFilterModel::IsHideMissing() const
00623 {
00624     return HasFilter(kFilterHideMissing);
00625 }
00626
00628 void KoFilterModel::ToggleChanged()
00629 {
00630     ToggleFilter(kFilterChanged);
00631 }
00632
00634 bool KoFilterModel::IsChanged() const
00635 {
00636     return HasFilter(kFilterChanged);
00637 }
00638
00640 void KoFilterModel::ToggleAdded()
00641 {
00642     ToggleFilter(kFilterAdded);
00643 }
00644
00646 bool KoFilterModel::IsAdded() const
00647 {
00648     return HasFilter(kFilterAdded);
00649 }
00650
00652 void KoFilterModel::ToggleRemoved()
00653 {
00654     ToggleFilter(kFilterRemoved);
00655 }
00656
00658 bool KoFilterModel::IsRemoved() const
00659 {
00660     return HasFilter(kFilterRemoved);
00661 }
00662
00664 // KoRecursionModel
00665
00666 KoRecursionModel::KoRecursionModel()
00667     : m_isRecursive(false)
00668 {
00669 }
00670
00671 KoRecursionModel::~KoRecursionModel()
00672 {
00673 }
00674
00675 void KoRecursionModel::LoadSettings()
00676 {
00677     m_isRecursive = gDisplayRecursive;
00678 }
00679
00680 void KoRecursionModel::SaveSettings()
00681 {
00682     gDisplayRecursive = m_isRecursive;
00683 }
00684
00685 NotificationManager* KoRecursionModel::GetNotificationManager()
00686 {
00687     return &m_manager;
00688 }
00689
00691 bool KoRecursionModel::IsShowRecursive()
00692 {
00693     return m_isRecursive;
00694 }
00695
00697 void KoRecursionModel::ToggleRecursion()
00698 {
00699     m_isRecursive = !m_isRecursive;
00700 }
00701
00703 // KoIgnoreModel
00704
00705 KoIgnoreModel::KoIgnoreModel()
00706     : m_isIgnore(false)
00707 {
00708 }
00709
00710 KoIgnoreModel::~KoIgnoreModel()
00711 {
00712 }
00713
00714 void KoIgnoreModel::LoadSettings()
00715 {
00716     m_isIgnore = gFileViewIgnore;
00717 }
00718
00719 void KoIgnoreModel::SaveSettings()
00720 {
00721     gFileViewIgnore = m_isIgnore;
00722 }
00723
00724 NotificationManager* KoIgnoreModel::GetNotificationManager()
00725 {
00726     return &m_manager;
00727 }
00728
00730 bool KoIgnoreModel::IsShowIgnored()
00731 {
00732     return m_isIgnore;
00733 }
00734
00736 void KoIgnoreModel::ToggleIgnore()
00737 {
00738     m_isIgnore = !m_isIgnore;
00739 }
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJPagerCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJPagerCtrl.cpp

Go to the documentation of this file.
00001 // CJPagerCtrl.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2002/06/15 17:49:37 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJockey/CJLibrary/CJPagerCtrl.cpp $
00011  *
00012  * $History: CJPagerCtrl.cpp $
00013  *
00014  * *****************  Version 7  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/CJLibrary
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 6  *****************
00020  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00021  * Updated in $/CodeJockey/CJLibrary
00022  *
00023  * *****************  Version 5  *****************
00024  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00025  * Updated in $/CodeJockey/CJLibrary
00026  *
00027  * *****************  Version 4  *****************
00028  * User: Kirk Stowell Date: 6/14/99    Time: 10:44p
00029  * Updated in $/CodeJockey/CJ60Lib
00030  * Cleaned up code to eliminate level 4 compilier warnings.
00031  *
00032  * *****************  Version 3  *****************
00033  * User: Kirk Stowell Date: 4/03/99    Time: 10:45p
00034  * Updated in $/CodeJockey/CJ60Lib
00035  * Added comments and cleaned up code.
00036  *
00037  * *****************  Version 2  *****************
00038  * User: Kirk Stowell Date: 1/02/99    Time: 10:44p
00039  * Updated in $/CodeJockey/CJ60Lib
00040  * Cleaned up class source, wrapped all pager messages.
00041  *
00042  * *****************  Version 1  *****************
00043  * User: Kirk Stowell Date: 10/02/98   Time: 10:44p
00044  * Created in $/CodeJockey/CJ60Lib
00045  * First release version.
00046  *
00047  ***************************************************************************/
00049
00050 #include "stdafx.h"
00051 #include "CJPagerCtrl.h"
00052
00053 #ifdef _DEBUG
00054 #define new DEBUG_NEW
00055 #undef THIS_FILE
00056 static char THIS_FILE[] = __FILE__;
00057 #endif
00058
00060 // CCJPagerCtrl
00061
00062 CCJPagerCtrl::CCJPagerCtrl()
00063 {
00064    // initialize common controls
00065     INITCOMMONCONTROLSEX icex;
00066     icex.dwSize = sizeof(icex);
00067     icex.dwICC = ICC_PAGESCROLLER_CLASS;
00068     VERIFY(InitCommonControlsEx(&icex));
00069 }
00070
00071 CCJPagerCtrl::~CCJPagerCtrl()
00072 {
00073 }
00074
00075 IMPLEMENT_DYNAMIC(CCJPagerCtrl, CWnd)
00076
00077 BEGIN_MESSAGE_MAP(CCJPagerCtrl, CWnd)
00078     //{{AFX_MSG_MAP(CCJPagerCtrl)
00079     ON_NOTIFY_REFLECT_EX(PGN_SCROLL, OnPagerScroll)
00080     ON_NOTIFY_REFLECT_EX(PGN_CALCSIZE, OnPagerCalcSize)
00081     //}}AFX_MSG_MAP
00082 END_MESSAGE_MAP()
00083
00084 BOOL CCJPagerCtrl::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
00085 {
00086     CWnd* pWnd = this;
00087     return pWnd->Create(WC_PAGESCROLLER, NULL, dwStyle, rect, pParentWnd, nID);
00088 }
00089
00091 // CCJPagerCtrl message handlers
00092
00093 BOOL CCJPagerCtrl::OnPagerCalcSize(NMHDR* pNMPG, LRESULT* pResult)
00094 {
00095     NMPGCALCSIZE* pNMPGCalcSize = reinterpret_cast<NMPGCALCSIZE*>(pNMPG);
00096     switch(pNMPGCalcSize->dwFlag)
00097     {
00098     case PGF_CALCWIDTH:
00099         pNMPGCalcSize->iWidth = m_nWidth;
00100         break;
00101
00102     case PGF_CALCHEIGHT:
00103         pNMPGCalcSize->iHeight = m_nHeight;
00104         break;
00105     }
00106
00107     *pResult = 0;
00108     return FALSE;   // Let parent handle message
00109 }
00110
00111 BOOL CCJPagerCtrl::OnPagerScroll(NMHDR* /*pNMPGScroll*/, LRESULT* pResult)
00112 {
00113     *pResult = 0;
00114     return FALSE;   // Let parent handle message
00115 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HistComboBoxEx.h Source File

WinCvs/HistComboBoxEx.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- July 2001
00019  */
00020
00021 #if !defined(AFX_HISTCOMBOBOXEX_H__E330E7B9_8C79_44CB_8F07_01D395975365__INCLUDED_)
00022 #define AFX_HISTCOMBOBOXEX_H__E330E7B9_8C79_44CB_8F07_01D395975365__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // HistComboBoxEx.h : header file
00028 //
00029
00030 #define HISTLOC_IMAGE_CX        16
00031 #define HISTLOC_VISIBLEITEMS    8
00032
00034 enum
00035 {
00036     kLocationIconUnknown = 0,
00037     kLocationIcon,
00038     kLocationIconIgnored,
00039     kLocationIconMissing,
00040     kLocationIconErased
00041 };
00042
00044 // CHistComboBoxEx window
00045
00047 class CHistComboBoxEx : public CComboBoxEx, public USmartCombo
00048 {
00049 // Construction
00050 public:
00051     CHistComboBoxEx(int feature = USmartCombo::DefaultFeature);
00052     virtual ~CHistComboBoxEx();
00053
00054 // Attributes
00055 public:
00056
00057 // Operations
00058 public:
00059
00060 // Overrides
00061     // ClassWizard generated virtual function overrides
00062     //{{AFX_VIRTUAL(CHistComboBoxEx)
00063     public:
00064     virtual BOOL PreTranslateMessage(MSG* pMsg);
00065     protected:
00066     virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
00067     //}}AFX_VIRTUAL
00068
00069 // Implementation
00070 public:
00071
00072     // Generated message map functions
00073 protected:
00074     //{{AFX_MSG(CHistComboBoxEx)
00075     afx_msg void OnDropdown();
00076     //}}AFX_MSG
00077
00078     DECLARE_MESSAGE_MAP()
00079 private:
00080     // Data members
00081     CImageList m_imageList;
00083     // Methods
00084     virtual int CalcDroppedWidth();
00085     BOOL DelKeyTest(MSG* pMsg);
00086
00087 public:
00088     // Interface
00089     int AddString(LPCTSTR lpszString);
00090     int InsertString(int nIndex, LPCTSTR lpszString);
00091     BOOL SetIcon(COMBOBOXEXITEM cbi, bool showStatus);
00092
00093     const char* GetOldLoc();
00094     int NewRoot(const char* root);
00095     static CString FindBestRoot(CMString& strItems, const char* path, bool mustExist = false);
00096 };
00097
00099
00100 //{{AFX_INSERT_LOCATION}}
00101 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00102
00103 #endif // !defined(AFX_HISTCOMBOBOXEX_H__E330E7B9_8C79_44CB_8F07_01D395975365__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJTabView.cpp Source File

WinCvs/CJLib/CJLibrary/CJTabView.cpp

Go to the documentation of this file.
00001 // CJTabView.cpp: implementation file
00002 //
00003 // Copyright © 1999 Mike Manzo
00004 // mailto:mmanzo@ieee.org
00005 //
00007 /****************************************************************************
00008  *
00009  * $Date: 1999/11/30 21:45:49 $
00010  * $Revision: 1.1.1.3 $
00011  * $Archive: /CodeJock/CJLibrary/CJTabView.cpp $
00012  *
00013  * $History: CJTabView.cpp $
00014  *
00015  * *****************  Version 13  *****************
00016  * User: Kirk Stowell Date: 10/30/99   Time: 1:57p
00017  * Updated in $/CodeJock/CJLibrary
00018  * Overrode OnEraseBkgnd(...) for flicker free drawing.
00019  *
00020  * *****************  Version 12  *****************
00021  * User: Kirk Stowell Date: 10/24/99   Time: 3:15a
00022  * Updated in $/CodeJock/CJLibrary
00023  *
00024  * *****************  Version 11  *****************
00025  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00026  * Updated in $/CodeJock/CJLibrary
00027  * Fixed potential resource and memory leak problems.
00028  *
00029  * *****************  Version 10  *****************
00030  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00031  * Updated in $/CodeJock/CJLibrary
00032  * Added source control history to file header.
00033  *
00034  ***************************************************************************/
00036
00037 #include "stdafx.h"
00038 #include "CJTabView.h"
00039
00040 #ifdef _DEBUG
00041 #define new DEBUG_NEW
00042 #undef THIS_FILE
00043 static char THIS_FILE[] = __FILE__;
00044 #endif
00045
00047 // CCJTabView
00048 IMPLEMENT_DYNCREATE(CCJTabView, CCtrlView)
00049
00050 CCJTabView::CCJTabView() : CCtrlView(_T("SysTabControl32"),
00051     TCS_TOOLTIPS | WS_VISIBLE | WS_CHILD | WS_BORDER)
00052 {
00053     m_pTabCtrl = (CTabCtrl*) this;
00054     m_nActiveTab = 0;
00055 }
00056
00057 CCJTabView::~CCJTabView()
00058 {
00059     while(!m_views.IsEmpty()) {
00060         CTV_ITEM *pMember=m_views.RemoveTail();
00061         _delete(pMember);
00062     }
00063
00064     // fix potential resource leak - KStowell - 10-22-99.
00065     m_TabFont.DeleteObject();
00066 }
00067
00068 BEGIN_MESSAGE_MAP(CCJTabView, CCtrlView)
00069     //{{AFX_MSG_MAP(CCJTabView)
00070     ON_WM_WINDOWPOSCHANGED()
00071     ON_NOTIFY_REFLECT(TCN_SELCHANGE, OnSelchange)
00072     ON_WM_CREATE()
00073     ON_WM_ERASEBKGND()
00074     //}}AFX_MSG_MAP
00075 END_MESSAGE_MAP()
00076
00077
00079 // CCJTabView message handlers
00080 void CCJTabView::GetChildRect(CRect &rect)
00081 {
00082     m_pTabCtrl->GetClientRect(&rect);
00083 }
00084
00085 CView* CCJTabView::GetView(int nView)
00086 {
00087     ASSERT_VALID(this);
00088     ASSERT(nView >= 0);
00089
00090     if (nView!=-1) {
00091         CTV_ITEM *pMember=m_views.GetAt(m_views.FindIndex(nView));
00092         return (CView*)pMember->pWnd;
00093     }
00094     else
00095         return NULL;
00096 }
00097
00098 CView* CCJTabView::GetView(CRuntimeClass *pViewClass)
00099 {
00100     ASSERT_VALID(this);
00101     ASSERT(pViewClass != NULL);
00102     ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CWnd)));
00103     ASSERT(AfxIsValidAddress(pViewClass, sizeof(CRuntimeClass), FALSE));
00104
00105     for (POSITION pos=m_views.GetHeadPosition(); pos; m_views.GetNext(pos)) {
00106         CTV_ITEM *pMember=m_views.GetAt(pos);
00107         if (pMember->pWnd->IsKindOf(pViewClass)) {
00108             return (CView*)pMember->pWnd;
00109         }
00110     }
00111     return NULL;
00112 }
00113
00114 BOOL CCJTabView::ModifyTabStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags)
00115 {
00116     DWORD dwCurrentStyle = GetStyle();
00117
00118     // We are in horizontal mode...go vertical
00119     if ((dwAdd & TCS_VERTICAL) && !(dwCurrentStyle & TCS_VERTICAL)) {
00120         // Get the log font.
00121         NONCLIENTMETRICS ncm;
00122         ncm.cbSize = sizeof(NONCLIENTMETRICS);
00123         VERIFY(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
00124             sizeof(NONCLIENTMETRICS), &ncm, 0));
00125         // fix potential resource leak - KStowell - 10-22-99.
00126         m_TabFont.DeleteObject();
00127         ncm.lfMessageFont.lfOrientation = (dwAdd & TCS_RIGHT) ? 2700 : 900;
00128         ncm.lfMessageFont.lfEscapement  = (dwAdd & TCS_RIGHT) ? 2700 : 900;
00129         m_TabFont.CreateFontIndirect(&ncm.lfMessageFont);
00130         m_pTabCtrl->SetFont(&m_TabFont);
00131     }
00132     // We are in vertical mode....go horizontal
00133     else if ((dwCurrentStyle & TCS_VERTICAL) && !(dwAdd & TCS_VERTICAL)) {
00134         // Get the log font.
00135         NONCLIENTMETRICS ncm;
00136         ncm.cbSize = sizeof(NONCLIENTMETRICS);
00137         VERIFY(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
00138             sizeof(NONCLIENTMETRICS), &ncm, 0));
00139         // fix potential resource leak - KStowell - 10-22-99.
00140         m_TabFont.DeleteObject();
00141         ncm.lfMessageFont.lfOrientation = 0;
00142         ncm.lfMessageFont.lfEscapement  = 0;
00143         m_TabFont.CreateFontIndirect(&ncm.lfMessageFont);
00144         m_pTabCtrl->SetFont(&m_TabFont);
00145     }
00146
00147     return m_pTabCtrl->ModifyStyle(dwRemove, dwAdd, nFlags);
00148 }
00149
00150 // Determine where the views should be placed in the tab...
00151 void CCJTabView::CalcViewRect(CRect* pRect)
00152 {
00153     GetChildRect((*pRect));
00154     DWORD dwStyle = GetStyle();
00155
00156     if ((dwStyle & TCS_BOTTOM) && !(dwStyle & TCS_VERTICAL)) {      // Bottom
00157         (*pRect).top    += TABVIEW_BORDER;
00158         (*pRect).left   += TABVIEW_BORDER;
00159         (*pRect).right  -= TABVIEW_BORDER;
00160         (*pRect).bottom -= 26;
00161     }
00162     else if ((dwStyle & TCS_RIGHT) && (dwStyle & TCS_VERTICAL)) {   // Right
00163         (*pRect).top    += TABVIEW_BORDER;
00164         (*pRect).left   += TABVIEW_BORDER;
00165         (*pRect).right  -= 26;
00166         (*pRect).bottom -= TABVIEW_BORDER;
00167     }
00168     else if (dwStyle & TCS_VERTICAL) {                              // Left
00169         (*pRect).top    += TABVIEW_BORDER;
00170         (*pRect).left   += 26;
00171         (*pRect).right  -= TABVIEW_BORDER;
00172         (*pRect).bottom -= TABVIEW_BORDER;
00173     }
00174     else {                                                          // Top
00175         (*pRect).top    += 26;
00176         (*pRect).left   += TABVIEW_BORDER;
00177         (*pRect).right  -= TABVIEW_BORDER;
00178         (*pRect).bottom -= TABVIEW_BORDER;
00179     }
00180 }
00181
00182 void CCJTabView::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
00183 {
00184     CRect rcChild;
00185     CWnd *pWnd;
00186
00187     CalcViewRect(&rcChild);
00188     for (POSITION pos=m_views.GetHeadPosition(); pos; m_views.GetNext(pos)) {
00189         pWnd = m_views.GetAt(pos)->pWnd;
00190         pWnd->MoveWindow(rcChild);
00191     }
00192
00193     // *** LiangYiBin.Donald
00194     if( lpwndpos->flags & SWP_HIDEWINDOW ) {
00195         CFrameWnd* pFrame = GetParentFrame();
00196         POSITION pos = m_views.GetHeadPosition();
00197         while ( pos != NULL ) {
00198             // check whether the views in the controlbar are focused
00199             CTV_ITEM *pItem = (CTV_ITEM *) m_views.GetNext(pos);
00200             if ( pFrame != NULL && pFrame->GetActiveView() == pItem->pWnd ) {
00201                 // To avoid mainwindow freezing, we must deativate the view,
00202                 // because it's not visible now.
00203                 pFrame->SetActiveView(NULL);
00204             }
00205         }
00206     }
00207
00208     CCtrlView::OnWindowPosChanged(lpwndpos);
00209 }
00210
00211 void CCJTabView::RemoveView(int nView)
00212 {
00213     ASSERT_VALID(this);
00214     ASSERT(nView >= 0);
00215
00216     // remove the page from internal list
00217     m_views.RemoveAt(m_views.FindIndex(nView));
00218 }
00219
00220 void CCJTabView::SetActiveView(CRuntimeClass *pViewClass)
00221 {
00222     ASSERT_VALID(this);
00223     ASSERT(pViewClass != NULL);
00224     ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CWnd)));
00225     ASSERT(AfxIsValidAddress(pViewClass, sizeof(CRuntimeClass), FALSE));
00226
00227     int nNewTab = 0;
00228     for (POSITION pos=m_views.GetHeadPosition(); pos; m_views.GetNext(pos)) {
00229         CTV_ITEM *pMember=m_views.GetAt(pos);
00230         if (pMember->pWnd->IsKindOf(pViewClass)) {
00231             //first hide old first view
00232             m_pActiveView->EnableWindow(FALSE);
00233             m_pActiveView->ShowWindow(SW_HIDE);
00234
00235             // set new active view
00236             m_pActiveView = (CView*)pMember->pWnd;
00237             // enable, show, set focus to new view
00238             m_pActiveView->EnableWindow(TRUE);
00239             m_pActiveView->ShowWindow(SW_SHOW);
00240             m_pActiveView->SetFocus();
00241
00242             // *** LiangYiBin.Donald
00243             //((CFrameWnd *)GetParent())->SetActiveView(m_pActiveView);
00244             //GetParentFrame()->SetActiveView(m_pActiveView);
00245
00246             m_nActiveTab = nNewTab;
00247             // select the tab
00248             m_pTabCtrl->SetCurSel(m_nActiveTab);
00249
00250             break;
00251         }
00252         nNewTab++;
00253     }
00254 }
00255
00256 void CCJTabView::SetActiveView(int nNewTab)
00257 {
00258     ASSERT_VALID(this);
00259     ASSERT(nNewTab >= 0);
00260
00261     if (nNewTab!=-1 && nNewTab!=m_nActiveTab) {
00262         CTV_ITEM *newMember=m_views.GetAt(m_views.FindIndex(nNewTab));
00263         CTV_ITEM *oldMember=NULL;
00264
00265         if (m_nActiveTab!=-1) {
00266             oldMember=m_views.GetAt(m_views.FindIndex(m_nActiveTab));
00267             oldMember->pWnd->EnableWindow(FALSE);
00268             oldMember->pWnd->ShowWindow(SW_HIDE);
00269         }
00270         newMember->pWnd->EnableWindow(TRUE);
00271         newMember->pWnd->ShowWindow(SW_SHOW);
00272         newMember->pWnd->SetFocus();
00273
00274         m_pActiveView = (CView *)newMember->pWnd;
00275
00276         m_nActiveTab = nNewTab;
00277         // select the tab (if tab programmatically changed)
00278         m_pTabCtrl->SetCurSel(m_nActiveTab);
00279     }
00280 }
00281
00282 CImageList* CCJTabView::SetTabImageList(CImageList *pImageList)
00283 {
00284     return m_pTabCtrl->SetImageList (pImageList);
00285 }
00286
00287 BOOL CCJTabView::AddView(LPCTSTR lpszLabel, CRuntimeClass *pViewClass, CDocument* pDoc/*=NULL*/, CCreateContext *pContext/*=NULL*/)
00288 {
00289
00290 #ifdef _DEBUG
00291     ASSERT_VALID(this);
00292     ASSERT(pViewClass != NULL);
00293     ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CWnd)));
00294     ASSERT(AfxIsValidAddress(pViewClass, sizeof(CRuntimeClass), FALSE));
00295 #endif
00296
00297     CCreateContext context;
00298     if (pContext == NULL)
00299     {
00300         context.m_pCurrentDoc       = pDoc;
00301         context.m_pCurrentFrame     = GetParentFrame();
00302         context.m_pLastView         = NULL;
00303         context.m_pNewDocTemplate   = NULL;
00304         context.m_pNewViewClass     = pViewClass;
00305         pContext = &context;
00306     }
00307
00308     CWnd* pWnd;
00309     TRY {
00310         pWnd = (CWnd*)pViewClass->CreateObject();
00311         if (pWnd == NULL)
00312             AfxThrowMemoryException();
00313     }
00314     CATCH_ALL(e) {
00315         TRACE0( "Out of memory creating a view.\n" );
00316         // Note: DELETE_EXCEPTION(e) not required
00317         return FALSE;
00318     }
00319     END_CATCH_ALL
00320
00321     ASSERT_KINDOF(CWnd, pWnd);
00322     ASSERT(pWnd->m_hWnd == NULL);       // not yet created
00323
00324     DWORD dwStyle = AFX_WS_DEFAULT_VIEW;
00325     CRect rect;
00326
00327     // Create with the right size and position
00328     if (!pWnd->Create(NULL, NULL, dwStyle, rect, this, 0, pContext))
00329     {
00330         TRACE0( "Warning: couldn't create client pane for view.\n" );
00331         // pWnd will be cleaned up by PostNcDestroy
00332         return FALSE;
00333     }
00334     m_pActiveView = (CView*) pWnd;
00335
00336     CTV_ITEM* pMember = new CTV_ITEM;
00337
00338     pMember->pWnd = pWnd;
00339
00340     _tcscpy( pMember->szLabel, lpszLabel );
00341
00342     m_views.AddTail(pMember);
00343
00344     // ToolTip support for tabs.
00345     if((m_views.GetCount()-1)==0) {
00346         m_pToolTip->AddTool( m_pTabCtrl, lpszLabel,
00347             NULL, m_views.GetCount()-1 );
00348     }
00349     else {
00350         m_pToolTip->AddTool( m_pTabCtrl, lpszLabel,
00351             CRect(0,0,0,0), m_views.GetCount()-1 );
00352     }
00353
00354     int nViews = m_views.GetCount();
00355     if (nViews != 1) {
00356         pWnd->EnableWindow(FALSE);
00357         pWnd->ShowWindow(SW_HIDE);
00358     }
00359
00360     TC_ITEM tci;
00361     tci.mask = TCIF_TEXT | TCIF_IMAGE;
00362     tci.pszText = (LPTSTR)(LPCTSTR)lpszLabel;
00363     tci.iImage = nViews-1;
00364     m_pTabCtrl->InsertItem(nViews, &tci);
00365
00366     CRect rcChild;
00367     CalcViewRect(&rcChild);
00368     m_pActiveView->MoveWindow(rcChild);
00369
00370     return TRUE;
00371 }
00372
00373 // Used for tab change notifications
00374 void CCJTabView::OnSelchange(NMHDR* /*pNMHDR*/, LRESULT* pResult)
00375 {
00376     SetActiveView(m_pTabCtrl->GetCurSel());
00377
00378     *pResult = 0;
00379 }
00380
00381 int CCJTabView::OnCreate(LPCREATESTRUCT lpCreateStruct)
00382 {
00383     if (CCtrlView::OnCreate(lpCreateStruct) == -1)
00384         return -1;
00385
00386     ASSERT(m_pTabCtrl);         // Should already be constructed
00387
00389     // Fixed bug with set parent and modifystyle which would cause the
00390     // application to lock up. - Kevin [klussier@redcreek.com].
00392     m_pTabCtrl->SetParent(CWnd::FromHandle(lpCreateStruct->hwndParent));
00393     m_pTabCtrl->ModifyStyleEx(WS_EX_NOPARENTNOTIFY, 0);
00394
00395     // Get the log font.
00396     NONCLIENTMETRICS ncm;
00397     ncm.cbSize = sizeof(NONCLIENTMETRICS);
00398     VERIFY(::SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
00399         sizeof(NONCLIENTMETRICS), &ncm, 0));
00400     m_TabFont.CreateFontIndirect(&ncm.lfMessageFont);
00401     m_pTabCtrl->SetFont(&m_TabFont);
00402
00403 #ifdef _VC_VERSION_5
00404     m_pToolTip = m_pTabCtrl->GetTooltips();
00405     m_pTabCtrl->SetTooltips(m_pToolTip);
00406 #else
00407     m_pToolTip = m_pTabCtrl->GetToolTips();
00408     m_pTabCtrl->SetToolTips(m_pToolTip);
00409 #endif // _VC_VERSION_5
00410
00411     return 0;
00412 }
00413
00414 BOOL CCJTabView::OnEraseBkgnd(CDC* pDC)
00415 {
00416     CView *pView = GetActiveView();
00417     if ( pView )
00418     {
00419         // Exclude the embedded views
00420         // area from the erase - Andy
00421         CRect rectClient;
00422         pView->GetWindowRect( &rectClient );
00423         ScreenToClient( &rectClient );
00424         pDC->ExcludeClipRect( &rectClient );
00425     }
00426     return CCtrlView::OnEraseBkgnd(pDC);
00427 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/cvsgui_i18n.h Source File

common/cvsgui_i18n.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Karl-Heinz Bruenen <gcvs@bruenen-net.de> --- Jan 2003
00019  */
00020
00021 #ifndef _CVSGUI_I18N_H
00022 #define _CVSGUI_I18N_H
00023
00024 #ifdef WIN32
00025
00026 #  define _i18n _T
00027 #else
00028   /*
00029    * Standard gettext macros.
00030    */
00031 #  ifdef ENABLE_NLS
00032 #    include <libintl.h>
00033 #    undef _i18n
00034 #    define _i18n(String) dgettext (PACKAGE, String)
00035 #    ifdef gettext_noop
00036 #      define N_(String) gettext_noop (String)
00037 #    else
00038 #      define N_(String) (String)
00039 #    endif
00040 #  else
00041 #    define textdomain(String) (String)
00042 #    define gettext(String) (String)
00043 #    define dgettext(Domain,Message) (Message)
00044 #    define dcgettext(Domain,Message,Type) (Message)
00045 #    define bindtextdomain(Domain,Directory) (Domain)
00046 #    define _i18n(String) (String)
00047 #    define N_(String) (String)
00048 #  endif /* ENABLE_NLS */
00049 #endif /* WIN32 */
00050
00051 #endif /* _CVSGUI_I18N_H */
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KiIgnoreModel Member List

This is the complete list of members for KiIgnoreModel, including all inherited members.

GetNotificationManager()=0 | KiFilterBase | [pure virtual]
IsShowIgnored()=0 | KiIgnoreModel | [pure virtual]
LoadSettings()=0 | KiFilterBase | [pure virtual]
SaveSettings()=0 | KiFilterBase | [pure virtual]

Generated on Sat Aug 7 22:53:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoDlg.cpp Source File

rf/support/mfc/PseudoDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 // PseudoDlg.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "uwidget.h"
00026 #include "PseudoDlg.h"
00027 #include "PseudoDraw.h"
00028 #include "PseudoList.h"
00029 #include "SmartComboBox.h"
00030
00031 #ifdef _DEBUG
00032 #define new DEBUG_NEW
00033 #undef THIS_FILE
00034 static char THIS_FILE[] = __FILE__;
00035 #endif
00036
00037 #define IS_PSEUDO_CTL(id) ((id) >= WINCMD_DLG_START && (id) < WINCMD_DLG_END)
00038
00040 // CPseudoDlg dialog
00041
00042 CPseudoDlg::CPseudoDlg(int dlgid, UWidget *pseudo, CWnd* pParent /*=NULL*/)
00043     : CDialog(dlgid, pParent), m_pseudo(pseudo)
00044 {
00045     //{{AFX_DATA_INIT(CPseudoDlg)
00046         // NOTE: the ClassWizard will add member initialization here
00047     //}}AFX_DATA_INIT
00048 }
00049
00050 CPseudoDlg::~CPseudoDlg()
00051 {
00052     if(m_pseudo != 0L)
00053     {
00054         UEventSendMessage(m_pseudo->GetWidID(), EV_DESTROY, 0, 0L);
00055
00056         std::map<int, void *>::iterator k;
00057         for(k = m_pseudo->GetWidgets().begin(); k != m_pseudo->GetWidgets().end(); ++k)
00058         {
00059             CWnd *wnd = (CWnd *)(*k).second;
00060             if((*k).first != kUMainWidget)
00061                 delete wnd;
00062         }
00063     }
00064 }
00065
00066 void CPseudoDlg::DoDataExchange(CDataExchange* pDX)
00067 {
00068     CDialog::DoDataExchange(pDX);
00069
00070     if(m_pseudo != 0L)
00071     {
00072         std::map<int, void *>::iterator i;
00073         for(i = m_pseudo->GetWidgets().begin(); i != m_pseudo->GetWidgets().end(); ++i)
00074         {
00075             if((*i).first != kUMainWidget)
00076                 DDX_Control(pDX, UCMD_to_WINCTL((*i).first), *(CWnd *)(*i).second);
00077         }
00078
00079         m_pseudo->DoDataExchange(!pDX->m_bSaveAndValidate);
00080     }
00081
00082     //{{AFX_DATA_MAP(CPseudoDlg)
00083     //}}AFX_DATA_MAP
00084 }
00085
00086
00087 BEGIN_MESSAGE_MAP(CPseudoDlg, CDialog)
00088     //{{AFX_MSG_MAP(CPseudoDlg)
00089     //}}AFX_MSG_MAP
00090 END_MESSAGE_MAP()
00091
00092 void WinInitWidgets(CWnd *wnd, UWidget *pseudo)
00093 {
00094     CWnd* pWndStart = 0L;
00095     pWndStart = wnd->GetTopWindow();
00096     while(pWndStart != 0L)
00097     {
00098         HWND hwnd = *pWndStart;
00099         int id = ::GetDlgCtrlID(*pWndStart);
00100         CWnd *res = 0L;
00101         if(IS_PSEUDO_CTL(id))
00102         {
00103             TCHAR szCompare[100];
00104             ::GetClassName(hwnd, szCompare, _countof(szCompare));
00105             DWORD style = (DWORD)GetWindowLong(hwnd, GWL_STYLE);
00106
00107             // check overided widgets
00108             std::map<int, CRuntimeClass *> & list = pseudo->GetOverideList();
00109             std::map<int, CRuntimeClass *>::const_iterator i = list.find(WINCTL_to_UCMD(id));
00110             if(i != list.end())
00111             {
00112                 CRuntimeClass *clss = (*i).second;
00113                 if(clss->IsDerivedFrom(RUNTIME_CLASS(CWnd)))
00114                 {
00115                     res = (CWnd *)clss->CreateObject();
00116                 }
00117             }
00118
00119             if(res == 0L)
00120             {
00121                 if(stricmp(szCompare, "BUTTON") == 0)
00122                 {
00123                     CButton *btn = new CButton();
00124                     res = btn;
00125                 }
00126                 else if(stricmp(szCompare, "Static") == 0)
00127                 {
00128                     if(style & SS_ETCHEDFRAME)
00129                     {
00130                         CPseudoDraw *draw = new CPseudoDraw(pseudo, WINCTL_to_UCMD(id));
00131                         res = draw;
00132                     }
00133                     else
00134                     {
00135                         CStatic *stat = new CStatic();
00136                         res = stat;
00137                     }
00138                 }
00139                 else if(stricmp(szCompare, "ComboBox") == 0)
00140                 {
00141                     CComboBox *combo = new CSmartComboBox(USmartCombo::AutoDropWidth);
00142                     res = combo;
00143                 }
00144                 else if(stricmp(szCompare, WC_LISTVIEW) == 0)
00145                 {
00146                     CPseudoList *list = new CPseudoList(pseudo->GetWidID(), WINCTL_to_UCMD(id));
00147                     res = list;
00148                 }
00149                 else
00150                 {
00151                     res = new CWnd();
00152                 }
00153             }
00154
00155             UEventSendMessage(pseudo->GetWidID(), EV_INIT_WIDGET, WINCTL_to_UCMD(id), res);
00156         }
00157         pWndStart = pWndStart->GetNextWindow();
00158     }
00159
00160     std::map<int, CRuntimeClass *> & list = pseudo->GetOverideList();
00161     list.erase(list.begin(), list.end());
00162 }
00163
00165 // CPseudoDlg message handlers
00166
00167 BOOL CPseudoDlg::OnInitDialog()
00168 {
00169     if(m_pseudo != 0L)
00170     {
00171         WinInitWidgets(this, m_pseudo);
00172         UEventSendMessage(m_pseudo->GetWidID(), EV_CREATE, 0, 0L);
00173     }
00174
00175     CDialog::OnInitDialog();
00176
00177     return TRUE;  // return TRUE unless you set the focus to a control
00178                   // EXCEPTION: OCX Property Pages should return FALSE
00179 }
00180
00181 static int findIdForWnd(CWnd *wnd, UWidget *wid)
00182 {
00183     const std::map<int, void *> & allWids = wid->GetWidgets();
00184     std::map<int, void *>::const_iterator i;
00185     for(i = allWids.begin(); i != allWids.end(); ++i)
00186     {
00187         if(wnd == (CWnd *)(*i).second)
00188             return (*i).first;
00189     }
00190     return -1;
00191 }
00192
00193 static int UWinToUMod(UINT nFlags)
00194 {
00195     int res = 0;
00196     if(nFlags & MK_LBUTTON)
00197         res |= VK_LBUTTON;
00198     if(nFlags & MK_RBUTTON)
00199         res |= UK_RBUTTON;
00200     if(nFlags & MK_SHIFT)
00201         res |= UK_SHIFT;
00202     if(nFlags & MK_CONTROL)
00203         res |= UK_CONTROL;
00204     if(nFlags & MK_MBUTTON)
00205         res |= UK_MBUTTON;
00206     if ((GetKeyState(VK_MENU) & 0x8000) != 0)
00207         res |= UK_ALT;
00208
00209     return res;
00210 }
00211
00212 LRESULT UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam)
00213 {
00214     bool sentOne = false;
00215
00216     if(wid == 0L)
00217         return 1;
00218
00219     if (message == WM_COMMAND)
00220     {
00221         UINT nID = LOWORD(wParam);
00222         if(!IS_PSEUDO_CTL(nID))
00223             return 1;
00224
00225         int nCode = HIWORD(wParam);
00226         HWND hWndCtrl = (HWND)lParam;
00227         switch(nCode)
00228         {
00229         case BN_CLICKED:
00230             UEventSendMessage(wid->GetWidID(), EV_CMD, WINCTL_to_UCMD(nID), 0L);
00231             sentOne = true;
00232             break;
00233         case CBN_SELCHANGE:
00234         {
00235             ASSERT(::IsWindow(hWndCtrl));
00236             int sel = (int)::SendMessage(hWndCtrl, CB_GETCURSEL, 0, 0);
00237             const char *txt = 0L;
00238             char buf[1024] = {'\0'};
00239             if(sel != -1 && (int)::SendMessage(hWndCtrl, CB_GETLBTEXT, sel, (LPARAM)buf) != CB_ERR)
00240                 txt = buf;
00241             if(strcmp(buf, "-") != 0) // separator
00242                 UEventSendMessage(wid->GetWidID(), EV_COMBO_SEL,
00243                     UMAKEINT(WINCTL_to_UCMD(nID), sel), (void *)txt);
00244             sentOne = true;
00245             break;
00246         }
00247         case EN_CHANGE:
00248             if(wid->m_noDispatch)
00249                 break;
00250
00251             ASSERT(::IsWindow(hWndCtrl));
00252             UEventSendMessage(wid->GetWidID(), EV_EDITCHANGE,
00253                 WINCTL_to_UCMD(nID), 0L);
00254             break;
00255         }
00256     }
00257     else if (message == WM_NOTIFY)
00258     {
00259         NMHDR* pNMHDR = (NMHDR*)lParam;
00260         if (pNMHDR->hwndFrom != NULL)
00261         {
00262             UINT nID = _AfxGetDlgCtrlID(pNMHDR->hwndFrom);
00263             int nCode = pNMHDR->code;
00264             if(!IS_PSEUDO_CTL(nID))
00265                 return 1;
00266
00267             switch(nCode)
00268             {
00269             case LVN_ITEMCHANGED:
00270                 NMLISTVIEW *state = (NMLISTVIEW *)pNMHDR;
00271
00272                 HWND wnd = state->hdr.hwndFrom;
00273                 ASSERT(::IsWindow(wnd));
00274
00275                 int id = state->hdr.idFrom;
00276                 std::map<int, void *>::const_iterator i = wid->GetWidgets().find(WINCTL_to_UCMD(id));
00277                 if(i != wid->GetWidgets().end())
00278                 {
00279                     CWnd *w = (CWnd *)(*i).second;
00280                     if(w->IsKindOf(RUNTIME_CLASS(CListCtrl)))
00281                     {
00282                         CListCtrl *list = (CListCtrl*)w;
00283                         CString s = list->GetItemText(state->iItem, 0);
00284
00285                         UEventSendMessage(wid->GetWidID(), EV_LIST_SELECTING,
00286                             UMAKEINT(WINCTL_to_UCMD(state->hdr.idFrom), state->iItem), (void *)(const char *)s);
00287                         sentOne = true;
00288                     }
00289                 }
00290                 break;
00291             }
00292         }
00293     }
00294     else if (message == WM_SIZE)
00295     {
00296         int id = findIdForWnd(wnd, wid);
00297         if(id != -1)
00298         {
00299             URECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
00300             UEventSendMessage(wid->GetWidID(), EV_RESIZE, id, &r);
00301             sentOne = true;
00302         }
00303     }
00304     else if (message == WM_MOUSEMOVE)
00305     {
00306         int id = findIdForWnd(wnd, wid);
00307         if(id != -1)
00308         {
00309             UEventSendMessage(wid->GetWidID(), EV_MMOVE, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00310                 (void *)UWinToUMod(wParam));
00311             sentOne = true;
00312         }
00313     }
00314     else if (message == WM_LBUTTONDOWN)
00315     {
00316         int id = findIdForWnd(wnd, wid);
00317         if(id != -1)
00318         {
00319             UEventSendMessage(wid->GetWidID(), EV_BTNDOWN, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00320                 (void *)UWinToUMod(wParam));
00321             sentOne = true;
00322         }
00323     }
00324     else if (message == WM_LBUTTONUP)
00325     {
00326         int id = findIdForWnd(wnd, wid);
00327         if(id != -1)
00328         {
00329             UEventSendMessage(wid->GetWidID(), EV_BTNUP, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00330                 (void *)UWinToUMod(wParam));
00331             sentOne = true;
00332         }
00333     }
00334     else if (message == WM_LBUTTONDBLCLK)
00335     {
00336         int id = findIdForWnd(wnd, wid);
00337         if(id != -1)
00338         {
00339             UEventSendMessage(wid->GetWidID(), EV_BTNDBLDOWN, UMAKEINT(LOWORD(lParam), HIWORD(lParam)),
00340                 (void *)UWinToUMod(wParam));
00341             sentOne = true;
00342         }
00343     }
00344     else if (message == WM_KEYDOWN)
00345     {
00346         int id = findIdForWnd(wnd, wid);
00347         if(id != -1)
00348         {
00349             UEventSendMessage(wid->GetWidID(), EV_KEYDOWN, wParam, 0L);
00350             sentOne = true;
00351         }
00352     }
00353     else if (message == WM_HSCROLL)
00354     {
00355         HWND hwndScrollBar = (HWND) lParam;       // handle to scroll bar
00356         int nID = ::GetDlgCtrlID(hwndScrollBar);
00357         if(!IS_PSEUDO_CTL(nID))
00358             return 1;
00359
00360         int cmd = WINCTL_to_UCMD(nID);
00361         CWnd *wnds = (CWnd *)wid->GetWidget(cmd);
00362         if(wnds == 0L || !wnds->IsKindOf(RUNTIME_CLASS(CScrollBar)))
00363             return 1;
00364
00365         CScrollBar *scroll = (CScrollBar *)wnds;
00366
00367         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
00368         int nPos;
00369         if(nScrollCode == SB_THUMBPOSITION || nScrollCode == SB_THUMBTRACK)
00370         {
00371             nPos = (short int) HIWORD(wParam);   // scroll box position
00372
00373             if(nScrollCode == SB_THUMBPOSITION)
00374                 scroll->SetScrollPos(nPos);
00375         }
00376         else
00377         {
00378             SCROLLINFO info;
00379             VERIFY(scroll->GetScrollInfo(&info));
00380             nPos = info.nPos;
00381
00382             switch(nScrollCode)
00383             {
00384             case SB_ENDSCROLL:
00385                 return 1;
00386                 break;
00387             case SB_LINELEFT:
00388                 nPos -= 1;
00389                 break;
00390             case SB_LINERIGHT:
00391                 nPos += 1;
00392                 break;
00393             case SB_PAGELEFT:
00394                 nPos -= info.nPage;
00395                 break;
00396             case SB_PAGERIGHT:
00397                 nPos += info.nPage;
00398                 break;
00399             case SB_LEFT:
00400                 nPos = info.nMin;
00401                 break;
00402             case SB_RIGHT:
00403                 nPos = info.nMax;
00404                 break;
00405             }
00406
00407             scroll->SetScrollPos(nPos);
00408         }
00409
00410         UEventSendMessage(wid->GetWidID(), EV_SCROLLCHANGE, WINCTL_to_UCMD(nID),
00411             (void *)nPos);
00412         sentOne = true;
00413     }
00414     else if (message == WM_VSCROLL)
00415     {
00416         HWND hwndScrollBar = (HWND) lParam;       // handle to scroll bar
00417         int nID = ::GetDlgCtrlID(hwndScrollBar);
00418         if(!IS_PSEUDO_CTL(nID))
00419             return 1;
00420
00421         int cmd = WINCTL_to_UCMD(nID);
00422         CWnd *wnds = (CWnd *)wid->GetWidget(cmd);
00423         if(wnds == 0L || !wnds->IsKindOf(RUNTIME_CLASS(CScrollBar)))
00424             return 1;
00425
00426         CScrollBar *scroll = (CScrollBar *)wnds;
00427
00428         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
00429         int nPos;
00430         if(nScrollCode == SB_THUMBPOSITION || nScrollCode == SB_THUMBTRACK)
00431         {
00432             nPos = (short int) HIWORD(wParam);   // scroll box position
00433
00434             if(nScrollCode == SB_THUMBPOSITION)
00435                 scroll->SetScrollPos(nPos);
00436         }
00437         else
00438         {
00439             SCROLLINFO info;
00440             VERIFY(scroll->GetScrollInfo(&info));
00441             nPos = info.nPos;
00442
00443             switch(nScrollCode)
00444             {
00445             case SB_ENDSCROLL:
00446                 return 1;
00447                 break;
00448             case SB_LINEUP:
00449                 nPos -= 1;
00450                 break;
00451             case SB_LINEDOWN:
00452                 nPos += 1;
00453                 break;
00454             case SB_PAGEUP:
00455                 nPos -= info.nPage;
00456                 break;
00457             case SB_PAGEDOWN:
00458                 nPos += info.nPage;
00459                 break;
00460             case SB_TOP:
00461                 nPos = info.nMin;
00462                 break;
00463             case SB_BOTTOM:
00464                 nPos = info.nMax;
00465                 break;
00466             }
00467
00468             if(nPos > info.nMax)
00469                 nPos = info.nMax;
00470             else if(nPos < info.nMin)
00471                 nPos = info.nMin;
00472             scroll->SetScrollPos(nPos);
00473         }
00474
00475         UEventSendMessage(wid->GetWidID(), EV_SCROLLCHANGE, WINCTL_to_UCMD(nID),
00476             (void *)nPos);
00477         sentOne = true;
00478     }
00479
00480     if(sentOne)
00481         UWidget::DoValidUI(false);
00482
00483     return 1;
00484 }
00485
00486 LRESULT CPseudoDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
00487 {
00488     if(m_pseudo != 0L && !UWinPseudoWindowProc(this, m_pseudo, message, wParam, lParam))
00489         return 0;
00490
00491     return CDialog::WindowProc(message, wParam, lParam);
00492 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

NotificationManager::Node Member List

This is the complete list of members for NotificationManager::Node, including all inherited members.

handler | NotificationManager::Node
Node() | NotificationManager::Node
Node(CObject *o, FNOBSERVER h) | NotificationManager::Node
Node(const Node &n) | NotificationManager::Node
observer | NotificationManager::Node
operator=(const Node &n) | NotificationManager::Node

Generated on Sat Aug 7 22:55:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LaunchHandlers.cpp Source File

common/LaunchHandlers.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- January 2004
00019  */
00020
00021 /*
00022  * LaunchHandlers.cpp : Launch helper functions
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "wincvs_winutil.h"
00030 #endif /* !WIN32 */
00031
00032 #include "LaunchHandlers.h"
00033 #include "CvsPrefs.h"
00034 #include "AppConsole.h"
00035 #include "CvsCommands.h"
00036 #include "cvsgui_i18n.h"
00037 #include "CvsArgs.h"
00038
00039 #if TARGET_RT_MAC_MACHO
00040 #include "MacCvsApp.h"
00041 #include "CBrowserPopup.h"
00042 #include "GUSIFileSpec.h"
00043 #include "MacCvsConstant.h"
00044 #endif
00045
00046 #ifdef qUnix
00047 #include "UCvsApp.h"
00048 #endif
00049
00050 #ifdef _DEBUG
00051 #undef THIS_FILE
00052 static char THIS_FILE[]=__FILE__;
00053 #define new DEBUG_NEW
00054 #endif
00055
00056 #ifdef WIN32
00057
00058 #define SHELLACTION_SUCCEEDED(shellActionResult) (shellActionResult >= 32)
00059
00061 typedef enum{
00062     kShellActionDefault,
00063     kShellActionOpen,
00064     kShellActionEdit,
00065     kShellActionOpenAs,
00066     kShellActionExplore,
00067     kShellActionProperties
00068 }kShellActionType;
00069
00076 const char* GetLaunchTypeName(const kLaunchType launchType, const bool shortName /*= true*/)
00077 {
00078     const char* res = "";
00079
00080     switch( launchType )
00081     {
00082     case kLaunchEdit:
00083         res = shortName ? _i18n("Edit") : _i18n("Edit with the associated editor");
00084         break;
00085     case kLaunchDefaultEdit:
00086         res = shortName ? _i18n("Edit with editor") : _i18n("Edit with the default editor");
00087         break;
00088     case kLaunchOpen:
00089         res = shortName ? _i18n("Open") : _i18n("Open with the associated viewer");
00090         break;
00091     case kLaunchOpenAs:
00092         res = shortName ? _i18n("Open with...") : _i18n("Choose an application to open with");
00093         break;
00094     case kLaunchDefault:
00095         res = shortName ? _i18n("Default") : _i18n("Execute default associated shell action");
00096         break;
00097     default:
00098         break;
00099     }
00100
00101     return res;
00102 }
00103
00112 static UINT ShellAction(const kShellActionType actionType, const char* filePath, const char* args  = 0L, const char* workdir = 0L)
00113 {
00114     char* verb;
00115
00116     switch( actionType )
00117     {
00118     case kShellActionDefault:
00119         verb = NULL;
00120         break;
00121     case kShellActionOpen:
00122         verb = "open";
00123         break;
00124     case kShellActionEdit:
00125         verb = "edit";
00126         break;
00127     case kShellActionOpenAs:
00128         verb = "openas";
00129         break;
00130     case kShellActionExplore:
00131         verb = "explore";
00132         break;
00133     case kShellActionProperties:
00134         verb = "properties";
00135         break;
00136     }
00137
00138     HWND hParentWnd = AfxGetMainWnd()->GetSafeHwnd();
00139
00140     SHELLEXECUTEINFO seInfo = { 0 };
00141     seInfo.cbSize = sizeof(SHELLEXECUTEINFO);
00142     seInfo.hwnd = hParentWnd;
00143     seInfo.lpVerb = verb;
00144     seInfo.lpFile = filePath;
00145     seInfo.lpParameters = args;
00146     seInfo.lpDirectory = workdir;
00147     seInfo.nShow = SW_SHOWDEFAULT;
00148
00149     if( actionType != kShellActionOpenAs )
00150     {
00151         seInfo.fMask |= SEE_MASK_FLAG_NO_UI;
00152     }
00153
00154     if( actionType == kShellActionProperties )
00155     {
00156         seInfo.fMask |= SEE_MASK_INVOKEIDLIST;
00157     }
00158
00159     ShellExecuteEx(&seInfo);
00160
00161     return (UINT)seInfo.hInstApp;
00162 }
00163 #endif
00164
00176 bool LaunchDiff(const char* f1, const char* f2,
00177                 const char* diffTool /*= 0L*/, bool unifiedDiff /*= false*/, bool noWhiteSpace /*= false*/, bool noBlankLines /*= false*/, bool ignoreCase /*= false*/)
00178 {
00179   if( diffTool == 0L  ||  diffTool[0] == 0 ) diffTool = gCvsPrefs.ExtDiff();
00180     if( diffTool == 0L  ||  diffTool[0] == 0 )
00181     {
00182         cvs_err(_i18n("The external diff program is not defined.\n"));
00183         cvs_err(_i18n("You need to set it in the preferences dialog.\n"));
00184         return false;
00185     }
00186
00187 #ifdef WIN32
00188     CStr args;
00189     CStr program, file1, file2;
00190
00191     if( strchr(diffTool, ' ') != 0L )
00192     {
00193         program << '\"' << diffTool << '\"';
00194     }
00195     else
00196     {
00197         program = diffTool;
00198     }
00199
00200     if( strchr(f1, ' ') != 0L )
00201     {
00202         file1 << '\"' << f1 << '\"';
00203     }
00204     else
00205     {
00206         file1 = f1;
00207     }
00208
00209     if( strchr(f2, ' ') != 0L )
00210     {
00211         file2 << '\"' << f2 << '\"';
00212     }
00213     else
00214     {
00215         file2 = f2;
00216     }
00217
00218     args << file1.c_str() << " " << file2.c_str();
00219
00220     UINT shellRes = ShellAction(kShellActionDefault, diffTool, args.c_str());
00221     if( !SHELLACTION_SUCCEEDED(shellRes) )
00222     {
00223         // ExtDiff app was not found. Let's try to execute it from
00224         // the application path. However, this is done only when ExtDiff
00225         // value doesn't contain absolute path ("c:\subdir\" or "\subdir\").
00226         if( strchr(diffTool, ':') == 0L && (diffTool[0]) != '\\' )
00227         {
00228             CStr appPath;
00229
00230             ((CWincvsApp*)AfxGetApp())->GetAppPath(appPath);
00231             if( !appPath.endsWith(kPathDelimiter) )
00232                 appPath << kPathDelimiter;
00233
00234             appPath << diffTool;
00235
00236             shellRes = ShellAction(kShellActionDefault, appPath, args);
00237         }
00238     }
00239
00240     if( !SHELLACTION_SUCCEEDED(shellRes) )
00241     {
00242         LPVOID lpMsgBuf;
00243         FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
00244             NULL,
00245             GetLastError(),
00246             MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
00247             (LPTSTR)&lpMsgBuf,
00248             0,
00249             NULL);
00250
00251         cvs_err(_i18n("Unable to open '%s' (%s), using console instead\n"), diffTool, (LPCSTR)lpMsgBuf);
00252         // Free the buffer.
00253         LocalFree( lpMsgBuf );
00254         return false;
00255     }
00256
00257     return true;
00258 #elif qUnix
00259     CvsArgs args(false);
00260     args.add(diffTool);
00261     args.add(f1);
00262     args.add(f2);
00263     UCvsApp::gApp->Execute(args.Argc(), args.Argv());
00264     return true;
00265 #elif TARGET_RT_MAC_MACHO
00266     CvsArgs args(false);
00267     args.add(diffTool);
00268     if ( noWhiteSpace ) {
00269       if ( strcmp(diffTool, kDiffTool_CodeWarrior) == 0  ||  strcmp(diffTool, kDiffTool_BBEdit) == 0 ) args.add("-wb");
00270     }
00271     if ( ignoreCase ) {
00272       if ( strcmp(diffTool, kDiffTool_CodeWarrior) == 0  ||  strcmp(diffTool, kDiffTool_BBEdit) == 0 ) args.add("-i");
00273     }
00274     args.add(f1);
00275     args.add(f2);
00276     CMacCvsApp::gApp->Execute(args.Argc(), args.Argv());
00277     return true;
00278 #endif
00279 }
00280
00287 bool LaunchHandler(const kLaunchType launchType, const char* filePath)
00288 {
00289     bool res = false;
00290
00291 #ifdef WIN32
00292     CStr folder, file;
00293     SplitPath(filePath, folder, file);
00294
00295     if( launchType == kLaunchOpen )
00296     {
00297         // Explicitly attempt "open"
00298         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpen, filePath, NULL, folder));
00299         if( !res )
00300         {
00301             // Attempt OS default action for object
00302             res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, filePath, NULL, folder));
00303         }
00304     }
00305
00306     if( !res && (launchType == kLaunchOpen || launchType == kLaunchOpenAs) )
00307     {
00308         // Show OS handler selection dialog
00309         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpenAs, filePath, NULL, folder));
00310         if( !res )
00311         {
00312             cvs_err(_i18n("Unable to open '%s' (error %d), using editor instead\n"), (char*)filePath, GetLastError());
00313         }
00314     }
00315
00316     if( !res && launchType != kLaunchDefaultEdit && launchType != kLaunchDefault )
00317     {
00318         // Attempt "edit" action
00319         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionEdit, filePath, NULL, folder));
00320     }
00321
00322     if( !res && launchType == kLaunchDefault )
00323     {
00324         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, filePath, NULL, folder));
00325     }
00326 #endif
00327
00328     if( !res )
00329     {
00330         // If all else fails, open in default editor
00331         res = LaunchDefaultEditor(filePath);
00332     }
00333
00334     return res;
00335 }
00336
00343 bool LaunchViewer(const char* filePath, bool useOpenAs /* = false */)
00344 {
00345     bool res = false;
00346
00347 #ifdef WIN32
00348     bool needOpenAs = false;
00349
00350     CStr folder, file;
00351     SplitPath(filePath, folder, file);
00352
00353     if( !useOpenAs )
00354     {
00355         UINT shellRes = ShellAction(kShellActionOpen, filePath, NULL, folder);
00356         if( !SHELLACTION_SUCCEEDED(shellRes))
00357         {
00358             // If it failed because of no valid association and file has an extension then try the "Open with..." dialog instead
00359             needOpenAs = (file.rfind('.') > 0 &&
00360                 (SE_ERR_NOASSOC == shellRes || SE_ERR_ASSOCINCOMPLETE == shellRes));
00361         }
00362         else
00363         {
00364             res = true;
00365         }
00366     }
00367
00368     if( !res && (useOpenAs || needOpenAs) )
00369     {
00370         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionOpenAs, filePath, NULL, folder));
00371     }
00372
00373     if( !res )
00374     {
00375         cvs_err(_i18n("Unable to open '%s' (error %d), using default editor instead\n"), (char*)filePath, GetLastError());
00376         res = LaunchEditor(filePath);
00377     }
00378
00379 #endif /* WIN32 */
00380
00381 #ifdef qMacCvsPP
00382   // fall thru to calling LaunchEditor below...
00383 #endif /* qMacCvsPP */
00384
00385 #if qUnix
00386       res = true;
00387 #endif // qUnix
00388
00389     if( !res )
00390     {
00391         res = LaunchEditor(filePath);
00392     }
00393
00394     return res;
00395 }
00396
00403 bool LaunchEditor(const char* filePath, bool useDefault /*= false*/)
00404 {
00405     bool res = false;
00406
00407 #ifdef WIN32
00408     if( !useDefault )
00409     {
00410         CStr folder, file;
00411         SplitPath(filePath, folder, file);
00412
00413         res = SHELLACTION_SUCCEEDED(ShellAction(kShellActionEdit, filePath, NULL, folder));
00414     }
00415
00416 #endif /* WIN32 */
00417
00418 #ifdef qMacCvsPP
00419     if ( !useDefault )
00420     {
00421         GUSIFileSpec  f(filePath);
00422         OSStatus      err;
00423         err = LSOpenFSRef(f, NULL);
00424         FSRef         application;
00425
00426         err = LSGetApplicationForItem(f, kLSRolesAll, &application, NULL);
00427         if ( err != noErr )
00428         {
00429             // no luck finding a default binding -> try as text file
00430             err = LSGetApplicationForInfo('TEXT', kLSUnknownCreator, CFSTR("txt"), kLSRolesAll, &application, NULL);
00431         }
00432         if ( err == noErr )
00433         {
00434             LSLaunchFSRefSpec   launchSpec = { &application, 1, f, NULL, kLSLaunchDefaults|kLSLaunchDontAddToRecents, NULL };
00435             err = LSOpenFromRefSpec(&launchSpec, NULL);
00436         }
00437         if ( err != noErr )
00438         {
00439             cvs_err(_i18n("Unable to open '%s' (error %ld), using default editor instead\n"), (char*)filePath, err);
00440         }
00441         else res = true;
00442     }
00443 #endif /* qMacCvsPP */
00444
00445 #if qUnix
00446 #endif // qUnix
00447
00448     if( !res )
00449     {
00450         res = LaunchDefaultEditor(filePath);
00451     }
00452
00453     return res;
00454 }
00455
00462 bool LaunchDefaultEditor(const char* filePath, void* par /* = 0L */)
00463 {
00464     bool res = false;
00465
00466 #ifndef qMacCvsPP
00467     if( gCvsPrefs.Viewer() == 0L )
00468     {
00469         cvs_err(_i18n("You need to define a default editor in the preferences\n"));
00470         return false;
00471     }
00472
00473     CStr program, file;
00474
00475     if( strchr(gCvsPrefs.Viewer(), ' ') != 0L )
00476     {
00477         program << '\"';
00478         program << gCvsPrefs.Viewer();
00479         program << '\"';
00480     }
00481     else
00482         program = gCvsPrefs.Viewer();
00483
00484     if( strchr(filePath, ' ') != 0L )
00485     {
00486         file << '\"';
00487         file << filePath;
00488         file << '\"';
00489     }
00490     else
00491         file = filePath;
00492
00493     CStr command;
00494     command << program;
00495     command << " ";
00496     command << file;
00497 #endif
00498
00499 #ifdef WIN32
00500     STARTUPINFO sStartupInfo = { 0 };
00501     PROCESS_INFORMATION sProcessInformation = { 0 };
00502
00503     // Execute the command with a call to the CreateProcess API call.
00504     sStartupInfo.cb = sizeof(sStartupInfo);
00505     sStartupInfo.dwFlags = STARTF_USESHOWWINDOW;
00506     sStartupInfo.wShowWindow = SW_SHOWNORMAL;
00507
00508     if( !CreateProcess(NULL,
00509         (char*)command.c_str(),
00510         NULL,
00511         NULL,
00512         FALSE,
00513         0,
00514         NULL,
00515         NULL,
00516         &sStartupInfo,
00517         &sProcessInformation) )
00518     {
00519         sProcessInformation.hProcess = INVALID_HANDLE_VALUE;
00520         sProcessInformation.hThread = INVALID_HANDLE_VALUE;
00521     }
00522
00523     if( sProcessInformation.hProcess != INVALID_HANDLE_VALUE )
00524     {
00525         res = true;
00526     }
00527
00528     if( par )
00529     {
00530         *((PROCESS_INFORMATION*)par) = sProcessInformation;
00531     }
00532     else if( res )
00533     {
00534         CloseHandle(sProcessInformation.hProcess);
00535         CloseHandle(sProcessInformation.hThread);
00536     }
00537
00538 #endif /* WIN32 */
00539
00540 #ifdef qMacCvsPP
00541     GUSIFileSpec  f(filePath);
00542     OSStatus      err(-1);
00543     FSRef         application;
00544     bool          gotViewer(false);
00545
00546     if( gCvsPrefs.Viewer() != NULL )
00547     {
00548         // viewer contains creator and/or bundle identifier
00549         if ( strlen(gCvsPrefs.Viewer()) >= 4 )
00550         {
00551             OSType      appCreator;
00552             CFStringRef bundleIdentifier(NULL);
00553
00554             memcpy(&appCreator, gCvsPrefs.Viewer(), 4);
00555             if ( strlen(gCvsPrefs.Viewer()) > 4  &&  gCvsPrefs.Viewer()[4] == ':' )
00556                 bundleIdentifier = CFStringCreateWithCString(NULL, &gCvsPrefs.Viewer()[5], kCFStringEncodingUTF8);
00557             err = LSFindApplicationForInfo(appCreator == '\?\?\?\?' ? kLSUnknownCreator : appCreator, bundleIdentifier, NULL, &application, NULL);
00558             if ( err != noErr )
00559             {
00560                 cvs_err(_i18n("Unable to find your default viewer '%s' (error %ld), will use default text editor.\n"), gCvsPrefs.Viewer(), err);
00561             }
00562         }
00563     }
00564     if ( err != noErr )
00565     {
00566         // use the default text file viewer
00567         err = LSGetApplicationForInfo('TEXT', kLSUnknownCreator, CFSTR("txt"), kLSRolesAll, &application, NULL);
00568     }
00569
00570     if ( err == noErr )
00571     {
00572         LSLaunchFSRefSpec   launchSpec = { &application, 1, f, NULL, kLSLaunchDefaults|kLSLaunchDontAddToRecents, NULL };
00573         err = LSOpenFromRefSpec(&launchSpec, NULL);
00574     }
00575     if ( err != noErr )
00576     {
00577         cvs_err(_i18n("Unable to open '%s' (error %ld) with default editor '%s'.\n"), (char*)filePath, err, gCvsPrefs.Viewer() ? gCvsPrefs.Viewer() : "<default text editor>");
00578     }
00579     else
00580         res = true;
00581 #endif /* qMacCvsPP */
00582
00583 #if qUnix
00584     res = true;
00585 #endif // qUnix
00586
00587     return res;
00588 }
00589
00594 void LaunchExplore(const char* path)
00595 {
00596 #ifdef WIN32
00597     if( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionExplore, path)) )
00598     {
00599         cvs_err("Unable to explore '%s' (error %d)\n", (char*)path, GetLastError());
00600     }
00601 #endif
00602 #ifdef qMacCvsPP
00603   GUSIFileSpec    fileSpec(path);
00604   CBrowserPopup::SendFinderOpenAE(fileSpec, true);
00605 #endif
00606 #ifdef qUnix
00607     CvsArgs args(false);
00608     args.add(gCvsPrefs.Browser());
00609     args.add(path);
00610     UCvsApp::gApp->Execute(args.Argc(), args.Argv());
00611 #endif
00612 }
00613
00618 void LaunchNewInst(const char* path)
00619 {
00620     UStr appPath;
00621
00622 #ifdef WIN32
00623     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00624     pApp->GetAppModule(appPath);
00625
00626     if ( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionDefault, appPath, path)) )
00627     {
00628         cvs_err("Unable to open new instance for '%s' (error %d)\n", (char*)path, GetLastError());
00629     }
00630 #endif
00631 #ifdef qMacCvsPP
00632 #endif
00633 #ifdef qUnix
00634 #endif
00635 }
00636
00641 void LaunchProperties(const char* path)
00642 {
00643 #ifdef WIN32
00644     if( !SHELLACTION_SUCCEEDED(ShellAction(kShellActionProperties, path)) )
00645     {
00646         cvs_err("Unable to show the properties '%s' (error %d)\n", (char*)path, GetLastError());
00647     }
00648 #endif
00649 #ifdef qMacCvsPP
00650 #endif
00651 #ifdef qUnix
00652 #endif
00653 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJExplorerBar.h Source File

WinCvs/CJLib/Include/CJExplorerBar.h

Go to the documentation of this file.
00001 // CJExplorerBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJExplorerBar.h $
00011  *
00012  * $History: CJExplorerBar.h $
00013  *
00014  * *****************  Version 8  *****************
00015  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00016  * Updated in $/CodeJock/Include
00017  * Fixed potential resource and memory leak problems.
00018  *
00019  * *****************  Version 7  *****************
00020  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00021  * Updated in $/CodeJockey/Include
00022  * Updated copyright and contact information.
00023  *
00024  * *****************  Version 6  *****************
00025  * User: Kirk Stowell Date: 6/23/99    Time: 7:23a
00026  * Updated in $/CodeJockey/Include
00027  *
00028  * *****************  Version 5  *****************
00029  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00030  * Updated in $/CodeJockey/Include
00031  *
00032  * *****************  Version 4  *****************
00033  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00034  * Updated in $/CodeJockey/Include
00035  * Cleaned up inline functions, and import/export macro so that class will
00036  * be imported when linked to, and exported at compile time.
00037  *
00038  * *****************  Version 3  *****************
00039  * User: Kirk Stowell Date: 4/03/99    Time: 4:23p
00040  * Updated in $/CodeJockey/Include
00041  * Added comments and cleaned up code.
00042  *
00043  * *****************  Version 2  *****************
00044  * User: Kirk Stowell Date: 1/31/99    Time: 4:23p
00045  * Updated in $/CodeJockey/Include
00046  * Made some cosmetic enhancements to more closely match the windows
00047  * explorer bar.
00048  *
00049  * *****************  Version 1  *****************
00050  * User: Kirk Stowell Date: 1/16/99    Time: 4:22p
00051  * Created in $/CodeJockey/Include
00052  * Initial release
00053  *
00054  ***************************************************************************/
00056
00057 #ifndef __CJEXPLORERBAR_H__
00058 #define __CJEXPLORERBAR_H__
00059
00060 #if _MSC_VER >= 1000
00061 #pragma once
00062 #endif // _MSC_VER >= 1000
00063
00064 #include "CJControlBar.h"
00065 #include "CJCaption.h"
00066
00067 // CCJExplorerBar is a CCJControlBar derived class which is simular
00068 // to the explorer bar that is seen in Windows or Internet Explorer.
00069 class _CJX_EXT_CLASS CCJExplorerBar : public CCJControlBar
00070 {
00071     DECLARE_DYNAMIC(CCJExplorerBar)
00072
00073 public:
00074
00075     // Default constructor
00076     //
00077     CCJExplorerBar();
00078
00079     // Virtual destructor
00080     //
00081     virtual ~CCJExplorerBar();
00082
00083 protected:
00084
00085     CCJCaption      m_Caption;          // frame caption contains
00086     CCJFlatButton   m_CaptionButton;    // close button located on frame
00087     CString         m_strCaption;       // text that is displayed in the caption
00088     HICON           m_hIcon;            // handle to button icon.
00089
00090 public:
00091
00092     // this member function is used to create an explorer bar
00093     //
00094     virtual BOOL Create(
00095         // the parent window.
00096         CWnd* pParentWnd,
00097         // The ID of the control bar.
00098         UINT nID,
00099         // Points to a null-terminated character string that contains the
00100         // control bar title.
00101         LPCTSTR lpszWindowName = NULL,
00102         // The default size the control bar is to be.
00103         CSize sizeDefault = CSize(200,100),
00104         // Specifies the window style attributes.
00105         DWORD dwStyle = CBRS_LEFT);
00106
00107     // this member function is called by the control bar, and
00108     // can be overloaded in derived classes to return the rect
00109     // for the child window associated with the control bar.
00110     //
00111     virtual void GetChildRect(
00112         // reference to a CRect object which contains the size of
00113         // the child window associated with the control bar.
00114         CRect &rect);
00115
00116 // Overrides
00117     // ClassWizard generated virtual function overrides
00118     //{{AFX_VIRTUAL(CCJExplorerBar)
00119     //}}AFX_VIRTUAL
00120
00121 // Generated message map functions
00122 protected:
00123     //{{AFX_MSG(CCJExplorerBar)
00124     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00125     afx_msg void OnButtonClose();
00126     afx_msg void OnUpdateButtonClose(CCmdUI* pCmdUI);
00127     afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00128     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00129     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00130     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00131     //}}AFX_MSG
00132     DECLARE_MESSAGE_MAP()
00133 };
00134
00136
00137 //{{AFX_INSERT_LOCATION}}
00138 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00139
00140 #endif // __CJEXPLORERBAR_H__
00141
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJOutlookBar Member List

This is the complete list of members for CCJOutlookBar, including all inherited members.

CCJOutlookBar() | CCJOutlookBar |
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CCJOutlookBar | [virtual]
m_bHilight | CCJOutlookBar | [protected]
m_bLBDown | CCJOutlookBar | [protected]
m_clrDkShad | CCJOutlookBar | [protected]
m_clrHilite | CCJOutlookBar | [protected]
m_clrNormal | CCJOutlookBar | [protected]
m_clrShadow | CCJOutlookBar | [protected]
m_clrTextNm | CCJOutlookBar | [protected]
m_Font | CCJOutlookBar | [protected]
m_nIndex | CCJOutlookBar | [protected]
m_nNumItems | CCJOutlookBar | [protected]
m_pContents | CCJOutlookBar | [protected]
m_pImageListLarge | CCJOutlookBar | [protected]
m_pImageListSmall | CCJOutlookBar | [protected]
m_point | CCJOutlookBar | [protected]
m_pOwner | CCJOutlookBar | [protected]
MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJOutlookBar | [virtual]
OnEraseBkgnd(CDC *pDC) | CCJOutlookBar | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJOutlookBar | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJOutlookBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJOutlookBar | [protected]
OnPaint() | CCJOutlookBar | [protected]
OnSysColorChange() | CCJOutlookBar | [protected]
OnTimer(UINT nIDEvent) | CCJOutlookBar | [protected]
SetImageLists(CImageList *pImageListSmall=NULL, CImageList *pImageListLarge=NULL) | CCJOutlookBar | [virtual]
SetItems(CContentItems *pItems, int nNumItems) | CCJOutlookBar | [virtual]
SetOwner(CWnd *pWnd) | CCJOutlookBar | [virtual]
UpdateFont() | CCJOutlookBar | [virtual]
~CCJOutlookBar() | CCJOutlookBar | [virtual]

Generated on Sat Aug 7 22:49:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UMSGMAP_ENTRY Member List

This is the complete list of members for UMSGMAP_ENTRY, including all inherited members.

ext | UMSGMAP_ENTRY
ext1 | UMSGMAP_ENTRY
ext2 | UMSGMAP_ENTRY
nMessage | UMSGMAP_ENTRY
nSig | UMSGMAP_ENTRY
pfn | UMSGMAP_ENTRY

Generated on Sat Aug 7 22:55:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvsView.cpp Source File

WinCvs/wincvsView.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // wincvsView.cpp : implementation of the CWincvsView class
00022 //
00023
00024 #include "stdafx.h"
00025 #include <atlconv.h>
00026 #include "wincvs.h"
00027 #include "wincvsDoc.h"
00028 #include "wincvsView.h"
00029 #include "wincvs_winutil.h"
00030 #include "MainFrm.h"
00031
00032 #include "Persistent.h"
00033 #include "CvsPrefs.h"
00034 #include "AppGlue.h"
00035 #include "TclGlue.h"
00036 #include "PythonGlue.h"
00037
00038 #ifdef _DEBUG
00039 #define new DEBUG_NEW
00040 #undef THIS_FILE
00041 static char THIS_FILE[] = __FILE__;
00042 #endif
00043
00044 static CPersistentT<CCharFormat> gViewFont("P_ViewFont", CCharFormat(), kNoClass);
00045
00047 // CWincvsView
00048
00049 IMPLEMENT_DYNCREATE(CWincvsView, CRichEditView)
00050
00051 BEGIN_MESSAGE_MAP(CWincvsView, CRichEditView)
00052     //{{AFX_MSG_MAP(CWincvsView)
00053     ON_WM_DESTROY()
00054     ON_WM_SETFOCUS()
00055     ON_WM_SIZE()
00056     ON_COMMAND(ID_FORMAT_FONT, OnMyFormatFont)
00057     ON_WM_KEYDOWN()
00058     ON_WM_DROPFILES()
00059     ON_COMMAND(ID_EDIT_CLEAR_ALL, OnEditClearAll)
00060     ON_WM_GETDLGCODE()
00061     ON_WM_CONTEXTMENU()
00062     ON_WM_RBUTTONDOWN()
00063     //}}AFX_MSG_MAP
00064     // Standard printing commands
00065     ON_COMMAND(ID_FILE_PRINT, CRichEditView::OnFilePrint)
00066     ON_COMMAND(ID_FILE_PRINT_DIRECT, CRichEditView::OnFilePrint)
00067     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRichEditView::OnFilePrintPreview)
00068 END_MESSAGE_MAP()
00069
00071 // CWincvsView construction/destruction
00072
00073 CWincvsView::CWincvsView()
00074 {
00075     m_fRtfFormat = ::RegisterClipboardFormat(_T("Rich Text Format"));
00076
00077     m_sbuf = 0L;
00078     m_snumbuf = 0;
00079 }
00080
00081 CWincvsView::~CWincvsView()
00082 {
00083     m_snumbuf = 0;
00084     if( m_sbuf != 0L)
00085     {
00086         free(m_sbuf);
00087         m_sbuf = 0L;
00088     }
00089
00090     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00091     if( app )
00092     {
00093         app->StopScriptEngine();
00094     }
00095 }
00096
00098 BOOL CWincvsView::PreCreateWindow(CREATESTRUCT& cs)
00099 {
00100     BOOL bRet = CRichEditView::PreCreateWindow(cs);
00101     cs.style |= WS_TABSTOP | ES_MULTILINE;
00102
00103     return bRet;
00104 }
00105
00107 // CWincvsView drawing
00108
00110 void CWincvsView::OnDraw(CDC* pDC)
00111 {
00112     //CWincvsDoc* pDoc = GetDocument();
00113     //ASSERT_VALID(pDoc);
00114
00115     // TODO: add draw code for native data here
00116     // TODO: also draw all OLE items in the document
00117
00118     // Draw the selection at an arbitrary position.  This code should be
00119     //  removed once your real drawing code is implemented.  This position
00120     //  corresponds exactly to the rectangle returned by CWincvsCntrItem,
00121     //  to give the effect of in-place editing.
00122
00123     // TODO: remove this code when final draw code is complete.
00124
00125     //if (m_pSelection == NULL)
00126     //{
00127     //  POSITION pos = pDoc->GetStartPosition();
00128     //  m_pSelection = (CWincvsCntrItem*)pDoc->GetNextClientItem(pos);
00129     //}
00130     //if (m_pSelection != NULL)
00131     //  m_pSelection->Draw(pDC, CRect(10, 10, 210, 210));
00132 }
00133
00135 void CWincvsView::OnInitialUpdate()
00136 {
00137     CRichEditView::OnInitialUpdate();
00138
00139     CRichEditCtrl& edit = GetRichEditCtrl();
00140     edit.SetSel(0, -1);
00141
00142     SetCharFormat((CCharFormat)gViewFont);
00143     edit.SetSel(-1, -1);
00144 }
00145
00147 // CWincvsView printing
00148
00150 BOOL CWincvsView::OnPreparePrinting(CPrintInfo* pInfo)
00151 {
00152     return DoPreparePrinting(pInfo);
00153     //return CRichEditView::OnPreparePrinting(pInfo);
00154 }
00155
00157 void CWincvsView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
00158 {
00159     // No extra initialization before printing
00160     CRichEditView::OnBeginPrinting(pDC, pInfo);
00161 }
00162
00164 void CWincvsView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
00165 {
00166     // No cleanup after printing
00167     CRichEditView::OnEndPrinting(pDC, pInfo);
00168 }
00169
00171 void CWincvsView::OnDestroy()
00172 {
00173     // Deactivate the item on destruction; this is important
00174     // when a splitter view is being used.
00175
00176     CRichEditView::OnDestroy();
00177
00178     //COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00179     //if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
00180     //{
00181     //  pActiveItem->Deactivate();
00182     //  ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00183     //}
00184 }
00185
00186
00188 // OLE Client support and commands
00189
00191 BOOL CWincvsView::IsSelected(const CObject* pDocItem) const
00192 {
00193     // The implementation below is adequate if your selection consists of
00194     //  only CWincvsCntrItem objects.  To handle different selection
00195     //  mechanisms, the implementation here should be replaced.
00196
00197     // TODO: implement this function that tests for a selected OLE client item
00198
00199     //return pDocItem == m_pSelection;
00200     return CRichEditView::IsSelected(pDocItem);
00201 }
00202
00203 #if 0
00204 // The following command handler provides the standard keyboard
00205 //  user interface to cancel an in-place editing session.  Here,
00206 //  the container (not the server) causes the deactivation.
00207 void CWincvsView::OnCancelEditCntr()
00208 {
00209     // Close any in-place active item on this view.
00210     COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00211     if (pActiveItem != NULL)
00212     {
00213         pActiveItem->Close();
00214     }
00215     ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
00216 }
00217 #endif
00218
00219
00222 void CWincvsView::OnSetFocus(CWnd* pOldWnd)
00223 {
00224 //  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00225 //  if (pActiveItem != NULL &&
00226 //      pActiveItem->GetItemState() == COleClientItem::activeUIState)
00227 //  {
00228         // need to set focus to this item if it is in the same view
00229 //      CWnd* pWnd = pActiveItem->GetInPlaceWindow();
00230 //      if (pWnd != NULL)
00231 //      {
00232 //          pWnd->SetFocus();   // don't call the base class
00233 //          return;
00234 //      }
00235 //  }
00236
00237     CRichEditView::OnSetFocus(pOldWnd);
00238 }
00239
00241 void CWincvsView::OnSize(UINT nType, int cx, int cy)
00242 {
00243     CRichEditView::OnSize(nType, cx, cy);
00244 //  COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
00245 //  if (pActiveItem != NULL)
00246 //      pActiveItem->SetItemRects();
00247 }
00248
00255 void CWincvsView::OutLine(const char* buf, int numbuf, bool isStderr)
00256 {
00257     CRichEditCtrl& edit = GetRichEditCtrl();
00258     edit.SetSel(-1, -1);
00259
00260     if( numbuf <= 0 )
00261     {
00262         return;
00263     }
00264
00265     WCHARFORMAT cf;
00266     cf.cbSize = sizeof(WCHARFORMAT);
00267     cf = GetCharFormatSelection();
00268
00269     bool colorChanged = false;
00270     COLORREF oldColor = cf.crTextColor;
00271     DWORD oldEffect = cf.dwEffects;
00272     CString strline(buf, numbuf);
00273
00274     if( strline.GetLength() >= 5 && strline[1] == ' ' &&
00275         (strline[0] == 'M' || strline[0] == 'C' || strline[0] == 'U' ||
00276         strline[0] == 'P' || strline[0] == 'N' || strline[0] == 'A' ||
00277         strline[0] == 'R' || strline[0] == 'I' || strline[0] == '?' ||
00278         strline[0] == '<' || strline[0] == '>') )
00279     {
00280         colorChanged = true;
00281
00282         switch(strline[0])
00283         {
00284         default:
00285         case '?' :
00286         case 'I' :
00287             cf.crTextColor = RGB(0x80, 0x80, 0x00);
00288             break;
00289         case 'U' :
00290         case 'N' :
00291             cf.crTextColor = RGB(0x00, 0xA0, 0x00);
00292             break;
00293         case 'M' :
00294         case 'A' :
00295         case 'R' :
00296             cf.crTextColor = RGB(0xFF, 0x00, 0xFF);
00297             break;
00298         case 'C' :
00299         case '<' :
00300             cf.crTextColor = RGB(0xFF, 0x00, 0x00);
00301             break;
00302         case '>' :
00303         case 'P' :
00304             cf.crTextColor = RGB(0x00, 0x00, 0xFF);
00305             break;
00306         }
00307
00308         cf.dwMask = CFM_COLOR;
00309         cf.dwEffects = 0;
00310         SetCharFormat(cf);
00311     }
00312     else if( isStderr )
00313     {
00314         colorChanged = true;
00315         cf.crTextColor = RGB(0xFF, 0x80, 0x00);
00316         cf.dwMask = CFM_COLOR;
00317         cf.dwEffects = 0;
00318         SetCharFormat(cf);
00319     }
00320
00321     edit.ReplaceSel(strline);
00322
00323     if( colorChanged )
00324     {
00325         cf.dwMask = CFM_COLOR;
00326         cf.crTextColor = oldColor;
00327         cf.dwEffects = oldEffect;
00328         SetCharFormat(cf);
00329     }
00330 }
00331
00338 WCHARFORMAT CWincvsView::GetCurFormat(bool jumpEnd /*= true*/)
00339 {
00340     CRichEditCtrl& edit = GetRichEditCtrl();
00341
00342     if( jumpEnd )
00343         edit.SetSel(-1, -1);
00344
00345     return GetCharFormatSelection();
00346 }
00347
00353 void CWincvsView::OutColor(const char* txt, long len)
00354 {
00355     // Synchronize
00356     CSingleLock lock(&m_syncObject);
00357     if( !lock.Lock(20000) )
00358     {
00359         ASSERT(FALSE); // Lock failed
00360         return;
00361     }
00362
00363     CString strText;
00364     for(int index = 0; index < len; index++)
00365     {
00366         char chr = *txt++;
00367         if( chr == 0x0d || chr == 0x0a )
00368         {
00369             strText += (char)0x0d;
00370             strText += (char)0x0a;
00371
00372             // special case if we got already \r\n
00373             if( (index + 1) < len && chr == 0x0d && txt[0] == 0x0a )
00374                 index++;
00375         }
00376         else
00377         {
00378             strText += chr;
00379         }
00380     }
00381
00382     CRichEditCtrl& edit = GetRichEditCtrl();
00383     edit.ReplaceSel(strText);
00384 }
00385
00390 void CWincvsView::OutColor(kConsoleColor color)
00391 {
00392     // Synchronize
00393     CSingleLock lock(&m_syncObject);
00394     if( !lock.Lock(20000) )
00395     {
00396         ASSERT(FALSE); // Lock failed
00397         return;
00398     }
00399
00400     CRichEditCtrl& edit = GetRichEditCtrl();
00401
00402     WCHARFORMAT cf = GetCurFormat(false);
00403     cf.dwEffects = 0;
00404
00405     switch(color)
00406     {
00407     default:
00408         return;
00409         break;
00410     case kBrown :
00411         cf.dwMask = CFM_COLOR;
00412         cf.crTextColor = RGB(0x80, 0x80, 0x00);
00413         break;
00414     case kGreen :
00415         cf.dwMask = CFM_COLOR;
00416         cf.crTextColor = RGB(0x00, 0xA0, 0x00);
00417         break;
00418     case kMagenta :
00419         cf.dwMask = CFM_COLOR;
00420         cf.crTextColor = RGB(0xFF, 0x00, 0xFF);
00421         break;
00422     case kRed :
00423         cf.dwMask = CFM_COLOR;
00424         cf.crTextColor = RGB(0xFF, 0x00, 0x00);
00425         break;
00426     case kBlue :
00427         cf.dwMask = CFM_COLOR;
00428         cf.crTextColor = RGB(0x00, 0x00, 0xFF);
00429         break;
00430     case kBold :
00431         cf.dwMask = CFM_BOLD;
00432         cf.dwEffects = CFE_BOLD;
00433         break;
00434     case kItalic :
00435         cf.dwMask = CFM_ITALIC;
00436         cf.dwEffects = CFE_ITALIC;
00437         break;
00438     case kUnderline :
00439         cf.dwMask = CFM_UNDERLINE;
00440         cf.dwEffects = CFE_UNDERLINE;
00441         break;
00442     }
00443
00444     SetCharFormat(cf);
00445 }
00446
00451 void CWincvsView::OutColor(WCHARFORMAT& format)
00452 {
00453     // Synchronize
00454     CSingleLock lock(&m_syncObject);
00455     if( !lock.Lock(20000) )
00456     {
00457         ASSERT(FALSE); // Lock failed
00458         return;
00459     }
00460
00461     CRichEditCtrl& edit = GetRichEditCtrl();
00462     SetCharFormat(format);
00463 }
00464
00471 void CWincvsView::OutConsole(const char* txt, long len, bool isStderr /*= false*/)
00472 {
00473     // Synchronize
00474     CSingleLock lock(&m_syncObject);
00475     if( !lock.Lock(20000) )
00476     {
00477         ASSERT(FALSE); // Lock failed
00478         return;
00479     }
00480
00481     if( len == 0 )
00482         return;
00483
00484     if( m_sbuf == 0L )
00485     {
00486         m_sbuf = (char*)malloc((MAX_CHAR_BY_LINE + 3) * sizeof(char));
00487         if( m_sbuf == 0L )
00488             return;
00489     }
00490
00491     int index = 0;
00492     char chr;
00493
00494     do{
00495         for(; index < len && m_snumbuf < MAX_CHAR_BY_LINE; m_snumbuf++)
00496         {
00497             chr = txt[index++];
00498
00499             if( chr == 0x0d || chr == 0x0a )
00500             {
00501                 // Newline
00502                 break;
00503             }
00504
00505             m_sbuf[m_snumbuf] = chr;
00506         }
00507
00508         // Special case if we got already \r\n
00509         if( index < len && chr == 0x0d && txt[index] == 0x0a )
00510         {
00511             index++;
00512         }
00513
00514         if( chr == 0x0d || chr == 0x0a || m_snumbuf == MAX_CHAR_BY_LINE )
00515         {
00516             m_sbuf[m_snumbuf++] = 0x0d;
00517             m_sbuf[m_snumbuf++] = 0x0a;
00518             m_sbuf[m_snumbuf++] = 0x00;
00519
00520             OutLine(m_sbuf, m_snumbuf, isStderr);
00521             m_snumbuf = 0;
00522         }
00523     }while( index < len );
00524 }
00525
00527 // CWincvsView diagnostics
00528
00529 #ifdef _DEBUG
00530 void CWincvsView::AssertValid() const
00531 {
00532     CRichEditView::AssertValid();
00533 }
00534
00535 void CWincvsView::Dump(CDumpContext& dc) const
00536 {
00537     CRichEditView::Dump(dc);
00538 }
00539
00540 CWincvsDoc* CWincvsView::GetDocument() // non-debug version is inline
00541 {
00542     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWincvsDoc)));
00543     return (CWincvsDoc*)m_pDocument;
00544 }
00545
00546 #endif //_DEBUG
00547
00549 // CWincvsView message handlers
00550
00552 void CWincvsView::OnMyFormatFont()
00553 {
00554     CRichEditCtrl& edit = GetRichEditCtrl();
00555     edit.SetSel(0, -1);
00556
00557     CRichEditView::OnFormatFont();
00558     edit.SetSel(-1, -1);
00559
00560     gViewFont = CCharFormat(GetCharFormatSelection());
00561     gCvsPrefs.save();
00562 }
00563
00565 void CWincvsView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00566 {
00567     CRichEditView::OnKeyDown(nChar, nRepCnt, nFlags);
00568
00569     if( nChar != VK_RETURN )
00570     {
00571         return;
00572     }
00573
00574     long len = GetTextLength();
00575     if( len == 0 )
00576         return;
00577
00578     TCHAR* buf = (char*)malloc((len + 1) * sizeof(TCHAR));
00579     if( buf == 0L )
00580         return;
00581
00582     TEXTRANGE textRange;
00583     textRange.chrg.cpMin = 0;
00584     textRange.chrg.cpMax = len;
00585     textRange.lpstrText = buf;
00586     GetRichEditCtrl().SendMessage(EM_GETTEXTRANGE, 0, (LPARAM)&textRange);
00587
00588     long nStartChar, nEndChar;
00589     GetRichEditCtrl().GetSel(nStartChar, nEndChar);
00590
00591     if( nStartChar == nEndChar ) // i.e. there is no selection
00592     {
00593         // Get the end and the beginning of the line
00594         if( nStartChar > 0 && buf[nStartChar] == '\r' )
00595             nStartChar--;
00596
00597         while( nStartChar > 0 && buf[nStartChar] != '\n' && buf[nStartChar] != '\r' )
00598             nStartChar--;
00599
00600         if( buf[nStartChar] == '\n' || buf[nStartChar] == '\r' )
00601             nStartChar++;
00602
00603         while( nEndChar < len && buf[nEndChar] != '\n' && buf[nEndChar] != '\r' )
00604             nEndChar++;
00605     }
00606
00607     long length = nEndChar - nStartChar;
00608     if( length > 0 && nStartChar < len )
00609     {
00610         OutConsole("\n", 1);
00611         buf[nEndChar] = '\0';
00612
00613         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00614
00615         if( gCvsPrefs.GetUseShell() == SHELL_PYTHON && app->HasPython() )
00616         {
00617             CPython_Interp interp;
00618             interp.DoScript(buf + nStartChar);
00619         }
00620         else if( gCvsPrefs.GetUseShell() == SHELL_TCL && app->HasTCL() )
00621         {
00622             CTcl_Interp interp;
00623             interp.DoScript(buf + nStartChar);
00624         }
00625     }
00626
00627     free(buf);
00628 }
00629
00631 HRESULT CWincvsView::QueryAcceptData(LPDATAOBJECT lpdataobj, CLIPFORMAT* lpcfFormat, DWORD dwReco, BOOL bReally, HGLOBAL hMetaPict)
00632 {
00633     ASSERT(lpcfFormat != NULL);
00634     if( !bReally ) // not actually pasting
00635         return S_OK;
00636
00637     // If direct pasting a particular native format allow it
00638     if( IsRichEditFormat(*lpcfFormat) )
00639         return S_OK;
00640
00641     COleDataObject dataobj;
00642     dataobj.Attach(lpdataobj, FALSE);
00643
00644     // If format is 0, then force particular formats if available
00645     if( *lpcfFormat == 0 && (m_nPasteType == 0) )
00646     {
00647         if( m_fRtfFormat != 0 && dataobj.IsDataAvailable(m_fRtfFormat)) // native avail, let rich edit do as it wants
00648         {
00649             *lpcfFormat = m_fRtfFormat;
00650             return S_OK;
00651         }
00652         else if (dataobj.IsDataAvailable(CF_TEXT))
00653         {
00654             *lpcfFormat = CF_TEXT;
00655             return S_OK;
00656         }
00657     }
00658
00659     // *DO NOT* paste OLE formats
00660     // Crash reported by Gerhard Möller
00661     //DoPaste(dataobj, *lpcfFormat, hMetaPict);
00662
00663     return S_FALSE;
00664 }
00665
00670 BOOL CWincvsView::CanPaste() const
00671 {
00672     return (CountClipboardFormats() != 0) &&
00673         (IsClipboardFormatAvailable(CF_TEXT) ||
00674         IsClipboardFormatAvailable(m_fRtfFormat) ||
00675         //IsClipboardFormatAvailable(_oleData.cfEmbedSource) ||
00676         //IsClipboardFormatAvailable(_oleData.cfEmbeddedObject) ||
00677         //IsClipboardFormatAvailable(_oleData.cfFileName) ||
00678         //IsClipboardFormatAvailable(_oleData.cfFileNameW) ||
00679         //IsClipboardFormatAvailable(CF_METAFILEPICT) ||
00680         //IsClipboardFormatAvailable(CF_DIB) ||
00681         //IsClipboardFormatAvailable(CF_BITMAP) ||
00682         GetRichEditCtrl().CanPaste());
00683 }
00684
00686 void CWincvsView::OnDropFiles(HDROP hDropInfo)
00687 {
00688     CWnd* pWnd = AfxGetMainWnd();   //look in InitInstance m_pMainWnd = m_mainFrame;
00689
00690     if( pWnd )
00691     {
00692         CMainFrame* pMainFrame = (CMainFrame*)pWnd;
00693
00694         if( pMainFrame->GetSafeHwnd() != NULL )
00695         {
00696             pMainFrame->DropFiles( hDropInfo );
00697         }
00698     }
00699
00700     //this cause the crash, remove
00701     //CRichEditView::OnDropFiles(hDropInfo);
00702 }
00703
00705 void CWincvsView::OnEditClearAll()
00706 {
00707     CRichEditCtrl& edit = GetRichEditCtrl();
00708     edit.SetSel(0, -1);
00709     SetCharFormat((CCharFormat)gViewFont);
00710     edit.ReplaceSel("", TRUE);
00711 }
00712
00714 void CWincvsView::OnRButtonDown(UINT nFlags, CPoint point)
00715 {
00716     ClientToScreen(&point);
00717     OnContextMenu(this, point);
00718
00719     //CRichEditView::OnRButtonDown(nFlags, point);
00720 }
00721
00723 void CWincvsView::OnContextMenu(CWnd* pWnd, CPoint point)
00724 {
00725     CMenu* pSubMenu = ::GetSubCMenu(ID_EDIT_UNDO, this);
00726     if( pSubMenu )
00727     {
00728         // Set the track point in case it's not the mouse click
00729         if( -1 == point.x && -1 == point.y )
00730         {
00731             // Set the top left corner
00732             point.x = 0;
00733             point.y = 0;
00734             ClientToScreen(&point);
00735         }
00736
00737         pSubMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, this);
00738     }
00739 }
00740
00742 UINT CWincvsView::OnGetDlgCode()
00743 {
00744     LRESULT DlgCode = CRichEditView::OnGetDlgCode();
00745
00746     if( 0x8000 & GetKeyState(VK_TAB) )
00747         return DlgCode & ~(DLGC_WANTTAB | DLGC_WANTALLKEYS | DLGC_WANTCHARS);
00748     else
00749         return DlgCode;
00750 }
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ColumnIndex Member List

This is the complete list of members for ColumnIndex, including all inherited members.

ColumnIndex() | ColumnIndex | [private]
GetColumnName(const int index, const bool shortName=true) | ColumnIndex | [static]
kConflict enum value | ColumnIndex |
kEncoding enum value | ColumnIndex |
kEnd enum value | ColumnIndex |
kExtention enum value | ColumnIndex |
kName enum value | ColumnIndex |
kOption enum value | ColumnIndex |
kPath enum value | ColumnIndex |
kRevision enum value | ColumnIndex |
kState enum value | ColumnIndex |
kStickyTag enum value | ColumnIndex |
kTimeStamp enum value | ColumnIndex |

Generated on Sat Aug 7 22:55:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HistComboBoxEx.cpp Source File

WinCvs/HistComboBoxEx.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- July 2001
00019  */
00020
00021 // HistComboBoxEx.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include "HistComboBoxEx.h"
00027 #include "FileTraversal.h"
00028 #include "CvsEntries.h"
00029
00030 #include "MainFrm.h"
00031 #include "CvsAlert.h"
00032 #include "CvsCommands.h"
00033
00034 #ifdef _DEBUG
00035 #define new DEBUG_NEW
00036 #undef THIS_FILE
00037 static char THIS_FILE[] = __FILE__;
00038 #endif
00039
00041 PCPStr gOldLoc("P_BrowserLoc", "C:\\");
00042
00048 int TraverseHistory(CHistComboBoxEx& browseHist)
00049 {
00050     CWaitCursor waitCursor;
00051
00052     char szPath[MAX_PATH] = "";
00053     for(int nIndex = 0; nIndex < browseHist.GetCount(); nIndex++)
00054     {
00055         COMBOBOXEXITEM cbi = { 0 };
00056         cbi.mask = CBEIF_TEXT;
00057         cbi.iItem = nIndex;
00058         cbi.pszText = szPath;
00059         cbi.cchTextMax = MAX_PATH - 1;
00060
00061         browseHist.GetItem(&cbi);
00062         browseHist.SetIcon(cbi, true);
00063     }
00064
00065     return nIndex;
00066 }
00067
00069 // CHistComboBoxEx
00070
00071 CHistComboBoxEx::CHistComboBoxEx(int feature /*= USmartCombo::DefaultFeature*/)
00072     : USmartCombo(feature)
00073 {
00074 }
00075
00076 CHistComboBoxEx::~CHistComboBoxEx()
00077 {
00078 }
00079
00080
00081 BEGIN_MESSAGE_MAP(CHistComboBoxEx, CComboBoxEx)
00082     //{{AFX_MSG_MAP(CHistComboBoxEx)
00083     ON_CONTROL_REFLECT(CBN_DROPDOWN, OnDropdown)
00084     //}}AFX_MSG_MAP
00085 END_MESSAGE_MAP()
00086
00088 // CHistComboBoxEx message handlers
00089
00094 const char* CHistComboBoxEx::GetOldLoc()
00095 {
00096     return gOldLoc;
00097 }
00098
00104 int CHistComboBoxEx::NewRoot(const char* root)
00105 {
00106     if( stricmp(gOldLoc, root) != 0 )
00107         gOldLoc = root;
00108
00109     CMString* pstrItems = GetItems();
00110     ASSERT(pstrItems != NULL);
00111
00112     // Update the history combo
00113     pstrItems->Insert(root);
00114     ResetContent();
00115
00116     const std::vector<CStr>& list = pstrItems->GetList();
00117     std::vector<CStr>::const_iterator i;
00118     for(i = list.begin(); i != list.end(); ++i)
00119     {
00120         InsertString(-1, *i);
00121     }
00122
00123     if( GetCount() )
00124     {
00125         // Set the selection and the status icon
00126         CString strText;
00127
00128         COMBOBOXEXITEM cbi = { 0 };
00129         cbi.mask = CBEIF_TEXT;
00130         cbi.iItem = 0;
00131         cbi.pszText = strText.GetBuffer(MAX_PATH);
00132         cbi.cchTextMax = MAX_PATH - 1;
00133
00134         if( GetItem(&cbi) )
00135         {
00136             SetIcon(cbi, true);
00137         }
00138
00139         strText.ReleaseBuffer();
00140
00141         SetCurSel(0);
00142     }
00143
00144     return GetCount();
00145 }
00146
00154 CString CHistComboBoxEx::FindBestRoot(CMString& strItems, const char* path, bool mustExist /*= false*/)
00155 {
00156     CString normPath(path);
00157     CString bestRoot;
00158     normPath.TrimRight("\\/");
00159     normPath.MakeLower();
00160
00161     const std::vector<CStr> & list = strItems.GetList();
00162     std::vector<CStr>::const_iterator i;
00163     for(i = list.begin(); i != list.end(); ++i)
00164     {
00165         CString root = *i;
00166         root.TrimRight("\\/");
00167         root.MakeLower();
00168
00169         if( normPath.Find(root) != -1 )
00170         {
00171             // We want the longest root so it's near the file
00172             if( root.GetLength() > bestRoot.GetLength() )
00173             {
00174                 bestRoot = *i;
00175             }
00176         }
00177     }
00178
00179     if( !mustExist && bestRoot.IsEmpty() )
00180     {
00181         bestRoot = path;
00182         bestRoot.TrimRight("\\/");
00183     }
00184
00185     // Handle the drive root
00186     if( bestRoot.GetAllocLength() &&
00187         ':' == bestRoot[bestRoot.GetLength()-1])
00188     {
00189         bestRoot += kPathDelimiter;
00190     }
00191
00192     return bestRoot;
00193 }
00194
00202 int CHistComboBoxEx::InsertString(int nIndex, LPCTSTR lpszString)
00203 {
00204     int nRes = -1;
00205
00206     COMBOBOXEXITEM cbi = { 0 };
00207     cbi.mask = CBEIF_TEXT;
00208     cbi.iItem = 0 > nIndex ? GetCount() : nIndex;
00209     cbi.pszText = (LPTSTR)lpszString;   // This cast is safe because we are inserting an item only
00210     cbi.cchTextMax = 0;
00211
00212     nRes = InsertItem(&cbi);
00213     SetIcon(cbi, false);
00214
00215     return nRes;
00216 }
00217
00223 int CHistComboBoxEx::AddString(LPCTSTR lpszString)
00224 {
00225     return InsertString(-1, lpszString);
00226 }
00227
00234 BOOL CHistComboBoxEx::SetIcon(COMBOBOXEXITEM cbi, bool showStatus)
00235 {
00236     // Initialize the image list if necessary
00237     if( m_imageList.m_hImageList == 0L )
00238     {
00239         m_imageList.Create(IDB_HISTLOC, HISTLOC_IMAGE_CX, 1, RGB(255, 255, 255));
00240         SetImageList(&m_imageList);
00241     }
00242
00243     cbi.mask = CBEIF_IMAGE | /*CBEIF_OVERLAY |*/ CBEIF_SELECTEDIMAGE;
00244     cbi.iImage = cbi.iSelectedImage = kLocationIconUnknown;
00245     //cbi.iOverlay = ;
00246
00247     if( showStatus )
00248     {
00249         CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00250         vector<CStr> ignlist;
00251         struct stat sb;
00252         const char *fullpath = cbi.pszText;
00253
00254         int statres = stat(fullpath, &sb);
00255         if( statres != -1 )
00256         {
00257             if( S_ISDIR(sb.st_mode) )
00258             {
00259                 CStr uppath, folder;
00260                 if( !SplitPath(fullpath, uppath, folder) || uppath.empty() )
00261                 {
00262                     uppath = fullpath;
00263                     folder = ".";
00264                 }
00265
00266                 BuildIgnoredList(ignlist, uppath);
00267
00268                 EntnodeData *data = Entries_SetVisited(uppath, entries, folder, sb, true, &ignlist);
00269                 data->Ref();
00270
00271                 if( !data->IsUnknown() )
00272                 {
00273                     cbi.iImage = cbi.iSelectedImage = kLocationIcon;
00274                 }
00275
00276                 if( data->IsIgnored() )
00277                 {
00278                     cbi.iImage = cbi.iSelectedImage = kLocationIconIgnored;
00279                 }
00280
00281                 if( data->IsMissing() )
00282                 {
00283                     cbi.iImage = cbi.iSelectedImage = kLocationIconMissing;
00284                 }
00285
00286                 data->UnRef();
00287             }
00288         }
00289         else
00290         {
00291             cbi.iImage = cbi.iSelectedImage = kLocationIconErased;
00292         }
00293     }
00294
00295     return SetItem(&cbi);
00296 }
00297
00299 BOOL CHistComboBoxEx::PreTranslateMessage(MSG* pMsg)
00300 {
00301     if( HasFeature(USmartCombo::RemoveItems) )
00302     {
00303         if( DelKeyTest(pMsg) )
00304         {
00305             return TRUE;
00306         }
00307     }
00308
00309     return CComboBoxEx::PreTranslateMessage(pMsg);
00310 }
00311
00313 void CHistComboBoxEx::OnDropdown()
00314 {
00315     TraverseHistory(*this);
00316     if( HasFeature(USmartCombo::AutoDropWidth) )
00317     {
00318         SetDroppedWidth(CalcDroppedWidth());
00319     }
00320 }
00321
00327 int CHistComboBoxEx::CalcDroppedWidth()
00328 {
00329     int maxSize = 0;
00330
00331     CClientDC ClientDC(this);
00332     int savedDc = ClientDC.SaveDC();
00333     ClientDC.SelectObject(GetFont());
00334
00335     CString strLBText;
00336     for(int nIndex = 0; nIndex < GetCount(); nIndex++)
00337     {
00338         GetLBText(nIndex, strLBText);
00339         CSize size = ClientDC.GetTextExtent(strLBText);
00340
00341         if( size.cx > maxSize )
00342         {
00343             maxSize = size.cx;
00344         }
00345     }
00346
00347     ClientDC.RestoreDC(savedDc);
00348
00349     maxSize += ::GetSystemMetrics(SM_CXVSCROLL)     // Vertical scroll bar
00350         + 4*::GetSystemMetrics(SM_CXEDGE)           // The border aroung the text and icon: Edge-Icon-Edge - Edge-Text-Edge
00351         + HISTLOC_IMAGE_CX                          // The icon width
00352         + 2;                                        // The focus frame width
00353
00354     CRect rect;
00355     GetWindowRect(rect);
00356     maxSize = min(ClientDC.GetDeviceCaps(HORZRES) - rect.TopLeft().x, maxSize);
00357
00358     return maxSize;
00359 }
00360
00367 BOOL CHistComboBoxEx::DelKeyTest(MSG* pMsg)
00368 {
00369     CMString* pstrItems = GetItems();
00370     ASSERT(pstrItems != NULL);
00371
00372     BOOL bRes = FALSE;
00373
00374     if( WM_KEYDOWN == pMsg->message &&
00375         VK_DELETE == (int)pMsg->wParam &&
00376         pstrItems &&
00377         GetDroppedState() )
00378     {
00379         const int sel = GetCurSel();
00380         if( sel > CB_ERR && GetCount() > 1 )
00381         {
00382             CString strItem;
00383             GetLBText(sel, strItem);
00384
00385             if( RemoveItem(strItem) )
00386             {
00387                 DeleteString(sel);
00388
00389                 if( GetCount() )
00390                 {
00391                     const int nNewSel = (sel == 0 ? sel : (GetCount() ? 0 : -1));
00392                     if( nNewSel != 0 || sel == 0 )
00393                     {
00394                         SetCurSel(nNewSel);
00395
00396                         // Trigger the location change for all views
00397                         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00398                         CMainFrame* mainFrm = app->GetMainFrame();
00399                         mainFrm->ChangeLocation();
00400                     }
00401                 }
00402             }
00403         }
00404         else if( GetCount() == 1 )
00405         {
00406             CvsAlert(kCvsAlertStopIcon,
00407                 "Can't remove the last item from the history.", "Please add a new location first before removing the current one.",
00408                 BUTTONTITLE_OK, NULL).ShowAlert();
00409         }
00410
00411         // We have to prevent it going to another window
00412         bRes = TRUE;
00413     }
00414
00415     return bRes;
00416 }
00417
00419 LRESULT CHistComboBoxEx::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
00420 {
00421     if( CB_GETLBTEXTLEN == message )
00422     {
00423         const int index = (int)wParam;
00424         if( index < GetCount() )
00425         {
00426             char szBuffer[MAX_PATH] = "";
00427
00428             COMBOBOXEXITEM cbi = { 0 };
00429             cbi.mask = CBEIF_TEXT;
00430             cbi.iItem = index;
00431             cbi.pszText = szBuffer;
00432             cbi.cchTextMax = MAX_PATH - 1;
00433
00434             if( GetItem(&cbi) )
00435             {
00436                 return strlen(szBuffer);
00437             }
00438         }
00439     }
00440     else if( CB_GETLBTEXT == message )
00441     {
00442         const int index = (int)wParam;
00443         if( index < GetCount() )
00444         {
00445             LPSTR szBuffer = (LPSTR)lParam;
00446
00447             COMBOBOXEXITEM cbi = { 0 };
00448             cbi.mask = CBEIF_TEXT;
00449             cbi.iItem = index;
00450             cbi.pszText = szBuffer;
00451             cbi.cchTextMax = MAX_PATH - 1;
00452
00453             if( GetItem(&cbi) )
00454             {
00455                 return strlen(szBuffer);
00456             }
00457         }
00458     }
00459
00460     return CComboBoxEx::WindowProc(message, wParam, lParam);
00461 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvsDoc.cpp Source File

WinCvs/wincvsDoc.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // wincvsDoc.cpp : implementation of the CWincvsDoc class
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include <afxrich.h>
00027
00028 #include "wincvsDoc.h"
00029 #include "CvsCommands.h"
00030 #include "GetPrefs.h"
00031 #include "Authen.h"
00032 #include "CvsPrefs.h"
00033 #include "AppConsole.h"
00034 #include "PromptFiles.h"
00035 #include "WinCvsBrowser.h"
00036 #include "TclGlue.h"
00037 #include "PythonGlue.h"
00038 #include "MacrosSetup.h"
00039 #include "cvsgui_process.h"
00040 #include "Appglue.h"
00041 #include "BrowseViewHandlers.h"
00042 #include "wincvs_winutil.h"
00043 #include "CvsAlert.h"
00044 #include "wincvsView.h"
00045
00046 #ifdef _DEBUG
00047 #define new DEBUG_NEW
00048 #undef THIS_FILE
00049 static char THIS_FILE[] = __FILE__;
00050 #endif
00051
00053 // CWincvsDoc
00054
00055 IMPLEMENT_DYNCREATE(CWincvsDoc, CDocument)
00056
00057 BEGIN_MESSAGE_MAP(CWincvsDoc, CDocument)
00058     //{{AFX_MSG_MAP(CWincvsDoc)
00059     ON_COMMAND(ID_APP_PREFERENCES, OnAppPreferences)
00060     ON_COMMAND(ID_APP_RTAGCREATE, OnAppRtagNew)
00061     ON_COMMAND(ID_APP_RTAGDELETE, OnAppRtagDelete)
00062     ON_COMMAND(ID_APP_RTAGBRANCH, OnAppRtagBranch)
00063     ON_COMMAND(ID_APP_CMDLINE, OnAppCmdline)
00064     ON_UPDATE_COMMAND_UI(ID_APP_RTAGCREATE, OnUpdateCvsCmd)
00065     ON_UPDATE_COMMAND_UI(ID_APP_PREFERENCES, OnUpdatePrefs)
00066     ON_COMMAND(ID_BROWSER_OPEN, OnBrowserOpen)
00067     ON_COMMAND(ID_APP_LOGIN, OnAppLogin)
00068 //  ON_UPDATE_COMMAND_UI(ID_MACRO_ADMIN, OnUpdateMacroAdmin)
00069     ON_COMMAND(ID_APP_LOGOUT, OnAppLogout)
00070     ON_COMMAND(ID_VIEW_INIT, OnViewInit)
00071     ON_COMMAND(ID_SAVESETTINGS, OnSavesettings)
00072     ON_UPDATE_COMMAND_UI(ID_SAVESETTINGS, OnUpdateSavesettings)
00073     ON_COMMAND(ID_VIEW_BROWSELOCATION_REMOVEUNWANTED, OnViewBrowselocationRemoveunwanted)
00074     ON_UPDATE_COMMAND_UI(ID_VIEW_INIT, OnUpdateCvsCmd)
00075     ON_UPDATE_COMMAND_UI(ID_APP_RTAGDELETE, OnUpdateCvsCmd)
00076     ON_UPDATE_COMMAND_UI(ID_APP_RTAGBRANCH, OnUpdateCvsCmd)
00077     ON_UPDATE_COMMAND_UI(ID_APP_CMDLINE, OnUpdateCvsCmd)
00078     ON_UPDATE_COMMAND_UI(ID_APP_LOGIN, OnUpdateCvsCmd)
00079     ON_UPDATE_COMMAND_UI(ID_BROWSER_OPEN, OnUpdateCvsCmd)
00080     ON_UPDATE_COMMAND_UI(ID_APP_LOGOUT, OnUpdateCvsCmd)
00081     ON_UPDATE_COMMAND_UI(ID_VIEW_BROWSELOCATION_REMOVEUNWANTED, OnUpdateCvsCmd)
00082     ON_COMMAND(ID_USE_PYSHELL, OnUsePyshell)
00083     ON_UPDATE_COMMAND_UI(ID_USE_PYSHELL, OnUpdateUsePyshell)
00084     ON_COMMAND(ID_USE_TCLSHELL, OnUseTclshell)
00085     ON_UPDATE_COMMAND_UI(ID_USE_TCLSHELL, OnUpdateUseTclshell)
00086     //}}AFX_MSG_MAP
00087     // Enable default OLE container implementation
00088     //ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, CDocument::OnUpdatePasteMenu)
00089 //  ON_COMMAND_EX_RANGE(ID_MACRO_ADMIN, ID_MACRO_ADMIN + 99, OnMacroAdmin)
00090 //  ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00091 //  ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00092 END_MESSAGE_MAP()
00093
00094 BEGIN_DISPATCH_MAP(CWincvsDoc, CDocument)
00095     //{{AFX_DISPATCH_MAP(CWincvsDoc)
00096     DISP_PROPERTY_NOTIFY(CWincvsDoc, "ViewPath", m_viewPath, OnViewPathChanged, VT_BSTR)
00097     //}}AFX_DISPATCH_MAP
00098 END_DISPATCH_MAP()
00099
00100 // Note: we add support for IID_IWincvs to support typesafe binding
00101 //  from VBA.  This IID must match the GUID that is attached to the
00102 //  dispinterface in the .ODL file.
00103
00104 // {D2D77DC4-8299-11D1-8949-444553540000}
00105 static const IID IID_IWincvs =
00106 { 0xd2d77dc4, 0x8299, 0x11d1, { 0x89, 0x49, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 } };
00107
00108 BEGIN_INTERFACE_MAP(CWincvsDoc, CDocument)
00109     INTERFACE_PART(CWincvsDoc, IID_IWincvs, Dispatch)
00110 END_INTERFACE_MAP()
00111
00113 // CWincvsDoc construction/destruction
00114
00115 CWincvsDoc::CWincvsDoc()
00116 {
00117     // Use OLE compound files
00118     //EnableCompoundFile();
00119
00120     // TODO: add one-time construction code here
00121
00122     //EnableAutomation();
00123
00124     //AfxOleLockApp();
00125 }
00126
00127 CWincvsDoc::~CWincvsDoc()
00128 {
00129     //AfxOleUnlockApp();
00130 }
00131
00133 BOOL CWincvsDoc::OnNewDocument()
00134 {
00135     if (!CDocument::OnNewDocument())
00136         return FALSE;
00137
00138     return TRUE;
00139 }
00140
00142 // CWincvsDoc serialization
00143
00144 class _afxRichEditCookie
00145 {
00146 public:
00147     CArchive& m_ar;
00148     DWORD m_dwError;
00149     _afxRichEditCookie(CArchive& ar) : m_ar(ar) {m_dwError=0;}
00150 };
00151
00152 // return 0 for no error, otherwise return error code
00153 extern "C" DWORD CALLBACK EditStreamCallBack(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
00154 {
00155     _afxRichEditCookie* pCookie = (_afxRichEditCookie*)dwCookie;
00156     CArchive& ar = pCookie->m_ar;
00157     ar.Flush();
00158     DWORD dw = 0;
00159     *pcb = cb;
00160     TRY
00161     {
00162         if (ar.IsStoring())
00163             ar.GetFile()->Write(pbBuff, cb);
00164         else
00165             *pcb = ar.GetFile()->Read(pbBuff, cb);
00166     }
00167     CATCH(CFileException, e)
00168     {
00169         *pcb = 0;
00170         pCookie->m_dwError = (DWORD)e->m_cause;
00171         dw = 1;
00172     }
00173     AND_CATCH_ALL(e)
00174     {
00175         *pcb = 0;
00176         pCookie->m_dwError = (DWORD)CFileException::generic;
00177         dw = 1;
00178     }
00179     END_CATCH_ALL
00180     return dw;
00181 }
00182
00183 void CWincvsDoc::Serialize(CArchive& ar)
00184 {
00185     if (ar.IsStoring())
00186     {
00187         CWinApp* app = AfxGetApp();
00188         CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00189         if( view && view->IsKindOf(RUNTIME_CLASS(CRichEditView)) )
00190         {
00191             int nFormat = SF_TEXT;
00192             EDITSTREAM es = {0, 0, (EDITSTREAMCALLBACK)EditStreamCallBack};
00193             _afxRichEditCookie cookie(ar);
00194             es.dwCookie = (DWORD)&cookie;
00195             ((CRichEditView*)view)->GetRichEditCtrl().StreamOut(nFormat, es);
00196         }
00197
00198         /*
00199         // This doesn't work because our view is actually a frame
00200         POSITION pos = GetFirstViewPosition();
00201         CView* view;
00202         while((view = GetNextView(pos)) != NULL)
00203         {
00204             if(view->IsKindOf(RUNTIME_CLASS(CRichEditView)))
00205             {
00206                 int nFormat = SF_TEXT;
00207                 EDITSTREAM es = {0, 0, (EDITSTREAMCALLBACK)EditStreamCallBack};
00208                 _afxRichEditCookie cookie(ar);
00209                 es.dwCookie = (DWORD)&cookie;
00210                 ((CRichEditView *)view)->GetRichEditCtrl().StreamOut(nFormat, es);
00211                 break;
00212             }
00213         }
00214         */
00215     }
00216     else
00217     {
00218         // We don't load right now
00219     }
00220
00221     // Calling the base class CDocument enables serialization
00222     //  of the container document's COleClientItem objects.
00223     // (but we don't have COleClientItem)
00224     CDocument::Serialize(ar);
00225 }
00226
00228 // CWincvsDoc diagnostics
00229
00230 #ifdef _DEBUG
00231 void CWincvsDoc::AssertValid() const
00232 {
00233     CDocument::AssertValid();
00234 }
00235
00236 void CWincvsDoc::Dump(CDumpContext& dc) const
00237 {
00238     CDocument::Dump(dc);
00239 }
00240 #endif //_DEBUG
00241
00243 // CWincvsDoc commands
00244
00246 void CWincvsDoc::OnAppPreferences()
00247 {
00248     CompatGetPrefs();
00249 }
00250
00252 void CWincvsDoc::OnAppCmdline()
00253 {
00254     KoCommandLineHandler handler;
00255     CvsCmdCommandLine(handler);
00256 }
00257
00259 void CWincvsDoc::OnAppLogin()
00260 {
00261     CvsCmdLogin();
00262 }
00263
00265 void CWincvsDoc::OnUpdateCvsCmd(CCmdUI* pCmdUI)
00266 {
00267     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00268     pCmdUI->Enable(app->IsCvsRunning() ? FALSE : TRUE);
00269 }
00270
00272 void CWincvsDoc::OnUpdatePrefs(CCmdUI* pCmdUI)
00273 {
00274     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00275     pCmdUI->Enable(app->IsCvsRunning() ? FALSE : TRUE);
00276 }
00277
00279 void CWincvsDoc::OnBrowserOpen()
00280 {
00281     CStr newPath;
00282     if( BrowserGetDirectory("Select a folder to open with the browser", newPath) )
00283     {
00284         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00285         if( app )
00286         {
00287             CheckLocationDriveType(newPath);
00288             app->GetBrowserView()->ResetBrowser(newPath, true);
00289         }
00290     }
00291 }
00292
00294 void CWincvsDoc::OnViewPathChanged()
00295 {
00296     // TODO: Add notification handler code
00297
00298 }
00299
00301 void CWincvsDoc::OnAppRtagNew()
00302 {
00303     KoRtagCreateHandler handler;
00304     CvsCmdRtag(handler, kTagCreate);
00305 }
00306
00308 void CWincvsDoc::OnAppRtagDelete()
00309 {
00310     KoRtagDeleteHandler handler;
00311     CvsCmdRtag(handler, kTagDelete);
00312 }
00313
00315 void CWincvsDoc::OnAppRtagBranch()
00316 {
00317     KoRtagBranchHandler handler;
00318     CvsCmdRtag(handler, kTagBranch);
00319 }
00320
00322 BOOL CWincvsDoc::OnMacroAdmin(UINT nID)
00323 {
00324     CMacroEntry & entry = gMacrosAdmin.entries[nID - ID_MACRO_ADMIN];
00325     CvsCmdMacrosAdmin(entry.path);
00326
00327     return 1;
00328 }
00329
00331 void CWincvsDoc::OnUpdateMacroAdmin(CCmdUI* pCmdUI)
00332 {
00333     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00334     if( app->IsCvsRunning() || !app->HasTCL() )
00335     {
00336         pCmdUI->Enable(FALSE);
00337         return;
00338     }
00339
00340     if( pCmdUI->m_pSubMenu != 0L || pCmdUI->m_pMenu == 0L )
00341         return;
00342
00343     int iMRUMax = pCmdUI->m_pMenu->GetMenuItemCount();
00344     for (int iMRU = 0; iMRU < iMRUMax; iMRU++)
00345         pCmdUI->m_pMenu->DeleteMenu(pCmdUI->m_nID + iMRU, MF_BYCOMMAND);
00346
00347     vector<CMacroEntry>::const_iterator i;
00348     for(i = gMacrosAdmin.entries.begin(); i != gMacrosAdmin.entries.end(); ++i)
00349     {
00350         pCmdUI->m_pMenu->InsertMenu(pCmdUI->m_nIndex++,
00351             MF_STRING | MF_BYPOSITION, pCmdUI->m_nID++,
00352             (*i).name);
00353     }
00354
00355     pCmdUI->m_nIndexMax = pCmdUI->m_pMenu->GetMenuItemCount();
00356     pCmdUI->m_nIndex--; // point to last menu added
00357     pCmdUI->m_bEnableChanged = TRUE;    // all the added items are enabled
00358 }
00359
00361 void CWincvsDoc::OnAppLogout()
00362 {
00363     CvsCmdLogout();
00364 }
00365
00367 void CWincvsDoc::OnViewInit()
00368 {
00369     CvsCmdInit();
00370 }
00371
00373 void CWincvsDoc::OnSavesettings()
00374 {
00375     CWincvsApp* app = (CWincvsApp *)AfxGetApp();
00376     AskCreatePersistentSettings(app->GetBrowserView()->GetRoot());
00377 }
00378
00380 void CWincvsDoc::OnUpdateSavesettings(CCmdUI* pCmdUI)
00381 {
00382     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00383     pCmdUI->Enable(!app->IsCvsRunning());
00384 }
00385
00387 void CWincvsDoc::OnViewBrowselocationRemoveunwanted()
00388 {
00389     CvsAlert cvsAlert(kCvsAlertNoteIcon,
00390         "You can remove combo box items using Del key.", "To remove the unwanted location history items click Del key when selecting from the combo box list.");
00391
00392     cvsAlert.ShowAlert();
00393 }
00394
00396 void CWincvsDoc::OnUsePyshell()
00397 {
00398     gCvsPrefs.SetUseShell(SHELL_PYTHON);
00399     cvs_out("Switching the shell to Python...\n");
00400
00401     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00402     if( app )
00403     {
00404         app->RestartScriptEngine();
00405     }
00406 }
00407
00409 void CWincvsDoc::OnUpdateUsePyshell(CCmdUI* pCmdUI)
00410 {
00411     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00412
00413     pCmdUI->Enable(app && app->HasPython());
00414     pCmdUI->SetRadio(gCvsPrefs.GetUseShell() == SHELL_PYTHON);
00415 }
00416
00418 void CWincvsDoc::OnUseTclshell()
00419 {
00420     gCvsPrefs.SetUseShell(SHELL_TCL);
00421     cvs_out("Switching the shell to TCL...\n");
00422
00423     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00424     if( app )
00425     {
00426         app->RestartScriptEngine();
00427     }
00428 }
00429
00431 void CWincvsDoc::OnUpdateUseTclshell(CCmdUI* pCmdUI)
00432 {
00433     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00434
00435     pCmdUI->Enable(app && app->HasTCL());
00436     pCmdUI->SetRadio(gCvsPrefs.GetUseShell() == SHELL_TCL);
00437 }
00438
00440 void CWincvsDoc::SetTitle(LPCTSTR lpszTitle)
00441 {
00442     m_strPathName.LoadString(AFX_IDS_UNTITLED);
00443
00444     CDocument::SetTitle(lpszTitle);
00445 }
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsConsole.h Source File

common/UCvsConsole.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSCONSOLE_H
00026 #define UCVSCONSOLE_H
00027
00028 #include "uwidget.h"
00029 #include "AppConsole.h"
00030 #include <gdk/gdktypes.h>
00031
00032 struct UCOLOR
00033 {
00034     UCOLOR() {}
00035     UCOLOR(char _r, char _g, char _b) : r(_r), g(_g), b(_b) {}
00036
00037     unsigned char r;
00038     unsigned char g;
00039     unsigned char b;
00040 };
00041
00042 class UCvsConsole : public UWidget
00043 {
00044     UDECLARE_DYNAMIC(UCvsConsole)
00045 public:
00046     UCvsConsole();
00047     virtual ~UCvsConsole();
00048
00049     void setFont(const char *fontName);
00050
00051     void OutConsole(const char *txt, size_t len, bool isStderr = false);
00052
00053     void OutColor(const char *txt, long len);
00054     void OutColor(kConsoleColor color);
00055         // colorized output
00056 protected:
00057     void FeedThisLine(const char *buf, size_t numbuf, bool isStderr);
00058
00059     enum
00060     {
00061         MAX_CHAR_BY_LINE = 1024
00062     };
00063
00064     char *m_buf;
00065     size_t m_numbuf;
00066     GdkFont *m_font;
00067
00068     struct
00069     {
00070         UCOLOR col;
00071         bool bold, italic, underline;
00072     } out;
00073
00074     ev_msg void OnDestroy();
00075     ev_msg void OnCreate();
00076     ev_msg void OnEraseAll();
00077
00078     ev_msg void OnCmdUIEraseAll(UCmdUI* pCmdUI);
00079
00080     UDECLARE_MESSAGE_MAP()
00081 };
00082
00083 #endif
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/GfxOutBarCtrl.h Source File

WinCvs/CJLib/Include/GfxOutBarCtrl.h

Go to the documentation of this file.
00001 // Copyright (c) Iuri Apollonio 1998
00002 // Use & modify as you want & need, and leave those 3 lines.
00003 // http://www.codeguru.com
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/GfxOutBarCtrl.h $
00011  *
00012  * $History: GfxOutBarCtrl.h $
00013  *
00014  * *****************  Version 6  *****************
00015  * User: Kirk Stowell Date: 10/26/99   Time: 10:50p
00016  * Updated in $/CodeJock/Include
00017  * Made class methods virtual for inheritance purposes.
00018  *
00019  * *****************  Version 5  *****************
00020  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00021  * Updated in $/CodeJock/Include
00022  * Added source control history to file header.
00023  *
00024  ***************************************************************************/
00026
00027 #ifndef __GFXOUTBARCTRL_H__
00028 #define __GFXOUTBARCTRL_H__
00029
00030 #if _MSC_VER >= 1000
00031 #pragma once
00032 #endif // _MSC_VER >= 1000
00033 // GfxOutBarCtrl.h : header file
00034 //
00035
00037 // CGfxOutBarCtrl window
00038
00039 #include <afxcoll.h>
00040 #include "CJMenu.h"        // CCJMenu class declaration
00041
00042 #define WM_OUTBAR_NOTIFY        WM_USER + 1
00043 #define NM_OB_ITEMCLICK         1
00044 #define NM_OB_ONLABELENDEDIT    2
00045 #define NM_OB_ONGROUPENDEDIT    3
00046 #define NM_OB_DRAGITEM          4
00047 #define NM_FOLDERCHANGE         5
00048 #define NM_OB_ITEMHOVER         6
00049
00050 struct OUTBAR_INFO
00051 {
00052     int     index;
00053     int     iDragFrom;
00054     int     iDragTo;
00055
00056     LPCTSTR cText;
00057 };
00058
00059 class _CJX_EXT_CLASS CGfxOutBarCtrl : public CWnd
00060 {
00061 // Construction
00062     DECLARE_DYNCREATE(CGfxOutBarCtrl)
00063 public:
00064     CGfxOutBarCtrl();
00065
00066     enum {  fSmallIcon = 1 << 0, fLargeIcon = 1 << 1, fEditGroups = 1 << 2, fEditItems = 1 << 3,
00067             fRemoveGroups = 1 << 4, fRemoveItems = 1 << 5, fAddGroups = 1 << 6,
00068             fDragItems = 1 << 7, fAnimation = 1 << 8, fSelHighlight = 1 << 9 };
00069
00070     enum { ircIcon = 1, ircLabel = 2, ircAll = 3 };
00071
00072 // Attributes
00073 public:
00074     COLORREF    crBackGroundColor, crBackGroundColor1;
00075     COLORREF    crTextColor;
00076     COLORREF    cr3dFace, crLightBorder, crHilightBorder, crShadowBorder, crDkShadowBorder;
00077     int         iFolderHeight;
00078
00079     int         xSmallIconLabelOffset, yLargeIconLabelOffset;
00080     int         ySmallIconSpacing, yLargeIconSpacing;
00081
00082     int         xLeftMargin, yTopMargin;
00083     bool        bUpArrow, bDownArrow, bUpPressed, bDownPressed;
00084     CRect       rcUpArrow, rcDownArrow;
00085     bool        bLooping;
00086
00087     int         iHitInternal1, iHitInternal2;
00088
00089     long        lAnimationTickCount;
00090
00091     int         iLastSel, iSelAnimTiming;
00092     int         iSelAnimCount;
00093
00094
00095     DWORD       dwFlags;
00096
00097     CPtrArray   arFolder;
00098
00099     int         iLastFolderHighlighted;
00100     int         iLastSelectedFolder;
00101     int         iFirstItem;
00102
00103     int         iLastItemHighlighted;
00104     bool        bPressedHighlight;
00105
00106     int         iLastDragItemDraw, iLastDragItemDrawType;
00107
00108     class CBarItem
00109     {
00110     public:
00111         CBarItem( LPCTSTR name, const int image, DWORD exData);
00112         virtual  ~CBarItem();
00113         int             iImageIndex;
00114         LPTSTR          cItem;
00115         DWORD           dwData;
00116     };
00117
00118     class CBarFolder
00119     {
00120     public:
00121         CBarFolder( LPCTSTR name, DWORD exData);
00122         virtual  ~CBarFolder();
00123         int GetItemCount();
00124         int InsertItem( int index, LPCTSTR text, const int image, const DWORD exData);
00125         LPTSTR          cName;
00126         DWORD           dwData;
00127         CImageList *    pLargeImageList;
00128         CImageList *    pSmallImageList;
00129         CPtrArray       arItems;
00130         CWnd *          pChild;
00131     };
00132
00133     int iSelFolder;
00134
00135     CImageList *    pLargeImageList;
00136     CImageList *    pSmallImageList;
00137
00138     HCURSOR         hHandCursor;
00139     HCURSOR         hDragCursor;
00140     HCURSOR         hNoDragCursor;
00141
00142     CPen *          pBlackPen;
00143
00144     CCJMenu         m_popupMenu;    // popup menu fix...07-29-1999 - KStowell
00145     CString         m_strRemoveItem;
00146     CString         m_strRenameItem;
00147
00148 // Operations
00149 public:
00150     enum { htNothing = -1, htFolder, htItem, htUpScroll, htDownScroll};
00151
00152 // Overrides
00153     // ClassWizard generated virtual function overrides
00154     //{{AFX_VIRTUAL(CGfxOutBarCtrl)
00155     //}}AFX_VIRTUAL
00156
00157 // Implementation
00158 public:
00159     virtual void DrawAnimItem(const int xoffset, const int yoffset, const int index);
00160     virtual void SetAnimSelHighlight(const int iTime);
00161     virtual DWORD GetFolderData(int iFolder = -1);
00162     virtual CWnd * GetFolderChild(int iFolder = -1);
00163     virtual int AddFolderBar(LPCTSTR pFolder, CWnd * pSon, const DWORD exData = 0);
00164     virtual CString GetItemText(const int index);
00165     virtual void SetAnimationTickCount(const long value) { lAnimationTickCount = value; };
00166     virtual long GetAnimationTickCount() { return lAnimationTickCount; };
00167
00168     virtual void AnimateFolderScroll(const int iFrom, const int iTo);
00169     virtual int GetDragItemRect(const int index, CRect &rect);
00170     virtual void DrawDragArrow(CDC * pDC, const int iFrom, const int iTo);
00171     virtual void SetItemImage(const int index, const int iImage);
00172     virtual void SetItemData(const int index, const DWORD dwData);
00173     virtual int  GetItemImage(const int index) const;
00174     virtual DWORD GetItemData(const int index) const;
00175     virtual bool IsValidItem(const int index) const;
00176     virtual void RemoveItem(const int index);
00177     virtual void SetItemText(const int index, LPCTSTR text);
00178     virtual void StartItemEdit(const int index);
00179     virtual void SetFolderText(const int index, LPCTSTR text);
00180     virtual void StartGroupEdit(const int index);
00181     virtual void GetLabelRect(const int iFolder, const int iIndex, CRect &rect);
00182     virtual void GetIconRect(const int iFolder, const int iIndex, CRect &rect);
00183     virtual void HighlightItem(const int index, const bool bPressed = false);
00184     virtual void GetVisibleRange(const int iFolder, int &first, int &last);
00185     virtual void DrawItem(CDC * pDC, const int iFolder, CRect rc, const int index, const bool bOnlyImage = false);
00186     virtual CImageList * GetFolderImageList(const int index, const bool bSmall) const;
00187     virtual CSize GetItemSize(const int iFolder, const int index, const int type);
00188     virtual void PaintItems(CDC * pDC, const int iFolder, CRect rc);
00189     virtual CImageList * GetImageList(CImageList * pImageList, int nImageList);
00190     virtual CImageList * SetFolderImageList(const int folder, CImageList * pImageList, int nImageList);
00191     virtual CImageList * SetImageList(CImageList * pImageList, int nImageList);
00192     virtual int GetCountPerPage() const;
00193     virtual void RemoveFolder(const int index);
00194     virtual int GetSelFolder() const;
00195     virtual int GetFolderCount() const;
00196     virtual void SetSelFolder(const int index);
00197     virtual int GetItemCount() const;
00198     virtual int InsertItem(const int folder, const int index, LPCTSTR text, const int image = -1, const DWORD exData = 0);
00199     virtual void HighlightFolder(const int index);
00200     virtual int HitTestEx(const CPoint &point, int &index);
00201     virtual void GetInsideRect(CRect &rect) const;
00202     virtual int AddFolder(LPCTSTR cFolderName, const DWORD exData);
00203     virtual void GetItemRect(const int iFolder, const int iIndex, CRect &rect);
00204     virtual bool GetFolderRect(const int iIndex, CRect &rect) const;
00205     virtual void ModifyFlag(const DWORD &dwRemove, const DWORD &dwAdd, const UINT redraw = 0);
00206     virtual DWORD GetFlag() const;
00207     virtual void SetSmallIconView(const bool bSet);
00208     virtual bool IsSmallIconView() const;
00209     virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd * pParentWnd, UINT nID, const DWORD dwFlag = fDragItems|fEditGroups|fEditItems|fRemoveGroups|fRemoveItems|fAddGroups|fAnimation|fSelHighlight);
00210     virtual ~CGfxOutBarCtrl();
00211
00212     // Generated message map functions
00213 protected:
00214     void DrawFolder(CDC * pDC, const int iIdx, CRect rect, const bool bSelected);
00215     //{{AFX_MSG(CGfxOutBarCtrl)
00216     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00217     afx_msg void OnTimer(UINT nIDEvent);
00218     afx_msg void OnPaint();
00219     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00220     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00221     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00222     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00223     afx_msg void OnSize(UINT nType, int cx, int cy);
00224     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00225     afx_msg void OnGfxLargeicon();
00226     afx_msg void OnUpdateGfxLargeicon(CCmdUI* pCmdUI);
00227     afx_msg void OnGfxSmallicon();
00228     afx_msg void OnUpdateGfxSmallicon(CCmdUI* pCmdUI);
00229     afx_msg void OnGfxRemoveitem();
00230     afx_msg void OnUpdateGfxRemoveitem(CCmdUI* pCmdUI);
00231     afx_msg void OnGfxRenameitem();
00232     afx_msg void OnUpdateGfxRenameitem(CCmdUI* pCmdUI);
00233     afx_msg void OnSysColorChange();
00234     //}}AFX_MSG
00235     afx_msg long OnEndLabelEdit(WPARAM wParam, LPARAM lParam);
00236     DECLARE_MESSAGE_MAP()
00237 };
00238
00240
00241 //{{AFX_INSERT_LOCATION}}
00242 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00243
00244 #endif // __GFXOUTBARCTRL_H__
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMDIFrameWnd.cpp Source File

WinCvs/CJLib/CJLibrary/CJMDIFrameWnd.cpp

Go to the documentation of this file.
00001 // CJMDIFrameWnd.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJMDIFrameWnd.cpp $
00011  *
00012  * $History: CJMDIFrameWnd.cpp $
00013  *
00014  * *****************  Version 17  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:04p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Minor update to PreCreateWindow(...) for flicker free drawing.
00018  *
00019  * *****************  Version 16  *****************
00020  * User: Kirk Stowell Date: 10/29/99   Time: 12:43a
00021  * Updated in $/CodeJock/CJLibrary
00022  * Overloaded PreCreateWindow(...) for flicker free drawing.
00023  *
00024  * *****************  Version 15  *****************
00025  * User: Kirk Stowell Date: 10/14/99   Time: 11:55p
00026  * Updated in $/CodeJock/CJLibrary
00027  * Fixed possible access violations in NewMenu methods. Thanks to Gero
00028  * Kuehn [gero.kuehn@isc-soft.de] for help with this.
00029  *
00030  * *****************  Version 14  *****************
00031  * User: Kirk Stowell Date: 10/14/99   Time: 6:15p
00032  * Updated in $/CodeJock/CJLibrary
00033  * Fixed bug with a document becomes the active document when the user
00034  * clicks inside a tab in the CCJTabControlBar to perform some operation.
00035  * When closing the application, MFC decides in CFrameWnd::OnClose() to
00036  * check if the 'active' document is modified before checking all other
00037  * documuents. If the active document is not modified and can close its
00038  * frame, it does not check other documents individually and shuts down
00039  * without asking the important 'modified save' questions. To fix this,
00040  * OnClose() was overriden to add a call to "SetActiveView(NULL)" just
00041  * before the base class OnClose is called. This will check all documents
00042  * asking the save question before closing the application. Thanks to
00043  * Simon Clark [spc@otleda.com] for help with this.
00044  *
00045  * *****************  Version 13  *****************
00046  * User: Kirk Stowell Date: 10/14/99   Time: 10:05a
00047  * Updated in $/CodeJock/CJLibrary
00048  * Overrode OnEraseBkgnd(...) to help to eliminate screen flicker.
00049  *
00050  * *****************  Version 12  *****************
00051  * User: Kirk Stowell Date: 10/06/99   Time: 6:21a
00052  * Updated in $/CodeJockey/CJLibrary
00053  * Added cool menu support for MDI applications that do not have a
00054  * document/view architecture. Added GetInitializedMenu() to
00055  * CCJMDIChildWnd which will initialize the menu for a given view,  and
00056  * overloaded InitializeMenu() in CCJMDIFrameWnd. Thanks to Golovanov
00057  * Michael [Golovanov@SoftLab.RU] for help with this.
00058  *
00059  * *****************  Version 11  *****************
00060  * User: Kirk Stowell Date: 9/16/99    Time: 2:35p
00061  * Updated in $/CodeJockey/CJLibrary
00062  * Fixed bug with save / restore bar state, and with saved bar size
00063  * changing whenever the application starts.
00064  *
00065  * *****************  Version 10  *****************
00066  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00067  * Updated in $/CodeJockey/CJLibrary
00068  * Updated copyright and contact information.
00069  *
00070  * *****************  Version 9  *****************
00071  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00072  * Updated in $/CodeJockey/CJLibrary
00073  *
00074  * *****************  Version 8  *****************
00075  * User: Kirk Stowell Date: 6/11/99    Time: 8:25p
00076  * Updated in $/CodeJockey/CJ60Lib
00077  * Slight modification made to popup menu code.
00078  *
00079  * *****************  Version 7  *****************
00080  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00081  * Updated in $/CodeJockey/CJ60Lib
00082  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00083  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00084  * message handler, this is now automatically handled by the base class.
00085  * Added redraw flags to the create method and modified paint and layout
00086  * handlers to reduce flicker and un-necessary command handling. Dragging
00087  * rect now reflects actual control bar docked size. Added "flat" look to
00088  * the control bars, the control bars can now use the classic DevStudio
00089  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00090  * docking windows now handle dragging, docking and floating much better,
00091  * and behave more like DevStudio.
00092  *
00093  * *****************  Version 6  *****************
00094  * User: Kirk Stowell Date: 5/02/99    Time: 5:23p
00095  * Updated in $/CodeJockey/CJ60Lib
00096  * Further modifications for CCJMenu support.
00097  *
00098  * *****************  Version 5  *****************
00099  * User: Kirk Stowell Date: 5/02/99    Time: 2:13a
00100  * Updated in $/CodeJockey/CJ60Lib
00101  * Re-wrote CCJMenu releated methods so that multiple documents can be
00102  * added with associated menu support. Added typedef CList <CCJMenu*,
00103  * CCJMenu*> CMDIMenuList; so that menus pointers are stored in a list and
00104  * not member variables.
00105  *
00106  * *****************  Version 4  *****************
00107  * User: Kirk Stowell Date: 4/25/99    Time: 10:37p
00108  * Updated in $/CodeJockey/CJ60Lib
00109  * Added support for Brent Corkum's BCMenu (CCJMenu), which is a replacement for the
00110  * CCoolMenu class.
00111  *
00112  * *****************  Version 3  *****************
00113  * User: Kirk Stowell Date: 4/03/99    Time: 8:41p
00114  * Updated in $/CodeJockey/CJ60Lib
00115  * Added comments and cleaned up code.
00116  *
00117  * *****************  Version 2  *****************
00118  * User: Kirk Stowell Date: 1/12/99    Time: 8:41p
00119  * Updated in $/CodeJockey/CJ60Lib
00120  * Total re-write to add side-by-side docking support for CCJControlBar
00121  * class.
00122  *
00123  * *****************  Version 1  *****************
00124  * User: Kirk Stowell Date: 10/17/98   Time: 8:41p
00125  * Created in $/CodeJockey/CJ60Lib
00126  * Initial re-write and release.
00127  *
00128  ***************************************************************************/
00130
00131 #include "stdafx.h"
00132 #include "CJMDIFrameWnd.h"
00133 #include "CJDockBar.h"
00134 #include "CJSizeDockBar.h"
00135 #include "CJControlBar.h"
00136 #include "CJMiniDockFrameWnd.h"
00137 #include "CJToolBar.h"
00138
00139 #ifdef _DEBUG
00140 #define new DEBUG_NEW
00141 #undef THIS_FILE
00142 static char THIS_FILE[] = __FILE__;
00143 #endif
00144
00146 // CCJMDIFrameWnd
00147
00148 CCJMDIFrameWnd::CCJMDIFrameWnd()
00149 {
00150
00151 }
00152
00153 CCJMDIFrameWnd::~CCJMDIFrameWnd()
00154 {
00155     // Free up any allocated memory.
00156     while (!m_menuList.IsEmpty()) {
00157         CCJMenu* pMenu = m_menuList.RemoveTail();
00158         _delete(pMenu);
00159     }
00160 }
00161
00162 IMPLEMENT_DYNCREATE(CCJMDIFrameWnd, CMDIFrameWnd)
00163
00164 BEGIN_MESSAGE_MAP(CCJMDIFrameWnd, CMDIFrameWnd)
00165     //{{AFX_MSG_MAP(CCJMDIFrameWnd)
00166     ON_WM_MEASUREITEM()
00167     ON_WM_MENUCHAR()
00168     ON_WM_INITMENUPOPUP()
00169     ON_WM_CLOSE()
00170     //}}AFX_MSG_MAP
00171 END_MESSAGE_MAP()
00172
00174 // CCJMDIFrameWnd message handlers
00175
00176 // dwDockBarMap
00177 DWORD CCJMDIFrameWnd::dwDockBarMap[4][2] =
00178 {
00179     { AFX_IDW_DOCKBAR_TOP,      CBRS_TOP    },
00180     { AFX_IDW_DOCKBAR_BOTTOM,   CBRS_BOTTOM },
00181     { AFX_IDW_DOCKBAR_LEFT,     CBRS_LEFT   },
00182     { AFX_IDW_DOCKBAR_RIGHT,    CBRS_RIGHT  },
00183 };
00184
00185 void CCJMDIFrameWnd::DockControlBarLeftOf(CControlBar* Bar, CControlBar* LeftOf)
00186 {
00187     CRect rect;
00188     DWORD dw;
00189     UINT n;
00190
00191     // get MFC to adjust the dimensions of all docked ToolBars
00192     // so that GetWindowRect will be accurate
00193     RecalcLayout(TRUE);
00194
00195     LeftOf->GetWindowRect(&rect);
00196     rect.OffsetRect(1,0);
00197     dw=LeftOf->GetBarStyle();
00198     n = 0;
00199     n = (dw&CBRS_ALIGN_TOP)              ? AFX_IDW_DOCKBAR_TOP      : n;
00200     n = (dw&CBRS_ALIGN_BOTTOM   && n==0) ? AFX_IDW_DOCKBAR_BOTTOM   : n;
00201     n = (dw&CBRS_ALIGN_LEFT     && n==0) ? AFX_IDW_DOCKBAR_LEFT     : n;
00202     n = (dw&CBRS_ALIGN_RIGHT    && n==0) ? AFX_IDW_DOCKBAR_RIGHT    : n;
00203
00204     // When we take the default parameters on rect, DockControlBar will dock
00205     // each Toolbar on a seperate line. By calculating a rectangle, we in effect
00206     // are simulating a Toolbar being dragged to that location and docked.
00207     DockControlBar(Bar,n,&rect);
00208 }
00209
00210 void CCJMDIFrameWnd::EnableDocking(DWORD dwDockStyle)
00211 {
00212     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00213     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00214     CMDIFrameWnd::EnableDocking(dwDockStyle);
00215
00216     for (int i = 0; i < 4; i++) {
00217         if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) {
00218             CDockBar* pDock = (CDockBar*)GetControlBar(dwDockBarMap[i][0]);
00219
00220             // make sure the dock bar is of correct type
00221             if( pDock || !pDock->IsKindOf(RUNTIME_CLASS(CCJDockBar)) ) {
00222                 BOOL bNeedDelete = ! pDock->m_bAutoDelete;
00223                 pDock->m_pDockSite->RemoveControlBar(pDock);
00224                 pDock->m_pDockSite = 0; // avoid problems in destroying the dockbar
00225                 pDock->DestroyWindow();
00226                 if( bNeedDelete )
00227                     delete pDock;
00228                 pDock = 0;
00229             }
00230
00231             if( pDock == 0 ) {
00232                 pDock = new CCJDockBar;
00233                 if (!pDock->Create(this,
00234                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00235                     dwDockBarMap[i][1], dwDockBarMap[i][0])) {
00236                     AfxThrowResourceException();
00237                 }
00238             }
00239         }
00240     }
00241 }
00242
00243 void CCJMDIFrameWnd::RecalcLayout(BOOL bNotify)
00244 {
00245     CMDIFrameWnd::RecalcLayout(bNotify);
00246     RecalcAllExcept(NULL);
00247 }
00248
00249 // Yiannhs changed this
00250 void CCJMDIFrameWnd::EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags )
00251 {
00252     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00253     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00254
00255     m_pFloatingFrameClass = RUNTIME_CLASS(CCJMiniDockFrameWnd);
00256     for (int i = 0; i < 4; i++)
00257     {
00258         if (dwSizeBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY)
00259         {
00260             CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00261             if (pDock == NULL)
00262             {
00263                 pDock = new CCJSizeDockBar;
00264
00265                 if (!pDock->Create(this,
00266                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00267                         dwSizeBarMap[i][1], dwSizeBarMap[i][0]))
00268                 {
00269                     AfxThrowResourceException();
00270                 }
00271                 //Yiannhs enable Flat Borders For dock Bars
00272                 pDock->FlatBorder( (FlatFlags >> i) & 0x0001 );
00273             }
00274         }
00275     }
00276 }
00277
00278 void CCJMDIFrameWnd::RecalcAllExcept(CCJSizeDockBar *pBar)
00279 {
00280     for (int i = 0; i < 4; i++)
00281     {
00282         CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00283         if (pDock != NULL && pDock != pBar)
00284         {
00285             pDock->CalcSizeBarLayout();
00286         }
00287     }
00288 }
00289
00290 void CCJMDIFrameWnd::DockSizeBar(CControlBar * pBar,CCJSizeDockBar *pDockBar, LPRECT lpRect)
00291 {
00292     ASSERT(pBar != NULL);
00293     ASSERT(pBar->m_pDockContext != NULL);
00294
00295     if( pDockBar == NULL )
00296     {
00297         for (int i = 0; i < 4; i++)
00298         {
00299             if ((dwSizeBarMap[i][1] & CBRS_ALIGN_ANY) == (pBar->m_dwStyle & CBRS_ALIGN_ANY))
00300             {
00301                 pDockBar = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00302                 ASSERT(pDockBar != NULL);
00303
00304                 int nSize = 0;
00305
00306                 switch(i)
00307                 {
00308                 case 0: // horizontal dock
00309                 case 1:
00310                     nSize = ((CCJControlBar*)pBar)->GetHorzSize();
00311                     break;
00312                 case 2: // vertical dock
00313                 case 3:
00314                     nSize = ((CCJControlBar*)pBar)->GetVertSize();
00315                     break;
00316                 }
00317
00318                 pDockBar->SetActualSize( nSize );
00319                 break;
00320             }
00321         }
00322     }
00323
00324     ASSERT(pDockBar != NULL);
00325     ASSERT(m_listControlBars.Find(pBar) != NULL);
00326     ASSERT(pBar->m_pDockSite == this);
00327     ((CCJControlBar*)pBar)->Normalize();
00328     pDockBar->DockControlBar(pBar, lpRect);
00329 }
00330
00331 HMENU CCJMDIFrameWnd::NewMenu(UINT nMenuID, UINT nToolbarID)
00332 {
00333     // Allocate a new CCJMenu object.
00334     CCJMenu* pMenu = new CCJMenu;
00335     if( pMenu == NULL ) {
00336         return NULL;
00337     }
00338
00339     // Load the menu and toolbar resource.
00340     pMenu->LoadMenu(nMenuID);
00341     if (nToolbarID) {
00342         pMenu->LoadToolbar(nToolbarID);
00343     }
00344
00345     // Add the menu to the CList object.
00346     m_menuList.AddTail(pMenu);
00347
00348     // Detach the menu.
00349     return(pMenu->Detach());
00350 }
00351
00352 HMENU CCJMDIFrameWnd::NewMenu(UINT nMenuID, UINT* nToolbarIDs, int nSize)
00353 {
00354     // Allocate a new CCJMenu object.
00355     CCJMenu* pMenu = new CCJMenu;
00356     if( pMenu == NULL ) {
00357         return NULL;
00358     }
00359
00360     // Load the menu and toolbar resources.
00361     pMenu->LoadMenu(nMenuID);
00362     if (nToolbarIDs) {
00363         pMenu->LoadToolbars(nToolbarIDs, nSize);
00364     }
00365
00366     // Add the menu to the CList object.
00367     m_menuList.AddTail(pMenu);
00368
00369     // Detach the menu.
00370     return(pMenu->Detach());
00371 }
00372
00373 BOOL CCJMDIFrameWnd::InitializeMenu(CMultiDocTemplate* pDocTemplate, UINT nMenuID, UINT nToolBarID/*=NULL*/, UINT nDefaultMenuID/*=NULL*/)
00374 {
00375     ASSERT(nMenuID);            // must be valid.
00376
00377     // If no menus have been created yet, set the frame default,
00378     // this is the menu that is displayed when no views are active.
00379     if (m_menuList.IsEmpty()) {
00380         ASSERT(nDefaultMenuID != 0);
00381         m_hMenuDefault = NewMenu(nDefaultMenuID, nToolBarID);
00382         OnUpdateFrameMenu(m_hMenuDefault);
00383     }
00384     // Create the Doc/View menu. ONLY if there is a template passed.
00385     if( pDocTemplate )
00386     {
00387         ASSERT_VALID(pDocTemplate); // must be valid.
00388         pDocTemplate->m_hMenuShared = NewMenu(nMenuID, nToolBarID);
00389     }
00390     return TRUE;
00391 }
00392
00393 BOOL CCJMDIFrameWnd::InitializeMenu(CMultiDocTemplate* pDocTemplate, UINT nMenuID, UINT* nToolbarIDs/*=NULL*/, int nSize/*=NULL*/, UINT nDefaultMenuID/*=NULL*/)
00394 {
00395     ASSERT(nMenuID);            // must be valid.
00396
00397     // If no menus have been created yet, set the frame default,
00398     // this is the menu that is displayed when no views are active.
00399     if (m_menuList.IsEmpty()) {
00400         ASSERT(nDefaultMenuID != 0);
00401         m_hMenuDefault = NewMenu(nDefaultMenuID, nToolbarIDs, nSize);
00402         OnUpdateFrameMenu(m_hMenuDefault);
00403     }
00404     // Create the Doc/View menu. ONLY if there is a template passed.
00405     if( pDocTemplate )
00406     {
00407         ASSERT_VALID(pDocTemplate); // must be valid.
00408         pDocTemplate->m_hMenuShared = NewMenu(nMenuID, nToolbarIDs, nSize);
00409     }
00410
00411     return TRUE;
00412 }
00413
00414 BOOL CCJMDIFrameWnd::InitializeMenu( HMENU* phMenu, UINT nMenuID, UINT nToolbarID/*=NULL*/)
00415 {
00416     if( !phMenu ) {
00417         return FALSE;
00418     }
00419
00420     ASSERT(nMenuID);            // must be valid.
00421     *phMenu = NewMenu( nMenuID, nToolbarID );
00422
00423     return (BOOL)(*phMenu != NULL);
00424 }
00425
00426 BOOL CCJMDIFrameWnd::InitializeMenu( HMENU* phMenu, UINT nMenuID, UINT* nToolbarIDs/*=NULL*/, int nSize/*=NULL*/)
00427 {
00428     if( !phMenu ) {
00429         return FALSE;
00430     }
00431
00432     ASSERT(nMenuID);            // must be valid.
00433     *phMenu = NewMenu(nMenuID, nToolbarIDs, nSize);
00434
00435     return (BOOL)(*phMenu != NULL);
00436 }
00437
00438 void CCJMDIFrameWnd::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
00439 {
00440     if (lpMeasureItemStruct->CtlType == ODT_MENU)
00441     {
00442         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
00443             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
00444
00445             // Loop through all menus in list.
00446             for (POSITION pos = m_menuList.GetHeadPosition(); pos; m_menuList.GetNext(pos))
00447             {
00448                 CCJMenu* pListMenu = m_menuList.GetAt(pos);
00449
00450                 if(pListMenu->IsMenu(pMenu)) {
00451                     pListMenu->MeasureItem(lpMeasureItemStruct);
00452                     return;
00453                 }
00454             }
00455         }
00456     }
00457
00458     CMDIFrameWnd::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
00459 }
00460
00461 LRESULT CCJMDIFrameWnd::OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu)
00462 {
00463     // Loop through all menus in list.
00464     for (POSITION pos = m_menuList.GetHeadPosition(); pos; m_menuList.GetNext(pos))
00465     {
00466         CCJMenu* pListMenu = m_menuList.GetAt(pos);
00467
00468         if(pListMenu->IsMenu(pMenu)) {
00469             return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
00470         }
00471     }
00472
00473     return CMDIFrameWnd::OnMenuChar(nChar, nFlags, pMenu);
00474 }
00475
00476 void CCJMDIFrameWnd::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
00477 {
00478     CMDIFrameWnd::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
00479
00480     if(!bSysMenu)
00481     {
00482         // Loop through all menus in list.
00483         for (POSITION pos = m_menuList.GetHeadPosition(); pos; m_menuList.GetNext(pos))
00484         {
00485             CCJMenu* pListMenu = m_menuList.GetAt(pos);
00486
00487             if(pListMenu->IsMenu(pPopupMenu)) {
00488                 CCJMenu::UpdateMenu(pPopupMenu);
00489                 break;
00490             }
00491         }
00492     }
00493 }
00494
00495 void CCJMDIFrameWnd::LoadBarState(LPCTSTR lpszProfileName)
00496 {
00497     CCJSizeDockBar::m_bIsDockBar = true;
00498     CFrameWnd::LoadBarState(lpszProfileName);
00499     CCJSizeDockBar::m_bIsDockBar = false;
00500 }
00501
00502 void CCJMDIFrameWnd::SaveBarState(LPCTSTR lpszProfileName) const
00503 {
00504     CCJSizeDockBar::m_bIsDockBar = true;
00505     CFrameWnd::SaveBarState(lpszProfileName);
00506     CCJSizeDockBar::m_bIsDockBar = false;
00507 }
00508
00509 void CCJMDIFrameWnd::OnClose()
00510 {
00511     // Clear active view before close
00512     SetActiveView (NULL);
00513     CMDIFrameWnd::OnClose();
00514 }
00515
00516 // Default implementation.
00517 BOOL CCJMDIFrameWnd::PreCreateWindow(CREATESTRUCT& cs)
00518 {
00519     return CMDIFrameWnd::PreCreateWindow(cs);
00520 }
00521
00523 // Overloaded for flicker-free drawing with no CS_VREDRAW and CS_HREDRAW.
00524 // Override in CMainFrame and call this method, rather than the default. Pass
00525 // in your apps icon resource usually IDR_MAINFRAME.
00526 //
00527 BOOL CCJMDIFrameWnd::PreCreateWindow(CREATESTRUCT& cs, UINT nIconID)
00528 {
00529     // Register wnd class with no redraw, cursor (use default), background
00530     // brush and load your apps icon resource.
00531     cs.lpszClass = AfxRegisterWndClass( 0, NULL, NULL,
00532         AfxGetApp()->LoadIcon(nIconID));
00533     ASSERT(cs.lpszClass);
00534
00535     return CMDIFrameWnd::PreCreateWindow(cs);
00536 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CKeywordComboBox Member List

This is the complete list of members for CKeywordComboBox, including all inherited members.

AutoDropWidth enum value | USmartCombo |
CKeywordComboBox() | CKeywordComboBox |
CSmartComboBox(int feature=USmartCombo::DefaultFeature) | CSmartComboBox |
DefaultFeature enum value | USmartCombo |
EnsureSelchangeMatch() | CSmartComboBox | [inline, virtual]
Feature enum name | USmartCombo |
GetCurSelText() const | CSmartComboBox | [inline, virtual]
GetEditCtrl() const | CSmartComboBox | [inline, virtual]
GetItems() | USmartCombo |
GetKeyword() const | USmartCombo |
GetWindowText() const | CSmartComboBox | [inline, virtual]
GetWindowText(CString &rString) const | CSmartComboBox | [inline]
HasFeature(int feature) const | USmartCombo |
Keyword enum value | USmartCombo |
m_hDesc | CKeywordComboBox | [private]
None enum value | USmartCombo |
OnDropdown() | CSmartComboBox | [protected]
OnSelchange() | CKeywordComboBox | [protected]
OnSelectString(WPARAM wParam, LPARAM lParam) | CSmartComboBox | [protected]
OnSetFeature(WPARAM wParam, LPARAM lParam) | CSmartComboBox | [protected]
OnSetItems(WPARAM wParam, LPARAM lParam) | CSmartComboBox | [protected]
OnSetReadOnly(WPARAM wParam, LPARAM lParam) | CSmartComboBox | [protected]
PreSubclassWindow() | CKeywordComboBox | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CSmartComboBox | [virtual]
ReadOnly enum value | USmartCombo |
RemoveItem(const char *strItem) | USmartCombo | [virtual]
RemoveItems enum value | USmartCombo |
SetDescription() | CKeywordComboBox | [private]
SetDescriptionWnd(HWND hDesc) | CKeywordComboBox |
SetFeature(int feature) | USmartCombo |
SetItems(CMString *pstrItems) | USmartCombo |
SetKeyword(const char *keyword) | USmartCombo |
SetReadOnly(bool readOnly=true) | CSmartComboBox | [virtual]
SetSelectExact(bool selectExact=true) | CSmartComboBox | [virtual]
USmartCombo(int feature) | USmartCombo |
~CKeywordComboBox() | CKeywordComboBox | [virtual]
~CSmartComboBox() | CSmartComboBox | [virtual]
~USmartCombo() | USmartCombo | [virtual]

Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

USLIDER Member List

This is the complete list of members for USLIDER, including all inherited members.

inc | USLIDER
max | USLIDER
min | USLIDER
pos | USLIDER

Generated on Sat Aug 7 22:56:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CvsPrefs Member List

This is the complete list of members for CvsPrefs, including all inherited members.

AddControl(void) const | CvsPrefs |
AlwaysUseCvsroot(void) const | CvsPrefs |
Browser(void) const | CvsPrefs |
CheckoutRO(void) const | CvsPrefs |
ConsoleFont(void) const | CvsPrefs |
CtrlPressedOnOK(void) const | CvsPrefs |
CvsConsole(void) const | CvsPrefs |
CvsPrefs() | CvsPrefs | [inline]
CvsVersion(void) const | CvsPrefs |
DisableSplashScreen(void) const | CvsPrefs |
EncryptCommunication(void) const | CvsPrefs |
ExtDiff(void) const | CvsPrefs |
fCvsRunningCounter | CvsPrefs | [protected]
fHasLoggedIn | CvsPrefs | [protected]
FileActionType(void) const | CvsPrefs |
fTclFileRunningCounter | CvsPrefs | [protected]
getConsoleFont(void) const | CvsPrefs |
GetUseShell(void) const | CvsPrefs |
HasLoogedIn(void) const | CvsPrefs | [inline]
Helper(void) const | CvsPrefs |
HideCommandDlgAnnotate(void) const | CvsPrefs |
HideCommandDlgDiff(void) const | CvsPrefs |
HideCommandDlgFileAction(void) const | CvsPrefs |
HideCommandDlgGraph(void) const | CvsPrefs |
HideCommandDlgLog(void) const | CvsPrefs |
HideCommandDlgStatus(void) const | CvsPrefs |
HideCommandDlgUpdate(void) const | CvsPrefs |
HideCommandDlgUseShift(void) const | CvsPrefs |
Home(void) const | CvsPrefs |
ICTextOption(void) const | CvsPrefs |
IsCvsRunning(void) const | CvsPrefs |
IsoConvert(void) const | CvsPrefs |
IsTclFileRunning(void) const | CvsPrefs |
KserverPort(void) const | CvsPrefs |
LastWorkingDir(void) const | CvsPrefs |
load(void) | CvsPrefs |
LogoutTimeOut(void) const | CvsPrefs |
MacBinEncodeBinariesOnly(void) const | CvsPrefs |
MacBinEncoding(void) const | CvsPrefs |
MacLF(void) const | CvsPrefs |
MatchEntriesCase(void) const | CvsPrefs |
NeedCvsrootMigration() | CvsPrefs |
ProxyHost(void) const | CvsPrefs |
ProxyPort(void) const | CvsPrefs |
PruneOption(void) const | CvsPrefs |
PserverPort(void) const | CvsPrefs |
PythonLibrary(void) const | CvsPrefs |
QuietOption(void) const | CvsPrefs |
RhostPort(void) const | CvsPrefs |
RshName(void) const | CvsPrefs |
save(bool quiet=false) | CvsPrefs |
ServerName(void) const | CvsPrefs |
SetAddControl(bool newState) | CvsPrefs |
SetAlwaysUseCvsroot(bool newState) | CvsPrefs |
SetBrowser(const char *newbrowser) | CvsPrefs |
SetCheckoutRO(bool newState) | CvsPrefs |
SetConsoleFont(const char *newFont) | CvsPrefs |
SetCtrlPressedOnOK(bool newState) | CvsPrefs |
SetCvsConsole(bool console) | CvsPrefs |
SetCvsRunning(bool launched) | CvsPrefs |
SetCvsVersion(int version) | CvsPrefs |
SetDisableSplashScreen(bool newState) | CvsPrefs |
SetEncryptCommunication(bool newState) | CvsPrefs |
SetExtDiff(const char *newdiff) | CvsPrefs |
SetFileActionType(FILEACTION_TYPE fileActionType) | CvsPrefs |
SetHasLoogedIn(bool newstate) | CvsPrefs | [inline]
SetHelper(const char *newhelper) | CvsPrefs |
SetHideCommandDlgAnnotate(bool newState) | CvsPrefs |
SetHideCommandDlgDiff(bool newState) | CvsPrefs |
SetHideCommandDlgFileAction(bool newState) | CvsPrefs |
SetHideCommandDlgGraph(bool newState) | CvsPrefs |
SetHideCommandDlgLog(bool newState) | CvsPrefs |
SetHideCommandDlgStatus(bool newState) | CvsPrefs |
SetHideCommandDlgUpdate(bool newState) | CvsPrefs |
SetHideCommandDlgUseShift(bool newState) | CvsPrefs |
SetHome(const char *newhome) | CvsPrefs |
SetICTextOption(bool newState) | CvsPrefs |
SetIsoConvert(ISO8559 newState) | CvsPrefs |
SetKserverPort(int newState) | CvsPrefs |
SetLastWorkingDir(const char *workdir) | CvsPrefs |
SetLogoutTimeOut(int newTimeout) | CvsPrefs |
SetMacBinEncodeBinariesOnly(bool newState) | CvsPrefs |
SetMacBinEncoding(MACENCODING newState) | CvsPrefs |
SetMacLF(bool useit) | CvsPrefs |
SetMatchEntriesCase(bool newState) | CvsPrefs |
SetProxyHost(const char *newhost) | CvsPrefs |
SetProxyPort(int newport) | CvsPrefs |
SetPruneOption(bool newState) | CvsPrefs |
SetPserverPort(int newState) | CvsPrefs |
SetPythonLibrary(const char *pythonLibrary) | CvsPrefs |
SetQuietOption(bool newState) | CvsPrefs |
SetRhostPort(int newState) | CvsPrefs |
SetRshName(const char *newrshname) | CvsPrefs |
SetServerName(const char *newservername) | CvsPrefs |
SetSettingsFolder(const char *settingsFolder) | CvsPrefs |
SetShowCvs(SHOWCVS_TYPE showCvs) | CvsPrefs |
SetStatusOutputType(STATUSOUTPUT_TYPE outputType) | CvsPrefs |
SetTclFileRunning(bool launched) | CvsPrefs |
SetTclLibrary(const char *tclLibrary) | CvsPrefs |
SettingsFolder(void) const | CvsPrefs |
SetUnixLF(bool useit) | CvsPrefs |
SetUpdateCaseSensitiveNames(bool newState) | CvsPrefs |
SetUpdateLastCheckinTime(bool newState) | CvsPrefs |
SetUpdateThreeWayConflicts(bool newState) | CvsPrefs |
SetUseAltCvs(bool useIt) | CvsPrefs |
SetUseProxy(bool useit) | CvsPrefs |
SetUseShell(SHELL_KIND shell) | CvsPrefs |
SetViewer(const char *newviewer) | CvsPrefs |
SetWhichCvs(const char *cvsPath) | CvsPrefs |
SetWordWrapLogMsg(int wordwrap) | CvsPrefs |
SetZ9Option(bool newState) | CvsPrefs |
SetZLevel(int level) | CvsPrefs |
ShowCvs(void) const | CvsPrefs |
StatusOutputType(void) const | CvsPrefs |
TclLibrary(void) const | CvsPrefs |
UnixLF(void) const | CvsPrefs |
UpdateCaseSensitiveNames() const | CvsPrefs |
UpdateLastCheckinTime() const | CvsPrefs |
UpdateThreeWayConflicts() const | CvsPrefs |
UseAltCvs(void) const | CvsPrefs |
UseKeyChain(void) const | CvsPrefs |
UseProxy(void) const | CvsPrefs |
Viewer(void) const | CvsPrefs |
WhichCvs(UStr &path, bool userOnly=false) const | CvsPrefs |
WhichVersion() | CvsPrefs |
WordWrapLogMsg(void) const | CvsPrefs |
Z9Option(void) const | CvsPrefs |
ZLevel(void) const | CvsPrefs |
~CvsPrefs() | CvsPrefs | [inline]

Generated on Sat Aug 7 22:57:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoCancelChangesHandler Member List

This is the complete list of members for KoCancelChangesHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoCancelChangesHandler() | KoCancelChangesHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoCancelChangesHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoCancelChangesHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ReleaseDlg.h Source File

common/ReleaseDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2000
00019  */
00020
00021 /*
00022  * ReleaseDlg.h : the cvs release dialog
00023  */
00024
00025 #if !defined(AFX_RELEASEDLG_H__12B5FA97_703E_4616_B361_F2917D45E54A__INCLUDED_)
00026 #define AFX_RELEASEDLG_H__12B5FA97_703E_4616_B361_F2917D45E54A__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #ifdef WIN32
00033 #   include "HHelpSupport.h"
00034 #endif
00035
00036 class MultiFiles;
00037
00039 typedef enum
00040 {
00041     kReleaseNoDel,
00042     kReleaseDelDir,
00043     kReleaseDelAll,
00044     kReleaseDelCvsInfo
00045 } kReleaseDelType;
00046
00047 bool CompatGetRelease(const MultiFiles* mf, const char* dir, kReleaseDelType& removeDirectoryOption);
00048
00049 #ifdef WIN32
00050
00052 // CRelease_MAIN dialog
00053
00054 class CRelease_MAIN : public CHHelpPropertyPage
00055 {
00056     DECLARE_DYNAMIC(CRelease_MAIN)
00057
00058 // Construction
00059 public:
00060     CRelease_MAIN(const char* dir);
00061     ~CRelease_MAIN();
00062
00063 // Dialog Data
00064     //{{AFX_DATA(CRelease_MAIN)
00065     enum { IDD = IDD_RELEASE_MAIN };
00066     CButton m_delDirCheck;
00067     CButton m_delCvsInfoCheck;
00068     CButton m_delAllCheck;
00069     CString m_dir;
00070     //}}AFX_DATA
00071
00072
00073 // Overrides
00074     // ClassWizard generate virtual function overrides
00075     //{{AFX_VIRTUAL(CRelease_MAIN)
00076     protected:
00077     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00078     //}}AFX_VIRTUAL
00079
00080 // Implementation
00081 protected:
00082     // Generated message map functions
00083     //{{AFX_MSG(CRelease_MAIN)
00084     afx_msg void OnDelcvsinfo();
00085     afx_msg void OnDeldir();
00086     //}}AFX_MSG
00087     DECLARE_MESSAGE_MAP()
00088 private:
00089     // Data members
00090     kReleaseDelType m_removeDirectoryOption;
00092     // Methods
00093     virtual void InitHelpID();
00094
00095 public:
00096     // Interface
00097     kReleaseDelType GetRemoveDirectoryOption() const;
00098 };
00099 //{{AFX_INSERT_LOCATION}}
00100 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00101
00102 #endif /* WIN32 */
00103
00104
00105 #endif // !defined(AFX_RELEASEDLG_H__12B5FA97_703E_4616_B361_F2917D45E54A__INCLUDED_)
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CImport_MAIN Member List

This is the complete list of members for CImport_MAIN, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CImport_MAIN(const MultiFiles *mf, const char *logMsg, const char *modname, const char *rtag, const char *vtag, const bool dontCreateVendorTag, const bool overwriteReleaseTags, bool forceRoot, const char *cvsroot) | CImport_MAIN |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CImport_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetLogMsg() const | CImport_MAIN |
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CImport_MAIN |
InitHelpID() | CImport_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_cvsroot | CImport_MAIN |
m_cvsrootCombo | CImport_MAIN |
m_dontCreateVendorTag | CImport_MAIN |
m_dontCreateVendorTagCheck | CImport_MAIN |
m_forceRoot | CImport_MAIN |
m_forceRootCheck | CImport_MAIN |
m_logMsg | CImport_MAIN | [private]
m_mf | CImport_MAIN | [private]
m_moduleCombo | CImport_MAIN |
m_moduleName | CImport_MAIN |
m_multilineEntryDlg | CImport_MAIN | [private]
m_multilineEntryPlaceholder | CImport_MAIN |
m_overwriteReleaseTags | CImport_MAIN |
m_overwriteReleaseTagsCheck | CImport_MAIN |
m_rtag | CImport_MAIN |
m_rtagButton | CImport_MAIN |
m_rtagCombo | CImport_MAIN |
m_selCvsrootButton | CImport_MAIN |
m_vtag | CImport_MAIN |
m_vtagButton | CImport_MAIN |
m_vtagCombo | CImport_MAIN |
OnBrowseModules() | CImport_MAIN | [protected]
OnBrowseTag1() | CImport_MAIN | [protected]
OnBrowseTag2() | CImport_MAIN | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnDontcreatevendortag() | CImport_MAIN | [protected]
OnForceroot() | CImport_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CImport_MAIN | [protected, virtual]
OnSelcvsroot() | CImport_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CImport_MAIN() | CImport_MAIN |

Generated on Sat Aug 7 22:53:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/Persistent.cpp Source File

common/Persistent.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 1998
00019  */
00020
00021 /*
00022  * Persistent.cpp --- utilities to store persitent values
00023  */
00024
00025 #ifdef TARGET_OS_MAC
00026 #   include "GUSIInternal.h"
00027 #   include "GUSIFileSpec.h"
00028 #endif
00029
00030 #include "stdafx.h"
00031 #include <stdlib.h>
00032 #include <string.h>
00033 #include <map>
00034
00035 #if defined(HAVE_ERRNO_H) || defined(WIN32)
00036 #   include <errno.h>
00037 #endif
00038
00039 #ifdef HAVE_UNISTD_H
00040 #   include <unistd.h>
00041 #endif
00042
00043 #ifndef WIN32
00044 #   include <ctype.h>
00045 #endif /* !WIN32 */
00046
00047 #ifdef WIN32
00048 #   include "wincvs.h"
00049 #endif
00050
00051 #include "Persistent.h"
00052 #include "AppConsole.h"
00053 #include "CPStr.h"
00054 #include "uconsole.h"
00055 #include "uwidget.h"
00056 #include "FileTraversal.h"
00057 #include "Authen.h"
00058 #include "CvsPrefs.h"
00059 #include "getline.h"
00060 #include "CvsAlert.h"
00061 #include "CvsCommands.h"
00062 #include "SaveSettingsDlg.h"
00063
00064 #ifdef TARGET_OS_MAC
00065 #   include <Carbon.h>
00066 #   include "VolsPaths.h"
00067 #   include "MacMisc.h"
00068 #   ifndef Assert_ // for mpw
00069 #       include <assert.h>
00070 #       define Assert_(cond) assert(cond)
00071 #   endif
00072 # include "MultiString.h"
00073 #endif /* TARGET_OS_MAC */
00074
00075 #if qMacCvsPP
00076 #   include "MacCvsApp.h"
00077 #   include "MacCvsConstant.h"
00078 #endif
00079
00080 #if TARGET_RT_MAC_MACHO
00081 #   include <LCFString.h>
00082 #endif
00083
00084 #if qUnix
00085 #   include "UCvsDialogs.h"
00086 #endif
00087
00088 #ifdef WIN32
00089 #   ifdef _DEBUG
00090 #   define new DEBUG_NEW
00091 #   undef THIS_FILE
00092     static char THIS_FILE[] = __FILE__;
00093 #   endif
00094 #endif /* WIN32 */
00095
00096 #ifndef NEW
00097 #define NEW new
00098 #endif
00099
00100 std::vector<CPersistent::CPersistentEntry>* CPersistent::m_fAllEntries = 0L;
00101
00102 UIMPLEMENT_DYNAMIC(CPersistent, UObject)
00103 UIMPLEMENT_DYNAMIC(CPersistentInt, CPersistent)
00104 UIMPLEMENT_DYNAMIC(CPersistentBool, CPersistent)
00105 UIMPLEMENT_DYNAMIC(PCStr, CPersistent)
00106 UIMPLEMENT_DYNAMIC(PCPStr, CPersistent)
00107
00108 CPersistent::CPersistent(const char* uniqueName, kClassPersistent pclass) : m_fTimeStamp(0)
00109 {
00110     Register(this, uniqueName, pclass);
00111     TouchTimeStamp();
00112 }
00113
00114 CPersistent::~CPersistent()
00115 {
00116     UnRegister(this);
00117 }
00118
00125 void CPersistent::Register(CPersistent* value, const char* uniqueName, kClassPersistent pclass)
00126 {
00127     std::vector<CPersistentEntry>::const_iterator i;
00128     if( m_fAllEntries == 0L )
00129         m_fAllEntries = NEW std::vector<CPersistentEntry>;
00130
00131     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00132     {
00133         if(strcmp(uniqueName, (*i).m_fUniqueName) == 0)
00134         {
00135             UAppConsole("Error : duplicate persistent %s !\n", uniqueName);
00136         }
00137     }
00138
00139     CPersistentEntry newentry;
00140     newentry.m_fClass = pclass;
00141     newentry.m_fUniqueName = uniqueName;
00142     newentry.m_fValue = value;
00143
00144     m_fAllEntries->push_back(newentry);
00145 }
00146
00151 void CPersistent::UnRegister(CPersistent* value)
00152 {
00153     std::vector<CPersistentEntry>::iterator i;
00154     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00155     {
00156         if( value == (*i).m_fValue )
00157             break;
00158     }
00159
00160     if( i == m_fAllEntries->end() )
00161     {
00162         UAppConsole("Error : Unknown persistent value !\n");
00163         return;
00164     }
00165
00166     m_fAllEntries->erase(i);
00167     if( m_fAllEntries->size() == 0 )
00168     {
00169         delete m_fAllEntries;
00170         m_fAllEntries = 0L;
00171     }
00172 }
00173
00180 static int simple_diff(const char* file1, const char* file2)
00181 {
00182     FILE* f1 = fopen(file1, "rb");
00183     if(f1 == 0L)
00184         return -1;
00185
00186     FILE* f2 = fopen(file2, "rb");
00187     if( f2 == 0L )
00188     {
00189         fclose(f1);
00190         return 1;
00191     }
00192
00193     int res = -1;
00194     char buf1[8000];
00195     char buf2[8000];
00196     size_t num1, num2;
00197
00198     while( !feof(f1) && !feof(f2) && !ferror(f1) && !ferror(f2) )
00199     {
00200         num1 = fread(buf1, sizeof(char), 8000, f1);
00201         num2 = fread(buf2, sizeof(char), 8000, f2);
00202         if( num1 != num2 || (res = memcmp(buf1, buf2, num1 * sizeof(char))) != 0 )
00203             goto fail;
00204     }
00205
00206     if( ferror(f1) || ferror(f2) )
00207         goto fail;
00208
00209     if( feof(f1) ^ feof(f2) )
00210         goto fail;
00211
00212     res = 0;
00213
00214 fail:
00215     fclose(f1);
00216     fclose(f2);
00217
00218     return res;
00219 }
00220
00227 bool CPersistent::SaveAllSettings(const char* settingFileName, const char* filePath)
00228 {
00229     UStr tmpSettingsFile(settingFileName);
00230     tmpSettingsFile << "__";
00231
00232     FILE* fd = fopen(tmpSettingsFile, "w");
00233     if( fd == 0L )
00234     {
00235         cvs_err("Failed to open the setting file '%s' for writing (error %d)", (const char*)tmpSettingsFile, errno);
00236         return false;
00237     }
00238
00239     fprintf(fd, "VERSION=%d\n", 1);
00240
00241     UStr path(filePath);
00242     path.rtrim (kPathDelimiter);
00243
00244     fprintf(fd, "PATH=%s\n", (const char*)path);
00245 #if INTERNAL_AUTHEN
00246     fprintf(fd, "AUTHENTICATION=%s\n", (const char*)Authen::kindToToken(gAuthen.kind()));
00247     fprintf(fd, "CVSROOT=%s\n", (const char*)gCvsPrefs);
00248 #endif /* INTERNAL_AUTHEN */
00249
00250     std::vector<CPersistentEntry>::const_iterator i;
00251     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00252     {
00253         const CPersistentEntry& entry = *i;
00254         if( (entry.m_fClass & kAddSettings) == 0 )
00255             continue;
00256
00257         if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentBool)) )
00258         {
00259             CPersistentBool* pbool = (CPersistentBool*)entry.m_fValue;
00260             bool state = *pbool;
00261             fprintf(fd, "%s=%s\n", entry.m_fUniqueName, state ? "true" : "false");
00262         }
00263         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentInt)) )
00264         {
00265             CPersistentInt* pint = (CPersistentInt*)entry.m_fValue;
00266             int val = *pint;
00267             fprintf(fd, "%s=%d\n", entry.m_fUniqueName, val);
00268         }
00269         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCStr)) )
00270         {
00271             PCStr* pstr = (PCStr*)entry.m_fValue;
00272             const char* str = *pstr;
00273             fprintf(fd, "%s=%s\n", entry.m_fUniqueName, (const char*)(str == 0L ? "" : str));
00274         }
00275         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCPStr)) )
00276         {
00277             PCPStr* pstr = (PCPStr*)entry.m_fValue;
00278             const char* str = *pstr;
00279             fprintf(fd, "%s=%s\n", entry.m_fUniqueName, (const char*)(str == 0L ? "" : str));
00280         }
00281         else
00282         {
00283             cvs_err("Unknown persistent value '%s'\n", entry.m_fUniqueName);
00284         }
00285     }
00286
00287     fclose(fd);
00288
00289     if( simple_diff(tmpSettingsFile, settingFileName) == 0 )
00290     {
00291         if( unlink(tmpSettingsFile) != 0 && errno != ENOENT )
00292             cvs_err("Could not remove file '%s' (error %d)\n", (const char*)tmpSettingsFile, errno);
00293
00294         return false;
00295     }
00296
00297     if( unlink(settingFileName) != 0 && errno != ENOENT )
00298     {
00299         cvs_err("Could not remove file '%s' (error %d)\n", (const char*)settingFileName, errno);
00300         return false;
00301     }
00302
00303     if( rename(tmpSettingsFile, settingFileName) != 0 )
00304     {
00305         cvs_err("Could not rename file '%s' (error %d)\n", (const char*)tmpSettingsFile, errno);
00306         return false;
00307     }
00308
00309     return true;
00310 }
00311
00312 #ifdef TARGET_OS_MAC
00313 static OSErr GetPreferencesFile(FSRef & mMacFileRef)
00314 {
00315     OSErr   theErr;
00316     FSRef ref;
00317     theErr = ::FSFindFolder(kOnAppropriateDisk, kPreferencesFolderType,
00318                     kDontCreateFolder, &ref);
00319
00320     if( theErr == noErr )
00321     {
00322         LCFString str(kCVS_prefName);
00323         UniChar buffer[PATH_MAX];
00324         CFRange range = {0, str.GetLength()};
00325         ::CFStringGetCharacters(str, range, buffer);
00326
00327         theErr = ::FSMakeFSRefUnicode(&ref, str.GetLength(), buffer, kTextEncodingDefaultFormat, &mMacFileRef);
00328     }
00329
00330     return theErr;
00331 }
00332 #endif // TARGET_OS_MAC
00333
00337 void CPersistent::SaveAll(void)
00338 {
00339 #ifdef TARGET_OS_MAC
00340     std::vector<CPersistentEntry>::iterator i;
00341     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00342     {
00343         CPersistentEntry & entry = *i;
00344         int size = entry.m_fValue->SizeOf();
00345         if( size <= 0 )
00346             continue;
00347
00348         CFPropertyListRef   value(NULL);
00349         CFStringRef         key(CFStringCreateWithCString(NULL, entry.m_fUniqueName, kCFStringEncodingASCII));
00350
00351         if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentBool)) )
00352         {
00353           value = *static_cast<CPersistentBool*>(entry.m_fValue) ? kCFBooleanTrue : kCFBooleanFalse;
00354           CFRetain(value);
00355         }
00356         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentInt)) )
00357         {
00358             CPersistentInt* pint = (CPersistentInt*)entry.m_fValue;
00359             SInt32 val = *pint;
00360             value = CFNumberCreate(NULL, kCFNumberSInt32Type, &val);
00361         }
00362         else if( dynamic_cast<TMString<CStr>*>(entry.m_fValue) != NULL )
00363         {
00364           CFMutableArrayRef    valueArray(CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks));
00365           if ( valueArray != NULL ) {
00366             TMString<CStr>* ptmstr = static_cast<TMString<CStr>*>(entry.m_fValue);
00367             for ( TMString<CStr>::list_t::const_iterator i(ptmstr->GetList().begin()); i != ptmstr->GetList().end(); ++i ) {
00368               CFStringRef   str(CFStringCreateWithCString(NULL, i->empty() ? "" : static_cast<const char*>(*i), kCFStringEncodingUTF8));
00369               if ( str ) {
00370                 CFArrayAppendValue(valueArray, str);
00371                 CFRelease(str);
00372               } else cvs_err("couldn't create string entry for multi-string array\n");
00373             }
00374           }
00375           value = valueArray;
00376         }
00377         else if( dynamic_cast<TMString<CPStr>*>(entry.m_fValue) != NULL )
00378         {
00379           CFMutableArrayRef    valueArray(CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks));
00380           if ( valueArray != NULL ) {
00381             TMString<CPStr>* ptmstr = static_cast<TMString<CPStr>*>(entry.m_fValue);
00382             for ( TMString<CPStr>::list_t::const_iterator i(ptmstr->GetList().begin()); i != ptmstr->GetList().end(); ++i ) {
00383               CFStringRef   str(CFStringCreateWithCString(NULL, i->empty() ? "" : static_cast<const char*>(*i), kCFStringEncodingUTF8));
00384               if ( str ) {
00385                 CFArrayAppendValue(valueArray, str);
00386                 CFRelease(str);
00387               } else cvs_err("couldn't create string entry for multi-string array\n");
00388             }
00389           }
00390           value = valueArray;
00391         }
00392         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCStr)) )
00393         {
00394             PCStr* pstr = (PCStr*)entry.m_fValue;
00395             value = CFStringCreateWithCString(NULL, *pstr, kCFStringEncodingUTF8);
00396         }
00397         else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCPStr)) )
00398         {
00399             PCPStr* pstr = (PCPStr*)entry.m_fValue;
00400             value = CFStringCreateWithCString(NULL, *pstr, kCFStringEncodingUTF8);
00401         }
00402         else
00403         {
00404             value = CFDataCreate(NULL, (const UInt8*)entry.m_fValue->GetData(), entry.m_fValue->SizeOf());
00405         }
00406
00407     if ( value ) {
00408       CFPreferencesSetAppValue(key, value, kCFPreferencesCurrentApplication);
00409     } else {
00410       cvs_err("Couldn't create preference value for %s.\n", entry.m_fUniqueName);
00411     }
00412     if ( value ) CFRelease(value);
00413     if ( key ) CFRelease(key);
00414     }
00415
00416     UInt32        bundleVersion(CFBundleGetVersionNumber(CFBundleGetMainBundle()));
00417     CFNumberRef   bundleVersionPref(CFNumberCreate(NULL, kCFNumberSInt32Type, &bundleVersion));
00418     if ( bundleVersionPref ) {
00419     CFPreferencesSetAppValue(CFSTR("MacCvs:PrefsVersion"), bundleVersionPref, kCFPreferencesCurrentApplication);
00420     CFRelease(bundleVersionPref);
00421   } else {
00422     cvs_err("Couldn't write prefs version.\n");
00423   }
00424   if ( !CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication) ) {
00425     cvs_err("Couldn't write preferences.\n");
00426   }
00427 #endif /* TARGET_OS_MAC */
00428 #ifdef WIN32
00429     std::vector<CPersistentEntry>::iterator i;
00430     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00431     {
00432         CPersistentEntry& entry = *i;
00433         unsigned int size = entry.m_fValue->SizeOf();
00434         if( size == 0 )
00435             continue;
00436
00437         if( !AfxGetApp()->WriteProfileBinary(PROFILE_NAME, entry.m_fUniqueName, (BYTE*)entry.m_fValue->GetData(), size) )
00438         {
00439             cvs_err("Error while saving preferences !\n");
00440             break;
00441         }
00442     }
00443 #endif /* WIN32 */
00444 #ifdef qUnix
00445     CStr home;
00446     home = gCvsPrefs.Home();
00447     if( !home.endsWith(kPathDelimiter) )
00448         home << kPathDelimiter;
00449
00450     home << ".gcvsrc";
00451     FILE* out = fopen(home, "wb");
00452     if( out == 0L )
00453     {
00454         cvs_err("Unable to open '%s' for writing (error %d)", (const char*)home, errno);
00455         return;
00456     }
00457
00458     int version = 1;
00459     fwrite(&version, sizeof(int), 1, out);
00460     int numEntries = m_fAllEntries->size();
00461     fwrite(&numEntries, sizeof(int), 1, out);
00462     std::vector<CPersistentEntry>::iterator i;
00463     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00464     {
00465         CPersistentEntry& entry = *i;
00466         unsigned int size = entry.m_fValue->SizeOf();
00467
00468         fwrite(entry.m_fUniqueName, sizeof(char), strlen(entry.m_fUniqueName) + 1, out);
00469         fwrite(&size, sizeof(unsigned int), 1, out);
00470         fwrite(entry.m_fValue->GetData(), 1, size, out);
00471     }
00472
00473     if( ferror(out) )
00474         cvs_err("Error while writing '%s' (error %d)", (const char*)home, errno);
00475
00476     fclose(out);
00477 #endif /* qUnix */
00478
00479     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00480     {
00481         CPersistentEntry& entry = *i;
00482         entry.m_fValue->ResetTimeStamp();
00483     }
00484 }
00485
00491 bool CPersistent::LoadAll(const char* only)
00492 {
00493     bool found_one = false;
00494 #ifndef qUnix
00495     std::vector<CPersistentEntry>::iterator i;
00496 #endif
00497 #ifdef TARGET_OS_MAC
00498   Boolean   keyExists(false);
00499   UInt32    prefsVersion;
00500   if ( CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication) )
00501     prefsVersion = CFPreferencesGetAppIntegerValue(CFSTR("MacCvs:PrefsVersion"), kCFPreferencesCurrentApplication, &keyExists);
00502   if ( keyExists ) {
00503
00504     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00505     {
00506         CPersistentEntry& entry = *i;
00507         CFStringRef       key(CFStringCreateWithCString(NULL, entry.m_fUniqueName, kCFStringEncodingASCII));
00508         if ( key ) {
00509             keyExists = false;
00510
00511             if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentBool)) )
00512             {
00513               Boolean   value(CFPreferencesGetAppBooleanValue(key, kCFPreferencesCurrentApplication, &keyExists));
00514               if ( keyExists ) *static_cast<CPersistentBool*>(entry.m_fValue) = (value == true);
00515             }
00516             else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentInt)) )
00517             {
00518               SInt32 value(CFPreferencesGetAppIntegerValue(key, kCFPreferencesCurrentApplication, &keyExists));
00519               if ( keyExists ) *static_cast<CPersistentInt*>(entry.m_fValue) = value;
00520             }
00521             else if( dynamic_cast<TMString<CStr>*>(entry.m_fValue) != NULL )
00522             {
00523               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00524               if ( value ) {
00525                 if ( CFGetTypeID(value) == CFArrayGetTypeID() ) {
00526                   static_cast<TMString<CStr>*>(entry.m_fValue)->RemoveAll();
00527                 CFArrayRef    valueArray = static_cast<CFArrayRef>(value);
00528                 CFIndex       itemCount(CFArrayGetCount(valueArray));
00529                 // MultiStrings only know how to insert at the beginning, so let's iterate backwards
00530                 for ( CFIndex i(itemCount); i > 0; --i ) {
00531                   CFTypeRef   stringValue(CFArrayGetValueAtIndex(valueArray, i-1));
00532                   if ( stringValue  &&  CFGetTypeID(stringValue) == CFStringGetTypeID() ) {
00533                     static_cast<TMString<CStr>*>(entry.m_fValue)->Insert(CFString_to_UStr(static_cast<CFStringRef>(stringValue), kCFStringEncodingUTF8));
00534                   }
00535                 }
00536                 keyExists = true;
00537               }
00538                 CFRelease(value);
00539               }
00540             }
00541             else if( dynamic_cast<TMString<CPStr>*>(entry.m_fValue) != NULL )
00542             {
00543               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00544               if ( value ) {
00545                 if ( CFGetTypeID(value) == CFArrayGetTypeID() ) {
00546                   static_cast<TMString<CPStr>*>(entry.m_fValue)->RemoveAll();
00547                 CFArrayRef    valueArray = static_cast<CFArrayRef>(value);
00548                 CFIndex       itemCount(CFArrayGetCount(valueArray));
00549                 // MultiStrings only know how to insert at the beginning, so let's iterate backwards
00550                 for ( CFIndex i(itemCount); i > 0 ; --i ) {
00551                   CFTypeRef   stringValue(CFArrayGetValueAtIndex(valueArray, i-1));
00552                   if ( stringValue  &&  CFGetTypeID(stringValue) == CFStringGetTypeID() ) {
00553                     static_cast<TMString<CPStr>*>(entry.m_fValue)->Insert(CFString_to_UStr(static_cast<CFStringRef>(stringValue), kCFStringEncodingUTF8));
00554                   }
00555                 }
00556                 keyExists = true;
00557               }
00558                 CFRelease(value);
00559               }
00560             }
00561             else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCStr)) )
00562             {
00563               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00564               if ( value  &&  CFGetTypeID(value) == CFStringGetTypeID() ) {
00565                 *(PCStr*)entry.m_fValue = CFString_to_UStr(static_cast<CFStringRef>(value), kCFStringEncodingUTF8);
00566                 keyExists = true;
00567                 CFRelease(value);
00568               }
00569             }
00570             else if( entry.m_fValue->IsKindOf(URUNTIME_CLASS(PCPStr)) )
00571             {
00572               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00573               if ( value  &&  CFGetTypeID(value) == CFStringGetTypeID() ) {
00574                 *(PCPStr*)entry.m_fValue = CFString_to_UStr(static_cast<CFStringRef>(value), kCFStringEncodingUTF8);
00575                 keyExists = true;
00576                 CFRelease(value);
00577               }
00578             }
00579             else
00580             {
00581               CFPropertyListRef    value(CFPreferencesCopyAppValue(key, kCFPreferencesCurrentApplication));
00582               if ( value  &&  CFGetTypeID(value) == CFDataGetTypeID() ) {
00583                 entry.m_fValue->SetData(CFDataGetBytePtr(static_cast<CFDataRef>(value)), CFDataGetLength(static_cast<CFDataRef>(value)));
00584                 keyExists = true;
00585                 CFRelease(value);
00586               }
00587             }
00588
00589             if ( keyExists ) entry.m_fValue->ResetTimeStamp();
00590       }
00591       else cvs_err("Couldn't create prefs key for '%s'\n", static_cast<const char*>(entry.m_fUniqueName));
00592     }
00593   } else {
00594     // no CFPreferences based prefs yet -> attempt to read resource based settings
00595     FSRef thePrefFile;
00596     short FRef, oldRef;
00597     OSErr err;
00598
00599     err = GetPreferencesFile(thePrefFile);
00600
00601     if( err != noErr )
00602         return false;
00603
00604     oldRef = CurResFile();
00605     FRef = FSOpenResFile(&thePrefFile, fsRdPerm);
00606     if( FRef < 0 )
00607         return false;
00608
00609     CPStr name;
00610     UseResFile(FRef);
00611
00612     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00613     {
00614         CPersistentEntry& entry = *i;
00615         name = entry.m_fUniqueName;
00616
00617         Handle hdl = Get1NamedResource(kCVS_prefID, name);
00618         if( hdl == 0L || (only && strcmp(only, name) != 0) )
00619             continue;
00620
00621         HLock(hdl);
00622         found_one = true;
00623         entry.m_fValue->SetData(*hdl, GetHandleSize(hdl));
00624         entry.m_fValue->ResetTimeStamp();
00625         HUnlock(hdl);
00626     }
00627
00628     // migrate to the new gOldCvsroots container
00629     if( gOldCvsroots.GetList().size() == 0 && only == 0L )
00630     {
00631         for(int nIndex = 0; nIndex <= NUM_CVSROOT; nIndex++)
00632         {
00633             char tmp[20];
00634             sprintf(tmp, "P_Cvsroot%d", nIndex);
00635
00636             CPStr pstr(tmp);
00637             Handle hdl = Get1NamedResource(kCVS_prefID, pstr);
00638             if( hdl == 0L )
00639                 continue;
00640
00641             CStr root((char*)*hdl);
00642             if( !root.empty() )
00643                 gOldCvsroots.Insert(root);
00644         }
00645     }
00646
00647     CloseResFile(FRef);
00648     UseResFile(oldRef);
00649
00650     // and rename old prefs file
00651         LCFString str(kCVS_prefName " (old)");
00652         UniChar buffer[256];
00653         CFRange range = {0, str.GetLength()};
00654         ::CFStringGetCharacters(str, range, buffer);
00655     FSRenameUnicode(&thePrefFile, str.GetLength(), buffer, kTextEncodingUnknown, NULL);
00656   }
00657 #endif /* TARGET_OS_MAC */
00658 #ifdef WIN32
00659     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00660     {
00661         CPersistentEntry & entry = *i;
00662         BYTE* ppData;
00663         UINT pBytes;
00664
00665         if( only && strcmp(only, entry.m_fUniqueName) != 0 )
00666             continue;
00667
00668         if( !AfxGetApp()->GetProfileBinary(PROFILE_NAME, entry.m_fUniqueName, &ppData, &pBytes))
00669         {
00670             continue;
00671         }
00672
00673         found_one = true;
00674         entry.m_fValue->SetData(ppData, pBytes);
00675         entry.m_fValue->ResetTimeStamp();
00676
00677         delete ppData;
00678     }
00679 #endif /* WIN32 */
00680 #ifdef qUnix
00681     bool error     = false;
00682
00683     CStr home;
00684     CStr cvsroot;
00685
00686
00687     home = gCvsPrefs.Home();
00688     if( !home.endsWith(kPathDelimiter) )
00689         home << kPathDelimiter;
00690
00691     home << ".gcvsrc";
00692
00693     FILE* out = fopen(home, "rb");
00694     if( out == 0L )
00695         return false;
00696
00697     int version;
00698     int numEntries;
00699     CStaticAllocT<char> alloc;
00700     fread(&version, sizeof(int), 1, out);
00701     if( version != 1 )
00702     {
00703         cvs_err("Unexpected version %d in the file '%s'\n", version, (const char*)home);
00704         error = true;
00705     } else {
00706         fread(&numEntries, sizeof(int), 1, out);
00707         if( numEntries < 0 )
00708         {
00709             cvs_err("Unexpected # %d in the file '%s'\n", numEntries, (const char*)home);
00710             error = true;
00711         }
00712     }
00713
00714     /* something has gone wrong !!!! */
00715     if( error ) {
00716         fclose(out);
00717         return false;
00718     }
00719
00720     while( !feof(out) && !ferror(out) )
00721     {
00722         CStr name;
00723         while( !feof(out) && !ferror(out) )
00724         {
00725             int c = getc(out);
00726             if( EOF == c)
00727                 break;
00728             name << (char)c;
00729             if( c == '\0' )
00730                 break;
00731         }
00732
00733         if( feof(out) && name.length())
00734             cvs_err("Unexpected end of file in '%s'\n", (const char*)home);
00735
00736         if( ferror(out) )
00737             cvs_err("Unexpected error %d in '%s'\n", errno, (const char*)home);
00738
00739         if( feof(out) || ferror(out) ) {
00740             break;
00741         }
00742
00743         unsigned int size = 0;
00744         fread(&size, sizeof(unsigned int), 1, out);
00745
00746         if ( size > 1024 || size < 0) {
00747             cvs_err("%s is bogus (size: %d - %s)\n", (const char*)home, size, name.c_str());
00748             break;
00749         }
00750
00751         alloc.AdjustSize(size);
00752         if ( size != fread((char*)alloc, 1, size, out)) {
00753             cvs_err("%s is bogus (fread - %s)\n", (const char*)home, name.c_str());
00754             break;
00755         }
00756
00757         if( only && strcmp(only, name) != 0 )
00758             continue;
00759
00760         CPersistentEntry* entry = Find( name);
00761         if ( NULL == entry) {
00762             if( name.compare("P_Cvsroot") != 0) {
00763                 cvsroot = (char*)alloc;
00764                 if( !cvsroot.empty() ) {
00765                     gOldCvsroots.Insert(cvsroot);
00766                 } else {
00767                     gOldCvsroots.Insert(name);
00768                 }
00769
00770                 continue;
00771             }
00772
00773             cvs_err("dropping value for persitent '%s' from %s (not needed any longer)\n", name.c_str(), (const char*)home);
00774             continue;
00775         }
00776
00777         found_one = true;
00778         entry->m_fValue->SetData((char*)alloc, size);
00779         entry->m_fValue->ResetTimeStamp();
00780     }
00781
00782     if( ferror(out) )
00783         cvs_err("Error while reading '%s' (error %d)\n", (const char*)home, errno);
00784
00785     fclose(out);
00786 #endif /* qUnix */
00787
00788     return found_one;
00789 }
00790
00796 CPersistent::CPersistentEntry* CPersistent::Find(const char* uniqueName)
00797 {
00798     std::vector<CPersistentEntry>::iterator i;
00799     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00800     {
00801         CPersistentEntry& entry = *i;
00802         if( !strcmp(uniqueName, entry.m_fUniqueName) )
00803             return &entry;
00804     }
00805
00806     return 0L;
00807 }
00808
00814 bool CPersistent::NeedSave(bool onlySettings /*= false*/)
00815 {
00816     std::vector<CPersistentEntry>::const_iterator i;
00817     for(i = m_fAllEntries->begin(); i != m_fAllEntries->end(); ++i)
00818     {
00819         const CPersistentEntry& entry = *i;
00820         if( onlySettings && (entry.m_fClass & kAddSettings) == 0 )
00821             continue;
00822
00823         if( entry.m_fValue->m_fTimeStamp != 0 )
00824             return true;
00825     }
00826
00827     return false;
00828 }
00829
00830 #if !qMPWCvs
00831
00833 // Settings management
00834
00840 bool FormatDefaultSettingsLoc(CStr& path)
00841 {
00842 #ifdef WIN32
00843     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00844     if( !pApp )
00845     {
00846         return false;
00847     }
00848
00849     pApp->GetAppPath(path);
00850
00851 #elif defined(qUnix)
00852     struct stat sb;
00853
00854     path = gCvsPrefs.Home();
00855     if( !path.endsWith(kPathDelimiter) )
00856         path << kPathDelimiter;
00857
00858     path << ".gcvs";
00859
00860     if( stat(path, &sb) != -1 )
00861     {
00862         if( !S_ISDIR(sb.st_mode) )
00863         {
00864             cvs_err("The file '%s' already exists and is not a directory", (const char*)path, errno);
00865             return false;
00866         }
00867     }
00868     else if( mkdir(path, 0750) != 0 )
00869     {
00870         cvs_err("Unable to create the directory '%s' (error %d)", (const char*)path, errno);
00871         return false;
00872     }
00873
00874 #elif defined(qMacCvsPP)
00875     path = CMacCvsApp::GetMacCvsPrefsPath();
00876 #endif
00877
00878     if( !path.empty() && !path.endsWith(kPathDelimiter) )
00879     {
00880         path << kPathDelimiter;
00881     }
00882
00883     path << "Settings";
00884
00885     return true;
00886 }
00887
00893 static bool SettingsGetLoc(UStr& path)
00894 {
00895     struct stat sb;
00896
00897     path = "";
00898
00899     if( gCvsPrefs.SettingsFolder() != 0L )
00900     {
00901         path = gCvsPrefs.SettingsFolder();
00902     }
00903     else
00904     {
00905         if( !FormatDefaultSettingsLoc(path) )
00906         {
00907             return false;
00908         }
00909     }
00910
00911     if( stat(path, &sb) != -1 && S_ISDIR(sb.st_mode) )
00912         return true;
00913
00914 #if qUnix || TARGET_RT_MAC_MACHO
00915     if( mkdir(path, 0750) != 0 )
00916 #else
00917     if( mkdir(path) != 0 )
00918 #endif
00919     {
00920         cvs_err("Failed to create the setting folder '%s' (error %d)", (const char*)path, errno);
00921         return false;
00922     }
00923
00924     return true;
00925 }
00926
00927 #ifndef WIN32
00928
00929 class USaveSettings : public UWidget
00930 {
00931 public:
00932     UDECLARE_DYNAMIC(USaveSettings)
00933 public:
00934     USaveSettings(const char* path, const char* oldname);
00935     virtual ~USaveSettings();
00936
00937     virtual void DoDataExchange(bool fill);
00938
00939     enum
00940     {
00941 #if qUnix
00942         kOK = EV_COMMAND_START,
00943         kCancel,
00944         kSettingName,
00945 #else
00946         kSettingName = EV_COMMAND_START,
00947 #endif
00948         kCopyPath,
00949         kCopyFrom,
00950         kCopyList
00951     };
00952
00953     UStr m_settingName;
00954     UStr m_copyFromPath;
00955
00956 protected:
00957     UStr m_path;
00958     UStr m_oldname;
00959     std::map<UStr, UStr> m_list;
00960
00961     ev_msg int OnCopyFrom(void);
00962 #if qUnix
00963     ev_msg int OnOK(void);
00964     ev_msg int OnCancel(void);
00965 #endif
00966
00967     UDECLARE_MESSAGE_MAP()
00968 };
00969
00970 UIMPLEMENT_DYNAMIC(USaveSettings, UWidget)
00971
00972 UBEGIN_MESSAGE_MAP(USaveSettings, UWidget)
00973     ON_UCOMMAND(USaveSettings::kCopyFrom, USaveSettings::OnCopyFrom)
00974 #if qUnix
00975     ON_UCOMMAND(USaveSettings::kOK, USaveSettings::OnOK)
00976     ON_UCOMMAND(USaveSettings::kCancel, USaveSettings::OnCancel)
00977 #endif
00978 UEND_MESSAGE_MAP()
00979
00980 #if qUnix
00981 int USaveSettings::OnOK(void)
00982 {
00983     EndModal(true);
00984     return 0;
00985 }
00986
00987 int USaveSettings::OnCancel(void)
00988 {
00989     EndModal(false);
00990     return 0;
00991 }
00992 #endif
00993
00994 USaveSettings::USaveSettings(const char* path, const char* oldname) :
00995     UWidget(::UEventGetWidID()), m_path(path), m_oldname(oldname)
00996 {
00997 }
00998
00999 USaveSettings::~USaveSettings()
01000 {
01001 }
01002
01003 void USaveSettings::DoDataExchange(bool fill)
01004 {
01005     if( fill )
01006     {
01007         UEventSendMessage(GetWidID(), EV_SETTEXT, kCopyPath, (void*)(const char*)m_path);
01008
01009         UStr defname;
01010         if( m_oldname.empty() )
01011         {
01012             UStr uppath;
01013             SplitPath(m_path, uppath, defname);
01014         }
01015         else
01016             defname = m_oldname;
01017
01018         UEventSendMessage(GetWidID(), EV_SETTEXT, kSettingName, (void*)(const char*)defname);
01019
01020         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kCopyList, 0), 0L);
01021
01022         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kCopyList, 0L);
01023
01024         if(GetAllPersistentSettings(m_list))
01025         {
01026             std::map<UStr, UStr>::const_iterator i;
01027             for(i = m_list.begin(); i != m_list.end(); ++i)
01028             {
01029                 UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kCopyList,
01030                     (void*)(const char*)(*i).first);
01031             }
01032         }
01033     }
01034     else
01035     {
01036         UEventSendMessage(GetWidID(), EV_GETTEXT, kSettingName, &m_settingName);
01037
01038         int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCopyFrom, 0L);
01039         if( state )
01040         {
01041             UStr what;
01042             UEventSendMessage(GetWidID(), EV_COMBO_GETSEL, kCopyList, &what);
01043
01044             std::map<UStr, UStr>::const_iterator i;
01045             i = m_list.find(what);
01046             if(i != m_list.end())
01047             {
01048                 m_copyFromPath = (*i).second;
01049             }
01050         }
01051     }
01052 }
01053
01054 int USaveSettings::OnCopyFrom(void)
01055 {
01056     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCopyFrom, 0L);
01057     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kCopyList, state), 0L);
01058     return 1;
01059 }
01060
01061 #endif /* !WIN32 */
01062
01063 static bool LoadSettingsInternal(const char* fullname,
01064                                  bool (*func)(const char* token, const char* value, void* data), void* data)
01065 {
01066     bool res = false;
01067     int line_length;
01068     char* line = 0L;
01069     size_t line_chars_allocated = 0;
01070     FILE* fp = fopen(fullname, "r");
01071
01072     if( fp == 0L )
01073     {
01074         cvs_err("Failed to open the setting file '%s' for reading (error %d)", fullname, errno);
01075         goto fail;
01076     }
01077
01078     while( (line_length = getline(&line, &line_chars_allocated, fp)) > 0 )
01079     {
01080         // read each token=value
01081         char* tmp = 0L;
01082
01083         if( (tmp = strchr(line, '\n')) != 0L )
01084             *tmp = '\0';
01085
01086         tmp = line;
01087         while( isspace(*tmp) && *tmp != '\0' )
01088             tmp++;
01089
01090         if( *tmp == '\0' || *tmp == '#' )
01091             continue;
01092
01093         UStr token;
01094         UStr value;
01095         const char* tmp2 = strchr(tmp, '=');
01096         if( tmp2 == 0L || tmp2 == tmp )
01097             continue;
01098
01099         token.set(tmp, tmp2 - tmp);
01100         value = tmp2 + 1;
01101
01102         // check version
01103         if( strcmp(token, "VERSION") == 0 )
01104         {
01105             if( atoi(value) != 1 )
01106             {
01107                 cvs_err("Newer format than expected in the setting file '%s'\n", fullname);
01108                 goto fail;
01109             }
01110
01111             continue;
01112         }
01113
01114         if( func(token, value, data) )
01115             break;
01116     }
01117
01118     if( line_length < 0 && !feof (fp) )
01119     {
01120         cvs_err("Cannot read file (error %d)\n", errno);
01121         goto fail;
01122     }
01123
01124     res = true;
01125
01126 fail:
01127     if( line != 0L )
01128         free(line);
01129
01130     if( fp!= 0L )
01131         fclose(fp);
01132
01133     return res;
01134 }
01135
01136 static void getSettingName(const char* fromfile, UStr& res)
01137 {
01138     CStr base, ext, uppath, filename;
01139     SplitPath(fromfile, uppath, filename);
01140     GetExtension(filename, base, ext);
01141
01142     if( !base.empty() && stricmp(ext, "txt") == 0 )
01143         res = base;
01144     else
01145         res = filename;
01146 }
01147
01148 class CFindSettings : public TraversalReport
01149 {
01150 public:
01151     CFindSettings(const char* findPath) : m_pathToFind(findPath), m_list(0L)
01152     {
01153         m_pathToFind.rtrim(kPathDelimiter);
01154     }
01155
01156     CFindSettings(std::map<UStr, UStr>& list) : m_list(&list)
01157     {
01158     }
01159
01160     virtual ~CFindSettings() {}
01161
01162     virtual kTraversal OnError(const char* err, int errcode)
01163     {
01164         cvs_err(err);
01165         cvs_err("\n");
01166         return kTraversalError;
01167     }
01168
01169     virtual kTraversal OnFile(const char* fullpath,
01170         const char* fullname,
01171         const char* name,
01172         const struct stat& dir, const UFSSpec* macspec);
01173
01174     static bool searchPath(const char* token, const char* value, void* data);
01175     static bool searchAllPath(const char* token, const char* value, void* data);
01176
01177     UStr m_pathToFind;
01178     UStr m_settingsFile;
01179     bool m_foundIt;
01180     UStr m_topfolder;
01181     std::map<UStr, UStr>* m_list;
01182 };
01183
01184 bool CFindSettings::searchPath(const char* token, const char* value, void* data)
01185 {
01186     CFindSettings* loader = (CFindSettings*)data;
01187     // if we give a sub-folder to look for, it will return the
01188     // top folder's settings
01189     if( strcmp(token, "PATH") == 0 &&
01190 #if qUnix
01191         strcmp(value, loader->m_pathToFind) == 0
01192 #else
01193         stricmp(value, loader->m_pathToFind) == 0
01194 #endif
01195         )
01196     {
01197         loader->m_foundIt = true;
01198         loader->m_topfolder = value;
01199
01200         return true;
01201     }
01202
01203     return false;
01204 }
01205
01206 bool CFindSettings::searchAllPath(const char* token, const char* value, void* data)
01207 {
01208     CFindSettings *loader = (CFindSettings*)data;
01209     if( strcmp(token, "PATH") == 0 )
01210     {
01211         getSettingName(loader->m_settingsFile, loader->m_settingsFile);
01212         std::map<UStr, UStr>::value_type v(loader->m_settingsFile, UStr(value));
01213         loader->m_list->insert(v);
01214
01215         return true;
01216     }
01217
01218     return false;
01219 }
01220
01221 kTraversal CFindSettings::OnFile(const char* fullpath,
01222         const char* fullname,
01223         const char* name,
01224         const struct stat& dir, const UFSSpec* macspec)
01225 {
01226     m_foundIt = false;
01227
01228     if( m_list == 0L )
01229     {
01230         LoadSettingsInternal(fullname, searchPath, this);
01231     }
01232     else
01233     {
01234         m_settingsFile = fullname;
01235         LoadSettingsInternal(fullname, searchAllPath, this);
01236     }
01237
01238     if( m_foundIt )
01239         m_settingsFile = fullname;
01240
01241     return m_foundIt ? kStopTraversal : kContinueTraversal;
01242 }
01243
01244 bool GetAllPersistentSettings(std::map<UStr, UStr>& res)
01245 {
01246     UStr settingsDir;
01247     if( !SettingsGetLoc(settingsDir) )
01248         return false;
01249
01250     CFindSettings finder(res);
01251     FileTraverse(settingsDir, finder);
01252
01253     return !res.empty();
01254 }
01255
01256 bool HasPersistentSettings(const char* path)
01257 {
01258     UStr settingsDir;
01259     if( !SettingsGetLoc(settingsDir) )
01260         return false;
01261
01262     CFindSettings finder(path);
01263     FileTraverse(settingsDir, finder);
01264
01265     return !finder.m_settingsFile.empty();
01266 }
01267
01268 static bool _loadPersistentSettings(const char* token, const char* value, void* data)
01269 {
01270 #if INTERNAL_AUTHEN
01271     if( strcmp(token, "CVSROOT") == 0 )
01272     {
01273         gCvsPrefs = value;
01274     }
01275     else if( strcmp(token, "AUTHENTICATION") == 0 )
01276     {
01277         gAuthen.setkind(Authen::tokenToKind(value));
01278     }
01279     else if( strcmp(token, "PATH") == 0 )
01280     {
01281     }
01282     else
01283 #endif /* INTERNAL_AUTHEN */
01284     {
01285         CPersistent::CPersistentEntry* entry = CPersistent::Find(token);
01286         if( entry == 0L )
01287         {
01288             //cvs_err("Persistent value '%s' is not registered\n", token);
01289         }
01290         else
01291         {
01292             if( entry->m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentBool)) )
01293             {
01294                 CPersistentBool* pbool = (CPersistentBool*)entry->m_fValue;
01295                 if( strcmp(value, "true") == 0 )
01296                     *pbool = true;
01297                 else if( strcmp(value, "false") == 0 )
01298                     *pbool = false;
01299                 else
01300                     cvs_err("Invalid value '%s' for persistent '%s'\n", (const char*)value, entry->m_fUniqueName);
01301             }
01302             else if( entry->m_fValue->IsKindOf(URUNTIME_CLASS(CPersistentInt)) )
01303             {
01304                 CPersistentInt* pint = (CPersistentInt*)entry->m_fValue;
01305                 int aint;
01306                 int check = sscanf(value, "%d", &aint);
01307                 if( check == 1 )
01308                     *pint = aint;
01309                 else
01310                     cvs_err("Invalid value '%s' for persistent '%s'\n", (const char*)value, entry->m_fUniqueName);
01311             }
01312             else if( entry->m_fValue->IsKindOf(URUNTIME_CLASS(PCStr)) )
01313             {
01314                 PCStr* pstr = (PCStr*)entry->m_fValue;
01315                 *pstr = value;
01316             }
01317             else if( entry->m_fValue->IsKindOf(URUNTIME_CLASS(PCPStr)) )
01318             {
01319                 PCPStr* pstr = (PCPStr*)entry->m_fValue;
01320                 *pstr = value;
01321             }
01322             else
01323             {
01324                 cvs_err("Unknown persistent value '%s'\n", entry->m_fUniqueName);
01325             }
01326         }
01327     }
01328
01329     return false;
01330 }
01331
01337 void LoadPersistentSettings(const char* path, bool quiet /*= false*/)
01338 {
01339     UStr settingsDir;
01340     if( !SettingsGetLoc(settingsDir) )
01341         return;
01342
01343     CFindSettings finder(path);
01344     FileTraverse(settingsDir, finder);
01345
01346     if( finder.m_settingsFile.empty() )
01347         return;
01348
01349     if( LoadSettingsInternal(finder.m_settingsFile, _loadPersistentSettings, 0L) && !quiet )
01350     {
01351         CColorConsole out;
01352         out << kBold << "Loaded settings for " << kNormal << kUnderline << path << kNormal << kBold << " successfully..." << kNormal << kNL;
01353     }
01354 }
01355
01363 static void SaveAllSettings(const char* settingFileName, const char* path, bool quiet = false)
01364 {
01365     if( CPersistent::SaveAllSettings(settingFileName, path) && !quiet )
01366     {
01367         CColorConsole out;
01368         out << kBold << "Saved settings for " << kNormal << kUnderline << path << kNormal << kBold << " successfully..." << kNormal << kNL;
01369     }
01370 }
01371
01377 static void SaveAsPersistentSettings(const char* name, const char* path)
01378 {
01379     UStr settingFileName;
01380     if( !SettingsGetLoc(settingFileName) )
01381         return;
01382
01383     if( !settingFileName.empty() && !settingFileName.endsWith(kPathDelimiter) )
01384         settingFileName << kPathDelimiter;
01385
01386     settingFileName << name;
01387     settingFileName << ".txt";
01388
01389     SaveAllSettings(settingFileName, path);
01390 }
01391
01397 void SavePersistentSettings(const char* path, bool quiet /*= false*/)
01398 {
01399     UStr settingsDir;
01400     if( !SettingsGetLoc(settingsDir) )
01401         return;
01402
01403     CFindSettings finder(path);
01404     FileTraverse(settingsDir, finder);
01405
01406     if( finder.m_settingsFile.empty() )
01407         return;
01408
01409     SaveAllSettings(finder.m_settingsFile, finder.m_topfolder, quiet);
01410 }
01411
01416 void AskCreatePersistentSettings(const char* path)
01417 {
01418     UStr settingsDir;
01419     if( !SettingsGetLoc(settingsDir) )
01420         return;
01421
01422 #ifdef qMacCvsPP
01423     int id = 0;
01424
01425     id = dlg_SaveSettings;
01426 #endif
01427
01428     CFindSettings finder(path);
01429     FileTraverse(settingsDir, finder);
01430
01431     UStr oldName;
01432
01433     if( !finder.m_settingsFile.empty() )
01434     {
01435         getSettingName(finder.m_settingsFile, oldName);
01436     }
01437
01438 #ifdef WIN32
01439     CSaveSettingsDlg saveSettingsDlg(path, oldName);
01440 #else
01441     USaveSettings* dlg = NEW USaveSettings(path, oldName);
01442 #endif
01443
01444 #if qUnix
01445     void* wid;
01446 #   if qGTK
01447     wid = UCreate_SettingsDlg();
01448 #   endif
01449
01450     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01451 #endif
01452
01453 #ifdef WIN32
01454     if( saveSettingsDlg.DoModal() == IDOK )
01455 #else
01456     if( dlg->DoModal() )
01457 #endif
01458     {
01459
01460 #ifdef WIN32
01461         UStr name = saveSettingsDlg.m_settingName;
01462 #else
01463         UStr name = dlg->m_settingName;
01464 #endif
01465         UStr fileToDelete;
01466
01467         if( !name.empty() )
01468         {
01469             if( !oldName.empty() )
01470             {
01471                 if( stricmp(oldName, name) != 0 )
01472                 {
01473                     UStr prompt("The setting '");
01474                     prompt << oldName;
01475                     prompt << "' already points on the same folder. ";
01476                     prompt << "Press 'Delete' if you want to override this setting ";
01477
01478                     CvsAlert cvsAlert(kCvsAlertWarningIcon,
01479                         prompt, "Two settings cannot point on the same location.",
01480                         BUTTONTITLE_DELETE, BUTTONTITLE_CANCEL);
01481
01482                     if( cvsAlert.ShowAlert() != kCvsAlertOKButton )
01483                     {
01484 #ifndef WIN32
01485                         delete dlg;
01486 #endif
01487                         return;
01488                     }
01489
01490                     fileToDelete = finder.m_settingsFile;
01491                 }
01492             }
01493
01494 #ifdef WIN32
01495             if( saveSettingsDlg.m_copy && !saveSettingsDlg.m_copyFrom.IsEmpty() )
01496             {
01497                 std :: map<UStr, UStr> settingsList;
01498                 if( GetAllPersistentSettings(settingsList) )
01499                 {
01500                     UStr what = saveSettingsDlg.m_copyFrom;
01501
01502                     std::map<UStr, UStr>::const_iterator i;
01503                     i = settingsList.find(what);
01504                     if( i != settingsList.end() )
01505                     {
01506                         CStr copyFromPath = (*i).second;
01507                         LoadPersistentSettings(copyFromPath);
01508                     }
01509                 }
01510             }
01511 #else
01512             if( !dlg->m_copyFromPath.empty() )
01513                 LoadPersistentSettings(dlg->m_copyFromPath);
01514 #endif
01515
01516             NormalizeFileName(name);
01517             SaveAsPersistentSettings(name, path);
01518
01519             if( !fileToDelete.empty() )
01520             {
01521                 if( remove(fileToDelete) != 0 )
01522                     cvs_err("Error while deleting '%s' (error %d)\n", (const char*)fileToDelete, errno);
01523             }
01524         }
01525     }
01526
01527 #ifndef WIN32
01528     delete dlg;
01529 #endif
01530 }
01531
01532 #endif // !qMPWCvs
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCmdTarget Member List

This is the complete list of members for UCmdTarget, including all inherited members.

_GetBaseClass() | UCmdTarget | [protected, static]
_messageEntries | UCmdTarget | [private, static]
classUCmdTarget | UCmdTarget | [protected, static]
classUObject | UObject | [protected, static]
CreateObject(const char *className) | UObject | [static]
GetBaseMessageMap() | UCmdTarget | [protected, static]
GetMessageMap() const | UCmdTarget | [protected, virtual]
GetRuntimeClass() const | UCmdTarget | [virtual]
GetThisMessageMap() | UCmdTarget | [protected, static]
GetWidID(void) const | UCmdTarget | [inline]
IsKindOf(const URuntimeClass *pClass) const | UObject |
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_widid | UCmdTarget | [private]
messageMap | UCmdTarget | [protected, static]
rtUCmdTarget(void) | UCmdTarget | [static]
rtUObject() | UObject | [static]
UCmdTarget(int widid) | UCmdTarget |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UCmdTarget | [virtual]
UObject() | UObject | [inline, protected]
~UCmdTarget() | UCmdTarget | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:50:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/InitDlg.h Source File

common/InitDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- June 1999
00019  */
00020
00021 /*
00022  * InitDlg.cpp : the cvs init dialog
00023  */
00024
00025 #if !defined(AFX_INITDLG_H__155D02C3_2323_11D3_B1A6_004095463819__INCLUDED_)
00026 #define AFX_INITDLG_H__155D02C3_2323_11D3_B1A6_004095463819__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #ifdef WIN32
00033 #   include "HHelpSupport.h"
00034 #endif
00035
00036 class CStr;
00037 bool CompatGetInit(bool& forceCvsroot, CStr& cvsroot);
00038
00039 #ifdef WIN32
00040
00041 // CInit_MAIN dialog
00042
00043 class CInit_MAIN : public CHHelpPropertyPage
00044 {
00045     DECLARE_DYNAMIC(CInit_MAIN)
00046
00047 // Construction
00048 public:
00049     CInit_MAIN(bool forceRoot, const char* cvsroot);
00050
00051 // Dialog Data
00052     //{{AFX_DATA(CInit_MAIN)
00053     enum { IDD = IDD_INIT_MAIN };
00054     CButton m_selCvsrootButton;
00055     CSmartComboBox  m_cvsrootCombo;
00056     CButton m_forceRootCheck;
00057     BOOL    m_forceRoot;
00058     CString m_helpinit;
00059     CString m_cvsroot;
00060     //}}AFX_DATA
00061
00062
00063 // Overrides
00064     // ClassWizard generated virtual function overrides
00065     //{{AFX_VIRTUAL(CInit_MAIN)
00066     protected:
00067     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00068     //}}AFX_VIRTUAL
00069
00070 // Implementation
00071 protected:
00072
00073     // Generated message map functions
00074     //{{AFX_MSG(CInit_MAIN)
00075     afx_msg void OnForceroot();
00076     afx_msg void OnSelcvsroot();
00077     virtual BOOL OnInitDialog();
00078     //}}AFX_MSG
00079     DECLARE_MESSAGE_MAP()
00080 private:
00081     // Methods
00082     virtual void InitHelpID();
00083 };
00084
00085 //{{AFX_INSERT_LOCATION}}
00086 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00087 #endif
00088
00089 #endif // !defined(AFX_INITDLG_H__155D02C3_2323_11D3_B1A6_004095463819__INCLUDED_)
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsAlert.cpp Source File

common/CvsAlert.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // CvsAlert.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #ifdef TARGET_OS_MAC
00027 #   include <Dialogs.h>
00028 #   include <TextUtils.h>
00029 #   include <string.h>
00030 #   include "MacMisc.h"
00031 # include "MacCvsApp.h"
00032 # include "UModalDialogs.h"
00033 #endif /* TARGET_OS_MAC */
00034
00035 #if qUnix
00036 #   include "UCvsDialogs.h"
00037 #endif
00038
00039 #ifdef WIN32
00040 #   include "resource.h"
00041
00042 #   ifdef _DEBUG
00043 #   define new DEBUG_NEW
00044 #   undef THIS_FILE
00045     static char THIS_FILE[] = __FILE__;
00046 #   endif
00047 #endif /* WIN32 */
00048
00049 #include "CvsAlert.h"
00050 #include "Persistent.h"
00051
00053 #ifdef WIN32
00054 #   define DEFAULT_ALERT_TITLE _i18n("WinCvs Alert");
00055 #endif
00056 #ifdef TARGET_OS_MAC
00057 #   define DEFAULT_ALERT_TITLE "";
00058 #endif
00059 #if qUnix
00060 #   define DEFAULT_ALERT_TITLE _i18n("gCvs Alert");
00061 #endif
00062
00063 #ifdef TARGET_OS_MAC
00064 namespace {
00065   pascal Boolean _ModalFilter(DialogRef theDialog, EventRecord *theEvent, DialogItemIndex *itemHit);
00066   ModalFilterUPP _ModalFilterUPP(NewModalFilterUPP(_ModalFilter));
00067 }
00068 #endif
00069
00071 //{ CvsAlert
00072
00073 CvsAlert::CvsAlert(const kCvsAlertIconType icon,
00074                    const char* message, const char* messageDetails /*= NULL*/,
00075                    const char* okButtonTitle /*= BUTTONTITLE_OK*/, const char* cancelButtonTitle /*= BUTTONTITLE_CANCEL*/)
00076 {
00077     m_icon = icon;
00078
00079     m_message = message ? message : "";
00080     m_messageDetails = messageDetails ? messageDetails : "";
00081
00082     m_okButtonTitle = okButtonTitle ? okButtonTitle : "";
00083     m_cancelButtonTitle = cancelButtonTitle ? cancelButtonTitle : "";
00084
00085     if( icon == kCvsAlertNoteIcon )
00086     {
00087         // Note needs one button only
00088         m_cancelButtonTitle.erase();
00089     }
00090
00091     m_pHideOption = NULL;
00092
00093     m_alertTitle = DEFAULT_ALERT_TITLE;
00094 }
00095
00101 kCvsAlertButtonType CvsAlert::ShowAlert(const kCvsAlertButtonType defaultButton /*= kCvsAlertOKButton*/)
00102 {
00103     if( m_pHideOption && (bool)*m_pHideOption )
00104     {
00105         return kCvsAlertOKButton;
00106     }
00107
00108 #if defined(WIN32) || defined(qUnix)
00109     CCVSAlert_MAIN cvsAlertDlg(this, defaultButton);
00110     return (kCvsAlertButtonType)cvsAlertDlg.DoModal();
00111 #endif /* WIN32 */
00112
00113 #ifdef TARGET_OS_MAC
00114   // make sure user knows we need input
00115     CMacCvsApp::gApp->InteractWithUser();
00116     // and then display a standard alert
00117   AlertStdCFStringAlertParamRec       alertParams;
00118   kCvsAlertButtonType                 result(kCvsAlertCancelButton);
00119   SInt16                              itemHit(kAlertStdAlertCancelButton);
00120   if ( GetStandardAlertDefaultParams(&alertParams, kStdCFStringAlertVersionOne) == noErr )
00121   {
00122       CFStringRef     okButtonTitle(NULL);
00123       CFStringRef     cancelButtonTitle(NULL);
00124       CFStringRef     otherButtonTitle(NULL);
00125       CFStringRef     primaryMessage(m_message.empty() ? NULL : CFStringCreateWithCString(NULL, m_message.c_str(), CFStringGetSystemEncoding()));
00126       CFStringRef     secondaryMessage(m_messageDetails.empty() ? NULL : CFStringCreateWithCString(NULL, m_messageDetails.c_str(), CFStringGetSystemEncoding()));
00127
00128       /* first option for using the title: prefix the message with the title - not quite the real thing...
00129       if ( !m_alertTitle.empty() )
00130       {
00131         CFStringRef   alertTitle(CFStringCreateWithCString(NULL, m_alertTitle.c_str(), CFStringGetSystemEncoding()));
00132         if ( alertTitle )
00133         {
00134           if ( primaryMessage )
00135           {
00136             CFStringRef message(primaryMessage);
00137             primaryMessage = CFStringCreateWithFormat(NULL, NULL, message ? CFSTR("%@:\n%@") : CFSTR("%@:"), alertTitle, message);
00138             if ( message ) CFRelease(message);
00139           }
00140         }
00141       }
00142       */
00143
00144       // set up button title CFStrings
00145       if ( !m_okButtonTitle.empty()  &&  m_okButtonTitle != BUTTONTITLE_OK )
00146         okButtonTitle = CFStringCreateWithCString(NULL, m_okButtonTitle.c_str(), CFStringGetSystemEncoding());
00147       if ( !m_cancelButtonTitle.empty()  &&  m_cancelButtonTitle != BUTTONTITLE_CANCEL )
00148         cancelButtonTitle = CFStringCreateWithCString(NULL, m_cancelButtonTitle.c_str(), CFStringGetSystemEncoding());
00149       if ( !m_otherButtonTitle.empty() )
00150         otherButtonTitle = CFStringCreateWithCString(NULL, m_otherButtonTitle.c_str(), CFStringGetSystemEncoding());
00151
00152       // customize alert params
00153       alertParams.movable = true;
00154       alertParams.defaultText = m_okButtonTitle != BUTTONTITLE_OK ? okButtonTitle : (CFStringRef)kAlertDefaultOKText;
00155       alertParams.cancelText = m_cancelButtonTitle != BUTTONTITLE_CANCEL ? cancelButtonTitle : (CFStringRef)kAlertDefaultCancelText;
00156       alertParams.otherText = otherButtonTitle;
00157       // set button behaviors
00158       switch ( defaultButton )
00159       {
00160         case kCvsAlertOKButton: alertParams.defaultButton = kAlertStdAlertOKButton; break;
00161         case kCvsAlertCancelButton: alertParams.defaultButton = kAlertStdAlertCancelButton; break;
00162         case kCvsAlertOtherButton: alertParams.defaultButton = kAlertStdAlertOtherButton; break;
00163       }
00164       // cancel button can only behave as either cancel _or_ default button
00165       if ( alertParams.cancelText != NULL  &&  defaultButton != kCvsAlertCancelButton )
00166          alertParams.cancelButton = kAlertStdAlertCancelButton;
00167
00168       // translate alert type
00169       AlertType       alertType;
00170       switch ( m_icon )
00171       {
00172         case kCvsAlertStopIcon:
00173           alertType = kAlertStopAlert;
00174           break;
00175         case kCvsAlertNoteIcon:
00176           alertType = kAlertNoteAlert;
00177           break;
00178         case kCvsAlertWarningIcon:
00179         case kCvsAlertQuestionIcon:
00180           alertType = kAlertCautionAlert;
00181           break;
00182         case kCvsAlertNoIcon:
00183         default:
00184           alertType = kAlertPlainAlert;
00185       }
00186
00187       // create and run the alert
00188       DialogRef       alert;
00189       if ( CreateStandardAlert(alertType, primaryMessage, secondaryMessage, &alertParams, &alert) == noErr )
00190       {
00191       /* another option for using the title: actually set the window title - unfortunately, this is against the Apple UI guidelines
00192         if ( !m_alertTitle.empty() )
00193         {
00194           CFStringRef title(CFStringCreateWithCString(NULL, m_alertTitle.c_str(), CFStringGetSystemEncoding()));
00195           if (title ) {
00196             SetWindowTitleWithCFString(GetDialogWindow(alert), title);
00197             CFRelease(title);
00198           }
00199         }
00200       */
00201         RunStandardAlert(alert, _ModalFilterUPP, &itemHit);
00202       }
00203
00204       // clean up strings
00205       if ( okButtonTitle ) CFRelease(okButtonTitle);
00206       if ( cancelButtonTitle ) CFRelease(cancelButtonTitle);
00207       if ( otherButtonTitle ) CFRelease(otherButtonTitle);
00208       if ( primaryMessage ) CFRelease(primaryMessage);
00209       if ( secondaryMessage ) CFRelease(secondaryMessage);
00210   }
00211   // translate button result
00212   switch ( itemHit )
00213   {
00214     case kAlertStdAlertOKButton: return kCvsAlertOKButton;
00215     case kAlertStdAlertCancelButton: return kCvsAlertCancelButton;
00216     default:
00217       return kCvsAlertOtherButton;
00218   }
00219 #endif /* TARGET_OS_MAC */
00220
00221     return defaultButton;
00222 }
00223
00228 void CvsAlert::SetAlertTitle(const char* alertTitle)
00229 {
00230     m_alertTitle = alertTitle ? alertTitle : "";
00231 }
00232
00238 void CvsAlert::SetButtonTitle(const kCvsAlertButtonType buttonType, const char* buttonTitle)
00239 {
00240     if( !buttonTitle )
00241     {
00242         buttonTitle = "";
00243     }
00244
00245     switch( buttonType )
00246     {
00247     case kCvsAlertOKButton:
00248         m_okButtonTitle = buttonTitle;
00249     case kCvsAlertCancelButton:
00250         m_cancelButtonTitle = buttonTitle;
00251     case kCvsAlertOtherButton:
00252         m_otherButtonTitle = buttonTitle;
00253     default:
00254 #ifdef WIN32
00255         ASSERT(FALSE); // Incorrect button type
00256 #endif
00257         break;
00258     }
00259 }
00260
00265 void CvsAlert::SetHideOption(CPersistentBool* pHideOption)
00266 {
00267     m_pHideOption = pHideOption;
00268 }
00269
00274 kCvsAlertIconType CvsAlert::GetIcon() const
00275 {
00276     return m_icon;
00277 }
00278
00283 std::string CvsAlert::GetMessage() const
00284 {
00285     return m_message;
00286 }
00287
00292 std::string CvsAlert::GetMessageDetails() const
00293 {
00294     return m_messageDetails;
00295 }
00296
00301 std::string CvsAlert::GetAlertTitle() const
00302 {
00303     return m_alertTitle;
00304 }
00305
00311 std::string CvsAlert::GetButtonTitle(const kCvsAlertButtonType buttonType) const
00312 {
00313     switch( buttonType )
00314     {
00315     case kCvsAlertOKButton:
00316         return m_okButtonTitle;
00317     case kCvsAlertCancelButton:
00318         return m_cancelButtonTitle;
00319     case kCvsAlertOtherButton:
00320         return m_otherButtonTitle;
00321     default:
00322 #ifdef WIN32
00323         ASSERT(FALSE); // Incorrect button type
00324 #endif
00325         break;
00326     }
00327
00328     return "";
00329 }
00330
00335 CPersistentBool* CvsAlert::GetHideOption() const
00336 {
00337     return m_pHideOption;
00338 }
00339 //} CvsAlert
00340
00341 #ifdef WIN32
00342
00343 //{ CCVSAlert_MAIN dialog
00344
00345
00346 CCVSAlert_MAIN::CCVSAlert_MAIN(const CvsAlert* pcvsAlert, const kCvsAlertButtonType defaultButton, CWnd* pParent /*=NULL*/)
00347     : m_pcvsAlert(pcvsAlert), CDialog(CCVSAlert_MAIN::IDD, pParent)
00348 {
00349     //{{AFX_DATA_INIT(CCVSAlert_MAIN)
00350     m_messageDetails = "";
00351     m_alertMessage = "";
00352     //}}AFX_DATA_INIT
00353
00354     m_defaultButton = defaultButton;
00355 }
00356
00357
00358 void CCVSAlert_MAIN::DoDataExchange(CDataExchange* pDX)
00359 {
00360     CDialog::DoDataExchange(pDX);
00361     //{{AFX_DATA_MAP(CCVSAlert_MAIN)
00362     DDX_Control(pDX, IDC_ALERT_MESSAGE, m_alertMessageEdit);
00363     DDX_Control(pDX, IDC_MESSAGE_DETAILS, m_messageDetailsEdit);
00364     DDX_Control(pDX, IDOK, m_okButton);
00365     DDX_Control(pDX, IDCANCEL, m_cancelButton);
00366     DDX_Control(pDX, IDC_OTHER_BUTTON, m_otherButton);
00367     DDX_Control(pDX, IDC_ICON_STATIC, m_iconStatic);
00368     DDX_Text(pDX, IDC_MESSAGE_DETAILS, m_messageDetails);
00369     DDX_Text(pDX, IDC_ALERT_MESSAGE, m_alertMessage);
00370     //}}AFX_DATA_MAP
00371 }
00372
00373 BEGIN_MESSAGE_MAP(CCVSAlert_MAIN, CDialog)
00374     //{{AFX_MSG_MAP(CCVSAlert_MAIN)
00375     ON_BN_CLICKED(IDC_OTHER_BUTTON, OnOtherButton)
00376     //}}AFX_MSG_MAP
00377 END_MESSAGE_MAP()
00378
00380 // CCVSAlert_MAIN message handlers
00381
00383 BOOL CCVSAlert_MAIN::OnInitDialog()
00384 {
00385     CDialog::OnInitDialog();
00386
00387     // Extra initialization
00388     ASSERT(m_pcvsAlert != NULL); // No alert info class
00389
00390     if( m_pcvsAlert )
00391     {
00392         SetIcon();
00393         SetTitle();
00394         SetMessages();
00395         Resize();
00396         SetButtonTitles();
00397         SetAccelerators();
00398         SetDefaultButton();
00399
00400         UpdateData(FALSE);
00401     }
00402
00403     return TRUE;  // return TRUE unless you set the focus to a control
00404     // EXCEPTION: OCX Property Pages should return FALSE
00405 }
00406
00410 void CCVSAlert_MAIN::SetIcon()
00411 {
00412     ASSERT(m_pcvsAlert != NULL); // Bad pointer
00413
00414     switch( m_pcvsAlert->GetIcon() )
00415     {
00416     case kCvsAlertStopIcon:
00417         m_iconStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MB_STOP));
00418         break;
00419     case kCvsAlertNoteIcon:
00420         m_iconStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MB_INFORMATION));
00421         break;
00422     default:
00423         // Fall thru
00424     case kCvsAlertWarningIcon:
00425         m_iconStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MB_EXCLAMATION));
00426         break;
00427     case kCvsAlertQuestionIcon:
00428         m_iconStatic.SetIcon(AfxGetApp()->LoadIcon(IDI_MB_QUESTION));
00429         break;
00430     }
00431 }
00432
00436 void CCVSAlert_MAIN::SetTitle()
00437 {
00438     if( !m_pcvsAlert->GetAlertTitle().empty() )
00439     {
00440         SetWindowText(m_pcvsAlert->GetAlertTitle().c_str());
00441     }
00442 }
00443
00447 void CCVSAlert_MAIN::SetMessages()
00448 {
00449     // Change the font to Bold for alert message control
00450     CFont* pFont = m_alertMessageEdit.GetFont();
00451     LOGFONT logFont = { 0 };
00452
00453     pFont->GetLogFont(&logFont);
00454     logFont.lfWeight = FW_BOLD;
00455     m_alertMessageFont.CreateFontIndirect(&logFont);
00456
00457     m_alertMessageEdit.SetFont(&m_alertMessageFont);
00458
00459     // Set messages
00460     m_alertMessage = m_pcvsAlert->GetMessage().c_str();
00461
00462     if( !m_pcvsAlert->GetMessageDetails().empty() )
00463     {
00464         m_messageDetails += m_pcvsAlert->GetMessageDetails().c_str();
00465     }
00466     else
00467     {
00468         m_messageDetailsEdit.EnableWindow(FALSE);
00469         m_messageDetailsEdit.ShowWindow(SW_HIDE);
00470     }
00471
00472     // Fix the newline characters
00473     m_alertMessage.Replace("\n", "\r\n");
00474     m_messageDetails.Replace("\n", "\r\n");
00475 }
00476
00484 CSize CCVSAlert_MAIN::GetWndTextExtent(CWnd* wnd, const char* text)
00485 {
00486     CSize res(0, 0);
00487
00488     CDC* pDC = wnd->GetDC();
00489     ASSERT(pDC != NULL); // Invalid device context
00490
00491     if( pDC )
00492     {
00493         CFont* pOldFond = pDC->SelectObject(wnd->GetFont());
00494         TEXTMETRIC textMetric = { 0 };
00495
00496         pDC->GetTextMetrics(&textMetric);
00497         res = pDC->GetTextExtent(text);
00498         res.cx += textMetric.tmOverhang;
00499
00500         if( pOldFond )
00501         {
00502             pDC->SelectObject(pOldFond);
00503         }
00504     }
00505
00506     return res;
00507 }
00508
00517 CSize CCVSAlert_MAIN::CalcWndTextSize(CWnd* wnd, const char* text, const int width)
00518 {
00519     CSize res(0, 0);
00520
00521     CDC* pDC = wnd->GetDC();
00522     ASSERT(pDC != NULL); // Invalid device context
00523
00524     if( pDC )
00525     {
00526         CFont* pOldFond = pDC->SelectObject(wnd->GetFont());
00527         CRect rect;
00528
00529         wnd->GetClientRect(rect);
00530         rect.right += width - rect.Width();
00531
00532         pDC->DrawText(text, -1, rect, DT_CALCRECT | DT_EXPANDTABS | DT_NOPREFIX | DT_WORDBREAK);
00533         res = rect.Size();
00534
00535         if( pOldFond )
00536         {
00537             pDC->SelectObject(pOldFond);
00538         }
00539     }
00540
00541     return res;
00542 }
00543
00547 void CCVSAlert_MAIN::Resize()
00548 {
00549     int horizAdj = 0;
00550     int vertAdj = 0;
00551
00552     // Calculate adjustments
00553     {
00554         // Horizontal
00555         const CSize alertSize = GetWndTextExtent(&m_alertMessageEdit, m_pcvsAlert->GetMessage().c_str());
00556
00557         CRect alertWndRect;
00558         m_alertMessageEdit.GetWindowRect(alertWndRect);
00559
00560         if( alertSize.cx > alertWndRect.Width() )
00561         {
00562             horizAdj = alertSize.cx - alertWndRect.Width();
00563         }
00564
00565         // Vertical
00566         CRect messageDetailsWndRect;
00567         m_messageDetailsEdit.GetClientRect(messageDetailsWndRect);
00568
00569         if( !m_pcvsAlert->GetMessageDetails().empty() )
00570         {
00571             const CSize messageDetailsSize = CalcWndTextSize(&m_messageDetailsEdit,
00572                 m_pcvsAlert->GetMessageDetails().c_str(),
00573                 messageDetailsWndRect.Width() + horizAdj);
00574
00575             if( messageDetailsSize.cy > messageDetailsWndRect.Height() )
00576             {
00577                 vertAdj = messageDetailsSize.cy - messageDetailsWndRect.Height();
00578             }
00579         }
00580         else
00581         {
00582             // Reducing message details to zero and moving all controls up
00583             vertAdj -= messageDetailsWndRect.Height();
00584         }
00585     }
00586
00587     // Resize dialog and controls
00588     CRect rect;
00589
00590     // Resize the alert message
00591     m_alertMessageEdit.GetWindowRect(rect);
00592     m_alertMessageEdit.SetWindowPos(NULL, 0, 0, rect.Width() + horizAdj, rect.Height(), SWP_NOMOVE | SWP_NOZORDER);
00593
00594     // Resize the message details
00595     m_messageDetailsEdit.GetWindowRect(rect);
00596     m_messageDetailsEdit.SetWindowPos(NULL, 0, 0, rect.Width() + horizAdj, rect.Height() + vertAdj, SWP_NOMOVE | SWP_NOZORDER);
00597
00598     // Resize the dialog
00599     GetWindowRect(rect);
00600     SetWindowPos(NULL, 0, 0, rect.Width() + horizAdj, rect.Height() + vertAdj, SWP_NOMOVE | SWP_NOZORDER);
00601
00602     // Move the OK button
00603     m_okButton.GetWindowRect(rect);
00604     ScreenToClient(rect);
00605     m_okButton.SetWindowPos(NULL, rect.left + horizAdj, rect.top + vertAdj, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
00606
00607     // Move the Other button
00608     m_otherButton.GetWindowRect(rect);
00609     ScreenToClient(rect);
00610     m_otherButton.SetWindowPos(NULL, rect.left + horizAdj, rect.top + vertAdj, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
00611
00612     // Move the Cancel button
00613     m_cancelButton.GetWindowRect(rect);
00614     ScreenToClient(rect);
00615     m_cancelButton.SetWindowPos(NULL, rect.left + horizAdj, rect.top + vertAdj, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
00616 }
00617
00621 void CCVSAlert_MAIN::SetButtonTitles()
00622 {
00623     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertOKButton).empty() )
00624     {
00625         m_okButton.SetWindowText(m_pcvsAlert->GetButtonTitle(kCvsAlertOKButton).c_str());
00626     }
00627
00628     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertCancelButton).empty() )
00629     {
00630         m_cancelButton.SetWindowText(m_pcvsAlert->GetButtonTitle(kCvsAlertCancelButton).c_str());
00631     }
00632     else
00633     {
00634         // Hide the Cancel button (but keep it enabled so OnCancel can be called)
00635         //m_cancelButton.EnableWindow(FALSE);
00636         m_cancelButton.ShowWindow(SW_HIDE);
00637
00638         CRect rect;
00639
00640         // Move the Other button to fill in the gap
00641         m_cancelButton.GetWindowRect(rect);
00642         ScreenToClient(rect);
00643         m_otherButton.MoveWindow(rect);
00644
00645         // Move the OK button to fill in the gap
00646         m_otherButton.GetWindowRect(rect);
00647         ScreenToClient(rect);
00648         m_okButton.MoveWindow(rect);
00649     }
00650
00651     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertOtherButton).empty() )
00652     {
00653         m_otherButton.SetWindowText(m_pcvsAlert->GetButtonTitle(kCvsAlertOtherButton).c_str());
00654     }
00655     else
00656     {
00657         // Hide the extra button
00658         m_otherButton.EnableWindow(FALSE);
00659         m_otherButton.ShowWindow(SW_HIDE);
00660
00661         // Move the OK button to fill in the gap
00662         CRect rect;
00663         m_otherButton.GetWindowRect(rect);
00664         ScreenToClient(rect);
00665         m_okButton.MoveWindow(rect);
00666     }
00667 }
00668
00672 void CCVSAlert_MAIN::SetAccelerators()
00673 {
00674     SetButtonAccelerator(m_okButton);
00675     SetButtonAccelerator(m_otherButton);
00676     SetButtonAccelerator(m_cancelButton);
00677 }
00678
00682 void CCVSAlert_MAIN::SetDefaultButton()
00683 {
00684     UINT defID = 0;
00685     HWND defHwnd = NULL;
00686
00687     switch( m_defaultButton )
00688     {
00689     case kCvsAlertOKButton:
00690         if( m_okButton.IsWindowEnabled() )
00691         {
00692             defID = m_okButton.GetDlgCtrlID();
00693             defHwnd = m_okButton.GetSafeHwnd();
00694         }
00695         break;
00696     case kCvsAlertCancelButton:
00697         if( m_cancelButton.IsWindowEnabled() )
00698         {
00699             defID = m_cancelButton.GetDlgCtrlID();
00700             defHwnd = m_cancelButton.GetSafeHwnd();
00701         }
00702         break;
00703     case kCvsAlertOtherButton:
00704         if( m_otherButton.IsWindowEnabled() )
00705         {
00706             defID = m_otherButton.GetDlgCtrlID();
00707             defHwnd = m_otherButton.GetSafeHwnd();
00708         }
00709         break;
00710     default:
00711         ASSERT(FALSE); // Incorrect button type
00712         break;
00713     }
00714
00715     if( defID )
00716     {
00717         SetDefID(defID);
00718     }
00719
00720     if( defHwnd )
00721     {
00722         PostMessage(WM_NEXTDLGCTL, (WPARAM)defHwnd, (LPARAM)TRUE);
00723     }
00724 }
00725
00730 void CCVSAlert_MAIN::SetButtonAccelerator(CButton& button)
00731 {
00732     CString buttonTitle;
00733     button.GetWindowText(buttonTitle);
00734
00735     if( buttonTitle.CompareNoCase(BUTTONTITLE_OK) && buttonTitle.CompareNoCase(BUTTONTITLE_CANCEL) )
00736     {
00737         buttonTitle = "&" + buttonTitle;
00738         button.SetWindowText(buttonTitle);
00739     }
00740 }
00741
00743 void CCVSAlert_MAIN::OnOK()
00744 {
00745     CDialog::OnOK();
00746
00747     EndDialog(kCvsAlertOKButton);
00748 }
00749
00751 void CCVSAlert_MAIN::OnCancel()
00752 {
00753     CDialog::OnCancel();
00754
00755     EndDialog(kCvsAlertCancelButton);
00756 }
00757
00759 void CCVSAlert_MAIN::OnOtherButton()
00760 {
00761     EndDialog(kCvsAlertOtherButton);
00762 }
00763 #endif /* WIN32 */
00764
00765 #ifdef qUnix
00766
00767 CCVSAlert_MAIN::CCVSAlert_MAIN(const CvsAlert* pcvsAlert, const kCvsAlertButtonType defaultButton)
00768     : UWidget(::UEventGetWidID()), m_pcvsAlert(pcvsAlert)
00769 {
00770     m_messageDetails = "";
00771     m_alertMessage = "";
00772
00773     m_defaultButton = defaultButton;
00774
00775     OnInitDialog();
00776 }
00777
00778
00779 void CCVSAlert_MAIN::DoDataExchange(bool fill)
00780 {
00781     if(fill)
00782     {
00783         UEventSendMessage(GetWidID(), EV_SETTEXT, kMessage, (void *)m_alertMessage.c_str());
00784         UEventSendMessage(GetWidID(), EV_SETTEXT, kMessageDetails, (void *)m_messageDetails.c_str());
00785     }
00786     else
00787     {
00788     }
00789 }
00790
00791 UIMPLEMENT_DYNAMIC(CCVSAlert_MAIN, UWidget)
00792
00793 UBEGIN_MESSAGE_MAP(CCVSAlert_MAIN, UWidget)
00794     ON_UCOMMAND(CCVSAlert_MAIN::kOK, CCVSAlert_MAIN::OnOK)
00795     ON_UCOMMAND(CCVSAlert_MAIN::kCancel, CCVSAlert_MAIN::OnCancel)
00796     ON_UCOMMAND(CCVSAlert_MAIN::kOtherBtn, CCVSAlert_MAIN::OnOtherButton)
00797 UEND_MESSAGE_MAP()
00798
00800 // CCVSAlert_MAIN message handlers
00801
00803 bool CCVSAlert_MAIN::OnInitDialog()
00804 {
00805     UWidget::OnInitWidget(kUMainWidget, UCreate_Alert());
00806
00807     // Extra initialization
00808     ASSERT(m_pcvsAlert != NULL); // No alert info class
00809
00810     if( m_pcvsAlert )
00811     {
00812         SetIcon();
00813         SetTitle();
00814         SetMessages();
00815         SetButtonTitles();
00816         SetAccelerators();
00817         SetDefaultButton();
00818     }
00819     return false;
00820 }
00821
00825 void CCVSAlert_MAIN::SetIcon()
00826 {
00827     ASSERT(m_pcvsAlert != NULL); // Bad pointer
00828
00829     void* icon = NULL;
00830
00831     switch( m_pcvsAlert->GetIcon() )
00832     {
00833     case kCvsAlertStopIcon:
00834         icon = UCreate_pixmap(this, "stopAlert.xpm");
00835         break;
00836     case kCvsAlertNoteIcon:
00837         icon = UCreate_pixmap(this, "info.xpm");
00838         break;
00839     default:
00840         // Fall thru
00841     case kCvsAlertWarningIcon:
00842         icon = UCreate_pixmap(this, "warning.xpm");
00843         break;
00844     case kCvsAlertQuestionIcon:
00845         icon = UCreate_pixmap(this, "question.xpm");
00846         break;
00847     }
00848
00849     if( icon != NULL )
00850         UEventSendMessage(GetWidID(), EV_SETICON, kIcon, icon);
00851 }
00852
00856 void CCVSAlert_MAIN::SetTitle()
00857 {
00858     if( !m_pcvsAlert->GetAlertTitle().empty() )
00859     {
00860         UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, (void*)(m_pcvsAlert->GetAlertTitle().c_str()));
00861     }
00862 }
00863
00867 void CCVSAlert_MAIN::SetMessages()
00868 {
00869     // Set messages
00870     m_alertMessage = m_pcvsAlert->GetMessage().c_str();
00871
00872     if( !m_pcvsAlert->GetMessageDetails().empty() )
00873     {
00874         m_messageDetails += m_pcvsAlert->GetMessageDetails().c_str();
00875     }
00876     else
00877     {
00878         UEventSendMessage(GetWidID(), EV_SHOW_WIDGET, UMAKEINT(kMessageDetails, 0), 0L);
00879     }
00880 }
00881
00885 void CCVSAlert_MAIN::SetButtonTitles()
00886 {
00887     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertOKButton).empty() )
00888     {
00889         UEventSendMessage(GetWidID(), EV_SETTEXT, kOK, (void *)(m_pcvsAlert->GetButtonTitle(kCvsAlertOKButton).c_str()));
00890     }
00891
00892     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertCancelButton).empty() )
00893     {
00894         UEventSendMessage(GetWidID(), EV_SETTEXT, kCancel, (void *)(m_pcvsAlert->GetButtonTitle(kCvsAlertCancelButton).c_str()));
00895     }
00896     else
00897     {
00898         UEventSendMessage(GetWidID(), EV_SHOW_WIDGET, UMAKEINT(kCancel, 0), 0L);
00899     }
00900
00901     if( !m_pcvsAlert->GetButtonTitle(kCvsAlertOtherButton).empty() )
00902     {
00903         UEventSendMessage(GetWidID(), EV_SETTEXT, kOtherBtn, (void *)(m_pcvsAlert->GetButtonTitle(kCvsAlertOtherButton).c_str()));
00904     }
00905     else
00906     {
00907         UEventSendMessage(GetWidID(), EV_SHOW_WIDGET, UMAKEINT(kOtherBtn, 0), 0L);
00908     }
00909 }
00910
00914 void CCVSAlert_MAIN::SetAccelerators()
00915 {
00916 }
00917
00918 void CCVSAlert_MAIN::SetDefID(unsigned int defID)
00919 {
00920     UEventSendMessage(GetWidID(), EV_SETDEFAULT, defID, 0L);
00921 }
00922
00926 void CCVSAlert_MAIN::SetDefaultButton()
00927 {
00928     unsigned int defID = 0;
00929
00930     switch( m_defaultButton )
00931     {
00932     case kCvsAlertOKButton:
00933         defID = kOK;
00934         break;
00935     case kCvsAlertCancelButton:
00936         defID = kCancel;
00937         break;
00938     case kCvsAlertOtherButton:
00939         defID = kOtherBtn;
00940         break;
00941     default:
00942         break;
00943     }
00944
00945     if( defID )
00946     {
00947         SetDefID(defID);
00948     }
00949 }
00950
00952 void CCVSAlert_MAIN::OnOK()
00953 {
00954     EndDialog(kCvsAlertOKButton);
00955 }
00956
00958 void CCVSAlert_MAIN::OnCancel()
00959 {
00960     EndDialog(kCvsAlertCancelButton);
00961 }
00962
00964 void CCVSAlert_MAIN::OnOtherButton()
00965 {
00966     EndDialog(kCvsAlertOtherButton);
00967 }
00968 #endif /* qUnix */
00969
00970
00971 //} CCVSAlert_MAIN
00972 #if TARGET_OS_MAC
00973 namespace {
00974   pascal Boolean _ModalFilter(DialogRef theDialog, EventRecord *theEvent, DialogItemIndex *itemHit)
00975   {
00976     try {
00977         UModalAlerts::ProcessModalEvent(*theEvent);     // Do normal PP event processing
00978     }
00979
00980     catch (...) { }
00981
00982     return StdFilterProc (theDialog, theEvent, itemHit);
00983   }
00984 }
00985 #endif
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMString Member List

This is the complete list of members for CMString, including all inherited members.

_GetBaseClass() | CMString | [protected, static]
begin() const | TMString< UStr > | [inline]
classCMString | CMString | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | CMString |
Compare(const char *s1, const char *s2) const | TMString< UStr > | [protected, virtual]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
end() const | TMString< UStr > | [inline]
Find(const char *instr) const | TMString< UStr > |
CPersistent::Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | TMString< UStr > | [protected, virtual]
GetList(void) const | TMString< UStr > | [inline]
GetRuntimeClass() const | CMString | [virtual]
GetTimeStamp() const | CPersistent | [inline]
Insert(const char *str) | TMString< UStr > |
IsKindOf(const URuntimeClass *pClass) const | UObject |
list_t typedef | TMString< UStr > |
LoadAll(const char *only=0L) | CPersistent | [static]
m_allStrs | TMString< UStr > | [protected]
m_buffer | TMString< UStr > | [mutable, protected]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_maxStr | TMString< UStr > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
Remove(const char *str) | TMString< UStr > |
RemoveAll() | TMString< UStr > |
ResetTimeStamp() | CPersistent | [inline]
rtCMString(void) | CMString | [static]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | TMString< UStr > | [protected, virtual]
SizeOf(void) const | TMString< UStr > | [protected, virtual]
TMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TMString< UStr > |
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CMString() | CMString | [virtual]
~CPersistent() | CPersistent | [virtual]
~TMString() | TMString< UStr > | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsEntries.h Source File

common/CvsEntries.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  * Modified: Jerzy Kaczorowski <kaczoroj@hotmail.com> - 27 Jan 2001 - fix warning C4800 (Add "0 != " for all the int variables forced to bool value)
00020  */
00021
00022 /*
00023  * CvsEntries.h --- adaptation from cvs/src/entries.c
00024  */
00025
00026 #ifndef CVSENTRIES_H
00027 #define CVSENTRIES_H
00028
00029 #include "SortList.h"
00030 #include "CvsIgnore.h"
00031 #include "cvsgui_i18n.h"
00032 #include "CvsPrefs.h"
00033
00034 #ifdef TARGET_OS_MAC
00035 # include "TextBinary.h" // for definition of UFSSpec
00036 #endif
00037
00038 time_t GetDateTime(const char* strTime);
00039
00040 class KoColumnContext;
00041
00043 typedef enum
00044 {
00045     ENT_FILE,
00046     ENT_SUBDIR
00047 } ent_type;
00048
00050 class ColumnIndex
00051 {
00052 private:
00053     // Construction
00054     ColumnIndex();
00055
00056 public:
00058     enum
00059     {
00060         kName = 0,
00061         kExtention,
00062         kRevision,
00063         kOption,
00064         kState,
00065         kEncoding,
00066         kStickyTag,
00067         kTimeStamp,
00068         kConflict,
00069         kPath,
00070         kEnd
00071     };
00072
00073     static const char* GetColumnName(const int index, const bool shortName = true);
00074 };
00075
00080 class EntnodePath
00081 {
00082 public:
00083     // Construction
00084     EntnodePath(const char* path);
00085 protected:
00086     virtual ~EntnodePath();
00087
00088 public:
00089     // Interface
00090     EntnodePath* Ref();
00091     EntnodePath* UnRef();
00092     const char* GetFullPathName(UStr& resPath, const char* name) const;
00093     const char* GetFolderPath() const;
00094
00095 protected:
00096     // Data members
00097     const char* m_fullpath;
00098     int m_ref;
00099 };
00100
00105 class EntnodeData
00106 {
00107 protected:
00108     // Construction
00109     EntnodeData(const char* name, EntnodePath* path);
00110     virtual ~EntnodeData();
00111
00112 public:
00114     enum
00115     {
00116         kName = ColumnIndex::kName,
00117         kState = ColumnIndex::kState,
00118         kPath = ColumnIndex::kPath
00119     };
00120
00121     // Interface
00122
00124     virtual ent_type GetType() const = 0;
00125
00126     EntnodeData* Ref();
00127     EntnodeData* UnRef();
00128
00129     static int Compare(const EntnodeData& node1, const EntnodeData& node2);
00130     virtual const char* operator[](const int index) const;
00131
00132     void SetMissing(bool state);
00133     bool IsMissing() const;
00134     void SetVisited(bool state);
00135     bool IsVisited() const;
00136     void SetUnknown(bool state);
00137     bool IsUnknown() const;
00138     void SetIgnored(bool state);
00139     bool IsIgnored() const;
00140     void SetLocked(bool state);
00141     bool IsLocked() const;
00142     void SetRemoved(bool state);
00143     bool IsRemoved() const;
00144     void SetState(const char* state);
00145     const char* GetState() const;
00146
00147     const char* GetName() const;
00148     const char* GetFullPathName(UStr& resPath) const;
00149
00150     const char* GetFolderPath() const;
00151
00152     virtual const char* GetExtension() const;
00153     virtual const char* GetConflict() const;
00154
00155     void SetUnmodified(bool state);
00156     bool IsUnmodified() const;
00157
00158     void SetResolved(bool state);
00159     bool IsResolved() const;
00160
00161 #ifdef TARGET_OS_MAC
00162     UFSSpec& MacSpec();
00163     const UFSSpec& GetMacSpec() const;
00164 #endif /* TARGET_OS_MAC */
00165
00166 protected:
00167     // Data members
00168     int m_ref;
00170     int m_missing       : 1;
00171     int m_visited       : 1;
00172     int m_unknown       : 1;
00173     int m_unmodified    : 1;
00174     int m_ignored       : 1;
00175     int m_locked/*readonly*/        : 1;
00176     int m_removed       : 1;
00177     int m_resolved      : 1;
00179 #ifdef TARGET_OS_MAC
00180     UFSSpec macspec;
00181 #endif /* TARGET_OS_MAC */
00182
00183 private:
00184     // Data members
00185     const char* m_name;
00186     const char* m_state;
00187     EntnodePath* m_fullpath;
00189     static UStr m_sbuffer;
00190 };
00191
00196 class EntnodeFile : public EntnodeData
00197 {
00198 public:
00199     // Construction
00200     EntnodeFile(const char* name, EntnodePath* path, const char* vn = NULL,
00201         const char* ts = NULL, const char* option = NULL,
00202         const char* tag = NULL, const char* date = NULL,
00203         const char* conflict = NULL);
00204 protected:
00205     virtual ~EntnodeFile();
00206
00207 public:
00209     enum
00210     {
00211         kExt = ColumnIndex::kExtention,
00212         kVN = ColumnIndex::kRevision,
00213         kTS = ColumnIndex::kTimeStamp,
00214         kOption = ColumnIndex::kOption,
00215         kEncoding = ColumnIndex::kEncoding,
00216         kTag = ColumnIndex::kStickyTag,
00217         kConflict = ColumnIndex::kConflict
00218     };
00219
00220     // Interface
00221     virtual const char* operator[](const int index) const;
00222     virtual ent_type GetType() const;
00223     virtual const char* GetExtension() const;
00224     virtual const char* GetConflict() const;
00225
00226     virtual const char* GetRelativePath(const KoColumnContext* context, const bool forceCreate = false) const;
00227
00228     void SetEncoding(const char* encoding);
00229
00230 protected:
00231     // Data members
00232     const char* m_ext;
00233     const char* m_vn;
00234     const char* m_ts;
00235     const char* m_option;
00236     const char* m_encoding;
00237     const char* m_tag;
00238     const char* m_date;
00239     const char* m_conflict;
00240     mutable const char* m_relativePath;
00241 };
00242
00247 class EntnodeFolder : public EntnodeData
00248 {
00249 public:
00250 // Construction
00251     EntnodeFolder(const char* name, EntnodePath* path, const char* vn = NULL,
00252         const char* ts = NULL, const char* option = NULL, const char* tag = NULL,
00253         const char* date = NULL, const char* conflict = NULL);
00254 protected:
00255     virtual ~EntnodeFolder();
00256
00257 public:
00258     // Interface
00259     virtual const char* operator[](const int index) const;
00260     virtual ent_type GetType() const;
00261 };
00262
00264 class ENTNODE
00265 {
00266 public:
00267     // Construction
00268     ENTNODE();
00269     ENTNODE(EntnodeData* data);
00270     ENTNODE(EntnodeData& data);
00271     ENTNODE(const ENTNODE& anode);
00272     virtual ~ENTNODE();
00273
00274     // Interface
00275     static int Compare(const ENTNODE& node1, const ENTNODE& node2);
00276     ENTNODE& operator=(const ENTNODE& anode);
00277     EntnodeData* Data() const;
00278     operator EntnodeData*() const;
00279
00280 protected:
00281     // Data members
00282     EntnodeData* shareData;
00283 };
00284
00285 bool Entries_Open(CSortList<ENTNODE>& entries, const char* fullpath);
00286
00287 EntnodeData* Entries_SetVisited(const char* path, CSortList<ENTNODE>& entries, const char* name,
00288     const struct stat& finfo, bool isFolder, const std::vector<CStr>* ignlist = NULL);
00289
00290 void Entries_SetMissing(CSortList<ENTNODE>& entries);
00291 bool Tag_Open(CStr& tag, const char* fullpath);
00292
00294 // EntnodePath
00295
00297 inline EntnodePath* EntnodePath::Ref()
00298 {
00299     ++m_ref;
00300     return this;
00301 }
00302
00304 inline EntnodePath* EntnodePath::UnRef()
00305 {
00306     if( --m_ref == 0 )
00307     {
00308         delete this;
00309         return NULL;
00310     }
00311
00312     return this;
00313 }
00314
00319 inline const char* EntnodePath::GetFolderPath() const
00320 {
00321     return m_fullpath;
00322 }
00323
00325 // EntnodeData
00326
00328 inline EntnodeData* EntnodeData::Ref()
00329 {
00330     ++m_ref;
00331     return this;
00332 }
00333
00335 inline EntnodeData* EntnodeData::UnRef()
00336 {
00337     if( --m_ref == 0 )
00338     {
00339         delete this;
00340         return NULL;
00341     }
00342
00343     return this;
00344 }
00345
00353 inline int EntnodeData::Compare(const EntnodeData& node1, const EntnodeData& node2)
00354 {
00355     return gCvsPrefs.MatchEntriesCase() ? strcmp(node1.m_name, node2.m_name) : stricmp(node1.m_name, node2.m_name);
00356 }
00357
00359 inline void EntnodeData::SetMissing(bool state)
00360 {
00361     m_missing = state;
00362 }
00363
00365 inline bool EntnodeData::IsMissing() const
00366 {
00367     return m_missing != 0L;
00368 }
00369
00371 inline void EntnodeData::SetVisited(bool state)
00372 {
00373     m_visited = state;
00374 }
00375
00377 inline bool EntnodeData::IsVisited() const
00378 {
00379     return m_visited != 0L;
00380 }
00381
00383 inline void EntnodeData::SetUnknown(bool state)
00384 {
00385     m_unknown = state;
00386 }
00387
00389 inline bool EntnodeData::IsUnknown() const
00390 {
00391     return m_unknown != 0L;
00392 }
00393
00395 inline void EntnodeData::SetIgnored(bool state)
00396 {
00397     m_ignored = state;
00398 }
00399
00401 inline bool EntnodeData::IsIgnored() const
00402 {
00403     return m_ignored != 0L;
00404 }
00405
00407 inline void EntnodeData::SetLocked(bool state)
00408 {
00409     m_locked = state;
00410 }
00411
00413 inline bool EntnodeData::IsLocked() const
00414 {
00415     return m_locked != 0L;
00416 }
00417
00419 inline void EntnodeData::SetRemoved(bool state)
00420 {
00421     m_removed = state;
00422 }
00423
00425 inline bool EntnodeData::IsRemoved() const
00426 {
00427     return m_removed != 0L;
00428 }
00429
00430
00432 inline void EntnodeData::SetState(const char* state)
00433 {
00434     m_state = state;
00435 }
00436
00438 inline const char* EntnodeData::GetState() const
00439 {
00440     return m_state;
00441 }
00442
00444 inline void EntnodeFile::SetEncoding(const char* encoding)
00445 {
00446     m_encoding = encoding;
00447 }
00448
00450 inline const char* EntnodeData::GetName() const
00451 {
00452     return m_name;
00453 }
00454
00456 inline const char* EntnodeData::GetFullPathName(UStr& resPath) const
00457 {
00458     return m_fullpath->GetFullPathName(resPath, m_name);
00459 }
00460
00462 inline const char* EntnodeData::GetFolderPath() const
00463 {
00464     return m_fullpath->GetFolderPath();
00465 }
00466
00468 inline const char* EntnodeData::GetConflict() const
00469 {
00470     return NULL;
00471 }
00472
00474 inline const char* EntnodeData::GetExtension() const
00475 {
00476     return NULL;
00477 }
00478
00480 inline void EntnodeData::SetUnmodified(bool state)
00481 {
00482     m_unmodified = state;
00483 }
00484
00486 inline bool EntnodeData::IsUnmodified() const
00487 {
00488     return m_unmodified != 0L;
00489 }
00490
00492 inline void EntnodeData::SetResolved(bool state)
00493 {
00494     m_resolved = state;
00495 }
00496
00498 inline bool EntnodeData::IsResolved() const
00499 {
00500     return m_resolved != 0;
00501 }
00502
00503 #ifdef TARGET_OS_MAC
00504
00505 inline UFSSpec& EntnodeData::MacSpec()
00506 {
00507     return macspec;
00508 }
00509
00511 inline const UFSSpec& EntnodeData::GetMacSpec() const
00512 {
00513     return macspec;
00514 }
00515 #endif /* TARGET_OS_MAC */
00516
00518 // ENTNODE
00519
00520 inline ENTNODE::ENTNODE() : shareData(NULL)
00521 {
00522 }
00523
00524 inline ENTNODE::ENTNODE(EntnodeData* data) : shareData(data->Ref())
00525 {
00526 }
00527
00528 inline ENTNODE::ENTNODE(EntnodeData& data) : shareData(data.Ref())
00529 {
00530 }
00531
00532 inline ENTNODE::ENTNODE(const ENTNODE& anode) : shareData(NULL)
00533 {
00534     *this = anode;
00535 }
00536
00537 inline ENTNODE::~ENTNODE()
00538 {
00539     if( shareData != NULL )
00540         shareData->UnRef();
00541 }
00542
00549 inline int ENTNODE::Compare(const ENTNODE& node1, const ENTNODE& node2)
00550 {
00551     return EntnodeData::Compare(*node1.shareData, *node2.shareData);
00552 }
00553
00555 inline EntnodeData* ENTNODE::Data() const
00556 {
00557     return shareData;
00558 }
00559
00561 inline ENTNODE::operator EntnodeData*() const
00562 {
00563     return shareData;
00564 }
00565
00566 #endif /* CVSENTRIES_H */
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ConsoleBar.cpp Source File

WinCvs/ConsoleBar.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1999
00019  */
00020
00021 /*
00022  * ConsoleBar.cpp -- Bar which owns the console
00023  */
00024
00025 #include "stdafx.h"
00026 #include "ConsoleBar.h"
00027 #include "wincvsView.h"
00028 #include "resource.h"
00029
00030 #ifdef _DEBUG
00031 #define new DEBUG_NEW
00032 #undef THIS_FILE
00033 static char THIS_FILE[] = __FILE__;
00034 #endif
00035
00037 // CBarConsole
00038
00039 CBarConsole::CBarConsole() : m_view(0L)
00040 {
00041     // TODO: add construction code here.
00042 }
00043
00044 CBarConsole::~CBarConsole()
00045 {
00046     // TODO: add destruction code here.
00047 }
00048
00049 BEGIN_MESSAGE_MAP(CBarConsole, CCJControlBar)
00050     //{{AFX_MSG_MAP(CBarConsole)
00051     ON_WM_CREATE()
00052     //}}AFX_MSG_MAP
00053 END_MESSAGE_MAP()
00054
00056 // CBarConsole message handlers
00057
00058 int CBarConsole::OnCreate(LPCREATESTRUCT lpCreateStruct)
00059 {
00060     if (CCJControlBar::OnCreate(lpCreateStruct) == -1)
00061         return -1;
00062
00063     m_view = (CWincvsView *)RUNTIME_CLASS(CWincvsView)->CreateObject();
00064     if(m_view == 0L)
00065     {
00066         TRACE0("Failed to create view for CBarConsole\n");
00067         return -1;
00068     }
00069
00070     // TODO: Add your specialized creation code here
00071     if (!m_view->Create(NULL, "",WS_CHILD | WS_VISIBLE | WS_BORDER,
00072         CRect(0,0,0,0), this, 0/*IDC_LIST_CTRL_2*/))
00073     {
00074         TRACE0("Failed to create view for CMyBarLeft\n");
00075         return -1;
00076     }
00077
00078     SetChild(m_view);
00079
00080     return 0;
00081 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/TipDlg.h Source File

WinCvs/TipDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(TIPDLG_H_INCLUDED_)
00022 #define TIPDLG_H_INCLUDED_
00023
00024 // CG: This file added by 'Tip of the Day' component.
00025
00027 // CTipDlg dialog
00028
00029 class CTipDlg : public CDialog
00030 {
00031 // Construction
00032 public:
00033     CTipDlg(CWnd* pParent = NULL);   // standard constructor
00034
00035 // Dialog Data
00036     //{{AFX_DATA(CTipDlg)
00037     // enum { IDD = IDD_TIP };
00038     BOOL    m_bStartup;
00039     CString m_strTip;
00040     //}}AFX_DATA
00041
00042     FILE* m_pStream;
00043
00044 // Overrides
00045     // ClassWizard generated virtual function overrides
00046     //{{AFX_VIRTUAL(CTipDlg)
00047     protected:
00048     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00049     //}}AFX_VIRTUAL
00050
00051 // Implementation
00052 public:
00053     virtual ~CTipDlg();
00054
00055 protected:
00056     // Generated message map functions
00057     //{{AFX_MSG(CTipDlg)
00058     afx_msg void OnNextTip();
00059     afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
00060     virtual void OnOK();
00061     virtual BOOL OnInitDialog();
00062     afx_msg void OnPaint();
00063     //}}AFX_MSG
00064     DECLARE_MESSAGE_MAP()
00065
00066     void GetNextTipString(CString& strNext);
00067 };
00068
00069 #endif // !defined(TIPDLG_H_INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJComboBoxEx.cpp Source File

WinCvs/CJLib/CJLibrary/CJComboBoxEx.cpp

Go to the documentation of this file.
00001 // CJComboBoxEx.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new
00007 // IE4 controls' http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:48 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/CJLibrary/CJComboBoxEx.cpp $
00015  *
00016  * $History: CJComboBoxEx.cpp $
00017  *
00018  * *****************  Version 5  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/CJLibrary
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 4  *****************
00024  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00025  * Updated in $/CodeJockey/CJLibrary
00026  * Added Unicode compliance, thanks to Barry Burton for his help with
00027  * this.
00028  *
00029  *
00030  * *****************  Version 2  *****************
00031  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00032  * Updated in $/CodeJockey/CJLibrary
00033  *
00034  * *****************  Version 1  *****************
00035  * User: Kirk Stowell Date: 6/25/99    Time: 12:05p
00036  * Created in $/CodeJockey/CJLibrary
00037  * Copied from MFC, Visual C++ 6. Added to extend functionality to Visual
00038  * C++ 5 users.
00039  *
00040  ***************************************************************************/
00042
00043 #include "stdafx.h"
00044 #include "CJComboBoxEx.h"
00045
00046 #ifdef _DEBUG
00047 #define new DEBUG_NEW
00048 #undef THIS_FILE
00049 static char THIS_FILE[] = __FILE__;
00050 #endif
00051
00053 // CCJComboBoxEx
00054
00055 BOOL CCJComboBoxEx::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd,
00056     UINT nID)
00057 {
00058   // initialize common controls
00059 #ifdef _VC_VERSION_5
00060     INITCOMMONCONTROLSEX icex;
00061     icex.dwSize = sizeof(icex);
00062     icex.dwICC = ICC_USEREX_CLASSES;
00063     VERIFY(InitCommonControlsEx(&icex));
00064 #else
00065     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_USEREX_REG));
00066 #endif
00067
00068     CWnd* pWnd = this;
00069     return pWnd->Create(WC_COMBOBOXEX, NULL, dwStyle, rect, pParentWnd, nID);
00070 }
00071
00072 int CCJComboBoxEx::DeleteItem(int iIndex)
00073 {
00074     ASSERT(::IsWindow(m_hWnd));
00075     return (int) ::SendMessage(m_hWnd, CBEM_DELETEITEM, (WPARAM) iIndex, 0);
00076 }
00077
00078 BOOL CCJComboBoxEx::GetItem(COMBOBOXEXITEM* pCBItem)
00079 {
00080     ASSERT(::IsWindow(m_hWnd));
00081     ASSERT(pCBItem != NULL);
00082     ASSERT(AfxIsValidAddress(pCBItem, sizeof(COMBOBOXEXITEM)));
00083
00084     return (int) ::SendMessage(m_hWnd, CBEM_GETITEM, 0, (LPARAM) pCBItem);
00085 }
00086
00087 int CCJComboBoxEx::InsertItem(const COMBOBOXEXITEM* pCBItem)
00088 {
00089     ASSERT(::IsWindow(m_hWnd));
00090     ASSERT(pCBItem != NULL);
00091     ASSERT(AfxIsValidAddress(pCBItem, sizeof(COMBOBOXEXITEM), FALSE));
00092
00093     return (int) ::SendMessage(m_hWnd, CBEM_INSERTITEM, 0, (LPARAM) pCBItem);
00094 }
00095
00096 int CCJComboBoxEx::InsertItem(int iItem, UINT nStringID, int iIndent, int iImage, int iSelectedImage, UINT mask)
00097 {
00098     CString strItem;
00099     strItem.LoadString(nStringID);
00100     return InsertItem(iItem, strItem, iIndent, iImage, iSelectedImage, mask);
00101 }
00102
00103 int CCJComboBoxEx::InsertItem(int iItem, LPCTSTR lpszItem, int iIndent, int iImage, int iSelectedImage, UINT mask)
00104 {
00105     COMBOBOXEXITEM cbItem;
00106
00107     cbItem.mask             = mask;
00108     cbItem.iItem            = iItem;
00109     cbItem.pszText          = const_cast<LPTSTR>(lpszItem);
00110     cbItem.iImage           = iImage;
00111     cbItem.iSelectedImage   = iSelectedImage;
00112     cbItem.iIndent          = iIndent;
00113
00114     return InsertItem(&cbItem);
00115 }
00116
00117 BOOL CCJComboBoxEx::SetItem(const COMBOBOXEXITEM* pCBItem)
00118 {
00119     ASSERT(::IsWindow(m_hWnd));
00120     ASSERT(pCBItem != NULL);
00121     ASSERT(AfxIsValidAddress(pCBItem, sizeof(COMBOBOXEXITEM), FALSE));
00122
00123     return (int) ::SendMessage(m_hWnd, CBEM_SETITEM, 0, (LPARAM) pCBItem);
00124 }
00125
00126 CCJComboBoxEx::~CCJComboBoxEx()
00127 {
00128     DestroyWindow();
00129 }
00130
00132
00133 IMPLEMENT_DYNAMIC(CCJComboBoxEx, CComboBox)
00134
00135
00136
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJControlBar.h Source File

WinCvs/CJLib/Include/CJControlBar.h

Go to the documentation of this file.
00001 // CJControlBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJControlBar.h $
00011  *
00012  * $History: CJControlBar.h $
00013  *
00014  * *****************  Version 19  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:21p
00016  * Updated in $/CodeJock/Include
00017  * Overrode OnEraseBkgnd(...) and OnPaint() to handle flicker free
00018  * drawing. Made additional modifications to load and save bar state
00019  * methods.
00020  *
00021  * Modified resource include for static builds.
00022  *
00023  * Enabled OnInitialUpdate() to be called for view classes added to a
00024  * CCJTabCtrlBar while the control bar is floating.
00025  *
00026  * Fixed potential resource and memory leak problems.
00027  *
00028  * Overloaded EnableFlatLook() method so that the gripper, frame buttons
00029  * and borders can be set flat individually.  Added inline function
00030  * EnableSaveState() which can be used to enable or disable the restore
00031  * bar state.
00032  *
00033  * Fixed bug with save / restore bar state, and with saved bar size
00034  * changing whenever the application starts.
00035  *
00036  * Fixed small initialization bug.
00037  *
00038  * Made class methods virtual for inheritence purposes.
00039  *
00040  * *****************  Version 18  *****************
00041  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00042  * Updated in $/CodeJockey/Include
00043  * Updated copyright and contact information.
00044  *
00045  * *****************  Version 17  *****************
00046  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00047  * Updated in $/CodeJockey/Include
00048  *
00049  * *****************  Version 16  *****************
00050  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00051  * Updated in $/CodeJockey/Include
00052  *
00053  * *****************  Version 15  *****************
00054  * User: Kirk Stowell Date: 7/18/99    Time: 10:18p
00055  * Updated in $/CodeJockey/Include
00056  * Added derived button class to handle control bar caption button
00057  * updates. Cleaned up inline functions, and import/export macro so that
00058  * class will be imported when linked to, and exported at compile time.
00059  *
00060  * *****************  Version 14  *****************
00061  * User: Kirk Stowell Date: 6/11/99    Time: 8:24p
00062  * Updated in $/CodeJockey/Include
00063  * Slight modification made to popup menu code.
00064  *
00065  * *****************  Version 13  *****************
00066  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00067  * Updated in $/CodeJockey/Include
00068  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00069  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00070  * message handler, this is now automatically handled by the base class.
00071  * Added redraw flags to the create method and modified paint and layout
00072  * handlers to reduce flicker and un-necessary command handling. Dragging
00073  * rect now reflects actual control bar docked size. Added "flat" look to
00074  * the control bars, the control bars can now use the classic DevStudio
00075  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00076  * docking windows now handle dragging, docking and floating much better,
00077  * and behave more like DevStudio.
00078  *
00079  * *****************  Version 12  *****************
00080  * User: Kirk Stowell Date: 5/03/99    Time: 9:52p
00081  * Updated in $/CodeJockey/Include
00082  * Changed gripper and button macros to enums. Renamed popup member
00083  * variables to begin with popup, this will be consistent throughout all
00084  * classes. Added m_nPos member variable which can be set to the index of
00085  * the popup menu in the menu resource. Removed windows message handler
00086  * ON_WM_CONTEXTMENU(), and added handlers ON_WM_RBUTTONDOWN(),
00087  * ON_WM_MEASUREITEM(), ON_WM_MENUCHAR() and ON_WM_INITMENUPOPUP() to
00088  * support the CCJMenu popup. Added WS_CLIPSIBLINGS to control bar style.
00089  * Changed OnEraseBkgnd(CDC* pDC) to only draw client area when a child is
00090  * not present.
00091  *
00092  * *****************  Version 11  *****************
00093  * User: Kirk Stowell Date: 4/14/99    Time: 12:54p
00094  * Updated in $/CodeJockey/Include
00095  * Modified context menu to use Brent Corkum's BCMenu (CCJMenu).
00096  *
00097  * *****************  Version 10  *****************
00098  * User: Kirk Stowell Date: 4/03/99    Time: 12:52p
00099  * Updated in $/CodeJockey/Include
00100  * Added comments and cleaned up code.
00101  *
00102  * *****************  Version 9  *****************
00103  * User: Kirk Stowell Date: 3/13/99    Time: 12:54p
00104  * Updated in $/CodeJockey/Include
00105  * Patrick Bergeron [patb@softimage.com] fixed the following bugs:
00106  *
00107  * I had a dialog nested in a CJControlBar. Unfortunately when I tried to
00108  * dock it to the left or right, the bottom part of my dialog would be
00109  * clipped off.
00110  *
00111  * Fix: When in docked mode, ::CalcDynamicLayout needed to return the
00112  * desired size, while taking into account the size of the gripper bar (if
00113  * any). Simply added a simple "+GetMinExt()" Now my dialog's bottom
00114  * doesn't get clipped. Woo-ha.
00115  *
00116  * When nesting a CDialog based window inside a CJControlBar, the 3D rect
00117  * drawn by ::OnEraseBkgnd would be overwritten by the top and left dialog
00118  * borders. The problem was caused by the fact that in the
00119  * ::OnWindowPosChanged() method, the rectangle which is used to move the
00120  * window contains the border. A simple call to rc.DeflateRect(1,1) solved
00121  * this problem.
00122  *
00123  * Added a call to UpdateWindow() in ::OnEraseBkgnd(). This helps with the
00124  * flickering a bit, but I Am not sure this is the correct way to go.
00125  * Incorporate at your own risks.
00126  *
00127  * Added 2 ASSERT()s in ::OnMouseMove(). This was not to fix a bug, but at
00128  * one point I was seeing strange things that lead me to add these
00129  * asserts. They don't do anything bad, so why remove them?
00130  *
00131  * *****************  Version 8  *****************
00132  * User: Kirk Stowell Date: 3/10/99    Time: 12:50p
00133  * Updated in $/CodeJockey/Include
00134  * Fixed memory leak with button tooltips.
00135  *
00136  * *****************  Version 7  *****************
00137  * User: Kirk Stowell Date: 3/10/99    Time: 12:48p
00138  * Updated in $/CodeJockey/Include
00139  * Added AfxRegisterWndClass() to create method to handle double clicks.
00140  * Thanks to Takehiko Mizoguti [mizoguti@m2.sys.to.casio.co.jp] for some
00141  * thoughts on this.
00142  *
00143  * *****************  Version 6  *****************
00144  * User: Kirk Stowell Date: 2/28/99    Time: 12:47p
00145  * Updated in $/CodeJockey/Include
00146  * Calls default wnd proc if no context menu is defined Gonzalo Pereyra
00147  * [persys@adinet.com.uy]
00148  *
00149  * *****************  Version 5  *****************
00150  * User: Kirk Stowell Date: 1/31/99    Time: 12:48p
00151  * Updated in $/CodeJockey/Include
00152  * Removed extra line (typo) from OnLButtonUp(). Thanks to Ioannis
00153  * Stamatopoulos (ystamat@mail.datamedia.gr) for pointing this out.
00154  *
00155  * *****************  Version 4  *****************
00156  * User: Kirk Stowell Date: 1/12/99    Time: 12:46p
00157  * Updated in $/CodeJockey/Include
00158  * Total class re-write, added multiple/side-by-side controlbar docking.
00159  * No longer uses CSizingControlBar base class.
00160  *
00161  * *****************  Version 3  *****************
00162  * User: Kirk Stowell Date: 11/22/98   Time: 12:47p
00163  * Updated in $/CodeJockey/Include
00164  * Modified set cursor to display normal size cursor when static linked.
00165  *
00166  * *****************  Version 2  *****************
00167  * User: Kirk Stowell Date: 10/20/98   Time: 12:45p
00168  * Updated in $/CodeJockey/Include
00169  * Fixed problem with gripper and buttons disappearing when docking
00170  * toggled. Overloaded IsFloating() method from base class.
00171  *
00172  * *****************  Version 1  *****************
00173  * User: Kirk Stowell Date: 10/17/98   Time: 12:44p
00174  * Created in $/CodeJockey/Include
00175  * Initial re-write and release.
00176  *
00177  ***************************************************************************/
00179
00180 #ifndef __CJCONTROLBAR_H__
00181 #define __CJCONTROLBAR_H__
00182
00183 #if _MSC_VER >= 1000
00184 #pragma once
00185 #endif // _MSC_VER >= 1000
00186
00187 #include "CJFlatButton.h"
00188 #include "CJMenu.h"        // CCJMenu class declaration
00189
00190 // CCJCBarButton is a CCJFlatButton derived class which is used by
00191 // the CCJControlBar class.
00192 class _CJX_EXT_CLASS CCJCBarButton : public CCJFlatButton
00193 {
00194 protected:
00195     virtual void DrawButtonIcon(CDC* pDC, UINT nState, CRect& rcItem);
00196 };
00197
00198 typedef enum { HIDE_CONTRLBAR,
00199     MAXI_H_DISABLE, MAXI_H_ENABLED, MAXI_V_DISABLE, MAXI_V_ENABLED,
00200     NORM_H_DISABLE, NORM_H_ENABLED, NORM_V_DISABLE, NORM_V_ENABLED
00201 } BTN_IMG_INDEX;
00202
00203 typedef enum { NONE, OUTLINE, SUNKEN, RAISED } CHILD_BORDER;
00204
00205 // CCJControlBar is a CControlBar derived class which is simular to
00206 // the sizing / docking windows that are seen in Developer Studio.
00207 class _CJX_EXT_CLASS CCJControlBar : public CControlBar
00208 {
00209     DECLARE_DYNAMIC(CCJControlBar)
00210
00211 public:
00212
00213     // Default constructor
00214     //
00215     CCJControlBar();
00216
00217     // Virtual destructor
00218     //
00219     virtual ~CCJControlBar();
00220
00221 public:
00222
00223     BOOL            m_bUnique;              // used by CCJControlBar and CCJSizeDockBar,
00224                                             // set to true when the controlbar is the
00225                                             // only one docked on any given side.
00226
00227     BOOL            m_bToFit;               // used by CCJControlBar and CCJSizeDockBar,
00228                                             // to determine border layouts depending on bar
00229                                             // state.
00230
00231     CHILD_BORDER    m_eChildBorder;         // determines if a border should be drawn around the child area.
00232
00233 protected:
00234
00235     int             m_cxOffset;             // used to offset the horizontal client area
00236                                             // to allow room for the caption when docked.
00237
00238     int             m_cyOffset;             // used to offset the vertical client area to
00239                                             // allow room for the caption when docked.
00240
00241     BTN_IMG_INDEX   m_eAuxIndex;            // used to determine which button icon to
00242                                             // display when the control bar is minimized
00243                                             // or maximized depending on which side docked.
00244
00245     UINT            m_popToolbarID;         // popup menu toolbar resource id, associates
00246                                             // toolbar icons with the popup menu.
00247
00248     UINT            m_popupMenuID;          // popup menu resource id
00249     CCJMenu         m_popupMenu;            // popup menu
00250     int             m_nPos;                 // index of the pop-up menu contained in the menu
00251
00252     BOOL            m_bOkToDrag;            // used to determine if a drag operation
00253                                             // should occur.
00254
00255     BOOL            m_bMaximized;           // used to determine if the control bar has
00256                                             // been maximized.
00257
00258     BOOL            m_bDragging;            // set to TRUE when a drag operation is in
00259                                             // process.
00260
00261
00262     BOOL            m_bButtons;             // user defined flag, set to TRUE if the
00263                                             // control bar should display buttons.
00264
00265     CRect           m_rcTrack;              // used to determine rect of the tracker window.
00266     CSize           m_sizeDesired;          // the desired size of the control bar.
00267     CSize           m_sizeNormal;           // normal size of the control bar.
00268     CSize           m_sizeVert;             // vertical size
00269     CSize           m_sizeHorz;             // horizontal size
00270     CSize           m_sizeFloat;            // float size
00271     CPoint          m_ptCurDrag;            // cursor location during a drag operation.
00272     CPoint          m_ptStartDrag;          // cursor starting point during a drag operation.
00273
00274     CWnd*           m_pChildWnd;            // CWnd pointer which is contains child window
00275                                             // that is displayed in the control bar, see
00276                                             // SetChild(CWnd* pWnd).
00277
00278     CImageList      m_ImageList;            // contains the caption control buttons images.
00279     CCJCBarButton   m_btnClose;             // close button used in caption area.
00280     CCJCBarButton   m_btnMinim;             // minimize button used in the caption area.
00281     CToolTipCtrl    m_ToolTip;              // tooltip used for caption buttons.
00282
00283     BOOL            m_bGripper;             // user defined flag, set to TRUE if a
00284                                             // gripper should be drawn in the control
00285                                             // bar, see ShowFrameControls(...).
00286     BOOL            m_bFlatGripper;         // user defined flag, set to TRUE if for a flat
00287                                             // Gripper look
00288     BOOL            m_bFlatBorder;          // user defined flag, set to TRUE if for a flat
00289                                             // Border look
00290     CString         m_strSection;           // used by the control bar for registry entries.
00291     bool            m_bAutoSave;            // true to restore size and position true by default.
00292     HICON           m_hIcon;                // handle to close button icon.
00293     HICON           m_hAuxIcon;             // handle to auxiliary button icon.
00294     int             m_nID;                  // holds the resource id for this control.
00295     BOOL            m_bFloating;            // true if the control bar was floating when last destroyed.
00296
00297 public:
00298
00299     // this member function is called to enable/disable size and
00300     // position at startup.
00301     //
00302     virtual void EnableSaveState(bool bAutoSave=true);
00303
00304     // this member function is used to create a sizing / docking control bar.
00305     //
00306     virtual BOOL Create(
00307         // the parent window.
00308         CWnd* pParentWnd,
00309         // The ID of the control bar.
00310         UINT nID,
00311         // Points to a null-terminated character string that contains the
00312         // control bar title.
00313         LPCTSTR lpszWindowName = NULL,
00314         // The default size the control bar is to be.
00315         CSize sizeDefault = CSize(200,100),
00316         // Specifies the window style attributes.
00317         DWORD dwStyle = CBRS_LEFT,
00318         // TRUE for flat style control bars.
00319         BOOL bFlatBorders = FALSE);
00320
00321     // this member function is called by the control bar, and
00322     // can be overloaded in derived classes to return the rect
00323     // for the child window associated with the control bar.
00324     //
00325     virtual void GetChildRect(
00326         // reference to a CRect object which contains the size of
00327         // the child window associated with the control bar.
00328         CRect &rect);
00329
00330     // this member function is called by the control bar to
00331     // determine the minimum size of the control bar should be
00332     // when miminized or maximized.
00333     //
00334     virtual int GetMinExt();
00335
00336     // this member function returns TRUE if the control
00337     // bar is docked on the left.
00338     //
00339     virtual BOOL IsLeftDocked() const;
00340
00341     // this member function returns TRUE if the control
00342     // bar is docked on the right.
00343     //
00344     virtual BOOL IsRightDocked() const;
00345
00346     // this member function returns TRUE if the control
00347     // bar is docked on the top.
00348     //
00349     virtual BOOL IsTopDocked() const;
00350
00351     // this member function returns TRUE if the control
00352     // bar is docked on the bottom.
00353     //
00354     virtual BOOL IsBottomDocked() const;
00355
00356     // this member function returns TRUE if the control
00357     // bar is docked horizontal.
00358     //
00359     virtual BOOL IsHorzDocked() const;
00360
00361     // this member function returns TRUE if the control
00362     // bar is docked vertical.
00363     //
00364     virtual BOOL IsVertDocked() const;
00365
00366     // this member function returns TRUE if the control
00367     // bar is currently floating.
00368     //
00369     virtual BOOL IsFloating() const;
00370
00371     // this member function is called by the control bar
00372     // to set the normal size the control bar should be.
00373     //
00374     virtual void SetNormalSize(const CSize &cs);
00375
00376     // this member function is called by the control bar
00377     // to return the control bar to its normal size.
00378     //
00379     virtual void Normalize();
00380
00381     // this member function is called by the control bar
00382     // to minimize the control bar.
00383     //
00384     virtual void Minimize();
00385
00386     // this member function is called by the control bar
00387     // to maximize the control bar.
00388     //
00389     virtual void Maximize(int size);
00390
00391     // this member function is to be called after creation to enable
00392     // docking on the control bar.
00393     //
00394     virtual void EnableDockingOnSizeBar(
00395         // Specifies which sides of the frame window can serve as docking sites
00396         // for control bars. It can be one or more of the following:
00397         //
00398         // CBRS_ALIGN_TOP   Allows docking at the top of the client area.
00399         // CBRS_ALIGN_BOTTOM   Allows docking at the bottom of the client area.
00400         // CBRS_ALIGN_LEFT   Allows docking on the left side of the client area.
00401         // CBRS_ALIGN_RIGHT   Allows docking on the right side of the client area.
00402         // CBRS_ALIGN_ANY   Allows docking on any side of the client area.
00403         DWORD dwDockStyle);
00404
00405     // this member function is used to show / hide the frame controls
00406     // for the control bar.
00407     //
00408     virtual void ShowFrameControls(
00409         // set to FALSE to hide the gripper.
00410         BOOL bGripper = TRUE,
00411         // set to FALSE to hide the frame buttons.
00412         BOOL bButtons = TRUE);
00413
00414     // this member function is used to set the resource id for the popup menu used.
00415     //
00416     virtual void SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0);
00417
00418     // this member function returns the resource id of the context menu used.
00419     //
00420     virtual UINT GetMenuID();
00421
00422     virtual void EnableFlatLook(BOOL bFlat=TRUE);
00423
00424     virtual void EnableFlatLook(BOOL bGripper, BOOL bBorder, BOOL bButtons);
00425
00426     // this member function is used to determine the width when docked vertical.
00427     //
00428     virtual int GetVertSize();
00429
00430     // this member function is used to determine the height when docked horizontal
00431     //
00432     virtual int GetHorzSize();
00433
00434 protected:
00435
00436     // this member function is called by the control bar to caluclate
00437     // the size of the gripper in the caption area.
00438     //
00439     virtual CRect GetGripperRect();
00440
00441     // this member function is called by the control bar to calculate the
00442     // size of the buttons used in the caption area.
00443     //
00444     virtual CRect GetButtonRect();
00445
00446     // this member function is called by the control bar to draw
00447     // the gripper in the caption area.
00448     //
00449     virtual void DrawGripper(CDC* pDC);
00450
00451     // this member function is used to associate a child window
00452     // that is to be displayed in the control bar.
00453     //
00454     virtual void SetChild(CWnd* pWnd);
00455
00456     // this member function is called by the control bar
00457     // during resizing of splitters.
00458     //
00459     virtual void OnInvertTracker(const CRect& rect);
00460
00461     // this member function is called by the control bar
00462     // to determine cursor position
00463     // for drag operations.
00464     //
00465     virtual void HitTest(CPoint &point);
00466
00467     // this member function is called by the control bar
00468     // to draw its borders.
00469     //
00470     virtual void DrawBorders(CDC *pDC, CRect &rect);
00471
00472     // this member function is called by the control bar
00473     // to perform paint operations.
00474     //
00475     virtual void EraseNonClient();
00476
00477     // this member function is used to draw the new flat style control bar.
00478     //
00479     virtual void DrawGriperCaption( CDC * pDC, LPRECT pRect );
00480
00481     virtual void LoadBarState(CSize& size, int nID);
00482
00483     virtual void SaveBarState(CSize& size);
00484
00485 // Overrides
00486     // ClassWizard generated virtual function overrides
00487     //{{AFX_VIRTUAL(CCJControlBar)
00488     public:
00489     virtual BOOL PreTranslateMessage(MSG* pMsg);
00490     virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00491     virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
00492     //}}AFX_VIRTUAL
00493
00494 // Generated message map functions
00495 protected:
00496     //{{AFX_MSG(CCJControlBar)
00497     afx_msg void OnNcPaint();
00498     afx_msg void OnPaint();
00499     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00500     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00501     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00502     afx_msg UINT OnNcHitTest(CPoint point);
00503     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00504     afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00505     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00506     afx_msg void OnButtonClose();
00507     afx_msg void OnUpdateButtonClose(CCmdUI* pCmdUI);
00508     afx_msg void OnButtonMinimize();
00509     afx_msg void OnUpdateButtonMinimize(CCmdUI* pCmdUI);
00510     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00511     afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00512     afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu);
00513     afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00514     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00515     //}}AFX_MSG
00516     DECLARE_MESSAGE_MAP()
00517 };
00518
00519 #define AFX_IDW_SIZEBAR_LEFT    AFX_IDW_DOCKBAR_LEFT    + 4
00520 #define AFX_IDW_SIZEBAR_RIGHT   AFX_IDW_DOCKBAR_RIGHT   + 5
00521 #define AFX_IDW_SIZEBAR_TOP     AFX_IDW_DOCKBAR_TOP     + 6
00522 #define AFX_IDW_SIZEBAR_BOTTOM  AFX_IDW_DOCKBAR_BOTTOM  + 7
00523
00524 const DWORD dwSizeBarMap[4][2] =
00525 {
00526     { AFX_IDW_SIZEBAR_TOP,      CBRS_TOP    },
00527     { AFX_IDW_SIZEBAR_BOTTOM,   CBRS_BOTTOM },
00528     { AFX_IDW_SIZEBAR_LEFT,     CBRS_LEFT   },
00529     { AFX_IDW_SIZEBAR_RIGHT,    CBRS_RIGHT  },
00530 };
00531
00533 //  Inline Functions
00535
00536 _CJXLIB_INLINE void CCJControlBar::EnableSaveState(bool bAutoSave)
00537     { ASSERT(::IsWindow(m_hWnd)); m_bAutoSave = bAutoSave; }
00538
00539 _CJXLIB_INLINE int CCJControlBar::GetVertSize()
00540     { ASSERT(::IsWindow(m_hWnd)); return m_sizeDesired.cx; }
00541
00542 _CJXLIB_INLINE int CCJControlBar::GetHorzSize()
00543     { ASSERT(::IsWindow(m_hWnd)); return m_sizeDesired.cy; }
00544
00545 _CJXLIB_INLINE UINT CCJControlBar::GetMenuID()
00546     { ASSERT(::IsWindow(m_hWnd)); return m_popupMenuID; }
00547
00548 _CJXLIB_INLINE void CCJControlBar::SetMenuID(UINT popupMenuID, UINT popToolbarID, int nPos)
00549     { ASSERT(::IsWindow(m_hWnd)); m_popupMenuID=popupMenuID; m_popToolbarID=popToolbarID; m_nPos=nPos; }
00550
00551 _CJXLIB_INLINE void CCJControlBar::ShowFrameControls(BOOL bGripper, BOOL bButtons)
00552     { ASSERT(::IsWindow(m_hWnd)); m_bGripper=bGripper; m_bButtons=bButtons; }
00553
00554 _CJXLIB_INLINE void CCJControlBar::SetNormalSize(const CSize &cs)
00555     { ASSERT(::IsWindow(m_hWnd)); m_sizeDesired=m_sizeNormal=cs; }
00556
00557 _CJXLIB_INLINE BOOL CCJControlBar::IsVertDocked() const
00558     { ASSERT(::IsWindow(m_hWnd)); return (IsLeftDocked() || IsRightDocked()); }
00559
00560 _CJXLIB_INLINE BOOL CCJControlBar::IsHorzDocked() const
00561     { ASSERT(::IsWindow(m_hWnd)); return (IsTopDocked() || IsBottomDocked()); }
00562
00563 _CJXLIB_INLINE BOOL CCJControlBar::IsBottomDocked() const
00564     { ASSERT(::IsWindow(m_hWnd)); return (GetParent()->GetDlgCtrlID()==AFX_IDW_SIZEBAR_BOTTOM); }
00565
00566 _CJXLIB_INLINE BOOL CCJControlBar::IsTopDocked() const
00567     { ASSERT(::IsWindow(m_hWnd)); return (GetParent()->GetDlgCtrlID()==AFX_IDW_SIZEBAR_TOP); }
00568
00569 _CJXLIB_INLINE BOOL CCJControlBar::IsRightDocked() const
00570     { ASSERT(::IsWindow(m_hWnd)); return (GetParent()->GetDlgCtrlID()==AFX_IDW_SIZEBAR_RIGHT); }
00571
00572 _CJXLIB_INLINE BOOL CCJControlBar::IsLeftDocked() const
00573     { ASSERT(::IsWindow(m_hWnd)); return (GetParent()->GetDlgCtrlID()==AFX_IDW_SIZEBAR_LEFT); }
00574
00575 _CJXLIB_INLINE BOOL CCJControlBar::IsFloating() const
00576     { ASSERT(::IsWindow(m_hWnd)); return (!IsHorzDocked() && !IsVertDocked()); }
00577
00578 _CJXLIB_INLINE void CCJControlBar::SetChild(CWnd *pWnd)
00579     { ASSERT(::IsWindow(m_hWnd)); m_pChildWnd=pWnd; }
00580
00582
00583 //{{AFX_INSERT_LOCATION}}
00584 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00585
00586 #endif // __CJCONTROLBAR_H__
00587
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMDIFrameWnd.h Source File

WinCvs/CJLib/Include/CJMDIFrameWnd.h

Go to the documentation of this file.
00001 // CJMDIFrameWnd.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2002/01/05 16:46:43 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/Include/CJMDIFrameWnd.h $
00011  *
00012  * $History: CJMDIFrameWnd.h $
00013  *
00014  * *****************  Version 17  *****************
00015  * User: Kirk Stowell Date: 10/29/99   Time: 12:43a
00016  * Updated in $/CodeJock/Include
00017  * Overloaded PreCreateWindow(...) for flicker free drawing.
00018  *
00019  * *****************  Version 16  *****************
00020  * User: Kirk Stowell Date: 10/27/99   Time: 12:06a
00021  * Updated in $/CodeJock/Include
00022  *
00023  * *****************  Version 15  *****************
00024  * User: Kirk Stowell Date: 10/26/99   Time: 10:58p
00025  * Updated in $/CodeJock/Include
00026  * Added menu bar and made class members virtual for inheritance purposes.
00027  *
00028  * *****************  Version 14  *****************
00029  * User: Kirk Stowell Date: 10/14/99   Time: 6:15p
00030  * Updated in $/CodeJock/Include
00031  * Fixed bug with a document becomes the active document when the user
00032  * clicks inside a tab in the CCJTabControlBar to perform some operation.
00033  * When closing the application, MFC decides in CFrameWnd::OnClose() to
00034  * check if the 'active' document is modified before checking all other
00035  * documuents. If the active document is not modified and can close its
00036  * frame, it does not check other documents individually and shuts down
00037  * without asking the important 'modified save' questions. To fix this,
00038  * OnClose() was overriden to add a call to "SetActiveView(NULL)" just
00039  * before the base class OnClose is called. This will check all documents
00040  * asking the save question before closing the application. Thanks to
00041  * Simon Clark [spc@otleda.com] for help with this.
00042  *
00043  * *****************  Version 13  *****************
00044  * User: Kirk Stowell Date: 10/14/99   Time: 10:05a
00045  * Updated in $/CodeJock/Include
00046  * Overrode OnEraseBkgnd(...) to help to eliminate screen flicker.
00047  *
00048  * *****************  Version 12  *****************
00049  * User: Kirk Stowell Date: 10/06/99   Time: 6:21a
00050  * Updated in $/CodeJockey/Include
00051  * Added cool menu support for MDI applications that do not have a
00052  * document/view architecture. Added GetInitializedMenu() to
00053  * CCJMDIChildWnd which will initialize the menu for a given view,  and
00054  * overloaded InitializeMenu() in CCJMDIFrameWnd. Thanks to Golovanov
00055  * Michael [Golovanov@SoftLab.RU] for help with this.
00056  *
00057  * *****************  Version 11  *****************
00058  * User: Kirk Stowell Date: 9/16/99    Time: 2:35p
00059  * Updated in $/CodeJockey/Include
00060  * Fixed bug with save / restore bar state, and with saved bar size
00061  * changing whenever the application starts.
00062  *
00063  * *****************  Version 10  *****************
00064  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00065  * Updated in $/CodeJockey/Include
00066  * Updated copyright and contact information.
00067  *
00068  * *****************  Version 9  *****************
00069  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00070  * Updated in $/CodeJockey/Include
00071  *
00072  * *****************  Version 8  *****************
00073  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00074  * Updated in $/CodeJockey/Include
00075  * Cleaned up inline functions, and import/export macro so that class will
00076  * be imported when linked to, and exported at compile time.
00077  *
00078  * *****************  Version 7  *****************
00079  * User: Kirk Stowell Date: 6/11/99    Time: 8:25p
00080  * Updated in $/CodeJockey/Include
00081  * Slight modification made to popup menu code.
00082  *
00083  * *****************  Version 6  *****************
00084  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00085  * Updated in $/CodeJockey/Include
00086  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00087  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00088  * message handler, this is now automatically handled by the base class.
00089  * Added redraw flags to the create method and modified paint and layout
00090  * handlers to reduce flicker and un-necessary command handling. Dragging
00091  * rect now reflects actual control bar docked size. Added "flat" look to
00092  * the control bars, the control bars can now use the classic DevStudio
00093  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00094  * docking windows now handle dragging, docking and floating much better,
00095  * and behave more like DevStudio.
00096  *
00097  * *****************  Version 5  *****************
00098  * User: Kirk Stowell Date: 5/02/99    Time: 2:13a
00099  * Updated in $/CodeJockey/Include
00100  * Re-wrote CCJMenu releated methods so that multiple documents can be
00101  * added with associated menu support. Added typedef CList <CCJMenu*,
00102  * CCJMenu*> CMDIMenuList; so that menus pointers are stored in a list and
00103  * not member variables.
00104  *
00105  * *****************  Version 4  *****************
00106  * User: Kirk Stowell Date: 4/25/99    Time: 10:37p
00107  * Updated in $/CodeJockey/Include
00108  * Added support for Brent Corkum's BCMenu (CCJMenu), which is a replacement for the
00109  * CCoolMenu class.
00110  *
00111  * *****************  Version 3  *****************
00112  * User: Kirk Stowell Date: 4/03/99    Time: 8:41p
00113  * Updated in $/CodeJockey/Include
00114  * Added comments and cleaned up code.
00115  *
00116  * *****************  Version 2  *****************
00117  * User: Kirk Stowell Date: 1/12/99    Time: 8:41p
00118  * Updated in $/CodeJockey/Include
00119  * Total re-write to add side-by-side docking support for CCJControlBar
00120  * class.
00121  *
00122  * *****************  Version 1  *****************
00123  * User: Kirk Stowell Date: 10/17/98   Time: 8:41p
00124  * Created in $/CodeJockey/Include
00125  * Initial re-write and release.
00126  *
00127  ***************************************************************************/
00129
00130 #ifndef __CJMDIFRAMEWND_H__
00131 #define __CJMDIFRAMEWND_H__
00132
00133 #if _MSC_VER >= 1000
00134 #pragma once
00135 #endif // _MSC_VER >= 1000
00136
00137 #include "CJMenuBar.h"
00138 #include "CJMenu.h"
00139
00140 // template list used to store menu objects.
00141 typedef CList <CCJMenu*, CCJMenu*> CMDIMenuList;
00142
00143 // class forwards
00144 class CCJSizeDockBar;
00145
00146 // CCJMDIFrameWnd is a CMDIFrameWnd derived class which is used to
00147 // reposition toolbar layout for 3D effect, in addition to docking
00148 // methods for CCJToolBar and CCJControlBar class
00149 class _CJX_EXT_CLASS CCJMDIFrameWnd : public CMDIFrameWnd
00150 {
00151     DECLARE_DYNCREATE(CCJMDIFrameWnd)
00152
00153 public:
00154
00155     // Default constructor
00156     //
00157     CCJMDIFrameWnd();
00158
00159     // Virtual destructor
00160     //
00161     virtual ~CCJMDIFrameWnd();
00162
00163 protected:
00164
00165     static DWORD    dwDockBarMap[4][2]; // array used for docking masks
00166     CMDIMenuList    m_menuList;         // template used to store associated menus.
00167     CCJMenuBar      m_wndMenuBar;       // menu bar
00168
00169     // Yiannhs to parameterize and the dock bar border
00170     enum DockFlatBorders {
00171         brdrAllRaised       = 0x0000,
00172         brdrFlatTop         = 0x0001,
00173         brdrFlatBottom      = 0x0002,
00174         brdrFlatLeft        = 0x0004,
00175         brdrFlatRight       = 0x0008,
00176         brdrFlatVertical    = 0x0003,
00177         brdrFlatHorizontal  = 0x000C,
00178         brdrFlatAll         = 0x000F
00179     };
00180
00181 protected:
00182
00183     // This member function is called by the framework to associate
00184     // toolbar resources with the frame menu
00185     //
00186     virtual HMENU NewMenu(
00187         // resource id for menu
00188         UINT nMenuID,
00189         // array of toolbar resource ids
00190         UINT* nToolbarIDs = NULL,
00191         // size of array.
00192         int nSize = 0);
00193
00194     // This member function is called by the framework to associate
00195     // a toolbar resource with the frame menu
00196     //
00197     virtual HMENU NewMenu(
00198         // resource id for menu
00199         UINT nMenuID,
00200         // toolbar resource
00201         UINT nToolbarID = NULL);
00202
00203 public:
00204
00205     virtual void LoadBarState(LPCTSTR lpszProfileName);
00206     virtual void SaveBarState(LPCTSTR lpszProfileName) const;
00207
00208     // This member function is called to initialize the CCJMenu
00209     //
00210     virtual BOOL InitializeMenu(
00211         // points to the document template for your app
00212         CMultiDocTemplate* pDocTemplate,
00213         // resource id for menu
00214         UINT nMenuID,
00215         // array of toolbar resource ids
00216         UINT* nToolbarIDs = NULL,
00217         // size of array.
00218         int nSize = 0,
00219         // resource id for default menu, for subsequent calls,
00220         // default menu is ignored.
00221         UINT nDefaultMenuID = NULL);
00222
00223     // This member function is called to initialize the Menu
00224     //
00225     virtual BOOL InitializeMenu(
00226         // points to the document template for your app
00227         CMultiDocTemplate* pDocTemplate,
00228         // resource id for menu
00229         UINT nMenuID,
00230         // toolbar resource
00231         UINT nToolbarID = NULL,
00232         // resource id for default menu, for subsequent calls,
00233         // default menu is ignored.
00234         UINT nDefaultMenuID = NULL);
00235
00236     virtual BOOL InitializeMenu(
00237         HMENU* phMenu,
00238         UINT nMenuID,
00239         UINT nToolbarID = NULL );
00240
00241     virtual BOOL InitializeMenu(
00242         HMENU* phMenu,
00243         UINT nMenuID,
00244         UINT* nToolbarIDs = NULL ,
00245         int nSize = NULL );
00246
00247     // This member function is called to calculate the size of
00248     // a CCJControlBar
00249     //
00250     virtual void RecalcAllExcept(CCJSizeDockBar *pBar);
00251
00252     // This member function enables docking for standard
00253     // toolbar and control bars
00254     //
00255     virtual void EnableDocking(DWORD dwDockStyle);
00256
00257     // This member function enables docking for CCJControl bars only
00258     //
00259     virtual void EnableDockingSizeBar(
00260         // Specifies which sides of the frame window can serve as docking sites
00261         // for control bars. It can be one or more of the following:
00262         //
00263         // CBRS_ALIGN_TOP   Allows docking at the top of the client area.
00264         // CBRS_ALIGN_BOTTOM   Allows docking at the bottom of the client area.
00265         // CBRS_ALIGN_LEFT   Allows docking on the left side of the client area.
00266         // CBRS_ALIGN_RIGHT   Allows docking on the right side of the client area.
00267         // CBRS_ALIGN_ANY   Allows docking on any side of the client area.
00268         DWORD dwDockStyle,
00269         // enum for flat border styles.
00270         DockFlatBorders FlatFlags = brdrAllRaised );
00271
00272     // This member function will dock a CCJControlBar
00273     //
00274     virtual void DockSizeBar(
00275         // toolbar to dock
00276         CControlBar* pBar,
00277         // dockbar object usually NULL
00278         CCJSizeDockBar* pDockBar=NULL,
00279         // initial size usually NULL
00280         LPRECT lpRect=NULL);
00281
00282     // This memeber function will dock the control bar passed in
00283     // as the first argument, and dock the control bar that is passed in
00284     // as the second argument to the left of the first one.
00285     //
00286     virtual void DockControlBarLeftOf(
00287         // control bar to dock to the right of
00288         CControlBar* Bar,
00289         // already docked control bar
00290         CControlBar* LeftOf);
00291
00292 // Overrides
00293     // ClassWizard generated virtual function overrides
00294     //{{AFX_VIRTUAL(CCJMDIFrameWnd)
00295     public:
00296     virtual void RecalcLayout(BOOL bNotify = TRUE);
00297     protected:
00298     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00299     virtual BOOL PreCreateWindow(CREATESTRUCT& cs, UINT nIconID);
00300     //}}AFX_VIRTUAL
00301
00302 // Generated message map functions
00303 protected:
00304     //{{AFX_MSG(CCJMDIFrameWnd)
00305     afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00306     afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu);
00307     afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00308     afx_msg void OnClose();
00309     //}}AFX_MSG
00310     DECLARE_MESSAGE_MAP()
00311 };
00312
00314
00315 //{{AFX_INSERT_LOCATION}}
00316 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00317
00318 #endif // __CJMDIFRAMEWND_H__
00319
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMPString Member List

This is the complete list of members for CMPString, including all inherited members.

_GetBaseClass() | CMPString | [protected, static]
begin() const | TMString< UPStr > | [inline]
classCMPString | CMPString | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CMPString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | CMPString |
Compare(const char *s1, const char *s2) const | TMString< UPStr > | [protected, virtual]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
end() const | TMString< UPStr > | [inline]
Find(const char *instr) const | TMString< UPStr > |
CPersistent::Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | TMString< UPStr > | [protected, virtual]
GetList(void) const | TMString< UPStr > | [inline]
GetRuntimeClass() const | CMPString | [virtual]
GetTimeStamp() const | CPersistent | [inline]
Insert(const char *str) | TMString< UPStr > |
IsKindOf(const URuntimeClass *pClass) const | UObject |
list_t typedef | TMString< UPStr > |
LoadAll(const char *only=0L) | CPersistent | [static]
m_allStrs | TMString< UPStr > | [protected]
m_buffer | TMString< UPStr > | [mutable, protected]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_maxStr | TMString< UPStr > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
Remove(const char *str) | TMString< UPStr > |
RemoveAll() | TMString< UPStr > |
ResetTimeStamp() | CPersistent | [inline]
rtCMPString(void) | CMPString | [static]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | TMString< UPStr > | [protected, virtual]
SizeOf(void) const | TMString< UPStr > | [protected, virtual]
TMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TMString< UPStr > |
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CMPString() | CMPString | [virtual]
~CPersistent() | CPersistent | [virtual]
~TMString() | TMString< UPStr > | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewHandlers.cpp Source File

common/BrowseViewHandlers.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018 * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- July 2002
00019 */
00020
00021 // BrowseViewHandlers.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #ifdef WIN32
00027 #include "wincvs.h"
00028 #endif /* !WIN32 */
00029
00030 #include "BrowseViewHandlers.h"
00031 #include "PromptFiles.h"
00032 #include "MultiFiles.h"
00033
00034
00035
00042 KiSelectionHandler::KiSelectionHandler(const char* strCommand, bool needSelection /*= true*/, bool needViewReset /*= false*/)
00043     : m_strCommand(strCommand), m_pmf(NULL), m_selType(kSelNone),
00044       m_autoDelete(false), m_needSelection(needSelection), m_needViewReset(needViewReset)
00045 {
00046 }
00047
00048 KiSelectionHandler::~KiSelectionHandler()
00049 {
00050     if( m_autoDelete && m_pmf )
00051     {
00052         delete m_pmf;
00053     }
00054 }
00055
00060 kSelType KiSelectionHandler::GetSelType() const
00061 {
00062     return m_selType;
00063 }
00064
00069 bool KiSelectionHandler::GetNeedSelection() const
00070 {
00071     return m_needSelection;
00072 }
00073
00078 bool KiSelectionHandler::GetNeedViewReset() const
00079 {
00080     return m_needViewReset;
00081 }
00082
00088 void KiSelectionHandler::OnFolder(const char* fullpath)
00089 {
00090     m_selType = kSelDir;
00091     if( fullpath )
00092     {
00093         m_pmf = new MultiFiles;
00094         if( m_pmf )
00095         {
00096             m_autoDelete = true;
00097             m_pmf->newdir(fullpath);
00098         }
00099     }
00100 }
00101
00107 void KiSelectionHandler::OnFiles(MultiFiles* pmf)
00108 {
00109     m_selType = kSelFiles;
00110     m_pmf = pmf;
00111 }
00112
00118 MultiFiles* KiSelectionHandler::GetSelection()
00119 {
00120     if( !m_pmf && m_needSelection )
00121     {
00122         switch( m_selType )
00123         {
00124         case kSelFiles:
00125             m_pmf = new MultiFiles;
00126             if( m_pmf )
00127             {
00128                 m_autoDelete = true;
00129
00130                 CStr strPrompt;
00131                 strPrompt << _i18n("Select files for ");
00132                 strPrompt << m_strCommand;
00133
00134                 if( !BrowserGetMultiFiles(strPrompt, *m_pmf, false) )
00135                 {
00136                     delete m_pmf;
00137                     m_pmf = NULL;
00138                 }
00139             }
00140             break;
00141         case kSelDir:
00142             m_pmf = new MultiFiles;
00143             if( m_pmf )
00144             {
00145                 CStr strPrompt;
00146                 strPrompt << _i18n("Select directory to ");
00147                 strPrompt << m_strCommand;
00148
00149                 CStr dir;
00150                 if( BrowserGetDirectory(strPrompt, dir) )
00151                 {
00152                     m_pmf->newdir(dir);
00153                 }
00154                 else
00155                 {
00156                     delete m_pmf;
00157                     m_pmf = NULL;
00158                 }
00159             }
00160             break;
00161         default:
00162 #ifdef WIN32
00163             ASSERT(FALSE);  // type must be set to something if m_needSelection is true
00164 #endif
00165             break;
00166         }
00167     }
00168
00169     return m_pmf;
00170 }
00171
00176 bool KiSelectionHandler::NeedsNormalize()
00177 {
00178     return false;
00179 }
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ProgressDlg.cpp Source File

common/ProgressDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // ProgressDlg.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #ifdef WIN32
00027 #   include "wincvs.h"
00028 #endif /* WIN32 */
00029
00030 #include "ProgressDlg.h"
00031 #include "AppConsole.h"
00032
00033 #ifdef _DEBUG
00034 #define new DEBUG_NEW
00035 #undef THIS_FILE
00036 static char THIS_FILE[] = __FILE__;
00037 #endif
00038
00040 // CProgress
00041
00042 CProgress::CProgress(bool interruptable, const char* title, kProgressType progressType /*= kProgressBar*/)
00043     : m_abort(false)
00044 {
00045 #ifdef WIN32
00046     m_dlg = new CProgressDlg(m_abort, interruptable, title, progressType);
00047     if( !m_dlg || !m_dlg->Create() )
00048     {
00049         cvs_err("Failed to create Progress dialog\n");
00050
00051         delete m_dlg;
00052         m_dlg = 0L;
00053
00054         return;
00055     }
00056
00057     ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
00058 #endif /* WIN32 */
00059 }
00060
00061 CProgress::~CProgress()
00062 {
00063 #ifdef WIN32
00064     if( m_dlg != 0L )
00065         m_dlg->DestroyWindow();
00066 #endif /* WIN32 */
00067 }
00068
00073 void CProgress::SetProgress(int percent)
00074 {
00075 #ifdef WIN32
00076     if( m_dlg == 0L )
00077         return;
00078
00079     m_dlg->SetProgress(percent);
00080
00081     if( m_abort )
00082         m_dlg = 0L;
00083 #endif /* WIN32 */
00084 }
00085
00090 void CProgress::SetProgress(const char* text)
00091 {
00092 #ifdef WIN32
00093     if( m_dlg == 0L )
00094         return;
00095
00096     m_dlg->SetProgress(text);
00097
00098     if( m_abort )
00099         m_dlg = 0L;
00100 #endif /* WIN32 */
00101 }
00102
00107 void CProgress::ForceAbort(void)
00108 {
00109 #ifdef WIN32
00110     if( m_dlg != 0L )
00111     {
00112         m_dlg->DestroyWindow();
00113     }
00114
00115     m_dlg = 0L;
00116 #endif /* WIN32 */
00117 }
00118
00119 #ifdef WIN32
00120
00122 // CProgressDlg dialog
00123
00124 CProgressDlg::CProgressDlg(bool& abort, bool interruptable,
00125                            const char* title /*= NULL*/, kProgressType progressType /*= kProgressBar*/,
00126                            CWnd* pParent /*=NULL*/)
00127     : m_abort(abort), m_interruptable(interruptable),
00128     m_title(title), m_progressType(progressType),
00129     m_pParent(pParent), m_hWndParent(0L),
00130     CDialog(CProgressDlg::IDD, pParent)
00131 {
00132     //{{AFX_DATA_INIT(CProgressDlg)
00133     //}}AFX_DATA_INIT
00134 }
00135
00136
00137 void CProgressDlg::DoDataExchange(CDataExchange* pDX)
00138 {
00139     CDialog::DoDataExchange(pDX);
00140     //{{AFX_DATA_MAP(CProgressDlg)
00141     DDX_Control(pDX, IDOK, m_cancelButton);
00142     DDX_Control(pDX, IDC_PROGRESS, m_progressCtrl);
00143     DDX_Control(pDX, IDC_PROGRESS_TEXT, m_progressTextStatic);
00144     //}}AFX_DATA_MAP
00145 }
00146
00147
00148 BEGIN_MESSAGE_MAP(CProgressDlg, CDialog)
00149     //{{AFX_MSG_MAP(CProgressDlg)
00150     //}}AFX_MSG_MAP
00151 END_MESSAGE_MAP()
00152
00154 // CProgressDlg message handlers
00155
00160 BOOL CProgressDlg::Create()
00161 {
00162     m_hWndParent = PreModal();
00163     return CDialog::Create(CProgressDlg::IDD, m_pParent);
00164 }
00165
00167 BOOL CProgressDlg::OnInitDialog()
00168 {
00169     CenterWindow();
00170
00171     CDialog::OnInitDialog();
00172
00173     // Enable/disable controls
00174     m_cancelButton.EnableWindow(m_interruptable);
00175
00176     // Show progress indicator
00177     switch( m_progressType )
00178     {
00179     default:
00180     case kProgressBar:
00181         m_progressTextStatic.ShowWindow(SW_HIDE);
00182         break;
00183     case kProgressText:
00184     case kProgressFile:
00185         m_progressCtrl.ShowWindow(SW_HIDE);
00186
00187         if( kProgressText == m_progressType )
00188         {
00189             m_progressTextStatic.ModifyStyle(0, SS_ENDELLIPSIS);
00190         }
00191         else if( kProgressFile == m_progressType )
00192         {
00193             m_progressTextStatic.ModifyStyle(0, SS_PATHELLIPSIS);
00194         }
00195
00196         break;
00197     }
00198
00199     // Set the window title
00200     if( !m_title.IsEmpty() )
00201     {
00202         SetWindowText(m_title);
00203     }
00204
00205     // Show the main window
00206     ShowWindow(SW_SHOW);
00207
00208     return TRUE;  // return TRUE unless you set the focus to a control
00209 }
00210
00212 void CProgressDlg::OnOK()
00213 {
00214     m_abort = true;
00215     DestroyWindow();
00216 }
00217
00219 void CProgressDlg::PostNcDestroy()
00220 {
00221     MSG msg;
00222     if( m_hWndParent != NULL && ::GetActiveWindow() == m_hWnd )
00223     {
00224         ::SetActiveWindow(m_hWndParent);
00225     }
00226
00227     PostModal();
00228
00229     while( PeekMessage(&msg, m_hWnd, 0, 0, PM_NOREMOVE) == TRUE )
00230     {
00231         AfxGetApp()->PumpMessage();
00232     }
00233
00234     delete this;
00235 }
00236
00241 void CProgressDlg::SetProgress(int percent)
00242 {
00243     m_progressCtrl.SetPos(percent);
00244
00245     CProgressDlg::FlushDisplay(this, m_abort);
00246     ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
00247 }
00248
00253 void CProgressDlg::SetProgress(const char* text)
00254 {
00255     m_progressTextStatic.SetWindowText(text);
00256
00257     CProgressDlg::FlushDisplay(this, m_abort);
00258     ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
00259 }
00260
00266 void CProgressDlg::FlushDisplay(const CDialog* dlg, const bool& abort)
00267 {
00268     MSG msg;
00269     while( PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_NOREMOVE) == TRUE )
00270     {
00271         AfxGetApp()->PumpMessage();
00272     }
00273
00274     while( PeekMessage(&msg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE) == TRUE )
00275     {
00276         CPoint pt(LOWORD(msg.lParam), HIWORD(msg.lParam));
00277         ::ClientToScreen(msg.hwnd, &pt);
00278
00279         CWnd* wnd = CWnd::WindowFromPoint(pt);
00280
00281         if( !abort && wnd && dlg && (wnd->GetSafeHwnd() == dlg->GetSafeHwnd() || dlg->IsChild(wnd)) )
00282         {
00283             AfxGetApp()->PumpMessage();
00284         }
00285         else
00286         {
00287             PeekMessage(&msg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE);
00288         }
00289     }
00290 }
00291
00292 #endif  /* WIN32 */
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

WININFO Member List

This is the complete list of members for WININFO, including all inherited members.

entries | WININFO |
height | WININFO |
Search(int cmd, int *dropindex=0L) | WININFO | [inline]
width | WININFO |
WININFO(int w, int h) | WININFO | [inline]
~WININFO() | WININFO | [inline, virtual]

Generated on Sat Aug 7 22:58:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UTB_INIT Member List

This is the complete list of members for UTB_INIT, including all inherited members.

heightbtn | UTB_INIT
title | UTB_INIT
widthbtn | UTB_INIT
winid | UTB_INIT

Generated on Sat Aug 7 22:56:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GetPrefs.cpp Source File

common/GetPrefs.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // GetPrefs.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #ifdef qMacCvsPP
00027 #   include <UModalDialogs.h>
00028 #   include <LMultiPanelView.h>
00029 #   include <LEditText.h>
00030 #   include <LPushButton.h>
00031 #   include <LPopupGroupBox.h>
00032
00033 #   include "MacCvsConstant.h"
00034 #   include "MacBinEncoding.h"
00035 #   include "uwidget.h"
00036 #endif /* qMacCvsPP */
00037
00038 #if qUnix
00039 #   include "UCvsDialogs.h"
00040 #   include <gtk/gtk.h>
00041 #   include <gtk/gtkmain.h>
00042 #   include <gtk/gtkfontsel.h>
00043 #endif
00044
00045 #ifdef WIN32
00046 #   include "wincvs.h"
00047 #   include "umain.h"
00048 #   include <afxdao.h>
00049 #   include "wincvs_winutil.h"
00050 #   include "BrowseFileView.h"
00051 #endif /* WIN32 */
00052
00053 #include "GetPrefs.h"
00054 #include "CvsPrefs.h"
00055 #include "Authen.h"
00056 #include "AppConsole.h"
00057 #include "AppGlue.h"
00058 #include "PromptFiles.h"
00059 #include "MultiFiles.h"
00060 #include "CvsArgs.h"
00061 #include "FileTraversal.h"
00062 #include "CvsCommands.h"
00063 #include "CvsAlert.h"
00064
00065 CMString gPrevAltCvs(20, "P_PrevAltCvs");
00066
00074 bool BrowseForFile(const char* prompt, const kFilesSelectionType selectionType, CStr& fullpath)
00075 {
00076     bool res = false;
00077
00078     MultiFiles mf;
00079
00080     if( !fullpath.empty() )
00081     {
00082         if( fullpath.endsWith(kPathDelimiter) )
00083         {
00084             mf.newdir(fullpath);
00085         }
00086         else
00087         {
00088             CStr uppath;
00089             CStr file;
00090
00091             if( SplitPath(fullpath.c_str(), uppath, file) )
00092             {
00093                 mf.newdir(uppath);
00094                 mf.newfile(file);
00095             }
00096         }
00097     }
00098
00099     if( BrowserGetMultiFiles(prompt, mf, true, selectionType) )
00100     {
00101         CvsArgs args(false);
00102
00103         const char* dir = (*mf.begin()).add(args);
00104         char* const* argv = args.Argv();
00105
00106         fullpath = dir;
00107
00108         if( !fullpath.endsWith(kPathDelimiter) )
00109             fullpath << kPathDelimiter;
00110
00111         fullpath << argv[0];
00112
00113         res = true;
00114     }
00115
00116     return res;
00117 }
00118
00119 #ifdef WIN32   //{ Windows-Part
00120
00121 #ifdef _DEBUG
00122 #define new DEBUG_NEW
00123 #undef THIS_FILE
00124 static char THIS_FILE[] = __FILE__;
00125 #endif
00126
00127 // Globals options page
00128 IMPLEMENT_DYNCREATE(CGetPrefs_GLOBALS, CHHelpPropertyPage)
00129
00130 CGetPrefs_GLOBALS::CGetPrefs_GLOBALS()
00131     : CHHelpPropertyPage(CGetPrefs_GLOBALS::IDD), m_didInteract(false)
00132 {
00133     //{{AFX_DATA_INIT(CGetPrefs_GLOBALS)
00134     m_checkoutro = gCvsPrefs.CheckoutRO();
00135     m_prune = gCvsPrefs.PruneOption();
00136     m_tcpip = gCvsPrefs.Z9Option();
00137     m_quiet = gCvsPrefs.QuietOption();
00138     m_cntladd = gCvsPrefs.AddControl();
00139     m_alwaysroot = gCvsPrefs.AlwaysUseCvsroot();
00140     m_logout = gCvsPrefs.LogoutTimeOut() > 0;
00141     m_unixlf = gCvsPrefs.UnixLF();
00142     m_zlevel = gCvsPrefs.ZLevel();
00143     m_disableSplashScreen = gCvsPrefs.DisableSplashScreen();
00144     m_logoutTime = gCvsPrefs.LogoutTimeOut();
00145     m_matchEntriesCase = gCvsPrefs.MatchEntriesCase();
00146     m_encryptCommunication = gCvsPrefs.EncryptCommunication();
00147     //}}AFX_DATA_INIT
00148 }
00149
00150 CGetPrefs_GLOBALS::~CGetPrefs_GLOBALS()
00151 {
00152 }
00153
00154 void CGetPrefs_GLOBALS::DoDataExchange(CDataExchange* pDX)
00155 {
00156     m_didInteract = true;
00157
00158     CHHelpPropertyPage::DoDataExchange(pDX);
00159
00160     //{{AFX_DATA_MAP(CGetPrefs_GLOBALS)
00161     DDX_Control(pDX, IDC_SPIN_AUTO_LOGOUT_TIME, m_logoutSpinButton);
00162     DDX_Control(pDX, IDC_AUTO_LOGOUT_TIME, m_logoutEdit);
00163     DDX_Control(pDX, IDC_AUTO_LOGOUT, m_logoutCheck);
00164     DDX_Control(pDX, IDC_SPIN_COMPRESSION, m_zspinSpinButton);
00165     DDX_Control(pDX, IDC_COMPRESSION, m_zlevelEdit);
00166     DDX_Control(pDX, IDC_HAS_COMPRESSION, m_tcpipCheck);
00167     DDX_Check(pDX, IDC_CHECKOUT_READ_ONLY, m_checkoutro);
00168     DDX_Check(pDX, IDC_PRUNE_EMPTY_DIR, m_prune);
00169     DDX_Check(pDX, IDC_HAS_COMPRESSION, m_tcpip);
00170     DDX_Check(pDX, IDC_QUIET, m_quiet);
00171     DDX_Check(pDX, IDC_CONTROL_ADDED_FILES, m_cntladd);
00172     DDX_Check(pDX, IDC_ALWAYSROOT, m_alwaysroot);
00173     DDX_Check(pDX, IDC_AUTO_LOGOUT, m_logout);
00174     DDX_Check(pDX, IDC_UNIX_LF, m_unixlf);
00175     DDX_Text(pDX, IDC_COMPRESSION, m_zlevel);
00176     DDV_MinMaxUInt(pDX, m_zlevel, 1, 9);
00177     DDX_Check(pDX, IDC_NO_SPLASH_SCREEN, m_disableSplashScreen);
00178     DDX_Text(pDX, IDC_AUTO_LOGOUT_TIME, m_logoutTime);
00179     DDV_MinMaxUInt(pDX, m_logoutTime, 0, 999999);
00180     DDX_Check(pDX, IDC_MATCH_ENTRIES_CASE, m_matchEntriesCase);
00181     DDX_Check(pDX, IDC_ENCRYPTION, m_encryptCommunication);
00182     //}}AFX_DATA_MAP
00183
00184     if( !pDX->m_bSaveAndValidate )
00185     {
00186         OnTcpip();
00187         OnLogout();
00188     }
00189 }
00190
00192 void CGetPrefs_GLOBALS::StoreValues()
00193 {
00194     if( !m_didInteract )
00195         return;
00196
00197     bool needsRefresh = gCvsPrefs.MatchEntriesCase() != (m_matchEntriesCase != 0);
00198
00199     gCvsPrefs.SetCheckoutRO(m_checkoutro ? true : false);
00200     gCvsPrefs.SetPruneOption(m_prune ? true : false);
00201     gCvsPrefs.SetZ9Option(m_tcpip ? true : false);
00202     gCvsPrefs.SetQuietOption(m_quiet ? true : false);
00203     gCvsPrefs.SetAddControl(m_cntladd ? true : false);
00204     gCvsPrefs.SetAlwaysUseCvsroot(m_alwaysroot ? true : false);
00205     gCvsPrefs.SetLogoutTimeOut(m_logout ? (int)m_logoutTime : 0);
00206     gCvsPrefs.SetUnixLF(m_unixlf != 0);
00207     gCvsPrefs.SetZLevel(m_zlevel);
00208     gCvsPrefs.SetDisableSplashScreen(m_disableSplashScreen ? true : false);
00209     gCvsPrefs.SetMatchEntriesCase(m_matchEntriesCase ? true : false);
00210     gCvsPrefs.SetEncryptCommunication(m_encryptCommunication ? true : false);
00211
00212     if( needsRefresh )
00213     {
00214         if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
00215         {
00216             app->GetFileView()->ResetView(true);
00217         }
00218     }
00219 }
00220
00221 BEGIN_MESSAGE_MAP(CGetPrefs_GLOBALS, CHHelpPropertyPage)
00222     //{{AFX_MSG_MAP(CGetPrefs_GLOBALS)
00223     ON_BN_CLICKED(IDC_AUTO_LOGOUT, OnLogout)
00224     ON_BN_CLICKED(IDC_UNIX_LF, OnCheckunixlf)
00225     ON_BN_CLICKED(IDC_HAS_COMPRESSION, OnTcpip)
00226     //}}AFX_MSG_MAP
00227 END_MESSAGE_MAP()
00228
00230 BOOL CGetPrefs_GLOBALS::OnInitDialog()
00231 {
00232     CHHelpPropertyPage::OnInitDialog();
00233
00234     // Extra initialization
00235     m_logoutSpinButton.SetBase(10);
00236     m_logoutSpinButton.SetRange(0, 30000);
00237
00238     m_zspinSpinButton.SetBase(1);
00239     m_zspinSpinButton.SetRange(1, 9);
00240
00241     return TRUE;  // return TRUE unless you set the focus to a control
00242                   // EXCEPTION: OCX Property Pages should return FALSE
00243 }
00244
00245 void CGetPrefs_GLOBALS::InitHelpID()
00246 {
00247     SetCtrlHelpID(IDC_CHECKOUT_READ_ONLY,       IDH_IDC_CHECKOUT_READ_ONLY);
00248     SetCtrlHelpID(IDC_QUIET,                    IDH_IDC_QUIET);
00249     SetCtrlHelpID(IDC_PRUNE_EMPTY_DIR,          IDH_IDC_PRUNE_EMPTY_DIR);
00250     SetCtrlHelpID(IDC_HAS_COMPRESSION,          IDH_IDC_HAS_COMPRESSION);
00251     SetCtrlHelpID(IDC_COMPRESSION,              IDH_IDC_COMPRESSION);
00252     SetCtrlHelpID(IDC_SPIN_COMPRESSION,         IDH_IDC_SPIN_COMPRESSION);
00253     SetCtrlHelpID(IDC_ENCRYPTION,               IDH_IDC_ENCRYPTION);
00254     SetCtrlHelpID(IDC_UNIX_LF,                  IDH_IDC_UNIX_LF);
00255     SetCtrlHelpID(IDC_NO_SPLASH_SCREEN,         IDH_IDC_NO_SPLASH_SCREEN);
00256     SetCtrlHelpID(IDC_CONTROL_ADDED_FILES,      IDH_IDC_CONTROL_ADDED_FILES);
00257     SetCtrlHelpID(IDC_MATCH_ENTRIES_CASE,       IDH_IDC_MATCH_ENTRIES_CASE);
00258     SetCtrlHelpID(IDC_AUTO_LOGOUT,              IDH_IDC_AUTO_LOGOUT);
00259     SetCtrlHelpID(IDC_AUTO_LOGOUT_TIME,         IDH_IDC_AUTO_LOGOUT_TIME);
00260     SetCtrlHelpID(IDC_SPIN_AUTO_LOGOUT_TIME,    IDH_IDC_SPIN_AUTO_LOGOUT_TIME);
00261 }
00262
00264 void CGetPrefs_GLOBALS::OnTcpip()
00265 {
00266     m_zlevelEdit.EnableWindow(m_tcpipCheck.GetCheck() != 0);
00267     m_zspinSpinButton.EnableWindow(m_tcpipCheck.GetCheck() != 0);
00268 }
00269
00271 void CGetPrefs_GLOBALS::OnLogout()
00272 {
00273     m_logoutEdit.EnableWindow(m_logoutCheck.GetCheck() != 0);
00274     m_logoutSpinButton.EnableWindow(m_logoutCheck.GetCheck() != 0);
00275 }
00276
00278 void CGetPrefs_GLOBALS::OnCheckunixlf()
00279 {
00280     CvsAlert(kCvsAlertNoteIcon, "File-translation mode change.",
00281         "Be careful when using this option!\n"
00282         "You can't use WinCvs in both modes - you have to use either Unix or DOS line feeds. "
00283         "If you experience some problems try to remove the global CVS files (such as .cvspass) because "
00284         "they probably don't match the new line feeds setting.").ShowAlert();
00285 }
00286
00287 // WinCvs options page
00288 IMPLEMENT_DYNCREATE(CGetPrefs_WINCVS, CHHelpPropertyPage)
00289
00290 CGetPrefs_WINCVS::CGetPrefs_WINCVS()
00291     : CHHelpPropertyPage(CGetPrefs_WINCVS::IDD), m_didInteract(false)
00292 {
00293     //{{AFX_DATA_INIT(CGetPrefs_WINCVS)
00294     m_viewer = gCvsPrefs.Viewer() != 0L ? gCvsPrefs.Viewer() : "";
00295     m_useExtDiff = gCvsPrefs.ExtDiff() != 0L;
00296     m_diffProg = gCvsPrefs.ExtDiff();
00297     m_useSettingsFolder = gCvsPrefs.SettingsFolder() != 0L;
00298     m_settingsFolder = gCvsPrefs.SettingsFolder() != 0L ? gCvsPrefs.SettingsFolder() : "";
00299     m_tclDll = gCvsPrefs.TclLibrary() != 0L ? gCvsPrefs.TclLibrary() : "";
00300     m_pythonDll = gCvsPrefs.PythonLibrary() != 0L ? gCvsPrefs.PythonLibrary() : "";
00301     //}}AFX_DATA_INIT
00302 }
00303
00304 CGetPrefs_WINCVS::~CGetPrefs_WINCVS()
00305 {
00306 }
00307
00308 void CGetPrefs_WINCVS::DoDataExchange(CDataExchange* pDX)
00309 {
00310     m_didInteract = true;
00311
00312     CHHelpPropertyPage::DoDataExchange(pDX);
00313
00314     //{{AFX_DATA_MAP(CGetPrefs_WINCVS)
00315     DDX_Control(pDX, IDC_PYTHONDLL, m_pythonDllEdit);
00316     DDX_Control(pDX, IDC_TCLDLL, m_tclDllEdit);
00317     DDX_Control(pDX, IDC_EXTERNAL_EDITOR, m_viewerEdit);
00318     DDX_Control(pDX, IDC_BROWSE_EXTERNAL_DIFF, m_extDiffSelButton);
00319     DDX_Control(pDX, IDC_EXTERNAL_DIFF, m_diffProgEdit);
00320     DDX_Control(pDX, IDC_HAS_EXTERNAL_DIFF, m_useExtDiffCheck);
00321     DDX_Control(pDX, IDC_ALTERNATE_SETTINGS, m_settingsFolderEdit);
00322     DDX_Control(pDX, IDC_BROWSE_ALTERNATE_SETTINGS, m_settingsFolderButton);
00323     DDX_Control(pDX, IDC_HAS_ALTERNATE_SETTINGS, m_useSettingsFolderCheck);
00324     DDX_Text(pDX, IDC_EXTERNAL_EDITOR, m_viewer);
00325     DDX_Check(pDX, IDC_HAS_EXTERNAL_DIFF, m_useExtDiff);
00326     DDX_Text(pDX, IDC_EXTERNAL_DIFF, m_diffProg);
00327     DDX_Check(pDX, IDC_HAS_ALTERNATE_SETTINGS, m_useSettingsFolder);
00328     DDX_Text(pDX, IDC_ALTERNATE_SETTINGS, m_settingsFolder);
00329     DDX_Text(pDX, IDC_TCLDLL, m_tclDll);
00330     DDX_Text(pDX, IDC_PYTHONDLL, m_pythonDll);
00331     //}}AFX_DATA_MAP
00332
00333     if( m_useSettingsFolder )
00334     {
00335         DDV_MinChars(pDX, m_settingsFolder, 1);
00336         DDV_CheckPathExists(pDX, IDC_ALTERNATE_SETTINGS, m_settingsFolder);
00337     }
00338
00339     if( !pDX->m_bSaveAndValidate )
00340     {
00341         OnExtdiff();
00342         OnAltsettingschk();
00343     }
00344 }
00345
00347 void CGetPrefs_WINCVS::StoreValues()
00348 {
00349     if( !m_didInteract )
00350         return;
00351
00352     gCvsPrefs.SetViewer(!m_viewer.IsEmpty() ? (LPCTSTR)m_viewer : 0L);
00353     gCvsPrefs.SetExtDiff(m_useExtDiff && !m_diffProg.IsEmpty() ? (LPCTSTR)m_diffProg : 0L);
00354     gCvsPrefs.SetSettingsFolder(m_useSettingsFolder && !m_settingsFolder.IsEmpty() ? (LPCTSTR)m_settingsFolder : 0L);
00355
00356     const bool restartScriptEngine = m_tclDll != CString(gCvsPrefs.TclLibrary()) || m_pythonDll != CString(gCvsPrefs.PythonLibrary());
00357
00358     gCvsPrefs.SetTclLibrary(!m_tclDll.IsEmpty() ? (LPCTSTR)m_tclDll : 0L);
00359     gCvsPrefs.SetPythonLibrary(!m_pythonDll.IsEmpty() ? (LPCTSTR)m_pythonDll : 0L);
00360
00361     if( restartScriptEngine )
00362     {
00363         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00364         if( app )
00365         {
00366             app->RestartScriptEngine();
00367         }
00368     }
00369 }
00370
00371 BEGIN_MESSAGE_MAP(CGetPrefs_WINCVS, CHHelpPropertyPage)
00372     //{{AFX_MSG_MAP(CGetPrefs_WINCVS)
00373     ON_BN_CLICKED(IDC_BROWSE_EXTERNAL_EDITOR, OnBtnviewer)
00374     ON_BN_CLICKED(IDC_BROWSE_EXTERNAL_DIFF, OnExtdiffsel)
00375     ON_BN_CLICKED(IDC_HAS_EXTERNAL_DIFF, OnExtdiff)
00376     ON_BN_CLICKED(IDC_HAS_ALTERNATE_SETTINGS, OnAltsettingschk)
00377     ON_BN_CLICKED(IDC_BROWSE_ALTERNATE_SETTINGS, OnBtnsettings)
00378     ON_BN_CLICKED(IDC_BROWSE_TCLDLL, OnTcldllsel)
00379     ON_BN_CLICKED(IDC_BROWSE_PYTHONDLL, OnPythondllsel)
00380     //}}AFX_MSG_MAP
00381 END_MESSAGE_MAP()
00382
00384 BOOL CGetPrefs_WINCVS::OnInitDialog()
00385 {
00386     CHHelpPropertyPage::OnInitDialog();
00387
00388     // Extra initialization
00389     EnableEditAutoComplete(&m_pythonDllEdit);
00390     EnableEditAutoComplete(&m_tclDllEdit);
00391     EnableEditAutoComplete(&m_viewerEdit);
00392     EnableEditAutoComplete(&m_diffProgEdit);
00393     EnableEditAutoComplete(&m_settingsFolderEdit);
00394
00395     return TRUE;  // return TRUE unless you set the focus to a control
00396     // EXCEPTION: OCX Property Pages should return FALSE
00397 }
00398
00399 void CGetPrefs_WINCVS::InitHelpID()
00400 {
00401     SetCtrlHelpID(IDC_HAS_EXTERNAL_DIFF,            IDH_IDC_HAS_EXTERNAL_DIFF);
00402     SetCtrlHelpID(IDC_EXTERNAL_DIFF,                IDH_IDC_EXTERNAL_DIFF);
00403     SetCtrlHelpID(IDC_BROWSE_EXTERNAL_DIFF,         IDH_IDC_BROWSE_FILENAME);
00404     SetCtrlHelpID(IDC_EXTERNAL_EDITOR,              IDH_IDC_EXTERNAL_EDITOR);
00405     SetCtrlHelpID(IDC_BROWSE_EXTERNAL_EDITOR,       IDH_IDC_BROWSE_FILENAME);
00406     SetCtrlHelpID(IDC_PYTHONDLL,                    IDH_IDC_PYTHONDLL);
00407     SetCtrlHelpID(IDC_BROWSE_PYTHONDLL,             IDH_IDC_BROWSE_FILENAME);
00408     SetCtrlHelpID(IDC_TCLDLL,                       IDH_IDC_TCLDLL);
00409     SetCtrlHelpID(IDC_BROWSE_TCLDLL,                IDH_IDC_BROWSE_FILENAME);
00410     SetCtrlHelpID(IDC_HAS_ALTERNATE_SETTINGS,       IDH_IDC_HAS_ALTERNATE_SETTINGS);
00411     SetCtrlHelpID(IDC_ALTERNATE_SETTINGS,           IDH_IDC_ALTERNATE_SETTINGS);
00412     SetCtrlHelpID(IDC_BROWSE_ALTERNATE_SETTINGS,    IDH_IDC_BROWSE_FILENAME);
00413 }
00414
00416 void CGetPrefs_WINCVS::OnBtnviewer()
00417 {
00418     CString viewerPath;
00419     m_viewerEdit.GetWindowText(viewerPath);
00420
00421     CStr fullpath = viewerPath;
00422     if( BrowseForFile("Select the viewer application", kSelectExecutable, fullpath) )
00423     {
00424         m_viewerEdit.SetWindowText(fullpath);
00425     }
00426 }
00427
00429 void CGetPrefs_WINCVS::OnExtdiffsel()
00430 {
00431     CString diffProg;
00432     m_diffProgEdit.GetWindowText(diffProg);
00433
00434     CStr fullpath = diffProg;
00435     if( BrowseForFile("Select the external diff application", kSelectExecutable, fullpath) )
00436     {
00437         m_diffProgEdit.SetWindowText(fullpath);
00438     }
00439 }
00440
00442 void CGetPrefs_WINCVS::OnTcldllsel()
00443 {
00444     CString tclDll;
00445     m_tclDllEdit.GetWindowText(tclDll);
00446
00447     CStr fullpath = tclDll;
00448     if( BrowseForFile("Select the TCL DLL", kSelectDll, fullpath) )
00449     {
00450         m_tclDllEdit.SetWindowText(fullpath);
00451     }
00452 }
00453
00455 void CGetPrefs_WINCVS::OnPythondllsel()
00456 {
00457     CString pythonDll;
00458     m_pythonDllEdit.GetWindowText(pythonDll);
00459
00460     CStr fullpath = pythonDll;
00461     if( BrowseForFile("Select the Python DLL", kSelectDll, fullpath) )
00462     {
00463         m_pythonDllEdit.SetWindowText(fullpath);
00464     }
00465 }
00466
00468 void CGetPrefs_WINCVS::OnExtdiff()
00469 {
00470     m_diffProgEdit.EnableWindow(m_useExtDiffCheck.GetCheck() != 0);
00471     m_extDiffSelButton.EnableWindow(m_useExtDiffCheck.GetCheck() != 0);
00472 }
00473
00475 void CGetPrefs_WINCVS::OnAltsettingschk()
00476 {
00477     const bool useSettingsFolder = m_useSettingsFolderCheck.GetCheck() != 0;
00478
00479     m_settingsFolderEdit.EnableWindow(useSettingsFolder);
00480     m_settingsFolderButton.EnableWindow(useSettingsFolder);
00481
00482     if( useSettingsFolder )
00483     {
00484         CString strSettingsFolder;
00485         m_settingsFolderEdit.GetWindowText(strSettingsFolder);
00486
00487         if( strSettingsFolder.IsEmpty() )
00488         {
00489             CStr settingsFolder;
00490             if( FormatDefaultSettingsLoc(settingsFolder) )
00491             {
00492                 m_settingsFolderEdit.SetWindowText(settingsFolder);
00493             }
00494         }
00495     }
00496 }
00497
00499 void CGetPrefs_WINCVS::OnBtnsettings()
00500 {
00501     CString strSettingsFolder;
00502     m_settingsFolderEdit.GetWindowText(strSettingsFolder);
00503
00504     CStr settingsFolder(strSettingsFolder);
00505     if( BrowserGetDirectory("Select the settings directory", settingsFolder, IsWindow(m_hWnd) ? this : NULL) )
00506     {
00507         m_settingsFolderEdit.SetWindowText(settingsFolder);
00508     }
00509 }
00510
00512 // CGetPrefs_CVS
00513
00514 IMPLEMENT_DYNCREATE(CGetPrefs_CVS, CHHelpPropertyPage)
00515
00516 CGetPrefs_CVS::CGetPrefs_CVS()
00517     : CHHelpPropertyPage(CGetPrefs_CVS::IDD), m_didInteract(false), m_showCvsCombo(CSmartComboBox::AutoDropWidth)
00518 {
00519     UStr cvsPath;
00520
00521     //{{AFX_DATA_INIT(CGetPrefs_CVS)
00522     m_home = gCvsPrefs.Home() != 0L ? gCvsPrefs.Home() : "";
00523     m_useAltCvs = gCvsPrefs.WhichCvs(cvsPath, true) != 0L;
00524     m_cvsConsole = gCvsPrefs.CvsConsole();
00525     m_showCvs = gCvsPrefs.ShowCvs();
00526     m_altCvs = gCvsPrefs.WhichCvs(cvsPath);
00527     //}}AFX_DATA_INIT
00528
00529     m_altCvsCombo.SetItems(&gPrevAltCvs);
00530 }
00531
00532 CGetPrefs_CVS::~CGetPrefs_CVS()
00533 {
00534 }
00535
00536 void CGetPrefs_CVS::DoDataExchange(CDataExchange* pDX)
00537 {
00538     m_didInteract = true;
00539
00540     CHHelpPropertyPage::DoDataExchange(pDX);
00541
00542     //{{AFX_DATA_MAP(CGetPrefs_CVS)
00543     DDX_Control(pDX, IDC_ALTERNATE_CVS, m_altCvsCombo);
00544     DDX_Control(pDX, IDC_CONSOLE, m_cvsConsoleCheck);
00545     DDX_Control(pDX, IDC_SHOW_CVS_METHOD, m_showCvsCombo);
00546     DDX_Control(pDX, IDC_BROWSE_FILENAME, m_selAltCvsButton);
00547     DDX_Control(pDX, IDC_HAS_ALTERNATE_CVS, m_useAltCvsCheck);
00548     DDX_Control(pDX, IDC_HOME, m_homeEdit);
00549     DDX_Text(pDX, IDC_HOME, m_home);
00550     DDX_Check(pDX, IDC_HAS_ALTERNATE_CVS, m_useAltCvs);
00551     DDX_Check(pDX, IDC_CONSOLE, m_cvsConsole);
00552     DDX_CBIndex(pDX, IDC_SHOW_CVS_METHOD, m_showCvs);
00553     DDX_CBString(pDX, IDC_ALTERNATE_CVS, m_altCvs);
00554     //}}AFX_DATA_MAP
00555
00556     DDV_CheckPathExists(pDX, IDC_HOME, m_home);
00557
00558     if( !pDX->m_bSaveAndValidate )
00559     {
00560         OnAltcvschk();
00561     }
00562
00563     if( m_useAltCvs )
00564     {
00565         DDV_MinChars(pDX, m_altCvs, 1);
00566         DDX_ComboMString(pDX, IDC_ALTERNATE_CVS, m_altCvsCombo);
00567     }
00568 }
00569
00570 BEGIN_MESSAGE_MAP(CGetPrefs_CVS, CHHelpPropertyPage)
00571     //{{AFX_MSG_MAP(CGetPrefs_CVS)
00572     ON_BN_CLICKED(IDC_BROWSE_PATH, OnBtnhome)
00573     ON_BN_CLICKED(IDC_HAS_ALTERNATE_CVS, OnAltcvschk)
00574     ON_BN_CLICKED(IDC_BROWSE_FILENAME, OnAltcvssel)
00575     ON_BN_CLICKED(IDC_CONSOLE, OnConsole)
00576     //}}AFX_MSG_MAP
00577 END_MESSAGE_MAP()
00578
00580 BOOL CGetPrefs_CVS::OnInitDialog()
00581 {
00582     CHHelpPropertyPage::OnInitDialog();
00583
00584     // Extra initialization
00585     EnableEditAutoComplete(m_altCvsCombo.GetEditCtrl());
00586     EnableEditAutoComplete(&m_homeEdit);
00587
00588     m_showCvsCombo.AddString("Hidden");
00589     m_showCvsCombo.AddString("Normal Window");
00590     m_showCvsCombo.AddString("Non-active Window");
00591     m_showCvsCombo.AddString("Minimized non-active Window");
00592
00593     m_showCvsCombo.SetCurSel(gCvsPrefs.ShowCvs());
00594
00595     if( m_cvsConsole )
00596     {
00597         m_showCvsCombo.EnableWindow(FALSE);
00598     }
00599
00600     return TRUE;  // return TRUE unless you set the focus to a control
00601     // EXCEPTION: OCX Property Pages should return FALSE
00602 }
00603
00604 void CGetPrefs_CVS::InitHelpID()
00605 {
00606     SetCtrlHelpID(IDC_HOME,                 IDH_IDC_HOME);
00607     SetCtrlHelpID(IDC_BROWSE_PATH,          IDH_IDC_BROWSE_PATH);
00608     SetCtrlHelpID(IDC_HAS_ALTERNATE_CVS,    IDH_IDC_HAS_ALTERNATE_CVS);
00609     SetCtrlHelpID(IDC_ALTERNATE_CVS,        IDH_IDC_ALTERNATE_CVS);
00610     SetCtrlHelpID(IDC_BROWSE_FILENAME,      IDH_IDC_BROWSE_FILENAME);
00611     SetCtrlHelpID(IDC_CONSOLE,              IDH_IDC_CONSOLE);
00612     SetCtrlHelpID(IDC_SHOW_CVS_METHOD,      IDH_IDC_SHOW_CVS_METHOD);
00613 }
00614
00616 void CGetPrefs_CVS::OnConsole()
00617 {
00618     m_showCvsCombo.EnableWindow(!m_cvsConsoleCheck.GetCheck());
00619 }
00620
00622 void CGetPrefs_CVS::StoreValues()
00623 {
00624     if( !m_didInteract )
00625         return;
00626
00627     gCvsPrefs.SetHome(m_home);
00628     gCvsPrefs.SetWhichCvs(m_useAltCvs && !m_altCvs.IsEmpty() ? (LPCTSTR)m_altCvs : "");
00629     gCvsPrefs.SetCvsConsole(m_cvsConsole != 0);
00630     gCvsPrefs.SetShowCvs((SHOWCVS_TYPE)m_showCvs);
00631 }
00632
00634 void CGetPrefs_CVS::OnBtnhome()
00635 {
00636     CString strHome;
00637     m_homeEdit.GetWindowText(strHome);
00638
00639     CStr home(strHome);
00640     if( BrowserGetDirectory("Select the HOME directory", home, IsWindow(m_hWnd) ? this : NULL) )
00641     {
00642         m_homeEdit.SetWindowText(home);
00643     }
00644 }
00645
00647 void CGetPrefs_CVS::OnAltcvschk()
00648 {
00649     m_altCvsCombo.EnableWindow(m_useAltCvsCheck.GetCheck() != 0);
00650     m_selAltCvsButton.EnableWindow(m_useAltCvsCheck.GetCheck() != 0);
00651 }
00652
00654 void CGetPrefs_CVS::OnAltcvssel()
00655 {
00656     CString altCvs;
00657     m_altCvsCombo.GetWindowText(altCvs);
00658
00659     CStr fullpath = altCvs;
00660     if( BrowseForFile("Select the CVS client application", kSelectExecutable, fullpath) )
00661     {
00662         m_altCvsCombo.SetWindowText(fullpath);
00663     }
00664 }
00665
00667 // CGetPrefs_CVSCMD_DIALOGS
00668
00669 // Command Dialogs options page
00670 IMPLEMENT_DYNCREATE(CGetPrefs_CVSCMD_DIALOGS, CHHelpPropertyPage)
00671
00672 CGetPrefs_CVSCMD_DIALOGS::CGetPrefs_CVSCMD_DIALOGS()
00673     : CHHelpPropertyPage(CGetPrefs_CVSCMD_DIALOGS::IDD), m_didInteract(false)
00674 {
00675     //{{AFX_DATA_INIT(CGetPrefs_CVSCMD_DIALOGS)
00676     m_hideUpdate = gCvsPrefs.HideCommandDlgUpdate() != 0L;
00677     m_hideDiff = gCvsPrefs.HideCommandDlgDiff() != 0L;
00678     m_hideGraph = gCvsPrefs.HideCommandDlgGraph() != 0L;
00679     m_hideLog = gCvsPrefs.HideCommandDlgLog() != 0L;
00680     m_keyForce = gCvsPrefs.HideCommandDlgUseShift() != 0L ? 0 : 1;
00681     m_hideAnnotate = gCvsPrefs.HideCommandDlgAnnotate() != 0L;
00682     m_hideStatus = gCvsPrefs.HideCommandDlgStatus() != 0L;
00683     m_fileAction = gCvsPrefs.HideCommandDlgFileAction() != 0L;
00684     m_ctrlPressedOnOK = gCvsPrefs.CtrlPressedOnOK() != 0L;
00685     //}}AFX_DATA_INIT
00686 }
00687
00688 CGetPrefs_CVSCMD_DIALOGS::~CGetPrefs_CVSCMD_DIALOGS()
00689 {
00690 }
00691
00692 void CGetPrefs_CVSCMD_DIALOGS::DoDataExchange(CDataExchange* pDX)
00693 {
00694     m_didInteract = true;
00695
00696     CHHelpPropertyPage::DoDataExchange(pDX);
00697     //{{AFX_DATA_MAP(CGetPrefs_CVSCMD_DIALOGS)
00698     DDX_Check(pDX, IDC_SKIP_UPDATE, m_hideUpdate);
00699     DDX_Check(pDX, IDC_SKIP_DIFF, m_hideDiff);
00700     DDX_Check(pDX, IDC_SKIP_GRAPH, m_hideGraph);
00701     DDX_Check(pDX, IDC_SKIP_LOG, m_hideLog);
00702     DDX_Radio(pDX, IDC_FORCE_KEY_SHIFT, m_keyForce);
00703     DDX_Check(pDX, IDC_SKIP_ANNOTATE, m_hideAnnotate);
00704     DDX_Check(pDX, IDC_SKIP_STATUS, m_hideStatus);
00705     DDX_Check(pDX, IDC_CTRL_PRESSED_ON_OK, m_ctrlPressedOnOK);
00706     DDX_Check(pDX, IDC_SKIP_FILEACTION, m_fileAction);
00707     //}}AFX_DATA_MAP
00708 }
00709
00711 void CGetPrefs_CVSCMD_DIALOGS::StoreValues()
00712 {
00713     if( !m_didInteract )
00714         return;
00715
00716     gCvsPrefs.SetHideCommandDlgUpdate(m_hideUpdate ? true : false);
00717     gCvsPrefs.SetHideCommandDlgDiff(m_hideDiff ? true : false);
00718     gCvsPrefs.SetHideCommandDlgGraph(m_hideGraph ? true : false);
00719     gCvsPrefs.SetHideCommandDlgAnnotate(m_hideAnnotate ? true : false);
00720     gCvsPrefs.SetHideCommandDlgLog(m_hideLog ? true : false);
00721     gCvsPrefs.SetHideCommandDlgStatus(m_hideStatus ? true : false);
00722     gCvsPrefs.SetHideCommandDlgFileAction(m_fileAction ? true : false);
00723     gCvsPrefs.SetHideCommandDlgUseShift(m_keyForce == 0);
00724     gCvsPrefs.SetCtrlPressedOnOK(m_ctrlPressedOnOK ? true : false);
00725 }
00726
00727 BEGIN_MESSAGE_MAP(CGetPrefs_CVSCMD_DIALOGS, CHHelpPropertyPage)
00728 //{{AFX_MSG_MAP(CGetPrefs_CVSCMD_DIALOGS)
00729     //}}AFX_MSG_MAP
00730 END_MESSAGE_MAP()
00731
00732 void CGetPrefs_CVSCMD_DIALOGS::InitHelpID()
00733 {
00734     SetCtrlHelpID(IDC_SKIP_UPDATE,          IDH_IDC_SKIP_UPDATE);
00735     SetCtrlHelpID(IDC_SKIP_DIFF,            IDH_IDC_SKIP_DIFF);
00736     SetCtrlHelpID(IDC_SKIP_GRAPH,           IDH_IDC_SKIP_GRAPH);
00737     SetCtrlHelpID(IDC_SKIP_LOG,             IDH_IDC_SKIP_LOG);
00738     SetCtrlHelpID(IDC_SKIP_ANNOTATE,        IDH_IDC_SKIP_ANNOTATE);
00739     SetCtrlHelpID(IDC_SKIP_STATUS,          IDH_IDC_SKIP_STATUS);
00740     SetCtrlHelpID(IDC_SKIP_FILEACTION,      IDH_IDC_SKIP_FILEACTION);
00741     SetCtrlHelpID(IDC_FORCE_KEY_SHIFT,      IDH_IDC_FORCE_KEY_SHIFT);
00742     SetCtrlHelpID(IDC_FORCE_KEY_CTRL,       IDH_IDC_FORCE_KEY_CTRL);
00743     SetCtrlHelpID(IDC_CTRL_PRESSED_ON_OK,   IDH_IDC_CTRL_PRESSED_ON_OK);
00744 }
00745
00746 #endif //} WIN32
00747
00748 #if qUnix    //{ Unix-Part
00749 class UCvsPrefs_MAIN : public UWidget
00750 {
00751     UDECLARE_DYNAMIC(UCvsPrefs_MAIN)
00752 public:
00753     UCvsPrefs_MAIN() : UWidget(::UEventGetWidID()) {}
00754     virtual ~UCvsPrefs_MAIN() {}
00755
00756     enum
00757     {
00758         kOK = EV_COMMAND_START, // 0
00759         kCancel,                // 1
00760         kTabGeneral             // 2
00761     };
00762
00763     virtual void DoDataExchange(bool fill);
00764
00765 protected:
00766     ev_msg int OnOK(void);
00767     ev_msg int OnCancel(void);
00768
00769     UDECLARE_MESSAGE_MAP()
00770 };
00771
00772 UIMPLEMENT_DYNAMIC(UCvsPrefs_MAIN, UWidget)
00773
00774 UBEGIN_MESSAGE_MAP(UCvsPrefs_MAIN, UWidget)
00775     ON_UCOMMAND(UCvsPrefs_MAIN::kOK, UCvsPrefs_MAIN::OnOK)
00776     ON_UCOMMAND(UCvsPrefs_MAIN::kCancel, UCvsPrefs_MAIN::OnCancel)
00777 UEND_MESSAGE_MAP()
00778
00779 int UCvsPrefs_MAIN::OnOK(void)
00780 {
00781     EndModal(true);
00782     return 0;
00783 }
00784
00785 int UCvsPrefs_MAIN::OnCancel(void)
00786 {
00787     EndModal(false);
00788     return 0;
00789 }
00790
00791 void UCvsPrefs_MAIN::DoDataExchange(bool fill)
00792 {
00793     if(fill)
00794     {
00795     }
00796     else
00797     {
00798     }
00799 }
00800
00801 class UCvsPrefs_CVSROOT : public UWidget
00802 {
00803     UDECLARE_DYNAMIC(UCvsPrefs_CVSROOT)
00804 public:
00805     UCvsPrefs_CVSROOT();
00806     virtual ~UCvsPrefs_CVSROOT() {}
00807
00808     enum
00809     {
00810         kCvsrootCombo = EV_COMMAND_START,   // 0
00811         kRshRadio,              // 1
00812         kPserverRadio,          // 2
00813         kLocalRadio,            // 3
00814         kSshRadio,              // 4
00815         kKerberosRadio,         // 5
00816         kCvsVersionCombo,       // 6
00817         kCvsConsoleRadio        // 7
00818     };
00819
00820     virtual void DoDataExchange(bool fill);
00821
00822     void StoreValues(void);
00823
00824 protected:
00825     UStr m_cvsroot;
00826     AuthenKind m_kind;
00827     bool m_console;
00828     int m_versCombo;
00829
00830     UDECLARE_MESSAGE_MAP()
00831 };
00832
00833 UIMPLEMENT_DYNAMIC(UCvsPrefs_CVSROOT, UWidget)
00834
00835 UBEGIN_MESSAGE_MAP(UCvsPrefs_CVSROOT, UWidget)
00836 UEND_MESSAGE_MAP()
00837
00838 UCvsPrefs_CVSROOT::UCvsPrefs_CVSROOT() : UWidget(::UEventGetWidID())
00839 {
00840     if(!gCvsPrefs.empty())
00841         m_cvsroot = (const char *)gCvsPrefs;
00842     m_kind    = gAuthen.kind();
00843     m_console = gCvsPrefs.CvsConsole();
00844     m_versCombo = gCvsPrefs.CvsVersion();
00845 }
00846
00847 void UCvsPrefs_CVSROOT::StoreValues(void)
00848 {
00849     gCvsPrefs = m_cvsroot;
00850     gAuthen.setkind(m_kind);
00851     gCvsPrefs.SetCvsConsole(m_console != 0);
00852     gCvsPrefs.SetCvsVersion(m_versCombo);
00853 }
00854
00855 void UCvsPrefs_CVSROOT::DoDataExchange(bool fill)
00856 {
00857     ::DoDataExchange(fill, GetWidID(), kCvsrootCombo, gOldCvsroots);
00858
00859     if(fill)
00860     {
00861         UEventSendMessage(GetWidID(), EV_SETTEXT, kCvsrootCombo, (void *)(const char *)m_cvsroot);
00862
00863         int item = kLocalRadio;
00864
00865         switch(m_kind)
00866         {
00867         case local: item = kLocalRadio; break;
00868         case kserver: item = kKerberosRadio; break;
00869         case rhosts: item = kRshRadio; break;
00870         case pserver: item = kPserverRadio; break;
00871         case ssh: item = kSshRadio; break;
00872         case ntserver: break;   // not supported under *nix
00873         case gserver: break;    // not supported under *nix
00874         case server: break;     // not supported under *nix
00875         case sspi: break;       // not supported under *nix
00876         }
00877
00878         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(item, 1), 0L);
00879         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCvsConsoleRadio, m_console), 0L);
00880         UEventSendMessage(GetWidID(), EV_COMBO_SETSEL, UMAKEINT(kCvsVersionCombo,m_versCombo), 0L);
00881
00882     }
00883     else
00884     {
00885         UEventSendMessage(GetWidID(), EV_GETTEXT, kCvsrootCombo, &m_cvsroot);
00886
00887         m_kind = local;
00888         if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kLocalRadio, 0L))
00889             m_kind = local;
00890         else if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kKerberosRadio, 0L))
00891             m_kind = kserver;
00892         else if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRshRadio, 0L))
00893             m_kind = rhosts;
00894         else if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kPserverRadio, 0L))
00895             m_kind = pserver;
00896         else if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kSshRadio, 0L))
00897             m_kind = ssh;
00898
00899         m_console = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCvsConsoleRadio, 0L) != 0;
00900         m_versCombo = UEventSendMessage(GetWidID(), EV_COMBO_GETSEL, kCvsVersionCombo, 0L);
00901     }
00902 }
00903
00904 class UCvsPrefs_GLOBALS : public UWidget
00905 {
00906     UDECLARE_DYNAMIC(UCvsPrefs_GLOBALS)
00907 public:
00908     UCvsPrefs_GLOBALS();
00909     virtual ~UCvsPrefs_GLOBALS() {}
00910
00911     enum
00912     {
00913         kcheckoutro = EV_COMMAND_START, // 0
00914         kdirty,                 // 1
00915         ktcpip,                 // 2
00916         kprune,                 // 3
00917         kquiet,                 // 4
00918         kcntladd,               // 5
00919         kzlevel                 // 6
00920     };
00921
00922     virtual void DoDataExchange(bool fill);
00923
00924     void StoreValues(void);
00925     int  OnTcpip(void);
00926
00927 protected:
00928     bool m_checkoutro;
00929     bool m_dirty;
00930     bool m_tcpip;
00931     bool m_prune;
00932     bool m_quiet;
00933     bool m_cntladd;
00934     int  m_zlevel;
00935
00936     UDECLARE_MESSAGE_MAP()
00937 };
00938
00939 UIMPLEMENT_DYNAMIC(UCvsPrefs_GLOBALS, UWidget)
00940
00941 UBEGIN_MESSAGE_MAP(UCvsPrefs_GLOBALS, UWidget)
00942     ON_UCOMMAND(UCvsPrefs_GLOBALS::ktcpip, UCvsPrefs_GLOBALS::OnTcpip)
00943 UEND_MESSAGE_MAP()
00944
00945 UCvsPrefs_GLOBALS::UCvsPrefs_GLOBALS() : UWidget(::UEventGetWidID())
00946 {
00947     m_checkoutro = gCvsPrefs.CheckoutRO();
00948     m_prune      = gCvsPrefs.PruneOption();
00949     m_tcpip      = gCvsPrefs.Z9Option();
00950     m_quiet      = gCvsPrefs.QuietOption();
00951     m_cntladd    = gCvsPrefs.AddControl();
00952     m_dirty      = gCvsPrefs.DirtySupport();
00953     m_zlevel     = gCvsPrefs.ZLevel();
00954 }
00955
00956 void UCvsPrefs_GLOBALS::StoreValues(void)
00957 {
00958     gCvsPrefs.SetCheckoutRO(m_checkoutro);
00959     gCvsPrefs.SetPruneOption(m_prune);
00960     gCvsPrefs.SetZ9Option(m_tcpip);
00961     gCvsPrefs.SetQuietOption(m_quiet);
00962     gCvsPrefs.SetAddControl(m_cntladd);
00963     gCvsPrefs.SetDirtySupport(m_dirty);
00964     gCvsPrefs.SetZLevel(m_zlevel);
00965 }
00966
00967 void UCvsPrefs_GLOBALS::DoDataExchange(bool fill)
00968 {
00969     if(fill)
00970     {
00971         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kcheckoutro, m_checkoutro), 0L);
00972         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kprune,      m_prune),      0L);
00973         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(ktcpip,      m_tcpip),      0L);
00974         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kquiet,      m_quiet),      0L);
00975         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kcntladd,    m_cntladd),    0L);
00976         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kdirty,      m_dirty),      0L);
00977         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kzlevel,     m_zlevel),     0L);
00978     }
00979     else
00980     {
00981         m_checkoutro = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kcheckoutro, 0L) != 0;
00982         m_prune      = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kprune,      0L) != 0;
00983         m_tcpip      = UEventSendMessage(GetWidID(), EV_QUERYSTATE, ktcpip,      0L) != 0;
00984         m_quiet      = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kquiet,      0L) != 0;
00985         m_cntladd    = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kcntladd,    0L) != 0;
00986         m_dirty      = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kdirty,      0L) != 0;
00987         m_zlevel     = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kzlevel,     0L);
00988     }
00989 }
00990
00991
00992 int UCvsPrefs_GLOBALS::OnTcpip(void)
00993 {
00994     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, ktcpip, 0L);
00995     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kzlevel, state), 0L);
00996     return 0;
00997 }
00998
00999 class UCvsPrefs_PORTS : public UWidget
01000 {
01001     UDECLARE_DYNAMIC(UCvsPrefs_PORTS)
01002 public:
01003     UCvsPrefs_PORTS();
01004     virtual ~UCvsPrefs_PORTS() {}
01005
01006     enum
01007     {
01008         kcheckrhost = EV_COMMAND_START, // 0
01009         kcheckpserver,          // 1
01010         kcheckkserver,          // 2
01011         kchecksname,            // 3
01012         kcheckrsh,              // 4
01013
01014         kportrhost,             // 5
01015         kportpserver,           // 6
01016         kportkserver,           // 7
01017
01018         ksname,                 // 8
01019         krshname                // 9
01020     };
01021
01022     virtual void DoDataExchange(bool fill);
01023
01024     void StoreValues(void);
01025
01026 protected:
01027     bool m_checkrhost;
01028     bool m_checkpserver;
01029     bool m_checkkserver;
01030     bool m_checksname;
01031     bool m_checkrsh;
01032     int m_portrhost;
01033     int m_portpserver;
01034     int m_portkserver;
01035     UStr m_sname;
01036     UStr m_rshname;
01037
01038     ev_msg int OnCheckPorts(int cmd);
01039
01040     UDECLARE_MESSAGE_MAP()
01041 };
01042
01043 UIMPLEMENT_DYNAMIC(UCvsPrefs_PORTS, UWidget)
01044
01045 UBEGIN_MESSAGE_MAP(UCvsPrefs_PORTS, UWidget)
01046     ON_UCOMMAND_RANGE(UCvsPrefs_PORTS::kcheckrhost, UCvsPrefs_PORTS::kcheckrsh, UCvsPrefs_PORTS::OnCheckPorts)
01047 UEND_MESSAGE_MAP()
01048
01049 UCvsPrefs_PORTS::UCvsPrefs_PORTS() : UWidget(::UEventGetWidID())
01050 {
01051     m_checkkserver = gCvsPrefs.KserverPort() != -1;
01052     m_checkpserver = gCvsPrefs.PserverPort() != -1;
01053     m_checkrhost = gCvsPrefs.RhostPort() != -1;
01054     m_checksname = gCvsPrefs.ServerName() != 0L;
01055     m_checkrsh = gCvsPrefs.RshName() != 0L;
01056
01057     m_portkserver = gCvsPrefs.KserverPort() != -1 ? gCvsPrefs.KserverPort() : 0;
01058     m_portpserver = gCvsPrefs.PserverPort() != -1 ? gCvsPrefs.PserverPort() : 0;
01059     m_portrhost = gCvsPrefs.RhostPort() != -1 ? gCvsPrefs.RhostPort() : 0;
01060     m_sname = gCvsPrefs.ServerName() == 0L ? "cvs" : gCvsPrefs.ServerName();
01061     m_rshname = gCvsPrefs.RshName() == 0L ? "ssh" : gCvsPrefs.RshName();
01062 }
01063
01064 void UCvsPrefs_PORTS::StoreValues(void)
01065 {
01066     gCvsPrefs.SetKserverPort(m_checkkserver ? m_portkserver : -1);
01067     gCvsPrefs.SetPserverPort(m_checkpserver ? m_portpserver : -1);
01068     gCvsPrefs.SetRhostPort(m_checkrhost ? m_portrhost : -1);
01069
01070     gCvsPrefs.SetServerName(m_checksname ? (const char *)m_sname : 0L);
01071     gCvsPrefs.SetRshName(m_checkrsh ? (const char *)m_rshname : 0L);
01072 }
01073
01074 int UCvsPrefs_PORTS::OnCheckPorts(int cmd)
01075 {
01076     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, cmd, 0L);
01077     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(cmd + (kportrhost-kcheckrhost), state), 0L);
01078
01079     if( cmd == kcheckrhost ) {
01080         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kchecksname, state), 0L);
01081         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kcheckrsh, state), 0L);
01082     }
01083
01084     return 0;
01085 }
01086
01087 void UCvsPrefs_PORTS::DoDataExchange(bool fill)
01088 {
01089     if(fill)
01090     {
01091         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kcheckkserver, m_checkkserver), 0L);
01092         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kcheckpserver, m_checkpserver), 0L);
01093         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kcheckrhost, m_checkrhost), 0L);
01094         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kchecksname, m_checksname), 0L);
01095         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kcheckrsh, m_checkrsh), 0L);
01096
01097         UEventSendMessage(GetWidID(), EV_SETINTEGER, UMAKEINT(kportkserver, m_portkserver), 0L);
01098         UEventSendMessage(GetWidID(), EV_SETINTEGER, UMAKEINT(kportpserver, m_portpserver), 0L);
01099         UEventSendMessage(GetWidID(), EV_SETINTEGER, UMAKEINT(kportrhost, m_portrhost), 0L);
01100         UEventSendMessage(GetWidID(), EV_SETTEXT, ksname, (void *)(const char *)m_sname);
01101         UEventSendMessage(GetWidID(), EV_SETTEXT, krshname, (void *)(const char *)m_rshname);
01102
01103         OnCheckPorts(kcheckrhost);
01104         OnCheckPorts(kcheckpserver);
01105         OnCheckPorts(kcheckkserver);
01106         OnCheckPorts(kchecksname);
01107         OnCheckPorts(kcheckrsh);
01108     }
01109     else
01110     {
01111         m_checkkserver = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kcheckkserver, 0L) != 0;
01112         m_portkserver = UEventSendMessage(GetWidID(), EV_GETINTEGER, kportkserver, 0L);
01113         m_checkpserver = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kcheckpserver, 0L) != 0;
01114         m_portpserver = UEventSendMessage(GetWidID(), EV_GETINTEGER, kportpserver, 0L);
01115         m_checkrhost = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kcheckrhost, 0L) != 0;
01116         m_portrhost = UEventSendMessage(GetWidID(), EV_GETINTEGER, kportrhost, 0L);
01117
01118         UEventSendMessage(GetWidID(), EV_GETTEXT, ksname, &m_sname);
01119         m_checksname = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kchecksname, 0L) != 0;
01120         UEventSendMessage(GetWidID(), EV_GETTEXT, krshname, &m_rshname);
01121         m_checkrsh = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kcheckrsh, 0L) != 0;
01122     }
01123 }
01124
01125 class UCvsPrefs_PROXY : public UWidget
01126 {
01127     UDECLARE_DYNAMIC(UCvsPrefs_PROXY)
01128 public:
01129     UCvsPrefs_PROXY();
01130     virtual ~UCvsPrefs_PROXY() {}
01131
01132     enum
01133     {
01134         kuseproxy = EV_COMMAND_START,   // 0
01135         kproxyhost,             // 1
01136         kproxyport              // 2
01137     };
01138
01139     virtual void DoDataExchange(bool fill);
01140
01141     void StoreValues(void);
01142
01143 protected:
01144     bool m_useproxy;
01145     UStr m_proxyhost;
01146     int m_proxyport;
01147
01148     ev_msg int OnUseProxy(void);
01149
01150     UDECLARE_MESSAGE_MAP()
01151 };
01152
01153 UIMPLEMENT_DYNAMIC(UCvsPrefs_PROXY, UWidget)
01154
01155 UBEGIN_MESSAGE_MAP(UCvsPrefs_PROXY, UWidget)
01156     ON_UCOMMAND(UCvsPrefs_PROXY::kuseproxy, UCvsPrefs_PROXY::OnUseProxy)
01157 UEND_MESSAGE_MAP()
01158
01159 UCvsPrefs_PROXY::UCvsPrefs_PROXY() : UWidget(::UEventGetWidID())
01160 {
01161     m_useproxy = gCvsPrefs.UseProxy();
01162     m_proxyport = gCvsPrefs.ProxyPort();
01163     m_proxyhost = gCvsPrefs.ProxyHost();
01164 }
01165
01166 void UCvsPrefs_PROXY::StoreValues(void)
01167 {
01168     gCvsPrefs.SetUseProxy(m_useproxy);
01169     gCvsPrefs.SetProxyHost(m_proxyhost);
01170     gCvsPrefs.SetProxyPort(m_proxyport);
01171 }
01172
01173 int UCvsPrefs_PROXY::OnUseProxy(void)
01174 {
01175     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kuseproxy, 0L);
01176     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kproxyhost, state), 0L);
01177     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kproxyport, state), 0L);
01178     return 0;
01179 }
01180
01181 void UCvsPrefs_PROXY::DoDataExchange(bool fill)
01182 {
01183     if(fill)
01184     {
01185         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kuseproxy, m_useproxy), 0L);
01186         UEventSendMessage(GetWidID(), EV_SETINTEGER, UMAKEINT(kproxyport, m_proxyport), 0L);
01187         UEventSendMessage(GetWidID(), EV_SETTEXT, kproxyhost, (void *)(const char *)m_proxyhost);
01188
01189         OnUseProxy();
01190     }
01191     else
01192     {
01193         CStr str;
01194         m_useproxy = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kuseproxy, 0L) != 0;
01195         UEventSendMessage(GetWidID(), EV_GETTEXT, kproxyhost, &m_proxyhost);
01196         m_proxyport = UEventSendMessage(GetWidID(), EV_GETINTEGER, kproxyport, 0L);
01197     }
01198 }
01199
01200 UIMPLEMENT_DYNAMIC(UCvsPrefs_GCVS, UWidget)
01201
01202 UBEGIN_MESSAGE_MAP(UCvsPrefs_GCVS, UWidget)
01203     ON_UCOMMAND_RANGE(UCvsPrefs_GCVS::kdiffBtn, UCvsPrefs_GCVS::kcvsBtn, UCvsPrefs_GCVS::OnPickProgram)
01204     ON_UCOMMAND(UCvsPrefs_GCVS::kuseAltCvs, UCvsPrefs_GCVS::OnUseAlternateCvs)
01205     ON_UCOMMAND(UCvsPrefs_GCVS::kconsoleFontBtn, UCvsPrefs_GCVS::OnSelectFont)
01206 UEND_MESSAGE_MAP()
01207
01208 UCvsPrefs_GCVS::UCvsPrefs_GCVS() : UWidget(::UEventGetWidID())
01209 {
01210     UStr cvsPath;
01211     m_diffApp     = gCvsPrefs.ExtDiff();
01212     m_viewerApp   = gCvsPrefs.Viewer();
01213     m_browserApp  = gCvsPrefs.Browser();
01214     m_helpApp     = gCvsPrefs.Helper();
01215     m_useAltCvs   = gCvsPrefs.UseAltCvs();
01216     m_cvsApp      = gCvsPrefs.WhichCvs(cvsPath);
01217     m_consoleFont = gCvsPrefs.ConsoleFont();
01218 }
01219
01220 bool UCvsPrefs_GCVS::checkCVS(const char *filename)
01221 {
01222     CvsArgs args;
01223     int status;
01224
01225     cvs_out("checking cvs\n");
01226
01227     args.add("-v");
01228
01229     status = testCVS(filename, args.Argc(), args.Argv());
01230     switch( status ) {
01231         case 0:
01232             break; // all OK
01233         case errNoCvsguiProtocol:
01234             cvs_err( "actual cvs binary has no support for GUI-pipes.\n");
01235             cvs_err( "Please select another binary and check the 'alternate cvs' settings!\n\n");
01236             break;
01237         default:
01238             break;
01239     }
01240
01241     return ( status == 0 ? true : false );
01242 }
01243 void UCvsPrefs_GCVS::StoreValues(void)
01244 {
01245     gCvsPrefs.SetExtDiff(m_diffApp);
01246     gCvsPrefs.SetViewer(m_viewerApp);
01247     gCvsPrefs.SetBrowser(m_browserApp);
01248     gCvsPrefs.SetHelper(m_helpApp);
01249     gCvsPrefs.SetUseAltCvs(m_useAltCvs);
01250
01251 #ifdef qUnix
01252     gCvsPrefs.SetConsoleFont(m_consoleFont);
01253
01254     // use selected cvs only if it supports '-cvsgui'
01255     if( m_useAltCvs ) {
01256         if( checkCVS( m_cvsApp ) ) {
01257             gCvsPrefs.SetWhichCvs( m_cvsApp );
01258         }
01259     } else {
01260         CStr cvscmd;
01261
01262         // check if actual cvs binary supports cvsgui protocol
01263         checkCVS( gCvsPrefs.WhichCvs(cvscmd, m_useAltCvs) );
01264     }
01265 #else
01266     gCvsPrefs.SetWhichCvs(m_cvsApp);
01267 #endif
01268 }
01269
01270 #ifdef qGTK  //{ GTK - Part
01271 static CStr gtksel;
01272 static bool gtkModalLoop;
01273
01274 static gint gtkcancel(GtkWidget *widget, gpointer data)
01275 {
01276     gtkModalLoop = false;
01277     return TRUE;
01278 }
01279
01280 static void font_ok_sel (GtkWidget *w, gpointer data)
01281 {
01282     gtkModalLoop = false;
01283     gtksel = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG (data));
01284 }
01285
01286 static void font_cancel_sel (GtkWidget *w, gpointer data)
01287 {
01288     gtkModalLoop = false;
01289 }
01290
01291 int UCvsPrefs_GCVS::OnSelectFont(void)
01292 {
01293     /* Create a new file selection widget */
01294     GtkWidget* fontw = gtk_font_selection_dialog_new ("choice console font");
01295
01296     gtk_signal_connect(GTK_OBJECT(fontw), "delete_event",
01297                        GTK_SIGNAL_FUNC(gtkcancel), 0L);
01298
01299     /* Connect the ok_button to file_ok_sel function */
01300     gtk_signal_connect(GTK_OBJECT (GTK_FONT_SELECTION_DIALOG (fontw)->ok_button),
01301                       "clicked", (GtkSignalFunc) font_ok_sel, fontw);
01302     gtk_signal_connect(GTK_OBJECT (GTK_FONT_SELECTION_DIALOG (fontw)->cancel_button),
01303                       "clicked", (GtkSignalFunc) font_cancel_sel, fontw);
01304
01305     gtkModalLoop = true;
01306     gtksel = "";
01307     gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG (fontw), m_consoleFont);
01308     gtk_widget_show(fontw);
01309     gtk_grab_add(fontw);
01310
01311     while( gtkModalLoop )
01312     {
01313         gtk_main_iteration_do(TRUE);
01314     }
01315
01316     gtk_grab_remove (fontw);
01317
01318     gtk_widget_destroy(fontw);
01319
01320     if( !gtksel.empty() )
01321     {
01322         UEventSendMessage(GetWidID(), EV_SETTEXT, kconsoleFont, (void*)(const char*)gtksel);
01323     }
01324
01325     return 0;
01326 }
01327 #endif /* qGTK */
01328
01329 int UCvsPrefs_GCVS::OnPickProgram(int cmd)
01330 {
01331     UStr appPath;
01332     UEventSendMessage(GetWidID(), EV_GETTEXT, cmd - kdiffBtn + kdiffApp, &appPath);
01333
01334     MultiFiles mf;
01335     if( !appPath.empty() )
01336     {
01337         CStr uppath;
01338         CStr file;
01339
01340         if( SplitPath(appPath, uppath, file) )
01341         {
01342             mf.newdir(uppath);
01343             mf.newfile(file);
01344         }
01345     }
01346
01347     if( !BrowserGetMultiFiles("Select the application", mf, true, kSelectExecutable) )
01348         return 0;
01349
01350     CvsArgs args(false);
01351     const char* dir = (*mf.begin()).add(args);
01352     char* const* argv = args.Argv();
01353     CStr fullpath;
01354     fullpath = dir;
01355     if( !fullpath.endsWith(kPathDelimiter) )
01356         fullpath << kPathDelimiter;
01357
01358     fullpath << argv[0];
01359
01360 #ifdef qUnix
01361     // use selected cvs only if it supports '-cvsgui'
01362     if( ( cmd == kcvsBtn ) && !checkCVS( fullpath.c_str() ) )
01363         return 0;
01364 #endif
01365
01366     UEventSendMessage(GetWidID(), EV_SETTEXT, cmd - kdiffBtn + kdiffApp, (void*)(const char*)fullpath);
01367
01368     return 0;
01369 }
01370
01371 int UCvsPrefs_GCVS::OnUseAlternateCvs(void)
01372 {
01373     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kuseAltCvs, 0L);
01374     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kcvsApp, state), 0L);
01375     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kcvsBtn, state), 0L);
01376     return 0;
01377 }
01378
01379 void UCvsPrefs_GCVS::DoDataExchange(bool fill)
01380 {
01381     if(fill)
01382     {
01383         UEventSendMessage(GetWidID(), EV_SETTEXT, kdiffApp, (void *)(const char *)m_diffApp);
01384         UEventSendMessage(GetWidID(), EV_SETTEXT, kviewerApp, (void *)(const char *)m_viewerApp);
01385         UEventSendMessage(GetWidID(), EV_SETTEXT, kbrowserApp, (void *)(const char *)m_browserApp);
01386         UEventSendMessage(GetWidID(), EV_SETTEXT, khelpApp, (void *)(const char *)m_helpApp);
01387         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kuseAltCvs, m_useAltCvs), 0L);
01388         UEventSendMessage(GetWidID(), EV_SETTEXT, kconsoleFont, (void *)(const char *)m_consoleFont);
01389         UEventSendMessage(GetWidID(), EV_SETTEXT, kcvsApp, (void *)(const char *)m_cvsApp);
01390         OnUseAlternateCvs();
01391     }
01392     else
01393     {
01394         UEventSendMessage(GetWidID(), EV_GETTEXT, kdiffApp, &m_diffApp);
01395         UEventSendMessage(GetWidID(), EV_GETTEXT, kviewerApp, &m_viewerApp);
01396         UEventSendMessage(GetWidID(), EV_GETTEXT, kbrowserApp, &m_browserApp);
01397         UEventSendMessage(GetWidID(), EV_GETTEXT, khelpApp, &m_helpApp);
01398         UEventSendMessage(GetWidID(), EV_GETTEXT, kconsoleFont, &m_consoleFont);
01399         m_useAltCvs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kuseAltCvs, 0L) != 0;
01400         UEventSendMessage(GetWidID(), EV_GETTEXT, kcvsApp, &m_cvsApp);
01401     }
01402 }
01403
01404 #endif //} qUnix
01405
01406 #if qMacCvsPP   //{ Mac-Part
01407
01408 class UCvsPrefs_CVSROOT : public UWidget
01409 {
01410     UDECLARE_DYNAMIC(UCvsPrefs_CVSROOT)
01411 public:
01412     UCvsPrefs_CVSROOT();
01413     virtual ~UCvsPrefs_CVSROOT() {}
01414
01415     enum
01416     {
01417         kAuthenPopup = EV_COMMAND_START + 40,   // 40
01418         kPath,              // 41
01419         kHost,              // 42
01420         kUser,              // 43
01421         kRootPopup,         // 44
01422         kRootStat,          // 45
01423         kCvsVers,           // 46
01424         kAuthenSettings,    // 47
01425         kAuthenDesc         // 48
01426     };
01427
01428     virtual void DoDataExchange(bool fill);
01429
01430 protected:
01431     UStr m_cvsroot;
01432     AuthenKind m_kind;
01433
01434     ev_msg void OnAuthenPopup(int pos, const char *txt);
01435     ev_msg void OnRootPopup(int pos, const char *txt);
01436     ev_msg void OnEditChange(int cmd);
01437     ev_msg int OnAuthenSettings(void);
01438     ev_msg void OnDestroy(void);
01439
01440     UDECLARE_MESSAGE_MAP()
01441 };
01442
01443 UIMPLEMENT_DYNAMIC(UCvsPrefs_CVSROOT, UWidget)
01444
01445 UBEGIN_MESSAGE_MAP(UCvsPrefs_CVSROOT, UWidget)
01446     ON_COMBO_SEL(kAuthenPopup, UCvsPrefs_CVSROOT::OnAuthenPopup)
01447     ON_COMBO_SEL(kRootPopup, UCvsPrefs_CVSROOT::OnRootPopup)
01448     ON_EDITCHANGE_RANGE(kPath, kUser, UCvsPrefs_CVSROOT::OnEditChange)
01449     ON_UCOMMAND(kAuthenSettings, UCvsPrefs_CVSROOT::OnAuthenSettings)
01450     ON_UDESTROY(UCvsPrefs_CVSROOT)
01451 UEND_MESSAGE_MAP()
01452
01453 UCvsPrefs_CVSROOT::UCvsPrefs_CVSROOT() : UWidget(::UEventGetWidID())
01454 {
01455 }
01456
01457 void UCvsPrefs_CVSROOT::OnAuthenPopup(int pos, const char *txt)
01458 {
01459     m_kind = Authen::numToKind(pos);
01460     AuthenModel *model = AuthenModel::GetInstance(m_kind);
01461     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kHost, model->HasHost()), 0L);
01462     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kUser, model->HasUser()), 0L);
01463     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kAuthenSettings, model->HasSettings()), 0L);
01464
01465     if(!model->HasHost())
01466         UEventSendMessage(GetWidID(), EV_SETTEXT, kHost, (void *)"");
01467     if(!model->HasUser())
01468         UEventSendMessage(GetWidID(), EV_SETTEXT, kUser, (void *)"");
01469     UStr desc;
01470     model->GetSettingsDesc(desc);
01471     UEventSendMessage(GetWidID(), EV_SETTEXT, kAuthenDesc, (void *)(const char *)desc);
01472 }
01473
01474 void UCvsPrefs_CVSROOT::OnRootPopup(int pos, const char *txt)
01475 {
01476     m_cvsroot = txt;
01477     UEventSendMessage(GetWidID(), EV_SETTEXT, kRootStat, (void *)txt);
01478
01479     UStr theMethod, theUser, theHost, thePath;
01480
01481     if(Authen::parse_cvsroot(txt, theMethod, theUser, theHost, thePath))
01482     {
01483         UEventSendMessage(GetWidID(), EV_SETTEXT, kPath, (void *)(const char *)thePath);
01484         UEventSendMessage(GetWidID(), EV_SETTEXT, kHost, (void *)(const char *)theHost);
01485         UEventSendMessage(GetWidID(), EV_SETTEXT, kUser, (void *)(const char *)theUser);
01486         if (theMethod.length () > 0)
01487             UEventSendMessage(GetWidID(), EV_COMBO_SETSEL,
01488                               UMAKEINT(kAuthenPopup, Authen::kindToNum(Authen::tokenToKind (theMethod.c_str ()))), 0L);
01489     }
01490 }
01491
01492 void UCvsPrefs_CVSROOT::OnEditChange(int cmd)
01493 {
01494     UStr theUser, theHost, thePath;
01495
01496     UEventSendMessage(GetWidID(), EV_GETTEXT, kPath, &thePath);
01497     UEventSendMessage(GetWidID(), EV_GETTEXT, kHost, &theHost);
01498     UEventSendMessage(GetWidID(), EV_GETTEXT, kUser, &theUser);
01499
01500     m_cvsroot = "";
01501     AuthenModel *model = AuthenModel::GetInstance(m_kind);
01502     if(model->HasUser())
01503         m_cvsroot << theUser;
01504     if(model->HasHost())
01505     {
01506         m_cvsroot << '@';
01507         m_cvsroot << theHost;
01508     }
01509     if(model->HasUser() || model->HasHost())
01510         m_cvsroot << ':';
01511     m_cvsroot << thePath;
01512     UEventSendMessage(GetWidID(), EV_SETTEXT, kRootStat, (void *)(const char *)m_cvsroot);
01513 }
01514
01515 int UCvsPrefs_CVSROOT::OnAuthenSettings(void)
01516 {
01517     AuthenModel *model = AuthenModel::GetInstance(m_kind);
01518     model->DoSettings();
01519     UStr desc;
01520     model->GetSettingsDesc(desc);
01521     UEventSendMessage(GetWidID(), EV_SETTEXT, kAuthenDesc, (void *)(const char *)desc);
01522     return 0;
01523 }
01524
01525 void UCvsPrefs_CVSROOT::OnDestroy(void)
01526 {
01527     delete this;
01528 }
01529
01530 void UCvsPrefs_CVSROOT::DoDataExchange(bool fill)
01531 {
01532     if(fill)
01533     {
01534         if(!gCvsPrefs.empty())
01535             m_cvsroot = (const char *)gCvsPrefs;
01536         m_kind = gAuthen.kind();
01537
01538         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kAuthenPopup, 0L);
01539         std::vector<AuthenModel *> & allAuthen = AuthenModel::GetAllInstances();
01540         std::vector<AuthenModel *>::iterator i;
01541         for(i = allAuthen.begin(); i != allAuthen.end(); ++i)
01542         {
01543             UEventSendMessage(GetWidID(), EV_COMBO_APPEND,
01544                               kAuthenPopup, (void *)(*i)->GetToken());
01545         }
01546
01547         AuthenModel *model = AuthenModel::GetInstance(m_kind);
01548         UEventSendMessage(GetWidID(), EV_COMBO_SETSEL,
01549                           UMAKEINT(kAuthenPopup, Authen::kindToNum(model->GetKind())), 0L);
01550
01551         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kRootPopup, 0L);
01552
01553         std::vector<CStr>::const_iterator haley;
01554         const std::vector<CStr> & alex = gOldCvsroots.GetList();
01555         for(haley = alex.begin(); haley != alex.end(); ++haley)
01556         {
01557             if(!(*haley).empty())
01558                 UEventSendMessage(GetWidID(), EV_COMBO_APPEND,
01559                                   kRootPopup, (void *)(*haley).c_str());
01560         }
01561
01562         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCvsVers, 1), 0L);
01563
01564         UStr tmp(m_cvsroot);
01565         OnRootPopup(0, tmp);
01566         OnAuthenPopup(Authen::kindToNum(m_kind), 0L);
01567
01568         UEventSendMessage(GetWidID(), EV_CHGFOCUS, kPath, 0L);
01569     }
01570     else
01571     {
01572         gAuthen.setkind(m_kind);
01573
01574         UStr theUser, theHost, thePath;
01575
01576         UEventSendMessage(GetWidID(), EV_GETTEXT, kPath, &thePath);
01577         UEventSendMessage(GetWidID(), EV_GETTEXT, kHost, &theHost);
01578         UEventSendMessage(GetWidID(), EV_GETTEXT, kUser, &theUser);
01579
01580         UStr root;
01581         if(m_kind != local)
01582         {
01583             root << theUser;
01584             root << '@';
01585             root << theHost;
01586             root << ':';
01587             root << thePath;
01588         }
01589         else
01590             root = thePath;
01591
01592         gCvsPrefs = root;
01593
01594         if( !root.empty() )
01595             gOldCvsroots.Insert(root);
01596     }
01597 }
01598
01599 static void DoDataExchange_Cvsroot(UCvsPrefs_CVSROOT *handler, bool putValue)
01600 {
01601     handler->DoDataExchange(putValue);
01602 }
01603 #endif //} qMacCvsPP
01604
01606 void CompatGetPrefs(void)
01607 {
01608     bool userHitOK = false;
01609
01610     // Store current CVSROOT
01611 #if INTERNAL_AUTHEN
01612     const UStr prevCvsroot((const char*)gCvsPrefs);
01613     const AuthenKind prevKind = gAuthen.kind();
01614 #endif /* INTERNAL_AUTHEN */
01615
01616 #ifdef WIN32   //{ WIN32
01617     CHHelpPropertySheet pages("WinCvs Preferences");
01618     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
01619
01620     CGetPrefs_GLOBALS page1;
01621     CGetPrefs_CVS page2;
01622     CGetPrefs_WINCVS page3;
01623     CGetPrefs_CVSCMD_DIALOGS page4;
01624
01625     pages.AddPage(&page1);
01626     pages.AddPage(&page2);
01627     pages.AddPage(&page3);
01628     pages.AddPage(&page4);
01629
01630     if( pages.DoModal() == IDOK )
01631     {
01632         page1.StoreValues();
01633         page2.StoreValues();
01634         page3.StoreValues();
01635         page4.StoreValues();
01636
01637         userHitOK = true;
01638     }
01639 #endif //} WIN32
01640
01641 #ifdef qMacCvsPP  //{ qMacCvsPP
01642     MacBinMaps maps;
01643     maps.LoadDefaults();
01644     CMacBinTable::SetCurrentMap(&maps);
01645
01646     StDialogHandler theHandler(dlg_Prefs, LCommander::GetTopCommander());
01647     LWindow *theDialog = theHandler.GetDialog();
01648     ThrowIfNil_(theDialog);
01649     static UInt16 sRuntimePanel = 1;
01650
01651     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01652         (theDialog->FindPaneByID(item_MultiViewPrefs));
01653     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01654
01655     UCvsPrefs_CVSROOT *handler = new UCvsPrefs_CVSROOT;
01656     ThrowIfNil_(handler);
01657
01658     UEventSendMessage(handler->GetWidID(), EV_INIT_WIDGET, 0, theDialog);
01659
01660     multiView->SwitchToPanel(5);
01661     DoDataExchange_Fonts(theDialog, true);
01662     multiView->SwitchToPanel(4);
01663     DoDataExchange_BinFiles(theDialog, maps, true);
01664     multiView->SwitchToPanel(3);
01665     DoDataExchange_TextFiles(theDialog, true);
01666     LPushButton *diffbtn = dynamic_cast<LPushButton*>(theDialog->FindPaneByID(item_BrowseExtDiff));
01667     diffbtn->AddListener(&theHandler);
01668     multiView->SwitchToPanel(2);
01669     DoDataExchange_Globals(theDialog, true);
01670     multiView->SwitchToPanel(1);
01671     DoDataExchange_Cvsroot(handler, true);
01672
01673     groupView->SetValue(sRuntimePanel);
01674     theDialog->Show();
01675     MessageT hitMessage;
01676     SInt32    lastDiffToolValue(0);
01677     while (true)
01678     {       // Let DialogHandler process events
01679         hitMessage = theHandler.DoDialog();
01680
01681         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01682             break;
01683
01684     HandleHitMessage_DiffTool(theDialog, hitMessage);
01685     }
01686     theDialog->Hide();
01687     sRuntimePanel = groupView->GetValue();
01688
01689     if(hitMessage == msg_OK)
01690     {
01691         userHitOK = true;
01692
01693         multiView->SwitchToPanel(1);
01694         DoDataExchange_Cvsroot(handler, false);
01695         multiView->SwitchToPanel(2);
01696         DoDataExchange_Globals(theDialog, false);
01697         multiView->SwitchToPanel(3);
01698         DoDataExchange_TextFiles(theDialog, false);
01699         multiView->SwitchToPanel(4);
01700         DoDataExchange_BinFiles(theDialog, maps, false);
01701         multiView->SwitchToPanel(5);
01702         DoDataExchange_Fonts(theDialog, false);
01703
01704         maps.SaveDefaults();
01705     }
01706 #endif //} qMacCvsPP
01707
01708 #if qUnix  //{ Unix-Part
01709     void *wid = UCreate_gcvs_Settings();
01710
01711     UCvsPrefs_MAIN *dlg = new UCvsPrefs_MAIN();
01712     UCvsPrefs_CVSROOT *tab1 = new UCvsPrefs_CVSROOT();
01713     UCvsPrefs_GLOBALS *tab2 = new UCvsPrefs_GLOBALS();
01714     UCvsPrefs_PORTS *tab3 = new UCvsPrefs_PORTS();
01715     UCvsPrefs_PROXY *tab4 = new UCvsPrefs_PROXY();
01716     UCvsPrefs_GCVS *tab5 = new UCvsPrefs_GCVS();
01717     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01718     dlg->AddPage(tab1, UCvsPrefs_MAIN::kTabGeneral, 0);
01719     dlg->AddPage(tab2, UCvsPrefs_MAIN::kTabGeneral, 1);
01720     dlg->AddPage(tab3, UCvsPrefs_MAIN::kTabGeneral, 2);
01721     dlg->AddPage(tab4, UCvsPrefs_MAIN::kTabGeneral, 3);
01722     dlg->AddPage(tab5, UCvsPrefs_MAIN::kTabGeneral, 4);
01723
01724     if(dlg->DoModal())
01725     {
01726         tab1->StoreValues();
01727         tab2->StoreValues();
01728         tab3->StoreValues();
01729         tab4->StoreValues();
01730         tab5->StoreValues();
01731
01732         userHitOK = true;
01733     }
01734     delete dlg;
01735 #endif //} qUnix
01736
01737     if( userHitOK
01738 #if INTERNAL_AUTHEN
01739         && !gCvsPrefs.empty()
01740 #endif /* INTERNAL_AUTHEN */
01741         )
01742     {
01743 #if INTERNAL_AUTHEN
01744         if( prevCvsroot != (const char*)gCvsPrefs || prevKind != gAuthen.kind() )
01745         {
01746             cvs_out("NEW CVSROOT: %s (%s)\n", (const char*)gCvsPrefs, gAuthen.kindstr());
01747             cvs_err("CVSROOT change will only take effect when commands are run from a non-CVS folder.\n"
01748                 "To change the CVSROOT of an existing sandbox please use the ChangeRoot macro.\n");
01749         }
01750         else
01751         {
01752             cvs_out("CVSROOT: %s (%s)\n", (const char*)gCvsPrefs, gAuthen.kindstr());
01753         }
01754 #endif /* INTERNAL_AUTHEN */
01755
01756         gCvsPrefs.save();
01757     }
01758 }
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJTreeCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJTreeCtrl.cpp

Go to the documentation of this file.
00001 // CJTreeCtrl.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the CTreeView articles from http://www.codeguru.com/treeview
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:49 $
00011  * $Revision: 1.1.1.3 $
00012  * $Archive: /CodeJock/CJLibrary/CJTreeCtrl.cpp $
00013  *
00014  * $History: CJTreeCtrl.cpp $
00015  *
00016  * *****************  Version 6  *****************
00017  * User: Kirk Stowell Date: 10/30/99   Time: 1:54p
00018  * Updated in $/CodeJock/CJLibrary
00019  * Overrode OnEraseBkgnd(...) to handle flicker free drawing.
00020  *
00021  * *****************  Version 5  *****************
00022  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00023  * Updated in $/CodeJock/CJLibrary
00024  * 21. Fixed bug with CCJTreeCtrl where searching for a string in the tree
00025  * and this string is currently selected, the method will return NULL.
00026  * Fixed bug where tree control item font was changed to a smaller font
00027  * than the previous font, part of the old font would still show.
00028  *
00029  * *****************  Version 4  *****************
00030  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00031  * Updated in $/CodeJock/CJLibrary
00032  * Fixed potential resource and memory leak problems.
00033  *
00034  * *****************  Version 3  *****************
00035  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00036  * Updated in $/CodeJockey/CJLibrary
00037  *
00038  * *****************  Version 2  *****************
00039  * User: Kirk Stowell Date: 6/23/99    Time: 12:06a
00040  * Updated in $/CodeJockey/CJLibrary
00041  *
00042  * *****************  Version 1  *****************
00043  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00044  * Created in $/CodeJockey/CJLibrary
00045  * Initial creation.
00046  *
00047  ***************************************************************************/
00049
00050 #include "stdafx.h"
00051 #include "CJResource.h"
00052 #include "CJTreeCtrl.h"
00053
00054 #ifdef _DEBUG
00055 #define new DEBUG_NEW
00056 #undef THIS_FILE
00057 static char THIS_FILE[] = __FILE__;
00058 #endif
00059
00061 // CCJTreeCtrl
00062
00063 CCJTreeCtrl::CCJTreeCtrl()
00064 {
00065     m_hItemFirstSel = NULL;
00066     m_dwDragStart   = NULL;
00067     m_bMultiSelect = FALSE;
00068 }
00069
00070 CCJTreeCtrl::~CCJTreeCtrl()
00071 {
00072 }
00073
00074 IMPLEMENT_DYNAMIC(CCJTreeCtrl, CTreeCtrl)
00075
00076 BEGIN_MESSAGE_MAP(CCJTreeCtrl, CTreeCtrl)
00077     //{{AFX_MSG_MAP(CCJTreeCtrl)
00078     ON_WM_PAINT()
00079     ON_WM_LBUTTONDOWN()
00080     ON_WM_ERASEBKGND()
00081     //}}AFX_MSG_MAP
00082 END_MESSAGE_MAP()
00083
00085 // CCJTreeCtrl message handlers
00086
00087 // Taken from: Get next item in outline by Zafir Anjum.
00088 // http://www.codeguru.com/treeview/get_next.shtml
00089
00090 // GetNextItem  - Get next item as if outline was completely expanded
00091 // Returns      - The item immediately below the reference item
00092 // hItem        - The reference item
00093 HTREEITEM CCJTreeCtrl::GetNextItem( HTREEITEM hItem )
00094 {
00095     HTREEITEM hti = NULL;
00096
00097     if (ItemHasChildren(hItem))
00098         hti = GetChildItem(hItem);
00099
00100     if (hti == NULL) {
00101         while ((hti = GetNextSiblingItem(hItem)) == NULL) {
00102             if ((hItem = GetParentItem(hItem)) == NULL)
00103                 return NULL;
00104         }
00105     }
00106     return hti;
00107 }
00108
00109 // Taken from: Get previous item in outline by Zafir Anjum.
00110 // http://www.codeguru.com/treeview/get_prev.shtml
00111
00112 // GetPrevItem  - Get previous item as if outline was completely expanded
00113 // Returns      - The item immediately above the reference item
00114 // hItem        - The reference item
00115 HTREEITEM CCJTreeCtrl::GetPrevItem( HTREEITEM hItem )
00116 {
00117     HTREEITEM       hti;
00118
00119     hti = GetPrevSiblingItem(hItem);
00120     if( hti == NULL )
00121         hti = GetParentItem(hItem);
00122     else
00123         hti = GetLastItem(hti);
00124     return hti;
00125 }
00126
00127 // Taken from: Get last item in branch by Zafir Anjum.
00128 // http://www.codeguru.com/treeview/get_last.shtml
00129
00130 // GetLastItem  - Gets last item in the branch
00131 // Returns      - Last item
00132 // hItem        - Node identifying the branch. NULL will
00133 //                return the last item in outine
00134 HTREEITEM CCJTreeCtrl::GetLastItem( HTREEITEM hItem )
00135 {
00136     //  Temporary used variable
00137     HTREEITEM   htiNext;
00138
00139     if( hItem == NULL ) {
00140         // Get the last item at the top level
00141         hItem = GetRootItem();
00142     }
00143
00144     while( ItemHasChildren( hItem ) != NULL ) {
00145         //  Find the last child of hItem
00146         htiNext = GetChildItem( hItem );
00147         while( htiNext != NULL ) {
00148             hItem = htiNext;
00149             htiNext = GetNextSiblingItem( htiNext );
00150         }
00151     }
00152
00153     return hItem;
00154
00155 }
00156
00157 // Taken from: Finding an item by Zafir Anjum.
00158 // http://www.codeguru.com/treeview/find_item.shtml
00159
00160 // FindItem     - Finds an item that contains the search string
00161 // Returns      - Handle to the item or NULL
00162 // str          - String to search for
00163 // bCaseSensitive   - Should the search be case sensitive
00164 // bDownDir     - Search direction - TRUE for down
00165 // bWholeWord       - True if search should match whole words
00166 // hItem        - Item to start searching from. NULL for
00167 //          - currently selected item
00168 HTREEITEM CCJTreeCtrl::FindItem(LPCTSTR lpszSearch,
00169                 BOOL bCaseSensitive /*= FALSE*/,
00170                 BOOL bDownDir /*= TRUE*/,
00171                 BOOL bWholeWord /*= FALSE*/,
00172                 HTREEITEM hItem /*= NULL*/)
00173 {
00174     CString str = lpszSearch;
00175
00176     int lenSearchStr = str.GetLength();
00177     if( lenSearchStr == 0 ) return NULL;
00178
00179     // For the first pass, set the current item equal to the selection
00180     HTREEITEM htiSel = hItem ? hItem : GetSelectedItem();
00181     HTREEITEM htiCur = htiSel;
00182     CString sSearch = str;
00183
00184     // make sure it ends if we started with no selection
00185     if(( htiCur == NULL ) && ( htiSel != NULL ))
00186     {
00187         if( bDownDir )
00188             htiCur = GetRootItem();
00189         else
00190             htiCur = GetLastItem( NULL );
00191     }
00192
00193     if( !bCaseSensitive )
00194         sSearch.MakeLower();
00195
00196     // For the first pass only, we check to see if it
00197     // is the item we're looking for.
00198     BOOL bFirstPass = TRUE;
00199
00200     while( htiCur && (htiCur != htiSel || bFirstPass) )
00201     {
00202         bFirstPass = FALSE;
00203
00204         CString sItemText = GetItemText( htiCur );
00205         if( !bCaseSensitive )
00206             sItemText.MakeLower();
00207
00208         int n;
00209         while( (n = sItemText.Find( sSearch )) != -1 )
00210         {
00211             // Search string found
00212             if( bWholeWord )
00213             {
00214                 // Check preceding char
00215                 if( n != 0 )
00216                 {
00217                     if( isalpha(sItemText[n-1]) ||
00218                             sItemText[n-1] == '_' ){
00219                         // Not whole word
00220                         sItemText = sItemText.Right(
00221                             sItemText.GetLength() - n -
00222                             lenSearchStr );
00223                         continue;
00224                     }
00225                 }
00226
00227                 // Check succeeding char
00228                 if( sItemText.GetLength() > n + lenSearchStr
00229                     && ( isalpha(sItemText[n+lenSearchStr]) ||
00230                     sItemText[n+lenSearchStr] == '_' ) )
00231                 {
00232                     // Not whole word
00233                     sItemText = sItemText.Right( sItemText.GetLength()
00234                             - n - sSearch.GetLength() );
00235                     continue;
00236                 }
00237             }
00238
00239             if( IsFindValid( htiCur ) )
00240                 return htiCur;
00241             else break;
00242         }
00243
00244
00245         htiCur = bDownDir ? GetNextItem( htiCur ) : GetPrevItem( htiCur );
00246         if( htiCur == NULL )
00247         {
00248             if( bDownDir )  htiCur = GetRootItem();
00249             else htiCur = GetLastItem( NULL );
00250         }
00251     }
00252     return NULL;
00253 }
00254
00255 // Taken from: Finding an item by Zafir Anjum.
00256 // http://www.codeguru.com/treeview/find_item.shtml
00257
00258 // IsFindValid  - Virtual function used by FindItem to allow this
00259 //        function to filter the result of FindItem
00260 // Returns  - True if item matches the criteria
00261 // Arg      - Handle of the item
00262 BOOL CCJTreeCtrl::IsFindValid( HTREEITEM )
00263 {
00264     return TRUE;
00265 }
00266
00267 BOOL CCJTreeCtrl::PreCreateWindow(CREATESTRUCT& cs)
00268 {
00269     if( !CTreeCtrl::PreCreateWindow(cs))
00270         return FALSE;
00271
00272     cs.style |= TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS;
00273
00274     return TRUE;
00275 }
00276
00277 // Taken from: Setting color and font attribute for individual items by Zafir Anjum.
00278 // http://www.codeguru.com/treeview/item_color_font.shtml
00279
00280 void CCJTreeCtrl::SetItemFont(HTREEITEM hItem, LOGFONT& logfont)
00281 {
00282     Color_Font cf;
00283     if( !m_mapColorFont.Lookup( hItem, cf ) )
00284         cf.color = (COLORREF)-1;
00285     cf.logfont = logfont;
00286     m_mapColorFont[hItem] = cf;
00287 }
00288
00289 void CCJTreeCtrl::SetItemBold(HTREEITEM hItem, BOOL bBold)
00290 {
00291     SetItemState( hItem, bBold ? TVIS_BOLD: 0, TVIS_BOLD );
00292 }
00293
00294 void CCJTreeCtrl::SetItemColor(HTREEITEM hItem, COLORREF color)
00295 {
00296     Color_Font cf;
00297     if( !m_mapColorFont.Lookup( hItem, cf ) )
00298         cf.logfont.lfFaceName[0] = '\0';
00299     cf.color = color;
00300     m_mapColorFont[hItem] = cf;
00301 }
00302
00303 BOOL CCJTreeCtrl::GetItemFont(HTREEITEM hItem, LOGFONT * plogfont)
00304 {
00305     Color_Font cf;
00306     if( !m_mapColorFont.Lookup( hItem, cf ) )
00307         return FALSE;
00308     if( cf.logfont.lfFaceName[0] == '\0' )
00309         return FALSE;
00310     *plogfont = cf.logfont;
00311     return TRUE;
00312
00313 }
00314
00315 BOOL CCJTreeCtrl::GetItemBold(HTREEITEM hItem)
00316 {
00317     return GetItemState( hItem, TVIS_BOLD ) & TVIS_BOLD;
00318 }
00319
00320 COLORREF CCJTreeCtrl::GetItemColor(HTREEITEM hItem)
00321 {
00322     // Returns (COLORREF)-1 if color was not set
00323     Color_Font cf;
00324     if( !m_mapColorFont.Lookup( hItem, cf ) )
00325         return (COLORREF)-1;
00326     return cf.color;
00327
00328 }
00329
00330 void CCJTreeCtrl::OnPaint()
00331 {
00332     CPaintDC dc(this);
00333
00334     // Create a memory DC compatible with the paint DC
00335     CDC memDC;
00336     memDC.CreateCompatibleDC( &dc );
00337
00338     CRect rcClip, rcClient;
00339     dc.GetClipBox( &rcClip );
00340     GetClientRect(&rcClient);
00341
00342     // Select a compatible bitmap into the memory DC
00343     CBitmap bitmap;
00344     bitmap.CreateCompatibleBitmap( &dc, rcClient.Width(), rcClient.Height() );
00345     CBitmap* pOldBitmap = memDC.SelectObject( &bitmap );
00346
00347     // Set clip region to be same as that in paint DC
00348     CRgn rgn;
00349     rgn.CreateRectRgnIndirect( &rcClip );
00350     memDC.SelectClipRgn(&rgn);
00351     rgn.DeleteObject();
00352
00353     // First let the control do its default drawing.
00354     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00355
00356     HTREEITEM hItem = GetFirstVisibleItem();
00357
00358     int n = GetVisibleCount()+1;
00359     while( hItem && n--)
00360     {
00361         CRect rect;
00362
00363         // Do not meddle with selected items or drop highlighted items
00364         UINT selflag = TVIS_DROPHILITED | TVIS_SELECTED;
00365         Color_Font cf;
00366
00367         if ( !(GetItemState( hItem, selflag ) & selflag )
00368             && m_mapColorFont.Lookup( hItem, cf ))
00369         {
00370             CFont *pFontDC;
00371             CFont fontDC;
00372             LOGFONT logfont;
00373
00374             if( cf.logfont.lfFaceName[0] != '\0' )
00375             {
00376                 logfont = cf.logfont;
00377             }
00378             else
00379             {
00380                 // No font specified, so use window font
00381                 CFont *pFont = GetFont();
00382                 pFont->GetLogFont( &logfont );
00383             }
00384
00385             CString sItem = GetItemText( hItem );
00386             GetItemRect( hItem, &rect, TRUE );
00387
00388             // cover up over old font.
00389             CFont* pOldFont = memDC.SelectObject(GetFont());
00390             memDC.SetTextColor(::GetSysColor( COLOR_WINDOW ));
00391             memDC.SetBkColor( GetSysColor( COLOR_WINDOW ) );
00392             memDC.TextOut( rect.left+2, rect.top+1, sItem );
00393             memDC.SelectObject(pOldFont);
00394
00395             if( GetItemBold( hItem ) )
00396                 logfont.lfWeight = 700;
00397             fontDC.CreateFontIndirect( &logfont );
00398             pFontDC = memDC.SelectObject( &fontDC );
00399
00400             if( cf.color != (COLORREF)-1 )
00401                 memDC.SetTextColor( cf.color );
00402
00403             memDC.SetBkColor( GetSysColor( COLOR_WINDOW ) );
00404             memDC.TextOut( rect.left+2, rect.top+1, sItem );
00405
00406             memDC.SelectObject( pFontDC );
00407
00408             // fix potential resource leak - KStowell - 10-22-99.
00409             fontDC.DeleteObject();
00410         }
00411         hItem = GetNextVisibleItem( hItem );
00412     }
00413
00414
00415     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00416         rcClip.left, rcClip.top, SRCCOPY );
00417
00418     // fix potential resource leak - KStowell - 10-21-99
00419     memDC.SelectObject( pOldBitmap );
00420     memDC.DeleteDC();
00421     bitmap.DeleteObject();
00422 }
00423
00424 // Taken from: Allowing multiple selection by Zafir Anjum.
00425 // http://www.codeguru.com/treeview/multiple_sel.shtml
00426
00427 void CCJTreeCtrl::OnLButtonDown(UINT nFlags, CPoint point)
00428 {
00429     if(m_bMultiSelect)
00430     {
00431         // Set focus to control if key strokes are needed.
00432         // Focus is not automatically given to control on lbuttondown
00433
00434         m_dwDragStart = GetTickCount();
00435
00436         if(nFlags & MK_CONTROL )
00437         {
00438             // Control key is down
00439             UINT flag;
00440             HTREEITEM hItem = HitTest( point, &flag );
00441             if( hItem )
00442             {
00443                 // Toggle selection state
00444                 UINT uNewSelState =
00445                     GetItemState(hItem, TVIS_SELECTED) & TVIS_SELECTED ?
00446                     0 : TVIS_SELECTED;
00447
00448                 // Get old selected (focus) item and state
00449                 HTREEITEM hItemOld = GetSelectedItem();
00450                 UINT uOldSelState  = hItemOld ?
00451                     GetItemState(hItemOld, TVIS_SELECTED) : 0;
00452
00453                 // Select new item
00454                 if( GetSelectedItem() == hItem )
00455                     SelectItem( NULL );     // to prevent edit
00456                 CTreeCtrl::OnLButtonDown(nFlags, point);
00457
00458                 // Set proper selection (highlight) state for new item
00459                 SetItemState(hItem, uNewSelState,  TVIS_SELECTED);
00460
00461                 // Restore state of old selected item
00462                 if (hItemOld && hItemOld != hItem)
00463                     SetItemState(hItemOld, uOldSelState, TVIS_SELECTED);
00464
00465                 m_hItemFirstSel = NULL;
00466
00467                 return;
00468             }
00469         }
00470         else if(nFlags & MK_SHIFT)
00471         {
00472             // Shift key is down
00473             UINT flag;
00474             HTREEITEM hItem = HitTest( point, &flag );
00475
00476             // Initialize the reference item if this is the first shift selection
00477             if( !m_hItemFirstSel )
00478                 m_hItemFirstSel = GetSelectedItem();
00479
00480             // Select new item
00481             if( GetSelectedItem() == hItem )
00482                 SelectItem( NULL );         // to prevent edit
00483             CTreeCtrl::OnLButtonDown(nFlags, point);
00484
00485             if( m_hItemFirstSel )
00486             {
00487                 SelectItems( m_hItemFirstSel, hItem );
00488                 return;
00489             }
00490         }
00491         else
00492         {
00493             // Normal - remove all selection and let default
00494             // handler do the rest
00495             ClearSelection();
00496             m_hItemFirstSel = NULL;
00497         }
00498     }
00499
00500     CTreeCtrl::OnLButtonDown(nFlags, point);
00501 }
00502
00503 void CCJTreeCtrl::ClearSelection()
00504 {
00505     if(m_bMultiSelect)
00506     {
00507         // This can be time consuming for very large trees
00508         // and is called every time the user does a normal selection
00509         // If performance is an issue, it may be better to maintain
00510         // a list of selected items
00511         for ( HTREEITEM hItem=GetRootItem(); hItem!=NULL; hItem=GetNextItem( hItem ) )
00512             if ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED )
00513                 SetItemState( hItem, 0, TVIS_SELECTED );
00514     }
00515 }
00516
00517 // SelectItems  - Selects items from hItemFrom to hItemTo. Does not
00518 //      - select child item if parent is collapsed. Removes
00519 //      - selection from all other items
00520 // hItemFrom    - item to start selecting from
00521 // hItemTo  - item to end selection at.
00522 BOOL CCJTreeCtrl::SelectItems(HTREEITEM hItemFrom, HTREEITEM hItemTo)
00523 {
00524     if(m_bMultiSelect)
00525     {
00526         HTREEITEM hItem = GetRootItem();
00527
00528         // Clear selection upto the first item
00529         while ( hItem && hItem!=hItemFrom && hItem!=hItemTo )
00530         {
00531             hItem = GetNextVisibleItem( hItem );
00532             SetItemState( hItem, 0, TVIS_SELECTED );
00533         }
00534
00535         if ( !hItem )
00536             return FALSE;   // Item is not visible
00537
00538         SelectItem( hItemTo );
00539
00540         // Rearrange hItemFrom and hItemTo so that hItemFirst is at top
00541         if( hItem == hItemTo )
00542         {
00543             hItemTo = hItemFrom;
00544             hItemFrom = hItem;
00545         }
00546
00547
00548         // Go through remaining visible items
00549         BOOL bSelect = TRUE;
00550         while ( hItem )
00551         {
00552             // Select or remove selection depending on whether item
00553             // is still within the range.
00554             SetItemState( hItem, bSelect ? TVIS_SELECTED : 0, TVIS_SELECTED );
00555
00556             // Do we need to start removing items from selection
00557             if( hItem == hItemTo )
00558                 bSelect = FALSE;
00559
00560             hItem = GetNextVisibleItem( hItem );
00561         }
00562
00563         return TRUE;
00564     }
00565
00566     return FALSE;
00567 }
00568
00569 HTREEITEM CCJTreeCtrl::GetFirstSelectedItem()
00570 {
00571     if(m_bMultiSelect)
00572     {
00573         for ( HTREEITEM hItem = GetRootItem(); hItem!=NULL; hItem = GetNextItem( hItem ) )
00574             if ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED )
00575                 return hItem;
00576     }
00577
00578     return NULL;
00579 }
00580
00581 HTREEITEM CCJTreeCtrl::GetNextSelectedItem(HTREEITEM hItem)
00582 {
00583     if(m_bMultiSelect)
00584     {
00585         for ( hItem = GetNextItem( hItem ); hItem!=NULL; hItem = GetNextItem( hItem ) )
00586             if ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED )
00587                 return hItem;
00588     }
00589
00590     return NULL;
00591 }
00592
00593 HTREEITEM CCJTreeCtrl::GetPrevSelectedItem(HTREEITEM hItem)
00594 {
00595     if(m_bMultiSelect)
00596     {
00597         for ( hItem = GetPrevItem( hItem ); hItem!=NULL; hItem = GetPrevItem( hItem ) )
00598             if ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED )
00599                 return hItem;
00600     }
00601
00602     return NULL;
00603 }
00604
00605 BOOL CCJTreeCtrl::OnEraseBkgnd(CDC* pDC)
00606 {
00607     // KStowell - overridden for flicker-free drawing.
00608     UNUSED_ALWAYS(pDC);
00609     return TRUE;
00610 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PromptFiles.h Source File

common/PromptFiles.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * PromptFiles.h --- functions to pick set of files and folder
00023  */
00024
00025 #ifndef PROMPTFILES_H
00026 #define PROMPTFILES_H
00027
00028 class MultiFiles;
00029 class CStr;
00030 class CWnd;
00031
00033 typedef enum
00034 {
00035     kSelectAny,
00036     kSelectExecutable,
00037     kSelectDll
00038 } kFilesSelectionType;
00039
00040 bool BrowserGetDirectory(const char* prompt, CStr& dir, CWnd* pParentWnd = 0L);
00041 bool BrowserGetMultiFiles(const char* prompt, MultiFiles& mf, bool single,
00042                           const kFilesSelectionType selectionType = kSelectAny);
00043 bool BrowserGetSaveasFile(const char* prompt, const kFilesSelectionType selectionType,
00044                           CStr& fullpath);
00045
00046 #endif /* PROMPTFILES_H */
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UMSGMAP Member List

This is the complete list of members for UMSGMAP, including all inherited members.

lpEntries | UMSGMAP
pBaseMap | UMSGMAP

Generated on Sat Aug 7 22:55:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CItemListConsole Member List

This is the complete list of members for CItemListConsole, including all inherited members.

CItemListConsole() | CItemListConsole |
cvs_err(const char *txt, long len) | CItemListConsole | [virtual]
cvs_out(const char *txt, long len) | CItemListConsole | [virtual]
GetCvsErr() | CItemListConsole |
GetItemList() const | CItemListConsole |
GetLaunchRes() const | CItemListConsole |
m_cvsErr | CItemListConsole | [protected]
m_cvsOut | CItemListConsole | [protected]
m_itemList | CItemListConsole | [protected]
m_launchRes | CItemListConsole | [protected]
Parse(int launchRes)=0L | CItemListConsole | [pure virtual]
~CItemListConsole() | CItemListConsole | [virtual]

Generated on Sat Aug 7 22:53:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CRtag_MAIN Member List

This is the complete list of members for CRtag_MAIN, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CRtag_MAIN(const MultiFiles *mf, const kTagCmdType type, const char *sLastModule, const char *sLastTag, bool noRecurs, bool movDelBranch, bool lookAttic, bool forceRoot, const char *cvsroot, bool overwriteExist=false) | CRtag_MAIN |
DoDataExchange(CDataExchange *pDX) | CRtag_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CRtag_MAIN |
InitHelpID() | CRtag_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_cvsroot | CRtag_MAIN |
m_cvsrootCombo | CRtag_MAIN |
m_forceRoot | CRtag_MAIN |
m_forceRootCheck | CRtag_MAIN |
m_grpBox | CRtag_MAIN |
m_lookAttic | CRtag_MAIN |
m_mf | CRtag_MAIN | [private]
m_moduleCombo | CRtag_MAIN |
m_moduleDescStatic | CRtag_MAIN |
m_moduleName | CRtag_MAIN |
m_movDelBranch | CRtag_MAIN |
m_noRecurs | CRtag_MAIN |
m_overwriteExisting | CRtag_MAIN |
m_overwriteExistingCheck | CRtag_MAIN |
m_selCvsrootButton | CRtag_MAIN |
m_tagCombo | CRtag_MAIN |
m_tagDescStatic | CRtag_MAIN |
m_tagName | CRtag_MAIN |
m_type | CRtag_MAIN | [private]
OnBrowseModules() | CRtag_MAIN | [protected]
OnBrowseTag() | CRtag_MAIN | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnForceroot() | CRtag_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CRtag_MAIN | [protected, virtual]
OnSelcvsroot() | CRtag_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CRtag_MAIN() | CRtag_MAIN |

Generated on Sat Aug 7 22:56:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/LogFrm.h Source File

WinCvs/LogFrm.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // ChildFrm.h : interface of the CLogFrame class
00022 //
00024
00025 #if !defined(AFX_CHILDFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_)
00026 #define AFX_CHILDFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 class CLogFrame : public CCJMDIChildWnd
00033 {
00034     DECLARE_DYNCREATE(CLogFrame)
00035 public:
00036     CLogFrame();
00037
00038 // Attributes
00039 public:
00040
00041 // Operations
00042 public:
00043
00044 // Overrides
00045     // ClassWizard generated virtual function overrides
00046     //{{AFX_VIRTUAL(CLogFrame)
00047     public:
00048     virtual BOOL PreTranslateMessage(MSG* pMsg);
00049     virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00050     //}}AFX_VIRTUAL
00051
00052 // Implementation
00053 public:
00054     virtual ~CLogFrame();
00055     virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00056
00057 #ifdef _DEBUG
00058     virtual void AssertValid() const;
00059     virtual void Dump(CDumpContext& dc) const;
00060 #endif
00061
00062 // Generated message map functions
00063 protected:
00064
00065     //{{AFX_MSG(CLogFrame)
00066     afx_msg void OnClose();
00067     //}}AFX_MSG
00068     DECLARE_MESSAGE_MAP()
00069 };
00070
00072
00073 //{{AFX_INSERT_LOCATION}}
00074 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00075
00076 #endif // !defined(AFX_CHILDFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CTCP2Parse.cpp Source File

common/CTCP2Parse.cpp

Go to the documentation of this file.
00001 /*
00002  ------------------------------------------------------------------------------
00003  * CTCP2Parse.cpp  --
00004  *
00005  *  a C++ implementation of the Text attribute section of the CTCP/2
00006  *  draft by Robey Pointer (that eggdrop dude) and friends.  This code
00007  *  is based directly from Robey's Java example.  This code includes
00008  *  full support for decoding mIrc, ANSI, and ircII attributes as well.
00009  *
00010  *  See --> http://www.lag.net/~robey/ctcp
00011  *      --> http://www.egroups.com/group/ctcp2
00012  *
00013  *  Depends: STL string template, no OS specifics.
00014  *
00015  *  This source is under BSD license and has no restrictions the way
00016  *  the GPL does.  Sell it for all I care.  Just be nice and give me
00017  *  credit for it.  Although it's not a requirement.
00018  *
00019  *  Author: David Gravereaux <davygrvy@pobox.com>
00020  *      Tomahawk Software Group
00021  *
00022  *  Conversion routines donated by Keith Lea <keith@cs.oswego.edu>
00023  *
00024  * RCS: @(#) $Id: CTCP2Parse.cpp,v 1.4 2001/01/14 15:33:39 davygrvy Exp $
00025  ------------------------------------------------------------------------------
00026  */
00027
00028 #include "stdafx.h"
00029 #include "CTCP2Parse.hpp"
00030
00031 CTCP2Parse::CTCP2Parse ()
00032 {
00033     boldCnt = revCnt = overCnt = underCnt = italicCnt = blinkCnt = urlCnt = 0;
00034     boldLast = revLast = overLast = underLast = italicLast = blinkLast = urlLast = 0;
00035     fntSize = fntLast = 0;
00036
00037     fg.RGB = fgLast.RGB = fgDef.RGB = Lt_Grey;
00038     bg.RGB = bgLast.RGB = bgDef.RGB = Black;
00039
00040     cp = cpLast = cpDef = Fixed;
00041     enc = encLast = encDef = iso8859_1;
00042 }
00043
00044 void CTCP2Parse::SetDefaults (
00045     unsigned char fgR, unsigned char fgG, unsigned char fgB,    // default foreground color
00046     unsigned char bgR, unsigned char bgG, unsigned char bgB,    // default background color
00047     CharSpacingType cpDef_,
00048     EncodingType encDef_)
00049 {
00050
00051     // reassemble the seperate RGB values into our internal rep.
00052
00053     fg.R = fgLast.R = fgDef.R = fgR;
00054     fg.G = fgLast.G = fgDef.G = fgG;
00055     fg.B = fgLast.B = fgDef.B = fgB;
00056
00057     bg.R = bgLast.R = bgDef.R = bgR;
00058     bg.G = bgLast.G = bgDef.G = bgG;
00059     bg.B = bgLast.B = bgDef.B = bgB;
00060
00061     cp = cpLast = cpDef = cpDef_;
00062     enc = encLast = encDef = encDef_;
00063 }
00064
00065 void CTCP2Parse::ParseIt (std::string *line)
00066 {
00067     int parseFrmChar = 0, parseEndChar = 0, parseStart = 0;
00068     int fntVal, fntDir = 1;
00069     int rollBack;
00070
00071     // Pre-parse and replace other attribute standards with
00072     // the ctcp2 equivalents for display.
00073     mirc2ctcp(line);
00074     ircii2ctcp(line);
00075     ansi2ctcp(line);
00076
00077
00078     // find an opening ctcp/2 format character (^F)
00079     parseFrmChar = line->find_first_of("\006");
00080
00081     // do we have any?
00082     while (parseFrmChar != std::string::npos)
00083     {
00084         // find the closing ctcp/2 format character (^F)
00085         parseEndChar = line->find_first_of("\006", parseFrmChar+1);
00086
00087         if (parseEndChar == std::string::npos)
00088         {
00089             // an opening without a closing is bogus
00090             // so remove it and fallout of the while loop
00091             line->replace(parseFrmChar, 1, "");
00092             break;
00093         }
00094
00095         // check for text before this format character
00096         // and after the last format character (or index 0 for
00097         // the first iteration.
00098         if (parseFrmChar > parseStart)
00099         {
00100             // yes.. we got a text segment ready to push.
00101             segment = new std::string(line->substr(parseStart, (parseFrmChar - parseStart)));
00102             PushOut();
00103             delete segment;
00104         }
00105
00106         // now, interpret this format code and decode this attribute
00107         // (and options, if any).
00108
00109
00110         parseFrmChar++;  // consume the first ^F.
00111
00112
00113         switch (line->at(parseFrmChar)) {
00114
00115 #   define CTCP2_TOGGLE(ch, var)  \
00116         case (ch): \
00117         decodeToggle(line, &parseFrmChar, &parseEndChar, &(var)); \
00118             break;
00119
00120         // bold
00121         CTCP2_TOGGLE('B', boldCnt);
00122
00123         // reverse
00124         CTCP2_TOGGLE('V', revCnt);
00125
00126         // underline
00127         CTCP2_TOGGLE('U', underCnt);
00128
00129         // over-strike
00130         CTCP2_TOGGLE('S', overCnt);
00131
00132         // italics
00133         CTCP2_TOGGLE('I', italicCnt);
00134
00135         // blink
00136         CTCP2_TOGGLE('K', blinkCnt);
00137
00138         // URL
00139         CTCP2_TOGGLE('L', urlCnt);
00140
00141 #   undef CTCP2_TOGGLE
00142
00143         // color
00144         case 'C':
00145             parseFrmChar++;   // consume the 'C'
00146             if (parseFrmChar < parseEndChar)
00147             {
00148                 if (line->at(parseFrmChar) == '.')
00149                 {
00150                     // reset to default
00151                     fg.RGB = fgDef.RGB;
00152                     parseFrmChar++;  // consume the '.'
00153                 }
00154                 else if (line->at(parseFrmChar) == '-')
00155                 {
00156                     // ignore
00157                     parseFrmChar++;   // consume the '-'
00158                 }
00159                 else
00160                 {
00161                     if (rollBack = decodeColor(line, &parseFrmChar, &parseEndChar, &fg))
00162                     {
00163                         // rollback the error to the 'C'
00164                         parseFrmChar -= rollBack;
00165                         fg.RGB = fgDef.RGB;
00166                         break;
00167                     }
00168                 }
00169
00170
00171                 // background color?
00172                 if (parseFrmChar < parseEndChar)
00173                 {
00174                     if (line->at(parseFrmChar) == '.')
00175                     {
00176                         bg.RGB = bgDef.RGB;
00177                         parseFrmChar++;  // consume the '.'
00178                     }
00179                     else if (line->at(parseFrmChar) == '-')
00180                     {
00181                         // ignore
00182                         parseFrmChar++;   // consume the '-'
00183                     }
00184                     else
00185                     {
00186                         if (rollBack = decodeColor(line, &parseFrmChar, &parseEndChar, &bg))
00187                         {
00188                             // rollback the error to the 'C'
00189                             parseFrmChar -= rollBack;
00190                             bg.RGB = bgDef.RGB;
00191                             break;
00192                         }
00193                     }
00194                 }
00195                 else
00196                     parseFrmChar--;   // rollback one
00197             }
00198             else
00199             {
00200                 // no colors were specified: reset to normal
00201                 fg.RGB = fgDef.RGB;
00202                 bg.RGB = bgDef.RGB;
00203             }
00204
00205             // if fg/bg are too similar, reset to defaults.
00206             // (this is in the ctcp2 draft).  These calculations
00207             // are DIRECTLY from ctcp2's draft.
00208             if ((fg.R >= bg.R - 8) && (fg.R <= bg.R + 8) &&
00209                 (fg.G >= bg.G - 8) && (fg.G <= bg.G + 8) &&
00210                 (fg.B >= bg.B - 8) && (fg.B <= bg.B + 8))
00211             {
00212                 fg.RGB = fgDef.RGB;
00213                 bg.RGB = bgDef.RGB;
00214             }
00215             break;
00216
00217         // font size
00218         case 'F':
00219             parseFrmChar++;
00220             if (parseFrmChar < parseEndChar)
00221             {
00222                 if (line->at(parseFrmChar) == '+') fntDir = 1;
00223                 else fntDir = -1;
00224                 parseFrmChar++;
00225                 if (parseFrmChar < parseEndChar)
00226                 {
00227                     fntVal = line->at(parseFrmChar) - 48;
00228                     if (fntVal > 4) fntVal = 4;
00229                 } else {
00230                     // no amount -- assume 1
00231                     fntVal = 1;
00232                     parseFrmChar--;
00233                 }
00234                 fntSize += (fntDir*fntVal);
00235             } else {
00236                 // no parameters -- reset to normal
00237                 fntSize = 0;
00238                 parseFrmChar--;
00239             }
00240             break;
00241
00242         // character spacing
00243         case 'P':
00244             parseFrmChar++;   // consume it
00245             if (parseFrmChar < parseEndChar)
00246             {
00247                 switch (line->at(parseFrmChar))
00248                 {
00249                 case 'P':
00250                     cp = Proportional; parseFrmChar++; break;
00251                 case 'F':
00252                     cp = Fixed; parseFrmChar++; break;
00253                 default:
00254                     // rollback to show the error.
00255                     parseFrmChar -= 2;
00256                 }
00257             } else {
00258                 // no parameters -- reset to normal
00259                 cp = cpDef;
00260             }
00261             break;
00262
00263         // text encoding
00264         case 'E':
00265             parseFrmChar++;   // consume it
00266             switch (line->at(parseFrmChar))
00267             {
00268             case '1':
00269                 if (line->at(parseFrmChar+1) == '0') parseFrmChar++; // what's iso8859-10 ???
00270                 enc = iso8859_1; parseFrmChar++; break;
00271             case '2':
00272                 enc = iso8859_2; parseFrmChar++; break;
00273             case '3':
00274                 enc = iso8859_3; parseFrmChar++; break;
00275             case '4':
00276                 enc = iso8859_4; parseFrmChar++; break;
00277             case '5':
00278                 enc = iso8859_5; parseFrmChar++; break;
00279             case '6':
00280                 enc = iso8859_6; parseFrmChar++; break;
00281             case '7':
00282                 enc = iso8859_7; parseFrmChar++; break;
00283             case '8':
00284                 enc = iso8859_8; parseFrmChar++; break;
00285             case '9':
00286                 enc = iso8859_9; parseFrmChar++; break;
00287             case 'U':
00288                 enc = UTF_8; parseFrmChar++; break;
00289             default:
00290                 // rollback to show the error.
00291                 parseFrmChar -= 2;
00292             }
00293             break;
00294
00295         // revert to normal
00296         case 'N':
00297             parseFrmChar++;   // consume it
00298             boldCnt = revCnt = overCnt = underCnt = italicCnt = blinkCnt = urlCnt = 0;
00299             enc = encDef;
00300             fg.RGB = fgDef.RGB;
00301             bg.RGB = bgDef.RGB;
00302             cp = cpDef;
00303             break;
00304
00305         // client extensions
00306         case 'X':
00307             //  no extensions are defined at this time.
00308             /*
00309             parseFrmChar++;
00310             switch (line->at(parseFrmChar)) {
00311             case '':
00312             default:
00313                  rollback to show the error.
00314                 parseFrmChar -= 2;
00315             }
00316             */
00317             parseFrmChar--;
00318             break;
00319
00320         // error condition...
00321         default:
00322             // rollback one.  unrecognized format specifier.
00323             parseFrmChar--;
00324         }
00325
00326         // extra params? include them in the text surrounded by "[ ]"
00327         // (This is recommended, in case someone chooses to "hide" a
00328         //    message by doing "^FNsell yoyodyne stocks!^F" -- this code
00329         //    effectively "unhides" it, and is [yet again] recommended
00330         //    by the CTCP2 draft.)
00331
00332         parseFrmChar++;
00333         if (parseFrmChar < parseEndChar)
00334         {
00335             line->replace(parseFrmChar, parseEndChar - parseFrmChar,
00336                 std::string("\006[") +
00337                 line->substr(parseFrmChar, parseEndChar-parseFrmChar) +
00338                 std::string("]"));
00339
00340             parseEndChar = parseFrmChar;
00341         }
00342
00343         // save old end position
00344         parseStart = parseEndChar+1;
00345
00346         // got any more?
00347         parseFrmChar = line->find_first_of("\006", parseStart);
00348     };
00349
00350
00351
00352     // anything left?
00353     if (parseStart < line->length())
00354     {
00355         // last text segment is ready to push.
00356         segment = new std::string(line->substr(parseStart));
00357         PushOut();
00358         delete segment;
00359     }
00360 };
00361
00362 const CTCP2Parse::RGBColor CTCP2Parse::indexColor[16] = {
00363     Black, Blue, Green, Cyan, Red, Magenta, Yellow, Lt_Grey, Grey,
00364     Lt_Blue, Lt_Green, Lt_Cyan, Lt_Red, Lt_Magenta, Lt_Yellow, White
00365 };
00366
00367
00368
00369 #define CCOLOR (char)3  // ctr-c
00370 #define CCTCP2 (char)6  // ctr-f
00371 #define MIRC_TRANSPARENT    16
00372 #define isn(ch) ((ch) >= '0' && (ch) <= '9')
00373
00374
00375 const char
00376 mircAttrCvt::tokens[2] = {
00377     CCOLOR, 0
00378 };
00379
00380
00381 const char *
00382 mircAttrCvt::mirc2ctcpmap[17] = {
00383     "F",        // white
00384     "0",        // black
00385     "1",        // blue
00386     "2",        // green
00387     "C",        // bright red
00388     "#7F3F3F",  // brown   (not exactly red (7F0000))
00389     "5",        // purple
00390     "#FF7F00",  // orange  (definately not yellow (7F7F00))
00391     "E",        // bright yellow
00392     "A",        // bright green
00393     "3",        // cyan
00394     "B",        // bright cyan
00395     "9",        // bright blue
00396     "#FF7FC0",  // pink    (not really bright magenta (FF00FF))
00397     "8",        // grey
00398     "7",        // light grey
00399     "."     // return to default (^K99)
00400 };
00401
00402
00403 void
00404 mircAttrCvt::mirc2ctcp(std::string *in)
00405 {
00406     int col;
00407     char f[20];
00408     bool eqf, eqb;
00409     short oldfg, oldbg, fg = -1, bg = -1;
00410     int pos;
00411
00412     pos = in->find_first_of(tokens);
00413
00414     while (pos != std::string::npos)
00415     {
00416         oldfg = fg;
00417         oldbg = bg;
00418         col = extractcolor(in, pos+1, &fg, &bg);
00419         eqf = (oldfg == fg);
00420         eqb = (oldbg == bg);
00421
00422         if (col && (!eqf || !eqb))
00423         {
00424             // if the color hasn't changed, we insert a - which means
00425             // basically "ignore me"
00426             sprintf(f, "C%s%s",
00427                 eqf ? "-" : mirc2ctcpmap[fg],
00428                 eqb ? (eqf ? 0 : "-") : mirc2ctcpmap[bg]);
00429
00430             in->replace(pos, col+1,
00431                 std::string("") + CCTCP2 + f + CCTCP2);
00432             pos += (2 + strlen(f));   // consume the additions
00433         }
00434         else
00435         {
00436             in->replace(pos, 1, std::string("") + CCTCP2 + 'C' + CCTCP2);
00437             pos += 2;   // consume the additions
00438         }
00439         pos = in->find_first_of(tokens, pos);
00440     }
00441 };
00442
00443
00444 int
00445 mircAttrCvt::extractcolor (std::string *in, int start, short *fg, short *bg)
00446 {
00447     int ptr = start, len = in->length(), preColor;
00448
00449     if (ptr == len) return 0;
00450
00451     if (isn(in->at(ptr)))
00452     {
00453         // there's a foreground
00454
00455         if (ptr + 1 < len && isn(in->at(ptr + 1)))
00456         {
00457             // it's 2 digits
00458             preColor = (((in->at(ptr) - '0') * 10) + (in->at(ptr + 1) - '0'));
00459             if (preColor == 99) *fg = MIRC_TRANSPARENT;
00460             else *fg = preColor % 16;
00461             ptr += 2;
00462         }
00463         else
00464         {
00465             // it's 1 digit
00466             *fg = in->at(ptr) - '0';
00467             ptr++;
00468         }
00469         if (ptr + 1 < len && in->at(ptr) == ',' && isn(in->at(ptr + 1)))
00470         {
00471             // there's a background
00472             ptr++; // the comma
00473
00474             if (ptr + 1 < len && isn(in->at(ptr + 1)))
00475             {
00476                 // it's 2 digits
00477                 preColor = (((in->at(ptr) - '0') * 10) + (in->at(ptr + 1) - '0'));
00478                 if (preColor == 99) *bg = MIRC_TRANSPARENT;
00479                 else *bg = preColor % 16;
00480                 ptr += 2;
00481             }
00482             else
00483             {
00484                 // it's 1 digit
00485                 *bg = in->at(ptr) - '0';
00486                 ptr++;
00487             }
00488         }
00489     }
00490     return (ptr - start);
00491 };
00492
00493
00494 // ------------------------------ macro definitions -------------------
00495 #define CBOLD  (char)2  // ctr-b
00496 #define CCTCP2 (char)6  // ctr-f
00497 #define CSTOP  (char)15 // ctr-o
00498 #define CREV   (char)22 // ctr-v, reverse
00499 #define CUNDR  (char)31 // ctr-underscore
00500
00501
00502 const char irciiAttrCvt::tokens[5] = {
00503     CBOLD, CUNDR, CREV, CSTOP, 0
00504 };
00505
00506 void
00507 irciiAttrCvt::ircii2ctcp (std::string *in)
00508 {
00509     int pos, bold = 0, under = 0, rev = 0;
00510
00511     pos = in->find_first_of(tokens);
00512
00513     while (pos != std::string::npos)
00514     {
00515         switch (in->at(pos))
00516         {
00517         case CBOLD:
00518             bold = !bold;
00519             in->replace(pos, 1,
00520                 std::string("") + CCTCP2 + 'B' + (bold?'+':'-') + CCTCP2);
00521             pos += 3;   // consume the additions
00522             break;
00523
00524         case CUNDR:
00525             under = !under;
00526             in->replace(pos, 1,
00527                 std::string("") + CCTCP2 + 'U' + (under?'+':'-') + CCTCP2);
00528             pos += 3;   // consume the additions
00529             break;
00530
00531         case CREV:
00532             rev = !rev;
00533             in->replace(pos, 1,
00534                 std::string("") + CCTCP2 + 'V' + (rev?'+':'-') + CCTCP2);
00535             pos += 3;   // consume the additions
00536             break;
00537
00538         case CSTOP:
00539             bold = under = rev = 0;
00540             in->replace(pos, 1, std::string("") + CCTCP2 + 'N' + CCTCP2);
00541             pos += 2;   // consume the additions
00542         }
00543         pos = in->find_first_of(tokens,++pos);
00544     }
00545 }
00546
00547
00548 // See http://www.delorie.com/gnu/docs/screen/screen_48.html for a good list of ansi escapes.
00549 // We're not supporting everything, though.  Just the small bit about colors and cursor move right.
00550
00551
00552 #define INVALID_SEQUENCE    -1
00553 const char *ansiAttrCvt::AnsiSeq::_notOf = "1234567890=;";
00554
00555 ansiAttrCvt::AnsiSeq::AnsiSeq (std::string *in, int pos)
00556     : _seq(0), _verb(0)
00557 {
00558     int verbPos;
00559     int seqLen;
00560     int pos1, pos2;
00561
00562     verbPos = in->find_first_not_of(_notOf, pos + 2);
00563
00564     if (verbPos == std::string::npos || in->at(verbPos) == '\033')
00565     {
00566         _verb = INVALID_SEQUENCE;
00567         in->replace(pos, 2, "");
00568         return;
00569     }
00570
00571     seqLen = verbPos - pos - 1;
00572
00573     // get a copy of the ansi sequence without the "esc["
00574     _seq = new std::string(in->substr(pos + 2, seqLen));
00575
00576     // remove it from the original, now that we have the needed info
00577     in->replace(pos, verbPos - pos + 1, "");
00578
00579     // set the verb
00580     _verb = _seq->at(seqLen - 1);
00581
00582     for (pos1 = 0, pos2 = 0; pos2 < seqLen; pos2++)
00583     {
00584         if (_seq->at(pos2) != ';' && pos2 < (seqLen - 1)) continue;
00585         _params.push_back(atoi(_seq->substr(pos1, pos2 - pos1).c_str()));
00586         pos1 = pos2 + 1;
00587     }
00588
00589 }
00590
00591
00592 ansiAttrCvt::AnsiSeq::~AnsiSeq ()
00593 {
00594     if (_seq) delete _seq;
00595 }
00596
00597
00598 #define ANSI_SGM_TA_RESET   0
00599 #define ANSI_SGM_TA_BOLD    1
00600 #define ANSI_SGM_TA_FAINT   2
00601 #define ANSI_SGM_TA_ITALIC  3
00602 #define ANSI_SGM_TA_ULINE   4
00603 #define ANSI_SGM_TA_BLINK   5
00604 #define ANSI_SGM_TA_REV     7
00605 #define ANSI_SGM_TA_CONSEAL 8
00606 #define ANSI_SGM_TA_NORMAL  22
00607 #define ANSI_SGM_TA_ITALIC_OFF  23
00608 #define ANSI_SGM_TA_ULINE_OFF   24
00609 #define ANSI_SGM_TA_BLINK_OFF   25
00610 #define ANSI_SGM_TA_REV_OFF 27
00611
00612 #define ANSI_SGM_FC_BLK     30
00613 #define ANSI_SGM_FC_RED     31
00614 #define ANSI_SGM_FC_GRN     32
00615 #define ANSI_SGM_FC_YEL     33
00616 #define ANSI_SGM_FC_BLU     34
00617 #define ANSI_SGM_FC_MAG     35
00618 #define ANSI_SGM_FC_CYN     36
00619 #define ANSI_SGM_FC_WHT     37
00620 #define ANSI_SGM_FC_DEFAULT 39
00621
00622 #define ANSI_SGM_BC_BLK     40
00623 #define ANSI_SGM_BC_RED     41
00624 #define ANSI_SGM_BC_GRN     42
00625 #define ANSI_SGM_BC_YEL     43
00626 #define ANSI_SGM_BC_BLU     44
00627 #define ANSI_SGM_BC_MAG     45
00628 #define ANSI_SGM_BC_CYN     46
00629 #define ANSI_SGM_BC_WHT     47
00630 #define ANSI_SGM_BC_DEFAULT 49
00631
00632
00633 const char *ansiAttrCvt::escSeq = "\033\133";
00634
00635 void
00636 ansiAttrCvt::ansi2ctcp (std::string *in)
00637 {
00638     bold = underline = reverse = blink = italic = 0;
00639     _in = in;
00640
00641     pos = in->find(escSeq);
00642
00643     while (pos != std::string::npos)
00644     {
00645         _seq = new AnsiSeq(in, pos);
00646
00647         switch (_seq->verb())
00648         {
00649         case INVALID_SEQUENCE:
00650             break;
00651
00652         case 'm':       // set graphic mode
00653             do_m();
00654             break;
00655         case 'C':       // move cursor right
00656             do_C();
00657             break;
00658         case 'f':       // move to cursor position
00659         case 'H':       //          "
00660         case 'A':       // move cursor up
00661         case 'B':       // move cursor down
00662         case 'D':       // move cursor left
00663         case 's':       // save cursor position
00664         case 'u':       // restore cursor position
00665         case 'J':       // erase display and goto home
00666         case 'K':       // erase line
00667         case 'h':       // set display mode
00668         case 'l':       // reset display mode
00669         default:
00670             std::string errmsg(std::string ("[ansi error: '") + _seq->seq() +
00671                 "' sequence unsupported]");
00672             in->insert(pos, errmsg);
00673             pos += errmsg.length();
00674         }
00675         delete _seq;
00676         pos = in->find(escSeq, pos);
00677     }
00678 };
00679
00680 const char *ansiAttrCvt::fgColorMap[16] = {
00681     "C0-",      // Black
00682     "C4-",      // Red
00683     "C2-",      // Green
00684     "C6-",      // Yellow
00685     "C1-",      // Blue
00686     "C5-",      // Magenta
00687     "C3-",      // Cyan
00688     "C7-",      // Light Grey
00689     "C8-",      // Grey
00690     "CC-",      // Light Red
00691     "CA-",      // Light Green
00692     "CE-",      // Light Yellow
00693     "C9-",      // Light Blue
00694     "CD-",      // Light Magenta
00695     "CB-",      // Light Cyan
00696     "CF-"       // White
00697 };
00698
00699 const char *ansiAttrCvt::bgColorMap[8] = {
00700     "C-0",      // Black
00701     "C-4",      // Red
00702     "C-2",      // Green
00703     "C-6",      // Yellow
00704     "C-1",      // Blue
00705     "C-5",      // Magenta
00706     "C-3",      // Cyan
00707     "C-7"       // Light Grey
00708 };
00709
00710 void
00711 ansiAttrCvt::do_m ()
00712 {
00713     int i;
00714     for (i = 0; i < _seq->paramc(); i++)
00715     {
00716         switch (_seq->param(i))
00717         {
00718         // reset
00719         case ANSI_SGM_TA_RESET:
00720             bold = underline = reverse = blink = 0;
00721             _in->insert(pos, std::string("") + CCTCP2 + 'N' + CCTCP2);
00722             pos += 3;
00723             break;
00724
00725         // bold intensity
00726         case ANSI_SGM_TA_BOLD:
00727             if (!bold) bold = 1;
00728             break;
00729
00730         // bold intensity
00731         case ANSI_SGM_TA_FAINT:
00732             // TODO: what do I do for this ???
00733             break;
00734
00735         // bold + faint off (normal intensity)
00736         case ANSI_SGM_TA_NORMAL:
00737             if (bold) bold = 0;
00738             break;
00739
00740         // standout (italic)
00741         case ANSI_SGM_TA_ITALIC:
00742             if (!italic)
00743             {
00744                 italic = 1;
00745                 _in->insert(pos, std::string("") + CCTCP2 + "I+" + CCTCP2);
00746                 pos += 4;       // consume the additions
00747             }
00748             break;
00749
00750         // standout (italic) off
00751         case ANSI_SGM_TA_ITALIC_OFF:
00752             if (italic)
00753             {
00754                 italic = 0;
00755                 _in->insert(pos, std::string("") + CCTCP2 + "I-" + CCTCP2);
00756                 pos += 4;       // consume the additions
00757             }
00758             break;
00759
00760         // underline
00761         case ANSI_SGM_TA_ULINE:
00762             if (!underline)
00763             {
00764                 underline = 1;
00765                 _in->insert(pos, std::string("") + CCTCP2 + "U+" + CCTCP2);
00766                 pos += 4;       // consume the additions
00767             }
00768             break;
00769
00770         // underline off
00771         case ANSI_SGM_TA_ULINE_OFF:
00772             if (underline)
00773             {
00774                 underline = 0;
00775                 _in->insert(pos, std::string("") + CCTCP2 + "U-" + CCTCP2);
00776                 pos += 4;       // consume the additions
00777             }
00778             break;
00779
00780         // blink
00781         case ANSI_SGM_TA_BLINK:
00782             if (!blink)
00783             {
00784                 blink = 1;
00785                 _in->insert(pos, std::string("") + CCTCP2 + "K+" + CCTCP2);
00786                 pos += 4;   // consume additions.
00787             }
00788             break;
00789
00790         // blink off
00791         case ANSI_SGM_TA_BLINK_OFF:
00792             if (blink)
00793             {
00794                 blink = 0;
00795                 _in->insert(pos, std::string("") + CCTCP2 + "K-" + CCTCP2);
00796                 pos += 4;   // consume additions.
00797             }
00798             break;
00799
00800         // reverse
00801         case ANSI_SGM_TA_REV:
00802             if (!reverse)
00803             {
00804                 reverse = 1;
00805                 _in->insert(pos, std::string("") + CCTCP2 + "V+" + CCTCP2);
00806                 pos += 4;   // consume the additions
00807             }
00808             break;
00809
00810         // reverse off
00811         case ANSI_SGM_TA_REV_OFF:
00812             if (reverse)
00813             {
00814                 reverse = 0;
00815                 _in->insert(pos, std::string("") + CCTCP2 + "V-" + CCTCP2);
00816                 pos += 4;   // consume the additions
00817             }
00818             break;
00819
00820         // concealed
00821         case ANSI_SGM_TA_CONSEAL:
00822             // TODO: wtf is this?  make foreground same color as back?
00823             break;
00824
00825         case ANSI_SGM_FC_BLK:
00826         case ANSI_SGM_FC_RED:
00827         case ANSI_SGM_FC_GRN:
00828         case ANSI_SGM_FC_YEL:
00829         case ANSI_SGM_FC_BLU:
00830         case ANSI_SGM_FC_MAG:
00831         case ANSI_SGM_FC_CYN:
00832         case ANSI_SGM_FC_WHT:
00833             _in->insert(pos, std::string("") + CCTCP2 +
00834                 fgColorMap[_seq->param(i) - 30 + (bold ? 8 : 0)] +
00835                 CCTCP2);
00836             pos += 5;       // consume the additions
00837             break;
00838
00839         case ANSI_SGM_FC_DEFAULT:
00840             _in->insert(pos, std::string("") + CCTCP2 + "C.-" + CCTCP2);
00841             pos += 5;       // consume the additions
00842             break;
00843
00844         case ANSI_SGM_BC_BLK:
00845         case ANSI_SGM_BC_RED:
00846         case ANSI_SGM_BC_GRN:
00847         case ANSI_SGM_BC_YEL:
00848         case ANSI_SGM_BC_BLU:
00849         case ANSI_SGM_BC_MAG:
00850         case ANSI_SGM_BC_CYN:
00851         case ANSI_SGM_BC_WHT:
00852             _in->insert(pos, std::string("") +
00853                 CCTCP2 + bgColorMap[_seq->param(i) - 40] + CCTCP2);
00854             pos += 5;       // consume the additions
00855             break;
00856
00857         case ANSI_SGM_BC_DEFAULT:
00858             _in->insert(pos, std::string("") + CCTCP2 + "C-." + CCTCP2);
00859             pos += 5;       // consume the additions
00860             break;
00861
00862         }
00863     }
00864 }
00865
00866
00867 void
00868 ansiAttrCvt::do_C ()
00869 {
00870     for (int i = 0; i < _seq->param(_seq->paramc() - 1); i++)
00871         _in->insert(pos++, " ");
00872 }
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonGlue.impl.h Source File

common/PythonGlue.impl.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- October 2001
00019  */
00020
00021 /*
00022  * PythonGlue.impl.h --- wrappers to the Python library
00023  */
00024
00025 #ifndef PYTHONGLUE_IMPL_H
00026 #define PYTHONGLUE_IMPL_H
00027
00028 #ifndef PYTHONGLUE_EXTERN
00029 #   define PYTHONGLUE_EXTERN extern
00030 #endif
00031
00032 #if (defined(WIN32) && !qCvsDebug) || TARGET_RT_MAC_MACHO
00033 #   define DEC_GLUE(f) (*f##_glue)
00034 #   define VAR_GLUE(f) f##_glue
00035
00036     PYTHONGLUE_EXTERN PyThreadState * DEC_GLUE(PyThreadState_Swap) (PyThreadState *);
00037     PYTHONGLUE_EXTERN int DEC_GLUE(PyDict_SetItemString) (PyObject *dp, char *key, PyObject *item);
00038     PYTHONGLUE_EXTERN void  DEC_GLUE(PyErr_Clear) (void);
00039     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(PyInt_FromLong) (long);
00040     PYTHONGLUE_EXTERN void DEC_GLUE(PyErr_SetString) (PyObject *, const char *);
00041     PYTHONGLUE_EXTERN int DEC_GLUE(PyArg_ParseTuple) (PyObject *, char *, ...);
00042     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(PyTuple_New) (int size);
00043     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(Py_BuildValue) (char *, ...);
00044     PYTHONGLUE_EXTERN FILE * DEC_GLUE(PyFile_AsFile) (PyObject *);
00045     PYTHONGLUE_EXTERN char * DEC_GLUE(PyString_AsString) (PyObject *);
00046     PYTHONGLUE_EXTERN int DEC_GLUE(PyTuple_Size) (PyObject *);
00047     PYTHONGLUE_EXTERN int DEC_GLUE(PyRun_SimpleString) (char *);
00048     PYTHONGLUE_EXTERN int DEC_GLUE(PyRun_SimpleFile) (FILE *, char *);
00049     PYTHONGLUE_EXTERN void DEC_GLUE(Py_SetProgramName) (char *);
00050     PYTHONGLUE_EXTERN void DEC_GLUE(Py_Initialize) (void);
00051     PYTHONGLUE_EXTERN void DEC_GLUE(Py_Finalize) (void);
00052     PYTHONGLUE_EXTERN int DEC_GLUE(Py_IsInitialized) (void);
00053     PYTHONGLUE_EXTERN PyThreadState * DEC_GLUE(Py_NewInterpreter) (void);
00054     PYTHONGLUE_EXTERN void DEC_GLUE(Py_EndInterpreter) (PyThreadState *);
00055     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(PyString_FromString) (const char *);
00056     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(PyErr_NewException) (char *name, PyObject *base, PyObject *dict);
00057     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(PyModule_GetDict) (PyObject *);
00058     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(Py_InitModule4) (char *name, PyMethodDef *methods, char *doc, PyObject *self, int apiver);
00059     PYTHONGLUE_EXTERN void DEC_GLUE(PyEval_InitThreads) (void);
00060     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(Py_FindMethod) (PyMethodDef[], PyObject *, char *);
00061     PYTHONGLUE_EXTERN PyObject * DEC_GLUE(_PyObject_New) (PyTypeObject *);
00062 #   if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 3
00063     PYTHONGLUE_EXTERN void DEC_GLUE(_PyObject_Del) (PyObject *);
00064 #   else
00065     PYTHONGLUE_EXTERN void DEC_GLUE(PyObject_Free) (void *);
00066 #   endif
00067     PYTHONGLUE_EXTERN void DEC_GLUE(PySys_SetPath) (char *);
00068     PYTHONGLUE_EXTERN char * DEC_GLUE(Py_GetPath) (void);
00069
00070     PYTHONGLUE_EXTERN PyTypeObject * VAR_GLUE(PyType_Type);
00071     PYTHONGLUE_EXTERN PyTypeObject * VAR_GLUE(PyFile_Type);
00072     PYTHONGLUE_EXTERN PyTypeObject * VAR_GLUE(PyString_Type);
00073     PYTHONGLUE_EXTERN PyTypeObject * VAR_GLUE(PyTuple_Type);
00074     PYTHONGLUE_EXTERN PyTypeObject * VAR_GLUE(PyInt_Type);
00075     PYTHONGLUE_EXTERN PyObject * VAR_GLUE(_Py_NoneStruct);
00076     PYTHONGLUE_EXTERN PyObject * VAR_GLUE(_Py_ZeroStruct);
00077     PYTHONGLUE_EXTERN PyObject * VAR_GLUE(_Py_TrueStruct);
00078
00079 #   define GLUE_WRAP(f) f##_glue
00080
00081 #   define PyThreadState_Swap GLUE_WRAP(PyThreadState_Swap)
00082 #   define PyDict_SetItemString GLUE_WRAP(PyDict_SetItemString)
00083 #   define PyErr_Clear GLUE_WRAP(PyErr_Clear)
00084 #   define PyInt_FromLong GLUE_WRAP(PyInt_FromLong)
00085 #   define PyErr_SetString GLUE_WRAP(PyErr_SetString)
00086 #   define PyArg_ParseTuple GLUE_WRAP(PyArg_ParseTuple)
00087 #   define PyTuple_New GLUE_WRAP(PyTuple_New)
00088 #   define Py_BuildValue GLUE_WRAP(Py_BuildValue)
00089 #   define PyFile_AsFile GLUE_WRAP(PyFile_AsFile)
00090 #   define PyString_AsString GLUE_WRAP(PyString_AsString)
00091 #   define PyTuple_Size GLUE_WRAP(PyTuple_Size)
00092 #   define PyRun_SimpleString GLUE_WRAP(PyRun_SimpleString)
00093 #   define PyRun_SimpleFile GLUE_WRAP(PyRun_SimpleFile)
00094 #   define Py_SetProgramName GLUE_WRAP(Py_SetProgramName)
00095 #   define Py_Initialize GLUE_WRAP(Py_Initialize)
00096 #   define Py_Finalize GLUE_WRAP(Py_Finalize)
00097 #   define Py_IsInitialized GLUE_WRAP(Py_IsInitialized)
00098 #   define Py_NewInterpreter GLUE_WRAP(Py_NewInterpreter)
00099 #   define Py_EndInterpreter GLUE_WRAP(Py_EndInterpreter)
00100 #   define PyString_FromString GLUE_WRAP(PyString_FromString)
00101 #   define PyErr_NewException GLUE_WRAP(PyErr_NewException)
00102 #   define PyModule_GetDict GLUE_WRAP(PyModule_GetDict)
00103 #   define Py_InitModule4 GLUE_WRAP(Py_InitModule4)
00104 #   define PyEval_InitThreads GLUE_WRAP(PyEval_InitThreads)
00105 #   define Py_FindMethod GLUE_WRAP(Py_FindMethod)
00106 #   define _PyObject_New GLUE_WRAP(_PyObject_New)
00107 #   if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 3
00108 #       define _PyObject_Del GLUE_WRAP(_PyObject_Del)
00109 #   else
00110 #       define PyObject_Free GLUE_WRAP(PyObject_Free)
00111 #   endif
00112 #   define PySys_SetPath GLUE_WRAP(PySys_SetPath)
00113 #   define Py_GetPath GLUE_WRAP(Py_GetPath)
00114
00115     extern PyTypeObject *GetPyType_Type();
00116     extern PyTypeObject *GetPyFile_Type();
00117     extern PyTypeObject *GetPyString_Type();
00118     extern PyTypeObject *GetPyTuple_Type();
00119     extern PyTypeObject *GetPyInt_Type();
00120     extern PyObject *GetPyNone();
00121     extern PyObject *GetPyTrue();
00122     extern PyObject *GetPyFalse();
00123
00124 #   undef PyString_Check
00125 #   define PyString_Check(op) ((op)->ob_type == GetPyString_Type())
00126 #   undef PyTuple_Check
00127 #   define PyTuple_Check(op) ((op)->ob_type == GetPyTuple_Type())
00128 #   undef PyInt_Check
00129 #   define PyInt_Check(op) ((op)->ob_type == GetPyInt_Type())
00130
00131 #else /* (!WIN32 || qCvsDebug) && !TARGET_RT_MAC_MACHO */
00132     inline PyTypeObject *GetPyType_Type() { return &PyType_Type; }
00133     inline PyTypeObject *GetPyFile_Type() { return &PyFile_Type; }
00134     inline PyTypeObject *GetPyString_Type() { return &PyString_Type; }
00135     inline PyTypeObject *GetPyTuple_Type() { return &PyTuple_Type; }
00136     inline PyTypeObject *GetPyInt_Type() { return &PyInt_Type; }
00137     inline PyObject *GetPyNone() { return Py_None; }
00138     inline PyObject *GetPyTrue() { return Py_True; }
00139     inline PyObject *GetPyFalse() { return Py_False; }
00140 #endif /* !WIN32 || qCvsDebug */
00141
00142 #endif /* PYTHONGLUE_IMPL_H */
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FileActionDlg.h Source File

common/FileActionDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018 * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- February 2004
00019 */
00020
00021 /*
00022 * FileActionDlg.h : the file action dialog
00023 */
00024
00025 #if !defined(AFX_FILEACTIONDLG_H__9C280EEF_16E5_4208_8A31_24AE6290E9D7__INCLUDED_)
00026 #define AFX_FILEACTIONDLG_H__9C280EEF_16E5_4208_8A31_24AE6290E9D7__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #include "SmartComboBox.h"
00033 #include "LaunchHandlers.h"
00034
00035 #ifdef WIN32
00036 #   include "HHelpSupport.h"
00037 #endif
00038
00039 class MultiFiles;
00040
00041 bool CompatGetFileAction(const MultiFiles* mf, kLaunchType& launchType);
00042
00043 #ifdef WIN32
00044
00046 // CFileAction_MAIN dialog
00047
00048 class CFileAction_MAIN : public CHHelpPropertyPage
00049 {
00050     DECLARE_DYNAMIC(CFileAction_MAIN)
00051
00052 // Construction
00053 public:
00054     CFileAction_MAIN(const MultiFiles* mf, kLaunchType launchType);
00055     ~CFileAction_MAIN();
00056
00057 // Dialog Data
00058     //{{AFX_DATA(CFileAction_MAIN)
00059     enum { IDD = IDD_OPEN_MAIN };
00060     CStatic m_fileActionDescStatic;
00061     CSmartComboBox  m_fileActionCombo;
00062     int     m_fileAction;
00063     BOOL    m_sameActionNextTime;
00064     //}}AFX_DATA
00065
00066
00067 // Overrides
00068     // ClassWizard generate virtual function overrides
00069     //{{AFX_VIRTUAL(CFileAction_MAIN)
00070     public:
00071     virtual void OnOK();
00072     protected:
00073     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00074     //}}AFX_VIRTUAL
00075
00076 // Implementation
00077 protected:
00078     // Generated message map functions
00079     //{{AFX_MSG(CFileAction_MAIN)
00080     virtual BOOL OnInitDialog();
00081     afx_msg void OnSelchangeAction();
00082     //}}AFX_MSG
00083     DECLARE_MESSAGE_MAP()
00084 private:
00085     // Data members
00086     const MultiFiles* m_mf;
00087     kLaunchType m_launchType;
00088
00089     // Methods
00090     virtual void InitHelpID();
00091
00092 public:
00093     // Interface
00094     kLaunchType GetLaunchType() const;
00095 };
00096
00097 //{{AFX_INSERT_LOCATION}}
00098 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00099 #endif /* WIN32 */
00100
00101
00102 #endif // !defined(AFX_FILEACTIONDLG_H__9C280EEF_16E5_4208_8A31_24AE6290E9D7__INCLUDED_)
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/dib.c Source File

rf/support/mfc/dib.c

Go to the documentation of this file.
00001 /*************************************************************************
00002 /* This is a 'best of' choice of DIB functions taken from Microsoft
00003 /* examples files (examples wincap32 : file.c, dibutil.c ...)
00004 /*************************************************************************/
00005
00006 #include <windows.h>
00007 #include <windowsx.h>
00008 #include "dib.h"
00009
00010
00011 /****************************************************************************
00012  *                                                                          *
00013  *  FUNCTION   : DibNumColors(VOID FAR * pv)                                *
00014  *                                                                          *
00015  *  PURPOSE    : Determines the number of colors in the DIB by looking at   *
00016  *               the BitCount filed in the info block.                      *
00017  *                                                                          *
00018  *  RETURNS    : The number of colors in the DIB.                           *
00019  *               if bitmap is in 8 bit mode but use only 4 colors           *
00020  *               function can return 4 (number of color really used)        *
00021  *               Use DibGetPaletteSize instead...                           *
00022  *                                                                          *
00023  ****************************************************************************/
00024 WORD DibNumColors (VOID FAR * pv)
00025 {
00026     INT                 bits;
00027     LPBITMAPINFOHEADER  lpbi;
00028     LPBITMAPCOREHEADER  lpbc;
00029
00030     lpbi = ((LPBITMAPINFOHEADER)pv);
00031     lpbc = ((LPBITMAPCOREHEADER)pv);
00032
00033     /*  With the BITMAPINFO format headers, the size of the palette
00034      *  is in biClrUsed, whereas in the BITMAPCORE - style headers, it
00035      *  is dependent on the bits per pixel ( = 2 raised to the power of
00036      *  bits/pixel).
00037      */
00038     if (lpbi->biSize != sizeof(BITMAPCOREHEADER)){
00039         if (lpbi->biClrUsed != 0)
00040             return (WORD)lpbi->biClrUsed;
00041         bits = lpbi->biBitCount;
00042     }
00043     else
00044         bits = lpbc->bcBitCount;
00045
00046     switch (bits){
00047         case 1:
00048                 return 2;
00049         case 4:
00050                 return 16;
00051         case 8:
00052                 return 256;
00053         default:
00054                 /* A 24 bitcount DIB has no color table */
00055                 return 0;
00056     }
00057 }
00058
00059 /****************************************************************************
00060  *                                                                          *
00061  *  FUNCTION   : DibGetPaletteSize(VOID FAR * pv)                           *
00062  *                                                                          *
00063  *  PURPOSE    : Return the bitmap encoding type (8 bit, 24 bit...          *
00064  *               the BitCount filed in the info block.                      *
00065  *                                                                          *
00066  *  RETURNS    : the encoding type of the bitmap.                           *
00067  *                                                                          *
00068  ****************************************************************************/
00069 WORD DibGetPaletteSize (VOID FAR * pv)
00070 {
00071     INT                 bits;
00072     LPBITMAPINFOHEADER  lpbi;
00073     LPBITMAPCOREHEADER  lpbc;
00074
00075     lpbi = ((LPBITMAPINFOHEADER)pv);
00076     lpbc = ((LPBITMAPCOREHEADER)pv);
00077
00078     /*  With the BITMAPINFO format headers, the size of the palette
00079      *  is in biClrUsed, whereas in the BITMAPCORE - style headers, it
00080      *  is dependent on the bits per pixel ( = 2 raised to the power of
00081      *  bits/pixel).
00082      */
00083     if (lpbi->biSize != sizeof(BITMAPCOREHEADER))
00084         bits = lpbi->biBitCount;
00085     else
00086         bits = lpbc->bcBitCount;
00087
00088     return bits;
00089 }
00090
00091 /****************************************************************************
00092  *                                                                          *
00093  *  FUNCTION   :  DibCopyPalette(HBITMAP src, HBITMAP dst)                  *
00094  *                                                                          *
00095  *  PURPOSE    :  Copy the palette from src to dst if possible              *                                                                          *
00096  *                                                                          *
00097  ****************************************************************************/
00098 VOID
00099 DibCopyPalette(HBITMAP dst, HBITMAP src)
00100 {
00101     LPBITMAPINFO src_header, dst_header;
00102     RGBQUAD *src_rgb, *dst_rgb;
00103     WORD colorMode;
00104
00105     src_header = (LPBITMAPINFO) GlobalLock((HGLOBAL)src);
00106     dst_header = (LPBITMAPINFO) GlobalLock((HGLOBAL)dst);
00107
00108     src_rgb = (RGBQUAD FAR *)((LPSTR)src_header + (WORD)src_header->bmiHeader.biSize);
00109     dst_rgb = (RGBQUAD FAR *)((LPSTR)dst_header + (WORD)dst_header->bmiHeader.biSize);
00110
00111     colorMode = DibGetPaletteSize(src_header);
00112     switch(colorMode)
00113     {
00114         case 4:
00115         case 8:
00116             memcpy(dst_rgb, src_rgb,PaletteSize(&src_header->bmiHeader));
00117             break;
00118     }
00119
00120     GlobalUnlock((HGLOBAL)src);
00121     GlobalUnlock((HGLOBAL)dst);
00122 }
00123
00124 /****************************************************************************
00125  *                                                                          *
00126  *  FUNCTION   :  PaletteSize(VOID FAR * pv)                                *
00127  *                                                                          *
00128  *  PURPOSE    :  Calculates the palette size in bytes. If the info. block  *
00129  *                is of the BITMAPCOREHEADER type, the number of colors is  *
00130  *                multiplied by 3 to give the palette size, otherwise the   *
00131  *                number of colors is multiplied by 4.                                                          *
00132  *                                                                          *
00133  *  RETURNS    :  Palette size in number of bytes.                          *
00134  *                                                                          *
00135  ****************************************************************************/
00136 WORD PaletteSize (VOID FAR * pv)
00137 {
00138     LPBITMAPINFOHEADER lpbi;
00139     WORD               NumColors;
00140
00141     lpbi      = (LPBITMAPINFOHEADER)pv;
00142     NumColors = DibNumColors(lpbi);
00143
00144     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
00145         return (WORD)(NumColors * sizeof(RGBTRIPLE));
00146     else
00147         return (WORD)(NumColors * sizeof(RGBQUAD));
00148 }
00149
00150 /****************************************************************************
00151  *                                                                          *
00152  *  FUNCTION   : WriteMapFileHeaderandConvertFromDwordAlignToPacked(HFILE fh, LPBITMAPFILEHEADER pbf)
00153  *                                                                          *
00154  *  PURPOSE    : write header structure (which NOT packed) and write it PACKED
00155  *                                                                          *
00156  *  RETURNS    : VOID
00157  *                                                                          *
00158  ****************************************************************************/
00159
00160 VOID WriteMapFileHeaderandConvertFromDwordAlignToPacked(HFILE fh, LPBITMAPFILEHEADER pbf)
00161 {
00162
00163         /* write bfType*/
00164     _lwrite(fh, (LPSTR)&pbf->bfType, (UINT)sizeof (WORD));
00165         /* now pass over extra word, and only write next 3 DWORDS!*/
00166         _lwrite(fh, (LPSTR)&pbf->bfSize, sizeof(DWORD) * 3);
00167 }
00168
00169 /*************************************************************************
00170  *
00171  * CreateDIB()
00172  *
00173  * Parameters:
00174  *
00175  * DWORD dwWidth    - Width for new bitmap, in pixels
00176  * DWORD dwHeight   - Height for new bitmap
00177  * WORD  wBitCount  - Bit Count for new DIB (1, 4, 8, or 24)
00178  *
00179  * Return Value:
00180  *
00181  * HDIB             - Handle to new DIB
00182  *
00183  * Description:
00184  *
00185  * This function allocates memory for and initializes a new DIB by
00186  * filling in the BITMAPINFOHEADER, allocating memory for the color
00187  * table, and allocating memory for the bitmap bits.  As with all
00188  * HDIBs, the header, colortable and bits are all in one contiguous
00189  * memory block.  This function is similar to the CreateBitmap()
00190  * Windows API.
00191  *
00192  * The colortable and bitmap bits are left uninitialized (zeroed) in the
00193  * returned HDIB.
00194  *
00195  *
00196  * History:   Date      Author              Reason
00197  *            3/20/92   Mark Bader          Created
00198  *
00199  ************************************************************************/
00200
00201 HBITMAP CreateDIB(DWORD dwWidth, DWORD dwHeight, WORD wBitCount, HPALETTE hPal)
00202 {
00203     BITMAPINFOHEADER    bi;             /*  bitmap header */
00204     LPBITMAPINFOHEADER  lpbi;           /*  pointer to BITMAPINFOHEADER */
00205     DWORD               dwLen;          /*  size of memory block */
00206     HBITMAP             hDIB;
00207     DWORD               dwBytesPerLine; /*  Number of bytes per scanline */
00208
00209
00210     /*  Make sure bits per pixel is valid */
00211
00212     if (wBitCount <= 1)
00213         wBitCount = 1;
00214     else if (wBitCount <= 4)
00215         wBitCount = 4;
00216     else if (wBitCount <= 8)
00217         wBitCount = 8;
00218     else if (wBitCount <= 24)
00219         wBitCount = 24;
00220     else
00221         wBitCount = 4;  /*  set default value to 4 if parameter is bogus */
00222
00223     /*  initialize BITMAPINFOHEADER */
00224
00225     bi.biSize = sizeof(BITMAPINFOHEADER);
00226     bi.biWidth = dwWidth;         /*  fill in width from parameter */
00227     bi.biHeight = dwHeight;       /*  fill in height from parameter */
00228     bi.biPlanes = 1;              /*  must be 1 */
00229     bi.biBitCount = wBitCount;    /*  from parameter */
00230     bi.biCompression = BI_RGB;
00231     bi.biSizeImage = 0;           /*  0's here mean "default" */
00232     bi.biXPelsPerMeter = 0;
00233     bi.biYPelsPerMeter = 0;
00234     bi.biClrUsed = 0;
00235     bi.biClrImportant = 0;
00236
00237     /*  calculate size of memory block required to store the DIB.  This */
00238     /*  block should be big enough to hold the BITMAPINFOHEADER, the color */
00239     /*  table, and the bits */
00240
00241     dwBytesPerLine = WIDTHBYTES(wBitCount * dwWidth);
00242     dwLen = bi.biSize + PaletteSize((LPSTR)&bi) + (dwBytesPerLine * dwHeight);
00243
00244     /*  alloc memory block to store our bitmap */
00245
00246     hDIB = GlobalAlloc(GHND, dwLen);
00247
00248     /*  major bummer if we couldn't get memory block */
00249
00250     if (!hDIB)
00251         return NULL;
00252
00253     /*  lock memory and get pointer to it */
00254
00255     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00256
00257     /*  use our bitmap info structure to fill in first part of */
00258     /*  our DIB with the BITMAPINFOHEADER */
00259
00260     *lpbi = bi;
00261
00262     /*
00263      * Copy the palette in the new created image
00264      */
00265     if (wBitCount == 8)
00266     {
00267         PALETTEENTRY pal[256];
00268         RGBQUAD *pRgb;
00269         int i;
00270
00271         GetPaletteEntries(hPal, 0, 256, pal);
00272
00273         pRgb = (RGBQUAD FAR *)((LPSTR)lpbi + (WORD)lpbi->biSize);
00274
00275         /* Fill in the palette entries from the DIB color table and
00276          * create a logical color palette.
00277          */
00278         for (i = 0; i < 256; i++)
00279         {
00280             pRgb[i].rgbRed = pal[i].peRed;
00281             pRgb[i].rgbGreen = pal[i].peGreen;
00282             pRgb[i].rgbBlue = pal[i].peBlue;
00283         }
00284     }
00285
00286     // Since we don't know what the colortable and bits should contain,
00287     // just leave these blank.  Unlock the DIB and return the HDIB.
00288
00289     GlobalUnlock(hDIB);
00290
00291     //return handle to the DIB
00292
00293     return hDIB;
00294 }
00295
00296 /*************************************************************************
00297  *
00298  * Function:  ReadDIBFile (int)
00299  *
00300  *  Purpose:  Reads in the specified DIB file into a global chunk of
00301  *            memory.
00302  *
00303  *  Returns:  A handle to a dib (hDIB) if successful.
00304  *            NULL if an error occurs.
00305  *
00306  * Comments:  BITMAPFILEHEADER is stripped off of the DIB.  Everything
00307  *            from the end of the BITMAPFILEHEADER structure on is
00308  *            returned in the global memory handle.
00309  *
00310  *
00311  * NOTE: The DIB API were not written to handle OS/2 DIBs, so this
00312  * function will reject any file that is not a Windows DIB.
00313  *
00314  * History:   Date      Author       Reason
00315  *            9/15/91   Mark Bader   Based on DIBVIEW
00316  *            6/25/92   Mark Bader   Added check for OS/2 DIB
00317  *            7/21/92   Mark Bader   Added code to deal with bfOffBits
00318  *                                     field in BITMAPFILEHEADER
00319  *            9/11/92   Mark Bader   Fixed Realloc Code to free original mem
00320  *            1/25/94   Hung Nguyen  Changed file APIs to Win32 APIs
00321  *
00322  *************************************************************************/
00323
00324 HANDLE ReadDIBFile(HANDLE hFile)
00325 {
00326     BITMAPFILEHEADER    bmfHeader;
00327     DWORD               dwBitsSize;
00328     UINT                nNumColors;   /*  Number of colors in table */
00329     HANDLE              hDIB;
00330     HANDLE              hDIBtmp;      /*  Used for GlobalRealloc() //MPB */
00331     LPBITMAPINFOHEADER  lpbi;
00332     DWORD               offBits;
00333     DWORD               dwRead;
00334
00335     /*  get length of DIB in bytes for use when reading */
00336
00337     dwBitsSize = GetFileSize(hFile, NULL);
00338
00339     /*  Allocate memory for header & color table. We'll enlarge this */
00340     /*  memory as needed. */
00341
00342     hDIB = GlobalAlloc(GMEM_MOVEABLE, (DWORD)(sizeof(BITMAPINFOHEADER) +
00343             256 * sizeof(RGBQUAD)));
00344
00345     if (!hDIB)
00346         return NULL;
00347
00348     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00349
00350     if (!lpbi)
00351     {
00352         GlobalFree(hDIB);
00353         return NULL;
00354     }
00355
00356     /*  read the BITMAPFILEHEADER from our file */
00357
00358     if (!ReadFile(hFile, (LPSTR)&bmfHeader, sizeof (BITMAPFILEHEADER),
00359             &dwRead, NULL))
00360         goto ErrExit;
00361
00362     if (sizeof (BITMAPFILEHEADER) != dwRead)
00363         goto ErrExit;
00364
00365     if (bmfHeader.bfType != 0x4d42)  /*  'BM' */
00366         goto ErrExit;
00367
00368     /*  read the BITMAPINFOHEADER */
00369
00370     if (!ReadFile(hFile, (LPSTR)lpbi, sizeof(BITMAPINFOHEADER), &dwRead,
00371             NULL))
00372         goto ErrExit;
00373
00374     if (sizeof(BITMAPINFOHEADER) != dwRead)
00375         goto ErrExit;
00376
00377     /*  Check to see that it's a Windows DIB -- an OS/2 DIB would cause */
00378     /*  strange problems with the rest of the DIB API since the fields */
00379     /*  in the header are different and the color table entries are */
00380     /*  smaller. */
00381     /*  */
00382     /*  If it's not a Windows DIB (e.g. if biSize is wrong), return NULL. */
00383
00384     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
00385         goto ErrExit;
00386
00387     /*  Now determine the size of the color table and read it.  Since the */
00388     /*  bitmap bits are offset in the file by bfOffBits, we need to do some */
00389     /*  special processing here to make sure the bits directly follow */
00390     /*  the color table (because that's the format we are susposed to pass */
00391     /*  back) */
00392
00393     if (!(nNumColors = (UINT)lpbi->biClrUsed))
00394     {
00395         /*  no color table for 24-bit, default size otherwise */
00396
00397         if (lpbi->biBitCount != 24)
00398             nNumColors = 1 << lpbi->biBitCount; /*  standard size table */
00399     }
00400
00401     /*  fill in some default values if they are zero */
00402
00403     if (lpbi->biClrUsed == 0)
00404         lpbi->biClrUsed = nNumColors;
00405
00406     if (lpbi->biSizeImage == 0)
00407     {
00408         lpbi->biSizeImage = ((((lpbi->biWidth * (DWORD)lpbi->biBitCount) +
00409                 31) & ~31) >> 3) * lpbi->biHeight;
00410     }
00411
00412     /*  get a proper-sized buffer for header, color table and bits */
00413
00414     GlobalUnlock(hDIB);
00415     hDIBtmp = GlobalReAlloc(hDIB, lpbi->biSize + nNumColors *
00416             sizeof(RGBQUAD) + lpbi->biSizeImage, 0);
00417
00418     if (!hDIBtmp) /*  can't resize buffer for loading */
00419         goto ErrExitNoUnlock; /* MPB */
00420     else
00421         hDIB = hDIBtmp;
00422
00423     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
00424
00425     /*  read the color table */
00426
00427     ReadFile (hFile, (LPSTR)(lpbi) + lpbi->biSize,
00428             nNumColors * sizeof(RGBQUAD), &dwRead, NULL);
00429
00430     /*  offset to the bits from start of DIB header */
00431
00432     offBits = lpbi->biSize + nNumColors * sizeof(RGBQUAD);
00433
00434     /*  If the bfOffBits field is non-zero, then the bits might *not* be */
00435     /*  directly following the color table in the file.  Use the value in */
00436     /*  bfOffBits to seek the bits. */
00437
00438     if (bmfHeader.bfOffBits != 0L)
00439         SetFilePointer(hFile, bmfHeader.bfOffBits, NULL, FILE_BEGIN);
00440
00441     if (ReadFile(hFile, (LPSTR)lpbi + offBits, lpbi->biSizeImage, &dwRead,
00442             NULL))
00443         goto OKExit;
00444
00445
00446 ErrExit:
00447     GlobalUnlock(hDIB);
00448
00449 ErrExitNoUnlock:
00450     GlobalFree(hDIB);
00451     return NULL;
00452
00453 OKExit:
00454     GlobalUnlock(hDIB);
00455     return hDIB;
00456 }
00457
00458 /*************************************************************************
00459  *
00460  * LoadDIB()
00461  *
00462  * Loads the specified DIB from a file, allocates memory for it,
00463  * and reads the disk file into the memory.
00464  *
00465  *
00466  * Parameters:
00467  *
00468  * LPSTR lpFileName - specifies the file to load a DIB from
00469  *
00470  * Returns: A handle to a DIB, or NULL if unsuccessful.
00471  *
00472  * NOTE: The DIB API were not written to handle OS/2 DIBs; This
00473  * function will reject any file that is not a Windows DIB.
00474  *
00475  * History:   Date      Author       Reason
00476  *            9/15/91   Mark Bader   Based on DIBVIEW
00477  *
00478  *************************************************************************/
00479
00480 HBITMAP LoadDIB(LPSTR lpFileName)
00481 {
00482     HBITMAP     hDIB;
00483     HANDLE      hFile;
00484
00485     if ((hFile = CreateFile(lpFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
00486             OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
00487             NULL)) != INVALID_HANDLE_VALUE)
00488     {
00489         hDIB = ReadDIBFile(hFile);
00490         CloseHandle(hFile);
00491         return hDIB;
00492     }
00493     else
00494         return NULL;
00495 }
00496
00497 /*************************************************************************
00498  *
00499  * SaveBmpFromDDB()
00500  *
00501  * Saves the specified DDB into the specified file name on disk.
00502  *
00503  *************************************************************************/
00504
00505 BOOL
00506 SaveBmpFromDDB(HDC hDC, HBITMAP hBmp, PSTR pszFileName)
00507 {
00508     int         hFile;
00509     OFSTRUCT    ofReOpenBuff;
00510     HBITMAP     hTmpBmp, hBmpOld;
00511     BOOL        bSuccess;
00512     BITMAPFILEHEADER    bfh;
00513     PBITMAPINFO pbmi;
00514     PBYTE       pBits;
00515     BITMAPINFO  bmi;
00516     PBYTE pjTmp, pjTmpBmi;
00517     ULONG sizBMI;
00518
00519
00520     bSuccess = TRUE;
00521 #if 0
00522     if (ghPal) {
00523         SelectPalette(hDC, ghPal, FALSE);
00524         RealizePalette(hDC);
00525     }
00526 #endif
00527     if (!hBmp) {
00528         return FALSE;
00529     }
00530
00531     //
00532     // Let the graphics engine to retrieve the dimension of the bitmap for us
00533     // GetDIBits uses the size to determine if it's BITMAPCOREINFO or BITMAPINFO
00534     // if BitCount != 0, color table will be retrieved
00535     //
00536     bmi.bmiHeader.biSize = 0x28;              // GDI need this to work
00537     bmi.bmiHeader.biBitCount = 0;             // don't get the color table
00538     if ((GetDIBits(hDC, hBmp, 0, 0, (LPSTR)NULL, &bmi, DIB_RGB_COLORS)) == 0) {
00539         return FALSE;
00540     }
00541
00542     //
00543     // Now that we know the size of the image, alloc enough memory to retrieve
00544     // the actual bits
00545     //
00546     if ((pBits = (PBYTE)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT,
00547                 bmi.bmiHeader.biSizeImage)) == NULL) {
00548         return FALSE;
00549     }
00550
00551     //
00552     // Note: 24 bits per pixel has no color table.  So, we don't have to
00553     // allocate memory for retrieving that.  Otherwise, we do.
00554     //
00555     pbmi = &bmi;                                      // assume no color table
00556
00557     switch (bmi.bmiHeader.biBitCount) {
00558         case 24:                                      // has color table
00559             sizBMI = sizeof(BITMAPINFOHEADER);
00560             break;
00561         case 16:
00562         case 32:
00563             sizBMI = sizeof(BITMAPINFOHEADER)+sizeof(DWORD)*3;
00564             break;
00565         default:
00566             sizBMI = sizeof(BITMAPINFOHEADER)+sizeof(RGBQUAD)*(1<<bmi.bmiHeader.biBitCount);
00567             break;
00568
00569     }
00570
00571     //
00572     // Allocate memory for color table if it is not 24bpp...
00573     //
00574     if (sizBMI != sizeof(BITMAPINFOHEADER)) {
00575         ULONG       sizTmp;
00576         //
00577         // I need more memory for the color table
00578         //
00579         if ((pbmi = (PBITMAPINFO)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, sizBMI )) == NULL) {
00580             bSuccess = FALSE;
00581             goto ErrExit1;
00582         }
00583         //
00584         // Now that we've a bigger chunk of memory, let's copy the Bitmap
00585         // info header data over
00586         //
00587         pjTmp = (PBYTE)pbmi;
00588         pjTmpBmi = (PBYTE)&bmi;
00589         sizTmp = sizeof(BITMAPINFOHEADER);
00590
00591         while(sizTmp--)
00592         {
00593             *(((PBYTE)pjTmp)++) = *((pjTmpBmi)++);
00594         }
00595     }
00596
00597     //
00598     // Let's open the file and get ready for writing
00599     //
00600     if ((hFile = OpenFile(pszFileName, (LPOFSTRUCT)&ofReOpenBuff,
00601                  OF_CREATE | OF_WRITE)) == -1) {
00602         goto ErrExit2;
00603     }
00604
00605     //
00606     // But first, fill in the info for the BitmapFileHeader
00607     //
00608     bfh.bfType = 0x4D42;                            // 'BM'
00609     bfh.bfSize = sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER)+sizBMI+
00610         pbmi->bmiHeader.biSizeImage;
00611     bfh.bfReserved1 =
00612     bfh.bfReserved2 = 0;
00613     bfh.bfOffBits = sizeof(BITMAPFILEHEADER)+sizBMI;
00614
00615     //
00616     // Write out the file header now
00617     //
00618     if (_lwrite(hFile, (LPSTR)&bfh, sizeof(BITMAPFILEHEADER)) == -1) {
00619         bSuccess = FALSE;
00620         goto ErrExit3;
00621     }
00622
00623     //
00624     // Bitmap can't be selected into a DC when calling GetDIBits
00625     // Assume that the hDC is the DC where the bitmap would have been selected
00626     // if indeed it has been selected
00627     //
00628     if (hTmpBmp = CreateCompatibleBitmap(hDC, pbmi->bmiHeader.biWidth, pbmi->bmiHeader.biHeight)) {
00629         hBmpOld = SelectObject(hDC, hTmpBmp);
00630         if ((GetDIBits(hDC, hBmp, 0, pbmi->bmiHeader.biHeight, (LPSTR)pBits, pbmi, DIB_RGB_COLORS))==0){
00631             bSuccess = FALSE;
00632             goto ErrExit4;
00633         }
00634     } else {
00635         bSuccess = FALSE;
00636         goto ErrExit3;
00637     }
00638
00639     //
00640     // Now write out the BitmapInfoHeader and color table, if any
00641     //
00642     if (_lwrite(hFile, (LPSTR)pbmi, sizBMI) == -1) {
00643         bSuccess = FALSE;
00644         goto ErrExit4;
00645     }
00646
00647     //
00648     // write the bits also
00649     //
00650     if (_lwrite(hFile, (LPSTR)pBits, pbmi->bmiHeader.biSizeImage) == -1) {
00651         bSuccess = FALSE;
00652         goto ErrExit4;
00653     }
00654
00655
00656 ErrExit4:
00657     SelectObject(hDC, hBmpOld);
00658     DeleteObject(hTmpBmp);
00659 ErrExit3:
00660     _lclose(hFile);
00661 ErrExit2:
00662     GlobalFree(pbmi);
00663 ErrExit1:
00664     GlobalFree(pBits);
00665     return bSuccess;
00666 }
00667
00668 /*************************************************************************
00669  *
00670  * SaveDIB()
00671  *
00672  * Saves the specified DIB into the specified file name on disk.  No
00673  * error checking is done, so if the file already exists, it will be
00674  * written over.
00675  *
00676  * Parameters:
00677  *
00678  * HDIB hDib - Handle to the dib to save
00679  *
00680  * LPSTR lpFileName - pointer to full pathname to save DIB under
00681  *
00682  * Return value: 0 if successful, or one of:
00683  *        ERR_INVALIDHANDLE
00684  *        ERR_OPEN
00685  *        ERR_LOCK
00686  *
00687  * History:
00688  *
00689  * NOTE: The DIB API were not written to handle OS/2 DIBs, so this
00690  * function will not save a file if it is not a Windows DIB.
00691  *
00692  * History:   Date      Author       Reason
00693  *            9/15/91   Mark Bader   Taken from DIBVIEW (which was taken
00694  *                                      from SHOWDIB)
00695  *            1/30/92   Mark Bader   Fixed problem of writing too many
00696  *                                      bytes to the file
00697  *            6/24/92   Mark Bader   Added check for OS/2 DIB
00698  *            2/1/94    Hung Nguyen  Changed file APIs to Win32 APIs
00699  *
00700  *************************************************************************/
00701
00702 BOOL SaveDIB(HBITMAP hDib, LPSTR lpFileName)
00703 {
00704     BITMAPFILEHEADER    bmfHdr;     /*  Header for Bitmap file */
00705     LPBITMAPINFOHEADER  lpBI;       /*  Pointer to DIB info structure */
00706     HANDLE              fh;         /*  file handle for opened file */
00707     DWORD               dwDIBSize;
00708     DWORD               dwWritten;
00709
00710     if (!hDib)
00711         return FALSE;
00712
00713     fh = CreateFile(lpFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
00714             FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
00715
00716     if (fh == INVALID_HANDLE_VALUE)
00717         return FALSE;
00718
00719     /*  Get a pointer to the DIB memory, the first of which contains */
00720     /*  a BITMAPINFO structure */
00721
00722     lpBI = (LPBITMAPINFOHEADER)GlobalLock(hDib);
00723     if (!lpBI)
00724     {
00725         CloseHandle(fh);
00726         return FALSE;
00727     }
00728
00729     /*  Check to see if we're dealing with an OS/2 DIB.  If so, don't */
00730     /*  save it because our functions aren't written to deal with these */
00731     /*  DIBs. */
00732
00733     if (lpBI->biSize != sizeof(BITMAPINFOHEADER))
00734     {
00735         GlobalUnlock(hDib);
00736         CloseHandle(fh);
00737         return FALSE;
00738     }
00739
00740     /*  Fill in the fields of the file header */
00741
00742     /*  Fill in file type (first 2 bytes must be "BM" for a bitmap) */
00743
00744     bmfHdr.bfType = DIB_HEADER_MARKER;  /*  "BM" */
00745
00746     /*  Calculating the size of the DIB is a bit tricky (if we want to */
00747     /*  do it right).  The easiest way to do this is to call GlobalSize() */
00748     /*  on our global handle, but since the size of our global memory may have */
00749     /*  been padded a few bytes, we may end up writing out a few too */
00750     /*  many bytes to the file (which may cause problems with some apps, */
00751     /*  like HC 3.0). */
00752     /*  */
00753     /*  So, instead let's calculate the size manually. */
00754     /*  */
00755     /*  To do this, find size of header plus size of color table.  Since the */
00756     /*  first DWORD in both BITMAPINFOHEADER and BITMAPCOREHEADER conains */
00757     /*  the size of the structure, let's use this. */
00758
00759     /*  Partial Calculation */
00760
00761     dwDIBSize = *(LPDWORD)lpBI + PaletteSize((LPSTR)lpBI);
00762
00763     /*  Now calculate the size of the image */
00764
00765     /*  It's an RLE bitmap, we can't calculate size, so trust the biSizeImage */
00766     /*  field */
00767
00768     if ((lpBI->biCompression == BI_RLE8) || (lpBI->biCompression == BI_RLE4))
00769         dwDIBSize += lpBI->biSizeImage;
00770     else
00771     {
00772         DWORD dwBmBitsSize;  /*  Size of Bitmap Bits only */
00773
00774         /*  It's not RLE, so size is Width (DWORD aligned) * Height */
00775
00776         dwBmBitsSize = WIDTHBYTES((lpBI->biWidth)*((DWORD)lpBI->biBitCount)) *
00777                 lpBI->biHeight;
00778
00779         dwDIBSize += dwBmBitsSize;
00780
00781         /*  Now, since we have calculated the correct size, why don't we */
00782         /*  fill in the biSizeImage field (this will fix any .BMP files which  */
00783         /*  have this field incorrect). */
00784
00785         lpBI->biSizeImage = dwBmBitsSize;
00786     }
00787
00788
00789     /*  Calculate the file size by adding the DIB size to sizeof(BITMAPFILEHEADER) */
00790
00791     bmfHdr.bfSize = dwDIBSize + sizeof(BITMAPFILEHEADER);
00792     bmfHdr.bfReserved1 = 0;
00793     bmfHdr.bfReserved2 = 0;
00794
00795     /*  Now, calculate the offset the actual bitmap bits will be in */
00796     /*  the file -- It's the Bitmap file header plus the DIB header, */
00797     /*  plus the size of the color table. */
00798
00799     bmfHdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + lpBI->biSize +
00800             PaletteSize((LPSTR)lpBI);
00801
00802     /*  Write the file header */
00803
00804     WriteFile(fh, (LPSTR)&bmfHdr, sizeof(BITMAPFILEHEADER), &dwWritten, NULL);
00805
00806     /*  Write the DIB header and the bits -- use local version of */
00807     /*  MyWrite, so we can write more than 32767 bytes of data */
00808
00809     WriteFile(fh, (LPSTR)lpBI, dwDIBSize, &dwWritten, NULL);
00810
00811     GlobalUnlock(hDib);
00812     CloseHandle(fh);
00813
00814     if (dwWritten == 0)
00815         return FALSE; /*  oops, something happened in the write */
00816     else
00817         return TRUE; /*  Success code */
00818 }
00819
00820
00821 /*************************************************************************
00822 /* The following functions were adapted from Microsoft examples sources
00823 /*************************************************************************/
00824
00825 /*************************************************************************
00826  *
00827  * CopyScreenToBitmap()
00828  *
00829  * Parameter:
00830  *
00831  * LPRECT lpRect    - specifies the window
00832  *
00833  * Return Value:
00834  *
00835  * HDIB             - identifies the device-dependent bitmap
00836  *
00837  * Description:
00838  *
00839  * This function copies the specified part of the screen to a device-
00840  * dependent bitmap.
00841  *
00842  * History:   Date      Author             Reason
00843  *            9/15/91   Patrick Schreiber  Created
00844  *            9/25/91   Patrick Schreiber  Added header and comments
00845  *
00846  ************************************************************************/
00847
00848 HBITMAP CopyScreenToBitmap(HWND win, LPRECT lpRect)
00849 {
00850     HDC         hScrDC, hMemDC;         /*  screen DC and memory DC */
00851     HBITMAP     hBitmap, hOldBitmap;    /*  handles to deice-dependent bitmaps */
00852     int         nX, nY, nX2, nY2;       /*  coordinates of rectangle to grab */
00853     int         nWidth, nHeight;        /*  DIB width and height */
00854     int         xScrn, yScrn;           /*  screen resolution */
00855     /*  check for an empty rectangle */
00856
00857     if (IsRectEmpty(lpRect))
00858       return NULL;
00859
00860     /*  create a DC for the screen and create */
00861     /*  a memory DC compatible to screen DC */
00862
00863     /* hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL); */
00864     /* hMemDC = CreateCompatibleDC(hScrDC); */
00865     hScrDC = GetDC(win);
00866     hMemDC = CreateCompatibleDC (hScrDC);
00867     /*  get points of rectangle to grab */
00868
00869     nX = lpRect->left;
00870     nY = lpRect->top;
00871     nX2 = lpRect->right;
00872     nY2 = lpRect->bottom;
00873
00874     /*  get screen resolution */
00875
00876     xScrn = GetDeviceCaps(hScrDC, HORZRES);
00877     yScrn = GetDeviceCaps(hScrDC, VERTRES);
00878
00879     /* make sure bitmap rectangle is visible */
00880
00881     if (nX < 0)
00882         nX = 0;
00883     if (nY < 0)
00884         nY = 0;
00885     if (nX2 > xScrn)
00886         nX2 = xScrn;
00887     if (nY2 > yScrn)
00888         nY2 = yScrn;
00889
00890     nWidth = nX2 - nX;
00891     nHeight = nY2 - nY;
00892
00893     // create a bitmap compatible with the screen DC
00894     hBitmap = CreateCompatibleBitmap(hScrDC, nWidth, nHeight);
00895
00896     // select new bitmap into memory DC
00897     hOldBitmap = SelectObject(hMemDC, hBitmap);
00898
00899     // bitblt screen DC to memory DC
00900     BitBlt(hMemDC, 0, 0, nWidth, nHeight, hScrDC, nX, nY, SRCCOPY);
00901
00902     // select old bitmap back into memory DC and get handle to
00903     // bitmap of the screen
00904
00905     hBitmap = SelectObject(hMemDC, hOldBitmap);
00906
00907     // clean up
00908
00909     ReleaseDC(win, hScrDC);
00910     DeleteDC(hMemDC);
00911
00912     // return handle to the bitmap
00913
00914     return hBitmap;
00915 }
00916
00917
00918 HBITMAP
00919 DIBToBitmap(hDIB)
00920     HBITMAP hDIB;
00921 {
00922     LPSTR       lpDIBHdr, lpDIBBits;  // pointer to DIB header, pointer to DIB bits
00923     HBITMAP     hBitmap;            // handle to device-dependent bitmap
00924     HDC         hDC;                    // handle to DC
00925
00926     if (!hDIB)
00927         return NULL;
00928
00929     /* lock memory block and get a pointer to it */
00930     lpDIBHdr = GlobalLock(hDIB);
00931     lpDIBBits = lpDIBHdr + *(LPDWORD)lpDIBHdr + PaletteSize(lpDIBHdr);
00932
00933     /* get a DC */
00934     hDC = GetDC(NULL);
00935     if (!hDC)
00936     {
00937         GlobalUnlock(hDIB);
00938         return NULL;
00939     }
00940
00941     /* create bitmap from DIB info. and bits */
00942     hBitmap = CreateDIBitmap(hDC, (LPBITMAPINFOHEADER)lpDIBHdr, CBM_INIT,
00943             lpDIBBits, (LPBITMAPINFO)lpDIBHdr, DIB_RGB_COLORS);
00944
00945
00946     ReleaseDC(NULL, hDC);
00947     GlobalUnlock(hDIB);
00948     return hBitmap;
00949 }
00950
00951 /****************************************************************************
00952  *                                                                          *
00953  *  FUNCTION   : DibFromBitmap()                                            *
00954  *                                                                          *
00955  *  PURPOSE    : Will create a global memory block in DIB format that       *
00956  *               represents the Device-dependent bitmap (DDB) passed in.    *
00957  *                                                                          *
00958  *  RETURNS    : A handle to the DIB                                        *
00959  *                                                                          *
00960  ****************************************************************************/
00961 HANDLE
00962 DDBtoDIB(hbm, biBits, hPal)
00963     HBITMAP hbm;
00964     WORD biBits;
00965     HPALETTE hPal;
00966 {
00967     BITMAP               bm;
00968     BITMAPINFOHEADER     bi;
00969     BITMAPINFOHEADER FAR *lpbi;
00970     DWORD                dwLen;
00971     HANDLE               hdib;
00972     HANDLE               h;
00973     HDC                  hdc;
00974     HPALETTE oldPal;
00975
00976     if (!hbm)
00977         return NULL;
00978
00979     GetObject(hbm,sizeof(bm),(LPSTR)&bm);
00980
00981     if (biBits == 0)
00982         biBits =  bm.bmPlanes * bm.bmBitsPixel;
00983
00984     bi.biSize               = sizeof(BITMAPINFOHEADER);
00985     bi.biWidth              = bm.bmWidth;
00986     bi.biHeight             = bm.bmHeight;
00987     bi.biPlanes             = 1;
00988     bi.biBitCount           = biBits;
00989     bi.biCompression        = BI_RGB;
00990     bi.biSizeImage          = 0;
00991     bi.biXPelsPerMeter      = 0;
00992     bi.biYPelsPerMeter      = 0;
00993     bi.biClrUsed            = 0;
00994     bi.biClrImportant       = 0;
00995
00996     dwLen  = bi.biSize + PaletteSize(&bi);
00997
00998     hdc = GetDC(NULL);
00999     oldPal = SelectPalette(hdc, hPal, FALSE);
01000     RealizePalette(hdc);
01001
01002     hdib = GlobalAlloc(GHND,dwLen);
01003
01004     if (!hdib)
01005     {
01006         SelectPalette(hdc, oldPal, FALSE);
01007         ReleaseDC(NULL, hdc);
01008         return NULL;
01009     }
01010
01011     lpbi = (VOID FAR *)GlobalLock(hdib);
01012
01013     *lpbi = bi;
01014
01015     /*  call GetDIBits with a NULL lpBits param, so it will calculate the
01016      *  biSizeImage field for us
01017      */
01018     GetDIBits(hdc, hbm, 0L, (DWORD)bi.biHeight,
01019         (LPBYTE)NULL, (LPBITMAPINFO)lpbi, (DWORD)DIB_RGB_COLORS);
01020
01021     bi = *lpbi;
01022     GlobalUnlock(hdib);
01023
01024     /* If the driver did not fill in the biSizeImage field, make one up */
01025     if (bi.biSizeImage == 0)
01026         bi.biSizeImage = WIDTHBYTES((DWORD)bm.bmWidth * biBits) * bm.bmHeight;
01027
01028     /*  realloc the buffer big enough to hold all the bits */
01029     dwLen = bi.biSize + PaletteSize(&bi) + bi.biSizeImage;
01030
01031     if (h = GlobalReAlloc(hdib,dwLen,0))
01032         hdib = h;
01033     else
01034     {
01035         GlobalFree(hdib);
01036         hdib = NULL;
01037
01038         SelectPalette(hdc, oldPal, FALSE);
01039         ReleaseDC(NULL,hdc);
01040         return hdib;
01041     }
01042
01043     /*  call GetDIBits with a NON-NULL lpBits param, and actualy get the
01044      *  bits this time
01045      */
01046     lpbi = (VOID FAR *)GlobalLock(hdib);
01047
01048     if (GetDIBits( hdc,
01049                    hbm,
01050                    0L,
01051                    (DWORD)bi.biHeight,
01052                    (LPBYTE)lpbi + (WORD)lpbi->biSize + PaletteSize(lpbi),
01053                    (LPBITMAPINFO)lpbi, (DWORD)DIB_RGB_COLORS) == 0)
01054     {
01055          GlobalUnlock(hdib);
01056          hdib = NULL;
01057          SelectPalette(hdc, oldPal, FALSE);
01058          ReleaseDC(NULL,hdc);
01059          return NULL;
01060     }
01061
01062     bi = *lpbi;
01063     GlobalUnlock(hdib);
01064
01065     SelectPalette(hdc, oldPal, FALSE);
01066     ReleaseDC(NULL,hdc);
01067     return hdib;
01068 }
01069
01070 /*************************************************************************
01071  *
01072  * Function:  ReadDIBRsrc (int)
01073  *
01074  *  Purpose:  Reads in the specified DIB file into a global chunk of
01075  *            memory.
01076  *
01077  *  Returns:  A handle to a dib (hDIB) if successful.
01078  *            NULL if an error occurs.
01079  *
01080  * Comments:  BITMAPFILEHEADER is stripped off of the DIB.  Everything
01081  *            from the end of the BITMAPFILEHEADER structure on is
01082  *            returned in the global memory handle.
01083  *
01084  *
01085  * NOTE: The DIB API were not written to handle OS/2 DIBs, so this
01086  * function will reject any file that is not a Windows DIB.
01087  *
01088  * History:   Date      Author       Reason
01089  *            9/15/91   Mark Bader   Based on DIBVIEW
01090  *            6/25/92   Mark Bader   Added check for OS/2 DIB
01091  *            7/21/92   Mark Bader   Added code to deal with bfOffBits
01092  *                                     field in BITMAPFILEHEADER
01093  *            9/11/92   Mark Bader   Fixed Realloc Code to free original mem
01094  *            1/25/94   Hung Nguyen  Changed file APIs to Win32 APIs
01095  *
01096  *************************************************************************/
01097
01098 HANDLE ReadDIBRsrc(HINSTANCE hInst, HRSRC hRsrc )
01099 {
01100     BITMAPFILEHEADER    bmfHeader;
01101     DWORD               dwBitsSize;
01102     UINT                nNumColors;   /*  Number of colors in table */
01103     HANDLE              hDIB;
01104     HANDLE              hDIBtmp;      /*  Used for GlobalRealloc() //MPB */
01105     LPBITMAPINFOHEADER  lpbi;
01106     DWORD               offBits;
01107     LPSTR               rsrcptr, beginrsrc;
01108     HGLOBAL             hg;
01109
01110     /*  get length of DIB in bytes for use when reading */
01111
01112     hg = LoadResource(hInst, hRsrc);
01113     if(hg == NULL)
01114         return NULL;
01115
01116     beginrsrc = rsrcptr = LockResource(hg);
01117     dwBitsSize = SizeofResource(hInst, hRsrc);
01118
01119     /*  Allocate memory for header & color table. We'll enlarge this */
01120     /*  memory as needed. */
01121
01122     hDIB = GlobalAlloc(GMEM_MOVEABLE, (DWORD)(sizeof(BITMAPINFOHEADER) +
01123             256 * sizeof(RGBQUAD)));
01124
01125     if (!hDIB)
01126         goto ErrExitRsrc;
01127
01128     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
01129
01130     if (!lpbi)
01131     {
01132         GlobalFree(hDIB);
01133         goto ErrExitRsrc;
01134     }
01135
01136     /*  read the BITMAPFILEHEADER from our file */
01137
01138     memcpy(&bmfHeader, rsrcptr, sizeof (BITMAPFILEHEADER));
01139     rsrcptr += sizeof (BITMAPFILEHEADER);
01140
01141     if (bmfHeader.bfType != 0x4d42)  /*  'BM' */
01142         goto ErrExit;
01143
01144     /*  read the BITMAPINFOHEADER */
01145
01146     memcpy(lpbi, rsrcptr, sizeof(BITMAPINFOHEADER));
01147     rsrcptr += sizeof (BITMAPINFOHEADER);
01148
01149     /*  Check to see that it's a Windows DIB -- an OS/2 DIB would cause */
01150     /*  strange problems with the rest of the DIB API since the fields */
01151     /*  in the header are different and the color table entries are */
01152     /*  smaller. */
01153     /*  */
01154     /*  If it's not a Windows DIB (e.g. if biSize is wrong), return NULL. */
01155
01156     if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
01157         goto ErrExit;
01158
01159     /*  Now determine the size of the color table and read it.  Since the */
01160     /*  bitmap bits are offset in the file by bfOffBits, we need to do some */
01161     /*  special processing here to make sure the bits directly follow */
01162     /*  the color table (because that's the format we are susposed to pass */
01163     /*  back) */
01164
01165     if (!(nNumColors = (UINT)lpbi->biClrUsed))
01166     {
01167         /*  no color table for 24-bit, default size otherwise */
01168
01169         if (lpbi->biBitCount != 24)
01170             nNumColors = 1 << lpbi->biBitCount; /*  standard size table */
01171     }
01172
01173     /*  fill in some default values if they are zero */
01174
01175     if (lpbi->biClrUsed == 0)
01176         lpbi->biClrUsed = nNumColors;
01177
01178     if (lpbi->biSizeImage == 0)
01179     {
01180         lpbi->biSizeImage = ((((lpbi->biWidth * (DWORD)lpbi->biBitCount) +
01181                 31) & ~31) >> 3) * lpbi->biHeight;
01182     }
01183
01184     /*  get a proper-sized buffer for header, color table and bits */
01185
01186     GlobalUnlock(hDIB);
01187     hDIBtmp = GlobalReAlloc(hDIB, lpbi->biSize + nNumColors *
01188             sizeof(RGBQUAD) + lpbi->biSizeImage, 0);
01189
01190     if (!hDIBtmp) /*  can't resize buffer for loading */
01191         goto ErrExitNoUnlock; /* MPB */
01192     else
01193         hDIB = hDIBtmp;
01194
01195     lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
01196
01197     /*  read the color table */
01198
01199     memcpy((LPSTR)(lpbi) + lpbi->biSize, rsrcptr, nNumColors * sizeof(RGBQUAD));
01200     rsrcptr += nNumColors * sizeof(RGBQUAD);
01201
01202     /*  offset to the bits from start of DIB header */
01203     offBits = lpbi->biSize + nNumColors * sizeof(RGBQUAD);
01204
01205     /*  If the bfOffBits field is non-zero, then the bits might *not* be */
01206     /*  directly following the color table in the file.  Use the value in */
01207     /*  bfOffBits to seek the bits. */
01208
01209     if (bmfHeader.bfOffBits != 0L)
01210         rsrcptr = beginrsrc + bmfHeader.bfOffBits;
01211
01212     memcpy((LPSTR)lpbi + offBits, rsrcptr, lpbi->biSizeImage);
01213     goto OKExit;
01214
01215 ErrExit:
01216     GlobalUnlock(hDIB);
01217
01218 ErrExitNoUnlock:
01219     GlobalFree(hDIB);
01220 ErrExitRsrc:
01221     FreeResource(hg);
01222     return NULL;
01223
01224 OKExit:
01225     FreeResource(hg);
01226     GlobalUnlock(hDIB);
01227     return hDIB;
01228 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPseudoPlaceHolder Member List

This is the complete list of members for UPseudoPlaceHolder, including all inherited members.

class_ID enum value | UPseudoPlaceHolder |
DoRotate(int entry) | UPseudoPlaceHolder |
fController | UPseudoPlaceHolder | [protected]
fCurrentView | UPseudoPlaceHolder | [protected]
FinishCreateSelf() | UPseudoPlaceHolder | [protected, virtual]
fViewSuite | UPseudoPlaceHolder | [protected]
fWidid | UPseudoPlaceHolder | [protected]
GetCurrentView(void) | UPseudoPlaceHolder | [inline]
ListenToMessage(MessageT inMessage, void *ioParam) | UPseudoPlaceHolder | [virtual]
SetWidID(int widid) | UPseudoPlaceHolder | [inline]
UPseudoPlaceHolder(LStream *inStream) | UPseudoPlaceHolder |
~UPseudoPlaceHolder() | UPseudoPlaceHolder | [virtual]

Generated on Sat Aug 7 22:55:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJListBox.h Source File

WinCvs/CJLib/Include/CJListBox.h

Go to the documentation of this file.
00001 // CJListBox.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.1 $
00010  * $Archive: /CodeJock/Include/CJListBox.h $
00011  *
00012  * $History: CJListBox.h $
00013  *
00014  * *****************  Version 1  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 9:36p
00016  * Created in $/CodeJock/Include
00017  *
00018  ***************************************************************************/
00020
00021 #ifndef __CJLISTBOX_H__
00022 #define __CJLISTBOX_H__
00023
00024 #if _MSC_VER >= 1000
00025 #pragma once
00026 #endif // _MSC_VER >= 1000
00027
00028 // CCJListBox is a CListBox derived class which creates a
00029 // flicker free listbox control.
00030 class _CJX_EXT_CLASS CCJListBox : public CListBox
00031 {
00032     DECLARE_DYNAMIC(CCJListBox)
00033
00034 // Construction
00035 public:
00036     CCJListBox();
00037
00038 // Attributes
00039 public:
00040
00041 // Operations
00042 public:
00043
00044 // Overrides
00045     // ClassWizard generated virtual function overrides
00046     //{{AFX_VIRTUAL(CCJListBox)
00047     //}}AFX_VIRTUAL
00048
00049 // Implementation
00050 public:
00051     virtual ~CCJListBox();
00052
00053 // Generated message map functions
00054 protected:
00055     //{{AFX_MSG(CCJListBox)
00056     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00057     afx_msg void OnPaint();
00058     //}}AFX_MSG
00059     DECLARE_MESSAGE_MAP()
00060 };
00061
00063
00064 //{{AFX_INSERT_LOCATION}}
00065 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00066
00067 #endif // __CJLISTBOX_H__
00068
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AboutDlg.cpp Source File

common/AboutDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018   * Author : Karl-Heinz Brünen <gcvs@bruenen-net.de> --- March 2002
00019  */
00020
00021 // AboutDlg.cpp : About Dialog!
00022
00023 #include "stdafx.h"
00024
00025 #if qUnix
00026 #   include "UCvsDialogs.h"
00027 #endif
00028
00029 #include "uwidget.h"
00030 #include "AboutDlg.h"
00031 #include "UCvsApp.h"
00032
00033 #ifdef _DEBUG
00034 #define new DEBUG_NEW
00035 #undef THIS_FILE
00036 static char THIS_FILE[] = __FILE__;
00037 #endif
00038
00039 UIMPLEMENT_DYNAMIC(UAboutDlg, UWidget)
00040 UBEGIN_MESSAGE_MAP(UAboutDlg, UWidget)
00041     ON_UCOMMAND(kOK, UAboutDlg::OnOk)
00042 //  ON_UCOMMAND(kAppURL, UAboutDlg::OnURL)
00043 UEND_MESSAGE_MAP()
00044
00045 int UAboutDlg::OnOk(void)
00046 {
00047     EndModal(true);
00048     return 0;
00049 }
00050
00051 int UAboutDlg::OnURL(void)
00052 {
00053     return 0;
00054 }
00055
00056 void UAboutDlg::DoDataExchange(bool fill)
00057 {
00058     UStr  appURL = "http://cvsgui.sourceforge.net";
00059     UStr  appText;
00060
00061     appText  = UCvsApp::gApp->GetAppName();
00062     appText += " ";
00063     appText += UCvsApp::gApp->GetAppVersion();
00064
00065     if(fill)
00066     {
00067         UEventSendMessage(GetWidID(), EV_SETTEXT, kAppName, (void *)(const char *)appText);
00068         UEventSendMessage(GetWidID(), EV_SETTEXT, kAppURL, (void *)(const char *)appURL);
00069     }
00070     else
00071     {
00072     }
00073 }
00074
00075
00076 void AboutDialog(void)
00077 {
00078     void *wid = UCreate_AboutDlg();
00079     const char*  appText = UCvsApp::gApp->GetAppName();
00080
00081     UAboutDlg *dlg = new UAboutDlg ();
00082     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00083     UEventSendMessage(dlg->GetWidID(), EV_SETTEXT, kUMainWidget, const_cast<char*>(appText));
00084
00085     bool res = false;
00086
00087     res = dlg->DoModal();
00088
00089     return;
00090 }
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CNoPython Member List

This is the complete list of members for CNoPython, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CNoPython(CWnd *pParent=NULL) | CNoPython |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CNoPython | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CNoPython |
InitHelpID() | CNoPython | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_remind | CNoPython |
m_url | CNoPython |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelp() | CNoPython | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CNoPython | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:55:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LineCmd.cpp Source File

common/LineCmd.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // LineCmd.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #ifdef WIN32
00027 #   include "wincvs.h"
00028 #   include "wincvs_winutil.h"
00029 #endif /* WIN32 */
00030
00031 #ifdef qMacCvsPP
00032 #   include <UModalDialogs.h>
00033 #   include <LCheckBoxGroupBox.h>
00034 #   include <LTextEditView.h>
00035 #   include <LPushButton.h>
00036 #   include <LMultiPanelView.h>
00037 #   include <LPopupGroupBox.h>
00038 #   include <LCheckBox.h>
00039 #   include <LEditText.h>
00040
00041 #   include "MacCvsConstant.h"
00042 # include "MacMisc.h"
00043 #endif /* qMacCvsPP */
00044
00045 #include "LineCmd.h"
00046 #include "MultiString.h"
00047 #include "CvsArgs.h"
00048 #include "PromptFiles.h"
00049 #include "CPStr.h"
00050 #include "CvsCommands.h"
00051 #include "MultiFiles.h"
00052 #include "ItemListDlg.h"
00053 #include "CvsRootDlg.h"
00054
00055 #include "GetPrefs.h"
00056 #include "CvsPrefs.h"
00057
00058 #if qUnix
00059 #   include "UCvsDialogs.h"
00060 #endif
00061
00063 char* sDefPrevCvsCmd[] =
00064 {
00065     "cvs --help-options",
00066     "cvs --help-commands",
00067     "cvs --help-synonyms",
00068     "cvs -H <cvs_command>",
00069     0L
00070 };
00071
00072 static CMString gPrevCvsCmd(20, "P_PrevCvsCmd", sDefPrevCvsCmd);
00073 static CMString gPrevCvsCmdDir(20, "P_PrevCvsCmdDir");
00074
00075 #ifdef WIN32
00076 #   ifdef _DEBUG
00077 #   define new DEBUG_NEW
00078 #   undef THIS_FILE
00079     static char THIS_FILE[] = __FILE__;
00080 #   endif
00081 #endif /* WIN32 */
00082
00083 #ifdef qMacCvsPP
00084 static void DoDataExchange_CmdlineMain(LWindow *theDialog, CStr & cmdline, CStr & path, bool & hasPath, bool putValue)
00085 {
00086     LCheckBox *cbox = dynamic_cast<LCheckBox*>
00087         (theDialog->FindPaneByID(item_CheckGroupPath));
00088     LEditText *epath = dynamic_cast<LEditText*>
00089         (theDialog->FindPaneByID(item_ShowPath));
00090     LTextEditView *cline = dynamic_cast<LTextEditView*>
00091         (theDialog->FindPaneByID(item_NonEmptyTextEdit));
00092
00093     if(putValue)
00094     {
00095       CStr    sysEncodedCmdLine(UTF8_to_SysEncoding(cmdline));
00096         cline->SetTextPtr((Ptr)(const char *)sysEncodedCmdLine, sysEncodedCmdLine.length());
00097         cbox->SetValue(hasPath ? Button_On : Button_Off);
00098         epath->SetDescriptor(UTF8_to_LString(path));
00099
00100         // this will take care about an empty module name
00101         theDialog->SetLatentSub(cline);
00102         //cline->AddListener(LCommander::GetTopCommander());
00103         if(cmdline.length() == 0)
00104         {
00105             LPushButton *theOK = dynamic_cast<LPushButton*>
00106                                         (theDialog->FindPaneByID(item_OK));
00107             Assert_(theOK != 0L);
00108             theOK->Disable();
00109         }
00110     }
00111     else
00112     {
00113         Handle hdl = cline->GetTextHandle();
00114         Assert_(hdl != 0L);
00115         CStr str;
00116         str.set(*hdl, GetHandleSize(hdl));
00117         cmdline = SysEncoding_to_UTF8(str);
00118
00119         LStr255 outDescriptor;
00120         epath->GetDescriptor(outDescriptor);
00121         path = LString_to_UTF8(outDescriptor);
00122         hasPath = cbox->GetValue() == Button_On;
00123     }
00124 }
00125 #endif /* qMacCvsPP */
00126
00127 #ifdef WIN32
00128 IMPLEMENT_DYNAMIC(CCmdLine_MAIN, CHHelpPropertyPage)
00129
00130 CCmdLine_MAIN::CCmdLine_MAIN(const MultiFiles* mf,
00131                              const char* lastcmd, bool hasPath, const char* lastpath,
00132                              bool addDefault, bool addSelection,
00133                              bool forceRoot, const char* cvsroot)
00134                              : m_mf(mf), m_multilineEntryDlg(mf), CHHelpPropertyPage(CCmdLine_MAIN::IDD)
00135 {
00136     //{{AFX_DATA_INIT(CCmdLine_MAIN)
00137     m_checkPath = hasPath;
00138     m_folderLoc = lastpath;
00139     m_addDefault = addDefault;
00140     m_addSelection = addSelection;
00141     m_forceRoot = forceRoot;
00142     m_cvsroot = cvsroot;
00143     //}}AFX_DATA_INIT
00144
00145     m_cmdLine = lastcmd;
00146
00147     m_hasSelection = m_mf->NumDirs() > 0;
00148
00149     m_folderLocCombo.SetItems(&gPrevCvsCmdDir);
00150     m_cvsrootCombo.SetItems(&gOldCvsroots);
00151 }
00152
00153 CCmdLine_MAIN::~CCmdLine_MAIN()
00154 {
00155 }
00156
00157 void CCmdLine_MAIN::DoDataExchange(CDataExchange* pDX)
00158 {
00159     CHHelpPropertyPage::DoDataExchange(pDX);
00160     //{{AFX_DATA_MAP(CCmdLine_MAIN)
00161     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00162     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00163     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00164     DDX_Control(pDX, IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryPlaceholder);
00165     DDX_Control(pDX, IDC_PATH, m_folderLocCombo);
00166     DDX_Control(pDX, IDC_ADD_SELECTION, m_addSelectionCheck);
00167     DDX_Control(pDX, IDC_HAS_PATH, m_checkPathCheck);
00168     DDX_Control(pDX, IDC_BROWSE_PATH, m_selFolderButton);
00169     DDX_Check(pDX, IDC_HAS_PATH, m_checkPath);
00170     DDX_Text(pDX, IDC_PATH, m_folderLoc);
00171     DDX_Check(pDX, IDC_ADD_DEFAULT, m_addDefault);
00172     DDX_Check(pDX, IDC_ADD_SELECTION, m_addSelection);
00173     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00174     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00175     //}}AFX_DATA_MAP
00176
00177     DDX_ComboMString(pDX, IDC_PATH, m_folderLocCombo);
00178     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00179
00180     if( m_checkPath )
00181     {
00182         DDV_MinChars(pDX, m_folderLoc, 1);
00183         DDV_CheckPathExists(pDX, IDC_PATH, m_folderLoc);
00184     }
00185
00186     if( m_forceRoot )
00187     {
00188         DDV_MinChars(pDX, m_cvsroot, 1);
00189     }
00190
00191     if( !pDX->m_bSaveAndValidate )
00192     {
00193         m_selFolderButton.EnableWindow(m_checkPath);
00194         m_selCvsrootButton.EnableWindow(m_forceRoot);
00195     }
00196
00197     m_multilineEntryDlg.UpdateData(pDX->m_bSaveAndValidate, m_cmdLine);
00198 }
00199
00200
00201 BEGIN_MESSAGE_MAP(CCmdLine_MAIN, CHHelpPropertyPage)
00202     //{{AFX_MSG_MAP(CCmdLine_MAIN)
00203     ON_BN_CLICKED(IDC_HAS_PATH, OnCheckpath)
00204     ON_BN_CLICKED(IDC_BROWSE_PATH, OnSelfolder)
00205     ON_BN_CLICKED(IDC_ADD_SELECTION, OnAddSelection)
00206     ON_BN_CLICKED(IDC_FORCE_CVSROOT, OnForceroot)
00207     ON_BN_CLICKED(IDC_BROWSE_CVSROOT, OnSelcvsroot)
00208     //}}AFX_MSG_MAP
00209 END_MESSAGE_MAP()
00210
00212 // CCmdLine_MAIN message handlers
00213
00215 void CCmdLine_MAIN::OnCheckpath()
00216 {
00217     const BOOL enable = m_checkPathCheck.GetCheck();
00218
00219     m_selFolderButton.EnableWindow(enable);
00220     m_folderLocCombo.EnableWindow(enable);
00221     m_addSelectionCheck.EnableWindow(!enable && m_hasSelection);
00222
00223     if( enable && m_hasSelection && m_mf )
00224     {
00225         CString strFolderLoc;
00226         m_folderLocCombo.GetWindowText(strFolderLoc);
00227
00228         if( strFolderLoc.IsEmpty() )
00229         {
00230             CStr path;
00231             if( m_mf->getdir(0, path) )
00232             {
00233                 m_folderLocCombo.SetWindowText(path.c_str());
00234             }
00235         }
00236     }
00237 }
00238
00240 void CCmdLine_MAIN::OnSelfolder()
00241 {
00242     CString strFolderLoc;
00243     m_folderLocCombo.GetWindowText(strFolderLoc);
00244
00245     CStr folderLoc(strFolderLoc);
00246     if( BrowserGetDirectory("Select where to execute", folderLoc, IsWindow(m_hWnd) ? this : NULL) )
00247     {
00248         m_folderLocCombo.SetWindowText(folderLoc);
00249     }
00250 }
00251
00253 BOOL CCmdLine_MAIN::OnInitDialog()
00254 {
00255     CHHelpPropertyPage::OnInitDialog();
00256
00257     // Extra initialization
00258     m_multilineEntryDlg.Create(kMultilineCmdLine, &gPrevCvsCmd, &m_multilineEntryPlaceholder, this);
00259
00260     EnableEditAutoComplete(m_folderLocCombo.GetEditCtrl());
00261
00262     OnCheckpath();
00263     OnAddSelection();
00264     OnForceroot();
00265
00266     return TRUE;  // return TRUE unless you set the focus to a control
00267                   // EXCEPTION: OCX Property Pages should return FALSE
00268 }
00269
00270 void CCmdLine_MAIN::InitHelpID()
00271 {
00272     SetCtrlHelpID(IDC_ADD_DEFAULT,      IDH_IDC_ADD_DEFAULT);
00273     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
00274     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
00275     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
00276     SetCtrlHelpID(IDC_HAS_PATH,         IDH_IDC_HAS_PATH);
00277     SetCtrlHelpID(IDC_ADD_SELECTION,    IDH_IDC_ADD_SELECTION);
00278     SetCtrlHelpID(IDC_PATH,             IDH_IDC_PATH);
00279     SetCtrlHelpID(IDC_BROWSE_PATH,      IDH_IDC_BROWSE_PATH);
00280 }
00281
00283 void CCmdLine_MAIN::OnAddSelection()
00284 {
00285     if( m_addSelectionCheck.IsWindowEnabled() )
00286     {
00287         const BOOL enable = m_addSelectionCheck.GetCheck() ? false : true;
00288
00289         OnCheckpath();
00290
00291         m_checkPathCheck.EnableWindow(enable);
00292         m_selFolderButton.EnableWindow(enable);
00293         m_folderLocCombo.EnableWindow(enable);
00294
00295         if( enable )
00296         {
00297             OnCheckpath();
00298         }
00299     }
00300 }
00301
00306 CString CCmdLine_MAIN::GetCmdLine() const
00307 {
00308     return m_cmdLine;
00309 }
00310
00312 void CCmdLine_MAIN::OnForceroot()
00313 {
00314     const BOOL enable = m_forceRootCheck.GetCheck();
00315
00316     m_selCvsrootButton.EnableWindow(enable);
00317     m_cvsrootCombo.EnableWindow(enable);
00318 }
00319
00321 void CCmdLine_MAIN::OnSelcvsroot()
00322 {
00323     CString strCvsroot;
00324     m_cvsrootCombo.GetWindowText(strCvsroot);
00325
00326     CStr cvsroot(strCvsroot);
00327     if( CompatGetCvsRoot(cvsroot) )
00328     {
00329         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00330     }
00331 }
00332
00333 #endif /* WIN32 */
00334
00335 #if qUnix
00336 class UCvsCmdline : public UWidget
00337 {
00338     UDECLARE_DYNAMIC(UCvsCmdline)
00339 public:
00340     UCvsCmdline() : UWidget(::UEventGetWidID()) {}
00341     virtual ~UCvsCmdline() {}
00342
00343     enum
00344     {
00345         kOK = EV_COMMAND_START, // 0
00346         kCancel,                // 1
00347         kTabGeneral             // 2
00348     };
00349
00350     virtual void DoDataExchange(bool fill);
00351
00352 protected:
00353     ev_msg int OnOK(void);
00354     ev_msg int OnCancel(void);
00355
00356     UDECLARE_MESSAGE_MAP()
00357 };
00358
00359 UIMPLEMENT_DYNAMIC(UCvsCmdline, UWidget)
00360
00361 UBEGIN_MESSAGE_MAP(UCvsCmdline, UWidget)
00362     ON_UCOMMAND(UCvsCmdline::kOK, UCvsCmdline::OnOK)
00363     ON_UCOMMAND(UCvsCmdline::kCancel, UCvsCmdline::OnCancel)
00364 UEND_MESSAGE_MAP()
00365
00366 int UCvsCmdline::OnOK(void)
00367 {
00368     EndModal(true);
00369     return 0;
00370 }
00371
00372 int UCvsCmdline::OnCancel(void)
00373 {
00374     EndModal(false);
00375     return 0;
00376 }
00377
00378 void UCvsCmdline::DoDataExchange(bool fill)
00379 {
00380     if(fill)
00381     {
00382     }
00383     else
00384     {
00385     }
00386 }
00387
00388 class UCvsCmdline_MAIN : public UWidget
00389 {
00390     UDECLARE_DYNAMIC(UCvsCmdline_MAIN)
00391 public:
00392     UCvsCmdline_MAIN(const char *lastcmd, bool hasPath,
00393                      const char *lastpath);
00394     virtual ~UCvsCmdline_MAIN() {}
00395
00396     enum
00397     {
00398         kEditCmd = EV_COMMAND_START,    // 0
00399         kCheckPath,         // 1
00400         kStatPath,          // 2
00401         kBtnPath            // 3
00402     };
00403
00404     virtual void DoDataExchange(bool fill);
00405
00406     bool m_checkpath;
00407     UStr m_cmdline;
00408     UStr m_folderloc;
00409 protected:
00410     ev_msg int OnCheckPath(void);
00411     ev_msg int OnBtnPath(void);
00412
00413     UDECLARE_MESSAGE_MAP()
00414 };
00415
00416 UIMPLEMENT_DYNAMIC(UCvsCmdline_MAIN, UWidget)
00417
00418 UBEGIN_MESSAGE_MAP(UCvsCmdline_MAIN, UWidget)
00419     ON_UCOMMAND(UCvsCmdline_MAIN::kCheckPath, UCvsCmdline_MAIN::OnCheckPath)
00420     ON_UCOMMAND(UCvsCmdline_MAIN::kBtnPath, UCvsCmdline_MAIN::OnBtnPath)
00421 UEND_MESSAGE_MAP()
00422
00423 UCvsCmdline_MAIN::UCvsCmdline_MAIN(const char *lastcmd, bool hasPath,
00424                              const char *lastpath) : UWidget(::UEventGetWidID())
00425 {
00426     m_checkpath = hasPath;
00427     m_cmdline = lastcmd;
00428     m_folderloc = lastpath;
00429 }
00430
00431 int UCvsCmdline_MAIN::OnCheckPath()
00432 {
00433     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckPath, 0L);
00434     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kStatPath, state), 0L);
00435     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kBtnPath, state), 0L);
00436     return 0;
00437 }
00438
00439 int UCvsCmdline_MAIN::OnBtnPath()
00440 {
00441     CStr dir;
00442     if( BrowserGetDirectory("Select where to execute", dir) )
00443     {
00444         UEventSendMessage(GetWidID(), EV_SETTEXT, kStatPath, (void*)dir.c_str());
00445     }
00446
00447     return 0;
00448 }
00449
00450 void UCvsCmdline_MAIN::DoDataExchange(bool fill)
00451 {
00452     if(fill)
00453     {
00454         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckPath, m_checkpath), 0L);
00455         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditCmd, (void *)(const char *)m_cmdline);
00456         UEventSendMessage(GetWidID(), EV_SETTEXT, kStatPath, (void *)(const char *)m_folderloc);
00457
00458         OnCheckPath();
00459     }
00460     else
00461     {
00462         m_checkpath = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckPath, 0L) != 0;
00463         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditCmd, &m_cmdline);
00464         UEventSendMessage(GetWidID(), EV_GETTEXT, kStatPath, &m_folderloc);
00465     }
00466 }
00467 #endif // qUnix
00468
00470 bool CompatGetCommand(const MultiFiles* mf,
00471                       CStr& cmd, CStr& dir, bool& addDefault, bool& addSelection,
00472                       bool& forceCvsroot, CStr& cvsroot)
00473 {
00474     bool userHitOK = false;
00475
00476     static CStr sLastCmdline(DEF_CVS_CMD);
00477     static CStr sLastPath("");
00478     static bool sLastHasPath = false;
00479     static bool lastAddDefault = false;
00480     static bool lastAddSelection = false;
00481     static bool lastForceCvsroot = false;
00482     static CStr sLastCvsroot("");
00483
00484     if( mf && mf->NumDirs() > 0 )
00485     {
00486         CStr path;
00487         mf->getdir(0, path);
00488
00489         FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00490     }
00491
00492 #ifdef WIN32
00493     CHHelpPropertySheet pages(_i18n("Command line settings"));
00494     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00495
00496     CCmdLine_MAIN page1(mf, sLastCmdline, sLastHasPath, sLastPath, lastAddDefault, lastAddSelection, lastForceCvsroot, sLastCvsroot);
00497     CGetPrefs_GLOBALS page2;
00498
00499     pages.AddPage(&page1);
00500     pages.AddPage(&page2);
00501
00502     if( pages.DoModal() == IDOK )
00503     {
00504         sLastCmdline = page1.GetCmdLine();
00505         sLastHasPath = page1.m_checkPath == TRUE;
00506         sLastPath = page1.m_folderLoc;
00507         lastAddDefault = page1.m_addDefault ? true : false;
00508         lastAddSelection = page1.m_addSelection ? true : false;
00509         lastForceCvsroot = page1.m_forceRoot ? true : false;
00510         sLastCvsroot = page1.m_cvsroot;
00511
00512         page2.StoreValues();
00513
00514         userHitOK = true;
00515     }
00516 #endif /* WIN32 */
00517
00518 #if qUnix
00519     void *wid = UCreate_CmdlineDlg();
00520
00521     UCvsCmdline *dlg = new UCvsCmdline();
00522     UCvsCmdline_MAIN *tab1 = new UCvsCmdline_MAIN(sLastCmdline, sLastHasPath, sLastPath);
00523     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00524     dlg->AddPage(tab1, UCvsCmdline::kTabGeneral, 0);
00525
00526     if(dlg->DoModal())
00527     {
00528         sLastCmdline = tab1->m_cmdline;
00529         sLastHasPath = tab1->m_checkpath;
00530         sLastPath = tab1->m_folderloc;
00531
00532         userHitOK = true;
00533     }
00534
00535     delete dlg;
00536 #endif // qUnix
00537
00538 #ifdef qMacCvsPP
00539     StDialogHandler theHandler(dlg_Cmdline, LCommander::GetTopCommander());
00540     LWindow *theDialog = theHandler.GetDialog();
00541     ThrowIfNil_(theDialog);
00542     static UInt16 sRuntimePanel = 1;
00543
00544     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00545         (theDialog->FindPaneByID(item_MultiViewPrefs));
00546     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00547
00548     multiView->SwitchToPanel(2);
00549     DoDataExchange_Globals(theDialog, true);
00550     multiView->SwitchToPanel(1);
00551     DoDataExchange_CmdlineMain(theDialog, sLastCmdline, sLastPath, sLastHasPath, true);
00552
00553     LCheckBox *cbox = dynamic_cast<LCheckBox*>
00554         (theDialog->FindPaneByID(item_CheckGroupPath));
00555     LPushButton *epath = dynamic_cast<LPushButton*>
00556         (theDialog->FindPaneByID(item_EditPath));
00557     LEditText *pathDisplay = dynamic_cast<LEditText*>
00558         (theDialog->FindPaneByID(item_ShowPath));
00559     epath->AddListener(&theHandler);
00560     cbox->AddListener(&theHandler);
00561
00562     groupView->SetValue(sRuntimePanel);
00563     theDialog->Show();
00564     MessageT hitMessage;
00565     while (true)
00566     {       // Let DialogHandler process events
00567         hitMessage = theHandler.DoDialog();
00568
00569         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00570             break;
00571
00572         if(hitMessage == item_CheckGroupPath || hitMessage == item_EditPath)
00573         {
00574             cbox = dynamic_cast<LCheckBox*>
00575                 (theDialog->FindPaneByID(item_CheckGroupPath));
00576             pathDisplay = dynamic_cast<LEditText*>
00577                 (theDialog->FindPaneByID(item_ShowPath));
00578             if(cbox->GetValue() == Button_Off)
00579             {
00580                 continue;
00581             }
00582
00583             if( BrowserGetDirectory("Select where to execute", dir) )
00584             {
00585                 CPStr tmp(dir.c_str());
00586                 pathDisplay->SetDescriptor(tmp);
00587             }
00588             else if(hitMessage == item_CheckGroupPath)
00589             {
00590                 cbox->SetValue(Button_Off);
00591             }
00592         }
00593
00594     }
00595     theDialog->Hide();
00596     sRuntimePanel = groupView->GetValue();
00597
00598     if(hitMessage == msg_OK)
00599     {
00600         multiView->SwitchToPanel(1);
00601         DoDataExchange_CmdlineMain(theDialog, sLastCmdline, sLastPath, sLastHasPath, false);
00602         multiView->SwitchToPanel(2);
00603         DoDataExchange_Globals(theDialog, false);
00604         Assert_(sLastCmdline.length() != 0);
00605
00606         userHitOK = true;
00607     }
00608 #endif /* qMacCvsPP */
00609
00610     if( userHitOK )
00611     {
00612         cmd = sLastCmdline;
00613         dir = sLastHasPath ? sLastPath.c_str() : 0L;
00614
00615         addDefault = lastAddDefault;
00616         addSelection = lastAddSelection;
00617
00618         forceCvsroot = lastForceCvsroot;
00619         cvsroot = lastForceCvsroot ? sLastCvsroot.c_str() : 0L;
00620
00621         if( forceCvsroot )
00622         {
00623             CStr path;
00624
00625             if( sLastHasPath )
00626             {
00627                 path = dir;
00628             }
00629             else if( addSelection && mf && mf->NumDirs() > 0)
00630             {
00631                 mf->getdir(0, path);
00632             }
00633
00634             if( !path.empty() )
00635             {
00636                 InsertLastCvsroot(path, cvsroot);
00637             }
00638         }
00639
00640         gCvsPrefs.save();
00641     }
00642
00643     return userHitOK;
00644 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTag_MAIN Member List

This is the complete list of members for CTag_MAIN, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CTag_MAIN(const MultiFiles *mf, const kTagCmdType type, const char *sLastTag, bool noRecurs, bool movDelBranch, bool checkUnmod=false, bool overwriteExisting=false) | CTag_MAIN |
DoDataExchange(CDataExchange *pDX) | CTag_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CTag_MAIN |
InitHelpID() | CTag_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_checkUnmod | CTag_MAIN |
m_checkUnmodCheck | CTag_MAIN |
m_grpBox | CTag_MAIN |
m_mf | CTag_MAIN | [private]
m_movDelBranch | CTag_MAIN |
m_noRecurs | CTag_MAIN |
m_overwriteExisting | CTag_MAIN |
m_overwriteExistingCheck | CTag_MAIN |
m_tagCombo | CTag_MAIN |
m_tagDescStatic | CTag_MAIN |
m_tagName | CTag_MAIN |
m_type | CTag_MAIN | [private]
OnBrowseTag() | CTag_MAIN | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CTag_MAIN | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CTag_MAIN() | CTag_MAIN |

Generated on Sat Aug 7 22:56:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMetaFileButton Member List

This is the complete list of members for CCJMetaFileButton, including all inherited members.

CCJMetaFileButton() | CCJMetaFileButton |
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CCJMetaFileButton | [virtual]
m_hEnhMetaFile | CCJMetaFileButton | [private]
m_hEnhMetaFileDisabled | CCJMetaFileButton | [private]
m_hEnhMetaFileFocus | CCJMetaFileButton | [private]
m_hEnhMetaFileSel | CCJMetaFileButton | [private]
OnEraseBkgnd(CDC *pDC) | CCJMetaFileButton | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CCJMetaFileButton | [protected]
OnPaint() | CCJMetaFileButton | [protected]
SetMetaFiles(HENHMETAFILE hMetaFile, HENHMETAFILE hMetaFileSel=NULL, HENHMETAFILE hMetaFileFocus=NULL, HENHMETAFILE hMetaFileDisabled=NULL) | CCJMetaFileButton | [virtual]
~CCJMetaFileButton() | CCJMetaFileButton | [virtual]

Generated on Sat Aug 7 22:49:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TMString< T > Member List

This is the complete list of members for TMString< T >, including all inherited members.

_GetBaseClass() | CPersistent | [protected, static]
begin() const | TMString< T > | [inline]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
Compare(const char *s1, const char *s2) const | TMString< T > | [protected, virtual]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
end() const | TMString< T > | [inline]
Find(const char *instr) const | TMString< T > |
CPersistent::Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | TMString< T > | [protected, virtual]
GetList(void) const | TMString< T > | [inline]
GetRuntimeClass() const | CPersistent | [virtual]
GetTimeStamp() const | CPersistent | [inline]
Insert(const char *str) | TMString< T > |
IsKindOf(const URuntimeClass *pClass) const | UObject |
list_t typedef | TMString< T > |
LoadAll(const char *only=0L) | CPersistent | [static]
m_allStrs | TMString< T > | [protected]
m_buffer | TMString< T > | [mutable, protected]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_maxStr | TMString< T > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
Remove(const char *str) | TMString< T > |
RemoveAll() | TMString< T > |
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | TMString< T > | [protected, virtual]
SizeOf(void) const | TMString< T > | [protected, virtual]
TMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TMString< T > |
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CPersistent() | CPersistent | [virtual]
~TMString() | TMString< T > | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:57:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTemplateDlg Member List

This is the complete list of members for CTemplateDlg, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CTemplateDlg(const MultiFiles *mf, CWnd *pParent=NULL) | CTemplateDlg |
DoDataExchange(CDataExchange *pDX) | CTemplateDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetTemplateText() const | CTemplateDlg |
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CTemplateDlg |
InitHelpID() | CTemplateDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_mf | CTemplateDlg | [private]
m_okButton | CTemplateDlg |
m_previewEdit | CTemplateDlg |
m_templateList | CTemplateDlg |
m_templateText | CTemplateDlg | [private]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDblclkTemplateList(NMHDR *pNMHDR, LRESULT *pResult) | CTemplateDlg | [protected]
OnHelp() | CTemplateDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CTemplateDlg | [protected, virtual]
OnItemchangedTemplateList(NMHDR *pNMHDR, LRESULT *pResult) | CTemplateDlg | [protected]
OnOK() | CTemplateDlg | [protected, virtual]
ReadSelectedTemplate(CStr &templateText) | CTemplateDlg | [private]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:56:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJReBarCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJReBarCtrl.cpp

Go to the documentation of this file.
00001 // CJReBarCtrl.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new IE4 controls'
00007 // http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:49 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/CJLibrary/CJReBarCtrl.cpp $
00015  *
00016  * $History: CJReBarCtrl.cpp $
00017  *
00018  * *****************  Version 6  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/CJLibrary
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 5  *****************
00024  * User: Kirk Stowell Date: 7/31/99    Time: 4:26p
00025  * Updated in $/CodeJockey/CJLibrary
00026  *
00027  * *****************  Version 3  *****************
00028  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00029  * Updated in $/CodeJockey/CJLibrary
00030  *
00031  * *****************  Version 2  *****************
00032  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00033  * Updated in $/CodeJockey/CJLibrary
00034  *
00035  * *****************  Version 1  *****************
00036  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00037  * Created in $/CodeJockey/CJLibrary
00038  * Copied from MFC v6 and techno preview for v5. Added to extend
00039  * functionality to Visual C++ 5.0 users.
00040  *
00041  ***************************************************************************/
00043
00044 #include "stdafx.h"
00045 #include "CJReBarCtrl.h"
00046
00047 #ifdef _DEBUG
00048 #define new DEBUG_NEW
00049 #undef THIS_FILE
00050 static char THIS_FILE[] = __FILE__;
00051 #endif
00052
00054 // CCJReBarCtrl
00055
00056 CCJReBarCtrl::CCJReBarCtrl()
00057 {
00058 }
00059
00060 BOOL CCJReBarCtrl::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd,
00061                         UINT nID)
00062 {
00063     // initialize common controls
00064 #if _MSC_VER >= 1200
00065     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_COOL_REG));
00066 #else
00067     INITCOMMONCONTROLSEX icex;
00068     icex.dwSize = sizeof(icex);
00069     icex.dwICC = ICC_COOL_CLASSES;
00070     VERIFY(InitCommonControlsEx(&icex));
00071 #endif
00072
00073     CWnd* pWnd = this;
00074     return pWnd->Create(REBARCLASSNAME, NULL, dwStyle, rect, pParentWnd, nID);
00075 }
00076
00077 CImageList* CCJReBarCtrl::GetImageList() const
00078 {
00079   REBARINFO rbi;
00080   rbi.cbSize = sizeof(rbi);
00081   rbi.fMask = RBIM_IMAGELIST;
00082   return GetBarInfo(&rbi) ? CImageList::FromHandle(rbi.himl) : NULL;
00083 }
00084
00085 BOOL CCJReBarCtrl::SetImageList(CImageList* pImageList)
00086 {
00087   REBARINFO rbi;
00088   rbi.cbSize = sizeof(rbi);
00089   rbi.fMask = RBIM_IMAGELIST;
00090   rbi.himl = (HIMAGELIST)pImageList->GetSafeHandle();
00091   return SetBarInfo(&rbi);
00092 }
00093
00094 BOOL CCJReBarCtrl::GetColorScheme(COLORSCHEME* lpcs)
00095 {
00096   lpcs->dwSize = sizeof(COLORSCHEME);
00097   return SendMessage(RB_GETCOLORSCHEME, 0, (LPARAM)lpcs);
00098 }
00099
00100 void CCJReBarCtrl::SetColorScheme(const COLORSCHEME* lpcs)
00101 {
00102   ((COLORSCHEME*)lpcs)->dwSize = sizeof(COLORSCHEME);
00103   SendMessage(RB_SETCOLORSCHEME, 0, (LPARAM)lpcs);
00104 }
00105
00107
00108 IMPLEMENT_DYNAMIC(CCJReBarCtrl, CWnd)
00109
00110
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJListBox.cpp Source File

WinCvs/CJLib/CJLibrary/CJListBox.cpp

Go to the documentation of this file.
00001 // CJListBox.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.1 $
00010  * $Archive: /CodeJock/CJLibrary/CJListBox.cpp $
00011  *
00012  * $History: CJListBox.cpp $
00013  *
00014  * *****************  Version 1  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 9:36p
00016  * Created in $/CodeJock/CJLibrary
00017  *
00018  ***************************************************************************/
00020
00021 #include "StdAfx.h"
00022 #include "CJListBox.h"
00023
00024 #ifdef _DEBUG
00025 #define new DEBUG_NEW
00026 #undef THIS_FILE
00027 static char THIS_FILE[] = __FILE__;
00028 #endif
00029
00031 // CCJListBox
00032
00033 CCJListBox::CCJListBox()
00034 {
00035     // TODO: add construction code here.
00036 }
00037
00038 CCJListBox::~CCJListBox()
00039 {
00040     // TODO: add destruction code here.
00041 }
00042
00043 IMPLEMENT_DYNAMIC(CCJListBox, CListBox)
00044
00045 BEGIN_MESSAGE_MAP(CCJListBox, CListBox)
00046     //{{AFX_MSG_MAP(CCJListBox)
00047     ON_WM_ERASEBKGND()
00048     ON_WM_PAINT()
00049     //}}AFX_MSG_MAP
00050 END_MESSAGE_MAP()
00051
00053 // CCJListBox message handlers
00054
00055 BOOL CCJListBox::OnEraseBkgnd(CDC* pDC)
00056 {
00057     // KStowell - overridden for flicker-free drawing.
00058     UNUSED_ALWAYS(pDC);
00059     return TRUE;
00060 }
00061
00062 void CCJListBox::OnPaint()
00063 {
00064     CPaintDC dc(this); // device context for painting
00065
00066     // KStowell - Get the client rect.
00067     CRect rcClient, rcClip;
00068     dc.GetClipBox( &rcClip );
00069     GetClientRect( &rcClient );
00070
00071     // KStowell - Create a memory device-context. This is done to help reduce
00072     // screen flicker, since we will paint the entire control to the
00073     // off screen device context first.
00074     CDC memDC;
00075     CBitmap bitmap;
00076     memDC.CreateCompatibleDC(&dc);
00077     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00078     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00079
00080     // KStowell - Repaint the background.
00081     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00082
00083     // let the control do its default drawing.
00084     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00085
00086     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00087     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00088         rcClip.left, rcClip.top, SRCCOPY );
00089
00090     // KStowell - Cleanup resources.
00091     memDC.SelectObject(pOldBitmap);
00092     memDC.DeleteDC();
00093     bitmap.DeleteObject();
00094 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMetaFileButton.h Source File

WinCvs/CJLib/Include/CJMetaFileButton.h

Go to the documentation of this file.
00001 // CJMetaFileButton.h : header file
00002 //
00003 // Copyright © 1999 Ian Brumby
00004 //
00005 // This source code may be used in compiled form in any way you desire.
00006 // Source file(s) may be redistributed unmodified by any means PROVIDING
00007 // they are not sold for profit without the authors expressed written consent,
00008 // and providing that this notice and the authors name and all copyright
00009 // notices remain intact.
00010 //
00011 // ==========================================================================
00012 // HISTORY:
00013 // ==========================================================================
00014 //          1.20    21 Apr 1999 - Initial release.
00015 // ==========================================================================
00016 //
00018 /****************************************************************************
00019  *
00020  * $Date: 1999/11/30 21:45:51 $
00021  * $Revision: 1.1.1.2 $
00022  * $Archive: /CodeJock/Include/CJMetaFileButton.h $
00023  *
00024  * $History: CJMetaFileButton.h $
00025  *
00026  * *****************  Version 6  *****************
00027  * User: Kirk Stowell Date: 10/31/99   Time: 11:04p
00028  * Updated in $/CodeJock/Include
00029  * Overrode OnEraseBkgnd(...) and OnPaint() for flicker free drawing.
00030  *
00031  * *****************  Version 5  *****************
00032  * User: Kirk Stowell Date: 10/26/99   Time: 10:45p
00033  * Updated in $/CodeJock/Include
00034  * Made class methods virtual for inheritance purposes.
00035  *
00036  * *****************  Version 4  *****************
00037  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00038  * Updated in $/CodeJock/Include
00039  * Added source control history to file header.
00040  *
00041  ***************************************************************************/
00043
00044 #ifndef __CJMETAFILEBUTTON_H__
00045 #define __CJMETAFILEBUTTON_H__
00046
00047 #if _MSC_VER > 1000
00048 #pragma once
00049 #endif // _MSC_VER > 1000
00050
00051 // CCJMetaFileButton is a CButton derived class which is used by
00052 // the CCJFlatTabCtrl class.
00053 class _CJX_EXT_CLASS CCJMetaFileButton : public CButton
00054 {
00055 // Construction
00056 public:
00057     CCJMetaFileButton();
00058
00059 // Attributes
00060 public:
00061
00062 // Operations
00063 public:
00064     virtual void SetMetaFiles(HENHMETAFILE hMetaFile,
00065         HENHMETAFILE hMetaFileSel = NULL,
00066         HENHMETAFILE hMetaFileFocus = NULL,
00067         HENHMETAFILE hMetaFileDisabled = NULL);
00068
00069 // Overrides
00070     // ClassWizard generated virtual function overrides
00071     //{{AFX_VIRTUAL(CCJMetaFileButton)
00072     public:
00073     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00074     //}}AFX_VIRTUAL
00075
00076 // Implementation
00077 public:
00078     virtual ~CCJMetaFileButton();
00079
00080     // Generated message map functions
00081 protected:
00082     //{{AFX_MSG(CCJMetaFileButton)
00083     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00084     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00085     afx_msg void OnPaint();
00086     //}}AFX_MSG
00087     DECLARE_MESSAGE_MAP()
00088
00089 private:
00090     HENHMETAFILE m_hEnhMetaFile;
00091     HENHMETAFILE m_hEnhMetaFileSel;
00092     HENHMETAFILE m_hEnhMetaFileFocus;
00093     HENHMETAFILE m_hEnhMetaFileDisabled;
00094 };
00095
00097
00098 //{{AFX_INSERT_LOCATION}}
00099 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00100
00101 #endif // __CJMETAFILEBUTTON_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCmdUI Member List

This is the complete list of members for UCmdUI, including all inherited members.

CanContinue(void) | UCmdUI | [inline]
Check(bool bOn=true) | UCmdUI | [virtual]
Enable(bool bOn=true) | UCmdUI | [virtual]
m_continue | UCmdUI |
m_nID | UCmdUI |
m_widget | UCmdUI |
pCmdUI | UCmdUI |
pNMHDR | UCmdUI |
SetContinue(bool state) | UCmdUI | [inline]
SetText(const char *title) | UCmdUI | [virtual]
SetTooltip(const char *tooltip) | UCmdUI | [virtual]
UCmdUI(int id) | UCmdUI | [inline]
~UCmdUI() | UCmdUI | [inline, virtual]

Generated on Sat Aug 7 22:50:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_garbage.h Source File

common/dll_garbage.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * dll_garbage.h --- memory garbage collection for the dll
00023  */
00024
00025 #ifndef DLL_GARBAGE_H
00026 #define DLL_GARBAGE_H
00027
00028 #include <stdlib.h>
00029 #ifdef WIN32
00030 #   include <malloc.h>
00031 #endif /* WIN32 */
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037 #if qCvsDebug
00038 #   define malloc(s) shl_malloc(s, __LINE__, __FILE__)
00039 #   define calloc(m, s) shl_calloc(m, s, __LINE__, __FILE__)
00040 #   define realloc(p, s) shl_realloc(p, s, __LINE__, __FILE__)
00041     void *  shl_calloc(size_t nmemb, size_t size, int line, const char *file);
00042     void *  shl_malloc(size_t size, int line, const char *file);
00043     void *  shl_realloc(void * ptr, size_t size, int line, const char *file);
00044 #else /* !qCvsDebug */
00045 #   define malloc shl_malloc
00046 #   define calloc shl_calloc
00047 #   define realloc shl_realloc
00048     void *  shl_calloc(size_t nmemb, size_t size);
00049     void *  shl_malloc(size_t size);
00050     void *  shl_realloc(void * ptr, size_t size);
00051 #endif /* !qCvsDebug */
00052
00053 #define free shl_free
00054 void shl_free(void *ptr);
00055
00056 void garbyNew(void);
00057 void garbyRemove(int verboseSummary, int verboseMemoryLeak);
00058
00059 #ifdef __cplusplus
00060 }
00061 #endif
00062
00063 #endif /* DLL_GARBAGE_H */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJListCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJListCtrl.cpp

Go to the documentation of this file.
00001 // CJListCtrl.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the CListView articles from http://www.codeguru.com/listview
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:49 $
00011  * $Revision: 1.1.1.3 $
00012  * $Archive: /CodeJock/CJLibrary/CJListCtrl.cpp $
00013  *
00014  * $History: CJListCtrl.cpp $
00015  *
00016  * *****************  Version 10  *****************
00017  * User: Kirk Stowell Date: 10/30/99   Time: 1:52p
00018  * Updated in $/CodeJock/CJLibrary
00019  * Overrode OnEraseBkgnd(...) and OnPaint(...) to handle flicker free
00020  * drawing.
00021  *
00022  * *****************  Version 9  *****************
00023  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00024  * Updated in $/CodeJock/CJLibrary
00025  * Modified resource include for static builds.
00026  *
00027  * *****************  Version 8  *****************
00028  * User: Kirk Stowell Date: 8/29/99    Time: 11:45p
00029  * Updated in $/CodeJockey/CJLibrary
00030  * Fixed memory lead with header  control allocation.
00031  *
00032  * *****************  Version 7  *****************
00033  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00034  * Updated in $/CodeJockey/CJLibrary
00035  * Added Unicode compliance, thanks to Barry Burton for his help with
00036  * this.
00037  *
00038  *
00039  * *****************  Version 6  *****************
00040  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00041  * Updated in $/CodeJockey/CJLibrary
00042  *
00043  * *****************  Version 5  *****************
00044  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00045  * Updated in $/CodeJockey/CJLibrary
00046  *
00047  * *****************  Version 4  *****************
00048  * User: Kirk Stowell Date: 6/12/99    Time: 2:29a
00049  * Updated in $/CodeJockey/CJ60Lib
00050  * Cleaned up initialization, sorting and column info saving. Removed sort
00051  * functions, which were replaced with the virtual function SortList(...).
00052  * Override this function in your derived class to perform custom sorting.
00053  * See CCJShellList for an implementation of this virtual function.
00054  *
00055  * *****************  Version 3  *****************
00056  * User: Kirk Stowell Date: 4/03/99    Time: 8:38p
00057  * Updated in $/CodeJockey/CJ60Lib
00058  * Added comments and cleaned up code.
00059  *
00060  * *****************  Version 2  *****************
00061  * User: Kirk Stowell Date: 3/03/99    Time: 8:37p
00062  * Updated in $/CodeJockey/CJ60Lib
00063  * Added InitializeFlatHeader() in order to initialize the list control
00064  * manually.
00065  *
00066  * *****************  Version 1  *****************
00067  * User: Kirk Stowell Date: 1/16/99    Time: 8:37p
00068  * Created in $/CodeJockey/CJ60Lib
00069  * Initial release.
00070  *
00071  ***************************************************************************/
00073
00074 #include "stdafx.h"
00075 #include "CJListCtrl.h"
00076 #include "CJFlatHeaderCtrl.h"
00077 #include "CJResource.h"
00078
00079 #ifdef _DEBUG
00080 #define new DEBUG_NEW
00081 #undef THIS_FILE
00082 static char THIS_FILE[] = __FILE__;
00083 #endif
00084
00086 // CCJListCtrl
00087
00088 CCJListCtrl::CCJListCtrl()
00089 {
00090     m_nMinSize      = 0;
00091     m_nMinColWidth  = 50;
00092     m_nMaxColWidth  = 500;
00093     m_nSortedCol    = -1;
00094     m_bAscending    = true;
00095     m_bAutoSave     = false;
00096     m_bNoColSizing  = false;
00097     m_pHeaderCtrl   = NULL;
00098     m_clrText       = ::GetSysColor(COLOR_WINDOWTEXT);
00099     m_clrTextBk     = ::GetSysColor(COLOR_WINDOW);
00100 }
00101
00102 CCJListCtrl::~CCJListCtrl()
00103 {
00104     _delete( m_pHeaderCtrl );
00105 }
00106
00107 IMPLEMENT_DYNAMIC(CCJListCtrl, CListCtrl)
00108
00109 BEGIN_MESSAGE_MAP(CCJListCtrl, CListCtrl)
00110     //{{AFX_MSG_MAP(CCJListCtrl)
00111     ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw)
00112     ON_WM_DESTROY()
00113     ON_WM_ERASEBKGND()
00114     ON_WM_PAINT()
00115     //}}AFX_MSG_MAP
00116 END_MESSAGE_MAP()
00117
00119 // CCJListCtrl message handlers
00120
00121 // Taken from: Copying/Moving Rows in CListCtrl by James Spibey [spib@bigfoot.com].
00122 // http://www.codeguru.com/listview/moving_rows.html
00123 bool CCJListCtrl::MoveRow(int nFrom, int nTo)
00124 {
00125     //Can't move to the same place, or from or to a negative index
00126     if(nFrom == nTo || nFrom < 0 || nTo < 0)
00127         return false;
00128
00129     //First Copy the row to the new location
00130     if(CopyRow(nFrom, nTo))
00131     {
00132         //If we have just inserted a row before
00133         //this one in the list, we need to increment
00134         //our index.
00135         if(nFrom > nTo)
00136             DeleteItem(nFrom + 1);
00137         else
00138             DeleteItem(nFrom);
00139
00140         return true;
00141     }
00142     else
00143         return false;
00144 }
00145
00146 // Taken from: Copying/Moving Rows in CListCtrl by James Spibey [spib@bigfoot.com].
00147 // http://www.codeguru.com/listview/moving_rows.html
00148 bool CCJListCtrl::CopyRow(int nFrom, int nTo)
00149 {
00150     //Can't move to the same place, or from or to a negative index
00151     if(nFrom == nTo || nFrom < 0 || nTo < 0)
00152         return false;
00153
00154     //Copy the row to the new index
00155     InsertItem(nTo, GetItemText(nFrom, 0));
00156
00157     //If row has been inserted before original
00158     //increment the original
00159     if(nFrom > nTo)
00160         nFrom++;
00161
00162     //Loop through subitems
00163     for(int i = 1; i < GetColumnCount(); i++)
00164     {
00165         SetItemText(nTo, i, GetItemText(nFrom, i));
00166     }
00167
00168     return true;
00169 }
00170
00171 // Taken from: Getting the number of columns in report view by Zafir Anjum.
00172 // http://www.codeguru.com/listview/num_cols.shtml
00173 int CCJListCtrl::GetColumnCount() const
00174 {
00175     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00176     return pHeader->GetItemCount();
00177 }
00178
00179 // Taken from: Simpler way to do this (using new version of Comctl32.dll) by Vidas [vibal@lrtc.lt].
00180 // http://www.codeguru.com/mfc/comments/6432.shtml
00181 void CCJListCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)
00182 {
00183     LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pNMHDR;
00184
00185     switch(lplvcd->nmcd.dwDrawStage)
00186     {
00187     case CDDS_PREPAINT:
00188         // Request prepaint notifications for each item.
00189         *pResult = CDRF_NOTIFYITEMDRAW;
00190         break;
00191
00192     case CDDS_ITEMPREPAINT: // Requested notification
00193         if(lplvcd->nmcd.dwItemSpec % 2)
00194         {
00195             lplvcd->clrText   = m_clrText;
00196             lplvcd->clrTextBk = m_clrTextBk;
00197         }
00198         *pResult = CDRF_DODEFAULT;
00199         break;
00200     }
00201 }
00202
00203 BOOL CCJListCtrl::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
00204 {
00205     HD_NOTIFY *pHDNotify = (HD_NOTIFY*)lParam;
00206
00207     switch( pHDNotify->hdr.code )
00208     {
00209     // Sorting the list when user clicks on column header by Zafir Anjum.
00210     // http://www.codeguru.com/listview/sort_on_col_click.shtml
00211     case HDN_ITEMCLICKA:
00212     case HDN_ITEMCLICKW:
00213         {
00214             if( pHDNotify->iButton == 0 )
00215             {
00216                 // set the sort order.
00217                 if( pHDNotify->iItem == m_nSortedCol )
00218                     m_bAscending = !m_bAscending;
00219                 else
00220                     m_bAscending = true;
00221
00222                 // save the column index.
00223                 m_nSortedCol = pHDNotify->iItem;
00224
00225                 // virtual call to sort list.
00226                 SortList( m_nSortedCol, m_bAscending );
00227
00228                 // set the sort image in the header control.
00229                 if( m_pHeaderCtrl && m_pHeaderCtrl->GetSafeHwnd( ))
00230                     m_pHeaderCtrl->SetSortImage( m_nSortedCol, m_bAscending );
00231             }
00232         }
00233         break;
00234
00235     // How to force a minimum column width Cees Mechielsen.
00236     // http://www.codeguru.com/mfc/comments/866.shtml
00237     case HDN_ITEMCHANGINGA:
00238     case HDN_ITEMCHANGINGW:
00239     case HDN_ENDTRACK:
00240         {
00241             if( pHDNotify->pitem->mask & HDI_WIDTH &&
00242                 pHDNotify->pitem->cxy < m_nMinSize &&
00243                 pHDNotify->pitem->cxy >= 0 )
00244             {
00245                 pHDNotify->pitem->cxy = m_nMinSize; // Set the column width
00246             }
00247         }
00248         break;
00249
00250     // Prevent CListCtrl column resizing by Zafir Anjum.
00251     // http://www.codeguru.com/listview/no_col_resize.shtml
00252     case HDN_DIVIDERDBLCLICKA:
00253     case HDN_DIVIDERDBLCLICKW:
00254     case HDN_BEGINTRACKW:
00255     case HDN_BEGINTRACKA:
00256         {
00257             if(m_bNoColSizing)
00258             {
00259                 *pResult = TRUE;                // disable tracking
00260                 return TRUE;                    // Processed message
00261             }
00262             break;
00263         }
00264     }
00265
00266     return CListCtrl::OnNotify(wParam, lParam, pResult);
00267 }
00268
00269 bool CCJListCtrl::SortList(int nCol, bool bAscending)
00270 {
00271 #ifdef _DEBUG
00272     TRACE2("Column sort on column index %d, ascending=%d", nCol, bAscending);
00273 #else
00274     UNUSED_ALWAYS( nCol );
00275     UNUSED_ALWAYS( bAscending );
00276 #endif
00277
00278     return true;
00279 }
00280
00281 // Taken from: Adding a column by Zafir Anjum.
00282 // http://www.codeguru.com/listview/add_column.shtml
00283
00284 // AddColumn      - adds column after the right most column
00285 // Returns        - the index of the new column if successful or -1 otherwise.
00286 // lpszColHeading - the column's heading
00287 // nWidth         - Width of the column, in pixels. If this parameter is -1,
00288 //                  the column width is the same as previous column
00289 // nFormat        - the alignment of the column. Can be LVCFMT_LEFT,
00290 //                  LVCFMT_RIGHT, or LVCFMT_CENTER.
00291 int CCJListCtrl::AddColumn(LPCTSTR lpszColHeading, int nWidth/*=-1*/, int nFormat/*=LVCFMT_LEFT*/)
00292 {
00293     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00294     int nColumnCount = pHeader->GetItemCount();
00295
00296     if( nWidth == -1 )
00297     {
00298         // The line below return zero for ICON views
00299         //nWidth = GetColumnWidth( nColumnCount - 1 );
00300
00301         // Get the column width of the previous column from header control
00302         HD_ITEM hd_item;
00303         hd_item.mask = HDI_WIDTH;               //indicate that we want the width
00304         pHeader->GetItem( nColumnCount - 1, &hd_item );
00305         nWidth = hd_item.cxy;
00306     }
00307     return InsertColumn( nColumnCount, lpszColHeading, nFormat, nWidth, nColumnCount );
00308 }
00309
00310 bool CCJListCtrl::BuildColumns(int nCols, int* nWidth, int* nColString)
00311 {
00312     for( int i = 0; i < nCols; ++i ) {
00313         CString strTemp; strTemp.LoadString( nColString[i] );
00314         if(AddColumn(strTemp, nWidth[i])==-1)
00315             return false;
00316     }
00317
00318     return true;
00319 }
00320
00321 bool CCJListCtrl::BuildColumns(int nCols, int* nWidth, CString* strColString)
00322 {
00323     for( int i = 0; i < nCols; ++i ) {
00324         if(AddColumn(strColString[i], nWidth[i])==-1)
00325             return false;
00326     }
00327
00328     return true;
00329 }
00330
00331 // Taken from: Detecting column index of the item clicked by Zafir Anjum.
00332 // http://www.codeguru.com/listview/col_index.shtml
00333
00334 // HitTestEx    - Determine the row index and column index for a point
00335 // Returns      - the row index or -1 if point is not over a row
00336 // point        - point to be tested.
00337 // nCol         - to hold the column index
00338 int CCJListCtrl::HitTestEx(CPoint& point, int* nCol) const
00339 {
00340     int colnum = 0;
00341     int row = HitTest( point, NULL );
00342
00343     if( nCol ) *nCol = 0;
00344
00345     // Make sure that the ListView is in LVS_REPORT
00346     if( (GetWindowLong(m_hWnd, GWL_STYLE) & LVS_TYPEMASK) != LVS_REPORT )
00347         return row;
00348
00349     // Get the top and bottom row visible
00350     row = GetTopIndex();
00351     int bottom = row + GetCountPerPage();
00352     if( bottom > GetItemCount() )
00353         bottom = GetItemCount();
00354
00355     // Get the number of columns
00356     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00357     int nColumnCount = pHeader->GetItemCount();
00358
00359     // Loop through the visible rows
00360     for( ;row <= bottom;row++)
00361     {
00362         // Get bounding rect of item and check whether point falls in it.
00363         CRect rect;
00364         GetItemRect( row, &rect, LVIR_BOUNDS );
00365         if( rect.PtInRect(point) )
00366         {
00367             // Now find the column
00368             for( colnum = 0; colnum < nColumnCount; colnum++ )
00369             {
00370                 int colwidth = GetColumnWidth(colnum);
00371                 if( point.x >= rect.left
00372                     && point.x <= (rect.left + colwidth ) )
00373                 {
00374                     if( nCol ) *nCol = colnum;
00375                     return row;
00376                 }
00377                 rect.left += colwidth;
00378             }
00379         }
00380     }
00381     return -1;
00382 }
00383
00384 bool CCJListCtrl::SubclassHeader(bool bBoldFont/*=false*/)
00385 {
00386     // allocate memory for the flat header.
00387     m_pHeaderCtrl = new CCJFlatHeaderCtrl;
00388     ASSERT( m_pHeaderCtrl );
00389
00390     // get the window handle to the existing header
00391     // control.
00392     HWND hWnd = GetDlgItem(0)->GetSafeHwnd();
00393     ASSERT( hWnd );
00394
00395     // subclass the flat header control.
00396     if( !m_pHeaderCtrl->SubclassWindow( hWnd ))
00397         return false;
00398
00399     // finish header initialization.
00400     m_pHeaderCtrl->InitializeHeader( bBoldFont );
00401
00402     return true;
00403 }
00404
00405 void CCJListCtrl::AutoSaveColumns(LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault)
00406 {
00407     m_bAutoSave = true;
00408
00409     // initialize registry strings.
00410     if( lpszSection == NULL ) m_strSection = _T("Settings");
00411     else m_strSection = lpszSection;
00412
00413     if( lpszEntry == NULL ) m_strEntry = _T("Column Info");
00414     else m_strEntry = lpszEntry;
00415
00416     if( lpszDefault == NULL ) m_strDefault = _T("");
00417     else m_strDefault = lpszDefault;
00418
00419     LoadColumnWidths();
00420 }
00421
00422 void CCJListCtrl::SaveColumnWidths()
00423 {
00424     // get a pointer to the header control.
00425     CHeaderCtrl* pHeader = DYNAMIC_DOWNCAST(CHeaderCtrl, GetDlgItem(0));
00426     ASSERT_KINDOF( CHeaderCtrl, pHeader );
00427
00428     CString strValue;
00429     for( int i = 0; i < pHeader->GetItemCount(); ++i )
00430     {
00431         CString strTemp;
00432         strTemp.Format(_T("%d,"), GetColumnWidth( i ));
00433         strValue += strTemp;
00434     }
00435
00436     AfxGetApp()->WriteProfileString( m_strSection, m_strEntry, strValue );
00437 }
00438
00439 void CCJListCtrl::LoadColumnWidths()
00440 {
00441     // get a pointer to the header control.
00442     CHeaderCtrl* pHeader = DYNAMIC_DOWNCAST(CHeaderCtrl, GetDlgItem(0));
00443     ASSERT_KINDOF( CHeaderCtrl, pHeader );
00444
00445     for( int i = 0; i < pHeader->GetItemCount(); ++i )
00446         SetColumnWidth(i);
00447 }
00448
00449 void CCJListCtrl::SetColumnWidth(int nCol)
00450 {
00451     int nWidth = GetStoredWidth( nCol );
00452     if( nWidth > m_nMinColWidth )
00453         CListCtrl::SetColumnWidth( nCol, nWidth );
00454     else
00455         AutoSizeColumn( nCol );
00456 }
00457
00458 int CCJListCtrl::GetStoredWidth(int nCol)
00459 {
00460     // get the value from the registry.
00461     CString strValue = AfxGetApp()->GetProfileString(
00462         m_strSection, m_strEntry, m_strDefault );
00463
00464     // extract the sub string to get the column width.
00465     CString strSubString;
00466     AfxExtractSubString( strSubString, strValue, nCol, _T(','));
00467
00468     // return the width from the registry.
00469     return _ttoi( strSubString );
00470 }
00471
00472 void CCJListCtrl::OnDestroy()
00473 {
00474     if( m_bAutoSave ) SaveColumnWidths();
00475     CListCtrl::OnDestroy();
00476 }
00477
00478 // Taken from: Autosize a column to fit its content by Roger Onslow.
00479 // http://www.codeguru.com/listview/autosize_col.shtml
00480 // If you don't supply a column number, it will resize all columns.
00481 void CCJListCtrl::AutoSizeColumn(int nCol/*=-1*/)
00482 {
00483     // Call this after your list control is filled
00484     SetRedraw( false );
00485
00486     int nMinCol = nCol < 0 ? 0 : nCol;
00487     int nMaxCol = nCol < 0 ? GetColumnCount()-1 : nCol;
00488
00489     for (nCol = nMinCol; nCol <= nMaxCol; nCol++)
00490     {
00491         CListCtrl::SetColumnWidth( nCol, LVSCW_AUTOSIZE );
00492         int wc1 = GetColumnWidth( nCol );
00493
00494         CListCtrl::SetColumnWidth( nCol, LVSCW_AUTOSIZE_USEHEADER );
00495         int wc2 = GetColumnWidth( nCol );
00496         int wc = max( m_nMinColWidth, max( wc1, wc2 ));
00497
00498         if( wc > m_nMaxColWidth )
00499             wc = m_nMaxColWidth;
00500
00501         // set the column width.
00502         CListCtrl::SetColumnWidth( nCol,wc );
00503     }
00504
00505     SetRedraw();
00506 }
00507
00508 BOOL CCJListCtrl::OnEraseBkgnd(CDC* pDC)
00509 {
00510     // KStowell - overridden for flicker-free drawing.
00511     UNUSED_ALWAYS(pDC);
00512     return TRUE;
00513 }
00514
00515 void CCJListCtrl::OnPaint()
00516 {
00517     CPaintDC dc(this); // device context for painting
00518
00519     // KStowell - Get the client rect.
00520     CRect rcClient, rcClip;
00521     dc.GetClipBox( &rcClip );
00522     GetClientRect( &rcClient );
00523
00524     // Exclude the header control from being painted over.
00525     CWnd* pWnd = GetDlgItem(0);
00526     if(pWnd && pWnd->IsWindowVisible()) {
00527         CRect rcItem;
00528         pWnd->GetClientRect(&rcItem);
00529         dc.ExcludeClipRect(&rcItem);
00530     }
00531
00532     // KStowell - Create a memory device-context. This is done to help reduce
00533     // screen flicker, since we will paint the entire control to the
00534     // off screen device context first.
00535     CDC memDC;
00536     CBitmap bitmap;
00537     memDC.CreateCompatibleDC(&dc);
00538     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00539     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00540
00541     // KStowell - Repaint the background.
00542     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00543
00544     // let the control do its default drawing.
00545     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00546
00547     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00548     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00549         rcClip.left, rcClip.top, SRCCOPY );
00550
00551     // KStowell - Cleanup resources.
00552     memDC.SelectObject(pOldBitmap);
00553     memDC.DeleteDC();
00554     bitmap.DeleteObject();
00555 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJFrameWnd Member List

This is the complete list of members for CCJFrameWnd, including all inherited members.

brdrAllRaised enum value | CCJFrameWnd | [protected]
brdrFlatAll enum value | CCJFrameWnd | [protected]
brdrFlatBottom enum value | CCJFrameWnd | [protected]
brdrFlatHorizontal enum value | CCJFrameWnd | [protected]
brdrFlatLeft enum value | CCJFrameWnd | [protected]
brdrFlatRight enum value | CCJFrameWnd | [protected]
brdrFlatTop enum value | CCJFrameWnd | [protected]
brdrFlatVertical enum value | CCJFrameWnd | [protected]
CCJFrameWnd() | CCJFrameWnd |
DockControlBarLeftOf(CControlBar *Bar, CControlBar *LeftOf) | CCJFrameWnd | [virtual]
DockFlatBorders enum name | CCJFrameWnd | [protected]
DockSizeBar(CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL) | CCJFrameWnd | [virtual]
dwDockBarMap | CCJFrameWnd | [protected, static]
EnableDocking(DWORD dwDockStyle) | CCJFrameWnd | [virtual]
EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised) | CCJFrameWnd | [virtual]
InitializeMenu(UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0) | CCJFrameWnd | [virtual]
InitializeMenu(UINT nMenuID, UINT nToolbarID=NULL) | CCJFrameWnd | [virtual]
LoadBarState(LPCTSTR lpszProfileName) | CCJFrameWnd | [virtual]
m_menu | CCJFrameWnd | [protected]
m_wndMenuBar | CCJFrameWnd | [protected]
NewMenu(UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0) | CCJFrameWnd | [protected, virtual]
NewMenu(UINT nMenuID, UINT nToolbarID=NULL) | CCJFrameWnd | [protected, virtual]
OnClose() | CCJFrameWnd | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJFrameWnd | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJFrameWnd | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJFrameWnd | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCJFrameWnd | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs, UINT nIconID) | CCJFrameWnd | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CCJFrameWnd | [virtual]
RecalcAllExcept(CCJSizeDockBar *pBar) | CCJFrameWnd | [virtual]
RecalcLayout(BOOL bNotify=TRUE) | CCJFrameWnd | [virtual]
SaveBarState(LPCTSTR lpszProfileName) const | CCJFrameWnd | [virtual]
~CCJFrameWnd() | CCJFrameWnd | [virtual]

Generated on Sat Aug 7 22:49:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/Splash.h Source File

WinCvs/Splash.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // CG: This file was added by the Splash Screen component.
00022
00023 #ifndef _SPLASH_SCRN_
00024 #define _SPLASH_SCRN_
00025
00026 // Splash.h : header file
00027 //
00028
00030 //   Splash Screen class
00031
00032 class CSplashWnd : public CWnd
00033 {
00034 // Construction
00035 protected:
00036     CSplashWnd();
00037
00038 // Attributes:
00039 public:
00040     CBitmap m_bitmap;
00041
00042 // Operations
00043 public:
00044     static void EnableSplashScreen(BOOL bEnable = TRUE);
00045     static void ShowSplashScreen(CWnd* pParentWnd = NULL);
00046     static BOOL PreTranslateAppMessage(MSG* pMsg);
00047
00048 // Overrides
00049     // ClassWizard generated virtual function overrides
00050     //{{AFX_VIRTUAL(CSplashWnd)
00051     //}}AFX_VIRTUAL
00052
00053 // Implementation
00054 public:
00055     ~CSplashWnd();
00056     virtual void PostNcDestroy();
00057
00058 protected:
00059     BOOL Create(CWnd* pParentWnd = NULL);
00060     void HideSplashScreen();
00061     static BOOL c_bShowSplashWnd;
00062     static CSplashWnd* c_pSplashWnd;
00063
00064 // Generated message map functions
00065 protected:
00066     //{{AFX_MSG(CSplashWnd)
00067     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00068     afx_msg void OnPaint();
00069     afx_msg void OnTimer(UINT nIDEvent);
00070     //}}AFX_MSG
00071     DECLARE_MESSAGE_MAP()
00072 };
00073
00074
00075 #endif
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CDiff_MAIN Member List

This is the complete list of members for CDiff_MAIN, including all inherited members.

CDiff_MAIN(const MultiFiles *mf, kDiffCmdType diffType, const char *rev1, const char *rev2, bool allowExtDiff, bool useExtDiff, bool unifiedDiff, bool noWhiteSpace, bool ignoreCase, const char *keyword, const char *diffOptions) | CDiff_MAIN |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CDiff_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableCmdLineDiffOptions(bool enable) | CDiff_MAIN | [private]
EnableCompareType(const int compareType) | CDiff_MAIN | [private]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CDiff_MAIN |
InitHelpID() | CDiff_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsDefaultedRev(const CComboBox *comboBox) | CDiff_MAIN | [private]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
kDefRev1Change enum value | CDiff_MAIN | [private]
kDefRev2Change enum value | CDiff_MAIN | [private]
kDefTypeChange enum value | CDiff_MAIN | [private]
kInputChange enum name | CDiff_MAIN | [private]
m_allowExtDiff | CDiff_MAIN | [private]
m_browseTag1Button | CDiff_MAIN |
m_browseTag2Button | CDiff_MAIN |
m_compareType | CDiff_MAIN |
m_compareTypeCombo | CDiff_MAIN |
m_diffOptions | CDiff_MAIN |
m_diffOptionsCombo | CDiff_MAIN |
m_diffType | CDiff_MAIN | [private]
m_extDiff | CDiff_MAIN |
m_extDiffButton | CDiff_MAIN |
m_ignoreCase | CDiff_MAIN |
m_ignoreCaseCheck | CDiff_MAIN |
m_isDate1 | CDiff_MAIN |
m_isDate1Check | CDiff_MAIN |
m_isDate2 | CDiff_MAIN |
m_isDate2Check | CDiff_MAIN |
m_keyword | CDiff_MAIN |
m_keywordCombo | CDiff_MAIN |
m_keywordDescStatic | CDiff_MAIN |
m_mf | CDiff_MAIN | [private]
m_noRecurs | CDiff_MAIN |
m_noRecursCheck | CDiff_MAIN |
m_noWhiteSpace | CDiff_MAIN |
m_noWhiteSpaceCheck | CDiff_MAIN |
m_optionsMenuButton | CDiff_MAIN |
m_rev1 | CDiff_MAIN |
m_rev1Combo | CDiff_MAIN |
m_rev2 | CDiff_MAIN |
m_rev2Combo | CDiff_MAIN |
m_unifiedDiff | CDiff_MAIN |
m_unifiedDiffCheck | CDiff_MAIN |
OnBrowseTag1() | CDiff_MAIN | [protected]
OnBrowseTag2() | CDiff_MAIN | [protected]
OnCheck1() | CDiff_MAIN | [protected]
OnCheck2() | CDiff_MAIN | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnExtdiff() | CDiff_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CDiff_MAIN | [protected, virtual]
OnOptionsmenu() | CDiff_MAIN | [protected]
OnSelchangeCompareType() | CDiff_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
SetDefaultInput(const kInputChange inputChange, const int compareType) | CDiff_MAIN | [private]
ShowHelp() | CHHelpSupport |
~CDiff_MAIN() | CDiff_MAIN |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:51:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJControlBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJControlBar.cpp

Go to the documentation of this file.
00001 // CJControlBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2000/06/26 17:17:16 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/CJLibrary/CJControlBar.cpp $
00011  *
00012  * $History: CJControlBar.cpp $
00013  *
00014  * *****************  Version 22  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:18p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Overrode OnEraseBkgnd(...) and OnPaint() to handle flicker free
00018  * drawing. Made additional modifications to load and save bar state
00019  * methods.
00020  *
00021  * Modified resource include for static builds.
00022  *
00023  * Enabled OnInitialUpdate() to be called for view classes added to a
00024  * CCJTabCtrlBar while the control bar is floating.
00025  *
00026  * Fixed potential resource and memory leak problems.
00027  *
00028  * Overloaded EnableFlatLook() method so that the gripper, frame buttons
00029  * and borders can be set flat individually.  Added inline function
00030  * EnableSaveState() which can be used to enable or disable the restore
00031  * bar state.
00032  *
00033  * Fixed bug with save / restore bar state, and with saved bar size
00034  * changing whenever the application starts.
00035  *
00036  * Fixed small initialization bug.
00037  *
00038  * *****************  Version 21  *****************
00039  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00040  * Updated in $/CodeJockey/CJLibrary
00041  * Updated copyright and contact information.
00042  *
00043  * *****************  Version 20  *****************
00044  * User: Kirk Stowell Date: 8/30/99    Time: 12:40a
00045  * Updated in $/CodeJockey/CJLibrary
00046  * Gero Kuehn <gero.kuehn@isc-soft.de> - Added check to see if tooltips
00047  * are valid before setting text.
00048  *
00049  * *****************  Version 19  *****************
00050  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00051  * Updated in $/CodeJockey/CJLibrary
00052  * Added Unicode compliance, thanks to Barry Burton for his help with
00053  * this.
00054  *
00055  *
00056  * *****************  Version 18  *****************
00057  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00058  * Updated in $/CodeJockey/CJLibrary
00059  *
00060  * *****************  Version 17  *****************
00061  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00062  * Updated in $/CodeJockey/CJLibrary
00063  *
00064  * *****************  Version 16  *****************
00065  * User: Kirk Stowell Date: 7/18/99    Time: 10:23p
00066  * Updated in $/CodeJockey/CJLibrary
00067  * Added derived button class to handle control bar caption button
00068  * updates. Cleaned up inline functions, and import/export macro so that
00069  * class will be imported when linked to, and exported at compile time.
00070  * Added save and restore control bar size and state functionality.
00071  *
00072  * *****************  Version 15  *****************
00073  * User: Kirk Stowell Date: 6/11/99    Time: 8:24p
00074  * Updated in $/CodeJockey/CJ60Lib
00075  * Slight modification made to popup menu code.
00076  *
00077  * *****************  Version 14  *****************
00078  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00079  * Updated in $/CodeJockey/CJ60Lib
00080  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00081  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00082  * message handler, this is now automatically handled by the base class.
00083  * Added redraw flags to the create method and modified paint and layout
00084  * handlers to reduce flicker and un-necessary command handling. Dragging
00085  * rect now reflects actual control bar docked size. Added "flat" look to
00086  * the control bars, the control bars can now use the classic DevStudio
00087  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00088  * docking windows now handle dragging, docking and floating much better,
00089  * and behave more like DevStudio.
00090  *
00091  * *****************  Version 13  *****************
00092  * User: Kirk Stowell Date: 5/17/99    Time: 8:33p
00093  * Updated in $/CodeJockey/CJ60Lib
00094  * Removed Invalidate() from OnWindowPosChanged(..) and OnEraseBkgnd(..)
00095  * which seemed to cause painting problems.
00096  *
00097  * *****************  Version 12  *****************
00098  * User: Kirk Stowell Date: 5/03/99    Time: 9:52p
00099  * Updated in $/CodeJockey/CJ60Lib
00100  * Changed gripper and button macros to enums. Renamed popup member
00101  * variables to begin with popup, this will be consistent throughout all
00102  * classes. Added m_nPos member variable which can be set to the index of
00103  * the popup menu in the menu resource. Removed windows message handler
00104  * ON_WM_CONTEXTMENU(), and added handlers ON_WM_RBUTTONDOWN(),
00105  * ON_WM_MEASUREITEM(), ON_WM_MENUCHAR() and ON_WM_INITMENUPOPUP() to
00106  * support the CCJMenu popup. Added WS_CLIPSIBLINGS to control bar style.
00107  * Changed OnEraseBkgnd(CDC* pDC) to only draw client area when a child is
00108  * not present.
00109  *
00110  * *****************  Version 11  *****************
00111  * User: Kirk Stowell Date: 4/14/99    Time: 12:54p
00112  * Updated in $/CodeJockey/CJ60Lib
00113  * Modified context menu to use Brent Corkum's BCMenu (CCJMenu).
00114  *
00115  * *****************  Version 10  *****************
00116  * User: Kirk Stowell Date: 4/03/99    Time: 12:52p
00117  * Updated in $/CodeJockey/CJ60Lib
00118  * Added comments and cleaned up code.
00119  *
00120  * *****************  Version 9  *****************
00121  * User: Kirk Stowell Date: 3/13/99    Time: 12:54p
00122  * Updated in $/CodeJockey/CJ60Lib
00123  * Patrick Bergeron [patb@softimage.com] fixed the following bugs:
00124  *
00125  * I had a dialog nested in a CJControlBar. Unfortunately when I tried to
00126  * dock it to the left or right, the bottom part of my dialog would be
00127  * clipped off.
00128  *
00129  * Fix: When in docked mode, ::CalcDynamicLayout needed to return the
00130  * desired size, while taking into account the size of the gripper bar (if
00131  * any). Simply added a simple "+GetMinExt()" Now my dialog's bottom
00132  * doesn't get clipped. Woo-ha.
00133  *
00134  * When nesting a CDialog based window inside a CJControlBar, the 3D rect
00135  * drawn by ::OnEraseBkgnd would be overwritten by the top and left dialog
00136  * borders. The problem was caused by the fact that in the
00137  * ::OnWindowPosChanged() method, the rectangle which is used to move the
00138  * window contains the border. A simple call to rc.DeflateRect(1,1) solved
00139  * this problem.
00140  *
00141  * Added a call to UpdateWindow() in ::OnEraseBkgnd(). This helps with the
00142  * flickering a bit, but I Am not sure this is the correct way to go.
00143  * Incorporate at your own risks.
00144  *
00145  * Added 2 ASSERT()s in ::OnMouseMove(). This was not to fix a bug, but at
00146  * one point I was seeing strange things that lead me to add these
00147  * asserts. They don't do anything bad, so why remove them?
00148  *
00149  * *****************  Version 8  *****************
00150  * User: Kirk Stowell Date: 3/10/99    Time: 12:50p
00151  * Updated in $/CodeJockey/CJ60Lib
00152  * Fixed memory leak with button tooltips.
00153  *
00154  * *****************  Version 7  *****************
00155  * User: Kirk Stowell Date: 3/10/99    Time: 12:48p
00156  * Updated in $/CodeJockey/CJ60Lib
00157  * Added AfxRegisterWndClass() to create method to handle double clicks.
00158  * Thanks to Takehiko Mizoguti [mizoguti@m2.sys.to.casio.co.jp] for some
00159  * thoughts on this.
00160  *
00161  * *****************  Version 6  *****************
00162  * User: Kirk Stowell Date: 2/28/99    Time: 12:47p
00163  * Updated in $/CodeJockey/CJ60Lib
00164  * Calls default wnd proc if no context menu is defined Gonzalo Pereyra
00165  * [persys@adinet.com.uy]
00166  *
00167  * *****************  Version 5  *****************
00168  * User: Kirk Stowell Date: 1/31/99    Time: 12:48p
00169  * Updated in $/CodeJockey/CJ60Lib
00170  * Removed extra line (typo) from OnLButtonUp(). Thanks to Ioannis
00171  * Stamatopoulos (ystamat@mail.datamedia.gr) for pointing this out.
00172  *
00173  * *****************  Version 4  *****************
00174  * User: Kirk Stowell Date: 1/12/99    Time: 12:46p
00175  * Updated in $/CodeJockey/CJ60Lib
00176  * Total class re-write, added multiple/side-by-side controlbar docking.
00177  * No longer uses CSizingControlBar base class.
00178  *
00179  * *****************  Version 3  *****************
00180  * User: Kirk Stowell Date: 11/22/98   Time: 12:47p
00181  * Updated in $/CodeJockey/CJ60Lib
00182  * Modified set cursor to display normal size cursor when static linked.
00183  *
00184  * *****************  Version 2  *****************
00185  * User: Kirk Stowell Date: 10/20/98   Time: 12:45p
00186  * Updated in $/CodeJockey/CJ60Lib
00187  * Fixed problem with gripper and buttons disappearing when docking
00188  * toggled. Overloaded IsFloating() method from base class.
00189  *
00190  * *****************  Version 1  *****************
00191  * User: Kirk Stowell Date: 10/17/98   Time: 12:44p
00192  * Created in $/CodeJockey/CJ60Lib
00193  * Initial re-write and release.
00194  *
00195  ***************************************************************************/
00197
00198 #include "stdafx.h"
00199 #include "CJControlBar.h"
00200 #include "CJDockContext.h"
00201 #include "CJSizeDockBar.h"
00202 #include "CJResource.h"
00203
00204 #ifdef _DEBUG
00205 #define new DEBUG_NEW
00206 #undef THIS_FILE
00207 static char THIS_FILE[] = __FILE__;
00208 #endif
00209
00210 #define GRIP_INTRASPACING       1
00211 #define GRIP_SIZE               3
00212 #define GRIP_START              8
00213 #define TRACK_BORDER_SIZE       4
00214
00215 void CCJCBarButton::DrawButtonIcon(CDC* pDC, UINT nState, CRect& rcItem)
00216 {
00217     UNUSED_ALWAYS( rcItem );
00218
00219     // get the handle to the icon (if any) associated
00220     // with this button.
00221     HICON hIcon = GetIcon();
00222     if( hIcon == NULL ) {
00223         return;
00224     }
00225
00226     CRect rcWnd;
00227     GetWindowRect(&rcWnd);
00228
00229     int left   = (rcWnd.Width()-m_sizeIcon.cx)/2;
00230     int right  = left+m_sizeIcon.cx;
00231     int top    = (rcWnd.Height()-m_sizeIcon.cy)/2;
00232     int bottom = top+m_sizeIcon.cy;
00233
00234     // determine the size of the icon to be drawn.
00235     CRect rc(left,top,right,bottom);
00236
00237     // if the button is selected.
00238     if( nState & ODS_SELECTED )
00239     {
00240         if( m_hPushed ) {
00241             hIcon = m_hPushed;
00242         }
00243         else {
00244             rc.OffsetRect(1,1);
00245         }
00246     }
00247
00248     // draw the icon associated with this button.
00249     pDC->DrawState( rc.TopLeft(), rc.Size(), hIcon, DSS_NORMAL, (HBRUSH)NULL );
00250 }
00251
00253 // CCJControlBar
00254
00255 CCJControlBar::CCJControlBar()
00256 {
00257     m_popupMenuID       = 0;
00258     m_popToolbarID      = 0;
00259     m_nPos              = 0;
00260     m_bToFit            = FALSE;
00261     m_bOkToDrag         = FALSE;
00262     m_bDragging         = FALSE;
00263     m_bMaximized        = FALSE;
00264     m_bUnique           = FALSE;
00265     m_bGripper          = TRUE;
00266     m_bButtons          = TRUE;
00267     m_bFlatGripper      = FALSE;            // Yiannhs Ver 6.06 Start Up With Flat Gripper
00268     m_bFlatBorder       = FALSE;            // Yiannhs Start Up With Flat Border
00269     m_bAutoSave         = TRUE;
00270     m_sizeVert          = CSize(200,100);   // Yiannhs to test different rectangles
00271     m_sizeHorz          = CSize(200,100);
00272     m_sizeFloat         = CSize(200,100);
00273     m_sizeDesired       = CSize(200,100);
00274     m_sizeNormal        = CSize(200,100);
00275     m_cxOffset          = 5;
00276     m_cyOffset          = 3;
00277     m_pChildWnd         = NULL;
00278     m_strSection        = _T("");
00279     m_eAuxIndex         = HIDE_CONTRLBAR;
00280     m_hIcon             = NULL;
00281     m_hAuxIcon          = NULL;
00282     m_eChildBorder      = NONE;
00283     m_nID               = 0;
00284     m_bFloating         = FALSE;
00285
00286     // Create the image list used by frame buttons.
00287     m_ImageList.Create(IDB_BUTTON_IMAGES,
00288         10, 1, RGB(255,255,255));
00289 }
00290
00291 CCJControlBar::~CCJControlBar()
00292 {
00293     // fix potential resource leak - KStowell - 10-22-99.
00294     m_ImageList.DeleteImageList();
00295     _destroyIcon(m_hIcon);
00296     _destroyIcon(m_hAuxIcon);
00297 }
00298
00299 IMPLEMENT_DYNAMIC(CCJControlBar, CControlBar)
00300
00301 BEGIN_MESSAGE_MAP(CCJControlBar, CControlBar)
00302     //{{AFX_MSG_MAP(CCJControlBar)
00303     ON_WM_NCPAINT()
00304     ON_WM_PAINT()
00305     ON_WM_MOUSEMOVE()
00306     ON_WM_SETCURSOR()
00307     ON_WM_LBUTTONUP()
00308     ON_WM_NCHITTEST()
00309     ON_WM_CREATE()
00310     ON_WM_WINDOWPOSCHANGED()
00311     ON_WM_LBUTTONDOWN()
00312     ON_COMMAND(IDC_BUTTON_HIDE, OnButtonClose)
00313     ON_UPDATE_COMMAND_UI(IDC_BUTTON_HIDE, OnUpdateButtonClose)
00314     ON_COMMAND(IDC_BUTTON_MINI, OnButtonMinimize)
00315     ON_UPDATE_COMMAND_UI(IDC_BUTTON_MINI, OnUpdateButtonMinimize)
00316     ON_WM_RBUTTONDOWN()
00317     ON_WM_MEASUREITEM()
00318     ON_WM_MENUCHAR()
00319     ON_WM_INITMENUPOPUP()
00320     ON_WM_ERASEBKGND()
00321     //}}AFX_MSG_MAP
00322 END_MESSAGE_MAP()
00323
00325 // CCJControlBar overrides
00326
00327 void CCJControlBar::EnableFlatLook(BOOL bFlat)
00328 {
00329     EnableFlatLook(bFlat, bFlat, bFlat);
00330 }
00331
00332 void CCJControlBar::EnableFlatLook(BOOL bGripper, BOOL bBorder, BOOL bButtons)
00333 {
00334     ASSERT(::IsWindow(m_hWnd));
00335     m_bFlatGripper = bGripper;
00336     m_bFlatBorder  = bBorder;
00337     m_btnClose.DisableFlatLook( bButtons );
00338     m_btnMinim.DisableFlatLook( bButtons );
00339     Invalidate();
00340 }
00341
00342 BOOL CCJControlBar::Create(CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName, CSize sizeDefault, DWORD dwStyle, BOOL bFlatBorders)
00343 {
00344     ASSERT_VALID(pParentWnd);   // must have a parent
00345
00346     // If autosave is enabled, get the previous settings from the registry.
00347     if( m_bAutoSave ) {
00348         LoadBarState(sizeDefault, nID);
00349     }
00350
00351     // Set initial control bar style.
00352     SetBarStyle(dwStyle & CBRS_ALL|CBRS_HIDE_INPLACE|CBRS_SIZE_DYNAMIC|CBRS_FLOAT_MULTI);
00353
00354     dwStyle &= ~CBRS_ALL;
00355     dwStyle |= WS_VISIBLE|WS_CHILD|WS_CLIPSIBLINGS|WS_CLIPCHILDREN;
00356
00357     m_sizeDesired = m_sizeNormal = sizeDefault;
00358     m_sizeHorz = m_sizeVert = m_sizeFloat = sizeDefault; // Yiannhs : Setup the new sizes as well
00359
00360     // Set flat control bar style.
00361     m_bFlatGripper = m_bFlatBorder = bFlatBorders;
00362
00363     // Yiannhs this seems a better way than mine, to register the double clicks class.
00364     // I have just added the redraw flags i was using in ver 6.06
00365     CString wndClass = ::AfxRegisterWndClass(
00366         CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW, 0, ::GetSysColorBrush(COLOR_BTNFACE));
00367
00368     CRect rect( 0, 0, sizeDefault.cx, sizeDefault.cy );
00369     return CWnd::Create( wndClass, lpszWindowName, dwStyle, rect, pParentWnd, nID );
00370 }
00371
00372 BOOL CCJControlBar::PreTranslateMessage(MSG* pMsg)
00373 {
00374     // *** GK/ISC
00375     if (m_bButtons && m_ToolTip.GetSafeHwnd()) {
00376         m_ToolTip.RelayEvent(pMsg);
00377     }
00378     return CControlBar::PreTranslateMessage(pMsg);
00379 }
00380
00381 void CCJControlBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
00382 {
00383     UNUSED_ALWAYS(pTarget);
00384     UNUSED_ALWAYS(bDisableIfNoHndler);
00385
00386     if((m_bButtons == FALSE) || IsFloating()) {
00387         return;
00388     }
00389
00390     BOOL            bEnable     = FALSE;
00391     UINT            uIDText     = NULL;
00392     BTN_IMG_INDEX   eAuxIndex   = m_eAuxIndex;
00393
00394     if (IsHorzDocked()) {
00395         if (m_bUnique) {
00396             uIDText   = IDS_EXPAND;
00397             eAuxIndex = MAXI_H_DISABLE;
00398             bEnable   = FALSE;
00399         } else if (!m_bMaximized) {
00400             uIDText   = IDS_EXPAND;
00401             eAuxIndex = MAXI_H_ENABLED;
00402             bEnable   = TRUE;
00403         } else {
00404             uIDText   = IDS_CONTRACT;
00405             eAuxIndex = NORM_H_ENABLED;
00406             bEnable   = TRUE;
00407         }
00408     } else {
00409         if (m_bUnique) {
00410             uIDText   = IDS_EXPAND;
00411             eAuxIndex = MAXI_V_DISABLE;
00412             bEnable   = FALSE;
00413         } else if (!m_bMaximized) {
00414             uIDText   = IDS_EXPAND;
00415             eAuxIndex = MAXI_V_ENABLED;
00416             bEnable   = TRUE;
00417         } else {
00418             uIDText   = IDS_CONTRACT;
00419             eAuxIndex = NORM_V_ENABLED;
00420             bEnable   = TRUE;
00421         }
00422     }
00423
00424     // we are only concerned if the image index has changed.
00425     if(eAuxIndex != m_eAuxIndex) {
00426         m_eAuxIndex = eAuxIndex;
00427
00428         // if the button is a valid window, set the new icon.
00429         if(m_btnMinim.GetSafeHwnd()) {
00430             // fix potential resource leak - KStowell - 10-22-99.
00431             _destroyIcon(m_hAuxIcon);
00432             m_hAuxIcon = m_ImageList.ExtractIcon((int)eAuxIndex);
00433             m_btnMinim.SetIcon(m_hAuxIcon, CSize(10,10));
00434             m_btnMinim.EnableWindow(bEnable);
00435
00436             // if the tooltip control is valid, update the tip text.
00437             if(m_ToolTip.GetSafeHwnd()) {
00438                 m_ToolTip.UpdateTipText(uIDText, &m_btnMinim);
00439             }
00440         }
00441     }
00442 }
00443
00444 CSize CCJControlBar::CalcDynamicLayout(int nLength, DWORD nMode)
00445 {
00446     CSize sizeResult = m_sizeDesired;
00447
00448     //1999-05-19 Yiannhs. Since We Get Here from different Places do some more calculations.
00449     //                    Give Visual Feedback to user.
00450
00451     if( !nLength )
00452     {
00453         CRect rect;
00454         GetWindowRect( rect );
00455         sizeResult = rect.Size();
00456
00457         if( nMode & LM_HORZDOCK )
00458         {
00459             if( !IsHorzDocked() ) {
00460                 sizeResult = m_sizeHorz;
00461             }
00462             else if( nMode & LM_VERTDOCK )
00463             {
00464                 if( !IsVertDocked() ) {
00465                     sizeResult = m_sizeVert;
00466                 }
00467                 else {
00468                     sizeResult = m_sizeFloat;           //Do not check if it is floating. Do it
00469                 }
00470                 return( sizeResult );                   //do not go on
00471             }
00472         }
00473     }
00474     //1999-05-19    Yiannhs
00475
00476     if( IsFloating( ))
00477     {
00478         if (nMode == LM_HORZ) {
00479             if (nLength < 50)
00480                 nLength = 50;
00481             m_sizeDesired.cx = nLength;
00482         }
00483
00484         if (nMode == (LM_LENGTHY | LM_HORZ)) {
00485             if (nLength < 50)
00486                 nLength = 50;
00487             m_sizeDesired.cy = nLength;
00488         }
00489
00490         sizeResult = m_sizeDesired;
00491
00492     }
00493
00494     return sizeResult;
00495 }
00496
00498 // CCJControlBar message handlers
00499
00500 void CCJControlBar::OnNcPaint()
00501 {
00502     EraseNonClient();
00503 }
00504
00505 void CCJControlBar::OnPaint()
00506 {
00507     CPaintDC dc(this); // device context for painting
00508
00509     // Get the client rect.
00510     CRect rcClient;
00511     GetClientRect( &rcClient );
00512
00513     // Create a memory device-context. This is done to help reduce
00514     // screen flicker, since we will paint the entire control to the
00515     // off screen device context first.
00516     CDC memDC;
00517     CBitmap bitmap;
00518     memDC.CreateCompatibleDC(&dc);
00519     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00520     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00521
00522     // repaint the background.
00523     memDC.FillSolidRect( rcClient, afxData.clrBtnFace );
00524     DrawBorders(&memDC, rcClient);
00525
00526     // draw a border around the child area.
00527     if( m_eChildBorder != NONE )
00528     {
00529         CRect rect;
00530         GetChildRect(rect);
00531
00532         if( m_eChildBorder == OUTLINE ) {
00533             memDC.Draw3dRect(rect, afxData.clrWindowFrame, afxData.clrWindowFrame);
00534         } else if( m_eChildBorder == SUNKEN ) {
00535             rect.InflateRect(1,1);
00536             memDC.Draw3dRect(rect, afxData.clrBtnShadow, afxData.clrBtnHilite);
00537             rect.DeflateRect(1,1);
00538             memDC.Draw3dRect(rect, afxData.clrWindowFrame, afxData.clrBtnFace);
00539         } else if( m_eChildBorder == RAISED ) {
00540             rect.InflateRect(1,1);
00541             memDC.Draw3dRect(rect, afxData.clrBtnHilite, afxData.clrWindowFrame);
00542             rect.DeflateRect(1,1);
00543             memDC.Draw3dRect(rect, afxData.clrBtnFace, afxData.clrBtnShadow);
00544         }
00545     }
00546
00547     // copy the memory device context back into the original DC via BitBlt().
00548     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00549
00550     // cleanup resources.
00551     memDC.SelectObject(pOldBitmap);
00552     memDC.DeleteDC();
00553     bitmap.DeleteObject();
00554 }
00555
00556 void CCJControlBar::OnMouseMove(UINT nFlags, CPoint point)
00557 {
00558     HitTest(point);
00559     CRect rectDock;
00560     if( m_bDragging )
00561     {
00562         ASSERT(GetParent() != NULL);
00563
00564         GetParent()->GetClientRect(&rectDock);
00565         ClientToScreen(&rectDock);
00566         ClientToScreen(&point);
00567
00568         CFrameWnd *pFrame=GetDockingFrame();
00569         ASSERT(pFrame != NULL);
00570
00571         pFrame -> ScreenToClient(&point);
00572         pFrame->ScreenToClient(&rectDock);
00573
00574         point.x = point.x>rectDock.right ? rectDock.right:point.x;
00575         point.x = point.x<rectDock.left ? rectDock.left:point.x;
00576         point.y = point.y>rectDock.bottom ? rectDock.bottom:point.y;
00577         point.y = point.y<rectDock.top ? rectDock.top:point.y;
00578
00579         OnInvertTracker(m_rcTrack);
00580         int deltaX = point.x-m_ptCurDrag.x;
00581         int deltaY = point.y-m_ptCurDrag.y;
00582
00583         if(IsVertDocked()) {
00584             m_rcTrack.top += deltaY;
00585             m_rcTrack.bottom += deltaY;
00586         }
00587
00588         else if (IsHorzDocked()) {
00589             m_rcTrack.left += deltaX;
00590             m_rcTrack.right += deltaX;
00591         }
00592
00593         OnInvertTracker(m_rcTrack);
00594         m_ptCurDrag = point;
00595     }
00596
00597     else {
00598         // Yiannhs: Do not let default handler go on, if we have worked with the message
00599         CControlBar::OnMouseMove(nFlags, point);
00600     }
00601 }
00602
00603 BOOL CCJControlBar::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
00604 {
00605     return (!m_bOkToDrag && !m_bDragging)?
00606         CControlBar::OnSetCursor(pWnd, nHitTest, message):FALSE;
00607 }
00608
00609
00610 //1999-05-19    Yiannhs
00611 void CCJControlBar::OnLButtonUp(UINT nFlags, CPoint point)
00612 {
00613     if( m_bDragging )
00614     {
00615         ReleaseCapture();
00616         OnInvertTracker(m_rcTrack);
00617 //1999-05-19 Yiannhs. Moved the statement below
00618         //m_bDragging = FALSE;
00619
00620         // Yiannhs: reduce unnessesary actions. Ok It works
00621  //1999-05-19 Yiannhs. Changed according to the statement above
00622         if( m_ptCurDrag == m_ptStartDrag ) {
00623             m_bDragging = FALSE;
00624             return;
00625         }
00626
00627         if(IsVertDocked()) {
00628             int newHeight = m_rcTrack.top-m_ptStartDrag.y;
00629             m_sizeDesired.cy += newHeight;
00630             m_sizeDesired.cy = m_sizeDesired.cy > GetMinExt() ? m_sizeDesired.cy : GetMinExt();
00631             // Yiannhs: there is a comment in the previous version for change. This is the Line
00632             // This is probably for sizing with many control bars in dock bar
00633             // m_sizeDesired.cy = m_sizeDesired.cy > rectAvail.Height() ? rectAvail.Height() : m_sizeDesired.cy;
00634
00635 //1999-05-19 Yiannhs. Assign unused sizes
00636             m_sizeVert = m_sizeDesired;
00637         }
00638
00639         else { //if (IsHorzDocked()) {  //1999-05-19. Floating control bars do not receive this message
00640
00641             int newWidth = m_rcTrack.left-m_ptStartDrag.x;
00642             m_sizeDesired.cx += newWidth;
00643             m_sizeDesired.cx = m_sizeDesired.cx > GetMinExt() ? m_sizeDesired.cx : GetMinExt();
00644             // Yiannhs: there is a comment in the previous version for change. This is the Line
00645             // This is probably for sizing with many control bars in dock bar
00646             // m_sizeDesired.cx = m_sizeDesired.cx > rectAvail.Width() ? rectAvail.Width() : m_sizeDesired.cx;
00647
00648 //1999-05-19 Yiannhs. Assign unused sizes
00649             m_sizeHorz = m_sizeDesired;
00650         }
00651
00652 //1999-05-19    Yiannhs
00653         //((CCJSizeDockBar *)GetParent())->CalcSizeBarLayout();
00654         //resizing a control bar, means, that the DockBar should be normalized.
00655         //and normalize does the layout
00656         m_sizeNormal = m_sizeDesired;       //set the new normal size here
00657         ((CCJSizeDockBar *)GetParent())->Normalize( this );
00658         m_bDragging = FALSE;        //flag off the drag action now. The movement has been complited
00659                                     //so as I can check it on change position
00660         CRect rc;                   // Now Use The Size of the control bar to fill the right sizes.
00661         GetWindowRect( rc );
00662         if( IsHorzDocked() )
00663             m_sizeNormal.cy = m_sizeHorz.cy = m_sizeDesired.cy = rc.Height();
00664         else
00665             m_sizeNormal.cx = m_sizeVert.cx = m_sizeDesired.cx = rc.Width();
00666 //1999-05-19    Yiannhs
00667
00668     }
00669
00670     else {
00671         // Yiannhs: again don't go to default handler if we have already handled the message
00672         CControlBar::OnLButtonUp(nFlags, point);
00673     }
00674 }
00675
00676 UINT CCJControlBar::OnNcHitTest(CPoint /*point*/)
00677 {
00678     return HTCLIENT;
00679 }
00680
00681 BOOL CCJControlBar::OnEraseBkgnd(CDC* pDC)
00682 {
00683     // KStowell - overridden for flicker-free drawing.
00684     UNUSED_ALWAYS(pDC);
00685     return TRUE;
00686 }
00687
00688 int CCJControlBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00689 {
00690     if (CControlBar::OnCreate(lpCreateStruct) == -1)
00691         return -1;
00692
00693     if (m_bButtons)
00694     {
00695         if(!m_btnClose.Create(NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
00696             BS_NOTIFY | BS_OWNERDRAW | BS_ICON,
00697             CRect(0,0,0,0), this, IDC_BUTTON_HIDE ))
00698         {
00699             TRACE0( "Unable to create close button\n" );
00700             return -1;
00701         }
00702
00703
00704         if(!m_btnMinim.Create(NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
00705             BS_NOTIFY | BS_OWNERDRAW | BS_ICON,
00706             CRect(0,0,0,0), this, IDC_BUTTON_MINI ))
00707         {
00708             TRACE0( "Unable to create minimize button\n" );
00709             return -1;
00710         }
00711
00712         // Yiannhs Selective flat style interface. The difference is in adding the if statement
00713         if( !m_bFlatBorder && !m_bFlatGripper ) {
00714             m_btnClose.DisableFlatLook();
00715             m_btnMinim.DisableFlatLook();
00716         }
00717
00718         m_hIcon = m_ImageList.ExtractIcon(0);
00719         m_btnClose.SetIcon(m_hIcon, CSize(10,10));
00720
00721         // Create the ToolTip control.
00722         m_ToolTip.Create(this);
00723         m_ToolTip.Activate(TRUE);
00724         m_ToolTip.AddTool (&m_btnClose, IDS_HIDE);
00725         m_ToolTip.AddTool (&m_btnMinim, IDS_EXPAND);
00726     }
00727
00728     return 0;
00729 }
00730
00731 void CCJControlBar::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
00732 {
00733     CControlBar::OnWindowPosChanged(lpwndpos);
00734
00735     if (m_bButtons)
00736     {
00737         if (IsFloating())
00738         {
00739             m_btnClose.ShowWindow(SW_HIDE);
00740             m_btnMinim.ShowWindow(SW_HIDE);
00741         }
00742
00743         else
00744         {
00745             m_btnClose.ShowWindow(SW_SHOW);
00746             m_btnMinim.ShowWindow(SW_SHOW);
00747
00748             CRect rcClose(GetButtonRect());
00749             CRect rcMinim(GetButtonRect());
00750
00751             if (IsHorzDocked()) {
00752                 rcMinim.OffsetRect(0,14);
00753             }
00754
00755             else {
00756                 rcClose.OffsetRect(14,0);
00757             }
00758
00759             m_btnClose.MoveWindow(rcClose);
00760             m_btnMinim.MoveWindow(rcMinim);
00761         }
00762     }
00763
00764     //1999-05-19 Yiannhs
00765     //Calculate Extra Size variables
00766     CSize sizeTemp( lpwndpos->cx, lpwndpos->cy );
00767
00768     // save the current size to the registry.
00769     if( m_bAutoSave ) {
00770         SaveBarState(sizeTemp);
00771     }
00772
00773     if( IsFloating() ) {
00774         m_sizeFloat = sizeTemp;
00775     }
00776
00777     else if( !m_bDragging )
00778     {
00779         if( IsHorzDocked() ) {
00780             m_sizeHorz = sizeTemp;
00781         } else {
00782             m_sizeVert = sizeTemp;
00783         }
00784     }
00785
00786     if( m_pChildWnd->GetSafeHwnd( )) {
00787         CRect rc;
00788         GetChildRect(rc);
00789         rc.DeflateRect(1,1);
00790         m_pChildWnd->MoveWindow(rc);
00791     }
00792 }
00793
00794 //1999-05-19 Yiannhs
00795 void CCJControlBar::OnLButtonDown(UINT nFlags, CPoint point)
00796 {
00797     // Yiannhs. When the bar is inside a mdiframe window, and click on area
00798     // the inner child does not cover, the whole area is grayed!!!
00799
00800     if( IsFloating( )) //see Tab ControlBar
00801     {
00802         // If the window is floating, we want to
00803         // bring it up to the top.
00804         SetFocus();
00805         SetWindowPos( NULL, 0,0,0,0,
00806             SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW );
00807         return;
00808     }
00809
00810     if (m_bOkToDrag)
00811     {
00812         CFrameWnd *pFrame=GetDockingFrame();
00813         GetClientRect(m_rcTrack);
00814
00815         if (IsVertDocked()) {
00816             // Yiannhs
00817             m_rcTrack.top = m_rcTrack.bottom - TRACK_BORDER_SIZE -2;
00818             m_rcTrack.bottom-=2;
00819         }
00820 //1999-05-19 Yiannhs. do not call one more function
00821         else { //if (IsHorzDocked()) {
00822             // Yiannhs
00823             m_rcTrack.left = m_rcTrack.right - TRACK_BORDER_SIZE -2;
00824             m_rcTrack.right-=2;
00825         }
00826
00827         ClientToScreen(&m_rcTrack);
00828         pFrame->ScreenToClient(&m_rcTrack);
00829         ClientToScreen(&point);
00830         pFrame->ScreenToClient(&point);
00831
00832         m_ptStartDrag = point;
00833         m_ptCurDrag = point;
00834
00835         SetCapture();
00836         m_bDragging = TRUE;
00837         OnInvertTracker(m_rcTrack);
00838     }
00839
00840     else if (m_pDockBar) {
00841         if (OnToolHitTest(point, NULL) == -1) {
00842             ClientToScreen(&point);
00843 //1999-05-26 Yiannhs
00844 //          Handle the message loop before CDockContext
00845             MSG msg;
00846             ValidateRect( NULL );   //Make sure this control bar will not ask for Paint messages later
00847             HWND    hwnd = NULL;
00848             while (::PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE))
00849             {   //ask for messages in any window of the application, and remove those
00850                 DispatchMessage( &msg );
00851                 if( msg.hwnd != this->m_hWnd ) {
00852                     hwnd = msg.hwnd;    //keep the window which receives paint messages
00853                     break;              //exit the loop
00854                 }
00855             }
00856
00857             if( hwnd ) {    //if a window is getting Paint messages work on it
00858                 ::ValidateRect( hwnd, NULL );   //the window does not need painting
00859                 ::ValidateRect( ::GetParent( hwnd ), NULL );    //Its parent window as well
00860                 while (::PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE)) {
00861                     //work on the Paint messages once more
00862                     ::TranslateMessage( &msg );
00863                     ::DispatchMessage( &msg );
00864                 }
00865             }
00866
00867 //1999-05-26 Yiannhs
00868
00869             ((CCJDockContext*)m_pDockContext)->StartDragDockBar(point);
00870         }
00871     }
00872
00873     // Yiannhs
00874     else {
00875         CControlBar::OnLButtonDown(nFlags, point);
00876     }
00877 }
00878
00879 void CCJControlBar::OnButtonClose()
00880 {
00881     GetDockingFrame()->ShowControlBar(this,FALSE,FALSE);
00882 }
00883
00884 void CCJControlBar::OnUpdateButtonClose(CCmdUI* pCmdUI)
00885 {
00886     pCmdUI->Enable();
00887 }
00888
00889 void CCJControlBar::OnButtonMinimize()
00890 {
00891     if (!m_bMaximized) {
00892         ((CCJSizeDockBar *)GetParent())->Maximize(this);
00893         m_bMaximized = TRUE;
00894     }
00895
00896     else {
00897         ((CCJSizeDockBar *)GetParent())->Normalize(this);
00898         m_bMaximized = FALSE;
00899     }
00900 }
00901
00902 void CCJControlBar::OnUpdateButtonMinimize(CCmdUI* pCmdUI)
00903 {
00904     pCmdUI->Enable();
00905 }
00906
00908 // CCJControlBar operations
00909
00910 void CCJControlBar::EnableDockingOnSizeBar(DWORD dwDockStyle)
00911 {
00912     ASSERT(m_pDockContext == NULL);
00913     m_dwDockStyle = dwDockStyle;
00914
00915     if (m_pDockContext == NULL)
00916         m_pDockContext = new CCJDockContext(this);
00917
00918     if (m_hWndOwner == NULL)
00919         m_hWndOwner = ::GetParent(m_hWnd);
00920 }
00921
00922 void CCJControlBar::Maximize(int size)
00923 {
00924     m_sizeNormal = m_sizeDesired;
00925     if (IsHorzDocked()) {
00926         m_sizeDesired.cx = size;
00927     }
00928
00929     else if (IsVertDocked()) {
00930         m_sizeDesired.cy = size;
00931     }
00932
00933     m_bMaximized = TRUE;
00934 }
00935
00936 void CCJControlBar::Minimize()
00937 {
00938     m_sizeNormal = m_sizeDesired;
00939
00940     if (IsHorzDocked()) {
00941         m_sizeDesired.cx = GetMinExt();
00942     }
00943
00944     else if (IsVertDocked()) {
00945         m_sizeDesired.cy = GetMinExt();
00946     }
00947
00948     m_bMaximized = FALSE;
00949 }
00950
00951 void CCJControlBar::Normalize()
00952 {
00953     if (IsHorzDocked()) {
00954         m_sizeDesired.cx = m_sizeNormal.cx;
00955     }
00956
00957     else if (IsVertDocked()) {
00958         m_sizeDesired.cy = m_sizeNormal.cy;
00959     }
00960
00961     m_bMaximized = FALSE;
00962 }
00963
00964 int CCJControlBar::GetMinExt()
00965 {
00966     int nRet = TRACK_BORDER_SIZE;
00967
00968     if (m_bGripper || m_bButtons) {
00969         nRet += GRIP_START;
00970         nRet += GRIP_SIZE*2;
00971         nRet += GRIP_INTRASPACING*3+2;
00972     }
00973
00974     else
00975         nRet += 2;
00976
00977     return nRet;
00978 }
00979
00980 void CCJControlBar::GetChildRect(CRect &rect)
00981 {
00982     GetClientRect(&rect);
00983
00984     if (IsFloating()) {
00985         rect.DeflateRect(3,3);
00986     } else {
00987         if (IsVertDocked()) {
00988             rect.DeflateRect(m_cxOffset, 0);
00989             rect.top += (GetMinExt()-5);
00990             //Yiannhs: if it is the last bar inside a dockbar, cover the whole space
00991             if( !m_bToFit ) {
00992                 rect.bottom -= (TRACK_BORDER_SIZE + 4);
00993             } else {
00994                 rect.bottom -= 4;
00995             }
00996         } else {
00997             rect.left   += (GetMinExt()-5);
00998             //Yiannhs: if it is the last bar inside a dockbar, cover the whole space
00999             if( !m_bToFit ) {
01000                 rect.right  -= (TRACK_BORDER_SIZE + 4);
01001             } else {
01002                 rect.right  -= 4;
01003             }
01004             rect.DeflateRect(0, m_cxOffset);
01005         }
01006
01007         if( rect.left > rect.right || rect.top > rect.bottom )
01008             rect = CRect(0,0,0,0);
01009     }
01010 }
01011
01012 void CCJControlBar::EraseNonClient()
01013 {
01014     CWindowDC dc(this);
01015
01016     CRect rectClient;
01017     GetClientRect(rectClient);
01018     CRect rectWindow;
01019     GetWindowRect(rectWindow);
01020     ScreenToClient(rectWindow);
01021     rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);
01022
01023     dc.ExcludeClipRect(rectClient);
01024     rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);
01025 }
01026
01027 void CCJControlBar::DrawBorders(CDC *pDC, CRect &rect)
01028 {
01029     CRect rc;
01030     rc.CopyRect(&rect);
01031
01032     CRect rcTrack;
01033     rcTrack.CopyRect(&rc);
01034
01035     if(IsVertDocked())
01036     {
01037         if (!m_bToFit) {
01038             rcTrack.top = rc.bottom - TRACK_BORDER_SIZE;
01039             rcTrack.top-=2;
01040             rcTrack.bottom-=1;
01041
01042             //Yiannhs flat interface style
01043             if( !m_bFlatBorder )
01044                 pDC->Draw3dRect(rcTrack, afxData.clrBtnHilite, afxData.clrBtnShadow);
01045             else
01046                 pDC->FillSolidRect(rcTrack, afxData.clrBtnFace);
01047         }
01048     }
01049
01050     else if (IsHorzDocked())
01051     {
01052         if (!m_bToFit) {
01053             rcTrack.left = rc.right - TRACK_BORDER_SIZE;
01054             rcTrack.left-=2;
01055             rcTrack.right-=1;
01056
01057             //Yiannhs flat interface style
01058             if( !m_bFlatBorder )
01059                 pDC->Draw3dRect(rcTrack, afxData.clrBtnHilite, afxData.clrBtnShadow);
01060             else
01061                 pDC->FillSolidRect(rcTrack, afxData.clrBtnFace);
01062         }
01063     }
01064
01065     DrawGripper(pDC);
01066 }
01067
01068 void CCJControlBar::HitTest(CPoint &point)
01069 {
01070     CRect rcWin;
01071     GetClientRect(&rcWin);
01072     HCURSOR hCur = ::LoadCursor(NULL,IDC_ARROW);
01073
01074     if( !m_bDragging )
01075     {
01076         if (IsVertDocked()) {
01077             rcWin.top = rcWin.bottom - TRACK_BORDER_SIZE;
01078             m_bOkToDrag = (rcWin.PtInRect(point) && !m_bToFit);
01079             if(m_bOkToDrag) {
01080                 hCur = AfxGetApp()->LoadCursor(IDC_VSPLITBAR);
01081             }
01082         }
01083
01084         else if (IsHorzDocked()) {
01085             rcWin.left = rcWin.right - TRACK_BORDER_SIZE;
01086             m_bOkToDrag = (rcWin.PtInRect(point) && !m_bToFit);
01087             if(m_bOkToDrag) {
01088                 hCur = AfxGetApp()->LoadCursor(IDC_HSPLITBAR);
01089             }
01090         }
01091
01092         SetCursor(hCur);
01093     }
01094 }
01095
01096 void CCJControlBar::OnInvertTracker(const CRect &rect)
01097 {
01098     ASSERT_VALID(this);
01099     ASSERT(!rect.IsRectEmpty());
01100
01101     CDC* pDC = GetDockingFrame()->GetDC();
01102     CBrush* pBrush = CDC::GetHalftoneBrush();
01103     CBrush* pOldBrush = NULL;
01104
01105     if (pBrush != NULL) {
01106         pOldBrush = pDC->SelectObject(pBrush);
01107     }
01108
01109     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATINVERT);
01110
01111     if (pOldBrush != NULL) {
01112         pDC->SelectObject(pOldBrush);
01113     }
01114     GetDockingFrame()->ReleaseDC(pDC);
01115 }
01116
01117 // Yiannhs this was taken from code in CodeGuru site. Draw gradient flat caption
01118 // still needs some refinement
01119
01120 #define COLOR_WHITE     RGB(255,255,255)
01121 #define COLOR_BLACK     RGB(0,0,0)
01122 #define NCOLORSHADES    64      // this many shades in gradient
01123
01124 void CCJControlBar::DrawGriperCaption( CDC * pDC, LPRECT pRect )        //yiannhs
01125 {
01126     ASSERT( pDC );
01127     ASSERT( pRect );
01128     if (!IsFloating() && m_bGripper)
01129     {
01130         BOOL m_bIsHorz = IsHorzDocked();
01131         CRect TheRect( pRect );
01132         COLORREF clrBG = GetSysColor(COLOR_ACTIVECAPTION); // background color
01133         int cxCap = 0;
01134         int cyCap = 0;
01135         int rx = TheRect.left;
01136         int ry = TheRect.top;
01137         if( !m_bIsHorz ) {
01138             cxCap = TheRect.Width();
01139             cyCap = TheRect.Height();
01140         } else {
01141             cxCap = TheRect.Height();
01142             cyCap = TheRect.Width();
01143             //            rx = TheRect.top;
01144             //            ry = TheRect.left;
01145         }
01146
01147         int r = GetRValue(clrBG);               // red..
01148         int g = GetGValue(clrBG);               // ..green
01149         int b = GetBValue(clrBG);               // ..blue color vals
01150         int w = cxCap;                          // width of area to shade
01151         int xDelta= max(w/NCOLORSHADES,1);      // width of one shade band
01152         int x = xDelta;
01153         CBrush* pOldBrush = NULL;
01154         {
01155             CBrush brush(RGB(0,0,0));
01156             pOldBrush = pDC->SelectObject(&brush);
01157             if( !m_bIsHorz ) {
01158                 pDC->PatBlt(rx, ry, x, cyCap, PATCOPY);
01159             } else {
01160                 pDC->PatBlt(rx, ry, cyCap, x, PATCOPY);
01161             }
01162             pDC->SelectObject(pOldBrush);
01163
01164             // fix potential resource leak - KStowell - 10-21-99
01165             brush.DeleteObject();
01166         }
01167         int w2  = w*w;                                              // w squared
01168         while( x < cxCap ) {                                       // paint bands right to left
01169             //x += xDelta;                                            // next band
01170             int wmx2 = (w-x)*(w-x);                                 // w minus x squared
01171             COLORREF clr = RGB( r-(r*wmx2)/w2, g-(g*wmx2)/w2, b-(b*wmx2)/w2 );
01172             {
01173                 CBrush brush(clr);
01174                 pDC->SelectObject(&brush);
01175                 if( !m_bIsHorz ) {
01176                     pDC->PatBlt(rx+x, ry, xDelta, cyCap, PATCOPY);
01177                 } else {
01178                     pDC->PatBlt(rx, ry+x, cyCap, xDelta, PATCOPY);
01179                 }
01180                 pDC->SelectObject(pOldBrush);
01181
01182                 // fix potential resource leak - KStowell - 10-21-99
01183                 brush.DeleteObject();
01184             }
01185             x += xDelta;
01186         }
01187         {
01188             CBrush brush(clrBG);
01189             pDC->SelectObject(&brush);
01190             if( !m_bIsHorz ) {
01191                 pDC->PatBlt(rx+x, ry, cxCap-x, cyCap, PATCOPY);
01192             }
01193             else {
01194                 pDC->PatBlt(rx, ry+x, cyCap, cxCap-x, PATCOPY);
01195             }
01196
01197             // fix potential resource leak - KStowell - 10-21-99
01198             brush.DeleteObject();
01199         }
01200         pDC->SelectObject(pOldBrush);
01201     }
01202 }//yiannhs new method ends
01203
01204 void CCJControlBar::DrawGripper(CDC *pDC)
01205 {
01206     //Yiannhs. changed to make evaluations on top. Replaced with flat gradient caption
01207     if (!IsFloating() && m_bGripper)
01208     {
01209         // draw the gripper.
01210         CRect pRect(GetGripperRect());
01211
01212         //Yiannhs New Lines
01213         CRect SecondGrip;
01214         SecondGrip.CopyRect( pRect );
01215         //Yiannhs: use the original beveled style gripper
01216         if (IsHorzDocked()) {
01217             SecondGrip.OffsetRect(4,0);
01218         } else {
01219             SecondGrip.OffsetRect(0,4);
01220         }
01221
01222         //Yiannhs Selective Gripper look
01223         if( !m_bFlatGripper ) {
01224
01225             //Yiannhs: also updated to use AfxData
01226             pDC->FillSolidRect( pRect, afxData.clrBtnShadow  );
01227             pDC->Draw3dRect( pRect, afxData.clrBtnHilite, afxData.clrBtnShadow );
01228
01229             pDC->FillSolidRect( SecondGrip, afxData.clrBtnShadow );
01230             pDC->Draw3dRect( SecondGrip, afxData.clrBtnHilite, afxData.clrBtnShadow );
01231
01232         } else {    //Yiannhs: Use Flat Gripper
01233
01234             CRect FlatRect( pRect.left, pRect.top, SecondGrip.right, SecondGrip.bottom);
01235             if (IsHorzDocked()) {
01236                 FlatRect.DeflateRect(-2,0);
01237             } else {
01238                 FlatRect.DeflateRect(0,-2);
01239             }
01240             DrawGriperCaption( pDC, FlatRect );
01241         }
01242     }
01243 }
01244
01245 CRect CCJControlBar::GetButtonRect()
01246 {
01247     CRect rect;
01248     GetClientRect(&rect);
01249     rect.OffsetRect(-rect.left,-rect.top);
01250
01251     if (IsHorzDocked()) {
01252         rect.top     += 3;
01253         rect.bottom = rect.top+12;
01254         rect.left  += 2;
01255         rect.right  = rect.left+12;
01256     }
01257
01258     else {
01259         rect.right -= 19;
01260         rect.left   = rect.right-12;
01261         rect.top   += 3;
01262         rect.bottom = rect.top+12;
01263     }
01264
01265     return rect;
01266 }
01267
01268 CRect CCJControlBar::GetGripperRect()
01269 {
01270     CRect rect;
01271     GetClientRect(&rect);
01272     rect.OffsetRect(-rect.left,-rect.top);
01273
01274     if (IsHorzDocked()) {
01275         rect.DeflateRect(3,3);
01276         rect.left   += 1;
01277         rect.right  = rect.left+3;
01278         rect.bottom -= 1;
01279         rect.top    += m_bButtons?30:1;
01280     }
01281
01282     else {
01283         rect.DeflateRect(4,4);
01284         rect.top     += 2;
01285         rect.bottom  = rect.top+3;
01286         rect.right   -= m_bButtons?30:2;
01287     }
01288
01289     return rect;
01290 }
01291
01292 void CCJControlBar::OnRButtonDown(UINT /*nFlags*/, CPoint point)
01293 {
01294     // No menu was defined...
01295     if (!m_popupMenuID) {
01296         TRACE0( "Warning: No menu resource was associated with CCJControlBar.\n" );
01297     }
01298
01299     else
01300     {
01301         SetCapture();
01302
01303         // Since we are using the main window as the
01304         // parent, we need to convert the point to screen
01305         // coordinates...
01306         CPoint pt = point;
01307         ClientToScreen(&pt);
01308
01309         // Load the popup menu.
01310         VERIFY(m_popupMenu.LoadMenu(m_popupMenuID));
01311         CCJMenu* pPopup = (CCJMenu*)m_popupMenu.GetSubMenu(m_nPos);
01312         ASSERT(pPopup != NULL);
01313
01314         // Load toolbar resource if any for menu icons.
01315         if (m_popToolbarID) {
01316             pPopup->LoadToolbar(m_popToolbarID);
01317         }
01318
01319         //Yiannhs: When right clicking on a floating controlbar, the menu is inactive,
01320         //         this is due to the MiniFrame  apart from being a child is also
01321         //          a Frame Window. and only the main window handles the Bitmap menus
01322         //pWndPopupOwner = GetParentFrame();
01323         CWnd* pWndPopupOwner = GetParentFrame();    //this;
01324         if( IsFloating() )
01325             pWndPopupOwner = pWndPopupOwner->GetParentFrame();
01326
01327         // Display the popup menu, use the main window as its parent.
01328         pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
01329             pt.x, pt.y, pWndPopupOwner);
01330
01331         m_popupMenu.DestroyMenu();
01332
01333         ReleaseCapture();
01334     }
01335 }
01336
01337 void CCJControlBar::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
01338 {
01339     if (lpMeasureItemStruct->CtlType == ODT_MENU)
01340     {
01341         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
01342             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
01343
01344             if (m_popupMenu.IsMenu(pMenu)) {
01345                 m_popupMenu.MeasureItem(lpMeasureItemStruct);
01346                 return;
01347             }
01348         }
01349     }
01350
01351     CControlBar::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
01352 }
01353
01354 LRESULT CCJControlBar::OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu)
01355 {
01356     if (m_popupMenu.IsMenu(pMenu)) {
01357         return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
01358     }
01359
01360     return CControlBar::OnMenuChar(nChar, nFlags, pMenu);
01361 }
01362
01363 void CCJControlBar::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
01364 {
01365     CControlBar::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
01366
01367     if(!bSysMenu) {
01368         if (m_popupMenu.IsMenu(pPopupMenu)) {
01369             CCJMenu::UpdateMenu(pPopupMenu);
01370         }
01371     }
01372 }
01373
01374 void CCJControlBar::SaveBarState(CSize& size)
01375 {
01376     int nIndex = 0;
01377     CWinApp* pApp = AfxGetApp();
01378
01379     // attempt to loop through all of the defaults stored in the
01380     // system until we find our control id.
01381     while( TRUE )
01382     {
01383         // start at 0 and search for a match to our control bars
01384         // resource id. If one was not found, return.
01385         m_strSection.Format(_T("Bar State-Bar%d"), nIndex);
01386         int nBarID = pApp->GetProfileInt( m_strSection, _T("BarID"), -1 );
01387
01388         // couldn't find a match, just bail...
01389         if( nBarID == -1 ) {
01390             TRACE1( "Warning: Could not find registry information for control bar ID %d\n", m_nID );
01391             return;
01392         }
01393
01394         // we have a match, read the information that was stored, and
01395         // update the cx and cy variables passed in.
01396         if( nBarID == m_nID )
01397         {
01398             if(IsHorzDocked()) {
01399                 size.cy += TRACK_BORDER_SIZE+2;
01400             } else {
01401                 size.cx += TRACK_BORDER_SIZE;
01402             }
01403             //m_strSection += _T("\\CodeJock"); //JK - removed to fix the Bar savings, replaced by the code below... The fix taken from CodeJock Website Discussion board
01404             m_strSection.Format ( _T("CodeJock Bar State-Bar%d"), nIndex ); //JK
01405
01406             // Write the BarID here in case it needs to be matched up in later revisions    //JK
01407             pApp->WriteProfileInt( m_strSection, _T("BarID"), m_nID );  //JK
01408
01409             pApp->WriteProfileInt( m_strSection, _T("MRUDesiredCX"), size.cx );
01410             pApp->WriteProfileInt( m_strSection, _T("MRUDesiredCY"), size.cy );
01411             pApp->WriteProfileInt( m_strSection, _T("MRUFloating" ), IsFloating() );
01412             return;
01413         }
01414
01415         // increment count.
01416         ++nIndex;
01417     }
01418 }
01419
01420 void CCJControlBar::LoadBarState(CSize& size, int nID)
01421 {
01422     m_nID = nID;
01423     int nIndex = 0;
01424     CWinApp* pApp = AfxGetApp();
01425
01426     // attempt to loop through all of the defaults stored in the
01427     // system until we find our control id.
01428     while( TRUE )
01429     {
01430         // start at 0 and search for a match to our control bars
01431         // resource id. If one was not found, return.
01432         m_strSection.Format(_T("Bar State-Bar%d"), nIndex);
01433         int nBarID = pApp->GetProfileInt( m_strSection, _T("BarID"), -1 );
01434
01435         // couldn't find a match, just bail...
01436         if( nBarID == -1 ) {
01437             TRACE1( "Warning: Could not find registry information for control bar ID %d\n", m_nID );
01438             return;
01439         }
01440
01441         // we have a match, read the information that was stored, and
01442         // update the CRect object that was passed in.
01443         if( nBarID == m_nID ) {
01444             //m_strSection += _T("\\CodeJock"); //JK - removed to fix the Bar savings, replaced by the code below... The fix taken from CodeJock Website Discussion board
01445             m_strSection.Format ( _T("CodeJock Bar State-Bar%d"), nIndex ) ;    //JK
01446
01447             size.cx     = pApp->GetProfileInt( m_strSection, _T("MRUDesiredCX"), size.cx );
01448             size.cy     = pApp->GetProfileInt( m_strSection, _T("MRUDesiredCY"), size.cy );
01449             m_bFloating = pApp->GetProfileInt( m_strSection, _T("MRUFloating" ), m_bFloating );
01450             return;
01451         }
01452
01453         // increment count.
01454         ++nIndex;
01455     }
01456 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoAnnotateHandler Member List

This is the complete list of members for KoAnnotateHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoAnnotateHandler() | KoAnnotateHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoAnnotateHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoAnnotateHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

MultiFilesEntryIndex Member List

This is the complete list of members for MultiFilesEntryIndex, including all inherited members.

GetIndex() const | MultiFilesEntryIndex | [inline]
GetIterator() const | MultiFilesEntryIndex | [inline]
m_index | MultiFilesEntryIndex | [private]
m_mfi | MultiFilesEntryIndex | [private]
MultiFilesEntryIndex(int index, MultiFiles::const_iterator mfi) | MultiFilesEntryIndex | [inline]

Generated on Sat Aug 7 22:55:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTCP2Parse Member List

This is the complete list of members for CTCP2Parse, including all inherited members.

ansi2ctcp(std::string *in) | ansiAttrCvt | [private]
bg | CTCP2Parse | [private]
bgDef | CTCP2Parse | [private]
bgLast | CTCP2Parse | [private]
Black enum value | CTCP2Parse | [protected]
blinkCnt | CTCP2Parse | [private]
blinkLast | CTCP2Parse | [private]
Blue enum value | CTCP2Parse | [protected]
boldCnt | CTCP2Parse | [private]
boldLast | CTCP2Parse | [private]
CharSpacingType enum name | CTCP2Parse | [protected]
ColorType enum name | CTCP2Parse | [protected]
cp | CTCP2Parse | [private]
cpDef | CTCP2Parse | [private]
cpLast | CTCP2Parse | [private]
CTCP2Parse() | CTCP2Parse | [protected]
Cyan enum value | CTCP2Parse | [protected]
decodeColor(std::string *line, int *parseFrmChar, int *parseEndChar, RGBColor *c) | CTCP2Parse | [inline, private]
decodeToggle(std::string *line, int *parseFrmChar, int *parseEndChar, int *varCnt) | CTCP2Parse | [inline, private]
enc | CTCP2Parse | [private]
encDef | CTCP2Parse | [private]
encLast | CTCP2Parse | [private]
EncodingType enum name | CTCP2Parse | [protected]
fg | CTCP2Parse | [private]
fgDef | CTCP2Parse | [private]
fgLast | CTCP2Parse | [private]
Fixed enum value | CTCP2Parse | [protected]
fntLast | CTCP2Parse | [private]
fntSize | CTCP2Parse | [private]
fromHex(unsigned char h, unsigned char *val) | CTCP2Parse | [inline, private]
Green enum value | CTCP2Parse | [protected]
Grey enum value | CTCP2Parse | [protected]
indexColor | CTCP2Parse | [private, static]
ircii2ctcp(std::string *in) | irciiAttrCvt | [private]
iso8859_1 enum value | CTCP2Parse | [protected]
iso8859_2 enum value | CTCP2Parse | [protected]
iso8859_3 enum value | CTCP2Parse | [protected]
iso8859_4 enum value | CTCP2Parse | [protected]
iso8859_5 enum value | CTCP2Parse | [protected]
iso8859_6 enum value | CTCP2Parse | [protected]
iso8859_7 enum value | CTCP2Parse | [protected]
iso8859_8 enum value | CTCP2Parse | [protected]
iso8859_9 enum value | CTCP2Parse | [protected]
italicCnt | CTCP2Parse | [private]
italicLast | CTCP2Parse | [private]
Lt_Blue enum value | CTCP2Parse | [protected]
Lt_Cyan enum value | CTCP2Parse | [protected]
Lt_Green enum value | CTCP2Parse | [protected]
Lt_Grey enum value | CTCP2Parse | [protected]
Lt_Magenta enum value | CTCP2Parse | [protected]
Lt_Red enum value | CTCP2Parse | [protected]
Lt_Yellow enum value | CTCP2Parse | [protected]
Magenta enum value | CTCP2Parse | [protected]
mirc2ctcp(std::string *in) | mircAttrCvt | [protected]
overCnt | CTCP2Parse | [private]
overLast | CTCP2Parse | [private]
ParseIt(std::string *line) | CTCP2Parse | [protected]
Proportional enum value | CTCP2Parse | [protected]
PushBackgroundColor(unsigned char R, unsigned char G, unsigned char B)=0 | CTCP2Parse | [protected, pure virtual]
PushBlink(bool)=0 | CTCP2Parse | [protected, pure virtual]
PushBold(bool)=0 | CTCP2Parse | [protected, pure virtual]
PushEncoding(EncodingType)=0 | CTCP2Parse | [protected, pure virtual]
PushFontSize(int)=0 | CTCP2Parse | [protected, pure virtual]
PushForegroundColor(unsigned char R, unsigned char G, unsigned char B)=0 | CTCP2Parse | [protected, pure virtual]
PushItalic(bool)=0 | CTCP2Parse | [protected, pure virtual]
PushOut(void) | CTCP2Parse | [inline, private]
PushOverstrike(bool)=0 | CTCP2Parse | [protected, pure virtual]
PushReverse(bool)=0 | CTCP2Parse | [protected, pure virtual]
PushSpacing(CharSpacingType)=0 | CTCP2Parse | [protected, pure virtual]
PushStart()=0 | CTCP2Parse | [protected, pure virtual]
PushTextSegment(std::string *)=0 | CTCP2Parse | [protected, pure virtual]
PushUnderline(bool)=0 | CTCP2Parse | [protected, pure virtual]
PushURL(bool)=0 | CTCP2Parse | [protected, pure virtual]
Red enum value | CTCP2Parse | [protected]
revCnt | CTCP2Parse | [private]
revLast | CTCP2Parse | [private]
segment | CTCP2Parse | [private]
SetDefaults(unsigned char fgR=(unsigned char)((Lt_Grey &0xFF0000) >> 16), unsigned char fgG=(unsigned char)((Lt_Grey &0x00FF00) >> 8), unsigned char fgB=(unsigned char)(Lt_Grey &0x0000FF), unsigned char bgR=(unsigned char)((Black &0xFF0000) >> 16), unsigned char bgG=(unsigned char)((Black &0x00FF00) >> 8), unsigned char bgB=(unsigned char)(Black &0x0000FF), CharSpacingType cpDef_=Fixed, EncodingType encDef_=iso8859_1) | CTCP2Parse | [protected]
underCnt | CTCP2Parse | [private]
underLast | CTCP2Parse | [private]
urlCnt | CTCP2Parse | [private]
urlLast | CTCP2Parse | [private]
UTF_8 enum value | CTCP2Parse | [protected]
White enum value | CTCP2Parse | [protected]
Yellow enum value | CTCP2Parse | [protected]

Generated on Sat Aug 7 22:56:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJReBar Member List

This is the complete list of members for CCJReBar, including all inherited members.

_AddBar(CWnd *pBar, REBARBANDINFO *pRBBI) | CCJReBar | [protected]
AddBar(CWnd *pBar, LPCTSTR pszText=NULL, CBitmap *pbmp=NULL, DWORD dwStyle=RBBS_GRIPPERALWAYS|RBBS_FIXEDBMP) | CCJReBar |
AddBar(CWnd *pBar, COLORREF clrFore, COLORREF clrBack, LPCTSTR pszText=NULL, DWORD dwStyle=RBBS_GRIPPERALWAYS) | CCJReBar |
CalcDynamicLayout(int nLength, DWORD nMode) | CCJReBar | [virtual]
CalcFixedLayout(BOOL bStretch, BOOL bHorz) | CCJReBar | [virtual]
CalcInsideRect(CRect &rect, BOOL bHorz) const | CCJToolBarBase |
CCJReBar() | CCJReBar |
CCJToolBarBase() | CCJToolBarBase | [protected]
Create(CWnd *pParentWnd, DWORD dwCtrlStyle=RBS_BANDBORDERS, DWORD dwStyle=WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|CBRS_TOP, UINT nID=AFX_IDW_REBAR) | CCJReBar |
DoPaint(CDC *pDC) | CCJToolBarBase | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJToolBarBase |
DrawGripper(CDC *pDC, const CRect &rect) | CCJToolBarBase |
EraseNonClient() | CCJToolBarBase |
GetBorders() const | CCJToolBarBase | [protected]
GetReBarCtrl() const | CCJReBar |
m_bExStyle | CCJToolBarBase |
m_bInReBar | CCJToolBarBase |
OnEraseBkgnd(CDC *pDC) | CCJReBar | [protected]
OnHeightChange(NMHDR *pNMHDR, LRESULT *pResult) | CCJReBar | [protected]
OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS *) | CCJReBar | [protected]
OnNcCreate(LPCREATESTRUCT) | CCJReBar | [protected]
OnNcPaint() | CCJReBar | [protected]
OnPaint() | CCJReBar | [protected]
OnRecalcParent() | CCJReBar | [protected]
OnShowBand(WPARAM wParam, LPARAM lParam) | CCJReBar | [protected]
OnToolHitTest(CPoint point, TOOLINFO *pTI) const | CCJReBar | [virtual]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CCJReBar | [virtual]
OnWindowPosChanging(LPWINDOWPOS lpWndPos) | CCJToolBarBase |
SetBorders(LPCRECT lpRect) | CCJToolBarBase | [protected]
SetBorders(int cxLeft=0, int cyTop=0, int cxRight=0, int cyBottom=0) | CCJToolBarBase | [protected]
WindowProc(UINT message, WPARAM wParam, LPARAM lParam) | CCJReBar | [protected, virtual]
~CCJToolBarBase() | CCJToolBarBase | [virtual]

Generated on Sat Aug 7 22:49:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsGraph.h Source File

common/UCvsGraph.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSGRAPH_H
00026 #define UCVSGRAPH_H
00027
00028 #include "uwidget.h"
00029 #include "CvsLog.h"
00030 #include "udraw.h"
00031
00032 class CLogNode;
00033 class EntnodeData;
00034
00035 class CScrollView
00036 {
00037 public:
00038     UPoint GetDeviceScrollPosition() { return UPoint(0, 0); }
00039     void InvalidateRect(const URECT *r) {}
00040 };
00041
00042 class CWinLogData : public CLogNodeData
00043 {
00044 public:
00045     CWinLogData(CLogNode *node);
00046     virtual ~CWinLogData();
00047
00048     inline kLogNode GetType(void) const { return fNode->GetType(); }
00049     const char *GetStr(void);
00050
00051     void ComputeBounds(const UPoint & topLeft, UDC & hdc,
00052         EntnodeData *entryInfo = 0L);
00053     void Offset(UPoint o);
00054     void Update(UDC & hdc, EntnodeData *entryInfo = 0L);
00055
00056     inline URect & Bounds(void) { return totB; }
00057     inline URect & SelfBounds(void) { return selfB; }
00058
00059     inline bool Selected(void) const { return sel; }
00060     void SetSelected(CScrollView *view, bool state);
00061     inline void SetSelected(bool state) { sel = state; }
00062     void UnselectAll(CScrollView *view);
00063     void UnselectAll(void);
00064     CWinLogData *HitTest(UPoint point);
00065
00066     static CWinLogData *CreateNewData(CLogNode *node);
00067
00068     bool IsDiskNode(EntnodeData *entryInfo);
00069
00070 protected:
00071     virtual void UpdateSelf(UDC & hdc, EntnodeData *entryInfo) = 0;
00072     virtual USize GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo) = 0;
00073
00074     inline CWinLogData *GetData(CLogNode *node)
00075         { return (CWinLogData *)node->GetUserData(); }
00076
00077     URect selfB;
00078     URect totB;
00079     bool sel;
00080 };
00081
00082 class CWinLogHeaderData : public CWinLogData
00083 {
00084 public:
00085     CWinLogHeaderData(CLogNode *node) : CWinLogData(node) {}
00086     virtual ~CWinLogHeaderData() {}
00087
00088 protected:
00089     virtual void UpdateSelf(UDC & hdc, EntnodeData *entryInfo);
00090     virtual USize GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo);
00091 };
00092
00093 class CWinLogRevData : public CWinLogData
00094 {
00095 public:
00096     CWinLogRevData(CLogNode *node) : CWinLogData(node) {}
00097     virtual ~CWinLogRevData() {}
00098
00099 protected:
00100     virtual void UpdateSelf(UDC & hdc, EntnodeData *entryInfo);
00101     virtual USize GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo);
00102 };
00103
00104 class CWinLogTagData : public CWinLogData
00105 {
00106 public:
00107     CWinLogTagData(CLogNode *node) : CWinLogData(node) {}
00108     virtual ~CWinLogTagData() {}
00109
00110 protected:
00111     virtual void UpdateSelf(UDC & hdc, EntnodeData *entryInfo);
00112     virtual USize GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo);
00113 };
00114
00115 class CWinLogBranchData : public CWinLogData
00116 {
00117 public:
00118     CWinLogBranchData(CLogNode *node) : CWinLogData(node) {}
00119     virtual ~CWinLogBranchData() {}
00120
00121 protected:
00122     virtual void UpdateSelf(UDC & hdc, EntnodeData *entryInfo);
00123     virtual USize GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo);
00124 };
00125
00126 class UCvsGraph : public UWidget
00127 {
00128     UDECLARE_DYNAMIC(UCvsGraph)
00129 public:
00130     UCvsGraph(CLogNode *node, const char *dir);
00131     virtual ~UCvsGraph();
00132
00133     enum
00134     {
00135         kDrawing = EV_COMMAND_START // 0
00136     };
00137 protected:
00138     CLogNode *m_node;
00139     UStr m_dir;
00140     UStr m_name;
00141     EntnodeData *m_data;
00142
00143     void CalcImageSize(void);
00144
00145     ev_msg void OnDestroy();
00146     ev_msg void OnCreate();
00147     ev_msg void OnDrawing(void *info);
00148     ev_msg void OnBtnClick(void *info);
00149
00150     UDECLARE_MESSAGE_MAP()
00151 };
00152
00153 #endif
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsToolbar.cpp Source File

common/UCvsToolbar.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include "UCvsToolbar.h"
00028 #include "UCvsCommands.h"
00029
00030 UIMPLEMENT_DYNAMIC(UCvsToolbar, UToolbar)
00031
00032 UBEGIN_MESSAGE_MAP(UCvsToolbar, UToolbar)
00033     ON_UDESTROY(UCvsToolbar)
00034     ON_UCREATE(UCvsToolbar)
00035 UEND_MESSAGE_MAP()
00036
00037 UCvsToolbar::UCvsToolbar(int widid) : UToolbar(widid)
00038 {
00039 }
00040
00041 UCvsToolbar::~UCvsToolbar()
00042 {
00043 }
00044
00045 void UCvsToolbar::OnDestroy(void)
00046 {
00047     delete this;
00048 }
00049
00050 void UCvsToolbar::OnCreate(void)
00051 {
00052 }
00053
00054 void CreateMainToolbar(void)
00055 {
00056     UTB_INIT init;
00057     init.widthbtn = 16;
00058     init.heightbtn = 16;
00059     init.title = "Main Toolbar";
00060     UEventSendMessage(kUCvsToolbarID, EV_TB_INIT, 0, &init);
00061
00062     UTB_BUTTON updtBtn = {
00063         "update.xpm",
00064         cmdUPDATE,
00065         DDV_NONE,
00066         DDD_NONE,
00067         _i18n("Update the selected items, changes your disk only\nUpdate selected")
00068     };
00069     UTB_BUTTON commitBtn = {
00070         "commit.xpm",
00071         cmdCOMMIT,
00072         DDV_NONE,
00073         DDD_NONE,
00074         _i18n("Commit the selected items, changes the remote repository\nCommit selected")
00075     };
00076     UTB_BUTTON stopBtn = {
00077         "stop.xpm",
00078         cmdSTOPCVS,
00079         DDV_NONE,
00080         DDD_NONE,
00081         _i18n("Stop when cvs is running...\nStop cvs...")
00082     };
00083     UTB_BUTTON exploreBtn = {
00084         "explore.xpm",
00085         cmdEXPLORE,
00086         DDV_NONE,
00087         DDD_NONE,
00088         _i18n("Open an explorer window for this selection\nExplore selection")
00089     };
00090     UTB_BUTTON upBtn = {
00091         "upfolder.xpm",
00092         cmdUPFOLDER,
00093         DDV_NONE,
00094         DDD_NONE,
00095         _i18n("Go to the upper folder and refresh\nUp one level")
00096     };
00097     UTB_BUTTON diffBtn = {
00098         "diff.xpm",
00099         cmdDIFF,
00100         DDV_NONE,
00101         DDD_NONE,
00102         _i18n("Print the differences with the CVS remote repository\nDiff selected")
00103     };
00104     UTB_BUTTON logBtn = {
00105         "log.xpm",
00106         cmdLOG,
00107         DDV_NONE,
00108         DDD_NONE,
00109         _i18n("Print the history of the selected files\nLog selected")
00110     };
00111     UTB_BUTTON statusBtn = {
00112         "status.xpm",
00113         cmdSTATUS,
00114         DDV_NONE,
00115         DDD_NONE,
00116         _i18n("Print the current status of the selected files\nStatus selected")
00117     };
00118     UTB_BUTTON graphBtn = {
00119         "graph.xpm",
00120         cmdGRAPH,
00121         DDV_NONE,
00122         DDD_NONE,
00123         _i18n("Print the history as a graph of the selected files\nGraph selected")
00124     };
00125     UTB_BUTTON trashBtn = {
00126         "trash.xpm",
00127         cmdTRASH,
00128         DDV_NONE,
00129         DDD_NONE,
00130         _i18n("Erase the selection from your disk\nErase selected")
00131     };
00132     UTB_BUTTON addBtn = {
00133         "add.xpm",
00134         cmdADD,
00135         DDV_NONE,
00136         DDD_NONE,
00137         _i18n("Add the selected items to the remote CVS repository\nAdd selected")
00138     };
00139     UTB_BUTTON addbBtn = {
00140         "addb.xpm",
00141         cmdADDB,
00142         DDV_NONE,
00143         DDD_NONE,
00144         _i18n("Add the selected binary items to the remote CVS repository\nAdd selected binary")
00145     };
00146     UTB_BUTTON rmvBtn = {
00147         "remove.xpm",
00148         cmdRMV,
00149         DDV_NONE,
00150         DDD_NONE,
00151         _i18n("Remove the selected items to the remote CVS repository\nRemove selected")
00152     };
00153     UTB_BUTTON tagBtn = {
00154         "tag.xpm",
00155         cmdTAGNEW,
00156         DDV_NONE,
00157         DDD_NONE,
00158         _i18n("Create/move a tag on the selection\nTag selection")
00159     };
00160     UTB_BUTTON untagBtn = {
00161         "untag.xpm",
00162         cmdTAGDELETE,
00163         DDV_NONE,
00164         DDD_NONE,
00165         _i18n("Remove a tag on the selection\nUntag selection")
00166     };
00167     UTB_BUTTON branchBtn = {
00168         "branch.xpm",
00169         cmdTAGBRANCH,
00170         DDV_NONE,
00171         DDD_NONE,
00172         _i18n("Open (fork) a branch on the selection\nFork selection")
00173     };
00174     UTB_BUTTON lockBtn = {
00175         "lock.xpm",
00176         cmdLOCKF,
00177         DDV_NONE,
00178         DDD_NONE,
00179         _i18n("Lock the selected file on the remote repository until next commit\nLock selection")
00180     };
00181     UTB_BUTTON unlockBtn = {
00182         "unlock.xpm",
00183         cmdUNLOCKF,
00184         DDV_NONE,
00185         DDD_NONE,
00186         _i18n("Unlock the selected file on the remote repository\nUnlock selection")
00187     };
00188     UTB_BUTTON watchBtn = {
00189         "watch.xpm",
00190         cmdWATCHON,
00191         DDV_NONE,
00192         DDD_NONE,
00193         _i18n("Put a watch on the selected files\nWatch selection")
00194     };
00195     UTB_BUTTON unwatchBtn = {
00196         "unwatch.xpm",
00197         cmdWATCHOFF,
00198         DDV_NONE,
00199         DDD_NONE,
00200         _i18n("Release a watch on the selected files\nRelease watch selection")
00201     };
00202     UTB_BUTTON editBtn = {
00203         "edit.xpm",
00204         cmdEDIT,
00205         DDV_NONE,
00206         DDD_NONE,
00207         _i18n("Edit the selected files\nEdit selection")
00208     };
00209     UTB_BUTTON reseditBtn = {
00210         "res_edit.xpm",
00211         cmdRESEDIT,
00212         DDV_NONE,
00213         DDD_NONE,
00214         _i18n("Reserved edit the selected files\nReserve edit selection")
00215     };
00216     UTB_BUTTON uneditBtn = {
00217         "unedit.xpm",
00218         cmdUNEDIT,
00219         DDV_NONE,
00220         DDD_NONE,
00221         _i18n("Unedit the selected files\nUnedit selection")
00222     };
00223     UTB_BUTTON releaseBtn = {
00224         "release.xpm",
00225         cmdRELEASE,
00226         DDV_NONE,
00227         DDD_NONE,
00228         _i18n("Release the selected files\nRelease selection")
00229     };
00230
00231     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &updtBtn);
00232     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &commitBtn);
00233     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00234     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &stopBtn);
00235     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00236     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &addBtn);
00237     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &addbBtn);
00238     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &rmvBtn);
00239     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00240     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &exploreBtn);
00241     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &upBtn);
00242     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00243     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &diffBtn);
00244     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &logBtn);
00245     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &statusBtn);
00246     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00247     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &graphBtn);
00248     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00249     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &trashBtn);
00250     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00251     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &tagBtn);
00252     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &untagBtn);
00253     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &branchBtn);
00254     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00255     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &lockBtn);
00256     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &unlockBtn);
00257     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00258     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &watchBtn);
00259     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &unwatchBtn);
00260     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00261     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &editBtn);
00262     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &reseditBtn);
00263     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &uneditBtn);
00264     UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
00265     UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &releaseBtn);
00266     UEventSendMessage(kUCvsToolbarID, EV_TB_END, 0, 0L);
00267 }
00268
00269 void CreateBrowseToolbar(void)
00270 {
00271     //  not used yet
00272     return;
00273
00274     UTB_INIT init;
00275     init.widthbtn = 16;
00276     init.heightbtn = 16;
00277     init.title = "Browse Toolbar";
00278     UEventSendMessage(kUCvsBrowseToolbarID, EV_TB_INIT, 0, &init);
00279
00280     UEventSendMessage(kUCvsBrowseToolbarID, EV_TB_END, 0, 0L);
00281 }
00282
00283 void CreateFilterToolbar(void)
00284 {
00285     UTB_INIT init;
00286     init.widthbtn = 16;
00287     init.heightbtn = 16;
00288     init.title = "Filter Toolbar";
00289     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_INIT, 0, &init);
00290
00291     UTB_BUTTON flatBtn = {
00292         "flat.xpm",
00293         cmdFLAT,
00294         DDV_NONE,
00295         DDD_NONE,
00296         _i18n("view recursive")
00297     };
00298
00299     UTB_DROPDOWN viewFilterDropDown = {
00300         cmdVIEW_FILEMASK,
00301         0x0,
00302         _i18n("Enter file mask(s) of files to display")
00303     };
00304
00305     UTB_BUTTON viewModifiedBtn = {
00306         "viewModified.xpm",
00307         cmdVIEW_MODIFIED,
00308         DDV_NONE,
00309         DDD_NONE,
00310         _i18n("view modified files")
00311     };
00312
00313     UTB_BUTTON viewChangedBtn = {
00314         "viewChanged.xpm",
00315         cmdVIEW_CHANGED,
00316         DDV_NONE,
00317         DDD_NONE,
00318         _i18n("view changed files")
00319     };
00320
00321     UTB_BUTTON viewAddedBtn = {
00322         "viewAdded.xpm",
00323         cmdVIEW_ADDED,
00324         DDV_NONE,
00325         DDD_NONE,
00326         _i18n("view added files")
00327     };
00328
00329     UTB_BUTTON viewRemovedBtn = {
00330         "viewRemove.xpm",
00331         cmdVIEW_REMOVED,
00332         DDV_NONE,
00333         DDD_NONE,
00334         _i18n("view removed files")
00335     };
00336
00337     UTB_BUTTON viewConflictBtn = {
00338         "viewConflict.xpm",
00339         cmdVIEW_CONFLICT,
00340         DDV_NONE,
00341         DDD_NONE,
00342         _i18n("view conflict files")
00343     };
00344
00345     UTB_BUTTON viewUnknownBtn = {
00346         "viewUnknown.xpm",
00347         cmdVIEW_UNKNOWN,
00348         DDV_NONE,
00349         DDD_NONE,
00350         _i18n("view unknown files")
00351     };
00352
00353     UTB_BUTTON hideUnknownBtn = {
00354         "hideUnknown.xpm",
00355         cmdHIDE_UNKNOWN,
00356         DDV_NONE,
00357         DDD_NONE,
00358         _i18n("hide unknown files")
00359     };
00360
00361     UTB_BUTTON viewMissingBtn = {
00362         "viewMissing.xpm",
00363         cmdVIEW_MISSING,
00364         DDV_NONE,
00365         DDD_NONE,
00366         _i18n("view only missing files")
00367     };
00368
00369     UTB_BUTTON viewIgnoredBtn = {
00370         "viewIgnored.xpm",
00371         cmdIGNORE,
00372         DDV_NONE,
00373         DDD_NONE,
00374         _i18n("View or hide the cvs ignored files\nIgnore switch")
00375     };
00376
00377     UTB_BUTTON reloadBtn = {
00378         "reload.xpm",
00379         cmdRELOAD,
00380         DDV_NONE,
00381         DDD_NONE,
00382         _i18n("Refresh the views, updating the contents\nRefresh view")
00383     };
00384
00385     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &flatBtn);
00386     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00387     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_DROPDOWN, 0, &viewFilterDropDown);
00388     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00389     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewModifiedBtn);
00390     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewChangedBtn);
00391     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewAddedBtn);
00392     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewRemovedBtn);
00393     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewConflictBtn);
00394     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00395     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewUnknownBtn);
00396     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &hideUnknownBtn);
00397     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00398     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewMissingBtn);
00399     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_CHECKBTN, 0, &viewIgnoredBtn);
00400     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_SEPARATOR, 0, 0L);
00401     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_BUTTON, 0, &reloadBtn);
00402     UEventSendMessage(kUCvsFilterToolbarID, EV_TB_END, 0, 0L);
00403 }
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsApp.cpp Source File

common/UCvsApp.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef HAVE_UNISTD_H
00028 #include <unistd.h>
00029 #endif
00030
00031 #ifdef HAVE_FCNTL_H
00032 #include <fcntl.h>
00033 #endif
00034
00035 #ifdef HAVE_SYS_WAIT_H
00036 #include <sys/wait.h>
00037 #endif
00038
00039 #if qGTK
00040 #include <gtk/gtk.h>
00041 #include <signal.h>
00042 // glade generated that
00043 extern "C"
00044 {
00045 #include "support.h"
00046 #include "interface.h"
00047 }
00048 #endif
00049
00050 #include "UCvsApp.h"
00051 #include "UCvsCommands.h"
00052 #include "UCvsConsole.h"
00053 #include "UCvsFrame.h"
00054 #include "UCvsFolders.h"
00055 #include "UCvsFiles.h"
00056 #include "UCvsStatusbar.h"
00057 #include "TclGlue.h"
00058 #include "GetPrefs.h"
00059 #include "CvsArgs.h"
00060 #include "CvsPrefs.h"
00061 #include "AppConsole.h"
00062 #include "MacrosSetup.h"
00063 #include "Authen.h"
00064 #include "PythonGlue.h"
00065 #include "getopt.h"
00066
00067 UIMPLEMENT_DYNAMIC (UCvsApp, UWidget)
00068 UBEGIN_MESSAGE_MAP (UCvsApp, UWidget)
00069 ON_TIMER (UCvsApp::kProcessTimer, UCvsApp::OnMainTimer)
00070 UEND_MESSAGE_MAP ()
00071     UCvsApp *UCvsApp::gApp = 0L;
00072     CvsProcess *UCvsApp::gCvsProcess = 0L;
00073
00074      static void usage (void)
00075 {
00076     fprintf (stderr, "gcvs [--root=path]\n");
00077 }
00078
00079 UCvsApp::UCvsApp (int argc, char **argv):
00080 UWidget (::UEventGetWidID ()),
00081 gCvsRunning (false),
00082 gCvsStopping (false)
00083 {
00084     gApp = this;
00085
00086 #if qGTK
00087 # ifdef DEBUG
00088     add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps");
00089 # endif
00090     add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps");
00091     add_pixmap_directory (PACKAGE_PIXMAPS_DIR);
00092 #endif
00093
00094     // load the persistent values (i.e. preferences) and the locate the macros
00095     gCvsPrefs.load ();
00096
00097     AddTimer (50, kProcessTimer);
00098
00099     m_mainFrame = new UCvsFrame();
00100
00101     if (argc > 0)
00102     {
00103         static struct option long_options[] = {
00104             {"root", required_argument, 0L, 1},
00105             {0, 0, 0, 0}
00106         };
00107         optind = 0;
00108         int option_index = 0, c;
00109         while ((c = getopt_long
00110             (argc, argv, "+", long_options,
00111              &option_index)) != EOF)
00112         {
00113             switch (c)
00114             {
00115             case 1:
00116                 UCvsFolders::SetDefaultRoot (optarg);
00117                 break;
00118             default:
00119                 cvs_err (_("Warning : unknown option\n"));
00120                 usage ();
00121                 break;
00122             }
00123         }
00124
00125     }
00126 }
00127
00128 UCvsApp::~UCvsApp ()
00129 {
00130 }
00131
00132 void
00133 UCvsApp::SayWelcome (void)
00134 {
00135     // say hello from the application, optionnaly prompt for the CVSROOT
00136     cvs_out (_("Welcome to %s %s\n"), PACKAGE, VERSION);
00137     if (gCvsPrefs.empty ())
00138         CompatGetPrefs ();
00139     else
00140         cvs_out ("CVSROOT: %s (%s)\n", (const char *) gCvsPrefs,
00141              gAuthen.kindstr ());
00142
00143     StartScriptEngine();
00144 }
00145
00146 void
00147 UCvsApp::SetCvsRunning (bool state)
00148 {
00149     if (state ^ gCvsRunning)
00150     {
00151         gCvsRunning = state;
00152     }
00153 }
00154
00155 void
00156 UCvsApp::SetCvsStopping (bool state)
00157 {
00158     if (state ^ gCvsStopping)
00159     {
00160         gCvsStopping = state;
00161     }
00162 }
00163
00164 UCvsStatusbar *
00165 UCvsApp::GetStatusBar (void)
00166 {
00167     UCmdTarget *cmd = UEventQueryWidget (kUCvsStatusbarID);
00168     if (cmd != 0L)
00169         return (UCvsStatusbar *) cmd;
00170
00171     return 0L;
00172 }
00173
00174 void
00175 UCvsApp::SetStatusBarText(const char* text)
00176 {
00177     UCvsStatusbar* statusBar = GetStatusBar();
00178     if(statusBar != 0L) {
00179         UEventSendMessage(GetStatusBar()->GetWidID(), EV_STATUSBAR_TEXT, kUMainWidget, (void*)text);
00180     }
00181 }
00182
00183 UCvsFolders *
00184 UCvsApp::GetBrowserView (void)
00185 {
00186     UCmdTarget *cmd = UEventQueryWidget (kUCvsFoldersID);
00187     if (cmd != 0L && cmd->IsKindOf (URUNTIME_CLASS (UCvsFolders)))
00188         return (UCvsFolders *) cmd;
00189
00190     return 0L;
00191 }
00192
00193 UCvsFiles *
00194 UCvsApp::GetFilesView (void)
00195 {
00196     UCmdTarget *cmd = UEventQueryWidget (kUCvsFilesID);
00197     if (cmd != 0L && cmd->IsKindOf (URUNTIME_CLASS (UCvsFiles)))
00198         return (UCvsFiles *) cmd;
00199
00200     return 0L;
00201 }
00202
00203 UCvsConsole *
00204 UCvsApp::GetConsole (void)
00205 {
00206     UCmdTarget *cmd = UEventQueryWidget (kUMainConsoleID);
00207     if (cmd != 0L && cmd->IsKindOf (URUNTIME_CLASS (UCvsConsole)))
00208         return (UCvsConsole *) cmd;
00209
00210     return 0L;
00211 }
00212
00213 const char *
00214 UCvsApp::GetAppName () const
00215 {
00216 #ifdef macintosh
00217     return "MacCvs";
00218 #elif defined(WIN32)
00219     return "WinCvs";
00220 #elif defined(qUnix)
00221     return PACKAGE;
00222 #endif
00223 }
00224
00225 const char *
00226 UCvsApp::GetAppVersion () const
00227 {
00228 #ifdef macintosh
00229
00230 #elif defined(WIN32)
00231
00232 #elif defined(qUnix)
00233     return VERSION;
00234 #endif
00235 }
00236
00237
00238 void UCvsApp::PeekPumpAndIdle(bool doIdle)
00239 {
00240     while (gtk_events_pending())
00241         gtk_main_iteration();
00242
00243     UEventGiveTime();
00244     if(doIdle) {
00245         // nothing to do on idle time yet
00246         /*long lIdle = 0;
00247
00248         while( OnIdle(lIdle++) )
00249             ; */
00250     }
00251 }
00252
00253 void UCvsApp::RestartScriptEngine()
00254 {
00255     StopScriptEngine();
00256     StartScriptEngine(true);
00257 }
00258
00262 void UCvsApp::StartScriptEngine(const bool forceReload /*= false*/)
00263 {
00264     CPython_Interp::InitPythonSupport(forceReload);
00265
00266     //MacrosReloadAll();
00267     PyMacrosReloadAll();
00268
00269     m_hasTCL = CTcl_Interp::IsAvail(forceReload);
00270     m_hasPY = CPython_Interp::IsAvail();
00271
00272     if( gCvsPrefs.GetUseShell() == SHELL_PYTHON && !m_hasPY && m_hasTCL )
00273     {
00274         cvs_out("Python is not available, switching the shell to TCL\n");
00275         gCvsPrefs.SetUseShell(SHELL_TCL);
00276     }
00277     else if( gCvsPrefs.GetUseShell() == SHELL_TCL && m_hasPY && !m_hasTCL )
00278     {
00279         cvs_out("TCL is not available, switching the shell to Python\n");
00280         gCvsPrefs.SetUseShell(SHELL_PYTHON);
00281     }
00282
00283     if( gCvsPrefs.GetUseShell() == SHELL_TCL && m_hasTCL )
00284     {
00285         cvs_out("TCL is available, shell is enabled : help (select and press enter)\n");
00286     }
00287
00288     if( !m_hasTCL && !m_hasPY )
00289     {
00290         cvs_err("TCL or Python are not available, shell is disabled\n");
00291     }
00292 }
00293
00297 void UCvsApp::StopScriptEngine()
00298 {
00299     PyInvalUICache();
00300     CPython_Interp::ClosePythonSupport();
00301 }
00302 // retrieve filtering model to use
00303 KiFilterModel* UCvsApp::GetFilterModel() const
00304 {
00305         return m_mainFrame->GetFilterModel();
00306 }
00307
00308 // retrieve recursion model to use
00309 KiRecursionModel* UCvsApp::GetRecursionModel() const
00310 {
00311         return m_mainFrame->GetRecursionModel();
00312 }
00313
00314 KiIgnoreModel* UCvsApp::GetIgnoreModel() const
00315 {
00316         return m_mainFrame->GetIgnoreModel();
00317 }
00318
00319 /*const char *
00320 UCvsApp::GetAppLibFolder () const
00321 {
00322 #if qUnix
00323     return EXECLIB;
00324 #else
00325     return 0L;
00326 #endif
00327 }*/
00328
00329 #if qUnix
00330 static void
00331 set_cloexec (gint fd)
00332 {
00333     fcntl (fd, F_SETFD, FD_CLOEXEC);
00334 }
00335
00336 static int
00337 gnome_execute_async_with_env_fds (const char *dir, int argc,
00338                   char *const argv[], int envc,
00339                   char *const envv[], gboolean close_fds)
00340 {
00341     int parent_comm_pipes[2], child_comm_pipes[2];
00342     int child_errno, itmp, i, open_max;
00343     int res;
00344     char **cpargv;
00345     pid_t child_pid, immediate_child_pid;   /* XXX this routine assumes
00346                          * pid_t is signed */
00347
00348     if (pipe (parent_comm_pipes))
00349         return -1;
00350
00351     child_pid = immediate_child_pid = fork ();
00352
00353     switch (child_pid)
00354     {
00355     case -1:
00356         close (parent_comm_pipes[0]);
00357         close (parent_comm_pipes[1]);
00358         return -1;
00359
00360     case 0:     /* START PROCESS 1: child */
00361         child_pid = -1;
00362         res = pipe (child_comm_pipes);
00363         close (parent_comm_pipes[0]);
00364         if (!res)
00365             child_pid = fork ();
00366
00367         switch (child_pid)
00368         {
00369         case -1:
00370             itmp = errno;
00371             child_pid = -1; /* simplify parent code */
00372             write (parent_comm_pipes[1], &child_pid,
00373                    sizeof (child_pid));
00374             write (parent_comm_pipes[1], &itmp, sizeof (itmp));
00375             close (child_comm_pipes[0]);
00376             close (child_comm_pipes[1]);
00377             _exit (0);
00378             break;  /* END PROCESS 1: monkey in the middle dies */
00379
00380         default:
00381         {
00382             char buf[16];
00383
00384             close (child_comm_pipes[1]);
00385             while ((res =
00386                 read (child_comm_pipes[0], buf,
00387                       sizeof (buf))) > 0)
00388                 write (parent_comm_pipes[1], buf, res);
00389             close (child_comm_pipes[0]);
00390             _exit (0);  /* END PROCESS 1: monkey in the middle dies */
00391         }
00392             break;
00393
00394         case 0: /* START PROCESS 2: child of child */
00395             close (parent_comm_pipes[1]);
00396             /* pre-exec setup */
00397             close (child_comm_pipes[0]);
00398             set_cloexec (child_comm_pipes[1]);
00399             child_pid = getpid ();
00400             res = write (child_comm_pipes[1], &child_pid,
00401                      sizeof (child_pid));
00402
00403             if (envv)
00404             {
00405                 for (itmp = 0; itmp < envc; itmp++)
00406                     putenv (envv[itmp]);
00407             }
00408
00409             if (dir)
00410                 chdir (dir);
00411
00412             cpargv = (char **) malloc ((argc + 1) *
00413                            sizeof (char *));
00414             memcpy (cpargv, argv, argc * sizeof (char *));
00415             cpargv[argc] = NULL;
00416
00417             if (close_fds)
00418             {
00419                 int stdinfd;
00420                 /* Close all file descriptors but stdin stdout and stderr */
00421                 open_max = sysconf (_SC_OPEN_MAX);
00422                 for (i = 3; i < open_max; i++)
00423                     set_cloexec (i);
00424
00425                 if (child_comm_pipes[1] != 0)
00426                 {
00427                     close (0);
00428                     /* Open stdin as being nothingness, so that if someone tries to
00429                      * read from this they don't hang up the whole GNOME session. BUGFIX #1548 */
00430                     stdinfd =
00431                         open ("/dev/null", O_RDONLY);
00432                     g_assert (stdinfd >= 0);
00433                     if (stdinfd != 0)
00434                     {
00435                         dup2 (stdinfd, 0);
00436                         close (stdinfd);
00437                     }
00438                 }
00439             }
00440             signal (SIGPIPE, SIG_DFL);
00441             /* doit */
00442             execvp (cpargv[0], cpargv);
00443             free (cpargv);
00444
00445             /* failed */
00446             itmp = errno;
00447             write (child_comm_pipes[1], &itmp, sizeof (itmp));
00448             _exit (1);
00449             break;  /* END PROCESS 2 */
00450         }
00451         break;
00452
00453     default:        /* parent process */
00454         /* do nothing */
00455         break;
00456     }
00457
00458     close (parent_comm_pipes[1]);
00459
00460     res = read (parent_comm_pipes[0], &child_pid, sizeof (child_pid));
00461     if (res != sizeof (child_pid))
00462     {
00463         g_message ("res is %d instead of %d", res,
00464                (int)sizeof (child_pid));
00465         child_pid = -1; /* really weird things happened */
00466     }
00467     else if (read
00468          (parent_comm_pipes[0], &child_errno,
00469           sizeof (child_errno)) == sizeof (child_errno))
00470     {
00471         errno = child_errno;
00472         child_pid = -1;
00473     }
00474
00475     /* do this after the read's in case some OS's handle blocking on pipe writes
00476      * differently */
00477     waitpid (immediate_child_pid, &itmp, 0);    /* eat zombies */
00478
00479     close (parent_comm_pipes[0]);
00480
00481     if (child_pid < 0)
00482         g_message ("gnome_execute_async_with_env_fds: returning %d",
00483                child_pid);
00484
00485     return child_pid;
00486 }
00487 #endif
00488
00489 void
00490 UCvsApp::Execute (int argc, char *const *argv)
00491 {
00492 #if qUnix
00493     // The Authentication code (AnthenModel) nulls home
00494     // after a CVS call so rather that mess with it (somebody
00495     // apparently meant to do it) we will make sure HOME is set
00496     // for our child process here.
00497     CvsArgs args(false);
00498     UStr home;
00499     home = "HOME=";
00500     home << gCvsPrefs.Home();
00501     args.add(home);
00502
00503     gnome_execute_async_with_env_fds (0L, argc, argv, args.Argc(), args.Argv(), true);
00504 #endif
00505 }
00506
00507 void
00508 UCvsApp::OnMainTimer (long time)
00509 {
00510     if (gCvsProcess != 0L)
00511     {
00512         cvs_process_give_time ();
00513         if (!cvs_process_is_active (gCvsProcess))
00514         {
00515             SetCvsRunning (false);
00516             SetCvsProcess((CvsProcess*)0L);
00517             DoValidUI (false);
00518             GetFilesView()->ResetView (false, false);
00519 //          fprintf(stderr, "Update\n");
00520         }
00521 //  fprintf(stderr, "Update2\n");
00522     }
00523 }
00524
00525 #if qGTK
00526 extern GtkWidget *MainWindow;
00527 #   define NEWDLG(name) \
00528     void *UCreate_##name(void *Parent) \
00529     {   GtkWidget *wid = create_##name(); \
00530         GtkWidget *pp = Parent ? (GtkWidget *)Parent : MainWindow; \
00531         if( wid && pp) gtk_window_set_transient_for (GTK_WINDOW (wid), GTK_WINDOW (pp)); \
00532         return wid; \
00533     }
00534 NEWDLG (MainWindow)
00535 NEWDLG (GraphWindow)
00536 NEWDLG (Alert)
00537 NEWDLG (gcvs_Settings)
00538 NEWDLG (UpdateDlg)
00539 NEWDLG (PasswdDlg)
00540 NEWDLG (CommitDlg)
00541 NEWDLG (DiffDlg)
00542 NEWDLG (CheckoutDlg)
00543 NEWDLG (LogDlg)
00544 NEWDLG (ImportFilterDlg)
00545 NEWDLG (ImpWarningDlg)
00546 NEWDLG (ImpEntryDlg)
00547 NEWDLG (ImportDlg)
00548 NEWDLG (CmdlineDlg)
00549 NEWDLG (TagModDlg)
00550 NEWDLG (BranchModDlg)
00551 NEWDLG (UntagModDlg)
00552 NEWDLG (TagDlg)
00553 NEWDLG (BranchDlg)
00554 NEWDLG (UntagDlg)
00555 NEWDLG (SettingsDlg)
00556 NEWDLG (AboutDlg)
00557 NEWDLG (SelTagBranchDlg)
00558 NEWDLG (SelDetailsDlg)
00559 NEWDLG (AskYesNoDlg)
00560 #endif
00561
00562 void *
00563 UCreate_pixmap (UWidget * parent, const char *fileIcon)
00564 {
00565 #if qGTK
00566     GtkWidget *wid = (GtkWidget *) parent->GetWidget (kUMainWidget);
00567     return GTK_PIXMAP (create_pixmap (wid, fileIcon));
00568 #else
00569     return 0L;
00570 #endif
00571 }
00572
00573 bool IsAppEnabled()
00574 {
00575     UCvsApp *app = UCvsApp::gApp;
00576     return !app->IsCvsRunning() && !gCvsPrefs.empty();
00577 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJSizeDockBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJSizeDockBar.cpp

Go to the documentation of this file.
00001 // CJSizeDockBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJSizeDockBar.cpp $
00011  *
00012  * $History: CJSizeDockBar.cpp $
00013  *
00014  * *****************  Version 12  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:14p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Minor update to tracker.
00018  *
00019  * *****************  Version 11  *****************
00020  * User: Kirk Stowell Date: 10/29/99   Time: 12:44a
00021  * Updated in $/CodeJock/CJLibrary
00022  * Added static member variable CCJSizeDockBar::m_bIsDockBar used for save
00023  * and restore bar state.
00024  *
00025  * *****************  Version 10  *****************
00026  * User: Kirk Stowell Date: 10/15/99   Time: 1:28a
00027  * Updated in $/CodeJock/CJLibrary
00028  * Fixed bug with just clicking on the sizing tracker and the control bar
00029  * resizing one pixel to the left or right. The bar will only be sized if
00030  * the cursor has changed its location.
00031  *
00032  * *****************  Version 9  *****************
00033  * User: Kirk Stowell Date: 9/16/99    Time: 2:35p
00034  * Updated in $/CodeJockey/CJLibrary
00035  * Fixed bug with save / restore bar state, and with saved bar size
00036  * changing whenever the application starts.
00037  *
00038  * *****************  Version 8  *****************
00039  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00040  * Updated in $/CodeJockey/CJLibrary
00041  * Updated copyright and contact information.
00042  *
00043  * *****************  Version 7  *****************
00044  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00045  * Updated in $/CodeJockey/CJLibrary
00046  *
00047  * *****************  Version 6  *****************
00048  * User: Kirk Stowell Date: 7/18/99    Time: 10:29p
00049  * Updated in $/CodeJockey/CJLibrary
00050  * Added vc5 compatibility.
00051  *
00052  * *****************  Version 5  *****************
00053  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00054  * Updated in $/CodeJockey/CJ60Lib
00055  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00056  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00057  * message handler, this is now automatically handled by the base class.
00058  * Added redraw flags to the create method and modified paint and layout
00059  * handlers to reduce flicker and un-necessary command handling. Dragging
00060  * rect now reflects actual control bar docked size. Added "flat" look to
00061  * the control bars, the control bars can now use the classic DevStudio
00062  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00063  * docking windows now handle dragging, docking and floating much better,
00064  * and behave more like DevStudio.
00065  *
00066  * *****************  Version 4  *****************
00067  * User: Kirk Stowell Date: 4/14/99    Time: 11:07p
00068  * Updated in $/CodeJockey/CJ60Lib
00069  * Changed CFrameWnd *pFrame = (CFrameWnd*)AfxGetApp()->m_pMainWnd; to
00070  * CFrameWnd *pFrame = GetParentFrame(); see line 432.
00071  *
00072  * *****************  Version 3  *****************
00073  * User: Kirk Stowell Date: 4/03/99    Time: 11:06p
00074  * Updated in $/CodeJockey/CJ60Lib
00075  * Added comments and cleaned up code.
00076  *
00077  * *****************  Version 2  *****************
00078  * User: Kirk Stowell Date: 1/29/99    Time: 11:06p
00079  * Updated in $/CodeJockey/CJ60Lib
00080  * Made some cosmetic enhancements to more closely match DevStudio docking
00081  * windows.
00082  *
00083  * *****************  Version 1  *****************
00084  * User: Kirk Stowell Date: 1/12/99    Time: 11:06p
00085  * Created in $/CodeJockey/CJ60Lib
00086  * Initial release to add side-by-side docking support for CCJControlBar
00087  * class.
00088  *
00089  ***************************************************************************/
00091
00092 #include "stdafx.h"
00093 #include "CJSizeDockBar.h"
00094 #include "CJControlBar.h"
00095 #include "CJToolBar.h"
00096 #include "CJResource.h"
00097
00098 #ifdef _DEBUG
00099 #define new DEBUG_NEW
00100 #undef THIS_FILE
00101 static char THIS_FILE[] = __FILE__;
00102 #endif
00103
00104 #define TRACK_BORDER_SIZE       4
00105
00106 bool CCJSizeDockBar::m_bIsDockBar = false;
00107
00109 // CCJSizeDockBar
00110
00111 CCJSizeDockBar::CCJSizeDockBar()
00112 {
00113     m_cxLeftBorder      = 0;
00114     m_cyTopBorder       = 0;
00115     m_cxRightBorder     = 0;
00116     m_cyBottomBorder    = 0;
00117     m_iActualSize       = 100;
00118     m_iSafeSpace        = 25;
00119     m_bOkToDrag         = FALSE;
00120     m_bDragging         = FALSE;
00121     m_bAutoDelete       = TRUE;
00122     m_bFlatBorder       = TRUE;     //Yiannhs v6.06 for Docking bar flat border
00123     m_ptCurrent         = CPoint(0,0);
00124 }
00125
00126 CCJSizeDockBar::~CCJSizeDockBar()
00127 {
00128     // TODO: add destruction code here.
00129 }
00130
00131 IMPLEMENT_DYNAMIC(CCJSizeDockBar, CDockBar)
00132
00133 BEGIN_MESSAGE_MAP(CCJSizeDockBar, CDockBar)
00134     //{{AFX_MSG_MAP(CCJSizeDockBar)
00135     ON_WM_NCPAINT()
00136     ON_WM_NCCALCSIZE()
00137     ON_WM_SETCURSOR()
00138     ON_WM_NCHITTEST()
00139     ON_WM_NCLBUTTONDOWN()
00140     ON_WM_LBUTTONUP()
00141     ON_WM_MOUSEMOVE()
00142     //}}AFX_MSG_MAP
00143 END_MESSAGE_MAP()
00144
00146 // CCJSizeDockBar overrides
00147
00148 CSize CCJSizeDockBar::CalcDynamicLayout(int /*nLength*/, DWORD nMode)
00149 {
00150     int ActualSize = 0;
00151     for(int i=0;i<= m_arrBars.GetUpperBound();++i)
00152     {
00153         CCJControlBar *pBar = (CCJControlBar *)GetDockedControlBar(i);
00154         if (pBar != NULL && pBar->IsVisible())
00155         {
00156             ActualSize = m_iActualSize;
00157             break;
00158         }
00159     }
00160
00161     int cx=0,cy=0;
00162     if (nMode & LM_VERTDOCK) {
00163         cx = ActualSize ;
00164         cy = 32767;
00165     }
00166
00167     if (nMode & LM_HORZDOCK) {
00168         cx= 32767;
00169         cy = ActualSize;
00170     }
00171
00172     //Yiannhs. Use selective layout. Since the dock bar does not calculate the bar sizes yet
00173     if( !m_bLayoutQuery )
00174         CalcSizeBarLayout();
00175
00176     return CSize(cx,cy);
00177 }
00178
00179 void CCJSizeDockBar::DoPaint(CDC *pDC)
00180 {
00181     CDockBar::DoPaint(pDC);
00182 }
00183
00184 void CCJSizeDockBar::OnInvertTracker(const CRect& rect)
00185 {
00186     ASSERT_VALID(this);
00187     ASSERT(!rect.IsRectEmpty());
00188
00189     CDC* pDC = GetDockingFrame()->GetDC();
00190     CBrush* pBrush = CDC::GetHalftoneBrush();
00191     CBrush* pOldBrush = NULL;
00192
00193     if (pBrush != NULL) {
00194         pOldBrush = pDC->SelectObject(pBrush);
00195     }
00196
00197     pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATINVERT);
00198
00199     if (pOldBrush != NULL) {
00200         pDC->SelectObject(pOldBrush);
00201     }
00202     GetDockingFrame()->ReleaseDC(pDC);
00203 }
00204
00205 void CCJSizeDockBar::HitTest(const CPoint & point)
00206 {
00207     UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00208     CRect rcWin;
00209     GetWindowRect(&rcWin);
00210     HCURSOR hCur = NULL;
00211
00212     //Yiannhs: Check the if statements, and change of variable TRackBorder size
00213     if (nID == AFX_IDW_SIZEBAR_LEFT || nID == AFX_IDW_SIZEBAR_RIGHT ) {
00214         //we are sure the DOCK bar is vertical
00215         if( nID == AFX_IDW_SIZEBAR_LEFT )
00216             rcWin.left = rcWin.right - TRACK_BORDER_SIZE;
00217         else
00218             rcWin.right = rcWin.left + TRACK_BORDER_SIZE;
00219
00220         if( rcWin.PtInRect(point) )
00221             hCur = AfxGetApp()->LoadCursor(IDC_HSPLITBAR);
00222
00223     } else {
00224         //The DOCK bar is horizontal
00225         if (nID == AFX_IDW_SIZEBAR_TOP)
00226             rcWin.top = rcWin.bottom - TRACK_BORDER_SIZE;
00227         else
00228             rcWin.bottom = rcWin.top + TRACK_BORDER_SIZE;
00229
00230         if( rcWin.PtInRect(point) )
00231             hCur = AfxGetApp()->LoadCursor(IDC_VSPLITBAR);
00232     }
00233
00234     if( hCur )
00235         SetCursor(hCur);
00236
00237     m_bOkToDrag = BOOL((long)hCur);
00238 }
00239
00241 // CCJSizeDockBar message handlers
00242
00243 void CCJSizeDockBar::OnNcPaint()
00244 {
00245     EraseNonClient();
00246 }
00247
00248 void CCJSizeDockBar::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp)
00249 {
00250     UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00251     //Yiannhs changed the tracksize variable
00252     if (nID == AFX_IDW_SIZEBAR_LEFT) {
00253         m_cyBottomBorder += TRACK_BORDER_SIZE;
00254         CDockBar::OnNcCalcSize(bCalcValidRects, lpncsp);
00255         m_cyBottomBorder -= TRACK_BORDER_SIZE;
00256     }
00257
00258     else if (nID == AFX_IDW_SIZEBAR_TOP) {
00259         m_cyBottomBorder += TRACK_BORDER_SIZE;
00260         CDockBar::OnNcCalcSize(bCalcValidRects, lpncsp);
00261         m_cyBottomBorder -= TRACK_BORDER_SIZE;
00262     }
00263
00264     else if (nID == AFX_IDW_SIZEBAR_RIGHT) {
00265         m_cyTopBorder += TRACK_BORDER_SIZE;
00266         CDockBar::OnNcCalcSize(bCalcValidRects, lpncsp);
00267         m_cyTopBorder -= TRACK_BORDER_SIZE;
00268     }
00269
00270     else if (nID == AFX_IDW_SIZEBAR_BOTTOM) {
00271         m_cyTopBorder += TRACK_BORDER_SIZE;
00272         CDockBar::OnNcCalcSize(bCalcValidRects, lpncsp);
00273         m_cyTopBorder -= TRACK_BORDER_SIZE;
00274     }
00275 }
00276
00277 BOOL CCJSizeDockBar::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
00278 {
00279     return (nHitTest == HTCLIENT)?
00280         CDockBar::OnSetCursor(pWnd, nHitTest, message):FALSE;
00281 }
00282
00283 UINT CCJSizeDockBar::OnNcHitTest(CPoint point)
00284 {
00285     HitTest(point);
00286     return (m_bOkToDrag)?HTBORDER:CDockBar::OnNcHitTest(point);
00287 }
00288
00289 void CCJSizeDockBar::OnNcLButtonDown(UINT nHitTest, CPoint point)
00290 {
00291     // save the current cursor postion.
00292     m_ptCurrent = point;
00293     ScreenToClient(&m_ptCurrent);
00294
00295     if( m_bOkToDrag )
00296     {
00297         UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00298         CFrameWnd *pFrame=GetDockingFrame();
00299         GetWindowRect(m_rcTrack);
00300
00301         //Yiannhs changed tracsize variable
00302         if (nID == AFX_IDW_SIZEBAR_LEFT)
00303             m_rcTrack.left = m_rcTrack.right - TRACK_BORDER_SIZE;
00304
00305         else if (nID == AFX_IDW_SIZEBAR_TOP)
00306             m_rcTrack.top = m_rcTrack.bottom - TRACK_BORDER_SIZE;
00307
00308         else if (nID == AFX_IDW_SIZEBAR_RIGHT)
00309             m_rcTrack.right = m_rcTrack.left + TRACK_BORDER_SIZE;
00310
00311         else if (nID == AFX_IDW_SIZEBAR_BOTTOM)
00312             m_rcTrack.bottom = m_rcTrack.top + TRACK_BORDER_SIZE;
00313
00314         pFrame->ScreenToClient(&m_rcTrack);
00315         pFrame->ScreenToClient(&point);
00316
00317         m_ptStartDrag = point;
00318         m_ptCurDrag = point;
00319
00320         SetCapture();
00321         m_bDragging = TRUE;
00322         OnInvertTracker(m_rcTrack);
00323
00324     } else {
00325         //Yiannhs
00326         CDockBar::OnNcLButtonDown(nHitTest, point);
00327     }
00328 }
00329
00330 void CCJSizeDockBar::OnLButtonUp(UINT nFlags, CPoint point)
00331 {
00332     if( m_ptCurrent == point ) {
00333         ReleaseCapture();
00334         m_bDragging = FALSE;
00335         OnInvertTracker(m_rcTrack);
00336         CDockBar::OnLButtonUp(nFlags, point);
00337     }
00338
00339     else if( m_bDragging )
00340     {
00341         CRect rectWin;
00342         CRect rectAvail;
00343         GetWindowRect(&rectWin);
00344         ReleaseCapture();
00345         m_bDragging = FALSE;
00346         OnInvertTracker(m_rcTrack);
00347         GetAvailableRect(rectAvail);
00348         UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00349
00350         if (nID == AFX_IDW_SIZEBAR_LEFT ) {
00351             int maxWidth = rectAvail.Width()-m_iSafeSpace;
00352             int newWidth = m_rcTrack.left-m_ptStartDrag.x;
00353             m_iActualSize = newWidth>maxWidth ? maxWidth: newWidth;
00354             m_iActualSize += rectWin.Width();
00355         }
00356
00357         else if (nID == AFX_IDW_SIZEBAR_TOP) {
00358             int maxHeight = rectAvail.Height()-m_iSafeSpace;
00359             int newHeight = m_rcTrack.top-m_ptStartDrag.y;
00360             m_iActualSize = newHeight>maxHeight ? maxHeight : newHeight;
00361             m_iActualSize += rectWin.Height();
00362         }
00363
00364         else if (nID == AFX_IDW_SIZEBAR_RIGHT) {
00365             int maxWidth = rectAvail.Width()-m_iSafeSpace;
00366             int newWidth = m_ptStartDrag.x-m_rcTrack.left;
00367             m_iActualSize = newWidth>maxWidth ? maxWidth: newWidth;
00368             m_iActualSize += rectWin.Width();
00369         }
00370
00371         else if (nID == AFX_IDW_SIZEBAR_BOTTOM) {
00372             int maxHeight = rectAvail.Height()-m_iSafeSpace;
00373             int newHeight = m_ptStartDrag.y-m_rcTrack.top;
00374             m_iActualSize = newHeight>maxHeight ? maxHeight : newHeight;
00375             m_iActualSize += rectWin.Height();
00376         }
00377
00378         if(m_iActualSize< TRACK_BORDER_SIZE )
00379             m_iActualSize = TRACK_BORDER_SIZE;
00380
00381         GetDockingFrame()->RecalcLayout();
00382         RecalcAllExcept(NULL);
00383
00384     } else {
00385         //Yiannhs
00386         CDockBar::OnLButtonUp(nFlags, point);
00387     }
00388 }
00389
00390 void CCJSizeDockBar::OnMouseMove(UINT nFlags, CPoint point)
00391 {
00392     if( m_bDragging )
00393     {
00394         CRect rectWin;
00395         GetWindowRect(&rectWin);
00396         CRect rectAvail;
00397         GetAvailableRect(rectAvail);
00398         CFrameWnd *pFrame=GetDockingFrame();
00399         ClientToScreen(&point);
00400         pFrame->ScreenToClient(&point);
00401         UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00402
00403         if (nID == AFX_IDW_SIZEBAR_LEFT) {
00404             point.x = point.x > rectAvail.right ? rectAvail.right : point.x;
00405             point.x = point.x < TRACK_BORDER_SIZE ? TRACK_BORDER_SIZE : point.x;
00406         }
00407
00408         else if (nID == AFX_IDW_SIZEBAR_TOP) {
00409             point.y = point.y > rectAvail.bottom ? rectAvail.bottom : point.y;
00410             point.y = point.y < TRACK_BORDER_SIZE ? TRACK_BORDER_SIZE : point.y;
00411         }
00412
00413         else if (nID == AFX_IDW_SIZEBAR_RIGHT) {
00414             point.x = point.x < rectAvail.left ? rectAvail.left:point.x;
00415             point.x = point.x > rectAvail.right + m_iActualSize - TRACK_BORDER_SIZE ?
00416                                 rectAvail.right - TRACK_BORDER_SIZE + m_iActualSize : point.x;
00417         }
00418
00419         else if (nID == AFX_IDW_SIZEBAR_BOTTOM) {
00420             point.y = point.y < rectAvail.top ? rectAvail.top : point.y;
00421             point.y = point.y > rectAvail.bottom + m_iActualSize - TRACK_BORDER_SIZE ?
00422                                 rectAvail.bottom - TRACK_BORDER_SIZE + m_iActualSize : point.y;
00423         }
00424
00425         int deltaX = point.x - m_ptCurDrag.x;
00426         int deltaY = point.y - m_ptCurDrag.y;
00427
00428         m_ptCurDrag = point;
00429
00430         if (nID == AFX_IDW_SIZEBAR_LEFT || nID == AFX_IDW_SIZEBAR_RIGHT && deltaX)
00431         {
00432             OnInvertTracker(m_rcTrack);
00433             m_rcTrack.left+=deltaX;
00434             m_rcTrack.right+=deltaX;
00435             OnInvertTracker(m_rcTrack);
00436         }
00437
00438         else if( nID == AFX_IDW_SIZEBAR_TOP || nID == AFX_IDW_SIZEBAR_BOTTOM && deltaY)
00439         {
00440             OnInvertTracker(m_rcTrack);
00441             m_rcTrack.top+=deltaY;
00442             m_rcTrack.bottom+=deltaY;
00443             OnInvertTracker(m_rcTrack);
00444         }
00445
00446     } else {
00447         //Yiannhs
00448         CDockBar::OnMouseMove(nFlags, point);
00449     }
00450 }
00451
00453 // CCJControlBar operations
00454
00455 void CCJSizeDockBar::GetAvailableRect(CRect &rect)
00456 {
00457     GetDockingFrame()->GetClientRect(&rect);
00458     GetDockingFrame()->RepositionBars(0xffff, 0xffff, AFX_IDW_PANE_FIRST,reposQuery,
00459         &rect, &rect, TRUE);
00460 }
00461
00462 BOOL CCJSizeDockBar::IsLastControlBar(int index)
00463 {
00464     for( int i=index; i<m_arrBars.GetSize(); ++i)
00465     {
00466         CCJControlBar *pOther = (CCJControlBar *)GetDockedControlBar(i);
00467         if (pOther != NULL && pOther->IsVisible())
00468         {
00469             return FALSE;
00470         }
00471     }
00472
00473     return TRUE;
00474 }
00475
00476 CCJControlBar* CCJSizeDockBar::GetDockedSizeBar(int nPos)
00477 {
00478     return (CCJControlBar*)GetDockedControlBar(nPos);
00479 }
00480
00481 void CCJSizeDockBar::RecalcAllExcept(CCJSizeDockBar *pBar)
00482 {
00483     CFrameWnd *pFrame = GetParentFrame();
00484     ASSERT_VALID(pFrame);
00485
00486     for (int i = 0; i < 4; i++)
00487     {
00488         CCJSizeDockBar* pDock = (CCJSizeDockBar*)pFrame->GetControlBar(dwSizeBarMap[i][0]);
00489         if (pDock != NULL && pDock != pBar) {
00490             pDock->CalcSizeBarLayout();
00491         }
00492     }
00493 }
00494
00495 void CCJSizeDockBar::DrawBorders(CDC *pDC, CRect &rect)
00496 {
00497     int cxBorderLeft    = 0;
00498     int cxBorderRight   = 0;
00499     int cyBorderTop     = 0;
00500     int cyBorderBottom  = 0;
00501
00502     CRect rc;
00503     rc.CopyRect(&rect);
00504
00505     //Yiannhs: i've replaced color variables with the afxdata ones.
00506     if (m_dwStyle & CBRS_BORDER_TOP) {
00507         pDC->FillSolidRect(rc.left, rc.top, rc.Width(), 1, afxData.clrBtnShadow);
00508         pDC->FillSolidRect(rc.left, rc.top+1, rc.Width(), 1, afxData.clrBtnHilite);
00509         cyBorderTop+=2;
00510     }
00511
00512     if (m_dwStyle & CBRS_BORDER_BOTTOM) {
00513         pDC->FillSolidRect(rc.left, rc.bottom-1, rc.Width(), 1, afxData.clrBtnHilite);
00514         pDC->FillSolidRect(rc.left, rc.bottom-2, rc.Width(), 1, afxData.clrBtnShadow);
00515         cyBorderBottom+=2;
00516     }
00517
00518     if (m_dwStyle & CBRS_BORDER_LEFT) {
00519         pDC->FillSolidRect(rc.left, rc.top, 1, rc.Height(), afxData.clrBtnShadow);
00520         pDC->FillSolidRect(rc.left+1, rc.top, 1, rc.Height(), afxData.clrBtnHilite);
00521         cxBorderLeft+=2;
00522     }
00523
00524     if (m_dwStyle & CBRS_BORDER_RIGHT) {
00525         pDC->FillSolidRect(rc.right-2, rc.top, 1, rc.Height(), afxData.clrBtnShadow);
00526         pDC->FillSolidRect(rc.right-1, rc.top, 1, rc.Height(), afxData.clrBtnHilite);
00527         cxBorderRight+=2;
00528     }
00529
00530     UINT nID = ((UINT)(WORD)::GetDlgCtrlID(m_hWnd));
00531
00532     CRect rcTrack;
00533     rcTrack.CopyRect(&rc);
00534
00535     if (nID == AFX_IDW_SIZEBAR_LEFT) {
00536         rcTrack.left    = rc.right - TRACK_BORDER_SIZE;
00537         rcTrack.right  += 1;
00538         rcTrack.top    += 1;
00539         rcTrack.bottom -= 1;
00540         //Yiannhs moved below
00541         cxBorderRight = TRACK_BORDER_SIZE;
00542     }
00543
00544     else if (nID == AFX_IDW_SIZEBAR_TOP) {
00545         rcTrack.top = rc.bottom - TRACK_BORDER_SIZE;
00546         rcTrack.bottom+=1;
00547         //Yiannhs moved below
00548         cyBorderBottom = TRACK_BORDER_SIZE;
00549     }
00550
00551     else if (nID == AFX_IDW_SIZEBAR_RIGHT) {
00552         rcTrack.right   = rc.left + TRACK_BORDER_SIZE;
00553         rcTrack.left   -= 1;
00554         rcTrack.top    += 1;
00555         rcTrack.bottom -= 1;
00556         //Yiannhs moved below
00557         cxBorderLeft = TRACK_BORDER_SIZE;
00558     }
00559
00560     else if (nID == AFX_IDW_SIZEBAR_BOTTOM) {
00561         rcTrack.bottom = rc.top + TRACK_BORDER_SIZE;
00562         rcTrack.top-=1;
00563         //Yiannhs moved below
00564         cyBorderTop = TRACK_BORDER_SIZE;
00565     }
00566
00567     //Yiannhs Moved these here. in one place. The optimizer may do this, but lets help it.
00568     pDC->FillSolidRect(rcTrack, afxData.clrBtnFace);
00569     if( !m_bFlatBorder )    //Yiannhs handle flat borders
00570         pDC->Draw3dRect(rcTrack, afxData.clrBtnHilite, afxData.clrBtnShadow);
00571
00572     rect.left   += cxBorderLeft;
00573     rect.right  -= cxBorderRight;
00574     rect.top    += cyBorderTop;
00575     rect.bottom -= cyBorderBottom;
00576 }
00577
00578 void CCJSizeDockBar::EraseNonClient()
00579 {
00580     CWindowDC dc(this);
00581     CRect rectClient;
00582     GetClientRect(rectClient);
00583     CRect rectWindow;
00584     GetWindowRect(rectWindow);
00585     ScreenToClient(rectWindow);
00586     rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);
00587     dc.ExcludeClipRect(rectClient);
00588     rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);
00589     DrawBorders(&dc, rectWindow);
00590 }
00591
00592
00593 //1999-05-18    Yiannhs
00594 void CCJSizeDockBar::CalcSizeBarLayout()
00595 {
00596     //Yiannhs: It is necessary to set all Control bars in one row.
00597     //         till now multiple rows are not handled
00598     int VisCount = GetDockedVisibleCount();
00599     if( !VisCount )
00600         return;      //Yiannhs v6.07 moved this on top
00601
00602     AFX_SIZEPARENTPARAMS layout;
00603     layout.hDWP = ::BeginDeferWindowPos( m_arrBars.GetSize( ));
00604     CRect rectAvail;
00605     GetClientRect(&rectAvail);
00606
00607     int nCount = 0;
00608     int lastLeft = 0;
00609     int lastTop = 0;
00610
00611     for (int i = 0; i < m_arrBars.GetSize(); i++)
00612     {
00613         CCJControlBar* pBar = STATIC_DOWNCAST(CCJControlBar, (CObject*)GetDockedControlBar(i));
00614         if (pBar != NULL && pBar->IsVisible())
00615         {
00616             if(!pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar)))
00617                 continue;
00618
00619             CRect rectBar;
00620             ++nCount;
00621             pBar->GetWindowRect(&rectBar);
00622             pBar->m_bUnique = FALSE;        //Yiannhs ok in Ver 6.07
00623             ScreenToClient(&rectBar);
00624             CSize sizeIdeal = pBar->CalcDynamicLayout(-1, 0);
00625
00626             //Yiannhs  moved [if] code at the begining. It helps make these calculations near the top
00627             //         for checking the size of the last control bars
00628             int bIsLast = IsLastControlBar(i+1);
00629             pBar->m_bToFit = bIsLast;           //check fitting is setup here
00630             if( bIsLast && nCount == 1 ) {
00631                 pBar->m_bUnique = TRUE;
00632             }
00633
00635             //  so it is not completely hidden
00636             if( rectBar.right >= rectAvail.right && !bIsLast )
00637                 sizeIdeal.cx -= (sizeIdeal.cx / 4);
00638             if( rectBar.bottom >= rectAvail.bottom && !bIsLast )
00639                 sizeIdeal.cy -= (sizeIdeal.cy / 4);
00640
00641             //Yiannhs: The Dock bar is either horizontally or vertically docked itself.
00642             //         So are the ControlBars enclosed inside it. Since the control bars
00643             //         are docked, and Sizing dockbar does not derive from CCJControlBar
00644             //         we may be a bit more clever.
00645             if( m_dwStyle & CBRS_ORIENT_HORZ ) {//use some default data members
00646                 //horizontal;
00647                 rectBar.left = lastLeft;
00648                 rectBar.top = 0;
00649                 rectBar.bottom = rectAvail.Height();
00650                 rectBar.right = rectBar.left + sizeIdeal.cx;
00651
00652                 if( rectBar.left > lastLeft )
00653                     rectBar.left = lastLeft;
00654
00655                 lastLeft = rectBar.right;
00656                 if ( bIsLast ) {    //Yiannhs
00657                     rectBar.right = rectAvail.right;
00658                 }
00659
00660             } else if( m_dwStyle & CBRS_ORIENT_VERT ) {
00661                 //Vertical
00662                 rectBar.top = lastTop;
00663                 rectBar.left = 0;
00664                 rectBar.right = rectAvail.Width();
00665                 rectBar.bottom = rectBar.top + sizeIdeal.cy;
00666
00667                 if (rectBar.top > lastTop)
00668                     rectBar.top = lastTop;
00669
00670                 lastTop = rectBar.bottom;
00671                 if ( bIsLast ) {    //Yiannhs
00672                     rectBar.bottom = rectAvail.bottom;
00673                 }
00674             }
00675
00676             AfxRepositionWindow( &layout, pBar->m_hWnd, &rectBar );
00677         }
00678     }
00679
00680     // move and resize all the windows at once!
00681     if( layout.hDWP == NULL || !::EndDeferWindowPos( layout.hDWP ))
00682         TRACE0("Warning: DeferWindowPos failed - low system resources.\n");
00683 }
00684
00685 void CCJSizeDockBar::Maximize(CCJControlBar* pBar)
00686 {
00687     int iExt=0;
00688     CRect rectAvail;
00689     GetClientRect(rectAvail);
00690
00691     for (int i=0; i<m_arrBars.GetSize(); ++i)
00692     {
00693         CCJControlBar *pBarDock = (CCJControlBar *)GetDockedControlBar(i);
00694         if (pBarDock && pBarDock->IsVisible() && pBarDock != pBar) {
00695             pBarDock->Minimize();
00696             iExt += pBarDock->GetMinExt();
00697         }
00698     }
00699
00700     if (pBar->IsLeftDocked() || pBar->IsRightDocked()) {
00701         iExt = rectAvail.Height()-iExt;
00702     }
00703
00704     if (pBar->IsTopDocked() || pBar->IsBottomDocked()) {
00705         iExt = rectAvail.Width()-iExt;
00706     }
00707
00708     pBar->Maximize(iExt);
00709
00710     //1999-05-26 Yiannhs
00711     //do not care too much about flickering when maximizing controlbars
00712     CalcSizeBarLayout();
00713
00714     for (i=0; i<m_arrBars.GetSize(); ++i)
00715     {
00716         CCJControlBar *pBarDock = (CCJControlBar *)GetDockedControlBar(i);
00717         if (pBarDock && pBarDock->IsVisible() ) {
00718             pBarDock->InvalidateRect(NULL, TRUE);
00719             pBarDock->UpdateWindow();
00720         }
00721     }
00722     //1999-05-26 Yiannhs
00723 }
00724
00725 void CCJSizeDockBar::Normalize(CCJControlBar *)
00726 {
00727     for( int i=0; i<m_arrBars.GetSize(); ++i) {
00728         CCJControlBar *pBarDock = (CCJControlBar*)GetDockedControlBar(i);
00729         if (pBarDock && pBarDock->IsVisible())
00730             pBarDock->Normalize();
00731     }
00732
00733
00734     //1999-05-26 Yiannhs
00735     //do not care too much about flickering when maximizing controlbars
00736
00737     CalcSizeBarLayout();
00738
00739     for (i=0; i<m_arrBars.GetSize(); ++i)
00740     {
00741         CCJControlBar *pBarDock = (CCJControlBar *)GetDockedControlBar(i);
00742         if (pBarDock && pBarDock->IsVisible() ) {
00743             pBarDock->InvalidateRect(NULL, TRUE);
00744             pBarDock->UpdateWindow();
00745         }
00746     }
00747     //1999-05-26 Yiannhs
00748 }
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

MacBinMaps Member List

This is the complete list of members for MacBinMaps, including all inherited members.

AddEntry(OSType sig, const char *extension, const char *desc, MACENCODING encod, bool useDefault) | MacBinMaps |
Entries(void) const | MacBinMaps | [inline]
entries | MacBinMaps | [protected]
GetEnvPlainTypes(void) | MacBinMaps | [static]
GetEnvTypes(MACENCODING type) | MacBinMaps | [static]
LoadDefaults(void) | MacBinMaps |
MacBinMaps() | MacBinMaps |
operator=(const MacBinMaps &otherMap) | MacBinMaps |
RemoveEntry(OSType sig, const char *extension) | MacBinMaps |
Reset(void) | MacBinMaps | [protected]
SaveDefaults(void) | MacBinMaps |
~MacBinMaps() | MacBinMaps |

Generated on Sat Aug 7 22:54:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJListBox Member List

This is the complete list of members for CCJListBox, including all inherited members.

CCJListBox() | CCJListBox |
OnEraseBkgnd(CDC *pDC) | CCJListBox | [protected]
OnPaint() | CCJListBox | [protected]
~CCJListBox() | CCJListBox | [virtual]

Generated on Sat Aug 7 22:49:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

EntnodeData Member List

This is the complete list of members for EntnodeData, including all inherited members.

Compare(const EntnodeData &node1, const EntnodeData &node2) | EntnodeData | [inline, static]
EntnodeData(const char *name, EntnodePath *path) | EntnodeData | [protected]
GetConflict() const | EntnodeData | [inline, virtual]
GetExtension() const | EntnodeData | [inline, virtual]
GetFolderPath() const | EntnodeData | [inline]
GetFullPathName(UStr &resPath) const | EntnodeData | [inline]
GetName() const | EntnodeData | [inline]
GetState() const | EntnodeData | [inline]
GetType() const =0 | EntnodeData | [pure virtual]
IsIgnored() const | EntnodeData | [inline]
IsLocked() const | EntnodeData | [inline]
IsMissing() const | EntnodeData | [inline]
IsRemoved() const | EntnodeData | [inline]
IsResolved() const | EntnodeData | [inline]
IsUnknown() const | EntnodeData | [inline]
IsUnmodified() const | EntnodeData | [inline]
IsVisited() const | EntnodeData | [inline]
kName enum value | EntnodeData |
kPath enum value | EntnodeData |
kState enum value | EntnodeData |
m_fullpath | EntnodeData | [private]
m_ignored | EntnodeData | [protected]
m_locked | EntnodeData | [protected]
m_missing | EntnodeData | [protected]
m_name | EntnodeData | [private]
m_ref | EntnodeData | [protected]
m_removed | EntnodeData | [protected]
m_resolved | EntnodeData | [protected]
m_sbuffer | EntnodeData | [private, static]
m_state | EntnodeData | [private]
m_unknown | EntnodeData | [protected]
m_unmodified | EntnodeData | [protected]
m_visited | EntnodeData | [protected]
operator[](const int index) const | EntnodeData | [virtual]
Ref() | EntnodeData | [inline]
SetIgnored(bool state) | EntnodeData | [inline]
SetLocked(bool state) | EntnodeData | [inline]
SetMissing(bool state) | EntnodeData | [inline]
SetRemoved(bool state) | EntnodeData | [inline]
SetResolved(bool state) | EntnodeData | [inline]
SetState(const char *state) | EntnodeData | [inline]
SetUnknown(bool state) | EntnodeData | [inline]
SetUnmodified(bool state) | EntnodeData | [inline]
SetVisited(bool state) | EntnodeData | [inline]
UnRef() | EntnodeData | [inline]
~EntnodeData() | EntnodeData | [protected, virtual]

Generated on Sat Aug 7 22:52:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TextBinary.cpp Source File

common/TextBinary.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * TextBinary.cpp --- utilities to ckeck if files are binary or text
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include <sys/stat.h>
00029 #   include <direct.h>
00030 #   include <io.h>
00031 #endif /* WIN32 */
00032
00033 #ifdef TARGET_OS_MAC
00034 #   include <Resources.h>
00035 #   include <unistd.h>
00036 #   include <sys/types.h>
00037 #   include <sys/stat.h>
00038 #   include "MacMisc.h"
00039 #endif /* TARGET_OS_MAC */
00040
00041 #ifdef HAVE_UNISTD_H
00042 #   include <unistd.h>
00043 #endif
00044
00045 #include <stdio.h>
00046 #include <errno.h>
00047 #include <stdlib.h>
00048 #include <string.h>
00049
00050 #include "TextBinary.h"
00051 #include "FileTraversal.h"
00052 #include "AppConsole.h"
00053 #include "CPStr.h"
00054 #include "CvsPrefs.h"
00055
00056 #if !defined(S_ISLNK) && defined(S_IFLNK)
00057 #   if defined(S_IFMT)
00058 #       define  S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
00059 #   else
00060 #       define S_ISLNK(m) ((m) & S_IFLNK)
00061 #   endif
00062 #endif
00063
00064 #define MAX_TEST_SIZE 100000
00065
00066 #ifdef WIN32
00067 #   ifdef _DEBUG
00068 #   define new DEBUG_NEW
00069 #   undef THIS_FILE
00070     static char THIS_FILE[] = __FILE__;
00071 #   endif
00072 #endif /* WIN32 */
00073
00074 static CStaticAllocT<char> sBuf;
00075 static int sBufSize;
00076
00077 static kTextBinTYPE FillBuffer(const char *arg, const char *dir, const UFSSpec * spec, bool bin)
00078 {
00079     sBuf.AdjustSize(MAX_TEST_SIZE);
00080
00081     if(chdir(dir) != 0)
00082     {
00083         cvs_err("Unable to chdir to ""%s"" (error %d)\n", dir, errno);
00084         return kFileMissing;
00085     }
00086
00087     FILE *samp = fopen(arg, bin ? "rb" : "r");
00088     if(samp == 0L)
00089     {
00090         return kFileMissing;
00091     }
00092
00093     sBufSize = fread(sBuf, sizeof(char), MAX_TEST_SIZE, samp);
00094     if(sBufSize < 0)
00095     {
00096         cvs_err("Unable to read ""%s"" (error %d)\n", arg, errno);
00097         return kFileMissing;
00098     }
00099
00100     fclose(samp);
00101     return kFileIsOK;
00102 }
00103
00104 static kTextBinTYPE TestBuffer(const char *arg, const char *dir, const UFSSpec * spec, kFileType expectType)
00105 {
00106     if(sBufSize == 0)
00107         return kFileIsOK;
00108
00109     bool isUnicode = false;
00110 #ifdef WIN32
00111     isUnicode = gCvsPrefs.WhichVersion() == kWin32 ? false : IsTextUnicode(sBuf, sBufSize, NULL) == TRUE;
00112 #endif /* WIN32 */
00113
00114     // Windows : fread skips the \r, so we don't care.
00115     // Mac : MSL exchanges when reading the \r and \n,
00116     // so we look for \n
00117     // Others : default to \n
00118
00119     const unsigned char nativeNL = '\n';
00120     const unsigned char nonnativeNL = '\r';
00121
00122     float percent = 0;
00123     int numBinChars = 0;
00124     int numTextChars = 0;
00125
00126     if( !isUnicode )
00127     {
00128         // figure if it is binary
00129         int i;
00130         unsigned char c;
00131         char *tmp;
00132
00133         for(tmp = sBuf, i = 0; i < sBufSize; i++)
00134         {
00135             c = (unsigned char)*tmp++;
00136             if((c < 0x20 && c != nativeNL && c != nonnativeNL && c != '\t') || (c >= 0x80
00137 #ifdef TARGET_OS_MAC
00138                 && c != (unsigned char)'Ñ' && c != (unsigned char)'¥' /* powerplant */
00139 #endif /* TARGET_OS_MAC */
00140                 ))
00141                 numBinChars++;
00142             else
00143                 numTextChars++;
00144         }
00145
00146         percent = (float)numBinChars / (float)sBufSize;
00147     }
00148
00149     // more than 5% binary makes binary
00150     bool isbin = percent >= 0.05;
00151
00152     switch( expectType )
00153     {
00154     case kFileTypeText:
00155         if( isUnicode )
00156         {
00157             return kTextIsUnicode;
00158         }
00159         else if( isbin )
00160         {
00161             return kTextIsBinary;
00162         }
00163         break;
00164     case kFileTypeBin:
00165         if( isUnicode )
00166         {
00167             return kBinIsUnicode;
00168         }
00169         else if( !isbin )
00170         {
00171             return kBinIsText;
00172         }
00173         break;
00174     case kFileTypeUnicode:
00175         if( !isUnicode )
00176         {
00177             return isbin ? kUnicodeIsBinary : kUnicodeIsText;
00178         }
00179         break;
00180     default:
00181 #ifdef WIN32
00182         ASSERT(FALSE); // uknown type
00183 #endif
00184         break;
00185     }
00186
00187     // for the text files, check if the new lines are good
00188     if(kFileTypeText == expectType)
00189     {
00190         int i;
00191         unsigned char c;
00192         char *tmp;
00193         int numNonNative = 0, numNative = 0;
00194         for(tmp = sBuf, i = 0; i < sBufSize; i++)
00195         {
00196             c = (unsigned char)*tmp++;
00197             if(c == nonnativeNL)
00198                 numNonNative++;
00199             else if(c == nativeNL)
00200                 numNative++;
00201         }
00202         if(numNative == 0)
00203         {
00204             if(numNonNative > 0)
00205                 return kTextWrongLF;
00206         }
00207         else
00208         {
00209             percent = (float)numNonNative / (float)numNative;
00210             if(percent >= 0.1)
00211                 return kTextWrongLF;
00212         }
00213
00214         if(numBinChars > 0)
00215             return kTextEscapeChar;
00216     }
00217
00218     return kFileIsOK;
00219 }
00220
00221 #if TARGET_RT_MAC_MACHO
00222 static kTextBinTYPE GetMacSig(const char *arg, const char *dir, const UFSSpec * spec, bool expectbin)
00223 {
00224     FSCatalogInfo info;
00225     FInfo finfo;
00226
00227     OSErr err = FSGetCatalogInfo(spec, kFSCatInfoNodeFlags | kFSCatInfoFinderInfo |
00228         kFSCatInfoDataSizes | kFSCatInfoRsrcSizes, &info, NULL, NULL, NULL);
00229     if(err != noErr || (info.nodeFlags & kFSNodeIsDirectoryMask))
00230     {
00231         cvs_err("Unable to get info on ""%s"" (error %d)\n", arg, err);
00232         return kFileMissing;
00233     }
00234
00235     memcpy(&finfo, &info.finderInfo, 2 * sizeof(OSType));
00236
00237     if(expectbin)
00238     {
00239         if(finfo.fdType == 'TEXT')
00240             return kBinWrongSig;
00241     }
00242     else
00243     {
00244         if(info.rsrcPhysicalSize > 0 && info.dataPhysicalSize == 0)
00245             return kTextIsBinary;
00246
00247         if(finfo.fdType != 'TEXT' && finfo.fdType != 0)
00248             return kTextWrongSig;
00249     }
00250
00251     return kFileIsOK;
00252 }
00253 #endif /* TARGET_RT_MAC_MACHO */
00254
00255
00256 static kTextBinTYPE TestValidName(const char *filename)
00257 {
00258     kTextBinTYPE result = kFileIsOK;
00259
00260     if(strchr(filename, '/') != 0L)
00261         result = kFileInvalidName;
00262     if(strchr(filename, '\n') != 0L)
00263         result = kFileInvalidName;
00264
00265 #ifdef TARGET_OS_MAC
00266     if(strchr(filename, '\r') != 0L)
00267         result = kFileInvalidName;
00268     if(strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0)
00269         result = kFileInvalidName;
00270     if(strcmp(filename, "CVS") != 0 && stricmp(filename, "cvs") == 0)
00271         result = kFileInvalidName;
00272 #endif /* !TARGET_OS_MAC */
00273
00274     return result;
00275 }
00276
00277 static kTextBinTYPE TestFileIsAlias(const char *arg, const char *dir, const UFSSpec * spec)
00278 {
00279     kTextBinTYPE result = kFileIsOK;
00280
00281 #ifdef S_ISLNK
00282     CPStr fullname;
00283     struct stat sb;
00284
00285     fullname = dir;
00286     if(!fullname.endsWith(kPathDelimiter))
00287         fullname << kPathDelimiter;
00288     fullname << arg;
00289
00290     if (stat(fullname, &sb) == -1)
00291         result = kFileMissing;
00292     else if(S_ISLNK(sb.st_mode))
00293         result = kFileIsAlias;
00294 #endif /* S_ISLNK */
00295
00296     return result;
00297 }
00298
00299 kTextBinTYPE FileIsText(const char *arg, const char *dir, const UFSSpec * spec)
00300 {
00301     kTextBinTYPE state;
00302
00303 #ifdef TARGET_OS_MAC
00304     state = GetMacSig(arg, dir, spec, false);
00305     if(state != kFileIsOK)
00306         return state;
00307 #endif /* TARGET_OS_MAC */
00308
00309     state = FillBuffer(arg, dir, spec, false);
00310     if(state != kFileIsOK)
00311         return state;
00312
00313     if(sBufSize == 0)
00314         return kFileIsOK;
00315
00316     state = TestBuffer(arg, dir, spec, kFileTypeText);
00317     if(state != kFileIsOK)
00318         return state;
00319
00320     state = TestValidName(arg);
00321     if(state != kFileIsOK)
00322         return state;
00323
00324     state = TestFileIsAlias(arg, dir, spec);
00325     if(state != kFileIsOK)
00326         return state;
00327
00328     return kFileIsOK;
00329 }
00330
00331 kTextBinTYPE FileIsBinary(const char *arg, const char *dir, const UFSSpec * spec)
00332 {
00333     kTextBinTYPE state;
00334
00335     state = FillBuffer(arg, dir, spec, true);
00336     if(state != kFileIsOK)
00337         return state;
00338
00339     state = TestBuffer(arg, dir, spec, kFileTypeBin);
00340
00341 #ifdef TARGET_OS_MAC
00342     kTextBinTYPE sigstate = GetMacSig(arg, dir, spec, true);
00343     if(sigstate != kFileIsOK)
00344         return state;
00345     if(state != kFileIsOK && state != kBinIsText)
00346         return state;
00347 #else /* !TARGET_OS_MAC */
00348     if(state != kFileIsOK)
00349         return state;
00350 #endif /* !TARGET_OS_MAC */
00351
00352     state = TestValidName(arg);
00353     if(state != kFileIsOK)
00354         return state;
00355
00356     state = TestFileIsAlias(arg, dir, spec);
00357     if(state != kFileIsOK)
00358         return state;
00359
00360     return kFileIsOK;
00361 }
00362
00363 kTextBinTYPE FileIsUnicode(const char *arg, const char *dir, const UFSSpec * spec /*= 0L*/)
00364 {
00365     kTextBinTYPE state;
00366
00367     state = FillBuffer(arg, dir, spec, true);
00368     if(state != kFileIsOK)
00369         return state;
00370
00371     state = TestBuffer(arg, dir, spec, kFileTypeUnicode);
00372
00373 #ifdef TARGET_OS_MAC
00374     kTextBinTYPE sigstate = GetMacSig(arg, dir, spec, true);
00375     if(sigstate != kFileIsOK)
00376         return state;
00377     if(state != kFileIsOK && state != kBinIsText)
00378         return state;
00379 #else /* !TARGET_OS_MAC */
00380     if(state != kFileIsOK)
00381         return state;
00382 #endif /* !TARGET_OS_MAC */
00383
00384     state = TestValidName(arg);
00385     if(state != kFileIsOK)
00386         return state;
00387
00388     state = TestFileIsAlias(arg, dir, spec);
00389     if(state != kFileIsOK)
00390         return state;
00391
00392     return kFileIsOK;
00393 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGfxOutBarCtrl::CBarFolder Member List

This is the complete list of members for CGfxOutBarCtrl::CBarFolder, including all inherited members.

arItems | CGfxOutBarCtrl::CBarFolder |
CBarFolder(LPCTSTR name, DWORD exData) | CGfxOutBarCtrl::CBarFolder |
cName | CGfxOutBarCtrl::CBarFolder |
dwData | CGfxOutBarCtrl::CBarFolder |
GetItemCount() | CGfxOutBarCtrl::CBarFolder |
InsertItem(int index, LPCTSTR text, const int image, const DWORD exData) | CGfxOutBarCtrl::CBarFolder |
pChild | CGfxOutBarCtrl::CBarFolder |
pLargeImageList | CGfxOutBarCtrl::CBarFolder |
pSmallImageList | CGfxOutBarCtrl::CBarFolder |
~CBarFolder() | CGfxOutBarCtrl::CBarFolder | [virtual]

Generated on Sat Aug 7 22:52:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MoveToTrash.cpp Source File

common/MoveToTrash.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * MoveToTrash.cpp --- send the files to the trash
00019  * Author : Miro Jurisic <meeroh@MIT.EDU> --- December 1997
00020  * Modified : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00021  */
00022
00023 #include "stdafx.h"
00024
00025 #ifdef TARGET_OS_MAC
00026 #   include "GUSIInternal.h"
00027 #   include "GUSIFileSpec.h"
00028
00029 #   include <Files.h>
00030 #   include <Folders.h>
00031 #   include <AERegistry.h>
00032 #   include <AEPackObject.h>
00033 #   include <AEObjects.h>
00034
00035 #endif /* TARGET_OS_MAC */
00036
00037 #ifdef qUnix
00038 #   include <stdio.h>
00039 #endif /* qUnix */
00040
00041 #ifdef HAVE_UNISTD_H
00042 #   include <unistd.h>
00043 #endif
00044
00045 #include "MoveToTrash.h"
00046 #include "CPStr.h"
00047 #include "FileTraversal.h"
00048 #include "AppConsole.h"
00049
00050 #ifdef WIN32
00051 #   include <direct.h>
00052 #endif /* WIN32 */
00053
00054 #ifdef WIN32
00055 #   ifdef _DEBUG
00056 #   define new DEBUG_NEW
00057 #   undef THIS_FILE
00058     static char THIS_FILE[] = __FILE__;
00059 #   endif
00060 #endif /* WIN32 */
00061
00062 #ifdef TARGET_OS_MAC
00063 # define kTryFinderMoveToTrash 0 // bug in Finder prevents correctly moving files to trash, but Finder doesn't tell us it fails...
00064
00065 # if kTryFinderMoveToTrash
00066     static OSErr    GetAddressOfFinder (
00067         AEAddressDesc*  outFinderAddress);
00068     static OSErr    SendFilesToTrash (
00069         AEAddressDesc const*    inFinderAddress,
00070         short                   inFileCount,
00071         const UFSSpec*          inFileList);
00072     static OSErr    PutFilesInAE (
00073         short           inFileCount,
00074         const UFSSpec*  inFileList,
00075         AppleEvent  *   ioAppleEvent);
00076
00077     const   OSType  kFinderSignature    =   'MACS';
00078 # endif // kTryFinderMoveToTrash
00079
00080     static OSErr ToolboxMoveToTrash(const UFSSpec* spec);
00081
00082     static std::vector<UFSSpec> sToTrash;
00083     static bool sTrashRetainer = false;
00084
00085
00086     static OSErr    MoveToTrash (const std::vector<UFSSpec> & inFiles)
00087     {
00088         OSErr   err = noErr;
00089
00090         /*  First unlock the file so that the Finder can rename it
00091             if there are already files of that name in the Trash */
00092         std::vector<UFSSpec>::const_iterator i;
00093         for(i = inFiles.begin(); i != inFiles.end(); ++i)
00094         {
00095             FSCatalogInfo info;
00096             if((err = FSGetCatalogInfo(&*i, kFSCatInfoNodeFlags, &info, NULL, NULL, NULL)) == noErr &&
00097                 (info.nodeFlags & kFSNodeLockedMask) != 0)
00098             {
00099                 info.nodeFlags = info.nodeFlags & ~kFSNodeLockedMask;
00100                 err = FSSetCatalogInfo(&*i, kFSCatInfoNodeFlags, &info);
00101             }
00102             if (err != noErr)
00103                 goto cleanup;
00104         }
00105
00106 # if kTryFinderMoveToTrash
00107         AEDesc  finderAddress = {typeNull, nil};
00108         err = GetAddressOfFinder (&finderAddress);
00109         if (err != noErr)
00110             goto cleanup;
00111
00112         err = SendFilesToTrash (&finderAddress, inFiles.size(), &inFiles[0]);
00113         if (err != noErr)
00114             goto cleanup;
00115
00116     cleanup:
00117         if (finderAddress.dataHandle != nil) {
00118             AEDisposeDesc (&finderAddress);
00119         }
00120         if(err != noErr)
00121 # else // !kTryFinderMoveToTrash
00122   cleanup:
00123 # endif // !kTryFinderMoveToTrash
00124         {
00125             /* try the toolbox way */
00126             for(i = inFiles.begin(); i != inFiles.end(); ++i)
00127             {
00128                 err = ToolboxMoveToTrash(&*i);
00129         if ( err )
00130         {
00131           GUSIFileSpec  f(*i);
00132           const char*   path = f.FullPath();
00133           cvs_err("couldn't move file to trash (error %d): %s\n", err, path ? path : "<unable to construct path>");
00134         }
00135             }
00136         }
00137
00138         return err;
00139     }
00140
00141     static OSErr    MoveToTrash (const UFSSpec* inFile)
00142     {
00143         OSErr   err = noErr;
00144
00145         /*  First unlock the file so that the Finder can rename it
00146             if there are already files of that name in the Trash */
00147
00148         FSCatalogInfo info;
00149         if((err = FSGetCatalogInfo(inFile, kFSCatInfoNodeFlags, &info, NULL, NULL, NULL)) == noErr &&
00150             (info.nodeFlags & kFSNodeLockedMask) != 0)
00151         {
00152             info.nodeFlags = info.nodeFlags & ~kFSNodeLockedMask;
00153             err = FSSetCatalogInfo(inFile, kFSCatInfoNodeFlags, &info);
00154         }
00155         if (err != noErr)
00156             goto cleanup;
00157
00158 # if kTryFinderMoveToTrash
00159         AEDesc  finderAddress = {typeNull, nil};
00160         err = GetAddressOfFinder (&finderAddress);
00161         if (err != noErr)
00162             goto cleanup;
00163
00164         err = SendFilesToTrash (&finderAddress, 1, inFile);
00165         if (err != noErr)
00166             goto cleanup;
00167
00168     cleanup:
00169         if (finderAddress.dataHandle != nil) {
00170             AEDisposeDesc (&finderAddress);
00171         }
00172         if(err != noErr)
00173 # else // !kTryFinderMoveToTrash
00174   cleanup:
00175 # endif // !kTryFinderMoveToTrash
00176         {
00177             /* try the toolbox way */
00178             err = ToolboxMoveToTrash(inFile);
00179       if ( err )
00180       {
00181         GUSIFileSpec  f(*inFile);
00182         const char*   path = f.FullPath();
00183         cvs_err("couldn't move file to trash (error %d): %s\n", err, path ? path : "<unable to construct path>");
00184       }
00185         }
00186
00187         return err;
00188     }
00189
00190     static OSErr
00191     ToolboxMoveToTrash(const UFSSpec* spec)
00192     {
00193         OSErr err;
00194
00195         FSRef              folder;
00196         FSVolumeRefNum     volume(kOnAppropriateDisk);
00197     FSCatalogInfo      info;
00198     // get the volume the file resides on and use this as the base for finding the trash folder
00199     // since each volume will contain it's own trash folder...
00200     //
00201         if ( FSGetCatalogInfo(spec, kFSCatInfoVolume, &info, NULL, NULL, NULL) == noErr )
00202           volume = info.volume;
00203         // go ahead and find the trash folder on that volume.
00204         // the trash folder for the current user may not yet exist on that volume,
00205         // so ask to automatically create it
00206         //
00207         err = FSFindFolder(volume, kTrashFolderType, kCreateFolder, &folder);
00208
00209         if(err != noErr)
00210             return err;
00211
00212       err = FSMoveObject(spec, &folder, NULL);
00213       if ( err == dupFNErr )
00214       {
00215           // try to rename the duplicate file in the trash
00216
00217         HFSUniStr255    name;
00218
00219         err = FSGetCatalogInfo(spec, kFSCatInfoNone, NULL, &name, NULL, NULL);
00220       if ( err == noErr )
00221       {
00222           UInt16          origLen(name.length);
00223           if ( origLen > 245 ) origLen = 245;
00224
00225           FSRef   duplicateFile;
00226           err = FSMakeFSRefUnicode(&folder, name.length, name.unicode, kTextEncodingUnknown, &duplicateFile);
00227           for ( int i(1);; ++i )
00228           {
00229             // attempt to create new unique name
00230             HFSUniStr255    newName(name);
00231             char            num[16];
00232             int             numLen;
00233
00234             numLen = sprintf(num, "%d", i);
00235             newName.unicode[origLen] = ' ';
00236             for ( int j(0); j < numLen; ++j ) newName.unicode[origLen + j + 1] = num[j];
00237             newName.length = origLen + numLen + 1;
00238
00239               err = FSRenameUnicode(&duplicateFile, newName.length, newName.unicode, kTextEncodingUnknown, NULL);
00240               if ( err != dupFNErr ) break;
00241             }
00242
00243             if ( err == noErr )
00244               err = FSMoveObject(spec, &folder, NULL);
00245           }
00246         }
00247
00248         return err;
00249     }
00250
00251     /* get address of the Finder (to use as the destination of our appleevents) */
00252
00253 # if kTryFinderMoveToTrash
00254     static OSErr
00255     GetAddressOfFinder (
00256         AEAddressDesc*  outFinderAddress)
00257     {
00258         return (AECreateDesc (typeApplSignature, (Ptr) &kFinderSignature, sizeof (long), outFinderAddress));
00259     }
00260
00261     /* Tell Finder to send a list of files to the trash */
00262
00263     static OSErr
00264     SendFilesToTrash (
00265         AEAddressDesc const*    inFinderAddress,
00266         short                   inFileCount,
00267         const UFSSpec*          inFileList)
00268     {
00269         OSErr       err = noErr;
00270         AppleEvent  theAppleEvent = {typeNull, nil};
00271         AppleEvent  theReply = {typeNull, nil};
00272         DescType    trashType = kTrashFolderType;
00273         AEDesc      keyData = {typeNull, nil};
00274         AEDesc      trashSpecifier = {typeNull, nil};
00275         AEDesc      nullDescriptor = {typeNull, nil};
00276
00277
00278         /* create the appleevent */
00279         err = AECreateAppleEvent (kAECoreSuite, kAEMove, inFinderAddress, kAutoGenerateReturnID, kAnyTransactionID, &theAppleEvent);
00280         if (err != noErr)
00281             goto cleanup;
00282
00283         /* put the files into the direct object of the appleevent */
00284         err = PutFilesInAE (inFileCount, inFileList, &theAppleEvent);
00285         if (err != noErr)
00286             goto cleanup;
00287
00288         /* create a descriptor for trash */
00289         err = AECreateDesc (typeType, (Ptr) &trashType, sizeof (DescType) , &keyData);
00290         if (err != noErr)
00291             goto cleanup;
00292
00293         /* get specifier for trash object */
00294         err = CreateObjSpecifier (typeProperty, &nullDescriptor, formPropertyID, &keyData, true, &trashSpecifier);
00295         if (err != noErr)
00296             goto cleanup;
00297
00298         /* put the trash specifier as the indirect object in the appleevent */
00299         err = AEPutParamDesc (&theAppleEvent, keyAEInsertHere, &trashSpecifier);
00300         if (err != noErr)
00301             goto cleanup;
00302
00303         /* send the appleevent */
00304         err = AESend (&theAppleEvent, &theReply, kAEWaitReply, kAENormalPriority, kAEDefaultTimeout, nil, nil);
00305         if (err != noErr)
00306             goto cleanup;
00307
00308         /* ignore the reply */
00309
00310     cleanup:
00311
00312         /* dispose of the stuff that we allocated */
00313         if (theAppleEvent.dataHandle != nil) {
00314             AEDisposeDesc (&theAppleEvent);
00315         }
00316         if (theReply.dataHandle != nil) {
00317             AEDisposeDesc (&theReply);
00318         }
00319         if (keyData.dataHandle != nil) {
00320             AEDisposeDesc (&keyData);
00321         }
00322         if (trashSpecifier.dataHandle != nil) {
00323             AEDisposeDesc (&trashSpecifier);
00324         }
00325         /* don't have to dispose of nullDescriptor because it's null */
00326
00327         return err;
00328     }
00329
00330     /* put a list of files into the direct object of an apple event */
00331
00332     static OSErr
00333     PutFilesInAE (
00334         short               inFileCount,
00335         const UFSSpec*      inFileList,
00336         AppleEvent*         ioAppleEvent)
00337     {
00338         OSErr       err;
00339         AEDescList  fileList = {typeNull, nil};
00340         short       i;
00341         AliasHandle alias;
00342
00343         err = AECreateList(nil, 0, false, &fileList);
00344         if (err != noErr) return err;
00345
00346         for (i = 1; i <= inFileCount; i++) {
00347             err = ::FSNewAlias(NULL, inFileList + i - 1, &alias);
00348             if (err != noErr) goto cleanup;
00349
00350             ::HLock((Handle)alias);
00351             err = AEPutPtr(&fileList, i, typeAlias, *alias, ::GetHandleSize((Handle)alias));
00352             ::HUnlock((Handle)alias);
00353
00354             ::DisposeHandle((Handle)alias);
00355             if (err != noErr) goto cleanup;
00356         }
00357
00358         err = AEPutParamDesc(ioAppleEvent, keyDirectObject, &fileList);
00359
00360     cleanup:
00361         if (fileList.dataHandle != nil) {
00362             AEDisposeDesc(&fileList);
00363         }
00364
00365         return err;
00366     }
00367 # endif // kTryFinderMoveToTrash
00368 #endif /* TARGET_OS_MAC */
00369
00370 void CompatBeginMoveToTrash(void)
00371 {
00372 #ifdef TARGET_OS_MAC
00373     sToTrash.erase(sToTrash.begin(), sToTrash.end());
00374     sTrashRetainer = true;
00375 #endif
00376 }
00377
00378 void CompatEndMoveToTrash(void)
00379 {
00380 #ifdef TARGET_OS_MAC
00381     if(sToTrash.size() > 0)
00382     {
00383         OSErr err;
00384         err = MoveToTrash(sToTrash);
00385         if(err != noErr)
00386             cvs_err("Unable to send files to the trash (Error %d)\n", err);
00387         else
00388             cvs_out("Files has been moved successfully to the trash...\n");
00389     }
00390
00391     sToTrash.erase(sToTrash.begin(), sToTrash.end());
00392     sTrashRetainer = false;
00393 #endif
00394 }
00395
00396 bool CompatMoveToTrash(const char *file, const char *dir, const UFSSpec *spec)
00397 {
00398 #ifdef TARGET_OS_MAC
00399     if(sTrashRetainer)
00400     {
00401         if(spec)
00402             sToTrash.push_back(*spec);
00403         else
00404         {
00405             CStr fullpath(dir);
00406             if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00407             {
00408                 fullpath << kPathDelimiter;
00409             }
00410             fullpath << file;
00411             GUSIFileSpec mspec(fullpath);
00412             if(mspec.Error() != noErr)
00413             {
00414                 errno = mspec.Error();
00415                 return false;
00416             }
00417             sToTrash.push_back(mspec);
00418         }
00419
00420         return true;
00421     }
00422
00423     return spec != NULL ? MoveToTrash(spec) == noErr : false;
00424 #elif defined(WIN32)
00425     SHFILEOPSTRUCT fileop;
00426     CStr fullpath(dir);
00427     if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00428     {
00429         fullpath << kPathDelimiter;
00430     }
00431     fullpath << file;
00432     fullpath << ' ';
00433     fullpath.rtrim(' ');
00434
00435     fileop.hwnd     = *AfxGetMainWnd();
00436     fileop.wFunc    = FO_DELETE;
00437     fileop.pFrom    = fullpath;
00438     fileop.pTo      = 0L;
00439     fileop.fFlags   = FOF_ALLOWUNDO | FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI;
00440
00441     if(SHFileOperation(&fileop) != 0)
00442     {
00443         if(dir != 0L && chdir(dir) != 0)
00444             return false;
00445
00446         cvs_err("Unable to send \'%s\' to the recycle bin (error %d)\n",
00447             file, GetLastError());
00448         cvs_err("Trying now to delete \'%s\' instead\n", file);
00449         return remove(file) == 0;
00450     }
00451     return true;
00452 #else /* !TARGET_OS_MAC && !WIN32 */
00453     CStr fullpath(dir);
00454     if(!fullpath.empty() && !fullpath.endsWith(kPathDelimiter))
00455     {
00456         fullpath << kPathDelimiter;
00457     }
00458     fullpath << file;
00459
00460     return remove(fullpath) == 0;
00461 #endif /* !TARGET_OS_MAC && !WIN32 */
00462 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TclGlue.cpp Source File

common/TclGlue.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1998
00019  * Modified : David Gravereaux <davygrvy@bigfoot.com> -- May 1999
00020  */
00021
00022 /*
00023  * TclGlue.cpp --- glue to the TCL language
00024  */
00025 #include "stdafx.h"
00026
00027 #ifdef TARGET_OS_MAC
00028 #   include "MacMisc.h"
00029 #endif
00030
00031 #include <stdarg.h>
00032 #include <string.h>
00033
00034 #if !defined(USE_TCL)
00035 #   define USE_TCL 1
00036 #endif
00037
00038 #ifdef qMacCvsPP
00039 #   include "MacCvsApp.h"
00040 #endif /* qMacCvsPP */
00041
00042 #if qCarbon
00043 #   include "TclGlue.mac.h"
00044 #endif
00045
00046 // this cannot work before the stub library is linked with wrong libraries
00047 // and it causes WinCvs to crash
00048 //#define USE_TCL_STUBS
00049
00050 #if !defined(__STDC__) && (defined(TARGET_OS_MAC) || defined(WIN32))
00051 #   define __STDC__ 1
00052 #   define UNDEF_STDC
00053 #endif
00054
00055 #if USE_TCL
00056 #include "tcl.h"
00057
00058 #if TCL_MAJOR_VERSION != 8 && TCL_MINOR_VERSION < 1
00059 #   error "You need the Tcl 8.1.x header (or above) from Scriptics for this"
00060 #endif
00061 #endif
00062
00063 #ifdef UNDEF_STDC
00064 #   undef __STDC__
00065 #   define __STDC__ 0
00066 #
00067 #endif
00068
00069 #if 0//def WIN32
00070 //  this comes with the Scriptic release, or
00071 //  you can compile your own from generic/tclStubLib.c
00072 //  in the source release of Tcl and build it with any
00073 //  combination of the C runtime to match WinCVS, so you
00074 //  don't get those:
00075 // LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other libs; use /NODEFAULTLIB:library
00076 #pragma comment(lib,"tclstub81.lib")
00077 #endif
00078
00079 #include "TclGlue.h"
00080 #include "AppConsole.h"
00081 #include "AppGlue.h"
00082 #include "CvsArgs.h"
00083 #include "CvsEntries.h"
00084 #include "dll_loader.h"
00085 #include "FileTraversal.h"
00086 #include "MacrosSetup.h"
00087 #include "MoveToTrash.h"
00088 #include "CvsPrefs.h"
00089 #include "CvsCommands.h"
00090
00091 #ifdef WIN32
00092 #   include "wincvs.h"
00093 #   include "wincvsdebug.h"
00094
00095 #   ifdef _DEBUG
00096 #   define new DEBUG_NEW
00097 #   undef THIS_FILE
00098     static char THIS_FILE[] = __FILE__;
00099 #   endif
00100 #endif /* WIN32 */
00101
00102 #ifndef NEW
00103 #define NEW new
00104 #endif
00105
00106 #if defined(_MSC_VER)
00107 #   define DECLC extern "C"
00108 #else
00109 #   define DECLC
00110 #endif
00111
00112 #if USE_TCL
00113
00114 #if defined(WIN32) || qCarbon
00115 #   define DEC_GLUE(f) (*f##_glue)
00116
00117     Tcl_Command DEC_GLUE(Tcl_CreateCommand)
00118         _ANSI_ARGS_((Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc,
00119             ClientData clientData, Tcl_CmdDeleteProc *deleteProc));
00120     Tcl_Interp * DEC_GLUE(Tcl_CreateInterp) _ANSI_ARGS_((void));
00121     void DEC_GLUE(Tcl_AppendResult) _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp));
00122     void DEC_GLUE(Tcl_SetResult) _ANSI_ARGS_((Tcl_Interp *interp, char *string, Tcl_FreeProc *freeProc));
00123     void DEC_GLUE(Tcl_DeleteInterp) _ANSI_ARGS_((Tcl_Interp *interp));
00124     int DEC_GLUE(Tcl_Eval) _ANSI_ARGS_((Tcl_Interp *interp, char *string));
00125     int DEC_GLUE(Tcl_EvalFile) _ANSI_ARGS_((Tcl_Interp *interp, char *fileName));
00126     char *      DEC_GLUE(Tcl_Alloc) _ANSI_ARGS_((unsigned int size));
00127     void        DEC_GLUE(Tcl_Free) _ANSI_ARGS_((char *ptr));
00128     char *      DEC_GLUE(Tcl_Realloc) _ANSI_ARGS_((char *ptr,
00129                     unsigned int size));
00130     int     DEC_GLUE(Tcl_ExprLong) _ANSI_ARGS_((Tcl_Interp *interp,
00131                 char *string, long *ptr));
00132     char *      DEC_GLUE(Tcl_Concat) _ANSI_ARGS_((int argc, char *const *argv));
00133     char *      DEC_GLUE(Tcl_SetVar2) _ANSI_ARGS_((Tcl_Interp *interp,
00134                 const char *part1, const char *part2, const char *newValue,
00135                 int flags));
00136     void        DEC_GLUE(Tcl_DStringStartSublist) _ANSI_ARGS_((
00137                 Tcl_DString *dsPtr));
00138     void        DEC_GLUE(Tcl_DStringEndSublist) _ANSI_ARGS_((Tcl_DString *dsPtr));
00139     void        DEC_GLUE(Tcl_DStringFree) _ANSI_ARGS_((Tcl_DString *dsPtr));
00140     void        DEC_GLUE(Tcl_DStringInit) _ANSI_ARGS_((Tcl_DString *dsPtr));
00141     void        DEC_GLUE(Tcl_DStringResult) _ANSI_ARGS_((Tcl_Interp *interp,
00142                 Tcl_DString *dsPtr));
00143     char *      DEC_GLUE(Tcl_DStringAppendElement) _ANSI_ARGS_((
00144                 Tcl_DString *dsPtr, CONST char *string));
00145     void        DEC_GLUE(TclFreeObj) _ANSI_ARGS_((Tcl_Obj *objPtr));
00146     void        DEC_GLUE(Tcl_SetObjResult) _ANSI_ARGS_((Tcl_Interp *interp,
00147                 Tcl_Obj *resultObjPtr));
00148     Tcl_Obj *   DEC_GLUE(Tcl_NewStringObj) _ANSI_ARGS_((CONST char *bytes,
00149                 int length));
00150     Tcl_Obj *   DEC_GLUE(Tcl_NewListObj) _ANSI_ARGS_((int objc,
00151                 Tcl_Obj *CONST objv[]));
00152     int     DEC_GLUE(Tcl_ListObjAppendElement) _ANSI_ARGS_((
00153                 Tcl_Interp *interp, Tcl_Obj *listPtr,
00154                 Tcl_Obj *objPtr));
00155
00156     void        DEC_GLUE(Tcl_SourceRCFile) _ANSI_ARGS_((Tcl_Interp * interp));
00157     int     DEC_GLUE(Tcl_Init) _ANSI_ARGS_((Tcl_Interp * interp));
00158     char *      DEC_GLUE(Tcl_SetVar) _ANSI_ARGS_((Tcl_Interp * interp,
00159                 const char * varName, const char * newValue, int flags));
00160     void        DEC_GLUE(Tcl_FindExecutable) _ANSI_ARGS_((CONST char * argv0));
00161
00162 #   define GLUE_WRAP(f) f##_glue
00163 #   define Tcl_CreateCommand GLUE_WRAP(Tcl_CreateCommand)
00164 #   define Tcl_CreateInterp GLUE_WRAP(Tcl_CreateInterp)
00165 #   define Tcl_AppendResult GLUE_WRAP(Tcl_AppendResult)
00166 #   define Tcl_SetResult GLUE_WRAP(Tcl_SetResult)
00167 #   define Tcl_DeleteInterp GLUE_WRAP(Tcl_DeleteInterp)
00168 #   define Tcl_Eval GLUE_WRAP(Tcl_Eval)
00169 #   define Tcl_EvalFile GLUE_WRAP(Tcl_EvalFile)
00170 #   define Tcl_Alloc GLUE_WRAP(Tcl_Alloc)
00171 #   define Tcl_Free GLUE_WRAP(Tcl_Free)
00172 #   define Tcl_Realloc GLUE_WRAP(Tcl_Realloc)
00173 #   define Tcl_ExprLong GLUE_WRAP(Tcl_ExprLong)
00174 #   define Tcl_Concat GLUE_WRAP(Tcl_Concat)
00175 #   define Tcl_SetVar2 GLUE_WRAP(Tcl_SetVar2)
00176 #   define Tcl_DStringStartSublist GLUE_WRAP(Tcl_DStringStartSublist)
00177 #   define Tcl_DStringEndSublist GLUE_WRAP(Tcl_DStringEndSublist)
00178 #   define Tcl_DStringFree GLUE_WRAP(Tcl_DStringFree)
00179 #   define Tcl_DStringInit GLUE_WRAP(Tcl_DStringInit)
00180 #   define Tcl_DStringResult GLUE_WRAP(Tcl_DStringResult)
00181 #   define Tcl_DStringAppendElement GLUE_WRAP(Tcl_DStringAppendElement)
00182 #   define TclFreeObj GLUE_WRAP(TclFreeObj)
00183 #   define Tcl_SetObjResult GLUE_WRAP(Tcl_SetObjResult)
00184 #   define Tcl_NewStringObj GLUE_WRAP(Tcl_NewStringObj)
00185 #   define Tcl_NewListObj GLUE_WRAP(Tcl_NewListObj)
00186 #   define Tcl_ListObjAppendElement GLUE_WRAP(Tcl_ListObjAppendElement)
00187 #   define Tcl_SourceRCFile GLUE_WRAP(Tcl_SourceRCFile)
00188 #   define Tcl_Init GLUE_WRAP(Tcl_Init)
00189 #   define Tcl_SetVar GLUE_WRAP(Tcl_SetVar)
00190 #   define Tcl_FindExecutable GLUE_WRAP(Tcl_FindExecutable)
00191 #endif /* WIN32 */
00192
00193 #if qCarbon
00194 #   define _TCL_CALLBACK(f) ((Tcl_CmdProc *)(f))
00195 #   define CompatLoadLibrary CarbonCompatLoadLibrary
00196 #   define CompatCloseLibrary CarbonCompatCloseLibrary
00197 #   define _CompatCallLibrary _CarbonCompatCallLibrary
00198 #else
00199 #   ifdef qUnix
00200 #       define _TCL_CALLBACK(f) ((Tcl_CmdProc *)(f))
00201 #       ifdef CONST84 // is defined at tcl8.4
00202 #           define _TCL84_CONST CONST84
00203 #       endif
00204 #   else
00205 #       define _TCL_CALLBACK(f) f
00206 #   endif
00207 #endif
00208
00209 #ifndef _TCL84_CONST
00210 #   define _TCL84_CONST
00211 #endif
00212
00213 extern "C"
00214 {
00215     static int tclCvsProc (ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00216     static int tclHelpProc (ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00217     static int tclCvsOutProc (ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00218     static int tclCvsErrProc (ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00219     static int tclCvsBrowserProc (ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00220     static int tclCvsEntriesProc (ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00221     static void tclCvsEntriesDeleteProc(ClientData clientData);
00222 #ifdef WIN32
00223     static int tclDirProc (ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00224 #endif /* WIN32 */
00225
00226     static int tclCvsExitOnErrorProc(ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00227     static int tclCvsLastErrorCodeProc(ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]);
00228     /* not used at the moment
00229        static Tcl_CmdProc tclSetDebugLevelProc(ClientData clientData, Tcl_Interp *interp, int argc, _TCL84_CONST char *argv[]); */
00230 }
00231
00233 class CTCLBrowserEnt
00234 {
00235 public:
00236     CTCLBrowserEnt()
00237     {}
00238
00239     CTCLBrowserEnt(EntnodeData* data)
00240         : node(data)
00241     {}
00242
00243     CTCLBrowserEnt(const CTCLBrowserEnt& ent)
00244         : node(ent.node)
00245     {}
00246
00247     ~CTCLBrowserEnt()
00248     {}
00249
00250     CTCLBrowserEnt& operator=(const CTCLBrowserEnt& ent)
00251     {
00252         node = ent.node;
00253         return *this;
00254     }
00255
00256     bool IsSamePath(const char* pathstr) const
00257     {
00258         CStr path = pathstr;
00259         CTcl_Interp::Deunixfy(path);
00260
00261         CStr file;
00262         node.Data()->GetFullPathName(file);
00263         CTcl_Interp::Deunixfy(file);
00264
00265         return path.compare(file) == 0;
00266     }
00267
00268     EntnodeData* GetData() const
00269     {
00270         return node.Data();
00271     }
00272
00274     void GetNormalized(CStr& path, CStr& fname) const
00275     {
00276         CStr file;
00277         node.Data()->GetFullPathName(file);
00278         CTcl_Interp::Deunixfy(file);
00279         SplitPath(file, path, fname);
00280     }
00281
00282 private:
00283     ENTNODE node;
00284 };
00285
00286 static std::vector<CTCLBrowserEnt> sTclBrowser;
00287
00289 class CTCLCvsConsole : public CCvsConsole
00290 {
00291 public:
00292     CTCLCvsConsole(Tcl_Interp* interp) : fInterp(interp)
00293     {
00294         fLen = 100;
00295         fAlloc = (char*)malloc((fLen + 1) * sizeof(char));
00296     }
00297
00298     virtual ~CTCLCvsConsole()
00299     {
00300         if( fAlloc != 0L )
00301             free(fAlloc);
00302     }
00303
00304     virtual long cvs_out(const char* txt, long len)
00305     {
00306         if( fAlloc == 0L )
00307             return 0;
00308
00309         if( len > fLen )
00310         {
00311             fLen = len;
00312             fAlloc = (char*)realloc(fAlloc, (fLen + 1) * sizeof(char));
00313         }
00314
00315         if( fAlloc == 0L )
00316             return 0;
00317
00318         memcpy(fAlloc, txt, len * sizeof(char));
00319         fAlloc[len] = '\0';
00320
00321         Tcl_AppendResult(fInterp, fAlloc, 0L);
00322         return len;
00323     }
00324
00325     virtual long cvs_err(const char* txt, long len)
00326     {
00327         return cvs_out(txt, len);
00328     }
00329 protected:
00330     Tcl_Interp* fInterp;
00331     int fLen;
00332     char* fAlloc;
00333 };
00334
00335 DECLC static int tclCvsProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00336 {
00337     CTcl_Interp* tcl_interp = (CTcl_Interp*) clientData;
00338     CvsArgs args;
00339
00340     for(int i = 1; i < argc; i++)
00341     {
00342         args.add(argv[i]);
00343     }
00344
00345     CTCLCvsConsole console(interp);
00346     int exitc = launchCVS(0L, args.Argc(), args.Argv(), &console);
00347
00348     //
00349     // Set CvsLastErrorCode value. TCL script can query
00350     // this value using cvslasterrorcode command
00351     //
00352     tcl_interp->SetCvsLastErrorCode(exitc);
00353
00354     //
00355     // If command succeeded then return always TCL_OK and
00356     // proceed with script. If command failed (exitc != 0)
00357     // then exit only if CvsExitOnError is TRUE.
00358     //
00359     if( exitc == 0 )
00360         return TCL_OK;
00361     else
00362         return tcl_interp->GetCvsExitOnError() ? TCL_ERROR : TCL_OK;
00363 }
00364
00365 DECLC static int tclHelpProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00366 {
00367     Tcl_AppendResult(interp, "Help :\n", 0L);
00368     Tcl_AppendResult(interp, "   cvs  : the cvs tool.\n", 0L);
00369     Tcl_AppendResult(interp, "   help : this help.\n", 0L);
00370     Tcl_AppendResult(interp, "Others commands :\n", 0L);
00371     Tcl_AppendResult(interp, "   cd   : change directory\n", 0L);
00372     Tcl_AppendResult(interp, "   pwd  : print current directory\n", 0L);
00373     Tcl_AppendResult(interp, "   ls   : list the current directory\n", 0L);
00374     Tcl_AppendResult(interp, "   info ?  : misc. informations\n", 0L);
00375     Tcl_AppendResult(interp, "   info commands : all the TCL commands\n", 0L);
00376
00377     return TCL_OK;
00378 }
00379
00380 DECLC static int tclCvsOutProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00381 {
00382     for(int i = 1; i < argc; i++)
00383     {
00384         cvs_outstr(argv[i], strlen(argv[i]));
00385     }
00386
00387     return TCL_OK;
00388 }
00389
00390 DECLC static int tclCvsErrProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00391 {
00392     for(int i = 1; i < argc; i++)
00393     {
00394         cvs_errstr(argv[i], strlen(argv[i]));
00395     }
00396
00397     return TCL_OK;
00398 }
00399
00400 DECLC static int tclCvsBrowserProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00401 {
00402     if( argc < 2 )
00403     {
00404         Tcl_AppendResult(interp, argv[0], " : Missing arguments\n", 0L);
00405         return TCL_ERROR;
00406     }
00407
00408     std::vector<CTCLBrowserEnt> & browser = clientData != 0L ?
00409         *(std::vector<CTCLBrowserEnt>*)clientData : sTclBrowser;
00410
00411     if( strcmp(argv[1], "get") == 0 )
00412     {
00413         if( argc != 2 )
00414         {
00415             char* str = Tcl_Concat(argc, argv);
00416             Tcl_AppendResult(interp, argv[0], " : Too many arguments : '", str, "'\n", 0L);
00417             Tcl_Free(str);
00418
00419             return TCL_ERROR;
00420         }
00421
00422         Tcl_Obj* list = Tcl_NewListObj(0, 0L);
00423         std::vector<CTCLBrowserEnt>::const_iterator i;
00424         for(i = browser.begin(); i != browser.end(); ++i)
00425         {
00426             const std::vector<CTCLBrowserEnt>::const_iterator entry = i;
00427
00428             CStr path;
00429             entry->GetData()->GetFullPathName(path);
00430             CTcl_Interp::Unixfy(path);
00431
00432             Tcl_Obj* obj = Tcl_NewStringObj(path, path.length());
00433             Tcl_ListObjAppendElement(interp, list, obj);
00434             //TclFreeObj(obj);
00435         }
00436
00437         Tcl_SetObjResult(interp, list);
00438         //TclFreeObj(list);
00439     }
00440     else if(strcmp(argv[1], "info") == 0)
00441     {
00442         if( argc != 4 )
00443         {
00444             char* str = Tcl_Concat(argc, argv);
00445             Tcl_AppendResult(interp, argv[0], " : Too many arguments : '", str, "'\n", 0L);
00446             Tcl_Free(str);
00447             return TCL_ERROR;
00448         }
00449
00450         std::vector<CTCLBrowserEnt>::const_iterator i;
00451         for(i = browser.begin(); i != browser.end(); ++i)
00452         {
00453             const std::vector<CTCLBrowserEnt>::const_iterator entry = i;
00454             if( entry->IsSamePath(argv[2]) )
00455             {
00456                 EntnodeData* data = entry->GetData();
00457                 CStr path, fname, value;
00458                 entry->GetNormalized(path, fname);
00459
00460                 const char* res = Tcl_SetVar2(interp, argv[3], "name", fname, 0);
00461                 if( res == 0L )
00462                     goto err1;
00463
00464                 value = data->GetType() == ENT_FILE ? "file" : "folder";
00465                 res = Tcl_SetVar2(interp, argv[3], "kind", value, 0);
00466                 if( res == 0L )
00467                     goto err1;
00468
00469                 res = Tcl_SetVar2(interp, argv[3], "path", path, 0);
00470                 if( res == 0L )
00471                     goto err1;
00472
00473                 value = (*data)[EntnodeData::kState];
00474                 res = Tcl_SetVar2(interp, argv[3], "state", value, 0);
00475                 if( res == 0L )
00476                     goto err1;
00477
00478                 value = data->IsMissing() ? "1" : "0";
00479                 res = Tcl_SetVar2(interp, argv[3], "missing", value, 0);
00480                 if( res == 0L )
00481                     goto err1;
00482
00483                 value = data->IsUnknown() ? "1" : "0";
00484                 res = Tcl_SetVar2(interp, argv[3], "unknown", value, 0);
00485                 if( res == 0L )
00486                     goto err1;
00487
00488                 value = data->IsIgnored() ? "1" : "0";
00489                 res = Tcl_SetVar2(interp, argv[3], "ignored", value, 0);
00490                 if( res == 0L )
00491                     goto err1;
00492
00493                 value = data->IsLocked() ? "1" : "0";
00494                 res = Tcl_SetVar2(interp, argv[3], "locked", value, 0);
00495                 if( res == 0L )
00496                     goto err1;
00497
00498                 value = data->IsUnmodified() ? "0" : "1";
00499                 res = Tcl_SetVar2(interp, argv[3], "modified", value, 0);
00500                 if( res == 0L )
00501                     goto err1;
00502
00503                 value = data->GetState();
00504                 res = Tcl_SetVar2(interp, argv[3], "state", value, 0);
00505                 if( res == 0L )
00506                     goto err1;
00507
00508                 if( data->GetType() == ENT_FILE )
00509                 {
00510                     value = (*data)[EntnodeFile::kVN];
00511                     res = Tcl_SetVar2(interp, argv[3], "revision", value, 0);
00512                     if( res == 0L )
00513                         goto err1;
00514
00515                     value = (*data)[EntnodeFile::kTS];
00516                     res = Tcl_SetVar2(interp, argv[3], "timestamp", value, 0);
00517                     if( res == 0L )
00518                         goto err1;
00519
00520                     value = (*data)[EntnodeFile::kOption];
00521                     res = Tcl_SetVar2(interp, argv[3], "option", value, 0);
00522                     if( res == 0L )
00523                         goto err1;
00524
00525                     value = (*data)[EntnodeFile::kEncoding];
00526                     res = Tcl_SetVar2(interp, argv[3], "encoding", value, 0);
00527                     if( res == 0L )
00528                         goto err1;
00529
00530                     value = (*data)[EntnodeFile::kTag];
00531                     res = Tcl_SetVar2(interp, argv[3], "tag", value, 0);
00532                     if( res == 0L )
00533                         goto err1;
00534
00535                     value = (*data)[EntnodeFile::kConflict];
00536                     res = Tcl_SetVar2(interp, argv[3], "conflict", value, 0);
00537                     if( res == 0L )
00538                         goto err1;
00539                 }
00540
00541                 goto ok1;
00542 err1:
00543                 Tcl_AppendResult(interp, argv[0], " : Error while creating '", argv[3], "'\n", 0L);
00544                 return TCL_ERROR;
00545 ok1:
00546                 break;
00547             }
00548         }
00549     }
00550     else
00551     {
00552         char* str = Tcl_Concat(argc, argv);
00553         Tcl_AppendResult(interp, argv[0], " : Wrong arguments : '", str, "'\n", 0L);
00554         Tcl_Free(str);
00555
00556         return TCL_ERROR;
00557     }
00558
00559     return TCL_OK;
00560 }
00561
00562 class CFillTclEntries : public TraversalReport
00563 {
00564 public:
00565     CSortList<ENTNODE>& m_entries;
00566     std::vector<CStr> m_ignlist;
00567
00568     CFillTclEntries(CSortList<ENTNODE>& entries) :
00569         m_entries(entries) {}
00570
00571     virtual ~CFillTclEntries() {}
00572
00573     virtual kTraversal EnterDirectory(const char* fullpath, const char* dirname, const UFSSpec* macspec)
00574     {
00575         Entries_Open (m_entries, fullpath);
00576         BuildIgnoredList(m_ignlist, fullpath);
00577         return kContinueTraversal;
00578     }
00579
00580     virtual kTraversal ExitDirectory(const char* fullpath)
00581     {
00582         m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00583         return kContinueTraversal;
00584     }
00585
00586     virtual kTraversal OnError(const char* err, int errcode)
00587     {
00588         return kTraversalError;
00589     }
00590
00591     virtual kTraversal OnIdle(const char* fullpath)
00592     {
00593         return kContinueTraversal;
00594     }
00595
00596     virtual kTraversal OnDirectory(const char* fullpath,
00597         const char* fullname,
00598         const char* name,
00599         const struct stat& dir, const UFSSpec* macspec)
00600     {
00601 #if defined(WIN32) || defined(TARGET_OS_MAC)
00602         if( stricmp(name, "CVS") == 0 )
00603 #else
00604         if( strcmp(name, "CVS") == 0 )
00605 #endif
00606             return kSkipFile;
00607
00608         /*EntnodeData *data = */Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00609
00610         return kSkipFile;
00611     }
00612
00613     virtual kTraversal OnAlias(const char* fullpath,
00614         const char* fullname,
00615         const char* name,
00616         const struct stat& dir, const UFSSpec* macspec)
00617     {
00618         return OnFile(fullpath, fullname, name, dir, macspec);
00619     }
00620
00621     virtual kTraversal OnFile(const char* fullpath,
00622         const char* fullname,
00623         const char* name,
00624         const struct stat& dir, const UFSSpec* macspec)
00625     {
00626         /*EntnodeData *data = */Entries_SetVisited(fullpath, m_entries, name, dir, false, &m_ignlist);
00627
00628         return kContinueTraversal;
00629     }
00630 };
00631
00632
00633 DECLC static void tclCvsEntriesDeleteProc(ClientData clientData)
00634 {
00635     if( clientData != 0L )
00636         delete (std::vector<CTCLBrowserEnt>*)clientData;
00637 }
00638
00639 DECLC static int tclCvsEntriesProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00640 {
00641     if( argc != 3 )
00642     {
00643         Tcl_AppendResult(interp, argv[0], " : Wrong # of arguments\n", 0L);
00644         return TCL_ERROR;
00645     }
00646
00647     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00648
00649     // Refetch all items
00650     CFillTclEntries traverse(entries);
00651     CStr path(argv[1]);
00652     CTcl_Interp::Deunixfy(path);
00653     /*kTraversal res = */FileTraverse(path, traverse);
00654
00655     // add the missing files
00656     Entries_SetMissing(entries);
00657
00658     // now make the TCL entries
00659     std::vector<CTCLBrowserEnt>* browser = NEW std::vector<CTCLBrowserEnt>;
00660
00661     int numEntries = entries.NumOfElements();
00662     for(int i = 0; i < numEntries; i++)
00663     {
00664         const ENTNODE& theNode = entries.Get(i);
00665         EntnodeData* data = theNode.Data();
00666         browser->push_back(CTCLBrowserEnt(data));
00667     }
00668
00669     Tcl_Command cmd = Tcl_CreateCommand (interp, argv[2], _TCL_CALLBACK(tclCvsBrowserProc),
00670         (ClientData)browser, tclCvsEntriesDeleteProc);
00671
00672     return cmd != 0L ? TCL_OK : TCL_ERROR;
00673 }
00674
00675 #ifdef WIN32
00676 class LSReport : public TraversalReport
00677 {
00678 public:
00679     Tcl_Interp* fInterp;
00680     int fState;
00681
00682     LSReport(Tcl_Interp* interp) : fInterp(interp), fState(TCL_OK) {}
00683
00684     virtual kTraversal EnterDirectory(const char* fullpath, const char* dirname, const UFSSpec* macspec)
00685     {
00686         return kContinueTraversal;
00687     }
00688
00689     virtual kTraversal ExitDirectory(const char* fullpath)
00690     {
00691         return kContinueTraversal;
00692     }
00693
00694     virtual kTraversal OnError(const char* err, int errcode)
00695     {
00696         fState = TCL_ERROR;
00697         Tcl_AppendResult(fInterp, err, "\n", 0L);
00698         return kTraversalError;
00699     }
00700
00701     virtual kTraversal OnIdle(const char* fullpath)
00702     {
00703         return kContinueTraversal;
00704     }
00705
00706     virtual kTraversal OnAnyDevice(const char* fullpath,
00707         const char* fullname,
00708         const char* name,
00709         const struct stat& dir, const UFSSpec* macspec)
00710     {
00711         Tcl_AppendResult(fInterp, name, "\n", 0L);
00712         return kSkipFile;
00713     }
00714 };
00715
00716 DECLC static int tclDirProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00717 {
00718     LSReport report(interp);
00719     char path[256];
00720     getcwd(path, 256);
00721     kTraversal res = FileTraverse(path, report);
00722     return report.fState;
00723 }
00724 #endif /* WIN32 */
00725
00726 DECLC static int tclSafeRemove (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00727 {
00728     if( argc < 2 )
00729     {
00730         Tcl_AppendResult(interp, argv[0], " : Missing list of files\n", 0L);
00731         return TCL_ERROR;
00732     }
00733
00734     for(int i = 1; i < argc; i++)
00735     {
00736         CStr fn(argv[i]);
00737         CTcl_Interp::Deunixfy(fn);
00738
00739         if( !CompatMoveToTrash(fn, 0) )  // dir is not needed, TCL profides fully qualified file name
00740         {
00741             cvs_err("Unable to trash '%s'\n", (const char *)fn);
00742         }
00743     }
00744
00745     return TCL_OK;
00746 }
00747
00748 DECLC static int tclCvsExitOnErrorProc(ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00749 {
00750     CTcl_Interp* tcl_interp = (CTcl_Interp*)clientData;
00751
00752     //
00753     // CvsExitOnError command can be used to define whether TCL macro
00754     // is automatically terminated if CVS command returned error (non zero).
00755     //
00756     // CvsExitOnError has following modes:
00757     //   false  = Do not exit automatically. CvsLastErrorCode contains the last error code.
00758     //   true   = Exit TCL script in error (default).
00759     //
00760     if( argc < 2 )
00761     {
00762         Tcl_AppendResult(interp, argv[0], " : Missing argument (true|false)\n", 0L);
00763         return TCL_ERROR;
00764     }
00765
00766     if( strcmp(argv[1], "true") == 0 )
00767         tcl_interp->SetCvsExitOnError(true);
00768     else if( strcmp(argv[1], "false") == 0 )
00769         tcl_interp->SetCvsExitOnError(false);
00770     else
00771     {
00772         char* str = Tcl_Concat(argc, argv);
00773         Tcl_AppendResult(interp, argv[0], " : Wrong argument : '", str, "'\n", 0L);
00774         Tcl_Free(str);
00775
00776         return TCL_ERROR;
00777     }
00778
00779     return TCL_OK;
00780 }
00781
00782 DECLC static int tclCvsLastErrorCodeProc(ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00783 {
00784     CTcl_Interp* tcl_interp = (CTcl_Interp*)clientData;
00785
00786     if( argc < 2 )
00787     {
00788         char value[35];
00789
00790         // CvsLastErrorCode called without arguments, so return current value
00791         sprintf(value, "%d", tcl_interp->GetCvsLastErrorCode());
00792         Tcl_AppendResult(interp, value, 0L);
00793     }
00794     else
00795     {
00796         // Set the value of LastErrorCode variable
00797         tcl_interp->SetCvsLastErrorCode(atoi(argv[1]));
00798     }
00799
00800     return TCL_OK;
00801 }
00802
00803 #if defined(WIN32)
00804 #   if ENABLE_WINCVSDEBUG
00805 DECLC static int tclGetFileModTimeProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00806 {
00807     struct wnt_stat sb;
00808     struct tm* p_utc = NULL;
00809
00810     if( argc < 2 )
00811     {
00812         Tcl_AppendResult(interp, argv[0], " : Missing argument (int)\n", 0L);
00813         return TCL_ERROR;
00814     }
00815
00816     if( argc > 2 )
00817     {
00818         char* str = Tcl_Concat(argc, argv);
00819         Tcl_AppendResult(interp, argv[0], " : Too many arguments : '", str, "'\n", 0L);
00820         Tcl_Free(str);
00821         return TCL_ERROR;
00822     }
00823
00824     if( wnt_stat(argv[1], &sb) != 0 )
00825     {
00826         Tcl_AppendResult(interp, argv[0], " : Could not find file : '", argv[1], "'\n", 0L);
00827         return TCL_ERROR;
00828     }
00829
00830     p_utc = gmtime(& sb.st_mtime);
00831     Tcl_AppendResult(interp, asctime(p_utc), 0L);
00832     return TCL_OK;
00833 }
00834
00835 DECLC static int tclSetDebugMaskProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00836 {
00837     if( argc < 2 )
00838     {
00839         Tcl_AppendResult(interp, argv[0], " : Missing argument (int)\n", 0L);
00840         return TCL_ERROR;
00841     }
00842
00843     if( argc > 3 )
00844     {
00845         char* str = Tcl_Concat(argc, argv);
00846         Tcl_AppendResult(interp, argv[0], " : Too many arguments : '", str, "'\n", 0L);
00847         Tcl_Free(str);
00848         return TCL_ERROR;
00849     }
00850
00851     char* endc = NULL;
00852     unsigned long n;
00853     bool b;
00854
00855     n = strtoul(argv[1], &endc, 0);
00856     if( *endc )
00857     {
00858         Tcl_AppendResult(interp, argv[0], " : Could not understand argument '", argv[1], "'\n", 0L);
00859         return TCL_ERROR;
00860     }
00861
00862     if( argc == 2 )
00863     {
00864         SetWinCvsDebugMask(n);
00865         return TCL_OK;
00866     }
00867
00868
00869     if( !stricmp(argv[2], "true") )
00870     {
00871         b = true;
00872     }
00873     else if( !stricmp(argv[2], "false") )
00874     {
00875         b = false;
00876     }
00877     else
00878     {
00879         b = strtoul(argv[2], &endc, 0) != 0;
00880         if( *endc )
00881         {
00882             Tcl_AppendResult(interp, argv[0], " : Could not understand argument '", argv[2], "'\n", 0L);
00883             return TCL_ERROR;
00884         }
00885     }
00886
00887     SetWinCvsDebugMaskBit(n, b);
00888
00889     return TCL_OK;
00890 }
00891
00892 DECLC static int tclGetDebugMaskProc (ClientData clientData, Tcl_Interp* interp, int argc, _TCL84_CONST char* argv[])
00893 {
00894     char retstr[32];
00895     if( argc < 2 )
00896     {
00897         _snprintf(retstr, 32, "%u", GetWinCvsDebugMask());
00898         Tcl_AppendResult(interp, retstr, 0L);
00899         return TCL_OK;
00900     }
00901
00902     if( argc > 3 )
00903     {
00904         char* str = Tcl_Concat(argc, argv);
00905         Tcl_AppendResult(interp, argv[0], " : Too many arguments : '", str, "'\n", 0L);
00906         Tcl_Free(str);
00907         return TCL_ERROR;
00908     }
00909
00910     char* endc = NULL;
00911     unsigned long n;
00912
00913     n = strtoul(argv[1], & endc, 0);
00914     if( *endc )
00915     {
00916         Tcl_AppendResult(interp, argv[0], " : Could not understand argument '", argv[1], "'\n", 0L);
00917         return TCL_ERROR;
00918     }
00919
00920     _snprintf(retstr, 32, "%u", GetWinCvsDebugMaskBit(n));
00921     Tcl_AppendResult(interp, retstr, 0L);
00922
00923     return TCL_OK;
00924 }
00925 #   endif   // ENABLE_WINCVSDEBUG
00926 #endif  // WIN32
00927
00928 #endif // USE_TCL
00929
00933 void TclBrowserReset(void)
00934 {
00935 #if USE_TCL
00936     sTclBrowser.erase(sTclBrowser.begin(), sTclBrowser.end());
00937 #endif
00938 }
00939
00946 void TclBrowserAppend(const char* /*path*/, EntnodeData* data)
00947 {
00948 #if USE_TCL
00949     sTclBrowser.push_back(CTCLBrowserEnt(data));
00950 #endif
00951 }
00952
00953 static Tcl_Interp* myTcl_CreateInterp(void)
00954 {
00955 #if USE_TCL
00956 #   ifdef WIN32
00957     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00958     CStr path;
00959     app->GetAppModule(path);
00960     Tcl_FindExecutable(path);
00961 #   endif
00962 #endif
00963
00964 #   ifdef qMacCvsPP
00965     CStr appPath = CMacCvsApp::GetAppPath();
00966     Tcl_FindExecutable(appPath);
00967 #   endif
00968
00969 #   if USE_TCL
00970     Tcl_Interp* res = Tcl_CreateInterp();
00971     return res;
00972 #   else
00973     return NULL;
00974 #   endif
00975 }
00976
00977 CTcl_Interp::CTcl_Interp()
00978 {
00979     fInterp = 0L;
00980
00981     fExitOnError = true;
00982     fLastErrorCode = 0;
00983
00984 #if USE_TCL
00985     if( !CTcl_Interp::IsAvail() )
00986     {
00987         return;
00988     }
00989
00990     fInterp = myTcl_CreateInterp();
00991     if( fInterp == 0L )
00992     {
00993         cvs_err("Unable to create a new TCL interpreter !\n");
00994         return;
00995     }
00996
00997     Tcl_Command cmd;
00998
00999     // this parameter is used to get access to CTcl_Interp::SetCvsLastErrorCode
01000     // in tclCvsProc method
01001     cmd = Tcl_CreateCommand (fInterp, "cvs", _TCL_CALLBACK(tclCvsProc),
01002         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01003
01004     cmd = Tcl_CreateCommand (fInterp, "help", _TCL_CALLBACK(tclHelpProc),
01005         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01006     cmd = Tcl_CreateCommand (fInterp, "cvsout", _TCL_CALLBACK(tclCvsOutProc),
01007         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01008     cmd = Tcl_CreateCommand (fInterp, "cvserr", _TCL_CALLBACK(tclCvsErrProc),
01009         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01010     cmd = Tcl_CreateCommand (fInterp, "cvsbrowser", _TCL_CALLBACK(tclCvsBrowserProc),
01011         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01012     cmd = Tcl_CreateCommand (fInterp, "cvsentries", _TCL_CALLBACK(tclCvsEntriesProc),
01013         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01014 #ifdef WIN32
01015     cmd = Tcl_CreateCommand (fInterp, "ls", _TCL_CALLBACK(tclDirProc),
01016         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01017     cmd = Tcl_CreateCommand (fInterp, "dir", _TCL_CALLBACK(tclDirProc),
01018         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01019 #endif /* WIN32 */
01020     cmd = Tcl_CreateCommand (fInterp, "trash", _TCL_CALLBACK(tclSafeRemove),
01021         (ClientData)0L, (Tcl_CmdDeleteProc *)0L);
01022
01023     cmd = Tcl_CreateCommand (fInterp, "cvsexitonerror", _TCL_CALLBACK(tclCvsExitOnErrorProc),
01024         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01025
01026     cmd = Tcl_CreateCommand (fInterp, "cvslasterrorcode", _TCL_CALLBACK(tclCvsLastErrorCodeProc),
01027         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01028 #if defined(WIN32)
01029 #   if ENABLE_WINCVSDEBUG
01030     cmd = Tcl_CreateCommand (fInterp, "cvssetdebugmask", _TCL_CALLBACK(tclSetDebugMaskProc),
01031         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01032     cmd = Tcl_CreateCommand (fInterp, "cvsgetdebugmask", _TCL_CALLBACK(tclGetDebugMaskProc),
01033         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01034     cmd = Tcl_CreateCommand (fInterp, "cvsfilemodtime", _TCL_CALLBACK(tclGetFileModTimeProc),
01035         (ClientData)this, (Tcl_CmdDeleteProc *)0L);
01036 #   endif   // ENABLE_WINCVSDEBUG
01037 #endif  // defined(WIN32)
01038
01039     CStr rcfile;
01040     MacrosGetLoc(rcfile);
01041
01042     if( !rcfile.endsWith(kPathDelimiter) )
01043         rcfile << kPathDelimiter;
01044
01045     rcfile << "startup.tcl";
01046
01047     Tcl_SetVar(fInterp, "tcl_rcFileName", rcfile, TCL_GLOBAL_ONLY);
01048     Tcl_SetVar(fInterp, "tcl_interactive", "1", TCL_GLOBAL_ONLY);
01049     Tcl_Init(fInterp);
01050     Tcl_SourceRCFile(fInterp);
01051 #endif
01052 }
01053
01054 CTcl_Interp::~CTcl_Interp()
01055 {
01056 #if USE_TCL
01057     if( fInterp != 0L )
01058         Tcl_DeleteInterp(fInterp);
01059 #endif
01060 }
01061
01067 bool CTcl_Interp::IsAvail(const bool forceReload /*= false*/)
01068 {
01069 #if USE_TCL
01070     static bool firstTime = true;
01071     static bool tclAvail = false;
01072
01073     if( firstTime || forceReload )
01074     {
01075 #   if defined(WIN32) || qCarbon
01076         static CompatConnectID connID = 0L;
01077
01078         if( connID )
01079         {
01080             if( CompatCloseLibrary(&connID) )
01081             {
01082                 connID = 0L;
01083                 tclAvail = false;
01084             }
01085         }
01086 #   endif
01087
01088 #   ifdef WIN32
01089         if( !tclAvail )
01090         {
01091             tclAvail = (gCvsPrefs.TclLibrary() && CompatLoadLibrary(&connID, gCvsPrefs.TclLibrary())) ||
01092                 CompatLoadLibrary(&connID, "tcl87.dll") != 0 ||
01093                 CompatLoadLibrary(&connID, "tcl86.dll") != 0 ||
01094                 CompatLoadLibrary(&connID, "tcl85.dll") != 0 ||
01095                 CompatLoadLibrary(&connID, "tcl84.dll") != 0 ||
01096                 CompatLoadLibrary(&connID, "tcl83.dll") != 0 ||
01097                 CompatLoadLibrary(&connID, "tcl82.dll") != 0 ||
01098                 CompatLoadLibrary(&connID, "tcl81.dll") != 0;
01099         }
01100 #   endif
01101
01102 #   if TARGET_RT_MAC_MACHO
01103         tclAvail = CompatLoadLibrary(&connID, "/usr/lib/libtcl.dylib");
01104 #   endif
01105
01106 #   if defined(WIN32) || qCarbon
01107 #   define LOAD_CODEFRAG(name) \
01108         if( tclAvail ) \
01109             tclAvail = (*(void**)&name##_glue = \
01110                 _CompatCallLibrary(connID, #name)) != 0L
01111 #   endif
01112 #   if defined(WIN32) || TARGET_API_MAC_CARBON
01113         LOAD_CODEFRAG(Tcl_CreateCommand);
01114         LOAD_CODEFRAG(Tcl_CreateInterp);
01115         LOAD_CODEFRAG(Tcl_AppendResult);
01116         LOAD_CODEFRAG(Tcl_SetResult);
01117         LOAD_CODEFRAG(Tcl_DeleteInterp);
01118         LOAD_CODEFRAG(Tcl_Eval);
01119         LOAD_CODEFRAG(Tcl_EvalFile);
01120         LOAD_CODEFRAG(Tcl_Alloc);
01121         LOAD_CODEFRAG(Tcl_Free);
01122         LOAD_CODEFRAG(Tcl_Realloc);
01123         LOAD_CODEFRAG(Tcl_ExprLong);
01124         LOAD_CODEFRAG(Tcl_Concat);
01125         LOAD_CODEFRAG(Tcl_SetVar2);
01126         LOAD_CODEFRAG(Tcl_DStringStartSublist);
01127         LOAD_CODEFRAG(Tcl_DStringEndSublist);
01128         LOAD_CODEFRAG(Tcl_DStringFree);
01129         LOAD_CODEFRAG(Tcl_DStringInit);
01130         LOAD_CODEFRAG(Tcl_DStringResult);
01131         LOAD_CODEFRAG(Tcl_DStringAppendElement);
01132         LOAD_CODEFRAG(TclFreeObj);
01133         LOAD_CODEFRAG(Tcl_SetObjResult);
01134         LOAD_CODEFRAG(Tcl_NewStringObj);
01135         LOAD_CODEFRAG(Tcl_NewListObj);
01136         LOAD_CODEFRAG(Tcl_ListObjAppendElement);
01137         LOAD_CODEFRAG(Tcl_SourceRCFile);
01138         LOAD_CODEFRAG(Tcl_Init);
01139         LOAD_CODEFRAG(Tcl_SetVar);
01140         LOAD_CODEFRAG(Tcl_FindExecutable);
01141
01142         if( !tclAvail )
01143             return false;
01144 #   endif /* WIN32 */
01145
01146         Tcl_Interp* interp = myTcl_CreateInterp();
01147         tclAvail = interp != 0L;
01148         if( !tclAvail )
01149             return false;
01150
01151         Tcl_Init(interp);
01152
01153         /* Destroy the interp we needed just for this */
01154         Tcl_DeleteInterp(interp);
01155
01156         firstTime = false;
01157     }
01158
01159     return tclAvail;
01160 #else
01161     return false;
01162 #endif
01163 }
01164
01169 kTclRes CTcl_Interp::DoScript(const char* script)
01170 {
01171 #if USE_TCL
01172     bool bTclFileStarted;
01173
01174     if( fInterp == 0L )
01175         return false;
01176
01177     // If script cmd begins with "source " then this
01178     // must be TCL file execution.
01179     bTclFileStarted = (strncmp(script, "source ", 7) == 0);
01180     if( bTclFileStarted )
01181         gCvsPrefs.SetTclFileRunning(true);
01182
01183     int exitc = Tcl_Eval(fInterp, (char*)script);
01184
01185     if( bTclFileStarted )
01186         gCvsPrefs.SetTclFileRunning(false);
01187
01188     size_t len = strlen(fInterp->result);
01189     if( exitc == TCL_ERROR )
01190     {
01191         cvs_errstr(fInterp->result, len);
01192         if( len != 0 && fInterp->result[len - 1] != '\n' )
01193             cvs_errstr("\n", 1);
01194     }
01195     else
01196     {
01197         cvs_outstr(fInterp->result, len);
01198         if( len != 0 && fInterp->result[len - 1] != '\n' )
01199             cvs_outstr("\n", 1);
01200     }
01201
01202     return exitc;
01203 #else
01204     return false;
01205 #endif
01206 }
01207
01212 kTclRes CTcl_Interp::DoScriptVar(const char* format, ...)
01213 {
01214 #if USE_TCL
01215     if( fInterp == 0L )
01216         return false;
01217
01218     va_list args;
01219     char script[1024] = {'\0'};
01220
01221     va_start(args, format);
01222     vsprintf(script, format, args);
01223     va_end(args);
01224
01225     return DoScript(script);
01226 #else
01227     return false;
01228 #endif
01229 }
01230
01235 kTclRes CTcl_Interp::DoFile(const char* file)
01236 {
01237 #if USE_TCL
01238     if( fInterp == 0L )
01239         return false;
01240
01241     int exitc = Tcl_EvalFile(fInterp, (char*)file);
01242     size_t len = strlen(fInterp->result);
01243     if( exitc == TCL_ERROR )
01244     {
01245         cvs_errstr(fInterp->result, len);
01246         if( len != 0 && fInterp->result[len - 1] != '\n' )
01247             cvs_errstr("\n", 1);
01248     }
01249     else
01250     {
01251         cvs_outstr(fInterp->result, len);
01252         if( len != 0 && fInterp->result[len - 1] != '\n' )
01253             cvs_outstr("\n", 1);
01254     }
01255
01256     return exitc;
01257 #else
01258     return false;
01259 #endif
01260 }
01261
01266 void CTcl_Interp::Unixfy(CStr& path)
01267 {
01268     if( kTCLPathDelimiter != kPathDelimiter )
01269     {
01270         path.replace (kPathDelimiter, kTCLPathDelimiter);
01271     }
01272
01273
01274     path.rtrim (kTCLPathDelimiter);
01275
01276 }
01277
01282 void CTcl_Interp::Deunixfy(CStr& path)
01283 {
01284     if( kTCLPathDelimiter != kPathDelimiter )
01285     {
01286         path.replace (kTCLPathDelimiter, kPathDelimiter);
01287     }
01288 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPersistentBool Member List

This is the complete list of members for CPersistentBool, including all inherited members.

_GetBaseClass() | CPersistentBool | [protected, static]
classCPersistent | CPersistent | [protected, static]
classCPersistentBool | CPersistentBool | [protected, static]
classUObject | UObject | [protected, static]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CPersistentBool(const char *uniqueName, bool defValue, kClassPersistent pclass=kNoClass) | CPersistentBool | [inline]
CPersistentT(const char *uniqueName, booldefValue, kClassPersistent pclass) | CPersistentT< bool > | [inline]
CreateObject(const char *className) | UObject | [static]
Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | CPersistentT< bool > | [inline, virtual]
GetRuntimeClass() const | CPersistentBool | [virtual]
GetTimeStamp() const | CPersistent | [inline]
IsKindOf(const URuntimeClass *pClass) const | UObject |
LoadAll(const char *only=0L) | CPersistent | [static]
m_fAllEntries | CPersistent | [protected, static]
m_fDefValue | CPersistentT< bool > | [protected]
m_fTimeStamp | CPersistent | [protected]
m_fValue | CPersistentT< bool > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
operator const bool &() const | CPersistentBool | [inline]
operator const T &() const | CPersistentT< bool > | [inline]
operator=(const bool &val) | CPersistentBool | [inline]
operator==(const bool &val) const | CPersistentBool | [inline]
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtCPersistentBool(void) | CPersistentBool | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | CPersistentT< bool > | [inline, virtual]
SizeOf(void) const | CPersistentT< bool > | [inline, virtual]
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CPersistent() | CPersistent | [virtual]
~CPersistentBool() | CPersistentBool | [inline, virtual]
~CPersistentT() | CPersistentT< bool > | [inline, virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoGraphAnnotateHandler Member List

This is the complete list of members for KoGraphAnnotateHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoGraphAnnotateHandler() | KoGraphAnnotateHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoGraphAnnotateHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoGraphAnnotateHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJSizeDockBar Member List

This is the complete list of members for CCJSizeDockBar, including all inherited members.

CalcDynamicLayout(int nLength, DWORD nMode) | CCJSizeDockBar | [virtual]
CalcSizeBarLayout() | CCJSizeDockBar |
CCJSizeDockBar() | CCJSizeDockBar |
DoPaint(CDC *pDC) | CCJSizeDockBar | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJSizeDockBar |
EraseNonClient() | CCJSizeDockBar |
FlatBorder(BOOL bFlat=TRUE) | CCJSizeDockBar |
GetAvailableRect(CRect &rect) | CCJSizeDockBar | [protected]
GetDockedSizeBar(int nPos) | CCJSizeDockBar |
HitTest(const CPoint &point) | CCJSizeDockBar | [virtual]
IsDockBar() const | CCJSizeDockBar | [virtual]
IsDockSizeBar() const | CCJSizeDockBar | [virtual]
IsLastControlBar(int index) | CCJSizeDockBar | [protected]
m_bDragging | CCJSizeDockBar | [protected]
m_bFlatBorder | CCJSizeDockBar | [protected]
m_bIsDockBar | CCJSizeDockBar | [static]
m_bOkToDrag | CCJSizeDockBar | [protected]
m_curHSplitBar | CCJSizeDockBar | [protected]
m_curVSplitBar | CCJSizeDockBar | [protected]
m_iActualSize | CCJSizeDockBar | [protected]
m_iSafeSpace | CCJSizeDockBar | [protected]
m_ptCurDrag | CCJSizeDockBar | [protected]
m_ptCurrent | CCJSizeDockBar | [protected]
m_ptStartDrag | CCJSizeDockBar | [protected]
m_rcTrack | CCJSizeDockBar | [protected]
Maximize(CCJControlBar *) | CCJSizeDockBar |
Normalize(CCJControlBar *) | CCJSizeDockBar |
OnInvertTracker(const CRect &) | CCJSizeDockBar | [virtual]
OnLButtonUp(UINT nFlags, CPoint point) | CCJSizeDockBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJSizeDockBar | [protected]
OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR *lpncsp) | CCJSizeDockBar | [protected]
OnNcHitTest(CPoint point) | CCJSizeDockBar | [protected]
OnNcLButtonDown(UINT nHitTest, CPoint point) | CCJSizeDockBar | [protected]
OnNcPaint() | CCJSizeDockBar | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJSizeDockBar | [protected]
RecalcAllExcept(CCJSizeDockBar *pBar) | CCJSizeDockBar |
SetActualSize(int iSize) | CCJSizeDockBar |
~CCJSizeDockBar() | CCJSizeDockBar | [virtual]

Generated on Sat Aug 7 22:50:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonContainer.cpp Source File

common/PythonContainer.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- September 2001
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #include "PythonContainer.h"
00024
00025 #if USE_PYTHON
00026 #include <vector>
00027
00028 PyObject *gCvsguiErr = NULL;
00029
00030 PyRegistry *PyRegistry::m_all = NULL;
00031
00032 PyRegistry::PyRegistry(const char *name, size_t size, destructor d, getattrfunc g,
00033     PyRegistry_InitValues v, PyCFunction c, const char *doc) : m_v(v), m_c(c), m_doc(doc)
00034 {
00035     m_next = m_all;
00036     m_all = this;
00037
00038     PyTypeObject deftype =
00039     {
00040         PyObject_HEAD_INIT(0)
00041         0,
00042         (char *)name,
00043         size,
00044         0, \
00045         d,                           /*tp_dealloc*/
00046         0,                              /*tp_print*/
00047         g,                            /*tp_getattr*/
00048         0,                              /*tp_setattr*/
00049         0,                              /*tp_compare*/
00050         0,                              /*tp_repr*/
00051         0,                              /*tp_as_number*/
00052         0,                              /*tp_as_sequence*/
00053         0,                              /*tp_as_mapping*/
00054     };
00055
00056     m_type = deftype;
00057     m_type.ob_type = GetPyType_Type();
00058 }
00059
00060 PyRegistry::~PyRegistry()
00061 {
00062 }
00063
00064 void PyRegistry::RegisterAllObjects(std::vector<PyMethodDef> & methods)
00065 {
00066     PyRegistry *tmp = m_all;
00067     PyMethodDef def;
00068     while(tmp != 0L)
00069     {
00070         def.ml_name = tmp->m_type.tp_name;
00071         def.ml_meth = tmp->m_c;
00072         def.ml_flags = METH_VARARGS;
00073         def.ml_doc = (char *)tmp->m_doc;
00074
00075         methods.push_back(def);
00076
00077         tmp = tmp->m_next;
00078     }
00079
00080     memset(&def, 0, sizeof(def));
00081     methods.push_back(def);
00082 }
00083
00084 void PyRegistry::CallInitValues(PyObject *d)
00085 {
00086     PyRegistry *tmp = m_all;
00087     while(tmp != 0L)
00088     {
00089         tmp->m_v(d);
00090         tmp = tmp->m_next;
00091     }
00092 }
00093
00094 /* Convenience routine to export an integer value.
00095    For simplicity, errors (which are unlikely anyway) are ignored. */
00096 void PyContainer::RegisterValue(PyObject *d, char *name, int value)
00097 {
00098     PyObject *v = PyInt_FromLong((long) value);
00099     if (v == NULL) {
00100         /* Don't bother reporting this error */
00101         PyErr_Clear();
00102     }
00103     else {
00104         PyDict_SetItemString(d, name, v);
00105         Py_DECREF(v);
00106     }
00107 }
00108
00109 #ifdef WIN32
00110 void PyHandleCvsguiError(CException* e)
00111 {
00112     char tmp[256];
00113     if(e->GetErrorMessage(tmp, sizeof(tmp)))
00114         PyErr_SetString(gCvsguiErr, tmp);
00115     else
00116         PyErr_SetString(gCvsguiErr, "Unknown error");
00117 }
00118 #else
00119 void PyHandleCvsguiError(const std::exception & e)
00120 {
00121     PyErr_SetString(gCvsguiErr, e.what());
00122 }
00123 #endif
00124
00125 void PyHandleCvsguiError(const char *msg)
00126 {
00127     PyErr_SetString(gCvsguiErr, msg);
00128 }
00129
00130 #endif // USE_PYTHON
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsConsole.cpp Source File

common/UCvsConsole.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #if qGTK
00028 #   include <gtk/gtk.h>
00029 #   include <gdk/gdkkeysyms.h>
00030 #endif
00031
00032 #include "UCvsApp.h"
00033 #include "UCvsConsole.h"
00034 #include "UCvsCommands.h"
00035 #include "uconsole.h"
00036 #include "CvsPrefs.h"
00037 #include "TclGlue.h"
00038 #include "PythonGlue.h"
00039 #include "CvsPrefs.h"
00040
00041 UIMPLEMENT_DYNAMIC(UCvsConsole, UWidget)
00042
00043 UBEGIN_MESSAGE_MAP(UCvsConsole, UWidget)
00044     ON_UUPDATECMD(cmdCLEAR_ALL, UCvsConsole::OnCmdUIEraseAll)
00045     ON_UCOMMAND(cmdCLEAR_ALL, UCvsConsole::OnEraseAll)
00046     ON_UDESTROY(UCvsConsole)
00047     ON_UCREATE(UCvsConsole)
00048 UEND_MESSAGE_MAP()
00049
00050 UCvsConsole::UCvsConsole() : UWidget(kUMainConsoleID), m_buf(0L), m_numbuf(0)
00051 {
00052     out.col = UCOLOR(0, 0, 0);
00053     out.bold = false;
00054     out.italic = false;
00055     out.underline = false;
00056 }
00057
00058 UCvsConsole::~UCvsConsole()
00059 {
00060     m_numbuf = 0;
00061     if(m_buf != 0L)
00062     {
00063         free(m_buf);
00064         m_buf = 0L;
00065     }
00066 }
00067
00068 void UCvsConsole::FeedThisLine(const char *buf, size_t numbuf, bool isStderr)
00069 {
00070     void *wid = GetWidget(kUMainWidget);
00071     if(wid == 0L)
00072     {
00073         UAppConsole("The console is not here !\n");
00074         return;
00075     }
00076
00077 #if qGTK
00078     if(!GTK_IS_TEXT(wid))
00079     {
00080         g_warning("The pseudo-console is not here !\n");
00081         return;
00082     }
00083
00084     GtkText *w = GTK_TEXT(wid);
00085     gtk_text_set_point(w, gtk_text_get_length(w));
00086 #endif
00087
00088     UCOLOR color(0, 0, 0);
00089     bool colorChanged = false;
00090     UStr s;
00091     s.set(buf, numbuf);
00092
00093     if(s.length() >= 5 && s[1] == ' ' &&
00094         (s[0] == 'M' || s[0] == 'C' || s[0] == 'U' ||
00095         s[0] == 'P' || s[0] == 'N' || s[0] == 'A' ||
00096         s[0] == 'R' || s[0] == 'I' || s[0] == '?' ||
00097         s[0] == '<' || s[0] == '>'))
00098     {
00099         colorChanged = true;
00100         switch(s[0])
00101         {
00102         default:
00103         case '?' :
00104         case 'I' :
00105             color = UCOLOR(0x80, 0x80, 0x00);
00106             break;
00107         case 'U' :
00108         case 'N' :
00109             color = UCOLOR(0x00, 0xA0, 0x00);
00110             break;
00111         case 'M' :
00112         case 'A' :
00113         case 'R' :
00114             color = UCOLOR(0xFF, 0x00, 0xFF);
00115             break;
00116         case 'C' :
00117         case '<' :
00118             color = UCOLOR(0xFF, 0x00, 0x00);
00119             break;
00120         case '>' :
00121         case 'P' :
00122             color = UCOLOR(0x00, 0x00, 0xFF);
00123             break;
00124         }
00125     }
00126     else if(isStderr)
00127     {
00128         colorChanged = true;
00129         color = UCOLOR(0xFF, 0x80, 0x00);
00130     }
00131
00132 #if qGTK
00133     GdkColormap *cmap;
00134     GdkColor col;
00135     cmap = gdk_colormap_get_system();
00136     col.red = ((unsigned int)color.r) << 8;
00137     col.green = ((unsigned int)color.g) << 8;
00138     col.blue = ((unsigned int)color.b) << 8;
00139     if(color.r != 0 || color.g != 0 || color.b != 0)
00140     {
00141         if (!gdk_color_alloc(cmap, &col)) {
00142             g_error("Couldn't allocate color\n");
00143         }
00144         gtk_text_insert(w, m_font, &col, NULL, s, -1);
00145     }
00146     else
00147         gtk_text_insert(w, m_font, &GTK_WIDGET(w)->style->black, NULL, s, -1);
00148 #endif
00149 }
00150
00151 void UCvsConsole::OutConsole(const char *txt, size_t len, bool isStderr)
00152 {
00153     if(len == 0)
00154         return;
00155
00156     if(m_buf == 0L)
00157     {
00158         m_buf = (char *)malloc((MAX_CHAR_BY_LINE + 3) * sizeof(char));
00159         if(m_buf == 0L)
00160             return;
00161     }
00162
00163     size_t i = 0;
00164     char c = 0;
00165 once_again:
00166     for(; i < len && m_numbuf < MAX_CHAR_BY_LINE; m_numbuf++)
00167     {
00168         c = txt[i++];
00169         if(c == 0x0a)
00170             break;
00171         m_buf[m_numbuf] = c;
00172     }
00173
00174     if(c == 0x0a || m_numbuf == MAX_CHAR_BY_LINE)
00175     {
00176         m_buf[m_numbuf++] = 0x0a;
00177         m_buf[m_numbuf++] = 0x00;
00178
00179         FeedThisLine(m_buf, m_numbuf, isStderr);
00180         m_numbuf = 0;
00181     }
00182
00183     if(i != len)
00184         goto once_again;
00185 }
00186
00187 void UCvsConsole::OnDestroy(void)
00188 {
00189     delete this;
00190 }
00191
00192 #if qGTK
00193 extern "C"
00194 {
00195     static int gtkkeypress(GtkWidget *widget, GdkEventKey * event, gpointer user_data)
00196     {
00197         UCvsConsole *wid = (UCvsConsole *)user_data;
00198
00199         if (event->keyval != GDK_Return && event->keyval != GDK_KP_Enter)
00200             return FALSE;
00201
00202         if(!CTcl_Interp::IsAvail())
00203             return FALSE;
00204
00205         if(!GTK_IS_TEXT(widget))
00206         {
00207             g_warning("The pseudo-console is not here !\n");
00208             return FALSE;
00209         }
00210
00211         GtkText *text = GTK_TEXT(widget);
00212         const GtkEditable & w = text->editable;
00213         guint len = gtk_text_get_length(text);
00214         if(len == 0)
00215             return FALSE;
00216
00217         guint nStartChar, nEndChar;
00218
00219         if (!w.has_selection)
00220         {
00221             // get the end and the beginning of the line
00222             nStartChar = nEndChar = w.current_pos;
00223
00224             if(nStartChar > 0 && GTK_TEXT_INDEX(text, nStartChar) == '\n')
00225                 nStartChar--;
00226             while(nStartChar > 0 && GTK_TEXT_INDEX(text, nStartChar) != '\n')
00227                 nStartChar--;
00228             if(GTK_TEXT_INDEX(text, nStartChar) == '\n')
00229                 nStartChar++;
00230             while(nEndChar < len && GTK_TEXT_INDEX(text, nEndChar) != '\n')
00231                 nEndChar++;
00232         }
00233         else
00234         {
00235             nStartChar = w.selection_start_pos;
00236             nEndChar = w.selection_end_pos;
00237         }
00238
00239         guint long length = nEndChar - nStartChar;
00240         if(length > 0 && nStartChar < len)
00241         {
00242             char *buf = (char *)malloc((length + 1) * sizeof(char));
00243             if(buf != 0L)
00244             {
00245                 char *tmp = buf;
00246                 while(nStartChar < nEndChar)
00247                 {
00248                     *tmp++ = GTK_TEXT_INDEX(text, nStartChar);
00249                     nStartChar++;
00250                 }
00251                 *tmp++ = '\0';
00252
00253                 wid->OutConsole("\n", 1);
00254
00255                 if( gCvsPrefs.GetUseShell() == SHELL_PYTHON && CPython_Interp::IsAvail() )
00256                 {
00257                     CPython_Interp interp;
00258                     interp.DoScript(buf);
00259                 }
00260                 else if( gCvsPrefs.GetUseShell() == SHELL_TCL && CTcl_Interp::IsAvail() )
00261                 {
00262                     CTcl_Interp interp;
00263                     interp.DoScript(buf);
00264                 }
00265
00266                 free(buf);
00267             }
00268         }
00269
00270         return FALSE;
00271     }
00272 }
00273 #endif
00274
00275 void UCvsConsole::OnCreate(void)
00276 {
00277     void *wid = GetWidget(kUMainWidget);
00278     if(wid == 0L)
00279     {
00280         UAppConsole("The console is not here !\n");
00281         return;
00282     }
00283
00284 #if qGTK
00285     setFont( gCvsPrefs.ConsoleFont() );
00286
00287     gtk_signal_connect (GTK_OBJECT (wid), "key_press_event",
00288                         GTK_SIGNAL_FUNC(gtkkeypress), (gpointer)this);
00289 #endif
00290 }
00291
00292 void UCvsConsole::setFont(const char* fontName)
00293 {
00294     m_font = gdk_font_load ( fontName );
00295 }
00296
00297 void UCvsConsole::OutColor(const char *txt, long len)
00298 {
00299     void *wid = GetWidget(kUMainWidget);
00300     if(wid == 0L)
00301     {
00302         UAppConsole("The console is not here !\n");
00303         return;
00304     }
00305
00306 #if qGTK
00307     if(!GTK_IS_TEXT(wid))
00308     {
00309         g_warning("The pseudo-console is not here !\n");
00310         return;
00311     }
00312
00313     GtkText *w = GTK_TEXT(wid);
00314     gtk_text_set_point(w, gtk_text_get_length(w));
00315
00316     GdkColormap *cmap;
00317     GdkColor col;
00318     cmap = gdk_colormap_get_system();
00319     col.red = ((unsigned int)out.col.r) << 8;
00320     col.green = ((unsigned int)out.col.g) << 8;
00321     col.blue = ((unsigned int)out.col.b) << 8;
00322     if(out.col.r != 0 || out.col.g != 0 || out.col.b != 0)
00323     {
00324         if (!gdk_color_alloc(cmap, &col)) {
00325             g_error("Couldn't allocate color\n");
00326         }
00327         gtk_text_insert(w, m_font, &col, NULL, txt, len);
00328     }
00329     else
00330         gtk_text_insert(w, m_font, &GTK_WIDGET(w)->style->black, NULL, txt, len);
00331 #endif
00332 }
00333
00334 void UCvsConsole::OutColor(kConsoleColor color)
00335 {
00336     switch(color)
00337     {
00338     case kBrown :
00339         out.col = UCOLOR(0x80, 0x80, 0x00);
00340         break;
00341     case kGreen :
00342         out.col = UCOLOR(0x00, 0xA0, 0x00);
00343         break;
00344     case kMagenta :
00345         out.col = UCOLOR(0xFF, 0x00, 0xFF);
00346         break;
00347     case kRed :
00348         out.col = UCOLOR(0xFF, 0x00, 0x00);
00349         break;
00350     case kBlue :
00351         out.col = UCOLOR(0x00, 0x00, 0xFF);
00352         break;
00353     case kBold :
00354         out.bold = true;
00355         break;
00356     case kItalic :
00357         out.italic = true;
00358         break;
00359     case kUnderline :
00360         out.underline = true;
00361         break;
00362     case kNormal:
00363         out.col = UCOLOR(0, 0, 0);
00364         out.bold = false;
00365         out.italic = false;
00366         out.underline = false;
00367         break;
00368     case kNL :
00369         break;
00370     }
00371 }
00372 void UCvsConsole::OnEraseAll(void)
00373 {
00374     UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, 0L);
00375 }
00376
00377 void UCvsConsole::OnCmdUIEraseAll(UCmdUI* pCmdUI)
00378 {
00379     pCmdUI->Enable(IsAppEnabled());
00380 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoAddUnicodeHandler Member List

This is the complete list of members for KoAddUnicodeHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoAddUnicodeHandler() | KoAddUnicodeHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KoAddUnicodeHandler | [inline, virtual]
OnFiles(MultiFiles *pmf) | KoAddUnicodeHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoAddUnicodeHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJStatusBar.h Source File

WinCvs/CJLib/Include/CJStatusBar.h

Go to the documentation of this file.
00001 // CJStatusBar.h : header file
00002 //
00003 // Copyright © 1999 Pierre MELLINAND
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.1 $
00010  * $Archive: /CodeJock/Include/CJStatusBar.h $
00011  *
00012  * $History: CJStatusBar.h $
00013  *
00014  * *****************  Version 1  *****************
00015  * User: Kirk Stowell Date: 10/26/99   Time: 11:08p
00016  * Created in $/CodeJock/Include
00017  *
00018  ***************************************************************************/
00020
00021 #ifndef __CJSTATUSBAR_H__
00022 #define __CJSTATUSBAR_H__
00023
00024 #if _MSC_VER >= 1000
00025 #pragma once
00026 #endif // _MSC_VER >= 1000
00027
00029 // CCJStatusBarPaneControlInfo class
00030
00031 class _CJX_EXT_CLASS CCJStatusBarPaneControlInfo : public CObject
00032 {
00033     DECLARE_DYNCREATE(CCJStatusBarPaneControlInfo)
00034
00035 // Construction
00036 public:
00037     CCJStatusBarPaneControlInfo();
00038     virtual ~CCJStatusBarPaneControlInfo();
00039
00040 // Attributes
00041 public:
00042     CWnd*   m_pWnd;
00043     int     m_nPaneID;
00044     BOOL    m_bAutodelete;
00045 };
00046
00048 // CCJStatusBarPane class
00049
00050 class _CJX_EXT_CLASS CCJStatusBarPane : public CObject
00051 {
00052 // Construction
00053 public:
00054     CCJStatusBarPane();
00055     CCJStatusBarPane (CCJStatusBarPane& rPane);
00056     virtual ~CCJStatusBarPane();
00057
00058 // Attributes
00059 public:
00060     UINT    m_nID;
00061     int     m_cxText;
00062     UINT    m_nStyle;
00063     UINT    m_nFlags;
00064     CString m_strText;
00065
00066 // Operations
00067 public:
00068     CCJStatusBarPane& operator=(CCJStatusBarPane& rPane);
00069 };
00070
00072 // CCJStatusBar class
00073
00074 class _CJX_EXT_CLASS CCJStatusBar : public CStatusBar
00075 {
00076     DECLARE_DYNCREATE(CCJStatusBar)
00077
00078 // Construction
00079 public:
00080     CCJStatusBar();
00081     virtual ~CCJStatusBar();
00082
00083 // Attributes
00084 private:
00085     CArray<CCJStatusBarPaneControlInfo*, CCJStatusBarPaneControlInfo*>  m_aPans;
00086
00087 // Operations
00088 public:
00089     virtual void PositionControls();
00090     virtual CCJStatusBarPaneControlInfo* GetPanControl(int nPaneID);
00091     virtual BOOL AddControl(CWnd * pWnd, int nPaneID, BOOL bAutodeleteControl = TRUE );
00092     virtual void SetPaneWidth(int index, int cxWidth);
00093     virtual BOOL AddIndicator( int position, UINT paneID);
00094     virtual BOOL GetStatusPane(int nIndex, CCJStatusBarPane & xfxpane);
00095     virtual void RemovePane(int nPaneID);
00096
00097 // Overrides
00098     // ClassWizard generated virtual function overrides
00099     //{{AFX_VIRTUAL(CCJStatusBar)
00100     //}}AFX_VIRTUAL
00101
00102 // Implementation
00103 public:
00104
00105 // Generated message map functions
00106 protected:
00107     //{{AFX_MSG(CCJStatusBar)
00108     afx_msg void OnSize(UINT nType, int cx, int cy);
00109     //}}AFX_MSG
00110     DECLARE_MESSAGE_MAP()
00111 };
00112
00114
00115 //{{AFX_INSERT_LOCATION}}
00116 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00117
00118 #endif // __CJSTATUSBAR_H__
00119
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFrame.h Source File

common/UCvsFrame.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSFRAME_H
00026 #define UCVSFRAME_H
00027
00028 #include "uwidget.h"
00029 #include "UCvsCommands.h"
00030 #include "BrowseViewModel.h"
00031
00032 #define NUM_FILEMASKS   20
00033
00034 class UCvsFrame : public UWidget
00035 {
00036     UDECLARE_DYNAMIC(UCvsFrame)
00037 public:
00038     UCvsFrame();
00039     virtual ~UCvsFrame();
00040
00041     bool AskForQuitting(void);
00042         // true if we can quit the application
00043
00044     enum
00045     {
00046         kDirCombo = EV_COMMAND_START,   // 0
00047         kBrowserPopup                   // 1
00048     };
00049
00050 // Attributes
00051 protected:
00052     KoFilterModel m_filter;
00053     KoRecursionModel m_recursion;
00054     KoIgnoreModel m_ignore;
00055
00056     bool InUpdateUI;
00057
00058 public:
00059     // KiFilterModel implementation
00060     KiFilterModel* GetFilterModel(void)
00061     {
00062         return &m_filter;
00063     }
00064
00065     // KiRecursionModel implementation
00066     KiRecursionModel* GetRecursionModel(void)
00067     {
00068         return &m_recursion;
00069     }
00070
00071     // KiRecursionModel implementation
00072     KiIgnoreModel* GetIgnoreModel(void)
00073     {
00074         return &m_ignore;
00075     }
00076
00077     void OnFilterMaskEntered(void);
00078     bool FreshenFileMask(void);
00079
00080     ev_msg int OnCmdIgnore(void);
00081
00082 protected:
00083     ev_msg void OnCmdUIAnytime(int cmd, UCmdUI *pCmdUI);
00084     ev_msg void OnCmdUIViewRecursive(UCmdUI *pCmdUI);
00085     ev_msg void OnCmdUIViewIgnored(UCmdUI *pCmdUI);
00086     ev_msg void OnCmdUIFilterMask(UCmdUI *pCmdUI);
00087     ev_msg void OnCmdUIViewAdded(UCmdUI *pCmdUI);
00088     ev_msg void OnCmdUIViewModified(UCmdUI *pCmdUI);
00089     ev_msg void OnCmdUIViewConflict(UCmdUI *pCmdUI);
00090     ev_msg void OnCmdUIViewUnknown(UCmdUI *pCmdUI);
00091     ev_msg void OnCmdUIViewMissing(UCmdUI *pCmdUI);
00092     ev_msg void OnCmdUIViewRemoved(UCmdUI *pCmdUI);
00093     ev_msg void OnCmdUIViewChanged(UCmdUI *pCmdUI);
00094     ev_msg void OnCmdUIHideUnknown(UCmdUI *pCmdUI);
00095     ev_msg void OnCmdUIReload(UCmdUI *pCmdUI);
00096     ev_msg void OnCmdUIQuit(UCmdUI *pCmdUI);
00097     ev_msg void OnCmdUIIgnore(UCmdUI *pCmdUI);
00098     ev_msg void OnCmdUIStopcvs(UCmdUI *pCmdUI);
00099     ev_msg void OnCmdUICvsCmd(UCmdUI *pCmdUI);
00100     ev_msg void OnCmdUIMacroAdmin(int cmd, UCmdUI *pCmdUI);
00101     ev_msg void OnCmdUIPyMacro(int cmd, UCmdUI *pCmdUI);
00102     ev_msg void OnCreate(void);
00103     ev_msg void OnDestroy(void);
00104     ev_msg void OnCmdUIUseTclShell(UCmdUI *pCmdUI);
00105     ev_msg void OnCmdUIUsePyShell(UCmdUI *pCmdUI);
00106     ev_msg int OnQuit(void);
00107     ev_msg int OnCopyrights(void);
00108     ev_msg int OnCredits(void);
00109     ev_msg int OnAbout(void);
00110     ev_msg void OnComboSelDir(int pos, const char *txt);
00111     ev_msg int OnBrowserPopup(void);
00112     ev_msg int OnCmdPreferences(void);
00113     ev_msg int OnCmdSaveSettings(void);
00114     ev_msg int OnCmdRtagNew(void);
00115     ev_msg int OnCmdRtagDelete(void);
00116     ev_msg int OnCmdRtagBranch(void);
00117     ev_msg int OnCmdUseTclShell(void);
00118     ev_msg int OnCmdUsePyShell(void);
00119     ev_msg int OnCmdCmdline(void);
00120     ev_msg int OnCmdLogin(void);
00121     ev_msg int OnCmdLogout(void);
00122     ev_msg int OnCmdStopcvs(void);
00123     ev_msg int OnCmdInit(void);
00124     ev_msg int OnCmdMacroAdmin(int cmd);
00125     ev_msg int OnViewIgnored(void);
00126     ev_msg int OnViewRecursive(void);
00127     ev_msg int OnViewAdded(void);
00128     ev_msg int OnViewModified(void);
00129     ev_msg int OnViewConflict(void);
00130     ev_msg int OnViewUnknown(void);
00131     ev_msg int OnViewMissing(void);
00132     ev_msg int OnViewRemoved(void);
00133     ev_msg int OnViewChanged(void);
00134     ev_msg int OnHideUnknown(void);
00135     ev_msg int OnCmdReload(void);
00136     UDECLARE_MESSAGE_MAP()
00137 };
00138
00139 // little class to get the cursor to wait during the existence of the object
00140 class UWaitCursor
00141 {
00142 public:
00143     UWaitCursor()
00144     {
00145         UEventSendMessage(kUCvsFrameID, EV_CHGCURSOR, UMAKEINT(kUMainWidget, uCursWatch), 0L);
00146     }
00147     virtual ~UWaitCursor()
00148     {
00149         UEventSendMessage(kUCvsFrameID, EV_CHGCURSOR, UMAKEINT(kUMainWidget, uCursArrow), 0L);
00150     }
00151 };
00152
00153 #endif
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KeywordDisplayInfo Member List

This is the complete list of members for KeywordDisplayInfo, including all inherited members.

Create(const KeywordInfo &rowInfo) | KeywordDisplayInfo |
GetName() const | KeywordDisplayInfo |
GetRowInfo() const | KeywordDisplayInfo |
GetValue() const | KeywordDisplayInfo |
m_name | KeywordDisplayInfo | [private]
m_rowInfo | KeywordDisplayInfo | [private]
m_value | KeywordDisplayInfo | [private]
SetValue(const char *value) | KeywordDisplayInfo |

Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PyRegistry Member List

This is the complete list of members for PyRegistry, including all inherited members.

CallInitValues(PyObject *dict) | PyRegistry | [static]
m_all | PyRegistry | [protected, static]
m_c | PyRegistry | [protected]
m_doc | PyRegistry | [protected]
m_next | PyRegistry | [protected]
m_type | PyRegistry |
m_v | PyRegistry | [protected]
PyRegistry(const char *name, size_t size, destructor d, getattrfunc g, PyRegistry_InitValues v, PyCFunction c, const char *doc) | PyRegistry |
RegisterAllObjects(std::vector< PyMethodDef > &methods) | PyRegistry | [static]
~PyRegistry() | PyRegistry |

Generated on Sat Aug 7 22:56:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/FileViewWatcher.h Source File

WinCvs/FileViewWatcher.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018 * Author : V.Antonevich <v_antonevich@hotmail.com> --- November 2000
00019 */
00020
00021 /*
00022 * FileViewWatcher.h --- file modification watcher thread
00023 */
00024
00025 #ifndef __FILEVIEWWATCHWER_H__
00026 #define __FILEVIEWWATCHWER_H__
00027
00029 class KoWatcher
00030 {
00031 // Construction
00032 public:
00033     KoWatcher(HWND hWnd);
00034 private:
00035     ~KoWatcher();
00036
00037 private:
00039     enum
00040     {
00041         kStartHandle = 0,
00042         kTerminateHandle,
00043         kNotifyHandle,
00044         kEndHandle
00045     };
00046
00047     // Data members
00048     CEvent m_startEvent;
00049     CEvent m_terminateEvent;
00051     TCHAR m_path[_MAX_PATH];
00052     HWND m_hWnd;
00053     bool m_isRecursive;
00055     DWORD m_notificationTime;
00056     int m_rapidNotificationCount;
00058     HANDLE m_handles[kEndHandle];
00059     DWORD m_count;
00061     CCriticalSection m_section;
00063     // Methods
00064     static UINT DelegateRun(LPVOID pWatcher);
00065
00066     UINT Run();
00067     bool StartWatch();
00068     void StopWatch();
00069
00070     BOOL Notify();
00071     DWORD GetTimeout(const bool ignoreTimeout = false);
00072
00073 // Operations
00074 public:
00075     // Interface
00076
00078     enum
00079     {
00080         WM_FILECHANGE = WM_APP + 51
00081     };
00082
00083     void SignalStartWatch(LPCTSTR path, bool isRecursive);
00084     void SignalTerminate();
00085 };
00086
00087
00088
00089 #endif
00090 // __FILEVIEWWATCHWER_H__
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatComboBox.cpp Source File

WinCvs/CJLib/CJLibrary/CJFlatComboBox.cpp

Go to the documentation of this file.
00001 // CJFlatComboBox.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJFlatComboBox.cpp $
00011  *
00012  * $History: CJFlatComboBox.cpp $
00013  *
00014  * *****************  Version 15  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 6:01p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Overrode OnEraseBkgnd(...) and re-wrote OnPaint() to handle flicker
00018  * free drawing.
00019  *
00020  * *****************  Version 14  *****************
00021  * User: Kirk Stowell Date: 10/30/99   Time: 2:14p
00022  * Updated in $/CodeJock/CJLibrary
00023  * Added COLORREF members to class to eliminate continuous calls to
00024  * GetSysColor(...). Overrode OnSysColorChange() to re-initialize COLORREF
00025  * variables.
00026  *
00027  * *****************  Version 13  *****************
00028  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00029  * Updated in $/CodeJockey/CJLibrary
00030  * Updated copyright and contact information.
00031  *
00032  * *****************  Version 12  *****************
00033  * User: Kirk Stowell Date: 8/30/99    Time: 12:50a
00034  * Updated in $/CodeJockey/CJLibrary
00035  * Hiren Patel <hpatel@spss.com> - Added ReleaseDC(pDC) when window is
00036  * disabled.
00037  *
00038  * *****************  Version 11  *****************
00039  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00040  * Updated in $/CodeJockey/CJLibrary
00041  *
00042  * *****************  Version 10  *****************
00043  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00044  * Updated in $/CodeJockey/CJLibrary
00045  *
00046  * *****************  Version 9  *****************
00047  * User: Kirk Stowell Date: 5/17/99    Time: 9:24p
00048  * Updated in $/CodeJockey/CJ60Lib
00049  * Gilberto Botaro [seafox@techno.com.br] - Added code for auto
00050  * completion.
00051  *
00052  * *****************  Version 8  *****************
00053  * User: Kirk Stowell Date: 5/03/99    Time: 10:44p
00054  * Updated in $/CodeJockey/CJ60Lib
00055  * Fixed code ommisions.
00056  *
00057  * *****************  Version 7  *****************
00058  * User: Kirk Stowell Date: 5/03/99    Time: 8:42p
00059  * Updated in $/CodeJockey/CJ60Lib
00060  * Danilo Lax [Danilo_Lax@www2.alpeng.com] - The control is painted flat
00061  * when the mouse leaves the box, even if the control has the focus, now
00062  * checking for the focus in OnTimer(.
00063  *
00064  * Removed, unhandled msgs are processed by
00065  * CComboBox::PreTranslateMessage(pMsg). Used reflected msgs
00066  * BN_GETFOCUS/CBN_KILLFOCUS instead of WM_GETFOCUS/WM_KILLFOCUS.
00067  *
00068  * ::GetFocus() doesn't return CFlatComboBox::m_hWnd, even if the control
00069  * has the focus (don't know why, maybe ::GetFocus() only returns the
00070  * handle to the EditField part of the ComboBox), used flag m_bHasFocus
00071  * instead.
00072  *
00073  * *****************  Version 6  *****************
00074  * User: Kirk Stowell Date: 4/03/99    Time: 4:26p
00075  * Updated in $/CodeJockey/CJ60Lib
00076  * Added comments and cleaned up code.
00077  *
00078  * *****************  Version 5  *****************
00079  * User: Kirk Stowell Date: 1/22/99    Time: 4:26p
00080  * Updated in $/CodeJockey/CJ60Lib
00081  * Fixed accelerator problem reported by YOSH YAMASHITA
00082  * (yosh@muj.biglobe.ne.jp) with Matt Weagle's solution of overloading
00083  * PreTranslateMessage().
00084  *
00085  * *****************  Version 4  *****************
00086  * User: Kirk Stowell Date: 1/02/99    Time: 4:25p
00087  * Updated in $/CodeJockey/CJ60Lib
00088  * Renamed class from CJComboBox to CCJFlatComboBox, changed DRAWSTATE to
00089  * enum, removed method Offset(), and replaced with a direct call to
00090  * ::GetSystemMetrics().
00091  *
00092  * *****************  Version 3  *****************
00093  * User: Kirk Stowell Date: 11/02/98   Time: 4:24p
00094  * Updated in $/CodeJockey/CJ60Lib
00095  * Added OnSetFocus(), OnKillFocus() and modified OnPaint() so the control
00096  * remains beveled until it actually looses focus - (Vachik
00097  * Hovhannissian).
00098  *
00099  * *****************  Version 2  *****************
00100  * User: Kirk Stowell Date: 10/05/98   Time: 4:24p
00101  * Updated in $/CodeJockey/CJ60Lib
00102  * Fixed offset bug to use GetSystemMetrics(), instead of hard coded
00103  * values -
00104  * Todd Brannam (tbrannam@msn.com).
00105  *
00106  * *****************  Version 1  *****************
00107  * User: Kirk Stowell Date: 10/02/98   Time: 4:23p
00108  * Created in $/CodeJockey/CJ60Lib
00109  * First release version.
00110  *
00111  ***************************************************************************/
00113
00114 #include "stdafx.h"
00115 #include "CJFlatComboBox.h"
00116
00117 #ifdef _DEBUG
00118 #define new DEBUG_NEW
00119 #undef THIS_FILE
00120 static char THIS_FILE[] = __FILE__;
00121 #endif
00122
00124 // CCJFlatComboBox
00125
00126 CCJFlatComboBox::CCJFlatComboBox()
00127 {
00128     m_bLBtnDown     = FALSE;
00129     m_bPainted      = FALSE;
00130     m_bHasFocus     = FALSE;
00131     m_bAutoComp     = FALSE;
00132     m_clrHilite     = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00133     m_clrShadow     = ::GetSysColor(COLOR_BTNSHADOW);
00134     m_clrNormal     = ::GetSysColor(COLOR_BTNFACE);
00135 }
00136
00137 CCJFlatComboBox::~CCJFlatComboBox()
00138 {
00139 }
00140
00141 IMPLEMENT_DYNAMIC(CCJFlatComboBox, CComboBox)
00142
00143 BEGIN_MESSAGE_MAP(CCJFlatComboBox, CComboBox)
00144     //{{AFX_MSG_MAP(CCJFlatComboBox)
00145     ON_WM_MOUSEMOVE()
00146     ON_WM_LBUTTONDOWN()
00147     ON_WM_LBUTTONUP()
00148     ON_WM_TIMER()
00149     ON_WM_PAINT()
00150     ON_CONTROL_REFLECT(CBN_SETFOCUS,   OnSetFocus)
00151     ON_CONTROL_REFLECT(CBN_KILLFOCUS,  OnKillFocus)
00152     ON_CONTROL_REFLECT(CBN_EDITUPDATE, OnEditUpdate)
00153     ON_WM_SYSCOLORCHANGE()
00154     ON_WM_ERASEBKGND()
00155     //}}AFX_MSG_MAP
00156 END_MESSAGE_MAP()
00157
00159 // CCJFlatComboBox message handlers
00160
00161 void CCJFlatComboBox::OnMouseMove(UINT nFlags, CPoint point)
00162 {
00163     SetTimer(1,10,NULL);
00164     OnTimer(1);
00165     CComboBox::OnMouseMove(nFlags, point);
00166 }
00167
00168 void CCJFlatComboBox::OnLButtonDown(UINT nFlags, CPoint point)
00169 {
00170     m_bLBtnDown = TRUE;
00171     CComboBox::OnLButtonDown(nFlags, point);
00172 }
00173
00174 void CCJFlatComboBox::OnLButtonUp(UINT nFlags, CPoint point)
00175 {
00176     m_bLBtnDown = FALSE;
00177     Invalidate();
00178     CComboBox::OnLButtonUp(nFlags, point);
00179 }
00180
00181 void CCJFlatComboBox::OnTimer(UINT nIDEvent)
00182 {
00183     UNUSED_ALWAYS(nIDEvent);
00184
00185     if (m_bLBtnDown==TRUE) { // OnLButtonDown, show PRESSED.
00186         KillTimer (1);
00187         if (m_bPainted == TRUE) {
00188             DrawCombo(PRESSED, m_clrShadow, m_clrHilite);
00189             m_bPainted = FALSE;
00190         }
00191     } else if (!PointInRect() && !m_bHasFocus) { // If mouse leaves, show flat.
00192         KillTimer (1);
00193         if (m_bPainted == TRUE) {
00194             DrawCombo(NORMAL, m_clrNormal, m_clrNormal);
00195             m_bPainted = FALSE;
00196         }
00197     } else { // On mouse over, show RAISED.
00198         if (m_bPainted == TRUE) {
00199             return;
00200         } else {
00201             m_bPainted = TRUE;
00202             DrawCombo(RAISED, m_clrShadow, m_clrHilite);
00203         }
00204     }
00205 }
00206
00207 void CCJFlatComboBox::OnPaint()
00208 {
00209     ModifyStyleEx (WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE,
00210         0, SWP_FRAMECHANGED);
00211
00212     CPaintDC dc(this);
00213
00214     // KStowell - Get the client rect.
00215     CRect rcClient;
00216     GetClientRect( &rcClient );
00217
00218     // KStowell - Create a memory device-context. This is done to help reduce
00219     // screen flicker, since we will paint the entire control to the
00220     // off screen device context first.
00221     CDC memDC;
00222     CBitmap bitmap;
00223     memDC.CreateCompatibleDC(&dc);
00224     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00225     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00226
00227     // let the control do its default drawing.
00228     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00229
00230     if (PointInRect() || m_bHasFocus) {
00231         DrawCombo(RAISED, m_clrShadow, m_clrHilite, &memDC);
00232     } else {
00233         DrawCombo(NORMAL, m_clrNormal, m_clrNormal, &memDC);
00234     }
00235
00236     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00237     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00238
00239     // KStowell - Cleanup resources.
00240     memDC.SelectObject(pOldBitmap);
00241     memDC.DeleteDC();
00242     bitmap.DeleteObject();
00243 }
00244
00245 void CCJFlatComboBox::DrawCombo(STATE eState, COLORREF clrTopLeft, COLORREF clrBottomRight, CDC* pDC)
00246 {
00247     CRect rcItem;
00248     GetClientRect(&rcItem);
00249     bool bRelease = false;
00250
00251     // if no device context was passed in, get the device context
00252     // for the CWnd client area ...
00253     if(pDC == NULL) {
00254         pDC = GetDC();
00255         bRelease = true;
00256     }
00257
00258     // Cover up dark 3D shadow.
00259     pDC->Draw3dRect(rcItem, clrTopLeft, clrBottomRight);
00260     rcItem.DeflateRect(1,1);
00261
00262     if (!IsWindowEnabled()) {
00263         pDC->Draw3dRect(rcItem, m_clrHilite, m_clrHilite);
00264     } else {
00265         pDC->Draw3dRect(rcItem, m_clrNormal, m_clrNormal);
00266     }
00267
00268     // Cover up dark 3D shadow on drop arrow.
00269     rcItem.DeflateRect(1,1);
00270     rcItem.left = rcItem.right-::GetSystemMetrics(SM_CXHTHUMB);;
00271     pDC->Draw3dRect(rcItem, m_clrNormal, m_clrNormal);
00272
00273     // Cover up NORMAL 3D shadow on drop arrow.
00274     rcItem.DeflateRect(1,1);
00275     pDC->Draw3dRect(rcItem, m_clrNormal, m_clrNormal);
00276
00277     if (!IsWindowEnabled()) {
00278         if(bRelease == true) {
00279             ReleaseDC(pDC);
00280         }
00281         return;
00282     }
00283
00284     rcItem.InflateRect(0,1);
00285     switch (eState)
00286     {
00287     case NORMAL:
00288         pDC->Draw3dRect(rcItem, m_clrHilite, m_clrHilite);
00289         rcItem.left -= 1;
00290         pDC->Draw3dRect(rcItem, m_clrHilite, m_clrHilite);
00291         break;
00292
00293     case RAISED:
00294         pDC->Draw3dRect(rcItem, m_clrHilite, m_clrShadow);
00295         break;
00296
00297     case PRESSED:
00298         rcItem.OffsetRect(1,1);
00299         pDC->Draw3dRect(rcItem, m_clrShadow, m_clrHilite);
00300         break;
00301     }
00302
00303     // KStowell - cleanup.
00304     if(bRelease == true) {
00305         ReleaseDC(pDC);
00306     }
00307 }
00308
00309 void CCJFlatComboBox::OnSetFocus()
00310 {
00311     m_bHasFocus = TRUE;
00312     DrawCombo(RAISED, m_clrShadow, m_clrHilite);
00313 }
00314
00315 void CCJFlatComboBox::OnKillFocus()
00316 {
00317     m_bHasFocus = FALSE;
00318     DrawCombo(NORMAL, m_clrNormal, m_clrNormal);
00319 }
00320
00321 BOOL CCJFlatComboBox::PreTranslateMessage(MSG* pMsg)
00322 {
00323     if(IsWin95()) // alexander Golde [alex@viona.de]
00324     {
00325         // Make sure that the keystrokes continue to the appropriate handlers
00326         if (pMsg->message == WM_KEYDOWN || pMsg->message==WM_KEYUP)
00327         {
00328             ::TranslateMessage(pMsg);
00329             ::DispatchMessage(pMsg);
00330             return TRUE;
00331         }
00332
00333         // Catch the Alt key so we don't choke if focus
00334         // is going to an owner drawn button
00335         if (pMsg->message == WM_SYSCHAR)
00336             return TRUE;
00337     }
00338
00339     return CComboBox::PreTranslateMessage(pMsg);
00340 }
00341
00342 void CCJFlatComboBox::OnEditUpdate()
00343 {
00344     // if we are not to auto update the text, get outta here
00345     if (!m_bAutoComp)
00346         return;
00347
00348     // Get the text in the edit box
00349     CString str;
00350     GetWindowText(str);
00351     int nLength = str.GetLength();
00352
00353     // Currently selected range
00354     DWORD dwCurSel = GetEditSel();
00355     WORD dStart = LOWORD(dwCurSel);
00356     WORD dEnd   = HIWORD(dwCurSel);
00357
00358     // Search for, and select in, and string in the combo box that is prefixed
00359     // by the text in the edit box
00360     if (SelectString(-1, str) == CB_ERR)
00361     {
00362         SetWindowText(str);     // No text selected, so restore what was there before
00363         if (dwCurSel != CB_ERR)
00364             SetEditSel(dStart, dEnd);   //restore cursor postion
00365     }
00366
00367     // Set the text selection as the additional text that we have added
00368     if (dEnd < nLength && dwCurSel != CB_ERR)
00369         SetEditSel(dStart, dEnd);
00370     else
00371         SetEditSel(nLength, -1);
00372 }
00373
00374 BOOL CCJFlatComboBox::IsWin95()
00375 {
00376     OSVERSIONINFO info;
00377     info.dwOSVersionInfoSize = sizeof(info);
00378     GetVersionEx( &info );
00379     return ((VER_PLATFORM_WIN32_WINDOWS == info.dwPlatformId) && (info.dwMinorVersion == 0));
00380 }
00381
00382 void CCJFlatComboBox::OnSysColorChange()
00383 {
00384     CComboBox::OnSysColorChange();
00385
00386     m_clrHilite = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00387     m_clrShadow = ::GetSysColor(COLOR_BTNSHADOW);
00388     m_clrNormal = ::GetSysColor(COLOR_BTNFACE);
00389 }
00390
00391 BOOL CCJFlatComboBox::OnEraseBkgnd(CDC* pDC)
00392 {
00393     // KStowell - overridden for flicker-free drawing.
00394     UNUSED_ALWAYS(pDC);
00395     return TRUE;
00396 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/GfxGroupEdit.h Source File

WinCvs/CJLib/Include/GfxGroupEdit.h

Go to the documentation of this file.
00001 // Copyright (c) Iuri Apollonio 1998
00002 // Use & modify as you want & need, and leave those 4 lines.
00003 // Strongly based on article "Inplace edit control" of Mario Contestabile and "Editable subitems" of Zafir
00004 // http://www.codeguru.com
00005 //
00007 /****************************************************************************
00008  *
00009  * $Date: 1999/11/30 21:45:51 $
00010  * $Revision: 1.1.1.2 $
00011  * $Archive: /CodeJock/Include/GfxGroupEdit.h $
00012  *
00013  * $History: GfxGroupEdit.h $
00014  *
00015  * *****************  Version 3  *****************
00016  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00017  * Updated in $/CodeJock/Include
00018  * Added source control history to file header.
00019  *
00020  ***************************************************************************/
00022
00023 #ifndef __GFXGROUPEDIT_H__
00024 #define __GFXGROUPEDIT_H__
00025
00026 #if _MSC_VER >= 1000
00027 #pragma once
00028 #endif // _MSC_VER >= 1000
00029 // GfxGroupEdit.h : header file
00030 //
00031
00033 // CGfxGroupEdit window
00034
00035 class _CJX_EXT_CLASS CGfxGroupEdit : public CEdit
00036 {
00037 // Construction
00038 public:
00039     CGfxGroupEdit();
00040
00041 // Attributes
00042 public:
00043     BOOL    bEscapeKey;
00044     CString text;
00045     WPARAM  msgSend;
00046     bool    bNoDown;
00047
00048 // Operations
00049 public:
00050
00051 // Overrides
00052     // ClassWizard generated virtual function overrides
00053     //{{AFX_VIRTUAL(CGfxGroupEdit)
00054     public:
00055     virtual BOOL PreTranslateMessage(MSG* pMsg);
00056     protected:
00057     virtual void PostNcDestroy();
00058     //}}AFX_VIRTUAL
00059
00060 // Implementation
00061 public:
00062     int iIndex;
00063     virtual ~CGfxGroupEdit();
00064
00065     // Generated message map functions
00066 protected:
00067     //{{AFX_MSG(CGfxGroupEdit)
00068     afx_msg void OnKillFocus(CWnd* pNewWnd);
00069     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00070     afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
00071     //}}AFX_MSG
00072
00073     DECLARE_MESSAGE_MAP()
00074 };
00075
00077
00078 //{{AFX_INSERT_LOCATION}}
00079 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00080
00081 #endif // __GFXGROUPEDIT_H__
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

EntnodeFile Member List

This is the complete list of members for EntnodeFile, including all inherited members.

Compare(const EntnodeData &node1, const EntnodeData &node2) | EntnodeData | [inline, static]
EntnodeData(const char *name, EntnodePath *path) | EntnodeData | [protected]
EntnodeFile(const char *name, EntnodePath *path, const char *vn=NULL, const char *ts=NULL, const char *option=NULL, const char *tag=NULL, const char *date=NULL, const char *conflict=NULL) | EntnodeFile |
GetConflict() const | EntnodeFile | [virtual]
GetExtension() const | EntnodeFile | [virtual]
GetFolderPath() const | EntnodeData | [inline]
GetFullPathName(UStr &resPath) const | EntnodeData | [inline]
GetName() const | EntnodeData | [inline]
GetRelativePath(const KoColumnContext *context, const bool forceCreate=false) const | EntnodeFile | [virtual]
GetState() const | EntnodeData | [inline]
GetType() const | EntnodeFile | [virtual]
IsIgnored() const | EntnodeData | [inline]
IsLocked() const | EntnodeData | [inline]
IsMissing() const | EntnodeData | [inline]
IsRemoved() const | EntnodeData | [inline]
IsResolved() const | EntnodeData | [inline]
IsUnknown() const | EntnodeData | [inline]
IsUnmodified() const | EntnodeData | [inline]
IsVisited() const | EntnodeData | [inline]
kConflict enum value | EntnodeFile |
kEncoding enum value | EntnodeFile |
kExt enum value | EntnodeFile |
kName enum value | EntnodeData |
kOption enum value | EntnodeFile |
kPath enum value | EntnodeData |
kState enum value | EntnodeData |
kTag enum value | EntnodeFile |
kTS enum value | EntnodeFile |
kVN enum value | EntnodeFile |
m_conflict | EntnodeFile | [protected]
m_date | EntnodeFile | [protected]
m_encoding | EntnodeFile | [protected]
m_ext | EntnodeFile | [protected]
m_ignored | EntnodeData | [protected]
m_locked | EntnodeData | [protected]
m_missing | EntnodeData | [protected]
m_option | EntnodeFile | [protected]
m_ref | EntnodeData | [protected]
m_relativePath | EntnodeFile | [mutable, protected]
m_removed | EntnodeData | [protected]
m_resolved | EntnodeData | [protected]
m_tag | EntnodeFile | [protected]
m_ts | EntnodeFile | [protected]
m_unknown | EntnodeData | [protected]
m_unmodified | EntnodeData | [protected]
m_visited | EntnodeData | [protected]
m_vn | EntnodeFile | [protected]
operator[](const int index) const | EntnodeFile | [virtual]
Ref() | EntnodeData | [inline]
SetEncoding(const char *encoding) | EntnodeFile | [inline]
SetIgnored(bool state) | EntnodeData | [inline]
SetLocked(bool state) | EntnodeData | [inline]
SetMissing(bool state) | EntnodeData | [inline]
SetRemoved(bool state) | EntnodeData | [inline]
SetResolved(bool state) | EntnodeData | [inline]
SetState(const char *state) | EntnodeData | [inline]
SetUnknown(bool state) | EntnodeData | [inline]
SetUnmodified(bool state) | EntnodeData | [inline]
SetVisited(bool state) | EntnodeData | [inline]
UnRef() | EntnodeData | [inline]
~EntnodeData() | EntnodeData | [protected, virtual]
~EntnodeFile() | EntnodeFile | [protected, virtual]

Generated on Sat Aug 7 22:52:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMacroSet Member List

This is the complete list of members for CMacroSet, including all inherited members.

Add(const char *fullname, const char *name) | CMacroSet | [inline]
CMacroSet() | CMacroSet | [inline]
entries | CMacroSet |
Flush(void) | CMacroSet | [inline]
invalFlag | CMacroSet |

Generated on Sat Aug 7 22:54:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CViewInfo Member List

This is the complete list of members for CViewInfo, including all inherited members.

view CViewInfo

Generated on Sat Aug 7 22:57:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppGlue.cpp Source File

common/AppGlue.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * AppGlue.cpp --- glue code to access CVS services
00023  */
00024
00025 #ifdef HAVE_CONFIG_H
00026 #include "config.h"
00027 #endif
00028
00029 #include "stdafx.h"
00030
00031 #include <stdio.h>
00032 #include <stdlib.h>
00033 #include <string.h>
00034 #include <stdarg.h>
00035
00036
00037 #ifdef TARGET_OS_MAC
00038 #       include <Carbon/Carbon.h>
00039 #   include <unistd.h>
00040 #   include <errno.h>
00041 //# include <console.h>
00042 #   include <ctype.h>
00043 #   include "mktemp.h"
00044 #   include "dll_process.h"
00045 #   include "AppGlue.mac.h"
00046 #   include "MacMisc.h"
00047 #endif /* TARGET_OS_MAC */
00048
00049 #ifdef qMacCvsPP
00050 #   include "MacCvsApp.h"
00051 #   include "LogWindow.h"
00052 #   include "MacBinEncoding.h"
00053 #   include "MacCvsAE.h"
00054 #endif /* qMacCvsPP */
00055
00056 #ifdef WIN32
00057 #   include "wincvs.h"
00058 #   include "PromptFiles.h"
00059 #   include "BrowseFileView.h"
00060 #   include "wincvs_winutil.h"
00061
00062 #   include <process.h>
00063 #   include <direct.h>
00064
00065 #   ifdef _DEBUG
00066 #   define new DEBUG_NEW
00067 #   undef THIS_FILE
00068     static char THIS_FILE[] = __FILE__;
00069 #   endif
00070 #endif /* WIN32 */
00071
00072 #include "cvsgui_process.h"
00073
00074 #if qUnix
00075 #   include "UCvsApp.h"
00076 #   include "UCvsFiles.h"
00077 #   include <ctype.h>
00078 #endif /* qUnix */
00079
00080 #ifdef HAVE_ERRNO_H
00081 #   include <errno.h>
00082 #endif
00083
00084 #ifdef HAVE_UNISTD_H
00085 #   include <unistd.h>
00086 #endif
00087
00088 #include "Authen.h"
00089 #include "CvsPrefs.h"
00090 #include "AppGlue.h"
00091 #include "AppConsole.h"
00092 #include "GetPassword.h"
00093 #include "AskYesNo.h"
00094 #include "CvsArgs.h"
00095 #include "FileTraversal.h"
00096 #include "CvsCommands.h"
00097 #include "cvsgui_i18n.h"
00098 #include "CvsAlert.h"
00099
00101 static int sLastExitCode;
00102
00104 CTmpFiles sTmpList;
00105
00106 #ifdef _MSC_VER
00107 #   define CVS_EXTERN_C extern "C"
00108 #else
00109 #   define CVS_EXTERN_C
00110 #endif
00111
00112 static CvsProcessCallbacks sCallTable = {
00113     glue_consoleout,
00114     glue_consoleerr,
00115     glue_getenv,
00116     glue_exit,
00117     glue_ondestroy
00118 };
00119
00124 CVS_EXTERN_C void glue_ondestroy(const CvsProcess* process)
00125 {
00126     if( process->appData )
00127     {
00128         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00129         delete pCvsProcessData;
00130     }
00131 }
00132
00138 CVS_EXTERN_C void glue_exit(int code, const CvsProcess* process)
00139 {
00140     if( !gCvsPrefs.IsTclFileRunning() )
00141         cvs_out(_i18n("\n***** CVS exited normally with code %d *****\n\n"), code);
00142
00143     sLastExitCode = code;
00144 }
00145
00153 CVS_EXTERN_C long glue_consoleout(const char* txt, long len, const CvsProcess* process)
00154 {
00155     if( process->appData )
00156     {
00157         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00158         if( pCvsProcessData->GetCvsConsole() )
00159         {
00160             return pCvsProcessData->GetCvsConsole()->cvs_out(txt, len);
00161         }
00162     }
00163
00164     cvs_outstr(txt, len);
00165
00166     return len;
00167 }
00168
00176 CVS_EXTERN_C long glue_consoleerr(const char* txt, long len, const CvsProcess* process)
00177 {
00178     if( process->appData )
00179     {
00180         CCvsProcessData* pCvsProcessData = (CCvsProcessData*)process->appData;
00181         if( pCvsProcessData->GetCvsConsole() )
00182         {
00183             return pCvsProcessData->GetCvsConsole()->cvs_err(txt, len);
00184         }
00185     }
00186
00187     cvs_errstr(txt, len);
00188
00189     return len;
00190 }
00191
00199 CVS_EXTERN_C long glue_consolein(const char* txt, long len, const CvsProcess* process)
00200 {
00201     return 0;
00202 }
00203
00204 #ifdef TARGET_OS_MAC
00205 #   define isGlobalEnvVariable(name) ( \
00206         strcmp(name, "CVS_PSERVER_PORT") == 0 || \
00207         strcmp(name, "CVS_RCMD_PORT") == 0 || \
00208         strcmp(name, "CVS_SERVER") == 0 || \
00209         strcmp(name, "CVS_RSH") == 0 || \
00210         strcmp(name, "CVS_RSA_IDENTITY") == 0 || \
00211         strcmp(name, "HOME") == 0 || \
00212         strcmp(name, "ISO8859") == 0 || \
00213         strcmp(name, "IC_ON_TXT") == 0 || \
00214         strcmp(name, "MAC_DEFAULT_RESOURCE_ENCODING") == 0 || \
00215         strcmp(name, "MAC_BINARY_TYPES_SINGLE") == 0 || \
00216         strcmp(name, "MAC_BINARY_TYPES_HQX") == 0 || \
00217         strcmp(name, "MAC_BINARY_TYPES_PLAIN") == 0 || \
00218         strcmp(name, "CVSUSEUNIXLF") == 0 || \
00219         strcmp(name, "DIRTY_MCP") == 0 \
00220         )
00221 #endif /* TARGET_OS_MAC */
00222
00230 CVS_EXTERN_C const char* glue_getenv(const char* name, const CvsProcess* process)
00231 {
00232     if( name == NULL )
00233         return NULL;
00234
00235 #ifdef WIN32
00236     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00237     if( !app )
00238     {
00239         ASSERT(FALSE);  // need an application object
00240         return NULL;
00241     }
00242
00243     if( ::GetCurrentThreadId() != app->m_nThreadID &&
00244         (strcmp(name, "CVS_GETPASS") == 0 || strcmp(name, "CVSLIB_YESNO") == 0 ||
00245         strcmp(name, "HOME") == 0) )
00246     {
00247         return app->GetEnvMainThread(name);
00248     }
00249 #endif /* WIN32 */
00250
00251 #ifdef TARGET_OS_MAC
00252     char* result;
00253     if( (result = ae_getenv(name)) != (char*)-1 )
00254     {
00255         if( result == 0L && isGlobalEnvVariable(name) )
00256         {
00257             // in this case only we let continue
00258             // to get the MacCVS settings. So the CWCVS
00259             // users (or any AppleEvent user) can set
00260             // these variables in MacCVS but still can overide
00261             // them using Apple Events.
00262         }
00263         else
00264             return result;
00265     }
00266 #endif /* TARGET_OS_MAC */
00267
00268 #if INTERNAL_AUTHEN
00269     // Give a chance for the new AuthenModel to react to the getenv callback
00270     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00271     std::vector<AuthenModel*>& allInstances = AuthenModel::GetAllInstances();
00272     std::vector<AuthenModel*>::const_iterator i;
00273
00274     if( curModel != 0L )
00275     {
00276         const char* res = curModel->OnGetEnv(name);
00277         if( res != 0L )
00278             return res;
00279     }
00280
00281     for(i = allInstances.begin(); i != allInstances.end(); ++i)
00282     {
00283         AuthenModel* model = *i;
00284
00285         if( model == curModel )
00286             continue;
00287
00288         const char* res = model->OnGetEnv(name);
00289         if( res != 0L )
00290             return res;
00291     }
00292
00293     if( strcmp(name, "USER") == 0
00294 #ifdef WIN32
00295         // I do that (and see the "STRATA_HACK" in
00296         // subr.c) because people get tired on Windows
00297         // to have to check their Windows login :
00298         // this is only for .rhosts authentication.
00299         || strcmp(name, "LOGNAME") == 0
00300 #endif /* WIN32 */
00301         )
00302     {
00303         static char user[64];
00304
00305         // extract from the cvsroot
00306         const char* ccvsroot = gCvsPrefs;
00307         ccvsroot = Authen::skiptoken(ccvsroot);
00308         char* login = strchr(ccvsroot, '@');
00309         if( login == NULL )
00310         {
00311             // for WIN32/gcvs this means the CVSROOT is local
00312 #ifdef TARGET_OS_MAC
00313             cvs_err(_i18n("MacCvs: Cannot extract login from cvsroot %s !\n"), ccvsroot);
00314 #endif /* TARGET_OS_MAC */
00315             return NULL;
00316         }
00317
00318         int length = login - ccvsroot;
00319         memcpy(user, ccvsroot, length * sizeof(char));
00320         user[length] = '\0';
00321
00322         return user;
00323     }
00324     else if( strcmp(name, "CVSROOT") == 0 )
00325     {
00326         static CStr root;
00327
00328         // extract from the cvsroot
00329         const char* ccvsroot = gCvsPrefs;
00330         ccvsroot = Authen::skiptoken(ccvsroot);
00331         root = gAuthen.token();
00332         root << ccvsroot;
00333
00334         return root;
00335     }
00336     else
00337 #endif /* INTERNAL_AUTHEN */
00338     if( strcmp(name, "CVSREAD") == 0 )
00339     {
00340         return gCvsPrefs.CheckoutRO() ? (char*)"1" : 0L;
00341     }
00342     else if( strncmp(name, "CVS_GETPASS", strlen("CVS_GETPASS")) == 0 )
00343     {
00344         UStr str(_i18n("Enter the password:"));
00345         char *tmp;
00346         if( (tmp = strchr(name, '=')) != 0L )
00347         {
00348             str = ++tmp;
00349         }
00350
00351         return CompatGetPassword(str);
00352     }
00353     else if( strcmp(name, "CVSLIB_YESNO") == 0 )
00354     {
00355 #ifdef qMacCvsPP
00356         // let user know we need some input
00357         CMacCvsApp::gApp->InteractWithUser();
00358         // make sure log window is front-most window, visible and not minimized, since we're referring to it in our [modal] alert
00359         LWindow* logwindow = CMacCvsApp::gApp->GetLogWindow();
00360         if ( logwindow )
00361         {
00362             if ( !logwindow->IsVisible() ) logwindow->Show();
00363             if ( IsWindowCollapsed(logwindow->GetMacWindow()) ) CollapseWindow(logwindow->GetMacWindow(), false);
00364             logwindow->Select();
00365         }
00366 #endif /* qMacCvsPP */
00367
00368         CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00369             _i18n("CVS is requiring you to answer yes or no."), _i18n("(See the console for details)"),
00370             BUTTONTITLE_YES, BUTTONTITLE_NO);
00371
00372         return cvsAlert.ShowAlert() == kCvsAlertOKButton ? "yes" : "no";
00373     }
00374 #if DIRTY_MCP_SUPPORT
00375     else if( strcmp(name, "DIRTY_MCP") == 0 )
00376     {
00377         return gCvsPrefs.DirtySupport() ? "yes" : "no";
00378     }
00379 #endif
00380 #ifdef WIN32
00381     else if( strcmp(name, "HOME") == 0 )
00382     {
00383         // prompt for home the first time
00384         if( gCvsPrefs.Home() == 0L )
00385         {
00386             char oldpath[_MAX_PATH];
00387             getcwd(oldpath, _MAX_PATH-1);
00388
00389             CStr home;
00390             if( !BrowserGetDirectory(_i18n("Select your home directory"), home) )
00391             {
00392                 chdir(oldpath);
00393                 return 0L;
00394             }
00395
00396             gCvsPrefs.SetHome(home);
00397             gCvsPrefs.save();
00398             chdir(oldpath);
00399         }
00400
00401         // Windows 98 doesn't like C:\/.cvspass
00402         static CStr home;
00403         home = gCvsPrefs.Home();
00404         home.rtrim (kPathDelimiter);
00405
00406         return home;
00407     }
00408     else if( strcmp(name, "CVSUSEUNIXLF") == 0 )
00409     {
00410         return gCvsPrefs.UnixLF() ? "1" : 0L;
00411     }
00412 #endif /*WIN32 */
00413 #if TARGET_RT_MAC_MACHO
00414     else if( strcmp(name, "CVS_MACLF") == 0 )
00415     {
00416         return gCvsPrefs.MacLF() ? "1" : 0L;
00417     }
00418 #endif
00419 #ifdef TARGET_OS_MAC
00420     else if( strcmp(name, "ISO8859") == 0 )
00421     {
00422         static char iso[6];
00423
00424         if( gCvsPrefs.IsoConvert() == ISO8559_none )
00425             return 0L;
00426
00427         sprintf(iso, "%d", (int)gCvsPrefs.IsoConvert());
00428         return iso;
00429     }
00430     else if( strcmp(name, "IC_ON_TXT") == 0 )
00431     {
00432         return gCvsPrefs.ICTextOption() ? "1" : 0L;
00433     }
00434     else if( strcmp(name, "MAC_ENCODE_ONLY_BINARY_FILES") == 0 )
00435     {
00436         return gCvsPrefs.MacBinEncodeBinariesOnly() ? "1" : 0L;
00437     }
00438     else if( strcmp(name, "MAC_DEFAULT_RESOURCE_ENCODING") == 0 )
00439     {
00440         switch(gCvsPrefs.MacBinEncoding())
00441         {
00442             case MAC_HQX:
00443                 return (char*)"HQX";
00444                 break;
00445             case MAC_APPSINGLE:
00446                 return (char*)"AppleSingle";
00447                 break;
00448             case MAC_PLAIN_BINARY:
00449                 return (char*)"PlainBinary";
00450                 break;
00451         }
00452         return 0L;
00453     }
00454     else if( strcmp(name, "MAC_BINARY_TYPES_SINGLE") == 0 )
00455     {
00456         return (char*)MacBinMaps::GetEnvTypes(MAC_APPSINGLE);
00457     }
00458     else if( strcmp(name, "MAC_BINARY_TYPES_HQX") == 0 )
00459     {
00460         return (char*)MacBinMaps::GetEnvTypes(MAC_HQX);
00461     }
00462     else if( strcmp(name, "MAC_BINARY_TYPES_PLAIN") == 0 )
00463     {
00464         return (char*)MacBinMaps::GetEnvPlainTypes();
00465     }
00466 #endif /* TARGET_OS_MAC */
00467     else
00468     {
00469         char* res;
00470         res = getenv(name);
00471         return res;
00472     }
00473
00474     return NULL;
00475 }
00476
00487 int launchCVS(int test, const char* path, int argc, char* const* argv, CCvsConsole* console /*= 0L*/, const char* cvsfile /*= 0L*/ )
00488 {
00489 #if INTERNAL_AUTHEN
00490     CAuthenSetUp setupEnv;
00491 #endif /* INTERNAL_AUTHEN */
00492     CvsProcessStartupInfo startupInfo;
00493
00494     startupInfo.hasTty = ( !test ? gCvsPrefs.CvsConsole() : true ); // test cvs has always tty (prevent printing cvs version info on console
00495     startupInfo.currentDirectory = path;
00496
00497 #ifdef WIN32
00498     WORD wShowWindow = startupInfo.showWindowState;
00499     switch( gCvsPrefs.ShowCvs() )
00500     {
00501     case SHOWCVS_HIDE:
00502         wShowWindow = SW_HIDE;
00503         break;
00504     case SHOWCVS_SHOWNORMAL:
00505         wShowWindow = SW_SHOWNORMAL;
00506         break;
00507     case SHOWCVS_SHOWNOACTIVATE:
00508         wShowWindow = SW_SHOWNOACTIVATE;
00509         break;
00510     case SHOWCVS_SHOWMINNOACTIVE:
00511         wShowWindow = SW_SHOWMINNOACTIVE;
00512         break;
00513     default:
00514         break;
00515     }
00516
00517     startupInfo.showWindowState = wShowWindow;
00518 #endif
00519
00520     CCvsProcessData* pCvsProcessData = NULL;
00521     if( console )
00522     {
00523         pCvsProcessData = new CCvsProcessData;
00524         if( pCvsProcessData )
00525         {
00526             pCvsProcessData->SetCvsConsole(console);
00527         }
00528     }
00529
00530     CStr cvscmd;
00531
00532 #ifdef WIN32
00533     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00534 #elif qUnix
00535     UCvsApp* app = UCvsApp::gApp;
00536 #elif TARGET_RT_MAC_MACHO
00537     CMacCvsApp* app = CMacCvsApp::gApp;
00538 #endif
00539
00540     if( app->IsCvsRunning() && cvs_process_is_active(app->GetCvsProcess()) )
00541     {
00542         cvs_err(_i18n("Error: CVS is already running !\n"));
00543         return -1;
00544     }
00545
00546 #if qUnix || TARGET_RT_MAC_MACHO
00547     if(path != 0L && chdir(path) != 0) {
00548         cvs_err(("Error: cannot chdir to %s (error %d)!\n"), path, errno);
00549     }
00550 #endif // qUnix
00551
00552     app->SetCvsStopping(false);
00553
00554     if( !test )
00555     {
00556         gCvsPrefs.WhichCvs(cvscmd, gCvsPrefs.UseAltCvs());
00557         sLastExitCode = 0;
00558     }
00559     else
00560     {
00561         cvscmd = cvsfile;
00562         sLastExitCode = errNoCvsguiProtocol;
00563     }
00564
00565 #if qUnix || TARGET_RT_MAC_MACHO
00566     struct stat sb;
00567
00568     if( stat(cvscmd, &sb) == -1 ||
00569 #if qUnix || TARGET_RT_MAC_MACHO
00570          S_ISLNK(sb.st_mode) ||
00571 #endif
00572          !(S_ISREG(sb.st_mode)) )
00573     {
00574         cvs_err(_i18n("Unable to find the cvs process in : (error %d)\n"), errno);
00575         cvs_err("1) %s\n", (const char*)cvscmd);
00576
00577         return errInternal;
00578     }
00579 #endif
00580
00581     CvsProcess* proc = cvs_process_run(cvscmd.c_str(), argc - 1, (char**)argv + 1, &sCallTable, &startupInfo, (void*)pCvsProcessData);
00582     if( proc == 0L )
00583     {
00584         CStr errorDetails;
00585
00586         if( startupInfo.errorInfo == badArguments )
00587         {
00588             errorDetails = "Invalid call arguments";
00589         }
00590         else if( startupInfo.errorInfo == noMemory )
00591         {
00592             errorDetails = "No memory to create CVS process";
00593         }
00594         else if( startupInfo.errorInfo == systemError )
00595         {
00596 #ifndef WIN32
00597             errorDetails = strerror(startupInfo.lastErrnoValue);
00598             errorDetails += " (error ";
00599             errorDetails += startupInfo.lastErrnoValue;
00600             errorDetails += ")";
00601 #else
00602             CStr strMsg;
00603             LPVOID lpvBuffer = NULL;
00604
00605             FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
00606                 NULL,
00607                 startupInfo.lastErrorValue,
00608                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
00609                 (LPTSTR)&lpvBuffer,
00610                 0,
00611                 NULL);
00612
00613             strMsg += (char*)lpvBuffer;
00614
00615             // Trim the padding newline characters
00616             strMsg.rtrim( "\r\n");
00617
00618             if( lpvBuffer )
00619             {
00620                 LocalFree(lpvBuffer);
00621             }
00622
00623             errorDetails = strMsg;
00624 #endif
00625         }
00626         else
00627         {
00628             errorDetails = "Unknown error";
00629         }
00630
00631         cvs_err(_i18n("Unable to initialize the CVS process: %s\n"), errorDetails.c_str());
00632         cvs_err(_i18n("The CVS used is : %s\n"), cvscmd.c_str());
00633     }
00634     else
00635     {
00636         app->SetCvsRunning(true);
00637         app->SetCvsProcess(proc);
00638 #if defined(WIN32) || defined(qUnix)
00639         app->PeekPumpAndIdle(true);
00640 #endif
00641 #if !defined(qUnix)  &&  !defined(TARGET_RT_MAC_MACHO)
00642         if( console != 0L )
00643 #endif
00644         {
00645             time_t start = time(NULL);
00646
00647             while( TRUE )
00648             {
00649 #if defined(WIN32) || defined(qUnix)
00650                 app->PeekPumpAndIdle(false);
00651 #endif
00652
00653 #if TARGET_RT_MAC_MACHO
00654                 glue_eventdispatcher(0L);
00655 #endif
00656                 cvs_process_give_time();
00657
00658                 if( !cvs_process_is_active(proc) )
00659                     break;
00660
00661                 if ( test && ( (time(NULL) - start) > 10 ) )
00662                 {
00663                     cvs_err(_i18n("testing cvs timed out\n"));
00664                     cvs_process_stop(proc);
00665                 }
00666             } // end while
00667 #if TARGET_RT_MAC_MACHO
00668             cvs_process_destroy(proc);
00669             app->SetCvsRunning(false);
00670             app->SetCvsProcess(NULL);
00671 #endif
00672         }
00673     }
00674
00675     return sLastExitCode;
00676 }
00677
00681 void stopCVS()
00682 {
00683 #ifdef WIN32
00684
00685     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00686     app->SetCvsStopping(true);
00687
00688     ::PostMessage(AfxGetMainWnd()->GetSafeHwnd(),
00689         WM_SETMESSAGESTRING,
00690         0,
00691         (LPARAM)_i18n("***** Stopping CVS on user request !!! *****"));
00692
00693     // Commented out for now to avoid the deadlock
00694     //cvs_out(_i18n("***** Stopping CVS on user request !!! *****\n\n"));
00695
00696     cvs_process_stop(app->GetCvsProcess());
00697 #endif
00698 }
00699
00707 int testCVS(const char* cvsfile, int argc, char* const* argv)
00708 {
00709     return launchCVS(TRUE, NULL, argc, argv, NULL, cvsfile);
00710 }
00719 int launchCVS(const char* path, int argc, char* const* argv, CCvsConsole* console /*= 0L*/)
00720 {
00721     return launchCVS(FALSE, path, argc, argv, console, NULL);
00722 }
00723
00733 FILE* launchCVS(const char* dir, const CvsArgs& args, CStr& tmpFile,
00734                 const char* prefix /*= 0L*/, const char* extension /*= 0L*/)
00735 {
00736     if( !MakeTmpFile(tmpFile, prefix, extension) )
00737         return 0L;
00738
00739     FILE* res = fopen(tmpFile, gCvsPrefs.UnixLF() ? "wb+" : "w+");
00740     if( res == 0L )
00741     {
00742         cvs_err(_i18n("Impossible to open the temp file '%s' for write (error %d)"),
00743             (const char*)tmpFile, errno);
00744
00745         return 0L;
00746     }
00747
00748     CStreamConsole console(res);
00749
00750     int ret = launchCVS(dir, args.Argc(), args.Argv(), &console);
00751     fseek(res, 0L, SEEK_SET);
00752
00753     // if CVS breaks, we should recognize it (e.g. ext. diff should only start if everything goes fine)
00754     if( ret != 0 )
00755     {
00756         fclose(res);
00757         res = NULL;
00758     }
00759
00760     return res;
00761 }
00762
00772 const char* launchCVS(const char* dir, const CvsArgs& args,
00773                       const char* prefix /*= 0L*/, const char* extension /*= 0L*/)
00774 {
00775     CStr filename;
00776     FILE* file = launchCVS(dir, args, filename, prefix, extension);
00777     if( file == 0L )
00778         return 0L;
00779
00780     fclose(file);
00781
00782     return sTmpList.push_back(filename);
00783 }
00784
00785 #ifdef WIN32
00786 void WaitForCvs(void)
00787 {
00788     // pump messages manually
00789     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00790
00791     while( TRUE )
00792     {
00793         if( app->GetCvsProcess() == 0L )
00794             return;
00795
00796         if( !cvs_process_is_active(app->GetCvsProcess()) )
00797             return;
00798
00799         Sleep(100);
00800     }
00801 }
00802 #endif
00803
00804 #if TARGET_RT_MAC_MACHO
00805 void WaitForCvs(void)
00806 {
00807     if ( cvs_process_is_active(CMacCvsApp::gApp->GetCvsProcess()) )
00808     {
00809     while( cvs_process_is_active(CMacCvsApp::gApp->GetCvsProcess()) )
00810     {
00811         UInt32 ticker = ::TickCount();
00812
00813         while( cvs_process_give_time() )
00814         {
00815             if( (::TickCount() - ticker) >= 60 )
00816                 break;
00817         }
00818
00819         glue_eventdispatcher(0L);
00820     }
00821
00822     CMacCvsApp::gApp->SetCvsRunning(false);
00823   }
00824 }
00825 #endif
00826
00828 // CCvsProcessData
00829
00830 CCvsProcessData::CCvsProcessData()
00831     : m_pCvsConsole(NULL)
00832 {
00833 }
00834
00839 void CCvsProcessData::SetCvsConsole(CCvsConsole* pCvsConsole)
00840 {
00841     m_pCvsConsole = pCvsConsole;
00842 }
00843
00849 CCvsConsole* CCvsProcessData::GetCvsConsole() const
00850 {
00851     return m_pCvsConsole;
00852 }
00853
00858 CCvsConsole* CCvsProcessData::GetCvsConsole()
00859 {
00860     return m_pCvsConsole;
00861 }
00862
00864 //  CCvsStreamConsole
00865
00866 CCvsStreamConsole::CCvsStreamConsole(FILE* fileOut /*= 0L*/, bool autoClose /*= true*/)
00867     : m_autoClose(autoClose), m_modeSet(false), m_fileOut(fileOut)
00868 {
00869 }
00870
00871 CCvsStreamConsole::~CCvsStreamConsole()
00872 {
00873     if( m_autoClose && m_fileOut )
00874     {
00875         fclose(m_fileOut);
00876     }
00877 }
00878
00884 void CCvsStreamConsole::SetMode(bool binary)
00885 {
00886 #ifdef WIN32
00887     if( binary )
00888     {
00889         setmode(fileno(m_fileOut), _O_BINARY);
00890     }
00891     else
00892     {
00893         setmode(fileno(m_fileOut), gCvsPrefs.UnixLF() ? _O_BINARY : _O_TEXT);
00894     }
00895 #endif
00896
00897     m_modeSet = true;
00898 }
00899
00905 bool CCvsStreamConsole::IsModeSet() const
00906 {
00907     return m_modeSet;
00908 }
00909
00916 bool CCvsStreamConsole::Open(const char* fileName)
00917 {
00918     m_fileOut = fopen(fileName, gCvsPrefs.UnixLF() ? "wb+" : "w+");
00919
00920     return 0L != m_fileOut;
00921 }
00922
00923 long CCvsStreamConsole::cvs_out(const char* txt, long len)
00924 {
00925     if( !IsModeSet() )
00926     {
00927         SetMode(len == 0);
00928     }
00929
00930     fwrite(txt, sizeof(char), len, m_fileOut);
00931     return len;
00932 }
00933
00935 long CCvsStreamConsole::cvs_err(const char* txt, long len)
00936 {
00937     cvs_errstr(txt, len);
00938     return len;
00939 }
00940
00941
00943 // CStreamConsole
00944
00945 CStreamConsole::CStreamConsole(FILE* fileOut)
00946     : CCvsStreamConsole(fileOut, false)
00947 {
00948 }
00949
00950 #if INTERNAL_AUTHEN
00951
00952 // CAuthenSetUp
00953
00954 CAuthenSetUp::CAuthenSetUp()
00955 {
00956     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00957     if( curModel != 0L )
00958         curModel->OnSetupEnv();
00959 }
00960
00961 CAuthenSetUp::~CAuthenSetUp()
00962 {
00963     AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00964     if( curModel != 0L )
00965         curModel->OnRestoreEnv();
00966 }
00967 #endif /* INTERNAL_AUTHEN */
00968
00970 // CTmpFiles
00971
00972 CTmpFiles::CTmpFiles()
00973 {
00974 }
00975
00976 CTmpFiles::~CTmpFiles()
00977 {
00978     std::vector<CStr>::const_iterator i;
00979     for(i = m_allfiles.begin(); i != m_allfiles.end(); ++i)
00980     {
00981         const char* file = *i;
00982
00983 #ifdef WIN32
00984         wnt_unlink((char*)file);
00985 #else
00986         unlink((char*)file);
00987 #endif
00988     }
00989 }
00990
00991 inline const char* CTmpFiles::push_back(const char* file)
00992 {
00993     m_allfiles.push_back(file);
00994
00995     return m_allfiles[m_allfiles.size() - 1];
00996 }
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ExploreBar.cpp Source File

WinCvs/ExploreBar.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // ExploreBar.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include "MainFrm.h"
00027 #include "ExploreBar.h"
00028 #include "BrowseFileView.h"
00029 #include "FileTraversal.h"
00030 #include "CvsCommands.h"
00031 #include "CvsPrefs.h"
00032 #include "BrowseViewHandlers.h"
00033
00034 #ifdef _DEBUG
00035 #define new DEBUG_NEW
00036 #undef THIS_FILE
00037 static char THIS_FILE[] = __FILE__;
00038 #endif
00039
00040 IMPLEMENT_DYNAMIC(CMyShellTree, CCJShellTree)
00041
00042 BEGIN_MESSAGE_MAP(CMyShellTree, CCJShellTree)
00043     //{{AFX_MSG_MAP(CMyShellTree)
00044     ON_NOTIFY_REFLECT(NM_RCLICK, OnRclick)
00045     ON_NOTIFY_REFLECT(TVN_DELETEITEM, OnDeleteitem)
00046     ON_NOTIFY_REFLECT(TVN_SELCHANGED, OnSelchanged)
00047     ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, OnItemexpanding)
00048     //}}AFX_MSG_MAP
00049 END_MESSAGE_MAP()
00050
00051 bool CMyShellTree::DisableCommon()
00052 {
00053     CWincvsApp *app = (CWincvsApp*)AfxGetApp();
00054     return app->IsCvsRunning();
00055 }
00056
00057 void CMyShellTree::OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult)
00058 {
00059     if(DisableCommon())
00060     {
00061         *pResult = 1;
00062         return;
00063     }
00064
00065     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00066     CCJShellTree::OnItemexpanding(pNMHDR,pResult);
00067     CCJShellTree::Invalidate();
00068     *pResult = 0;
00069 }
00070
00071 void CMyShellTree::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
00072 {
00073     if(DisableCommon())
00074     {
00075         *pResult = 1;
00076         return;
00077     }
00078
00079     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00080
00081     CString szPath;
00082     CCJShellTree::OnSelchanged(pNMHDR,pResult);
00083
00084     if(CCJShellTree::GetSelectedFolderPath(szPath))
00085     {
00086         CWincvsApp* app = (CWincvsApp *)AfxGetApp();
00087         CBrowseFileView *view = app->GetFileView();
00088         if(view != 0L)
00089             view->ResetView(szPath);
00090     }
00091
00092     *pResult = 0;
00093 }
00094
00095 void CMyShellTree::OnRclick(NMHDR* pNMHDR, LRESULT* pResult)
00096 {
00097     if(DisableCommon())
00098     {
00099         *pResult = 1;
00100         return;
00101     }
00102
00103     // TODO: Add your control notification handler code here
00104     CCJShellTree::OnRclick(pNMHDR,pResult);
00105     *pResult = 0;
00106 }
00107
00108 void CMyShellTree::OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult)
00109 {
00110     if(DisableCommon())
00111     {
00112         *pResult = 1;
00113         return;
00114     }
00115
00116     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00117     // TODO: Add your control notification handler code here
00118     CCJShellTree::OnDeleteitem(pNMHDR,pResult);
00119     *pResult = 0;
00120 }
00121
00123 // CExploreBar
00124
00125 IMPLEMENT_DYNCREATE(CExploreBar, CView)
00126
00127 CExploreBar::CExploreBar()
00128 {
00129 }
00130
00131 CExploreBar::~CExploreBar()
00132 {
00133 }
00134
00135
00136 BEGIN_MESSAGE_MAP(CExploreBar, CView)
00137     //{{AFX_MSG_MAP(CExploreBar)
00138     ON_WM_WINDOWPOSCHANGED()
00139     ON_COMMAND(ID_VIEW_CHECKOUT, OnViewCheckout)
00140     ON_UPDATE_COMMAND_UI(ID_VIEW_CHECKOUT, OnUpdateViewCheckout)
00141     ON_COMMAND(ID_VIEW_IMPORT, OnViewImport)
00142     ON_UPDATE_COMMAND_UI(ID_VIEW_IMPORT, OnUpdateViewImport)
00143     //}}AFX_MSG_MAP
00144 END_MESSAGE_MAP()
00145
00147 // CExploreBar drawing
00148
00149 void CExploreBar::OnDraw(CDC* pDC)
00150 {
00151     CDocument* pDoc = GetDocument();
00152 }
00153
00155 // CExploreBar diagnostics
00156
00157 #ifdef _DEBUG
00158 void CExploreBar::AssertValid() const
00159 {
00160     CView::AssertValid();
00161 }
00162
00163 void CExploreBar::Dump(CDumpContext& dc) const
00164 {
00165     CView::Dump(dc);
00166 }
00167 #endif //_DEBUG
00168
00170 // CExploreBar message handlers
00171
00172 BOOL CExploreBar::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
00173 {
00174     BOOL res = CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
00175
00176     if(res)
00177     {
00178         if (!m_TreeCtrl.Create(
00179             WS_VISIBLE|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS,
00180             CRect(0,0,0,0), this, IDC_BAR_TREE))
00181         {
00182             TRACE0("Unable to create caption button.\n");
00183             return FALSE;
00184         }
00185     }
00186
00187     //m_TreeCtrl.EnableImages();
00188     //m_TreeCtrl.PopulateTree();
00189
00190     //SetChild(&m_TreeCtrl);
00191
00192     return res;
00193 }
00194
00195 void CExploreBar::OnWindowPosChanged(WINDOWPOS FAR* wp)
00196 {
00197     CView::OnWindowPosChanged(wp);
00198
00199     CRect r;
00200     GetClientRect(&r);
00201     m_TreeCtrl.SetWindowPos(NULL, r.left, r.top, r.Width(), r.Height(), SWP_NOZORDER);
00202 }
00203
00204 void CExploreBar::OnUpdateCmd(CCmdUI* pCmdUI)
00205 {
00206     CWincvsApp* app = (CWincvsApp *)AfxGetApp();
00207     if(DisableCommon())
00208     {
00209         pCmdUI->Enable(FALSE);
00210         return;
00211     }
00212     CString folderPath;
00213     if(!m_TreeCtrl.GetSelectedFolderPath(folderPath) || folderPath.IsEmpty())
00214     {
00215         pCmdUI->Enable(FALSE);
00216         return;
00217     }
00218
00219     pCmdUI->Enable(TRUE);
00220 }
00221
00222 bool CExploreBar::DisableCommon()
00223 {
00224     CWincvsApp *app = (CWincvsApp *)AfxGetApp();
00225     return app->IsCvsRunning();
00226 }
00227
00228 void CExploreBar::OnViewCheckout()
00229 {
00230     CString folderPath;
00231     if( m_TreeCtrl.GetSelectedFolderPath(folderPath) && !folderPath.IsEmpty() )
00232     {
00233         KoCheckoutHandler handler;
00234         handler.OnFolder(folderPath);
00235     }
00236 }
00237
00238 void CExploreBar::OnUpdateViewCheckout(CCmdUI* pCmdUI)
00239 {
00240     OnUpdateCmd(pCmdUI);
00241     pCmdUI->SetText("Chec&kout module to selection...");
00242 }
00243
00244 void CExploreBar::OnViewImport()
00245 {
00246     CString folderPath;
00247     if( m_TreeCtrl.GetSelectedFolderPath(folderPath) && !folderPath.IsEmpty() )
00248     {
00249         KoImportHandler handler;
00250         handler.OnFolder(folderPath);
00251     }
00252 }
00253
00254 void CExploreBar::OnUpdateViewImport(CCmdUI* pCmdUI)
00255 {
00256     OnUpdateCmd(pCmdUI);
00257     pCmdUI->SetText("&Import module from selection...");
00258 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/StatusDlg.h Source File

common/StatusDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- March 2002
00019  */
00020
00021 /*
00022  * StatusDlg.cpp : the cvs status dialog
00023  */
00024
00025 #if !defined(AFX_STATUSDLG_H__5EEE9989_6C76_4FD3_83FC_2D90DEA0CE21__INCLUDED_)
00026 #define AFX_STATUSDLG_H__5EEE9989_6C76_4FD3_83FC_2D90DEA0CE21__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #include "CvsPrefs.h"
00033
00034 #ifdef WIN32
00035 #   include "HHelpSupport.h"
00036 #endif
00037
00038 class MultiFiles;
00039
00040 bool CompatGetStatus(const MultiFiles* mf, bool& noRecurs, STATUSOUTPUT_TYPE& outputType);
00041
00042 #ifdef WIN32
00043
00045 // CStatus_MAIN dialog
00046
00047 class CStatus_MAIN : public CHHelpPropertyPage
00048 {
00049     DECLARE_DYNAMIC(CStatus_MAIN)
00050
00051 // Construction
00052 public:
00053     CStatus_MAIN(bool noRecurs, STATUSOUTPUT_TYPE outputType);
00054     ~CStatus_MAIN();
00055
00056 // Dialog Data
00057     //{{AFX_DATA(CStatus_MAIN)
00058     enum { IDD = IDD_STATUS_MAIN };
00059     BOOL    m_noRecurs;
00060     int     m_outputType;
00061     //}}AFX_DATA
00062
00063
00064 // Overrides
00065     // ClassWizard generate virtual function overrides
00066     //{{AFX_VIRTUAL(CStatus_MAIN)
00067     protected:
00068     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00069     //}}AFX_VIRTUAL
00070
00071 // Implementation
00072 protected:
00073     // Generated message map functions
00074     //{{AFX_MSG(CStatus_MAIN)
00075     //}}AFX_MSG
00076     DECLARE_MESSAGE_MAP()
00077 private:
00078     // Methods
00079     virtual void InitHelpID();
00080 };
00081
00082 //{{AFX_INSERT_LOCATION}}
00083 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00084
00085 #endif // !defined(AFX_STATUSDLG_H__5EEE9989_6C76_4FD3_83FC_2D90DEA0CE21__INCLUDED_)
00086
00087 #endif /* WIN32 */
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MakeSurePathExists.cpp Source File

common/MakeSurePathExists.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * MakeSurePathExists.cpp --- check if the directory exists and prompt to create one if it doesn't
00019  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- January 27, 2001
00020  * Modified :
00021  */
00022
00023 #include "stdafx.h"
00024
00025 #ifdef WIN32
00026 #   include "wincvs.h"
00027 #   include <sys\stat.h>
00028 #   include <direct.h>
00029 #   include <errno.h>
00030 #endif /* WIN32 */
00031
00032 #if qUnix
00033 #endif
00034
00035 #ifdef qMacCvsPP
00036 #endif /* qMacCvsPP */
00037
00038 #include "MakeSurePathExists.h"
00039 #include "FileTraversal.h"
00040 #include "CvsAlert.h"
00041
00048 bool CompatMakeSurePathExists(const char* path, bool promptForCreation /*= true*/)
00049 {
00050     bool valid = false;
00051
00052 #ifdef WIN32
00053     TCHAR fn[MAX_PATH];
00054     if( _tfullpath(fn, path, MAX_PATH) )
00055     {
00056         struct _tstat dirstat;
00057         if( _tstat(fn, &dirstat) == 0 )
00058         {
00059             if( dirstat.st_mode & _S_IFDIR )
00060             {
00061                 valid = true;
00062             }
00063         }
00064         else
00065         {
00066             // Not found, ask for permission to create
00067             if( promptForCreation )
00068             {
00069                 CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00070                     "Do you want to create folder?", "Folder " + CString(path) + " not found.",
00071                     BUTTONTITLE_YES, BUTTONTITLE_NO);
00072
00073                 if( cvsAlert.ShowAlert() == kCvsAlertOKButton )
00074                 {
00075                     valid = CreateFolder(fn);
00076                 }
00077             }
00078         }
00079     }
00080 #endif
00081
00082     return valid;
00083 }
00084
00090 bool CreateFolder(const char* fn)
00091 {
00092 #ifdef WIN32
00093     // Remove possible trailing separator
00094     TCHAR folder[MAX_PATH];
00095     _tcscpy(folder, fn);
00096     int len = _tcslen(folder);
00097     if( len > 1 )
00098     {
00099         switch( folder[len - 1] )
00100         {
00101         case _T('\\'):
00102         case _T('/'):
00103             folder[len - 1] = 0;
00104             break;
00105         }
00106     }
00107
00108     // Try to create
00109     if( _tmkdir(folder) == 0 )
00110     {
00111         return true;
00112     }
00113
00114     // If path does not exist, create parent folder and then try again
00115     if( errno == ENOENT )
00116     {
00117         TCHAR drive[_MAX_DRIVE];
00118         TCHAR dir[_MAX_PATH];
00119         TCHAR fname[_MAX_PATH];
00120
00121         _tsplitpath(folder, drive, dir, fname, NULL);
00122         if( !*fname )
00123         {
00124             return false;
00125         }
00126
00127         _tmakepath(fname, drive, dir, NULL, NULL);
00128         if( !CreateFolder(fname) )
00129         {
00130             return false;
00131         }
00132
00133         return _tmkdir(folder) == 0;
00134     }
00135 #endif
00136
00137     // Not possible to create
00138     return false;
00139 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

_frameRec Member List

This is the complete list of members for _frameRec, including all inherited members.

entry | _frameRec
next | _frameRec

Generated on Sat Aug 7 22:48:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoMoveToTrashHandler Member List

This is the complete list of members for KoMoveToTrashHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoMoveToTrashHandler() | KoMoveToTrashHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoMoveToTrashHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoMoveToTrashHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPseudoButton Member List

This is the complete list of members for CPseudoButton, including all inherited members.

CCJFlatButton() | CCJFlatButton |
CPseudoButton() | CPseudoButton |
DisableFlatLook(BOOL bDisable=FALSE) | CCJFlatButton | [virtual]
DrawButtonBitmap(CDC *pDC, UINT nState, CRect &rcItem) | CPseudoButton | [protected, virtual]
DrawButtonIcon(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawButtonText(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CPseudoButton | [virtual]
loadIcon(CString &icon, int rsrcid) | CPseudoButton | [static]
LoadXPM(int rsrcid) | CPseudoButton | [virtual]
m_bAltColor | CCJFlatButton | [protected]
m_bFlatLook | CCJFlatButton | [protected]
m_bitmap | CPseudoButton | [protected]
m_bLBtnDown | CCJFlatButton | [protected]
m_bMouseOver | CCJFlatButton | [protected]
m_bPainted | CCJFlatButton | [protected]
m_clrAltHilite | CCJFlatButton | [protected]
m_clrAltNormal | CCJFlatButton | [protected]
m_clrAltShadow | CCJFlatButton | [protected]
m_clrAltTextNm | CCJFlatButton | [protected]
m_clrDkShad | CCJFlatButton | [protected]
m_clrHilite | CCJFlatButton | [protected]
m_clrNormal | CCJFlatButton | [protected]
m_clrShadow | CCJFlatButton | [protected]
m_clrTextGy | CCJFlatButton | [protected]
m_clrTextNm | CCJFlatButton | [protected]
m_disbitmap | CPseudoButton | [protected]
m_Font | CCJFlatButton | [protected]
m_hCursor | CCJFlatButton | [protected]
m_hPushed | CCJFlatButton | [protected]
m_pFont | CCJFlatButton | [protected]
m_sizeIcon | CCJFlatButton | [protected]
OnEraseBkgnd(CDC *pDC) | CCJFlatButton | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnPaint() | CCJFlatButton | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJFlatButton | [protected]
OnSysColorChange() | CCJFlatButton | [protected]
OnTimer(UINT nIDEvent) | CCJFlatButton | [protected]
SetAlternateColors(COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm) | CCJFlatButton | [virtual]
SetButtonFont(CFont *pFont) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, CSize size) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, HICON hPushed, CSize size) | CCJFlatButton | [virtual]
UpdateFont() | CCJFlatButton | [protected, virtual]
~CCJFlatButton() | CCJFlatButton | [virtual]
~CPseudoButton() | CPseudoButton | [virtual]

Generated on Sat Aug 7 22:55:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGfxGroupEdit Member List

This is the complete list of members for CGfxGroupEdit, including all inherited members.

bEscapeKey | CGfxGroupEdit |
bNoDown | CGfxGroupEdit |
CGfxGroupEdit() | CGfxGroupEdit |
iIndex | CGfxGroupEdit |
msgSend | CGfxGroupEdit |
OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) | CGfxGroupEdit | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CGfxGroupEdit | [protected]
OnKillFocus(CWnd *pNewWnd) | CGfxGroupEdit | [protected]
PostNcDestroy() | CGfxGroupEdit | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CGfxGroupEdit | [virtual]
text | CGfxGroupEdit |
~CGfxGroupEdit() | CGfxGroupEdit | [virtual]

Generated on Sat Aug 7 22:52:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/utoolbar.h Source File

rf/utoolbar.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #ifndef UTOOLBAR_H
00022 #define UTOOLBAR_H
00023
00024 #include "uwidget.h"
00025
00026 #ifdef __cplusplus
00027
00028 class WININFO;
00029
00030 #ifdef __AFX_H__
00031 class CDynToolBar : public CCJToolBar
00032 {
00033     DECLARE_DYNAMIC(CDynToolBar)
00034
00035 // Construction
00036 public:
00037     CDynToolBar();
00038
00039 // Attributes
00040 public:
00041 protected:
00042
00043 // Operations
00044 public:
00045
00046 // Overrides
00047     // ClassWizard generated virtual function overrides
00048     //{{AFX_VIRTUAL(CDynToolBar)
00049     //}}AFX_VIRTUAL
00050
00051 // Implementation
00052 public:
00053     virtual ~CDynToolBar();
00054
00055     HBITMAP m_bitmap;
00056     bool m_tracking;
00057
00058     inline int GetPseudoID(void) const { return m_widid; }
00059     inline void SetPseudoID(int id) { m_widid = id; }
00060     inline WININFO *GetWinInfo(void) const { return m_info; }
00061     inline void SetWinInfo(WININFO *info) { m_info = info; }
00062     inline CFrameWnd *GetMainFrame() { return GetRoutingFrame(); }
00063
00064 // Generated message map functions
00065 protected:
00066     WININFO *m_info;
00067     int m_widid;
00068
00069     virtual void OnDropDownButton(const NMTOOLBAR& nmtb, UINT nID, CRect rc);
00070
00071     //{{AFX_MSG(CDynToolBar)
00072     afx_msg void OnDestroy(void);
00073     //}}AFX_MSG
00074     DECLARE_MESSAGE_MAP()
00075
00076 };
00077 #else /* ! __AFX_H__ */
00078 class CDynToolBar;
00079 #endif /* !__AFX_H__ */
00080
00081 class UToolbar : public UWidget
00082 {
00083     UDECLARE_DYNAMIC(UToolbar)
00084 public:
00085     UToolbar(int widid);
00086     virtual ~UToolbar();
00087
00088     virtual int UDispatchMessage(int/*UEventType*/ evt, int arg1, void *arg2, UDispatchInfo & dispatchInfo);
00089
00090 protected:
00091     ev_msg void OnDestroy();
00092     ev_msg void OnTbInit(UTB_INIT *info);
00093     ev_msg void OnTbEnd(void);
00094     ev_msg void OnTbButton(UTB_BUTTON *info);
00095     ev_msg void OnTbDropDown(UTB_DROPDOWN *info);
00096     ev_msg void OnTbCheckBtn(UTB_BUTTON *info);
00097     ev_msg void OnTbSeparator(void);
00098     ev_msg void OnSetTooltip(int cmd, UCmdUI *pCmdUI);
00099     ev_msg int OnCommands(int cmd);
00100     ev_msg void OnUpdateUI(void);
00101
00102     WININFO *m_winInfo;
00103
00104 #ifdef WIN32
00105     CDynToolBar *m_wndToolBar;
00106
00107     void RebuildBar(bool onlyBitmap = true);
00108 #endif
00109
00110     UDECLARE_MESSAGE_MAP()
00111 };
00112 #endif /* __cplusplus */
00113
00114 #ifdef __cplusplus
00115 extern "C" {
00116 #endif
00117
00118 #ifdef __cplusplus
00119 }
00120 #endif
00121
00122 #endif /* UTOOLBAR_H */
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJCaptionPopupWnd.h Source File

WinCvs/CJLib/Include/CJCaptionPopupWnd.h

Go to the documentation of this file.
00001 // CJCaptionPopupWnd.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJCaptionPopupWnd.h $
00011  *
00012  * $History: CJCaptionPopupWnd.h $
00013  *
00014  * *****************  Version 5  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:44p
00016  * Updated in $/CodeJock/Include
00017  * Modified resource include for static builds.
00018  *
00019  * Fixed potential resource and memory leak problems.
00020  *
00021  * *****************  Version 4  *****************
00022  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00023  * Updated in $/CodeJockey/Include
00024  * Updated copyright and contact information.
00025  *
00026  * *****************  Version 3  *****************
00027  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00028  * Updated in $/CodeJockey/Include
00029  *
00030  * *****************  Version 2  *****************
00031  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00032  * Updated in $/CodeJockey/Include
00033  *
00034  * *****************  Version 1  *****************
00035  * User: Kirk Stowell Date: 7/14/99    Time: 9:46p
00036  * Created in $/CodeJockey/Include
00037  * Initial creation. Added popup class as a helper class for the
00038  * CCJCaption class. This class is used to display a popup window which
00039  * contains a child CWnd derived object.
00040  *
00041  ***************************************************************************/
00043
00044 #ifndef __CJCAPTIONPOPUPWND_H__
00045 #define __CJCAPTIONPOPUPWND_H__
00046
00047 #if _MSC_VER > 1000
00048 #pragma once
00049 #endif // _MSC_VER > 1000
00050
00052 // CCJCaptionPopupWnd window
00053
00054 #include "CJCaption.h"
00055 #include "CJFlatButton.h"
00056
00057 // caption popup window messages
00058 #define CM_ONPUSHPINBUTTON   WM_USER + 1001        // push pin clicked.
00059 #define CM_ONPUSHPINCANCEL   WM_USER + 1002        // push pin clicked.
00060
00061 // CCJCaptionPopupWnd is a CWnd derived class which is used by
00062 // the CCJCaption class to display a popup child window simular to Outlook
00063 class _CJX_EXT_CLASS CCJCaptionPopupWnd : public CWnd
00064 {
00065 // Construction
00066 public:
00067     CCJCaptionPopupWnd();
00068
00069 // Attributes
00070 public:
00071     CWnd*           m_pParentWnd;
00072     CWnd*           m_pChildWnd;
00073     CWnd*           m_pChildParent;
00074 protected:
00075     CCJCaption      m_Caption;
00076     CCJFlatButton   m_CaptionButton;
00077     HICON           m_hIconOn;      // handle to normal button icon.
00078     HICON           m_hIconOff;     // handle to pressed button icon.
00079
00080 // Operations
00081 public:
00082
00083 // Overrides
00084     // ClassWizard generated virtual function overrides
00085     //{{AFX_VIRTUAL(CCJCaptionPopupWnd)
00086     public:
00087     virtual BOOL Create(const CRect& rect, CWnd* pParentWnd, CWnd* pChildWnd);
00088     //}}AFX_VIRTUAL
00089
00090 // Implementation
00091 public:
00092     virtual ~CCJCaptionPopupWnd();
00093
00094     // Generated message map functions
00095 protected:
00096     //{{AFX_MSG(CCJCaptionPopupWnd)
00097     afx_msg void OnDestroy();
00098     afx_msg void OnCaptButton();
00099     afx_msg void OnPaint();
00100     afx_msg void OnTimer(UINT nIDEvent);
00101     //}}AFX_MSG
00102     DECLARE_MESSAGE_MAP()
00103 };
00104
00106
00107 //{{AFX_INSERT_LOCATION}}
00108 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00109
00110 #endif // !defined(__CJCAPTIONPOPUPWND_H__)
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PCPStr Member List

This is the complete list of members for PCPStr, including all inherited members.

_GetBaseClass() | PCPStr | [protected, static]
c_str() const | UPStr | [inline]
classCPersistent | CPersistent | [protected, static]
classPCPStr | PCPStr | [protected, static]
classUObject | UObject | [protected, static]
clear(void) | UPStr | [protected]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
empty(void) const | UPStr | [inline]
endsWith(char c) const | UPStr | [inline]
Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | PCPStr | [virtual]
GetRuntimeClass() const | PCPStr | [virtual]
GetTimeStamp() const | CPersistent | [inline]
IsKindOf(const URuntimeClass *pClass) const | UObject |
length(void) const | UPStr | [inline]
LoadAll(const char *only=0L) | CPersistent | [static]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_str | UPStr | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
operator const char *() const | PCPStr | [inline]
operator const unsigned char *() const | PCPStr | [inline]
operator<<(const char *addToStr) | UPStr |
operator<<(char addToStr) | UPStr |
operator<<(int addToStr) | UPStr |
operator=(const char *newstr) | PCPStr | [inline]
operator=(const unsigned char *newstr) | PCPStr | [inline]
UPStr::operator=(const UPStr &newstr) | UPStr |
p_str() const | UPStr | [inline]
PCPStr(const char *uniqueName, const char *defValue=0L, kClassPersistent pclass=kNoClass) | PCPStr | [inline]
replace(char which, char bywhich) | UPStr |
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtPCPStr(void) | PCPStr | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
set(const char *buf, unsigned int len) | UPStr |
SetData(const void *ptr, unsigned int size) | PCPStr | [virtual]
SizeOf(void) const | PCPStr | [virtual]
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
UPStr() | UPStr | [inline]
UPStr(const char *newstr) | UPStr | [inline]
UPStr(const unsigned char *newstr) | UPStr | [inline]
UPStr(const UPStr &newstr) | UPStr | [inline]
~CPersistent() | CPersistent | [virtual]
~PCPStr() | PCPStr | [virtual]
~UObject() | UObject | [inline, virtual]
~UPStr() | UPStr | [virtual]

Generated on Sat Aug 7 22:55:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CustomizeMenus.h Source File

WinCvs/CustomizeMenus.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 2000
00019  */
00020
00021 #if !defined(AFX_CUSTOMIZEMENUS_H__28A6AE7E_C54B_47A5_A8F5_A127E2E9F3BF__INCLUDED_)
00022 #define AFX_CUSTOMIZEMENUS_H__28A6AE7E_C54B_47A5_A8F5_A127E2E9F3BF__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // CustomizeMenus.h : header file
00028 //
00029
00030 #include "Persistent.h"
00031 #include "HHelpSupport.h"
00032
00033 class CMMenuString;
00034
00036 typedef struct
00037 {
00038     const char* title;
00039     const char* key;
00040     int cmd;
00041 } CustInvertTable;
00042
00043 const CustInvertTable* CustGetByKey(const char* entry);
00044
00045 CMenu* GetCustomMenu(int whichmenu, CView* pThis);
00046 void CustomizeMenus(int whichmenu);
00047
00049 // CCustomizeMenus dialog
00050
00051 class CCustomizeMenus : public CHHelpDialog
00052 {
00053 // Construction
00054 public:
00055     CCustomizeMenus(CMMenuString* fromMenu, CWnd* pParent = NULL);   // standard constructor
00056
00057 // Dialog Data
00058     //{{AFX_DATA(CCustomizeMenus)
00059     enum { IDD = IDD_CUSTOMIZE };
00060     CListCtrl   m_menuList;
00061     CListCtrl   m_cmdsList;
00062     CButton m_upbtn;
00063     CButton m_removebtn;
00064     CButton m_downbtn;
00065     CButton m_addbtn;
00066     //}}AFX_DATA
00067
00068
00069 // Overrides
00070     // ClassWizard generated virtual function overrides
00071     //{{AFX_VIRTUAL(CCustomizeMenus)
00072     protected:
00073     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00074     //}}AFX_VIRTUAL
00075
00076 // Implementation
00077 protected:
00078
00079     // Generated message map functions
00080     //{{AFX_MSG(CCustomizeMenus)
00081     afx_msg void OnRemove();
00082     afx_msg void OnAdd();
00083     virtual BOOL OnInitDialog();
00084     virtual void OnOK();
00085     afx_msg void OnItemchangedAllcmds(NMHDR* pNMHDR, LRESULT* pResult);
00086     afx_msg void OnDblclkMenulist(NMHDR* pNMHDR, LRESULT* pResult);
00087     afx_msg void OnDblclkAllcmds(NMHDR* pNMHDR, LRESULT* pResult);
00088     afx_msg void OnItemchangedMenulist(NMHDR* pNMHDR, LRESULT* pResult);
00089     afx_msg void OnDown();
00090     afx_msg void OnUp();
00091     afx_msg void OnHelp();
00092     //}}AFX_MSG
00093     DECLARE_MESSAGE_MAP()
00094 private:
00095     // Data members
00096     CMMenuString* m_Menu;
00097     CImageList m_SmallImageList;
00098
00099     // Methods
00100     virtual void InitHelpID();
00101
00102     void OnMove(int offset);
00103     int GetIcon(const CustInvertTable* entry);
00104 };
00105
00106 //{{AFX_INSERT_LOCATION}}
00107 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00108
00109 #endif // !defined(AFX_CUSTOMIZEMENUS_H__28A6AE7E_C54B_47A5_A8F5_A127E2E9F3BF__INCLUDED_)
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWndAutoCommand Member List

This is the complete list of members for CWndAutoCommand, including all inherited members.

CWndAutoCommand(const CWnd *pWnd, const UINT uiCmd) | CWndAutoCommand |
m_hAutoCommandWnd | CWndAutoCommand | [private]
m_uiCmd | CWndAutoCommand | [private]
~CWndAutoCommand() | CWndAutoCommand | [virtual]

Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CFilterSelectionDlg Member List

This is the complete list of members for CFilterSelectionDlg, including all inherited members.

CFilterSelectionDlg(const int columnIndex, const char *filterText, CWnd *pParent=NULL) | CFilterSelectionDlg |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CFilterSelectionDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CFilterSelectionDlg |
InitHelpID() | CFilterSelectionDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_columnIndex | CFilterSelectionDlg | [private]
m_contentsCombo | CFilterSelectionDlg |
m_filterCombo | CFilterSelectionDlg |
m_filterText | CFilterSelectionDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDblclkCombofilter() | CFilterSelectionDlg | [protected]
OnHelp() | CFilterSelectionDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CFilterSelectionDlg | [protected, virtual]
OnSelchangeContentsCombo() | CFilterSelectionDlg | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UpdateDlg.h Source File

common/UpdateDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * UpdateDlg.h : the cvs update dialog
00023  */
00024
00025 #if !defined(AFX_UPDATEDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_UPDATEDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "MultiString.h"
00033 #include "SmartComboBox.h"
00034 #include "KeywordComboBox.h"
00035
00036 #ifdef WIN32
00037 #   include "HHelpSupport.h"
00038 #endif
00039
00040 class MultiFiles;
00041
00042 bool CompatGetUpdate(const MultiFiles* mf,
00043                      bool& toStdout, bool& noRecurs, bool& resetSticky,
00044                      CStr& date, CStr& rev,
00045                      bool& useMostRecent,
00046                      CStr& rev1, CStr& rev2,
00047                      bool& branchPointMerge,
00048                      bool& threeWayConflicts,
00049                      bool& createMissDir,
00050                      bool& getCleanCopy,
00051                      CStr& keyword,
00052                      bool& caseSensitiveNames,
00053                      bool& lastCheckinTime);
00054
00055 #ifdef WIN32
00056
00058 class CUpdateMain : public CHHelpPropertyPage
00059 {
00060     DECLARE_DYNAMIC(CUpdateMain)
00061
00062 // Construction
00063 public:
00064     CUpdateMain();
00065     ~CUpdateMain();
00066
00067 // Dialog Data
00068     //{{AFX_DATA(CUpdateMain)
00069     enum { IDD = IDD_UPDATE_MAIN };
00070     BOOL    m_norecurs;
00071     BOOL    m_createmissdir;
00072     BOOL    m_getcleancopy;
00073     //}}AFX_DATA
00074
00075
00076 // Overrides
00077     // ClassWizard generate virtual function overrides
00078     //{{AFX_VIRTUAL(CUpdateMain)
00079     protected:
00080     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00081     //}}AFX_VIRTUAL
00082
00083 // Implementation
00084 protected:
00085     // Generated message map functions
00086     //{{AFX_MSG(CUpdateMain)
00087     //}}AFX_MSG
00088     DECLARE_MESSAGE_MAP()
00089 private:
00090     // Methods
00091     virtual void InitHelpID();
00092 };
00093
00095 class CUpdateOptions : public CHHelpPropertyPage
00096 {
00097     DECLARE_DYNAMIC(CUpdateOptions)
00098
00099 // Construction
00100 public:
00101     CUpdateOptions(const MultiFiles* mf,
00102         const char* rev, const char* date, const char* keyword,
00103         const bool resetSticky, const bool caseSensitiveNames, const bool lastCheckinTime);
00104     ~CUpdateOptions();
00105
00106 // Dialog Data
00107     //{{AFX_DATA(CUpdateOptions)
00108     enum { IDD = IDD_UPDATE_OPTIONS };
00109     CButton m_matchCheck;
00110     CButton m_resetStickyCheck;
00111     CButton m_browseTagButton;
00112     CButton m_hasRevCheck;
00113     CButton m_hasDateCheck;
00114     CKeywordComboBox    m_keywordCombo;
00115     CStatic m_keywordDescStatic;
00116     CSmartComboBox  m_revCombo;
00117     CSmartComboBox  m_dateCombo;
00118     CString m_date;
00119     CString m_rev;
00120     BOOL    m_hasDate;
00121     BOOL    m_match;
00122     BOOL    m_hasRev;
00123     CString m_keyword;
00124     BOOL    m_resetSticky;
00125     BOOL    m_stdout;
00126     BOOL    m_caseSensitiveNames;
00127     BOOL    m_lastCheckinTime;
00128     //}}AFX_DATA
00129
00130
00131 // Overrides
00132     // ClassWizard generate virtual function overrides
00133     //{{AFX_VIRTUAL(CUpdateOptions)
00134 protected:
00135     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00136     //}}AFX_VIRTUAL
00137
00138 // Implementation
00139 protected:
00140     // Generated message map functions
00141     //{{AFX_MSG(CUpdateOptions)
00142     afx_msg void OnDate();
00143     afx_msg void OnRev();
00144     afx_msg void OnBrowseTag();
00145     virtual BOOL OnInitDialog();
00146     afx_msg void OnDelsticky();
00147     //}}AFX_MSG
00148     DECLARE_MESSAGE_MAP()
00149 private:
00150     // Data members
00151     const MultiFiles* m_mf;
00152
00153     // Methods
00154     virtual void InitHelpID();
00155 };
00156
00158 class CUpdateMerge : public CHHelpPropertyPage
00159 {
00160     DECLARE_DYNAMIC(CUpdateMerge)
00161
00162 // Construction
00163 public:
00164     CUpdateMerge(const MultiFiles* mf,
00165         bool isCheckout,
00166         const char* rev1, const char* rev2, const char* date1, const char* date2,
00167         const bool threeWayConflicts);
00168     ~CUpdateMerge();
00169
00170 // Dialog Data
00171     //{{AFX_DATA(CUpdateMerge)
00172     enum { IDD = IDD_UPDATE_MERGE };
00173     CSmartComboBox  m_mergeTypeCombo;
00174     CButton m_branchPointMergeCheck;
00175     CButton m_threeWayConflictsCheck;
00176     CButton m_hasDate2Check;
00177     CButton m_hasDate1Check;
00178     CButton m_browse2TagButton;
00179     CButton m_browse1TagButton;
00180     CSmartComboBox  m_date2Combo;
00181     CSmartComboBox  m_date1Combo;
00182     CSmartComboBox  m_rev2Combo;
00183     CSmartComboBox  m_rev1Combo;
00184     CString m_rev1;
00185     CString m_rev2;
00186     BOOL    m_hasDate1;
00187     BOOL    m_hasDate2;
00188     CString m_date1;
00189     CString m_date2;
00190     BOOL    m_threeWayConflicts;
00191     BOOL    m_branchPointMerge;
00192     int     m_mergeType;
00193     //}}AFX_DATA
00194
00195
00196 // Overrides
00197     // ClassWizard generate virtual function overrides
00198     //{{AFX_VIRTUAL(CUpdateMerge)
00199     protected:
00200     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00201     //}}AFX_VIRTUAL
00202
00203 // Implementation
00204 protected:
00205     // Generated message map functions
00206     //{{AFX_MSG(CUpdateMerge)
00207     afx_msg void OnCheckdate1();
00208     afx_msg void OnCheckdate2();
00209     afx_msg void OnBrowseTag1();
00210     afx_msg void OnBrowseTag2();
00211     afx_msg void OnSelchangeMergeType();
00212     //}}AFX_MSG
00213     DECLARE_MESSAGE_MAP()
00214 private:
00215     // Data members
00216     const MultiFiles* m_mf;
00217     bool m_isCheckout;
00219     // Methods
00220     virtual void InitHelpID();
00221 };
00222
00223 //{{AFX_INSERT_LOCATION}}
00224 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00225 #endif /* WIN32 */
00226
00227 #endif // !defined(AFX_UPDATEDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJPagerCtrl.h Source File

WinCvs/CJLib/Include/CJPagerCtrl.h

Go to the documentation of this file.
00001 // CJPagerCtrl.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2002/06/15 17:49:37 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJockey/Include/CJPagerCtrl.h $
00011  *
00012  * $History: CJPagerCtrl.h $
00013  *
00014  * *****************  Version 7  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/Include
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 6  *****************
00020  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00021  * Updated in $/CodeJockey/Include
00022  *
00023  * *****************  Version 5  *****************
00024  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00025  * Updated in $/CodeJockey/Include
00026  *
00027  * *****************  Version 4  *****************
00028  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00029  * Updated in $/CodeJockey/Include
00030  * Cleaned up inline functions, and import/export macro so that class will
00031  * be imported when linked to, and exported at compile time.
00032  *
00033  * *****************  Version 3  *****************
00034  * User: Kirk Stowell Date: 4/03/99    Time: 10:45p
00035  * Updated in $/CodeJockey/Include
00036  * Added comments and cleaned up code.
00037  *
00038  * *****************  Version 2  *****************
00039  * User: Kirk Stowell Date: 1/02/99    Time: 10:44p
00040  * Updated in $/CodeJockey/Include
00041  * Cleaned up class source, wrapped all pager messages.
00042  *
00043  * *****************  Version 1  *****************
00044  * User: Kirk Stowell Date: 10/02/98   Time: 10:44p
00045  * Created in $/CodeJockey/Include
00046  * First release version.
00047  *
00048  ***************************************************************************/
00050
00051 #ifndef __CJPAGERCTRL_H__
00052 #define __CJPAGERCTRL_H__
00053
00054 #if _MSC_VER >= 1000
00055 #pragma once
00056 #endif // _MSC_VER >= 1000
00057
00058 // CCJPagerCtrl is a CWnd derived class which wraps the windows
00059 // Pager common control.
00060 class _CJX_EXT_CLASS CCJPagerCtrl : public CWnd
00061 {
00062     DECLARE_DYNAMIC(CCJPagerCtrl)
00063 public:
00064
00065     // Default constructor
00066     //
00067     CCJPagerCtrl();
00068
00069     // Virtual destructor
00070     //
00071     virtual ~CCJPagerCtrl();
00072
00073 protected:
00074
00075     int m_nWidth;   // user defined scroll width see SetScrollArea(...)
00076     int m_nHeight;  // user defined scroll height see SetScrollArea(...)
00077
00078 public:
00079
00080     // this member function sets the scroll area for the
00081     // pager
00082     //
00083     void SetScrollArea (int nWidth, int nHeight);
00084
00086     // CPagerCtrl class wrappers.
00088
00089     // Sets the contained window for the pager control
00090     //
00091     void SetChild(
00092         // Handle to the window to be contained.
00093         HWND hwndChild);
00094
00095     // Forces the pager control to recalculate the size of the
00096     // contained window
00097     //
00098     void RecalcSize();
00099
00100     // Enables or disables mouse forwarding for the pager control
00101     //
00102     void ForwardMouse(
00103         // BOOL value that determines if mouse forwarding is enabled
00104         // or disabled. If this value is nonzero, mouse forwarding is
00105         // enabled. If this value is zero, mouse forwarding is disabled.
00106         BOOL bForward);
00107
00108     // Sets the current background color for the pager control
00109     //
00110     COLORREF SetBkColor(
00111         // COLORREF value that contains the new background
00112         // color of the pager control
00113         COLORREF clr);
00114
00115     // Retrieves the current background color for the pager control
00116     //
00117     COLORREF GetBkColor();
00118
00119     // Sets the current border size for the pager control
00120     //
00121     int SetBorder(
00122         // INT value that contains the new size of the
00123         // border, in pixels
00124         int iBorder);
00125
00126     // Retrieves the current border size for the pager control
00127     //
00128     int GetBorder();
00129
00130     // Sets the scroll position for the pager control
00131     //
00132     int SetPos(
00133         // INT value that contains the new scroll position, in pixels
00134         int iPos);
00135
00136     // Retrieves the current scroll position of the pager control
00137     //
00138     int GetPos();
00139
00140     // Sets the current button size for the pager control
00141     //
00142     int SetButtonSize(
00143         // INT value that contains the new button size, in pixels
00144         int iSize);
00145
00146     // Retrieves the current button size for the pager control
00147     //
00148     int GetButtonSize();
00149
00150     // Retrieves the state of the specified button in a pager control
00151     //
00152     DWORD GetButtonState(
00153         // Indicates which button to retrieve the state for
00154         int iButton);
00155
00156     // Retrieves a pager control's IDropTarget interface pointer
00157     //
00158     void GetDropTarget(
00159         // Address of an IDropTarget pointer that receives the
00160         // interface pointer
00161         IDropTarget **ppdt);
00162
00163 // Overrides
00164     // ClassWizard generated virtual function overrides
00165     //{{AFX_VIRTUAL(CCJPagerCtrl)
00166     public:
00167     virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
00168     //}}AFX_VIRTUAL
00169
00170     // Generated message map functions
00171 protected:
00172     //{{AFX_MSG(CCJPagerCtrl)
00173     virtual BOOL OnPagerScroll(NMHDR* pNMPGScroll, LRESULT * pResult);
00174     virtual BOOL OnPagerCalcSize(NMHDR * pNMPGCalcSize, LRESULT* pResult);
00175     //}}AFX_MSG
00176     DECLARE_MESSAGE_MAP()
00177 };
00178
00180 //  Inline Functions
00182
00183 _CJXLIB_INLINE void CCJPagerCtrl::SetScrollArea (int nWidth, int nHeight)
00184     { ASSERT(::IsWindow(m_hWnd)); m_nWidth  = nWidth; m_nHeight = nHeight; }
00185
00186 _CJXLIB_INLINE void CCJPagerCtrl::SetChild(HWND hwndChild)
00187     { ASSERT(::IsWindow(m_hWnd)); Pager_SetChild(m_hWnd, hwndChild); }
00188
00189 _CJXLIB_INLINE void CCJPagerCtrl::RecalcSize()
00190     { ASSERT(::IsWindow(m_hWnd)); Pager_RecalcSize(m_hWnd); }
00191
00192 _CJXLIB_INLINE void CCJPagerCtrl::ForwardMouse(BOOL bForward)
00193     { ASSERT(::IsWindow(m_hWnd)); Pager_ForwardMouse(m_hWnd, bForward); }
00194
00195 _CJXLIB_INLINE COLORREF CCJPagerCtrl::SetBkColor(COLORREF clr)
00196     { ASSERT(::IsWindow(m_hWnd)); return Pager_SetBkColor(m_hWnd, clr); }
00197
00198 _CJXLIB_INLINE COLORREF CCJPagerCtrl::GetBkColor()
00199     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetBkColor(m_hWnd); }
00200
00201 _CJXLIB_INLINE int CCJPagerCtrl::SetBorder(int iBorder)
00202     { ASSERT(::IsWindow(m_hWnd)); return Pager_SetBorder(m_hWnd, iBorder); }
00203
00204 _CJXLIB_INLINE int CCJPagerCtrl::GetBorder()
00205     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetBorder(m_hWnd); }
00206
00207 _CJXLIB_INLINE int CCJPagerCtrl::SetPos(int iPos)
00208     { ASSERT(::IsWindow(m_hWnd)); return Pager_SetPos(m_hWnd, iPos); }
00209
00210 _CJXLIB_INLINE int CCJPagerCtrl::GetPos()
00211     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetPos(m_hWnd); }
00212
00213 _CJXLIB_INLINE int CCJPagerCtrl::SetButtonSize(int iSize)
00214     { ASSERT(::IsWindow(m_hWnd)); return Pager_SetButtonSize(m_hWnd, iSize); }
00215
00216 _CJXLIB_INLINE int CCJPagerCtrl::GetButtonSize()
00217     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetButtonSize(m_hWnd); }
00218
00219 _CJXLIB_INLINE DWORD CCJPagerCtrl::GetButtonState(int iButton)
00220     { ASSERT(::IsWindow(m_hWnd)); return Pager_GetButtonState(m_hWnd, iButton); }
00221
00222 _CJXLIB_INLINE void CCJPagerCtrl::GetDropTarget(IDropTarget **ppdt)
00223     { ASSERT(::IsWindow(m_hWnd)); Pager_GetDropTarget(m_hWnd, ppdt); }
00224
00225 #ifndef PGM_SETCHILD
00226 #error CJPagerCtrl requires a newer version of the SDK than you have!
00227 #error Please update your SDK files.
00228 #endif
00229
00231
00232 //{{AFX_INSERT_LOCATION}}
00233 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00234
00235 #endif // __CJPAGERCTRL_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ItemListDlg.cpp Source File

common/ItemListDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> (Originally: Sebastien Abras <sabdev@ibelgique.com>) --- July 2002
00019  */
00020
00021 // ItemListDlg.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #if qUnix
00027 #   include "UCvsDialogs.h"
00028 #endif
00029
00030 #ifdef WIN32
00031 #   include "wincvs.h"
00032 #   include "wincvsView.h"
00033 #   include "wincvs_winutil.h"
00034 #endif /* !WIN32 */
00035
00036 #ifdef qMacCvsPP
00037 #   include <Icons.h>
00038
00039 #   include <UModalDialogs.h>
00040 #   include <LTableMultiGeometry.h>
00041 #   include <LOutlineKeySelector.h>
00042 #   include <LTableSingleSelector.h>
00043 #   include <LOutlineRowSelector.h>
00044 #   include <UAttachments.h>
00045 #   include <UGAColorRamp.h>
00046 #   include <LTextEditView.h>
00047
00048 #   include "MacCvsConstant.h"
00049 #   include "LPopupFiller.h"
00050 #endif /* qMacCvsPP */
00051
00052 #include "MultiString.h"
00053 #include "ItemListDlg.h"
00054 #include "CvsCommands.h"
00055
00056 #include "CvsArgs.h"
00057 #include "cvsgui_process.h"
00058 #include "AppConsole.h"
00059 #include "CvsEntries.h"
00060 #include "SelectionDetailsDlg.h"
00061 #include "CvsAlert.h"
00062 #include "CvsRootDlg.h"
00063
00064 #ifdef _DEBUG
00065 #define new DEBUG_NEW
00066 #undef THIS_FILE
00067 static char THIS_FILE[] = __FILE__;
00068 #endif
00069
00070
00071 #define STR_ITEMLIST_DIR        "<Dir>"
00072 #define STR_ITEMLIST_UP_DIR     ".."
00073 #define STR_ITEMLIST_BRANCH     "Branch"
00074 #define STR_ITEMLIST_REVISION   "Revision"
00075
00077 CPersistentBool gItemListTagRecurse("P_ItemListTagRecurse", false);
00078
00080 CPersistentBool gItemListModuleList("P_ItemListModuleList", false, kAddSettings);
00081
00083 CPersistentInt gItemListAutoRefreshTag("P_ItemListAutoRefreshTag", kAutoRefreshFirstTime);
00084
00086 CPersistentInt gItemListAutoRefreshModule("P_ItemListAutoRefreshModule", kAutoRefreshFirstTime);
00087
00088
00090 // CItemListConsole
00091
00092 CItemListConsole::CItemListConsole()
00093 {
00094     m_launchRes = 0;
00095 }
00096
00097 CItemListConsole::~CItemListConsole()
00098 {
00099     m_itemList.clear();
00100 }
00101
00102 long CItemListConsole::cvs_out(const char*txt, long len)
00103 {
00104     m_cvsOut << txt;
00105     return len;
00106 }
00107
00108 long CItemListConsole::cvs_err(const char* txt, long len)
00109 {
00110     cvs_errstr(txt, len);
00111     m_cvsErr << txt;
00112
00113     return len;
00114 }
00115
00122 void CItemListConsole::Parse(int launchRes)
00123 {
00124     m_launchRes = launchRes;
00125     m_cvsOut.clear();
00126 }
00127
00129 int CItemListConsole::GetLaunchRes() const
00130 {
00131     return m_launchRes;
00132 }
00133
00135 stringstream& CItemListConsole::GetCvsErr()
00136 {
00137     return m_cvsErr;
00138 }
00139
00141 const ItemList& CItemListConsole::GetItemList() const
00142 {
00143     return m_itemList;
00144 }
00145
00147 // CTagParserConsole
00148
00149 CTagParserConsole::CTagParserConsole()
00150 {
00151 }
00152
00153 CTagParserConsole::~CTagParserConsole()
00154 {
00155 }
00156
00157 void CTagParserConsole::Parse(int launchRes)
00158 {
00159     bool btag = false;
00160
00161     string line;
00162
00163     while( getline(m_cvsOut, line) )
00164     {
00165         if( btag )
00166         {
00167             if( line.empty() || line.find("keyword substitution:") != string::npos )
00168             {
00169                 btag = false;
00170             }
00171             else
00172             {
00173                 stringstream stream;
00174                 string tag;
00175
00176                 stream << line;
00177                 stream >> tag;
00178
00179                 tag.erase(tag.find(':'), tag.size());
00180
00181                 if( !tag.empty() )
00182                 {
00183                     ItemRowInfo rowInfo;
00184                     string type;
00185
00186                     stream >> type;
00187
00188                     if( type.size() > 0 )
00189                     {
00190                         bool isBranch = false;
00191
00192                         const int dotsCount = count(type.begin(), type.end(), '.');
00193                         if( dotsCount > 2 && dotsCount % 2 )
00194                         {
00195                             // If we have even and greater than two number of separated integers
00196                             // then check if it's a magic branch
00197                             string magicTest = type;
00198                             magicTest.erase(magicTest.find_last_of('.'), magicTest.size());
00199                             magicTest.erase(0, magicTest.find_last_of('.') + 1);
00200
00201                             if( !magicTest.empty() && magicTest[0] == '0' )
00202                             {
00203                                 isBranch = true;
00204                             }
00205                         }
00206                         else if( dotsCount > 1 && !(dotsCount % 2) )
00207                         {
00208                             // We have an odd and greater than one number of integers, surely a branch
00209                             isBranch = true;
00210                         }
00211
00212                         // Set the type appropriate to findings
00213                         type = isBranch ? STR_ITEMLIST_BRANCH : STR_ITEMLIST_REVISION;
00214                     }
00215
00216                     ItemList::iterator i = m_itemList.find(tag);
00217                     if( i != m_itemList.end() )
00218                     {
00219                         if( !type.empty() )
00220                         {
00221                             (*i).second.m_description.insert(type);
00222                         }
00223                     }
00224                     else
00225                     {
00226                         if( !type.empty() )
00227                         {
00228                             rowInfo.m_description.insert(type);
00229                         }
00230
00231                         m_itemList.insert(std::make_pair(tag, rowInfo));
00232                     }
00233                 }
00234             }
00235         }
00236
00237         if( line.find("symbolic names:") != string::npos )
00238         {
00239             btag = true;
00240         }
00241     }
00242
00243     CItemListConsole::Parse(launchRes);
00244 }
00245
00247 // CModuleParserConsole
00248
00249 CModuleParserConsole::CModuleParserConsole()
00250 {
00251 }
00252
00253 CModuleParserConsole::~CModuleParserConsole()
00254 {
00255 }
00256
00261 bool CModuleParserConsole::NeedsNormalize() const
00262 {
00263     bool res = false;
00264
00265     stringstream strCvsOut(m_cvsOut.str());
00266     string line;
00267     while( getline(strCvsOut, line) )
00268     {
00269         if( !line.empty() && isspace(line.c_str()[0]) )
00270         {
00271             res = true;
00272             break;
00273         }
00274     }
00275
00276     return res;
00277 }
00278
00283 void CModuleParserConsole::Normalize()
00284 {
00285     string cvsOut;
00286
00287     string line;
00288     string partialLine;
00289
00290     while( getline(m_cvsOut, line) )
00291     {
00292         if( !line.empty() )
00293         {
00294             if( isspace(line.c_str()[0]) )
00295             {
00296                 partialLine += " " + line.erase(0, line.find_first_not_of(" "));
00297             }
00298             else
00299             {
00300                 if( !cvsOut.empty() )
00301                 {
00302                     cvsOut += "\n";
00303                 }
00304
00305                 cvsOut += partialLine;
00306                 partialLine = line;
00307             }
00308         }
00309     }
00310
00311     if( !cvsOut.empty() )
00312     {
00313         cvsOut += "\n";
00314     }
00315
00316     cvsOut += partialLine;
00317
00318     m_cvsOut.clear();
00319     m_cvsOut << cvsOut;
00320 }
00321
00322 void CModuleParserConsole::Parse(int launchRes)
00323 {
00324     if( NeedsNormalize() )
00325     {
00326         Normalize();
00327     }
00328
00329     string line;
00330
00331     while( getline(m_cvsOut, line) )
00332     {
00333         if( !line.empty() && !isspace(line.c_str()[0]) )
00334         {
00335             stringstream stream;
00336             string module;
00337
00338             stream << line;
00339             stream >> module;
00340
00341             if( !module.empty() )
00342             {
00343                 ItemRowInfo rowInfo;
00344
00345                 string definition = line;
00346                 definition.erase(definition.begin(), definition.begin() + module.size());
00347
00348                 while( !definition.empty() && isspace(definition[0]) )
00349                 {
00350                     definition.erase(definition.begin(), definition.begin() + 1);
00351                 }
00352
00353                 if( !definition.empty() )
00354                 {
00355                     stringstream strDefintion;
00356                     string options;
00357                     string directories;
00358                     string token;
00359
00360                     strDefintion << definition;
00361
00362                     bool hasProg = false;
00363
00364                     do{
00365                         strDefintion >> token;
00366                         if( !token.empty() )
00367                         {
00368                             if( directories.empty() )
00369                             {
00370                                 if( options.empty() )
00371                                 {
00372                                     if( token[0] != '-' )
00373                                     {
00374                                         directories += token;
00375                                         continue;
00376                                     }
00377                                 }
00378
00379                                 if( token[0] == '-' || hasProg )
00380                                 {
00381                                     if( !options.empty() )
00382                                     {
00383                                         options += " ";
00384                                     }
00385
00386                                     options += token;
00387
00388                                     if( hasProg )
00389                                     {
00390                                         hasProg = false;
00391                                     }
00392                                     else if( token == "-d" ||
00393                                         token == "-e" ||
00394                                         token == "-i" ||
00395                                         token == "-o" ||
00396                                         token == "-s" ||
00397                                         token == "-t" ||
00398                                         token == "-u" )
00399                                     {
00400                                         hasProg = true;
00401                                     }
00402                                 }
00403                                 else
00404                                 {
00405                                     directories += token;
00406                                 }
00407                             }
00408                             else
00409                             {
00410                                 directories += " ";
00411                                 directories += token;
00412                             }
00413                         }
00414                     }while( !strDefintion.eof());
00415
00416                     rowInfo.m_description.insert(options.c_str());
00417                     rowInfo.m_descriptionEx.insert(directories.c_str());
00418                 }
00419
00420                 m_itemList.insert(std::make_pair(module, rowInfo));
00421             }
00422         }
00423     }
00424
00425     CItemListConsole::Parse(launchRes);
00426 }
00427
00429 // CListParserConsole
00430
00431 CListParserConsole::CListParserConsole()
00432 {
00433 }
00434
00435 CListParserConsole::~CListParserConsole()
00436 {
00437 }
00438
00439 void CListParserConsole::Parse(int launchRes)
00440 {
00441     string line;
00442
00443     while( getline(m_cvsOut, line) )
00444     {
00445         if( !line.empty() && !isspace(line.c_str()[0]) )
00446         {
00447             const char entrySeparator = '/';
00448             string entryType;
00449             stringstream entry(line);
00450
00451             if( getline(entry, entryType, entrySeparator) )
00452             {
00453                 if( entryType.size() > 0 && entryType.c_str()[0] == 'D' )
00454                 {
00455                     string directory;
00456
00457                     if( getline(entry, directory, entrySeparator) && !directory.empty() )
00458                     {
00459                         ItemRowInfo rowInfo;
00460                         rowInfo.m_description.insert(STR_ITEMLIST_DIR);
00461
00462                         m_itemList.insert(std::make_pair(directory, rowInfo));
00463                     }
00464                 }
00465                 else
00466                 {
00467                     string file;
00468
00469                     if( getline(entry, file, entrySeparator) && !file.empty() )
00470                     {
00471                         string revision;
00472                         string date;
00473
00474                         if( getline(entry, revision, entrySeparator) &&
00475                             getline(entry, date, entrySeparator) )
00476                         {
00477                             ItemRowInfo rowInfo;
00478                             rowInfo.m_description.insert(revision);
00479                             rowInfo.m_descriptionEx.insert(date);
00480
00481                             m_itemList.insert(std::make_pair(file, rowInfo));
00482                         }
00483                     }
00484                 }
00485             }
00486         }
00487     }
00488
00489     CItemListConsole::Parse(launchRes);
00490 }
00491
00492
00498 static string FormatItemDescription(const ItemDescription& itemDesc)
00499 {
00500     string strRes;
00501
00502     for(ItemDescription::const_iterator it = itemDesc.begin(); it != itemDesc.end(); it++)
00503     {
00504         if( !strRes.empty() )
00505         {
00506             strRes += ", ";
00507         }
00508
00509         strRes += (*it).c_str();
00510     }
00511
00512     return strRes;
00513 }
00514
00522 static string FormatListPath(const ListPath& listPath, const char pathDelimiter = '/')
00523 {
00524     string strRes;
00525
00526     for(ListPath::const_iterator it = listPath.begin(); it != listPath.end(); it++ )
00527     {
00528         strRes += (*it).c_str();
00529         strRes += pathDelimiter;
00530     }
00531
00532     return strRes;
00533 }
00534
00548 static CItemListConsole* LaunchItemListCommand(kItemListDlg type, bool option,
00549                                                const char* readFrom,
00550                                                bool forceCvsroot, const char* cvsroot,
00551                                                const char* revision, const char* date,
00552                                                const ListPath* listPath = NULL)
00553 {
00554     CItemListConsole* itemListConsole = NULL;
00555
00556     CvsArgs args;
00557     MultiFiles mf;
00558
00559     if( forceCvsroot )
00560     {
00561 #if INTERNAL_AUTHEN
00562         args.addcvsroot();
00563 #else
00564         args.add("-d");
00565         args.add(cvsroot);
00566 #endif /* INTERNAL_AUTHEN */
00567     }
00568
00569     switch( type )
00570     {
00571     case kItemListTag:
00572         itemListConsole = new CTagParserConsole;
00573
00574         args.add(forceCvsroot ? "rlog" : "log");
00575         args.add("-h");
00576
00577         if( !option )
00578         {
00579             args.add("-l");
00580         }
00581
00582         if( strlen(revision) )
00583         {
00584             string strRevision;
00585
00586             strRevision += "-r";
00587             strRevision += revision;
00588
00589             args.add(strRevision.c_str());
00590         }
00591
00592         if( strlen(date) )
00593         {
00594             args.add("-d");
00595             args.add(date);
00596         }
00597
00598         {
00599             CStr uppath, file;
00600             SplitPath(readFrom, uppath, file, true);
00601
00602             mf.newdir(uppath);
00603
00604             if( !file.empty() )
00605             {
00606                 mf.newfile(file);
00607             }
00608         }
00609         break;
00610     case kItemListModule:
00611         if( option )
00612         {
00613             itemListConsole = new CListParserConsole;
00614
00615             args.add("ls");
00616             args.add("-e");
00617
00618             if( strlen(revision) )
00619             {
00620                 args.add("-r");
00621                 args.add(revision);
00622             }
00623
00624             if( strlen(date) )
00625             {
00626                 args.add("-D");
00627                 args.add(date);
00628             }
00629
00630             if( listPath )
00631             {
00632                 string strListPath = FormatListPath(*listPath);
00633                 if( !strListPath.empty() )
00634                 {
00635                     args.add(strListPath.c_str());
00636                 }
00637                 else
00638                 {
00639                     args.add("/");
00640                 }
00641             }
00642             else
00643             {
00644                 args.add("/");
00645             }
00646         }
00647         else
00648         {
00649             itemListConsole = new CModuleParserConsole;
00650
00651             args.add("checkout");
00652             args.add("-c");
00653         }
00654
00655         mf.newdir(readFrom);
00656         break;
00657     default:
00658 #ifdef WIN32
00659         ASSERT(FALSE);  // unknown option
00660 #endif
00661         break;
00662     }
00663
00664     if( itemListConsole )
00665     {
00666         const char* dir = (*mf.begin()).add(args);
00667
00668         args.print(dir);
00669         const int launchRes = launchCVS(dir, args.Argc(), args.Argv(), itemListConsole);
00670         itemListConsole->Parse(launchRes);
00671     }
00672
00673     return itemListConsole;
00674 }
00675
00676
00678 // ItemDisplayInfo
00679
00685 void ItemDisplayInfo::Create(const string& item, const ItemRowInfo& rowInfo)
00686 {
00687     m_item = item;
00688     m_description = FormatItemDescription(rowInfo.m_description);
00689     m_descriptionEx = FormatItemDescription(rowInfo.m_descriptionEx);
00690
00691     m_rowInfo = rowInfo;
00692 }
00693
00695 const string& ItemDisplayInfo::GetItem() const
00696 {
00697     return m_item;
00698 }
00699
00701 const string& ItemDisplayInfo::GetDescription() const
00702 {
00703     return m_description;
00704 }
00705
00707 const string& ItemDisplayInfo::GetDescriptionEx() const
00708 {
00709     return m_descriptionEx;
00710 }
00711
00713 const ItemRowInfo& ItemDisplayInfo::GetRowInfo() const
00714 {
00715     return m_rowInfo;
00716 }
00717
00718 #ifdef WIN32
00719
00727 int CALLBACK CItemListDlg::CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam)
00728 {
00729     int res = 0;
00730
00731     const CompareInfo* info = (CompareInfo*)lParam;
00732     if( info )
00733     {
00734         ItemDisplayInfo* displayInfo1 = (ItemDisplayInfo*)itemData1;
00735         ItemDisplayInfo* displayInfo2 = (ItemDisplayInfo*)itemData2;
00736
00737         if( displayInfo1 && displayInfo2 )
00738         {
00739             switch( info->m_type )
00740             {
00741             case kItemListTag:
00742                 switch( info->m_column )
00743                 {
00744                 case 0:
00745                     res = stricmp(displayInfo1->GetItem().c_str(), displayInfo2->GetItem().c_str());
00746                     break;
00747                 case 1:
00748                     res = stricmp(displayInfo1->GetDescription().c_str(), displayInfo2->GetDescription().c_str());
00749                     break;
00750                 default:
00751                     ASSERT(FALSE); // should not come here
00752                     break;
00753                 }
00754                 break;
00755             case kItemListModule:
00756                 if( info->m_option )
00757                 {
00758                     if( strcmp(displayInfo1->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
00759                     {
00760                         res = info->m_asc ? 1 : -1;
00761                     }
00762                     else if( strcmp(displayInfo2->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
00763                     {
00764                         res = info->m_asc ? -1 : 1;
00765                     }
00766                     else
00767                     {
00768                         bool isDir1 = strcmp(displayInfo1->GetDescription().c_str(), STR_ITEMLIST_DIR) == 0;
00769                         bool isDir2 = strcmp(displayInfo2->GetDescription().c_str(), STR_ITEMLIST_DIR) == 0;
00770
00771                         if( isDir1 && !isDir2 )
00772                         {
00773                             res = info->m_asc ? 1 : -1;
00774                         }
00775                         else if( !isDir1 && isDir2 )
00776                         {
00777                             res = info->m_asc ? -1 : 1;
00778                         }
00779                         else if( isDir1 && isDir2 )
00780                         {
00781                             res = stricmp(displayInfo1->GetItem().c_str(), displayInfo2->GetItem().c_str());
00782                             if( info->m_column != 0 )
00783                             {
00784                                 if( info->m_asc )
00785                                 {
00786                                     res *= -1;
00787                                 }
00788                             }
00789                         }
00790                         else
00791                         {
00792                             switch( info->m_column )
00793                             {
00794                             case 0:
00795                                 res = stricmp(displayInfo1->GetItem().c_str(), displayInfo2->GetItem().c_str());
00796                                 break;
00797                             case 1:
00798                                 res = stricmp(displayInfo1->GetDescription().c_str(), displayInfo2->GetDescription().c_str());
00799                                 break;
00800                             case 2:
00801                                 {
00802                                     const time_t time1 = GetDateTime(displayInfo1->GetDescriptionEx().c_str());
00803                                     const time_t time2 = GetDateTime(displayInfo2->GetDescriptionEx().c_str());
00804
00805                                     if( time1 != (time_t)-1 && time2 != (time_t)-1 )
00806                                     {
00807                                         res = time1 < time2 ? -1 : (time1 > time2 ? 1 : 0);
00808                                     }
00809                                     else
00810                                     {
00811                                         res = stricmp(displayInfo1->GetDescriptionEx().c_str(), displayInfo2->GetDescriptionEx().c_str());
00812                                     }
00813                                 }
00814                                 break;
00815                             default:
00816                                 ASSERT(FALSE); // should not come here
00817                                 break;
00818                             }
00819                         }
00820                     }
00821                 }
00822                 else
00823                 {
00824                     switch( info->m_column )
00825                     {
00826                     case 0:
00827                         res = stricmp(displayInfo1->GetItem().c_str(), displayInfo2->GetItem().c_str());
00828                         break;
00829                     case 1:
00830                         res = stricmp(displayInfo1->GetDescription().c_str(), displayInfo2->GetDescription().c_str());
00831                         break;
00832                     case 2:
00833                         res = stricmp(displayInfo1->GetDescriptionEx().c_str(), displayInfo2->GetDescriptionEx().c_str());
00834                         break;
00835                     default:
00836                         ASSERT(FALSE); // should not come here
00837                         break;
00838                     }
00839                 }
00840
00841                 break;
00842             default:
00843                 ASSERT(FALSE);  // unknown type
00844                 break;
00845             }
00846         }
00847     }
00848
00849     if( res )
00850     {
00851         if( info->m_asc )
00852         {
00853             res *= -1;
00854         }
00855     }
00856
00857     return res;
00858 }
00859
00860
00862 // CItemListDlg dialog
00863
00864
00865 CItemListDlg::CItemListDlg(const MultiFiles* mf,
00866                            const char* item, kItemListDlg type, ItemList& itemList, const ListPath* listPath,
00867                            bool forceRoot, const char* cvsroot,
00868                            const char* rev, const char* date,
00869                            CWnd* pParent /*=NULL*/)
00870                            : m_mf(mf), m_itemList(itemList),
00871                            m_readFromCombo(USmartCombo::AutoDropWidth), m_autoRefreshCombo(USmartCombo::AutoDropWidth),
00872                            CHHelpDialog(CItemListDlg::IDD, pParent)
00873 {
00874     //{{AFX_DATA_INIT(CItemListDlg)
00875     m_readFrom = _T("");
00876     m_item = _T("");
00877     m_option = FALSE;
00878     m_hasRev = FALSE;
00879     m_rev = _T("");
00880     m_date = _T("");
00881     m_hasDate = FALSE;
00882     m_forceRoot = FALSE;
00883     m_cvsroot = _T("");
00884     //}}AFX_DATA_INIT
00885
00886     m_item = item;
00887
00888     m_type = type;
00889
00890     switch( m_type )
00891     {
00892     case kItemListTag:
00893         m_option = (bool)gItemListTagRecurse;
00894         break;
00895     case kItemListModule:
00896         m_option = (bool)gItemListModuleList;
00897         break;
00898     default:
00899         // Nothing to do
00900         break;
00901     }
00902
00903     if( listPath )
00904     {
00905         m_listPath = *listPath;
00906     }
00907
00908     m_cvsStopped = false;
00909
00910     m_rev = rev;
00911     m_date = date;
00912
00913     m_sortAsc = false;
00914     m_sortColumn = 0;
00915
00916     m_forceRoot = forceRoot;
00917     m_cvsroot = cvsroot;
00918
00919     m_revCombo.SetItems(&gRevNames);
00920     m_dateCombo.SetItems(&gDateNames);
00921     m_cvsrootCombo.SetItems(&gOldCvsroots);
00922 }
00923
00924
00925 void CItemListDlg::DoDataExchange(CDataExchange* pDX)
00926 {
00927     CHHelpDialog::DoDataExchange(pDX);
00928     //{{AFX_DATA_MAP(CItemListDlg)
00929     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00930     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00931     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00932     DDX_Control(pDX, IDC_AUTO_REFRESH, m_autoRefreshCombo);
00933     DDX_Control(pDX, IDC_BROWSE_SELECTION, m_selectionButton);
00934     DDX_Control(pDX, IDCANCEL, m_cancelButton);
00935     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00936     DDX_Control(pDX, IDC_ITEM, m_itemEdit);
00937     DDX_Control(pDX, IDC_REFRESH_ITEMS, m_refreshButton);
00938     DDX_Control(pDX, IDOK, m_okButton);
00939     DDX_Control(pDX, IDC_BROWSE_READ_FROM, m_browseReadFromButton);
00940     DDX_Control(pDX, IDC_ITEM_LABEL, m_itemLabelStatic);
00941     DDX_Control(pDX, IDC_HAS_DATE, m_hasDateCheck);
00942     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00943     DDX_Control(pDX, IDC_DATE, m_dateCombo);
00944     DDX_Control(pDX, IDC_REV_TAG, m_revCombo);
00945     DDX_Control(pDX, IDC_ITEM_LIST_OPTION, m_optionCheck);
00946     DDX_Control(pDX, IDC_ITEM_LIST, m_itemListCtrl);
00947     DDX_Control(pDX, IDC_READ_FROM, m_readFromCombo);
00948     DDX_CBString(pDX, IDC_READ_FROM, m_readFrom);
00949     DDX_Text(pDX, IDC_ITEM, m_item);
00950     DDX_Check(pDX, IDC_ITEM_LIST_OPTION, m_option);
00951     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00952     DDX_CBString(pDX, IDC_REV_TAG, m_rev);
00953     DDX_CBString(pDX, IDC_DATE, m_date);
00954     DDX_Check(pDX, IDC_HAS_DATE, m_hasDate);
00955     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00956     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00957     //}}AFX_DATA_MAP
00958
00959     DDX_ComboMString(pDX, IDC_REV_TAG, m_revCombo);
00960     DDX_ComboMString(pDX, IDC_DATE, m_dateCombo);
00961     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00962
00963     if( pDX->m_bSaveAndValidate )
00964     {
00965         m_itemList.clear();
00966
00967         for(int nIndex = 0; nIndex < m_itemListCtrl.GetItemCount(); nIndex++)
00968         {
00969             ItemDisplayInfo* displayInfo = (ItemDisplayInfo*)m_itemListCtrl.GetItemData(nIndex);
00970             if( displayInfo )
00971             {
00972                 m_itemList.insert(std::make_pair(displayInfo->GetItem(), displayInfo->GetRowInfo()));
00973             }
00974         }
00975     }
00976     else
00977     {
00978         m_selCvsrootButton.EnableWindow(m_forceRoot);
00979     }
00980
00981     if( m_forceRoot )
00982     {
00983         DDV_MinChars(pDX, m_cvsroot, 1);
00984     }
00985 }
00986
00987
00988 BEGIN_MESSAGE_MAP(CItemListDlg, CHHelpDialog)
00989     //{{AFX_MSG_MAP(CItemListDlg)
00990     ON_BN_CLICKED(IDC_REFRESH_ITEMS, OnRefresh)
00991     ON_BN_CLICKED(IDC_ITEM_LIST_OPTION, OnOption)
00992     ON_BN_CLICKED(IDC_HAS_REV, OnCheckrev)
00993     ON_BN_CLICKED(IDC_HAS_DATE, OnCheckdate)
00994     ON_BN_CLICKED(IDC_BROWSE_TAG, OnBrowseTag)
00995     ON_NOTIFY(NM_DBLCLK, IDC_ITEM_LIST, OnDblclkItemlist)
00996     ON_NOTIFY(LVN_ITEMCHANGED, IDC_ITEM_LIST, OnItemchangedItemlist)
00997     ON_NOTIFY(LVN_COLUMNCLICK, IDC_ITEM_LIST, OnColumnclickItemlist)
00998     ON_WM_DESTROY()
00999     ON_BN_CLICKED(IDC_FORCE_CVSROOT, OnForceroot)
01000     ON_BN_CLICKED(IDC_BROWSE_READ_FROM, OnBrowseReadfrom)
01001     ON_BN_CLICKED(IDC_BROWSE_SELECTION, OnSelection)
01002     ON_CBN_SELCHANGE(IDC_AUTO_REFRESH, OnSelchangeAutoRefresh)
01003     ON_BN_CLICKED(IDC_BROWSE_CVSROOT, OnSelcvsroot)
01004     ON_BN_CLICKED(IDHELP, OnHelp)
01005     //}}AFX_MSG_MAP
01006 END_MESSAGE_MAP()
01007
01009 // CItemListDlg message handlers
01010
01012 BOOL CItemListDlg::OnInitDialog()
01013 {
01014     CHHelpDialog::OnInitDialog();
01015
01016     // Extra initialization
01017     SetListCtrlExtendedStyle(&m_itemListCtrl, LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
01018
01019     // Setup controls
01020     CHeaderCtrl* headerCtrl = m_itemListCtrl.GetHeaderCtrl();
01021     if( headerCtrl )
01022     {
01023         m_headerCtrl.SubclassWindow(headerCtrl->m_hWnd);
01024     }
01025
01026     InitListCtrl(kItemDisplayData);
01027     InitOptionCtrls();
01028     OnForceroot();
01029
01030     m_itemsImageList.Create(IDR_ITEMLIST, 16, 1, RGB(255, 0, 255));
01031     m_itemListCtrl.SetImageList(&m_itemsImageList, LVSIL_SMALL);
01032
01033     int nReadFromSelection = 0;
01034
01035     if( m_mf )
01036     {
01037         // Add selected directories
01038         for( int nIndex = 0; nIndex < m_mf->NumDirs(); nIndex++ )
01039         {
01040             CStr path;
01041             if( m_mf->getdir(nIndex, path) )
01042             {
01043                 m_readFromCombo.AddString(CString(path));
01044             }
01045         }
01046     }
01047
01048     switch( m_type )
01049     {
01050     case kItemListTag:
01051         // Set windows titles
01052         SetWindowText("Select tag/branch");
01053         m_itemLabelStatic.SetWindowText("&Tag/branch:");
01054         m_optionCheck.SetWindowText("&Recurse");
01055
01056         // The browser selection
01057         if( m_mf && m_mf->TotalNumFiles() )
01058         {
01059             MultiFiles::const_iterator mfi;
01060             for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
01061             {
01062                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
01063                 {
01064                     UStr path;
01065                     UStr fileName;
01066                     UStr currRev;
01067
01068                     mfi->get(nIndex, path, fileName, currRev);
01069                     if( !path.empty() && !path.endsWith(kPathDelimiter) )
01070                         path << kPathDelimiter;
01071
01072                     path << fileName;
01073
01074                     const int nComboIndex = m_readFromCombo.AddString(path);
01075
01076                     // It's better to have a single file selected initially for the performance reasons
01077                     if( 0 == nReadFromSelection )
01078                     {
01079                         nReadFromSelection = nComboIndex;
01080                     }
01081                 }
01082             }
01083         }
01084
01085         break;
01086     case kItemListModule:
01087         // Set windows titles
01088         SetWindowText("Select module");
01089         m_itemLabelStatic.SetWindowText("&Module:");
01090         m_optionCheck.SetWindowText("&List");
01091
01092         m_browseReadFromButton.ShowWindow(SW_HIDE);
01093         break;
01094     default:
01095         ASSERT(FALSE);  // unknown type
01096         EndDialog(IDCANCEL);
01097         return FALSE;
01098     }
01099
01100     // Set the "read from"
01101     if( m_readFromCombo.GetCount() )
01102     {
01103         m_readFromCombo.SetCurSel(nReadFromSelection);
01104     }
01105
01106     // Trigger refresh
01107     kItemListAutoRefreshType autoRefresh = kAutoRefreshFirstTime;
01108
01109     if( kItemListModule == m_type )
01110     {
01111         autoRefresh = (kItemListAutoRefreshType)(int)gItemListAutoRefreshModule;
01112     }
01113     else if( kItemListTag == m_type )
01114     {
01115         autoRefresh = (kItemListAutoRefreshType)(int)gItemListAutoRefreshTag;
01116     }
01117     else
01118     {
01119         ASSERT(FALSE); // unknown type
01120     }
01121
01122     m_autoRefreshCombo.SetCurSel(autoRefresh);
01123
01124     if( (kAutoRefreshAlways == autoRefresh) || (kAutoRefreshFirstTime == autoRefresh && m_itemList.empty()) )
01125     {
01126         // Force the window to show itself
01127         ShowWindow(SW_SHOW);
01128         PostClickRefresh();
01129     }
01130     else
01131     {
01132         DisplayItems(m_itemList, 0, NULL, false);
01133         if( m_itemListCtrl.IsWindowEnabled() )
01134         {
01135             SortItems(m_sortColumn, m_sortAsc, m_type, m_optionCheck.GetCheck() != 0);
01136         }
01137
01138         if( !m_item.IsEmpty() )
01139         {
01140             SelectItem(m_item);
01141         }
01142     }
01143
01144     return TRUE;  // return TRUE unless you set the focus to a control
01145                   // EXCEPTION: OCX Property Pages should return FALSE
01146 }
01147
01148 void CItemListDlg::InitHelpID()
01149 {
01150     SetCtrlHelpID(IDC_ITEM_LABEL,       IDH_IDC_ITEM_LABEL);
01151     SetCtrlHelpID(IDC_ITEM,             IDH_IDC_ITEM);
01152     SetCtrlHelpID(IDC_BROWSE_SELECTION, IDH_IDC_BROWSE_SELECTION);
01153     SetCtrlHelpID(IDC_ITEM_LIST,        IDH_IDC_ITEM_LIST);
01154     SetCtrlHelpID(IDC_GROUP_OPTIONS,    IDH_IDC_GROUP_OPTIONS);
01155     SetCtrlHelpID(IDC_READ_FROM,        IDH_IDC_READ_FROM);
01156     SetCtrlHelpID(IDC_BROWSE_READ_FROM, IDH_IDC_BROWSE_READ_FROM);
01157     SetCtrlHelpID(IDC_REFRESH_ITEMS,    IDH_IDC_REFRESH_ITEMS);
01158     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
01159     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
01160     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
01161     SetCtrlHelpID(IDC_HAS_REV,          IDH_IDC_HAS_REV);
01162     SetCtrlHelpID(IDC_REV_TAG,          IDH_IDC_REV_TAG);
01163     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
01164     SetCtrlHelpID(IDC_HAS_DATE,         IDH_IDC_HAS_DATE);
01165     SetCtrlHelpID(IDC_DATE,             IDH_IDC_DATE);
01166     SetCtrlHelpID(IDC_AUTO_REFRESH,     IDH_IDC_AUTO_REFRESH);
01167
01168     switch( m_type )
01169     {
01170     case kItemListTag:
01171         SetCtrlHelpID(IDC_ITEM_LIST_OPTION, IDH_IDC_FORCE_RECURSE);
01172         break;
01173     case kItemListModule:
01174         SetCtrlHelpID(IDC_ITEM_LIST_OPTION, IDH_IDC_ITEM_LIST_OPTION);
01175         break;
01176     default:
01177         ASSERT(FALSE); // unknown option
01178         break;
01179     }
01180 }
01181
01183 void CItemListDlg::OnHelp()
01184 {
01185     ShowHelp();
01186 }
01187
01192 BOOL CItemListDlg::PostClickRefresh()
01193 {
01194     return PostMessage(WM_COMMAND, MAKEWPARAM(IDC_REFRESH_ITEMS, BN_CLICKED), (LPARAM)NULL);
01195 }
01196
01202 void CItemListDlg::InitListCtrl(const kItemDisplayType displayType)
01203 {
01204     CWndRedrawMngr redrawMngr(&m_itemListCtrl);
01205
01206     // Remove all items and columns
01207     DeleteAllItems();
01208
01209     int columnCount = m_itemListCtrl.GetHeaderCtrl()->GetItemCount();
01210     while( columnCount-- )
01211     {
01212         m_itemListCtrl.DeleteColumn(0);
01213     }
01214
01215     // Get the client area width to properly size columns
01216     CRect rect;
01217     m_itemListCtrl.GetClientRect(rect);
01218
01219     const int listCtrlWidth = rect.Width();
01220
01221     // Set the appropriate columns
01222     switch( displayType )
01223     {
01224     case kItemDisplayWait:
01225         m_itemListCtrl.InsertColumn(0, _i18n("Action"), LVCFMT_LEFT, listCtrlWidth);
01226
01227         m_itemListCtrl.InsertItem(0, _i18n("Please wait while retrieving data"), kItemImgBlank);
01228         m_itemListCtrl.InsertItem(1, _i18n("You can press Stop button to cancel the operation"), kItemImgBlank);
01229         break;
01230     case kItemDisplayData:
01231         {
01232             const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
01233
01234             switch( m_type )
01235             {
01236             case kItemListTag:
01237                 m_itemListCtrl.InsertColumn(0, _i18n("Tag/branch"), LVCFMT_LEFT, 200);
01238                 m_itemListCtrl.InsertColumn(1, _i18n("Description"), LVCFMT_LEFT, listCtrlWidthNoScroll - 200);
01239                 break;
01240             case kItemListModule:
01241                 if( m_optionCheck.GetCheck() )
01242                 {
01243                     m_itemListCtrl.InsertColumn(0, _i18n("Module"), LVCFMT_LEFT, 200);
01244                     m_itemListCtrl.InsertColumn(1, _i18n("Description"), LVCFMT_LEFT, 120);
01245                     m_itemListCtrl.InsertColumn(2, _i18n("Timestamp"), LVCFMT_LEFT, listCtrlWidthNoScroll - 120 - 200);
01246                 }
01247                 else
01248                 {
01249                     m_itemListCtrl.InsertColumn(0, _i18n("Module"), LVCFMT_LEFT, 200);
01250                     m_itemListCtrl.InsertColumn(1, _i18n("Options"), LVCFMT_LEFT, 60);
01251                     m_itemListCtrl.InsertColumn(2, _i18n("Directories / Files"), LVCFMT_LEFT, listCtrlWidthNoScroll - 60 - 200);
01252                 }
01253                 break;
01254             default:
01255                 ASSERT(FALSE);  // unknown type
01256                 break;
01257             }
01258         }
01259         break;
01260     case kItemDisplayInfo:
01261         m_itemListCtrl.InsertColumn(0, _i18n("Information"), LVCFMT_LEFT, listCtrlWidth);
01262         break;
01263     default:
01264         ASSERT(FALSE);  // unknown display type
01265         break;
01266     }
01267 }
01268
01272 void CItemListDlg::InitOptionCtrls()
01273 {
01274     BOOL enableDateRev = (kItemListModule == m_type && !m_optionCheck.GetCheck()) ? false : true;
01275
01276     m_hasRevCheck.EnableWindow(enableDateRev);
01277     m_hasDateCheck.EnableWindow(enableDateRev);
01278
01279     OnCheckrev();
01280     OnCheckdate();
01281
01282     switch( m_type )
01283     {
01284     case kItemListTag:
01285         gItemListTagRecurse = m_optionCheck.GetCheck() != 0;
01286         break;
01287     case kItemListModule:
01288         gItemListModuleList = m_optionCheck.GetCheck() != 0;
01289         break;
01290     default:
01291         // Nothing to do
01292         break;
01293     }
01294 }
01295
01300 void CItemListDlg::EnableControls(BOOL enable)
01301 {
01302     m_okButton.EnableWindow(enable);
01303     m_refreshButton.EnableWindow(enable);
01304     m_readFromCombo.EnableWindow(enable);
01305     m_itemListCtrl.EnableWindow(enable);
01306     m_itemEdit.EnableWindow(enable);
01307     m_selectionButton.EnableWindow(enable);
01308
01309     m_optionCheck.EnableWindow(enable);
01310
01311     m_forceRootCheck.EnableWindow(enable);
01312     m_autoRefreshCombo.EnableWindow(enable);
01313
01314     if( !enable )
01315     {
01316         m_hasRevCheck.EnableWindow(FALSE);
01317         m_revCombo.EnableWindow(FALSE);
01318
01319         m_browseTagButton.EnableWindow(FALSE);
01320
01321         m_hasDateCheck.EnableWindow(FALSE);
01322         m_dateCombo.EnableWindow(FALSE);
01323
01324         m_browseReadFromButton.EnableWindow(FALSE);
01325     }
01326     else
01327     {
01328         InitOptionCtrls();
01329         OnForceroot();
01330     }
01331 }
01332
01334 void CItemListDlg::OnRefresh()
01335 {
01336     m_cvsStopped = false;
01337
01338     // Verify the settings
01339     if( !CheckSettings() )
01340     {
01341         return;
01342     }
01343
01344     // Prepare controls
01345     EnableControls(FALSE);
01346
01347     // Change the Cancel button's name to "Stop"
01348     CString strPrevCancelText;
01349     m_cancelButton.GetWindowText(strPrevCancelText);
01350     m_cancelButton.SetWindowText(_i18n("Stop"));
01351
01352     // Store current item text
01353     CString strItem;
01354     m_itemEdit.GetWindowText(strItem);
01355
01356     // Display the reading data prompt
01357     InitListCtrl(kItemDisplayWait);
01358
01359     // Select and launch command
01360     CString strReadFrom;
01361     CString revision;
01362     CString date;
01363     CString cvsroot;
01364
01365     m_readFromCombo.GetWindowText(strReadFrom);
01366
01367     if( m_hasRevCheck.GetCheck() )
01368     {
01369         m_revCombo.GetWindowText(revision);
01370     }
01371
01372     if( m_hasDateCheck.GetCheck() )
01373     {
01374         m_dateCombo.GetWindowText(date);
01375     }
01376
01377     if( m_forceRootCheck.GetCheck() )
01378     {
01379         m_cvsrootCombo.GetWindowText(cvsroot);
01380     }
01381
01382     const char* readFrom = kItemListModule == m_type &&
01383         m_forceRootCheck.GetCheck() && !m_optionCheck.GetCheck() ? "" : (LPCTSTR)strReadFrom;
01384
01385     std::auto_ptr<CItemListConsole> itemListConsole(LaunchItemListCommand(m_type, m_optionCheck.GetCheck() != 0,
01386         readFrom,
01387         m_forceRootCheck.GetCheck() != 0, cvsroot,
01388         revision, date, &m_listPath));
01389
01390     if( !itemListConsole.get() )
01391     {
01392         EndDialog(IDCANCEL);
01393         return;
01394     }
01395
01396     // Initialize list control
01397     InitListCtrl(kItemDisplayData);
01398
01399     // Restore control's state
01400     EnableControls(TRUE);
01401
01402     // Display data
01403     DisplayItems(itemListConsole->GetItemList(), itemListConsole->GetLaunchRes(), &itemListConsole->GetCvsErr());
01404
01405     // Restore Cancel's button name
01406     m_cancelButton.SetWindowText(strPrevCancelText);
01407
01408     if( m_itemListCtrl.IsWindowEnabled() )
01409     {
01410         // Sort items
01411         SortItems(m_sortColumn, m_sortAsc, m_type, m_optionCheck.GetCheck() != 0);
01412
01413         // Try to select the item
01414         if( strItem.IsEmpty() && m_itemListCtrl.GetItemCount() )
01415         {
01416             strItem = m_itemListCtrl.GetItemText(0, 0);
01417         }
01418
01419         if( !strItem.IsEmpty() )
01420         {
01421             SelectItem(strItem);
01422             GotoDlgCtrl(&m_itemListCtrl);
01423         }
01424     }
01425 }
01426
01431 bool CItemListDlg::CheckSettings()
01432 {
01433     if( m_hasRevCheck.IsWindowEnabled() && m_hasRevCheck.GetCheck() && !m_revCombo.GetWindowTextLength() )
01434     {
01435         CvsAlert(kCvsAlertWarningIcon,
01436             "Invalid revision.", "Please enter more than 1 character.",
01437             BUTTONTITLE_OK, NULL).ShowAlert();
01438
01439         GotoDlgCtrl(&m_revCombo);
01440         return false;
01441     }
01442
01443     if( m_hasDateCheck.IsWindowEnabled() && m_hasDateCheck.GetCheck() && !m_dateCombo.GetWindowTextLength() )
01444     {
01445         CvsAlert(kCvsAlertWarningIcon,
01446             "Invalid date.", "Please enter more than 1 character.",
01447             BUTTONTITLE_OK, NULL).ShowAlert();
01448
01449         GotoDlgCtrl(&m_dateCombo);
01450         return false;
01451     }
01452
01453     return true;
01454 }
01455
01463 void CItemListDlg::DisplayItems(const ItemList& itemList, const int launchRes, stringstream* cvsErr /*= NULL*/, const bool showUpDir /*= true*/)
01464 {
01465     if( itemList.size() == 0 )
01466     {
01467         if( !m_cvsStopped )
01468         {
01469             if( launchRes == 0 )
01470             {
01471                 // Show the info if the modules file doesn't contain any modules
01472                 if( kItemListModule == m_type && !m_optionCheck.GetCheck() )
01473                 {
01474                     InitListCtrl(kItemDisplayInfo);
01475                     m_itemListCtrl.InsertItem(0, _i18n("Modules file doesn't contain any modules definitions"), kItemImgBlank);
01476                     m_itemListCtrl.EnableWindow(FALSE);
01477                 }
01478             }
01479             else if( cvsErr )
01480             {
01481                 InitListCtrl(kItemDisplayInfo);
01482
01483                 // Show the error in the list control
01484                 m_itemListCtrl.InsertItem(0, _i18n("Command failed:"), kItemImgBlank);
01485
01486                 string line;
01487                 while( getline(*cvsErr, line) )
01488                 {
01489                     m_itemListCtrl.InsertItem(m_itemListCtrl.GetItemCount(), line.c_str(), kItemImgBlank);
01490                 }
01491
01492                 m_itemListCtrl.EnableWindow(FALSE);
01493             }
01494         }
01495     }
01496     else
01497     {
01498         // Insert the items
01499         ItemList::const_iterator it = itemList.begin();
01500         while( it != itemList.end() )
01501         {
01502             ItemDisplayInfo* displayInfo = new ItemDisplayInfo;
01503             if( displayInfo )
01504             {
01505                 displayInfo->Create((*it).first, (*it).second);
01506
01507                 const int itemIndex = m_itemListCtrl.InsertItem(m_itemListCtrl.GetItemCount(), displayInfo->GetItem().c_str());
01508                 if( itemIndex > -1 )
01509                 {
01510                     if( kItemListTag == m_type || kItemListModule == m_type )
01511                     {
01512                         m_itemListCtrl.SetItemText(itemIndex, 1, displayInfo->GetDescription().c_str());
01513                     }
01514
01515                     if( kItemListModule == m_type )
01516                     {
01517                         m_itemListCtrl.SetItemText(itemIndex, 2, displayInfo->GetDescriptionEx().c_str());
01518                     }
01519
01520                     if( !m_itemListCtrl.SetItemData(itemIndex, (DWORD)displayInfo) )
01521                     {
01522                         delete displayInfo;
01523                     }
01524
01525                     const int image = GetImageForItem(m_type, m_optionCheck.GetCheck() != 0, displayInfo);
01526                     if( image > -1 )
01527                     {
01528                         m_itemListCtrl.SetItem(itemIndex, -1, LVIF_IMAGE, NULL, image, 0, 0, 0);
01529                     }
01530                 }
01531                 else
01532                 {
01533                     delete displayInfo;
01534                 }
01535             }
01536
01537             it++;
01538         }
01539     }
01540
01541     if( showUpDir && kItemListModule == m_type && m_optionCheck.GetCheck() && !m_listPath.empty() )
01542     {
01543         // Insert the ".." to move one level up in the directories tree
01544         ItemDisplayInfo* displayInfo = new ItemDisplayInfo;
01545         if( displayInfo )
01546         {
01547             ItemRowInfo rowInfo;
01548             rowInfo.m_description.insert(STR_ITEMLIST_DIR);
01549
01550             displayInfo->Create(string(STR_ITEMLIST_UP_DIR), rowInfo);
01551
01552             const int itemIndex = m_itemListCtrl.InsertItem(0, displayInfo->GetItem().c_str());
01553             if( itemIndex > -1 )
01554             {
01555                 m_itemListCtrl.SetItemText(itemIndex, 1, displayInfo->GetDescription().c_str());
01556
01557                 if( !m_itemListCtrl.SetItemData(itemIndex, (DWORD)displayInfo) )
01558                 {
01559                     delete displayInfo;
01560                 }
01561
01562                 const int image = GetImageForItem(m_type, m_optionCheck.GetCheck() != 0, displayInfo);
01563                 if( image > -1 )
01564                 {
01565                     m_itemListCtrl.SetItem(itemIndex, -1, LVIF_IMAGE, NULL, image, 0, 0, 0);
01566                 }
01567             }
01568             else
01569             {
01570                 delete displayInfo;
01571             }
01572         }
01573     }
01574 }
01575
01583 int CItemListDlg::GetImageForItem(kItemListDlg type, bool option, const ItemDisplayInfo* displayInfo)
01584 {
01585     int res = -1;
01586
01587     switch( type )
01588     {
01589     case kItemListTag:
01590         {
01591             bool hasRevision = displayInfo->GetDescription().find(STR_ITEMLIST_REVISION) != string::npos;
01592             bool hasBranch = displayInfo->GetDescription().find(STR_ITEMLIST_BRANCH) != string::npos;
01593
01594             if( hasRevision && hasBranch )
01595             {
01596                 res = kItemImgBranchAndRevision;
01597             }
01598             else if( hasBranch )
01599             {
01600                 res = kItemImgBranch;
01601             }
01602             else
01603             {
01604                 res = kItemImgRevision;
01605             }
01606         }
01607         break;
01608     case kItemListModule:
01609         if( option )
01610         {
01611             if( strcmp(displayInfo->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
01612             {
01613                 res = kItemImgUpDir;
01614             }
01615             else
01616             {
01617                 bool isDir = displayInfo->GetDescription().find(STR_ITEMLIST_DIR) != string::npos;
01618                 res = isDir ? kItemImgDir : kItemImgFile;
01619             }
01620         }
01621         else
01622         {
01623             res = kItemImgModule;
01624         }
01625         break;
01626     default:
01627         ASSERT(FALSE);  // unknown type
01628         break;
01629     }
01630
01631     return res;
01632 }
01633
01637 void CItemListDlg::DeleteAllItems()
01638 {
01639     for(int nIndex = 0; nIndex < m_itemListCtrl.GetItemCount(); nIndex++)
01640     {
01641         ItemDisplayInfo* displayInfo = (ItemDisplayInfo*)m_itemListCtrl.GetItemData(nIndex);
01642         delete displayInfo;
01643     }
01644
01645     m_itemListCtrl.DeleteAllItems();
01646 }
01647
01654 bool CItemListDlg::SelectItem(const char* item)
01655 {
01656     bool res = FALSE;
01657
01658     LVFINDINFO findInfo = { 0 };
01659     findInfo.flags = LVFI_STRING | LVFI_PARTIAL;
01660     findInfo.psz = item;
01661
01662     const int index = m_itemListCtrl.FindItem(&findInfo);
01663     if( index > -1 )
01664     {
01665         m_itemListCtrl.EnsureVisible(index, FALSE);
01666         m_itemListCtrl.SetItemState(index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
01667
01668         res = true;
01669     }
01670
01671     return res;
01672 }
01673
01675 void CItemListDlg::OnOK()
01676 {
01677     switch( m_type )
01678     {
01679     case kItemListTag:
01680         gItemListTagRecurse = m_optionCheck.GetCheck() != 0;
01681         break;
01682     case kItemListModule:
01683         gItemListModuleList = m_optionCheck.GetCheck() != 0;
01684         break;
01685     default:
01686         // Nothing to do
01687         break;
01688     }
01689
01690     CHHelpDialog::OnOK();
01691 }
01692
01694 void CItemListDlg::OnCancel()
01695 {
01696     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01697     if( app && app->IsCvsRunning() && !app->IsCvsStopping() )
01698     {
01699         m_itemListCtrl.DeleteAllItems();
01700         m_itemListCtrl.InsertItem(0, _i18n("Stopping..."), kItemImgBlank);
01701
01702         m_cvsStopped = true;
01703         stopCVS();
01704         return;
01705     }
01706
01707     CHHelpDialog::OnCancel();
01708 }
01709
01711 void CItemListDlg::OnOption()
01712 {
01713     InitOptionCtrls();
01714
01715     if( m_type == kItemListModule )
01716     {
01717         m_listPath.clear();
01718
01719         m_sortAsc = false;
01720         m_sortColumn = 0;
01721     }
01722 }
01723
01725 void CItemListDlg::OnForceroot()
01726 {
01727     bool enableReadFrom = !(kItemListModule == m_type && m_forceRootCheck.GetCheck() && !m_optionCheck.GetCheck());
01728     m_readFromCombo.EnableWindow(enableReadFrom);
01729
01730     bool enableBrowseReadFrom = kItemListTag == m_type && m_forceRootCheck.GetCheck();
01731     m_browseReadFromButton.EnableWindow(enableBrowseReadFrom);
01732
01733     const BOOL enable = m_forceRootCheck.GetCheck();
01734
01735     m_selCvsrootButton.EnableWindow(enable);
01736     m_cvsrootCombo.EnableWindow(enable);
01737 }
01738
01740 void CItemListDlg::OnSelcvsroot()
01741 {
01742     CString strCvsroot;
01743     m_cvsrootCombo.GetWindowText(strCvsroot);
01744
01745     CStr cvsroot(strCvsroot);
01746     if( CompatGetCvsRoot(cvsroot) )
01747     {
01748         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
01749     }
01750 }
01751
01753 void CItemListDlg::OnCheckrev()
01754 {
01755     bool enable = m_hasRevCheck.GetCheck() && !(kItemListModule == m_type && !m_optionCheck.GetCheck());
01756
01757     m_revCombo.EnableWindow(enable);
01758     m_browseTagButton.EnableWindow(enable);
01759 }
01760
01762 void CItemListDlg::OnCheckdate()
01763 {
01764     bool enable = m_hasDateCheck.GetCheck() && !(kItemListModule == m_type && !m_optionCheck.GetCheck());
01765
01766     m_dateCombo.EnableWindow(enable);
01767 }
01768
01770 void CItemListDlg::OnBrowseTag()
01771 {
01772     CStr tagName;
01773     if( CompatGetTagListItem(m_mf, tagName) )
01774     {
01775         m_rev = (const char*)tagName;
01776         m_revCombo.SetWindowText(m_rev);
01777     }
01778 }
01779
01781 void CItemListDlg::OnBrowseReadfrom()
01782 {
01783     CStr moduleName;
01784     if( CompatGetModuleListItem(m_mf, moduleName) )
01785     {
01786         m_readFromCombo.SetWindowText((const char*)moduleName);
01787         GotoDlgCtrl(&m_browseReadFromButton);
01788     }
01789 }
01790
01792 void CItemListDlg::OnSelection()
01793 {
01794     kSelDetType selDetType = kItemListModule == m_type ? kSelDetPath : kSelDetRevision;
01795     CStr selection;
01796
01797     CString strSelection;
01798     m_itemEdit.GetWindowText(strSelection);
01799     selection = (const char*)strSelection;
01800
01801     if( CompatGetSelectionDetails(m_mf, selDetType, selection) )
01802     {
01803         m_itemEdit.SetWindowText(selection.c_str());
01804         OnOK();
01805     }
01806 }
01807
01809 void CItemListDlg::OnDblclkItemlist(NMHDR* pNMHDR, LRESULT* pResult)
01810 {
01811     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01812     if( pNMListView->iItem > -1 )
01813     {
01814         if( kItemListModule == m_type && m_optionCheck.GetCheck() )
01815         {
01816             const CString description = m_itemListCtrl.GetItemText(pNMListView->iItem, 1);
01817             if( description == STR_ITEMLIST_DIR )
01818             {
01819                 const CString item = m_itemListCtrl.GetItemText(pNMListView->iItem, 0);
01820                 if( item == STR_ITEMLIST_UP_DIR )
01821                 {
01822                     if( !m_listPath.empty() )
01823                     {
01824                         // Set the item for selection in up-level
01825                         const string backItem = m_listPath.back();
01826                         m_itemEdit.SetWindowText(backItem.c_str());
01827
01828                         m_listPath.pop_back();
01829                     }
01830                 }
01831                 else
01832                 {
01833                     // Make it so it's easy to "return" where we came from
01834                     m_itemEdit.SetWindowText(STR_ITEMLIST_UP_DIR);
01835                     m_listPath.push_back((LPCTSTR)item);
01836                 }
01837
01838                 PostClickRefresh();
01839             }
01840         }
01841         else
01842         {
01843             OnOK();
01844         }
01845     }
01846
01847     *pResult = 0;
01848 }
01849
01851 void CItemListDlg::OnItemchangedItemlist(NMHDR* pNMHDR, LRESULT* pResult)
01852 {
01853     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01854     if( pNMListView->iItem > -1 &&
01855         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
01856     {
01857         CString item;
01858
01859         if( kItemListModule == m_type && m_optionCheck.GetCheck() )
01860         {
01861             item = FormatListPath(m_listPath).c_str();
01862
01863             CString selItem = m_itemListCtrl.GetItemText(pNMListView->iItem, 0);
01864             if( selItem  != STR_ITEMLIST_UP_DIR )
01865             {
01866                 item += selItem;
01867             }
01868             else
01869             {
01870                 item.TrimRight('/');
01871             }
01872         }
01873         else
01874         {
01875             item = m_itemListCtrl.GetItemText(pNMListView->iItem, 0);
01876         }
01877
01878         m_itemEdit.SetWindowText(item);
01879     }
01880
01881     *pResult = 0;
01882 }
01883
01885 void CItemListDlg::OnColumnclickItemlist(NMHDR* pNMHDR, LRESULT* pResult)
01886 {
01887     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01888
01889     if( m_sortColumn != pNMListView->iSubItem )
01890     {
01891         m_sortAsc = false;
01892     }
01893     else
01894     {
01895         m_sortAsc = !m_sortAsc;
01896     }
01897
01898     m_sortColumn = pNMListView->iSubItem;
01899
01900     SortItems(m_sortColumn, m_sortAsc, m_type, m_optionCheck.GetCheck() != 0);
01901
01902     *pResult = 0;
01903 }
01904
01913 void CItemListDlg::SortItems(int column, bool asc, kItemListDlg type, bool option)
01914 {
01915     m_headerCtrl.SetSortImage(column, asc);
01916
01917     CompareInfo info = { 0 };
01918
01919     info.m_column = column;
01920     info.m_asc = asc;
01921     info.m_type = type;
01922     info.m_option = option;
01923
01924     m_itemListCtrl.SortItems(CompareItems, (DWORD)&info);
01925 }
01926
01928 void CItemListDlg::OnDestroy()
01929 {
01930     DeleteAllItems();
01931
01932     CHHelpDialog::OnDestroy();
01933 }
01934
01936 BOOL CItemListDlg::PreTranslateMessage(MSG* pMsg)
01937 {
01938     if( WM_KEYUP == pMsg->message )
01939     {
01940         if( VK_F5 == pMsg->wParam )
01941         {
01942             PostClickRefresh();
01943         }
01944     }
01945
01946     return CHHelpDialog::PreTranslateMessage(pMsg);
01947 }
01948
01950 void CItemListDlg::OnSelchangeAutoRefresh()
01951 {
01952     const int autoRefresh = m_autoRefreshCombo.GetCurSel();
01953     if( autoRefresh > -1 )
01954     {
01955         if( kItemListModule == m_type )
01956         {
01957              gItemListAutoRefreshModule = autoRefresh;
01958         }
01959         else if( kItemListTag == m_type )
01960         {
01961             gItemListAutoRefreshTag = autoRefresh;
01962         }
01963         else
01964         {
01965             ASSERT(FALSE); // unknown type
01966         }
01967     }
01968 }
01969
01970 #endif  /* WIN32 */
01971
01972 #ifdef qMacCvsPP
01973 LSelectTable::LSelectTable(
01974     LStream *inStream )
01975         : LOutlineTable( inStream )
01976 {
01977     // set the table geometry
01978     LTableMultiGeometry *geom = NEW LTableMultiGeometry(this, 50, 20);
01979     ThrowIfNil_(geom);
01980     SetTableGeometry(geom);
01981
01982     // set the table selector
01983     SetTableSelector(NEW LTableSingleSelector( this )/*LOutlineRowSelector*/ );
01984
01985     // and note that we don't set the table storage....
01986
01987     // most of the table classes not only maintain the graphical
01988     // representation of your data but also the data itself. But
01989     // LOutlineTable doesn't really do this...it mostly handles
01990     // graphical representation... you need to handle your data
01991     // maintenance elsewhere by yourself.
01992
01993     // insert a couple columns (name and size)
01994     InsertCols( 1, 0, nil, nil, false );
01995     geom->SetColWidth(310, 1, 1);
01996
01997     // Set up keyboard selection and scrolling.
01998     AddAttachment(NEW LOutlineKeySelector(this, msg_AnyMessage));
01999     AddAttachment(NEW LKeyScrollAttachment(this));
02000
02001     // Try to become default commander in the window.
02002     if (mSuperCommander != nil)
02003         mSuperCommander->SetLatentSub(this);
02004
02005     mIconModule = nil;
02006     mIconTag = nil;
02007     mIconBranch = nil;
02008
02009     OSErr err = ::GetIconSuite( &mIconModule, 152, kSelectorAllAvailableData );
02010     ThrowIfOSErr_(err);
02011     ThrowIfResFail_(mIconModule);
02012     err = ::GetIconSuite( &mIconTag, 153, kSelectorAllAvailableData );
02013     ThrowIfOSErr_(err);
02014     ThrowIfResFail_(mIconTag);
02015     err = ::GetIconSuite( &mIconBranch, 154, kSelectorAllAvailableData );
02016     ThrowIfOSErr_(err);
02017     ThrowIfResFail_(mIconBranch);
02018 }
02019
02020 LSelectTable::~LSelectTable()
02021 {
02022     if (mIconModule != 0L)
02023         ::DisposeIconSuite(mIconModule, true);
02024     if (mIconTag != 0L)
02025         ::DisposeIconSuite(mIconTag, true);
02026     if (mIconBranch != 0L)
02027         ::DisposeIconSuite(mIconBranch, true);
02028 }
02029
02030 void LSelectTable::FinishCreateSelf()
02031 {
02032     CSelectItem *theItem = NEW CSelectItem();
02033     ThrowIfNil_(theItem);
02034
02035     // and insert it at the end of the table
02036     InsertItem( theItem, nil, nil );
02037 }
02038
02039 CSelectItem::CSelectItem(const string& item, const ItemRowInfo& rowInfo) : mIcon(0L)
02040 {
02041     m_item = item;
02042     m_description = FormatItemDescription(rowInfo.m_description);
02043     m_descriptionEx = FormatItemDescription(rowInfo.m_descriptionEx);
02044
02045     m_rowInfo = rowInfo;
02046 }
02047
02048 CSelectItem::CSelectItem() : mIcon(0L)
02049 {
02050 }
02051
02052 CSelectItem::~CSelectItem()
02053 {
02054 }
02055
02056 // this is the routine called to know what to draw within the
02057 // table cell. See the comments in LOutlineItem.cp for more info.
02058 void
02059 CSelectItem::GetDrawContentsSelf(
02060     const STableCell&       inCell,
02061     SOutlineDrawContents&   ioDrawContents)
02062 {
02063     switch (inCell.col)
02064     {
02065     case 1:
02066         ioDrawContents.outShowSelection = true;
02067         ioDrawContents.outHasIcon = mIcon != NULL;
02068         ioDrawContents.outIconSuite = mIcon;
02069         ioDrawContents.outTextTraits.style = mIcon == NULL ? italic : normal;
02070
02071         LStr255 pstr(m_item.c_str());
02072         if(mIcon != NULL)
02073             LString::CopyPStr(pstr, ioDrawContents.outTextString);
02074         else
02075             LString::CopyPStr("\pNo selection", ioDrawContents.outTextString);
02076         break;
02077     }
02078 }
02079
02080 // just to be cute, we'll draw an adornment (again, see the LOutlineItem.cp
02081 // comments for more information). We'll draw a groovy gray background
02082 void
02083 CSelectItem::DrawRowAdornments(
02084     const Rect&     inLocalRowRect )
02085 {
02086     ShadeRow(UGAColorRamp::GetColor(0), inLocalRowRect);
02087 }
02088
02089 void
02090 CSelectItem::DoubleClick(
02091     const STableCell&           /* inCell */,
02092     const SMouseDownEvent&      /* inMouseDown */,
02093     const SOutlineDrawContents& /* inDrawContents */,
02094     Boolean                     /* inHitText */)
02095 {
02096     if(mIcon != NULL)
02097     {
02098         LPane * topWind = mOutlineTable;
02099         while(topWind != 0L && topWind->GetSuperView() != 0L)
02100             topWind = topWind->GetSuperView();
02101         LControl*   keyButton = dynamic_cast<LControl*>(topWind->FindPaneByID('ok  '));
02102         ThrowIfNil_(keyButton);
02103         keyButton->SimulateHotSpotClick(kControlButtonPart);
02104     }
02105 }
02106
02107 static void OnRefresh_Select(LWindow *theDialog, kItemListDlg select)
02108 {
02109     bool forceCvsroot = theDialog->GetValueForPaneID(item_CheckForceRoot) == Button_On;
02110     bool recurse = theDialog->GetValueForPaneID(item_ForceRecurse) == Button_On;
02111     LStr255 pstr;
02112     theDialog->GetDescriptorForPaneID(item_ModuleName, pstr);
02113     CStr cstr(pstr);
02114
02115     const char* readFrom = kItemListModule == select && forceCvsroot ? "" : cstr.c_str();
02116     ListPath listPath;
02117
02118     std::auto_ptr<CItemListConsole> itemListConsole(LaunchItemListCommand(select, recurse,
02119         readFrom, forceCvsroot, "" /* %%% cvsroot */, "", "", &listPath));
02120
02121     LSelectTable *table = dynamic_cast<LSelectTable*>(theDialog->FindPaneByID(item_SelectTagList));
02122     ThrowIfNil_(table);
02123
02124     LArrayIterator iter(table->GetFirstLevelItems());
02125     LOutlineItem* item;
02126     while (iter.Next(&item))
02127     {
02128         table->RemoveItem(item);
02129     }
02130
02131     const ItemList& itemList = itemListConsole->GetItemList();
02132     ItemList::const_iterator it = itemList.begin();
02133     LOutlineItem *lastItem = 0L;
02134     while( it != itemList.end() )
02135     {
02136         CSelectItem *theItem = NEW CSelectItem((*it).first, (*it).second);
02137         ThrowIfNil_(theItem);
02138
02139         // and insert it at the end of the table
02140         table->InsertItem( theItem, nil, lastItem );
02141
02142         Handle icn = 0L;
02143
02144         switch( select )
02145         {
02146         case kItemListTag:
02147         {
02148             bool hasRevision = theItem->m_description.find(STR_ITEMLIST_REVISION) != string::npos;
02149             bool hasBranch = theItem->m_description.find(STR_ITEMLIST_BRANCH) != string::npos;
02150
02151             if( hasBranch )
02152                 icn = table->mIconBranch;
02153             else
02154                 icn = table->mIconTag;
02155         }
02156         break;
02157         case kItemListModule:
02158             icn = table->mIconModule;
02159             break;
02160         }
02161
02162         theItem->mIcon = icn;
02163
02164         it++;
02165         lastItem = theItem;
02166     }
02167 }
02168
02169 static void DoDataExchange_Select(LWindow *theDialog, kItemListDlg select, CStr & name, bool & forceCvsroot, const MultiFiles* mf, bool putValue)
02170 {
02171     DoDataExchange (theDialog, item_CheckForceRoot, forceCvsroot, putValue);
02172
02173     bool recurse = select == kItemListTag ? (bool)gItemListTagRecurse : (bool)gItemListModuleList;
02174     DoDataExchange (theDialog, item_ForceRecurse, recurse, putValue);
02175     if(select == kItemListTag)
02176         gItemListTagRecurse = recurse;
02177     else
02178     {
02179         LPane *pane = theDialog->FindPaneByID(item_ForceRecurse);
02180         pane->Hide();
02181         gItemListModuleList = recurse;
02182     }
02183
02184     CMString files(mf->TotalNumFiles() + mf->NumDirs() + 1, "SelectTagsModules");
02185     CPStr file;
02186     if( mf && putValue)
02187     {
02188         // Add selected directories
02189         for( int nIndex = 0; nIndex < mf->NumDirs(); nIndex++ )
02190         {
02191             CStr path;
02192             if( mf->getdir(nIndex, path) )
02193             {
02194                 files.Insert(path);
02195                 if(file.empty())
02196                     file = path;
02197             }
02198         }
02199
02200         if(select == kItemListTag && mf->TotalNumFiles())
02201         {
02202             file = "";
02203             MultiFiles::const_iterator mfi;
02204             for(mfi = mf->begin(); mfi != mf->end(); ++mfi)
02205             {
02206                 for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
02207                 {
02208                     UStr path;
02209                     UStr fileName;
02210                     UStr currRev;
02211
02212                     mfi->get(nIndex, path, fileName, currRev);
02213                     if( !path.empty() && !path.endsWith(kPathDelimiter) )
02214                         path << kPathDelimiter;
02215
02216                     path << fileName;
02217                     files.Insert(path);
02218                     if(file.empty())
02219                         file = path;
02220                 }
02221             }
02222         }
02223     }
02224
02225     LPopupFiller *filler = dynamic_cast<LPopupFiller*>(theDialog->FindPaneByID(item_PopModName));
02226     filler->DoDataExchange(files, putValue);
02227
02228     DoDataExchange (theDialog, item_ModuleName, file, putValue);
02229
02230     LSelectTable *table = dynamic_cast<LSelectTable*>(theDialog->FindPaneByID(item_SelectTagList));
02231     ThrowIfNil_(table);
02232
02233     if(!putValue)
02234     {
02235         CSelectItem *item;
02236         STableCell cell;
02237         cell = table->GetFirstSelectedCell();
02238         if(!cell.IsNullCell())
02239         {
02240             item = dynamic_cast<CSelectItem*>
02241                 (table->FindItemForRow(cell.row));
02242             ThrowIfNil_(item != 0L);
02243
02244             if(item->mIcon != 0L)
02245                 name = item->m_item.c_str();
02246         }
02247     }
02248 }
02249 #endif /* qMacCvsPP */
02250
02251 #if qUnix
02252 class UCvsItemListDlg : public UWidget
02253 {
02254     UDECLARE_DYNAMIC(UCvsItemListDlg)
02255 public:
02256     UCvsItemListDlg(const MultiFiles* mf,
02257         const char* item, kItemListDlg type, ItemList& itemList, const ListPath* listPath,
02258         bool forceCvsroot, const char* rev, const char* date);   // standard constructor
02259     virtual ~UCvsItemListDlg() {}
02260
02261     enum
02262     {
02263         kOK = EV_COMMAND_START, // 0
02264         kCancel,                // 1
02265         kSelTagBranch,          // 2
02266         kSelectionDetailsKnob,  // 3
02267         kTagBranchList,         // 4
02268         kFilePathList,          // 5
02269         kFilePathBrowse,        // 6
02270         kRefresh,               // 7
02271         kRecurse,               // 8
02272         kForceRoot,             // 9
02273         kRevTag,                // 10
02274         kRevTagCombo,           // 11
02275         kRevTagBrowse,          // 12
02276         kDate,                  // 13
02277         kDateCombo,             // 14
02278         kAutoRefresh,           // 15
02279         kItemDesc,              // 16
02280     };
02281
02282     virtual void DoDataExchange(bool fill);
02283 public:
02284     ListPath m_listPath;
02285     UStr    m_item;
02286     bool    m_forceCvsroot;
02287     bool    m_hasRev;
02288     UStr    m_rev;
02289     UStr    m_date;
02290     bool    m_hasDate;
02291     bool    m_recurse;
02292
02293     int m_sort; // column to sort by
02294     bool m_ascendant; // sort in ascending order
02295     kItemListDlg m_type;
02297 protected:
02298     ev_msg int OnOK(void);
02299     ev_msg int OnCancel(void);
02300     ev_msg int OnDate(void);
02301     ev_msg int OnRev(void);
02302     ev_msg int OnRefresh(void);
02303     ev_msg int OnTagRevBrowse(void);
02304     ev_msg int OnSelectionDetails(void);
02305     ev_msg int OnForceRoot(void);
02306     ev_msg int OnOptionChk(void);
02307     ev_msg int OnReadFromBrowse(void);
02308     ev_msg void OnItemDblClick(void);
02309     ev_msg void OnItemSelect(int entry, const char *txt);
02310     ev_msg void OnSelColumn(int column);
02311
02312     UDECLARE_MESSAGE_MAP()
02313
02314 private:
02315     const MultiFiles* m_mf;
02317     ItemList& m_itemList;
02320     bool CheckSettings( void);
02321     void InitOptionCtrls( void);
02322     void InitListCtrl(const kItemDisplayType displayType);
02323     void* GetImageForItem( kItemListDlg type, bool option, const ItemDisplayInfo* displayInfo);
02324     void DisplayItems( const ItemList& itemList, const int launchRes,
02325         stringstream* cvsErr = NULL, const bool showUpDir = true);
02326     void PostClickRefresh( void);
02327     void EnableControls(bool enable);
02328
02329     void Resort( void);
02330 };
02331
02332 UIMPLEMENT_DYNAMIC(UCvsItemListDlg, UWidget)
02333
02334 UBEGIN_MESSAGE_MAP(UCvsItemListDlg, UWidget)
02335     ON_UCOMMAND(UCvsItemListDlg::kOK, UCvsItemListDlg::OnOK)
02336     ON_UCOMMAND(UCvsItemListDlg::kCancel, UCvsItemListDlg::OnCancel)
02337     ON_UCOMMAND(UCvsItemListDlg::kDate, UCvsItemListDlg::OnDate)
02338     ON_UCOMMAND(UCvsItemListDlg::kRevTag, UCvsItemListDlg::OnRev)
02339     ON_UCOMMAND(UCvsItemListDlg::kRefresh, UCvsItemListDlg::OnRefresh)
02340     ON_UCOMMAND(UCvsItemListDlg::kRevTagBrowse, UCvsItemListDlg::OnTagRevBrowse)
02341     ON_UCOMMAND(UCvsItemListDlg::kSelectionDetailsKnob, UCvsItemListDlg::OnSelectionDetails)
02342     ON_UCOMMAND(UCvsItemListDlg::kForceRoot, UCvsItemListDlg::OnForceRoot)
02343     ON_UCOMMAND(UCvsItemListDlg::kRecurse, UCvsItemListDlg::OnOptionChk)
02344     ON_UCOMMAND(UCvsItemListDlg::kFilePathBrowse, UCvsItemListDlg::OnReadFromBrowse)
02345     ON_LIST_SELECTING(UCvsItemListDlg::kTagBranchList, UCvsItemListDlg::OnItemSelect)
02346     ON_LIST_DBLCLICK(UCvsItemListDlg::kTagBranchList, UCvsItemListDlg::OnItemDblClick)
02347     ON_LIST_SELCOLUMN(UCvsItemListDlg::kTagBranchList, UCvsItemListDlg::OnSelColumn)
02348 UEND_MESSAGE_MAP()
02349
02350
02351 UCvsItemListDlg::UCvsItemListDlg(const MultiFiles* mf,
02352                            const char* item, kItemListDlg type, ItemList& itemList, const ListPath* listPath,
02353                            bool forceCvsroot, const char* rev, const char* date)
02354                            : UWidget(::UEventGetWidID()), m_forceCvsroot( forceCvsroot), m_type( type), m_mf(mf), m_itemList(itemList)
02355
02356 {
02357     m_ascendant = true; // default ascending order
02358     m_sort = 0; // default sort by first column
02359     m_hasRev = false;
02360     m_hasDate = false;
02361     switch( m_type )
02362     {
02363     case kItemListTag:
02364         m_recurse = (bool)gItemListTagRecurse;
02365         break;
02366     case kItemListModule:
02367         m_recurse = (bool)gItemListModuleList;
02368         break;
02369     default:
02370         m_recurse = false;
02371         break;
02372     }
02373     if( listPath )
02374     {
02375         m_listPath = *listPath;
02376     }
02377     m_rev = rev;
02378     m_date = date;
02379
02380 }
02381
02382 void UCvsItemListDlg::PostClickRefresh( void)
02383 {
02384     UEventPostMessage(GetWidID(), EV_CMD, kRefresh, 0L);
02385 }
02386
02387 int UCvsItemListDlg::OnOK(void)
02388 {
02389     switch( m_type )
02390     {
02391     case kItemListTag:
02392         gItemListTagRecurse = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L) != 0;
02393         break;
02394     case kItemListModule:
02395         gItemListModuleList = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L) != 0;
02396         break;
02397     default:
02398         // Nothing to do
02399         break;
02400     }
02401     EndModal(true);
02402     return 0;
02403 }
02404
02405 int UCvsItemListDlg::OnCancel(void)
02406 {
02407     EndModal(false);
02408     return 0;
02409 }
02410
02411 int UCvsItemListDlg::OnDate()
02412 {
02413     bool enable = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kDate, 0L)
02414         && !(kItemListModule == m_type && !UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L));
02415 //  m_hasDate = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kDate, 0L);
02416     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kDateCombo, enable), 0L);
02417     return 0;
02418 }
02419
02420 int UCvsItemListDlg::OnRev()
02421 {
02422     bool enable = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRevTag, 0L)
02423         && !(kItemListModule == m_type && !UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L));
02424 //  m_hasRev = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRevTag, 0L);
02425     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRevTagCombo, enable), 0L);
02426     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRevTagBrowse, enable), 0L);
02427     return 0;
02428 }
02429
02430 void UCvsItemListDlg::DoDataExchange(bool fill)
02431 {
02432     if(fill)
02433     {
02434         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kDate, m_hasDate), 0L);
02435         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kRevTag, m_hasRev), 0L);
02436         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kRecurse, m_recurse), 0L);
02437         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kForceRoot, m_forceCvsroot), 0L);
02438         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kFilePathBrowse, m_forceCvsroot), 0L);
02439
02440         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kRevTagCombo, 0L);
02441         UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kRevTagCombo, (void *)(const char *)(m_rev));
02442         const std::vector<UStr> & rlist = gRevNames.GetList();
02443         std::vector<UStr>::const_iterator i;
02444         for(i = rlist.begin(); i != rlist.end(); ++i)
02445         {
02446             UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kRevTagCombo, (void *)(const char *)(*i));
02447         }
02448         OnRev();
02449
02450         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kDateCombo, 0L);
02451         UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kDateCombo, (void *)(const char *)(m_date));
02452         const std::vector<UStr> & dlist = gDateNames.GetList();
02453         for(i = dlist.begin(); i != dlist.end(); ++i)
02454         {
02455             UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kDateCombo, (void *)(const char *)(*i));
02456         }
02457         OnDate();
02458
02459         // init dialog style...
02460         if( m_mf )
02461         {
02462             // Add selected directories
02463             for( int nIndex = 0; nIndex < m_mf->NumDirs(); nIndex++ )
02464             {
02465                 UStr path;
02466                 if( m_mf->getdir(nIndex, path) )
02467                 {
02468                     UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kFilePathList, (void*)(const char*)path);
02469                 }
02470             }
02471         }
02472
02473         int nReadFromSelection = UEventSendMessage(GetWidID(), EV_COMBO_GETCOUNT, kFilePathList, 0L);
02474
02475         switch( m_type )
02476         {
02477         case kItemListTag:
02478             // Set windows titles
02479             UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, (void*)_i18n("Select tag/branch"));
02480             UEventSendMessage(GetWidID(), EV_SETTEXT, kItemDesc, (void*)"Tag/branch:");
02481             UEventSendMessage(GetWidID(), EV_SETTEXT, kRecurse, (void*)_i18n("Recurse"));
02482
02483             // The browser selection
02484             if( m_mf && m_mf->TotalNumFiles() )
02485             {
02486                 MultiFiles::const_iterator mfi;
02487                 for(mfi = m_mf->begin(); mfi != m_mf->end(); ++mfi)
02488                 {
02489                     for( int nIndex = 0; nIndex < mfi->NumFiles(); nIndex++ )
02490                     {
02491                         UStr path;
02492                         UStr fileName;
02493                         UStr currRev;
02494
02495                         mfi->get(nIndex, path, fileName, currRev);
02496                         if( !path.empty() && !path.endsWith(kPathDelimiter) )
02497                             path << kPathDelimiter;
02498
02499                         path << fileName;
02500
02501                         UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kFilePathList, (void*)(const char*)path);
02502                     }
02503                 }
02504                 // It's better to have a single file selected initially for the performance reasons
02505                 if( nReadFromSelection)
02506                     UEventSendMessage(GetWidID(), EV_COMBO_SETSEL, UMAKEINT(kFilePathList, nReadFromSelection+1), 0L);
02507             }
02508
02509             break;
02510         case kItemListModule:
02511             // Set windows titles
02512             UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, (void*)_i18n("Select module"));
02513             UEventSendMessage(GetWidID(), EV_SETTEXT, kItemDesc, (void*)"Module:");
02514             UEventSendMessage(GetWidID(), EV_SETTEXT, kRecurse, (void*)_i18n("List"));
02515
02516             if( nReadFromSelection)
02517                 UEventSendMessage(GetWidID(), EV_COMBO_SETSEL, UMAKEINT(kFilePathList, 0), 0L);
02518
02519             UEventSendMessage(GetWidID(), EV_SHOW_WIDGET, kFilePathBrowse, FALSE);
02520             break;
02521         default:
02522     //      ASSERT(FALSE);  // unknown type
02523             EndModal(false);
02524             return;
02525         }
02526
02527         // Trigger refresh
02528         kItemListAutoRefreshType autoRefresh = kAutoRefreshFirstTime;
02529
02530         if( kItemListModule == m_type )
02531         {
02532             autoRefresh = (kItemListAutoRefreshType)(int)gItemListAutoRefreshModule;
02533         }
02534         else if( kItemListTag == m_type )
02535         {
02536             autoRefresh = (kItemListAutoRefreshType)(int)gItemListAutoRefreshTag;
02537         }
02538         else
02539         {
02540     //      ASSERT(FALSE); // unknown type
02541         }
02542
02543         UEventSendMessage(GetWidID(), EV_COMBO_SETSEL, UMAKEINT(kAutoRefresh, autoRefresh), 0L);
02544         if( (kAutoRefreshAlways == autoRefresh) || (kAutoRefreshFirstTime == autoRefresh && m_itemList.empty()) )
02545         {
02546             // Force the window to show itself
02547 //          gdk_flush();
02548             PostClickRefresh();
02549         }
02550         else
02551         {
02552             DisplayItems( m_itemList, 0, NULL, false);
02553             Resort();
02554
02555             UStr item;
02556             UEventSendMessage(GetWidID(), EV_GETTEXT, kSelTagBranch, &item);
02557             if( !item.empty() )
02558             {
02559                 UEventSendMessage(GetWidID(), EV_CHGFOCUS, kSelTagBranch, 0L);
02560             }
02561
02562         }
02563     }
02564     else
02565     {
02566         m_forceCvsroot = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceRoot, 0L);
02567         m_recurse = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L);
02568         UEventSendMessage(GetWidID(), EV_GETTEXT, kSelTagBranch, &m_item);
02569         if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRevTag, 0L) )
02570         {
02571             UEventSendMessage(GetWidID(), EV_GETTEXT, kRevTagCombo, &m_rev);
02572         }
02573
02574         if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kDate, 0L) )
02575         {
02576             UEventSendMessage(GetWidID(), EV_GETTEXT, kDateCombo, &m_date);
02577         }
02578     }
02579 }
02580
02585 void UCvsItemListDlg::EnableControls(bool enable)
02586 {
02587     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kOK, enable), 0L);
02588     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRefresh, enable), 0L);
02589     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kFilePathList, enable), 0L);
02590     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kTagBranchList, enable), 0L);
02591     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kSelTagBranch, enable), 0L);
02592     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kSelectionDetailsKnob, enable), 0L);
02593     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRecurse, enable), 0L);
02594     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kForceRoot, enable), 0L);
02595     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kAutoRefresh, enable), 0L);
02596
02597     if( !enable )
02598     {
02599         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRevTag, FALSE), 0L);
02600         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRevTagCombo, FALSE), 0L);
02601         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRevTagBrowse, FALSE), 0L);
02602         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kDate, FALSE), 0L);
02603         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kDateCombo, FALSE), 0L);
02604         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kFilePathBrowse, FALSE), 0L);
02605     }
02606     else
02607     {
02608         InitOptionCtrls();
02609         OnForceRoot();
02610     }
02611 }
02612
02613 int UCvsItemListDlg::OnRefresh(void)
02614 {
02615
02616     // Verify the settings
02617     if( !CheckSettings() )
02618     {
02619         return 0;
02620     }
02621
02622     // Prepare controls
02623     EnableControls(FALSE);
02624
02625     // Change the Cancel button's name to "Stop"
02626     UStr strPrevCancelText;
02627     UEventSendMessage(GetWidID(), EV_GETTEXT, kCancel, &strPrevCancelText);
02628     UEventSendMessage(GetWidID(), EV_SETTEXT, kCancel, (void*)_i18n("Stop"));
02629
02630     // Store current item text
02631     UStr strItem;
02632     UEventSendMessage(GetWidID(), EV_GETTEXT, kSelTagBranch, &strItem);
02633
02634     // Display the reading data prompt
02635     InitListCtrl(kItemDisplayWait);
02636
02637     // Select and launch command
02638     UStr strReadFrom;
02639     UStr revision;
02640     UStr date;
02641
02642     UEventSendMessage(GetWidID(), EV_GETTEXT, kFilePathList, &strReadFrom);
02643
02644     if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRevTag, 0L) )
02645     {
02646         UEventSendMessage(GetWidID(), EV_GETTEXT, kRevTagCombo, &revision);
02647     }
02648
02649     if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kDate, 0L) )
02650     {
02651         UEventSendMessage(GetWidID(), EV_GETTEXT, kDateCombo, &date);
02652     }
02653
02654     const char* readFrom = kItemListModule == m_type &&
02655         UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceRoot, 0L) &&
02656         !UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L) ? "" : (const char*)strReadFrom;
02657
02658     std::auto_ptr<CItemListConsole> itemListConsole(
02659         LaunchItemListCommand(m_type, UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L) != 0,
02660             readFrom, UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceRoot, 0L) != 0, "" /* cvsroot */,
02661             revision, date, &m_listPath));
02662
02663     if( !itemListConsole.get() )
02664     {
02665         EndModal(false);
02666         return 0;
02667     }
02668
02669     // Initialize list control
02670     InitListCtrl(kItemDisplayData);
02671
02672     // Restore control's state
02673     EnableControls(TRUE);
02674
02675     // Display data
02676     DisplayItems( itemListConsole->GetItemList(), itemListConsole->GetLaunchRes(), &itemListConsole->GetCvsErr());
02677
02678     // Restore Cancel's button name
02679     UEventSendMessage(GetWidID(), EV_SETTEXT, kCancel, (void*)(const char*)strPrevCancelText);
02680
02681     // Sort items
02682     Resort();
02683
02684     // Try to select the item
02685     UEventSendMessage(GetWidID(), EV_GETTEXT, kSelTagBranch, &strItem);
02686     if( strItem.empty())
02687     {
02688         int row = -1;
02689         row = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL,
02690                                     UMAKEINT(kTagBranchList, row), 0L);
02691         if( row != -1)
02692         {
02693             ULIST_INFO info1;
02694             info1.col = 1;
02695             info1.row = row;
02696             UEventSendMessage(GetWidID(), EV_LIST_GETINFO, kTagBranchList, &info1);
02697             strItem = ((ItemDisplayInfo*)(info1.data))->GetItem().c_str();
02698             UEventSendMessage(GetWidID(), EV_SETTEXT, kSelTagBranch, (void*)strItem.c_str());
02699         }
02700     }
02701
02702     if( !strItem.empty() )
02703     {
02704         UEventSendMessage(GetWidID(), EV_CHGFOCUS, kSelTagBranch, 0L);
02705     }
02706
02707     return 0;
02708 }
02709
02714 bool UCvsItemListDlg::CheckSettings(void)
02715 {
02716     UStr date;
02717     UStr rev;
02718     if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRevTag, 0L) )
02719     {
02720         UEventSendMessage(GetWidID(), EV_GETTEXT, kRevTagCombo, &rev);
02721         if ( rev.empty())
02722         {
02723             CvsAlert al( kCvsAlertStopIcon, _i18n("Please enter more than 1 character for revision/tag"));
02724             al.ShowAlert();
02725             UEventSendMessage(GetWidID(), EV_CHGFOCUS, kRevTagCombo, 0L);
02726             return false;
02727         }
02728     }
02729
02730     if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kDate, 0L) )
02731     {
02732         UEventSendMessage(GetWidID(), EV_GETTEXT, kDateCombo, &date);
02733         if ( date.empty())
02734         {
02735             CvsAlert al( kCvsAlertStopIcon, _i18n("Please enter more than 1 character for date"));
02736             al.ShowAlert();
02737             UEventSendMessage(GetWidID(), EV_CHGFOCUS, kDateCombo, 0L);
02738             return false;
02739         }
02740     }
02741     return true;
02742 }
02743
02744 int UCvsItemListDlg::OnTagRevBrowse(void)
02745 {
02746     UStr tagName;
02747     if( CompatGetTagListItem( m_mf, tagName) )
02748     {
02749         m_rev = (const char*)tagName;
02750         UEventSendMessage(GetWidID(), EV_SETTEXT, kRevTagCombo, (void*)(const char*)tagName);
02751     }
02752     return 0;
02753 }
02754
02755 int UCvsItemListDlg::OnSelectionDetails(void)
02756 {
02757     kSelDetType selDetType = kItemListModule == m_type ? kSelDetPath : kSelDetRevision;
02758     UStr selection;
02759
02760     UEventSendMessage(GetWidID(), EV_GETTEXT, kSelTagBranch, &selection);
02761
02762     if( CompatGetSelectionDetails( m_mf, selDetType, selection) )
02763     {
02764         UEventSendMessage(GetWidID(), EV_SETTEXT, kSelTagBranch, (void*)(const char*)selection);
02765         OnOK();
02766     }
02767     return 0;
02768 }
02769
02770 int UCvsItemListDlg::OnForceRoot(void)
02771 {
02772     bool enableReadFrom = !(kItemListModule == m_type
02773         && UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceRoot, 0L)
02774         && !UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L));
02775     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT( kFilePathList, enableReadFrom), 0L);
02776
02777     bool enableBrowseReadFrom = kItemListTag == m_type
02778         && UEventSendMessage(GetWidID(), EV_QUERYSTATE, kForceRoot, 0L);
02779     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT( kFilePathBrowse, enableBrowseReadFrom), 0L);
02780     return 0;
02781 }
02782
02783 int UCvsItemListDlg::OnOptionChk(void)
02784 {
02785     m_recurse = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L);
02786
02787     InitOptionCtrls();
02788
02789     if( m_type == kItemListModule )
02790     {
02791         m_listPath.clear();
02792
02793         m_ascendant = false;
02794         m_sort = 0;
02795     }
02796
02797     return 0;
02798 }
02799
02800 int UCvsItemListDlg::OnReadFromBrowse(void)
02801 {
02802     UStr moduleName;
02803     if( CompatGetModuleListItem( m_mf, moduleName) )
02804     {
02805         UEventSendMessage(GetWidID(), EV_SETTEXT, kFilePathList, (void*)(const char*)moduleName);
02806         UEventSendMessage(GetWidID(), EV_CHGFOCUS, kFilePathBrowse, 0L);
02807     }
02808     return 0;
02809 }
02810
02814 void UCvsItemListDlg::InitOptionCtrls( void)
02815 {
02816     bool enableDateRev = (kItemListModule == m_type
02817         && !UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L)) ? false : true;
02818
02819     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kDate, enableDateRev), 0L);
02820     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRevTag, enableDateRev), 0L);
02821
02822     OnRev();
02823     OnDate();
02824
02825     switch( m_type )
02826     {
02827     case kItemListTag:
02828         gItemListTagRecurse = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L) != 0;
02829         break;
02830     case kItemListModule:
02831         gItemListModuleList = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L) != 0;
02832         break;
02833     default:
02834         // Nothing to do
02835         break;
02836     }
02837 }
02838
02839 void UCvsItemListDlg::InitListCtrl(const kItemDisplayType displayType)
02840 {
02841     // Remove all items and columns
02842     UEventSendMessage(GetWidID(), EV_LIST_SETFEEDBACK, UMAKEINT(kTagBranchList, 0), 0L);
02843     // FIX ME remove all ROWSETDATA items here!
02844     UEventSendMessage(GetWidID(), EV_LIST_RESETALL, kTagBranchList, 0L);
02845     UEventSendMessage(GetWidID(), EV_LIST_HIDECOLUMNS, UMAKEINT(kTagBranchList,3), 0L);
02846
02847     // Set the appropriate columns
02848     switch( displayType )
02849     {
02850     case kItemDisplayWait:
02851         UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,0), (void*)_i18n("Action"));
02852         UEventSendMessage(GetWidID(), EV_LIST_SHOWCOLUMNS, UMAKEINT(kTagBranchList,1), 0L);
02853         {
02854             int rownum;
02855             ULIST_INSERT entry;
02856             UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kTagBranchList, &rownum);
02857             UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kTagBranchList, rownum), NULL);
02858             entry.row = rownum;
02859             entry.col = 0;
02860             entry.title = _i18n("Please wait while retrieving data");
02861             entry.icon = 0L;
02862             UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
02863             entry.col = 0;
02864             entry.title = _i18n("You can press Stop button to cancel the operation");
02865             entry.icon = 0L;
02866             UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
02867         }
02868         break;
02869     case kItemDisplayData:
02870         {
02871             switch( m_type )
02872             {
02873             case kItemListTag:
02874                 UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,0), (void*)"Tag/branch");
02875                 UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,1), (void*)_i18n("Description"));
02876                 UEventSendMessage(GetWidID(), EV_LIST_SHOWCOLUMNS, UMAKEINT(kTagBranchList,2), 0L);
02877                 break;
02878             case kItemListModule:
02879                 if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L))
02880                 {
02881                     UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,0), (void*)"Module");
02882                     UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,1), (void*)_i18n("Description"));
02883                     UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,2), (void*)_i18n("Timestamp"));
02884                 }
02885                 else
02886                 {
02887                     UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,0), (void*)"Module");
02888                     UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,1), (void*)_i18n("Options"));
02889                     UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,2), (void*)_i18n("Directories / Files"));
02890                 }
02891                 UEventSendMessage(GetWidID(), EV_LIST_SHOWCOLUMNS, UMAKEINT(kTagBranchList,3), 0L);
02892                 break;
02893             default:
02894 //              ASSERT(FALSE);  // unknown type
02895                 break;
02896             }
02897         }
02898         break;
02899     case kItemDisplayInfo:
02900         UEventSendMessage(GetWidID(), EV_LIST_SETCOLTITLE, UMAKEINT(kTagBranchList,0), (void*)_i18n("Information"));
02901         UEventSendMessage(GetWidID(), EV_LIST_SHOWCOLUMNS, UMAKEINT(kTagBranchList,1), 0L);
02902         break;
02903     default:
02904 //      ASSERT(FALSE);  // unknown display type
02905         break;
02906     }
02907     UEventSendMessage(GetWidID(), EV_LIST_SETFEEDBACK, UMAKEINT(kTagBranchList, 1), 0L);
02908 }
02909
02910 void UCvsItemListDlg::DisplayItems(const ItemList& itemList,
02911     const int launchRes,
02912     stringstream* cvsErr /*= NULL*/,
02913     const bool showUpDir /*= true*/)
02914 {
02915
02916     if( itemList.size() == 0 )
02917     {
02918 //      if( !m_cvsStopped )
02919         {
02920             if( launchRes == 0 )
02921             {
02922                 // Show the info if the modules file doesn't contain any modules
02923                 if( kItemListModule == m_type && !UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L))
02924                 {
02925                     InitListCtrl(kItemDisplayInfo);
02926                     int rownum;
02927                     ULIST_INSERT entry;
02928                     UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kTagBranchList, &rownum);
02929                     UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kTagBranchList, rownum), NULL);
02930                     entry.row = rownum;
02931                     entry.col = 0;
02932                     entry.title = _i18n("Modules file doesn't contain any modules definitions");
02933                     entry.icon = 0L;
02934                     UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
02935                     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kTagBranchList, 0), 0L);
02936                 }
02937             }
02938             else if( cvsErr )
02939             {
02940                 InitListCtrl(kItemDisplayInfo);
02941
02942                 // Show the error in the list control
02943                 int rownum;
02944                 ULIST_INSERT entry;
02945                 UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kTagBranchList, &rownum);
02946                 UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kTagBranchList, rownum), NULL);
02947                 entry.row = rownum;
02948                 entry.col = 0;
02949                 entry.title = _i18n("Command failed:");
02950                 entry.icon = 0L;
02951                 UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
02952
02953                 string line;
02954                 while( getline(*cvsErr, line) )
02955                 {
02956                     UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kTagBranchList, &rownum);
02957                     UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kTagBranchList, rownum), NULL);
02958                     entry.row = rownum;
02959                     entry.col = 0;
02960                     entry.title = line.c_str();
02961                     entry.icon = 0L;
02962                     UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
02963                 }
02964                 UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kTagBranchList, 0), 0L);
02965             }
02966         }
02967     }
02968     else
02969     {
02970         // Insert the items
02971         for( ItemList::const_iterator it = itemList.begin(); it != itemList.end(); ++it)
02972         {
02973             ItemDisplayInfo* displayInfo = new ItemDisplayInfo;
02974             if( displayInfo )
02975             {
02976                 displayInfo->Create((*it).first, (*it).second);
02977                 int rownum;
02978                 ULIST_INSERT entry;
02979                 UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kTagBranchList, &rownum);
02980                 if ( rownum > -1)
02981                 {
02982                     void* image = GetImageForItem(
02983                         m_type, UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L), displayInfo);
02984                     entry.row = rownum;
02985                     entry.col = 0;
02986                     entry.title = displayInfo->GetItem().c_str();
02987                     entry.icon = image;
02988                     UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
02989                     if( kItemListTag == m_type || kItemListModule == m_type )
02990                     {
02991                         entry.col = 1;
02992                         entry.title = displayInfo->GetDescription().c_str();
02993                         entry.icon = 0L;
02994                         UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
02995                     }
02996                     if( kItemListModule == m_type )
02997                     {
02998                         entry.col = 2;
02999                         entry.title = displayInfo->GetDescriptionEx().c_str();
03000                         entry.icon = 0L;
03001                         UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
03002                     }
03003                     UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kTagBranchList, rownum), displayInfo);
03004                 }
03005                 else
03006                 {
03007                     delete displayInfo;
03008                 }
03009             }
03010         }
03011     }
03012
03013     if( showUpDir
03014         && kItemListModule == m_type
03015         && UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L)
03016         && !m_listPath.empty() )
03017     {
03018         // Insert the ".." to move one level up in the directories tree
03019         ItemDisplayInfo* displayInfo = new ItemDisplayInfo;
03020         if( displayInfo )
03021         {
03022             ItemRowInfo rowInfo;
03023             rowInfo.m_description.insert(STR_ITEMLIST_DIR);
03024
03025             displayInfo->Create(string(STR_ITEMLIST_UP_DIR), rowInfo);
03026             int rownum;
03027             ULIST_INSERT entry;
03028             UEventSendMessage(GetWidID(), EV_LIST_NEWROW, kTagBranchList, &rownum);
03029             if ( rownum > -1)
03030             {
03031                 void* image = GetImageForItem(
03032                     m_type, UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L), displayInfo);
03033                 entry.row = rownum;
03034                 entry.col = 0;
03035                 entry.title = displayInfo->GetItem().c_str();
03036                 entry.icon = image;
03037                 UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
03038                 entry.col = 1;
03039                 entry.title = displayInfo->GetDescription().c_str();
03040                 entry.icon = 0L;
03041                 UEventSendMessage(GetWidID(), EV_LIST_INSERT, kTagBranchList, &entry);
03042                 UEventSendMessage(GetWidID(), EV_LIST_ROWSETDATA, UMAKEINT(kTagBranchList, rownum), displayInfo);
03043             }
03044             else
03045             {
03046                 delete displayInfo;
03047             }
03048         }
03049     }
03050 }
03051
03052
03053 #if qGTK
03054 static void* _ImgBranchAndRevision;
03055 static void* _ImgBranch;
03056 static void* _ImgRevision;
03057 static void* _ImgUpDir;
03058 static void* _ImgDir;
03059 static void* _ImgFile;
03060 static void* _ImgModule;
03061 #endif
03062
03063 void* UCvsItemListDlg::GetImageForItem( kItemListDlg type, bool option, const ItemDisplayInfo* displayInfo)
03064 {
03065     void* res = NULL;
03066     if( _ImgBranchAndRevision == 0L)
03067     {
03068 // FIX ME missing icons!
03069         _ImgBranchAndRevision = UCreate_pixmap(this, "branch.xpm");
03070         _ImgBranch = UCreate_pixmap(this, "branch.xpm");
03071         _ImgRevision = UCreate_pixmap(this, "tag.xpm");
03072         _ImgUpDir = UCreate_pixmap(this, "folder.xpm");
03073         _ImgDir = UCreate_pixmap(this, "folder.xpm");
03074         _ImgFile = UCreate_pixmap(this, "cvsfile.xpm");
03075         _ImgModule = UCreate_pixmap(this, "explore.xpm");
03076     }
03077
03078
03079     switch( type )
03080     {
03081     case kItemListTag:
03082         {
03083             bool hasRevision = displayInfo->GetDescription().find(STR_ITEMLIST_REVISION) != string::npos;
03084             bool hasBranch = displayInfo->GetDescription().find(STR_ITEMLIST_BRANCH) != string::npos;
03085
03086             if( hasRevision && hasBranch )
03087             {
03088                 res = _ImgBranchAndRevision;
03089             }
03090             else if( hasBranch )
03091             {
03092                 res = _ImgBranch;
03093             }
03094             else
03095             {
03096                 res = _ImgRevision;
03097             }
03098         }
03099         break;
03100     case kItemListModule:
03101         if( option )
03102         {
03103             if( strcmp(displayInfo->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
03104             {
03105                 res = _ImgUpDir;
03106             }
03107             else
03108             {
03109                 bool isDir = displayInfo->GetDescription().find(STR_ITEMLIST_DIR) != string::npos;
03110                 res = isDir ? _ImgDir : _ImgFile;
03111             }
03112         }
03113         else
03114         {
03115             res = _ImgModule;
03116         }
03117         break;
03118     default:
03119 //      ASSERT(FALSE);  // unknown type
03120         break;
03121     }
03122
03123     return res;
03124 }
03125
03126
03127 void UCvsItemListDlg::OnItemSelect(int entry, const char *txt)
03128 {
03129     ULIST_INFO info;
03130     info.col = 0;
03131     info.row = entry;
03132     UEventSendMessage(GetWidID(), EV_LIST_GETINFO, kTagBranchList, &info);
03133
03134     UStr item;
03135
03136     if( kItemListModule == m_type && UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L) )
03137     {
03138         item = FormatListPath(m_listPath).c_str();
03139
03140         UStr selItem = ((ItemDisplayInfo*)(info.data))->GetItem().c_str();
03141         if( selItem  != STR_ITEMLIST_UP_DIR )
03142         {
03143             item += selItem;
03144         }
03145         else
03146         {
03147             item.rtrim ('/');
03148         }
03149     }
03150     else
03151     {
03152         item = ((ItemDisplayInfo*)(info.data))->GetItem().c_str();
03153     }
03154
03155     UEventSendMessage(GetWidID(), EV_SETTEXT, kSelTagBranch, (void*)(const char*)item);
03156 }
03157
03158 void UCvsItemListDlg::OnItemDblClick(void)
03159 {
03160     int row = -1;
03161     if((row = UEventSendMessage(GetWidID(), EV_LIST_GETNEXTSEL,
03162                                 UMAKEINT(kTagBranchList, row), 0L)) == -1)
03163         return;
03164
03165     if( kItemListModule == m_type && UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRecurse, 0L) )
03166     {
03167         ULIST_INFO info1;
03168         info1.col = 1;
03169         info1.row = row;
03170         UEventSendMessage(GetWidID(), EV_LIST_GETINFO, kTagBranchList, &info1);
03171
03172         const UStr description = ((ItemDisplayInfo*)(info1.data))->GetDescription().c_str();
03173         if( description == STR_ITEMLIST_DIR )
03174         {
03175             const UStr item = ((ItemDisplayInfo*)(info1.data))->GetItem().c_str();
03176             if( item == STR_ITEMLIST_UP_DIR )
03177             {
03178                 if( !m_listPath.empty() )
03179                 {
03180                     // Set the item for selection in up-level
03181                     const string backItem = m_listPath.back();
03182                     UEventSendMessage(GetWidID(), EV_SETTEXT, kSelTagBranch, (void*)backItem.c_str());
03183
03184                     m_listPath.pop_back();
03185                 }
03186             }
03187             else
03188             {
03189                 // Make it so it's easy to "return" where we came from
03190                 UEventSendMessage(GetWidID(), EV_SETTEXT, kSelTagBranch, (void*)STR_ITEMLIST_UP_DIR);
03191                 m_listPath.push_back(item.c_str());
03192             }
03193
03194             PostClickRefresh();
03195         }
03196     }
03197     else
03198     {
03199         OnOK();
03200     }
03201 }
03202
03203 void UCvsItemListDlg::OnSelColumn(int column)
03204 {
03205     if(column == m_sort)
03206         m_ascendant = !m_ascendant;
03207     else
03208     {
03209         m_ascendant = true;
03210         m_sort = column;
03211     }
03212     Resort();
03213 }
03214
03215 static int ItemListSorter(UWidget *w, void *data1, void *data2)
03216 {
03217     ItemDisplayInfo *i1 = (ItemDisplayInfo*)data1;
03218     ItemDisplayInfo *i2 = (ItemDisplayInfo*)data2;
03219     UCvsItemListDlg *dlg = (UCvsItemListDlg*)w;
03220     int res = 0;
03221
03222     switch ( dlg->m_type) {
03223     case kItemListModule:
03224         if( dlg->m_recurse )
03225         {
03226             if( strcmp(i1->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
03227             {
03228                 res = dlg->m_ascendant ? 1 : -1;
03229             }
03230             else if( strcmp(i2->GetItem().c_str(), STR_ITEMLIST_UP_DIR) == 0 )
03231             {
03232                 res = dlg->m_ascendant ? -1 : 1;
03233             }
03234             else
03235             {
03236                 bool isDir1 = strcmp(i1->GetDescription().c_str(), STR_ITEMLIST_DIR) == 0;
03237                 bool isDir2 = strcmp(i2->GetDescription().c_str(), STR_ITEMLIST_DIR) == 0;
03238
03239                 if( isDir1 && !isDir2 )
03240                 {
03241                     res = dlg->m_ascendant ? 1 : -1;
03242                 }
03243                 else if( !isDir1 && isDir2 )
03244                 {
03245                     res = dlg->m_ascendant ? -1 : 1;
03246                 }
03247                 else if( isDir1 && isDir2 )
03248                 {
03249                     res = stricmp(i1->GetItem().c_str(), i2->GetItem().c_str());
03250                     if( dlg->m_sort != 0 )
03251                     {
03252                         if( dlg->m_ascendant )
03253                         {
03254                             res *= -1;
03255                         }
03256                     }
03257                 }
03258                 else
03259                 {
03260                     switch( dlg->m_sort )
03261                     {
03262                     case 0:
03263                         res = stricmp(i1->GetItem().c_str(), i2->GetItem().c_str());
03264                         break;
03265                     case 1:
03266                         res = stricmp(i1->GetDescription().c_str(), i2->GetDescription().c_str());
03267                         break;
03268                     case 2:
03269                         {
03270                             const time_t time1 = GetDateTime(i1->GetDescriptionEx().c_str());
03271                             const time_t time2 = GetDateTime(i2->GetDescriptionEx().c_str());
03272
03273                             if( time1 != (time_t)-1 && time2 != (time_t)-1 )
03274                             {
03275                                 res = time1 < time2 ? -1 : (time1 > time2 ? 1 : 0);
03276                             }
03277                             else
03278                             {
03279                                 res = stricmp(i1->GetDescriptionEx().c_str(), i2->GetDescriptionEx().c_str());
03280                             }
03281                         }
03282                         break;
03283                     default:
03284 //                      g_assert(0); // should not come here
03285                         break;
03286                     }
03287                 }
03288             }
03289         }
03290         else
03291         {
03292             switch( dlg->m_sort )
03293             {
03294             case 0:
03295                 res = stricmp(i1->GetItem().c_str(), i2->GetItem().c_str());
03296                 break;
03297             case 1:
03298                 res = stricmp(i1->GetDescription().c_str(), i2->GetDescription().c_str());
03299                 break;
03300             case 2:
03301                 res = stricmp(i1->GetDescriptionEx().c_str(), i2->GetDescriptionEx().c_str());
03302                 break;
03303             default:
03304 //              g_assert(0); // should not come here
03305                 break;
03306             }
03307         }
03308         break;
03309     case kItemListTag:
03310         switch( dlg->m_sort )
03311         {
03312         case 0:
03313             res = stricmp(i1->GetItem().c_str(), i2->GetItem().c_str());
03314             break;
03315         case 1:
03316             res = stricmp(i1->GetDescription().c_str(), i2->GetDescription().c_str());
03317             break;
03318         default:
03319 //          g_assert(0); // should not come here
03320             break;
03321         }
03322         break;
03323     default:
03324 //      g_assert(0);
03325         break;
03326     }
03327
03328     if( res )
03329     {
03330         if( dlg->m_ascendant)
03331         {
03332             res *= -1;
03333         }
03334     }
03335
03336     return res;
03337 }
03338
03339 void UCvsItemListDlg::Resort( void)
03340 {
03341     UEventSendMessage(GetWidID(), EV_LIST_RESORT, UMAKEINT(kTagBranchList, m_sort), (void *)ItemListSorter);
03342     UEventSendMessage(GetWidID(), EV_LIST_SETSORTDIR, UMAKEINT(kTagBranchList, m_sort), (void *)m_ascendant);
03343 }
03344
03345 #endif /* qUnix */
03346
03348 bool CompatGetTagListItem(const MultiFiles* mf,
03349                           CStr& tagName)
03350 {
03351     bool userHitOK = false;
03352
03353     static CStr sLastTag;
03354     static ItemList sTagList;
03355     static bool lastForceCvsroot = false;
03356     static CStr sLastCvsroot("");
03357     static CStr sLastRev;
03358     static CStr sLastDate;
03359
03360 #ifdef WIN32
03361     CItemListDlg itemListDlg(mf,
03362         sLastTag, kItemListTag, sTagList, NULL,
03363         lastForceCvsroot, sLastCvsroot,
03364         sLastRev, sLastDate);
03365
03366     if( itemListDlg.DoModal() == IDOK )
03367     {
03368         sLastTag = itemListDlg.m_item;
03369         sLastRev = itemListDlg.m_rev;
03370         sLastDate = itemListDlg.m_date;
03371         lastForceCvsroot = itemListDlg.m_forceRoot != 0;
03372
03373         userHitOK = true;
03374     }
03375 #endif /* WIN32 */
03376
03377 #if qUnix
03378     void *wid;
03379 #   if qGTK
03380     wid = UCreate_SelTagBranchDlg();
03381 #   endif
03382
03383     UCvsItemListDlg *dlg = new UCvsItemListDlg(mf,
03384         sLastTag, kItemListTag, sTagList, NULL,
03385         lastForceCvsroot, sLastRev, sLastDate);
03386     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
03387     if(dlg->DoModal())
03388     {
03389         sLastTag = dlg->m_item;
03390         sLastRev = dlg->m_rev;
03391         sLastDate = dlg->m_date;
03392         lastForceCvsroot = dlg->m_forceCvsroot;
03393
03394         userHitOK = true;
03395     }
03396     delete dlg;
03397
03398 #endif // qUnix
03399
03400 #ifdef qMacCvsPP
03401     StDialogHandler theHandler(dlg_Select, LCommander::GetTopCommander());
03402     LWindow *theDialog = theHandler.GetDialog();
03403     ThrowIfNil_(theDialog);
03404
03405     theDialog->Show();
03406     theDialog->SetDescriptor(LStr255("Select tag/branch"));
03407
03408     DoDataExchange_Select(theDialog, kItemListTag, sLastTag, lastForceCvsroot, mf, true);
03409
03410     MessageT hitMessage;
03411     while (true)
03412     {       // Let DialogHandler process events
03413         hitMessage = theHandler.DoDialog();
03414
03415         if(hitMessage == 'ENDO')
03416             hitMessage = msg_OK;
03417
03418         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
03419             break;
03420
03421         if(hitMessage == item_Refresh)
03422         {
03423             OnRefresh_Select(theDialog, kItemListTag);
03424         }
03425     }
03426     theDialog->Hide();
03427
03428     if(hitMessage == msg_OK)
03429     {
03430         DoDataExchange_Select(theDialog, kItemListTag, sLastTag, lastForceCvsroot, mf, false);
03431
03432         userHitOK = true;
03433     }
03434 #endif /* qMacCvsPP */
03435
03436     if( userHitOK )
03437     {
03438         tagName = sLastTag;
03439     }
03440
03441     return userHitOK;
03442 }
03443
03445 bool CompatGetModuleListItem(const MultiFiles* mf,
03446                              CStr& moduleName)
03447 {
03448     bool userHitOK = false;
03449
03450     static CStr sLastModule;
03451     static ItemList sLastModuleList;
03452     static ListPath sLastListPath;
03453     static bool lastForceCvsroot = false;
03454     static CStr sLastCvsroot("");
03455     static CStr sLastRev;
03456     static CStr sLastDate;
03457
03458 #ifdef WIN32
03459     CItemListDlg itemListDlg(mf,
03460         sLastModule, kItemListModule, sLastModuleList, &sLastListPath,
03461         lastForceCvsroot, sLastCvsroot,
03462         sLastRev, sLastDate);
03463
03464     if( itemListDlg.DoModal() == IDOK )
03465     {
03466         sLastModule = itemListDlg.m_item;
03467         sLastListPath = itemListDlg.m_listPath;
03468         sLastRev = itemListDlg.m_rev;
03469         sLastDate = itemListDlg.m_date;
03470         lastForceCvsroot = itemListDlg.m_forceRoot != 0;
03471         sLastCvsroot = itemListDlg.m_cvsroot;
03472
03473         userHitOK = true;
03474     }
03475 #endif /* WIN32 */
03476
03477 #if qUnix
03478     void *wid = NULL;
03479 #   if qGTK
03480     wid = UCreate_SelTagBranchDlg();
03481 #   endif
03482
03483     UCvsItemListDlg *dlg = new UCvsItemListDlg(mf,
03484         sLastModule, kItemListModule, sLastModuleList, &sLastListPath,
03485         lastForceCvsroot, sLastRev, sLastDate);
03486     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
03487     if(dlg->DoModal())
03488     {
03489         sLastModule = dlg->m_item;
03490         sLastListPath = dlg->m_listPath;
03491         sLastRev = dlg->m_rev;
03492         sLastDate = dlg->m_date;
03493         lastForceCvsroot = dlg->m_forceCvsroot;
03494
03495         userHitOK = true;
03496     }
03497     delete dlg;
03498
03499 #endif // qUnix
03500
03501 #ifdef qMacCvsPP
03502     StDialogHandler theHandler(dlg_Select, LCommander::GetTopCommander());
03503     LWindow *theDialog = theHandler.GetDialog();
03504     ThrowIfNil_(theDialog);
03505
03506     theDialog->Show();
03507     theDialog->SetDescriptor(LStr255("Select module"));
03508
03509     DoDataExchange_Select(theDialog, kItemListModule, sLastModule, lastForceCvsroot, mf, true);
03510
03511     MessageT hitMessage;
03512     while (true)
03513     {       // Let DialogHandler process events
03514         hitMessage = theHandler.DoDialog();
03515
03516         if(hitMessage == 'ENDO')
03517             hitMessage = msg_OK;
03518
03519         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
03520             break;
03521
03522         if(hitMessage == item_Refresh)
03523         {
03524             OnRefresh_Select(theDialog, kItemListModule);
03525         }
03526     }
03527     theDialog->Hide();
03528
03529     if(hitMessage == msg_OK)
03530     {
03531         DoDataExchange_Select(theDialog, kItemListModule, sLastModule, lastForceCvsroot, mf, false);
03532
03533         userHitOK = true;
03534     }
03535 #endif /* qMacCvsPP */
03536
03537     if( userHitOK )
03538     {
03539         moduleName = sLastModule;
03540     }
03541
03542     return userHitOK;
03543 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CPStr.h Source File

common/CPStr.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- January 1997
00019  */
00020
00021 /*
00022  * CPStr.h --- simple Pascal-C string
00023  */
00024
00025 #ifndef CPSTR_H
00026 #define CPSTR_H
00027
00028 #include <string.h>
00029 #include <stdlib.h>
00030 #include <exception>
00031
00032 #include "Persistent.h"
00033 #include "ustr.h"
00034
00035 #if TARGET_RT_MAC_MACHO || qUnix
00036 #   ifndef HAVE_STRICMP
00037 #       define stricmp strcasecmp
00038 #   endif
00039 #   ifndef HAVE_STRNICMP
00040 #       define strnicmp strncasecmp
00041 #   endif
00042 #endif
00043
00045 class PCPStr : public CPStr, public CPersistent
00046 {
00047     UDECLARE_DYNAMIC(PCPStr)
00048 public:
00049     // Construction
00050     inline PCPStr(const char* uniqueName, const char* defValue = 0L, kClassPersistent pclass = kNoClass);
00051     virtual ~PCPStr();
00052
00053 public:
00054     // Interface
00055     virtual unsigned int SizeOf(void) const;
00056     virtual const void* GetData(void) const;
00057     virtual void SetData(const void* ptr, unsigned int size);
00058
00059     inline operator const unsigned char*() const;
00060 //  inline operator unsigned char*() EGCS_CONST;
00061
00062     inline operator const char*() const;
00063 //  inline operator char*() EGCS_CONST;
00064
00065     inline PCPStr& operator=(const char* newstr);
00066     inline PCPStr& operator=(const unsigned char* newstr);
00067 };
00068
00070 class PCStr : public CStr, public CPersistent
00071 {
00072     UDECLARE_DYNAMIC(PCStr)
00073 public:
00074     // Construction
00075     inline PCStr(const char* uniqueName, const char* defValue = 0L, kClassPersistent pclass = kNoClass);
00076     virtual ~PCStr();
00077
00078 public:
00079     // Interface
00080     virtual unsigned int SizeOf(void) const;
00081     virtual const void* GetData(void) const;
00082     virtual void SetData(const void* ptr, unsigned int size);
00083
00084     inline operator const char*() const;
00085 //  inline operator char*() EGCS_CONST;
00086
00087     inline PCStr& operator=(const char* newstr);
00088     inline PCStr& operator=(const unsigned char* newstr);
00089 };
00090
00092 // PCPStr inline implementation
00093
00094 inline PCPStr::PCPStr(const char* uniqueName, const char* defValue /*= 0L*/, kClassPersistent pclass /*= kNoClass*/)
00095     : CPStr(), CPersistent(uniqueName, pclass)
00096 {
00097     if( defValue != 0L )
00098         *(CPStr*)this = defValue;
00099 }
00100
00102 inline PCPStr::operator const unsigned char*() const
00103 {
00104     return *(CPStr*)this;
00105 }
00106
00107 #if 0
00108 // Access the string as a P string
00109 inline PCPStr::operator unsigned char*() EGCS_CONST
00110 {
00111     return *(CPStr*)this;
00112 }
00113 #endif
00114
00116 inline PCPStr::operator const char*() const
00117 {
00118     return *(CPStr*)this;
00119 }
00120
00121 #if 0
00122
00123 inline PCPStr::operator char*() EGCS_CONST
00124 {
00125     return *(CPStr*)this;
00126 }
00127 #endif
00128
00130 inline PCPStr& PCPStr::operator=(const char* newstr)
00131 {
00132     ((CPStr*)this)->operator=(newstr);
00133     return *this;
00134 }
00135
00137 inline PCPStr& PCPStr::operator=(const unsigned char* newstr)
00138 {
00139     ((CPStr*)this)->operator=(newstr);
00140     return *this;
00141 }
00142
00144 // PCStr inline implementation
00145
00146 inline PCStr::PCStr(const char* uniqueName, const char* defValue /*= 0L*/, kClassPersistent pclass /*= kNoClass*/)
00147     : CStr(), CPersistent(uniqueName, pclass)
00148 {
00149     if( defValue != 0L )
00150         *(CStr*)this = defValue;
00151 }
00152
00154 inline PCStr::operator const char*() const
00155 {
00156     return *(CStr*)this;
00157 }
00158
00159 #if 0
00160
00161 inline PCStr::operator char*() EGCS_CONST
00162 {
00163     return *(CStr*)this;
00164 }
00165 #endif
00166
00168 inline PCStr& PCStr::operator=(const char* newstr)
00169 {
00170     TouchTimeStamp();
00171     ((CStr*)this)->operator=(newstr);
00172     return *this;
00173 }
00174
00176 inline PCStr& PCStr::operator=(const unsigned char* newstr)
00177 {
00178     TouchTimeStamp();
00179     ((CStr*)this)->operator=(newstr);
00180     return *this;
00181 }
00182
00183 #endif /* CPSTR_H */
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CHHelpPropertySheet Member List

This is the complete list of members for CHHelpPropertySheet, including all inherited members.

CHHelpPropertySheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CHHelpPropertySheet |
CHHelpPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CHHelpPropertySheet |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
InitHelpID() | CHHelpPropertySheet | [protected, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertySheet | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertySheet | [protected]
OnInitDialog() | CHHelpPropertySheet | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertySheet() | CHHelpPropertySheet | [virtual]
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJListCtrl.h Source File

WinCvs/CJLib/Include/CJListCtrl.h

Go to the documentation of this file.
00001 // CJListCtrl.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the CListView articles from http://www.codeguru.com/listview
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:51 $
00011  * $Revision: 1.1.1.2 $
00012  * $Archive: /CodeJock/Include/CJListCtrl.h $
00013  *
00014  * $History: CJListCtrl.h $
00015  *
00016  * *****************  Version 10  *****************
00017  * User: Kirk Stowell Date: 10/30/99   Time: 7:13p
00018  * Updated in $/CodeJock/Include
00019  * Made m_bAscending protected rather than private for access in derived
00020  * classes.
00021  *
00022  * *****************  Version 9  *****************
00023  * User: Kirk Stowell Date: 10/30/99   Time: 2:22p
00024  * Updated in $/CodeJock/Include
00025  * Overrode OnPaint() and  OnEraseBkgnd(...) for flicker free drawing.
00026  *
00027  * *****************  Version 8  *****************
00028  * User: Kirk Stowell Date: 10/26/99   Time: 10:42p
00029  * Updated in $/CodeJock/Include
00030  * Made class methods virtual for inheritance purposes.
00031  *
00032  * *****************  Version 7  *****************
00033  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00034  * Updated in $/CodeJockey/Include
00035  *
00036  * *****************  Version 6  *****************
00037  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00038  * Updated in $/CodeJockey/Include
00039  *
00040  * *****************  Version 5  *****************
00041  * User: Kirk Stowell Date: 7/18/99    Time: 10:14p
00042  * Updated in $/CodeJockey/Include
00043  * Cleaned up inline functions, and import/export macro so that class will
00044  * be imported when linked to, and exported at compile time.
00045  *
00046  * *****************  Version 4  *****************
00047  * User: Kirk Stowell Date: 6/12/99    Time: 3:15a
00048  * Updated in $/CodeJockey/Include
00049  * Cleaned up initialization, sorting and column info saving. Removed sort
00050  * functions, which were replaced with the virtual function SortList(...).
00051  * Override this function in your derived class to perform custom sorting.
00052  * See CCJShellList for an implementation of this virtual function.
00053  *
00054  * *****************  Version 3  *****************
00055  * User: Kirk Stowell Date: 4/03/99    Time: 8:38p
00056  * Updated in $/CodeJockey/Include
00057  * Added comments and cleaned up code.
00058  *
00059  * *****************  Version 2  *****************
00060  * User: Kirk Stowell Date: 3/03/99    Time: 8:37p
00061  * Updated in $/CodeJockey/Include
00062  * Added InitializeFlatHeader() in order to initialize the list control
00063  * manually.
00064  *
00065  * *****************  Version 1  *****************
00066  * User: Kirk Stowell Date: 1/16/99    Time: 8:37p
00067  * Created in $/CodeJockey/Include
00068  * Initial release.
00069  *
00070  ***************************************************************************/
00072
00073 #ifndef __CJLISTCTRL_H__
00074 #define __CJLISTCTRL_H__
00075
00076 #if _MSC_VER > 1000
00077 #pragma once
00078 #endif // _MSC_VER > 1000
00079
00080 class CCJFlatHeaderCtrl;
00081
00082 // CCJListCtrl is a CListCtrl derived class which implements a
00083 // flat header and generic sorting routines.
00084 class _CJX_EXT_CLASS CCJListCtrl : public CListCtrl
00085 {
00086     DECLARE_DYNAMIC(CCJListCtrl)
00087
00088 public:
00089
00090     // Default constructor
00091     //
00092     CCJListCtrl();
00093
00094     // Virtual destructor
00095     //
00096     virtual ~CCJListCtrl();
00097
00098 protected:
00099
00100     int                 m_nMinColWidth;     // minimum width for columns
00101     int                 m_nMaxColWidth;     // maximum width for columns
00102     int                 m_nSortedCol;       // index of currently selected column
00103     CCJFlatHeaderCtrl*  m_pHeaderCtrl;      // points to subclassed flat header control.
00104     CString             m_strSection;       // registry section name.
00105     CString             m_strEntry;         // registry entry name.
00106     CString             m_strDefault;       // registry default value.
00107     CListCtrl*          m_pListCtrl;        // points to the list control associated with this view.
00108     COLORREF            m_clrText;          // RGB value for row text color.
00109     COLORREF            m_clrTextBk;        // RGB value for row text background color.
00110     bool                m_bNoColSizing;     // if true, column sizing is disabled.
00111     int                 m_nMinSize;         // if set, columns will have a minimum size requirement.
00112     bool                m_bAscending;       // flag to determine sorting order
00113
00114 private:
00115
00116     bool                m_bAutoSave;        // true if saving column widths.
00117
00118 // Operations
00119 public:
00120
00121     // this member function will return the column width stored in the registry.
00122     //
00123     virtual int GetStoredWidth(int nCol);
00124
00125     // this member function will automatically size a given column.
00126     //
00127     virtual void AutoSizeColumn(int nCol=-1);
00128
00129     // this member function will set the column width from the
00130     // registry settings.
00131     //
00132     virtual void SetColumnWidth(int nCol);
00133
00134     // this member function loads column widths from the registry.
00135     //
00136     virtual void LoadColumnWidths();
00137
00138     // this member function saves column widths to the registry.
00139     //
00140     virtual void SaveColumnWidths();
00141
00142     // this member function will initialize the autosave feature. If called
00143     // column widths will be saved to system registry when the list control
00144     // window is destroyed.
00145     //
00146     virtual void AutoSaveColumns(
00147         // registry section name, if NULL the default is "Settings".
00148         LPCTSTR lpszSection=NULL,
00149         // registry entry name, if NULL the default is "Column Info".
00150         LPCTSTR lpszEntry=NULL,
00151         // registry default value, if NULL the default id "".
00152         LPCTSTR lpszDefault=NULL);
00153
00154     // call this member function to subclass the the flat header control.
00155     //
00156     virtual bool SubclassHeader(bool bBoldFont=false);
00157
00158     // override this member function in your derived class to
00159     // peform custom sort routines.
00160     //
00161     virtual bool SortList(
00162         // passed in from control, index of column clicked.
00163         int nCol,
00164         // passed in from control, true if sort order should be ascending.
00165         bool bAscending );
00166
00167     // this member function is called to set extended styles for the list
00168     // control ie: LVS_EX_FULLROWSELECT, LVS_EX_GRIDLINES, LVS_EX_HEADERDRAGDROP.
00169     //
00170     virtual void SetExtendedStyle( DWORD dwExStyle );
00171
00172     // this member function is called to return the list control extended style.
00173     //
00174     virtual DWORD GetExtendedStyle();
00175
00176     // call this member function to enable/disable column sizing
00177     //
00178     virtual void DisableColumnSizing(bool bDisable);
00179
00180     // call this member function to set a minimum column size
00181     //
00182     virtual void SetMinimumColSize(int nSize);
00183
00184     // call this member function to determine the row index and column index for a point.
00185     // returns the row index or -1 if point is not over a row.
00186     //
00187     virtual int HitTestEx(
00188         // point to be tested.
00189         CPoint &point,
00190         // to hold the column index
00191         int *col) const;
00192
00193     // adds column after the right most column.
00194     //
00195     virtual int AddColumn(
00196         // the column's heading
00197         LPCTSTR lpszColHeading,
00198         // Width of the column, in pixels. If this parameter is -1,
00199         // the column width is the same as previous column
00200         int nWidth = -1,
00201         // the alignment of the column. Can be LVCFMT_LEFT,
00202         // LVCFMT_RIGHT, or LVCFMT_CENTER.
00203         int nFormat=LVCFMT_LEFT);
00204
00205     // this member function will build the columns for the list control. Returns
00206     // false if an error occured.
00207     //
00208     virtual bool BuildColumns(
00209         // number of columns the list control contains
00210         int nCols,
00211         // int array containing the column widths
00212         int* nWidth,
00213         // CString array containing the string for each column
00214         CString* strColString );
00215
00216     // this member function will build the columns for the list control. Returns
00217     // false if an error occured.
00218     //
00219     virtual bool BuildColumns(
00220         // number of columns the list control contains
00221         int nCols,
00222         // int array containing the column widths
00223         int* nWidth,
00224         // int array containing the  string resource id for each column
00225         int* nColString );
00226
00227     // sets the row text and background colors.
00228     virtual void SetRowColors(COLORREF clrText, COLORREF clrTextBk);
00229
00230     // returns the number of columns in the list.
00231     virtual int GetColumnCount() const;
00232
00233     // copies a row to a new location.
00234     //
00235     virtual bool CopyRow(int nFrom, int nTo);
00236
00237     // moves a row to a new location.
00238     //
00239     virtual bool MoveRow(int nFrom, int nTo);
00240
00241 // Overrides
00242     // ClassWizard generated virtual function overrides
00243     //{{AFX_VIRTUAL(CCJListCtrl)
00244     protected:
00245     virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
00246     //}}AFX_VIRTUAL
00247
00248     // Generated message map functions
00249 protected:
00250     //{{AFX_MSG(CCJListCtrl)
00251     afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
00252     afx_msg void OnDestroy();
00253     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00254     afx_msg void OnPaint();
00255     //}}AFX_MSG
00256
00257     DECLARE_MESSAGE_MAP()
00258 };
00259
00261 //  Inline Functions
00263
00264 _CJXLIB_INLINE DWORD CCJListCtrl::GetExtendedStyle()
00265     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); }
00266
00267 _CJXLIB_INLINE void CCJListCtrl::SetExtendedStyle(DWORD dwExStyle)
00268     { ASSERT(::IsWindow(m_hWnd)); SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, GetExtendedStyle()|dwExStyle); }
00269
00270 _CJXLIB_INLINE void CCJListCtrl::SetRowColors(COLORREF clrText, COLORREF clrTextBk)
00271     { m_clrText = clrText; m_clrTextBk = clrTextBk; }
00272
00273 _CJXLIB_INLINE void CCJListCtrl::SetMinimumColSize(int nSize)
00274     { m_nMinSize = nSize; }
00275
00276 _CJXLIB_INLINE void CCJListCtrl::DisableColumnSizing(bool bDisable)
00277     { m_bNoColSizing = bDisable; }
00278
00280
00281 //{{AFX_INSERT_LOCATION}}
00282 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00283
00284 #endif // __CJLISTCTRL_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KiRecursionModel Member List

This is the complete list of members for KiRecursionModel, including all inherited members.

GetNotificationManager()=0 | KiFilterBase | [pure virtual]
IsShowRecursive()=0 | KiRecursionModel | [pure virtual]
LoadSettings()=0 | KiFilterBase | [pure virtual]
SaveSettings()=0 | KiFilterBase | [pure virtual]

Generated on Sat Aug 7 22:53:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoCustomView Member List

This is the complete list of members for TPseudoCustomView, including all inherited members.

Draw(const CViewRect &area) | TPseudoCustomView | [virtual]
MA_DECLARE_CLASS | TPseudoCustomView | [private]
TPseudoCustomView() | TPseudoCustomView |
~TPseudoCustomView() | TPseudoCustomView | [virtual]

Generated on Sat Aug 7 22:57:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJDateEdit Member List

This is the complete list of members for CCJDateEdit, including all inherited members.

CCJDateEdit() | CCJDateEdit |
CCJMaskEdit() | CCJMaskEdit |
CheckChar(UINT nChar) | CCJMaskEdit | [virtual]
FormatOleDateTime(CString &strData, COleDateTime dt) | CCJDateEdit | [virtual]
GetDateTime() | CCJDateEdit | [virtual]
GetWindowDateTime() | CCJDateEdit | [virtual]
m_bMaskKeyInProgress | CCJMaskEdit |
m_bUseMask | CCJMaskEdit |
m_Font | CCJMaskEdit |
m_strLiteral | CCJMaskEdit |
m_strMask | CCJMaskEdit |
m_strMaskLiteral | CCJMaskEdit |
m_strValid | CCJMaskEdit |
m_strWindowText | CCJMaskEdit |
OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJMaskEdit | [protected]
OnEraseBkgnd(CDC *pDC) | CCJMaskEdit | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJMaskEdit | [protected]
OnPaint() | CCJMaskEdit | [protected]
ProcessMask(UINT nChar, int nEndPos) | CCJDateEdit | [virtual]
ReadOleDateTime(LPCTSTR lpszData) | CCJDateEdit | [virtual]
SendChar(UINT nChar) | CCJMaskEdit | [virtual]
SetDateTime(COleDateTime &dt) | CCJDateEdit | [virtual]
SetDateTime(CString strDate) | CCJDateEdit | [virtual]
SetEditMask(LPCTSTR lpszMask, LPCTSTR lpszLiteral, LPCTSTR lpszWindowText) | CCJMaskEdit | [virtual]
UpdateFont() | CCJMaskEdit | [virtual]
~CCJMaskEdit() | CCJMaskEdit | [virtual]

Generated on Sat Aug 7 22:49:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPPMenu Member List

This is the complete list of members for UPPMenu, including all inherited members.

_GetBaseClass() | UMenu | [protected, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUMenu | UMenu | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UMenu | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UMenu | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UMenu | [virtual]
GetThisMessageMap() | UMenu | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UMenu | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCommands(int cmd) | UMenu | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UMenu | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUMenu(void) | UMenu | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sPPMenuWidID | UPPMenu | [static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UMenu(int widid) | UMenu |
UObject() | UObject | [inline, protected]
UPPMenu() | UPPMenu |
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UMenu() | UMenu | [virtual]
~UObject() | UObject | [inline, virtual]
~UPPMenu() | UPPMenu | [virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:55:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoAppBehavior Member List

This is the complete list of members for TPseudoAppBehavior, including all inherited members.

DoIdle(IdlePhase phase) | TPseudoAppBehavior | [virtual]
DoMenuCommand(CommandNumber aCommandNumber) | TPseudoAppBehavior | [virtual]
DoSetupMenus() | TPseudoAppBehavior | [virtual]
DoToolboxEvent(TToolboxEvent *event) | TPseudoAppBehavior | [virtual]
MA_DECLARE_CLASS | TPseudoAppBehavior | [private]
TPseudoAppBehavior() | TPseudoAppBehavior |
~TPseudoAppBehavior() | TPseudoAppBehavior | [virtual]

Generated on Sat Aug 7 22:57:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TraversalReport Member List

This is the complete list of members for TraversalReport, including all inherited members.

EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TraversalReport | [virtual]
ExitDirectory(const char *fullpath) | TraversalReport | [virtual]
GetRefRunning() | TraversalReport | [static]
m_running | TraversalReport | [private, static]
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnError(const char *err, int errcode) | TraversalReport | [virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnIdle(const char *fullpath) | TraversalReport | [virtual]

Generated on Sat Aug 7 22:57:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWinLogBranchData Member List

This is the complete list of members for CWinLogBranchData, including all inherited members.

Bounds(void) | CWinLogData | [inline]
Bounds(void) | CWinLogData | [inline]
CollectMergePointPairPass1(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass1Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected, virtual]
CollectMergePointPairPass2(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected]
CollectMergePointPairPass2Self(vector< pair< CWinLogData *, CWinLogData * > > &mergePair) | CWinLogData | [protected, virtual]
ComputeBounds(const UPoint &topLeft, UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
ComputeBounds(const CPoint &topLeft, CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
CreateNewData(CLogNode *node) | CWinLogData | [static]
CreateNewData(CLogNode *node) | CWinLogData | [static]
CWinLogBranchData(CLogNode *node) | CWinLogBranchData | [inline]
CWinLogBranchData(CLogNode *node) | CWinLogBranchData | [inline]
CWinLogData(CLogNode *node) | CWinLogData |
CWinLogData(CLogNode *node) | CWinLogData |
GetBoundsSelf(UDC &hdc, EntnodeData *entryInfo) | CWinLogBranchData | [protected, virtual]
GetBoundsSelf(CDC &dc, EntnodeData *entryInfo) | CWinLogBranchData | [protected, virtual]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetData(CLogNode *node) | CWinLogData | [inline, protected]
GetStr(void) | CWinLogData |
GetStr(void) | CWinLogData |
GetType(void) const | CWinLogData | [inline]
GetType(void) const | CWinLogData | [inline]
HitTest(UPoint point) | CWinLogData |
HitTest(CPoint point) | CWinLogData |
IsDeadNode() | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsDiskNode(EntnodeData *entryInfo) | CWinLogData |
IsUserState() | CWinLogData |
Offset(UPoint o) | CWinLogData |
Offset(CPoint offset) | CWinLogData |
sel | CWinLogData | [protected]
Selected(void) const | CWinLogData | [inline]
Selected(void) const | CWinLogData | [inline]
selfB | CWinLogData | [protected]
SelfBounds(void) | CWinLogData | [inline]
SelfBounds(void) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
SetSelected(bool state) | CWinLogData | [inline]
SetSelected(CScrollView *view, bool state) | CWinLogData |
totB | CWinLogData | [protected]
UnselectAll(CScrollView *view) | CWinLogData |
UnselectAll(void) | CWinLogData |
UnselectAll(CScrollView *view) | CWinLogData |
Update(UDC &hdc, EntnodeData *entryInfo=0L) | CWinLogData |
Update(CDC &dc, EntnodeData *entryInfo=0L) | CWinLogData |
UpdateMergePoints(CDC &dc) | CWinLogData |
UpdateSelf(UDC &hdc, EntnodeData *entryInfo) | CWinLogBranchData | [protected, virtual]
UpdateSelf(CDC &dc, EntnodeData *entryInfo) | CWinLogBranchData | [protected, virtual]
~CWinLogBranchData() | CWinLogBranchData | [inline, virtual]
~CWinLogBranchData() | CWinLogBranchData | [inline, virtual]
~CWinLogData() | CWinLogData | [virtual]
~CWinLogData() | CWinLogData | [virtual]

Generated on Sat Aug 7 22:58:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UMenu Member List

This is the complete list of members for UMenu, including all inherited members.

_GetBaseClass() | UMenu | [protected, static]
_messageEntries | UMenu | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUMenu | UMenu | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UMenu | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UMenu | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UMenu | [virtual]
GetThisMessageMap() | UMenu | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UMenu | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCommands(int cmd) | UMenu | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UMenu | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUMenu(void) | UMenu | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UMenu(int widid) | UMenu |
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UMenu() | UMenu | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:55:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJListView.cpp Source File

WinCvs/CJLib/CJLibrary/CJListView.cpp

Go to the documentation of this file.
00001 // CJListView.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the CListView articles from http://www.codeguru.com/listview
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:49 $
00011  * $Revision: 1.1.1.3 $
00012  * $Archive: /CodeJock/CJLibrary/CJListView.cpp $
00013  *
00014  * $History: CJListView.cpp $
00015  *
00016  * *****************  Version 9  *****************
00017  * User: Kirk Stowell Date: 10/30/99   Time: 2:04p
00018  * Updated in $/CodeJock/CJLibrary
00019  * Overrode OnEraseBkgnd(...) for flicker free drawing.
00020  *
00021  * *****************  Version 8  *****************
00022  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00023  * Updated in $/CodeJock/CJLibrary
00024  * Modified resource include for static builds.
00025  *
00026  * *****************  Version 7  *****************
00027  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00028  * Updated in $/CodeJockey/CJLibrary
00029  * Added Unicode compliance, thanks to Barry Burton for his help with
00030  * this.
00031  *
00032  *
00033  * *****************  Version 6  *****************
00034  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00035  * Updated in $/CodeJockey/CJLibrary
00036  *
00037  * *****************  Version 5  *****************
00038  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00039  * Updated in $/CodeJockey/CJLibrary
00040  *
00041  * *****************  Version 4  *****************
00042  * User: Kirk Stowell Date: 6/12/99    Time: 2:21a
00043  * Updated in $/CodeJockey/CJ60Lib
00044  * Cleaned up initialization, sorting and column info saving. Removed sort
00045  * functions, which were replaced with the virtual function SortList(...).
00046  * Override this function in your derived class to perform custom sorting.
00047  * See CCJShellList for an implementation of this virtual function.
00048  *
00049  * *****************  Version 3  *****************
00050  * User: Kirk Stowell Date: 4/03/99    Time: 12:06a
00051  * Updated in $/CodeJockey/CJ60Lib
00052  * Added comments and cleaned up code.
00053  *
00054  * *****************  Version 2  *****************
00055  * User: Kirk Stowell Date: 3/03/99    Time: 12:06a
00056  * Updated in $/CodeJockey/CJ60Lib
00057  * Added InitializeFlatHeader() in order to initialize the list control
00058  * manually.
00059  *
00060  * *****************  Version 1  *****************
00061  * User: Kirk Stowell Date: 1/16/99    Time: 12:06a
00062  * Created in $/CodeJockey/CJ60Lib
00063  * Initial release.
00064  *
00065  ***************************************************************************/
00067
00068 #include "stdafx.h"
00069 #include "CJListView.h"
00070 #include "CJFlatHeaderCtrl.h"
00071 #include "CJResource.h"
00072
00073 #ifdef _DEBUG
00074 #define new DEBUG_NEW
00075 #undef THIS_FILE
00076 static char THIS_FILE[] = __FILE__;
00077 #endif
00078
00080 // CCJListView
00081
00082 IMPLEMENT_DYNCREATE(CCJListView, CListView)
00083
00084 CCJListView::CCJListView()
00085 {
00086     m_nMinSize      = 0;
00087     m_nMinColWidth  = 50;
00088     m_nMaxColWidth  = 500;
00089     m_nSortedCol    = -1;
00090     m_bAscending    = true;
00091     m_bAutoSave     = false;
00092     m_bNoColSizing  = false;
00093     m_pHeaderCtrl   = NULL;
00094     m_pListCtrl     = NULL;
00095     m_clrText       = ::GetSysColor(COLOR_WINDOWTEXT);
00096     m_clrTextBk     = ::GetSysColor(COLOR_WINDOW);
00097 }
00098
00099 CCJListView::~CCJListView()
00100 {
00101     _delete( m_pHeaderCtrl );
00102 }
00103
00104
00105 BEGIN_MESSAGE_MAP(CCJListView, CListView)
00106     //{{AFX_MSG_MAP(CCJListView)
00107     ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw)
00108     ON_WM_DESTROY()
00109     ON_WM_ERASEBKGND()
00110     //}}AFX_MSG_MAP
00111 END_MESSAGE_MAP()
00112
00114 // CCJListView drawing
00115
00116 void CCJListView::OnDraw( CDC* pDC )
00117 {
00118     UNUSED_ALWAYS( pDC );
00119 }
00120
00122 // CCJListView diagnostics
00123
00124 #ifdef _DEBUG
00125 void CCJListView::AssertValid() const
00126 {
00127     CListView::AssertValid();
00128 }
00129
00130 void CCJListView::Dump(CDumpContext& dc) const
00131 {
00132     CListView::Dump(dc);
00133 }
00134 #endif //_DEBUG
00135
00137 // CCJListView message handlers
00138
00139 void CCJListView::OnInitialUpdate()
00140 {
00141     CListView::OnInitialUpdate();
00142
00143     // Set a pointer to the list control.
00144     m_pListCtrl = &GetListCtrl();
00145 }
00146
00147 // Taken from: Copying/Moving Rows in CListCtrl by James Spibey [spib@bigfoot.com].
00148 // http://www.codeguru.com/listview/moving_rows.html
00149 bool CCJListView::MoveRow(int nFrom, int nTo)
00150 {
00151     //Can't move to the same place, or from or to a negative index
00152     if(nFrom == nTo || nFrom < 0 || nTo < 0)
00153         return false;
00154
00155     //First Copy the row to the new location
00156     if(CopyRow(nFrom, nTo))
00157     {
00158         //If we have just inserted a row before
00159         //this one in the list, we need to increment
00160         //our index.
00161         if(nFrom > nTo)
00162             m_pListCtrl->DeleteItem(nFrom + 1);
00163         else
00164             m_pListCtrl->DeleteItem(nFrom);
00165
00166         return true;
00167     }
00168     else
00169         return false;
00170 }
00171
00172 // Taken from: Copying/Moving Rows in CListCtrl by James Spibey [spib@bigfoot.com].
00173 // http://www.codeguru.com/listview/moving_rows.html
00174 bool CCJListView::CopyRow(int nFrom, int nTo)
00175 {
00176     //Can't move to the same place, or from or to a negative index
00177     if(nFrom == nTo || nFrom < 0 || nTo < 0)
00178         return false;
00179
00180     //Copy the row to the new index
00181     m_pListCtrl->InsertItem(nTo, m_pListCtrl->GetItemText(nFrom, 0));
00182
00183     //If row has been inserted before original
00184     //increment the original
00185     if(nFrom > nTo)
00186         nFrom++;
00187
00188     //Loop through subitems
00189     for(int i = 1; i < GetColumnCount(); i++)
00190     {
00191         m_pListCtrl->SetItemText(nTo, i, m_pListCtrl->GetItemText(nFrom, i));
00192     }
00193
00194     return true;
00195 }
00196
00197 // Taken from: Getting the number of columns in report view by Zafir Anjum.
00198 // http://www.codeguru.com/listview/num_cols.shtml
00199 int CCJListView::GetColumnCount() const
00200 {
00201     CHeaderCtrl* pHeader = (CHeaderCtrl*)m_pListCtrl->GetDlgItem(0);
00202     return pHeader->GetItemCount();
00203 }
00204
00205 // Taken from: Simpler way to do this (using new version of Comctl32.dll) by Vidas [vibal@lrtc.lt].
00206 // http://www.codeguru.com/mfc/comments/6432.shtml
00207 void CCJListView::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)
00208 {
00209     LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pNMHDR;
00210
00211     switch(lplvcd->nmcd.dwDrawStage)
00212     {
00213     case CDDS_PREPAINT:
00214         // Request prepaint notifications for each item.
00215         *pResult = CDRF_NOTIFYITEMDRAW;
00216         break;
00217
00218     case CDDS_ITEMPREPAINT: // Requested notification
00219         if(lplvcd->nmcd.dwItemSpec % 2)
00220         {
00221             lplvcd->clrText   = m_clrText;
00222             lplvcd->clrTextBk = m_clrTextBk;
00223         }
00224         *pResult = CDRF_DODEFAULT;
00225         break;
00226     }
00227 }
00228
00229 BOOL CCJListView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
00230 {
00231     HD_NOTIFY *pHDNotify = (HD_NOTIFY*)lParam;
00232
00233     switch( pHDNotify->hdr.code )
00234     {
00235     // Sorting the list when user clicks on column header by Zafir Anjum.
00236     // http://www.codeguru.com/listview/sort_on_col_click.shtml
00237     case HDN_ITEMCLICKA:
00238     case HDN_ITEMCLICKW:
00239         {
00240             if( pHDNotify->iButton == 0 )
00241             {
00242                 // set the sort order.
00243                 if( pHDNotify->iItem == m_nSortedCol )
00244                     m_bAscending = !m_bAscending;
00245                 else
00246                     m_bAscending = true;
00247
00248                 // save the column index.
00249                 m_nSortedCol = pHDNotify->iItem;
00250
00251                 // virtual call to sort list.
00252                 SortList( m_nSortedCol, m_bAscending );
00253
00254                 // set the sort image in the header control.
00255                 if( m_pHeaderCtrl && m_pHeaderCtrl->GetSafeHwnd( ))
00256                     m_pHeaderCtrl->SetSortImage( m_nSortedCol, m_bAscending );
00257             }
00258         }
00259         break;
00260
00261     // How to force a minimum column width Cees Mechielsen.
00262     // http://www.codeguru.com/mfc/comments/866.shtml
00263     case HDN_ITEMCHANGINGA:
00264     case HDN_ITEMCHANGINGW:
00265     case HDN_ENDTRACK:
00266         {
00267             if( pHDNotify->pitem->mask & HDI_WIDTH &&
00268                 pHDNotify->pitem->cxy < m_nMinSize &&
00269                 pHDNotify->pitem->cxy >= 0 )
00270             {
00271                 pHDNotify->pitem->cxy = m_nMinSize; // Set the column width
00272             }
00273         }
00274         break;
00275
00276     // Prevent CListCtrl column resizing by Zafir Anjum.
00277     // http://www.codeguru.com/listview/no_col_resize.shtml
00278     case HDN_DIVIDERDBLCLICKA:
00279     case HDN_DIVIDERDBLCLICKW:
00280     case HDN_BEGINTRACKW:
00281     case HDN_BEGINTRACKA:
00282         {
00283             if(m_bNoColSizing)
00284             {
00285                 *pResult = TRUE;                // disable tracking
00286                 return TRUE;                    // Processed message
00287             }
00288             break;
00289         }
00290     }
00291
00292     return CListView::OnNotify(wParam, lParam, pResult);
00293 }
00294
00295 bool CCJListView::SortList(int nCol, bool bAscending)
00296 {
00297 #ifdef _DEBUG
00298     TRACE2("Column sort on column index %d, ascending=%d", nCol, bAscending);
00299 #else
00300     UNUSED_ALWAYS( nCol );
00301     UNUSED_ALWAYS( bAscending );
00302 #endif
00303
00304     return true;
00305 }
00306
00307 // Taken from: Adding a column by Zafir Anjum.
00308 // http://www.codeguru.com/listview/add_column.shtml
00309
00310 // AddColumn      - adds column after the right most column
00311 // Returns        - the index of the new column if successful or -1 otherwise.
00312 // lpszColHeading - the column's heading
00313 // nWidth         - Width of the column, in pixels. If this parameter is -1,
00314 //                  the column width is the same as previous column
00315 // nFormat        - the alignment of the column. Can be LVCFMT_LEFT,
00316 //                  LVCFMT_RIGHT, or LVCFMT_CENTER.
00317 int CCJListView::AddColumn(LPCTSTR lpszColHeading, int nWidth/*=-1*/, int nFormat/*=LVCFMT_LEFT*/)
00318 {
00319     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00320     int nColumnCount = pHeader->GetItemCount();
00321
00322     if( nWidth == -1 )
00323     {
00324         // The line below return zero for ICON views
00325         //nWidth = GetColumnWidth( nColumnCount - 1 );
00326
00327         // Get the column width of the previous column from header control
00328         HD_ITEM hd_item;
00329         hd_item.mask = HDI_WIDTH;               //indicate that we want the width
00330         pHeader->GetItem( nColumnCount - 1, &hd_item );
00331         nWidth = hd_item.cxy;
00332     }
00333     return m_pListCtrl->InsertColumn( nColumnCount, lpszColHeading, nFormat, nWidth, nColumnCount );
00334 }
00335
00336 bool CCJListView::BuildColumns(int nCols, int* nWidth, int* nColString)
00337 {
00338     for( int i = 0; i < nCols; ++i ) {
00339         CString strTemp; strTemp.LoadString( nColString[i] );
00340         if(AddColumn(strTemp, nWidth[i])==-1)
00341             return false;
00342     }
00343
00344     return true;
00345 }
00346
00347 bool CCJListView::BuildColumns(int nCols, int* nWidth, CString* strColString)
00348 {
00349     for( int i = 0; i < nCols; ++i ) {
00350         if(AddColumn(strColString[i], nWidth[i])==-1)
00351             return false;
00352     }
00353
00354     return true;
00355 }
00356
00357 // Taken from: Detecting column index of the item clicked by Zafir Anjum.
00358 // http://www.codeguru.com/listview/col_index.shtml
00359
00360 // HitTestEx    - Determine the row index and column index for a point
00361 // Returns      - the row index or -1 if point is not over a row
00362 // point        - point to be tested.
00363 // nCol         - to hold the column index
00364 int CCJListView::HitTestEx(CPoint& point, int* nCol) const
00365 {
00366     int colnum = 0;
00367     int row = m_pListCtrl->HitTest( point, NULL );
00368
00369     if( nCol ) *nCol = 0;
00370
00371     // Make sure that the ListView is in LVS_REPORT
00372     if( (GetWindowLong(m_hWnd, GWL_STYLE) & LVS_TYPEMASK) != LVS_REPORT )
00373         return row;
00374
00375     // Get the top and bottom row visible
00376     row = m_pListCtrl->GetTopIndex();
00377     int bottom = row + m_pListCtrl->GetCountPerPage();
00378     if( bottom > m_pListCtrl->GetItemCount() )
00379         bottom = m_pListCtrl->GetItemCount();
00380
00381     // Get the number of columns
00382     CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
00383     int nColumnCount = pHeader->GetItemCount();
00384
00385     // Loop through the visible rows
00386     for( ;row <= bottom;row++)
00387     {
00388         // Get bounding rect of item and check whether point falls in it.
00389         CRect rect;
00390         m_pListCtrl->GetItemRect( row, &rect, LVIR_BOUNDS );
00391         if( rect.PtInRect(point) )
00392         {
00393             // Now find the column
00394             for( colnum = 0; colnum < nColumnCount; colnum++ )
00395             {
00396                 int colwidth = m_pListCtrl->GetColumnWidth(colnum);
00397                 if( point.x >= rect.left
00398                     && point.x <= (rect.left + colwidth ) )
00399                 {
00400                     if( nCol ) *nCol = colnum;
00401                     return row;
00402                 }
00403                 rect.left += colwidth;
00404             }
00405         }
00406     }
00407     return -1;
00408 }
00409
00410 bool CCJListView::SubclassHeader(bool bBoldFont/*=false*/)
00411 {
00412     // allocate memory for the flat header.
00413     m_pHeaderCtrl = new CCJFlatHeaderCtrl;
00414     ASSERT( m_pHeaderCtrl );
00415
00416     // get the window handle to the existing header
00417     // control.
00418     HWND hWnd = GetDlgItem(0)->GetSafeHwnd();
00419     ASSERT( hWnd );
00420
00421     // subclass the flat header control.
00422     if( !m_pHeaderCtrl->SubclassWindow( hWnd ))
00423         return false;
00424
00425     // finish header initialization.
00426     m_pHeaderCtrl->InitializeHeader( bBoldFont );
00427
00428     return true;
00429 }
00430
00431 void CCJListView::AutoSaveColumns(LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault)
00432 {
00433     m_bAutoSave = true;
00434
00435     // initialize registry strings.
00436     if( lpszSection == NULL ) m_strSection = _T("Settings");
00437     else m_strSection = lpszSection;
00438
00439     if( lpszEntry == NULL ) m_strEntry = _T("Column Info");
00440     else m_strEntry = lpszEntry;
00441
00442     if( lpszDefault == NULL ) m_strDefault = _T("");
00443     else m_strDefault = lpszDefault;
00444
00445     LoadColumnWidths();
00446 }
00447
00448 void CCJListView::SaveColumnWidths()
00449 {
00450     // get a pointer to the header control.
00451     CHeaderCtrl* pHeader = DYNAMIC_DOWNCAST(CHeaderCtrl, GetDlgItem(0));
00452     ASSERT_KINDOF( CHeaderCtrl, pHeader );
00453
00454     CString strValue;
00455     for( int i = 0; i < pHeader->GetItemCount(); ++i )
00456     {
00457         CString strTemp;
00458         strTemp.Format(_T("%d,"), m_pListCtrl->GetColumnWidth( i ));
00459         strValue += strTemp;
00460     }
00461
00462     AfxGetApp()->WriteProfileString( m_strSection, m_strEntry, strValue );
00463 }
00464
00465 void CCJListView::LoadColumnWidths()
00466 {
00467     // get a pointer to the header control.
00468     CHeaderCtrl* pHeader = DYNAMIC_DOWNCAST(CHeaderCtrl, GetDlgItem(0));
00469     ASSERT_KINDOF( CHeaderCtrl, pHeader );
00470
00471     for( int i = 0; i < pHeader->GetItemCount(); ++i )
00472         SetColumnWidth(i);
00473 }
00474
00475 void CCJListView::SetColumnWidth(int nCol)
00476 {
00477     int nWidth = GetStoredWidth( nCol );
00478     if( nWidth > m_nMinColWidth )
00479         m_pListCtrl->SetColumnWidth( nCol, nWidth );
00480     else
00481         AutoSizeColumn( nCol );
00482 }
00483
00484 int CCJListView::GetStoredWidth(int nCol)
00485 {
00486     // get the value from the registry.
00487     CString strValue = AfxGetApp()->GetProfileString(
00488         m_strSection, m_strEntry, m_strDefault );
00489
00490     // extract the sub string to get the column width.
00491     CString strSubString;
00492     AfxExtractSubString( strSubString, strValue, nCol, _T(','));
00493
00494     // return the width from the registry.
00495     return _ttoi( strSubString );
00496 }
00497
00498 void CCJListView::OnDestroy()
00499 {
00500     if( m_bAutoSave ) SaveColumnWidths();
00501     CListView::OnDestroy();
00502 }
00503
00504 // Taken from: Autosize a column to fit its content by Roger Onslow.
00505 // http://www.codeguru.com/listview/autosize_col.shtml
00506 // If you don't supply a column number, it will resize all columns.
00507 void CCJListView::AutoSizeColumn(int nCol/*=-1*/)
00508 {
00509     // Call this after your list control is filled
00510     SetRedraw( false );
00511
00512     int nMinCol = nCol < 0 ? 0 : nCol;
00513     int nMaxCol = nCol < 0 ? GetColumnCount()-1 : nCol;
00514
00515     for (nCol = nMinCol; nCol <= nMaxCol; nCol++)
00516     {
00517         m_pListCtrl->SetColumnWidth( nCol, LVSCW_AUTOSIZE );
00518         int wc1 = m_pListCtrl->GetColumnWidth( nCol );
00519
00520         m_pListCtrl->SetColumnWidth( nCol, LVSCW_AUTOSIZE_USEHEADER );
00521         int wc2 = m_pListCtrl->GetColumnWidth( nCol );
00522         int wc = max( m_nMinColWidth, max( wc1, wc2 ));
00523
00524         if( wc > m_nMaxColWidth )
00525             wc = m_nMaxColWidth;
00526
00527         // set the column width.
00528         m_pListCtrl->SetColumnWidth( nCol,wc );
00529     }
00530
00531     SetRedraw();
00532 }
00533
00534 BOOL CCJListView::OnEraseBkgnd(CDC* pDC)
00535 {
00536     CRect rectClient;
00537     GetClientRect( &rectClient );
00538     pDC->ExcludeClipRect( &rectClient );
00539     return CListView::OnEraseBkgnd(pDC);
00540 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJFlatSplitterWnd Member List

This is the complete list of members for CCJFlatSplitterWnd, including all inherited members.

CCJFlatSplitterWnd() | CCJFlatSplitterWnd |
DisableFlatStyle(BOOL bDisable=TRUE) | CCJFlatSplitterWnd | [virtual]
HideColumn(int nColHide) | CCJFlatSplitterWnd | [virtual]
HideRow(int nRowHide) | CCJFlatSplitterWnd | [virtual]
m_bFlatSplitter | CCJFlatSplitterWnd | [protected]
m_nHiddenCol | CCJFlatSplitterWnd | [protected]
m_nHiddenRow | CCJFlatSplitterWnd | [protected]
OnDrawSplitter(CDC *pDC, ESplitType nType, const CRect &rect) | CCJFlatSplitterWnd | [virtual]
OnPaint() | CCJFlatSplitterWnd | [protected]
ReplaceView(int nRow, int nCol, CRuntimeClass *pViewClass) | CCJFlatSplitterWnd | [virtual]
ShowColumn() | CCJFlatSplitterWnd | [virtual]
ShowRow() | CCJFlatSplitterWnd | [virtual]
SwitchView(int nRow, int nCol, CView *pNewView) | CCJFlatSplitterWnd | [virtual]
~CCJFlatSplitterWnd() | CCJFlatSplitterWnd | [virtual]

Generated on Sat Aug 7 22:49:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

_sDiffOptionsItem Member List

This is the complete list of members for _sDiffOptionsItem, including all inherited members.

description | _sDiffOptionsItem
option | _sDiffOptionsItem

Generated on Sat Aug 7 22:48:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTcl_Interp Member List

This is the complete list of members for CTcl_Interp, including all inherited members.

CTcl_Interp() | CTcl_Interp |
Deunixfy(UStr &path) | CTcl_Interp | [static]
DoFile(const char *file) | CTcl_Interp |
DoScript(const char *script) | CTcl_Interp |
DoScriptVar(const char *format,...) | CTcl_Interp |
fExitOnError | CTcl_Interp | [private]
fInterp | CTcl_Interp | [private]
fLastErrorCode | CTcl_Interp | [private]
GetCvsExitOnError() const | CTcl_Interp | [inline]
GetCvsLastErrorCode() const | CTcl_Interp | [inline]
IsAvail(const bool forceReload=false) | CTcl_Interp | [static]
operator Tcl_Interp *(void) | CTcl_Interp | [inline]
SetCvsExitOnError(const bool value) | CTcl_Interp | [inline]
SetCvsLastErrorCode(const int value) | CTcl_Interp | [inline]
Unixfy(UStr &path) | CTcl_Interp | [static]
~CTcl_Interp() | CTcl_Interp |

Generated on Sat Aug 7 22:56:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoWatchOnHandler Member List

This is the complete list of members for KoWatchOnHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoWatchOnHandler() | KoWatchOnHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoWatchOnHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoWatchOnHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsFolders Member List

This is the complete list of members for UCvsFolders, including all inherited members.

_GetBaseClass() | UCvsFolders | [protected, static]
_messageEntries | UCvsFolders | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsFolders | UCvsFolders | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
DeleteAllItems(void) | UCvsFolders |
DeleteAllItems(UTREEITEM root) | UCvsFolders |
DisableGeneric() | UCvsFolders | [protected]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UCvsFolders | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetItemByLocation(const char *path) | UCvsFolders | [protected]
GetMessageMap() const | UCvsFolders | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRoot(void) const | UCvsFolders | [inline]
GetRuntimeClass() const | UCvsFolders | [virtual]
GetThisMessageMap() | UCvsFolders | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_root | UCvsFolders | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UCvsFolders | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnCmdAdd(void) | UCvsFolders | [protected]
OnCmdCheckout(void) | UCvsFolders | [protected]
OnCmdCommit(void) | UCvsFolders | [protected]
OnCmdDiff(void) | UCvsFolders | [protected]
OnCmdEdit(void) | UCvsFolders | [protected]
OnCmdEditors(void) | UCvsFolders | [protected]
OnCmdExplore(void) | UCvsFolders | [protected]
OnCmdImport(void) | UCvsFolders | [protected]
OnCmdLock(void) | UCvsFolders | [protected]
OnCmdLog(void) | UCvsFolders | [protected]
OnCmdMacrosSel(int cmd) | UCvsFolders | [protected]
OnCmdQueryUpdate(void) | UCvsFolders | [protected]
OnCmdRelease(void) | UCvsFolders | [protected]
OnCmdResEdit(void) | UCvsFolders | [protected]
OnCmdStatus(void) | UCvsFolders | [protected]
OnCmdTagBranch(void) | UCvsFolders | [protected]
OnCmdTagDelete(void) | UCvsFolders | [protected]
OnCmdTagNew(void) | UCvsFolders | [protected]
OnCmdUIAdd(UCmdUI *pCmdUI) | UCvsFolders | [protected]
OnCmdUICheckout(UCmdUI *pCmdUI) | UCvsFolders | [protected]
OnCmdUIExplore(UCmdUI *pCmdUI) | UCvsFolders | [protected]
OnCmdUIImport(UCmdUI *pCmdUI) | UCvsFolders | [protected]
OnCmdUIMacrosSel(int cmd, UCmdUI *pCmdUI) | UCvsFolders | [protected]
OnCmdUIResEdit(UCmdUI *pCmdUI) | UCvsFolders | [protected]
OnCmdUIUpdate(UCmdUI *pCmdUI) | UCvsFolders | [protected]
OnCmdUnedit(void) | UCvsFolders | [protected]
OnCmdUnlock(void) | UCvsFolders | [protected]
OnCmdUpdate(void) | UCvsFolders | [protected]
OnCmdWatchers(void) | UCvsFolders | [protected]
OnCmdWatchOff(void) | UCvsFolders | [protected]
OnCmdWatchOn(void) | UCvsFolders | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCreate() | UCvsFolders | [protected]
OnDestroy() | UCvsFolders | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeExpanding(int collapse, UTREEITEM item) | UCvsFolders | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSelecting(int deselect, UTREEITEM item) | UCvsFolders | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateGeneric(UCmdUI *pCmdUI, bool needCvsInfos) | UCvsFolders | [protected]
OnUpdateUI(void) | UWidget | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
ProcessSelectionCommand(KiSelectionHandler &handler) | UCvsFolders | [protected]
RemoveTimer(int cmd) | UWidget |
ResetBrowser(const char *path, bool notifyView=false) | UCvsFolders |
ResetView(bool forceReload=false, bool notifyView=false) | UCvsFolders |
RetrievePath(UTREEITEM item, UStr &path) | UCvsFolders |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsFolders(void) | UCvsFolders | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
SetDefaultRoot(const char *root) | UCvsFolders | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
StepToLocation(const char *path, bool notifyView=false) | UCvsFolders |
StoreExpanded(std::vector< UStr > &allExpanded, UTREEITEM root=0L) | UCvsFolders | [protected]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsFolders() | UCvsFolders |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsFolders() | UCvsFolders | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:51:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMenu Member List

This is the complete list of members for CCJMenu, including all inherited members.

AddBitmapToImageList(CImageList *list, UINT nResourceID) | CCJMenu |
AddFromToolBar(CToolBar *pToolBar, int nResourceID) | CCJMenu |
AppendMenuA(UINT nFlags, UINT nIDNewItem=0, LPCTSTR lpszNewItem=NULL) | CCJMenu | [inline]
AppendMenuA(UINT nFlags, UINT nIDNewItem, const CBitmap *pBmp) | CCJMenu | [inline]
AppendMenuA(UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, int nIconNormal=-1) | CCJMenu |
AppendMenuA(UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, CImageList *il, int xoffset) | CCJMenu |
AppendMenuA(UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, CBitmap *bmp) | CCJMenu |
AppendMenuW(UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, int nIconNormal=-1) | CCJMenu |
AppendMenuW(UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, CImageList *il, int xoffset) | CCJMenu |
AppendMenuW(UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, CBitmap *bmp) | CCJMenu |
AppendODMenuA(LPCSTR lpstrText, UINT nFlags=MF_OWNERDRAW, UINT nID=0, int nIconNormal=-1) | CCJMenu |
AppendODMenuA(LPCSTR lpstrText, UINT nFlags, UINT nID, CImageList *il, int xoffset) | CCJMenu |
AppendODMenuW(wchar_t *lpstrText, UINT nFlags=MF_OWNERDRAW, UINT nID=0, int nIconNormal=-1) | CCJMenu |
AppendODMenuW(wchar_t *lpstrText, UINT nFlags, UINT nID, CImageList *il, int xoffset) | CCJMenu |
AppendODPopupMenuA(LPCSTR lpstrText) | CCJMenu |
AppendODPopupMenuW(wchar_t *lpstrText) | CCJMenu |
CCJMenu() | CCJMenu |
checkmaps | CCJMenu |
checkmapsshare | CCJMenu |
DeleteMenu(UINT uiId, UINT nFlags) | CCJMenu |
DeleteMenuList(void) | CCJMenu |
DestroyMenu() | CCJMenu | [virtual]
disable_old_style | CCJMenu | [protected]
DitherBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HBITMAP hbm, int nXSrc, int nYSrc) | CCJMenu |
DitherBlt2(CDC *drawdc, int nXDest, int nYDest, int nWidth, int nHeight, CBitmap &bmp, int nXSrc, int nYSrc) | CCJMenu |
Draw3DCheckmark(CDC *dc, const CRect &rc, BOOL bSelected, HBITMAP hbmCheck) | CCJMenu |
DrawCheckMark(CDC *pDC, int x, int y, COLORREF color) | CCJMenu |
DrawItem(LPDRAWITEMSTRUCT) | CCJMenu | [virtual]
DrawRadioDot(CDC *pDC, int x, int y, COLORREF color) | CCJMenu |
FindKeyboardShortcut(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJMenu | [static]
FindMenuList(UINT nID) | CCJMenu |
FindMenuOption(int nId, int &nLoc) | CCJMenu |
FindMenuOption(wchar_t *lpstrText) | CCJMenu |
GetBitmapFromImageList(CDC *pDC, CImageList *imglist, int nIndex, CBitmap &bmp) | CCJMenu |
GetDisableOldStyle(void) | CCJMenu |
GetMenuText(UINT id, CString &string, UINT nFlags=MF_BYPOSITION) | CCJMenu |
InitializeMenuList(int value) | CCJMenu |
InsertMenuA(UINT nPosition, UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, int nIconNormal=-1) | CCJMenu |
InsertMenuA(UINT nPosition, UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, CImageList *il, int xoffset) | CCJMenu |
InsertMenuA(UINT nPosition, UINT nFlags, UINT nIDNewItem, const char *lpszNewItem, CBitmap *bmp) | CCJMenu |
InsertMenuW(UINT nPosition, UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, int nIconNormal=-1) | CCJMenu |
InsertMenuW(UINT nPosition, UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, CImageList *il, int xoffset) | CCJMenu |
InsertMenuW(UINT nPosition, UINT nFlags, UINT nIDNewItem, wchar_t *lpszNewItem, CBitmap *bmp) | CCJMenu |
InsertODMenuA(UINT nPosition, LPCSTR lpstrText, UINT nFlags=MF_OWNERDRAW, UINT nID=0, int nIconNormal=-1) | CCJMenu |
InsertODMenuA(UINT nPosition, LPCSTR lpstrText, UINT nFlags, UINT nID, CImageList *il, int xoffset) | CCJMenu |
InsertODMenuW(UINT nPosition, wchar_t *lpstrText, UINT nFlags=MF_OWNERDRAW, UINT nID=0, int nIconNormal=-1) | CCJMenu |
InsertODMenuW(UINT nPosition, wchar_t *lpstrText, UINT nFlags, UINT nID, CImageList *il, int xoffset) | CCJMenu |
InsertSpaces(void) | CCJMenu |
IsMenu(CMenu *submenu) | CCJMenu | [static]
IsMenu(HMENU submenu) | CCJMenu | [static]
IsNewShell(void) | CCJMenu | [static]
LoadCheckmarkBitmap(int unselect, int select) | CCJMenu |
LoadFromToolBar(UINT nID, UINT nToolBar, int &xoffset) | CCJMenu |
LoadMenu(LPCTSTR lpszResourceName) | CCJMenu | [virtual]
LoadMenu(int nResource) | CCJMenu | [virtual]
LoadSysColorBitmap(int nResourceId) | CCJMenu | [static]
LoadToolbar(UINT nToolBar) | CCJMenu |
LoadToolbars(const UINT *arID, int n) | CCJMenu |
m_AllSubMenus | CCJMenu | [protected, static]
m_bitmapBackground | CCJMenu | [protected]
m_bitmapBackgroundFlag | CCJMenu | [protected]
m_iconX | CCJMenu | [protected]
m_iconY | CCJMenu | [protected]
m_MenuList | CCJMenu | [protected]
m_selectcheck | CCJMenu |
m_SubMenus | CCJMenu | [protected]
m_unselectcheck | CCJMenu |
MeasureItem(LPMEASUREITEMSTRUCT) | CCJMenu | [virtual]
ModifyODMenuA(const char *lpstrText, UINT nID=0, int nIconNormal=-1) | CCJMenu |
ModifyODMenuA(const char *lpstrText, UINT nID, CImageList *il, int xoffset) | CCJMenu |
ModifyODMenuA(const char *lpstrText, UINT nID, CBitmap *bmp) | CCJMenu |
ModifyODMenuA(const char *lpstrText, const char *OptionText, int nIconNormal) | CCJMenu |
ModifyODMenuW(wchar_t *lpstrText, UINT nID=0, int nIconNormal=-1) | CCJMenu |
ModifyODMenuW(wchar_t *lpstrText, UINT nID, CImageList *il, int xoffset) | CCJMenu |
ModifyODMenuW(wchar_t *lpstrText, UINT nID, CBitmap *bmp) | CCJMenu |
ModifyODMenuW(wchar_t *lpstrText, wchar_t *OptionText, int nIconNormal) | CCJMenu |
NewODMenu(UINT pos, UINT nFlags, UINT nID, CString string) | CCJMenu |
RemoveMenu(UINT uiId, UINT nFlags) | CCJMenu |
SetBitmapBackground(COLORREF color) | CCJMenu |
SetDisableOldStyle(void) | CCJMenu |
SetIconSize(int, int) | CCJMenu |
SynchronizeMenu(void) | CCJMenu |
UnSetBitmapBackground(void) | CCJMenu |
UnSetDisableOldStyle(void) | CCJMenu |
UpdateMenu(CMenu *pmenu) | CCJMenu | [static]
~CCJMenu() | CCJMenu | [virtual]

Generated on Sat Aug 7 22:49:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs_winutil.cpp Source File

WinCvs/wincvs_winutil.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #include "wincvs_winutil.h"
00024 #include "MultiString.h"
00025 #include "wincvs.h"
00026 #include "MainFrm.h"
00027 #include "CustomizeMenus.h"
00028 #include "CvsPrefs.h"
00029 #include "CvsCommands.h"
00030 #include "AppConsole.h"
00031
00032
00034 #define MAX_UNLINK_RETRY    50
00035
00037 // helper functions declaration
00038
00039 CWnd* FindNextSiblingWindow(CWnd* pWnd, BOOL CheckTabStop);
00040 CWnd* FindNextChildWindow(CWnd* pWnd, BOOL CheckTabStop);
00041 CWnd* GetNextParentWindow(CWnd* pWnd);
00042
00043 CWnd* FindPrevSiblingWindow(CWnd* pWnd, BOOL CheckTabStop);
00044 CWnd* GetPrevParentWindow(CWnd* pWnd);
00045 CWnd* GetEndOfDecendantWindow(CWnd* pWnd);
00046
00047
00049 // inline function(s)
00050
00051 inline BOOL IsTargetWindow(CWnd* pWnd, BOOL CheckTabStop)
00052 {
00053     return ((!CheckTabStop) || (WS_TABSTOP & pWnd->GetStyle()));
00054 }
00055
00057 // implementation
00058
00059 CWnd* FindNextWindow(CWnd* pWnd, BOOL CheckTabStop)
00060 {
00061     ASSERT_VALID(pWnd);
00062     if (pWnd)
00063     {
00064         CWnd* pNextWnd;
00065         pNextWnd = FindNextChildWindow(pWnd, CheckTabStop);
00066         if (pNextWnd)
00067             return pNextWnd;
00068
00069         pNextWnd = FindNextSiblingWindow(pWnd, CheckTabStop);
00070         if (pNextWnd)
00071             return pNextWnd;
00072
00073         CWnd* pParentWnd = GetNextParentWindow(pWnd);
00074         while ((pParentWnd) && (pNextWnd != pWnd))
00075         {
00076             pNextWnd = FindNextChildWindow(pParentWnd, CheckTabStop);
00077             if (pNextWnd)
00078                 return pNextWnd;
00079             pParentWnd = GetNextParentWindow(pParentWnd);
00080         }
00081     }
00082     return pWnd;
00083 }
00084
00085 CWnd* GetNextParentWindow(CWnd* pWnd)
00086 {
00087     if (pWnd)
00088     {
00089         if (pWnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))
00090             return pWnd->GetTopWindow();
00091
00092         CFrameWnd* pFrameWnd = pWnd->GetParentFrame();
00093         ASSERT_VALID(pFrameWnd);
00094         CWnd* pParentWnd = pWnd->GetParent();
00095         ASSERT_VALID(pParentWnd);
00096
00097         CWnd* pCrntWnd;
00098         BOOL bFound = FALSE;
00099         while ((!bFound) && (pParentWnd != pFrameWnd))
00100         {
00101             pCrntWnd = pParentWnd->GetNextWindow();
00102             if (pCrntWnd)
00103                 bFound = TRUE;
00104             else
00105                 pParentWnd = pParentWnd->GetParent();
00106         }
00107         return (bFound) ? pCrntWnd : pParentWnd->GetTopWindow();
00108     }
00109     return NULL;
00110 }
00111
00112 CWnd* FindNextSiblingWindow(CWnd* pWnd, BOOL CheckTabStop)
00113 {
00114     if (pWnd)
00115     {
00116         CWnd* pSiblingWnd = pWnd->GetNextWindow();
00117         while (pSiblingWnd)
00118         {
00119             if (IsTargetWindow(pSiblingWnd, CheckTabStop))
00120                 return pSiblingWnd;
00121             CWnd* pChildWnd = FindNextChildWindow(pSiblingWnd, CheckTabStop);
00122             if (pChildWnd)
00123                 return pChildWnd;
00124             pSiblingWnd = pSiblingWnd->GetNextWindow();
00125         }
00126     }
00127     return NULL;
00128 }
00129
00130 CWnd* FindNextChildWindow(CWnd* pWnd, BOOL CheckTabStop)
00131 {
00132     if (pWnd)
00133     {
00134         CWnd* pChildWnd = pWnd->GetTopWindow();
00135         while (pChildWnd)
00136         {
00137             if (IsTargetWindow(pChildWnd, CheckTabStop))
00138                 return pChildWnd;
00139             CWnd* pSiblingWnd = FindNextSiblingWindow(pChildWnd, CheckTabStop);
00140             if (pSiblingWnd)
00141                 return pSiblingWnd;
00142             pChildWnd = pChildWnd->GetTopWindow();
00143         }
00144     }
00145     return NULL;
00146 }
00147
00148 CWnd* FindPrevWindow(CWnd* pWnd, BOOL CheckTabStop)
00149 {
00150     ASSERT_VALID(pWnd);
00151     if (pWnd)
00152     {
00153         CWnd* pWndCrntLevel = pWnd;
00154         while (TRUE)
00155         {
00156             CWnd* pFoundWnd;
00157             pFoundWnd = FindPrevSiblingWindow(pWndCrntLevel, CheckTabStop);
00158             if (pFoundWnd)
00159                 return pFoundWnd;
00160             pWndCrntLevel = GetPrevParentWindow(pWndCrntLevel);
00161             if (!pWndCrntLevel)
00162             {
00163                 pFoundWnd = GetEndOfDecendantWindow(pWnd->GetParentFrame());
00164                 if (IsTargetWindow(pFoundWnd, CheckTabStop))
00165                     return pFoundWnd;
00166                 pWndCrntLevel = pFoundWnd;
00167             }
00168         }
00169     }
00170     return NULL;
00171 }
00172
00173 CWnd* GetPrevParentWindow(CWnd* pWnd)
00174 {
00175     if (pWnd)
00176     {
00177         if (!pWnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))
00178         {
00179             CWnd* pParentWnd = pWnd->GetParent();
00180             ASSERT_VALID(pParentWnd);
00181             return pParentWnd;
00182         }
00183     }
00184     return NULL;
00185 }
00186
00187 CWnd* FindPrevSiblingWindow(CWnd* pWnd, BOOL CheckTabStop)
00188 {
00189     if (pWnd)
00190     {
00191         CWnd* pSiblingWnd = pWnd->GetWindow(GW_HWNDPREV);
00192         while (pSiblingWnd)
00193         {
00194             if (IsTargetWindow(pSiblingWnd, CheckTabStop))
00195                 return pSiblingWnd;
00196             pSiblingWnd = pSiblingWnd->GetWindow(GW_HWNDPREV);
00197         }
00198     }
00199     return NULL;
00200 }
00201
00202 CWnd* GetEndOfDecendantWindow(CWnd* pWnd)
00203 {
00204     CWnd* pTmpWnd = pWnd;
00205     CWnd* pPreTmpWnd;
00206     while (pTmpWnd)
00207     {
00208         pPreTmpWnd = pTmpWnd;
00209         pTmpWnd = pTmpWnd->GetWindow(GW_CHILD);
00210         if (pTmpWnd)
00211         {
00212             pPreTmpWnd = pTmpWnd;
00213             pTmpWnd = pTmpWnd->GetWindow(GW_HWNDLAST);
00214         }
00215     }
00216     return pPreTmpWnd;
00217 }
00218
00219 void UpdateUIMenu(CMenu* pMyMenu, CView* pThis)
00220 {
00221     CCmdUI state;
00222
00223     state.m_pMenu = pMyMenu;
00224     state.m_nIndexMax = pMyMenu->GetMenuItemCount();
00225
00226     for(state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax; state.m_nIndex++)
00227     {
00228         state.m_nID = pMyMenu->GetMenuItemID(state.m_nIndex);
00229         if( state.m_nID == 0 )
00230             continue; // menu separator or invalid cmd - ignore it
00231
00232         ASSERT(state.m_pOther == NULL);
00233         ASSERT(state.m_pMenu != NULL);
00234         if( state.m_nID == (UINT)-1 )
00235         {
00236             // possibly a popup menu, route to first item of that popup
00237             state.m_pSubMenu = pMyMenu->GetSubMenu(state.m_nIndex);
00238             if( state.m_pSubMenu == NULL ||
00239                 (state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
00240                 state.m_nID == (UINT)-1 )
00241             {
00242                 continue;       // first item of popup can't be routed to
00243             }
00244
00245             state.DoUpdate(pThis, FALSE);    // popups are never auto disabled
00246         }
00247         else
00248         {
00249             // normal menu item
00250             // Auto enable/disable if frame window has 'm_bAutoMenuEnable'
00251             //    set and command is _not_ a system command.
00252             state.m_pSubMenu = NULL;
00253             state.DoUpdate(pThis, TRUE);
00254         }
00255
00256 #   if 0 /* ??? */
00257         // adjust for menu deletions and additions
00258         UINT nCount = pMyMenu->GetMenuItemCount();
00259         if( nCount < state.m_nIndexMax )
00260         {
00261             state.m_nIndex -= (state.m_nIndexMax - nCount);
00262
00263             while( state.m_nIndex < nCount && pMyMenu->GetMenuItemID(state.m_nIndex) == state.m_nID )
00264             {
00265                 state.m_nIndex++;
00266             }
00267         }
00268
00269         state.m_nIndexMax = nCount;
00270 #   endif
00271     }
00272 }
00273
00275 CMenu* GetSubCMenu(int nStartId, CView* pThis)
00276 {
00277     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00278     ASSERT(pTopMenu != 0L);
00279     if( pTopMenu == 0L )
00280         return NULL;
00281
00282     CMenu* pMyMenu=NULL;
00283     for(int iPos = pTopMenu->GetMenuItemCount()-1; iPos >= 0; iPos--)
00284     {
00285         CMenu* pMenu = pTopMenu->GetSubMenu(iPos);
00286         if( pMenu && pMenu->GetMenuItemID(0) == (UINT)nStartId )
00287         {
00288             pMyMenu = pMenu;
00289             break;
00290         }
00291     }
00292
00293     ASSERT(pMyMenu != 0L);
00294     if( pMyMenu == 0L )
00295         return NULL;
00296
00297     UpdateUIMenu(pMyMenu, pThis);
00298
00299     return pMyMenu;
00300 }
00301
00302 CMenu* _GetMenuEntryRecurs(CMenu* menu, int nStartId, int& pos)
00303 {
00304     if( menu == 0L )
00305         return 0l;
00306
00307     for(UINT iPos = 0; iPos < menu->GetMenuItemCount(); iPos++)
00308     {
00309         UINT id = menu->GetMenuItemID(iPos);
00310         if( id == (UINT)nStartId )
00311         {
00312             pos = iPos;
00313             return menu;
00314         }
00315
00316         if( id == (UINT)-1 )
00317         {
00318             CMenu* res = _GetMenuEntryRecurs(menu->GetSubMenu(iPos), nStartId, pos);
00319             if( res != 0L )
00320                 return res;
00321         }
00322     }
00323
00324     return 0L;
00325 }
00326
00328 CMenu* GetMenuEntry(int nStartId, int& pos)
00329 {
00330     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00331     ASSERT(pTopMenu != NULL);
00332
00333     return _GetMenuEntryRecurs(pTopMenu, nStartId, pos);
00334 }
00335
00337 CMenu* GetTopPopupMenu(const char* menuString)
00338 {
00339     CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();
00340     if( pTopMenu == 0L )
00341     {
00342         ASSERT(FALSE);  // No top level menu
00343         return NULL;
00344     }
00345
00346     const int topMenuItemCount = (int)pTopMenu->GetMenuItemCount();
00347     CString popupString;
00348
00349     for(int nIndex = 0; nIndex < topMenuItemCount; nIndex++)
00350     {
00351         pTopMenu->GetMenuString(nIndex, popupString, MF_BYPOSITION);
00352         if( menuString == popupString )
00353         {
00354             // Found
00355             return pTopMenu->GetSubMenu(nIndex);
00356         }
00357     }
00358
00359     // Not found
00360     return NULL;
00361 }
00362
00369 bool IsLargeFonts()
00370 {
00371     static bool bLargeFonts = false;
00372     static bool defined = false;
00373
00374     if( !defined )
00375     {
00376         defined = true;
00377
00378         HWND hDesktop = ::GetDesktopWindow();
00379         HDC hDesktopDC = ::GetDC(hDesktop);
00380         short nLogPixels = ::GetDeviceCaps(hDesktopDC, LOGPIXELSX);
00381
00382         ::ReleaseDC(hDesktop, hDesktopDC);
00383
00384         bLargeFonts = (nLogPixels > 96);
00385     }
00386
00387     return bLargeFonts;
00388 }
00389
00395 bool IsHideCommandKeyPressed()
00396 {
00397     return ::GetKeyState(gCvsPrefs.HideCommandDlgUseShift() ? VK_SHIFT : VK_CONTROL) < 0;
00398 }
00399
00406 DWORD SetListCtrlExtendedStyle(CListCtrl* pListCtrl, const DWORD dwExtendedStyle)
00407 {
00408     if( !pListCtrl )
00409     {
00410         ASSERT(FALSE);  // bad pointer
00411         return 0;
00412     }
00413
00414     return pListCtrl->SetExtendedStyle(pListCtrl->GetExtendedStyle() | dwExtendedStyle);
00415 }
00416
00423 BOOL EnableEditAutoComplete(CEdit* pWnd, const DWORD dwFlags /*= AUTOCOMPLETE_DEFFLAGS*/)
00424 {
00425     return SUCCEEDED(SHAutoComplete(pWnd->GetSafeHwnd(), dwFlags));
00426 }
00427
00434 void PostGotoDlgCtrl(CDialog* pDlg, CWnd* pWndCtrl)
00435 {
00436     ASSERT(::IsWindow(pDlg->GetSafeHwnd()));
00437
00438     ::PostMessage(pDlg->GetSafeHwnd(), WM_NEXTDLGCTL, (WPARAM)pWndCtrl->GetSafeHwnd(), 1L);
00439 }
00440
00447 bool CheckLocationDriveType(const char* locationPath, const bool quiet /*= false*/)
00448 {
00449     bool res = false;
00450
00451     char drive[_MAX_DRIVE] = { 0 };
00452     const char* warningMessage = "";
00453
00454     _splitpath(locationPath, drive, NULL, NULL, NULL);
00455
00456     if( strlen(drive) )
00457     {
00458         CStr rootPathName = drive;
00459         if( !rootPathName.endsWith(kPathDelimiter) )
00460         {
00461             rootPathName << kPathDelimiter;
00462         }
00463
00464         const UINT driveType = GetDriveType(rootPathName.c_str());
00465         switch( driveType )
00466         {
00467         case DRIVE_FIXED:
00468             res = true;
00469             break;
00470         default:
00471             ASSERT(FALSE); // Incorrect return
00472         case DRIVE_UNKNOWN:
00473             warningMessage = "Warning: Unable to detect drive type";
00474             break;
00475         case DRIVE_NO_ROOT_DIR:
00476             warningMessage = "Warning: Invalid drive root path, there might be no volume mounted at the path";
00477             break;
00478         case DRIVE_REMOVABLE:
00479             warningMessage = "Warning: Using removable drive may cause performance decrease";
00480             break;
00481         case DRIVE_REMOTE:
00482             warningMessage = "Warning: Using remote (network) drive may cause file system errors and performance decrease";
00483             break;
00484         case DRIVE_CDROM:
00485             warningMessage = "Warning: Using CD-ROM drive may cause performance decrease";
00486             break;
00487         case DRIVE_RAMDISK:
00488             warningMessage = "Warning: Using RAM disk drive may cause file(s) loss";
00489             break;
00490         }
00491     }
00492     else
00493     {
00494         // UNC path
00495         if( strlen(locationPath) >= 2 &&
00496             locationPath[0] == '\\' && locationPath[1] == '\\' )
00497         {
00498             warningMessage = "Warning: Using remote (network) drive may cause file system errors and performance decrease";
00499         }
00500     }
00501
00502     if( !res && !quiet && strlen(warningMessage) )
00503     {
00504         CColorConsole out;
00505         out << kRed << kBold << warningMessage << kNormal << kNL;
00506         out << kBlue << kBold << "Use local fixed drives for best safety and high performance" << kNormal << kNL;
00507     }
00508
00509     return res;
00510 }
00511
00517 CString FormatMillisecondTime()
00518 {
00519     CString res;
00520
00521     SYSTEMTIME systemTime = { 0 };
00522     GetLocalTime(&systemTime);
00523
00524     res.Format("%02d:%02d:%02d.%03d",
00525         systemTime.wHour, systemTime.wMinute, systemTime.wSecond, systemTime.wMilliseconds);
00526
00527     return res;
00528 }
00529
00535 CString FormatMillisecondTime(LPSYSTEMTIME lpSystemTime)
00536 {
00537     CString res;
00538
00539     ASSERT(lpSystemTime != NULL); // Invalid pointer
00540
00541     res.Format("%02d:%02d:%02d.%03d",
00542         lpSystemTime->wHour, lpSystemTime->wMinute, lpSystemTime->wSecond, lpSystemTime->wMilliseconds);
00543
00544     return res;
00545 }
00546
00552 int wnt_unlink(const char* filename)
00553 {
00554     int res = -1;
00555
00556     for(int nIndex = 0; nIndex < MAX_UNLINK_RETRY; nIndex++)
00557     {
00558         res = unlink(filename);
00559         if( res == 0 )
00560         {
00561             break;
00562         }
00563         else if( EACCES != errno )
00564         {
00565             return -1;
00566         }
00567
00568         Sleep(60);
00569     }
00570
00571     return res;
00572 }
00573
00575 // CWndRedrawManager
00576
00578 CWndRedrawMngr::CWndRedrawMngr(CWnd* pWnd)
00579 {
00580     ASSERT(pWnd != NULL);
00581     m_pWnd = pWnd;
00582
00583     if( m_pWnd )
00584     {
00585         m_redraw = ::GetWindowLong(m_pWnd->m_hWnd, GWL_USERDATA);
00586         if( !m_redraw )
00587         {
00588             //m_pWnd->LockWindowUpdate();
00589             m_pWnd->SetRedraw(FALSE);
00590             ::SetWindowLong(m_pWnd->m_hWnd, GWL_USERDATA, TRUE);
00591         }
00592     }
00593 }
00594
00596 CWndRedrawMngr::~CWndRedrawMngr()
00597 {
00598     if( m_pWnd )
00599     {
00600         const BOOL redraw = ::GetWindowLong(m_pWnd->m_hWnd, GWL_USERDATA);
00601         if( redraw != m_redraw )
00602         {
00603             //m_pWnd->UnlockWindowUpdate();
00604             m_pWnd->SetRedraw(TRUE);
00605             ::SetWindowLong(m_pWnd->m_hWnd, GWL_USERDATA, m_redraw);
00606         }
00607     }
00608 }
00609
00611 // CWndAutoCommand
00612
00613 CWndAutoCommand::CWndAutoCommand(const CWnd* pWnd, const UINT uiCmd)
00614 {
00615     m_hAutoCommandWnd = pWnd->GetSafeHwnd();
00616     m_uiCmd = uiCmd;
00617 }
00618
00619 CWndAutoCommand::~CWndAutoCommand()
00620 {
00621     ::PostMessage(m_hAutoCommandWnd, WM_COMMAND, (WPARAM)m_uiCmd, (LPARAM)0);
00622 }
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJSortClass.h Source File

WinCvs/CJLib/Include/CJSortClass.h

Go to the documentation of this file.
00001 // Copyright (c) Iuri Apollonio 1998
00002 // Use & modify as you want & need, and leave those 3 lines.
00003 // http://www.codeguru.com
00004 // class extended by Max Poliashenko.
00005
00006 // CJSortClass.h: interface for the CCJSortClass class.
00007 //
00009 /****************************************************************************
00010  *
00011  * $Date: 1999/11/30 21:45:51 $
00012  * $Revision: 1.1.1.2 $
00013  * $Archive: /CodeJock/Include/CJSortClass.h $
00014  *
00015  * $History: CJSortClass.h $
00016  *
00017  * *****************  Version 5  *****************
00018  * User: Kirk Stowell Date: 10/26/99   Time: 10:47p
00019  * Updated in $/CodeJock/Include
00020  * Made class methods virtual for inheritance purposes.
00021  *
00022  * *****************  Version 4  *****************
00023  * User: Kirk Stowell Date: 10/14/99   Time: 12:20p
00024  * Updated in $/CodeJock/Include
00025  * Added source control history to file header.
00026  *
00027  ***************************************************************************/
00029
00030 #ifndef __CJSORTCLASS_H__
00031 #define __CJSORTCLASS_H__
00032
00033 #if _MSC_VER > 1000
00034 #pragma once
00035 #endif // _MSC_VER > 1000
00036
00037 // enumeration data type for sorting
00038 typedef enum DATA_TYPE
00039 {
00040     DT_INT = 1,     // sort type int
00041     DT_STRING,      // sort type string
00042     DT_DATETIME,    // sort type date / time
00043     DT_DEC          // sort type decimal
00044 };
00045
00046 // This class will sort a List control by a column of text, integer, float or
00047 // date/time type. It could be easily extended for other data types.
00048 class _CJX_EXT_CLASS CCJSortClass
00049 {
00050
00051 public:
00052
00053     // Default constructor
00054     //
00055     CCJSortClass(CListCtrl* pWnd, const int nCol);
00056
00057     // Virtual destructor
00058     //
00059     virtual ~CCJSortClass();
00060
00061 public:
00062
00063     // this member function is call to peform the actual sort
00064     // proceedure.
00065     //
00066     virtual void Sort(bool bAsc, DATA_TYPE eType);
00067
00068 protected:
00069
00070     CListCtrl* m_pWnd;  // pointer to the CListCtrl object to peform sort on
00071
00072     // this callback member function is called to compare to data items
00073     // during sorting operations
00074     //
00075     static int CALLBACK Compare(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
00076
00077     // helper struct used during sorting operations
00078     //
00079     struct CSortItem
00080     {
00081         CSortItem(const DWORD dwData, const CString &strItemText);
00082         DWORD   m_dwData;
00083         CString m_strItemText;
00084     };
00085 };
00086
00088 //  Inline Functions
00090
00091 _CJXLIB_INLINE CCJSortClass::CSortItem::CSortItem(const DWORD dwData, const CString & strItemText)
00092     { m_dwData  = dwData; m_strItemText = strItemText; }
00093
00094 #endif // __CJSORTCLASS_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CJX_CONTROLPOS Member List

This is the complete list of members for CJX_CONTROLPOS, including all inherited members.

nID | CJX_CONTROLPOS
nIndex | CJX_CONTROLPOS
rectOldPos | CJX_CONTROLPOS

Generated on Sat Aug 7 22:53:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJBrowseEdit.h Source File

WinCvs/CJLib/Include/CJBrowseEdit.h

Go to the documentation of this file.
00001 // CJCJBrowseEdit.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJBrowseEdit.h $
00011  *
00012  * $History: CJBrowseEdit.h $
00013  *
00014  * *****************  Version 9  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:35p
00016  * Updated in $/CodeJock/Include
00017  * Modified resource include for static builds.
00018  *
00019  * Fixed potential resource and memory leak problems.
00020  *
00021  * Made class methods virtual for inheritance purposes.
00022  *
00023  * *****************  Version 8  *****************
00024  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00025  * Updated in $/CodeJockey/Include
00026  * Updated copyright and contact information.
00027  *
00028  * *****************  Version 7  *****************
00029  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00030  * Updated in $/CodeJockey/Include
00031  *
00032  * *****************  Version 6  *****************
00033  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00034  * Updated in $/CodeJockey/Include
00035  *
00036  * *****************  Version 5  *****************
00037  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00038  * Updated in $/CodeJockey/Include
00039  * Cleaned up inline functions, and import/export macro so that class will
00040  * be imported when linked to, and exported at compile time.
00041  *
00042  * *****************  Version 4  *****************
00043  * User: Kirk Stowell Date: 6/25/99    Time: 11:03a
00044  * Updated in $/CodeJockey/Include
00045  * Chaned image list color mask and export macros.
00046  *
00047  * *****************  Version 3  *****************
00048  * User: Kirk Stowell Date: 6/14/99    Time: 10:41p
00049  * Updated in $/CodeJockey/Include
00050  * Cleaned up control and pointer initialization, creation and activation.
00051  * Added support for CCJMenu popup.
00052  *
00053  * *****************  Version 2  *****************
00054  * User: Kirk Stowell Date: 4/03/99    Time: 10:54p
00055  * Updated in $/CodeJockey/Include
00056  * Added comments and cleaned up code.
00057  *
00058  * *****************  Version 1  *****************
00059  * User: Kirk Stowell Date: 1/16/99    Time: 10:53p
00060  * Created in $/CodeJockey/Include
00061  * Initial release.
00062  *
00063  ***************************************************************************/
00065
00066 #ifndef __CJBROWSEEDIT_H__
00067 #define __CJBROWSEEDIT_H__
00068
00069 #if _MSC_VER >= 1000
00070 #pragma once
00071 #endif // _MSC_VER >= 1000
00072
00073 // holds the current search style for the control.
00074 typedef enum BROWSE_TYPE {
00075     BT_DIRECTORY = 1,
00076     BT_FILE      = 2,
00077     BT_POPUPMENU = 3
00078 };
00079
00080 // CCJBrowseButton is a CButton derived class which is used by
00081 // the CCJBrowseEdit class.
00082 class _CJX_EXT_CLASS CCJBrowseButton : public CButton
00083 {
00084
00085 public:
00086
00087     // Default constructor
00088     //
00089     CCJBrowseButton();
00090
00091     // Virtual destructor
00092     //
00093     virtual ~CCJBrowseButton();
00094
00095 public:
00096
00097     BOOL            m_bOpenFileDialog;  // TRUE for open file dialog, FALSE for
00098                                         // save as see SetDlgOpenFile(...)
00099     CString         m_strDefExt;
00100     CString         m_strFileName;
00101     DWORD           m_dwFlags;
00102     CString         m_strFilter;
00103     CString         m_strTitle;
00104     CWnd*           m_pParentWnd;   // parent of edit control.
00105
00106 protected:
00107
00108     UINT            m_nID;          // resource id for push button
00109     CWnd*           m_pEditWnd;     // edit control.
00110     CFont           m_Font;         // button font
00111     BROWSE_TYPE     m_eType;        // search type
00112     UINT            m_nMenu;        // popup menu id
00113     UINT            m_nSubMenuIndx; // index of popup submenu.
00114     HICON           m_hIcon;        // handle to button icon.
00115
00116 public:
00117     virtual void UpdateFont();
00118
00119     // returns an unused resource id for use by the control
00120     //
00121     virtual UINT GetNextID(
00122         // window to search for availiable resource ids
00123         CWnd* pWnd) const;
00124
00125 // Overrides
00126     // ClassWizard generated virtual function overrides
00127     //{{AFX_VIRTUAL(CCJBrowseButton)
00128     public:
00129     virtual BOOL Create(CWnd* pWnd, BROWSE_TYPE eType, UINT nMenu, UINT nSubMenuIndx);
00130     //}}AFX_VIRTUAL
00131
00132     // Generated message map functions
00133 protected:
00134
00135     //{{AFX_MSG(CCJBrowseButton)
00136     afx_msg void OnClicked();
00137     //}}AFX_MSG
00138
00139     DECLARE_MESSAGE_MAP()
00140 };
00141
00142 // CCJBrowseEdit is a CEdit derived class which has a push button associated
00143 // with it. It can be used to search for directories, files or activate a
00144 // popup menu
00145 class _CJX_EXT_CLASS CCJBrowseEdit : public CEdit
00146 {
00147 public:
00148
00149     // Default constructor
00150     //
00151     CCJBrowseEdit();
00152
00153     // Virtual destructor
00154     //
00155     virtual ~CCJBrowseEdit();
00156
00157 protected:
00158
00159     CCJBrowseButton     m_btnBrowse;    // push button
00160     BROWSE_TYPE         m_eType;        // search type
00161     UINT                m_nMenu;        // popup menu id
00162     UINT                m_nSubMenuIndx; // index of popup submenu.
00163
00164 public:
00165
00166     // this member function will initialize the control to
00167     // default values.
00168     //
00169     virtual void InitializeControl();
00170
00171     // Set to TRUE to construct a File Open dialog box or
00172     // FALSE to construct a File Save As dialog box
00173     //
00174     virtual void SetDlgOpenFile(BOOL bOpenFileDialog);
00175
00176     // this member function sets the default extension for the file
00177     // open dialog.
00178     //
00179     virtual void SetDlgDefExt(LPCTSTR strDefExt);
00180
00181     // this member funciton sets the default file name for the file
00182     // open dialog.
00183     //
00184     virtual void SetDlgFileName(LPCTSTR strFileName);
00185
00186     // this member function sets the style flags for the file
00187     // open dialog.
00188     //
00189     virtual void SetDlgStyle(DWORD dwFlags);
00190
00191     // this member function sets the file filter for the file
00192     // open dialog.
00193     //
00194     virtual void SetDlgFilter(LPCTSTR strFilter);
00195
00196     // this member function sets the owner for the file
00197     // open dialog
00198     //
00199     virtual void SetDlgOwner(CWnd* pParentWnd);
00200
00201     // this member function sets the title for the directory
00202     // dialog
00203     //
00204     virtual void SetDlgTitle(LPCTSTR strTitle);
00205
00206     // this member function sets the current search type
00207     // for the control
00208     //
00209     virtual void SetSearchType(
00210         // type of search to perform - BT_FILE, BT_DIRECTORY, BT_POPUPMENU
00211         BROWSE_TYPE eType,
00212         // if eType is a popup menu, resource id of menu.
00213         UINT nMenu = 0,
00214         // index of submenu to display.
00215         int nSubMenuIndx = 0);
00216
00217 // Overrides
00218     // ClassWizard generated virtual function overrides
00219     //{{AFX_VIRTUAL(CCJBrowseEdit)
00220     protected:
00221     virtual void PreSubclassWindow();
00222     //}}AFX_VIRTUAL
00223
00224     // Generated message map functions
00225 protected:
00226     //{{AFX_MSG(CCJBrowseEdit)
00227     afx_msg void OnEnable(BOOL bEnable);
00228     afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
00229     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00230     //}}AFX_MSG
00231
00232     DECLARE_MESSAGE_MAP()
00233 };
00234
00236 //  Inline Functions
00238
00239 _CJXLIB_INLINE UINT CCJBrowseButton::GetNextID(CWnd* pWnd) const
00240     { for(UINT nID=32767; nID!=1; --nID){if(!pWnd->GetDlgItem(nID)){return nID;}}return 0; }
00241
00242 _CJXLIB_INLINE void CCJBrowseEdit::SetDlgOpenFile(BOOL bOpenFileDialog=TRUE)
00243     { m_btnBrowse.m_bOpenFileDialog = bOpenFileDialog; }
00244
00245 _CJXLIB_INLINE void CCJBrowseEdit::SetDlgDefExt(LPCTSTR strDefExt=NULL)
00246     { m_btnBrowse.m_strDefExt = strDefExt; }
00247
00248 _CJXLIB_INLINE void CCJBrowseEdit::SetDlgFileName(LPCTSTR strFileName=NULL)
00249     { m_btnBrowse.m_strFileName = strFileName; }
00250
00251 _CJXLIB_INLINE void CCJBrowseEdit::SetDlgStyle(DWORD dwFlags=OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT)
00252     { m_btnBrowse.m_dwFlags = dwFlags; }
00253
00254 _CJXLIB_INLINE void CCJBrowseEdit::SetDlgFilter(LPCTSTR strFilter=NULL)
00255     { m_btnBrowse.m_strFilter = strFilter; }
00256
00257 _CJXLIB_INLINE void CCJBrowseEdit::SetDlgOwner(CWnd* pParentWnd=NULL)
00258     { m_btnBrowse.m_pParentWnd = pParentWnd; }
00259
00260 _CJXLIB_INLINE void CCJBrowseEdit::SetDlgTitle(LPCTSTR strTitle=NULL)
00261     { m_btnBrowse.m_strTitle = strTitle; }
00262
00263 _CJXLIB_INLINE void CCJBrowseEdit::SetSearchType(BROWSE_TYPE eType, UINT nMenu, int nSubMenuIndx)
00264     { m_eType = eType; m_nMenu = nMenu; m_nSubMenuIndx = nSubMenuIndx; }
00265
00267
00268 //{{AFX_INSERT_LOCATION}}
00269 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00270
00271 #endif // __CJBROWSEEDIT_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoList.cpp Source File

rf/support/mfc/PseudoList.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // PseudoList.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "PseudoList.h"
00026 #include "umain.h"
00027
00028 #ifdef _DEBUG
00029 #define new DEBUG_NEW
00030 #undef THIS_FILE
00031 static char THIS_FILE[] = __FILE__;
00032 #endif
00033
00035 // CPseudoList
00036
00037 CPseudoList::CPseudoList(int wid, int cmd) : m_wid(wid), m_cmd(cmd)
00038 {
00039 }
00040
00041 CPseudoList::~CPseudoList()
00042 {
00043 }
00044
00045
00046 BEGIN_MESSAGE_MAP(CPseudoList, CListCtrl)
00047     //{{AFX_MSG_MAP(CPseudoList)
00048     ON_WM_LBUTTONDBLCLK()
00049     //}}AFX_MSG_MAP
00050 END_MESSAGE_MAP()
00051
00053 // CPseudoList message handlers
00054
00055 void CPseudoList::OnLButtonDblClk(UINT nFlags, CPoint point)
00056 {
00057     UINT pFlags;
00058     int nItem = HitTest(point, &pFlags);
00059     if(nItem != -1)
00060     {
00061         CString s = GetItemText(nItem, 0);
00062
00063         UEventSendMessage(m_wid, EV_LIST_DBLCLICK, UMAKEINT(m_cmd, nItem),
00064             (void *)(const char *)s);
00065     }
00066
00067     CListCtrl::OnLButtonDblClk(nFlags, point);
00068 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CAllTargets Member List

This is the complete list of members for CAllTargets, including all inherited members.

CAllTargets() | CAllTargets | [inline]
Get(void) | CAllTargets | [inline]
Get(void) const | CAllTargets | [inline]
targets | CAllTargets | [protected]
~CAllTargets() | CAllTargets | [inline]

Generated on Sat Aug 7 22:48:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MMenuString.cpp Source File

WinCvs/MMenuString.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2004
00019  */
00020
00021 // MMenuString.cpp: implementation of the CMMenuString class.
00022 //
00024
00025 #include "stdafx.h"
00026 #include "wincvs.h"
00027 #include "MMenuString.h"
00028
00029 #ifdef _DEBUG
00030 #undef THIS_FILE
00031 static char THIS_FILE[]=__FILE__;
00032 #define new DEBUG_NEW
00033 #endif
00034
00041 CMMenuString::CMMenuString(unsigned int maxstr, const char* uniqueName, char* const* defaultStr)
00042     : CPersistent(uniqueName, kNoClass), fMaxStr(maxstr)
00043 {
00044     if( defaultStr != NULL )
00045     {
00046         int i = 0;
00047         while( defaultStr[i] != NULL )
00048         {
00049             Insert(defaultStr[i++]);
00050         }
00051     }
00052 }
00053
00054 CMMenuString::~CMMenuString()
00055 {
00056 }
00057
00058 unsigned int CMMenuString::SizeOf(void) const
00059 {
00060     NAMESPACE(std) vector<UStr>::const_iterator i;
00061     unsigned int thesize = sizeof(int);
00062
00063     for(i = fAllStrs.begin(); i != fAllStrs.end(); ++i)
00064     {
00065         thesize += (*i).length() + 1;
00066     }
00067
00068     return thesize;
00069 }
00070
00071 const void *CMMenuString::GetData(void) const
00072 {
00073     unsigned int thesize = SizeOf(), tmpsize;
00074     ((CMMenuString *)this)->fBuf.AdjustSize(thesize);
00075     char *tmp = ((CMMenuString *)this)->fBuf;
00076     *(int *)tmp = fAllStrs.size();
00077     tmp += sizeof(int) / sizeof(char);
00078
00079     NAMESPACE(std) vector<UStr>::const_iterator i;
00080     for(i = fAllStrs.begin(); i != fAllStrs.end(); ++i)
00081     {
00082         tmpsize = (*i).length() + 1;
00083         memcpy(tmp, (const char*)(*i), tmpsize * sizeof(char));
00084         tmp += tmpsize;
00085     }
00086
00087     return (char*)fBuf;
00088 }
00089
00090 void CMMenuString::SetData(const void *ptr, unsigned int size)
00091 {
00092     const char* tmp = (char *)ptr;
00093     unsigned int thesize;
00094     fAllStrs.erase(fAllStrs.begin(), fAllStrs.end());
00095     thesize = *(int *)tmp;
00096     tmp += sizeof(int) / sizeof(char);
00097     for(unsigned int i = 0; i < thesize && i < fMaxStr; i++)
00098     {
00099         fAllStrs.push_back(UStr(tmp));
00100         tmp += strlen(tmp) + 1;
00101     }
00102 }
00103
00104 void CMMenuString::Insert(const char* newstr)
00105 {
00106     TouchTimeStamp();
00107     fAllStrs.push_back(UStr(newstr));
00108 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJHyperLink.h Source File

WinCvs/CJLib/Include/CJHyperLink.h

Go to the documentation of this file.
00001 // CJHyperLink.h : header file
00002 //
00003 //
00004 // CJHyperLink static control. Will open the default browser with the given URL
00005 // when the user clicks on the link.
00006 //
00007 // Copyright Chris Maunder, 1997
00008 // Feel free to use and distribute. May not be sold for profit.
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.2 $
00014  * $Archive: /CodeJock/Include/CJHyperLink.h $
00015  *
00016  * $History: CJHyperLink.h $
00017  *
00018  * *****************  Version 6  *****************
00019  * User: Kirk Stowell Date: 10/26/99   Time: 10:42p
00020  * Updated in $/CodeJock/Include
00021  * Made class methods virtual for inheritance purposes.
00022  *
00023  * *****************  Version 5  *****************
00024  * User: Kirk Stowell Date: 10/14/99   Time: 12:26p
00025  * Updated in $/CodeJock/Include
00026  * Added source control history to file header.
00027  *
00028  ***************************************************************************/
00030
00031 #ifndef __CJHYPERLINK_H__
00032 #define __CJHYPERLINK_H__
00033
00034 #if _MSC_VER >= 1000
00035 #pragma once
00036 #endif // _MSC_VER >= 1000
00037
00038 // A CStatic derived classc will open the default browser with the
00039 // given URL when the user clicks on the link.
00040 class _CJX_EXT_CLASS CCJHyperLink : public CStatic
00041 {
00042 // Construction/destruction
00043 public:
00044     CCJHyperLink();
00045     virtual ~CCJHyperLink();
00046
00047 // Attributes
00048 public:
00049
00050 // Operations
00051 public:
00052
00053     virtual void SetURL(CString strURL);
00054     virtual CString GetURL() const;
00055
00056     virtual void SetColors(COLORREF crLinkColor, COLORREF crVisitedColor,
00057                     COLORREF crHoverColor = -1);
00058     virtual COLORREF GetLinkColor() const;
00059     virtual COLORREF GetVisitedColor() const;
00060     virtual COLORREF GetHoverColor() const;
00061
00062     virtual void SetVisited(BOOL bVisited = TRUE);
00063     virtual BOOL GetVisited() const;
00064
00065     virtual void SetLinkCursor(HCURSOR hCursor);
00066     virtual HCURSOR GetLinkCursor() const;
00067
00068     virtual void SetUnderline(BOOL bUnderline = TRUE);
00069     virtual BOOL GetUnderline() const;
00070
00071     virtual void SetAutoSize(BOOL bAutoSize = TRUE);
00072     virtual BOOL GetAutoSize() const;
00073
00074     virtual HINSTANCE GotoURL(LPCTSTR url, int showcmd);
00075
00076 // Overrides
00077     // ClassWizard generated virtual function overrides
00078     //{{AFX_VIRTUAL(CCJHyperLink)
00079     public:
00080     virtual BOOL PreTranslateMessage(MSG* pMsg);
00081     protected:
00082     virtual void PreSubclassWindow();
00083     //}}AFX_VIRTUAL
00084
00085 // Implementation
00086 protected:
00087     virtual void ReportError(int nError);
00088     virtual LONG GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata);
00089     virtual void PositionWindow();
00090     virtual void SetDefaultCursor();
00091
00092 // Protected attributes
00093 protected:
00094     COLORREF m_crLinkColor, m_crVisitedColor;     // Hyperlink Colors
00095     COLORREF m_crHoverColor;                       // Hover Color
00096     BOOL     m_bOverControl;                        // cursor over control?
00097     BOOL     m_bVisited;                            // Has it been visited?
00098     BOOL     m_bUnderline;                          // underline hyperlink?
00099     BOOL     m_bAdjustToFit;                        // Adjust window size to fit text?
00100     CString  m_strURL;                              // hyperlink URL
00101     CFont    m_Font;                                // Underline font if necessary
00102     HCURSOR  m_hLinkCursor;                         // Cursor for hyperlink
00103     CToolTipCtrl m_ToolTip;                         // The tooltip
00104
00105     // Generated message map functions
00106 protected:
00107     //{{AFX_MSG(CCJHyperLink)
00108     afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
00109     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00110     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00111     //}}AFX_MSG
00112     afx_msg void OnClicked();
00113     DECLARE_MESSAGE_MAP()
00114 };
00115
00117
00118 //{{AFX_INSERT_LOCATION}}
00119 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00120
00121 #endif // __CJHYPERLINK_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CColorConsole Member List

This is the complete list of members for CColorConsole, including all inherited members.

CColorConsole() | CColorConsole |
CColorConsole(CWincvsView *aview) | CColorConsole |
fView | CColorConsole | [protected]
GetView() | CColorConsole | [protected]
oldFormat | CColorConsole | [protected]
operator<<(char c) | CColorConsole |
operator<<(kConsoleColor color) | CColorConsole |
operator<<(const char *str) | CColorConsole |
operator<<(int value) | CColorConsole |
~CColorConsole() | CColorConsole | [virtual]

Generated on Sat Aug 7 22:50:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJToolBar.h Source File

WinCvs/CJLib/Include/CJToolBar.h

Go to the documentation of this file.
00001 // CJToolBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJockey/Include/CJToolBar.h $
00011  *
00012  * $History: CJToolBar.h $
00013  *
00014  * *****************  Version 12  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/Include
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 11  *****************
00020  * User: Kirk Stowell Date: 7/31/99    Time: 4:27p
00021  * Updated in $/CodeJockey/Include
00022  *
00023  * *****************  Version 10  *****************
00024  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00025  * Updated in $/CodeJockey/Include
00026  *
00027  * *****************  Version 6  *****************
00028  * User: Kirk Stowell Date: 7/18/99    Time: 10:20p
00029  * Updated in $/CodeJockey/Include
00030  * Re-wrote toolbar class for vc5 compatibility. Added customization based
00031  * on the "Customizable toolbar" article by Doug Keith -
00032  * http://www.codeguru.com/toolbar/customizable_tb.shtml.
00033  *
00034  * Cleaned up inline functions, and import/export macro so that class will
00035  * be imported when linked to, and exported at compile time.
00036  *
00037  * *****************  Version 5  *****************
00038  * User: Kirk Stowell Date: 4/03/99    Time: 11:44p
00039  * Updated in $/CodeJockey/Include
00040  * Added comments and cleaned up code.
00041  *
00042  * *****************  Version 4  *****************
00043  * User: Kirk Stowell Date: 3/13/99    Time: 11:43p
00044  * Updated in $/CodeJockey/Include
00045  * Changed class to handle both Office and DevStudio style to toolbars. To
00046  * use Office toolbars, use the CreateEx() method, otherwise your toolbars
00047  * will look like DevStudio.
00048  *
00049  * *****************  Version 3  *****************
00050  * User: Kirk Stowell Date: 12/14/98   Time: 11:42p
00051  * Updated in $/CodeJockey/Include
00052  * Changed class to derive from Paul DiLascia's CFlatToolBar, this class
00053  * adds gripper and control insertion.
00054  *
00055  * *****************  Version 2  *****************
00056  * User: Kirk Stowell Date: 11/02/98   Time: 11:41p
00057  * Updated in $/CodeJockey/Include
00058  * Fixed bug with DrawNoGripper() method - (Christian Skovdal Andersen).
00059  *
00060  * *****************  Version 1  *****************
00061  * User: Kirk Stowell Date: 10/17/98   Time: 11:41p
00062  * Created in $/CodeJockey/Include
00063  * Initial re-write and release.
00064  *
00065  ***************************************************************************/
00067
00068 #ifndef __CJTOOLBAR_H__
00069 #define __CJTOOLBAR_H__
00070
00071 #include "CJToolBarBase.h"
00072 #include "CJToolBarCtrl.h"
00073
00075
00076 // for determining version of COMCTL32.DLL
00077 #define VERSION_WIN4    MAKELONG(0, 4)
00078 #define VERSION_IE3     MAKELONG(70, 4)
00079 #define VERSION_IE4     MAKELONG(71, 4)
00080 #define VERSION_IE401   MAKELONG(72, 4)
00081
00082 extern int _ComCtlVersion;
00083 DWORD   AFXAPI _GetComCtlVersion();
00084 HBITMAP AFXAPI _LoadSysColorBitmap(HINSTANCE hInst, HRSRC hRsrc, BOOL bMono = FALSE);
00085
00086 // One of these for each drop-down button
00087 struct DROPDOWNBUTTON {
00088     DROPDOWNBUTTON* next;
00089     UINT            idButton;       // command ID of button
00090     UINT            idMenu;         // popup menu to display
00091 } ;
00092
00093 struct TOOLBARINFO {
00094     TBBUTTON         tbButton;      // information regarding the button
00095     LPCTSTR          btnText;       // text for the button
00096 };
00097
00098 class CCJToolBarCtrl;
00099
00100
00101 // CCJToolBar is a CCJToolBarBase derived class which Allows the
00102 // creation of toolbars simular to VisualStudio, Microsoft Office or Internet Explorer
00103 class _CJX_EXT_CLASS CCJToolBar : public CCJToolBarBase
00104 {
00105     DECLARE_DYNAMIC(CCJToolBar)
00106
00107 public:
00108
00109     // Default constructor
00110     //
00111     CCJToolBar();
00112
00113     // Virtual destructor
00114     //
00115     virtual ~CCJToolBar();
00116
00117 protected:
00118
00119     TOOLBARINFO*        m_pBarInfo;             // points to a TOOLBARINFO array used for toolbar customization.
00120     CObList*            m_pControls;            // CObject pointer list which contains controls added to the toolbar
00121     bool                m_bShowDropArrow;       // true to display a drop arrow when docked vertical
00122     HRSRC               m_hRsrcImageWell;       // handle to loaded resource for image well
00123     HINSTANCE           m_hInstImageWell;       // instance handle to load image well from
00124     HBITMAP             m_hbmImageWell;         // contains color mapped button images
00125     BOOL                m_bDelayedButtonLayout; // used to manage when button layout should be done
00126     CRect               m_rcOldPos;             // used when toolbar is moved
00127     int                 m_nButtons;             // used for customization
00128     HKEY                m_hKeyRoot;             // used for customization, holds registry key.
00129     CString             m_strSubKey;            // used for customization, holds registry subkey name.
00130     CString             m_strValueName;         // used for customization, holds registry value.
00131     static int          m_nBarNumber;           // used for customization, holds bar number for restoration.
00132     CSize               m_sizeImage;            // current image size
00133     CSize               m_sizeButton;           // current button size
00134     DROPDOWNBUTTON*     m_pDropButtons;         // list of dropdown button/menu pairs
00135     CMapStringToPtr*    m_pStringMap;           // used as CMapStringToUInt
00136
00137 public:
00138
00139     virtual BOOL Create(CWnd* pParentWnd,
00140         DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP,
00141         UINT nID = AFX_IDW_TOOLBAR);
00142
00143     virtual BOOL CreateEx(CWnd* pParentWnd, DWORD dwCtrlStyle = TBSTYLE_FLAT,
00144         DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP,
00145         CRect rcBorders = CRect(0, 0, 0, 0),
00146         UINT nID = AFX_IDW_TOOLBAR);
00147
00148     // this member function is called to insert a control into the toolbar
00149     // and returns a pointer to the newly inserted control
00150     //
00151     CWnd* InsertControl(
00152         // CRuntimeClass of the control to be inserted.
00153         CRuntimeClass* pClass,
00154         // window title ( if any ) of the control
00155         LPCTSTR lpszWindowName,
00156         // size of the control to be inserted
00157         CRect& rect,
00158         // resource id of the button where the control is to be placed
00159         UINT nID,
00160         // style flags for the control
00161         DWORD dwStyle );
00162
00163     CWnd* InsertControl(
00164         // points to already created control to be inserted.
00165         CWnd* pCtrl,
00166         // size of the control to be inserted
00167         CRect& rect,
00168         // resource id of the button where the control is to be placed
00169         UINT nID);
00170
00171     // call to add drop-down buttons
00172     BOOL AddDropDownButton(
00173         // resource id for toolbar button
00174         UINT nIDButton,
00175         // resource id of dropdown menu to be associated with button.
00176         UINT nIDMenu,
00177         // if the button is to have a drop arrow
00178         BOOL bArrow=TRUE);
00179
00180     // Find buttons structure for given ID
00181     DROPDOWNBUTTON* FindDropDownButton(
00182         // id of button to find.
00183         UINT nID);
00184
00185     // silly function to fake out compiler with const-ness
00186     LRESULT SendMessageC(UINT m, WPARAM wp=0, LPARAM lp=0) const;
00187
00188     void SetSizes(SIZE sizeButton, SIZE sizeImage);
00189
00190     // button size should be bigger than image
00191     void SetHeight(int cyHeight);
00192
00193     // call after SetSizes, height overrides bitmap size
00194     BOOL LoadToolBar(LPCTSTR lpszResourceName, TOOLBARINFO* pBarInfo=NULL);
00195     BOOL LoadToolBar(UINT nIDResource, TOOLBARINFO* pBarInfo=NULL);
00196
00197     BOOL LoadBitmap(LPCTSTR lpszResourceName);
00198     BOOL LoadBitmap(UINT nIDResource);
00199     BOOL SetBitmap(HBITMAP hbmImageWell);
00200
00201     // lpIDArray can be NULL to allocate empty buttons
00202     BOOL SetButtons(const UINT* lpIDArray, int nIDCount);
00203
00204     // standard control bar things
00205     int CommandToIndex(UINT nIDFind) const;
00206     UINT GetItemID(int nIndex) const;
00207     UINT GetButtonStyle(int nIndex) const;
00208     void SetButtonStyle(int nIndex, UINT nStyle);
00209
00210     void SaveState();
00211     void RestoreState();
00212
00213     // for changing button info
00214     void GetButtonInfo(int nIndex, UINT& nID, UINT& nStyle, int& iImage) const;
00215     void SetButtonInfo(int nIndex, UINT nID, UINT nStyle, int iImage);
00216     BOOL SetButtonText(int nIndex, LPCTSTR lpszText);
00217     CString GetButtonText(int nIndex) const;
00218     void GetButtonText(int nIndex, CString& rString) const;
00219
00220     // for direct access to the underlying common control
00221     CCJToolBarCtrl& GetToolBarCtrl() const;
00222
00223     void SetOwner(CWnd* pOwnerWnd);
00224     BOOL AddReplaceBitmap(HBITMAP hbmImageWell);
00225
00226     void GetButton(int nIndex, TBBUTTON* pButton) const;
00227     void SetButton(int nIndex, TBBUTTON* pButton);
00228
00229     // Wrappers that are not in MFC but should be;
00230     // I copied these from CToolBarCtrl
00231     BOOL EnableButton(int nID, BOOL bEnable);
00232     BOOL CheckButton(int nID, BOOL bCheck);
00233     BOOL PressButton(int nID, BOOL bPress);
00234     BOOL HideButton(int nID, BOOL bHide);
00235     BOOL Indeterminate(int nID, BOOL bIndeterminate);
00236     BOOL IsButtonEnabled(int nID) const;
00237     BOOL IsButtonChecked(int nID) const;
00238     BOOL IsButtonPressed(int nID) const;
00239     BOOL IsButtonHidden(int nID) const;
00240     BOOL IsButtonIndeterminate(int nID) const;
00241     BOOL SetState(int nID, UINT nState);
00242     int GetState(int nID) const;
00243     BOOL AddButtons(int nNumButtons, LPTBBUTTON lpButtons);
00244     BOOL InsertButton(int nIndex, LPTBBUTTON lpButton);
00245     BOOL DeleteButton(int nIndex);
00246     int GetButtonCount() const;
00247     void Customize();
00248     int AddStrings(LPCTSTR lpszStrings);
00249     void SetButtonStructSize(int nSize);
00250     BOOL SetButtonSize(CSize sz);
00251     BOOL SetBitmapSize(CSize sz);
00252     void AutoSize();
00253     CToolTipCtrl* GetToolTips() const;
00254     void SetToolTips(CToolTipCtrl* pTip);
00255     void SetRows(int nRows, BOOL bLarger, LPRECT lpRect);
00256     int GetRows() const;
00257     BOOL SetCmdID(int nIndex, UINT nID);
00258     UINT GetBitmapFlags() const;
00259
00260     // Wrappers for some of the newer messages--not complete
00261     BOOL SetIndent(int indent);
00262     HIMAGELIST GetImageList() const;
00263     HIMAGELIST SetImageList(HIMAGELIST hImgList);
00264     int GetBitmap(UINT nIdButton) const;
00265     DWORD SetExtendedStyle(DWORD dwStyle);
00266     BOOL GetRect(UINT nIdButton, RECT& rc) const;
00267     DWORD GetToolbarStyle() const;
00268     void SetToolbarStyle(DWORD dwStyle);
00269     int HitTest(CPoint p) const;
00270     int  GetHotItem() const;
00271     void SetHotItem(int iHot);
00272     BOOL MapAccelerator(TCHAR ch, UINT& nID) const;
00273     CSize GetPadding() const;
00274     CSize SetPadding(CSize sz);
00275
00276     // Implementation
00277 public:
00278
00279 #ifdef _DEBUG
00280     virtual void AssertValid() const;
00281     virtual void Dump(CDumpContext& dc) const;
00282 #endif
00283
00284 protected:
00285
00286     // implementation helpers
00287     CSize CalcLayout(DWORD nMode, int nLength = -1);
00288     CSize CalcSize(TBBUTTON* pData, int nCount);
00289     int WrapToolBar(TBBUTTON* pData, int nCount, int nWidth);
00290     void SizeToolBar(TBBUTTON* pData, int nCount, int nLength, BOOL bVert = FALSE);
00291     void Layout(); // called for for delayed button layout
00292
00293 public:
00294
00295 // Overrides
00296     // ClassWizard generated virtual function overrides
00297     //{{AFX_VIRTUAL(CCJToolBar)
00298     public:
00299     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
00300     virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
00301     virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00302     virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle);
00303     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00304     virtual int OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
00305     virtual void GetItemRect(int nIndex, LPRECT lpRect) const;
00306     //}}AFX_VIRTUAL
00307
00308     // helpers
00309     virtual void InvalidateOldPos(const CRect& rcInvalid);
00310     virtual CSize GetButtonSize(TBBUTTON* pData, int iButton);
00311
00312     // override to do your own weird drop-down buttons
00313     virtual void OnDropDownButton(const NMTOOLBAR& nmtb, UINT nID, CRect rc);
00314
00315 // Generated message map functions
00316 protected:
00317
00318     LRESULT OnSetSizeHelper(CSize& size, LPARAM lParam);
00319
00320     //{{AFX_MSG(CCJToolBar)
00321     afx_msg UINT OnNcHitTest(CPoint);
00322     afx_msg void OnNcPaint();
00323     afx_msg void OnPaint();
00324     afx_msg void OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS*);
00325     afx_msg void OnWindowPosChanging(LPWINDOWPOS);
00326     afx_msg void OnWindowPosChanged(WINDOWPOS* lpwndpos);
00327     afx_msg void OnSysColorChange();
00328     afx_msg LRESULT OnSetButtonSize(WPARAM, LPARAM);
00329     afx_msg LRESULT OnSetBitmapSize(WPARAM, LPARAM);
00330     afx_msg BOOL OnNcCreate(LPCREATESTRUCT);
00331     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00332     afx_msg void OnDestroy();
00333     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00334     //}}AFX_MSG
00335
00336     afx_msg void OnToolBarBtnDropDown(NMHDR* pNMHDR, LRESULT* pResult);
00337     afx_msg void OnToolBarQueryDelete(NMHDR *pNMHDR, LRESULT *pResult);
00338     afx_msg void OnToolBarQueryInsert(NMHDR *pNMHDR, LRESULT *pResult);
00339     afx_msg void OnToolBarChange(NMHDR *pNMHDR, LRESULT *pResult);
00340     afx_msg void OnToolBarBeginDrag(NMHDR *pNMHDR, LRESULT *pResult);
00341     afx_msg void OnToolBarEndDrag(NMHDR *pNMHDR, LRESULT *pResult);
00342     afx_msg void OnToolBarBeginAdjust(NMHDR *pNMHDR, LRESULT *pResult);
00343     afx_msg void OnToolBarCustomHelp(NMHDR *pNMHDR, LRESULT *pResult);
00344     afx_msg void OnToolBarEndAdjust(NMHDR *pNMHDR, LRESULT *pResult);
00345     afx_msg void OnToolBarGetButtonInfo(NMHDR *pNMHDR, LRESULT *pResult);
00346     afx_msg void OnToolBarReset(NMHDR *pNMHDR, LRESULT *pResult);
00347     afx_msg LRESULT OnPreserveZeroBorderHelper(WPARAM, LPARAM);
00348     DECLARE_MESSAGE_MAP()
00349 };
00350
00352 // inline functions
00354
00355 _CJXLIB_INLINE CCJToolBarCtrl& CCJToolBar::GetToolBarCtrl() const
00356     { ASSERT(::IsWindow(m_hWnd)); return *(CCJToolBarCtrl*)this; }
00357
00358 _CJXLIB_INLINE BOOL CCJToolBar::LoadBitmap(UINT nIDResource)
00359     { return LoadBitmap(MAKEINTRESOURCE(nIDResource)); }
00360
00361 _CJXLIB_INLINE BOOL CCJToolBar::LoadToolBar(UINT nIDResource, TOOLBARINFO* pBarInfo)
00362     { return LoadToolBar(MAKEINTRESOURCE(nIDResource), pBarInfo); }
00363
00364 _CJXLIB_INLINE LRESULT CCJToolBar::SendMessageC(UINT m, WPARAM wp, LPARAM lp) const
00365     { ASSERT(::IsWindow(m_hWnd)); return ((CCJToolBar*)this)->SendMessage(m, wp, lp); }
00366
00367 _CJXLIB_INLINE BOOL CCJToolBar::EnableButton(int nID, BOOL bEnable)
00368     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_ENABLEBUTTON, nID, MAKELPARAM(bEnable, 0)); }
00369
00370 _CJXLIB_INLINE BOOL CCJToolBar::CheckButton(int nID, BOOL bCheck)
00371     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_CHECKBUTTON, nID, MAKELPARAM(bCheck, 0)); }
00372
00373 _CJXLIB_INLINE BOOL CCJToolBar::PressButton(int nID, BOOL bPress)
00374     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_PRESSBUTTON, nID, MAKELPARAM(bPress, 0)); }
00375
00376 _CJXLIB_INLINE BOOL CCJToolBar::HideButton(int nID, BOOL bHide)
00377     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_HIDEBUTTON, nID, MAKELPARAM(bHide, 0)); }
00378
00379 _CJXLIB_INLINE BOOL CCJToolBar::Indeterminate(int nID, BOOL bIndeterminate)
00380     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_INDETERMINATE, nID, MAKELPARAM(bIndeterminate, 0)); }
00381
00382 _CJXLIB_INLINE BOOL CCJToolBar::IsButtonEnabled(int nID) const
00383     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONENABLED, nID); }
00384
00385 _CJXLIB_INLINE BOOL CCJToolBar::IsButtonChecked(int nID) const
00386     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONCHECKED, nID); }
00387
00388 _CJXLIB_INLINE BOOL CCJToolBar::IsButtonPressed(int nID) const
00389     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONPRESSED, nID); }
00390
00391 _CJXLIB_INLINE BOOL CCJToolBar::IsButtonHidden(int nID) const
00392     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONHIDDEN, nID); }
00393
00394 _CJXLIB_INLINE BOOL CCJToolBar::IsButtonIndeterminate(int nID) const
00395     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_ISBUTTONINDETERMINATE, nID); }
00396
00397 _CJXLIB_INLINE BOOL CCJToolBar::SetState(int nID, UINT nState)
00398     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETSTATE, nID, MAKELPARAM(nState, 0)); }
00399
00400 _CJXLIB_INLINE int CCJToolBar::GetState(int nID) const
00401     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETSTATE, nID); }
00402
00403 _CJXLIB_INLINE BOOL CCJToolBar::AddButtons(int nNumButtons, LPTBBUTTON lpButtons)
00404     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_ADDBUTTONS, nNumButtons, (LPARAM)lpButtons); }
00405
00406 _CJXLIB_INLINE BOOL CCJToolBar::InsertButton(int nIndex, LPTBBUTTON lpButton)
00407     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_INSERTBUTTON, nIndex, (LPARAM)lpButton); }
00408
00409 _CJXLIB_INLINE BOOL CCJToolBar::DeleteButton(int nIndex)
00410     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_DELETEBUTTON, nIndex); }
00411
00412 _CJXLIB_INLINE int CCJToolBar::GetButtonCount() const
00413     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_BUTTONCOUNT); }
00414
00415 _CJXLIB_INLINE void CCJToolBar::Customize()
00416     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_CUSTOMIZE, 0, 0L); }
00417
00418 _CJXLIB_INLINE int CCJToolBar::AddStrings(LPCTSTR lpszStrings)
00419     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_ADDSTRING, 0, (LPARAM)lpszStrings); }
00420
00421 _CJXLIB_INLINE void CCJToolBar::SetButtonStructSize(int nSize)
00422     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_BUTTONSTRUCTSIZE, nSize); }
00423
00424 _CJXLIB_INLINE BOOL CCJToolBar::SetButtonSize(CSize sz)
00425     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETBUTTONSIZE, 0, MAKELPARAM(sz.cx, sz.cy)); }
00426
00427 _CJXLIB_INLINE BOOL CCJToolBar::SetBitmapSize(CSize sz)
00428     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETBITMAPSIZE, 0, MAKELPARAM(sz.cx, sz.cy)); }
00429
00430 _CJXLIB_INLINE void CCJToolBar::AutoSize()
00431     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_AUTOSIZE); }
00432
00433 _CJXLIB_INLINE CToolTipCtrl* CCJToolBar::GetToolTips() const
00434     { ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)SendMessageC(TB_GETTOOLTIPS)); }
00435
00436 _CJXLIB_INLINE void CCJToolBar::SetToolTips(CToolTipCtrl* pTip)
00437     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_SETTOOLTIPS, (WPARAM)pTip->m_hWnd); }
00438
00439 _CJXLIB_INLINE void CCJToolBar::SetRows(int nRows, BOOL bLarger, LPRECT lpRect)
00440     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_SETROWS, MAKELPARAM(nRows, bLarger), (LPARAM)lpRect); }
00441
00442 _CJXLIB_INLINE int CCJToolBar::GetRows() const
00443     { ASSERT(::IsWindow(m_hWnd)); return (int) SendMessageC(TB_GETROWS); }
00444
00445 _CJXLIB_INLINE BOOL CCJToolBar::SetCmdID(int nIndex, UINT nID)
00446     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETCMDID, nIndex, nID); }
00447
00448 _CJXLIB_INLINE UINT CCJToolBar::GetBitmapFlags() const
00449     { ASSERT(::IsWindow(m_hWnd)); return (UINT) SendMessageC(TB_GETBITMAPFLAGS); }
00450
00451 // Wrappers for some of the newer messages--not complete
00452 _CJXLIB_INLINE BOOL CCJToolBar::SetIndent(int indent)
00453     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETINDENT, indent); }
00454
00455 _CJXLIB_INLINE HIMAGELIST CCJToolBar::GetImageList() const
00456     { ASSERT(::IsWindow(m_hWnd)); return (HIMAGELIST)SendMessageC(TB_GETIMAGELIST); }
00457
00458 _CJXLIB_INLINE HIMAGELIST CCJToolBar::SetImageList(HIMAGELIST hImgList)
00459     { ASSERT(::IsWindow(m_hWnd)); return (HIMAGELIST)SendMessage(TB_SETIMAGELIST, 0, (LPARAM)hImgList); }
00460
00461 _CJXLIB_INLINE int CCJToolBar::GetBitmap(UINT nIdButton) const
00462     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETBITMAP, nIdButton); }
00463
00464 _CJXLIB_INLINE DWORD CCJToolBar::SetExtendedStyle(DWORD dwStyle)
00465     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETEXTENDEDSTYLE, 0, dwStyle); }
00466
00467 _CJXLIB_INLINE BOOL CCJToolBar::GetRect(UINT nIdButton, RECT& rc) const
00468     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETRECT, nIdButton, (LPARAM)&rc); }
00469
00470 _CJXLIB_INLINE DWORD CCJToolBar::GetToolbarStyle() const
00471     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETSTYLE); }
00472
00473 _CJXLIB_INLINE void CCJToolBar::SetToolbarStyle(DWORD dwStyle)
00474     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_SETSTYLE, 0, dwStyle); }
00475
00476 _CJXLIB_INLINE int CCJToolBar::HitTest(CPoint p) const
00477     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_HITTEST, 0, (LPARAM)&p); }
00478
00479 _CJXLIB_INLINE int CCJToolBar:: GetHotItem() const
00480     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETHOTITEM); }
00481
00482 _CJXLIB_INLINE void CCJToolBar::SetHotItem(int iHot)
00483     { ASSERT(::IsWindow(m_hWnd)); SendMessage(TB_SETHOTITEM, iHot); }
00484
00485 _CJXLIB_INLINE BOOL CCJToolBar::MapAccelerator(TCHAR ch, UINT& nID) const
00486     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_MAPACCELERATOR, (WPARAM)ch, (LPARAM)&nID); }
00487
00488 _CJXLIB_INLINE CSize CCJToolBar::GetPadding() const
00489     { ASSERT(::IsWindow(m_hWnd)); return SendMessageC(TB_GETPADDING); }
00490
00491 _CJXLIB_INLINE CSize CCJToolBar::SetPadding(CSize sz)
00492     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(TB_SETPADDING, 0, MAKELPARAM(sz.cx,sz.cy)); }
00493
00494 // Styles for toolbar buttons
00495 #define TBBS_BUTTON     MAKELONG(TBSTYLE_BUTTON, 0) // this entry is button
00496 #define TBBS_SEPARATOR  MAKELONG(TBSTYLE_SEP, 0)    // this entry is a separator
00497 #define TBBS_CHECKBOX   MAKELONG(TBSTYLE_CHECK, 0)  // this is an auto check button
00498 #define TBBS_GROUP      MAKELONG(TBSTYLE_GROUP, 0)  // marks the start of a group
00499 #define TBBS_CHECKGROUP (TBBS_GROUP|TBBS_CHECKBOX)  // normal use of TBBS_GROUP
00500 #define TBBS_DROPDOWN   MAKELONG(TBSTYLE_DROPDOWN, 0) // drop down style
00501 #define TBBS_AUTOSIZE   MAKELONG(TBSTYLE_AUTOSIZE, 0) // autocalc button width
00502 #define TBBS_NOPREFIX   MAKELONG(TBSTYLE_NOPREFIX, 0) // no accel prefix for this button
00503
00504 // styles for display states
00505 #define TBBS_CHECKED    MAKELONG(0, TBSTATE_CHECKED)    // button is checked/down
00506 #define TBBS_PRESSED    MAKELONG(0, TBSTATE_PRESSED)    // button is being depressed
00507 #define TBBS_DISABLED   MAKELONG(0, TBSTATE_ENABLED)    // button is disabled
00508 #define TBBS_INDETERMINATE  MAKELONG(0, TBSTATE_INDETERMINATE)  // third state
00509 #define TBBS_HIDDEN     MAKELONG(0, TBSTATE_HIDDEN) // button is hidden
00510 #define TBBS_WRAPPED    MAKELONG(0, TBSTATE_WRAP)   // button is wrapped at this point
00511 #define TBBS_ELLIPSES   MAKELONG(0, TBSTATE_ELIPSES)
00512 #define TBBS_MARKED     MAKELONG(0, TBSTATE_MARKED)
00513
00514 #endif //__TBCTL_H__
00515
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCvsRootParser Member List

This is the complete list of members for CCvsRootParser, including all inherited members.

Clear() | CCvsRootParser |
GetCvsProtocolList() const | CCvsRootParser |
GetPath() const | CCvsRootParser |
GetProtocol() const | CCvsRootParser |
IsEmpty() const | CCvsRootParser |
m_cvsProtocolList | CCvsRootParser | [private]
m_path | CCvsRootParser | [private]
m_protocol | CCvsRootParser | [private]
NormalizeCvsRoot(string &strCvsRoot, const char tokenSeparator) const | CCvsRootParser | [private]
Parse(const char *cvsRoot, const bool clearData=true) | CCvsRootParser |
SplitCvsRoot(const char *cvsRoot, string &protocol, string &keywords, string &path) const | CCvsRootParser | [private]

Generated on Sat Aug 7 22:51:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

option Member List

This is the complete list of members for option, including all inherited members.

flag | option
has_arg | option
name | option
val | option

Generated on Sat Aug 7 22:55:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppConsole.cpp Source File

common/AppConsole.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * AppConsole.cpp --- output to the console
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef qMacCvsPP
00028 #   include "MacCvsApp.h"
00029 #   include "LogWindow.h"
00030 #endif /* qMacCvsPP */
00031
00032 #ifdef qUnix
00033 #   include "UCvsConsole.h"
00034 #   include "UCvsCommands.h"
00035 #   include "uconsole.h"
00036 #endif /* qUnix */
00037
00038 #include <string.h>
00039 #include <stdarg.h>
00040 #include <stdio.h>
00041 #include "AppConsole.h"
00042
00043 #ifdef WIN32
00044 #   include "wincvs.h"
00045 #   include "wincvsView.h"
00046
00047 #   ifdef _DEBUG
00048 #   define new DEBUG_NEW
00049 #   undef THIS_FILE
00050     static char THIS_FILE[] = __FILE__;
00051 #   endif
00052 #endif /* WIN32 */
00053
00054 void cvs_out(const char *format, ...)
00055 {
00056     va_list args;
00057     char mess[1024] = {'\0'};
00058
00059     va_start (args, format);
00060     vsprintf (mess, format, args);
00061     va_end (args);
00062
00063 #ifdef WIN32
00064     CWinApp* app = AfxGetApp();
00065     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00066     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00067     if(view == NULL)
00068         return;
00069
00070     view->OutConsole(mess, strlen(mess));
00071 #endif /* WIN32 */
00072 #ifdef qMacCvsPP
00073     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00074     if(log == 0L)
00075         return;
00076     log->WriteCharsToConsole(mess, strlen(mess));
00077 #endif /* qMacCvsPP */
00078 #ifdef qUnix
00079     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00080     if(console == 0L)
00081     {
00082         UAppConsole(mess);
00083         return;
00084     }
00085
00086     console->OutConsole(mess, strlen(mess));
00087 #endif /* qUnix */
00088 }
00089
00090 void cvs_err(const char *format, ...)
00091 {
00092     va_list args;
00093     char mess[1024] = {'\0'};
00094
00095     va_start (args, format);
00096     vsprintf (mess, format, args);
00097     va_end (args);
00098
00099 #ifdef WIN32
00100     CWinApp* app = AfxGetApp();
00101     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00102     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00103     if(view == NULL)
00104         return;
00105
00106     view->OutConsole(mess, strlen(mess), true);
00107 #endif /* WIN32 */
00108 #ifdef qMacCvsPP
00109     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00110     if(log == 0L)
00111         return;
00112     log->WriteCharsToConsole(mess, strlen(mess), true);
00113 #endif /* qMacCvsPP */
00114 #ifdef qUnix
00115     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00116     if(console == 0L)
00117     {
00118         UAppConsole(mess);
00119         return;
00120     }
00121
00122     console->OutConsole(mess, strlen(mess), true);
00123 #endif /* qUnix */
00124 }
00125
00126 void cvs_outstr(const char *str, size_t len)
00127 {
00128 #ifdef WIN32
00129     CWinApp* app = AfxGetApp();
00130     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00131     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00132     if(view == NULL)
00133         return;
00134
00135     view->OutConsole(str, len);
00136 #endif /* WIN32 */
00137 #ifdef qMacCvsPP
00138     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00139     if(log == 0L)
00140         return;
00141     log->WriteCharsToConsole(str, len);
00142 #endif /* qMacCvsPP */
00143 #ifdef qUnix
00144     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00145     if(console == 0L)
00146     {
00147         UAppConsole(str);
00148         return;
00149     }
00150
00151     console->OutConsole(str, len);
00152 #endif /* qUnix */
00153 }
00154
00155 void cvs_errstr(const char *str, size_t len)
00156 {
00157 #ifdef WIN32
00158     CWinApp* app = AfxGetApp();
00159     //ASSERT(app->IsKindOf(RUNTIME_CLASS(CWincvsApp)));
00160     CWincvsView *view = ((CWincvsApp *)app)->GetConsoleView();
00161     if(view == NULL)
00162         return;
00163
00164     view->OutConsole(str, len, true);
00165 #endif /* WIN32 */
00166 #ifdef qMacCvsPP
00167     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00168     if(log == 0L)
00169         return;
00170     log->WriteCharsToConsole(str, len, true);
00171 #endif /* qMacCvsPP */
00172 #ifdef qUnix
00173     UCvsConsole* console = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00174     if(console == 0L)
00175     {
00176         UAppConsole(str);
00177         return;
00178     }
00179
00180     console->OutConsole(str, len, true);
00181 #endif /* qUnix */
00182 }
00183
00184 #ifdef WIN32
00185 CWincvsView * CColorConsole::GetView()
00186 {
00187     CWinApp* app = AfxGetApp();
00188     CWincvsView *view = fView != 0L ? fView : ((CWincvsApp *)app)->GetConsoleView();
00189     if(view && view->m_hWnd == 0L)
00190         view = 0L;
00191     return view;
00192 }
00193 #endif /* WIN32 */
00194
00195 CColorConsole::CColorConsole()
00196 {
00197 #ifdef WIN32
00198     fView = 0L;
00199     CWincvsView *view = GetView();
00200     if(view == 0L)
00201         return;
00202
00203     oldFormat = view->GetCurFormat();
00204 #else /* !WIN32 */
00205     *this << kNormal;
00206 #endif /* !WIN32 */
00207 }
00208
00209 #ifdef WIN32
00210 CColorConsole::CColorConsole(CWincvsView * aview)
00211 {
00212     fView = aview;
00213     CWincvsView *view = GetView();
00214     if(view == 0L)
00215         return;
00216
00217     oldFormat = view->GetCurFormat();
00218 }
00219 #endif /* WIN32 */
00220
00221 CColorConsole::~CColorConsole()
00222 {
00223     *this << kNormal;
00224 }
00225
00226 CColorConsole & CColorConsole::operator<<(char c)
00227 {
00228 #ifdef WIN32
00229     CWincvsView *view = GetView();
00230     if(view == 0L)
00231         return *this;
00232
00233     view->OutColor(&c, 1);
00234 #endif /* WIN32 */
00235 #ifdef qMacCvsPP
00236     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00237     if(log == 0L)
00238         return *this;
00239
00240     log->OutColor(&c, 1);
00241 #endif /* qMacCvsPP */
00242 #ifdef qUnix
00243     UCvsConsole *log = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00244     if(log == 0L)
00245         return *this;
00246
00247     log->OutColor(&c, 1);
00248 #endif /* qUnix */
00249
00250     return *this;
00251 }
00252
00253 CColorConsole & CColorConsole::operator<<(kConsoleColor color)
00254 {
00255 #ifdef WIN32
00256     CWincvsView *view = GetView();
00257     if(view == 0L)
00258         return *this;
00259
00260     if(color == kNL)
00261     {
00262         char tmp[2] = {0x0a};
00263         view->OutColor(tmp, 1);
00264     }
00265     else if(color == kNormal)
00266     {
00267         oldFormat.dwMask = CFM_COLOR | CFM_BOLD | CFM_ITALIC | CFE_UNDERLINE;
00268         view->OutColor(oldFormat);
00269     }
00270     else
00271         view->OutColor(color);
00272 #endif /* WIN32 */
00273 #ifdef qMacCvsPP
00274     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00275     if(log == 0L)
00276         return *this;
00277
00278     if(color == kNL)
00279     {
00280         char tmp[1] = {0x0d};
00281         log->OutColor(tmp, 1);
00282     }
00283     else
00284         log->OutColor(color);
00285 #endif /* qMacCvsPP */
00286 #ifdef qUnix
00287     UCvsConsole *log = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00288     if(log == 0L)
00289         return *this;
00290
00291     if(color == kNL)
00292     {
00293         char tmp[1] = {0x0a};
00294         log->OutColor(tmp, 1);
00295     }
00296     else
00297         log->OutColor(color);
00298 #endif /* qUnix */
00299
00300     return *this;
00301 }
00302
00303 CColorConsole & CColorConsole::operator<<(const char *str)
00304 {
00305 #ifdef WIN32
00306     CWincvsView *view = GetView();
00307     if(view == 0L)
00308         return *this;
00309
00310     view->OutColor(str, strlen(str));
00311 #endif /* WIN32 */
00312 #ifdef qMacCvsPP
00313     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00314     if(log == 0L)
00315         return *this;
00316
00317     log->OutColor(str, strlen(str));
00318 #endif /* qMacCvsPP */
00319 #ifdef qUnix
00320     UCvsConsole *log = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00321     if(log == 0L)
00322         return *this;
00323
00324     log->OutColor(str, strlen(str));
00325 #endif /* qUnix */
00326
00327     return *this;
00328 }
00329
00330 CColorConsole & CColorConsole::operator<<(int value)
00331 {
00332 #ifdef WIN32
00333     CWincvsView *view = GetView();
00334     if(view == 0L)
00335         return *this;
00336
00337     char tmp[20] = {'\0'};
00338     sprintf(tmp, "%d", value);
00339     view->OutColor(tmp, strlen(tmp));
00340 #endif /* WIN32 */
00341 #ifdef qMacCvsPP
00342     CLogWindow *log = CMacCvsApp::gApp != 0L ? CMacCvsApp::gApp->GetLogWindow() : 0L;
00343     if(log == 0L)
00344         return *this;
00345
00346     char tmp[20] = {'\0'};
00347     sprintf(tmp, "%d", value);
00348     log->OutColor(tmp, strlen(tmp));
00349 #endif /* qMacCvsPP */
00350 #ifdef qUnix
00351     UCvsConsole *log = (UCvsConsole *)::UEventQueryWidget(kUMainConsoleID);
00352     if(log == 0L)
00353         return *this;
00354
00355     char tmp[20] = {'\0'};
00356     sprintf(tmp, "%d", value);
00357     log->OutColor(tmp, strlen(tmp));
00358 #endif /* qUnix */
00359
00360     return *this;
00361 }
00362
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/StdAfx.h Source File

rf/support/mfc/StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005
00006 #if !defined(AFX_STDAFX_H__EDF5958A_92F6_11D3_9365_00C0F00AE104__INCLUDED_)
00007 #define AFX_STDAFX_H__EDF5958A_92F6_11D3_9365_00C0F00AE104__INCLUDED_
00008
00009 #pragma warning (disable : 4786)
00010
00011 #if _MSC_VER > 1000
00012 #pragma once
00013 #endif // _MSC_VER > 1000
00014
00015 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00016
00017 #include <afx.h>
00018 #include <afxwin.h>
00019 #include <afxext.h>         // MFC extensions
00020 #include <afxdisp.h>        // MFC Automation classes
00021 #include <afxdtctl.h>       // MFC support for Internet Explorer 4 Common Controls
00022 #ifndef _AFX_NO_AFXCMN_SUPPORT
00023 #include <afxcmn.h>         // MFC support for Windows Common Controls
00024 #endif // _AFX_NO_AFXCMN_SUPPORT
00025
00026 #ifdef _DEBUG
00027 #   define qDebug 1
00028 #else
00029 #   define qDebug 0
00030 #endif
00031
00032 #define UASSERT ASSERT
00033     // the pseudo ASSERT
00034
00035 #include "CJLibrary.h"
00036         // the CJ library provides a bunch of usefull Windows classes.
00037
00038 //{{AFX_INSERT_LOCATION}}
00039 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00040
00041 #endif // !defined(AFX_STDAFX_H__EDF5958A_92F6_11D3_9365_00C0F00AE104__INCLUDED_)
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CDummyClass Member List

This is the complete list of members for CDummyClass, including all inherited members.

CDummyClass() | CDummyClass | [inline]
CDummyClass() | CDummyClass | [inline]

Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoLogHandler Member List

This is the complete list of members for KoLogHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoLogHandler() | KoLogHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoLogHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoLogHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJDockContext Member List

This is the complete list of members for CCJDockContext, including all inherited members.

CanDockDockBar() | CCJDockContext |
CanDockDockBar(CRect rect, DWORD dwDockStyle, CDockBar **ppDockBar=NULL) | CCJDockContext |
CCJDockContext(CControlBar *pBar) | CCJDockContext |
DockSizeBar(CControlBar *, CCJSizeDockBar *=NULL, LPRECT=NULL) | CCJDockContext |
EndDragDockBar() | CCJDockContext |
GetDockBar(DWORD dwOverDockStyle) | CCJDockContext |
m_ptOrig | CCJDockContext |
MoveDockBar(CPoint pt) | CCJDockContext |
StartDragDockBar(CPoint pt) | CCJDockContext |
StartResize(int nHitTest, CPoint pt) | CCJDockContext | [virtual]
Stretch(CPoint pt) | CCJDockContext |
ToggleDocking() | CCJDockContext | [virtual]
TrackDockBar() | CCJDockContext |
~CCJDockContext() | CCJDockContext | [virtual]

Generated on Sat Aug 7 22:49:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMyShellTree Member List

This is the complete list of members for CMyShellTree, including all inherited members.

DisableCommon() | CMyShellTree | [protected]
OnDeleteitem(NMHDR *pNMHDR, LRESULT *pResult) | CMyShellTree | [protected]
OnItemexpanding(NMHDR *pNMHDR, LRESULT *pResult) | CMyShellTree | [protected]
OnRclick(NMHDR *pNMHDR, LRESULT *pResult) | CMyShellTree | [protected]
OnSelchanged(NMHDR *pNMHDR, LRESULT *pResult) | CMyShellTree | [protected]

Generated on Sat Aug 7 22:55:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJSortClass Member List

This is the complete list of members for CCJSortClass, including all inherited members.

CCJSortClass(CListCtrl *pWnd, const int nCol) | CCJSortClass |
Compare(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) | CCJSortClass | [protected, static]
m_pWnd | CCJSortClass | [protected]
Sort(bool bAsc, DATA_TYPE eType) | CCJSortClass | [virtual]
~CCJSortClass() | CCJSortClass | [virtual]

Generated on Sat Aug 7 22:50:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJDockBar.h Source File

WinCvs/CJLib/Include/CJDockBar.h

Go to the documentation of this file.
00001 // CJDockBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJockey/Include/CJDockBar.h $
00011  *
00012  * $History: CJDockBar.h $
00013  *
00014  * *****************  Version 5  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/Include
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 4  *****************
00020  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00021  * Updated in $/CodeJockey/Include
00022  *
00023  * *****************  Version 3  *****************
00024  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00025  * Updated in $/CodeJockey/Include
00026  * Cleaned up inline functions, and import/export macro so that class will
00027  * be imported when linked to, and exported at compile time.
00028  *
00029  * *****************  Version 2  *****************
00030  * User: Kirk Stowell Date: 4/03/99    Time: 12:53p
00031  * Updated in $/CodeJockey/Include
00032  * Added comments and cleaned up code.
00033  *
00034  * *****************  Version 1  *****************
00035  * User: Kirk Stowell Date: 10/17/98   Time: 12:53p
00036  * Created in $/CodeJockey/CJ60Lib
00037  * Initial re-write and release.
00038  *
00039  ***************************************************************************/
00041
00042 #ifndef __CJDOCKBAR_H__
00043 #define __CJDOCKBAR_H__
00044
00045 #if _MSC_VER >= 1000
00046 #pragma once
00047 #endif // _MSC_VER >= 1000
00048
00049 // CCJDockBar is a CDockBar derived class used by CCJFrameWnd and CCJMDIFrameWnd
00050 // to offset CCJToolBars to allow 3D borders.
00051 class _CJX_EXT_CLASS CCJDockBar : public CDockBar
00052 {
00053     DECLARE_DYNAMIC(CCJDockBar)
00054
00055 public:
00056
00057     // Default constructor
00058     //
00059     CCJDockBar();
00060
00061     // Virtual destructor
00062     //
00063     virtual ~CCJDockBar();
00064
00065 // Overrides
00066     // ClassWizard generated virtual function overrides
00067     //{{AFX_VIRTUAL(CCJDockBar)
00068     public:
00069     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
00070     //}}AFX_VIRTUAL
00071
00072 // Generated message map functions
00073 protected:
00074     //{{AFX_MSG(CCJDockBar)
00075         // NOTE - the ClassWizard will add and remove member functions here.
00076         //    DO NOT EDIT what you see in these blocks of generated code !
00077     //}}AFX_MSG
00078     DECLARE_MESSAGE_MAP()
00079 };
00080
00082
00083 //{{AFX_INSERT_LOCATION}}
00084 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00085
00086 #endif // __CJDOCKBAR_H__
00087
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GetPassword.cpp Source File

common/GetPassword.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // GetPassword.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #ifdef WIN32
00027 #   include "wincvs.h"
00028 #endif /* WIN32 */
00029
00030 #ifdef qMacCvsPP
00031 #   include <UModalDialogs.h>
00032 #   include <LEditText.h>
00033 #   include <LStaticText.h>
00034
00035 #   include "MacCvsApp.h"
00036 #   include "MacCvsConstant.h"
00037 #endif /* qMacCvsPP */
00038
00039 #if qUnix
00040 #   include "UCvsDialogs.h"
00041 #endif
00042
00043 #include "GetPassword.h"
00044 #include "CvsCommands.h"
00045
00046 #ifdef WIN32
00047 #   ifdef _DEBUG
00048 #   define new DEBUG_NEW
00049 #   undef THIS_FILE
00050     static char THIS_FILE[] = __FILE__;
00051 #   endif
00052 #endif /* WIN32 */
00053
00054 #ifdef WIN32
00055
00056 // GetPassword dialog
00057
00058
00059 GetPassword::GetPassword(CWnd* pParent /*=NULL*/)
00060     : CHHelpDialog(GetPassword::IDD, pParent)
00061 {
00062     //{{AFX_DATA_INIT(GetPassword)
00063     m_passwd = _T("");
00064     //}}AFX_DATA_INIT
00065 }
00066
00067
00068 void GetPassword::DoDataExchange(CDataExchange* pDX)
00069 {
00070     CHHelpDialog::DoDataExchange(pDX);
00071     //{{AFX_DATA_MAP(GetPassword)
00072     DDX_Text(pDX, IDC_PASSWORD, m_passwd);
00073     //}}AFX_DATA_MAP
00074 }
00075
00076
00077 BEGIN_MESSAGE_MAP(GetPassword, CHHelpDialog)
00078     //{{AFX_MSG_MAP(GetPassword)
00079     ON_BN_CLICKED(IDHELP, OnHelp)
00080     //}}AFX_MSG_MAP
00081 END_MESSAGE_MAP()
00082
00084 // GetPassword message handlers
00085
00087 BOOL GetPassword::OnInitDialog()
00088 {
00089     CHHelpDialog::OnInitDialog();
00090
00091     // Extra initialization here
00092     if( !IsWindowVisible() )
00093     {
00094         // Force the window to the foreground in case it was covered by terminal or DOS box
00095         SetForegroundWindow();
00096     }
00097
00098     return TRUE;  // return TRUE unless you set the focus to a control
00099     // EXCEPTION: OCX Property Pages should return FALSE
00100 }
00101
00102 void GetPassword::InitHelpID()
00103 {
00104     SetCtrlHelpID(IDC_PASSWORD, IDH_IDC_PASSWORD);
00105 }
00106
00108 void GetPassword::OnHelp()
00109 {
00110     ShowHelp();
00111 }
00112
00113 #endif /* WIN32 */
00114
00115 #if qUnix
00116 class UCvsGetPasswd : public UWidget
00117 {
00118     UDECLARE_DYNAMIC(UCvsGetPasswd)
00119 public:
00120     UCvsGetPasswd() : UWidget(::UEventGetWidID()) {}
00121     virtual ~UCvsGetPasswd() {}
00122
00123     enum
00124     {
00125         kOK = EV_COMMAND_START, // 0
00126         kCancel,                // 1
00127         kPasswd                 // 2
00128     };
00129
00130     virtual void DoDataExchange(bool fill);
00131
00132     UStr m_passwd;
00133
00134 protected:
00135     ev_msg int OnOK(void);
00136     ev_msg int OnCancel(void);
00137
00138     UDECLARE_MESSAGE_MAP()
00139 };
00140
00141 UIMPLEMENT_DYNAMIC(UCvsGetPasswd, UWidget)
00142
00143 UBEGIN_MESSAGE_MAP(UCvsGetPasswd, UWidget)
00144     ON_UCOMMAND(UCvsGetPasswd::kOK, UCvsGetPasswd::OnOK)
00145     ON_UCOMMAND(UCvsGetPasswd::kCancel, UCvsGetPasswd::OnCancel)
00146 UEND_MESSAGE_MAP()
00147
00148 int UCvsGetPasswd::OnOK(void)
00149 {
00150     EndModal(true);
00151     return 0;
00152 }
00153
00154 int UCvsGetPasswd::OnCancel(void)
00155 {
00156     EndModal(false);
00157     return 0;
00158 }
00159
00160 void UCvsGetPasswd::DoDataExchange(bool fill)
00161 {
00162     if(fill)
00163     {
00164     }
00165     else
00166     {
00167         UEventSendMessage(GetWidID(), EV_GETTEXT, kPasswd, &m_passwd);
00168     }
00169 }
00170 #endif // qUnix
00171
00173 char* CompatGetPassword(const char* prompt)
00174 {
00175 #ifdef WIN32
00176     static char passwd[255];
00177     GetPassword gp;
00178
00179     if( gp.DoModal() == IDOK )
00180     {
00181         strcpy(passwd, gp.m_passwd);
00182         return passwd;
00183     }
00184
00185     return "";
00186 #endif /* WIN32 */
00187 //{ Mac-Part
00188 #ifdef qMacCvsPP
00189     if(!CMacCvsApp::gApp->IsFrontProcess() && CMacCvsApp::gApp->NotifyUser(0L))
00190     {
00191         while(!CMacCvsApp::gApp->IsFrontProcess())
00192         {
00193             CMacCvsApp::gApp->SpendSomeTime();
00194         }
00195     }
00196
00197     static UStr thepasswd;
00198     KCItemRef theItem               = NULL;
00199
00200     LStr255 pstr;
00201     UStr realPrompt;
00202 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00203     LStr255 phost, puser;
00204     bool doUseKeyChain = false;
00205     OSStatus theStatus;
00206     UStr loopKey;
00207 #endif
00208
00209     if(GetEnvValue(prompt, "prompt", realPrompt))
00210     {
00211         pstr = realPrompt;
00212
00213 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00214         // copied from MacCvsPro::CMacCVSDoc.cpp
00215         UStr host, user, authen;
00216         if(CMacCvsApp::CanUseKeychain() &&
00217             GetEnvValue(prompt, "host", host) &&
00218             GetEnvValue(prompt, "user", user))
00219         {
00220             doUseKeyChain = true;
00221
00222             OSStatus theStatus;
00223             UInt32 theLength;
00224
00225             phost = host;
00226             puser = user;
00227
00228             UStr authen;
00229             if(GetEnvValue(prompt, "authen", authen))
00230             {
00231                 phost += ":";
00232                 phost += authen;
00233             }
00234
00235             UStr dir;
00236             if(GetEnvValue(prompt, "dir", dir))
00237             {
00238                 phost += ":";
00239                 phost += dir;
00240             }
00241
00242             static char ppass[255];
00243
00244             theStatus = KCFindGenericPassword(phost, puser, sizeof(ppass) - 1,
00245                 ppass, &theLength, &theItem);
00246
00247             user = puser;
00248             host = phost;
00249             loopKey = user;
00250             loopKey << '@';
00251             loopKey << host;
00252             // we could have an endless loop is the password is not valid
00253             if (theStatus == noErr && CMacCvsApp::gApp->CheckLoopingPassword(loopKey))
00254             {
00255                 if (theItem != NULL)
00256                     KCReleaseItem(&theItem);
00257
00258                 ppass[theLength] = '\0';
00259
00260                 return ppass;
00261             }
00262         }
00263 #endif
00264     }
00265     else
00266         pstr = prompt;
00267
00268     StDialogHandler theHandler(dlg_Passwd, LCommander::GetTopCommander());
00269     LWindow *theDialog = theHandler.GetDialog();
00270     ThrowIfNil_(theDialog);
00271
00272     LEditText *passwd = dynamic_cast<LEditText*>
00273         (theDialog->FindPaneByID(item_GetPasswd));
00274     LStaticText *promptbox = dynamic_cast<LStaticText*>
00275         (theDialog->FindPaneByID('PROM'));
00276     theDialog->SetLatentSub(passwd);
00277
00278     promptbox->SetText(pstr);
00279
00280     theDialog->Show();
00281     MessageT hitMessage;
00282     while (true)
00283     {       // Let DialogHandler process events
00284         hitMessage = theHandler.DoDialog();
00285
00286         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00287             break;
00288     }
00289     theDialog->Hide();
00290
00291     if(hitMessage == msg_OK)
00292     {
00293         passwd->GetText(pstr);
00294
00295 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00296         if (doUseKeyChain && CMacCvsApp::CanUseKeychain())
00297         {
00298             if (theItem != NULL)
00299             {
00300                 theStatus = KCSetData(theItem, pstr[0], &pstr[1]);
00301
00302                 if (theStatus == noErr)
00303                     theStatus = KCUpdateItem(theItem);
00304             }
00305             else
00306             {
00307                 theStatus = KCAddGenericPassword(phost, puser,
00308                     pstr[0], &pstr[1], &theItem);
00309
00310                 KCAttribute theAttribute;
00311
00312                 if (theStatus == noErr)
00313                 {
00314                     UStr theDescriptionText("MacCVS password");
00315                     theAttribute.tag = kDescriptionKCItemAttr;
00316                     theAttribute.length = theDescriptionText.length();
00317                     theAttribute.data = (void *)(const char *)theDescriptionText;
00318                     theStatus = KCSetAttribute(theItem, &theAttribute);
00319                 }
00320
00321                 OSType theTypeCreator;
00322
00323                 if (theStatus == noErr)
00324                 {
00325                     theTypeCreator = 'mCVS';
00326                     theAttribute.tag = kCreatorKCItemAttr;
00327                     theAttribute.length = sizeof(theTypeCreator);
00328                     theAttribute.data = &theTypeCreator;
00329                     theStatus = KCSetAttribute(theItem, &theAttribute);
00330                 }
00331
00332                 if (theStatus == noErr)
00333                 {
00334                     theTypeCreator = 'APPL';
00335                     theAttribute.tag = kTypeKCItemAttr;
00336                     theStatus = KCSetAttribute(theItem, &theAttribute);
00337                 }
00338
00339                 if (theStatus == noErr)
00340                 {
00341                     Boolean theCustomIcon = true;
00342                     theAttribute.tag = kCustomIconKCItemAttr;
00343                     theAttribute.length = sizeof(theCustomIcon);
00344                     theAttribute.data = &theCustomIcon;
00345                     theStatus = KCSetAttribute(theItem, &theAttribute);
00346                 }
00347
00348                 if (theStatus == noErr)
00349                     theStatus = KCUpdateItem(theItem);
00350             }
00351
00352             if (theItem != NULL)
00353                 KCReleaseItem(&theItem);
00354
00355             CMacCvsApp::gApp->PushValidPassword(loopKey);
00356         }
00357 #endif
00358
00359         thepasswd = pstr;
00360         return thepasswd.length() == 0 ? (char *)"" : (char *)thepasswd.c_str();
00361     }
00362
00363 #if !qCarbon || UNIVERSAL_INTERFACES_VERSION >= 0x0334
00364     if (theItem != NULL)
00365         KCReleaseItem(&theItem);
00366 #endif
00367
00368     return "";
00369 #endif /* qMacCvsPP */
00370 //}
00371 #if qUnix
00372     static char passwd[255];
00373     void *wid = UCreate_PasswdDlg();
00374
00375     UCvsGetPasswd *dlg = new UCvsGetPasswd();
00376     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00377
00378     if(dlg->DoModal())
00379     {
00380         strcpy(passwd, dlg->m_passwd);
00381     }
00382     else
00383         strcpy(passwd, "");
00384
00385     delete dlg;
00386     return passwd;
00387 #endif // qUnix
00388 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_loader.h Source File

common/dll_loader.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * dll_loader.h --- code to load dynamic code
00023  */
00024
00025 #ifndef DLLLOADER_H
00026 #define DLLLOADER_H
00027
00028 #ifdef TARGET_OS_MAC
00029 #   include <CodeFragments.h>
00030     typedef CFragConnectionID CompatConnectID;
00031 #elif defined(WIN32)
00032     typedef HINSTANCE CompatConnectID;
00033 #else /* !TARGET_OS_MAC && !WIN32 */
00034 #   include <dlfcn.h>
00035     typedef void *CompatConnectID;
00036 #endif /* !TARGET_OS_MAC && !WIN32 */
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00042 extern void* sCompatProc;
00043
00044 int CompatLoadLibrary(CompatConnectID* connID, const char* name_dll);
00045 int CompatCloseLibrary(CompatConnectID* connID);
00046 void* _CompatCallLibrary(CompatConnectID connID, const char* name_func);
00047
00057 #define CompatCallLibrary1(ID, res, idf, nf, tf, a1) \
00058         ( \
00059             sCompatProc = _CompatCallLibrary(ID, nf), \
00060             res = sCompatProc != NULL ? \
00061                 ((tf)sCompatProc)(a1) : res, \
00062             sCompatProc != NULL \
00063         )
00064
00075 #define CompatCallLibrary2(ID, res, idf, nf, tf, a1, a2) \
00076         ( \
00077             sCompatProc = _CompatCallLibrary(ID, nf), \
00078             res = sCompatProc != NULL ? \
00079                 ((tf)sCompatProc)(a1, a2) : res, \
00080             sCompatProc != NULL \
00081         )
00082
00094 #define CompatCallLibrary3(ID, res, idf, nf, tf, a1, a2, a3) \
00095         ( \
00096             sCompatProc = _CompatCallLibrary(ID, nf), \
00097             res = sCompatProc != NULL ? \
00098                 ((tf)sCompatProc)(a1, a2, a3) : res, \
00099             sCompatProc != NULL \
00100         )
00101
00107 #define CompatFuncArg(funcInfo, func) func
00108
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112
00113 #endif /* DLLLOADER_H */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TextBinary.h Source File

common/TextBinary.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * TextBinary.h --- utilities to ckeck if files are binary or text
00023  */
00024
00025 #ifndef TEXTBINARY_H
00026 #define TEXTBINARY_H
00027
00028 #include "CPStr.h"
00029
00030 #ifdef TARGET_OS_MAC
00031 #   include <Files.h>
00032 #   if TARGET_API_MAC_OSX
00033 #       define UFSSpec FSRef
00034 #   else
00035 #       define UFSSpec FSSpec
00036 #   endif
00037 #else /* !TARGET_OS_MAC */
00038     typedef int FSSpec;
00039 #   define UFSSpec FSSpec
00040 #endif /* !TARGET_OS_MAC */
00041
00043 typedef enum
00044 {
00045     // text and binary flags
00046     kFileIsOK,
00047     kFileMissing,
00048     kFileIsAlias,
00049     kFileInvalidName,
00051     // text flags
00052     kTextWrongLF,
00053     kTextIsBinary,
00054     kTextEscapeChar,
00055     kTextWrongSig,
00056     kTextIsUnicode,
00058     // binary flags
00059     kBinIsText,
00060     kBinWrongSig,
00061     kBinIsUnicode,
00063     // unicode flags
00064     kUnicodeIsText,
00065     kUnicodeIsBinary
00066 } kTextBinTYPE;
00067
00069 typedef enum
00070 {
00071     kFileTypeText,
00072     kFileTypeBin,
00073     kFileTypeUnicode
00074 } kFileType;
00075
00076 kTextBinTYPE FileIsText(const char *arg, const char *dir, const UFSSpec * spec = 0L);
00077 kTextBinTYPE FileIsBinary(const char *arg, const char *dir, const UFSSpec * spec = 0L);
00078 kTextBinTYPE FileIsUnicode(const char *arg, const char *dir, const UFSSpec * spec = 0L);
00079
00080 #endif /* TEXTBINARY_H */
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphFrm.cpp Source File

WinCvs/GraphFrm.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // GraphFrm.cpp : implementation of the CGraphFrame class
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026
00027 #include "GraphFrm.h"
00028 #include "GraphView.h"
00029 #include "WinCvsView.h"
00030 #include "MainFrm.h"
00031
00032 #ifdef _DEBUG
00033 #define new DEBUG_NEW
00034 #undef THIS_FILE
00035 static char THIS_FILE[] = __FILE__;
00036 #endif
00037
00039 // CGraphFrame
00040
00041 IMPLEMENT_DYNCREATE(CGraphFrame, CCJMDIChildWnd)
00042
00043 BEGIN_MESSAGE_MAP(CGraphFrame, CCJMDIChildWnd)
00044     //{{AFX_MSG_MAP(CGraphFrame)
00045         // NOTE - the ClassWizard will add and remove mapping macros here.
00046         //    DO NOT EDIT what you see in these blocks of generated code !
00047     //}}AFX_MSG_MAP
00048 END_MESSAGE_MAP()
00049
00051 // CGraphFrame construction/destruction
00052
00053 CGraphFrame::CGraphFrame()
00054 {
00055     // TODO: add member initialization code here
00056
00057 }
00058
00059 CGraphFrame::~CGraphFrame()
00060 {
00061 }
00062
00064 // CGraphFrame diagnostics
00065
00066 #ifdef _DEBUG
00067 void CGraphFrame::AssertValid() const
00068 {
00069     CCJMDIChildWnd::AssertValid();
00070 }
00071
00072 void CGraphFrame::Dump(CDumpContext& dc) const
00073 {
00074     CCJMDIChildWnd::Dump(dc);
00075 }
00076
00077 #endif //_DEBUG
00078
00080 // CGraphFrame message handlers
00081
00082 BOOL CGraphFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
00083 {
00084     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00085     if( app->GetMainFrame()->OnBroadcastCmdMsg(nID, nCode, pExtra, pHandlerInfo) )
00086         return TRUE;
00087
00088     return CCJMDIChildWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
00089 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJSortClass::CSortItem Member List

This is the complete list of members for CCJSortClass::CSortItem, including all inherited members.

CSortItem(const DWORD dwData, const CString &strItemText) | CCJSortClass::CSortItem
m_dwData | CCJSortClass::CSortItem
m_strItemText | CCJSortClass::CSortItem

Generated on Sat Aug 7 22:50:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJDockContext.cpp Source File

WinCvs/CJLib/CJLibrary/CJDockContext.cpp

Go to the documentation of this file.
00001 // CJDockContext.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2001/11/06 15:28:26 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJockey/CJLibrary/CJDockContext.cpp $
00011  *
00012  * $History: CJDockContext.cpp $
00013  *
00014  * *****************  Version 10  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/CJLibrary
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 9  *****************
00020  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00021  * Updated in $/CodeJockey/CJLibrary
00022  *
00023  * *****************  Version 8  *****************
00024  * User: Kirk Stowell Date: 7/18/99    Time: 10:25p
00025  * Updated in $/CodeJockey/CJLibrary
00026  * Added vc5 compatiblity
00027  *
00028  * *****************  Version 7  *****************
00029  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00030  * Updated in $/CodeJockey/CJ60Lib
00031  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00032  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00033  * message handler, this is now automatically handled by the base class.
00034  * Added redraw flags to the create method and modified paint and layout
00035  * handlers to reduce flicker and un-necessary command handling. Dragging
00036  * rect now reflects actual control bar docked size. Added "flat" look to
00037  * the control bars, the control bars can now use the classic DevStudio
00038  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00039  * docking windows now handle dragging, docking and floating much better,
00040  * and behave more like DevStudio.
00041  *
00042  * *****************  Version 6  *****************
00043  * User: Kirk Stowell Date: 5/12/99    Time: 5:32a
00044  * Updated in $/CodeJockey/CJ60Lib
00045  * Added support for vc5 compatibility
00046  *
00047  * *****************  Version 5  *****************
00048  * User: Kirk Stowell Date: 4/14/99    Time: 12:57p
00049  * Updated in $/CodeJockey/CJ60Lib
00050  * Daniel Harth [danielh@mail.matco.ro] - Added support for diagonal
00051  * sizing.
00052  *
00053  * *****************  Version 4  *****************
00054  * User: Kirk Stowell Date: 4/03/99    Time: 12:56p
00055  * Updated in $/CodeJockey/CJ60Lib
00056  * Added comments and cleaned up code.
00057  *
00058  * *****************  Version 3  *****************
00059  * User: Kirk Stowell Date: 3/10/99    Time: 12:56p
00060  * Updated in $/CodeJockey/CJ60Lib
00061  * Added support for toggle docking.
00062  *
00063  * *****************  Version 2  *****************
00064  * User: Kirk Stowell Date: 3/03/99    Time: 12:54p
00065  * Updated in $/CodeJockey/CJ60Lib
00066  * Scott Killen [s_killen@yahoo.com] - If your frame is not your main
00067  * window in your app, you cannot dock a floating CCJControlBar. Changed
00068  * (CFrameWnd*)AfxGetApp()->m_pMainWnd to (CFrameWnd*)m_pDockSite in
00069  * CanDockDockBar() and DockSizeBar()
00070  *
00071  * *****************  Version 1  *****************
00072  * User: Kirk Stowell Date: 1/12/99    Time: 12:53p
00073  * Created in $/CodeJockey/CJ60Lib
00074  * Initial creation to add side-by-side docking support for CCJControlBar
00075  * class.
00076  *
00077  ***************************************************************************/
00079
00080 #include "stdafx.h"
00081 #include "CJDockContext.h"
00082 #include "CJControlBar.h"
00083 #include "CJSizeDockBar.h"
00084
00085 #ifdef _DEBUG
00086 #define new DEBUG_NEW
00087 #undef THIS_FILE
00088 static char THIS_FILE[] = __FILE__;
00089 #endif
00090
00091 #define HORZF(dw) (dw & CBRS_ORIENT_HORZ)
00092 #define VERTF(dw) (dw & CBRS_ORIENT_VERT)
00093
00094 static void AdjustRectangle(CRect& rect, CPoint pt)
00095 {
00096     int nXOffset = (pt.x < rect.left) ? (pt.x - rect.left) :
00097                     (pt.x > rect.right) ? (pt.x - rect.right) : 0;
00098     int nYOffset = (pt.y < rect.top) ? (pt.y - rect.top) :
00099                     (pt.y > rect.bottom) ? (pt.y - rect.bottom) : 0;
00100     rect.OffsetRect(nXOffset, nYOffset);
00101 }
00102
00104 // CCJDockContext
00105
00106 CCJDockContext::CCJDockContext(CControlBar* pBar) : CDockContext(pBar)
00107 {
00108     // TODO: add construction code here.
00109 }
00110
00111 CCJDockContext::~CCJDockContext()
00112 {
00113     // TODO: add destruction code here.
00114 }
00115
00117
00118 //1999-05-19 Yiannhs
00119 void CCJDockContext::StartDragDockBar(CPoint pt)
00120 {
00121     ASSERT_VALID(m_pBar);
00122     m_bDragging = TRUE;
00123
00124     InitLoop();
00125
00126     if (m_pBar->m_dwStyle & CBRS_SIZE_DYNAMIC)
00127     {
00128         CRect rect;
00129         m_pBar->GetWindowRect(rect);
00130         // Yiannhs setup and the new member
00131         m_ptOrig = m_ptLast = pt;
00132         CSize sizeHorz = m_pBar->CalcDynamicLayout(0, LM_HORZ | LM_HORZDOCK);
00133         CSize sizeVert = m_pBar->CalcDynamicLayout(0, LM_VERTDOCK);
00134         CSize sizeFloat = m_pBar->CalcDynamicLayout(0, LM_HORZ | LM_MRUWIDTH);
00135
00136         m_rectDragHorz = CRect(rect.TopLeft(), sizeHorz);
00137         m_rectDragVert = CRect(rect.TopLeft(), sizeVert);
00138
00139         // calculate frame dragging rectangle
00140         m_rectFrameDragHorz = CRect(rect.TopLeft(), sizeFloat);
00141         m_rectFrameDragVert = CRect(rect.TopLeft(), sizeFloat);
00142
00143         CMiniFrameWnd::CalcBorders(&m_rectFrameDragHorz);
00144         CMiniFrameWnd::CalcBorders(&m_rectFrameDragVert);
00145
00146         m_rectFrameDragHorz.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00147         m_rectFrameDragVert.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00148     }
00149
00150     else if (m_pBar->m_dwStyle & CBRS_SIZE_FIXED)
00151     {
00152         CRect rect;
00153         m_pBar->GetWindowRect(rect);
00154         //Yiannhs setup and the new member
00155         m_ptOrig = m_ptLast = pt;
00156         CSize sizeHorz = m_pBar->CalcDynamicLayout(-1, LM_HORZ | LM_HORZDOCK);
00157         CSize sizeVert = m_pBar->CalcDynamicLayout(-1, LM_VERTDOCK);
00158
00159         m_rectFrameDragHorz = m_rectDragHorz = CRect(rect.TopLeft(), sizeHorz);
00160         m_rectFrameDragVert = m_rectDragVert = CRect(rect.TopLeft(), sizeVert);
00161
00162         CMiniFrameWnd::CalcBorders(&m_rectFrameDragHorz);
00163         CMiniFrameWnd::CalcBorders(&m_rectFrameDragVert);
00164         m_rectFrameDragHorz.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00165         m_rectFrameDragVert.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00166     }
00167
00168     else
00169     {
00170         CRect rect;
00171         m_pBar->GetWindowRect(rect);
00172         //Yiannhs setup and the new member
00173         m_ptOrig = m_ptLast = pt;
00174         BOOL bHorz = HORZF(m_dwStyle);
00175         DWORD dwMode = !bHorz ? (LM_HORZ | LM_HORZDOCK) : LM_VERTDOCK;
00176         CSize size = m_pBar->CalcDynamicLayout(-1, dwMode);
00177
00178         if (bHorz)
00179         {
00180             m_rectDragHorz = rect;
00181             m_rectDragVert = CRect(CPoint(pt.x - rect.Height()/2, rect.top), size);
00182         }
00183
00184         else
00185         {
00186             m_rectDragVert = rect;
00187             m_rectDragHorz = CRect(CPoint(rect.left, pt.y - rect.Width()/2), size);
00188         }
00189
00190         m_rectFrameDragHorz = m_rectDragHorz;
00191         m_rectFrameDragVert = m_rectDragVert;
00192
00193         CMiniFrameWnd::CalcBorders(&m_rectFrameDragHorz);
00194         CMiniFrameWnd::CalcBorders(&m_rectFrameDragVert);
00195         m_rectFrameDragHorz.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00196         m_rectFrameDragVert.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00197     }
00198
00199     AdjustRectangle(m_rectDragHorz, pt);
00200     AdjustRectangle(m_rectDragVert, pt);
00201     AdjustRectangle(m_rectFrameDragHorz, pt);
00202     AdjustRectangle(m_rectFrameDragVert, pt);
00203
00204     m_dwOverDockStyle = CanDockDockBar();
00205     MoveDockBar(pt);
00206     TrackDockBar();
00207 }
00208
00209 DWORD CCJDockContext::CanDockDockBar()
00210 {
00211     BOOL bStyleHorz;
00212     DWORD dwDock = 0;
00213     DWORD dwCurr = 0;
00214
00215     ASSERT(m_dwStyle != 0);
00216     ASSERT_KINDOF(CFrameWnd, m_pDockSite);
00217
00218     bStyleHorz = HORZF(m_dwStyle);
00219     bStyleHorz = m_bFlip ? !bStyleHorz : bStyleHorz;
00220
00221     if (bStyleHorz && HORZF(m_dwDockStyle))
00222     {
00223         dwDock = CanDockDockBar(m_rectDragHorz,
00224             m_dwDockStyle & ~CBRS_ORIENT_VERT);
00225     }
00226
00227     else if (VERTF(m_dwDockStyle))
00228     {
00229         dwDock = CanDockDockBar(m_rectDragVert,
00230             m_dwDockStyle & ~CBRS_ORIENT_HORZ);
00231     }
00232
00233     if (!m_bFlip)
00234     {
00235         if (dwDock == 0 && HORZF(m_dwDockStyle))
00236         {
00237             dwCurr = CanDockDockBar(m_rectDragVert,
00238                 m_dwDockStyle & ~CBRS_ORIENT_VERT);
00239             dwDock = CanDockDockBar(m_rectDragHorz,
00240                 m_dwDockStyle & ~CBRS_ORIENT_VERT);
00241             dwDock = (dwDock == dwCurr) ? dwDock : 0;
00242         }
00243
00244         if (dwDock == 0 && VERTF(m_dwDockStyle))
00245         {
00246             dwCurr = CanDockDockBar(m_rectDragHorz,
00247                 m_dwDockStyle & ~CBRS_ORIENT_HORZ);
00248             dwDock = CanDockDockBar(m_rectDragVert,
00249                 m_dwDockStyle & ~CBRS_ORIENT_HORZ);
00250             dwDock = (dwDock == dwCurr) ? dwDock : 0;
00251         }
00252     }
00253
00254     return dwDock;
00255 }
00256
00257 DWORD CCJDockContext::CanDockDockBar(CRect rect, DWORD dwDockStyle, CDockBar** ppDockBar)
00258 {
00259     CFrameWnd *pFrame = (CFrameWnd*)m_pDockSite;
00260     ASSERT_VALID(pFrame);
00261
00262     dwDockStyle &= CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI;
00263
00264     if (ppDockBar != NULL)
00265         *ppDockBar = NULL;
00266     POSITION pos = pFrame->m_listControlBars.GetHeadPosition();
00267     while (pos != NULL)
00268     {
00269         CCJSizeDockBar* pDockBar = (CCJSizeDockBar*)pFrame->m_listControlBars.GetNext(pos);
00270         if( !pDockBar->IsKindOf(RUNTIME_CLASS(CCJSizeDockBar)) )
00271             continue;
00272         if (pDockBar->IsDockSizeBar() && pDockBar->IsWindowVisible() &&
00273             (pDockBar->m_dwStyle & dwDockStyle & CBRS_ALIGN_ANY) &&
00274             (!pDockBar->m_bFloating ||
00275                 (dwDockStyle & pDockBar->m_dwStyle & CBRS_FLOAT_MULTI)))
00276         {
00277             CRect rectBar;
00278             pDockBar->GetWindowRect(&rectBar);
00279             if (rectBar.Width() == 0)
00280                 rectBar.right++;
00281             if (rectBar.Height() == 0)
00282                 rectBar.bottom++;
00283             if (rectBar.IntersectRect(rectBar, rect))
00284             {
00285                 if (ppDockBar != NULL)
00286                     *ppDockBar = pDockBar;
00287                 return pDockBar->m_dwStyle & dwDockStyle;
00288             }
00289         }
00290     }
00291     return 0;
00292 }
00293
00294 BOOL CCJDockContext::TrackDockBar()
00295 {
00296     if (::GetCapture() != NULL)
00297         return FALSE;
00298     m_pBar->SetCapture();
00299     ASSERT(m_pBar == CWnd::GetCapture());
00300
00301     while (CWnd::GetCapture() == m_pBar)
00302     {
00303         MSG msg;
00304         if (!::GetMessage(&msg, NULL, 0, 0))
00305         {
00306             AfxPostQuitMessage(msg.wParam);
00307             break;
00308         }
00309
00310         switch (msg.message)
00311         {
00312         case WM_LBUTTONUP:
00313             if (m_bDragging)
00314                 EndDragDockBar();
00315             else
00316                 EndResize();
00317             return TRUE;
00318         case WM_MOUSEMOVE:
00319             if (m_bDragging)
00320                 MoveDockBar(msg.pt);
00321             else
00322                 Stretch(msg.pt);
00323             break;
00324         case WM_KEYUP:
00325             if (m_bDragging)
00326                 OnKey((int)msg.wParam, FALSE);
00327             break;
00328         case WM_KEYDOWN:
00329             if (m_bDragging)
00330                 OnKey((int)msg.wParam, TRUE);
00331             if (msg.wParam == VK_ESCAPE)
00332             {
00333                 CancelLoop();
00334                 return FALSE;
00335             }
00336             break;
00337         case WM_RBUTTONDOWN:
00338             CancelLoop();
00339             return FALSE;
00340
00341             // just dispatch rest of the messages
00342         default:
00343             DispatchMessage(&msg);
00344             break;
00345         }
00346     }
00347
00348     CancelLoop();
00349     return FALSE;
00350 }
00351
00352 void CCJDockContext::EndDragDockBar()
00353 {
00354     CancelLoop();
00355     //Yiannhs: reduce some more flickering, and unexpected behaviour in floating bars
00356     //         ok did the expected.
00357     if( m_ptLast == m_ptOrig )
00358         return;
00359
00360     if (m_dwOverDockStyle != 0)
00361     {
00362         CCJSizeDockBar* pDockBar = GetDockBar(m_dwOverDockStyle);
00363         if( pDockBar == NULL ) // John Armstrong
00364             return;
00365
00366         CRect rect = (m_dwOverDockStyle & CBRS_ORIENT_VERT) ?
00367             m_rectDragVert : m_rectDragHorz;
00368
00369         UINT uID = _AfxGetDlgCtrlID(pDockBar->m_hWnd);
00370         m_uMRUDockID = uID;
00371         m_rectMRUDockPos = rect;
00372         pDockBar->ScreenToClient(&m_rectMRUDockPos);
00373         DockSizeBar(m_pBar, pDockBar, &rect);
00374
00375         //yiannhs. after testing the posibilities I think this is the best way
00376         m_pDockSite->RecalcLayout( FALSE );
00377     }
00378
00379     else if ((m_dwStyle & CBRS_SIZE_DYNAMIC) || (HORZF(m_dwStyle) && !m_bFlip) ||
00380         (VERTF(m_dwStyle) && m_bFlip))
00381     {
00382         m_dwMRUFloatStyle = CBRS_ALIGN_TOP | (m_dwDockStyle & CBRS_FLOAT_MULTI);
00383         m_ptMRUFloatPos = m_rectFrameDragHorz.TopLeft();
00384         m_pDockSite->FloatControlBar(m_pBar, m_ptMRUFloatPos, m_dwMRUFloatStyle);
00385
00386         //yiannhs. after testing the posibilities I think this is the best way
00387         m_pDockSite->RecalcLayout( FALSE );
00388     }
00389
00390     else
00391     {
00392         m_dwMRUFloatStyle = CBRS_ALIGN_LEFT | (m_dwDockStyle & CBRS_FLOAT_MULTI);
00393         m_ptMRUFloatPos = m_rectFrameDragVert.TopLeft();
00394         m_pDockSite->FloatControlBar(m_pBar, m_ptMRUFloatPos, m_dwMRUFloatStyle);
00395
00396         //yiannhs. after testing the posibilities I think this is the best way
00397         m_pDockSite->RecalcLayout( FALSE );
00398     }
00399 }
00400
00401 CCJSizeDockBar* CCJDockContext::GetDockBar(DWORD dwOverDockStyle)
00402 {
00403     DWORD dw = 0;
00404     CDockBar* pBar;
00405     if (HORZF(dwOverDockStyle))
00406     {
00407         ASSERT_KINDOF(CFrameWnd, m_pDockSite);
00408         dw = CanDockDockBar(m_rectDragHorz,
00409             dwOverDockStyle & ~CBRS_ORIENT_VERT, &pBar);
00410         ASSERT(dw != 0);
00411         ASSERT(pBar != NULL);
00412         return (CCJSizeDockBar*)pBar;
00413     }
00414
00415     if (VERTF(dwOverDockStyle))
00416     {
00417         dw = CanDockDockBar(m_rectDragVert,
00418             dwOverDockStyle & ~CBRS_ORIENT_HORZ, &pBar);
00419         ASSERT(dw != 0);
00420         ASSERT(pBar != NULL);
00421         return (CCJSizeDockBar*)pBar;
00422     }
00423
00424     return NULL;
00425 }
00426
00427 void CCJDockContext::MoveDockBar(CPoint pt)
00428 {
00429     CPoint ptOffset = pt - m_ptLast;
00430
00431     m_rectDragHorz.OffsetRect(ptOffset);
00432     m_rectFrameDragHorz.OffsetRect(ptOffset);
00433     m_rectDragVert.OffsetRect(ptOffset);
00434     m_rectFrameDragVert.OffsetRect(ptOffset);
00435     m_ptLast = pt;
00436     m_dwOverDockStyle = m_bForceFrame ? 0 : CanDockDockBar();
00437     DrawFocusRect();
00438 }
00439
00440 void CCJDockContext::DockSizeBar(CControlBar * pBar,CCJSizeDockBar *pDockBar, LPRECT lpRect)
00441 {
00442     CFrameWnd *pFrame = (CFrameWnd*)m_pDockSite;
00443     ASSERT_VALID(pFrame);
00444
00445     ASSERT(pBar != NULL);
00446     ASSERT(pBar->m_pDockContext != NULL);
00447
00448     if( pDockBar == NULL )
00449     {
00450         for (int i = 0; i < 4; i++)
00451         {
00452             if ((dwSizeBarMap[i][1] & CBRS_ALIGN_ANY) ==
00453                 (pBar->m_dwStyle & CBRS_ALIGN_ANY))
00454             {
00455                 pDockBar = (CCJSizeDockBar*)pFrame->GetControlBar(dwSizeBarMap[i][0]);
00456                 ASSERT(pDockBar != NULL);
00457                 break;
00458             }
00459         }
00460     }
00461
00462     ASSERT(pDockBar != NULL);
00463     ASSERT(pFrame->m_listControlBars.Find(pBar) != NULL);
00464     ASSERT(pBar->m_pDockSite == pFrame);
00465     ((CCJControlBar*)pBar)->Normalize();
00466     pDockBar->DockControlBar(pBar, lpRect);
00467 }
00468
00469 void CCJDockContext::ToggleDocking()
00470 {
00471     if (m_pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar)))
00472     {
00473         if (m_pBar->IsFloating())
00474         {
00475             // Dock it only if is allowed to be docked
00476             if (m_pBar->m_dwDockStyle & CBRS_ALIGN_ANY)
00477             {
00478                 ASSERT((m_uMRUDockID >= AFX_IDW_DOCKBAR_TOP && m_uMRUDockID <= AFX_IDW_SIZEBAR_BOTTOM) ||
00479                     m_uMRUDockID == 0);
00480
00481                 CRect rect = m_rectMRUDockPos;
00482                 CCJSizeDockBar* pDockBar = NULL;
00483                 if (m_uMRUDockID != 0)
00484                 {
00485                     pDockBar = (CCJSizeDockBar*)m_pDockSite->GetControlBar(m_uMRUDockID);
00486                     pDockBar->ClientToScreen(&rect);
00487                 }
00488
00489                 // dock it at the specified position, RecalcLayout will snap
00490                 DockSizeBar(m_pBar, pDockBar, &rect);
00491                 m_pDockSite->RecalcLayout();
00492             }
00493         }
00494         else
00495         {
00496             CPoint ptFloat = m_ptMRUFloatPos;
00497             if (ptFloat.x < 0 || ptFloat.y < 0)
00498             {
00499                 ptFloat = m_rectMRUDockPos.TopLeft();
00500                 m_pBar->GetParent()->ClientToScreen(&ptFloat);
00501             }
00502             m_pDockSite->FloatControlBar(m_pBar, ptFloat, m_dwMRUFloatStyle);
00503         }
00504     }
00505 }
00506
00508 // CDockContext Resize Operations
00509
00510 #define m_rectRequestedSize     m_rectDragHorz
00511 #define m_rectActualSize        m_rectDragVert
00512 #define m_rectActualFrameSize   m_rectFrameDragHorz
00513 #define m_rectFrameBorders      m_rectFrameDragVert
00514
00515 void CCJDockContext::StartResize(int nHitTest, CPoint pt)
00516 {
00517     ASSERT_VALID(m_pBar);
00518     ASSERT(m_pBar->m_dwStyle & CBRS_SIZE_DYNAMIC);
00519     m_bDragging = FALSE;
00520
00521     InitLoop();
00522
00523     // GetWindowRect returns screen coordinates(not mirrored)
00524     // So if the desktop is mirrored then turn off mirroring
00525     // for the desktop dc so that we draw correct focus rect
00526 #ifndef _VC_VERSION_5
00527
00529 #ifndef LAYOUT_LTR
00530 #define LAYOUT_LTR 0x00000000
00531 #endif
00532
00533     if (m_pDC->GetLayout() & LAYOUT_RTL)
00534         m_pDC->SetLayout(LAYOUT_LTR);
00535 #endif // _VC_VERSION_5
00536
00537     // get true bar size (including borders)
00538     CRect rect;
00539     m_pBar->GetWindowRect(rect);
00540     m_ptLast = pt;
00541     m_nHitTest = nHitTest;
00542
00543     CSize size = m_pBar->CalcDynamicLayout(0, LM_HORZ | LM_MRUWIDTH);
00544     m_rectRequestedSize = CRect(rect.TopLeft(), size);
00545     m_rectActualSize = CRect(rect.TopLeft(), size);
00546     m_rectActualFrameSize = CRect(rect.TopLeft(), size);
00547
00548     // calculate frame rectangle
00549     CMiniFrameWnd::CalcBorders(&m_rectActualFrameSize);
00550     m_rectActualFrameSize.InflateRect(-afxData.cxBorder2, -afxData.cyBorder2);
00551
00552     m_rectFrameBorders = CRect(CPoint(0,0),
00553         m_rectActualFrameSize.Size() - m_rectActualSize.Size());
00554
00555     // initialize tracking state and enter tracking loop
00556     m_dwOverDockStyle = 0;
00557     Stretch(pt);   // call it here to handle special keys
00558     TrackDockBar();
00559 }
00560
00561 void CCJDockContext::Stretch(CPoint pt)
00562 {
00563     CPoint ptOffset = pt - m_ptLast;
00564     CSize size;
00565
00566     // offset all drag rects to new position
00567     if (m_nHitTest != HTTOP && m_nHitTest != HTBOTTOM)
00568     {
00569         if (m_nHitTest == HTLEFT || m_nHitTest == HTTOPLEFT || m_nHitTest == HTBOTTOMLEFT)
00570             m_rectRequestedSize.left += ptOffset.x;
00571         else
00572             m_rectRequestedSize.right += ptOffset.x;
00573         size = m_pBar->CalcDynamicLayout(m_rectRequestedSize.Width(), LM_HORZ);
00574     }
00575
00576     if (m_nHitTest != HTLEFT && m_nHitTest != HTRIGHT)
00577     {
00578         if (m_nHitTest == HTTOP || m_nHitTest == HTTOPLEFT || m_nHitTest == HTTOPRIGHT)
00579             m_rectRequestedSize.top += ptOffset.y;
00580         else
00581             m_rectRequestedSize.bottom += ptOffset.y;
00582         size = m_pBar->CalcDynamicLayout(m_rectRequestedSize.Height(), LM_HORZ|LM_LENGTHY);
00583     }
00584
00585     CRect rectDesk;
00586     HWND hWndDesk = ::GetDesktopWindow();
00587     ::GetWindowRect(hWndDesk, &rectDesk);
00588     CRect rectTemp = m_rectActualFrameSize;
00589
00590     // left, top, top left
00591     if (m_nHitTest == HTLEFT || m_nHitTest == HTTOP || m_nHitTest == HTTOPLEFT)
00592     {
00593         rectTemp.left = rectTemp.right -
00594             (size.cx + m_rectFrameBorders.Width());
00595         rectTemp.top = rectTemp.bottom -
00596             (size.cy + m_rectFrameBorders.Height());
00597         CRect rect;
00598         if (rect.IntersectRect(rectDesk, rectTemp))
00599         {
00600             m_rectActualSize.left = m_rectActualSize.right - size.cx;
00601             m_rectActualSize.top = m_rectActualSize.bottom - size.cy;
00602             m_rectActualFrameSize.left = rectTemp.left;
00603             m_rectActualFrameSize.top = rectTemp.top;
00604         }
00605     } else if (m_nHitTest == HTTOPRIGHT) // top right
00606     {
00607         rectTemp.top = rectTemp.bottom -
00608             (size.cy + m_rectFrameBorders.Height());
00609         rectTemp.right = rectTemp.left +
00610             (size.cx + m_rectFrameBorders.Width());
00611         CRect rect;
00612         if (rect.IntersectRect(rectDesk, rectTemp))
00613         {
00614             m_rectActualSize.left = m_rectActualSize.right - size.cx;
00615             m_rectActualSize.bottom = m_rectActualSize.top + size.cy;
00616             m_rectActualFrameSize.right = rectTemp.right;
00617             m_rectActualFrameSize.top = rectTemp.top;
00618         }
00619     } else if (m_nHitTest == HTBOTTOMLEFT) // bottom left
00620     {
00621         rectTemp.bottom = rectTemp.top +
00622             (size.cy + m_rectFrameBorders.Height());
00623         rectTemp.left = rectTemp.right -
00624             (size.cx + m_rectFrameBorders.Width());
00625         CRect rect;
00626         if (rect.IntersectRect(rectDesk, rectTemp))
00627         {
00628             m_rectActualSize.right = m_rectActualSize.left + size.cx;
00629             m_rectActualSize.top = m_rectActualSize.bottom - size.cy;
00630             m_rectActualFrameSize.left = rectTemp.left;
00631             m_rectActualFrameSize.bottom = rectTemp.bottom;
00632         }
00633     } else// bottom, right, bottom right
00634     {
00635         rectTemp.right = rectTemp.left +
00636             (size.cx + m_rectFrameBorders.Width());
00637         rectTemp.bottom = rectTemp.top +
00638             (size.cy + m_rectFrameBorders.Height());
00639         CRect rect;
00640         if (rect.IntersectRect(rectDesk, rectTemp))
00641         {
00642             m_rectActualSize.right = m_rectActualSize.left + size.cx;
00643             m_rectActualSize.bottom = m_rectActualSize.top + size.cy;
00644             m_rectActualFrameSize.right = rectTemp.right;
00645             m_rectActualFrameSize.bottom = rectTemp.bottom;
00646         }
00647     }
00648     m_ptLast = pt;
00649
00650     // update feedback
00651     DrawFocusRect();
00652 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TGraphRectSelect Member List

This is the complete list of members for TGraphRectSelect, including all inherited members.

m_rect | TGraphRectSelect | [protected]
m_shiftOn | TGraphRectSelect | [protected]
m_view | TGraphRectSelect | [protected]
TGraphRectSelect(bool shiftOn, CGraphView *view, CRect &rect) | TGraphRectSelect |
TraverseGraph(CLogNode *node) | TGraph |
TraverseNode(CLogNode *node) | TGraphRectSelect | [virtual]

Generated on Sat Aug 7 22:57:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMemFile.h Source File

WinCvs/CJLib/Include/CJMemFile.h

Go to the documentation of this file.
00001 // CJMemFile.h: interface for the CCJMemFile class.
00002 //
00003 // Copyright © 1999 Maxallion
00004 // mailto:XFile@maxallion.8m.com
00005 // ICQ# 32304418
00006 //
00007 // CCJMemFile - Extended Memory File - Beta - w/o a lot of error checking
00008 // - Is used like a normal CFile or CStdioFile or CMemFile object
00009 // - String Functions : ReadString, WriteString
00010 // - Loads physical files into memory on creation and saves them back to disk on destruction
00011 // - Can duplicate itself to other CFile derived objects
00012 // - Has a Search function
00013 // - can be read-accessed like an array
00014 //
00015 // OVERLOADED OPERATORS:
00016 // = Imports from another file or sets file Position
00017 // += Appends another file
00018 // [] reads a byte like an array
00019 //
00021 /****************************************************************************
00022  *
00023  * $Date: 1999/11/30 21:45:51 $
00024  * $Revision: 1.1.1.1 $
00025  * $Archive: /CodeJock/Include/CJMemFile.h $
00026  *
00027  * $History: CJMemFile.h $
00028  *
00029  * *****************  Version 1  *****************
00030  * User: Kirk Stowell Date: 10/24/99   Time: 3:01a
00031  * Created in $/CodeJock/Include
00032  * Initial creation.
00033  *
00034  ***************************************************************************/
00036
00037 #ifndef __CJMEMFILE_H__
00038 #define __CJMEMFILE_H__
00039
00040 #if _MSC_VER > 1000
00041 #pragma once
00042 #endif // _MSC_VER > 1000
00043
00044 class _CJX_EXT_CLASS CCJMemFile : public CMemFile
00045 {
00046 private:
00047     CFileException* m_pError;
00048     CFile m_File;
00049     UINT m_uiOpenFlags;
00050     bool m_bOpen;
00051
00052 public:
00053     CCJMemFile( UINT nGrowBytes = 1024 );
00054     CCJMemFile( BYTE* lpBuffer, UINT nBufferSize, UINT nGrowBytes = 0 );
00055     CCJMemFile(LPCTSTR lpstFilename, UINT uiOpenFlags);
00056     virtual ~CCJMemFile();
00057
00058 protected:
00059     // Load() loads the file into Memory
00060     virtual bool Load();
00061
00062     // Save() saves the file to Disk
00063     virtual bool Save();
00064
00065     // Import() imports the data of a CFile derived object (operator = )
00066     virtual bool Import(CFile *fImp);
00067
00068     // Appends a CFile derived object to the file (operator += )
00069     virtual bool Append(CFile *fApp);
00070
00071 public:
00072     // Flush() saves the memory to disk
00073     virtual void Flush();
00074
00075     // Open(...) opens and loads a physical File into memory
00076     virtual bool Open(CString strFilename, UINT uiOpenFlags, CFileException *pError = NULL);
00077
00078     // Close() saves the contents of the memory to the disk and closes it.
00079     virtual void Close();
00080
00081     // ReadString(...) reads a string
00082     virtual BOOL ReadString(CString& rString);
00083
00084     // WriteString(...) appends a string
00085     virtual void WriteString( LPCTSTR lpsz );
00086
00087     // Duplicate(...) Duplicates the CCJMemFile to a CFile derived class
00088     virtual bool Duplicate(CFile *fDuplicate);
00089     virtual bool Duplicate(CString strDup);
00090
00091     // Discard() discards all changes to file since Open() or last Flush()
00092     virtual bool Discard();
00093
00094     // Insert(...) inserts any File and returns the length of actual copied bytes
00095     virtual DWORD Insert(CFile* fSrc, DWORD dwSourcePos, DWORD dwDestPos, DWORD dwBytes);
00096     virtual DWORD Insert(CString strSrc, DWORD dwSourcePos, DWORD dwDestPos, DWORD dwBytes);
00097
00098     // Extract(...) Extracts bytes to a file and returns the length of actual copied bytes
00099     virtual DWORD Extract(CFile *fDest,DWORD dwStartPos, DWORD dwBytes);
00100     virtual DWORD Extract(CString strDest, DWORD dwStartPos, DWORD dwBytes);
00101
00102     // Find(...) Finds data in the file
00103     LONG FindData(void* pData, DWORD dwDataLen, LONG lStartPos);
00104
00105 // Overloaded Operators
00106 public:
00107     // Importing Operators
00108     void operator =( CFile *fDup);
00109     void operator =( CString strDup);
00110
00111     // Positioning
00112     void operator =( DWORD dwFilePos);
00113
00114     // Appending operators
00115     void operator +=( CFile *fApp);
00116     void operator +=( CString strApp);
00117
00118     // Indexing Operators
00119     BYTE operator [](DWORD dwFilePos);
00120
00121
00122 };
00123
00124 #endif // !defined(__CJMEMFILE_H__)
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

EntnodeFolder Member List

This is the complete list of members for EntnodeFolder, including all inherited members.

Compare(const EntnodeData &node1, const EntnodeData &node2) | EntnodeData | [inline, static]
EntnodeData(const char *name, EntnodePath *path) | EntnodeData | [protected]
EntnodeFolder(const char *name, EntnodePath *path, const char *vn=NULL, const char *ts=NULL, const char *option=NULL, const char *tag=NULL, const char *date=NULL, const char *conflict=NULL) | EntnodeFolder |
GetConflict() const | EntnodeData | [inline, virtual]
GetExtension() const | EntnodeData | [inline, virtual]
GetFolderPath() const | EntnodeData | [inline]
GetFullPathName(UStr &resPath) const | EntnodeData | [inline]
GetName() const | EntnodeData | [inline]
GetState() const | EntnodeData | [inline]
GetType() const | EntnodeFolder | [virtual]
IsIgnored() const | EntnodeData | [inline]
IsLocked() const | EntnodeData | [inline]
IsMissing() const | EntnodeData | [inline]
IsRemoved() const | EntnodeData | [inline]
IsResolved() const | EntnodeData | [inline]
IsUnknown() const | EntnodeData | [inline]
IsUnmodified() const | EntnodeData | [inline]
IsVisited() const | EntnodeData | [inline]
kName enum value | EntnodeData |
kPath enum value | EntnodeData |
kState enum value | EntnodeData |
m_ignored | EntnodeData | [protected]
m_locked | EntnodeData | [protected]
m_missing | EntnodeData | [protected]
m_ref | EntnodeData | [protected]
m_removed | EntnodeData | [protected]
m_resolved | EntnodeData | [protected]
m_unknown | EntnodeData | [protected]
m_unmodified | EntnodeData | [protected]
m_visited | EntnodeData | [protected]
operator[](const int index) const | EntnodeFolder | [virtual]
Ref() | EntnodeData | [inline]
SetIgnored(bool state) | EntnodeData | [inline]
SetLocked(bool state) | EntnodeData | [inline]
SetMissing(bool state) | EntnodeData | [inline]
SetRemoved(bool state) | EntnodeData | [inline]
SetResolved(bool state) | EntnodeData | [inline]
SetState(const char *state) | EntnodeData | [inline]
SetUnknown(bool state) | EntnodeData | [inline]
SetUnmodified(bool state) | EntnodeData | [inline]
SetVisited(bool state) | EntnodeData | [inline]
UnRef() | EntnodeData | [inline]
~EntnodeData() | EntnodeData | [protected, virtual]
~EntnodeFolder() | EntnodeFolder | [protected, virtual]

Generated on Sat Aug 7 22:52:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJBrowseEdit Member List

This is the complete list of members for CCJBrowseEdit, including all inherited members.

CCJBrowseEdit() | CCJBrowseEdit |
InitializeControl() | CCJBrowseEdit | [virtual]
m_btnBrowse | CCJBrowseEdit | [protected]
m_eType | CCJBrowseEdit | [protected]
m_nMenu | CCJBrowseEdit | [protected]
m_nSubMenuIndx | CCJBrowseEdit | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJBrowseEdit | [protected]
OnEnable(BOOL bEnable) | CCJBrowseEdit | [protected]
OnShowWindow(BOOL bShow, UINT nStatus) | CCJBrowseEdit | [protected]
PreSubclassWindow() | CCJBrowseEdit | [protected, virtual]
SetDlgDefExt(LPCTSTR strDefExt) | CCJBrowseEdit | [virtual]
SetDlgFileName(LPCTSTR strFileName) | CCJBrowseEdit | [virtual]
SetDlgFilter(LPCTSTR strFilter) | CCJBrowseEdit | [virtual]
SetDlgOpenFile(BOOL bOpenFileDialog) | CCJBrowseEdit | [virtual]
SetDlgOwner(CWnd *pParentWnd) | CCJBrowseEdit | [virtual]
SetDlgStyle(DWORD dwFlags) | CCJBrowseEdit | [virtual]
SetDlgTitle(LPCTSTR strTitle) | CCJBrowseEdit | [virtual]
SetSearchType(BROWSE_TYPE eType, UINT nMenu=0, int nSubMenuIndx=0) | CCJBrowseEdit | [virtual]
~CCJBrowseEdit() | CCJBrowseEdit | [virtual]

Generated on Sat Aug 7 22:48:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_glue.c Source File

common/dll_glue.c

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * dll_glue.cpp --- glue code for the dll to communicate with the caller
00023  */
00024
00025 #ifdef HAVE_CONFIG_H
00026 #include "config.h"
00027 #endif /* HAVE_CONFIG_H */
00028
00029 #include <unistd.h>
00030 #include <stdio.h>
00031 #include <setjmp.h>
00032 #include <errno.h>
00033
00034 #include "dll_glue.h"
00035 #include "dll_garbage.h"
00036 #include "GUSIMSLSetup.h"
00037
00038 #if !TARGET_API_MAC_CARBON
00039     static UniversalProcPtr __glue_getenv = 0L;
00040     static UniversalProcPtr __glue_consoleout = 0L;
00041     static UniversalProcPtr __glue_consoleerr = 0L;
00042     static UniversalProcPtr __glue_consolein = 0L;
00043     static UniversalProcPtr __glue_eventdispatch = 0L;
00044 #else /* TARGET_API_MAC_CARBON */
00045     static dllglue_getenv_func __glue_getenv = 0L;
00046     static dllglue_consoleout_func __glue_consoleout = 0L;
00047     static dllglue_consoleout_func __glue_consoleerr = 0L;
00048     static dllglue_consolein_func __glue_consolein = 0L;
00049     static dllglue_eventdispath_func __glue_eventdispatch = 0L;
00050 #endif /* TARGET_API_MAC_CARBON */
00051
00052 static int __glue_exit_code = 0;
00053 static jmp_buf _glue_buf;
00054
00055 extern int __no_msl_lf_convert; // GUSIMSLSetup.cpp
00056
00057 extern int main(int argc, char **argv);
00058
00059 void
00060 dllglue_flushconsole(void)
00061 {
00062     fflush(stdout);
00063     fflush(stderr);
00064 }
00065
00066 static void initialize_all(void)
00067 {
00068     GusiMSLSetWriteConsole(dllglue_consoleout);
00069     GusiMSLSetErrConsole(dllglue_consoleerr);
00070     GusiMSLSetInConsole(dllglue_consolein);
00071     GusiMSLSetHandleEvent(dllglue_dispatchevent);
00072
00073     // create text files with the Unix LF (0x0A)
00074     // the default is CR on Classic/Carbon-CFM
00075     if(getenv("CVSUSEUNIXLF") != NULL)
00076     {
00077         __no_msl_lf_convert = 1;
00078     }
00079 }
00080
00081 static void flush_all(void)
00082 {
00083     garbyRemove(true, false);
00084     dllglue_flushconsole();
00085     dllglue_setgetenv(0L);
00086     dllglue_setconsoleout(0L);
00087     dllglue_setconsoleerr(0L);
00088     dllglue_setconsolein(0L);
00089     dllglue_seteventdispatch(0L);
00090 }
00091
00092 void
00093 dllglue_exit(int code)
00094 {
00095     __glue_exit_code = code;
00096     longjmp(_glue_buf, 1);
00097 }
00098
00099 char *
00100 dllglue_getenv(const char * name)
00101 {
00102     if(__glue_getenv != 0L)
00103     {
00104 #if !TARGET_API_MAC_CARBON
00105         return (char *)CallUniversalProc(__glue_getenv, uppGetEnvProcInfo, name);
00106 #else /* TARGET_API_MAC_CARBON */
00107         return __glue_getenv(name);
00108 #endif /* TARGET_API_MAC_CARBON */
00109     }
00110     return 0L;
00111 }
00112
00113 long dllglue_consoleout(char *buffer, long n)
00114 {
00115 #if !TARGET_API_MAC_CARBON
00116     if(__glue_consoleout != 0L)
00117     {
00118         return (int)CallUniversalProc(__glue_consoleout, uppConsoleOutProcInfo, buffer, n);
00119     }
00120 #else
00121     if(__glue_consoleout != 0L)
00122     {
00123         return __glue_consoleout(buffer, n);
00124     }
00125 #endif
00126     return 0;
00127 }
00128
00129 long dllglue_consoleerr(char *buffer, long n)
00130 {
00131 #if !TARGET_API_MAC_CARBON
00132     if(__glue_consoleerr != 0L)
00133     {
00134         return (int)CallUniversalProc(__glue_consoleerr, uppConsoleOutProcInfo, buffer, n);
00135     }
00136 #else
00137     if(__glue_consoleerr != 0L)
00138     {
00139         return __glue_consoleerr(buffer, n);
00140     }
00141 #endif
00142     return 0;
00143 }
00144
00145 long dllglue_consolein(char *buffer, long n)
00146 {
00147 #if !TARGET_API_MAC_CARBON
00148     if(__glue_consolein != 0L)
00149     {
00150         return (int)CallUniversalProc(__glue_consolein, uppConsoleInProcInfo, buffer, n);
00151     }
00152 #else
00153     if(__glue_consolein != 0L)
00154     {
00155         return __glue_consolein(buffer, n);
00156     }
00157 #endif
00158     return 0;
00159 }
00160
00161 int dllglue_dispatchevent(EventRecord *userevent)
00162 {
00163 #if !TARGET_API_MAC_CARBON
00164     if(__glue_eventdispatch != 0L)
00165     {
00166         return (int)CallUniversalProc(__glue_eventdispatch, uppEventDispatchProcInfo, userevent);
00167     }
00168 #else
00169     if(__glue_eventdispatch != 0L)
00170     {
00171         return __glue_eventdispatch(userevent);
00172     }
00173 #endif
00174     return 0;
00175 }
00176
00177 int
00178 dllglue_main(const char *path, int argc, char **argv)
00179 {
00180     if(setjmp(_glue_buf) == 0)
00181     {
00182         initialize_all();
00183
00184         if(path != 0L && chdir(path) != 0)
00185         {
00186             fprintf(stderr, "Error: Unable to chdir %s (error %d)\n", path, errno);
00187             exit(1);
00188         }
00189
00190         main(argc, argv);
00191     }
00192     else
00193     {
00194     }
00195
00196     flush_all();
00197
00198     return __glue_exit_code;
00199 }
00200
00201 int
00202 dllglue_decode_file(char *infile)
00203 {
00204     if(setjmp(_glue_buf) == 0)
00205     {
00206         initialize_all();
00207
00208         __glue_exit_code = decode_file (infile);
00209     }
00210     else
00211     {
00212     }
00213
00214     flush_all();
00215
00216     return __glue_exit_code;
00217 }
00218
00219 int
00220 #if !TARGET_API_MAC_CARBON
00221 dllglue_setgetenv(UniversalProcPtr agetenv)
00222 #else /* TARGET_API_MAC_CARBON */
00223 dllglue_setgetenv(dllglue_getenv_func agetenv)
00224 #endif /* TARGET_API_MAC_CARBON */
00225 {
00226     if(__glue_getenv != 0L)
00227     {
00228 #if !TARGET_API_MAC_CARBON
00229         DisposeRoutineDescriptor(__glue_getenv);
00230 #endif /* !TARGET_API_MAC_CARBON */
00231         __glue_getenv = 0L;
00232     }
00233     __glue_getenv = agetenv;
00234     return 0;
00235 }
00236
00237 #if !TARGET_API_MAC_CARBON
00238 int
00239 dllglue_seteventdispatch(UniversalProcPtr aeventdispatch)
00240 #else
00241 int
00242 dllglue_seteventdispatch(dllglue_eventdispath_func aeventdispatch)
00243 #endif
00244 {
00245 #if !TARGET_API_MAC_CARBON
00246     if(__glue_eventdispatch != 0L)
00247     {
00248         DisposeRoutineDescriptor(__glue_eventdispatch);
00249         __glue_eventdispatch = 0L;
00250     }
00251 #endif
00252     __glue_eventdispatch = aeventdispatch;
00253     return 0;
00254 }
00255
00256 int
00257 #if !TARGET_API_MAC_CARBON
00258 dllglue_setconsoleout(UniversalProcPtr aconsoleout)
00259 #else /* TARGET_API_MAC_CARBON */
00260 dllglue_setconsoleout(dllglue_consoleout_func aconsoleout)
00261 #endif /* TARGET_API_MAC_CARBON */
00262 {
00263     if(__glue_consoleout != 0L)
00264     {
00265 #if !TARGET_API_MAC_CARBON
00266         DisposeRoutineDescriptor(__glue_consoleout);
00267 #endif /* !TARGET_API_MAC_CARBON */
00268         __glue_consoleout = 0L;
00269     }
00270     __glue_consoleout = aconsoleout;
00271     return 0;
00272 }
00273
00274 int
00275 #if !TARGET_API_MAC_CARBON
00276 dllglue_setconsoleerr(UniversalProcPtr aconsoleerr)
00277 #else /* TARGET_API_MAC_CARBON */
00278 dllglue_setconsoleerr(dllglue_consoleout_func aconsoleerr)
00279 #endif /* TARGET_API_MAC_CARBON */
00280 {
00281     if(__glue_consoleerr != 0L)
00282     {
00283 #if !TARGET_API_MAC_CARBON
00284         DisposeRoutineDescriptor(__glue_consoleerr);
00285 #endif /* !TARGET_API_MAC_CARBON */
00286         __glue_consoleerr = 0L;
00287     }
00288     __glue_consoleerr = aconsoleerr;
00289     return 0;
00290 }
00291
00292 int
00293 #if !TARGET_API_MAC_CARBON
00294 dllglue_setconsolein(UniversalProcPtr aconsolein)
00295 #else /* TARGET_API_MAC_CARBON */
00296 dllglue_setconsolein(dllglue_consolein_func aconsolein)
00297 #endif /* TARGET_API_MAC_CARBON */
00298 {
00299     if(__glue_consolein != 0L)
00300     {
00301 #if !TARGET_API_MAC_CARBON
00302         DisposeRoutineDescriptor(__glue_consolein);
00303 #endif /* !TARGET_API_MAC_CARBON */
00304         __glue_consolein = 0L;
00305     }
00306     __glue_consolein = aconsolein;
00307     return 0;
00308 }
00309
00310 //
00311 // Runtime intialization
00312 //
00313
00314 // from Metrowerks runtime
00315 extern pascal OSErr __initialize(CFragConnectionID connID);
00316 extern pascal void __terminate(void);
00317
00318 // for cvs
00319 pascal OSErr __cvs_initialize(const CFragInitBlock * theInitBlock);
00320 pascal void __cvs_terminate(void);
00321
00322 FSSpec sCvsContainerFileSpec;
00323
00324 pascal OSErr __cvs_initialize(const CFragInitBlock * theInitBlock)
00325 {
00326     OSErr result = noErr;
00327
00328     if(CFragHasFileLocation(theInitBlock->fragLocator.where) &&
00329         theInitBlock->fragLocator.u.onDisk.fileSpec != 0L)
00330     {
00331         sCvsContainerFileSpec = *theInitBlock->fragLocator.u.onDisk.fileSpec;
00332     }
00333     garbyNew();
00334
00335     result = __initialize(theInitBlock->connectionID);
00336
00337     return result;
00338 }
00339
00340 pascal void __cvs_terminate(void)
00341 {
00342     __terminate();
00343
00344     garbyRemove(false, false);
00345 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoFileRemoveHandler Member List

This is the complete list of members for KoFileRemoveHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoFileRemoveHandler() | KoFileRemoveHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoFileRemoveHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoFileRemoveHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CToolBarData Member List

This is the complete list of members for CToolBarData, including all inherited members.

items() | CToolBarData | [inline]
wHeight | CToolBarData |
wItemCount | CToolBarData |
wVersion | CToolBarData |
wWidth | CToolBarData |

Generated on Sat Aug 7 22:57:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CLogFilters Member List

This is the complete list of members for CLogFilters, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CLogFilters(const MultiFiles *mf, const char *sLastDate, const char *sLastRev, const char *sLastUsers, const char *sLastStates) | CLogFilters |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CLogFilters | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CLogFilters |
InitHelpID() | CLogFilters | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_browseTagButton | CLogFilters |
m_date | CLogFilters |
m_dateCombo | CLogFilters |
m_hasDate | CLogFilters |
m_hasDateCheck | CLogFilters |
m_hasRev | CLogFilters |
m_hasRevCheck | CLogFilters |
m_hasState | CLogFilters |
m_hasStateCheck | CLogFilters |
m_hasUser | CLogFilters |
m_hasUserCheck | CLogFilters |
m_mf | CLogFilters | [private]
m_rev | CLogFilters |
m_revCombo | CLogFilters |
m_state | CLogFilters |
m_stateCombo | CLogFilters |
m_user | CLogFilters |
m_userCombo | CLogFilters |
OnBrowseTag() | CLogFilters | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnDate() | CLogFilters | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
OnRev() | CLogFilters | [protected]
OnState() | CLogFilters | [protected]
OnUser() | CLogFilters | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CLogFilters() | CLogFilters |

Generated on Sat Aug 7 22:54:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MultiFiles.h Source File

common/MultiFiles.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * MultiFiles.h --- class to store multiple files by directory
00023  */
00024
00025 #ifndef MULTIFILES_H
00026 #define MULTIFILES_H
00027
00028 #include "TextBinary.h"
00029
00030 #include "CPStr.h"
00031 #include <vector>
00032
00033 #ifdef _MSC_VER
00034     using namespace std;
00035 #endif
00036
00037 class CvsArgs;
00038
00040 class FileEntry
00041 {
00042 public:
00043     FileEntry();
00044     FileEntry(const char* filename, const UFSSpec* macspec = 0L, const char* currRevision = 0L);
00045     FileEntry(const FileEntry& entry);
00046
00047     FileEntry& operator=(const FileEntry& entry);
00048
00049 protected:
00050     CStr file;
00051     CStr currRev;
00052     UFSSpec spec;
00053
00054 friend class MultiFilesEntry;
00055 friend class MultiFiles;
00056 };
00057
00059 class MultiFilesEntry
00060 {
00061 public:
00062     MultiFilesEntry();
00063     MultiFilesEntry(const char* path);
00064     MultiFilesEntry(const MultiFilesEntry& entries);
00065
00066     MultiFilesEntry& operator=(const MultiFilesEntry& entries);
00067
00068     void setdir(const char* newdir);
00069     void add(const char* file, const UFSSpec* spec = 0L, const char* currRevision = 0L);
00070
00071     bool get(int index, CStr& path, CStr& fileName, CStr& currRev) const;
00072
00074     int NumFiles(void) const { return files.size(); }
00075
00077     const char* getdir() const { return dir; }
00078
00080     const char* add(CvsArgs& args) const;
00081
00082 protected:
00083     CStr dir;
00084     std::vector<FileEntry> files;
00085
00086 friend class MultiFiles;
00087 };
00088
00090 class MultiFiles
00091 {
00092 public:
00093     MultiFiles();
00094
00095     void newdir(const char* dir);
00096     void newfile(const char* file, const UFSSpec* spec = 0L, const char* currRevision = 0L);
00097
00098     typedef std::vector<MultiFilesEntry>::const_iterator const_iterator;
00099
00100     const_iterator begin() const { return dirs.begin(); }
00101     const_iterator end() const { return dirs.end(); }
00102
00103     bool getdir(int index, CStr& path) const;
00104
00105     int NumDirs(void) const { return dirs.size(); }
00106     int TotalNumFiles(void) const;
00107
00108     void reset();
00109
00110     bool Normalize();
00111
00112 protected:
00113     std::vector<MultiFilesEntry> dirs;
00114 };
00115
00117 class MultiFilesEntryIndex
00118 {
00119 public:
00120     MultiFilesEntryIndex(int index, MultiFiles::const_iterator mfi)
00121         : m_index(index), m_mfi(mfi)
00122     {
00123     }
00124
00125     int GetIndex() const { return m_index; }
00126     MultiFiles::const_iterator GetIterator() const { return m_mfi; }
00127
00128 private:
00129     int m_index;
00130     MultiFiles::const_iterator m_mfi;
00131 };
00132
00133 #endif /* MULTIFILES_H */
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TOOLBARINFO Member List

This is the complete list of members for TOOLBARINFO, including all inherited members.

btnText | TOOLBARINFO
tbButton | TOOLBARINFO

Generated on Sat Aug 7 22:57:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphView.h Source File

WinCvs/GraphView.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 #if !defined(AFX_GRAPHVIEW_H__7A07C311_03F9_11D2_BCB2_000000000000__INCLUDED_)
00018 #define AFX_GRAPHVIEW_H__7A07C311_03F9_11D2_BCB2_000000000000__INCLUDED_
00019
00020 #if _MSC_VER >= 1000
00021 #pragma once
00022 #endif // _MSC_VER >= 1000
00023 // GraphView.h : header file
00024 //
00025
00026 #include "CvsLog.h"
00027 #include "AppGlue.h"
00028
00029 #define STARTPOINT_PT       (CPoint(5, 5))
00030 #define SHADOW_OFFSET_PT    (CPoint(4, 4))
00031 #define ROUND_RECT_PT       (CPoint(6, 6))
00032
00033 #define OCTANGLE_COUNT      8
00034
00035 #define RGB_DEF_SEL             RGB(160, 160, 160)
00036 #define RGB_DEF_SHADOW          RGB(128, 128, 128)
00037 #define RGB_DEF_HEADER          RGB(255, 0, 0)
00038 #define RGB_DEF_TAG             RGB(0, 0, 0)
00039 #define RGB_DEF_BRANCH          RGB(0, 0, 255)
00040 #define RGB_DEF_NODE            RGB(0, 0, 255)
00041 #define RGB_DEF_DEADNODE        RGB(255, 0, 0)
00042 #define RGB_DEF_USERSTATENODE   RGB(0, 128, 64)
00043 #define RGB_DEF_MERGE           RGB(255, 0, 0)
00044 #define STYLE_DEADNODE          PS_DOT
00045 #define STYLE_USERSTATENODE     PS_DASH
00046
00048 typedef enum
00049 {
00050     kRectangle,
00051     kRoundRect,
00052     kOctangle
00053 } kNodeShape;
00054
00056 typedef enum
00057 {
00058     kTContinue,
00059     kTGetDown,
00060     kTStop
00061 } kTGraph;
00062
00063 // Forward declarations
00064 class EntnodeData;
00065 class CGraphView;
00066
00068 class CWinLogData : public CLogNodeData
00069 {
00070 public:
00071     // Construction
00072     CWinLogData(CLogNode* node);
00073     virtual ~CWinLogData();
00074
00075 private:
00076     // Data members
00077     CRect selfB;
00078     CRect totB;
00079     bool sel;
00081 protected:
00082     // Methods
00083     inline CWinLogData* GetData(CLogNode* node);
00084
00085     void CollectMergePointPairPass1(vector<pair<CWinLogData*, CWinLogData*> >& mergePair);
00086     void CollectMergePointPairPass2(vector<pair<CWinLogData*, CWinLogData*> >& mergePair);
00087
00088     virtual void UpdateSelf(CDC& dc, EntnodeData* entryInfo) = 0;
00089     virtual CSize GetBoundsSelf(CDC& dc, EntnodeData* entryInfo) = 0;
00090
00091     virtual void CollectMergePointPairPass1Self(vector<pair<CWinLogData*, CWinLogData*> >& mergePair);
00092     virtual void CollectMergePointPairPass2Self(vector<pair<CWinLogData*, CWinLogData*> >& mergePair);
00093
00094 public:
00095     // Interface
00096     inline kLogNode GetType(void) const;
00097     const char* GetStr(void);
00098
00099     inline CRect& Bounds(void);
00100     inline CRect& SelfBounds(void);
00101
00102     void ComputeBounds(const CPoint& topLeft, CDC& dc, EntnodeData* entryInfo = 0L);
00103     void Offset(CPoint offset);
00104     void Update(CDC& dc, EntnodeData* entryInfo = 0L);
00105
00106     inline bool Selected(void) const;
00107     void SetSelected(CScrollView* view, bool state);
00108     void UnselectAll(CScrollView* view);
00109     CWinLogData* HitTest(CPoint point);
00110
00111     static CWinLogData* CreateNewData(CLogNode* node);
00112
00113     bool IsDiskNode(EntnodeData* entryInfo);
00114     bool IsDeadNode();
00115     bool IsUserState();
00116
00117     void UpdateMergePoints(CDC& dc);
00118 };
00119
00121 class CWinLogHeaderData : public CWinLogData
00122 {
00123 public:
00124     // Construction
00125     CWinLogHeaderData(CLogNode* node) : CWinLogData(node) {}
00126     virtual ~CWinLogHeaderData() {}
00127
00128 protected:
00129     // Methods
00130     virtual void UpdateSelf(CDC& dc, EntnodeData* entryInfo);
00131     virtual CSize GetBoundsSelf(CDC& dc, EntnodeData* entryInfo);
00132 };
00133
00135 class CWinLogRevData : public CWinLogData
00136 {
00137 public:
00138     // Construction
00139     CWinLogRevData(CLogNode* node) : CWinLogData(node) {}
00140     virtual ~CWinLogRevData() {}
00141
00142 protected:
00143     // Methods
00144     virtual void UpdateSelf(CDC& dc, EntnodeData* entryInfo);
00145     virtual CSize GetBoundsSelf(CDC& dc, EntnodeData* entryInfo);
00146
00147     virtual void CollectMergePointPairPass1Self(vector<pair<CWinLogData*, CWinLogData*> >& mergePair);
00148     virtual void CollectMergePointPairPass2Self(vector<pair<CWinLogData*, CWinLogData*> >& mergePair);
00149 };
00150
00152 class CWinLogTagData : public CWinLogData
00153 {
00154 public:
00155     // Construction
00156     CWinLogTagData(CLogNode* node) : CWinLogData(node) {}
00157     virtual ~CWinLogTagData() {}
00158
00159 protected:
00160     // Methods
00161     virtual void UpdateSelf(CDC& dc, EntnodeData* entryInfo);
00162     virtual CSize GetBoundsSelf(CDC& dc, EntnodeData* entryInfo);
00163 };
00164
00166 class CWinLogBranchData : public CWinLogData
00167 {
00168 public:
00169     // Construction
00170     CWinLogBranchData(CLogNode* node) : CWinLogData(node) {}
00171     virtual ~CWinLogBranchData() {}
00172
00173 protected:
00174     // Methods
00175     virtual void UpdateSelf(CDC& dc, EntnodeData* entryInfo);
00176     virtual CSize GetBoundsSelf(CDC& dc, EntnodeData* entryInfo);
00177 };
00178
00180 class TGraph
00181 {
00182 public:
00183     // Interface
00184     kTGraph TraverseGraph(CLogNode* node);
00185     virtual kTGraph TraverseNode(CLogNode* node) = 0;
00186 };
00187
00189 class TGraphRectSelect : public TGraph
00190 {
00191 public:
00192     // Construction
00193     TGraphRectSelect(bool shiftOn, CGraphView* view, CRect& rect);
00194
00195 protected:
00196     // Data members
00197     bool m_shiftOn;
00198     CGraphView* m_view;
00199     CRect& m_rect;
00201 public:
00202     // Interface
00203     virtual kTGraph TraverseNode(CLogNode* node);
00204 };
00205
00207 class TGraphCmdStatus : public TGraph
00208 {
00209 public:
00211     TGraphCmdStatus();
00212
00213 private:
00214     // Data members
00215     CWinLogData* m_fSel1;
00216     CWinLogData* m_fSel2;
00217     int m_selCount;
00219 public:
00220     // Interface
00221     virtual kTGraph TraverseNode(CLogNode* node);
00222
00223     int GetSelCount() const;
00224     CWinLogData* GetSel1() const;
00225     CWinLogData* GetSel2() const;
00226 };
00227
00229 class CGraphConsole : public CCvsConsole
00230 {
00231 public:
00232     // Construction
00233     CGraphConsole();
00234
00235 private:
00236     // Data members
00237     CWincvsView* m_view;
00239 public:
00240     // Interface
00241     virtual long cvs_out(const char* txt, long len);
00242     virtual long cvs_err(const char* txt, long len);
00243 };
00244
00246 class TGraphDelCmd : public TGraph
00247 {
00248 public:
00249     // Construction
00250     TGraphDelCmd();
00251
00252 private:
00253     // Data members
00254     int m_countSel;
00255     bool m_onlyRev;
00256     std::vector<CStr> m_allRevs;
00257
00258 public:
00259     // Interface
00260     virtual kTGraph TraverseNode(CLogNode* node);
00261
00262     int GetCountSel() const;
00263     bool GetOnlyRev() const;
00264     std::vector<CStr>& GetAllRevs();
00265 };
00266
00268 class TGraphSelNonSig : public TGraph
00269 {
00270 public:
00271     // Construction
00272     TGraphSelNonSig(CGraphView* view);
00273
00274 private:
00275     // Data members
00276     CGraphView* m_view;
00278 public:
00279     // Interface
00280     virtual kTGraph TraverseNode(CLogNode* node);
00281 };
00282
00284 class CRevisionConsole : public CCvsStreamConsole
00285 {
00286 public:
00287     // Construction
00288     CRevisionConsole();
00289
00290 public:
00291     // Interface
00292     bool Init(LPCTSTR path, LPCTSTR fname);
00293 };
00294
00296 class CGraphRectTracker : public CRectTracker
00297 {
00298 public:
00299     CGraphRectTracker(CGraphView* view) : m_view(view) {}
00300
00301     virtual void OnChangedRect(const CRect& rectOld);
00302 protected:
00303     CGraphView* m_view;
00304 };
00305
00307 // CGraphView view
00308
00310 class CGraphView : public CScrollView
00311 {
00312     DECLARE_DYNCREATE(CGraphView)
00313 protected:
00314     CGraphView();           // protected constructor used by dynamic creation
00315     virtual ~CGraphView();
00316
00317 // Attributes
00318 public:
00319
00320     // Operations
00321 public:
00322
00323 // Overrides
00324     // ClassWizard generated virtual function overrides
00325     //{{AFX_VIRTUAL(CGraphView)
00326     public:
00327     virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE);
00328     protected:
00329     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00330     virtual void OnInitialUpdate();     // first time after construct
00331     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00332     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00333     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00334     virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00335     //}}AFX_VIRTUAL
00336
00337 // Implementation
00338 protected:
00339
00340 #ifdef _DEBUG
00341     virtual void AssertValid() const;
00342     virtual void Dump(CDumpContext& dc) const;
00343 #endif
00344
00345     // Generated message map functions
00346     //{{AFX_MSG(CGraphView)
00347     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00348     afx_msg void OnViewReload();
00349     afx_msg void OnUpdateViewReload(CCmdUI* pCmdUI);
00350     afx_msg void OnViewDiff();
00351     afx_msg void OnUpdateViewDiff(CCmdUI* pCmdUI);
00352     afx_msg void OnViewUpdate();
00353     afx_msg void OnUpdateViewUpdate(CCmdUI* pCmdUI);
00354     afx_msg void OnViewTag();
00355     afx_msg void OnUpdateViewTag(CCmdUI* pCmdUI);
00356     afx_msg void OnViewDelrev();
00357     afx_msg void OnUpdateViewDelrev(CCmdUI* pCmdUI);
00358     afx_msg void OnViewSelnonsig();
00359     afx_msg void OnUpdateViewSelnonsig(CCmdUI* pCmdUI);
00360     afx_msg void OnViewRetrieve();
00361     afx_msg void OnUpdateViewRetrieve(CCmdUI* pCmdUI);
00362     afx_msg void DisableUpdate(CCmdUI* pCmdUI);
00363     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00364     afx_msg void OnAnnotate();
00365     afx_msg void OnGraphGraphoptions();
00366     afx_msg void OnUpdateGraphChangelogmessage(CCmdUI* pCmdUI);
00367     afx_msg void OnGraphChangelogmessage();
00368     afx_msg void OnUpdateGraphSetdescription(CCmdUI* pCmdUI);
00369     afx_msg void OnGraphSetdescription();
00370     afx_msg void OnGraphSetstate();
00371     afx_msg void OnUpdateGraphSetstate(CCmdUI* pCmdUI);
00372     afx_msg void OnViewUnlockf();
00373     afx_msg void OnUpdateViewUnlockf(CCmdUI* pCmdUI);
00374     afx_msg void OnViewEditsel();
00375     afx_msg void OnViewEditseldef();
00376     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00377     afx_msg void OnViewRetrieveAs();
00378     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00379     afx_msg void OnViewOpensel();
00380     afx_msg void OnViewOpenselas();
00381     afx_msg void OnQueryShellactionDefault();
00382     //}}AFX_MSG
00383     DECLARE_MESSAGE_MAP()
00384 private:
00385     // Data members
00386     static CImageList m_imageList;
00388         // For printing
00389     int m_numberOfPages;
00390     int m_pageHeight;
00392     // Methods
00393     bool DisableCommon();
00394     bool IsSelSingleNode(kLogNode type, bool equal = true);
00395
00396     void FileAction();
00397     void SaveSel(bool queryName = false);
00398
00399     bool RetrieveSel(UStr& file);
00400
00401     void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00402
00403 public:
00404     // Interface
00405     void CalcImageSize(void);
00406
00408     static inline CImageList& GetImgList(void) { return m_imageList; }
00409 };
00410
00412
00413 //{{AFX_INSERT_LOCATION}}
00414 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00415
00416 #endif // !defined(AFX_GRAPHVIEW_H__7A07C311_03F9_11D2_BCB2_000000000000__INCLUDED_)
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoTraversalContext Member List

This is the complete list of members for KoTraversalContext, including all inherited members.

IsMatch(EntnodeData *data) const | KoTraversalContext | [inline]
IsRecursive() const | KoTraversalContext | [inline]
IsShowIgnored() const | KoTraversalContext | [inline]
KoTraversalContext(UCvsFiles *view) | KoTraversalContext | [inline]
m_filter | KoTraversalContext | [private]
m_isRecursive | KoTraversalContext | [private]
m_isShowIgnored | KoTraversalContext | [private]
m_view | KoTraversalContext |

Generated on Sat Aug 7 22:54:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ItemListDlg.h Source File

common/ItemListDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> (Originally: Sebastien Abras <sabdev@ibelgique.com>) --- July 2002
00019  */
00020
00021 #if !defined(AFX_ITEMLISTDLG_H__E6D16D27_1A84_4E8A_A926_3B76728E0F73__INCLUDED_)
00022 #define AFX_ITEMLISTDLG_H__E6D16D27_1A84_4E8A_A926_3B76728E0F73__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // ItemListDlg.h : header file
00028 //
00029
00030 #include "MultiFiles.h"
00031 #include "AppGlue.h"
00032 #include "SmartComboBox.h"
00033
00034 #ifdef WIN32
00035 #   include "SortHeaderCtrl.h"
00036 #   include "HHelpSupport.h"
00037 #endif
00038
00039 #include <string>
00040 #include <sstream>
00041 #include <set>
00042 #include <list>
00043 #include <map>
00044 #include <algorithm>
00045
00046 using namespace std;
00047
00048 bool CompatGetTagListItem(const MultiFiles* mf, CStr& tagName);
00049 bool CompatGetModuleListItem(const MultiFiles* mf, CStr& moduleName);
00050
00051 // persistent default values for the dates, tags...
00052 extern CMString gRevNames;
00053 extern CMString gDateNames;
00054
00056 typedef enum
00057 {
00058     kItemListTag,
00059     kItemListModule
00060 } kItemListDlg;
00061
00063 typedef enum
00064 {
00065     kAutoRefreshDisable,
00066     kAutoRefreshFirstTime,
00067     kAutoRefreshAlways
00068 } kItemListAutoRefreshType;
00069
00071 typedef std::set<string> ItemDescription;
00072
00074 typedef struct
00075 {
00076     ItemDescription m_description;
00077     ItemDescription m_descriptionEx;
00078 } ItemRowInfo;
00079
00081 typedef std::map<string, ItemRowInfo> ItemList;
00082
00084 typedef std::list<string> ListPath;
00085
00086
00088 class CItemListConsole : public CCvsConsole
00089 {
00090 public:
00091     // Construction
00092     CItemListConsole();
00093     virtual ~CItemListConsole();
00094
00095 protected:
00096     // Data members
00097     ItemList m_itemList;
00098     stringstream m_cvsOut;
00099     stringstream m_cvsErr;
00100     int m_launchRes;
00102 public:
00103     // Interface
00104     virtual long cvs_out(const char* txt, long len);
00105     virtual long cvs_err(const char* txt, long len);
00106     virtual void Parse(int launchRes) = 0L;
00107
00108     int GetLaunchRes() const;
00109     stringstream& GetCvsErr();
00110     const ItemList& GetItemList() const;
00111 };
00112
00114 class CTagParserConsole : public CItemListConsole
00115 {
00116 public:
00117     // Construction
00118     CTagParserConsole();
00119     virtual ~CTagParserConsole();
00120
00121 public:
00122     // Interface
00123     virtual void Parse(int launchRes);
00124 };
00125
00127 class CModuleParserConsole : public CItemListConsole
00128 {
00129 public:
00130     // Construction
00131     CModuleParserConsole();
00132     virtual ~CModuleParserConsole();
00133
00134 private:
00135     // Methods
00136     void Normalize();
00137     bool NeedsNormalize() const;
00138
00139 public:
00140     // Interface
00141     virtual void Parse(int launchRes);
00142 };
00143
00145 class CListParserConsole : public CItemListConsole
00146 {
00147 public:
00148     // Construction
00149     CListParserConsole();
00150     virtual ~CListParserConsole();
00151
00152 public:
00153     // Interface
00154     virtual void Parse(int launchRes);
00155 };
00156
00157
00158
00160 typedef enum
00161 {
00162     kItemDisplayWait,
00163     kItemDisplayData,
00164     kItemDisplayInfo
00165 } kItemDisplayType;
00166
00168 class ItemDisplayInfo
00169 {
00170 private:
00171     // Data members
00172     string m_item;
00173     string m_description;
00174     string m_descriptionEx;
00176     ItemRowInfo m_rowInfo;
00178 public:
00179     // Interface
00180     void Create(const string& item, const ItemRowInfo& rowInfo);
00181
00182     const string& GetItem() const;
00183     const string& GetDescription() const;
00184     const string& GetDescriptionEx() const;
00185
00186     const ItemRowInfo& GetRowInfo() const;
00187 };
00188
00189 #ifdef WIN32
00190
00192 // CItemListDlg dialog
00193
00194 class CItemListDlg : public CHHelpDialog
00195 {
00196 // Construction
00197 public:
00198     CItemListDlg(const MultiFiles* mf,
00199         const char* item, kItemListDlg type, ItemList& itemList, const ListPath* listPath,
00200         bool forceRoot, const char* cvsroot,
00201         const char* rev, const char* date,
00202         CWnd* pParent = NULL);   // standard constructor
00203
00204 // Dialog Data
00205     //{{AFX_DATA(CItemListDlg)
00206     enum { IDD = IDD_ITEM_LIST };
00207     CButton m_selCvsrootButton;
00208     CSmartComboBox  m_cvsrootCombo;
00209     CButton m_forceRootCheck;
00210     CSmartComboBox  m_autoRefreshCombo;
00211     CButton m_selectionButton;
00212     CButton m_cancelButton;
00213     CButton m_browseTagButton;
00214     CEdit   m_itemEdit;
00215     CButton m_refreshButton;
00216     CButton m_okButton;
00217     CButton m_browseReadFromButton;
00218     CStatic m_itemLabelStatic;
00219     CButton m_hasDateCheck;
00220     CButton m_hasRevCheck;
00221     CSmartComboBox  m_dateCombo;
00222     CSmartComboBox  m_revCombo;
00223     CButton m_optionCheck;
00224     CListCtrl   m_itemListCtrl;
00225     CSmartComboBox  m_readFromCombo;
00226     CString m_readFrom;
00227     CString m_item;
00228     BOOL    m_option;
00229     BOOL    m_hasRev;
00230     CString m_rev;
00231     CString m_date;
00232     BOOL    m_hasDate;
00233     BOOL    m_forceRoot;
00234     CString m_cvsroot;
00235     //}}AFX_DATA
00236
00237
00238 // Overrides
00239     // ClassWizard generated virtual function overrides
00240     //{{AFX_VIRTUAL(CItemListDlg)
00241     public:
00242     virtual BOOL PreTranslateMessage(MSG* pMsg);
00243     protected:
00244     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00245     //}}AFX_VIRTUAL
00246
00247 // Implementation
00248 protected:
00249
00250     // Generated message map functions
00251     //{{AFX_MSG(CItemListDlg)
00252     afx_msg void OnRefresh();
00253     virtual BOOL OnInitDialog();
00254     virtual void OnCancel();
00255     afx_msg void OnOption();
00256     afx_msg void OnCheckrev();
00257     afx_msg void OnCheckdate();
00258     afx_msg void OnBrowseTag();
00259     virtual void OnOK();
00260     afx_msg void OnDblclkItemlist(NMHDR* pNMHDR, LRESULT* pResult);
00261     afx_msg void OnItemchangedItemlist(NMHDR* pNMHDR, LRESULT* pResult);
00262     afx_msg void OnColumnclickItemlist(NMHDR* pNMHDR, LRESULT* pResult);
00263     afx_msg void OnDestroy();
00264     afx_msg void OnForceroot();
00265     afx_msg void OnBrowseReadfrom();
00266     afx_msg void OnSelection();
00267     afx_msg void OnSelchangeAutoRefresh();
00268     afx_msg void OnSelcvsroot();
00269     afx_msg void OnHelp();
00270     //}}AFX_MSG
00271     DECLARE_MESSAGE_MAP()
00272 public:
00273     ListPath m_listPath;
00275 private:
00276     // Data members
00277     const MultiFiles* m_mf;
00279     kItemListDlg m_type;
00280     ItemList& m_itemList;
00281     bool m_cvsStopped;
00283     // Methods
00284     virtual void InitHelpID();
00285
00286     void InitListCtrl(const kItemDisplayType displayType);
00287     void InitOptionCtrls();
00288     void EnableControls(BOOL enable);
00289     bool EnableDateRev();
00290
00291     bool CheckSettings();
00292     BOOL PostClickRefresh();
00293
00294     // Items management
00295
00297     enum
00298     {
00299         kItemImgBlank,
00300         kItemImgUpDir,
00301         kItemImgDir,
00302         kItemImgFile,
00303         kItemImgModule,
00304         kItemImgRevision,
00305         kItemImgBranch,
00306         kItemImgBranchAndRevision,
00307     };
00308
00309     CImageList m_itemsImageList;
00310
00311     bool SelectItem(const char* item);
00312     void DisplayItems(const ItemList& itemList, const int launchRes, stringstream* cvsErr = NULL, const bool showUpDir = true);
00313     int GetImageForItem(kItemListDlg type, bool option, const ItemDisplayInfo* displayInfo);
00314     void DeleteAllItems();
00315
00316     // Sorting
00317
00319     typedef struct
00320     {
00321         int m_column;
00322         bool m_asc;
00323         kItemListDlg m_type;
00324         bool m_option;
00325     } CompareInfo;
00326
00327     bool m_sortAsc;
00328     int m_sortColumn;
00329     CSortHeaderCtrl m_headerCtrl;
00330
00331     void SortItems(int column, bool asc, kItemListDlg type, bool option);
00332     static int CALLBACK CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam);
00333 };
00334
00335 //{{AFX_INSERT_LOCATION}}
00336 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00337
00338 #endif // !defined(AFX_ITEMLISTDLG_H__E6D16D27_1A84_4E8A_A926_3B76728E0F73__INCLUDED_)
00339
00340 #ifdef qMacCvsPP
00341 #include <LOutlineTable.h>
00342 #include <LCommander.h>
00343 #include <LOutlineItem.h>
00344 #include <LString.h>
00345
00346 class LSelectTable : public LOutlineTable, public LCommander, public LBroadcaster
00347 {
00348 public:
00349     enum { class_ID = 'Sfil' };
00350
00351     LSelectTable( LStream *inStream );
00352     virtual ~LSelectTable();
00353
00354     Handle mIconModule;
00355     Handle mIconTag;
00356     Handle mIconBranch;
00357 protected:
00358     virtual void FinishCreateSelf();
00359 };
00360
00361 class CSelectItem : public LOutlineItem
00362 {
00363 public:
00364     CSelectItem(const string& item, const ItemRowInfo& rowInfo);
00365     CSelectItem();
00366     virtual ~CSelectItem();
00367
00368     string m_item;
00369     string m_description;
00370     string m_descriptionEx;
00371     Handle mIcon;
00372
00373 protected:
00374     virtual void GetDrawContentsSelf(const STableCell& inCell, SOutlineDrawContents& ioDrawContents);
00375
00376     virtual void DrawRowAdornments(const Rect& inLocalRowRect);
00377
00378     virtual void DoubleClick(const STableCell& inCell, const SMouseDownEvent& inMouseDown,
00379         const SOutlineDrawContents& inDrawContents, Boolean inHitText);
00380
00381
00382     ItemRowInfo m_rowInfo;
00383 };
00384 #endif /* qMacCvsPP */
00385
00386 #endif /* WIN32 */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CAboutDlg Member List

This is the complete list of members for CAboutDlg, including all inherited members.

CAboutDlg() | CAboutDlg |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CAboutDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CAboutDlg |
InitHelpID() | CAboutDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_CvsGuiSfUrl | CAboutDlg |
m_vers | CAboutDlg |
m_WinCvsUrl | CAboutDlg |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CAboutDlg | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:48:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/WinCvsDebug.h Source File

WinCvs/WinCvsDebug.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jonathan M. Gilligan <jonathan.gilligan@vanderbilt.edu> --- July 2001
00019  */
00020
00021 /*
00022  * WinCvsDebug.h --- Miscellaneous debugging stuff.
00023  */
00024
00025 #pragma once
00026
00027 #if !defined(WINCVSDEBUG_H_INCLUDED)
00028 #define WINCVSDEBUG_H_INCLUDED
00029
00030 #if !defined(ENABLE_WINCVSDEBUG)
00031
00033 #   define ENABLE_WINCVSDEBUG 0
00034
00035 #endif
00036
00037 #if ENABLE_WINCVSDEBUG
00038
00039 enum wcvs_debug_mask_bits
00040 {
00041     wcvsdbg_one_shot_bit = 0,
00042     wcvsdbg_verbose_bit,
00043     wcvsdbg_trace_dst_checks_bit,
00044     wcvsdbg_trace_modified_checks_bit,
00045     wcvsdbg_trace_stat_bit
00046 };
00047
00048 enum wcvs_debug_mask_flags
00049 {
00050     wcvsdbg_one_shot = 1L << wcvsdbg_one_shot_bit,
00051     wcvsdbg_verbose = 1L << wcvsdbg_verbose_bit,
00052     wcvsdbg_trace_dst_checks = 1L << wcvsdbg_trace_dst_checks_bit,
00053     wcvsdbg_trace_modified_checks = 1L << wcvsdbg_trace_modified_checks_bit,
00054     wcvsdbg_trace_stat = 1L << wcvsdbg_trace_stat_bit
00055 };
00056
00057 unsigned long GetWinCvsDebugMask(bool clear_mask = true);
00058 bool GetWinCvsDebugMaskBit(unsigned char bit, bool clear_mask = true);
00059
00060 void SetWinCvsDebugMask(unsigned long umask);
00061 void AppendWinCvsDebugMask(unsigned long umask);
00062 void SetWinCvsDebugMaskBit(unsigned char bit, bool val);
00063
00064 #endif  // ENABLE_WINCVSDEBUG
00065
00066 #endif  // !defined(WINCVSDEBUG_H_INCLUDED)
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJOutlookBar.h Source File

WinCvs/CJLib/Include/CJOutlookBar.h

Go to the documentation of this file.
00001 // CJOutlookBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJOutlookBar.h $
00011  *
00012  * $History: CJOutlookBar.h $
00013  *
00014  * *****************  Version 11  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 2:19p
00016  * Updated in $/CodeJock/Include
00017  * Added COLORREF members to class to eliminate continuous calls to
00018  * GetSysColor(...). Overrode OnSysColorChange() to re-initialize COLORREF
00019  * variables.
00020  *
00021  * *****************  Version 10  *****************
00022  * User: Kirk Stowell Date: 10/26/99   Time: 10:45p
00023  * Updated in $/CodeJock/Include
00024  * Made class methods virtual for inheritance purposes.
00025  *
00026  * *****************  Version 9  *****************
00027  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00028  * Updated in $/CodeJockey/Include
00029  * Updated copyright and contact information.
00030  *
00031  * *****************  Version 8  *****************
00032  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00033  * Updated in $/CodeJockey/Include
00034  *
00035  * *****************  Version 7  *****************
00036  * User: Kirk Stowell Date: 7/25/99    Time: 3:16a
00037  * Updated in $/CodeJockey/Include
00038  * Added ResetContent() thanks to Hiren Patel [hpatel@spss.com] for
00039  * pointing this out.
00040  *
00041  * *****************  Version 6  *****************
00042  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00043  * Updated in $/CodeJockey/Include
00044  *
00045  * *****************  Version 5  *****************
00046  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00047  * Updated in $/CodeJockey/Include
00048  * Cleaned up inline functions, and import/export macro so that class will
00049  * be imported when linked to, and exported at compile time.
00050  *
00051  * *****************  Version 4  *****************
00052  * User: Kirk Stowell Date: 4/03/99    Time: 10:43p
00053  * Updated in $/CodeJockey/Include
00054  * Added comments and cleaned up code.
00055  *
00056  * *****************  Version 3  *****************
00057  * User: Kirk Stowell Date: 3/03/99    Time: 10:43p
00058  * Updated in $/CodeJockey/Include
00059  * Changed images list's to pointer vars passed into class.
00060  *
00061  * *****************  Version 2  *****************
00062  * User: Kirk Stowell Date: 2/24/99    Time: 10:42p
00063  * Updated in $/CodeJockey/Include
00064  * Christopher Brown (Allknowing@earthlink.net) some modifications to
00065  * correct icon resource leak, and eliminate screen flicker.
00066  *
00067  * *****************  Version 1  *****************
00068  * User: Kirk Stowell Date: 10/17/98   Time: 10:42p
00069  * Created in $/CodeJockey/Include
00070  * Initial re-write and release.
00071  *
00072  ***************************************************************************/
00074
00075 #ifndef __CJOUTLOOKBAR_H__
00076 #define __CJOUTLOOKBAR_H__
00077
00078 #if _MSC_VER >= 1000
00079 #pragma once
00080 #endif // _MSC_VER >= 1000
00081
00082 // CContentItems is a utility class used as a Container for
00083 // CJOutlookBar menu items.
00084 class _CJX_EXT_CLASS CContentItems
00085 {
00086 public:
00087
00088     // non-default constructor used to initialize
00089     // member data
00090     //
00091     CContentItems(UINT nID, CString str);
00092
00093 protected:
00094
00095     UINT    m_nImageID; // index of menu item
00096     CString m_csText;   // text of menu item
00097
00098 public:
00099
00100     // overloaded operator which copies a CContentItem object
00101     //
00102     void operator = (CContentItems& pItems);
00103
00104     // returns the index of a menu item
00105     //
00106     virtual UINT GetImageID();
00107
00108     // returns the text of a menu item
00109     //
00110     virtual CString GetText();
00111 };
00112
00113 // CJOutlookBar is a CListBox derived class which simulates a control simular
00114 // to the Outlook bar as seen in Outlook, can only be used with the
00115 // LBS_OWNERDRAWVARIABLE style bit set. very generic
00116 class _CJX_EXT_CLASS CCJOutlookBar : public CListBox
00117 {
00118     DECLARE_DYNAMIC(CCJOutlookBar)
00119
00120 public:
00121
00122     // Default constructor
00123     //
00124     CCJOutlookBar();
00125
00126     // Virtual destructor
00127     //
00128     virtual ~CCJOutlookBar();
00129
00130 protected:
00131
00132     CWnd*           m_pOwner;           // points to the parent window for this control see SetOwner(...)
00133     CPoint          m_point;            // holds the cursor position
00134     CImageList*     m_pImageListLarge;  // points to the small image list for this control see SetImageLists(...)
00135     CImageList*     m_pImageListSmall;  // points to the large image list for this control see SetImageLists(...)
00136     CContentItems*  m_pContents;        // points to a CContentItem array see SetItems(...)
00137     int             m_nNumItems;        // number of menu items in this control see SetItems(...)
00138     int             m_nIndex;           // currently selected menu index
00139     bool            m_bHilight;         // true when menu item is selected
00140     bool            m_bLBDown;          // true when left mouse button is pressed
00141     CFont           m_Font;             // font used by the control.
00142     COLORREF        m_clrHilite;        // set to ::GetSysColor(COLOR_BTNHIGHLIGHT)
00143     COLORREF        m_clrShadow;        // set to ::GetSysColor(COLOR_BTNSHADOW)
00144     COLORREF        m_clrDkShad;        // set to ::GetSysColor(COLOR_3DDKSHADOW)
00145     COLORREF        m_clrNormal;        // set to ::GetSysColor(COLOR_BTNFACE)
00146     COLORREF        m_clrTextNm;        // set to ::GetSysColor(COLOR_WINDOW)
00147
00148 public:
00149
00150     // sets the large and small image lists for the control. currently
00151     // only large image list is implemented
00152     //
00153     virtual void SetImageLists(CImageList* pImageListSmall=NULL, CImageList* pImageListLarge=NULL);
00154
00155     // sets the CContentItem array and m_nNumItems member variables
00156     //
00157     virtual void SetItems(CContentItems* pItems, int nNumItems);
00158
00159     // sets the window that will receive messages from this control
00160     //
00161     virtual void SetOwner(CWnd* pWnd);
00162
00163     // called by the control to initialize the controls font.
00164     //
00165     virtual void UpdateFont();
00166
00167
00168 // Overrides
00169     // ClassWizard generated virtual function overrides
00170     //{{AFX_VIRTUAL(CCJOutlookBar)
00171     public:
00172     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00173     virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00174     //}}AFX_VIRTUAL
00175
00176 // Generated message map functions
00177 protected:
00178     //{{AFX_MSG(CCJOutlookBar)
00179     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00180     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00181     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00182     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00183     afx_msg void OnTimer(UINT nIDEvent);
00184     afx_msg void OnPaint();
00185     afx_msg void OnSysColorChange();
00186     //}}AFX_MSG
00187     DECLARE_MESSAGE_MAP()
00188 };
00189
00191 //  Inline Functions for CContentItems
00193
00194 _CJXLIB_INLINE CContentItems::CContentItems( UINT nID, CString str )
00195     { m_nImageID = nID; m_csText = str; }
00196
00197 _CJXLIB_INLINE CString CContentItems::GetText()
00198     { return m_csText; }
00199
00200 _CJXLIB_INLINE UINT CContentItems::GetImageID()
00201     { return m_nImageID; }
00202
00203 _CJXLIB_INLINE void CContentItems::operator = ( CContentItems& pItems )
00204     { m_nImageID = pItems.m_nImageID; m_csText = pItems.m_csText; }
00205
00207 //  Inline Functions for CCJOutlookBar
00209
00210 _CJXLIB_INLINE void CCJOutlookBar::SetImageLists(CImageList* pImageListSmall, CImageList* pImageListLarge)
00211     { m_pImageListLarge = pImageListLarge; m_pImageListSmall = pImageListSmall; }
00212
00213 _CJXLIB_INLINE void CCJOutlookBar::SetItems(CContentItems * pItems, int nNumItems)
00214     { m_pContents = pItems; m_nNumItems = nNumItems; ResetContent(); for (int i = 0; i < nNumItems; ++i) AddString(m_pContents[i].GetText()); }
00215
00216 _CJXLIB_INLINE void CCJOutlookBar::SetOwner(CWnd* pWnd)
00217     { m_pOwner = pWnd; }
00218
00219 #define OBN_SELENDOK    (WM_USER + 1)   // for message handler
00220 #define OB_CYBUTTON     70              // average button height
00221
00223
00224 //{{AFX_INSERT_LOCATION}}
00225 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00226
00227 #endif // __CJOUTLOOKBAR_H__
00228
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

MultiFiles Member List

This is the complete list of members for MultiFiles, including all inherited members.

begin() const | MultiFiles | [inline]
const_iterator typedef | MultiFiles |
dirs | MultiFiles | [protected]
end() const | MultiFiles | [inline]
getdir(int index, UStr &path) const | MultiFiles |
MultiFiles() | MultiFiles |
newdir(const char *dir) | MultiFiles |
newfile(const char *file, const FSSpec *spec=0L, const char *currRevision=0L) | MultiFiles |
Normalize() | MultiFiles |
NumDirs(void) const | MultiFiles | [inline]
reset() | MultiFiles |
TotalNumFiles(void) const | MultiFiles |

Generated on Sat Aug 7 22:55:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacBinMaps.cpp Source File

common/MacBinMaps.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * MacBinMaps.cpp --- class to store the mac binary encoding mappings
00023  */
00024
00025 /* here should be a define, to recorgnize if this file is needed in dev-tools */
00026 #ifdef TARGET_OS_MAC
00027
00028 #include <Carbon.h>
00029 #include <stdlib.h>
00030
00031 #include "MacBinMaps.h"
00032 #include "Persistent.h"
00033
00034 typedef struct
00035 {
00036 #   define MAX_MACBIN_DESC_OLD 63
00037     OSType sig;
00038     char desc[MAX_MACBIN_DESC_OLD + 1];
00039     MACENCODING encod;
00040     bool plainBin;
00041     bool useDefault;
00042 } MACBINMAP_OLD;
00043
00044 typedef struct
00045 {
00046     int             numMaps;
00047     MACBINMAP_OLD maps[1];
00048 } MACBINMAPENTRIES_OLD;
00049
00050 class PMacBinMaps : public MacBinMaps, public CPersistent
00051 {
00052 public:
00053     PMacBinMaps(const char *uniqueName) : CPersistent(uniqueName, kNoClass)
00054     {
00055         if(entries != 0L)
00056         {
00057             free(entries);
00058             entries = 0L;
00059         }
00060     }
00061
00062     virtual ~PMacBinMaps()
00063     {
00064     }
00065
00066     virtual unsigned int SizeOf(void) const
00067     {
00068         if(entries == 0L)
00069             return 0;
00070         return sizeof(MACBINMAPENTRIES) + (entries->numMaps - 1) * sizeof(MACBINMAP);
00071     }
00072
00073     virtual const void *GetData(void) const
00074     {
00075         return entries;
00076     }
00077     virtual void SetData(const void *ptr, unsigned int size)
00078     {
00079         if(entries != 0L)
00080         {
00081             free(entries);
00082             entries = 0L;
00083         }
00084
00085         if(size < sizeof(int))
00086             return;
00087
00088         if ( size < (sizeof(int) + sizeof(unsigned long))  ||
00089              *static_cast<const unsigned long*>(ptr) != MACBINMAP_COOKIEVALUE )
00090         {
00091           const MACBINMAPENTRIES_OLD *oldEntries = static_cast<const MACBINMAPENTRIES_OLD *>(ptr);
00092           if((sizeof(MACBINMAPENTRIES_OLD) + (oldEntries->numMaps - 1) * sizeof(MACBINMAP_OLD)) != size)
00093               return;
00094
00095         entries = (MACBINMAPENTRIES *)malloc((oldEntries->numMaps ? oldEntries->numMaps-1 : 0) * sizeof(MACBINMAP) + sizeof(MACBINMAPENTRIES));
00096         if(entries == 0L)
00097             return;
00098         entries->cookie = MACBINMAP_COOKIEVALUE;
00099         entries->numMaps = oldEntries->numMaps;
00100       for ( int i(0); i < oldEntries->numMaps; ++i )
00101       {
00102         entries->maps[i].sig = oldEntries->maps[i].sig;
00103         entries->maps[i].ext[0] = '\0';
00104         strncpy(entries->maps[i].desc, oldEntries->maps[i].desc, MAX_MACBIN_DESC);
00105         entries->maps[i].encod = oldEntries->maps[i].encod;
00106         if ( oldEntries->maps[i].plainBin ) entries->maps[i].encod = MAC_PLAIN_BINARY;
00107         entries->maps[i].useDefault = oldEntries->maps[i].useDefault;
00108       }
00109         }
00110         else
00111         {
00112         MACBINMAPENTRIES *newEntries = (MACBINMAPENTRIES *)ptr;
00113         if((sizeof(MACBINMAPENTRIES) + (newEntries->numMaps - 1) * sizeof(MACBINMAP)) != size)
00114             return;
00115
00116         entries = (MACBINMAPENTRIES *)malloc(size);
00117         if(entries == 0L)
00118             return;
00119
00120         memcpy(entries, ptr, size);
00121     }
00122     }
00123     PMacBinMaps& operator = (const MacBinMaps& inSrc)
00124     {
00125       MacBinMaps::operator = (inSrc);
00126       this->TouchTimeStamp();
00127       return *this;
00128   }
00129 } gAllBinMaps("P_MacBinMaps");
00130
00131 MacBinMaps::MacBinMaps()
00132 {
00133     Reset();
00134 }
00135
00136 MacBinMaps::~MacBinMaps()
00137 {
00138     if(entries != 0L)
00139         free(entries);
00140 }
00141
00142 void MacBinMaps::Reset(void)
00143 {
00144     entries = (MACBINMAPENTRIES *)malloc(sizeof(int));
00145     if(entries == 0L)
00146         return;
00147   entries->cookie = MACBINMAP_COOKIEVALUE;
00148     entries->numMaps = 0;
00149 }
00150
00151 const char *MacBinMaps::GetEnvPlainTypes(void)
00152 {
00153   return MacBinMaps::GetEnvTypes(MAC_PLAIN_BINARY);
00154 }
00155
00156 const char *MacBinMaps::GetEnvTypes(MACENCODING type)
00157 {
00158     static CStr result;
00159     result = "";
00160     const MACBINMAPENTRIES * allEntries = gAllBinMaps.Entries();
00161     if(allEntries == 0L)
00162         return 0L;
00163
00164     int i;
00165     for(i = 0; i < allEntries->numMaps; i++)
00166     {
00167         const MACBINMAP & curmap = allEntries->maps[i];
00168         if(!curmap.useDefault && curmap.encod == type)
00169         {
00170             result << ((char *)&curmap.sig)[0];
00171             result << ((char *)&curmap.sig)[1];
00172             result << ((char *)&curmap.sig)[2];
00173             result << ((char *)&curmap.sig)[3];
00174             result << '/';
00175             result << curmap.ext;
00176             result << ';';
00177         }
00178     }
00179     return result;
00180 }
00181
00182 void MacBinMaps::LoadDefaults(void)
00183 {
00184     if(gAllBinMaps.SizeOf() == 0L)
00185     {
00186         CFDictionaryRef   infoDict(CFBundleGetInfoDictionary(CFBundleGetMainBundle()));
00187         if ( infoDict )
00188         {
00189           CFArrayRef    defaultMappings(static_cast<CFArrayRef>(CFDictionaryGetValue(infoDict, CFSTR("DefaultBinaryMappings"))));
00190           if ( defaultMappings )
00191           {
00192             UInt32    count(CFArrayGetCount(defaultMappings));
00193             for ( UInt32 i(0); i < count; ++i )
00194             {
00195               CFDictionaryRef   mapping(static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(defaultMappings, i)));
00196               if ( mapping )
00197               {
00198                 CFStringRef   fileType(static_cast<CFStringRef>(CFDictionaryGetValue(mapping, CFSTR("FileType"))));
00199                 CFStringRef   extension(static_cast<CFStringRef>(CFDictionaryGetValue(mapping, CFSTR("Extension"))));
00200                 CFStringRef   description(static_cast<CFStringRef>(CFDictionaryGetValue(mapping, CFSTR("Description"))));
00201                 CFStringRef   encoding(static_cast<CFStringRef>(CFDictionaryGetValue(mapping, CFSTR("Encoding"))));
00202
00203                 MACENCODING   encod(MAC_HQX);
00204                 bool          defaultEncoding(false);
00205                 if ( CFStringCompare(encoding, CFSTR("PlainBinary"), kCFCompareCaseInsensitive) == kCFCompareEqualTo )
00206                   encod = MAC_PLAIN_BINARY;
00207                 else if ( CFStringCompare(encoding, CFSTR("AppleSingle"), kCFCompareCaseInsensitive) == kCFCompareEqualTo )
00208                   encod = MAC_APPSINGLE;
00209                 else if ( CFStringCompare(encoding, CFSTR("Default"), kCFCompareCaseInsensitive) == kCFCompareEqualTo )
00210                   defaultEncoding = true;
00211
00212                 OSType        type('\?\?\?\?');
00213                 char          ext[MAX_MACBIN_EXTENSION];
00214                 char          desc[MAX_MACBIN_DESC];
00215               CFIndex       usedBufLen;
00216               if ( ((CFStringGetLength(fileType) == 4  &&  CFStringGetBytes(fileType, CFRangeMake(0,4), kCFStringEncodingMacRoman, 0, false, (UInt8*)&type, 4, &usedBufLen) == 4) ||
00217                      CFStringGetLength(fileType) == 0)  &&
00218                    usedBufLen == 4  &&
00219                    CFStringGetCString(extension, ext, sizeof(ext), kCFStringEncodingUTF8)  &&
00220                    CFStringGetCString(description, desc, sizeof(desc), kCFStringEncodingUTF8) )
00221                 this->AddEntry(type, ext, desc, encod, defaultEncoding);
00222               }
00223             }
00224           }
00225         }
00226     }
00227     else
00228     {
00229         *this = gAllBinMaps;
00230     }
00231 }
00232
00233 void MacBinMaps::SaveDefaults(void)
00234 {
00235     gAllBinMaps = *this;
00236 }
00237
00238 const MACBINMAP *MacBinMaps::AddEntry(OSType sig, const char* extension, const char *desc, MACENCODING encod, bool useDefault)
00239 {
00240     if(entries == 0L)
00241         return 0L;
00242
00243     if ( extension == NULL ) extension = "";
00244
00245     int i;
00246     for(i = 0; i < entries->numMaps; i++)
00247     {
00248         if(entries->maps[i].sig == sig  &&  strcmp(entries->maps[i].ext, extension) == 0)
00249             break;
00250     }
00251
00252     if(i != entries->numMaps)
00253     {
00254         MACBINMAP & curmap = entries->maps[i];
00255         curmap.sig = sig;
00256         strncpy(curmap.ext, extension, MAX_MACBIN_EXTENSION);
00257         curmap.desc[0] = '\0';
00258         if(desc != 0L)
00259             strncpy(curmap.desc, desc, MAX_MACBIN_DESC);
00260         curmap.encod = encod;
00261         curmap.useDefault = useDefault;
00262         return &curmap;
00263     }
00264
00265     entries = (MACBINMAPENTRIES *)realloc(entries, sizeof(MACBINMAPENTRIES) + entries->numMaps * sizeof(MACBINMAP));
00266     if(entries == 0L)
00267         return 0L;
00268
00269     MACBINMAP & newmap = entries->maps[entries->numMaps++];
00270     newmap.sig = sig;
00271     strncpy(newmap.ext, extension, MAX_MACBIN_EXTENSION);
00272     newmap.desc[0] = '\0';
00273     if(desc != 0L)
00274         strncpy(newmap.desc, desc, MAX_MACBIN_DESC);
00275     newmap.encod = encod;
00276     newmap.useDefault = useDefault;
00277     return &newmap;
00278 }
00279
00280 void MacBinMaps::RemoveEntry(OSType sig, const char* extension)
00281 {
00282     if(entries == 0L)
00283         return;
00284     if ( extension == NULL ) extension = "";
00285
00286     int i;
00287     for(i = 0; i < entries->numMaps; i++)
00288     {
00289         if(entries->maps[i].sig == sig && strcmp(entries->maps[i].ext, extension) == 0)
00290             break;
00291     }
00292
00293     if(i == entries->numMaps)
00294         return;
00295
00296     memmove(&entries->maps[i], &entries->maps[i + 1],
00297         (entries->numMaps - i - 1) * sizeof(MACBINMAP));
00298     entries->numMaps--;
00299     entries = (MACBINMAPENTRIES *)realloc(entries, sizeof(MACBINMAPENTRIES) + (entries->numMaps - 1) * sizeof(MACBINMAP));
00300 }
00301
00302 MacBinMaps & MacBinMaps::operator=(const MacBinMaps & otherMap)
00303 {
00304     if(entries != 0L)
00305         free(entries);
00306     Reset();
00307     if(entries == 0L)
00308         return *this;
00309
00310     const MACBINMAPENTRIES *theseEntries = otherMap.Entries();
00311     if(theseEntries != 0L) for(int i = 0; i < theseEntries->numMaps; i++)
00312     {
00313         const MACBINMAP & newmap = theseEntries->maps[i];
00314         AddEntry(newmap.sig, newmap.ext, newmap.desc, newmap.encod, newmap.useDefault);
00315     }
00316     return *this;
00317 }
00318
00319 #endif /* TARGET_OS_MAC */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PyMenuMgr Member List

This is the complete list of members for PyMenuMgr, including all inherited members.

_AddButton(obj_t *self, PyObject *args) | PyMenuMgr | [inline, protected, static]
_AddPulldown(obj_t *self, PyObject *args) | PyMenuMgr | [inline, protected, static]
_AddSeparator(obj_t *self, PyObject *args) | PyMenuMgr | [inline, protected, static]
_AddToggle(obj_t *self, PyObject *args) | PyMenuMgr | [inline, protected, static]
_Count(obj_t *self, PyObject *args) | PyMenuMgr | [inline, protected, static]
_Delete(obj_t *self, PyObject *args) | PyMenuMgr | [inline, protected, static]
_DeleteByCmd(obj_t *self, PyObject *args) | PyMenuMgr | [inline, protected, static]
AddButton(PyObject *args) | PyMenuMgr |
AddPulldown(PyObject *args) | PyMenuMgr |
AddSeparator(PyObject *args) | PyMenuMgr |
AddToggle(PyObject *args) | PyMenuMgr |
Count(PyObject *args) | PyMenuMgr |
Create(PyObject *selfptr, PyObject *args) | PyMenuMgr | [static]
dealloc(obj_t *self) | PyMenuMgr | [static]
Delete(PyObject *args) | PyMenuMgr |
DeleteByCmd(PyObject *args) | PyMenuMgr |
False() | PyContainer | [inline, static]
FindMethod(PyObject *self, char *name) | PyMenuMgr | [inline, static]
getattr(obj_t *self, char *name) | PyMenuMgr | [static]
GetAttr(char *name) | PyContainer | [inline, virtual]
GetType(void) | PyMenuMgr | [inline, static]
InitValues(PyObject *d) | PyMenuMgr | [static]
m_doc | PyMenuMgr | [static]
m_menu | PyMenuMgr | [protected]
m_methods | PyMenuMgr | [static]
m_registry | PyMenuMgr | [static]
New(void) | PyMenuMgr | [static]
operator UMENU() const | PyMenuMgr | [inline]
PyContainer() | PyContainer | [inline]
PyMenuMgr(UMENU menu) | PyMenuMgr | [inline]
RegisterValue(PyObject *d, char *name, int value) | PyContainer | [static]
True() | PyContainer | [inline, static]
Void() | PyContainer | [inline, static]
~PyContainer() | PyContainer | [inline, virtual]
~PyMenuMgr() | PyMenuMgr | [inline, virtual]

Generated on Sat Aug 7 22:56:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ULIST_INSERT Member List

This is the complete list of members for ULIST_INSERT, including all inherited members.

col | ULIST_INSERT
icon | ULIST_INSERT
row | ULIST_INSERT
title | ULIST_INSERT

Generated on Sat Aug 7 22:54:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HHelpSupport.h Source File

WinCvs/HHelpSupport.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2004
00019  */
00020
00021 #if !defined(AFX_HHELPSUPPORT_H__E97D92A1_F935_41B3_9748_8000F0A1A76C__INCLUDED_)
00022 #define AFX_HHELPSUPPORT_H__E97D92A1_F935_41B3_9748_8000F0A1A76C__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // HHelpSupport.h : header file
00028 //
00029
00030 #include <functional>
00031 #include "HHelp\wincvs.h"
00032
00034 const DWORD helpTopicIgnore = -1;
00035
00037 const DWORD helpTopicEnd = 0;
00038
00040 class CHHelpSupport
00041 {
00042 public:
00043     // Construction
00044     CHHelpSupport();
00045     ~CHHelpSupport();
00046
00047 private:
00048     // Types
00049     typedef std::map<DWORD, DWORD> tHelpIDMap;
00050     typedef std::vector<DWORD> tHelpIDsData;
00052     // Data members
00053     tHelpIDMap m_hhelpIDs;
00055 protected:
00056     // Methods
00057     virtual CWnd* GetWnd();
00058
00059     virtual void InitHelpID() = 0;
00060
00061     void CreateHelpIDsData(tHelpIDsData& helpIDsData) const;
00062
00063     BOOL DoOnHelpInfo(const HELPINFO* pHelpInfo);
00064     void DoOnContextMenu(const CWnd* pWnd, CPoint point);
00065
00066     BOOL IsHelpCtrl(const UINT ctrlID) const;
00067     BOOL IsIgnoredCtrl(const UINT ctrlID) const;
00068
00069 public:
00070     // Interface
00071     void EnableWndContextHelp();
00072     DWORD SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic);
00073
00074     void ShowHelp();
00075
00076     static LPCTSTR GetHelpFilePath();
00077     static void InitHTMLHelp();
00078 };
00079
00081 class CHHelpPropertySheet : public CPropertySheet, public CHHelpSupport
00082 {
00083     DECLARE_DYNAMIC(CHHelpPropertySheet)
00084
00085 // Construction
00086 public:
00087     CHHelpPropertySheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00088     CHHelpPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00089
00090 // Attributes
00091 public:
00092
00093 // Operations
00094 public:
00095
00096 // Overrides
00097     // ClassWizard generated virtual function overrides
00098     //{{AFX_VIRTUAL(CHHelpPropertySheet)
00099     //}}AFX_VIRTUAL
00100
00101 // Implementation
00102 public:
00103     virtual ~CHHelpPropertySheet();
00104
00105     // Generated message map functions
00106 protected:
00107     //{{AFX_MSG(CHHelpPropertySheet)
00108     virtual BOOL OnInitDialog();
00109     afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00110     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00111     //}}AFX_MSG
00112     DECLARE_MESSAGE_MAP()
00113 protected:
00114     // Methods
00115     virtual void InitHelpID();
00116 };
00117
00119 class CHHelpPropertyPage : public CPropertyPage, public CHHelpSupport
00120 {
00121     DECLARE_DYNAMIC(CHHelpPropertyPage)
00122
00123 // Construction
00124 public:
00125     CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption = 0);
00126     CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
00127     ~CHHelpPropertyPage();
00128
00129 // Dialog Data
00130     //{{AFX_DATA(CHHelpPropertyPage)
00131         // NOTE - ClassWizard will add data members here.
00132         //    DO NOT EDIT what you see in these blocks of generated code !
00133     //}}AFX_DATA
00134
00135
00136 // Overrides
00137     // ClassWizard generate virtual function overrides
00138     //{{AFX_VIRTUAL(CHHelpPropertyPage)
00139     protected:
00140     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00141     //}}AFX_VIRTUAL
00142
00143 // Implementation
00144 protected:
00145     // Generated message map functions
00146     //{{AFX_MSG(CHHelpPropertyPage)
00147     virtual BOOL OnInitDialog();
00148     afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00149     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00150     //}}AFX_MSG
00151     DECLARE_MESSAGE_MAP()
00152 };
00153
00155 class CHHelpDialog : public CDialog, public CHHelpSupport
00156 {
00157 // Construction
00158 public:
00159     CHHelpDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
00160     CHHelpDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
00161
00162 // Dialog Data
00163     //{{AFX_DATA(CHHelpDialog)
00164         // NOTE: the ClassWizard will add data members here
00165     //}}AFX_DATA
00166
00167
00168 // Overrides
00169     // ClassWizard generated virtual function overrides
00170     //{{AFX_VIRTUAL(CHHelpDialog)
00171     protected:
00172     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00173     //}}AFX_VIRTUAL
00174
00175 // Implementation
00176 protected:
00177
00178     // Generated message map functions
00179     //{{AFX_MSG(CHHelpDialog)
00180     virtual BOOL OnInitDialog();
00181     afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
00182     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00183     //}}AFX_MSG
00184     DECLARE_MESSAGE_MAP()
00185 };
00186 //{{AFX_INSERT_LOCATION}}
00187 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00188
00189 #endif // !defined(AFX_HHELPSUPPORT_H__E97D92A1_F935_41B3_9748_8000F0A1A76C__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LineCmd.h Source File

common/LineCmd.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 #if !defined(AFX_LINECMD_H__5946A8C5_8517_11D1_8949_444553540000__INCLUDED_)
00022 #define AFX_LINECMD_H__5946A8C5_8517_11D1_8949_444553540000__INCLUDED_
00023
00024 #if _MSC_VER >= 1000
00025 #pragma once
00026 #endif // _MSC_VER >= 1000
00027 // LineCmd.h : header file
00028 //
00029
00030 #include "SmartComboBox.h"
00031 #include "CPStr.h"
00032
00033 #ifdef WIN32
00034 #   include "MultilineEntryDlg.h"
00035 #   include "HHelpSupport.h"
00036 #endif
00037
00038 #include "CvsArgs.h"
00039
00040 #define DEF_CVS_CMD CVS_CMD " "
00041
00042 class CvsArgs;
00043 class MultiFiles;
00044
00045 bool CompatGetCommand(const MultiFiles* mf,
00046                       CStr& cmd, CStr& dir, bool& addDefault, bool& addSelection,
00047                       bool& forceCvsroot, CStr& cvsroot);
00048
00049 #ifdef WIN32
00050
00052 class CCmdLine_MAIN : public CHHelpPropertyPage
00053 {
00054     DECLARE_DYNAMIC(CCmdLine_MAIN)
00055
00056 // Construction
00057 public:
00058     CCmdLine_MAIN(const MultiFiles* mf,
00059         const char* lastcmd, bool hasPath, const char* lastpath,
00060         bool addDefault, bool addSelection,
00061         bool forceRoot, const char* cvsroot);
00062     ~CCmdLine_MAIN();
00063
00064 // Dialog Data
00065     //{{AFX_DATA(CCmdLine_MAIN)
00066     enum { IDD = IDD_CMDLINE_MAIN };
00067     CButton m_selCvsrootButton;
00068     CSmartComboBox  m_cvsrootCombo;
00069     CButton m_forceRootCheck;
00070     CStatic m_multilineEntryPlaceholder;
00071     CSmartComboBox  m_folderLocCombo;
00072     CButton m_addSelectionCheck;
00073     CButton m_checkPathCheck;
00074     CButton m_selFolderButton;
00075     BOOL    m_checkPath;
00076     CString m_folderLoc;
00077     BOOL    m_addDefault;
00078     BOOL    m_addSelection;
00079     BOOL    m_forceRoot;
00080     CString m_cvsroot;
00081     //}}AFX_DATA
00082
00083
00084 // Overrides
00085     // ClassWizard generate virtual function overrides
00086     //{{AFX_VIRTUAL(CCmdLine_MAIN)
00087     public:
00088     protected:
00089     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00090     //}}AFX_VIRTUAL
00091
00092 // Implementation
00093 protected:
00094     // Generated message map functions
00095     //{{AFX_MSG(CCmdLine_MAIN)
00096     afx_msg void OnCheckpath();
00097     afx_msg void OnSelfolder();
00098     virtual BOOL OnInitDialog();
00099     afx_msg void OnAddSelection();
00100     afx_msg void OnForceroot();
00101     afx_msg void OnSelcvsroot();
00102     //}}AFX_MSG
00103     DECLARE_MESSAGE_MAP()
00104 private:
00105     // Data members
00106     const MultiFiles* m_mf;
00107     bool m_hasSelection;
00109     CString m_cmdLine;
00111     CMultilineEntryDlg m_multilineEntryDlg;
00113     // Methods
00114     virtual void InitHelpID();
00115
00116 public:
00117     // Interface
00118     CString GetCmdLine() const;
00119 };
00120
00121 //{{AFX_INSERT_LOCATION}}
00122 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00123 #endif /* WIN32 */
00124
00125 #endif // !defined(AFX_LINECMD_H__5946A8C5_8517_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

AddCvsArgs Member List

This is the complete list of members for AddCvsArgs, including all inherited members.

add(const char *arg) | CvsArgs | [virtual]
addfile(const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L) | ControlCvsArgs | [virtual]
argc | CvsArgs | [protected]
Argc(void) const | CvsArgs |
argv | CvsArgs | [protected]
Argv(void) const | CvsArgs |
ControlCvsArgs() | ControlCvsArgs | [inline]
CvsArgs(bool defargs=true) | CvsArgs |
CvsArgs(char *const *fromargv, int fromargc) | CvsArgs |
FileIsType(const char *arg, const char *dir, const FSSpec *spec=0L) | AddCvsArgs | [inline, protected, virtual]
HasProblem(void) const | ControlCvsArgs |
parse(const char *arg) | CvsArgs | [virtual]
print(const char *indirectory=0L) | CvsArgs |
reset(bool defargs=true) | CvsArgs |
SetProblem(bool newState) | ControlCvsArgs |
TypeDesc() | AddCvsArgs | [inline, protected, virtual]
~CvsArgs() | CvsArgs | [virtual]

Generated on Sat Aug 7 22:48:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CProgressDlg Member List

This is the complete list of members for CProgressDlg, including all inherited members.

CProgressDlg(bool &abort, bool interruptable, const char *title=NULL, kProgressType progressType=kProgressBar, CWnd *pParent=NULL) | CProgressDlg |
Create() | CProgressDlg |
DoDataExchange(CDataExchange *pDX) | CProgressDlg | [protected, virtual]
FlushDisplay(const CDialog *dlg, const bool &abort) | CProgressDlg | [private, static]
IDD enum value | CProgressDlg |
m_abort | CProgressDlg | [private]
m_cancelButton | CProgressDlg |
m_hWndParent | CProgressDlg | [private]
m_interruptable | CProgressDlg | [private]
m_pParent | CProgressDlg | [private]
m_progressCtrl | CProgressDlg |
m_progressTextStatic | CProgressDlg |
m_progressType | CProgressDlg | [private]
m_title | CProgressDlg | [private]
OnInitDialog() | CProgressDlg | [protected, virtual]
OnOK() | CProgressDlg | [protected, virtual]
PostNcDestroy() | CProgressDlg | [protected, virtual]
SetProgress(int percent) | CProgressDlg |
SetProgress(const char *text) | CProgressDlg |

Generated on Sat Aug 7 22:55:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

_dircontents Member List

This is the complete list of members for _dircontents, including all inherited members.

_d_entry | _dircontents
_d_next | _dircontents

Generated on Sat Aug 7 22:48:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AnnotateDlg.h Source File

common/AnnotateDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2001
00019  */
00020
00021 /*
00022  * AnnotateDlg.h : the cvs annotate dialog
00023  */
00024
00025 #if !defined(AFX_ANNOTATEDLG_H__864729EE_838B_473D_8723_E1269829F781__INCLUDED_)
00026 #define AFX_ANNOTATEDLG_H__864729EE_838B_473D_8723_E1269829F781__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #include "CPStr.h"
00033 #include "SmartComboBox.h"
00034 #include "CvsCommands.h"
00035
00036 #ifdef WIN32
00037 #   include "HHelpSupport.h"
00038 #endif
00039
00040 class MultiFiles;
00041
00042 bool CompatGetAnnotate(const MultiFiles* mf, kAnnotateCmdType annotateType,
00043                        bool& noRecurs, bool& isDate, CPStr& rev, bool& force);
00044
00045 extern CMString gRevNames;
00046 extern CMString gDateNames;
00047
00048 #ifdef WIN32
00049
00051 // CAnnotate_MAIN dialog
00052
00053 class CAnnotate_MAIN : public CHHelpPropertyPage
00054 {
00055     DECLARE_DYNAMIC(CAnnotate_MAIN)
00056
00057 // Construction
00058 public:
00059     CAnnotate_MAIN(const MultiFiles* mf, kAnnotateCmdType annotateType,
00060         const char* rev, bool isDate);
00061     ~CAnnotate_MAIN();
00062
00063 // Dialog Data
00064     //{{AFX_DATA(CAnnotate_MAIN)
00065     enum { IDD = IDD_ANNOTATE_MAIN };
00066     CButton m_forceCheck;
00067     CButton m_noRecurseCheck;
00068     CButton m_hasRevCheck;
00069     CButton m_browseTagButton;
00070     CButton m_isDateCheck;
00071     CSmartComboBox  m_revCombo;
00072     BOOL    m_hasRev;
00073     BOOL    m_isDate;
00074     BOOL    m_force;
00075     BOOL    m_noRecurse;
00076     CString m_rev;
00077     //}}AFX_DATA
00078
00079
00080 // Overrides
00081     // ClassWizard generate virtual function overrides
00082     //{{AFX_VIRTUAL(CAnnotate_MAIN)
00083     protected:
00084     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00085     //}}AFX_VIRTUAL
00086
00087 // Implementation
00088 protected:
00089     // Generated message map functions
00090     //{{AFX_MSG(CAnnotate_MAIN)
00091     afx_msg void OnSpecifyRev();
00092     afx_msg void OnIsdate();
00093     afx_msg void OnBrowseTag();
00094     virtual BOOL OnInitDialog();
00095     //}}AFX_MSG
00096     DECLARE_MESSAGE_MAP()
00097 private:
00098     // Data members
00099     const MultiFiles* m_mf;
00100     kAnnotateCmdType m_annotateType;
00101
00102     // Methods
00103     virtual void InitHelpID();
00104 };
00105
00106 //{{AFX_INSERT_LOCATION}}
00107 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00108 #endif /* WIN32 */
00109
00110 #endif // !defined(AFX_ANNOTATEDLG_H__864729EE_838B_473D_8723_E1269829F781__INCLUDED_)
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoQueryUpdateHandler Member List

This is the complete list of members for KoQueryUpdateHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoQueryUpdateHandler() | KoQueryUpdateHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoQueryUpdateHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoQueryUpdateHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJExplorerBar Member List

This is the complete list of members for CCJExplorerBar, including all inherited members.

CalcDynamicLayout(int nLength, DWORD nMode) | CCJControlBar | [virtual]
CCJControlBar() | CCJControlBar |
CCJExplorerBar() | CCJExplorerBar |
Create(CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName=NULL, CSize sizeDefault=CSize(200, 100), DWORD dwStyle=CBRS_LEFT) | CCJExplorerBar | [virtual]
CCJControlBar::Create(CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName=NULL, CSize sizeDefault=CSize(200, 100), DWORD dwStyle=CBRS_LEFT, BOOL bFlatBorders=FALSE) | CCJControlBar | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJControlBar | [protected, virtual]
DrawGriperCaption(CDC *pDC, LPRECT pRect) | CCJControlBar | [protected, virtual]
DrawGripper(CDC *pDC) | CCJControlBar | [protected, virtual]
EnableDockingOnSizeBar(DWORD dwDockStyle) | CCJControlBar | [virtual]
EnableFlatLook(BOOL bFlat=TRUE) | CCJControlBar | [virtual]
EnableFlatLook(BOOL bGripper, BOOL bBorder, BOOL bButtons) | CCJControlBar | [virtual]
EnableSaveState(bool bAutoSave=true) | CCJControlBar | [virtual]
EraseNonClient() | CCJControlBar | [protected, virtual]
GetButtonRect() | CCJControlBar | [protected, virtual]
GetChildRect(CRect &rect) | CCJExplorerBar | [virtual]
GetGripperRect() | CCJControlBar | [protected, virtual]
GetHorzSize() | CCJControlBar | [virtual]
GetMenuID() | CCJControlBar | [virtual]
GetMinExt() | CCJControlBar | [virtual]
GetVertSize() | CCJControlBar | [virtual]
HitTest(CPoint &point) | CCJControlBar | [protected, virtual]
IsBottomDocked() const | CCJControlBar | [virtual]
IsFloating() const | CCJControlBar | [virtual]
IsHorzDocked() const | CCJControlBar | [virtual]
IsLeftDocked() const | CCJControlBar | [virtual]
IsRightDocked() const | CCJControlBar | [virtual]
IsTopDocked() const | CCJControlBar | [virtual]
IsVertDocked() const | CCJControlBar | [virtual]
LoadBarState(CSize &size, int nID) | CCJControlBar | [protected, virtual]
m_bAutoSave | CCJControlBar | [protected]
m_bButtons | CCJControlBar | [protected]
m_bDragging | CCJControlBar | [protected]
m_bFlatBorder | CCJControlBar | [protected]
m_bFlatGripper | CCJControlBar | [protected]
m_bFloating | CCJControlBar | [protected]
m_bGripper | CCJControlBar | [protected]
m_bMaximized | CCJControlBar | [protected]
m_bOkToDrag | CCJControlBar | [protected]
m_btnClose | CCJControlBar | [protected]
m_btnMinim | CCJControlBar | [protected]
m_bToFit | CCJControlBar |
m_bUnique | CCJControlBar |
m_Caption | CCJExplorerBar | [protected]
m_CaptionButton | CCJExplorerBar | [protected]
m_cxOffset | CCJControlBar | [protected]
m_cyOffset | CCJControlBar | [protected]
m_eAuxIndex | CCJControlBar | [protected]
m_eChildBorder | CCJControlBar |
m_hAuxIcon | CCJControlBar | [protected]
m_hIcon | CCJExplorerBar | [protected]
m_ImageList | CCJControlBar | [protected]
m_nID | CCJControlBar | [protected]
m_nPos | CCJControlBar | [protected]
m_pChildWnd | CCJControlBar | [protected]
m_popToolbarID | CCJControlBar | [protected]
m_popupMenu | CCJControlBar | [protected]
m_popupMenuID | CCJControlBar | [protected]
m_ptCurDrag | CCJControlBar | [protected]
m_ptStartDrag | CCJControlBar | [protected]
m_rcTrack | CCJControlBar | [protected]
m_sizeDesired | CCJControlBar | [protected]
m_sizeFloat | CCJControlBar | [protected]
m_sizeHorz | CCJControlBar | [protected]
m_sizeNormal | CCJControlBar | [protected]
m_sizeVert | CCJControlBar | [protected]
m_strCaption | CCJExplorerBar | [protected]
m_strSection | CCJControlBar | [protected]
m_ToolTip | CCJControlBar | [protected]
Maximize(int size) | CCJControlBar | [virtual]
Minimize() | CCJControlBar | [virtual]
Normalize() | CCJControlBar | [virtual]
OnButtonClose() | CCJExplorerBar | [protected]
OnButtonMinimize() | CCJControlBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJExplorerBar | [protected]
OnEraseBkgnd(CDC *pDC) | CCJExplorerBar | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJControlBar | [protected]
OnInvertTracker(const CRect &rect) | CCJControlBar | [protected, virtual]
OnLButtonDown(UINT nFlags, CPoint point) | CCJExplorerBar | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJExplorerBar | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJControlBar | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJControlBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnNcHitTest(CPoint point) | CCJControlBar | [protected]
OnNcPaint() | CCJControlBar | [protected]
OnPaint() | CCJControlBar | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJControlBar | [protected]
OnUpdateButtonClose(CCmdUI *pCmdUI) | CCJExplorerBar | [protected]
OnUpdateButtonMinimize(CCmdUI *pCmdUI) | CCJControlBar | [protected]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CCJControlBar | [virtual]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CCJExplorerBar | [protected]
PreTranslateMessage(MSG *pMsg) | CCJControlBar | [virtual]
SaveBarState(CSize &size) | CCJControlBar | [protected, virtual]
SetChild(CWnd *pWnd) | CCJControlBar | [protected, virtual]
SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0) | CCJControlBar | [virtual]
SetNormalSize(const CSize &cs) | CCJControlBar | [virtual]
ShowFrameControls(BOOL bGripper=TRUE, BOOL bButtons=TRUE) | CCJControlBar | [virtual]
~CCJControlBar() | CCJControlBar | [virtual]
~CCJExplorerBar() | CCJExplorerBar | [virtual]

Generated on Sat Aug 7 22:49:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsEntries.cpp Source File

common/CvsEntries.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * CvsEntries.cpp --- adaptation from cvs/src/entries.c
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef TARGET_OS_MAC
00028 #   include "GUSIInternal.h"
00029 #   include "GUSIFileSpec.h"
00030 #   define S_IWRITE S_IWUSR
00031 #endif
00032
00033 #include <stdlib.h>
00034 #include <cstring>
00035 #include <sys/types.h>
00036 #include <sys/stat.h>
00037
00038 #include <sstream>
00039 #include <algorithm>
00040
00041 #include "CvsEntries.h"
00042 #include "AppConsole.h"
00043 #include "getline.h"
00044 #include "FileTraversal.h"
00045 #include "BrowseViewColumn.h"
00046
00047 #ifdef WIN32
00048 #   ifdef _DEBUG
00049 #       define new DEBUG_NEW
00050 #       undef THIS_FILE
00051         static char THIS_FILE[] = __FILE__;
00052 #   endif
00053 #   include "WinCvsDebug.h"
00054 #endif /* WIN32 */
00055
00056 #if TIME_WITH_SYS_TIME
00057 #   include <sys/time.h>
00058 #   include <time.h>
00059 #elif HAVE_SYS_TIME_H
00060 #   include <sys/time.h>
00061 #else
00062 #   include <time.h>
00063 #endif
00064
00065 #ifndef NEW
00066 #define NEW new
00067 #endif
00068
00069 #ifndef NAMESPACE
00070 #       if defined(_MSC_VER) || defined(__MWERKS__) || (__GNUC__ > 2)
00071 #               define NAMESPACE(w) w::
00072 #       else
00073 #               define NAMESPACE(w) ::
00074 #       endif
00075 #endif
00076
00078 NAMESPACE(std) string gStrMonths[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
00079
00080 #define STR_ENCODING_TEXT       _i18n("Text")
00081 #define STR_ENCODING_BINARY     _i18n("Binary")
00082 #define STR_ENCODING_UNICODE    _i18n("Unicode")
00083
00084 #define STR_STATE_IGNORED       _i18n("Ignored")
00085 #define STR_STATE_UNKNOWN       _i18n("Unknown")
00086 #define STR_STATE_CONFLICT      _i18n("Conflict")
00087 #define STR_STATE_RESOLVED      _i18n("Resolved")
00088 #define STR_STATE_MODIFIED      _i18n("Modified")
00089 #define STR_STATE_REMOVED       _i18n("Removed")
00090 #define STR_STATE_MISSING       _i18n("Missing")
00091
00093 // Helper functions
00094
00100 time_t GetDateTime(const char* strTime)
00101 {
00102     struct tm tmTime = { 0 };
00103
00104     NAMESPACE(std) string stringTime = strTime;
00105
00106     if( stringTime.empty() )
00107     {
00108         return -1;
00109     }
00110
00111     // Replace the time separator with spaces to help with parsing
00112     replace(stringTime.begin(), stringTime.end(), ':', ' ');
00113
00114     // Parse
00115     NAMESPACE(std) stringstream parser;
00116     parser << stringTime;
00117
00118     NAMESPACE(std) string strDay;
00119     NAMESPACE(std) string strMonth;
00120
00121     parser >> strDay;
00122     parser >> strMonth;
00123     {
00124         // Find out the month
00125         tmTime.tm_mon = -1;
00126         NAMESPACE(std) string* month = find(gStrMonths, gStrMonths + 12, strMonth);
00127
00128         if( month != gStrMonths + 12 )
00129         {
00130             tmTime.tm_mon = month - gStrMonths;
00131         }
00132         else
00133         {
00134             return (time_t)(-1);
00135         }
00136     }
00137
00138     parser >> tmTime.tm_mday;
00139     parser >> tmTime.tm_hour;
00140     parser >> tmTime.tm_min;
00141     parser >> tmTime.tm_sec;
00142
00143     parser >> tmTime.tm_year;
00144     tmTime.tm_year -= 1900;
00145
00146     tmTime.tm_isdst = -1;
00147
00148     return mktime(&tmTime);
00149 }
00150
00157 static const char* CloneStr(const char* cp)
00158 {
00159     if( cp && *cp )
00160     {
00161         cp = strdup(cp);
00162         if( !cp )
00163         {
00164             throw std::bad_alloc();
00165         }
00166     }
00167     else
00168     {
00169         cp = NULL;
00170     }
00171
00172     return cp;
00173 }
00174
00179 static void DisposeStr(const char* cp)
00180 {
00181     if( cp )
00182     {
00183         free((void*)cp);
00184     }
00185 }
00186
00193 static char* FindExtension(const char* name)
00194 {
00195     // Look for the last occurrence of '.'
00196     char* ptr = strrchr(name, '.');
00197
00198     // If Entry is a subfolder, there is no extension
00199     // If '.' is the first char, there is also no extension
00200     if( ptr == name )
00201     {
00202         ptr = NULL;
00203     }
00204
00205     // Ignore '.'
00206     if( ptr )
00207     {
00208         ++ptr;
00209     }
00210
00211     return ptr;
00212 }
00213
00215 // ColumnIndex
00216
00217 ColumnIndex::ColumnIndex()
00218 {
00219 }
00220
00227 const char* ColumnIndex::GetColumnName(const int index, const bool shortName /*= true*/)
00228 {
00229     switch( index )
00230     {
00231     case kName:
00232         return shortName ? _i18n("Name") : _i18n("Filename");
00233     case kExtention:
00234         return shortName ? _i18n("Ext") : _i18n("Extension");
00235     case kRevision:
00236         return shortName ? _i18n("Rev.") : _i18n("Revision");
00237     case kOption:
00238         return shortName ? _i18n("Option") : _i18n("Keyword Expansion Option");
00239     case kState:
00240         return _i18n("State");
00241     case kEncoding:
00242         return _i18n("Encoding");
00243     case kStickyTag:
00244         return shortName ? _i18n("Tag") : _i18n("Sticky Tag");
00245     case kTimeStamp:
00246         return _i18n("Timestamp");
00247     case kConflict:
00248         return _i18n("Conflict");
00249     case kPath:
00250         return _i18n("Path");
00251     }
00252
00253     return "";
00254 }
00255
00257 // EntnodePath
00258
00259 EntnodePath::EntnodePath(const char* path)
00260     : m_fullpath(NULL), m_ref(1)
00261 {
00262     m_fullpath = CloneStr(path);
00263 }
00264
00265 EntnodePath::~EntnodePath()
00266 {
00267     DisposeStr(m_fullpath);
00268 }
00269
00276 const char* EntnodePath::GetFullPathName(UStr& resPath, const char* name) const
00277 {
00278     resPath = m_fullpath;
00279     if( !resPath.endsWith(kPathDelimiter) )
00280         resPath << kPathDelimiter;
00281
00282     resPath << name;
00283
00284     return resPath;
00285 }
00286
00288 // EntnodeData
00289
00290 UStr EntnodeData::m_sbuffer;
00291
00292 EntnodeData::EntnodeData(const char* name, EntnodePath* path)
00293     : m_ref(1), m_missing(false), m_visited(false), m_unknown(false),
00294       m_unmodified(true), m_ignored(false), m_locked(false), m_removed(false), m_resolved(false),
00295       m_name(NULL), m_state(NULL), m_fullpath(NULL)
00296 {
00297 #if TARGET_RT_MAC_MACHO
00298     memset(&macspec, 0, sizeof(macspec));
00299 #endif
00300
00301     m_name = CloneStr(name);
00302     m_fullpath = path->Ref();
00303 }
00304
00305 EntnodeData::~EntnodeData()
00306 {
00307     DisposeStr(m_name);
00308
00309     if( m_fullpath )
00310         m_fullpath->UnRef();
00311 }
00312
00314 const char* EntnodeData::operator[](const int index) const
00315 {
00316     switch( index )
00317     {
00318     case kName:
00319         return m_name;
00320     case kState:
00321         return m_state;
00322     case kPath:
00323         return GetFullPathName(m_sbuffer);
00324     default:
00325         break;
00326     }
00327
00328     return NULL;
00329 }
00330
00332 // EntnodeFile
00333
00334 EntnodeFile::EntnodeFile(const char* name, EntnodePath* path, const char* vn /*= NULL*/,
00335     const char* ts /*= NULL*/, const char* option /*= NULL*/,
00336     const char* tag /*= NULL*/, const char* date /*= NULL*/,
00337     const char* conflict /*= NULL*/) : EntnodeData(name, path)
00338 {
00339     m_ext = CloneStr(FindExtension(name));
00340     m_vn = CloneStr(vn);
00341     m_ts = CloneStr(ts);
00342     m_option = CloneStr(option);
00343     m_tag = CloneStr(tag);
00344     m_date = CloneStr(date);
00345     m_conflict = CloneStr(conflict);
00346
00347     m_relativePath = NULL;
00348     m_encoding = NULL;
00349
00350     if( vn != NULL && vn[0] == '-' )
00351         SetRemoved(true);
00352 }
00353
00354 EntnodeFile::~EntnodeFile()
00355 {
00356     DisposeStr(m_ext);
00357     DisposeStr(m_vn);
00358     DisposeStr(m_ts);
00359     DisposeStr(m_option);
00360     DisposeStr(m_tag);
00361     DisposeStr(m_date);
00362     DisposeStr(m_conflict);
00363
00364     DisposeStr(m_relativePath);
00365 }
00366
00368 const char* EntnodeFile::operator[](const int index) const
00369 {
00370     switch( index )
00371     {
00372     case kExt:
00373         return m_ext;
00374     case kVN:
00375         return m_vn;
00376     case kTS:
00377         return m_ts;
00378     case kOption:
00379         return m_option;
00380     case kEncoding:
00381         return m_encoding;
00382     case kTag:
00383         return m_tag != NULL ? m_tag : m_date;
00384     case kConflict:
00385         return m_conflict;
00386     default:
00387         break;
00388     }
00389
00390     return EntnodeData::operator[](index);
00391 }
00392
00394 ent_type EntnodeFile::GetType() const
00395 {
00396     return ENT_FILE;
00397 }
00398
00400 const char* EntnodeFile::GetExtension() const
00401 {
00402     return m_ext;
00403 }
00404
00406 const char* EntnodeFile::GetConflict() const
00407 {
00408     return m_conflict;
00409 }
00410
00417 const char* EntnodeFile::GetRelativePath(const KoColumnContext* context, const bool forceCreate /*= false*/) const
00418 {
00419     if( !m_relativePath || forceCreate )
00420     {
00421         char* folderPath = strdup(GetFolderPath());
00422         if( folderPath )
00423         {
00424             DisposeStr(m_relativePath);
00425             m_relativePath = NULL;
00426
00427             char* dupMem = folderPath;
00428
00429             folderPath += context->GetPath().length();
00430
00431             if( '\\' == *folderPath )
00432             {
00433                 folderPath++;
00434             }
00435
00436             const int lenPath = strlen(folderPath);
00437             if( !lenPath )
00438             {
00439                 m_relativePath = CloneStr(".");
00440             }
00441             else
00442             {
00443                 m_relativePath = CloneStr(folderPath);
00444             }
00445
00446             free(dupMem);
00447         }
00448     }
00449
00450     return m_relativePath;
00451 }
00452
00454 // EntnodeFolder
00455
00456 EntnodeFolder::EntnodeFolder(const char* name, EntnodePath* path, const char* vn /*= NULL*/,
00457     const char* ts /*= NULL*/, const char* option /*= NULL*/, const char* tag /*= NULL*/,
00458     const char* date /*= NULL*/, const char* conflict /*= NULL*/) : EntnodeData(name, path)
00459 {
00460 }
00461
00462 EntnodeFolder::~EntnodeFolder()
00463 {
00464 }
00465
00467 const char* EntnodeFolder::operator[](const int index) const
00468 {
00469     return EntnodeData::operator[](index);
00470 }
00471
00473 ent_type EntnodeFolder::GetType() const
00474 {
00475     return ENT_SUBDIR;
00476 }
00477
00479 // ENTNODE
00480
00482 ENTNODE& ENTNODE::operator=(const ENTNODE& anode)
00483 {
00484     EntnodeData* oldData = shareData;
00485     shareData = anode.shareData;
00486
00487     if( shareData != NULL )
00488     {
00489         shareData->Ref();
00490     }
00491
00492     if( oldData != NULL )
00493     {
00494         oldData->UnRef();
00495     }
00496
00497     return *this;
00498 }
00499
00501 // Static functions
00502
00511 static EntnodeData* GetNextEntriesLine(FILE* fpin, const char* path, char* cmd = NULL)
00512 {
00513     EntnodeData* ent;
00514     char* line = NULL;
00515     size_t line_chars_allocated = 0;
00516     register char* cp;
00517     ent_type type;
00518     char* l, *user, *vn, *ts, *option;
00519     char* tag_or_date, *tag, *date, *ts_conflict;
00520     int line_length;
00521
00522     EntnodePath* thePath = new EntnodePath(path);
00523
00524     ent = NULL;
00525     while( (line_length = getline(&line, &line_chars_allocated, fpin)) > 0 )
00526     {
00527         l = line;
00528
00529         /* If CMD is not NULL, we are reading an Entries.Log file.
00530         Each line in the Entries.Log file starts with a single
00531         character command followed by a space.  For backward
00532         compatibility, the absence of a space indicates an add
00533         command.  */
00534         if( cmd != NULL )
00535         {
00536             if( l[1] != ' ' )
00537                 *cmd = 'A';
00538             else
00539             {
00540                 *cmd = l[0];
00541                 l += 2;
00542             }
00543         }
00544
00545         type = ENT_FILE;
00546
00547         if( l[0] == 'D' )
00548         {
00549             type = ENT_SUBDIR;
00550             ++l;
00551             /* An empty D line is permitted; it is a signal that this
00552             Entries file lists all known subdirectories.  */
00553         }
00554
00555         if( l[0] != '/' )
00556             continue;
00557
00558         user = l + 1;
00559         if( (cp = strchr(user, '/')) == NULL )
00560             continue;
00561
00562         *cp++ = '\0';
00563         vn = cp;
00564         if( (cp = strchr(vn, '/')) == NULL )
00565             continue;
00566
00567         *cp++ = '\0';
00568         ts = cp;
00569         if( (cp = strchr(ts, '/')) == NULL )
00570             continue;
00571
00572         *cp++ = '\0';
00573         option = cp;
00574         if( (cp = strchr(option, '/')) == NULL )
00575             continue;
00576
00577         *cp++ = '\0';
00578         tag_or_date = cp;
00579
00580         if( (cp = strchr(tag_or_date, '\n')) == NULL
00581 #ifdef TARGET_OS_MAC
00582             && (cp = strchr(tag_or_date, '\r')) == NULL
00583 #endif
00584         )
00585             continue;
00586
00587         *cp = '\0';
00588         tag = (char*)NULL;
00589         date = (char*)NULL;
00590
00591         if( *tag_or_date == 'T' )
00592             tag = tag_or_date + 1;
00593         else if( *tag_or_date == 'D' )
00594             date = tag_or_date + 1;
00595
00596         if( (ts_conflict = strchr(ts, '+')) )
00597             *ts_conflict++ = '\0';
00598
00599         if( user && strlen(user) )
00600         {
00601             if( type == ENT_SUBDIR )
00602                 ent = NEW EntnodeFolder(user, thePath);
00603             else
00604                 ent = NEW EntnodeFile(user, thePath, vn, ts, option, tag, date, ts_conflict);
00605         }
00606         else
00607         {
00608             continue;
00609         }
00610
00611         break;
00612     }
00613
00614     if( line_length < 0 && !feof(fpin) )
00615         cvs_err("Cannot read entries file (error %d)\n", errno);
00616
00617     free(line);
00618
00619     thePath->UnRef();
00620
00621     return ent;
00622 }
00623
00633 bool Entries_Open(CSortList<ENTNODE>& entries, const char* fullpath)
00634 {
00635     EntnodeData* ent;
00636
00637     UStr adminPath(fullpath);
00638     if( !adminPath.endsWith(kPathDelimiter) )
00639         adminPath << kPathDelimiter;
00640
00641     adminPath << "CVS";
00642     adminPath << kPathDelimiter;
00643
00644     entries.Reset();
00645
00646     UStr filename = adminPath;
00647     filename << "Entries";
00648
00649     FILE* fpin = fopen(filename, "r");
00650     if( fpin == NULL )
00651         return false;
00652
00653     while( (ent = GetNextEntriesLine(fpin, fullpath)) != NULL )
00654     {
00655         ENTNODE newnode(ent);
00656         ent->UnRef();
00657
00658         if( entries.InsideAndInsert(newnode) )
00659         {
00660             cvs_err("Warning : duplicated entry in the 'CVS/Entries' file in directory '%s'\n", fullpath);
00661         }
00662     }
00663
00664     fclose(fpin);
00665
00666     filename = adminPath;
00667     filename << "Entries.log";
00668
00669     fpin = fopen(filename, "r");
00670     if( fpin != NULL )
00671     {
00672         char cmd;
00673
00674         while( (ent = GetNextEntriesLine(fpin, &cmd)) != NULL )
00675         {
00676             ENTNODE newnode(ent);
00677             ent->UnRef();
00678
00679             switch (cmd)
00680             {
00681             case 'A':
00682                 if(entries.InsideAndInsert(newnode))
00683                 {
00684                     // Don't care
00685                 }
00686                 break;
00687             case 'R':
00688                 entries.Delete(newnode);
00689                 break;
00690             default:
00691                 /* Ignore unrecognized commands */
00692                 break;
00693             }
00694         }
00695
00696         fclose(fpin);
00697     }
00698
00699     return true;
00700 }
00701
00709 static bool VerifyUnmodified(const struct stat& sb, const char* ts)
00710 {
00711     char* cp;
00712     struct tm* tm_p;
00713     struct tm local_tm;
00714
00715     /* We want to use the same timestamp format as is stored in the
00716     st_mtime.  For unix (and NT I think) this *must* be universal
00717     time (UT), so that files don't appear to be modified merely
00718     because the timezone has changed.  For VMS, or hopefully other
00719     systems where gmtime returns NULL, the modification time is
00720     stored in local time, and therefore it is not possible to cause
00721     st_mtime to be out of sync by changing the timezone.  */
00722
00723     tm_p = gmtime(&sb.st_mtime);
00724     if( tm_p )
00725     {
00726         memcpy(&local_tm, tm_p, sizeof (local_tm));
00727         cp = asctime(&local_tm);    /* copy in the modify time */
00728     }
00729     else
00730         cp = ctime(&sb.st_mtime);
00731
00732     cp[24] = 0;
00733
00734     /* Deal with the differences in timestamps - POSIX uses space filled, NT uses zero filled */
00735     if( cp[8]=='0' && ts[8]==' ' )
00736         cp[8]=' ';
00737
00738     if( cp[8]==' ' && ts[8]=='0' )
00739         cp[8]='0';
00740
00741     return strcmp(cp, ts) == 0;
00742 }
00743
00748 static void SetEncoding(EntnodeFile* data)
00749 {
00750     if( data )
00751     {
00752         const char* info = (*data)[EntnodeFile::kOption];
00753         if( info != NULL && (strcmp(info, "-kb") == 0 || strcmp(info, "-kB") == 0) )
00754         {
00755             ((EntnodeFile*)data)->SetEncoding(STR_ENCODING_BINARY);
00756         }
00757         else if( info != NULL && strcmp(info, "-ku") == 0 )
00758         {
00759             ((EntnodeFile*)data)->SetEncoding(STR_ENCODING_UNICODE);
00760         }
00761         else
00762         {
00763             ((EntnodeFile*)data)->SetEncoding(STR_ENCODING_TEXT);
00764         }
00765     }
00766 }
00767
00779 EntnodeData* Entries_SetVisited(const char* path, CSortList<ENTNODE>& entries, const char* name,
00780     const struct stat& finfo, bool isFolder, const std::vector<CStr>* ignlist /*= NULL*/)
00781 {
00782     int index;
00783     bool isCvs = false;
00784
00785     EntnodePath* thePath = new EntnodePath(path);
00786
00787     if( isFolder )
00788     {
00789         EntnodeFolder* data = NEW EntnodeFolder(name, thePath);
00790         ENTNODE node(data);
00791         data->UnRef();
00792         isCvs = entries.InsideAndInsert(node, &index);
00793     }
00794     else
00795     {
00796         EntnodeFile* data = NEW EntnodeFile(name, thePath);
00797         ENTNODE node(data);
00798
00799         data->UnRef();
00800         isCvs = entries.InsideAndInsert(node, &index);
00801     }
00802
00803     thePath->UnRef();
00804
00805     const ENTNODE& theNode = entries.Get(index);
00806     EntnodeData* data = theNode.Data();
00807
00808     data->SetVisited(true);
00809
00810     if( !isCvs )
00811     {
00812         data->SetUnknown(true);
00813
00814         if( ignlist != NULL && MatchIgnoredList(name, *ignlist) )
00815             data->SetIgnored(true);
00816
00817         // The folder may have some cvs informations in it, despite the fact
00818         // that it is not referenced by the parent directory, so try to figure it out
00819
00820         if( !data->IsIgnored() )
00821         {
00822             CStr cvsFile(path);
00823             if( !cvsFile.endsWith(kPathDelimiter) )
00824                 cvsFile << kPathDelimiter;
00825
00826             cvsFile << name;
00827             if( !cvsFile.endsWith(kPathDelimiter) )
00828                 cvsFile << kPathDelimiter;
00829
00830             cvsFile << "CVS";
00831             struct stat sb;
00832             if( stat(cvsFile, &sb) != -1 && S_ISDIR(sb.st_mode) )
00833             {
00834                 data->SetUnknown(false);
00835             }
00836         }
00837     }
00838
00839     if( isFolder )
00840     {
00841         if( data->IsIgnored() )
00842         {
00843             data->SetState(STR_STATE_IGNORED);
00844         }
00845         else if( data->IsUnknown() )
00846         {
00847             data->SetState(STR_STATE_UNKNOWN);
00848         }
00849         else
00850         {
00851             data->SetState("");
00852         }
00853     }
00854     else
00855     {
00856         const char* ts = (*data)[EntnodeFile::kTS];
00857         if( ts == NULL )
00858         {
00859             data->SetUnmodified(true);
00860             data->SetResolved(false);
00861         }
00862         else
00863         {
00864             data->SetUnmodified(VerifyUnmodified(finfo, ts));
00865
00866             if( data->GetConflict() != NULL )
00867             {
00868                 data->SetResolved(!VerifyUnmodified(finfo, data->GetConflict()));
00869             }
00870         }
00871
00872 #if defined(WIN32)
00873 #   if ENABLE_WINCVSDEBUG
00874         if( GetWinCvsDebugMaskBit(wcvsdbg_trace_modified_checks_bit) )
00875         {
00876             char scratch[128];
00877
00878             /* copied from VerifyUnmodified... */
00879             char* cp;
00880             struct tm* tm_p;
00881             struct tm local_tm;
00882             tm_p = gmtime(&finfo.st_mtime);
00883             if( tm_p )
00884             {
00885                 memcpy(&local_tm, tm_p, sizeof(local_tm));
00886                 cp = asctime(&local_tm);    /* copy in the modify time */
00887             }
00888             else
00889             {
00890                 cp = "NULL";
00891             }
00892
00893             _snprintf(scratch, 128,
00894                 "Checking timestamps for %s: Entries: %s, file: %s --> %s\n",
00895                 name, ts, cp,
00896                 data->IsUnmodified() ? "unmodified" : "modified");
00897
00898             cvs_err(scratch);
00899             OutputDebugString(scratch);
00900         }
00901 #   endif   // ENABLE_WINCVSDEBUG
00902 #endif
00903
00904         data->SetLocked((finfo.st_mode & S_IWRITE) == 0);
00905
00906         if( data->IsRemoved() )
00907         {
00908             data->SetState(STR_STATE_REMOVED);
00909         }
00910         else if( data->IsIgnored() )
00911         {
00912             data->SetState(STR_STATE_IGNORED);
00913         }
00914         else if( data->IsUnknown() )
00915         {
00916             data->SetState(STR_STATE_UNKNOWN);
00917         }
00918         else if( data->GetConflict() != NULL )
00919         {
00920             data->SetState(data->IsResolved() ? STR_STATE_RESOLVED : STR_STATE_CONFLICT);
00921         }
00922         else if( !data->IsUnmodified() )
00923         {
00924             data->SetState(STR_STATE_MODIFIED);
00925         }
00926
00927         SetEncoding(dynamic_cast<EntnodeFile*>(data));
00928     }
00929
00930     return data;
00931 }
00932
00939 void Entries_SetMissing(CSortList<ENTNODE>& entries)
00940 {
00941     int numEntries = entries.NumOfElements();
00942     for(int i = 0; i < numEntries; i++)
00943     {
00944         const ENTNODE& theNode = entries.Get(i);
00945         EntnodeData* data = theNode.Data();
00946
00947         if( data->IsVisited() )
00948             continue;
00949
00950         data->SetMissing(true);
00951         data->SetState(data->IsRemoved() ? STR_STATE_REMOVED : STR_STATE_MISSING);
00952
00953         SetEncoding(dynamic_cast<EntnodeFile*>(data));
00954     }
00955 }
00956
00963 bool Tag_Open(CStr& tag, const char* fullpath)
00964 {
00965     tag = "";
00966     CStr tagFile(fullpath);
00967     if( !tagFile.endsWith(kPathDelimiter) )
00968         tagFile << kPathDelimiter;
00969
00970     tagFile << "Tag";
00971
00972     FILE* fpin = fopen(tagFile, "r");
00973     if( fpin == NULL )
00974         return false;
00975
00976     char* line = NULL;
00977     size_t line_chars_allocated = 0;
00978     int line_length;
00979     if( (line_length = getline(&line, &line_chars_allocated, fpin)) > 0 )
00980     {
00981         char* tmp = strchr(line, '\n');
00982         if( tmp != NULL )
00983             *tmp = '\0';
00984
00985         if( line[0] == 'T' )
00986             tag = line + 1;
00987     }
00988
00989     if( line != NULL )
00990         free(line);
00991
00992     if( line_length < 0 && !feof(fpin) )
00993     {
00994         cvs_err("Cannot open Tag file in '%s' (error %d)\n", fullpath, errno);
00995         return false;
00996     }
00997
00998     fclose(fpin);
00999
01000     return !tag.empty();
01001 }
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoGraphDiffHandler Member List

This is the complete list of members for KoGraphDiffHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoGraphDiffHandler() | KoGraphDiffHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoGraphDiffHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoGraphDiffHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMaskEdit.cpp Source File

WinCvs/CJLib/CJLibrary/CJMaskEdit.cpp

Go to the documentation of this file.
00001 // CJMaskEdit.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the article "A masked edit control (2)" by Jeremy Davis [jmd@jvf.co.uk]
00006 // http://www.codeguru.com/editctrl/masked_edit2.shtml
00007 //
00009 /****************************************************************************
00010  *
00011  * $Date: 1999/11/30 21:45:49 $
00012  * $Revision: 1.1.1.3 $
00013  * $Archive: /CodeJock/CJLibrary/CJMaskEdit.cpp $
00014  *
00015  * $History: CJMaskEdit.cpp $
00016  *
00017  * *****************  Version 11  *****************
00018  * User: Kirk Stowell Date: 10/30/99   Time: 1:53p
00019  * Updated in $/CodeJock/CJLibrary
00020  * Overrode OnEraseBkgnd(...) and OnPaint(...) to handle flicker free
00021  * drawing.
00022  *
00023  * *****************  Version 10  *****************
00024  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00025  * Updated in $/CodeJock/CJLibrary
00026  * Fixed potential resource and memory leak problems.
00027  *
00028  * *****************  Version 9  *****************
00029  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00030  * Updated in $/CodeJockey/CJLibrary
00031  * Updated copyright and contact information.
00032  *
00033  * *****************  Version 8  *****************
00034  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00035  * Updated in $/CodeJockey/CJLibrary
00036  * Added Unicode compliance, thanks to Barry Burton for his help with
00037  * this.
00038  *
00039  *
00040  * *****************  Version 7  *****************
00041  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00042  * Updated in $/CodeJockey/CJLibrary
00043  *
00044  * *****************  Version 6  *****************
00045  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00046  * Updated in $/CodeJockey/CJLibrary
00047  *
00048  * *****************  Version 5  *****************
00049  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00050  * Updated in $/CodeJockey/CJLibrary
00051  *
00052  * *****************  Version 4  *****************
00053  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00054  * Updated in $/CodeJockey/CJLibrary
00055  *
00056  * *****************  Version 3  *****************
00057  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00058  * Updated in $/CodeJockey/CJLibrary
00059  *
00060  * *****************  Version 2  *****************
00061  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00062  * Updated in $/CodeJockey/CJLibrary
00063  *
00064  * *****************  Version 1  *****************
00065  * User: Kirk Stowell Date: 7/19/99    Time: 12:35a
00066  * Created in $/CodeJockey/CJLibrary
00067  * Initial creation and addition to library.
00068  *
00069  ***************************************************************************/
00071
00072 #include "StdAfx.h"
00073 #include "CJMaskEdit.h"
00074
00075 #ifdef _DEBUG
00076 #define new DEBUG_NEW
00077 #undef THIS_FILE
00078 static char THIS_FILE[] = __FILE__;
00079 #endif
00080
00082 // CCJMaskEdit
00083
00084 CCJMaskEdit::CCJMaskEdit()
00085 {
00086     m_bUseMask              = true;
00087     m_bMaskKeyInProgress    = false;
00088     m_strWindowText         = _T("");
00089     m_strMask               = _T("");
00090     m_strLiteral            = _T("");
00091     m_strValid              = _T("");
00092     m_strMaskLiteral        = _T("");
00093 }
00094
00095 CCJMaskEdit::~CCJMaskEdit()
00096 {
00097     // fix potential resource leak - KStowell - 10-22-99.
00098     m_Font.DeleteObject();
00099 }
00100
00101 IMPLEMENT_DYNAMIC(CCJMaskEdit, CEdit)
00102
00103 BEGIN_MESSAGE_MAP(CCJMaskEdit, CEdit)
00104     //{{AFX_MSG_MAP(CCJMaskEdit)
00105     ON_WM_KEYDOWN()
00106     ON_WM_CHAR()
00107     ON_WM_ERASEBKGND()
00108     ON_WM_PAINT()
00109     //}}AFX_MSG_MAP
00110 END_MESSAGE_MAP()
00111
00113 // CCJMaskEdit message handlers
00114
00115 void CCJMaskEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00116 {
00117     if( m_bUseMask )
00118     {
00119         switch( nChar )
00120         {
00121         case VK_DELETE:
00122         case VK_INSERT: return;
00123         }
00124     }
00125
00126     CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
00127 }
00128
00129 void CCJMaskEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
00130 {
00131     if( !m_bMaskKeyInProgress ) {
00132         if( !CheckChar( nChar )) {
00133             return;
00134         }
00135     }
00136
00137     if( m_bUseMask )
00138     {
00139         int nStartPos;
00140         int nEndPos;
00141         GetSel( nStartPos, nEndPos );
00142
00143         if( isprint( nChar ))
00144         {
00145             SetSel( nStartPos, nEndPos+1 );
00146
00147             Clear();
00148
00149             m_strWindowText.SetAt( nEndPos, static_cast<TCHAR>(nChar));
00150         }
00151         else if( nChar == VK_BACK )
00152         {
00153             if(( nStartPos == nEndPos ) &&
00154                ( nStartPos >= 1 ) &&
00155                ( nStartPos <= m_strWindowText.GetLength( )))
00156             {
00157                 UINT c = 0x20;
00158
00159                 // get the masked literal representation.
00160                 if( m_strMaskLiteral.IsEmpty() == FALSE )
00161                 {
00162                     c = m_strMaskLiteral[ nStartPos - 1 ];
00163                 }
00164
00165                 // backspace the cursor.
00166                 SendMessage( WM_KEYDOWN, VK_LEFT, 0 );
00167
00168                 if( m_strMaskLiteral.IsEmpty() == FALSE )
00169                 {
00170                     // update the char backspacing over.
00171                     SendChar( c );
00172
00173                     // backspace the cursor again.
00174                     SendMessage( WM_KEYDOWN, VK_LEFT, 0 );
00175                 }
00176             }
00177             else
00178             {
00179                 MessageBeep((UINT)-1);
00180             }
00181
00182             return;
00183         }
00184     }
00185
00186     CEdit::OnChar(nChar, nRepCnt, nFlags);
00187
00188     if( !m_bMaskKeyInProgress && m_bUseMask && !m_strLiteral.IsEmpty( ))
00189     {
00190         int nStartPos;
00191         int nEndPos;
00192         GetSel( nStartPos, nEndPos );
00193
00194         // make sure the string is not longer than the mask
00195         if( nEndPos < m_strLiteral.GetLength( ))
00196         {
00197             UINT c = m_strLiteral.GetAt( nEndPos );
00198             if (c != '_') {
00199                 SetSel( nEndPos+1, nEndPos+1 );
00200             }
00201         }
00202     }
00203 }
00204
00205 bool CCJMaskEdit::CheckChar(UINT nChar)
00206 {
00207     // do not use mask
00208     if( !m_bUseMask ) {
00209         return true;
00210     }
00211
00212     // control character, OK
00213     if( !isprint( nChar )) {
00214         return true;
00215     }
00216
00217     // unselect all selections, if any
00218     int nStartPos, nEndPos;
00219     GetSel( nStartPos, nEndPos );
00220     SetSel( -1, 0 );
00221
00222     // advance to the first character input position.
00223     for( nStartPos; nStartPos < m_strLiteral.GetLength(); ++nStartPos )
00224     {
00225         if( m_strLiteral.GetAt( nStartPos ) == '_' ) {
00226             SetSel( nStartPos, nStartPos );
00227             break;
00228         }
00229     }
00230
00231     // check the key against the mask
00232     GetSel( nStartPos, nEndPos );
00233
00234     // make sure the string is not longer than the mask
00235     if( nEndPos >= m_strMask.GetLength( )) {
00236         MessageBeep((UINT)-1);
00237         return false;
00238     }
00239
00240     // check to see if a literal is in this position
00241     UINT c = '_';
00242     if( !m_strLiteral.IsEmpty( )) {
00243         c = m_strLiteral.GetAt( nEndPos );
00244     }
00245
00246     if( c != '_' ) {
00247         SendChar( c );
00248         GetSel( nStartPos, nEndPos );
00249     }
00250
00251     // check the valid string character
00252     if( m_strValid.Find( static_cast<TCHAR>(nChar)) != -1 ) {
00253         return true;
00254     }
00255
00256     if( ProcessMask( nChar, nEndPos ))
00257         return true;
00258
00259     MessageBeep((UINT)-1);
00260     return false;
00261 }
00262
00263 void CCJMaskEdit::SendChar(UINT nChar)
00264 {
00265     m_bMaskKeyInProgress = true;
00266 #ifdef WIN32
00267     AfxCallWndProc(this, m_hWnd, WM_CHAR, nChar, 1);
00268 #else
00269     SendMessage(WM_CHAR, nChar, 1);
00270 #endif
00271     m_bMaskKeyInProgress = false;
00272 }
00273
00274 bool CCJMaskEdit::ProcessMask(UINT nChar, int nEndPos)
00275 {
00276     // check the key against the mask
00277     switch( m_strMask.GetAt( nEndPos ))
00278     {
00279     case '0':       // digit only //completely changed this
00280         {
00281             if( isdigit( nChar )) {
00282                 return true;
00283             }
00284             break;
00285         }
00286     case '9':       // digit or space
00287         {
00288             if( isdigit( nChar )) {
00289                 return true;
00290             }
00291             if( nChar == VK_SPACE ) {
00292                 return true;
00293             }
00294             break;
00295         }
00296     case '#':       // digit or space or '+' or '-'
00297         {
00298             if( isdigit( nChar )) {
00299                 return true;
00300             }
00301             if( nChar == VK_SPACE || nChar == VK_ADD || nChar == VK_SUBTRACT ) {
00302                 return true;
00303             }
00304             break;
00305         }
00306     case 'L':       // alpha only
00307         {
00308             if( isalpha( nChar )) {
00309                 return true;
00310             }
00311             break;
00312         }
00313     case '?':       // alpha or space
00314         {
00315             if( isalpha( nChar )) {
00316                 return true;
00317             }
00318             if( nChar == VK_SPACE ) {
00319                 return true;
00320             }
00321             break;
00322         }
00323     case 'A':       // alpha numeric only
00324         {
00325             if( isalnum( nChar )) {
00326                 return true;
00327             }
00328             break;
00329         }
00330     case 'a':       // alpha numeric or space
00331         {
00332             if( isalnum( nChar )) {
00333                 return true;
00334             }
00335             if( nChar == VK_SPACE ) {
00336                 return true;
00337             }
00338             break;
00339         }
00340     case '&':       // all print character only
00341         {
00342             if( isprint( nChar )) {
00343                 return true;
00344             }
00345             break;
00346         }
00347     case 'H':       // hex digit
00348         {
00349             if( isxdigit( nChar )) {
00350                 return true;
00351             }
00352             break;
00353         }
00354     case 'X':       // hex digit or space
00355         {
00356             if( isxdigit( nChar )) {
00357                 return true;
00358             }
00359             if( nChar == VK_SPACE ) {
00360                 return true;
00361             }
00362             break;
00363         }
00364     }
00365
00366     return false;
00367 }
00368
00369 void CCJMaskEdit::SetEditMask(LPCTSTR lpszMask, LPCTSTR lpszLiteral, LPCTSTR lpszWindowText)
00370 {
00371     ASSERT(lpszMask);
00372     ASSERT(lpszLiteral);
00373     ASSERT(lpszWindowText);
00374
00375     // initialize the mask for the control.
00376     m_strMask        = lpszMask;
00377     m_strLiteral     = lpszLiteral;
00378     m_strWindowText  = lpszWindowText;
00379     m_strMaskLiteral = m_strWindowText;
00380
00381     // set the window text for the control.
00382     SetWindowText( lpszWindowText );
00383
00384     // initialize the font used by the control.
00385     UpdateFont();
00386 }
00387
00389 // DDX for date mask control
00390
00391 void AFXAPI DDX_OleDateTime(CDataExchange* pDX, int nIDC, CCJDateEdit& rControl, COleDateTime& rDateTime)
00392 {
00393     DDX_Control( pDX, nIDC, rControl );
00394
00395     if( pDX->m_bSaveAndValidate ) {
00396         rDateTime = rControl.GetDateTime();
00397     }
00398     else {
00399         rControl.SetDateTime( rDateTime );
00400     }
00401 }
00402
00404 // CCJDateEdit class
00405
00406 IMPLEMENT_DYNAMIC(CCJDateEdit, CCJMaskEdit)
00407
00408 CCJDateEdit::CCJDateEdit()
00409 {
00410     m_bUseMask      = true;
00411     m_strMask       = _T("00/00/0000");
00412     m_strLiteral    = _T("__/__/____");
00413 }
00414
00415 COleDateTime CCJDateEdit::ReadOleDateTime(LPCTSTR lpszData)
00416 {
00417     COleDateTime dt;
00418     dt.ParseDateTime(lpszData);
00419     return dt;
00420 }
00421
00422 void CCJDateEdit::FormatOleDateTime(CString &strData, COleDateTime dt)
00423 {
00424     strData = dt.Format( _T("%d/%m/%Y"));
00425 }
00426
00427 void CCJDateEdit::SetDateTime(COleDateTime& dt)
00428 {
00429     CString strText;
00430     FormatOleDateTime(strText, dt);
00431     m_strWindowText = m_strMaskLiteral = strText;
00432     SetWindowText(strText);
00433 }
00434
00435 void CCJDateEdit::SetDateTime(CString strDate)
00436 {
00437     m_strWindowText = m_strMaskLiteral = strDate;
00438     SetWindowText(strDate);
00439 }
00440
00441 COleDateTime CCJDateEdit::GetDateTime()
00442 {
00443     CString strText;
00444     GetWindowText(strText);
00445     return ReadOleDateTime(strText);
00446 }
00447
00448 CString CCJDateEdit::GetWindowDateTime()
00449 {
00450     CString strText;
00451     GetWindowText(strText);
00452     return strText;
00453 }
00454
00455 bool CCJDateEdit::ProcessMask(UINT nChar, int nEndPos)
00456 {
00457     // check the key against the mask
00458     switch( m_strMask.GetAt( nEndPos ))
00459     {
00460     case '0':       // digit only //completely changed this
00461         {
00462             bool bReturn = true;
00463
00464             if( isdigit( nChar ))
00465             {
00466                 if( nEndPos == 0 )
00467                 {
00468                     if( nChar > '3' ) {
00469                         bReturn = false;
00470                     }
00471                 }
00472                 else if( nEndPos == 1 )
00473                 {
00474                     if( m_strWindowText.GetAt(0) == '3' )
00475                     {
00476                         if( nChar > '1' ) {
00477                             bReturn = false;
00478                         }
00479                     }
00480                 }
00481                 else if( nEndPos == 3 )
00482                 {
00483                     if( nChar > '1' ) {
00484                         bReturn = false;
00485                     }
00486                 }
00487                 else if( nEndPos == 4 )
00488                 {
00489                     if( m_strWindowText.GetAt(3) == '1' )
00490                     {
00491                         if( nChar > '2') {
00492                             bReturn = false;
00493                         }
00494                     }
00495                 }
00496                 return bReturn;
00497             }
00498             break;
00499         }
00500     }
00501
00502     MessageBeep((UINT)-1);
00503     return false;
00504 }
00505
00507 // CCJTimeEdit class
00508
00509 IMPLEMENT_DYNAMIC(CCJTimeEdit, CCJDateEdit)
00510
00511 CCJTimeEdit::CCJTimeEdit()
00512 {
00513     m_bUseMask      = true;
00514     m_strMask       = _T("00:00");
00515     m_strLiteral    = _T("__:__");
00516     m_strHours      = _T("47");
00517     m_strMins       = _T("59");
00518 }
00519
00520 void CCJTimeEdit::FormatOleDateTime(CString &strData, COleDateTime dt)
00521 {
00522     if( dt.m_dt == 0 ) {
00523         strData = "00:00";
00524     }
00525     else {
00526         strData = dt.Format( _T("%H:%M"));
00527     }
00528 }
00529
00530 bool CCJTimeEdit::ProcessMask(UINT nChar, int nEndPos)
00531 {
00532     // check the key against the mask
00533     switch( m_strMask.GetAt( nEndPos ))
00534     {
00535     case '0':       // digit only //completely changed this
00536         {
00537             bool bReturn = true;
00538
00539             if( isdigit( nChar ))
00540             {
00541                 if( nEndPos == 0 )
00542                 {
00543                     if(nChar > (UINT)m_strHours[0]) {
00544                         bReturn = false;
00545                     }
00546                 }
00547                 else if( nEndPos == 1 )
00548                 {
00549                     if(m_strWindowText.GetAt(0) == m_strHours[0])
00550                     {
00551                         if( nChar > (UINT)m_strHours[1] ) {
00552                             bReturn = false;
00553                         }
00554                     }
00555                 }
00556                 else if( nEndPos == 3 )
00557                 {
00558                     if( nChar > (UINT)m_strMins[0] ) {
00559                         bReturn = false;
00560                     }
00561                 }
00562                 else if( nEndPos == 4 )
00563                 {
00564                     if( m_strWindowText.GetAt(3) == m_strMins[0] )
00565                     {
00566                         if( nChar > (UINT)m_strMins[1] ) {
00567                             bReturn = false;
00568                         }
00569                     }
00570                 }
00571                 return bReturn;
00572             }
00573             break;
00574         }
00575     }
00576
00577     MessageBeep((UINT)-1);
00578     return false;
00579 }
00580
00581 void CCJTimeEdit::SetHours(int nHours)
00582 {
00583     m_strHours.Format( _T("%d"), nHours);
00584 }
00585
00586 void CCJTimeEdit::SetMins(int nMins)
00587 {
00588     m_strMins.Format( _T("%d"), nMins);
00589 }
00590
00591 void CCJMaskEdit::UpdateFont()
00592 {
00593     m_Font.DeleteObject();
00594     NONCLIENTMETRICS ncm;
00595     ncm.cbSize = sizeof(ncm);
00596     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00597     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00598     SetFont(&m_Font);
00599 }
00600
00601 BOOL CCJMaskEdit::OnEraseBkgnd(CDC* pDC)
00602 {
00603     // KStowell - overridden for flicker-free drawing.
00604     UNUSED_ALWAYS(pDC);
00605     return TRUE;
00606 }
00607
00608 void CCJMaskEdit::OnPaint()
00609 {
00610     // Use a "Offscreen" DC to fill rect and send to DefWindowProc...
00611     CClientDC memDC(this);
00612
00613     CRect rcClip;
00614     GetClientRect(&rcClip);
00615     memDC.FillSolidRect(rcClip, ::GetSysColor(COLOR_WINDOW));
00616     DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, (LPARAM)0 );
00617
00618     // Default is called for cleanup.
00619     Default();
00620 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCOLOR Member List

This is the complete list of members for UCOLOR, including all inherited members.

b | UCOLOR |
g | UCOLOR |
r | UCOLOR |
UCOLOR() | UCOLOR | [inline]
UCOLOR(char _r, char _g, char _b) | UCOLOR | [inline]

Generated on Sat Aug 7 22:50:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/BrowseFileView.h Source File

WinCvs/BrowseFileView.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * BrowseFileView.h -- Implements the view with all the files
00023  *
00024  * FILTER-VIEW-DEV branch, last merged up to 1.22
00025  */
00026
00027 #if !defined(AFX_BROWSEFILEVIEW_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00028 #define AFX_BROWSEFILEVIEW_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00029
00030 #if _MSC_VER >= 1000
00031 #pragma once
00032 #endif // _MSC_VER >= 1000
00033
00034 #include "CvsEntries.h"
00035 #include "CPStr.h"
00036 #include "SortHeaderCtrl.h"
00037 #include "FileTraversal.h"
00038
00039 #define STR_FILEDETAILVIEW_COLUMN_SECTION       "FileDetailView"
00040 #define STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH   "Column Widths"
00041 #define STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER   "Column Order"
00042 #define CHR_FILEDETAILVIEW_COLUMN_DATASEP       ','
00043 #define STR_FILEDETAILVIEW_COLUMN_PREFIX_REG    "Regular "
00044 #define STR_FILEDETAILVIEW_COLUMN_PREFIX_FLAT   "Flat "
00045
00046 class MultiFiles;
00047 class KoWatcher;
00048 class KiSelectionHandler;
00049 class KiColumnModel;
00050 class KiFilterModel;
00051 class CBrowseFileView;
00052
00054 enum
00055 {
00056     kFileIconText = 0,
00057     kFileIconBinary,
00058     kFileIconUnknown,
00059     kFileIconAdded,
00060     kFileIconConflict,
00061     kFileIconMiss,
00062     kFolderIcon,
00063     kFolderIconUnknown,
00064     kFolderIconMiss,
00065     kFileIconTextMod,
00066     kFileIconBinaryMod,
00067     kFileIconIgnored,
00068     kFolderIconIgnored,
00069     kFileIconRemoved,
00070     kFileIconBinaryAdded,
00071     kFileIconUnicode,
00072     kFileIconUnicodeMod,
00073     kFileIconUnicodeAdded
00074 };
00075
00077 // CRecursionLock
00078
00080 class CRecursionLock
00081 {
00082 public:
00083     // Construction
00084     CRecursionLock(bool& semaphore) ;
00085     virtual ~CRecursionLock();
00086
00087 private:
00088     // Data members
00089     bool& m_semaphore;
00090 };
00091
00093 // KoFileViewTraversalContext
00094
00096 class KoFileViewTraversalContext
00097 {
00098 public:
00099     // Construction
00100     KoFileViewTraversalContext(CBrowseFileView* view);
00101
00102 private:
00103     // Data members
00104     bool m_isRecursive;
00105     bool m_isShowIgnored;
00106     KiFilterModel* m_filter;
00108     CBrowseFileView* m_view;
00110 public:
00111     // Interface
00112     bool IsRecursive() const;
00113     bool IsShowIgnored() const;
00114     bool IsShowUnknown() const;
00115     bool IsHideUnknown() const;
00116     bool IsShowMissing() const;
00117     bool IsShowModified() const;
00118
00119     bool IsMatch(EntnodeData* data) const;
00120
00121     CBrowseFileView* GetView() const;
00122 };
00123
00125 // TViewFill
00126
00128 class TViewFill : public TraversalReport
00129 {
00130 public:
00131     // Construction
00132     TViewFill(const KoFileViewTraversalContext* context);
00133
00134 private:
00135     // Data members
00136     CSortList<ENTNODE> m_entries;
00137     vector<CStr> m_ignlist;
00138     const KoFileViewTraversalContext* m_context;
00140 public:
00141     // Interface
00142     int InitItem(EntnodeData* data, int iImage, const char* tag = 0L);
00143
00144     virtual kTraversal EnterDirectory(const char* fullpath, const char* dirname, const FSSpec* macspec);
00145     virtual kTraversal ExitDirectory(const char* fullpath);
00146     virtual kTraversal OnError(const char* err, int errcode);
00147     virtual kTraversal OnIdle(const char* fullpath);
00148
00149     virtual kTraversal OnDirectory(const char* fullpath, const char* fullname, const char* name,
00150         const struct stat& dir, const FSSpec* macspec);
00151
00152     virtual kTraversal OnAlias(const char* fullpath, const char* fullname, const char* name,
00153         const struct stat& dir, const FSSpec* macspec);
00154
00155     virtual kTraversal OnFile(const char* fullpath, const char* fullname, const char* name,
00156         const struct stat& dir, const FSSpec* macspec);
00157 };
00158
00159
00161 // CBrowseFileView
00162
00163 class CBrowseFileView : public CListView
00164 {
00165 protected: // create from serialization only
00166     CBrowseFileView();
00167     DECLARE_DYNCREATE(CBrowseFileView)
00168
00169 // Operations
00170 public:
00171
00172 // Overrides
00173     // ClassWizard generated virtual function overrides
00174     //{{AFX_VIRTUAL(CBrowseFileView)
00175     public:
00176     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00177     protected:
00178     virtual void OnInitialUpdate(); // called first time after construct
00179     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00180     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00181     virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
00182     //}}AFX_VIRTUAL
00183
00184 // Implementation
00185 public:
00186     virtual ~CBrowseFileView();
00187 #ifdef _DEBUG
00188     virtual void AssertValid() const;
00189     virtual void Dump(CDumpContext& dc) const;
00190 #endif
00191
00192 // Generated message map functions
00193 protected:
00194     //{{AFX_MSG(CBrowseFileView)
00195     afx_msg void OnViewSmallIcons();
00196     afx_msg void OnViewList();
00197     afx_msg void OnViewFullRowDetails();
00198     afx_msg void OnUpdateViewSmallIcons(CCmdUI* pCmdUI);
00199     afx_msg void OnUpdateViewAdd(CCmdUI* pCmdUI);
00200     afx_msg void OnUpdateViewAddB(CCmdUI* pCmdUI);
00201     afx_msg void OnUpdateViewUpdate(CCmdUI* pCmdUI);
00202     afx_msg void OnUpdateViewRelease(CCmdUI* pCmdUI);
00203     afx_msg void OnUpdateViewRmv(CCmdUI* pCmdUI);
00204     afx_msg void OnUpdateViewGraph(CCmdUI* pCmdUI);
00205     afx_msg void OnUpdateViewList(CCmdUI* pCmdUI);
00206     afx_msg void OnUpdateViewEditseldef(CCmdUI* pCmdUI);
00207     afx_msg void OnUpdateViewFullRowDetails(CCmdUI* pCmdUI);
00208     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00209     afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
00210     afx_msg void OnViewAdd();
00211     afx_msg void OnViewAddb();
00212     afx_msg void OnViewCommit();
00213     afx_msg void OnViewRmv();
00214     afx_msg void OnViewUpdate();
00215     afx_msg void OnViewQueryUpdate();
00216     afx_msg void OnUpdateViewReload(CCmdUI* pCmdUI);
00217     afx_msg void OnViewReload();
00218     afx_msg void OnKeydown(NMHDR* pNMHDR, LRESULT* pResult);
00219     afx_msg void OnViewUpone();
00220     afx_msg void OnUpdateViewUpone(CCmdUI* pCmdUI);
00221     afx_msg void OnViewTrash();
00222     afx_msg void OnUpdateViewTrash(CCmdUI* pCmdUI);
00223     afx_msg void OnViewDiff();
00224     afx_msg void OnViewLog();
00225     afx_msg void OnViewGraph();
00226     afx_msg void OnViewStatus();
00227     afx_msg void OnViewUnlock();
00228     afx_msg void OnViewWatchOn();
00229     afx_msg void OnViewWatchOff();
00230     afx_msg void OnViewEdit();
00231     afx_msg void OnViewUnedit();
00232     afx_msg void OnViewWatchers();
00233     afx_msg void OnViewEditors();
00234     afx_msg void OnViewRelease();
00235     afx_msg void OnViewTagNew();
00236     afx_msg void OnViewTagDelete();
00237     afx_msg void OnViewTagBranch();
00238     afx_msg void OnViewExplore();
00239     afx_msg void OnUpdateViewExplore(CCmdUI* pCmdUI);
00240     afx_msg void OnViewNewInstance();
00241     afx_msg void OnTimer(UINT nIDEvent);
00242     afx_msg void OnViewEditsel();
00243     afx_msg void OnViewEditseldef();
00244     afx_msg void OnViewOpensel();
00245     afx_msg void OnViewOpenselas();
00246     afx_msg void OnViewCheckout();
00247     afx_msg void OnUpdateViewCheckout(CCmdUI* pCmdUI);
00248     afx_msg void OnViewImport();
00249     afx_msg void OnUpdateViewImport(CCmdUI* pCmdUI);
00250     afx_msg void OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult);
00251     afx_msg void OnBeginrdrag(NMHDR* pNMHDR, LRESULT* pResult);
00252     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00253     afx_msg void OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult);
00254     afx_msg void OnDestroy();
00255     afx_msg void OnUpdateViewAnnotate(CCmdUI* pCmdUI);
00256     afx_msg void OnAnnotate();
00257     afx_msg void OnEditSelectAll();
00258     afx_msg void OnViewReservededit();
00259     afx_msg void OnViewForceedit();
00260     afx_msg void OnViewAddu();
00261     afx_msg void OnAppCmdline();
00262     afx_msg void OnUpdateCvsCmd(CCmdUI* pCmdUI);
00263     afx_msg void OnAppRtagbranch();
00264     afx_msg void OnAppRtagcreate();
00265     afx_msg void OnAppRtagdelete();
00266     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00267     afx_msg void OnViewFilterbarEnable();
00268     afx_msg void OnViewFilterbarClearall();
00269     afx_msg void OnViewFilterbarOptions();
00270     afx_msg void OnItemchanged(NMHDR* pNMHDR, LRESULT* pResult);
00271     afx_msg void OnDeleteallitems(NMHDR* pNMHDR, LRESULT* pResult);
00272     afx_msg void OnQueryShellactionDefault();
00273     afx_msg void OnQueryProperties();
00274     afx_msg void OnUpdateQueryProperties(CCmdUI* pCmdUI);
00275     //}}AFX_MSG
00276     afx_msg void OnUpdateMacro(CCmdUI* pCmdUI);
00277     afx_msg BOOL OnMacro(UINT nID);
00278     afx_msg void OnUpdateCustomize(CCmdUI* pCmdUI);
00279     afx_msg BOOL OnCustomize(UINT nID);
00280     afx_msg LRESULT OnFileChange(WPARAM, LPARAM);
00281     afx_msg LRESULT OnResetView(WPARAM, LPARAM);
00282
00283     DECLARE_MESSAGE_MAP()
00284 private:
00285     // Data members
00286     CStr m_path;
00288     int m_numberOfLines;
00289     int m_numberByPages;
00290     int m_numberOfPages;
00291     int m_heightOfLines;
00293     bool m_isRecursive;
00294     bool m_isResetViewLocked;
00295     bool m_isResetViewPending;
00297     bool m_checkChanges;
00298     KoWatcher* m_watch;
00299     time_t m_entriesMod;
00300     time_t m_entriesLogMod;
00301     bool m_isFilesChange;
00302     UINT m_uiFilechangeTimer;
00304     CSortHeaderCtrl m_ctrlHeader;
00305     int m_sort;
00306     bool m_ascendant;
00308     KiColumnModel* m_modelColumns;
00309     std::map<int, std::string> m_filterBarFilters;
00311     static CImageList m_smallImageList;
00312     static CImageList m_stateImageList;
00314     // Methods
00315     void Resort(void);
00316
00317     BOOL SetViewType(DWORD dwViewType);
00318     DWORD GetViewType() const;
00319
00320     void GetEntriesModTime(time_t& newEntriesMod, time_t& newEntriesLogMod);
00321
00322     void EnterFolder(const char* fullpath);
00323
00324     void DoDrag();
00325     void SetRecursive(bool isRecursive);
00326
00327     bool ProcessSelectionCommand(KiSelectionHandler* handler);
00328
00329     bool DisableCommon(bool bCheckSelection = true);
00330
00331     CString FormatEntrryPrefix(bool isRecursive) const;
00332     void SaveColumns(bool isRecursive);
00333     bool LoadColumns(bool isRecursive);
00334     void AddColumns();
00335     void DeleteColumns();
00336
00337     int GetPathLength(LPCTSTR path);
00338     bool IsSamePath(LPCTSTR path1, LPCTSTR path2);
00339
00340 public:
00341     // Interface
00342     inline const CStr& GetPath() const;
00343
00344     inline KiColumnModel* GetColumnModel() const;
00345     inline void CheckChanges(void);
00346
00347     void OnFilteringChanged();
00348     void OnFilterBarChanged();
00349
00350     void ResetView(bool notifyBrowser = false, const char* selectFile = 0L);
00351     void ResetView(const char* path, bool notifyBrowser = false, const char* selectFile = 0L);
00352
00353     static int GetImageForEntry(EntnodeData* data);
00354 };
00355
00357 // Inline implementation
00358
00360 const CStr& CBrowseFileView::GetPath() const
00361 {
00362     return m_path;
00363 }
00364
00366 inline KiColumnModel* CBrowseFileView::GetColumnModel() const
00367 {
00368     return m_modelColumns;
00369 }
00370
00372 inline void CBrowseFileView::CheckChanges(void)
00373 {
00374     m_checkChanges = true;
00375 }
00376
00377 #endif // !defined(AFX_BROWSEFILEVIEW_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphView.cpp Source File

WinCvs/GraphView.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 // GraphView.cpp : implementation file
00018 //
00019
00020 #include "stdafx.h"
00021 #include "wincvs.h"
00022 #include "GraphView.h"
00023 #include "GraphDoc.h"
00024 #include "AppConsole.h"
00025 #include "LogParse.h"
00026 #include "CvsEntries.h"
00027 #include "BrowseFileView.h"
00028 #include "WinCvsBrowser.h"
00029 #include "CvsArgs.h"
00030 #include "WincvsView.h"
00031 #include "CvsPrefs.h"
00032 #include "PromptFiles.h"
00033 #include "FileTraversal.h"
00034 #include "ProgressDlg.h"
00035 #include "GraphOptDlg.h"
00036 #include "AdminOptionDlg.h"
00037 #include "CvsAlert.h"
00038 #include "CvsCommands.h"
00039 #include "MultiFiles.h"
00040 #include "BrowseViewHandlers.h"
00041 #include "wincvs_winutil.h"
00042 #include "LaunchHandlers.h"
00043
00044 #ifdef _DEBUG
00045 #define new DEBUG_NEW
00046 #undef THIS_FILE
00047 static char THIS_FILE[] = __FILE__;
00048 #endif
00049
00050 // Persistent settings
00051 CPersistentInt gGraphSelColor("P_GraphSelColor", RGB_DEF_SEL);
00052 CPersistentInt gGraphShadowColor("P_GraphShadowColor", RGB_DEF_SHADOW);
00053 CPersistentInt gGraphHeaderColor("P_GraphHeaderColor", RGB_DEF_HEADER);
00054 CPersistentInt gGraphTagColor("P_GraphTagColor", RGB_DEF_TAG);
00055 CPersistentInt gGraphBranchColor("P_GraphBranchColor", RGB_DEF_BRANCH);
00056 CPersistentInt gGraphNodeColor("P_GraphNodeColor", RGB_DEF_NODE);
00057 CPersistentInt gGraphDeadNodeColor("P_GraphDeadNodeColor", RGB_DEF_DEADNODE);
00058 CPersistentInt gGraphUserStateNodeColor("P_GraphUserStateNodeColor", RGB_DEF_USERSTATENODE);
00059 CPersistentInt gGraphMergeColor("P_GraphMergeColor", RGB_DEF_MERGE);
00060
00061 const int kVChildSpace = 8;
00062 const int kHChildSpace = 40;
00063 const int kInflateNodeSpace = 8;
00070 static void DrawOctangle(CDC& dc, const CRect& selfB)
00071 {
00072     int cutLen = selfB.Height() / 4;
00073     CPoint point1(selfB.left, selfB.top + cutLen);
00074     CPoint point2(selfB.left + cutLen, selfB.top);
00075     CPoint point3(selfB.right - cutLen, selfB.top);
00076     CPoint point4(selfB.right, selfB.top + cutLen);
00077     CPoint point5(selfB.right, selfB.bottom - cutLen);
00078     CPoint point6(selfB.right - cutLen, selfB.bottom);
00079     CPoint point7(selfB.left + cutLen, selfB.bottom);
00080     CPoint point8(selfB.left, selfB.bottom - cutLen);
00081     CPoint arrPoints[OCTANGLE_COUNT] = {
00082         point1,
00083         point2,
00084         point3,
00085         point4,
00086         point5,
00087         point6,
00088         point7,
00089         point8};
00090
00091     dc.Polygon(arrPoints, OCTANGLE_COUNT);
00092 }
00093
00103 static void DrawNode(CDC& dc, const CRect& selfB,
00104                      COLORREF contour,
00105                      kNodeShape shape, bool isSel, int penStyle = PS_SOLID)
00106 {
00107     CPen* pOldPen = 0L;
00108     CBrush* pOldBrush = 0L;
00109     CPen pen, pen2;
00110     CBrush brush;
00111     COLORREF selcolor = gGraphSelColor;
00112     COLORREF shadowc = gGraphShadowColor;
00113
00114     TRY
00115     {
00116         // Prepare the shadow
00117         CRect shadow = selfB;
00118         shadow.OffsetRect(SHADOW_OFFSET_PT);
00119
00120         brush.CreateSolidBrush(shadowc);
00121         pOldBrush = dc.SelectObject(&brush);
00122         pen.CreatePen(penStyle, 1, shadowc);
00123         pOldPen = dc.SelectObject(&pen);
00124
00125         // Draw the shadow
00126         switch( shape )
00127         {
00128         case kRectangle:
00129             dc.Rectangle(shadow);
00130             break;
00131         case kRoundRect:
00132             dc.RoundRect(shadow, ROUND_RECT_PT);
00133             break;
00134         case kOctangle:
00135             DrawOctangle(dc, shadow);
00136             break;
00137         default:
00138             ASSERT(FALSE);  //unknown type
00139             return;
00140         }
00141
00142         // Prepare selection
00143         if( isSel )
00144         {
00145             brush.DeleteObject();
00146             brush.CreateSolidBrush(selcolor);
00147             dc.SelectObject(&brush);
00148         }
00149         else
00150         {
00151             dc.SelectObject(pOldBrush);
00152             pOldBrush = 0L;
00153         }
00154
00155         pen2.CreatePen(penStyle, 1, contour);
00156         dc.SelectObject(&pen2);
00157
00158         // Draw the main shape
00159         switch( shape )
00160         {
00161         case kRectangle:
00162             dc.Rectangle(selfB);
00163             break;
00164         case kRoundRect:
00165             dc.RoundRect(selfB, ROUND_RECT_PT);
00166             break;
00167         case kOctangle:
00168             DrawOctangle(dc, selfB);
00169             break;
00170         default:
00171             ASSERT(FALSE);  //unknown type
00172             return;
00173         }
00174
00175         // Cleanup
00176         if( pOldPen != 0L )
00177         {
00178             dc.SelectObject(pOldPen);
00179             pOldPen = 0L;
00180         }
00181
00182         if( pOldBrush != 0L )
00183         {
00184             dc.SelectObject(pOldBrush);
00185             pOldBrush = 0L;
00186         }
00187
00188         pen.DeleteObject();
00189         pen2.DeleteObject();
00190         brush.DeleteObject();
00191     }
00192     CATCH_ALL(e)
00193     {
00194         if( pOldPen != 0L )
00195             dc.SelectObject(pOldPen);
00196
00197         if( pOldBrush != 0L )
00198             dc.SelectObject(pOldBrush);
00199     }
00200     END_CATCH_ALL
00201 }
00202
00204 // CWinLogData
00205
00206 CWinLogData::CWinLogData(CLogNode* node) : CLogNodeData(node)
00207 {
00208     selfB.SetRectEmpty();
00209     totB.SetRectEmpty();
00210     sel = false;
00211 }
00212
00213 CWinLogData::~CWinLogData()
00214 {
00215 }
00216
00222 CWinLogData* CWinLogData::GetData(CLogNode* node)
00223 {
00224     return (CWinLogData*)node->GetUserData();
00225 }
00226
00231 kLogNode CWinLogData::GetType(void) const
00232 {
00233     return fNode->GetType();
00234 }
00235
00240 const char* CWinLogData::GetStr(void)
00241 {
00242     switch(GetType())
00243     {
00244     case kNodeHeader:
00245         {
00246             CLogNodeHeader& header = *(CLogNodeHeader*)fNode;
00247             return (*header).WorkingFile();
00248             break;
00249         }
00250     case kNodeBranch:
00251         {
00252             CLogNodeBranch& branch = *(CLogNodeBranch*)fNode;
00253             return *branch;
00254             break;
00255         }
00256     case kNodeRev:
00257         {
00258             CLogNodeRev& rev = *(CLogNodeRev*)fNode;
00259             return (*rev).RevNum().c_str();
00260             break;
00261         }
00262     case kNodeTag:
00263         {
00264             CLogNodeTag& tag = *(CLogNodeTag*)fNode;
00265             return *tag;
00266             break;
00267         }
00268     }
00269
00270     return 0L;
00271 }
00272
00277 CRect& CWinLogData::Bounds(void)
00278 {
00279     return totB;
00280 }
00281
00286 CRect& CWinLogData::SelfBounds(void)
00287 {
00288     return selfB;
00289 }
00290
00296 CWinLogData* CWinLogData::CreateNewData(CLogNode* node)
00297 {
00298     if( node->GetUserData() != 0L )
00299         return (CWinLogData*)node->GetUserData();
00300
00301     CWinLogData* res = 0L;
00302     switch(node->GetType())
00303     {
00304     case kNodeHeader :
00305         res = new CWinLogHeaderData(node);
00306         break;
00307     case kNodeBranch :
00308         res = new CWinLogBranchData(node);
00309         break;
00310     case kNodeRev :
00311         res = new CWinLogRevData(node);
00312         break;
00313     case kNodeTag :
00314         res = new CWinLogTagData(node);
00315         break;
00316     }
00317
00318     node->SetUserData(res);
00319     return res;
00320 }
00321
00326 bool CWinLogData::IsDiskNode(EntnodeData* entryInfo)
00327 {
00328     if( entryInfo == 0L || GetType() != kNodeRev )
00329         return false;
00330
00331     const char* vn = (*entryInfo)[EntnodeFile::kVN];
00332     if( vn == 0L )
00333         return false;
00334
00335     return strcmp(vn, (**(CLogNodeRev*)fNode).RevNum().c_str()) == 0;
00336 }
00337
00342 bool CWinLogData::IsDeadNode()
00343 {
00344     if( GetType() != kNodeRev )
00345         return false;
00346
00347     return strcmp("dead", (**(CLogNodeRev*)fNode).State()) == 0;
00348 }
00349
00354 bool CWinLogData::IsUserState()
00355 {
00356     if( GetType() != kNodeRev )
00357         return false;
00358
00359     return !(strcmp("dead", (**(CLogNodeRev*)fNode).State()) == 0 ||
00360         strcmp("Exp", (**(CLogNodeRev*)fNode).State()) == 0);
00361 }
00362
00367 void CWinLogData::Offset(CPoint offset)
00368 {
00369     selfB.OffsetRect(offset);
00370     totB.OffsetRect(offset);
00371
00372     vector<CLogNode*>::iterator i;
00373     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00374     {
00375         CLogNode* subNode = *i;
00376         GetData(subNode)->Offset(offset);
00377     }
00378
00379     if( fNode->Next() != 0L )
00380     {
00381         GetData(fNode->Next())->Offset(offset);
00382     }
00383 }
00384
00389 bool CWinLogData::Selected(void) const
00390 {
00391     return sel;
00392 }
00393
00399 void CWinLogData::SetSelected(CScrollView* view, bool state)
00400 {
00401     sel = state;
00402
00403     CRect invalR = selfB;
00404     invalR.OffsetRect(-view->GetDeviceScrollPosition());
00405     view->InvalidateRect(invalR);
00406 }
00407
00412 void CWinLogData::UnselectAll(CScrollView* view)
00413 {
00414     if( sel )
00415     {
00416         SetSelected(view, false);
00417     }
00418
00419     vector<CLogNode*>::iterator i;
00420     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00421     {
00422         CLogNode* subNode = *i;
00423         GetData(subNode)->UnselectAll(view);
00424     }
00425
00426     if( fNode->Next() != 0L )
00427         GetData(fNode->Next())->UnselectAll(view);
00428 }
00429
00435 CWinLogData* CWinLogData::HitTest(CPoint point)
00436 {
00437     if( !totB.PtInRect(point) )
00438         return 0L;
00439
00440     if( selfB.PtInRect(point) )
00441         return this;
00442
00443     CWinLogData* result;
00444     vector<CLogNode*>::iterator i;
00445     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00446     {
00447         CLogNode* subNode = *i;
00448         result = GetData(subNode)->HitTest(point);
00449         if( result != 0L )
00450             return result;
00451     }
00452
00453     if( fNode->Next() != 0L )
00454     {
00455         result = GetData(fNode->Next())->HitTest(point);
00456         if( result != 0L )
00457             return result;
00458     }
00459
00460     return 0L;
00461 }
00462
00468 void CWinLogData::Update(CDC& dc, EntnodeData* entryInfo)
00469 {
00470     CLogNode* subNode;
00471     CLogNode* nextNode = fNode->Next();
00472     CPen* pOldPen = 0L;
00473     CBrush* pOldBrush = 0L;
00474     CPen pen, pen2;
00475     CBrush brush;
00476
00477     UpdateSelf(dc, entryInfo);
00478
00479     TRY
00480     {
00481         pen.CreatePen(PS_SOLID, 2, RGB(0, 0, 255));
00482         pen2.CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
00483         pOldPen = dc.SelectObject(&pen);
00484
00485         int topY = selfB.TopLeft().y + 2;
00486         int botY = selfB.BottomRight().y - 2;
00487         int lefX = selfB.BottomRight().x + 4;
00488
00489         int count = 1;
00490         int tot = fNode->Childs().size() + 1;
00491
00492         // Draw the children
00493         vector<CLogNode*>::iterator i;
00494         for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i, ++count)
00495         {
00496             subNode = *i;
00497
00498             // Draw the link
00499             CRect& cb = GetData(subNode)->SelfBounds();
00500
00501             if( subNode->GetType() == kNodeRev || subNode->GetType() == kNodeBranch )
00502                 dc.SelectObject(&pen);
00503             else
00504                 dc.SelectObject(&pen2);
00505
00506             float y = (float)topY + (float)(botY - topY) * (float)count / (float)tot;
00507             int rigX = cb.TopLeft().x - 4;
00508             float x = (float)rigX - (float)(rigX - lefX) * (float)count / (float)tot;
00509
00510             // Special drawing for the header node
00511             if( fNode->GetType() == kNodeHeader )
00512             {
00513                 dc.MoveTo(selfB.TopLeft().x + kHChildSpace/2, selfB.BottomRight().y);
00514                 dc.LineTo(selfB.TopLeft().x + kHChildSpace/2, cb.CenterPoint().y);
00515                 dc.LineTo(cb.TopLeft().x, cb.CenterPoint().y);
00516             }
00517             else
00518             {
00519                 //int halfX = (cb.TopLeft().x - selfB.BottomRight().x) / 2;
00520                 dc.MoveTo(selfB.BottomRight().x, (int)y);
00521                 dc.LineTo((int)x, (int)y);
00522                 dc.LineTo((int)x, cb.CenterPoint().y);
00523                 dc.LineTo(cb.TopLeft().x, cb.CenterPoint().y);
00524             }
00525
00526             // Draw the sub-node
00527             GetData(subNode)->Update(dc, entryInfo);
00528         }
00529
00530         // Draw the next node
00531         if( nextNode != 0L )
00532         {
00533             // Draw the link
00534             CRect& nb = GetData(nextNode)->SelfBounds();
00535             if( nextNode->GetType() == kNodeRev || nextNode->GetType() == kNodeBranch )
00536                 dc.SelectObject(&pen);
00537             else
00538                 dc.SelectObject(&pen2);
00539             int centerX = selfB.Width() < nb.Width() ?
00540                 selfB.CenterPoint().x : nb.CenterPoint().x;
00541
00542             dc.MoveTo(centerX, selfB.BottomRight().y);
00543             dc.LineTo(centerX, nb.TopLeft().y);
00544
00545             // Draw the next node
00546             GetData(nextNode)->Update(dc, entryInfo);
00547         }
00548
00549         if( pOldPen != 0L )
00550         {
00551             dc.SelectObject(pOldPen);
00552             pOldPen = 0L;
00553         }
00554
00555         if( pOldBrush != 0L )
00556         {
00557             dc.SelectObject(pOldBrush);
00558             pOldBrush = 0L;
00559         }
00560
00561         pen.DeleteObject();
00562         pen2.DeleteObject();
00563     }
00564     CATCH_ALL(e)
00565     {
00566         if( pOldPen != 0L )
00567             dc.SelectObject(pOldPen);
00568
00569         if( pOldBrush != 0L )
00570             dc.SelectObject(pOldBrush);
00571     }
00572     END_CATCH_ALL
00573 }
00574
00581 void CWinLogData::ComputeBounds(const CPoint& topLeft, CDC& dc, EntnodeData* entryInfo)
00582 {
00583     CLogNode* subNode;
00584     CLogNode* nextNode = fNode->Next();
00585
00586     // First compute childrens bounds
00587     vector<CLogNode*>::iterator i;
00588     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00589     {
00590         subNode = *i;
00591         CWinLogData::CreateNewData(subNode);
00592         GetData(subNode)->ComputeBounds(topLeft, dc, entryInfo);
00593     }
00594
00595     if( nextNode != 0L )
00596         CWinLogData::CreateNewData(nextNode);
00597
00598     // Compute self place
00599     selfB.SetRectEmpty();
00600     CSize size = GetBoundsSelf(dc, entryInfo);
00601     size.cx += kInflateNodeSpace;
00602     size.cy += kInflateNodeSpace;
00603     selfB.SetRect(0, 0, size.cx, size.cy);
00604
00605     // Offset to the place assigned to this node
00606     selfB.OffsetRect(topLeft - selfB.TopLeft());
00607
00608     // Calculate the total height of the childrens
00609     int vSize = 0;
00610     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00611     {
00612         subNode = *i;
00613         CRect& b = GetData(subNode)->Bounds();
00614         vSize += b.Height();
00615     }
00616
00617     if( !fNode->Childs().empty() )
00618         vSize += (fNode->Childs().size() - 1) * kVChildSpace;
00619
00620     // Offset the children relative to self
00621     CPoint startChilds(topLeft.x + selfB.Width() + kHChildSpace,
00622         /*selfB.CenterPoint().y - vSize / 2*/topLeft.y);
00623
00624     // Place the first child at the bottom of the header node so it won't take so much space for long filenames
00625     if( fNode->GetType() == kNodeHeader )
00626     {
00627         startChilds = CPoint(topLeft.x + kHChildSpace, topLeft.y + selfB.Height() + kVChildSpace);
00628     }
00629
00630     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00631     {
00632         subNode = *i;
00633         CRect curPos = GetData(subNode)->Bounds();
00634         GetData(subNode)->Offset(startChilds - curPos.TopLeft());
00635
00636         startChilds.y += curPos.Height() + kVChildSpace;
00637     }
00638
00639     // Calculate the total bounds of the childrens
00640     CRect bc;
00641     bc.SetRectEmpty();
00642     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00643     {
00644         subNode = *i;
00645         CRect& b = GetData(subNode)->Bounds();
00646         bc.UnionRect(bc, b);
00647     }
00648
00649     // Now we got the complete size
00650     totB.UnionRect(selfB, bc);
00651
00652     if( nextNode != 0L )
00653     {
00654         CPoint nextTopLeft;
00655         nextTopLeft.x = totB.TopLeft().x;
00656         nextTopLeft.y = totB.BottomRight().y + kVChildSpace;
00657         GetData(nextNode)->ComputeBounds(nextTopLeft, dc, entryInfo);
00658
00659         totB.UnionRect(totB, GetData(nextNode)->Bounds());
00660     }
00661 }
00662
00667 void CWinLogData::UpdateMergePoints(CDC& dc)
00668 {
00669     vector<pair<CWinLogData*, CWinLogData*> > mergePair;
00670
00671     CollectMergePointPairPass1(mergePair);
00672     CollectMergePointPairPass2(mergePair);
00673
00674     CPen pen;
00675
00676     pen.CreatePen(PS_SOLID, 0, gGraphMergeColor);
00677
00678     CPen* oldPen = dc.SelectObject(&pen);
00679
00680     TRY
00681     {
00682         for(int i = 0; i < (int)mergePair.size(); i++)
00683         {
00684             if( mergePair[i].first != 0L && mergePair[i].second != 0L )
00685             {
00686                 CRect rect_source = mergePair[i].first->SelfBounds();
00687                 CRect rect_target = mergePair[i].second->SelfBounds();
00688
00689                 if( rect_source.left > rect_target.right )
00690                 {
00691                     CPoint pts[7];
00692
00693                     pts[0] = CPoint(rect_source.left, rect_source.top + rect_source.Height()/2);
00694                     pts[1] = CPoint(pts[0].x - 8, pts[0].y);
00695                     pts[2] = CPoint(rect_target.right + 8, rect_target.top + rect_target.Height()/2);
00696                     pts[3] = CPoint(pts[2].x - 8, pts[2].y);
00697                     pts[4] = CPoint(pts[3].x + 4, pts[3].y-2);
00698                     pts[5] = CPoint(pts[4].x, pts[4].y+4);
00699                     pts[6] = pts[3];
00700
00701                     dc.Polyline(pts, 7);
00702                 }
00703                 else if( rect_source.left == rect_target.left )
00704                 {
00705                     CPoint pts[7];
00706
00707                     pts[0] = CPoint(rect_source.right, rect_source.top + rect_source.Height()/2);
00708                     pts[1] = CPoint(pts[0].x + 8, pts[0].y);
00709                     pts[2] = CPoint(rect_target.right + 8, rect_target.top + rect_target.Height()/2);
00710                     pts[3] = CPoint(pts[2].x - 8, pts[2].y);
00711                     pts[4] = CPoint(pts[3].x + 4, pts[3].y-2);
00712                     pts[5] = CPoint(pts[4].x, pts[4].y+4);
00713                     pts[6] = pts[3];
00714
00715                     dc.Polyline(pts, 7);
00716                 }
00717                 else
00718                 {
00719                     CPoint pts[7];
00720
00721                     pts[0] = CPoint(rect_source.right, rect_source.top + rect_source.Height()/2);
00722                     pts[1] = CPoint(pts[0].x + 8, pts[0].y);
00723                     pts[2] = CPoint(rect_target.left - 8, rect_target.top + rect_target.Height()/2);
00724                     pts[3] = CPoint(pts[2].x + 8, pts[2].y);
00725                     pts[4] = CPoint(pts[3].x - 4, pts[3].y-2);
00726                     pts[5] = CPoint(pts[4].x, pts[4].y+4);
00727                     pts[6] = pts[3];
00728
00729                     dc.Polyline(pts, 7);
00730                 }
00731             }
00732         }
00733     }
00734     CATCH_ALL(e)
00735     {
00736     }
00737     END_CATCH_ALL
00738
00739     if( oldPen != 0L )
00740         dc.SelectObject(&oldPen);
00741
00742     pen.DeleteObject();
00743 }
00744
00745 void CWinLogData::CollectMergePointPairPass1(vector<pair<CWinLogData*, CWinLogData*> >& mergePair)
00746 {
00747     CollectMergePointPairPass1Self(mergePair);
00748
00749     std::vector<CLogNode*>::iterator it = Node()->Childs().begin();
00750
00751     while( it != Node()->Childs().end() )
00752     {
00753         ((CWinLogData*)(*it)->GetUserData())->CollectMergePointPairPass1(mergePair);
00754
00755         it++;
00756     }
00757
00758     if( Node()->Next() != NULL )
00759     {
00760         ((CWinLogData*)Node()->Next()->GetUserData())->CollectMergePointPairPass1(mergePair);
00761     }
00762 }
00763
00764 void CWinLogData::CollectMergePointPairPass2(vector<pair<CWinLogData*, CWinLogData*> >& mergePair)
00765 {
00766     CollectMergePointPairPass2Self(mergePair);
00767
00768     std::vector<CLogNode*>::iterator it = Node()->Childs().begin();
00769
00770     while( it != Node()->Childs().end() )
00771     {
00772         ((CWinLogData*)(*it)->GetUserData())->CollectMergePointPairPass2(mergePair);
00773
00774         it++;
00775     }
00776
00777     if( Node()->Next() != NULL )
00778     {
00779         ((CWinLogData*)Node()->Next()->GetUserData())->CollectMergePointPairPass2(mergePair);
00780     }
00781 }
00782
00788 void CWinLogData::UpdateSelf(CDC& dc, EntnodeData* entryInfo)
00789 {
00790 }
00791
00798 CSize CWinLogData::GetBoundsSelf(CDC& dc, EntnodeData* entryInfo)
00799 {
00800     return CSize(0, 0);
00801 }
00802
00803
00809 void CWinLogData::CollectMergePointPairPass1Self(vector<pair<CWinLogData*, CWinLogData*> >& mergePair)
00810 {
00811 }
00812
00818 void CWinLogData::CollectMergePointPairPass2Self(vector<pair<CWinLogData*, CWinLogData*> >& mergePair)
00819 {
00820 }
00821
00822
00824 // CWinLogHeaderData
00825
00826 CSize CWinLogHeaderData::GetBoundsSelf(CDC& dc, EntnodeData* entryInfo)
00827 {
00828     CLogNodeHeader& header = *(CLogNodeHeader*)fNode;
00829     return dc.GetTextExtent((*header).WorkingFile(),
00830         (*header).WorkingFile().length());
00831 }
00832
00833 void CWinLogHeaderData::UpdateSelf(CDC& dc, EntnodeData* entryInfo)
00834 {
00835     // Draw the node
00836     ::DrawNode(dc, SelfBounds(), gGraphHeaderColor, kRoundRect, Selected());
00837
00838     // Draw the content of the node
00839     TEXTMETRIC tm;
00840     dc.GetTextMetrics(&tm);
00841
00842     CPoint center = SelfBounds().CenterPoint();
00843     int nCenterX = center.x;
00844     int nCenterY = center.y - tm.tmHeight/2;
00845
00846     CLogNodeHeader& header = *(CLogNodeHeader*)fNode;
00847     dc.ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, SelfBounds(),
00848         (*header).WorkingFile(), (*header).WorkingFile().length(), NULL);
00849 }
00850
00852 // CWinLogRevData
00853
00854 CSize CWinLogRevData::GetBoundsSelf(CDC& dc, EntnodeData* entryInfo)
00855 {
00856     CLogNodeRev& rev = *(CLogNodeRev*)fNode;
00857     CSize size = dc.GetTextExtent((*rev).RevNum().c_str(), strlen((*rev).RevNum().c_str()));
00858
00859     if( IsDiskNode(entryInfo) )
00860     {
00861         size.cx += 2 + 16 + 2;
00862         size.cy = max(16, size.cy);
00863     }
00864
00865     return size;
00866 }
00867
00868 void CWinLogRevData::UpdateSelf(CDC& dc, EntnodeData* entryInfo)
00869 {
00870     CRect txtRect = SelfBounds();
00871
00872     if( IsDiskNode(entryInfo) )
00873     {
00874         txtRect.left += 2 + 16 + 2;
00875     }
00876
00877     // Draw the node
00878     COLORREF contour = gGraphNodeColor;
00879     int penStyle = PS_SOLID;
00880
00881     if( IsDeadNode() )
00882     {
00883         contour = (COLORREF)gGraphDeadNodeColor;
00884         penStyle = STYLE_DEADNODE;
00885     }
00886     else if( IsUserState() )
00887     {
00888         contour = (COLORREF)gGraphUserStateNodeColor;
00889         penStyle = STYLE_USERSTATENODE;
00890     }
00891
00892     ::DrawNode(dc, SelfBounds(), contour, kRectangle, Selected(), penStyle);
00893
00894     // Draw the state icon if it is the rev. of the disk
00895     if( IsDiskNode(entryInfo) )
00896     {
00897         CImageList& list = CGraphView::GetImgList();
00898         CPoint w(SelfBounds().TopLeft());
00899         w.x += 2;
00900         w.y += (SelfBounds().Height() - 16) / 2;
00901
00902         list.Draw(&dc, CBrowseFileView::GetImageForEntry(entryInfo), w, ILD_TRANSPARENT);
00903     }
00904
00905     // Draw the content of the node
00906     TEXTMETRIC tm;
00907     dc.GetTextMetrics(&tm);
00908
00909     CPoint center = txtRect.CenterPoint();
00910     int nCenterX = center.x;
00911     int nCenterY = center.y - tm.tmHeight/2;
00912
00913     CLogNodeRev& rev = *(CLogNodeRev*)fNode;
00914     dc.ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, txtRect,
00915         (*rev).RevNum().c_str(), strlen((*rev).RevNum().c_str()), NULL);
00916 }
00917
00918
00919 void CWinLogRevData::CollectMergePointPairPass1Self(vector<pair<CWinLogData*, CWinLogData*> >& mergePair)
00920 {
00921     CRevFile rev = *(*((CLogNodeRev*)Node()));
00922
00923     if( !rev.MergePoint().empty() )
00924     {
00925         mergePair.push_back(make_pair<CWinLogData*, CWinLogData*>(0L, this));
00926     }
00927 }
00928
00929 void CWinLogRevData::CollectMergePointPairPass2Self(vector<pair<CWinLogData*, CWinLogData*> >& mergePair)
00930 {
00931     CRevFile rev = *(*((CLogNodeRev*)Node()));
00932
00933     for(int i = 0; i < (int)mergePair.size(); i++)
00934     {
00935         if( mergePair[i].first == 0L &&  (*(*((CLogNodeRev*)(mergePair[i].second->Node())))).MergePoint() == rev.RevNum() )
00936         {
00937             mergePair[i].first = this;
00938         }
00939     }
00940 }
00941
00943 // CWinLogTagData
00944
00945 CSize CWinLogTagData::GetBoundsSelf(CDC& dc, EntnodeData* entryInfo)
00946 {
00947     CLogNodeTag& tag = *(CLogNodeTag*)fNode;
00948     return dc.GetTextExtent(*tag, (*tag).length());
00949 }
00950
00951 void CWinLogTagData::UpdateSelf(CDC& dc, EntnodeData* entryInfo)
00952 {
00953     // Draw the node
00954     ::DrawNode(dc, SelfBounds(), gGraphTagColor, kRoundRect, Selected());
00955
00956     // Draw the content of the node
00957     TEXTMETRIC tm;
00958     dc.GetTextMetrics(&tm);
00959     CPoint center = SelfBounds().CenterPoint();
00960     int nCenterX = center.x;
00961     int nCenterY = center.y - tm.tmHeight/2;
00962
00963     CLogNodeTag& tag = *(CLogNodeTag*)fNode;
00964     dc.ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, SelfBounds(), *tag, (*tag).length(), NULL);
00965 }
00966
00968 // CWinLogBranchData
00969
00970 CSize CWinLogBranchData::GetBoundsSelf(CDC& dc, EntnodeData* entryInfo)
00971 {
00972     CLogNodeBranch& branch = *(CLogNodeBranch*)fNode;
00973     return dc.GetTextExtent(*branch, (*branch).length());
00974 }
00975
00976 void CWinLogBranchData::UpdateSelf(CDC& dc, EntnodeData* entryInfo)
00977 {
00978     // Draw the node
00979     ::DrawNode(dc, SelfBounds(), gGraphBranchColor, kOctangle, Selected());
00980
00981     // Draw the content of the node
00982     TEXTMETRIC tm;
00983     dc.GetTextMetrics(&tm);
00984     CPoint center = SelfBounds().CenterPoint();
00985     int nCenterX = center.x;
00986     int nCenterY = center.y - tm.tmHeight/2;
00987     CLogNodeBranch& branch = *(CLogNodeBranch*)fNode;
00988     dc.ExtTextOut(nCenterX, nCenterY, ETO_CLIPPED, SelfBounds(), *branch, (*branch).length(), NULL);
00989 }
00990
00993
00995 void CGraphRectTracker::OnChangedRect(const CRect& rectOld)
00996 {
00997 #if 0 // :-< doesn't work...
00998     CRect r;
00999     m_view->GetClientRect(&r);
01000     CPoint rb = m_rect.BottomRight();
01001
01002     if( !r.PtInRect(rb) )
01003     {
01004         CPoint orig = m_view->GetDeviceScrollPosition();
01005         CPoint offset;
01006         if( rb.x >= r.right )
01007             offset.x += 10;
01008
01009         if( rb.y >= r.bottom )
01010             offset.y += 10;
01011
01012         orig += offset;
01013         m_rect -= offset;
01014         m_view->ScrollToPosition(orig);
01015     }
01016 #endif
01017 }
01018
01020 // TGraph
01021
01027 kTGraph TGraph::TraverseGraph(CLogNode* node)
01028 {
01029     kTGraph res = TraverseNode(node);
01030     if( res == kTStop )
01031         return kTStop;
01032
01033     if( res == kTGetDown )
01034     {
01035         vector<CLogNode*>::iterator i;
01036         for(i = node->Childs().begin(); i != node->Childs().end(); ++i)
01037         {
01038             res = TraverseGraph(*i);
01039             if( res == kTStop )
01040                 return kTStop;
01041         }
01042     }
01043
01044     if( node->Next() != 0L )
01045     {
01046         res = TraverseGraph(node->Next());
01047         if( res == kTStop )
01048             return kTStop;
01049     }
01050
01051     return kTContinue;
01052 };
01053
01055 // TGraphRectSelect
01056
01057 TGraphRectSelect::TGraphRectSelect(bool shiftOn, CGraphView* view, CRect& rect)
01058     : m_shiftOn(shiftOn), m_view(view), m_rect(rect)
01059 {
01060 }
01061
01062 kTGraph TGraphRectSelect::TraverseNode(CLogNode* node)
01063 {
01064     CWinLogData* data = (CWinLogData*)node->GetUserData();
01065
01066     // No need to go further
01067     CRect inter;
01068     if( !inter.IntersectRect(m_rect, data->Bounds()) )
01069     {
01070         return kTContinue;
01071     }
01072
01073     // Self enclosed in the tracker ?
01074     CRect& boundsRect = data->SelfBounds();
01075     if( m_rect.PtInRect(boundsRect.TopLeft()) && m_rect.PtInRect(boundsRect.BottomRight()) )
01076     {
01077         if( !m_shiftOn )
01078         {
01079             if( !data->Selected() )
01080                 data->SetSelected(m_view, true);
01081         }
01082         else
01083             data->SetSelected(m_view, !data->Selected());
01084     }
01085
01086     // Traverse childrens
01087     return kTGetDown;
01088 }
01089
01091 // TGraphCmdStatus
01092
01093 TGraphCmdStatus::TGraphCmdStatus()
01094     : m_fSel1(0L), m_fSel2(0L), m_selCount(0)
01095 {
01096 }
01097
01098 kTGraph TGraphCmdStatus::TraverseNode(CLogNode* node)
01099 {
01100     CWinLogData* data = (CWinLogData*)node->GetUserData();
01101
01102     if( data->Selected() )
01103     {
01104         if( m_fSel1 == 0L )
01105             m_fSel1 = data;
01106         else if( m_fSel2 == 0L )
01107             m_fSel2 = data;
01108
01109         m_selCount++;
01110     }
01111
01112     return kTGetDown;
01113 }
01114
01119 int TGraphCmdStatus::GetSelCount() const
01120 {
01121     return m_selCount;
01122 }
01123
01128 CWinLogData* TGraphCmdStatus::GetSel1() const
01129 {
01130     return m_fSel1;
01131 }
01132
01137 CWinLogData* TGraphCmdStatus::GetSel2() const
01138 {
01139     return m_fSel2;
01140 }
01141
01143 // CGraphConsole
01144
01145 CGraphConsole::CGraphConsole()
01146 {
01147     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01148     m_view = app->GetConsoleView();
01149 }
01150
01151 long CGraphConsole::cvs_out(const char* txt, long len)
01152 {
01153     if( m_view != 0L )
01154         m_view->OutConsole(txt, len);
01155
01156     return len;
01157 }
01158
01159 long CGraphConsole::cvs_err(const char* txt, long len)
01160 {
01161     if( m_view != 0L )
01162         m_view->OutConsole(txt, len, true);
01163
01164     return len;
01165 }
01166
01168 // TGraphDelCmd
01169
01170 TGraphDelCmd::TGraphDelCmd()
01171     : m_countSel(0), m_onlyRev(true)
01172 {
01173 }
01174
01175 kTGraph TGraphDelCmd::TraverseNode(CLogNode* node)
01176 {
01177     CWinLogData* data = (CWinLogData*)node->GetUserData();
01178
01179     if( data->Selected() )
01180     {
01181         if( data->GetType() != kNodeRev )
01182             m_onlyRev = false;
01183         else
01184             m_allRevs.push_back(CStr(data->GetStr()));
01185
01186         m_countSel++;
01187     }
01188
01189     return kTGetDown;
01190 }
01191
01196 int TGraphDelCmd::GetCountSel() const
01197 {
01198     return m_countSel;
01199 }
01200
01205 bool TGraphDelCmd::GetOnlyRev() const
01206 {
01207     return m_onlyRev;
01208 }
01209
01214 std::vector<CStr>& TGraphDelCmd::GetAllRevs()
01215 {
01216     return m_allRevs;
01217 }
01218
01220 // TGraphSelNonSig
01221
01222 TGraphSelNonSig::TGraphSelNonSig(CGraphView* view)
01223     : m_view(view)
01224 {
01225 }
01226
01227 kTGraph TGraphSelNonSig::TraverseNode(CLogNode* node)
01228 {
01229     CWinLogData* data = (CWinLogData*)node->GetUserData();
01230
01231     if( data->GetType() == kNodeRev )
01232     {
01233         if( node->Next() != 0L && node->Childs().size() == 0 )
01234             data->SetSelected(m_view, true);
01235     }
01236
01237     return kTGetDown;
01238 }
01239
01241 // CRevisionConsole
01242
01243 CRevisionConsole::CRevisionConsole()
01244 {
01245 }
01246
01253 bool CRevisionConsole::Init(LPCTSTR path, LPCTSTR fname)
01254 {
01255     TCHAR buf[_MAX_PATH] = "";
01256
01257     _tmakepath(buf, NULL, path, fname, NULL);
01258
01259     return CCvsStreamConsole::Open(buf);
01260 }
01261
01262
01264 // CGraphView
01265
01266 CImageList CGraphView::m_imageList;
01267
01268 IMPLEMENT_DYNCREATE(CGraphView, CScrollView)
01269
01270 CGraphView::CGraphView()
01271 {
01272     if( m_imageList.m_hImageList == 0L )
01273         m_imageList.Create(IDB_SMALLICONS, 16, 1, RGB(255, 255, 255));
01274 }
01275
01276 CGraphView::~CGraphView()
01277 {
01278 }
01279
01280
01281 BEGIN_MESSAGE_MAP(CGraphView, CScrollView)
01282     //{{AFX_MSG_MAP(CGraphView)
01283     ON_WM_LBUTTONDOWN()
01284     ON_COMMAND(ID_VIEW_RELOAD, OnViewReload)
01285     ON_UPDATE_COMMAND_UI(ID_VIEW_RELOAD, OnUpdateViewReload)
01286     ON_COMMAND(ID_VIEW_DIFF, OnViewDiff)
01287     ON_UPDATE_COMMAND_UI(ID_VIEW_DIFF, OnUpdateViewDiff)
01288     ON_COMMAND(ID_VIEW_UPDATE, OnViewUpdate)
01289     ON_UPDATE_COMMAND_UI(ID_VIEW_UPDATE, OnUpdateViewUpdate)
01290     ON_COMMAND(ID_VIEW_TAG, OnViewTag)
01291     ON_UPDATE_COMMAND_UI(ID_VIEW_TAG, OnUpdateViewTag)
01292     ON_COMMAND(ID_VIEW_DELREV, OnViewDelrev)
01293     ON_UPDATE_COMMAND_UI(ID_VIEW_DELREV, OnUpdateViewDelrev)
01294     ON_COMMAND(ID_VIEW_SELNONSIG, OnViewSelnonsig)
01295     ON_UPDATE_COMMAND_UI(ID_VIEW_SELNONSIG, OnUpdateViewSelnonsig)
01296     ON_COMMAND(ID_VIEW_RETRIEVE, OnViewRetrieve)
01297     ON_UPDATE_COMMAND_UI(ID_VIEW_RETRIEVE, OnUpdateViewRetrieve)
01298     ON_UPDATE_COMMAND_UI(ID_VIEW_RECURSIVE, DisableUpdate)
01299     ON_WM_CONTEXTMENU()
01300     ON_COMMAND(ID_QUERY_ANNOTATE, OnAnnotate)
01301     ON_COMMAND(ID_GRAPH_GRAPHOPTIONS, OnGraphGraphoptions)
01302     ON_UPDATE_COMMAND_UI(ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE, OnUpdateGraphChangelogmessage)
01303     ON_COMMAND(ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE, OnGraphChangelogmessage)
01304     ON_UPDATE_COMMAND_UI(ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION, OnUpdateGraphSetdescription)
01305     ON_COMMAND(ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION, OnGraphSetdescription)
01306     ON_COMMAND(ID_GRAPH_ADMINOPTIONS_SETSTATE, OnGraphSetstate)
01307     ON_UPDATE_COMMAND_UI(ID_GRAPH_ADMINOPTIONS_SETSTATE, OnUpdateGraphSetstate)
01308     ON_COMMAND(ID_VIEW_UNLOCKF, OnViewUnlockf)
01309     ON_UPDATE_COMMAND_UI(ID_VIEW_UNLOCKF, OnUpdateViewUnlockf)
01310     ON_COMMAND(ID_VIEW_EDITSEL, OnViewEditsel)
01311     ON_COMMAND(ID_VIEW_EDITSELDEF, OnViewEditseldef)
01312     ON_WM_LBUTTONDBLCLK()
01313     ON_COMMAND(ID_VIEW_RETRIEVEAS, OnViewRetrieveAs)
01314     ON_WM_KEYDOWN()
01315     ON_COMMAND(ID_VIEW_OPENSEL, OnViewOpensel)
01316     ON_COMMAND(ID_VIEW_OPENSELAS, OnViewOpenselas)
01317     ON_UPDATE_COMMAND_UI(ID_VIEW_EDITSELDEF, OnUpdateViewRetrieve)
01318     ON_UPDATE_COMMAND_UI(ID_VIEW_RETRIEVEAS, OnUpdateViewRetrieve)
01319     ON_UPDATE_COMMAND_UI(ID_QUERY_ANNOTATE, OnUpdateViewRetrieve)
01320     ON_UPDATE_COMMAND_UI(ID_VIEW_MISSING, DisableUpdate)
01321     ON_UPDATE_COMMAND_UI(ID_VIEW_MODIFIED, DisableUpdate)
01322     ON_UPDATE_COMMAND_UI(ID_VIEW_CONFLICT, DisableUpdate)
01323     ON_UPDATE_COMMAND_UI(ID_VIEW_UNKNOWN, DisableUpdate)
01324     ON_UPDATE_COMMAND_UI(ID_VIEW_HIDEUNKNOWN, DisableUpdate)
01325     ON_UPDATE_COMMAND_UI(ID_VIEW_IGNORE, DisableUpdate)
01326     ON_UPDATE_COMMAND_UI(ID_VIEW_ADDED, DisableUpdate)
01327     ON_UPDATE_COMMAND_UI(ID_VIEW_REMOVED, DisableUpdate)
01328     ON_UPDATE_COMMAND_UI(ID_VIEW_CHANGED, DisableUpdate)
01329     ON_UPDATE_COMMAND_UI(ID_FILTERMASK, DisableUpdate)
01330     ON_UPDATE_COMMAND_UI(ID_VIEW_EDITSEL, OnUpdateViewRetrieve)
01331     ON_UPDATE_COMMAND_UI(ID_VIEW_CLEARALL, DisableUpdate)
01332     ON_UPDATE_COMMAND_UI(ID_VIEW_HIDEMISSING, DisableUpdate)
01333     ON_UPDATE_COMMAND_UI(ID_VIEW_FILTERBAR_CLEARALL, DisableUpdate)
01334     ON_UPDATE_COMMAND_UI(ID_VIEW_FILTERBAR_ENABLE, DisableUpdate)
01335     ON_UPDATE_COMMAND_UI(ID_VIEW_FILTERBAR_OPTIONS, DisableUpdate)
01336     ON_UPDATE_COMMAND_UI(ID_VIEW_OPENSEL, OnUpdateViewRetrieve)
01337     ON_UPDATE_COMMAND_UI(ID_VIEW_OPENSELAS, OnUpdateViewRetrieve)
01338     ON_UPDATE_COMMAND_UI(ID_QUERY_SHELLACTION_DEFAULT, OnUpdateViewRetrieve)
01339     ON_COMMAND(ID_QUERY_SHELLACTION_DEFAULT, OnQueryShellactionDefault)
01340     //}}AFX_MSG_MAP
01341     ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
01342     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
01343     ON_WM_INITMENUPOPUP()
01344 END_MESSAGE_MAP()
01345
01347 // CGraphView drawing
01348
01350 void CGraphView::CalcImageSize(void)
01351 {
01352     const CPoint startPoint(STARTPOINT_PT);
01353     CWindowDC dc(this);
01354     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01355
01356     CLogNode* root = pDoc->GetNode();
01357     if( root == 0L )
01358         return;
01359
01360     // Set all the bounds locations
01361     CWinLogData* data = CWinLogData::CreateNewData(root);
01362     root->SetUserData(data);
01363     data->ComputeBounds(startPoint, dc, pDoc->GetEntryInfo());
01364
01365     // Re-offset from (0, 0)
01366     CRect bounds = data->Bounds();
01367     data->Offset(startPoint - bounds.TopLeft());
01368     bounds = data->Bounds();
01369
01370     // Set the scroll size, we add the margin of the start point offset on each side
01371     SetScrollSizes(MM_TEXT, bounds.Size() + CSize(startPoint)+CSize(startPoint)+CSize(SHADOW_OFFSET_PT));
01372 }
01373
01375 void CGraphView::OnInitialUpdate()
01376 {
01377     CScrollView::OnInitialUpdate();
01378
01379     SetScrollSizes(MM_TEXT, CSize(200, 100));
01380     //CalcImageSize();
01381 }
01382
01384 void CGraphView::OnDraw(CDC* pDC)
01385 {
01386     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01387     CLogNode* root = pDoc->GetNode();
01388     if( root == 0L || root->GetUserData() == 0L )
01389         return;
01390
01391     CWinLogData* data = (CWinLogData*)root->GetUserData();
01392
01393     pDC->SetTextAlign(TA_CENTER);
01394     pDC->SetBkMode(TRANSPARENT);
01395     data->Update(*pDC, pDoc->GetEntryInfo());
01396     data->UpdateMergePoints(*pDC);
01397 }
01398
01400 // CGraphView diagnostics
01401
01402 #ifdef _DEBUG
01403 void CGraphView::AssertValid() const
01404 {
01405     CScrollView::AssertValid();
01406 }
01407
01408 void CGraphView::Dump(CDumpContext& dc) const
01409 {
01410     CScrollView::Dump(dc);
01411 }
01412 #endif //_DEBUG
01413
01415 // CGraphView message handlers
01416
01418 void CGraphView::OnLButtonDown(UINT nFlags, CPoint point)
01419 {
01420     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01421     CLogNode* root = pDoc->GetNode();
01422     if( root == 0L || root->GetUserData() == 0L )
01423         return;
01424
01425     CWinLogData* data = (CWinLogData*)root->GetUserData();
01426
01427     if( nFlags & MK_LBUTTON )
01428     {
01429         if((nFlags & MK_SHIFT) == 0 && (nFlags & MK_CONTROL) == 0)
01430             data->UnselectAll(this);
01431
01432         point += GetDeviceScrollPosition();
01433
01434         CWinLogData* hit = data->HitTest(point);
01435         if( hit != 0L )
01436         {
01437             if( (nFlags & MK_SHIFT) == 0 && (nFlags & MK_CONTROL) == 0 )
01438             {
01439                 if( !hit->Selected() )
01440                 {
01441                     hit->SetSelected(this, true);
01442                     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01443                     CWincvsView* view = app->GetConsoleView();
01444
01445                     if( view != 0L )
01446                     {
01447                         CColorConsole out(view);
01448                         CvsLogOutput(out, hit->Node());
01449                     }
01450                 }
01451             }
01452             else
01453             {
01454                 hit->SetSelected(this, !hit->Selected());
01455             }
01456         }
01457         else
01458         {
01459             CGraphRectTracker track(this);
01460             point -= GetDeviceScrollPosition();
01461             if( track.TrackRubberBand(this, point, true) )
01462             {
01463                 // Traverse and mark
01464                 track.m_rect.OffsetRect(GetDeviceScrollPosition());
01465                 track.m_rect.NormalizeRect();
01466
01467                 TGraphRectSelect traversal((nFlags & MK_CONTROL) != 0, this, track.m_rect);
01468                 traversal.TraverseGraph(root);
01469             }
01470         }
01471     }
01472     else if( nFlags & MK_RBUTTON )
01473     {
01474         // nothing to do
01475     }
01476
01477     CScrollView::OnLButtonDown(nFlags, point);
01478 }
01479
01481 void CGraphView::OnViewReload()
01482 {
01483     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01484     CLogNode* root = pDoc->GetNode();
01485     if( root == 0L || root->GetUserData() == 0L )
01486         return;
01487
01488     CvsArgs args;
01489     args.add("log");
01490     args.add(pDoc->GetName());
01491     args.print(pDoc->GetDir());
01492
01493     CStr dir(pDoc->GetDir());
01494     CvsLogParse(dir, args, true, pDoc);
01495 }
01496
01498 void CGraphView::OnUpdateViewReload(CCmdUI* pCmdUI)
01499 {
01500     if( DisableCommon() )
01501         pCmdUI->Enable(FALSE);
01502     else
01503         pCmdUI->Enable(TRUE);
01504 }
01505
01507 void CGraphView::OnViewDiff()
01508 {
01509     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01510     CLogNode* root = pDoc->GetNode();
01511     if( root == NULL || root->GetUserData() == NULL || pDoc == NULL )
01512         return;
01513
01514     TGraphCmdStatus trav;
01515     trav.TraverseGraph(root);
01516
01517     MultiFiles mf;
01518
01519     mf.newdir(pDoc->GetDir());
01520     mf.newfile(pDoc->GetName(), 0L, trav.GetSel1()->GetStr());
01521
01522     if( trav.GetSelCount() == 2 )
01523     {
01524         mf.newfile(pDoc->GetName(), 0L, trav.GetSel2()->GetStr());
01525     }
01526
01527     KoGraphDiffHandler handler;
01528     handler.OnFiles(&mf);
01529 }
01530
01532 void CGraphView::OnUpdateViewDiff(CCmdUI* pCmdUI)
01533 {
01534     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01535     CLogNode* root = pDoc->GetNode();
01536     if( DisableCommon() )
01537     {
01538         pCmdUI->Enable(FALSE);
01539         return;
01540     }
01541
01542     TGraphCmdStatus trav;
01543     trav.TraverseGraph(root);
01544
01545     const BOOL outEnabled = (trav.GetSelCount() == 2 && trav.GetSel1()->GetType() != kNodeHeader &&
01546         trav.GetSel2()->GetType() != kNodeHeader) ||
01547         (trav.GetSelCount() == 1 && trav.GetSel1()->GetType() != kNodeHeader);
01548
01549     pCmdUI->Enable(outEnabled);
01550 }
01551
01553 void CGraphView::OnViewUpdate()
01554 {
01555     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01556     CLogNode* root = pDoc->GetNode();
01557     if( root == 0L || root->GetUserData() == 0L )
01558         return;
01559
01560     CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
01561
01562     CvsArgs args;
01563     args.add("update");
01564     args.add("-A");
01565     args.add(pDoc->GetName());
01566     args.print(pDoc->GetDir());
01567
01568     CGraphConsole cons;
01569     launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
01570 }
01571
01573 void CGraphView::OnUpdateViewUpdate(CCmdUI* pCmdUI)
01574 {
01575     if( DisableCommon() )
01576         pCmdUI->Enable(FALSE);
01577     else
01578         pCmdUI->Enable(TRUE);
01579 }
01580
01582 void CGraphView::OnViewTag()
01583 {
01584     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01585     CLogNode* root = pDoc->GetNode();
01586
01587     if( root == 0L || root->GetUserData() == 0L )
01588         return;
01589
01590     CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
01591
01592     TGraphCmdStatus trav;
01593     trav.TraverseGraph(root);
01594
01595     CvsArgs args;
01596     args.add("update");
01597
01598     CLogNode* node = trav.GetSel1()->Node();
01599     switch( node->GetType() )
01600     {
01601     case kNodeHeader:
01602         {
01603             args.add("-A");
01604             break;
01605         }
01606     case kNodeRev:
01607     case kNodeBranch:
01608     case kNodeTag:
01609         {
01610             args.add("-r");
01611             args.add(trav.GetSel1()->GetStr());
01612             break;
01613         }
01614     }
01615
01616     args.add(pDoc->GetName());
01617     args.print(pDoc->GetDir());
01618
01619     CGraphConsole cons;
01620     launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
01621 }
01622
01624 void CGraphView::OnUpdateViewTag(CCmdUI* pCmdUI)
01625 {
01626     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01627     CLogNode* root = pDoc->GetNode();
01628
01629     if( DisableCommon() )
01630     {
01631         pCmdUI->Enable(FALSE);
01632         return;
01633     }
01634
01635     TGraphCmdStatus trav;
01636     trav.TraverseGraph(root);
01637
01638     const BOOL outEnabled = trav.GetSelCount() == 1;
01639     pCmdUI->Enable(outEnabled);
01640 }
01641
01643 void CGraphView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
01644 {
01645     CScrollView::OnBeginPrinting(pDC, pInfo);
01646
01647     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01648     CLogNode* root = pDoc->GetNode();
01649     if( root == 0L )
01650         return;
01651
01652     // set all the bounds locations
01653     CWinLogData* data = CWinLogData::CreateNewData(root);
01654     root->SetUserData(data);
01655     CPoint start(0, 0);
01656     data->ComputeBounds(start, *pDC, pDoc->GetEntryInfo());
01657
01658     // compute the number of pages
01659     CRect bounds = data->Bounds();
01660     m_pageHeight = pDC->GetDeviceCaps(VERTRES);
01661     m_numberOfPages = bounds.Height() / m_pageHeight + 1;
01662
01663     pInfo->SetMaxPage(m_numberOfPages);
01664 }
01665
01667 void CGraphView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
01668 {
01669     CScrollView::OnEndPrinting(pDC, pInfo);
01670
01671     CalcImageSize();
01672     Invalidate();
01673 }
01674
01676 BOOL CGraphView::OnPreparePrinting(CPrintInfo* pInfo)
01677 {
01678     BOOL res = DoPreparePrinting(pInfo);
01679     if( !res )
01680         return res;
01681
01682     return TRUE;
01683 }
01684
01686 void CGraphView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
01687 {
01688     if( !pDC->IsPrinting() )
01689         return;
01690
01691     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01692     CLogNode* root = pDoc->GetNode();
01693     if( root == 0L || root->GetUserData() == 0L )
01694         return;
01695
01696     CWinLogData* data = (CWinLogData*)root->GetUserData();
01697
01698     // Orient the viewport so that the first row to be printed
01699     // has a viewport coordinate of (0,0).
01700     int yTopOfPage = (pInfo->m_nCurPage -1) * m_pageHeight;
01701     pDC->SetViewportOrg(0, -yTopOfPage);
01702     pDC->SetTextAlign(TA_CENTER);
01703     pDC->SetBkMode(TRANSPARENT);
01704     data->Update(*pDC, pDoc->GetEntryInfo());
01705
01706     //  CScrollView::OnPrint(pDC, pInfo);
01707 }
01708
01713 bool CGraphView::DisableCommon()
01714 {
01715     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01716     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01717     CLogNode* root = pDoc->GetNode();
01718
01719     return root == 0L || root->GetUserData() == 0L || app->IsCvsRunning() || this != CWnd::GetFocus();
01720 }
01721
01728 bool CGraphView::IsSelSingleNode(kLogNode type, bool equal /*= true*/)
01729 {
01730     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01731     CLogNode* root = pDoc->GetNode();
01732
01733     TGraphCmdStatus trav;
01734     trav.TraverseGraph(root);
01735
01736     return (trav.GetSelCount() == 1 &&
01737         (equal ? trav.GetSel1()->GetType() == type : trav.GetSel1()->GetType() != type));
01738 }
01739
01741 void CGraphView::OnViewDelrev()
01742 {
01743     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01744     CLogNode* root = pDoc->GetNode();
01745     if( root == 0L || root->GetUserData() == 0L )
01746         return;
01747
01748     CvsAlert cvsAlert(kCvsAlertQuestionIcon,
01749         "Do you really want to delete selected revisions?", "Deleting file revisions will permanently remove the revisions on the server.",
01750         BUTTONTITLE_YES, BUTTONTITLE_NO);
01751
01752     if( cvsAlert.ShowAlert(kCvsAlertCancelButton) != kCvsAlertOKButton )
01753     {
01754         return;
01755     }
01756
01757     CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
01758
01759     TGraphDelCmd trav;
01760     trav.TraverseGraph(root);
01761
01762     CProgress progress(true, "Deleting revisions...");
01763
01764     std::vector<CStr>::const_iterator i;
01765     int count = 0;
01766     for(i = trav.GetAllRevs().begin(); i != trav.GetAllRevs().end(); ++i, ++count)
01767     {
01768         progress.SetProgress((int)(((float)count / (float)trav.GetAllRevs().size()) * 100.0 + .5));
01769         if( progress.HasAborted() )
01770             break;
01771
01772         CvsArgs args;
01773         args.add("admin");
01774         args.add("-o");
01775         args.add(*i);
01776         args.add(pDoc->GetName());
01777         args.print(pDoc->GetDir());
01778
01779         CGraphConsole cons;
01780         launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
01781     }
01782
01783     if( !progress.HasAborted() )
01784         progress.SetProgress(100);
01785 }
01786
01788 void CGraphView::OnUpdateViewDelrev(CCmdUI* pCmdUI)
01789 {
01790     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01791     CLogNode* root = pDoc->GetNode();
01792     if( DisableCommon() )
01793     {
01794         pCmdUI->Enable(FALSE);
01795         return;
01796     }
01797
01798     TGraphDelCmd trav;
01799     trav.TraverseGraph(root);
01800     BOOL outEnabled = trav.GetCountSel() >= 1 && trav.GetOnlyRev();
01801     pCmdUI->Enable(outEnabled);
01802 }
01803
01805 void CGraphView::OnViewSelnonsig()
01806 {
01807     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01808     CLogNode* root = pDoc->GetNode();
01809     if( root == 0L || root->GetUserData() == 0L )
01810         return;
01811
01812     CWinLogData* data = (CWinLogData*)root->GetUserData();
01813     data->UnselectAll(this);
01814
01815     TGraphSelNonSig trav(this);
01816     trav.TraverseGraph(root);
01817 }
01818
01820 void CGraphView::OnUpdateViewSelnonsig(CCmdUI* pCmdUI)
01821 {
01822     if( DisableCommon() )
01823         pCmdUI->Enable(FALSE);
01824     else
01825         pCmdUI->Enable(TRUE);
01826 }
01827
01829 void CGraphView::OnViewRetrieve()
01830 {
01831     SaveSel();
01832 }
01833
01834 void CGraphView::OnViewRetrieveAs()
01835 {
01836     SaveSel(true);
01837 }
01838
01839 void CGraphView::SaveSel(bool queryName /*= false*/)
01840 {
01841     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01842     CLogNode* root = pDoc->GetNode();
01843
01844     if( root == 0L || root->GetUserData() == 0L )
01845         return;
01846
01847     TGraphCmdStatus trav;
01848     trav.TraverseGraph(root);
01849
01850     CStr fileName;
01851     CvsArgs args;
01852
01853     fileName = pDoc->GetDir();
01854     fileName << pDoc->GetName();
01855     fileName << ".#.";
01856     fileName << trav.GetSel1()->GetStr();
01857
01858     if( !queryName || BrowserGetSaveasFile("Select the file name to save to", kSelectAny, fileName) )
01859     {
01860         args.add("update");
01861         args.add("-p");
01862
01863         args.add("-r");
01864         args.add(trav.GetSel1()->GetStr());
01865
01866         args.add(pDoc->GetName());
01867
01868         args.print(pDoc->GetDir());
01869
01870         CStr outDir;
01871         CStr outFile;
01872         SplitPath(fileName, outDir, outFile);
01873
01874         CRevisionConsole console;
01875         console.Init(outDir, outFile);
01876
01877         int code = launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &console);
01878     }
01879 }
01880
01882 void CGraphView::OnUpdateViewRetrieve(CCmdUI* pCmdUI)
01883 {
01884     BOOL enabled = FALSE;
01885     if( !DisableCommon() )
01886     {
01887         enabled = IsSelSingleNode(kNodeHeader, false);
01888     }
01889
01890     pCmdUI->Enable(enabled);
01891 }
01892
01894 void CGraphView::DisableUpdate(CCmdUI* pCmdUI)
01895 {
01896     pCmdUI->Enable(false);
01897 }
01898
01904 void CGraphView::OnContextMenu(CWnd* pWnd, CPoint point)
01905 {
01906     // Comply with windows UI standard (Windows Explorer file view used as a reference),
01907     // change selections according to the state of Control and Shift keys
01908     BYTE abKeyboardState[256];
01909     BOOL bControlState = FALSE;
01910     BOOL bShiftState = FALSE;
01911     memset(abKeyboardState, 0, 256);
01912
01913     if( GetKeyboardState(abKeyboardState) )
01914     {
01915         bControlState = abKeyboardState[VK_CONTROL] & 0x80;
01916         bShiftState = abKeyboardState[VK_SHIFT] & 0x80;
01917     }
01918
01919     if( (!bControlState || (bControlState && bShiftState)) && !DisableCommon() )
01920     {
01921         CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
01922         CLogNode* root = pDoc->GetNode();
01923
01924         TGraphCmdStatus trav;
01925         trav.TraverseGraph(root);
01926
01927         CWinLogData* data = (CWinLogData*)root->GetUserData();
01928
01929         // Set the track point in case it's not the mouse click
01930         if( -1 == point.x && -1 == point.y )
01931         {
01932             // Set to top-left corner
01933             point = STARTPOINT_PT;
01934             point.x /= 2;
01935             point.y /= 2;
01936
01937             ClientToScreen(&point);
01938         }
01939
01940         CPoint hitPoint(point);
01941
01942         ScreenToClient(&hitPoint);
01943         hitPoint += GetDeviceScrollPosition();
01944
01945         CWinLogData* hit = data->HitTest(hitPoint);
01946
01947         if( hit != 0L )
01948         {
01949             if( trav.GetSelCount() == 0 )
01950             {
01951                 hit->SetSelected(this, true);
01952             }
01953             else if( trav.GetSelCount() >= 1 && trav.GetSel1()->GetType() != kNodeHeader )
01954             {
01955                 if( !(hit->Selected() && bShiftState) &&
01956                     !hit->Selected() &&
01957                     !(bControlState && bShiftState && hit->Selected()) )
01958                 {
01959                     data->UnselectAll(this);
01960                 }
01961
01962                 hit->SetSelected(this, true);
01963             }
01964         }
01965     }
01966
01967     // Get the menu to display from the main app window, which for graph view
01968     // will be IDR_GRAPH,  The submenu to display is the menu under "Graph".
01969     CMenu* pSubMenu = GetTopPopupMenu("&Graph");
01970     if( pSubMenu )
01971     {
01972         pSubMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON, point.x, point.y, this);
01973     }
01974     else
01975     {
01976         ASSERT(FALSE); // Popup menu not found
01977     }
01978 }
01979
01981 void CGraphView::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
01982 {
01983     ASSERT(pPopupMenu != NULL);
01984     // Check the enabled state of various menu items.
01985
01986     CCmdUI state;
01987     state.m_pMenu = pPopupMenu;
01988     ASSERT(state.m_pOther == NULL);
01989     ASSERT(state.m_pParentMenu == NULL);
01990
01991     // Determine if menu is popup in top-level menu and set m_pOther to
01992     // it if so (m_pParentMenu == NULL indicates that it is secondary popup).
01993     HMENU hParentMenu;
01994     if( AfxGetThreadState()->m_hTrackingMenu == pPopupMenu->m_hMenu )
01995         state.m_pParentMenu = pPopupMenu;    // Parent == child for tracking popup.
01996     else if( (hParentMenu = ::GetMenu(m_hWnd)) != NULL )
01997     {
01998         CWnd* pParent = this;
01999         // Child windows don't have menus--need to go to the top!
02000         if( pParent != NULL &&
02001             (hParentMenu = ::GetMenu(pParent->m_hWnd)) != NULL )
02002         {
02003             int nIndexMax = ::GetMenuItemCount(hParentMenu);
02004             for(int nIndex = 0; nIndex < nIndexMax; nIndex++)
02005             {
02006                 if( ::GetSubMenu(hParentMenu, nIndex) == pPopupMenu->m_hMenu )
02007                 {
02008                     // When popup is found, m_pParentMenu is containing menu.
02009                     state.m_pParentMenu = CMenu::FromHandle(hParentMenu);
02010                     break;
02011                 }
02012             }
02013         }
02014     }
02015
02016     state.m_nIndexMax = pPopupMenu->GetMenuItemCount();
02017     for(state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax; state.m_nIndex++)
02018     {
02019         state.m_nID = pPopupMenu->GetMenuItemID(state.m_nIndex);
02020         if( state.m_nID == 0 )
02021             continue; // Menu separator or invalid cmd - ignore it.
02022
02023         ASSERT(state.m_pOther == NULL);
02024         ASSERT(state.m_pMenu != NULL);
02025         if( state.m_nID == (UINT)-1 )
02026         {
02027             // Possibly a popup menu, route to first item of that popup.
02028             state.m_pSubMenu = pPopupMenu->GetSubMenu(state.m_nIndex);
02029             if( state.m_pSubMenu == NULL ||
02030                 (state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
02031                 state.m_nID == (UINT)-1 )
02032             {
02033                 continue;       // First item of popup can't be routed to.
02034             }
02035
02036             state.DoUpdate(this, TRUE);   // Popups are never auto disabled.
02037         }
02038         else
02039         {
02040             // Normal menu item.
02041             // Auto enable/disable if frame window has m_bAutoMenuEnable
02042             // set and command is _not_ a system command.
02043             state.m_pSubMenu = NULL;
02044             state.DoUpdate(this, FALSE);
02045         }
02046
02047         // Adjust for menu deletions and additions.
02048         UINT nCount = pPopupMenu->GetMenuItemCount();
02049         if( nCount < state.m_nIndexMax )
02050         {
02051             state.m_nIndex -= (state.m_nIndexMax - nCount);
02052             while( state.m_nIndex < nCount &&
02053                 pPopupMenu->GetMenuItemID(state.m_nIndex) == state.m_nID )
02054             {
02055                 state.m_nIndex++;
02056             }
02057         }
02058
02059         state.m_nIndexMax = nCount;
02060     }
02061 }
02062
02064 void CGraphView::OnAnnotate()
02065 {
02066     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02067     CLogNode* root = pDoc->GetNode();
02068     if( root == 0L || root->GetUserData() == 0L )
02069         return;
02070
02071     TGraphCmdStatus trav;
02072     trav.TraverseGraph(root);
02073
02074     MultiFiles mf;
02075
02076     mf.newdir(pDoc->GetDir());
02077     mf.newfile(pDoc->GetName(), 0L, trav.GetSel1()->GetStr());
02078
02079     if( trav.GetSelCount() == 2 )
02080     {
02081         mf.newfile(pDoc->GetName(), 0L, trav.GetSel2()->GetStr());
02082     }
02083
02084     KoGraphAnnotateHandler handler;
02085     handler.OnFiles(&mf);
02086 }
02087
02089 void CGraphView::OnGraphGraphoptions()
02090 {
02091     if( CompatGetGraphOptions(gGraphSelColor, gGraphShadowColor,
02092         gGraphHeaderColor, gGraphTagColor, gGraphBranchColor,
02093         gGraphNodeColor, gGraphDeadNodeColor, gGraphUserStateNodeColor,
02094         gGraphMergeColor) )
02095     {
02096         // add any additional processing here
02097     }
02098
02099     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
02100     if( pApp )
02101     {
02102         pApp->UpdateAllDocsView();
02103     }
02104 }
02105
02107 void CGraphView::OnUpdateGraphChangelogmessage(CCmdUI* pCmdUI)
02108 {
02109     BOOL enabled = FALSE;
02110     if( !DisableCommon() )
02111     {
02112         enabled = IsSelSingleNode(kNodeRev);
02113     }
02114
02115     pCmdUI->Enable(enabled);
02116 }
02117
02119 void CGraphView::OnGraphChangelogmessage()
02120 {
02121     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02122     CLogNode* root = pDoc->GetNode();
02123     if( root == 0L || root->GetUserData() == 0L )
02124         return;
02125
02126     TGraphCmdStatus trav;
02127     trav.TraverseGraph(root);
02128
02129     CLogNode* node = trav.GetSel1()->Node();
02130     ASSERT(node->GetType() == kNodeRev);
02131     CRevFile& rev = **(CLogNodeRev*)node;
02132
02133     CStr msg = (const char*)rev.DescLog();
02134
02135     MultiFiles mf;
02136
02137     mf.newdir(pDoc->GetDir());
02138     mf.newfile(pDoc->GetName());
02139
02140     if( CompatGetAdminOptions(&mf, kChangeLog, msg) )
02141     {
02142         CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
02143
02144         CvsArgs args;
02145         args.add("admin");
02146         args.add(CStr("-m") + trav.GetSel1()->GetStr() + CStr(":") + CleanupLogMsg(msg));
02147
02148         args.add(pDoc->GetName());
02149         args.print(pDoc->GetDir());
02150
02151         CGraphConsole cons;
02152         launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
02153     }
02154 }
02155
02157 void CGraphView::OnUpdateGraphSetdescription(CCmdUI* pCmdUI)
02158 {
02159     BOOL enabled = FALSE;
02160     if( !DisableCommon() )
02161     {
02162         enabled = IsSelSingleNode(kNodeHeader);
02163     }
02164
02165     pCmdUI->Enable(enabled);
02166 }
02167
02169 void CGraphView::OnGraphSetdescription()
02170 {
02171     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02172     CLogNode* root = pDoc->GetNode();
02173     if( root == 0L || root->GetUserData() == 0L )
02174         return;
02175
02176     TGraphCmdStatus trav;
02177     trav.TraverseGraph(root);
02178
02179     CLogNode* node = trav.GetSel1()->Node();
02180     ASSERT(node->GetType() == kNodeHeader);
02181     CRcsFile& rev = **(CLogNodeHeader*)node;
02182
02183     CStr msg = (const char*)rev.DescLog();
02184
02185     MultiFiles mf;
02186
02187     mf.newdir(pDoc->GetDir());
02188     mf.newfile(pDoc->GetName());
02189
02190     if( CompatGetAdminOptions(&mf, kSetDescription, msg) )
02191     {
02192         CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
02193
02194         CvsArgs args;
02195         args.add("admin");
02196         args.add(CStr("-t-") + CleanupLogMsg(msg));
02197
02198         args.add(pDoc->GetName());
02199         args.print(pDoc->GetDir());
02200
02201         CGraphConsole cons;
02202         launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
02203     }
02204 }
02205
02207 void CGraphView::OnUpdateGraphSetstate(CCmdUI* pCmdUI)
02208 {
02209     BOOL enabled = FALSE;
02210     if( !DisableCommon() )
02211     {
02212         enabled = IsSelSingleNode(kNodeRev);
02213     }
02214
02215     pCmdUI->Enable(enabled);
02216 }
02217
02219 void CGraphView::OnGraphSetstate()
02220 {
02221     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02222     CLogNode* root = pDoc->GetNode();
02223     if( root == 0L || root->GetUserData() == 0L )
02224         return;
02225
02226     TGraphCmdStatus trav;
02227     trav.TraverseGraph(root);
02228
02229     CLogNode* node = trav.GetSel1()->Node();
02230     ASSERT(node->GetType() == kNodeRev);
02231     CRevFile& rev = **(CLogNodeRev*)node;
02232
02233     CStr state = (const char*)rev.State();
02234
02235     CvsAlert cvsAlert(kCvsAlertStopIcon,
02236         _i18n("Are you sure you want to continue?"), _i18n("The revision state is: \"dead\".\nYou should not alter it manually."),
02237         BUTTONTITLE_CONTINUE, BUTTONTITLE_CANCEL);
02238
02239     if( strcmp("dead", state.c_str()) == 0 && cvsAlert.ShowAlert() != kCvsAlertOKButton )
02240     {
02241         return;
02242     }
02243
02244     MultiFiles mf;
02245
02246     mf.newdir(pDoc->GetDir());
02247     mf.newfile(pDoc->GetName());
02248
02249     if( CompatGetAdminOptions(&mf, kSetState, state) )
02250     {
02251         CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
02252
02253         CvsArgs args;
02254         args.add("admin");
02255         args.add("-s");
02256         args.add(CleanupLogMsg(state) + CStr(":") + trav.GetSel1()->GetStr());
02257
02258         args.add(pDoc->GetName());
02259         args.print(pDoc->GetDir());
02260
02261         CGraphConsole cons;
02262         launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
02263     }
02264 }
02265
02267 void CGraphView::OnUpdateViewUnlockf(CCmdUI* pCmdUI)
02268 {
02269     BOOL enabled = FALSE;
02270     if( !DisableCommon() )
02271     {
02272         enabled = IsSelSingleNode(kNodeRev);
02273     }
02274
02275     pCmdUI->Enable(enabled);
02276 }
02277
02279 void CGraphView::OnViewUnlockf()
02280 {
02281     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02282     CLogNode* root = pDoc->GetNode();
02283     if( root == 0L || root->GetUserData() == 0L )
02284         return;
02285
02286     CWndAutoCommand oWndAutoCommand(this, ID_VIEW_RELOAD);
02287
02288     TGraphCmdStatus trav;
02289     trav.TraverseGraph(root);
02290
02291     CvsArgs args;
02292     args.add("admin");
02293     args.add(CStr("-u") + trav.GetSel1()->GetStr());
02294
02295     args.add(pDoc->GetName());
02296     args.print(pDoc->GetDir());
02297
02298     CGraphConsole cons;
02299     launchCVS(pDoc->GetDir(), args.Argc(), args.Argv(), &cons);
02300 }
02301
02303 void CGraphView::OnViewEditsel()
02304 {
02305     CStr file;
02306     if( RetrieveSel(file) )
02307     {
02308         LaunchHandler(kLaunchEdit, file.c_str());
02309     }
02310 }
02311
02313 void CGraphView::OnViewEditseldef()
02314 {
02315     CStr file;
02316     if( RetrieveSel(file) )
02317     {
02318         LaunchHandler(kLaunchDefaultEdit, file.c_str());
02319     }
02320 }
02321
02323 void CGraphView::OnQueryShellactionDefault()
02324 {
02325     CStr file;
02326     if( RetrieveSel(file) )
02327     {
02328         LaunchHandler(kLaunchDefault, file.c_str());
02329     }
02330 }
02331
02337 bool CGraphView::RetrieveSel(UStr& file)
02338 {
02339     bool res = false;
02340
02341     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02342     CLogNode* root = pDoc->GetNode();
02343
02344     if( root && root->GetUserData() )
02345     {
02346         TGraphCmdStatus trav;
02347         trav.TraverseGraph(root);
02348
02349         CStr prf, ext, base;
02350         CvsArgs args;
02351
02352         GetExtension(pDoc->GetName(), base, ext);
02353
02354         prf = base;
02355         prf << "_view_";
02356         prf << trav.GetSel1()->GetStr();
02357         prf << '_';
02358
02359         args.add("update");
02360         args.add("-p");
02361
02362         args.add("-r");
02363         args.add(trav.GetSel1()->GetStr());
02364
02365         args.add(pDoc->GetName());
02366
02367         args.print(pDoc->GetDir());
02368
02369         file = launchCVS(pDoc->GetDir(), args, prf.c_str(), ext);
02370         if( !file.empty() )
02371         {
02372             res = true;
02373         }
02374     }
02375
02376     return res;
02377 }
02378
02380 void CGraphView::OnLButtonDblClk(UINT nFlags, CPoint point)
02381 {
02382     FileAction();
02383
02384     CScrollView::OnLButtonDblClk(nFlags, point);
02385 }
02386
02391 BOOL CGraphView::OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll)
02392 {
02393     SCROLLINFO info;
02394     info.cbSize = sizeof(SCROLLINFO);
02395     info.fMask = SIF_TRACKPOS;
02396
02397     if( LOBYTE(nScrollCode) == SB_THUMBTRACK )
02398     {
02399         GetScrollInfo(SB_HORZ, &info);
02400         nPos = info.nTrackPos;
02401     }
02402
02403     if( HIBYTE(nScrollCode) == SB_THUMBTRACK )
02404     {
02405         GetScrollInfo(SB_VERT, &info);
02406         nPos = info.nTrackPos;
02407     }
02408
02409     return CScrollView::OnScroll(nScrollCode, nPos, bDoScroll);
02410 }
02411
02412 class TGraphCurSelector : public TGraph
02413 {
02414     enum { CACHE_INTERVAL = 10 };
02415
02416     void construct_()
02417     {
02418         CGraphDoc* pDoc = m_view ? (CGraphDoc*)m_view->GetDocument() : 0L;
02419         m_disknodeEntryInfo = pDoc ? pDoc->GetEntryInfo() : 0L;
02420     }
02421
02422     TGraphCurSelector(int offset_from_sel, CGraphView* view, CLogNode* sel1, CLogNode* sel2)
02423         : m_offset(offset_from_sel), m_view(view),
02424         m_selId(-1), m_bRestart(true), m_sel1(sel1), m_sel2(sel2),
02425         m_newSel(0L), m_firstSel(0L), m_lastSel(0L), m_diskNode(0L)
02426     {
02427         construct_();
02428     }
02429
02430 public:
02431     TGraphCurSelector(int offset_from_sel, CGraphView* view)
02432         : m_offset(offset_from_sel), m_view(view),
02433         m_selId(-1), m_bRestart(false), m_sel1(0L), m_sel2(0L),
02434         m_newSel(0L), m_firstSel(0L), m_lastSel(0L), m_diskNode(0L)
02435     {
02436         construct_();
02437     }
02438
02439 private:
02440     int m_offset;
02441
02442     CGraphView* m_view;
02443
02444     int m_selId;
02445     bool m_bRestart; // for cache
02446
02447     std::map<int, CLogNode*> m_restartPointerCache;
02448
02449     CLogNode* m_sel1;
02450     CLogNode* m_sel2;
02451
02452     CLogNode* m_newSel;
02453
02454     CLogNode* m_firstSel; // might be root
02455     CLogNode* m_lastSel;
02456
02457     CLogNode* m_diskNode;
02458
02459     EntnodeData* m_disknodeEntryInfo;
02460
02461     CWinLogData* getWinLogData_(CLogNode* node) const
02462     {
02463         return node ? (CWinLogData*)node->GetUserData() : 0L;
02464     }
02465 public:
02466     CWinLogData* GetSel1() const
02467     {
02468         return getWinLogData_(m_sel1);
02469     }
02470
02471     CWinLogData* GetSel2() const
02472     {
02473         return getWinLogData_(m_sel2);
02474     }
02475
02476     CWinLogData* GetNewSel() const
02477     {
02478         return getWinLogData_(m_newSel ? m_newSel : m_firstSel);
02479     }
02480
02481     CWinLogData* GetFirstSel() const
02482     {
02483         return getWinLogData_(m_firstSel);
02484     }
02485
02486     CWinLogData* GetLastSel() const
02487     {
02488         return getWinLogData_(m_lastSel);
02489     }
02490
02491     CWinLogData* GetDiskNodeSel() const
02492     {
02493         return getWinLogData_(m_diskNode);
02494     }
02495
02496     virtual kTGraph TraverseNode(CLogNode* node)
02497     {
02498         ++m_selId;
02499
02500         if( !m_firstSel )
02501         {
02502             m_lastSel = m_firstSel = node;
02503         }
02504
02505         if( !m_bRestart && (((m_selId % CACHE_INTERVAL == 0) && node->Next()) || !m_selId) )
02506         {
02507             m_restartPointerCache.insert(std::make_pair(m_selId, node));
02508         }
02509
02510         if( ((CWinLogData*)node->GetUserData())->IsDiskNode(m_disknodeEntryInfo) )
02511         {
02512             m_diskNode = node;
02513         }
02514
02515         CWinLogData* data = (CWinLogData*)node->GetUserData();
02516         if( data->Selected() )
02517         {
02518             if( !m_sel1 )
02519             {
02520                 m_sel1 = node;
02521             }
02522             else if( !m_sel2 )
02523             {
02524                 m_sel2 = node;
02525             }
02526
02527             data->SetSelected(m_view, false);
02528         }
02529
02530         if( m_sel1 && !m_newSel )
02531         {
02532             if( m_offset < 0 )
02533             {
02534                 int target = m_selId + m_offset;
02535                 target = (target > 0) ? target : 0;
02536                 typedef std::map<int, CLogNode*>::iterator ITER_t_;
02537                 typedef std::pair<ITER_t_, ITER_t_> ITERPAIR_t_;
02538                 ITERPAIR_t_ itpair = m_restartPointerCache.equal_range(target);
02539                 if( itpair.first != itpair.second )
02540                 {
02541                     m_newSel = (*(itpair.first)).second;
02542                 }
02543                 else
02544                 {
02545                     ITER_t_ it = itpair.first; // lower_bound
02546                     if( it != m_restartPointerCache.begin() )
02547                     {
02548                         --it;
02549                     }
02550
02551                     TGraphCurSelector internal(target - (*it).first, m_view, m_sel1, m_sel2);
02552                     internal.TraverseGraph((*it).second);
02553                     m_newSel = internal.m_newSel ? internal.m_newSel : m_lastSel;
02554                 }
02555             }
02556             else if( m_offset == 0 )
02557             {
02558                 m_newSel = node;
02559             }
02560             else
02561             {
02562                 --m_offset;
02563             }
02564         }
02565
02566         m_lastSel = node;
02567
02568         return m_newSel && m_bRestart ? kTStop : kTGetDown;
02569     }
02570 };
02571
02582 void CGraphView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
02583 {
02584     CGraphDoc* pDoc = (CGraphDoc*)GetDocument();
02585     CLogNode* node = pDoc->GetNode();
02586     UINT nCharTmp = (nChar == VK_LEFT ? VK_UP : (nChar == VK_RIGHT ? VK_DOWN : nChar));
02587
02588     switch( nCharTmp )
02589     {
02590     case VK_ESCAPE:
02591         // Unselect all
02592         if( node && node->GetUserData() /*&& GetAsyncKeyState(VK_CONTROL) != 0*/ )
02593         {
02594             CWinLogData* data = (CWinLogData*)node->GetUserData();
02595             data->UnselectAll(this);
02596         }
02597         break;
02598     case VK_RETURN:
02599         FileAction();
02600         break;
02601     case VK_SPACE:
02602         // Print selection info
02603         {
02604             CWincvsApp* app = (CWincvsApp*)AfxGetApp();
02605             CWincvsView* view = app->GetConsoleView();
02606
02607             if( view != 0L )
02608             {
02609                 TGraphCmdStatus trav;
02610                 trav.TraverseGraph(node);
02611
02612                 if( trav.GetSel1() )
02613                 {
02614                     CColorConsole out(view);
02615                     CvsLogOutput(out, trav.GetSel1()->Node());
02616                 }
02617             }
02618         }
02619         break;
02620     case VK_PRIOR:
02621     case VK_NEXT:
02622     case VK_UP:
02623     case VK_DOWN:
02624     case VK_HOME: // FIXME -> go to current rev., Ctrl+Home, Ctrl+End -> go to top/bottom of graph
02625     case VK_END:
02626         // Navigation
02627         {
02628             if( node == NULL || node->GetUserData() == NULL || pDoc == NULL )
02629             {
02630                 break;
02631             }
02632
02633             int offset = (nCharTmp == VK_DOWN || nCharTmp == VK_NEXT) ? 1 : -1;
02634             offset *= (nCharTmp == VK_NEXT || nCharTmp == VK_PRIOR) ? 10 : 1;
02635
02636             const bool ctrlOn = GetAsyncKeyState(VK_CONTROL) < 0;
02637             const bool shiftOn = GetAsyncKeyState(VK_SHIFT) < 0;
02638
02639             TGraphCurSelector trav(offset, this);
02640             trav.TraverseGraph(node);
02641
02642             //CWinLogData* origsel1 = trav.GetSel1();
02643             CWinLogData* origsel2 = trav.GetSel2() ? trav.GetSel2() : (ctrlOn ? trav.GetSel1() : 0L);
02644             CWinLogData* newsel;
02645
02646             if( nCharTmp == VK_HOME && ctrlOn )
02647             {
02648                 newsel = trav.GetDiskNodeSel();
02649             }
02650             else if( nCharTmp == VK_END ||
02651                 ((nCharTmp == VK_DOWN || nCharTmp == VK_NEXT) && trav.GetNewSel() && trav.GetNewSel() == node->GetUserData()) )
02652             {
02653                 newsel = trav.GetLastSel();
02654             }
02655             else if( nCharTmp != VK_HOME && nCharTmp != VK_END )
02656             {
02657                 newsel = trav.GetNewSel();
02658             }
02659             else
02660             {
02661                 newsel = (CWinLogData*)node->GetUserData();
02662             }
02663
02664             if( !newsel )
02665             {
02666                 break;
02667             }
02668
02669             if( !shiftOn )
02670             {
02671                 CWinLogData* data = (CWinLogData*)node->GetUserData();
02672                 data->UnselectAll(this);
02673             }
02674             else if( origsel2 && ctrlOn )
02675             {
02676                 origsel2->SetSelected(this, true);
02677             }
02678
02679             newsel->SetSelected(this, true);
02680
02681             CPoint pt = GetScrollPosition();
02682             pt.y = _cpp_max(newsel->SelfBounds().top - newsel->SelfBounds().Height(), 0);
02683             ScrollToPosition(pt);
02684         }
02685         break;
02686     }
02687
02688     CScrollView::OnKeyDown(nChar, nRepCnt, nFlags);
02689 }
02690
02692 void CGraphView::OnViewOpensel()
02693 {
02694     CStr file;
02695     if( RetrieveSel(file) )
02696     {
02697         LaunchHandler(kLaunchOpen, file.c_str());
02698     }
02699 }
02700
02702 void CGraphView::OnViewOpenselas()
02703 {
02704     CStr file;
02705     if( RetrieveSel(file) )
02706     {
02707         LaunchHandler(kLaunchOpenAs, file.c_str());
02708     }
02709 }
02710
02714 void CGraphView::FileAction()
02715 {
02716     if( !DisableCommon() && IsSelSingleNode(kNodeHeader, false) )
02717     {
02718         CStr file;
02719         if( RetrieveSel(file) )
02720         {
02721             MultiFiles mf;
02722
02723             CStr uppath, folder;
02724             if( SplitPath(file.c_str(), uppath, folder) )
02725             {
02726                 mf.newdir(uppath.c_str());
02727                 mf.newfile(folder.c_str());
02728
02729                 KoFileActionHandler handler;
02730                 handler.OnFiles(&mf);
02731             }
02732         }
02733     }
02734 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MainFrm.h Source File

WinCvs/MainFrm.h

Go to the documentation of this file.
00001   /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // MainFrm.h : interface of the CMainFrame class
00022 //
00024
00025 #if !defined(AFX_MAINFRM_H__D2D77DCC_8299_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_MAINFRM_H__D2D77DCC_8299_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "ConsoleBar.h"
00033 #include "CvsStatusBar.h"
00034 #include "HistComboBoxEx.h"
00035 #include "SortHeaderCtrl.h"
00036 #include "BrowseViewModel.h"
00037 #include "BrowseViewColumn.h"
00038
00040 class CWinPlacement : public CPersistent
00041 {
00042 public:
00043     // Construction
00044     CWinPlacement(const char* uniqueName);
00045     virtual ~CWinPlacement();
00046
00047 private:
00048     // Data members
00049     WINDOWPLACEMENT m_placement;
00050     bool m_hasOne;
00052     virtual unsigned int SizeOf(void) const;
00053     virtual const void* GetData(void) const;
00054     virtual void SetData(const void* ptr, unsigned int size);
00055
00056 public:
00057     // Interface
00058     CWinPlacement& operator=(const WINDOWPLACEMENT& newplace);
00059
00060     WINDOWPLACEMENT GetPlacement() const;
00061     bool IsHasOne() const;
00062 };
00063
00065 class CMainFrame : public CCJMDIFrameWnd
00066 {
00067     DECLARE_DYNAMIC(CMainFrame)
00068 public:
00069     // Construction
00070     CMainFrame();
00071     virtual ~CMainFrame();
00072
00073 // Attributes
00074 protected:
00075
00076 // Operations
00077 public:
00078
00079 // Overrides
00080     // ClassWizard generated virtual function overrides
00081     //{{AFX_VIRTUAL(CMainFrame)
00082     public:
00083     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00084     virtual void WinHelp(DWORD dwData, UINT nCmd = HELP_CONTEXT);
00085     //}}AFX_VIRTUAL
00086
00087 // Implementation
00088 public:
00089
00090 #ifdef _DEBUG
00091     virtual void AssertValid() const;
00092     virtual void Dump(CDumpContext& dc) const;
00093 #endif
00094
00095 protected:
00096
00097 // Generated message map functions
00098 protected:
00099
00100     //{{AFX_MSG(CMainFrame)
00101     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00102     afx_msg void OnClose();
00103     afx_msg void OnDropFiles(HDROP hDropInfo);
00104     afx_msg void OnHistorySelect();
00105     afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
00106     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00107     afx_msg void OnViewRecursive();
00108     afx_msg void OnViewModified();
00109     afx_msg void OnUpdateViewModified(CCmdUI* pCmdUI);
00110     afx_msg void OnUpdateViewRecursive(CCmdUI* pCmdUI);
00111     afx_msg void OnViewConflict();
00112     afx_msg void OnUpdateViewConflict(CCmdUI* pCmdUI);
00113     afx_msg void OnViewUnknown();
00114     afx_msg void OnUpdateViewUnknown(CCmdUI* pCmdUI);
00115     afx_msg void OnViewMissing();
00116     afx_msg void OnUpdateViewMissing(CCmdUI* pCmdUI);
00117     afx_msg void OnViewIgnore();
00118     afx_msg void OnUpdateViewIgnore(CCmdUI* pCmdUI);
00119     afx_msg void OnUpdateFilterMask(CCmdUI* pCmdUI);
00120     afx_msg void OnUpdateHistory(CCmdUI* pCmdUI);
00121     afx_msg void OnViewAdded();
00122     afx_msg void OnUpdateViewAdded(CCmdUI* pCmdUI);
00123     afx_msg void OnUpdateViewRemoved(CCmdUI* pCmdUI);
00124     afx_msg void OnViewRemoved();
00125     afx_msg void OnViewChanged();
00126     afx_msg void OnUpdateViewChanged(CCmdUI* pCmdUI);
00127     afx_msg void OnViewHideunknown();
00128     afx_msg void OnUpdateViewHideunknown(CCmdUI* pCmdUI);
00129     afx_msg void OnTimer(UINT nIDEvent);
00130     afx_msg void OnViewClearall();
00131     afx_msg void OnUpdateViewClearall(CCmdUI* pCmdUI);
00132     afx_msg void OnViewHidemissing();
00133     afx_msg void OnUpdateViewHidemissing(CCmdUI* pCmdUI);
00134     afx_msg void OnUpdateViewFilterbarEnable(CCmdUI* pCmdUI);
00135     afx_msg void OnUpdateViewFilterbarClearall(CCmdUI* pCmdUI);
00136     afx_msg void OnUpdateViewFilterbarOptions(CCmdUI* pCmdUI);
00137     //}}AFX_MSG
00138     afx_msg void OnInitMenu(CMenu* pMenu);
00139     DECLARE_MESSAGE_MAP()
00140 private:
00141     // Data members
00142     KoFilterModel m_filter;
00143     KoRecursionModel m_recursion;
00144     KoIgnoreModel m_ignore;
00146     BOOL m_bRestoreFocus;
00148     // Control bar embedded members
00149     CCvsStatusBar m_wndStatusBar;
00151     CToolBar m_wndToolBar;
00152     CToolBar m_wndBrowser;
00153     CToolBar m_wndMultiUser;
00154     CToolBar m_wndTags;
00155     CToolBar m_wndList;
00156     CToolBar m_wndFilter;
00158     CHistComboBoxEx m_browseHist;
00159     CFont m_fontNormal;
00160     CBarConsole m_consolebar;
00161     CCJTabCtrlBar m_wndWorkspace;
00162     CImageList m_TabImages;
00163     CCJWindowPlacement m_state;
00165     // Methods
00166     BOOL InitializeDockingWindows();
00167     BOOL CreateStatusBar();
00168     BOOL CreateToolbar(const char* title, const UINT toolbarID, CToolBar* toolBar, CToolBar* dockToolBar = NULL, UINT childID = AFX_IDW_TOOLBAR);
00169     void DockControlBarLeftOf(CToolBar* toolBar, CToolBar* dockToolBar);
00170     BOOL CreateLocationCombo();
00171
00172     void LoadDockState();
00173
00174     inline CMDIMenuList& GetMenuList(void);
00175
00176 public:
00177     // Interface
00178     void InitialShowWindow(int nCmdShow);
00179
00180     BOOL OnBroadcastCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00181
00182     void SetFilterBarMask(CSortHeaderCtrl& ctrlHeader, const KiColumnModel* columnModel);
00183     void ClearFilters();
00184     void SetContext(const KoColumnContext* context);
00185     void ToggleFilterMasksEnable();
00186     bool IsFilterMasksEnable() const;
00187
00188     inline CWincvsView* GetConsoleView();
00189     inline CCJTabCtrlBar* GetWorkspace();
00190     inline CStatusBar* GetStatusBar();
00191     inline CHistComboBoxEx& GetBrowseHistory(void);
00192     CCJShellTree* GetExplorerView();
00193     CWinCvsBrowser* GetBrowserView();
00194
00195     const char* GetEnvMainThread(const char* name);
00196
00197     inline KiFilterModel* GetFilterModel();
00198     inline KiRecursionModel* GetRecursionModel();
00199     inline KiIgnoreModel* GetIgnoreModel();
00200
00201     void DropFiles(HDROP hDropInfo);
00202
00203     void ChangeLocation();
00204     void LoadLocationSettings();
00205     void StoreLocationSettings();
00206 };
00207
00209 // Inline implementation
00210
00212 inline CWincvsView* CMainFrame::GetConsoleView()
00213 {
00214     return m_consolebar.m_view;
00215 }
00216
00218 inline CCJTabCtrlBar* CMainFrame::GetWorkspace()
00219 {
00220     return &m_wndWorkspace;
00221 }
00222
00224 inline CStatusBar* CMainFrame::GetStatusBar()
00225 {
00226     return &m_wndStatusBar;
00227 }
00228
00230 inline CHistComboBoxEx& CMainFrame::GetBrowseHistory(void)
00231 {
00232     return m_browseHist;
00233 }
00234
00236 inline KiFilterModel* CMainFrame::GetFilterModel()
00237 {
00238     return &m_filter;
00239 }
00240
00242 inline KiRecursionModel* CMainFrame::GetRecursionModel()
00243 {
00244     return &m_recursion;
00245 }
00246
00248 inline KiIgnoreModel* CMainFrame::GetIgnoreModel()
00249 {
00250     return &m_ignore;
00251 }
00252
00254 inline CMDIMenuList& CMainFrame::GetMenuList(void)
00255 {
00256     return m_menuList;
00257 }
00258
00260
00261 //{{AFX_INSERT_LOCATION}}
00262 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00263
00264 #endif // !defined(AFX_MAINFRM_H__D2D77DCC_8299_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Wincvs::IWincvs Member List

This is the complete list of members for Wincvs::IWincvs, including all inherited members.

ViewPath Wincvs::IWincvs

Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoWatcher Member List

This is the complete list of members for KoWatcher, including all inherited members.

DelegateRun(LPVOID pWatcher) | KoWatcher | [private, static]
GetTimeout(const bool ignoreTimeout=false) | KoWatcher | [private]
kEndHandle enum value | KoWatcher | [private]
kNotifyHandle enum value | KoWatcher | [private]
KoWatcher(HWND hWnd) | KoWatcher |
kStartHandle enum value | KoWatcher | [private]
kTerminateHandle enum value | KoWatcher | [private]
m_count | KoWatcher | [private]
m_handles | KoWatcher | [private]
m_hWnd | KoWatcher | [private]
m_isRecursive | KoWatcher | [private]
m_notificationTime | KoWatcher | [private]
m_path | KoWatcher | [private]
m_rapidNotificationCount | KoWatcher | [private]
m_section | KoWatcher | [private]
m_startEvent | KoWatcher | [private]
m_terminateEvent | KoWatcher | [private]
Notify() | KoWatcher | [private]
Run() | KoWatcher | [private]
SignalStartWatch(LPCTSTR path, bool isRecursive) | KoWatcher |
SignalTerminate() | KoWatcher |
StartWatch() | KoWatcher | [private]
StopWatch() | KoWatcher | [private]
WM_FILECHANGE enum value | KoWatcher |
~KoWatcher() | KoWatcher | [private]

Generated on Sat Aug 7 22:54:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UObject Member List

This is the complete list of members for UObject, including all inherited members.

_GetBaseClass() | UObject | [static]
classUObject | UObject | [protected, static]
CreateObject(const char *className) | UObject | [static]
GetRuntimeClass() const | UObject | [virtual]
IsKindOf(const URuntimeClass *pClass) const | UObject |
rtUObject() | UObject | [static]
UObject() | UObject | [inline, protected]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/udraw.cpp Source File

rf/udraw.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 2000
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #include "udraw.h"
00028 #include "uwidget.h"
00029
00030 #ifndef MIN
00031 #   define MIN(a, b) ((a) < (b) ? (a) : (b))
00032 #endif
00033
00034 #ifndef MAX
00035 #   define MAX(a, b) ((a) > (b) ? (a) : (b))
00036 #endif
00037
00038 bool PtInRect(const URECT *r, UPOINT pt)
00039 {
00040     return pt.x >= r->left && pt.x < r->right &&
00041         pt.y >= r->top && pt.y < r->bottom;
00042 }
00043
00044 void SetRect(URECT *r, int x1, int y1, int x2, int y2)
00045 {
00046     r->left = x1;
00047     r->top = y1;
00048     r->right = x2;
00049     r->bottom = y2;
00050     if(r->left > r->right)
00051         r->left = r->right;
00052     if(r->top > r->bottom)
00053         r->top = r->bottom;
00054 }
00055
00056 void SetRectEmpty(URECT *r)
00057 {
00058     r->left = 0;
00059     r->top = 0;
00060     r->right = 0;
00061     r->bottom = 0;
00062 }
00063
00064 bool EqualRect(const URECT *r1, const URECT *r2)
00065 {
00066     return r1->left == r2->left && r1->top == r2->top &&
00067         r1->right == r2->right && r1->bottom == r2->bottom;
00068 }
00069 void InflateRect(URECT *r, int x, int y)
00070 {
00071     r->left += x;
00072     r->top += y;
00073     r->right -= x;
00074     r->bottom -= y;
00075     if(r->left > r->right)
00076         r->left = r->right;
00077     if(r->top > r->bottom)
00078         r->top = r->bottom;
00079 }
00080
00081 void OffsetRect(URECT *r, int x, int y)
00082 {
00083     r->left += x;
00084     r->right += x;
00085     r->top += y;
00086     r->bottom += y;
00087 }
00088
00089 inline bool IsRectEmpty(const URECT *r)
00090 {
00091     return r->left == r->right || r->top == r->bottom;
00092 }
00093
00094 bool UnionRect(URECT *dest, const URECT *src1, const URECT *src2)
00095 {
00096     if(::IsRectEmpty(src1))
00097     {
00098         *dest = *src2;
00099         return true;
00100     }
00101     if(::IsRectEmpty(src2))
00102     {
00103         *dest = *src1;
00104         return true;
00105     }
00106     dest->left = MIN (src1->left, src2->left);
00107     dest->top = MIN (src1->top, src2->top);
00108     dest->right = MAX (src1->right, src2->right);
00109     dest->bottom = MAX (src1->bottom, src2->bottom);
00110     return true;
00111 }
00112
00113 bool IntersectRect(URECT *dest, const URECT *src1, const URECT *src2)
00114 {
00115     const URECT *temp;
00116     bool return_val = false;
00117
00118     if (src2->left < src1->left)
00119     {
00120         temp = src1;
00121         src1 = src2;
00122         src2 = temp;
00123     }
00124     dest->left = src2->left;
00125
00126     if (src2->left < src1->right)
00127     {
00128         if (src1->right < src2->right)
00129             dest->right = src1->right;
00130         else
00131             dest->right = src2->right;
00132
00133         if (src2->top < src1->top)
00134         {
00135             temp = src1;
00136             src1 = src2;
00137             src2 = temp;
00138         }
00139         dest->top = src2->top;
00140
00141         if (src2->top < src1->bottom)
00142         {
00143             return_val = true;
00144
00145             if (src1->bottom < src2->bottom)
00146                 dest->bottom = src1->bottom;
00147             else
00148                 dest->bottom = src2->bottom;
00149
00150             if (dest->left == dest->right)
00151                 return_val = false;
00152             if (dest->top == dest->bottom)
00153                 return_val = false;
00154         }
00155     }
00156
00157     return return_val;
00158 }
00159
00160 UDC::UDC(int widid, int cmdid) : m_wid(0L), m_pen(0L), m_brush(0L)
00161 #if qGTK
00162     , m_gc(0L), m_penloc(0, 0), m_drawable(0L), m_orig(0, 0)
00163 #endif
00164 {
00165     UCmdTarget *target = UEventQueryWidget(widid);
00166     if(target == 0L || !target->IsKindOf(URUNTIME_CLASS(UWidget)))
00167         return;
00168
00169     m_wid = ((UWidget *)target)->GetWidget(cmdid);
00170 #if qGTK
00171     if(m_wid != 0L)
00172     {
00173         GtkWidget *widget = GTK_WIDGET(m_wid);
00174
00175         if(GTK_IS_DRAWING_AREA(widget))
00176         {
00177             m_drawable = GTK_DRAWING_AREA(widget)->widget.window;
00178             m_orig.x = 0;
00179             m_orig.y = 0;
00180         }
00181         else
00182             m_drawable = m_drawable;
00183         m_gc = gdk_gc_new(m_drawable);
00184         if(m_gc == 0L)
00185             m_wid = 0L;
00186         else
00187         {
00188             GdkGCValues values;
00189             gdk_gc_get_values(m_gc, &values);
00190             m_foreground = values.foreground;
00191             m_background = values.background;
00192             m_font = gdk_font_load ("-adobe-*-medium-r-normal--*-120-*-*-*-*-iso8859-*");
00193             if(m_font == 0L)
00194                 m_font = gdk_font_load ("-adobe-courier-medium-r-normal--*-120-*-*-*-*-*-*");
00195             if(m_font != 0L)
00196                 gdk_gc_set_font(m_gc, m_font);
00197         }
00198     }
00199 #endif
00200 }
00201
00202 UPen *UDC::SelectObject(UPen* pPen)
00203 {
00204     if(m_wid == 0L)
00205         return 0L;
00206
00207     UPen *oldpen = m_pen;
00208     m_pen = pPen;
00209
00210 #if qGTK
00211     if(m_pen != 0L && m_pen->m_set)
00212         gdk_gc_set_foreground(m_gc, &m_pen->m_col);
00213     else
00214         gdk_gc_set_foreground(m_gc, &m_foreground);
00215 #endif
00216
00217     return oldpen;
00218 }
00219
00220 UBrush *UDC::SelectObject(UBrush* pBrush)
00221 {
00222     if(m_wid == 0L)
00223         return 0L;
00224
00225     UBrush *oldbrush = m_brush;
00226     m_brush = pBrush;
00227
00228 #if qGTK
00229     if(m_brush != 0L && m_brush->m_set)
00230         gdk_gc_set_background(m_gc, &m_brush->m_col);
00231     else
00232         gdk_gc_set_background(m_gc, &m_background);
00233 #endif
00234
00235     return oldbrush;
00236 }
00237
00238 UDC::~UDC()
00239 {
00240 #if qGTK
00241     if(m_gc != 0L)
00242         gdk_gc_destroy(m_gc);
00243     if(m_font != 0L)
00244         gdk_font_unref (m_font);
00245 #endif
00246 }
00247
00248 bool UDC::Rectangle(const URECT *lpRect)
00249 {
00250     if(m_wid == 0L)
00251         return false;
00252
00253 #if qGTK
00254     URect r(*lpRect);
00255     if(m_brush != 0L && m_brush->m_set)
00256     {
00257         gdk_gc_set_foreground(m_gc, &m_brush->m_col);
00258         gdk_draw_rectangle (m_drawable, m_gc, TRUE,
00259                             r.left + m_orig.x, r.top + m_orig.y, r.Width(), r.Height());
00260         SelectObject(m_pen);
00261     }
00262     gdk_draw_rectangle (m_drawable, m_gc, FALSE,
00263                         r.left + m_orig.x, r.top + m_orig.y, r.Width(), r.Height());
00264 #endif
00265     return true;
00266 }
00267
00268 bool UDC::RoundRect(const URECT *lpRect, UPOINT point)
00269 {
00270     if(m_wid == 0L)
00271         return false;
00272
00273 #if qGTK
00274     URect r(*lpRect);
00275     if(m_brush != 0L && m_brush->m_set)
00276     {
00277         gdk_gc_set_foreground(m_gc, &m_brush->m_col);
00278         gdk_draw_rectangle (m_drawable, m_gc, TRUE,
00279                             r.left + m_orig.x, r.top + m_orig.y, r.Width(), r.Height());
00280         SelectObject(m_pen);
00281     }
00282     gdk_draw_rectangle (m_drawable, m_gc, FALSE,
00283                         r.left + m_orig.x, r.top + m_orig.y, r.Width(), r.Height());
00284 #endif
00285     return true;
00286 }
00287
00288 void UDC::MoveTo(int x, int y)
00289 {
00290     if(m_wid == 0L)
00291         return;
00292
00293 #if qGTK
00294     m_penloc.x = x + m_orig.x;
00295     m_penloc.y = y + m_orig.y;
00296 #endif
00297 }
00298
00299 void UDC::LineTo(int x, int y)
00300 {
00301     if(m_wid == 0L)
00302         return;
00303
00304 #if qGTK
00305     gdk_draw_line(m_drawable, m_gc,
00306                   m_penloc.x, m_penloc.y, x + m_orig.x, y + m_orig.y);
00307     m_penloc.x = x + m_orig.x;
00308     m_penloc.y = y + m_orig.y;
00309 #endif
00310 }
00311
00312 USize UDC::GetTextExtent(const char *lpszString, int nCount) const
00313 {
00314     USize res(0, 0);
00315     if(m_wid == 0L)
00316         return res;
00317
00318 #if qGTK
00319     if(m_font == 0L)
00320         return res;
00321
00322     res.cx = gdk_text_width(m_font, lpszString, nCount);
00323     res.cy = gdk_text_height(m_font, lpszString, nCount);
00324 #endif
00325
00326     return res;
00327 }
00328
00329 int UDC::GetTextHeight(void) const
00330 {
00331     int res = 0;
00332     if(m_wid == 0L)
00333         return res;
00334
00335 #if qGTK
00336     if(m_font == 0L)
00337         return res;
00338
00339     res = m_font->ascent + m_font->descent;
00340 #endif
00341
00342     return res;
00343 }
00344
00345 bool UDC::TextOutClipped(int x, int y, const URECT *lpRect,
00346                          const char *lpszString, int nCount)
00347 {
00348     if(m_wid == 0L)
00349         return false;
00350
00351 #if qGTK
00352     if(m_font == 0L)
00353         return false;
00354
00355     USize size = GetTextExtent(lpszString, nCount);
00356     URect r(*lpRect);
00357     UPoint out(r.left, r.bottom);
00358     out += UPoint((r.Width() - size.cx) / 2, -(r.Height() - size.cy) / 2);
00359     gdk_draw_text(m_drawable, m_font, m_gc, out.x + m_orig.x, out.y + m_orig.y,
00360                   lpszString, nCount);
00361 #endif
00362
00363     return true;
00364 }
00365
00366 bool UDC::DrawBitmap(void *bitmap, UPOINT where)
00367 {
00368     if(m_wid == 0L)
00369         return false;
00370
00371 #if qGTK
00372     if(m_font == 0L)
00373         return false;
00374
00375     gdk_draw_pixmap(m_drawable, m_gc, GTK_PIXMAP(bitmap)->pixmap,
00376                     0, 0, where.x + m_orig.x, where.y + m_orig.y, -1, -1);
00377 #endif
00378
00379     return true;
00380 }
00381
00382 UPen::UPen()
00383 #if qGTK
00384     : m_set(false)
00385 #endif
00386 {
00387 }
00388
00389 UPen::~UPen()
00390 {
00391     DeleteObject();
00392 }
00393
00394 bool UPen::DeleteObject(void)
00395 {
00396     bool res = false;
00397 #if qGTK
00398     if(m_set)
00399     {
00400         m_set = false;
00401         GdkColormap *cmap = gdk_colormap_get_system();
00402         if(cmap != 0L)
00403         {
00404             gdk_colormap_free_colors(cmap, &m_col, 1);
00405             res = true;
00406         }
00407     }
00408     else
00409         res = true;
00410 #endif
00411     return res;
00412 }
00413
00414 bool UPen::CreatePen(int nPenStyle, int nWidth, UCOLORREF crColor)
00415 {
00416     bool res = false;
00417
00418     m_width = nWidth;
00419     m_style = nPenStyle;
00420
00421 #if qGTK
00422     DeleteObject();
00423     GdkColormap *cmap = gdk_colormap_get_system();
00424     if(cmap != 0L)
00425     {
00426         m_col.red = UGetRValue(crColor) << 8;
00427         m_col.green = UGetGValue(crColor) << 8;
00428         m_col.blue = UGetBValue(crColor) << 8;
00429         if(gdk_color_alloc(cmap, &m_col))
00430             m_set = true;
00431     }
00432     res = m_set;
00433 #endif
00434     return res;
00435 }
00436
00437 UBrush::UBrush()
00438 #if qGTK
00439     : m_set(false)
00440 #endif
00441 {
00442 }
00443
00444 UBrush::~UBrush()
00445 {
00446     DeleteObject();
00447 }
00448
00449 bool UBrush::DeleteObject(void)
00450 {
00451     bool res = false;
00452 #if qGTK
00453     if(m_set)
00454     {
00455         m_set = false;
00456         GdkColormap *cmap = gdk_colormap_get_system();
00457         if(cmap != 0L)
00458         {
00459             gdk_colormap_free_colors(cmap, &m_col, 1);
00460             res = true;
00461         }
00462     }
00463     else
00464         res = true;
00465 #endif
00466     return res;
00467 }
00468
00469 bool UBrush::CreateSolidBrush(UCOLORREF crColor)
00470 {
00471     bool res = false;
00472
00473 #if qGTK
00474     DeleteObject();
00475     GdkColormap *cmap = gdk_colormap_get_system();
00476     if(cmap != 0L)
00477     {
00478         m_col.red = UGetRValue(crColor) << 8;
00479         m_col.green = UGetGValue(crColor) << 8;
00480         m_col.blue = UGetBValue(crColor) << 8;
00481         if(gdk_color_alloc(cmap, &m_col))
00482             m_set = true;
00483     }
00484     res = m_set;
00485 #endif
00486     return res;
00487 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoStateColumn Member List

This is the complete list of members for KoStateColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoStateColumn | [inline, virtual]
GetColumnIndex() const | KoStateColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoStateColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoStateColumn | [inline, virtual]
IsDefaultAscending() const | KiColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCommit_MAIN Member List

This is the complete list of members for CCommit_MAIN, including all inherited members.

CCommit_MAIN(const MultiFiles *mf, const char *logMsg) | CCommit_MAIN |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CCommit_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetLogMsg() const | CCommit_MAIN |
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CCommit_MAIN |
InitHelpID() | CCommit_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_fileToDiffCombo | CCommit_MAIN |
m_logMsg | CCommit_MAIN | [private]
m_mf | CCommit_MAIN | [private]
m_multilineEntryDlg | CCommit_MAIN | [private]
m_multilineEntryPlaceholder | CCommit_MAIN |
m_previewInfo | CCommit_MAIN |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnDestroy() | CCommit_MAIN | [protected]
OnDiff() | CCommit_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CCommit_MAIN | [protected, virtual]
OnSelchangeFiletodiff() | CCommit_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
UpdatePreviewInfo() | CCommit_MAIN | [private]
~CCommit_MAIN() | CCommit_MAIN |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:50:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ColorStatic.cpp Source File

WinCvs/ColorStatic.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- September 2001
00019  */
00020
00021 /*
00022  * ColorStatic.cpp --- color sample static control
00023  */
00024
00025 #include "stdafx.h"
00026 #include "wincvs.h"
00027 #include "ColorStatic.h"
00028
00029 #ifdef _DEBUG
00030 #define new DEBUG_NEW
00031 #undef THIS_FILE
00032 static char THIS_FILE[] = __FILE__;
00033 #endif
00034
00036 // CColorStatic
00037
00038 CColorStatic::CColorStatic()
00039 {
00040     m_color = RGB(255, 255, 255);
00041 }
00042
00043 CColorStatic::~CColorStatic()
00044 {
00045 }
00046
00047
00048 BEGIN_MESSAGE_MAP(CColorStatic, CStatic)
00049     //{{AFX_MSG_MAP(CColorStatic)
00050     ON_WM_PAINT()
00051     //}}AFX_MSG_MAP
00052 END_MESSAGE_MAP()
00053
00055 // CColorStatic message handlers
00056
00057 void CColorStatic::SetColor(COLORREF color)
00058 {
00059     m_color = color;
00060     if( IsWindow(m_hWnd) )
00061     {
00062         RedrawWindow();
00063     }
00064 }
00065
00066 COLORREF CColorStatic::GetColor()
00067 {
00068     return m_color;
00069 }
00070
00071 void CColorStatic::OnPaint()
00072 {
00073     CPaintDC dc(this); // device context for painting
00074
00075     CRect rect;
00076     GetClientRect(rect);
00077     dc.FillSolidRect(rect, m_color);
00078
00079     // Do not call CStatic::OnPaint() for painting messages
00080 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFiles.h Source File

common/UCvsFiles.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSFILES_H
00026 #define UCVSFILES_H
00027
00028 #include "uwidget.h"
00029 #include "CvsEntries.h"
00030 #include "BrowseViewHandlers.h"
00031 #include "BrowseViewModel.h"
00032 #include "BrowseViewColumn.h"
00033
00034 class UCvsFiles : public UWidget
00035 {
00036     UDECLARE_DYNAMIC(UCvsFiles)
00037 public:
00038     UCvsFiles();
00039     virtual ~UCvsFiles();
00040
00041     void OnFilteringChanged();
00042         // called to notify the view that app's filtering has changed
00043
00044     void ResetView(UStr path, bool notifyBrowser);
00045         // reset to this path and notify optionally the directories tree
00046
00047     void ResetView(const char *path, bool notifyBrowser);
00048         // reset to this path and notify optionally the directories tree
00049
00050     void ResetView(bool forceReload, bool notifyBrowser);
00051         // - reload and try to guess if something changed
00052         // according to the mod. time of CVS
00053         // - notify optionally the directories tree
00054
00055     static void *GetImageForEntry(EntnodeData *data);
00056         // return the icon of the image which symbolizes the
00057         // state of the file/directory
00058
00059     inline bool IsSortAscendant(void) { return m_ascendant; }
00060
00061     // retrieves columnar model of the data
00062     KiColumnModel* GetColumnModel() const
00063     {
00064         return m_modelColumns;
00065     }
00066
00067 protected:
00068     void GetEntriesModTime(time_t & newEntriesMod, time_t & newEntriesLogMod);
00069         // used internally to get the time stamp of the CVS/Entries
00070
00071     void EditSel(EntnodeData *data, bool useDefault = false);
00072         // used internally to open a file
00073
00074     void Resort(void);
00075         // resort according to the current key
00076
00077     CSortList<ENTNODE> m_entries;
00078         // CVS/Entries infos
00079     CStr m_path;
00080         // current path
00081     time_t m_entriesMod;
00082     time_t m_entriesLogMod;
00083         // time stamp of CVS/
00084     int m_sort;
00085         // sort key
00086     bool m_ascendant;
00087         // sort flag
00088
00089     KiColumnModel* m_modelColumns;
00090         // columnar model in use
00091
00092     bool DisableGeneric(bool needSelection);
00093     bool DisableGeneric(void);
00094         // used for the handling of EV_UPDTCMD
00095
00096     int Search(const char *title);
00097
00098     int ProcessSelectionCommand(KiSelectionHandler& handler);
00099
00100     void SaveColumns(void);
00101         // saves column state
00102
00103     bool LoadColumns(void);
00104         // loads column state
00105
00106     void ShowColumns(void);
00107         // show all columns of the actual model
00108
00109     void HideColumns(void);
00110         // hide all columns of the actual model
00111
00112     void SetRecursive(bool isRecursive);
00113
00114     bool m_isRecursive;
00115         // true if displaying recursively
00116
00117     ev_msg void OnDestroy();
00118     ev_msg void OnCreate();
00119     ev_msg int OnCmdUpdate(void);
00120     ev_msg int OnCmdAdd(void);
00121     ev_msg int OnCmdAddb(void);
00122     ev_msg int OnCmdCommit(void);
00123     ev_msg int OnCmdRmv(void);
00124     ev_msg int OnCmdQueryUpdate(void);
00125     ev_msg int OnCmdUpone(void);
00126     ev_msg int OnCmdTrash(void);
00127     ev_msg int OnCmdDiff(void);
00128     ev_msg int OnCmdLog(void);
00129     ev_msg int OnCmdGraph(void);
00130     ev_msg int OnCmdStatus(void);
00131     ev_msg int OnCmdLock(void);
00132     ev_msg int OnCmdUnlock(void);
00133     ev_msg int OnCmdWatchOn(void);
00134     ev_msg int OnCmdWatchOff(void);
00135     ev_msg int OnCmdEdit(void);
00136     ev_msg int OnCmdResEdit(void);
00137     ev_msg int OnCmdUnedit(void);
00138     ev_msg int OnCmdWatchers(void);
00139     ev_msg int OnCmdEditors(void);
00140     ev_msg int OnCmdRelease(void);
00141     ev_msg int OnCmdTagNew(void);
00142     ev_msg int OnCmdTagDelete(void);
00143     ev_msg int OnCmdTagBranch(void);
00144     ev_msg int OnCmdExplore(void);
00145     ev_msg int OnCmdEditsel(void);
00146     ev_msg int OnCmdEditseldef(void);
00147     ev_msg int OnMacroSel(int cmd);
00148     ev_msg int OnViewRecursive(void);
00149     ev_msg void OnCmdUIUpdate(UCmdUI *pCmdUI);
00150     ev_msg void OnCmdUIAdd(UCmdUI *pCmdUI);
00151     ev_msg void OnCmdUIAddB(UCmdUI *pCmdUI);
00152     ev_msg void OnCmdUIRelease(UCmdUI *pCmdUI);
00153     ev_msg void OnCmdUIRmv(UCmdUI *pCmdUI);
00154     ev_msg void OnCmdUIGraph(UCmdUI *pCmdUI);
00155     ev_msg void OnCmdUIEditseldef(UCmdUI *pCmdUI);
00156     ev_msg void OnCmdUIResEdit(UCmdUI *pCmdUI);
00157     ev_msg void OnCmdUIUpone(UCmdUI *pCmdUI);
00158     ev_msg void OnCmdUITrash(UCmdUI *pCmdUI);
00159     ev_msg void OnCmdUIExplore(UCmdUI *pCmdUI);
00160     ev_msg void OnCmdUIMacroSel(int cmd, UCmdUI *pCmdUI);
00161     ev_msg void OnCmdUIViewRecursive(UCmdUI *pCmdUI);
00162     ev_msg void OnDblClick(void);
00163     ev_msg void OnPopup(void);
00164     ev_msg void OnSelColumn(int column);
00165
00166     UDECLARE_MESSAGE_MAP()
00167 public:
00168     // member access
00169     const CStr& GetPath() const { return m_path; };
00170 };
00171
00172 #endif
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CFillPyEntries Member List

This is the complete list of members for CFillPyEntries, including all inherited members.

CFillPyEntries(CSortList< ENTNODE > &entries) | CFillPyEntries | [inline]
EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | CFillPyEntries | [inline, virtual]
ExitDirectory(const char *fullpath) | CFillPyEntries | [inline, virtual]
GetRefRunning() | TraversalReport | [static]
m_entries | CFillPyEntries |
m_ignlist | CFillPyEntries |
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | CFillPyEntries | [inline, virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | CFillPyEntries | [inline, virtual]
OnError(const char *err, int errcode) | CFillPyEntries | [inline, virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | CFillPyEntries | [inline, virtual]
OnIdle(const char *fullpath) | CFillPyEntries | [inline, virtual]
~CFillPyEntries() | CFillPyEntries | [inline, virtual]

Generated on Sat Aug 7 22:52:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCvsRootConsole Member List

This is the complete list of members for CCvsRootConsole, including all inherited members.

CCvsRootConsole() | CCvsRootConsole |
cvs_err(const char *txt, long len) | CCvsRootConsole | [virtual]
cvs_out(const char *txt, long len) | CCvsRootConsole | [virtual]
GetCvsErr() | CCvsRootConsole |
GetLaunchRes() const | CCvsRootConsole |
m_cvsErr | CCvsRootConsole | [protected]
m_cvsOut | CCvsRootConsole | [protected]
m_launchRes | CCvsRootConsole | [protected]
Parse(int launchRes)=0L | CCvsRootConsole | [pure virtual]
~CCvsRootConsole() | CCvsRootConsole | [virtual]

Generated on Sat Aug 7 22:51:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MMenuString.h Source File

WinCvs/MMenuString.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2004
00019  */
00020
00021 // MMenuString.h: interface for the CMMenuString class.
00022 //
00024
00025 #if !defined(AFX_MMENUSTRING_H__6C55ACE9_20FB_42DE_B678_7EA6A3AF99B3__INCLUDED_)
00026 #define AFX_MMENUSTRING_H__6C55ACE9_20FB_42DE_B678_7EA6A3AF99B3__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00033 class CMMenuString : public CPersistent
00034 {
00035 public:
00036     // Construction
00037     CMMenuString(unsigned int maxstr, const char* uniqueName, char* const* defaultStr = 0L);
00038     virtual ~CMMenuString();
00039
00040     virtual unsigned int SizeOf(void) const;
00041     virtual const void* GetData(void) const;
00042     virtual void SetData(const void* ptr, unsigned int size);
00043
00044     void Insert(const char* newstr);
00045
00046     inline const std::vector<UStr>& GetList(void) const { return fAllStrs; }
00047     inline std::vector<UStr>& GetList(void) { TouchTimeStamp(); return fAllStrs; }
00048
00049 protected:
00050     // Data members
00051     std::vector<UStr> fAllStrs;
00052     CStaticAllocT<char> fBuf;
00053     unsigned int fMaxStr;
00054 };
00055
00056 #endif // !defined(AFX_MMENUSTRING_H__6C55ACE9_20FB_42DE_B678_7EA6A3AF99B3__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGfxOutBarCtrl::CBarItem Member List

This is the complete list of members for CGfxOutBarCtrl::CBarItem, including all inherited members.

CBarItem(LPCTSTR name, const int image, DWORD exData) | CGfxOutBarCtrl::CBarItem |
cItem | CGfxOutBarCtrl::CBarItem |
dwData | CGfxOutBarCtrl::CBarItem |
iImageIndex | CGfxOutBarCtrl::CBarItem |
~CBarItem() | CGfxOutBarCtrl::CBarItem | [virtual]

Generated on Sat Aug 7 22:52:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFlatButton.cpp Source File

WinCvs/CJLib/CJLibrary/CJFlatButton.cpp

Go to the documentation of this file.
00001 // CJFlatButton.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2000/02/29 22:28:40 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/CJLibrary/CJFlatButton.cpp $
00011  *
00012  * $History: CJFlatButton.cpp $
00013  *
00014  * *****************  Version 19  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:00p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Further Updates to OnEraseBkgnd(...) and OnPaint() for flicker free
00018  * drawing.
00019  *
00020  * *****************  Version 18  *****************
00021  * User: Kirk Stowell Date: 10/30/99   Time: 1:47p
00022  * Updated in $/CodeJock/CJLibrary
00023  * Overrode OnEraseBkgnd(...) and made modifications to DrawItem(...) to
00024  * handle flicker free drawing.
00025  *
00026  * *****************  Version 17  *****************
00027  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00028  * Updated in $/CodeJock/CJLibrary
00029  * Modified resource include for static builds.
00030  *
00031  * *****************  Version 16  *****************
00032  * User: Kirk Stowell Date: 10/24/99   Time: 4:28p
00033  * Updated in $/CodeJock/CJLibrary
00034  * Added method SetAlternateColors(...) which will allow the user to
00035  * define the "face", "hilight" and "shadow" colors used by the control
00036  * rather than used the system defaults. Thanks to Ronen Magid
00037  * [ronenm@simplement.co.il] for his suggestions.
00038  *
00039  * *****************  Version 15  *****************
00040  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00041  * Updated in $/CodeJock/CJLibrary
00042  * Fixed potential resource and memory leak problems.
00043  *
00044  * *****************  Version 14  *****************
00045  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00046  * Updated in $/CodeJockey/CJLibrary
00047  * Updated copyright and contact information.
00048  *
00049  * *****************  Version 13  *****************
00050  * User: Kirk Stowell Date: 8/29/99    Time: 9:46p
00051  * Updated in $/CodeJockey/CJLibrary
00052  * Fixed bug when the button is pressed 2 times very quickly, the button
00053  * is only pressed once - Stephan Neumann <neumann@dialogs.de>
00054  *
00055  * *****************  Version 12  *****************
00056  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00057  * Updated in $/CodeJockey/CJLibrary
00058  * Added Unicode compliance, thanks to Barry Burton for his help with
00059  * this.
00060  *
00061  *
00062  * *****************  Version 11  *****************
00063  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00064  * Updated in $/CodeJockey/CJLibrary
00065  *
00066  * *****************  Version 10  *****************
00067  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00068  * Updated in $/CodeJockey/CJLibrary
00069  *
00070  * *****************  Version 9  *****************
00071  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00072  * Updated in $/CodeJockey/CJLibrary
00073  *
00074  * *****************  Version 8  *****************
00075  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00076  * Updated in $/CodeJockey/CJLibrary
00077  *
00078  * *****************  Version 7  *****************
00079  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00080  * Updated in $/CodeJockey/CJLibrary
00081  *
00082  * *****************  Version 6  *****************
00083  * User: Kirk Stowell Date: 7/18/99    Time: 10:27p
00084  * Updated in $/CodeJockey/CJLibrary
00085  * Cleaned up icon drawing function.
00086  *
00087  * *****************  Version 5  *****************
00088  * User: Kirk Stowell Date: 7/14/99    Time: 9:58p
00089  * Updated in $/CodeJockey/CJLibrary
00090  * Re-wrote class to handle icons, text and bitmaps and added additional
00091  * functionality which was needed by the CCJCaption class.
00092  *
00093  * *****************  Version 4  *****************
00094  * User: Kirk Stowell Date: 4/03/99    Time: 4:23p
00095  * Updated in $/CodeJockey/CJ60Lib
00096  * Added comments and cleaned up code.
00097  *
00098  * *****************  Version 3  *****************
00099  * User: Kirk Stowell Date: 3/13/99    Time: 4:24p
00100  * Updated in $/CodeJockey/CJ60Lib
00101  * Patrick Bergeron [patb@softimage.com] fixed the following bugs:
00102  *
00103  * Moving the cursor over the flat button doesn't raise the button right
00104  * away. We have to wait for the first timer message to arrive, which is a
00105  * bit annoying. It gives the impression that the system isn't very
00106  * responsive. So in the OnMouseMove method, we call OnTimer(1) to force
00107  * the initial update of the button.
00108  *
00109  * Sometimes, a CJFlatButton would stay in a raised state when moving the
00110  * mouse quickly over the client area of a few CJFlatButtons. The reason
00111  * turned out to be the use of a static (ahem, global) variable
00112  * "bPainted". The simple fix for this was to put bPainted as a member
00113  * variable ("m_bPainted") and use this member variable instead.
00114  *
00115  * Flat buttons are now much more responsive and behave correctly in all
00116  * cases.
00117  *
00118  * *****************  Version 2  *****************
00119  * User: Kirk Stowell Date: 10/17/98   Time: 4:24p
00120  * Updated in $/CodeJockey/CJ60Lib
00121  * Code clean up and re-organization, renamed CCJButton to CCJFlatButton.
00122  *
00123  * *****************  Version 1  *****************
00124  * User: Kirk Stowell Date: 10/17/98   Time: 4:23p
00125  * Created in $/CodeJockey/CJ60Lib
00126  * Initial re-write and release.
00127  *
00128  ***************************************************************************/
00130
00131 #include "stdafx.h"
00132 #include "CJFlatButton.h"
00133 #include "CJResource.h"
00134
00135 #ifdef _DEBUG
00136 #define new DEBUG_NEW
00137 #undef THIS_FILE
00138 static char THIS_FILE[] = __FILE__;
00139 #endif
00140
00142 // CCJFlatButton
00143
00144 IMPLEMENT_DYNAMIC(CCJFlatButton, CButton)
00145
00146 CCJFlatButton::CCJFlatButton()
00147 {
00148     m_pFont     = NULL;
00149     m_hPushed   = NULL;
00150     m_bLBtnDown = FALSE;
00151     m_bFlatLook = TRUE;
00152     m_bPainted  = FALSE;
00153     m_bAltColor = FALSE;
00154
00155     m_clrHilite = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00156     m_clrShadow = ::GetSysColor(COLOR_BTNSHADOW);
00157     m_clrDkShad = ::GetSysColor(COLOR_3DDKSHADOW);
00158     m_clrNormal = ::GetSysColor(COLOR_BTNFACE);
00159     m_clrTextGy = ::GetSysColor(COLOR_GRAYTEXT);
00160     m_clrTextNm = ::GetSysColor(COLOR_BTNTEXT);
00161
00162     m_hCursor   = AfxGetApp()->LoadCursor( IDC_HANDCUR );
00163     UpdateFont();
00164 }
00165
00166 CCJFlatButton::~CCJFlatButton()
00167 {
00168     // fix potential resource leak - KStowell - 10-21-99
00169     m_Font.DeleteObject();
00170 }
00171
00172
00173 BEGIN_MESSAGE_MAP(CCJFlatButton, CButton)
00174     //{{AFX_MSG_MAP(CCJFlatButton)
00175     ON_WM_MOUSEMOVE()
00176     ON_WM_LBUTTONDOWN()
00177     ON_WM_LBUTTONUP()
00178     ON_WM_TIMER()
00179     ON_WM_SYSCOLORCHANGE()
00180     ON_WM_SETCURSOR()
00181     ON_WM_LBUTTONDBLCLK()
00182     ON_WM_ERASEBKGND()
00183     ON_WM_PAINT()
00184     //}}AFX_MSG_MAP
00185 END_MESSAGE_MAP()
00186
00188 // CCJFlatButton message handlers
00189
00190 void CCJFlatButton::OnMouseMove(UINT nFlags, CPoint point)
00191 {
00192     if (m_bFlatLook)
00193     {
00194         SetTimer(1, 10, NULL);
00195         OnTimer(1);
00196     }
00197
00198     CButton::OnMouseMove(nFlags, point);
00199 }
00200
00201 void CCJFlatButton::OnLButtonDown(UINT nFlags, CPoint point)
00202 {
00203     m_bLBtnDown = TRUE;
00204     CButton::OnLButtonDown(nFlags, point);
00205 }
00206
00207 void CCJFlatButton::OnLButtonUp(UINT nFlags, CPoint point)
00208 {
00209     m_bLBtnDown = FALSE;
00210     CButton::OnLButtonUp(nFlags, point);
00211 }
00212
00213 void CCJFlatButton::OnTimer(UINT nIDEvent)
00214 {
00215     CRect rcItem;
00216     GetWindowRect(rcItem);
00217
00218     CPoint ptCursor;
00219     GetCursorPos(&ptCursor);
00220
00221     if(( m_bLBtnDown == TRUE ) || ( !rcItem.PtInRect( ptCursor )))
00222     {
00223         KillTimer(1);
00224
00225         if (m_bPainted == TRUE) {
00226             InvalidateRect (NULL);
00227         }
00228
00229         m_bPainted = FALSE;
00230         return;
00231     }
00232
00233     // On mouse over, show raised button.
00234     else if(( m_bFlatLook ) && ( !m_bPainted )) {
00235         CDC* pDC = GetDC();
00236         GetClientRect(rcItem);
00237         pDC->Draw3dRect( rcItem, m_clrHilite, m_clrShadow );
00238         m_bPainted = TRUE;
00239         ReleaseDC(pDC);
00240     }
00241
00242     CButton::OnTimer(nIDEvent);
00243 }
00244
00245 void CCJFlatButton::OnSysColorChange()
00246 {
00247     CButton::OnSysColorChange();
00248
00249     m_clrDkShad = ::GetSysColor(COLOR_3DDKSHADOW);
00250     m_clrTextGy = ::GetSysColor(COLOR_GRAYTEXT);
00251     m_clrTextNm = (m_bAltColor ? m_clrAltTextNm : ::GetSysColor(COLOR_BTNTEXT));
00252     m_clrNormal = (m_bAltColor ? m_clrAltNormal : ::GetSysColor(COLOR_BTNFACE));
00253     m_clrHilite = (m_bAltColor ? m_clrAltHilite : ::GetSysColor(COLOR_BTNHIGHLIGHT));
00254     m_clrShadow = (m_bAltColor ? m_clrAltShadow : ::GetSysColor(COLOR_BTNSHADOW));
00255 }
00256
00257 void CCJFlatButton::SetAlternateColors(COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm)
00258 {
00259     m_clrNormal = m_clrAltNormal = clrAltNormal;
00260     m_clrHilite = m_clrAltHilite = clrAltHilite;
00261     m_clrShadow = m_clrAltShadow = clrAltShadow;
00262     m_clrTextNm = m_clrAltTextNm = clrAltTextNm;
00263     m_bAltColor = TRUE;
00264 }
00265
00266 void CCJFlatButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00267 {
00268     ASSERT(lpDrawItemStruct != NULL);
00269
00270     // define some temporary variables.
00271     CDC*  pDC    = CDC::FromHandle( lpDrawItemStruct->hDC );
00272     CRect rcItem = lpDrawItemStruct->rcItem;
00273     int   nState = lpDrawItemStruct->itemState;
00274
00275     // Paint the background.
00276     pDC->FillSolidRect( rcItem, m_clrNormal );
00277
00278     // Draw flat button border.
00279     if( m_bFlatLook ) {
00280         pDC->Draw3dRect( rcItem, (nState & ODS_SELECTED)?m_clrShadow:m_clrNormal,
00281             (nState & ODS_SELECTED)?m_clrHilite:m_clrNormal );
00282     }
00283
00284     // Draw normal border.
00285     else {
00286         pDC->Draw3dRect( rcItem, (nState & ODS_SELECTED)?m_clrDkShad:m_clrHilite,
00287             (nState & ODS_SELECTED)?m_clrHilite:m_clrDkShad);
00288         rcItem.DeflateRect(1,1);
00289         pDC->Draw3dRect( rcItem, (nState & ODS_SELECTED)?m_clrShadow:m_clrNormal,
00290             (nState & ODS_SELECTED)?m_clrNormal:m_clrShadow);
00291     }
00292
00293     // Set the background mode to transparent.
00294     pDC->SetBkMode( TRANSPARENT );
00295
00296     // draw the button text, icon or bitmap.
00297     DrawButtonText(pDC, nState, rcItem);
00298     DrawButtonIcon(pDC, nState, rcItem);
00299     DrawButtonBitmap(pDC, nState, rcItem);
00300 }
00301
00302 void CCJFlatButton::DrawButtonText(CDC* pDC, UINT nState, CRect& rcItem)
00303 {
00304     // Get the window text, return if empty.
00305     CString strWindowText; GetWindowText(strWindowText);
00306     if( strWindowText.IsEmpty( ))
00307         return;
00308
00309     if( m_pFont == NULL ) {
00310         m_pFont = &m_Font;
00311     }
00312
00313     CRect rc = rcItem;
00314     rc.DeflateRect( 2,0 );
00315
00316     // Set the text color and select the button font.
00317     pDC->SetTextColor(( nState & ODS_DISABLED )?m_clrTextGy:m_clrTextNm);
00318     CFont *oldFont = pDC->SelectObject( m_pFont );
00319
00320     // if the button is selected.
00321     if( nState & ODS_SELECTED ) {
00322         rc.OffsetRect(1,1);
00323     }
00324
00325     // draw the text, and select the original font.
00326     pDC->DrawText( strWindowText, -1, rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE );
00327     pDC->SelectObject( oldFont );
00328 }
00329
00330 void CCJFlatButton::DrawButtonIcon(CDC* pDC, UINT nState, CRect& rcItem)
00331 {
00332     UNUSED_ALWAYS( rcItem );
00333
00334     // get the handle to the icon (if any) associated
00335     // with this button.
00336     HICON hIcon = GetIcon();
00337     if( hIcon == NULL ) {
00338         return;
00339     }
00340
00341     CRect rcWnd;
00342     GetWindowRect(&rcWnd);
00343
00344     int left   = (rcWnd.Width()-m_sizeIcon.cx)/2;
00345     int right  = left+m_sizeIcon.cx;
00346     int top    = (rcWnd.Height()-m_sizeIcon.cy)/2;
00347     int bottom = top+m_sizeIcon.cy;
00348
00349     // determine the size of the icon to be drawn.
00350     CRect rc(left,top,right,bottom);
00351
00352     // if the button is selected.
00353     if( nState & ODS_SELECTED )
00354     {
00355         if( m_hPushed ) {
00356             hIcon = m_hPushed;
00357         }
00358         else {
00359             rc.OffsetRect(1,1);
00360         }
00361     }
00362
00363     // draw the icon associated with this button.
00364     pDC->DrawState( rc.TopLeft(), rc.Size(), hIcon,
00365         ( nState & ODS_DISABLED )?DSS_DISABLED:DSS_NORMAL, (HBRUSH)NULL );
00366 }
00367
00368 void CCJFlatButton::DrawButtonBitmap(CDC* pDC, UINT nState, CRect& rcItem)
00369 {
00370     // get the handle to the bitmap (if any) associated
00371     // with this button.
00372     HBITMAP hBitmap = GetBitmap();
00373     if( hBitmap == NULL ) {
00374         return;
00375     }
00376
00377     CRect rc = rcItem;
00378
00379     // if the button is selected.
00380     if( nState & ODS_SELECTED ) {
00381         rcItem.OffsetRect(1,1);
00382     }
00383
00384     // draw the bitmap associated with this button.
00385     pDC->DrawState( rc.TopLeft(), rc.Size(), hBitmap,
00386         ( nState & ODS_DISABLED )?DSS_DISABLED:DSS_NORMAL, (HBRUSH)NULL );
00387 }
00388
00389
00390 BOOL CCJFlatButton::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
00391 {
00392     UNUSED_ALWAYS( pWnd );
00393     UNUSED_ALWAYS( nHitTest );
00394     UNUSED_ALWAYS( message );
00395
00396     ::SetCursor( m_hCursor );
00397
00398     return TRUE;
00399 }
00400
00401 void CCJFlatButton::UpdateFont()
00402 {
00403     m_Font.DeleteObject();
00404     NONCLIENTMETRICS ncm;
00405     ncm.cbSize = sizeof(ncm);
00406     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00407     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00408 }
00409
00410 void CCJFlatButton::OnLButtonDblClk(UINT nFlags, CPoint point)
00411 {
00412     POINT pt;
00413
00414     ::GetCursorPos(&pt);
00415     ::MapWindowPoints(NULL,(HWND)(m_hWnd),&pt,1);
00416     ::SendMessage((HWND)(m_hWnd),WM_LBUTTONDOWN,0,MAKELPARAM(pt.x,pt.y));
00417
00418     CButton::OnLButtonDblClk(nFlags, point);
00419 }
00420
00421 BOOL CCJFlatButton::OnEraseBkgnd(CDC* pDC)
00422 {
00423     // KStowell - overridden for flicker-free drawing.
00424     UNUSED_ALWAYS(pDC);
00425     return TRUE;
00426 }
00427
00428 void CCJFlatButton::OnPaint()
00429 {
00430     CPaintDC dc(this); // device context for painting
00431
00432     // KStowell - Get the client rect.
00433     CRect rcClient, rcClip;
00434     dc.GetClipBox( &rcClip );
00435     GetClientRect( &rcClient );
00436
00437     // KStowell - Create a memory device-context. This is done to help reduce
00438     // screen flicker, since we will paint the entire control to the
00439     // off screen device context first.
00440     CDC memDC;
00441     CBitmap bitmap;
00442     memDC.CreateCompatibleDC(&dc);
00443     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00444     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00445
00446     // KStowell - Repaint the background.
00447     memDC.FillSolidRect(rcClient, m_clrNormal);
00448
00449     // let the control do its default drawing.
00450     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00451
00452     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00453     dc.BitBlt( rcClip.left, rcClip.top, rcClip.Width(), rcClip.Height(), &memDC,
00454         rcClip.left, rcClip.top, SRCCOPY );
00455
00456     // KStowell - Cleanup resources.
00457     memDC.SelectObject(pOldBitmap);
00458     memDC.DeleteDC();
00459     bitmap.DeleteObject();
00460 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMDIChildWnd Member List

This is the complete list of members for CCJMDIChildWnd, including all inherited members.

brdrAllRaised enum value | CCJMDIChildWnd | [protected]
brdrFlatAll enum value | CCJMDIChildWnd | [protected]
brdrFlatBottom enum value | CCJMDIChildWnd | [protected]
brdrFlatHorizontal enum value | CCJMDIChildWnd | [protected]
brdrFlatLeft enum value | CCJMDIChildWnd | [protected]
brdrFlatRight enum value | CCJMDIChildWnd | [protected]
brdrFlatTop enum value | CCJMDIChildWnd | [protected]
brdrFlatVertical enum value | CCJMDIChildWnd | [protected]
CCJMDIChildWnd() | CCJMDIChildWnd |
DockControlBarLeftOf(CControlBar *Bar, CControlBar *LeftOf) | CCJMDIChildWnd | [protected, virtual]
DockFlatBorders enum name | CCJMDIChildWnd | [protected]
DockSizeBar(CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL) | CCJMDIChildWnd | [protected, virtual]
dwDockBarMap | CCJMDIChildWnd | [protected, static]
EnableDocking(DWORD dwDockStyle) | CCJMDIChildWnd | [protected, virtual]
EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised) | CCJMDIChildWnd | [protected, virtual]
GetInitializedMenu(UINT nMenuID, UINT nToolBarID) | CCJMDIChildWnd | [virtual]
GetInitializedMenu(UINT nMenuID, UINT *nToolbarIDs, int nSize) | CCJMDIChildWnd | [virtual]
GetMenuID() | CCJMDIChildWnd | [virtual]
GetToolBarID() | CCJMDIChildWnd | [virtual]
GetToolBarIDs(int &nCount) | CCJMDIChildWnd | [virtual]
m_hMenu | CCJMDIChildWnd | [protected]
m_nCount | CCJMDIChildWnd | [protected]
m_nMenuID | CCJMDIChildWnd | [protected]
m_nToolBarID | CCJMDIChildWnd | [protected]
m_nToolBarIDs | CCJMDIChildWnd | [protected]
OnEraseBkgnd(CDC *pDC) | CCJMDIChildWnd | [protected]
RecalcAllExcept(CCJSizeDockBar *pBar) | CCJMDIChildWnd | [protected, virtual]
RecalcLayout(BOOL bNotify=TRUE) | CCJMDIChildWnd | [virtual]
SetResourceIDs(UINT nMenuID, UINT nToolBarID) | CCJMDIChildWnd | [virtual]
SetResourceIDs(UINT nMenuID, UINT *nToolBarIDs, int nCount) | CCJMDIChildWnd | [virtual]
~CCJMDIChildWnd() | CCJMDIChildWnd | [virtual]

Generated on Sat Aug 7 22:49:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ExploreBar.h Source File

WinCvs/ExploreBar.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(AFX_EXPLOREBAR_H__A132A164_1A90_11D3_B1A1_004095463819__INCLUDED_)
00022 #define AFX_EXPLOREBAR_H__A132A164_1A90_11D3_B1A1_004095463819__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // ExploreBar.h : header file
00028 //
00029
00030 #include "CJShellTree.h"
00031
00033 // CExploreBar view
00034
00035 class CMyShellTree : public CCJShellTree
00036 {
00037     DECLARE_DYNAMIC(CMyShellTree)
00038
00039 protected:
00040     bool DisableCommon();
00041
00042     //{{AFX_MSG(CMyShellTree)
00043     afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);
00044     afx_msg void OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult);
00045     afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
00046     afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
00047     //}}AFX_MSG
00048
00049     DECLARE_MESSAGE_MAP()
00050 };
00051
00052 class CExploreBar : public CView
00053 {
00054 protected:
00055     CExploreBar();           // protected constructor used by dynamic creation
00056     DECLARE_DYNCREATE(CExploreBar)
00057
00058 // Attributes
00059 public:
00060     CMyShellTree  m_TreeCtrl;
00061
00062 // Operations
00063 public:
00064
00065 // Overrides
00066     // ClassWizard generated virtual function overrides
00067     //{{AFX_VIRTUAL(CExploreBar)
00068     public:
00069     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00070     protected:
00071     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00072     //}}AFX_VIRTUAL
00073
00074 // Implementation
00075 protected:
00076     virtual ~CExploreBar();
00077     void OnUpdateCmd(CCmdUI* pCmdUI);
00078     bool DisableCommon();
00079
00080 #ifdef _DEBUG
00081     virtual void AssertValid() const;
00082     virtual void Dump(CDumpContext& dc) const;
00083 #endif
00084
00085     // Generated message map functions
00086 protected:
00087     //{{AFX_MSG(CExploreBar)
00088     afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00089     afx_msg void OnViewCheckout();
00090     afx_msg void OnUpdateViewCheckout(CCmdUI* pCmdUI);
00091     afx_msg void OnViewImport();
00092     afx_msg void OnUpdateViewImport(CCmdUI* pCmdUI);
00093     //}}AFX_MSG
00094     DECLARE_MESSAGE_MAP()
00095 };
00096
00098
00099 //{{AFX_INSERT_LOCATION}}
00100 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00101
00102 #endif // !defined(AFX_EXPLOREBAR_H__A132A164_1A90_11D3_B1A1_004095463819__INCLUDED_)
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJWindowPlacement Member List

This is the complete list of members for CCJWindowPlacement, including all inherited members.

CCJWindowPlacement() | CCJWindowPlacement |
LoadWindowPos(CFrameWnd *pFrameWnd, LPCTSTR lpszFormat=NULL, LPCTSTR lpszSection=NULL, LPCTSTR lpszWndPos=NULL) | CCJWindowPlacement | [virtual]
m_strFormat | CCJWindowPlacement | [private]
m_strSection | CCJWindowPlacement | [private]
m_strWndPos | CCJWindowPlacement | [private]
SaveWindowPos(CFrameWnd *pFrameWnd) | CCJWindowPlacement | [virtual]
~CCJWindowPlacement() | CCJWindowPlacement | [virtual]

Generated on Sat Aug 7 22:50:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJOutlookBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJOutlookBar.cpp

Go to the documentation of this file.
00001 // CJOutlookBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJOutlookBar.cpp $
00011  *
00012  * $History: CJOutlookBar.cpp $
00013  *
00014  * *****************  Version 11  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 2:03p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Added COLORREF members to class to eliminate continuous calls to
00018  * GetSysColor(...). Overrode OnSysColorChange() to re-initialize COLORREF
00019  * variables.
00020  *
00021  * *****************  Version 10  *****************
00022  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00023  * Updated in $/CodeJock/CJLibrary
00024  * Fixed potential resource and memory leak problems.
00025  *
00026  * *****************  Version 9  *****************
00027  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00028  * Updated in $/CodeJockey/CJLibrary
00029  * Updated copyright and contact information.
00030  *
00031  * *****************  Version 8  *****************
00032  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00033  * Updated in $/CodeJockey/CJLibrary
00034  *
00035  * *****************  Version 7  *****************
00036  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00037  * Updated in $/CodeJockey/CJLibrary
00038  *
00039  * *****************  Version 6  *****************
00040  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00041  * Updated in $/CodeJockey/CJLibrary
00042  *
00043  * *****************  Version 5  *****************
00044  * User: Kirk Stowell Date: 6/14/99    Time: 10:44p
00045  * Updated in $/CodeJockey/CJ60Lib
00046  * Cleaned up code to eliminate level 4 compilier warnings.
00047  *
00048  * *****************  Version 4  *****************
00049  * User: Kirk Stowell Date: 4/03/99    Time: 10:43p
00050  * Updated in $/CodeJockey/CJ60Lib
00051  * Added comments and cleaned up code.
00052  *
00053  * *****************  Version 3  *****************
00054  * User: Kirk Stowell Date: 3/03/99    Time: 10:43p
00055  * Updated in $/CodeJockey/CJ60Lib
00056  * Changed images list's to pointer vars passed into class.
00057  *
00058  * *****************  Version 2  *****************
00059  * User: Kirk Stowell Date: 2/24/99    Time: 10:42p
00060  * Updated in $/CodeJockey/CJ60Lib
00061  * Christopher Brown (Allknowing@earthlink.net) some modifications to
00062  * correct icon resource leak, and eliminate screen flicker.
00063  *
00064  * *****************  Version 1  *****************
00065  * User: Kirk Stowell Date: 10/17/98   Time: 10:42p
00066  * Created in $/CodeJockey/CJ60Lib
00067  * Initial re-write and release.
00068  *
00069  ***************************************************************************/
00071
00072 #include "stdafx.h"
00073 #include "CJOutlookBar.h"
00074
00075 #ifdef _DEBUG
00076 #define new DEBUG_NEW
00077 #undef THIS_FILE
00078 static char THIS_FILE[] = __FILE__;
00079 #endif
00080
00082 // CCJOutlookBar
00083
00084 CCJOutlookBar::CCJOutlookBar()
00085 {
00086     m_bLBDown           = false;
00087     m_bHilight          = true;
00088     m_pImageListLarge   = NULL;
00089     m_pImageListSmall   = NULL;
00090     m_pOwner            = NULL;
00091     m_clrHilite         = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00092     m_clrShadow         = ::GetSysColor(COLOR_BTNSHADOW);
00093     m_clrDkShad         = ::GetSysColor(COLOR_3DDKSHADOW);
00094     m_clrNormal         = ::GetSysColor(COLOR_BTNFACE);
00095     m_clrTextNm         = ::GetSysColor(COLOR_WINDOW);
00096
00097     UpdateFont();
00098 }
00099
00100 CCJOutlookBar::~CCJOutlookBar()
00101 {
00102     // fix potential resource leak - KStowell - 10-22-99.
00103     m_Font.DeleteObject();
00104 }
00105
00106 IMPLEMENT_DYNAMIC(CCJOutlookBar, CListBox)
00107
00108 BEGIN_MESSAGE_MAP(CCJOutlookBar, CListBox)
00109     //{{AFX_MSG_MAP(CCJOutlookBar)
00110     ON_WM_ERASEBKGND()
00111     ON_WM_LBUTTONDOWN()
00112     ON_WM_LBUTTONUP()
00113     ON_WM_MOUSEMOVE()
00114     ON_WM_TIMER()
00115     ON_WM_PAINT()
00116     ON_WM_SYSCOLORCHANGE()
00117     //}}AFX_MSG_MAP
00118 END_MESSAGE_MAP()
00119
00121 // CCJOutlookBar message handlers
00122
00123 // Checks mouse movement, sets point member, sets timer.
00124 void CCJOutlookBar::OnMouseMove(UINT nFlags, CPoint point)
00125 {
00126     m_point = point;
00127     SetTimer (1, 10, NULL);
00128     CListBox::OnMouseMove(nFlags, point);
00129 }
00130
00131 // Sets bLBDown member to true, and sets current selection
00132 void CCJOutlookBar::OnLButtonDown(UINT nFlags, CPoint point)
00133 {
00134     m_bLBDown = true;
00135     SetCurSel(GetCurSel());
00136     CListBox::OnLButtonDown(nFlags, point);
00137 }
00138
00139 // Sets bLBDown member to false, and sets current selection
00140 void CCJOutlookBar::OnLButtonUp(UINT nFlags, CPoint point)
00141 {
00142     m_bLBDown = false;
00143     int nIndex = GetCurSel();
00144     SetCurSel(nIndex);
00145
00146     ASSERT(m_pOwner);
00147     m_pOwner->SendMessage(OBN_SELENDOK, (LPARAM)nIndex, (WPARAM)GetDlgCtrlID());
00148
00149     CListBox::OnLButtonUp(nFlags, point);
00150 }
00151
00152 // Sets the hilite flag based on cursor position.
00153 void CCJOutlookBar::OnTimer(UINT /*nIDEvent*/)
00154 {
00155     BOOL   bOutSide;
00156     CRect  rItem;
00157     CRect  rWindow;
00158     CPoint pt;
00159     int    nIndex;
00160
00161     // Get the rect of the current window,
00162     // get the current cursor position.
00163     GetWindowRect (rWindow);
00164     GetCursorPos (&pt);
00165
00166     // If the mouse is in the rect of this window,
00167     // set hilite flag to true, get the item that
00168     // the mouse is over.
00169     if (rWindow.PtInRect (pt)) {
00170         m_bHilight = true;
00171         nIndex = ItemFromPoint (m_point, bOutSide);
00172
00173         if (nIndex != GetCurSel() && !bOutSide) {
00174             SetCurSel( nIndex );
00175         }
00176     }
00177
00178     // If the mouse is not in the rect of
00179     // this window, kill the timer, set hilite flag
00180     // to false, and return.
00181     else {
00182         m_bHilight = false;
00183         if( !m_bLBDown ) {
00184           SetCurSel (-1);
00185         }
00186         KillTimer(1);
00187     }
00188 }
00189
00191 // Initial draw routine, draws button on mouse over,
00192 // on mouse press, and on mouse out.
00193
00194 void CCJOutlookBar::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
00195 {
00196     CDC*            pDC = CDC::FromHandle( lpDrawItemStruct->hDC );
00197     CRect           rcItem(lpDrawItemStruct->rcItem);
00198     CRect           rClient(rcItem);
00199     CRect           rText;
00200     CPoint          Pt(((rcItem.Width() - 32) /2 ), rcItem.top + 15);
00201     CContentItems   pContents = m_pContents[ lpDrawItemStruct->itemID ];
00202     HICON           hIcon = m_pImageListLarge->ExtractIcon( pContents.GetImageID());
00203
00204     pDC->SetBkColor(m_clrShadow);
00205
00206     // deflate the client rect, and set up item and
00207     // text rect's.
00208     rClient.DeflateRect( 8, 5 );
00209     rcItem.CopyRect( rClient );
00210     rText.CopyRect( rClient );
00211     rText.top += 45;
00212     rText.bottom += 10;
00213
00214     // set the text color to white, and background mode
00215     // to transparent.
00216     pDC->SetTextColor( m_clrTextNm );
00217     pDC->SetBkMode( TRANSPARENT );
00218     CFont* pOldFont = pDC->SelectObject(&m_Font);
00219
00220     // draw the button icon and text.
00221     if( lpDrawItemStruct->itemAction& ODA_DRAWENTIRE ) {
00222         pDC->DrawIcon( Pt, hIcon );
00223         pDC->DrawText( pContents.GetText(), rText, DT_CENTER | DT_WORDBREAK );
00224     }
00225
00226     // if the left mouse button is pressed, offset
00227     // the button icon.
00228     if( m_bLBDown ) {
00229         Pt.x += 2;
00230         Pt.y += 2;
00231         rcItem.OffsetRect( 2, 2 );
00232     }
00233
00234     // deflate the button rect, and move up.
00235     rcItem.DeflateRect( 4, 16 );
00236     rcItem.top -= 8;
00237
00238     // Draw the button icon and text, if the mouse is over the
00239     // button, draw the 3d rect, either pressed,
00240     // or not pressed depending on left mouse button.
00241     if(( lpDrawItemStruct->itemState& ODS_SELECTED ) &&
00242         ( lpDrawItemStruct->itemAction& ( ODA_SELECT | ODA_DRAWENTIRE ))) {
00243
00244         rcItem.left = ( rcItem.Width()/2 )-5;
00245         rcItem.right = rcItem.left+37;
00246
00247         if( m_bHilight ) {
00248             if( m_bLBDown ) {
00249               pDC->Draw3dRect( rcItem, m_clrDkShad, m_clrNormal );
00250             } else {
00251               pDC->Draw3dRect( rcItem, m_clrNormal, m_clrDkShad );
00252             }
00253         }
00254
00255         pDC->DrawIcon( Pt, hIcon );
00256         pDC->DrawText( pContents.GetText(), rText, DT_CENTER | DT_WORDBREAK );
00257     }
00258
00259     if( !( lpDrawItemStruct->itemState& ODS_SELECTED ) &&
00260         ( lpDrawItemStruct->itemAction& ODA_SELECT )) {
00261         pDC->FillSolidRect( rClient, m_clrShadow );
00262         pDC->DrawIcon(Pt, hIcon);
00263         pDC->DrawText(pContents.GetText(), rText, DT_CENTER|DT_WORDBREAK);
00264     }
00265
00266     // To avoid ugly resource leaks that will
00267     // eventually TRASH the system, call DestroyIcon().
00268     // To reproduce bug, try resizing the window for a
00269     // good minute. Christopher Brown
00270
00271     ::DestroyIcon( hIcon );
00272     pDC->SelectObject(pOldFont);
00273 }
00274
00276 // Sets item height
00277
00278 void CCJOutlookBar::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
00279 {
00280     lpMeasureItemStruct->itemHeight = 70;
00281 }
00282
00284 // Sets the background color.
00285
00286 BOOL CCJOutlookBar::OnEraseBkgnd(CDC* pDC)
00287 {
00288     // KStowell - overridden for flicker-free drawing.
00289     UNUSED_ALWAYS(pDC);
00290     return TRUE;
00291 }
00292
00293 void CCJOutlookBar::OnPaint()
00294 {
00295     // Christopher Brown
00296     // Use a "Offscreen" DC to fill rect and
00297     // send to DefWindowProc...
00298     CClientDC memDC(this); // Henrik E. Rasmussen
00299
00300     CRect rcClip;
00301     memDC.GetClipBox(&rcClip);
00302     memDC.FillSolidRect(rcClip, m_clrShadow);
00303     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, (LPARAM)0 );
00304
00305     // Default is called for cleanup.
00306     Default();
00307 }
00308
00309 void CCJOutlookBar::UpdateFont()
00310 {
00311     m_Font.DeleteObject();
00312     NONCLIENTMETRICS ncm;
00313     ncm.cbSize = sizeof(ncm);
00314     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00315     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00316 }
00317
00318 void CCJOutlookBar::OnSysColorChange()
00319 {
00320     CListBox::OnSysColorChange();
00321
00322     m_clrHilite = ::GetSysColor(COLOR_BTNHIGHLIGHT);
00323     m_clrShadow = ::GetSysColor(COLOR_BTNSHADOW);
00324     m_clrDkShad = ::GetSysColor(COLOR_3DDKSHADOW);
00325     m_clrNormal = ::GetSysColor(COLOR_BTNFACE);
00326     m_clrTextNm = ::GetSysColor(COLOR_WINDOW);
00327 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UWidget Member List

This is the complete list of members for UWidget, including all inherited members.

_GetBaseClass() | UWidget | [protected, static]
_messageEntries | UWidget | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UWidget | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UWidget | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UWidget | [virtual]
GetThisMessageMap() | UWidget | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UWidget | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:58:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UToolbar Member List

This is the complete list of members for UToolbar, including all inherited members.

_GetBaseClass() | UToolbar | [protected, static]
_messageEntries | UToolbar | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUObject | UObject | [protected, static]
classUToolbar | UToolbar | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UToolbar | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UToolbar | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UToolbar | [virtual]
GetThisMessageMap() | UToolbar | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
m_winInfo | UToolbar | [protected]
m_wndToolBar | UToolbar | [protected]
messageMap | UToolbar | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCommands(int cmd) | UToolbar | [protected]
OnDestroy() | UToolbar | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UToolbar | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTbButton(UTB_BUTTON *info) | UToolbar | [protected]
OnTbCheckBtn(UTB_BUTTON *info) | UToolbar | [protected]
OnTbDropDown(UTB_DROPDOWN *info) | UToolbar | [protected]
OnTbEnd(void) | UToolbar | [protected]
OnTbInit(UTB_INIT *info) | UToolbar | [protected]
OnTbSeparator(void) | UToolbar | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UToolbar | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RebuildBar(bool onlyBitmap=true) | UToolbar | [protected]
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUObject() | UObject | [static]
rtUToolbar(void) | UToolbar | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UToolbar | [virtual]
UObject() | UObject | [inline, protected]
UToolbar(int widid) | UToolbar |
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UObject() | UObject | [inline, virtual]
~UToolbar() | UToolbar | [virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:57:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJTreeCtrl Member List

This is the complete list of members for CCJTreeCtrl, including all inherited members.

CCJTreeCtrl() | CCJTreeCtrl |
ClearSelection() | CCJTreeCtrl | [virtual]
EnableMultiSelect(BOOL bMultiSelect=TRUE) | CCJTreeCtrl | [virtual]
FindItem(LPCTSTR lpszSearch, BOOL bCaseSensitive=FALSE, BOOL bDownDir=TRUE, BOOL bWholeWord=FALSE, HTREEITEM hItem=NULL) | CCJTreeCtrl | [virtual]
GetFirstSelectedItem() | CCJTreeCtrl | [virtual]
GetItemBold(HTREEITEM hItem) | CCJTreeCtrl | [virtual]
GetItemColor(HTREEITEM hItem) | CCJTreeCtrl | [virtual]
GetItemFont(HTREEITEM hItem, LOGFONT *plogfont) | CCJTreeCtrl | [virtual]
GetLastItem(HTREEITEM hItem) | CCJTreeCtrl | [virtual]
GetNextItem(HTREEITEM hItem, UINT nCode) | CCJTreeCtrl | [virtual]
GetNextItem(HTREEITEM hItem) | CCJTreeCtrl | [virtual]
GetNextSelectedItem(HTREEITEM hItem) | CCJTreeCtrl | [virtual]
GetPrevItem(HTREEITEM hItem) | CCJTreeCtrl | [virtual]
GetPrevSelectedItem(HTREEITEM hItem) | CCJTreeCtrl | [virtual]
IsFindValid(HTREEITEM hti) | CCJTreeCtrl | [protected, virtual]
m_bMultiSelect | CCJTreeCtrl | [protected]
m_dwDragStart | CCJTreeCtrl | [protected]
m_hItemFirstSel | CCJTreeCtrl | [protected]
m_mapColorFont | CCJTreeCtrl | [protected]
OnEraseBkgnd(CDC *pDC) | CCJTreeCtrl | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJTreeCtrl | [protected]
OnPaint() | CCJTreeCtrl | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCJTreeCtrl | [protected, virtual]
SelectItems(HTREEITEM hItemFrom, HTREEITEM hItemTo) | CCJTreeCtrl | [virtual]
SetItemBold(HTREEITEM hItem, BOOL bBold=TRUE) | CCJTreeCtrl | [virtual]
SetItemColor(HTREEITEM hItem, COLORREF color) | CCJTreeCtrl | [virtual]
SetItemFont(HTREEITEM hItem, LOGFONT &logfont) | CCJTreeCtrl | [virtual]
~CCJTreeCtrl() | CCJTreeCtrl | [virtual]

Generated on Sat Aug 7 22:50:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

aref Member List

This is the complete list of members for aref, including all inherited members.

aref() | aref | [inline]
aref(HBITMAP b) | aref | [inline]
aref(const aref &src) | aref | [inline]
operator HBITMAP() | aref | [inline]
operator=(const aref &src) | aref | [inline]
ref | aref | [protected]
Ref(void) const | aref | [inline]
UnRef(void) const | aref | [inline]
~aref() | aref | [inline, virtual]

Generated on Sat Aug 7 22:48:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoFilterModel Member List

This is the complete list of members for KoFilterModel, including all inherited members.

ClearAll() | KoFilterModel |
GetFilters() const | KoFilterModel | [virtual]
GetNotificationManager() | KoFilterModel | [virtual]
HasAnyModified() const | KoFilterModel |
HasFilter(const int filter) const | KoFilterModel | [protected]
HasFilterMasks() const | KoFilterModel |
HasFilters() const | KoFilterModel |
IsAdded() const | KoFilterModel |
IsChanged() const | KoFilterModel |
IsConflict() const | KoFilterModel |
IsDefaultMode() const | KoFilterModel |
IsFilterMasksEnable() const | KoFilterModel |
IsHideMissing() const | KoFilterModel |
IsHideUnknown() const | KoFilterModel |
IsMatch(const EntnodeData *data) const | KoFilterModel | [virtual]
IsMissing() const | KoFilterModel |
IsModified() const | KoFilterModel |
IsRemoved() const | KoFilterModel |
IsUnknown() const | KoFilterModel |
KoFilterModel() | KoFilterModel |
LoadSettings() | KoFilterModel | [virtual]
m_context | KoFilterModel | [protected]
m_filterMask | KoFilterModel | [protected]
m_filterMasksEnable | KoFilterModel | [protected]
m_filters | KoFilterModel | [protected]
m_manager | KoFilterModel | [protected]
SaveSettings() | KoFilterModel | [virtual]
SetContext(const KoColumnContext *context) | KoFilterModel |
SetMask(int type, const char *mask) | KoFilterModel |
ToggleAdded() | KoFilterModel |
ToggleChanged() | KoFilterModel |
ToggleConflict() | KoFilterModel |
ToggleFilter(int filter) | KoFilterModel | [protected]
ToggleFilterMasksEnable() | KoFilterModel |
ToggleHideMissing() | KoFilterModel |
ToggleHideUnknown() | KoFilterModel |
ToggleMissing() | KoFilterModel |
ToggleModified() | KoFilterModel |
ToggleRemoved() | KoFilterModel |
ToggleUnknown() | KoFilterModel |
~KoFilterModel() | KoFilterModel | [virtual]

Generated on Sat Aug 7 22:54:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/GfxSplitterWnd.h Source File

WinCvs/CJLib/Include/GfxSplitterWnd.h

Go to the documentation of this file.
00001 // Copyright (c) Iuri Apollonio 1998
00002 // Use & modify as you want & need, and leave those 3 lines.
00003 // http://www.codeguru.com
00004 //
00005 // GfxSplitterWnd.h: interface for the CGfxSplitterWnd class.
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:51 $
00011  * $Revision: 1.1.1.2 $
00012  * $Archive: /CodeJock/Include/GfxSplitterWnd.h $
00013  *
00014  * $History: GfxSplitterWnd.h $
00015  *
00016  * *****************  Version 4  *****************
00017  * User: Kirk Stowell Date: 10/26/99   Time: 10:50p
00018  * Updated in $/CodeJock/Include
00019  * Made class methods virtual for inheritance purposes.
00020  *
00021  * *****************  Version 3  *****************
00022  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00023  * Updated in $/CodeJock/Include
00024  * Added source control history to file header.
00025  *
00026  ***************************************************************************/
00028
00029 #ifndef __GFXSPLITTERWND_H__
00030 #define __GFXSPLITTERWND_H__
00031
00032 #if _MSC_VER >= 1000
00033 #pragma once
00034 #endif // _MSC_VER >= 1000
00035
00036 class _CJX_EXT_CLASS CGfxSplitterWnd : public CSplitterWnd
00037 {
00038 public:
00039     int m_upBorder;
00040     bool bWhiteLine;
00041     CGfxSplitterWnd();
00042     virtual ~CGfxSplitterWnd();
00043     virtual void OnDrawSplitter(CDC* pDC, ESplitType nType, const CRect& rectArg);
00044     virtual void OnInvertTracker(const CRect & rect);
00045
00046     virtual void RecalcLayout();
00047 protected:
00048     virtual void GetInsideRect(CRect& rect) const;
00049     // Generated message map functions
00050     //{{AFX_MSG(CGfxSplitterWnd)
00051     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00052     afx_msg void OnPaint();
00053     //}}AFX_MSG
00054     DECLARE_MESSAGE_MAP()
00055 };
00056
00057 #endif // __GFXSPLITTERWND_H__
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AdminOptionDlg.cpp Source File

common/AdminOptionDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2001
00019  */
00020
00021 /*
00022  * AdminOptionDlg.cpp --- admin options dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "AdminOptionDlg.h"
00030 #   include "GetPrefs.h"
00031 #   include "CvsAlert.h"
00032 #endif /* WIN32 */
00033
00034 #ifdef _DEBUG
00035 #define new DEBUG_NEW
00036 #undef THIS_FILE
00037 static char THIS_FILE[] = __FILE__;
00038 #endif
00039
00041 char* sDefStates[] =
00042 {
00043     "Rel",
00044     "Stab",
00045     "Exp",
00046     0L
00047 };
00048
00049 extern CMString gCommitLogs;
00050 static CMString gPrevStates(10, "P_PrevStates", sDefStates);
00051
00053 // CAdminOption_MAIN dialog
00054
00055 #ifdef WIN32
00056
00057 CAdminOption_MAIN::CAdminOption_MAIN(const MultiFiles* mf, kAdminOptionDlgType type, const char* optionString,
00058                                  CWnd* pParent /*=NULL*/)
00059     : m_multilineEntryDlg(mf), CHHelpPropertyPage(CAdminOption_MAIN::IDD)
00060 {
00061     //{{AFX_DATA_INIT(CAdminOption_MAIN)
00062     //}}AFX_DATA_INIT
00063
00064     m_type = type;
00065     m_optionString = optionString;
00066
00067     // Trim trailing white spaces and fix the line endings
00068     m_optionString.TrimRight();
00069     m_optionString.Replace("\n", "\r\n");
00070
00071     // Set the page title
00072     m_psp.dwFlags |= PSP_USETITLE;
00073
00074     switch( m_type )
00075     {
00076     case kChangeLog:
00077         m_psp.pszTitle = "Log message";
00078         break;
00079     case kSetState:
00080         m_psp.pszTitle = "State";
00081         break;
00082     case kSetDescription:
00083         m_psp.pszTitle = "Description";
00084         break;
00085     default:
00086         ASSERT(FALSE); //unknown type
00087         break;
00088     }
00089 }
00090
00091
00092 void CAdminOption_MAIN::DoDataExchange(CDataExchange* pDX)
00093 {
00094     CHHelpPropertyPage::DoDataExchange(pDX);
00095     //{{AFX_DATA_MAP(CAdminOption_MAIN)
00096     DDX_Control(pDX, IDC_MULTILINE_ENTRY_STATIC, m_multilineEntryPlaceholder);
00097     //}}AFX_DATA_MAP
00098
00099     m_multilineEntryDlg.UpdateData(pDX->m_bSaveAndValidate, m_optionString);
00100 }
00101
00102
00103 BEGIN_MESSAGE_MAP(CAdminOption_MAIN, CHHelpPropertyPage)
00104     //{{AFX_MSG_MAP(CAdminOption_MAIN)
00105     //}}AFX_MSG_MAP
00106 END_MESSAGE_MAP()
00107
00109 // CAdminOption_MAIN message handlers
00110
00111 BOOL CAdminOption_MAIN::OnInitDialog()
00112 {
00113     CHHelpPropertyPage::OnInitDialog();
00114
00115     // Extra initialization
00116     SetMultilineEntry();
00117
00118     return TRUE;  // return TRUE unless you set the focus to a control
00119                   // EXCEPTION: OCX Property Pages should return FALSE
00120 }
00121
00122 void CAdminOption_MAIN::InitHelpID()
00123 {
00124     // Nothing to do, it's all in multiline entry control
00125 }
00126
00130 void CAdminOption_MAIN::SetMultilineEntry()
00131 {
00132     kMultilineEntryType multilineEntryType = kMultilineLogMessage;
00133     CMString* pPreviousEntries = &gCommitLogs;
00134
00135     switch( m_type )
00136     {
00137     case kChangeLog:
00138         multilineEntryType = kMultilineLogMessage;
00139         break;
00140     case kSetState:
00141         multilineEntryType = kMultilineState;
00142         pPreviousEntries = &gPrevStates;
00143         break;
00144     case kSetDescription:
00145         multilineEntryType = kMultilineDescription;
00146         break;
00147     default:
00148         ASSERT(FALSE); //unknown type
00149         break;
00150     }
00151
00152     m_multilineEntryDlg.Create(multilineEntryType, pPreviousEntries, &m_multilineEntryPlaceholder, this);
00153 }
00154
00159 CString CAdminOption_MAIN::GetOptionString() const
00160 {
00161     return m_optionString;
00162 }
00163
00164 #endif /* WIN32 */
00165
00169 bool CompatGetAdminOptions(const MultiFiles* mf, kAdminOptionDlgType type, CStr& optionString)
00170 {
00171     bool userHitOK = false;
00172
00173     const char* title = "Admin option settings";
00174
00175     switch( type )
00176     {
00177     case kChangeLog:
00178         title = "Change log message";
00179         break;
00180     case kSetState:
00181         title = "Set state";
00182         break;
00183     case kSetDescription:
00184         title = "Set description";
00185         break;
00186     default:
00187 #ifdef WIN32
00188         ASSERT(FALSE); //unknown type
00189 #endif
00190         break;
00191     }
00192
00193 #ifdef WIN32
00194     CHHelpPropertySheet pages(title);
00195     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00196
00197     CAdminOption_MAIN page1(mf, type, optionString.c_str());
00198     CGetPrefs_GLOBALS page2;
00199
00200     pages.AddPage(&page1);
00201     pages.AddPage(&page2);
00202
00203     if( pages.DoModal() == IDOK )
00204     {
00205         optionString = (const char*)page1.GetOptionString();
00206
00207         page2.StoreValues();
00208
00209         userHitOK = true;
00210     }
00211 #endif /* WIN32 */
00212
00213 #ifdef qMacCvsPP
00214 #endif /* qMacCvsPP */
00215 #if qUnix
00216 #endif // qUnix
00217
00218     return userHitOK;
00219 }
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJTabView Member List

This is the complete list of members for CCJTabView, including all inherited members.

AddView(LPCTSTR lpszLabel, CRuntimeClass *pViewClass, CDocument *pDoc=NULL, CCreateContext *pContext=NULL) | CCJTabView | [virtual]
CalcViewRect(CRect *pRect) | CCJTabView | [private]
CCJTabView() | CCJTabView | [protected]
GetActiveView() | CCJTabView | [virtual]
GetChildRect(CRect &rect) | CCJTabView | [virtual]
GetTabCtrl() | CCJTabView | [virtual]
GetView(CRuntimeClass *pViewClass) | CCJTabView | [virtual]
GetView(int nView) | CCJTabView | [virtual]
m_nActiveTab | CCJTabView | [protected]
m_pActiveView | CCJTabView | [protected]
m_pTabCtrl | CCJTabView | [protected]
m_pToolTip | CCJTabView | [protected]
m_TabFont | CCJTabView | [protected]
m_views | CCJTabView | [protected]
ModifyTabStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags=0) | CCJTabView | [virtual]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJTabView | [protected]
OnEraseBkgnd(CDC *pDC) | CCJTabView | [protected]
OnSelchange(NMHDR *pNMHDR, LRESULT *pResult) | CCJTabView | [protected]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CCJTabView | [protected]
RemoveView(int nView) | CCJTabView | [virtual]
SetActiveView(CRuntimeClass *pViewClass) | CCJTabView | [virtual]
SetActiveView(int nNewTab) | CCJTabView | [virtual]
SetTabImageList(CImageList *pImageList) | CCJTabView | [virtual]
~CCJTabView() | CCJTabView | [protected, virtual]

Generated on Sat Aug 7 22:50:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsSandboxInfo.cpp Source File

common/CvsSandboxInfo.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Oliver Giesen <ogware@gmx.net>
00019  */
00020
00021 // CvsSandboxInfo.cpp: implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "getline.h"
00026 #include "wincvs.h"
00027 #include "CvsSandboxInfo.h"
00028 #include <fstream>
00029 #include <strstream>
00030
00031 using std::ifstream;
00032 using std::strstream;
00033
00034 #ifdef _DEBUG
00035 #define new DEBUG_NEW
00036 #undef THIS_FILE
00037 static char THIS_FILE[] = __FILE__;
00038 #endif
00039
00041 // CCvsSandboxInfo
00042
00043 CCvsSandboxInfo::CCvsSandboxInfo(const char* path)
00044     : m_path(path)
00045 {
00046 }
00047
00048 CCvsSandboxInfo::~CCvsSandboxInfo()
00049 {
00050 }
00051
00057 string CCvsSandboxInfo::ReadAdminFile(const char* name) const
00058 {
00059     string res;
00060
00061     UStr adminPath(m_path.c_str());
00062     if( !adminPath.endsWith(kPathDelimiter) )
00063         adminPath << kPathDelimiter;
00064
00065     adminPath << "CVS";
00066     adminPath << kPathDelimiter;
00067
00068     UStr filename = adminPath;
00069     filename << name;
00070
00071     ifstream adminFile(filename);
00072     if( adminFile.is_open() )
00073     {
00074         std::getline(adminFile, res);
00075     }
00076
00077     return res;
00078 }
00079
00084 string CCvsSandboxInfo::GetRepository() const
00085 {
00086     return ReadAdminFile("Repository");
00087 }
00088
00093 string CCvsSandboxInfo::GetRoot() const
00094 {
00095     return ReadAdminFile("Root");
00096 }
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/BrowserBar.h Source File

WinCvs/BrowserBar.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(AFX_BROWSERBAR_H__64721953_F9A8_11D2_BDEC_000000000000__INCLUDED_)
00022 #define AFX_BROWSERBAR_H__64721953_F9A8_11D2_BDEC_000000000000__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // BrowserBar.h : header file
00028 //
00029
00030 #include "WinCvsBrowser.h"
00031
00033 // CBrowserBar view
00034
00035 class CBrowserBar : public CView
00036 {
00037 public:
00038     virtual ~CBrowserBar();
00039
00040 protected:
00041     CBrowserBar();           // protected constructor used by dynamic creation
00042     DECLARE_DYNCREATE(CBrowserBar)
00043
00044 // Attributes
00045 public:
00046
00047 // Operations
00048 public:
00049     inline CWinCvsBrowser *GetBrowserView() { return m_browser; }
00050
00051 // Overrides
00052     // ClassWizard generated virtual function overrides
00053     //{{AFX_VIRTUAL(CBrowserBar)
00054     public:
00055     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00056     protected:
00057     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00058     //}}AFX_VIRTUAL
00059
00060 // Implementation
00061 protected:
00062 #ifdef _DEBUG
00063     virtual void AssertValid() const;
00064     virtual void Dump(CDumpContext& dc) const;
00065 #endif
00066
00067     CWinCvsBrowser *m_browser;
00068
00069     // Generated message map functions
00070 protected:
00071     //{{AFX_MSG(CBrowserBar)
00072     afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00073     afx_msg void OnDestroy();
00074     afx_msg void OnPaint();
00075     //}}AFX_MSG
00076     DECLARE_MESSAGE_MAP()
00077 };
00078
00080
00081 //{{AFX_INSERT_LOCATION}}
00082 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00083
00084 #endif // !defined(AFX_BROWSERBAR_H__64721953_F9A8_11D2_BDEC_000000000000__INCLUDED_)
Generated on Sat Aug 7 22:43:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KiColumn Member List

This is the complete list of members for KiColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const =0 | KiColumn | [pure virtual]
GetColumnIndex() const =0 | KiColumn | [pure virtual]
GetSetupData(LV_COLUMN *lvc) const =0 | KiColumn | [pure virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const =0 | KiColumn | [pure virtual]
IsDefaultAscending() const | KiColumn | [inline, virtual]

Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

DYN_LIST Member List

This is the complete list of members for DYN_LIST, including all inherited members.

current | DYN_LIST
defaultnumcells | DYN_LIST
first | DYN_LIST
next | DYN_LIST
numentries | DYN_LIST
sizeofcell | DYN_LIST
totpage | DYN_LIST

Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

OUTBAR_INFO Member List

This is the complete list of members for OUTBAR_INFO, including all inherited members.

cText | OUTBAR_INFO
iDragFrom | OUTBAR_INFO
iDragTo | OUTBAR_INFO
index | OUTBAR_INFO

Generated on Sat Aug 7 22:55:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMainFrame Member List

This is the complete list of members for CMainFrame, including all inherited members.

brdrAllRaised enum value | CCJMDIFrameWnd | [protected]
brdrFlatAll enum value | CCJMDIFrameWnd | [protected]
brdrFlatBottom enum value | CCJMDIFrameWnd | [protected]
brdrFlatHorizontal enum value | CCJMDIFrameWnd | [protected]
brdrFlatLeft enum value | CCJMDIFrameWnd | [protected]
brdrFlatRight enum value | CCJMDIFrameWnd | [protected]
brdrFlatTop enum value | CCJMDIFrameWnd | [protected]
brdrFlatVertical enum value | CCJMDIFrameWnd | [protected]
CCJMDIFrameWnd() | CCJMDIFrameWnd |
ChangeLocation() | CMainFrame |
ClearFilters() | CMainFrame |
CMainFrame() | CMainFrame |
CreateLocationCombo() | CMainFrame | [private]
CreateStatusBar() | CMainFrame | [private]
CreateToolbar(const char *title, const UINT toolbarID, CToolBar *toolBar, CToolBar *dockToolBar=NULL, UINT childID=AFX_IDW_TOOLBAR) | CMainFrame | [private]
DockControlBarLeftOf(CToolBar *toolBar, CToolBar *dockToolBar) | CMainFrame | [private]
CCJMDIFrameWnd::DockControlBarLeftOf(CControlBar *Bar, CControlBar *LeftOf) | CCJMDIFrameWnd | [virtual]
DockFlatBorders enum name | CCJMDIFrameWnd | [protected]
DockSizeBar(CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL) | CCJMDIFrameWnd | [virtual]
DropFiles(HDROP hDropInfo) | CMainFrame |
dwDockBarMap | CCJMDIFrameWnd | [protected, static]
EnableDocking(DWORD dwDockStyle) | CCJMDIFrameWnd | [virtual]
EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised) | CCJMDIFrameWnd | [virtual]
GetBrowseHistory(void) | CMainFrame | [inline]
GetBrowserView() | CMainFrame |
GetConsoleView() | CMainFrame | [inline]
GetEnvMainThread(const char *name) | CMainFrame |
GetExplorerView() | CMainFrame |
GetFilterModel() | CMainFrame | [inline]
GetIgnoreModel() | CMainFrame | [inline]
GetMenuList(void) | CMainFrame | [inline, private]
GetRecursionModel() | CMainFrame | [inline]
GetStatusBar() | CMainFrame | [inline]
GetWorkspace() | CMainFrame | [inline]
InitializeDockingWindows() | CMainFrame | [private]
InitializeMenu(CMultiDocTemplate *pDocTemplate, UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0, UINT nDefaultMenuID=NULL) | CCJMDIFrameWnd | [virtual]
InitializeMenu(CMultiDocTemplate *pDocTemplate, UINT nMenuID, UINT nToolbarID=NULL, UINT nDefaultMenuID=NULL) | CCJMDIFrameWnd | [virtual]
InitializeMenu(HMENU *phMenu, UINT nMenuID, UINT nToolbarID=NULL) | CCJMDIFrameWnd | [virtual]
InitializeMenu(HMENU *phMenu, UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=NULL) | CCJMDIFrameWnd | [virtual]
InitialShowWindow(int nCmdShow) | CMainFrame |
IsFilterMasksEnable() const | CMainFrame |
LoadBarState(LPCTSTR lpszProfileName) | CCJMDIFrameWnd | [virtual]
LoadDockState() | CMainFrame | [private]
LoadLocationSettings() | CMainFrame |
m_bRestoreFocus | CMainFrame | [private]
m_browseHist | CMainFrame | [private]
m_consolebar | CMainFrame | [private]
m_filter | CMainFrame | [private]
m_fontNormal | CMainFrame | [private]
m_ignore | CMainFrame | [private]
m_menuList | CCJMDIFrameWnd | [protected]
m_recursion | CMainFrame | [private]
m_state | CMainFrame | [private]
m_TabImages | CMainFrame | [private]
m_wndBrowser | CMainFrame | [private]
m_wndFilter | CMainFrame | [private]
m_wndList | CMainFrame | [private]
m_wndMenuBar | CCJMDIFrameWnd | [protected]
m_wndMultiUser | CMainFrame | [private]
m_wndStatusBar | CMainFrame | [private]
m_wndTags | CMainFrame | [private]
m_wndToolBar | CMainFrame | [private]
m_wndWorkspace | CMainFrame | [private]
NewMenu(UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0) | CCJMDIFrameWnd | [protected, virtual]
NewMenu(UINT nMenuID, UINT nToolbarID=NULL) | CCJMDIFrameWnd | [protected, virtual]
OnActivate(UINT nState, CWnd *pWndOther, BOOL bMinimized) | CMainFrame | [protected]
OnBroadcastCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CMainFrame |
OnClose() | CMainFrame | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CMainFrame | [protected]
OnDropFiles(HDROP hDropInfo) | CMainFrame | [protected]
OnHistorySelect() | CMainFrame | [protected]
OnInitMenu(CMenu *pMenu) | CMainFrame | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJMDIFrameWnd | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJMDIFrameWnd | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJMDIFrameWnd | [protected]
OnSysCommand(UINT nID, LPARAM lParam) | CMainFrame | [protected]
OnTimer(UINT nIDEvent) | CMainFrame | [protected]
OnUpdateFilterMask(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateHistory(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewAdded(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewChanged(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewClearall(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewConflict(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewFilterbarClearall(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewFilterbarEnable(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewFilterbarOptions(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewHidemissing(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewHideunknown(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewIgnore(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewMissing(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewModified(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewRecursive(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewRemoved(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnUpdateViewUnknown(CCmdUI *pCmdUI) | CMainFrame | [protected]
OnViewAdded() | CMainFrame | [protected]
OnViewChanged() | CMainFrame | [protected]
OnViewClearall() | CMainFrame | [protected]
OnViewConflict() | CMainFrame | [protected]
OnViewHidemissing() | CMainFrame | [protected]
OnViewHideunknown() | CMainFrame | [protected]
OnViewIgnore() | CMainFrame | [protected]
OnViewMissing() | CMainFrame | [protected]
OnViewModified() | CMainFrame | [protected]
OnViewRecursive() | CMainFrame | [protected]
OnViewRemoved() | CMainFrame | [protected]
OnViewUnknown() | CMainFrame | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CMainFrame | [virtual]
CCJMDIFrameWnd::PreCreateWindow(CREATESTRUCT &cs, UINT nIconID) | CCJMDIFrameWnd | [protected, virtual]
RecalcAllExcept(CCJSizeDockBar *pBar) | CCJMDIFrameWnd | [virtual]
RecalcLayout(BOOL bNotify=TRUE) | CCJMDIFrameWnd | [virtual]
SaveBarState(LPCTSTR lpszProfileName) const | CCJMDIFrameWnd | [virtual]
SetContext(const KoColumnContext *context) | CMainFrame |
SetFilterBarMask(CSortHeaderCtrl &ctrlHeader, const KiColumnModel *columnModel) | CMainFrame |
StoreLocationSettings() | CMainFrame |
ToggleFilterMasksEnable() | CMainFrame |
WinHelp(DWORD dwData, UINT nCmd=HELP_CONTEXT) | CMainFrame | [virtual]
~CCJMDIFrameWnd() | CCJMDIFrameWnd | [virtual]
~CMainFrame() | CMainFrame | [virtual]

Generated on Sat Aug 7 22:55:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CvsStatusBar.cpp Source File

WinCvs/CvsStatusBar.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // CvsStatusBar.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include <math.h>
00026 #include "wincvs.h"
00027 #include "CvsStatusBar.h"
00028 #include "CvsPrefs.h"
00029 #include "CvsSandboxInfo.h"
00030 #include "AppConsole.h"
00031
00032 #ifdef _DEBUG
00033 #define new DEBUG_NEW
00034 #undef THIS_FILE
00035 static char THIS_FILE[] = __FILE__;
00036 #endif
00037
00039 static UINT indicators[] =
00040 {
00041     ID_SEPARATOR,
00042     ID_SEPARATOR,
00043     ID_SEPARATOR,
00044     ID_SEPARATOR,
00045     ID_INDICATOR_CAPS,
00046     ID_INDICATOR_NUM,
00047     ID_INDICATOR_SCRL,
00048 };
00049
00051 // CCvsStatusBar
00052
00053 CCvsStatusBar::CCvsStatusBar()
00054     : m_step(-1), m_settimer(false)
00055 {
00056     m_indic.LoadBitmap(IDB_IDLE);
00057 }
00058
00059 CCvsStatusBar::~CCvsStatusBar()
00060 {
00061 }
00062
00063 BEGIN_MESSAGE_MAP(CCvsStatusBar, CStatusBar)
00064     //{{AFX_MSG_MAP(CCvsStatusBar)
00065     ON_WM_TIMER()
00066     ON_WM_SIZE()
00067     ON_WM_CREATE()
00068     ON_WM_NCHITTEST()
00069     //}}AFX_MSG_MAP
00070 END_MESSAGE_MAP()
00071
00073 // CCvsStatusBar message handlers
00074
00080 BOOL CCvsStatusBar::SetIndicators()
00081 {
00082     return CStatusBar::SetIndicators(indicators, sizeof(indicators)/sizeof(UINT));
00083 }
00084
00089 void CCvsStatusBar::UpdatePathInfo(const char* path)
00090 {
00091     std::auto_ptr<CCvsSandboxInfo> pSandboxInfo(new CCvsSandboxInfo(path));
00092     if( pSandboxInfo.get() )
00093     {
00094         SetPaneText(kStatusCVSROOT, pSandboxInfo->GetRoot().c_str());
00095         SetPaneText(kStatusRepository, pSandboxInfo->GetRepository().c_str());
00096     }
00097 }
00098
00100 void CCvsStatusBar::DrawItem(LPDRAWITEMSTRUCT p)
00101 {
00102     if( !m_settimer )
00103     {
00104         SetTimer(999, 100, 0L);
00105         m_settimer = true;
00106     }
00107
00108     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00109     if( !app->IsCvsRunning() && !gCvsPrefs.IsTclFileRunning() )
00110         return;
00111
00112     static int tab[12] = {
00113         -2, -1, 1, 4, 8, 11, 13, 11,
00114         8, 4, 1, -1};
00115     CDC hdc;
00116     CBrush b(RGB(0, 0, 0xFF));
00117
00118     hdc.Attach(p->hDC);
00119     CRect r(p->rcItem);
00120     hdc.FillRect(r, &b);
00121     CPoint off(r.TopLeft());
00122     off.x -= m_step;
00123     int cnt = 0;
00124     while(off.x < r.right)
00125     {
00126         CPoint offy(off);
00127         offy.y += tab[(m_step + cnt) % 12];
00128         hdc.DrawState(offy, CSize(16,16), m_indic, DSS_NORMAL);
00129         off.x += 24;
00130         cnt++;
00131     }
00132
00133     hdc.Detach();
00134 }
00135
00137 void CCvsStatusBar::OnTimer(UINT nIDEvent)
00138 {
00139     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00140     if( app->IsCvsRunning() || gCvsPrefs.IsTclFileRunning() )
00141     {
00142         if( m_step-- <= 0 )
00143             m_step = 23;
00144
00145         CRect r;
00146         GetItemRect(kStatusThrobber, r);
00147         InvalidateRect(r, FALSE);
00148     }
00149     else if( m_step != -1 )
00150     {
00151         m_step = -1;
00152         CRect r;
00153         GetItemRect(kStatusThrobber, r);
00154         InvalidateRect(r, FALSE);
00155     }
00156 }
00157
00159 void CCvsStatusBar::OnSize(UINT nType, int cx, int cy)
00160 {
00161     CStatusBar::OnSize(nType, cx, cy);
00162
00163     if( CommandToIndex(ID_SEPARATOR) >= 0 )
00164     {
00165         UINT nID;
00166         UINT nStyle;
00167         int cxWidth;
00168
00169         GetPaneInfo(kStatusMain, nID, nStyle, cxWidth);
00170         SetPaneInfo(kStatusMain, nID, nStyle, int(floor(cx * .10)));
00171
00172         GetPaneInfo(kStatusCVSROOT, nID, nStyle, cxWidth);
00173         SetPaneInfo(kStatusCVSROOT, nID, nStyle, int(floor(cx * .25)));
00174
00175         GetPaneInfo(kStatusRepository, nID, nStyle, cxWidth);
00176         SetPaneInfo(kStatusRepository, nID, nStyle, int(floor(cx * .25)));
00177
00178         GetPaneInfo(kStatusThrobber, nID, nStyle, cxWidth);
00179         SetPaneInfo(kStatusThrobber, nID, nStyle | SBPS_OWNERDRAW, 100);
00180     }
00181 }
00182
00184 int CCvsStatusBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
00185 {
00186     if (CStatusBar::OnCreate(lpCreateStruct) == -1)
00187         return -1;
00188
00189     // Set indicators
00190     SetIndicators();
00191
00192     // Create tool tip
00193     if( !m_tooltip.Create(this, TTS_ALWAYSTIP | TTS_NOPREFIX) ||
00194         !m_tooltip.AddTool(this, "Status Bar") )
00195     {
00196         cvs_err("Unable to create tool tip control for status bar\n");
00197     }
00198
00199     return 0;
00200 }
00201
00203 BOOL CCvsStatusBar::PreTranslateMessage(MSG* pMsg)
00204 {
00205     m_tooltip.RelayEvent(pMsg);
00206
00207     return CStatusBar::PreTranslateMessage(pMsg);
00208 }
00209
00211 UINT CCvsStatusBar::OnNcHitTest(CPoint point)
00212 {
00213     // Set the tool tip text according to the mouse position pane
00214     const int paneCount = GetCount();
00215     for(int nIndex = 0; nIndex < paneCount; nIndex++)
00216     {
00217         CRect paneRect;
00218         GetItemRect(nIndex, paneRect);
00219         ClientToScreen(paneRect);
00220
00221         if( paneRect.PtInRect(point) )
00222         {
00223             CString strCurTip;
00224             m_tooltip.GetText(strCurTip, this);
00225
00226             CString strTip;
00227
00228             if( nIndex <= kStatusRepository )
00229             {
00230                 strTip = GetPaneText(nIndex);
00231             }
00232
00233             if( strTip != strCurTip )
00234             {
00235                 m_tooltip.UpdateTipText(strTip, this);
00236             }
00237
00238             break;
00239         }
00240     }
00241
00242     return CStatusBar::OnNcHitTest(point);
00243 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PyCmdUI Member List

This is the complete list of members for PyCmdUI, including all inherited members.

_Enable(obj_t *self, PyObject *args) | PyCmdUI | [inline, protected, static]
_SetCheck(obj_t *self, PyObject *args) | PyCmdUI | [inline, protected, static]
_SetText(obj_t *self, PyObject *args) | PyCmdUI | [inline, protected, static]
Create(PyObject *selfptr, PyObject *args) | PyCmdUI | [static]
dealloc(obj_t *self) | PyCmdUI | [static]
Enable(PyObject *args) | PyCmdUI |
False() | PyContainer | [inline, static]
FindMethod(PyObject *self, char *name) | PyCmdUI | [inline, static]
GetAttr(char *name) | PyContainer | [inline, virtual]
getattr(obj_t *self, char *name) | PyCmdUI | [static]
GetType(void) | PyCmdUI | [inline, static]
InitValues(PyObject *d) | PyCmdUI | [static]
m_cmdui | PyCmdUI | [protected]
m_doc | PyCmdUI | [static]
m_methods | PyCmdUI | [static]
m_registry | PyCmdUI | [static]
New(void) | PyCmdUI | [static]
PyCmdUI(UCmdUI *cmdui) | PyCmdUI | [inline]
PyContainer() | PyContainer | [inline]
RegisterValue(PyObject *d, char *name, int value) | PyContainer | [static]
SetCheck(PyObject *args) | PyCmdUI |
SetText(PyObject *args) | PyCmdUI |
True() | PyContainer | [inline, static]
Void() | PyContainer | [inline, static]
~PyCmdUI() | PyCmdUI | [inline, virtual]
~PyContainer() | PyContainer | [inline, virtual]

Generated on Sat Aug 7 22:55:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJLogoPane.h Source File

WinCvs/CJLib/Include/CJLogoPane.h

Go to the documentation of this file.
00001 // CJLogoPane.h : header file
00002 //
00003 // Copyright © 1999 Pierre MELLINAND
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.1 $
00010  * $Archive: /CodeJock/Include/CJLogoPane.h $
00011  *
00012  * $History: CJLogoPane.h $
00013  *
00014  * *****************  Version 1  *****************
00015  * User: Kirk Stowell Date: 10/26/99   Time: 11:08p
00016  * Created in $/CodeJock/Include
00017  *
00018  ***************************************************************************/
00020
00021 #ifndef __CJLOGOPANE_H__
00022 #define __CJLOGOPANE_H__
00023
00024 #if _MSC_VER >= 1000
00025 #pragma once
00026 #endif // _MSC_VER >= 1000
00027
00029 // CCJLogoPane class
00030
00031 class _CJX_EXT_CLASS CCJLogoPane : public CWnd
00032 {
00033     DECLARE_DYNCREATE(CCJLogoPane)
00034
00035 // Construction
00036 public:
00037     CCJLogoPane();
00038
00039 // Attributes
00040 public:
00041     CString m_strLogoText;
00042     CFont   m_Font;
00043
00044 // Operations
00045 public:
00046     virtual void    SetLogoText(LPCTSTR lpszLogoText);
00047     virtual CString GetLogoText();
00048     virtual void    SetLogoFont(LPCTSTR lpszFontName, int nHeight=24, int nWeight=FW_BOLD, BOOL bItalic=TRUE, BOOL bUnderline=FALSE);
00049
00050 // Overrides
00051     // ClassWizard generated virtual function overrides
00052     //{{AFX_VIRTUAL(CCJLogoPane)
00053     public:
00054     virtual BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, CWnd* pParentWnd, UINT nID);
00055     //}}AFX_VIRTUAL
00056
00057 // Implementation
00058 public:
00059     virtual ~CCJLogoPane();
00060
00061 // Generated message map functions
00062 protected:
00063     //{{AFX_MSG(CCJLogoPane)
00064     afx_msg void OnPaint();
00065     //}}AFX_MSG
00066     DECLARE_MESSAGE_MAP()
00067 };
00068
00070 //  Inline Functions
00072
00073 _CJXLIB_INLINE void CCJLogoPane::SetLogoText(LPCTSTR lpszLogoText)
00074     { m_strLogoText = lpszLogoText; }
00075
00076 _CJXLIB_INLINE CString CCJLogoPane::GetLogoText()
00077     { return m_strLogoText; }
00078
00080
00081 //{{AFX_INSERT_LOCATION}}
00082 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00083
00084 #endif // __CJLOGOPANE_H__
00085
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/StdAfx.h Source File

WinCvs/StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 //
00005
00006 #if !defined(AFX_STDAFX_H__D2D77DCA_8299_11D1_8949_444553540000__INCLUDED_)
00007 #define AFX_STDAFX_H__D2D77DCA_8299_11D1_8949_444553540000__INCLUDED_
00008
00009 #if _MSC_VER >= 1000
00010 #pragma once
00011 #endif // _MSC_VER >= 1000
00012
00013 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00014
00015 #include <afxwin.h>         // MFC core and standard components
00016 #include <afxext.h>         // MFC extensions
00017 #include <afxole.h>         // MFC OLE classes
00018 #include <afxodlgs.h>       // MFC OLE dialog classes
00019 #include <afxdisp.h>        // MFC OLE automation classes
00020 #ifndef _AFX_NO_AFXCMN_SUPPORT
00021 #include <afxcmn.h>         // MFC support for Windows Common Controls
00022 #endif // _AFX_NO_AFXCMN_SUPPORT
00023
00024 #include <afxsock.h>        // MFC socket extensions
00025 #include <afxmt.h>          // MFC Multithreaded Extensions
00026
00027 #include <HtmlHelp.h>       // HTML Help
00028
00029 #include <shlwapi.h>        // Interface for the Windows light-weight utility APIs
00030
00032 // CvsGui stuff
00033
00034 #include "cvsgui_i18n.h"
00035
00036 #include "CJLibrary.h"      // CJLibrary
00037
00038 #ifdef _DEBUG
00039 #   define qCvsDebug 1
00040 #else
00041 #   define qCvsDebug 0
00042 #endif
00043
00044 #define UASSERT ASSERT
00045 // for the pseudo-interface
00046
00047 #include "TipDlg.h"         // Tip of the Day
00048
00050 // STL
00051
00052 #pragma warning(push)
00053 #pragma warning(disable : 4786)
00054
00055 #include <vector>
00056 #include <map>
00057 #include <string>
00058
00059 #pragma warning(pop)
00060
00061 #include <afxrich.h>        // Rich edit
00062 #include <afxcview.h>       // Common control classes
00063
00064
00065 #ifdef _DEBUG
00066 #   include <malloc.h>
00067 #   include <stdlib.h>
00068 #   include <crtdbg.h>
00069 #   define   malloc(s)         _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__)
00070 #   define   calloc(c, s)      _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
00071 #   define   realloc(p, s)     _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
00072 #   define   free(p)           _free_dbg(p, _NORMAL_BLOCK)
00073 #endif
00074
00075 #include <sys/stat.h>
00076 // Replacement stat() routine
00077 struct wnt_stat {
00078         _dev_t st_dev;
00079         _ino_t st_ino;
00080         unsigned short st_mode;
00081         short st_nlink;
00082         short st_uid;
00083         short st_gid;
00084         _dev_t st_rdev;
00085         _off_t st_size;
00086         time_t st_atime;
00087         time_t st_mtime;
00088         time_t st_ctime;
00089         };
00090 int wnt_stat(const char *name, struct wnt_stat *buf);
00091 int wnt_fstat (int fildes, struct wnt_stat *buf);
00092 int wnt_lstat (const char *name, struct wnt_stat *buf);
00093
00094 #define fstat wnt_fstat
00095 #define lstat wnt_lstat
00096 #define stat wnt_stat
00097
00098 //{{AFX_INSERT_LOCATION}}
00099 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00100
00101 #endif // !defined(AFX_STDAFX_H__D2D77DCA_8299_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LoginDlg.h Source File

common/LoginDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2002
00019  */
00020
00021 /*
00022  * LoginDlg.h : the cvs login dialog header file
00023  */
00024
00025 #if !defined(AFX_LOGIN_MAIN_H__CF191044_0332_477E_ABD2_13E56D643C14__INCLUDED_)
00026 #define AFX_LOGIN_MAIN_H__CF191044_0332_477E_ABD2_13E56D643C14__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #ifdef WIN32
00033 #   include "HHelpSupport.h"
00034 #endif
00035
00036 bool CompatGetLogin(bool& forceCvsroot, CStr& cvsroot);
00037
00038 #ifdef WIN32
00039
00040 // CLogin_MAIN dialog
00041
00042 class CLogin_MAIN : public CHHelpPropertyPage
00043 {
00044     DECLARE_DYNAMIC(CLogin_MAIN)
00045
00046 // Construction
00047 public:
00048     CLogin_MAIN(bool forceRoot, const char* cvsroot);
00049     ~CLogin_MAIN();
00050
00051 // Dialog Data
00052     //{{AFX_DATA(CLogin_MAIN)
00053     enum { IDD = IDD_LOGIN_MAIN };
00054     CButton m_forceRootCheck;
00055     CButton m_selCvsrootButton;
00056     CSmartComboBox  m_cvsrootCombo;
00057     BOOL    m_forceRoot;
00058     CString m_helpLogin;
00059     CString m_cvsroot;
00060     //}}AFX_DATA
00061
00062
00063 // Overrides
00064     // ClassWizard generate virtual function overrides
00065     //{{AFX_VIRTUAL(CLogin_MAIN)
00066     protected:
00067     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00068     //}}AFX_VIRTUAL
00069
00070 // Implementation
00071 protected:
00072     // Generated message map functions
00073     //{{AFX_MSG(CLogin_MAIN)
00074     afx_msg void OnSelcvsroot();
00075     afx_msg void OnForceroot();
00076     virtual BOOL OnInitDialog();
00077     //}}AFX_MSG
00078     DECLARE_MESSAGE_MAP()
00079 private:
00080     // Methods
00081     virtual void InitHelpID();
00082 };
00083
00084 //{{AFX_INSERT_LOCATION}}
00085 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00086 #endif
00087
00088 #endif // !defined(AFX_LOGIN_MAIN_H__CF191044_0332_477E_ABD2_13E56D643C14__INCLUDED_)
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CColorStatic Member List

This is the complete list of members for CColorStatic, including all inherited members.

CColorStatic() | CColorStatic |
GetColor() | CColorStatic |
m_color | CColorStatic | [private]
OnPaint() | CColorStatic | [protected]
SetColor(COLORREF color) | CColorStatic |
~CColorStatic() | CColorStatic | [virtual]

Generated on Sat Aug 7 22:50:33 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJComboBoxEx.h Source File

WinCvs/CJLib/Include/CJComboBoxEx.h

Go to the documentation of this file.
00001 // CJComboBoxEx.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new
00007 // IE4 controls' http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:49 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/Include/CJComboBoxEx.h $
00015  *
00016  * $History: CJComboBoxEx.h $
00017  *
00018  * *****************  Version 6  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/Include
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 5  *****************
00024  * User: Kirk Stowell Date: 7/28/99    Time: 12:39a
00025  * Updated in $/CodeJockey/Include
00026  * Final pass for release 6.08.
00027  *
00028  * *****************  Version 4  *****************
00029  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00030  * Updated in $/CodeJockey/Include
00031  *
00032  * *****************  Version 3  *****************
00033  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00034  * Updated in $/CodeJockey/Include
00035  *
00036  * *****************  Version 2  *****************
00037  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00038  * Updated in $/CodeJockey/Include
00039  * Cleaned up inline functions, and import/export macro so that class will
00040  * be imported when linked to, and exported at compile time.
00041  *
00042  * *****************  Version 1  *****************
00043  * User: Kirk Stowell Date: 6/25/99    Time: 12:05p
00044  * Created in $/CodeJockey/Include
00045  * Copied from MFC, Visual C++ 6. Added to extend functionality to Visual
00046  * C++ 5 users.
00047  *
00048  ***************************************************************************/
00050
00051 #ifndef __CJCOMBOBOXEX_H__
00052 #define __CJCOMBOBOXEX_H__
00053
00054 // The CCJComboBoxEx class extends the combo box control by providing support
00055 // for image lists. By using CCJComboBoxEx to create combo box controls, you no
00056 // longer need to implement your own image drawing code. Instead, use CCJComboBoxEx
00057 // to access images from an image list.
00058 class _CJX_EXT_CLASS CCJComboBoxEx : public CComboBox
00059 {
00060     DECLARE_DYNAMIC(CCJComboBoxEx)
00061
00062 // Construction / destruction
00063 public:
00064
00065     // Constructs a CCJComboBoxEx object
00066     //
00067     CCJComboBoxEx();
00068
00069     // Destroys a CCJCombboBoxEx object
00070     //
00071     virtual ~CCJComboBoxEx();
00072
00073 // Initialization
00074 public:
00075
00076     // Creates the combo box and attaches it to the CCJComboBoxEx object.
00077     //
00078     BOOL Create(
00079         // Specifies the combination of combo box styles
00080         // applied to the combo box.
00081         DWORD dwStyle,
00082         // A reference to a CRect object orRECT structure, which
00083         // is the position and size of the combo box
00084         const RECT& rect,
00085         // A pointer to a CWnd object that is the parent window of
00086         // the combo box (usually a CDialog). It must not be NULL
00087         CWnd* pParentWnd,
00088         // Specifies the combo box’s control ID.
00089         UINT nID);
00090
00091 // Operators
00092 public:
00093
00094     // Removes an item from a ComboBoxEx control.
00095     // Returns the number of items remaining in the control. If iIndex
00096     // is invalid, the function returns CB_ERR.
00097     //
00098     int DeleteItem(
00099         // Zero-based index of the item to be removed.
00100         int iIndex);
00101
00102     // Retrieves item information for a given ComboBoxEx item
00103     // Returns nonzero if the operation was successful; otherwise 0.
00104     //
00105     BOOL GetItem(
00106         // A pointer to aCOMBOBOXEXITEM structure that will receive
00107         // the item information.
00108         COMBOBOXEXITEM* pCBItem);
00109
00110     // Inserts a new item in a ComboBoxEx control.
00111     // Returns the index at which the new item was inserted if
00112     // successful; otherwise -1
00113     int InsertItem(
00114         // A pointer to aCOMBOBOXEXITEM structure that will receive the
00115         // item information. This structure contains callback flag values for the item.
00116         const COMBOBOXEXITEM* pCBItem);
00117
00118     // Inserts a new item in a ComboBoxEx control.
00119     // Returns the index at which the new item was inserted if
00120     // successful; otherwise -1
00121     int InsertItem(
00122         // item index.
00123         int iItem,
00124         // string resource.
00125         UINT nStringID,
00126         // ammount (in pixels) image is to be indented.
00127         int iIndent=0,
00128         // image index.
00129         int iImage=0,
00130         // selected image index.
00131         int iSelectedImage=0,
00132         // style mask.
00133         UINT mask=CBEIF_TEXT|CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_INDENT);
00134
00135     // Inserts a new item in a ComboBoxEx control.
00136     // Returns the index at which the new item was inserted if
00137     // successful; otherwise -1
00138     int InsertItem(
00139         // item index.
00140         int iItem,
00141         // item string.
00142         LPCTSTR lpszItem,
00143         // ammount (in pixels) image is to be indented.
00144         int iIndent=0,
00145         // image index.
00146         int iImage=0,
00147         // selected image index.
00148         int iSelectedImage=0,
00149         // style mask.
00150         UINT mask=CBEIF_TEXT|CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_INDENT);
00151
00152     // Sets the attributes for an item in a ComboBoxEx control.
00153     // Returns nonzero if the operation was successful; otherwise 0.
00154     //
00155     BOOL SetItem(
00156         // A pointer to aCOMBOBOXEXITEM structure that will receive the
00157         // item information
00158         const COMBOBOXEXITEM* pCBItem);
00159
00160 // Atrributes
00161 public:
00162
00163     // Retrieves the extended styles that are in use for a ComboBoxEx
00164     // control. Returns the DWORD value that contains the extended styles
00165     // that are used for the combo box control.
00166     //
00167     DWORD GetExtendedStyle() const;
00168
00169     // Sets extended styles within a ComboBoxEx control.
00170     // Returns a DWORD value that contains the extended styles previously
00171     // used for the control.
00172     //
00173     DWORD SetExtendedStyle(
00174         // A DWORD value that indicates which styles in dwExStyles are to
00175         // be affected. Only the extended styles in dwExMask will be changed.
00176         // All other styles will be maintained as is. If this parameter is
00177         // zero, then all of the styles in dwExStyles will be affected
00178         DWORD dwExMask,
00179         // A DWORD value that contains the combo box control extended styles
00180         // to set for the control
00181         DWORD dwExStyles);
00182
00183     // Determines if the user has changed the contents of the ComboBoxEx
00184     // edit control by typing.
00185     // Returns nonzero if the user has typed in the control's
00186     // edit box; otherwise 0.
00187     BOOL HasEditChanged();
00188
00189     // Retrieves the handle to the edit control portion of a ComboBoxEx
00190     // control. Returns a pointer to a CEdit object.
00191     //
00192     CEdit* GetEditCtrl();
00193
00194     // Retrieves a pointer to the child combo box control.
00195     // Returns a pointer to a CComboBox object.
00196     //
00197     CComboBox* GetComboBoxCtrl();
00198
00199     // Retrieves a pointer to the image list assigned to a ComboBoxEx
00200     // control. Returns a pointer to a CImageList object. If it fails,
00201     // this member function returns NULL.
00202     //
00203     CImageList* GetImageList() const;
00204
00205     // Sets an image list for a ComboBoxEx control.
00206     // Returns a pointer to a CImageList object containing the images
00207     // previously used by the CCJComboBoxEx control. NULL if no image list
00208     //was previously set.
00209     //
00210     CImageList* SetImageList(
00211         // A pointer to a CImageList object containing the images to use with
00212         // the CCJComboBoxEx control.
00213         CImageList* pImageList);
00214
00215 // Un-supported
00216 public:
00217
00218     // Un-supported base class message.
00219     //
00220     int Dir(UINT attr, LPCTSTR lpszWildCard);
00221
00222     // Un-supported base class message.
00223     //
00224     int FindString(int nIndexStart, LPCTSTR lpszFind) const;
00225
00226     // Un-supported base class message.
00227     //
00228     int AddString(LPCTSTR lpszString);
00229
00230     // Un-supported base class message.
00231     //
00232     BOOL SetEditSel(int nStartChar, int nEndChar);
00233
00234     // Un-supported base class message.
00235     //
00236     int InsertString(int nIndex, LPCTSTR lpszString);
00237 };
00238
00240 //  Inline Functions
00242
00243 _CJXLIB_INLINE CCJComboBoxEx::CCJComboBoxEx()
00244     { }
00245 _CJXLIB_INLINE DWORD CCJComboBoxEx::GetExtendedStyle() const
00246     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, CBEM_GETEXTENDEDSTYLE, 0, 0); }
00247 _CJXLIB_INLINE DWORD CCJComboBoxEx::SetExtendedStyle(DWORD dwExMask, DWORD dwExStyles)
00248     { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, CBEM_SETEXTENDEDSTYLE, (DWORD) dwExMask, (LPARAM) dwExStyles); }
00249 _CJXLIB_INLINE BOOL CCJComboBoxEx::HasEditChanged()
00250     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, CBEM_HASEDITCHANGED, 0, 0); }
00251 _CJXLIB_INLINE CEdit* CCJComboBoxEx::GetEditCtrl()
00252     { ASSERT(::IsWindow(m_hWnd)); return (CEdit*) CEdit::FromHandle((HWND) ::SendMessage(m_hWnd, CBEM_GETEDITCONTROL, 0, 0)); }
00253 _CJXLIB_INLINE CComboBox* CCJComboBoxEx::GetComboBoxCtrl()
00254     { ASSERT(::IsWindow(m_hWnd)); return (CComboBox*) CComboBox::FromHandle((HWND) ::SendMessage(m_hWnd, CBEM_GETCOMBOCONTROL, 0, 0)); }
00255 _CJXLIB_INLINE CImageList* CCJComboBoxEx::SetImageList(CImageList* pImageList)
00256     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, CBEM_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
00257 _CJXLIB_INLINE CImageList* CCJComboBoxEx::GetImageList() const
00258     { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, CBEM_GETIMAGELIST, 0, 0)); }
00259
00260 // While CCJComboBoxEx derives from CComboBox, there are some
00261 // CB_messages the underlying ComboBoxEx control doesn't support.
00262
00263 _CJXLIB_INLINE int CCJComboBoxEx::Dir(UINT attr, LPCTSTR lpszWildCard)
00264     { UNUSED_ALWAYS(attr); UNUSED_ALWAYS(lpszWildCard); ASSERT(FALSE); return CB_ERR; }
00265 _CJXLIB_INLINE int CCJComboBoxEx::FindString(int nIndexStart, LPCTSTR lpszFind) const
00266     { UNUSED_ALWAYS(nIndexStart); UNUSED_ALWAYS(lpszFind); ASSERT(FALSE); return CB_ERR; }
00267 _CJXLIB_INLINE int CCJComboBoxEx::AddString(LPCTSTR lpszString)
00268     { UNUSED_ALWAYS(lpszString); ASSERT(FALSE); return CB_ERR; }
00269 _CJXLIB_INLINE BOOL CCJComboBoxEx::SetEditSel(int nStartChar, int nEndChar)
00270     { UNUSED_ALWAYS(nStartChar); UNUSED_ALWAYS(nEndChar); ASSERT(FALSE); return FALSE; }
00271 _CJXLIB_INLINE int CCJComboBoxEx::InsertString(int nIndex, LPCTSTR lpszString)
00272     { UNUSED_ALWAYS(nIndex); UNUSED_ALWAYS(lpszString); ASSERT(FALSE); return CB_ERR; }
00273
00274 #endif //__CJCOMBOBOXEX_H__
00275
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoExtColumn Member List

This is the complete list of members for KoExtColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoExtColumn | [inline, virtual]
GetColumnIndex() const | KoExtColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoExtColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoExtColumn | [inline, virtual]
IsDefaultAscending() const | KoExtColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AskYesNo.h Source File

common/AskYesNo.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 // AskYesNo.h : ask yes or no !
00022
00023 #if !defined(AFX_ASKYESNO_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_)
00024 #define AFX_ASKYESNO_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_
00025
00026 #if _MSC_VER >= 1000
00027 #pragma once
00028 #endif // _MSC_VER >= 1000
00029
00030 class UStr;
00031
00032 bool PromptEditMessage(const char *msg, UStr & edit, const char *title = "Message",
00033                    const char *def = "OK", const char *cncl = "Cancel");
00034     // prompt for yes or no, returns "yes" or "no" and the value of the edit
00035     // field.
00036
00037 #endif // !defined(AFX_ASKYESNO_H__5946A8C4_8517_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsIgnore.cpp Source File

common/CvsIgnore.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- June 1998
00019  */
00020
00021 /*
00022  * CvsIgnore.cpp --- parse the .cvsignore
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <stdlib.h>
00028 #include <string.h>
00029
00030 #include "FileTraversal.h"
00031 #include "AppConsole.h"
00032 #include "CvsIgnore.h"
00033 #include "getline.h"
00034 #include "fnmatch.h"
00035 #include "CvsPrefs.h"
00036
00037 #ifndef WIN32
00038 #   include <ctype.h>
00039 #endif /* !WIN32 */
00040
00041 #ifdef qMacCvsPP
00042 #       include "MacCvsApp.h"
00043 #       include "MacMisc.h"
00044 #endif /* qMacCvsPP */
00045
00046 #ifdef WIN32
00047 #   include "wincvs.h"
00048
00049 #   ifdef _DEBUG
00050 #       define new DEBUG_NEW
00051 #       undef THIS_FILE
00052         static char THIS_FILE[] = __FILE__;
00053 #   endif
00054 #endif /* WIN32 */
00055
00056 /* Parse a line of space-separated wildcards and add them to the list. */
00057 /* mostly duplicated from cvs/src/ignore.c */
00058 static void ign_add (const char *ign, bool hold, std::vector<CStr> & ignlist)
00059 {
00060     if (!ign || !*ign)
00061         return;
00062
00063     int ign_hold = ignlist.size() == 0 ? -1 : (int)ignlist.size();
00064
00065     for (; *ign; ign++)
00066     {
00067         const char *mark;
00068
00069         /* ignore whitespace before the token */
00070         if (isspace (*ign))
00071             continue;
00072
00073         /*
00074         * if we find a single character !, we must re-set the ignore list
00075         * (saving it if necessary).  We also catch * as a special case in a
00076         * global ignore file as an optimization
00077         */
00078         if ((!*(ign+1) || isspace (*(ign+1))) && (*ign == '!' || *ign == '*'))
00079         {
00080             if (!hold)
00081             {
00082                 /* permanently reset the ignore list */
00083                 ignlist.erase(ignlist.begin(), ignlist.end());
00084
00085                 /* if we are doing a '!', continue; otherwise add the '*' */
00086                 if (*ign == '!')
00087                 {
00088                     continue;
00089                 }
00090             }
00091             else if (*ign == '!')
00092             {
00093                 /* temporarily reset the ignore list */
00094                 if (ign_hold >= 0)
00095                 {
00096                     ignlist.erase(ignlist.begin(), ignlist.begin() + ign_hold);
00097                     ign_hold = -1;
00098                 }
00099                 continue;
00100             }
00101         }
00102
00103         /* find the end of this token */
00104         for (mark = ign; *mark && !isspace (*mark); mark++)
00105             /* do nothing */ ;
00106
00107
00108         ignlist.push_back(CStr(ign).substr(0,mark - ign));
00109
00110         if (*mark)
00111             ign = mark;
00112         else
00113             ign = mark - 1;
00114     }
00115 }
00116
00117
00118 // Read .cvsignore file and append entries to ignlist
00119 static bool ReadIgnoredFile(const char* fileName, std::vector<CStr> & ignlist)
00120 {
00121     FILE *fp;
00122     char *line = NULL;
00123     size_t line_allocated = 0;
00124
00125     fp = fopen(fileName, "r");
00126     if(fp != 0L)
00127     {
00128         while (getline (&line, &line_allocated, fp) >= 0)
00129             ign_add (line, false, ignlist);
00130
00131         if (ferror (fp))
00132             cvs_err("Problem while parsing '%s'", fileName);
00133
00134         fclose (fp);
00135     }
00136
00137     if(line != 0L)
00138         free (line);
00139
00140     return(fp != 0L);
00141 }
00142
00148 void BuildIgnoredList(std::vector<CStr>& ignlist, const char* path)
00149 {
00150     ignlist.erase(ignlist.begin(), ignlist.end());
00151
00152     static std::vector<CStr> deflist;
00153     static bool deflistparsed = false;
00154
00155     if( !deflistparsed )
00156     {
00157 #ifdef TARGET_OS_MAC
00158         UFSSpec theFolder;
00159         CStr home;
00160
00161         if(MacGetPrefsFolder(theFolder, home) == noErr)
00162         {
00163 #else /* !TARGET_OS_MAC */
00164         if(gCvsPrefs.Home() != 0L)
00165         {
00166             CStr home(gCvsPrefs.Home());
00167 #endif /* !TARGET_OS_MAC */
00168
00169             struct stat sb;
00170             if( stat(home, &sb) != 0 || !S_ISDIR(sb.st_mode) )
00171             {
00172                 cvs_err("Warning : unable to access your HOME path '%s'\n", gCvsPrefs.Home());
00173                 cvs_err("          ~/.cvsignore will not be read\n");
00174             }
00175
00176             if( !home.empty() && !home.endsWith(kPathDelimiter) )
00177                 home << kPathDelimiter;
00178
00179             home << ".cvsignore";
00180
00181             // Read .cvsignore file from HOME directory.
00182             // If HOME dir doesn't have such a file then
00183             // try to read global file from executable path.
00184             if( ReadIgnoredFile(home, deflist) == false )
00185             {
00186                 CStr appPath;
00187
00188 #ifdef WIN32
00189                 ((CWincvsApp *)AfxGetApp())->GetAppPath(appPath);
00190 #elif defined(qUnix)
00191                 // Unix version uses only .cvsignore file in HOME dir
00192 #else
00193 #   ifdef qMacCvsPP
00194                 appPath = CMacCvsApp::GetAppPath();
00195 #   endif /* qMacCvsPP */
00196 #endif
00197                 if( !appPath.empty() )
00198                 {
00199                     if( !appPath.endsWith(kPathDelimiter) )
00200                         appPath << kPathDelimiter;
00201
00202                     appPath << ".cvsignore";
00203
00204                     ReadIgnoredFile(appPath, deflist);
00205                 }
00206             }
00207         }
00208
00209         deflistparsed = true;
00210     }
00211     else
00212     {
00213         ignlist = deflist;
00214     }
00215
00216 #if qUnix || TARGET_RT_MAC_MACHO
00217     // from cvs/src/ignore.c
00218     CStr ign_default(". .. core RCSLOG tags TAGS RCS SCCS .make.state\
00219  .nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\
00220  *.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe .DS_Store _$* *$");
00221     ign_add (ign_default, false, ignlist);
00222 #endif
00223
00224     UStr ignPath(path);
00225     if( !ignPath.endsWith(kPathDelimiter) )
00226         ignPath << kPathDelimiter;
00227
00228     ignPath << ".cvsignore";
00229
00230     // load the file from the current source directory
00231     ReadIgnoredFile(ignPath, ignlist);
00232 }
00233
00240 bool MatchIgnoredList(const char* filename, const std::vector<CStr>& ignlist)
00241 {
00242     if( filename )
00243     {
00244         std::vector<CStr>::const_iterator i;
00245         for(i = ignlist.begin(); i != ignlist.end(); ++i)
00246         {
00247             if( fnmatch(*i, filename, 0) == 0 )
00248             {
00249                 return true;
00250             }
00251         }
00252     }
00253
00254     return false;
00255 }
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoTagColumn Member List

This is the complete list of members for KoTagColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoTagColumn | [inline, virtual]
GetColumnIndex() const | KoTagColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoTagColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoTagColumn | [inline, virtual]
IsDefaultAscending() const | KiColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PCStr Member List

This is the complete list of members for PCStr, including all inherited members.

_GetBaseClass() | PCStr | [protected, static]
c_str() const | UStr | [inline]
classCPersistent | CPersistent | [protected, static]
classPCStr | PCStr | [protected, static]
classUObject | UObject | [protected, static]
clear(void) | UStr |
compare(const char *thestr) const | UStr | [inline]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
empty(void) const | UStr | [inline]
endsWith(char c) const | UStr | [inline]
Find(const char *uniqueName) | CPersistent | [static]
find(const char *thestr) const | UStr |
find(char thechar) const | UStr |
GetData(void) const | PCStr | [virtual]
GetRuntimeClass() const | PCStr | [virtual]
GetTimeStamp() const | CPersistent | [inline]
IsKindOf(const URuntimeClass *pClass) const | UObject |
length(void) const | UStr | [inline]
LoadAll(const char *only=0L) | CPersistent | [static]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_str | UStr | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
operator const char *() const | PCStr | [inline]
operator!=(const UStr &str) const | UStr | [inline]
operator!=(const char *str) const | UStr | [inline]
operator+=(int addToStr) | UStr | [inline]
operator+=(const char *addToStr) | UStr | [inline]
operator+=(const UStr &addToStr) | UStr | [inline]
operator<(const UStr &str) const | UStr | [inline]
operator<<(const char *addToStr) | UStr |
operator<<(char addToStr) | UStr |
operator<<(int addToStr) | UStr |
operator=(const char *newstr) | PCStr | [inline]
operator=(const unsigned char *newstr) | PCStr | [inline]
UStr::operator=(const UStr &newstr) | UStr |
operator==(const UStr &str) const | UStr | [inline]
operator==(const char *str) const | UStr | [inline]
operator>(const UStr &str) const | UStr | [inline]
PCStr(const char *uniqueName, const char *defValue=0L, kClassPersistent pclass=kNoClass) | PCStr | [inline]
replace(char which, char bywhich) | UStr |
ResetTimeStamp() | CPersistent | [inline]
rfind(const char *thestr) const | UStr |
rfind(char thechar) const | UStr |
rtCPersistent(void) | CPersistent | [static]
rtPCStr(void) | PCStr | [static]
rtrim(char c) | UStr |
rtrim(const char *MatchList) | UStr |
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
set(const char *buf, unsigned int len) | UStr |
SetData(const void *ptr, unsigned int size) | PCStr | [virtual]
SizeOf(void) const | PCStr | [virtual]
substr(int idx, int len) const | UStr |
TouchTimeStamp() | CPersistent | [inline]
trim(char c= ' ') | UStr |
UObject() | UObject | [inline, protected]
UStr() | UStr | [inline]
UStr(const char *newstr) | UStr | [inline]
UStr(const unsigned char *newstr) | UStr | [inline]
UStr(const UStr &newstr) | UStr | [inline]
~CPersistent() | CPersistent | [virtual]
~PCStr() | PCStr | [virtual]
~UObject() | UObject | [inline, virtual]
~UStr() | UStr | [virtual]

Generated on Sat Aug 7 22:55:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FileTraversal.cpp Source File

common/FileTraversal.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * FileTraversal.cpp : class to traverse a file hierarchy
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "resource.h"
00029 #endif /* WIN32 */
00030
00031 #if TARGET_OS_MAC
00032 #   include "GUSIInternal.h"
00033 #   include "GUSIFileSpec.h"
00034 #endif
00035
00036 #ifdef HAVE_UNISTD_H
00037 #   include <unistd.h>
00038 #endif /* HAVE_UNISTD_H */
00039
00040 #ifdef HAVE_ERRNO_H
00041 #   include <errno.h>
00042 #endif /* HAVE_ERRNO_H */
00043
00044 #include "FileTraversal.h"
00045 #include "CPStr.h"
00046 #include "umain.h"
00047
00048 #ifdef WIN32
00049 #   include "AppConsole.h"
00050 #   include "wincvsdebug.h"
00051
00052 #   ifdef _DEBUG
00053 #   define new DEBUG_NEW
00054 #   undef THIS_FILE
00055     static char THIS_FILE[] = __FILE__;
00056 #   endif
00057 #endif /* WIN32 */
00058
00059 #if qUnix
00060 #   include "UCvsApp.h"
00061 #endif
00062
00063 // Initialize traverse flag
00064 bool TraversalReport::m_running = false;
00065
00073 kTraversal FileTraverse(const char* path, TraversalReport& report, const UFSSpec* macDirSpec)
00074 {
00075     kTraversal res = kContinueTraversal;
00076
00077     DIR* dirp = 0L;
00078     STRUCT_DIRENT* dp;
00079     struct stat sb;
00080     CStr fullname, errstr, dirname, tmpname;
00081     const char* tmp;
00082     const UFSSpec *macspec = 0L;
00083
00084 #if defined(WIN32)
00085 #   if ENABLE_WINCVSDEBUG
00086     unsigned long dbg_mask = GetWinCvsDebugMask(false);
00087     CStr tracestr;
00088 #   endif   // ENABLE_WINCVSDEBUG
00089 #endif
00090
00091 #ifdef qUnix
00092     UCvsApp* app = UCvsApp::gApp;
00093 #endif
00094
00095     // Used to restore current directory
00096     static bool getPathFlag = false;
00097     char* originalPath = NULL;
00098
00099     USemaphore policeman(getPathFlag);
00100     USemaphore runstate(TraversalReport::GetRefRunning());
00101
00102     if( !policeman.IsEnteredTwice() )
00103     {
00104         originalPath = getcwd(NULL, MAX_PATH);
00105     }
00106
00107 #if TARGET_OS_MAC
00108     FSRef foldermacspec;
00109
00110     if( macDirSpec != 0L )
00111     {
00112         foldermacspec = *macDirSpec;
00113     }
00114     else if( path != 0L )
00115     {
00116         FSPathMakeRef(posix_to_utf8(path), &foldermacspec, NULL);
00117     }
00118
00119     macspec = &foldermacspec;
00120 #endif
00121
00122     if( path == 0L || (dirp = opendir(path)) == 0L )
00123     {
00124         errstr = "Error while accessing ";
00125         errstr << path;
00126         errstr << " (error " << errno << ')';
00127         res = report.OnError(errstr, errno);
00128         goto exit;
00129     }
00130
00131     tmpname = path;
00132     tmp = tmpname;
00133     const char* next;
00134
00135     tmpname.rtrim (kPathDelimiter);
00136
00137     next = tmp;
00138
00139     while( (tmp = strchr(next, kPathDelimiter)) != 0L )
00140     {
00141         next = ++tmp;
00142     }
00143
00144     dirname = next;
00145
00146     res = report.EnterDirectory(path, dirname, macspec);
00147     if( res != kContinueTraversal )
00148         goto abort;
00149
00150     while( (dp = readdir(dirp)) != NULL )
00151     {
00152         res = report.OnIdle(path);
00153
00154         if( res != kContinueTraversal )
00155             goto abort;
00156
00157         if( strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0 )
00158             continue;
00159
00160         fullname = path;
00161         if( !fullname.endsWith(kPathDelimiter) )
00162             fullname << kPathDelimiter;
00163
00164         fullname << dp->d_name;
00165
00166         macspec = 0L;
00167
00168 #if TARGET_RT_MAC_MACHO
00169         GUSIFileSpec inspec(foldermacspec);
00170         inspec += dp->d_name;
00171         UFSSpec infspec = inspec;
00172         macspec = &infspec;
00173 #else
00174 #   if defined(WIN32)
00175 #       if ENABLE_WINCVSDEBUG
00176         if( (dbg_mask & wcvsdbg_trace_modified_checks) && (dbg_mask & wcvsdbg_verbose) )
00177         {
00178             AppendWinCvsDebugMask(wcvsdbg_trace_dst_checks | wcvsdbg_trace_stat);
00179             tracestr = "Stat(";
00180             tracestr << static_cast<const char*>(fullname);
00181             tracestr << ") ...\n";
00182             cvs_err(tracestr);
00183             OutputDebugString(tracestr);
00184         }
00185 #       endif   // ENABLE_WINCVSDEBUG
00186 #   endif   // defined(WIN32)
00187 #endif
00188
00189         const int statres = stat(fullname, &sb);
00190         if( statres != -1 )
00191         {
00192             if( S_ISDIR(sb.st_mode) )
00193             {
00194                 res = report.OnDirectory(path, fullname, dp->d_name, sb, macspec);
00195
00196                 if( res == kSkipFile )
00197                     continue;
00198
00199                 if( res != kContinueTraversal )
00200                     goto abort;
00201
00202                 res = FileTraverse(fullname, report, macspec);
00203
00204                 if( res != kContinueTraversal )
00205                     goto abort;
00206             }
00207             else if( S_ISREG(sb.st_mode) )
00208             {
00209                 res = report.OnFile(path, fullname, dp->d_name, sb, macspec);
00210
00211                 if( res == kSkipFile )
00212                     continue;
00213
00214                 if( res != kContinueTraversal )
00215                     goto abort;
00216             }
00217 #ifdef S_ISLNK
00218             else if( S_ISLNK(sb.st_mode) )
00219             {
00220                 res = report.OnAlias(path, fullname, dp->d_name, sb, macspec);
00221
00222                 if( res == kSkipFile)
00223                     continue;
00224
00225                 if( res != kContinueTraversal )
00226                     goto abort;
00227             }
00228 #endif /* S_ISLNK */
00229             else
00230             {
00231                 /* TODO : Unix devices */
00232                 errstr = "Error while accessing ";
00233                 errstr << fullname;
00234                 errstr << " (error " << errno << ')';
00235                 res = report.OnError(errstr, errno);
00236                 goto abort;
00237             }
00238         }
00239         else
00240         {
00241             errstr = "Error while accessing ";
00242             errstr << fullname;
00243             errstr << " (error " << errno << ')';
00244             res = report.OnError(errstr, errno);
00245
00246             // no abort, because all
00247             // * files not read yet will be signed as missing and all
00248             // * folder will not be displayed
00249             //goto abort;
00250         }
00251
00252 #ifdef qUnix
00253         app->PeekPumpAndIdle(true);
00254
00255         // print actual folder
00256         app->SetStatusBarText(path);
00257 #endif
00258     }
00259
00260     res = report.ExitDirectory(path);
00261
00262 abort:
00263     closedir(dirp);
00264
00265 exit:
00266     if( NULL != originalPath )
00267     {
00268         chdir(originalPath);
00269         free(originalPath);
00270         originalPath = NULL;
00271     }
00272
00273 #if defined(WIN32)
00274 #   if ENABLE_WINCVSDEBUG
00275     SetWinCvsDebugMask(dbg_mask);
00276 #   endif   // ENABLE_WINCVSDEBUG
00277 #endif  // defined(WIN32)
00278
00279 #ifdef qUnix
00280     // print actual folder
00281     app->SetStatusBarText("");
00282 #endif
00283
00284     return res;
00285 }
00286
00288 // TraversalReport
00289
00294 bool& TraversalReport::GetRefRunning()
00295 {
00296     return TraversalReport::m_running;
00297 }
00298
00299 kTraversal TraversalReport::EnterDirectory(const char* fullpath, const char* dirname, const UFSSpec* macspec)
00300 {
00301     return kContinueTraversal;
00302 }
00303
00304 kTraversal TraversalReport::ExitDirectory(const char* fullpath)
00305 {
00306     return kContinueTraversal;
00307 }
00308
00309 kTraversal TraversalReport::OnError(const char* err, int errcode)
00310 {
00311     return kTraversalError;
00312 }
00313
00314 kTraversal TraversalReport::OnIdle(const char* fullpath)
00315 {
00316     return kContinueTraversal;
00317 }
00318
00319 kTraversal TraversalReport::OnAnyDevice(const char* fullpath,
00320                                         const char* fullname,
00321                                         const char* name,
00322                                         const struct stat& dir, const UFSSpec* macspec)
00323 {
00324     return kContinueTraversal;
00325 }
00326
00327 kTraversal TraversalReport::OnDirectory(const char* fullpath,
00328                                         const char* fullname,
00329                                         const char* name,
00330                                         const struct stat& dir, const UFSSpec* macspec)
00331 {
00332     return OnAnyDevice(fullpath, fullname, name, dir, macspec);
00333 }
00334
00335 kTraversal TraversalReport::OnFile(const char* fullpath,
00336                                    const char* fullname,
00337                                    const char* name,
00338                                    const struct stat& dir, const UFSSpec* macspec)
00339 {
00340     return OnAnyDevice(fullpath, fullname, name, dir, macspec);
00341 }
00342
00343 kTraversal TraversalReport::OnAlias(const char* fullpath,
00344                                     const char* fullname,
00345                                     const char* name,
00346                                     const struct stat& dir, const UFSSpec* macspec)
00347 {
00348     return OnAnyDevice(fullpath, fullname, name, dir, macspec);
00349 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CDiff_Options Member List

This is the complete list of members for CDiff_Options, including all inherited members.

CDiff_Options(CWnd *pParent=NULL) | CDiff_Options |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam) | CDiff_Options | [private, static]
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CDiff_Options | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetDiffOptions() | CDiff_Options |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CDiff_Options |
InitHelpID() | CDiff_Options | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_currentOptions | CDiff_Options |
m_diffOptions | CDiff_Options | [private]
m_headerCtrl | CDiff_Options | [private]
m_optionsListCtrl | CDiff_Options |
m_sortAsc | CDiff_Options | [private]
m_sortColumn | CDiff_Options | [private]
OnColumnclickOptionslist(NMHDR *pNMHDR, LRESULT *pResult) | CDiff_Options | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelp() | CDiff_Options | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CDiff_Options | [protected, virtual]
OnItemchangedOptionslist(NMHDR *pNMHDR, LRESULT *pResult) | CDiff_Options | [protected]
OnOK() | CDiff_Options | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
SortItems(int column, bool asc) | CDiff_Options | [private]
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:51:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uobject.h Source File

rf/uobject.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #ifndef UOBJECT_H
00022 #define UOBJECT_H
00023
00024 #include "uconfig.h"
00025
00026 #ifdef __cplusplus
00027
00028 class UObject;
00029
00030 class UEXPORT URuntimeClass
00031 {
00032 public:
00033     URuntimeClass(const char *lpszClassName, int nObjectSize,
00034         UObject* (*pfnCreateObject)(), const URuntimeClass* (*pfnGetBaseClass)());
00035     ~URuntimeClass();
00036
00037 // Attributes
00038     const char *m_lpszClassName;
00039     int m_nObjectSize;
00040     UObject* (* m_pfnCreateObject)(); // 0L => abstract class
00041     const URuntimeClass* (* m_pfnGetBaseClass)();
00042
00043 // Operations
00044     UObject* CreateObject();
00045     bool IsDerivedFrom(const URuntimeClass* pBaseClass) const;
00046
00047     // CRuntimeClass objects linked together in simple list
00048     URuntimeClass* m_pNextClass;       // linked list of registered classes
00049
00050     // linked list of all the registred runtime classes
00051     static URuntimeClass *sAllURuntimeClass;
00052 };
00053
00054 #define URUNTIME_CLASS(class_name) (class_name::rt##class_name())
00055
00056 #define UDECLARE_DYNAMIC(class_name) \
00057 protected: \
00058     static const URuntimeClass* _GetBaseClass(); \
00059     static const URuntimeClass class##class_name; \
00060 public: \
00061     static const URuntimeClass *rt##class_name(void); \
00062     virtual const URuntimeClass* GetRuntimeClass() const; \
00063
00064 // dynamically constructable
00065 #define UDECLARE_DYNCREATE(class_name) \
00066     UDECLARE_DYNAMIC(class_name) \
00067     static UObject* CreateObject(); \
00068
00069 #define UIMPLEMENT_RUNTIMECLASS(class_name, base_class_name, pfnNew) \
00070     const URuntimeClass *class_name::rt##class_name(void) \
00071         { return &class_name::class##class_name; } \
00072     const URuntimeClass* class_name::_GetBaseClass() \
00073         { return URUNTIME_CLASS(base_class_name); } \
00074     const URuntimeClass class_name::class##class_name( \
00075         #class_name, sizeof(class class_name), pfnNew, \
00076             &class_name::_GetBaseClass); \
00077     const URuntimeClass* class_name::GetRuntimeClass() const \
00078         { return URUNTIME_CLASS(class_name); } \
00079
00080 #define UIMPLEMENT_DYNAMIC(class_name, base_class_name) \
00081     UIMPLEMENT_RUNTIMECLASS(class_name, base_class_name, 0L)
00082
00083 #define UIMPLEMENT_DYNCREATE(class_name, base_class_name) \
00084     UObject* class_name::CreateObject() \
00085         { return new class_name; } \
00086     UIMPLEMENT_RUNTIMECLASS(class_name, base_class_name, \
00087         class_name::CreateObject)
00088
00089 class UEXPORT UObject
00090 {
00091 public:
00092     virtual const URuntimeClass* GetRuntimeClass() const;
00093     virtual ~UObject() {}
00094
00095     static const URuntimeClass *rtUObject();
00096     static const URuntimeClass* _GetBaseClass();
00097     static UObject* CreateObject(const char *className);
00098
00099     bool IsKindOf(const URuntimeClass* pClass) const;
00100 protected:
00101     static const URuntimeClass classUObject;
00102     UObject() {}
00103 };
00104
00105 #define UDYNAMIC_CAST(TYPE, EXPR) \
00106     ((TYPE *)((EXPR) == 0L ? 0L : ((EXPR)->IsKindOf(URUNTIME_CLASS(TYPE)) ? (TYPE *)EXPR : 0L)))
00107
00108 #endif /* __cplusplus */
00109
00110 #ifdef __cplusplus
00111 extern "C" {
00112 #endif
00113
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117
00118 #endif /* UOBJECT_H */
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCheckout_MAIN Member List

This is the complete list of members for CCheckout_MAIN, including all inherited members.

CCheckout_MAIN(const MultiFiles *mf, const char *modname, const char *path, const bool dontShortenPaths, bool forceRoot, const char *cvsroot) | CCheckout_MAIN |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CCheckout_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CCheckout_MAIN |
InitHelpID() | CCheckout_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_checkoutDir | CCheckout_MAIN |
m_checkoutDirEdit | CCheckout_MAIN |
m_cvsroot | CCheckout_MAIN |
m_cvsrootCombo | CCheckout_MAIN |
m_dontShortenPaths | CCheckout_MAIN |
m_dontShortenPathsCheck | CCheckout_MAIN |
m_export | CCheckout_MAIN |
m_forceRoot | CCheckout_MAIN |
m_forceRootCheck | CCheckout_MAIN |
m_mf | CCheckout_MAIN | [private]
m_moduleCombo | CCheckout_MAIN |
m_moduleName | CCheckout_MAIN |
m_noRecurse | CCheckout_MAIN |
m_overrideCoDir | CCheckout_MAIN |
m_overrideCoDirCheck | CCheckout_MAIN |
m_path | CCheckout_MAIN |
m_pathEdit | CCheckout_MAIN |
m_selCvsrootButton | CCheckout_MAIN |
OnBrowseModules() | CCheckout_MAIN | [protected]
OnBtnPath() | CCheckout_MAIN | [protected]
OnCheckOverridecheckoutdir() | CCheckout_MAIN | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnForceroot() | CCheckout_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CCheckout_MAIN | [protected, virtual]
OnSelcvsroot() | CCheckout_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CCheckout_MAIN() | CCheckout_MAIN |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:48:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CTCP2Parse.hpp Source File

common/CTCP2Parse.hpp

Go to the documentation of this file.
00001 /*
00002  ------------------------------------------------------------------------------
00003  * CTCP2Parse.hpp --
00004  *
00005  *  a C++ implementation of the Text attribute section of the CTCP/2
00006  *  draft by Robey Pointer (that eggdrop dude) and friends.  This code
00007  *  is based directly from Robey's Java example.  This code includes
00008  *  full support for decoding mIrc, ANSI, and ircII attributes as well.
00009  *
00010  *  See -+-> http://www.lag.net/~robey/ctcp
00011  *       +-> http://www.egroups.com/group/ctcp2
00012  *
00013  *  Depends: STL string template, no OS specifics.
00014  *
00015  *  This source is under BSD license and has no restrictions the way
00016  *  the GPL does.  Sell it for all I care.  Just be nice and give me
00017  *  credit for it.  Although it's not a requirement.
00018  *
00019  *  Author: David Gravereaux <davygrvy@pobox.com>
00020  *      Tomahawk Software Group
00021  *
00022  *  Conversion routines donated by Keith Lea <keith@cs.oswego.edu>
00023  *
00024  * RCS: @(#) $Id: CTCP2Parse.hpp,v 1.4 2001/02/04 10:19:57 davygrvy Exp $
00025  ------------------------------------------------------------------------------
00026  */
00027
00028
00029 #ifndef Inc_CTCP2Parse_hpp__
00030 #define Inc_CTCP2Parse_hpp__
00031
00032 #include <string>
00033 #include <vector>
00034
00035
00036 // mIrc to CTCP/2 attribute convertor
00037 class mircAttrCvt
00038 {
00039 public:
00040     void mirc2ctcp(std::string *in);
00041 private:
00042     static const char tokens[2];
00043     static const char *mirc2ctcpmap[17];
00044     int extractcolor (std::string *in, int start, short *fg, short *bg);
00045 };
00046
00047
00048 // ircII to CTCP/2 attribute convertor
00049 class irciiAttrCvt
00050 {
00051 public:
00052     void ircii2ctcp(std::string *in);
00053 private:
00054     static const char tokens[5];
00055 };
00056
00057
00058 // ANSI escape sequences to CTCP/2 attribute convertor
00059 class ansiAttrCvt
00060 {
00061 public:
00062     void ansi2ctcp(std::string *in);
00063 private:
00064     void do_m ();
00065     void do_C ();
00066
00067     const static char *escSeq;
00068     const static char *fgColorMap[16];
00069     const static char *bgColorMap[8];
00070
00071     int pos;
00072     int bold, underline, reverse, blink, italic;
00073
00074     std::string *_in;
00075
00076     //  A simple ansi escape sequence extractor class
00077     class AnsiSeq
00078     {
00079         std::string *_seq;
00080         std::vector<int> _params;
00081         char _verb;
00082         static const char *_notOf;
00083
00084     public:
00085         AnsiSeq (std::string *in, int pos);
00086         ~AnsiSeq ();
00087
00088         char verb () { return _verb; }
00089         const char *seq () { return _seq->c_str(); }
00090         int paramc () { return _params.size(); }
00091         int param (int index) { return _params[index]; }
00092     };
00093
00094     AnsiSeq *_seq;
00095 };
00096
00097
00098 // CTCP/2 embedded attribute parser and action invoker.
00099 //
00100 class CTCP2Parse : protected mircAttrCvt, irciiAttrCvt, ansiAttrCvt
00101 {
00102 protected:
00103     // encoding flags.
00104     enum EncodingType
00105     {
00106         iso8859_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, iso8859_6,
00107         iso8859_7, iso8859_8, iso8859_9, UTF_8
00108     };
00109
00110     // Character spacing.
00111     enum CharSpacingType { Fixed, Proportional };
00112
00113     // 24-bit colors (initialized here as integers for clarity)
00114     enum ColorType
00115     {
00116         Black      = 0x000000,
00117         Blue       = 0x00007F,
00118         Green      = 0x007F00,
00119         Cyan       = 0x007F7F,
00120         Red        = 0x7F0000,
00121         Magenta    = 0x7F007F,
00122         Yellow     = 0x7F7F00,
00123         Lt_Grey    = 0xC0C0C0,
00124         Grey       = 0x7F7F7F,
00125         Lt_Blue    = 0x0000FF,
00126         Lt_Green   = 0x00FF00,
00127         Lt_Cyan    = 0x00FFFF,
00128         Lt_Red     = 0xFF0000,
00129         Lt_Magenta = 0xFF00FF,
00130         Lt_Yellow  = 0xFFFF00,
00131         White      = 0xFFFFFF
00132     };
00133
00134     CTCP2Parse();
00135
00136     void SetDefaults (
00137         unsigned char fgR = (unsigned char) ((Lt_Grey & 0xFF0000) >> 16),
00138         unsigned char fgG = (unsigned char) ((Lt_Grey & 0x00FF00) >> 8),
00139         unsigned char fgB = (unsigned char) (Lt_Grey & 0x0000FF),       // default foreground color.
00140
00141         unsigned char bgR = (unsigned char) ((Black & 0xFF0000) >> 16),
00142         unsigned char bgG = (unsigned char) ((Black & 0x00FF00) >> 8),
00143         unsigned char bgB = (unsigned char) (Black & 0x0000FF),     // default background color.
00144
00145         CharSpacingType cpDef_ = Fixed,     // default spacing.
00146         EncodingType encDef_ = iso8859_1    // default encoding.
00147         );
00148
00149     void ParseIt(std::string *line);
00150
00151     virtual void PushStart () = 0;
00152     virtual void PushBold (bool) = 0;
00153     virtual void PushReverse (bool) = 0;
00154     virtual void PushUnderline (bool) = 0;
00155     virtual void PushOverstrike (bool) = 0;
00156     virtual void PushItalic (bool) = 0;
00157     virtual void PushBlink (bool) = 0;
00158     virtual void PushURL (bool) = 0;
00159     virtual void PushEncoding (EncodingType) = 0;
00160     virtual void PushSpacing (CharSpacingType) = 0;
00161     virtual void PushFontSize (int) = 0;
00162     virtual void PushForegroundColor (unsigned char R, unsigned char G, unsigned char B) = 0;
00163     virtual void PushBackgroundColor (unsigned char R, unsigned char G, unsigned char B) = 0;
00164     virtual void PushTextSegment (std::string *) = 0;
00165
00166 private:
00167     typedef struct
00168     {
00169         union
00170         {
00171             // don't assume the sizeof(int)
00172             __int32 RGB;
00173             struct
00174             {
00175 #ifdef _M_IX86  /* little endien */
00176                 unsigned char B;
00177                 unsigned char G;
00178                 unsigned char R;
00179                 unsigned char nul_void_ignore;
00180 #else           /* big endien */
00181                 unsigned char nul_void_ignore;
00182                 unsigned char R;
00183                 unsigned char G;
00184                 unsigned char B;
00185 #endif
00186             };
00187         };
00188     } RGBColor;
00189
00190     inline void decodeToggle (std::string *line, int *parseFrmChar, int *parseEndChar, int *varCnt)
00191     {
00192         (*parseFrmChar)++;   // consume the attribute
00193         if (*parseFrmChar < *parseEndChar)
00194         {
00195             if (line->at(*parseFrmChar) == '+')
00196             {
00197                 (*varCnt)++;
00198                 (*parseFrmChar)++;   // consume the '+'
00199             }
00200             else if (line->at(*parseFrmChar) == '-')
00201             {
00202                 if ((*varCnt) > 0)
00203                     (*varCnt)--;
00204                 (*parseFrmChar)++;   // consume the '-'
00205             }
00206         }
00207         else
00208             (*varCnt)++;  // default to a '+'
00209     }
00210
00211     inline int decodeColor
00212         (std::string *line, int *parseFrmChar, int *parseEndChar, RGBColor *c)
00213     {
00214         if (line->at(*parseFrmChar) == '#')
00215         {
00216             (*parseFrmChar)++;   // consume it
00217             if (*parseFrmChar + 6 <= *parseEndChar)
00218             {
00219                 unsigned char C = 0;
00220
00221                 c->RGB = 0;     // start with a clean plate
00222
00223                 // hi-byte red
00224                 if (!fromHex(line->at(*parseFrmChar), &C)) return 3;
00225                 (*parseFrmChar)++;  // consume the hex character
00226                 c->R |= (C << 4);
00227
00228                 // lo-byte red
00229                 if (!fromHex(line->at(*parseFrmChar), &C)) return 4;
00230                 (*parseFrmChar)++;  // consume the hex character
00231                 c->R |= C;
00232
00233                 // hi-byte green
00234                 if (!fromHex(line->at(*parseFrmChar), &C)) return 5;
00235                 (*parseFrmChar)++;  // consume the hex character
00236                 c->G |= (C << 4);
00237
00238                 // lo-byte green
00239                 if (!fromHex(line->at(*parseFrmChar), &C)) return 6;
00240                 (*parseFrmChar)++;  // consume the hex character
00241                 c->G |= C;
00242
00243                 // hi-byte blue
00244                 if (!fromHex(line->at(*parseFrmChar), &C)) return 7;
00245                 (*parseFrmChar)++;  // consume the hex character
00246                 c->B |= (C << 4);
00247
00248                 // lo-byte blue
00249                 if (!fromHex(line->at(*parseFrmChar), &C)) return 8;
00250                 (*parseFrmChar)++;  // consume the hex character
00251                 c->B |= C;
00252             } else {
00253                 // rollback the error...
00254                 return 3;
00255             }
00256         } else {
00257             unsigned char index = 0;
00258             if (!fromHex(line->at(*parseFrmChar), &index)) return 3;
00259             (*parseFrmChar)++;  // consume the hex character
00260             c->RGB = indexColor[index].RGB;
00261         }
00262         return 0;
00263     }
00264
00265     inline int fromHex(unsigned char h, unsigned char *val)
00266     {
00267         // 0 - 9
00268         if (h > 47 && h < 58) *val = (h - 48);
00269         // A - F
00270         else if (h > 64 && h < 71) *val = (h - 55);
00271         else return 0;   // throw a little conversion exception
00272         return 1;
00273     }
00274
00275     inline void PushOut (void)
00276     {
00277         // notify the derived class, we are about to start a new attribute set.
00278         PushStart();
00279
00280         // never push-out ALL the attributes -- only the CHANGED ones.
00281
00282         if ((boldCnt > 0) ^ boldLast) PushBold (boldLast = !boldLast ? true : false);
00283         if ((revCnt > 0) ^ revLast) PushReverse (revLast = !revLast ? true : false);
00284         if ((underCnt > 0) ^ underLast) PushUnderline (underLast = !underLast ? true : false);
00285         if ((overCnt > 0) ^ overLast) PushOverstrike (overLast = !overLast ? true : false);
00286         if ((italicCnt > 0) ^ italicLast) PushItalic (italicLast = !italicLast ? true : false);
00287         if ((blinkCnt > 0) ^ blinkLast) PushBlink (blinkLast = !blinkLast ? true : false);
00288         if ((urlCnt > 0) ^ urlLast) PushURL (urlLast = !urlLast ? true : false);
00289         if (enc ^ encLast) PushEncoding (encLast = enc);
00290         if (cp ^ cpLast) PushSpacing (cpLast = cp);
00291         if (fntSize ^ fntLast) PushFontSize (fntLast = fntSize);
00292
00293         if (fg.RGB ^ fgLast.RGB)
00294         {
00295             fgLast.RGB = fg.RGB;
00296             PushForegroundColor(fg.R, fg.G, fg.B);
00297         }
00298         if (bg.RGB ^ bgLast.RGB)
00299         {
00300             bgLast.RGB = bg.RGB;
00301             PushBackgroundColor(bg.R, bg.G, bg.B);
00302         }
00303
00304         PushTextSegment(segment);
00305     }
00306
00307     static const RGBColor indexColor[16];   // Array for indexing the color values
00308     EncodingType enc, encLast, encDef;  // storage for the encoding type
00309
00310     // storage for the toggle states
00311     int boldCnt,  revCnt,  overCnt,  underCnt,  italicCnt,  blinkCnt,  urlCnt;
00312     int boldLast, revLast, overLast, underLast, italicLast, blinkLast, urlLast;
00313     int fntSize, fntLast;
00314
00315     CharSpacingType cp, cpLast, cpDef;  // storage for font spacing type
00316
00317     RGBColor    fg, fgLast, fgDef, bg, bgLast, bgDef;
00318
00319     std::string *segment;
00320 };
00321
00322 #endif
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TbEntryButton Member List

This is the complete list of members for TbEntryButton, including all inherited members.

ischeck | TbEntryButton |
kind | TbEntry |
TbEntry(tbeKind k) | TbEntry | [inline]
TbEntryButton(HBITMAP b, int c, const char *t, UTB_VAR v) | TbEntryButton | [inline]
wid | TbEntryButton |
~TbEntry() | TbEntry | [inline, virtual]
~TbEntryButton() | TbEntryButton | [inline, virtual]

Generated on Sat Aug 7 22:56:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTmpFiles Member List

This is the complete list of members for CTmpFiles, including all inherited members.

CTmpFiles() | CTmpFiles |
m_allfiles | CTmpFiles | [protected]
push_back(const char *file) | CTmpFiles | [inline]
~CTmpFiles() | CTmpFiles | [virtual]

Generated on Sat Aug 7 22:57:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFrameWnd.h Source File

WinCvs/CJLib/Include/CJFrameWnd.h

Go to the documentation of this file.
00001 // CJFrameWnd.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJFrameWnd.h $
00011  *
00012  * $History: CJFrameWnd.h $
00013  *
00014  * *****************  Version 16  *****************
00015  * User: Kirk Stowell Date: 10/29/99   Time: 12:43a
00016  * Updated in $/CodeJock/Include
00017  * Overloaded PreCreateWindow(...) for flicker free drawing.
00018  *
00019  * *****************  Version 15  *****************
00020  * User: Kirk Stowell Date: 10/26/99   Time: 10:41p
00021  * Updated in $/CodeJock/Include
00022  * Made class methods virtual for inheritance purposes.
00023  *
00024  * *****************  Version 14  *****************
00025  * User: Kirk Stowell Date: 10/14/99   Time: 6:15p
00026  * Updated in $/CodeJock/Include
00027  * Fixed bug with a document becomes the active document when the user
00028  * clicks inside a tab in the CCJTabControlBar to perform some operation.
00029  * When closing the application, MFC decides in CFrameWnd::OnClose() to
00030  * check if the 'active' document is modified before checking all other
00031  * documuents. If the active document is not modified and can close its
00032  * frame, it does not check other documents individually and shuts down
00033  * without asking the important 'modified save' questions. To fix this,
00034  * OnClose() was overriden to add a call to "SetActiveView(NULL)" just
00035  * before the base class OnClose is called. This will check all documents
00036  * asking the save question before closing the application. Thanks to
00037  * Simon Clark [spc@otleda.com] for help with this.
00038  *
00039  * *****************  Version 13  *****************
00040  * User: Kirk Stowell Date: 10/14/99   Time: 10:05a
00041  * Updated in $/CodeJock/Include
00042  * Overrode OnEraseBkgnd(...) to help to eliminate screen flicker.
00043  *
00044  * *****************  Version 12  *****************
00045  * User: Kirk Stowell Date: 9/16/99    Time: 2:35p
00046  * Updated in $/CodeJockey/Include
00047  * Fixed bug with save / restore bar state, and with saved bar size
00048  * changing whenever the application starts.
00049  *
00050  * *****************  Version 11  *****************
00051  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00052  * Updated in $/CodeJockey/Include
00053  * Updated copyright and contact information.
00054  *
00055  * *****************  Version 10  *****************
00056  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00057  * Updated in $/CodeJockey/Include
00058  *
00059  * *****************  Version 9  *****************
00060  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00061  * Updated in $/CodeJockey/Include
00062  *
00063  * *****************  Version 8  *****************
00064  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00065  * Updated in $/CodeJockey/Include
00066  * Cleaned up inline functions, and import/export macro so that class will
00067  * be imported when linked to, and exported at compile time.
00068  *
00069  * *****************  Version 7  *****************
00070  * User: Kirk Stowell Date: 6/11/99    Time: 8:25p
00071  * Updated in $/CodeJockey/Include
00072  * Slight modification made to popup menu code.
00073  *
00074  * *****************  Version 6  *****************
00075  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00076  * Updated in $/CodeJockey/Include
00077  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00078  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00079  * message handler, this is now automatically handled by the base class.
00080  * Added redraw flags to the create method and modified paint and layout
00081  * handlers to reduce flicker and un-necessary command handling. Dragging
00082  * rect now reflects actual control bar docked size. Added "flat" look to
00083  * the control bars, the control bars can now use the classic DevStudio
00084  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00085  * docking windows now handle dragging, docking and floating much better,
00086  * and behave more like DevStudio.
00087  *
00088  * *****************  Version 5  *****************
00089  * User: Kirk Stowell Date: 5/02/99    Time: 2:18a
00090  * Updated in $/CodeJockey/Include
00091  *
00092  * *****************  Version 4  *****************
00093  * User: Kirk Stowell Date: 5/02/99    Time: 2:13a
00094  * Updated in $/CodeJockey/Include
00095  * Re-wrote CCJMenu initialization routines with a more cleaner approach.
00096  *
00097  * *****************  Version 3  *****************
00098  * User: Kirk Stowell Date: 4/03/99    Time: 4:47p
00099  * Updated in $/CodeJockey/Include
00100  * Added comments and cleaned up code.  Added support for Brent Corkum's
00101  * BCMenu (CCJMenu), which is a replacement for the CCoolMenu class.
00102  *
00103  * *****************  Version 2  *****************
00104  * User: Kirk Stowell Date: 1/12/99    Time: 4:46p
00105  * Updated in $/CodeJockey/Include
00106  * Total re-write to add side-by-side docking support for CCJControlBar
00107  * class.
00108  *
00109  * *****************  Version 1  *****************
00110  * User: Kirk Stowell Date: 10/17/98   Time: 4:46p
00111  * Created in $/CodeJockey/Include
00112  * Initial re-write and release.
00113  *
00114  ***************************************************************************/
00116
00117 #ifndef __CJFRAMEWND_H__
00118 #define __CJFRAMEWND_H__
00119
00120 #if _MSC_VER >= 1000
00121 #pragma once
00122 #endif // _MSC_VER >= 1000
00123
00124 #include "CJMenuBar.h"
00125 #include "CJMenu.h"
00126
00127 // class forwards
00128 class CCJSizeDockBar;
00129
00130 // CCJFrameWnd is a CFrameWnd derived class which is used to
00131 // reposition toolbar layout for 3D effect, in addition to docking
00132 // methods for CCJToolBar and CCJControlBar class
00133 class _CJX_EXT_CLASS CCJFrameWnd : public CFrameWnd
00134 {
00135     DECLARE_DYNCREATE(CCJFrameWnd)
00136
00137 public:
00138
00139     // Default constructor
00140     //
00141     CCJFrameWnd();
00142
00143     // Virtual destructor
00144     //
00145     virtual ~CCJFrameWnd();
00146
00147 protected:
00148
00149     static DWORD    dwDockBarMap[4][2]; // array used for docking masks
00150     CCJMenu         m_menu;             // SDI frame menu.
00151     CCJMenuBar      m_wndMenuBar;       // menu bar
00152
00153     // Yiannhs to parameterize and the dock bar border
00154     enum DockFlatBorders {
00155         brdrAllRaised       = 0x0000,
00156         brdrFlatTop         = 0x0001,
00157         brdrFlatBottom      = 0x0002,
00158         brdrFlatLeft        = 0x0004,
00159         brdrFlatRight       = 0x0008,
00160         brdrFlatVertical    = 0x0003,
00161         brdrFlatHorizontal  = 0x000C,
00162         brdrFlatAll         = 0x000F
00163     };
00164
00165 protected:
00166
00167     // this member function is called by the framework to associate
00168     // toolbar resources with the frame menu
00169     //
00170     virtual HMENU NewMenu(
00171         // resource id for menu
00172         UINT nMenuID,
00173         // array of toolbar resource ids
00174         UINT* nToolbarIDs = NULL,
00175         // size of array.
00176         int nSize = 0);
00177
00178     // this member function is called by the framework to associate
00179     // a toolbar resource with the frame menu
00180     //
00181     virtual HMENU NewMenu(
00182         // resource id for menu
00183         UINT nMenuID,
00184         // toolbar resource
00185         UINT nToolbarID = NULL);
00186
00187 public:
00188
00189     virtual void LoadBarState(LPCTSTR lpszProfileName);
00190     virtual void SaveBarState(LPCTSTR lpszProfileName) const;
00191
00192     // this member function is called to initialize the CCJMenu
00193     //
00194     virtual BOOL InitializeMenu(
00195         // resource id for menu
00196         UINT nMenuID,
00197         // array of toolbar resource ids
00198         UINT* nToolbarIDs = NULL,
00199         // size of array.
00200         int nSize = 0);
00201
00202     // this member function is called to initialize the Menu
00203     //
00204     virtual BOOL InitializeMenu(
00205         // resource id for menu
00206         UINT nMenuID,
00207         // toolbar resource
00208         UINT nToolbarID = NULL);
00209
00210     // this member function is called to calculate the size of
00211     // a CCJControlBar
00212     //
00213     virtual void RecalcAllExcept(CCJSizeDockBar *pBar);
00214
00215     // this member function enables docking for standard
00216     // toolbar and control bars
00217     //
00218     virtual void EnableDocking(DWORD dwDockStyle);
00219
00220     // this member function enables docking for CCJControl bars only
00221     //
00222     virtual void EnableDockingSizeBar(
00223         // Specifies which sides of the frame window can serve as docking sites
00224         // for control bars. It can be one or more of the following:
00225         //
00226         // CBRS_ALIGN_TOP   Allows docking at the top of the client area.
00227         // CBRS_ALIGN_BOTTOM   Allows docking at the bottom of the client area.
00228         // CBRS_ALIGN_LEFT   Allows docking on the left side of the client area.
00229         // CBRS_ALIGN_RIGHT   Allows docking on the right side of the client area.
00230         // CBRS_ALIGN_ANY   Allows docking on any side of the client area.
00231         DWORD dwDockStyle,
00232         // enum for flat border styles.
00233         DockFlatBorders FlatFlags = brdrAllRaised );
00234
00235     // this member function will dock a CCJControlBar
00236     //
00237     virtual void DockSizeBar(
00238         // toolbar to dock
00239         CControlBar* pBar,
00240         // dockbar object usually NULL
00241         CCJSizeDockBar* pDockBar=NULL,
00242         // initial size usually NULL
00243         LPRECT lpRect=NULL);
00244
00245     // this memeber function will dock the control bar passed in
00246     // as the first argument, and dock the control bar that is passed in
00247     // as the second argument to the left of the first one.
00248     //
00249     virtual void DockControlBarLeftOf(
00250         // control bar to dock to the right of
00251         CControlBar* Bar,
00252         // already docked control bar
00253         CControlBar* LeftOf);
00254
00255 // Overrides
00256     // ClassWizard generated virtual function overrides
00257     //{{AFX_VIRTUAL(CCJFrameWnd)
00258     public:
00259     virtual void RecalcLayout(BOOL bNotify = TRUE);
00260     virtual BOOL PreTranslateMessage(MSG* pMsg);
00261     protected:
00262     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00263     virtual BOOL PreCreateWindow(CREATESTRUCT& cs, UINT nIconID);
00264     //}}AFX_VIRTUAL
00265
00266 // Generated message map functions
00267 protected:
00268     //{{AFX_MSG(CCJFrameWnd)
00269     afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00270     afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu);
00271     afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00272     afx_msg void OnClose();
00273     //}}AFX_MSG
00274     DECLARE_MESSAGE_MAP()
00275 };
00276
00278
00279 //{{AFX_INSERT_LOCATION}}
00280 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00281
00282 #endif // __CJFRAMEWND_H__
00283
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

FileEntry Member List

This is the complete list of members for FileEntry, including all inherited members.

currRev | FileEntry | [protected]
file | FileEntry | [protected]
FileEntry() | FileEntry |
FileEntry(const char *filename, const FSSpec *macspec=0L, const char *currRevision=0L) | FileEntry |
FileEntry(const FileEntry &entry) | FileEntry |
operator=(const FileEntry &entry) | FileEntry |
spec | FileEntry | [protected]

Generated on Sat Aug 7 22:52:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

MacroTraversal Member List

This is the complete list of members for MacroTraversal, including all inherited members.

EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TraversalReport | [virtual]
ExitDirectory(const char *fullpath) | TraversalReport | [virtual]
GetRefRunning() | TraversalReport | [static]
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnError(const char *err, int errcode) | MacroTraversal | [inline, virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | MacroTraversal | [virtual]
OnIdle(const char *fullpath) | TraversalReport | [virtual]

Generated on Sat Aug 7 22:54:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJListView.h Source File

WinCvs/CJLib/Include/CJListView.h

Go to the documentation of this file.
00001 // CJListView.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the CListView articles from http://www.codeguru.com/listview
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 1999/11/30 21:45:51 $
00011  * $Revision: 1.1.1.2 $
00012  * $Archive: /CodeJock/Include/CJListView.h $
00013  *
00014  * $History: CJListView.h $
00015  *
00016  * *****************  Version 10  *****************
00017  * User: Kirk Stowell Date: 10/30/99   Time: 2:22p
00018  * Updated in $/CodeJock/Include
00019  * Overrode OnEraseBkgnd(...) for flicker free drawing.
00020  *
00021  * *****************  Version 9  *****************
00022  * User: Kirk Stowell Date: 10/26/99   Time: 10:42p
00023  * Updated in $/CodeJock/Include
00024  * Made class methods virtual for inheritance purposes.
00025  *
00026  * *****************  Version 8  *****************
00027  * User: Kirk Stowell Date: 7/31/99    Time: 4:27p
00028  * Updated in $/CodeJockey/Include
00029  *
00030  * *****************  Version 7  *****************
00031  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00032  * Updated in $/CodeJockey/Include
00033  *
00034  * *****************  Version 6  *****************
00035  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00036  * Updated in $/CodeJockey/Include
00037  *
00038  * *****************  Version 5  *****************
00039  * User: Kirk Stowell Date: 7/18/99    Time: 10:14p
00040  * Updated in $/CodeJockey/Include
00041  * Cleaned up inline functions, and import/export macro so that class will
00042  * be imported when linked to, and exported at compile time.
00043  *
00044  * *****************  Version 4  *****************
00045  * User: Kirk Stowell Date: 6/12/99    Time: 2:12a
00046  * Updated in $/CodeJockey/Include
00047  * Cleaned up initialization, sorting and column info saving. Removed sort
00048  * functions, which were replaced with the virtual function SortList(...).
00049  * Override this function in your derived class to perform custom sorting.
00050  * See CCJShellList for an implementation of this virtual function.
00051  *
00052  * *****************  Version 3  *****************
00053  * User: Kirk Stowell Date: 4/03/99    Time: 12:06a
00054  * Updated in $/CodeJockey/Include
00055  * Added comments and cleaned up code.
00056  *
00057  * *****************  Version 2  *****************
00058  * User: Kirk Stowell Date: 3/03/99    Time: 12:06a
00059  * Updated in $/CodeJockey/Include
00060  * Added InitializeFlatHeader() in order to initialize the list control
00061  * manually.
00062  *
00063  * *****************  Version 1  *****************
00064  * User: Kirk Stowell Date: 1/16/99    Time: 12:06a
00065  * Created in $/CodeJockey/Include
00066  * Initial release.
00067  *
00068  ***************************************************************************/
00070
00071 #ifndef __CJLISTVIEW_H__
00072 #define __CJLISTVIEW_H__
00073
00074 #if _MSC_VER >= 1000
00075 #pragma once
00076 #endif // _MSC_VER >= 1000
00077
00078 #include <afxcview.h>
00079 class CCJFlatHeaderCtrl;
00080
00081 // CCJListView is a CListView derived class which implements a
00082 // flat header and generic sorting routines.
00083 class _CJX_EXT_CLASS CCJListView : public CListView
00084 {
00085     DECLARE_DYNCREATE(CCJListView)
00086
00087 public:
00088
00089     // Default constructor
00090     //
00091     CCJListView();
00092
00093     // Virtual destructor
00094     //
00095     virtual ~CCJListView();
00096
00097 protected:
00098
00099     int                 m_nMinColWidth;     // minimum width for columns
00100     int                 m_nMaxColWidth;     // maximum width for columns
00101     int                 m_nSortedCol;       // index of currently selected column
00102     CCJFlatHeaderCtrl*  m_pHeaderCtrl;      // points to subclassed flat header control.
00103     CString             m_strSection;       // registry section name.
00104     CString             m_strEntry;         // registry entry name.
00105     CString             m_strDefault;       // registry default value.
00106     CListCtrl*          m_pListCtrl;        // points to the list control associated with this view.
00107     COLORREF            m_clrText;          // RGB value for row text color.
00108     COLORREF            m_clrTextBk;        // RGB value for row text background color.
00109     bool                m_bNoColSizing;     // if true, column sizing is disabled.
00110     int                 m_nMinSize;         // if set, columns will have a minimum size requirement.
00111
00112 private:
00113
00114     bool                m_bAutoSave;        // true if saving column widths.
00115     bool                m_bAscending;       // flag to determine sorting order
00116
00117 // Operations
00118 public:
00119
00120     // this member function will return the column width stored in the registry.
00121     //
00122     virtual int GetStoredWidth(int nCol);
00123
00124     // this member function will automatically size a given column.
00125     //
00126     virtual void AutoSizeColumn(int nCol=-1);
00127
00128     // this member function will set the column width from the
00129     // registry settings.
00130     //
00131     virtual void SetColumnWidth(int nCol);
00132
00133     // this member function loads column widths from the registry.
00134     //
00135     virtual void LoadColumnWidths();
00136
00137     // this member function saves column widths to the registry.
00138     //
00139     virtual void SaveColumnWidths();
00140
00141     // this member function will initialize the autosave feature. If called
00142     // column widths will be saved to system registry when the list control
00143     // window is destroyed.
00144     //
00145     virtual void AutoSaveColumns(
00146         // registry section name, if NULL the default is "Settings".
00147         LPCTSTR lpszSection=NULL,
00148         // registry entry name, if NULL the default is "Column Info".
00149         LPCTSTR lpszEntry=NULL,
00150         // registry default value, if NULL the default id "".
00151         LPCTSTR lpszDefault=NULL);
00152
00153     // call this member function to subclass the the flat header control.
00154     //
00155     virtual bool SubclassHeader(bool bBoldFont=false);
00156
00157     // override this member function in your derived class to
00158     // peform custom sort routines.
00159     //
00160     virtual bool SortList(
00161         // passed in from control, index of column clicked.
00162         int nCol,
00163         // passed in from control, true if sort order should be ascending.
00164         bool bAscending );
00165
00166     // this member function is called to set extended styles for the list
00167     // control ie: LVS_EX_FULLROWSELECT, LVS_EX_GRIDLINES, LVS_EX_HEADERDRAGDROP.
00168     //
00169     virtual void SetExtendedStyle( DWORD dwExStyle );
00170
00171     // this member function is called to return the list control extended style.
00172     //
00173     virtual DWORD GetExtendedStyle();
00174
00175     // call this member function to enable/disable column sizing
00176     //
00177     virtual void DisableColumnSizing(bool bDisable);
00178
00179     // call this member function to set a minimum column size
00180     //
00181     virtual void SetMinimumColSize(int nSize);
00182
00183     // call this member function to determine the row index and column index for a point.
00184     // returns the row index or -1 if point is not over a row.
00185     //
00186     virtual int HitTestEx(
00187         // point to be tested.
00188         CPoint &point,
00189         // to hold the column index
00190         int *col) const;
00191
00192     // adds column after the right most column.
00193     //
00194     virtual int AddColumn(
00195         // the column's heading
00196         LPCTSTR lpszColHeading,
00197         // Width of the column, in pixels. If this parameter is -1,
00198         // the column width is the same as previous column
00199         int nWidth = -1,
00200         // the alignment of the column. Can be LVCFMT_LEFT,
00201         // LVCFMT_RIGHT, or LVCFMT_CENTER.
00202         int nFormat=LVCFMT_LEFT);
00203
00204     // this member function will build the columns for the list control. Returns
00205     // false if an error occured.
00206     //
00207     virtual bool BuildColumns(
00208         // number of columns the list control contains
00209         int nCols,
00210         // int array containing the column widths
00211         int* nWidth,
00212         // CString array containing the string for each column
00213         CString* strColString );
00214
00215     // this member function will build the columns for the list control. Returns
00216     // false if an error occured.
00217     //
00218     virtual bool BuildColumns(
00219         // number of columns the list control contains
00220         int nCols,
00221         // int array containing the column widths
00222         int* nWidth,
00223         // int array containing the  string resource id for each column
00224         int* nColString );
00225
00226     // sets the row text and background colors.
00227     virtual void SetRowColors(COLORREF clrText, COLORREF clrTextBk);
00228
00229     // returns the number of columns in the list.
00230     virtual int GetColumnCount() const;
00231
00232     // copies a row to a new location.
00233     //
00234     virtual bool CopyRow(int nFrom, int nTo);
00235
00236     // moves a row to a new location.
00237     //
00238     virtual bool MoveRow(int nFrom, int nTo);
00239
00240 // Overrides
00241     // ClassWizard generated virtual function overrides
00242     //{{AFX_VIRTUAL(CCJListView)
00243     public:
00244     virtual void OnInitialUpdate();
00245     protected:
00246     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
00247     virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
00248     //}}AFX_VIRTUAL
00249
00250 // Implementation
00251 protected:
00252 #ifdef _DEBUG
00253     virtual void AssertValid() const;
00254     virtual void Dump(CDumpContext& dc) const;
00255 #endif
00256
00257     // Generated message map functions
00258 protected:
00259     //{{AFX_MSG(CCJListView)
00260     afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
00261     afx_msg void OnDestroy();
00262     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00263     //}}AFX_MSG
00264     DECLARE_MESSAGE_MAP()
00265 };
00266
00268 //  Inline Functions
00270
00271 _CJXLIB_INLINE DWORD CCJListView::GetExtendedStyle()
00272     { ASSERT(::IsWindow(m_hWnd)); return SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); }
00273
00274 _CJXLIB_INLINE void CCJListView::SetExtendedStyle(DWORD dwExStyle)
00275     { ASSERT(::IsWindow(m_hWnd)); SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, GetExtendedStyle()|dwExStyle); }
00276
00277 _CJXLIB_INLINE void CCJListView::SetRowColors(COLORREF clrText, COLORREF clrTextBk)
00278     { m_clrText = clrText; m_clrTextBk = clrTextBk; }
00279
00280 _CJXLIB_INLINE void CCJListView::SetMinimumColSize(int nSize)
00281     { m_nMinSize = nSize; }
00282
00283 _CJXLIB_INLINE void CCJListView::DisableColumnSizing(bool bDisable)
00284     { m_bNoColSizing = bDisable; }
00285
00287
00288 //{{AFX_INSERT_LOCATION}}
00289 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00290
00291 #endif // __CJLISTVIEW_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoWinBehavior Member List

This is the complete list of members for TPseudoWinBehavior, including all inherited members.

DoEvent(EventNumber eventNumber, TEventHandler *source, TEvent *event) | TPseudoWinBehavior | [virtual]
fWidID | TPseudoWinBehavior | [protected]
GetWidID() const | TPseudoWinBehavior | [inline]
kPseudoWinBehavior enum value | TPseudoWinBehavior |
MA_DECLARE_CLASS | TPseudoWinBehavior | [private]
SetPseudoWidget(int widid) | TPseudoWinBehavior | [inline, protected]
TPseudoWinBehavior() | TPseudoWinBehavior |
~TPseudoWinBehavior() | TPseudoWinBehavior | [virtual]

Generated on Sat Aug 7 22:57:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/umenu.h Source File

rf/umenu.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #ifndef UMENU_H
00022 #define UMENU_H
00023
00024 #include "uwidget.h"
00025
00026 #ifdef __cplusplus
00027
00028 class UMenu : public UWidget
00029 {
00030     UDECLARE_DYNAMIC(UMenu)
00031 public:
00032     UMenu(int widid);
00033     virtual ~UMenu();
00034
00035 #if qGTK
00036     inline void *GetAccelGroup(void) const { return fAccelGroup; }
00037         // maintain an accelerator group (GtkAccelGroup)
00038         // that you can add to your window.
00039
00040     inline void *GetRadioGroup(void) const { return fRadioGroup; }
00041         // maintain an radio group (GList of GtkRadioMenuItem)
00042         // that you can add to your window.
00043
00044     inline void SetRadioGroup(void* group) { fRadioGroup = group; }
00045         // set new radio group (GList of GtkRadioMenuItem)
00046         // that you can add to your window.
00047 #endif
00048
00049 protected:
00050 #if qGTK
00051     void *fAccelGroup;
00052     void *fRadioGroup;
00053 #endif
00054
00055     ev_msg void OnUpdateUI(void);
00056     ev_msg int OnCommands(int cmd);
00057
00058     UDECLARE_MESSAGE_MAP()
00059 };
00060 #endif /* __cplusplus */
00061
00062 #ifdef __cplusplus
00063 extern "C" {
00064 #endif
00065
00066 UMENU UMenuAddPulldown(int widid, const char *name, UMENU top, int cmd=0);
00067 UMENU UMenuAddRadio(int widid, const char *name, UMENU top, const void *pixmap, int cmd);
00068 UMENU UMenuAddToggle(int widid, const char *name, UMENU top, const void *pixmap, int cmd);
00069 UMENU UMenuAddButton(int widid, const char *name, UMENU top, const void *pixmap, int cmd);
00070 UMENU UMenuAddSeparator(int widid, UMENU top);
00071 void UMenuDelete(UMENU top, int afterIndex);
00072 void UMenuDeleteByCmd(UMENU top, int cmd);
00073 int UMenuCount(UMENU top);
00074
00075 #ifdef __cplusplus
00076 }
00077 #endif
00078
00079 #endif /* UMenu_H */
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTempToggleBool Member List

This is the complete list of members for CTempToggleBool, including all inherited members.

CTempToggleBool(bool &value) | CTempToggleBool | [inline]
m_didSetIt | CTempToggleBool | [protected]
m_value | CTempToggleBool | [protected]
~CTempToggleBool() | CTempToggleBool | [inline]

Generated on Sat Aug 7 22:56:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/Subclass.cpp Source File

WinCvs/CJLib/CJLibrary/Subclass.cpp

Go to the documentation of this file.
00001
00002 // Copyright 1998 Paul DiLascia
00003 // If this code works, it was written by Paul DiLascia.
00004 // If not, I don't know who wrote it.
00005 //
00006 // CSubclassWnd is a generic class for hooking another window's messages.
00007 //
00009 /****************************************************************************
00010  *
00011  * $Date: 1999/11/30 21:45:49 $
00012  * $Revision: 1.1.1.2 $
00013  * $Archive: /CodeJock/CJLibrary/Subclass.cpp $
00014  *
00015  * $History: Subclass.cpp $
00016  *
00017  * *****************  Version 2  *****************
00018  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00019  * Updated in $/CodeJock/CJLibrary
00020  * Added source control history to file header.
00021  *
00022  ***************************************************************************/
00024
00025 #include "StdAfx.h"
00026 #include "Subclass.h"
00027
00028 #ifdef _DEBUG
00029 #define new DEBUG_NEW
00030 #undef THIS_FILE
00031 static char THIS_FILE[] = __FILE__;
00032 #endif
00033
00035 // The message hook map is derived from CMapPtrToPtr, which associates
00036 // a pointer with another pointer. It maps an HWND to a CSubclassWnd, like
00037 // the way MFC's internal maps map HWND's to CWnd's. The first CSubclassWnd
00038 // attached to a window is stored in the map; all other CSubclassWnd's for that
00039 // window are then chained via CSubclassWnd::m_pNext.
00040 //
00041 class CSubclassWndMap : private CMapPtrToPtr {
00042 public:
00043     CSubclassWndMap();
00044     ~CSubclassWndMap();
00045     static CSubclassWndMap& GetHookMap();
00046     void Add(HWND hwnd, CSubclassWnd* pSubclassWnd);
00047     void Remove(CSubclassWnd* pSubclassWnd);
00048     void RemoveAll(HWND hwnd);
00049     CSubclassWnd* Lookup(HWND hwnd);
00050 };
00051
00052 // This trick is used so the hook map isn't
00053 // instantiated until someone actually requests it.
00054 //
00055 #define theHookMap  (CSubclassWndMap::GetHookMap())
00056
00057 IMPLEMENT_DYNAMIC(CSubclassWnd, CWnd);
00058
00059 CSubclassWnd::CSubclassWnd()
00060 {
00061     m_pNext = NULL;
00062     m_pOldWndProc = NULL;
00063     m_hWnd  = NULL;
00064 }
00065
00066 CSubclassWnd::~CSubclassWnd()
00067 {
00068     if (m_hWnd)
00069         HookWindow((HWND)NULL);     // unhook window
00070 }
00071
00073 // Hook a window.
00074 // This installs a new window proc that directs messages to the CSubclassWnd.
00075 // pWnd=NULL to remove.
00076 //
00077 BOOL CSubclassWnd::HookWindow(HWND hwnd)
00078 {
00079     ASSERT_VALID(this);
00080     if (hwnd) {
00081         // Hook the window
00082         ASSERT(m_hWnd==NULL);
00083         ASSERT(::IsWindow(hwnd));
00084         theHookMap.Add(hwnd, this);         // Add to map of hooks
00085
00086     } else if (m_hWnd) {
00087         // Unhook the window
00088         theHookMap.Remove(this);                // Remove from map
00089         m_pOldWndProc = NULL;
00090     }
00091     m_hWnd = hwnd;
00092     return TRUE;
00093 }
00094
00096 // Window proc-like virtual function which specific CSubclassWnds will
00097 // override to do stuff. Default passes the message to the next hook;
00098 // the last hook passes the message to the original window.
00099 // You MUST call this at the end of your WindowProc if you want the real
00100 // window to get the message. This is just like CWnd::WindowProc, except that
00101 // a CSubclassWnd is not a window.
00102 //
00103 LRESULT CSubclassWnd::WindowProc(UINT msg, WPARAM wp, LPARAM lp)
00104 {
00105 //  ASSERT_VALID(this);  // removed for speed
00106     ASSERT(m_pOldWndProc);
00107     return m_pNext ? m_pNext->WindowProc(msg, wp, lp) :
00108         ::CallWindowProc(m_pOldWndProc, m_hWnd, msg, wp, lp);
00109 }
00110
00112 // Like calling base class WindowProc, but with no args, so individual
00113 // message handlers can do the default thing. Like CWnd::Default
00114 //
00115 LRESULT CSubclassWnd::Default()
00116 {
00117     // MFC stores current MSG in thread state
00118     MSG& curMsg = AfxGetThreadState()->m_lastSentMsg;
00119     // Note: must explicitly call CSubclassWnd::WindowProc to avoid infinte
00120     // recursion on virtual function
00121     return CSubclassWnd::WindowProc(curMsg.message, curMsg.wParam, curMsg.lParam);
00122 }
00123
00124 #ifdef _DEBUG
00125 void CSubclassWnd::AssertValid() const
00126 {
00127     CObject::AssertValid();
00128     ASSERT(m_hWnd==NULL || ::IsWindow(m_hWnd));
00129     if (m_hWnd) {
00130         for (CSubclassWnd* p = theHookMap.Lookup(m_hWnd); p; p=p->m_pNext) {
00131             if (p==this)
00132                 break;
00133         }
00134         ASSERT(p); // should have found it!
00135     }
00136 }
00137
00138 void CSubclassWnd::Dump(CDumpContext& dc) const
00139 {
00140     CObject::Dump(dc);
00141 }
00142
00143 #endif
00144
00146 // Subclassed window proc for message hooks. Replaces AfxWndProc (or whatever
00147 // else was there before.)
00148 //
00149 LRESULT CALLBACK
00150 HookWndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
00151 {
00152 #ifdef _USRDLL
00153     // If this is a DLL, need to set up MFC state
00154     AFX_MANAGE_STATE(AfxGetStaticModuleState());
00155 #endif
00156
00157     // Set up MFC message state just in case anyone wants it
00158     // This is just like AfxCallWindowProc, but we can't use that because
00159     // a CSubclassWnd is not a CWnd.
00160     //
00161     MSG& curMsg = AfxGetThreadState()->m_lastSentMsg;
00162     MSG  oldMsg = curMsg;   // save for nesting
00163     curMsg.hwnd     = hwnd;
00164     curMsg.message = msg;
00165     curMsg.wParam  = wp;
00166     curMsg.lParam  = lp;
00167
00168     // Get hook object for this window. Get from hook map
00169     CSubclassWnd* pSubclassWnd = theHookMap.Lookup(hwnd);
00170     ASSERT(pSubclassWnd);
00171
00172     LRESULT lr;
00173     if (msg==WM_NCDESTROY) {
00174         // Window is being destroyed: unhook all hooks (for this window)
00175         // and pass msg to orginal window proc
00176         //
00177         WNDPROC wndproc = pSubclassWnd->m_pOldWndProc;
00178         theHookMap.RemoveAll(hwnd);
00179         lr = ::CallWindowProc(wndproc, hwnd, msg, wp, lp);
00180
00181     } else {
00182         // pass to msg hook
00183         lr = pSubclassWnd->WindowProc(msg, wp, lp);
00184     }
00185     curMsg = oldMsg;            // pop state
00186     return lr;
00187 }
00188
00190 // CSubclassWndMap implementation
00191 //
00192 CSubclassWndMap::CSubclassWndMap()
00193 {
00194 }
00195
00196 CSubclassWndMap::~CSubclassWndMap()
00197 {
00198 // This assert bombs when posting WM_QUIT, so I've deleted it.
00199 //  ASSERT(IsEmpty());  // all hooks should be removed!
00200 }
00201
00203 // Get the one and only global hook map
00204 //
00205 CSubclassWndMap& CSubclassWndMap::GetHookMap()
00206 {
00207     // By creating theMap here, C++ doesn't instantiate it until/unless
00208     // it's ever used! This is a good trick to use in C++, to
00209     // instantiate/initialize a static object the first time it's used.
00210     //
00211     static CSubclassWndMap theMap;
00212     return theMap;
00213 }
00214
00216 // Add hook to map; i.e., associate hook with window
00217 //
00218 void CSubclassWndMap::Add(HWND hwnd, CSubclassWnd* pSubclassWnd)
00219 {
00220     ASSERT(hwnd && ::IsWindow(hwnd));
00221
00222     // Add to front of list
00223     pSubclassWnd->m_pNext = Lookup(hwnd);
00224     SetAt(hwnd, pSubclassWnd);
00225
00226     if (pSubclassWnd->m_pNext==NULL) {
00227         // If this is the first hook added, subclass the window
00228         pSubclassWnd->m_pOldWndProc =
00229             (WNDPROC)SetWindowLong(hwnd, GWL_WNDPROC, (DWORD)HookWndProc);
00230
00231     } else {
00232         // just copy wndproc from next hook
00233         pSubclassWnd->m_pOldWndProc = pSubclassWnd->m_pNext->m_pOldWndProc;
00234     }
00235     ASSERT(pSubclassWnd->m_pOldWndProc);
00236 }
00237
00239 // Remove hook from map
00240 //
00241 void CSubclassWndMap::Remove(CSubclassWnd* pUnHook)
00242 {
00243     HWND hwnd = pUnHook->m_hWnd;
00244     ASSERT(hwnd && ::IsWindow(hwnd));
00245
00246     CSubclassWnd* pHook = Lookup(hwnd);
00247     ASSERT(pHook);
00248     if (pHook==pUnHook) {
00249         // hook to remove is the one in the hash table: replace w/next
00250         if (pHook->m_pNext)
00251             SetAt(hwnd, pHook->m_pNext);
00252         else {
00253             // This is the last hook for this window: restore wnd proc
00254             RemoveKey(hwnd);
00255             SetWindowLong(hwnd, GWL_WNDPROC, (DWORD)pHook->m_pOldWndProc);
00256         }
00257     } else {
00258         // Hook to remove is in the middle: just remove from linked list
00259         while (pHook->m_pNext!=pUnHook)
00260             pHook = pHook->m_pNext;
00261         ASSERT(pHook && pHook->m_pNext==pUnHook);
00262         pHook->m_pNext = pUnHook->m_pNext;
00263     }
00264 }
00265
00267 // Remove all the hooks for a window
00268 //
00269 void CSubclassWndMap::RemoveAll(HWND hwnd)
00270 {
00271     CSubclassWnd* pSubclassWnd;
00272     while ((pSubclassWnd = Lookup(hwnd))!=NULL)
00273         pSubclassWnd->HookWindow((HWND)NULL);   // (unhook)
00274 }
00275
00277 // Find first hook associate with window
00278 //
00279 CSubclassWnd* CSubclassWndMap::Lookup(HWND hwnd)
00280 {
00281     CSubclassWnd* pFound = NULL;
00282     if (!CMapPtrToPtr::Lookup(hwnd, (void*&)pFound))
00283         return NULL;
00284     ASSERT_KINDOF(CSubclassWnd, pFound);
00285     return pFound;
00286 }
00287
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/version_no.h Source File

WinCvs/version_no.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jonathan M. Gilligan <jonathan.gilligan@vanderbilt.edu> --- 23 June 2001
00019  */
00020
00021 /*
00022  * version_no.h -- Definitions for version numbering in WinCvs,
00023  *                 detailed documentation is below, see also, version_fu.h
00024  */
00025
00026 #pragma once
00027
00028 // WinCvs version
00029 #define WINCVS_PRODUCT_MAJOR        1
00030 #define WINCVS_PRODUCT_MINOR        3
00031 #define WINCVS_PRODUCT_PATCHLEVEL   20
00032
00033 #define WINCVS_FILE_MAJOR           WINCVS_PRODUCT_MAJOR
00034 #define WINCVS_FILE_MINOR           WINCVS_PRODUCT_MINOR
00035 #define WINCVS_FILE_PATCHLEVEL      WINCVS_PRODUCT_PATCHLEVEL
00036
00037 // manually increment these when declaring a build.
00038 // Ideally, tag the repository with the build number
00039 // so a build can be reproduced.
00040 #define WINCVS_BUILD 1
00041
00042 //
00043 // Example preprocessor definitions.
00044 //
00045 // #define WINCVS_SPECIAL_BUILD "My special"
00046 // note: no "build" at the end. This is added by
00047 // version-fu.
00048 //
00049 //#define WINCVS_ALPHA_RELEASE
00050 //#define WINCVS_BETA_RELEASE
00051 //
00052
00053 #define WINCVS_BETA_RELEASE
00054 #define WINCVS_PRIVATE_BUILD "Local"
00055
00056 #define WINCVS_OFFICIAL_DISTRIBUTION
00057
00059 // Preprocessor definitions (for version_no.h)
00060 //
00061 // Preprocessor flags (empty #defines):
00062 // These should be #defined in version_no.h
00063 //
00064 // WINCVS_OFFICIAL_DISTRIBUTION:    #define this only when making
00065 //                      an official distribution package. This flag should
00066 //                      never be defined in anything checked into the cvs
00067 //                      repository.
00068 //
00069 // WINCVS_RELEASE:      define this if this is a release (as opposed to a
00070 //                      prerelease) build.
00071 //
00072 // WINCVS_ALPHA_RELEASE:    define this if this is a alpha release. The
00073 //                      alpha number (e.g., alpha 2) will be taken from
00074 //                      the product patch level (see below).
00075 //
00076 // WINCVS_BETA_RELEASE: define this if this is a beta release. The beta
00077 //                      number (e.g., beta 2) will be taken from the
00078 //                      product patch level (see below).
00079 //
00080 // Preprocessor values (#defines with contents):
00081 // These should be #defined in version_no.h
00082 //
00083 // WINCVS_FILE_MAJOR,
00084 // WINCVS_FILE_MINOR,
00085 // WINCVS_FILE_PATCHLEVEL,
00086 //
00087 // WINCVS_PRODUCT_MAJOR,
00088 // WINCVS_PRODUCT_MINOR,
00089 // WINCVS_PRODUCT_PATCHLEVEL,
00090 //
00091 // WINCVS_BUILD:        These macros all indicate parts of the version
00092 //                      number. *FILE* indicates specific numbers for the
00093 //                      .exe files (WinCvs.exe, cvs.exe). The *PRODUCT*
00094 //                      numbers indicate the version of the package as a
00095 //                      whole.
00096 //
00097 //                      At this time, WinCvs.exe is at version 1.3.2.x
00098 //                      (WinCvs 1.3 beta 2, build x), cvs.exe is at
00099 //                      1.11.1.x (cvs 1.11 patch level 1, build x). Both
00100 //                      files are part of the WinCvs 1.3 beta 2
00101 //                      distribution.
00102 //
00103 //                      The build numbers for both files should be
00104 //                      incremented (by hand editing version_no.h) at
00105 //                      least once for every build posted publicly at
00106 //                      wincvs.org.
00107 //
00108 //                      EXAMPLE:
00109 //
00110 //                      #define WINCVS_FILE_MAJOR           1
00111 //                      #define WINCVS_FILE_MINOR           3
00112 //                      #define WINCVS_FILE_PATCHLEVEL      2
00113 //
00114 //                      #define WINCVS_PRODUCT_MAJOR        1
00115 //                      #define WINCVS_PRODUCT_MINOR        3
00116 //                      #define WINCVS_PRODUCT_PATCHLEVEL   2
00117 //
00118 //                      #define WINCVS_BUILD                1
00119 //
00120 //
00121 // WINCVS_SPECIAL_BUILD,
00122 // WINCVS_PRIVATE_BUILD:    These should be #defined to a double-quoted
00123 //                      string that will be used to create a prefix for
00124 //                      the build description string. E.g., the following:
00125 //
00126 //                      #define WINCVS_SPECIAL_BUILD "anomalous"
00127 //                      #define WINCVS_PRIVATE_BUILD "in house"
00128 //
00129 //                      Will produce the text "in house anomalous build"
00130 //                      in the file and product description strings,
00131 //                      "anomalous build" in the Special Build Description
00132 //                      string, and "in house build" in the Private Build
00133 //                      string in the VERSION_INFO resource.
00134 //
00135 // All other necessary preprocessor definitions are synthesized by
00136 // version_fu.h
00137 //
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPython_Interp Member List

This is the complete list of members for CPython_Interp, including all inherited members.

ClosePythonSupport(void) | CPython_Interp | [static]
CPython_Interp(bool mainInterp=true) | CPython_Interp |
DoFile(const char *file) | CPython_Interp |
DoScript(const char *script) | CPython_Interp |
DoScriptVar(const char *format,...) | CPython_Interp |
fInterp | CPython_Interp | [private]
InitPythonSupport(const bool forceReload=false) | CPython_Interp | [static]
IsAvail(const bool forceReload=false) | CPython_Interp | [static]
m_mainInterpreter | CPython_Interp | [private, static]
operator PyThreadState *(void) | CPython_Interp | [inline]
~CPython_Interp() | CPython_Interp |

Generated on Sat Aug 7 22:56:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/ustr.h Source File

rf/ustr.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #ifndef USTR_H
00022 #define USTR_H
00023
00024 #include <stddef.h>
00025 #include <string.h>
00026 #include "uconfig.h"
00027
00028 #ifdef __GNUC__
00029 #   define EGCS_CONST const
00030 #else
00031 #   define EGCS_CONST
00032 #endif
00033
00034 #define MAX_ARGS    40
00035 #define MAX_CMD_LEN 2048
00036
00037 #ifdef WIN32
00038 static const char kPathDelimiter = '\\';
00039 #else
00040 static const char kPathDelimiter = '/';
00041 #endif
00042
00043 #define CPStr UPStr
00044 #define CStr UStr
00045
00046 class UStr;
00047
00048 #if TARGET_RT_MAC_MACHO || qUnix
00049 #   ifndef HAVE_STRICMP
00050 #       define stricmp strcasecmp
00051 #   endif
00052 #   ifndef HAVE_STRNICMP
00053 #       define strnicmp strncasecmp
00054 #   endif
00055 #endif
00056
00057 bool SplitPath(const char* dir, UStr& uppath, UStr& folder, bool dontSkipDelimiter = false);
00058 bool MakeTmpFile(UStr& file, const char* prefix, const char* extension = 0L, bool create = false);
00059 void GetExtension(const char* file, UStr& base, UStr& ext);
00060 bool GetEnvValue(const char* cmd, const char* key, UStr& value);
00061 void FlatenSubFolders(UStr& tmpf);
00062 UStr& NormalizeFileName(UStr& fileName);
00063
00064 char* CleanupLogMsg(const char* msg);
00065 int StrOrdICmp(const char* s1, const char* s2);
00066 int StrPathCmp(const char* s1, const char* s2);
00067 void StrSafeCopy(char* buffer, const char* value, const int bufferSize);
00068 int StringToArgv(const char* cmdLine, char** argv);
00069
00071 template <class T>
00072 class CStaticAllocT
00073 {
00074 public:
00075     // Construction
00076     CStaticAllocT();
00077     ~CStaticAllocT();
00078
00079 protected:
00080     // Data members
00081     T* m_buf;
00082     size_t m_bufsize;
00084 public:
00085     // Interface
00086     void AdjustSize(size_t size);
00087
00088     inline operator T*(void) const /* egcs const */;
00089     inline operator const T*(void) const;
00090
00091 #ifdef __GNUC__
00092     inline const T& operator[](int i) const;
00093     inline T& operator[](int i);
00094 #endif
00095
00096     inline size_t size() const;
00097 };
00098
00100 class UEXPORT UPStr
00101 {
00102 public:
00103     // Construction
00104     inline UPStr();
00105     inline UPStr(const char* newstr);
00106     inline UPStr(const unsigned char* newstr);
00107     inline UPStr(const UPStr& newstr);
00108     virtual ~UPStr();
00109
00110 protected:
00111     // Data members
00112     char* m_str;
00114     // Methods
00115     void clear(void);
00116
00117 public:
00118     // Interface
00119     inline bool empty(void) const;
00120     inline unsigned int length(void) const;
00121
00122     UPStr& operator=(const char* newstr);
00123     UPStr& operator=(const unsigned char* newstr);
00124     UPStr& operator=(const UPStr& newstr);
00125
00126     inline operator const char*() const;
00127 //  inline operator char*() EGCS_CONST;
00128     inline operator const unsigned char*() const;
00129 //  inline operator unsigned char*() EGCS_CONST;
00130
00131     UPStr& set(const char* buf, unsigned int len);
00132     inline const char* c_str() const;
00133     inline const unsigned char* p_str() const;
00134
00135     UPStr& operator<<(const char* addToStr);
00136     UPStr& operator<<(char addToStr);
00137     UPStr& operator<<(int addToStr);
00138
00139     inline bool endsWith(char c) const;
00140     UPStr& replace(char which, char bywhich);
00141 };
00142
00144 class UEXPORT UStr
00145 {
00146 public:
00147     // Construction
00148     inline UStr();
00149     inline UStr(const char* newstr);
00150     inline UStr(const unsigned char* newstr);
00151     inline UStr(const UStr& newstr);
00152     virtual ~UStr();
00153
00154 protected:
00155     // Data members
00156     char* m_str;
00158 public:
00159     // Interface
00160     void clear(void);
00161
00162     inline bool empty(void) const;
00163     inline unsigned int length(void) const;
00164
00165     UStr& operator=(const char* newstr);
00166     UStr& operator=(const unsigned char* newstr);
00167     UStr& operator=(const UStr& newstr);
00168     UStr& set(const char* buf, unsigned int len);
00169
00170     inline bool operator<(const UStr& str) const;
00171     inline bool operator>(const UStr& str) const;
00172     inline bool operator==(const UStr& str) const;
00173     inline bool operator==(const char* str) const;
00174     inline bool operator!=(const UStr& str) const;
00175     inline bool operator!=(const char* str) const;
00176
00177 #if (defined(__MWERKS__) && __MWERKS__ < 0x2400) || defined(__GNUC__)
00178     inline char operator[](int index) const;
00179     inline char & operator[](int index);
00180 #endif /* TARGET_OS_MAC */
00181
00182     inline operator const char*() const;
00183 //  inline operator char*() EGCS_CONST;
00184     inline const char* c_str() const;
00185
00186     UStr& operator<<(const char* addToStr);
00187     UStr& operator<<(char addToStr);
00188     UStr& operator<<(int addToStr);
00189     inline UStr& operator+=(int addToStr);
00190 //  inline UStr& operator+=(char* addToStr);
00191     inline UStr& operator+=(const char* addToStr);
00192     inline UStr& operator+=(const UStr& addToStr);
00193
00194     inline int compare(const char* thestr) const;
00195     //inline bool compareNoCase(const UStr & str) const;
00196     //inline bool compareNoCase(const char *str) const;
00197     inline bool endsWith(char c) const;
00198
00200     UStr& replace(char which, char bywhich);
00201
00202     int find(const char* thestr) const;
00203     int rfind(const char* thestr) const;
00204
00205     int find(char thechar) const;
00206     int rfind(char thechar) const;
00207
00208 //  char* substr(int idx, int len) const;
00209 //  UStr& substr(int idx, int len, UStr& subStr) const;
00210     UStr substr(int idx, int len) const;
00211
00212     UStr& trim (char c = ' ');
00213     UStr& rtrim (char c);
00214     UStr& rtrim (const char *MatchList);
00215 };
00216
00218 // UPStr inline implementation
00219
00220 inline UPStr::UPStr()
00221     : m_str(0L)
00222 {
00223 }
00224
00225 inline UPStr::UPStr(const char* newstr)
00226 {
00227     m_str = 0L;
00228     *this = newstr;
00229 }
00230
00231
00232 inline UPStr::UPStr(const unsigned char* newstr)
00233 {
00234     m_str = 0L;
00235     *this = newstr;
00236 }
00237
00238
00239 inline UPStr::UPStr(const UPStr& newstr)
00240 {
00241     m_str = 0L;
00242     *this = newstr;
00243 }
00244
00249 inline bool UPStr::empty(void) const
00250 {
00251     return m_str == 0L || m_str[0] == '\0';
00252 }
00253
00258 inline unsigned int UPStr::length(void) const
00259 {
00260     return m_str == 0L ? 0 : (unsigned char)m_str[0];
00261 }
00262
00264 inline UPStr::operator const char*() const
00265 {
00266     return m_str == 0L ? "" : m_str + 1;
00267 }
00268
00269 #if 0
00270
00271 inline UPStr::operator char*() EGCS_CONST
00272 {
00273     return m_str == 0L ? 0L : m_str + 1;
00274 }
00275 #endif
00276
00278 inline const char* UPStr::c_str() const
00279 {
00280     return m_str == 0L ? "" : m_str + 1;
00281 }
00282
00283
00285 inline UPStr::operator const unsigned char*() const
00286 {
00287     return m_str == 0L ? (const unsigned char*)"" : (const unsigned char*)m_str;
00288 }
00289
00290 #if 0
00291
00292 inline UPStr::operator unsigned char*() EGCS_CONST
00293 {
00294     return m_str == 0L ? (unsigned char*)"" : (unsigned char*)m_str;
00295 }
00296 #endif
00297
00299 inline const unsigned char* UPStr::p_str() const
00300 {
00301     return m_str == 0L ? (unsigned char*)"" : (unsigned char*)m_str;
00302 }
00303
00304
00310 inline bool UPStr::endsWith(char c) const
00311 {
00312     return m_str == 0L ? false : m_str[m_str[0]] == c;
00313 }
00314
00316 // UStr inline implementation
00317
00318 inline UStr::UStr()
00319     : m_str(0L)
00320 {
00321 }
00322
00323 inline UStr::UStr(const char* newstr)
00324 {
00325     m_str = 0L;
00326     *this = newstr;
00327 }
00328
00329
00330 inline UStr::UStr(const unsigned char* newstr)
00331 {
00332     m_str = 0L;
00333     set((const char*)newstr + 1, newstr[0]);
00334 }
00335
00336
00337 inline UStr::UStr(const UStr& newstr)
00338 {
00339     m_str = 0L;
00340     *this = newstr;
00341 }
00342
00347 inline bool UStr::empty(void) const
00348 {
00349     return m_str == 0L || m_str[0] == '\0';
00350 }
00351
00356 inline unsigned int UStr::length(void) const
00357 {
00358     return m_str == 0L ? 0 : strlen(m_str);
00359 }
00360
00361 #if (defined(__MWERKS__) && __MWERKS__ < 0x2400) || defined(__GNUC__)
00362 inline char UStr::operator[](int index) const
00363 {
00364     return m_str[index];
00365 }
00366
00367 inline char& UStr::operator[](int index)
00368 {
00369     return m_str[index];
00370 }
00371 #endif /* TARGET_OS_MAC */
00372
00374 inline UStr::operator const char*() const
00375 {
00376     return m_str == 0L ? "" : m_str;
00377 }
00378
00379 #if 0
00380
00381 inline UStr::operator char*() EGCS_CONST
00382 {
00383     return m_str == 0L ? (char*)"" : m_str;
00384 }
00385 #endif
00386
00388 inline const char* UStr::c_str() const
00389 {
00390     return m_str == 0L ? "" : m_str;
00391 }
00392
00393 #if 0
00394
00395 inline UStr& UStr::operator+=(char* addToStr)
00396 {
00397     return *this << addToStr;
00398 }
00399 #endif
00400
00402 inline UStr& UStr::operator+=(const char* addToStr)
00403 {
00404     return *this << addToStr;
00405 }
00406
00408 inline UStr& UStr::operator+=(const UStr& addToStr)
00409 {
00410     return *this << (const char*)addToStr;
00411 }
00412
00414 inline UStr& UStr::operator+=(int addToStr)
00415 {
00416     return *this << addToStr;
00417 }
00418
00419
00421
00423 inline bool UStr::operator<(const UStr& str) const
00424 {
00425     return strcmp(*this, str) < 0;
00426 }
00427
00429 inline bool UStr::operator>(const UStr& str) const
00430 {
00431     return strcmp(*this, str) > 0;
00432 }
00433
00435 inline bool UStr::operator==(const UStr& str) const
00436 {
00437     return strcmp(*this, str) == 0;
00438 }
00439
00441 inline bool UStr::operator==(const char* str) const
00442 {
00443     return strcmp(*this, str) == 0;
00444 }
00445
00447 inline bool UStr::operator!=(const UStr& str) const
00448 {
00449     return strcmp(*this, str) != 0;
00450 }
00451
00453 inline bool UStr::operator!=(const char* str) const
00454 {
00455     return strcmp(*this, str) != 0;
00456 }
00457
00463 inline int UStr::compare(const char* thestr) const
00464 {
00465     return strcmp(*this, thestr);
00466 }
00467
00473 inline bool UStr::endsWith(char c) const
00474 {
00475     return !length() ? false : m_str[length()-1] == c;
00476 }
00477
00479 // CStaticAllocT inline implementation
00480
00481 template <class T>
00482 CStaticAllocT<T>::CStaticAllocT()
00483 {
00484     m_buf = 0L;
00485     m_bufsize = 0;
00486 }
00487
00488 template <class T>
00489 CStaticAllocT<T>::~CStaticAllocT()
00490 {
00491     if( m_buf != 0L )
00492         free(m_buf);
00493 }
00494
00499 template <class T>
00500 void CStaticAllocT<T>::AdjustSize(size_t size)
00501 {
00502     if( m_bufsize < size )
00503     {
00504         if( m_buf == 0L )
00505             m_buf = (T*)malloc(size * sizeof(T));
00506         else
00507             m_buf = (T*)realloc(m_buf, size * sizeof(T));
00508
00509         if( m_buf == 0L )
00510             throw std::bad_alloc();
00511
00512         m_bufsize = size;
00513     }
00514 }
00515
00517 template <class T>
00518 inline CStaticAllocT<T>::operator T*(void) const /* egcs const */
00519 {
00520     return m_buf;
00521 }
00522
00524 template <class T>
00525 inline CStaticAllocT<T>::operator const T*(void) const
00526 {
00527     return m_buf;
00528 }
00529
00530 #ifdef __GNUC__
00531 template <class T>
00532 inline const T& CStaticAllocT<T>::operator[](int i) const
00533 {
00534     return m_buf[i];
00535 }
00536
00537 template <class T>
00538 inline T& CStaticAllocT<T>::operator[](int i)
00539 {
00540     return m_buf[i];
00541 }
00542 #endif
00543
00548 template <class T>
00549 inline size_t CStaticAllocT<T>::size() const
00550 {
00551     return m_bufsize;
00552 }
00553
00554 #endif /* USTR_H */
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWincvsDoc Member List

This is the complete list of members for CWincvsDoc, including all inherited members.

CWincvsDoc() | CWincvsDoc |
m_viewPath | CWincvsDoc | [protected]
OnAppCmdline() | CWincvsDoc | [protected]
OnAppLogin() | CWincvsDoc | [protected]
OnAppLogout() | CWincvsDoc | [protected]
OnAppPreferences() | CWincvsDoc | [protected]
OnAppRtagBranch() | CWincvsDoc | [protected]
OnAppRtagDelete() | CWincvsDoc | [protected]
OnAppRtagNew() | CWincvsDoc | [protected]
OnBrowserOpen() | CWincvsDoc | [protected]
OnMacroAdmin(UINT nID) | CWincvsDoc | [protected]
OnNewDocument() | CWincvsDoc | [virtual]
OnSavesettings() | CWincvsDoc | [protected]
OnUpdateCvsCmd(CCmdUI *pCmdUI) | CWincvsDoc | [protected]
OnUpdateMacroAdmin(CCmdUI *pCmdUI) | CWincvsDoc | [protected]
OnUpdatePrefs(CCmdUI *pCmdUI) | CWincvsDoc | [protected]
OnUpdateSavesettings(CCmdUI *pCmdUI) | CWincvsDoc | [protected]
OnUpdateUsePyshell(CCmdUI *pCmdUI) | CWincvsDoc | [protected]
OnUpdateUseTclshell(CCmdUI *pCmdUI) | CWincvsDoc | [protected]
OnUsePyshell() | CWincvsDoc | [protected]
OnUseTclshell() | CWincvsDoc | [protected]
OnViewBrowselocationRemoveunwanted() | CWincvsDoc | [protected]
OnViewInit() | CWincvsDoc | [protected]
OnViewPathChanged() | CWincvsDoc | [protected]
Serialize(CArchive &ar) | CWincvsDoc | [virtual]
SetTitle(LPCTSTR lpszTitle) | CWincvsDoc | [virtual]
~CWincvsDoc() | CWincvsDoc | [virtual]

Generated on Sat Aug 7 22:58:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uwidget.h Source File

rf/uwidget.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #ifndef UWIDGET_H
00022 #define UWIDGET_H
00023
00024 #include "umain.h"
00025 #include "udraw.h"
00026 #include "ustr.h"
00027
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00032 #ifdef WIN32
00033     LRESULT UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam);
00034         // - intercepts the messages and broadcast to the pseudo-widgets associated with.
00035         // - if it returns FALSE, you should return FALSE too.
00036         // - you need to overide the CWnd::WindowProc in order to use it.
00037 #endif
00038
00039 #ifdef __cplusplus
00040 }
00041 #endif
00042
00043 #ifdef __cplusplus
00044
00045 #ifdef _MSC_VER
00046 #   pragma warning (disable : 4786)
00047 #endif
00048
00049 #include <vector>
00050 #include <map>
00051
00052 class CMString;
00053
00058 class UTimer
00059 {
00060 public:
00061     UTimer(int lap, int lastlap, int cmd) : m_lap(lap), m_lastlap(lastlap), m_cmd(cmd) {}
00062     UTimer() : m_lap(0), m_lastlap(0), m_cmd(0) {}
00063     UTimer(const UTimer & src) : m_lap(src.m_lap), m_lastlap(src.m_lastlap), m_cmd(src.m_cmd) {}
00064
00065     UTimer & operator=(const UTimer & src)
00066     {
00067         m_lastlap = src.m_lastlap;
00068         m_lap = src.m_lap;
00069         m_cmd = src.m_cmd;
00070
00071         return *this;
00072     }
00073     long m_lap; // in millisecond
00074     long m_lastlap; // in millisecond
00075     int m_cmd; // command associated with
00076 };
00077
00083 struct UColor
00084 {
00085     unsigned char r, g, b;
00086 };
00087
00089 #define kUMainWidget 0
00090
00091 #if qGTK
00092 #   define kUgtkDataToken "_pseudoWidget"
00093 #   define kUgtkPrefixToken "pseudo" /* pseudo_0, pseudoA_0, pseudo<opt>_<cmdid> */
00094 #   define SW_SHOWNORMAL true
00095 #   define SW_HIDE false
00096 #endif
00097 #ifdef WIN32
00098     class CDialog;
00099 #endif
00100
00112 class UEXPORT UWidget : public UCmdTarget
00113 {
00114     UDECLARE_DYNAMIC(UWidget)
00115 public:
00117     UWidget(int widid);
00118     virtual ~UWidget();
00119
00122     virtual void AddListener(UCmdTarget * listener);
00123
00125     virtual int UDispatchMessage(int/*UEventType*/ evt, int arg1, void *arg2, UDispatchInfo & dispatchInfo);
00126
00132     void *GetWidget(int cmd) const;
00133
00136     inline std::map<int, void *> & GetWidgets(void) { return m_widgets; }
00137
00141     bool WidgetIsActive(int cmd) const;
00142
00146     const char *GetTooltip(int cmd) const;
00147
00151     void AddTooltip(int cmd, const char *tooltipID);
00152
00156     // \note this timer is removed automatically when the object is removed.
00157     void AddTimer(long lap, int cmd);
00158
00161     void RemoveTimer(int cmd);
00162
00164     std::vector<UTimer> & GetTimers(void);
00165
00170     int DoModal(int id = 0);
00171
00175     void EndModal(bool result);
00176
00179     void EndDialog(int result);
00180
00183     virtual void DoDataExchange(bool /*fill*/) {}
00184
00186     virtual void Dismiss(void) {}
00187
00189     static bool HasModal(void);
00190
00194     static bool IsUIValid(); /*{ return sValidMenu; }*/
00195
00202     static void DoValidUI(bool how); /*{ sValidMenu = how; } */
00203
00207     virtual void BeforeUpdateUI(void) {}
00208
00212     static int GetFocus(void); /*{ return sFocusWidID; } */
00213     static int GetFocusCmd(void); /*{ return sFocusCmdID; }*/
00214
00216     inline bool HasFocus(void) { return GetFocus() == GetWidID(); }
00217
00219     inline bool HasFocus(int cmdid) { return GetFocus() == GetWidID() && GetFocusCmd() == cmdid; }
00220
00222     void OnBlockHandler(void* widget, int cmd, int event);
00223
00225     void OnUnblockHandler(void* widget, int cmd, int event);
00226
00230     void AddPage(UWidget *page, int pagecmd, int num_page);
00231
00232 #ifdef WIN32
00233     void OverideMapWidget(int cmdid, CRuntimeClass *widClass);
00234     inline std::map<int, CRuntimeClass *> & GetOverideList(void) { return m_overide; }
00235         // use a class instead of the one by default for this item.
00236         // to call before DoModal, before the widgets get created.
00237
00238     inline CDialog *GetCurModal() const { return m_curModal; }
00239         // during DoModal, this value is set to the MFC dialog
00240 #endif
00241 #if qMacPP || qMacAPP
00242
00243     static SInt32 GetPaneID(int cmdid);
00244 #endif
00245 protected:
00246
00247     std::vector<UCmdTarget *> m_listeners;
00248     std::map<int, void *> m_widgets;
00249     std::map<int, UStr> m_tooltips;
00250     std::vector<UTimer> m_timers;
00251     std::map<int, UWidget *> m_tabs;
00252
00253     int m_modalRes;
00254     int m_currentPage;
00255 #if qGTK || qMacPP
00256     bool m_modalLoop;
00257 #endif
00258 #ifdef WIN32
00259     CDialog *m_curModal;
00260     std::map<int, CRuntimeClass *> m_overide; // see WinInitWidgets
00261     bool m_noDispatch;
00262 #endif
00263     static bool sValidMenu;
00264
00265     static int sFocusWidID;
00266     static int sFocusCmdID;
00267
00271     ev_msg int OnGetState(int cmd);
00272
00276     ev_msg void OnSetState(int cmd, int state);
00277
00281     ev_msg void OnEnableCmd(int cmd, int state);
00282
00286     ev_msg void OnIsEnabled(int cmd);
00287
00289     ev_msg bool IsEnabled(int cmd);
00290
00293     ev_msg void OnChgFocus(int cmd);
00294
00297     ev_msg void OnSetDefault(int cmd);
00298
00301     ev_msg void OnInvalidate(int cmd);
00302
00305     ev_msg void OnRedraw(int cmd);
00306
00310     ev_msg void OnSetIcon(int cmd, void *pixmap);
00311
00315     ev_msg void OnSetText(int cmd, const char *text);
00316
00320     ev_msg void OnGetText(int cmd, UStr *text);
00321
00325     ev_msg void OnSetFloat(int cmd, const float *f);
00326
00330     ev_msg void OnGetFloat(int cmd, float *f);
00331
00335     ev_msg void OnInitWidget(int cmd, void *widget);
00336
00342     ev_msg void OnInitTabWidget(int cmd, int page, void *widget);
00343
00347     ev_msg void OnShowWidget(int cmd, int state);
00348
00352     ev_msg void OnSetSlider(int cmd, int pos);
00353
00357     ev_msg void OnGetSliderProperty(int cmd, USLIDER *prop);
00358
00362     ev_msg void OnSetSliderProperty(int cmd, const USLIDER *prop);
00363
00366     ev_msg void OnSetTooltip(int cmd, UCmdUI *pCmdUI);
00367
00371     ev_msg void OnGetLoc(int cmd, URECT * r);
00372
00376     ev_msg void OnSetLoc(int cmd, const URECT * r);
00377
00382     ev_msg void OnChgCursor(int cmd, UCURSOR cursor);
00383
00388     ev_msg void OnUpdateUI(void);
00389
00391     ev_msg void OnTreeResetAll(int cmd);
00392
00394     ev_msg void OnTreeInsert(int cmd, UTREE_INSERT *data);
00395
00397     ev_msg void OnTreeGetInfo(int cmd, UTREE_INFO *data);
00398
00400     ev_msg void OnTreeSetData(int cmd, UTREE_INFO *data);
00401
00403     ev_msg void OnTreeSetIcon(int cmd, UTREE_INFO *data);
00404
00406     ev_msg void OnTreeDelete(int cmd, UTREEITEM item);
00407
00409     ev_msg void OnTreeExpand(int cmd, int collapse, UTREEITEM item);
00410
00412     ev_msg void OnTreeSelect(int cmd, int deselect, UTREEITEM item);
00413
00415     ev_msg void OnTreeGetSel(int cmd, UTREEITEM *item);
00416
00418     ev_msg void OnListAddColumns(int cmd, int num);
00419
00421     ev_msg void OnListShowColumns(int cmd, int num);
00422
00424     ev_msg void OnListHideColumns(int cmd, int num);
00425
00427     ev_msg void OnListSetColTitle(int cmd, int num, const char *title);
00428
00430     ev_msg void OnListSetColWidth(int cmd, int num, int width);
00431
00433     ev_msg void OnListResetAll(int cmd);
00434
00436     ev_msg void OnListAddSel(int cmd, int entry);
00437
00439     ev_msg void OnListPopup(int cmd, int entry);
00440
00442     ev_msg void OnListDelRow(int cmd, int row);
00443
00445     ev_msg void OnListSetFeedback(int cmd, int turnOn);
00446
00448     ev_msg void OnListNewRow(int cmd, int *num);
00449
00451     ev_msg void OnListRowSetData(int cmd, int row, void *data);
00452
00454     ev_msg void OnListRowGetData(int cmd, int row, void **data);
00455
00457     ev_msg void OnListInsert(int cmd, ULIST_INSERT *data);
00458
00460     ev_msg void OnListGetInfo(int cmd, ULIST_INFO *desc);
00461
00463     ev_msg int OnListGetNextSel(int cmd, int selectedCell);
00464
00466     ev_msg int OnListGetNext(int cmd, int whichCell);
00467
00469     ev_msg void OnListResort(int cmd, int column, UListSorter s);
00470
00472     ev_msg void OnListSetSortDir(int cmd, int column, bool dir);
00473
00475     ev_msg void OnComboResetAll(int cmd);
00476
00478     ev_msg void OnComboAppend(int cmd, const char *txt);
00479
00481     ev_msg void OnComboSetPos(int cmd, int sel);
00482
00484     ev_msg int OnComboGetPos(int cmd, UStr *txt);
00485
00487     ev_msg int OnComboGetCount(int cmd);
00488
00490     ev_msg void OnComboDelSel(int cmd, int sel);
00491
00494     ev_msg void OnComboEnableSel(int cmd, int sel, int state);
00495
00497     ev_msg void OnComboGetMenu(int cmd, UMENU *menu);
00498
00500     ev_msg void OnSmartComboSetFeature(int cmd, int feature);
00501
00503     ev_msg void OnSmartComboSetItems(int cmd, CMString* items);
00504
00506     ev_msg void OnSmartComboSetReadOnly(int cmd, bool readOnly);
00507
00509     ev_msg int OnUpdateFocus(int leave, void *widget);
00510
00512     ev_msg int OnFetchCmd(int cmd, void *widget);
00513
00515     ev_msg void OnPageChanged(int cmd, int pagenum);
00516
00518     ev_msg void OnStatusBarText(int cmd, const char *txt);
00519
00520  UDECLARE_MESSAGE_MAP()
00521
00522 #if qMacPP
00523     friend class LPseudoWinAttachment;
00524 #endif
00525 #ifdef WIN32
00526     friend LRESULT UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam);
00527 #endif
00528 };
00529
00530 #endif /* __cplusplus */
00531
00532 #endif /* UWIDGET_H */
Generated on Sat Aug 7 22:43:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/Stat.cpp Source File

WinCvs/Stat.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com>
00019  */
00020
00021 #include <stdafx.h>
00022 #include <errno.h>
00023 #include <io.h>
00024 #include "AppConsole.h"
00025 #include "wincvsdebug.h"
00026
00027 static struct { DWORD err; int dos;} errors[] =
00028 {
00029         {  ERROR_INVALID_FUNCTION,       EINVAL    },  /* 1 */
00030         {  ERROR_FILE_NOT_FOUND,         ENOENT    },  /* 2 */
00031         {  ERROR_PATH_NOT_FOUND,         ENOENT    },  /* 3 */
00032         {  ERROR_TOO_MANY_OPEN_FILES,    EMFILE    },  /* 4 */
00033         {  ERROR_ACCESS_DENIED,          EACCES    },  /* 5 */
00034         {  ERROR_INVALID_HANDLE,         EBADF     },  /* 6 */
00035         {  ERROR_ARENA_TRASHED,          ENOMEM    },  /* 7 */
00036         {  ERROR_NOT_ENOUGH_MEMORY,      ENOMEM    },  /* 8 */
00037         {  ERROR_INVALID_BLOCK,          ENOMEM    },  /* 9 */
00038         {  ERROR_BAD_ENVIRONMENT,        E2BIG     },  /* 10 */
00039         {  ERROR_BAD_FORMAT,             ENOEXEC   },  /* 11 */
00040         {  ERROR_INVALID_ACCESS,         EINVAL    },  /* 12 */
00041         {  ERROR_INVALID_DATA,           EINVAL    },  /* 13 */
00042         {  ERROR_INVALID_DRIVE,          ENOENT    },  /* 15 */
00043         {  ERROR_CURRENT_DIRECTORY,      EACCES    },  /* 16 */
00044         {  ERROR_NOT_SAME_DEVICE,        EXDEV     },  /* 17 */
00045         {  ERROR_NO_MORE_FILES,          ENOENT    },  /* 18 */
00046         {  ERROR_LOCK_VIOLATION,         EACCES    },  /* 33 */
00047         {  ERROR_BAD_NETPATH,            ENOENT    },  /* 53 */
00048         {  ERROR_NETWORK_ACCESS_DENIED,  EACCES    },  /* 65 */
00049         {  ERROR_BAD_NET_NAME,           ENOENT    },  /* 67 */
00050         {  ERROR_FILE_EXISTS,            EEXIST    },  /* 80 */
00051         {  ERROR_CANNOT_MAKE,            EACCES    },  /* 82 */
00052         {  ERROR_FAIL_I24,               EACCES    },  /* 83 */
00053         {  ERROR_INVALID_PARAMETER,      EINVAL    },  /* 87 */
00054         {  ERROR_NO_PROC_SLOTS,          EAGAIN    },  /* 89 */
00055         {  ERROR_DRIVE_LOCKED,           EACCES    },  /* 108 */
00056         {  ERROR_BROKEN_PIPE,            EPIPE     },  /* 109 */
00057         {  ERROR_DISK_FULL,              ENOSPC    },  /* 112 */
00058         {  ERROR_INVALID_TARGET_HANDLE,  EBADF     },  /* 114 */
00059         {  ERROR_INVALID_HANDLE,         EINVAL    },  /* 124 */
00060         {  ERROR_WAIT_NO_CHILDREN,       ECHILD    },  /* 128 */
00061         {  ERROR_CHILD_NOT_COMPLETE,     ECHILD    },  /* 129 */
00062         {  ERROR_DIRECT_ACCESS_HANDLE,   EBADF     },  /* 130 */
00063         {  ERROR_NEGATIVE_SEEK,          EINVAL    },  /* 131 */
00064         {  ERROR_SEEK_ON_DEVICE,         EACCES    },  /* 132 */
00065         {  ERROR_DIR_NOT_EMPTY,          ENOTEMPTY },  /* 145 */
00066         {  ERROR_NOT_LOCKED,             EACCES    },  /* 158 */
00067         {  ERROR_BAD_PATHNAME,           ENOENT    },  /* 161 */
00068         {  ERROR_MAX_THRDS_REACHED,      EAGAIN    },  /* 164 */
00069         {  ERROR_LOCK_FAILED,            EACCES    },  /* 167 */
00070         {  ERROR_ALREADY_EXISTS,         EEXIST    },  /* 183 */
00071         {  ERROR_FILENAME_EXCED_RANGE,   ENOENT    },  /* 206 */
00072         {  ERROR_NESTING_NOT_ALLOWED,    EAGAIN    },  /* 215 */
00073         {  ERROR_NOT_ENOUGH_QUOTA,       ENOMEM    }    /* 1816 */
00074 };
00075
00076 static const WORD month_len [12] =
00077 {
00078     31, /* Jan */
00079     28, /* Feb */
00080     31, /* Mar */
00081     30, /* Apr */
00082     31, /* May */
00083     30, /* Jun */
00084     31, /* Jul */
00085     31, /* Aug */
00086     30, /* Sep */
00087     31, /* Oct */
00088     30, /* Nov */
00089     31  /* Dec */
00090 };
00091
00092 static const char * month_names[12] =
00093 {
00094     "Jan", "Feb", "Mar", "Apr",
00095     "May", "Jun", "Jul", "Aug",
00096     "Sep", "Oct", "Nov", "Dec"
00097 };
00098
00099 /* One second = 10,000,000 * 100 nsec */
00100     static const ULONGLONG systemtime_second = 10000000L;
00101
00102
00103 static void _dosmaperr(DWORD dwErr)
00104 {
00105     int n;
00106     for(n=0; n<sizeof(errors)/sizeof(errors[0]); n++)
00107     {
00108         if(errors[n].err==dwErr)
00109         {
00110             errno=errors[n].dos;
00111             return;
00112         }
00113     }
00114     errno=EFAULT;
00115 }
00116
00117 /* Is the year a leap year?
00118  *
00119  * Use standard Gregorian: every year divisible by 4
00120  * except centuries indivisible by 400.
00121  *
00122  * INPUTS: WORD year the year (AD)
00123  *
00124  * OUTPUTS: TRUE if it's a leap year.
00125  */
00126 BOOL IsLeapYear ( WORD year )
00127 {
00128     return ( (year & 3u == 0)
00129             && ( (year % 100u == 0)
00130                 || (year % 400u == 0) ));
00131 }
00132
00133 /* A fairly complicated comparison:
00134  *
00135  * Compares a test date against a target date.
00136  * If the test date is earlier, return a negative number
00137  * If the test date is later, return a positive number
00138  * If the two dates are equal, return zero.
00139  *
00140  * The comparison is complicated by the way we specify
00141  * TargetDate.
00142  *
00143  * TargetDate is assumed to be the kind of date used in
00144  * TIME_ZONE_INFORMATION.DaylightDate: If wYear is 0,
00145  * then it's a kind of code for things like 1st Sunday
00146  * of the month. As described in the Windows API docs,
00147  * wDay is an index of week:
00148  *      1 = first of month
00149  *      2 = second of month
00150  *      3 = third of month
00151  *      4 = fourth of month
00152  *      5 = last of month (even if there are only four such days).
00153  *
00154  * Thus, if wYear = 0, wMonth = 4, wDay = 2, wDayOfWeek = 4
00155  * it specifies the second Thursday of April.
00156  *
00157  * INPUTS: SYSTEMTIME * p_test_date     The date to be tested
00158  *
00159  *         SYSTEMTIME * p_target_date   The target date. This should be in
00160  *                                      the format for a TIME_ZONE_INFORMATION
00161  *                                      DaylightDate or StandardDate.
00162  *
00163  * OUTPUT:  -4/+4 if test month is less/greater than target month
00164  *          -2/+2 if test day is less/greater than target day
00165  *          -1/+2 if test hour:minute:seconds.milliseconds less/greater than target
00166  *          0     if both dates/times are equal.
00167  *
00168  */
00169 static int CompareTargetDate (
00170     const SYSTEMTIME * p_test_date,
00171     const SYSTEMTIME * p_target_date
00172     )
00173 {
00174     WORD first_day_of_month; /* day of week of the first. Sunday = 0 */
00175     WORD end_of_month;       /* last day of month */
00176     WORD temp_date;
00177     int test_milliseconds, target_milliseconds;
00178
00179     /* Check that p_target_date is in the correct foramt: */
00180     ASSERT(p_target_date->wYear==0 && p_test_date->wYear != 0);
00181     if (p_target_date->wYear != 0 || p_test_date->wYear == 0)
00182         return 0;
00183
00184     /* Don't waste time calculating if we can shortcut the comparison... */
00185     if (p_test_date->wMonth != p_target_date->wMonth)
00186     {
00187         return (p_test_date->wMonth > p_target_date->wMonth) ? 4 : -4;
00188     }
00189
00190     /* Months equal. Now we neet to do some calculation.
00191      * If we know that y is the day of the week for some arbitrary date x,
00192      * then the day of the week of the first of the month is given by
00193      * (1 + y - x) mod 7.
00194      *
00195      * For instance, if the 19th is a Wednesday (day of week = 3), then
00196      * the date of the first Wednesday of the month is (19 mod 7) = 5.
00197      * If the 5th is a Wednesday (3), then the first of the month is
00198      * four days earlier (it's the first, not the zeroth):
00199      * (3 - 4) = -1; -1 mod 7 = 6. The first is a Saturday.
00200      *
00201      * Check ourselves: The 19th falls on a (6 + 19 - 1) mod 7
00202      * = 24 mod 7 = 3: Wednesday, as it should be.
00203      */
00204     first_day_of_month = (WORD)( (1u + p_test_date->wDayOfWeek - p_test_date->wDay) % 7u);
00205
00206     /* If the first of the month comes on day y, then the first day of week z falls on
00207      * (z - y + 1) mod 7.
00208      *
00209      * For instance, if the first is a Saturday (6), then the first Tuesday (2) falls on a
00210      * (2 - 6 + 1) mod 7 = -3 mod 7 = 4: The fourth. This is correct (see above).
00211      *
00212      * temp_date gets the first <target day of week> in the month.
00213      */
00214     temp_date = (WORD)( (1u + p_target_date->wDayOfWeek - first_day_of_month) % 7u);
00215     /* If we're looking for the third Tuesday in the month, find the date of the first
00216      * Tuesday and add (3 - 1) * 7. In the example, it's the 4 + 14 = 18th.
00217      *
00218      * temp_date now should hold the date for the wDay'th wDayOfWeek of the month.
00219      * we only need to handle the special case of the last <DayOfWeek> of the month.
00220      */
00221     temp_date = (WORD)( temp_date + 7 * p_target_date->wDay );
00222
00223     /* what's the last day of the month? */
00224     end_of_month = month_len [p_target_date->wMonth - 1];
00225     /* Correct if it's February of a leap year? */
00226     if ( p_test_date->wMonth == 2 && IsLeapYear(p_test_date->wYear) )
00227     {
00228         ++ end_of_month;
00229     }
00230
00231     /* if we tried to calculate the fifth Tuesday of the month
00232      * we may well have overshot. Correct for that case.
00233      */
00234     while ( temp_date > end_of_month)
00235         temp_date -= 7;
00236
00237     /* At long last, we're ready to do the comparison. */
00238     if ( p_test_date->wDay != temp_date )
00239     {
00240         return (p_test_date->wDay > temp_date) ? 2 : -2;
00241     }
00242     else
00243     {
00244         test_milliseconds = ((p_test_date->wHour * 60 + p_test_date->wMinute) * 60
00245                                 + p_test_date->wSecond) * 1000 + p_test_date->wMilliseconds;
00246         target_milliseconds = ((p_target_date->wHour * 60 + p_target_date->wMinute) * 60
00247                                 + p_target_date->wSecond) * 1000 + p_target_date->wMilliseconds;
00248         test_milliseconds -= target_milliseconds;
00249         return (test_milliseconds > 0) ? 1 : (test_milliseconds < 0) ? -1 : 0;
00250     }
00251
00252 }
00253
00254 //
00255 //  Get time zone bias for local time *pst.
00256 //
00257 //  UTC time = *pst + bias.
00258 //
00259 static int GetTimeZoneBias( const SYSTEMTIME * pst )
00260 {
00261     TIME_ZONE_INFORMATION tz;
00262     int n, bias;
00263
00264     GetTimeZoneInformation ( &tz );
00265
00266     /*  I only deal with cases where we look at
00267      *  a "last sunday" kind of thing.
00268      */
00269     ASSERT(tz.DaylightDate.wYear == 0 && tz.StandardDate.wYear == 0);
00270
00271     bias = tz.Bias;
00272
00273     n = CompareTargetDate ( pst, & tz.DaylightDate );
00274     if (n < 0)
00275         bias += tz.StandardBias;
00276     else
00277     {
00278         n = CompareTargetDate ( pst, & tz.StandardDate );
00279         if (n < 0)
00280             bias += tz.DaylightBias;
00281         else
00282             bias += tz.StandardBias;
00283     }
00284     return bias;
00285 }
00286
00287 //
00288 //  Is the (local) time in DST?
00289 //
00290 static bool IsDST( const SYSTEMTIME * pst )
00291 {
00292     TIME_ZONE_INFORMATION tz;
00293
00294     GetTimeZoneInformation ( &tz );
00295
00296     /*  I only deal with cases where we look at
00297      *  a "last sunday" kind of thing.
00298      */
00299     ASSERT(tz.DaylightDate.wYear == 0 && tz.StandardDate.wYear == 0);
00300
00301     return (CompareTargetDate ( pst, & tz.DaylightDate ) >= 0)
00302             && (CompareTargetDate ( pst, & tz.StandardDate ) < 0);
00303 }
00304
00305 /* Convert a system time from local time to UTC time, correctly
00306  * taking DST into account (sort of).
00307  *
00308  * INPUTS:
00309  *      const SYSTEMTIME * p_local:
00310  *              A file time. It may be in UTC or in local
00311  *              time (see local_time, below, for details).
00312  *
00313  *      SYSTEMTIME * p_utc:
00314  *              The destination for the converted time.
00315  *
00316  * OUTPUTS:
00317  *      SYSTEMTIME * p_utc:
00318  *              The destination for the converted time.
00319  */
00320
00321 void LocalSystemTimeToUtcSystemTime( const SYSTEMTIME * p_local, SYSTEMTIME * p_utc)
00322 {
00323     FILETIME ft;
00324     ULARGE_INTEGER itime, delta;
00325     int bias = GetTimeZoneBias(p_local);
00326
00327     // delta = bias correction: bias minutes.
00328     SystemTimeToFileTime(p_local, & ft);
00329     itime.QuadPart = ((ULARGE_INTEGER *) &ft)->QuadPart;
00330     delta.QuadPart = systemtime_second * 60 * bias;   // bias in minutes...
00331     itime.QuadPart += delta.QuadPart;
00332
00333     ((ULARGE_INTEGER *) & ft)->QuadPart = itime.QuadPart;
00334     FileTimeToSystemTime(& ft, p_utc);
00335 }
00336
00337
00338 /* Convert a file time to a Unix time_t structure. This function is as
00339  * complicated as it is because it needs to ask what time system the
00340  * filetime describes.
00341  *
00342  * INPUTS:
00343  *      const FILETIME * ft: A file time. It may be in UTC or in local
00344  *                           time (see local_time, below, for details).
00345  *
00346  *      time_t * ut:         The destination for the converted time.
00347  *
00348  *      BOOL local_time:     TRUE if the time in *ft is in local time
00349  *                           and I need to convert to a real UTC time.
00350  *
00351  * OUTPUTS:
00352  *      time_t * ut:         Store the result in *ut.
00353  */
00354 static BOOL FileTimeToUnixTime ( const FILETIME* pft, time_t* put, BOOL local_time )
00355 {
00356     BOOL success = FALSE;
00357
00358    /* FILETIME = number of 100-nanosecond ticks since midnight
00359     * 1 Jan 1601 UTC. time_t = number of 1-second ticks since
00360     * midnight 1 Jan 1970 UTC. To translate, we subtract a
00361     * FILETIME representation of midnight, 1 Jan 1970 from the
00362     * time in question and divide by the number of 100-ns ticks
00363     * in one second.
00364     */
00365
00366
00367     SYSTEMTIME base_st =
00368     {
00369         1970,   /* wYear            */
00370         1,      /* wMonth           */
00371         0,      /* wDayOfWeek       */
00372         1,      /* wDay             */
00373         0,      /* wHour            */
00374         0,      /* wMinute          */
00375         0,      /* wSecond          */
00376         0       /* wMilliseconds    */
00377     };
00378
00379     ULARGE_INTEGER itime;
00380     FILETIME base_ft;
00381     int bias = 0;
00382
00383     if (local_time)
00384     {
00385         SYSTEMTIME temp_st;
00386         success = FileTimeToSystemTime(pft, & temp_st);
00387         bias =  GetTimeZoneBias(& temp_st);
00388     }
00389
00390     success = SystemTimeToFileTime ( &base_st, &base_ft );
00391     if (success)
00392     {
00393         itime.QuadPart = ((ULARGE_INTEGER *)pft)->QuadPart;
00394
00395         itime.QuadPart -= ((ULARGE_INTEGER *)&base_ft)->QuadPart;
00396         itime.QuadPart /= systemtime_second;    // itime is now in seconds.
00397         itime.QuadPart += bias * 60;    // bias is in minutes.
00398
00399         *put = itime.LowPart;
00400     }
00401
00402     if (!success)
00403     {
00404         *put = -1;   /* error value used by mktime() */
00405     }
00406
00407 #if ENABLE_WINCVSDEBUG
00408     if (GetWinCvsDebugMaskBit(wcvsdbg_trace_stat_bit))
00409     {
00410             char scratch[128];
00411             SYSTEMTIME temp_st;
00412             struct tm gmt;
00413             bool bDst;
00414             FileTimeToSystemTime(pft, &temp_st);
00415             bDst = IsDST(& temp_st);
00416             gmt = *gmtime(put);
00417             _snprintf(scratch, 128,
00418                 "Converting file time (%s, bias = %d): %s %02d %02d:%02d:%02d.%03d %4d --> %s\n",
00419                 local_time ? (bDst ? "Daylight" : "Standard") : "UTC", bias,
00420                 month_names[temp_st.wMonth - 1], temp_st.wDay,
00421                 temp_st.wHour, temp_st.wMinute, temp_st.wSecond, temp_st.wMilliseconds,
00422                 temp_st.wYear,
00423                 asctime(& gmt) );
00424
00425             cvs_err(scratch);
00426             OutputDebugString(scratch);
00427     }
00428 #endif  // ENABLE_WINCVSDEBUG
00429
00430     return success;
00431 }
00432
00433 static int _statcore(HANDLE hFile, const char *filename, struct stat *buf)
00434 {
00435     BY_HANDLE_FILE_INFORMATION bhfi;
00436     int isdev;
00437     char szFs[32];
00438     int is_gmt_fs = -1;
00439
00440     if(hFile)
00441     {
00442         /* Find out what kind of handle underlies filedes
00443         */
00444         isdev = GetFileType(hFile) & ~FILE_TYPE_REMOTE;
00445
00446         if ( isdev != FILE_TYPE_DISK )
00447         {
00448             /* not a disk file. probably a device or pipe
00449              */
00450             if ( (isdev == FILE_TYPE_CHAR) || (isdev == FILE_TYPE_PIPE) )
00451             {
00452                 /* treat pipes and devices similarly. no further info is
00453                  * available from any API, so set the fields as reasonably
00454                  * as possible and return.
00455                  */
00456                 if ( isdev == FILE_TYPE_CHAR )
00457                     buf->st_mode = _S_IFCHR;
00458                 else
00459                     buf->st_mode = _S_IFIFO;
00460
00461                 buf->st_rdev = buf->st_dev = (_dev_t)hFile;
00462                 buf->st_nlink = 1;
00463                 buf->st_uid = buf->st_gid = buf->st_ino = 0;
00464                 buf->st_atime = buf->st_mtime = buf->st_ctime = 0;
00465                 if ( isdev == FILE_TYPE_CHAR )
00466                     buf->st_size = 0;
00467                 else
00468                 {
00469                     unsigned long ulAvail;
00470                     int rc;
00471                     rc = PeekNamedPipe(hFile,NULL,0,NULL,&ulAvail,NULL);
00472                     if (rc)
00473                         buf->st_size = (_off_t)ulAvail;
00474                     else
00475                         buf->st_size = (_off_t)0;
00476                 }
00477
00478                 return 0;
00479             }
00480             else if ( isdev == FILE_TYPE_UNKNOWN )
00481             {
00482                 // Network device
00483                 errno = EBADF;
00484                 return -1;
00485             }
00486         }
00487     }
00488
00489     /* set the common fields
00490      */
00491     buf->st_ino = buf->st_uid = buf->st_gid = buf->st_mode = 0;
00492     buf->st_nlink = 1;
00493
00494     if(hFile)
00495     {
00496         /* use the file handle to get all the info about the file
00497          */
00498         if ( !GetFileInformationByHandle(hFile, &bhfi) )
00499         {
00500             _dosmaperr(GetLastError());
00501             return -1;
00502         }
00503     }
00504     else
00505     {
00506         WIN32_FIND_DATA fd;
00507         HANDLE hFind;
00508
00509         if(strlen(filename)==3 && !stricmp(filename+1,":\\"))
00510         {
00511             // Can't do anything about the root directory...
00512             // Win2k and Win98 can return info, but Win95 can't, so
00513             // it's best to do nothing.
00514             memset(&bhfi,0,sizeof(bhfi));
00515             bhfi.dwFileAttributes=GetFileAttributes(filename);
00516             if(bhfi.dwFileAttributes==0xFFFFFFFF)
00517             {
00518                 _dosmaperr(GetLastError());
00519                 return -1;
00520             }
00521             bhfi.nNumberOfLinks=1;
00522         }
00523         else
00524         {
00525             hFind=FindFirstFile(filename,&fd);
00526             if(hFind==INVALID_HANDLE_VALUE)
00527             {
00528                 _dosmaperr(GetLastError());
00529                 return -1;
00530             }
00531             FindClose(hFind);
00532             memset(&bhfi,0,sizeof(bhfi));
00533             bhfi.dwFileAttributes=fd.dwFileAttributes;
00534             bhfi.ftCreationTime=fd.ftCreationTime;
00535             bhfi.ftLastAccessTime=fd.ftLastAccessTime;
00536             bhfi.ftLastWriteTime=fd.ftLastWriteTime;
00537             bhfi.nFileSizeLow=fd.nFileSizeLow;
00538             bhfi.nFileSizeHigh=fd.nFileSizeHigh;
00539             bhfi.nNumberOfLinks=1;
00540         }
00541     }
00542
00543     if ( bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY )
00544         buf->st_mode |= (_S_IREAD + (_S_IREAD >> 3) + (_S_IREAD >> 6));
00545     else
00546         buf->st_mode |= ((_S_IREAD|_S_IWRITE) + ((_S_IREAD|_S_IWRITE) >> 3)
00547           + ((_S_IREAD|_S_IWRITE) >> 6));
00548     if (bhfi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
00549         buf->st_mode |= (_S_IEXEC + (_S_IEXEC >> 3) + (_S_IEXEC >> 6));
00550
00551     // Potential, but unlikely problem... casting DWORD to short.
00552     // Reported by Jerzy Kaczorowski, addressed by Jonathan Gilligan
00553     // if the number of links is greater than 0x7FFF
00554     // there would be an overflow problem.
00555     // This is a problem inherent in the struct stat, and hence
00556     // in the design of the C library.
00557     ASSERT(bhfi.nNumberOfLinks <= SHRT_MAX);
00558     if (bhfi.nNumberOfLinks > SHRT_MAX) {
00559         buf->st_nlink = SHRT_MAX;
00560         }
00561     else {
00562         buf->st_nlink= static_cast<short>(bhfi.nNumberOfLinks);
00563         }
00564
00565     if(!filename)
00566     {
00567         // We have to assume here that the repository doesn't span drives, so the
00568         // current directory is correct.
00569         *szFs='\0';
00570         GetVolumeInformation(NULL,NULL,0,NULL,NULL,NULL,szFs,32);
00571         if(!stricmp(szFs,"NTFS"))
00572             is_gmt_fs = 1;
00573         else
00574             is_gmt_fs = 0;
00575     }
00576     else
00577     {
00578         if(filename[1]!=':')
00579         {
00580             if((filename[0]=='\\' || filename[0]=='/') && (filename[1]=='\\' || filename[1]=='/'))
00581             {
00582                 // UNC pathname, assumed to be on an NTFS server.  No way to
00583                 // check, actually (GVI doesn't return anything useful).
00584                 is_gmt_fs = 1;
00585             }
00586             else
00587             {
00588                 // Relative path, treat as local
00589                 GetVolumeInformation(NULL,NULL,0,NULL,NULL,NULL,szFs,sizeof(szFs));
00590                 if(!stricmp(szFs,"NTFS"))
00591                     is_gmt_fs = 1;
00592                 else
00593                     is_gmt_fs = 0;
00594             }
00595         }
00596         else
00597         {
00598             // Drive specified...
00599             char szRootPath[4] = "?:\\";
00600             szRootPath[0]=filename[0];
00601             *szFs='\0';
00602             GetVolumeInformation(szRootPath,NULL,0,NULL,NULL,NULL,szFs,sizeof(szFs));
00603             if(!stricmp(szFs,"NTFS") || !stricmp(szFs,"HPFS"))
00604                 is_gmt_fs = 1;
00605             else
00606                 is_gmt_fs = 0;
00607         }
00608     }
00609
00610     if(is_gmt_fs) // NTFS - everything is in GMT already
00611     {
00612         FileTimeToUnixTime ( &bhfi.ftLastAccessTime, &buf->st_atime, FALSE );
00613         FileTimeToUnixTime ( &bhfi.ftLastWriteTime, &buf->st_mtime, FALSE );
00614         FileTimeToUnixTime ( &bhfi.ftCreationTime, &buf->st_ctime, FALSE );
00615     }
00616     else
00617     {
00618         // FAT - timestamps are in incorrectly translated local time.
00619         // translate them back and let FileTimeToUnixTime() do the
00620         // job properly.
00621
00622         FILETIME At,Wt,Ct;
00623
00624         FileTimeToLocalFileTime ( &bhfi.ftLastAccessTime, &At );
00625         FileTimeToLocalFileTime ( &bhfi.ftLastWriteTime, &Wt );
00626         FileTimeToLocalFileTime ( &bhfi.ftCreationTime, &Ct );
00627         FileTimeToUnixTime ( &At, &buf->st_atime, TRUE );
00628         FileTimeToUnixTime ( &Wt, &buf->st_mtime, TRUE );
00629         FileTimeToUnixTime ( &Ct, &buf->st_ctime, TRUE );
00630     }
00631
00632     buf->st_size = bhfi.nFileSizeLow;
00633     if(bhfi.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
00634         buf->st_mode |= _S_IFDIR;
00635     else
00636         buf->st_mode |= _S_IFREG;
00637
00638     /* On DOS, this field contains the drive number, but
00639      * the drive number is not available on this platform.
00640      * Also, for UNC network names, there is no drive number.
00641      */
00642     buf->st_rdev = buf->st_dev = 0;
00643     return 0;
00644 }
00645
00646 int wnt_stat(const char *name, struct stat *buf)
00647 {
00648     if(stricmp(name,"Entries") && stricmp(name,"Entries.log"))
00649         name=name;
00650     return _statcore(NULL,name,buf);
00651 }
00652
00653 int wnt_fstat (int fildes, struct stat *buf)
00654 {
00655     return _statcore((HANDLE)_get_osfhandle(fildes),NULL,buf);
00656 }
00657
00658 int wnt_lstat (const char *name, struct stat *buf)
00659 {
00660     return _statcore(NULL,name,buf);
00661 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoAddHandler Member List

This is the complete list of members for KoAddHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoAddHandler() | KoAddHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KoAddHandler | [inline, virtual]
OnFiles(MultiFiles *pmf) | KoAddHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoAddHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoRegularModel Member List

This is the complete list of members for KoRegularModel, including all inherited members.

GetAt(const int pos) const | KoRegularModel | [inline, virtual]
GetColumn(const int type) const | KiColumnModel | [virtual]
GetCount() const | KoRegularModel | [inline, virtual]
GetRecursiveModel() | KiColumnModel | [static]
GetRegularModel() | KiColumnModel | [static]
GetType(const int pos) const | KoRegularModel | [inline, virtual]

Generated on Sat Aug 7 22:54:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJCaptionPopupWnd Member List

This is the complete list of members for CCJCaptionPopupWnd, including all inherited members.

CCJCaptionPopupWnd() | CCJCaptionPopupWnd |
Create(const CRect &rect, CWnd *pParentWnd, CWnd *pChildWnd) | CCJCaptionPopupWnd | [virtual]
m_Caption | CCJCaptionPopupWnd | [protected]
m_CaptionButton | CCJCaptionPopupWnd | [protected]
m_hIconOff | CCJCaptionPopupWnd | [protected]
m_hIconOn | CCJCaptionPopupWnd | [protected]
m_pChildParent | CCJCaptionPopupWnd |
m_pChildWnd | CCJCaptionPopupWnd |
m_pParentWnd | CCJCaptionPopupWnd |
OnCaptButton() | CCJCaptionPopupWnd | [protected]
OnDestroy() | CCJCaptionPopupWnd | [protected]
OnPaint() | CCJCaptionPopupWnd | [protected]
OnTimer(UINT nIDEvent) | CCJCaptionPopupWnd | [protected]
~CCJCaptionPopupWnd() | CCJCaptionPopupWnd | [virtual]

Generated on Sat Aug 7 22:48:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvsView.h Source File

WinCvs/wincvsView.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // wincvsView.h : interface of the CWincvsView class
00022 //
00024
00025 #if !defined(AFX_WINCVSVIEW_H__D2D77DD0_8299_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_WINCVSVIEW_H__D2D77DD0_8299_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include <afxrich.h>
00033 #include "AppConsole.h"
00034
00035 #if _RICHEDIT_VER >= 0x0210
00036 #   define WCHARFORMAT CHARFORMAT2
00037 #else
00038 #   define WCHARFORMAT CHARFORMAT
00039 #endif
00040
00042 #define MAX_CHAR_BY_LINE 1024
00043
00044 class CWincvsDoc;
00045
00047 class CCharFormat : public WCHARFORMAT
00048 {
00049 public:
00050     // Construction
00051     CCharFormat()
00052     {
00053         USES_CONVERSION;
00054
00055         CString strDefFont = _T("Courier New");
00056         //VERIFY(strDefFont.LoadString(IDS_DEFFONT));
00057
00058         cbSize = sizeof(WCHARFORMAT);
00059         dwMask = CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT | CFM_SIZE | CFM_COLOR | CFM_OFFSET | CFM_PROTECTED;
00060         dwEffects = CFE_AUTOCOLOR;
00061         yHeight = 200; //10pt
00062         yOffset = 0;
00063         crTextColor = RGB(0, 0, 0);
00064         bCharSet = 0;
00065         bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
00066
00067         ASSERT(strDefFont.GetLength() < LF_FACESIZE);
00068
00069         lstrcpynA(szFaceName, T2A((LPTSTR)(LPCTSTR)strDefFont), LF_FACESIZE);
00070         dwMask |= CFM_FACE;
00071     }
00072
00073     CCharFormat(const WCHARFORMAT& newf)
00074     {
00075         *(WCHARFORMAT*)this = newf;
00076     }
00077
00078 public:
00079     // Interface
00080
00082     inline operator WCHARFORMAT&()
00083     {
00084         return *(WCHARFORMAT*)this;
00085     }
00086 };
00087
00089 class CWincvsView : public CRichEditView
00090 {
00091 protected: // create from serialization only
00092     CWincvsView();
00093     DECLARE_DYNCREATE(CWincvsView)
00094
00095 // Attributes
00096 public:
00097     CWincvsDoc* GetDocument();
00098
00099 // Operations
00100 public:
00101
00102 // Overrides
00103     // ClassWizard generated virtual function overrides
00104     //{{AFX_VIRTUAL(CWincvsView)
00105     public:
00106     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00107     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00108     protected:
00109     virtual void OnInitialUpdate(); // called first time after construct
00110     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
00111     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
00112     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
00113     virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
00114     //}}AFX_VIRTUAL
00115
00116 // Implementation
00117 public:
00118     virtual ~CWincvsView();
00119 #ifdef _DEBUG
00120     virtual void AssertValid() const;
00121     virtual void Dump(CDumpContext& dc) const;
00122 #endif
00123
00124 protected:
00125
00126 // Generated message map functions
00127 protected:
00128     //{{AFX_MSG(CWincvsView)
00129     afx_msg void OnDestroy();
00130     afx_msg void OnSetFocus(CWnd* pOldWnd);
00131     afx_msg void OnSize(UINT nType, int cx, int cy);
00132     afx_msg void OnMyFormatFont();
00133     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00134     afx_msg void OnDropFiles(HDROP hDropInfo);
00135     afx_msg void OnEditClearAll();
00136     afx_msg UINT OnGetDlgCode();
00137     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00138     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00139     //}}AFX_MSG
00140     DECLARE_MESSAGE_MAP()
00141 private:
00142     // Data members
00143     char* m_sbuf;
00144     int m_snumbuf;
00145     UINT m_fRtfFormat;
00147     CCriticalSection m_syncObject;
00149     // Methods
00150     virtual HRESULT QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD, BOOL, HGLOBAL);
00151
00152     void OutLine(const char* buf, int numbuf, bool isStderr);
00153     BOOL CanPaste() const;
00154
00155 public:
00156     // Interface
00157     WCHARFORMAT GetCurFormat(bool jumpEnd = true);
00158
00159     void OutConsole(const char* txt, long len, bool isStderr = false);
00160
00161     void OutColor(const char* txt, long len);
00162     void OutColor(kConsoleColor color);
00163     void OutColor(WCHARFORMAT& format);
00164 };
00165
00166 #ifndef _DEBUG  // debug version in wincvsView.cpp
00167 inline CWincvsDoc* CWincvsView::GetDocument()
00168    { return (CWincvsDoc*)m_pDocument; }
00169 #endif
00170
00172
00173 //{{AFX_INSERT_LOCATION}}
00174 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00175
00176 #endif // !defined(AFX_WINCVSVIEW_H__D2D77DD0_8299_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoPathColumn Member List

This is the complete list of members for KoPathColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoPathColumn | [inline, virtual]
GetColumnIndex() const | KoPathColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoPathColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoPathColumn | [inline, virtual]
IsDefaultAscending() const | KoPathColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/StdAfx.cpp Source File

rf/support/mfc/StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  pseudo.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uevent.cpp Source File

rf/uevent.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #if TIME_WITH_SYS_TIME
00028 # include <sys/time.h>
00029 # include <time.h>
00030 #else
00031 # if HAVE_SYS_TIME_H
00032 #  include <sys/time.h>
00033 # else
00034 #  include <time.h>
00035 # endif
00036 #endif
00037
00038 #include "umain.h"
00039 #include "uconsole.h"
00040 #include "uwidget.h"
00041
00042 #include <map>
00043
00044 #if defined(_DEBUG) && defined(WIN32)
00045 #   define new DEBUG_NEW
00046 #   undef THIS_FILE
00047     static char THIS_FILE[] = __FILE__;
00048 #endif
00049
00050 #if qMacAPP
00051 #   include "UMenuMgr.h"
00052 #   include "UCheckBox.h"
00053 #   include "URadio.h"
00054 #endif
00055
00056 #ifdef qMacPP
00057 #   include "UPseudoSupport.h"
00058 #   include <LCheckBox.h>
00059 #   include <LRadioButton.h>
00060 #   include <LEditText.h>
00061 #   include <LStaticText.h>
00062 #   include <LCheckBoxGroupBox.h>
00063 #endif
00064
00065 #ifdef WIN32
00066 #   include "PseudoButton.h"
00067 #endif
00068
00074 #define MIN_IDLE 100
00075
00076 static long sLastIdle = 0;
00077
00078 // handler to forward the tooltip (usually the status bar)
00079 extern "C"
00080 {
00081     static void (*sTooltipHandler) (const char *) = 0L;
00082 }
00083
00084 // all the framework widgets are located there
00085 class CAllTargets
00086 {
00087 public:
00088     CAllTargets() {}
00089     ~CAllTargets()
00090     {
00091         // delete the remaining widgets at exit.
00092         // we don't make a loop because the widget gets
00093         // removed from the map when calling the destructor.
00094         STD map<int, UCmdTarget *>::iterator i;
00095         while(targets.size() != 0)
00096         {
00097             i = targets.begin();
00098             delete (*i).second;
00099         }
00100     }
00101
00102     inline STD map<int, UCmdTarget *> & Get(void) { return targets; }
00103     inline const STD map<int, UCmdTarget *> & Get(void) const { return targets; }
00104 protected:
00105     STD map<int, UCmdTarget *> targets;
00106 } sAllTargets;
00107
00108 const UMSGMAP* UCmdTarget::GetBaseMessageMap()
00109     { return 0L; }
00110 const UMSGMAP* UCmdTarget::GetThisMessageMap()
00111     { return &UCmdTarget::messageMap; }
00112 const UMSGMAP* UCmdTarget::GetMessageMap() const
00113     { return &UCmdTarget::messageMap; }
00114 const UMSGMAP UCmdTarget::messageMap =
00115 { 0L, &UCmdTarget::_messageEntries[0] };
00116 const UMSGMAP_ENTRY UCmdTarget::_messageEntries[] =
00117 {
00118     {EV_NONE, epNone, UMSG_NOEXT, 0, 0, (UPMSG)0 }
00119 };
00120
00121 static bool sTurnOffDispatching = false;
00122
00123 class CTurnOffDispatching
00124 {
00125 public:
00126     CTurnOffDispatching() : m_didSetIt(false)
00127     {
00128         if(!sTurnOffDispatching)
00129         {
00130             m_didSetIt = true;
00131             sTurnOffDispatching = true;
00132         }
00133     }
00134
00135     ~CTurnOffDispatching()
00136     {
00137         if(m_didSetIt)
00138             sTurnOffDispatching = false;
00139     }
00140 protected:
00141     bool m_didSetIt;
00142 };
00143
00144 UIMPLEMENT_DYNAMIC(UCmdTarget, UObject)
00145
00146 // the message class used to post retained messages
00147 class CMsg
00148 {
00149 public:
00150     CMsg(int wid, int ev, int arg1, void *arg2) : m_wid(wid), m_ev(ev), m_arg1(arg1), m_arg2(arg2)
00151     {
00152     }
00153
00154     CMsg() : m_wid(0), m_ev(0), m_arg1(0), m_arg2(0L)
00155     {
00156     }
00157
00158     CMsg(const CMsg & msg) : m_wid(0), m_ev(0), m_arg1(0), m_arg2(0L)
00159     {
00160         *this = msg;
00161     }
00162
00163     CMsg & operator=(const CMsg & msg)
00164     {
00165         m_wid = msg.m_wid;
00166         m_ev = msg.m_ev;
00167         m_arg1 = msg.m_arg1;
00168         m_arg2 = msg.m_arg2;
00169
00170         return *this;
00171     }
00172
00173     int m_wid, m_ev, m_arg1;
00174     void *m_arg2;
00175
00176 };
00177
00178 static std::vector<CMsg> sRetainedMsgs;
00179
00180 union UMessageMapFunctions
00181 {
00182     UPMSG pfn;   // generic member function pointer
00183
00184     // specific type safe variants
00185     void(UCmdTarget::*pfnV_V)(void);
00186     void(UCmdTarget::*pfnV_VP)(void *);
00187     void(UCmdTarget::*pfnV_iVP)(int,void *);
00188     void(UCmdTarget::*pfnV_i)(int);
00189     void(UCmdTarget::*pfnV_ii)(int, int);
00190     void(UCmdTarget::*pfnV_iii)(int, int, int);
00191     void(UCmdTarget::*pfnV_iiVP)(int, int, void *);
00192     int(UCmdTarget::*pfni_ii)(int, int);
00193     int(UCmdTarget::*pfni_i)(int);
00194     int(UCmdTarget::*pfni_V)();
00195     int(UCmdTarget::*pfni_iVP)(int,void *);
00196     int(UCmdTarget::*pfni_VP)(void *);
00197 };
00198
00199 int UEventSendMessage(int wid, int/*UEventType*/ evt, int arg1, void *arg2)
00200 {
00201     if(sTurnOffDispatching)
00202         return 0;
00203
00204     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00205     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(wid);
00206     int res = 0;
00207
00208     if(iter != targets.end())
00209     {
00210         UCmdTarget *target = (*iter).second;
00211         UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00212 #if qDebug
00213         try {
00214 #endif
00215         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00216 #if qDebug
00217         } catch(...) {
00218             UASSERT(0);
00219             throw;
00220         }
00221 #endif
00222     }
00223     else
00224     {
00225         UAppConsole("Unknown widget id : %d\n", wid);
00226     }
00227
00228     return res;
00229 }
00230
00231 int UEventSendMessageExt(int wid, int/*UEventType*/ evt, int arg1, void *arg2, int * handledFlag)
00232 {
00233     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00234     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(wid);
00235     int res = 0;
00236     UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00237
00238     if(iter != targets.end())
00239     {
00240         UCmdTarget *target = (*iter).second;
00241 #if qDebug
00242         try {
00243 #endif
00244         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00245 #if qDebug
00246         } catch(...) {
00247             UASSERT(0);
00248             throw;
00249         }
00250 #endif
00251     }
00252     else
00253     {
00254         UAppConsole("Unknown widget id : %d\n", wid);
00255     }
00256
00257     *handledFlag = (dispatchInfo & UCmdTarget::kUDispatchHandled) != 0;
00258     return res;
00259 }
00260
00261 // for the retained messages
00262 int UEventPostMessage(int wid, int/*UEventType*/ evt, int arg1, void *arg2)
00263 {
00264     sRetainedMsgs.push_back(CMsg(wid, evt, arg1, arg2));
00265     return 0;
00266 }
00267
00268 // a notify message get broadcasted to every in the map.
00269 int UEventNotifyMessage(int/*UEventType*/ evt, int arg1, void *arg2)
00270 {
00271     STD map< int, UCmdTarget * >::const_iterator iter;
00272     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00273     int res = 0;
00274
00275     for(iter = targets.begin(); iter != targets.end(); ++iter)
00276     {
00277         UCmdTarget *target = (*iter).second;
00278         UCmdTarget::UDispatchInfo dispatchInfo = UCmdTarget::kUNoDispatchInfo;
00279 #if qDebug
00280         try {
00281 #endif
00282         res = target->UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00283 #if qDebug
00284         } catch(...) {
00285             UASSERT(0);
00286             throw;
00287         }
00288 #endif
00289         if(res)
00290             break;
00291     }
00292
00293     return res;
00294 }
00295
00296 int UEventGetWidID(void)
00297 {
00298     static int newid = 100;
00299     return newid++;
00300 }
00301
00302 UCmdTarget *UEventQueryWidget(int widid)
00303 {
00304     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00305     STD map< int, UCmdTarget * >::const_iterator iter = targets.find(widid);
00306     if(iter != targets.end())
00307     {
00308         UCmdTarget *target = (*iter).second;
00309         return target;
00310     }
00311     return 0L;
00312 }
00313
00314 void UEventRemoveWidID(int widid)
00315 {
00316     STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00317     STD map<int, UCmdTarget *>::iterator i = targets.find(widid);
00318     if(i == targets.end())
00319         return;
00320     targets.erase(i);
00321 }
00322
00323 int UCmdTarget::UDispatchMessage(int/*UEventType*/ evt, int arg1, void *arg2, UDispatchInfo & dispatchInfo)
00324 {
00325     const UMSGMAP* themap;
00326     const UMSGMAP_ENTRY *entries;
00327     for(themap = GetMessageMap(); themap != 0L; themap = themap->pBaseMap)
00328     {
00329         entries = themap->lpEntries;
00330         while(entries->nMessage != EV_NONE)
00331         {
00332             if(entries->ext == UMSG_RANGE)
00333             {
00334                 int cmd = (unsigned short)ULOWORD(arg1);
00335                 if(evt == entries->nMessage &&
00336                     cmd >= entries->ext1 &&
00337                     cmd <= entries->ext2)
00338                         goto dispatch;
00339             }
00340             else if(entries->nMessage == evt)
00341                 goto dispatch;
00342             entries++;
00343         }
00344     }
00345     return 0;
00346
00347 dispatch:
00348     union UMessageMapFunctions mmf;
00349     mmf.pfn = entries->pfn;
00350     int res = 0;
00351
00352     dispatchInfo = UDispatchInfo((int)dispatchInfo | UCmdTarget::kUDispatchHandled);
00353
00354     switch(entries->nSig)
00355     {
00356     case epV_V:
00357         (this->*mmf.pfnV_V)();
00358         break;
00359     case epV_VP:
00360         (this->*mmf.pfnV_VP)(arg2);
00361         break;
00362     case epV_iVP:
00363         (this->*mmf.pfnV_iVP)(arg1, arg2);
00364         break;
00365     case epV_IVP:
00366         (this->*mmf.pfnV_iVP)(UHIWORD(arg1), arg2);
00367         break;
00368     case epV_i:
00369         (this->*mmf.pfnV_i)(arg1);
00370         break;
00371     case epV_I:
00372         (this->*mmf.pfnV_i)(UHIWORD(arg1));
00373         break;
00374     case epV_ii:
00375         (this->*mmf.pfnV_ii)(ULOWORD(arg1), UHIWORD(arg1));
00376         break;
00377     case epV_iii:
00378         (this->*mmf.pfnV_iii)(ULOWORD(arg1), UHIWORD(arg1), (int)arg2);
00379         break;
00380     case epV_iiVP:
00381         (this->*mmf.pfnV_iiVP)(ULOWORD(arg1), UHIWORD(arg1), arg2);
00382         break;
00383     case epi_ii:
00384         res = (this->*mmf.pfni_ii)(ULOWORD(arg1), UHIWORD(arg1));
00385         break;
00386     case epi_i:
00387         res = (this->*mmf.pfni_i)(arg1);
00388         break;
00389     case epi_V:
00390         res = (this->*mmf.pfni_V)();
00391         break;
00392     case epi_iVP:
00393         res = (this->*mmf.pfni_iVP)(arg1, arg2);
00394         break;
00395     case epi_VP:
00396         res = (this->*mmf.pfni_VP)(arg2);
00397         break;
00398     default:
00399         UAppConsole("Unknown event cast : %d\n", entries->nSig);
00400         break;
00401     }
00402
00403     return res;
00404 }
00405
00406 UCmdTarget::UCmdTarget(int widid) : m_widid(widid)
00407 {
00408     std::map<int, UCmdTarget *>::value_type val(widid, this);
00409     sAllTargets.Get().insert(val);
00410 }
00411
00412 UCmdTarget::~UCmdTarget()
00413 {
00414     UEventRemoveWidID(m_widid);
00415 }
00416
00417 void UCmdUI::Enable(bool bOn)
00418 {
00419     m_continue = false;
00420
00421 #ifdef qMacAPP
00422     if((long)m_widget <= 2L)
00423     {
00424         // this is a menu
00425         ::Enable(m_nID, bOn);
00426         m_widget = (void *)(bOn ? 1L : 2L);
00427             // see UCmdUI::Check
00428     }
00429     else
00430     {
00431         TView *view = (TView *)m_widget;
00432         if(MA_MEMBER(view, TView))
00433         {
00434             view->SetActiveState(bOn, kRedraw);
00435         }
00436     }
00437 #endif
00438 #ifdef qMacPP
00439     if(m_wrapper != 0L)
00440     {
00441         // this is a menu
00442         *m_wrapper->outEnabled = bOn;
00443     }
00444     else
00445     {
00446         LPane *view = (LPane *)m_widget;
00447         if(view != 0L)
00448         {
00449             if(bOn)
00450                 view->Enable();
00451             else
00452                 view->Disable();
00453         }
00454     }
00455 #endif
00456 #ifdef WIN32
00457     if(pCmdUI != 0L)
00458     {
00459         // this is a menu
00460         pCmdUI->Enable(bOn);
00461     }
00462     else if(m_widget)
00463     {
00464         // this something else
00465         CWnd *wid = (CWnd *)m_widget;
00466         BOOL state = bOn;
00467         if(state != wid->IsWindowEnabled())
00468             wid->EnableWindow(state);
00469     }
00470 #endif
00471 #ifdef qGTK
00472     if(pCmdUI != 0L)
00473     {
00474         // this is a menu
00475         pCmdUI->Enable(bOn);
00476     }
00477     else if(m_widget != 0L)
00478     {
00479         if(GTK_IS_WIDGET(m_widget))
00480         {
00481             gtk_widget_set_sensitive(GTK_WIDGET(m_widget), bOn);
00482         }
00483     }
00484 #endif
00485 }
00486
00487 void UCmdUI::Check(bool bOn)
00488 {
00489     m_continue = false;
00490
00491 #ifdef qMacAPP
00492     if((long)m_widget <= 2L)
00493     {
00494         // this is a menu
00495         if(m_widget == 0L)
00496         {
00497             UASSERT("You need to call UCmdUI::Enable before UCmdUI::Check !\n");
00498         }
00499         else
00500         {
00501             ::EnableCheck(m_nID, m_widget == (void *)1L, bOn);
00502         }
00503     }
00504     else
00505     {
00506         TView *view = (TView *)m_widget;
00507         if(MA_MEMBER(view, TCheckBox))
00508         {
00509             ((TCheckBox *)view)->SetState(bOn, kRedraw);
00510         }
00511         else if(MA_MEMBER(view, TRadio))
00512         {
00513             ((TRadio *)view)->SetState(bOn, kRedraw);
00514         }
00515     }
00516 #endif
00517 #ifdef qMacPP
00518     if(m_wrapper != 0L)
00519     {
00520         // this is a menu
00521         *m_wrapper->outUsesMark = true;
00522         *m_wrapper->outMark = bOn ? checkMark : noMark;
00523     }
00524     else
00525     {
00526         LPane *view = (LPane *)m_widget;
00527         if(dynamic_cast<LCheckBox*>(view) != 0L ||
00528             dynamic_cast<LRadioButton*>(view) != 0L ||
00529             dynamic_cast<LCheckBoxGroupBox*>(view) != 0L ||
00530             dynamic_cast<LBevelButton*>(view) != 0L)
00531         {
00532             USemaphore policeman(gTurnOffBroadcast);
00533
00534             view->SetValue(bOn ? Button_On : Button_Off);
00535         }
00536     }
00537 #endif
00538 #ifdef WIN32
00539     if(pCmdUI != 0L)
00540     {
00541         // this is a menu
00542         pCmdUI->SetCheck(bOn ? 1 : 0);
00543     }
00544     else if(m_widget)
00545     {
00546         CWnd *wnd = (CWnd *)m_widget;
00547         if(wnd->IsKindOf(RUNTIME_CLASS(CPseudoToggle)))
00548         {
00549             CPseudoToggle *btn = (CPseudoToggle *)wnd;
00550             btn->SetState(bOn);
00551         }
00552         else if(wnd->IsKindOf(RUNTIME_CLASS(CButton)))
00553         {
00554             CButton *btn = (CButton *)wnd;
00555             btn->SetCheck(bOn ? BST_CHECKED : BST_UNCHECKED);
00556         }
00557     }
00558 #endif
00559 #ifdef qGTK
00560     if(m_widget != 0L)
00561     {
00562         if(GTK_IS_TOGGLE_BUTTON(m_widget))
00563         {
00564             gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_widget), bOn);
00565         }
00566         else if(GTK_IS_RADIO_MENU_ITEM(m_widget))
00567         {
00568             if(bOn) {
00569                 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(m_widget), bOn);
00570             }
00571         }
00572     }
00573 #endif
00574 }
00575
00576 void UCmdUI::SetText(const char *title)
00577 {
00578     m_continue = false;
00579
00580 #ifdef qMacAPP
00581     if((long)m_widget <= 2L)
00582     {
00583         // this is a menu
00584         CStr255_AC pstr(title);
00585         SetCommandName(m_nID, pstr);
00586     }
00587     else
00588     {
00589         TCtlMgr *view = (TCtlMgr *)m_widget;
00590         if(MA_MEMBER(view, TCtlMgr))
00591         {
00592             view->SetText(CStr255_AC(title), kRedraw);
00593         }
00594     }
00595 #endif
00596 #ifdef qGTK
00597     if(m_widget != 0L)
00598     {
00599         if(GTK_IS_TOGGLE_BUTTON(m_widget))
00600         {
00601             GtkLabel *label = getLabelFromContainer(GTK_CONTAINER(m_widget));
00602             if(label != 0L)
00603                 gtk_label_set_text(label, title);
00604         }
00605     }
00606 #endif
00607 #ifdef qMacPP
00608     if(m_wrapper != 0L)
00609     {
00610         // this is a menu
00611         LStr255 pstr(title);
00612         LString::CopyPStr(pstr, m_wrapper->outName);
00613     }
00614     else
00615     {
00616         LPane *view = (LPane *)m_widget;
00617         LEditText *edit;
00618         LStaticText *stat;
00619         if((edit = dynamic_cast<LEditText*>(view)) != 0L)
00620         {
00621             edit->SetText((Ptr)title, strlen(title));
00622         }
00623         else if((stat = dynamic_cast<LStaticText*>(view)) != 0L)
00624         {
00625             stat->SetText((Ptr)title, strlen(title));
00626         }
00627     }
00628 #endif
00629 #ifdef WIN32
00630     if(pCmdUI != 0L)
00631     {
00632         // this is a menu
00633         if(title != 0L && *title != '\0')
00634             pCmdUI->SetText(title);
00635     }
00636 #endif
00637 }
00638
00639 void UCmdUI::SetTooltip(const char *tooltip)
00640 {
00641     if(tooltip == 0L)
00642         return;
00643
00644     char status[256] = {'\0'};
00645     char prompt[256] = {'\0'};
00646
00647     strcpy(status, tooltip);
00648     char *cr = strchr(status, '\n');
00649     if(cr != 0L)
00650     {
00651         strcpy(prompt, cr + 1);
00652         *cr = '\0';
00653     }
00654 #ifdef WIN32
00655 #   define _countof(array) (sizeof(array)/sizeof(array[0]))
00656     NMHDR *hdr = (NMHDR *)pNMHDR;
00657     ASSERT(hdr->code == TTN_NEEDTEXTA || hdr->code == TTN_NEEDTEXTW);
00658
00659     TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)hdr;
00660     TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)hdr;
00661 #   ifndef _UNICODE
00662     if (hdr->code == TTN_NEEDTEXTA)
00663         lstrcpyn(pTTTA->szText, prompt, _countof(pTTTA->szText));
00664     else
00665         _mbstowcsz(pTTTW->szText, prompt, _countof(pTTTW->szText));
00666 #   else
00667     if (hdr->code == TTN_NEEDTEXTA)
00668         _wcstombsz(pTTTA->szText, prompt, _countof(pTTTA->szText));
00669     else
00670         lstrcpyn(pTTTW->szText, prompt, _countof(pTTTW->szText));
00671 #   endif
00672 #endif
00673
00674     if(sTooltipHandler != 0L)
00675         sTooltipHandler(status);
00676 }
00677
00678 void UEventSetTooltipHandler(void (*handler) (const char *))
00679 {
00680     sTooltipHandler = handler;
00681 }
00682
00683 void UEventGiveTime(void)
00684 {
00685     STD map< int, UCmdTarget * >::const_iterator iter;
00686     const STD map<int, UCmdTarget *> & targets = sAllTargets.Get();
00687
00688     // post the retained events
00689     while(!sRetainedMsgs.empty())
00690     {
00691         CMsg msg = *sRetainedMsgs.begin();
00692         sRetainedMsgs.erase(sRetainedMsgs.begin());
00693         UEventSendMessage(msg.m_wid, msg.m_ev, msg.m_arg1, msg.m_arg2);
00694     }
00695
00696     // take care about the EV_UPDATEUI notification
00697     if(!UWidget::IsUIValid())
00698     {
00699         UWidget::DoValidUI(true);
00700
00701         // warn the widget it's going to happen so they can cache
00702         // some informations.
00703         for(iter = targets.begin(); iter != targets.end(); ++iter)
00704         {
00705             UCmdTarget *target = (*iter).second;
00706             if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00707                 continue;
00708
00709             UWidget *wid = (UWidget *)target;
00710             wid->BeforeUpdateUI();
00711         }
00712
00713         for(iter = targets.begin(); iter != targets.end(); ++iter)
00714         {
00715             UCmdTarget *target = (*iter).second;
00716             if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00717                 continue;
00718
00719             UWidget *wid = (UWidget *)target;
00720             UEventSendMessage(wid->GetWidID(), EV_UPDATEUI, 0, 0L);
00721         }
00722     }
00723
00724     long thisIdle = UTickCount();
00725     if((thisIdle - sLastIdle) < MIN_IDLE)
00726         return;
00727
00728     // search the timers
00729     for(iter = targets.begin(); iter != targets.end(); ++iter)
00730     {
00731         UCmdTarget *target = (*iter).second;
00732         if(!target->IsKindOf(URUNTIME_CLASS(UWidget)))
00733             continue;
00734
00735         UWidget *wid = (UWidget *)target;
00736         std::vector<UTimer> & timers = wid->GetTimers();
00737         std::vector<UTimer>::iterator t;
00738         for(t = timers.begin(); t != timers.end(); ++t)
00739         {
00740             UTimer & timer = *t;
00741             if((thisIdle - timer.m_lastlap) >= timer.m_lap)
00742             {
00743                 // trigger the timer
00744                 timer.m_lastlap = thisIdle;
00745                 UEventSendMessage(wid->GetWidID(), EV_TIMER, timer.m_cmd, (void *)thisIdle);
00746             }
00747         }
00748     }
00749
00750     sLastIdle = thisIdle;
00751 }
00752
00753 long UTickCount(void)
00754 {
00755 #ifdef WIN32
00756     return ::GetTickCount();
00757 #elif defined(TARGET_OS_MAC)
00758     long res = ::TickCount();
00759     return res = (float)res * (1000.0 / 60.0);
00760 #else
00761     struct timeval tval;
00762     static long refcount;
00763
00764     gettimeofday(&tval, 0L);
00765
00766     if(refcount == 0)
00767         refcount = tval.tv_sec;
00768
00769     return (tval.tv_sec - refcount) * 1000 + tval.tv_usec / 1000;
00770 #endif
00771 }
00772
00773 const STD map<int, UCmdTarget *> & UEventGetTargets(void)
00774 {
00775     return sAllTargets.Get();
00776 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGraphDoc Member List

This is the complete list of members for CGraphDoc, including all inherited members.

CGraphDoc() | CGraphDoc | [protected]
Clear(void) | CGraphDoc | [private]
GetDir(void) const | CGraphDoc | [inline]
GetEntryInfo(void) | CGraphDoc | [inline]
GetName(void) const | CGraphDoc | [inline]
GetNode(void) | CGraphDoc | [inline]
GetTreeView(void) | CGraphDoc |
m_fData | CGraphDoc | [private]
m_fDir | CGraphDoc | [private]
m_fName | CGraphDoc | [private]
m_fNode | CGraphDoc | [private]
NumNodes() | CGraphDoc | [protected]
OnNewDocument() | CGraphDoc | [virtual]
Serialize(CArchive &ar) | CGraphDoc | [virtual]
SetNode(CLogNode *node, const char *dir) | CGraphDoc |
~CGraphDoc() | CGraphDoc | [virtual]

Generated on Sat Aug 7 22:52:51 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UMacAppMenu Member List

This is the complete list of members for UMacAppMenu, including all inherited members.

_GetBaseClass() | UMacAppMenu | [protected, static]
_messageEntries | UMacAppMenu | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUMacAppMenu | UMacAppMenu | [protected, static]
classUMenu | UMenu | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UMacAppMenu | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UMacAppMenu | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UMacAppMenu | [virtual]
GetThisMessageMap() | UMacAppMenu | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UMacAppMenu | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCommands(int cmd) | UMenu | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UMacAppMenu |
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUMacAppMenu(void) | UMacAppMenu | [static]
rtUMenu(void) | UMenu | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sMAMenuWidID | UMacAppMenu | [static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UMacAppMenu() | UMacAppMenu |
UMenu(int widid) | UMenu |
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UMacAppMenu() | UMacAppMenu | [virtual]
~UMenu() | UMenu | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:54:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PromptFiles.cpp Source File

common/PromptFiles.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * PromptFiles.cpp --- class to pick set of files and folder
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef TARGET_OS_MAC
00028 #   include "GUSIInternal.h"
00029 #   include "GUSIFileSpec.h"
00030 #   include <string.h>
00031 #   include <TextUtils.h>
00032 #   include <LowMem.h>
00033 #   include "stdfolder.h"
00034 #   include "stdmfiles.h"
00035 #   include "VolsPaths.h"
00036 #endif /* TARGET_OS_MAC */
00037
00038 #if qMacPP
00039 #   include <UConditionalDialogs.h>
00040 #   include <UNavServicesDialogs.h>
00041 #endif
00042
00043 #ifdef qGTK
00044 #   include <gtk/gtk.h>
00045 #   include <sys/stat.h>
00046 #endif /* qGTK */
00047
00048 #include "PromptFiles.h"
00049 #include "MultiFiles.h"
00050 #include "AppConsole.h"
00051 #include "CvsCommands.h"
00052 #include "CvsArgs.h"
00053
00054 #ifdef qQT
00055 #   include "qcvsapp.h"
00056 #   include "CPStr.h"
00057 #   include <qfiledialog.h>
00058 #   include <vector>
00059 #   include <stdlib.h>
00060 #endif /* qQT */
00061
00062 #ifdef WIN32
00063 #include "MfFileDialog.h"
00064
00065 #   ifdef _DEBUG
00066 #   define new DEBUG_NEW
00067 #   undef THIS_FILE
00068     static char THIS_FILE[] = __FILE__;
00069 #   endif
00070 #endif /* WIN32 */
00071
00072
00073 #ifdef WIN32
00074 // Open file dialog filter defines
00075 #define FILTER_SEPARATOR    "|"
00076 #define FILTER_EXECUTABLE   "Executable Files (*.exe)" FILTER_SEPARATOR "*.exe"
00077 #define FILTER_DLL          "DLL Files (*.dll)" FILTER_SEPARATOR "*.dll"
00078 #define FILTER_ALL          "All Files (*.*)" FILTER_SEPARATOR "*.*"
00079 #define FILTER_END          FILTER_SEPARATOR FILTER_SEPARATOR
00080
00081 #endif
00082
00083
00084 #ifdef TARGET_OS_MAC   //{ Mac - Part
00085 extern "C"
00086 {
00088     static void MacEnumFiles_hook(UFSSpec* newFile, MultiFiles* mf)
00089     {
00090         UInt8 utf8path[PATH_MAX];
00091         if( FSRefMakePath(newFile, utf8path, sizeof(utf8path)) == noErr )
00092         {
00093             UStr uppath, cname;
00094             SplitPath(utf8_to_posix(utf8path), uppath, cname);
00095             mf->newfile(cname, newFile);
00096         }
00097     }
00098 }
00099 #endif  //{ TARGET_OS_MAC
00100
00101 #ifdef qQT  //{ QT - Part
00102
00103 extern "C"
00104 {
00105     static int compareCStr(const CStr *s1, const CStr *s2)
00106     {
00107         return strcmp(*s1, *s2);
00108     }
00109 }
00110
00111 #endif //} qQT
00112
00113
00114 #ifdef qGTK  //{ GTK - Part
00115 static CStr gtksel;
00116 static bool gtkModalLoop;
00117
00118 static gint gtkcancel(GtkWidget *widget, gpointer data)
00119 {
00120     gtkModalLoop = false;
00121     return TRUE;
00122 }
00123
00124 static void file_ok_sel (GtkWidget *w, gpointer data)
00125 {
00126     gtkModalLoop = false;
00127     gtksel = gtk_file_selection_get_filename(GTK_FILE_SELECTION (data));
00128 }
00129
00130 static void file_cancel_sel (GtkWidget *w, gpointer data)
00131 {
00132     gtkModalLoop = false;
00133 }
00134
00135 static void fileop_c_dir_sel (GtkWidget *w, gpointer data)
00136 {
00137     GtkWidget *dialog     = GTK_FILE_SELECTION (GTK_WIDGET (data))->fileop_dialog;
00138
00139     gtk_grab_add (dialog);
00140
00141     // remove grab from fileselection dialog
00142     gtk_grab_remove (GTK_WIDGET (data));
00143     fprintf(stderr, "fileop_c_dir open\n");
00144 }
00145 #endif //}  qGTK
00146
00154 bool BrowserGetDirectory(const char* prompt, CStr& dir, CWnd* pParentWnd /*= NULL*/)
00155 {
00156     bool result = false;
00157
00158 #ifdef WIN32  //{ Win32 - Part
00159     CCJShell m_shell;
00160     m_shell.m_strTitle = prompt;
00161     m_shell.m_strSelDir = dir;
00162
00163     if( m_shell.BrowseForFolder(pParentWnd != 0L ? pParentWnd : AfxGetMainWnd()) )
00164     {
00165         dir = m_shell.m_strPath;
00166         result = true;
00167     }
00168 #endif //{ WIN32
00169
00170 #ifdef TARGET_OS_MAC   //{ Mac - Part
00171         UNavServicesDialogs::LFileChooser chooser;
00172
00173         FSSpec folderReply;
00174         SInt32 outFolderDirID;
00175         if( chooser.AskChooseFolder(folderReply, outFolderDirID) )
00176         {
00177             GUSIFileSpec dirSpec(folderReply);
00178             dir = dirSpec.FullPath();
00179             result = true;
00180         }
00181 #endif  //{ TARGET_OS_MAC
00182
00183 #ifdef qQT  //{ QT - Part
00184     QFileDialog::Mode mode = QFileDialog::Directory;
00185     QString start(QDir::currentDirPath());
00186     QString filter("*");
00187     QString caption(prompt);
00188
00189     QFileDialog fd(start, filter, 0, 0L, TRUE);
00190     fd.setMode(mode);
00191     fd.setCaption(caption);
00192     fd.setSelection(start);
00193     if( fd.exec() == QDialog::Accepted )
00194     {
00195         dir = fd.dirPath();
00196         result = true;
00197     }
00198 #endif //} qQT
00199
00200 #ifdef qGTK  //{ GTK - Part
00201 extern GtkWidget *MainWindow;
00202     /* Create a new file selection widget */
00203     GtkWidget* filew = gtk_file_selection_new (prompt);
00204     GtkWidget *pp = pParentWnd ? (GtkWidget *)pParentWnd : MainWindow; \
00205     if( filew && pp) gtk_window_set_transient_for (GTK_WINDOW (filew), GTK_WINDOW (pp)); \
00206
00207     gtk_signal_connect(GTK_OBJECT(filew), "delete_event",
00208                        GTK_SIGNAL_FUNC(gtkcancel), 0L);
00209
00210     /* Connect the ok_button to file_ok_sel function */
00211     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
00212                       "clicked", (GtkSignalFunc) file_ok_sel, filew);
00213     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button),
00214                       "clicked", (GtkSignalFunc) file_cancel_sel, filew);
00215     //{ WORKAROUND  Bug #440874
00216     // call 'fileop_c_dir_sel' when file options selected
00217     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->fileop_c_dir),
00218                       "clicked", (GtkSignalFunc) fileop_c_dir_sel, filew);
00219     //}  WORKAROUND  Bug #440874
00220
00221     gtkModalLoop = true;
00222     gtksel = "";
00223     gtk_widget_show(filew);
00224     //{ WORKAROUND Bug 440874: blocks keyboard in create dialog if uncommented
00225     gtk_grab_add(filew);
00226     //} WORKAROUND Bug 440874
00227     while( gtkModalLoop )
00228     {
00229         gtk_main_iteration_do(TRUE);
00230     }
00231
00232     //{ WORKAROUND Bug 440874: blocks keyboard in create dialog if uncommented
00233     gtk_grab_remove (filew);
00234     //} BWORKAROUND Bug 440874
00235
00236     gtk_widget_destroy(filew);
00237
00238     if( !gtksel.empty() )
00239     {
00240         static CStr fname;
00241
00242         fname = gtksel;
00243         if( !fname.empty() )
00244         {
00245             struct stat sb;
00246             if( stat(fname, &sb) != -1 && S_ISREG(sb.st_mode) )
00247             {
00248                 CStr uppath, file;
00249                 SplitPath(fname, uppath, file);
00250                 fname = uppath;
00251             }
00252
00253             fname.rtrim(kPathDelimiter);
00254
00255             dir = fname;
00256             result = true;
00257         }
00258     }
00259 #endif //}  qGTK
00260
00261     return result;
00262 }
00263
00272 bool BrowserGetMultiFiles(const char* prompt, MultiFiles& mf, bool single,
00273                           const kFilesSelectionType selectionType /*= kSelectAny*/)
00274 {
00275     bool result = false;
00276
00277     // Extract the directory and file to select
00278     CStr selDir;    // Directory to be initially selected (browse starting from that directory)
00279     CStr selFile;   // File to be initially selected
00280
00281     // Check the passed file/directory
00282     if( mf.NumDirs() > 0 )
00283     {
00284         MultiFiles::const_iterator mfi = mf.begin();
00285         if( mfi != mf.end() )
00286         {
00287             CvsArgs args(false);
00288             selDir = mfi->add(args);
00289
00290             // Single file passed - we can select it
00291             if( mf.TotalNumFiles() == 1 )
00292             {
00293                 CStr path;
00294                 CStr fileName;
00295                 CStr currRev;
00296
00297                 if( mfi->get(0, path, fileName, currRev) )
00298                 {
00299                     selFile = fileName;
00300                 }
00301             }
00302         }
00303     }
00304
00305     // Clear the selection object
00306     mf.reset();
00307
00308 #ifdef WIN32  //{ Win32 - Part
00309     const char* lpszFilter = FILTER_ALL FILTER_END;
00310     switch( selectionType )
00311     {
00312     default:
00313     case kSelectAny:
00314         lpszFilter = FILTER_ALL FILTER_END;
00315         break;
00316     case kSelectExecutable:
00317         lpszFilter = FILTER_EXECUTABLE FILTER_SEPARATOR FILTER_ALL FILTER_END;
00318         break;
00319     case kSelectDll:
00320         lpszFilter = FILTER_DLL FILTER_SEPARATOR FILTER_ALL FILTER_END;
00321         break;
00322     }
00323
00324     if( selDir.empty() )
00325     {
00326         // No selection specified, use current directory
00327         TCHAR curDir[_MAX_PATH] = { 0 };
00328         GetCurrentDirectory(_MAX_PATH-1, curDir);
00329         selDir = curDir;
00330     }
00331
00332     DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_FILEMUSTEXIST;
00333     if( !single )
00334     {
00335         dwFlags |= OFN_ALLOWMULTISELECT;
00336     }
00337
00338     CMfFileDialog mfFileDialog(mf, NULL, selFile.c_str(), dwFlags, lpszFilter);
00339
00340     mfFileDialog.m_ofn.lpstrTitle = prompt;
00341     mfFileDialog.m_ofn.lpstrInitialDir = selDir.c_str();
00342
00343     if( mfFileDialog.DoModal() == IDOK )
00344     {
00345         result = true;
00346     }
00347 #endif //{ WIN32
00348
00349 #ifdef TARGET_OS_MAC   //{ Mac - Part
00350     Point apt = {-1, -1};
00351     Str255 pprompt;
00352
00353     c2pstrcpy(pprompt, prompt);
00354
00355     if(!SF_PromptForMFiles(apt, pprompt))
00356         return false;
00357
00358     SF_PFMF_INFO info;
00359     UFSSpec dirSpec;
00360
00361     SF_PFMF_BeginTraversal(&info);
00362     while( 1 )
00363     {
00364         if( !SF_PFMF_GetCurrentDir(&info, &dirSpec) )
00365             break;
00366
00367         char aPath[255];
00368         GUSIFileSpec spec = dirSpec;
00369         char* specPath = spec.FullPath();
00370         if( spec.Error() == noErr )
00371         {
00372           strcpy(aPath, specPath);
00373             mf.newdir(aPath);
00374
00375             if( SF_PFMF_DoTraversal(&info, true, (SF_PFMF_HOOK)MacEnumFiles_hook, &mf) )
00376             {
00377                 result = true;
00378             }
00379         }
00380         else
00381         {
00382             cvs_err("MacCvs: Unable to convert path name\n");
00383         }
00384
00385     }
00386     SF_PFMF_EndTraversal(&info);
00387
00388 #endif  //{ TARGET_OS_MAC
00389
00390 #ifdef qQT  //{ QT - Part
00391     QStringList s = QFileDialog::getOpenFileNames();
00392     vector<CStr> allpaths;
00393     QStringList::Iterator f;
00394     for(f = s.begin(); f != s.end(); f++)
00395     {
00396         allpaths.push_back(CStr(*f));
00397     }
00398
00399     if( allpaths.size() > 0 )
00400     {
00401         qsort(&allpaths[0], allpaths.size(), sizeof(CStr), (int(*)(const void*, const void*))compareCStr);
00402
00403         vector<CStr>::const_iterator i;
00404         CStr uppath, file, oldpath;
00405         for(i = allpaths.begin(); i != allpaths.end(); ++i)
00406         {
00407             SplitPath(*i, uppath, file);
00408             if( strcmp(uppath, oldpath) != 0 )
00409                 mf.newdir(uppath);
00410
00411             oldpath = uppath;
00412             mf.newfile(file);
00413         }
00414
00415         result = true;
00416     }
00417 #endif //} qQT
00418
00419 #ifdef qGTK  //{ GTK - Part
00420     /* Create a new file selection widget */
00421     GtkWidget* filew = gtk_file_selection_new(prompt);
00422
00423     gtk_signal_connect(GTK_OBJECT(filew), "delete_event",
00424         GTK_SIGNAL_FUNC(gtkcancel), 0L);
00425
00426     /* Connect the ok_button to file_ok_sel function */
00427     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
00428         "clicked", (GtkSignalFunc) file_ok_sel, filew);
00429     gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button),
00430         "clicked", (GtkSignalFunc) file_cancel_sel, filew);
00431
00432     gtkModalLoop = true;
00433     gtksel = "";
00434     gtk_widget_show(filew);
00435
00436     //{ WORKAROUND Bug 440874: Directory creation is not necessary in this file selection box
00437     gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(filew));
00438     //{ WORKAROUND Bug 440874
00439
00440     gtk_grab_add(filew);
00441     while( gtkModalLoop )
00442     {
00443         gtk_main_iteration_do(TRUE);
00444     }
00445
00446     gtk_grab_remove (filew);
00447     gtk_widget_destroy(filew);
00448
00449     if( !gtksel.empty() )
00450     {
00451         CStr fname = gtksel;
00452         if( !fname.empty() )
00453         {
00454             CStr uppath, file;
00455             SplitPath(fname, uppath, file);
00456             mf.newdir(uppath);
00457             mf.newfile(file);
00458
00459             result = true;
00460         }
00461     }
00462 #endif //}  qGTK
00463
00464     return result;
00465 }
00466
00474 bool BrowserGetSaveasFile(const char* prompt, const kFilesSelectionType selectionType,
00475                           CStr& fullpath)
00476 {
00477     bool result = false;
00478
00479     CStr selDir;    // Directory to be initially selected (browse starting from that directory)
00480     CStr selFile;   // File to be initially selected
00481
00482     SplitPath( fullpath.c_str(), selDir, selFile);
00483
00484 #ifdef WIN32  //{ Win32 - Part
00485     const char* lpszFilter = FILTER_ALL FILTER_END;
00486     switch( selectionType )
00487     {
00488     default:
00489     case kSelectAny:
00490         lpszFilter = FILTER_ALL FILTER_END;
00491         break;
00492     case kSelectExecutable:
00493         lpszFilter = FILTER_EXECUTABLE FILTER_SEPARATOR FILTER_ALL FILTER_END;
00494         break;
00495     case kSelectDll:
00496         lpszFilter = FILTER_DLL FILTER_SEPARATOR FILTER_ALL FILTER_END;
00497         break;
00498     }
00499
00500     DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
00501
00502     CFileDialog fdFileDialog(false, NULL, selFile.c_str(), dwFlags, lpszFilter);
00503     fdFileDialog.m_ofn.lpstrInitialDir = selDir.c_str();
00504     fdFileDialog.m_ofn.lpstrTitle = prompt;
00505
00506     if( fdFileDialog.DoModal() == IDOK )
00507     {
00508         fullpath = fdFileDialog.m_ofn.lpstrFile;
00509         result = true;
00510     }
00511 #endif //{ WIN32
00512
00513 #ifdef TARGET_OS_MAC   //{ Mac - Part
00514 #endif  //{ TARGET_OS_MAC
00515
00516 #ifdef qQT  //{ QT - Part
00517 #endif //} qQT
00518
00519 #ifdef qGTK  //{ GTK - Part
00520 #endif //}  qGTK
00521
00522     return result;
00523
00524 }
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CHHelpPropertyPage Member List

This is the complete list of members for CHHelpPropertyPage, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CHHelpPropertyPage | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
InitHelpID()=0 | CHHelpSupport | [protected, pure virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJToolBarCtrl Member List

This is the complete list of members for CCJToolBarCtrl, including all inherited members.

CCJToolBarCtrl() | CCJToolBarCtrl |
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CCJToolBarCtrl |
GetAnchorHighlight() const | CCJToolBarCtrl |
GetButtonInfo(int nID, TBBUTTONINFO *ptbbi) const | CCJToolBarCtrl |
GetButtonSize() const | CCJToolBarCtrl |
GetDisabledImageList() const | CCJToolBarCtrl |
GetDropTarget(IDropTarget **ppDropTarget) const | CCJToolBarCtrl |
GetExtendedStyle() const | CCJToolBarCtrl |
GetHotImageList() const | CCJToolBarCtrl |
GetHotItem() const | CCJToolBarCtrl |
GetImageList() const | CCJToolBarCtrl |
GetInsertMark(TBINSERTMARK *ptbim) const | CCJToolBarCtrl |
GetInsertMarkColor() const | CCJToolBarCtrl |
GetMaxSize(LPSIZE pSize) const | CCJToolBarCtrl |
GetMaxTextRows() const | CCJToolBarCtrl |
GetStyle() const | CCJToolBarCtrl |
HitTest(LPPOINT ppt) const | CCJToolBarCtrl |
InsertMarkHitTest(LPPOINT ppt, LPTBINSERTMARK ptbim) const | CCJToolBarCtrl |
IsButtonHighlighted(int nID) const | CCJToolBarCtrl |
MapAccelerator(TCHAR chAccel, UINT *pIDBtn) | CCJToolBarCtrl |
MarkButton(int nID, BOOL bHighlight=TRUE) | CCJToolBarCtrl |
MoveButton(UINT nOldPos, UINT nNewPos) | CCJToolBarCtrl |
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJToolBarCtrl | [protected]
SetAnchorHighlight(BOOL fAnchor=TRUE) | CCJToolBarCtrl |
SetButtonInfo(int nID, TBBUTTONINFO *ptbbi) | CCJToolBarCtrl |
SetButtonWidth(int cxMin, int cxMax) | CCJToolBarCtrl |
SetDisabledImageList(CImageList *pImageList) | CCJToolBarCtrl |
SetDrawTextFlags(DWORD dwMask, DWORD dwDTFlags) | CCJToolBarCtrl |
SetExtendedStyle(DWORD dwExStyle) | CCJToolBarCtrl |
SetHotImageList(CImageList *pImageList) | CCJToolBarCtrl |
SetHotItem(int nHot) | CCJToolBarCtrl |
SetImageList(CImageList *pImageList) | CCJToolBarCtrl |
SetIndent(int iIndent) | CCJToolBarCtrl |
SetInsertMark(TBINSERTMARK *ptbim) | CCJToolBarCtrl |
SetInsertMarkColor(COLORREF clrNew) | CCJToolBarCtrl |
SetMaxTextRows(int iMaxRows) | CCJToolBarCtrl |
SetStyle(DWORD dwStyle) | CCJToolBarCtrl |
~CCJToolBarCtrl() | CCJToolBarCtrl | [virtual]

Generated on Sat Aug 7 22:50:24 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWndRedrawMngr Member List

This is the complete list of members for CWndRedrawMngr, including all inherited members.

CWndRedrawMngr(CWnd *pWnd) | CWndRedrawMngr |
m_pWnd | CWndRedrawMngr | [private]
m_redraw | CWndRedrawMngr | [private]
~CWndRedrawMngr() | CWndRedrawMngr | [virtual]

Generated on Sat Aug 7 22:58:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsArgs.cpp Source File

common/CvsArgs.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * CvsArgs.cpp --- class to handle cvs arguments
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <stdlib.h>
00028 #include <string.h>
00029 #include <errno.h>
00030
00031 #include <string>
00032 #include <sstream>
00033 using namespace std;
00034
00035 #include "CvsPrefs.h"
00036 #include "CvsArgs.h"
00037 #include "AppConsole.h"
00038 #include "Authen.h"
00039 #include "FileTraversal.h"
00040 #include "MoveToTrash.h"
00041
00042 #ifdef WIN32
00043 #   ifdef _DEBUG
00044 #   define new DEBUG_NEW
00045 #   undef THIS_FILE
00046     static char THIS_FILE[] = __FILE__;
00047 #   endif
00048 #endif /* WIN32 */
00049
00050 #define MAX_PRINT_ARG 80
00051
00052 static CStaticAllocT<char> buf;
00053
00054 static char *mystrdup(const char *string)
00055 {
00056     int size = strlen(string);
00057     char *result = (char *)malloc((size + 1) * sizeof(char));
00058     if(result == NULL)
00059     {
00060         cvs_err("Impossible to allocate %d bytes !\n", size + 1);
00061         exit(1);
00062     }
00063     strcpy(result, string);
00064     return result;
00065 }
00066
00068 static char *reduceString(const char *str, CStaticAllocT<char> & buf)
00069 {
00070     buf.AdjustSize(MAX_PRINT_ARG + 4); // "..." + '\0'
00071     size_t len = strlen(str);
00072     if(len < MAX_PRINT_ARG)
00073     {
00074         strcpy(buf, str);
00075     }
00076     else
00077     {
00078         memcpy((char *)buf, str, MAX_PRINT_ARG * sizeof(char));
00079         char *tmp = (char *)buf + MAX_PRINT_ARG;
00080         *tmp++ = '.';
00081         *tmp++ = '.';
00082         *tmp++ = '.';
00083         *tmp = '\0';
00084     }
00085
00086     return buf;
00087 }
00088
00090 static char *expandLF(const char *str, CStaticAllocT<char> & buf)
00091 {
00092     int numLFs = 0;
00093     const char *runner = str;
00094     while((runner = strchr(runner, '\n')) != 0L)
00095     {
00096         numLFs++;
00097         runner++;
00098     }
00099
00100     size_t len = strlen(str);
00101     buf.AdjustSize(len + numLFs + 1); // numLFs * "\n" + '\0'
00102
00103     char *tmp = buf;
00104     char c;
00105     runner = str;
00106     while((c = *runner++) != '\0')
00107     {
00108         if(c == '\n')
00109         {
00110             *tmp++ = '\\';
00111             *tmp++ = 'n';
00112         }
00113         else
00114             *tmp++ = c;
00115     }
00116     *tmp++ = '\0';
00117
00118     return buf;
00119 }
00120
00122 // CvsArgs
00123
00124 CvsArgs::CvsArgs(bool defargs)
00125 {
00126     argv = NULL;
00127     argc = 0;
00128
00129     reset(defargs);
00130 }
00131
00132 CvsArgs::CvsArgs(char* const* fromargv, int fromargc)
00133 {
00134     argv = NULL;
00135     argc = 0;
00136
00137     reset(false);
00138
00139     for(int i = 0; i < fromargc; i++)
00140     {
00141         add(fromargv[i]);
00142     }
00143 }
00144
00145 CvsArgs::~CvsArgs()
00146 {
00147     reset(false);
00148 }
00149
00154 void CvsArgs::reset(bool defargs)
00155 {
00156     if( argv != 0L )
00157     {
00158         for(int i = 0; i < argc; i++)
00159         {
00160             if( argv[i] != 0L )
00161                 free(argv[i]);
00162         }
00163
00164         free(argv);
00165     }
00166
00167     argc = 0;
00168     argv = NULL;
00169
00170     if( defargs )
00171     {
00172         int numargs = 1;
00173
00174         if( gCvsPrefs.Z9Option() )
00175             numargs++;
00176
00177         if( gCvsPrefs.QuietOption() )
00178             numargs++;
00179
00180 #if INTERNAL_AUTHEN
00181         AuthenModel* curModel = AuthenModel::GetInstance(gAuthen.kind());
00182         bool encrypt = gCvsPrefs.EncryptCommunication() && curModel->HasEncryption();
00183         if( encrypt )
00184             numargs++;
00185 #else
00186         bool encrypt = gCvsPrefs.EncryptCommunication();
00187         if( encrypt )
00188             numargs++;
00189 #endif /* INTERNAL_AUTHEN */
00190
00191         if( gCvsPrefs.AlwaysUseCvsroot() )
00192             numargs += 2;
00193
00194         argv = (char**)malloc(numargs * sizeof(char*));
00195         argv[argc++] = mystrdup(CVS_CMD);
00196
00197 #if INTERNAL_AUTHEN
00198         if( gCvsPrefs.AlwaysUseCvsroot() )
00199         {
00200             argv[argc++] = mystrdup("-d");
00201             CStr root;
00202             const char* ccvsroot = gCvsPrefs;
00203             ccvsroot = Authen::skiptoken(ccvsroot);
00204             root = gAuthen.token();
00205             root << ccvsroot;
00206             argv[argc++] = mystrdup(root);
00207         }
00208 #endif /* INTERNAL_AUTHEN */
00209
00210         if( gCvsPrefs.Z9Option() )
00211         {
00212             CStr zlev("-z");
00213             zlev << gCvsPrefs.ZLevel();
00214             argv[argc++] = mystrdup(zlev);
00215         }
00216
00217         if( gCvsPrefs.QuietOption() )
00218             argv[argc++] = mystrdup("-q");
00219
00220         if( encrypt )
00221             argv[argc++] = mystrdup("-x");
00222     }
00223 }
00224
00229 void CvsArgs::print(const char* indirectory /*= 0L*/)
00230 {
00231     static CStaticAllocT<char> buf;
00232
00233     for(int i = 0; i < argc; i++)
00234     {
00235         CStr newarg;
00236         newarg = argv[i];
00237         bool hasLF = ::strchr(newarg, '\n') != 0L;
00238         size_t len = newarg.length();
00239
00240         if( len > MAX_PRINT_ARG )
00241             newarg = reduceString(newarg, buf);
00242
00243         if( hasLF )
00244             newarg = expandLF(newarg, buf);
00245
00246         bool hasSpace = ::strchr(newarg, ' ') != 0L;
00247         if( hasSpace )
00248             cvs_out("\"");
00249
00250         cvs_outstr(newarg, newarg.length());
00251
00252         if( hasSpace )
00253             cvs_out("\"");
00254
00255         cvs_out(" ");
00256     }
00257
00258     if( indirectory != NULL && strlen(indirectory) )
00259     {
00260         cvs_out("(in directory %s)", indirectory);
00261     }
00262
00263     cvs_out("\n");
00264 }
00265
00270 void CvsArgs::add(const char* arg)
00271 {
00272     if( argv == 0L )
00273         argv = (char**)malloc(2 * sizeof(char*));
00274     else
00275         argv = (char**)realloc(argv, (argc + 2) * sizeof(char*));
00276
00277     argv[argc++] = arg != 0L ? mystrdup(arg) : 0L;
00278     argv[argc] = 0L;
00279 }
00280
00289 void CvsArgs::addfile(const char* arg, const char* /*dir*/, const UFSSpec* /*spec*/, const char* /*currRevision*/)
00290 {
00291     add(arg);
00292 }
00293
00299 int CvsArgs::parse(const char* arg)
00300 {
00301     int res = 0;
00302
00303     stringstream strArg;
00304     strArg << arg;
00305     string token;
00306
00307     do{
00308         strArg >> token;
00309         if( !token.empty() )
00310         {
00311             res++;
00312             add(token.c_str());
00313         }
00314     }while( !strArg.eof() );
00315
00316     return res;
00317 }
00318
00319 #if INTERNAL_AUTHEN
00320
00321 void CvsArgs::addcvsroot()
00322 {
00323     // Extract from the cvsroot
00324     const char* ccvsroot = gCvsPrefs;
00325     ccvsroot = Authen::skiptoken(ccvsroot);
00326
00327     CStr root;
00328
00329     root = gAuthen.token();
00330     root << ccvsroot;
00331
00332     add("-d");
00333     add(root);
00334 }
00335 #endif /* INTERNAL_AUTHEN */
00336
00338 char* const* CvsArgs::Argv(void) const
00339 {
00340     return argv;
00341 }
00342
00344 int CvsArgs::Argc(void) const
00345 {
00346     return argc;
00347 }
00348
00349
00351 // ControlCvsArgs
00352
00353 void ControlCvsArgs::addfile(const char* arg, const char* dir, const UFSSpec* spec,
00354     const char* currRevision)
00355 {
00356     CvsArgs::addfile(arg, dir, spec);
00357
00358     if( !gCvsPrefs.AddControl() )
00359         return;
00360
00361     kTextBinTYPE state = FileIsType(arg, dir, spec);
00362     switch(state)
00363     {
00364     case kFileIsOK:
00365         break;
00366
00367     case kFileMissing:
00368         // we can resurect a file which is missing by re-adding it
00369         break;
00370
00371     case kFileIsAlias:
00372         cvs_err("Warning : \'%s\' is an alias\n", arg);
00373         SetProblem(true);
00374         break;
00375
00376     case kFileInvalidName:
00377         cvs_err("Warning : \'%s\' has an invalid name\n", arg);
00378         SetProblem(true);
00379         break;
00380
00381     case kTextWrongLF:
00382         cvs_err("Warning : \'%s\' seems to have the wrong line feed for this machine, you should correct it first\n", arg);
00383         SetProblem(true);
00384         break;
00385
00386     case kUnicodeIsBinary: // fall thru intentional
00387     case kTextIsBinary:
00388         cvs_err("Warning : \'%s\' seems to be \'binary\', you should use the \'Add binary\' command instead...\n", arg);
00389         SetProblem(true);
00390         break;
00391
00392     case kTextEscapeChar:
00393 #ifdef TARGET_OS_MAC
00394         if(gCvsPrefs.IsoConvert() == ISO8559_none)
00395         {
00396             cvs_err("Warning : \'%s\' has some escape characters in it (0x00-0x20, 0x80-0xFF),\n", arg);
00397             cvs_err("Warning   so you may need to have the ISO8559 translation option set in the preferences\n");
00398             cvs_err("Warning   before commiting\n");
00399         }
00400 #else /* !TARGET_OS_MAC */
00401         cvs_err("Warning : \'%s\' has some escape characters in it (0x00-0x20, 0x80-0xFF), you should correct it first\n", arg);
00402 #endif /* !TARGET_OS_MAC */
00403         break;
00404
00405     case kTextWrongSig:
00406 #if TARGET_RT_MAC_MACHO
00407         cvs_err("Warning : \'%s\' has a file type different from \'TEXT\' or 0, you should correct it first\n", arg);
00408 #else
00409         cvs_err("Warning : \'%s\' has a file type different from \'TEXT\', you should correct it first\n", arg);
00410 #endif
00411         SetProblem(true);
00412         break;
00413
00414     case kUnicodeIsText: // fall thru intentional
00415     case kBinIsText:
00416         cvs_err("Warning : \'%s\' seems to be a text file, you should consider to use the \'Add selection\' command instead\n", arg);
00417         SetProblem(true);
00418         break;
00419
00420     case kBinWrongSig:
00421         cvs_err("Warning : \'%s\' has a file type of \'TEXT\', you should correct it first\n", arg);
00422         SetProblem(true);
00423         break;
00424
00425     case kTextIsUnicode: // fall thru intentional
00426     case kBinIsUnicode:
00427         cvs_err("Warning : \'%s\' seems to be an Unicode file, you should consider to use the \'Add unicode\' command instead\n", arg);
00428         SetProblem(true);
00429         break;
00430
00431     default:
00432         cvs_err("Warning : \'%s\' has some unknown problems\n", arg);
00433         SetProblem(true);
00434         break;
00435     }
00436 }
00437
00442 bool ControlCvsArgs::HasProblem(void) const
00443 {
00444     return m_gotProblem;
00445 }
00446
00451 void ControlCvsArgs::SetProblem(bool newState)
00452 {
00453     m_gotProblem = newState;
00454 }
00455
00456
00458 // RemoveCvsArgs
00459
00460 void RemoveCvsArgs::addfile(const char* arg, const char* dir, const UFSSpec* spec,
00461     const char* currRevision)
00462 {
00463     CvsArgs::addfile(arg, dir, spec);
00464
00465     CStr fullpath(dir);
00466     if( !fullpath.endsWith(kPathDelimiter) )
00467         fullpath << kPathDelimiter;
00468
00469     fullpath << arg;
00470
00471     // check the file is not already deleted
00472     struct stat sb;
00473     if( stat(dir, &sb) != -1 && S_ISDIR(sb.st_mode) &&
00474         stat(fullpath, &sb) == -1 && errno == ENOENT )
00475     {
00476         return;
00477     }
00478
00479     if( !CompatMoveToTrash(arg, dir, spec) )
00480 #ifdef WIN32
00481         cvs_err("Unable to send '%s' to the recycle bin\n", arg);
00482     else
00483         cvs_out("'%s' has been moved successfully to the recycle bin...\n", arg);
00484 #else
00485         cvs_err("Unable to send '%s' to the trash\n", arg);
00486     else
00487         cvs_out("'%s' has been moved successfully to the trash...\n", arg);
00488 #endif
00489 }
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsToolbar.h Source File

common/UCvsToolbar.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSTOOLBAR_H
00026 #define UCVSTOOLBAR_H
00027
00028 #include "utoolbar.h"
00029
00030 class UCvsToolbar : public UToolbar
00031 {
00032     UDECLARE_DYNAMIC(UCvsToolbar)
00033 public:
00034     UCvsToolbar(int widid);
00035     virtual ~UCvsToolbar();
00036
00037 protected:
00038
00039     ev_msg void OnDestroy();
00040     ev_msg void OnCreate();
00041
00042     UDECLARE_MESSAGE_MAP()
00043 };
00044
00045 void CreateMainToolbar(void);
00046 void CreateBrowseToolbar(void);
00047 void CreateFilterToolbar(void);
00048
00049 #endif
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

LSReport Member List

This is the complete list of members for LSReport, including all inherited members.

EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | LSReport | [inline, virtual]
ExitDirectory(const char *fullpath) | LSReport | [inline, virtual]
fInterp | LSReport |
fState | LSReport |
GetRefRunning() | TraversalReport | [static]
LSReport(Tcl_Interp *interp) | LSReport | [inline]
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | LSReport | [inline, virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnError(const char *err, int errcode) | LSReport | [inline, virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnIdle(const char *fullpath) | LSReport | [inline, virtual]

Generated on Sat Aug 7 22:54:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoFilterMask Member List

This is the complete list of members for KoFilterMask, including all inherited members.

Empty() const | KoFilterMask |
IsMatch(const int type, const EntnodeData *data, const KoColumnContext *context) const | KoFilterMask |
m_mask | KoFilterMask | [private]
m_tokens | KoFilterMask | [private]
SetMask(const char *mask) | KoFilterMask |

Generated on Sat Aug 7 22:54:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTCLBrowserEnt Member List

This is the complete list of members for CTCLBrowserEnt, including all inherited members.

CTCLBrowserEnt() | CTCLBrowserEnt | [inline]
CTCLBrowserEnt(EntnodeData *data) | CTCLBrowserEnt | [inline]
CTCLBrowserEnt(const CTCLBrowserEnt &ent) | CTCLBrowserEnt | [inline]
GetData() const | CTCLBrowserEnt | [inline]
GetNormalized(UStr &path, UStr &fname) const | CTCLBrowserEnt | [inline]
IsSamePath(const char *pathstr) const | CTCLBrowserEnt | [inline]
node | CTCLBrowserEnt | [private]
operator=(const CTCLBrowserEnt &ent) | CTCLBrowserEnt | [inline]
~CTCLBrowserEnt() | CTCLBrowserEnt | [inline]

Generated on Sat Aug 7 22:56:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CUpdateMain Member List

This is the complete list of members for CUpdateMain, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CUpdateMain() | CUpdateMain |
DoDataExchange(CDataExchange *pDX) | CUpdateMain | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CUpdateMain |
InitHelpID() | CUpdateMain | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_createmissdir | CUpdateMain |
m_getcleancopy | CUpdateMain |
m_norecurs | CUpdateMain |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CUpdateMain() | CUpdateMain |

Generated on Sat Aug 7 22:57:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ImportReport Member List

This is the complete list of members for ImportReport, including all inherited members.

conflicts | ImportReport | [private]
EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | ImportReport | [virtual]
ExitDirectory(const char *fullpath) | ImportReport | [virtual]
GetIgnoreList() | ImportReport | [inline]
GetRefRunning() | TraversalReport | [static]
ImportReport(const char *path, ReportWarning *&w, ReportConflict *&c) | ImportReport |
m_ignlist | ImportReport | [private]
m_progress | ImportReport | [private]
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | ImportReport | [virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | ImportReport | [virtual]
OnError(const char *err, int errcode) | ImportReport | [virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | ImportReport | [virtual]
OnIdle(const char *fullpath) | ImportReport | [virtual]
warnings | ImportReport | [private]
~ImportReport() | ImportReport | [virtual]

Generated on Sat Aug 7 22:53:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CDiff_Options::CompareInfo Member List

This is the complete list of members for CDiff_Options::CompareInfo, including all inherited members.

m_asc | CDiff_Options::CompareInfo
m_column | CDiff_Options::CompareInfo

Generated on Sat Aug 7 22:51:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CAnnotate_MAIN Member List

This is the complete list of members for CAnnotate_MAIN, including all inherited members.

CAnnotate_MAIN(const MultiFiles *mf, kAnnotateCmdType annotateType, const char *rev, bool isDate) | CAnnotate_MAIN |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CAnnotate_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CAnnotate_MAIN |
InitHelpID() | CAnnotate_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_annotateType | CAnnotate_MAIN | [private]
m_browseTagButton | CAnnotate_MAIN |
m_force | CAnnotate_MAIN |
m_forceCheck | CAnnotate_MAIN |
m_hasRev | CAnnotate_MAIN |
m_hasRevCheck | CAnnotate_MAIN |
m_isDate | CAnnotate_MAIN |
m_isDateCheck | CAnnotate_MAIN |
m_mf | CAnnotate_MAIN | [private]
m_noRecurse | CAnnotate_MAIN |
m_noRecurseCheck | CAnnotate_MAIN |
m_rev | CAnnotate_MAIN |
m_revCombo | CAnnotate_MAIN |
OnBrowseTag() | CAnnotate_MAIN | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CAnnotate_MAIN | [protected, virtual]
OnIsdate() | CAnnotate_MAIN | [protected]
OnSpecifyRev() | CAnnotate_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CAnnotate_MAIN() | CAnnotate_MAIN |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:48:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJStatusBar Member List

This is the complete list of members for CCJStatusBar, including all inherited members.

AddControl(CWnd *pWnd, int nPaneID, BOOL bAutodeleteControl=TRUE) | CCJStatusBar | [virtual]
AddIndicator(int position, UINT paneID) | CCJStatusBar | [virtual]
CCJStatusBar() | CCJStatusBar |
GetPanControl(int nPaneID) | CCJStatusBar | [virtual]
GetStatusPane(int nIndex, CCJStatusBarPane &xfxpane) | CCJStatusBar | [virtual]
m_aPans | CCJStatusBar | [private]
OnSize(UINT nType, int cx, int cy) | CCJStatusBar | [protected]
PositionControls() | CCJStatusBar | [virtual]
RemovePane(int nPaneID) | CCJStatusBar | [virtual]
SetPaneWidth(int index, int cxWidth) | CCJStatusBar | [virtual]
~CCJStatusBar() | CCJStatusBar | [virtual]

Generated on Sat Aug 7 22:50:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMenu.h Source File

WinCvs/CJLib/Include/CJMenu.h

Go to the documentation of this file.
00001 //*************************************************************************
00002 // CJMenu.h : header file
00003 // Version : 2.5
00004 // Date : October 18, 1999
00005 // Author : Brent Corkum
00006 //
00007 // Portions of code supplied by:
00008 // Ben Ashley,Girish Bharadwaj,Jean-Edouard Lachand-Robert,
00009 // Robert Edward Caldecott,Kenny Goers,Leonardo Zide,
00010 // Stefan Kuhr, Reiner Jung
00011 //
00012 // Bug Fixes:
00013 // Stefan Kuhr,Martin Vladic,Kim Yoo Chul
00014 //
00015 // You are free to use/modify this code but leave this header intact.
00016 //
00018 /****************************************************************************
00019  *
00020  * $Date: 2002/01/05 16:46:43 $
00021  * $Revision: 1.2 $
00022  * $Archive: /CodeJock/Include/CJMenu.h $
00023  *
00024  * $History: CJMenu.h $
00025  *
00026  * *****************  Version 6  *****************
00027  * User: Kirk Stowell Date: 10/24/99   Time: 2:09a
00028  * Updated in $/CodeJock/Include
00029  * Upgraded to version 2.5 of BCMenu
00030  *
00031  * *****************  Version 5  *****************
00032  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00033  * Updated in $/CodeJock/Include
00034  * Added source control history to file header.
00035  *
00036  ***************************************************************************/
00038
00039 #ifndef __CJMENU_H__
00040 #define __CJMENU_H__
00041
00042 #include <afxtempl.h>
00043
00044 // CCJMenuData class. Fill this class structure to define a single menu item:
00045
00046 class _CJX_EXT_CLASS CCJMenuData
00047 {
00048     wchar_t *m_szMenuText;
00049 public:
00050     CCJMenuData () {menuIconNormal=-1;xoffset=-1;bitmap=NULL;
00051     nFlags=0;nID=0;syncflag=0;m_szMenuText=NULL;};
00052     void SetAnsiString(LPCSTR szAnsiString);
00053     void SetWideString(const wchar_t *szWideString);
00054     const wchar_t *GetWideString(void) {return m_szMenuText;};
00055     ~CCJMenuData ();
00056     CString GetString(void);//returns the menu text in ANSI or UNICODE
00057     int xoffset;
00058     int menuIconNormal;
00059     UINT nFlags,nID,syncflag;
00060     CImageList *bitmap;
00061 };
00062
00063 //struct CMenuItemInfo : public MENUITEMINFO {
00064 struct _CJX_EXT_CLASS CMenuItemInfo : public
00065 //MENUITEMINFO
00066 #ifndef UNICODE   //SK: this fixes warning C4097: typedef-name 'MENUITEMINFO' used as synonym for class-name 'tagMENUITEMINFOA'
00067 tagMENUITEMINFOA
00068 #else
00069 tagMENUITEMINFOW
00070 #endif
00071     {
00072     CMenuItemInfo()
00073     { memset(this, 0, sizeof(MENUITEMINFO));
00074       cbSize = sizeof(MENUITEMINFO);
00075     }
00076 };
00077
00078 typedef enum {Normal,TextOnly} HIGHLIGHTSTYLE;
00079
00080 #ifndef UNICODE
00081 #define AppendMenu AppendMenuA
00082 #define InsertMenu InsertMenuA
00083 #define InsertODMenu InsertODMenuA
00084 #define AppendODMenu AppendODMenuA
00085 #define AppendODPopupMenu AppendODPopupMenuA
00086 #define ModifyODMenu ModifyODMenuA
00087 #else
00088 #define AppendMenu AppendMenuW
00089 #define InsertMenu InsertMenuW
00090 #define InsertODMenu InsertODMenuW
00091 #define AppendODMenu AppendODMenuW
00092 #define ModifyODMenu ModifyODMenuW
00093 #define AppendODPopupMenu AppendODPopupMenuW
00094 #endif
00095
00096 class _CJX_EXT_CLASS CCJMenu : public CMenu  // Derived from CMenu
00097 {
00098     // Construction
00099 public:
00100     CCJMenu();
00101
00102     // Attributes
00103 protected:
00104     CTypedPtrArray<CPtrArray, CCJMenuData*> m_MenuList;  // Stores list of menu items
00105
00106     // When loading an owner-drawn menu using a Resource, CCJMenu must keep track of
00107     // the popup menu's that it creates. Warning, this list *MUST* be destroyed
00108     // last item first :)
00109     CTypedPtrArray<CPtrArray, HMENU>  m_SubMenus;  // Stores list of sub-menus
00110
00111     // Stores a list of all CCJMenu's ever created
00112     static CTypedPtrArray<CPtrArray, HMENU>  m_AllSubMenus;
00113
00114     // Operations
00115 public:
00116     // Overrides
00117     // ClassWizard generated virtual function overrides
00118     //{{AFX_VIRTUAL(CCustomMenu)
00119     //}}AFX_VIRTUAL
00120     // Implementation
00121 public:
00122     static BOOL IsNewShell(void);
00123     void SetBitmapBackground(COLORREF color);
00124     void SetDisableOldStyle(void);
00125     void UnSetDisableOldStyle(void);
00126     BOOL GetDisableOldStyle(void);
00127     void UnSetBitmapBackground(void);
00128     BOOL AddBitmapToImageList(CImageList *list,UINT nResourceID);
00129     BOOL LoadFromToolBar(UINT nID,UINT nToolBar,int& xoffset);
00130     void InsertSpaces(void);
00131     static LRESULT FindKeyboardShortcut(UINT nChar,UINT nFlags,CMenu *pMenu);
00132     static void UpdateMenu(CMenu *pmenu);
00133     static BOOL IsMenu(CMenu *submenu);
00134     static BOOL IsMenu(HMENU submenu);
00135     void DrawCheckMark(CDC *pDC,int x,int y,COLORREF color);
00136     void DrawRadioDot(CDC *pDC,int x,int y,COLORREF color);
00137     CCJMenu *FindMenuOption(int nId,int& nLoc);
00138     CCJMenuData *FindMenuOption(wchar_t *lpstrText);
00139     BOOL GetMenuText(UINT id,CString &string,UINT nFlags = MF_BYPOSITION );
00140     CImageList *checkmaps;
00141     BOOL checkmapsshare;
00142     int m_selectcheck;
00143     int m_unselectcheck;
00144     void LoadCheckmarkBitmap(int unselect,int select);
00145     void DitherBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth,
00146         int nHeight, HBITMAP hbm, int nXSrc, int nYSrc);
00147     void DitherBlt2(CDC *drawdc, int nXDest, int nYDest, int nWidth,
00148         int nHeight, CBitmap &bmp, int nXSrc, int nYSrc);
00149     static HBITMAP LoadSysColorBitmap(int nResourceId);
00150     BOOL GetBitmapFromImageList(CDC* pDC,CImageList *imglist,int nIndex,CBitmap &bmp);
00151
00152     virtual ~CCJMenu();  // Virtual Destructor
00153     // Drawing:
00154     virtual void DrawItem( LPDRAWITEMSTRUCT);  // Draw an item
00155     virtual void MeasureItem( LPMEASUREITEMSTRUCT );  // Measure an item
00156
00157     // Customizing:
00158
00159     void SetIconSize (int, int);  // Set icon size
00160
00161     BOOL AppendODMenuA(LPCSTR lpstrText,
00162         UINT nFlags = MF_OWNERDRAW,
00163         UINT nID = 0,
00164         int nIconNormal = -1);
00165
00166     BOOL AppendODMenuW(wchar_t *lpstrText,
00167         UINT nFlags = MF_OWNERDRAW,
00168         UINT nID = 0,
00169         int nIconNormal = -1);
00170
00171     BOOL AppendODMenuA(LPCSTR lpstrText,
00172         UINT nFlags,
00173         UINT nID,
00174         CImageList *il,
00175         int xoffset);
00176
00177     BOOL AppendODMenuW(wchar_t *lpstrText,
00178         UINT nFlags,
00179         UINT nID,
00180         CImageList *il,
00181         int xoffset);
00182
00183     BOOL AppendMenu( UINT nFlags, UINT nIDNewItem = 0, LPCTSTR lpszNewItem = NULL )
00184         { return CMenu::AppendMenu( nFlags, nIDNewItem, lpszNewItem ); }
00185
00186     BOOL AppendMenu( UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp )
00187         { return CMenu::AppendMenu( nFlags, nIDNewItem, pBmp ); }
00188
00189     BOOL InsertODMenuA(UINT nPosition,
00190         LPCSTR lpstrText,
00191         UINT nFlags = MF_OWNERDRAW,
00192         UINT nID = 0,
00193         int nIconNormal = -1);
00194
00195     BOOL InsertODMenuW(UINT nPosition,
00196         wchar_t *lpstrText,
00197         UINT nFlags = MF_OWNERDRAW,
00198         UINT nID = 0,
00199         int nIconNormal = -1);
00200
00201     BOOL InsertODMenuA(UINT nPosition,
00202         LPCSTR lpstrText,
00203         UINT nFlags,
00204         UINT nID,
00205         CImageList *il,
00206         int xoffset);
00207
00208     BOOL InsertODMenuW(UINT nPosition,
00209         wchar_t *lpstrText,
00210         UINT nFlags,
00211         UINT nID,
00212         CImageList *il,
00213         int xoffset);
00214
00215     BOOL ModifyODMenuA(const char *lpstrText,UINT nID=0,int nIconNormal=-1);
00216     BOOL ModifyODMenuA(const char *lpstrText,UINT nID,CImageList *il,int xoffset);
00217     BOOL ModifyODMenuA(const char *lpstrText,UINT nID,CBitmap *bmp);
00218     BOOL ModifyODMenuA(const char *lpstrText,const char *OptionText,int nIconNormal);
00219     BOOL ModifyODMenuW(wchar_t *lpstrText,UINT nID=0,int nIconNormal=-1);
00220     BOOL ModifyODMenuW(wchar_t *lpstrText,UINT nID,CImageList *il,int xoffset);
00221     BOOL ModifyODMenuW(wchar_t *lpstrText,UINT nID,CBitmap *bmp);
00222     BOOL ModifyODMenuW(wchar_t *lpstrText,wchar_t *OptionText,int nIconNormal);
00223     CCJMenuData *NewODMenu(UINT pos,UINT nFlags,UINT nID,CString string);
00224     void SynchronizeMenu(void);
00225     void InitializeMenuList(int value);
00226     void DeleteMenuList(void);
00227     CCJMenuData *FindMenuList(UINT nID);
00228     virtual BOOL LoadMenu(LPCTSTR lpszResourceName);  // Load a menu
00229     virtual BOOL LoadMenu(int nResource);  // ...
00230     void AddFromToolBar(CToolBar* pToolBar, int nResourceID);
00231     BOOL Draw3DCheckmark(CDC *dc, const CRect& rc,BOOL bSelected,
00232         HBITMAP hbmCheck);
00233     BOOL LoadToolbar(UINT nToolBar);
00234     BOOL LoadToolbars(const UINT *arID,int n);
00235
00236     // new overrides for dynamic menu's
00237     BOOL    RemoveMenu(UINT uiId,UINT nFlags);
00238     BOOL    DeleteMenu(UINT uiId,UINT nFlags);
00239     BOOL  AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,int nIconNormal=-1);
00240     BOOL  AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset);
00241     BOOL  AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CBitmap *bmp);
00242     BOOL  AppendMenuW(UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,int nIconNormal=-1);
00243     BOOL  AppendMenuW(UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CImageList *il,int xoffset);
00244     BOOL  AppendMenuW(UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CBitmap *bmp);
00245     BOOL  InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,int nIconNormal=-1);
00246     BOOL  InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset);
00247     BOOL  InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CBitmap *bmp);
00248     BOOL  InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,int nIconNormal=-1);
00249     BOOL  InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CImageList *il,int xoffset);
00250     BOOL  InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CBitmap *bmp);
00251     CCJMenu* AppendODPopupMenuA(LPCSTR lpstrText);
00252     CCJMenu* AppendODPopupMenuW(wchar_t *lpstrText);
00253
00254     // Destoying:
00255
00256     virtual BOOL DestroyMenu();
00257
00258     // Generated message map functions
00259 protected:
00260     int m_iconX,m_iconY;
00261     COLORREF m_bitmapBackground;
00262     BOOL m_bitmapBackgroundFlag;
00263     BOOL disable_old_style;
00264 };
00265
00266 #endif
00267
00268 //*************************************************************************
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/res/resrc1.h Source File

WinCvs/res/resrc1.h

Go to the documentation of this file.
00001 //{{NO_DEPENDENCIES}}
00002 // Microsoft Developer Studio generated include file.
00003 // Used by wincvs2.rc
00004 //
00005
00006 // Next default values for new objects
00007 //
00008 #ifdef APSTUDIO_INVOKED
00009 #ifndef APSTUDIO_READONLY_SYMBOLS
00010 #define _APS_3D_CONTROLS                     1
00011 #define _APS_NEXT_RESOURCE_VALUE        131
00012 #define _APS_NEXT_COMMAND_VALUE         32790
00013 #define _APS_NEXT_CONTROL_VALUE         1008
00014 #define _APS_NEXT_SYMED_VALUE           101
00015 #endif
00016 #endif
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/VolsPaths.c Source File

common/VolsPaths.c

Go to the documentation of this file.
00001 /*
00002  * Stollen from POV and added to MacCVS by
00003  * Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00004  */
00005
00006 /*==============================================================================
00007 Project:    POV-Ray
00008
00009 Version:    3
00010
00011 File:   VolsPaths.c
00012
00013 Description:
00014     Various volume and pathname handling routines.
00015 ------------------------------------------------------------------------------
00016 Author:
00017     Eduard [esp] Schwan
00018 ------------------------------------------------------------------------------
00019     from Persistence of Vision(tm) Ray Tracer
00020     Copyright 1996 Persistence of Vision Team
00021 ------------------------------------------------------------------------------
00022     NOTICE: This source code file is provided so that users may experiment
00023     with enhancements to POV-Ray and to port the software to platforms other
00024     than those supported by the POV-Ray Team.  There are strict rules under
00025     which you are permitted to use this file.  The rules are in the file
00026     named POVLEGAL.DOC which should be distributed with this file. If
00027     POVLEGAL.DOC is not available or for more info please contact the POV-Ray
00028     Team Coordinator by leaving a message in CompuServe's Graphics Developer's
00029     Forum.  The latest version of POV-Ray may be found there as well.
00030
00031     This program is based on the popular DKB raytracer version 2.12.
00032     DKBTrace was originally written by David K. Buck.
00033     DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
00034 ------------------------------------------------------------------------------
00035 Change History:
00036     941221  [esp]   Created
00037 ==============================================================================*/
00038
00039 #define VOLSPATHS_C
00040
00041 /*==== my header =====*/
00042 #include "VolsPaths.h"
00043
00044
00045 /*==== Macintosh-specific headers ====*/
00046 #include <Types.h>
00047 #include <Files.h>
00048 #include <Resources.h>
00049 #include <errors.h>         /* dupFNErr, etc */
00050 #include <Memory.h>         /* NewPtr, etc */
00051 #include <string.h>         /* strcpy/cat */
00052 #include <strings.h>        /* p2cstr */
00053 #include <TextUtils.h>      /* Munger */
00054
00055
00056 /*==== Standard C headers ====*/
00057
00058
00059 /*==== General definitions ====*/
00060
00061
00062 /*==== Global variables (external scope) ====*/
00063
00064
00065 /*==== Global variables (local scope) ====*/
00066
00067
00068 // ---------------------------------------------------------------------
00069 // VRef2VolName
00070 // ---------------------------------------------------------------------
00071 OSErr VRef2VolName(short theVRef, StringPtr theVolName)
00072 {
00073     OSErr           anError;
00074     HVolumeParam    pbVInfo;
00075
00076     pbVInfo.ioCompletion = NULL;
00077     theVolName[0] = '\0';
00078     pbVInfo.ioNamePtr = theVolName;
00079     pbVInfo.ioVRefNum = theVRef;
00080     pbVInfo.ioVolIndex = 0; // use VRefNum only
00081     anError = PBHGetVInfoSync((HParmBlkPtr)&pbVInfo);
00082
00083     return anError;
00084 } // VRef2VolName
00085
00086
00087 // ---------------------------------------------------------------------
00088 // VolName2VRef
00089 // ---------------------------------------------------------------------
00090 OSErr VolName2VRef(StringPtr myPVolName, short * theVRefPtr)
00091 {
00092     OSErr           anError = noErr;
00093     Boolean         foundIt = false;
00094     short           theDriveNum;
00095     short           theVRefNum;
00096     HParamBlockRec  aParamBlk;
00097     char            myCVolName[32], theCVolName[32];
00098     Str31           theVolName;
00099
00100     // convert passed vol name from P 2 C string for compare
00101     p2cstrcpy(myCVolName, myPVolName);
00102
00103     // loop through all mounted volumes, see if myPVolName matches one
00104     for (theDriveNum = 1; !foundIt && (anError==noErr); theDriveNum++)
00105     {
00106         theVolName[0] = '\0';
00107         aParamBlk.volumeParam.ioNamePtr = (StringPtr)&theVolName;
00108         aParamBlk.volumeParam.ioVolIndex = theDriveNum;
00109
00110         anError = PBHGetVInfoSync((HParmBlkPtr)&aParamBlk);
00111         if (anError == noErr)
00112         {
00113             p2cstrcpy(theCVolName, theVolName);
00114             if (strcmp(theCVolName, myCVolName)==0)
00115             {
00116                 foundIt = true;
00117                 theVRefNum = aParamBlk.volumeParam.ioVRefNum;
00118             }
00119         }
00120     }
00121
00122     if (foundIt)
00123         *theVRefPtr = theVRefNum;
00124     else
00125         *theVRefPtr = 0;
00126
00127     if (anError == nsvErr) // no such vol, just bumped end of volume list
00128         anError = noErr;
00129
00130     return anError;
00131 } // VolName2VRef
00132
00133
00134 // ---------------------------------------------------------------------
00135 // PathNameFromDirID
00136 // ---------------------------------------------------------------------
00137 /*
00138 Function:   PathNameFromDirID
00139
00140 Parameters:
00141     aDirID      the directory ID to start at
00142     avRefNum    the volume ref # to start at
00143     aPathStyle  The style of pathname to format (based on OS)
00144     aPath       the final path string is placed in this buffer
00145
00146 Return Value:
00147     zero is returned if OK, else an error is returned
00148
00149 Purpose/Description:
00150     PathNameFromDirID takes a real vRefNum and a DirID and returns
00151     the full pathname that corresponds to it.  It does this by calling
00152     _PBGetCatInfo for the given directory and finding out its name and
00153     the DirID of its parent. It then performs the same operation on the
00154     parent, sticking its name onto the beginning of the first directory.
00155     This whole process is continued until we have processed everything up
00156     to the root directory (identified with a DirID of 2).
00157 */
00158 OSErr PathNameFromDirID(const long          aDirID,
00159                         const short         avRefNum,
00160                         char                * aPath)
00161 {
00162     Handle      strHandle = NULL;
00163     OSErr       anError = noErr;
00164     long        currDirID = 0,
00165                 nextDirID = 0;
00166     Size        theLen = 0;     // GetHandleSize
00167     char        tempName[64];   // directory or volume name
00168     CInfoPBRec  aPBblock;
00169
00170     /* create an empty string handle for Munger */
00171     strHandle = NewHandle(0);
00172
00173     if (strHandle == NULL)
00174     {
00175         anError = MemError();
00176     }
00177     else
00178     {
00179         *aPath = '\0';
00180         aPBblock.dirInfo.ioCompletion   = NULL;
00181         aPBblock.dirInfo.ioNamePtr      = (StringPtr)tempName;  // temp destination buffer
00182         nextDirID                       = aDirID;   // start at DirID passed in..
00183
00184         /* walk up the directories, collecting dir names as we go, until we hit the top (volname) */
00185         do {
00186
00187             aPBblock.dirInfo.ioVRefNum      = avRefNum;
00188             aPBblock.dirInfo.ioFDirIndex    = -1; // ignore ioNamePtr input, use ioDirID
00189             aPBblock.dirInfo.ioDrDirID      = nextDirID;
00190
00191             anError = PBGetCatInfoSync(&aPBblock);
00192             currDirID   = aPBblock.dirInfo.ioDrDirID;   // remember current
00193             nextDirID   = aPBblock.dirInfo.ioDrParID;   // find parent for next loop
00194
00195             if (anError != noErr)
00196                 break;
00197
00198             /* Insert a separator in front of the Directory Entry */
00199             Munger(strHandle, 0L, NULL, 0L, ":", 1L);
00200
00201             /* Insert the next directory/volume name into the front of the string */
00202             Munger(strHandle, 0L, NULL, 0L, &(tempName[1]), (long)tempName[0]);
00203
00204             /* NOTE: fsRtDirID is defined in Files.h */
00205         } while (currDirID != fsRtDirID);
00206
00207         /* now move the string into the parameter */
00208         theLen = GetHandleSize(strHandle);
00209         if (!anError && theLen)
00210         {
00211             BlockMove(&(**strHandle), aPath, theLen);
00212             anError = MemError();
00213         }
00214         aPath[theLen] = '\0';   /* set C string length */
00215
00216         /* dispose of temp storage */
00217         DisposeHandle(strHandle);
00218
00219     } /*else NULL*/
00220
00221     return(anError);
00222
00223 } /* PathNameFromDirID */
00224
00225
00226 // ---------------------------------------------------------------------
00227 // PathNameFromWD
00228 // ---------------------------------------------------------------------
00229 /*
00230 Function:   PathNameFromWD
00231
00232 Parameters:
00233     avRefNum    the volume ref # to start at (Assumes WD is set)
00234     aPathStyle  The style of pathname to format (based on OS)
00235     aPath       the final path string is placed in this buffer
00236
00237 Return Value:
00238     Describe the value returned, or void
00239
00240 Purpose/Description:
00241     PathNameFromWD takes an HFS Working Directory ID and returns
00242     the full pathname that corresponds to it.  It does this by calling
00243     _PBGetWDInfo to get the vRefNum and DirID of the real directory.
00244     It then calls PathNameFromDirID and returns its result.
00245 */
00246 #if !TARGET_API_MAC_CARBON
00247 OSErr PathNameFromWD(   const short         avRefNum,
00248                         char                * aPath)
00249 {
00250     WDPBRec aPBblock;
00251     OSErr   anError = noErr;
00252
00253 /*
00254  PBGetWDInfo has a bug under A/UX 1.1.  If vRefNum is a real vRefNum
00255  and not a wdRefNum, then it returns garbage.  Since A/UX has only 1
00256  volume (in the Macintosh sense) and only 1 root directory, this can
00257  occur only when a file has been selected in the root directory (/).
00258  So we look for this and hard code the DirID and vRefNum.
00259  */
00260 #if defined(AUX)
00261     if ((aPathStyle == ePathTypeAUX) && (avRefNum == -1))
00262     {
00263         anError = PathNameFromDirID(fsRtDirID, -1, aPath);
00264     }
00265     else
00266 #endif
00267     {
00268         aPBblock.ioCompletion = NULL;
00269         aPBblock.ioNamePtr = NULL;
00270         aPBblock.ioVRefNum = avRefNum;
00271         aPBblock.ioWDIndex = 0;
00272         aPBblock.ioWDProcID = 0;
00273
00274         /* Change the Working Directory number in vRefnum into a real vRefnum */
00275         /* and DirID. The real vRefnum is returned in ioVRefnum, and the real */
00276         /* DirID is returned in ioWDDirID. */
00277
00278         anError = PBGetWDInfoSync(&aPBblock);
00279         if (anError == noErr)
00280             anError = PathNameFromDirID(aPBblock.ioWDDirID,
00281                                         aPBblock.ioWDVRefNum,
00282                                         aPath);
00283     }
00284
00285     return(anError);
00286
00287 } /* PathNameFromWD */
00288 #endif
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJFlatTabCtrl Member List

This is the complete list of members for CCJFlatTabCtrl, including all inherited members.

CCJFlatTabCtrl() | CCJFlatTabCtrl |
CreateTabFont(const int iTabHeight) | CCJFlatTabCtrl | [private]
DeleteAllItems() | CCJFlatTabCtrl | [virtual]
DeleteItem(int nItem) | CCJFlatTabCtrl | [virtual]
DrawTab(CDC &dc, const int x, const int y, const int iHeight, bool bSelected, bool bBottom, LPCTSTR lpszTab) const | CCJFlatTabCtrl | [private]
EnableButtons(void) | CCJFlatTabCtrl | [private]
GetCurSel() const | CCJFlatTabCtrl | [inline, virtual]
GetItemCount() const | CCJFlatTabCtrl | [inline, virtual]
GetItemRect(int nItem, LPRECT lpRect) | CCJFlatTabCtrl | [virtual]
GetTabWidth(const int nItem) const | CCJFlatTabCtrl | [private]
GetTipText(int nItem) | CCJFlatTabCtrl | [virtual]
GetTotalArrowWidth(void) const | CCJFlatTabCtrl | [private]
GetTotalTabWidth(void) const | CCJFlatTabCtrl | [private]
HitTest(TCHITTESTINFO *pHitTestInfo) const | CCJFlatTabCtrl | [virtual]
Home() | CCJFlatTabCtrl | [virtual]
InsertItem(const int nItem, LPCTSTR lpszItem) | CCJFlatTabCtrl | [virtual]
InvalidateTabs(void) | CCJFlatTabCtrl | [private]
m_bHasArrows | CCJFlatTabCtrl | [private]
m_bHasHomeEnd | CCJFlatTabCtrl | [private]
m_BoldFont | CCJFlatTabCtrl | [private]
m_bTabsOnBottom | CCJFlatTabCtrl | [private]
m_Font | CCJFlatTabCtrl | [private]
m_hEndArrow | CCJFlatTabCtrl | [private]
m_hEndArrowDisabled | CCJFlatTabCtrl | [private]
m_hHomeArrow | CCJFlatTabCtrl | [private]
m_hHomeArrowDisabled | CCJFlatTabCtrl | [private]
m_hLeftArrow | CCJFlatTabCtrl | [private]
m_hLeftArrowDisabled | CCJFlatTabCtrl | [private]
m_hRightArrow | CCJFlatTabCtrl | [private]
m_hRightArrowDisabled | CCJFlatTabCtrl | [private]
m_iClientHeight | CCJFlatTabCtrl | [private]
m_iClientWidth | CCJFlatTabCtrl | [private]
m_iCurSel | CCJFlatTabCtrl | [private]
m_iTotalTabWidth | CCJFlatTabCtrl | [private]
m_iXOffset | CCJFlatTabCtrl | [private]
m_pEndButton | CCJFlatTabCtrl | [private]
m_pHomeButton | CCJFlatTabCtrl | [private]
m_pLeftButton | CCJFlatTabCtrl | [private]
m_pRightButton | CCJFlatTabCtrl | [private]
m_TabList | CCJFlatTabCtrl | [private]
m_TabTipList | CCJFlatTabCtrl | [private]
m_ToolTip | CCJFlatTabCtrl | [private]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJFlatTabCtrl | [protected]
OnEndArrow() | CCJFlatTabCtrl | [protected]
OnHomeArrow() | CCJFlatTabCtrl | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJFlatTabCtrl | [protected]
OnLeftArrow() | CCJFlatTabCtrl | [protected]
OnPaint() | CCJFlatTabCtrl | [protected]
OnRightArrow() | CCJFlatTabCtrl | [protected]
OnSize(UINT nType, int cx, int cy) | CCJFlatTabCtrl | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCJFlatTabCtrl | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CCJFlatTabCtrl | [protected, virtual]
SetCurSel(int nItem) | CCJFlatTabCtrl | [virtual]
SetTipText(int nItem, LPCTSTR lpszTabTip) | CCJFlatTabCtrl | [virtual]
~CCJFlatTabCtrl() | CCJFlatTabCtrl | [virtual]

Generated on Sat Aug 7 22:49:15 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PyColorConsole Member List

This is the complete list of members for PyColorConsole, including all inherited members.

_Print(obj_t *self, PyObject *args) | PyColorConsole | [inline, protected, static]
Create(PyObject *selfptr, PyObject *args) | PyColorConsole | [static]
dealloc(obj_t *self) | PyColorConsole | [static]
False() | PyContainer | [inline, static]
FindMethod(PyObject *self, char *name) | PyColorConsole | [inline, static]
GetAttr(char *name) | PyContainer | [inline, virtual]
getattr(obj_t *self, char *name) | PyColorConsole | [static]
GetType(void) | PyColorConsole | [inline, static]
InitValues(PyObject *d) | PyColorConsole | [static]
m_console | PyColorConsole | [protected]
m_doc | PyColorConsole | [static]
m_methods | PyColorConsole | [static]
m_registry | PyColorConsole | [static]
New(void) | PyColorConsole | [static]
Print(PyObject *args) | PyColorConsole |
PyColorConsole() | PyColorConsole | [inline]
PyContainer() | PyContainer | [inline]
RegisterValue(PyObject *d, char *name, int value) | PyContainer | [static]
True() | PyContainer | [inline, static]
Void() | PyContainer | [inline, static]
~PyColorConsole() | PyColorConsole | [inline, virtual]
~PyContainer() | PyContainer | [inline, virtual]

Generated on Sat Aug 7 22:55:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphFrm.h Source File

WinCvs/GraphFrm.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // GraphFrm.h : interface of the CGraphFrame class
00022 //
00024
00025 #if !defined(AFX_GRAPHFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_)
00026 #define AFX_GRAPHFRM_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 class CGraphFrame : public CCJMDIChildWnd
00033 {
00034     DECLARE_DYNCREATE(CGraphFrame)
00035 public:
00036     CGraphFrame();
00037
00038 // Attributes
00039 public:
00040
00041 // Operations
00042 public:
00043
00044 // Overrides
00045     // ClassWizard generated virtual function overrides
00046     //{{AFX_VIRTUAL(CGraphFrame)
00047     virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00048     //}}AFX_VIRTUAL
00049
00050 // Implementation
00051 public:
00052     virtual ~CGraphFrame();
00053
00054 #ifdef _DEBUG
00055     virtual void AssertValid() const;
00056     virtual void Dump(CDumpContext& dc) const;
00057 #endif
00058
00059 // Generated message map functions
00060 protected:
00061
00062     //{{AFX_MSG(CGraphFrame)
00063         // NOTE - the ClassWizard will add and remove member functions here.
00064         //    DO NOT EDIT what you see in these blocks of generated code!
00065     //}}AFX_MSG
00066     DECLARE_MESSAGE_MAP()
00067 };
00068
00070
00071 //{{AFX_INSERT_LOCATION}}
00072 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00073
00074 #endif // !defined(AFX_GRAPH_H__09F456BF_0018_11D2_BCAA_000000000000__INCLUDED_)
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSortHeaderCtrl Member List

This is the complete list of members for CSortHeaderCtrl, including all inherited members.

CSortHeaderCtrl() | CSortHeaderCtrl |
DrawItem(const UINT itemID, const RECT rcItem, const BOOL bSelected, const BOOL bSortCol, const BOOL bSortAsc, const HDC hDC) | CSortHeaderCtrl | [private]
EnableHeaderFilters(const BOOL enable=TRUE) | CSortHeaderCtrl |
GetFilterText(const int intItem) | CSortHeaderCtrl |
GetNotificationManager() | CSortHeaderCtrl |
m_bHeaderFilters | CSortHeaderCtrl | [private]
m_bSortAsc | CSortHeaderCtrl | [private]
m_nLastFilterChanged | CSortHeaderCtrl | [private]
m_notificationManager | CSortHeaderCtrl | [private]
m_nSortCol | CSortHeaderCtrl | [private]
m_strLastInsertedFilterText | CSortHeaderCtrl | [private]
OnCustomdraw(NMHDR *pNMHDR, LRESULT *pResult) | CSortHeaderCtrl | [protected]
OnFilterBtnClicked(NMHDR *pNMHDR, LRESULT *pResult) | CSortHeaderCtrl | [protected]
OnFilterChanged(NMHDR *pNMHDR, LRESULT *pResult) | CSortHeaderCtrl | [protected]
OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) | CSortHeaderCtrl | [protected]
OnKillFocus(CWnd *pNewWnd) | CSortHeaderCtrl | [protected]
ResetLastFilter() | CSortHeaderCtrl | [private]
SetFilterChangeTimeout(const int nFilterChangeTimeout) | CSortHeaderCtrl |
SetFilterText(const int intItem, const char *text) | CSortHeaderCtrl |
SetSortImage(const int nCol, const BOOL bAsc) | CSortHeaderCtrl |
~CSortHeaderCtrl() | CSortHeaderCtrl | [virtual]

Generated on Sat Aug 7 22:56:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMsg Member List

This is the complete list of members for CMsg, including all inherited members.

CMsg(int wid, int ev, int arg1, void *arg2) | CMsg | [inline]
CMsg() | CMsg | [inline]
CMsg(const CMsg &msg) | CMsg | [inline]
m_arg1 | CMsg |
m_arg2 | CMsg |
m_ev | CMsg |
m_wid | CMsg |
operator=(const CMsg &msg) | CMsg | [inline]

Generated on Sat Aug 7 22:55:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CRevisionConsole Member List

This is the complete list of members for CRevisionConsole, including all inherited members.

CCvsStreamConsole(FILE *fileOut=0L, bool autoClose=true) | CCvsStreamConsole |
CRevisionConsole() | CRevisionConsole |
cvs_err(const char *txt, long len) | CCvsStreamConsole | [virtual]
cvs_out(const char *txt, long len) | CCvsStreamConsole | [virtual]
Init(LPCTSTR path, LPCTSTR fname) | CRevisionConsole |
IsModeSet() const | CCvsStreamConsole | [protected, virtual]
m_autoClose | CCvsStreamConsole | [protected]
m_fileOut | CCvsStreamConsole | [protected]
m_modeSet | CCvsStreamConsole | [protected]
Open(const char *fileName) | CCvsStreamConsole | [virtual]
SetMode(bool binary) | CCvsStreamConsole | [protected, virtual]
~CCvsStreamConsole() | CCvsStreamConsole | [virtual]

Generated on Sat Aug 7 22:56:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CvsAlert Member List

This is the complete list of members for CvsAlert, including all inherited members.

CvsAlert(const kCvsAlertIconType icon, const char *message, const char *messageDetails=NULL, const char *okButtonTitle=_T("OK"), const char *cancelButtonTitle=_T("Cancel")) | CvsAlert |
GetAlertTitle() const | CvsAlert |
GetButtonTitle(const kCvsAlertButtonType buttonType) const | CvsAlert |
GetHideOption() const | CvsAlert |
GetIcon() const | CvsAlert |
GetMessage() const | CvsAlert |
GetMessageDetails() const | CvsAlert |
m_alertTitle | CvsAlert | [private]
m_cancelButtonTitle | CvsAlert | [private]
m_icon | CvsAlert | [private]
m_message | CvsAlert | [private]
m_messageDetails | CvsAlert | [private]
m_okButtonTitle | CvsAlert | [private]
m_otherButtonTitle | CvsAlert | [private]
m_pHideOption | CvsAlert | [private]
SetAlertTitle(const char *alertTitle) | CvsAlert |
SetButtonTitle(const kCvsAlertButtonType buttonType, const char *buttonTitle) | CvsAlert |
SetHideOption(CPersistentBool *pHideOption) | CvsAlert |
ShowAlert(const kCvsAlertButtonType defaultButton=kCvsAlertOKButton) | CvsAlert | [virtual]
~CvsAlert() | CvsAlert | [inline, virtual]

Generated on Sat Aug 7 22:57:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoIgnoreModel Member List

This is the complete list of members for KoIgnoreModel, including all inherited members.

GetNotificationManager() | KoIgnoreModel | [virtual]
IsShowIgnored() | KoIgnoreModel | [virtual]
KoIgnoreModel() | KoIgnoreModel |
LoadSettings() | KoIgnoreModel | [virtual]
m_isIgnore | KoIgnoreModel | [private]
m_manager | KoIgnoreModel | [private]
SaveSettings() | KoIgnoreModel | [virtual]
ToggleIgnore() | KoIgnoreModel |
~KoIgnoreModel() | KoIgnoreModel | [virtual]

Generated on Sat Aug 7 22:54:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMDIChildWnd.cpp Source File

WinCvs/CJLib/CJLibrary/CJMDIChildWnd.cpp

Go to the documentation of this file.
00001 // CJMDIChildWnd.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJMDIChildWnd.cpp $
00011  *
00012  * $History: CJMDIChildWnd.cpp $
00013  *
00014  * *****************  Version 6  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:02p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Overrode OnEraseBkgnd(...) for flicker free drawing.
00018  *
00019  * *****************  Version 5  *****************
00020  * User: Kirk Stowell Date: 10/26/99   Time: 10:56p
00021  * Updated in $/CodeJock/CJLibrary
00022  * Added variables to hold menu and toolbar resource ids for use with menu
00023  * bar initialization.
00024  *
00025  * *****************  Version 4  *****************
00026  * User: Kirk Stowell Date: 10/06/99   Time: 6:21a
00027  * Updated in $/CodeJockey/CJLibrary
00028  * Added cool menu support for MDI applications that do not have a
00029  * document/view architecture. Added GetInitializedMenu() to
00030  * CCJMDIChildWnd which will initialize the menu for a given view,  and
00031  * overloaded InitializeMenu() in CCJMDIFrameWnd. Thanks to Golovanov
00032  * Michael [Golovanov@SoftLab.RU] for help with this.
00033  *
00034  * *****************  Version 3  *****************
00035  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00036  * Updated in $/CodeJockey/CJLibrary
00037  * Updated copyright and contact information.
00038  *
00039  * *****************  Version 2  *****************
00040  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00041  * Updated in $/CodeJockey/CJLibrary
00042  *
00043  * *****************  Version 1  *****************
00044  * User: Kirk Stowell Date: 6/26/99    Time: 8:30p
00045  * Created in $/CodeJockey/CJLibrary
00046  * Initial creation. Added to library to allow CCJControlBar and
00047  * CCJToolBar docking.
00048  *
00049  ***************************************************************************/
00051
00052 #include "stdafx.h"
00053 #include "CJMDIChildWnd.h"
00054 #include "CJDockBar.h"
00055 #include "CJSizeDockBar.h"
00056 #include "CJControlBar.h"
00057 #include "CJMiniDockFrameWnd.h"
00058 #include "CJToolBar.h"
00059 #include "CJMDIFrameWnd.h"
00060
00061 #ifdef _DEBUG
00062 #define new DEBUG_NEW
00063 #undef THIS_FILE
00064 static char THIS_FILE[] = __FILE__;
00065 #endif
00066
00068 // CCJMDIChildWnd
00069
00070 IMPLEMENT_DYNCREATE(CCJMDIChildWnd, CMDIChildWnd)
00071
00072 CCJMDIChildWnd::CCJMDIChildWnd()
00073 {
00074     m_hMenu       = NULL;
00075     m_nToolBarIDs = NULL;
00076     m_nMenuID     = 0;
00077     m_nToolBarID  = 0;
00078     m_nCount      = 0;
00079 }
00080
00081 CCJMDIChildWnd::~CCJMDIChildWnd()
00082 {
00083 }
00084
00085
00086 BEGIN_MESSAGE_MAP(CCJMDIChildWnd, CMDIChildWnd)
00087     //{{AFX_MSG_MAP(CCJMDIChildWnd)
00088     ON_WM_ERASEBKGND()
00089     //}}AFX_MSG_MAP
00090 END_MESSAGE_MAP()
00091
00093 // CCJMDIChildWnd message handlers
00094
00095 // dwDockBarMap
00096 DWORD CCJMDIChildWnd::dwDockBarMap[4][2] =
00097 {
00098     { AFX_IDW_DOCKBAR_TOP,      CBRS_TOP    },
00099     { AFX_IDW_DOCKBAR_BOTTOM,   CBRS_BOTTOM },
00100     { AFX_IDW_DOCKBAR_LEFT,     CBRS_LEFT   },
00101     { AFX_IDW_DOCKBAR_RIGHT,    CBRS_RIGHT  },
00102 };
00103
00104 void CCJMDIChildWnd::DockControlBarLeftOf(CControlBar* Bar, CControlBar* LeftOf)
00105 {
00106     CRect rect;
00107     DWORD dw;
00108     UINT n;
00109
00110     // get MFC to adjust the dimensions of all docked ToolBars
00111     // so that GetWindowRect will be accurate
00112     RecalcLayout(TRUE);
00113
00114     LeftOf->GetWindowRect(&rect);
00115     rect.OffsetRect(1,0);
00116     dw=LeftOf->GetBarStyle();
00117     n = 0;
00118     n = (dw&CBRS_ALIGN_TOP)              ? AFX_IDW_DOCKBAR_TOP      : n;
00119     n = (dw&CBRS_ALIGN_BOTTOM   && n==0) ? AFX_IDW_DOCKBAR_BOTTOM   : n;
00120     n = (dw&CBRS_ALIGN_LEFT     && n==0) ? AFX_IDW_DOCKBAR_LEFT     : n;
00121     n = (dw&CBRS_ALIGN_RIGHT    && n==0) ? AFX_IDW_DOCKBAR_RIGHT    : n;
00122
00123     // When we take the default parameters on rect, DockControlBar will dock
00124     // each Toolbar on a seperate line. By calculating a rectangle, we in effect
00125     // are simulating a Toolbar being dragged to that location and docked.
00126     DockControlBar(Bar,n,&rect);
00127 }
00128
00129 void CCJMDIChildWnd::EnableDocking(DWORD dwDockStyle)
00130 {
00131     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00132     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00133     CMDIChildWnd::EnableDocking(dwDockStyle);
00134
00135     for (int i = 0; i < 4; i++) {
00136         if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) {
00137             CDockBar* pDock = (CDockBar*)GetControlBar(dwDockBarMap[i][0]);
00138
00139             // make sure the dock bar is of correct type
00140             if( pDock || !pDock->IsKindOf(RUNTIME_CLASS(CCJDockBar)) ) {
00141                 BOOL bNeedDelete = ! pDock->m_bAutoDelete;
00142                 pDock->m_pDockSite->RemoveControlBar(pDock);
00143                 pDock->m_pDockSite = 0; // avoid problems in destroying the dockbar
00144                 pDock->DestroyWindow();
00145                 if( bNeedDelete )
00146                     delete pDock;
00147                 pDock = 0;
00148             }
00149
00150             if( pDock == 0 ) {
00151                 pDock = new CCJDockBar;
00152                 if (!pDock->Create(this,
00153                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00154                     dwDockBarMap[i][1], dwDockBarMap[i][0])) {
00155                     AfxThrowResourceException();
00156                 }
00157             }
00158         }
00159     }
00160 }
00161
00162 void CCJMDIChildWnd::RecalcLayout(BOOL bNotify)
00163 {
00164     CMDIChildWnd::RecalcLayout(bNotify);
00165     RecalcAllExcept(NULL);
00166 }
00167
00168 // Yiannhs changed this
00169 void CCJMDIChildWnd::EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags )
00170 {
00171     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00172     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00173
00174     m_pFloatingFrameClass = RUNTIME_CLASS(CCJMiniDockFrameWnd);
00175     for (int i = 0; i < 4; i++)
00176     {
00177         if (dwSizeBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY)
00178         {
00179             CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00180             if (pDock == NULL)
00181             {
00182                 pDock = new CCJSizeDockBar;
00183
00184                 if (!pDock->Create(this,
00185                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00186                         dwSizeBarMap[i][1], dwSizeBarMap[i][0]))
00187                 {
00188                     AfxThrowResourceException();
00189                 }
00190                 //Yiannhs enable Flat Borders For dock Bars
00191                 pDock->FlatBorder( (FlatFlags >> i) & 0x0001 );
00192             }
00193         }
00194     }
00195 }
00196
00197 void CCJMDIChildWnd::RecalcAllExcept(CCJSizeDockBar *pBar)
00198 {
00199     for (int i = 0; i < 4; i++)
00200     {
00201         CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00202         if (pDock != NULL && pDock != pBar)
00203         {
00204             pDock->CalcSizeBarLayout();
00205         }
00206     }
00207 }
00208
00209 void CCJMDIChildWnd::DockSizeBar(CControlBar * pBar,CCJSizeDockBar *pDockBar, LPRECT lpRect)
00210 {
00211     ASSERT(pBar != NULL);
00212     ASSERT(pBar->m_pDockContext != NULL);
00213
00214     if( pDockBar == NULL )
00215     {
00216         for (int i = 0; i < 4; i++)
00217         {
00218             if ((dwSizeBarMap[i][1] & CBRS_ALIGN_ANY) == (pBar->m_dwStyle & CBRS_ALIGN_ANY))
00219             {
00220                 pDockBar = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00221                 ASSERT(pDockBar != NULL);
00222
00223                 int nSize = 0;
00224
00225                 switch(i)
00226                 {
00227                 case 0: // horizontal dock
00228                 case 1:
00229                     nSize = ((CCJControlBar*)pBar)->GetHorzSize();
00230                     break;
00231                 case 2: // vertical dock
00232                 case 3:
00233                     nSize = ((CCJControlBar*)pBar)->GetVertSize();
00234                     break;
00235                 }
00236
00237                 pDockBar->SetActualSize( nSize );
00238                 break;
00239             }
00240         }
00241     }
00242
00243     ASSERT(pDockBar != NULL);
00244     ASSERT(m_listControlBars.Find(pBar) != NULL);
00245     ASSERT(pBar->m_pDockSite == this);
00246     ((CCJControlBar*)pBar)->Normalize();
00247     pDockBar->DockControlBar(pBar, lpRect);
00248 }
00249
00250 HMENU CCJMDIChildWnd::GetInitializedMenu(UINT nMenuID, UINT nToolBarID)
00251 {
00252     if( m_hMenu ) {
00253         return m_hMenu;
00254     }
00255
00256     CCJMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CCJMDIFrameWnd, GetParentFrame());
00257     if( pMainFrame ) {
00258         pMainFrame->InitializeMenu( &m_hMenu, nMenuID, nToolBarID );
00259         m_nMenuID     = nMenuID;
00260         m_nToolBarID  = nToolBarID;
00261     }
00262
00263     return m_hMenu;
00264 }
00265
00266 HMENU CCJMDIChildWnd::GetInitializedMenu(UINT nMenuID, UINT* nToolbarIDs, int nSize)
00267 {
00268     if( m_hMenu ) {
00269         return m_hMenu;
00270     }
00271
00272     CCJMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CCJMDIFrameWnd, GetParentFrame());
00273     if( pMainFrame ) {
00274         pMainFrame->InitializeMenu( &m_hMenu, nMenuID, nToolbarIDs, nSize);
00275         m_nMenuID     = nMenuID;
00276         m_nToolBarIDs = nToolbarIDs;
00277         m_nCount      = nSize;
00278     }
00279
00280     return m_hMenu;
00281 }
00282
00283 BOOL CCJMDIChildWnd::OnEraseBkgnd(CDC* pDC)
00284 {
00285     CRect rect;
00286     GetClientRect(&rect);
00287     pDC->ExcludeClipRect(rect);
00288
00289     return CMDIChildWnd::OnEraseBkgnd(pDC);
00290 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonContainer.h Source File

common/PythonContainer.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- September 2001
00019  */
00020
00021 #ifndef __PY_CONTAINER
00022 #define __PY_CONTAINER
00023
00024 #if !defined(USE_PYTHON)
00025 #   define USE_PYTHON 1
00026 #endif
00027
00028 #if defined(WIN32) && !qCvsDebug /* || qCarbon */
00029     // force to not import Python
00030 #   define USE_DL_EXPORT
00031 #endif
00032
00033 #if USE_PYTHON
00034 #include <Python.h>
00035 #include <exception>
00036 #include <vector>
00037 #include "PythonMacros.h"
00038 #include "PythonGlue.impl.h"
00039
00040 typedef void (*PyRegistry_InitValues)(PyObject *d);
00041
00042 /*
00043  * Each C++ for Python has a registry which help us registring
00044  * the object to Python
00045  */
00046
00047 class PyRegistry
00048 {
00049 public:
00050     PyRegistry(const char *name, size_t size, destructor d, getattrfunc g,
00051         PyRegistry_InitValues v, PyCFunction c, const char *doc);
00052     ~PyRegistry();
00053
00054     PyTypeObject m_type;
00055
00056     static void RegisterAllObjects(std::vector<PyMethodDef> & methods);
00057         // initialize each wrapper class and return a method table
00058         // for the module
00059
00060     static void CallInitValues(PyObject *dict);
00061         // give a chance for each container to make some registrations
00062
00063 protected:
00064     PyRegistry *m_next;
00065     PyRegistry_InitValues m_v;
00066     PyCFunction m_c;
00067     const char *m_doc;
00068
00069     static PyRegistry *m_all;
00070 };
00071
00072 /*
00073  * Base for a C++ container wrapper
00074  */
00075
00076 class PyContainer
00077 {
00078 public:
00079     PyContainer() {}
00080     virtual ~PyContainer() {}
00081
00082     virtual PyObject *GetAttr(char *name) { return NULL; }
00083         // overide to implement attributes
00084
00085     static PyObject *True() { Py_INCREF(GetPyTrue()); return GetPyTrue(); }
00086     static PyObject *False() { Py_INCREF(GetPyFalse()); return GetPyFalse(); }
00087     static PyObject *Void() { Py_INCREF(GetPyNone()); return GetPyNone(); }
00088         // goodies for returning void or boolean to python
00089
00090     static void RegisterValue(PyObject *d, char *name, int value);
00091         // register a single constant value in the module dictionary
00092 };
00093
00094 // smart pointer for python PyObject
00095 template <class T>
00096 class PyAutoObject
00097 {
00098 public:
00099     inline PyAutoObject() : m_o(NULL)
00100     {
00101     }
00102
00103     inline PyAutoObject(T *o) : m_o(o)
00104     {
00105         Ref();
00106     }
00107
00108     inline PyAutoObject(PyObject *o) : m_o((T *)o)
00109     {
00110         Ref();
00111     }
00112
00113     inline PyAutoObject(PyAutoObject & obj) : m_o((T *)obj.CopyReturn())
00114     {
00115     }
00116
00117     inline operator T*() const  { return m_o; }
00118
00119     inline ~PyAutoObject()
00120     {
00121         UnRef();
00122     }
00123
00124     inline PyAutoObject & operator=(T *o)
00125     {
00126         UnRef();
00127         m_o = o;
00128         Ref();
00129         return *this;
00130     }
00131
00132     inline PyAutoObject & operator=(PyObject *o)
00133     {
00134         UnRef();
00135         m_o = (T *)o;
00136         Ref();
00137         return *this;
00138     }
00139
00140     inline PyAutoObject & operator=(PyAutoObject & obj)
00141     {
00142         UnRef();
00143         m_o = (T *)obj.CopyReturn();
00144         return *this;
00145     }
00146
00147     inline PyObject *CopyReturn(void)
00148     {
00149         Ref();
00150         return (PyObject *)m_o;
00151     }
00152
00153     inline bool IsValid(void)
00154     {
00155         return m_o != 0L;
00156     }
00157
00158     inline T *operator->(void)
00159     {
00160         return m_o;
00161     }
00162
00163 protected:
00164     inline void Ref(void)
00165     {
00166         if(m_o)
00167             Py_INCREF(m_o);
00168     }
00169
00170     inline void UnRef(void)
00171     {
00172         if(m_o)
00173         {
00174             Py_DECREF(m_o);
00175             m_o = NULL;
00176         }
00177     }
00178
00179     T *m_o;
00180 };
00181
00182 extern PyObject *gCvsguiErr;
00183 #endif // USE_PYTHON
00184
00185 #endif
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ConsoleBar.h Source File

WinCvs/ConsoleBar.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1999
00019  */
00020
00021 /*
00022  * ConsoleBar.cpp -- Bar which owns the console
00023  */
00024
00025 #ifndef CONSOLE_BAR_H
00026 #define CONSOLE_BAR_H
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00033 // CBarConsole class
00034
00035 class CWincvsView;
00036
00037 class CBarConsole : public CCJControlBar
00038 {
00039 // Construction
00040 public:
00041     CBarConsole();
00042
00043 // Attributes
00044 public:
00045     CWincvsView *m_view;
00046
00047 // Operations
00048 public:
00049
00050 // Overrides
00051     // ClassWizard generated virtual function overrides
00052     //{{AFX_VIRTUAL(CBarConsole)
00053     //}}AFX_VIRTUAL
00054
00055 // Implementation
00056 public:
00057     virtual ~CBarConsole();
00058
00059 // Generated message map functions
00060 protected:
00061     //{{AFX_MSG(CBarConsole)
00062     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00063     //}}AFX_MSG
00064     DECLARE_MESSAGE_MAP()
00065 };
00066
00068
00069 //{{AFX_INSERT_LOCATION}}
00070 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00071
00072 #endif // !defined(CONSOLE_BAR_H)
00073
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TGraphDelCmd Member List

This is the complete list of members for TGraphDelCmd, including all inherited members.

GetAllRevs() | TGraphDelCmd |
GetCountSel() const | TGraphDelCmd |
GetOnlyRev() const | TGraphDelCmd |
m_allRevs | TGraphDelCmd | [private]
m_countSel | TGraphDelCmd | [private]
m_onlyRev | TGraphDelCmd | [private]
TGraphDelCmd() | TGraphDelCmd |
TraverseGraph(CLogNode *node) | TGraph |
TraverseNode(CLogNode *node) | TGraphDelCmd | [virtual]

Generated on Sat Aug 7 22:57:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGetPrefs_WINCVS Member List

This is the complete list of members for CGetPrefs_WINCVS, including all inherited members.

CGetPrefs_WINCVS() | CGetPrefs_WINCVS |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CGetPrefs_WINCVS | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CGetPrefs_WINCVS |
InitHelpID() | CGetPrefs_WINCVS | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_didInteract | CGetPrefs_WINCVS | [private]
m_diffProg | CGetPrefs_WINCVS |
m_diffProgEdit | CGetPrefs_WINCVS |
m_extDiffSelButton | CGetPrefs_WINCVS |
m_pythonDll | CGetPrefs_WINCVS |
m_pythonDllEdit | CGetPrefs_WINCVS |
m_settingsFolder | CGetPrefs_WINCVS |
m_settingsFolderButton | CGetPrefs_WINCVS |
m_settingsFolderEdit | CGetPrefs_WINCVS |
m_tclDll | CGetPrefs_WINCVS |
m_tclDllEdit | CGetPrefs_WINCVS |
m_useExtDiff | CGetPrefs_WINCVS |
m_useExtDiffCheck | CGetPrefs_WINCVS |
m_useSettingsFolder | CGetPrefs_WINCVS |
m_useSettingsFolderCheck | CGetPrefs_WINCVS |
m_viewer | CGetPrefs_WINCVS |
m_viewerEdit | CGetPrefs_WINCVS |
OnAltsettingschk() | CGetPrefs_WINCVS | [protected]
OnBtnsettings() | CGetPrefs_WINCVS | [protected]
OnBtnviewer() | CGetPrefs_WINCVS | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnExtdiff() | CGetPrefs_WINCVS | [protected]
OnExtdiffsel() | CGetPrefs_WINCVS | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CGetPrefs_WINCVS | [protected, virtual]
OnPythondllsel() | CGetPrefs_WINCVS | [protected]
OnTcldllsel() | CGetPrefs_WINCVS | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
StoreValues() | CGetPrefs_WINCVS |
~CGetPrefs_WINCVS() | CGetPrefs_WINCVS |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoFileViewTraversalContext Member List

This is the complete list of members for KoFileViewTraversalContext, including all inherited members.

GetView() const | KoFileViewTraversalContext |
IsHideUnknown() const | KoFileViewTraversalContext |
IsMatch(EntnodeData *data) const | KoFileViewTraversalContext |
IsRecursive() const | KoFileViewTraversalContext |
IsShowIgnored() const | KoFileViewTraversalContext |
IsShowMissing() const | KoFileViewTraversalContext |
IsShowModified() const | KoFileViewTraversalContext |
IsShowUnknown() const | KoFileViewTraversalContext |
KoFileViewTraversalContext(CBrowseFileView *view) | KoFileViewTraversalContext |
m_filter | KoFileViewTraversalContext | [private]
m_isRecursive | KoFileViewTraversalContext | [private]
m_isShowIgnored | KoFileViewTraversalContext | [private]
m_view | KoFileViewTraversalContext | [private]

Generated on Sat Aug 7 22:54:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoWatchersHandler Member List

This is the complete list of members for KoWatchersHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoWatchersHandler() | KoWatchersHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoWatchersHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoWatchersHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uconsole.h Source File

rf/uconsole.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #ifndef UCONSOLE_H_
00022 #define UCONSOLE_H_
00023
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00028 extern void UAppConsole(const char *format, ...);
00029
00030 #ifndef UTHROW
00031 #   define UTHROW(a) throw a
00032 #endif
00033
00034 #ifdef __cplusplus
00035 }
00036 #endif
00037
00038 #endif /*UCONSOLE_H_*/
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FileTraversal.h Source File

common/FileTraversal.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * FileTraversal.h : class to traverse a file hierarchy
00023  */
00024
00025 #if !defined(AFX_FILETRAVERSAL_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_FILETRAVERSAL_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "TextBinary.h"
00033
00034 #include <sys/stat.h>
00035
00036 #if !defined(S_ISDIR) && defined(S_IFDIR)
00037 #   if defined(S_IFMT)
00038 #       define  S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
00039 #   else
00040 #       define S_ISDIR(m) ((m) & S_IFDIR)
00041 #   endif
00042 #endif
00043
00044 #if !defined(S_ISREG) && defined(S_IFREG)
00045 #   if defined(S_IFMT)
00046 #       define  S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
00047 #   else
00048 #       define S_ISREG(m) ((m) & S_IFREG)
00049 #   endif
00050 #endif
00051
00052 #if !defined(S_ISLNK) && defined(S_IFLNK)
00053 #   if defined(S_IFMT)
00054 #       define  S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
00055 #   else
00056 #       define S_ISLNK(m) ((m) & S_IFLNK)
00057 #   endif
00058 #endif
00059
00060 #ifndef MAX_PATH
00061 #   ifdef PATH_MAX
00062 #       define MAX_PATH PATH_MAX
00063 #   else
00064 #       define MAX_PATH 5000
00065 #   endif
00066 #endif
00067
00068 #ifdef WIN32
00069 #   include "ndir.h"
00070 #   include <direct.h>
00071 #   define STRUCT_DIRENT struct direct
00072 #else /* !WIN32 */
00073 #   include <dirent.h>
00074 #   define STRUCT_DIRENT struct dirent
00075 #endif /* !WIN32 */
00076
00078 typedef enum
00079 {
00080     kContinueTraversal,
00081     kStopTraversal,
00082     kSkipFile,
00083     kTraversalError
00084 } kTraversal;
00085
00086 class TraversalReport;
00087
00088 kTraversal FileTraverse(const char* path, TraversalReport& report, const UFSSpec* macDirSpec = 0L);
00089
00091 class TraversalReport
00092 {
00093 private:
00094     // Data members
00095     static bool m_running;
00097 public:
00098     // Interface
00099     static bool& GetRefRunning();
00100
00101     virtual kTraversal EnterDirectory(const char* fullpath, const char* dirname, const UFSSpec* macspec);
00102     virtual kTraversal ExitDirectory(const char* fullpath);
00103
00104     virtual kTraversal OnError(const char* err, int errcode);
00105     virtual kTraversal OnIdle(const char* fullpath);
00106
00107     virtual kTraversal OnAnyDevice(const char* fullpath,
00108         const char* fullname,
00109         const char* name,
00110         const struct stat& dir, const UFSSpec* macspec);
00111
00112     virtual kTraversal OnDirectory(const char* fullpath,
00113         const char* fullname,
00114         const char* name,
00115         const struct stat& dir, const UFSSpec* macspec);
00116
00117     virtual kTraversal OnFile(const char* fullpath,
00118         const char* fullname,
00119         const char* name,
00120         const struct stat& dir, const UFSSpec* macspec);
00121
00122     virtual kTraversal OnAlias(const char* fullpath,
00123         const char* fullname,
00124         const char* name,
00125         const struct stat& dir, const UFSSpec* macspec);
00126 };
00127
00128 #endif // !defined(AFX_FILETRAVERSAL_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMDIChildWnd.h Source File

WinCvs/CJLib/Include/CJMDIChildWnd.h

Go to the documentation of this file.
00001 // CJMDIChildWnd.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJMDIChildWnd.h $
00011  *
00012  * $History: CJMDIChildWnd.h $
00013  *
00014  * *****************  Version 7  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:02p
00016  * Updated in $/CodeJock/Include
00017  * Overrode OnEraseBkgnd(...) for flicker free drawing.
00018  *
00019  * *****************  Version 6  *****************
00020  * User: Kirk Stowell Date: 10/26/99   Time: 10:44p
00021  * Updated in $/CodeJock/Include
00022  * Made class methods virtual for inheritance purposes.
00023  *
00024  * *****************  Version 5  *****************
00025  * User: Kirk Stowell Date: 10/06/99   Time: 6:21a
00026  * Updated in $/CodeJockey/Include
00027  * Added cool menu support for MDI applications that do not have a
00028  * document/view architecture. Added GetInitializedMenu() to
00029  * CCJMDIChildWnd which will initialize the menu for a given view,  and
00030  * overloaded InitializeMenu() in CCJMDIFrameWnd. Thanks to Golovanov
00031  * Michael [Golovanov@SoftLab.RU] for help with this.
00032  *
00033  * *****************  Version 4  *****************
00034  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00035  * Updated in $/CodeJockey/Include
00036  * Updated copyright and contact information.
00037  *
00038  * *****************  Version 3  *****************
00039  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00040  * Updated in $/CodeJockey/Include
00041  *
00042  * *****************  Version 2  *****************
00043  * User: Kirk Stowell Date: 7/18/99    Time: 10:14p
00044  * Updated in $/CodeJockey/Include
00045  * Cleaned up inline functions, and import/export macro so that class will
00046  * be imported when linked to, and exported at compile time.
00047  *
00048  * *****************  Version 1  *****************
00049  * User: Kirk Stowell Date: 6/26/99    Time: 8:30p
00050  * Created in $/CodeJockey/Include
00051  * Initial creation. Added to library to allow CCJControlBar and
00052  * CCJToolBar docking.
00053  *
00054  ***************************************************************************/
00056
00057 #ifndef __CJMDICHILDWND_H__
00058 #define __CJMDICHILDWND_H__
00059
00060 #if _MSC_VER > 1000
00061 #pragma once
00062 #endif // _MSC_VER > 1000
00063
00064 // class forwards
00065 class CCJSizeDockBar;
00066
00067 // The CCJMDIChildWnd class provides the functionality of a Windows multiple
00068 // document interface (MDI) child window, along with members for managing the
00069 // window. This class extends the standard CMDIChildWnd class to allow CCJControlBar
00070 // and CCJToolBar docking.
00071 class _CJX_EXT_CLASS CCJMDIChildWnd : public CMDIChildWnd
00072 {
00073     DECLARE_DYNCREATE(CCJMDIChildWnd)
00074
00075 // Construction / destruction
00076 public:
00077
00078     // Constructs a CCJMDIChildWnd object
00079     //
00080     CCJMDIChildWnd();
00081
00082     // Destroys a CCJMDIChildWnd object
00083     //
00084     virtual ~CCJMDIChildWnd();
00085
00086     virtual HMENU GetInitializedMenu(
00087         UINT nMenuID,
00088         UINT nToolBarID);
00089
00090     virtual HMENU GetInitializedMenu(
00091         UINT nMenuID,
00092         UINT* nToolbarIDs,
00093         int nSize);
00094
00095     virtual UINT GetMenuID();
00096     virtual UINT GetToolBarID();
00097     virtual UINT* GetToolBarIDs(int& nCount);
00098     virtual void SetResourceIDs(UINT nMenuID, UINT nToolBarID);
00099     virtual void SetResourceIDs(UINT nMenuID, UINT* nToolBarIDs, int nCount);
00100
00101 protected:
00102
00103     HMENU   m_hMenu;
00104     UINT    m_nMenuID;
00105     UINT    m_nToolBarID;
00106     UINT*   m_nToolBarIDs;
00107     int     m_nCount;
00108
00109     static DWORD dwDockBarMap[4][2];    // array used for docking masks
00110
00111     // Yiannhs to parameterize and the dock bar border
00112     enum DockFlatBorders {
00113         brdrAllRaised       = 0x0000,
00114         brdrFlatTop         = 0x0001,
00115         brdrFlatBottom      = 0x0002,
00116         brdrFlatLeft        = 0x0004,
00117         brdrFlatRight       = 0x0008,
00118         brdrFlatVertical    = 0x0003,
00119         brdrFlatHorizontal  = 0x000C,
00120         brdrFlatAll         = 0x000F
00121     };
00122
00123     // This member function is called to calculate the size of
00124     // a CCJControlBar
00125     //
00126     virtual void RecalcAllExcept(CCJSizeDockBar *pBar);
00127
00128     // This member function enables docking for standard
00129     // toolbar and control bars
00130     //
00131     virtual void EnableDocking(DWORD dwDockStyle);
00132
00133     // This member function enables docking for CCJControl bars only
00134     //
00135     virtual void EnableDockingSizeBar(
00136         // Specifies which sides of the frame window can serve as docking sites
00137         // for control bars. It can be one or more of the following:
00138         //
00139         // CBRS_ALIGN_TOP   Allows docking at the top of the client area.
00140         // CBRS_ALIGN_BOTTOM   Allows docking at the bottom of the client area.
00141         // CBRS_ALIGN_LEFT   Allows docking on the left side of the client area.
00142         // CBRS_ALIGN_RIGHT   Allows docking on the right side of the client area.
00143         // CBRS_ALIGN_ANY   Allows docking on any side of the client area.
00144         DWORD dwDockStyle,
00145         // enum for flat border styles.
00146         DockFlatBorders FlatFlags = brdrAllRaised );
00147
00148     // This member function will dock a CCJControlBar
00149     //
00150     virtual void DockSizeBar(
00151         // toolbar to dock
00152         CControlBar* pBar,
00153         // dockbar object usually NULL
00154         CCJSizeDockBar* pDockBar=NULL,
00155         // initial size usually NULL
00156         LPRECT lpRect=NULL);
00157
00158     // This memeber function will dock the control bar passed in
00159     // as the first argument, and dock the control bar that is passed in
00160     // as the second argument to the left of the first one.
00161     //
00162     virtual void DockControlBarLeftOf(
00163         // control bar to dock to the right of
00164         CControlBar* Bar,
00165         // already docked control bar
00166         CControlBar* LeftOf);
00167
00168 // Overrides
00169     // ClassWizard generated virtual function overrides
00170     //{{AFX_VIRTUAL(CCJMDIChildWnd)
00171     public:
00172     virtual void RecalcLayout(BOOL bNotify = TRUE);
00173     //}}AFX_VIRTUAL
00174
00175 // Implementation
00176 protected:
00177     // Generated message map functions
00178     //{{AFX_MSG(CCJMDIChildWnd)
00179     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00180     //}}AFX_MSG
00181     DECLARE_MESSAGE_MAP()
00182 };
00183
00185 // Inline functions
00187
00188 _CJXLIB_INLINE UINT CCJMDIChildWnd::GetMenuID()
00189     { return m_nMenuID; }
00190
00191 _CJXLIB_INLINE UINT CCJMDIChildWnd::GetToolBarID()
00192     { return m_nToolBarID; }
00193
00194 _CJXLIB_INLINE UINT* CCJMDIChildWnd::GetToolBarIDs(int& nCount)
00195     { nCount = m_nCount; return m_nToolBarIDs; }
00196
00197 _CJXLIB_INLINE void CCJMDIChildWnd::SetResourceIDs(UINT nMenuID, UINT nToolBarID)
00198     { m_nMenuID = nMenuID; m_nToolBarID = nToolBarID; }
00199
00200 _CJXLIB_INLINE void CCJMDIChildWnd::SetResourceIDs(UINT nMenuID, UINT* nToolBarIDs, int nCount)
00201     { m_nMenuID = nMenuID; m_nToolBarIDs = nToolBarIDs; m_nCount = nCount; }
00202
00204
00205 //{{AFX_INSERT_LOCATION}}
00206 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00207
00208 #endif // __CJMDICHILDWND_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/utoolbar.cpp Source File

rf/utoolbar.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #include <stdlib.h>
00028 #include <stdio.h>
00029 #include <math.h>
00030 #include <string.h>
00031 #include <float.h>
00032
00033 #ifdef HAVE_MALLOC_H
00034 #include <malloc.h>
00035 #endif
00036
00037 #include "utoolbar.h"
00038 #include "uconsole.h"
00039
00040 #include <vector>
00041 #include <map>
00042
00043 #if qGTK
00044     extern "C" GtkWidget* create_pixmap(GtkWidget *widget, const gchar *filename);
00045 #endif
00046
00047 #if defined(_DEBUG) && defined(WIN32)
00048 #   define new DEBUG_NEW
00049 #   undef THIS_FILE
00050     static char THIS_FILE[] = __FILE__;
00051 #endif
00052
00053 #ifndef NEW
00054 #define NEW new
00055 #endif
00056
00057 UIMPLEMENT_DYNAMIC(UToolbar, UWidget)
00058
00059 UBEGIN_MESSAGE_MAP(UToolbar, UWidget)
00060     ON_UPDATEUI(UToolbar)
00061     ON_UCOMMAND_RANGE(0, 0xFFFF, UToolbar::OnCommands)
00062     ON_UDESTROY(UToolbar)
00063     ON_TB_INIT(UToolbar)
00064     ON_TB_END(UToolbar)
00065     ON_TB_BUTTON(UToolbar)
00066     ON_TB_DROPDOWN(UToolbar)
00067     ON_TB_CHECKBTN(UToolbar)
00068     ON_TB_SEPARATOR(UToolbar)
00069     ON_USETTOOLTIP(0, 0xFFFF, UToolbar::OnSetTooltip)
00070 UEND_MESSAGE_MAP()
00071
00072 typedef enum
00073 {
00074     tbeDropDown,
00075     tbeButton,
00076     tbeSeparator
00077 } tbeKind;
00078
00079 class TbEntry
00080 {
00081 public:
00082     TbEntry(tbeKind k) : kind(k) {}
00083     virtual ~TbEntry() {}
00084
00085     tbeKind kind;
00086 };
00087
00088 #ifndef WIN32
00089     typedef void *HBITMAP;
00090 #endif
00091
00092 typedef struct
00093 {
00094     int cnt;
00095     HBITMAP bitmap;
00096 } AREF;
00097
00098 class aref
00099 {
00100 public:
00101     aref() : ref(0L)
00102     {
00103     }
00104     aref(HBITMAP b)
00105     {
00106         ref = NEW AREF;
00107         ref->cnt = 1;
00108         ref->bitmap = b;
00109     }
00110     aref(const aref & src)
00111     {
00112         ref = src.Ref();
00113     }
00114     virtual ~aref()
00115     {
00116         UnRef();
00117     }
00118     AREF *Ref(void) const
00119     {
00120         if(ref != 0L)
00121             ref->cnt++;
00122         return ref;
00123     }
00124     AREF *UnRef(void) const
00125     {
00126         if(ref != 0L && --ref->cnt == 0)
00127         {
00128 #ifdef WIN32
00129             if(ref->bitmap != 0L)
00130                 ::DeleteObject(ref->bitmap);
00131 #endif
00132             delete ref;
00133             ((aref *)this)->ref = 0L;
00134         }
00135         return ref;
00136     }
00137     aref & operator=(const aref & src)
00138     {
00139         UnRef();
00140         ref = src.Ref();
00141         return *this;
00142     }
00143     operator HBITMAP()
00144     {
00145         return ref != 0L ? ref->bitmap : 0L;
00146     }
00147 protected:
00148     AREF *ref;
00149 };
00150
00151 class awidget
00152 {
00153 public:
00154     awidget(HBITMAP b, int c, const char *t, UTB_VAR v) :
00155         bitmap(b), cmd(c), tooltip(0L), var(v)
00156     {
00157         if(t != 0L)
00158             tooltip = strdup(t);
00159     }
00160     awidget() : bitmap(0L), cmd(0), tooltip(0L)
00161     {
00162     }
00163     awidget(const awidget & src)
00164     {
00165         *this = src;
00166     }
00167
00168     virtual ~awidget()
00169     {
00170         if(tooltip != 0L)
00171             free(tooltip);
00172     }
00173
00174     awidget & operator=(const awidget & src)
00175     {
00176         bitmap = src.bitmap;
00177         cmd = src.cmd;
00178         var = src.var;
00179         tooltip = src.tooltip != 0L ? strdup(src.tooltip) : 0L;
00180
00181         return *this;
00182     }
00183     aref bitmap;
00184     int cmd;
00185     char *tooltip;
00186     UTB_VAR var;
00187 };
00188
00189 class TbEntryButton : public TbEntry
00190 {
00191 public:
00192     TbEntryButton(HBITMAP b, int c, const char *t, UTB_VAR v) :
00193         TbEntry(tbeButton), wid(b, c, t, v), ischeck(false)
00194     {
00195     }
00196     virtual ~TbEntryButton()
00197     {
00198     }
00199
00200     awidget wid;
00201     bool ischeck;
00202 };
00203
00204 class TbEntryChkButton : public TbEntryButton
00205 {
00206 public:
00207     TbEntryChkButton(HBITMAP b, int c, const char *t, UTB_VAR v) :
00208         TbEntryButton(b, c, t, v)
00209     {
00210         ischeck = true;
00211     }
00212     virtual ~TbEntryChkButton()
00213     {
00214     }
00215 };
00216
00217 class TbEntryDropDown : public TbEntry
00218 {
00219 public:
00220     TbEntryDropDown() : TbEntry(tbeDropDown), current(0) {}
00221     virtual ~TbEntryDropDown()
00222     {
00223     }
00224
00225     std::vector<awidget> icons;
00226     int current;
00227 };
00228
00229 class TbEntrySeparator : public TbEntry
00230 {
00231 public:
00232     TbEntrySeparator() : TbEntry(tbeSeparator) {}
00233     virtual ~TbEntrySeparator()
00234     {
00235     }
00236 };
00237
00238 class WININFO
00239 {
00240 public:
00241     WININFO(int w, int h) : width(w), height(h) {}
00242     virtual ~WININFO()
00243     {
00244         std::vector<TbEntry *>::iterator i;
00245         for(i = entries.begin(); i != entries.end(); ++i)
00246         {
00247             delete (*i);
00248         }
00249     }
00250
00251     std::vector<TbEntry *>::iterator Search(int cmd, int *dropindex = 0L)
00252     {
00253         std::vector<TbEntry *>::iterator i;
00254         for(i = entries.begin(); i != entries.end(); ++i)
00255         {
00256             TbEntry * entry = (*i);
00257             if(entry->kind == tbeDropDown)
00258             {
00259                 TbEntryDropDown *drop = (TbEntryDropDown *)entry;
00260                 std::vector<awidget>::iterator j;
00261                 int index;
00262
00263                 for(j = drop->icons.begin(), index = 0; j != drop->icons.end(); ++j, index++)
00264                 {
00265                     if((*j).cmd == cmd)
00266                     {
00267                         if(dropindex != 0L)
00268                             *dropindex = index;
00269                         return i;
00270                     }
00271                 }
00272             }
00273             else if(entry->kind == tbeButton)
00274             {
00275                 TbEntryButton *btn = (TbEntryButton *)entry;
00276                 if(btn->wid.cmd == cmd)
00277                     return i;
00278             }
00279         }
00280         return i;
00281     }
00282
00283     std::vector<TbEntry *> entries;
00284     int width, height;
00285 };
00286
00287 #ifdef WIN32
00288 class CColorMenu : public CMenu
00289 {
00290 public:
00291 // Operations
00292     void AppendColorMenuItem(UINT nID, awidget *what);
00293
00294 // Implementation
00295     virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
00296     virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
00297     CColorMenu(int width, int height);
00298     virtual ~CColorMenu();
00299
00300     int m_width;
00301     int m_height;
00302 };
00303
00304 CColorMenu::CColorMenu(int width, int height) : m_width(width), m_height(height)
00305 {
00306     VERIFY(CreatePopupMenu());
00307 }
00308
00309 CColorMenu::~CColorMenu()
00310 {
00311 }
00312
00313 void CColorMenu::AppendColorMenuItem(UINT nID, awidget *what)
00314 {
00315     VERIFY(AppendMenu(MF_ENABLED | MF_OWNERDRAW, nID, (LPCTSTR)what));
00316 }
00317
00318 void CColorMenu::MeasureItem(LPMEASUREITEMSTRUCT lpMIS)
00319 {
00320     // all items are of fixed size
00321     lpMIS->itemWidth = m_width + 4;
00322     lpMIS->itemHeight = m_height + 4;
00323 }
00324
00325 void CColorMenu::DrawItem(LPDRAWITEMSTRUCT lpDIS)
00326 {
00327     CDC* pDC = CDC::FromHandle(lpDIS->hDC);
00328     awidget *what = (awidget *)lpDIS->itemData;
00329
00330     if (!(lpDIS->itemState & ODS_SELECTED) &&
00331         (lpDIS->itemAction & ODA_SELECT))
00332     {
00333         COLORREF crHilite = ::GetSysColor(COLOR_MENU);
00334         CBrush br(crHilite);
00335         CRect r(lpDIS->rcItem);
00336         r.DeflateRect(1, 1);
00337         pDC->FrameRect(&r, &br);
00338     }
00339
00340     if (lpDIS->itemAction & ODA_DRAWENTIRE)
00341     {
00342         // Paint the color item in the color requested
00343         CRect r(lpDIS->rcItem);
00344         r.OffsetRect((r.Width() - m_width) / 2, (r.Height() - m_height) / 2);
00345         CDC memdc;
00346         memdc.CreateCompatibleDC(pDC);
00347         CBitmap bmap;
00348         VERIFY(bmap.Attach(what->bitmap));
00349         CBitmap *old = memdc.SelectObject(&bmap);
00350         pDC->BitBlt(r.left, r.top, r.Width(), r.Height(), &memdc, 0, 0, SRCCOPY);
00351         memdc.SelectObject(old);
00352         bmap.Detach();
00353         VERIFY(memdc.DeleteDC());
00354     }
00355
00356     if ((lpDIS->itemState & ODS_SELECTED) &&
00357         (lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)))
00358     {
00359         // item has been selected - hilite frame
00360         COLORREF crHilite = ::GetSysColor(COLOR_HIGHLIGHT);
00361         CBrush br(crHilite);
00362         CRect r(lpDIS->rcItem);
00363         r.DeflateRect(1, 1);
00364         pDC->FrameRect(&r, &br);
00365     }
00366 }
00367
00368 IMPLEMENT_DYNAMIC(CDynToolBar, CCJToolBar)
00369
00370 BEGIN_MESSAGE_MAP(CDynToolBar, CCJToolBar)
00371     //{{AFX_MSG_MAP(CDynToolBar)
00372     ON_WM_DESTROY()
00373     //}}AFX_MSG_MAP
00374 END_MESSAGE_MAP()
00375
00376 CDynToolBar::CDynToolBar() : m_info(0L), m_bitmap(0L),
00377     m_tracking(false), m_widid(0)
00378 {
00379 }
00380
00381 CDynToolBar::~CDynToolBar()
00382 {
00383     //if(m_bitmap != 0L)
00384         //::DeleteObject(m_bitmap);
00385 }
00386
00387 void CDynToolBar::OnDestroy(void)
00388 {
00389     UEventSendMessage(GetPseudoID(), EV_DESTROY, 0, NULL);
00390
00391     CCJToolBar::OnDestroy();
00392 }
00393
00394 void CDynToolBar::OnDropDownButton(const NMTOOLBAR& nmtb, UINT nID, CRect rc)
00395 {
00396     std::vector<TbEntry *>::iterator f = m_info->Search(WINCMD_to_UCMD(nID));
00397     if(f == m_info->entries.end())
00398     {
00399         TRACE("Unknown id");
00400         return;
00401     }
00402
00403     TbEntryDropDown *entry = (TbEntryDropDown *)(*f);
00404     if(entry->kind != tbeDropDown)
00405     {
00406         TRACE("Unknown kind");
00407         return;
00408     }
00409
00410     CColorMenu menu(m_info->width, m_info->height);
00411     std::vector<awidget>::iterator i;
00412     for(i = entry->icons.begin(); i != entry->icons.end(); ++i)
00413     {
00414         menu.AppendColorMenuItem(UCMD_to_WINCMD((*i).cmd), &i[0]);
00415     }
00416
00417     m_tracking = true;
00418     menu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,
00419         rc.left, rc.bottom, GetOwner(), &rc);
00420     m_tracking = false;
00421 }
00422 #endif
00423
00424 UToolbar::UToolbar(int widid) : UWidget(widid), m_winInfo(0L)
00425 #ifdef WIN32
00426     , m_wndToolBar(0L)
00427 #endif
00428 {
00429 }
00430
00431 UToolbar::~UToolbar()
00432 {
00433 }
00434
00435 void UToolbar::OnTbInit(UTB_INIT *info)
00436 {
00437     m_winInfo = NEW WININFO(info->widthbtn, info->heightbtn);
00438
00439 #ifdef WIN32
00440     WININFO & tb = *m_winInfo;
00441     m_wndToolBar = new CDynToolBar;
00442     CFrameWnd *f = m_wndToolBar->GetMainFrame();
00443     VERIFY(m_wndToolBar->Create(f, WS_CHILD | WS_VISIBLE | CBRS_TOP, info->winid));
00444     m_wndToolBar->SetBarStyle(m_wndToolBar->GetBarStyle() |
00445         CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
00446     m_wndToolBar->EnableDocking(CBRS_ALIGN_ANY);
00447     m_wndToolBar->SetWinInfo(m_winInfo);
00448     m_wndToolBar->SetPseudoID(GetWidID());
00449     f->DockControlBar(m_wndToolBar);
00450
00451     // configure the Win32 toolbar
00452     if(info->title != 0L)
00453         m_wndToolBar->SetWindowText(info->title);
00454     m_wndToolBar->SetSizes(CSize(info->widthbtn+7,info->heightbtn+6),
00455         CSize(info->widthbtn,info->heightbtn));
00456 #endif
00457 #ifdef qGTK
00458     void *wid = GetWidget(kUMainWidget);
00459     g_assert(wid != 0L && GTK_IS_TOOLBAR(wid));
00460 #endif
00461 }
00462
00463 #ifdef WIN32
00464 void UToolbar::RebuildBar(bool onlyBitmap)
00465 {
00466     WININFO & tb = *m_winInfo;
00467
00468     ASSERT(m_wndToolBar != 0L);
00469     // create the bitmap associated with the toolbar
00470     CClientDC dc(m_wndToolBar);
00471     CBitmap* pbmOld = NULL;
00472
00473     CDC dcDest;
00474     VERIFY(dcDest.CreateCompatibleDC(&dc));
00475     CDC dcSrc;
00476     VERIFY(dcSrc.CreateCompatibleDC(&dc));
00477
00478     std::vector<UINT> styles;
00479     std::vector<TbEntry *>::iterator i;
00480     int numicons = 0;
00481     for(i = tb.entries.begin(); i != tb.entries.end(); ++i)
00482     {
00483         TbEntry * entry = *i;
00484
00485         if(entry->kind == tbeDropDown)
00486         {
00487             TbEntryDropDown *drop = (TbEntryDropDown *)entry;
00488             styles.push_back(UCMD_to_WINCMD(drop->icons[drop->current].cmd));
00489             numicons++;
00490         }
00491         else if(entry->kind == tbeButton)
00492         {
00493             TbEntryButton *btn = (TbEntryButton *)entry;
00494             if(btn->wid.var != DDV_NONE)
00495             {
00496                 styles.push_back(UTB_SEPARATOR);
00497             }
00498             else
00499             {
00500                 numicons++;
00501                 styles.push_back(btn->wid.cmd);
00502             }
00503         }
00504         else if(entry->kind == tbeSeparator)
00505         {
00506             styles.push_back(UTB_SEPARATOR);
00507         }
00508         else
00509         {
00510             ASSERT(0);
00511         }
00512     }
00513
00514     if(!onlyBitmap && styles.size())
00515     {
00516         // create the Win32 toolbar
00517         m_wndToolBar->SetButtons(&styles.begin()[0], styles.size());
00518     }
00519
00520     CBitmap bdest;
00521     bdest.CreateCompatibleBitmap(&dc, tb.width * numicons, tb.height);
00522     ASSERT(bdest.m_hObject != NULL);
00523     CBitmap *pbmOldDest = dcDest.SelectObject(&bdest);
00524
00525     int cnt = 0, index = 0;
00526     for(i = tb.entries.begin(); i != tb.entries.end(); ++i, index++)
00527     {
00528         TbEntry * entry = *i;
00529         HBITMAP bmap = 0L;
00530         int cmd;
00531         bool dropdown = false;
00532         bool ischeck = false;
00533
00534         if(entry->kind == tbeDropDown)
00535         {
00536             TbEntryDropDown *drop = (TbEntryDropDown *)entry;
00537             bmap = drop->icons[drop->current].bitmap;
00538             cmd = drop->icons[drop->current].cmd;
00539             dropdown = true;
00540         }
00541         else if(entry->kind == tbeButton)
00542         {
00543             TbEntryButton *btn = (TbEntryButton *)entry;
00544             if(btn->wid.var != DDV_NONE)
00545             {
00546                 if(!onlyBitmap)
00547                 {
00548                     m_wndToolBar->SetButtonInfo(index, ID_SEPARATOR,
00549                         TBBS_SEPARATOR, tb.width);
00550                     CRect rect;
00551                     m_wndToolBar->GetItemRect(index, &rect);
00552                     /*VERIFY(Create("",
00553                             WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_OWNERDRAW,
00554                             rect, m_wndToolBar, UCMD_to_WINCMD(btn->wid.cmd)));*/
00555                 }
00556                 continue;
00557             }
00558
00559             bmap = btn->wid.bitmap;
00560             cmd = btn->wid.cmd;
00561             ischeck = btn->ischeck;
00562         }
00563         else if(entry->kind == tbeSeparator)
00564         {
00565             m_wndToolBar->SetButtonInfo(index, ID_SEPARATOR,
00566                 TBBS_SEPARATOR, 0);
00567             continue;
00568         }
00569         else
00570         {
00571             continue;
00572             ASSERT(0);
00573         }
00574
00575         if(bmap != 0L)
00576         {
00577             CBitmap bsrc;
00578             VERIFY(bsrc.Attach(bmap));
00579             CBitmap *pbmOldSrc = dcSrc.SelectObject(&bsrc);
00580
00581             dcDest.BitBlt(tb.width * cnt, 0, tb.width, tb.height,
00582                     &dcSrc, 0, 0, SRCCOPY);
00583             bsrc.Detach();
00584
00585             dcSrc.SelectObject(pbmOldSrc);
00586         }
00587
00588         DWORD dwStyle = m_wndToolBar->GetButtonStyle(index);
00589         if(ischeck)
00590         {
00591             dwStyle &= ~TBBS_BUTTON;
00592             dwStyle |= TBBS_CHECKBOX;
00593         }
00594         m_wndToolBar->SetButtonInfo(index, UCMD_to_WINCMD(cmd),
00595             dwStyle, cnt);
00596
00597         if(dropdown)
00598             m_wndToolBar->AddDropDownButton(UCMD_to_WINCMD(cmd), -1, TRUE);
00599
00600         cnt++;
00601     }
00602
00603     dcDest.SelectObject(pbmOldDest);
00604     VERIFY(dcDest.DeleteDC());
00605     VERIFY(dcSrc.DeleteDC());
00606
00607     HBITMAP finalbmap = (HBITMAP)bdest.Detach();
00608     m_wndToolBar->SetBitmap(finalbmap);
00609
00610     if(m_wndToolBar->m_bitmap != 0L)
00611         ::DeleteObject(m_wndToolBar->m_bitmap);
00612     m_wndToolBar->m_bitmap = finalbmap;
00613
00614 }
00615 #endif
00616
00617 void UToolbar::OnTbEnd(void)
00618 {
00619 #ifdef WIN32
00620     RebuildBar(false);
00621 #endif
00622 }
00623
00624 void UToolbar::OnTbButton(UTB_BUTTON *info)
00625 {
00626 #ifdef WIN32
00627     ASSERT(m_wndToolBar != 0L);
00628 #endif
00629
00630     WININFO & tb = *m_winInfo;
00631     HBITMAP bitmap = UMakeBitmap((char **)info->icon);
00632     TbEntryButton *btn = NEW TbEntryButton(bitmap, info->cmd,
00633         info->tooltip, info->varcode);
00634     tb.entries.push_back(btn);
00635
00636 #ifdef qGTK
00637     char status[256] = {'\0'};
00638     char prompt[256] = {'\0'};
00639
00640     strcpy(status, info->tooltip);
00641     char *cr = strchr(status, '\n');
00642     if(cr != 0L)
00643     {
00644         strcpy(prompt, cr + 1);
00645         *cr = '\0';
00646     }
00647     GtkToolbar *toolbar = GTK_TOOLBAR(GetWidget(kUMainWidget));
00648     GtkWidget *tmp_toolbar_icon = info->icon != 0L ?
00649         create_pixmap(GTK_WIDGET(toolbar), (const char *)info->icon) : 0L;
00650     GtkWidget *wid = gtk_toolbar_append_element(toolbar, GTK_TOOLBAR_CHILD_BUTTON, 0L,
00651                                                 prompt, status, 0L,
00652                                                 tmp_toolbar_icon, 0L, 0L);
00653     UEventSendMessage(GetWidID(), EV_INIT_WIDGET, info->cmd, wid);
00654 #endif
00655 }
00656
00657 void UToolbar::OnTbSeparator(void)
00658 {
00659 #ifdef WIN32
00660     ASSERT(m_wndToolBar != 0L);
00661 #endif
00662
00663     WININFO & tb = *m_winInfo;
00664     TbEntrySeparator *btn = NEW TbEntrySeparator();
00665     tb.entries.push_back(btn);
00666
00667 #ifdef qGTK
00668     GtkToolbar *toolbar = GTK_TOOLBAR(GetWidget(kUMainWidget));
00669
00670     /*GtkWidget *wid = */gtk_toolbar_append_space(toolbar);
00671 #endif
00672 }
00673
00674 void UToolbar::OnTbDropDown(UTB_DROPDOWN *info)
00675 {
00676 #ifdef WIN32
00677     ASSERT(m_wndToolBar != 0L);
00678 #endif
00679
00680     WININFO & tb = *m_winInfo;
00681     TbEntryDropDown *drop = NEW TbEntryDropDown();
00682     tb.entries.push_back(drop);
00683     int current = 0;
00684
00685 #ifndef qGTK
00686     UTB_BUTTON *btns = info->btns;
00687     while(btns->icon != 0L)
00688     {
00689         HBITMAP bitmap = UMakeBitmap((char **)btns->icon);
00690         awidget ad(bitmap, btns->cmd, btns->tooltip, btns->varcode);
00691         drop->icons.push_back(ad);
00692         if(btns->cmd == info->initialcmd)
00693             drop->current = current;
00694         btns++;
00695         current++;
00696     }
00697 #else
00698     char status[256] = {'\0'};
00699     char prompt[256] = {'\0'};
00700
00701     strcpy(status, info->tooltip);
00702     char *cr = strchr(status, '\n');
00703     if(cr != 0L)
00704     {
00705         strcpy(prompt, cr + 1);
00706         *cr = '\0';
00707     }
00708
00709     UTB_BUTTON *btns = info->btns;
00710     GtkToolbar *toolbar = GTK_TOOLBAR(GetWidget(kUMainWidget));
00711     GtkWidget *newElement = gtk_combo_new ();
00712
00713     while(btns && btns->icon != 0L) {
00714         if(btns->cmd == info->initialcmd)
00715             drop->current = current;
00716
00717         btns++;
00718     }
00719
00720     /* don't open the list on RETURN */
00721     gtk_combo_disable_activate(GTK_COMBO(newElement));
00722
00723     gtk_toolbar_append_widget(toolbar, newElement, prompt, status);
00724     gtk_widget_show (newElement);
00725
00726     UEventSendMessage(GetWidID(), EV_INIT_WIDGET, info->initialcmd, newElement);
00727 #endif
00728 }
00729
00730 void UToolbar::OnTbCheckBtn(UTB_BUTTON *info)
00731 {
00732 #ifdef WIN32
00733     ASSERT(m_wndToolBar != 0L);
00734 #endif
00735
00736     WININFO & tb = *m_winInfo;
00737     HBITMAP bitmap = UMakeBitmap((char **)info->icon);
00738     TbEntryButton *btn = NEW TbEntryChkButton(bitmap, info->cmd,
00739         info->tooltip, info->varcode);
00740     tb.entries.push_back(btn);
00741
00742 #ifdef qGTK
00743     char status[256] = {'\0'};
00744     char prompt[256] = {'\0'};
00745
00746     strcpy(status, info->tooltip);
00747     char *cr = strchr(status, '\n');
00748     if(cr != 0L)
00749     {
00750         strcpy(prompt, cr + 1);
00751         *cr = '\0';
00752     }
00753     GtkToolbar *toolbar = GTK_TOOLBAR(GetWidget(kUMainWidget));
00754     GtkWidget *tmp_toolbar_icon = info->icon != 0L ?
00755         create_pixmap(GTK_WIDGET(toolbar), (const char *)info->icon) : 0L;
00756     GtkWidget *wid = gtk_toolbar_append_element(toolbar, GTK_TOOLBAR_CHILD_TOGGLEBUTTON, 0L,
00757                                                 prompt, status, 0L,
00758                                                 tmp_toolbar_icon, 0L, 0L);
00759     UEventSendMessage(GetWidID(), EV_INIT_WIDGET, info->cmd, wid);
00760 #endif
00761 }
00762
00763
00764 void UToolbar::OnDestroy(void)
00765 {
00766     if(m_winInfo != 0L)
00767         delete m_winInfo;
00768 }
00769
00770 int UToolbar::UDispatchMessage(int/*UEventType*/ evt, int arg1, void *arg2, UDispatchInfo & dispatchInfo)
00771 {
00772     if(evt == EV_CMD)
00773     {
00774         WININFO *info = m_winInfo;
00775         if(info != 0L)
00776         {
00777             int index;
00778             std::vector<TbEntry *>::iterator f = info->Search(arg1, &index);
00779             if(f != info->entries.end())
00780             {
00781                 TbEntryDropDown *entry = (TbEntryDropDown *)*f;
00782                 if(entry->kind == tbeDropDown)
00783                 {
00784                     // toggle the current bitmap
00785                     if(entry->current != index)
00786                     {
00787                         entry->current = index;
00788 #ifdef WIN32
00789                         RebuildBar();
00790 #endif
00791                     }
00792                 }
00793             }
00794         }
00795     }
00796
00797     return UWidget::UDispatchMessage(evt, arg1, arg2, dispatchInfo);
00798 }
00799
00800 void UToolbar::OnSetTooltip(int cmd, UCmdUI *pCmdUI)
00801 {
00802     WININFO *info = m_winInfo;
00803     if(info == 0L)
00804         return;
00805
00806     int index;
00807     std::vector<TbEntry *>::iterator f = info->Search(cmd, &index);
00808     if(f == info->entries.end())
00809         return;
00810
00811     TbEntry * entry = *f;
00812     if(entry->kind == tbeDropDown)
00813     {
00814         TbEntryDropDown *drop = (TbEntryDropDown *)entry;
00815         awidget & wid = drop->icons[index];
00816         pCmdUI->SetTooltip(wid.tooltip);
00817     }
00818     else if(entry->kind == tbeButton)
00819     {
00820         TbEntryButton *btn = (TbEntryButton *)entry;
00821         pCmdUI->SetTooltip(btn->wid.tooltip);
00822     }
00823 }
00824
00825 int UToolbar::OnCommands(int cmd)
00826 {
00827 #if 0
00828     static bool sSemaphore = false;
00829     USemaphore policeman(sSemaphore);
00830     if(policeman.IsEnteredTwice())
00831         return 1;
00832 #endif
00833     // this is the interesting thing about the toolbar : it resends the
00834     // commands to other widgets according to the focus information and
00835     // allows the command to be handled several times if the handler return 1
00836
00837     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00838     int res = 0;
00839     int handledFlag;
00840
00841     // first forward the command to the focused widget : if it doesn't want it
00842     // we give it to the next pseudo widget.
00843     if(sFocusWidID != -1 && sFocusWidID != GetWidID())
00844     {
00845         res = UEventSendMessageExt(sFocusWidID, EV_CMD, cmd, 0L, &handledFlag);
00846         if(/*res == 0 &&*/ handledFlag)
00847             return 0;
00848     }
00849
00850     STD map<int, UCmdTarget *>::const_iterator i;
00851     for(i = targets.begin(); i != targets.end(); ++i)
00852     {
00853         int widid = (*i).first;
00854         if(widid == sFocusWidID || widid == GetWidID())
00855             continue;
00856         res = UEventSendMessageExt(widid, EV_CMD, cmd, 0L, &handledFlag);
00857         if(/*res == 0 &&*/ handledFlag)
00858             return 0;
00859     }
00860
00861     UAppConsole("The cmd %d of the toolbar has no command handler\n", cmd);
00862
00863     return 0;
00864 }
00865
00866 void UToolbar::OnUpdateUI()
00867 {
00868 // on Windows the update UI is sent by MFC
00869 #ifndef WIN32
00870     WININFO *info = m_winInfo;
00871     if(info == 0L)
00872         return;
00873
00874     static bool sSemaphore = false;
00875     USemaphore policeman(sSemaphore);
00876     if(policeman.IsEnteredTwice())
00877         return;
00878
00879     // this is the interesting thing about the toolbar : it resends the
00880     // update UI to other widgets according to the focus information and
00881     // allows the update to be handled several times if the handler asks for it
00882     // (by using UCmdUI::SetContinue)
00883
00884     const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00885     std::vector<TbEntry *>::const_iterator f;
00886     int cmdid;
00887
00888     for(f = info->entries.begin(); f != info->entries.end(); ++f)
00889     {
00890         TbEntry * entry = *f;
00891         if(entry->kind == tbeButton)
00892         {
00893             TbEntryButton *btn = (TbEntryButton *)entry;
00894             cmdid = btn->wid.cmd;
00895         }
00896         else
00897             continue;
00898
00899         void *widget = GetWidget(cmdid);
00900         if(widget == 0L)
00901             continue;
00902
00903         // first forward the command to the focused widget : if it doesn't want it
00904         // we give it to the next pseudo widget.
00905         if(sFocusWidID != -1 && sFocusWidID != GetWidID())
00906         {
00907             UCmdUI pUI(cmdid);
00908             pUI.m_widget = widget;
00909             UEventSendMessage(sFocusWidID, EV_UPDTCMD, pUI.m_nID, &pUI);
00910             if(!pUI.CanContinue())
00911                 continue;
00912         }
00913
00914         STD map<int, UCmdTarget *>::const_iterator i;
00915         for(i = targets.begin(); i != targets.end(); ++i)
00916         {
00917             int widid = (*i).first;
00918             if(widid == sFocusWidID || widid == GetWidID())
00919                 continue;
00920
00921             UCmdUI pUI(cmdid);
00922             pUI.m_widget = widget;
00923             UEventSendMessage(widid, EV_UPDTCMD, pUI.m_nID, &pUI);
00924             if(!pUI.CanContinue())
00925                 break;
00926         }
00927         if(i == targets.end())
00928         {
00929             //UAppConsole("The cmd %d of the toolbar has no update handler, it's gonna be disabled\n", cmdid);
00930             UCmdUI pUI(cmdid);
00931             pUI.m_widget = widget;
00932             pUI.Enable(false);
00933         }
00934     }
00935 #endif // !WIN32
00936 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsConsole Member List

This is the complete list of members for UCvsConsole, including all inherited members.

_GetBaseClass() | UCvsConsole | [protected, static]
_messageEntries | UCvsConsole | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
bold | UCvsConsole | [protected]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsConsole | UCvsConsole | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
col | UCvsConsole | [protected]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
FeedThisLine(const char *buf, size_t numbuf, bool isStderr) | UCvsConsole | [protected]
GetBaseMessageMap() | UCvsConsole | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UCvsConsole | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UCvsConsole | [virtual]
GetThisMessageMap() | UCvsConsole | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
italic | UCvsConsole | [protected]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_buf | UCvsConsole | [protected]
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_font | UCvsConsole | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_noDispatch | UWidget | [protected]
m_numbuf | UCvsConsole | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
MAX_CHAR_BY_LINE enum value | UCvsConsole | [protected]
messageMap | UCvsConsole | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnCmdUIEraseAll(UCmdUI *pCmdUI) | UCvsConsole | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCreate() | UCvsConsole | [protected]
OnDestroy() | UCvsConsole | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnEraseAll() | UCvsConsole | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
out | UCvsConsole | [protected]
OutColor(const char *txt, long len) | UCvsConsole |
OutColor(kConsoleColor color) | UCvsConsole |
OutConsole(const char *txt, size_t len, bool isStderr=false) | UCvsConsole |
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsConsole(void) | UCvsConsole | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
setFont(const char *fontName) | UCvsConsole |
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsConsole() | UCvsConsole |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
underline | UCvsConsole | [protected]
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsConsole() | UCvsConsole | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:50:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMiniDockFrameWnd Member List

This is the complete list of members for CCJMiniDockFrameWnd, including all inherited members.

CCJMiniDockFrameWnd() | CCJMiniDockFrameWnd |
Create(CWnd *pParent, DWORD dwBarStyle) | CCJMiniDockFrameWnd | [virtual]
OnNcLButtonDblClk(UINT nHitTest, CPoint point) | CCJMiniDockFrameWnd | [protected]
OnNcLButtonDown(UINT nHitTest, CPoint point) | CCJMiniDockFrameWnd | [protected]
~CCJMiniDockFrameWnd() | CCJMiniDockFrameWnd | [virtual]

Generated on Sat Aug 7 22:49:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FileActionDlg.cpp Source File

common/FileActionDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018 * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2001
00019 */
00020
00021 /*
00022 * FileActionDlg.cpp : the file action dialog
00023 */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "OptionalPropertySheet.h"
00030 #endif /* WIN32 */
00031
00032 #include "FileActionDlg.h"
00033 #include "CvsPrefs.h"
00034 #include "MultiFiles.h"
00035
00036 #ifdef WIN32
00037 #include "GetPrefs.h"
00038
00039 #ifdef _DEBUG
00040 #define new DEBUG_NEW
00041 #undef THIS_FILE
00042 static char THIS_FILE[] = __FILE__;
00043 #endif
00044
00045
00047 // CFileAction_MAIN property page
00048
00049 IMPLEMENT_DYNAMIC(CFileAction_MAIN, CHHelpPropertyPage)
00050
00051 CFileAction_MAIN::CFileAction_MAIN(const MultiFiles* mf, kLaunchType launchType)
00052     : m_mf(mf), m_launchType(launchType), m_fileActionCombo(USmartCombo::AutoDropWidth),
00053     CHHelpPropertyPage(CFileAction_MAIN::IDD)
00054 {
00055     //{{AFX_DATA_INIT(CFileAction_MAIN)
00056     m_fileAction = -1;
00057     m_sameActionNextTime = FALSE;
00058     //}}AFX_DATA_INIT
00059
00060     m_sameActionNextTime = TRUE;
00061 }
00062
00063 CFileAction_MAIN::~CFileAction_MAIN()
00064 {
00065 }
00066
00067 void CFileAction_MAIN::DoDataExchange(CDataExchange* pDX)
00068 {
00069     CHHelpPropertyPage::DoDataExchange(pDX);
00070     //{{AFX_DATA_MAP(CFileAction_MAIN)
00071     DDX_Control(pDX, IDC_ACTION_DESC, m_fileActionDescStatic);
00072     DDX_Control(pDX, IDC_ACTION, m_fileActionCombo);
00073     DDX_CBIndex(pDX, IDC_ACTION, m_fileAction);
00074     DDX_Check(pDX, IDC_SAME_ACTION_NEXT_TIME, m_sameActionNextTime);
00075     //}}AFX_DATA_MAP
00076 }
00077
00078
00079 BEGIN_MESSAGE_MAP(CFileAction_MAIN, CHHelpPropertyPage)
00080     //{{AFX_MSG_MAP(CFileAction_MAIN)
00081     ON_CBN_SELCHANGE(IDC_ACTION, OnSelchangeAction)
00082     //}}AFX_MSG_MAP
00083 END_MESSAGE_MAP()
00084
00086 // CFileAction_MAIN message handlers
00087
00089 BOOL CFileAction_MAIN::OnInitDialog()
00090 {
00091     CHHelpPropertyPage::OnInitDialog();
00092
00093     // Extra initialization
00094     for(int index = 0; index != kLaunchEnd; index++)
00095     {
00096         const int item = m_fileActionCombo.AddString(GetLaunchTypeName((kLaunchType)index, true));
00097         if( item > -1  )
00098         {
00099             m_fileActionCombo.SetItemData(item, (DWORD)index);
00100             if( index == m_launchType )
00101             {
00102                 m_fileActionCombo.SetCurSel(item);
00103             }
00104         }
00105     }
00106
00107     if( m_fileActionCombo.GetCurSel() < 0 )
00108     {
00109         m_fileActionCombo.SetCurSel(0);
00110     }
00111
00112     OnSelchangeAction();
00113
00114     return TRUE;  // return TRUE unless you set the focus to a control
00115                   // EXCEPTION: OCX Property Pages should return FALSE
00116 }
00117
00118 void CFileAction_MAIN::InitHelpID()
00119 {
00120     SetCtrlHelpID(IDC_ACTION,                   IDH_IDC_ACTION);
00121     SetCtrlHelpID(IDC_ACTION_DESC,              IDH_IDC_ACTION_DESC);
00122     SetCtrlHelpID(IDC_SAME_ACTION_NEXT_TIME,    IDH_IDC_SAME_ACTION_NEXT_TIME);
00123 }
00124
00126 void CFileAction_MAIN::OnSelchangeAction()
00127 {
00128     const int item = m_fileActionCombo.GetCurSel();
00129     if( item > -1 )
00130     {
00131         const kLaunchType launchType = (kLaunchType)m_fileActionCombo.GetItemData(item);
00132         m_fileActionDescStatic.SetWindowText(GetLaunchTypeName(launchType, false));
00133     }
00134 }
00135
00140 kLaunchType CFileAction_MAIN::GetLaunchType() const
00141 {
00142     return m_launchType;
00143 }
00144
00146 void CFileAction_MAIN::OnOK()
00147 {
00148     UpdateData();
00149
00150     m_launchType = (kLaunchType)m_fileActionCombo.GetItemData(m_fileAction);
00151
00152     CHHelpPropertyPage::OnOK();
00153 }
00154
00155 #endif /* WIN32 */
00156
00158 bool CompatGetFileAction(const MultiFiles* mf, kLaunchType& launchType)
00159 {
00160     bool userHitOK = false;
00161
00162     launchType = (kLaunchType)gCvsPrefs.FileActionType();
00163
00164 #ifdef WIN32
00165     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgFileAction(), "File action settings");
00166     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00167
00168     CFileAction_MAIN page1(mf, launchType);
00169     CGetPrefs_GLOBALS page2;
00170
00171     pages.AddPage(&page1);
00172     pages.AddPage(&page2);
00173
00174     if( pages.DoModal() == IDOK )
00175     {
00176         launchType = (kLaunchType)page1.GetLaunchType();
00177
00178         if( page1.m_sameActionNextTime )
00179         {
00180             gCvsPrefs.SetFileActionType((FILEACTION_TYPE)launchType);
00181         }
00182
00183         page2.StoreValues();
00184         gCvsPrefs.SetHideCommandDlgFileAction(pages.GetHideCommandDlg());
00185         userHitOK = true;
00186     }
00187 #endif /* WIN32 */
00188
00189 #ifdef qMacCvsPP
00190     userHitOK = true;
00191 #endif /* qMacCvsPP */
00192
00193 #if qUnix
00194     userHitOK = true;
00195 #endif // qUnix
00196
00197     if( userHitOK )
00198     {
00199         gCvsPrefs.save();
00200     }
00201
00202     return userHitOK;
00203 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJToolBar Member List

This is the complete list of members for CCJToolBar, including all inherited members.

AddButtons(int nNumButtons, LPTBBUTTON lpButtons) | CCJToolBar |
AddDropDownButton(UINT nIDButton, UINT nIDMenu, BOOL bArrow=TRUE) | CCJToolBar |
AddReplaceBitmap(HBITMAP hbmImageWell) | CCJToolBar |
AddStrings(LPCTSTR lpszStrings) | CCJToolBar |
AutoSize() | CCJToolBar |
CalcDynamicLayout(int nLength, DWORD nMode) | CCJToolBar | [virtual]
CalcFixedLayout(BOOL bStretch, BOOL bHorz) | CCJToolBar | [virtual]
CalcInsideRect(CRect &rect, BOOL bHorz) const | CCJToolBarBase |
CalcLayout(DWORD nMode, int nLength=-1) | CCJToolBar | [protected]
CalcSize(TBBUTTON *pData, int nCount) | CCJToolBar | [protected]
CCJToolBar() | CCJToolBar |
CCJToolBarBase() | CCJToolBarBase | [protected]
CheckButton(int nID, BOOL bCheck) | CCJToolBar |
CommandToIndex(UINT nIDFind) const | CCJToolBar |
Create(CWnd *pParentWnd, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_TOP, UINT nID=AFX_IDW_TOOLBAR) | CCJToolBar | [virtual]
CreateEx(CWnd *pParentWnd, DWORD dwCtrlStyle=TBSTYLE_FLAT, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP, CRect rcBorders=CRect(0, 0, 0, 0), UINT nID=AFX_IDW_TOOLBAR) | CCJToolBar | [virtual]
Customize() | CCJToolBar |
DeleteButton(int nIndex) | CCJToolBar |
DoPaint(CDC *pDC) | CCJToolBarBase | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJToolBarBase |
DrawGripper(CDC *pDC, const CRect &rect) | CCJToolBarBase |
EnableButton(int nID, BOOL bEnable) | CCJToolBar |
EraseNonClient() | CCJToolBarBase |
FindDropDownButton(UINT nID) | CCJToolBar |
GetBitmap(UINT nIdButton) const | CCJToolBar |
GetBitmapFlags() const | CCJToolBar |
GetBorders() const | CCJToolBarBase | [protected]
GetButton(int nIndex, TBBUTTON *pButton) const | CCJToolBar |
GetButtonCount() const | CCJToolBar |
GetButtonInfo(int nIndex, UINT &nID, UINT &nStyle, int &iImage) const | CCJToolBar |
GetButtonSize(TBBUTTON *pData, int iButton) | CCJToolBar | [virtual]
GetButtonStyle(int nIndex) const | CCJToolBar |
GetButtonText(int nIndex) const | CCJToolBar |
GetButtonText(int nIndex, CString &rString) const | CCJToolBar |
GetHotItem() const | CCJToolBar |
GetImageList() const | CCJToolBar |
GetItemID(int nIndex) const | CCJToolBar |
GetItemRect(int nIndex, LPRECT lpRect) const | CCJToolBar | [virtual]
GetPadding() const | CCJToolBar |
GetRect(UINT nIdButton, RECT &rc) const | CCJToolBar |
GetRows() const | CCJToolBar |
GetState(int nID) const | CCJToolBar |
GetToolBarCtrl() const | CCJToolBar |
GetToolbarStyle() const | CCJToolBar |
GetToolTips() const | CCJToolBar |
HideButton(int nID, BOOL bHide) | CCJToolBar |
HitTest(CPoint p) const | CCJToolBar |
Indeterminate(int nID, BOOL bIndeterminate) | CCJToolBar |
InsertButton(int nIndex, LPTBBUTTON lpButton) | CCJToolBar |
InsertControl(CRuntimeClass *pClass, LPCTSTR lpszWindowName, CRect &rect, UINT nID, DWORD dwStyle) | CCJToolBar |
InsertControl(CWnd *pCtrl, CRect &rect, UINT nID) | CCJToolBar |
InvalidateOldPos(const CRect &rcInvalid) | CCJToolBar | [virtual]
IsButtonChecked(int nID) const | CCJToolBar |
IsButtonEnabled(int nID) const | CCJToolBar |
IsButtonHidden(int nID) const | CCJToolBar |
IsButtonIndeterminate(int nID) const | CCJToolBar |
IsButtonPressed(int nID) const | CCJToolBar |
Layout() | CCJToolBar | [protected]
LoadBitmap(LPCTSTR lpszResourceName) | CCJToolBar |
LoadBitmap(UINT nIDResource) | CCJToolBar |
LoadToolBar(LPCTSTR lpszResourceName, TOOLBARINFO *pBarInfo=NULL) | CCJToolBar |
LoadToolBar(UINT nIDResource, TOOLBARINFO *pBarInfo=NULL) | CCJToolBar |
m_bDelayedButtonLayout | CCJToolBar | [protected]
m_bExStyle | CCJToolBarBase |
m_bInReBar | CCJToolBarBase |
m_bShowDropArrow | CCJToolBar | [protected]
m_hbmImageWell | CCJToolBar | [protected]
m_hInstImageWell | CCJToolBar | [protected]
m_hKeyRoot | CCJToolBar | [protected]
m_hRsrcImageWell | CCJToolBar | [protected]
m_nBarNumber | CCJToolBar | [protected, static]
m_nButtons | CCJToolBar | [protected]
m_pBarInfo | CCJToolBar | [protected]
m_pControls | CCJToolBar | [protected]
m_pDropButtons | CCJToolBar | [protected]
m_pStringMap | CCJToolBar | [protected]
m_rcOldPos | CCJToolBar | [protected]
m_sizeButton | CCJToolBar | [protected]
m_sizeImage | CCJToolBar | [protected]
m_strSubKey | CCJToolBar | [protected]
m_strValueName | CCJToolBar | [protected]
MapAccelerator(TCHAR ch, UINT &nID) const | CCJToolBar |
OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle) | CCJToolBar | [virtual]
OnDestroy() | CCJToolBar | [protected]
OnDropDownButton(const NMTOOLBAR &nmtb, UINT nID, CRect rc) | CCJToolBar | [virtual]
OnEraseBkgnd(CDC *pDC) | CCJToolBar | [protected]
OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS *) | CCJToolBar | [protected]
OnNcCreate(LPCREATESTRUCT) | CCJToolBar | [protected]
OnNcHitTest(CPoint) | CCJToolBar | [protected]
OnNcPaint() | CCJToolBar | [protected]
OnPaint() | CCJToolBar | [protected]
OnPreserveZeroBorderHelper(WPARAM, LPARAM) | CCJToolBar | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJToolBar | [protected]
OnSetBitmapSize(WPARAM, LPARAM) | CCJToolBar | [protected]
OnSetButtonSize(WPARAM, LPARAM) | CCJToolBar | [protected]
OnSetSizeHelper(CSize &size, LPARAM lParam) | CCJToolBar | [protected]
OnSysColorChange() | CCJToolBar | [protected]
OnToolBarBeginAdjust(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarBeginDrag(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarBtnDropDown(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarChange(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarCustomHelp(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarEndAdjust(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarEndDrag(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarGetButtonInfo(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarQueryDelete(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarQueryInsert(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarReset(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolHitTest(CPoint point, TOOLINFO *pTI) const | CCJToolBar | [virtual]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CCJToolBar | [virtual]
OnWindowPosChanged(WINDOWPOS *lpwndpos) | CCJToolBar | [protected]
OnWindowPosChanging(LPWINDOWPOS) | CCJToolBar | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCJToolBar | [virtual]
PressButton(int nID, BOOL bPress) | CCJToolBar |
RestoreState() | CCJToolBar |
SaveState() | CCJToolBar |
SendMessageC(UINT m, WPARAM wp=0, LPARAM lp=0) const | CCJToolBar |
SetBitmap(HBITMAP hbmImageWell) | CCJToolBar |
SetBitmapSize(CSize sz) | CCJToolBar |
SetBorders(LPCRECT lpRect) | CCJToolBarBase | [protected]
SetBorders(int cxLeft=0, int cyTop=0, int cxRight=0, int cyBottom=0) | CCJToolBarBase | [protected]
SetButton(int nIndex, TBBUTTON *pButton) | CCJToolBar |
SetButtonInfo(int nIndex, UINT nID, UINT nStyle, int iImage) | CCJToolBar |
SetButtons(const UINT *lpIDArray, int nIDCount) | CCJToolBar |
SetButtonSize(CSize sz) | CCJToolBar |
SetButtonStructSize(int nSize) | CCJToolBar |
SetButtonStyle(int nIndex, UINT nStyle) | CCJToolBar |
SetButtonText(int nIndex, LPCTSTR lpszText) | CCJToolBar |
SetCmdID(int nIndex, UINT nID) | CCJToolBar |
SetExtendedStyle(DWORD dwStyle) | CCJToolBar |
SetHeight(int cyHeight) | CCJToolBar |
SetHotItem(int iHot) | CCJToolBar |
SetImageList(HIMAGELIST hImgList) | CCJToolBar |
SetIndent(int indent) | CCJToolBar |
SetOwner(CWnd *pOwnerWnd) | CCJToolBar |
SetPadding(CSize sz) | CCJToolBar |
SetRows(int nRows, BOOL bLarger, LPRECT lpRect) | CCJToolBar |
SetSizes(SIZE sizeButton, SIZE sizeImage) | CCJToolBar |
SetState(int nID, UINT nState) | CCJToolBar |
SetToolbarStyle(DWORD dwStyle) | CCJToolBar |
SetToolTips(CToolTipCtrl *pTip) | CCJToolBar |
SizeToolBar(TBBUTTON *pData, int nCount, int nLength, BOOL bVert=FALSE) | CCJToolBar | [protected]
WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam) | CCJToolBarBase | [virtual]
WrapToolBar(TBBUTTON *pData, int nCount, int nWidth) | CCJToolBar | [protected]
~CCJToolBar() | CCJToolBar | [virtual]
~CCJToolBarBase() | CCJToolBarBase | [virtual]

Generated on Sat Aug 7 22:50:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/Authen.h Source File

common/Authen.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * Authen.h --- class to manage CVS authentication kind
00023  */
00024
00025 #ifndef AUTHEN_H
00026 #define AUTHEN_H
00027
00028 #if INTERNAL_AUTHEN
00029
00030 #include "MultiString.h"
00031
00033
00034 typedef enum
00035 {
00036     rhosts,
00037     pserver,
00038     kserver,
00039     local,
00040     ssh,
00041     ntserver,
00042     gserver,
00043     sspi,
00044     server
00045 } AuthenKind;
00046
00050 class Authen
00051 {
00052 public :
00053     Authen() {}
00054
00055     AuthenKind kind(void);
00056     const char* kindstr(void);
00057     void setkind(AuthenKind newkind);
00058
00059     static const char* kindToToken(AuthenKind k);
00060     static AuthenKind tokenToKind(const char* t);
00061     static short kindToNum(AuthenKind k);
00062     static AuthenKind numToKind(short num);
00063
00064     static bool parse_cvsroot(const char* CVSroot,
00065         UStr& theMethod, UStr& theUser, UStr& theHost, UStr& thePath);
00066
00067     // ":pserver:", ":kserver:"
00068     const char* token(void);
00069     static const char* token(AuthenKind k);
00070     static const char* skiptoken(const char* cvsroot);
00071 };
00072
00076 class AuthenModel
00077 {
00078 public :
00079     AuthenModel();
00080     virtual ~AuthenModel();
00081
00082     static std::vector<AuthenModel*>& GetAllInstances(void);
00083     static AuthenModel* GetInstance(AuthenKind k);
00084
00085     virtual AuthenKind GetKind(void) const = 0;
00086     virtual const char* GetToken(void) const = 0;
00087
00088     virtual bool HasSettings(void) const { return false; }
00089     virtual bool HasHost(void) const { return false; }
00090     virtual bool HasUser(void) const { return false; }
00091
00092     virtual bool HasEncryption(void) const { return false; }
00093     virtual bool HasLogin(void) const { return false; }
00094
00095     virtual void DoSettings(void) {}
00096     virtual void GetSettingsDesc(UStr& desc) { desc = ""; }
00097
00098     virtual const char* OnGetEnv(const char* env) { return 0L; }
00099
00100     /* This is intended for "cvs release". This command spawns
00101     another cvs and use the output for doing the release. The
00102     problem is that it beats the cvsgui protocol and thus we need
00103     to set up the env. variable correctly */
00104     virtual void OnSetupEnv(void);
00105     virtual void OnRestoreEnv(void);
00106
00107 protected:
00108     static std::vector<AuthenModel*>* m_instances;
00109   /* we have not to change the HOME enviroment on unix */
00110 #ifndef qUnix
00111   static UStr oldHome;
00112 #endif
00113 };
00114
00115 extern Authen gAuthen;
00116
00117 #endif /* INTERNAL_AUTHEN */
00118
00119 #endif /* AUTHEN_H */
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMenu.cpp Source File

WinCvs/CJLib/CJLibrary/CJMenu.cpp

Go to the documentation of this file.
00001 //*************************************************************************
00002 // CCJMenu.cpp : implementation file
00003 // Version : 2.5
00004 // Date : October 18, 1999
00005 // Author : Brent Corkum
00006 //
00007 // Portions of code supplied by:
00008 // Ben Ashley,Girish Bharadwaj,Jean-Edouard Lachand-Robert,
00009 // Robert Edward Caldecott,Kenny Goers,Leonardo Zide,
00010 // Stefan Kuhr, Reiner Jung
00011 //
00012 // Bug Fixes:
00013 // Stefan Kuhr,Martin Vladic,Kim Yoo Chul
00014 //
00015 // You are free to use/modify this code but leave this header intact.
00016 //
00018 /****************************************************************************
00019  *
00020  * $Date: 1999/11/30 21:45:49 $
00021  * $Revision: 1.1.1.3 $
00022  * $Archive: /CodeJock/CJLibrary/CJMenu.cpp $
00023  *
00024  * $History: CJMenu.cpp $
00025  *
00026  * *****************  Version 6  *****************
00027  * User: Kirk Stowell Date: 10/24/99   Time: 2:09a
00028  * Updated in $/CodeJock/CJLibrary
00029  * Upgraded to version 2.5 of BCMenu
00030  *
00031  * *****************  Version 5  *****************
00032  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00033  * Updated in $/CodeJock/CJLibrary
00034  * Added source control history to file header.
00035  *
00036  ***************************************************************************/
00038
00039 #include "stdafx.h"        // Standard windows header file
00040 #include "CJMenu.h"        // CCJMenu class declaration
00041 #include <afxpriv.h>       //SK: makes A2W and other spiffy AFX macros work
00042
00043 #ifdef _DEBUG
00044 #define new DEBUG_NEW
00045 #undef THIS_FILE
00046 static char THIS_FILE[] = __FILE__;
00047 #endif
00048
00049 #define GAP 1
00050 #ifndef OBM_CHECK
00051 #define OBM_CHECK 32760 // from winuser.h
00052 #endif
00053
00054 #if _MFC_VER <0x400
00055 #error This code does not work on Versions of MFC prior to 4.0
00056 #endif
00057
00058 static CPINFO CPInfo;
00059
00060 enum Win32Type{
00061     Win32s,
00062     Windoze95,
00063     WinNT3,
00064     WinNT4orHigher
00065 };
00066
00067
00068 Win32Type IsShellType()
00069 {
00070     Win32Type  ShellType;
00071     DWORD winVer;
00072     OSVERSIONINFO *osvi;
00073
00074     winVer=GetVersion();
00075     if(winVer<0x80000000){/*NT */
00076         ShellType=WinNT3;
00077         osvi= (OSVERSIONINFO *)malloc(sizeof(OSVERSIONINFO));
00078         if (osvi!=NULL){
00079             memset(osvi,0,sizeof(OSVERSIONINFO));
00080             osvi->dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
00081             GetVersionEx(osvi);
00082             if (osvi->dwMajorVersion>=4L)
00083                 ShellType=WinNT4orHigher;//yup, it is NT 4 or higher!
00084             free(osvi);
00085         }
00086     }
00087     else if  (LOBYTE(LOWORD(winVer))<4)
00088         ShellType=Win32s;/*Win32s*/
00089     else
00090         ShellType=Windoze95;/*Windoze95*/
00091     return ShellType;
00092 }
00093
00094 static Win32Type g_Shell=IsShellType();
00095
00096 void CCJMenuData::SetAnsiString(LPCSTR szAnsiString)
00097 {
00098     USES_CONVERSION;
00099     SetWideString(A2W(szAnsiString));  //SK:  see MFC Tech Note 059
00100 }
00101
00102 CString CCJMenuData::GetString(void)//returns the menu text in ANSI or UNICODE
00103 //depending on the MFC-Version we are using
00104 {
00105     CString strText;
00106     if (m_szMenuText)
00107     {
00108 #ifdef UNICODE
00109         strText = m_szMenuText;
00110 #else
00111         USES_CONVERSION;
00112         strText=W2A(m_szMenuText);     //SK:  see MFC Tech Note 059
00113 #endif
00114     }
00115     return strText;
00116 }
00117
00118 CTypedPtrArray<CPtrArray, HMENU> CCJMenu::m_AllSubMenus;  // Stores list of all sub-menus
00119
00120 /*===============================================================================
00121  CCJMenu::CCJMenu()
00122  TCMeny::~CCJMenu()
00123  -----------------
00124
00125  Constructor and Destructor.
00126 ===============================================================================*/
00127
00128 CCJMenu::CCJMenu()
00129 {
00130     disable_old_style=FALSE;
00131     m_iconX = 16;            // Icon sizes default to 16 x 16
00132     m_iconY = 15;            // ...
00133     m_selectcheck = -1;
00134     m_unselectcheck = -1;
00135     checkmaps=NULL;
00136     checkmapsshare=FALSE;
00137     // set the color used for the transparent background in all bitmaps
00138     m_bitmapBackground=RGB(192,192,192); //gray
00139     m_bitmapBackgroundFlag=FALSE;
00140     GetCPInfo(CP_ACP,&CPInfo);
00141 }
00142
00143
00144 CCJMenu::~CCJMenu()
00145 {
00146     DestroyMenu();
00147 }
00148
00149 BOOL CCJMenu::IsNewShell ()
00150 {
00151     return (Windoze95==g_Shell || WinNT4orHigher==g_Shell);
00152 }
00153
00154
00155 CCJMenuData::~CCJMenuData()
00156 {
00157     if(bitmap)
00158         delete(bitmap);
00159
00160     delete[] m_szMenuText; //Need not check for NULL because ANSI X3J16 allows "delete NULL"
00161 }
00162
00163
00164 void CCJMenuData::SetWideString(const wchar_t *szWideString)
00165 {
00166     delete[] m_szMenuText;//Need not check for NULL because ANSI X3J16 allows "delete NULL"
00167
00168     if (szWideString)
00169     {
00170         m_szMenuText = new wchar_t[sizeof(wchar_t)*(wcslen(szWideString)+1)];
00171         if (m_szMenuText)
00172             wcscpy(m_szMenuText,szWideString);
00173     }
00174     else
00175         m_szMenuText=NULL;//set to NULL so we need not bother about dangling non-NULL Ptrs
00176 }
00177
00178 BOOL CCJMenu::IsMenu(CMenu *submenu)
00179 {
00180     int m;
00181     int numSubMenus = m_AllSubMenus.GetUpperBound();
00182     for(m=0;m<=numSubMenus;++m){
00183         if(submenu->m_hMenu==m_AllSubMenus[m])return(TRUE);
00184     }
00185     return(FALSE);
00186 }
00187
00188 BOOL CCJMenu::IsMenu(HMENU submenu)
00189 {
00190     int m;
00191     int numSubMenus = m_AllSubMenus.GetUpperBound();
00192     for(m=0;m<=numSubMenus;++m){
00193         if(submenu==m_AllSubMenus[m])return(TRUE);
00194     }
00195     return(FALSE);
00196 }
00197
00198 BOOL CCJMenu::DestroyMenu()
00199 {
00200     // Destroy Sub menus:
00201     int m,n;
00202     int numAllSubMenus = m_AllSubMenus.GetUpperBound();
00203     for(n = numAllSubMenus; n>= 0; n--){
00204         if(m_AllSubMenus[n]==this->m_hMenu)m_AllSubMenus.RemoveAt(n);
00205     }
00206     int numSubMenus = m_SubMenus.GetUpperBound();
00207     for(m = numSubMenus; m >= 0; m--){
00208         numAllSubMenus = m_AllSubMenus.GetUpperBound();
00209         for(n = numAllSubMenus; n>= 0; n--){
00210             if(m_AllSubMenus[n]==m_SubMenus[m])m_AllSubMenus.RemoveAt(n);
00211         }
00212         delete((CCJMenu *)FromHandle(m_SubMenus[m]));
00213     }
00214     m_SubMenus.RemoveAll();
00215     // Destroy menu data
00216     int numItems = m_MenuList.GetUpperBound();
00217     for(m = 0; m <= numItems; m++)delete(m_MenuList[m]);
00218     m_MenuList.RemoveAll();
00219     if(checkmaps&&!checkmapsshare){
00220         delete checkmaps;
00221         checkmaps=NULL;
00222     }
00223     // Call base-class implementation last:
00224     return(CMenu::DestroyMenu());
00225 };
00226
00227
00229 //
00230 // CCJMenu message handlers
00231
00232
00233 /*
00234 ==========================================================================
00235 void CCJMenu::DrawItem(LPDRAWITEMSTRUCT)
00236 ---------------------------------------
00237
00238   Called by the framework when a particular item needs to be drawn.  We
00239   overide this to draw the menu item in a custom-fashion, including icons
00240   and the 3D rectangle bar.
00241   ==========================================================================
00242 */
00243
00244
00245 void CCJMenu::DrawItem (LPDRAWITEMSTRUCT lpDIS)
00246 {
00247     ASSERT(lpDIS != NULL);
00248     CDC* pDC = CDC::FromHandle(lpDIS->hDC);
00249     CRect rect;
00250     UINT state = (((CCJMenuData*)(lpDIS->itemData))->nFlags);
00251     if(state & MF_SEPARATOR){
00252         rect.CopyRect(&lpDIS->rcItem);
00253         rect.top+=rect.Height()>>1;
00254         pDC->DrawEdge(&rect,EDGE_ETCHED,BF_TOP);
00255     }
00256     else{
00257         CRect rect2;
00258         BOOL standardflag=FALSE,selectedflag=FALSE,disableflag=FALSE;
00259         BOOL checkflag=FALSE;
00260         COLORREF crText = GetSysColor(COLOR_MENUTEXT);
00261         COLORREF m_clrBack=GetSysColor(COLOR_MENU);
00262         CBrush m_brBackground,m_brSelect;
00263         CPen m_penBack;
00264         int x0,y0,dy;
00265         int nIconNormal=-1,xoffset=-1;
00266         CImageList *bitmap=NULL;
00267         CFont m_fontMenu;
00268         LOGFONT m_lf;
00269
00270         // set some colors and the font
00271         m_penBack.CreatePen (PS_SOLID,0,GetSysColor(COLOR_MENU));
00272         m_brBackground.CreateSolidBrush(GetSysColor(COLOR_MENU));
00273         m_brSelect.CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT));
00274         ZeroMemory ((PVOID) &m_lf,sizeof (LOGFONT));
00275         NONCLIENTMETRICS nm;
00276         nm.cbSize = sizeof (NONCLIENTMETRICS);
00277         VERIFY (SystemParametersInfo(SPI_GETNONCLIENTMETRICS,nm.cbSize,&nm,0));
00278         m_lf =  nm.lfMenuFont;
00279         m_fontMenu.CreateFontIndirect (&m_lf);
00280
00281         // draw the colored rectangle portion
00282
00283         rect.CopyRect(&lpDIS->rcItem);
00284         rect2=rect;
00285
00286         // draw the up/down/focused/disabled state
00287
00288         UINT action = lpDIS->itemAction;
00289         UINT state = lpDIS->itemState;
00290         CString strText;
00291         LOGFONT lf;
00292         lf = m_lf;
00293
00294         CFont dispFont;
00295         CFont *pFont=NULL;
00296
00297         if(lpDIS->itemData != NULL){
00298             nIconNormal = (((CCJMenuData*)(lpDIS->itemData))->menuIconNormal);
00299             xoffset = (((CCJMenuData*)(lpDIS->itemData))->xoffset);
00300             bitmap = (((CCJMenuData*)(lpDIS->itemData))->bitmap);
00301             strText = ((CCJMenuData*) (lpDIS->itemData))->GetString();
00302
00303             if(state&ODS_CHECKED && nIconNormal<0){
00304                 if(state&ODS_SELECTED && m_selectcheck>0)checkflag=TRUE;
00305                 else if(m_unselectcheck>0) checkflag=TRUE;
00306             }
00307             else if(nIconNormal != -1){
00308                 standardflag=TRUE;
00309                 if(state&ODS_SELECTED && !(state&ODS_GRAYED))selectedflag=TRUE;
00310                 else if(state&ODS_GRAYED) disableflag=TRUE;
00311             }
00312         }
00313         else{
00314             strText.Empty();
00315         }
00316
00317         if(state&ODS_SELECTED){ // draw the down edges
00318
00319             CPen *pOldPen = pDC->SelectObject (&m_penBack);
00320
00321             // You need only Text highlight and thats what you get
00322
00323             if(checkflag||standardflag||selectedflag||disableflag||state&ODS_CHECKED)
00324                 rect2.SetRect(rect.left+m_iconX+4+GAP,rect.top,rect.right,rect.bottom);
00325             pDC->FillRect (rect2,&m_brSelect);
00326
00327             pDC->SelectObject (pOldPen);
00328             if((HFONT)dispFont != NULL)dispFont.DeleteObject ();
00329             dispFont.CreateFontIndirect (&lf);
00330             crText = GetSysColor(COLOR_HIGHLIGHTTEXT);
00331         }
00332         else {
00333             CPen *pOldPen = pDC->SelectObject (&m_penBack);
00334             pDC->FillRect (rect,&m_brBackground);
00335             pDC->SelectObject (pOldPen);
00336
00337             // draw the up edges
00338
00339             pDC->Draw3dRect (rect,m_clrBack,m_clrBack);
00340             if ((HFONT)dispFont != NULL) dispFont.DeleteObject ();
00341             dispFont.CreateFontIndirect (&lf); //Normal
00342         }
00343
00344         // draw the text if there is any
00345         //We have to paint the text only if the image is nonexistant
00346
00347         dy = (rect.Height()-4-m_iconY)/2;
00348         dy = dy<0 ? 0 : dy;
00349
00350         if(checkflag||standardflag||selectedflag||disableflag){
00351             rect2.SetRect(rect.left+1,rect.top+1+dy,rect.left+m_iconX+3,
00352                 rect.top+m_iconY+3+dy);
00353             pDC->Draw3dRect (rect2,m_clrBack,m_clrBack);
00354             if(checkflag && checkmaps){
00355                 pDC->FillRect (rect2,&m_brBackground);
00356                 rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00357                     rect.top+m_iconY+4+dy);
00358
00359                 pDC->Draw3dRect (rect2,m_clrBack,m_clrBack);
00360                 CPoint ptImage(rect.left+2,rect.top+2+dy);
00361
00362                 if(state&ODS_SELECTED)checkmaps->Draw(pDC,1,ptImage,ILD_TRANSPARENT);
00363                 else checkmaps->Draw(pDC,0,ptImage,ILD_TRANSPARENT);
00364             }
00365             else if(disableflag){
00366                 if(!selectedflag){
00367                     CBitmap bitmapstandard;
00368                     GetBitmapFromImageList(pDC,bitmap,xoffset,bitmapstandard);
00369                     rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00370                         rect.top+m_iconY+4+dy);
00371                     pDC->Draw3dRect (rect2,m_clrBack,m_clrBack);
00372                     if(disable_old_style)
00373                         DitherBlt(lpDIS->hDC,rect.left+2,rect.top+2+dy,m_iconX,m_iconY,
00374                         (HBITMAP)(bitmapstandard),0,0);
00375                     else
00376                         DitherBlt2(pDC,rect.left+2,rect.top+2+dy,m_iconX,m_iconY,
00377                         bitmapstandard,0,0);
00378                     bitmapstandard.DeleteObject();
00379                 }
00380             }
00381             else if(selectedflag){
00382                 pDC->FillRect (rect2,&m_brBackground);
00383                 rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00384                     rect.top+m_iconY+4+dy);
00385                 if (IsNewShell()){
00386                     if(state&ODS_CHECKED)
00387                         pDC->Draw3dRect(rect2,GetSysColor(COLOR_3DSHADOW),
00388                         GetSysColor(COLOR_3DHILIGHT));
00389                     else
00390                         pDC->Draw3dRect(rect2,GetSysColor(COLOR_3DHILIGHT),
00391                         GetSysColor(COLOR_3DSHADOW));
00392                 }
00393                 CPoint ptImage(rect.left+2,rect.top+2+dy);
00394                 if(bitmap)bitmap->Draw(pDC,xoffset,ptImage,ILD_TRANSPARENT);
00395             }
00396             else{
00397                 if(state&ODS_CHECKED){
00398                     CBrush brush;
00399                     COLORREF col =GetSysColor(COLOR_3DLIGHT);
00400                     brush.CreateSolidBrush(col);
00401                     pDC->FillRect(rect2,&brush);
00402                     brush.DeleteObject();
00403                     rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00404                         rect.top+m_iconY+4+dy);
00405                     if (IsNewShell())
00406                         pDC->Draw3dRect(rect2,GetSysColor(COLOR_3DSHADOW),
00407                         GetSysColor(COLOR_3DHILIGHT));
00408                 }
00409                 else{
00410                     pDC->FillRect (rect2,&m_brBackground);
00411                     rect2.SetRect(rect.left,rect.top+dy,rect.left+m_iconX+4,
00412                         rect.top+m_iconY+4+dy);
00413                     pDC->Draw3dRect (rect2,m_clrBack,m_clrBack);
00414                 }
00415                 CPoint ptImage(rect.left+2,rect.top+2+dy);
00416                 if(bitmap)bitmap->Draw(pDC,xoffset,ptImage,ILD_TRANSPARENT);
00417             }
00418         }
00419         if(nIconNormal<0 && state&ODS_CHECKED && !checkflag){
00420             rect2.SetRect(rect.left+1,rect.top+2+dy,rect.left+m_iconX+1,
00421                 rect.top+m_iconY+2+dy);
00422             CMenuItemInfo info;
00423             info.fMask = MIIM_CHECKMARKS;
00424             ::GetMenuItemInfo((HMENU)lpDIS->hwndItem,lpDIS->itemID,
00425                 MF_BYCOMMAND, &info);
00426             if(state&ODS_CHECKED || info.hbmpUnchecked) {
00427                 Draw3DCheckmark(pDC, rect2, state&ODS_SELECTED,
00428                     state&ODS_CHECKED ? info.hbmpChecked :
00429                 info.hbmpUnchecked);
00430             }
00431         }
00432
00433         //This is needed always so that we can have the space for check marks
00434
00435         x0=rect.left;y0=rect.top;
00436         rect.left = rect.left + m_iconX + 8 + GAP;
00437
00438         if(!strText.IsEmpty()){
00439
00440             CRect rectt(rect.left,rect.top-1,rect.right,rect.bottom-1);
00441
00442             //   Find tabs
00443
00444             CString leftStr,rightStr;
00445             leftStr.Empty();rightStr.Empty();
00446             int tablocr=strText.ReverseFind(_T('\t'));
00447             if(tablocr!=-1){
00448                 rightStr=strText.Mid(tablocr+1);
00449                 leftStr=strText.Left(strText.Find(_T('\t')));
00450                 rectt.right-=m_iconX;
00451             }
00452             else leftStr=strText;
00453
00454             int iOldMode = pDC->GetBkMode();
00455             pDC->SetBkMode( TRANSPARENT);
00456
00457             // Draw the text in the correct colour:
00458
00459             UINT nFormat  = DT_LEFT|DT_SINGLELINE|DT_VCENTER;
00460             UINT nFormatr = DT_RIGHT|DT_SINGLELINE|DT_VCENTER;
00461             if(!(lpDIS->itemState & ODS_GRAYED)){
00462                 pDC->SetTextColor(crText);
00463                 pDC->DrawText (leftStr,rectt,nFormat);
00464                 if(tablocr!=-1) pDC->DrawText (rightStr,rectt,nFormatr);
00465             }
00466             else{
00467
00468                 // Draw the disabled text
00469                 if(!(state & ODS_SELECTED)){
00470                     RECT offset = *rectt;
00471                     offset.left+=1;
00472                     offset.right+=1;
00473                     offset.top+=1;
00474                     offset.bottom+=1;
00475                     pDC->SetTextColor(GetSysColor(COLOR_BTNHILIGHT));
00476                     pDC->DrawText(leftStr,&offset, nFormat);
00477                     if(tablocr!=-1) pDC->DrawText (rightStr,&offset,nFormatr);
00478                     pDC->SetTextColor(GetSysColor(COLOR_GRAYTEXT));
00479                     pDC->DrawText(leftStr,rectt, nFormat);
00480                     if(tablocr!=-1) pDC->DrawText (rightStr,rectt,nFormatr);
00481                 }
00482                 else{
00483                     // And the standard Grey text:
00484                     pDC->SetTextColor(m_clrBack);
00485                     pDC->DrawText(leftStr,rectt, nFormat);
00486                     if(tablocr!=-1) pDC->DrawText (rightStr,rectt,nFormatr);
00487                 }
00488             }
00489             pFont = pDC->SelectObject (&dispFont);
00490             pDC->SetBkMode( iOldMode );
00491             pDC->SelectObject (pFont); //set it to the old font
00492         }
00493
00494         m_penBack.DeleteObject();
00495         m_brBackground.DeleteObject();
00496         m_fontMenu.DeleteObject();
00497         m_brSelect.DeleteObject();
00498         dispFont.DeleteObject ();
00499   }
00500 }
00501
00502 BOOL CCJMenu::GetBitmapFromImageList(CDC* pDC,CImageList *imglist,int nIndex,CBitmap &bmp)
00503 {
00504     HICON hIcon = imglist->ExtractIcon(nIndex);
00505     CDC dc;
00506     dc.CreateCompatibleDC(pDC);
00507     bmp.CreateCompatibleBitmap(pDC,m_iconX,m_iconY);
00508     CBitmap* pOldBmp = dc.SelectObject(&bmp);
00509     CBrush brush ;
00510     brush.CreateSolidBrush(GetSysColor(COLOR_MENU));
00511     ::DrawIconEx(
00512         dc.GetSafeHdc(),
00513         0,
00514         0,
00515         hIcon,
00516         m_iconX,
00517         m_iconY,
00518         0,
00519         (HBRUSH)brush,
00520         DI_NORMAL
00521         );
00522     dc.SelectObject( pOldBmp );
00523     dc.DeleteDC();
00524     // the icon is not longer needed
00525     DestroyIcon(hIcon);
00526     return(TRUE);
00527 }
00528
00529 /*
00530 ==========================================================================
00531 void CCJMenu::MeasureItem(LPMEASUREITEMSTRUCT)
00532 ---------------------------------------------
00533
00534   Called by the framework when it wants to know what the width and height
00535   of our item will be.  To accomplish this we provide the width of the
00536   icon plus the width of the menu text, and then the height of the icon.
00537
00538 ==========================================================================
00539 */
00540
00541 void CCJMenu::MeasureItem( LPMEASUREITEMSTRUCT lpMIS )
00542 {
00543     UINT state = (((CCJMenuData*)(lpMIS->itemData))->nFlags);
00544     if(state & MF_SEPARATOR){
00545         lpMIS->itemWidth = 0;
00546         lpMIS->itemHeight = GetSystemMetrics(SM_CYMENU)>>1;
00547     }
00548     else{
00549         CFont m_fontMenu;
00550         LOGFONT m_lf;
00551         ZeroMemory ((PVOID) &m_lf,sizeof (LOGFONT));
00552         NONCLIENTMETRICS nm;
00553         nm.cbSize = sizeof (NONCLIENTMETRICS);
00554         VERIFY(SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
00555             nm.cbSize,&nm,0));
00556         m_lf =  nm.lfMenuFont;
00557         m_fontMenu.CreateFontIndirect (&m_lf);
00558
00559         // Obtain the width of the text:
00560         CWnd *pWnd = AfxGetMainWnd();            // Get main window
00561         CDC *pDC = pWnd->GetDC();              // Get device context
00562         CFont* pFont=NULL;    // Select menu font in...
00563
00564         if (IsNewShell())
00565             pFont = pDC->SelectObject (&m_fontMenu);// Select menu font in...
00566
00567         //Get pointer to text SK
00568         const wchar_t *lpstrText = ((CCJMenuData*)(lpMIS->itemData))->GetWideString();//SK: we use const to prevent misuse
00569
00570
00571         SIZE size;
00572
00573         if (Win32s!=g_Shell)
00574             VERIFY(::GetTextExtentPoint32W(pDC->m_hDC,lpstrText,
00575             wcslen(lpstrText),&size)); //SK should also work on 95
00576 #ifndef UNICODE //can't be UNICODE for Win32s
00577         else{//it's Win32suckx
00578             RECT rect;
00579             rect.left=rect.top=0;
00580             size.cy=DrawText(pDC->m_hDC,(LPCTSTR)lpstrText,
00581                 wcslen(lpstrText),&rect,
00582                 DT_SINGLELINE|DT_LEFT|DT_VCENTER|DT_CALCRECT);
00583             //+3 makes at least three pixels space to the menu border
00584             size.cx=rect.right-rect.left+3;
00585             size.cx += 3*(size.cx/wcslen(lpstrText));
00586         }
00587 #endif
00588
00589         CSize t = CSize(size);
00590         if(IsNewShell())
00591             pDC->SelectObject (pFont);  // Select old font in
00592         AfxGetMainWnd()->ReleaseDC(pDC);  // Release the DC
00593
00594         // Set width and height:
00595
00596         lpMIS->itemWidth = m_iconX + t.cx + m_iconX + GAP;
00597         int temp = GetSystemMetrics(SM_CYMENU);
00598         lpMIS->itemHeight = temp>m_iconY+4 ? temp : m_iconY+4;
00599         m_fontMenu.DeleteObject();
00600     }
00601 }
00602
00603 void CCJMenu::SetIconSize (int width, int height)
00604 {
00605     m_iconX = width;
00606     m_iconY = height;
00607 }
00608
00609 BOOL CCJMenu::AppendODMenuA(LPCSTR lpstrText,UINT nFlags,UINT nID,
00610                             int nIconNormal)
00611 {
00612     USES_CONVERSION;
00613     return AppendODMenuW(A2W(lpstrText),nFlags,nID,nIconNormal);//SK: See MFC Tech Note 059
00614 }
00615
00616
00617 BOOL CCJMenu::AppendODMenuW(wchar_t *lpstrText,UINT nFlags,UINT nID,
00618                             int nIconNormal)
00619 {
00620     // Add the MF_OWNERDRAW flag if not specified:
00621     if(!nID)nFlags=MF_SEPARATOR|MF_OWNERDRAW;
00622     else if(!(nFlags & MF_OWNERDRAW))nFlags |= MF_OWNERDRAW;
00623
00624     if(nFlags & MF_POPUP){
00625         m_AllSubMenus.Add((HMENU)nID);
00626         m_SubMenus.Add((HMENU)nID);
00627     }
00628
00629     CCJMenuData *mdata = new CCJMenuData;
00630     m_MenuList.Add(mdata);
00631     mdata->SetWideString(lpstrText);    //SK: modified for dynamic allocation
00632
00633     mdata->menuIconNormal = nIconNormal;
00634     mdata->xoffset=-1;
00635     if(nIconNormal>=0){
00636         mdata->xoffset=0;
00637         LoadFromToolBar(nID,nIconNormal,mdata->xoffset);
00638         if(mdata->bitmap)mdata->bitmap->DeleteImageList();
00639         else mdata->bitmap=new(CImageList);
00640         mdata->bitmap->Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00641         if(!AddBitmapToImageList(mdata->bitmap,nIconNormal)){
00642             mdata->bitmap->DeleteImageList();
00643             delete mdata->bitmap;
00644             mdata->bitmap=NULL;
00645             mdata->menuIconNormal = nIconNormal = -1;
00646             mdata->xoffset = -1;
00647         }
00648     }
00649     mdata->nFlags = nFlags;
00650     mdata->nID = nID;
00651     return(CMenu::AppendMenu(nFlags, nID, (LPCTSTR)mdata));
00652 }
00653
00654 BOOL CCJMenu::AppendODMenuA(LPCSTR lpstrText,UINT nFlags,UINT nID,
00655                             CImageList *il,int xoffset)
00656 {
00657     USES_CONVERSION;
00658     return AppendODMenuW(A2W(lpstrText),nFlags,nID,il,xoffset);
00659 }
00660
00661 BOOL CCJMenu::AppendODMenuW(wchar_t *lpstrText,UINT nFlags,UINT nID,
00662                             CImageList *il,int xoffset)
00663 {
00664     // Add the MF_OWNERDRAW flag if not specified:
00665     if(!nID)nFlags=MF_SEPARATOR|MF_OWNERDRAW;
00666     else if(!(nFlags & MF_OWNERDRAW))nFlags |= MF_OWNERDRAW;
00667
00668     if(nFlags & MF_POPUP){
00669         m_AllSubMenus.Add((HMENU)nID);
00670         m_SubMenus.Add((HMENU)nID);
00671     }
00672
00673     CCJMenuData *mdata = new CCJMenuData;
00674     m_MenuList.Add(mdata);
00675     mdata->SetWideString(lpstrText);    //SK: modified for dynamic allocation
00676
00677     if(il){
00678         mdata->menuIconNormal = 0;
00679         mdata->xoffset=xoffset;
00680         if(mdata->bitmap)mdata->bitmap->Detach();
00681         else mdata->bitmap=new(CImageList);
00682         mdata->bitmap->Attach(ImageList_Duplicate(il->m_hImageList));
00683     }
00684     else{
00685         mdata->menuIconNormal = -1;
00686         mdata->xoffset = -1;
00687     }
00688     mdata->nFlags = nFlags;
00689     mdata->nID = nID;
00690     return(CMenu::AppendMenu(nFlags, nID, (LPCTSTR)mdata));
00691 }
00692
00693 BOOL CCJMenu::InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags,UINT nID,
00694                             int nIconNormal)
00695 {
00696     USES_CONVERSION;
00697     return InsertODMenuW(nPosition,A2W(lpstrText),nFlags,nID,nIconNormal);
00698 }
00699
00700
00701 BOOL CCJMenu::InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags,UINT nID,
00702                             int nIconNormal)
00703 {
00704     // Add the MF_OWNERDRAW flag if not specified:
00705     if(!nID)nFlags=MF_SEPARATOR|MF_OWNERDRAW;
00706     else if(!(nFlags & MF_OWNERDRAW))nFlags |= MF_OWNERDRAW;
00707
00708     if(nFlags & MF_POPUP){
00709         m_AllSubMenus.Add((HMENU)nID);
00710         m_SubMenus.InsertAt(nPosition,(HMENU)nID);
00711     }
00712
00713     CCJMenuData *mdata = new CCJMenuData;
00714     m_MenuList.InsertAt(nPosition,mdata);
00715     mdata->SetWideString(lpstrText);    //SK: modified for dynamic allocation
00716
00717     mdata->menuIconNormal = nIconNormal;
00718     mdata->xoffset=-1;
00719     if(nIconNormal>=0){
00720         mdata->xoffset=0;
00721         LoadFromToolBar(nID,nIconNormal,mdata->xoffset);
00722         if(mdata->bitmap)mdata->bitmap->DeleteImageList();
00723         else mdata->bitmap=new(CImageList);
00724         mdata->bitmap->Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00725         if(!AddBitmapToImageList(mdata->bitmap,nIconNormal)){
00726             mdata->bitmap->DeleteImageList();
00727             delete mdata->bitmap;
00728             mdata->bitmap=NULL;
00729             mdata->menuIconNormal = nIconNormal = -1;
00730             mdata->xoffset = -1;
00731         }
00732     }
00733     mdata->nFlags = nFlags;
00734     mdata->nID = nID;
00735     return(CMenu::InsertMenu(nPosition,nFlags,nID,(LPCTSTR)mdata));
00736 }
00737
00738 BOOL CCJMenu::InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags,UINT nID,
00739                             CImageList *il,int xoffset)
00740 {
00741     USES_CONVERSION;
00742     return InsertODMenuW(nPosition,A2W(lpstrText),nFlags,nID,il,xoffset);
00743 }
00744
00745 BOOL CCJMenu::InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags,UINT nID,
00746                             CImageList *il,int xoffset)
00747 {
00748     // Add the MF_OWNERDRAW flag if not specified:
00749     if(!nID)nFlags=MF_SEPARATOR|MF_OWNERDRAW;
00750     else if(!(nFlags & MF_OWNERDRAW))nFlags |= MF_OWNERDRAW;
00751
00752     if(nFlags & MF_POPUP){
00753         m_AllSubMenus.Add((HMENU)nID);
00754         m_SubMenus.InsertAt(nPosition,(HMENU)nID);
00755     }
00756
00757     CCJMenuData *mdata = new CCJMenuData;
00758     m_MenuList.InsertAt(nPosition,mdata);
00759     mdata->SetWideString(lpstrText);    //SK: modified for dynamic allocation
00760
00761     if(il){
00762         mdata->menuIconNormal = 0;
00763         mdata->xoffset=xoffset;
00764         if(mdata->bitmap)mdata->bitmap->Detach();
00765         else mdata->bitmap=new(CImageList);
00766         mdata->bitmap->Attach(ImageList_Duplicate(il->m_hImageList));
00767     }
00768     else{
00769         mdata->menuIconNormal = -1;
00770         mdata->xoffset = -1;
00771     }
00772     mdata->nFlags = nFlags;
00773     mdata->nID = nID;
00774     return(CMenu::InsertMenu(nPosition,nFlags,nID,(LPCTSTR)mdata));
00775 }
00776
00777 BOOL CCJMenu::ModifyODMenuA(const char * lpstrText,UINT nID,int nIconNormal)
00778 {
00779     USES_CONVERSION;
00780     return ModifyODMenuW(A2W(lpstrText),nID,nIconNormal);//SK: see MFC Tech Note 059
00781 }
00782
00783 BOOL CCJMenu::ModifyODMenuW(wchar_t *lpstrText,UINT nID,int nIconNormal)
00784 {
00785     int nLoc;
00786     CCJMenuData *mdata;
00787
00788     // Find the old CCJMenuData structure:
00789     CCJMenu *psubmenu = FindMenuOption(nID,nLoc);
00790     if(psubmenu && nLoc>=0)mdata = psubmenu->m_MenuList[nLoc];
00791     else{
00792         // Create a new CCJMenuData structure:
00793         mdata = new CCJMenuData;
00794         m_MenuList.Add(mdata);
00795     }
00796
00797     ASSERT(mdata);
00798     if(lpstrText)
00799         mdata->SetWideString(lpstrText);  //SK: modified for dynamic allocation
00800     mdata->menuIconNormal = nIconNormal;
00801     mdata->xoffset=-1;
00802     if(nIconNormal>=0){
00803         mdata->xoffset=0;
00804         LoadFromToolBar(nID,nIconNormal,mdata->xoffset);
00805         if(mdata->bitmap)mdata->bitmap->DeleteImageList();
00806         else mdata->bitmap=new CImageList;
00807         mdata->bitmap->Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00808         if(!AddBitmapToImageList(mdata->bitmap,nIconNormal)){
00809             mdata->bitmap->DeleteImageList();
00810             delete mdata->bitmap;
00811             mdata->bitmap=NULL;
00812             mdata->menuIconNormal = nIconNormal = -1;
00813             mdata->xoffset = -1;
00814         }
00815     }
00816     mdata->nFlags = MF_BYCOMMAND | MF_OWNERDRAW;
00817     mdata->nID = nID;
00818     return (CMenu::ModifyMenu(nID,mdata->nFlags,nID,(LPCTSTR)mdata));
00819 }
00820
00821 BOOL CCJMenu::ModifyODMenuA(const char * lpstrText,UINT nID,CImageList *il,int xoffset)
00822 {
00823     USES_CONVERSION;
00824     return ModifyODMenuW(A2W(lpstrText),nID,il,xoffset);
00825 }
00826
00827 BOOL CCJMenu::ModifyODMenuW(wchar_t *lpstrText,UINT nID,CImageList *il,int xoffset)
00828 {
00829     int nLoc;
00830     CCJMenuData *mdata;
00831
00832     // Find the old CCJMenuData structure:
00833     CCJMenu *psubmenu = FindMenuOption(nID,nLoc);
00834     if(psubmenu && nLoc>=0)mdata = psubmenu->m_MenuList[nLoc];
00835     else{
00836         // Create a new CCJMenuData structure:
00837         mdata = new CCJMenuData;
00838         m_MenuList.Add(mdata);
00839     }
00840
00841     ASSERT(mdata);
00842     if(lpstrText)
00843         mdata->SetWideString(lpstrText);  //SK: modified for dynamic allocation
00844     if(il){
00845         mdata->menuIconNormal = 0;
00846         mdata->xoffset=xoffset;
00847         if(mdata->bitmap)mdata->bitmap->Detach();
00848         else mdata->bitmap=new(CImageList);
00849         mdata->bitmap->Attach(ImageList_Duplicate(il->m_hImageList));
00850     }
00851     else{
00852         mdata->menuIconNormal = -1;
00853         mdata->xoffset = -1;
00854     }
00855     mdata->nFlags = MF_BYCOMMAND | MF_OWNERDRAW;
00856     mdata->nID = nID;
00857     return (CMenu::ModifyMenu(nID,mdata->nFlags,nID,(LPCTSTR)mdata));
00858 }
00859
00860 BOOL CCJMenu::ModifyODMenuA(const char * lpstrText,UINT nID,CBitmap *bmp)
00861 {
00862     USES_CONVERSION;
00863     return ModifyODMenuW(A2W(lpstrText),nID,bmp);
00864 }
00865
00866 BOOL CCJMenu::ModifyODMenuW(wchar_t *lpstrText,UINT nID,CBitmap *bmp)
00867 {
00868     if(bmp){
00869         CImageList temp;
00870         temp.Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00871         if(m_bitmapBackgroundFlag)temp.Add(bmp,m_bitmapBackground);
00872         else temp.Add(bmp,GetSysColor(COLOR_3DFACE));
00873         return ModifyODMenuW(lpstrText,nID,&temp,0);
00874     }
00875     return ModifyODMenuW(lpstrText,nID,NULL,0);
00876 }
00877
00878
00879 BOOL CCJMenu::ModifyODMenuA(const char *lpstrText,const char *OptionText,
00880                             int nIconNormal)
00881 {
00882     USES_CONVERSION;
00883     return ModifyODMenuW(A2W(lpstrText),A2W(OptionText),nIconNormal);//SK: see MFC  Tech Note 059
00884 }
00885
00886 BOOL CCJMenu::ModifyODMenuW(wchar_t *lpstrText,wchar_t *OptionText,
00887                             int nIconNormal)
00888 {
00889     CCJMenuData *mdata;
00890
00891     // Find the old CCJMenuData structure:
00892     CString junk=OptionText;
00893     mdata=FindMenuOption(OptionText);
00894     if(mdata){
00895         if(lpstrText)
00896             mdata->SetWideString(lpstrText);//SK: modified for dynamic allocation
00897         mdata->menuIconNormal = nIconNormal;
00898         mdata->xoffset=-1;
00899         if(nIconNormal>=0){
00900             mdata->xoffset=0;
00901             if(mdata->bitmap)mdata->bitmap->DeleteImageList();
00902             else mdata->bitmap=new(CImageList);
00903             mdata->bitmap->Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
00904             if(!AddBitmapToImageList(mdata->bitmap,nIconNormal)){
00905                 mdata->bitmap->DeleteImageList();
00906                 delete mdata->bitmap;
00907                 mdata->bitmap=NULL;
00908                 mdata->menuIconNormal = nIconNormal = -1;
00909                 mdata->xoffset = -1;
00910             }
00911         }
00912         return(TRUE);
00913     }
00914     return(FALSE);
00915 }
00916
00917 CCJMenuData *CCJMenu::NewODMenu(UINT pos,UINT nFlags,UINT nID,CString string)
00918 {
00919     CCJMenuData *mdata;
00920
00921     mdata = new CCJMenuData;
00922     mdata->menuIconNormal = -1;
00923     mdata->xoffset=-1;
00924 #ifdef UNICODE
00925     mdata->SetWideString((LPCTSTR)string);//SK: modified for dynamic allocation
00926 #else
00927     mdata->SetAnsiString(string);
00928 #endif
00929     mdata->nFlags = nFlags;
00930     mdata->nID = nID;
00931
00932     if(nFlags & MF_POPUP)m_AllSubMenus.Add((HMENU)nID);
00933
00934     if (nFlags&MF_OWNERDRAW){
00935         ASSERT(!(nFlags&MF_STRING));
00936         ModifyMenu(pos,nFlags,nID,(LPCTSTR)mdata);
00937     }
00938     else if (nFlags&MF_STRING){
00939         ASSERT(!(nFlags&MF_OWNERDRAW));
00940         ModifyMenu(pos,nFlags,nID,mdata->GetString());
00941     }
00942     else{
00943         ASSERT(nFlags&MF_SEPARATOR);
00944         ModifyMenu(pos,nFlags,nID);
00945     }
00946
00947     return(mdata);
00948 };
00949
00950 BOOL CCJMenu::LoadToolbars(const UINT *arID,int n)
00951 {
00952     ASSERT(arID);
00953     BOOL returnflag=TRUE;
00954     for(int i=0;i<n;++i){
00955         if(!LoadToolbar(arID[i]))returnflag=FALSE;
00956     }
00957     return(returnflag);
00958 }
00959
00960 BOOL CCJMenu::LoadToolbar(UINT nToolBar)
00961 {
00962     UINT nID;
00963     BOOL returnflag=FALSE;
00964     CToolBar bar;
00965
00966     bar.Create(AfxGetMainWnd());
00967     if(bar.LoadToolBar(nToolBar)){
00968         for(int i=0;i<bar.GetCount();++i){
00969             nID = bar.GetItemID(i);
00970             if(nID && GetMenuState(nID, MF_BYCOMMAND)
00971                 !=0xFFFFFFFF){
00972                 ModifyODMenu(NULL,nID,nToolBar);
00973             }
00974         }
00975         returnflag=TRUE;
00976     }
00977     return(returnflag);
00978 }
00979
00980 BOOL CCJMenu::LoadFromToolBar(UINT nID,UINT nToolBar,int& xoffset)
00981 {
00982     int xset,offset;
00983     UINT nStyle;
00984     BOOL returnflag=FALSE;
00985     CToolBar bar;
00986
00987     bar.Create(AfxGetMainWnd());
00988     if(bar.LoadToolBar(nToolBar)){
00989         offset=bar.CommandToIndex(nID);
00990         if(offset>=0){
00991             bar.GetButtonInfo(offset,nID,nStyle,xset);
00992             if(xset>0)xoffset=xset;
00993             returnflag=TRUE;
00994         }
00995     }
00996     return(returnflag);
00997 }
00998
00999 CCJMenu *CCJMenu::FindMenuOption(int nId,int& nLoc)
01000 {
01001     int i;
01002     CCJMenu *psubmenu,*pgoodmenu;
01003
01004     for(i=0;i<(int)(GetMenuItemCount());++i){
01005 #ifdef _CPPRTTI
01006         psubmenu=dynamic_cast<CCJMenu *>(GetSubMenu(i));
01007 #else
01008         psubmenu=(CCJMenu *)GetSubMenu(i);
01009 #endif
01010         if(psubmenu){
01011             pgoodmenu=psubmenu->FindMenuOption(nId,nLoc);
01012             if(pgoodmenu)return(pgoodmenu);
01013         }
01014         else if(nId==(int)GetMenuItemID(i)){
01015             nLoc=i;
01016             return(this);
01017         }
01018     }
01019     nLoc = -1;
01020     return(NULL);
01021 }
01022
01023 CCJMenuData *CCJMenu::FindMenuOption(wchar_t *lpstrText)
01024 {
01025     int i,j;
01026     CCJMenu *psubmenu;
01027     CCJMenuData *pmenulist;
01028
01029     for(i=0;i<(int)(GetMenuItemCount());++i){
01030 #ifdef _CPPRTTI
01031         psubmenu=dynamic_cast<CCJMenu *>(GetSubMenu(i));
01032 #else
01033         psubmenu=(CCJMenu *)GetSubMenu(i);
01034 #endif
01035         if(psubmenu){
01036             pmenulist=psubmenu->FindMenuOption(lpstrText);
01037             if(pmenulist)return(pmenulist);
01038         }
01039         else{
01040             const wchar_t *szWide;//SK: we use const to prevent misuse of this Ptr
01041             for(j=0;j<=m_MenuList.GetUpperBound();++j){
01042                 szWide = m_MenuList[j]->GetWideString ();
01043                 if(szWide && !wcscmp(lpstrText,szWide))//SK: modified for dynamic allocation
01044                     return(m_MenuList[j]);
01045             }
01046         }
01047     }
01048     return(NULL);
01049 }
01050
01051
01052 BOOL CCJMenu::LoadMenu(int nResource)
01053 {
01054     return(CCJMenu::LoadMenu(MAKEINTRESOURCE(nResource)));
01055 };
01056
01057 BOOL CCJMenu::LoadMenu(LPCTSTR lpszResourceName)
01058 {
01059     TRACE(_T(
01060         "IMPORTANT:Use CCJMenu::DestroyMenu to destroy Loaded Menu's\n"));
01061     ASSERT_VALID(this);
01062     ASSERT(lpszResourceName != NULL);
01063
01064     // Find the Menu Resource:
01065     HINSTANCE m_hInst = AfxFindResourceHandle(lpszResourceName,RT_MENU);
01066     HRSRC hRsrc = ::FindResource(m_hInst,lpszResourceName,RT_MENU);
01067     if(hRsrc == NULL)return FALSE;
01068
01069     // Get size of resource:
01070
01071     DWORD dwSize = SizeofResource(NULL, hRsrc);
01072
01073     // Load the Menu Resource:
01074
01075     HGLOBAL hGlobal = LoadResource(m_hInst, hRsrc);
01076     if(hGlobal == NULL)return FALSE;
01077
01078     // Attempt to create us as a menu...
01079
01080     if(!CMenu::CreateMenu())return FALSE;
01081
01082     // Get Item template Header, and calculate offset of MENUITEMTEMPLATES
01083
01084     MENUITEMTEMPLATEHEADER *pTpHdr=
01085         (MENUITEMTEMPLATEHEADER*)LockResource(hGlobal);
01086     BYTE* pTp=(BYTE*)pTpHdr +
01087         (sizeof(MENUITEMTEMPLATEHEADER) + pTpHdr->offset);
01088
01089
01090     // Variables needed during processing of Menu Item Templates:
01091
01092     int j=0;
01093     CCJMenuData*  pData = NULL;              // New OD Menu Item Data
01094     WORD    dwFlags = 0;              // Flags of the Menu Item
01095     WORD    dwID  = 0;              // ID of the Menu Item
01096     UINT    uFlags;                  // Actual Flags.
01097     wchar_t *szCaption=NULL;
01098     int      nLen   = 0;                // Length of caption
01099     CTypedPtrArray<CPtrArray, CCJMenu*>  m_Stack;    // Popup menu stack
01100     CArray<BOOL,BOOL>  m_StackEnd;    // Popup menu stack
01101     m_Stack.Add(this);                  // Add it to this...
01102     m_StackEnd.Add(FALSE);
01103
01104     do{
01105         // Obtain Flags and (if necessary), the ID...
01106         memcpy(&dwFlags, pTp, sizeof(WORD));pTp+=sizeof(WORD);// Obtain Flags
01107         if(!(dwFlags & MF_POPUP)){
01108             memcpy(&dwID, pTp, sizeof(WORD)); // Obtain ID
01109             pTp+=sizeof(WORD);
01110         }
01111         else dwID = 0;
01112
01113         uFlags = (UINT)dwFlags; // Remove MF_END from the flags that will
01114         if(uFlags & MF_END) // be passed to the Append(OD)Menu functions.
01115             uFlags -= MF_END;
01116
01117         // Obtain Caption (and length)
01118
01119         nLen = 0;
01120         char *ch = (char*)pTp;
01121         szCaption=new wchar_t[wcslen((wchar_t *)pTp)+1];
01122         wcscpy(szCaption,(wchar_t *)pTp);
01123         pTp=&pTp[(wcslen((wchar_t *)pTp)+1)*sizeof(wchar_t)];//modified SK
01124
01125         // Handle popup menus first....
01126
01127         //WideCharToMultiByte
01128         if(dwFlags & MF_POPUP){
01129             if(dwFlags & MF_END)m_StackEnd.SetAt(m_Stack.GetUpperBound(),TRUE);
01130             CCJMenu* pSubMenu = new CCJMenu;
01131             pSubMenu->m_unselectcheck=m_unselectcheck;
01132             pSubMenu->m_selectcheck=m_selectcheck;
01133             pSubMenu->checkmaps=checkmaps;
01134             pSubMenu->checkmapsshare=TRUE;
01135             pSubMenu->CreatePopupMenu();
01136
01137             // Append it to the top of the stack:
01138
01139             m_Stack[m_Stack.GetUpperBound()]->AppendODMenuW(szCaption,uFlags,
01140                 (UINT)pSubMenu->m_hMenu, -1);
01141             m_Stack.Add(pSubMenu);
01142             m_StackEnd.Add(FALSE);
01143         }
01144         else {
01145             m_Stack[m_Stack.GetUpperBound()]->AppendODMenuW(szCaption, uFlags,
01146                 dwID, -1);
01147             if(dwFlags & MF_END)m_StackEnd.SetAt(m_Stack.GetUpperBound(),TRUE);
01148             j = m_Stack.GetUpperBound();
01149             while(j>=0 && m_StackEnd.GetAt(j)){
01150                 m_Stack[m_Stack.GetUpperBound()]->InsertSpaces();
01151                 m_Stack.RemoveAt(j);
01152                 m_StackEnd.RemoveAt(j);
01153                 --j;
01154             }
01155         }
01156
01157         delete[] szCaption;
01158     }while(m_Stack.GetUpperBound() != -1);
01159
01160     for(int i=0;i<(int)GetMenuItemCount();++i){
01161         CString str=m_MenuList[i]->GetString();
01162
01163         if(GetSubMenu(i)){
01164             m_MenuList[i]->nFlags=MF_POPUP|MF_BYPOSITION;
01165             ModifyMenu(i,MF_POPUP|MF_BYPOSITION,
01166                 (UINT)GetSubMenu(i)->m_hMenu,str);
01167         }
01168         else{
01169             m_MenuList[i]->nFlags=MF_STRING|MF_BYPOSITION;
01170             ModifyMenu(i,MF_STRING|MF_BYPOSITION,m_MenuList[i]->nID,str);
01171         }
01172     }
01173
01174     return(TRUE);
01175 }
01176
01177 void CCJMenu::InsertSpaces(void)
01178 {
01179     int i,j,numitems,maxlength;
01180     CString string,newstring;
01181     CSize t;
01182     CFont m_fontMenu;
01183     LOGFONT m_lf;
01184
01185     ZeroMemory ((PVOID) &m_lf,sizeof (LOGFONT));
01186     NONCLIENTMETRICS nm;
01187     nm.cbSize = sizeof (NONCLIENTMETRICS);
01188     VERIFY (SystemParametersInfo (SPI_GETNONCLIENTMETRICS,nm.cbSize,&nm,0));
01189     m_lf =  nm.lfMenuFont;
01190     m_fontMenu.CreateFontIndirect (&m_lf);
01191
01192     CWnd *pWnd = AfxGetMainWnd();
01193     CDC *pDC = pWnd->GetDC();
01194     CFont* pFont = pDC->SelectObject (&m_fontMenu);
01195
01196     numitems=GetMenuItemCount();
01197     maxlength = -1;
01198     for(i=0;i<numitems;++i){
01199         string=m_MenuList[i]->GetString();
01200         j=string.Find((char)9);
01201         newstring.Empty();
01202         if(j!=-1)newstring=string.Left(j);
01203         else newstring=string;
01204         newstring+=_T(" ");//SK: modified for Unicode correctness.
01205         LPCTSTR lpstrText = (LPCTSTR)newstring;
01206         t=pDC->GetTextExtent(lpstrText,_tcslen(lpstrText));
01207         if(t.cx>maxlength)maxlength = t.cx;
01208     }
01209     for(i=0;i<numitems;++i){
01210         string=m_MenuList[i]->GetString();
01211         j=string.Find((char)9);
01212         if(j!=-1){
01213             newstring.Empty();
01214             newstring=string.Left(j);
01215             LPCTSTR lpstrText = (LPCTSTR)(newstring);
01216             t=pDC->GetTextExtent(lpstrText,_tcslen(lpstrText));
01217             while(t.cx<maxlength){
01218                 newstring+=_T(' ');//SK: modified for Unicode correctness
01219                 LPCTSTR lpstrText = (LPCTSTR)(newstring);
01220                 t=pDC->GetTextExtent(lpstrText,_tcslen(lpstrText));
01221             }
01222             newstring+=string.Mid(j);
01223 #ifdef UNICODE
01224             m_MenuList[i]->SetWideString(newstring);//SK: modified for dynamic allocation
01225 #else
01226             m_MenuList[i]->SetAnsiString(newstring);
01227 #endif
01228         }
01229     }
01230     pDC->SelectObject (pFont);              // Select old font in
01231     AfxGetMainWnd()->ReleaseDC(pDC);       // Release the DC
01232     m_fontMenu.DeleteObject();
01233 }
01234
01235 void CCJMenu::LoadCheckmarkBitmap(int unselect, int select)
01236 {
01237     if(unselect>0 && select>0){
01238         m_selectcheck=select;
01239         m_unselectcheck=unselect;
01240         if(checkmaps)checkmaps->DeleteImageList();
01241         else checkmaps=new(CImageList);
01242         checkmaps->Create(m_iconX,m_iconY,ILC_MASK,2,1);
01243         BOOL flag1=AddBitmapToImageList(checkmaps,unselect);
01244         BOOL flag2=AddBitmapToImageList(checkmaps,select);
01245         if(!flag1||!flag2){
01246             checkmaps->DeleteImageList();
01247             delete checkmaps;
01248             checkmaps=NULL;
01249         }
01250     }
01251 }
01252
01253 //--------------------------------------------------------------------------
01254 //[18.06.99 rj]
01255 BOOL CCJMenu::GetMenuText(UINT id, CString& string, UINT nFlags/*= MF_BYPOSITION*/)
01256 {
01257     BOOL returnflag=FALSE;
01258
01259     if(MF_BYPOSITION&nFlags){
01260         UINT numMenuItems = m_MenuList.GetUpperBound();
01261         if(id<=numMenuItems){
01262             string=m_MenuList[id]->GetString();
01263             returnflag=TRUE;
01264         }
01265     }
01266     else{
01267         int uiLoc;
01268         CCJMenu* pMenu = FindMenuOption(id,uiLoc);
01269         if(NULL!=pMenu) returnflag = pMenu->GetMenuText(uiLoc,string);
01270     }
01271     return(returnflag);
01272 }
01273
01274
01275 void CCJMenu::DrawRadioDot(CDC *pDC,int x,int y,COLORREF color)
01276 {
01277     CRect rcDot(x,y,x+6,y+6);
01278     CBrush brush;
01279     CPen pen;
01280     brush.CreateSolidBrush(color);
01281     pen.CreatePen(PS_SOLID,0,color);
01282     CBrush *pOldBrush=pDC->SelectObject(&brush);
01283     CPen *pOldPen=pDC->SelectObject(&pen);
01284     pDC->Ellipse(&rcDot);
01285     pDC->SelectObject(pOldBrush);
01286     pDC->SelectObject(pOldPen);
01287     pen.DeleteObject();
01288     brush.DeleteObject();
01289 }
01290
01291 void CCJMenu::DrawCheckMark(CDC* pDC,int x,int y,COLORREF color)
01292 {
01293     pDC->SetPixel(x,y+2,color);
01294     pDC->SetPixel(x,y+3,color);
01295     pDC->SetPixel(x,y+4,color);
01296
01297     pDC->SetPixel(x+1,y+3,color);
01298     pDC->SetPixel(x+1,y+4,color);
01299     pDC->SetPixel(x+1,y+5,color);
01300
01301     pDC->SetPixel(x+2,y+4,color);
01302     pDC->SetPixel(x+2,y+5,color);
01303     pDC->SetPixel(x+2,y+6,color);
01304
01305     pDC->SetPixel(x+3,y+3,color);
01306     pDC->SetPixel(x+3,y+4,color);
01307     pDC->SetPixel(x+3,y+5,color);
01308
01309     pDC->SetPixel(x+4,y+2,color);
01310     pDC->SetPixel(x+4,y+3,color);
01311     pDC->SetPixel(x+4,y+4,color);
01312
01313     pDC->SetPixel(x+5,y+1,color);
01314     pDC->SetPixel(x+5,y+2,color);
01315     pDC->SetPixel(x+5,y+3,color);
01316
01317     pDC->SetPixel(x+6,y,color);
01318     pDC->SetPixel(x+6,y+1,color);
01319     pDC->SetPixel(x+6,y+2,color);
01320 }
01321
01322 CCJMenuData *CCJMenu::FindMenuList(UINT nID)
01323 {
01324     for(int i=0;i<=m_MenuList.GetUpperBound();++i){
01325         if(m_MenuList[i]->nID==nID && !m_MenuList[i]->syncflag){
01326             m_MenuList[i]->syncflag=1;
01327             return(m_MenuList[i]);
01328         }
01329     }
01330     return(NULL);
01331 }
01332
01333 void CCJMenu::InitializeMenuList(int value)
01334 {
01335     for(int i=0;i<=m_MenuList.GetUpperBound();++i)
01336         m_MenuList[i]->syncflag=value;
01337 }
01338
01339 void CCJMenu::DeleteMenuList(void)
01340 {
01341     for(int i=0;i<=m_MenuList.GetUpperBound();++i){
01342         if(!m_MenuList[i]->syncflag){
01343             delete m_MenuList[i];
01344         }
01345     }
01346 }
01347
01348 void CCJMenu::SynchronizeMenu(void)
01349 {
01350     CTypedPtrArray<CPtrArray, CCJMenuData*> temp;
01351     CCJMenuData *mdata;
01352     CString string;
01353     UINT submenu,nID=0,state,j;
01354
01355     InitializeMenuList(0);
01356     for(j=0;j<GetMenuItemCount();++j){
01357         mdata=NULL;
01358         state=GetMenuState(j,MF_BYPOSITION);
01359         if(state&MF_POPUP){
01360             submenu=(UINT)GetSubMenu(j)->m_hMenu;
01361             mdata=FindMenuList(submenu);
01362             GetMenuString(j,string,MF_BYPOSITION);
01363             if(!mdata)mdata=NewODMenu(j,
01364                 (state&0xFF)|MF_BYPOSITION|MF_POPUP|MF_OWNERDRAW,submenu,string);
01365             else if(string.GetLength()>0)
01366 #ifdef UNICODE
01367                 mdata->SetWideString(string);  //SK: modified for dynamic allocation
01368 #else
01369             mdata->SetAnsiString(string);
01370 #endif
01371         }
01372         else if(state&MF_SEPARATOR){
01373             mdata=FindMenuList(0);
01374             if(!mdata)mdata=NewODMenu(j,
01375                 state|MF_BYPOSITION|MF_SEPARATOR|MF_OWNERDRAW,0,_T(""));//SK: modified for Unicode correctness
01376             else ModifyMenu(j,mdata->nFlags,nID,(LPCTSTR)mdata);
01377         }
01378         else{
01379             nID=GetMenuItemID(j);
01380             mdata=FindMenuList(nID);
01381             GetMenuString(j,string,MF_BYPOSITION);
01382             if(!mdata)mdata=NewODMenu(j,state|MF_BYPOSITION|MF_OWNERDRAW,
01383                 nID,string);
01384             else{
01385                 mdata->nFlags=state|MF_BYPOSITION|MF_OWNERDRAW;
01386                 if(string.GetLength()>0)
01387 #ifdef UNICODE
01388                     mdata->SetWideString(string);//SK: modified for dynamic allocation
01389 #else
01390                 mdata->SetAnsiString(string);
01391 #endif
01392
01393                 ModifyMenu(j,mdata->nFlags,nID,(LPCTSTR)mdata);
01394             }
01395         }
01396         if(mdata)temp.Add(mdata);
01397     }
01398     DeleteMenuList();
01399     m_MenuList.RemoveAll();
01400     m_MenuList.Append(temp);
01401     temp.RemoveAll();
01402 }
01403
01404 void CCJMenu::UpdateMenu(CMenu *pmenu)
01405 {
01406 #ifdef _CPPRTTI
01407     CCJMenu *psubmenu = dynamic_cast<CCJMenu *>(pmenu);
01408 #else
01409     CCJMenu *psubmenu = (CCJMenu *)pmenu;
01410 #endif
01411     if(psubmenu)psubmenu->SynchronizeMenu();
01412 }
01413
01414 LRESULT CCJMenu::FindKeyboardShortcut(UINT nChar, UINT nFlags,
01415                                       CMenu *pMenu)
01416 {
01417 #ifdef _CPPRTTI
01418     CCJMenu *pCCJMenu = dynamic_cast<CCJMenu *>(pMenu);
01419 #else
01420     CCJMenu *pCCJMenu = (CCJMenu *)pMenu;
01421 #endif
01422     if(pCCJMenu && nFlags&MF_POPUP){
01423         CString key(_T('&'),2);//SK: modified for Unicode correctness
01424         key.SetAt(1,(TCHAR)nChar);
01425         key.MakeLower();
01426         CString menutext;
01427         int menusize = (int)pCCJMenu->GetMenuItemCount();
01428         if(menusize!=(pCCJMenu->m_MenuList.GetUpperBound()+1))
01429             pCCJMenu->SynchronizeMenu();
01430         for(int i=0;i<menusize;++i){
01431             if(pCCJMenu->GetMenuText(i,menutext)){
01432                 menutext.MakeLower();
01433                 if(menutext.Find(key)>=0)return(MAKELRESULT(i,2));
01434             }
01435         }
01436     }
01437     return(0);
01438 }
01439
01440 void CCJMenu::DitherBlt (HDC hdcDest, int nXDest, int nYDest, int nWidth,
01441                          int nHeight, HBITMAP hbm, int nXSrc, int nYSrc)
01442 {
01443     ASSERT(hdcDest && hbm);
01444     ASSERT(nWidth > 0 && nHeight > 0);
01445
01446     // Create a generic DC for all BitBlts
01447     HDC hDC = CreateCompatibleDC(hdcDest);
01448     ASSERT(hDC);
01449
01450     if (hDC)
01451     {
01452         // Create a DC for the monochrome DIB section
01453         HDC bwDC = CreateCompatibleDC(hDC);
01454         ASSERT(bwDC);
01455
01456         if (bwDC)
01457         {
01458             // Create the monochrome DIB section with a black and white palette
01459             struct {
01460                 BITMAPINFOHEADER bmiHeader;
01461                 RGBQUAD      bmiColors[2];
01462             } RGBBWBITMAPINFO = {
01463
01464                 {    // a BITMAPINFOHEADER
01465                     sizeof(BITMAPINFOHEADER),  // biSize
01466                         nWidth,         // biWidth;
01467                         nHeight,        // biHeight;
01468                         1,            // biPlanes;
01469                         1,            // biBitCount
01470                         BI_RGB,         // biCompression;
01471                         0,            // biSizeImage;
01472                         0,            // biXPelsPerMeter;
01473                         0,            // biYPelsPerMeter;
01474                         0,            // biClrUsed;
01475                         0            // biClrImportant;
01476                 },
01477                 {
01478                     { 0x00, 0x00, 0x00, 0x00 }, { 0xFF, 0xFF, 0xFF, 0x00 }
01479                     }
01480             };
01481             VOID *pbitsBW;
01482             HBITMAP hbmBW = CreateDIBSection(bwDC,
01483                 (LPBITMAPINFO)&RGBBWBITMAPINFO, DIB_RGB_COLORS, &pbitsBW, NULL, 0);
01484             ASSERT(hbmBW);
01485
01486             if (hbmBW)
01487             {
01488                 // Attach the monochrome DIB section and the bitmap to the DCs
01489                 HBITMAP olddib = (HBITMAP)SelectObject(bwDC, hbmBW);
01490                 HBITMAP hdcolddib = (HBITMAP)SelectObject(hDC, hbm);
01491
01492                 // BitBlt the bitmap into the monochrome DIB section
01493                 BitBlt(bwDC, 0, 0, nWidth, nHeight, hDC, nXSrc, nYSrc, SRCCOPY);
01494
01495                 // Paint the destination rectangle in gray
01496                 FillRect(hdcDest, CRect(nXDest, nYDest, nXDest + nWidth, nYDest +
01497                     nHeight), GetSysColorBrush((IsNewShell())?COLOR_3DFACE:COLOR_MENU));
01498                 //SK: looks better on the old shell
01499                 // BitBlt the black bits in the monochrome bitmap into COLOR_3DHILIGHT
01500                 // bits in the destination DC
01501                 // The magic ROP comes from the Charles Petzold's book
01502                 HBRUSH hb = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT));
01503                 HBRUSH oldBrush = (HBRUSH)SelectObject(hdcDest, hb);
01504                 BitBlt(hdcDest,nXDest+1,nYDest+1,nWidth,nHeight,bwDC,0,0,0xB8074A);
01505
01506                 // BitBlt the black bits in the monochrome bitmap into COLOR_3DSHADOW
01507                 // bits in the destination DC
01508                 hb = CreateSolidBrush(GetSysColor(COLOR_3DSHADOW));
01509                 DeleteObject(SelectObject(hdcDest, hb));
01510                 BitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight,bwDC,0,0,0xB8074A);
01511                 DeleteObject(SelectObject(hdcDest, oldBrush));
01512                 VERIFY(DeleteObject(SelectObject(bwDC, olddib)));
01513                 SelectObject(hDC, hdcolddib);
01514             }
01515
01516             VERIFY(DeleteDC(bwDC));
01517         }
01518
01519         VERIFY(DeleteDC(hDC));
01520     }
01521 }
01522
01523 BOOL CCJMenu::AddBitmapToImageList(CImageList *bmplist,UINT nResourceID)
01524 {
01525     BOOL bReturn=TRUE;
01526
01527     HBITMAP hbmp=LoadSysColorBitmap(nResourceID);
01528     if(hbmp){
01529         CBitmap bmp;
01530         bmp.Attach(hbmp);
01531         if(m_bitmapBackgroundFlag) bmplist->Add(&bmp,m_bitmapBackground);
01532         else bmplist->Add(&bmp,GetSysColor(COLOR_3DFACE));
01533         bmp.Detach();
01534         DeleteObject(hbmp);
01535         bReturn=TRUE;
01536     }
01537     else bReturn = FALSE;
01538     return(bReturn);
01539 }
01540
01541 void CCJMenu::SetBitmapBackground(COLORREF color)
01542 {
01543     m_bitmapBackground=color;
01544     m_bitmapBackgroundFlag=TRUE;
01545 }
01546
01547 void CCJMenu::UnSetBitmapBackground(void)
01548 {
01549     m_bitmapBackgroundFlag=FALSE;
01550 }
01551
01552 // Given a toolbar, append all the options from it to this menu
01553 // Passed a ptr to the toolbar object and the toolbar ID
01554 // Author : Robert Edward Caldecott
01555 void CCJMenu::AddFromToolBar(CToolBar* pToolBar, int nResourceID)
01556 {
01557     for (int i = 0; i < pToolBar->GetCount(); i++) {
01558         UINT nID = pToolBar->GetItemID(i);
01559         // See if this toolbar option
01560         // appears as a command on this
01561         // menu or is a separator
01562         if (nID == 0 || GetMenuState(nID, MF_BYCOMMAND) == 0xFFFFFFFF)
01563             continue; // Item doesn't exist
01564         UINT nStyle;
01565         int nImage;
01566         // Get the toolbar button info
01567         pToolBar->GetButtonInfo(i, nID, nStyle, nImage);
01568         // OK, we have the command ID of the toolbar
01569         // option, and the tollbar bitmap offset
01570         int nLoc;
01571         CCJMenuData* pData;
01572         CCJMenu *pSubMenu = FindMenuOption(nID, nLoc);
01573         if (pSubMenu && nLoc >= 0)pData = pSubMenu->m_MenuList[nLoc];
01574         else {
01575             // Create a new CCJMenuData structure
01576             pData = new CCJMenuData;
01577             m_MenuList.Add(pData);
01578         }
01579         // Set some default structure members
01580         pData->menuIconNormal = nResourceID;
01581         pData->nID = nID;
01582         pData->nFlags =  MF_BYCOMMAND | MF_OWNERDRAW;
01583         pData->xoffset = nImage;
01584         if (pData->bitmap)pData->bitmap->DeleteImageList();
01585         else pData->bitmap = new CImageList;
01586         pData->bitmap->Create(m_iconX, m_iconY,ILC_COLORDDB|ILC_MASK, 1, 1);
01587
01588         if(!AddBitmapToImageList(pData->bitmap, nResourceID)){
01589             pData->bitmap->DeleteImageList();
01590             delete pData->bitmap;
01591             pData->bitmap=NULL;
01592             pData->menuIconNormal = -1;
01593             pData->xoffset = -1;
01594         }
01595
01596         // Modify our menu
01597         ModifyMenu(nID,pData->nFlags,nID,(LPCTSTR)pData);
01598     }
01599 }
01600
01601 BOOL CCJMenu::Draw3DCheckmark(CDC *dc, const CRect& rc,
01602                               BOOL bSelected, HBITMAP hbmCheck)
01603 {
01604     CRect rcDest = rc;
01605     CBrush brush;
01606     COLORREF col=GetSysColor((bSelected||!IsNewShell())?COLOR_MENU:COLOR_3DLIGHT);//SK: Looks better on the old shell
01607     brush.CreateSolidBrush(col);
01608     dc->FillRect(rcDest,&brush);
01609     brush.DeleteObject();
01610     if (IsNewShell()) //SK: looks better on the old shell
01611         dc->DrawEdge(&rcDest, BDR_SUNKENOUTER, BF_RECT);
01612     if (!hbmCheck)DrawCheckMark(dc,rc.left+4,rc.top+4,GetSysColor(COLOR_MENUTEXT));
01613     else DrawRadioDot(dc,rc.left+5,rc.top+4,GetSysColor(COLOR_MENUTEXT));
01614     return TRUE;
01615 }
01616
01617 void CCJMenu::DitherBlt2(CDC *drawdc, int nXDest, int nYDest, int nWidth,
01618                          int nHeight, CBitmap &bmp, int nXSrc, int nYSrc)
01619 {
01620     // create a monochrome memory DC
01621     CDC ddc;
01622     ddc.CreateCompatibleDC(0);
01623     CBitmap bwbmp;
01624     bwbmp.CreateCompatibleBitmap(&ddc, nWidth, nHeight);
01625     CBitmap * pddcOldBmp = ddc.SelectObject(&bwbmp);
01626
01627     CDC dc;
01628     dc.CreateCompatibleDC(0);
01629     CBitmap * pdcOldBmp = dc.SelectObject(&bmp);
01630
01631     // build a mask
01632     ddc.PatBlt(0, 0, nWidth, nHeight, WHITENESS);
01633     dc.SetBkColor(GetSysColor(COLOR_BTNFACE));
01634     ddc.BitBlt(0, 0, nWidth, nHeight, &dc, nXSrc,nYSrc, SRCCOPY);
01635     dc.SetBkColor(GetSysColor(COLOR_BTNHILIGHT));
01636     ddc.BitBlt(0, 0, nWidth, nHeight, &dc, nXSrc,nYSrc, SRCPAINT);
01637
01638     // Copy the image from the toolbar into the memory DC
01639     // and draw it (grayed) back into the toolbar.
01640     dc.FillSolidRect(0,0, nWidth, nHeight, GetSysColor((IsNewShell())?COLOR_3DFACE:COLOR_MENU));
01641     //SK: Looks better on the old shell
01642     dc.SetBkColor(RGB(0, 0, 0));
01643     dc.SetTextColor(RGB(255, 255, 255));
01644     CBrush brShadow, brHilight;
01645     brHilight.CreateSolidBrush(GetSysColor(COLOR_BTNHILIGHT));
01646     brShadow.CreateSolidBrush(GetSysColor(COLOR_BTNSHADOW));
01647     CBrush * pOldBrush = dc.SelectObject(&brHilight);
01648     dc.BitBlt(0,0, nWidth, nHeight, &ddc, 0, 0, 0x00E20746L);
01649     drawdc->BitBlt(nXDest+1,nYDest+1,nWidth, nHeight, &dc,0,0,SRCCOPY);
01650     dc.BitBlt(1,1, nWidth, nHeight, &ddc, 0, 0, 0x00E20746L);
01651     dc.SelectObject(&brShadow);
01652     dc.BitBlt(0,0, nWidth, nHeight, &ddc, 0, 0, 0x00E20746L);
01653     drawdc->BitBlt(nXDest,nYDest,nWidth, nHeight, &dc,0,0,SRCCOPY);
01654     // reset DCs
01655     ddc.SelectObject(pddcOldBmp);
01656     ddc.DeleteDC();
01657     dc.SelectObject(pOldBrush);
01658     dc.SelectObject(pdcOldBmp);
01659     dc.DeleteDC();
01660
01661     brShadow.DeleteObject();
01662     brHilight.DeleteObject();
01663     bwbmp.DeleteObject();
01664 }
01665
01666 void CCJMenu::SetDisableOldStyle(void)
01667 {
01668     disable_old_style=TRUE;
01669 }
01670
01671 void CCJMenu::UnSetDisableOldStyle(void)
01672 {
01673     disable_old_style=FALSE;
01674 }
01675
01676 BOOL CCJMenu::GetDisableOldStyle(void)
01677 {
01678     return(disable_old_style);
01679 }
01680
01681
01682 HBITMAP CCJMenu::LoadSysColorBitmap(int nResourceId)
01683 {
01684     HINSTANCE hInst =
01685         AfxFindResourceHandle(MAKEINTRESOURCE(nResourceId),RT_BITMAP);
01686     HRSRC hRsrc =
01687         ::FindResource(hInst,MAKEINTRESOURCE(nResourceId),RT_BITMAP);
01688     if (hRsrc == NULL)
01689         return NULL;
01690     return AfxLoadSysColorBitmap(hInst, hRsrc, FALSE);
01691 }
01692
01693 BOOL CCJMenu::RemoveMenu(UINT uiId,UINT nFlags)
01694 {
01695     if(MF_BYPOSITION&nFlags){
01696         CCJMenu* pSubMenu = (CCJMenu*) GetSubMenu(uiId);
01697         if(NULL==pSubMenu){
01698             UINT uiCommandId = GetMenuItemID(uiId);
01699             for(int i=0;i<m_MenuList.GetSize(); i++){
01700                 if(m_MenuList[i]->nID==uiCommandId){
01701                     delete m_MenuList.GetAt(i);
01702                     m_MenuList.RemoveAt(i);
01703                     break;
01704                 }
01705             }
01706         }
01707         else{
01708             int numSubMenus = m_SubMenus.GetUpperBound();
01709             for(int m = numSubMenus; m >= 0; m--){
01710                 if(m_SubMenus[m]==pSubMenu->m_hMenu){
01711                     int numAllSubMenus = m_AllSubMenus.GetUpperBound();
01712                     for(int n = numAllSubMenus; n>= 0; n--){
01713                         if(m_AllSubMenus[n]==m_SubMenus[m])m_AllSubMenus.RemoveAt(n);
01714                     }
01715                     m_SubMenus.RemoveAt(m);
01716                 }
01717             }
01718             int num = pSubMenu->GetMenuItemCount();
01719             for(int i=num-1;i>=0;--i)pSubMenu->RemoveMenu(i,MF_BYPOSITION);
01720             for(i=m_MenuList.GetUpperBound();i>=0;i--){
01721                 if(m_MenuList[i]->nID==(UINT)pSubMenu->m_hMenu){
01722                     delete m_MenuList.GetAt(i);
01723                     m_MenuList.RemoveAt(i);
01724                     break;
01725                 }
01726             }
01727             delete pSubMenu;
01728         }
01729     }
01730     else{
01731         int iPosition =0;
01732         CCJMenu* pMenu = FindMenuOption(uiId,iPosition);
01733         if(pMenu)pMenu->RemoveMenu(iPosition,MF_BYPOSITION);
01734     }
01735     return CMenu::RemoveMenu(uiId,nFlags);
01736 }
01737
01738 BOOL CCJMenu::DeleteMenu(UINT uiId,UINT nFlags)
01739 {
01740     if(MF_BYPOSITION&nFlags){
01741         CCJMenu* pSubMenu = (CCJMenu*) GetSubMenu(uiId);
01742         if(NULL==pSubMenu){
01743             UINT uiCommandId = GetMenuItemID(uiId);
01744             for(int i=0;i<m_MenuList.GetSize(); i++){
01745                 if(m_MenuList[i]->nID==uiCommandId){
01746                     delete m_MenuList.GetAt(i);
01747                     m_MenuList.RemoveAt(i);
01748                     break;
01749                 }
01750             }
01751         }
01752         else{
01753             int numSubMenus = m_SubMenus.GetUpperBound();
01754             for(int m = numSubMenus; m >= 0; m--){
01755                 if(m_SubMenus[m]==pSubMenu->m_hMenu){
01756                     int numAllSubMenus = m_AllSubMenus.GetUpperBound();
01757                     for(int n = numAllSubMenus; n>= 0; n--){
01758                         if(m_AllSubMenus[n]==m_SubMenus[m])m_AllSubMenus.RemoveAt(n);
01759                     }
01760                     m_SubMenus.RemoveAt(m);
01761                 }
01762             }
01763             int num = pSubMenu->GetMenuItemCount();
01764             for(int i=num-1;i>=0;--i)pSubMenu->DeleteMenu(i,MF_BYPOSITION);
01765             for(i=m_MenuList.GetUpperBound();i>=0;i--){
01766                 if(m_MenuList[i]->nID==(UINT)pSubMenu->m_hMenu){
01767                     delete m_MenuList.GetAt(i);
01768                     m_MenuList.RemoveAt(i);
01769                     break;
01770                 }
01771             }
01772             delete pSubMenu;
01773         }
01774     }
01775     else{
01776         int iPosition =0;
01777         CCJMenu* pMenu = FindMenuOption(uiId,iPosition);
01778         if(pMenu)pMenu->DeleteMenu(iPosition,MF_BYPOSITION);
01779     }
01780     return CMenu::DeleteMenu(uiId,nFlags);
01781 }
01782
01783
01784 BOOL CCJMenu::AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,int nIconNormal)
01785 {
01786     USES_CONVERSION;
01787     return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),nIconNormal);
01788 }
01789
01790 BOOL CCJMenu::AppendMenuW(UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,int nIconNormal)
01791 {
01792     return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,nIconNormal);
01793 }
01794
01795 BOOL CCJMenu::AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset)
01796 {
01797     USES_CONVERSION;
01798     return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),il,xoffset);
01799 }
01800
01801 BOOL CCJMenu::AppendMenuW(UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CImageList *il,int xoffset)
01802 {
01803     return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,il,xoffset);
01804 }
01805
01806 BOOL CCJMenu::AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CBitmap *bmp)
01807 {
01808     USES_CONVERSION;
01809     return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),bmp);
01810 }
01811
01812 BOOL CCJMenu::AppendMenuW(UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CBitmap *bmp)
01813 {
01814     if(bmp){
01815         CImageList temp;
01816         temp.Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
01817         if(m_bitmapBackgroundFlag)temp.Add(bmp,m_bitmapBackground);
01818         else temp.Add(bmp,GetSysColor(COLOR_3DFACE));
01819         return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,&temp,0);
01820     }
01821     return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,NULL,0);
01822 }
01823
01824 BOOL CCJMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,int nIconNormal)
01825 {
01826     USES_CONVERSION;
01827     return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),nIconNormal);
01828 }
01829
01830 BOOL CCJMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,int nIconNormal)
01831 {
01832     return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,nIconNormal);
01833 }
01834
01835 BOOL CCJMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset)
01836 {
01837     USES_CONVERSION;
01838     return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),il,xoffset);
01839 }
01840
01841 BOOL CCJMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CImageList *il,int xoffset)
01842 {
01843     return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,il,xoffset);
01844 }
01845
01846 BOOL CCJMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CBitmap *bmp)
01847 {
01848     USES_CONVERSION;
01849     return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),bmp);
01850 }
01851
01852 BOOL CCJMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CBitmap *bmp)
01853 {
01854     if(bmp){
01855         CImageList temp;
01856         temp.Create(m_iconX,m_iconY,ILC_COLORDDB|ILC_MASK,1,1);
01857         if(m_bitmapBackgroundFlag)temp.Add(bmp,m_bitmapBackground);
01858         else temp.Add(bmp,GetSysColor(COLOR_3DFACE));
01859         return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,&temp,0);
01860     }
01861     return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,NULL,0);
01862 }
01863
01864 //--------------------------------------------------------------------------
01865 //[21.06.99 rj]
01866 CCJMenu* CCJMenu::AppendODPopupMenuW(wchar_t *lpstrText)
01867 {
01868     CCJMenu* pSubMenu = new CCJMenu;
01869     pSubMenu->m_unselectcheck=m_unselectcheck;
01870     pSubMenu->m_selectcheck=m_selectcheck;
01871     pSubMenu->checkmaps=checkmaps;
01872     pSubMenu->checkmapsshare=TRUE;
01873     pSubMenu->CreatePopupMenu();
01874     AppendODMenuW(lpstrText,MF_POPUP,(UINT)pSubMenu->m_hMenu, -1);
01875     return pSubMenu;
01876 }
01877
01878 //--------------------------------------------------------------------------
01879 //[21.06.99 rj]
01880 CCJMenu* CCJMenu::AppendODPopupMenuA(LPCSTR lpstrText)
01881 {
01882     USES_CONVERSION;
01883     return AppendODPopupMenuW(A2W(lpstrText));
01884 }
01885
01886
01887
01888 //*************************************************************************
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJCaptionPopupWnd.cpp Source File

WinCvs/CJLib/CJLibrary/CJCaptionPopupWnd.cpp

Go to the documentation of this file.
00001 // CJCaptionPopupWnd.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:48 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJCaptionPopupWnd.cpp $
00011  *
00012  * $History: CJCaptionPopupWnd.cpp $
00013  *
00014  * *****************  Version 5  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:43p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Modified resource include for static builds.
00018  *
00019  * Fixed potential resource and memory leak problems.
00020  *
00021  * *****************  Version 4  *****************
00022  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00023  * Updated in $/CodeJockey/CJLibrary
00024  * Updated copyright and contact information.
00025  *
00026  * *****************  Version 3  *****************
00027  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00028  * Updated in $/CodeJockey/CJLibrary
00029  * Added Unicode compliance, thanks to Barry Burton for his help with
00030  * this.
00031  *
00032  * *****************  Version 2  *****************
00033  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00034  * Updated in $/CodeJockey/CJLibrary
00035  *
00036  * *****************  Version 1  *****************
00037  * User: Kirk Stowell Date: 7/14/99    Time: 9:46p
00038  * Created in $/CodeJockey/CJLibrary
00039  * Initial creation. Added popup class as a helper class for the
00040  * CCJCaption class. This class is used to display a popup window which
00041  * contains a child CWnd derived object.
00042  *
00043  ***************************************************************************/
00045
00046
00047 #include "stdafx.h"
00048 #include "CJResource.h"
00049 #include "CJCaptionPopupWnd.h"
00050
00051 #ifdef _DEBUG
00052 #define new DEBUG_NEW
00053 #undef THIS_FILE
00054 static char THIS_FILE[] = __FILE__;
00055 #endif
00056
00058 // CCJCaptionPopupWnd
00059
00060 CCJCaptionPopupWnd::CCJCaptionPopupWnd()
00061 {
00062     m_pChildWnd     = NULL;
00063     m_pChildParent  = NULL;
00064     m_pParentWnd    = NULL;
00065     m_hIconOn       = NULL;
00066     m_hIconOff      = NULL;
00067 }
00068
00069 CCJCaptionPopupWnd::~CCJCaptionPopupWnd()
00070 {
00071     // fix potential resource leak - KStowell - 10-22-99.
00072     _destroyIcon(m_hIconOn);
00073     _destroyIcon(m_hIconOff);
00074     DestroyWindow();
00075 }
00076
00077 BEGIN_MESSAGE_MAP(CCJCaptionPopupWnd, CWnd)
00078     //{{AFX_MSG_MAP(CCJCaptionPopupWnd)
00079     ON_WM_DESTROY()
00080     ON_BN_CLICKED(IDC_CAPT_BUTTON, OnCaptButton)
00081     ON_WM_PAINT()
00082     ON_WM_TIMER()
00083     //}}AFX_MSG_MAP
00084 END_MESSAGE_MAP()
00085
00087 // CCJCaptionPopupWnd message handlers
00088
00089 BOOL CCJCaptionPopupWnd::Create(const CRect& rect, CWnd* pParentWnd, CWnd* pChildWnd)
00090 {
00091     ASSERT(pParentWnd != NULL); // must be valid.
00092     m_pParentWnd = pParentWnd;
00093
00094     ASSERT(pChildWnd  != NULL); // must be valid.
00095     m_pChildWnd = pChildWnd;
00096
00097     // register the wnd class.
00098     CString wndClass = ::AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW,
00099         0, ::GetSysColorBrush(COLOR_BTNFACE));
00100
00101     // define the styles for this window.
00102     DWORD dwStyleEx = WS_EX_TOOLWINDOW;
00103     DWORD dwStyle   = WS_VISIBLE|WS_POPUP|WS_DLGFRAME;
00104
00105     // call the base class for creation.
00106     if( !CWnd::CreateEx( dwStyleEx, wndClass, _T(""), dwStyle, rect.left, rect.top,
00107         rect.Width(), rect.Height(), pParentWnd->GetSafeHwnd(), 0, NULL ))
00108     {
00109         TRACE0( "Failed to create caption popdown window.\n" );
00110         return FALSE;
00111     }
00112
00113     // set the child windows parent to this popup window, save
00114     // the previous parent, since we need to reset this when the
00115     // window is destroyed.
00116     m_pChildParent = m_pChildWnd->SetParent(this);
00117     ASSERT(m_pChildParent != NULL);
00118
00119     // define the caption and client rect.
00120     CRect rcClient;
00121     GetClientRect(&rcClient);
00122     rcClient.DeflateRect(2,2);
00123     CRect rcCapt( rcClient );
00124
00125     // move the window to fit the client area of this window.
00126     rcClient.top += 19;
00127     m_pChildWnd->MoveWindow(rcClient);
00128
00129     // define the size for the push pin caption.
00130     rcCapt.bottom = rcCapt.top + 19;
00131
00132     // Create the caption.
00133     if( !m_Caption.Create( this, _T( "Click push pin to keep open" ), WS_EX_FLATEDGE,
00134         WS_VISIBLE|SS_CENTER|SS_CENTERIMAGE, rcCapt ))
00135     {
00136         TRACE0( "Unable to create caption.\n" );
00137         return FALSE;
00138     }
00139
00140     // define the size for the caption button.
00141     CRect rcButton( rcCapt );
00142     rcButton.DeflateRect(2,2);
00143     rcButton.left = rcButton.right - 16;
00144
00145     // Create the caption button.
00146     if( !m_CaptionButton.Create( NULL, WS_VISIBLE|BS_ICON|BS_OWNERDRAW|BS_CENTER|BS_VCENTER,
00147         rcButton, this, IDC_CAPT_BUTTON ))
00148     {
00149         TRACE0( "Unable to create caption button.\n" );
00150         return FALSE;
00151     }
00152
00153     CImageList imageList;
00154     imageList.Create(IDB_PUSHPIN, 16, 1, RGB(255,0,255));
00155
00156     // Associate the button icon
00157     m_hIconOff = imageList.ExtractIcon(0);
00158     m_hIconOn  = imageList.ExtractIcon(1);
00159     m_CaptionButton.SetIcon(m_hIconOff, m_hIconOn, CSize(16,15));
00160     imageList.DeleteImageList();
00161
00162     // start the timer after everything has been initialized.
00163     SetTimer(1, 10, NULL);
00164
00165     return TRUE;
00166 }
00167
00168 void CCJCaptionPopupWnd::OnDestroy()
00169 {
00170     // set the child window's parent back it's original parent.
00171     m_pChildWnd->SetParent(m_pChildParent);
00172     CWnd::OnDestroy();
00173 }
00174
00175 void CCJCaptionPopupWnd::OnCaptButton()
00176 {
00177     // send message to parent control that push pin button was pressed.
00178     m_pParentWnd->SendMessage(CM_ONPUSHPINBUTTON, 0, 0);
00179 }
00180
00181 void CCJCaptionPopupWnd::OnPaint()
00182 {
00183     CPaintDC dc(this); // device context for painting
00184
00185     CRect rc;
00186     GetClientRect(&rc);
00187     rc.DeflateRect(1,1);
00188
00189     // draw a border for the client area.
00190     dc.Draw3dRect( rc, ::GetSysColor(COLOR_BTNSHADOW),
00191         ::GetSysColor(COLOR_BTNHILIGHT));
00192 }
00193
00194 void CCJCaptionPopupWnd::OnTimer(UINT nIDEvent)
00195 {
00196     UNUSED_ALWAYS( nIDEvent );
00197
00198     // get a handle to the window which currently
00199     // has the input focus...
00200     HWND hWnd_HasFocus      = GetFocus()->GetSafeHwnd();
00201
00202     // get a handle to the caption, caption button, child window
00203     // and popup window...
00204     HWND hWnd_Caption       = m_Caption.GetSafeHwnd();
00205     HWND hWnd_CaptionButton = m_CaptionButton.GetSafeHwnd();
00206     HWND hWnd_Popup         = GetSafeHwnd();
00207     HWND hWnd_PopupChild    = m_pChildWnd->GetSafeHwnd();
00208
00209     // check to see if the window that has input focus is part
00210     // of the caption popup window, if not, send a message
00211     // to the parent control.
00212     if(( hWnd_HasFocus != hWnd_Caption ) &&
00213        ( hWnd_HasFocus != hWnd_CaptionButton ) &&
00214        ( hWnd_HasFocus != hWnd_Popup ) &&
00215        ( hWnd_HasFocus != hWnd_PopupChild ))
00216     {
00217         // send message to parent control that our popup window
00218         // has lost input focus.
00219         m_pParentWnd->SendMessage(CM_ONPUSHPINCANCEL, 0, 0);
00220     }
00221 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsFiles Member List

This is the complete list of members for UCvsFiles, including all inherited members.

_GetBaseClass() | UCvsFiles | [protected, static]
_messageEntries | UCvsFiles | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsFiles | UCvsFiles | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
DisableGeneric(bool needSelection) | UCvsFiles | [protected]
DisableGeneric(void) | UCvsFiles | [protected]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EditSel(EntnodeData *data, bool useDefault=false) | UCvsFiles | [protected]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UCvsFiles | [protected, static]
GetColumnModel() const | UCvsFiles | [inline]
GetCurModal() const | UWidget | [inline]
GetEntriesModTime(time_t &newEntriesMod, time_t &newEntriesLogMod) | UCvsFiles | [protected]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetImageForEntry(EntnodeData *data) | UCvsFiles | [static]
GetMessageMap() const | UCvsFiles | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetPath() const | UCvsFiles | [inline]
GetRuntimeClass() const | UCvsFiles | [virtual]
GetThisMessageMap() | UCvsFiles | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
HideColumns(void) | UCvsFiles | [protected]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsSortAscendant(void) | UCvsFiles | [inline]
IsUIValid() | UWidget | [static]
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
LoadColumns(void) | UCvsFiles | [protected]
m_ascendant | UCvsFiles | [protected]
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_entries | UCvsFiles | [protected]
m_entriesLogMod | UCvsFiles | [protected]
m_entriesMod | UCvsFiles | [protected]
m_isRecursive | UCvsFiles | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_modelColumns | UCvsFiles | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_path | UCvsFiles | [protected]
m_sort | UCvsFiles | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UCvsFiles | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnCmdAdd(void) | UCvsFiles | [protected]
OnCmdAddb(void) | UCvsFiles | [protected]
OnCmdCommit(void) | UCvsFiles | [protected]
OnCmdDiff(void) | UCvsFiles | [protected]
OnCmdEdit(void) | UCvsFiles | [protected]
OnCmdEditors(void) | UCvsFiles | [protected]
OnCmdEditsel(void) | UCvsFiles | [protected]
OnCmdEditseldef(void) | UCvsFiles | [protected]
OnCmdExplore(void) | UCvsFiles | [protected]
OnCmdGraph(void) | UCvsFiles | [protected]
OnCmdLock(void) | UCvsFiles | [protected]
OnCmdLog(void) | UCvsFiles | [protected]
OnCmdQueryUpdate(void) | UCvsFiles | [protected]
OnCmdRelease(void) | UCvsFiles | [protected]
OnCmdResEdit(void) | UCvsFiles | [protected]
OnCmdRmv(void) | UCvsFiles | [protected]
OnCmdStatus(void) | UCvsFiles | [protected]
OnCmdTagBranch(void) | UCvsFiles | [protected]
OnCmdTagDelete(void) | UCvsFiles | [protected]
OnCmdTagNew(void) | UCvsFiles | [protected]
OnCmdTrash(void) | UCvsFiles | [protected]
OnCmdUIAdd(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIAddB(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIEditseldef(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIExplore(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIGraph(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIMacroSel(int cmd, UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIRelease(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIResEdit(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIRmv(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUITrash(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIUpdate(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIUpone(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUIViewRecursive(UCmdUI *pCmdUI) | UCvsFiles | [protected]
OnCmdUnedit(void) | UCvsFiles | [protected]
OnCmdUnlock(void) | UCvsFiles | [protected]
OnCmdUpdate(void) | UCvsFiles | [protected]
OnCmdUpone(void) | UCvsFiles | [protected]
OnCmdWatchers(void) | UCvsFiles | [protected]
OnCmdWatchOff(void) | UCvsFiles | [protected]
OnCmdWatchOn(void) | UCvsFiles | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCreate() | UCvsFiles | [protected]
OnDblClick(void) | UCvsFiles | [protected]
OnDestroy() | UCvsFiles | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnFilteringChanged() | UCvsFiles |
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnMacroSel(int cmd) | UCvsFiles | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnPopup(void) | UCvsFiles | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSelColumn(int column) | UCvsFiles | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
OnViewRecursive(void) | UCvsFiles | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
ProcessSelectionCommand(KiSelectionHandler &handler) | UCvsFiles | [protected]
RemoveTimer(int cmd) | UWidget |
ResetView(UStr path, bool notifyBrowser) | UCvsFiles |
ResetView(const char *path, bool notifyBrowser) | UCvsFiles |
ResetView(bool forceReload, bool notifyBrowser) | UCvsFiles |
Resort(void) | UCvsFiles | [protected]
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsFiles(void) | UCvsFiles | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
SaveColumns(void) | UCvsFiles | [protected]
Search(const char *title) | UCvsFiles | [protected]
SetRecursive(bool isRecursive) | UCvsFiles | [protected]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
ShowColumns(void) | UCvsFiles | [protected]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsFiles() | UCvsFiles |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsFiles() | UCvsFiles | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:51:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoNameColumn Member List

This is the complete list of members for KoNameColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoNameColumn | [inline, virtual]
GetColumnIndex() const | KoNameColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoNameColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoNameColumn | [inline, virtual]
IsDefaultAscending() const | KoNameColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWincvsView Member List

This is the complete list of members for CWincvsView, including all inherited members.

CanPaste() const | CWincvsView | [private]
CWincvsView() | CWincvsView | [protected]
GetCurFormat(bool jumpEnd=true) | CWincvsView |
GetDocument() | CWincvsView | [inline]
IsSelected(const CObject *pDocItem) const | CWincvsView | [protected, virtual]
m_fRtfFormat | CWincvsView | [private]
m_sbuf | CWincvsView | [private]
m_snumbuf | CWincvsView | [private]
m_syncObject | CWincvsView | [private]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CWincvsView | [protected, virtual]
OnContextMenu(CWnd *pWnd, CPoint point) | CWincvsView | [protected]
OnDestroy() | CWincvsView | [protected]
OnDraw(CDC *pDC) | CWincvsView | [virtual]
OnDropFiles(HDROP hDropInfo) | CWincvsView | [protected]
OnEditClearAll() | CWincvsView | [protected]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CWincvsView | [protected, virtual]
OnGetDlgCode() | CWincvsView | [protected]
OnInitialUpdate() | CWincvsView | [protected, virtual]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CWincvsView | [protected]
OnMyFormatFont() | CWincvsView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CWincvsView | [protected, virtual]
OnRButtonDown(UINT nFlags, CPoint point) | CWincvsView | [protected]
OnSetFocus(CWnd *pOldWnd) | CWincvsView | [protected]
OnSize(UINT nType, int cx, int cy) | CWincvsView | [protected]
OutColor(const char *txt, long len) | CWincvsView |
OutColor(kConsoleColor color) | CWincvsView |
OutColor(CHARFORMAT &format) | CWincvsView |
OutConsole(const char *txt, long len, bool isStderr=false) | CWincvsView |
OutLine(const char *buf, int numbuf, bool isStderr) | CWincvsView | [private]
PreCreateWindow(CREATESTRUCT &cs) | CWincvsView | [virtual]
QueryAcceptData(LPDATAOBJECT, CLIPFORMAT *, DWORD, BOOL, HGLOBAL) | CWincvsView | [private, virtual]
~CWincvsView() | CWincvsView | [virtual]

Generated on Sat Aug 7 22:58:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPseudoDraw Member List

This is the complete list of members for CPseudoDraw, including all inherited members.

CPseudoDraw(UWidget *pseudo, int cmdid) | CPseudoDraw |
m_cmdid | CPseudoDraw |
m_pseudo | CPseudoDraw |
OnPaint() | CPseudoDraw | [protected]
~CPseudoDraw() | CPseudoDraw | [virtual]

Generated on Sat Aug 7 22:55:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TagDlg.cpp Source File

common/TagDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- July 1998
00019  */
00020
00021 /*
00022  * TagDlg.cpp : the cvs tag dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "GetPrefs.h"
00030 #endif /* WIN32 */
00031
00032 #if qUnix
00033 #   include "UCvsDialogs.h"
00034 #endif
00035
00036 #ifdef qMacCvsPP
00037 #   include <UModalDialogs.h>
00038 #   include <LMultiPanelView.h>
00039 #   include <LCheckBox.h>
00040 #   include <LEditText.h>
00041 #   include <LPopupGroupBox.h>
00042 #   include <LRadioButton.h>
00043 #   include "LPopupFiller.h"
00044
00045 #   include "MacCvsConstant.h"
00046 #endif /* qMacCvsPP */
00047
00048 #include "TagDlg.h"
00049 #include "CvsPrefs.h"
00050 #include "MultiFiles.h"
00051 #include "UpdateDlg.h"
00052 #include "ItemListDlg.h"
00053
00054 #ifdef WIN32
00055 #   ifdef _DEBUG
00056 #   define new DEBUG_NEW
00057 #   undef THIS_FILE
00058     static char THIS_FILE[] = __FILE__;
00059 #   endif
00060 #endif /* WIN32 */
00061
00062 #ifdef WIN32
00063
00065 // CTag_MAIN property page
00066
00067 IMPLEMENT_DYNAMIC(CTag_MAIN, CHHelpPropertyPage)
00068
00069 CTag_MAIN::CTag_MAIN(const MultiFiles* mf, const kTagCmdType type,
00070                      const char* sLastTag,
00071                      bool noRecurs, bool movDelBranch,
00072                      bool checkUnmod /*= false*/, bool overwriteExisting /*= false*/)
00073                      : m_mf(mf), CHHelpPropertyPage(CTag_MAIN::IDD)
00074 {
00075     //{{AFX_DATA_INIT(CTag_MAIN)
00076     //}}AFX_DATA_INIT
00077
00078     m_type = type;
00079
00080     m_noRecurs = noRecurs;
00081     m_movDelBranch = movDelBranch;
00082     m_checkUnmod = checkUnmod;
00083     m_overwriteExisting = overwriteExisting;
00084     m_tagName = sLastTag;
00085
00086     m_tagCombo.SetItems(&gRevNames);
00087 }
00088
00089 CTag_MAIN::~CTag_MAIN()
00090 {
00091 }
00092
00093 void CTag_MAIN::DoDataExchange(CDataExchange* pDX)
00094 {
00095     CHHelpPropertyPage::DoDataExchange(pDX);
00096     //{{AFX_DATA_MAP(CTag_MAIN)
00097     DDX_Control(pDX, IDC_TAGDESC_TEXT, m_tagDescStatic);
00098     DDX_Control(pDX, IDC_GRPBOX_TEXT, m_grpBox);
00099     DDX_Control(pDX, IDC_OVERWRITE, m_overwriteExistingCheck);
00100     DDX_Control(pDX, IDC_CHECK_UNMODIFIED, m_checkUnmodCheck);
00101     DDX_Control(pDX, IDC_TAGNAME, m_tagCombo);
00102     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00103     DDX_Check(pDX, IDC_CHECK_UNMODIFIED, m_checkUnmod);
00104     DDX_Check(pDX, IDC_OVERWRITE, m_overwriteExisting);
00105     DDX_CBString(pDX, IDC_TAGNAME, m_tagName);
00106     DDX_Check(pDX, IDC_MOVDEL_BRANCH, m_movDelBranch);
00107     //}}AFX_DATA_MAP
00108
00109     DDV_MinChars(pDX, m_tagName, 1);
00110     DDX_ComboMString(pDX, IDC_TAGNAME, m_tagCombo);
00111 }
00112
00113
00114 BEGIN_MESSAGE_MAP(CTag_MAIN, CHHelpPropertyPage)
00115     //{{AFX_MSG_MAP(CTag_MAIN)
00116     ON_BN_CLICKED(IDC_BROWSE_TAG, OnBrowseTag)
00117     //}}AFX_MSG_MAP
00118 END_MESSAGE_MAP()
00119
00121 // CTag_MAIN message handlers
00122
00124 BOOL CTag_MAIN::OnInitDialog()
00125 {
00126     CHHelpPropertyPage::OnInitDialog();
00127
00128     // Set the type-specific data
00129     CString strGrpBox;
00130     CString strTagDesc;
00131
00132     switch( m_type )
00133     {
00134     case kTagCreate:
00135         strGrpBox = _i18n("Enter the tag name to create:");
00136         strTagDesc = _i18n("New tag &name:");
00137         break;
00138     case kTagDelete:
00139         strGrpBox = _i18n("Enter the tag name to delete:");
00140         strTagDesc = _i18n("Delete tag &name:");
00141
00142         m_checkUnmodCheck.ShowWindow(SW_HIDE);
00143         m_overwriteExistingCheck.ShowWindow(SW_HIDE);
00144         break;
00145     case kTagBranch:
00146         strGrpBox = _i18n("Enter the branch name to create:");
00147         strTagDesc = _i18n("New branch &name:");
00148         break;
00149     default:
00150         ASSERT(FALSE); //unknown type
00151     }
00152
00153     m_grpBox.SetWindowText(strGrpBox);
00154     m_tagDescStatic.SetWindowText(strTagDesc);
00155
00156     return TRUE;  // return TRUE unless you set the focus to a control
00157                   // EXCEPTION: OCX Property Pages should return FALSE
00158 }
00159
00160 void CTag_MAIN::InitHelpID()
00161 {
00162     SetCtrlHelpID(IDC_TAGNAME,          IDH_IDC_TAGNAME);
00163     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00164     SetCtrlHelpID(IDC_NORECURS,         IDH_IDC_NORECURS);
00165     SetCtrlHelpID(IDC_MOVDEL_BRANCH,    IDH_IDC_MOVDEL_BRANCH);
00166     SetCtrlHelpID(IDC_CHECK_UNMODIFIED, IDH_IDC_CHECK_UNMODIFIED);
00167     SetCtrlHelpID(IDC_OVERWRITE,        IDH_IDC_OVERWRITE);
00168 }
00169
00171 void CTag_MAIN::OnBrowseTag()
00172 {
00173     CStr tagName;
00174     if( CompatGetTagListItem(m_mf, tagName) )
00175     {
00176         m_tagName = (const char*)tagName;
00177         m_tagCombo.SetWindowText(m_tagName);
00178     }
00179 }
00180
00181 #endif /* WIN32 */
00182
00183 #ifdef qMacCvsPP
00184 static void DoDataExchange_TagCreateMain(LWindow *theDialog, const MultiFiles* mf,
00185     CStr & sLastTag, bool & noRecurs, bool & overwriteExist,
00186     bool & checkUnmod, bool putValue)
00187 {
00188     LEditText *tname = dynamic_cast<LEditText*>
00189         (theDialog->FindPaneByID(item_BranchRev));
00190     LCheckBox *chkNoRecurs = dynamic_cast<LCheckBox*>
00191         (theDialog->FindPaneByID(item_NoRecurs));
00192     LCheckBox *chkOverwrite = dynamic_cast<LCheckBox*>
00193         (theDialog->FindPaneByID(item_OverwriteRev));
00194     LCheckBox *chkUnmod = dynamic_cast<LCheckBox*>
00195         (theDialog->FindPaneByID(item_CheckUnmod));
00196     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*>
00197         (theDialog->FindPaneByID(item_FillerTag));
00198
00199     LTagWrapper *wrapper = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00200     fillTag->DoDataExchange(gRevNames, putValue, wrapper);
00201
00202     if(putValue)
00203     {
00204         chkNoRecurs->SetValue(noRecurs ? Button_On : Button_Off);
00205         chkOverwrite->SetValue(overwriteExist ? Button_On : Button_Off);
00206         chkUnmod->SetValue(checkUnmod ? Button_On : Button_Off);
00207         tname->SetText((Ptr)(const char *)sLastTag, sLastTag.length());
00208     }
00209     else
00210     {
00211         char str[255];
00212         Size len;
00213
00214         tname->GetText(str, 254, &len);
00215         sLastTag.set(str, len);
00216         noRecurs = chkNoRecurs->GetValue() == Button_On;
00217         overwriteExist = chkOverwrite->GetValue() == Button_On;
00218         checkUnmod = chkUnmod->GetValue() == Button_On;
00219     }
00220 }
00221
00222 static void DoDataExchange_TagDeleteMain(LWindow *theDialog, const MultiFiles* mf,
00223     CStr & sLastTag, bool & noRecurs, bool putValue)
00224 {
00225     LEditText *tname = dynamic_cast<LEditText*>
00226         (theDialog->FindPaneByID(item_BranchRev));
00227     LCheckBox *chkNoRecurs = dynamic_cast<LCheckBox*>
00228         (theDialog->FindPaneByID(item_NoRecurs));
00229     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*>
00230         (theDialog->FindPaneByID(item_FillerTag));
00231
00232     LTagWrapper *wrapper = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00233     fillTag->DoDataExchange(gRevNames, putValue, wrapper);
00234
00235     if(putValue)
00236     {
00237         tname->SetText((Ptr)(const char *)sLastTag, sLastTag.length());
00238         chkNoRecurs->SetValue(noRecurs ? Button_On : Button_Off);
00239     }
00240     else
00241     {
00242         noRecurs = chkNoRecurs->GetValue() == Button_On;
00243
00244         char str[255];
00245         Size len;
00246
00247         tname->GetText(str, 254, &len);
00248         sLastTag.set(str, len);
00249     }
00250 }
00251
00252 static void DoDataExchange_TagBranchMain(LWindow *theDialog, const MultiFiles* mf,
00253     CStr & sLastBranch, bool & noRecurs, bool & checkUnmod, bool putValue)
00254 {
00255     LEditText *tname = dynamic_cast<LEditText*>
00256         (theDialog->FindPaneByID(item_BranchRev));
00257     LCheckBox *chkNoRecurs = dynamic_cast<LCheckBox*>
00258         (theDialog->FindPaneByID(item_NoRecurs));
00259     LCheckBox *chkUnmod = dynamic_cast<LCheckBox*>
00260         (theDialog->FindPaneByID(item_CheckUnmod));
00261     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*>
00262         (theDialog->FindPaneByID(item_FillerTag));
00263
00264     LTagWrapper *wrapper = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00265     fillTag->DoDataExchange(gRevNames, putValue, wrapper);
00266
00267     if(putValue)
00268     {
00269         chkNoRecurs->SetValue(noRecurs ? Button_On : Button_Off);
00270         chkUnmod->SetValue(checkUnmod ? Button_On : Button_Off);
00271         tname->SetText((Ptr)(const char *)sLastBranch, sLastBranch.length());
00272     }
00273     else
00274     {
00275         char str[255];
00276         Size len;
00277
00278         tname->GetText(str, 254, &len);
00279         sLastBranch.set(str, len);
00280         noRecurs = chkNoRecurs->GetValue() == Button_On;
00281         checkUnmod = chkUnmod->GetValue() == Button_On;
00282     }
00283 }
00284
00285 static void DoDataExchange_TagBranchOptions(LWindow *theDialog,
00286     bool & noRecurs, bool putValue)
00287 {
00288     LCheckBox *chkNoRecurs = dynamic_cast<LCheckBox*>
00289         (theDialog->FindPaneByID(item_NoRecurs));
00290
00291     if(putValue)
00292     {
00293         chkNoRecurs->SetValue(noRecurs ? Button_On : Button_Off);
00294     }
00295     else
00296     {
00297         noRecurs = chkNoRecurs->GetValue() == Button_On;
00298     }
00299 }
00300 #endif /* qMacCvsPP */
00301
00302 #if qUnix
00303 class UCvsTagCreate : public UWidget
00304 {
00305     UDECLARE_DYNAMIC(UCvsTagCreate)
00306 public:
00307     UCvsTagCreate() : UWidget(::UEventGetWidID()) {}
00308     virtual ~UCvsTagCreate() {}
00309
00310     enum
00311     {
00312         kOK = EV_COMMAND_START, // 0
00313         kCancel,                // 1
00314         kTabGeneral             // 2
00315     };
00316
00317     virtual void DoDataExchange(bool fill);
00318
00319 protected:
00320     ev_msg int OnOK(void);
00321     ev_msg int OnCancel(void);
00322
00323     UDECLARE_MESSAGE_MAP()
00324 };
00325
00326 UIMPLEMENT_DYNAMIC(UCvsTagCreate, UWidget)
00327
00328 UBEGIN_MESSAGE_MAP(UCvsTagCreate, UWidget)
00329     ON_UCOMMAND(UCvsTagCreate::kOK, UCvsTagCreate::OnOK)
00330     ON_UCOMMAND(UCvsTagCreate::kCancel, UCvsTagCreate::OnCancel)
00331 UEND_MESSAGE_MAP()
00332
00333 int UCvsTagCreate::OnOK(void)
00334 {
00335     EndModal(true);
00336     return 0;
00337 }
00338
00339 int UCvsTagCreate::OnCancel(void)
00340 {
00341     EndModal(false);
00342     return 0;
00343 }
00344
00345 void UCvsTagCreate::DoDataExchange(bool fill)
00346 {
00347     if(fill)
00348     {
00349     }
00350     else
00351     {
00352     }
00353 }
00354
00355 class UCvsTagCreate_MAIN : public UWidget
00356 {
00357     UDECLARE_DYNAMIC(UCvsTagCreate_MAIN)
00358 public:
00359     UCvsTagCreate_MAIN(const char * TagsLastTag, bool noRecurs,
00360                        bool overwriteExist, bool checkUnmod);
00361     virtual ~UCvsTagCreate_MAIN() {}
00362
00363     enum
00364     {
00365         kEditTag = EV_COMMAND_START,    // 0
00366         kCheckRecurs,       // 1
00367         kCheckUnmod,        // 2
00368         kCheckOverwrite,    // 3
00369     };
00370
00371     virtual void DoDataExchange(bool fill);
00372
00373     UStr m_tagname;
00374     bool m_norecurs;
00375     bool m_checkunmod;
00376     bool m_overwrite;
00377 protected:
00378
00379     UDECLARE_MESSAGE_MAP()
00380 };
00381
00382 UIMPLEMENT_DYNAMIC(UCvsTagCreate_MAIN, UWidget)
00383
00384 UBEGIN_MESSAGE_MAP(UCvsTagCreate_MAIN, UWidget)
00385 UEND_MESSAGE_MAP()
00386
00387 UCvsTagCreate_MAIN::UCvsTagCreate_MAIN(const char * sLastTag, bool noRecurs,
00388                        bool overwriteExist, bool checkUnmod) : UWidget(::UEventGetWidID())
00389 {
00390     m_tagname = sLastTag;
00391     m_norecurs = noRecurs;
00392     m_checkunmod = checkUnmod;
00393     m_overwrite = overwriteExist;
00394 }
00395
00396 void UCvsTagCreate_MAIN::DoDataExchange(bool fill)
00397 {
00398     ::DoDataExchange(fill, GetWidID(), kEditTag, gRevNames);
00399
00400     if(fill)
00401     {
00402         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditTag, (void *)(const char *)m_tagname);
00403
00404         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckUnmod, m_checkunmod), 0L);
00405         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurs, m_norecurs), 0L);
00406         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckOverwrite, m_overwrite), 0L);
00407     }
00408     else
00409     {
00410         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditTag, &m_tagname);
00411
00412         m_checkunmod = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckUnmod, 0L);
00413         m_norecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurs, 0L);
00414         m_overwrite = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckOverwrite, 0L);
00415     }
00416 }
00417
00418 class UCvsTagDel : public UWidget
00419 {
00420     UDECLARE_DYNAMIC(UCvsTagDel)
00421 public:
00422     UCvsTagDel() : UWidget(::UEventGetWidID()) {}
00423     virtual ~UCvsTagDel() {}
00424
00425     enum
00426     {
00427         kOK = EV_COMMAND_START, // 0
00428         kCancel,                // 1
00429         kTabGeneral             // 2
00430     };
00431
00432     virtual void DoDataExchange(bool fill);
00433
00434 protected:
00435     ev_msg int OnOK(void);
00436     ev_msg int OnCancel(void);
00437
00438     UDECLARE_MESSAGE_MAP()
00439 };
00440
00441 UIMPLEMENT_DYNAMIC(UCvsTagDel, UWidget)
00442
00443 UBEGIN_MESSAGE_MAP(UCvsTagDel, UWidget)
00444     ON_UCOMMAND(UCvsTagDel::kOK, UCvsTagDel::OnOK)
00445     ON_UCOMMAND(UCvsTagDel::kCancel, UCvsTagDel::OnCancel)
00446 UEND_MESSAGE_MAP()
00447
00448 int UCvsTagDel::OnOK(void)
00449 {
00450     EndModal(true);
00451     return 0;
00452 }
00453
00454 int UCvsTagDel::OnCancel(void)
00455 {
00456     EndModal(false);
00457     return 0;
00458 }
00459
00460 void UCvsTagDel::DoDataExchange(bool fill)
00461 {
00462     if(fill)
00463     {
00464     }
00465     else
00466     {
00467     }
00468 }
00469
00470 class UCvsTagDel_MAIN : public UWidget
00471 {
00472     UDECLARE_DYNAMIC(UCvsTagDel_MAIN)
00473 public:
00474     UCvsTagDel_MAIN(const char * sLastTag, bool noRecurs);
00475     virtual ~UCvsTagDel_MAIN() {}
00476
00477     enum
00478     {
00479         kEditTag = EV_COMMAND_START,    // 0
00480         kCheckRecurs        // 1
00481     };
00482
00483     virtual void DoDataExchange(bool fill);
00484
00485     bool m_norecurs;
00486     UStr m_tagname;
00487 protected:
00488
00489     UDECLARE_MESSAGE_MAP()
00490 };
00491
00492 UIMPLEMENT_DYNAMIC(UCvsTagDel_MAIN, UWidget)
00493
00494 UBEGIN_MESSAGE_MAP(UCvsTagDel_MAIN, UWidget)
00495 UEND_MESSAGE_MAP()
00496
00497 UCvsTagDel_MAIN::UCvsTagDel_MAIN(const char * sLastTag, bool noRecurs) : UWidget(::UEventGetWidID())
00498 {
00499     m_norecurs = noRecurs;
00500     m_tagname = sLastTag;
00501 }
00502
00503 void UCvsTagDel_MAIN::DoDataExchange(bool fill)
00504 {
00505     ::DoDataExchange(fill, GetWidID(), kEditTag, gRevNames);
00506     if(fill)
00507     {
00508         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditTag, (void *)(const char *)m_tagname);
00509
00510         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurs, m_norecurs), 0L);
00511     }
00512     else
00513     {
00514         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditTag, &m_tagname);
00515
00516         m_norecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurs, 0L);
00517     }
00518 }
00519
00520 class UCvsTagBranch : public UWidget
00521 {
00522     UDECLARE_DYNAMIC(UCvsTagBranch)
00523 public:
00524     UCvsTagBranch() : UWidget(::UEventGetWidID()) {}
00525     virtual ~UCvsTagBranch() {}
00526
00527     enum
00528     {
00529         kOK = EV_COMMAND_START, // 0
00530         kCancel,                // 1
00531         kTabGeneral             // 2
00532     };
00533
00534     virtual void DoDataExchange(bool fill);
00535
00536 protected:
00537     ev_msg int OnOK(void);
00538     ev_msg int OnCancel(void);
00539
00540     UDECLARE_MESSAGE_MAP()
00541 };
00542
00543 UIMPLEMENT_DYNAMIC(UCvsTagBranch, UWidget)
00544
00545 UBEGIN_MESSAGE_MAP(UCvsTagBranch, UWidget)
00546     ON_UCOMMAND(UCvsTagBranch::kOK, UCvsTagBranch::OnOK)
00547     ON_UCOMMAND(UCvsTagBranch::kCancel, UCvsTagBranch::OnCancel)
00548 UEND_MESSAGE_MAP()
00549
00550 int UCvsTagBranch::OnOK(void)
00551 {
00552     EndModal(true);
00553     return 0;
00554 }
00555
00556 int UCvsTagBranch::OnCancel(void)
00557 {
00558     EndModal(false);
00559     return 0;
00560 }
00561
00562 void UCvsTagBranch::DoDataExchange(bool fill)
00563 {
00564     if(fill)
00565     {
00566     }
00567     else
00568     {
00569     }
00570 }
00571
00572 class UCvsTagBranch_MAIN : public UWidget
00573 {
00574     UDECLARE_DYNAMIC(UCvsTagBranch_MAIN)
00575 public:
00576     UCvsTagBranch_MAIN(const char * sLastTag, bool noRecurs,
00577                        bool checkUnmod);
00578     virtual ~UCvsTagBranch_MAIN() {}
00579
00580     enum
00581     {
00582         kEditTag = EV_COMMAND_START,    // 0
00583         kCheckRecurs,       // 1
00584         kCheckUnmod         // 2
00585     };
00586
00587     virtual void DoDataExchange(bool fill);
00588
00589     UStr m_tagname;
00590     bool m_norecurs;
00591     bool m_checkunmod;
00592 protected:
00593
00594     UDECLARE_MESSAGE_MAP()
00595 };
00596
00597 UIMPLEMENT_DYNAMIC(UCvsTagBranch_MAIN, UWidget)
00598
00599 UBEGIN_MESSAGE_MAP(UCvsTagBranch_MAIN, UWidget)
00600 UEND_MESSAGE_MAP()
00601
00602 UCvsTagBranch_MAIN::UCvsTagBranch_MAIN(const char * sLastTag, bool noRecurs,
00603                                        bool checkUnmod) : UWidget(::UEventGetWidID())
00604 {
00605     m_tagname = sLastTag;
00606     m_norecurs = noRecurs;
00607     m_checkunmod = checkUnmod;
00608 }
00609
00610 void UCvsTagBranch_MAIN::DoDataExchange(bool fill)
00611 {
00612     ::DoDataExchange(fill, GetWidID(), kEditTag, gRevNames);
00613
00614     if(fill)
00615     {
00616         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditTag, (void *)(const char *)m_tagname);
00617
00618         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckUnmod, m_checkunmod), 0L);
00619         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurs, m_norecurs), 0L);
00620     }
00621     else
00622     {
00623         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditTag, &m_tagname);
00624
00625         m_checkunmod = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckUnmod, 0L);
00626         m_norecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurs, 0L);
00627     }
00628 }
00629 #endif // qUnix
00630
00632 bool CompatGetTag(const MultiFiles* mf, const kTagCmdType tagType,
00633                   bool& noRecurs, bool& movDelBranch,
00634                   bool& overwriteExisting,
00635                   CStr& tagName, bool& checkUnmod)
00636 {
00637     bool userHitOK = false;
00638
00639     static CStr sLastTag;
00640
00641     tagName.clear();
00642     noRecurs = false;
00643     movDelBranch = false;
00644     overwriteExisting = false;
00645     checkUnmod = false;
00646
00647 #ifdef WIN32
00648     const char* title = "Tag settings";
00649
00650     switch( tagType )
00651     {
00652     case kTagCreate:
00653         title = "Create tag settings";
00654         break;
00655     case kTagDelete:
00656         title = "Delete tag settings";
00657         break;
00658     case kTagBranch:
00659         title = "Create branch settings";
00660         break;
00661     default:
00662         break;
00663     }
00664
00665     CHHelpPropertySheet pages(title);
00666     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00667
00668     CTag_MAIN page1(mf, tagType, sLastTag, noRecurs, checkUnmod, overwriteExisting);
00669     CGetPrefs_GLOBALS page2;
00670
00671     pages.AddPage(&page1);
00672     pages.AddPage(&page2);
00673
00674     if( pages.DoModal() == IDOK )
00675     {
00676         checkUnmod = page1.m_checkUnmod == TRUE;
00677         noRecurs = page1.m_noRecurs == TRUE;
00678         movDelBranch = page1.m_movDelBranch == TRUE;
00679         sLastTag = page1.m_tagName;
00680         overwriteExisting = page1.m_overwriteExisting == TRUE;
00681
00682         page2.StoreValues();
00683         userHitOK = true;
00684     }
00685 #endif /* WIN32 */
00686 #if qUnix
00687     switch( tagType )
00688     {
00689     case kTagCreate:
00690         {
00691             void *wid = UCreate_TagDlg();
00692
00693             UCvsTagCreate *dlg = new UCvsTagCreate();
00694             UCvsTagCreate_MAIN *tab1 =
00695                 new UCvsTagCreate_MAIN(sLastTag, noRecurs, overwriteExisting, checkUnmod);
00696             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00697             dlg->AddPage(tab1, UCvsTagCreate::kTabGeneral, 0);
00698
00699             if(dlg->DoModal())
00700             {
00701                 checkUnmod = tab1->m_checkunmod;
00702                 noRecurs = tab1->m_norecurs;
00703                 sLastTag = tab1->m_tagname;
00704                 overwriteExisting = tab1->m_overwrite;
00705
00706                 userHitOK = true;
00707             }
00708
00709             delete dlg;
00710         }
00711         break;
00712     case kTagDelete:
00713         {
00714             void *wid = UCreate_UntagDlg();
00715
00716             UCvsTagDel *dlg = new UCvsTagDel();
00717             UCvsTagDel_MAIN *tab1 = new UCvsTagDel_MAIN(sLastTag, noRecurs);
00718             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00719             dlg->AddPage(tab1, UCvsTagDel::kTabGeneral, 0);
00720
00721             if(dlg->DoModal())
00722             {
00723                 noRecurs = tab1->m_norecurs;
00724                 sLastTag = tab1->m_tagname;
00725
00726                 userHitOK = true;
00727             }
00728
00729             delete dlg;
00730         }
00731         break;
00732     case kTagBranch:
00733         {
00734             void *wid = UCreate_BranchDlg();
00735
00736             UCvsTagBranch *dlg = new UCvsTagBranch();
00737             UCvsTagBranch_MAIN *tab1 = new UCvsTagBranch_MAIN(sLastTag, noRecurs, checkUnmod);
00738             UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00739             dlg->AddPage(tab1, UCvsTagBranch::kTabGeneral, 0);
00740
00741             if(dlg->DoModal())
00742             {
00743                 checkUnmod = tab1->m_checkunmod;
00744                 noRecurs = tab1->m_norecurs;
00745                 sLastTag = tab1->m_tagname;
00746
00747                 userHitOK = true;
00748             }
00749
00750             delete dlg;
00751         }
00752         break;
00753     default:
00754         break;
00755     }
00756 #endif // qUnix
00757 #ifdef qMacCvsPP
00758     switch( tagType )
00759     {
00760     case kTagCreate:
00761         {
00762             StDialogHandler theHandler(dlg_TagCreate, LCommander::GetTopCommander());
00763             LWindow *theDialog = theHandler.GetDialog();
00764             ThrowIfNil_(theDialog);
00765             static UInt16 sRuntimePanel = 1;
00766
00767             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00768                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00769             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00770
00771             multiView->SwitchToPanel(2);
00772             DoDataExchange_Globals(theDialog, true);
00773             multiView->SwitchToPanel(1);
00774             DoDataExchange_TagCreateMain(theDialog, mf, sLastTag,
00775                 noRecurs, overwriteExisting, checkUnmod, true);
00776
00777             groupView->SetValue(sRuntimePanel);
00778             theDialog->Show();
00779             MessageT hitMessage;
00780             while (true)
00781             {       // Let DialogHandler process events
00782                 hitMessage = theHandler.DoDialog();
00783
00784                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00785                     break;
00786             }
00787             theDialog->Hide();
00788             sRuntimePanel = groupView->GetValue();
00789
00790             if(hitMessage == msg_OK)
00791             {
00792                 multiView->SwitchToPanel(1);
00793                 DoDataExchange_TagCreateMain(theDialog, mf, sLastTag,
00794                     noRecurs, overwriteExisting, checkUnmod, false);
00795                 multiView->SwitchToPanel(2);
00796                 DoDataExchange_Globals(theDialog, false);
00797                 userHitOK = true;
00798             }
00799         }
00800         break;
00801     case kTagDelete:
00802         {
00803             StDialogHandler theHandler(dlg_TagDelete, LCommander::GetTopCommander());
00804             LWindow *theDialog = theHandler.GetDialog();
00805             ThrowIfNil_(theDialog);
00806             static UInt16 sRuntimePanel = 1;
00807
00808             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00809                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00810             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00811
00812             multiView->SwitchToPanel(2);
00813             DoDataExchange_Globals(theDialog, true);
00814             multiView->SwitchToPanel(1);
00815             DoDataExchange_TagDeleteMain(theDialog, mf, sLastTag, noRecurs, true);
00816
00817             groupView->SetValue(sRuntimePanel);
00818             theDialog->Show();
00819             MessageT hitMessage;
00820             while (true)
00821             {       // Let DialogHandler process events
00822                 hitMessage = theHandler.DoDialog();
00823
00824                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00825                     break;
00826             }
00827             theDialog->Hide();
00828             sRuntimePanel = groupView->GetValue();
00829
00830             if(hitMessage == msg_OK)
00831             {
00832                 multiView->SwitchToPanel(1);
00833                 DoDataExchange_TagDeleteMain(theDialog, mf, sLastTag, noRecurs, false);
00834                 multiView->SwitchToPanel(2);
00835                 DoDataExchange_Globals(theDialog, false);
00836                 userHitOK = true;
00837             }
00838         }
00839         break;
00840     case kTagBranch:
00841         {
00842             StDialogHandler theHandler(dlg_TagBranch, LCommander::GetTopCommander());
00843             LWindow *theDialog = theHandler.GetDialog();
00844             ThrowIfNil_(theDialog);
00845             static UInt16 sRuntimePanel = 1;
00846
00847             LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00848                 (theDialog->FindPaneByID(item_MultiViewPrefs));
00849             LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00850
00851             multiView->SwitchToPanel(2);
00852             DoDataExchange_Globals(theDialog, true);
00853             multiView->SwitchToPanel(1);
00854             DoDataExchange_TagBranchMain(theDialog, mf, sLastTag,
00855                 noRecurs, checkUnmod, true);
00856
00857             groupView->SetValue(sRuntimePanel);
00858             theDialog->Show();
00859             MessageT hitMessage;
00860             while (true)
00861             {       // Let DialogHandler process events
00862                 hitMessage = theHandler.DoDialog();
00863
00864                 if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00865                     break;
00866             }
00867             theDialog->Hide();
00868             sRuntimePanel = groupView->GetValue();
00869
00870             if(hitMessage == msg_OK)
00871             {
00872                 multiView->SwitchToPanel(1);
00873                 DoDataExchange_TagBranchMain(theDialog, mf, sLastTag,
00874                     noRecurs, checkUnmod, false);
00875                 multiView->SwitchToPanel(2);
00876                 DoDataExchange_Globals(theDialog, false);
00877                 userHitOK = true;
00878             }
00879         }
00880         break;
00881     default:
00882         break;
00883     }
00884 #endif /* qMacCvsPP */
00885
00886     if( userHitOK )
00887     {
00888         tagName = sLastTag;
00889
00890         gCvsPrefs.save();
00891     }
00892
00893     return userHitOK;
00894 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CDynToolBar Member List

This is the complete list of members for CDynToolBar, including all inherited members.

AddButtons(int nNumButtons, LPTBBUTTON lpButtons) | CCJToolBar |
AddDropDownButton(UINT nIDButton, UINT nIDMenu, BOOL bArrow=TRUE) | CCJToolBar |
AddReplaceBitmap(HBITMAP hbmImageWell) | CCJToolBar |
AddStrings(LPCTSTR lpszStrings) | CCJToolBar |
AutoSize() | CCJToolBar |
CalcDynamicLayout(int nLength, DWORD nMode) | CCJToolBar | [virtual]
CalcFixedLayout(BOOL bStretch, BOOL bHorz) | CCJToolBar | [virtual]
CalcInsideRect(CRect &rect, BOOL bHorz) const | CCJToolBarBase |
CalcLayout(DWORD nMode, int nLength=-1) | CCJToolBar | [protected]
CalcSize(TBBUTTON *pData, int nCount) | CCJToolBar | [protected]
CCJToolBar() | CCJToolBar |
CCJToolBarBase() | CCJToolBarBase | [protected]
CDynToolBar() | CDynToolBar |
CheckButton(int nID, BOOL bCheck) | CCJToolBar |
CommandToIndex(UINT nIDFind) const | CCJToolBar |
Create(CWnd *pParentWnd, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_TOP, UINT nID=AFX_IDW_TOOLBAR) | CCJToolBar | [virtual]
CreateEx(CWnd *pParentWnd, DWORD dwCtrlStyle=TBSTYLE_FLAT, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_ALIGN_TOP, CRect rcBorders=CRect(0, 0, 0, 0), UINT nID=AFX_IDW_TOOLBAR) | CCJToolBar | [virtual]
Customize() | CCJToolBar |
DeleteButton(int nIndex) | CCJToolBar |
DoPaint(CDC *pDC) | CCJToolBarBase | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJToolBarBase |
DrawGripper(CDC *pDC, const CRect &rect) | CCJToolBarBase |
EnableButton(int nID, BOOL bEnable) | CCJToolBar |
EraseNonClient() | CCJToolBarBase |
FindDropDownButton(UINT nID) | CCJToolBar |
GetBitmap(UINT nIdButton) const | CCJToolBar |
GetBitmapFlags() const | CCJToolBar |
GetBorders() const | CCJToolBarBase | [protected]
GetButton(int nIndex, TBBUTTON *pButton) const | CCJToolBar |
GetButtonCount() const | CCJToolBar |
GetButtonInfo(int nIndex, UINT &nID, UINT &nStyle, int &iImage) const | CCJToolBar |
GetButtonSize(TBBUTTON *pData, int iButton) | CCJToolBar | [virtual]
GetButtonStyle(int nIndex) const | CCJToolBar |
GetButtonText(int nIndex) const | CCJToolBar |
GetButtonText(int nIndex, CString &rString) const | CCJToolBar |
GetHotItem() const | CCJToolBar |
GetImageList() const | CCJToolBar |
GetItemID(int nIndex) const | CCJToolBar |
GetItemRect(int nIndex, LPRECT lpRect) const | CCJToolBar | [virtual]
GetMainFrame() | CDynToolBar | [inline]
GetPadding() const | CCJToolBar |
GetPseudoID(void) const | CDynToolBar | [inline]
GetRect(UINT nIdButton, RECT &rc) const | CCJToolBar |
GetRows() const | CCJToolBar |
GetState(int nID) const | CCJToolBar |
GetToolBarCtrl() const | CCJToolBar |
GetToolbarStyle() const | CCJToolBar |
GetToolTips() const | CCJToolBar |
GetWinInfo(void) const | CDynToolBar | [inline]
HideButton(int nID, BOOL bHide) | CCJToolBar |
HitTest(CPoint p) const | CCJToolBar |
Indeterminate(int nID, BOOL bIndeterminate) | CCJToolBar |
InsertButton(int nIndex, LPTBBUTTON lpButton) | CCJToolBar |
InsertControl(CRuntimeClass *pClass, LPCTSTR lpszWindowName, CRect &rect, UINT nID, DWORD dwStyle) | CCJToolBar |
InsertControl(CWnd *pCtrl, CRect &rect, UINT nID) | CCJToolBar |
InvalidateOldPos(const CRect &rcInvalid) | CCJToolBar | [virtual]
IsButtonChecked(int nID) const | CCJToolBar |
IsButtonEnabled(int nID) const | CCJToolBar |
IsButtonHidden(int nID) const | CCJToolBar |
IsButtonIndeterminate(int nID) const | CCJToolBar |
IsButtonPressed(int nID) const | CCJToolBar |
Layout() | CCJToolBar | [protected]
LoadBitmap(LPCTSTR lpszResourceName) | CCJToolBar |
LoadBitmap(UINT nIDResource) | CCJToolBar |
LoadToolBar(LPCTSTR lpszResourceName, TOOLBARINFO *pBarInfo=NULL) | CCJToolBar |
LoadToolBar(UINT nIDResource, TOOLBARINFO *pBarInfo=NULL) | CCJToolBar |
m_bDelayedButtonLayout | CCJToolBar | [protected]
m_bExStyle | CCJToolBarBase |
m_bInReBar | CCJToolBarBase |
m_bitmap | CDynToolBar |
m_bShowDropArrow | CCJToolBar | [protected]
m_hbmImageWell | CCJToolBar | [protected]
m_hInstImageWell | CCJToolBar | [protected]
m_hKeyRoot | CCJToolBar | [protected]
m_hRsrcImageWell | CCJToolBar | [protected]
m_info | CDynToolBar | [protected]
m_nBarNumber | CCJToolBar | [protected, static]
m_nButtons | CCJToolBar | [protected]
m_pBarInfo | CCJToolBar | [protected]
m_pControls | CCJToolBar | [protected]
m_pDropButtons | CCJToolBar | [protected]
m_pStringMap | CCJToolBar | [protected]
m_rcOldPos | CCJToolBar | [protected]
m_sizeButton | CCJToolBar | [protected]
m_sizeImage | CCJToolBar | [protected]
m_strSubKey | CCJToolBar | [protected]
m_strValueName | CCJToolBar | [protected]
m_tracking | CDynToolBar |
m_widid | CDynToolBar | [protected]
MapAccelerator(TCHAR ch, UINT &nID) const | CCJToolBar |
OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle) | CCJToolBar | [virtual]
OnDestroy(void) | CDynToolBar | [protected]
OnDropDownButton(const NMTOOLBAR &nmtb, UINT nID, CRect rc) | CDynToolBar | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CCJToolBar | [protected]
OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS *) | CCJToolBar | [protected]
OnNcCreate(LPCREATESTRUCT) | CCJToolBar | [protected]
OnNcHitTest(CPoint) | CCJToolBar | [protected]
OnNcPaint() | CCJToolBar | [protected]
OnPaint() | CCJToolBar | [protected]
OnPreserveZeroBorderHelper(WPARAM, LPARAM) | CCJToolBar | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJToolBar | [protected]
OnSetBitmapSize(WPARAM, LPARAM) | CCJToolBar | [protected]
OnSetButtonSize(WPARAM, LPARAM) | CCJToolBar | [protected]
OnSetSizeHelper(CSize &size, LPARAM lParam) | CCJToolBar | [protected]
OnSysColorChange() | CCJToolBar | [protected]
OnToolBarBeginAdjust(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarBeginDrag(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarBtnDropDown(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarChange(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarCustomHelp(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarEndAdjust(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarEndDrag(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarGetButtonInfo(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarQueryDelete(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarQueryInsert(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolBarReset(NMHDR *pNMHDR, LRESULT *pResult) | CCJToolBar | [protected]
OnToolHitTest(CPoint point, TOOLINFO *pTI) const | CCJToolBar | [virtual]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CCJToolBar | [virtual]
OnWindowPosChanged(WINDOWPOS *lpwndpos) | CCJToolBar | [protected]
OnWindowPosChanging(LPWINDOWPOS) | CCJToolBar | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCJToolBar | [virtual]
PressButton(int nID, BOOL bPress) | CCJToolBar |
RestoreState() | CCJToolBar |
SaveState() | CCJToolBar |
SendMessageC(UINT m, WPARAM wp=0, LPARAM lp=0) const | CCJToolBar |
SetBitmap(HBITMAP hbmImageWell) | CCJToolBar |
SetBitmapSize(CSize sz) | CCJToolBar |
SetBorders(LPCRECT lpRect) | CCJToolBarBase | [protected]
SetBorders(int cxLeft=0, int cyTop=0, int cxRight=0, int cyBottom=0) | CCJToolBarBase | [protected]
SetButton(int nIndex, TBBUTTON *pButton) | CCJToolBar |
SetButtonInfo(int nIndex, UINT nID, UINT nStyle, int iImage) | CCJToolBar |
SetButtons(const UINT *lpIDArray, int nIDCount) | CCJToolBar |
SetButtonSize(CSize sz) | CCJToolBar |
SetButtonStructSize(int nSize) | CCJToolBar |
SetButtonStyle(int nIndex, UINT nStyle) | CCJToolBar |
SetButtonText(int nIndex, LPCTSTR lpszText) | CCJToolBar |
SetCmdID(int nIndex, UINT nID) | CCJToolBar |
SetExtendedStyle(DWORD dwStyle) | CCJToolBar |
SetHeight(int cyHeight) | CCJToolBar |
SetHotItem(int iHot) | CCJToolBar |
SetImageList(HIMAGELIST hImgList) | CCJToolBar |
SetIndent(int indent) | CCJToolBar |
SetOwner(CWnd *pOwnerWnd) | CCJToolBar |
SetPadding(CSize sz) | CCJToolBar |
SetPseudoID(int id) | CDynToolBar | [inline]
SetRows(int nRows, BOOL bLarger, LPRECT lpRect) | CCJToolBar |
SetSizes(SIZE sizeButton, SIZE sizeImage) | CCJToolBar |
SetState(int nID, UINT nState) | CCJToolBar |
SetToolbarStyle(DWORD dwStyle) | CCJToolBar |
SetToolTips(CToolTipCtrl *pTip) | CCJToolBar |
SetWinInfo(WININFO *info) | CDynToolBar | [inline]
SizeToolBar(TBBUTTON *pData, int nCount, int nLength, BOOL bVert=FALSE) | CCJToolBar | [protected]
WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam) | CCJToolBarBase | [virtual]
WrapToolBar(TBBUTTON *pData, int nCount, int nWidth) | CCJToolBar | [protected]
~CCJToolBar() | CCJToolBar | [virtual]
~CCJToolBarBase() | CCJToolBarBase | [virtual]
~CDynToolBar() | CDynToolBar | [virtual]

Generated on Sat Aug 7 22:52:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacBinEncoding.cpp Source File

common/MacBinEncoding.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * MacBinEncoding.cpp --- class to store the mac binary encoding mappings
00023  */
00024
00025 /* here should be a define, to recorgnize if this file is needed in dev-tools */
00026 #ifdef TARGET_OS_MAC
00027
00028 #include <stdlib.h>
00029
00030 #include <UModalDialogs.h>
00031 #include <LTableMultiGeometry.h>
00032 #include <LOutlineKeySelector.h>
00033 #include <LTableSingleSelector.h>
00034 #include <LOutlineRowSelector.h>
00035 #include <UAttachments.h>
00036 #include <UGAColorRamp.h>
00037 #include <LEditText.h>
00038
00039 #include "MacCvsConstant.h"
00040 #include "MacBinEncoding.h"
00041
00042 MacBinMaps *CMacBinTable::gCurMacBinMap = 0L;
00043
00044 CMacBinTable::CMacBinTable(LStream *inStream) : LOutlineTable(inStream)
00045 {
00046     // set the table geometry
00047     LTableMultiGeometry *geom = NEW LTableMultiGeometry(this, 50, 20);
00048     ThrowIfNil_(geom);
00049     SetTableGeometry(geom);
00050
00051     // set the table selector
00052     SetTableSelector(NEW LTableSingleSelector( this )/*LOutlineRowSelector*/ );
00053
00054     // and note that we don't set the table storage....
00055
00056     // most of the table classes not only maintain the graphical
00057     // representation of your data but also the data itself. But
00058     // LOutlineTable doesn't really do this...it mostly handles
00059     // graphical representation... you need to handle your data
00060     // maintenance elsewhere by yourself.
00061
00062     // insert a couple columns (name and size)
00063     InsertCols( 4, 0, nil, nil, false );
00064     geom->SetColWidth(60, 1, 1);
00065     geom->SetColWidth(100, 2, 2);
00066     geom->SetColWidth(207, 3, 3);
00067     geom->SetColWidth(100, 4, 4);
00068
00069     // Set up keyboard selection and scrolling.
00070     AddAttachment(NEW LOutlineKeySelector(this, msg_AnyMessage));
00071     AddAttachment(NEW LKeyScrollAttachment(this));
00072
00073     // Try to become default commander in the window.
00074     if (mSuperCommander != nil)
00075         mSuperCommander->SetLatentSub(this);
00076 }
00077
00078 CMacBinTable::~CMacBinTable()
00079 {
00080 }
00081
00082 void CMacBinTable::FinishCreateSelf()
00083 {
00084     // insert the root level of the disk into the table
00085     CMacBinItem *theItem = nil;
00086     CMacBinItem *lastItem = nil;
00087
00088     const MACBINMAPENTRIES * entries = gCurMacBinMap->Entries();
00089
00090     if(entries != 0L) for(int i = 0; i < entries->numMaps; i++)
00091     {
00092         // Store this information in the list view
00093         theItem = NEW CMacBinItem(entries->maps[i]);
00094         ThrowIfNil_(theItem);
00095
00096         // and insert it at the end of the table
00097         InsertItem( theItem, nil, lastItem );
00098         lastItem = theItem;
00099     }
00100 }
00101
00102 CMacBinItem::CMacBinItem(const MACBINMAP & map) :fMap(map)
00103 {
00104 }
00105
00106 CMacBinItem::~CMacBinItem()
00107 {
00108 }
00109
00110 // this is the routine called to know what to draw within the
00111 // table cell. See the comments in LOutlineItem.cp for more info.
00112 void
00113 CMacBinItem::GetDrawContentsSelf(
00114     const STableCell&       inCell,
00115     SOutlineDrawContents&   ioDrawContents)
00116 {
00117     CPStr desc;
00118
00119     switch (inCell.col)
00120     {
00121     case 1:
00122     {   ioDrawContents.outShowSelection = true;
00123         ioDrawContents.outHasIcon = false;
00124         //ioDrawContents.outIconSuite = ;
00125         ioDrawContents.outTextTraits.style = 0;
00126
00127         unsigned char *ptr = ioDrawContents.outTextString;
00128         if ( fMap.sig != 0  &&  fMap.sig != '\?\?\?\?' )
00129         {
00130         *ptr++ = 4;
00131         *ptr++ = ((unsigned char *)&fMap.sig)[0];
00132         *ptr++ = ((unsigned char *)&fMap.sig)[1];
00133         *ptr++ = ((unsigned char *)&fMap.sig)[2];
00134         *ptr++ = ((unsigned char *)&fMap.sig)[3];
00135     }
00136     else
00137     {
00138             //ioDrawContents.outTextTraits.style = italic;
00139             //LString::CopyPStr("\pany", ioDrawContents.outTextString);
00140             ioDrawContents.outTextString[0] = 0;
00141     }
00142     }
00143         break;
00144   case 2:
00145         ioDrawContents.outShowSelection = true;
00146         ioDrawContents.outHasIcon = false;
00147         ioDrawContents.outTextTraits.style = 0;
00148         ioDrawContents.outTextString[0] = strlen(fMap.ext);
00149         if ( ioDrawContents.outTextString[0] )
00150         {
00151           ++ioDrawContents.outTextString[0];
00152           ioDrawContents.outTextString[1] = '.';
00153           strncpy((char*)&ioDrawContents.outTextString[2], fMap.ext, sizeof(ioDrawContents.outTextString)-2);
00154     }
00155     else
00156     {
00157             //ioDrawContents.outTextTraits.style = italic;
00158             //LString::CopyPStr("\pany", ioDrawContents.outTextString);
00159             ioDrawContents.outTextString[0] = 0;
00160     }
00161     break;
00162     case 3:
00163         ioDrawContents.outShowSelection = true;
00164         ioDrawContents.outTextTraits.style = 0;
00165         c2pstrcpy(ioDrawContents.outTextString, fMap.desc);
00166         break;
00167     case 4:
00168         ioDrawContents.outShowSelection = true;
00169         ioDrawContents.outTextTraits.style = 0;
00170         if(fMap.encod == MAC_PLAIN_BINARY)
00171         {
00172             ioDrawContents.outTextTraits.style = bold;
00173             LString::CopyPStr("\pPlain binary", ioDrawContents.outTextString);
00174         }
00175         else if(fMap.useDefault)
00176         {
00177             LString::CopyPStr("\pDefault encoding", ioDrawContents.outTextString);
00178         }
00179         else if(fMap.encod == MAC_HQX)
00180         {
00181             ioDrawContents.outTextTraits.style = bold;
00182             LString::CopyPStr("\pHQX encoding", ioDrawContents.outTextString);
00183         }
00184         else
00185         {
00186             ioDrawContents.outTextTraits.style = bold;
00187             LString::CopyPStr("\pAppleSingle encoding", ioDrawContents.outTextString);
00188         }
00189         break;
00190     }
00191 }
00192
00193 // just to be cute, we'll draw an adornment (again, see the LOutlineItem.cp
00194 // comments for more information). We'll draw a groovy gray background
00195 void CMacBinItem::DrawRowAdornments(const Rect & inLocalRowRect)
00196 {
00197     ShadeRow(UGAColorRamp::GetColor(0), inLocalRowRect);
00198 }
00199
00200 bool CMacBinItem::EditCell(void)
00201 {
00202     StDialogHandler theHandler(dlg_MacBinEntry, LCommander::GetTopCommander());
00203     LWindow *theDialog = theHandler.GetDialog();
00204     ThrowIfNil_(theDialog);
00205
00206     LEditText *typ = dynamic_cast<LEditText*>
00207         (theDialog->FindPaneByID(item_MacBinType));
00208     LEditText *ext = dynamic_cast<LEditText*>
00209         (theDialog->FindPaneByID(item_MacBinExtension));
00210     LEditText *desc = dynamic_cast<LEditText*>
00211         (theDialog->FindPaneByID(item_MacBinDesc));
00212
00213     if ( fMap.sig != 0  &&  fMap.sig != '\?\?\?\?' )
00214       typ->SetText((Ptr)&fMap.sig, 4);
00215     else
00216       typ->SetText((Ptr)"", 0);
00217     LStr255   extension(fMap.ext);
00218     if ( extension.Length() > 0 ) extension.Insert('.', 0);
00219     ext->SetText(extension);
00220     desc->SetText((Ptr)fMap.desc, strlen(fMap.desc));
00221
00222     OSType  oldsig = fMap.sig;
00223     char    oldext[MAX_MACBIN_EXTENSION+1];
00224     strncpy(oldext, fMap.ext, MAX_MACBIN_EXTENSION);
00225
00226     if(fMap.encod == MAC_PLAIN_BINARY)
00227         theDialog->SetValueForPaneID (item_MacBinPlain, Button_On);
00228     else if(fMap.useDefault)
00229         theDialog->SetValueForPaneID (item_MacBinDefault, Button_On);
00230     else if(fMap.encod == MAC_HQX)
00231         theDialog->SetValueForPaneID (item_MacBinHQX, Button_On);
00232     else
00233         theDialog->SetValueForPaneID (item_MacBinAS, Button_On);
00234
00235     theDialog->Show();
00236     MessageT hitMessage;
00237     while (true)
00238     {       // Let DialogHandler process events
00239         hitMessage = theHandler.DoDialog();
00240
00241         if (hitMessage == msg_OK)
00242         {
00243           bool    dataOK(true);
00244             char    type[255], extension[255];
00245             Size    typeLen, extLen;
00246
00247             typ->GetText(type, 254, &typeLen);
00248             ext->GetText(extension, 254, &extLen);
00249
00250             if( typeLen != 4  &&  typeLen != 0 )
00251               dataOK = false;
00252             else if ( typeLen == 4 )
00253             {
00254               if ( type[0] == ';' || type[1] == ';' || type[2] == ';' || type[3] == ';' )
00255                 dataOK = false;
00256               else if ( ((OSType *)type)[0] == '\?\?\?\?' && extLen == 0 )
00257                 dataOK = false;
00258       }
00259       else if ( typeLen == 0  &&  extLen == 0 )
00260         dataOK = false;
00261       else if ( extLen == 1  &&  extension[0] == '.' )
00262         dataOK = false;
00263
00264       if ( !dataOK )
00265             {
00266                 SysBeep(10);
00267                 continue;
00268             }
00269
00270         }
00271
00272         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00273             break;
00274     }
00275     theDialog->Hide();
00276
00277     if(hitMessage == msg_OK)
00278     {
00279         char buf[255];
00280         Size len;
00281
00282         typ->GetText(buf, 254, &len);
00283         if(len == 4)
00284         {
00285             ((char *)&fMap.sig)[0] = buf[0];
00286             ((char *)&fMap.sig)[1] = buf[1];
00287             ((char *)&fMap.sig)[2] = buf[2];
00288             ((char *)&fMap.sig)[3] = buf[3];
00289         }
00290         desc->GetText(buf, 254, &len);
00291         buf[len] = '\0';
00292         strncpy(fMap.desc, buf, MAX_MACBIN_DESC);
00293     ext->GetText(buf, 254, &len);
00294         buf[len] = '\0';
00295     if ( buf[0] == '.' )
00296           strncpy(fMap.ext, buf+1, MAX_MACBIN_EXTENSION);
00297     else
00298           strncpy(fMap.ext, buf, MAX_MACBIN_EXTENSION);
00299         fMap.useDefault = true;
00300
00301         if(theDialog->GetValueForPaneID (item_MacBinPlain) == Button_On)
00302         {
00303             fMap.encod = MAC_PLAIN_BINARY;
00304             fMap.useDefault = false;
00305         }
00306         else if(theDialog->GetValueForPaneID (item_MacBinDefault) == Button_On)
00307         {
00308         }
00309         else if(theDialog->GetValueForPaneID (item_MacBinHQX) == Button_On)
00310         {
00311             fMap.useDefault = false;
00312             fMap.encod = MAC_HQX;
00313         }
00314         else
00315         {
00316             fMap.useDefault = false;
00317             fMap.encod = MAC_APPSINGLE;
00318         }
00319
00320         CMacBinTable *list = dynamic_cast<CMacBinTable*>(mOutlineTable);
00321         if(list != 0L)
00322         {
00323             list->GetCurrentMap()->RemoveEntry(oldsig, oldext);
00324             list->GetCurrentMap()->AddEntry(fMap.sig, fMap.ext, fMap.desc, fMap.encod, fMap.useDefault);
00325         }
00326         return true;
00327     }
00328     return false;
00329 }
00330
00331 void CMacBinItem::RemoveCell(void)
00332 {
00333     CMacBinTable *list = dynamic_cast<CMacBinTable*>(mOutlineTable);
00334     if(list != 0L)
00335     {
00336         list->GetCurrentMap()->RemoveEntry(fMap.sig, NULL);
00337     }
00338 }
00339
00340 void CMacBinItem::DoubleClick(
00341     const STableCell&           /* inCell */,
00342     const SMouseDownEvent&      /* inMouseDown */,
00343     const SOutlineDrawContents& /* inDrawContents */,
00344     Boolean                     /* inHitText */)
00345 {
00346     EditCell();
00347 }
00348
00349 #endif /* TARGET_OS_MAC */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

tagCTV_ITEM Member List

This is the complete list of members for tagCTV_ITEM, including all inherited members.

pWnd | tagCTV_ITEM
szLabel | tagCTV_ITEM

Generated on Sat Aug 7 22:56:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJTreeCtrl::Color_Font Member List

This is the complete list of members for CCJTreeCtrl::Color_Font, including all inherited members.

color | CCJTreeCtrl::Color_Font
logfont | CCJTreeCtrl::Color_Font

Generated on Sat Aug 7 22:50:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsSandboxInfo.h Source File

common/CvsSandboxInfo.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Oliver Giesen <ogware@gmx.net>
00019  */
00020
00021 #if !defined(AFX_CVSSANDBOXINFO_H__06D1CA4F_06C6_4F57_9787_C91C53E372D6__INCLUDED_)
00022 #define AFX_CVSSANDBOXINFO_H__06D1CA4F_06C6_4F57_9787_C91C53E372D6__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // CvsSandboxInfo.h : header file
00028 //
00029
00030 #include <string>
00031
00032 using std::string;
00033
00035 class CCvsSandboxInfo
00036 {
00037 public:
00038     // Construction
00039     CCvsSandboxInfo(const char* path);
00040     virtual ~CCvsSandboxInfo();
00041
00042 private:
00043     // Data members
00044     string m_path;
00045
00046 protected:
00047     // Methods
00048     string ReadAdminFile(const char* name) const;
00049
00050 public:
00051     // Interface
00052     string GetRoot() const;
00053     string GetRepository() const;
00054 };
00055
00057
00058 //{{AFX_INSERT_LOCATION}}
00059 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00060
00061 #endif // AFX_CVSSANDBOXINFO_H__06D1CA4F_06C6_4F57_9787_C91C53E372D6__INCLUDED_
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CvsStatusBar.h Source File

WinCvs/CvsStatusBar.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(AFX_CVSSTATUSBAR_H__F549ACF2_ECFE_4933_A05D_5FC8248C3CD4__INCLUDED_)
00022 #define AFX_CVSSTATUSBAR_H__F549ACF2_ECFE_4933_A05D_5FC8248C3CD4__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // CvsStatusBar.h : header file
00028 //
00029
00031 typedef enum{
00032     kStatusMain,
00033     kStatusCVSROOT,
00034     kStatusRepository,
00035     kStatusThrobber
00036 }kStatusPaneId;
00037
00039 // CCvsStatusBar window
00040
00041 class CCvsStatusBar : public CStatusBar
00042 {
00043 public:
00044 // Construction
00045     CCvsStatusBar();
00046     virtual ~CCvsStatusBar();
00047
00048 // Attributes
00049 public:
00050
00051 // Operations
00052 public:
00053
00054 // Overrides
00055     // ClassWizard generated virtual function overrides
00056     //{{AFX_VIRTUAL(CCvsStatusBar)
00057     virtual BOOL PreTranslateMessage(MSG* pMsg);
00058     virtual void DrawItem(LPDRAWITEMSTRUCT);
00059     //}}AFX_VIRTUAL
00060
00061 // Implementation
00062 public:
00063
00064     // Generated message map functions
00065 protected:
00066     //{{AFX_MSG(CCvsStatusBar)
00067     afx_msg void OnTimer(UINT nIDEvent);
00068     afx_msg void OnSize(UINT nType, int cx, int cy);
00069     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00070     afx_msg UINT OnNcHitTest(CPoint point);
00071     //}}AFX_MSG
00072
00073     DECLARE_MESSAGE_MAP()
00074 private:
00075     // Data members
00076     CBitmap m_indic;
00077     int m_step;
00078     bool m_settimer;
00079
00080     CToolTipCtrl m_tooltip;
00081
00082     // Methods
00083     BOOL SetIndicators();
00084
00085 public:
00086     // Interface
00087     void UpdatePathInfo(const char* path);
00088 };
00089
00091
00092 //{{AFX_INSERT_LOCATION}}
00093 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00094
00095 #endif // !defined(AFX_CVSSTATUSBAR_H__F549ACF2_ECFE_4933_A05D_5FC8248C3CD4__INCLUDED_)
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LoginDlg.cpp Source File

common/LoginDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2002
00019  */
00020
00021 /*
00022  * LoginDlg.cpp : the cvs login dialog implementation file
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "wincvs_winutil.h"
00030 #endif /* WIN32 */
00031
00032 #include "CvsPrefs.h"
00033 #include "GetPrefs.h"
00034 #include "LoginDlg.h"
00035 #include "CvsRootDlg.h"
00036
00037 #ifdef WIN32
00038
00039 #ifdef _DEBUG
00040 #define new DEBUG_NEW
00041 #undef THIS_FILE
00042 static char THIS_FILE[] = __FILE__;
00043 #endif
00044
00046 // CLogin_MAIN property page
00047
00048 IMPLEMENT_DYNAMIC(CLogin_MAIN, CHHelpPropertyPage)
00049
00050 CLogin_MAIN::CLogin_MAIN(bool forceRoot, const char* cvsroot)
00051     : CHHelpPropertyPage(CLogin_MAIN::IDD)
00052 {
00053     m_forceRoot = forceRoot;
00054     m_cvsroot = cvsroot;
00055
00056     m_cvsrootCombo.SetItems(&gOldCvsroots);
00057
00058     m_helpLogin = _T("Select \"Force using the CVSROOT\" option to login according to your general preferences settings "
00059         "(otherwise current sandbox settings will be used by CVS client executable).\r\n"
00060         "\r\n"
00061         "Login command is interactive and it will ask you for password.\r\n"
00062         "Entered password will be cached by CVS so you need to login only once for each CVSROOT.\r\n"
00063         "\r\n"
00064         "To remove the password from CVS cache use the logout command.");
00065 }
00066
00067 CLogin_MAIN::~CLogin_MAIN()
00068 {
00069 }
00070
00071 void CLogin_MAIN::DoDataExchange(CDataExchange* pDX)
00072 {
00073     CHHelpPropertyPage::DoDataExchange(pDX);
00074     //{{AFX_DATA_MAP(CLogin_MAIN)
00075     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00076     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00077     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00078     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00079     DDX_Text(pDX, IDC_HELPLOGIN, m_helpLogin);
00080     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00081     //}}AFX_DATA_MAP
00082
00083     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00084
00085     if( m_forceRoot )
00086     {
00087         DDV_MinChars(pDX, m_cvsroot, 1);
00088     }
00089
00090     if( !pDX->m_bSaveAndValidate )
00091     {
00092         m_selCvsrootButton.EnableWindow(m_forceRoot);
00093     }
00094 }
00095
00096
00097 BEGIN_MESSAGE_MAP(CLogin_MAIN, CHHelpPropertyPage)
00098     //{{AFX_MSG_MAP(CLogin_MAIN)
00099     ON_BN_CLICKED(IDC_BROWSE_CVSROOT, OnSelcvsroot)
00100     ON_BN_CLICKED(IDC_FORCE_CVSROOT, OnForceroot)
00101     //}}AFX_MSG_MAP
00102 END_MESSAGE_MAP()
00103
00105 // CLogin_MAIN message handlers
00106
00108 BOOL CLogin_MAIN::OnInitDialog()
00109 {
00110     CHHelpPropertyPage::OnInitDialog();
00111
00112     // Extra initialization
00113     OnForceroot();
00114     PostGotoDlgCtrl(this, m_forceRoot ? (CWnd*)&m_cvsrootCombo : (CWnd*)&m_forceRootCheck);
00115
00116     return TRUE;  // return TRUE unless you set the focus to a control
00117                   // EXCEPTION: OCX Property Pages should return FALSE
00118 }
00119
00120 void CLogin_MAIN::InitHelpID()
00121 {
00122     SetCtrlHelpID(IDC_HELPLOGIN,        IDH_IDC_HELPLOGIN);
00123     SetCtrlHelpID(IDC_FORCE_CVSROOT,    IDH_IDC_FORCE_CVSROOT);
00124     SetCtrlHelpID(IDC_CVSROOT,          IDH_IDC_CVSROOT);
00125     SetCtrlHelpID(IDC_BROWSE_CVSROOT,   IDH_IDC_BROWSE_CVSROOT);
00126 }
00127
00129 void CLogin_MAIN::OnSelcvsroot()
00130 {
00131     CString strCvsroot;
00132     m_cvsrootCombo.GetWindowText(strCvsroot);
00133
00134     CStr cvsroot(strCvsroot);
00135     if( CompatGetCvsRoot(cvsroot) )
00136     {
00137         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00138     }
00139 }
00140
00142 void CLogin_MAIN::OnForceroot()
00143 {
00144     const BOOL enable = m_forceRootCheck.GetCheck();
00145
00146     m_selCvsrootButton.EnableWindow(enable);
00147     m_cvsrootCombo.EnableWindow(enable);
00148 }
00149
00150 #endif
00151
00153 bool CompatGetLogin(bool& forceCvsroot, CStr& cvsroot)
00154 {
00155     bool userHitOK = false;
00156
00157     static bool lastForceCvsroot = true;
00158     static CStr sLastCvsroot("");
00159
00160 #ifdef WIN32
00161     CHHelpPropertySheet pages("Login settings");
00162     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00163
00164     CLogin_MAIN page1(lastForceCvsroot, sLastCvsroot);
00165     CGetPrefs_GLOBALS page2;
00166
00167     pages.AddPage(&page1);
00168     pages.AddPage(&page2);
00169
00170     if( pages.DoModal() == IDOK )
00171     {
00172         lastForceCvsroot = page1.m_forceRoot == TRUE;
00173         sLastCvsroot = page1.m_cvsroot;
00174
00175         page2.StoreValues();
00176
00177         userHitOK = true;
00178     }
00179 #else
00180   userHitOK = true;
00181 #endif /* WIN32 */
00182
00183     if( userHitOK )
00184     {
00185         forceCvsroot = lastForceCvsroot;
00186         cvsroot = sLastCvsroot;
00187
00188         gCvsPrefs.save();
00189     }
00190
00191     return userHitOK;
00192 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJLibrary.h Source File

WinCvs/CJLib/Include/CJLibrary.h

Go to the documentation of this file.
00001 // CJLibrary.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2002/06/15 17:49:37 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/Include/CJLibrary.h $
00011  *
00012  * $History: CJLibrary.h $
00013  *
00014  * *****************  Version 15  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 9:39p
00016  * Updated in $/CodeJock/Include
00017  * Added includes for CJHexEdit and CJListBox.
00018  *
00019  * *****************  Version 14  *****************
00020  * User: Kirk Stowell Date: 10/26/99   Time: 10:57p
00021  * Updated in $/CodeJock/Include
00022  * Added includes for CCJMemFile, CCJStatusBar and CCJLogoPane.
00023  *
00024  * *****************  Version 13  *****************
00025  * User: Kirk Stowell Date: 10/14/99   Time: 7:22p
00026  * Updated in $/CodeJock/Include
00027  * Updated for 6.09 release.
00028  *
00029  * *****************  Version 12  *****************
00030  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00031  * Updated in $/CodeJockey/Include
00032  * Updated copyright and contact information.
00033  *
00034  * *****************  Version 11  *****************
00035  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00036  * Updated in $/CodeJockey/Include
00037  * Added Unicode compliance, thanks to Barry Burton for his help with
00038  * this.
00039  *
00040  *
00041  * *****************  Version 9  *****************
00042  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00043  * Updated in $/CodeJockey/Include
00044  *
00045  * *****************  Version 8  *****************
00046  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00047  * Updated in $/CodeJockey/Include
00048  *
00049  * *****************  Version 7  *****************
00050  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00051  * Updated in $/CodeJockey/Include
00052  *
00053  * *****************  Version 6  *****************
00054  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00055  * Updated in $/CodeJockey/Include
00056  *
00057  * *****************  Version 5  *****************
00058  * User: Kirk Stowell Date: 7/18/99    Time: 10:19p
00059  * Updated in $/CodeJockey/Include
00060  * Cleaned up import/export macro so that class will be imported when
00061  * linked to, and exported at compile time.
00062  *
00063  * *****************  Version 4  *****************
00064  * User: Kirk Stowell Date: 7/14/99    Time: 10:18p
00065  * Updated in $/CodeJockey/Include
00066  * Added additional class header files.
00067  *
00068  * *****************  Version 3  *****************
00069  * User: Kirk Stowell Date: 6/26/99    Time: 8:32p
00070  * Updated in $/CodeJockey/Include
00071  * Added include for class CCJMDIChildWnd.
00072  *
00073  * *****************  Version 2  *****************
00074  * User: Kirk Stowell Date: 6/25/99    Time: 12:04p
00075  * Updated in $/CodeJockey/Include
00076  * Newly added file which supports CJLibrary includes for both Visual C++
00077  * 5 and 6
00078  *
00079  ***************************************************************************/
00081
00082 #ifndef __CJLIBRARY_H__
00083 #define __CJLIBRARY_H__
00084
00085 #if _MSC_VER >= 1000
00086 #pragma once
00087 #endif // _MSC_VER >= 1000
00088
00089 #if _MSC_VER < 1200
00090 #define _VC_VERSION_5
00091 #endif
00092
00093 #ifndef _CJX_EXT_CLASS
00094 #ifdef _AFXDLL
00095 #define _CJX_EXT_CLASS  AFX_CLASS_IMPORT // Always import CJLibrary files...
00096 #else
00097 #define _CJX_EXT_CLASS  // not used with static builds.
00098 #endif
00099 #endif // _CJX_EXT_CLASS
00100
00101 #ifndef _CJXLIB_INLINE
00102 #define _CJXLIB_INLINE inline
00103 #endif // _CJXLIB_INLINE
00104
00105 #ifndef __AFXTEMPL_H__
00106 #include <afxtempl.h>
00107 #endif
00108
00109 #ifndef __AFXPRIV_H__
00110 #include <afxpriv.h>
00111 #endif
00112
00113 #if _MFC_VER < 0x700
00114 #include <..\src\afximpl.h>
00115 #else
00116 #include <..\atlmfc\src\mfc\afximpl.h>
00117 #endif
00118
00119 #ifndef __CJBROWSEEDIT_H__
00120 #include "CJBrowseEdit.h"
00121 #endif
00122
00123 #ifndef __CJCAPTION_H__
00124 #include "CJCaption.h"
00125 #endif
00126
00127 #ifndef __CJCAPTIONPOPUPWND_H__
00128 #include "CJCaptionPopupWnd.h"
00129 #endif
00130
00131 #ifndef __CJCOLORPICKER_H__
00132 #include "CJColorPicker.h"
00133 #endif
00134
00135 #ifndef __CJCOLORPOPUP_H__
00136 #include "CJColorPopup.h"
00137 #endif
00138
00139 #ifndef __CJCOMBOBOXEX_H__
00140 #include "CJComboBoxEx.h"
00141 #endif
00142
00143 #ifndef __CJCONTROLBAR_H__
00144 #include "CJControlBar.h"
00145 #endif
00146
00147 #ifndef __CJDATETIMECTRL_H__
00148 #include "CJDateTimeCtrl.h"
00149 #endif
00150
00151 #ifndef __CJDOCKBAR_H__
00152 #include "CJDockBar.h"
00153 #endif
00154
00155 #ifndef __CJDOCKCONTEXT_H__
00156 #include "CJDockContext.h"
00157 #endif
00158
00159 #ifndef __CJEXPLORERBAR_H__
00160 #include "CJExplorerBar.h"
00161 #endif
00162
00163 #ifndef __CJFLATBUTTON_H__
00164 #include "CJFlatButton.h"
00165 #endif
00166
00167 #ifndef __CJFLATCOMBOBOX_H__
00168 #include "CJFlatComboBox.h"
00169 #endif
00170
00171 #ifndef __CJFLATHEADERCTRL_H__
00172 #include "CJFlatHeaderCtrl.h"
00173 #endif
00174
00175 #ifndef __CJFLATSPLITTERWND_H__
00176 #include "CJFlatSplitterWnd.h"
00177 #endif
00178
00179 #ifndef __CCJFLATTABCTRL_H__
00180 #include "CJFlatTabCtrl.h"
00181 #endif
00182
00183 #ifndef __CJFONTCOMBO_H__
00184 #include "CJFontCombo.h"
00185 #endif
00186
00187 #ifndef __CJFRAMEWND_H__
00188 #include "CJFrameWnd.h"
00189 #endif
00190
00191 #ifndef __CJHEXEDIT_H__
00192 #include "CJHexEdit.h"
00193 #endif
00194
00195 #ifndef __CJHTMLVIEW_H__
00196 #include "CJHtmlView.h"
00197 #endif
00198
00199 #ifndef __CJHYPERLINK_H__
00200 #include "CJHyperLink.h"
00201 #endif
00202
00203 #ifndef __CJLISTBOX_H__
00204 #include "CJListBox.h"
00205 #endif
00206
00207 #ifndef __CJLISTCTRL_H__
00208 #include "CJListCtrl.h"
00209 #endif
00210
00211 #ifndef __CJLISTVIEW_H__
00212 #include "CJListView.h"
00213 #endif
00214
00215 #ifndef __CJLOGOPANE_H__
00216 #include "CJLogoPane.h"
00217 #endif
00218
00219 #ifndef __CJMASKEDIT_H__
00220 #include "CJMaskEdit.h"
00221 #endif
00222
00223 #ifndef __CJMDICHILDWND_H__
00224 #include "CJMDIChildWnd.h"
00225 #endif
00226
00227 #ifndef __CJMDIFRAMEWND_H__
00228 #include "CJMDIFrameWnd.h"
00229 #endif
00230
00231 #ifndef __CJMEMFILE_H__
00232 #include "CJMemFile.h"
00233 #endif
00234
00235 #ifndef __CJMENU_H__
00236 #include "CJMenu.h"        // CCJMenu class declaration
00237 #endif
00238
00239 #ifndef __CJMENUBAR_H__
00240 #include "CJMenuBar.h"
00241 #endif
00242
00243 #ifndef __CJMETAFILEBUTTON_H__
00244 #include "CJMetaFileButton.h"
00245 #endif
00246
00247 #ifndef __CJMINIDOCKFRAMEWND_H__
00248 #include "CJMiniDockFrameWnd.h"
00249 #endif
00250
00251 #ifndef __CJOUTLOOKBAR_H__
00252 #include "CJOutlookBar.h"
00253 #endif
00254
00255 #ifndef __CJPAGERCTRL_H__
00256 #include "CJPagerCtrl.h"
00257 #endif
00258
00259 #ifndef __CJREBAR_H__
00260 #include "CJReBar.h"
00261 #endif
00262
00263 #ifndef __CJREBARCTRL_H__
00264 #include "CJReBarCtrl.h"
00265 #endif
00266
00267 #ifndef __CJSHELL_H__
00268 #include "CJShell.h"
00269 #endif
00270
00271 #ifndef __CJSHELLLIST_H__
00272 #include "CJShellList.h"
00273 #endif
00274
00275 #ifndef __CJSHELLTREE_H__
00276 #include "CJShellTree.h"
00277 #endif
00278
00279 #ifndef __CJSIZEDOCKBAR_H__
00280 #include "CJSizeDockBar.h"
00281 #endif
00282
00283 #ifndef __CJSORTCLASS_H__
00284 #include "CJSortClass.h"
00285 #endif
00286
00287 #ifndef __CJSTATUSBAR_H__
00288 #include "CJStatusBar.h"
00289 #endif
00290
00291 #ifndef __CJTABCTRL_H__
00292 #include "CJTabCtrl.h"
00293 #endif
00294
00295 #ifndef __CJTABCTRLBAR_H__
00296 #include "CJTabCtrlBar.h"
00297 #endif
00298
00299 #ifndef __CJTABVIEW_H__
00300 #include "CJTabView.h"
00301 #endif
00302
00303 #ifndef __CJTOOLBAR_H__
00304 #include "CJToolBar.h"
00305 #endif
00306
00307 #ifndef __CCJTOOLBARBASE_H__
00308 #include "CJToolBarBase.h"
00309 #endif
00310
00311 #ifndef __CJTOOLBARCTRL_H__
00312 #include "CJToolBarCtrl.h"
00313 #endif
00314
00315 #ifndef __CJTREECTRL_H__
00316 #include "CJTreeCtrl.h"
00317 #endif
00318
00319 #ifndef __CJWINDOWPLACEMENT_H__
00320 #include "CJWindowPlacement.h"
00321 #endif
00322
00323 #ifndef __GFXGROUPEDIT_H__
00324 #include "GfxGroupEdit.h"
00325 #endif
00326
00327 #ifndef __GFXOUTBARCTRL_H__
00328 #include "GfxOutBarCtrl.h"
00329 #endif
00330
00331 #ifndef __GFXSPLITTERWND_H__
00332 #include "GfxSplitterWnd.h"
00333 #endif
00334
00335 #define _delete(p){if(p){delete p;p=NULL;}}
00336
00337 #ifdef _AFXDLL
00338     #ifdef _DEBUG
00339         #if defined(_UNICODE)
00340             #define _CJX_COMMENT "CJ609Libud.lib"
00341             #define _CJX_MESSAGE "Automatically linking with CJ609Libud.dll"
00342         #else
00343             #define _CJX_COMMENT "CJ609Libd.lib"
00344             #define _CJX_MESSAGE "Automatically linking with CJ609Libd.dll"
00345         #endif
00346     #else
00347         #if defined(_UNICODE)
00348             #define _CJX_COMMENT "CJ609Libu.lib"
00349             #define _CJX_MESSAGE "Automatically linking with CJ609Libu.dll"
00350         #else
00351             #define _CJX_COMMENT "CJ609Lib.lib"
00352             #define _CJX_MESSAGE "Automatically linking with CJ609Lib.dll"
00353         #endif
00354     #endif
00355 #else
00356     #ifdef _DEBUG
00357         #if defined(_UNICODE)
00358             #define _CJX_COMMENT "CJ609LibStaticud.lib"
00359             #define _CJX_MESSAGE "Automatically linking with CJ609LibStaticud.lib"
00360         #else
00361             #define _CJX_COMMENT "CJ609LibStaticd.lib"
00362             #define _CJX_MESSAGE "Automatically linking with CJ609LibStaticd.lib"
00363         #endif
00364     #else
00365         #if defined(_UNICODE)
00366             #define _CJX_COMMENT "CJ609LibStaticu.lib"
00367             #define _CJX_MESSAGE "Automatically linking with CJ609LibStaticu.lib"
00368         #else
00369             #define _CJX_COMMENT "CJ609LibStatic.lib"
00370             #define _CJX_MESSAGE "Automatically linking with CJ609LibStatic.lib"
00371         #endif
00372     #endif
00373 #endif
00374
00375 #pragma comment(lib, _CJX_COMMENT)
00376 #pragma message(_CJX_MESSAGE)
00377
00378 #endif // __CJLIBRARY_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSmartComboBox Member List

This is the complete list of members for CSmartComboBox, including all inherited members.

AutoDropWidth enum value | USmartCombo |
CalcDroppedWidth() | CSmartComboBox | [private, virtual]
CSmartComboBox(int feature=USmartCombo::DefaultFeature) | CSmartComboBox |
DefaultFeature enum value | USmartCombo |
DelKeyTest(MSG *pMsg) | CSmartComboBox | [private]
EnsureSelchangeMatch() | CSmartComboBox | [inline, virtual]
Feature enum name | USmartCombo |
GetCurSelText() const | CSmartComboBox | [inline, virtual]
GetEditCtrl() const | CSmartComboBox | [inline, virtual]
GetItems() | USmartCombo |
GetKeyword() const | USmartCombo |
GetWindowText() const | CSmartComboBox | [inline, virtual]
GetWindowText(CString &rString) const | CSmartComboBox | [inline]
HasFeature(int feature) const | USmartCombo |
Keyword enum value | USmartCombo |
m_selectExact | CSmartComboBox | [private]
None enum value | USmartCombo |
OnDropdown() | CSmartComboBox | [protected]
OnSelectString(WPARAM wParam, LPARAM lParam) | CSmartComboBox | [protected]
OnSetFeature(WPARAM wParam, LPARAM lParam) | CSmartComboBox | [protected]
OnSetItems(WPARAM wParam, LPARAM lParam) | CSmartComboBox | [protected]
OnSetReadOnly(WPARAM wParam, LPARAM lParam) | CSmartComboBox | [protected]
PreSubclassWindow() | CSmartComboBox | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CSmartComboBox | [virtual]
ReadOnly enum value | USmartCombo |
RemoveItem(const char *strItem) | USmartCombo | [virtual]
RemoveItems enum value | USmartCombo |
SetFeature(int feature) | USmartCombo |
SetItems(CMString *pstrItems) | USmartCombo |
SetKeyword(const char *keyword) | USmartCombo |
SetReadOnly(bool readOnly=true) | CSmartComboBox | [virtual]
SetSelectExact(bool selectExact=true) | CSmartComboBox | [virtual]
USmartCombo(int feature) | USmartCombo |
~CSmartComboBox() | CSmartComboBox | [virtual]
~USmartCombo() | USmartCombo | [virtual]

Generated on Sat Aug 7 22:56:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/uobject.cpp Source File

rf/uobject.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- May 1999
00019  */
00020
00021 #include "stdafx.h"
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #include <string.h>
00028
00029 #include "uobject.h"
00030
00031 URuntimeClass *URuntimeClass::sAllURuntimeClass = 0L;
00032
00033 const URuntimeClass* UObject::_GetBaseClass()
00034     { return 0L; }
00035 const URuntimeClass UObject::classUObject(
00036     "UObject", sizeof(UObject), 0L, &UObject::_GetBaseClass);
00037 const URuntimeClass *UObject::rtUObject()
00038     { return &UObject::classUObject; }
00039
00040 UObject* UObject::CreateObject(const char *className)
00041 {
00042     URuntimeClass *next = URuntimeClass::sAllURuntimeClass;
00043     while(next != 0L)
00044     {
00045         if(strcmp(next->m_lpszClassName, className) == 0)
00046             return next->CreateObject();
00047
00048         next = next->m_pNextClass;
00049     }
00050     return 0L;
00051 }
00052
00053 const URuntimeClass* UObject::GetRuntimeClass() const
00054 {
00055     return URUNTIME_CLASS(UObject);
00056 }
00057
00058 bool UObject::IsKindOf(const URuntimeClass* pClass) const
00059 {
00060     // simple SI case
00061     const URuntimeClass* pClassThis = GetRuntimeClass();
00062     return pClassThis->IsDerivedFrom(pClass);
00063 }
00064
00065 URuntimeClass::URuntimeClass(const char *lpszClassName, int nObjectSize,
00066         UObject* (*pfnCreateObject)(), const URuntimeClass* (*pfnGetBaseClass)())
00067 {
00068     m_lpszClassName = lpszClassName;
00069     m_nObjectSize = nObjectSize;
00070     m_pfnCreateObject = pfnCreateObject;
00071     m_pfnGetBaseClass = pfnGetBaseClass;
00072     m_pNextClass = sAllURuntimeClass;
00073
00074     sAllURuntimeClass = this;
00075 }
00076
00077 URuntimeClass::~URuntimeClass()
00078 {
00079     URuntimeClass *next = sAllURuntimeClass;
00080     URuntimeClass *prev = 0L;
00081     while(next != 0L)
00082     {
00083         if(next == this)
00084         {
00085             if(prev == 0L)
00086                 sAllURuntimeClass = m_pNextClass;
00087             else
00088                 prev->m_pNextClass = m_pNextClass;
00089             break;
00090         }
00091
00092         prev = next;
00093         next = next->m_pNextClass;
00094     }
00095 }
00096
00097 UObject* URuntimeClass::CreateObject()
00098 {
00099     if (m_pfnCreateObject == 0L)
00100     {
00101         return 0L;
00102     }
00103
00104     UObject* pObject = 0L;
00105     try
00106     {
00107         pObject = (*m_pfnCreateObject)();
00108     }
00109     catch(...)
00110     {
00111     }
00112
00113     return pObject;
00114 }
00115
00116 bool URuntimeClass::IsDerivedFrom(const URuntimeClass* pBaseClass) const
00117 {
00118     // simple SI case
00119     const URuntimeClass* pClassThis = this;
00120     while (pClassThis != 0L)
00121     {
00122         if (pClassThis == pBaseClass)
00123             return true;
00124         pClassThis = (*pClassThis->m_pfnGetBaseClass)();
00125     }
00126     return false;       // walked to the top, no match
00127 }
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsStatusbar.h Source File

common/UCvsStatusbar.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSSTATUS_H
00026 #define UCVSSTATUS_H
00027
00028 #include "uwidget.h"
00029
00030 class UCvsStatusbar : public UWidget
00031 {
00032     UDECLARE_DYNAMIC(UCvsStatusbar)
00033 public:
00034     UCvsStatusbar();
00035     virtual ~UCvsStatusbar();
00036
00037 protected:
00038
00039     ev_msg void OnDestroy();
00040     ev_msg void OnCreate();
00041
00042     UDECLARE_MESSAGE_MAP()
00043 };
00044 #endif
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CInfoParserConsole Member List

This is the complete list of members for CInfoParserConsole, including all inherited members.

CCvsRootConsole() | CCvsRootConsole |
CInfoParserConsole() | CInfoParserConsole |
cvs_err(const char *txt, long len) | CCvsRootConsole | [virtual]
cvs_out(const char *txt, long len) | CCvsRootConsole | [virtual]
GetCvsErr() | CCvsRootConsole |
GetCvsProtocolList() const | CInfoParserConsole |
GetLaunchRes() const | CCvsRootConsole |
m_cvsErr | CCvsRootConsole | [protected]
m_cvsOut | CCvsRootConsole | [protected]
m_cvsProtocolList | CInfoParserConsole | [private]
m_launchRes | CCvsRootConsole | [protected]
Parse(int launchRes) | CInfoParserConsole | [virtual]
~CCvsRootConsole() | CCvsRootConsole | [virtual]
~CInfoParserConsole() | CInfoParserConsole | [virtual]

Generated on Sat Aug 7 22:53:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJHexEdit Member List

This is the complete list of members for CCJHexEdit, including all inherited members.

CalcPos(int x, int y) | CCJHexEdit | [protected, virtual]
CCJHexEdit() | CCJHexEdit |
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CCJHexEdit | [virtual]
CreateAddressCaret(void) | CCJHexEdit | [protected, virtual]
CreateEditCaret(void) | CCJHexEdit | [protected, virtual]
EDIT_ASCII enum value | CCJHexEdit |
EDIT_HIGH enum value | CCJHexEdit |
EDIT_LOW enum value | CCJHexEdit |
EDIT_NONE enum value | CCJHexEdit |
EDITMODE enum name | CCJHexEdit |
GetData(LPBYTE p, int len) | CCJHexEdit | [virtual]
GetSel(void) | CCJHexEdit | [virtual]
IsSelected(void) | CCJHexEdit | [protected, virtual]
m_bAddressIsWide | CCJHexEdit |
m_bHalfPage | CCJHexEdit |
m_bNoAddressChange | CCJHexEdit |
m_bpr | CCJHexEdit |
m_bShowAddress | CCJHexEdit |
m_bShowAscii | CCJHexEdit |
m_bShowHex | CCJHexEdit |
m_bUpdate | CCJHexEdit |
m_currentAddress | CCJHexEdit |
m_currentMode | CCJHexEdit |
m_editPos | CCJHexEdit |
m_Font | CCJHexEdit |
m_length | CCJHexEdit |
m_lineHeight | CCJHexEdit |
m_lpp | CCJHexEdit |
m_nullWidth | CCJHexEdit |
m_offAddress | CCJHexEdit |
m_offAscii | CCJHexEdit |
m_offHex | CCJHexEdit |
m_pData | CCJHexEdit |
m_selEnd | CCJHexEdit |
m_selStart | CCJHexEdit |
m_topindex | CCJHexEdit |
Move(int x, int y) | CCJHexEdit | [protected, virtual]
NormalizeSel(void) | CCJHexEdit | [protected, virtual]
OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJHexEdit | [protected]
OnContextMenu(CWnd *, CPoint point) | CCJHexEdit | [protected]
OnEditClear() | CCJHexEdit | [protected]
OnEditCopy() | CCJHexEdit | [protected]
OnEditCut() | CCJHexEdit | [protected]
OnEditPaste() | CCJHexEdit | [protected]
OnEditSelectAll() | CCJHexEdit | [protected]
OnEditUndo() | CCJHexEdit | [protected]
OnEraseBkgnd(CDC *pDC) | CCJHexEdit | [protected]
OnGetDlgCode() | CCJHexEdit | [protected]
OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) | CCJHexEdit | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJHexEdit | [protected]
OnKillFocus(CWnd *pNewWnd) | CCJHexEdit | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CCJHexEdit | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJHexEdit | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJHexEdit | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJHexEdit | [protected]
OnPaint() | CCJHexEdit | [protected]
OnSetFocus(CWnd *pOldWnd) | CCJHexEdit | [protected]
OnVScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) | CCJHexEdit | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCJHexEdit | [protected, virtual]
RepositionCaret(int p) | CCJHexEdit | [protected, virtual]
ScrollIntoView(int p) | CCJHexEdit | [protected, virtual]
SelDelete(int s, int e) | CCJHexEdit | [protected, virtual]
SelInsert(int s, int l) | CCJHexEdit | [protected, virtual]
SetBPR(int bpr) | CCJHexEdit | [virtual]
SetData(LPBYTE p, int len) | CCJHexEdit | [virtual]
SetOptions(BOOL a, BOOL h, BOOL c, BOOL w) | CCJHexEdit | [virtual]
SetSel(int s, int e) | CCJHexEdit | [virtual]
UpdateScrollbars(void) | CCJHexEdit | [protected, virtual]
~CCJHexEdit() | CCJHexEdit | [virtual]

Generated on Sat Aug 7 22:49:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UEditMessage Member List

This is the complete list of members for UEditMessage, including all inherited members.

_GetBaseClass() | UEditMessage | [protected, static]
_messageEntries | UEditMessage | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
classUCmdTarget | UCmdTarget | [protected, static]
classUEditMessage | UEditMessage | [protected, static]
classUObject | UObject | [protected, static]
classUPromptMessage | UPromptMessage | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool fill) | UEditMessage | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UEditMessage | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UEditMessage | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UEditMessage | [virtual]
GetThisMessageMap() | UEditMessage | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kCancel enum value | UEditMessage |
kEdit enum value | UEditMessage |
kMsg enum value | UEditMessage |
kOK enum value | UEditMessage |
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_cncl | UPromptMessage | [protected]
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_edit | UEditMessage |
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_msg | UPromptMessage | [protected]
m_noDispatch | UWidget | [protected]
m_ok | UPromptMessage | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_title | UPromptMessage | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UEditMessage | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnCancel(void) | UPromptMessage | [protected]
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnOK(void) | UPromptMessage | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUEditMessage(void) | UEditMessage | [static]
rtUObject() | UObject | [static]
rtUPromptMessage(void) | UPromptMessage | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UEditMessage(const char *msg, const char *edit, const char *title, const char *def, const char *cncl) | UEditMessage | [inline]
UObject() | UObject | [inline, protected]
UPromptMessage(const char *msg, const char *title, const char *def, const char *cncl) | UPromptMessage | [inline]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UEditMessage() | UEditMessage | [inline, virtual]
~UObject() | UObject | [inline, virtual]
~UPromptMessage() | UPromptMessage | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:52:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CvsArgs Member List

This is the complete list of members for CvsArgs, including all inherited members.

add(const char *arg) | CvsArgs | [virtual]
addfile(const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L) | CvsArgs | [virtual]
argc | CvsArgs | [protected]
Argc(void) const | CvsArgs |
Argv(void) const | CvsArgs |
argv | CvsArgs | [protected]
CvsArgs(bool defargs=true) | CvsArgs |
CvsArgs(char *const *fromargv, int fromargc) | CvsArgs |
parse(const char *arg) | CvsArgs | [virtual]
print(const char *indirectory=0L) | CvsArgs |
reset(bool defargs=true) | CvsArgs |
~CvsArgs() | CvsArgs | [virtual]

Generated on Sat Aug 7 22:57:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/LogParse.cpp Source File

common/LogParse.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * LogParse.cpp : parse the CVS log output
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <errno.h>
00028 #include <stdio.h>
00029
00030 #ifdef HAVE_UNISTD_H
00031 #include <unistd.h>
00032 #endif
00033
00034 #ifdef WIN32
00035 #   include "wincvs.h"
00036 #   include "GraphDoc.h"
00037 #   include "wincvs_winutil.h"
00038 #endif /* WIN32 */
00039
00040 #ifdef TARGET_OS_MAC
00041 #   include <unistd.h>
00042 #   include "MacCvsApp.h"
00043 #   include "CTreeView.h"
00044 # include "MacMisc.h"
00045 #endif /* TARGET_OS_MAC */
00046
00047 #if qUnix
00048 #   include "UCvsDialogs.h"
00049 #   include "UCvsGraph.h"
00050 #endif
00051
00052 #include "LogParse.h"
00053 #include "CvsArgs.h"
00054 #include "CvsLog.h"
00055 #include "AppGlue.h"
00056 #include "AppConsole.h"
00057 #include "CPStr.h"
00058 #include "getline.h"
00059
00060 #ifdef WIN32
00061 #   ifdef _DEBUG
00062 #   define new DEBUG_NEW
00063 #   undef THIS_FILE
00064     static char THIS_FILE[] = __FILE__;
00065 #   endif
00066 #endif /* WIN32 */
00067
00068 #ifdef qMacCvsPP
00069   CPersistentInt    sCommitMsgEncoding("P_MessageEncoding", kMsgEncodingMacOSRoman, kAddSettings);
00070 #endif
00071
00072
00078 static void print(CColorConsole& out, const CRevFile& rev)
00079 {
00080     out << kBlue << "----------------------------" << kNormal << kNL;
00081     out << "Revision : " << kBold << kRed << rev.RevNum().c_str() << kNormal << kNL;
00082
00083     if( !rev.Locker().empty() )
00084         out << "Locked by : '" << kBold << rev.Locker() << kNormal << '\'' << kNL;
00085
00086     out << "Date : " << kBold <<
00087         (rev.RevTime().tm_year + 1900) << '/' <<
00088         rev.RevTime().tm_mon << '/' <<
00089         rev.RevTime().tm_mday << ' ' <<
00090         rev.RevTime().tm_hour << ':' <<
00091         rev.RevTime().tm_min << ':' <<
00092         rev.RevTime().tm_sec << kNormal << kNL;
00093
00094     out << "Author : '" << kBold << rev.Author() << kNormal << '\'' << kNL;
00095     out << "State : '" << kBold << rev.State() << kNormal << '\'' << kNL;
00096     out << "Lines : +" << kBold << rev.ChgPos() << ' ' << rev.ChgNeg() << kNormal << kNL;
00097
00098     if( !rev.BranchesList().empty() )
00099     {
00100         out << "Branches :" << kNL;
00101
00102         std::vector<CRevNumber>::const_iterator s;
00103         for(s = rev.BranchesList().begin(); s != rev.BranchesList().end(); ++s)
00104         {
00105             const CRevNumber& branch = *s;
00106             out << '\t' << kBold << branch.c_str() << kNormal << kNL;
00107         }
00108     }
00109
00110     if( !rev.KeywordSubst().empty() )
00111         out << "Keyword : '" << kBold << rev.KeywordSubst() << kNormal << '\'' << kNL;
00112
00113     if( !rev.CommitID().empty() )
00114         out << "CommitID : '" << kBold << rev.CommitID() << kNormal << '\'' << kNL;
00115
00116     if( !rev.MergePoint().empty() )
00117         out << "MergePoint : '" << kBold << rev.MergePoint().c_str() << kNormal << '\'' << kNL;
00118
00119     out << "Description :" << kNL << kBrown;
00120 #ifdef qMacCvsPP
00121   if ( sCommitMsgEncoding == kMsgEncodingMacOSRoman ) out << rev.DescLog();
00122   else out << ConvertString(rev.DescLog(), sCommitMsgEncoding == kMsgEncodingUTF8 ? kCFStringEncodingUTF8 : kCFStringEncodingISOLatin1, kCFStringEncodingMacRoman, true);
00123 #else
00124     out << rev.DescLog();
00125 #endif
00126     out << kNormal << kNL;
00127 }
00128
00135 static void print(CColorConsole& out, const CRcsFile& rcs, bool recurse = true)
00136 {
00137     out << "Rcs file : '" << kRed << rcs.RcsFile() << kNormal << '\'' << kNL;
00138     out << "Working file : '" << kBold << rcs.WorkingFile() << kNormal << '\'' << kNL;
00139     out << "Head revision : " << kBold << kRed << rcs.HeadRev().c_str() << kNormal << kNL;
00140     out << "Branch revision : " << kBold << rcs.BranchRev().c_str() << kNormal << kNL;
00141
00142     out << "Locks :" << kBold << (rcs.LockStrict() ? " strict" : "") << kNormal << kNL;
00143
00144     std::vector<CRevNumber>::const_iterator s;
00145     for(s = rcs.LocksList().begin(); s != rcs.LocksList().end(); ++s)
00146     {
00147         const CRevNumber & lock = *s;
00148         out << '\t' << kBold << lock.c_str() << " : '" << lock.Tag() << '\'' << kNormal << kNL;
00149     }
00150
00151     out << "Access :" << kNL;
00152
00153     std::vector<CLogStr>::const_iterator a;
00154     for(a = rcs.AccessList().begin(); a != rcs.AccessList().end(); ++a)
00155     {
00156         out << "\t'" << kBold << *a << kNormal << '\'' << kNL;
00157     }
00158
00159     if( !rcs.SymbolicList().empty() )
00160     {
00161         out << "Symbolic names :" << kNL;
00162
00163         std::vector<CRevNumber>::const_iterator n;
00164         for(n = rcs.SymbolicList().begin(); n != rcs.SymbolicList().end(); ++n)
00165         {
00166             const CRevNumber & symb = *n;
00167             out << '\t' << kBold << symb.c_str() << " : '" << symb.Tag() << '\'' << kNormal << kNL;
00168         }
00169     }
00170
00171     out << "Keyword substitution : '" << kBold << rcs.KeywordSubst() << kNormal << '\'' << kNL;
00172     out << "Total revisions : " << kBold << rcs.TotRevisions() << kNormal << kNL;
00173     out << "Selected revisions : " << kBold << rcs.SelRevisions() << kNormal << kNL;
00174     out << "Description :" << kNL << kBrown << rcs.DescLog() << kNormal << kNL;
00175
00176     if( recurse )
00177     {
00178         std::vector<CRevFile>::const_iterator i;
00179         for(i = rcs.AllRevs().begin(); i != rcs.AllRevs().end(); ++i)
00180         {
00181             print(out, *i);
00182         }
00183     }
00184
00185     out << kGreen << "===============================================" << kNormal << kNL;
00186 }
00187
00194 static void print(CColorConsole& out, const CLogNode* node, CStr& offset)
00195 {
00196     out << offset;
00197     switch(node->GetType())
00198     {
00199     case kNodeHeader :
00200         {
00201             CLogNodeHeader *header = (CLogNodeHeader*)node;
00202             out << offset << "Rcs file : '" << kRed << (**header).RcsFile() << kNormal << '\'' << kNL;
00203         }
00204         break;
00205     case kNodeBranch :
00206         break;
00207     case kNodeRev :
00208         {
00209             CLogNodeRev *rev = (CLogNodeRev*)node;
00210             out << offset << kBold << (**rev).RevNum().c_str() << kNormal << kNL;
00211         }
00212         break;
00213     case kNodeTag :
00214         break;
00215     }
00216
00217     CStr newOffset;
00218     newOffset = offset;
00219     newOffset << "    ";
00220
00221     std::vector<CLogNode *>::const_iterator i;
00222     for(i = node->Childs().begin(); i != node->Childs().end(); ++i)
00223     {
00224         print(out, *i, newOffset);
00225         newOffset << ' ';
00226     }
00227
00228     if( node->Next() != 0L )
00229     {
00230         print(out, node->Next(), offset);
00231     }
00232 }
00233
00241 static void print(CColorConsole& out, const char* prefix, const char* nodeStr, bool separator = true)
00242 {
00243     if( separator )
00244     {
00245         out << kBlue << "----------------------------" << kNormal << kNL;
00246     }
00247
00248     out << prefix << " : " << kBold << nodeStr << kNormal << kNL;
00249 }
00250
00256 void CvsLogOutput(CColorConsole& out, CLogNode* node)
00257 {
00258     switch(node->GetType())
00259     {
00260     case kNodeHeader:
00261         {
00262             CRcsFile& rcs = **(CLogNodeHeader*)node;
00263             print(out, rcs, false);
00264         }
00265         break;
00266     case kNodeBranch:
00267         {
00268             CLogStr& str = **(CLogNodeBranch*)node;
00269             print(out, "Branch", str);
00270         }
00271         break;
00272     case kNodeRev:
00273         {
00274             CRevFile& rev = **(CLogNodeRev*)node;
00275             print(out, rev);
00276         }
00277         break;
00278     case kNodeTag:
00279         {
00280             CLogStr& str = **(CLogNodeTag*)node;
00281             print(out, "Tag", str);
00282         }
00283         break;
00284     }
00285 }
00286
00294 void CvsLogParse(const char* dir, const CvsArgs& args, const bool outGraph /*= false*/, void* defWnd /*= 0L*/)
00295 {
00296     // Make a stream of the cvs log output
00297     CStr tmpFile;
00298     FILE* output = launchCVS(dir, args, tmpFile);
00299     if( output == 0L )
00300         return;
00301
00302     // Parse
00303     std::vector<CRcsFile>& allRcs = CvsLogParse(output);
00304
00305     // Maybe something went wrong or may be the user
00306     // asked to print only the RCS names, so print the
00307     // output directly without parsing../
00308     if( allRcs.empty() )
00309     {
00310         char* line = 0L;
00311         size_t line_chars_allocated = 0;
00312         int line_length = 0;
00313
00314         fseek(output, SEEK_SET, 0);
00315
00316         while( (line_length = getline(&line, &line_chars_allocated, output)) > 0 )
00317         {
00318             cvs_outstr(line, line_length);
00319             cvs_outstr("\n", 1);
00320         }
00321
00322         if( line_length < 0 && !feof(output) )
00323             cvs_err("Cannot read output file (error %d)\n", errno);
00324
00325         if( line != 0L )
00326             free(line);
00327     }
00328
00329     // Close the temp file
00330     fclose(output);
00331
00332 #ifdef WIN32
00333     if( wnt_unlink(tmpFile) != 0 )
00334 #else
00335     if( unlink(tmpFile) != 0 )
00336 #endif
00337     {
00338         cvs_err("Impossible to delete the file '%s' (error %d)\n", (const char*)tmpFile, errno);
00339     }
00340
00341     if( allRcs.empty() )
00342         return;
00343
00344     // Output the result
00345     CColorConsole out;
00346
00347     std::vector<CRcsFile>::iterator i;
00348     for(i = allRcs.begin(); i != allRcs.end(); ++i)
00349     {
00350         CRcsFile& rcs = *i;
00351
00352         if( !outGraph )
00353         {
00354             print(out, rcs);
00355         }
00356         else
00357         {
00358             CLogNode* node = CvsLogGraph(rcs);
00359             if( node == 0L )
00360             {
00361                 cvs_err("Impossible to create a graph for %s\n", (const char*)rcs.WorkingFile());
00362             }
00363
00364 #ifdef WIN32
00365             CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00366             CGraphDoc* doc;
00367
00368             if( defWnd != 0L )
00369                 doc = (CGraphDoc*)defWnd;
00370             else
00371                 doc = (CGraphDoc*)app->GetLogGraph()->OpenDocumentFile(NULL);
00372
00373             doc->SetNode(node, dir);
00374 #elif qMacCvsPP
00375             if( defWnd != 0L )
00376                 ((CTreeView*)defWnd)->SetNode(node, dir);
00377             else
00378                 CMacCvsApp::gApp->NewLogTree(node, dir);
00379 #elif qUnix
00380             UCvsGraph* graph = new UCvsGraph(node, dir);
00381             void* win = UCreate_GraphWindow();
00382
00383             UEventSendMessage(graph->GetWidID(), EV_INIT_WIDGET, kUMainWidget, win);
00384             UEventSendMessage(graph->GetWidID(), EV_SHOW_WIDGET, UMAKEINT(kUMainWidget, 1), 0L);
00385 #else
00386             CStr offset;
00387             print(out, node, offset);
00388             delete node;
00389 #endif
00390         }
00391     }
00392
00393     // Reset the parser
00394     CvsLogReset();
00395 }
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

URect Member List

This is the complete list of members for URect, including all inherited members.

bottom | URECT |
BottomRight() | URect | [inline]
BottomRight() const | URect | [inline]
CenterPoint() const | URect | [inline]
CopyRect(const URECT *lpSrURect) | URect | [inline]
DeflateRect(int x, int y) | URect | [inline]
DeflateRect(USIZE size) | URect | [inline]
DeflateRect(const URECT *lpRect) | URect |
DeflateRect(int l, int t, int r, int b) | URect |
EqualRect(const URECT *lpRect) const | URect | [inline]
Height() const | URect | [inline]
InflateRect(int x, int y) | URect | [inline]
InflateRect(USIZE size) | URect | [inline]
InflateRect(const URECT *lpRect) | URect |
InflateRect(int l, int t, int r, int b) | URect |
IntersectRect(const URECT *lpRect1, const URECT *lpRect2) | URect | [inline]
IsRectEmpty() const | URect | [inline]
IsRectNull() const | URect | [inline]
left | URECT |
MulDiv(int nMultiplier, int nDivisor) const | URect |
NormalizeRect() | URect |
OffsetRect(int x, int y) | URect | [inline]
OffsetRect(USIZE size) | URect | [inline]
OffsetRect(UPOINT point) | URect | [inline]
operator &(const URECT &rect2) const | URect | [inline]
operator &=(const URECT &rect) | URect | [inline]
operator const URECT *() const | URect | [inline]
operator CRect() const | URect | [inline]
operator URECT *() | URect | [inline]
operator!=(const URECT &rect) const | URect | [inline]
operator+(UPOINT point) const | URect | [inline]
operator+(const URECT *lpRect) const | URect | [inline]
operator+(USIZE size) const | URect | [inline]
operator+=(UPOINT point) | URect | [inline]
operator+=(USIZE size) | URect | [inline]
operator+=(const URECT *lpRect) | URect | [inline]
operator-(UPOINT point) const | URect | [inline]
operator-(USIZE size) const | URect | [inline]
operator-(const URECT *lpRect) const | URect | [inline]
operator-=(UPOINT point) | URect | [inline]
operator-=(USIZE size) | URect | [inline]
operator-=(const URECT *lpRect) | URect | [inline]
operator=(const URECT &srURect) | URect | [inline]
operator==(const URECT &rect) const | URect | [inline]
operator|(const URECT &rect2) const | URect | [inline]
operator|=(const URECT &rect) | URect | [inline]
PtInRect(UPOINT point) const | URect | [inline]
right | URECT |
SetRect(int x1, int y1, int x2, int y2) | URect | [inline]
SetRect(UPOINT topLeft, UPOINT bottomRight) | URect | [inline]
SetRectEmpty() | URect | [inline]
Size() const | URect | [inline]
top | URECT |
TopLeft() | URect | [inline]
TopLeft() const | URect | [inline]
UnionRect(const URECT *lpRect1, const URECT *lpRect2) | URect | [inline]
URect() | URect | [inline]
URect(int l, int t, int r, int b) | URect | [inline]
URect(const URECT &srURect) | URect | [inline]
URect(const URECT *lpSrURect) | URect | [inline]
URect(UPOINT point, USIZE size) | URect | [inline]
URect(UPOINT topLeft, UPOINT bottomRight) | URect | [inline]
URect(const CRect &winRect) | URect | [inline]
Width() const | URect | [inline]

Generated on Sat Aug 7 22:56:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UpdateDlg.cpp Source File

common/UpdateDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * UpdateDlg.cpp : the cvs update dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "OptionalPropertySheet.h"
00030 #endif /* WIN32 */
00031
00032 #if qUnix
00033 #   include "UCvsDialogs.h"
00034 #endif
00035
00036 #ifdef qMacCvsPP
00037 #   include <UModalDialogs.h>
00038 #   include <LMultiPanelView.h>
00039 #   include <LCheckBox.h>
00040 #   include <LEditText.h>
00041 #   include <LPopupGroupBox.h>
00042 #   include <LRadioButton.h>
00043 #   include "LPopupFiller.h"
00044
00045 #   include "MacCvsConstant.h"
00046 # include "UCommandDialogs.h"
00047 #endif /* qMacCvsPP */
00048
00049 #include "UpdateDlg.h"
00050 #include "CvsPrefs.h"
00051 #include "MultiFiles.h"
00052 #include "ItemListDlg.h"
00053
00054 #ifdef WIN32
00055 #   ifdef _DEBUG
00056 #   define new DEBUG_NEW
00057 #   undef THIS_FILE
00058     static char THIS_FILE[] = __FILE__;
00059 #   endif
00060 #endif /* WIN32 */
00061
00062 extern CMString gRevNames;
00063 extern CMString gReleasesNames;
00064 extern CMString gDateNames;
00065 extern CMString gDateOrRevNames;
00066
00068 char* sDefTagNames[] =
00069 {
00070     "1.1",
00071     "1.6.2.4",
00072     "HEAD",
00073     "branch-release-1-0",
00074     0L
00075 };
00076
00078 char* sDefDateNames[] =
00079 {
00080     "1998-3",
00081     "1998-3-24",
00082     "1998-3-24 20:55",
00083     "24 Mar",
00084     "24 Mar 1998",
00085     "<=1998-3-24",
00086     0L
00087 };
00088
00090 char *sDefRevDateNames[] =
00091 {
00092     "1.1",
00093     "1.6.2.4",
00094     "HEAD",
00095     "branch-release-1-0",
00096     "1998-3",
00097     "1998-3-24",
00098     "1998-3-24 20:55",
00099     "24 Mar",
00100     "24 Mar 1998",
00101     "<=1998-3-24",
00102     0L
00103 };
00104
00105 CMString gRevNames(20, "P_TagNames", sDefTagNames);
00106 CMString gDateNames(20, "P_DateNames", sDefDateNames);
00107 CMString gDateOrRevNames(20, "P_RebDateNames", sDefRevDateNames);
00108
00109 #ifdef WIN32
00110 #include "GetPrefs.h"
00111
00113 // CUpdateMain
00114
00115 IMPLEMENT_DYNAMIC(CUpdateMain, CHHelpPropertyPage)
00116
00117 CUpdateMain::CUpdateMain() : CHHelpPropertyPage(CUpdateMain::IDD)
00118 {
00119     //{{AFX_DATA_INIT(CUpdateMain)
00120     m_norecurs = FALSE;
00121     m_createmissdir = FALSE;
00122     m_getcleancopy = FALSE;
00123     //}}AFX_DATA_INIT
00124 }
00125
00126 CUpdateMain::~CUpdateMain()
00127 {
00128 }
00129
00130 void CUpdateMain::DoDataExchange(CDataExchange* pDX)
00131 {
00132     CHHelpPropertyPage::DoDataExchange(pDX);
00133     //{{AFX_DATA_MAP(CUpdateMain)
00134     DDX_Check(pDX, IDC_NORECURS, m_norecurs);
00135     DDX_Check(pDX, IDC_CREATE_MISSING_DIR, m_createmissdir);
00136     DDX_Check(pDX, IDC_GET_CLEAN_COPY, m_getcleancopy);
00137     //}}AFX_DATA_MAP
00138 }
00139
00140
00141 BEGIN_MESSAGE_MAP(CUpdateMain, CHHelpPropertyPage)
00142     //{{AFX_MSG_MAP(CUpdateMain)
00143     //}}AFX_MSG_MAP
00144 END_MESSAGE_MAP()
00145
00146 void CUpdateMain::InitHelpID()
00147 {
00148     SetCtrlHelpID(IDC_NORECURS,             IDH_IDC_NORECURS);
00149     SetCtrlHelpID(IDC_CREATE_MISSING_DIR,   IDH_IDC_CREATE_MISSING_DIR);
00150     SetCtrlHelpID(IDC_GET_CLEAN_COPY,       IDH_IDC_GET_CLEAN_COPY);
00151 }
00152
00154 // CUpdateOptions
00155
00156 IMPLEMENT_DYNAMIC(CUpdateOptions, CHHelpPropertyPage)
00157
00158 CUpdateOptions::CUpdateOptions(const MultiFiles* mf,
00159                                      const char* rev, const char* date, const char* keyword,
00160                                      const bool resetSticky, const bool caseSensitiveNames, const bool lastCheckinTime)
00161                                      : m_mf(mf), CHHelpPropertyPage(CUpdateOptions::IDD)
00162 {
00163     //{{AFX_DATA_INIT(CUpdateOptions)
00164     m_date = date;
00165     m_rev = rev;
00166     m_hasDate = FALSE;
00167     m_match = FALSE;
00168     m_hasRev = FALSE;
00169     m_keyword = keyword;
00170     m_resetSticky = resetSticky;
00171     m_stdout = FALSE;
00172     m_caseSensitiveNames = caseSensitiveNames;
00173     m_lastCheckinTime = lastCheckinTime;
00174     //}}AFX_DATA_INIT
00175
00176     m_revCombo.SetItems(&gRevNames);
00177     m_dateCombo.SetItems(&gDateNames);
00178 }
00179
00180 CUpdateOptions::~CUpdateOptions()
00181 {
00182 }
00183
00184 void CUpdateOptions::DoDataExchange(CDataExchange* pDX)
00185 {
00186     CHHelpPropertyPage::DoDataExchange(pDX);
00187     //{{AFX_DATA_MAP(CUpdateOptions)
00188     DDX_Control(pDX, IDC_FORCE_HEAD_REV, m_matchCheck);
00189     DDX_Control(pDX, IDC_RESET_STICKY, m_resetStickyCheck);
00190     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00191     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00192     DDX_Control(pDX, IDC_HAS_DATE, m_hasDateCheck);
00193     DDX_Control(pDX, IDC_KEYWORD_OPT, m_keywordCombo);
00194     DDX_Control(pDX, IDC_KEYWORD_DESC, m_keywordDescStatic);
00195     DDX_Control(pDX, IDC_REV_TAG, m_revCombo);
00196     DDX_Control(pDX, IDC_DATE, m_dateCombo);
00197     DDX_CBString(pDX, IDC_DATE, m_date);
00198     DDX_CBString(pDX, IDC_REV_TAG, m_rev);
00199     DDX_Check(pDX, IDC_HAS_DATE, m_hasDate);
00200     DDX_Check(pDX, IDC_FORCE_HEAD_REV, m_match);
00201     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00202     DDX_CBString(pDX, IDC_KEYWORD_OPT, m_keyword);
00203     DDX_Check(pDX, IDC_RESET_STICKY, m_resetSticky);
00204     DDX_Check(pDX, IDC_STDOUT, m_stdout);
00205     DDX_Check(pDX, IDC_CASE_SENSITIVE_NAMES, m_caseSensitiveNames);
00206     DDX_Check(pDX, IDC_LAST_CHECKIN_TIME, m_lastCheckinTime);
00207     //}}AFX_DATA_MAP
00208
00209     if( m_hasRev )
00210     {
00211         DDV_MinChars(pDX, m_rev, 1);
00212     }
00213
00214     if( m_hasDate )
00215     {
00216         DDV_MinChars(pDX, m_date, 1);
00217     }
00218
00219     if( !pDX->m_bSaveAndValidate )
00220     {
00221         OnDelsticky();
00222         OnDate();
00223         OnRev();
00224     }
00225
00226     DDX_ComboMString(pDX, IDC_REV_TAG, m_revCombo);
00227     DDX_ComboMString(pDX, IDC_DATE, m_dateCombo);
00228 }
00229
00230
00231 BEGIN_MESSAGE_MAP(CUpdateOptions, CHHelpPropertyPage)
00232     //{{AFX_MSG_MAP(CUpdateOptions)
00233     ON_BN_CLICKED(IDC_HAS_DATE, OnDate)
00234     ON_BN_CLICKED(IDC_HAS_REV, OnRev)
00235     ON_BN_CLICKED(IDC_BROWSE_TAG, OnBrowseTag)
00236     ON_BN_CLICKED(IDC_RESET_STICKY, OnDelsticky)
00237     //}}AFX_MSG_MAP
00238 END_MESSAGE_MAP()
00239
00241 // CUpdateOptions message handlers
00242
00244 BOOL CUpdateOptions::OnInitDialog()
00245 {
00246     CHHelpPropertyPage::OnInitDialog();
00247
00248     // Extra initialization
00249     m_keywordCombo.SetDescriptionWnd(m_keywordDescStatic.m_hWnd);
00250
00251     return TRUE;  // return TRUE unless you set the focus to a control
00252                   // EXCEPTION: OCX Property Pages should return FALSE
00253 }
00254
00255 void CUpdateOptions::InitHelpID()
00256 {
00257     SetCtrlHelpID(IDC_RESET_STICKY,         IDH_IDC_RESET_STICKY);
00258     SetCtrlHelpID(IDC_HAS_DATE,             IDH_IDC_HAS_DATE);
00259     SetCtrlHelpID(IDC_DATE,                 IDH_IDC_DATE);
00260     SetCtrlHelpID(IDC_HAS_REV,              IDH_IDC_HAS_REV);
00261     SetCtrlHelpID(IDC_REV_TAG,              IDH_IDC_REV_TAG);
00262     SetCtrlHelpID(IDC_BROWSE_TAG,           IDH_IDC_BROWSE_TAG);
00263     SetCtrlHelpID(IDC_FORCE_HEAD_REV,       IDH_IDC_FORCE_HEAD_REV);
00264     SetCtrlHelpID(IDC_KEYWORD_OPT,          IDH_IDC_KEYWORD_OPT);
00265     SetCtrlHelpID(IDC_KEYWORD_DESC,         IDH_IDC_KEYWORD_DESC);
00266     SetCtrlHelpID(IDC_STDOUT,               IDH_IDC_STDOUT);
00267     SetCtrlHelpID(IDC_CASE_SENSITIVE_NAMES, IDH_IDC_CASE_SENSITIVE_NAMES);
00268     SetCtrlHelpID(IDC_LAST_CHECKIN_TIME,    IDH_IDC_LAST_CHECKIN_TIME);
00269 }
00270
00272 void CUpdateOptions::OnDate()
00273 {
00274     const BOOL enable = m_hasDateCheck.GetCheck() != 0 && !m_resetStickyCheck.GetCheck();
00275
00276     m_dateCombo.EnableWindow(enable);
00277 }
00278
00280 void CUpdateOptions::OnRev()
00281 {
00282     const BOOL enable = m_hasRevCheck.GetCheck() && !m_resetStickyCheck.GetCheck();
00283
00284     m_revCombo.EnableWindow(enable);
00285     m_browseTagButton.EnableWindow(enable);
00286 }
00287
00289 void CUpdateOptions::OnBrowseTag()
00290 {
00291     CStr tagName;
00292     if( CompatGetTagListItem(m_mf, tagName) )
00293     {
00294         m_rev = (const char*)tagName;
00295         m_revCombo.SetWindowText(m_rev);
00296     }
00297 }
00298
00300 void CUpdateOptions::OnDelsticky()
00301 {
00302     const BOOL enable = !m_resetStickyCheck.GetCheck();
00303
00304     m_hasDateCheck.EnableWindow(enable);
00305     m_dateCombo.EnableWindow(enable);
00306     m_hasRevCheck.EnableWindow(enable);
00307     m_revCombo.EnableWindow(enable);
00308     m_browseTagButton.EnableWindow(enable);
00309     m_matchCheck.EnableWindow(enable);
00310     m_keywordCombo.EnableWindow(enable);
00311     m_keywordDescStatic.EnableWindow(enable);
00312
00313     OnDate();
00314     OnRev();
00315 }
00316
00318 // CUpdateMerge
00319
00320 IMPLEMENT_DYNAMIC(CUpdateMerge, CHHelpPropertyPage)
00321
00322 CUpdateMerge::CUpdateMerge(const MultiFiles* mf,
00323                            bool isCheckout,
00324                            const char* rev1, const char* rev2, const char* date1, const char* date2,
00325                            const bool threeWayConflicts)
00326                            : m_mf(mf), m_mergeTypeCombo(USmartCombo::AutoDropWidth), CHHelpPropertyPage(CUpdateMerge::IDD)
00327 {
00328     //{{AFX_DATA_INIT(CUpdateMerge)
00329     m_rev1 = rev1;
00330     m_rev2 = rev2;
00331     m_hasDate1 = FALSE;
00332     m_hasDate2 = FALSE;
00333     m_date1 = _T("");
00334     m_date2 = _T("");
00335     m_threeWayConflicts = threeWayConflicts;
00336     m_branchPointMerge = FALSE;
00337     m_mergeType = 0;
00338     //}}AFX_DATA_INIT
00339
00340     m_isCheckout = isCheckout;
00341
00342     m_rev1Combo.SetItems(m_isCheckout ? &gReleasesNames : &gRevNames);
00343     m_rev2Combo.SetItems(m_isCheckout ? &gReleasesNames : &gRevNames);
00344     m_date1Combo.SetItems(&gDateNames);
00345     m_date2Combo.SetItems(&gDateNames);
00346 }
00347
00348 CUpdateMerge::~CUpdateMerge()
00349 {
00350 }
00351
00352 void CUpdateMerge::DoDataExchange(CDataExchange* pDX)
00353 {
00354     CHHelpPropertyPage::DoDataExchange(pDX);
00355     //{{AFX_DATA_MAP(CUpdateMerge)
00356     DDX_Control(pDX, IDC_MERGE_TYPE, m_mergeTypeCombo);
00357     DDX_Control(pDX, IDC_BRANCHPOINT_MERGE, m_branchPointMergeCheck);
00358     DDX_Control(pDX, IDC_THREE_WAY_CONFLICTS, m_threeWayConflictsCheck);
00359     DDX_Control(pDX, IDC_HAS_DATE2, m_hasDate2Check);
00360     DDX_Control(pDX, IDC_HAS_DATE1, m_hasDate1Check);
00361     DDX_Control(pDX, IDC_BROWSE_TAG2, m_browse2TagButton);
00362     DDX_Control(pDX, IDC_BROWSE_TAG1, m_browse1TagButton);
00363     DDX_Control(pDX, IDC_DATE2, m_date2Combo);
00364     DDX_Control(pDX, IDC_DATE1, m_date1Combo);
00365     DDX_Control(pDX, IDC_REV_TAG2, m_rev2Combo);
00366     DDX_Control(pDX, IDC_REV_TAG, m_rev1Combo);
00367     DDX_CBString(pDX, IDC_REV_TAG, m_rev1);
00368     DDX_CBString(pDX, IDC_REV_TAG2, m_rev2);
00369     DDX_Check(pDX, IDC_HAS_DATE1, m_hasDate1);
00370     DDX_Check(pDX, IDC_HAS_DATE2, m_hasDate2);
00371     DDX_CBString(pDX, IDC_DATE1, m_date1);
00372     DDX_CBString(pDX, IDC_DATE2, m_date2);
00373     DDX_Check(pDX, IDC_THREE_WAY_CONFLICTS, m_threeWayConflicts);
00374     DDX_Check(pDX, IDC_BRANCHPOINT_MERGE, m_branchPointMerge);
00375     DDX_CBIndex(pDX, IDC_MERGE_TYPE, m_mergeType);
00376     //}}AFX_DATA_MAP
00377
00378     if( m_mergeType > 0 == 1 || m_mergeType == 2 )
00379     {
00380         DDV_MinChars(pDX, m_rev1, 1);
00381         if( m_hasDate1 )
00382         {
00383             DDV_MinChars(pDX, m_date1, 1);
00384         }
00385     }
00386
00387     if( m_mergeType == 2 )
00388     {
00389         DDV_MinChars(pDX, m_rev2, 1);
00390         if( m_hasDate2 )
00391         {
00392             DDV_MinChars(pDX, m_date2, 1);
00393         }
00394     }
00395
00396     if( !pDX->m_bSaveAndValidate )
00397     {
00398         OnSelchangeMergeType();
00399     }
00400
00401     DDX_ComboMString(pDX, IDC_REV_TAG, m_rev1Combo);
00402     DDX_ComboMString(pDX, IDC_REV_TAG2, m_rev2Combo);
00403     DDX_ComboMString(pDX, IDC_DATE1, m_date1Combo);
00404     DDX_ComboMString(pDX, IDC_DATE2, m_date2Combo);
00405 }
00406
00407 void CUpdateMerge::InitHelpID()
00408 {
00409     SetCtrlHelpID(IDC_MERGE_TYPE,           IDH_IDC_MERGE_TYPE);
00410     SetCtrlHelpID(IDC_REV_TAG,              IDH_IDC_REV_TAG);
00411     SetCtrlHelpID(IDC_BROWSE_TAG1,          IDH_IDC_BROWSE_TAG);
00412     SetCtrlHelpID(IDC_HAS_DATE1,            IDH_IDC_HAS_DATE);
00413     SetCtrlHelpID(IDC_DATE1,                IDH_IDC_DATE);
00414     SetCtrlHelpID(IDC_REV_TAG2,             IDH_IDC_REV_TAG);
00415     SetCtrlHelpID(IDC_BROWSE_TAG2,          IDH_IDC_BROWSE_TAG);
00416     SetCtrlHelpID(IDC_HAS_DATE2,            IDH_IDC_HAS_DATE);
00417     SetCtrlHelpID(IDC_DATE2,                IDH_IDC_DATE);
00418     SetCtrlHelpID(IDC_THREE_WAY_CONFLICTS,  IDH_IDC_THREE_WAY_CONFLICTS);
00419     SetCtrlHelpID(IDC_BRANCHPOINT_MERGE,    IDH_IDC_BRANCHPOINT_MERGE);
00420 }
00421
00423 void CUpdateMerge::OnSelchangeMergeType()
00424 {
00425     switch( m_mergeTypeCombo.GetCurSel() )
00426     {
00427     case 1:
00428         m_rev1Combo.EnableWindow(TRUE);
00429         m_rev2Combo.EnableWindow(FALSE);
00430         m_browse1TagButton.EnableWindow(TRUE);
00431         m_browse2TagButton.EnableWindow(FALSE);
00432         break;
00433     case 2:
00434         m_rev1Combo.EnableWindow(TRUE);
00435         m_rev2Combo.EnableWindow(TRUE);
00436         m_browse1TagButton.EnableWindow(TRUE);
00437         m_browse2TagButton.EnableWindow(TRUE);
00438         break;
00439     default:
00440         m_rev1Combo.EnableWindow(FALSE);
00441         m_rev2Combo.EnableWindow(FALSE);
00442         m_browse1TagButton.EnableWindow(FALSE);
00443         m_browse2TagButton.EnableWindow(FALSE);
00444         break;
00445     }
00446
00447     m_hasDate1Check.EnableWindow(m_rev1Combo.IsWindowEnabled());
00448     m_hasDate2Check.EnableWindow(m_rev2Combo.IsWindowEnabled());
00449     m_date1Combo.EnableWindow(m_rev1Combo.IsWindowEnabled() && m_hasDate1Check.GetCheck());
00450     m_date2Combo.EnableWindow(m_rev2Combo.IsWindowEnabled() && m_hasDate2Check.GetCheck());
00451     m_threeWayConflictsCheck.EnableWindow(m_rev1Combo.IsWindowEnabled());
00452     m_branchPointMergeCheck.EnableWindow(m_rev1Combo.IsWindowEnabled());
00453 }
00454
00456 void CUpdateMerge::OnCheckdate1()
00457 {
00458     OnSelchangeMergeType();
00459 }
00460
00462 void CUpdateMerge::OnCheckdate2()
00463 {
00464     OnSelchangeMergeType();
00465 }
00466
00468 void CUpdateMerge::OnBrowseTag1()
00469 {
00470     CStr tagName;
00471     if( CompatGetTagListItem(m_mf, tagName) )
00472     {
00473         m_rev1 = (const char*)tagName;
00474         m_rev1Combo.SetWindowText(m_rev1);
00475     }
00476 }
00477
00479 void CUpdateMerge::OnBrowseTag2()
00480 {
00481     CStr tagName;
00482     if( CompatGetTagListItem(m_mf, tagName) )
00483     {
00484         m_rev2 = (const char*)tagName;
00485         m_rev2Combo.SetWindowText(m_rev2);
00486     }
00487 }
00488
00489 BEGIN_MESSAGE_MAP(CUpdateMerge, CHHelpPropertyPage)
00490     //{{AFX_MSG_MAP(CUpdateMerge)
00491     ON_BN_CLICKED(IDC_HAS_DATE1, OnCheckdate1)
00492     ON_BN_CLICKED(IDC_HAS_DATE2, OnCheckdate2)
00493     ON_BN_CLICKED(IDC_BROWSE_TAG1, OnBrowseTag1)
00494     ON_BN_CLICKED(IDC_BROWSE_TAG2, OnBrowseTag2)
00495     ON_CBN_SELCHANGE(IDC_MERGE_TYPE, OnSelchangeMergeType)
00496     //}}AFX_MSG_MAP
00497 END_MESSAGE_MAP()
00498
00499 #endif /* WIN32 */
00500
00501 #ifdef qMacCvsPP
00502 static void DoDataExchange_UpdateMerge(LWindow *theDialog, const MultiFiles* mf,
00503     bool & merge1, bool & merge2,
00504     CStr & sLastRev1, CStr & sLastRev2, bool putValue)
00505 {
00506     LRadioButton *chkHasRev = dynamic_cast<LRadioButton*>
00507         (theDialog->FindPaneByID(item_CheckRevTag1));
00508     LEditText *editRev = dynamic_cast<LEditText*>
00509         (theDialog->FindPaneByID(item_EditRevTag1));
00510     LRadioButton *chkHasRev2 = dynamic_cast<LRadioButton*>
00511         (theDialog->FindPaneByID(item_CheckRevTag2));
00512     LEditText *editRev2 = dynamic_cast<LEditText*>
00513         (theDialog->FindPaneByID(item_EditRevTag2));
00514     LPopupFiller *fill1 = dynamic_cast<LPopupFiller*>
00515         (theDialog->FindPaneByID(item_FillerRev1));
00516     LPopupFiller *fill2 = dynamic_cast<LPopupFiller*>
00517         (theDialog->FindPaneByID(item_FillerRev2));
00518
00519     LTagWrapper *wrapper1 = putValue ? NEW LTagWrapper(fill1, mf) : 0L;
00520     fill1->DoDataExchange(gRevNames, putValue, wrapper1);
00521     LTagWrapper *wrapper2 = putValue ? NEW LTagWrapper(fill2, mf) : 0L;
00522     fill2->DoDataExchange(gRevNames, putValue, wrapper2);
00523
00524     if(putValue)
00525     {
00526         if(merge1 && merge2)
00527             theDialog->SetValueForPaneID (item_CheckRevTag2, Button_On);
00528         else if(merge1)
00529             theDialog->SetValueForPaneID (item_CheckRevTag1, Button_On);
00530         else
00531             theDialog->SetValueForPaneID (item_MergeNone, Button_On);
00532
00533         editRev->SetText((Ptr)(const char *)sLastRev1, sLastRev1.length());
00534         editRev2->SetText((Ptr)(const char *)sLastRev2, sLastRev2.length());
00535     }
00536     else
00537     {
00538         if(theDialog->GetValueForPaneID(item_CheckRevTag2) == Button_On)
00539         {
00540             merge1 = merge2 = true;
00541         }
00542         else if (theDialog->GetValueForPaneID(item_CheckRevTag1) == Button_On)
00543         {
00544             merge1 = true;
00545             merge2 = false;
00546         }
00547         else
00548         {
00549             merge1 = merge2 = false;
00550         }
00551
00552         char str[255];
00553         Size len;
00554
00555         editRev->GetText(str, 254, &len);
00556         sLastRev1.set(str, len);
00557         editRev2->GetText(str, 254, &len);
00558         sLastRev2.set(str, len);
00559     }
00560 }
00561
00562 static void DoDataExchange_UpdateSticky(LWindow *theDialog, const MultiFiles* mf,
00563     bool & hasDate, bool & hasRev,
00564     CStr & sLastDate, CStr & sLastRev, bool & useMostRecent, bool putValue)
00565 {
00566     LCheckBox *chkHasDate = dynamic_cast<LCheckBox*>
00567         (theDialog->FindPaneByID(item_CheckDate));
00568     LCheckBox *chkHasRev = dynamic_cast<LCheckBox*>
00569         (theDialog->FindPaneByID(item_CheckRevTag));
00570     LCheckBox *chkMostRecent = dynamic_cast<LCheckBox*>
00571         (theDialog->FindPaneByID(item_MostRecentRev));
00572     LEditText *editDate = dynamic_cast<LEditText*>
00573         (theDialog->FindPaneByID(item_EditDate));
00574     LEditText *editRev = dynamic_cast<LEditText*>
00575         (theDialog->FindPaneByID(item_EditRevTag));
00576     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*>
00577         (theDialog->FindPaneByID(item_FillerTag));
00578     LPopupFiller *fillDate = dynamic_cast<LPopupFiller*>
00579         (theDialog->FindPaneByID(item_FillerDate));
00580
00581     LTagWrapper *wrapper = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00582     fillTag->DoDataExchange(gRevNames, putValue, wrapper);
00583     fillDate->DoDataExchange(gDateNames, putValue);
00584
00585     if(putValue)
00586     {
00587         chkHasDate->SetValue(hasDate ? Button_On : Button_Off);
00588         chkHasRev->SetValue(hasRev ? Button_On : Button_Off);
00589         chkMostRecent->SetValue(useMostRecent ? Button_On : Button_Off);
00590         editDate->SetText((Ptr)(const char *)sLastDate, sLastDate.length());
00591         editRev->SetText((Ptr)(const char *)sLastRev, sLastRev.length());
00592     }
00593     else
00594     {
00595         hasDate = chkHasDate->GetValue() == Button_On;
00596         hasRev = chkHasRev->GetValue() == Button_On;
00597         useMostRecent = chkMostRecent->GetValue() == Button_On;
00598
00599         char str[255];
00600         Size len;
00601
00602         editDate->GetText(str, 254, &len);
00603         sLastDate.set(str, len);
00604         editRev->GetText(str, 254, &len);
00605         sLastRev.set(str, len);
00606     }
00607 }
00608
00609 static void DoDataExchange_UpdateSettings(LWindow *theDialog, bool & toStdout, bool & noRecurs,
00610     bool & resetSticky, bool & createMissDir, bool & getCleanCopy, bool putValue)
00611 {
00612     DoDataExchange (theDialog, item_NoRecurs, noRecurs, putValue);
00613     DoDataExchange (theDialog, item_ToStout, toStdout, putValue);
00614     DoDataExchange (theDialog, item_ResetSticky, resetSticky, putValue);
00615     DoDataExchange (theDialog, item_CreateMissDir, createMissDir, putValue);
00616     DoDataExchange (theDialog, item_GetCleanCopy, getCleanCopy, putValue);
00617
00618 }
00619 #endif /* qMacCvsPP */
00620
00621 #if qUnix
00622 class UCvsUpdate : public UWidget
00623 {
00624     UDECLARE_DYNAMIC(UCvsUpdate)
00625 public:
00626     UCvsUpdate() : UWidget(::UEventGetWidID()) {}
00627     virtual ~UCvsUpdate() {}
00628
00629     enum
00630     {
00631         kOK = EV_COMMAND_START, // 0
00632         kCancel,                // 1
00633         kTabGeneral             // 2
00634     };
00635
00636     virtual void DoDataExchange(bool fill);
00637
00638 protected:
00639     ev_msg int OnOK(void);
00640     ev_msg int OnCancel(void);
00641
00642     UDECLARE_MESSAGE_MAP()
00643 };
00644
00645 UIMPLEMENT_DYNAMIC(UCvsUpdate, UWidget)
00646
00647 UBEGIN_MESSAGE_MAP(UCvsUpdate, UWidget)
00648     ON_UCOMMAND(UCvsUpdate::kOK, UCvsUpdate::OnOK)
00649     ON_UCOMMAND(UCvsUpdate::kCancel, UCvsUpdate::OnCancel)
00650 UEND_MESSAGE_MAP()
00651
00652 int UCvsUpdate::OnOK(void)
00653 {
00654     EndModal(true);
00655     return 0;
00656 }
00657
00658 int UCvsUpdate::OnCancel(void)
00659 {
00660     EndModal(false);
00661     return 0;
00662 }
00663
00664 void UCvsUpdate::DoDataExchange(bool fill)
00665 {
00666     if(fill)
00667     {
00668     }
00669     else
00670     {
00671     }
00672 }
00673
00674 class UCvsUpdate_MAIN : public UWidget
00675 {
00676     UDECLARE_DYNAMIC(UCvsUpdate_MAIN)
00677 public:
00678     UCvsUpdate_MAIN() : UWidget(::UEventGetWidID()) {}
00679     virtual ~UCvsUpdate_MAIN() {}
00680
00681     enum
00682     {
00683         kCheckStdout = EV_COMMAND_START,    // 0
00684         kCheckRecurse,          // 1
00685         kCheckReset,            // 2
00686         kCheckMissing,          // 3
00687         kGetCleanCopy           // 4
00688     };
00689
00690     virtual void DoDataExchange(bool fill);
00691
00692     bool m_toStdout;
00693     bool m_noRecurs;
00694     bool m_resetSticky;
00695     bool m_createMissDir;
00696     bool m_getCleanCopy;
00697 protected:
00698
00699     UDECLARE_MESSAGE_MAP()
00700 };
00701
00702 UIMPLEMENT_DYNAMIC(UCvsUpdate_MAIN, UWidget)
00703
00704 UBEGIN_MESSAGE_MAP(UCvsUpdate_MAIN, UWidget)
00705 UEND_MESSAGE_MAP()
00706
00707 void UCvsUpdate_MAIN::DoDataExchange(bool fill)
00708 {
00709     if(fill)
00710     {
00711         m_toStdout = false;
00712         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckStdout, m_toStdout), 0L);
00713         m_noRecurs = false;
00714         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurse, m_noRecurs), 0L);
00715         m_resetSticky = false;
00716         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckReset, m_resetSticky), 0L);
00717         m_createMissDir = false;
00718         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckMissing, m_createMissDir), 0L);
00719         m_getCleanCopy = false;
00720         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kGetCleanCopy, m_getCleanCopy), 0L);
00721     }
00722     else
00723     {
00724         m_toStdout = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckStdout, 0L) != 0;
00725         m_noRecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurse, 0L) != 0;
00726         m_resetSticky = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckReset, 0L) != 0;
00727         m_createMissDir = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckMissing, 0L) != 0;
00728         m_getCleanCopy = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kGetCleanCopy, 0L) != 0;
00729     }
00730 }
00731
00732 class UCvsUpdate_STICKY : public UWidget
00733 {
00734     UDECLARE_DYNAMIC(UCvsUpdate_STICKY)
00735 public:
00736     UCvsUpdate_STICKY(const char *rev, const char *date);
00737     virtual ~UCvsUpdate_STICKY() {}
00738
00739     enum
00740     {
00741         kCheckDate = EV_COMMAND_START,  // 0
00742         kComboDate,         // 1
00743         kCheckRev,          // 2
00744         kComboRev,          // 3
00745         kCheckMatch         // 4
00746     };
00747
00748     virtual void DoDataExchange(bool fill);
00749
00750     UStr m_date;
00751     UStr m_rev;
00752     bool m_hasdate;
00753     bool m_hasrev;
00754     bool m_match;
00755 protected:
00756
00757     ev_msg int OnDate(void);
00758     ev_msg int OnRev(void);
00759
00760     UDECLARE_MESSAGE_MAP()
00761 };
00762
00763 UIMPLEMENT_DYNAMIC(UCvsUpdate_STICKY, UWidget)
00764
00765 UBEGIN_MESSAGE_MAP(UCvsUpdate_STICKY, UWidget)
00766     ON_UCOMMAND(UCvsUpdate_STICKY::kCheckDate, UCvsUpdate_STICKY::OnDate)
00767     ON_UCOMMAND(UCvsUpdate_STICKY::kCheckRev, UCvsUpdate_STICKY::OnRev)
00768 UEND_MESSAGE_MAP()
00769
00770 UCvsUpdate_STICKY::UCvsUpdate_STICKY(const char *rev, const char *date) : UWidget(::UEventGetWidID())
00771 {
00772     m_date = date;
00773     m_rev = rev;
00774     m_hasdate = false;
00775     m_hasrev = false;
00776     m_match = false;
00777 }
00778
00779 int UCvsUpdate_STICKY::OnDate()
00780 {
00781     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate, 0L);
00782     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboDate, state), 0L);
00783     return 0;
00784 }
00785
00786 int UCvsUpdate_STICKY::OnRev()
00787 {
00788     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRev, 0L);
00789     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev, state), 0L);
00790     return 0;
00791 }
00792
00793 void UCvsUpdate_STICKY::DoDataExchange(bool fill)
00794 {
00795     ::DoDataExchange(fill, GetWidID(), kComboRev, gRevNames);
00796     ::DoDataExchange(fill, GetWidID(), kComboDate, gDateNames);
00797
00798     if(fill)
00799     {
00800         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckDate, m_hasdate), 0L);
00801         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRev, m_hasrev), 0L);
00802         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckMatch, m_match), 0L);
00803
00804         OnDate();
00805         OnRev();
00806     }
00807     else
00808     {
00809         m_hasdate = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate, 0L);
00810         m_hasrev = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRev, 0L);
00811         m_match = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckMatch, 0L);
00812
00813         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboDate, &m_date);
00814         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboRev, &m_rev);
00815     }
00816 }
00817
00818 class UCvsUpdate_MERGE : public UWidget
00819 {
00820     UDECLARE_DYNAMIC(UCvsUpdate_MERGE)
00821 public:
00822     UCvsUpdate_MERGE(const char *rev1, const char *rev2);
00823     virtual ~UCvsUpdate_MERGE() {}
00824
00825     enum
00826     {
00827         kRadioNone = EV_COMMAND_START,  // 0
00828         kRadioMerge1,       // 1
00829         kRadioMerge2,       // 2
00830         kComboRev1,         // 3
00831         kComboRev2          // 4
00832     };
00833
00834     virtual void DoDataExchange(bool fill);
00835
00836     UStr m_rev1;
00837     UStr m_rev2;
00838     int m_merge;
00839 protected:
00840
00841     ev_msg int OnMerge(int cmd);
00842
00843     UDECLARE_MESSAGE_MAP()
00844 };
00845
00846 UIMPLEMENT_DYNAMIC(UCvsUpdate_MERGE, UWidget)
00847
00848 UBEGIN_MESSAGE_MAP(UCvsUpdate_MERGE, UWidget)
00849     ON_UCOMMAND_RANGE(UCvsUpdate_MERGE::kRadioNone, UCvsUpdate_MERGE::kRadioMerge2, UCvsUpdate_MERGE::OnMerge)
00850 UEND_MESSAGE_MAP()
00851
00852 UCvsUpdate_MERGE::UCvsUpdate_MERGE(const char *rev1, const char *rev2) : UWidget(::UEventGetWidID())
00853 {
00854     m_rev1 = rev1;
00855     m_rev2 = rev2;
00856     m_merge = 0;
00857 }
00858
00859 int UCvsUpdate_MERGE::OnMerge(int cmd)
00860 {
00861     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRadioNone, 0L);
00862     if(state)
00863     {
00864         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev1, 0), 0L);
00865         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev2, 0), 0L);
00866     }
00867     else
00868     {
00869         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev1, 1), 0L);
00870         state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRadioMerge1, 0L);
00871         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev2, state == 0), 0L);
00872     }
00873     return 0;
00874 }
00875
00876 void UCvsUpdate_MERGE::DoDataExchange(bool fill)
00877 {
00878     ::DoDataExchange(fill, GetWidID(), kComboRev1, gRevNames);
00879     ::DoDataExchange(fill, GetWidID(), kComboRev2, gRevNames);
00880
00881     if(fill)
00882     {
00883         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kRadioNone + m_merge, 1), 0L);
00884
00885         OnMerge(kRadioNone + m_merge);
00886     }
00887     else
00888     {
00889         if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRadioNone, 0L))
00890             m_merge = 0;
00891         else if(UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRadioMerge1, 0L))
00892             m_merge = 1;
00893         else
00894             m_merge = 2;
00895
00896         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboRev1, &m_rev1);
00897         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboRev2, &m_rev2);
00898     }
00899 }
00900 #endif // qUnix
00901
00903 bool CompatGetUpdate(const MultiFiles* mf,
00904                      bool& toStdout, bool& noRecurs, bool& resetSticky,
00905                      CStr& date, CStr& rev,
00906                      bool& useMostRecent,
00907                      CStr& rev1, CStr& rev2,
00908                      bool& branchPointMerge,
00909                      bool& threeWayConflicts,
00910                      bool& createMissDir,
00911                      bool& getCleanCopy,
00912                      CStr& keyword,
00913                      bool& caseSensitiveNames,
00914                      bool& lastCheckinTime)
00915 {
00916     bool userHitOK = false;
00917
00918     static CStr sLastDate;
00919     static CStr sLastRev;
00920     static CStr sLastRev1;
00921     static CStr sLastRev2;
00922     static CStr sLastDate1;
00923     static CStr sLastDate2;
00924
00925     bool hasDate = false;
00926     bool hasRev = false;
00927     bool merge1 = false;
00928     bool merge2 = false;
00929     bool hasDate1 = false;
00930     bool hasDate2 = false;
00931
00932     date = "";
00933     rev = "";
00934     rev1 = "";
00935     rev2 = "";
00936     branchPointMerge = false;
00937     threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00938     toStdout = false;
00939     noRecurs = false;
00940     resetSticky = false;
00941     useMostRecent = false;
00942     createMissDir = false;
00943     getCleanCopy = false;
00944     keyword = "";
00945     caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00946     lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00947
00948 #ifdef WIN32
00949     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgUpdate(), _i18n("Update settings"));
00950     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00951
00952     CUpdateMain page1;
00953     CUpdateOptions page2(mf, sLastRev, sLastDate, keyword, resetSticky, caseSensitiveNames, lastCheckinTime);
00954     CUpdateMerge page3(mf, false, sLastRev1, sLastRev2, sLastDate1, sLastDate2, threeWayConflicts);
00955     CGetPrefs_GLOBALS page4;
00956
00957     pages.AddPage(&page1);
00958     pages.AddPage(&page2);
00959     pages.AddPage(&page3);
00960     pages.AddPage(&page4);
00961
00962     if( pages.DoModal() == IDOK )
00963     {
00964         noRecurs = page1.m_norecurs == TRUE;
00965         createMissDir = page1.m_createmissdir == TRUE;
00966         getCleanCopy = page1.m_getcleancopy == TRUE;
00967
00968         sLastDate = page2.m_date;
00969         sLastRev = page2.m_rev;
00970         hasDate = page2.m_hasDate == TRUE;
00971         hasRev = page2.m_hasRev == TRUE;
00972         useMostRecent = page2.m_match == TRUE;
00973         keyword = page2.m_keyword;
00974         resetSticky = page2.m_resetSticky == TRUE;
00975         toStdout = page2.m_stdout == TRUE;
00976         gCvsPrefs.SetUpdateCaseSensitiveNames(page2.m_caseSensitiveNames == TRUE);
00977         gCvsPrefs.SetUpdateLastCheckinTime(page2.m_lastCheckinTime == TRUE);
00978
00979         merge1 = page3.m_mergeType >= 1;
00980         merge2 = page3.m_mergeType == 2;
00981         sLastRev1 = page3.m_rev1;
00982         sLastRev2 = page3.m_rev2;
00983         hasDate1 = page3.m_hasDate1 == TRUE;
00984         hasDate2 = page3.m_hasDate2 == TRUE;
00985         sLastDate1 = page3.m_date1;
00986         sLastDate2 = page3.m_date2;
00987         branchPointMerge = page3.m_branchPointMerge == TRUE;
00988         gCvsPrefs.SetUpdateThreeWayConflicts(page3.m_threeWayConflicts == TRUE);
00989
00990         page4.StoreValues();
00991         gCvsPrefs.SetHideCommandDlgUpdate(pages.GetHideCommandDlg());
00992         userHitOK = true;
00993     }
00994 #endif /* WIN32 */
00995 #ifdef qMacCvsPP
00996     StOptionalDialogHandler theHandler(dlg_Update, gCvsPrefs.HideCommandDlgUpdate(), LCommander::GetTopCommander());
00997     LWindow *theDialog = theHandler.GetDialog();
00998     ThrowIfNil_(theDialog);
00999     static UInt16 sRuntimePanel = 1;
01000
01001     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
01002         (theDialog->FindPaneByID(item_MultiViewPrefs));
01003     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
01004
01005     multiView->SwitchToPanel(4);
01006     DoDataExchange_Globals(theDialog, true);
01007     multiView->SwitchToPanel(3);
01008     DoDataExchange_UpdateMerge(theDialog, mf, merge1, merge2, sLastRev1, sLastRev2, true);
01009     multiView->SwitchToPanel(2);
01010     DoDataExchange_UpdateSticky(theDialog, mf, hasDate, hasRev, sLastDate, sLastRev, useMostRecent, true);
01011     multiView->SwitchToPanel(1);
01012     DoDataExchange_UpdateSettings(theDialog, toStdout, noRecurs, resetSticky, createMissDir, getCleanCopy, true);
01013
01014     groupView->SetValue(sRuntimePanel);
01015
01016     theHandler.ShowDialog();
01017     MessageT hitMessage;
01018     while (true)
01019     {       // Let DialogHandler process events
01020         hitMessage = theHandler.DoDialog();
01021
01022         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
01023             break;
01024     }
01025     theDialog->Hide();
01026     sRuntimePanel = groupView->GetValue();
01027
01028     if(hitMessage == msg_OK)
01029     {
01030         multiView->SwitchToPanel(1);
01031         DoDataExchange_UpdateSettings(theDialog, toStdout, noRecurs, resetSticky, createMissDir, getCleanCopy, false);
01032         multiView->SwitchToPanel(2);
01033         DoDataExchange_UpdateSticky(theDialog, mf, hasDate, hasRev, sLastDate, sLastRev, useMostRecent, false);
01034         multiView->SwitchToPanel(3);
01035         DoDataExchange_UpdateMerge(theDialog, mf, merge1, merge2, sLastRev1, sLastRev2, false);
01036         multiView->SwitchToPanel(4);
01037         DoDataExchange_Globals(theDialog, false);
01038         gCvsPrefs.SetHideCommandDlgUpdate(theHandler.GetHideCommandDlg());
01039         userHitOK = true;
01040     }
01041 #endif /* qMacCvsPP */
01042 #if qUnix
01043     void *wid;
01044 #   if qGTK
01045     wid = UCreate_UpdateDlg();
01046 #   endif
01047
01048     UCvsUpdate *dlg = new UCvsUpdate();
01049     UCvsUpdate_MAIN *tab1 = new UCvsUpdate_MAIN();
01050     UCvsUpdate_STICKY *tab2 = new UCvsUpdate_STICKY(sLastRev, sLastDate);
01051     UCvsUpdate_MERGE *tab3 = new UCvsUpdate_MERGE(sLastRev1, sLastRev2);
01052     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
01053     dlg->AddPage(tab1, UCvsUpdate::kTabGeneral, 0);
01054     dlg->AddPage(tab2, UCvsUpdate::kTabGeneral, 1);
01055     dlg->AddPage(tab3, UCvsUpdate::kTabGeneral, 2);
01056
01057     if(dlg->DoModal())
01058     {
01059         toStdout = tab1->m_toStdout;
01060         noRecurs = tab1->m_noRecurs;
01061         resetSticky = tab1->m_resetSticky;
01062         createMissDir = tab1->m_createMissDir;
01063         getCleanCopy = tab1->m_getCleanCopy;
01064
01065         sLastDate = tab2->m_date;
01066         sLastRev = tab2->m_rev;
01067         hasDate = tab2->m_hasdate;
01068         hasRev = tab2->m_hasrev;
01069         useMostRecent = tab2->m_match;
01070
01071         merge1 = tab3->m_merge >= 1;
01072         merge2 = tab3->m_merge == 2;
01073         sLastRev1 = tab3->m_rev1;
01074         sLastRev2 = tab3->m_rev2;
01075
01076         userHitOK = true;
01077     }
01078
01079     delete dlg;
01080 #endif // qUnix
01081
01082     if( userHitOK )
01083     {
01084         threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
01085         caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
01086         lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
01087
01088         if( hasDate && !sLastDate.empty() )
01089             date = sLastDate;
01090
01091         if( hasRev && !sLastRev.empty() )
01092             rev = sLastRev;
01093
01094         if( merge1 && merge2 && !sLastRev1.empty() && !sLastRev2.empty() )
01095         {
01096             rev1 = sLastRev1;
01097             rev2 = sLastRev2;
01098
01099             if( hasDate1 )
01100                 rev1 << ":" << sLastDate1;
01101
01102             if( hasDate2 )
01103                 rev2 << ":" << sLastDate2;
01104         }
01105
01106         if( merge1 && !merge2 && !sLastRev1.empty() )
01107         {
01108             rev1 = sLastRev1;
01109
01110             if( hasDate1 )
01111                 rev1 << ":" << sLastDate1;
01112         }
01113
01114         gCvsPrefs.save();
01115     }
01116
01117     return userHitOK;
01118 }
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UTimer Member List

This is the complete list of members for UTimer, including all inherited members.

m_cmd | UTimer |
m_lap | UTimer |
m_lastlap | UTimer |
operator=(const UTimer &src) | UTimer | [inline]
UTimer(int lap, int lastlap, int cmd) | UTimer | [inline]
UTimer() | UTimer | [inline]
UTimer(const UTimer &src) | UTimer | [inline]

Generated on Sat Aug 7 22:57:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJSizeDockBar.h Source File

WinCvs/CJLib/Include/CJSizeDockBar.h

Go to the documentation of this file.
00001 // CJSizeDockBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJSizeDockBar.h $
00011  *
00012  * $History: CJSizeDockBar.h $
00013  *
00014  * *****************  Version 12  *****************
00015  * User: Kirk Stowell Date: 10/29/99   Time: 12:44a
00016  * Updated in $/CodeJock/Include
00017  * Added static member variable CCJSizeDockBar::m_bIsDockBar used for save
00018  * and restore bar state.
00019  *
00020  * *****************  Version 11  *****************
00021  * User: Kirk Stowell Date: 10/14/99   Time: 2:55p
00022  * Updated in $/CodeJock/Include
00023  * Fixed bug with just clicking on the sizing tracker and the control bar
00024  * resizing one pixel to the left or right. The bar will only be sized if
00025  * the cursor has changed its location.
00026  *
00027  * *****************  Version 10  *****************
00028  * User: Kirk Stowell Date: 9/16/99    Time: 2:35p
00029  * Updated in $/CodeJockey/Include
00030  * Fixed bug with save / restore bar state, and with saved bar size
00031  * changing whenever the application starts.
00032  *
00033  * *****************  Version 9  *****************
00034  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00035  * Updated in $/CodeJockey/Include
00036  * Updated copyright and contact information.
00037  *
00038  * *****************  Version 8  *****************
00039  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00040  * Updated in $/CodeJockey/Include
00041  *
00042  * *****************  Version 7  *****************
00043  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00044  * Updated in $/CodeJockey/Include
00045  *
00046  * *****************  Version 6  *****************
00047  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00048  * Updated in $/CodeJockey/Include
00049  * Cleaned up inline functions, and import/export macro so that class will
00050  * be imported when linked to, and exported at compile time.
00051  *
00052  * *****************  Version 5  *****************
00053  * User: Kirk Stowell Date: 6/09/99    Time: 10:25p
00054  * Updated in $/CodeJockey/Include
00055  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00056  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00057  * message handler, this is now automatically handled by the base class.
00058  * Added redraw flags to the create method and modified paint and layout
00059  * handlers to reduce flicker and un-necessary command handling. Dragging
00060  * rect now reflects actual control bar docked size. Added "flat" look to
00061  * the control bars, the control bars can now use the classic DevStudio
00062  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00063  * docking windows now handle dragging, docking and floating much better,
00064  * and behave more like DevStudio.
00065  *
00066  * *****************  Version 4  *****************
00067  * User: Kirk Stowell Date: 4/14/99    Time: 11:07p
00068  * Updated in $/CodeJockey/Include
00069  * Changed CFrameWnd *pFrame = (CFrameWnd*)AfxGetApp()->m_pMainWnd; to
00070  * CFrameWnd *pFrame = GetParentFrame(); see line 432.
00071  *
00072  * *****************  Version 3  *****************
00073  * User: Kirk Stowell Date: 4/03/99    Time: 11:06p
00074  * Updated in $/CodeJockey/Include
00075  * Added comments and cleaned up code.
00076  *
00077  * *****************  Version 2  *****************
00078  * User: Kirk Stowell Date: 1/29/99    Time: 11:06p
00079  * Updated in $/CodeJockey/Include
00080  * Made some cosmetic enhancements to more closely match DevStudio docking
00081  * windows.
00082  *
00083  * *****************  Version 1  *****************
00084  * User: Kirk Stowell Date: 1/12/99    Time: 11:06p
00085  * Created in $/CodeJockey/Include
00086  * Initial release to add side-by-side docking support for CCJControlBar
00087  * class.
00088  *
00089  ***************************************************************************/
00091
00092 #ifndef __CJSIZEDOCKBAR_H__
00093 #define __CJSIZEDOCKBAR_H__
00094
00095 #if _MSC_VER >= 1000
00096 #pragma once
00097 #endif // _MSC_VER >= 1000
00098
00099 // class forwards
00100 class CCJControlBar;
00101
00102 // CCJSizeDockBar is a CDockBar derived class which is used by the framework
00103 // to handle CCJControlBar's.
00104 class _CJX_EXT_CLASS CCJSizeDockBar : public CDockBar
00105 {
00106     DECLARE_DYNAMIC(CCJSizeDockBar)
00107
00108 public:
00109
00110     // Default constructor
00111     //
00112     CCJSizeDockBar();
00113
00114     // Virtual destructor
00115     //
00116     virtual ~CCJSizeDockBar();
00117
00118     static bool m_bIsDockBar;
00119
00120 protected:
00121
00122     int         m_iSafeSpace;           // dockbar offset when docked
00123
00124     int         m_iActualSize;          // actual size of the dockbar
00125
00126     BOOL        m_bDragging;            // set to TRUE when a drag operation is in
00127                                         // process.
00128
00129     BOOL        m_bOkToDrag;            // used to determine if a drag operation
00130                                         // should occur.
00131
00132     CRect       m_rcTrack;              // used to determine rect of the tracker window.
00133     CPoint      m_ptCurDrag;            // cursor location during a drag operation.
00134     CPoint      m_ptStartDrag;          // cursor starting point during a drag operation.
00135
00136     HCURSOR     m_curHSplitBar;         // handle of the cursor to be displayed when
00137                                         // the mouse passes over a horizontal splitter.
00138
00139     HCURSOR     m_curVSplitBar;         // handle of the cursor to be displayed when
00140                                         // the mouse passes over a vertical splitter.
00141
00142     BOOL        m_bFlatBorder;          // set to TRUE for flat border.
00143     CPoint      m_ptCurrent;            // holds the current cursor position.
00144
00145 public:
00146
00147     // this member function is called by the control bar
00148     // to return the control bar to its normal size.
00149     //
00150     void Normalize(CCJControlBar*);
00151
00152     // this member function is called by the control bar
00153     // to maximize the control bar.
00154     //
00155     void Maximize(CCJControlBar*);
00156
00157     // This member function is called to recalculate the
00158     // CCJControlBar docked layout
00159     //
00160     void CalcSizeBarLayout();
00161
00162     // This member function is called to set the size
00163     // of a CCJControlBar
00164     //
00165     void SetActualSize(int iSize);
00166
00167     // this member function is called by the control bar
00168     // to perform paint operations.
00169     //
00170     void EraseNonClient();
00171
00172     // this member function is called by the control bar
00173     // to draw its borders.
00174     //
00175     void DrawBorders(CDC *pDC,CRect& rect);
00176
00177     // This member function is called to recalculate the
00178     // CCJControlBar docked layout
00179     //
00180     void RecalcAllExcept(CCJSizeDockBar *pBar);
00181
00182     // this member function returns a pointer to a CCJControlBar
00183     // object based upon docked position
00184     //
00185     CCJControlBar* GetDockedSizeBar(int nPos);
00186
00187     // this member function is used to initialize flat borders.
00188     //
00189     void FlatBorder( BOOL bFlat = TRUE );
00190
00191 protected:
00192
00193     // this member function is called to determine if there
00194     // are any additional control bars left.
00195     //
00196     BOOL IsLastControlBar(int index);
00197
00198     // this member function returns the size for a docked
00199     // control bar
00200     //
00201     void GetAvailableRect(CRect &rect);
00202
00203 // Overrides
00204     // ClassWizard generated virtual function overrides
00205     //{{AFX_VIRTUAL(CCJSizeDockBar)
00206     public:
00207     virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
00208     virtual void DoPaint(CDC *pDC);
00209     virtual BOOL IsDockBar() const;
00210     virtual BOOL IsDockSizeBar() const;
00211     virtual void OnInvertTracker(const CRect&);
00212     virtual void HitTest(const CPoint& point);
00213     //}}AFX_VIRTUAL
00214
00215 // Generated message map functions
00216 protected:
00217     //{{AFX_MSG(CCJSizeDockBar)
00218     afx_msg void OnNcPaint();
00219     afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
00220     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00221     afx_msg UINT OnNcHitTest(CPoint point);
00222     afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
00223     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00224     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00225     //}}AFX_MSG
00226     DECLARE_MESSAGE_MAP()
00227 };
00228
00230 //  Inline Functions
00232
00233 _CJXLIB_INLINE BOOL CCJSizeDockBar::IsDockBar() const
00234     { return m_bIsDockBar; }
00235
00236 _CJXLIB_INLINE BOOL CCJSizeDockBar::IsDockSizeBar() const
00237     { return TRUE; }
00238
00239 _CJXLIB_INLINE void CCJSizeDockBar::SetActualSize(int iSize)
00240     { m_iActualSize=iSize; }
00241
00242 _CJXLIB_INLINE void CCJSizeDockBar::FlatBorder( BOOL bFlat )
00243     { if(m_bFlatBorder!=bFlat){m_bFlatBorder=bFlat;InvalidateRect(NULL,FALSE);UpdateWindow();}}
00244
00246
00247 //{{AFX_INSERT_LOCATION}}
00248 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00249
00250 #endif // __CJSIZEDOCKBAR_H__
00251
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsStatusbar.cpp Source File

common/UCvsStatusbar.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include "UCvsStatusbar.h"
00028 #include "UCvsCommands.h"
00029 #include "MacrosSetup.h"
00030
00031 UIMPLEMENT_DYNAMIC(UCvsStatusbar, UWidget)
00032
00033 UBEGIN_MESSAGE_MAP(UCvsStatusbar, UWidget)
00034     ON_UDESTROY(UCvsStatusbar)
00035     ON_UCREATE(UCvsStatusbar)
00036 UEND_MESSAGE_MAP()
00037
00038 UCvsStatusbar::UCvsStatusbar() : UWidget(kUCvsStatusbarID)
00039 {
00040 }
00041
00042 UCvsStatusbar::~UCvsStatusbar()
00043 {
00044 }
00045
00046 void UCvsStatusbar::OnDestroy(void)
00047 {
00048     delete this;
00049 }
00050
00051 void UCvsStatusbar::OnCreate(void)
00052 {
00053 }
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CLogFrame Member List

This is the complete list of members for CLogFrame, including all inherited members.

brdrAllRaised enum value | CCJMDIChildWnd | [protected]
brdrFlatAll enum value | CCJMDIChildWnd | [protected]
brdrFlatBottom enum value | CCJMDIChildWnd | [protected]
brdrFlatHorizontal enum value | CCJMDIChildWnd | [protected]
brdrFlatLeft enum value | CCJMDIChildWnd | [protected]
brdrFlatRight enum value | CCJMDIChildWnd | [protected]
brdrFlatTop enum value | CCJMDIChildWnd | [protected]
brdrFlatVertical enum value | CCJMDIChildWnd | [protected]
CCJMDIChildWnd() | CCJMDIChildWnd |
CLogFrame() | CLogFrame |
DockControlBarLeftOf(CControlBar *Bar, CControlBar *LeftOf) | CCJMDIChildWnd | [protected, virtual]
DockFlatBorders enum name | CCJMDIChildWnd | [protected]
DockSizeBar(CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL) | CCJMDIChildWnd | [protected, virtual]
dwDockBarMap | CCJMDIChildWnd | [protected, static]
EnableDocking(DWORD dwDockStyle) | CCJMDIChildWnd | [protected, virtual]
EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised) | CCJMDIChildWnd | [protected, virtual]
GetInitializedMenu(UINT nMenuID, UINT nToolBarID) | CCJMDIChildWnd | [virtual]
GetInitializedMenu(UINT nMenuID, UINT *nToolbarIDs, int nSize) | CCJMDIChildWnd | [virtual]
GetMenuID() | CCJMDIChildWnd | [virtual]
GetToolBarID() | CCJMDIChildWnd | [virtual]
GetToolBarIDs(int &nCount) | CCJMDIChildWnd | [virtual]
m_hMenu | CCJMDIChildWnd | [protected]
m_nCount | CCJMDIChildWnd | [protected]
m_nMenuID | CCJMDIChildWnd | [protected]
m_nToolBarID | CCJMDIChildWnd | [protected]
m_nToolBarIDs | CCJMDIChildWnd | [protected]
OnClose() | CLogFrame | [protected]
OnCmdMsg(UINT nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo) | CLogFrame | [virtual]
OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) | CLogFrame | [virtual]
OnEraseBkgnd(CDC *pDC) | CCJMDIChildWnd | [protected]
PreTranslateMessage(MSG *pMsg) | CLogFrame | [virtual]
RecalcAllExcept(CCJSizeDockBar *pBar) | CCJMDIChildWnd | [protected, virtual]
RecalcLayout(BOOL bNotify=TRUE) | CCJMDIChildWnd | [virtual]
SetResourceIDs(UINT nMenuID, UINT nToolBarID) | CCJMDIChildWnd | [virtual]
SetResourceIDs(UINT nMenuID, UINT *nToolBarIDs, int nCount) | CCJMDIChildWnd | [virtual]
~CCJMDIChildWnd() | CCJMDIChildWnd | [virtual]
~CLogFrame() | CLogFrame | [virtual]

Generated on Sat Aug 7 22:54:45 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TBrowserFill Member List

This is the complete list of members for TBrowserFill, including all inherited members.

EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TBrowserFill | [inline, virtual]
EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TBrowserFill | [private, virtual]
ExitDirectory(const char *fullpath) | TBrowserFill | [inline, virtual]
ExitDirectory(const char *fullpath) | TBrowserFill | [private, virtual]
GetRefRunning() | TraversalReport | [static]
IsHideMissing() const | TBrowserFill |
m_entries | TBrowserFill |
m_entries | TBrowserFill | [private]
m_hascvs | TBrowserFill | [private]
m_ignlist | TBrowserFill |
m_ignlist | TBrowserFill | [private]
m_isHideMissing | TBrowserFill | [private]
m_isHideUnknown | TBrowserFill | [private]
m_isShowIgnored | TBrowserFill |
m_item | TBrowserFill |
m_item | TBrowserFill | [private]
m_root | TBrowserFill |
m_root | TBrowserFill | [private]
m_treeCtrl | TBrowserFill |
m_treeCtrl | TBrowserFill | [private]
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TBrowserFill | [inline, virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TBrowserFill | [private, virtual]
OnError(const char *err, int errcode) | TBrowserFill | [inline, virtual]
OnError(const char *err, int errcode) | TBrowserFill | [private, virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnIdle(const char *fullpath) | TBrowserFill | [inline, virtual]
OnIdle(const char *fullpath) | TBrowserFill | [private, virtual]
TBrowserFill(UCvsFolders *treeCtrl, UTREEITEM root, UTREEITEM item, CSortList< ENTNODE > &entries) | TBrowserFill | [inline]
TBrowserFill(CTreeCtrl &treeCtrl, HTREEITEM root, HTREEITEM item, CSortList< ENTNODE > &entries) | TBrowserFill |
~TBrowserFill() | TBrowserFill | [inline, virtual]

Generated on Sat Aug 7 22:56:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/NoPython.cpp Source File

WinCvs/NoPython.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // NoPython.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include "NoPython.h"
00027 #include "Persistent.h"
00028 #include "Splash.h"
00029
00030 #ifdef _DEBUG
00031 #define new DEBUG_NEW
00032 #undef THIS_FILE
00033 static char THIS_FILE[] = __FILE__;
00034 #endif
00035
00036 static CPersistentBool gWarnPython("P_WarnPython", true);
00037
00039 // CNoPython dialog
00040
00041
00042 CNoPython::CNoPython(CWnd* pParent /*=NULL*/)
00043     : CHHelpDialog(CNoPython::IDD, pParent)
00044 {
00045     //{{AFX_DATA_INIT(CNoPython)
00046     m_remind = TRUE;
00047     //}}AFX_DATA_INIT
00048 }
00049
00050
00051 void CNoPython::DoDataExchange(CDataExchange* pDX)
00052 {
00053     CHHelpDialog::DoDataExchange(pDX);
00054     //{{AFX_DATA_MAP(CNoPython)
00055     DDX_Control(pDX, IDC_PYTHON_URL, m_url);
00056     DDX_Check(pDX, IDC_REMIND, m_remind);
00057     //}}AFX_DATA_MAP
00058 }
00059
00060
00061 BEGIN_MESSAGE_MAP(CNoPython, CHHelpDialog)
00062     //{{AFX_MSG_MAP(CNoPython)
00063     ON_BN_CLICKED(IDHELP, OnHelp)
00064     //}}AFX_MSG_MAP
00065 END_MESSAGE_MAP()
00066
00068 // CNoPython message handlers
00069
00071 BOOL CNoPython::OnInitDialog()
00072 {
00073     CHHelpDialog::OnInitDialog();
00074
00075     // Extra initialization
00076     m_url.SetURL(_T("http://www.python.org"));
00077
00078     return TRUE;  // return TRUE unless you set the focus to a control
00079                   // EXCEPTION: OCX Property Pages should return FALSE
00080 }
00081
00082 void CNoPython::InitHelpID()
00083 {
00084     SetCtrlHelpID(IDC_PYTHON_URL,   IDH_IDC_PYTHON_URL);
00085     SetCtrlHelpID(IDC_REMIND,       IDH_IDC_REMIND);
00086 }
00087
00089 void CNoPython::OnHelp()
00090 {
00091     ShowHelp();
00092 }
00093
00097 void WarnNoPython(void)
00098 {
00099     if( (bool)gWarnPython )
00100     {
00101         CNoPython dlg;
00102         dlg.DoModal();
00103
00104         if( !dlg.m_remind )
00105             gWarnPython = false;
00106     }
00107 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/powerplant/UPseudoSupport.h Source File

rf/support/powerplant/UPseudoSupport.h

Go to the documentation of this file.
00001 #ifndef UPSEUDOSUPPORT_H
00002 #define UPSEUDOSUPPORT_H
00003
00004 #include "uwidget.h"
00005 #include <LOutlineItem.h>
00006 #include <LCmdBevelButton.h>
00007 #include <LPlaceHolder.h>
00008
00009 #include <map>
00010 #include <vector>
00011
00012 extern bool gTurnOffBroadcast;
00013
00014 struct UPseudoCmdStatusWrapper
00015 {
00016     Boolean *outEnabled;
00017     Boolean *outUsesMark;
00018     UInt16 *outMark;
00019     unsigned char *outName;
00020 };
00021
00022 class UPseudoRotButton : public LBevelButton
00023 {
00024 public:
00025     enum { class_ID = FOUR_CHAR_CODE('UPRB') };
00026
00027     UPseudoRotButton(LStream *inStream, ClassIDT inImpID = LBevelButton::imp_class_ID);
00028     virtual ~UPseudoRotButton();
00029
00030     virtual void DoRotate(int icon, bool refresh = true);
00031     inline int GetCurrentState(void) const { return fCurrentIcon; }
00032 protected:
00033     void ReadIconsID(LStream *inStream, std::vector<short> & res);
00034
00035     std::vector<short> fIconSuite;
00036     int fCurrentIcon;
00037 };
00038
00039 class UPseudoPlaceHolder : public LPlaceHolder, public LListener
00040 {
00041 public:
00042     enum { class_ID = FOUR_CHAR_CODE('UPLH') };
00043
00044     UPseudoPlaceHolder(LStream *inStream);
00045     virtual ~UPseudoPlaceHolder();
00046
00047     void DoRotate(int entry);
00048     inline void SetWidID(int widid) { fWidid = widid; }
00049     inline LView *GetCurrentView(void) { return fCurrentView; }
00050
00051     virtual void    ListenToMessage(
00052                             MessageT        inMessage,
00053                             void*           ioParam);
00054
00055 protected:
00056     virtual void    FinishCreateSelf();
00057
00058     std::vector<short> fViewSuite;
00059     LView *fCurrentView;
00060     PaneIDT fController;
00061     int fWidid;
00062 };
00063
00064 class UPseudoPageHider : public LAttachment, public LListener
00065 {
00066 public:
00067     enum { class_ID = FOUR_CHAR_CODE('UPPH') };
00068
00069     UPseudoPageHider(LStream *inStream);
00070     virtual ~UPseudoPageHider();
00071
00072     inline void SetWidID(int widid) { fWidid = widid; }
00073
00074     virtual void    ListenToMessage(
00075                             MessageT        inMessage,
00076                             void*           ioParam);
00077
00078 protected:
00079     void DoRotate(int entry);
00080
00081     virtual void    ExecuteSelf(
00082                             MessageT        inMessage,
00083                             void*           ioParam);
00084
00085     std::vector<PaneIDT> fViewSuite;
00086     int fWidid;
00087     int fCurSel;
00088     class LPageController *fPageCtrl;
00089 };
00090
00091 class LMainPseudoAttachment : public LAttachment, public LPeriodical
00092 {
00093 public:
00094     LMainPseudoAttachment();
00095     virtual ~LMainPseudoAttachment();
00096
00097     virtual void        SpendTime(
00098                                 const EventRecord&  inMacEvent);
00099
00100 protected:
00101     virtual void    ExecuteSelf(
00102                             MessageT        inMessage,
00103                             void*           ioParam);
00104 };
00105
00106 class LPseudoWinAttachment : public LAttachment, public LListener
00107 {
00108 public:
00109     LPseudoWinAttachment(int widid);
00110     virtual ~LPseudoWinAttachment();
00111
00112     int GetPageValue(int cmdid) const;
00113     void SetPageValue(int cmdid, int value);
00114
00115     void CheckWindowSize(void);
00116
00117     int SearchWidID(LPane *pane);
00118         // since several pseudo-widgets can be attached to
00119         // the window (ex: tab controller), we need to search
00120         // for the correct Widget to broadcast the event.
00121
00122     void InvalidCache(UWidget *tab_wid);
00123         // when a view is removed (from a tab window)
00124         // we need to invalidate the cache used by 'SearchWidID'.
00125
00126 protected:
00127     virtual void    ExecuteSelf(
00128                             MessageT        inMessage,
00129                             void*           ioParam);
00130     virtual void    ListenToMessage(
00131                             MessageT        inMessage,
00132                             void*           ioParam);
00133
00134     int m_widid;
00135     Rect m_lastRect;
00136     std::map<int, int> m_PageValues;
00137     std::map<LPane *, int> m_CacheWidgets;
00138 };
00139
00140 class UPseudoFakePane : public LPane
00141 {
00142 public:
00143     UPseudoFakePane(const SPaneInfo &inPaneInfo, LPseudoWinAttachment *inAttach);
00144     virtual ~UPseudoFakePane();
00145
00146     virtual void        AdaptToSuperFrameSize(
00147                                 SInt32      inSurrWidthDelta,
00148                                 SInt32      inSurrHeightDelta,
00149                                 Boolean     inRefresh);
00150
00151 protected:
00152     LPseudoWinAttachment *m_Attach;
00153
00154     virtual void        ActivateSelf();
00155     virtual void        DeactivateSelf();
00156 };
00157
00158 class CPseudoItem : public LOutlineItem
00159 {
00160 public:
00161     CPseudoItem(int widid, int cmdid);
00162     virtual ~CPseudoItem();
00163
00164     std::map<int, UStr> m_texts;
00165     void *m_data;
00166
00167 protected:
00168     virtual void GetDrawContentsSelf(const STableCell& inCell, SOutlineDrawContents& ioDrawContents);
00169
00170     virtual void DrawRowAdornments(const Rect& inLocalRowRect);
00171     virtual void            DrawCell(
00172                                     const STableCell&       inCell,
00173                                     const Rect&             inLocalCellRect);
00174
00175     virtual void DoubleClick(const STableCell& inCell, const SMouseDownEvent& inMouseDown,
00176         const SOutlineDrawContents& inDrawContents, Boolean inHitText);
00177     virtual void            SingleClick(
00178                                     const STableCell&           inCell,
00179                                     const SMouseDownEvent&      inMouseDown,
00180                                     const SOutlineDrawContents& inDrawContents,
00181                                     Boolean                     inHitText);
00182
00183     int m_widid, m_cmdid;
00184 private:
00185     // defensive programming
00186     CPseudoItem();
00187     CPseudoItem( const CPseudoItem &inOriginal );
00188     CPseudoItem&    operator=( const CPseudoItem &inOriginal );
00189 };
00190
00191 class LTextTableView;
00192
00193 extern void macpp_fecthview(int widid, LPane *view);
00194 extern void macpp_linkbroadcasters(LPane *view, LListener *listener);
00195 extern void macpp_preparetable(LOutlineTable *table);
00196 extern void macpp_preparetable(void *win, LTextTableView *table);
00197 extern LPseudoWinAttachment *macpp_getattachwindow(UWidget *wid);
00198 extern LPseudoWinAttachment *macpp_getattachwindow(LWindow *wind);
00199
00200 #define UTextTableView_SingleClick FOUR_CHAR_CODE('UTVS')
00201 #define UTextTableView_DoubleClick FOUR_CHAR_CODE('UTVD')
00202
00203 #endif
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

keywordMode Member List

This is the complete list of members for keywordMode, including all inherited members.

desc | keywordMode
mode | keywordMode

Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CRelease_MAIN Member List

This is the complete list of members for CRelease_MAIN, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CRelease_MAIN(const char *dir) | CRelease_MAIN |
DoDataExchange(CDataExchange *pDX) | CRelease_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetRemoveDirectoryOption() const | CRelease_MAIN |
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CRelease_MAIN |
InitHelpID() | CRelease_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_delAllCheck | CRelease_MAIN |
m_delCvsInfoCheck | CRelease_MAIN |
m_delDirCheck | CRelease_MAIN |
m_dir | CRelease_MAIN |
m_removeDirectoryOption | CRelease_MAIN | [private]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnDelcvsinfo() | CRelease_MAIN | [protected]
OnDeldir() | CRelease_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CRelease_MAIN() | CRelease_MAIN |

Generated on Sat Aug 7 22:56:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CHHelpSupport Member List

This is the complete list of members for CHHelpSupport, including all inherited members.

CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
InitHelpID()=0 | CHHelpSupport | [protected, pure virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_hhelpIDs | CHHelpSupport | [private]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
tHelpIDMap typedef | CHHelpSupport | [private]
tHelpIDsData typedef | CHHelpSupport | [private]
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ReportConflict Member List

This is the complete list of members for ReportConflict, including all inherited members.

AddPattern(const char *newpat, kFileType fileType, bool isExtension, const char *sample) | ReportConflict |
DisableUserSettings(void) | ReportConflict |
fcreator | ReportConflict | [protected]
ForceBinary(void) | ReportConflict |
forceBinary enum value | ReportConflict |
ForceNoKeywords(void) | ReportConflict |
forceNoKeywords enum value | ReportConflict |
ForceText(void) | ReportConflict |
forceText enum value | ReportConflict |
forceUnicode enum value | ReportConflict |
ForceUnicode(void) | ReportConflict |
ftype | ReportConflict | [protected]
GetDesc() const | ReportConflict |
GetKindDesc() const | ReportConflict |
GetMacCreator(void) const | ReportConflict |
GetMacType(void) const | ReportConflict |
GetPattern(void) const | ReportConflict |
GetStateDesc() const | ReportConflict |
hasConflict enum value | ReportConflict |
HasConflict(void) const | ReportConflict |
hasExtension enum value | ReportConflict |
HasForceBinary(void) const | ReportConflict |
HasForceNoKeywords(void) const | ReportConflict |
HasForceText(void) const | ReportConflict |
HasForceUnicode(void) const | ReportConflict |
HasIgnore(void) const | ReportConflict |
hasIgnore enum value | ReportConflict |
HasTypeCreatorConflict(void) const | ReportConflict |
hasTypeCreatorConflict enum value | ReportConflict |
Ignore(void) | ReportConflict |
isBinary enum value | ReportConflict |
IsBinary(void) const | ReportConflict |
IsExtension(void) const | ReportConflict |
isUnicode enum value | ReportConflict |
IsUnicode(void) const | ReportConflict |
Match(const char *pat) | ReportConflict |
next | ReportConflict |
noConflict enum value | ReportConflict |
pattern | ReportConflict | [protected]
PrintOut(UStr &out) const | ReportConflict |
ReportConflict(int mac_type, int mac_creator) | ReportConflict |
sample1 | ReportConflict | [protected]
sample2 | ReportConflict | [protected]
SetConflict(const char *sample) | ReportConflict |
SetTypeCreatorConflict(const char *sample) | ReportConflict |
status | ReportConflict | [protected]
userFlags enum value | ReportConflict |
~ReportConflict() | ReportConflict | [virtual]

Generated on Sat Aug 7 22:56:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphDoc.cpp Source File

WinCvs/GraphDoc.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // GraphDoc.cpp : implementation of the CGraphDoc class
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #include <direct.h>
00027 #include <sys/stat.h>
00028
00029 #include "Wincvs.h"
00030
00031 #include "GraphDoc.h"
00032 #include "CvsLog.h"
00033 #include "WinCvsView.h"
00034 #include "GraphView.h"
00035 #include "CvsEntries.h"
00036
00037 #ifdef _DEBUG
00038 #define new DEBUG_NEW
00039 #undef THIS_FILE
00040 static char THIS_FILE[] = __FILE__;
00041 #endif
00042
00050 static void NormalizeFn(const char* folder, const char* fn, char* dir, char* name)
00051 {
00052     char buffer[_MAX_PATH];
00053     char dirBuffer[_MAX_PATH];
00054     char nameBuffer[_MAX_PATH];
00055     char drive[_MAX_PATH];
00056     char ext[_MAX_EXT];
00057
00058     _makepath(buffer, NULL, folder, fn, NULL);
00059     _splitpath(buffer, drive, dirBuffer, nameBuffer, ext);
00060     _makepath(dir, drive, dirBuffer, NULL, NULL);
00061     _makepath(name, NULL, NULL, nameBuffer, ext);
00062 }
00063
00065 // CGraphDoc
00066
00067 IMPLEMENT_DYNCREATE(CGraphDoc, CDocument)
00068
00069 BEGIN_MESSAGE_MAP(CGraphDoc, CDocument)
00070     //{{AFX_MSG_MAP(CGraphDoc)
00071         // NOTE - the ClassWizard will add and remove mapping macros here.
00072         //    DO NOT EDIT what you see in these blocks of generated code!
00073     //}}AFX_MSG_MAP
00074 //  ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
00075 //  ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
00076 END_MESSAGE_MAP()
00077
00078 BEGIN_DISPATCH_MAP(CGraphDoc, CDocument)
00079     //{{AFX_DISPATCH_MAP(CGraphDoc)
00080     DISP_FUNCTION(CGraphDoc, "NumNodes", NumNodes, VT_I4, VTS_NONE)
00081     //}}AFX_DISPATCH_MAP
00082 END_DISPATCH_MAP()
00083
00084 // Note: we add support for IID_ITest to support typesafe binding
00085 //  from VBA.  This IID must match the GUID that is attached to the
00086 //  dispinterface in the .ODL file.
00087
00088 // {09F456B5-0018-11D2-BCAA-000000000000}
00089 static const IID IID_ITest =
00090 { 0x9f456b5, 0x18, 0x11d2, { 0xbc, 0xaa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } };
00091
00092 BEGIN_INTERFACE_MAP(CGraphDoc, CDocument)
00093     INTERFACE_PART(CGraphDoc, IID_ITest, Dispatch)
00094 END_INTERFACE_MAP()
00095
00097 // CGraphDoc construction/destruction
00098
00099 CGraphDoc::CGraphDoc()
00100 {
00101     EnableAutomation();
00102
00103     AfxOleLockApp();
00104
00105     m_fNode = 0L;
00106     m_fData = 0L;
00107 }
00108
00109 CGraphDoc::~CGraphDoc()
00110 {
00111     AfxOleUnlockApp();
00112
00113     Clear();
00114 }
00115
00119 void CGraphDoc::Clear(void)
00120 {
00121     if( m_fNode != 0L )
00122     {
00123         delete m_fNode;
00124         m_fNode = 0L;
00125     }
00126
00127     if( m_fData != 0L )
00128     {
00129         m_fData->UnRef();
00130         m_fData = 0L;
00131     }
00132
00133     m_fDir.Empty();
00134     m_fName.Empty();
00135 }
00136
00138 BOOL CGraphDoc::OnNewDocument()
00139 {
00140     Clear();
00141
00142     if( !CDocument::OnNewDocument() )
00143         return FALSE;
00144
00145     return TRUE;
00146 }
00147
00153 void CGraphDoc::SetNode(CLogNode* node, const char* folder)
00154 {
00155     Clear();
00156
00157     // Normalize folder/fname
00158     const char* fn = (**(CLogNodeHeader*)node).WorkingFile();
00159     char dir[_MAX_PATH];
00160     char name[_MAX_PATH];
00161     NormalizeFn(folder, fn, dir, name);
00162
00163     m_fNode = node;
00164     m_fDir = dir;
00165
00166     // Get the CVS/Entries infos for this file
00167     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00168     if( !Entries_Open(entries, dir) )
00169     {
00170         cvs_err("Warning : Error while accessing the CVS folder in '%s'\n", dir);
00171     }
00172     else
00173     {
00174         if( node->GetType() != kNodeHeader )
00175         {
00176             cvs_err("Warning : Top node is not a RCS file description !\n");
00177         }
00178         else
00179         {
00180             CStr fullPath;
00181
00182             fullPath << m_fDir;
00183             fullPath << name;
00184
00185             struct stat sb;
00186             if( stat(fullPath, &sb) == -1 )
00187             {
00188                 cvs_err("Warning : Unknown file '%s'\n", name);
00189             }
00190             else
00191             {
00192                 m_fData = Entries_SetVisited(dir, entries, name, sb, false);
00193                 m_fData->Ref();
00194                 m_fName = name;
00195             }
00196         }
00197     }
00198
00199     // Create the graph and redraw
00200     CGraphView* view = GetTreeView();
00201     if( view != 0L )
00202     {
00203         view->CalcImageSize();
00204         view->Invalidate();
00205         SetTitle(m_fName);
00206     }
00207 }
00208
00209
00211 // CGraphDoc serialization
00212
00213 void CGraphDoc::Serialize(CArchive& ar)
00214 {
00215     if (ar.IsStoring())
00216     {
00217         // TODO: add storing code here
00218     }
00219     else
00220     {
00221         // TODO: add loading code here
00222     }
00223 }
00224
00229 CGraphView* CGraphDoc::GetTreeView(void)
00230 {
00231     CView* view;
00232
00233     POSITION posv = GetFirstViewPosition();
00234     while( posv != NULL )
00235     {
00236         view = GetNextView(posv);
00237         if( view->IsKindOf(RUNTIME_CLASS(CGraphView)) )
00238             return (CGraphView*)view;
00239     }
00240
00241     return NULL;
00242 }
00243
00245 // CGraphDoc diagnostics
00246
00247 #ifdef _DEBUG
00248 void CGraphDoc::AssertValid() const
00249 {
00250     CDocument::AssertValid();
00251 }
00252
00253 void CGraphDoc::Dump(CDumpContext& dc) const
00254 {
00255     CDocument::Dump(dc);
00256 }
00257 #endif //_DEBUG
00258
00260 // CGraphDoc commands
00261
00266 long CGraphDoc::NumNodes()
00267 {
00268     return 0;
00269 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/BrowserBar.cpp Source File

WinCvs/BrowserBar.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // BrowserBar.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include "BrowserBar.h"
00027
00028 #ifdef _DEBUG
00029 #define new DEBUG_NEW
00030 #undef THIS_FILE
00031 static char THIS_FILE[] = __FILE__;
00032 #endif
00033
00035 // CBrowserBar
00036
00037 IMPLEMENT_DYNCREATE(CBrowserBar, CView)
00038
00039 CBrowserBar::CBrowserBar() : m_browser(0L)
00040 {
00041 }
00042
00043 CBrowserBar::~CBrowserBar()
00044 {
00045 }
00046
00047
00048 BEGIN_MESSAGE_MAP(CBrowserBar, CView)
00049     //{{AFX_MSG_MAP(CBrowserBar)
00050     ON_WM_WINDOWPOSCHANGED()
00051     ON_WM_DESTROY()
00052     ON_WM_PAINT()
00053     //}}AFX_MSG_MAP
00054 END_MESSAGE_MAP()
00055
00057 // CBrowserBar drawing
00058
00060 // CBrowserBar diagnostics
00061
00062 #ifdef _DEBUG
00063 void CBrowserBar::AssertValid() const
00064 {
00065     CView::AssertValid();
00066 }
00067
00068 void CBrowserBar::Dump(CDumpContext& dc) const
00069 {
00070     CView::Dump(dc);
00071 }
00072 #endif //_DEBUG
00073
00075 // CBrowserBar message handlers
00076
00077 void CBrowserBar::OnDraw(CDC* pDC)
00078 {
00079     CDocument* pDoc = GetDocument();
00080 }
00081
00082 BOOL CBrowserBar::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
00083 {
00084     BOOL res = CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
00085     if(!res)
00086         return FALSE;
00087
00088     m_browser = (CWinCvsBrowser *)RUNTIME_CLASS(CWinCvsBrowser)->CreateObject();
00089     VERIFY(m_browser->Create(0L, "", WS_CHILD | WS_VISIBLE | WS_TABSTOP, CRect(0,0,0,0), this, 0));
00090
00091     return TRUE;
00092 }
00093
00094 void CBrowserBar::OnWindowPosChanged(WINDOWPOS FAR* wp)
00095 {
00096     CView::OnWindowPosChanged(wp);
00097
00098     //m_browser->SetWindowPos(NULL, wp->x, wp->y, wp->cx, wp->cy, SWP_NOZORDER);
00099     CRect r;
00100     GetClientRect(&r);
00101     if(m_browser != 0L)
00102         m_browser->SetWindowPos(NULL, r.left, r.top, r.Width(), r.Height(), SWP_NOZORDER);
00103 }
00104
00105 void CBrowserBar::OnDestroy()
00106 {
00107     if(m_browser)
00108         m_browser->DestroyWindow();
00109
00110     CView::OnDestroy();
00111 }
00112
00113 void CBrowserBar::OnPaint()
00114 {
00115     CPaintDC dc(this); // device context for painting
00116
00117     CRect r;
00118     GetClientRect(&r);
00119     CBrush brush(GetSysColor(COLOR_WINDOW));
00120     dc.FillRect(r, &brush);
00121 }
Generated on Sat Aug 7 22:43:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/KeywordComboBox.h Source File

common/KeywordComboBox.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- November 2002
00019  */
00020
00021 #if !defined(AFX_KEYWORDCOMBOBOX_H__F5D656E1_FD93_49A0_A27B_231957D4AAC5__INCLUDED_)
00022 #define AFX_KEYWORDCOMBOBOX_H__F5D656E1_FD93_49A0_A27B_231957D4AAC5__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // KeywordComboBox.h : header file
00028 //
00029
00030 #include "SmartComboBox.h"
00031
00032 #ifdef WIN32
00033
00035 // CKeywordComboBox window
00036
00042 class CKeywordComboBox : public CSmartComboBox
00043 {
00044 // Construction
00045 public:
00046     CKeywordComboBox();
00047
00048 // Attributes
00049 public:
00050
00051 // Operations
00052 public:
00053
00054 // Overrides
00055     // ClassWizard generated virtual function overrides
00056     //{{AFX_VIRTUAL(CKeywordComboBox)
00057     protected:
00058     virtual void PreSubclassWindow();
00059     //}}AFX_VIRTUAL
00060
00061 // Implementation
00062 public:
00063     virtual ~CKeywordComboBox();
00064
00065     // Generated message map functions
00066 protected:
00067     //{{AFX_MSG(CKeywordComboBox)
00068     afx_msg void OnSelchange();
00069     //}}AFX_MSG
00070
00071     DECLARE_MESSAGE_MAP()
00072 private:
00073     // Data members
00074     HWND m_hDesc;
00076     // Methods
00077     void SetDescription();
00078
00079 public:
00080     // Interface
00081     void SetDescriptionWnd(HWND hDesc);
00082 };
00083
00085
00086 //{{AFX_INSERT_LOCATION}}
00087 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00088 #endif /* WIN32 */
00089
00090 #endif // !defined(AFX_KEYWORDCOMBOBOX_H__F5D656E1_FD93_49A0_A27B_231957D4AAC5__INCLUDED_)
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

LMainPseudoAttachment Member List

This is the complete list of members for LMainPseudoAttachment, including all inherited members.

ExecuteSelf(MessageT inMessage, void *ioParam) | LMainPseudoAttachment | [protected, virtual]
LMainPseudoAttachment() | LMainPseudoAttachment |
SpendTime(const EventRecord &inMacEvent) | LMainPseudoAttachment | [virtual]
~LMainPseudoAttachment() | LMainPseudoAttachment | [virtual]

Generated on Sat Aug 7 22:54:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_glue.h Source File

common/dll_glue.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * dll_glue.h --- glue code for the dll to communicate with the caller
00023  */
00024
00025 #ifndef DLL_GLUE_H
00026 #define DLL_GLUE_H
00027
00028 #include <stdlib.h>
00029 #include "dll_process.h"
00030 #include <Events.h>
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00036 #pragma export on
00037
00038 int dllglue_decode_file (char *infile);
00039 int dllglue_main(const char *path, int argc, char **argv);
00040 #if !TARGET_API_MAC_CARBON
00041     int dllglue_setgetenv(UniversalProcPtr agetenv);
00042     int dllglue_setconsoleout(UniversalProcPtr aconsoleout);
00043     int dllglue_setconsoleerr(UniversalProcPtr aconsoleerr);
00044     int dllglue_setconsolein(UniversalProcPtr aconsolein);
00045     int dllglue_seteventdispatch(UniversalProcPtr adispatch);
00046 #else /* TARGET_API_MAC_CARBON */
00047     int dllglue_setgetenv(dllglue_getenv_func agetenv);
00048     int dllglue_setconsoleout(dllglue_consoleout_func aconsoleout);
00049     int dllglue_setconsoleerr(dllglue_consoleout_func aconsoleerr);
00050     int dllglue_setconsolein(dllglue_consolein_func aconsolein);
00051     int dllglue_seteventdispatch(dllglue_eventdispath_func adispatch);
00052 #endif /* TARGET_API_MAC_CARBON */
00053
00054 #pragma export reset
00055
00056 /* glue code to intercept the getenv and exit */
00057 #define exit dllglue_exit
00058 #define getenv dllglue_getenv
00059
00060 void dllglue_exit(int code);
00061 char * dllglue_getenv(const char *);
00062
00063 int dllglue_dispatchevent(EventRecord *userevent);
00064 long dllglue_consoleout(char *buffer, long n);
00065 long dllglue_consoleerr(char *buffer, long n);
00066 long dllglue_consolein(char *buffer, long n);
00067
00068 /* console management, captures stdout and stderr */
00069 void dllglue_flushconsole(void);
00070
00071 #ifdef __cplusplus
00072 }
00073 #endif
00074
00075 #endif /* DLL_GLUE_H */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/Authen.cpp Source File

common/Authen.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * Authen.cpp --- class to manage CVS authentication kind
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <string.h>
00028 #include <ctype.h>
00029 #include <errno.h>
00030 #include "CvsPrefs.h"
00031 #include "Authen.h"
00032 #include "AppConsole.h"
00033 #include "MultiFiles.h"
00034 #include "PromptFiles.h"
00035 #include "CvsArgs.h"
00036 #include "uwidget.h"
00037 #include "SmartComboBox.h"
00038 #include "CvsCommands.h"
00039 #include "cvsgui_i18n.h"
00040
00041 #include <algorithm>
00042
00043 #if INTERNAL_AUTHEN
00044
00045 #ifdef WIN32
00046 #   include "resource.h"
00047 #endif
00048
00049 static CPersistentT<AuthenKind> gAuthenKind("P_Authen",
00050 #ifdef TARGET_OS_MAC
00051     rhosts,
00052 #else /* !TARGET_OS_MAC */
00053     local,
00054 #endif /* !TARGET_OS_MAC */
00055     kNoClass);
00056
00057 #ifdef WIN32
00058 #   ifdef _DEBUG
00059 #   define new DEBUG_NEW
00060 #   undef THIS_FILE
00061     static char THIS_FILE[] = __FILE__;
00062 #   endif
00063 #endif /* WIN32 */
00064
00065 #ifdef TARGET_OS_MAC
00066     #if !TARGET_API_MAC_OSX
00067     #define putenv(a)
00068     #endif
00069 #endif
00070
00071 // Under windows we need an equal sign, which would make a "real" unsetenv fail
00072 #ifdef WIN32
00073     #define STR_UNSETENV_EQUAL "="
00074 #else
00075     #define STR_UNSETENV_EQUAL
00076 #endif
00077
00078 #ifdef WIN32
00079 #define unsetenv(a) putenv(a STR_UNSETENV_EQUAL)
00080 #endif
00081
00082 #ifndef qUnix
00083 UStr AuthenModel::oldHome;
00084 #endif
00085
00086
00087 Authen gAuthen;
00088
00090 // Authentication class
00091
00093 AuthenKind Authen::kind(void)
00094 {
00095     return gAuthenKind;
00096 }
00097
00099 void Authen::setkind(AuthenKind newkind)
00100 {
00101     gAuthenKind = newkind;
00102 }
00103
00105 const char* Authen::kindstr(void)
00106 {
00107     static CStr res;
00108
00109     switch( kind() )
00110     {
00111     default:
00112     case rhosts:
00113         res = _i18n(".rhosts authentication");
00114         break;
00115     case pserver:
00116         res = _i18n("password authentication");
00117         break;
00118     case kserver:
00119         res = _i18n("kerberos authentication");
00120         break;
00121     case local:
00122         res = _i18n("local mounted directory");
00123         break;
00124     case ssh:
00125         res = _i18n("ssh authentication");
00126         break;
00127     case ntserver:
00128         res = _i18n("NT server services");
00129         break;
00130     case gserver:
00131         res = _i18n("GSSAPI authentication");
00132         break;
00133     case sspi:
00134         res = _i18n("sspi authentication");
00135         break;
00136     case server:
00137         res = _i18n("server authentication");
00138         break;
00139     }
00140
00141     if( kind() == pserver && gCvsPrefs.UseProxy() )
00142     {
00143         res << _i18n(" using a proxy");
00144     }
00145
00146     return res;
00147 }
00148
00150 const char* Authen::token(void)
00151 {
00152     return Authen::token(kind());
00153 }
00154
00156 const char* Authen::token(AuthenKind kind)
00157 {
00158     static CStr res;
00159
00160     switch( kind )
00161     {
00162     default :
00163     case rhosts:
00164         res = "";
00165         break;
00166     case pserver :
00167         res = ":pserver";
00168         if(gCvsPrefs.UseProxy())
00169         {
00170             res << ";proxy=";
00171             res << gCvsPrefs.ProxyHost();
00172             res << ";proxyport=";
00173             res << gCvsPrefs.ProxyPort();
00174         }
00175         res << ':';
00176         break;
00177     case kserver:
00178         res = ":kserver:";
00179         break;
00180     case local:
00181         res = ":local:";
00182         break;
00183     case ssh:
00184         res = ":ext:";
00185         break;
00186     case ntserver:
00187         res = ":ntserver:";
00188         break;
00189     case gserver:
00190         res = ":gserver:";
00191         break;
00192     case sspi:
00193         res = ":sspi:";
00194         break;
00195     case server:
00196         res = ":server:";
00197         break;
00198     }
00199
00200     return res;
00201 }
00202
00204 const char* Authen::skiptoken(const char* cvsroot)
00205 {
00206     const char* secondColon;
00207
00208     if( cvsroot[0] != ':' || (secondColon = strchr(cvsroot + 1, ':')) == NULL )
00209         return cvsroot;
00210
00211     return secondColon + 1;
00212 }
00213
00215 const char* Authen::kindToToken(AuthenKind kind)
00216 {
00217     AuthenModel* model = AuthenModel::GetInstance(kind);
00218     return model->GetToken();
00219 }
00220
00222 AuthenKind Authen::tokenToKind(const char* token)
00223 {
00224     std::vector<AuthenModel*>& allInstances = AuthenModel::GetAllInstances();
00225     std::vector<AuthenModel*>::const_iterator i;
00226     for(i = allInstances.begin(); i != allInstances.end(); ++i)
00227     {
00228         AuthenModel* model = *i;
00229         if( strcmp(model->GetToken(), token) == 0 )
00230             return model->GetKind();
00231     }
00232
00233     cvs_err(_i18n("Unknown authentication kind '%s'\n"), token);
00234
00235     return local;
00236 }
00237
00239 short Authen::kindToNum(AuthenKind kind)
00240 {
00241     std::vector<AuthenModel*>& allInstances = AuthenModel::GetAllInstances();
00242     std::vector<AuthenModel*>::const_iterator i;
00243     int cnt = 0;
00244     for(i = allInstances.begin(); i != allInstances.end(); ++i, cnt++)
00245     {
00246         AuthenModel* model = *i;
00247         if( model->GetKind() == kind )
00248             return cnt;
00249     }
00250
00251     return 0;
00252 }
00253
00255 AuthenKind Authen::numToKind(short num)
00256 {
00257     std::vector<AuthenModel*>& allInstances = AuthenModel::GetAllInstances();
00258     std::vector<AuthenModel*>::const_iterator i;
00259     int cnt = 0;
00260     for(i = allInstances.begin(); i != allInstances.end(); ++i, cnt++)
00261     {
00262         AuthenModel* model = *i;
00263         if( cnt == num )
00264             return model->GetKind();
00265     }
00266
00267     return local;
00268 }
00269
00271 bool Authen::parse_cvsroot(const char* CVSroot, UStr& theMethod, UStr& theUser, UStr& theHost, UStr& thePath)
00272 {
00273     char* p;
00274     UStr copyroot(CVSroot);
00275     const char* cvsroot_copy = copyroot;
00276
00277     theMethod = "";
00278     theUser = "";
00279     theHost = "";
00280     thePath = "";
00281
00282     if( *cvsroot_copy == ':' )
00283     {
00284         const char* method = ++cvsroot_copy;
00285         bool have_semicolon;
00286
00287         /* Access method specified, as in
00288         * "cvs -d :pserver:user@host:/path",
00289         * "cvs -d :local:e:\path",
00290         * "cvs -d :kserver:user@host:/path", or
00291         * "cvs -d :fork:/path".
00292         * We need to get past that part of CVSroot before parsing the
00293         * rest of it.
00294         */
00295
00296         if( !(p = strchr(method, ':')) )
00297             return false;
00298
00299         p = strpbrk(method, ":;#");
00300         if( p == 0L )
00301             return false;
00302
00303         have_semicolon = (*p == ';' || *p == '#');
00304         *p = '\0';
00305         cvsroot_copy = ++p;
00306
00307         theMethod = method;
00308
00309         while(have_semicolon)
00310         {
00311             /* More elaborate implementation would allow multiple
00312             semicolons, for example:
00313
00314             :server;rsh=34;command=cvs-1.6:
00315
00316             we will allow
00317             :server;port=22;proxy=www-proxy;proxyport=8080:
00318
00319             we will also allow # as well as ; as a separator to
00320             avoid having to quote the root in a shell.
00321             */
00322             /* FIXME: lots of error conditions should be better handled,
00323             e.g. garbage after the number or no valid number.
00324
00325             Would be nice to have testcases for some of these cases
00326             including the error cases.  */
00327             p = strpbrk(cvsroot_copy, ":;#");
00328             if( p == NULL )
00329                 return false;
00330
00331             /* pick up more options if we have them */
00332             have_semicolon = (*p == ';' || *p == '#');
00333             *p = '\0';
00334
00335             cvsroot_copy = ++p;
00336         }
00337     }
00338
00339     if( theMethod != "local" )
00340     {
00341         /* Check to see if there is a username in the string. */
00342
00343         if( (p = strchr(cvsroot_copy, '@')) != NULL )
00344         {
00345             *p = '\0';
00346             theUser = cvsroot_copy;
00347             cvsroot_copy = ++p;
00348         }
00349
00350         if( (p = strchr(cvsroot_copy, ':')) != NULL )
00351         {
00352             *p = '\0';
00353             theHost = cvsroot_copy;
00354             cvsroot_copy = ++p;
00355         }
00356     }
00357
00358     thePath = cvsroot_copy;
00359
00360     return true;
00361 }
00362
00364 // Authentications collection
00365
00367 std::vector<AuthenModel*>* AuthenModel::m_instances = 0L;
00368
00370 AuthenModel::AuthenModel()
00371 {
00372     if( m_instances == 0L )
00373     {
00374         m_instances = new std::vector<AuthenModel*>;
00375         if( m_instances == 0L )
00376             throw std::bad_alloc();
00377     }
00378
00379     m_instances->push_back(this);
00380 }
00381
00383 AuthenModel::~AuthenModel()
00384 {
00385     std::vector<AuthenModel*>::iterator i;
00386     i = std::find(m_instances->begin(), m_instances->end(), this);
00387     if( i != m_instances->end() )
00388         m_instances->erase(i);
00389
00390     if( m_instances->empty() )
00391         delete m_instances;
00392 }
00393
00395 std::vector<AuthenModel*>& AuthenModel::GetAllInstances(void)
00396 {
00397     return *AuthenModel::m_instances;
00398 }
00399
00401 AuthenModel* AuthenModel::GetInstance(AuthenKind k)
00402 {
00403     std::vector<AuthenModel*>& allInstances = GetAllInstances();
00404     std::vector<AuthenModel*>::const_iterator i;
00405     for(i = allInstances.begin(); i != allInstances.end(); ++i)
00406     {
00407         AuthenModel* model = *i;
00408         if( model->GetKind() == k )
00409             return model;
00410     }
00411
00412     // default to local
00413     cvs_err(_i18n("Unknown authentication kind %d\n"), k);
00414
00415     return GetInstance(local);
00416 }
00417
00419 void AuthenModel::OnSetupEnv(void)
00420 {
00421     /* under unix there should always be the correct home path
00422      * in the emviroment. So we have not to overwrite it.*/
00423 #ifndef qUnix
00424     static UStr home;
00425
00426     oldHome = getenv("HOME");
00427
00428     home = "HOME=";
00429     home << gCvsPrefs.Home();
00430
00431     putenv(const_cast<char*>(home.c_str()));
00432 #endif
00433 }
00434
00436 void AuthenModel::OnRestoreEnv(void)
00437 {
00438     /* we have not to clear the HOME enviroment on unix */
00439 #ifndef qUnix
00440     if( oldHome.empty() )
00441         unsetenv("HOME");
00442     else
00443         putenv(const_cast<char*>(oldHome.c_str()));
00444 #endif
00445 }
00446
00448 // Authentication: local
00449
00450 class AuthenLocal : public AuthenModel
00451 {
00452 public :
00453     AuthenLocal() {}
00454     virtual ~AuthenLocal() {}
00455
00456     virtual AuthenKind GetKind(void) const { return local; }
00457     virtual const char* GetToken(void) const { return "local"; }
00458 };
00459
00460
00462 // Authentication: ssh
00463
00464 class AuthenSSH : public AuthenModel
00465 {
00466 public :
00467     AuthenSSH() {}
00468     virtual ~AuthenSSH() {}
00469
00470     virtual AuthenKind GetKind(void) const { return ssh; }
00471     virtual const char* GetToken(void) const { return "ssh"; }
00472
00473     virtual bool HasSettings(void) const { return true; }
00474     virtual bool HasHost(void) const { return true; }
00475     virtual bool HasUser(void) const { return true; }
00476
00477     virtual void DoSettings(void);
00478     virtual void GetSettingsDesc(UStr& desc);
00479
00480     virtual const char* OnGetEnv(const char* env);
00481
00482     virtual void OnSetupEnv(void);
00483     virtual void OnRestoreEnv(void);
00484
00485     static PCStr gSSHName;
00486     static PCStr gSSHOptions;
00487     static CPersistentBool gRsaIdentity;
00488     static CMString gRsaIdentityFile;
00489     static PCStr gCurRsaIdentity;
00490
00491   static const char* RsaIdentityFile(void);
00492
00493 private:
00494   UStr oldRsh;
00495   UStr oldRsaOptions;
00496   UStr oldRsaIdentity;
00497 };
00498
00499 PCStr AuthenSSH::gSSHName("P_SSHName", "ssh", kAddSettings);
00500 PCStr AuthenSSH::gSSHOptions("P_SSHOptions", "", kAddSettings);
00501 CPersistentBool AuthenSSH::gRsaIdentity("P_RsaIdentity", false, kAddSettings);
00502 CMString AuthenSSH::gRsaIdentityFile(10, "P_RsaIdentityFiles");
00503 PCStr AuthenSSH::gCurRsaIdentity("P_CurrentRsaIdentity", 0L, kAddSettings);
00504
00505 const char* AuthenSSH::RsaIdentityFile(void)
00506 {
00507     if( gRsaIdentityFile.GetList().size() != 0 )
00508         gCurRsaIdentity = gRsaIdentityFile.GetList()[0];
00509
00510 #ifdef WIN32
00511     // Fill in a default value, if one empty slot
00512     if( gCurRsaIdentity.empty())
00513     {
00514         char* env = getenv( "HOME" );
00515         if( env != 0L )
00516         {
00517             char default_identity_folder[] = ".ssh/identity";
00518             char default_identity[ MAX_PATH ];
00519
00520             _makepath(default_identity, NULL, env, default_identity_folder, NULL);
00521             gCurRsaIdentity = default_identity;
00522         }
00523     }
00524 #endif
00525
00526     return gCurRsaIdentity.empty() ? 0L : (const char*)gCurRsaIdentity;
00527 }
00528
00529 class UAuthen_SSH : public UWidget
00530 {
00531     UDECLARE_DYNAMIC(UAuthen_SSH)
00532 public:
00533     UAuthen_SSH();
00534     virtual ~UAuthen_SSH() {}
00535
00536     enum
00537     {
00538         kOK = EV_COMMAND_START, // 0
00539         kCancel,            // 1
00540         kRSACheck,          // 2
00541         kRSAEdit,           // 3
00542         kRSABtn,            // 4
00543         kSSHCheck,          // 5
00544         kSSHName,           // 6
00545         kOptionsText,       // 7
00546         kOptionsCheck,      // 8
00547         kOptionsEdit,       // 9
00548         kSSHBtn         // 10
00549     };
00550
00551     virtual void DoDataExchange(bool fill);
00552
00553 protected:
00554     bool m_rsaidentity;
00555     UStr m_rsaidentityfile;
00556     UStr m_options;
00557
00558     ev_msg int OnCheckRSA(void);
00559     ev_msg int OnBtnRSA(void);
00560     ev_msg int OnCheckName(void);
00561     ev_msg int OnBtnName(void);
00562     ev_msg int OnCheckOptions(void);
00563
00564     UDECLARE_MESSAGE_MAP()
00565 };
00566
00567 UIMPLEMENT_DYNAMIC(UAuthen_SSH, UWidget)
00568
00569 UBEGIN_MESSAGE_MAP(UAuthen_SSH, UWidget)
00570     ON_UCOMMAND(kRSACheck, UAuthen_SSH::OnCheckRSA)
00571     ON_UCOMMAND(kRSABtn, UAuthen_SSH::OnBtnRSA)
00572     ON_UCOMMAND(kSSHCheck, UAuthen_SSH::OnCheckName)
00573     ON_UCOMMAND(kSSHBtn, UAuthen_SSH::OnBtnName)
00574     ON_UCOMMAND(kOptionsCheck, UAuthen_SSH::OnCheckOptions)
00575 UEND_MESSAGE_MAP()
00576
00577 UAuthen_SSH::UAuthen_SSH() : UWidget(::UEventGetWidID())
00578 {
00579 }
00580
00581 int UAuthen_SSH::OnCheckRSA(void)
00582 {
00583     m_rsaidentity = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kRSACheck, 0L) != 0;
00584
00585     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRSAEdit, m_rsaidentity), 0L);
00586     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kRSABtn, m_rsaidentity), 0L);
00587
00588     return 0;
00589 }
00590
00591 int UAuthen_SSH::OnCheckName(void)
00592 {
00593     bool state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kSSHCheck, 0L) != 0;
00594
00595     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kSSHName, state), 0L);
00596     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kSSHBtn, state), 0L);
00597
00598     return 0;
00599 }
00600
00601 int UAuthen_SSH::OnCheckOptions(void)
00602 {
00603     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kOptionsCheck, 0L);
00604
00605     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kOptionsEdit, state), 0L);
00606     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kOptionsText, state), 0L);
00607
00608     return 0;
00609 }
00610
00611 int UAuthen_SSH::OnBtnRSA(void)
00612 {
00613     UStr rsaidentityfile;
00614     UEventSendMessage(GetWidID(), EV_GETTEXT, kRSAEdit, &rsaidentityfile);
00615
00616     MultiFiles mf;
00617     if( !rsaidentityfile.empty() )
00618     {
00619         CStr uppath;
00620         CStr file;
00621
00622         if( SplitPath(rsaidentityfile, uppath, file) )
00623         {
00624             mf.newdir(uppath);
00625             mf.newfile(file);
00626         }
00627     }
00628
00629     if( !BrowserGetMultiFiles(_i18n("Select the RSA identity file"), mf, true) )
00630         return 0;
00631
00632     CvsArgs args(false);
00633     const char* dir = (*mf.begin()).add(args);
00634     char* const* argv = args.Argv();
00635
00636     UStr fullpath;
00637     fullpath = dir;
00638     if( !fullpath.endsWith(kPathDelimiter) )
00639         fullpath << kPathDelimiter;
00640
00641     fullpath << argv[0];
00642
00643     UEventSendMessage(GetWidID(), EV_SETTEXT, kRSAEdit, (void*)fullpath.c_str());
00644
00645     return 0;
00646 }
00647
00648 int UAuthen_SSH::OnBtnName(void)
00649 {
00650     UStr SSHName;
00651     UEventSendMessage(GetWidID(), EV_GETTEXT, kSSHName, &SSHName);
00652
00653     MultiFiles mf;
00654     if( !SSHName.empty() )
00655     {
00656         CStr uppath;
00657         CStr file;
00658
00659         if( SplitPath(SSHName, uppath, file) )
00660         {
00661             mf.newdir(uppath);
00662             mf.newfile(file);
00663         }
00664     }
00665
00666     if( !BrowserGetMultiFiles(_i18n("Select SSH"), mf, true, kSelectExecutable) )
00667         return 0;
00668
00669     CvsArgs args(false);
00670     const char* dir = (*mf.begin()).add(args);
00671     char* const* argv = args.Argv();
00672
00673     UStr fullpath;
00674     fullpath = dir;
00675     if( !fullpath.endsWith(kPathDelimiter) )
00676         fullpath << kPathDelimiter;
00677
00678     fullpath << argv[0];
00679
00680     UEventSendMessage(GetWidID(), EV_SETTEXT, kSSHName, (void*)fullpath.c_str());
00681
00682     return 0;
00683 }
00684
00685 void UAuthen_SSH::DoDataExchange(bool fill)
00686 {
00687     if( fill )
00688     {
00689         m_rsaidentity = AuthenSSH::gRsaIdentity;
00690         m_rsaidentityfile = AuthenSSH::RsaIdentityFile();
00691
00692         UStr helpMsg = _i18n("* Some Cygwin/OpenSSH options :\n"
00693             "-v : Verbose mode\n"
00694             "-C : Request compression\n"
00695             "-1 : Forces ssh to try protocol version 1 only\n"
00696             "-2 : Forces ssh to try protocol version 2 only\n"
00697             "-4 : Forces ssh to use IPv4 addresses only\n"
00698             "-6 : Forces ssh to use IPv6 addresses only");
00699
00700         UEventSendMessage(GetWidID(), EV_SETTEXT, kOptionsText, (void*)helpMsg.c_str());
00701
00702         UEventSendMessage(GetWidID(), EV_SMARTCOMBO_SETFEATURE, kRSAEdit, (void*)USmartCombo::DefaultFeature);
00703         UEventSendMessage(GetWidID(), EV_SMARTCOMBO_SETITEMS, kRSAEdit, (void*)&AuthenSSH::gRsaIdentityFile);
00704
00705         UEventSendMessage(GetWidID(), EV_COMBO_RESETALL, kRSAEdit, 0L);
00706         const CMString::list_t& rsastrings = AuthenSSH::gRsaIdentityFile.GetList();
00707         CMString::list_t::const_iterator i;
00708         for(i = rsastrings.begin(); i != rsastrings.end(); ++i)
00709         {
00710             UEventSendMessage(GetWidID(), EV_COMBO_APPEND, kRSAEdit, (void*)(const char*)*i);
00711         }
00712
00713         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kRSACheck, m_rsaidentity), 0L);
00714         UEventSendMessage(GetWidID(), EV_SETTEXT, kRSAEdit, (void*)m_rsaidentityfile.c_str());
00715
00716         if( !AuthenSSH::gSSHName.empty() )
00717         {
00718             UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kSSHCheck, 1), 0L);
00719             UEventSendMessage(GetWidID(), EV_SETTEXT, kSSHName, (void*)AuthenSSH::gSSHName.c_str());
00720         }
00721
00722         if( !AuthenSSH::gSSHOptions.empty() )
00723         {
00724             UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kOptionsCheck, 1), 0L);
00725             UEventSendMessage(GetWidID(), EV_SETTEXT, kOptionsEdit, (void*)AuthenSSH::gSSHOptions.c_str());
00726         }
00727
00728         OnCheckRSA();
00729         OnCheckName();
00730         OnCheckOptions();
00731     }
00732     else
00733     {
00734         AuthenSSH::gRsaIdentity = m_rsaidentity;
00735         if( m_rsaidentity )
00736         {
00737             UEventSendMessage(GetWidID(), EV_GETTEXT, kRSAEdit, &m_rsaidentityfile);
00738             AuthenSSH::gRsaIdentityFile.Insert(m_rsaidentityfile);
00739             AuthenSSH::gCurRsaIdentity = m_rsaidentityfile;
00740         }
00741
00742         if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kSSHCheck, 0L) )
00743             UEventSendMessage(GetWidID(), EV_GETTEXT, kSSHName, &AuthenSSH::gSSHName);
00744         else
00745             AuthenSSH::gSSHName = "";
00746
00747         if( UEventSendMessage(GetWidID(), EV_QUERYSTATE, kOptionsCheck, 0L) )
00748             UEventSendMessage(GetWidID(), EV_GETTEXT, kOptionsEdit, &AuthenSSH::gSSHOptions);
00749         else
00750             AuthenSSH::gSSHOptions = "";
00751     }
00752 }
00753
00754 void AuthenSSH::DoSettings(void)
00755 {
00756     UAuthen_SSH* dlg = new UAuthen_SSH();
00757
00758     try
00759     {
00760 #ifdef WIN32
00761         dlg->DoModal(IDD_SSH);
00762 #endif
00763 #if TARGET_RT_MAC_MACHO
00764         dlg->DoModal(3005);
00765 #endif
00766     }
00767     catch(...)
00768     {
00769     }
00770
00771     delete dlg;
00772 }
00773
00774 void AuthenSSH::GetSettingsDesc(UStr& desc)
00775 {
00776     if( !gSSHOptions.empty() )
00777     {
00778         desc << _i18n("Using ");
00779         desc << gSSHOptions.c_str();
00780         desc << " ";
00781     }
00782
00783     if( (bool)gRsaIdentity )
00784     {
00785         if( gSSHOptions.empty() )
00786             desc << _i18n("Using ");
00787
00788         desc << "-i ";
00789         desc << RsaIdentityFile();
00790     }
00791 }
00792
00793 void AuthenSSH::OnSetupEnv(void)
00794 {
00795     AuthenModel::OnSetupEnv();
00796
00797     static UStr rsh;
00798     static UStr options;
00799     static UStr identity;
00800
00801     rsh = "CVS_RSH=";
00802
00803     oldRsh         = getenv("CVS_RSH");
00804     oldRsaOptions  = getenv("CVS_RSA_OPTIONS");
00805     oldRsaIdentity = getenv("CVS_RSA_IDENTITY");
00806
00807     if( gSSHName.empty() )
00808         rsh << "ssh";
00809     else
00810         rsh << gSSHName.c_str();
00811
00812     putenv(const_cast<char*>(rsh.c_str()));
00813
00814     if( !gSSHOptions.empty() )
00815     {
00816         options = "CVS_RSA_OPTIONS=";
00817         options << gSSHOptions.c_str();
00818
00819         putenv(const_cast<char*>(options.c_str()));
00820     }
00821
00822     if( (bool)gRsaIdentity )
00823     {
00824         identity = "CVS_RSA_IDENTITY=";
00825         identity << RsaIdentityFile();
00826
00827         putenv (const_cast<char*>(identity.c_str()));
00828     }
00829 }
00830
00831 void AuthenSSH::OnRestoreEnv(void)
00832 {
00833     AuthenModel::OnRestoreEnv();
00834
00835     if( oldRsh.empty() )
00836         unsetenv("CVS_RSH");
00837     else
00838         putenv (const_cast<char*>(oldRsh.c_str()));
00839
00840     if( oldRsaOptions.empty() )
00841         unsetenv("CVS_RSA_OPTIONS");
00842     else
00843         putenv (const_cast<char*>(oldRsaOptions.c_str()));
00844
00845     if( oldRsaIdentity.empty() )
00846         unsetenv("CVS_RSA_IDENTITY");
00847     else
00848         putenv(const_cast<char*>(oldRsaIdentity.c_str()));
00849 }
00850
00851 const char* AuthenSSH::OnGetEnv(const char* env)
00852 {
00853     if( strcmp(env, "CVS_RSH") == 0 )
00854     {
00855         return gSSHName.empty() ? "ssh" : (char*)gSSHName.c_str();
00856     }
00857     else if( strcmp(env, "CVS_RSA_OPTIONS") == 0)
00858     {
00859         return gSSHOptions.empty() ? 0L : (char*)gSSHOptions.c_str();
00860     }
00861     else if( strcmp(env, "CVS_RSA_IDENTITY") == 0 && (bool)gRsaIdentity)
00862     {
00863         const char* tmp = RsaIdentityFile();
00864         if( tmp && *tmp )
00865         {
00866 #ifdef WIN32
00867             while( *tmp && iswspace(*tmp) )
00868 #else
00869             while( *tmp && isspace(*tmp) )
00870 #endif
00871                 tmp++;
00872
00873             return *tmp ? (char*)tmp : 0L;
00874         }
00875
00876         return 0L;
00877     }
00878
00879     return 0L;
00880 }
00881
00882
00883 bool CvsPrefs::UseKeyChain(void) const
00884 {
00885     return false;
00886 }
00887
00889 // Authentication: pserver
00890
00891 class AuthenPserver : public AuthenModel
00892 {
00893 public :
00894     AuthenPserver() {}
00895     virtual ~AuthenPserver() {}
00896
00897     virtual AuthenKind GetKind(void) const { return pserver; }
00898     virtual const char* GetToken(void) const { return "pserver"; }
00899
00900     virtual bool HasSettings(void) const { return true; }
00901     virtual bool HasHost(void) const { return true; }
00902     virtual bool HasUser(void) const { return true; }
00903
00904     virtual bool HasLogin(void) const { return true; }
00905
00906     virtual void DoSettings(void);
00907     virtual void GetSettingsDesc(UStr& desc);
00908
00909     virtual const char* OnGetEnv(const char* env);
00910
00911     virtual void OnSetupEnv(void);
00912     virtual void OnRestoreEnv(void);
00913
00914 private:
00915     UStr oldPserverPort;
00916 };
00917
00918 class UAuthen_Pserver : public UWidget
00919 {
00920     UDECLARE_DYNAMIC(UAuthen_Pserver)
00921 public:
00922     UAuthen_Pserver();
00923     virtual ~UAuthen_Pserver() {}
00924
00925     enum
00926     {
00927         kOK = EV_COMMAND_START, // 0
00928         kCancel,            // 1
00929         kCheckPort,         // 2
00930         kEditPort,          // 3
00931         kCheckProxy,        // 4
00932         kNameProxy,         // 5
00933         kEditProxy          // 6
00934     };
00935
00936     virtual void DoDataExchange(bool fill);
00937
00938 protected:
00939     int m_port;
00940     int m_pport;
00941     UStr m_pname;
00942
00943     ev_msg int OnCheckPort(void);
00944     ev_msg int OnCheckProxy(void);
00945
00946     UDECLARE_MESSAGE_MAP()
00947 };
00948
00949 UIMPLEMENT_DYNAMIC(UAuthen_Pserver, UWidget)
00950
00951 UBEGIN_MESSAGE_MAP(UAuthen_Pserver, UWidget)
00952     ON_UCOMMAND(kCheckPort, UAuthen_Pserver::OnCheckPort)
00953     ON_UCOMMAND(kCheckProxy,  UAuthen_Pserver::OnCheckProxy)
00954 UEND_MESSAGE_MAP()
00955
00956 UAuthen_Pserver::UAuthen_Pserver() : UWidget(::UEventGetWidID())
00957 {
00958 }
00959
00960 int UAuthen_Pserver::OnCheckPort(void)
00961 {
00962     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckPort, 0L);
00963
00964     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditPort, state), 0L);
00965
00966     return 0;
00967 }
00968
00969 int UAuthen_Pserver::OnCheckProxy(void)
00970 {
00971     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckProxy, 0L);
00972
00973     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kNameProxy, state), 0L);
00974     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditProxy, state), 0L);
00975
00976     return 0;
00977 }
00978
00979 void UAuthen_Pserver::DoDataExchange(bool fill)
00980 {
00981     if( fill )
00982     {
00983         m_port = gCvsPrefs.PserverPort();
00984
00985         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditPort, m_port != -1), 0L);
00986         UEventSendMessage(GetWidID(), EV_SETINTEGER, UMAKEINT(kEditPort, m_port == -1 ? 2401 : m_port), 0L);
00987         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckPort, m_port != -1), 0L);
00988
00989         m_pport = gCvsPrefs.ProxyPort();
00990         m_pname = gCvsPrefs.ProxyHost();
00991         bool useProxy = gCvsPrefs.UseProxy();
00992
00993         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditProxy, useProxy), 0L);
00994         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kNameProxy, useProxy), 0L);
00995         UEventSendMessage(GetWidID(), EV_SETINTEGER, UMAKEINT(kEditProxy, m_pport), 0L);
00996         UEventSendMessage(GetWidID(), EV_SETTEXT, kNameProxy, (void*)(const char*)m_pname);
00997         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckProxy, useProxy), 0L);
00998     }
00999     else
01000     {
01001         int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckPort, 0L);
01002
01003         int value = UEventSendMessage(GetWidID(), EV_GETINTEGER, kEditPort, 0L);
01004         gCvsPrefs.SetPserverPort(state ? value : -1);
01005
01006         state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckProxy, 0L);
01007         value = UEventSendMessage(GetWidID(), EV_GETINTEGER, kEditProxy, 0L);
01008         UEventSendMessage(GetWidID(), EV_GETTEXT, kNameProxy, &m_pname);
01009         gCvsPrefs.SetUseProxy(state != 0);
01010
01011         if( state != 0 )
01012         {
01013             gCvsPrefs.SetProxyHost(m_pname);
01014             gCvsPrefs.SetProxyPort(value);
01015         }
01016     }
01017 }
01018
01019 void AuthenPserver::DoSettings(void)
01020 {
01021     UAuthen_Pserver* dlg = new UAuthen_Pserver();
01022
01023     try
01024     {
01025 #if qMacCvsPP
01026         dlg->DoModal(3002);
01027 #endif
01028 #ifdef WIN32
01029         dlg->DoModal(IDD_PSERVER);
01030 #endif
01031     }
01032     catch(...)
01033     {
01034     }
01035
01036     delete dlg;
01037 }
01038
01039 void AuthenPserver::GetSettingsDesc(UStr& desc)
01040 {
01041     if( gCvsPrefs.PserverPort() == -1 )
01042         desc << _i18n("Using default port and ");
01043     else
01044         desc << _i18n("Using port ") << gCvsPrefs.PserverPort() << _i18n(" and ");
01045
01046     if( !gCvsPrefs.UseProxy() )
01047         desc << _i18n("no proxy");
01048     else
01049         desc << _i18n("using proxy host ") << gCvsPrefs.ProxyHost() << _i18n(" with port ") << gCvsPrefs.ProxyPort();
01050 }
01051
01052 void AuthenPserver::OnSetupEnv(void)
01053 {
01054     AuthenModel::OnSetupEnv();
01055
01056     static UStr options;
01057
01058     if( gCvsPrefs.PserverPort() != -1 )
01059     {
01060         oldPserverPort = getenv("CVS_PSERVER_PORT");
01061
01062         options = "CVS_PSERVER_PORT=";
01063         options << gCvsPrefs.PserverPort();
01064
01065         putenv (const_cast<char*>(options.c_str()));
01066     }
01067 }
01068
01069 void AuthenPserver::OnRestoreEnv(void)
01070 {
01071     AuthenModel::OnRestoreEnv();
01072
01073     if( gCvsPrefs.PserverPort() != -1 )
01074     {
01075         if( oldPserverPort.empty() )
01076                 unsetenv("CVS_PSERVER_PORT");
01077         else
01078                 putenv (const_cast<char*>(oldPserverPort.c_str()));
01079     }
01080 }
01081
01082 const char* AuthenPserver::OnGetEnv(const char* env)
01083 {
01084     if( strcmp(env, "CVS_PSERVER_PORT") == 0 )
01085     {
01086         if( gCvsPrefs.PserverPort() != -1 )
01087         {
01088             static char port[10];
01089             sprintf(port, "%d", gCvsPrefs.PserverPort());
01090
01091             return port;
01092         }
01093
01094         return 0L;
01095     }
01096
01097     return 0L;
01098 }
01099
01101 // Authentication: rhosts
01102
01103 class AuthenRhosts : public AuthenModel
01104 {
01105 public :
01106     AuthenRhosts() {}
01107     virtual ~AuthenRhosts() {}
01108
01109     virtual AuthenKind GetKind(void) const { return rhosts; }
01110     virtual const char* GetToken(void) const { return "rhosts"; }
01111
01112     virtual bool HasSettings(void) const { return true; }
01113     virtual bool HasHost(void) const { return true; }
01114     virtual bool HasUser(void) const { return true; }
01115
01116     virtual void DoSettings(void);
01117     virtual void GetSettingsDesc(UStr& desc);
01118
01119     virtual const char* OnGetEnv(const char* env);
01120
01121     virtual void OnSetupEnv(void);
01122     virtual void OnRestoreEnv(void);
01123 private:
01124     UStr oldRsa;
01125     UStr oldRhostPort;
01126     UStr oldServerName;
01127 };
01128
01129 class UAuthen_Rhosts : public UWidget
01130 {
01131     UDECLARE_DYNAMIC(UAuthen_Rhosts)
01132 public:
01133     UAuthen_Rhosts();
01134     virtual ~UAuthen_Rhosts() {}
01135
01136     enum
01137     {
01138         kOK = EV_COMMAND_START, // 0
01139         kCancel,            // 1
01140         kCheckPort,         // 2
01141         kEditPort,          // 3
01142         kCheckRSHName,      // 4
01143         kEditRSHName,       // 5
01144         kCheckServerName,   // 6
01145         kEditServerName     // 7
01146     };
01147
01148     virtual void DoDataExchange(bool fill);
01149
01150 protected:
01151     int m_port;
01152     UStr m_rshname;
01153     UStr m_servername;
01154
01155     ev_msg int OnCheckPort(void);
01156     ev_msg int OnCheckRshName(void);
01157     ev_msg int OnCheckServerName(void);
01158
01159     UDECLARE_MESSAGE_MAP()
01160 };
01161
01162 UIMPLEMENT_DYNAMIC(UAuthen_Rhosts, UWidget)
01163
01164 UBEGIN_MESSAGE_MAP(UAuthen_Rhosts, UWidget)
01165     ON_UCOMMAND(kCheckPort, UAuthen_Rhosts::OnCheckPort)
01166     ON_UCOMMAND(kCheckRSHName, UAuthen_Rhosts::OnCheckRshName)
01167     ON_UCOMMAND(kCheckServerName, UAuthen_Rhosts::OnCheckServerName)
01168 UEND_MESSAGE_MAP()
01169
01170 UAuthen_Rhosts::UAuthen_Rhosts() : UWidget(::UEventGetWidID())
01171 {
01172 }
01173
01174 int UAuthen_Rhosts::OnCheckPort(void)
01175 {
01176     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckPort, 0L);
01177
01178     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditPort, state), 0L);
01179
01180     return 0;
01181 }
01182
01183 int UAuthen_Rhosts::OnCheckRshName(void)
01184 {
01185     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRSHName, 0L);
01186
01187     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditRSHName, state), 0L);
01188
01189     return 0;
01190 }
01191
01192 int UAuthen_Rhosts::OnCheckServerName(void)
01193 {
01194     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckServerName, 0L);
01195
01196     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditServerName, state), 0L);
01197
01198     return 0;
01199 }
01200
01201 void UAuthen_Rhosts::DoDataExchange(bool fill)
01202 {
01203     if( fill )
01204     {
01205         m_port = gCvsPrefs.RhostPort();
01206         m_rshname = gCvsPrefs.RshName();
01207         m_servername = gCvsPrefs.ServerName();
01208
01209         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditPort, m_port != -1), 0L);
01210         UEventSendMessage(GetWidID(), EV_SETINTEGER, UMAKEINT(kEditPort, m_port == -1 ? 0 : m_port), 0L);
01211         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckPort, m_port != -1), 0L);
01212
01213         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditRSHName, !m_rshname.empty()), 0L);
01214         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditRSHName, (void*)m_rshname.c_str());
01215         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRSHName, !m_rshname.empty()), 0L);
01216
01217         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditServerName, !m_servername.empty()), 0L);
01218         UEventSendMessage(GetWidID(), EV_SETTEXT, kEditServerName, (void*)m_servername.c_str());
01219         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckServerName, !m_servername.empty()), 0L);
01220     }
01221     else
01222     {
01223         int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckPort, 0L);
01224         int value = UEventSendMessage(GetWidID(), EV_GETINTEGER, kEditPort, 0L);
01225         gCvsPrefs.SetRhostPort(state ? value : -1);
01226
01227         state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRSHName, 0L);
01228         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditRSHName, &m_rshname);
01229         gCvsPrefs.SetRshName(state ? m_rshname.c_str() : "");
01230
01231         state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckServerName, 0L);
01232         UEventSendMessage(GetWidID(), EV_GETTEXT, kEditServerName, &m_servername);
01233         gCvsPrefs.SetServerName(state ? m_servername.c_str() : "");
01234     }
01235 }
01236
01237 void AuthenRhosts::DoSettings(void)
01238 {
01239     UAuthen_Rhosts* dlg = new UAuthen_Rhosts();
01240
01241     try
01242     {
01243 #ifdef qMacCvsPP
01244         dlg->DoModal(3001);
01245 #endif
01246 #ifdef WIN32
01247         dlg->DoModal(IDD_RSH);
01248 #endif
01249     }
01250     catch(...)
01251     {
01252     }
01253
01254     delete dlg;
01255 }
01256
01257 void AuthenRhosts::GetSettingsDesc(UStr& desc)
01258 {
01259     if( gCvsPrefs.RhostPort() == -1 )
01260         desc << _i18n("Using default port and ");
01261     else
01262         desc << _i18n("Using port ") << gCvsPrefs.RhostPort() << _i18n(" and ");
01263
01264     if( gCvsPrefs.RshName() == 0L )
01265         desc << _i18n("default shell name");
01266     else
01267         desc << _i18n("shell named ") << gCvsPrefs.RshName();
01268 }
01269
01270 void AuthenRhosts::OnSetupEnv(void)
01271 {
01272     AuthenModel::OnSetupEnv();
01273
01274     static UStr rsh;
01275     static UStr port;
01276     static UStr server;
01277
01278     oldRsa        = getenv("CVS_RSH");
01279     oldRhostPort  = getenv("CVS_RCMD_PORT");
01280     oldServerName = getenv("CVS_SERVER");
01281
01282     if( gCvsPrefs.RshName() != 0L )
01283     {
01284         rsh = "CVS_RSH=";
01285         rsh << gCvsPrefs.RshName();
01286
01287         putenv (const_cast<char*>(rsh.c_str()));
01288     }
01289
01290     if( gCvsPrefs.RhostPort() != -1 )
01291     {
01292         port = "CVS_RCMD_PORT=";
01293         port << gCvsPrefs.RhostPort();
01294
01295         putenv (const_cast<char*>(port.c_str()));
01296     }
01297
01298     if( gCvsPrefs.ServerName() != 0L )
01299     {
01300         server = "CVS_SERVER=";
01301         server << gCvsPrefs.ServerName();
01302
01303         putenv (const_cast<char*>(server.c_str()));
01304     }
01305 }
01306
01307 void AuthenRhosts::OnRestoreEnv(void)
01308 {
01309     AuthenModel::OnRestoreEnv();
01310
01311     if( oldRsa.empty() )
01312         unsetenv("CVS_RSH");
01313     else
01314         putenv (const_cast<char*>(oldRsa.c_str()));
01315
01316     if( oldRhostPort.empty() )
01317         unsetenv("CVS_RCMD_PORT");
01318     else
01319         putenv (const_cast<char*>(oldRhostPort.c_str()));
01320
01321     if( oldServerName.empty() )
01322         unsetenv("CVS_SERVER");
01323     else
01324         putenv (const_cast<char*>(oldServerName.c_str()));
01325 }
01326
01327 const char* AuthenRhosts::OnGetEnv(const char* env)
01328 {
01329     if( strcmp(env, "CVS_RSH") == 0 )
01330     {
01331         return (char*)gCvsPrefs.RshName();
01332     }
01333     else if( strcmp(env, "CVS_RCMD_PORT") == 0 )
01334     {
01335         if( gCvsPrefs.RhostPort() != -1 )
01336         {
01337             static char port[10];
01338             sprintf(port, "%d", gCvsPrefs.RhostPort());
01339
01340             return port;
01341         }
01342
01343         return 0L;
01344     }
01345     else if( strcmp(env, "CVS_SERVER") == 0 )
01346     {
01347         return (char*)gCvsPrefs.ServerName();
01348     }
01349
01350     return 0L;
01351 }
01352
01354 // Authentication: kserver
01355
01356 class AuthenKserver : public AuthenModel
01357 {
01358 public :
01359     AuthenKserver() {}
01360     virtual ~AuthenKserver() {}
01361
01362     virtual AuthenKind GetKind(void) const { return kserver; }
01363     virtual const char* GetToken(void) const { return "kserver"; }
01364
01365     virtual bool HasSettings(void) const { return true; }
01366     virtual bool HasHost(void) const { return true; }
01367     virtual bool HasUser(void) const { return true; }
01368
01369     virtual void DoSettings(void);
01370     virtual void GetSettingsDesc(UStr& desc);
01371
01372     virtual const char* OnGetEnv(const char* env);
01373 };
01374
01375 class UAuthen_Kserver : public UWidget
01376 {
01377     UDECLARE_DYNAMIC(UAuthen_Kserver)
01378 public:
01379     UAuthen_Kserver();
01380     virtual ~UAuthen_Kserver() {}
01381
01382     enum
01383     {
01384         kOK = EV_COMMAND_START, // 0
01385         kCancel,            // 1
01386         kCheckPort,         // 2
01387         kEditPort           // 3
01388     };
01389
01390     virtual void DoDataExchange(bool fill);
01391
01392 protected:
01393     int m_port;
01394
01395     ev_msg int OnCheckPort(void);
01396
01397     UDECLARE_MESSAGE_MAP()
01398 };
01399
01400 UIMPLEMENT_DYNAMIC(UAuthen_Kserver, UWidget)
01401
01402 UBEGIN_MESSAGE_MAP(UAuthen_Kserver, UWidget)
01403     ON_UCOMMAND(kCheckPort, UAuthen_Kserver::OnCheckPort)
01404 UEND_MESSAGE_MAP()
01405
01406 UAuthen_Kserver::UAuthen_Kserver() : UWidget(::UEventGetWidID())
01407 {
01408 }
01409
01410 int UAuthen_Kserver::OnCheckPort(void)
01411 {
01412     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckPort, 0L);
01413
01414     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditPort, state), 0L);
01415
01416     return 0;
01417 }
01418
01419 void UAuthen_Kserver::DoDataExchange(bool fill)
01420 {
01421     if( fill )
01422     {
01423         m_port = gCvsPrefs.KserverPort();
01424
01425         UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kEditPort, m_port != -1), 0L);
01426         UEventSendMessage(GetWidID(), EV_SETINTEGER, UMAKEINT(kEditPort, m_port == -1 ? 0 : m_port), 0L);
01427         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckPort, m_port != -1), 0L);
01428     }
01429     else
01430     {
01431         int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckPort, 0L);
01432         int value = UEventSendMessage(GetWidID(), EV_GETINTEGER, kEditPort, 0L);
01433         gCvsPrefs.SetKserverPort(state ? value : -1);
01434     }
01435 }
01436
01437 void AuthenKserver::DoSettings(void)
01438 {
01439     UAuthen_Kserver* dlg = new UAuthen_Kserver();
01440
01441     try
01442     {
01443 #if qMacCvsPP
01444         dlg->DoModal(3003);
01445 #endif
01446     }
01447     catch(...)
01448     {
01449     }
01450
01451     delete dlg;
01452 }
01453
01454 void AuthenKserver::GetSettingsDesc(UStr& desc)
01455 {
01456     if( gCvsPrefs.KserverPort() == -1 )
01457         desc << _i18n("Using default port");
01458     else
01459         desc << _i18n("Using port ") << gCvsPrefs.KserverPort();
01460 }
01461
01462 const char* AuthenKserver::OnGetEnv(const char* env)
01463 {
01464     return 0L;
01465 }
01466
01468 // Authentication: ntserver
01469
01470 class AuthenNtserver : public AuthenModel
01471 {
01472 public :
01473     AuthenNtserver() {}
01474     virtual ~AuthenNtserver() {}
01475
01476     virtual AuthenKind GetKind(void) const { return ntserver; }
01477     virtual const char* GetToken(void) const { return "ntserver"; }
01478
01479     virtual bool HasSettings(void) const { return false; }
01480     virtual bool HasHost(void) const { return true; }
01481
01482     virtual const char* OnGetEnv(const char* env);
01483 };
01484
01485 const char* AuthenNtserver::OnGetEnv(const char* env)
01486 {
01487     return 0L;
01488 }
01489
01491 // Authentication: gserver
01492
01493 class AuthenGserver : public AuthenModel
01494 {
01495 public :
01496     AuthenGserver() {}
01497     virtual ~AuthenGserver() {}
01498
01499     virtual AuthenKind GetKind(void) const { return gserver; }
01500     virtual const char* GetToken(void) const { return "gserver"; }
01501
01502     virtual bool HasSettings(void) const { return true; }
01503     virtual bool HasHost(void) const { return true; }
01504
01505     virtual bool HasEncryption(void) const { return true; }
01506
01507     virtual void DoSettings(void);
01508     virtual void GetSettingsDesc(UStr& desc);
01509
01510     virtual const char* OnGetEnv(const char* env);
01511 };
01512
01513 void AuthenGserver::GetSettingsDesc(UStr& desc)
01514 {
01515     if( gCvsPrefs.EncryptCommunication() )
01516         desc << _i18n("Encryption turned on");
01517     else
01518         desc << _i18n("Encryption turned off");
01519 }
01520
01521 const char* AuthenGserver::OnGetEnv(const char* env)
01522 {
01523     return 0L;
01524 }
01525
01526 class UAuthen_Gserver : public UWidget
01527 {
01528     UDECLARE_DYNAMIC(UAuthen_Gserver)
01529 public:
01530     UAuthen_Gserver();
01531     virtual ~UAuthen_Gserver() {}
01532
01533     enum
01534     {
01535         kOK = EV_COMMAND_START, // 0
01536         kCancel,                // 1
01537         kCheckEncrypt           // 2
01538     };
01539
01540     virtual void DoDataExchange(bool fill);
01541
01542 protected:
01543     UDECLARE_MESSAGE_MAP()
01544 };
01545
01546 UIMPLEMENT_DYNAMIC(UAuthen_Gserver, UWidget)
01547
01548 UBEGIN_MESSAGE_MAP(UAuthen_Gserver, UWidget)
01549 UEND_MESSAGE_MAP()
01550
01551 UAuthen_Gserver::UAuthen_Gserver() : UWidget(::UEventGetWidID())
01552 {
01553 }
01554
01555 void UAuthen_Gserver::DoDataExchange(bool fill)
01556 {
01557     if( fill )
01558     {
01559         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckEncrypt, gCvsPrefs.EncryptCommunication()), 0L);
01560     }
01561     else
01562     {
01563         int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckEncrypt, 0L);
01564         gCvsPrefs.SetEncryptCommunication(state != 0);
01565     }
01566 }
01567
01568 void AuthenGserver::DoSettings(void)
01569 {
01570     UAuthen_Gserver* dlg = new UAuthen_Gserver();
01571
01572     try
01573     {
01574 #ifdef WIN32
01575         dlg->DoModal(IDD_GSERVER);
01576 #endif
01577     }
01578     catch(...)
01579     {
01580     }
01581
01582     delete dlg;
01583 }
01584
01586 // Authentication: sspi
01587
01588 class AuthenSspi : public AuthenModel
01589 {
01590 public :
01591     AuthenSspi() {}
01592     virtual ~AuthenSspi() {}
01593
01594     virtual AuthenKind GetKind(void) const { return sspi; }
01595     virtual const char* GetToken(void) const { return "sspi"; }
01596
01597     virtual bool HasSettings(void) const { return true; }
01598     virtual bool HasHost(void) const { return true; }
01599     virtual bool HasUser(void) const { return true; }
01600
01601     virtual bool HasEncryption(void) const { return true; }
01602     virtual bool HasLogin(void) const { return true; }
01603
01604     virtual void DoSettings(void);
01605     virtual void GetSettingsDesc(UStr& desc);
01606
01607     virtual const char* OnGetEnv(const char* env);
01608 };
01609
01610 void AuthenSspi::GetSettingsDesc(UStr& desc)
01611 {
01612     if( gCvsPrefs.EncryptCommunication() )
01613         desc << _i18n("Encryption turned on");
01614     else
01615         desc << _i18n("Encryption turned off");
01616 }
01617
01618 const char* AuthenSspi::OnGetEnv(const char* env)
01619 {
01620     return 0L;
01621 }
01622
01623 class UAuthen_Sspi : public UWidget
01624 {
01625     UDECLARE_DYNAMIC(UAuthen_Sspi)
01626 public:
01627     UAuthen_Sspi();
01628     virtual ~UAuthen_Sspi() {}
01629
01630     enum
01631     {
01632         kOK = EV_COMMAND_START, // 0
01633         kCancel,                // 1
01634         kCheckEncrypt           // 2
01635     };
01636
01637     virtual void DoDataExchange(bool fill);
01638
01639 protected:
01640     UDECLARE_MESSAGE_MAP()
01641 };
01642
01643 UIMPLEMENT_DYNAMIC(UAuthen_Sspi, UWidget)
01644
01645 UBEGIN_MESSAGE_MAP(UAuthen_Sspi, UWidget)
01646 UEND_MESSAGE_MAP()
01647
01648 UAuthen_Sspi::UAuthen_Sspi() : UWidget(::UEventGetWidID())
01649 {
01650 }
01651
01652 void UAuthen_Sspi::DoDataExchange(bool fill)
01653 {
01654     if( fill )
01655     {
01656         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckEncrypt, gCvsPrefs.EncryptCommunication()), 0L);
01657     }
01658     else
01659     {
01660         int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckEncrypt, 0L);
01661         gCvsPrefs.SetEncryptCommunication(state != 0);
01662     }
01663 }
01664
01665 void AuthenSspi::DoSettings(void)
01666 {
01667     UAuthen_Sspi* dlg = new UAuthen_Sspi();
01668
01669     try
01670     {
01671 #ifdef WIN32
01672         dlg->DoModal(IDD_SSPI);
01673 #endif
01674     }
01675     catch(...)
01676     {
01677     }
01678
01679     delete dlg;
01680 }
01681
01683 // Authentication: server
01684
01685 class AuthenServer : public AuthenModel
01686 {
01687 public :
01688     AuthenServer() {}
01689     virtual ~AuthenServer() {}
01690
01691     virtual AuthenKind GetKind(void) const { return server; }
01692     virtual const char* GetToken(void) const { return "server"; }
01693
01694     virtual bool HasHost(void) const { return true; }
01695     virtual bool HasUser(void) const { return true; }
01696
01697     virtual const char* OnGetEnv(const char* env);
01698 };
01699
01700 const char* AuthenServer::OnGetEnv(const char* env)
01701 {
01702     return 0L;
01703 }
01704
01706 // Authentication instances
01707
01708 static AuthenLocal localInstance;
01709 static AuthenPserver pserverInstance;
01710 static AuthenRhosts rhostsInstance;
01711
01712 #ifndef WIN32
01713     static AuthenKserver kserverInstance;
01714 #else
01715     static AuthenNtserver ntserverInstance;
01716     static AuthenGserver gserverInstance;
01717     static AuthenSspi sspiInstance;
01718     static AuthenServer serverInstance;
01719 #endif
01720
01721 static AuthenSSH sshInstance;
01722
01723 #endif /* INTERNAL_AUTHEN */
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJCaptionButton Member List

This is the complete list of members for CCJCaptionButton, including all inherited members.

CCJFlatButton() | CCJFlatButton |
DisableFlatLook(BOOL bDisable=FALSE) | CCJFlatButton | [virtual]
DrawButtonBitmap(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawButtonIcon(CDC *pDC, UINT nState, CRect &rcItem) | CCJFlatButton | [protected, virtual]
DrawButtonText(CDC *pDC, UINT nState, CRect &rcItem) | CCJCaptionButton | [virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CCJFlatButton | [virtual]
m_bAltColor | CCJFlatButton | [protected]
m_bFlatLook | CCJFlatButton | [protected]
m_bLBtnDown | CCJFlatButton | [protected]
m_bMouseOver | CCJFlatButton | [protected]
m_bPainted | CCJFlatButton | [protected]
m_clrAltHilite | CCJFlatButton | [protected]
m_clrAltNormal | CCJFlatButton | [protected]
m_clrAltShadow | CCJFlatButton | [protected]
m_clrAltTextNm | CCJFlatButton | [protected]
m_clrDkShad | CCJFlatButton | [protected]
m_clrHilite | CCJFlatButton | [protected]
m_clrNormal | CCJFlatButton | [protected]
m_clrShadow | CCJFlatButton | [protected]
m_clrTextGy | CCJFlatButton | [protected]
m_clrTextNm | CCJFlatButton | [protected]
m_Font | CCJFlatButton | [protected]
m_hCursor | CCJFlatButton | [protected]
m_hPushed | CCJFlatButton | [protected]
m_pFont | CCJFlatButton | [protected]
m_sizeIcon | CCJFlatButton | [protected]
OnEraseBkgnd(CDC *pDC) | CCJFlatButton | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJFlatButton | [protected]
OnPaint() | CCJFlatButton | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJFlatButton | [protected]
OnSysColorChange() | CCJCaptionButton | [protected]
OnTimer(UINT nIDEvent) | CCJFlatButton | [protected]
SetAlternateColors(COLORREF clrAltNormal, COLORREF clrAltHilite, COLORREF clrAltShadow, COLORREF clrAltTextNm) | CCJFlatButton | [virtual]
SetButtonFont(CFont *pFont) | CCJFlatButton | [virtual]
SetButtonStyle(CFont *pFont, COLORREF clrBackground, COLORREF clrFont) | CCJCaptionButton | [virtual]
SetIcon(HICON hIcon, CSize size) | CCJFlatButton | [virtual]
SetIcon(HICON hIcon, HICON hPushed, CSize size) | CCJFlatButton | [virtual]
UpdateFont() | CCJFlatButton | [protected, virtual]
~CCJFlatButton() | CCJFlatButton | [virtual]

Generated on Sat Aug 7 22:48:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacBinMaps.h Source File

common/MacBinMaps.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * MacBinMaps.h --- class to store the mac binary encoding mappings
00023  */
00024
00025 #ifndef MACBINMAPS_H
00026 #define MACBINMAPS_H
00027
00028 #include "CvsPrefs.h"
00029
00030 typedef struct
00031 {
00032 #   define MAX_MACBIN_DESC 63
00033 #   define MAX_MACBIN_EXTENSION 31
00034     OSType sig;
00035     char ext[MAX_MACBIN_EXTENSION + 1];
00036     char desc[MAX_MACBIN_DESC + 1];
00037     MACENCODING encod;
00038     bool useDefault;
00039 } MACBINMAP;
00040
00041 typedef struct
00042 {
00043 # define  MACBINMAP_COOKIEVALUE  0xc001cafe
00044   unsigned long   cookie;
00045     int             numMaps;
00046     MACBINMAP maps[1];
00047 } MACBINMAPENTRIES;
00048
00049 class MacBinMaps
00050 {
00051 public:
00052     MacBinMaps();
00053     ~MacBinMaps();
00054
00055     void LoadDefaults(void);
00056         // fill with the persistent defaults
00057
00058     void SaveDefaults(void);
00059         // store as defaults
00060
00061     const MACBINMAP *AddEntry(OSType sig, const char* extension, const char *desc, MACENCODING encod, bool useDefault);
00062         // an an entry
00063
00064     void RemoveEntry(OSType sig, const char* extension);
00065         // remove an entry
00066
00067     MacBinMaps & operator=(const MacBinMaps & otherMap);
00068         // replace by this map
00069
00070     inline const MACBINMAPENTRIES * Entries(void) const {return entries;}
00071         // return the entries
00072
00073     static const char *GetEnvPlainTypes(void);
00074         // return all the plain binaries types with a semi-colon
00075         // between each ones.
00076
00077     static const char *GetEnvTypes(MACENCODING type);
00078         // return all the plain binaries types with a semi-colon
00079         // between each ones.
00080 protected:
00081     void Reset(void);
00082
00083     MACBINMAPENTRIES *entries;
00084 };
00085
00086 #endif /* MACBINMAPS_H */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCvsRootDlg Member List

This is the complete list of members for CCvsRootDlg, including all inherited members.

CCvsRootDlg(const char *cvsRoot, CWnd *pParent=NULL) | CCvsRootDlg |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DeleteAllItems() | CCvsRootDlg | [private]
DisplayKeywords(CProtocolParserConsole &protocolParserConsole) | CCvsRootDlg | [private]
DoDataExchange(CDataExchange *pDX) | CCvsRootDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableControls(BOOL enable) | CCvsRootDlg | [private]
EnableEditControls(const KeywordDisplayInfo *displayInfo) | CCvsRootDlg | [private]
EnableWndContextHelp() | CHHelpSupport |
FillProtocolsComboBox(CInfoParserConsole &infoParserConsole) | CCvsRootDlg | [private]
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CCvsRootDlg |
InitHelpID() | CCvsRootDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
InitListCtrl(const kCvsRootDisplayType displayType) | CCvsRootDlg | [private]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_cancelButton | CCvsRootDlg |
m_clearButton | CCvsRootDlg |
m_cvsroot | CCvsRootDlg |
m_cvsRootParser | CCvsRootDlg | [private]
m_cvsrootStatic | CCvsRootDlg |
m_cvsStopped | CCvsRootDlg | [private]
m_editButton | CCvsRootDlg |
m_keywordDescStatic | CCvsRootDlg |
m_keywordList | CCvsRootDlg |
m_okButton | CCvsRootDlg |
m_protocol | CCvsRootDlg |
m_protocolCombo | CCvsRootDlg |
m_protocolDescStatic | CCvsRootDlg |
m_repositoryPath | CCvsRootDlg |
m_repositoryPathCombo | CCvsRootDlg |
OnCancel() | CCvsRootDlg | [protected, virtual]
OnClear() | CCvsRootDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDblclkKeywordlist(NMHDR *pNMHDR, LRESULT *pResult) | CCvsRootDlg | [protected]
OnDestroy() | CCvsRootDlg | [protected]
OnEdit() | CCvsRootDlg | [protected]
OnEditchangePath() | CCvsRootDlg | [protected]
OnHelp() | CCvsRootDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CCvsRootDlg | [protected, virtual]
OnItemchangedKeywordlist(NMHDR *pNMHDR, LRESULT *pResult) | CCvsRootDlg | [protected]
OnReadProtocols() | CCvsRootDlg | [protected]
OnSelchangePath() | CCvsRootDlg | [protected]
OnSelchangeProtocol() | CCvsRootDlg | [protected]
PostReadProtocolsMsg() | CCvsRootDlg | [private]
ReadAvailableProtocols() | CCvsRootDlg | [private]
ReadProtocolDetails() | CCvsRootDlg | [private]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
ShowProtocolDescription() | CCvsRootDlg | [private]
UpdateCvsRoot() | CCvsRootDlg | [private]
UpdateKeywords(const CvsProtocolList &protocolList) | CCvsRootDlg | [private]
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:51:49 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoEncodingColumn Member List

This is the complete list of members for KoEncodingColumn, including all inherited members.

Compare(const KoColumnContext *context, const EntnodeData *d1, const EntnodeData *d2) const | KoEncodingColumn | [inline, virtual]
GetColumnIndex() const | KoEncodingColumn | [inline, virtual]
GetSetupData(LV_COLUMN *lvc) const | KoEncodingColumn | [inline, virtual]
GetText(const KoColumnContext *context, const EntnodeData *data, char *buffer, const int bufferSize) const | KoEncodingColumn | [inline, virtual]
IsDefaultAscending() const | KiColumn | [inline, virtual]

Generated on Sat Aug 7 22:54:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CLogMain Member List

This is the complete list of members for CLogMain, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CLogMain(bool supress) | CLogMain |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CLogMain | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CLogMain |
InitHelpID() | CLogMain | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_defBranch | CLogMain |
m_headerDesc | CLogMain |
m_headerDescCheck | CLogMain |
m_headerOnly | CLogMain |
m_headerOnlyCheck | CLogMain |
m_noRecurs | CLogMain |
m_noTags | CLogMain |
m_onlyRCS | CLogMain |
m_supress | CLogMain |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHeaders() | CLogMain | [protected]
OnHeadersdesc() | CLogMain | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CLogMain() | CLogMain |

Generated on Sat Aug 7 22:54:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CEditorMonDlg Member List

This is the complete list of members for CEditorMonDlg, including all inherited members.

CEditorMonDlg(CWnd *pParent=NULL) | CEditorMonDlg |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CEditorMonDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CEditorMonDlg |
InitHelpID() | CEditorMonDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_hProcess | CEditorMonDlg |
m_tempFile | CEditorMonDlg |
m_timer | CEditorMonDlg | [private]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDestroy() | CEditorMonDlg | [protected]
OnHelp() | CEditorMonDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CEditorMonDlg | [protected, virtual]
OnTimer(UINT nIDEvent) | CEditorMonDlg | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMDIFrameWnd Member List

This is the complete list of members for CCJMDIFrameWnd, including all inherited members.

brdrAllRaised enum value | CCJMDIFrameWnd | [protected]
brdrFlatAll enum value | CCJMDIFrameWnd | [protected]
brdrFlatBottom enum value | CCJMDIFrameWnd | [protected]
brdrFlatHorizontal enum value | CCJMDIFrameWnd | [protected]
brdrFlatLeft enum value | CCJMDIFrameWnd | [protected]
brdrFlatRight enum value | CCJMDIFrameWnd | [protected]
brdrFlatTop enum value | CCJMDIFrameWnd | [protected]
brdrFlatVertical enum value | CCJMDIFrameWnd | [protected]
CCJMDIFrameWnd() | CCJMDIFrameWnd |
DockControlBarLeftOf(CControlBar *Bar, CControlBar *LeftOf) | CCJMDIFrameWnd | [virtual]
DockFlatBorders enum name | CCJMDIFrameWnd | [protected]
DockSizeBar(CControlBar *pBar, CCJSizeDockBar *pDockBar=NULL, LPRECT lpRect=NULL) | CCJMDIFrameWnd | [virtual]
dwDockBarMap | CCJMDIFrameWnd | [protected, static]
EnableDocking(DWORD dwDockStyle) | CCJMDIFrameWnd | [virtual]
EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags=brdrAllRaised) | CCJMDIFrameWnd | [virtual]
InitializeMenu(CMultiDocTemplate *pDocTemplate, UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0, UINT nDefaultMenuID=NULL) | CCJMDIFrameWnd | [virtual]
InitializeMenu(CMultiDocTemplate *pDocTemplate, UINT nMenuID, UINT nToolbarID=NULL, UINT nDefaultMenuID=NULL) | CCJMDIFrameWnd | [virtual]
InitializeMenu(HMENU *phMenu, UINT nMenuID, UINT nToolbarID=NULL) | CCJMDIFrameWnd | [virtual]
InitializeMenu(HMENU *phMenu, UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=NULL) | CCJMDIFrameWnd | [virtual]
LoadBarState(LPCTSTR lpszProfileName) | CCJMDIFrameWnd | [virtual]
m_menuList | CCJMDIFrameWnd | [protected]
m_wndMenuBar | CCJMDIFrameWnd | [protected]
NewMenu(UINT nMenuID, UINT *nToolbarIDs=NULL, int nSize=0) | CCJMDIFrameWnd | [protected, virtual]
NewMenu(UINT nMenuID, UINT nToolbarID=NULL) | CCJMDIFrameWnd | [protected, virtual]
OnClose() | CCJMDIFrameWnd | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJMDIFrameWnd | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJMDIFrameWnd | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJMDIFrameWnd | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CCJMDIFrameWnd | [protected, virtual]
PreCreateWindow(CREATESTRUCT &cs, UINT nIconID) | CCJMDIFrameWnd | [protected, virtual]
RecalcAllExcept(CCJSizeDockBar *pBar) | CCJMDIFrameWnd | [virtual]
RecalcLayout(BOOL bNotify=TRUE) | CCJMDIFrameWnd | [virtual]
SaveBarState(LPCTSTR lpszProfileName) const | CCJMDIFrameWnd | [virtual]
~CCJMDIFrameWnd() | CCJMDIFrameWnd | [virtual]

Generated on Sat Aug 7 22:49:37 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TemplateDlg.cpp Source File

common/TemplateDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2003
00019  */
00020
00021 /*
00022  * TemplateDlg.cpp : CVS Template entry
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "wincvs_winutil.h"
00030 #endif /* WIN32 */
00031
00032 #include "TemplateDlg.h"
00033 #include "MultiFiles.h"
00034 #include "CvsAlert.h"
00035
00036 #ifdef WIN32
00037 #ifdef _DEBUG
00038 #define new DEBUG_NEW
00039 #undef THIS_FILE
00040 static char THIS_FILE[] = __FILE__;
00041 #endif
00042
00043
00045 // CTemplateDlg dialog
00046
00047
00048 CTemplateDlg::CTemplateDlg(const MultiFiles* mf, CWnd* pParent /*=NULL*/)
00049     : m_mf(mf), CHHelpDialog(CTemplateDlg::IDD, pParent)
00050 {
00051     //{{AFX_DATA_INIT(CTemplateDlg)
00052     //}}AFX_DATA_INIT
00053 }
00054
00055
00056 void CTemplateDlg::DoDataExchange(CDataExchange* pDX)
00057 {
00058     CHHelpDialog::DoDataExchange(pDX);
00059     //{{AFX_DATA_MAP(CTemplateDlg)
00060     DDX_Control(pDX, IDOK, m_okButton);
00061     DDX_Control(pDX, IDC_TEMPLATE_PREVIEW, m_previewEdit);
00062     DDX_Control(pDX, IDC_TEMPLATE_LIST, m_templateList);
00063     //}}AFX_DATA_MAP
00064 }
00065
00066
00067 BEGIN_MESSAGE_MAP(CTemplateDlg, CHHelpDialog)
00068     //{{AFX_MSG_MAP(CTemplateDlg)
00069     ON_NOTIFY(NM_DBLCLK, IDC_TEMPLATE_LIST, OnDblclkTemplateList)
00070     ON_NOTIFY(LVN_ITEMCHANGED, IDC_TEMPLATE_LIST, OnItemchangedTemplateList)
00071     ON_BN_CLICKED(IDHELP, OnHelp)
00072     //}}AFX_MSG_MAP
00073 END_MESSAGE_MAP()
00074
00076 // CTemplateDlg message handlers
00077
00079 BOOL CTemplateDlg::OnInitDialog()
00080 {
00081     CHHelpDialog::OnInitDialog();
00082
00083     // Extra initialization
00084     // Setup template list control
00085     {
00086         SetListCtrlExtendedStyle(&m_templateList, LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
00087
00088
00089         CRect rect;
00090         m_templateList.GetClientRect(rect);
00091
00092         const int listCtrlWidth = rect.Width();
00093         const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
00094
00095         // Insert columns
00096         m_templateList.InsertColumn(0, "Folder", LVCFMT_LEFT, 250);
00097         m_templateList.InsertColumn(1, "Full Path", LVCFMT_LEFT, listCtrlWidthNoScroll - m_templateList.GetColumnWidth(0));
00098     }
00099
00100     if( m_mf )
00101     {
00102         for(int nIndex = 0; nIndex < m_mf->NumDirs(); nIndex++)
00103         {
00104             CStr dir;
00105             if( m_mf->getdir(nIndex, dir) )
00106             {
00107                 CStr path = dir;
00108                 if( !path.endsWith(kPathDelimiter) )
00109                     path << kPathDelimiter;
00110
00111                 path << "CVS";
00112                 path << kPathDelimiter;
00113                 path << "Template";
00114
00115                 FILE* templateFile = fopen(path, "r");
00116                 if( templateFile )
00117                 {
00118                     fclose(templateFile);
00119
00120                     const int item = m_templateList.InsertItem(m_templateList.GetItemCount(), dir.c_str());
00121                     if( item > -1 )
00122                     {
00123                         m_templateList.SetItemText(item, 1, path.c_str());
00124                     }
00125                 }
00126             }
00127         }
00128     }
00129
00130     // Select the first template on the list
00131     if( m_templateList.GetItemCount() )
00132     {
00133         m_templateList.SetItemState(0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
00134
00135         // If there is only one consider it as a chosen one
00136         if( m_templateList.GetItemCount() == 1 )
00137         {
00138             OnOK();
00139         }
00140     }
00141     else
00142     {
00143         CvsAlert(kCvsAlertStopIcon,
00144             "Template file not found.", "You need to setup Template using rcsinfo file. Please refer to CVS documentation for more details.",
00145             BUTTONTITLE_OK, NULL).ShowAlert();
00146
00147         OnCancel();
00148     }
00149
00150     return TRUE;  // return TRUE unless you set the focus to a control
00151                   // EXCEPTION: OCX Property Pages should return FALSE
00152 }
00153
00154 void CTemplateDlg::InitHelpID()
00155 {
00156     SetCtrlHelpID(IDC_TEMPLATE_LIST,    IDH_IDC_TEMPLATE_LIST);
00157     SetCtrlHelpID(IDC_TEMPLATE_PREVIEW, IDH_IDC_TEMPLATE_PREVIEW);
00158 }
00159
00161 void CTemplateDlg::OnOK()
00162 {
00163     if( m_templateList.GetSelectedCount() > 0 )
00164     {
00165         if( ReadSelectedTemplate(m_templateText) )
00166         {
00167             CHHelpDialog::OnOK();
00168         }
00169     }
00170     else
00171     {
00172         CvsAlert(kCvsAlertStopIcon,
00173             "No selection.", "Select the Template file from the list.",
00174             BUTTONTITLE_OK, NULL).ShowAlert();
00175     }
00176 }
00177
00183 bool CTemplateDlg::ReadSelectedTemplate(CStr& templateText)
00184 {
00185     bool res = false;
00186
00187     // Get the currently selected item
00188     POSITION pos = m_templateList.GetFirstSelectedItemPosition();
00189     if( pos )
00190     {
00191         const int item = m_templateList.GetNextSelectedItem(pos);
00192         const CString templateFile = m_templateList.GetItemText(item, 1);
00193
00194         // Copy the file into message string
00195         FILE* stream = fopen(templateFile, "r");
00196         if( stream )
00197         {
00198             char line[100];
00199             while( fgets(line, 100, stream) )
00200             {
00201                 templateText << line;
00202             }
00203
00204             fclose(stream);
00205
00206             res = true;
00207         }
00208         else
00209         {
00210             CvsAlert(kCvsAlertStopIcon,
00211                 "Can't open Template file.", "File " + templateFile + " may not exist or it may be in use by other application.",
00212                 BUTTONTITLE_OK, NULL).ShowAlert();
00213         }
00214     }
00215
00216     return res;
00217 }
00218
00223 const char* CTemplateDlg::GetTemplateText() const
00224 {
00225     return m_templateText.c_str();
00226 }
00227
00229 void CTemplateDlg::OnItemchangedTemplateList(NMHDR* pNMHDR, LRESULT* pResult)
00230 {
00231     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00232     if( pNMListView->iItem > -1 &&
00233         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
00234     {
00235         CStr templateText;
00236         if( ReadSelectedTemplate(templateText) )
00237         {
00238             CString itemText(templateText.c_str());
00239             itemText.Replace("\n", "\r\n");
00240
00241             m_previewEdit.SetWindowText(itemText);
00242         }
00243     }
00244
00245     if( !m_templateList.GetSelectedCount() )
00246     {
00247         m_previewEdit.SetWindowText("");
00248     }
00249
00250     m_okButton.EnableWindow(m_templateList.GetSelectedCount());
00251
00252     *pResult = 0;
00253 }
00254
00256 void CTemplateDlg::OnDblclkTemplateList(NMHDR* pNMHDR, LRESULT* pResult)
00257 {
00258     if( m_templateList.GetSelectedCount() )
00259     {
00260         OnOK();
00261     }
00262
00263     *pResult = 0;
00264 }
00265
00267 void CTemplateDlg::OnHelp()
00268 {
00269     ShowHelp();
00270 }
00271
00272 #endif /* WIN32 */
00273
00279 bool CompatGetCvsTemplate(const MultiFiles* mf, CStr& templateText)
00280 {
00281     bool userHitOK = false;
00282
00283 #ifdef WIN32
00284     CTemplateDlg templateDlg(mf);
00285
00286     if( templateDlg.DoModal() == IDOK )
00287     {
00288         templateText = templateDlg.GetTemplateText();
00289
00290         userHitOK = true;
00291     }
00292 #endif /* WIN32 */
00293
00294 #ifdef qMacCvsPP
00295 #endif /* qMacCvsPP */
00296
00297 #if qUnix
00298 #endif // qUnix
00299
00300     return userHitOK;
00301 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CRtag_OPTIONS Member List

This is the complete list of members for CRtag_OPTIONS, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CRtag_OPTIONS(const MultiFiles *mf, const kTagCmdType type, bool hasDate, bool hasRev, const char *sLastDate, const char *sLastRev, bool useMostRecent) | CRtag_OPTIONS |
CRtag_OPTIONS() | CRtag_OPTIONS |
DoDataExchange(CDataExchange *pDX) | CRtag_OPTIONS | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CRtag_OPTIONS |
InitHelpID() | CRtag_OPTIONS | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_browseTagButton | CRtag_OPTIONS |
m_date | CRtag_OPTIONS |
m_dateCombo | CRtag_OPTIONS |
m_grpBox | CRtag_OPTIONS |
m_hasDate | CRtag_OPTIONS |
m_hasDateCheck | CRtag_OPTIONS |
m_hasRev | CRtag_OPTIONS |
m_hasRevCheck | CRtag_OPTIONS |
m_mf | CRtag_OPTIONS | [private]
m_rev | CRtag_OPTIONS |
m_revCombo | CRtag_OPTIONS |
m_type | CRtag_OPTIONS | [private]
m_useMostRecent | CRtag_OPTIONS |
OnBrowseTag() | CRtag_OPTIONS | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnDate() | CRtag_OPTIONS | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CRtag_OPTIONS | [protected, virtual]
OnRev() | CRtag_OPTIONS | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CRtag_OPTIONS() | CRtag_OPTIONS |

Generated on Sat Aug 7 22:56:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJHtmlView.h Source File

WinCvs/CJLib/Include/CJHtmlView.h

Go to the documentation of this file.
00001 // CJHtmlView.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Iuri Apollonio's article 'Doc / View -
00007 // Using HtmlView apart from Tecno Preview' http://www.codeguru.com/doc_view/htmlview.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/Include/CJHtmlView.h $
00015  *
00016  * $History: CJHtmlView.h $
00017  *
00018  * *****************  Version 9  *****************
00019  * User: Kirk Stowell Date: 11/01/99   Time: 8:53p
00020  * Updated in $/CodeJock/Include
00021  *
00022  * *****************  Version 8  *****************
00023  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00024  * Updated in $/CodeJockey/Include
00025  * Updated copyright and contact information.
00026  *
00027  * *****************  Version 7  *****************
00028  * User: Kirk Stowell Date: 7/31/99    Time: 4:27p
00029  * Updated in $/CodeJockey/Include
00030  *
00031  * *****************  Version 5  *****************
00032  * User: Kirk Stowell Date: 7/25/99    Time: 1:29a
00033  * Updated in $/CodeJockey/Include
00034  *
00035  * *****************  Version 4  *****************
00036  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00037  * Updated in $/CodeJockey/Include
00038  *
00039  * *****************  Version 3  *****************
00040  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00041  * Updated in $/CodeJockey/Include
00042  *
00043  * *****************  Version 2  *****************
00044  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00045  * Updated in $/CodeJockey/Include
00046  * Cleaned up inline functions, and import/export macro so that class will
00047  * be imported when linked to, and exported at compile time.
00048  *
00049  * *****************  Version 1  *****************
00050  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00051  * Created in $/CodeJockey/Include
00052  * Copied from MFC v6 and techno preview for v5. Added to extend
00053  * functionality to Visual C++ 5.0 users.
00054  *
00055  ***************************************************************************/
00057
00058 #ifndef __CJHTMLVIEW_H__
00059 #define __CJHTMLVIEW_H__
00060
00061 #include <docobj.h>
00062 #include <shlobj.h>
00063 #include <exdisp.h>
00064 #include <afxconv.h>
00065
00066 #if _MSC_VER >= 1000
00067 #pragma once
00068 #endif // _MSC_VER >= 1000
00069
00070 // The CCJHtmlView class provides the functionality of the WebBrowser control
00071 // within the context of MFC's document/view architecture. The WebBrowser control
00072 // is a window in which the user can browse sites on the World Wide Web, as well
00073 // as folders in the local file system and on a network. The WebBrowser control
00074 // supports hyperlinking, Uniform Resource Locator (URL) navigation, and maintains
00075 // a history list.
00076 class _CJX_EXT_CLASS CCJHtmlView : public CFormView
00077 {
00078     DECLARE_DYNCREATE(CCJHtmlView)
00079     DECLARE_EVENTSINK_MAP()
00080
00081 protected: // create from serialization only
00082
00083     CCJHtmlView();
00084
00085     virtual ~CCJHtmlView();
00086
00087 // Attributes
00088 public:
00089
00090     CString GetType() const;
00091     long GetLeft() const;
00092     void SetLeft(long nNewValue);
00093     long GetTop() const;
00094     void SetTop(long nNewValue);
00095     long GetHeight() const;
00096     void SetHeight(long nNewValue);
00097     void SetVisible(BOOL bNewValue);
00098     BOOL GetVisible() const;
00099     CString GetLocationName() const;
00100     READYSTATE GetReadyState() const;
00101     BOOL GetOffline() const;
00102     void SetOffline(BOOL bNewValue);
00103     BOOL GetSilent() const;
00104     void SetSilent(BOOL bNewValue);
00105     BOOL GetTopLevelContainer() const;
00106     CString GetLocationURL() const;
00107     BOOL GetBusy() const;
00108     LPDISPATCH GetApplication() const;
00109     LPDISPATCH GetParentBrowser() const;
00110     LPDISPATCH GetContainer() const;
00111     LPDISPATCH GetHtmlDocument() const;
00112     CString GetFullName() const;
00113     int GetToolBar() const;
00114     void SetToolBar(int nNewValue);
00115     BOOL GetMenuBar() const;
00116     void SetMenuBar(BOOL bNewValue);
00117     BOOL GetFullScreen() const;
00118     void SetFullScreen(BOOL bNewValue);
00119     OLECMDF QueryStatusWB(OLECMDID cmdID) const;
00120     BOOL GetRegisterAsBrowser() const;
00121     void SetRegisterAsBrowser(BOOL bNewValue);
00122     BOOL GetRegisterAsDropTarget() const;
00123     void SetRegisterAsDropTarget(BOOL bNewValue);
00124     BOOL GetTheaterMode() const;
00125     void SetTheaterMode(BOOL bNewValue);
00126     BOOL GetAddressBar() const;
00127     void SetAddressBar(BOOL bNewValue);
00128     BOOL GetStatusBar() const;
00129     void SetStatusBar(BOOL bNewValue);
00130
00131 // Operations
00132 public:
00133
00134     void GoBack();
00135     void GoForward();
00136     void GoHome();
00137     void GoSearch();
00138     void Navigate(LPCTSTR URL, DWORD dwFlags = 0,
00139         LPCTSTR lpszTargetFrameName = NULL,
00140         LPCTSTR lpszHeaders = NULL, LPVOID lpvPostData = NULL,
00141         DWORD dwPostDataLen = 0);
00142     void Navigate2(LPITEMIDLIST pIDL, DWORD dwFlags = 0,
00143         LPCTSTR lpszTargetFrameName = NULL);
00144     void Navigate2(LPCTSTR lpszURL, DWORD dwFlags = 0,
00145         LPCTSTR lpszTargetFrameName = NULL, LPCTSTR lpszHeaders = NULL,
00146         LPVOID lpvPostData = NULL, DWORD dwPostDataLen = 0);
00147     void Navigate2(LPCTSTR lpszURL, DWORD dwFlags,
00148         CByteArray& baPostedData,
00149         LPCTSTR lpszTargetFrameName = NULL, LPCTSTR lpszHeader = NULL);
00150     void Refresh();
00151     void Refresh2(int nLevel);
00152     void Stop();
00153     void PutProperty(LPCTSTR lpszProperty, const VARIANT& vtValue);
00154     void PutProperty(LPCTSTR lpszPropertyName, double dValue);
00155     void PutProperty(LPCTSTR lpszPropertyName, LPCTSTR lpszValue);
00156     void PutProperty(LPCTSTR lpszPropertyName, long lValue);
00157     void PutProperty(LPCTSTR lpszPropertyName, short nValue);
00158     BOOL GetProperty(LPCTSTR lpszProperty, CString& strValue);
00159     COleVariant GetProperty(LPCTSTR lpszProperty);
00160     void ExecWB(OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, VARIANT* pvaIn,
00161         VARIANT* pvaOut);
00162     BOOL LoadFromResource(LPCTSTR lpszResource);
00163     BOOL LoadFromResource(UINT nRes);
00164
00165 // Overrides
00166 public:
00167
00168     // ClassWizard generated virtual function overrides
00169     //{{AFX_VIRTUAL(CCJHtmlView)
00170     public:
00171     virtual void OnDraw(CDC* pDC);
00172     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00173     virtual void OnNavigateComplete2(LPCTSTR strURL);
00174     virtual void OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel);
00175     virtual void OnStatusTextChange(LPCTSTR lpszText);
00176     virtual void OnProgressChange(long nProgress, long nProgressMax);
00177     virtual void OnCommandStateChange(long nCommand, BOOL bEnable);
00178     virtual void OnDownloadBegin();
00179     virtual void OnDownloadComplete();
00180     virtual void OnTitleChange(LPCTSTR lpszText);
00181     virtual void OnPropertyChange(LPCTSTR lpszProperty);
00182     virtual void OnNewWindow2(LPDISPATCH* ppDisp, BOOL* Cancel);
00183     virtual void OnDocumentComplete(LPCTSTR lpszURL);
00184     virtual void OnQuit();
00185     virtual void OnVisible(BOOL bVisible);
00186     virtual void OnToolBar(BOOL bToolBar);
00187     virtual void OnMenuBar(BOOL bMenuBar);
00188     virtual void OnStatusBar(BOOL bStatusBar);
00189     virtual void OnFullScreen(BOOL bFullScreen);
00190     virtual void OnTheaterMode(BOOL bTheaterMode);
00191     protected:
00192     virtual void NavigateComplete2(LPDISPATCH pDisp, VARIANT* URL);
00193     virtual void BeforeNavigate2(LPDISPATCH pDisp, VARIANT* URL, VARIANT* Flags, VARIANT* TargetFrameName, VARIANT* PostData, VARIANT* Headers,   BOOL* Cancel);
00194     virtual void DocumentComplete(LPDISPATCH pDisp, VARIANT* URL);
00195     //}}AFX_VIRTUAL
00196
00197 // Implementation
00198 public:
00199
00200     CWnd m_wndBrowser;
00201
00202 #ifdef _DEBUG
00203     virtual void AssertValid() const;
00204     virtual void Dump(CDumpContext& dc) const;
00205 #endif
00206
00207 protected:
00208
00209     IWebBrowser2* m_pBrowserApp;
00210
00211 // Generated message map functions
00212 protected:
00213     //{{AFX_MSG(CCJHtmlView)
00214     afx_msg void OnSize(UINT nType, int cx, int cy);
00215     afx_msg void OnPaint();
00216     afx_msg void OnDestroy();
00217     afx_msg void OnFilePrint();
00218     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00219     //}}AFX_MSG
00220     DECLARE_MESSAGE_MAP()
00221 };
00222
00224 // Inline functions
00226
00227 _CJXLIB_INLINE void CCJHtmlView::SetRegisterAsBrowser(BOOL bNewValue)
00228     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_RegisterAsBrowser((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00229
00230 _CJXLIB_INLINE void CCJHtmlView::SetRegisterAsDropTarget(BOOL bNewValue)
00231     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_RegisterAsDropTarget((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00232
00233 _CJXLIB_INLINE void CCJHtmlView::SetTheaterMode(BOOL bNewValue)
00234     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_TheaterMode((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00235
00236 _CJXLIB_INLINE void CCJHtmlView::SetVisible(BOOL bNewValue)
00237     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Visible((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00238
00239 _CJXLIB_INLINE void CCJHtmlView::SetMenuBar(BOOL bNewValue)
00240     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_MenuBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00241
00242 _CJXLIB_INLINE void CCJHtmlView::SetToolBar(int nNewValue)
00243     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_ToolBar(nNewValue); }
00244
00245 _CJXLIB_INLINE void CCJHtmlView::SetOffline(BOOL bNewValue)
00246     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Offline((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00247
00248 _CJXLIB_INLINE void CCJHtmlView::SetSilent(BOOL bNewValue)
00249     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Silent((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00250
00251 _CJXLIB_INLINE void CCJHtmlView::GoBack()
00252     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoBack(); }
00253
00254 _CJXLIB_INLINE void CCJHtmlView::GoForward()
00255     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoForward(); }
00256
00257 _CJXLIB_INLINE void CCJHtmlView::GoHome()
00258     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoHome(); }
00259
00260 _CJXLIB_INLINE void CCJHtmlView::GoSearch()
00261     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoSearch(); }
00262
00263 _CJXLIB_INLINE void CCJHtmlView::Refresh()
00264     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Refresh(); }
00265
00266 _CJXLIB_INLINE void CCJHtmlView::Refresh2(int nLevel)
00267     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Refresh2(COleVariant((long) nLevel, VT_I4)); }
00268
00269 _CJXLIB_INLINE void CCJHtmlView::Stop()
00270     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Stop(); }
00271
00272 _CJXLIB_INLINE void CCJHtmlView::SetFullScreen(BOOL bNewValue)
00273     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_FullScreen((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00274
00275 _CJXLIB_INLINE void CCJHtmlView::SetAddressBar(BOOL bNewValue)
00276     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_AddressBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00277
00278 _CJXLIB_INLINE void CCJHtmlView::SetHeight(long nNewValue)
00279     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Height(nNewValue); }
00280
00281 _CJXLIB_INLINE void CCJHtmlView::PutProperty(LPCTSTR lpszPropertyName, long lValue)
00282     { ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(lValue, VT_UI4)); }
00283
00284 _CJXLIB_INLINE void CCJHtmlView::PutProperty(LPCTSTR lpszPropertyName, short nValue)
00285     { ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(nValue, VT_UI2)); }
00286
00287 _CJXLIB_INLINE void CCJHtmlView::PutProperty(LPCTSTR lpszPropertyName, LPCTSTR lpszValue)
00288     { ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(lpszValue, VT_BSTR)); }
00289
00290 _CJXLIB_INLINE void CCJHtmlView::PutProperty(LPCTSTR lpszPropertyName, double dValue)
00291     { ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(dValue)); }
00292
00293 _CJXLIB_INLINE void CCJHtmlView::SetTop(long nNewValue)
00294     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Top(nNewValue); }
00295
00296 _CJXLIB_INLINE void CCJHtmlView::SetLeft(long nNewValue)
00297     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Left(nNewValue); }
00298
00299 _CJXLIB_INLINE void CCJHtmlView::SetStatusBar(BOOL bNewValue)
00300     { ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_StatusBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
00301
00303
00304 //{{AFX_INSERT_LOCATION}}
00305 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00306
00307 #endif // __CJHTMLVIEW_H__
00308
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/SortHeaderCtrl.h Source File

WinCvs/SortHeaderCtrl.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : V.Antonevich <v_antonevich@hotmail.com>
00019  */
00020
00021 #ifndef __SORTHEADERCTRL_H__
00022 #define __SORTHEADERCTRL_H__
00023
00024 #include "BrowseViewModel.h"
00025
00027 // CSortHeaderCtrl
00028
00030 class CSortHeaderCtrl : public CHeaderCtrl
00031 {
00032     DECLARE_DYNAMIC(CSortHeaderCtrl)
00033
00034 // Construction
00035 public:
00036     CSortHeaderCtrl();
00037
00038 // Attributes
00039 protected:
00040
00041 // Operations
00042 public:
00043
00044 // Overrides
00045     // ClassWizard generated virtual function overrides
00046     //{{AFX_VIRTUAL(CSortHeaderCtrl)
00047     public:
00048     protected:
00049     //}}AFX_VIRTUAL
00050
00051     afx_msg void OnCustomdraw(NMHDR* pNMHDR, LRESULT* pResult);
00052
00053 // Implementation
00054 public:
00055     virtual ~CSortHeaderCtrl();
00056
00057 // Generated message map functions
00058 protected:
00059     //{{AFX_MSG(CSortHeaderCtrl)
00060     afx_msg void OnKillFocus(CWnd* pNewWnd);
00061     afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
00062     //}}AFX_MSG
00063
00064     afx_msg void OnFilterChanged(NMHDR* pNMHDR, LRESULT* pResult);
00065     afx_msg void OnFilterBtnClicked(NMHDR* pNMHDR, LRESULT* pResult);
00066
00067     DECLARE_MESSAGE_MAP()
00068 private:
00069     // Data members
00070     int m_nSortCol;
00071     BOOL m_bSortAsc;
00072     BOOL m_bHeaderFilters;
00074     NotificationManager m_notificationManager;
00076     int m_nLastFilterChanged;
00077     CString m_strLastInsertedFilterText;
00079     // Methods
00080     void DrawItem(const UINT itemID, const RECT rcItem,
00081         const BOOL bSelected, const BOOL bSortCol, const BOOL bSortAsc,
00082         const HDC hDC);
00083
00084     void ResetLastFilter();
00085
00086 public:
00087     // Interface
00088     int SetSortImage(const int nCol, const BOOL bAsc);
00089
00090     BOOL EnableHeaderFilters(const BOOL enable = TRUE);
00091     NotificationManager* GetNotificationManager();
00092
00093     CString GetFilterText(const int intItem);
00094     BOOL SetFilterText(const int intItem, const char* text);
00095     void SetFilterChangeTimeout(const int nFilterChangeTimeout);
00096 };
00097
00098 #endif
00099 // __SORTHEADERCTRL_H__
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJToolBar.cpp Source File

WinCvs/CJLib/CJLibrary/CJToolBar.cpp

Go to the documentation of this file.
00001 // CJToolBar.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJToolBar.cpp $
00011  *
00012  * $History: CJToolBar.cpp $
00013  *
00014  * *****************  Version 18  *****************
00015  * User: Kirk Stowell Date: 10/30/99   Time: 1:56p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Removed Invalidate() calls from OnWindowPosChanging(...) to eliminate
00018  * screen flicker.
00019  *
00020  * *****************  Version 17  *****************
00021  * User: Kirk Stowell Date: 10/26/99   Time: 10:51p
00022  * Updated in $/CodeJock/CJLibrary
00023  * Added CCJFontCombo to the list of controls that can be inserted into a
00024  * CCJToolBar.
00025  *
00026  * *****************  Version 16  *****************
00027  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00028  * Updated in $/CodeJock/CJLibrary
00029  * Fixed potential resource and memory leak problems.
00030  *
00031  * *****************  Version 15  *****************
00032  * User: Kirk Stowell Date: 9/13/99    Time: 5:45a
00033  * Updated in $/CodeJockey/CJLibrary
00034  * Fixed initialization bug (small).
00035  *
00036  * *****************  Version 14  *****************
00037  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00038  * Updated in $/CodeJockey/CJLibrary
00039  * Updated copyright and contact information.
00040  *
00041  * *****************  Version 13  *****************
00042  * User: Kirk Stowell Date: 8/30/99    Time: 12:06a
00043  * Updated in $/CodeJockey/CJLibrary
00044  * Added support for CCJComboBoxEx control.
00045  *
00046  * *****************  Version 12  *****************
00047  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00048  * Updated in $/CodeJockey/CJLibrary
00049  * Added Unicode compliance, thanks to Barry Burton for his help with
00050  * this.
00051  *
00052  *
00053  * *****************  Version 10  *****************
00054  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00055  * Updated in $/CodeJockey/CJLibrary
00056  *
00057  * *****************  Version 6  *****************
00058  * User: Kirk Stowell Date: 7/18/99    Time: 10:20p
00059  * Updated in $/CodeJockey/CJLibrary
00060  * Re-wrote toolbar class for vc5 compatibility. Added customization based
00061  * on the "Customizable toolbar" article by Doug Keith -
00062  * http://www.codeguru.com/toolbar/customizable_tb.shtml.
00063  *
00064  * Cleaned up inline functions, and import/export macro so that class will
00065  * be imported when linked to, and exported at compile time.
00066  *
00067  * *****************  Version 5  *****************
00068  * User: Kirk Stowell Date: 4/03/99    Time: 11:44p
00069  * Updated in $/CodeJockey/CJ60Lib
00070  * Added comments and cleaned up code.
00071  *
00072  * *****************  Version 4  *****************
00073  * User: Kirk Stowell Date: 3/13/99    Time: 11:43p
00074  * Updated in $/CodeJockey/CJ60Lib
00075  * Changed class to handle both Office and DevStudio style to toolbars. To
00076  * use Office toolbars, use the CreateEx() method, otherwise your toolbars
00077  * will look like DevStudio.
00078  *
00079  * *****************  Version 3  *****************
00080  * User: Kirk Stowell Date: 12/14/98   Time: 11:42p
00081  * Updated in $/CodeJockey/CJ60Lib
00082  * Changed class to derive from Paul DiLascia's CToolBar, this class
00083  * adds gripper and control insertion.
00084  *
00085  * *****************  Version 2  *****************
00086  * User: Kirk Stowell Date: 11/02/98   Time: 11:41p
00087  * Updated in $/CodeJockey/CJ60Lib
00088  * Fixed bug with DrawNoGripper() method - (Christian Skovdal Andersen).
00089  *
00090  * *****************  Version 1  *****************
00091  * User: Kirk Stowell Date: 10/17/98   Time: 11:41p
00092  * Created in $/CodeJockey/CJ60Lib
00093  * Initial re-write and release.
00094  *
00095  ***************************************************************************/
00097
00098 #include "stdafx.h"
00099 #include "CJToolBar.h"
00100 #include "CJFlatComboBox.h"
00101 #include "CJComboBoxEx.h"
00102 #include "CJFontCombo.h"
00103 #include "CJMenu.h"        // CCJMenu class declaration
00104
00105 #ifdef _DEBUG
00106 #define new DEBUG_NEW
00107 #undef THIS_FILE
00108 static char THIS_FILE[] = __FILE__;
00109 #endif
00110
00111 #define IDC_CUSTOMIZE_BAR   0xFF
00112
00113 /*
00114 DIBs use RGBQUAD format:
00115 0xbb 0xgg 0xrr 0x00
00116
00117   Reasonably efficient code to convert a COLORREF into an
00118   RGBQUAD is byte-order-dependent, so we need different
00119   code depending on the byte order we're targeting.
00120 */
00121 #define _RGB_TO_RGBQUAD(r,g,b)   (RGB(b,g,r))
00122 #define _CLR_TO_RGBQUAD(clr)     (RGB(GetBValue(clr), GetGValue(clr), GetRValue(clr)))
00123
00124 struct CJX_COLORMAP
00125 {
00126     // use DWORD instead of RGBQUAD so we can compare two RGBQUADs easily
00127     DWORD rgbqFrom;
00128     int iSysColorTo;
00129 };
00130
00131 const CJX_COLORMAP _sysColorMap[] =
00132 {
00133     // mapping from color in DIB to system color
00134     { _RGB_TO_RGBQUAD(0x00, 0x00, 0x00),  COLOR_BTNTEXT },       // black
00135     { _RGB_TO_RGBQUAD(0x80, 0x80, 0x80),  COLOR_BTNSHADOW },     // dark gray
00136     { _RGB_TO_RGBQUAD(0xC0, 0xC0, 0xC0),  COLOR_BTNFACE },       // bright gray
00137     { _RGB_TO_RGBQUAD(0xFF, 0xFF, 0xFF),  COLOR_BTNHIGHLIGHT }   // white
00138 };
00139
00140 HBITMAP AFXAPI
00141 _LoadSysColorBitmap(HINSTANCE hInst, HRSRC hRsrc, BOOL bMono)
00142 {
00143     HGLOBAL hglb;
00144     if ((hglb = LoadResource(hInst, hRsrc)) == NULL)
00145         return NULL;
00146
00147     LPBITMAPINFOHEADER lpBitmap = (LPBITMAPINFOHEADER)LockResource(hglb);
00148     if (lpBitmap == NULL)
00149         return NULL;
00150
00151     // make copy of BITMAPINFOHEADER so we can modify the color table
00152     const int nColorTableSize = 16;
00153     UINT nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
00154     LPBITMAPINFOHEADER lpBitmapInfo = (LPBITMAPINFOHEADER)::malloc(nSize);
00155     if (lpBitmapInfo == NULL)
00156         return NULL;
00157     memcpy(lpBitmapInfo, lpBitmap, nSize);
00158
00159     // color table is in RGBQUAD DIB format
00160     DWORD* pColorTable =
00161         (DWORD*)(((LPBYTE)lpBitmapInfo) + (UINT)lpBitmapInfo->biSize);
00162
00163     for (int iColor = 0; iColor < nColorTableSize; iColor++)
00164     {
00165         // look for matching RGBQUAD color in original
00166         for (int i = 0; i < _countof(_sysColorMap); i++)
00167         {
00168             if (pColorTable[iColor] == _sysColorMap[i].rgbqFrom)
00169             {
00170                 if (bMono)
00171                 {
00172                     // all colors except text become white
00173                     if (_sysColorMap[i].iSysColorTo != COLOR_BTNTEXT)
00174                         pColorTable[iColor] = _RGB_TO_RGBQUAD(255, 255, 255);
00175                 }
00176                 else
00177                     pColorTable[iColor] =
00178                     _CLR_TO_RGBQUAD(::GetSysColor(_sysColorMap[i].iSysColorTo));
00179                 break;
00180             }
00181         }
00182     }
00183
00184     int nWidth = (int)lpBitmapInfo->biWidth;
00185     int nHeight = (int)lpBitmapInfo->biHeight;
00186     HDC hDCScreen = ::GetDC(NULL);
00187     HBITMAP hbm = ::CreateCompatibleBitmap(hDCScreen, nWidth, nHeight);
00188
00189     if (hbm != NULL)
00190     {
00191         HDC hDCGlyphs = ::CreateCompatibleDC(hDCScreen);
00192         HBITMAP hbmOld = (HBITMAP)::SelectObject(hDCGlyphs, hbm);
00193
00194         LPBYTE lpBits;
00195         lpBits = (LPBYTE)(lpBitmap + 1);
00196         lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD);
00197
00198         StretchDIBits(hDCGlyphs, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
00199             lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS, SRCCOPY);
00200         SelectObject(hDCGlyphs, hbmOld);
00201         ::DeleteDC(hDCGlyphs);
00202     }
00203     ::ReleaseDC(NULL, hDCScreen);
00204
00205     // free copy of bitmap info struct and resource itself
00206     ::free(lpBitmapInfo);
00207     ::FreeResource(hglb);
00208
00209     return hbm;
00210 }
00211
00212 #ifdef AFX_INIT_SEG
00213 #pragma code_seg(AFX_INIT_SEG)
00214 #endif
00215
00216 struct AFX_DLLVERSIONINFO
00217 {
00218     DWORD cbSize;
00219     DWORD dwMajorVersion;                   // Major version
00220     DWORD dwMinorVersion;                   // Minor version
00221     DWORD dwBuildNumber;                    // Build number
00222     DWORD dwPlatformID;                     // DLLVER_PLATFORM_*
00223 };
00224
00225 typedef HRESULT (CALLBACK* AFX_DLLGETVERSIONPROC)(AFX_DLLVERSIONINFO *);
00226
00227 int _ComCtlVersion = -1;
00228
00229 DWORD AFXAPI _GetComCtlVersion()
00230 {
00231     // return cached version if already determined...
00232     if (_ComCtlVersion != -1)
00233         return _ComCtlVersion;
00234
00235     // otherwise determine comctl32.dll version via DllGetVersion
00236     HINSTANCE hInst = ::GetModuleHandleA("COMCTL32.DLL");
00237     ASSERT(hInst != NULL);
00238     AFX_DLLGETVERSIONPROC pfn;
00239     pfn = (AFX_DLLGETVERSIONPROC)GetProcAddress(hInst, "DllGetVersion");
00240     DWORD dwVersion = VERSION_WIN4;
00241     if (pfn != NULL)
00242     {
00243         AFX_DLLVERSIONINFO dvi;
00244         memset(&dvi, 0, sizeof(dvi));
00245         dvi.cbSize = sizeof(dvi);
00246         HRESULT hr = (*pfn)(&dvi);
00247         if (SUCCEEDED(hr))
00248         {
00249             ASSERT(dvi.dwMajorVersion <= 0xFFFF);
00250             ASSERT(dvi.dwMinorVersion <= 0xFFFF);
00251             dwVersion = MAKELONG(dvi.dwMinorVersion, dvi.dwMajorVersion);
00252         }
00253     }
00254     _ComCtlVersion = dwVersion;
00255     return dwVersion;
00256 }
00257
00258 struct CJX_CONTROLPOS {
00259     int             nIndex;
00260     int             nID;
00261     CRect           rectOldPos;
00262 } ;
00263
00264 int _dropDownWidth = -1;
00265
00266 int AFXAPI _GetDropDownWidth()
00267 {
00268     // return cached version if already determined...
00269     if (_dropDownWidth != -1)
00270         return _dropDownWidth;
00271
00272     // otherwise calculate it...
00273     HDC hDC = GetDC(NULL);
00274     ASSERT(hDC != NULL);
00275     HFONT hFont;
00276     if ((hFont = ::CreateFont(GetSystemMetrics(SM_CYMENUCHECK), 0, 0, 0,
00277         FW_NORMAL, 0, 0, 0, SYMBOL_CHARSET, 0, 0, 0, 0, _T("Marlett"))) != NULL)
00278     {
00279         HFONT hOldFont = (HFONT)::SelectObject(hDC, hFont);
00280
00281         VERIFY(GetCharWidth(hDC, '6', '6', &_dropDownWidth));
00282
00283         // fix potential resource leak - KStowell - 10-21-99
00284         if (hFont != NULL) {
00285             ::SelectObject(hDC, hOldFont);
00286             ::DeleteObject(hFont);
00287         }
00288     }
00289
00290     ::ReleaseDC(NULL, hDC);
00291     ASSERT(_dropDownWidth != -1);
00292     return _dropDownWidth;
00293 }
00294
00296 // CCJToolBar
00297
00298 int CCJToolBar::m_nBarNumber = 0;
00299
00300 CCJToolBar::CCJToolBar()
00301 {
00302     m_bShowDropArrow = false;
00303     m_pControls      = NULL;
00304     m_pDropButtons   = NULL;        // list of drop-down buttons
00305     m_nButtons       = 0;
00306     m_pBarInfo       = NULL;
00307     m_hKeyRoot       = HKEY_CURRENT_USER;
00308
00309     // get a pointer to the application.
00310     CWinApp* pApp = AfxGetApp();
00311     ASSERT( pApp );
00312
00313     ++m_nBarNumber;
00314     m_strValueName.Format( _T("CJToolBar %d"), m_nBarNumber );
00315     m_strSubKey.Format( _T("Software\\%s\\%s\\Settings"),
00316         pApp->m_pszRegistryKey, pApp->m_pszProfileName );
00317
00318     // initialize state
00319     m_pStringMap = NULL;
00320     m_hRsrcImageWell = NULL;
00321     m_hInstImageWell = NULL;
00322     m_hbmImageWell = NULL;
00323     m_bDelayedButtonLayout = TRUE;
00324
00325     // default image sizes
00326     m_sizeImage.cx = 16;
00327     m_sizeImage.cy = 15;
00328
00329     // default button sizes
00330     m_sizeButton.cx = 23;
00331     m_sizeButton.cy = 22;
00332
00333     // top and bottom borders are 1 larger than default for ease of grabbing
00334     m_cyTopBorder = 3;
00335     m_cyBottomBorder = 3;
00336     m_bExStyle = false;
00337 }
00338
00339 CCJToolBar::~CCJToolBar()
00340 {
00341     AfxDeleteObject((HGDIOBJ*)&m_hbmImageWell);
00342     delete m_pStringMap;
00343
00344     m_nCount = 0;
00345
00346     while (m_pDropButtons)
00347     {
00348         DROPDOWNBUTTON* pnext = m_pDropButtons->next;
00349         delete m_pDropButtons;
00350         m_pDropButtons = pnext;
00351     }
00352
00353     if( m_pControls ) {
00354         for( POSITION pos = m_pControls->GetHeadPosition() ; pos ; ) {
00355             delete m_pControls->GetNext(pos);
00356         }
00357         delete m_pControls;
00358     }
00359 }
00360
00361 BOOL CCJToolBar::Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID)
00362 {
00363     return CreateEx(pParentWnd, NULL, dwStyle,
00364         CRect(m_cxLeftBorder, m_cyTopBorder, m_cxRightBorder, m_cyBottomBorder), nID);
00365 }
00366
00367 BOOL CCJToolBar::CreateEx(CWnd* pParentWnd, DWORD dwCtrlStyle, DWORD dwStyle, CRect rcBorders, UINT nID)
00368 {
00369     ASSERT_VALID(pParentWnd);   // must have a parent
00370     ASSERT (!((dwStyle & CBRS_SIZE_FIXED) && (dwStyle & CBRS_SIZE_DYNAMIC)));
00371
00372     // KStowell - bool for drawing office style gripper.
00373     if( dwCtrlStyle != NULL )
00374         m_bExStyle = true;
00375
00376     SetBorders(rcBorders);
00377
00378     // save the style
00379     m_dwStyle = (dwStyle & CBRS_ALL)|( dwStyle & CBRS_GRIPPER );
00380     if (nID == AFX_IDW_TOOLBAR)
00381         m_dwStyle |= CBRS_HIDE_INPLACE;
00382
00383     dwStyle &= ~CBRS_ALL;
00384     dwStyle |= CCS_NOPARENTALIGN|CCS_NOMOVEY|CCS_NODIVIDER|CCS_NORESIZE;
00385     dwStyle |= dwCtrlStyle;
00386
00387     // initialize common controls
00388
00389 #ifdef _VC_VERSION_5
00390
00391     INITCOMMONCONTROLSEX icex;
00392     icex.dwSize = sizeof(icex);
00393     icex.dwICC = ICC_BAR_CLASSES;
00394     VERIFY(InitCommonControlsEx(&icex));
00395
00396 #else
00397
00398     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_BAR_REG));
00399
00400 #endif
00401
00402     _GetComCtlVersion();
00403     ASSERT(_ComCtlVersion != -1);
00404     _GetDropDownWidth();
00405     ASSERT(_dropDownWidth != -1);
00406
00407     // create the HWND
00408     CRect rect; rect.SetRectEmpty();
00409     if (!CWnd::Create(TOOLBARCLASSNAME, NULL, dwStyle, rect, pParentWnd, nID))
00410         return FALSE;
00411
00412     // sync up the sizes
00413     SetSizes(m_sizeButton, m_sizeImage);
00414
00415     // Note: Parent must resize itself for control bar to be resized
00416
00417     return TRUE;
00418 }
00419
00420 BOOL CCJToolBar::PreCreateWindow(CREATESTRUCT& cs)
00421 {
00422     if( !CCJToolBarBase::PreCreateWindow(cs))
00423         return FALSE;
00424
00425     cs.style |= TBSTYLE_TRANSPARENT|TBSTYLE_FLAT;
00426
00427     return TRUE;
00428 }
00429
00431 // 1999 Kirk Stowell - Inserts a control into the toolbar at the given button id.
00432 //
00433 CWnd* CCJToolBar::InsertControl( CRuntimeClass* pClass, LPCTSTR lpszWindowName, CRect& rect, UINT nID, DWORD dwStyle )
00434 {
00435     CWnd *pCtrl = NULL;
00436
00437     if( pClass->IsDerivedFrom( RUNTIME_CLASS( CCJComboBoxEx ))) // CCJComboBoxEx control.
00438     {
00439         pCtrl = new CCJComboBoxEx;
00440
00441         ASSERT_VALID( pCtrl );
00442
00443         if(((CCJComboBoxEx*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00444         {
00445             delete pCtrl;
00446             return NULL;
00447         }
00448     }
00449     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CCJFlatComboBox )))  // CCJFlatComboBox control.
00450     {
00451         pCtrl = new CCJFlatComboBox;
00452
00453         ASSERT_VALID( pCtrl );
00454
00455         if(((CCJFlatComboBox*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00456         {
00457             delete pCtrl;
00458             return NULL;
00459         }
00460     }
00461     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CCJFontCombo ))) // CCJFontCombo control.
00462     {
00463         pCtrl = new CCJFontCombo;
00464
00465         ASSERT_VALID( pCtrl );
00466
00467         if(((CCJFontCombo*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00468         {
00469             delete pCtrl;
00470             return NULL;
00471         }
00472     }
00473     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CComboBox )))    // CComboBox control.
00474     {
00475         pCtrl = new CComboBox;
00476
00477         ASSERT_VALID( pCtrl );
00478
00479         if(((CComboBox*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00480         {
00481             delete pCtrl;
00482             return NULL;
00483         }
00484     }
00485     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CEdit )))        // CEdit control.
00486     {
00487         pCtrl = new CEdit;
00488
00489         ASSERT_VALID( pCtrl );
00490
00491         if(((CEdit*)pCtrl)->Create( WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00492         {
00493             delete pCtrl;
00494             return NULL;
00495         }
00496     }
00497     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CButton )))      // CButton control.
00498     {
00499         pCtrl = new CButton;
00500
00501         ASSERT_VALID( pCtrl );
00502
00503         if(((CButton*)pCtrl)->Create( lpszWindowName, WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00504         {
00505             delete pCtrl;
00506             return NULL;
00507         }
00508     }
00509     else if( pClass->IsDerivedFrom( RUNTIME_CLASS( CWnd )))         // CWnd object.
00510     {
00511         pCtrl = new CWnd;
00512
00513         ASSERT_VALID( pCtrl );
00514
00515 #ifdef _UNICODE
00516         TCHAR szClassName[ 256 ];
00517
00518         MultiByteToWideChar( CP_ACP,
00519                              MB_PRECOMPOSED,
00520                              pClass->m_lpszClassName,
00521                              -1,
00522                              szClassName,
00523                              255 );
00524
00525         if(((CWnd*)pCtrl)->Create( szClassName, lpszWindowName, WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00526         {
00527             delete pCtrl;
00528             return NULL;
00529         }
00530 #else
00531         if(((CWnd*)pCtrl)->Create( pClass->m_lpszClassName, lpszWindowName, WS_CHILD|WS_VISIBLE|dwStyle, rect, this, nID ) == FALSE )
00532         {
00533             delete pCtrl;
00534             return NULL;
00535         }
00536 #endif
00537     }
00538     else                                                            // An invalid object was passed in
00539     {
00540         ASSERT( FALSE );
00541         return NULL;
00542     }
00543
00544     // if our object list has not been allocated, do it now...
00545     if( m_pControls == NULL )
00546     {
00547         m_pControls = new CObList();
00548         ASSERT( m_pControls );
00549     }
00550
00551     // we have to remember this control, so we can delete it later
00552     m_pControls->AddTail( pCtrl );
00553
00554     return InsertControl( pCtrl, rect, nID );
00555 }
00556
00557 CWnd* CCJToolBar::InsertControl(CWnd* pCtrl, CRect & rect, UINT nID)
00558 {
00559     ASSERT_VALID( pCtrl );
00560
00561     // make sure the id is valid, and set the button
00562     // style for a seperator.
00563     ASSERT( CommandToIndex( nID ) >= 0 );
00564     SetButtonInfo( CommandToIndex( nID ), nID, TBBS_SEPARATOR, rect.Width());
00565
00566     // insert the control into the toolbar.
00567     GetItemRect( CommandToIndex(nID), &rect );
00568     pCtrl->SetWindowPos(0, rect.left, rect.top, 0, 0,
00569         SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOCOPYBITS );
00570     pCtrl->SetFont( GetFont( ));
00571     pCtrl->ShowWindow( SW_SHOW );
00572
00573     return pCtrl;
00574 }
00575
00577 // 1997 Microsoft Systems Journal - Written by Paul DiLascia.
00578 // call to add drop-down menus to toolbar buttons.
00579 //
00580 BOOL CCJToolBar::AddDropDownButton(UINT nIDButton, UINT nIDMenu, BOOL bArrow)
00581 {
00582     ASSERT_VALID(this);
00583
00584     DROPDOWNBUTTON* pb = FindDropDownButton(nIDButton);
00585     if (!pb) {
00586         pb = new DROPDOWNBUTTON;
00587         ASSERT(pb);
00588         pb->next = m_pDropButtons;
00589         m_pDropButtons = pb;
00590     }
00591     pb->idButton = nIDButton;
00592     pb->idMenu   = nIDMenu;
00593
00594     int iButton = CommandToIndex(nIDButton);
00595
00596     DWORD dwStyle = GetButtonStyle(iButton);
00597     dwStyle |= TBSTYLE_DROPDOWN;
00598     SetButtonStyle(iButton, dwStyle);
00599
00600     if (bArrow)
00601         SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS);
00602
00603     return TRUE;
00604 }
00605
00607 // 1997 Microsoft Systems Journal - Written by Paul DiLascia.
00608 // Find buttons structure for given ID
00609 //
00610 DROPDOWNBUTTON* CCJToolBar::FindDropDownButton(UINT nID)
00611 {
00612     for (DROPDOWNBUTTON* pb = m_pDropButtons; pb; pb = pb->next) {
00613         if (pb->idButton == nID)
00614             return pb;
00615     }
00616     return NULL;
00617 }
00618
00620 // 1997 Microsoft Systems Journal - Written by Paul DiLascia.
00621 // Message handler for TBN_DROPDOWN. Default is to display the
00622 // specified menu at the right place. You can override to generate dynamic menus
00623 //
00624 // Args:
00625 //      - NMTOOLBAR struct from TBN_DROPDOWN
00626 //      - command id of button
00627 //      - point to display menu at
00628 //
00629 void CCJToolBar::OnToolBarBtnDropDown(NMHDR* pNMHDR, LRESULT* pRes)
00630 {
00631     UNUSED_ALWAYS( pRes );
00632
00633     const NMTOOLBAR& nmtb = *(NMTOOLBAR*)pNMHDR;
00634
00635     // get location of button
00636     CRect rc;
00637     GetRect(nmtb.iItem, rc);
00638     ClientToScreen(&rc);
00639
00640     // call virtual function to display dropdown menu
00641     OnDropDownButton(nmtb, nmtb.iItem, rc);
00642 }
00643
00645 // 1997 Microsoft Systems Journal - Written by Paul DiLascia.
00646 // Virtual fn you can override to hand drop-down button
00647 // events with more friendly args
00648 //
00649 void CCJToolBar::OnDropDownButton(const NMTOOLBAR& nmtb, UINT nID, CRect rc)
00650 {
00651     UNUSED_ALWAYS( nID );
00652
00653     DROPDOWNBUTTON* pb = FindDropDownButton(nmtb.iItem);
00654     if (pb && pb->idMenu) {
00655
00656         // load and display popup menu
00657         CCJMenu menu;
00658         VERIFY(menu.LoadMenu(pb->idMenu));
00659         CCJMenu* pPopup = (CCJMenu*)menu.GetSubMenu(0);
00660         ASSERT(pPopup);
00661         pPopup->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,
00662             rc.left, rc.bottom, GetParentFrame(), &rc);
00663     }
00664 }
00665
00667 // 1997 Microsoft Systems Journal - Written by Paul DiLascia.
00668 // Now toolbar has really moved: repaint area beneath old position
00669 //
00670 void CCJToolBar::OnWindowPosChanged(WINDOWPOS* lpwndpos)
00671 {
00672     CCJToolBarBase::OnWindowPosChanged(lpwndpos);
00673     if (!(lpwndpos->flags & SWP_NOMOVE)) {   // if moved:
00674         InvalidateOldPos(m_rcOldPos);        // invalidate area of old position
00675
00676         // Now paint my non-client area at the new location.
00677         // Without this, you will still have a partial display bug (try it!)
00678         SendMessage(WM_NCPAINT);
00679     }
00680 }
00681
00683 // 1997 Microsoft Systems Journal - Written by Paul DiLascia.
00684 // Invalidate toolbar rectangle. Because flat toolbars are transparent,
00685 // this requires invalidating parent and all siblings that intersect the
00686 // rectangle.
00687 //
00688 void CCJToolBar::InvalidateOldPos(const CRect& rcInvalid)
00689 {
00690     // make parent paint the area beneath rectangle
00691     CWnd* pParent = GetParent();        // parent (dock bar/frame) window
00692     ASSERT_VALID(pParent);              // check
00693     CRect rc( rcInvalid );              // copy rectangle
00694     pParent->ScreenToClient(&rc);       // convert to parent client coords
00695     pParent->InvalidateRect(&rc);       // invalidate
00696
00697     // now do same for each sibling too
00698     for (CWnd* pSib = pParent->GetWindow(GW_CHILD);
00699           pSib;
00700           pSib=pSib->GetNextWindow(GW_HWNDNEXT)) {
00701
00702         CRect rc;                                       // window rect of sibling
00703         pSib->GetWindowRect(&rc);                   // ...
00704         if (rc.IntersectRect(rc, rcInvalid)) {  // if intersects invalid rect
00705             pSib->ScreenToClient(&rc);              // convert to sibling coords
00706             pSib->InvalidateRect(&rc);              // invalidate
00707             pSib->SendMessage(WM_NCPAINT);      // nonclient area too!
00708         }
00709     }
00710 }
00711
00713 // 1997 Microsoft Systems Journal - Written by Paul DiLascia.
00714 // This is the all-important function that gets the true size of a button,
00715 // instead of using m_sizeButton. And it's virtual, so you can override if
00716 // my algorithm doesn't work, as will surely be the case in some circumstances.
00717 //
00718 CSize CCJToolBar::GetButtonSize(TBBUTTON* pData, int iButton)
00719 {
00720     ASSERT(_ComCtlVersion > 0);
00721
00722     // Get the actual size of the button, not what's in m_sizeButton.
00723     // Make sure to do SendMessage instead of calling MFC's GetItemRect,
00724     // which has all sorts of bad side-effects! (Go ahead, take a look at it.)
00725     //
00726     CRect rc;
00727     SendMessage(TB_GETITEMRECT, iButton, (LPARAM)&rc);
00728     CSize sz = rc.Size();
00729
00731     // Now must do special case for various versions of comctl32.dll,
00732     //
00733     DWORD dwStyle = pData[iButton].fsStyle;
00734     if ((pData[iButton].fsState & TBSTATE_WRAP)) {
00735         if (dwStyle & TBSTYLE_SEP) {
00736             // this is the last separator in the row (eg vertically docked)
00737             // fudge the height, and ignore the width. TB_GETITEMRECT will return
00738             // size = (8 x 22) even for a separator in vertical toolbar
00739             //
00740             if (_ComCtlVersion <= VERSION_IE3)
00741                 sz.cy -= 3;     // empircally good fudge factor
00742             else if (_ComCtlVersion != VERSION_IE4)
00743                 sz.cy = sz.cx;
00744             sz.cx = 0;          // separator takes no width if it's the last one
00745
00746         } else if (dwStyle & TBSTYLE_DROPDOWN && ( m_bShowDropArrow == false )) {
00747             // ignore width of dropdown
00748             sz.cx = 0;
00749         }
00750     }
00751     return sz;
00752 }
00753
00754 // This function saves the state (visible buttons, toolbar position, etc.)
00755 // of the toolbar, using the registry key provided to the Create(...) function.
00756 void CCJToolBar::SaveState()
00757 {
00758     // if there is an associated registry subkey
00759     if (m_strSubKey.GetLength())
00760     {
00761         // save the toolbar state to the registry
00762         GetToolBarCtrl().SaveState( m_hKeyRoot, m_strSubKey, m_strValueName );
00763     }
00764 }
00765
00766 // This function restores the state (visible buttons, toolbar position, etc.)
00767 // of the toolbar, using the registry key provided to the Create(...) function.
00768 void CCJToolBar::RestoreState()
00769 {
00770     // if there is an associated registry subkey
00771     if (m_strSubKey.GetLength())
00772     {
00773         // restore the toolbar state from the registry
00774         GetToolBarCtrl().RestoreState( m_hKeyRoot, m_strSubKey, m_strValueName );
00775     }
00776 }
00777
00778 // This function is called when the user begins dragging a toolbar
00779 // button or when the customization dialog is being populated with
00780 // toolbar information.  Basically, *pResult should be populated with
00781 // your answer to the question, "is the user allowed to delete this
00782 // button?".
00783 void CCJToolBar::OnToolBarQueryDelete(NMHDR *pNMHDR, LRESULT *pResult)
00784 {
00785     UNUSED_ALWAYS( pNMHDR );
00786
00787     // if we're not floating - user can delete anything
00788     *pResult = !IsFloating();
00789 }
00790
00791 // This function is called when the user begins dragging a toolbar
00792 // button or when the customization dialog is being populated with
00793 // toolbar information.  Basically, *pResult should be populated with
00794 // your answer to the question, "is the user allowed to insert a
00795 // button to the left of this one?".
00796 void CCJToolBar::OnToolBarQueryInsert(NMHDR *pNMHDR, LRESULT *pResult)
00797 {
00798     UNUSED_ALWAYS( pNMHDR );
00799
00800     // if we're not floating - user can insert anywhere
00801     *pResult = !IsFloating();
00802 }
00803
00804 // This function is called whenever the user makes a change to the
00805 // layout of the toolbar.  Calling the mainframe's RecalcLayout forces
00806 // the toolbar to repaint itself.
00807 void CCJToolBar::OnToolBarChange(NMHDR *pNMHDR, LRESULT *pResult)
00808 {
00809     UNUSED_ALWAYS( pNMHDR );
00810     UNUSED_ALWAYS( pResult );
00811
00812     // force the frame window to recalculate the size
00813     GetParentFrame()->RecalcLayout();
00814 }
00815
00816 // This function is called when the user begins dragging a toolbar button.
00817 void CCJToolBar::OnToolBarBeginDrag(NMHDR *pNMHDR, LRESULT *pResult)
00818 {
00819     UNUSED_ALWAYS( pNMHDR );
00820     UNUSED_ALWAYS( pResult );
00821 }
00822
00823 // This function is called when the user has completed a dragging operation.
00824 void CCJToolBar::OnToolBarEndDrag(NMHDR *pNMHDR, LRESULT *pResult)
00825 {
00826     UNUSED_ALWAYS( pNMHDR );
00827     UNUSED_ALWAYS( pResult );
00828 }
00829
00830 // This function is called when the user initially calls up the toolbar
00831 // customization dialog box.
00832 void CCJToolBar::OnToolBarBeginAdjust(NMHDR *pNMHDR, LRESULT *pResult)
00833 {
00834     UNUSED_ALWAYS( pNMHDR );
00835     UNUSED_ALWAYS( pResult );
00836 }
00837
00838 // This function is called when the user clicks on the help button on the
00839 // toolbar customization dialog box.
00840 void CCJToolBar::OnToolBarCustomHelp(NMHDR *pNMHDR, LRESULT *pResult)
00841 {
00842     UNUSED_ALWAYS( pNMHDR );
00843     UNUSED_ALWAYS( pResult );
00844 }
00845
00846 // This function is called when the user dismisses the toolbar customization
00847 // dialog box.
00848 void CCJToolBar::OnToolBarEndAdjust(NMHDR *pNMHDR, LRESULT *pResult)
00849 {
00850     UNUSED_ALWAYS( pNMHDR );
00851     UNUSED_ALWAYS( pResult );
00852
00853     // save the state of the toolbar for reinitialization
00854     SaveState();
00855 }
00856
00857 // This function is called to populate the toolbar customization dialog box
00858 // with information regarding all of the possible toolbar buttons.
00859 void CCJToolBar::OnToolBarGetButtonInfo(NMHDR *pNMHDR, LRESULT *pResult)
00860 {
00861     UNUSED_ALWAYS( pResult );
00862
00863     TBNOTIFY* tbStruct;     // data needed by customize dialog box
00864
00865     // init the pointer
00866     tbStruct = (TBNOTIFY *)pNMHDR;
00867
00868     // if the index is valid
00869     if (0 <= tbStruct->iItem && tbStruct->iItem < m_nButtons)
00870     {
00871         // copy the stored button structure
00872         tbStruct->tbButton = m_pBarInfo[tbStruct->iItem].tbButton;
00873
00874         // copy the text for the button label in the dialog
00875         _tcscpy( tbStruct->pszText, m_pBarInfo[tbStruct->iItem].btnText );
00876
00877         // indicate valid data was sent
00878         *pResult = TRUE;
00879     }
00880
00881     // else there is no button for this index
00882     else
00883     {
00884         *pResult = FALSE;
00885     }
00886 }
00887
00888 // This function is called when the user clicks on the reset button on the
00889 // toolbar customization dialog box.
00890 void CCJToolBar::OnToolBarReset(NMHDR *pNMHDR, LRESULT *pResult)
00891 {
00892     UNUSED_ALWAYS( pNMHDR );
00893     UNUSED_ALWAYS( pResult );
00894
00895     // restore the toolbar to the way it was before entering customization
00896     RestoreState();
00897 }
00898
00899 void CCJToolBar::OnDestroy()
00900 {
00901     // save the current state of the toolbar
00902     SaveState();
00903
00904     CCJToolBarBase::OnDestroy();
00905 }
00906
00907 void CCJToolBar::OnRButtonDown(UINT nFlags, CPoint point)
00908 {
00909     if( m_pBarInfo )
00910     {
00911         CPoint pt( point );
00912         ClientToScreen( &pt );
00913
00914         // load and display popup menu
00915         CCJMenu popupMenu;
00916         VERIFY(popupMenu.CreatePopupMenu( ));
00917         popupMenu.InsertMenu(0, MF_BYPOSITION, IDC_CUSTOMIZE_BAR, _T("&Customize..."));
00918         int nResult = popupMenu.TrackPopupMenu(
00919             TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL|TPM_RETURNCMD,
00920             pt.x, pt.y, this );
00921
00922         if( nResult == IDC_CUSTOMIZE_BAR )
00923         {
00924             // open the customization dialog.
00925             GetToolBarCtrl().Customize();
00926         }
00927     }
00928
00929     else {
00930         CCJToolBarBase::OnRButtonDown(nFlags, point);
00931     }
00932 }
00933
00935 // The remainder of this class is mostly copied straight from MFC ( vc6 ),
00936 // except for the modifications which are commented...
00938
00940 // CCJToolBar
00941
00942 BOOL CCJToolBar::OnNcCreate(LPCREATESTRUCT lpCreateStruct)
00943 {
00944     // If the toolbar is inside a ReBar, we need to make the parent frame
00945     // the owner so it will get notifications.
00946     CWnd* pParent = GetParent();
00947     ASSERT(pParent);
00948     TCHAR classname[64];
00949     GetClassName(pParent->m_hWnd, classname, _countof(classname));
00950     if (_tcscmp(classname, REBARCLASSNAME)==0)
00951     {
00952         CFrameWnd* pFrame = GetParentFrame();
00953         ASSERT_VALID(pFrame);
00954         SetOwner(pFrame);
00955         m_bInReBar = true;
00956         m_bExStyle = false;
00957     }
00958
00959     if (!CCJToolBarBase::OnNcCreate(lpCreateStruct))
00960         return FALSE;
00961
00962     // if the owner was set before the toolbar was created, set it now
00963     if (m_hWndOwner != NULL)
00964         DefWindowProc(TB_SETPARENT, (WPARAM)m_hWndOwner, 0);
00965
00966     DefWindowProc(TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);
00967     return TRUE;
00968 }
00969
00970 void CCJToolBar::SetOwner(CWnd* pOwnerWnd)
00971 {
00972     ASSERT_VALID(this);
00973     if (m_hWnd != NULL)
00974     {
00975         ASSERT(::IsWindow(m_hWnd));
00976         DefWindowProc(TB_SETPARENT, (WPARAM)pOwnerWnd->GetSafeHwnd(), 0);
00977     }
00978     CCJToolBarBase::SetOwner(pOwnerWnd);
00979 }
00980
00981 void CCJToolBar::SetSizes(SIZE sizeButton, SIZE sizeImage)
00982 {
00983     ASSERT_VALID(this);
00984
00985     // sizes must be non-zero and positive
00986     ASSERT(sizeButton.cx > 0 && sizeButton.cy > 0);
00987     ASSERT(sizeImage.cx > 0 && sizeImage.cy > 0);
00988
00989     // button must be big enough to hold image
00990     //   + 7 pixels on x
00991     //   + 6 pixels on y
00992     ASSERT(sizeButton.cx >= sizeImage.cx + 7);
00993     ASSERT(sizeButton.cy >= sizeImage.cy + 6);
00994
00995     if (::IsWindow(m_hWnd))
00996     {
00997         // set the sizes via TB_SETBITMAPSIZE and TB_SETBUTTONSIZE
00998         VERIFY(SendMessage(TB_SETBITMAPSIZE, 0, MAKELONG(sizeImage.cx, sizeImage.cy)));
00999         VERIFY(SendMessage(TB_SETBUTTONSIZE, 0, MAKELONG(sizeButton.cx, sizeButton.cy)));
01000
01001         Invalidate();   // just to be nice if called when toolbar is visible
01002     }
01003     else
01004     {
01005         // just set our internal values for later
01006         m_sizeButton = sizeButton;
01007         m_sizeImage = sizeImage;
01008     }
01009 }
01010
01011 void CCJToolBar::SetHeight(int cyHeight)
01012 {
01013     ASSERT_VALID(this);
01014
01015     int nHeight = cyHeight;
01016     if (m_dwStyle & CBRS_BORDER_TOP)
01017         cyHeight -= afxData.cyBorder2;
01018     if (m_dwStyle & CBRS_BORDER_BOTTOM)
01019         cyHeight -= afxData.cyBorder2;
01020     m_cyBottomBorder = (cyHeight - m_sizeButton.cy) / 2;
01021     // if there is an extra pixel, m_cyTopBorder will get it
01022     m_cyTopBorder = cyHeight - m_sizeButton.cy - m_cyBottomBorder;
01023     if (m_cyTopBorder < 0)
01024     {
01025         TRACE1("Warning: CCJToolBar::SetHeight(%d) is smaller than button.\n",
01026             nHeight);
01027         m_cyBottomBorder += m_cyTopBorder;
01028         m_cyTopBorder = 0;  // will clip at bottom
01029     }
01030
01031     // recalculate the non-client region
01032     SetWindowPos(NULL, 0, 0, 0, 0,
01033         SWP_DRAWFRAME|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER);
01034     Invalidate();   // just to be nice if called when toolbar is visible
01035 }
01036
01037 struct CToolBarData
01038 {
01039     WORD wVersion;
01040     WORD wWidth;
01041     WORD wHeight;
01042     WORD wItemCount;
01043     //WORD aItems[wItemCount]
01044
01045     WORD* items()
01046         { return (WORD*)(this+1); }
01047 };
01048
01049 BOOL CCJToolBar::LoadToolBar(LPCTSTR lpszResourceName, TOOLBARINFO* pBarInfo)
01050 {
01051     ASSERT_VALID(this);
01052     ASSERT(lpszResourceName != NULL);
01053
01054     // determine location of the bitmap in resource fork
01055     HINSTANCE hInst = AfxFindResourceHandle(lpszResourceName, RT_TOOLBAR);
01056     HRSRC hRsrc = ::FindResource(hInst, lpszResourceName, RT_TOOLBAR);
01057     if (hRsrc == NULL)
01058         return FALSE;
01059
01060     HGLOBAL hGlobal = LoadResource(hInst, hRsrc);
01061     if (hGlobal == NULL)
01062         return FALSE;
01063
01064     CToolBarData* pData = (CToolBarData*)LockResource(hGlobal);
01065     if (pData == NULL)
01066         return FALSE;
01067     ASSERT(pData->wVersion == 1);
01068
01069     UINT* pItems = new UINT[pData->wItemCount];
01070     for (int i = 0; i < pData->wItemCount; i++)
01071         pItems[i] = pData->items()[i];
01072     BOOL bResult = SetButtons(pItems, pData->wItemCount);
01073     delete[] pItems;
01074
01075     if (bResult)
01076     {
01077         // set new sizes of the buttons
01078         CSize sizeImage(pData->wWidth, pData->wHeight);
01079         CSize sizeButton(pData->wWidth + 7, pData->wHeight + 7);
01080         SetSizes(sizeButton, sizeImage);
01081
01082         // load bitmap now that sizes are known by the toolbar control
01083         bResult = LoadBitmap(lpszResourceName);
01084     }
01085
01086     UnlockResource(hGlobal);
01087     FreeResource(hGlobal);
01088
01089     // is the toolbar is customizable?
01090     if(( pBarInfo ) && ( bResult )) {
01091         m_pBarInfo = pBarInfo;
01092         m_nButtons = GetToolBarCtrl().GetButtonCount();
01093
01094         // modify the style to include adjustable
01095         ModifyStyle(0, CCS_ADJUSTABLE);
01096         RestoreState();
01097     }
01098
01099
01100     return bResult;
01101 }
01102
01103 BOOL CCJToolBar::LoadBitmap(LPCTSTR lpszResourceName)
01104 {
01105     ASSERT_VALID(this);
01106     ASSERT(lpszResourceName != NULL);
01107
01108     // determine location of the bitmap in resource fork
01109     HINSTANCE hInstImageWell = AfxFindResourceHandle(lpszResourceName, RT_BITMAP);
01110     HRSRC hRsrcImageWell = ::FindResource(hInstImageWell, lpszResourceName, RT_BITMAP);
01111     if (hRsrcImageWell == NULL)
01112         return FALSE;
01113
01114     // load the bitmap
01115     HBITMAP hbmImageWell;
01116     hbmImageWell = _LoadSysColorBitmap(hInstImageWell, hRsrcImageWell);
01117
01118     // tell common control toolbar about the new bitmap
01119     if (!AddReplaceBitmap(hbmImageWell))
01120         return FALSE;
01121
01122     // remember the resource handles so the bitmap can be recolored if necessary
01123     m_hInstImageWell = hInstImageWell;
01124     m_hRsrcImageWell = hRsrcImageWell;
01125     return TRUE;
01126 }
01127
01128 BOOL CCJToolBar::SetBitmap(HBITMAP hbmImageWell)
01129 {
01130     ASSERT_VALID(this);
01131     ASSERT(hbmImageWell != NULL);
01132
01133     // the caller must manage changing system colors
01134     m_hInstImageWell = NULL;
01135     m_hRsrcImageWell = NULL;
01136
01137     // tell common control toolbar about the new bitmap
01138     return AddReplaceBitmap(hbmImageWell);
01139 }
01140
01141 BOOL CCJToolBar::AddReplaceBitmap(HBITMAP hbmImageWell)
01142 {
01143     // need complete bitmap size to determine number of images
01144     BITMAP bitmap;
01145     VERIFY(::GetObject(hbmImageWell, sizeof(BITMAP), &bitmap));
01146
01147     // add the bitmap to the common control toolbar
01148     BOOL bResult;
01149     if (m_hbmImageWell == NULL)
01150     {
01151         TBADDBITMAP addBitmap;
01152         addBitmap.hInst = NULL; // makes TBADDBITMAP::nID behave a HBITMAP
01153         addBitmap.nID = (UINT)hbmImageWell;
01154         bResult =  DefWindowProc(TB_ADDBITMAP,
01155             bitmap.bmWidth / m_sizeImage.cx, (LPARAM)&addBitmap) == 0;
01156     }
01157     else
01158     {
01159         TBREPLACEBITMAP replaceBitmap;
01160         replaceBitmap.hInstOld = NULL;
01161         replaceBitmap.nIDOld = (UINT)m_hbmImageWell;
01162         replaceBitmap.hInstNew = NULL;
01163         replaceBitmap.nIDNew = (UINT)hbmImageWell;
01164         replaceBitmap.nButtons = bitmap.bmWidth / m_sizeImage.cx;
01165         bResult = (BOOL)DefWindowProc(TB_REPLACEBITMAP, 0,
01166             (LPARAM)&replaceBitmap);
01167     }
01168     // remove old bitmap, if present
01169     if (bResult)
01170     {
01171         AfxDeleteObject((HGDIOBJ*)&m_hbmImageWell);
01172         m_hbmImageWell = hbmImageWell;
01173     }
01174
01175     return bResult;
01176 }
01177
01178 BOOL CCJToolBar::SetButtons(const UINT* lpIDArray, int nIDCount)
01179 {
01180     ASSERT_VALID(this);
01181     ASSERT(nIDCount >= 1);  // must be at least one of them
01182     ASSERT(lpIDArray == NULL ||
01183         AfxIsValidAddress(lpIDArray, sizeof(UINT) * nIDCount, FALSE));
01184
01185     // delete all existing buttons
01186     int nCount = (int)DefWindowProc(TB_BUTTONCOUNT, 0, 0);
01187     while (nCount--)
01188         VERIFY(DefWindowProc(TB_DELETEBUTTON, 0, 0));
01189
01190     TBBUTTON button; memset(&button, 0, sizeof(TBBUTTON));
01191     button.iString = -1;
01192     if (lpIDArray != NULL)
01193     {
01194         // add new buttons to the common control
01195         int iImage = 0;
01196         for (int i = 0; i < nIDCount; i++)
01197         {
01198             button.fsState = TBSTATE_ENABLED;
01199             if ((button.idCommand = *lpIDArray++) == 0)
01200             {
01201                 // separator
01202                 button.fsStyle = TBSTYLE_SEP;
01203                 // width of separator includes 8 pixel overlap
01204                 ASSERT(_ComCtlVersion != -1);
01205                 if ((GetStyle() & TBSTYLE_FLAT) || _ComCtlVersion == VERSION_IE4)
01206                     button.iBitmap = 6;
01207                 else
01208                     button.iBitmap = 8;
01209             }
01210             else
01211             {
01212                 // a command button with image
01213                 button.fsStyle = TBSTYLE_BUTTON;
01214                 button.iBitmap = iImage++;
01215             }
01216             if (!DefWindowProc(TB_ADDBUTTONS, 1, (LPARAM)&button))
01217                 return FALSE;
01218         }
01219     }
01220     else
01221     {
01222         // add 'blank' buttons
01223         button.fsState = TBSTATE_ENABLED;
01224         for (int i = 0; i < nIDCount; i++)
01225         {
01226             ASSERT(button.fsStyle == TBSTYLE_BUTTON);
01227             if (!DefWindowProc(TB_ADDBUTTONS, 1, (LPARAM)&button))
01228                 return FALSE;
01229         }
01230     }
01231     m_nCount = (int)DefWindowProc(TB_BUTTONCOUNT, 0, 0);
01232     m_bDelayedButtonLayout = TRUE;
01233
01234     return TRUE;
01235 }
01236
01237 #ifdef AFX_CORE3_SEG
01238 #pragma code_seg(AFX_CORE3_SEG)
01239 #endif
01240
01242 // CCJToolBar attribute access
01243
01244 void CCJToolBar::GetButton(int nIndex, TBBUTTON* pButton) const
01245 {
01246     CCJToolBar* pBar = (CCJToolBar*)this;
01247     VERIFY(pBar->DefWindowProc(TB_GETBUTTON, nIndex, (LPARAM)pButton));
01248     // TBSTATE_ENABLED == TBBS_DISABLED so invert it
01249     pButton->fsState ^= TBSTATE_ENABLED;
01250 }
01251
01252 void CCJToolBar::SetButton(int nIndex, TBBUTTON* pButton)
01253 {
01254     // get original button state
01255     TBBUTTON button;
01256     VERIFY(DefWindowProc(TB_GETBUTTON, nIndex, (LPARAM)&button));
01257
01258     // prepare for old/new button comparsion
01259     button.bReserved[0] = 0;
01260     button.bReserved[1] = 0;
01261     // TBSTATE_ENABLED == TBBS_DISABLED so invert it
01262     pButton->fsState ^= TBSTATE_ENABLED;
01263     pButton->bReserved[0] = 0;
01264     pButton->bReserved[1] = 0;
01265
01266     // nothing to do if they are the same
01267     if (memcmp(pButton, &button, sizeof(TBBUTTON)) != 0)
01268     {
01269         // don't redraw everything while setting the button
01270         DWORD dwStyle = GetStyle();
01271         ModifyStyle(WS_VISIBLE, 0);
01272         VERIFY(DefWindowProc(TB_DELETEBUTTON, nIndex, 0));
01273         VERIFY(DefWindowProc(TB_INSERTBUTTON, nIndex, (LPARAM)pButton));
01274         ModifyStyle(0, dwStyle & WS_VISIBLE);
01275
01276         // invalidate appropriate parts
01277         if (((pButton->fsStyle ^ button.fsStyle) & TBSTYLE_SEP) ||
01278             ((pButton->fsStyle & TBSTYLE_SEP) && pButton->iBitmap != button.iBitmap))
01279         {
01280             // changing a separator
01281             Invalidate();
01282         }
01283         else
01284         {
01285             // invalidate just the button
01286             CRect rect;
01287             if (DefWindowProc(TB_GETITEMRECT, nIndex, (LPARAM)&rect))
01288                 InvalidateRect(rect);
01289         }
01290     }
01291 }
01292
01293 int CCJToolBar::CommandToIndex(UINT nIDFind) const
01294 {
01295     ASSERT_VALID(this);
01296     ASSERT(::IsWindow(m_hWnd));
01297
01298     CCJToolBar* pBar = (CCJToolBar*)this;
01299     return (int)pBar->DefWindowProc(TB_COMMANDTOINDEX, nIDFind, 0);
01300 }
01301
01302 UINT CCJToolBar::GetItemID(int nIndex) const
01303 {
01304     ASSERT_VALID(this);
01305     ASSERT(::IsWindow(m_hWnd));
01306
01307     TBBUTTON button;
01308     GetButton(nIndex, &button);
01309     return button.idCommand;
01310 }
01311
01312 void CCJToolBar::GetItemRect(int nIndex, LPRECT lpRect) const
01313 {
01314     ASSERT_VALID(this);
01315     ASSERT(::IsWindow(m_hWnd));
01316
01317     // handle any delayed layout
01318     if (m_bDelayedButtonLayout)
01319         ((CCJToolBar*)this)->Layout();
01320
01321     // now it is safe to get the item rectangle
01322     CCJToolBar* pBar = (CCJToolBar*)this;
01323     if (!pBar->DefWindowProc(TB_GETITEMRECT, nIndex, (LPARAM)lpRect))
01324         SetRectEmpty(lpRect);
01325 }
01326
01327 void CCJToolBar::Layout()
01328 {
01329     ASSERT(m_bDelayedButtonLayout);
01330
01331     m_bDelayedButtonLayout = FALSE;
01332
01333     BOOL bHorz = (m_dwStyle & CBRS_ORIENT_HORZ) != 0;
01334     if ((m_dwStyle & CBRS_FLOATING) && (m_dwStyle & CBRS_SIZE_DYNAMIC))
01335         ((CCJToolBar*)this)->CalcDynamicLayout(0, LM_HORZ | LM_MRUWIDTH | LM_COMMIT);
01336     else if (bHorz)
01337         ((CCJToolBar*)this)->CalcDynamicLayout(0, LM_HORZ | LM_HORZDOCK | LM_COMMIT);
01338     else
01339         ((CCJToolBar*)this)->CalcDynamicLayout(0, LM_VERTDOCK | LM_COMMIT);
01340 }
01341
01342 UINT CCJToolBar::GetButtonStyle(int nIndex) const
01343 {
01344     ASSERT_VALID(this);
01345     ASSERT(::IsWindow(m_hWnd));
01346
01347     TBBUTTON button;
01348     GetButton(nIndex, &button);
01349     return MAKELONG(button.fsStyle, button.fsState);
01350 }
01351
01352 void CCJToolBar::SetButtonStyle(int nIndex, UINT nStyle)
01353 {
01354     ASSERT_VALID(this);
01355     ASSERT(::IsWindow(m_hWnd));
01356
01357     TBBUTTON button;
01358     GetButton(nIndex, &button);
01359     if (button.fsStyle != (BYTE)LOWORD(nStyle) || button.fsState != (BYTE)HIWORD(nStyle))
01360     {
01361         button.fsStyle = (BYTE)LOWORD(nStyle);
01362         button.fsState = (BYTE)HIWORD(nStyle);
01363         SetButton(nIndex, &button);
01364         m_bDelayedButtonLayout = TRUE;
01365     }
01366 }
01367
01368 #define CX_OVERLAP  0
01369
01370 CSize CCJToolBar::CalcSize(TBBUTTON* pData, int nCount)
01371 {
01372     ASSERT(pData != NULL && nCount > 0);
01373
01374     CPoint cur(0,0);
01375     CSize sizeResult(0,0);
01376     int cyTallestOnRow = 0;
01377
01378     for (int i = 0; i < nCount; i++)
01379     {
01380         if (pData[i].fsState & TBSTATE_HIDDEN)
01381             continue;
01382
01383         // **PD**
01384         // Load actual size of button into a local variable
01385         // called m_sizeButton. C++ will use this instead of
01386         // CToolBar::m_sizeButton.
01387         //
01388         CSize m_sizeButton = GetButtonSize(pData, i);
01389
01390         // **PD**
01391         // I also changed the logic below to be more correct.
01392         cyTallestOnRow = max(cyTallestOnRow, m_sizeButton.cy);
01393         sizeResult.cx = max(cur.x + m_sizeButton.cx, sizeResult.cx);
01394         sizeResult.cy = max(cur.y + m_sizeButton.cy, sizeResult.cy);
01395
01396         cur.x += m_sizeButton.cx - CX_OVERLAP;
01397
01398         if (pData[i].fsState & TBSTATE_WRAP)
01399         {
01400             cur.x = 0;
01401             cur.y += cyTallestOnRow;
01402             cyTallestOnRow = 0;
01403             if (pData[i].fsStyle & TBSTYLE_SEP)
01404                 cur.y += m_sizeButton.cy;
01405         }
01406     }
01407     return sizeResult;
01408 }
01409
01410 int CCJToolBar::WrapToolBar(TBBUTTON* pData, int nCount, int nWidth)
01411 {
01412     ASSERT(pData != NULL && nCount > 0);
01413
01414     int nResult = 0;
01415     int x = 0;
01416     for (int i = 0; i < nCount; i++)
01417     {
01418         pData[i].fsState &= ~TBSTATE_WRAP;
01419
01420         if (pData[i].fsState & TBSTATE_HIDDEN)
01421             continue;
01422
01423         int dx, dxNext;
01424
01425         // **PD**
01426         // Load actual size of button into a local variable
01427         // called m_sizeButton. C++ will use this instead of
01428         // CToolBar::m_sizeButton.
01429         //
01430         CSize m_sizeButton = GetButtonSize(pData, i);
01431
01432         dx = m_sizeButton.cx;
01433         dxNext = dx - CX_OVERLAP;
01434
01435         if (x + dx > nWidth)
01436         {
01437             BOOL bFound = FALSE;
01438             for (int j = i; j >= 0  &&  !(pData[j].fsState & TBSTATE_WRAP); j--)
01439             {
01440                 // Find last separator that isn't hidden
01441                 // a separator that has a command ID is not
01442                 // a separator, but a custom control.
01443                 if ((pData[j].fsStyle & TBSTYLE_SEP) &&
01444                     (pData[j].idCommand == 0) &&
01445                     !(pData[j].fsState & TBSTATE_HIDDEN))
01446                 {
01447                     bFound = TRUE; i = j; x = 0;
01448                     pData[j].fsState |= TBSTATE_WRAP;
01449                     nResult++;
01450                     break;
01451                 }
01452             }
01453             if (!bFound)
01454             {
01455                 for (int j = i - 1; j >= 0 && !(pData[j].fsState & TBSTATE_WRAP); j--)
01456                 {
01457                     // Never wrap anything that is hidden,
01458                     // or any custom controls
01459                     if ((pData[j].fsState & TBSTATE_HIDDEN) ||
01460                         ((pData[j].fsStyle & TBSTYLE_SEP) &&
01461                         (pData[j].idCommand != 0)))
01462                         continue;
01463
01464                     bFound = TRUE; i = j; x = 0;
01465                     pData[j].fsState |= TBSTATE_WRAP;
01466                     nResult++;
01467                     break;
01468                 }
01469                 if (!bFound)
01470                     x += dxNext;
01471             }
01472         }
01473         else
01474             x += dxNext;
01475     }
01476     return nResult + 1;
01477 }
01478
01479 void CCJToolBar::SizeToolBar(TBBUTTON* pData, int nCount, int nLength, BOOL bVert)
01480 {
01481     ASSERT(pData != NULL && nCount > 0);
01482
01483     if (!bVert)
01484     {
01485         int nMin, nMax, nTarget, nCurrent, nMid;
01486
01487         // Wrap ToolBar as specified
01488         nMax = nLength;
01489         nTarget = WrapToolBar(pData, nCount, nMax);
01490
01491         // Wrap ToolBar vertically
01492         nMin = 0;
01493         nCurrent = WrapToolBar(pData, nCount, nMin);
01494
01495         if (nCurrent != nTarget)
01496         {
01497             while (nMin < nMax)
01498             {
01499                 nMid = (nMin + nMax) / 2;
01500                 nCurrent = WrapToolBar(pData, nCount, nMid);
01501
01502                 if (nCurrent == nTarget)
01503                     nMax = nMid;
01504                 else
01505                 {
01506                     if (nMin == nMid)
01507                     {
01508                         WrapToolBar(pData, nCount, nMax);
01509                         break;
01510                     }
01511                     nMin = nMid;
01512                 }
01513             }
01514         }
01515         CSize size = CalcSize(pData, nCount);
01516         WrapToolBar(pData, nCount, size.cx);
01517     }
01518     else
01519     {
01520         CSize sizeMax, sizeMin, sizeMid;
01521
01522         // Wrap ToolBar vertically
01523         WrapToolBar(pData, nCount, 0);
01524         sizeMin = CalcSize(pData, nCount);
01525
01526         // Wrap ToolBar horizontally
01527         WrapToolBar(pData, nCount, 32767);
01528         sizeMax = CalcSize(pData, nCount);
01529
01530         while (sizeMin.cx < sizeMax.cx)
01531         {
01532             sizeMid.cx = (sizeMin.cx + sizeMax.cx) / 2;
01533             WrapToolBar(pData, nCount, sizeMid.cx);
01534             sizeMid = CalcSize(pData, nCount);
01535
01536             if (nLength < sizeMid.cy)
01537             {
01538                 if (sizeMin == sizeMid)
01539                 {
01540                     WrapToolBar(pData, nCount, sizeMax.cx);
01541                     return;
01542                 }
01543                 sizeMin = sizeMid;
01544             }
01545             else if (nLength > sizeMid.cy)
01546                 sizeMax = sizeMid;
01547             else
01548                 return;
01549         }
01550     }
01551 }
01552
01553 CSize CCJToolBar::CalcLayout(DWORD dwMode, int nLength)
01554 {
01555     ASSERT_VALID(this);
01556     ASSERT(::IsWindow(m_hWnd));
01557     if (dwMode & LM_HORZDOCK)
01558         ASSERT(dwMode & LM_HORZ);
01559
01560     int nCount;
01561     TBBUTTON* pData = NULL;
01562     CSize sizeResult(0,0);
01563
01564     //BLOCK: Load Buttons
01565     {
01566         nCount = DefWindowProc(TB_BUTTONCOUNT, 0, 0);
01567         if (nCount != 0)
01568         {
01569             int i;
01570             pData = new TBBUTTON[nCount];
01571             for (i = 0; i < nCount; i++)
01572                 GetButton(i, &pData[i]);
01573         }
01574     }
01575
01576     if (nCount > 0)
01577     {
01578         if (!(m_dwStyle & CBRS_SIZE_FIXED))
01579         {
01580             BOOL bDynamic = m_dwStyle & CBRS_SIZE_DYNAMIC;
01581
01582             if (bDynamic && (dwMode & LM_MRUWIDTH))
01583                 SizeToolBar(pData, nCount, m_nMRUWidth);
01584             else if (bDynamic && (dwMode & LM_HORZDOCK))
01585                 SizeToolBar(pData, nCount, 32767);
01586             else if (bDynamic && (dwMode & LM_VERTDOCK))
01587                 SizeToolBar(pData, nCount, 0);
01588             else if (bDynamic && (nLength != -1))
01589             {
01590                 CRect rect; rect.SetRectEmpty();
01591                 CalcInsideRect(rect, (dwMode & LM_HORZ));
01592                 BOOL bVert = (dwMode & LM_LENGTHY);
01593                 int nLen = nLength + (bVert ? rect.Height() : rect.Width());
01594
01595                 SizeToolBar(pData, nCount, nLen, bVert);
01596             }
01597             else if (bDynamic && (m_dwStyle & CBRS_FLOATING))
01598                 SizeToolBar(pData, nCount, m_nMRUWidth);
01599             else
01600                 SizeToolBar(pData, nCount, (dwMode & LM_HORZ) ? 32767 : 0);
01601         }
01602
01603         sizeResult = CalcSize(pData, nCount);
01604
01605         if (dwMode & LM_COMMIT)
01606         {
01607             CJX_CONTROLPOS* pControl = NULL;
01608             int nControlCount = 0;
01609             BOOL bIsDelayed = m_bDelayedButtonLayout;
01610             m_bDelayedButtonLayout = FALSE;
01611
01612             for (int i = 0; i < nCount; i++)
01613                 if ((pData[i].fsStyle & TBSTYLE_SEP) && (pData[i].idCommand != 0))
01614                     nControlCount++;
01615
01616             if (nControlCount > 0)
01617             {
01618                 pControl = new CJX_CONTROLPOS[nControlCount];
01619                 nControlCount = 0;
01620
01621                 for(int i = 0; i < nCount; i++)
01622                 {
01623                     if ((pData[i].fsStyle & TBSTYLE_SEP) && (pData[i].idCommand != 0))
01624                     {
01625                         pControl[nControlCount].nIndex = i;
01626                         pControl[nControlCount].nID = pData[i].idCommand;
01627
01628                         CRect rect;
01629                         GetItemRect(i, &rect);
01630                         ClientToScreen(&rect);
01631                         pControl[nControlCount].rectOldPos = rect;
01632
01633                         nControlCount++;
01634                     }
01635                 }
01636             }
01637
01638             if ((m_dwStyle & CBRS_FLOATING) && (m_dwStyle & CBRS_SIZE_DYNAMIC))
01639                 m_nMRUWidth = sizeResult.cx;
01640             for (i = 0; i < nCount; i++)
01641                 SetButton(i, &pData[i]);
01642
01643             if (nControlCount > 0)
01644             {
01645                 for (int i = 0; i < nControlCount; i++)
01646                 {
01647                     CWnd* pWnd = GetDlgItem(pControl[i].nID);
01648                     if (pWnd != NULL)
01649                     {
01650                         CRect rect;
01651                         pWnd->GetWindowRect(&rect);
01652                         CPoint pt = rect.TopLeft() - pControl[i].rectOldPos.TopLeft();
01653                         GetItemRect(pControl[i].nIndex, &rect);
01654                         pt = rect.TopLeft() + pt;
01655                         pWnd->SetWindowPos(NULL, pt.x, pt.y, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
01656                     }
01657                 }
01658                 delete[] pControl;
01659             }
01660             m_bDelayedButtonLayout = bIsDelayed;
01661         }
01662         delete[] pData;
01663     }
01664
01665     //BLOCK: Adjust Margins
01666     {
01667         CRect rect; rect.SetRectEmpty();
01668         CalcInsideRect(rect, (dwMode & LM_HORZ));
01669         sizeResult.cy -= rect.Height();
01670         sizeResult.cx -= rect.Width();
01671
01672         CSize size = CCJToolBarBase::CalcFixedLayout((dwMode & LM_STRETCH), (dwMode & LM_HORZ));
01673         sizeResult.cx = max(sizeResult.cx, size.cx);
01674         sizeResult.cy = max(sizeResult.cy, size.cy);
01675     }
01676     return sizeResult;
01677 }
01678
01679 CSize CCJToolBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
01680 {
01681     DWORD dwMode = bStretch ? LM_STRETCH : 0;
01682     dwMode |= bHorz ? LM_HORZ : 0;
01683
01684     return CalcLayout(dwMode);
01685 }
01686
01687 CSize CCJToolBar::CalcDynamicLayout(int nLength, DWORD dwMode)
01688 {
01689     if ((nLength == -1) && !(dwMode & LM_MRUWIDTH) && !(dwMode & LM_COMMIT) &&
01690         ((dwMode & LM_HORZDOCK) || (dwMode & LM_VERTDOCK)))
01691     {
01692         return CalcFixedLayout(dwMode & LM_STRETCH, dwMode & LM_HORZDOCK);
01693     }
01694     return CalcLayout(dwMode, nLength);
01695 }
01696
01697 void CCJToolBar::GetButtonInfo(int nIndex, UINT& nID, UINT& nStyle, int& iImage) const
01698 {
01699     ASSERT_VALID(this);
01700     ASSERT(::IsWindow(m_hWnd));
01701
01702     TBBUTTON button;
01703     GetButton(nIndex, &button);
01704     nID = button.idCommand;
01705     nStyle = MAKELONG(button.fsStyle, button.fsState);
01706     iImage = button.iBitmap;
01707 }
01708
01709 void CCJToolBar::SetButtonInfo(int nIndex, UINT nID, UINT nStyle, int iImage)
01710 {
01711     ASSERT_VALID(this);
01712
01713     TBBUTTON button;
01714     GetButton(nIndex, &button);
01715     TBBUTTON save;
01716     memcpy(&save, &button, sizeof(save));
01717     button.idCommand = nID;
01718     button.iBitmap = iImage;
01719     button.fsStyle = (BYTE)LOWORD(nStyle);
01720     button.fsState = (BYTE)HIWORD(nStyle);
01721     if (memcmp(&save, &button, sizeof(save)) != 0)
01722     {
01723         SetButton(nIndex, &button);
01724         m_bDelayedButtonLayout = TRUE;
01725     }
01726 }
01727
01728 int CCJToolBar::OnToolHitTest(CPoint point, TOOLINFO* pTI) const
01729 {
01730     ASSERT_VALID(this);
01731     ASSERT(::IsWindow(m_hWnd));
01732
01733     // check child windows first by calling CCJToolBarBase
01734     int nHit = CCJToolBarBase::OnToolHitTest(point, pTI);
01735     if (nHit != -1)
01736         return nHit;
01737
01738     // now hit test against CCJToolBar buttons
01739     CCJToolBar* pBar = (CCJToolBar*)this;
01740     int nButtons = (int)pBar->DefWindowProc(TB_BUTTONCOUNT, 0, 0);
01741     for (int i = 0; i < nButtons; i++)
01742     {
01743         CRect rect;
01744         TBBUTTON button;
01745         if (pBar->DefWindowProc(TB_GETITEMRECT, i, (LPARAM)&rect))
01746         {
01747             ++rect.bottom;
01748             ++rect.right;
01749             if (rect.PtInRect(point) &&
01750                 pBar->DefWindowProc(TB_GETBUTTON, i, (LPARAM)&button) &&
01751                 !(button.fsStyle & TBSTYLE_SEP))
01752             {
01753                 int nHit = GetItemID(i);
01754                 if (pTI != NULL && pTI->cbSize >= sizeof(AFX_OLDTOOLINFO))
01755                 {
01756                     pTI->hwnd = m_hWnd;
01757                     pTI->rect = rect;
01758                     pTI->uId = nHit;
01759                     pTI->lpszText = LPSTR_TEXTCALLBACK;
01760                 }
01761                 // found matching rect, return the ID of the button
01762                 return nHit != 0 ? nHit : -1;
01763             }
01764         }
01765     }
01766     return -1;
01767 }
01768
01769 BOOL CCJToolBar::SetButtonText(int nIndex, LPCTSTR lpszText)
01770 {
01771     // attempt to lookup string index in map
01772     int nString = -1;
01773     void* p;
01774     if (m_pStringMap != NULL && m_pStringMap->Lookup(lpszText, p))
01775         nString = (int)p;
01776
01777     // add new string if not already in map
01778     if (nString == -1)
01779     {
01780         // initialize map if necessary
01781         if (m_pStringMap == NULL)
01782             m_pStringMap = new CMapStringToPtr;
01783
01784         // add new string to toolbar list
01785         CString strTemp(lpszText, lstrlen(lpszText)+1);
01786         nString = (int)DefWindowProc(TB_ADDSTRING, 0, (LPARAM)(LPCTSTR)strTemp);
01787         if (nString == -1)
01788             return FALSE;
01789
01790         // cache string away in string map
01791         m_pStringMap->SetAt(lpszText, (void*)nString);
01792         ASSERT(m_pStringMap->Lookup(lpszText, p));
01793     }
01794
01795     // change the toolbar button description
01796     TBBUTTON button;
01797     GetButton(nIndex, &button);
01798     button.iString = nString;
01799     SetButton(nIndex, &button);
01800
01801     return TRUE;
01802 }
01803
01804 CString CCJToolBar::GetButtonText(int nIndex) const
01805 {
01806     CString strResult;
01807     GetButtonText(nIndex, strResult);
01808     return strResult;
01809 }
01810
01811 void CCJToolBar::GetButtonText(int nIndex, CString& rString) const
01812 {
01813     if (m_pStringMap != NULL)
01814     {
01815         // get button information (need button.iString)
01816         TBBUTTON button;
01817         GetButton(nIndex, &button);
01818
01819         // look in map for matching iString
01820         POSITION pos = m_pStringMap->GetStartPosition();
01821         CString str; void* p;
01822         while (pos)
01823         {
01824             m_pStringMap->GetNextAssoc(pos, str, p);
01825             if ((int)p == button.iString)
01826             {
01827                 rString = str;
01828                 return;
01829             }
01830         }
01831     }
01832     rString.Empty();
01833 }
01834
01836 // CCJToolBar message handlers
01837
01838 BEGIN_MESSAGE_MAP(CCJToolBar, CCJToolBarBase)
01839     //{{AFX_MSG_MAP(CCJToolBar)
01840     ON_WM_NCHITTEST()
01841     ON_WM_NCPAINT()
01842     ON_WM_PAINT()
01843     ON_WM_NCCALCSIZE()
01844     ON_WM_WINDOWPOSCHANGING()
01845     ON_WM_WINDOWPOSCHANGED()
01846     ON_WM_SYSCOLORCHANGE()
01847     ON_MESSAGE(TB_SETBUTTONSIZE, OnSetButtonSize)
01848     ON_MESSAGE(TB_SETBITMAPSIZE, OnSetBitmapSize)
01849     ON_WM_NCCREATE()
01850     ON_WM_ERASEBKGND()
01851     ON_WM_DESTROY()
01852     ON_WM_RBUTTONDOWN()
01853     ON_MESSAGE(WM_SETTINGCHANGE, OnPreserveZeroBorderHelper)
01854     //}}AFX_MSG_MAP
01855     ON_MESSAGE(WM_SETFONT, OnPreserveZeroBorderHelper)
01856     ON_NOTIFY_REFLECT(TBN_DROPDOWN,      OnToolBarBtnDropDown)
01857     ON_NOTIFY_REFLECT(TBN_BEGINADJUST,   OnToolBarBeginAdjust)
01858     ON_NOTIFY_REFLECT(TBN_BEGINDRAG,     OnToolBarBeginDrag)
01859     ON_NOTIFY_REFLECT(TBN_CUSTHELP,      OnToolBarCustomHelp)
01860     ON_NOTIFY_REFLECT(TBN_ENDADJUST,     OnToolBarEndAdjust)
01861     ON_NOTIFY_REFLECT(TBN_ENDDRAG,       OnToolBarEndDrag)
01862     ON_NOTIFY_REFLECT(TBN_GETBUTTONINFO, OnToolBarGetButtonInfo)
01863     ON_NOTIFY_REFLECT(TBN_QUERYDELETE,   OnToolBarQueryDelete)
01864     ON_NOTIFY_REFLECT(TBN_QUERYINSERT,   OnToolBarQueryInsert)
01865     ON_NOTIFY_REFLECT(TBN_RESET,         OnToolBarReset)
01866     ON_NOTIFY_REFLECT(TBN_TOOLBARCHANGE, OnToolBarChange)
01867 END_MESSAGE_MAP()
01868
01870 // Override to avoid MFC in case I'm inside a ReBar
01871 //
01872 BOOL CCJToolBar::OnEraseBkgnd(CDC*)
01873 {
01874     return (BOOL)Default();
01875 }
01876
01877 UINT CCJToolBar::OnNcHitTest(CPoint)
01878 {
01879     return HTCLIENT;
01880 }
01881
01883 // Calcluate size of client area. Adds room for grippers
01884 //
01885 void CCJToolBar::OnNcCalcSize(BOOL /*bCalcValidRects*/, NCCALCSIZE_PARAMS* lpncsp)
01886 {
01887     // calculate border space (will add to top/bottom, subtract from right/bottom)
01888     CRect rect; rect.SetRectEmpty();
01889     BOOL bHorz = (m_dwStyle & CBRS_ORIENT_HORZ) != 0;
01890     CCJToolBarBase::CalcInsideRect(rect, bHorz);
01891     ASSERT(_ComCtlVersion != -1);
01892     ASSERT(_ComCtlVersion >= VERSION_IE4 || rect.top >= 2);
01893
01894     // adjust non-client area for border space
01895     lpncsp->rgrc[0].left += rect.left;
01896     lpncsp->rgrc[0].top += rect.top;
01897     // previous versions of COMCTL32.DLL had a built-in 2 pixel border
01898     if (_ComCtlVersion < VERSION_IE4)
01899         lpncsp->rgrc[0].top -= 2;
01900     lpncsp->rgrc[0].right += rect.right;
01901     lpncsp->rgrc[0].bottom += rect.bottom;
01902 }
01903
01905 // **PD**
01906 // Part 2 of correction for MFC is to recalculate everything when the bar
01907 // goes from docked to undocked because the AdjustSize calculation happens
01908 // when the bar is in the old state, and thus wrong. After the bar is
01909 // docked/undocked, I'll recalculate with the new style and commit the change.
01910 //
01911 void CCJToolBar::OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle)
01912 {
01913     // a dynamically resizeable toolbar can not have the CBRS_FLOAT_MULTI
01914     ASSERT(!((dwNewStyle & CBRS_SIZE_DYNAMIC) &&
01915         (m_dwDockStyle & CBRS_FLOAT_MULTI)));
01916
01917     // a toolbar can not be both dynamic and fixed in size
01918     ASSERT (!((dwNewStyle & CBRS_SIZE_FIXED) &&
01919         (dwNewStyle & CBRS_SIZE_DYNAMIC)));
01920
01921     // CBRS_SIZE_DYNAMIC can not be disabled once it has been enabled
01922     ASSERT (((dwOldStyle & CBRS_SIZE_DYNAMIC) == 0) ||
01923         ((dwNewStyle & CBRS_SIZE_DYNAMIC) != 0));
01924
01925     if (m_hWnd != NULL &&
01926         ((dwOldStyle & CBRS_BORDER_ANY) != (dwNewStyle & CBRS_BORDER_ANY)))
01927     {
01928         // recalc non-client area when border styles change
01929         SetWindowPos(NULL, 0, 0, 0, 0,
01930             SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DRAWFRAME);
01931     }
01932     m_bDelayedButtonLayout = TRUE;
01933
01934     if (dwOldStyle != dwNewStyle) {
01935         DWORD dwMode = 0;
01936         if ((dwNewStyle & CBRS_SIZE_DYNAMIC) && (dwNewStyle & CBRS_FLOATING))
01937             dwMode = LM_HORZ | LM_MRUWIDTH;
01938         else if (dwNewStyle & CBRS_ORIENT_HORZ)
01939             dwMode = LM_HORZ | LM_HORZDOCK;
01940         else
01941             dwMode =  LM_VERTDOCK;
01942
01943         CalcDynamicLayout(-1, dwMode | LM_COMMIT);
01944     }
01945 }
01946
01947 void CCJToolBar::OnNcPaint()
01948 {
01949     EraseNonClient();
01950 }
01951
01952 void CCJToolBar::OnWindowPosChanging(LPWINDOWPOS lpwndpos)
01953 {
01954     // not necessary to invalidate the borders
01955     DWORD dwStyle = m_dwStyle;
01956     m_dwStyle &= ~(CBRS_BORDER_ANY);
01957     CCJToolBarBase::OnWindowPosChanging(lpwndpos);
01958     m_dwStyle = dwStyle;
01959 }
01960
01961 void CCJToolBar::OnPaint()
01962 {
01963     if (m_bDelayedButtonLayout)
01964         Layout();
01965
01966     Default();
01967 }
01968
01969 LRESULT CCJToolBar::OnSetButtonSize(WPARAM, LPARAM lParam)
01970 {
01971     return OnSetSizeHelper(m_sizeButton, lParam);
01972 }
01973
01974 LRESULT CCJToolBar::OnSetBitmapSize(WPARAM, LPARAM lParam)
01975 {
01976     return OnSetSizeHelper(m_sizeImage, lParam);
01977 }
01978
01979 LRESULT CCJToolBar::OnSetSizeHelper(CSize& size, LPARAM lParam)
01980 {
01981     //WINBUG: The IE4 version of COMCTL32.DLL supports a zero border, but
01982     //  only if TBSTYLE_TRANSPARENT is on during the the TB_SETBITMAPSIZE
01983     //  and/or TB_SETBUTTONSIZE messages.  In order to enable this feature
01984     //  all the time (so we get consistent border behavior, dependent only
01985     //  on the version of COMCTL32.DLL) we turn on TBSTYLE_TRANSPARENT
01986     //  whenever these messages go through.  It would be nice that in a
01987     //  future version, the system toolbar would just allow you to set
01988     //  the top and left borders to anything you please.
01989
01990     BOOL bModify = FALSE;
01991     ASSERT(_ComCtlVersion != -1);
01992     DWORD dwStyle = 0;
01993     if (_ComCtlVersion >= VERSION_IE4)
01994     {
01995         dwStyle = GetStyle();
01996         bModify = ModifyStyle(0, TBSTYLE_TRANSPARENT|TBSTYLE_FLAT);
01997     }
01998
01999     LRESULT lResult = Default();
02000     if (lResult)
02001         size = lParam;
02002
02003     if (bModify)
02004         SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
02005
02006     return lResult;
02007 }
02008
02009 LRESULT CCJToolBar::OnPreserveZeroBorderHelper(WPARAM, LPARAM lParam)
02010 {
02011     UNUSED_ALWAYS( lParam );
02012
02013     BOOL bModify = FALSE;
02014     ASSERT(_ComCtlVersion != -1);
02015     DWORD dwStyle = 0;
02016     if (_ComCtlVersion >= VERSION_IE4)
02017     {
02018         dwStyle = GetStyle();
02019         bModify = ModifyStyle(0, TBSTYLE_TRANSPARENT|TBSTYLE_FLAT);
02020     }
02021
02022     LRESULT lResult = Default();
02023
02024     if (bModify)
02025         SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
02026
02027     return lResult;
02028 }
02029
02030 void CCJToolBar::OnSysColorChange()
02031 {
02032     // re-color bitmap for toolbar
02033     if (m_hInstImageWell != NULL && m_hbmImageWell != NULL)
02034     {
02035         HBITMAP hbmNew;
02036         hbmNew = _LoadSysColorBitmap(m_hInstImageWell, m_hRsrcImageWell);
02037         if (hbmNew != NULL)
02038             AddReplaceBitmap(hbmNew);
02039     }
02040 }
02041
02043 // CCJToolBar idle update through CCJToolCmdUI class
02044
02045 class CCJToolCmdUI : public CCmdUI        // class private to this file !
02046 {
02047 public: // re-implementations only
02048     virtual void Enable(BOOL bOn);
02049     virtual void SetCheck(int nCheck);
02050     virtual void SetText(LPCTSTR lpszText);
02051 };
02052
02053 void CCJToolCmdUI::Enable(BOOL bOn)
02054 {
02055     m_bEnableChanged = TRUE;
02056     CCJToolBar* pToolBar = (CCJToolBar*)m_pOther;
02057     ASSERT(pToolBar != NULL);
02058     ASSERT_KINDOF(CCJToolBar, pToolBar);
02059     ASSERT(m_nIndex < m_nIndexMax);
02060
02061     UINT nNewStyle = pToolBar->GetButtonStyle(m_nIndex) & ~TBBS_DISABLED;
02062     if (!bOn)
02063     {
02064         nNewStyle |= TBBS_DISABLED;
02065         // WINBUG: If a button is currently pressed and then is disabled
02066         // COMCTL32.DLL does not unpress the button, even after the mouse
02067         // button goes up!  We work around this bug by forcing TBBS_PRESSED
02068         // off when a button is disabled.
02069         nNewStyle &= ~TBBS_PRESSED;
02070     }
02071     ASSERT(!(nNewStyle & TBBS_SEPARATOR));
02072     pToolBar->SetButtonStyle(m_nIndex, nNewStyle);
02073 }
02074
02075 void CCJToolCmdUI::SetCheck(int nCheck)
02076 {
02077     ASSERT(nCheck >= 0 && nCheck <= 2); // 0=>off, 1=>on, 2=>indeterminate
02078     CCJToolBar* pToolBar = (CCJToolBar*)m_pOther;
02079     ASSERT(pToolBar != NULL);
02080     ASSERT_KINDOF(CCJToolBar, pToolBar);
02081     ASSERT(m_nIndex < m_nIndexMax);
02082
02083     UINT nNewStyle = pToolBar->GetButtonStyle(m_nIndex) &
02084                 ~(TBBS_CHECKED | TBBS_INDETERMINATE);
02085     if (nCheck == 1)
02086         nNewStyle |= TBBS_CHECKED;
02087     else if (nCheck == 2)
02088         nNewStyle |= TBBS_INDETERMINATE;
02089     ASSERT(!(nNewStyle & TBBS_SEPARATOR));
02090     pToolBar->SetButtonStyle(m_nIndex, nNewStyle | TBBS_CHECKBOX);
02091 }
02092
02093 void CCJToolCmdUI::SetText(LPCTSTR)
02094 {
02095     // ignore it
02096 }
02097
02098 void CCJToolBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
02099 {
02100     CCJToolCmdUI state;
02101     state.m_pOther = this;
02102
02103     state.m_nIndexMax = (UINT)DefWindowProc(TB_BUTTONCOUNT, 0, 0);
02104     for (state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax; state.m_nIndex++)
02105     {
02106         // get buttons state
02107         TBBUTTON button;
02108         GetButton(state.m_nIndex, &button);
02109         state.m_nID = button.idCommand;
02110
02111         // ignore separators
02112         if (!(button.fsStyle & TBSTYLE_SEP))
02113         {
02114             // allow reflections
02115             if (CWnd::OnCmdMsg(0,
02116                 MAKELONG((int)CN_UPDATE_COMMAND_UI, WM_COMMAND+WM_REFLECT_BASE),
02117                 &state, NULL))
02118                 continue;
02119
02120             // allow the toolbar itself to have update handlers
02121             if (CWnd::OnCmdMsg(state.m_nID, CN_UPDATE_COMMAND_UI, &state, NULL))
02122                 continue;
02123
02124             // allow the owner to process the update
02125             state.DoUpdate(pTarget, bDisableIfNoHndler);
02126         }
02127     }
02128
02129     // update the dialog controls added to the toolbar
02130     UpdateDialogControls(pTarget, bDisableIfNoHndler);
02131 }
02132
02134 // CCJToolBar diagnostics
02135
02136 #ifdef _DEBUG
02137 void CCJToolBar::AssertValid() const
02138 {
02139     // Note: CCJToolBarBase::AssertValid is not called because it checks for
02140     //  m_nCount and m_pData to be in sync, which they are not in CCJToolBar.
02141
02142 #ifndef _VC_VERSION_5
02143     ASSERT(m_hbmImageWell == NULL ||
02144         ( afxData.bWin95 || ::GetObjectType(m_hbmImageWell) == OBJ_BITMAP));
02145 #else
02146     ASSERT(m_hbmImageWell == NULL ||
02147         ( ::GetObjectType(m_hbmImageWell) == OBJ_BITMAP));
02148 #endif
02149
02150     if (m_hInstImageWell != NULL && m_hbmImageWell != NULL)
02151         ASSERT(m_hRsrcImageWell != NULL);
02152 }
02153
02154 void CCJToolBar::Dump(CDumpContext& dc) const
02155 {
02156     CCJToolBarBase::Dump(dc);
02157
02158     dc << "m_hbmImageWell = " << (UINT)m_hbmImageWell;
02159     dc << "\nm_hInstImageWell = " << (UINT)m_hInstImageWell;
02160     dc << "\nm_hRsrcImageWell = " << (UINT)m_hRsrcImageWell;
02161     dc << "\nm_sizeButton = " << m_sizeButton;
02162     dc << "\nm_sizeImage = " << m_sizeImage;
02163
02164     if (dc.GetDepth() > 0)
02165     {
02166         CCJToolBar* pBar = (CCJToolBar*)this;
02167         int nCount = pBar->DefWindowProc(TB_BUTTONCOUNT, 0, 0);
02168         for (int i = 0; i < nCount; i++)
02169         {
02170             TBBUTTON button;
02171             GetButton(i, &button);
02172             dc << "\ntoolbar button[" << i << "] = {";
02173             dc << "\n\tnID = " << button.idCommand;
02174             dc << "\n\tnStyle = " << MAKELONG(button.fsStyle, button.fsState);
02175             if (button.fsStyle & TBSTYLE_SEP)
02176                 dc << "\n\tiImage (separator width) = " << button.iBitmap;
02177             else
02178                 dc <<"\n\tiImage (bitmap image index) = " << button.iBitmap;
02179             dc << "\n}";
02180         }
02181     }
02182
02183     dc << "\n";
02184 }
02185 #endif
02186
02187 #ifdef AFX_INIT_SEG
02188 #pragma code_seg(AFX_INIT_SEG)
02189 #endif
02190
02191 IMPLEMENT_DYNAMIC(CCJToolBar, CCJToolBarBase)
02192
02193
Generated on Sat Aug 7 22:43:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPyThreadState Member List

This is the complete list of members for CPyThreadState, including all inherited members.

CPyThreadState(PyThreadState *p) | CPyThreadState | [inline]
m_p | CPyThreadState | [protected]
~CPyThreadState() | CPyThreadState | [inline]

Generated on Sat Aug 7 22:56:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AnnotateDlg.cpp Source File

common/AnnotateDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2001
00019  */
00020
00021 /*
00022  * AnnotateDlg.cpp : the cvs annotate dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "OptionalPropertySheet.h"
00030 #endif /* WIN32 */
00031
00032 #if qUnix
00033 #   include "UCvsDialogs.h"
00034 #endif
00035
00036 #ifdef qMacCvsPP
00037 #   include <UModalDialogs.h>
00038 #   include <LRadioButton.h>
00039 #   include <LEditText.h>
00040 #   include <LCheckBox.h>
00041 #   include <LMultiPanelView.h>
00042 #   include <LPopupGroupBox.h>
00043 #   include "LPopupFiller.h"
00044
00045 #   include "MacCvsApp.h"
00046 #endif /* qMacCvsPP */
00047
00048 #include "AnnotateDlg.h"
00049 #include "CvsPrefs.h"
00050 #include "MultiString.h"
00051 #include "MultiFiles.h"
00052 #include "ItemListDlg.h"
00053
00054 #ifdef WIN32
00055 #include "GetPrefs.h"
00056
00057 #ifdef _DEBUG
00058 #define new DEBUG_NEW
00059 #undef THIS_FILE
00060 static char THIS_FILE[] = __FILE__;
00061 #endif
00062
00064 // CAnnotate_MAIN property page
00065
00066 IMPLEMENT_DYNAMIC(CAnnotate_MAIN, CHHelpPropertyPage)
00067
00068 CAnnotate_MAIN::CAnnotate_MAIN(const MultiFiles* mf, kAnnotateCmdType annotateType,
00069                                const char* rev, bool isDate)
00070                                : m_mf(mf), m_annotateType(annotateType), CHHelpPropertyPage(CAnnotate_MAIN::IDD)
00071 {
00072     m_hasRev = FALSE;
00073     m_isDate = isDate;
00074     m_rev = rev;
00075     m_force = FALSE;
00076     m_noRecurse = FALSE;
00077
00078     if( kAnnotateGraph != m_annotateType )
00079     {
00080         m_revCombo.SetItems(m_isDate ? &gDateNames : &gRevNames);
00081     }
00082     else
00083     {
00084         m_revCombo.SetFeature(USmartCombo::AutoDropWidth | USmartCombo::ReadOnly);
00085
00086         if( m_mf && m_mf->TotalNumFiles() )
00087         {
00088             MultiFiles::const_iterator mfi = m_mf->begin();
00089             if( mfi != m_mf->end() && mfi->NumFiles() )
00090             {
00091                 UStr path;
00092                 UStr fileName;
00093                 UStr currRev;
00094
00095                 mfi->get(0, path, fileName, currRev);
00096                 m_rev = currRev.c_str();
00097             }
00098         }
00099     }
00100 }
00101
00102 CAnnotate_MAIN::~CAnnotate_MAIN()
00103 {
00104 }
00105
00106 void CAnnotate_MAIN::DoDataExchange(CDataExchange* pDX)
00107 {
00108     CHHelpPropertyPage::DoDataExchange(pDX);
00109     //{{AFX_DATA_MAP(CAnnotate_MAIN)
00110     DDX_Control(pDX, IDC_FORCE_HEAD_REV, m_forceCheck);
00111     DDX_Control(pDX, IDC_NORECURS, m_noRecurseCheck);
00112     DDX_Control(pDX, IDC_HAS_REV, m_hasRevCheck);
00113     DDX_Control(pDX, IDC_BROWSE_TAG, m_browseTagButton);
00114     DDX_Control(pDX, IDC_ISDATE, m_isDateCheck);
00115     DDX_Control(pDX, IDC_REV_TAG_DATE, m_revCombo);
00116     DDX_Check(pDX, IDC_HAS_REV, m_hasRev);
00117     DDX_Check(pDX, IDC_ISDATE, m_isDate);
00118     DDX_Check(pDX, IDC_FORCE_HEAD_REV, m_force);
00119     DDX_Check(pDX, IDC_NORECURS, m_noRecurse);
00120     DDX_CBString(pDX, IDC_REV_TAG_DATE, m_rev);
00121     //}}AFX_DATA_MAP
00122
00123     if( kAnnotateGraph != m_annotateType )
00124     {
00125         if( m_hasRev )
00126         {
00127             DDV_MinChars(pDX, m_rev, 1);
00128         }
00129
00130         DDX_ComboMString(pDX, IDC_REV_TAG_DATE, m_revCombo);
00131
00132         if( !pDX->m_bSaveAndValidate )
00133         {
00134             OnSpecifyRev();
00135         }
00136     }
00137 }
00138
00139
00140 BEGIN_MESSAGE_MAP(CAnnotate_MAIN, CHHelpPropertyPage)
00141     //{{AFX_MSG_MAP(CAnnotate_MAIN)
00142     ON_BN_CLICKED(IDC_HAS_REV, OnSpecifyRev)
00143     ON_BN_CLICKED(IDC_ISDATE, OnIsdate)
00144     ON_BN_CLICKED(IDC_BROWSE_TAG, OnBrowseTag)
00145     //}}AFX_MSG_MAP
00146 END_MESSAGE_MAP()
00147
00149 // CAnnotate_MAIN message handlers
00150
00152 BOOL CAnnotate_MAIN::OnInitDialog()
00153 {
00154     CHHelpPropertyPage::OnInitDialog();
00155
00156     // Extra initialization
00157
00158     // Special setup for the diff invoked using the graph view
00159     if( kAnnotateGraph == m_annotateType )
00160     {
00161         m_hasRevCheck.EnableWindow(FALSE);
00162         m_hasRevCheck.SetCheck(1);
00163
00164         m_browseTagButton.EnableWindow(FALSE);
00165
00166         m_isDateCheck.EnableWindow(FALSE);
00167
00168         m_revCombo.SetReadOnly(TRUE);
00169         m_revCombo.ResetContent();
00170
00171         if( !m_rev.IsEmpty() )
00172         {
00173             m_revCombo.AddString(m_rev);
00174             m_revCombo.SetWindowText(m_rev);
00175         }
00176
00177         m_noRecurseCheck.EnableWindow(FALSE);
00178         m_forceCheck.EnableWindow(FALSE);
00179     }
00180
00181     return TRUE;  // return TRUE unless you set the focus to a control
00182     // EXCEPTION: OCX Property Pages should return FALSE
00183 }
00184
00185 void CAnnotate_MAIN::InitHelpID()
00186 {
00187     SetCtrlHelpID(IDC_HAS_REV,          IDH_IDC_HAS_REV);
00188     SetCtrlHelpID(IDC_ISDATE,           IDH_IDC_ISDATE);
00189     SetCtrlHelpID(IDC_REV_TAG_DATE,     IDH_IDC_REV_TAG_DATE);
00190     SetCtrlHelpID(IDC_BROWSE_TAG,       IDH_IDC_BROWSE_TAG);
00191     SetCtrlHelpID(IDC_FORCE_HEAD_REV,   IDH_IDC_FORCE_HEAD_REV);
00192     SetCtrlHelpID(IDC_NORECURS,         IDH_IDC_NORECURS);
00193 }
00194
00196 void CAnnotate_MAIN::OnSpecifyRev()
00197 {
00198     const BOOL bEnable = m_hasRevCheck.GetCheck();
00199
00200     m_isDateCheck.EnableWindow(bEnable);
00201     m_revCombo.EnableWindow(bEnable);
00202     m_forceCheck.EnableWindow(bEnable);
00203     m_browseTagButton.EnableWindow(bEnable && !m_isDateCheck.GetCheck());
00204 }
00205
00207 void CAnnotate_MAIN::OnIsdate()
00208 {
00209     const BOOL isDate = m_isDateCheck.GetCheck();
00210
00211     m_revCombo.SetItems(isDate ? &gDateNames : &gRevNames);
00212     DDX_ComboMString(NULL, IDC_REV_TAG_DATE, m_revCombo);
00213
00214     m_browseTagButton.EnableWindow(!isDate);
00215 }
00216
00218 void CAnnotate_MAIN::OnBrowseTag()
00219 {
00220     CStr tagName;
00221     if( CompatGetTagListItem(m_mf, tagName) )
00222     {
00223         m_rev = (const char*)tagName;
00224         m_revCombo.SetWindowText(m_rev);
00225     }
00226 }
00227
00228 #endif /* WIN32 */
00229
00231 bool CompatGetAnnotate(const MultiFiles* mf, kAnnotateCmdType annotateType,
00232                        bool& noRecurs, bool& isDate, CPStr& rev, bool& force)
00233 {
00234     bool userHitOK = false;
00235
00236     static CPStr sLastRev;
00237     static bool bIsDate = false;
00238
00239     bool hasRev = false;
00240     CPStr initialRev;
00241
00242     // Graph view diff supplies initial revisions, so don't override them
00243     if( annotateType == kAnnotateGraph )
00244     {
00245         initialRev = rev;
00246         hasRev = !rev.empty();
00247     }
00248     else
00249     {
00250         rev = "";
00251         hasRev = false;
00252         initialRev = sLastRev;
00253     }
00254
00255     noRecurs = false;
00256     force = false;
00257     isDate = bIsDate;
00258
00259 #ifdef WIN32
00260     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgAnnotate(), "Annotate settings");
00261     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00262
00263     CAnnotate_MAIN page1(mf, annotateType, initialRev, isDate);
00264     CGetPrefs_GLOBALS page2;
00265
00266     pages.AddPage(&page1);
00267     pages.AddPage(&page2);
00268
00269     if( pages.DoModal() == IDOK )
00270     {
00271         noRecurs = page1.m_noRecurse == TRUE;
00272
00273         sLastRev = page1.m_rev;
00274         isDate = page1.m_isDate == TRUE;
00275         hasRev = page1.m_hasRev == TRUE;
00276         force = page1.m_force == TRUE;
00277
00278         page2.StoreValues();
00279         gCvsPrefs.SetHideCommandDlgAnnotate(pages.GetHideCommandDlg());
00280         userHitOK = true;
00281     }
00282 #endif /* WIN32 */
00283
00284 #ifdef qMacCvsPP
00285   userHitOK = true;
00286 #endif /* qMacCvsPP */
00287
00288 #if qUnix
00289 #endif // qUnix
00290
00291     if( userHitOK )
00292     {
00293         if( hasRev )
00294             rev = sLastRev;
00295
00296         bIsDate = isDate;
00297
00298         gCvsPrefs.save();
00299     }
00300
00301     return userHitOK;
00302 }
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsGraph.cpp Source File

common/UCvsGraph.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <sys/stat.h>
00028
00029 #ifdef HAVE_UNISTD_H
00030 #include <unistd.h>
00031 #endif
00032
00033 #include "UCvsGraph.h"
00034 #include "UCvsFiles.h"
00035 #include "CvsEntries.h"
00036 #include "AppConsole.h"
00037 #include "LogParse.h"
00038
00039 UIMPLEMENT_DYNAMIC(UCvsGraph, UWidget)
00040
00041 UBEGIN_MESSAGE_MAP(UCvsGraph, UWidget)
00042     ON_UDESTROY(UCvsGraph)
00043     ON_UCREATE(UCvsGraph)
00044     ON_CUSTOM_DRAW(UCvsGraph::kDrawing, UCvsGraph::OnDrawing)
00045     ON_CUSTOM_CLICK(UCvsGraph::kDrawing, UCvsGraph::OnBtnClick)
00046     ON_RESIZE(UCvsGraph::kDrawing, UCvsGraph::OnDrawing)
00047 UEND_MESSAGE_MAP()
00048
00049 UCvsGraph::UCvsGraph(CLogNode *node, const char *dir) :
00050     UWidget(::UEventGetWidID()), m_node(node), m_dir(dir), m_data(0L)
00051 {
00052     // get the CVS/Entries infos for this file
00053     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00054     if(!Entries_Open (entries, dir))
00055     {
00056         cvs_err("Warning : Error while accessing the CVS folder in '%s'\n", dir);
00057     }
00058     else
00059     {
00060         if(node->GetType() != kNodeHeader)
00061         {
00062             cvs_err("Warning : Top node is not a RCS file description !\n");
00063         }
00064         else
00065         {
00066             const char *name = (**(CLogNodeHeader *)node).WorkingFile();
00067             struct stat sb;
00068             if (stat(name, &sb) == -1)
00069             {
00070                 cvs_err("Warning : Unknown file '%s'\n", name);
00071             }
00072             else
00073             {
00074                 m_data = Entries_SetVisited(dir, entries, name, sb, false);
00075                 m_data->Ref();
00076                 m_name = name;
00077             }
00078         }
00079     }
00080 }
00081
00082 UCvsGraph::~UCvsGraph()
00083 {
00084     if(m_node != 0L)
00085         delete m_node;
00086     if(m_data != 0L)
00087         m_data->UnRef();
00088 }
00089
00090 void UCvsGraph::OnDestroy(void)
00091 {
00092     delete this;
00093 }
00094
00095 void UCvsGraph::OnCreate(void)
00096 {
00097     UStr title("Graph log : ");
00098     title << m_name;
00099     UEventSendMessage(GetWidID(), EV_SETTEXT, kUMainWidget, (void *)(const char *)title);
00100 }
00101
00102 USize CWinLogHeaderData::GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo)
00103 {
00104     CLogNodeHeader & header = *(CLogNodeHeader *)fNode;
00105     return hdc.GetTextExtent((*header).WorkingFile(),
00106         (*header).WorkingFile().length());
00107 }
00108
00109 static void DrawNode(UDC & hdc, const URect & selfB,
00110                      UCOLORREF contour, UCOLORREF shadowc,
00111                      bool isRounded, bool issel)
00112 {
00113     UPen *pOldPen = 0L;
00114     UBrush *pOldBrush = 0L;
00115     UPen pen, pen2;
00116     UBrush brush;
00117     UCOLORREF selcolor = URGB(160, 160, 160);
00118     UCOLORREF wcolor = URGB(255, 255, 255);
00119
00120     try
00121     {
00122         if(!isRounded)
00123         {
00124             if(!issel)
00125             {
00126                 brush.CreateSolidBrush(wcolor);
00127                 pOldBrush = hdc.SelectObject(&brush);
00128                 pen.CreatePen(UPS_SOLID, 1, contour);
00129                 pOldPen = hdc.SelectObject(&pen);
00130                 hdc.Rectangle(selfB);
00131             }
00132             else
00133             {
00134                 brush.CreateSolidBrush(selcolor);
00135                 pOldBrush = hdc.SelectObject(&brush);
00136                 pen.CreatePen(UPS_SOLID, 1, contour);
00137                 pOldPen = hdc.SelectObject(&pen);
00138                 hdc.Rectangle(selfB);
00139             }
00140         }
00141         else
00142         {
00143             URect shadow;
00144             if(!issel)
00145             {
00146                 brush.CreateSolidBrush(shadowc);
00147                 pOldBrush = hdc.SelectObject(&brush);
00148                 pen.CreatePen(UPS_SOLID, 1, shadowc);
00149                 pOldPen = hdc.SelectObject(&pen);
00150                 shadow = selfB;
00151                 shadow.OffsetRect(UPoint(2, 2));
00152                 hdc.RoundRect(&shadow, UPoint(6, 6));
00153
00154                 brush.DeleteObject();
00155                 brush.CreateSolidBrush(wcolor);
00156                 hdc.SelectObject(&brush);
00157                 pen2.CreatePen(UPS_SOLID, 1, contour);
00158                 hdc.SelectObject(&pen2);
00159                 hdc.RoundRect(selfB, UPoint(6, 6));
00160             }
00161             else
00162             {
00163                 brush.CreateSolidBrush(shadowc);
00164                 pOldBrush = hdc.SelectObject(&brush);
00165                 pen.CreatePen(UPS_SOLID, 1, shadowc);
00166                 pOldPen = hdc.SelectObject(&pen);
00167                 shadow = selfB;
00168                 shadow.OffsetRect(UPoint(2, 2));
00169                 hdc.RoundRect(&shadow, UPoint(6, 6));
00170
00171                 brush.DeleteObject();
00172                 brush.CreateSolidBrush(selcolor);
00173                 hdc.SelectObject(&brush);
00174                 pen2.CreatePen(UPS_SOLID, 1, contour);
00175                 hdc.SelectObject(&pen2);
00176                 hdc.RoundRect(selfB, UPoint(6, 6));
00177             }
00178         }
00179
00180         if (pOldPen != 0L)
00181         {
00182             hdc.SelectObject(pOldPen);
00183             pOldPen = 0L;
00184         }
00185         if (pOldBrush != 0L)
00186         {
00187             hdc.SelectObject(pOldBrush);
00188             pOldBrush = 0L;
00189         }
00190
00191         pen.DeleteObject();
00192         pen2.DeleteObject();
00193         brush.DeleteObject();
00194     }
00195     catch(...)
00196     {
00197         if (pOldPen != 0L)
00198             hdc.SelectObject(pOldPen);
00199         if (pOldBrush != 0L)
00200             hdc.SelectObject(pOldBrush);
00201     }
00202 }
00203
00204 void CWinLogHeaderData::UpdateSelf(UDC & hdc, EntnodeData *entryInfo)
00205 {
00206     // draw the node
00207     ::DrawNode(hdc, selfB, URGB(255, 0, 0), URGB(120, 0, 0), true, sel);
00208
00209     // draw the content of the node
00210     UPoint center = selfB.CenterPoint();
00211     int nCenterX = center.x;
00212     int nCenterY = center.y - hdc.GetTextHeight()/2;
00213     CLogNodeHeader & header = *(CLogNodeHeader *)fNode;
00214     hdc.TextOutClipped(nCenterX, nCenterY, &selfB,
00215         (*header).WorkingFile(), (*header).WorkingFile().length());
00216 }
00217
00218 USize CWinLogRevData::GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo)
00219 {
00220     CLogNodeRev & rev = *(CLogNodeRev *)fNode;
00221     USize size = hdc.GetTextExtent((*rev).RevNum().c_str(),
00222         strlen((*rev).RevNum().c_str()));
00223     if(IsDiskNode(entryInfo))
00224     {
00225         size.cx += 2 + 16 + 2;
00226         size.cy = std::max(16, size.cy);
00227     }
00228     return size;
00229 }
00230
00231 void CWinLogRevData::UpdateSelf(UDC & hdc, EntnodeData *entryInfo)
00232 {
00233     URect txtRect = selfB;
00234
00235     if(IsDiskNode(entryInfo))
00236     {
00237         txtRect.left += 2 + 16 + 2;
00238     }
00239
00240     // draw the node
00241     ::DrawNode(hdc, selfB, URGB(0, 0, 255), URGB(0, 0, 0), false, sel);
00242
00243     // draw the state icon if it is the rev. of the disk
00244     if(IsDiskNode(entryInfo))
00245     {
00246         UPoint w(selfB.TopLeft());
00247         w.x += 2;
00248         w.y += (selfB.Height() - 16) / 2;
00249         hdc.DrawBitmap(UCvsFiles::GetImageForEntry(entryInfo), w);
00250     }
00251
00252     // draw the content of the node
00253     UPoint center = txtRect.CenterPoint();
00254     int nCenterX = center.x;
00255     int nCenterY = center.y - hdc.GetTextHeight()/2;
00256     CLogNodeRev & rev = *(CLogNodeRev *)fNode;
00257     hdc.TextOutClipped(nCenterX, nCenterY, &txtRect,
00258             (*rev).RevNum().c_str(), strlen((*rev).RevNum().c_str()));
00259 }
00260
00261 USize CWinLogTagData::GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo)
00262 {
00263     CLogNodeTag & tag = *(CLogNodeTag *)fNode;
00264     return hdc.GetTextExtent(*tag, (*tag).length());
00265 }
00266
00267 void CWinLogTagData::UpdateSelf(UDC & hdc, EntnodeData *entryInfo)
00268 {
00269     // draw the node
00270     ::DrawNode(hdc, selfB, URGB(0, 0, 0), URGB(120, 120, 120), true, sel);
00271
00272     // draw the content of the node
00273     UPoint center = selfB.CenterPoint();
00274     int nCenterX = center.x;
00275     int nCenterY = center.y - hdc.GetTextHeight()/2;
00276     CLogNodeTag & tag = *(CLogNodeTag *)fNode;
00277     hdc.TextOutClipped(nCenterX, nCenterY, &selfB,
00278         *tag, (*tag).length());
00279 }
00280
00281 USize CWinLogBranchData::GetBoundsSelf(UDC & hdc, EntnodeData *entryInfo)
00282 {
00283     CLogNodeBranch & branch = *(CLogNodeBranch *)fNode;
00284     return hdc.GetTextExtent(*branch, (*branch).length());
00285 }
00286
00287 void CWinLogBranchData::UpdateSelf(UDC & hdc, EntnodeData *entryInfo)
00288 {
00289     // draw the node
00290     ::DrawNode(hdc, selfB, URGB(0, 0, 255), URGB(0, 0, 120), true, sel);
00291
00292     // draw the content of the node
00293     UPoint center = selfB.CenterPoint();
00294     int nCenterX = center.x;
00295     int nCenterY = center.y - hdc.GetTextHeight()/2;
00296     CLogNodeBranch & branch = *(CLogNodeBranch *)fNode;
00297     hdc.TextOutClipped(nCenterX, nCenterY, &selfB,
00298         *branch, (*branch).length());
00299 }
00300
00301 CWinLogData::CWinLogData(CLogNode *node) : CLogNodeData(node)
00302 {
00303     selfB.SetRectEmpty();
00304     totB.SetRectEmpty();
00305     sel = false;
00306 }
00307
00308 CWinLogData::~CWinLogData()
00309 {
00310 }
00311
00312 const char *CWinLogData::GetStr(void)
00313 {
00314     switch(GetType())
00315     {
00316         case kNodeHeader :
00317         {
00318             CLogNodeHeader & header = *(CLogNodeHeader *)fNode;
00319             return (*header).WorkingFile();
00320             break;
00321         }
00322         case kNodeBranch :
00323         {
00324             CLogNodeBranch & branch = *(CLogNodeBranch *)fNode;
00325             return *branch;
00326             break;
00327         }
00328         case kNodeRev :
00329         {
00330             CLogNodeRev & rev = *(CLogNodeRev *)fNode;
00331             return (*rev).RevNum().c_str();
00332             break;
00333         }
00334         case kNodeTag :
00335         {
00336             CLogNodeTag & tag = *(CLogNodeTag *)fNode;
00337             return *tag;
00338             break;
00339         }
00340     }
00341     return 0L;
00342 }
00343
00344 CWinLogData * CWinLogData::CreateNewData(CLogNode *node)
00345 {
00346     if(node->GetUserData() != 0L)
00347         return (CWinLogData *)node->GetUserData();
00348
00349     CWinLogData *res = 0L;
00350     switch(node->GetType())
00351     {
00352     case kNodeHeader :
00353         res = new CWinLogHeaderData(node);
00354         break;
00355     case kNodeBranch :
00356         res = new CWinLogBranchData(node);
00357         break;
00358     case kNodeRev :
00359         res = new CWinLogRevData(node);
00360         break;
00361     case kNodeTag :
00362         res = new CWinLogTagData(node);
00363         break;
00364     }
00365     node->SetUserData(res);
00366     return res;
00367 }
00368
00369 bool CWinLogData::IsDiskNode(EntnodeData *entryInfo)
00370 {
00371     if(entryInfo == 0L || GetType() != kNodeRev)
00372         return false;
00373     const char *vn = (*entryInfo)[EntnodeFile::kVN];
00374     if(vn == 0L)
00375         return false;
00376
00377     return strcmp(vn, (**(CLogNodeRev *)fNode).RevNum().c_str()) == 0;
00378 }
00379
00380 const int kVChildSpace = 8;
00381 const int kHChildSpace = 40;
00382 const int kInflateNodeSpace = 8;
00383
00384 void CWinLogData::Offset(UPoint o)
00385 {
00386     selfB.OffsetRect(o);
00387     totB.OffsetRect(o);
00388     std::vector<CLogNode *>::iterator i;
00389     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00390     {
00391         CLogNode *subNode = *i;
00392         GetData(subNode)->Offset(o);
00393     }
00394     if(fNode->Next() != 0L)
00395         GetData(fNode->Next())->Offset(o);
00396 }
00397
00398
00399 void CWinLogData::SetSelected(CScrollView *view, bool state)
00400 {
00401     sel = state;
00402
00403     URect invalR = selfB;
00404     invalR.OffsetRect(-view->GetDeviceScrollPosition());
00405     view->InvalidateRect(&invalR);
00406 }
00407
00408 void CWinLogData::UnselectAll(CScrollView *view)
00409 {
00410     if(sel)
00411     {
00412         if(view != NULL)
00413             SetSelected(view, false);
00414         else
00415             SetSelected(false);
00416     }
00417
00418     std::vector<CLogNode *>::iterator i;
00419     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00420     {
00421         CLogNode *subNode = *i;
00422         GetData(subNode)->UnselectAll(view);
00423     }
00424     if(fNode->Next() != 0L)
00425         GetData(fNode->Next())->UnselectAll(view);
00426 }
00427
00428 void CWinLogData::UnselectAll(void)
00429 {
00430     CWinLogData::UnselectAll(NULL);
00431 }
00432
00433 CWinLogData *CWinLogData::HitTest(UPoint point)
00434 {
00435     if(!totB.PtInRect(point))
00436         return 0L;
00437     if(selfB.PtInRect(point))
00438         return this;
00439
00440     CWinLogData *result;
00441     std::vector<CLogNode *>::iterator i;
00442     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00443     {
00444         CLogNode *subNode = *i;
00445         result = GetData(subNode)->HitTest(point);
00446         if(result != 0L)
00447             return result;
00448     }
00449     if(fNode->Next() != 0L)
00450     {
00451         result = GetData(fNode->Next())->HitTest(point);
00452         if(result != 0L)
00453             return result;
00454     }
00455     return 0L;
00456 }
00457
00458 void CWinLogData::Update(UDC & hdc, EntnodeData *entryInfo)
00459 {
00460     CLogNode *subNode;
00461     CLogNode *nextNode = fNode->Next();
00462     UPen *pOldPen = 0L;
00463     UPen pen, pen2;
00464
00465     UpdateSelf(hdc, entryInfo);
00466
00467     try
00468     {
00469         pen.CreatePen(UPS_SOLID, 2, URGB(0, 0, 255));
00470         pen2.CreatePen(UPS_SOLID, 1, URGB(0, 0, 0));
00471         pOldPen = hdc.SelectObject(&pen);
00472
00473         int topY = selfB.TopLeft().y + 2;
00474         int botY = selfB.BottomRight().y - 2;
00475         int lefX = selfB.BottomRight().x + 4;
00476         int count = 1;
00477         int tot = fNode->Childs().size() + 1;
00478
00479         // draw the children
00480         std::vector<CLogNode *>::iterator i;
00481         for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i, ++count)
00482         {
00483             subNode = *i;
00484
00485             // draw the link
00486             URect & cb = GetData(subNode)->SelfBounds();
00487             if(subNode->GetType() == kNodeRev || subNode->GetType() == kNodeBranch)
00488                 hdc.SelectObject(&pen);
00489             else
00490                 hdc.SelectObject(&pen2);
00491             float y = (float)topY + (float)(botY - topY) *
00492                 (float)count / (float)tot;
00493             int rigX = cb.TopLeft().x - 4;
00494             float x = (float)rigX - (float)(rigX - lefX) *
00495                 (float)count / (float)tot;
00496             //int halfX = (cb.TopLeft().x - selfB.BottomRight().x) / 2;
00497             hdc.MoveTo(selfB.BottomRight().x, (int)y);
00498             hdc.LineTo((int)x, (int)y);
00499             hdc.LineTo((int)x, cb.CenterPoint().y);
00500             hdc.LineTo(cb.TopLeft().x, cb.CenterPoint().y);
00501
00502             // draw the sub-node
00503             GetData(subNode)->Update(hdc, entryInfo);
00504         }
00505
00506         // draw the next node
00507         if(nextNode != 0L)
00508         {
00509             // draw the link
00510             URect & nb = GetData(nextNode)->SelfBounds();
00511             if(nextNode->GetType() == kNodeRev || nextNode->GetType() == kNodeBranch)
00512                 hdc.SelectObject(&pen);
00513             else
00514                 hdc.SelectObject(&pen2);
00515             int centerX = selfB.Width() < nb.Width() ?
00516                 selfB.CenterPoint().x : nb.CenterPoint().x;
00517             hdc.MoveTo(centerX, selfB.BottomRight().y);
00518             hdc.LineTo(centerX, nb.TopLeft().y);
00519
00520             // draw the next node
00521             GetData(nextNode)->Update(hdc, entryInfo);
00522         }
00523
00524         if (pOldPen != 0L)
00525         {
00526             hdc.SelectObject(pOldPen);
00527             pOldPen = 0L;
00528         }
00529
00530         pen.DeleteObject();
00531         pen2.DeleteObject();
00532     }
00533     catch(...)
00534     {
00535         if (pOldPen != 0L)
00536             hdc.SelectObject(pOldPen);
00537     }
00538 }
00539
00540 void CWinLogData::ComputeBounds(const UPoint & topLeft, UDC & hdc,
00541                                 EntnodeData *entryInfo)
00542 {
00543     CLogNode *subNode;
00544     CLogNode *nextNode = fNode->Next();
00545
00546     // first compute childrens bounds
00547     std::vector<CLogNode *>::iterator i;
00548     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00549     {
00550         subNode = *i;
00551         CWinLogData::CreateNewData(subNode);
00552         GetData(subNode)->ComputeBounds(topLeft, hdc, entryInfo);
00553     }
00554     if(nextNode != 0L)
00555         CWinLogData::CreateNewData(nextNode);
00556
00557     // compute self place
00558     selfB.SetRectEmpty();
00559     USize size = GetBoundsSelf(hdc, entryInfo);
00560     size.cx += kInflateNodeSpace;
00561     size.cy += kInflateNodeSpace;
00562     selfB.SetRect(0, 0, size.cx, size.cy);
00563
00564     // offset to the place assigned to this node
00565     selfB.OffsetRect(topLeft - selfB.TopLeft());
00566
00567     // calculate the total height of the childrens
00568     int vSize = 0;
00569     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00570     {
00571         subNode = *i;
00572         URect & b = GetData(subNode)->Bounds();
00573         vSize += b.Height();
00574     }
00575     if(!fNode->Childs().empty())
00576         vSize += (fNode->Childs().size() - 1) * kVChildSpace;
00577
00578     // offset the children relative to self
00579     UPoint startChilds(topLeft.x + selfB.Width() + kHChildSpace,
00580         /*selfB.CenterPoint().y - vSize / 2*/topLeft.y);
00581     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00582     {
00583         subNode = *i;
00584         URect curPos = GetData(subNode)->Bounds();
00585         GetData(subNode)->Offset(startChilds - curPos.TopLeft());
00586         startChilds.y += curPos.Height() + kVChildSpace;
00587     }
00588
00589     // calculate the total bounds of the childrens
00590     URect bc;
00591     bc.SetRectEmpty();
00592     for(i = fNode->Childs().begin(); i != fNode->Childs().end(); ++i)
00593     {
00594         subNode = *i;
00595         URect & b = GetData(subNode)->Bounds();
00596         bc.UnionRect(&bc, &b);
00597     }
00598
00599     // now we got the complete size
00600     totB.UnionRect(&selfB, &bc);
00601
00602     if(nextNode != 0L)
00603     {
00604         UPoint nextTopLeft;
00605         nextTopLeft.x = totB.TopLeft().x;
00606         nextTopLeft.y = totB.BottomRight().y + kVChildSpace;
00607         GetData(nextNode)->ComputeBounds(nextTopLeft, hdc, entryInfo);
00608
00609         totB.UnionRect(&totB, &GetData(nextNode)->Bounds());
00610     }
00611 }
00612
00613 void UCvsGraph::CalcImageSize(void)
00614 {
00615     if(m_node == 0L)
00616         return;
00617
00618     // set all the bounds locations
00619     UDC dc(GetWidID(), kDrawing);
00620     CWinLogData *data = CWinLogData::CreateNewData(m_node);
00621     m_node->SetUserData(data);
00622     UPoint start(5, 5);
00623     data->ComputeBounds(start, dc, m_data);
00624
00625     // reoffset from (0, 0)
00626     URect bounds = data->Bounds();
00627     data->Offset(start - bounds.TopLeft());
00628     bounds = data->Bounds();
00629
00630 #if qGTK
00631     GtkWidget *layout = (GtkWidget *)GetWidget(kDrawing);
00632     gtk_drawing_area_size(GTK_DRAWING_AREA(layout), bounds.Width()+5, bounds.Height()+5);
00633 #endif
00634 #if 0
00635     // set the scroll size
00636     SetScrollSizes(MM_TEXT, bounds.Size() + USize(5, 5));
00637 #endif
00638 }
00639
00640 void UCvsGraph::OnDrawing(void *info)
00641 {
00642 #if qGTK
00643     GdkEventExpose *event = (GdkEventExpose *)info;
00644     GtkDrawingArea *drawing = GTK_DRAWING_AREA(GetWidget(kDrawing));
00645     gdk_window_clear_area (drawing->widget.window,
00646                            event->area.x, event->area.y,
00647                            event->area.width, event->area.height);
00648     //fprintf(stderr,"Area: x: %d, y:%d, width: %d, height:%d\n",
00649     //      event->area.x, event->area.y, event->area.width, event->area.height);
00650 #endif
00651     CalcImageSize();
00652
00653     if(m_node == 0L || m_node->GetUserData() == 0L)
00654         return;
00655
00656     OnBlockHandler(drawing, kDrawing, GDK_EXPOSE);
00657
00658     UDC dc(GetWidID(), kDrawing);
00659     CWinLogData *data = (CWinLogData *)m_node->GetUserData();
00660     data->Update(dc, m_data);
00661
00662     while (gtk_events_pending())
00663           gtk_main_iteration();
00664
00665     OnUnblockHandler(drawing, kDrawing, GDK_EXPOSE);
00666
00667     /*  GtkWidget *widget = (GtkWidget *)GetWidget(kDrawing);
00668     if(widget == 0L)
00669         return;
00670
00671     GtkDrawingArea *darea;
00672     GdkDrawable *drawable;
00673     GdkGC *black_gc;
00674     GdkGC *gray_gc;
00675     GdkGC *white_gc;
00676     guint max_width;
00677     guint max_height;
00678
00679     g_return_if_fail (widget != NULL);
00680     g_return_if_fail (GTK_IS_DRAWING_AREA (widget));
00681
00682     darea = GTK_DRAWING_AREA (widget);
00683     drawable = widget->window;
00684     white_gc = widget->style->white_gc;
00685     gray_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
00686     black_gc = widget->style->black_gc;
00687     max_width = widget->allocation.width;
00688     max_height = widget->allocation.height;
00689     gdk_draw_rectangle (drawable, black_gc,
00690                         TRUE,
00691                         0,
00692                         max_height / 2,
00693                         max_width,
00694                         max_height / 2);*/
00695 }
00696
00697 void UCvsGraph::OnBtnClick(void *info)
00698 {
00699     GdkEventButton *event = (GdkEventButton *)info;
00700     UPoint point((int)event->x, (int)event->y);
00701     int nFlags = event->state;
00702     CWinLogData *data = (CWinLogData *)m_node->GetUserData();
00703     UDC dc(GetWidID(), kDrawing);
00704
00705     //fprintf(stderr,"x: %f, y:%f, x_root: %f, y_root:%f, state:%d, button:%d\n",
00706     //              event->x, event->y, event->x_root, event->y_root, event->state, event->button);
00707
00708     if(event->button & UK_LBUTTON ) {
00709         if((nFlags & GDK_SHIFT_MASK) == 0 && (nFlags & GDK_CONTROL_MASK) == 0)
00710             data->UnselectAll();
00711
00712         CWinLogData *hit = data->HitTest(point);
00713
00714         if(hit != 0L) {
00715             if((nFlags & GDK_SHIFT_MASK) == 0 && (nFlags & GDK_CONTROL_MASK) == 0) {
00716                 if(!hit->Selected()) {
00717                     CColorConsole out;
00718
00719                     hit->SetSelected(true);
00720
00721                     CvsLogOutput(out, hit->Node());
00722                 }
00723             } else {
00724                 hit->SetSelected(!hit->Selected());
00725             }
00726
00727             data->Update(dc, m_data);
00728         }
00729     }
00730 }
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CustomizeMenus.cpp Source File

WinCvs/CustomizeMenus.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 2000
00019  */
00020
00021 // CustomizeMenus.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include "CustomizeMenus.h"
00027 #include "MacrosSetup.h"
00028 #include "wincvs_winutil.h"
00029 #include "MMenuString.h"
00030 #include "CvsPrefs.h"
00031
00032 #ifdef _DEBUG
00033 #define new DEBUG_NEW
00034 #undef THIS_FILE
00035 static char THIS_FILE[] = __FILE__;
00036 #endif
00037
00039 #define INVTAB(msg, e) {msg, #e, e}
00040
00042 char* sDefBrowserMenu[] =
00043 {
00044     "ID_VIEW_UPDATE",
00045     "ID_VIEW_COMMIT",
00046     "ID_SEPARATOR",
00047     "ID_VIEW_EXPLORE",
00048     "ID_VIEW_NEWINSTANCE",
00049     "ID_VIEW_QUERYUPDATE",
00050     "ID_VIEW_RELOAD",
00051     "ID_SEPARATOR",
00052     "ID_VIEW_IMPORT",
00053     "ID_VIEW_CHECKOUT",
00054     0L
00055 };
00056
00058 char* sDefFilesMenu[] =
00059 {
00060     "ID_VIEW_UPDATE",
00061     "ID_VIEW_COMMIT",
00062     "ID_SEPARATOR",
00063     "ID_VIEW_EXPLORE",
00064     "ID_VIEW_NEWINSTANCE",
00065     "ID_VIEW_QUERYUPDATE",
00066     "ID_VIEW_RELOAD",
00067     "ID_SEPARATOR",
00068     "ID_VIEW_EDITSEL",
00069     "ID_VIEW_EDITSELDEF",
00070     "ID_VIEW_OPENSEL",
00071     "ID_VIEW_OPENSELAS",
00072     "ID_SEPARATOR",
00073     "ID_VIEW_DIFF",
00074     "ID_VIEW_LOG",
00075     "ID_VIEW_STATUS",
00076     "ID_VIEW_GRAPH",
00077     "ID_QUERY_ANNOTATE",
00078     0L
00079 };
00080
00081 static CMMenuString gFilesMenu(99, "P_FilesMenu", sDefFilesMenu);
00082 static CMMenuString gBrowserMenu(99, "P_BrowserMenu", sDefBrowserMenu);
00083
00085 static CustInvertTable sInitInvTable[] =
00086 {
00087     INVTAB("Separator",                     ID_SEPARATOR),
00088     INVTAB("Pr&eferences...\tCtrl+F1",      ID_APP_PREFERENCES),
00089     INVTAB("&Command Line...",              ID_APP_CMDLINE),
00090     INVTAB("&Login...",                     ID_APP_LOGIN),
00091     INVTAB("Lo&gout",                       ID_APP_LOGOUT),
00092     INVTAB("&Stop cvs",                     ID_STOPCVS),
00093     INVTAB("&Create a new repository...",   ID_VIEW_INIT),
00094     INVTAB("&Import module...",             ID_VIEW_IMPORT),
00095     INVTAB("Chec&kout module...",           ID_VIEW_CHECKOUT),
00096     INVTAB("Create a &tag by module...",    ID_APP_RTAGCREATE),
00097     INVTAB("&Delete a tag by module...",    ID_APP_RTAGDELETE),
00098     INVTAB("Create a &branch by module...", ID_APP_RTAGBRANCH),
00099     INVTAB("&Update...\tCtrl+U",            ID_VIEW_UPDATE),
00100     INVTAB("Co&mmit...\tCtrl+M",            ID_VIEW_COMMIT),
00101     INVTAB("&Add",                          ID_VIEW_ADD),
00102     INVTAB("Add &binary",                   ID_VIEW_ADDB),
00103     INVTAB("Add &unicode",                  ID_VIEW_ADDU),
00104     INVTAB("&Remove",                       ID_VIEW_RMV),
00105     INVTAB("&Erase\tCtrl+Backspace",        ID_VIEW_TRASH),
00106     INVTAB("Create a &tag...",              ID_VIEW_TAGNEW),
00107     INVTAB("&Delete a tag...",              ID_VIEW_TAGDELETE),
00108     INVTAB("Create a &branch...",           ID_VIEW_TAGBRANCH),
00109     INVTAB("E&xplore\tF2",                  ID_VIEW_EXPLORE),
00110     INVTAB("Open in new instance\tCtrl+F2", ID_VIEW_NEWINSTANCE),
00111     INVTAB("P&roperties\tAlt+Enter",        ID_QUERY_PROPERTIES),
00112     INVTAB("&Query Update\tCtrl+Q",         ID_VIEW_QUERYUPDATE),
00113     INVTAB("R&eload view\tF5",              ID_VIEW_RELOAD),
00114     INVTAB("&Shell-edit\tEnter",            ID_VIEW_EDITSEL),
00115     INVTAB("E&dit with editor\tCtrl+F4",    ID_VIEW_EDITSELDEF),
00116     INVTAB("&Open\tF7",                     ID_VIEW_OPENSEL),
00117     INVTAB("Open &with...\tCtrl+F7",        ID_VIEW_OPENSELAS),
00118     INVTAB("&Shell default\tShift+F3",      ID_QUERY_SHELLACTION_DEFAULT),
00119     INVTAB("&Diff\tCtrl+D",                 ID_VIEW_DIFF),
00120     INVTAB("&Log...",                       ID_VIEW_LOG),
00121     INVTAB("&Status",                       ID_VIEW_STATUS),
00122     INVTAB("&Graph...\tCtrl+G",             ID_VIEW_GRAPH),
00123     INVTAB("&Annotate...",                  ID_QUERY_ANNOTATE),
00124     INVTAB("&Unlock",                       ID_VIEW_UNLOCKF),
00125     INVTAB("&Edit",                         ID_VIEW_EDIT),
00126     INVTAB("Reserve&d edit",                ID_VIEW_RESERVEDEDIT),
00127     INVTAB("&Force edit",                   ID_VIEW_FORCEEDIT),
00128     INVTAB("&Unedit",                       ID_VIEW_UNEDIT),
00129     INVTAB("&Add a Watch",                  ID_VIEW_WATCHON),
00130     INVTAB("&Remove a watch",               ID_VIEW_WATCHOFF),
00131     INVTAB("&Release",                      ID_VIEW_RELEASE),
00132     INVTAB("&Watchers",                     ID_VIEW_WATCHERS),
00133     INVTAB("E&ditors",                      ID_VIEW_EDITORS),
00134     {0L, 0L, 0}
00135 };
00136
00138 class CCustInvertTable : public std::vector<CustInvertTable>
00139 {
00140 public:
00141     // Construction
00142     CCustInvertTable();
00143     virtual ~CCustInvertTable();
00144
00145     // Interface
00146     void Initialize();
00147
00148 protected:
00149     // Data members
00150     std::vector<char*> m_garbage;
00151 } sInvTable;
00152
00158 const CustInvertTable* CustGetByKey(const char* entry)
00159 {
00160     std::vector<CustInvertTable>::const_iterator tmp;
00161     sInvTable.Initialize();
00162
00163     for(tmp = sInvTable.begin(); tmp != sInvTable.end(); ++tmp)
00164     {
00165         if( strcmp(entry, (*tmp).key) == 0 )
00166             return &*tmp;
00167     }
00168
00169     return NULL;
00170 }
00171
00173 CMenu* GetCustomMenu(int whichmenu, CView* pThis)
00174 {
00175     CMMenuString* multiMenu;
00176
00177     switch(whichmenu)
00178     {
00179     case kCustomBrowserMenu:
00180         multiMenu = &gBrowserMenu;
00181         break;
00182     case kCustomFilesMenu:
00183         multiMenu = &gFilesMenu;
00184         break;
00185     default:
00186         ASSERT(0);
00187         return 0L;
00188     }
00189
00190     CMenu* res = new CMenu;
00191     VERIFY(res->CreatePopupMenu());
00192
00193     std::vector<UStr>& list = multiMenu->GetList();
00194     std::vector<UStr>::iterator i = list.begin();
00195
00196     while( i != list.end() )
00197     {
00198         const CustInvertTable* tab = CustGetByKey(*i);
00199         if( tab == 0L )
00200         {
00201             TRACE1("Removing old command(%s)\n", (const char*)*i);
00202
00203             list.erase(i);
00204             i = list.begin();
00205             continue;
00206         }
00207
00208         i++;
00209     }
00210
00211     for(i = list.begin(); i != list.end(); ++i)
00212     {
00213         const CustInvertTable* tab = CustGetByKey(*i);
00214         if( tab )
00215         {
00216             if( tab->cmd == ID_SEPARATOR )
00217             {
00218                 res->AppendMenu(MF_SEPARATOR);
00219             }
00220             else
00221             {
00222                 res->AppendMenu(MF_STRING, tab->cmd, tab->title);
00223             }
00224         }
00225     }
00226
00227     res->AppendMenu(MF_SEPARATOR);
00228     res->AppendMenu(MF_STRING, whichmenu == kCustomFilesMenu ? ID_CUST_FILES_MENU : ID_CUST_FOLDER_MENU, CString("Customize this menu..."));
00229
00230     UpdateUIMenu(res, pThis);
00231
00232     return res;
00233 }
00234
00236 void CustomizeMenus(int whichmenu)
00237 {
00238     CMMenuString *multiMenu;
00239
00240     switch( whichmenu )
00241     {
00242     case kCustomBrowserMenu:
00243         multiMenu = &gBrowserMenu;
00244         break;
00245     case kCustomFilesMenu:
00246         multiMenu = &gFilesMenu;
00247         break;
00248     default:
00249         ASSERT(FALSE);
00250         return;
00251     }
00252
00253     CCustomizeMenus custom(multiMenu);
00254     if( custom.DoModal() == IDOK )
00255     {
00256         gCvsPrefs.save();
00257     }
00258 }
00259
00265 static char* GetInvString(const CustInvertTable* entry)
00266 {
00267     static CString res;
00268     res = entry->title;
00269
00270     int ind;
00271     if( (ind = res.Find('&')) != -1 )
00272         res.Delete(ind);
00273
00274     if( (ind = res.Find('\t')) != -1 )
00275         res = res.Left(ind);
00276
00277     return (char*)(const char*)res;
00278 }
00279
00286 static bool IsInInvertList(const CustInvertTable* entry, const std::vector<UStr>& list)
00287 {
00288     for(std::vector<UStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00289     {
00290         const CustInvertTable* tab = CustGetByKey(*i);
00291         if( tab == 0L )
00292             continue;
00293
00294         if( strcmp(entry->key, tab->key) == 0 )
00295             return true;
00296     }
00297
00298     return false;
00299 }
00300
00302 static int CALLBACK CustMenuCompare(LPARAM data1, LPARAM data2, LPARAM data)
00303 {
00304     CustInvertTable* d1 = (CustInvertTable*)data1;
00305     CustInvertTable* d2 = (CustInvertTable*)data2;
00306
00307     CString s1(GetInvString(d1));
00308     CString s2(GetInvString(d2));
00309
00310     int cmp = strcmp(s1, s2);
00311     if( cmp == 0 )
00312         return 0;
00313
00314     if( d1->cmd == ID_SEPARATOR )
00315         return -1;
00316
00317     if( d2->cmd == ID_SEPARATOR )
00318         return 1;
00319
00320     return cmp;
00321 }
00322
00323 CCustInvertTable::CCustInvertTable()
00324 {
00325     // Init the cmd table with the static MFC commands
00326     const CustInvertTable* tmp = sInitInvTable;
00327     CustInvertTable newEntry;
00328
00329     while( tmp->key != 0L )
00330     {
00331         newEntry = *tmp;
00332         push_back(newEntry);
00333         tmp++;
00334     }
00335 }
00336
00337 CCustInvertTable::~CCustInvertTable()
00338 {
00339     std::vector<char *>::iterator i;
00340     for(i = m_garbage.begin(); i != m_garbage.end(); ++i)
00341     {
00342         free(*i);
00343     }
00344 }
00345
00349 void CCustInvertTable::Initialize()
00350 {
00351     if( m_garbage.size() != 0 )
00352         return;
00353
00354 #if 0 // fix me, Python
00355     vector<CMacroEntry>::const_iterator i;
00356     int cnt;
00357     CustInvertTable newEntry;
00358     for(cnt = 0, i = gMacrosAdmin.entries.begin(); i != gMacrosAdmin.entries.end(); ++i, cnt++)
00359     {
00360         newEntry.cmd = ID_MACRO_ADMIN + cnt;
00361         char *name = strdup((*i).name);
00362         m_garbage.push_back(name);
00363         newEntry.key = name;
00364         newEntry.title = name;
00365         push_back(newEntry);
00366     }
00367     for(cnt = 0, i = gMacrosSel.entries.begin(); i != gMacrosSel.entries.end(); ++i, cnt++)
00368     {
00369         newEntry.cmd = ID_MACRO_SEL + cnt;
00370         char *name = strdup((*i).name);
00371         m_garbage.push_back(name);
00372         newEntry.key = name;
00373         newEntry.title = name;
00374         push_back(newEntry);
00375     }
00376 #endif
00377 }
00378
00380 // CCustomizeMenus dialog
00381
00382
00383 CCustomizeMenus::CCustomizeMenus(CMMenuString* fromMenu, CWnd* pParent /*=NULL*/)
00384     : CHHelpDialog(CCustomizeMenus::IDD, pParent), m_Menu(fromMenu)
00385 {
00386     //{{AFX_DATA_INIT(CCustomizeMenus)
00387     //}}AFX_DATA_INIT
00388 }
00389
00390
00391 void CCustomizeMenus::DoDataExchange(CDataExchange* pDX)
00392 {
00393     CHHelpDialog::DoDataExchange(pDX);
00394     //{{AFX_DATA_MAP(CCustomizeMenus)
00395     DDX_Control(pDX, IDC_MENULIST, m_menuList);
00396     DDX_Control(pDX, IDC_ALLCMDS, m_cmdsList);
00397     DDX_Control(pDX, IDC_UP, m_upbtn);
00398     DDX_Control(pDX, IDC_REMOVE, m_removebtn);
00399     DDX_Control(pDX, IDC_DOWN, m_downbtn);
00400     DDX_Control(pDX, IDC_ADD, m_addbtn);
00401     //}}AFX_DATA_MAP
00402 }
00403
00404
00405 BEGIN_MESSAGE_MAP(CCustomizeMenus, CHHelpDialog)
00406     //{{AFX_MSG_MAP(CCustomizeMenus)
00407     ON_BN_CLICKED(IDC_REMOVE, OnRemove)
00408     ON_BN_CLICKED(IDC_ADD, OnAdd)
00409     ON_NOTIFY(LVN_ITEMCHANGED, IDC_ALLCMDS, OnItemchangedAllcmds)
00410     ON_NOTIFY(NM_DBLCLK, IDC_MENULIST, OnDblclkMenulist)
00411     ON_NOTIFY(NM_DBLCLK, IDC_ALLCMDS, OnDblclkAllcmds)
00412     ON_NOTIFY(LVN_ITEMCHANGED, IDC_MENULIST, OnItemchangedMenulist)
00413     ON_BN_CLICKED(IDC_DOWN, OnDown)
00414     ON_BN_CLICKED(IDC_UP, OnUp)
00415     ON_BN_CLICKED(IDHELP, OnHelp)
00416     //}}AFX_MSG_MAP
00417 END_MESSAGE_MAP()
00418
00420 // CCustomizeMenus message handlers
00421
00423 void CCustomizeMenus::OnRemove()
00424 {
00425     const int nItem = m_menuList.GetNextItem(-1, LVNI_SELECTED);
00426     if( nItem == -1 )
00427         return;
00428
00429     const CustInvertTable* data = (const CustInvertTable*)m_menuList.GetItemData(nItem);
00430
00431     if( data->cmd != ID_SEPARATOR )
00432     {
00433         LV_ITEM lvi;
00434         lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00435         lvi.iItem = m_cmdsList.GetItemCount();
00436         lvi.iSubItem = 0;
00437         lvi.lParam = (DWORD)data;
00438         lvi.pszText = GetInvString(data);
00439         lvi.iImage = GetIcon(data);
00440
00441         const int newItem = m_cmdsList.InsertItem(&lvi);
00442         if( newItem > -1 )
00443         {
00444             m_cmdsList.EnsureVisible(newItem, TRUE);
00445             m_cmdsList.SetItemState(newItem, LVIS_SELECTED, LVIS_SELECTED);
00446         }
00447     }
00448
00449     m_menuList.DeleteItem(nItem);
00450 }
00451
00453 void CCustomizeMenus::OnAdd()
00454 {
00455     const int nItem = m_cmdsList.GetNextItem(-1, LVNI_SELECTED);
00456     if( nItem == -1 )
00457         return;
00458
00459     const CustInvertTable* data = (const CustInvertTable*)m_cmdsList.GetItemData(nItem);
00460
00461     LV_ITEM lvi;
00462     lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00463     lvi.iItem = m_menuList.GetItemCount();
00464     lvi.iSubItem = 0;
00465     lvi.lParam = (DWORD)data;
00466     lvi.pszText = GetInvString(data);
00467     lvi.iImage = GetIcon(data);
00468
00469     const int newItem = m_menuList.InsertItem(&lvi);
00470     if( newItem > -1 )
00471     {
00472         m_menuList.EnsureVisible(newItem, TRUE);
00473         m_menuList.SetItemState(newItem, LVIS_SELECTED, LVIS_SELECTED);
00474     }
00475
00476     if( data->cmd != ID_SEPARATOR )
00477     {
00478         m_cmdsList.DeleteItem(nItem);
00479     }
00480 }
00481
00483 void CCustomizeMenus::OnOK()
00484 {
00485     std::vector<UStr>& list = m_Menu->GetList();
00486     list.erase(list.begin(), list.end());
00487
00488     int nItem = -1;
00489     while( (nItem = m_menuList.GetNextItem(nItem, LVNI_ALL)) != -1 )
00490     {
00491         const CustInvertTable* data = (const CustInvertTable*)m_menuList.GetItemData(nItem);
00492         list.push_back(data->key);
00493     }
00494
00495     CHHelpDialog::OnOK();
00496 }
00497
00499 BOOL CCustomizeMenus::OnInitDialog()
00500 {
00501     CHHelpDialog::OnInitDialog();
00502
00503     // Extra initialization
00504     sInvTable.Initialize();
00505
00506     // Initialize the buttons
00507     m_upbtn.EnableWindow(FALSE);
00508     m_downbtn.EnableWindow(FALSE);
00509     m_addbtn.EnableWindow(FALSE);
00510     m_removebtn.EnableWindow(FALSE);
00511
00512     SetListCtrlExtendedStyle(&m_cmdsList, LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
00513     SetListCtrlExtendedStyle(&m_menuList, LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
00514
00515     m_SmallImageList.Create(IDR_CUSTMENUS, 16, 1, RGB(255, 255, 255));
00516     m_cmdsList.SetImageList(&m_SmallImageList, LVSIL_SMALL);
00517     m_menuList.SetImageList(&m_SmallImageList, LVSIL_SMALL);
00518
00519     int cnt;
00520     const std::vector<UStr> & list = m_Menu->GetList();
00521
00522     // Get the client rect of the list view control
00523     CRect rect;
00524     m_cmdsList.GetClientRect(&rect);
00525
00526     // Make the width of the column to the width of the client area minus the width of a scroll bar
00527     int nWidth = rect.right - ::GetSystemMetrics(SM_CXVSCROLL);
00528
00529     // First the left list
00530     m_cmdsList.InsertColumn(0, "Available commands", LVCFMT_LEFT, nWidth);
00531
00532     std::vector<CustInvertTable>::const_iterator table;
00533     for(cnt = 0, table = sInvTable.begin(); table != sInvTable.end(); ++table, cnt++)
00534     {
00535         const CustInvertTable& tablEntry = *table;
00536         if( table->cmd != ID_SEPARATOR && IsInInvertList(&tablEntry, list) )
00537             continue;
00538
00539         LV_ITEM lvi;
00540         lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00541         lvi.iItem = cnt;
00542         lvi.iSubItem = 0;
00543         lvi.lParam = (DWORD)&tablEntry;
00544         lvi.pszText = GetInvString(&tablEntry);
00545         lvi.iImage = GetIcon(&table[0]);
00546
00547         m_cmdsList.InsertItem(&lvi);
00548     }
00549
00550     m_cmdsList.SortItems(CustMenuCompare, 0L);
00551
00552     // Then the right one
00553     m_menuList.InsertColumn(0, "Selected commands", LVCFMT_LEFT, nWidth);
00554
00555     std::vector<UStr>::const_iterator i;
00556
00557     for(cnt = 0, i = list.begin(); i != list.end(); ++i, cnt++)
00558     {
00559         const CustInvertTable* tab = CustGetByKey(*i);
00560         if( tab == NULL )
00561             continue;
00562
00563         LV_ITEM lvi;
00564         lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00565         lvi.iItem = cnt;
00566         lvi.iSubItem = 0;
00567         lvi.lParam = (DWORD)tab;
00568         lvi.pszText = GetInvString(tab);
00569         lvi.iImage = GetIcon(tab);
00570
00571         m_menuList.InsertItem(&lvi);
00572     }
00573
00574     return TRUE;  // return TRUE unless you set the focus to a control
00575                   // EXCEPTION: OCX Property Pages should return FALSE
00576 }
00577
00578 void CCustomizeMenus::InitHelpID()
00579 {
00580     SetCtrlHelpID(IDC_ALLCMDS,  IDH_IDC_ALLCMDS);
00581     SetCtrlHelpID(IDC_MENULIST, IDH_IDC_MENULIST);
00582     SetCtrlHelpID(IDC_ADD,      IDH_IDC_ADD);
00583     SetCtrlHelpID(IDC_REMOVE,   IDH_IDC_REMOVE);
00584     SetCtrlHelpID(IDC_UP,       IDH_IDC_UP);
00585     SetCtrlHelpID(IDC_DOWN,     IDH_IDC_DOWN);
00586 }
00587
00589 void CCustomizeMenus::OnItemchangedAllcmds(NMHDR* pNMHDR, LRESULT* pResult)
00590 {
00591     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00592
00593     *pResult = 0;
00594
00595     m_addbtn.EnableWindow(m_cmdsList.GetNextItem(-1, LVNI_SELECTED) != -1);
00596 }
00597
00599 void CCustomizeMenus::OnDblclkMenulist(NMHDR* pNMHDR, LRESULT* pResult)
00600 {
00601     OnRemove();
00602
00603     *pResult = 0;
00604 }
00605
00607 void CCustomizeMenus::OnDblclkAllcmds(NMHDR* pNMHDR, LRESULT* pResult)
00608 {
00609     OnAdd();
00610
00611     *pResult = 0;
00612 }
00613
00615 void CCustomizeMenus::OnItemchangedMenulist(NMHDR* pNMHDR, LRESULT* pResult)
00616 {
00617     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00618
00619     *pResult = 0;
00620
00621     const int nItem = m_menuList.GetNextItem(-1, LVNI_SELECTED);
00622
00623     m_removebtn.EnableWindow(nItem != -1);
00624
00625     if( nItem == -1 )
00626     {
00627         m_upbtn.EnableWindow(FALSE);
00628         m_downbtn.EnableWindow(FALSE);
00629     }
00630     else if( nItem == 0 )
00631     {
00632         m_upbtn.EnableWindow(FALSE);
00633         m_downbtn.EnableWindow(m_menuList.GetItemCount() > 1 ? TRUE : FALSE);
00634     }
00635     else if( nItem == m_menuList.GetItemCount() - 1 )
00636     {
00637         m_upbtn.EnableWindow(TRUE);
00638         m_downbtn.EnableWindow(FALSE);
00639     }
00640     else
00641     {
00642         m_upbtn.EnableWindow(TRUE);
00643         m_downbtn.EnableWindow(TRUE);
00644     }
00645 }
00646
00651 void CCustomizeMenus::OnMove(int offset)
00652 {
00653     const int nItem = m_menuList.GetNextItem(-1, LVNI_SELECTED);
00654     if( nItem == -1 )
00655         return;
00656
00657     const CustInvertTable* data = (const CustInvertTable*)m_menuList.GetItemData(nItem);
00658
00659     const int newPos = nItem + offset;
00660     if( newPos < 0 || newPos > m_menuList.GetItemCount() )
00661         return;
00662
00663     VERIFY(m_menuList.DeleteItem(nItem));
00664
00665     LV_ITEM lvi;
00666     lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
00667     lvi.iItem = newPos;
00668     lvi.iSubItem = 0;
00669     lvi.lParam = (DWORD)data;
00670     lvi.pszText = GetInvString(data);
00671     lvi.iImage = GetIcon(data);
00672
00673     const int newItem = m_menuList.InsertItem(&lvi);
00674     if( newItem > -1 )
00675     {
00676         m_menuList.EnsureVisible(newItem, TRUE);
00677         m_menuList.SetItemState(newItem, LVIS_SELECTED, LVIS_SELECTED);
00678     }
00679 }
00680
00682 void CCustomizeMenus::OnDown()
00683 {
00684     OnMove(1);
00685 }
00686
00688 void CCustomizeMenus::OnUp()
00689 {
00690     OnMove(-1);
00691 }
00692
00698 int CCustomizeMenus::GetIcon(const CustInvertTable* entry)
00699 {
00700     if( entry->cmd == ID_SEPARATOR )
00701         return 0;
00702
00703     if( entry->cmd >= ID_MACRO_SEL && entry->cmd < (ID_MACRO_SEL + 100) )
00704         return 2;
00705
00706     if( entry->cmd >= ID_MACRO_ADMIN && entry->cmd < (ID_MACRO_ADMIN + 100) )
00707         return 2;
00708
00709     return 1;
00710 }
00711
00713 void CCustomizeMenus::OnHelp()
00714 {
00715     ShowHelp();
00716 }
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJComboBoxEx Member List

This is the complete list of members for CCJComboBoxEx, including all inherited members.

AddString(LPCTSTR lpszString) | CCJComboBoxEx |
CCJComboBoxEx() | CCJComboBoxEx |
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CCJComboBoxEx |
DeleteItem(int iIndex) | CCJComboBoxEx |
Dir(UINT attr, LPCTSTR lpszWildCard) | CCJComboBoxEx |
FindString(int nIndexStart, LPCTSTR lpszFind) const | CCJComboBoxEx |
GetComboBoxCtrl() | CCJComboBoxEx |
GetEditCtrl() | CCJComboBoxEx |
GetExtendedStyle() const | CCJComboBoxEx |
GetImageList() const | CCJComboBoxEx |
GetItem(COMBOBOXEXITEM *pCBItem) | CCJComboBoxEx |
HasEditChanged() | CCJComboBoxEx |
InsertItem(const COMBOBOXEXITEM *pCBItem) | CCJComboBoxEx |
InsertItem(int iItem, UINT nStringID, int iIndent=0, int iImage=0, int iSelectedImage=0, UINT mask=CBEIF_TEXT|CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_INDENT) | CCJComboBoxEx |
InsertItem(int iItem, LPCTSTR lpszItem, int iIndent=0, int iImage=0, int iSelectedImage=0, UINT mask=CBEIF_TEXT|CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_INDENT) | CCJComboBoxEx |
InsertString(int nIndex, LPCTSTR lpszString) | CCJComboBoxEx |
SetEditSel(int nStartChar, int nEndChar) | CCJComboBoxEx |
SetExtendedStyle(DWORD dwExMask, DWORD dwExStyles) | CCJComboBoxEx |
SetImageList(CImageList *pImageList) | CCJComboBoxEx |
SetItem(const COMBOBOXEXITEM *pCBItem) | CCJComboBoxEx |
~CCJComboBoxEx() | CCJComboBoxEx | [virtual]

Generated on Sat Aug 7 22:48:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

USize Member List

This is the complete list of members for USize, including all inherited members.

cx | USIZE |
cy | USIZE |
operator!=(USIZE size) const | USize | [inline]
operator+(USIZE size) const | USize | [inline]
operator+(UPOINT point) const | USize | [inline]
operator+(const URECT *lpRect) const | USize | [inline]
operator+=(USIZE size) | USize | [inline]
operator-(USIZE size) const | USize | [inline]
operator-() const | USize | [inline]
operator-(UPOINT point) const | USize | [inline]
operator-(const URECT *lpRect) const | USize | [inline]
operator-=(USIZE size) | USize | [inline]
operator==(USIZE size) const | USize | [inline]
USize() | USize | [inline]
USize(int initCX, int initCY) | USize | [inline]
USize(USIZE initSize) | USize | [inline]
USize(UPOINT initPt) | USize | [inline]

Generated on Sat Aug 7 22:56:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJTabCtrlBar.h Source File

WinCvs/CJLib/Include/CJTabCtrlBar.h

Go to the documentation of this file.
00001 // CJTabCtrlBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/Include/CJTabCtrlBar.h $
00011  *
00012  * $History: CJTabCtrlBar.h $
00013  *
00014  * *****************  Version 16  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:29p
00016  * Updated in $/CodeJock/Include
00017  * Enabled OnInitialUpdate() to be called for tab views added to
00018  * CCJTabCtrlBar whenever the control bar is floating.
00019  *
00020  * Fixed potential resource and memory leak problems.
00021  *
00022  * Fixed problems with AddView(...) setting the wrong view index to
00023  * active.
00024  *
00025  * Added  EnableToolTips method which enables and disables the tooltips.
00026  * Thanks to Phil Baxter for help with this.
00027  *
00028  * Fixed problem with dangling pointer in DeleteView. Thanks to Gero Kuehn
00029  * [gero.kuehn@isc-soft.de] for help with this.
00030  *
00031  * Fixed potential bug with CCJTabControlBar returning image index, fixed
00032  * bug with GetTabFromPoint(...) returning invalid index.
00033  *
00034  * Made class methods virtual for inhertance purposes.
00035  *
00036  * *****************  Version 14  *****************
00037  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00038  * Updated in $/CodeJockey/Include
00039  * Updated copyright and contact information.
00040  *
00041  * *****************  Version 13  *****************
00042  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00043  * Updated in $/CodeJockey/Include
00044  *
00045  * *****************  Version 12  *****************
00046  * User: Kirk Stowell Date: 7/18/99    Time: 10:11p
00047  * Updated in $/CodeJockey/Include
00048  * Cleaned up inline functions, and import/export macro so that class will
00049  * be imported when linked to, and exported at compile time.
00050  *
00051  * *****************  Version 11  *****************
00052  * User: Kirk Stowell Date: 7/14/99    Time: 9:43p
00053  * Updated in $/CodeJockey/Include
00054  * Added _DYNAMIC macros for access to the CObject::IsKindOf to determine
00055  * the class object at runtime. Added method GetTabFromPoint which returns
00056  * the tab index based upon cursor position. Thanks to Sid Price
00057  * [sidprice@softtools.com] for suggesting this.
00058  *
00059  * *****************  Version 10  *****************
00060  * User: Kirk Stowell Date: 5/17/99    Time: 9:07p
00061  * Updated in $/CodeJockey/Include
00062  * Paul [RowingWolf@aol.com] - Added the following support methods:
00063  * void SetActiveView(CView* pUserView)
00064  * void AssociateImageIndexWithRuntimeClass(int nIndex, CRuntimeClass*
00065  * pRuntimeClass)
00066  * void AssociateImageIndexWithRuntimeClass(int nIndex, LPCTSTR
00067  * lpszRuntimeClassName)
00068  * short GetImageIndexFromRuntimeClass(CRuntimeClass* pRuntimeClass)
00069  * BOOL RemoveAllTabs().
00070  *
00071  * *****************  Version 9  *****************
00072  * User: Kirk Stowell Date: 5/11/99    Time: 10:02p
00073  * Updated in $/CodeJockey/Include
00074  * After much frustration, a class re-write. Fixed many of the issues with
00075  * painting, invalid pointers and memory leaks. Added document support for
00076  * views associated with the tab control.
00077  *
00078  * *****************  Version 8  *****************
00079  * User: Kirk Stowell Date: 4/14/99    Time: 11:53p
00080  * Updated in $/CodeJockey/Include
00081  * Added context popupMenu for CJTabCtrl to use Brent Corkum's BCMenu.
00082  *
00083  * *****************  Version 7  *****************
00084  * User: Kirk Stowell Date: 4/03/99    Time: 11:52p
00085  * Updated in $/CodeJockey/Include
00086  * Added comments and cleaned up code, modified AddView(...) to allow a
00087  * CDocument to be associated with the view added to the tab control.
00088  *
00089  * *****************  Version 6  *****************
00090  * User: Kirk Stowell Date: 3/14/99    Time: 11:51p
00091  * Updated in $/CodeJockey/Include
00092  * Gonzalo Pereyra [ persys@adinet.com.uy ] - I wanted to trap NM_RETURN
00093  * notifications in my CTreeView Class. I couldn't... It turns out that
00094  * CControlbar::PreTranslateMessage() will eat all dialog messages...It
00095  * will never get dispatched to my window. So I Overrided it in :
00096  * CCJTabCtrlBar::PreTranslateMessage(). this will allow for message
00097  * reflection and we will get NM_RETURN. I don't know if this a good
00098  * solution but for now , it works.
00099  *
00100  * *****************  Version 5  *****************
00101  * User: Kirk Stowell Date: 2/24/99    Time: 11:49p
00102  * Updated in $/CodeJockey/Include
00103  * Phil Baxter [pgb@mrjinx.demon.co.uk] - Fixed the following problems
00104  * when tabs are added after creation:
00105  * 1. The tab was created, but the view that was showing on the tab was
00106  * not visible.
00107  * 2. Get an assertion when the AddView function attempts to perform the
00108  * AddTool function.
00109  * 3. When a new view is added, although you set it to be the active view,
00110  * it isn't raised to the top of the stack in the display.
00111  * 4. The Tab name as stored in the TCB_ITEM structure is now a CString,
00112  * this removes the 32 byte limit that it previously had.
00113  * 5. New methods for obtaining the name as stored in the TCB_ITEM
00114  * structure.
00115  * 6. New Methods for deleting a view from the control, this removes the
00116  * view entirely including its  associated tab.
00117  * 7. Some minor fixes around assertions when trying to manipulate the
00118  * control when it has not had any tabs created.
00119  * 8. Added two new member functions:
00120  * void SetViewToolTip(int nView, LPCTSTR lpszLabel);
00121  * void SetViewToolTip(CRuntimeClass *pViewClass, LPCTSTR lpszLabel);
00122  *
00123  * *****************  Version 4  *****************
00124  * User: Kirk Stowell Date: 1/31/99    Time: 11:48p
00125  * Updated in $/CodeJockey/Include
00126  * Commented out 2 calls to SetActiveView(). This somewhat fixes the
00127  * problem with CTRL+TAB in activatation of MDI child windows, however if
00128  * you click inside the view, this breaks CTRL+TAB again, will look at
00129  * this when I get some free time. Thanks to Pierre Guimont
00130  * (Pierre_Guimont@mitel.com) for pointing this out.
00131  *
00132  * Added m_TabCtrl.GetRowCount() as per Rashid Thadha
00133  * rashidt@consort.co.uk) request.
00134  *
00135  * *****************  Version 3  *****************
00136  * User: Kirk Stowell Date: 1/17/99    Time: 11:46p
00137  * Updated in $/CodeJockey/Include
00138  * Added helper class CCJTabCtrl to eliminate re-painting problems such as
00139  * when the app is minimized then restored.
00140  *
00141  * *****************  Version 2  *****************
00142  * User: Kirk Stowell Date: 1/03/99    Time: 11:46p
00143  * Updated in $/CodeJockey/Include
00144  * Application freezing bug fixed by
00145  * LiangYiBin.Donald(mailto:lybd@yahoo.com)
00146  *
00147  * *****************  Version 1  *****************
00148  * User: Kirk Stowell Date: 10/17/98   Time: 11:45p
00149  * Created in $/CodeJockey/Include
00150  * Initial re-write and release.
00151  *
00152  ***************************************************************************/
00154
00155 #ifndef __CJTABCTRLBAR_H__
00156 #define __CJTABCTRLBAR_H__
00157
00158 #if _MSC_VER >= 1000
00159 #pragma once
00160 #endif // _MSC_VER >= 1000
00161
00162 #include <afxtempl.h>
00163 #include "CJControlBar.h"
00164 #include "CJTabCtrl.h"
00165
00166 // helper struct used by CCJTabCtrlBar
00167 typedef struct tagTCB_ITEM
00168 {
00169     CWnd    *pWnd;          // this points to the window associated with a tab
00170     CString szTabLabel;     // label for the tab
00171     CString szToolTipLabel; // tooltip text for the tab
00172     UINT    uiToolTipId;    // resource id for tooltip
00173 } TCB_ITEM;
00174
00175 // class forwards
00176 class CCJTabCtrl;
00177
00178 // template list used to contain tab information
00179 typedef CList <TCB_ITEM *,TCB_ITEM *> CTabViews;
00180
00181 // CCJTabCtrlBar is a CCJControl bar derived class which implements a
00182 // tabbed window simular to VisualStudio's workspace window.
00183 class _CJX_EXT_CLASS CCJTabCtrlBar : public CCJControlBar
00184 {
00185     DECLARE_DYNAMIC(CCJTabCtrlBar)
00186
00187 public:
00188
00189     // Default constructor
00190     //
00191     CCJTabCtrlBar();
00192
00193     // Virtual destructor
00194     //
00195     virtual ~CCJTabCtrlBar();
00196
00197 protected:
00198
00199     int             m_nPointTab;                // tab index set from GetTabFromPoint(...)
00200     int             m_nActiveTab;               // currently selected tab
00201     int             m_nNextToolTipId;           // tooltip resource id
00202     CView*          m_pActiveView;              // this points to the active view
00203     CTabViews       m_viewList;                 // template list containing tab information
00204     CCJTabCtrl      m_TabCtrl;                  // tab control
00205     CMapStringToPtr m_ClassNameToImageIndexMap; // Map class name to the image index
00206     BOOL            m_bToolTipsEnabled;         // TRUE if tooltips are enabled.
00207
00208 public:
00209
00210     // this member function is called to add a view to the tab control
00211     //
00212     virtual BOOL AddView(
00213         // tab text
00214         LPCTSTR lpszLabel,
00215         // CView object associated with tab
00216         CRuntimeClass *pViewClass,
00217         // CDocument associated with view
00218         CDocument* pDoc = NULL,
00219         // index of tab to add
00220         UINT nIndex=-1,
00221         // create context for view
00222         CCreateContext *pContext = NULL);
00223
00224     // this member function will remove a view based on its index
00225     //
00226     virtual void RemoveView(int nView);
00227
00228     // this member function will set a view active
00229     // based on index
00230     //
00231     virtual void SetActiveView(int nView);
00232
00233     // this member function will set a view active
00234     // based on a CView object
00235     //
00236     virtual void SetActiveView(CRuntimeClass *pViewClass);
00237
00238     // this member function returns a pointer to the
00239     // active view in the tab control
00240     //
00241     virtual CView* GetActiveView();
00242
00243     // this member function returns a pointer to a view
00244     // based on its index
00245     //
00246     virtual CView* GetView(int nView);
00247
00248     // this member function returns a pointer to a view
00249     // based on a CView object
00250     //
00251     virtual CView* GetView(CRuntimeClass *pViewClass);
00252
00253     // this member function initializes the image list
00254     // for the tab control
00255     //
00256     virtual CImageList* SetTabImageList(CImageList *pImageList);
00257
00258     // this member function will modify the style for the
00259     // tab control associated with this control.
00260     //
00261     virtual BOOL ModifyTabStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags=0);
00262
00263     // this member function will return the name for a view
00264     // based on index
00265     virtual LPCTSTR GetViewName(int nView);
00266
00267     // this member function will return the name for a view
00268     // based upon a CView object
00269     //
00270     virtual LPCTSTR GetViewName(CRuntimeClass *pViewClass);
00271
00272     // this member function will delete a view based upon
00273     // its index
00274     virtual void DeleteView(int nView);
00275
00276     // this member function will delete a view based upon
00277     // a CView object
00278     virtual void DeleteView(CRuntimeClass *pViewClass);
00279
00280     // this member function will set the tooltip for a peticular view
00281     // in the tab control based on its index
00282     //
00283     virtual void SetViewToolTip(int nView, LPCTSTR lpszLabel);
00284
00285     // this member function will set the tooltip for a peticular view
00286     //  in the tab control based on a CView object
00287     //
00288     virtual void SetViewToolTip(CRuntimeClass *pViewClass, LPCTSTR lpszLabel);
00289
00290     // this member function is called by the control bar, and
00291     // can be overloaded in derived classes to return the rect
00292     // for the child window associated with the control bar.
00293     //
00294     virtual void GetChildRect(
00295         // reference to a CRect object which contains the size of
00296         // the child window associated with the control bar.
00297         CRect &rect);
00298
00299     // this member function is used to set the resource id for the popup menu used
00300     // by the tab control.
00301     //
00302     virtual void SetTabMenuID(
00303         // id for the tab control popup menu
00304         UINT popupMenuID,
00305         // id for toolbar resource associated with popup
00306         UINT popToolbarID=0,
00307         // index position in menu resource
00308         int nPos=0);
00309
00310     // Use this member function to set the active view to the specified view -- this
00311     // provides more user control than the other SetActiveView()'s
00312     //
00313     virtual void SetActiveView(CView* pUserView);
00314
00315     // Use this member function to map the image index to the class name,
00316     // and allows the image to be set based on the view's runtime class type
00317     //
00318     virtual void AssociateImageIndexWithRuntimeClass(int nIndex, CRuntimeClass* pRuntimeClass);
00319
00320     // Use this member function to map the image index to the class name,
00321     // and allows the image to be set based on the name of the view's runtime class name
00322     //
00323     void AssociateImageIndexWithRuntimeClass(int nIndex, LPCTSTR lpszRuntimeClassName);
00324
00325     // Use this member function to clear out all the tabs, but the user MUST
00326     // take care of the views themselves
00327     //
00328     virtual BOOL RemoveAllTabs();
00329
00330     // call this member function to retrieve the tab index from
00331     // current cursor position.
00332     virtual int GetTabFromPoint(
00333         // Pointer to a CPoint object that contains the cursor
00334         // screen coordinates. Use default for current cursor position.
00335         CPoint point = CPoint(0,0));
00336
00337 protected:
00338
00339     // This member function returns the image associated with a runtime class, and
00340     // indicates which image will be displayed with the associated view class
00341     //
00342     virtual short GetImageIndexFromRuntimeClass(CRuntimeClass* pRuntimeClass);
00343
00344     // This member function is used by the tab control bar to remove an item from the
00345     // view list.
00346     //
00347     virtual void RemoveListItem(POSITION pos);
00348
00349     // This member function is used by the tab control bar to simply to perform
00350     // debug assertion validation.
00351     //
00352     virtual void OverkillAssert(CRuntimeClass *pViewClass);
00353
00354     // This member function is called by the tab control bar to resize the
00355     // tab control window.
00356     //
00357     virtual void SizeTabView(CWnd* pWnd);
00358
00359     // This member function is used by the tab control bar to return a pointer
00360     // to the tooltip control associated with this control.
00361     //
00362     virtual CToolTipCtrl* GetToolTip();
00363
00364     // This member function is used by the tab control bar to add a
00365     // tooltip to a tab.
00366     //
00367     virtual void AddToolTip(TCB_ITEM* pMember, LPCTSTR lpszLabel);
00368
00369     // This member function is used by the tab control bar to reset the tooltip control.
00370     //
00371     virtual void ResetToolTips(CToolTipCtrl* pToolTip);
00372
00373     // This member function is used by the control bar to create a tab item.
00374     //
00375     virtual TCB_ITEM* CreateTabListItem(LPCTSTR lpszLabel);
00376
00377     // This member function is used by the control bar to create a view to
00378     // be associated with a tab control item.
00379     //
00380     virtual BOOL CreateTabView(CRuntimeClass *pViewClass, CDocument *pDocument, CCreateContext *pContext);
00381
00382     // This member function enables / disables tooltips
00383     //
00384     virtual BOOL EnableToolTips(BOOL bEnable);
00385
00386 // Overrides
00387 public:
00388     // ClassWizard generated virtual function overrides
00389     //{{AFX_VIRTUAL(CCJTabCtrlBar)
00390     public:
00391     virtual BOOL PreTranslateMessage(MSG* pMsg);
00392     //}}AFX_VIRTUAL
00393
00394 // Generated message map functions
00395 protected:
00396     //{{AFX_MSG(CCJTabCtrlBar)
00397     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00398     afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00399     afx_msg void OnTabSelChange(NMHDR* pNMHDR, LRESULT* pResult) ;
00400     //}}AFX_MSG
00401
00402     DECLARE_MESSAGE_MAP()
00403 };
00404
00406 //  Inline Functions
00408
00409 _CJXLIB_INLINE void CCJTabCtrlBar::SetTabMenuID(UINT popupMenuID, UINT popToolbarID, int nPos)
00410     { m_TabCtrl.SetMenuID(popupMenuID, popToolbarID, nPos); }
00411
00412 _CJXLIB_INLINE CView* CCJTabCtrlBar::GetActiveView()
00413     { return m_pActiveView; }
00414
00415 _CJXLIB_INLINE CImageList* CCJTabCtrlBar::SetTabImageList(CImageList *pImageList)
00416     { return m_TabCtrl.SetImageList (pImageList); }
00417
00418 _CJXLIB_INLINE BOOL CCJTabCtrlBar::ModifyTabStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags)
00419     { return m_TabCtrl.ModifyStyle(dwRemove, dwAdd, nFlags); }
00420
00422
00423 //{{AFX_INSERT_LOCATION}}
00424 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00425
00426 #endif // __CJTABCTRLBAR_H__
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCmdLine_MAIN Member List

This is the complete list of members for CCmdLine_MAIN, including all inherited members.

CCmdLine_MAIN(const MultiFiles *mf, const char *lastcmd, bool hasPath, const char *lastpath, bool addDefault, bool addSelection, bool forceRoot, const char *cvsroot) | CCmdLine_MAIN |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CCmdLine_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetCmdLine() const | CCmdLine_MAIN |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CCmdLine_MAIN |
InitHelpID() | CCmdLine_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_addDefault | CCmdLine_MAIN |
m_addSelection | CCmdLine_MAIN |
m_addSelectionCheck | CCmdLine_MAIN |
m_checkPath | CCmdLine_MAIN |
m_checkPathCheck | CCmdLine_MAIN |
m_cmdLine | CCmdLine_MAIN | [private]
m_cvsroot | CCmdLine_MAIN |
m_cvsrootCombo | CCmdLine_MAIN |
m_folderLoc | CCmdLine_MAIN |
m_folderLocCombo | CCmdLine_MAIN |
m_forceRoot | CCmdLine_MAIN |
m_forceRootCheck | CCmdLine_MAIN |
m_hasSelection | CCmdLine_MAIN | [private]
m_mf | CCmdLine_MAIN | [private]
m_multilineEntryDlg | CCmdLine_MAIN | [private]
m_multilineEntryPlaceholder | CCmdLine_MAIN |
m_selCvsrootButton | CCmdLine_MAIN |
m_selFolderButton | CCmdLine_MAIN |
OnAddSelection() | CCmdLine_MAIN | [protected]
OnCheckpath() | CCmdLine_MAIN | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnForceroot() | CCmdLine_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CCmdLine_MAIN | [protected, virtual]
OnSelcvsroot() | CCmdLine_MAIN | [protected]
OnSelfolder() | CCmdLine_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CCmdLine_MAIN() | CCmdLine_MAIN |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:50:29 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CModuleParserConsole Member List

This is the complete list of members for CModuleParserConsole, including all inherited members.

CItemListConsole() | CItemListConsole |
CModuleParserConsole() | CModuleParserConsole |
cvs_err(const char *txt, long len) | CItemListConsole | [virtual]
cvs_out(const char *txt, long len) | CItemListConsole | [virtual]
GetCvsErr() | CItemListConsole |
GetItemList() const | CItemListConsole |
GetLaunchRes() const | CItemListConsole |
m_cvsErr | CItemListConsole | [protected]
m_cvsOut | CItemListConsole | [protected]
m_itemList | CItemListConsole | [protected]
m_launchRes | CItemListConsole | [protected]
NeedsNormalize() const | CModuleParserConsole | [private]
Normalize() | CModuleParserConsole | [private]
Parse(int launchRes) | CModuleParserConsole | [virtual]
~CItemListConsole() | CItemListConsole | [virtual]
~CModuleParserConsole() | CModuleParserConsole | [virtual]

Generated on Sat Aug 7 22:55:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs_winutil.h Source File

WinCvs/wincvs_winutil.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #ifndef WINCVS_WINUTIL_H
00022 #define WINCVS_WINUTIL_H
00023
00025 #define AUTOCOMPLETE_DEFFLAGS   (SHACF_FILESYSTEM | SHACF_AUTOAPPEND_FORCE_ON | SHACF_AUTOAPPEND_FORCE_ON | SHACF_USETAB)
00026
00028 enum
00029 {
00030     kCustomBrowserMenu,
00031     kCustomFilesMenu
00032 };
00033
00034 CWnd* FindNextWindow(CWnd* pWnd, BOOL CheckTabStop = TRUE);
00035 CWnd* FindPrevWindow(CWnd* pWnd, BOOL CheckTabStop = TRUE);
00036
00037 CMenu* GetSubCMenu(int nStartId, CView* pThis);
00038 CMenu* GetMenuEntry(int nStartId, int& pos);
00039 CMenu* GetTopPopupMenu(const char* menuString);
00040
00041 void UpdateUIMenu(CMenu* pMyMenu, CView* pThis);
00042
00043 bool IsLargeFonts();
00044 bool IsHideCommandKeyPressed();
00045
00046 DWORD SetListCtrlExtendedStyle(CListCtrl* pListCtrl, const DWORD dwExtendedStyle);
00047
00048 BOOL EnableEditAutoComplete(CEdit* pWnd, const DWORD dwFlags = AUTOCOMPLETE_DEFFLAGS);
00049 void PostGotoDlgCtrl(CDialog* pDlg, CWnd* pWndCtrl);
00050
00051 bool CheckLocationDriveType(const char* locationPath, const bool quiet = false);
00052
00053 CString FormatMillisecondTime();
00054 CString FormatMillisecondTime(LPSYSTEMTIME lpSystemTime);
00055
00056 int wnt_unlink(const char* filename);
00057
00059 class CWndRedrawMngr
00060 {
00061 private:
00062     BOOL m_redraw;
00063     CWnd* m_pWnd;
00065 public:
00066     CWndRedrawMngr(CWnd* pWnd);
00067     virtual ~CWndRedrawMngr();
00068 };
00069
00074 class CWndAutoCommand
00075 {
00076 public:
00077     // Construction
00078     CWndAutoCommand(const CWnd* pWnd, const UINT uiCmd);
00079     virtual ~CWndAutoCommand();
00080
00081 private:
00082     // Data members
00083     HWND m_hAutoCommandWnd;
00084     UINT m_uiCmd;
00085 };
00086
00087 #endif  /*WINCVS_WINUTIL_H*/
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJFrameWnd.cpp Source File

WinCvs/CJLib/CJLibrary/CJFrameWnd.cpp

Go to the documentation of this file.
00001 // CJFrameWnd.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJock/CJLibrary/CJFrameWnd.cpp $
00011  *
00012  * $History: CJFrameWnd.cpp $
00013  *
00014  * *****************  Version 16  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:04p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Minor update to PreCreateWindow(...) for flicker free drawing.
00018  *
00019  * *****************  Version 15  *****************
00020  * User: Kirk Stowell Date: 10/29/99   Time: 12:43a
00021  * Updated in $/CodeJock/CJLibrary
00022  * Overloaded PreCreateWindow(...) for flicker free drawing.
00023  *
00024  * *****************  Version 14  *****************
00025  * User: Kirk Stowell Date: 10/14/99   Time: 6:15p
00026  * Updated in $/CodeJock/CJLibrary
00027  * Fixed bug with a document becomes the active document when the user
00028  * clicks inside a tab in the CCJTabControlBar to perform some operation.
00029  * When closing the application, MFC decides in CFrameWnd::OnClose() to
00030  * check if the 'active' document is modified before checking all other
00031  * documuents. If the active document is not modified and can close its
00032  * frame, it does not check other documents individually and shuts down
00033  * without asking the important 'modified save' questions. To fix this,
00034  * OnClose() was overriden to add a call to "SetActiveView(NULL)" just
00035  * before the base class OnClose is called. This will check all documents
00036  * asking the save question before closing the application. Thanks to
00037  * Simon Clark [spc@otleda.com] for help with this.
00038  *
00039  * *****************  Version 13  *****************
00040  * User: Kirk Stowell Date: 10/14/99   Time: 10:05a
00041  * Updated in $/CodeJock/CJLibrary
00042  * Overrode OnEraseBkgnd(...) to help to eliminate screen flicker.
00043  *
00044  * *****************  Version 12  *****************
00045  * User: Kirk Stowell Date: 9/16/99    Time: 2:35p
00046  * Updated in $/CodeJockey/CJLibrary
00047  * Fixed bug with save / restore bar state, and with saved bar size
00048  * changing whenever the application starts.
00049  *
00050  * *****************  Version 11  *****************
00051  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00052  * Updated in $/CodeJockey/CJLibrary
00053  * Updated copyright and contact information.
00054  *
00055  * *****************  Version 10  *****************
00056  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00057  * Updated in $/CodeJockey/CJLibrary
00058  *
00059  * *****************  Version 9  *****************
00060  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00061  * Updated in $/CodeJockey/CJLibrary
00062  *
00063  * *****************  Version 8  *****************
00064  * User: Kirk Stowell Date: 6/11/99    Time: 8:25p
00065  * Updated in $/CodeJockey/CJ60Lib
00066  * Slight modification made to popup menu code.
00067  *
00068  * *****************  Version 7  *****************
00069  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00070  * Updated in $/CodeJockey/CJ60Lib
00071  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00072  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00073  * message handler, this is now automatically handled by the base class.
00074  * Added redraw flags to the create method and modified paint and layout
00075  * handlers to reduce flicker and un-necessary command handling. Dragging
00076  * rect now reflects actual control bar docked size. Added "flat" look to
00077  * the control bars, the control bars can now use the classic DevStudio
00078  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00079  * docking windows now handle dragging, docking and floating much better,
00080  * and behave more like DevStudio.
00081  *
00082  * *****************  Version 6  *****************
00083  * User: Kirk Stowell Date: 5/02/99    Time: 5:23p
00084  * Updated in $/CodeJockey/CJ60Lib
00085  * Further modifications for CCJMenu support.
00086  *
00087  * *****************  Version 5  *****************
00088  * User: Kirk Stowell Date: 5/02/99    Time: 2:18a
00089  * Updated in $/CodeJockey/CJ60Lib
00090  *
00091  * *****************  Version 4  *****************
00092  * User: Kirk Stowell Date: 5/02/99    Time: 2:13a
00093  * Updated in $/CodeJockey/CJ60Lib
00094  * Re-wrote CCJMenu initialization routines with a more cleaner approach.
00095  *
00096  * *****************  Version 3  *****************
00097  * User: Kirk Stowell Date: 4/03/99    Time: 4:47p
00098  * Updated in $/CodeJockey/CJ60Lib
00099  * Added comments and cleaned up code.  Added support for Brent Corkum's
00100  * BCMenu (CCJMenu), which is a replacement for the CCoolMenu class.
00101  *
00102  * *****************  Version 2  *****************
00103  * User: Kirk Stowell Date: 1/12/99    Time: 4:46p
00104  * Updated in $/CodeJockey/CJ60Lib
00105  * Total re-write to add side-by-side docking support for CCJControlBar
00106  * class.
00107  *
00108  * *****************  Version 1  *****************
00109  * User: Kirk Stowell Date: 10/17/98   Time: 4:46p
00110  * Created in $/CodeJockey/CJ60Lib
00111  * Initial re-write and release.
00112  *
00113  ***************************************************************************/
00115
00116 #include "stdafx.h"
00117 #include "CJFrameWnd.h"
00118 #include "CJDockBar.h"
00119 #include "CJSizeDockBar.h"
00120 #include "CJControlBar.h"
00121 #include "CJMiniDockFrameWnd.h"
00122 #include "CJToolBar.h"
00123
00124 #ifdef _DEBUG
00125 #define new DEBUG_NEW
00126 #undef THIS_FILE
00127 static char THIS_FILE[] = __FILE__;
00128 #endif
00129
00131 // CCJFrameWnd
00132
00133 CCJFrameWnd::CCJFrameWnd()
00134 {
00135
00136 }
00137
00138 CCJFrameWnd::~CCJFrameWnd()
00139 {
00140 }
00141
00142 IMPLEMENT_DYNCREATE(CCJFrameWnd, CFrameWnd)
00143
00144 BEGIN_MESSAGE_MAP(CCJFrameWnd, CFrameWnd)
00145     //{{AFX_MSG_MAP(CCJFrameWnd)
00146     ON_WM_MEASUREITEM()
00147     ON_WM_MENUCHAR()
00148     ON_WM_INITMENUPOPUP()
00149     ON_WM_CLOSE()
00150     //}}AFX_MSG_MAP
00151 END_MESSAGE_MAP()
00152
00154 // CCJFrameWnd message handlers
00155
00156 // dwDockBarMap
00157 DWORD CCJFrameWnd::dwDockBarMap[4][2] =
00158 {
00159     { AFX_IDW_DOCKBAR_TOP,      CBRS_TOP    },
00160     { AFX_IDW_DOCKBAR_BOTTOM,   CBRS_BOTTOM },
00161     { AFX_IDW_DOCKBAR_LEFT,     CBRS_LEFT   },
00162     { AFX_IDW_DOCKBAR_RIGHT,    CBRS_RIGHT  },
00163 };
00164
00165 void CCJFrameWnd::DockControlBarLeftOf(CControlBar* Bar, CControlBar* LeftOf)
00166 {
00167     CRect rect;
00168     DWORD dw;
00169     UINT n;
00170
00171     // get MFC to adjust the dimensions of all docked ToolBars
00172     // so that GetWindowRect will be accurate
00173     RecalcLayout(TRUE);
00174
00175     LeftOf->GetWindowRect(&rect);
00176     rect.OffsetRect(1,0);
00177     dw=LeftOf->GetBarStyle();
00178     n = 0;
00179     n = (dw&CBRS_ALIGN_TOP)              ? AFX_IDW_DOCKBAR_TOP      : n;
00180     n = (dw&CBRS_ALIGN_BOTTOM   && n==0) ? AFX_IDW_DOCKBAR_BOTTOM   : n;
00181     n = (dw&CBRS_ALIGN_LEFT     && n==0) ? AFX_IDW_DOCKBAR_LEFT     : n;
00182     n = (dw&CBRS_ALIGN_RIGHT    && n==0) ? AFX_IDW_DOCKBAR_RIGHT    : n;
00183
00184     // When we take the default parameters on rect, DockControlBar will dock
00185     // each Toolbar on a seperate line. By calculating a rectangle, we in effect
00186     // are simulating a Toolbar being dragged to that location and docked.
00187     DockControlBar(Bar,n,&rect);
00188 }
00189
00190 void CCJFrameWnd::EnableDocking(DWORD dwDockStyle)
00191 {
00192     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00193     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00194     CFrameWnd::EnableDocking(dwDockStyle);
00195
00196     for (int i = 0; i < 4; i++) {
00197         if (dwDockBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY) {
00198             CDockBar* pDock = (CDockBar*)GetControlBar(dwDockBarMap[i][0]);
00199
00200             // make sure the dock bar is of correct type
00201             if( pDock || !pDock->IsKindOf(RUNTIME_CLASS(CCJDockBar)) ) {
00202                 BOOL bNeedDelete = ! pDock->m_bAutoDelete;
00203                 pDock->m_pDockSite->RemoveControlBar(pDock);
00204                 pDock->m_pDockSite = 0; // avoid problems in destroying the dockbar
00205                 pDock->DestroyWindow();
00206                 if( bNeedDelete )
00207                     delete pDock;
00208                 pDock = 0;
00209             }
00210
00211             if( pDock == 0 ) {
00212                 pDock = new CCJDockBar;
00213                 if (!pDock->Create(this,
00214                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00215                     dwDockBarMap[i][1], dwDockBarMap[i][0])) {
00216                     AfxThrowResourceException();
00217                 }
00218             }
00219         }
00220     }
00221 }
00222
00223 void CCJFrameWnd::RecalcLayout(BOOL bNotify)
00224 {
00225     CFrameWnd::RecalcLayout(bNotify);
00226     RecalcAllExcept(NULL);
00227 }
00228
00229 // Yiannhs changed this
00230 void CCJFrameWnd::EnableDockingSizeBar(DWORD dwDockStyle, DockFlatBorders FlatFlags )
00231 {
00232     // must be CBRS_ALIGN_XXX or CBRS_FLOAT_MULTI only
00233     ASSERT((dwDockStyle & ~(CBRS_ALIGN_ANY|CBRS_FLOAT_MULTI)) == 0);
00234
00235     m_pFloatingFrameClass = RUNTIME_CLASS(CCJMiniDockFrameWnd);
00236     for (int i = 0; i < 4; i++)
00237     {
00238         if (dwSizeBarMap[i][1] & dwDockStyle & CBRS_ALIGN_ANY)
00239         {
00240             CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00241             if (pDock == NULL)
00242             {
00243                 pDock = new CCJSizeDockBar;
00244
00245                 if (!pDock->Create(this,
00246                     WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE |
00247                         dwSizeBarMap[i][1], dwSizeBarMap[i][0]))
00248                 {
00249                     AfxThrowResourceException();
00250                 }
00251                 //Yiannhs enable Flat Borders For dock Bars
00252                 pDock->FlatBorder( (FlatFlags >> i) & 0x0001 );
00253             }
00254         }
00255     }
00256 }
00257
00258 void CCJFrameWnd::RecalcAllExcept(CCJSizeDockBar *pBar)
00259 {
00260     for (int i = 0; i < 4; i++)
00261     {
00262         CCJSizeDockBar* pDock = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00263         if (pDock != NULL && pDock != pBar)
00264         {
00265             pDock->CalcSizeBarLayout();
00266         }
00267     }
00268 }
00269
00270 void CCJFrameWnd::DockSizeBar(CControlBar * pBar,CCJSizeDockBar *pDockBar, LPRECT lpRect)
00271 {
00272     ASSERT(pBar != NULL);
00273     ASSERT(pBar->m_pDockContext != NULL);
00274
00275     if( pDockBar == NULL )
00276     {
00277         for (int i = 0; i < 4; i++)
00278         {
00279             if ((dwSizeBarMap[i][1] & CBRS_ALIGN_ANY) == (pBar->m_dwStyle & CBRS_ALIGN_ANY))
00280             {
00281                 pDockBar = (CCJSizeDockBar*)GetControlBar(dwSizeBarMap[i][0]);
00282                 ASSERT(pDockBar != NULL);
00283
00284                 int nSize = 0;
00285
00286                 switch(i)
00287                 {
00288                 case 0: // horizontal dock
00289                 case 1:
00290                     nSize = ((CCJControlBar*)pBar)->GetHorzSize();
00291                     break;
00292                 case 2: // vertical dock
00293                 case 3:
00294                     nSize = ((CCJControlBar*)pBar)->GetVertSize();
00295                     break;
00296                 }
00297
00298                 pDockBar->SetActualSize( nSize );
00299                 break;
00300             }
00301         }
00302     }
00303
00304     ASSERT(pDockBar != NULL);
00305     ASSERT(m_listControlBars.Find(pBar) != NULL);
00306     ASSERT(pBar->m_pDockSite == this);
00307     ((CCJControlBar*)pBar)->Normalize();
00308     pDockBar->DockControlBar(pBar, lpRect);
00309 }
00310
00311 HMENU CCJFrameWnd::NewMenu(UINT nMenuID, UINT nToolbarID)
00312 {
00313     // Load the menu and toolbar resource.
00314     m_menu.LoadMenu(nMenuID);
00315     if (nToolbarID) {
00316         m_menu.LoadToolbar(nToolbarID);
00317     }
00318
00319     // Detach the menu.
00320     return(m_menu.Detach());
00321 }
00322
00323 HMENU CCJFrameWnd::NewMenu(UINT nMenuID, UINT* nToolbarIDs, int nSize)
00324 {
00325     // Load the menu and toolbar resources.
00326     m_menu.LoadMenu(nMenuID);
00327     if (nToolbarIDs) {
00328         m_menu.LoadToolbars(nToolbarIDs, nSize);
00329     }
00330
00331     // Detach the menu.
00332     return(m_menu.Detach());
00333 }
00334
00335 BOOL CCJFrameWnd::InitializeMenu(UINT nMenuID, UINT nToolBarID/*=NULL*/)
00336 {
00337     ASSERT(nMenuID);     // must be valid.
00338
00339     // Get a pointer to the existing menu, and destroy it.
00340     CMenu* pMenu = GetMenu();
00341     ASSERT_VALID(pMenu);
00342     pMenu->DestroyMenu();
00343
00344     // Set the default menu with the newly created Menu.
00345     m_hMenuDefault = NewMenu(nMenuID, nToolBarID);
00346     SetMenu(CMenu::FromHandle(m_hMenuDefault));
00347
00348     return TRUE;
00349 }
00350
00351 BOOL CCJFrameWnd::InitializeMenu(UINT nMenuID, UINT* nToolbarIDs/*=NULL*/, int nSize/*=NULL*/)
00352 {
00353     ASSERT(nMenuID);     // must be valid.
00354
00355     // Get a pointer to the existing menu, and destroy it.
00356     CMenu* pMenu = GetMenu();
00357     ASSERT_VALID(pMenu);
00358     pMenu->DestroyMenu();
00359
00360     // Set the default menu with the newly created Menu.
00361     m_hMenuDefault = NewMenu(nMenuID, nToolbarIDs, nSize);
00362     SetMenu(CMenu::FromHandle(m_hMenuDefault));
00363
00364     return TRUE;
00365 }
00366
00367 void CCJFrameWnd::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
00368 {
00369     if (lpMeasureItemStruct->CtlType == ODT_MENU)
00370     {
00371         if (IsMenu((HMENU)lpMeasureItemStruct->itemID)) {
00372             CMenu* pMenu = CMenu::FromHandle((HMENU)lpMeasureItemStruct->itemID);
00373
00374             if(m_menu.IsMenu(pMenu)) {
00375                 m_menu.MeasureItem(lpMeasureItemStruct);
00376                 return;
00377             }
00378         }
00379     }
00380
00381     CFrameWnd::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
00382 }
00383
00384 LRESULT CCJFrameWnd::OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu)
00385 {
00386     if(m_menu.IsMenu(pMenu)) {
00387         return CCJMenu::FindKeyboardShortcut(nChar, nFlags, pMenu);
00388     }
00389
00390     return CFrameWnd::OnMenuChar(nChar, nFlags, pMenu);
00391 }
00392
00393 void CCJFrameWnd::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
00394 {
00395     CFrameWnd::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
00396
00397     if(!bSysMenu)
00398     {
00399         if(m_menu.IsMenu(pPopupMenu)) {
00400             CCJMenu::UpdateMenu(pPopupMenu);
00401         }
00402     }
00403 }
00404
00405 BOOL CCJFrameWnd::PreTranslateMessage(MSG* pMsg)
00406 {
00407     if( m_wndMenuBar.GetSafeHwnd()) {
00408         if( m_wndMenuBar.TranslateFrameMessage(pMsg)) {
00409             return TRUE;
00410         }
00411     }
00412
00413     return CFrameWnd::PreTranslateMessage(pMsg);
00414 }
00415
00416 void CCJFrameWnd::LoadBarState(LPCTSTR lpszProfileName)
00417 {
00418     CCJSizeDockBar::m_bIsDockBar = true;
00419     CFrameWnd::LoadBarState(lpszProfileName);
00420     CCJSizeDockBar::m_bIsDockBar = false;
00421 }
00422
00423 void CCJFrameWnd::SaveBarState(LPCTSTR lpszProfileName) const
00424 {
00425     CCJSizeDockBar::m_bIsDockBar = true;
00426     CFrameWnd::SaveBarState(lpszProfileName);
00427     CCJSizeDockBar::m_bIsDockBar = false;
00428 }
00429
00430 void CCJFrameWnd::OnClose()
00431 {
00432     // Clear active view before close
00433     SetActiveView (NULL);
00434     CFrameWnd::OnClose();
00435 }
00436
00437 // Default implementation.
00438 BOOL CCJFrameWnd::PreCreateWindow(CREATESTRUCT& cs)
00439 {
00440     return CFrameWnd::PreCreateWindow(cs);
00441 }
00442
00444 // Overloaded for flicker-free drawing with no CS_VREDRAW and CS_HREDRAW.
00445 // Override in CMainFrame and call this method, rather than the default. Pass
00446 // in your apps icon resource usually IDR_MAINFRAME.
00447 //
00448 BOOL CCJFrameWnd::PreCreateWindow(CREATESTRUCT& cs, UINT nIconID)
00449 {
00450     // Register wnd class with no redraw, cursor (use default), background
00451     // brush and load your apps icon resource.
00452     cs.lpszClass = AfxRegisterWndClass( 0, NULL, NULL,
00453         AfxGetApp()->LoadIcon(nIconID));
00454     ASSERT(cs.lpszClass);
00455
00456     return CFrameWnd::PreCreateWindow(cs);
00457 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsCommands.h Source File

common/CvsCommands.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * CvsCommands.h --- set of CVS commands
00023  */
00024
00025 #ifndef CVSCOMMANDS_H
00026 #define CVSCOMMANDS_H
00027
00028 #include "LaunchHandlers.h"
00029
00031 typedef enum
00032 {
00033     kEditNormal,
00034     kEditReserved,
00035     kEditForce
00036 } kEditCmdType;
00037
00039 typedef enum
00040 {
00041     kTagCreate,
00042     kTagDelete,
00043     kTagBranch
00044 } kTagCmdType;
00045
00047 typedef enum
00048 {
00049     kAddNormal,
00050     kAddBinary,
00051     kAddUnicode
00052 } kAddCmdType;
00053
00055 typedef enum
00056 {
00057     kDiffFile,
00058     kDiffFolder,
00059     kDiffGraph
00060 } kDiffCmdType;
00061
00063 typedef enum
00064 {
00065     kAnnotateFile,
00066     kAnnotateGraph
00067 } kAnnotateCmdType;
00068
00069 class KiSelectionHandler;
00070
00071 // Command functions that don't carry the selection and don't need the selection handler
00072 void CvsCmdInit();
00073 void CvsCmdLogin(void);
00074 void CvsCmdLogout(void);
00075
00076 // Command functions that may need the selection and need a selection handler
00077 void CvsCmdRtag(KiSelectionHandler& handler, const kTagCmdType tagType);
00078 void CvsCmdCommandLine(KiSelectionHandler& handler);
00079
00080 // Command functions that need both the selection and the selection handler
00081 void CvsCmdCheckoutModule(KiSelectionHandler& handler);
00082 void CvsCmdImportModule(KiSelectionHandler& handler);
00083 void CvsCmdCancelChanges(KiSelectionHandler& handler);
00084 void CvsCmdUpdate(KiSelectionHandler& handler, bool queryOnly = false);
00085 void CvsCmdCommit(KiSelectionHandler& handler);
00086 void CvsCmdDiff(KiSelectionHandler& handler, kDiffCmdType diffType);
00087 void CvsCmdAdd(KiSelectionHandler& handler, kAddCmdType addType = kAddNormal);
00088 void CvsCmdRemove(KiSelectionHandler& handler);
00089 void CvsCmdLog(KiSelectionHandler& handler, bool outGraph = false, void* defWnd = 0L);
00090 void CvsCmdStatus(KiSelectionHandler& handler);
00091 void CvsCmdLock(KiSelectionHandler& handler);
00092 void CvsCmdUnlock(KiSelectionHandler& handler);
00093 void CvsCmdTag(KiSelectionHandler& handler, const kTagCmdType tagType);
00094 void CvsCmdEdit(KiSelectionHandler& handler, kEditCmdType editType = kEditNormal);
00095 void CvsCmdUnedit(KiSelectionHandler& handler);
00096 void CvsCmdWatchOn(KiSelectionHandler& handler);
00097 void CvsCmdWatchOff(KiSelectionHandler& handler);
00098 void CvsCmdRelease(KiSelectionHandler& handler);
00099 void CvsCmdWatchers(KiSelectionHandler& handler);
00100 void CvsCmdEditors(KiSelectionHandler& handler);
00101 void CvsCmdAnnotate(KiSelectionHandler& handler, kAnnotateCmdType annotateType = kAnnotateFile);
00102 void CvsCmdMoveToTrash(KiSelectionHandler& handler);
00103 void CvsCmdFileAction(KiSelectionHandler& handler);
00104 void CvsCmdLaunch(KiSelectionHandler& handler, const kLaunchType launchType);
00105
00106 void CvsCmdMacrosAdmin(const char* macroName);
00107     // TO_OBSOLETE
00108
00109 // Helper functions
00110 const char* GetEditTypeName(const kEditCmdType editType);
00111 const char* GetTagTypeName(const kTagCmdType tagType);
00112 const char* GetRtagTypeName(const kTagCmdType tagType);
00113
00114 #endif /* CVSCOMMANDS_H */
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/wincvs.cpp Source File

WinCvs/wincvs.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // wincvs.cpp : Defines the class behaviors for the application.
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026
00027 #include "MainFrm.h"
00028 #include "wincvsDoc.h"
00029 #include "GraphDoc.h"
00030 #include "LogFrm.h"
00031 #include "GraphFrm.h"
00032 #include "GraphView.h"
00033 #include "WinCvsBrowser.h"
00034 #include "BrowseFileView.h"
00035 #include "AppGlue.h"
00036 #include "CvsPrefs.h"
00037 #include "AppConsole.h"
00038 #include "Splash.h"
00039 #include "MacrosSetup.h"
00040 #include "MultiString.h"
00041 #include "CvsCommands.h"
00042 #include "Authen.h"
00043 #include "TclGlue.h"
00044 #include "PythonGlue.h"
00045 #include "BrowserBar.h"
00046 #include "FileTraversal.h"
00047 #include "MakeSurePathExists.h"
00048 #include "cvsgui_process.h"
00049 #include "wincvs_winutil.h"
00050 #include "CvsAlert.h"
00051 #include "HHelpSupport.h"
00052
00053 #include <algorithm>
00054 #include <sstream>
00055 #include <string>
00056
00057 #ifdef _DEBUG
00058 #define new DEBUG_NEW
00059 #undef THIS_FILE
00060 static char THIS_FILE[] = __FILE__;
00061 #endif
00062
00064 const char* gAuthors[] =
00065 {
00066     "Alexandre Parenteau <aubonbeurre@hotmail.com>",
00067     "Jens Miltner <jum@mac.com>",
00068     "Jerzy Kaczorowski <kaczoroj@hotmail.com>",
00069     "Karl-Heinz Bruenen <gcvs@bruenen-net.de>",
00070     "Oliver Giesen <ogware@gmx.net>"
00071 };
00072
00074 class CLogoutThread : public CWinThread
00075 {
00076     DECLARE_DYNAMIC(CLogoutThread)
00077 public:
00078     // Construction
00079     CLogoutThread();
00080     virtual ~CLogoutThread();
00081
00082 // Overrides
00083     // ClassWizard generated virtual function overrides
00084     //{{AFX_VIRTUAL(CLogoutThread)
00085     //}}AFX_VIRTUAL
00086
00087 protected:
00088
00089
00090     // Generated message map functions
00091     //{{AFX_MSG(CLogoutThread)
00092         // NOTE - the ClassWizard will add and remove member functions here.
00093     //}}AFX_MSG
00094
00095     DECLARE_MESSAGE_MAP()
00096 private:
00097     // Data members
00098     bool m_term;
00099
00100     // Methods
00101     virtual BOOL InitInstance();
00102     virtual void Delete();
00103
00104 public:
00105     // Interface
00106     void KillThread(void);
00107 };
00108
00109 CLogoutThread::CLogoutThread()
00110     : m_term(false)
00111 {
00112 }
00113
00114 CLogoutThread::~CLogoutThread()
00115 {
00116 }
00117
00119 void CLogoutThread::Delete()
00120 {
00121     CWinThread::Delete();
00122 }
00123
00125 BOOL CLogoutThread::InitInstance()
00126 {
00127     for( ; ; )
00128     {
00129         Sleep(1000);
00130
00131         if( m_term )
00132             return FALSE;
00133
00134         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00135
00136         if( !gCvsPrefs.HasLoogedIn() || gCvsPrefs.LogoutTimeOut() <= 0 || app->IsCvsRunning() )
00137         {
00138             continue;
00139         }
00140
00141         const DWORD time = ::GetTickCount();
00142         if( app->GetIdleTime() != 0 &&
00143             (int)(time - app->GetIdleTime()) >= (gCvsPrefs.LogoutTimeOut() * 60 * 1000) )
00144         {
00145             app->ResetIdleTime();
00146
00147             cvs_err("Making automatic logout after %d minute(s):\n", gCvsPrefs.LogoutTimeOut());
00148             CvsCmdLogout();
00149         }
00150     }
00151
00152     return FALSE;
00153 }
00154
00158 void CLogoutThread::KillThread(void)
00159 {
00160     m_term = true;
00161 }
00162
00163
00164 IMPLEMENT_DYNAMIC(CLogoutThread, CWinThread);
00165
00166 BEGIN_MESSAGE_MAP(CLogoutThread, CWinThread)
00167     //{{AFX_MSG_MAP(CLogoutThread)
00168         // NOTE - the ClassWizard will add and remove mapping macros here.
00169     //}}AFX_MSG_MAP
00170 END_MESSAGE_MAP()
00171
00173 static CLogoutThread* gLogoutThread = NULL;
00174
00176 // CWincvsApp
00177
00178 BEGIN_MESSAGE_MAP(CWincvsApp, CWinApp)
00179     ON_COMMAND(CG_IDS_TIPOFTHEDAY, ShowTipOfTheDay)
00180     //{{AFX_MSG_MAP(CWincvsApp)
00181     ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00182     ON_COMMAND(ID_APP_COPYRIGHTS, OnAppCopyrights)
00183     ON_COMMAND(ID_APP_CREDITS, OnAppCredits)
00184     ON_UPDATE_COMMAND_UI(ID_APP_COPYRIGHTS, OnLogWindowIsPresent)
00185     ON_COMMAND(ID_STOPCVS, OnStopcvs)
00186     ON_UPDATE_COMMAND_UI(ID_STOPCVS, OnUpdateStopcvs)
00187     ON_UPDATE_COMMAND_UI(ID_APP_CREDITS, OnLogWindowIsPresent)
00188     ON_COMMAND(ID_HELP_CVS, OnHelpCvs)
00189     //}}AFX_MSG_MAP
00190     // Standard file based document commands
00191     ON_COMMAND(ID_FILE_NEW, OnFileNew)
00192     ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00193     // Standard print setup command
00194     ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00195 END_MESSAGE_MAP()
00196
00198 // CWincvsApp construction
00199
00200 CWincvsApp::CWincvsApp()
00201     : m_isBackgroundProcess(false)
00202 {
00203     m_CvsRunning = false;
00204     m_CvsStopping = false;
00205     m_idletime = 0;
00206     m_CvsProcess = NULL;
00207
00208     m_hasTCL = false;
00209     m_hasPY = false;
00210 }
00211
00213 // The one and only CWincvsApp object
00214
00215 CWincvsApp theApp;
00216
00217 // This identifier was generated to be statistically unique for your app.
00218 // You may change it if you prefer to choose a specific identifier.
00219
00220 // {D2D77DC2-8299-11D1-8949-444553540000}
00221 static const CLSID clsid =
00222 { 0xd2d77dc2, 0x8299, 0x11d1, { 0x89, 0x49, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 } };
00223
00225 // CWincvsApp initialization
00226
00227 /*
00228  * The handle is of an unknown type.  Test the validity of this OS
00229  * handle by duplicating it, then closing the dupe.  The Win32 API
00230  * doesn't provide an IsValidHandle() function, so we have to emulate
00231  * it here.  This test will not work on a console handle reliably,
00232  * which is why we can't test every handle that comes into this
00233  * function in this way.
00234  */
00235 bool IsValidHandle(HANDLE handle)
00236 {
00237     HANDLE dupedHandle = NULL;
00238
00239     /*
00240      * GetFileType() returns FILE_TYPE_UNKNOWN for invalid handles.
00241      */
00242
00243     if( GetFileType(handle) == FILE_TYPE_UNKNOWN )
00244     {
00245         if( !DuplicateHandle(GetCurrentProcess(),
00246             handle,
00247             GetCurrentProcess(),
00248             &dupedHandle,
00249             0,
00250             FALSE,
00251             DUPLICATE_SAME_ACCESS) )
00252         {
00253             /*
00254             * Unable to make a duplicate. It's definately invalid at this point
00255             */
00256
00257             return false;
00258         }
00259
00260         /*
00261         * Use structured exception handling (Win32 SEH) to protect the close
00262         * of this duped handle which might throw EXCEPTION_INVALID_HANDLE.
00263         */
00264         __try
00265         {
00266             CloseHandle(dupedHandle);
00267         }
00268         __except(EXCEPTION_EXECUTE_HANDLER)
00269         {
00270             /*
00271             * Definately an invalid handle.  So, therefore, the original
00272             * is invalid also.
00273             */
00274
00275             return false;
00276         }
00277     }
00278
00279     return true;
00280 }
00281
00282 BOOL CWincvsApp::InitInstance()
00283 {
00284 #if qCvsDebug
00285     int tmpDbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
00286     tmpDbgFlag |= _CRTDBG_LEAK_CHECK_DF;
00287     _CrtSetDbgFlag(tmpDbgFlag);
00288 #endif
00289
00290     CStr lastWorkingDir;
00291
00292     // David Gravereaux <davygrvy@interwoven.com> suggests this might
00293     // be a work around to the bug #42 (I love the bug number,
00294     // really fits the bug description ;-))
00295 #if 0
00296     if( !IsValidHandle(GetStdHandle(STD_OUTPUT_HANDLE)) )
00297     {
00298         SetStdHandle(STD_OUTPUT_HANDLE, NULL);
00299     }
00300 #endif
00301
00302     // CG: The following block was added by the Splash Screen component.
00303     {
00304         CCommandLineInfo cmdInfo;
00305         ParseCommandLine(cmdInfo);
00306
00307         CSplashWnd::EnableSplashScreen(
00308             (!(m_nCmdShow & SW_SHOWMINIMIZED)) && cmdInfo.m_bShowSplash);
00309     }
00310
00311     if( !AfxSocketInit() )
00312     {
00313         CString errorMsg;
00314         errorMsg.LoadString(IDP_SOCKETS_INIT_FAILED);
00315
00316         CvsAlert(kCvsAlertStopIcon,
00317             errorMsg, NULL,
00318             BUTTONTITLE_OK, NULL).ShowAlert();
00319
00320         return FALSE;
00321     }
00322
00323     AfxEnableControlContainer();
00324
00325     // Standard initialization
00326     // If you are not using these features and wish to reduce the size
00327     //  of your final executable, you should remove from the following
00328     //  the specific initialization routines you do not need.
00329
00330 #if _MFC_VER < 0x700
00331 #ifdef _AFXDLL
00332     Enable3dControls();         // Call this when using MFC in a shared DLL
00333 #else
00334     Enable3dControlsStatic();   // Call this when linking to MFC statically
00335 #endif
00336 #endif
00337
00338     // Initialize HTML Help support
00339     CHHelpSupport::InitHTMLHelp();
00340
00341     // Change the registry key under which our settings are stored.
00342     // You should modify this string to be something appropriate
00343     // such as the name of your company or organization.
00344     SetRegistryKey(_T("WinCvs"));
00345
00346     LoadStdProfileSettings(5);  // Load standard INI file options (including MRU)
00347     gCvsPrefs.load();
00348
00349     CSplashWnd::EnableSplashScreen(!gCvsPrefs.DisableSplashScreen());
00350
00351     CStr strVersion;
00352     GetAppVersion(strVersion);
00353     WriteProfileString(_T(""), _T("Current Version"), strVersion);
00354
00355     // We need to make a temp local copy of LastWorkingDir property here,
00356     // because CWinCvsBrowser::OnSelchanging event would override
00357     // LastWorkingDir preference when browser window is created.
00358     lastWorkingDir = gCvsPrefs.LastWorkingDir();
00359
00360     // Register the application's document templates.  Document templates
00361     //  serve as the connection between documents, frame windows and views.
00362
00363     m_logTempl = new CMultiDocTemplate(
00364         IDR_MAINFRAME,
00365         RUNTIME_CLASS(CWincvsDoc),
00366         RUNTIME_CLASS(CLogFrame),
00367         RUNTIME_CLASS(CBrowseFileView));
00368     AddDocTemplate(m_logTempl);
00369
00370     m_logGraph = new CMultiDocTemplate(
00371         IDR_GRAPH,
00372         RUNTIME_CLASS(CGraphDoc),
00373         RUNTIME_CLASS(CGraphFrame),
00374         RUNTIME_CLASS(CGraphView));
00375     AddDocTemplate(m_logGraph);
00376
00377     // create main MDI Frame window
00378     m_mainFrame = new CMainFrame;
00379     if (!m_mainFrame->LoadFrame(IDR_CNTR_INPLACE))
00380         return FALSE;
00381     m_pMainWnd = m_mainFrame;
00382
00383     // Initialize the cool menus...
00384 #if 0
00385     UINT barIds[] = {IDR_BROWSER, IDR_MAINFRAME, IDR_MULTIUSER, IDR_TAGS, IDR_FILELIST, IDR_FILTER};
00386     m_mainFrame->InitializeMenu(m_logTempl,
00387         IDR_MAINFRAME, barIds, _countof(barIds), IDR_MAINFRAME);
00388     m_mainFrame->InitializeMenu(m_logGraph,
00389         IDR_GRAPH, barIds, _countof(barIds), IDR_GRAPH);
00390 #endif
00391
00392     // Parse command line for standard shell commands, DDE, file open
00393     CCommandLineInfo cmdInfo;
00394     ParseCommandLine(cmdInfo);
00395
00396     // Try to resolve the long filename if the argument passed is the short filename (like when it's a call thru SendTo shell menu)
00397     if( -1 != cmdInfo.m_strFileName.Find('~') )
00398     {
00399         CString strLongFileName;
00400         CString strTempTileName = cmdInfo.m_strFileName;
00401
00402         SHFILEINFO sFileInfo;
00403         int nSlashPos = -1;
00404
00405         BOOL bError = FALSE;
00406
00407         while( -1 != (nSlashPos = strTempTileName.ReverseFind(kPathDelimiter)) )
00408         {
00409             if( SHGetFileInfo((LPCTSTR)strTempTileName, 0, &sFileInfo, sizeof(sFileInfo), SHGFI_DISPLAYNAME) )
00410             {
00411                 CString strFileNameBit = strTempTileName.Mid(nSlashPos + 1);
00412
00413                 strLongFileName = sFileInfo.szDisplayName + strLongFileName;
00414                 strLongFileName = kPathDelimiter + strLongFileName;
00415                 strTempTileName = strTempTileName.Left(nSlashPos);
00416             }
00417             else
00418             {
00419                 bError = TRUE;
00420                 break;  //we need it or we get the dead loop
00421             }
00422         }
00423
00424         if( !bError )
00425         {
00426             cmdInfo.m_strFileName = strTempTileName + strLongFileName;
00427         }
00428     }
00429
00430     // Open in the directory, so remove the file
00431     CString strOpenDirectory;
00432     CString strSelectFile;
00433     if( !cmdInfo.m_strFileName.IsEmpty() )
00434     {
00435         TCHAR fullpath[_MAX_PATH];
00436         _tfullpath(fullpath, cmdInfo.m_strFileName, _MAX_PATH);
00437         if( GetFileAttributes(cmdInfo.m_strFileName) != 0xFFFFFFFF )
00438         {
00439             cmdInfo.m_strFileName.Replace('/', kPathDelimiter); //normalize path
00440
00441             TCHAR drive[_MAX_DRIVE];
00442             TCHAR dir[_MAX_DIR];
00443
00444             _tsplitpath(fullpath, drive, dir, NULL, NULL);
00445             strSelectFile = fullpath;
00446             _tmakepath(fullpath, drive, dir, NULL, NULL);
00447             strOpenDirectory = fullpath;
00448         }
00449     }
00450
00451     // Dispatch commands specified on the command line
00452     // We need to trick the ProcessShellCommand a bit
00453     // because we might get a directory as a parameter we don't want it to check after the file...
00454     cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew;
00455     if( !ProcessShellCommand(cmdInfo) )
00456         return FALSE;
00457
00458     // The one and only window has been initialized, so show and update it.
00459     m_mainFrame/*m_pMainWnd*/->InitialShowWindow(m_nCmdShow);
00460     m_mainFrame/*m_pMainWnd*/->UpdateWindow();
00461
00462     m_mainFrame/*m_pMainWnd*/->DragAcceptFiles();
00463     //CWincvsView *cons = GetConsoleView();
00464     //if(cons != NULL)
00465     //  cons->DragAcceptFiles();
00466
00467
00468     CWinCvsBrowser* browser = GetBrowserView();
00469     CWincvsDoc* doc = (CWincvsDoc*)GetDocument();
00470     if( doc != NULL && browser != NULL )
00471         doc->SetTitle(browser->GetRoot());
00472
00473     CBrowseFileView* fileView = GetFileView();
00474     if( fileView != NULL )
00475     {
00476         if( strOpenDirectory.IsEmpty() )
00477         {
00478             // Goto the last working directory, which was selected
00479             // when WinCVS was closed
00480             if( !lastWorkingDir.empty() && browser->StepToLocation(lastWorkingDir) )
00481             {
00482                 CheckLocationDriveType(lastWorkingDir);
00483                 fileView->ResetView(lastWorkingDir, false, (LPCTSTR)NULL);
00484                 gCvsPrefs.SetLastWorkingDir(lastWorkingDir);
00485             }
00486             else
00487             {
00488                 CheckLocationDriveType(browser->GetRoot());
00489                 fileView->ResetView(browser->GetRoot());
00490             }
00491         }
00492         else
00493         {
00494             CColorConsole out;
00495             out << kBold << "Locating: " << kNormal << kUnderline << cmdInfo.m_strFileName << kNormal <<  kNormal << kNL;
00496
00497             //search the browse location (will create a new location if not found)
00498             extern CMString gHistoryLocs;
00499             CString bestRoot = CHistComboBoxEx::FindBestRoot(gHistoryLocs, strOpenDirectory);
00500             if( !bestRoot.IsEmpty() )
00501             {
00502                 browser->ResetBrowser(bestRoot);
00503             }
00504
00505             if( browser->StepToLocation(strOpenDirectory) )
00506             {
00507                 CheckLocationDriveType(strOpenDirectory);
00508                 fileView->ResetView(strOpenDirectory, false, strSelectFile);
00509             }
00510             else
00511             {
00512                 CheckLocationDriveType(browser->GetRoot());
00513                 fileView->ResetView(browser->GetRoot());
00514             }
00515         }
00516     }
00517
00518     // If you launch WinCvs with the file or directory as a parameter you obviously don't need a "tip of the day"
00519     if( strOpenDirectory.IsEmpty() )
00520     {
00521         // CG: This line inserted by 'Tip of the Day' component.
00522         ShowTipAtStartup();
00523     }
00524
00525     // Auto-logout thread
00526     gLogoutThread = new CLogoutThread();
00527     if( gLogoutThread == NULL )
00528     {
00529         cvs_err("Impossible to create the auto-logout thread !\n");
00530     }
00531     else
00532     {
00533         ASSERT_VALID(gLogoutThread);
00534
00535         // Create Thread in a suspended state so we can set the Priority
00536         // before it starts getting away from us
00537         if( !gLogoutThread->CreateThread(CREATE_SUSPENDED) )
00538         {
00539             cvs_err("Impossible to start the auto-logout thread (error %d)!\n", GetLastError());
00540
00541             delete gLogoutThread;
00542             gLogoutThread = NULL;
00543         }
00544
00545         if( gLogoutThread != NULL )
00546         {
00547             // If you want to make the sample more sprightly, set the thread priority here
00548             // a little higher. It has been set at idle priority to keep from bogging down
00549             // other apps that may also be running.
00550             VERIFY(gLogoutThread->SetThreadPriority(THREAD_PRIORITY_NORMAL));
00551             // Now the thread can run wild
00552             gLogoutThread->ResumeThread();
00553         }
00554     }
00555
00556     // Start macros
00557     StartScriptEngine();
00558
00559     // Make sure the current directory is properly setup
00560     if( NULL != fileView )
00561     {
00562         chdir(fileView->GetPath());
00563     }
00564
00565     return TRUE;
00566 }
00567
00569 // CAboutDlg dialog used for App About
00570
00571 class CAboutDlg : public CHHelpDialog
00572 {
00573 public:
00574     CAboutDlg();
00575
00576 // Dialog Data
00577     //{{AFX_DATA(CAboutDlg)
00578     enum { IDD = IDD_ABOUTBOX };
00579     CCJHyperLink    m_CvsGuiSfUrl;
00580     CCJHyperLink    m_WinCvsUrl;
00581     CString m_vers;
00582     //}}AFX_DATA
00583
00584     // ClassWizard generated virtual function overrides
00585     //{{AFX_VIRTUAL(CAboutDlg)
00586     protected:
00587     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00588     //}}AFX_VIRTUAL
00589
00590 // Implementation
00591 protected:
00592     //{{AFX_MSG(CAboutDlg)
00593     virtual BOOL OnInitDialog();
00594     //}}AFX_MSG
00595     DECLARE_MESSAGE_MAP()
00596 private:
00597     // Methods
00598     virtual void InitHelpID();
00599 };
00600
00601 CAboutDlg::CAboutDlg() : CHHelpDialog(CAboutDlg::IDD)
00602 {
00603     //{{AFX_DATA_INIT(CAboutDlg)
00604     m_vers = _T("WinCvs ");
00605     //}}AFX_DATA_INIT
00606
00607     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00608     CStr vers;
00609
00610     if( app->GetAppVersion(vers) )
00611     {
00612         m_vers = vers;
00613     }
00614 }
00615 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00616 {
00617     CHHelpDialog::DoDataExchange(pDX);
00618     //{{AFX_DATA_MAP(CAboutDlg)
00619     DDX_Control(pDX, IDC_CVSGUISFURL, m_CvsGuiSfUrl);
00620     DDX_Control(pDX, IDC_WINCVSURL, m_WinCvsUrl);
00621     DDX_Text(pDX, IDC_WINCVSVER, m_vers);
00622     //}}AFX_DATA_MAP
00623 }
00624
00625 BEGIN_MESSAGE_MAP(CAboutDlg, CHHelpDialog)
00626     //{{AFX_MSG_MAP(CAboutDlg)
00627     //}}AFX_MSG_MAP
00628 END_MESSAGE_MAP()
00629
00630
00632 BOOL CAboutDlg::OnInitDialog()
00633 {
00634     CHHelpDialog::OnInitDialog();
00635
00636     // Extra initialization
00637     m_WinCvsUrl.SetURL(_T("http://www.wincvs.org"));
00638     m_CvsGuiSfUrl.SetURL(_T("http://cvsgui.sourceforge.net/"));
00639
00640     return TRUE;  // return TRUE unless you set the focus to a control
00641                   // EXCEPTION: OCX Property Pages should return FALSE
00642 }
00643
00644 void CAboutDlg::InitHelpID()
00645 {
00646     SetCtrlHelpID(IDC_WINCVSVER,    IDH_IDC_WINCVSVER);
00647     SetCtrlHelpID(IDC_WINCVSURL,    IDH_IDC_WINCVSURL);
00648     SetCtrlHelpID(IDC_CVSGUISFURL,  IDH_IDC_CVSGUISFURL);
00649 }
00650
00652 void CWincvsApp::OnAppAbout()
00653 {
00654     CAboutDlg aboutDlg;
00655     aboutDlg.DoModal();
00656 }
00657
00662 CWincvsView* CWincvsApp::GetConsoleView(void)
00663 {
00664     if( m_mainFrame == NULL )
00665         return NULL;
00666
00667     return m_mainFrame->GetConsoleView();
00668 }
00669
00674 CStatusBar* CWincvsApp::GetStatusBar()
00675 {
00676     if( m_mainFrame == NULL )
00677         return NULL;
00678
00679     return m_mainFrame->GetStatusBar();
00680 }
00681
00686 CWinCvsBrowser* CWincvsApp::GetBrowserView(void)
00687 {
00688     if( m_mainFrame == NULL )
00689         return NULL;
00690
00691     return m_mainFrame->GetBrowserView();
00692 }
00693
00698 CString CWincvsApp::GetRoot()
00699 {
00700     CString root;
00701
00702     CWinCvsBrowser* view = GetBrowserView();
00703     if( view )
00704     {
00705         root = view->GetRoot();
00706     }
00707
00708     return root;
00709 }
00710
00714 void CWincvsApp::ActivateBrowserView(void)
00715 {
00716     if( m_mainFrame == NULL )
00717         return;
00718
00719     m_mainFrame->GetWorkspace()->SetActiveView(RUNTIME_CLASS(CBrowserBar));
00720 }
00721
00726 CCJShellTree* CWincvsApp::GetExplorerView(void)
00727 {
00728     if( m_mainFrame == NULL )
00729         return NULL;
00730
00731     return m_mainFrame->GetExplorerView();
00732 }
00733
00738 CBrowseFileView* CWincvsApp::GetFileView(void)
00739 {
00740
00741     POSITION post = GetFirstDocTemplatePosition();
00742     while( post != NULL )
00743     {
00744         CDocTemplate* tmpl = GetNextDocTemplate(post);
00745         if( !tmpl->IsKindOf(RUNTIME_CLASS(CMultiDocTemplate)) )
00746             continue;
00747
00748         POSITION posd = tmpl->GetFirstDocPosition();
00749         while( posd != NULL )
00750         {
00751             CDocument* doc = tmpl->GetNextDoc(posd);
00752             if( !doc->IsKindOf(RUNTIME_CLASS(CWincvsDoc)) )
00753                 continue;
00754
00755             POSITION posv = doc->GetFirstViewPosition();
00756             while( posv != NULL )
00757             {
00758                 CView* view = doc->GetNextView(posv);
00759                 if( view->IsKindOf(RUNTIME_CLASS(CBrowseFileView)) )
00760                     return (CBrowseFileView*)view;
00761             }
00762         }
00763     }
00764
00765     return NULL;
00766 }
00767
00772 CDocument* CWincvsApp::GetDocument(void)
00773 {
00774     CWinApp* app = AfxGetApp();
00775
00776     POSITION post = app->GetFirstDocTemplatePosition();
00777     while( post != NULL )
00778     {
00779         CDocTemplate* tmpl = app->GetNextDocTemplate(post);
00780
00781         POSITION posd = tmpl->GetFirstDocPosition();
00782         while( posd != NULL )
00783         {
00784             CDocument* doc = tmpl->GetNextDoc(posd);
00785             if( !doc->IsKindOf(RUNTIME_CLASS(CWincvsDoc)) )
00786                 continue;
00787
00788             return doc;
00789         }
00790     }
00791
00792     ASSERT(0);
00793     return NULL;
00794 }
00795
00797 // CWincvsApp commands
00798
00800 void AFXAPI DDV_CheckPathExists(CDataExchange* pDX, int nIDC, CString& value, bool promptForCreation /*= true*/)
00801 {
00802     if( pDX->m_bSaveAndValidate )
00803     {
00804         if( !CompatMakeSurePathExists(value, false) )
00805         {
00806             if( CStr(value).endsWith(kPathDelimiter) )
00807             {
00808                 value.TrimRight(kPathDelimiter);
00809             }
00810
00811             if( !CompatMakeSurePathExists(value, promptForCreation) )
00812             {
00813                 CvsAlert(kCvsAlertWarningIcon,
00814                     "Cannot find folder: " + value, NULL,
00815                     BUTTONTITLE_OK, NULL).ShowAlert();
00816
00817                 pDX->PrepareEditCtrl(nIDC);
00818                 pDX->Fail();
00819             }
00820         }
00821     }
00822 }
00823
00825 void AFXAPI DDV_CheckCVSROOT(CDataExchange* pDX, CString& value)
00826 {
00827     // Check after the trailing white spaces - often an unwanted result of copy-paste
00828     if( pDX->m_bSaveAndValidate )
00829     {
00830         CString trimmedValue(value);
00831         trimmedValue.TrimRight();
00832
00833         if( trimmedValue.GetLength() != value.GetLength() )
00834         {
00835             CvsAlert cvsAlert(kCvsAlertQuestionIcon,
00836                 "Do you want to trim trailing spaces?", "The CVSROOT value contains the trailing spaces.",
00837                 BUTTONTITLE_YES, BUTTONTITLE_NO);
00838
00839             if( cvsAlert.ShowAlert() == kCvsAlertOKButton )
00840             {
00841                 value = trimmedValue;
00842             }
00843         }
00844     }
00845 }
00846
00855 void AFXAPI DDX_ComboMString(CDataExchange* pDX, int nIDC, CSmartComboBox& combo)
00856 {
00857     CMString* mstr = combo.GetItems();
00858     ASSERT(mstr != NULL);
00859
00860     if( mstr )
00861     {
00862         if( !pDX || !pDX->m_bSaveAndValidate )
00863         {
00864             CString strOldText;
00865             combo.GetWindowText(strOldText);
00866
00867             combo.ResetContent();
00868
00869             const vector<CStr>& list = mstr->GetList();
00870             for(vector<CStr>::const_iterator i = list.begin(); i != list.end(); ++i)
00871             {
00872                 if( combo.HasFeature(CSmartComboBox::Feature::Keyword) )
00873                 {
00874                     CMKeyString* pMKeyString = dynamic_cast<CMKeyString*>(combo.GetItems());
00875                     if( pMKeyString )
00876                     {
00877                         CStr key;
00878                         CStr value;
00879
00880                         pMKeyString->Split((*i).c_str(), key, value);
00881                         if( key.compare(combo.GetKeyword()) == 0 )
00882                         {
00883                             combo.AddString(value);
00884                         }
00885                     }
00886                     else
00887                     {
00888                         CKeyString* pKeyString = dynamic_cast<CKeyString*>(combo.GetItems());
00889                         if( pKeyString )
00890                         {
00891                             CStr key;
00892                             CStr value;
00893
00894                             pKeyString->Split((*i).c_str(), key, value);
00895                             if( !value.empty() )
00896                             {
00897                                 if( combo.FindStringExact(-1, value) < 0 )
00898                                 {
00899                                     combo.AddString(value);
00900                                 }
00901                             }
00902                         }
00903                     }
00904                 }
00905                 else
00906                 {
00907                     combo.AddString(*i);
00908                 }
00909             }
00910
00911             combo.SetWindowText(strOldText);
00912         }
00913         else
00914         {
00915             CString editValue;
00916             CString value;
00917
00918             DDX_CBString(pDX, nIDC, editValue);
00919
00920             if( !editValue.IsEmpty() )
00921             {
00922                 if( combo.HasFeature(CSmartComboBox::Feature::Keyword) )
00923                 {
00924                     CMKeyString* pMKeyString = dynamic_cast<CMKeyString*>(combo.GetItems());
00925                     if( pMKeyString )
00926                     {
00927                         CStr mapValue;
00928                         pMKeyString->Concatenate(mapValue, combo.GetKeyword(), editValue);
00929
00930                         value = mapValue;
00931                     }
00932                     else
00933                     {
00934                         CKeyString* pKeyString = dynamic_cast<CKeyString*>(combo.GetItems());
00935                         if( pKeyString )
00936                         {
00937                             CStr mapValue;
00938                             pKeyString->Concatenate(mapValue, combo.GetKeyword(), editValue);
00939
00940                             value = mapValue;
00941                         }
00942                     }
00943                 }
00944                 else
00945                 {
00946                     value = editValue;
00947                 }
00948
00949                 const vector<CStr>& list = mstr->GetList();
00950                 if( !(std::find(list.begin(), list.end(), CStr(value)) != list.end()) )
00951                 {
00952                     mstr->Insert(value);
00953                     combo.AddString(editValue);
00954                 }
00955             }
00956         }
00957     }
00958 }
00959
00961 void AFXAPI DDV_MinChars(CDataExchange* pDX, CString const& value, int nChars)
00962 {
00963     ASSERT(nChars > 0); // allow them something
00964
00965     if( pDX->m_bSaveAndValidate && value.GetLength() < nChars )
00966     {
00967         CString errorMsg;
00968         errorMsg.Format("Please enter more than %d character%s.", nChars, nChars > 1 ? "s" : "");
00969
00970         CvsAlert(kCvsAlertStopIcon,
00971             errorMsg, NULL,
00972             BUTTONTITLE_OK, NULL).ShowAlert();
00973
00974         pDX->Fail();
00975     }
00976 }
00977
00978 int CWincvsApp::ExitInstance()
00979 {
00980     return CWinApp::ExitInstance();
00981 }
00982
00983 void CWincvsApp::OnLogWindowIsPresent(CCmdUI* pCmdUI)
00984 {
00985     pCmdUI->Enable(GetConsoleView() != NULL);
00986 }
00987
00988 void CWincvsApp::OnFileNew()
00989 {
00990     m_logTempl->OpenDocumentFile(NULL);
00991 }
00992
00993 void CWincvsApp::OnAppCopyrights()
00994 {
00995     cvs_out("\nCvsGui, CVSNT and CVS are distributed under the terms of\n");
00996     cvs_out("the GNU General Public License (GPL).\n\n");
00997     cvs_out("* WinCvs: maintained by Jerzy Kaczorowski <kaczoroj@hotmail.com>\n");
00998     cvs_out("* MacCVS: maintained by Alexandre Parenteau <aubonbeurre@hotmail.com>\n");
00999     cvs_out("* gCvs: maintained by Karl-Heinz Bruenen <gcvs@bruenen-net.de>\n");
01000     cvs_out("* WinCvs documentation : Copyright © 1999 Don Harper <don@lamrc.com>.\n");
01001     cvs_out("* CVSNT : Copyright (c) 1999-2003 Tony Hoyle and others\n");
01002     cvs_out("* CVS : Copyright © 1989-1998 Brian Berliner, david d `zoo' zuhn,\n");
01003     cvs_out("        Jeff Polk, and other authors\n");
01004     cvs_out("* CJLIB : Copyright © 1998-99 Kirk Stowell <kstowell@codejockeys.com>\n");
01005     cvs_out("* Kerberos : Copyright © 1997 the Massachusetts Institute of Technology\n");
01006     cvs_out("* TCL : Copyright © Sun Microsystems Inc.\n");
01007     cvs_out("* Python : Copyright © Guido van Rossum\n");
01008     cvs_out("* MFC : Copyright © 1992-1997 Microsoft Corporation\n");
01009     cvs_out("\nSome other copyrights may apply, please check the source code for details.\n");
01010 }
01011
01012 void CWincvsApp::OnAppCredits()
01013 {
01014     // WinCvs version
01015     CStr vers;
01016
01017     if( GetAppVersion(vers) )
01018         cvs_out("\n%s\n", (const char*)vers);
01019     else
01020         cvs_out("\nWinCvs\n");
01021
01022     // Authors in random order
01023     cvs_out("- WinCvs is developed by:\n");
01024
01025     const int authorsSize = sizeof(gAuthors) / sizeof(gAuthors[0]);
01026     vector<const char*> authors(authorsSize);
01027
01028     for(int index = 0; index < authorsSize; index++)
01029     {
01030         authors[index] = gAuthors[index];
01031     }
01032
01033     srand((unsigned)time(NULL));
01034     random_shuffle(authors.begin(), authors.end());
01035
01036     for(vector<const char*>::const_iterator it = authors.begin(); it != authors.end(); it++)
01037     {
01038         std::stringstream strOut;
01039         strOut << "\t* "<< (*it) << "\n",
01040
01041         cvs_out(strOut.str().c_str());
01042     }
01043
01044     cvs_out("\t* Other contributors (see the ChangeLog)\n");
01045
01046     // More info
01047     cvs_out("- WinCvs page : http://cvsgui.sourceforge.net/ or http://www.wincvs.org\n");
01048     cvs_out("- CVSNT page : http://www.cvsnt.org\n");
01049     cvs_out("- CVS page : http://www.cvshome.org\n");
01050     cvs_out("- WinCvs documentation : Don Harper <don@lamrc.com>.\n");
01051     cvs_out("- WinHelp cvs documentation : Norbert Klamann.\n");
01052
01053     cvs_out("- Special thanks to :\n");
01054     cvs_out("\t* The Strata Inc. developpers who are so patients with WinCvs\n");
01055     cvs_out("\t  and help to identify a lot of problems.\n");
01056     cvs_out("\t* All the people who are submitting bugs, patches and\n");
01057     cvs_out("\t  answer the cvsgui mailing list.\n");
01058
01059     cvs_out("- Bug reports, suggestions :\n");
01060     cvs_out("\t* Richard Wesley, Alain Aslag Roy, Eric Aubourg and many others\n");
01061     cvs_out("- CVS contributors :\n");
01062     cvs_out("\t* Too many to be listed here, see the 'ChangeLog' instead !\n");
01063 }
01064
01065 void CWincvsApp::ShowTipAtStartup(void)
01066 {
01067     // CG: This function added by 'Tip of the Day' component.
01068
01069     CCommandLineInfo cmdInfo;
01070     ParseCommandLine(cmdInfo);
01071
01072     if( cmdInfo.m_bShowSplash )
01073     {
01074         CTipDlg dlg(IsWindow(m_pMainWnd->GetSafeHwnd()) ? m_pMainWnd : NULL);
01075
01076         if( dlg.m_bStartup )
01077             dlg.DoModal();
01078     }
01079 }
01080
01081 void CWincvsApp::ShowTipOfTheDay(void)
01082 {
01083     // CG: This function added by 'Tip of the Day' component.
01084
01085     CTipDlg dlg;
01086     dlg.DoModal();
01087 }
01088
01089 BOOL CWincvsApp::PreTranslateMessage(MSG* pMsg)
01090 {
01091     // CG: The following lines were added by the Splash Screen component.
01092     if( CSplashWnd::PreTranslateAppMessage(pMsg) )
01093         return TRUE;
01094
01095     DWORD time = ::GetTickCount();
01096
01097     if( m_idletime == 0 ||
01098         pMsg->message == WM_KEYDOWN ||
01099         pMsg->message == WM_SYSKEYDOWN ||
01100         pMsg->message == WM_LBUTTONDOWN ||
01101         pMsg->message == WM_RBUTTONDOWN ||
01102         pMsg->message == WM_MBUTTONDOWN ||
01103         pMsg->message == WM_NCLBUTTONDOWN ||
01104         pMsg->message == WM_NCRBUTTONDOWN ||
01105         pMsg->message == WM_NCMBUTTONDOWN )
01106     {
01107         m_idletime = time;
01108         PyInvalUICache();
01109     }
01110
01111     IdleCvsProgress();
01112
01113     return CWinApp::PreTranslateMessage(pMsg);
01114 }
01115
01120 void CWincvsApp::GetAppPath(CStr& path) const
01121 {
01122     path.clear();
01123
01124     GetAppModule(path);
01125
01126     CStr uppath;
01127     CStr exefile;
01128     if( ::SplitPath(path, uppath, exefile) )
01129     {
01130         path = uppath;
01131     }
01132 }
01133
01138 void CWincvsApp::GetAppModule(CStr& module) const
01139 {
01140     module.clear();
01141
01142     const HINSTANCE hInst = ::AfxGetInstanceHandle();
01143     if( hInst != NULL )
01144     {
01145         char apath[_MAX_PATH];
01146
01147         const DWORD len = ::GetModuleFileName(hInst, apath, _MAX_PATH);
01148         if( len > 0 )
01149         {
01150             module = apath;
01151         }
01152     }
01153 }
01154
01160 bool CWincvsApp::GetAppVersion(CStr& vers) const
01161 {
01162     bool bRet = false;
01163     char szFullPath[_MAX_PATH];
01164     DWORD len = ::GetModuleFileName(AfxGetInstanceHandle(), szFullPath, sizeof(szFullPath));
01165     DWORD dwVerHnd;
01166
01167     DWORD dwVerInfoSize = GetFileVersionInfoSize(szFullPath, &dwVerHnd);
01168     if( dwVerInfoSize && len )
01169     {
01170         // If we were able to get the information, process it
01171         HANDLE hMem;
01172         LPVOID lpvMem;
01173         char szGetName[256];
01174         int cchRoot;
01175
01176         hMem = GlobalAlloc(GMEM_MOVEABLE, dwVerInfoSize);
01177         lpvMem = GlobalLock(hMem);
01178
01179         GetFileVersionInfo(szFullPath, dwVerHnd, dwVerInfoSize, lpvMem);
01180
01181         lstrcpy(szGetName, "\\StringFileInfo\\040904b0\\");
01182         cchRoot = lstrlen(szGetName);
01183
01184         BOOL fRet;
01185         UINT cchVer = 0;
01186         LPVOID lszVer = NULL;
01187
01188         lstrcpy(&szGetName[cchRoot], "ProductVersion");
01189         fRet = VerQueryValue(lpvMem, szGetName, &lszVer, &cchVer);
01190
01191         if( fRet && cchVer && lszVer )
01192         {
01193             vers = (char*)lszVer;
01194             bRet = true;
01195         }
01196
01197         GlobalUnlock(hMem);
01198         GlobalFree(hMem);
01199     }
01200
01201     return bRet;
01202 }
01203
01204 BOOL CWincvsApp::SaveAllModified()
01205 {
01206     // Prevent from exiting when cvs is running
01207     if( m_CvsRunning )
01208     {
01209         m_CvsStopping = true;
01210         return TRUE;
01211     }
01212
01213     if( gLogoutThread != NULL )
01214     {
01215         HANDLE hdl = gLogoutThread->m_hThread;
01216         gLogoutThread->KillThread();
01217         WaitForSingleObject(hdl, INFINITE);
01218
01219         //delete gLogoutThread;
01220         gLogoutThread = NULL;
01221     }
01222
01223     // Auto-logout
01224     if( gCvsPrefs.HasLoogedIn() && gCvsPrefs.LogoutTimeOut() > 0 )
01225     {
01226         cvs_err("Making automatic logout before quitting:\n");
01227         CvsCmdLogout();
01228         WaitForCvs();
01229     }
01230
01231     return CWinApp::SaveAllModified();
01232 }
01233
01239 const char* CWincvsApp::GetEnvMainThread(const char* name)
01240 {
01241     return m_mainFrame->GetEnvMainThread(name);
01242 }
01243
01247 void CWincvsApp::IdleCvsProgress(void)
01248 {
01249     static bool bWasCvsRunning = false; // To restore the idle message once CVS has stoped
01250
01251     if( !m_CvsRunning )
01252     {
01253         if( bWasCvsRunning )
01254         {
01255             bWasCvsRunning = false;
01256
01257             CString strIdleString;
01258             strIdleString.LoadString(AFX_IDS_IDLEMESSAGE);
01259
01260             CStatusBar* bar = GetStatusBar();
01261             if( bar != NULL )
01262                 bar->SetWindowText(strIdleString);
01263         }
01264
01265         return;
01266     }
01267
01268     if( m_CvsProcess != NULL )
01269     {
01270         if( !cvs_process_is_active(m_CvsProcess) )
01271         {
01272             m_CvsRunning = false;
01273             m_CvsStopping = false;
01274             m_CvsProcess = NULL;
01275
01276             GetFileView()->CheckChanges();
01277         }
01278     }
01279
01280     bWasCvsRunning = true;
01281
01282     DWORD whatTimeIsIt = ::GetTickCount();
01283     static DWORD lastTime = 0;
01284
01285     // Let's make some stuff every second while cvs is idling
01286     if( (whatTimeIsIt - lastTime) < 1000 )
01287         return;
01288
01289     lastTime = whatTimeIsIt;
01290
01291     char path[_MAX_PATH];
01292     getcwd(path, _MAX_PATH);
01293
01294     CStatusBar* bar = GetStatusBar();
01295
01296     if( bar != NULL )
01297         bar->SetWindowText(path);
01298 }
01299
01304 KiFilterModel* CWincvsApp::GetFilterModel() const
01305 {
01306     return m_mainFrame->GetFilterModel();
01307 }
01308
01313 KiRecursionModel* CWincvsApp::GetRecursionModel() const
01314 {
01315     return m_mainFrame->GetRecursionModel();
01316 }
01317
01322 KiIgnoreModel* CWincvsApp::GetIgnoreModel() const
01323 {
01324     return m_mainFrame->GetIgnoreModel();
01325 }
01326
01330 void CWincvsApp::UpdateAllDocsView()
01331 {
01332     POSITION pos = GetFirstDocTemplatePosition();
01333     while( pos )
01334     {
01335         CDocTemplate* pTemplate = GetNextDocTemplate(pos);
01336
01337         POSITION pos2 = pTemplate->GetFirstDocPosition();
01338         while( pos2 )
01339         {
01340             CDocument* pDocument;
01341             if( pDocument = pTemplate->GetNextDoc(pos2) )
01342             {
01343                 pDocument->UpdateAllViews(NULL);
01344             }
01345         }
01346     }
01347 }
01348
01353 void CWincvsApp::PeekPumpAndIdle(bool doIdle)
01354 {
01355     MSG Msg;
01356     while( ::PeekMessage(&Msg, NULL, 0, 0, PM_NOREMOVE) )
01357     {
01358         PumpMessage();
01359     }
01360
01361     if( doIdle )
01362     {
01363         LONG lIdle = 0;
01364         while( OnIdle(lIdle++) )
01365             ;
01366     }
01367 }
01368
01372 void CWincvsApp::RestartScriptEngine()
01373 {
01374     StopScriptEngine();
01375     StartScriptEngine(true);
01376 }
01377
01381 void CWincvsApp::StartScriptEngine(const bool forceReload /*= false*/)
01382 {
01383     CPython_Interp::InitPythonSupport(forceReload);
01384
01385     //MacrosReloadAll();
01386     PyMacrosReloadAll();
01387
01388     m_hasTCL = CTcl_Interp::IsAvail(forceReload);
01389     m_hasPY = CPython_Interp::IsAvail();
01390
01391     if( gCvsPrefs.GetUseShell() == SHELL_PYTHON && !m_hasPY && m_hasTCL )
01392     {
01393         cvs_out("Python is not available, switching the shell to TCL\n");
01394         gCvsPrefs.SetUseShell(SHELL_TCL);
01395     }
01396     else if( gCvsPrefs.GetUseShell() == SHELL_TCL && m_hasPY && !m_hasTCL )
01397     {
01398         cvs_out("TCL is not available, switching the shell to Python\n");
01399         gCvsPrefs.SetUseShell(SHELL_PYTHON);
01400     }
01401
01402     if( gCvsPrefs.GetUseShell() == SHELL_TCL && m_hasTCL )
01403     {
01404         cvs_out("TCL is available, shell is enabled : help (select and press enter)\n");
01405     }
01406
01407     if( !m_hasTCL && !m_hasPY )
01408     {
01409         cvs_err("TCL or Python are not available, shell is disabled\n");
01410     }
01411 }
01412
01416 void CWincvsApp::StopScriptEngine()
01417 {
01418     PyInvalUICache();
01419     CPython_Interp::ClosePythonSupport();
01420 }
01421
01423 void CWincvsApp::OnStopcvs()
01424 {
01425     stopCVS();
01426 }
01427
01429 void CWincvsApp::OnUpdateStopcvs(CCmdUI* pCmdUI)
01430 {
01431     pCmdUI->Enable(IsCvsRunning() && !IsCvsStopping() ? TRUE : FALSE);
01432 }
01433
01435 void CWincvsApp::OnHelpCvs()
01436 {
01437     CStr cvscmd;
01438     gCvsPrefs.WhichCvs(cvscmd, gCvsPrefs.UseAltCvs());
01439
01440     CStr uppath, folder;
01441     if( SplitPath(cvscmd, uppath, folder) )
01442     {
01443         CStr cvsHelpPath = uppath;
01444         cvsHelpPath += "cvs.chm";
01445
01446         if( HtmlHelp(AfxGetMainWnd()->GetSafeHwnd(), cvsHelpPath, HH_DISPLAY_TOPIC, 0) == NULL )
01447         {
01448             CvsAlert cvsAlert(kCvsAlertStopIcon,
01449                 _i18n("Unable to open CVS Documentation file."),
01450                 "Make sure CVS Documentation is installed in the same folder as your CVS executable.",
01451                 BUTTONTITLE_OK, NULL);
01452
01453             cvsAlert.ShowAlert();
01454         }
01455     }
01456     else
01457     {
01458         CvsAlert cvsAlert(kCvsAlertStopIcon,
01459             _i18n("Unable to locate CVS Documentation file."),
01460             "Make sure CVS Documentation is installed in the same folder as your CVS executable.",
01461             BUTTONTITLE_OK, NULL);
01462
01463         cvsAlert.ShowAlert();
01464     }
01465 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSelectionDetailsDlg::CompareInfo Member List

This is the complete list of members for CSelectionDetailsDlg::CompareInfo, including all inherited members.

m_asc | CSelectionDetailsDlg::CompareInfo
m_column | CSelectionDetailsDlg::CompareInfo

Generated on Sat Aug 7 22:56:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

DROPDOWNBUTTON Member List

This is the complete list of members for DROPDOWNBUTTON, including all inherited members.

idButton | DROPDOWNBUTTON
idMenu | DROPDOWNBUTTON
next | DROPDOWNBUTTON

Generated on Sat Aug 7 22:52:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMiniDockFrameWnd.h Source File

WinCvs/CJLib/Include/CJMiniDockFrameWnd.h

Go to the documentation of this file.
00001 // CJMiniDockFrameWnd.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:51 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJockey/Include/CJMiniDockFrameWnd.h $
00011  *
00012  * $History: CJMiniDockFrameWnd.h $
00013  *
00014  * *****************  Version 7  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/Include
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 6  *****************
00020  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00021  * Updated in $/CodeJockey/Include
00022  *
00023  * *****************  Version 5  *****************
00024  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00025  * Updated in $/CodeJockey/Include
00026  * Cleaned up inline functions, and import/export macro so that class will
00027  * be imported when linked to, and exported at compile time.
00028  *
00029  * *****************  Version 4  *****************
00030  * User: Kirk Stowell Date: 6/14/99    Time: 10:46p
00031  * Updated in $/CodeJockey/Include
00032  * Cleaned up code to eliminate level 4 compilier warnings.
00033  *
00034  * *****************  Version 3  *****************
00035  * User: Kirk Stowell Date: 4/14/99    Time: 10:40p
00036  * Updated in $/CodeJockey/Include
00037  * Daniel Harth [danielh@mail.matco.ro] - Added support for diagonal
00038  * sizing.
00039  *
00040  * *****************  Version 2  *****************
00041  * User: Kirk Stowell Date: 4/03/99    Time: 10:39p
00042  * Updated in $/CodeJockey/Include
00043  * Added comments and cleaned up code.
00044  *
00045  * *****************  Version 1  *****************
00046  * User: Kirk Stowell Date: 1/16/99    Time: 10:39p
00047  * Created in $/CodeJockey/Include
00048  * Initial release.
00049  *
00050  ***************************************************************************/
00052
00053 #ifndef __CJMINIDOCKFRAMEWND_H__
00054 #define __CJMINIDOCKFRAMEWND_H__
00055
00056 #if _MSC_VER >= 1000
00057 #pragma once
00058 #endif // _MSC_VER >= 1000
00059
00060 // CCJMiniDockFrameWnd is a CMiniDockFrameWnd class which is used to
00061 // handle docking for the CCJControlBar class.
00062 class _CJX_EXT_CLASS CCJMiniDockFrameWnd : public CMiniDockFrameWnd
00063 {
00064     DECLARE_DYNCREATE(CCJMiniDockFrameWnd)
00065
00066 public:
00067
00068     // Default constructor
00069     //
00070     CCJMiniDockFrameWnd();
00071
00072     // Virtual destructor
00073     //
00074     virtual ~CCJMiniDockFrameWnd();
00075
00076 protected:
00077
00078     // make CDockBar a friend to this class for access to member data
00079     //
00080     friend class CDockBar;
00081
00082 // Overrides
00083     // ClassWizard generated virtual function overrides
00084     //{{AFX_VIRTUAL(CCJMiniDockFrameWnd)
00085     public:
00086     virtual BOOL Create(CWnd* pParent, DWORD dwBarStyle);
00087     //}}AFX_VIRTUAL
00088
00089 // Generated message map functions
00090 protected:
00091     //{{AFX_MSG(CCJMiniDockFrameWnd)
00092     afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
00093     afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
00094     //}}AFX_MSG
00095     DECLARE_MESSAGE_MAP()
00096 };
00097
00099
00100 //{{AFX_INSERT_LOCATION}}
00101 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00102
00103 #endif // __CJMINIDOCKFRAMEWND_H__
00104
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

awidget Member List

This is the complete list of members for awidget, including all inherited members.

awidget(HBITMAP b, int c, const char *t, UTB_VAR v) | awidget | [inline]
awidget() | awidget | [inline]
awidget(const awidget &src) | awidget | [inline]
bitmap | awidget |
cmd | awidget |
operator=(const awidget &src) | awidget | [inline]
tooltip | awidget |
var | awidget |
~awidget() | awidget | [inline, virtual]

Generated on Sat Aug 7 22:48:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPseudoCmdStatusWrapper Member List

This is the complete list of members for UPseudoCmdStatusWrapper, including all inherited members.

outEnabled | UPseudoCmdStatusWrapper
outMark | UPseudoCmdStatusWrapper
outName | UPseudoCmdStatusWrapper
outUsesMark | UPseudoCmdStatusWrapper

Generated on Sat Aug 7 22:55:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CContentItems Member List

This is the complete list of members for CContentItems, including all inherited members.

CContentItems(UINT nID, CString str) | CContentItems |
GetImageID() | CContentItems | [virtual]
GetText() | CContentItems | [virtual]
m_csText | CContentItems | [protected]
m_nImageID | CContentItems | [protected]
operator=(CContentItems &pItems) | CContentItems |

Generated on Sat Aug 7 22:50:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

AddBinCvsArgs Member List

This is the complete list of members for AddBinCvsArgs, including all inherited members.

add(const char *arg) | CvsArgs | [virtual]
addfile(const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L) | ControlCvsArgs | [virtual]
argc | CvsArgs | [protected]
Argc(void) const | CvsArgs |
argv | CvsArgs | [protected]
Argv(void) const | CvsArgs |
ControlCvsArgs() | ControlCvsArgs | [inline]
CvsArgs(bool defargs=true) | CvsArgs |
CvsArgs(char *const *fromargv, int fromargc) | CvsArgs |
FileIsType(const char *arg, const char *dir, const FSSpec *spec=0L) | AddBinCvsArgs | [inline, protected, virtual]
HasProblem(void) const | ControlCvsArgs |
parse(const char *arg) | CvsArgs | [virtual]
print(const char *indirectory=0L) | CvsArgs |
reset(bool defargs=true) | CvsArgs |
SetProblem(bool newState) | ControlCvsArgs |
TypeDesc() | AddBinCvsArgs | [inline, protected, virtual]
~CvsArgs() | CvsArgs | [virtual]

Generated on Sat Aug 7 22:48:07 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/FilterMaskOptDlg.h Source File

common/FilterMaskOptDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- August 2003
00019  */
00020
00021 /*
00022  * FilterMaskOptDlg.h --- filter mask options dialog
00023  */
00024
00025 #if !defined(AFX_FILTERMASKOPTDLG_H__8560F3E7_6DBF_4EB6_B33E_E438B3020000__INCLUDED_)
00026 #define AFX_FILTERMASKOPTDLG_H__8560F3E7_6DBF_4EB6_B33E_E438B3020000__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031
00032 #ifdef WIN32
00033 #   include "HHelpSupport.h"
00034 #endif
00035
00036 bool CompatGetFilterMaskOptions(int& reactionSpeed);
00037
00038 #ifdef WIN32
00039
00041 // CFilterMaskOptDlg dialog
00042
00043 class CFilterMaskOptDlg : public CHHelpDialog
00044 {
00045 // Construction
00046 public:
00047     CFilterMaskOptDlg(const int reactionSpeed, CWnd* pParent = NULL);   // standard constructor
00048
00049 // Dialog Data
00050     //{{AFX_DATA(CFilterMaskOptDlg)
00051     enum { IDD = IDD_FILTERBAR_OPTIONS };
00052     CStatic m_reactionSpeedStatic;
00053     CSpinButtonCtrl m_reactionSpeedSpin;
00054     int     m_reactionSpeed;
00055     //}}AFX_DATA
00056
00057
00058 // Overrides
00059     // ClassWizard generated virtual function overrides
00060     //{{AFX_VIRTUAL(CFilterMaskOptDlg)
00061     protected:
00062     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00063     //}}AFX_VIRTUAL
00064
00065 // Implementation
00066 protected:
00067
00068     // Generated message map functions
00069     //{{AFX_MSG(CFilterMaskOptDlg)
00070     virtual BOOL OnInitDialog();
00071     afx_msg void OnChangeReactionSpeed();
00072     afx_msg void OnHelp();
00073     //}}AFX_MSG
00074     DECLARE_MESSAGE_MAP()
00075 private:
00076     // Methods
00077     virtual void InitHelpID();
00078
00079     void UpdateReactionSpeedInfo();
00080 };
00081
00082 //{{AFX_INSERT_LOCATION}}
00083 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00084
00085 #endif /* WIN32 */
00086
00087 #endif // !defined(AFX_FILTERMASKOPTDLG_H__8560F3E7_6DBF_4EB6_B33E_E438B3020000__INCLUDED_)
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppGlue.h Source File

common/AppGlue.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * AppGlue.h --- glue code to access CVS services
00023  */
00024
00025 #ifndef APPGLUE_H
00026 #define APPGLUE_H
00027
00028 #include <stdio.h>
00029 #include <vector>
00030
00031 #ifdef WIN32
00032     #include <fcntl.h>
00033     #include <io.h>
00034 #endif
00035
00036 typedef struct _CvsProcess CvsProcess;
00037
00038 // FIXME: To be removed and replaced by value in CvsProcessErrorInfo once the sLastExitCode is eliminated
00039 #define errInternal -99
00040 #define errThreadRunning -98
00041 #define errNoCvsguiProtocol -97
00042
00043 // Hooks for CVS
00044 extern "C" {
00045     extern long glue_consoleout(const char* txt, long len, const CvsProcess* process);
00046     extern long glue_consoleerr(const char* txt, long len, const CvsProcess* process);
00047     extern long glue_consolein(const char* txt, long len, const CvsProcess* process);
00048     extern const char* glue_getenv(const char* name, const CvsProcess* process);
00049     extern void glue_exit(int code, const CvsProcess* process);
00050     extern void glue_ondestroy(const CvsProcess* process);
00051 }
00052
00053 class CCvsConsole;
00054 class CvsArgs;
00055 class UStr;
00056 class CStr;
00057
00058 int testCVS(const char* path, int argc, char* const* argv);
00059 int launchCVS(const char* path, int argc, char* const* argv, CCvsConsole* console = 0L);
00060 int launchCVS(int test, const char* path, int argc, char* const* argv, CCvsConsole* console = 0L, const char* cvsfile = 0L);
00061 void stopCVS();
00062
00063 FILE* launchCVS(const char* dir, const CvsArgs& args, UStr& tmpFile,
00064                 const char* prefix = 0L, const char* extension = 0L);
00065
00066 const char* launchCVS(const char* dir, const CvsArgs& args,
00067                       const char* prefix = 0L, const char* extension = 0L);
00068
00069 #if defined(WIN32) || TARGET_RT_MAC_MACHO
00070
00071     void WaitForCvs(void);
00072 #else
00073 #   define WaitForCvs()
00074 #endif
00075
00077 class CCvsProcessData
00078 {
00079 public:
00080     // Construction
00081     CCvsProcessData();
00082
00083 private:
00084     // Data members
00085     CCvsConsole* m_pCvsConsole;
00086
00087 public:
00088     // Interface
00089     void SetCvsConsole(CCvsConsole* pCvsConsole);
00090     CCvsConsole* GetCvsConsole() const;
00091     CCvsConsole* GetCvsConsole();
00092 };
00093
00095 class CCvsConsole
00096 {
00097 public:
00104     virtual long cvs_out(const char* txt, long len) = 0L;
00105
00112     virtual long cvs_err(const char* txt, long len) = 0L;
00113 };
00114
00116 class CCvsStreamConsole : public CCvsConsole
00117 {
00118 public:
00119     // Construction
00120     CCvsStreamConsole(FILE* fileOut = 0L, bool autoClose = true);
00121     virtual ~CCvsStreamConsole();
00122
00123 protected:
00124     // Members
00125     bool m_autoClose;
00126     bool m_modeSet;
00127     FILE* m_fileOut;
00129     // Methods
00130     virtual void SetMode(bool binary);
00131     virtual bool IsModeSet() const;
00132
00133 public:
00134     // Interface
00135     virtual bool Open(const char* fileName);
00136
00137     virtual long cvs_out(const char* txt, long len);
00138     virtual long cvs_err(const char* txt, long len);
00139 };
00140
00141
00143 class CStreamConsole : public CCvsStreamConsole
00144 {
00145 public:
00146     // Construction
00147     CStreamConsole(FILE* fileOut);
00148 };
00149
00150 #if INTERNAL_AUTHEN
00151
00152 class CAuthenSetUp
00153 {
00154 public:
00155     CAuthenSetUp();
00156     virtual ~CAuthenSetUp();
00157 };
00158 #endif /* INTERNAL_AUTHEN */
00159
00161 class CTmpFiles
00162 {
00163 public:
00164     CTmpFiles();
00165     virtual ~CTmpFiles();
00166     const char* push_back(const char* file);
00167 protected:
00168     std::vector<CStr> m_allfiles;
00169 };
00170
00171 #endif /* APPGLUE_H */
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/StatusDlg.cpp Source File

common/StatusDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- March 2002
00019  */
00020
00021 /*
00022  * StatusDlg.cpp : the cvs status dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include "OptionalPropertySheet.h"
00030 #endif /* WIN32 */
00031
00032 #if qUnix
00033 #   include "UCvsDialogs.h"
00034 #endif
00035
00036 #ifdef qMacCvsPP
00037 #   include <UModalDialogs.h>
00038 #   include <LRadioButton.h>
00039 #   include <LEditText.h>
00040 #   include <LCheckBox.h>
00041 #   include <LMultiPanelView.h>
00042 #   include <LPopupGroupBox.h>
00043 #   include "LPopupFiller.h"
00044
00045 #   include "MacCvsApp.h"
00046 #endif /* qMacCvsPP */
00047
00048 #include "StatusDlg.h"
00049 #include "MultiFiles.h"
00050
00051 #ifdef WIN32
00052 #include "GetPrefs.h"
00053
00054 #ifdef _DEBUG
00055 #define new DEBUG_NEW
00056 #undef THIS_FILE
00057 static char THIS_FILE[] = __FILE__;
00058 #endif
00059
00061 // CStatus_MAIN property page
00062
00063 IMPLEMENT_DYNAMIC(CStatus_MAIN, CHHelpPropertyPage)
00064
00065 CStatus_MAIN::CStatus_MAIN(bool noRecurs, STATUSOUTPUT_TYPE outputType)
00066     : CHHelpPropertyPage(CStatus_MAIN::IDD)
00067 {
00068     m_noRecurs = noRecurs;
00069     m_outputType = (int)outputType;
00070 }
00071
00072 CStatus_MAIN::~CStatus_MAIN()
00073 {
00074 }
00075
00076 void CStatus_MAIN::DoDataExchange(CDataExchange* pDX)
00077 {
00078     CHHelpPropertyPage::DoDataExchange(pDX);
00079     //{{AFX_DATA_MAP(CStatus_MAIN)
00080     DDX_Check(pDX, IDC_NORECURS, m_noRecurs);
00081     DDX_Radio(pDX, IDC_OUTPUT_STANDARD, m_outputType);
00082     //}}AFX_DATA_MAP
00083 }
00084
00085
00086 BEGIN_MESSAGE_MAP(CStatus_MAIN, CHHelpPropertyPage)
00087     //{{AFX_MSG_MAP(CStatus_MAIN)
00088     //}}AFX_MSG_MAP
00089 END_MESSAGE_MAP()
00090
00092 // CStatus_MAIN message handlers
00093
00094 void CStatus_MAIN::InitHelpID()
00095 {
00096     SetCtrlHelpID(IDC_OUTPUT_STANDARD,  IDH_IDC_OUTPUT_STANDARD);
00097     SetCtrlHelpID(IDC_OUTPUT_QUICK,     IDH_IDC_OUTPUT_QUICK);
00098     SetCtrlHelpID(IDC_OUTPUT_VERBOSE,   IDH_IDC_OUTPUT_VERBOSE);
00099     SetCtrlHelpID(IDC_NORECURS,         IDH_IDC_NORECURS);
00100 }
00101
00102 #endif /* WIN32 */
00103
00105 bool CompatGetStatus(const MultiFiles* mf, bool& noRecurs, STATUSOUTPUT_TYPE& outputType)
00106 {
00107     bool userHitOK = false;
00108
00109     noRecurs = false;
00110     outputType = gCvsPrefs.StatusOutputType();
00111
00112 #ifdef WIN32
00113     COptionalPropertySheet pages(gCvsPrefs.HideCommandDlgStatus(), "Status settings");
00114     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00115     CStatus_MAIN page1(noRecurs, outputType);
00116     CGetPrefs_GLOBALS page2;
00117     pages.AddPage(&page1);
00118     pages.AddPage(&page2);
00119
00120     if( pages.DoModal() == IDOK )
00121     {
00122         noRecurs = page1.m_noRecurs ? true : false;
00123         gCvsPrefs.SetStatusOutputType((STATUSOUTPUT_TYPE)page1.m_outputType);
00124
00125         page2.StoreValues();
00126         gCvsPrefs.SetHideCommandDlgStatus(pages.GetHideCommandDlg());
00127         userHitOK = true;
00128     }
00129 #endif /* WIN32 */
00130
00131 #ifdef qMacCvsPP
00132     userHitOK = true;
00133 #endif /* qMacCvsPP */
00134
00135 #if qUnix
00136     userHitOK = true;
00137 #endif // qUnix
00138
00139     if( userHitOK )
00140     {
00141         outputType = gCvsPrefs.StatusOutputType();
00142
00143         gCvsPrefs.save();
00144     }
00145
00146     return userHitOK;
00147 }
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPersistent::CPersistentEntry Member List

This is the complete list of members for CPersistent::CPersistentEntry, including all inherited members.

m_fClass | CPersistent::CPersistentEntry
m_fUniqueName | CPersistent::CPersistentEntry
m_fValue | CPersistent::CPersistentEntry

Generated on Sat Aug 7 22:55:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

URECT Member List

This is the complete list of members for URECT, including all inherited members.

bottom | URECT
left | URECT
right | URECT
top | URECT

Generated on Sat Aug 7 22:56:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGraphView Member List

This is the complete list of members for CGraphView, including all inherited members.

CalcImageSize(void) | CGraphView |
CGraphView() | CGraphView | [protected]
DisableCommon() | CGraphView | [private]
DisableUpdate(CCmdUI *pCmdUI) | CGraphView | [protected]
FileAction() | CGraphView | [private]
GetDeviceScrollPosition() | CScrollView | [inline]
GetImgList(void) | CGraphView | [inline, static]
InvalidateRect(const URECT *r) | CScrollView | [inline]
IsSelSingleNode(kLogNode type, bool equal=true) | CGraphView | [private]
m_imageList | CGraphView | [private, static]
m_numberOfPages | CGraphView | [private]
m_pageHeight | CGraphView | [private]
OnAnnotate() | CGraphView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CGraphView | [protected, virtual]
OnContextMenu(CWnd *pWnd, CPoint point) | CGraphView | [protected]
OnDraw(CDC *pDC) | CGraphView | [protected, virtual]
OnEndPrinting(CDC *pDC, CPrintInfo *pInfo) | CGraphView | [protected, virtual]
OnGraphChangelogmessage() | CGraphView | [protected]
OnGraphGraphoptions() | CGraphView | [protected]
OnGraphSetdescription() | CGraphView | [protected]
OnGraphSetstate() | CGraphView | [protected]
OnInitialUpdate() | CGraphView | [protected, virtual]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CGraphView | [private]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CGraphView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CGraphView | [protected]
OnLButtonDown(UINT nFlags, CPoint point) | CGraphView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CGraphView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CGraphView | [protected, virtual]
OnQueryShellactionDefault() | CGraphView | [protected]
OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll=TRUE) | CGraphView | [virtual]
OnUpdateGraphChangelogmessage(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateGraphSetdescription(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateGraphSetstate(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateViewDelrev(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateViewDiff(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateViewReload(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateViewRetrieve(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateViewSelnonsig(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateViewTag(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateViewUnlockf(CCmdUI *pCmdUI) | CGraphView | [protected]
OnUpdateViewUpdate(CCmdUI *pCmdUI) | CGraphView | [protected]
OnViewDelrev() | CGraphView | [protected]
OnViewDiff() | CGraphView | [protected]
OnViewEditsel() | CGraphView | [protected]
OnViewEditseldef() | CGraphView | [protected]
OnViewOpensel() | CGraphView | [protected]
OnViewOpenselas() | CGraphView | [protected]
OnViewReload() | CGraphView | [protected]
OnViewRetrieve() | CGraphView | [protected]
OnViewRetrieveAs() | CGraphView | [protected]
OnViewSelnonsig() | CGraphView | [protected]
OnViewTag() | CGraphView | [protected]
OnViewUnlockf() | CGraphView | [protected]
OnViewUpdate() | CGraphView | [protected]
RetrieveSel(UStr &file) | CGraphView | [private]
SaveSel(bool queryName=false) | CGraphView | [private]
~CGraphView() | CGraphView | [protected, virtual]

Generated on Sat Aug 7 22:53:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoAddBinaryHandler Member List

This is the complete list of members for KoAddBinaryHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoAddBinaryHandler() | KoAddBinaryHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KoAddBinaryHandler | [inline, virtual]
OnFiles(MultiFiles *pmf) | KoAddBinaryHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoAddBinaryHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:47 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MultiString.h Source File

common/MultiString.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- August 1998
00019  */
00020
00021 /*
00022  * MultiString.h --- remember several unique persistents strings
00023  */
00024
00025 #ifndef MULTISTRING_H
00026 #define MULTISTRING_H
00027
00028 #include <vector>
00029 #include "Persistent.h"
00030 #include "CPStr.h"
00031
00032 #ifndef NAMESPACE
00033 #   if defined(_MSC_VER) || defined(__MWERKS__) || (__GNUC__ > 2)
00034 #       define NAMESPACE(w) w::
00035 #   else
00036 #       define NAMESPACE(w) ::
00037 #   endif
00038 #endif
00039
00040 #if qUnix
00041     class CMString;
00042     void DoDataExchange(bool fill, int widid, int cmdid, CMString& mstr);
00043 #endif // qUnix
00044
00046 template<class T>
00047 class TMPersistent : public CPersistent
00048 {
00049 protected:
00050     typedef NAMESPACE(std) vector<T> list_t;
00051 public:
00052     // Construction
00053     TMPersistent(const char* uniqueName, kClassPersistent pclass = kNoClass);
00054     virtual ~TMPersistent();
00055
00056 protected:
00057     // Methods
00058     virtual unsigned int SizeOf(void) const;
00059     virtual const void* GetData(void) const;
00060     virtual void SetData(const void* ptr, unsigned int size);
00061
00062     // Interface
00063     inline const list_t& GetList(void) const;
00064     inline list_t& GetList(void);
00065
00066 private:
00067     // Data members
00068     list_t m_allItems;
00069     mutable CStaticAllocT<char> m_buffer;
00070 };
00071
00072 template<class T>
00073 class TMString : public CPersistent
00074 {
00075 public:
00076     typedef NAMESPACE(std) vector<T> list_t;
00077     TMString(unsigned int maxstr, const char* uniqueName,
00078         char* const* defaultStr = 0L, kClassPersistent pclass = kNoClass);
00079
00080     virtual ~TMString();
00081
00082 protected:
00083     // Methods
00084     virtual unsigned int SizeOf(void) const;
00085     virtual const void* GetData(void) const;
00086     virtual void SetData(const void* ptr, unsigned int size);
00087
00088     virtual int Compare(const char* s1, const char* s2) const;
00089
00090 public:
00091     // Interface
00092     void Insert(const char* str);
00093     bool Remove(const char* str);
00094     void RemoveAll();
00095
00096     typename list_t::const_iterator Find(const char* instr) const;
00097
00098     inline const list_t& GetList(void) const;
00099     inline typename list_t::const_iterator begin() const;
00100     inline typename list_t::const_iterator end() const;
00101
00102 protected:
00103     // Data members
00104     list_t m_allStrs;
00105     mutable CStaticAllocT<char> m_buffer;
00106     unsigned int m_maxStr;
00107 };
00108
00110 class CMString : public TMString<CStr>
00111 {
00112     UDECLARE_DYNAMIC(CMString)
00113 public:
00114     // Construction
00115     CMString(unsigned int maxstr, const char* uniqueName,
00116         char* const* defaultStr = 0L, kClassPersistent pclass = kNoClass);
00117
00118     virtual ~CMString();
00119 };
00120
00122 class CMPString : public TMString<CPStr>
00123 {
00124     UDECLARE_DYNAMIC(CMPString)
00125 public:
00126     // Construction
00127     CMPString(unsigned int maxstr, const char* uniqueName,
00128         char* const* defaultStr = 0L, kClassPersistent pclass = kNoClass);
00129
00130     virtual ~CMPString();
00131 };
00132
00134 template <char delimiter>
00135 class TKeyString : public CMString
00136 {
00137 public:
00138     // Construction
00139     TKeyString(unsigned int maxstr, const char* uniqueName,
00140         char* const* defaultStr = 0L, kClassPersistent pclass = kNoClass);
00141
00142     virtual ~TKeyString();
00143
00144 protected:
00145     // Methods
00146     virtual int Compare(const char* s1, const char* s2) const;
00147
00148 public:
00149     // Interface
00150     virtual void Concatenate(UStr& res, const char* key, const char* value) const;
00151     virtual void Split(const char* str, UStr& key, UStr& value) const;
00152
00153     const char GetDelimiter() const;
00154 };
00155
00157 class CKeyString : public TKeyString<'@'>
00158 {
00159 public:
00160     // Construction
00161     CKeyString(unsigned int maxstr, const char* uniqueName,
00162         char* const* defaultStr = 0L, kClassPersistent pclass = kNoClass);
00163
00164     virtual ~CKeyString();
00165 };
00166
00168 class CMKeyString : public TKeyString<'\x01'>
00169 {
00170 public:
00171     // Construction
00172     CMKeyString(unsigned int maxstr, const char* uniqueName,
00173         char* const* defaultStr = 0L, kClassPersistent pclass = kNoClass);
00174
00175     virtual ~CMKeyString();
00176
00177 protected:
00178     // Methods
00179     virtual int Compare(const char* s1, const char* s2) const;
00180 };
00181
00183 // TMPersistent inline implementations
00184
00185 template<class T>
00186 inline const typename TMPersistent<T>::list_t& TMPersistent<T>::GetList(void) const
00187 {
00188     return m_allItems;
00189 }
00190
00191 template<class T>
00192 inline typename TMPersistent<T>::list_t& TMPersistent<T>::GetList(void)
00193 {
00194     return m_allItems;
00195 }
00196
00197 template<class T>
00198 TMPersistent<T>::TMPersistent(const char* uniqueName, kClassPersistent pclass /*= kNoClass*/)
00199     : CPersistent(uniqueName, pclass)
00200 {
00201 }
00202
00203 template<class T>
00204 TMPersistent<T>::~TMPersistent()
00205 {
00206 }
00207
00208 template<class T>
00209 inline unsigned int TMPersistent<T>::SizeOf(void) const
00210 {
00211     return sizeof(int) + sizeof(T) * m_allItems.size();
00212 }
00213
00214 template<class T>
00215 const void* TMPersistent<T>::GetData(void) const
00216 {
00217     m_buffer.AdjustSize(SizeOf());
00218     char* tmp = m_buffer;
00219     *(int*) tmp = m_allItems.size();
00220     tmp += sizeof(int) / sizeof(char);
00221
00222     for(typename list_t::const_iterator i = m_allItems.begin(); i != m_allItems.end(); ++i)
00223     {
00224         memcpy(tmp, (const char*)(&*i), sizeof(T));
00225         tmp += sizeof(T);
00226     }
00227
00228     return (char*)m_buffer;
00229 }
00230
00231 template<class T>
00232 void TMPersistent<T>::SetData(const void* ptr, unsigned int size)
00233 {
00234     const char* tmp = (char*)ptr;
00235     m_allItems.erase(m_allItems.begin(), m_allItems.end());
00236     unsigned int thesize = *(int*)tmp;
00237
00238     tmp += sizeof(int) / sizeof(char);
00239     for(unsigned int i = 0; i < thesize; ++i)
00240     {
00241         m_allItems.push_back(*((T*)tmp));
00242         tmp += sizeof(T);
00243     }
00244 }
00245
00247 // TMString inline implementations
00248
00249 template<class T>
00250 inline const typename TMString<T>::list_t& TMString<T>::GetList(void) const
00251 {
00252     return m_allStrs;
00253 }
00254
00255 template<class T>
00256 inline typename TMString<T>::list_t::const_iterator TMString<T>::begin() const
00257 {
00258     return GetList().begin();
00259 }
00260
00261 template<class T>
00262 inline typename TMString<T>::list_t::const_iterator TMString<T>::end() const
00263 {
00264     return GetList().end();
00265 }
00266
00267 template<class T>
00268 int TMString<T>::Compare(const char* s1, const char* s2) const
00269 {
00270     return strcmp(s1, s2);
00271 }
00272
00273 #endif /* AUTHEN_H */
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPathBuffer Member List

This is the complete list of members for CPathBuffer, including all inherited members.

Clear() | CPathBuffer | [inline]
CPathBuffer() | CPathBuffer |
GetBuffer(int size=0) | CPathBuffer | [inline]
m_buffer | CPathBuffer | [private]
m_bufferSize | CPathBuffer | [private]
~CPathBuffer() | CPathBuffer | [virtual]

Generated on Sat Aug 7 22:55:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CheckoutDlg.cpp Source File

common/CheckoutDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * CheckoutDlg.h : the cvs checkout dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #   include "wincvs.h"
00029 #   include <sys\stat.h>
00030 #   include <direct.h>
00031 #   include <errno.h>
00032 #   include "wincvs_winutil.h"
00033 #endif /* WIN32 */
00034
00035 #if qUnix
00036 #   include "UCvsDialogs.h"
00037 #endif
00038
00039 #ifdef qMacCvsPP
00040 #   include <UModalDialogs.h>
00041 #   include <LMultiPanelView.h>
00042 #   include <LPopupGroupBox.h>
00043 #   include <LCheckBox.h>
00044 #   include <LTextEditView.h>
00045 #   include <LEditText.h>
00046 #   include <LPushButton.h>
00047 #   include "LPopupFiller.h"
00048
00049 #   include "MacCvsConstant.h"
00050 #endif /* qMacCvsPP */
00051
00052 #include "CheckoutDlg.h"
00053 #include "CvsPrefs.h"
00054 #include "MultiString.h"
00055 #include "MultiFiles.h"
00056 #include "UpdateDlg.h"
00057 #include "PromptFiles.h"
00058 #include "ItemListDlg.h"
00059 #include "CvsRootDlg.h"
00060 #include "FileTraversal.h"
00061 #include "CvsEntries.h"
00062
00063 CMString gOldModules(20, "P_OldModules");
00064
00070 static bool IsCvsDirectory(const char* dir)
00071 {
00072     bool res = false;
00073
00074     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00075     vector<CStr> ignlist;
00076     struct stat sb;
00077
00078     std::string strPath = dir;
00079     strPath.erase(strPath.find_last_not_of(kPathDelimiter) + 1, string::npos);
00080
00081     int statres = stat(strPath.c_str(), &sb);
00082     if( statres != -1 && S_ISDIR(sb.st_mode) )
00083     {
00084         CStr uppath, folder;
00085         if( !SplitPath(dir, uppath, folder) || uppath.empty() )
00086         {
00087             uppath = dir;
00088             folder = ".";
00089         }
00090
00091         BuildIgnoredList(ignlist, uppath);
00092
00093         EntnodeData* data = Entries_SetVisited(uppath, entries, folder, sb, true, &ignlist);
00094         if( !data->IsUnknown() )
00095         {
00096             res = true;
00097         }
00098     }
00099
00100     return res;
00101 }
00102
00103 #ifdef WIN32
00104 #   include "GetPrefs.h"
00105 #   ifdef _DEBUG
00106 #   define new DEBUG_NEW
00107 #   undef THIS_FILE
00108     static char THIS_FILE[] = __FILE__;
00109 #   endif
00110
00112 // CCheckout_MAIN
00113
00114 IMPLEMENT_DYNAMIC(CCheckout_MAIN, CHHelpPropertyPage)
00115
00116 CCheckout_MAIN::CCheckout_MAIN(const MultiFiles* mf,
00117                                const char* modname, const char* path, const bool dontShortenPaths,
00118                                bool forceRoot, const char* cvsroot)
00119     : m_mf(mf), CHHelpPropertyPage(CCheckout_MAIN::IDD)
00120 {
00121     //{{AFX_DATA_INIT(CCheckout_MAIN)
00122     m_noRecurse = FALSE;
00123     m_overrideCoDir = FALSE;
00124     m_checkoutDir = _T("");
00125     m_dontShortenPaths = FALSE;
00126     m_cvsroot = cvsroot;
00127     m_forceRoot = forceRoot;
00128     m_export = FALSE;
00129     //}}AFX_DATA_INIT
00130
00131     m_moduleName = modname;
00132     m_path = path;
00133     if( m_path.IsEmpty() )
00134     {
00135         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00136         if( 0L != app )
00137             m_path = app->GetRoot();
00138     }
00139
00140     m_dontShortenPaths = dontShortenPaths;
00141
00142     m_moduleCombo.SetItems(&gOldModules);
00143     m_cvsrootCombo.SetItems(&gOldCvsroots);
00144 }
00145
00146 CCheckout_MAIN::~CCheckout_MAIN()
00147 {
00148 }
00149
00150 void CCheckout_MAIN::DoDataExchange(CDataExchange* pDX)
00151 {
00152     CHHelpPropertyPage::DoDataExchange(pDX);
00153
00154     //{{AFX_DATA_MAP(CCheckout_MAIN)
00155     DDX_Control(pDX, IDC_BROWSE_CVSROOT, m_selCvsrootButton);
00156     DDX_Control(pDX, IDC_FORCE_CVSROOT, m_forceRootCheck);
00157     DDX_Control(pDX, IDC_CVSROOT, m_cvsrootCombo);
00158     DDX_Control(pDX, IDC_DONT_SHORTEN_PATHS, m_dontShortenPathsCheck);
00159     DDX_Control(pDX, IDC_CHECKOUT_DIR, m_checkoutDirEdit);
00160     DDX_Control(pDX, IDC_OVERRIDE_CHECKOUT_DIR, m_overrideCoDirCheck);
00161     DDX_Control(pDX, IDC_PATH, m_pathEdit);
00162     DDX_Control(pDX, IDC_MODNAME, m_moduleCombo);
00163     DDX_Text(pDX, IDC_MODNAME, m_moduleName);
00164     DDX_Text(pDX, IDC_PATH, m_path);
00165     DDX_Check(pDX, IDC_NORECURS, m_noRecurse);
00166     DDX_Check(pDX, IDC_OVERRIDE_CHECKOUT_DIR, m_overrideCoDir);
00167     DDX_Text(pDX, IDC_CHECKOUT_DIR, m_checkoutDir);
00168     DDX_Check(pDX, IDC_DONT_SHORTEN_PATHS, m_dontShortenPaths);
00169     DDX_CBString(pDX, IDC_CVSROOT, m_cvsroot);
00170     DDX_Check(pDX, IDC_FORCE_CVSROOT, m_forceRoot);
00171     DDX_Check(pDX, IDC_EXPORT, m_export);
00172     //}}AFX_DATA_MAP
00173
00174     DDV_MinChars(pDX, m_moduleName, 1);
00175     DDX_ComboMString(pDX, IDC_MODNAME, m_moduleCombo);
00176     DDV_CheckPathExists(pDX, IDC_PATH, m_path);
00177
00178     if( !pDX->m_bSaveAndValidate )
00179     {
00180         //see if we are overriding the checkout directory
00181         OnCheckOverridecheckoutdir();
00182     }
00183
00184     DDX_ComboMString(pDX, IDC_CVSROOT, m_cvsrootCombo);
00185
00186     if( m_forceRoot )
00187     {
00188         DDV_MinChars(pDX, m_cvsroot, 1);
00189     }
00190
00191     if( !pDX->m_bSaveAndValidate )
00192     {
00193         m_selCvsrootButton.EnableWindow(m_forceRoot);
00194     }
00195 }
00196
00197
00198 BEGIN_MESSAGE_MAP(CCheckout_MAIN, CHHelpPropertyPage)
00199     //{{AFX_MSG_MAP(CCheckout_MAIN)
00200     ON_BN_CLICKED(IDC_BROWSE_PATH, OnBtnPath)
00201     ON_BN_CLICKED(IDC_OVERRIDE_CHECKOUT_DIR, OnCheckOverridecheckoutdir)
00202     ON_BN_CLICKED(IDC_BROWSE_MODNAME, OnBrowseModules)
00203     ON_BN_CLICKED(IDC_FORCE_CVSROOT, OnForceroot)
00204     ON_BN_CLICKED(IDC_BROWSE_CVSROOT, OnSelcvsroot)
00205     //}}AFX_MSG_MAP
00206 END_MESSAGE_MAP()
00207
00209 // CCheckout_MAIN message handlers
00210
00212 BOOL CCheckout_MAIN::OnInitDialog()
00213 {
00214     CHHelpPropertyPage::OnInitDialog();
00215
00216     // Extra initialization
00217     EnableEditAutoComplete(&m_pathEdit);
00218
00219     OnForceroot();
00220
00221     return TRUE;  // return TRUE unless you set the focus to a control
00222     // EXCEPTION: OCX Property Pages should return FALSE
00223 }
00224
00225 void CCheckout_MAIN::InitHelpID()
00226 {
00227     SetCtrlHelpID(IDC_MODNAME,                  IDH_IDC_MODNAME);
00228     SetCtrlHelpID(IDC_BROWSE_MODNAME,           IDH_IDC_BROWSE_MODNAME);
00229     SetCtrlHelpID(IDC_OVERRIDE_CHECKOUT_DIR,    IDH_IDC_OVERRIDE_CHECKOUT_DIR);
00230     SetCtrlHelpID(IDC_CHECKOUT_DIR,             IDH_IDC_CHECKOUT_DIR);
00231     SetCtrlHelpID(IDC_DONT_SHORTEN_PATHS,       IDH_IDC_DONT_SHORTEN_PATHS);
00232     SetCtrlHelpID(IDC_PATH,                     IDH_IDC_PATH);
00233     SetCtrlHelpID(IDC_BROWSE_PATH,              IDH_IDC_BROWSE_PATH);
00234     SetCtrlHelpID(IDC_FORCE_CVSROOT,            IDH_IDC_FORCE_CVSROOT);
00235     SetCtrlHelpID(IDC_CVSROOT,                  IDH_IDC_CVSROOT);
00236     SetCtrlHelpID(IDC_BROWSE_CVSROOT,           IDH_IDC_BROWSE_CVSROOT);
00237     SetCtrlHelpID(IDC_NORECURS,                 IDH_IDC_NORECURS);
00238     SetCtrlHelpID(IDC_EXPORT,                   IDH_IDC_EXPORT);
00239 }
00240
00242 void CCheckout_MAIN::OnBtnPath()
00243 {
00244     CString strPath;
00245     m_pathEdit.GetWindowText(strPath);
00246
00247     CStr path(strPath);
00248     if( BrowserGetDirectory("Select a directory to checkout to", path, IsWindow(m_hWnd) ? this : NULL) )
00249     {
00250         m_pathEdit.SetWindowText(path);
00251     }
00252 }
00253
00255 void CCheckout_MAIN::OnCheckOverridecheckoutdir()
00256 {
00257     BOOL enableCheckoutDir = m_overrideCoDirCheck.GetCheck() != 0;
00258
00259     m_checkoutDirEdit.EnableWindow(enableCheckoutDir);
00260     m_dontShortenPathsCheck.EnableWindow(enableCheckoutDir);
00261
00262     if( enableCheckoutDir )
00263     {
00264         CString strCheckoutDir;
00265         m_checkoutDirEdit.GetWindowText(strCheckoutDir);
00266         if( strCheckoutDir.IsEmpty() )
00267         {
00268             CString strModuleName;
00269             m_moduleCombo.GetWindowText(strModuleName);
00270
00271             if( !strModuleName.IsEmpty() )
00272             {
00273                 m_checkoutDirEdit.SetWindowText(strModuleName);
00274                 GotoDlgCtrl(&m_checkoutDirEdit);
00275             }
00276         }
00277     }
00278 }
00279
00281 void CCheckout_MAIN::OnBrowseModules()
00282 {
00283     CStr moduleName;
00284     if( CompatGetModuleListItem(m_mf, moduleName) )
00285     {
00286         m_moduleName = (const char*)moduleName;
00287         m_moduleCombo.SetWindowText(m_moduleName);
00288     }
00289 }
00290
00292 void CCheckout_MAIN::OnForceroot()
00293 {
00294     const BOOL enable = m_forceRootCheck.GetCheck();
00295
00296     m_selCvsrootButton.EnableWindow(enable);
00297     m_cvsrootCombo.EnableWindow(enable);
00298 }
00299
00301 void CCheckout_MAIN::OnSelcvsroot()
00302 {
00303     CString strCvsroot;
00304     m_cvsrootCombo.GetWindowText(strCvsroot);
00305
00306     CStr cvsroot(strCvsroot);
00307     if( CompatGetCvsRoot(cvsroot) )
00308     {
00309         m_cvsrootCombo.SetWindowText(cvsroot.c_str());
00310     }
00311 }
00312
00313 #endif /* WIN32 */
00314
00315 #ifdef qMacCvsPP
00316 static void DoDataExchange_CheckoutMain(LWindow *theDialog, const MultiFiles* mf, CStr & modname,
00317     bool & norecurs, bool & toStdout, bool & overrideCheckoutDir, CStr & checkoutDir, bool putValue)
00318 {
00319     LEditText *mname = dynamic_cast<LEditText*>
00320         (theDialog->FindPaneByID(item_ModuleName));
00321     LPopupFiller *filler = dynamic_cast<LPopupFiller*>
00322         (theDialog->FindPaneByID(item_PopModName));
00323
00324     LModuleWrapper *wrapper = putValue ? NEW LModuleWrapper(filler, mf) : 0L;
00325     filler->DoDataExchange(gOldModules, putValue, wrapper);
00326
00327     DoDataExchange (theDialog, item_NoRecurs, norecurs, putValue);
00328     DoDataExchange (theDialog, item_ToStout, toStdout, putValue);
00329     DoDataExchange (theDialog, item_CheckGroupPath, overrideCheckoutDir, putValue);
00330     DoDataExchange (theDialog, item_ShowPath, checkoutDir, putValue);
00331
00332     if(putValue)
00333     {
00334         mname->SetText((Ptr)(const char *)modname, modname.length());
00335         theDialog->SetLatentSub(mname);
00336
00337         // this will take care about an empty module name
00338         mname->AddListener(GetDlgHandler());
00339         if(modname.length() == 0)
00340         {
00341             LPushButton *theOK = dynamic_cast<LPushButton*>
00342                                         (theDialog->FindPaneByID(item_OK));
00343             Assert_(theOK != 0L);
00344             theOK->Disable();
00345         }
00346     }
00347     else
00348     {
00349         char buf[512];
00350         Size len;
00351         mname->GetText(buf, 511, &len);
00352         modname.set(buf, len);
00353     }
00354 }
00355
00356 static void
00357 DoDataExchange_CheckoutOptions(
00358     LView *theDialog,
00359     const MultiFiles* mf,
00360     bool & hasDate,
00361     bool & hasRev,
00362     CStr & sLastDate,
00363     CStr & sLastRev,
00364     bool & useMostRecent,
00365     bool & doexport,
00366     bool & forceCvsroot,
00367     bool putValue)
00368
00369 {
00370     LPopupFiller *fillTag = dynamic_cast<LPopupFiller*>
00371         (theDialog->FindPaneByID(item_FillerTag));
00372     LPopupFiller *fillDate = dynamic_cast<LPopupFiller*>
00373         (theDialog->FindPaneByID(item_FillerDate));
00374
00375     LTagWrapper *wrapper = putValue ? NEW LTagWrapper(fillTag, mf) : 0L;
00376     fillTag->DoDataExchange(gRevNames, putValue, wrapper);
00377     fillDate->DoDataExchange(gDateNames, putValue);
00378
00379     DoDataExchange (theDialog, item_CheckDate, hasDate, putValue);
00380     DoDataExchange (theDialog, item_CheckRevTag, hasRev, putValue);
00381     DoDataExchange (theDialog, item_EditDate, sLastDate, putValue);
00382     DoDataExchange (theDialog, item_EditRevTag, sLastRev, putValue);
00383     DoDataExchange (theDialog, item_MostRecentRev, useMostRecent, putValue);
00384     DoDataExchange (theDialog, item_CheckForceRoot, forceCvsroot, putValue);
00385     DoDataExchange (theDialog, item_CheckExport, doexport, putValue);
00386
00387 }
00388 #endif /* qMacCvsPP */
00389
00390 #if qUnix
00391 class UCvsCheckout : public UWidget
00392 {
00393     UDECLARE_DYNAMIC(UCvsCheckout)
00394 public:
00395     UCvsCheckout() : UWidget(::UEventGetWidID()) {}
00396     virtual ~UCvsCheckout() {}
00397
00398     enum
00399     {
00400         kOK = EV_COMMAND_START, // 0
00401         kCancel,                // 1
00402         kTabGeneral             // 2
00403     };
00404
00405     virtual void DoDataExchange(bool fill);
00406
00407 protected:
00408     ev_msg int OnOK(void);
00409     ev_msg int OnCancel(void);
00410
00411     UDECLARE_MESSAGE_MAP()
00412 };
00413
00414 UIMPLEMENT_DYNAMIC(UCvsCheckout, UWidget)
00415
00416 UBEGIN_MESSAGE_MAP(UCvsCheckout, UWidget)
00417     ON_UCOMMAND(UCvsCheckout::kOK, UCvsCheckout::OnOK)
00418     ON_UCOMMAND(UCvsCheckout::kCancel, UCvsCheckout::OnCancel)
00419 UEND_MESSAGE_MAP()
00420
00421 int UCvsCheckout::OnOK(void)
00422 {
00423     EndModal(true);
00424     return 0;
00425 }
00426
00427 int UCvsCheckout::OnCancel(void)
00428 {
00429     EndModal(false);
00430     return 0;
00431 }
00432
00433 void UCvsCheckout::DoDataExchange(bool fill)
00434 {
00435     if(fill)
00436     {
00437     }
00438     else
00439     {
00440     }
00441 }
00442
00443 class UCvsCheckout_MAIN : public UWidget
00444 {
00445     UDECLARE_DYNAMIC(UCvsCheckout_MAIN)
00446 public:
00447     UCvsCheckout_MAIN(const char * modname, const char * path);
00448     virtual ~UCvsCheckout_MAIN() {}
00449
00450     enum
00451     {
00452         kComboPath = EV_COMMAND_START,  // 0
00453         kStaticPath,            // 1
00454         kBtnPath,               // 2
00455         kCheckStdout,           // 3
00456         kCheckRecurse           // 4
00457     };
00458
00459     virtual void DoDataExchange(bool fill);
00460
00461     UStr m_path;
00462     UStr m_modname;
00463     bool m_norecurs;
00464     bool m_stdout;
00465
00466 protected:
00467     ev_msg int OnPath(void);
00468
00469     UDECLARE_MESSAGE_MAP()
00470 };
00471
00472 UIMPLEMENT_DYNAMIC(UCvsCheckout_MAIN, UWidget)
00473
00474 UBEGIN_MESSAGE_MAP(UCvsCheckout_MAIN, UWidget)
00475     ON_UCOMMAND(UCvsCheckout_MAIN::kBtnPath, UCvsCheckout_MAIN::OnPath)
00476 UEND_MESSAGE_MAP()
00477
00478 UCvsCheckout_MAIN::UCvsCheckout_MAIN(const char * modname, const char * path) : UWidget(::UEventGetWidID())
00479 {
00480     m_path = path;
00481     m_modname = modname;
00482     m_norecurs = false;
00483     m_stdout = false;
00484 }
00485
00486 int UCvsCheckout_MAIN::OnPath(void)
00487 {
00488     CStr dir;
00489     if( BrowserGetDirectory("Select a directory to checkout to", dir) )
00490     {
00491         UEventSendMessage(GetWidID(), EV_SETTEXT, kStaticPath, (void*)dir.c_str());
00492     }
00493
00494     return 0;
00495 }
00496
00497 void UCvsCheckout_MAIN::DoDataExchange(bool fill)
00498 {
00499     ::DoDataExchange(fill, GetWidID(), kComboPath, gOldModules);
00500
00501     if(fill)
00502     {
00503         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckStdout, m_stdout), 0L);
00504         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRecurse, m_norecurs), 0L);
00505
00506         UEventSendMessage(GetWidID(), EV_SETTEXT, kComboPath, (void *)(const char *)m_modname);
00507         UEventSendMessage(GetWidID(), EV_SETTEXT, kStaticPath, (void *)(const char *)m_path);
00508     }
00509     else
00510     {
00511         m_stdout = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckStdout, 0L) != 0;
00512         m_norecurs = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRecurse, 0L) != 0;
00513
00514         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboPath, &m_modname);
00515         UEventSendMessage(GetWidID(), EV_GETTEXT, kStaticPath, &m_path);
00516     }
00517 }
00518
00519 class UCvsCheckout_STICKY : public UWidget
00520 {
00521     UDECLARE_DYNAMIC(UCvsCheckout_STICKY)
00522 public:
00523     UCvsCheckout_STICKY(const char *rev, const char *date);
00524     virtual ~UCvsCheckout_STICKY() {}
00525
00526     enum
00527     {
00528         kCheckDate = EV_COMMAND_START,  // 0
00529         kComboDate,         // 1
00530         kCheckRev,          // 2
00531         kComboRev,          // 3
00532         kCheckMatch         // 4
00533     };
00534
00535     virtual void DoDataExchange(bool fill);
00536
00537     UStr m_date;
00538     UStr m_rev;
00539     bool m_hasdate;
00540     bool m_hasrev;
00541     bool m_match;
00542 protected:
00543
00544     ev_msg int OnDate(void);
00545     ev_msg int OnRev(void);
00546
00547     UDECLARE_MESSAGE_MAP()
00548 };
00549
00550 UIMPLEMENT_DYNAMIC(UCvsCheckout_STICKY, UWidget)
00551
00552 UBEGIN_MESSAGE_MAP(UCvsCheckout_STICKY, UWidget)
00553     ON_UCOMMAND(UCvsCheckout_STICKY::kCheckDate, UCvsCheckout_STICKY::OnDate)
00554     ON_UCOMMAND(UCvsCheckout_STICKY::kCheckRev, UCvsCheckout_STICKY::OnRev)
00555 UEND_MESSAGE_MAP()
00556
00557 UCvsCheckout_STICKY::UCvsCheckout_STICKY(const char *rev, const char *date) : UWidget(::UEventGetWidID())
00558 {
00559     m_date = date;
00560     m_rev = rev;
00561     m_hasdate = false;
00562     m_hasrev = false;
00563     m_match = false;
00564 }
00565
00566 int UCvsCheckout_STICKY::OnDate()
00567 {
00568     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate, 0L);
00569     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboDate, state), 0L);
00570     return 0;
00571 }
00572
00573 int UCvsCheckout_STICKY::OnRev()
00574 {
00575     int state = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRev, 0L);
00576     UEventSendMessage(GetWidID(), EV_ENABLECMD, UMAKEINT(kComboRev, state), 0L);
00577     return 0;
00578 }
00579
00580 void UCvsCheckout_STICKY::DoDataExchange(bool fill)
00581 {
00582     ::DoDataExchange(fill, GetWidID(), kComboRev, gRevNames);
00583     ::DoDataExchange(fill, GetWidID(), kComboDate, gDateNames);
00584
00585     if(fill)
00586     {
00587         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckDate, m_hasdate), 0L);
00588         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckRev, m_hasrev), 0L);
00589         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckMatch, m_match), 0L);
00590
00591         OnDate();
00592         OnRev();
00593     }
00594     else
00595     {
00596         m_hasdate = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckDate, 0L);
00597         m_hasrev = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckRev, 0L);
00598         m_match = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckMatch, 0L);
00599
00600         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboDate, &m_date);
00601         UEventSendMessage(GetWidID(), EV_GETTEXT, kComboRev, &m_rev);
00602     }
00603 }
00604
00605 class UCvsCheckout_OPTIONS : public UWidget
00606 {
00607     UDECLARE_DYNAMIC(UCvsCheckout_OPTIONS)
00608 public:
00609     UCvsCheckout_OPTIONS();
00610     virtual ~UCvsCheckout_OPTIONS() {}
00611
00612     enum
00613     {
00614         kCheckForce = EV_COMMAND_START, // 0
00615         kCheckExport        // 1
00616     };
00617
00618     virtual void DoDataExchange(bool fill);
00619
00620     bool m_export;
00621     bool m_forceroot;
00622 protected:
00623
00624     UDECLARE_MESSAGE_MAP()
00625 };
00626
00627 UIMPLEMENT_DYNAMIC(UCvsCheckout_OPTIONS, UWidget)
00628
00629 UBEGIN_MESSAGE_MAP(UCvsCheckout_OPTIONS, UWidget)
00630 UEND_MESSAGE_MAP()
00631
00632 UCvsCheckout_OPTIONS::UCvsCheckout_OPTIONS() : UWidget(::UEventGetWidID())
00633 {
00634     m_export = false;
00635     m_forceroot = false;
00636 }
00637
00638 void UCvsCheckout_OPTIONS::DoDataExchange(bool fill)
00639 {
00640     if(fill)
00641     {
00642         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckForce, m_forceroot), 0L);
00643         UEventSendMessage(GetWidID(), EV_SETSTATE, UMAKEINT(kCheckExport, m_export), 0L);
00644     }
00645     else
00646     {
00647         m_forceroot = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckForce, 0L);
00648         m_export = UEventSendMessage(GetWidID(), EV_QUERYSTATE, kCheckExport, 0L);
00649     }
00650 }
00651 #endif // qUnix
00652
00654 bool CompatGetCheckout(const MultiFiles* mf,
00655                        CStr& modname, CStr& path, bool& norecurs,
00656                        bool& toStdout, CStr& date, CStr& rev,
00657                        bool& useMostRecent,
00658                        CStr& rev1, CStr& rev2,
00659                        bool& branchPointMerge,
00660                        bool& threeWayConflicts,
00661                        bool& doexport,
00662                        bool& forceCvsroot, CStr& cvsroot,
00663                        bool& overrideCheckoutDir, CStr& checkoutDir,
00664                        CStr& keyword,
00665                        bool& resetSticky,
00666                        bool& dontShortenPaths,
00667                        bool& caseSensitiveNames,
00668                        bool& lastCheckinTime)
00669 {
00670     bool userHitOK = false;
00671
00672     date = "";
00673     rev = "";
00674     rev1 = "";
00675     rev2 = "";
00676     branchPointMerge = false;
00677     threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00678     modname = "";
00679     norecurs = false;
00680     toStdout = false;
00681     useMostRecent = false;
00682     doexport = false;
00683     forceCvsroot = false;
00684     overrideCheckoutDir = false;
00685     caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00686     lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00687
00688     static CStr sLastModName;
00689     static CStr sLastRev;
00690     static CStr sLastDate;
00691     static CStr sLastRev1;
00692     static CStr sLastRev2;
00693     static CStr sLastDate1;
00694     static CStr sLastDate2;
00695     static bool lastDontShortenPaths = false;
00696     static bool lastForceCvsroot = true;
00697     static CStr sLastCvsroot("");
00698
00699     bool hasDate = false;
00700     bool hasRev = false;
00701     bool merge1 = false;
00702     bool merge2 = false;
00703     bool hasDate1 = false;
00704     bool hasDate2 = false;
00705
00706     keyword = "";
00707     resetSticky = false;
00708     dontShortenPaths = lastDontShortenPaths;
00709
00710     FindBestLastCvsroot(path.c_str(), sLastCvsroot);
00711     FindBestLastModuleName(path.c_str(), sLastModName);
00712
00713     if( !path.empty() )
00714     {
00715         while( IsCvsDirectory(path) )
00716         {
00717             CStr uppath, folder;
00718             if( !SplitPath(path, uppath, folder) || uppath.empty() )
00719             {
00720                 break;
00721             }
00722
00723             path = uppath;
00724         }
00725     }
00726
00727 #ifdef WIN32
00728     CHHelpPropertySheet pages(_i18n("Checkout settings"));
00729     pages.m_psh.dwFlags |= PSH_NOAPPLYNOW;
00730
00731     CCheckout_MAIN page1(mf, sLastModName, path, dontShortenPaths, lastForceCvsroot, sLastCvsroot);
00732     CUpdateOptions page2(mf, sLastRev, sLastDate, keyword, resetSticky, caseSensitiveNames, lastCheckinTime);
00733     CUpdateMerge page3(mf, true, sLastRev1, sLastRev2, sLastDate1, sLastDate2, threeWayConflicts);
00734     CGetPrefs_GLOBALS page4;
00735
00736     pages.AddPage(&page1);
00737     pages.AddPage(&page2);
00738     pages.AddPage(&page3);
00739     pages.AddPage(&page4);
00740
00741     if( pages.DoModal() == IDOK )
00742     {
00743         sLastModName = (const char*)page1.m_moduleName;
00744         path = (const char*)page1.m_path;
00745         norecurs = page1.m_noRecurse == TRUE;
00746         overrideCheckoutDir = page1.m_overrideCoDir == TRUE;
00747         checkoutDir = (const char*)page1.m_checkoutDir;
00748         lastDontShortenPaths = page1.m_dontShortenPaths == TRUE;
00749         lastForceCvsroot = page1.m_forceRoot == TRUE;
00750         sLastCvsroot = page1.m_cvsroot;
00751         doexport = page1.m_export == TRUE;
00752
00753         sLastDate = page2.m_date;
00754         sLastRev = page2.m_rev;
00755         hasDate = page2.m_hasDate == TRUE;
00756         hasRev = page2.m_hasRev == TRUE;
00757         useMostRecent = page2.m_match == TRUE;
00758         keyword = page2.m_keyword;
00759         resetSticky = page2.m_resetSticky == TRUE;
00760         toStdout = page2.m_stdout == TRUE;
00761         gCvsPrefs.SetUpdateCaseSensitiveNames(page2.m_caseSensitiveNames == TRUE);
00762         gCvsPrefs.SetUpdateLastCheckinTime(page2.m_lastCheckinTime == TRUE);
00763
00764         merge1 = page3.m_mergeType >= 1;
00765         merge2 = page3.m_mergeType == 2;
00766         sLastRev1 = page3.m_rev1;
00767         sLastRev2 = page3.m_rev2;
00768         hasDate1 = page3.m_hasDate1 == TRUE;
00769         hasDate2 = page3.m_hasDate2 == TRUE;
00770         sLastDate1 = page3.m_date1;
00771         sLastDate2 = page3.m_date2;
00772         branchPointMerge = page3.m_branchPointMerge == TRUE;
00773         gCvsPrefs.SetUpdateThreeWayConflicts(page3.m_threeWayConflicts == TRUE);
00774
00775         page4.StoreValues();
00776         userHitOK = true;
00777     }
00778 #endif /* WIN32 */
00779 #ifdef qMacCvsPP
00780     StDialogHandler theHandler(dlg_Checkout, LCommander::GetTopCommander());
00781     LWindow *theDialog = theHandler.GetDialog();
00782     ThrowIfNil_(theDialog);
00783     static UInt16 sRuntimePanel = 1;
00784
00785     LMultiPanelView *multiView = dynamic_cast<LMultiPanelView*>
00786         (theDialog->FindPaneByID(item_MultiViewPrefs));
00787     LPane *groupView = theDialog->FindPaneByID(item_GroupViewPrefs);
00788
00789     multiView->SwitchToPanel(3);
00790     DoDataExchange_Globals(theDialog, true);
00791     multiView->SwitchToPanel(2);
00792     DoDataExchange_CheckoutOptions(theDialog, mf, hasDate, hasRev,
00793         sLastDate, sLastRev, useMostRecent, doexport, forceCvsroot, true);
00794     multiView->SwitchToPanel(1);
00795     DoDataExchange_CheckoutMain(theDialog, mf, sLastModName, norecurs, toStdout, overrideCheckoutDir, checkoutDir, true);
00796     dynamic_cast<LBroadcaster*> (theDialog->FindPaneByID (item_EditPath))->AddListener (&theHandler);
00797     dynamic_cast<LBroadcaster*> (theDialog->FindPaneByID (item_CheckGroupPath))->AddListener (&theHandler);
00798
00799
00800     groupView->SetValue(sRuntimePanel);
00801     theDialog->Show();
00802     MessageT hitMessage;
00803     while (true)
00804     {       // Let DialogHandler process events
00805         hitMessage = theHandler.DoDialog();
00806
00807         if (hitMessage == msg_OK || hitMessage == msg_Cancel)
00808             break;
00809
00810         if(hitMessage == item_CheckGroupPath || hitMessage == item_EditPath)
00811         {
00812             if(theDialog->GetValueForPaneID(item_CheckGroupPath) == Button_Off)
00813             {
00814                 continue;
00815             }
00816
00817             CStr dir;
00818             if( BrowserGetDirectory("Select a directory to checkout to", dir) )
00819             {
00820                 CPStr tmp(dir.c_str());
00821                 theDialog->SetDescriptorForPaneID(item_ShowPath, tmp);
00822             }
00823             else if(hitMessage == item_CheckGroupPath)
00824             {
00825                 theDialog->SetValueForPaneID(item_CheckGroupPath, Button_Off);
00826             }
00827         }
00828     }
00829     theDialog->Hide();
00830     sRuntimePanel = groupView->GetValue();
00831
00832     if(hitMessage == msg_OK)
00833     {
00834         multiView->SwitchToPanel(1);
00835         DoDataExchange_CheckoutMain(theDialog, mf, sLastModName, norecurs, toStdout, overrideCheckoutDir, checkoutDir, false);
00836         multiView->SwitchToPanel(2);
00837         DoDataExchange_CheckoutOptions(theDialog, mf, hasDate, hasRev,
00838             sLastDate, sLastRev, useMostRecent, doexport, forceCvsroot, false);
00839         multiView->SwitchToPanel(3);
00840         DoDataExchange_Globals(theDialog, false);
00841
00842         Assert_(sLastModName.length() != 0);
00843
00844         userHitOK = true;
00845     }
00846 #endif /* qMacCvsPP */
00847 #if qUnix
00848     void *wid = UCreate_CheckoutDlg();
00849
00850     UCvsCheckout *dlg = new UCvsCheckout();
00851     UCvsCheckout_MAIN *tab1 = new UCvsCheckout_MAIN(sLastModName, path);
00852     UCvsCheckout_STICKY *tab2 = new UCvsCheckout_STICKY(sLastRev, sLastDate);
00853     UCvsCheckout_OPTIONS *tab3 = new UCvsCheckout_OPTIONS();
00854     UEventSendMessage(dlg->GetWidID(), EV_INIT_WIDGET, kUMainWidget, wid);
00855     dlg->AddPage(tab1, UCvsCheckout::kTabGeneral, 0);
00856     dlg->AddPage(tab2, UCvsCheckout::kTabGeneral, 1);
00857     dlg->AddPage(tab3, UCvsCheckout::kTabGeneral, 2);
00858
00859     if(dlg->DoModal())
00860     {
00861         sLastModName = tab1->m_modname;
00862         path = tab1->m_path;
00863         norecurs = tab1->m_norecurs;
00864         toStdout = tab1->m_stdout;
00865
00866         sLastDate = tab2->m_date;
00867         sLastRev = tab2->m_rev;
00868         hasDate = tab2->m_hasdate;
00869         hasRev = tab2->m_hasrev;
00870         useMostRecent = tab2->m_match;
00871
00872         doexport = tab3->m_export;
00873         forceCvsroot = tab3->m_forceroot;
00874
00875         userHitOK = true;
00876     }
00877
00878     delete dlg;
00879 #endif // qUnix
00880
00881     if( userHitOK )
00882     {
00883         threeWayConflicts = gCvsPrefs.UpdateThreeWayConflicts();
00884         caseSensitiveNames = gCvsPrefs.UpdateCaseSensitiveNames();
00885         lastCheckinTime = gCvsPrefs.UpdateLastCheckinTime();
00886
00887         if( hasDate && !sLastDate.empty() )
00888             date = sLastDate;
00889
00890         if( hasRev && !sLastRev.empty() )
00891             rev = sLastRev;
00892
00893         modname = sLastModName;
00894
00895         dontShortenPaths = lastDontShortenPaths;
00896
00897         if( merge1 && merge2 && !sLastRev1.empty() && !sLastRev2.empty() )
00898         {
00899             rev1 = sLastRev1;
00900             rev2 = sLastRev2;
00901
00902             if( hasDate1 )
00903                 rev1 << ":" << sLastDate1;
00904
00905             if( hasDate2 )
00906                 rev2 << ":" << sLastDate2;
00907         }
00908
00909         if( merge1 && !merge2 && !sLastRev1.empty() )
00910         {
00911             rev1 = sLastRev1;
00912
00913             if( hasDate1 )
00914                 rev1 << ":" << sLastDate1;
00915         }
00916
00917         forceCvsroot = lastForceCvsroot;
00918         cvsroot = sLastCvsroot;
00919
00920         if( forceCvsroot )
00921         {
00922             if( mf )
00923             {
00924                 // Add selection rather than actual checkout folder
00925                 CStr strSelection;
00926                 mf->getdir(0, strSelection);
00927
00928                 if( !strSelection.empty() )
00929                 {
00930                     InsertLastCvsroot(strSelection, cvsroot);
00931                     InsertLastModuleName(strSelection, modname);
00932                 }
00933             }
00934
00935             if( overrideCheckoutDir && !path.empty() )
00936             {
00937                 // Add override folder if selected
00938                 CStr strPath(path);
00939                 strPath << kPathDelimiter << checkoutDir;
00940
00941                 InsertLastCvsroot(strPath, cvsroot);
00942                 InsertLastModuleName(strPath, modname);
00943             }
00944         }
00945
00946         gCvsPrefs.save();
00947     }
00948
00949     return userHitOK;
00950 }
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/StdAfx.cpp Source File

WinCvs/StdAfx.cpp

Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 //  wincvs.pch will be the pre-compiled header
00003 //  stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoDoubleNumberText Member List

This is the complete list of members for TPseudoDoubleNumberText, including all inherited members.

fMaximum | TPseudoDoubleNumberText | [protected]
fMinimum | TPseudoDoubleNumberText | [protected]
fPrecision | TPseudoDoubleNumberText | [protected]
GetStandardSignature() const | TPseudoDoubleNumberText | [virtual]
GetValidationError() | TPseudoDoubleNumberText | [virtual]
GetValue() | TPseudoDoubleNumberText | [virtual]
kDefaultPrecision enum value | TPseudoDoubleNumberText |
kStdDoubleNumberText enum value | TPseudoDoubleNumberText |
MA_DECLARE_CLASS | TPseudoDoubleNumberText | [private]
ReadFields(CStream_AC *aStream) | TPseudoDoubleNumberText | [virtual]
SetValue(double newValue, bool redraw) | TPseudoDoubleNumberText | [virtual]
TPseudoDoubleNumberText() | TPseudoDoubleNumberText |
WriteFields(CStream_AC *aStream) const | TPseudoDoubleNumberText | [virtual]
~TPseudoDoubleNumberText() | TPseudoDoubleNumberText | [virtual]

Generated on Sat Aug 7 22:57:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ColorTableEntry Member List

This is the complete list of members for ColorTableEntry, including all inherited members.

crColor | ColorTableEntry
szName | ColorTableEntry

Generated on Sat Aug 7 22:55:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MoveToTrash.h Source File

common/MoveToTrash.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * MoveToTrash.h --- send the files to the trash
00019  * Author : Miro Jurisic <meeroh@MIT.EDU> --- December 1997
00020  * Modified : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00021  */
00022
00023 #ifndef MOVETOTRASH_H
00024 #define MOVETOTRASH_H
00025
00026 #include "TextBinary.h"
00027
00028 bool CompatMoveToTrash(const char *file, const char *dir = 0L, const UFSSpec *spec = 0L);
00029     // return false if failed
00030
00031 void CompatBeginMoveToTrash(void);
00032 void CompatEndMoveToTrash(void);
00033
00034 #endif /* MOVETOTRASH_H */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/WinCvsDebug.cpp Source File

WinCvs/WinCvsDebug.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jonathan M. Gilligan <jonathan.gilligan@vanderbilt.edu> --- July 2001
00019  */
00020
00021 /*
00022  * WinCvsDebug.cpp --- Miscellaneous debugging stuff.
00023  */
00024
00025 #include "stdafx.h"
00026 #include "WinCvsDebug.h"
00027
00028 #if ENABLE_WINCVSDEBUG
00029
00030 namespace
00031 {
00032     unsigned long wincvs_debug_mask = 0L;
00033 }
00034
00035 unsigned long GetWinCvsDebugMask(bool clear_mask)
00036 {
00037     unsigned long retval = wincvs_debug_mask;
00038     if ( clear_mask && (wincvs_debug_mask & wcvsdbg_one_shot) )
00039         wincvs_debug_mask = wcvsdbg_one_shot;
00040     return retval;
00041 }
00042
00043 void SetWinCvsDebugMask(unsigned long umask)
00044 {
00045     wincvs_debug_mask = umask;
00046 }
00047
00048 void AppendWinCvsDebugMask(unsigned long umask)
00049 {
00050     wincvs_debug_mask = wincvs_debug_mask | umask;
00051 }
00052
00053 void SetWinCvsDebugMaskBit(unsigned char bit, bool val)
00054 {
00055     if (bit > sizeof(wincvs_debug_mask) * 8)
00056     {
00057         return;
00058     }
00059     if (val)
00060     {
00061         wincvs_debug_mask = wincvs_debug_mask | 1 << bit;
00062     }
00063     else
00064     {
00065         wincvs_debug_mask = wincvs_debug_mask & ~(1 << bit);
00066     }
00067 }
00068
00069 bool GetWinCvsDebugMaskBit(unsigned char bit, bool clear_mask)
00070 {
00071     bool retval = (wincvs_debug_mask & (1 << bit)) != 0;
00072     if ( clear_mask && (wincvs_debug_mask & wcvsdbg_one_shot) && (bit != wcvsdbg_one_shot_bit) )
00073     {
00074         wincvs_debug_mask = wincvs_debug_mask & ~(1 << bit);
00075     }
00076     return retval;
00077 }
00078
00079 #endif  // ENABLE_WINCVSDEBUG
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMacBinTable Member List

This is the complete list of members for CMacBinTable, including all inherited members.

class_ID enum value | CMacBinTable |
CMacBinTable(LStream *inStream) | CMacBinTable |
CMacBinTable() | CMacBinTable | [private]
CMacBinTable(const CMacBinTable &inOriginal) | CMacBinTable | [private]
FinishCreateSelf() | CMacBinTable | [protected, virtual]
gCurMacBinMap | CMacBinTable | [protected, static]
GetCurrentMap(void) | CMacBinTable | [inline, static]
operator=(const CMacBinTable &inOriginal) | CMacBinTable | [private]
SetCurrentMap(MacBinMaps *map) | CMacBinTable | [inline, static]
~CMacBinTable() | CMacBinTable | [virtual]

Generated on Sat Aug 7 22:54:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJDateTimeCtrl.cpp Source File

WinCvs/CJLib/CJLibrary/CJDateTimeCtrl.cpp

Go to the documentation of this file.
00001 // CJDateTimeCtrl.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new
00007 // IE4 controls' http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 2002/06/15 17:49:37 $
00013  * $Revision: 1.2 $
00014  * $Archive: /CodeJockey/CJLibrary/CJDateTimeCtrl.cpp $
00015  *
00016  * $History: CJDateTimeCtrl.cpp $
00017  *
00018  * *****************  Version 4  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/CJLibrary
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 3  *****************
00024  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00025  * Updated in $/CodeJockey/CJLibrary
00026  * Added Unicode compliance, thanks to Barry Burton for his help with
00027  * this.
00028  *
00029  *
00030  * *****************  Version 2  *****************
00031  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00032  * Updated in $/CodeJockey/CJLibrary
00033  *
00034  * *****************  Version 1  *****************
00035  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00036  * Created in $/CodeJockey/CJLibrary
00037  * Copied from MFC, Visual C++ 6 and vc5 Tech. Preview. Added to extend
00038  * functionality to Visual C++ 5 users.
00039  *
00040  ***************************************************************************/
00042
00043 #include "stdafx.h"
00044 #include "CJDateTimeCtrl.h"
00045 #include <math.h>
00046
00047 #ifdef _DEBUG
00048 #define new DEBUG_NEW
00049 #undef THIS_FILE
00050 static char THIS_FILE[] = __FILE__;
00051 #endif
00052
00054 // Helper functions
00055
00056 static BOOL GetAsSystemTime(const CTime& tm, SYSTEMTIME& timeDest)
00057 {
00058     struct tm* ptm = tm.GetLocalTm(NULL);
00059     if (ptm == NULL)
00060         return FALSE;
00061
00062     timeDest.wYear = (WORD) (1900 + ptm->tm_year);
00063     timeDest.wMonth = (WORD) (1 + ptm->tm_mon);
00064     timeDest.wDay = (WORD) ptm->tm_mday;
00065     timeDest.wHour = (WORD) ptm->tm_hour;
00066     timeDest.wMinute = (WORD) ptm->tm_min;
00067     timeDest.wSecond = (WORD) ptm->tm_sec;
00068     timeDest.wMilliseconds = 0;
00069
00070     return TRUE;
00071 }
00072
00073 static BOOL GetAsSystemTime(const CTime* ptm, SYSTEMTIME& timeDest)
00074 {
00075     return GetAsSystemTime(*ptm, timeDest);
00076 }
00077
00078 // Verifies will fail if the needed buffer size is too large
00079 #define MAX_TIME_BUFFER_SIZE    128         // matches that in timecore.cpp
00080 #define MIN_DATE                (-657434L)  // about year 100
00081 #define MAX_DATE                2958465L    // about year 9999
00082
00083 // Half a second, expressed in days
00084 #define HALF_SECOND  (1.0/172800.0)
00085
00086 // One-based array of days in year at month start
00087 static int nMonthDays[13] =
00088 {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365};
00089
00090 static BOOL TmFromOleDate(DATE dtSrc, struct tm& tmDest)
00091 {
00092     // The legal range does not actually span year 0 to 9999.
00093     if (dtSrc > MAX_DATE || dtSrc < MIN_DATE) // about year 100 to about 9999
00094         return FALSE;
00095
00096     long nDays;             // Number of days since Dec. 30, 1899
00097     long nDaysAbsolute;     // Number of days since 1/1/0
00098     long nSecsInDay;        // Time in seconds since midnight
00099     long nMinutesInDay;     // Minutes in day
00100
00101     long n400Years;         // Number of 400 year increments since 1/1/0
00102     long n400Century;       // Century within 400 year block (0,1,2 or 3)
00103     long n4Years;           // Number of 4 year increments since 1/1/0
00104     long n4Day;             // Day within 4 year block
00105     //  (0 is 1/1/yr1, 1460 is 12/31/yr4)
00106     long n4Yr;              // Year within 4 year block (0,1,2 or 3)
00107     BOOL bLeap4 = TRUE;     // TRUE if 4 year block includes leap year
00108
00109     double dblDate = dtSrc; // tempory serial date
00110
00111     // If a valid date, then this conversion should not overflow
00112     nDays = (long)dblDate;
00113
00114     // Round to the second
00115     dblDate += ((dtSrc > 0.0) ? HALF_SECOND : -HALF_SECOND);
00116
00117     nDaysAbsolute = (long)dblDate + 693959L; // Add days from 1/1/0 to 12/30/1899
00118
00119     dblDate = fabs(dblDate);
00120     nSecsInDay = (long)((dblDate - floor(dblDate)) * 86400.);
00121
00122     // Calculate the day of week (sun=1, mon=2...)
00123     //   -1 because 1/1/0 is Sat.  +1 because we want 1-based
00124     tmDest.tm_wday = (int)((nDaysAbsolute - 1) % 7L) + 1;
00125
00126     // Leap years every 4 yrs except centuries not multiples of 400.
00127     n400Years = (long)(nDaysAbsolute / 146097L);
00128
00129     // Set nDaysAbsolute to day within 400-year block
00130     nDaysAbsolute %= 146097L;
00131
00132     // -1 because first century has extra day
00133     n400Century = (long)((nDaysAbsolute - 1) / 36524L);
00134
00135     // Non-leap century
00136     if (n400Century != 0)
00137     {
00138         // Set nDaysAbsolute to day within century
00139         nDaysAbsolute = (nDaysAbsolute - 1) % 36524L;
00140
00141         // +1 because 1st 4 year increment has 1460 days
00142         n4Years = (long)((nDaysAbsolute + 1) / 1461L);
00143
00144         if (n4Years != 0)
00145             n4Day = (long)((nDaysAbsolute + 1) % 1461L);
00146         else
00147         {
00148             bLeap4 = FALSE;
00149             n4Day = (long)nDaysAbsolute;
00150         }
00151     }
00152     else
00153     {
00154         // Leap century - not special case!
00155         n4Years = (long)(nDaysAbsolute / 1461L);
00156         n4Day = (long)(nDaysAbsolute % 1461L);
00157     }
00158
00159     if (bLeap4)
00160     {
00161         // -1 because first year has 366 days
00162         n4Yr = (n4Day - 1) / 365;
00163
00164         if (n4Yr != 0)
00165             n4Day = (n4Day - 1) % 365;
00166     }
00167     else
00168     {
00169         n4Yr = n4Day / 365;
00170         n4Day %= 365;
00171     }
00172
00173     // n4Day is now 0-based day of year. Save 1-based day of year, year number
00174     tmDest.tm_yday = (int)n4Day + 1;
00175     tmDest.tm_year = n400Years * 400 + n400Century * 100 + n4Years * 4 + n4Yr;
00176
00177     // Handle leap year: before, on, and after Feb. 29.
00178     if (n4Yr == 0 && bLeap4)
00179     {
00180         // Leap Year
00181         if (n4Day == 59)
00182         {
00183             /* Feb. 29 */
00184             tmDest.tm_mon = 2;
00185             tmDest.tm_mday = 29;
00186             goto DoTime;
00187         }
00188
00189         // Pretend it's not a leap year for month/day comp.
00190         if (n4Day >= 60)
00191             --n4Day;
00192     }
00193
00194     // Make n4DaY a 1-based day of non-leap year and compute
00195     //  month/day for everything but Feb. 29.
00196     ++n4Day;
00197
00198     // Month number always >= n/32, so save some loop time */
00199     for (tmDest.tm_mon = (n4Day >> 5) + 1;
00200     n4Day > nMonthDays[tmDest.tm_mon]; tmDest.tm_mon++);
00201
00202     tmDest.tm_mday = (int)(n4Day - nMonthDays[tmDest.tm_mon-1]);
00203
00204 DoTime:
00205     if (nSecsInDay == 0)
00206         tmDest.tm_hour = tmDest.tm_min = tmDest.tm_sec = 0;
00207     else
00208     {
00209         tmDest.tm_sec = (int)nSecsInDay % 60L;
00210         nMinutesInDay = nSecsInDay / 60L;
00211         tmDest.tm_min = (int)nMinutesInDay % 60;
00212         tmDest.tm_hour = (int)nMinutesInDay / 60;
00213     }
00214
00215     return TRUE;
00216 }
00217
00218 static BOOL GetAsSystemTime(const COleDateTime& dtm, SYSTEMTIME& sysTime)
00219 {
00220     BOOL bRetVal = FALSE;
00221     if (dtm.GetStatus() == COleDateTime::valid)
00222     {
00223         struct tm tmTemp;
00224         if (TmFromOleDate(dtm, tmTemp))
00225         {
00226             sysTime.wYear = (WORD) tmTemp.tm_year;
00227             sysTime.wMonth = (WORD) tmTemp.tm_mon;
00228             sysTime.wDayOfWeek = (WORD) tmTemp.tm_wday;
00229             sysTime.wDay = (WORD) tmTemp.tm_mday;
00230             sysTime.wHour = (WORD) tmTemp.tm_hour;
00231             sysTime.wMinute = (WORD) tmTemp.tm_min;
00232             sysTime.wSecond = (WORD) tmTemp.tm_sec;
00233             sysTime.wMilliseconds = 0;
00234
00235             bRetVal = TRUE;
00236         }
00237     }
00238
00239     return bRetVal;
00240 }
00241
00242 static BOOL GetAsSystemTime(const COleDateTime* pdtm, SYSTEMTIME& sysTime)
00243 {
00244     return GetAsSystemTime(*pdtm, sysTime);
00245 }
00246
00248 // CCJDateTimeCtrl
00249
00250 BOOL CCJDateTimeCtrl::Create(DWORD dwStyle, const RECT& rect,
00251                            CWnd* pParentWnd, UINT nID)
00252 {
00253    // initialize common controls
00254 #ifdef _VC_VERSION_5
00255     INITCOMMONCONTROLSEX icex;
00256     icex.dwSize = sizeof(icex);
00257     icex.dwICC = ICC_DATE_CLASSES;
00258     VERIFY(InitCommonControlsEx(&icex));
00259 #else
00260     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_DATE_REG));
00261 #endif
00262
00263     CWnd* pWnd = this;
00264     return pWnd->Create(DATETIMEPICK_CLASS, NULL, dwStyle, rect, pParentWnd, nID);
00265 }
00266
00267 DWORD CCJDateTimeCtrl::GetRange(CTime* pMinTime, CTime* pMaxTime) const
00268 {
00269     ASSERT(::IsWindow(m_hWnd));
00270     SYSTEMTIME sysTimes[2];
00271     memset(sysTimes, 0, sizeof(sysTimes));
00272
00273     DWORD dwResult = ::SendMessage(m_hWnd, DTM_GETRANGE, 0, (LPARAM) &sysTimes);
00274
00275     if (pMinTime != NULL)
00276     {
00277         if (dwResult & GDTR_MIN)
00278             *pMinTime = CTime(sysTimes[0]);
00279     }
00280
00281     if (pMaxTime != NULL)
00282     {
00283         if (dwResult & GDTR_MAX)
00284             *pMaxTime = CTime(sysTimes[1]);
00285     }
00286
00287     return dwResult;
00288
00289 }
00290
00291 DWORD CCJDateTimeCtrl::GetRange(COleDateTime* pMinTime,
00292     COleDateTime* pMaxTime) const
00293 {
00294     ASSERT(::IsWindow(m_hWnd));
00295
00296     SYSTEMTIME sysTimes[2];
00297     memset(sysTimes, 0, sizeof(sysTimes));
00298
00299     DWORD dwResult = ::SendMessage(m_hWnd, DTM_GETRANGE, 0, (LPARAM) &sysTimes);
00300     if (pMinTime != NULL)
00301     {
00302         if (dwResult & GDTR_MIN)
00303             *pMinTime = COleDateTime(sysTimes[0]);
00304         else
00305             pMinTime->SetStatus(COleDateTime::null);
00306     }
00307
00308     if (pMaxTime != NULL)
00309     {
00310         if (dwResult & GDTR_MAX)
00311             *pMaxTime = COleDateTime(sysTimes[1]);
00312         else
00313             pMaxTime->SetStatus(COleDateTime::null);
00314     }
00315
00316     return dwResult;
00317 }
00318
00319 BOOL CCJDateTimeCtrl::SetRange(const CTime* pMinTime, const CTime* pMaxTime)
00320 {
00321     ASSERT(::IsWindow(m_hWnd));
00322
00323     SYSTEMTIME sysTimes[2];
00324
00325     WPARAM wFlags = 0;
00326     if (pMinTime != NULL && GetAsSystemTime(pMinTime, sysTimes[0]))
00327         wFlags |= GDTR_MIN;
00328
00329     if (pMaxTime != NULL && GetAsSystemTime(pMaxTime, sysTimes[1]))
00330         wFlags |= GDTR_MAX;
00331
00332     return (BOOL) ::SendMessage(m_hWnd, DTM_SETRANGE, wFlags, (LPARAM) &sysTimes);
00333 }
00334
00335 BOOL CCJDateTimeCtrl::SetRange(const COleDateTime* pMinTime, const COleDateTime* pMaxTime)
00336 {
00337     ASSERT(::IsWindow(m_hWnd));
00338     ASSERT(pMinTime == NULL || pMinTime->GetStatus() != COleDateTime::invalid);
00339     ASSERT(pMaxTime == NULL || pMaxTime->GetStatus() != COleDateTime::invalid);
00340
00341     SYSTEMTIME sysTime[2];
00342
00343     WPARAM wFlags = 0;
00344     if (pMinTime != NULL && pMinTime->GetStatus() != COleDateTime::null)
00345     {
00346         if (GetAsSystemTime(pMinTime, sysTime[0]))
00347             wFlags |= GDTR_MIN;
00348     }
00349
00350     if (pMaxTime != NULL && pMaxTime->GetStatus() != COleDateTime::null)
00351     {
00352         if (GetAsSystemTime(pMaxTime, sysTime[1]))
00353             wFlags |= GDTR_MAX;
00354     }
00355
00356     return (BOOL) ::SendMessage(m_hWnd, DTM_SETRANGE, wFlags, (LPARAM) &sysTime);
00357 }
00358
00359 BOOL CCJDateTimeCtrl::SetTime(LPSYSTEMTIME pTimeNew /* = NULL */)
00360 {
00361     ASSERT(::IsWindow(m_hWnd));
00362     WPARAM wParam = (pTimeNew == NULL) ? GDT_NONE : GDT_VALID;
00363     return (BOOL) ::SendMessage(m_hWnd, DTM_SETSYSTEMTIME,
00364         wParam, (LPARAM) pTimeNew);
00365 }
00366
00367 BOOL CCJDateTimeCtrl::SetTime(const COleDateTime& timeNew)
00368 {
00369     BOOL bRetVal = FALSE;
00370
00371     // make sure the time isn't invalid
00372     ASSERT(timeNew.GetStatus() != COleDateTime::invalid);
00373     ASSERT(::IsWindow(m_hWnd));
00374
00375     SYSTEMTIME sysTime;
00376     WPARAM wParam = GDT_NONE;
00377     if (timeNew.GetStatus() == COleDateTime::valid &&
00378         GetAsSystemTime(timeNew, sysTime))
00379     {
00380         wParam = GDT_VALID;
00381     }
00382
00383     bRetVal = (BOOL) ::SendMessage(m_hWnd,
00384             DTM_SETSYSTEMTIME, wParam, (LPARAM) &sysTime);
00385
00386     return bRetVal;
00387 }
00388
00389 BOOL CCJDateTimeCtrl::SetTime(const CTime* pTimeNew)
00390 {
00391     BOOL bRetVal = FALSE;
00392
00393     // make sure the time isn't invalid
00394     ASSERT(::IsWindow(m_hWnd));
00395
00396     SYSTEMTIME sysTime;
00397     WPARAM wParam = GDT_NONE;
00398     if (pTimeNew != NULL && GetAsSystemTime(pTimeNew, sysTime))
00399     {
00400         wParam = GDT_VALID;
00401     }
00402
00403     bRetVal = (BOOL) ::SendMessage(m_hWnd,
00404             DTM_SETSYSTEMTIME, wParam, (LPARAM) &sysTime);
00405
00406     return bRetVal;
00407 }
00408
00409 BOOL CCJDateTimeCtrl::GetTime(COleDateTime& timeDest) const
00410 {
00411     SYSTEMTIME sysTime;
00412     BOOL bRetVal = TRUE;
00413
00414     LRESULT result = ::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM) &sysTime);
00415     if (result == GDT_VALID)
00416     {
00417         timeDest = COleDateTime(sysTime);
00418         bRetVal = TRUE;
00419         ASSERT(timeDest.GetStatus() == COleDateTime::valid);
00420     }
00421     else if (result == GDT_NONE)
00422     {
00423         timeDest.SetStatus(COleDateTime::null);
00424         bRetVal = TRUE;
00425     }
00426     else
00427         timeDest.SetStatus(COleDateTime::invalid);
00428     return bRetVal;
00429 }
00430
00431 DWORD CCJDateTimeCtrl::GetTime(CTime& timeDest) const
00432 {
00433     SYSTEMTIME sysTime;
00434     DWORD dwResult = (DWORD)
00435         ::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM) &sysTime);
00436
00437     if (dwResult == GDT_VALID)
00438         timeDest = CTime(sysTime);
00439
00440     return dwResult;
00441 }
00442
00443 CCJDateTimeCtrl::~CCJDateTimeCtrl()
00444 {
00445     DestroyWindow();
00446 }
00447
00449 // CCJMonthCalCtrl
00450
00451 BOOL CCJMonthCalCtrl::Create(DWORD dwStyle, const RECT& rect,
00452     CWnd* pParentWnd, UINT nID)
00453 {
00454     // initialize common controls
00455 #ifdef _VC_VERSION_5
00456     INITCOMMONCONTROLSEX icex;
00457     icex.dwSize = sizeof(icex);
00458     icex.dwICC = ICC_DATE_CLASSES;
00459     VERIFY(InitCommonControlsEx(&icex));
00460 #else
00461     VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTL_DATE_REG));
00462 #endif
00463
00464     CWnd* pWnd = this;
00465     return pWnd->Create(MONTHCAL_CLASS, NULL, dwStyle, rect, pParentWnd, nID);
00466 }
00467
00468 BOOL CCJMonthCalCtrl::Create(DWORD dwStyle, const POINT& pt,
00469     CWnd* pParentWnd, UINT nID)
00470 {
00471     BOOL bWasVisible = (dwStyle & WS_VISIBLE);
00472     dwStyle &= ~WS_VISIBLE;
00473
00474     CRect rect(pt.x, pt.y, 0, 0);
00475
00476     BOOL bRetVal = FALSE;
00477    if (Create(dwStyle, rect, pParentWnd, nID))
00478     {
00479         if (SizeMinReq())
00480         {
00481             if (bWasVisible)
00482                 ShowWindow(SW_SHOWNA);
00483             bRetVal = TRUE;
00484         }
00485         else
00486             DestroyWindow();
00487     }
00488
00489     return bRetVal;
00490 }
00491
00492 BOOL CCJMonthCalCtrl::SizeMinReq(BOOL bRepaint /* = TRUE */)
00493 {
00494     CRect rect;
00495     BOOL bRetVal = FALSE;
00496     if (GetMinReqRect(rect))
00497     {
00498         DWORD dwFlags = SWP_NOZORDER | SWP_NOREPOSITION | SWP_NOMOVE | SWP_NOACTIVATE;
00499         if (!bRepaint)
00500             dwFlags |= SWP_NOREDRAW;
00501         SetWindowPos(NULL, 0, 0, rect.Width(), rect.Height(), dwFlags);
00502         bRetVal = TRUE;
00503     }
00504
00505     return bRetVal;
00506 }
00507
00508 void CCJMonthCalCtrl::SetToday(const COleDateTime& refTime)
00509 {
00510     ASSERT_VALID(this);
00511
00512     // make sure the time isn't invalid
00513     ASSERT(refTime.GetStatus() != COleDateTime::invalid);
00514     ASSERT(::IsWindow(m_hWnd));
00515
00516     SYSTEMTIME sysTime;
00517     LPSYSTEMTIME pSysTime = NULL;
00518     WPARAM wParam = GDT_NONE;
00519
00520     // if the passed time is null or out of range,
00521     // we'll set the control to NULL
00522
00523     if (GetAsSystemTime(refTime, sysTime))
00524     {
00525         pSysTime = &sysTime;
00526         wParam = GDT_VALID;
00527     }
00528
00529     if (::IsWindow(m_hWnd))
00530         ::SendMessage(m_hWnd, MCM_SETTODAY, wParam, (LPARAM) pSysTime);
00531 }
00532
00533 void CCJMonthCalCtrl::SetToday(const CTime* pDateTime)
00534 {
00535     ASSERT(::IsWindow(m_hWnd));
00536     ASSERT_VALID(this);
00537
00538     // if the passed time is NULL, we'll set the
00539     // control to NULL
00540
00541     WPARAM wParam = GDT_NONE;
00542     LPSYSTEMTIME pSysTime = NULL;
00543     SYSTEMTIME sysTime;
00544
00545     if (pDateTime != NULL && GetAsSystemTime(pDateTime, sysTime))
00546     {
00547         wParam = GDT_VALID;
00548         pSysTime = &sysTime;
00549     }
00550
00551     if (::IsWindow(m_hWnd))
00552         ::SendMessage(m_hWnd, MCM_SETTODAY, wParam, (LPARAM) pSysTime);
00553 }
00554
00555 BOOL CCJMonthCalCtrl::SetCurSel(const COleDateTime& refTime)
00556 {
00557     ASSERT(::IsWindow(m_hWnd));
00558
00559     SYSTEMTIME sysTime;
00560     BOOL bRetVal = FALSE;
00561
00562     // if the passed time is null or out of range,
00563     // we'll set the control to NULL
00564
00565     if (GetAsSystemTime(refTime, sysTime) &&
00566         refTime.GetStatus() == COleDateTime::valid)
00567     {
00568         bRetVal = (BOOL)
00569             ::SendMessage(m_hWnd, MCM_SETCURSEL, 0, (LPARAM) &sysTime);
00570     }
00571
00572     return bRetVal;
00573 }
00574
00575 BOOL CCJMonthCalCtrl::SetCurSel(const CTime& refTime)
00576 {
00577     ASSERT(::IsWindow(m_hWnd));
00578
00579     SYSTEMTIME sysTime;
00580     BOOL bRetVal = FALSE;
00581
00582     if (GetAsSystemTime(refTime, sysTime))
00583     {
00584         bRetVal = (BOOL)
00585             ::SendMessage(m_hWnd, MCM_SETCURSEL, 0, (LPARAM) &sysTime);
00586     }
00587
00588     return bRetVal;
00589 }
00590
00591 BOOL CCJMonthCalCtrl::GetCurSel(COleDateTime& refTime) const
00592 {
00593     ASSERT(::IsWindow(m_hWnd));
00594
00595     // can't use this method on multiple selection controls
00596     ASSERT(!(GetStyle() & MCS_MULTISELECT));
00597
00598     SYSTEMTIME sysTime;
00599     BOOL bResult = (BOOL)
00600         ::SendMessage(m_hWnd, MCM_GETCURSEL, 0, (LPARAM) &sysTime);
00601
00602     if (bResult)
00603         refTime = COleDateTime(sysTime);
00604
00605     return bResult;
00606 }
00607
00608 BOOL CCJMonthCalCtrl::GetToday(COleDateTime& refTime) const
00609 {
00610     ASSERT(::IsWindow(m_hWnd));
00611
00612     // can't use this method on multiple selection controls
00613     ASSERT(!(GetStyle() & MCS_MULTISELECT));
00614
00615     SYSTEMTIME sysTime;
00616     BOOL bResult = (BOOL)
00617         ::SendMessage(m_hWnd, MCM_GETTODAY, 0, (LPARAM) &sysTime);
00618
00619     if (bResult)
00620         refTime = COleDateTime(sysTime);
00621
00622     return bResult;
00623 }
00624
00625 BOOL CCJMonthCalCtrl::GetCurSel(CTime& refTime) const
00626 {
00627     ASSERT(::IsWindow(m_hWnd));
00628
00629     // can't use this method on multiple selection controls
00630     ASSERT(!(GetStyle() & MCS_MULTISELECT));
00631
00632     SYSTEMTIME sysTime;
00633     BOOL bResult = (BOOL)
00634         ::SendMessage(m_hWnd, MCM_GETCURSEL, 0, (LPARAM) &sysTime);
00635
00636     if (bResult)
00637         refTime = CTime(sysTime);
00638
00639     return bResult;
00640 }
00641
00642 BOOL CCJMonthCalCtrl::GetToday(CTime& refTime) const
00643 {
00644     ASSERT(::IsWindow(m_hWnd));
00645
00646     // can't use this method on multiple selection controls
00647     ASSERT(!(GetStyle() & MCS_MULTISELECT));
00648
00649     SYSTEMTIME sysTime;
00650     BOOL bResult = (BOOL)
00651         ::SendMessage(m_hWnd, MCM_GETTODAY, 0, (LPARAM) &sysTime);
00652
00653     if (bResult)
00654         refTime = CTime(sysTime);
00655
00656     return bResult;
00657 }
00658
00659 CCJMonthCalCtrl::~CCJMonthCalCtrl()
00660 {
00661     DestroyWindow();
00662 }
00663
00664 int CCJMonthCalCtrl::GetFirstDayOfWeek(BOOL* pbLocal /* = NULL */) const
00665 {
00666     ASSERT(::IsWindow(m_hWnd));
00667     DWORD dwResult;
00668     dwResult = (DWORD) ::SendMessage(m_hWnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
00669
00670     // set *pbLocal to reflect if the first day of week
00671     // matches current locale setting
00672
00673     if (pbLocal)
00674         *pbLocal = HIWORD(dwResult);
00675     return LOWORD(dwResult);
00676 }
00677
00678 BOOL CCJMonthCalCtrl::SetFirstDayOfWeek(int iDay, int* lpnOld /* = NULL */)
00679 {
00680     ASSERT(::IsWindow(m_hWnd));
00681     DWORD dwResult;
00682     dwResult = (DWORD) ::SendMessage(m_hWnd, MCM_SETFIRSTDAYOFWEEK, 0, (WPARAM) iDay);
00683
00684     if (lpnOld != NULL)
00685         *lpnOld = LOWORD(dwResult);
00686
00687     return (BOOL) HIWORD(dwResult);
00688 }
00689
00690 BOOL CCJMonthCalCtrl::SetDayState(int nMonths, LPMONTHDAYSTATE pStates)
00691 {
00692     ASSERT(::IsWindow(m_hWnd));
00693     ASSERT(AfxIsValidAddress(pStates, nMonths * sizeof(MONTHDAYSTATE), FALSE));
00694     return (BOOL) ::SendMessage(m_hWnd, MCM_SETDAYSTATE, (WPARAM) nMonths, (LPARAM) pStates);
00695 }
00696
00697 BOOL CCJMonthCalCtrl::SetRange(const COleDateTime* pMinRange,
00698     const COleDateTime* pMaxRange)
00699 {
00700     ASSERT(::IsWindow(m_hWnd));
00701     ASSERT(pMinRange == NULL || pMinRange->GetStatus() != COleDateTime::invalid);
00702     ASSERT(pMaxRange == NULL || pMaxRange->GetStatus() != COleDateTime::invalid);
00703
00704     SYSTEMTIME sysTimes[2];
00705     WPARAM wFlags = 0;
00706
00707     if (pMinRange != NULL && pMinRange->GetStatus() != COleDateTime::null)
00708     {
00709         if (GetAsSystemTime(pMinRange, sysTimes[0]))
00710             wFlags |= GDTR_MIN;
00711     }
00712
00713     if (pMaxRange != NULL && pMaxRange->GetStatus() != COleDateTime::null)
00714     {
00715         if (GetAsSystemTime(pMaxRange, sysTimes[1]))
00716             wFlags |= GDTR_MAX;
00717     }
00718
00719     return (BOOL)
00720         ::SendMessage(m_hWnd, MCM_SETRANGE, wFlags, (LPARAM) &sysTimes);
00721 }
00722
00723 BOOL CCJMonthCalCtrl::SetRange(const LPSYSTEMTIME pMinRange,
00724     const LPSYSTEMTIME pMaxRange)
00725 {
00726     ASSERT(::IsWindow(m_hWnd));
00727
00728     SYSTEMTIME sysTimes[2];
00729     WPARAM wFlags = 0;
00730
00731     if (pMinRange != NULL)
00732     {
00733         memcpy(&sysTimes[0], pMinRange, sizeof(SYSTEMTIME));
00734         wFlags |= GDTR_MIN;
00735     }
00736
00737     if (pMaxRange != NULL)
00738     {
00739         memcpy(&sysTimes[1], pMaxRange, sizeof(SYSTEMTIME));
00740         wFlags |= GDTR_MAX;
00741     }
00742
00743     return (BOOL)
00744         ::SendMessage(m_hWnd, MCM_SETRANGE, wFlags, (LPARAM) &sysTimes);
00745 }
00746
00747 DWORD CCJMonthCalCtrl::GetRange(COleDateTime* pMinRange,
00748     COleDateTime* pMaxRange) const
00749 {
00750     ASSERT(::IsWindow(m_hWnd));
00751
00752     SYSTEMTIME sysTimes[2];
00753     memset(sysTimes, 0, sizeof(sysTimes));
00754
00755     DWORD dwRanges = (DWORD)
00756         ::SendMessage(m_hWnd, MCM_GETRANGE, 0, (LPARAM) &sysTimes);
00757
00758     if (dwRanges & GDTR_MIN && pMinRange)
00759         *pMinRange = COleDateTime(sysTimes[0]);
00760
00761     if (dwRanges & GDTR_MAX && pMaxRange)
00762         *pMaxRange = COleDateTime(sysTimes[1]);
00763
00764     return dwRanges;
00765 }
00766
00767 DWORD CCJMonthCalCtrl::GetRange(LPSYSTEMTIME pMinRange,
00768     LPSYSTEMTIME pMaxRange) const
00769 {
00770     ASSERT(::IsWindow(m_hWnd));
00771
00772     SYSTEMTIME sysTimes[2];
00773     memset(sysTimes, 0, sizeof(sysTimes));
00774
00775     DWORD dwRanges = (DWORD)
00776         ::SendMessage(m_hWnd, MCM_GETRANGE, 0, (LPARAM) &sysTimes);
00777
00778     if (dwRanges & GDTR_MIN && pMinRange)
00779         memcpy(pMinRange, &sysTimes[0], sizeof(SYSTEMTIME));
00780
00781     if (dwRanges & GDTR_MAX && pMaxRange)
00782         memcpy(pMaxRange, &sysTimes[1], sizeof(SYSTEMTIME));
00783
00784     return dwRanges;
00785 }
00786
00787 BOOL CCJMonthCalCtrl::SetRange(const CTime* pMinRange, const CTime* pMaxRange)
00788 {
00789     ASSERT(::IsWindow(m_hWnd));
00790
00791     SYSTEMTIME sysTimes[2];
00792     WPARAM wFlags = 0;
00793     if (pMinRange != NULL && GetAsSystemTime(pMinRange, sysTimes[0]))
00794         wFlags |= GDTR_MIN;
00795
00796     if (pMaxRange != NULL && GetAsSystemTime(pMaxRange, sysTimes[1]))
00797         wFlags |= GDTR_MAX;
00798
00799     return (BOOL)
00800         ::SendMessage(m_hWnd, MCM_SETRANGE, wFlags, (LPARAM) &sysTimes);
00801 }
00802
00803 DWORD CCJMonthCalCtrl::GetRange(CTime* pMinRange, CTime* pMaxRange) const
00804 {
00805     ASSERT(::IsWindow(m_hWnd));
00806
00807     SYSTEMTIME sysTimes[2];
00808     memset(sysTimes, 0, sizeof(sysTimes));
00809
00810     DWORD dwRanges = (DWORD)
00811         ::SendMessage(m_hWnd, MCM_GETRANGE, 0, (LPARAM) &sysTimes);
00812
00813     if (dwRanges & GDTR_MIN && pMinRange)
00814         *pMinRange = CTime(sysTimes[0]);
00815
00816     if (dwRanges & GDTR_MAX && pMaxRange)
00817         *pMaxRange = CTime(sysTimes[1]);
00818
00819     return dwRanges;
00820 }
00821
00822 int CCJMonthCalCtrl::GetMonthRange(COleDateTime& refMinRange,
00823     COleDateTime& refMaxRange, DWORD dwFlags) const
00824 {
00825     ASSERT(::IsWindow(m_hWnd));
00826     ASSERT(dwFlags == GMR_DAYSTATE || dwFlags == GMR_VISIBLE);
00827
00828     SYSTEMTIME sysTimes[2];
00829     memset(sysTimes, 0, sizeof(sysTimes));
00830     int nCount = (int) ::SendMessage(m_hWnd, MCM_GETMONTHRANGE,
00831         (WPARAM) dwFlags, (LPARAM) &sysTimes);
00832
00833     refMinRange = COleDateTime(sysTimes[0]);
00834     refMaxRange = COleDateTime(sysTimes[1]);
00835
00836     return nCount;
00837 }
00838
00839 int CCJMonthCalCtrl::GetMonthRange(LPSYSTEMTIME pMinRange,
00840     LPSYSTEMTIME pMaxRange, DWORD dwFlags) const
00841 {
00842     ASSERT(::IsWindow(m_hWnd));
00843     ASSERT_POINTER(pMinRange, SYSTEMTIME);
00844     ASSERT_POINTER(pMaxRange, SYSTEMTIME);
00845
00846     SYSTEMTIME sysTimes[2];
00847
00848     int nCount = (int) ::SendMessage(m_hWnd, MCM_GETMONTHRANGE,
00849         (WPARAM) dwFlags, (LPARAM) &sysTimes);
00850
00851     memcpy(pMinRange, &sysTimes[0], sizeof(SYSTEMTIME));
00852     memcpy(pMaxRange, &sysTimes[1], sizeof(SYSTEMTIME));
00853
00854     return nCount;
00855 }
00856
00857 int CCJMonthCalCtrl::GetMonthRange(CTime& refMinRange, CTime& refMaxRange,
00858     DWORD dwFlags) const
00859 {
00860     ASSERT(::IsWindow(m_hWnd));
00861     ASSERT(dwFlags == GMR_DAYSTATE || dwFlags == GMR_VISIBLE);
00862
00863     SYSTEMTIME sysTimes[2];
00864     memset(sysTimes, 0, sizeof(sysTimes));
00865     int nCount = (int) ::SendMessage(m_hWnd, MCM_GETMONTHRANGE,
00866         (WPARAM) dwFlags,   (LPARAM) &sysTimes);
00867
00868     refMinRange = CTime(sysTimes[0]);
00869     refMaxRange = CTime(sysTimes[1]);
00870
00871     return nCount;
00872 }
00873
00874 BOOL CCJMonthCalCtrl::GetSelRange(LPSYSTEMTIME pMinRange,
00875     LPSYSTEMTIME pMaxRange) const
00876 {
00877     ASSERT(m_hWnd != NULL);
00878     ASSERT((GetStyle() & MCS_MULTISELECT));
00879
00880     ASSERT_POINTER(pMinRange, SYSTEMTIME);
00881     ASSERT_POINTER(pMaxRange, SYSTEMTIME);
00882
00883     SYSTEMTIME sysTimes[2];
00884     BOOL bReturn = (BOOL) ::SendMessage(m_hWnd, MCM_GETSELRANGE,
00885                                         0, (LPARAM) &sysTimes);
00886
00887     if (bReturn)
00888     {
00889         memcpy(pMinRange, &sysTimes[0], sizeof(SYSTEMTIME));
00890         memcpy(pMaxRange, &sysTimes[1], sizeof(SYSTEMTIME));
00891     }
00892
00893     return bReturn;
00894 }
00895
00896 BOOL CCJMonthCalCtrl::SetSelRange(const LPSYSTEMTIME pMinRange,
00897     const LPSYSTEMTIME pMaxRange)
00898 {
00899     ASSERT(m_hWnd != NULL);
00900     ASSERT((GetStyle() & MCS_MULTISELECT));
00901
00902     ASSERT_POINTER(pMinRange, SYSTEMTIME);
00903     ASSERT_POINTER(pMaxRange, SYSTEMTIME);
00904
00905     SYSTEMTIME sysTimes[2];
00906     memcpy(&sysTimes[0], pMinRange, sizeof(SYSTEMTIME));
00907     memcpy(&sysTimes[1], pMaxRange, sizeof(SYSTEMTIME));
00908
00909     return (BOOL) ::SendMessage(m_hWnd, MCM_SETSELRANGE,
00910         0, (LPARAM) &sysTimes);
00911 }
00912
00913 BOOL CCJMonthCalCtrl::SetSelRange(const COleDateTime& refMinRange,
00914     const COleDateTime& refMaxRange)
00915 {
00916     // control must have multiple select
00917     ASSERT((GetStyle() & MCS_MULTISELECT));
00918     ASSERT(::IsWindow(m_hWnd));
00919
00920     SYSTEMTIME sysTimes[2];
00921     BOOL bResult = FALSE;
00922
00923     if (refMinRange.GetStatus() == COleDateTime::valid &&
00924         refMinRange.GetStatus() == COleDateTime::valid)
00925     {
00926         if (GetAsSystemTime(refMinRange, sysTimes[0]) &&
00927             GetAsSystemTime(refMaxRange, sysTimes[1]))
00928         {
00929             bResult = (BOOL)
00930                 ::SendMessage(m_hWnd, MCM_SETSELRANGE, 0, (LPARAM)sysTimes);
00931         }
00932     }
00933
00934     return bResult;
00935 }
00936
00937 BOOL CCJMonthCalCtrl::GetSelRange(COleDateTime& refMinRange,
00938     COleDateTime& refMaxRange) const
00939 {
00940     // control must have multiple select
00941     ASSERT((GetStyle() & MCS_MULTISELECT));
00942     ASSERT(::IsWindow(m_hWnd));
00943
00944     SYSTEMTIME sysTimes[2];
00945     memset(sysTimes, 0, sizeof(sysTimes));
00946     BOOL bResult = (BOOL)
00947         ::SendMessage(m_hWnd, MCM_GETSELRANGE, 0, (LPARAM) &sysTimes);
00948
00949     if (bResult)
00950     {
00951         refMinRange = COleDateTime(sysTimes[0]);
00952         refMaxRange = COleDateTime(sysTimes[1]);
00953     }
00954     return bResult;
00955 }
00956
00957 BOOL CCJMonthCalCtrl::SetSelRange(const CTime& refMinRange,
00958     const CTime& refMaxRange)
00959 {
00960     // control must have multiple select
00961     ASSERT((GetStyle() & MCS_MULTISELECT));
00962     ASSERT(::IsWindow(m_hWnd));
00963
00964     SYSTEMTIME sysTimes[2];
00965     BOOL bResult = FALSE;
00966
00967     if (GetAsSystemTime(refMinRange, sysTimes[0]) &&
00968         GetAsSystemTime(refMaxRange, sysTimes[1]))
00969     {
00970         bResult = (BOOL)
00971             ::SendMessage(m_hWnd, MCM_SETSELRANGE, 0, (LPARAM)sysTimes);
00972     }
00973
00974     return bResult;
00975 }
00976
00977 BOOL CCJMonthCalCtrl::GetSelRange(CTime& refMinRange, CTime& refMaxRange) const
00978 {
00979     // control must have multiple select
00980     ASSERT((GetStyle() & MCS_MULTISELECT));
00981     ASSERT(::IsWindow(m_hWnd));
00982
00983     SYSTEMTIME sysTimes[2];
00984     memset(sysTimes, 0, sizeof(sysTimes));
00985     BOOL bResult = (BOOL)
00986         ::SendMessage(m_hWnd, MCM_GETSELRANGE, 0, (LPARAM) &sysTimes);
00987
00988     if (bResult)
00989     {
00990         refMinRange = CTime(sysTimes[0]);
00991         refMaxRange = CTime(sysTimes[1]);
00992     }
00993     return bResult;
00994 }
00995
00997 // DDX_ routines
00998
00999 void AFXAPI DDX_CJDateTimeCtrl(CDataExchange* pDX, int nIDC, COleDateTime& value)
01000 {
01001     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01002     CCJDateTimeCtrl* pWnd = (CCJDateTimeCtrl*) CWnd::FromHandle(hWndCtrl);
01003
01004     if (pDX->m_bSaveAndValidate)
01005         pWnd->GetTime(value);
01006     else
01007         pWnd->SetTime(value);
01008 }
01009
01010 void AFXAPI DDX_CJDateTimeCtrl(CDataExchange* pDX, int nIDC, CTime& value)
01011 {
01012     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01013     CCJDateTimeCtrl* pWnd = (CCJDateTimeCtrl*) CWnd::FromHandle(hWndCtrl);
01014
01015     if (pDX->m_bSaveAndValidate)
01016         pWnd->GetTime(value);
01017     else
01018         pWnd->SetTime(&value);
01019 }
01020
01021 void AFXAPI DDX_CJMonthCalCtrl(CDataExchange* pDX, int nIDC,
01022     COleDateTime& value)
01023 {
01024     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01025     CCJMonthCalCtrl* pWnd = (CCJMonthCalCtrl*) CWnd::FromHandle(hWndCtrl);
01026
01027     if (pDX->m_bSaveAndValidate)
01028         pWnd->GetCurSel(value);
01029     else
01030         pWnd->SetCurSel(value);
01031 }
01032
01033 void AFXAPI DDX_CJMonthCalCtrl(CDataExchange* pDX, int nIDC, CTime& value)
01034 {
01035     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
01036     CCJMonthCalCtrl* pWnd = (CCJMonthCalCtrl*) CWnd::FromHandle(hWndCtrl);
01037
01038     if (pDX->m_bSaveAndValidate)
01039         pWnd->GetCurSel(value);
01040     else
01041         pWnd->SetCurSel(value);
01042 }
01043
01044 void AFXAPI DDV_CJMinMaxDateTime(CDataExchange* pDX, CTime& refValue,
01045     const CTime* pMinRange, const CTime* pMaxRange)
01046 {
01047     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01048
01049     CCJDateTimeCtrl* pWnd =
01050 #if _MFC_VER >= 0x700
01051         (CCJDateTimeCtrl*) pDX->m_pDlgWnd;
01052 #else
01053         (CCJDateTimeCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01054 #endif
01055
01056     if (!pDX->m_bSaveAndValidate)
01057     {
01058         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01059               (pMaxRange != NULL && *pMaxRange < refValue))
01060         {
01061 #ifdef _DEBUG
01062 #if _MFC_VER >= 0x700
01063             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01064 #else
01065             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01066 #endif
01067             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01068 #endif
01069             return;     // don't stop now
01070         }
01071     }
01072
01073     pWnd->SetRange(pMinRange, pMaxRange);
01074 }
01075
01076 void AFXAPI DDV_CJMinMaxDateTime(CDataExchange* pDX,  COleDateTime& refValue,
01077     const COleDateTime* pMinRange, const COleDateTime* pMaxRange)
01078 {
01079     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01080     CCJDateTimeCtrl* pWnd =
01081 #if _MFC_VER >= 0x700
01082         (CCJDateTimeCtrl*) pDX->m_pDlgWnd;
01083 #else
01084         (CCJDateTimeCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01085 #endif
01086
01087     if (!pDX->m_bSaveAndValidate)
01088     {
01089         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01090               (pMaxRange != NULL && *pMaxRange < refValue))
01091         {
01092 #if _MFC_VER >= 0x700
01093             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01094 #else
01095             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01096 #endif
01097             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01098             return;     // don't stop now
01099         }
01100     }
01101
01102     pWnd->SetRange(pMinRange, pMaxRange);
01103 }
01104
01105 void AFXAPI DDV_CJMinMaxMonth(CDataExchange* pDX, CTime& refValue,
01106     const CTime* pMinRange, const CTime* pMaxRange)
01107 {
01108     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01109     CCJMonthCalCtrl* pWnd =
01110 #if _MFC_VER >= 0x700
01111         (CCJMonthCalCtrl*) pDX->m_pDlgWnd;
01112 #else
01113         (CCJMonthCalCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01114 #endif
01115
01116     if (!pDX->m_bSaveAndValidate)
01117     {
01118         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01119               (pMaxRange != NULL && *pMaxRange < refValue))
01120         {
01121 #ifdef _DEBUG
01122 #if _MFC_VER >= 0x700
01123             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01124 #else
01125             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01126 #endif
01127             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01128 #endif
01129             return;     // don't stop now
01130         }
01131     }
01132
01133     pWnd->SetRange(pMinRange, pMaxRange);
01134 }
01135
01136 void AFXAPI DDV_CJMinMaxMonth(CDataExchange* pDX, COleDateTime& refValue,
01137     const COleDateTime* pMinRange, const COleDateTime* pMaxRange)
01138 {
01139     ASSERT(pMinRange == NULL || pMaxRange == NULL || *pMinRange <= *pMaxRange);
01140     CCJMonthCalCtrl* pWnd =
01141 #if _MFC_VER >= 0x700
01142         (CCJMonthCalCtrl*) pDX->m_pDlgWnd;
01143 #else
01144         (CCJMonthCalCtrl*) CWnd::FromHandle(pDX->m_hWndLastControl);
01145 #endif
01146
01147     if (!pDX->m_bSaveAndValidate)
01148     {
01149         if ( (pMinRange != NULL && *pMinRange > refValue) ||
01150               (pMaxRange != NULL && *pMaxRange < refValue))
01151         {
01152 #ifdef _DEBUG
01153 #if _MFC_VER >= 0x700
01154             int nIDC = GetWindowLong(*pDX->m_pDlgWnd, GWL_ID);
01155 #else
01156             int nIDC = GetWindowLong(pDX->m_hWndLastControl, GWL_ID);
01157 #endif
01158             TRACE1("Warning: initial dialog data is out of range in control ID %d.\n", nIDC);
01159 #endif
01160             return;     // don't stop now
01161         }
01162     }
01163
01164     pWnd->SetRange(pMinRange, pMaxRange);
01165 }
01166
01168
01169 IMPLEMENT_DYNAMIC(CCJDateTimeCtrl, CWnd)
01170 IMPLEMENT_DYNAMIC(CCJMonthCalCtrl, CWnd)
01171
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UMessageMapFunctions Member List

This is the complete list of members for UMessageMapFunctions, including all inherited members.

pfn | UMessageMapFunctions
pfni_i | UMessageMapFunctions
pfni_ii | UMessageMapFunctions
pfni_iVP | UMessageMapFunctions
pfni_V | UMessageMapFunctions
pfni_VP | UMessageMapFunctions
pfnV_i | UMessageMapFunctions
pfnV_ii | UMessageMapFunctions
pfnV_iii | UMessageMapFunctions
pfnV_iiVP | UMessageMapFunctions
pfnV_iVP | UMessageMapFunctions
pfnV_V | UMessageMapFunctions
pfnV_VP | UMessageMapFunctions

Generated on Sat Aug 7 22:55:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AdminOptionDlg.h Source File

common/AdminOptionDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2001
00019  */
00020
00021 /*
00022  * AdminOptionDlg.h --- admin options dialog
00023  */
00024
00025 #if !defined(AFX_ADMINOPTIONDLG_H__C9A89564_F0A4_4294_8C6C_18469D18BCB3__INCLUDED_)
00026 #define AFX_ADMINOPTIONDLG_H__C9A89564_F0A4_4294_8C6C_18469D18BCB3__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031 // AdminOptionDlg.h : header file
00032 //
00033
00034 #ifdef WIN32
00035 #   include "MultilineEntryDlg.h"
00036 #   include "HHelpSupport.h"
00037 #endif
00038
00040 typedef enum
00041 {
00042     kChangeLog,
00043     kSetState,
00044     kSetDescription
00045 } kAdminOptionDlgType;
00046
00047 bool CompatGetAdminOptions(const MultiFiles* mf, kAdminOptionDlgType type, CStr& optionString);
00048
00049 #ifdef WIN32
00050
00052 // CAdminOption_MAIN dialog
00053
00054 class CAdminOption_MAIN : public CHHelpPropertyPage
00055 {
00056 // Construction
00057 public:
00058     CAdminOption_MAIN(const MultiFiles* mf, kAdminOptionDlgType type, const char* optionString,
00059         CWnd* pParent = NULL);   // standard constructor
00060
00061 // Dialog Data
00062     //{{AFX_DATA(CAdminOption_MAIN)
00063     enum { IDD = IDD_ADMINOPTION };
00064     CStatic m_multilineEntryPlaceholder;
00065     //}}AFX_DATA
00066
00067
00068 // Overrides
00069     // ClassWizard generated virtual function overrides
00070     //{{AFX_VIRTUAL(CAdminOption_MAIN)
00071     protected:
00072     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00073     //}}AFX_VIRTUAL
00074
00075 // Implementation
00076 protected:
00077
00078     // Generated message map functions
00079     //{{AFX_MSG(CAdminOption_MAIN)
00080     virtual BOOL OnInitDialog();
00081     //}}AFX_MSG
00082     DECLARE_MESSAGE_MAP()
00083 private:
00084     // Data members
00085     kAdminOptionDlgType m_type;
00086     CString m_optionString;
00088     CMultilineEntryDlg m_multilineEntryDlg;
00090     // Methods
00091     virtual void InitHelpID();
00092
00093     void SetMultilineEntry();
00094
00095 public:
00096     // Interface
00097     CString GetOptionString() const;
00098 };
00099
00100 //{{AFX_INSERT_LOCATION}}
00101 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00102
00103 #endif /* WIN32 */
00104
00105 #endif // !defined(AFX_ADMINOPTIONDLG_H__C9A89564_F0A4_4294_8C6C_18469D18BCB3__INCLUDED_)
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacBinEncoding.h Source File

common/MacBinEncoding.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * MacBinEncoding.h --- class to store the mac binary encoding mappings
00023  */
00024
00025 #ifndef MACBINENCODING_H
00026 #define MACBINENCODING_H
00027
00028 #include <LOutlineTable.h>
00029 #include <LCommander.h>
00030 #include <LOutlineItem.h>
00031 #include <LString.h>
00032
00033 #include "MacBinMaps.h"
00034
00035 class CMacBinTable : public LOutlineTable, public LCommander
00036 {
00037 public:
00038     enum { class_ID = 'MBTA' };
00039
00040     CMacBinTable( LStream *inStream );
00041     virtual ~CMacBinTable();
00042
00043     static void SetCurrentMap(MacBinMaps *map) {gCurMacBinMap = map;}
00044     static MacBinMaps * GetCurrentMap(void) {return gCurMacBinMap;}
00045 protected:
00046     static MacBinMaps *gCurMacBinMap;
00047
00048     virtual void FinishCreateSelf();
00049
00050 private:
00051     // defensive programming
00052     CMacBinTable();
00053     CMacBinTable( const CMacBinTable &inOriginal );
00054     CMacBinTable&       operator=( const CMacBinTable &inOriginal );
00055 };
00056
00057 class CMacBinItem : public LOutlineItem
00058 {
00059 public:
00060     CMacBinItem(const MACBINMAP & map);
00061     virtual ~CMacBinItem();
00062
00063     virtual bool EditCell(void);
00064         // return false if user canceled
00065     virtual void RemoveCell(void);
00066
00067 protected:
00068     virtual void GetDrawContentsSelf(const STableCell& inCell, SOutlineDrawContents& ioDrawContents);
00069     virtual void DrawRowAdornments(const Rect& inLocalRowRect);
00070     virtual void DoubleClick(const STableCell& inCell, const SMouseDownEvent& inMouseDown,
00071         const SOutlineDrawContents& inDrawContents, Boolean inHitText);
00072
00073     MACBINMAP fMap;
00074 private:
00075     // defensive programming
00076     CMacBinItem();
00077     CMacBinItem( const CMacBinItem &inOriginal );
00078     CMacBinItem&    operator=( const CMacBinItem &inOriginal );
00079 };
00080
00081 #endif /* MACBINENCODING_H */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TEditHandler< editType > Member List

This is the complete list of members for TEditHandler< editType >, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | TEditHandler< editType > | [inline, virtual]
OnFolder(const char *fullpath) | TEditHandler< editType > | [inline, virtual]
TEditHandler() | TEditHandler< editType > | [inline]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:56:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

stat Member List

This is the complete list of members for stat, including all inherited members.

st_atime | stat
st_ctime | stat
st_dev | stat
st_gid | stat
st_ino | stat
st_mode | stat
st_mtime | stat
st_nlink | stat
st_rdev | stat
st_size | stat
st_uid | stat

Generated on Sat Aug 7 22:56:35 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KeywordInfo Member List

This is the complete list of members for KeywordInfo, including all inherited members.

m_description | KeywordInfo
m_keyword | KeywordInfo

Generated on Sat Aug 7 22:53:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSubclassWndMap Member List

This is the complete list of members for CSubclassWndMap, including all inherited members.

Add(HWND hwnd, CSubclassWnd *pSubclassWnd) | CSubclassWndMap |
CSubclassWndMap() | CSubclassWndMap |
GetHookMap() | CSubclassWndMap | [static]
Lookup(HWND hwnd) | CSubclassWndMap |
Remove(CSubclassWnd *pSubclassWnd) | CSubclassWndMap |
RemoveAll(HWND hwnd) | CSubclassWndMap |
~CSubclassWndMap() | CSubclassWndMap |

Generated on Sat Aug 7 22:56:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJMiniDockFrameWnd.cpp Source File

WinCvs/CJLib/CJLibrary/CJMiniDockFrameWnd.cpp

Go to the documentation of this file.
00001 // CJMiniDockFrameWnd.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.3 $
00010  * $Archive: /CodeJockey/CJLibrary/CJMiniDockFrameWnd.cpp $
00011  *
00012  * $History: CJMiniDockFrameWnd.cpp $
00013  *
00014  * *****************  Version 7  *****************
00015  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00016  * Updated in $/CodeJockey/CJLibrary
00017  * Updated copyright and contact information.
00018  *
00019  * *****************  Version 6  *****************
00020  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00021  * Updated in $/CodeJockey/CJLibrary
00022  *
00023  * *****************  Version 5  *****************
00024  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00025  * Updated in $/CodeJockey/CJLibrary
00026  *
00027  * *****************  Version 4  *****************
00028  * User: Kirk Stowell Date: 6/09/99    Time: 8:33p
00029  * Updated in $/CodeJockey/CJ60Lib
00030  * Ioannhs Stamatopoulos (Yiannhs) [ystamat@mail.datamedia.gr] - Extended
00031  * docking windows, removed ::GetSysColor(...) calls and WM_SYSCOLORCHANGE
00032  * message handler, this is now automatically handled by the base class.
00033  * Added redraw flags to the create method and modified paint and layout
00034  * handlers to reduce flicker and un-necessary command handling. Dragging
00035  * rect now reflects actual control bar docked size. Added "flat" look to
00036  * the control bars, the control bars can now use the classic DevStudio
00037  * look, or use flat gradient gripper, borders and frame buttons. Overall,
00038  * docking windows now handle dragging, docking and floating much better,
00039  * and behave more like DevStudio.
00040  *
00041  * *****************  Version 3  *****************
00042  * User: Kirk Stowell Date: 4/14/99    Time: 10:40p
00043  * Updated in $/CodeJockey/CJ60Lib
00044  * Daniel Harth [danielh@mail.matco.ro] - Added support for diagonal
00045  * sizing.
00046  *
00047  * *****************  Version 2  *****************
00048  * User: Kirk Stowell Date: 4/03/99    Time: 10:39p
00049  * Updated in $/CodeJockey/CJ60Lib
00050  * Added comments and cleaned up code.
00051  *
00052  * *****************  Version 1  *****************
00053  * User: Kirk Stowell Date: 1/16/99    Time: 10:39p
00054  * Created in $/CodeJockey/CJ60Lib
00055  * Initial release.
00056  *
00057  ***************************************************************************/
00059
00060 #include "stdafx.h"
00061 #include "CJMiniDockFrameWnd.h"
00062 #include "CJDockContext.h"
00063 #include "CJSizeDockBar.h"
00064 #include "CJControlBar.h"
00065
00066 #ifdef _DEBUG
00067 #define new DEBUG_NEW
00068 #undef THIS_FILE
00069 static char THIS_FILE[] = __FILE__;
00070 #endif
00071
00073 // CCJMiniDockFrameWnd
00074
00075 CCJMiniDockFrameWnd::CCJMiniDockFrameWnd()
00076 {
00077     // TODO: add construction code here.
00078 }
00079
00080 CCJMiniDockFrameWnd::~CCJMiniDockFrameWnd()
00081 {
00082     // TODO: add destruction code here.
00083 }
00084
00085 IMPLEMENT_DYNCREATE(CCJMiniDockFrameWnd, CMiniDockFrameWnd)
00086
00087 BEGIN_MESSAGE_MAP(CCJMiniDockFrameWnd, CMiniDockFrameWnd)
00088     //{{AFX_MSG_MAP(CCJMiniDockFrameWnd)
00089     ON_WM_NCLBUTTONDOWN()
00090     ON_WM_NCLBUTTONDBLCLK()
00091     ON_WM_ERASEBKGND()
00092     ON_WM_MBUTTONDBLCLK()
00093     //}}AFX_MSG_MAP
00094 END_MESSAGE_MAP()
00095
00097 // CCJMiniDockFrameWnd message handlers
00098
00099 void CCJMiniDockFrameWnd::OnNcLButtonDown(UINT nHitTest, CPoint point)
00100 {
00101     CCJSizeDockBar *pSizeBar = (CCJSizeDockBar*)&m_wndDockBar;
00102
00103     if (nHitTest == HTCAPTION)
00104     {
00105         ActivateTopParent();
00106         if ((m_wndDockBar.m_dwStyle & CBRS_FLOAT_MULTI) == 0)
00107         {
00108             int nPos = 1;
00109             CControlBar* pBar = NULL;
00110             while(pBar == NULL && nPos < m_wndDockBar.m_arrBars.GetSize())
00111                 pBar = pSizeBar->GetDockedSizeBar(nPos++);
00112             ASSERT(pBar != NULL);
00113             ASSERT_KINDOF(CControlBar, pBar);
00114             ASSERT(pBar->m_pDockContext != NULL);
00115
00116             if (!pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar))) {
00117                 CMiniDockFrameWnd::OnNcLButtonDown(nHitTest,point);
00118                 return;
00119             }
00120
00121             //Yiannhs: This has to be fixed!! when the bar is floating
00122             //         and is over a visible dockbar, it arranges it inside
00123             //         the dock bar and does not drag, by just clicking on the caption
00124             ((CCJDockContext *)pBar->m_pDockContext)->StartDragDockBar(point);
00125             pBar->SetFocus();
00126             return;
00127         }
00128     }
00129
00130     else if (nHitTest >= HTSIZEFIRST && nHitTest <= HTSIZELAST)
00131     {
00132         ActivateTopParent();
00133         int nPos = 1;
00134         CControlBar* pBar = NULL;
00135         while(pBar == NULL && nPos < m_wndDockBar.m_arrBars.GetSize())
00136             pBar = pSizeBar->GetDockedSizeBar(nPos++);
00137
00138         ASSERT(pBar != NULL);
00139         ASSERT_KINDOF(CControlBar, pBar);
00140         ASSERT(pBar->m_pDockContext != NULL);
00141         ASSERT((m_wndDockBar.m_dwStyle & CBRS_FLOAT_MULTI) == 0);
00142
00143         if (!pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar))) {
00144             CMiniDockFrameWnd::OnNcLButtonDown(nHitTest,point);
00145             return;
00146         }
00147
00148         pBar->m_pDockContext->StartResize(nHitTest, point);
00149         return;
00150     }
00151
00152     else {  //Yiannhs
00153         CMiniFrameWnd::OnNcLButtonDown(nHitTest, point);
00154     }
00155 }
00156
00157 void CCJMiniDockFrameWnd::OnNcLButtonDblClk(UINT nHitTest, CPoint /*point*/)
00158 {
00159     if (nHitTest == HTCAPTION)
00160     {
00161         ActivateTopParent();
00162         CCJSizeDockBar * m_pSizeBar = (CCJSizeDockBar *)&m_wndDockBar;
00163
00164         if ((m_pSizeBar->m_dwStyle & CBRS_FLOAT_MULTI) == 0)
00165         {
00166             int nPos = 1;
00167             CControlBar* pBar = NULL;
00168             while(pBar == NULL && nPos < m_pSizeBar->m_arrBars.GetSize())
00169                 pBar = m_pSizeBar->GetDockedSizeBar(nPos++);
00170
00171             ASSERT(pBar != NULL);
00172             ASSERT_KINDOF(CControlBar, pBar);
00173             ASSERT(pBar->m_pDockContext != NULL);
00174
00175             if (pBar->IsKindOf(RUNTIME_CLASS(CCJControlBar)))
00176                 pBar->m_pDockContext->ToggleDocking();
00177
00178             return;
00179         }
00180     }
00181 }
00182
00183 BOOL CCJMiniDockFrameWnd::Create(CWnd* pParent, DWORD dwBarStyle)
00184 {
00185     // Let the base class do all the work.
00186     if (!CMiniDockFrameWnd::Create(pParent, dwBarStyle))
00187         return FALSE;
00188
00189     // remove the MFS_4THICKFRAME style to allow diagonal
00190     // resizing.
00191     ModifyStyle(MFS_4THICKFRAME, 0);
00192
00193     return TRUE;
00194 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CItemListDlg Member List

This is the complete list of members for CItemListDlg, including all inherited members.

CheckSettings() | CItemListDlg | [private]
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CItemListDlg(const MultiFiles *mf, const char *item, kItemListDlg type, ItemList &itemList, const ListPath *listPath, bool forceRoot, const char *cvsroot, const char *rev, const char *date, CWnd *pParent=NULL) | CItemListDlg |
CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam) | CItemListDlg | [private, static]
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DeleteAllItems() | CItemListDlg | [private]
DisplayItems(const ItemList &itemList, const int launchRes, stringstream *cvsErr=NULL, const bool showUpDir=true) | CItemListDlg | [private]
DoDataExchange(CDataExchange *pDX) | CItemListDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableControls(BOOL enable) | CItemListDlg | [private]
EnableDateRev() | CItemListDlg | [private]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetImageForItem(kItemListDlg type, bool option, const ItemDisplayInfo *displayInfo) | CItemListDlg | [private]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CItemListDlg |
InitHelpID() | CItemListDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
InitListCtrl(const kItemDisplayType displayType) | CItemListDlg | [private]
InitOptionCtrls() | CItemListDlg | [private]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
kItemImgBlank enum value | CItemListDlg | [private]
kItemImgBranch enum value | CItemListDlg | [private]
kItemImgBranchAndRevision enum value | CItemListDlg | [private]
kItemImgDir enum value | CItemListDlg | [private]
kItemImgFile enum value | CItemListDlg | [private]
kItemImgModule enum value | CItemListDlg | [private]
kItemImgRevision enum value | CItemListDlg | [private]
kItemImgUpDir enum value | CItemListDlg | [private]
m_autoRefreshCombo | CItemListDlg |
m_browseReadFromButton | CItemListDlg |
m_browseTagButton | CItemListDlg |
m_cancelButton | CItemListDlg |
m_cvsroot | CItemListDlg |
m_cvsrootCombo | CItemListDlg |
m_cvsStopped | CItemListDlg | [private]
m_date | CItemListDlg |
m_dateCombo | CItemListDlg |
m_forceRoot | CItemListDlg |
m_forceRootCheck | CItemListDlg |
m_hasDate | CItemListDlg |
m_hasDateCheck | CItemListDlg |
m_hasRev | CItemListDlg |
m_hasRevCheck | CItemListDlg |
m_headerCtrl | CItemListDlg | [private]
m_item | CItemListDlg |
m_itemEdit | CItemListDlg |
m_itemLabelStatic | CItemListDlg |
m_itemList | CItemListDlg | [private]
m_itemListCtrl | CItemListDlg |
m_itemsImageList | CItemListDlg | [private]
m_listPath | CItemListDlg |
m_mf | CItemListDlg | [private]
m_okButton | CItemListDlg |
m_option | CItemListDlg |
m_optionCheck | CItemListDlg |
m_readFrom | CItemListDlg |
m_readFromCombo | CItemListDlg |
m_refreshButton | CItemListDlg |
m_rev | CItemListDlg |
m_revCombo | CItemListDlg |
m_selCvsrootButton | CItemListDlg |
m_selectionButton | CItemListDlg |
m_sortAsc | CItemListDlg | [private]
m_sortColumn | CItemListDlg | [private]
m_type | CItemListDlg | [private]
OnBrowseReadfrom() | CItemListDlg | [protected]
OnBrowseTag() | CItemListDlg | [protected]
OnCancel() | CItemListDlg | [protected, virtual]
OnCheckdate() | CItemListDlg | [protected]
OnCheckrev() | CItemListDlg | [protected]
OnColumnclickItemlist(NMHDR *pNMHDR, LRESULT *pResult) | CItemListDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDblclkItemlist(NMHDR *pNMHDR, LRESULT *pResult) | CItemListDlg | [protected]
OnDestroy() | CItemListDlg | [protected]
OnForceroot() | CItemListDlg | [protected]
OnHelp() | CItemListDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CItemListDlg | [protected, virtual]
OnItemchangedItemlist(NMHDR *pNMHDR, LRESULT *pResult) | CItemListDlg | [protected]
OnOK() | CItemListDlg | [protected, virtual]
OnOption() | CItemListDlg | [protected]
OnRefresh() | CItemListDlg | [protected]
OnSelchangeAutoRefresh() | CItemListDlg | [protected]
OnSelcvsroot() | CItemListDlg | [protected]
OnSelection() | CItemListDlg | [protected]
PostClickRefresh() | CItemListDlg | [private]
PreTranslateMessage(MSG *pMsg) | CItemListDlg | [virtual]
SelectItem(const char *item) | CItemListDlg | [private]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
SortItems(int column, bool asc, kItemListDlg type, bool option) | CItemListDlg | [private]
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:40 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PyPersistent Member List

This is the complete list of members for PyPersistent, including all inherited members.

_GetValue(obj_t *self, PyObject *args) | PyPersistent | [inline, protected, static]
_SetValue(obj_t *self, PyObject *args) | PyPersistent | [inline, protected, static]
Create(PyObject *selfptr, PyObject *args) | PyPersistent | [static]
dealloc(obj_t *self) | PyPersistent | [static]
False() | PyContainer | [inline, static]
FindMethod(PyObject *self, char *name) | PyPersistent | [inline, static]
GetAttr(char *name) | PyContainer | [inline, virtual]
getattr(obj_t *self, char *name) | PyPersistent | [static]
GetType(void) | PyPersistent | [inline, static]
GetValue(PyObject *args) | PyPersistent |
InitValues(PyObject *d) | PyPersistent | [static]
m_cstr | PyPersistent | [protected]
m_doc | PyPersistent | [static]
m_methods | PyPersistent | [static]
m_registry | PyPersistent | [static]
New(void) | PyPersistent | [static]
PyContainer() | PyContainer | [inline]
PyPersistent(const char *uniqueName, const char *defValue, kClassPersistent pclass) | PyPersistent | [inline]
RegisterValue(PyObject *d, char *name, int value) | PyContainer | [static]
SetValue(PyObject *args) | PyPersistent |
True() | PyContainer | [inline, static]
Void() | PyContainer | [inline, static]
~PyContainer() | PyContainer | [inline, virtual]
~PyPersistent() | PyPersistent | [inline, virtual]

Generated on Sat Aug 7 22:56:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CSelectionChangeNotifier Member List

This is the complete list of members for CSelectionChangeNotifier, including all inherited members.

CSelectionChangeNotifier(CWinCvsBrowser *view, bool notify) | CSelectionChangeNotifier |
m_notify | CSelectionChangeNotifier | [private]
m_view | CSelectionChangeNotifier | [private]
m_wasLocked | CSelectionChangeNotifier | [private]
~CSelectionChangeNotifier() | CSelectionChangeNotifier | [virtual]

Generated on Sat Aug 7 22:56:22 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoReleaseHandler Member List

This is the complete list of members for KoReleaseHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoReleaseHandler() | KoReleaseHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoReleaseHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoReleaseHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/GraphDoc.h Source File

WinCvs/GraphDoc.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 // GraphDoc.h : interface of the CGraphDoc class
00022 //
00024
00025 #if !defined(AFX_GRAPHDOC_H__09F456C1_0018_11D2_BCAA_000000000000__INCLUDED_)
00026 #define AFX_GRAPHDOC_H__09F456C1_0018_11D2_BCAA_000000000000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 class CLogNode;
00033 class CWincvsView;
00034 class CGraphView;
00035 class EntnodeData;
00036
00038 class CGraphDoc : public CDocument
00039 {
00040 protected: // create from serialization only
00041     // Construction
00042     CGraphDoc();
00043     DECLARE_DYNCREATE(CGraphDoc)
00044 public:
00045     virtual ~CGraphDoc();
00046
00047 // Attributes
00048 public:
00049
00050     // Operations
00051 public:
00052
00053 // Overrides
00054     // ClassWizard generated virtual function overrides
00055     //{{AFX_VIRTUAL(CGraphDoc)
00056     public:
00057     virtual BOOL OnNewDocument();
00058     virtual void Serialize(CArchive& ar);
00059     //}}AFX_VIRTUAL
00060
00061 // Implementation
00062 public:
00063 #ifdef _DEBUG
00064     virtual void AssertValid() const;
00065     virtual void Dump(CDumpContext& dc) const;
00066 #endif
00067
00068 protected:
00069
00070 // Generated message map functions
00071 protected:
00072     //{{AFX_MSG(CGraphDoc)
00073         // NOTE - the ClassWizard will add and remove member functions here.
00074         //    DO NOT EDIT what you see in these blocks of generated code !
00075     //}}AFX_MSG
00076     DECLARE_MESSAGE_MAP()
00077
00078     // Generated OLE dispatch map functions
00079     //{{AFX_DISPATCH(CGraphDoc)
00080     afx_msg long NumNodes();
00081     //}}AFX_DISPATCH
00082     DECLARE_DISPATCH_MAP()
00083     DECLARE_INTERFACE_MAP()
00084 private:
00085     // Data members
00086     CLogNode* m_fNode;
00087     CString m_fDir;
00088     CString m_fName;
00089     EntnodeData* m_fData;
00091     // Methods
00092     void Clear(void);
00093
00094 public:
00095     // Interface
00096     void SetNode(CLogNode* node, const char* dir);
00097
00098     inline CLogNode* GetNode(void);
00099     inline EntnodeData* GetEntryInfo(void);
00100     inline const char* GetDir(void) const;
00101     inline const char* GetName(void) const;
00102
00103     CGraphView* GetTreeView(void);
00104 };
00105
00107 CLogNode* CGraphDoc::GetNode(void)
00108 {
00109     return m_fNode;
00110 }
00111
00113 EntnodeData* CGraphDoc::GetEntryInfo(void)
00114 {
00115     return m_fData;
00116 }
00117
00119 const char* CGraphDoc::GetDir(void) const
00120 {
00121     return m_fDir;
00122 }
00123
00125 const char* CGraphDoc::GetName(void) const
00126 {
00127     return m_fName;
00128 }
00129
00131
00132 //{{AFX_INSERT_LOCATION}}
00133 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00134
00135 #endif // !defined(AFX_GRAPHDOC_H__09F456C1_0018_11D2_BCAA_000000000000__INCLUDED_)
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PyMenuMgr::obj_t Member List

This is the complete list of members for PyMenuMgr::obj_t, including all inherited members.

m_object PyMenuMgr::obj_t

Generated on Sat Aug 7 22:56:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoButton.h Source File

rf/support/mfc/PseudoButton.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 // CPseudoButton window
00022
00023 #ifndef PSEUDOBUTTON_H
00024 #define PSEUDOBUTTON_H
00025
00026 #include <vector>
00027
00028 typedef enum
00029 {
00030     DD_END,
00031     DD_PIXMAP,  /* X11 pixmap (color indexed) */
00032     DD_BMAP,    /* X11 bitmap (B&W) */
00033     DD_RGB      /* RGB / char */
00034 } UTB_KIND;
00035
00036 HBITMAP UMakeBitmap(const void *icon, int & width, int & height, UTB_KIND kind,
00037                     COLORREF back, COLORREF fore, bool enabled = true);
00038
00039 HBITMAP UMakeBitmap(const void *icon, int width, int height, UTB_KIND kind, bool enabled = true);
00040
00041 class CPseudoButton : public CCJFlatButton
00042 {
00043     DECLARE_DYNAMIC(CPseudoButton)
00044
00045 // Construction
00046 public:
00047     CPseudoButton();
00048
00049     virtual bool LoadXPM(int rsrcid);
00050         // return false if it fails
00051
00052     static bool loadIcon(CString & icon, int rsrcid);
00053
00054     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00055
00056 // Attributes
00057 protected:
00058     HBITMAP m_bitmap;
00059     HBITMAP m_disbitmap;
00060
00061 // Operations
00062 public:
00063
00064 // Overrides
00065     // ClassWizard generated virtual function overrides
00066     //{{AFX_VIRTUAL(CPseudoButton)
00067     //}}AFX_VIRTUAL
00068
00069 // Implementation
00070 public:
00071     virtual ~CPseudoButton();
00072
00073     // Generated message map functions
00074 protected:
00075     virtual void DrawButtonBitmap(CDC* pDC, UINT nState, CRect& rcItem);
00076
00077     //{{AFX_MSG(CPseudoButton)
00078     //}}AFX_MSG
00079
00080     DECLARE_MESSAGE_MAP()
00081 };
00082
00084
00085 class CPseudoRotButton : public CPseudoButton
00086 {
00087     DECLARE_DYNAMIC(CPseudoRotButton)
00088
00089 // Construction
00090 public:
00091     CPseudoRotButton();
00092
00093 // Attributes
00094 protected:
00095     std::vector<HBITMAP> m_bitmaps;
00096     std::vector<HBITMAP> m_disbitmaps;
00097     int m_curindex;
00098
00099 // Operations
00100 public:
00101     virtual bool LoadXPMs(const int *rsrcid, int numrsrc);
00102
00103     virtual void DoRotate(int index);
00104     inline int GetCurrent(void) const { return m_curindex; }
00105
00106 // Overrides
00107     // ClassWizard generated virtual function overrides
00108     //{{AFX_VIRTUAL(CPseudoRotButton)
00109     //}}AFX_VIRTUAL
00110
00111 // Implementation
00112 public:
00113     virtual ~CPseudoRotButton();
00114
00115     // Generated message map functions
00116 protected:
00117     //{{AFX_MSG(CPseudoRotButton)
00118     //}}AFX_MSG
00119
00120     DECLARE_MESSAGE_MAP()
00121 };
00122
00124
00125 class CPseudoToggle : public CPseudoButton
00126 {
00127     DECLARE_DYNAMIC(CPseudoToggle)
00128
00129 // Construction
00130 public:
00131     CPseudoToggle();
00132
00133 // Attributes
00134 protected:
00135     int m_flag;
00136     bool m_radio;
00137     CString m_group;
00138
00139 // Operations
00140 public:
00141     ~CPseudoToggle();
00142     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00143
00144     // visual state (pushed/unpushed)
00145     virtual void SetState(int state);
00146     inline int GetState(void) const { return m_flag;}
00147     inline void ToggleBtn() { SetState(GetState() == 0 ? 1:0);}
00148
00149     // radio button behaviour
00150     inline void SetRadio(bool state) { m_radio = state; }
00151     inline bool IsRadio(void) const  { return m_radio; }
00152     inline void SetGroup(const char *group) { m_group = group; }
00153     inline const char *GetGroup(void) const { return m_group; }
00154
00155     //{{AFX_MSG(COglView)
00156     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00157     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00158     afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
00159     //}}AFX_MSG
00160     DECLARE_MESSAGE_MAP()
00161 };
00162
00163 #endif
00164
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppConsole.h Source File

common/AppConsole.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * AppConsole.h --- output to the console
00023  */
00024
00025 #ifndef APPCONSOLE_H
00026 #define APPCONSOLE_H
00027
00028 #include <stdio.h>
00029
00030 void cvs_out(const char *format, ...);
00031 void cvs_err(const char *format, ...);
00032 void cvs_outstr(const char *str, size_t len);
00033 void cvs_errstr(const char *str, size_t len);
00034
00035 typedef enum
00036 {
00037     kNormal,
00038     kBrown,
00039     kGreen,
00040     kMagenta,
00041     kRed,
00042     kBlue,
00043     kBold,
00044     kItalic,
00045     kUnderline,
00046     kNL // newline
00047 } kConsoleColor;
00048
00049 #ifdef WIN32
00050 class CWincvsView;
00051 #if _RICHEDIT_VER >= 0x0210
00052 #   define WCHARFORMAT CHARFORMAT2
00053 #else
00054 #   define WCHARFORMAT CHARFORMAT
00055 #endif
00056 #endif /* WIN32 */
00057
00058 class CColorConsole
00059 {
00060 public:
00061     CColorConsole();
00062     virtual ~CColorConsole();
00063
00064     CColorConsole & operator<<(char c);
00065     CColorConsole & operator<<(kConsoleColor color);
00066     CColorConsole & operator<<(const char *str);
00067     CColorConsole & operator<<(int value);
00068 protected:
00069 #ifdef WIN32
00070     CWincvsView * fView;
00071     CWincvsView * GetView();
00072     WCHARFORMAT oldFormat;
00073 public:
00074     CColorConsole(CWincvsView * aview);
00075 #endif /* WIN32 */
00076 };
00077
00078 #if defined(TARGET_OS_MAC) && !defined(qMacCvsPP)
00079     // for the mpw tools
00080 #   define cvs_out printf
00081 #   define cvs_err printf
00082 #endif /* TARGET_OS_MAC && !qMacCvsPP */
00083
00084 #endif /* APPCONSOLE_H */
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HHelpSupport.cpp Source File

WinCvs/HHelpSupport.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2004
00019  */
00020
00021 // HHelpSupport.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include "HHelpSupport.h"
00027 #include <algorithm>
00028
00029 #ifdef _DEBUG
00030 #define new DEBUG_NEW
00031 #undef THIS_FILE
00032 static char THIS_FILE[] = __FILE__;
00033 #endif
00034
00036 // CHHelpSupport Class
00037
00038 CHHelpSupport::CHHelpSupport()
00039 {
00040 }
00041
00042 CHHelpSupport::~CHHelpSupport()
00043 {
00044 }
00045
00050 LPCTSTR CHHelpSupport::GetHelpFilePath()
00051 {
00052     LPCTSTR res = "";
00053
00054     CWinApp* pApp = AfxGetApp();
00055     ASSERT(pApp != NULL); // No application object
00056
00057     if( pApp )
00058     {
00059         res = pApp->m_pszHelpFilePath;
00060     }
00061
00062     return res;
00063 }
00064
00069 void CHHelpSupport::InitHTMLHelp()
00070 {
00071     CWinApp* pApp = AfxGetApp();
00072     ASSERT(pApp != NULL); // No application object
00073
00074     if( pApp )
00075     {
00076         // Set the HTML Help file path
00077         char path[_MAX_PATH] = "";
00078         char drive[_MAX_DRIVE] = "";
00079         char dir[_MAX_DIR] = "";
00080         char fname[_MAX_FNAME] = "";
00081         char ext[_MAX_EXT] = "";
00082
00083         _splitpath(pApp->m_pszHelpFilePath, drive, dir, fname, ext);
00084         _makepath(path, drive, dir, fname, ".chm");
00085
00086         free((void*)pApp->m_pszHelpFilePath);
00087         pApp->m_pszHelpFilePath = _tcsdup(path);
00088     }
00089 }
00090
00096 CWnd* CHHelpSupport::GetWnd()
00097 {
00098     return dynamic_cast<CWnd*>(this);
00099 }
00100
00104 void CHHelpSupport::InitHelpID()
00105 {
00106 }
00107
00112 void CHHelpSupport::CreateHelpIDsData(tHelpIDsData& helpIDsData) const
00113 {
00114     for(tHelpIDMap::const_iterator it = m_hhelpIDs.begin(); it != m_hhelpIDs.end(); ++it)
00115     {
00116         helpIDsData.push_back((*it).first);
00117         helpIDsData.push_back((*it).second);
00118     }
00119
00120     helpIDsData.push_back(helpTopicEnd);
00121     helpIDsData.push_back(helpTopicEnd);
00122 }
00123
00129 BOOL CHHelpSupport::IsHelpCtrl(const UINT ctrlID) const
00130 {
00131     return ctrlID != 0 && ctrlID != IDC_STATIC;
00132 }
00133
00139 BOOL CHHelpSupport::IsIgnoredCtrl(const UINT ctrlID) const
00140 {
00141     tHelpIDMap::const_iterator it = m_hhelpIDs.find(ctrlID);
00142
00143     return it != m_hhelpIDs.end() && (*it).second == helpTopicIgnore;
00144 }
00145
00151 BOOL CHHelpSupport::DoOnHelpInfo(const HELPINFO* pHelpInfo)
00152 {
00153     if( !IsHelpCtrl(pHelpInfo->iCtrlId) || IsIgnoredCtrl(pHelpInfo->iCtrlId) )
00154     {
00155         return TRUE;
00156     }
00157
00158     if( HELPINFO_WINDOW == pHelpInfo->iContextType )
00159     {
00160         tHelpIDsData helpIDs;
00161         CreateHelpIDsData(helpIDs);
00162
00163         return HtmlHelp((HWND)pHelpInfo->hItemHandle,
00164             CHHelpSupport::GetHelpFilePath(),
00165             HH_TP_HELP_WM_HELP,
00166             (DWORD)(LPVOID)helpIDs.begin()) != NULL;
00167     }
00168
00169     return TRUE;
00170 }
00171
00175 void CHHelpSupport::DoOnContextMenu(const CWnd* pWnd, CPoint point)
00176 {
00177     if( !IsHelpCtrl(pWnd->GetDlgCtrlID()) )
00178     {
00179         return;
00180     }
00181
00182     CMenu contextMenu;
00183     contextMenu.CreatePopupMenu();
00184     contextMenu.InsertMenu(0, MF_BYPOSITION, 1, _i18n("&What's This?"));
00185
00186     if( -1 == point.x && -1 == point.y )
00187     {
00188         // Application key pressed
00189         CRect rect;
00190         pWnd->GetWindowRect(rect);
00191
00192         point.x = rect.TopLeft().x + rect.Height() / 2;
00193         point.y = rect.CenterPoint().y;
00194     }
00195
00196     if( contextMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD,
00197         point.x, point.y, GetWnd()) )
00198     {
00199         tHelpIDsData helpIDs;
00200         CreateHelpIDsData(helpIDs);
00201
00202         HtmlHelp(pWnd->GetSafeHwnd(),
00203             CHHelpSupport::GetHelpFilePath(),
00204             HH_TP_HELP_CONTEXTMENU,
00205             (DWORD)(LPVOID)helpIDs.begin());
00206     }
00207 }
00208
00212 void CHHelpSupport::EnableWndContextHelp()
00213 {
00214     if( GetWnd() )
00215     {
00216         GetWnd()->ModifyStyleEx(0, WS_EX_CONTEXTHELP);
00217     }
00218 }
00219
00223 void CHHelpSupport::ShowHelp()
00224 {
00225     GetWnd()->SendMessage(WM_COMMANDHELP);
00226 }
00227
00234 DWORD CHHelpSupport::SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic)
00235 {
00236     DWORD prevHelpID = helpTopicIgnore;
00237
00238     tHelpIDMap::iterator it = m_hhelpIDs.find(ctrlID);
00239     if( it != m_hhelpIDs.end() )
00240     {
00241         prevHelpID = (*it).second;
00242         m_hhelpIDs.erase(it);
00243     }
00244
00245     m_hhelpIDs.insert(std::make_pair(ctrlID, helpTopic));
00246
00247     return prevHelpID;
00248 }
00249
00251 // CHHelpPropertySheet
00252
00253 IMPLEMENT_DYNAMIC(CHHelpPropertySheet, CPropertySheet)
00254
00255 CHHelpPropertySheet::CHHelpPropertySheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00256     : CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00257 {
00258 }
00259
00260 CHHelpPropertySheet::CHHelpPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
00261     : CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00262 {
00263 }
00264
00265 CHHelpPropertySheet::~CHHelpPropertySheet()
00266 {
00267 }
00268
00269
00270 BEGIN_MESSAGE_MAP(CHHelpPropertySheet, CPropertySheet)
00271     //{{AFX_MSG_MAP(CHHelpPropertySheet)
00272     ON_WM_HELPINFO()
00273     ON_WM_CONTEXTMENU()
00274     //}}AFX_MSG_MAP
00275 END_MESSAGE_MAP()
00276
00278 // CHHelpPropertySheet message handlers
00279
00281 BOOL CHHelpPropertySheet::OnInitDialog()
00282 {
00283     CPropertySheet::OnInitDialog();
00284
00285     // Extra initialization
00286     EnableWndContextHelp();
00287     InitHelpID();
00288
00289     return TRUE;  // return TRUE unless you set the focus to a control
00290                   // EXCEPTION: OCX Property Pages should return FALSE
00291 }
00292
00294 void CHHelpPropertySheet::InitHelpID()
00295 {
00296 }
00297
00299 BOOL CHHelpPropertySheet::OnHelpInfo(HELPINFO* pHelpInfo)
00300 {
00301     if( GetTabControl()->GetSafeHwnd() == pHelpInfo->hItemHandle )
00302     {
00303         // Show the page's help
00304         ShowHelp();
00305         return TRUE;
00306     }
00307
00308     if( DoOnHelpInfo(pHelpInfo) )
00309     {
00310         return TRUE;
00311     }
00312
00313     return CPropertySheet::OnHelpInfo(pHelpInfo);
00314 }
00315
00317 void CHHelpPropertySheet::OnContextMenu(CWnd* pWnd, CPoint point)
00318 {
00319     DoOnContextMenu(pWnd, point);
00320 }
00321
00323 // CHHelpPropertyPage property page
00324
00325 IMPLEMENT_DYNAMIC(CHHelpPropertyPage, CPropertyPage)
00326
00327 CHHelpPropertyPage::CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption/* = 0*/)
00328     : CPropertyPage(nIDTemplate, nIDCaption)
00329 {
00330 }
00331
00332 CHHelpPropertyPage::CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption/* = 0*/)
00333     : CPropertyPage(lpszTemplateName, nIDCaption)
00334 {
00335 }
00336
00337 CHHelpPropertyPage::~CHHelpPropertyPage()
00338 {
00339 }
00340
00341 void CHHelpPropertyPage::DoDataExchange(CDataExchange* pDX)
00342 {
00343     CPropertyPage::DoDataExchange(pDX);
00344     //{{AFX_DATA_MAP(CHHelpPropertyPage)
00345         // NOTE: the ClassWizard will add DDX and DDV calls here
00346     //}}AFX_DATA_MAP
00347 }
00348
00349
00350 BEGIN_MESSAGE_MAP(CHHelpPropertyPage, CPropertyPage)
00351     //{{AFX_MSG_MAP(CHHelpPropertyPage)
00352     ON_WM_HELPINFO()
00353     ON_WM_CONTEXTMENU()
00354     //}}AFX_MSG_MAP
00355 END_MESSAGE_MAP()
00356
00358 // CHHelpPropertyPage message handlers
00359
00361 BOOL CHHelpPropertyPage::OnInitDialog()
00362 {
00363     CPropertyPage::OnInitDialog();
00364
00365     // Extra initialization
00366     EnableWndContextHelp();
00367     InitHelpID();
00368
00369     return TRUE;  // return TRUE unless you set the focus to a control
00370                   // EXCEPTION: OCX Property Pages should return FALSE
00371 }
00372
00374 BOOL CHHelpPropertyPage::OnHelpInfo(HELPINFO* pHelpInfo)
00375 {
00376     if( DoOnHelpInfo(pHelpInfo) )
00377     {
00378         return TRUE;
00379     }
00380
00381     return CPropertyPage::OnHelpInfo(pHelpInfo);
00382 }
00383
00385 void CHHelpPropertyPage::OnContextMenu(CWnd* pWnd, CPoint point)
00386 {
00387     DoOnContextMenu(pWnd, point);
00388 }
00389
00391 // CHHelpDialog dialog
00392
00393 CHHelpDialog::CHHelpDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd /*= NULL*/)
00394     : CDialog(lpszTemplateName, pParentWnd)
00395 {
00396 }
00397
00398 CHHelpDialog::CHHelpDialog(UINT nIDTemplate, CWnd* pParentWnd /*= NULL*/)
00399     : CDialog(nIDTemplate, pParentWnd)
00400 {
00401 }
00402
00403 void CHHelpDialog::DoDataExchange(CDataExchange* pDX)
00404 {
00405     CDialog::DoDataExchange(pDX);
00406     //{{AFX_DATA_MAP(CHHelpDialog)
00407         // NOTE: the ClassWizard will add DDX and DDV calls here
00408     //}}AFX_DATA_MAP
00409 }
00410
00411
00412 BEGIN_MESSAGE_MAP(CHHelpDialog, CDialog)
00413     //{{AFX_MSG_MAP(CHHelpDialog)
00414     ON_WM_HELPINFO()
00415     ON_WM_CONTEXTMENU()
00416     //}}AFX_MSG_MAP
00417 END_MESSAGE_MAP()
00418
00420 // CHHelpDialog message handlers
00421
00423 BOOL CHHelpDialog::OnInitDialog()
00424 {
00425     CDialog::OnInitDialog();
00426
00427     // Extra initialization
00428     EnableWndContextHelp();
00429     InitHelpID();
00430
00431     return TRUE;  // return TRUE unless you set the focus to a control
00432                   // EXCEPTION: OCX Property Pages should return FALSE
00433 }
00434
00436 BOOL CHHelpDialog::OnHelpInfo(HELPINFO* pHelpInfo)
00437 {
00438     if( DoOnHelpInfo(pHelpInfo) )
00439     {
00440         return TRUE;
00441     }
00442
00443     return CDialog::OnHelpInfo(pHelpInfo);
00444 }
00445
00447 void CHHelpDialog::OnContextMenu(CWnd* pWnd, CPoint point)
00448 {
00449     DoOnContextMenu(pWnd, point);
00450 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPseudoDlg Member List

This is the complete list of members for CPseudoDlg, including all inherited members.

CPseudoDlg(int dlgid, UWidget *pseudo, CWnd *pParent=NULL) | CPseudoDlg |
DoDataExchange(CDataExchange *pDX) | CPseudoDlg | [protected, virtual]
m_pseudo | CPseudoDlg | [protected]
OnInitDialog() | CPseudoDlg | [protected, virtual]
WindowProc(UINT message, WPARAM wParam, LPARAM lParam) | CPseudoDlg | [protected, virtual]
~CPseudoDlg() | CPseudoDlg | [virtual]

Generated on Sat Aug 7 22:55:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

poolRec Member List

This is the complete list of members for poolRec, including all inherited members.

firstentry | poolRec
firstfree | poolRec
pool | poolRec

Generated on Sat Aug 7 22:55:38 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

AddUnicodeCvsArgs Member List

This is the complete list of members for AddUnicodeCvsArgs, including all inherited members.

add(const char *arg) | CvsArgs | [virtual]
addfile(const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L) | ControlCvsArgs | [virtual]
argc | CvsArgs | [protected]
Argc(void) const | CvsArgs |
argv | CvsArgs | [protected]
Argv(void) const | CvsArgs |
ControlCvsArgs() | ControlCvsArgs | [inline]
CvsArgs(bool defargs=true) | CvsArgs |
CvsArgs(char *const *fromargv, int fromargc) | CvsArgs |
FileIsType(const char *arg, const char *dir, const FSSpec *spec=0L) | AddUnicodeCvsArgs | [inline, protected, virtual]
HasProblem(void) const | ControlCvsArgs |
parse(const char *arg) | CvsArgs | [virtual]
print(const char *indirectory=0L) | CvsArgs |
reset(bool defargs=true) | CvsArgs |
SetProblem(bool newState) | ControlCvsArgs |
TypeDesc() | AddUnicodeCvsArgs | [inline, protected, virtual]
~CvsArgs() | CvsArgs | [virtual]

Generated on Sat Aug 7 22:48:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoIconPopup Member List

This is the complete list of members for TPseudoIconPopup, including all inherited members.

MA_DECLARE_CLASS | TPseudoIconPopup | [private]
ReadFields(CStream_AC *aStream) | TPseudoIconPopup | [private, virtual]
TPseudoIconPopup() | TPseudoIconPopup | [private]
WriteFields(CStream_AC *aStream) const | TPseudoIconPopup | [private, virtual]
~TPseudoIconPopup() | TPseudoIconPopup | [private, virtual]

Generated on Sat Aug 7 22:57:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCVSAlert_MAIN Member List

This is the complete list of members for CCVSAlert_MAIN, including all inherited members.

CalcWndTextSize(CWnd *wnd, const char *text, const int width) | CCVSAlert_MAIN | [private, static]
CCVSAlert_MAIN(const CvsAlert *pcvsAlert, const kCvsAlertButtonType defaultButton, CWnd *pParent=NULL) | CCVSAlert_MAIN |
DoDataExchange(CDataExchange *pDX) | CCVSAlert_MAIN | [protected, virtual]
GetWndTextExtent(CWnd *wnd, const char *text) | CCVSAlert_MAIN | [private, static]
IDD enum value | CCVSAlert_MAIN |
m_alertMessage | CCVSAlert_MAIN |
m_alertMessageEdit | CCVSAlert_MAIN |
m_alertMessageFont | CCVSAlert_MAIN | [private]
m_cancelButton | CCVSAlert_MAIN |
m_defaultButton | CCVSAlert_MAIN | [private]
m_iconStatic | CCVSAlert_MAIN |
m_messageDetails | CCVSAlert_MAIN |
m_messageDetailsEdit | CCVSAlert_MAIN |
m_okButton | CCVSAlert_MAIN |
m_otherButton | CCVSAlert_MAIN |
m_pcvsAlert | CCVSAlert_MAIN | [private]
OnCancel() | CCVSAlert_MAIN | [protected, virtual]
OnInitDialog() | CCVSAlert_MAIN | [protected, virtual]
OnOK() | CCVSAlert_MAIN | [protected, virtual]
OnOtherButton() | CCVSAlert_MAIN | [protected]
Resize() | CCVSAlert_MAIN | [private]
SetAccelerators() | CCVSAlert_MAIN | [private]
SetButtonAccelerator(CButton &button) | CCVSAlert_MAIN | [private, static]
SetButtonTitles() | CCVSAlert_MAIN | [private]
SetDefaultButton() | CCVSAlert_MAIN | [private]
SetIcon() | CCVSAlert_MAIN | [private]
SetMessages() | CCVSAlert_MAIN | [private]
SetTitle() | CCVSAlert_MAIN | [private]

Generated on Sat Aug 7 22:50:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCommit_OPTIONS Member List

This is the complete list of members for CCommit_OPTIONS, including all inherited members.

CCommit_OPTIONS(const MultiFiles *mf) | CCommit_OPTIONS |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CCommit_OPTIONS | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CCommit_OPTIONS |
InitHelpID() | CCommit_OPTIONS | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_checkValidEdits | CCommit_OPTIONS |
m_forceCommit | CCommit_OPTIONS |
m_forceRecurse | CCommit_OPTIONS |
m_forceRevision | CCommit_OPTIONS |
m_mf | CCommit_OPTIONS | [private]
m_noModuleProgram | CCommit_OPTIONS |
m_noRecurse | CCommit_OPTIONS |
m_rev | CCommit_OPTIONS |
m_revCombo | CCommit_OPTIONS |
OnBrowseTag() | CCommit_OPTIONS | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnForcerevision() | CCommit_OPTIONS | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CCommit_OPTIONS() | CCommit_OPTIONS |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:50:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UCvsGraph Member List

This is the complete list of members for UCvsGraph, including all inherited members.

_GetBaseClass() | UCvsGraph | [protected, static]
_messageEntries | UCvsGraph | [private, static]
AddListener(UCmdTarget *listener) | UWidget | [virtual]
AddPage(UWidget *page, int pagecmd, int num_page) | UWidget |
AddTimer(long lap, int cmd) | UWidget |
AddTooltip(int cmd, const char *tooltipID) | UWidget |
BeforeUpdateUI(void) | UWidget | [inline, virtual]
CalcImageSize(void) | UCvsGraph | [protected]
classUCmdTarget | UCmdTarget | [protected, static]
classUCvsGraph | UCvsGraph | [protected, static]
classUObject | UObject | [protected, static]
classUWidget | UWidget | [protected, static]
CreateObject(const char *className) | UObject | [static]
Dismiss(void) | UWidget | [inline, virtual]
DoDataExchange(bool) | UWidget | [inline, virtual]
DoModal(int id=0) | UWidget |
DoValidUI(bool how) | UWidget | [static]
EndDialog(int result) | UWidget |
EndModal(bool result) | UWidget |
GetBaseMessageMap() | UCvsGraph | [protected, static]
GetCurModal() const | UWidget | [inline]
GetFocus(void) | UWidget | [static]
GetFocusCmd(void) | UWidget | [static]
GetMessageMap() const | UCvsGraph | [protected, virtual]
GetOverideList(void) | UWidget | [inline]
GetRuntimeClass() const | UCvsGraph | [virtual]
GetThisMessageMap() | UCvsGraph | [protected, static]
GetTimers(void) | UWidget |
GetTooltip(int cmd) const | UWidget |
GetWidget(int cmd) const | UWidget |
GetWidgets(void) | UWidget | [inline]
GetWidID(void) const | UCmdTarget | [inline]
HasFocus(void) | UWidget | [inline]
HasFocus(int cmdid) | UWidget | [inline]
HasModal(void) | UWidget | [static]
IsEnabled(int cmd) | UWidget | [protected]
IsKindOf(const URuntimeClass *pClass) const | UObject |
IsUIValid() | UWidget | [static]
kDrawing enum value | UCvsGraph |
kUDispatchHandled enum value | UCmdTarget |
kUNoDispatchInfo enum value | UCmdTarget |
m_curModal | UWidget | [protected]
m_currentPage | UWidget | [protected]
m_data | UCvsGraph | [protected]
m_dir | UCvsGraph | [protected]
m_listeners | UWidget | [protected]
m_modalRes | UWidget | [protected]
m_name | UCvsGraph | [protected]
m_node | UCvsGraph | [protected]
m_noDispatch | UWidget | [protected]
m_overide | UWidget | [protected]
m_tabs | UWidget | [protected]
m_timers | UWidget | [protected]
m_tooltips | UWidget | [protected]
m_widgets | UWidget | [protected]
messageMap | UCvsGraph | [protected, static]
OnBlockHandler(void *widget, int cmd, int event) | UWidget |
OnBtnClick(void *info) | UCvsGraph | [protected]
OnChgCursor(int cmd, UCURSOR cursor) | UWidget | [protected]
OnChgFocus(int cmd) | UWidget | [protected]
OnComboAppend(int cmd, const char *txt) | UWidget | [protected]
OnComboDelSel(int cmd, int sel) | UWidget | [protected]
OnComboEnableSel(int cmd, int sel, int state) | UWidget | [protected]
OnComboGetCount(int cmd) | UWidget | [protected]
OnComboGetMenu(int cmd, UMENU *menu) | UWidget | [protected]
OnComboGetPos(int cmd, UStr *txt) | UWidget | [protected]
OnComboResetAll(int cmd) | UWidget | [protected]
OnComboSetPos(int cmd, int sel) | UWidget | [protected]
OnCreate() | UCvsGraph | [protected]
OnDestroy() | UCvsGraph | [protected]
OnDrawing(void *info) | UCvsGraph | [protected]
OnEnableCmd(int cmd, int state) | UWidget | [protected]
OnFetchCmd(int cmd, void *widget) | UWidget | [protected]
OnGetFloat(int cmd, float *f) | UWidget | [protected]
OnGetLoc(int cmd, URECT *r) | UWidget | [protected]
OnGetSliderProperty(int cmd, USLIDER *prop) | UWidget | [protected]
OnGetState(int cmd) | UWidget | [protected]
OnGetText(int cmd, UStr *text) | UWidget | [protected]
OnInitTabWidget(int cmd, int page, void *widget) | UWidget | [protected]
OnInitWidget(int cmd, void *widget) | UWidget | [protected]
OnInvalidate(int cmd) | UWidget | [protected]
OnIsEnabled(int cmd) | UWidget | [protected]
OnListAddColumns(int cmd, int num) | UWidget | [protected]
OnListAddSel(int cmd, int entry) | UWidget | [protected]
OnListDelRow(int cmd, int row) | UWidget | [protected]
OnListGetInfo(int cmd, ULIST_INFO *desc) | UWidget | [protected]
OnListGetNext(int cmd, int whichCell) | UWidget | [protected]
OnListGetNextSel(int cmd, int selectedCell) | UWidget | [protected]
OnListHideColumns(int cmd, int num) | UWidget | [protected]
OnListInsert(int cmd, ULIST_INSERT *data) | UWidget | [protected]
OnListNewRow(int cmd, int *num) | UWidget | [protected]
OnListPopup(int cmd, int entry) | UWidget | [protected]
OnListResetAll(int cmd) | UWidget | [protected]
OnListResort(int cmd, int column, UListSorter s) | UWidget | [protected]
OnListRowGetData(int cmd, int row, void **data) | UWidget | [protected]
OnListRowSetData(int cmd, int row, void *data) | UWidget | [protected]
OnListSetColTitle(int cmd, int num, const char *title) | UWidget | [protected]
OnListSetColWidth(int cmd, int num, int width) | UWidget | [protected]
OnListSetFeedback(int cmd, int turnOn) | UWidget | [protected]
OnListSetSortDir(int cmd, int column, bool dir) | UWidget | [protected]
OnListShowColumns(int cmd, int num) | UWidget | [protected]
OnPageChanged(int cmd, int pagenum) | UWidget | [protected]
OnRedraw(int cmd) | UWidget | [protected]
OnSetDefault(int cmd) | UWidget | [protected]
OnSetFloat(int cmd, const float *f) | UWidget | [protected]
OnSetIcon(int cmd, void *pixmap) | UWidget | [protected]
OnSetLoc(int cmd, const URECT *r) | UWidget | [protected]
OnSetSlider(int cmd, int pos) | UWidget | [protected]
OnSetSliderProperty(int cmd, const USLIDER *prop) | UWidget | [protected]
OnSetState(int cmd, int state) | UWidget | [protected]
OnSetText(int cmd, const char *text) | UWidget | [protected]
OnSetTooltip(int cmd, UCmdUI *pCmdUI) | UWidget | [protected]
OnShowWidget(int cmd, int state) | UWidget | [protected]
OnSmartComboSetFeature(int cmd, int feature) | UWidget | [protected]
OnSmartComboSetItems(int cmd, CMString *items) | UWidget | [protected]
OnSmartComboSetReadOnly(int cmd, bool readOnly) | UWidget | [protected]
OnStatusBarText(int cmd, const char *txt) | UWidget | [protected]
OnTreeDelete(int cmd, UTREEITEM item) | UWidget | [protected]
OnTreeExpand(int cmd, int collapse, UTREEITEM item) | UWidget | [protected]
OnTreeGetInfo(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeGetSel(int cmd, UTREEITEM *item) | UWidget | [protected]
OnTreeInsert(int cmd, UTREE_INSERT *data) | UWidget | [protected]
OnTreeResetAll(int cmd) | UWidget | [protected]
OnTreeSelect(int cmd, int deselect, UTREEITEM item) | UWidget | [protected]
OnTreeSetData(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnTreeSetIcon(int cmd, UTREE_INFO *data) | UWidget | [protected]
OnUnblockHandler(void *widget, int cmd, int event) | UWidget |
OnUpdateFocus(int leave, void *widget) | UWidget | [protected]
OnUpdateUI(void) | UWidget | [protected]
OverideMapWidget(int cmdid, CRuntimeClass *widClass) | UWidget |
RemoveTimer(int cmd) | UWidget |
rtUCmdTarget(void) | UCmdTarget | [static]
rtUCvsGraph(void) | UCvsGraph | [static]
rtUObject() | UObject | [static]
rtUWidget(void) | UWidget | [static]
sFocusCmdID | UWidget | [protected, static]
sFocusWidID | UWidget | [protected, static]
sValidMenu | UWidget | [protected, static]
UCmdTarget(int widid) | UCmdTarget |
UCvsGraph(CLogNode *node, const char *dir) | UCvsGraph |
UDispatchInfo enum name | UCmdTarget |
UDispatchMessage(int evt, int arg1, void *arg2, UDispatchInfo &dispatchInfo) | UWidget | [virtual]
UObject() | UObject | [inline, protected]
UWidget(int widid) | UWidget |
UWinPseudoWindowProc(CWnd *wnd, UWidget *wid, UINT message, WPARAM wParam, LPARAM lParam) | UWidget | [friend]
WidgetIsActive(int cmd) const | UWidget |
~UCmdTarget() | UCmdTarget | [virtual]
~UCvsGraph() | UCvsGraph | [virtual]
~UObject() | UObject | [inline, virtual]
~UWidget() | UWidget | [virtual]

Generated on Sat Aug 7 22:51:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsArgs.h Source File

common/CvsArgs.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * CvsArgs.h --- class to handle cvs arguments
00023  */
00024
00025 #ifndef CVSARGS_H
00026 #define CVSARGS_H
00027
00028 #include "TextBinary.h"
00029
00031 // CvsArgs
00032
00034 #define CVS_CMD "cvs"
00035
00037 class CvsArgs
00038 {
00039 public :
00040     CvsArgs(bool defargs = true);
00041     CvsArgs(char* const* fromargv, int fromargc);
00042     virtual ~CvsArgs();
00043
00044     virtual void add(const char* arg);
00045     virtual void addfile(const char* arg, const char* dir = 0L, const UFSSpec* spec = 0L, const char* currRevision = 0L);
00046     virtual int parse(const char* arg);
00047
00048 #if INTERNAL_AUTHEN
00049     void addcvsroot();
00050 #endif /* INTERNAL_AUTHEN */
00051
00052     void reset(bool defargs = true);
00053
00054     void print(const char* indirectory = 0L);
00055
00056     char* const* Argv(void) const;
00057     int Argc(void) const;
00058
00059 protected:
00060     char** argv;
00061     int argc;
00062 };
00063
00065 // ControlCvsArgs
00066
00068 class ControlCvsArgs : public CvsArgs
00069 {
00070 public:
00071     ControlCvsArgs() : m_gotProblem(false) { }
00072
00073     virtual void addfile(const char* arg, const char* dir = 0L, const UFSSpec* spec = 0L,
00074         const char* currRevision = 0L);
00075
00076     bool HasProblem(void) const;
00077     void SetProblem(bool newState);
00078
00079 protected:
00081     virtual kTextBinTYPE FileIsType(const char* arg, const char* dir, const UFSSpec* spec = 0L) = 0;
00082
00084     virtual const char* TypeDesc() = 0;
00085
00086 private:
00087     bool m_gotProblem;
00088 };
00089
00091 // AddCvsArgs
00092
00094 class AddCvsArgs : public ControlCvsArgs
00095 {
00096 protected:
00097     virtual kTextBinTYPE FileIsType(const char* arg, const char* dir, const UFSSpec* spec = 0L)
00098     {
00099         return FileIsText(arg, dir, spec);
00100     }
00101
00102     virtual const char* TypeDesc()
00103     {
00104         return "TEXT";
00105     }
00106 };
00107
00109 // AddBinCvsArgs
00110
00112 class AddBinCvsArgs : public ControlCvsArgs
00113 {
00114 protected:
00115     virtual kTextBinTYPE FileIsType(const char* arg, const char* dir, const UFSSpec* spec = 0L)
00116     {
00117         return FileIsBinary(arg, dir, spec);
00118     }
00119
00120     virtual const char* TypeDesc()
00121     {
00122         return "binary";
00123     }
00124 };
00125
00127 // AddUnicodeCvsArgs
00128
00130 class AddUnicodeCvsArgs : public ControlCvsArgs
00131 {
00132 protected:
00133     virtual kTextBinTYPE FileIsType(const char* arg, const char* dir, const UFSSpec* spec = 0L)
00134     {
00135         return FileIsUnicode(arg, dir, spec);
00136     }
00137
00138     virtual const char* TypeDesc()
00139     {
00140         return "Unicode";
00141     }
00142 };
00143
00145 // RemoveCvsArgs
00146
00148 class RemoveCvsArgs : public CvsArgs
00149 {
00150 public:
00151     virtual void addfile(const char* arg, const char* dir = 0L,
00152         const UFSSpec* spec = 0L, const char* currRevision = 0L);
00153 };
00154
00155 #endif /* CVSPREFS_H */
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMemFile Member List

This is the complete list of members for CCJMemFile, including all inherited members.

Append(CFile *fApp) | CCJMemFile | [protected, virtual]
CCJMemFile(UINT nGrowBytes=1024) | CCJMemFile |
CCJMemFile(BYTE *lpBuffer, UINT nBufferSize, UINT nGrowBytes=0) | CCJMemFile |
CCJMemFile(LPCTSTR lpstFilename, UINT uiOpenFlags) | CCJMemFile |
Close() | CCJMemFile | [virtual]
Discard() | CCJMemFile | [virtual]
Duplicate(CFile *fDuplicate) | CCJMemFile | [virtual]
Duplicate(CString strDup) | CCJMemFile | [virtual]
Extract(CFile *fDest, DWORD dwStartPos, DWORD dwBytes) | CCJMemFile | [virtual]
Extract(CString strDest, DWORD dwStartPos, DWORD dwBytes) | CCJMemFile | [virtual]
FindData(void *pData, DWORD dwDataLen, LONG lStartPos) | CCJMemFile |
Flush() | CCJMemFile | [virtual]
Import(CFile *fImp) | CCJMemFile | [protected, virtual]
Insert(CFile *fSrc, DWORD dwSourcePos, DWORD dwDestPos, DWORD dwBytes) | CCJMemFile | [virtual]
Insert(CString strSrc, DWORD dwSourcePos, DWORD dwDestPos, DWORD dwBytes) | CCJMemFile | [virtual]
Load() | CCJMemFile | [protected, virtual]
m_bOpen | CCJMemFile | [private]
m_File | CCJMemFile | [private]
m_pError | CCJMemFile | [private]
m_uiOpenFlags | CCJMemFile | [private]
Open(CString strFilename, UINT uiOpenFlags, CFileException *pError=NULL) | CCJMemFile | [virtual]
operator+=(CFile *fApp) | CCJMemFile |
operator+=(CString strApp) | CCJMemFile |
operator=(CFile *fDup) | CCJMemFile |
operator=(CString strDup) | CCJMemFile |
operator=(DWORD dwFilePos) | CCJMemFile |
operator[](DWORD dwFilePos) | CCJMemFile |
ReadString(CString &rString) | CCJMemFile | [virtual]
Save() | CCJMemFile | [protected, virtual]
WriteString(LPCTSTR lpsz) | CCJMemFile | [virtual]
~CCJMemFile() | CCJMemFile | [virtual]

Generated on Sat Aug 7 22:49:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJBrowseButton Member List

This is the complete list of members for CCJBrowseButton, including all inherited members.

CCJBrowseButton() | CCJBrowseButton |
Create(CWnd *pWnd, BROWSE_TYPE eType, UINT nMenu, UINT nSubMenuIndx) | CCJBrowseButton | [virtual]
GetNextID(CWnd *pWnd) const | CCJBrowseButton | [virtual]
m_bOpenFileDialog | CCJBrowseButton |
m_dwFlags | CCJBrowseButton |
m_eType | CCJBrowseButton | [protected]
m_Font | CCJBrowseButton | [protected]
m_hIcon | CCJBrowseButton | [protected]
m_nID | CCJBrowseButton | [protected]
m_nMenu | CCJBrowseButton | [protected]
m_nSubMenuIndx | CCJBrowseButton | [protected]
m_pEditWnd | CCJBrowseButton | [protected]
m_pParentWnd | CCJBrowseButton |
m_strDefExt | CCJBrowseButton |
m_strFileName | CCJBrowseButton |
m_strFilter | CCJBrowseButton |
m_strTitle | CCJBrowseButton |
OnClicked() | CCJBrowseButton | [protected]
UpdateFont() | CCJBrowseButton | [virtual]
~CCJBrowseButton() | CCJBrowseButton | [virtual]

Generated on Sat Aug 7 22:48:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CImportWarning Member List

This is the complete list of members for CImportWarning, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CImportWarning(ReportWarning *warn, CWnd *pParent=NULL) | CImportWarning |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CImportWarning | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CImportWarning |
InitHelpID() | CImportWarning | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_desc | CImportWarning |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelp() | CImportWarning | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CHHelpDialog | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJPagerCtrl Member List

This is the complete list of members for CCJPagerCtrl, including all inherited members.

CCJPagerCtrl() | CCJPagerCtrl |
Create(DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) | CCJPagerCtrl | [virtual]
ForwardMouse(BOOL bForward) | CCJPagerCtrl |
GetBkColor() | CCJPagerCtrl |
GetBorder() | CCJPagerCtrl |
GetButtonSize() | CCJPagerCtrl |
GetButtonState(int iButton) | CCJPagerCtrl |
GetDropTarget(IDropTarget **ppdt) | CCJPagerCtrl |
GetPos() | CCJPagerCtrl |
m_nHeight | CCJPagerCtrl | [protected]
m_nWidth | CCJPagerCtrl | [protected]
OnPagerCalcSize(NMHDR *pNMPGCalcSize, LRESULT *pResult) | CCJPagerCtrl | [protected, virtual]
OnPagerScroll(NMHDR *pNMPGScroll, LRESULT *pResult) | CCJPagerCtrl | [protected, virtual]
RecalcSize() | CCJPagerCtrl |
SetBkColor(COLORREF clr) | CCJPagerCtrl |
SetBorder(int iBorder) | CCJPagerCtrl |
SetButtonSize(int iSize) | CCJPagerCtrl |
SetChild(HWND hwndChild) | CCJPagerCtrl |
SetPos(int iPos) | CCJPagerCtrl |
SetScrollArea(int nWidth, int nHeight) | CCJPagerCtrl |
~CCJPagerCtrl() | CCJPagerCtrl | [virtual]

Generated on Sat Aug 7 22:49:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CMKeyString Member List

This is the complete list of members for CMKeyString, including all inherited members.

_GetBaseClass() | CMString | [protected, static]
begin() const | TMString< UStr > | [inline]
classCMString | CMString | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CMKeyString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | CMKeyString |
CMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | CMString |
Compare(const char *s1, const char *s2) const | CMKeyString | [protected, virtual]
Concatenate(UStr &res, const char *key, const char *value) const | TKeyString<'\x01'> | [virtual]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
end() const | TMString< UStr > | [inline]
Find(const char *instr) const | TMString< UStr > |
CPersistent::Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | TMString< UStr > | [protected, virtual]
GetDelimiter() const | TKeyString<'\x01'> |
GetList(void) const | TMString< UStr > | [inline]
GetRuntimeClass() const | CMString | [virtual]
GetTimeStamp() const | CPersistent | [inline]
Insert(const char *str) | TMString< UStr > |
IsKindOf(const URuntimeClass *pClass) const | UObject |
list_t typedef | TMString< UStr > |
LoadAll(const char *only=0L) | CPersistent | [static]
m_allStrs | TMString< UStr > | [protected]
m_buffer | TMString< UStr > | [mutable, protected]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_maxStr | TMString< UStr > | [protected]
NeedSave(bool onlySettings=false) | CPersistent | [static]
Remove(const char *str) | TMString< UStr > |
RemoveAll() | TMString< UStr > |
ResetTimeStamp() | CPersistent | [inline]
rtCMString(void) | CMString | [static]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | TMString< UStr > | [protected, virtual]
SizeOf(void) const | TMString< UStr > | [protected, virtual]
Split(const char *str, UStr &key, UStr &value) const | TKeyString<'\x01'> | [virtual]
TKeyString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TKeyString<'\x01'> |
TMString(unsigned int maxstr, const char *uniqueName, char *const *defaultStr=0L, kClassPersistent pclass=kNoClass) | TMString< UStr > |
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CMKeyString() | CMKeyString | [virtual]
~CMString() | CMString | [virtual]
~CPersistent() | CPersistent | [virtual]
~TKeyString() | TKeyString<'\x01'> | [virtual]
~TMString() | TMString< UStr > | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:55:14 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

PyAutoObject< T > Member List

This is the complete list of members for PyAutoObject< T >, including all inherited members.

CopyReturn(void) | PyAutoObject< T > | [inline]
IsValid(void) | PyAutoObject< T > | [inline]
m_o | PyAutoObject< T > | [protected]
operator T *() const | PyAutoObject< T > | [inline]
operator->(void) | PyAutoObject< T > | [inline]
operator=(T *o) | PyAutoObject< T > | [inline]
operator=(PyObject *o) | PyAutoObject< T > | [inline]
operator=(PyAutoObject &obj) | PyAutoObject< T > | [inline]
PyAutoObject() | PyAutoObject< T > | [inline]
PyAutoObject(T *o) | PyAutoObject< T > | [inline]
PyAutoObject(PyObject *o) | PyAutoObject< T > | [inline]
PyAutoObject(PyAutoObject &obj) | PyAutoObject< T > | [inline]
Ref(void) | PyAutoObject< T > | [inline, protected]
UnRef(void) | PyAutoObject< T > | [inline, protected]
~PyAutoObject() | PyAutoObject< T > | [inline]

Generated on Sat Aug 7 22:55:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/EditorMonDlg.h Source File

common/EditorMonDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- October 2001
00019  */
00020
00021 /*
00022  * EditorMonDlg.h --- editor monitor dialog
00023  */
00024
00025 #if !defined(AFX_EDITORMONDLG_H__5146BF16_567B_4017_A1FD_619A7BD07906__INCLUDED_)
00026 #define AFX_EDITORMONDLG_H__5146BF16_567B_4017_A1FD_619A7BD07906__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031 // EditorMonDlg.h : header file
00032 //
00033
00034 #ifdef WIN32
00035 #   include "HHelpSupport.h"
00036 #endif
00037
00038 bool CompatGetEditorMsg(UStr& message);
00039
00041 // CEditorMonDlg dialog
00042
00043 #ifdef WIN32
00044
00045 class CEditorMonDlg : public CHHelpDialog
00046 {
00047 // Construction
00048 public:
00049     CEditorMonDlg(CWnd* pParent = NULL);   // standard constructor
00050
00051 // Dialog Data
00052     //{{AFX_DATA(CEditorMonDlg)
00053     enum { IDD = IDD_EDITORMON };
00054     CString m_tempFile;
00055     //}}AFX_DATA
00056
00057
00058 // Overrides
00059     // ClassWizard generated virtual function overrides
00060     //{{AFX_VIRTUAL(CEditorMonDlg)
00061     protected:
00062     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00063     //}}AFX_VIRTUAL
00064
00065 // Implementation
00066 protected:
00067
00068     // Generated message map functions
00069     //{{AFX_MSG(CEditorMonDlg)
00070     afx_msg void OnDestroy();
00071     virtual BOOL OnInitDialog();
00072     afx_msg void OnTimer(UINT nIDEvent);
00073     afx_msg void OnHelp();
00074     //}}AFX_MSG
00075     DECLARE_MESSAGE_MAP()
00076 private:
00077     // Data members
00078     UINT m_timer;
00079
00080     // Methods
00081     virtual void InitHelpID();
00082
00083 public:
00084     // Interface
00085     HANDLE m_hProcess;
00086 };
00087
00088 //{{AFX_INSERT_LOCATION}}
00089 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00090
00091 #endif /* WIN32 */
00092
00093 #endif // !defined(AFX_EDITORMONDLG_H__5146BF16_567B_4017_A1FD_619A7BD07906__INCLUDED_)
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/SmartComboBox.h Source File

common/SmartComboBox.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- December 2001
00019  */
00020
00021 #if !defined(AFX_SMARTCOMBOBOX_H__E3F8DAE6_C2EF_49CE_AE52_3AE54F5A629C__INCLUDED_)
00022 #define AFX_SMARTCOMBOBOX_H__E3F8DAE6_C2EF_49CE_AE52_3AE54F5A629C__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // SmartComboBox.h : header file
00028 //
00029
00030 #include "ustr.h"
00031
00032 // Forward declaration
00033 class CMString;
00034
00042 class USmartCombo
00043 {
00044 public:
00045     // Construction
00046     USmartCombo(int feature);
00047     virtual ~USmartCombo();
00048
00049 private:
00050     int m_feature;
00051     CMString* m_pstrItems;
00052     CStr m_keyword;
00054 public:
00056
00057     enum Feature{
00058         None =          0x00,
00059         AutoDropWidth = 0x01,
00060         RemoveItems =   0x02,
00061         ReadOnly =      0x04,
00062         Keyword =       0x10,
00063         //
00064         DefaultFeature = AutoDropWidth | RemoveItems
00065     };
00066
00067 public:
00068     // Get / Set methods
00069     void SetFeature(int feature);
00070     bool HasFeature(int feature) const;
00071
00072     void SetItems(CMString* pstrItems);
00073     CMString* GetItems();
00074
00075     void SetKeyword(const char* keyword);
00076     CStr GetKeyword() const;
00077
00078     // Overrides
00079     virtual int CalcDroppedWidth();
00080     virtual void SetReadOnly(bool readOnly = true);
00081     virtual bool RemoveItem(const char* strItem);
00082 };
00083
00084 #ifdef WIN32
00085
00087 // CSmartComboBox window
00088
00090 enum{
00091     WM_SMCB_MIN = WM_APP + 1,
00092     WM_SMCB_SETFEATURE,
00093     WM_SMCB_SETITEMS,
00094     WM_SMCB_SETREADONLY,
00095     WM_SMCB_MAX
00096 };
00097
00098
00111 class CSmartComboBox : public CComboBox, public USmartCombo
00112 {
00113 // Construction
00114 public:
00115     CSmartComboBox(int feature = USmartCombo::DefaultFeature);
00116
00117 // Attributes
00118 public:
00119
00120 // Operations
00121 public:
00122
00123 // Overrides
00124     // ClassWizard generated virtual function overrides
00125     //{{AFX_VIRTUAL(CSmartComboBox)
00126     public:
00127     virtual BOOL PreTranslateMessage(MSG* pMsg);
00128     protected:
00129     virtual void PreSubclassWindow();
00130     //}}AFX_VIRTUAL
00131
00132 // Implementation
00133 public:
00134     virtual ~CSmartComboBox();
00135
00136     // Generated message map functions
00137 protected:
00138     //{{AFX_MSG(CSmartComboBox)
00139     afx_msg void OnDropdown();
00140     //}}AFX_MSG
00141     afx_msg LRESULT OnSelectString(WPARAM wParam, LPARAM lParam);
00142     afx_msg LRESULT OnSetFeature(WPARAM wParam, LPARAM lParam);
00143     afx_msg LRESULT OnSetItems(WPARAM wParam, LPARAM lParam);
00144     afx_msg LRESULT OnSetReadOnly(WPARAM wParam, LPARAM lParam);
00145
00146     DECLARE_MESSAGE_MAP()
00147 private:
00148     // Data members
00149     bool m_selectExact;
00151     // Methods
00152     virtual int CalcDroppedWidth();
00153     BOOL DelKeyTest(MSG* pMsg);
00154
00155 public:
00156     // Interface
00157     virtual void SetReadOnly(bool readOnly = true);
00158     virtual void SetSelectExact(bool selectExact = true);
00159
00160     inline virtual CEdit* GetEditCtrl() const;
00161     inline virtual int EnsureSelchangeMatch();
00162
00163     inline virtual CString GetCurSelText() const;
00164
00165     inline virtual CString GetWindowText() const;
00166     inline void GetWindowText(CString& rString) const;
00167 };
00168
00170 // Inline implementation
00171
00176 inline CEdit* CSmartComboBox::GetEditCtrl() const
00177 {
00178     return (CEdit*)GetDlgItem(1001);
00179 }
00180
00187 inline int CSmartComboBox::EnsureSelchangeMatch()
00188 {
00189     const int item = GetCurSel();
00190
00191     if( item > -1 )
00192     {
00193         CString path;
00194         GetLBText(item, path);
00195         SetWindowText(path);
00196     }
00197
00198     return item;
00199 }
00200
00205 inline CString CSmartComboBox::GetCurSelText() const
00206 {
00207     CString strRes;
00208
00209     const int item = GetCurSel();
00210     if( item > -1 )
00211     {
00212         GetLBText(item, strRes);
00213     }
00214
00215     return strRes;
00216 }
00217
00222 inline CString CSmartComboBox::GetWindowText() const
00223 {
00224     CString strRes;
00225     GetWindowText(strRes);
00226
00227     return strRes;
00228 }
00229
00235 inline void CSmartComboBox::GetWindowText(CString& rString) const
00236 {
00237     CComboBox::GetWindowText(rString);
00238 }
00239
00241
00242 //{{AFX_INSERT_LOCATION}}
00243 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00244 #endif /* WIN32 */
00245
00246 #endif // !defined(AFX_SMARTCOMBOBOX_H__E3F8DAE6_C2EF_49CE_AE52_3AE54F5A629C__INCLUDED_)
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CRecursionLock Member List

This is the complete list of members for CRecursionLock, including all inherited members.

CRecursionLock(bool &semaphore) | CRecursionLock |
m_semaphore | CRecursionLock | [private]
~CRecursionLock() | CRecursionLock | [virtual]

Generated on Sat Aug 7 22:56:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGetPrefs_GLOBALS Member List

This is the complete list of members for CGetPrefs_GLOBALS, including all inherited members.

CGetPrefs_GLOBALS() | CGetPrefs_GLOBALS |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CGetPrefs_GLOBALS | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CGetPrefs_GLOBALS |
InitHelpID() | CGetPrefs_GLOBALS | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_alwaysroot | CGetPrefs_GLOBALS |
m_checkoutro | CGetPrefs_GLOBALS |
m_cntladd | CGetPrefs_GLOBALS |
m_didInteract | CGetPrefs_GLOBALS | [private]
m_disableSplashScreen | CGetPrefs_GLOBALS |
m_encryptCommunication | CGetPrefs_GLOBALS |
m_logout | CGetPrefs_GLOBALS |
m_logoutCheck | CGetPrefs_GLOBALS |
m_logoutEdit | CGetPrefs_GLOBALS |
m_logoutSpinButton | CGetPrefs_GLOBALS |
m_logoutTime | CGetPrefs_GLOBALS |
m_matchEntriesCase | CGetPrefs_GLOBALS |
m_prune | CGetPrefs_GLOBALS |
m_quiet | CGetPrefs_GLOBALS |
m_tcpip | CGetPrefs_GLOBALS |
m_tcpipCheck | CGetPrefs_GLOBALS |
m_unixlf | CGetPrefs_GLOBALS |
m_zlevel | CGetPrefs_GLOBALS |
m_zlevelEdit | CGetPrefs_GLOBALS |
m_zspinSpinButton | CGetPrefs_GLOBALS |
OnCheckunixlf() | CGetPrefs_GLOBALS | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CGetPrefs_GLOBALS | [protected, virtual]
OnLogout() | CGetPrefs_GLOBALS | [protected]
OnTcpip() | CGetPrefs_GLOBALS | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
StoreValues() | CGetPrefs_GLOBALS |
~CGetPrefs_GLOBALS() | CGetPrefs_GLOBALS |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/mfc/PseudoDraw.h Source File

rf/support/mfc/PseudoDraw.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(AFX_STATICDRAW_H__8DCC3165_D42E_4FAA_BCCF_F4328685535E__INCLUDED_)
00022 #define AFX_STATICDRAW_H__8DCC3165_D42E_4FAA_BCCF_F4328685535E__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // PseudoDraw.h : header file
00028 //
00029
00031 // CPseudoDraw window
00032
00033 class UWidget;
00034
00035 class CPseudoDraw : public CStatic
00036 {
00037 // Construction
00038 public:
00039     CPseudoDraw(UWidget *pseudo, int cmdid);
00040
00041 // Attributes
00042 public:
00043     UWidget *m_pseudo;
00044     int m_cmdid;
00045
00046 // Operations
00047 public:
00048
00049 // Overrides
00050     // ClassWizard generated virtual function overrides
00051     //{{AFX_VIRTUAL(CPseudoDraw)
00052     //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 public:
00056     virtual ~CPseudoDraw();
00057
00058     // Generated message map functions
00059 protected:
00060     //{{AFX_MSG(CPseudoDraw)
00061     afx_msg void OnPaint();
00062     //}}AFX_MSG
00063
00064     DECLARE_MESSAGE_MAP()
00065 };
00066
00068
00069 //{{AFX_INSERT_LOCATION}}
00070 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00071
00072 #endif // !defined(AFX_STATICDRAW_H__8DCC3165_D42E_4FAA_BCCF_F4328685535E__INCLUDED_)
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonMacros.h Source File

common/PythonMacros.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- September 2001
00019  */
00020
00021 #ifndef __PY_MACROS
00022 #define __PY_MACROS
00023
00024 // it is important with Python to not throw, instead we need
00025 // to intercept each exception and turn it into a Python exception
00026 #ifdef WIN32
00027     extern void PyHandleCvsguiError(CException* e);
00028 #else
00029     extern void PyHandleCvsguiError(const std::exception & e);
00030 #   define TRY try
00031 #   define CATCH_ALL(e) catch(const std::exception & e)
00032 #   define END_CATCH_ALL
00033 #endif
00034 extern void PyHandleCvsguiError(const char *msg);
00035
00036 /*
00037  * PY_DECL_CLASS : declate a python wrapper class
00038  * PY_IMPL_CLASS : implement python wrapper class
00039  */
00040
00041 #define _COMMON_PY_DECL_CLASS(c) \
00042 public: \
00043     typedef struct \
00044     { \
00045         PyObject_HEAD \
00046         Py##c *m_object; \
00047     } obj_t; \
00048     static const char *m_doc; \
00049     static void dealloc(obj_t *self); \
00050     static PyObject *getattr(obj_t *self, char *name); \
00051     static PyAutoObject<obj_t> New(void); \
00052     static PyMethodDef m_methods[]; \
00053     static PyRegistry m_registry; \
00054     static inline PyTypeObject *GetType(void) { return &m_registry.m_type; } \
00055     static PyObject *Create(PyObject *selfptr, PyObject *args); \
00056     static void InitValues(PyObject *d);
00057
00058 #define PY_DECL_CLASS_INHERITED(c, a) \
00059     _COMMON_PY_DECL_CLASS(c) \
00060     static PyObject *FindMethod(PyObject *self, char *name) \
00061     { \
00062         PyObject *res = Py_FindMethod(m_methods, self, name); \
00063         if(res != NULL) \
00064             return res; \
00065         PyErr_Clear(); \
00066         return Py##a::FindMethod(self, name); \
00067     }
00068
00069 #define PY_DECL_CLASS(c) \
00070     _COMMON_PY_DECL_CLASS(c) \
00071     static PyObject *FindMethod(PyObject *self, char *name) \
00072     { \
00073         return Py_FindMethod(m_methods, self, name); \
00074     }
00075
00076
00077 #define PY_IMPL_CLASS(c, adoc) \
00078     PyRegistry Py##c::m_registry("C"#c, sizeof(Py##c::obj_t), (destructor)Py##c::dealloc, (getattrfunc)Py##c::getattr, \
00079         Py##c::InitValues, (PyCFunction)Py##c::Create, Py##c::m_doc); \
00080     PyAutoObject<Py##c::obj_t> Py##c::New(void) \
00081     { \
00082         Py##c::obj_t *self = PyObject_New(Py##c::obj_t, Py##c::GetType()); \
00083         self->m_object = NULL; \
00084         PyAutoObject<Py##c::obj_t> res(self); \
00085         Py_DECREF(self); \
00086         return res; \
00087     } \
00088     const char *Py##c::m_doc = adoc; \
00089  \
00090     void Py##c::dealloc(obj_t *self) \
00091     { \
00092         delete self->m_object; \
00093         PyObject_Del(self); \
00094     } \
00095  \
00096     PyObject *Py##c::getattr(obj_t *self, char *name) \
00097     { \
00098         if(self->m_object) \
00099         { \
00100             TRY \
00101             { \
00102                 PyObject *res = self->m_object->GetAttr(name); \
00103                 if(res) \
00104                     return res; \
00105             } \
00106             CATCH_ALL(e) \
00107             { \
00108                 PyHandleCvsguiError(e); \
00109                 return NULL; \
00110             } \
00111             END_CATCH_ALL \
00112         } \
00113         return Py##c::FindMethod((PyObject *)self, name); \
00114     }
00115
00116 #define PY_DECL_METHOD(c, m) \
00117 protected: \
00118     static PyObject *_##m(obj_t *self, PyObject *args) \
00119     { \
00120         TRY \
00121         { \
00122             if(self->m_object) \
00123                 return self->m_object->m(args); \
00124         } \
00125         CATCH_ALL(e) \
00126         { \
00127             PyHandleCvsguiError(e); \
00128             return NULL; \
00129         } \
00130         END_CATCH_ALL \
00131         return NULL; \
00132     } \
00133 public: \
00134     PyObject *m(PyObject *args);
00135
00136 #define PY_BEGIN_IMPL_METHOD(c) \
00137     PyMethodDef Py##c::m_methods[] = \
00138     {
00139
00140 #define PY_IMPL_METHOD(c, m, adoc) \
00141     {#m, (binaryfunc)Py##c::_##m, METH_VARARGS, (char *)adoc},
00142
00143 #define PY_END_IMPL_METHOD \
00144         {NULL, NULL} \
00145     };
00146
00147 #endif
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCustomizeMenus Member List

This is the complete list of members for CCustomizeMenus, including all inherited members.

CCustomizeMenus(CMMenuString *fromMenu, CWnd *pParent=NULL) | CCustomizeMenus |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CCustomizeMenus | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetIcon(const CustInvertTable *entry) | CCustomizeMenus | [private]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CCustomizeMenus |
InitHelpID() | CCustomizeMenus | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_addbtn | CCustomizeMenus |
m_cmdsList | CCustomizeMenus |
m_downbtn | CCustomizeMenus |
m_Menu | CCustomizeMenus | [private]
m_menuList | CCustomizeMenus |
m_removebtn | CCustomizeMenus |
m_SmallImageList | CCustomizeMenus | [private]
m_upbtn | CCustomizeMenus |
OnAdd() | CCustomizeMenus | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDblclkAllcmds(NMHDR *pNMHDR, LRESULT *pResult) | CCustomizeMenus | [protected]
OnDblclkMenulist(NMHDR *pNMHDR, LRESULT *pResult) | CCustomizeMenus | [protected]
OnDown() | CCustomizeMenus | [protected]
OnHelp() | CCustomizeMenus | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CCustomizeMenus | [protected, virtual]
OnItemchangedAllcmds(NMHDR *pNMHDR, LRESULT *pResult) | CCustomizeMenus | [protected]
OnItemchangedMenulist(NMHDR *pNMHDR, LRESULT *pResult) | CCustomizeMenus | [protected]
OnMove(int offset) | CCustomizeMenus | [private]
OnOK() | CCustomizeMenus | [protected, virtual]
OnRemove() | CCustomizeMenus | [protected]
OnUp() | CCustomizeMenus | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:50:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ProgressDlg.h Source File

common/ProgressDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(AFX_PROGRESSDLG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_)
00022 #define AFX_PROGRESSDLG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // ProgressDialog.h : header file
00028 //
00029
00031 typedef enum
00032 {
00033     kProgressBar,
00034     kProgressText,
00035     kProgressFile
00036 } kProgressType;
00037
00038 #ifdef WIN32
00039 class CProgressDlg;
00040 #endif /* WIN32 */
00041
00043 // CProgress
00044
00046 class CProgress
00047 {
00048 public:
00049     // Construction
00050     CProgress(bool interruptable, const char* title = 0L, kProgressType progressType = kProgressBar);
00051     virtual ~CProgress();
00052
00053 private:
00054     // Data members
00055     bool m_abort;
00057 #ifdef WIN32
00058     CProgressDlg* m_dlg;
00059 #endif /* WIN32 */
00060
00061     // Methods
00062     void ForceAbort(void);
00063
00064 public:
00065     // Interface
00066
00071     inline bool HasAborted(void) const { return m_abort; }
00072
00073     void SetProgress(int percent);
00074     void SetProgress(const char* text);
00075 };
00076
00077 #ifdef WIN32
00078
00079 // CProgressDlg dialog
00080
00082 class CProgressDlg : public CDialog
00083 {
00084 public:
00085 // Construction
00086     CProgressDlg(bool& abort, bool interruptable,
00087         const char* title = NULL, kProgressType progressType = kProgressBar,
00088         CWnd* pParent = NULL);   // standard constructor
00089
00090 // Dialog Data
00091     //{{AFX_DATA(CProgressDlg)
00092     enum { IDD = IDD_PROGRESS };
00093     CButton m_cancelButton;
00094     CProgressCtrl   m_progressCtrl;
00095     CStatic m_progressTextStatic;
00096     //}}AFX_DATA
00097
00098 // Overrides
00099     // ClassWizard generated virtual function overrides
00100     //{{AFX_VIRTUAL(CProgressDlg)
00101     protected:
00102     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00103     virtual void PostNcDestroy();
00104     //}}AFX_VIRTUAL
00105
00106 // Implementation
00107 protected:
00108
00109     // Generated message map functions
00110     //{{AFX_MSG(CProgressDlg)
00111     virtual BOOL OnInitDialog();
00112     virtual void OnOK();
00113     //}}AFX_MSG
00114     DECLARE_MESSAGE_MAP()
00115 private:
00116     // Data members
00117     bool& m_abort;
00118     bool m_interruptable;
00119     CString m_title;
00120     kProgressType m_progressType;
00122     CWnd* m_pParent;
00123     HWND m_hWndParent;
00125     // Methods
00126     static void FlushDisplay(const CDialog* dlg, const bool& abort);
00127
00128 public:
00129     // Interface
00130     BOOL Create();
00131
00132     void SetProgress(int percent);
00133     void SetProgress(const char* text);
00134 };
00135
00136 //{{AFX_INSERT_LOCATION}}
00137 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00138
00139 #endif  /* WIN32 */
00140
00141 #endif // !defined(AFX_PROGRESSDLG_H__09D80542_6467_11D3_85F5_00609419FCC1__INCLUDED_)
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CImportFilterDlg Member List

This is the complete list of members for CImportFilterDlg, including all inherited members.

CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CImportFilterDlg(ReportConflict *entries, ReportWarning *warnings, CWnd *pParent=NULL) | CImportFilterDlg |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CImportFilterDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CImportFilterDlg |
InitHelpID() | CImportFilterDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_edit | CImportFilterDlg |
m_entries | CImportFilterDlg | [private]
m_imageList | CImportFilterDlg | [private]
m_list | CImportFilterDlg |
m_warnings | CImportFilterDlg | [private]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnDblclkListentries(NMHDR *pNMHDR, LRESULT *pResult) | CImportFilterDlg | [protected]
OnEditentry() | CImportFilterDlg | [protected]
OnHelp() | CImportFilterDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CImportFilterDlg | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:53:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CListParserConsole Member List

This is the complete list of members for CListParserConsole, including all inherited members.

CItemListConsole() | CItemListConsole |
CListParserConsole() | CListParserConsole |
cvs_err(const char *txt, long len) | CItemListConsole | [virtual]
cvs_out(const char *txt, long len) | CItemListConsole | [virtual]
GetCvsErr() | CItemListConsole |
GetItemList() const | CItemListConsole |
GetLaunchRes() const | CItemListConsole |
m_cvsErr | CItemListConsole | [protected]
m_cvsOut | CItemListConsole | [protected]
m_itemList | CItemListConsole | [protected]
m_launchRes | CItemListConsole | [protected]
Parse(int launchRes) | CListParserConsole | [virtual]
~CItemListConsole() | CItemListConsole | [virtual]
~CListParserConsole() | CListParserConsole | [virtual]

Generated on Sat Aug 7 22:54:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

garbyRec Member List

This is the complete list of members for garbyRec, including all inherited members.

pools garbyRec

Generated on Sat Aug 7 22:52:23 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJTabCtrlBar Member List

This is the complete list of members for CCJTabCtrlBar, including all inherited members.

AddToolTip(TCB_ITEM *pMember, LPCTSTR lpszLabel) | CCJTabCtrlBar | [protected, virtual]
AddView(LPCTSTR lpszLabel, CRuntimeClass *pViewClass, CDocument *pDoc=NULL, UINT nIndex=-1, CCreateContext *pContext=NULL) | CCJTabCtrlBar | [virtual]
AssociateImageIndexWithRuntimeClass(int nIndex, CRuntimeClass *pRuntimeClass) | CCJTabCtrlBar | [virtual]
AssociateImageIndexWithRuntimeClass(int nIndex, LPCTSTR lpszRuntimeClassName) | CCJTabCtrlBar |
CalcDynamicLayout(int nLength, DWORD nMode) | CCJControlBar | [virtual]
CCJControlBar() | CCJControlBar |
CCJTabCtrlBar() | CCJTabCtrlBar |
Create(CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName=NULL, CSize sizeDefault=CSize(200, 100), DWORD dwStyle=CBRS_LEFT, BOOL bFlatBorders=FALSE) | CCJControlBar | [virtual]
CreateTabListItem(LPCTSTR lpszLabel) | CCJTabCtrlBar | [protected, virtual]
CreateTabView(CRuntimeClass *pViewClass, CDocument *pDocument, CCreateContext *pContext) | CCJTabCtrlBar | [protected, virtual]
DeleteView(int nView) | CCJTabCtrlBar | [virtual]
DeleteView(CRuntimeClass *pViewClass) | CCJTabCtrlBar | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJControlBar | [protected, virtual]
DrawGriperCaption(CDC *pDC, LPRECT pRect) | CCJControlBar | [protected, virtual]
DrawGripper(CDC *pDC) | CCJControlBar | [protected, virtual]
EnableDockingOnSizeBar(DWORD dwDockStyle) | CCJControlBar | [virtual]
EnableFlatLook(BOOL bFlat=TRUE) | CCJControlBar | [virtual]
EnableFlatLook(BOOL bGripper, BOOL bBorder, BOOL bButtons) | CCJControlBar | [virtual]
EnableSaveState(bool bAutoSave=true) | CCJControlBar | [virtual]
EnableToolTips(BOOL bEnable) | CCJTabCtrlBar | [protected, virtual]
EraseNonClient() | CCJControlBar | [protected, virtual]
GetActiveView() | CCJTabCtrlBar | [virtual]
GetButtonRect() | CCJControlBar | [protected, virtual]
GetChildRect(CRect &rect) | CCJTabCtrlBar | [virtual]
GetGripperRect() | CCJControlBar | [protected, virtual]
GetHorzSize() | CCJControlBar | [virtual]
GetImageIndexFromRuntimeClass(CRuntimeClass *pRuntimeClass) | CCJTabCtrlBar | [protected, virtual]
GetMenuID() | CCJControlBar | [virtual]
GetMinExt() | CCJControlBar | [virtual]
GetTabFromPoint(CPoint point=CPoint(0, 0)) | CCJTabCtrlBar | [virtual]
GetToolTip() | CCJTabCtrlBar | [protected, virtual]
GetVertSize() | CCJControlBar | [virtual]
GetView(int nView) | CCJTabCtrlBar | [virtual]
GetView(CRuntimeClass *pViewClass) | CCJTabCtrlBar | [virtual]
GetViewName(int nView) | CCJTabCtrlBar | [virtual]
GetViewName(CRuntimeClass *pViewClass) | CCJTabCtrlBar | [virtual]
HitTest(CPoint &point) | CCJControlBar | [protected, virtual]
IsBottomDocked() const | CCJControlBar | [virtual]
IsFloating() const | CCJControlBar | [virtual]
IsHorzDocked() const | CCJControlBar | [virtual]
IsLeftDocked() const | CCJControlBar | [virtual]
IsRightDocked() const | CCJControlBar | [virtual]
IsTopDocked() const | CCJControlBar | [virtual]
IsVertDocked() const | CCJControlBar | [virtual]
LoadBarState(CSize &size, int nID) | CCJControlBar | [protected, virtual]
m_bAutoSave | CCJControlBar | [protected]
m_bButtons | CCJControlBar | [protected]
m_bDragging | CCJControlBar | [protected]
m_bFlatBorder | CCJControlBar | [protected]
m_bFlatGripper | CCJControlBar | [protected]
m_bFloating | CCJControlBar | [protected]
m_bGripper | CCJControlBar | [protected]
m_bMaximized | CCJControlBar | [protected]
m_bOkToDrag | CCJControlBar | [protected]
m_btnClose | CCJControlBar | [protected]
m_btnMinim | CCJControlBar | [protected]
m_bToFit | CCJControlBar |
m_bToolTipsEnabled | CCJTabCtrlBar | [protected]
m_bUnique | CCJControlBar |
m_ClassNameToImageIndexMap | CCJTabCtrlBar | [protected]
m_cxOffset | CCJControlBar | [protected]
m_cyOffset | CCJControlBar | [protected]
m_eAuxIndex | CCJControlBar | [protected]
m_eChildBorder | CCJControlBar |
m_hAuxIcon | CCJControlBar | [protected]
m_hIcon | CCJControlBar | [protected]
m_ImageList | CCJControlBar | [protected]
m_nActiveTab | CCJTabCtrlBar | [protected]
m_nID | CCJControlBar | [protected]
m_nNextToolTipId | CCJTabCtrlBar | [protected]
m_nPointTab | CCJTabCtrlBar | [protected]
m_nPos | CCJControlBar | [protected]
m_pActiveView | CCJTabCtrlBar | [protected]
m_pChildWnd | CCJControlBar | [protected]
m_popToolbarID | CCJControlBar | [protected]
m_popupMenu | CCJControlBar | [protected]
m_popupMenuID | CCJControlBar | [protected]
m_ptCurDrag | CCJControlBar | [protected]
m_ptStartDrag | CCJControlBar | [protected]
m_rcTrack | CCJControlBar | [protected]
m_sizeDesired | CCJControlBar | [protected]
m_sizeFloat | CCJControlBar | [protected]
m_sizeHorz | CCJControlBar | [protected]
m_sizeNormal | CCJControlBar | [protected]
m_sizeVert | CCJControlBar | [protected]
m_strSection | CCJControlBar | [protected]
m_TabCtrl | CCJTabCtrlBar | [protected]
m_ToolTip | CCJControlBar | [protected]
m_viewList | CCJTabCtrlBar | [protected]
Maximize(int size) | CCJControlBar | [virtual]
Minimize() | CCJControlBar | [virtual]
ModifyTabStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags=0) | CCJTabCtrlBar | [virtual]
Normalize() | CCJControlBar | [virtual]
OnButtonClose() | CCJControlBar | [protected]
OnButtonMinimize() | CCJControlBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJTabCtrlBar | [protected]
OnEraseBkgnd(CDC *pDC) | CCJControlBar | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJControlBar | [protected]
OnInvertTracker(const CRect &rect) | CCJControlBar | [protected, virtual]
OnLButtonDown(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJControlBar | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJControlBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnNcHitTest(CPoint point) | CCJControlBar | [protected]
OnNcPaint() | CCJControlBar | [protected]
OnPaint() | CCJControlBar | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJControlBar | [protected]
OnTabSelChange(NMHDR *pNMHDR, LRESULT *pResult) | CCJTabCtrlBar | [protected]
OnUpdateButtonClose(CCmdUI *pCmdUI) | CCJControlBar | [protected]
OnUpdateButtonMinimize(CCmdUI *pCmdUI) | CCJControlBar | [protected]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CCJControlBar | [virtual]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CCJTabCtrlBar | [protected]
OverkillAssert(CRuntimeClass *pViewClass) | CCJTabCtrlBar | [protected, virtual]
PreTranslateMessage(MSG *pMsg) | CCJTabCtrlBar | [virtual]
RemoveAllTabs() | CCJTabCtrlBar | [virtual]
RemoveListItem(POSITION pos) | CCJTabCtrlBar | [protected, virtual]
RemoveView(int nView) | CCJTabCtrlBar | [virtual]
ResetToolTips(CToolTipCtrl *pToolTip) | CCJTabCtrlBar | [protected, virtual]
SaveBarState(CSize &size) | CCJControlBar | [protected, virtual]
SetActiveView(int nView) | CCJTabCtrlBar | [virtual]
SetActiveView(CRuntimeClass *pViewClass) | CCJTabCtrlBar | [virtual]
SetActiveView(CView *pUserView) | CCJTabCtrlBar | [virtual]
SetChild(CWnd *pWnd) | CCJControlBar | [protected, virtual]
SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0) | CCJControlBar | [virtual]
SetNormalSize(const CSize &cs) | CCJControlBar | [virtual]
SetTabImageList(CImageList *pImageList) | CCJTabCtrlBar | [virtual]
SetTabMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0) | CCJTabCtrlBar | [virtual]
SetViewToolTip(int nView, LPCTSTR lpszLabel) | CCJTabCtrlBar | [virtual]
SetViewToolTip(CRuntimeClass *pViewClass, LPCTSTR lpszLabel) | CCJTabCtrlBar | [virtual]
ShowFrameControls(BOOL bGripper=TRUE, BOOL bButtons=TRUE) | CCJControlBar | [virtual]
SizeTabView(CWnd *pWnd) | CCJTabCtrlBar | [protected, virtual]
~CCJControlBar() | CCJControlBar | [virtual]
~CCJTabCtrlBar() | CCJTabCtrlBar | [virtual]

Generated on Sat Aug 7 22:50:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJReBar.h Source File

WinCvs/CJLib/Include/CJReBar.h

Go to the documentation of this file.
00001 // CJReBar.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new IE4 controls'
00007 // http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/Include/CJReBar.h $
00015  *
00016  * $History: CJReBar.h $
00017  *
00018  * *****************  Version 8  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/Include
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 7  *****************
00024  * User: Kirk Stowell Date: 7/31/99    Time: 4:27p
00025  * Updated in $/CodeJockey/Include
00026  *
00027  * *****************  Version 5  *****************
00028  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00029  * Updated in $/CodeJockey/Include
00030  *
00031  * *****************  Version 4  *****************
00032  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00033  * Updated in $/CodeJockey/Include
00034  *
00035  * *****************  Version 3  *****************
00036  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00037  * Updated in $/CodeJockey/Include
00038  *
00039  * *****************  Version 2  *****************
00040  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00041  * Updated in $/CodeJockey/Include
00042  * Cleaned up inline functions, and import/export macro so that class will
00043  * be imported when linked to, and exported at compile time.
00044  *
00045  * *****************  Version 1  *****************
00046  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00047  * Created in $/CodeJockey/Include
00048  * Copied from MFC v6 and techno preview for v5. Added to extend
00049  * functionality to Visual C++ 5.0 users.
00050  *
00051  ***************************************************************************/
00053
00054 #ifndef __CJREBAR_H__
00055 #define __CJREBAR_H__
00056
00057 #include "CJToolBarBase.h"
00058
00059 #ifdef _VC_VERSION_5
00060 #define AFX_IDW_REBAR       0xE804  // COMCTL32 "rebar" Bar
00061 #define AFX_IDW_DIALOGBAR   0xE805  // CDialogBar
00062 #endif // _VC_VERSION_5
00063
00065
00066 class CCJReBarCtrl;
00067
00068 // A CCJReBar object is a control bar that provides layout, persistence, and state
00069 // information for rebar controls.
00070 class _CJX_EXT_CLASS CCJReBar : public CCJToolBarBase
00071 {
00072     DECLARE_DYNAMIC(CCJReBar)
00073
00074 // Construction
00075 public:
00076     CCJReBar();
00077     BOOL Create(CWnd* pParentWnd, DWORD dwCtrlStyle = RBS_BANDBORDERS,
00078         DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_TOP,
00079         UINT nID = AFX_IDW_REBAR);
00080
00081 // Attributes
00082 public:
00083     // for direct access to the underlying common control
00084     CCJReBarCtrl& GetReBarCtrl() const;
00085
00086 // Operations
00087 public:
00088     BOOL AddBar(CWnd* pBar, LPCTSTR pszText = NULL, CBitmap* pbmp = NULL,
00089         DWORD dwStyle = RBBS_GRIPPERALWAYS | RBBS_FIXEDBMP);
00090     BOOL AddBar(CWnd* pBar, COLORREF clrFore, COLORREF clrBack,
00091         LPCTSTR pszText = NULL, DWORD dwStyle = RBBS_GRIPPERALWAYS);
00092
00093 // Implementation
00094     virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00095     virtual int OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
00096     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
00097     virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
00098 #ifdef _DEBUG
00099     void EnableDocking(DWORD dwDockStyle);
00100 #endif
00101
00102 protected:
00103     virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
00104     BOOL _AddBar(CWnd* pBar, REBARBANDINFO* pRBBI);
00105
00106     //{{AFX_MSG(CCJReBar)
00107     afx_msg BOOL OnNcCreate(LPCREATESTRUCT);
00108     afx_msg void OnPaint();
00109     afx_msg void OnHeightChange(NMHDR* pNMHDR, LRESULT* pResult);
00110     afx_msg void OnNcPaint();
00111     afx_msg void OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS*);
00112     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00113     afx_msg LRESULT OnShowBand(WPARAM wParam, LPARAM lParam);
00114     afx_msg void OnRecalcParent();
00115     //}}AFX_MSG
00116     DECLARE_MESSAGE_MAP()
00117 };
00118
00120 // Inline functions
00122
00123 _CJXLIB_INLINE CCJReBarCtrl& CCJReBar::GetReBarCtrl() const
00124     { return *(CCJReBarCtrl*)this; }
00125
00126 #endif //__CJREBAR_H__
00127
00129
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

direct Member List

This is the complete list of members for direct, including all inherited members.

d_ino | direct
d_name | direct
d_namlen | direct
d_reclen | direct

Generated on Sat Aug 7 22:51:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

USmartCombo Member List

This is the complete list of members for USmartCombo, including all inherited members.

AutoDropWidth enum value | USmartCombo |
CalcDroppedWidth() | USmartCombo | [virtual]
DefaultFeature enum value | USmartCombo |
Feature enum name | USmartCombo |
GetItems() | USmartCombo |
GetKeyword() const | USmartCombo |
HasFeature(int feature) const | USmartCombo |
Keyword enum value | USmartCombo |
m_feature | USmartCombo | [private]
m_keyword | USmartCombo | [private]
m_pstrItems | USmartCombo | [private]
None enum value | USmartCombo |
ReadOnly enum value | USmartCombo |
RemoveItem(const char *strItem) | USmartCombo | [virtual]
RemoveItems enum value | USmartCombo |
SetFeature(int feature) | USmartCombo |
SetItems(CMString *pstrItems) | USmartCombo |
SetKeyword(const char *keyword) | USmartCombo |
SetReadOnly(bool readOnly=true) | USmartCombo | [virtual]
USmartCombo(int feature) | USmartCombo |
~USmartCombo() | USmartCombo | [virtual]

Generated on Sat Aug 7 22:56:28 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsPrefs.h Source File

common/CvsPrefs.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * CvsPrefs.h --- class to handle CVS settings
00023  */
00024
00025 #ifndef CVSPREFS_H
00026 #define CVSPREFS_H
00027
00028 #include <string.h>
00029
00030 #include "CPStr.h"
00031 #include "Persistent.h"
00032
00033 #ifdef TARGET_OS_MAC
00034 #   include <Files.h>
00035 #endif /* TARGET_OS_MAC */
00036
00037 #ifdef WIN32
00038 #   define DIRTY_MCP_SUPPORT    0
00039 #else
00040 #   define DIRTY_MCP_SUPPORT    1
00041 #endif
00042
00044 typedef enum
00045 {
00046     SCHEMA_0,
00047     SCHEMA_1,
00048     SCHEMA_2,
00049     SCHEMA_CURRENT = SCHEMA_2
00050 } SCHEMA_NUMBER;
00051
00052 typedef enum
00053 {
00054     ISO8559_none, // no conversion
00055     ISO8559_1, // Latin1
00056     ISO8559_1_MacCvsPro, // Latin1
00057     ISO8559_2, // Latin2
00058     ISO8559_3, // Latin3
00059     ISO8559_4, // Latin4
00060     ISO8559_5, // Cyrillic
00061     ISO8559_6, // Arabic
00062     ISO8559_7, // Greek
00063     ISO8559_8, // Hebrew
00064     ISO8559_9, // Latin5 (Turkish)
00065     ISO8559_10 // Latin6 (Nordic)
00066 } ISO8559;
00067
00068 typedef enum
00069 {
00070     MAC_HQX, // HQX (7bits)
00071     MAC_APPSINGLE, // Apple Single
00072     MAC_PLAIN_BINARY // plain binary without resource fork
00073 } MACENCODING;
00074
00075 typedef enum
00076 {
00077     SHELL_TCL,
00078     SHELL_PYTHON
00079 } SHELL_KIND;
00080
00081 typedef enum
00082 {
00083     STATUSOUTPUT_STANDARD,
00084     STATUSOUTPUT_QUICK,
00085     STATUSOUTPUT_VERBOSE
00086 } STATUSOUTPUT_TYPE;
00087
00089 typedef int FILEACTION_TYPE;
00090
00091 typedef enum
00092 {
00093     SHOWCVS_HIDE,
00094     SHOWCVS_SHOWNORMAL,
00095     SHOWCVS_SHOWNOACTIVATE,
00096     SHOWCVS_SHOWMINNOACTIVE
00097 } SHOWCVS_TYPE;
00098
00099 #define NUM_CVSROOT 20
00100
00101 #ifdef WIN32
00102
00103     typedef enum
00104     {
00105         kWin16,
00106         kWinNT35,
00107         kWinNT4,
00108         kWin32
00109     } kWinVersion;
00110 #endif /* WIN32 */
00111
00112
00113 class CMString;
00114 class CKeyString;
00115
00116 extern CMString gOldCvsroots;
00117
00118 bool FindBestLastCvsroot(const char* path, CStr& lastCvsroot);
00119 void InsertLastCvsroot(const char* path, const char* cvsroot);
00120
00121 bool FindBestLastModuleName(const char* path, CStr& lastModuleName);
00122 void InsertLastModuleName(const char* path, const char* moduleName);
00123
00124 void MigrateCvsrootList();
00125
00126 class CvsPrefs
00127 {
00128
00129 public :
00130     inline CvsPrefs() : fHasLoggedIn(false),
00131         fCvsRunningCounter(0), fTclFileRunningCounter(0) {}
00132     inline ~CvsPrefs() {}
00133
00134 #if INTERNAL_AUTHEN
00135     // CVSROOT
00136     bool empty(void) const;
00137     int length(void) const;
00138
00139     const char* operator=(const char* newstr);
00140         // set to a new C String (0L is OK)
00141     const unsigned char *operator=(const unsigned char* newstr);
00142         // set to a new P String (0L is OK)
00143
00144     operator const char*() const;
00145         // as a C string
00146     operator const unsigned char*() const;
00147         // as a P string
00148 #endif /* INTERNAL_AUTHEN */
00149
00150     // misc. options
00151 #if DIRTY_MCP_SUPPORT
00152     bool DirtySupport(void) const;
00153 #endif
00154
00155     bool CheckoutRO(void) const;
00156     bool Z9Option(void) const;
00157     bool PruneOption(void) const;
00158     bool QuietOption(void) const;
00159     ISO8559 IsoConvert(void) const;
00160     bool ICTextOption(void) const;
00161     bool AddControl(void) const;
00162     MACENCODING MacBinEncoding(void) const;
00163     bool MacBinEncodeBinariesOnly(void) const;
00164     int KserverPort(void) const;
00165     int PserverPort(void) const;
00166     int RhostPort(void) const;
00167     const char* ServerName(void) const;
00168     const char* RshName(void) const;
00169     bool EncryptCommunication(void) const;
00170     const char* ConsoleFont(void) const;
00171     const char* Home(void) const;
00172     const char* Viewer(void) const;
00173     const char* ExtDiff(void) const;
00174     const char* Helper(void) const;
00175     const char* Browser(void) const;
00176     int LogoutTimeOut(void) const;
00177     bool AlwaysUseCvsroot(void) const;
00178     bool UseProxy(void) const;
00179     const char* ProxyHost(void) const;
00180     int ProxyPort(void) const;
00181     bool UnixLF(void) const;
00182     bool MacLF(void) const;
00183     int ZLevel(void) const;
00184     int CvsVersion(void) const;
00185     bool CvsConsole(void) const;
00186     int WordWrapLogMsg(void) const;
00187     const char* LastWorkingDir(void) const;
00188     bool UseKeyChain(void) const; // on mac
00189     bool MatchEntriesCase(void) const;
00190
00191     bool HideCommandDlgUpdate(void) const;
00192     bool HideCommandDlgDiff(void) const;
00193     bool HideCommandDlgLog(void) const;
00194     bool HideCommandDlgGraph(void) const;
00195     bool HideCommandDlgAnnotate(void) const;
00196     bool HideCommandDlgStatus(void) const;
00197     bool HideCommandDlgFileAction(void) const;
00198     bool HideCommandDlgUseShift(void) const;
00199     bool CtrlPressedOnOK(void) const;
00200
00201     SHELL_KIND GetUseShell(void) const;
00202     const char* getConsoleFont(void) const;
00203     bool DisableSplashScreen(void) const;
00204
00205     STATUSOUTPUT_TYPE StatusOutputType(void) const;
00206     FILEACTION_TYPE FileActionType(void) const;
00207     bool UpdateCaseSensitiveNames() const;
00208     bool UpdateLastCheckinTime() const;
00209     bool UpdateThreeWayConflicts() const;
00210
00211     const char* SettingsFolder(void) const;
00212     const char* TclLibrary(void) const;
00213     const char* PythonLibrary(void) const;
00214
00215 #ifndef WIN32
00216     bool UseViewerAlways(void) const;
00217     void SetUseViewerAlways(bool newState);
00218 #endif
00219
00220 #if DIRTY_MCP_SUPPORT
00221     void SetDirtySupport(bool newState);
00222 #endif
00223
00224     void SetCheckoutRO(bool newState);
00225     void SetZ9Option(bool newState);
00226     void SetPruneOption(bool newState);
00227     void SetQuietOption(bool newState);
00228     void SetIsoConvert(ISO8559 newState);
00229     void SetICTextOption(bool newState);
00230     void SetAddControl(bool newState);
00231     void SetMacBinEncodeBinariesOnly(bool newState);
00232     void SetMacBinEncoding(MACENCODING newState);
00233     void SetKserverPort(int newState);
00234     void SetPserverPort(int newState);
00235     void SetRhostPort(int newState);
00236     void SetServerName(const char* newservername);
00237     void SetRshName(const char* newrshname);
00238     void SetEncryptCommunication(bool newState);
00239     void SetHome(const char* newhome);
00240     void SetConsoleFont(const char* newFont);
00241     void SetViewer(const char* newviewer);
00242     void SetExtDiff(const char* newdiff);
00243     void SetHelper(const char* newhelper);
00244     void SetBrowser(const char* newbrowser);
00245     void SetLogoutTimeOut(int newTimeout);
00246     void SetAlwaysUseCvsroot(bool newState);
00247     void SetUseProxy(bool useit);
00248     void SetProxyHost(const char* newhost);
00249     void SetProxyPort(int newport);
00250     void SetUnixLF(bool useit);
00251     void SetMacLF(bool useit);
00252     void SetZLevel(int level);
00253     void SetCvsVersion(int version);
00254     void SetCvsConsole(bool console);
00255     void SetWordWrapLogMsg(int wordwrap);
00256     void SetLastWorkingDir(const char* workdir);
00257     void SetMatchEntriesCase(bool newState);
00258
00259     void SetHideCommandDlgUpdate(bool newState);
00260     void SetHideCommandDlgDiff(bool newState);
00261     void SetHideCommandDlgLog(bool newState);
00262     void SetHideCommandDlgGraph(bool newState);
00263     void SetHideCommandDlgAnnotate(bool newState);
00264     void SetHideCommandDlgStatus(bool newState);
00265     void SetHideCommandDlgFileAction(bool newState);
00266     void SetHideCommandDlgUseShift(bool newState);
00267     void SetCtrlPressedOnOK(bool newState);
00268
00269     void SetUseShell(SHELL_KIND shell);
00270     void SetDisableSplashScreen(bool newState);
00271
00272     void SetStatusOutputType(STATUSOUTPUT_TYPE outputType);
00273     void SetFileActionType(FILEACTION_TYPE fileActionType);
00274     void SetUpdateCaseSensitiveNames(bool newState);
00275     void SetUpdateLastCheckinTime(bool newState);
00276     void SetUpdateThreeWayConflicts(bool newState);
00277
00278     void SetSettingsFolder(const char* settingsFolder);
00279     void SetTclLibrary(const char* tclLibrary);
00280     void SetPythonLibrary(const char* pythonLibrary);
00281
00282 #ifdef WIN32
00283     kWinVersion WhichVersion();
00284 #endif /* WIN32 */
00285
00286     bool UseAltCvs(void) const;
00287     void SetUseAltCvs(bool useIt);
00288     const char* WhichCvs(UStr& path, bool userOnly = false) const;
00289     void SetWhichCvs(const char* cvsPath);  // Full path of the CVS used
00290     SHOWCVS_TYPE ShowCvs(void) const;
00291     void SetShowCvs(SHOWCVS_TYPE showCvs);
00292
00293
00294     // login/logout flag in order to manage auto-logout
00295     inline bool HasLoogedIn(void) const { return fHasLoggedIn; }
00296     inline void SetHasLoogedIn(bool newstate) { fHasLoggedIn = newstate; }
00297
00298     // Usage counter flags for CVS commands and TCL macro files.
00299     // Each SetCvsRunning(TRUE) must have equivalent
00300     // SetCvsRunning(FALSE) call.
00301     bool IsCvsRunning(void) const;
00302     int  SetCvsRunning(bool launched);
00303     bool IsTclFileRunning(void) const;
00304     int  SetTclFileRunning(bool launched);
00305
00306     // save/load preferences
00307     void save(bool quiet = false);
00308     void load(void);
00309
00310     bool NeedCvsrootMigration();
00311
00312 protected :
00313     bool fHasLoggedIn;
00314
00315     int  fCvsRunningCounter;      // Usage counters to CVS commands
00316     int  fTclFileRunningCounter;  // and Tcl macro file executions
00317 };
00318
00319 extern CvsPrefs gCvsPrefs;
00320
00321 #endif /* CVSPREFS_H */
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJStatusBarPaneControlInfo Member List

This is the complete list of members for CCJStatusBarPaneControlInfo, including all inherited members.

CCJStatusBarPaneControlInfo() | CCJStatusBarPaneControlInfo |
m_bAutodelete | CCJStatusBarPaneControlInfo |
m_nPaneID | CCJStatusBarPaneControlInfo |
m_pWnd | CCJStatusBarPaneControlInfo |
~CCJStatusBarPaneControlInfo() | CCJStatusBarPaneControlInfo | [virtual]

Generated on Sat Aug 7 22:50:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatSplitterWnd.h Source File

WinCvs/CJLib/Include/CJFlatSplitterWnd.h

Go to the documentation of this file.
00001 // CJFlatSplitterWnd.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the CSplitterWndEx class written by Oleg G. Galkin.
00006 // mailto:OlegGa@vest.msk.ru
00007 // http://www.codeguru.com/splitter/show_hide_static_panes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/Include/CJFlatSplitterWnd.h $
00015  *
00016  * $History: CJFlatSplitterWnd.h $
00017  *
00018  * *****************  Version 5  *****************
00019  * User: Kirk Stowell Date: 10/26/99   Time: 10:39p
00020  * Updated in $/CodeJock/Include
00021  * Made class methods virtual for inheritance purposes.
00022  *
00023  * *****************  Version 4  *****************
00024  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00025  * Updated in $/CodeJockey/Include
00026  * Updated copyright and contact information.
00027  *
00028  * *****************  Version 3  *****************
00029  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00030  * Updated in $/CodeJockey/Include
00031  *
00032  * *****************  Version 2  *****************
00033  * User: Kirk Stowell Date: 7/18/99    Time: 10:17p
00034  * Updated in $/CodeJockey/Include
00035  * Cleaned up inline functions, and import/export macro so that class will
00036  * be imported when linked to, and exported at compile time.
00037  *
00038  * *****************  Version 1  *****************
00039  * User: Kirk Stowell Date: 7/14/99    Time: 10:00p
00040  * Created in $/CodeJockey/Include
00041  * Class added to support flat splitters, removable splitter views and
00042  * view manipulation.
00043  *
00044  ***************************************************************************/
00046
00047 #ifndef __CJFLATSPLITTERWND_H__
00048 #define __CJFLATSPLITTERWND_H__
00049
00050 #if _MSC_VER >= 1000
00051 #pragma once
00052 #endif // _MSC_VER >= 1000
00053
00054 // CCJFlatSplitterWnd is a CSplitterWnd derived class which adds the ability
00055 // to hide and show splitter panes, based upon its index, and
00056 // to draw flat splitter windows simular to Oultook.
00057 class _CJX_EXT_CLASS CCJFlatSplitterWnd : public CSplitterWnd
00058 {
00059 public:
00060
00061     // Default constructor
00062     //
00063     CCJFlatSplitterWnd();
00064
00065     // Virtual destructor
00066     //
00067     virtual ~CCJFlatSplitterWnd();
00068
00069 protected:
00070
00071     int     m_nHiddenCol;       // Index of the hidden column.
00072     int     m_nHiddenRow;       // Index of the hidden row.
00073     BOOL    m_bFlatSplitter;    // true if the SPLS_FLATEDGE style was used during creation.
00074
00075 public:
00076
00077     // call this member function to enable or disable flat splitters.
00078     //
00079     virtual void DisableFlatStyle(BOOL bDisable=TRUE);
00080
00081     // this member function is called to switch, or swap a splitter
00082     // view with another.
00083     //
00084     virtual BOOL SwitchView(int nRow, int nCol, CView *pNewView);
00085
00086     // this member function is called to replace an existing splitter
00087     // view with another.
00088     //
00089     virtual BOOL ReplaceView(int nRow, int nCol, CRuntimeClass *pViewClass);
00090
00091     // this member function is called to show the column that was
00092     // previously hidden.
00093     //
00094     virtual void ShowColumn();
00095
00096     // this member function will hide a column based upon its index.
00097     //
00098     virtual void HideColumn(int nColHide);
00099
00100     // this member function is called to show the row that was
00101     // previously hidden.
00102     //
00103     virtual void ShowRow();
00104
00105     // this member function will hide a row based upon its index.
00106     //
00107     virtual void HideRow(int nRowHide);
00108
00109 // Overrides
00110     // ClassWizard generated virtual function overrides
00111     //{{AFX_VIRTUAL(CCJFlatSplitterWnd)
00112     virtual void OnDrawSplitter(CDC* pDC, ESplitType nType, const CRect& rect);
00113     //}}AFX_VIRTUAL
00114
00115 // Generated message map functions
00116 protected:
00117     //{{AFX_MSG(CCJFlatSplitterWnd)
00118     afx_msg void OnPaint();
00119     //}}AFX_MSG
00120     DECLARE_MESSAGE_MAP()
00121 };
00122
00124
00125 _CJXLIB_INLINE void CCJFlatSplitterWnd::DisableFlatStyle(BOOL bDisable)
00126     { m_bFlatSplitter = !bDisable; }
00127
00128 //{{AFX_INSERT_LOCATION}}
00129 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00130
00131 #endif // __CJFLATSPLITTERWND_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/fnmatch.h Source File

common/fnmatch.h

Go to the documentation of this file.
00001 /* Copyright (C) 1992 Free Software Foundation, Inc.
00002 This file is part of the GNU C Library.
00003
00004 The GNU C Library is free software; you can redistribute it and/or
00005 modify it under the terms of the GNU Library General Public License as
00006 published by the Free Software Foundation; either version 2 of the
00007 License, or (at your option) any later version.
00008
00009 The GNU C Library is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 Library General Public License for more details.  */
00013
00014 /*
00015  * Modified for WinCvs/MacCVS : Alexandre Parenteau <aubonbeurre@hotmail.com> --- June 1998
00016  */
00017
00018 #ifndef _FNMATCH_H
00019
00020 #define _FNMATCH_H  1
00021
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025
00026 /* Bits set in the FLAGS argument to `fnmatch'.  */
00027 #undef FNM_PATHNAME
00028 #define FNM_PATHNAME    (1 << 0)/* No wildcard can ever match `/'.  */
00029 #undef FNM_NOESCAPE
00030 #define FNM_NOESCAPE    (1 << 1)/* Backslashes don't quote special chars.  */
00031 #undef FNM_PERIOD
00032 #define FNM_PERIOD  (1 << 2)/* Leading `.' is matched only explicitly.  */
00033 #undef __FNM_FLAGS
00034 #define __FNM_FLAGS (FNM_PATHNAME|FNM_NOESCAPE|FNM_PERIOD)
00035
00036 /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
00037 #undef FNM_NOMATCH
00038 #define FNM_NOMATCH 1
00039
00040 #if !defined(__STDC__) && (defined(WIN32)|| defined(TARGET_OS_MAC))
00041 #   define __STDC__ 1
00042 #endif
00043
00044 /* Match STRING against the filename pattern PATTERN,
00045    returning zero if it matches, FNM_NOMATCH if not.  */
00046 #if __STDC__
00047 extern int fnmatch (const char *pattern, const char *string, int flags);
00048 #else
00049 extern int fnmatch ();
00050 #endif
00051
00052 #if defined (__CYGWIN32__) || defined (WIN32)
00053     /* Under Windows NT, filenames are case-insensitive, and both / and \
00054        are path component separators.  */
00055
00056 #   define FOLD_FN_CHAR(c) (WNT_filename_classes[(unsigned char) (c)])
00057     extern unsigned char WNT_filename_classes[];
00058 #endif /* defined (__CYGWIN32__) || defined (WIN32) */
00059
00060 #ifdef __cplusplus
00061 }
00062 #endif
00063
00064 #endif  /* fnmatch.h */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPseudoList Member List

This is the complete list of members for CPseudoList, including all inherited members.

CPseudoList(int wid, int cmd) | CPseudoList |
m_cmd | CPseudoList | [protected]
m_wid | CPseudoList | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CPseudoList | [protected]
~CPseudoList() | CPseudoList | [virtual]

Generated on Sat Aug 7 22:55:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

NotificationManager Member List

This is the complete list of members for NotificationManager, including all inherited members.

CheckIn(CObject *observer, FNOBSERVER handler) | NotificationManager |
CheckOut(CObject *observer) | NotificationManager |
m_nodes | NotificationManager | [private]
NotificationManager() | NotificationManager |
NotifyAll() | NotificationManager |

Generated on Sat Aug 7 22:55:26 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoIconButton Member List

This is the complete list of members for TPseudoIconButton, including all inherited members.

MA_DECLARE_CLASS | TPseudoIconButton | [private]
ReadFields(CStream_AC *aStream) | TPseudoIconButton | [private, virtual]
TPseudoIconButton() | TPseudoIconButton | [private]
WriteFields(CStream_AC *aStream) const | TPseudoIconButton | [private, virtual]
~TPseudoIconButton() | TPseudoIconButton | [private, virtual]

Generated on Sat Aug 7 22:57:17 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/BrowseFileView.cpp Source File

WinCvs/BrowseFileView.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 /*
00022  * BrowseFileView.cpp -- Implements the view with all the files
00023  *
00024  */
00025
00026 #include "stdafx.h"
00027 #include "wincvs.h"
00028
00029 #include <process.h>
00030 #include <vector>
00031 #include <IO.h>
00032
00033 #include "BrowseFileView.h"
00034 #include "CvsCommands.h"
00035 #include "MultiFiles.h"
00036 #include "CvsArgs.h"
00037 #include "AppConsole.h"
00038 #include "CvsPrefs.h"
00039 #include "CvsIgnore.h"
00040 #include "TclGlue.h"
00041 #include "MacrosSetup.h"
00042 #include "MoveToTrash.h"
00043 #include "WinCvsBrowser.h"
00044 #include "MainFrm.h"
00045 #include "wincvs_winutil.h"
00046 #include "BrowseViewModel.h"
00047 #include "BrowseViewHandlers.h"
00048 #include "FileViewWatcher.h"
00049 #include "BrowseViewColumn.h"
00050 #include "PythonGlue.h"
00051 #include "FilterMaskOptDlg.h"
00052 #include "LaunchHandlers.h"
00053 #include "CustomizeMenus.h"
00054
00055 #include "umain.h"
00056
00057 #ifdef _DEBUG
00058 #define new DEBUG_NEW
00059 #undef THIS_FILE
00060 static char THIS_FILE[] = __FILE__;
00061 #endif
00062
00064 static const int FILECHANGE_TIMER = 999;
00065
00067 static const int kSpc = 3;
00068
00070 static const int WM_RESETVIEW = WM_APP + 12;
00071
00072 // Persistent values
00073 CPersistentInt gFileViewSort("P_FileViewSort", EntnodeData::kName);
00074 CPersistentBool gFileViewSortAsc("P_FileViewSortAsc", false);
00075 CPersistentInt gFileViewFilterMasksReactionSpeed("P_FileViewFilterMasksReactionSpeed", 60 * 1000);
00076
00077
00082 static void OnFilteringChanged(CObject* obj)
00083 {
00084     ((CBrowseFileView*)obj)->OnFilteringChanged();
00085 }
00086
00091 static void OnFilterBarChanged(CObject* obj)
00092 {
00093     ((CBrowseFileView*)obj)->OnFilterBarChanged();
00094 }
00095
00097 // CRecursionLock
00098
00099 CRecursionLock::CRecursionLock(bool& semaphore)
00100     : m_semaphore(semaphore)
00101 {
00102     m_semaphore = true;
00103 }
00104
00105 CRecursionLock::~CRecursionLock()
00106 {
00107     m_semaphore = false;
00108 }
00109
00111 // KoFileViewTraversalContext
00112
00113 KoFileViewTraversalContext::KoFileViewTraversalContext(CBrowseFileView* view)
00114     : m_view(view), m_filter(NULL), m_isRecursive(false), m_isShowIgnored(false)
00115 {
00116     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
00117     {
00118         m_filter = app->GetFilterModel();
00119         m_isRecursive = app->GetRecursionModel()->IsShowRecursive();
00120         m_isShowIgnored = app->GetIgnoreModel()->IsShowIgnored();
00121     }
00122 }
00123
00125 bool KoFileViewTraversalContext::IsRecursive() const
00126 {
00127     return m_isRecursive;
00128 }
00129
00131 bool KoFileViewTraversalContext::IsShowIgnored() const
00132 {
00133     return m_isShowIgnored;
00134 }
00135
00137 bool KoFileViewTraversalContext::IsShowUnknown() const
00138 {
00139     return (m_filter->GetFilters() & kFilterUnknown) != 0;
00140 }
00141
00143 bool KoFileViewTraversalContext::IsHideUnknown() const
00144 {
00145     return (m_filter->GetFilters() & kFilterHideUnknown) != 0;
00146 }
00147
00149 bool KoFileViewTraversalContext::IsShowMissing() const
00150 {
00151     return (m_filter->GetFilters() & kFilterMissing) != 0;
00152 }
00153
00155 bool KoFileViewTraversalContext::IsShowModified() const
00156 {
00157     return (m_filter->GetFilters() & kFilterModified) != 0;
00158 }
00159
00161 CBrowseFileView* KoFileViewTraversalContext::GetView() const
00162 {
00163     return m_view;
00164 }
00165
00171 bool KoFileViewTraversalContext::IsMatch(EntnodeData* data) const
00172 {
00173     return m_filter->IsMatch(data);
00174 }
00175
00177 // TViewFill
00178
00179 TViewFill::TViewFill(const KoFileViewTraversalContext* context)
00180     : m_context(context), m_entries(1000, ENTNODE::Compare)
00181 {
00182 }
00183
00184 kTraversal TViewFill::EnterDirectory(const char* fullpath, const char* dirname, const FSSpec* macspec)
00185 {
00186     Entries_Open(m_entries, fullpath);
00187     BuildIgnoredList(m_ignlist, fullpath);
00188     return kContinueTraversal;
00189 }
00190
00191 kTraversal TViewFill::ExitDirectory(const char* fullpath)
00192 {
00193     // Add the missing files
00194     Entries_SetMissing(m_entries);
00195
00196     const int numEntries = m_entries.NumOfElements();
00197
00198     for(int i = 0; i < numEntries; i++)
00199     {
00200         const ENTNODE& theNode = m_entries.Get(i);
00201         EntnodeData* data = theNode.Data();
00202
00203         if( data->IsMissing() && m_context->IsMatch(data) )
00204         {
00205             if( !m_context->IsRecursive() || data->GetType() == ENT_FILE )
00206             {
00207                 const int iImage = data->GetType() == ENT_FILE ?
00208                     (data->IsRemoved() ? kFileIconRemoved : kFileIconMiss) : kFolderIconMiss;
00209
00210                 InitItem(data, iImage);
00211             }
00212         }
00213     }
00214
00215     m_ignlist.clear();
00216
00217     return kContinueTraversal;
00218 }
00219
00227 int TViewFill::InitItem(EntnodeData* data, int iImage, const char* tag /*= 0L*/)
00228 {
00229     CListCtrl& listCtrl = m_context->GetView()->GetListCtrl();
00230     KoColumnContext context(m_context->GetView()->GetPath());
00231
00232     TCHAR buf[256];
00233     m_context->GetView()->GetColumnModel()->GetAt(0)->GetText(&context, data, buf, 256);
00234
00235     LV_ITEM lvi;
00236     lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
00237     lvi.iItem = listCtrl.GetItemCount();
00238     lvi.iSubItem = 0;
00239     lvi.pszText = buf;
00240     lvi.iImage = iImage;
00241     lvi.lParam = (LPARAM)(LPVOID)data;
00242
00243     const int pos = listCtrl.InsertItem(&lvi);
00244     if( pos >= 0 )
00245     {
00246         // Note ownership addition
00247         data->Ref();
00248
00249         // Set item text for additional columns
00250         KiColumnModel* model = m_context->GetView()->GetColumnModel();
00251         int columnCount = model->GetCount();
00252
00253         for(int j = 1; j < columnCount; j++)
00254         {
00255             model->GetAt(j)->GetText(&context, data, buf, 256);
00256             listCtrl.SetItemText(pos, j, buf);
00257         }
00258
00259         if( tag != 0L && tag[0] != '\0' && !m_context->IsRecursive() )
00260         {
00261             listCtrl.SetItemText(pos, EntnodeFile::kTag, tag);
00262         }
00263     }
00264
00265     return pos;
00266 }
00267
00268 kTraversal TViewFill::OnError(const char* err, int errcode)
00269 {
00270     return kTraversalError;
00271 }
00272
00273 kTraversal TViewFill::OnIdle(const char* fullpath)
00274 {
00275     // Allow to stop traversing using the escape key
00276     SHORT escState = GetAsyncKeyState(VK_ESCAPE);
00277     if( escState & 0x8000 )
00278     {
00279         return kStopTraversal;
00280     }
00281
00282     return kContinueTraversal;
00283 }
00284
00285 kTraversal TViewFill::OnDirectory(const char* fullpath, const char* fullname, const char* name,
00286                                   const struct stat& dir, const FSSpec* macspec)
00287 {
00288     if( stricmp(name, "CVS") == 0 )
00289         return kSkipFile;
00290
00291     EntnodeData* data = Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00292
00293     if( m_context->IsRecursive() )
00294     {
00295         if( (!data->IsIgnored() || m_context->IsShowIgnored()) && !data->IsMissing() )
00296         {
00297             TViewFill traverse(m_context);
00298             FileTraverse(fullname, traverse);
00299         }
00300
00301         return kSkipFile;
00302     }
00303
00304     if( data->IsIgnored() )
00305     {
00306         // Ignore ignored
00307         if( !m_context->IsShowIgnored() )
00308         {
00309             return kSkipFile;
00310         }
00311     }
00312     else if( data->IsUnknown() )
00313     {
00314         // Hide unknown
00315         if( m_context->IsHideUnknown() )
00316         {
00317             return kSkipFile;
00318         }
00319     }
00320
00321     if( m_context->IsShowModified() )
00322     {
00323         // Hide folders unless some of the matching show filters are set
00324         if( !(data->IsIgnored() && m_context->IsShowIgnored() || data->IsUnknown() && m_context->IsShowUnknown()) )
00325         {
00326             return kSkipFile;
00327         }
00328     }
00329
00330     if( m_context->IsShowMissing() && !data->IsMissing() )
00331     {
00332         // Show only missing unless any matching show filters are set
00333         if( !(data->IsIgnored() && m_context->IsShowIgnored() || data->IsUnknown() && m_context->IsShowUnknown()) )
00334         {
00335             return kSkipFile;
00336         }
00337     }
00338
00339     if( !data->IsUnknown() && m_context->IsShowUnknown() )
00340     {
00341         // Don't show CVS files if show unknown is set
00342         return kSkipFile;
00343     }
00344
00345     // Get the tag
00346     CStr subCVS;
00347     CStr tagName;
00348     subCVS = fullname;
00349     if( !subCVS.endsWith(kPathDelimiter) )
00350         subCVS << kPathDelimiter;
00351
00352     subCVS << "CVS";
00353
00354     Tag_Open(tagName, subCVS);
00355
00356     InitItem(data, CBrowseFileView::GetImageForEntry(data), tagName);
00357
00358     return kSkipFile;
00359 }
00360
00361 kTraversal TViewFill::OnAlias(const char* fullpath, const char* fullname, const char* name,
00362                               const struct stat& dir, const FSSpec* macspec)
00363 {
00364     return OnFile(fullpath, fullname, name, dir, macspec);
00365 }
00366
00367 kTraversal TViewFill::OnFile(const char* fullpath, const char* fullname, const char* name,
00368                           const struct stat& dir, const FSSpec* macspec)
00369 {
00370     EntnodeData* data = Entries_SetVisited(fullpath, m_entries, name, dir, false, &m_ignlist);
00371     if( !m_context->IsShowIgnored() && data->IsIgnored() )
00372         return kContinueTraversal;
00373
00374     if( m_context->IsMatch(data) )
00375     {
00376         int pos = InitItem(data, CBrowseFileView::GetImageForEntry(data));
00377         if( pos >=  0 )
00378         {
00379             UINT state = data->IsLocked() ? INDEXTOSTATEIMAGEMASK(2) : INDEXTOSTATEIMAGEMASK(1);
00380             CListCtrl& listCtrl = m_context->GetView()->GetListCtrl();
00381             listCtrl.SetItemState(pos, state, LVIS_STATEIMAGEMASK);
00382         }
00383     }
00384
00385     return kContinueTraversal;
00386 }
00387
00388
00390 // CBrowseFileView
00391
00392 CImageList CBrowseFileView::m_smallImageList;
00393 CImageList CBrowseFileView::m_stateImageList;
00394
00395 IMPLEMENT_DYNCREATE(CBrowseFileView, CListView)
00396
00397 BEGIN_MESSAGE_MAP(CBrowseFileView, CListView)
00398     //{{AFX_MSG_MAP(CBrowseFileView)
00399     ON_COMMAND(ID_VIEW_SMALLICONS, OnViewSmallIcons)
00400     ON_COMMAND(ID_VIEW_FULLLIST, OnViewList)
00401     ON_COMMAND(ID_VIEW_ROWDETAILS, OnViewFullRowDetails)
00402     ON_UPDATE_COMMAND_UI(ID_VIEW_SMALLICONS, OnUpdateViewSmallIcons)
00403     ON_UPDATE_COMMAND_UI(ID_VIEW_ADD, OnUpdateViewAdd)
00404     ON_UPDATE_COMMAND_UI(ID_VIEW_ADDB, OnUpdateViewAddB)
00405     ON_UPDATE_COMMAND_UI(ID_VIEW_COMMIT, OnUpdateViewUpdate)
00406     ON_UPDATE_COMMAND_UI(ID_VIEW_RELEASE, OnUpdateViewRelease)
00407     ON_UPDATE_COMMAND_UI(ID_VIEW_RMV, OnUpdateViewRmv)
00408     ON_UPDATE_COMMAND_UI(ID_VIEW_GRAPH, OnUpdateViewGraph)
00409     ON_UPDATE_COMMAND_UI(ID_VIEW_FULLLIST, OnUpdateViewList)
00410     ON_UPDATE_COMMAND_UI(ID_VIEW_EDITSELDEF, OnUpdateViewEditseldef)
00411     ON_UPDATE_COMMAND_UI(ID_VIEW_ROWDETAILS, OnUpdateViewFullRowDetails)
00412     ON_WM_LBUTTONDBLCLK()
00413     ON_NOTIFY_REFLECT(LVN_COLUMNCLICK, OnColumnclick)
00414     ON_COMMAND(ID_VIEW_ADD, OnViewAdd)
00415     ON_COMMAND(ID_VIEW_ADDB, OnViewAddb)
00416     ON_COMMAND(ID_VIEW_COMMIT, OnViewCommit)
00417     ON_COMMAND(ID_VIEW_RMV, OnViewRmv)
00418     ON_COMMAND(ID_VIEW_UPDATE, OnViewUpdate)
00419     ON_COMMAND(ID_VIEW_QUERYUPDATE, OnViewQueryUpdate)
00420     ON_UPDATE_COMMAND_UI(ID_VIEW_RELOAD, OnUpdateViewReload)
00421     ON_COMMAND(ID_VIEW_RELOAD, OnViewReload)
00422     ON_NOTIFY_REFLECT(LVN_KEYDOWN, OnKeydown)
00423     ON_COMMAND(ID_VIEW_UPONE, OnViewUpone)
00424     ON_UPDATE_COMMAND_UI(ID_VIEW_UPONE, OnUpdateViewUpone)
00425     ON_COMMAND(ID_VIEW_TRASH, OnViewTrash)
00426     ON_UPDATE_COMMAND_UI(ID_VIEW_TRASH, OnUpdateViewTrash)
00427     ON_COMMAND(ID_VIEW_DIFF, OnViewDiff)
00428     ON_COMMAND(ID_VIEW_LOG, OnViewLog)
00429     ON_COMMAND(ID_VIEW_GRAPH, OnViewGraph)
00430     ON_COMMAND(ID_VIEW_STATUS, OnViewStatus)
00431     ON_COMMAND(ID_VIEW_UNLOCKF, OnViewUnlock)
00432     ON_COMMAND(ID_VIEW_WATCHON, OnViewWatchOn)
00433     ON_COMMAND(ID_VIEW_WATCHOFF, OnViewWatchOff)
00434     ON_COMMAND(ID_VIEW_EDIT, OnViewEdit)
00435     ON_COMMAND(ID_VIEW_UNEDIT, OnViewUnedit)
00436     ON_COMMAND(ID_VIEW_WATCHERS, OnViewWatchers)
00437     ON_COMMAND(ID_VIEW_EDITORS, OnViewEditors)
00438     ON_COMMAND(ID_VIEW_RELEASE, OnViewRelease)
00439     ON_COMMAND(ID_VIEW_TAGNEW, OnViewTagNew)
00440     ON_COMMAND(ID_VIEW_TAGDELETE, OnViewTagDelete)
00441     ON_COMMAND(ID_VIEW_TAGBRANCH, OnViewTagBranch)
00442     ON_COMMAND(ID_VIEW_EXPLORE, OnViewExplore)
00443     ON_UPDATE_COMMAND_UI(ID_VIEW_EXPLORE, OnUpdateViewExplore)
00444     ON_COMMAND(ID_VIEW_NEWINSTANCE, OnViewNewInstance)
00445     ON_UPDATE_COMMAND_UI(ID_VIEW_NEWINSTANCE, OnUpdateViewExplore)
00446     ON_WM_TIMER()
00447     ON_COMMAND(ID_VIEW_EDITSEL, OnViewEditsel)
00448     ON_COMMAND(ID_VIEW_EDITSELDEF, OnViewEditseldef)
00449     ON_COMMAND(ID_VIEW_OPENSEL, OnViewOpensel)
00450     ON_COMMAND(ID_VIEW_OPENSELAS, OnViewOpenselas)
00451     ON_COMMAND(ID_VIEW_CHECKOUT, OnViewCheckout)
00452     ON_UPDATE_COMMAND_UI(ID_VIEW_CHECKOUT, OnUpdateViewCheckout)
00453     ON_COMMAND(ID_VIEW_IMPORT, OnViewImport)
00454     ON_UPDATE_COMMAND_UI(ID_VIEW_IMPORT, OnUpdateViewImport)
00455     ON_NOTIFY_REFLECT(LVN_BEGINDRAG, OnBegindrag)
00456     ON_NOTIFY_REFLECT(LVN_BEGINRDRAG, OnBeginrdrag)
00457     ON_WM_SETCURSOR()
00458     ON_NOTIFY_REFLECT(LVN_DELETEITEM, OnDeleteitem)
00459     ON_WM_DESTROY()
00460     ON_UPDATE_COMMAND_UI(ID_QUERY_ANNOTATE, OnUpdateViewAnnotate)
00461     ON_COMMAND(ID_QUERY_ANNOTATE, OnAnnotate)
00462     ON_COMMAND(ID_EDIT_SELECT_ALL, OnEditSelectAll)
00463     ON_COMMAND(ID_VIEW_RESERVEDEDIT, OnViewReservededit)
00464     ON_COMMAND(ID_VIEW_FORCEEDIT, OnViewForceedit)
00465     ON_COMMAND(ID_VIEW_ADDU, OnViewAddu)
00466     ON_COMMAND(ID_APP_CMDLINE, OnAppCmdline)
00467     ON_UPDATE_COMMAND_UI(ID_APP_CMDLINE, OnUpdateCvsCmd)
00468     ON_COMMAND(ID_APP_RTAGBRANCH, OnAppRtagbranch)
00469     ON_COMMAND(ID_APP_RTAGCREATE, OnAppRtagcreate)
00470     ON_COMMAND(ID_APP_RTAGDELETE, OnAppRtagdelete)
00471     ON_WM_CONTEXTMENU()
00472     ON_COMMAND(ID_VIEW_FILTERBAR_ENABLE, OnViewFilterbarEnable)
00473     ON_COMMAND(ID_VIEW_FILTERBAR_CLEARALL, OnViewFilterbarClearall)
00474     ON_COMMAND(ID_VIEW_FILTERBAR_OPTIONS, OnViewFilterbarOptions)
00475     ON_NOTIFY_REFLECT(LVN_ITEMCHANGED, OnItemchanged)
00476     ON_NOTIFY_REFLECT(LVN_DELETEALLITEMS, OnDeleteallitems)
00477     ON_COMMAND(ID_QUERY_SHELLACTION_DEFAULT, OnQueryShellactionDefault)
00478     ON_UPDATE_COMMAND_UI(ID_VIEW_ADDU, OnUpdateViewAddB)
00479     ON_UPDATE_COMMAND_UI(ID_VIEW_DIFF, OnUpdateViewUpdate)
00480     ON_UPDATE_COMMAND_UI(ID_VIEW_EDIT, OnUpdateViewUpdate)
00481     ON_UPDATE_COMMAND_UI(ID_VIEW_RESERVEDEDIT, OnUpdateViewUpdate)
00482     ON_UPDATE_COMMAND_UI(ID_VIEW_FORCEEDIT, OnUpdateViewUpdate)
00483     ON_UPDATE_COMMAND_UI(ID_VIEW_EDITORS, OnUpdateViewUpdate)
00484     ON_UPDATE_COMMAND_UI(ID_VIEW_LOG, OnUpdateViewUpdate)
00485     ON_UPDATE_COMMAND_UI(ID_VIEW_TAGNEW, OnUpdateViewUpdate)
00486     ON_UPDATE_COMMAND_UI(ID_VIEW_TAGDELETE, OnUpdateViewUpdate)
00487     ON_UPDATE_COMMAND_UI(ID_VIEW_TAGBRANCH, OnUpdateViewUpdate)
00488     ON_UPDATE_COMMAND_UI(ID_VIEW_STATUS, OnUpdateViewUpdate)
00489     ON_UPDATE_COMMAND_UI(ID_VIEW_UNEDIT, OnUpdateViewUpdate)
00490     ON_UPDATE_COMMAND_UI(ID_VIEW_UPDATE, OnUpdateViewUpdate)
00491     ON_UPDATE_COMMAND_UI(ID_VIEW_QUERYUPDATE, OnUpdateViewUpdate)
00492     ON_UPDATE_COMMAND_UI(ID_VIEW_UNLOCKF, OnUpdateViewUpdate)
00493     ON_UPDATE_COMMAND_UI(ID_VIEW_WATCHERS, OnUpdateViewUpdate)
00494     ON_UPDATE_COMMAND_UI(ID_VIEW_WATCHON, OnUpdateViewUpdate)
00495     ON_UPDATE_COMMAND_UI(ID_VIEW_WATCHOFF, OnUpdateViewUpdate)
00496     ON_UPDATE_COMMAND_UI(ID_VIEW_EDITSEL, OnUpdateViewTrash)
00497     ON_UPDATE_COMMAND_UI(ID_VIEW_OPENSEL, OnUpdateViewTrash)
00498     ON_UPDATE_COMMAND_UI(ID_VIEW_OPENSELAS, OnUpdateViewTrash)
00499     ON_UPDATE_COMMAND_UI(ID_APP_RTAGBRANCH, OnUpdateCvsCmd)
00500     ON_UPDATE_COMMAND_UI(ID_APP_RTAGCREATE, OnUpdateCvsCmd)
00501     ON_UPDATE_COMMAND_UI(ID_APP_RTAGDELETE, OnUpdateCvsCmd)
00502     ON_UPDATE_COMMAND_UI(ID_QUERY_SHELLACTION_DEFAULT, OnUpdateViewTrash)
00503     ON_COMMAND(ID_QUERY_PROPERTIES, OnQueryProperties)
00504     ON_UPDATE_COMMAND_UI(ID_QUERY_PROPERTIES, OnUpdateQueryProperties)
00505     //}}AFX_MSG_MAP
00506     ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
00507     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
00508     ON_UPDATE_COMMAND_UI_RANGE(ID_MACRO_START, ID_MACRO_END, OnUpdateMacro)
00509     ON_COMMAND_EX_RANGE(ID_MACRO_START, ID_MACRO_END, OnMacro)
00510     ON_UPDATE_COMMAND_UI_RANGE(ID_CUST_FILES_MENU, ID_CUST_FOLDER_MENU, OnUpdateCustomize)
00511     ON_COMMAND_EX_RANGE(ID_CUST_FILES_MENU, ID_CUST_FOLDER_MENU, OnCustomize)
00512     ON_MESSAGE(KoWatcher::WM_FILECHANGE, OnFileChange)
00513     ON_MESSAGE(WM_RESETVIEW, OnResetView)
00514 END_MESSAGE_MAP()
00515
00517 // CBrowseFileView construction/destruction
00518
00519 CBrowseFileView::CBrowseFileView()
00520     : m_checkChanges(false), m_watch(NULL), m_isResetViewLocked(false), m_isFilesChange(false),
00521     m_isResetViewPending(false), m_uiFilechangeTimer(0)
00522 {
00523     m_sort = (int)gFileViewSort;
00524
00525     SetRecursive(false);
00526
00527     m_ascendant = (bool)gFileViewSortAsc;
00528     m_entriesMod = 0;
00529     m_entriesLogMod = 0;
00530 }
00531
00532 CBrowseFileView::~CBrowseFileView()
00533 {
00534     gFileViewSortAsc = m_ascendant;
00535     gFileViewSort = m_sort;
00536 }
00537
00539 BOOL CBrowseFileView::PreCreateWindow(CREATESTRUCT& cs)
00540 {
00541     cs.style |= WS_TABSTOP | LVS_SHOWSELALWAYS | LVS_REPORT;
00542     cs.dwExStyle |= LVS_EX_FULLROWSELECT;
00543
00544     return CListView::PreCreateWindow(cs);
00545 }
00546
00552 int CBrowseFileView::GetImageForEntry(EntnodeData* data)
00553 {
00554     int result = -1;
00555
00556     if( data->GetType() == ENT_FILE )
00557     {
00558         const char* info = 0L;
00559         if( data->IsIgnored() )
00560         {
00561             result = kFileIconIgnored;
00562         }
00563         else if( data->IsUnknown() )
00564         {
00565             result = kFileIconUnknown;
00566         }
00567         else if( data->GetConflict() != 0L )
00568         {
00569             result = kFileIconConflict;
00570         }
00571         else if( data->IsRemoved() )
00572         {
00573             result = kFileIconRemoved;
00574         }
00575         else if( (info = (*data)[EntnodeFile::kOption]) != 0L && (strcmp(info, "-kb") == 0 || strcmp(info, "-kB") == 0) )
00576         {
00577             const char* vn = (*data)[EntnodeFile::kVN];
00578             bool isAdded = vn && (strcmp(vn, "0") == 0);
00579
00580             result = data->IsUnmodified() ? kFileIconBinary :
00581                 isAdded ? kFileIconBinaryAdded : kFileIconBinaryMod;
00582         }
00583         else if( (info = (*data)[EntnodeFile::kOption]) != 0L && strcmp(info, "-ku") == 0 )
00584         {
00585             const char* vn = (*data)[EntnodeFile::kVN];
00586             bool isAdded = vn && (strcmp(vn, "0") == 0);
00587
00588             result = data->IsUnmodified() ? kFileIconUnicode :
00589                 isAdded ? kFileIconUnicodeAdded : kFileIconUnicodeMod;
00590         }
00591         else
00592         {
00593             const char* vn = (*data)[EntnodeFile::kVN];
00594             bool isAdded = vn && (strcmp(vn, "0") == 0);
00595
00596             result = data->IsUnmodified() ? kFileIconText :
00597                 isAdded ? kFileIconAdded : kFileIconTextMod;
00598         }
00599     }
00600     else
00601     {
00602         if( data->IsIgnored() )
00603         {
00604             result = kFolderIconIgnored;
00605         }
00606         else if( data->IsUnknown() )
00607         {
00608             result = kFolderIconUnknown;
00609         }
00610         else
00611         {
00612             result = kFolderIcon;
00613         }
00614     }
00615
00616     return result;
00617 }
00618
00623 void CBrowseFileView::SetRecursive(bool isRecursive)
00624 {
00625     m_isRecursive = isRecursive;
00626     m_modelColumns = m_isRecursive ? KiColumnModel::GetRecursiveModel() : KiColumnModel::GetRegularModel();
00627 }
00628
00630 void CBrowseFileView::OnInitialUpdate()
00631 {
00632     CListView::OnInitialUpdate();
00633
00634     CListCtrl& ListCtrl = GetListCtrl();
00635
00636     // Replace standard header with sort header
00637     if( HWND hWnd = ListView_GetHeader(ListCtrl.m_hWnd) )
00638     {
00639         m_ctrlHeader.SubclassWindow(hWnd);
00640
00641         CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
00642         if( pMainFrame->GetSafeHwnd() )
00643         {
00644             m_ctrlHeader.EnableHeaderFilters(pMainFrame->IsFilterMasksEnable());
00645             m_ctrlHeader.SetFilterChangeTimeout(gFileViewFilterMasksReactionSpeed);
00646         }
00647
00648         m_ctrlHeader.GetNotificationManager()->CheckIn(this, ::OnFilterBarChanged);
00649     }
00650
00651     SetListCtrlExtendedStyle(&ListCtrl, LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP | LVS_EX_LABELTIP);
00652
00653     // Set image lists
00654     if( !m_smallImageList.m_hImageList )
00655         m_smallImageList.Create(IDB_SMALLICONS, 16, 1, RGB(255, 255, 255));
00656
00657     if( !m_stateImageList.m_hImageList )
00658         m_stateImageList.Create(IDR_STATEICONS, 16, 1, RGB(255, 0, 0));
00659
00660     ListCtrl.SetImageList(&m_smallImageList, LVSIL_SMALL);
00661     ListCtrl.SetImageList(&m_stateImageList, LVSIL_STATE);
00662
00663     KoFileViewTraversalContext context(this);
00664     SetRecursive(context.IsRecursive());
00665
00666     AddColumns();
00667
00668     LoadColumns(context.IsRecursive());
00669
00670     // Register for notifications on filter change
00671     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
00672     {
00673         app->GetFilterModel()->GetNotificationManager()->CheckIn(this, ::OnFilteringChanged);
00674         app->GetRecursionModel()->GetNotificationManager()->CheckIn(this, ::OnFilteringChanged);
00675         app->GetIgnoreModel()->GetNotificationManager()->CheckIn(this, ::OnFilteringChanged);
00676     }
00677
00678     m_uiFilechangeTimer = SetTimer(FILECHANGE_TIMER, 200, 0L);
00679     if( 0L == m_uiFilechangeTimer )
00680     {
00681         cvs_err("Can't start the file change notification timer.\n");
00682     }
00683 }
00684
00688 void CBrowseFileView::AddColumns()
00689 {
00690     KiColumnModel* model = GetColumnModel();
00691     const int columnCount = model->GetCount();
00692     CListCtrl& listCtrl = GetListCtrl();
00693
00694     // Add columns
00695     for(int i = 0; i < columnCount; i++)
00696     {
00697         LV_COLUMN lvc;
00698
00699         model->GetAt(i)->GetSetupData(&lvc);
00700         lvc.iSubItem = i;
00701         lvc.mask |= LVCF_SUBITEM;
00702         listCtrl.InsertColumn(i,&lvc);
00703     }
00704 }
00705
00709 void CBrowseFileView::DeleteColumns()
00710 {
00711     // Clear the filters
00712     if( m_ctrlHeader.GetSafeHwnd() )
00713     {
00714         Header_ClearAllFilters(m_ctrlHeader.GetSafeHwnd());
00715
00716         CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
00717         if( pMainFrame->GetSafeHwnd() )
00718         {
00719             pMainFrame->SetFilterBarMask(m_ctrlHeader, GetColumnModel());
00720         }
00721     }
00722
00723     CListCtrl& listCtrl = GetListCtrl();
00724     const int nCount = listCtrl.GetHeaderCtrl()->GetItemCount();
00725
00726     // Delete columns
00727     for(int nIndex = 0; nIndex < nCount; nIndex++)
00728     {
00729         listCtrl.DeleteColumn(0);
00730     }
00731 }
00732
00738 void CBrowseFileView::GetEntriesModTime(time_t& newEntriesMod,  time_t& newEntriesLogMod)
00739 {
00740     CStr entriesPath(m_path.c_str());
00741
00742     if( !entriesPath.endsWith(kPathDelimiter) )
00743         entriesPath << kPathDelimiter;
00744
00745     entriesPath << "CVS";
00746     entriesPath << kPathDelimiter;
00747     entriesPath << "Entries";
00748
00749     struct stat sb;
00750     if( stat(entriesPath, &sb) != -1 )
00751         newEntriesMod = sb.st_mtime;
00752
00753     entriesPath << ".log";
00754
00755     if( stat(entriesPath, &sb) != -1 )
00756         newEntriesLogMod = sb.st_mtime;
00757 }
00758
00765 void CBrowseFileView::ResetView(bool notifyBrowser /*= false*/, const char* selectFile /*= 0L*/)
00766 {
00767     // No outstanding request to reset the view any more
00768     m_isResetViewPending = false;
00769
00770     if( m_isResetViewLocked )
00771     {
00772         // No recursion
00773         return;
00774     }
00775
00776     CRecursionLock recursionLock(m_isResetViewLocked);
00777
00778     CWndRedrawMngr redrawMngr(this);
00779
00780     // Reset dirty indicators
00781     m_isFilesChange = false;
00782     m_entriesMod = 0;
00783     m_entriesLogMod = 0;
00784
00785     GetEntriesModTime(m_entriesMod, m_entriesLogMod);
00786
00787     CWaitCursor doWait;
00788
00789     bool bPartialOK = true;
00790
00791     CListCtrl& ListCtrl = GetListCtrl();
00792
00793     // Get the selection to later try to restore it
00794     CvsArgs selection(false);
00795
00796     if( !selectFile )
00797     {
00798         int nItem = -1;
00799         UStr buf;
00800
00801         while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
00802         {
00803             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
00804             selection.add(data->GetFullPathName(buf));
00805         }
00806     }
00807
00808     // Delete all items
00809     VERIFY(ListCtrl.DeleteAllItems());
00810
00811     // Make sure columns are preserved after the flat/recursive mode switch
00812     KoFileViewTraversalContext context(this);
00813     if( (context.IsRecursive() && !m_isRecursive) || (!context.IsRecursive() && m_isRecursive) )
00814     {
00815         KiColumnModel* oldModel = GetColumnModel();
00816         const int oldCount = oldModel->GetCount();
00817
00818         // Preserve the sort column
00819         const KiColumn* oldColumn = (0 <= m_sort && m_sort < oldCount) ? oldModel->GetAt(m_sort) : NULL;
00820
00821         // Preserve any filter bar text
00822         for(int nIndex = 0; nIndex < oldCount; nIndex++)
00823         {
00824             const std::string filterText = m_ctrlHeader.GetFilterText(nIndex);
00825             const int filterType = oldModel->GetType(nIndex);
00826
00827             if( m_filterBarFilters.find(filterType) != m_filterBarFilters.end() )
00828             {
00829                 m_filterBarFilters.erase(filterType);
00830             }
00831
00832             if( !filterText.empty() )
00833             {
00834                 m_filterBarFilters.insert(std::make_pair(filterType, filterText));
00835             }
00836         }
00837
00838         // Save and delete columns
00839         SaveColumns(m_isRecursive);
00840         DeleteColumns();
00841
00842         // Add and load new columns
00843         SetRecursive(context.IsRecursive());
00844
00845         AddColumns();
00846         LoadColumns(m_isRecursive);
00847
00848         // Set the sort mark
00849         if( oldColumn == NULL )
00850         {
00851             m_sort = 0;
00852         }
00853         else
00854         {
00855             KiColumnModel* newModel = GetColumnModel();
00856             const int newCount = newModel->GetCount();
00857             int sort = -1;
00858
00859             for(int pos = 0; pos < newCount && sort == -1; pos++)
00860             {
00861                 if( newModel->GetAt(pos) == oldColumn )
00862                 {
00863                     sort = pos;
00864                     break;
00865                 }
00866             }
00867
00868             m_sort = (sort >= 0) ? sort : 0;
00869         }
00870
00871         // Set any preserved filter bar text
00872         if( !m_filterBarFilters.empty() )
00873         {
00874             KiColumnModel* newModel = GetColumnModel();
00875             const int newCount = newModel->GetCount();
00876
00877             for(std::map<int, std::string>::const_iterator i = m_filterBarFilters.begin(); i != m_filterBarFilters.end(); ++i)
00878             {
00879                 const int filterType = (*i).first;
00880
00881                 for(int pos = 0; pos < newCount; pos++)
00882                 {
00883                     if( filterType == newModel->GetType(pos) )
00884                     {
00885                         m_ctrlHeader.SetFilterText(pos, (*i).second.c_str());
00886                         break;
00887                     }
00888                 }
00889             }
00890
00891             CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
00892             if( pMainFrame->GetSafeHwnd() )
00893             {
00894                 pMainFrame->SetFilterBarMask(m_ctrlHeader, GetColumnModel());
00895             }
00896         }
00897     }
00898
00899     // Re-fetch all items
00900     TViewFill traverse(&context);
00901     kTraversal res = FileTraverse(m_path, traverse);
00902
00903     // Find the file for selection
00904     if( selectFile != 0L )
00905     {
00906         int count = ListCtrl.GetItemCount();
00907         for(int i = 0; i < count; i++)
00908         {
00909             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(i);
00910
00911             // Files only
00912             if( data->GetType() == ENT_SUBDIR )
00913                 continue;
00914
00915             UStr buf;
00916             const char* currentFile = data->GetFullPathName(buf);
00917             if( stricmp(selectFile, currentFile) == 0 )
00918             {
00919                 selection.reset(false); //we don't want any other selection
00920                 selection.add(currentFile);
00921
00922                 bPartialOK = FALSE;
00923                 break;
00924             }
00925         }
00926     }
00927
00928     Resort();
00929
00930     // Now restore the selection
00931     int argc = selection.Argc();
00932     char* const* argv = selection.Argv();
00933     bool isFirst = true;
00934     bool focusSet = false;
00935     int count = ListCtrl.GetItemCount();
00936
00937     // If there are no selections, then skip the looping
00938     if( argc )
00939     {
00940         for(int nItem = 0; nItem < count; nItem++)
00941         {
00942             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
00943
00944             UStr buf;
00945             const char* currentFile = data->GetFullPathName(buf);
00946
00947             for(int i = 0; i < argc; i++)
00948             {
00949                 const char* fn = argv[i];
00950                 if( stricmp(fn, currentFile) == 0 )
00951                 {
00952                     VERIFY(ListCtrl.SetItemState(nItem, LVIS_SELECTED, LVIS_SELECTED));
00953                     if( isFirst )
00954                     {
00955                         isFirst = false;
00956                         if( !bPartialOK )
00957                         {
00958                             // Move to the bottom first, so the selection will be on top
00959                             ListCtrl.EnsureVisible(ListCtrl.GetItemCount()-1 , bPartialOK);
00960                         }
00961
00962                         // Make sure the first selected file is visible
00963                         VERIFY(ListCtrl.EnsureVisible(nItem, bPartialOK/*TRUE*/));
00964                         VERIFY(focusSet = (ListCtrl.SetItemState(nItem, LVIS_FOCUSED, LVIS_FOCUSED) !=0 ));
00965                     }
00966
00967                     break;
00968                 }
00969             }
00970         }
00971     }
00972
00973     if( !focusSet && ListCtrl.GetItemCount() )
00974     {
00975         VERIFY(focusSet = (ListCtrl.SetItemState(0, LVIS_FOCUSED, LVIS_FOCUSED) !=0 ));
00976     }
00977
00978     if( notifyBrowser )
00979     {
00980         // Notify the tree
00981         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00982         if( app )
00983         {
00984             app->GetBrowserView()->ResetView(true);
00985         }
00986     }
00987
00988     // Start monitoring file changes
00989     if( !m_watch )
00990     {
00991         m_watch = new KoWatcher(m_hWnd);
00992     }
00993
00994     m_watch->SignalStartWatch(m_path, m_isRecursive);
00995
00996     // FIXME -> temporary fix for PWD problems
00997     chdir(m_path);
00998 }
00999
01006 void CBrowseFileView::ResetView(const char* path, bool notifyBrowser, const char* selectFile)
01007 {
01008     m_path = path;
01009
01010     CWnd* pWnd = AfxGetMainWnd();
01011     if( pWnd )
01012     {
01013         CMainFrame* pMainFrame = (CMainFrame*)pWnd;
01014
01015         if( pMainFrame->GetSafeHwnd() )
01016         {
01017             KoColumnContext context(m_path);
01018
01019             // Update the column context
01020             pMainFrame->SetContext(&context);
01021
01022             // Update the filter bar display
01023             m_ctrlHeader.EnableHeaderFilters(pMainFrame->IsFilterMasksEnable());
01024             m_ctrlHeader.SetFilterChangeTimeout(gFileViewFilterMasksReactionSpeed);
01025
01026             // Update the Status bar
01027             CCvsStatusBar *pStatusBar = (CCvsStatusBar*)pMainFrame->GetStatusBar();
01028             pStatusBar->UpdatePathInfo(path);
01029         }
01030     }
01031
01032     ResetView(false, selectFile);
01033
01034     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01035     if( app )
01036     {
01037         app->GetDocument()->SetTitle(m_path);
01038
01039         if( notifyBrowser )
01040         {
01041             // Notify the dir tree
01042             app->GetBrowserView()->StepToLocation(path);
01043         }
01044     }
01045 }
01046
01048 // CBrowseFileView diagnostics
01049
01050 #ifdef _DEBUG
01051 void CBrowseFileView::AssertValid() const
01052 {
01053     CListView::AssertValid();
01054 }
01055
01056 void CBrowseFileView::Dump(CDumpContext& dc) const
01057 {
01058     CListView::Dump(dc);
01059 }
01060 #endif //_DEBUG
01061
01067 BOOL CBrowseFileView::SetViewType(DWORD dwViewType)
01068 {
01069     return ModifyStyle(LVS_TYPEMASK, dwViewType & LVS_TYPEMASK);
01070 }
01071
01076 DWORD CBrowseFileView::GetViewType() const
01077 {
01078     return GetStyle() & LVS_TYPEMASK;
01079 }
01080
01084 void CBrowseFileView::OnViewSmallIcons()
01085 {
01086     if( GetViewType() != LVS_SMALLICON )
01087         SetViewType(LVS_SMALLICON);
01088 }
01089
01093 void CBrowseFileView::OnViewList()
01094 {
01095     if( GetViewType() != LVS_LIST )
01096         SetViewType(LVS_LIST);
01097 }
01098
01102 void CBrowseFileView::OnViewFullRowDetails()
01103 {
01104     if( GetViewType() != LVS_REPORT )
01105         SetViewType(LVS_REPORT);
01106 }
01107
01109 void CBrowseFileView::OnUpdateViewSmallIcons(CCmdUI* pCmdUI)
01110 {
01111     pCmdUI->SetCheck(GetViewType() == LVS_SMALLICON);
01112 }
01113
01115 void CBrowseFileView::OnUpdateViewList(CCmdUI* pCmdUI)
01116 {
01117     pCmdUI->SetCheck(GetViewType() == LVS_LIST);
01118 }
01119
01121 void CBrowseFileView::OnUpdateViewFullRowDetails(CCmdUI* pCmdUI)
01122 {
01123     pCmdUI->SetCheck(GetViewType() == LVS_REPORT);
01124 }
01125
01130 void CBrowseFileView::EnterFolder(const char* fullpath)
01131 {
01132     struct stat st;
01133     if( stat(fullpath, &st) != 0 && errno == ENOENT )
01134     {
01135         // Assume we're looking at directory previously in CVS,
01136         // but not currently in the file system.
01137         // If we ever run across another case (permissions perhaps)
01138         // then you might want to add code here.
01139         cvs_err("'%s' is not accessible\n", (char*)fullpath);
01140     }
01141     else
01142     {
01143         ResetView(fullpath, true);
01144         gCvsPrefs.SetLastWorkingDir(fullpath);
01145     }
01146 }
01147
01149 void CBrowseFileView::OnLButtonDblClk(UINT nFlags, CPoint point)
01150 {
01151     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01152     if( app->IsCvsRunning() )
01153         return;
01154
01155     CListCtrl& ListCtrl = GetListCtrl();
01156
01157     UINT pFlags;
01158     int nItem = ListCtrl.HitTest(point, &pFlags);
01159     if( nItem != -1 )
01160     {
01161         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01162         if( data->GetType() == ENT_SUBDIR )
01163         {
01164             UStr buf;
01165             EnterFolder(data->GetFullPathName(buf));
01166         }
01167         else
01168         {
01169             KoFileActionHandler handler;
01170             ProcessSelectionCommand(&handler);
01171         }
01172     }
01173
01174     CListView::OnLButtonDblClk(nFlags, point);
01175 }
01176
01182 bool CBrowseFileView::DisableCommon(bool bCheckSelection /*= true*/)
01183 {
01184     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01185     CListCtrl& ListCtrl = GetListCtrl();
01186
01187     const bool bCommon = app->IsCvsRunning();
01188     const bool bSelection = ListCtrl.GetSelectedCount() == 0 || this != CWnd::GetFocus();
01189
01190     return bCheckSelection ? bCommon || bSelection : bCommon;
01191 }
01192
01194 void CBrowseFileView::OnUpdateViewRelease(CCmdUI* pCmdUI)
01195 {
01196     if( DisableCommon() )
01197     {
01198         pCmdUI->Enable(FALSE);
01199         return;
01200     }
01201
01202     CListCtrl& ListCtrl = GetListCtrl();
01203
01204     int nItem = -1;
01205     BOOL res = TRUE;
01206     int numFiles = 0;
01207     int numFolders = 0;
01208
01209     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01210     {
01211         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01212         if( data->IsUnknown() || data->GetType() != ENT_SUBDIR )
01213         {
01214             res = FALSE;
01215             break;
01216         }
01217
01218         numFolders++;
01219
01220         if( numFolders > 1 )
01221         {
01222             res = FALSE;
01223             break;
01224         }
01225     }
01226
01227     pCmdUI->Enable(res);
01228 }
01229
01231 void CBrowseFileView::OnUpdateViewAdd(CCmdUI* pCmdUI)
01232 {
01233     if( DisableCommon() )
01234     {
01235         pCmdUI->Enable(FALSE);
01236         return;
01237     }
01238
01239     CListCtrl& ListCtrl = GetListCtrl();
01240
01241     int nItem = -1;
01242     BOOL res = TRUE;
01243     int numFiles = 0;
01244     int numFolders = 0;
01245
01246     CStr strPath;
01247
01248     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01249     {
01250         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01251         if( !(data->IsUnknown() || (data->IsRemoved() && data->IsMissing())) )
01252         {
01253             res = FALSE;
01254             break;
01255         }
01256
01257         if( data->GetType() == ENT_FILE )
01258         {
01259             numFiles++;
01260
01261             if( strPath.empty() )
01262             {
01263                 strPath = data->GetFolderPath();
01264             }
01265             else
01266             {
01267                 if( strPath != data->GetFolderPath() )
01268                 {
01269                     res = FALSE;
01270                     break;
01271                 }
01272             }
01273         }
01274         else
01275         {
01276             numFolders++;
01277         }
01278
01279         if( (numFiles != 0 && numFolders != 0) || numFolders > 1 )
01280         {
01281             res = FALSE;
01282             break;
01283         }
01284     }
01285
01286     pCmdUI->Enable(res);
01287 }
01288
01290 void CBrowseFileView::OnUpdateViewAddB(CCmdUI* pCmdUI)
01291 {
01292     if( DisableCommon() )
01293     {
01294         pCmdUI->Enable(FALSE);
01295         return;
01296     }
01297
01298     CListCtrl& ListCtrl = GetListCtrl();
01299
01300     int nItem = -1;
01301     BOOL res = TRUE;
01302
01303     CStr strPath;
01304
01305     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01306     {
01307         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01308         if( data->GetType() == ENT_FILE )
01309         {
01310             if( strPath.empty() )
01311             {
01312                 strPath = data->GetFolderPath();
01313             }
01314             else
01315             {
01316                 if( strPath != data->GetFolderPath() )
01317                 {
01318                     res = FALSE;
01319                     break;
01320                 }
01321             }
01322         }
01323         else
01324         {
01325             res = FALSE;
01326             break;
01327         }
01328
01329         if( !(data->IsUnknown() || (data->IsRemoved() && data->IsMissing())) )
01330         {
01331             res = FALSE;
01332             break;
01333         }
01334     }
01335
01336     pCmdUI->Enable(res);
01337 }
01338
01340 void CBrowseFileView::OnUpdateViewUpdate(CCmdUI* pCmdUI)
01341 {
01342     if( DisableCommon() )
01343     {
01344         pCmdUI->Enable(FALSE);
01345         return;
01346     }
01347
01348     CListCtrl& ListCtrl = GetListCtrl();
01349
01350     int nItem = -1;
01351     BOOL res = TRUE;
01352     int numFiles = 0;
01353     int numFolders = 0;
01354
01355     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01356     {
01357         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01358         if( data->IsUnknown() )
01359         {
01360             res = FALSE;
01361             break;
01362         }
01363
01364         if( data->GetType() == ENT_FILE )
01365             numFiles++;
01366         else
01367             numFolders++;
01368
01369         if( (numFiles != 0 && numFolders != 0) || numFolders > 1 )
01370         {
01371             res = FALSE;
01372             break;
01373         }
01374     }
01375
01376     pCmdUI->Enable(res);
01377 }
01378
01380 void CBrowseFileView::OnUpdateViewGraph(CCmdUI* pCmdUI)
01381 {
01382     if( DisableCommon() )
01383     {
01384         pCmdUI->Enable(FALSE);
01385         return;
01386     }
01387
01388     CListCtrl& ListCtrl = GetListCtrl();
01389
01390     int nItem = -1;
01391     BOOL res = TRUE;
01392
01393     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01394     {
01395         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01396         if( data->IsUnknown() || data->GetType() == ENT_SUBDIR )
01397         {
01398             res = FALSE;
01399             break;
01400         }
01401     }
01402
01403     pCmdUI->Enable(res);
01404 }
01405
01407 void CBrowseFileView::OnUpdateViewRmv(CCmdUI* pCmdUI)
01408 {
01409     if( DisableCommon() )
01410     {
01411         pCmdUI->Enable(FALSE);
01412         return;
01413     }
01414
01415     CListCtrl& ListCtrl = GetListCtrl();
01416
01417     int nItem = -1;
01418     BOOL res = TRUE;
01419
01420     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01421     {
01422         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01423         if( data->IsUnknown() || data->IsRemoved() || data->GetType() == ENT_SUBDIR )
01424         {
01425             res = FALSE;
01426             break;
01427         }
01428     }
01429
01430     pCmdUI->Enable(res);
01431 }
01432
01436 void CBrowseFileView::Resort(void)
01437 {
01438     CListCtrl& ListCtrl = GetListCtrl();
01439     KoColumnContext context(GetPath());
01440     KiColumnModel* model = GetColumnModel();
01441
01442     CSortParam sortParam(m_ascendant, true, model->GetAt(m_sort), model->GetAt(0), &context);
01443     m_ctrlHeader.SetSortImage(m_sort, m_ascendant);
01444
01445     ListCtrl.SortItems(_Compare, (LPARAM)&sortParam);
01446 }
01447
01449 void CBrowseFileView::OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult)
01450 {
01451     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01452     CListCtrl& ListCtrl = GetListCtrl();
01453
01454     if( pNMListView->iSubItem == m_sort )
01455     {
01456         m_ascendant = !m_ascendant;
01457     }
01458     else
01459     {
01460         m_ascendant = true;
01461         m_sort = pNMListView->iSubItem;
01462         KiColumnModel* model = GetColumnModel();
01463         m_ascendant = model->GetAt(m_sort)->IsDefaultAscending();
01464     }
01465
01466     Resort();
01467
01468     *pResult = 0;
01469 }
01470
01476 bool CBrowseFileView::ProcessSelectionCommand(KiSelectionHandler* handler)
01477 {
01478     bool res = false;
01479
01480     CListCtrl& ListCtrl = GetListCtrl();
01481     int nItem = -1;
01482     int pathLen = GetPath().length();
01483
01484     MultiFiles mf;
01485
01486     // First add the folders
01487     mf.newdir(GetPath());
01488
01489     // Process selection
01490     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01491     {
01492         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01493         UStr buf;
01494         const char* fullpath = data->GetFullPathName(buf);
01495
01496         if( data->GetType() == ENT_SUBDIR )
01497         {
01498             handler->OnFolder(fullpath);
01499             res = true;
01500
01501             break;
01502         }
01503         else
01504         {
01505             const char* fn = data->GetFullPathName(buf) + pathLen;
01506             if( *fn == '\\' )
01507             {
01508                 fn++;
01509             }
01510
01511             mf.newfile(fn, 0, (*data)[EntnodeFile::kVN]);
01512         }
01513     }
01514
01515     if( mf.TotalNumFiles() != 0 )
01516     {
01517         handler->OnFiles(&mf);
01518         res = true;
01519     }
01520
01521     return res;
01522 }
01523
01525 void CBrowseFileView::OnViewAdd()
01526 {
01527     KoAddHandler handler;
01528     ProcessSelectionCommand(&handler);
01529 }
01530
01532 void CBrowseFileView::OnViewAddb()
01533 {
01534     KoAddBinaryHandler handler;
01535     ProcessSelectionCommand(&handler);
01536 }
01537
01539 void CBrowseFileView::OnViewAddu()
01540 {
01541     KoAddUnicodeHandler handler;
01542     ProcessSelectionCommand(&handler);
01543 }
01544
01546 void CBrowseFileView::OnViewCommit()
01547 {
01548     KoCommitHandler handler;
01549     ProcessSelectionCommand(&handler);
01550 }
01551
01553 void CBrowseFileView::OnViewRmv()
01554 {
01555     KoFileRemoveHandler handler;
01556     ProcessSelectionCommand(&handler);
01557 }
01558
01560 void CBrowseFileView::OnViewUpdate()
01561 {
01562     KoUpdateHandler handler;
01563     ProcessSelectionCommand(&handler);
01564 }
01565
01567 void CBrowseFileView::OnViewQueryUpdate()
01568 {
01569     KoQueryUpdateHandler handler;
01570     ProcessSelectionCommand(&handler);
01571 }
01572
01574 void CBrowseFileView::OnUpdateViewReload(CCmdUI* pCmdUI)
01575 {
01576     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01577     pCmdUI->Enable(!app->IsCvsRunning());
01578 }
01579
01581 void CBrowseFileView::OnViewReload()
01582 {
01583     ResetView(true);
01584 }
01585
01587 void CBrowseFileView::OnKeydown(NMHDR* pNMHDR, LRESULT* pResult)
01588 {
01589     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01590     if( app->IsCvsRunning() )
01591         return;
01592
01593     CListCtrl& ListCtrl = GetListCtrl();
01594     LV_KEYDOWN* pLVKeyDow = (LV_KEYDOWN*)pNMHDR;
01595
01596     if( pLVKeyDow->wVKey == VK_BACK )
01597     {
01598         OnViewUpone();
01599     }
01600     else if( pLVKeyDow->wVKey == VK_RETURN && ListCtrl.GetSelectedCount() == 1 )
01601     {
01602         int nItem = -1;
01603         if( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01604         {
01605             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01606             if( data->GetType() == ENT_SUBDIR )
01607             {
01608                 UStr buf;
01609                 EnterFolder(data->GetFullPathName(buf));
01610             }
01611             else
01612             {
01613                 KoFileActionHandler handler;
01614                 ProcessSelectionCommand(&handler);
01615             }
01616         }
01617     }
01618
01619     *pResult = 0;
01620 }
01621
01628 int CBrowseFileView::GetPathLength(LPCTSTR path)
01629 {
01630     int len = _tcslen(path);
01631     return (len > 0 && path[len - 1] == kPathDelimiter) ? (len - 1) : len;
01632 }
01633
01640 bool CBrowseFileView::IsSamePath(LPCTSTR path1, LPCTSTR path2)
01641 {
01642     int len1 = GetPathLength(path1);
01643     int len2 = GetPathLength(path2);
01644     return len1 == len2 && _tcsicmp(path1, path2) == 0;
01645 }
01646
01648 void CBrowseFileView::OnViewUpone()
01649 {
01650     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01651     if( !IsSamePath(m_path, app->GetRoot()) && chdir(m_path) == 0 && chdir("..") == 0 )
01652     {
01653         char newpath[1024];
01654         getcwd(newpath, 1023);
01655
01656         ResetView(newpath, true);
01657     }
01658     else
01659     {
01660         MessageBeep(MB_ICONHAND);
01661     }
01662 }
01663
01665 void CBrowseFileView::OnUpdateViewUpone(CCmdUI* pCmdUI)
01666 {
01667     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01668     pCmdUI->Enable(!app->IsCvsRunning() && !IsSamePath(m_path, app->GetRoot()));
01669 }
01670
01672 void CBrowseFileView::OnViewTrash()
01673 {
01674     KoMoveToTrashHandler handler;
01675     ProcessSelectionCommand(&handler);
01676 }
01677
01679 void CBrowseFileView::OnUpdateViewTrash(CCmdUI* pCmdUI)
01680 {
01681     bool enabled = !DisableCommon();
01682     if( enabled )
01683     {
01684         KoUpdateMoveToTrashHandler handler;
01685         ProcessSelectionCommand(&handler);
01686         enabled = handler.IsEnabled();
01687     }
01688
01689     pCmdUI->Enable(enabled);
01690 }
01691
01693 void CBrowseFileView::OnViewDiff()
01694 {
01695     KoDiffHandler handler;
01696     ProcessSelectionCommand(&handler);
01697 }
01698
01700 void CBrowseFileView::OnViewLog()
01701 {
01702     KoLogHandler handler;
01703     ProcessSelectionCommand(&handler);
01704 }
01705
01707 void CBrowseFileView::OnViewGraph()
01708 {
01709     KoGraphHandler handler;
01710     ProcessSelectionCommand(&handler);
01711 }
01712
01714 void CBrowseFileView::OnViewStatus()
01715 {
01716     KoStatusHandler handler;
01717     ProcessSelectionCommand(&handler);
01718 }
01719
01721 void CBrowseFileView::OnViewUnlock()
01722 {
01723     KoUnlockHandler handler;
01724     ProcessSelectionCommand(&handler);
01725 }
01726
01728 void CBrowseFileView::OnViewWatchOn()
01729 {
01730     KoWatchOnHandler handler;
01731     ProcessSelectionCommand(&handler);
01732 }
01733
01735 void CBrowseFileView::OnViewWatchOff()
01736 {
01737     KoWatchOffHandler handler;
01738     ProcessSelectionCommand(&handler);
01739 }
01740
01742 void CBrowseFileView::OnViewEdit()
01743 {
01744     KoEditHandler handler;
01745     ProcessSelectionCommand(&handler);
01746 }
01747
01749 void CBrowseFileView::OnViewReservededit()
01750 {
01751     KoReservedEditHandler handler;
01752     ProcessSelectionCommand(&handler);
01753 }
01754
01756 void CBrowseFileView::OnViewForceedit()
01757 {
01758     KoForceEditHandler handler;
01759     ProcessSelectionCommand(&handler);
01760 }
01761
01763 void CBrowseFileView::OnViewUnedit()
01764 {
01765     KoUneditHandler handler;
01766     ProcessSelectionCommand(&handler);
01767 }
01768
01770 void CBrowseFileView::OnViewRelease()
01771 {
01772     KoReleaseHandler handler;
01773     ProcessSelectionCommand(&handler);
01774 }
01775
01777 void CBrowseFileView::OnViewWatchers()
01778 {
01779     KoWatchersHandler handler;
01780     ProcessSelectionCommand(&handler);
01781 }
01782
01784 void CBrowseFileView::OnViewEditors()
01785 {
01786     KoEditorsHandler handler;
01787     ProcessSelectionCommand(&handler);
01788 }
01789
01791 void CBrowseFileView::OnContextMenu(CWnd* pWnd, CPoint point)
01792 {
01793     if( DisableCommon() )
01794     {
01795         return;
01796     }
01797
01798     CListCtrl& listCtrl = GetListCtrl();
01799     if( listCtrl.GetSelectedCount() > 0 )
01800     {
01801         // Try to find a selected and focused item
01802         int item = listCtrl.GetNextItem(-1, LVNI_SELECTED | LVNI_FOCUSED);
01803         if( item == -1 )
01804         {
01805             // Get the first selected item then
01806             item = listCtrl.GetNextItem(-1, LVNI_SELECTED);
01807         }
01808
01809         if( item > -1 )
01810         {
01811             // Set the track point in case it's not the mouse click
01812             if( -1 == point.x && -1 == point.y )
01813             {
01814                 // Get the icon's rectangle
01815                 CRect rectItem;
01816                 if( listCtrl.GetItemRect(item, &rectItem, LVIR_ICON) )
01817                 {
01818                     point = rectItem.CenterPoint();
01819                     ClientToScreen(&point);
01820                 }
01821             }
01822
01823             // Display the pop-up menu
01824             std::auto_ptr<CMenu> pCustomMenu(::GetCustomMenu(kCustomFilesMenu, this));
01825             if( pCustomMenu.get() )
01826             {
01827                 pCustomMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, this);
01828             }
01829         }
01830     }
01831 }
01832
01834 void CBrowseFileView::OnViewTagNew()
01835 {
01836     KoCreateTagHandler handler;
01837     ProcessSelectionCommand(&handler);
01838 }
01839
01841 void CBrowseFileView::OnViewTagDelete()
01842 {
01843     KoDeleteTagHandler handler;
01844     ProcessSelectionCommand(&handler);
01845 }
01846
01848 void CBrowseFileView::OnViewTagBranch()
01849 {
01850     KoBranchTagHandler handler;
01851     ProcessSelectionCommand(&handler);
01852 }
01853
01855 BOOL CBrowseFileView::OnCustomize(UINT nID)
01856 {
01857     CustomizeMenus(nID == ID_CUST_FILES_MENU ? kCustomFilesMenu : kCustomBrowserMenu);
01858     return TRUE;
01859 }
01860
01862 void CBrowseFileView::OnUpdateCustomize(CCmdUI* pCmdUI)
01863 {
01864     pCmdUI->Enable(TRUE);
01865 }
01866
01868 BOOL CBrowseFileView::OnMacro(UINT nID)
01869 {
01870     PyDoPython(WINCMD_to_UCMD(nID));
01871
01872     return 1;
01873 }
01874
01876 void CBrowseFileView::OnUpdateMacro(CCmdUI* pCmdUI)
01877 {
01878     if( DisableCommon(false) )
01879     {
01880         pCmdUI->Enable(FALSE);
01881         return;
01882     }
01883
01884     // Fill the cache with current selection
01885     if( !PyIsUICacheValid() )
01886     {
01887         CListCtrl& ListCtrl = GetListCtrl();
01888         int nItem = -1;
01889         while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01890         {
01891             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01892             PyAppendCache(data);
01893         }
01894     }
01895
01896     UCmdUI ucmdui(WINCMD_to_UCMD(pCmdUI->m_nID));
01897     ucmdui.pCmdUI = pCmdUI;
01898     PyDoCmdUI(&ucmdui);
01899 }
01900
01902 void CBrowseFileView::OnViewExplore()
01903 {
01904     CListCtrl& ListCtrl = GetListCtrl();
01905     bool pathExplore = false;
01906
01907     if( ListCtrl.GetSelectedCount() )
01908     {
01909         int nItem = -1;
01910
01911         while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01912         {
01913             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01914             if( data->IsMissing() )
01915             {
01916                 continue;
01917             }
01918
01919             if( data->GetType() == ENT_SUBDIR )
01920             {
01921                 UStr path;
01922                 data->GetFullPathName(path);
01923
01924                 path.rtrim(kPathDelimiter);
01925
01926                 LaunchExplore(path);
01927             }
01928             else if( !pathExplore )
01929             {
01930                 pathExplore = true;
01931             }
01932         }
01933
01934         if( pathExplore )
01935         {
01936             LaunchExplore(m_path);
01937         }
01938     }
01939     else
01940     {
01941         LaunchExplore(m_path);
01942     }
01943 }
01944
01946 void CBrowseFileView::OnUpdateViewExplore(CCmdUI* pCmdUI)
01947 {
01948     if( DisableCommon() )
01949     {
01950         pCmdUI->Enable(FALSE);
01951         return;
01952     }
01953
01954     bool enable = false;
01955
01956     CListCtrl& listCtrl = GetListCtrl();
01957     int nItem = -1;
01958
01959     if( listCtrl.GetSelectedCount() )
01960     {
01961         while( (nItem = listCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01962         {
01963             EntnodeData* data = (EntnodeData*)listCtrl.GetItemData(nItem);
01964             if( !data->IsMissing() )
01965             {
01966                 enable = true;
01967                 break;
01968             }
01969         }
01970     }
01971     else
01972     {
01973         CWinApp* app = AfxGetApp();
01974         CWinCvsBrowser* browser = ((CWincvsApp*)app)->GetBrowserView();
01975
01976         enable = browser->GetTreeCtrl().GetRootItem() != NULL;
01977     }
01978
01979     pCmdUI->Enable(enable);
01980 }
01981
01982
01984 void CBrowseFileView::OnViewNewInstance()
01985 {
01986     CListCtrl& ListCtrl = GetListCtrl();
01987
01988     if( ListCtrl.GetSelectedCount() )
01989     {
01990         int nItem = -1;
01991
01992         while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
01993         {
01994             EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
01995             if( data->IsMissing() )
01996             {
01997                 continue;
01998             }
01999
02000             UStr path;
02001             data->GetFullPathName(path);
02002
02003             LaunchNewInst(path);
02004         }
02005     }
02006     else
02007     {
02008         LaunchNewInst(m_path);
02009     }
02010 }
02011
02013 void CBrowseFileView::OnQueryProperties()
02014 {
02015     CListCtrl& listCtrl = GetListCtrl();
02016
02017     if( listCtrl.GetSelectedCount() )
02018     {
02019         int nItem = -1;
02020
02021         while( (nItem = listCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02022         {
02023             EntnodeData* data = (EntnodeData*)listCtrl.GetItemData(nItem);
02024             if( data->IsMissing() )
02025             {
02026                 continue;
02027             }
02028
02029             CStr path;
02030             data->GetFullPathName(path);
02031
02032             LaunchProperties(path.c_str());
02033         }
02034     }
02035 }
02036
02038 void CBrowseFileView::OnUpdateQueryProperties(CCmdUI* pCmdUI)
02039 {
02040     bool enable = false;
02041
02042     CListCtrl& listCtrl = GetListCtrl();
02043
02044     if( listCtrl.GetSelectedCount() )
02045     {
02046         int nItem = -1;
02047
02048         while( (nItem = listCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02049         {
02050             EntnodeData* data = (EntnodeData*)listCtrl.GetItemData(nItem);
02051             if( !data->IsMissing() )
02052             {
02053                 enable = true;
02054                 break;
02055             }
02056         }
02057     }
02058
02059     pCmdUI->Enable(enable);
02060 }
02061
02063 void CBrowseFileView::OnTimer(UINT nIDEvent)
02064 {
02065     if( nIDEvent == m_uiFilechangeTimer )
02066     {
02067         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
02068         if( !app->IsCvsRunning() )
02069         {
02070             // cvs command finished
02071             if( m_checkChanges )
02072             {
02073                 // Refresh the directory tree and file view
02074                 m_checkChanges = false;
02075                 ResetView(true);
02076
02077                 return;
02078             }
02079
02080             // file change
02081             if( m_isFilesChange )
02082             {
02083                 ResetView();
02084             }
02085
02086             // check if we need to reload
02087             time_t newEntriesMod = m_entriesMod;
02088             time_t newEntriesLogMod = m_entriesLogMod;
02089
02090             GetEntriesModTime(newEntriesMod, newEntriesLogMod);
02091
02092             if( m_entriesMod != newEntriesMod || m_entriesLogMod != newEntriesLogMod )
02093             {
02094                 ResetView();
02095             }
02096         }
02097
02098         return;
02099     }
02100
02101     CListView::OnTimer(nIDEvent);
02102 }
02103
02105 LRESULT CBrowseFileView::OnFileChange(WPARAM, LPARAM)
02106 {
02107     m_isFilesChange = true;
02108
02109     return 0;
02110 }
02111
02113 void CBrowseFileView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
02114 {
02115     CListView::OnBeginPrinting(pDC, pInfo);
02116
02117     int nPageHeight = pDC->GetDeviceCaps(VERTRES);
02118     TEXTMETRIC tm;
02119     pDC->GetTextMetrics(&tm);
02120
02121     // compute the bounds
02122     CListCtrl& ListCtrl = GetListCtrl();
02123     m_numberOfLines = ListCtrl.GetItemCount();
02124     m_heightOfLines = 2 * tm.tmHeight;
02125     m_numberByPages = nPageHeight / m_heightOfLines;
02126     m_numberOfPages = m_numberOfLines / m_numberByPages + 1;
02127
02128     pInfo->SetMaxPage(m_numberOfPages);
02129 }
02130
02132 BOOL CBrowseFileView::OnPreparePrinting(CPrintInfo* pInfo)
02133 {
02134     BOOL res = DoPreparePrinting(pInfo);
02135     if( !res )
02136         return res;
02137
02138     return TRUE;
02139 }
02140
02142 void CBrowseFileView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
02143 {
02144     if( !pDC->IsPrinting() )
02145         return;
02146
02147     // Now compute the first item to draw
02148     CListCtrl& ListCtrl = GetListCtrl();
02149     int nFirstItem = -1;
02150     int numToIgnore = m_numberByPages * (pInfo->m_nCurPage - 1);
02151
02152     while( numToIgnore-- && (nFirstItem = ListCtrl.GetNextItem(nFirstItem, LVNI_ALL)) != -1 )
02153     {
02154     }
02155
02156     TEXTMETRIC tm;
02157     pDC->GetTextMetrics(&tm);
02158
02159     int nItem = nFirstItem, n = 0;
02160     int horz = pInfo->m_rectDraw.Width();
02161     int vert = pInfo->m_rectDraw.Height();
02162
02163     // Measure for each column
02164     KiColumnModel* model = GetColumnModel();
02165     int columnCount = model->GetCount();
02166     std::vector<int> widths(columnCount, 0);
02167     int totalwidth = 0;
02168     int j;
02169
02170     KoColumnContext context(GetPath());
02171     while( n++ < m_numberByPages && (nItem = ListCtrl.GetNextItem(nItem, LVNI_ALL)) != -1 )
02172     {
02173         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02174         for(j = 0; j < columnCount; j++)
02175         {
02176             TCHAR buffer[256];
02177             model->GetAt(j)->GetText(&context, data, buffer, 256);
02178             int width = pDC->GetTextExtent(buffer, _tcslen(buffer)).cx + kSpc;
02179             widths[j] = max(widths[j], width);
02180         }
02181     }
02182
02183     for(j = 0; j < columnCount; j++)
02184     {
02185         totalwidth += widths[j];
02186     }
02187
02188     for(j = 0; j < columnCount; j++)
02189     {
02190         widths[j] += (horz - totalwidth) / columnCount;
02191     }
02192
02193     // Compute the margins
02194     for(j = columnCount - 1; j >= 0; j--)
02195     {
02196         int margin = 0;
02197         for(int i = j - 1; i >= 0; i--)
02198         {
02199             margin += widths[i];
02200         }
02201
02202         widths[j] = margin;
02203     }
02204
02205     // Now print
02206     nItem = nFirstItem;
02207     n = 0;
02208     CPoint off = pInfo->m_rectDraw.TopLeft();
02209
02210     while( n++ < m_numberByPages && (nItem = ListCtrl.GetNextItem(nItem, LVNI_ALL)) != -1 )
02211     {
02212         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02213         for(j = 0; j < columnCount; j++)
02214         {
02215             const char* info = (*data)[j];
02216             if( info == 0L )
02217                 continue;
02218
02219             CPoint where = off;
02220             where.x += widths[j];
02221             CString s(info);
02222             CRect r(0,0,0,0);
02223
02224             pDC->DrawText(s, -1, &r, DT_CALCRECT);
02225             r.OffsetRect(where);
02226
02227             pDC->DrawText(s, -1, &r, DT_CENTER);
02228         }
02229
02230         off += CPoint(0, m_heightOfLines);
02231     }
02232
02233     //CListView::OnPrint(pDC, pInfo);
02234 }
02235
02237 void CBrowseFileView::OnViewEditsel()
02238 {
02239     KoLaunchEditHandler handler;
02240     ProcessSelectionCommand(&handler);
02241 }
02242
02244 void CBrowseFileView::OnViewEditseldef()
02245 {
02246     KoLaunchDefaultEditHandler handler;
02247     ProcessSelectionCommand(&handler);
02248 }
02249
02251 void CBrowseFileView::OnViewOpensel()
02252 {
02253     KoLaunchOpenHandler handler;
02254     ProcessSelectionCommand(&handler);
02255 }
02256
02258 void CBrowseFileView::OnViewOpenselas()
02259 {
02260     KoLaunchOpenAsHandler handler;
02261     ProcessSelectionCommand(&handler);
02262 }
02263
02265 void CBrowseFileView::OnQueryShellactionDefault()
02266 {
02267     KoLaunchDefaultHandler handler;
02268     ProcessSelectionCommand(&handler);
02269 }
02270
02272 void CBrowseFileView::OnUpdateViewEditseldef(CCmdUI* pCmdUI)
02273 {
02274     if( DisableCommon() )
02275     {
02276         pCmdUI->Enable(FALSE);
02277         return;
02278     }
02279
02280     CListCtrl& ListCtrl = GetListCtrl();
02281     int nItem = -1;
02282     BOOL res = TRUE;
02283
02284     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02285     {
02286         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02287         if( data->GetType() == ENT_SUBDIR || data->IsMissing() )
02288         {
02289             res = FALSE;
02290             break;
02291         }
02292     }
02293
02294     pCmdUI->Enable(res);
02295 }
02296
02298 void CBrowseFileView::OnViewCheckout()
02299 {
02300     KoCheckoutHandler handler;
02301
02302     if( !ProcessSelectionCommand(&handler) )
02303     {
02304         handler.OnFolder(m_path);
02305     }
02306 }
02307
02309 void CBrowseFileView::OnUpdateViewCheckout(CCmdUI* pCmdUI)
02310 {
02311     if( DisableCommon(false) )
02312     {
02313         pCmdUI->Enable(FALSE);
02314         return;
02315     }
02316
02317     pCmdUI->Enable(TRUE);
02318     pCmdUI->SetText("Chec&kout module...");
02319 }
02320
02322 void CBrowseFileView::OnViewImport()
02323 {
02324     KoImportHandler handler;
02325
02326     if( !ProcessSelectionCommand(&handler) )
02327     {
02328         handler.OnFolder(m_path);
02329     }
02330 }
02331
02333 void CBrowseFileView::OnUpdateViewImport(CCmdUI* pCmdUI)
02334 {
02335     if( DisableCommon(false) )
02336     {
02337         pCmdUI->Enable(FALSE);
02338         return;
02339     }
02340
02341     pCmdUI->Enable(TRUE);
02342     pCmdUI->SetText("&Import module...");
02343 }
02344
02351 void CBrowseFileView::DoDrag()
02352 {
02353     CListCtrl& ListCtrl = GetListCtrl();
02354     int nItem=-1;
02355     int nSize = 0;
02356
02357     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02358     {
02359         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02360         if( data->GetType() != ENT_SUBDIR )
02361         {
02362             UStr buf;
02363             const char* fullpath = data->GetFullPathName(buf);
02364             nSize += strlen(fullpath) + 1;
02365         }
02366     }
02367
02368     if( nSize > 0 )
02369     {
02370         HGLOBAL hMem = GlobalAlloc(GMEM_FIXED, sizeof(DROPFILES)+nSize+1);
02371         if( hMem != NULL )
02372         {
02373             DROPFILES& df = *reinterpret_cast<DROPFILES*>(hMem);
02374             df.pFiles = sizeof(DROPFILES);
02375             df.fNC = FALSE;
02376             df.pt.x = df.pt.y = 0;
02377             df.fWide = FALSE;
02378
02379             nItem=-1;
02380             int Offset = sizeof(DROPFILES);
02381             while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02382             {
02383                 EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02384                 if( data->GetType() != ENT_SUBDIR)
02385                 {
02386                     UStr buf;
02387                     const char* fullpath = data->GetFullPathName(buf);
02388                     int len = strlen(fullpath) + 1;
02389                     memcpy(reinterpret_cast<BYTE*>(hMem)+Offset, fullpath, len);
02390                     Offset+=len;
02391                 }
02392             }
02393
02394             reinterpret_cast<BYTE*>(hMem)[Offset]=0;
02395
02396             COleDataSource ds;
02397             ds.CacheGlobalData( CF_HDROP, hMem );
02398             ds.DoDragDrop( DROPEFFECT_COPY );
02399         }
02400     }
02401 }
02402
02404 void CBrowseFileView::OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult)
02405 {
02406     DoDrag();
02407     *pResult = 0;
02408 }
02409
02411 void CBrowseFileView::OnBeginrdrag(NMHDR* pNMHDR, LRESULT* pResult)
02412 {
02413     DoDrag();
02414     *pResult = 0;
02415 }
02416
02418 void CBrowseFileView::OnDestroy()
02419 {
02420     // Kill the timer
02421     if( m_uiFilechangeTimer )
02422     {
02423         KillTimer(m_uiFilechangeTimer);
02424     }
02425
02426     // Stop file watch
02427     if( m_watch )
02428     {
02429         m_watch->SignalTerminate();
02430         m_watch = NULL;
02431     }
02432
02433     // Save settings
02434     SaveColumns(m_isRecursive);
02435
02436     // Unregister notifications
02437     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
02438     {
02439         app->GetFilterModel()->GetNotificationManager()->CheckOut(this);
02440         app->GetRecursionModel()->GetNotificationManager()->CheckOut(this);
02441         app->GetIgnoreModel()->GetNotificationManager()->CheckOut(this);
02442     }
02443
02444     m_ctrlHeader.GetNotificationManager()->CheckOut(this);
02445
02446     CListView::OnDestroy();
02447 }
02448
02454 CString CBrowseFileView::FormatEntrryPrefix(bool isRecursive) const
02455 {
02456     return isRecursive ? STR_FILEDETAILVIEW_COLUMN_PREFIX_FLAT : STR_FILEDETAILVIEW_COLUMN_PREFIX_REG;
02457 }
02458
02463 void CBrowseFileView::SaveColumns(bool isRecursive)
02464 {
02465     const int columnCount = m_ctrlHeader.GetItemCount();
02466
02467     CString columnsWidth;
02468     CString columnsOrder;
02469
02470     CString strNum;
02471
02472     for(int nIndex = 0; nIndex < columnCount; nIndex++)
02473     {
02474         HDITEM headerItem = { 0 };
02475         headerItem.mask = HDI_WIDTH;
02476
02477         m_ctrlHeader.GetItem(nIndex, &headerItem);
02478
02479         strNum.Format("%d", headerItem.cxy);
02480         columnsWidth += strNum + CHR_FILEDETAILVIEW_COLUMN_DATASEP;
02481     }
02482
02483     int* orderArray = new int[columnCount];
02484
02485     if( orderArray && m_ctrlHeader.GetOrderArray(orderArray, columnCount) )
02486     {
02487         for(int nIndex = 0; nIndex < columnCount; nIndex++)
02488         {
02489             strNum.Format("%d", orderArray[nIndex]);
02490             columnsOrder += strNum + CHR_FILEDETAILVIEW_COLUMN_DATASEP;
02491         }
02492
02493         delete [] orderArray;
02494     }
02495
02496     AfxGetApp()->WriteProfileString(STR_FILEDETAILVIEW_COLUMN_SECTION,
02497         FormatEntrryPrefix(isRecursive) + STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH,
02498         columnsWidth);
02499
02500     AfxGetApp()->WriteProfileString(STR_FILEDETAILVIEW_COLUMN_SECTION,
02501         FormatEntrryPrefix(isRecursive) + STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER,
02502         columnsOrder);
02503 }
02504
02510 bool CBrowseFileView::LoadColumns(bool isRecursive)
02511 {
02512     CString columnsWidth = AfxGetApp()->GetProfileString(STR_FILEDETAILVIEW_COLUMN_SECTION,
02513         FormatEntrryPrefix(isRecursive) + STR_FILEDETAILVIEW_COLUMN_ENTRY_WIDTH);
02514
02515     CString columnsOrder = AfxGetApp()->GetProfileString(STR_FILEDETAILVIEW_COLUMN_SECTION,
02516         FormatEntrryPrefix(isRecursive) + STR_FILEDETAILVIEW_COLUMN_ENTRY_ORDER);
02517
02518     if( columnsWidth.IsEmpty() || columnsOrder.IsEmpty() )
02519     {
02520         return false;
02521     }
02522
02523     const int columnCount = m_ctrlHeader.GetItemCount();
02524
02525     int* orderArray = new int[columnCount];
02526     if( orderArray )
02527     {
02528         CString strSubString;
02529
02530         for(int nIndex = 0; nIndex < columnCount; nIndex++)
02531         {
02532             AfxExtractSubString(strSubString, columnsWidth, nIndex, CHR_FILEDETAILVIEW_COLUMN_DATASEP);
02533             GetListCtrl().SetColumnWidth(nIndex, atoi(strSubString));
02534
02535             AfxExtractSubString(strSubString, columnsOrder, nIndex, CHR_FILEDETAILVIEW_COLUMN_DATASEP);
02536             orderArray[nIndex] = atoi(strSubString);
02537         }
02538
02539         m_ctrlHeader.SetOrderArray(columnCount, orderArray);
02540
02541         delete [] orderArray;
02542     }
02543
02544     return true;
02545 }
02546
02548 BOOL CBrowseFileView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
02549 {
02550     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
02551     if( app->IsCvsRunning() )
02552     {
02553         SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
02554         return TRUE;
02555     }
02556
02557     return CListView::OnSetCursor(pWnd, nHitTest, message);
02558 }
02559
02563 void CBrowseFileView::OnFilteringChanged()
02564 {
02565     if( !m_isResetViewPending )
02566     {
02567         m_isResetViewPending = true;
02568         PostMessage(WM_RESETVIEW);
02569     }
02570 }
02571
02575 void CBrowseFileView::OnFilterBarChanged()
02576 {
02577     if( !m_isResetViewPending )
02578     {
02579         m_isResetViewPending = true;
02580
02581         CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
02582         if( pMainFrame->GetSafeHwnd() )
02583         {
02584             pMainFrame->SetFilterBarMask(m_ctrlHeader, GetColumnModel());
02585         }
02586
02587         PostMessage(WM_RESETVIEW);
02588     }
02589 }
02590
02592 void CBrowseFileView::OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult)
02593 {
02594     NM_LISTVIEW* p = (NM_LISTVIEW*)pNMHDR;
02595     if( p->lParam )
02596     {
02597         EntnodeData* data = (EntnodeData*)(LPVOID)p->lParam;
02598         data->UnRef();
02599     }
02600
02601     *pResult = 0;
02602 }
02603
02605 LRESULT CBrowseFileView::OnResetView(WPARAM, LPARAM)
02606 {
02607     ResetView(false, NULL);
02608     return 0;
02609 }
02610
02612 void CBrowseFileView::OnUpdateViewAnnotate(CCmdUI* pCmdUI)
02613 {
02614     if( DisableCommon() )
02615     {
02616         pCmdUI->Enable(FALSE);
02617         return;
02618     }
02619
02620     CListCtrl& ListCtrl = GetListCtrl();
02621
02622     int nItem = -1;
02623     BOOL res = TRUE;
02624
02625     while( (nItem = ListCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
02626     {
02627         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nItem);
02628         if( data->IsUnknown() || data->GetType() == ENT_SUBDIR )
02629         {
02630             res = FALSE;
02631             break;
02632         }
02633     }
02634
02635     pCmdUI->Enable(res);
02636 }
02637
02639 void CBrowseFileView::OnAnnotate()
02640 {
02641     KoAnnotateHandler handler;
02642     ProcessSelectionCommand(&handler);
02643 }
02644
02646 void CBrowseFileView::OnEditSelectAll()
02647 {
02648     CListCtrl& ListCtrl = GetListCtrl();
02649
02650     for( int nIndex = 0; nIndex < ListCtrl.GetItemCount(); nIndex++ )
02651     {
02652         EntnodeData* data = (EntnodeData*)ListCtrl.GetItemData(nIndex);
02653         if( data->GetType() == ENT_FILE )
02654         {
02655             ListCtrl.SetItemState(nIndex, LVIS_SELECTED, LVIS_SELECTED);
02656         }
02657     }
02658
02659     if( ListCtrl.GetSelectedCount() )
02660     {
02661         ListCtrl.SetFocus();
02662     }
02663 }
02664
02666 void CBrowseFileView::OnAppCmdline()
02667 {
02668     KoCommandLineHandler handler;
02669
02670     if( !ProcessSelectionCommand(&handler) )
02671     {
02672         handler.OnFolder(m_path);
02673     }
02674 }
02675
02677 void CBrowseFileView::OnUpdateCvsCmd(CCmdUI* pCmdUI)
02678 {
02679     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
02680     pCmdUI->Enable(app->IsCvsRunning() ? FALSE : TRUE);
02681 }
02682
02684 void CBrowseFileView::OnAppRtagbranch()
02685 {
02686     KoRtagBranchHandler handler;
02687
02688     if( !ProcessSelectionCommand(&handler) )
02689     {
02690         handler.OnFolder(m_path);
02691     }
02692 }
02693
02695 void CBrowseFileView::OnAppRtagcreate()
02696 {
02697     KoRtagCreateHandler handler;
02698
02699     if( !ProcessSelectionCommand(&handler) )
02700     {
02701         handler.OnFolder(m_path);
02702     }
02703 }
02704
02706 void CBrowseFileView::OnAppRtagdelete()
02707 {
02708     KoRtagDeleteHandler handler;
02709
02710     if( !ProcessSelectionCommand(&handler) )
02711     {
02712         handler.OnFolder(m_path);
02713     }
02714 }
02715
02717 void CBrowseFileView::OnViewFilterbarEnable()
02718 {
02719     CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
02720     if( pMainFrame->GetSafeHwnd() )
02721     {
02722         pMainFrame->ToggleFilterMasksEnable();
02723         m_ctrlHeader.EnableHeaderFilters(pMainFrame->IsFilterMasksEnable());
02724         m_ctrlHeader.SetFilterChangeTimeout(gFileViewFilterMasksReactionSpeed);
02725     }
02726
02727     PostMessage(WM_RESETVIEW);
02728 }
02729
02731 void CBrowseFileView::OnViewFilterbarClearall()
02732 {
02733     if( m_ctrlHeader.GetSafeHwnd() )
02734     {
02735         Header_ClearAllFilters(m_ctrlHeader.GetSafeHwnd());
02736     }
02737 }
02738
02740 void CBrowseFileView::OnViewFilterbarOptions()
02741 {
02742     int reactionSpeed = gFileViewFilterMasksReactionSpeed;
02743
02744     if( CompatGetFilterMaskOptions(reactionSpeed) )
02745     {
02746         gFileViewFilterMasksReactionSpeed = reactionSpeed;
02747         m_ctrlHeader.SetFilterChangeTimeout(gFileViewFilterMasksReactionSpeed);
02748     }
02749 }
02750
02752 void CBrowseFileView::OnItemchanged(NMHDR* pNMHDR, LRESULT* pResult)
02753 {
02754     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
02755
02756     if( pNMListView->uChanged & LVIF_STATE &&
02757         (pNMListView->uNewState & LVIS_SELECTED || pNMListView->uOldState & LVIS_SELECTED) )
02758     {
02759         CStr str;
02760
02761         const UINT cnt = GetListCtrl().GetSelectedCount();
02762         if( cnt > 0 )
02763         {
02764             str << (int)cnt << (cnt == 1 ? " object " : " objects") << " selected";
02765         }
02766
02767         CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
02768         if( pMainFrame )
02769         {
02770             pMainFrame->GetStatusBar()->SetWindowText(str);
02771         }
02772     }
02773
02774     *pResult = 0;
02775 }
02776
02778 void CBrowseFileView::OnDeleteallitems(NMHDR* pNMHDR, LRESULT* pResult)
02779 {
02780     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
02781
02782     CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
02783     if( pMainFrame )
02784     {
02785         CString strIdleString;
02786         strIdleString.LoadString(AFX_IDS_IDLEMESSAGE);
02787
02788         pMainFrame->GetStatusBar()->SetWindowText(strIdleString);
02789     }
02790
02791     *pResult = 0;
02792 }
Generated on Sat Aug 7 22:43:04 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CFillTclEntries Member List

This is the complete list of members for CFillTclEntries, including all inherited members.

CFillTclEntries(CSortList< ENTNODE > &entries) | CFillTclEntries | [inline]
EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | CFillTclEntries | [inline, virtual]
ExitDirectory(const char *fullpath) | CFillTclEntries | [inline, virtual]
GetRefRunning() | TraversalReport | [static]
m_entries | CFillTclEntries |
m_ignlist | CFillTclEntries |
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | CFillTclEntries | [inline, virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | CFillTclEntries | [inline, virtual]
OnError(const char *err, int errcode) | CFillTclEntries | [inline, virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | CFillTclEntries | [inline, virtual]
OnIdle(const char *fullpath) | CFillTclEntries | [inline, virtual]
~CFillTclEntries() | CFillTclEntries | [inline, virtual]

Generated on Sat Aug 7 22:52:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getopt1.c Source File

common/getopt1.c

Go to the documentation of this file.
00001 /* getopt_long and getopt_long_only entry points for GNU getopt.
00002    Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
00003     Free Software Foundation, Inc.
00004
00005    This program is free software; you can redistribute it and/or modify it
00006    under the terms of the GNU General Public License as published by the
00007    Free Software Foundation; either version 2, or (at your option) any
00008    later version.
00009
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.  */
00014
00015 #ifdef HAVE_CONFIG_H
00016 #if defined (emacs) || defined (CONFIG_BROKETS)
00017 /* We use <config.h> instead of "config.h" so that a compilation
00018    using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
00019    (which it would do because it found this file in $srcdir).  */
00020 #include <config.h>
00021 #else
00022 #include "config.h"
00023 #endif
00024 #endif
00025
00026 #include "getopt.h"
00027
00028 #ifndef __STDC__
00029 /* This is a separate conditional since some stdc systems
00030    reject `defined (const)'.  */
00031 #ifndef const
00032 #define const
00033 #endif
00034 #endif
00035
00036 #include <stdio.h>
00037
00038 /* Comment out all this code if we are using the GNU C Library, and are not
00039    actually compiling the library itself.  This code is part of the GNU C
00040    Library, but also included in many other GNU distributions.  Compiling
00041    and linking in this code is a waste when using the GNU C library
00042    (especially if it is a shared library).  Rather than having every GNU
00043    program understand `configure --with-gnu-libc' and omit the object files,
00044    it is simpler to just do this in the source for each such file.  */
00045
00046 #if defined (_LIBC) || !defined (__GNU_LIBRARY__)
00047
00048
00049 /* This needs to come after some library #include
00050    to get __GNU_LIBRARY__ defined.  */
00051 #ifdef __GNU_LIBRARY__
00052 #include <stdlib.h>
00053 #else
00054 char *getenv ();
00055 #endif
00056
00057 #ifndef NULL
00058 #define NULL 0
00059 #endif
00060
00061 #ifndef __STDC__
00062 int
00063 getopt_long (argc, argv, options, long_options, opt_index)
00064      int argc;
00065      char *const *argv;
00066      const char *options;
00067      const struct option *long_options;
00068      int *opt_index;
00069 #else /* __STDC__ */
00070 int
00071 getopt_long (int argc, char *const *argv, const char *options,
00072      const struct option *long_options, int *opt_index)
00073 #endif /* __STDC__ */
00074 {
00075   return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
00076 }
00077
00078 /* Like getopt_long, but '-' as well as '--' can indicate a long option.
00079    If an option that starts with '-' (not '--') doesn't match a long option,
00080    but does match a short option, it is parsed as a short option
00081    instead.  */
00082
00083 #ifndef __STDC__
00084 int
00085 getopt_long_only (argc, argv, options, long_options, opt_index)
00086      int argc;
00087      char *const *argv;
00088      const char *options;
00089      const struct option *long_options;
00090      int *opt_index;
00091 #else /* __STDC__ */
00092 int
00093 getopt_long_only (int argc, char *const *argv, const char *options,
00094      const struct option *long_options, int *opt_index)
00095 #endif /* __STDC__ */
00096 {
00097   return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
00098 }
00099
00100
00101 #endif  /* _LIBC or not __GNU_LIBRARY__.  */
00102
00103 #ifdef TEST
00104
00105 #include <stdio.h>
00106
00107 int
00108 main (argc, argv)
00109      int argc;
00110      char **argv;
00111 {
00112   int c;
00113   int digit_optind = 0;
00114
00115   while (1)
00116     {
00117       int this_option_optind = optind ? optind : 1;
00118       int option_index = 0;
00119       static struct option long_options[] =
00120       {
00121     {"add", 1, 0, 0},
00122     {"append", 0, 0, 0},
00123     {"delete", 1, 0, 0},
00124     {"verbose", 0, 0, 0},
00125     {"create", 0, 0, 0},
00126     {"file", 1, 0, 0},
00127     {0, 0, 0, 0}
00128       };
00129
00130       c = getopt_long (argc, argv, "abc:d:0123456789",
00131                long_options, &option_index);
00132       if (c == EOF)
00133     break;
00134
00135       switch (c)
00136     {
00137     case 0:
00138       printf ("option %s", long_options[option_index].name);
00139       if (optarg)
00140         printf (" with arg %s", optarg);
00141       printf ("\n");
00142       break;
00143
00144     case '0':
00145     case '1':
00146     case '2':
00147     case '3':
00148     case '4':
00149     case '5':
00150     case '6':
00151     case '7':
00152     case '8':
00153     case '9':
00154       if (digit_optind != 0 && digit_optind != this_option_optind)
00155         printf ("digits occur in two different argv-elements.\n");
00156       digit_optind = this_option_optind;
00157       printf ("option %c\n", c);
00158       break;
00159
00160     case 'a':
00161       printf ("option a\n");
00162       break;
00163
00164     case 'b':
00165       printf ("option b\n");
00166       break;
00167
00168     case 'c':
00169       printf ("option c with value `%s'\n", optarg);
00170       break;
00171
00172     case 'd':
00173       printf ("option d with value `%s'\n", optarg);
00174       break;
00175
00176     case '?':
00177       break;
00178
00179     default:
00180       printf ("?? getopt returned character code 0%o ??\n", c);
00181     }
00182     }
00183
00184   if (optind < argc)
00185     {
00186       printf ("non-option ARGV-elements: ");
00187       while (optind < argc)
00188     printf ("%s ", argv[optind++]);
00189       printf ("\n");
00190     }
00191
00192   exit (0);
00193 }
00194
00195 #endif /* TEST */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/StdAfx.h Source File

WinCvs/CJLib/CJLibrary/StdAfx.h

Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 //  or project specific include files that are used frequently, but
00003 //      are changed infrequently
00004 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00005 // See ReadMe.txt for TERMS OF USE.
00006 //
00008 /****************************************************************************
00009  *
00010  * $Date: 2002/06/15 17:49:37 $
00011  * $Revision: 1.2 $
00012  * $Archive: /CodeJock/CJLibrary/StdAfx.h $
00013  *
00014  * $History: StdAfx.h $
00015  *
00016  * *****************  Version 9  *****************
00017  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00018  * Updated in $/CodeJock/CJLibrary
00019  * Fixed potential resource and memory leak problems.
00020  *
00021  * *****************  Version 8  *****************
00022  * User: Kirk Stowell Date: 10/14/99   Time: 12:41p
00023  * Updated in $/CodeJock/CJLibrary
00024  * Added source control history to file header.
00025  *
00026  ***************************************************************************/
00028
00029 #if !defined(AFX_STDAFX_H__F235A078_2921_11D3_8733_000000000000__INCLUDED_)
00030 #define AFX_STDAFX_H__F235A078_2921_11D3_8733_000000000000__INCLUDED_
00031
00032 #if _MSC_VER >= 1000
00033 #pragma once
00034 #endif // _MSC_VER >= 1000
00035
00036 #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
00037
00038 #ifdef _UNICODE
00039 #define UNICODE
00040 #endif
00041
00042 #include <afxwin.h>         // MFC core and standard components
00043 #include <afxext.h>         // MFC extensions
00044
00045 #ifndef _AFX_NO_OLE_SUPPORT
00046 #include <afxole.h>         // MFC OLE classes
00047 #include <afxodlgs.h>       // MFC OLE dialog classes
00048 #include <afxdisp.h>        // MFC OLE automation classes
00049 #endif // _AFX_NO_OLE_SUPPORT
00050
00051
00052 #ifndef _AFX_NO_DB_SUPPORT
00053 #include <afxdb.h>          // MFC ODBC database classes
00054 #endif // _AFX_NO_DB_SUPPORT
00055
00056 #ifndef _AFX_NO_DAO_SUPPORT
00057 #include <afxdao.h>         // MFC DAO database classes
00058 #endif // _AFX_NO_DAO_SUPPORT
00059
00060 #ifndef _AFX_NO_AFXCMN_SUPPORT
00061 #include <afxcmn.h>         // MFC support for Windows Common Controls
00062 #endif // _AFX_NO_AFXCMN_SUPPORT
00063
00064
00065 #if _MSC_VER < 1200
00066 #define _VC_VERSION_5
00067 #endif  // _VC_VERSION_5
00068
00069 #ifndef _CJXLIB_INLINE
00070 #define _CJXLIB_INLINE inline
00071 #endif // _AFXCMN_INLINE
00072
00073 #ifndef _CJX_EXT_CLASS
00074 #ifdef _AFXDLL
00075 #define _CJX_EXT_CLASS  AFX_CLASS_EXPORT // Always export CJLibrary files...
00076 #else
00077 #define _CJX_EXT_CLASS  // not used with static builds.
00078 #endif
00079 #endif // _CJX_EXT_CLASS
00080
00081 #ifndef __AFXTEMPL_H__
00082 #include <afxtempl.h>
00083 #endif
00084
00085 #ifndef __AFXPRIV_H__
00086 #include <afxpriv.h>
00087 #endif
00088
00089 #if _MFC_VER < 0x700
00090 #include <..\src\afximpl.h>
00091 #else
00092 #include <..\atlmfc\src\mfc\afximpl.h>
00093 #endif
00094
00095 #define _delete(p){if(p){delete p;p=NULL;}}
00096 #define _destroyIcon(h){if(h){::DestroyIcon(h);h=NULL;}}
00097
00098 //{{AFX_INSERT_LOCATION}}
00099 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00100
00101 #endif // !defined(AFX_STDAFX_H__F235A078_2921_11D3_8733_000000000000__INCLUDED_)
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoUnlockHandler Member List

This is the complete list of members for KoUnlockHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoUnlockHandler() | KoUnlockHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoUnlockHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoUnlockHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TclGlue.h Source File

common/TclGlue.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * TclGlue.h --- glue to the TCL language
00023  */
00024
00025 #ifndef TCLGLUE_H
00026 #define TCLGLUE_H
00027
00028 class UStr;
00029 class EntnodeData;
00030
00031 #ifndef _TCL
00032 #   define TCL_OK       0
00033 #   define TCL_ERROR    1
00034 #   define TCL_RETURN   2
00035 #   define TCL_BREAK    3
00036 #   define TCL_CONTINUE 4
00037 #endif
00038
00039 typedef int kTclRes;
00040
00041 #define kTCLPathDelimiter '/'
00042
00043 struct Tcl_Interp;
00044
00045 void TclBrowserReset(void);
00046 void TclBrowserAppend(const char* path, EntnodeData* data);
00047     // TO_OBSOLETE
00048
00050 class CTcl_Interp
00051 {
00052 public:
00053     // Construction
00054     CTcl_Interp();
00055     ~CTcl_Interp();
00056
00057 private:
00058     // Data members
00059     Tcl_Interp* fInterp;
00061     int fLastErrorCode;
00062     bool fExitOnError;
00064 public:
00065     // Interface
00066     static bool IsAvail(const bool forceReload = false);
00067
00068     kTclRes DoScriptVar(const char* format, ...);
00069     kTclRes DoScript(const char* script);
00070     kTclRes DoFile(const char* file);
00071
00072     inline operator Tcl_Interp*(void);
00073
00074     inline int  GetCvsLastErrorCode() const;
00075     inline void SetCvsLastErrorCode(const int value);
00076
00077     inline bool GetCvsExitOnError() const;
00078     inline void SetCvsExitOnError(const bool value);
00079
00080     static void Unixfy(UStr& path);
00081     static void Deunixfy(UStr& path);
00082 };
00083
00085 // Inline implementation
00086
00088 inline CTcl_Interp::operator Tcl_Interp*(void)
00089 {
00090     return fInterp;
00091 }
00092
00094 inline int CTcl_Interp::GetCvsLastErrorCode() const
00095 {
00096     return fLastErrorCode;
00097 }
00098
00100 inline void CTcl_Interp::SetCvsLastErrorCode(const int value)
00101 {
00102     fLastErrorCode = value;
00103 }
00104
00106 inline bool CTcl_Interp::GetCvsExitOnError() const
00107 {
00108     return fExitOnError;
00109 }
00110
00112 inline void CTcl_Interp::SetCvsExitOnError(const bool value)
00113 {
00114     fExitOnError = value;
00115 }
00116
00117 #endif /* TCLGLUE_H */
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCvsStatusBar Member List

This is the complete list of members for CCvsStatusBar, including all inherited members.

CCvsStatusBar() | CCvsStatusBar |
DrawItem(LPDRAWITEMSTRUCT) | CCvsStatusBar | [virtual]
m_indic | CCvsStatusBar | [private]
m_settimer | CCvsStatusBar | [private]
m_step | CCvsStatusBar | [private]
m_tooltip | CCvsStatusBar | [private]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCvsStatusBar | [protected]
OnNcHitTest(CPoint point) | CCvsStatusBar | [protected]
OnSize(UINT nType, int cx, int cy) | CCvsStatusBar | [protected]
OnTimer(UINT nIDEvent) | CCvsStatusBar | [protected]
PreTranslateMessage(MSG *pMsg) | CCvsStatusBar | [virtual]
SetIndicators() | CCvsStatusBar | [private]
UpdatePathInfo(const char *path) | CCvsStatusBar |
~CCvsStatusBar() | CCvsStatusBar | [virtual]

Generated on Sat Aug 7 22:51:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsDialogs.h Source File

common/UCvsDialogs.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSDIALOGS_H
00026 #define UCVSDIALOGS_H
00027
00028 #include "uwidget.h"
00029
00030 // the pixmaps creations
00031 void *UCreate_pixmap(UWidget *parent, const char *fileIcon);
00032
00033 // the dialogs creation
00034 extern void *UCreate_MainWindow (void *Parent = NULL);
00035 extern void *UCreate_GraphWindow (void *Parent = NULL);
00036 extern void *UCreate_Alert (void *Parent = NULL);
00037 extern void *UCreate_gcvs_Settings (void *Parent = NULL);
00038 extern void *UCreate_UpdateDlg (void *Parent = NULL);
00039 extern void *UCreate_PasswdDlg (void *Parent = NULL);
00040 extern void *UCreate_CommitDlg (void *Parent = NULL);
00041 extern void *UCreate_DiffDlg (void *Parent = NULL);
00042 extern void *UCreate_CheckoutDlg (void *Parent = NULL);
00043 extern void *UCreate_LogDlg (void *Parent = NULL);
00044 extern void *UCreate_ImportFilterDlg (void *Parent = NULL);
00045 extern void *UCreate_ImpWarningDlg (void *Parent = NULL);
00046 extern void *UCreate_ImpEntryDlg (void *Parent = NULL);
00047 extern void *UCreate_ImportDlg (void *Parent = NULL);
00048 extern void *UCreate_CmdlineDlg (void *Parent = NULL);
00049 extern void *UCreate_TagModDlg (void *Parent = NULL);
00050 extern void *UCreate_UntagModDlg (void *Parent = NULL);
00051 extern void *UCreate_BranchModDlg (void *Parent = NULL);
00052 extern void *UCreate_TagDlg (void *Parent = NULL);
00053 extern void *UCreate_UntagDlg (void *Parent = NULL);
00054 extern void *UCreate_BranchDlg (void *Parent = NULL);
00055 extern void *UCreate_SettingsDlg (void *Parent = NULL);
00056 extern void *UCreate_AboutDlg (void *Parent = NULL);
00057 extern void *UCreate_SelTagBranchDlg (void *Parent = NULL);
00058 extern void *UCreate_SelDetailsDlg (void *Parent = NULL);
00059 extern void *UCreate_AskYesNoDlg (void *Parent = NULL);
00060
00061 #endif
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewColumn.cpp Source File

common/BrowseViewColumn.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 #include "stdafx.h"
00018
00019 #include "FileTraversal.h"
00020 #include "BrowseViewColumn.h"
00021 #include "CvsEntries.h"
00022 #include "cvsgui_i18n.h"
00023
00024 #ifdef WIN32
00025 #include "wincvs_winutil.h"
00026 #endif /* !WIN32 */
00027
00028
00029 #if TIME_WITH_SYS_TIME
00030 #   include <sys/time.h>
00031 #   include <time.h>
00032 #elif HAVE_SYS_TIME_H
00033 #   include <sys/time.h>
00034 #else
00035 #   include <time.h>
00036 #endif
00037
00038 #if qMacPP
00039 #   include "MacMisc.h"
00040 #endif
00041
00042 #ifndef _countof
00043
00044 #   define _countof(array) (sizeof(array)/sizeof(array[0]))
00045 #endif
00046
00047 #if qMacPP
00048 # define PLATFORM_COLUMN_WIDTH(mac, other) mac
00049 #else
00050 # define PLATFORM_COLUMN_WIDTH(mac, other) other
00051 #endif
00052
00053 #ifndef MAX_PATH
00054 #define MAX_PATH 2048
00055 #endif
00056
00064 #ifdef WIN32
00065 int CALLBACK _Compare(LPARAM data1, LPARAM data2, LPARAM data)
00066 #else
00067 int _Compare(void* data1, void* data2, void* data)
00068 #endif
00069 {
00070     int res = 0;
00071
00072     const EntnodeData* d1 = (const EntnodeData*)data1;
00073     const EntnodeData* d2 = (const EntnodeData*)data2;
00074
00075     const CSortParam* pSortParam = (CSortParam*)data;
00076
00077     bool overrideCompare = false;
00078
00079     if( pSortParam->m_fGroupSubDir )
00080     {
00081         // Group sub-directories
00082         const int d1IsDir = d1->GetType() == ENT_SUBDIR ? 1 : 0;
00083         const int d2IsDir = d2->GetType() == ENT_SUBDIR ? 1 : 0;
00084
00085         if( (d1IsDir + d2IsDir) == 1 )
00086         {
00087             // One (and only one of them) is a directory
00088             overrideCompare = true;
00089             res = d1IsDir ? -1 : 1;
00090         }
00091     }
00092
00093     if( !overrideCompare )
00094     {
00095         const int columnIndex = pSortParam->m_column->GetColumnIndex();
00096
00097         if( columnIndex == ColumnIndex::kOption ||
00098             columnIndex == ColumnIndex::kState ||
00099             columnIndex == ColumnIndex::kStickyTag ||
00100             columnIndex == ColumnIndex::kConflict )
00101         {
00102             // Make the non-empty items show on top
00103             const char* s1;
00104             const char* s2;
00105             const int f1IsEmpty = ((s1 = (*d1)[pSortParam->m_column->GetColumnIndex()]) == NULL || strcmp(s1, "") == 0) ? 1 : 0;
00106             const int f2IsEmpty = ((s2 = (*d2)[pSortParam->m_column->GetColumnIndex()]) == NULL || strcmp(s2, "") == 0) ? 1 : 0;
00107
00108             if( (f1IsEmpty + f2IsEmpty) == 1 )
00109             {
00110                 // One (and only one of them) is empty
00111                 overrideCompare = true;
00112                 res = f1IsEmpty ? 1 : -1;
00113             }
00114         }
00115     }
00116
00117     if( !overrideCompare )
00118     {
00119         res = pSortParam->m_column->Compare(pSortParam->m_context, d1, d2);
00120
00121         if( res == 0 && pSortParam->m_column != pSortParam->m_columnAlt )
00122         {
00123             res = pSortParam->m_columnAlt->Compare(pSortParam->m_context, d1, d2);
00124         }
00125         else if( pSortParam->m_fAccendant )
00126         {
00127             res = -res;
00128         }
00129     }
00130
00131     return res;
00132 }
00133
00135 // KoColumnContext
00136
00137 KoColumnContext::KoColumnContext(const char* path)
00138     : m_path(path)
00139 {
00140 }
00141
00146 const UStr& KoColumnContext::GetPath() const
00147 {
00148     return m_path;
00149 }
00150
00152 // KoNameColumn
00153
00155 const class KoNameColumn : public KiColumn
00156 {
00157 public:
00158     // Interface
00159     virtual int GetColumnIndex() const
00160     {
00161         return ColumnIndex::kName;
00162     }
00163
00164     virtual void GetSetupData(LV_COLUMN* lvc) const
00165     {
00166 #ifdef WIN32
00167         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00168         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00169         lvc->cx = 150;
00170         lvc->fmt = LVCFMT_LEFT;
00171 #else
00172         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00173         lvc->width = PLATFORM_COLUMN_WIDTH(250, 210);
00174 #endif
00175     }
00176
00177     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00178     {
00179         StrSafeCopy(buffer, data->GetName(), bufferSize);
00180     }
00181
00182     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00183     {
00184         return StrOrdICmp(d1->GetName(), d2->GetName());
00185     }
00186
00187     virtual bool IsDefaultAscending() const
00188     {
00189         return false;
00190     }
00191 } nameColumn;
00192
00194 // KoExtColumn
00195
00197 const class KoExtColumn : public KiColumn
00198 {
00199 public:
00200     // Interface
00201     virtual int GetColumnIndex() const
00202     {
00203         return ColumnIndex::kExtention;
00204     }
00205
00206     virtual void GetSetupData(LV_COLUMN* lvc) const
00207     {
00208 #ifdef WIN32
00209         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00210         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00211         lvc->cx = 50;
00212         lvc->fmt = LVCFMT_LEFT;
00213 #else
00214         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00215         lvc->width = PLATFORM_COLUMN_WIDTH(150, 60);
00216 #endif
00217     }
00218
00219     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00220     {
00221         StrSafeCopy(buffer, data->GetExtension(), bufferSize);
00222     }
00223
00224     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00225     {
00226         int res = 0;
00227
00228         // Compare extensions
00229         const char* p1 = d1->GetExtension();
00230         const char* p2 = d2->GetExtension();
00231
00232         if( p1 && p2 )
00233         {
00234             res = stricmp(p1, p2);
00235             if( res == 0 )
00236             {
00237                 // Compare filenames, if ext. are identical
00238                 res = stricmp(d1->GetName(), d2->GetName());
00239             }
00240         }
00241         else if( p1 )
00242         {
00243             res = +1;
00244         }
00245         else if( p2 )
00246         {
00247             res = -1;
00248         }
00249         else
00250         {
00251             // Compare filenames, if their are no ext.
00252             res = stricmp(d1->GetName(), d2->GetName());
00253         }
00254
00255         return res;
00256     }
00257
00258     virtual bool IsDefaultAscending() const
00259     {
00260         return false;
00261     }
00262 } extColumn;
00263
00265 // KoPathColumn
00266
00268 const class KoPathColumn : public KiColumn
00269 {
00270 public:
00271     // Interface
00272     virtual int GetColumnIndex() const
00273     {
00274         return ColumnIndex::kPath;
00275     }
00276
00277     virtual void GetSetupData(LV_COLUMN* lvc) const
00278     {
00279 #ifdef WIN32
00280         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00281         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00282         lvc->cx = 150;
00283         lvc->fmt = LVCFMT_LEFT;
00284 #else
00285         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00286         lvc->width = PLATFORM_COLUMN_WIDTH(340, 300);
00287 #endif
00288     }
00289
00290     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00291     {
00292         const EntnodeFile* node = dynamic_cast<const EntnodeFile*>(data);
00293         StrSafeCopy(buffer, node ? node->GetRelativePath(context) : "", bufferSize);
00294     }
00295
00296     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00297     {
00298         char text1[MAX_PATH];
00299         GetText(context, d1, text1, MAX_PATH);
00300
00301         char text2[MAX_PATH];
00302         GetText(context, d2, text2, MAX_PATH);
00303
00304         return StrOrdICmp(text1, text2);
00305     }
00306
00307     virtual bool IsDefaultAscending() const
00308     {
00309         return false;
00310     }
00311 } pathColumn;
00312
00314 // KoRevisionColumn
00315
00317 const class KoRevisionColumn : public KiColumn
00318 {
00319 private:
00320     // Methods
00321
00328     static int CompareRevisions(const char* rev1, const char* rev2)
00329     {
00330         if( rev1 == 0L && rev2 == 0L )
00331         {
00332             return 0;
00333         }
00334         else if( rev1 == 0L || rev2 == 0L )
00335         {
00336             return rev1 == 0L ? -1 : 1;
00337         }
00338
00339         CStr r1(rev1), r2(rev2);
00340         CStr q1, q2;
00341         int v1, v2;
00342         char* tmp;
00343
00344         if( (tmp = strchr(r1, '.')) != 0L )
00345         {
00346             tmp[0] = '\0';
00347             q1 = tmp + 1;
00348         }
00349
00350         v1 = atoi(r1);
00351
00352         if( (tmp = strchr(r2, '.')) != 0L )
00353         {
00354             tmp[0] = '\0';
00355             q2 = tmp + 1;
00356         }
00357
00358         v2 = atoi(r2);
00359
00360         if( v1 == v2 )
00361         {
00362             return CompareRevisions(q1.empty() ? (const char*)0L : q1.c_str(), q2.empty() ? (const char*)0L : q2.c_str());
00363         }
00364
00365         return v1 < v2 ? -1 : 1;
00366     }
00367
00368 public:
00369     // Interface
00370     virtual int GetColumnIndex() const
00371     {
00372         return ColumnIndex::kRevision;
00373     }
00374
00375     virtual void GetSetupData(LV_COLUMN* lvc) const
00376     {
00377 #ifdef WIN32
00378         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00379         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00380         lvc->cx = 50;
00381         lvc->fmt = LVCFMT_LEFT;
00382 #else
00383         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00384         lvc->width = PLATFORM_COLUMN_WIDTH(82, 70);
00385 #endif
00386     }
00387
00388     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00389     {
00390         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00391     }
00392
00393     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00394     {
00395         int res;
00396
00397         const char* s1 = (*d1)[GetColumnIndex()];
00398         const char* s2 = (*d2)[GetColumnIndex()];
00399
00400         if( s1 != 0L && s2 != 0L )
00401         {
00402             res = CompareRevisions(s1, s2);
00403         }
00404         else
00405         {
00406             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00407         }
00408
00409         return res;
00410     }
00411 } revisionColumn;
00412
00414 // KoOptionColumn
00415
00417 const class KoOptionColumn : public KiColumn
00418 {
00419 public:
00420     // Interface
00421     virtual int GetColumnIndex() const
00422     {
00423         return ColumnIndex::kOption;
00424     }
00425
00426     virtual void GetSetupData(LV_COLUMN* lvc) const
00427     {
00428 #ifdef WIN32
00429         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00430         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00431         lvc->cx = 50;
00432         lvc->fmt = LVCFMT_LEFT;
00433 #else
00434         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00435         lvc->width = 55;
00436 #endif
00437     }
00438
00439     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00440     {
00441         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00442     }
00443
00444     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00445     {
00446         int res;
00447
00448         const char* s1 = (*d1)[GetColumnIndex()];
00449         const char* s2 = (*d2)[GetColumnIndex()];
00450
00451         if( s1 != 0L && s2 != 0L )
00452         {
00453             res = strcmp(s1, s2);
00454         }
00455         else
00456         {
00457             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00458         }
00459
00460         return res;
00461     }
00462 } optionColumn;
00463
00465 // KoEncodingColumn
00466
00468 const class KoEncodingColumn : public KiColumn
00469 {
00470 public:
00471     // Interface
00472     virtual int GetColumnIndex() const
00473     {
00474         return ColumnIndex::kEncoding;
00475     }
00476
00477     virtual void GetSetupData(LV_COLUMN* lvc) const
00478     {
00479 #ifdef WIN32
00480         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00481         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00482         lvc->cx = 60;
00483         lvc->fmt = LVCFMT_LEFT;
00484 #else
00485         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00486         lvc->width = 60;
00487 #endif
00488     }
00489
00490     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00491     {
00492         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00493     }
00494
00495     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00496     {
00497         int res;
00498
00499         const char* s1 = (*d1)[GetColumnIndex()];
00500         const char* s2 = (*d2)[GetColumnIndex()];
00501
00502         if( s1 != 0L && s2 != 0L )
00503         {
00504             res = stricmp(s1, s2);
00505         }
00506         else
00507         {
00508             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00509         }
00510
00511         return res;
00512     }
00513 } encodingColumn;
00514
00516 // KoStateColumn
00517
00519 const class KoStateColumn : public KiColumn
00520 {
00521 public:
00522     // Interface
00523     virtual int GetColumnIndex() const
00524     {
00525         return ColumnIndex::kState;
00526     }
00527
00528     virtual void GetSetupData(LV_COLUMN* lvc) const
00529     {
00530 #ifdef WIN32
00531         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00532         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00533         lvc->cx = 70;
00534         lvc->fmt = LVCFMT_LEFT;
00535 #else
00536         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00537         lvc->width = PLATFORM_COLUMN_WIDTH(76, 70);
00538 #endif
00539     }
00540
00541     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00542     {
00543         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00544     }
00545
00546     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00547     {
00548         int res;
00549
00550         const char* s1 = (*d1)[GetColumnIndex()];
00551         const char* s2 = (*d2)[GetColumnIndex()];
00552
00553         if( s1 != 0L && s2 != 0L )
00554         {
00555             res = stricmp(s1, s2);
00556         }
00557         else
00558         {
00559             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00560         }
00561
00562         return res;
00563     }
00564 } stateColumn;
00565
00567 // KoTagColumn
00568
00570 const class KoTagColumn : public KiColumn
00571 {
00572 public:
00573     // Interface
00574     virtual int GetColumnIndex() const
00575     {
00576         return ColumnIndex::kStickyTag;
00577     }
00578
00579     virtual void GetSetupData(LV_COLUMN* lvc) const
00580     {
00581 #ifdef WIN32
00582         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00583         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00584         lvc->cx = 150;
00585         lvc->fmt = LVCFMT_LEFT;
00586 #else
00587         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00588         lvc->width = 90;
00589 #endif
00590     }
00591
00592     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00593     {
00594         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00595     }
00596
00597     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00598     {
00599         int res = 0;
00600
00601         const char* s1 = (*d1)[GetColumnIndex()];
00602         const char* s2 = (*d2)[GetColumnIndex()];
00603
00604         if( s1 != 0L && s2 != 0L )
00605         {
00606             res = strcmp(s1, s2);
00607         }
00608         else
00609         {
00610             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00611         }
00612
00613         return res;
00614
00615     }
00616 } tagColumn;
00617
00619 // KoDateColumn
00620
00622 const class KoDateColumn : public KiColumn
00623 {
00624 public:
00625     // Interface
00626     virtual int GetColumnIndex() const
00627     {
00628         return ColumnIndex::kTimeStamp;
00629     }
00630
00631     virtual void GetSetupData(LV_COLUMN* lvc) const
00632     {
00633 #ifdef WIN32
00634         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00635         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00636         lvc->cx = (IsLargeFonts()) ? 170 : 150;
00637         lvc->fmt = LVCFMT_LEFT;
00638 #else
00639         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00640         lvc->width = PLATFORM_COLUMN_WIDTH(172, 135);
00641 #endif
00642     }
00643
00644     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00645     {
00646         StrSafeCopy(buffer, (*data)[GetColumnIndex()], bufferSize);
00647     }
00648
00649     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00650     {
00651         int res = 0;
00652
00653         const char* s1 = (*d1)[GetColumnIndex()];
00654         const char* s2 = (*d2)[GetColumnIndex()];
00655
00656         if( s1 != 0L && s2 != 0L )
00657         {
00658             const time_t t1 = GetDateTime(s1);
00659             const time_t t2 = GetDateTime(s2);
00660
00661             res = t1 < t2 ? -1 : (t1 > t2 ? 1 : 0);
00662         }
00663         else
00664         {
00665             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00666         }
00667
00668         return res;
00669     }
00670 } dateColumn;
00671
00673 // KoConflictColumn
00674
00676 const class KoConflictColumn : public KiColumn
00677 {
00678 public:
00679     // Interface
00680     virtual int GetColumnIndex() const
00681     {
00682         return ColumnIndex::kConflict;
00683     }
00684
00685     virtual void GetSetupData(LV_COLUMN* lvc) const
00686     {
00687 #ifdef WIN32
00688         lvc->mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
00689         lvc->pszText = (char*)ColumnIndex::GetColumnName(GetColumnIndex());
00690         lvc->cx = 150;
00691         lvc->fmt = LVCFMT_LEFT;
00692 #else
00693         lvc->name = ColumnIndex::GetColumnName(GetColumnIndex());
00694         lvc->width = 100;
00695 #endif
00696     }
00697
00698     virtual void GetText(const KoColumnContext* context, const EntnodeData* data, char* buffer, const int bufferSize) const
00699     {
00700         StrSafeCopy(buffer, data->GetConflict(), bufferSize);
00701     }
00702
00703     virtual int Compare(const KoColumnContext* context, const EntnodeData* d1, const EntnodeData* d2) const
00704     {
00705         int res;
00706
00707         const char* s1 = d1->GetConflict();
00708         const char* s2 = d2->GetConflict();
00709
00710         if( s1 != 0L && s2 != 0L )
00711         {
00712             res = strcmp(s1, s2);
00713         }
00714         else
00715         {
00716             res = (long)s1 < (long)s2 ? -1 : ((long)s1 > (long)s2 ? 1 : 0);
00717         }
00718
00719         return res;
00720     }
00721 } conflictColumn;
00722
00724 // Columns
00725
00727 static const KiColumn* columnsRegular[] = {
00728     &nameColumn, &extColumn,
00729     &revisionColumn, &optionColumn, &encodingColumn, &stateColumn,
00730     &tagColumn, &dateColumn, &conflictColumn
00731 };
00732
00734 static const int typesRegular[] = {
00735     EntnodeData::kName, EntnodeFile::kExt,
00736     EntnodeFile::kVN, EntnodeFile::kOption, EntnodeFile::kEncoding, EntnodeData::kState,
00737     EntnodeFile::kTag, EntnodeFile::kTS, EntnodeFile::kConflict
00738 };
00739
00741 static const KiColumn* columnsRecursive[] = {
00742     &nameColumn, &extColumn, &pathColumn,
00743     &revisionColumn, &optionColumn, &encodingColumn, &stateColumn,
00744     &tagColumn, &dateColumn, &conflictColumn
00745 };
00746
00748 static const int typesRecursive[] = {
00749     EntnodeData::kName, EntnodeFile::kExt, EntnodeFile::kPath,
00750     EntnodeFile::kVN, EntnodeFile::kOption, EntnodeFile::kEncoding, EntnodeData::kState,
00751     EntnodeFile::kTag, EntnodeFile::kTS, EntnodeFile::kConflict
00752 };
00753
00755 // KoRegularModel
00756
00758 class KoRegularModel : public KiColumnModel
00759 {
00760 public:
00761     // Interface
00762     virtual const KiColumn* GetAt(const int pos) const
00763     {
00764         return columnsRegular[pos];
00765     }
00766
00767     virtual int GetType(const int pos) const
00768     {
00769         return typesRegular[pos];
00770     }
00771
00772     virtual int GetCount() const
00773     {
00774         return _countof(columnsRegular);
00775     }
00776 } modelRegular;
00777
00779 // KoRecursiveModel
00780
00782 class KoRecursiveModel : public KiColumnModel
00783 {
00784 public:
00785     // Interface
00786     virtual const KiColumn* GetAt(const int pos) const
00787     {
00788         return columnsRecursive[pos];
00789     }
00790
00791     virtual int GetType(const int pos) const
00792     {
00793         return typesRecursive[pos];
00794     }
00795
00796     virtual int GetCount() const
00797     {
00798         return _countof(columnsRecursive);
00799     }
00800 } modelRecursive;
00801
00803 // KiColumnModel
00804
00809 KiColumnModel* KiColumnModel::GetRecursiveModel()
00810 {
00811     return &modelRecursive;
00812 }
00813
00818 KiColumnModel* KiColumnModel::GetRegularModel()
00819 {
00820     return &modelRegular;
00821 }
00822
00828 int KiColumnModel::GetColumn(const int type) const
00829 {
00830     const int numColumns = GetCount();
00831
00832     for(int i = 0; i < numColumns; i++)
00833     {
00834         if( type == GetType(i) )
00835         {
00836             return i;
00837         }
00838     }
00839
00840     return 0;
00841 }
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

ENTNODE Member List

This is the complete list of members for ENTNODE, including all inherited members.

Compare(const ENTNODE &node1, const ENTNODE &node2) | ENTNODE | [inline, static]
Data() const | ENTNODE | [inline]
ENTNODE() | ENTNODE | [inline]
ENTNODE(EntnodeData *data) | ENTNODE | [inline]
ENTNODE(EntnodeData &data) | ENTNODE | [inline]
ENTNODE(const ENTNODE &anode) | ENTNODE | [inline]
operator EntnodeData *() const | ENTNODE | [inline]
operator=(const ENTNODE &anode) | ENTNODE |
shareData | ENTNODE | [protected]
~ENTNODE() | ENTNODE | [inline, virtual]

Generated on Sat Aug 7 22:52:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJLogoPane.cpp Source File

WinCvs/CJLib/CJLibrary/CJLogoPane.cpp

Go to the documentation of this file.
00001 // CJLogoPane.cpp : implementation file
00002 //
00003 // Copyright © 1999 Pierre MELLINAND
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 1999/11/30 21:45:49 $
00009  * $Revision: 1.1.1.1 $
00010  * $Archive: /CodeJock/CJLibrary/CJLogoPane.cpp $
00011  *
00012  * $History: CJLogoPane.cpp $
00013  *
00014  * *****************  Version 1  *****************
00015  * User: Kirk Stowell Date: 10/26/99   Time: 11:08p
00016  * Created in $/CodeJock/CJLibrary
00017  *
00018  ***************************************************************************/
00020
00021 #include "StdAfx.h"
00022 #include "CJLogoPane.h"
00023
00024 #ifdef _DEBUG
00025 #define new DEBUG_NEW
00026 #undef THIS_FILE
00027 static char THIS_FILE[] = __FILE__;
00028 #endif
00029
00031 // CCJLogoPane
00032
00033 CCJLogoPane::CCJLogoPane()
00034 {
00035     SetLogoFont(_T("Arial"));
00036 }
00037
00038 CCJLogoPane::~CCJLogoPane()
00039 {
00040     m_Font.DeleteObject();
00041 }
00042
00043 IMPLEMENT_DYNCREATE(CCJLogoPane, CWnd)
00044
00045 BEGIN_MESSAGE_MAP(CCJLogoPane, CWnd)
00046     //{{AFX_MSG_MAP(CCJLogoPane)
00047     ON_WM_PAINT()
00048     //}}AFX_MSG_MAP
00049 END_MESSAGE_MAP()
00050
00052 // CCJLogoPane message handlers
00053
00054 void CCJLogoPane::SetLogoFont(LPCTSTR lpszFontName, int nHeight/*=24*/,
00055     int nWeight/*=FW_BOLD*/, BOOL bItalic/*=TRUE*/, BOOL bUnderline/*=FALSE*/)
00056 {
00057     if(m_Font.m_hObject) {
00058         m_Font.DeleteObject();
00059     }
00060
00061     m_Font.CreateFont(nHeight, 0, 0, 0, nWeight, (BYTE)bItalic, (BYTE)bUnderline, 0,0,0,0,0,0, lpszFontName);
00062 }
00063
00064 void CCJLogoPane::OnPaint()
00065 {
00066     CPaintDC dc(this); // device context for painting
00067
00068     CRect rect;
00069     GetWindowRect(rect);
00070
00071     dc.SetBkMode(TRANSPARENT);
00072
00073     CFont * OldFont = dc.SelectObject(&m_Font);
00074
00075     // draw text in DC
00076     COLORREF OldColor = dc.SetTextColor(::GetSysColor( COLOR_3DHILIGHT));
00077
00078     rect.right  = rect.Width();
00079     rect.bottom = rect.Height();
00080     rect.left   = rect.top = 0;
00081     dc.FillSolidRect(rect, ::GetSysColor(COLOR_3DFACE));
00082
00083     dc.DrawText( m_strLogoText, rect + CPoint(1,1), DT_SINGLELINE | DT_LEFT | DT_VCENTER);
00084     dc.SetTextColor( ::GetSysColor( COLOR_3DSHADOW));
00085     dc.DrawText( m_strLogoText, rect, DT_SINGLELINE | DT_LEFT | DT_VCENTER);
00086
00087     // restore old text color
00088     dc.SetTextColor( OldColor);
00089     // restore old font
00090     dc.SelectObject(OldFont);
00091 }
00092
00093 BOOL CCJLogoPane::Create(LPCTSTR lpszWindowName, DWORD dwStyle, CWnd* pParentWnd, UINT nID)
00094 {
00095     CString wndClass = ::AfxRegisterWndClass(CS_BYTEALIGNCLIENT);
00096
00097     if(!CWnd::Create(wndClass, lpszWindowName, dwStyle, CRect(0,0,0,0), pParentWnd, nID)) {
00098         return FALSE;
00099     }
00100
00101     m_strLogoText = lpszWindowName;
00102     return TRUE;
00103 }
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/gtk/stdafx.h Source File

rf/support/gtk/stdafx.h

Go to the documentation of this file.
00001 /* compatibility */
00002 #ifdef HAVE_CONFIG_H
00003 #include "config.h"
00004 #endif /* HAVE_CONFIG_H */
00005
00006 /* the GTK assert */
00007 #define UASSERT g_assert
00008
00009 #include <gtk/gtk.h>
00010
00011 extern "C" {
00012     GtkLabel *getLabelFromContainer(GtkContainer *w);
00013 }
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

RemoveCvsArgs Member List

This is the complete list of members for RemoveCvsArgs, including all inherited members.

add(const char *arg) | CvsArgs | [virtual]
addfile(const char *arg, const char *dir=0L, const FSSpec *spec=0L, const char *currRevision=0L) | RemoveCvsArgs | [virtual]
Argc(void) const | CvsArgs |
argc | CvsArgs | [protected]
argv | CvsArgs | [protected]
Argv(void) const | CvsArgs |
CvsArgs(bool defargs=true) | CvsArgs |
CvsArgs(char *const *fromargv, int fromargc) | CvsArgs |
parse(const char *arg) | CvsArgs | [virtual]
print(const char *indirectory=0L) | CvsArgs |
reset(bool defargs=true) | CvsArgs |
~CvsArgs() | CvsArgs | [virtual]

Generated on Sat Aug 7 22:56:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CBrowserBar Member List

This is the complete list of members for CBrowserBar, including all inherited members.

CBrowserBar() | CBrowserBar | [protected]
Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CBrowserBar | [virtual]
GetBrowserView() | CBrowserBar | [inline]
m_browser | CBrowserBar | [protected]
OnDestroy() | CBrowserBar | [protected]
OnDraw(CDC *pDC) | CBrowserBar | [protected, virtual]
OnPaint() | CBrowserBar | [protected]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CBrowserBar | [protected]
~CBrowserBar() | CBrowserBar | [virtual]

Generated on Sat Aug 7 22:48:42 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/DiffDlg.h Source File

common/DiffDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * DiffDlg.h : the cvs diff dialog
00023  */
00024
00025 #if !defined(AFX_DIFFDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_DIFFDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "SmartComboBox.h"
00033 #include "KeywordComboBox.h"
00034 #include "uwidget.h"
00035 #include "CvsCommands.h"
00036
00037 #ifdef WIN32
00038 #   include "SortHeaderCtrl.h"
00039 #   include "HHelpSupport.h"
00040 #endif
00041
00042 class MultiFiles;
00043
00045 enum
00046 {
00047     kCompareSameRev = 0,
00048     kCompareAnotherRev,
00049     kCompareTwoRev
00050 };
00051
00052 bool CompatGetDiff(const MultiFiles* mf, kDiffCmdType diffType,
00053                    bool& noRecurs, bool& isDate1, bool& isDate2,
00054                    CStr& rev1, CStr& rev2, bool& useExtDiff, CStr& extDiffTool,
00055                    bool& useUnifiedDiff, bool& noWhiteSpace, bool& noBlankLines, bool& ignoreCase,
00056                    CStr& keyword, CStr& diffOptions,
00057                    bool allowExtDiff = false);
00058
00059 #ifdef WIN32
00060
00061 class CDiff_MAIN : public CHHelpPropertyPage
00062 {
00063     DECLARE_DYNAMIC(CDiff_MAIN)
00064
00065 // Construction
00066 public:
00067     CDiff_MAIN(const MultiFiles* mf, kDiffCmdType diffType,
00068         const char* rev1, const char* rev2,
00069         bool allowExtDiff, bool useExtDiff,
00070         bool unifiedDiff, bool noWhiteSpace, bool ignoreCase,
00071         const char* keyword, const char* diffOptions);
00072     ~CDiff_MAIN();
00073
00074 // Dialog Data
00075     //{{AFX_DATA(CDiff_MAIN)
00076     enum { IDD = IDD_DIFF_MAIN };
00077     CSmartComboBox  m_diffOptionsCombo;
00078     CButton m_noWhiteSpaceCheck;
00079     CButton m_ignoreCaseCheck;
00080     CButton m_extDiffButton;
00081     CButton m_optionsMenuButton;
00082     CButton m_noRecursCheck;
00083     CButton m_unifiedDiffCheck;
00084     CStatic m_keywordDescStatic;
00085     CKeywordComboBox    m_keywordCombo;
00086     CButton m_browseTag2Button;
00087     CButton m_browseTag1Button;
00088     CButton m_isDate2Check;
00089     CButton m_isDate1Check;
00090     CSmartComboBox  m_compareTypeCombo;
00091     CSmartComboBox  m_rev2Combo;
00092     CSmartComboBox  m_rev1Combo;
00093     BOOL    m_isDate1;
00094     BOOL    m_isDate2;
00095     CString m_rev1;
00096     CString m_rev2;
00097     BOOL    m_noWhiteSpace;
00098     BOOL    m_ignoreCase;
00099     int     m_compareType;
00100     BOOL    m_unifiedDiff;
00101     CString m_keyword;
00102     BOOL    m_noRecurs;
00103     BOOL    m_extDiff;
00104     CString m_diffOptions;
00105     //}}AFX_DATA
00106
00107 // Overrides
00108     // ClassWizard generate virtual function overrides
00109     //{{AFX_VIRTUAL(CDiff_MAIN)
00110     protected:
00111     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00112     //}}AFX_VIRTUAL
00113
00114 // Implementation
00115 protected:
00116     // Generated message map functions
00117     //{{AFX_MSG(CDiff_MAIN)
00118     afx_msg void OnExtdiff();
00119     afx_msg void OnCheck1();
00120     afx_msg void OnCheck2();
00121     afx_msg void OnBrowseTag1();
00122     afx_msg void OnBrowseTag2();
00123     afx_msg void OnSelchangeCompareType();
00124     virtual BOOL OnInitDialog();
00125     afx_msg void OnOptionsmenu();
00126     //}}AFX_MSG
00127     DECLARE_MESSAGE_MAP()
00128 private:
00130     typedef enum
00131     {
00132         kDefRev1Change,
00133         kDefRev2Change,
00134         kDefTypeChange
00135     } kInputChange;
00136
00137
00138     // Data members
00139     const MultiFiles* m_mf;
00140     bool m_allowExtDiff;
00141     kDiffCmdType m_diffType;
00142
00143     // Methods
00144     virtual void InitHelpID();
00145
00146     void EnableCompareType(const int compareType);
00147     void EnableCmdLineDiffOptions(bool enable);
00148
00149     void SetDefaultInput(const kInputChange inputChange, const int compareType);
00150     bool IsDefaultedRev(const CComboBox* comboBox);
00151 };
00152
00154 // CDiff_Options dialog
00155
00156 class CDiff_Options : public CHHelpDialog
00157 {
00158 // Construction
00159 public:
00160     CDiff_Options(CWnd* pParent = NULL);   // standard constructor
00161
00162 // Dialog Data
00163     //{{AFX_DATA(CDiff_Options)
00164     enum { IDD = IDD_DIFF_OPTIONS };
00165     CListCtrl   m_optionsListCtrl;
00166     CString m_currentOptions;
00167     //}}AFX_DATA
00168
00169
00170 // Overrides
00171     // ClassWizard generated virtual function overrides
00172     //{{AFX_VIRTUAL(CDiff_Options)
00173     protected:
00174     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00175     //}}AFX_VIRTUAL
00176
00177 // Implementation
00178 protected:
00179
00180     // Generated message map functions
00181     //{{AFX_MSG(CDiff_Options)
00182     virtual void OnOK();
00183     afx_msg void OnItemchangedOptionslist(NMHDR* pNMHDR, LRESULT* pResult);
00184     afx_msg void OnColumnclickOptionslist(NMHDR* pNMHDR, LRESULT* pResult);
00185     virtual BOOL OnInitDialog();
00186     afx_msg void OnHelp();
00187     //}}AFX_MSG
00188     DECLARE_MESSAGE_MAP()
00189 private:
00190     // Data members
00191     CString m_diffOptions;
00193     // Sorting
00195     typedef struct
00196     {
00197         int m_column;
00198         bool m_asc;
00199     } CompareInfo;
00200
00201     bool m_sortAsc;
00202     int m_sortColumn;
00203     CSortHeaderCtrl m_headerCtrl;
00204
00205     // Methods
00206     virtual void InitHelpID();
00207
00208     void SortItems(int column, bool asc);
00209     static int CALLBACK CompareItems(LPARAM itemData1, LPARAM itemData2, LPARAM lParam);
00210
00211 public:
00212     // Interface
00213     CString GetDiffOptions();
00214 };
00215
00216 //{{AFX_INSERT_LOCATION}}
00217 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00218 #endif /* WIN32 */
00219
00220 #ifdef qUnix
00221 #ifdef _DIFF_CPP_
00222 class UCvsDiff : public UWidget
00223 {
00224     UDECLARE_DYNAMIC(UCvsDiff)
00225 public:
00226     UCvsDiff() : UWidget(::UEventGetWidID()) {}
00227     virtual ~UCvsDiff() {}
00228
00229     enum
00230     {
00231         kOK = EV_COMMAND_START, // 0
00232         kCancel,                // 1
00233         kTabGeneral             // 2
00234     };
00235
00236     virtual void DoDataExchange(bool fill);
00237
00238 protected:
00239     ev_msg int OnOK(void);
00240     ev_msg int OnCancel(void);
00241
00242     UDECLARE_MESSAGE_MAP()
00243 };
00244
00245 UIMPLEMENT_DYNAMIC(UCvsDiff, UWidget)
00246
00247 UBEGIN_MESSAGE_MAP(UCvsDiff, UWidget)
00248     ON_UCOMMAND(UCvsDiff::kOK, UCvsDiff::OnOK)
00249     ON_UCOMMAND(UCvsDiff::kCancel, UCvsDiff::OnCancel)
00250 UEND_MESSAGE_MAP()
00251
00252 class UCvsDiff_MAIN : public UWidget
00253 {
00254     UDECLARE_DYNAMIC(UCvsDiff_MAIN)
00255 public:
00256     UCvsDiff_MAIN(const char *rev1, const char *rev2, bool allowExtDiff, bool useUnifiedDiff,
00257                   bool noWhiteSpace, bool noBlankLines, bool ignoreCase);
00258     virtual ~UCvsDiff_MAIN() {}
00259
00260     enum
00261     {
00262         kCheckDiff1 = EV_COMMAND_START, // 0
00263         kCheckDiff2,            // 1
00264         kCheckDiff3,            // 2
00265         kCheckDate1,            // 3
00266         kCheckDate2,            // 4
00267         kComboRev1,             // 5
00268         kComboRev2,             // 6
00269         kCheckRecurs,           // 7
00270         kCheckExtDiff,          // 8
00271         kCheckNoWhiteSpace,     // 9
00272         kCheckIgnoreCase,       // 10
00273         kCheckNoBlankLines,     // 11
00274         kCheckUnifiedDiff       // 12
00275     };
00276
00277     virtual void DoDataExchange(bool fill);
00278
00279     bool m_check1;
00280     bool m_check2;
00281     UStr m_rev1;
00282     UStr m_rev2;
00283     int m_diff;
00284     bool m_norecurs;
00285     bool m_extdiff;
00286     bool m_unifiedDiff;
00287     bool m_allowExtDiff;
00288     bool m_noWhiteSpace;
00289     bool m_noBlankLines;
00290     bool m_ignoreCase;
00291
00292 protected:
00293     ev_msg int OnDiff(int cmd);
00294
00295     UDECLARE_MESSAGE_MAP()
00296 };
00297
00298 UIMPLEMENT_DYNAMIC(UCvsDiff_MAIN, UWidget)
00299
00300 UBEGIN_MESSAGE_MAP(UCvsDiff_MAIN, UWidget)
00301     ON_UCOMMAND_RANGE(UCvsDiff_MAIN::kCheckDiff1, UCvsDiff_MAIN::kCheckDiff2, UCvsDiff_MAIN::OnDiff)
00302 UEND_MESSAGE_MAP()
00303 #endif // _DIFF_CPP_
00304
00305 #endif // qUnix
00306
00307 #endif // !defined(AFX_DIFFDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoRotateIconButton Member List

This is the complete list of members for TPseudoRotateIconButton, including all inherited members.

DoRotate(int icon) | TPseudoRotateIconButton | [private]
fCurrentIcon | TPseudoRotateIconButton | [protected]
fIconSuite | TPseudoRotateIconButton | [protected]
MA_DECLARE_CLASS | TPseudoRotateIconButton | [private]
ReadFields(CStream_AC *aStream) | TPseudoRotateIconButton | [private, virtual]
TPseudoRotateIconButton() | TPseudoRotateIconButton | [private]
WriteFields(CStream_AC *aStream) const | TPseudoRotateIconButton | [private, virtual]
~TPseudoRotateIconButton() | TPseudoRotateIconButton | [private, virtual]

Generated on Sat Aug 7 22:57:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoImportHandler Member List

This is the complete list of members for KoImportHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoImportHandler() | KoImportHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoImportHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoImportHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:18 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CGetPrefs_CVS Member List

This is the complete list of members for CGetPrefs_CVS, including all inherited members.

CGetPrefs_CVS() | CGetPrefs_CVS |
CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CGetPrefs_CVS | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CGetPrefs_CVS |
InitHelpID() | CGetPrefs_CVS | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_altCvs | CGetPrefs_CVS |
m_altCvsCombo | CGetPrefs_CVS |
m_cvsConsole | CGetPrefs_CVS |
m_cvsConsoleCheck | CGetPrefs_CVS |
m_didInteract | CGetPrefs_CVS | [private]
m_home | CGetPrefs_CVS |
m_homeEdit | CGetPrefs_CVS |
m_selAltCvsButton | CGetPrefs_CVS |
m_showCvs | CGetPrefs_CVS |
m_showCvsCombo | CGetPrefs_CVS |
m_useAltCvs | CGetPrefs_CVS |
m_useAltCvsCheck | CGetPrefs_CVS |
OnAltcvschk() | CGetPrefs_CVS | [protected]
OnAltcvssel() | CGetPrefs_CVS | [protected]
OnBtnhome() | CGetPrefs_CVS | [protected]
OnConsole() | CGetPrefs_CVS | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CGetPrefs_CVS | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
StoreValues() | CGetPrefs_CVS |
~CGetPrefs_CVS() | CGetPrefs_CVS |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJHexEdit.cpp Source File

WinCvs/CJLib/CJLibrary/CJHexEdit.cpp

Go to the documentation of this file.
00001 // CJHexEdit.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the article "HexEdit Control" by Andreas Saurwein [saurwein@uniwares.com]
00006 // http://www.codeguru.com/editctrl/hexeditctrl.shtml
00007 //
00009 /****************************************************************************
00010  *
00011  * $Date: 2002/06/15 17:49:37 $
00012  * $Revision: 1.2 $
00013  * $Archive: /CodeJock/CJLibrary/CJHexEdit.cpp $
00014  *
00015  * $History: CJHexEdit.cpp $
00016  *
00017  * *****************  Version 2  *****************
00018  * User: Kirk Stowell Date: 10/30/99   Time: 9:50p
00019  * Updated in $/CodeJock/CJLibrary
00020  *
00021  * *****************  Version 1  *****************
00022  * User: Kirk Stowell Date: 10/30/99   Time: 9:20p
00023  * Created in $/CodeJock/CJLibrary
00024  *
00025  ***************************************************************************/
00027
00028 #include "StdAfx.h"
00029 #include "CJResource.h"
00030 #include "CJHexEdit.h"
00031 #include <ctype.h>
00032 #include <afxole.h>
00033 #include <afxdisp.h>
00034
00035 #ifdef _DEBUG
00036 #define new DEBUG_NEW
00037 #undef THIS_FILE
00038 static char THIS_FILE[] = __FILE__;
00039 #endif
00040
00041 char hextable[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
00042 #define TOHEX(a, b) {*b++ = hextable[a >> 4];*b++ = hextable[a&0xf];}
00043
00045 // CCJHexEdit
00046
00047 CCJHexEdit::CCJHexEdit()
00048 {
00049     m_pData         = NULL;     // pointer to data
00050     m_length        = 0;        // length of data
00051     m_length        = 0x40;
00052     m_topindex      = 0;
00053     m_bpr           = 8;        // byte per row
00054     m_lpp           = 1;
00055
00056     m_bShowHex      = TRUE;
00057     m_bShowAscii    = TRUE;
00058     m_bShowAddress  = TRUE;
00059     m_bAddressIsWide= TRUE;     // 4/8 byte address
00060
00061     m_offAddress    = 0;
00062     m_offHex        = 0;
00063     m_offAscii      = 0;
00064
00065     m_bUpdate = TRUE;           // update font info
00066     m_bNoAddressChange = FALSE;
00067     m_currentMode = EDIT_NONE;
00068
00069     m_editPos.x = m_editPos.y = 0;
00070     m_currentAddress = 0;
00071     m_bHalfPage = TRUE;
00072
00073     m_selStart  = 0xffffffff;
00074     m_selEnd    = 0xffffffff;
00075
00076     m_Font.CreateFont(-12, 0,0,0,0,0,0,0,0,0,0,0,0, _T("Courier New"));
00077
00078     AfxOleInit();
00079 }
00080
00081 CCJHexEdit::~CCJHexEdit()
00082 {
00083     m_Font.DeleteObject();
00084 }
00085
00086 IMPLEMENT_DYNAMIC(CCJHexEdit, CEdit)
00087
00088 BEGIN_MESSAGE_MAP(CCJHexEdit, CEdit)
00089     //{{AFX_MSG_MAP(CCJHexEdit)
00090     ON_WM_CHAR()
00091     ON_WM_KILLFOCUS()
00092     ON_WM_PAINT()
00093     ON_WM_SETFOCUS()
00094     ON_WM_VSCROLL()
00095     ON_WM_GETDLGCODE()
00096     ON_WM_ERASEBKGND()
00097     ON_WM_LBUTTONDOWN()
00098     ON_WM_MOUSEMOVE()
00099     ON_WM_LBUTTONUP()
00100     ON_WM_KEYDOWN()
00101     ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
00102     ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
00103     ON_COMMAND(ID_EDIT_CUT, OnEditCut)
00104     ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
00105     ON_COMMAND(ID_EDIT_SELECT_ALL, OnEditSelectAll)
00106     ON_COMMAND(ID_EDIT_UNDO, OnEditUndo)
00107     ON_WM_CONTEXTMENU()
00108     ON_WM_HSCROLL()
00109     ON_WM_LBUTTONDBLCLK()
00110     //}}AFX_MSG_MAP
00111 END_MESSAGE_MAP()
00112
00114 // CCJHexEdit message handlers
00115
00116 void CCJHexEdit::OnPaint()
00117 {
00118     CPaintDC dc(this); // device context for painting
00119
00120     // KStowell - Get the client rect.
00121     CRect rcClient;
00122     GetClientRect( &rcClient );
00123
00124     // KStowell - Create a memory device-context. This is done to help reduce
00125     // screen flicker, since we will paint the entire control to the
00126     // off screen device context first.
00127     CDC memDC;
00128     CBitmap bitmap;
00129     memDC.CreateCompatibleDC(&dc);
00130     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00131     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00132
00133     // KStowell - Repaint the background.
00134     memDC.FillSolidRect( rcClient, ::GetSysColor(COLOR_WINDOW) );
00135
00136     ASSERT(m_currentAddress >= 0);
00137     ASSERT(m_topindex >= 0);
00138
00139     CFont* pOldFont = memDC.SelectObject(&m_Font);
00140     int     height      = 0;
00141     int     x,y;
00142     TCHAR   buf[256];
00143
00144     x = rcClient.TopLeft().x;
00145     y = rcClient.TopLeft().y;
00146
00147     memDC.SetBoundsRect(&rcClient, DCB_DISABLE);
00148
00149     if(m_pData)
00150     {
00151         //
00152         // get char dimensions
00153         //
00154         if(m_bUpdate)
00155         {
00156             memDC.GetCharWidth('0', '0', &m_nullWidth);
00157             CSize sz = memDC.GetTextExtent(_T("0"), 1);
00158             m_lineHeight = sz.cy;
00159
00160             m_offHex    = m_bShowAddress ? (m_bAddressIsWide ? m_nullWidth * 9 : m_nullWidth * 5) : 0;
00161             m_offAscii  = m_bShowAddress ? (m_bAddressIsWide ? m_nullWidth * 9 : m_nullWidth * 5) : 0;
00162             m_offAscii += m_bShowHex     ? (m_bpr * 3 * m_nullWidth) : 0;
00163
00164             m_lpp = rcClient.Height() / m_lineHeight;
00165             m_bHalfPage = FALSE;
00166             if(m_lpp * m_bpr > m_length)
00167             {
00168                 m_lpp = (m_length + (m_bpr/2)) / m_bpr ;
00169                 if(m_length % m_bpr != 0)
00170                 {
00171                     m_bHalfPage = TRUE;
00172                     m_lpp++;
00173                 }
00174             }
00175             m_bUpdate = FALSE;
00176             UpdateScrollbars();
00177         }
00178
00179         height = rcClient.Height() / m_lineHeight;
00180         height *= m_lineHeight;
00181
00182         if(m_bShowAddress)
00183         {
00184             TCHAR fmt[8] = {'%','0','8','l','X'};
00185             fmt[2] = m_bAddressIsWide ? '8' : '4';
00186             int w = m_bAddressIsWide ? 8 : 4;
00187             y = 0;
00188             CRect rcd = rcClient;
00189             rcd.TopLeft().x = m_offAddress;
00190             for(int  i = m_topindex; (i < m_length) && (rcd.TopLeft().y < height); i+= m_bpr)
00191             {
00192                 _stprintf(buf, fmt, i);
00193                 memDC.DrawText(buf, w, rcd, DT_LEFT|DT_TOP|DT_SINGLELINE|DT_NOPREFIX);
00194                 rcd.TopLeft().y += m_lineHeight;
00195             }
00196         }
00197         if(m_bShowHex)
00198         {
00199             y = 0;
00200             CRect rcd = rcClient;
00201             rcd.TopLeft().x = x = m_offHex;
00202
00203             if(m_selStart != 0xffffffff && (m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW))
00204             {
00205                 int  i;
00206                 int  n = 0;
00207                 int  selStart = m_selStart, selEnd = m_selEnd;
00208                 if(selStart > selEnd)
00209                     selStart ^= selEnd ^= selStart ^= selEnd;
00210
00211                 for(i = m_topindex; (i < selStart) && (y < height); i++)
00212                 {
00213                     LPTSTR p = &buf[0];
00214
00215                     TOHEX(m_pData[i], p);
00216
00217                     *p++ = ' ';
00218                     memDC.TextOut(x, y, buf, 3);
00219                     x += m_nullWidth * 3;
00220                     n++;
00221                     if(n == m_bpr)
00222                     {
00223                         n = 0;
00224                         x = m_offHex;
00225                         y += m_lineHeight;
00226                     }
00227                 }
00228
00229                 memDC.SetTextColor(GetSysColor(COLOR_HIGHLIGHTTEXT));
00230                 memDC.SetBkColor(GetSysColor(COLOR_HIGHLIGHT));
00231                 for(; (i < selEnd) && (i < m_length) && (y < height); i++)
00232                 {
00233                     LPTSTR p = &buf[0];
00234
00235                     TOHEX(m_pData[i], p);
00236
00237                     *p++ = ' ';
00238                     memDC.TextOut(x, y, buf, 3);
00239                     x += m_nullWidth * 3;
00240                     n++;
00241                     if(n == m_bpr)
00242                     {
00243                         n = 0;
00244                         x = m_offHex;
00245                         y += m_lineHeight;
00246                     }
00247                 }
00248                 memDC.SetTextColor(GetSysColor(COLOR_WINDOWTEXT));
00249                 memDC.SetBkColor(GetSysColor(COLOR_WINDOW));
00250                 for(; (i < m_length) && (y < height); i++)
00251                 {
00252                     LPTSTR p = &buf[0];
00253
00254                     TOHEX(m_pData[i], p);
00255
00256                     *p++ = ' ';
00257                     memDC.TextOut(x, y, buf, 3);
00258                     x += m_nullWidth * 3;
00259                     n++;
00260                     if(n == m_bpr)
00261                     {
00262                         n = 0;
00263                         x = m_offHex;
00264                         y += m_lineHeight;
00265                     }
00266                 }
00267             }
00268             else
00269             {
00270                 for(int  i = m_topindex; (i < m_length) && (rcd.TopLeft().y < height);)
00271                 {
00272                     LPTSTR p = &buf[0];
00273
00274                     for(int  n = 0; (n < m_bpr) && (i < m_length); n++)
00275                     {
00276                         TOHEX(m_pData[i], p);
00277                         *p++ = ' ';
00278                         i++;
00279                     }
00280
00281                     while(n < m_bpr)
00282                     {
00283                         *p++ = ' '; *p++ = ' '; *p++ = ' ';
00284                         n++;
00285                     }
00286
00287                     memDC.DrawText(buf, m_bpr*3, rcd, DT_LEFT|DT_TOP|DT_SINGLELINE|DT_NOPREFIX);
00288                     rcd.TopLeft().y += m_lineHeight;
00289                 }
00290             }
00291         }
00292         if(m_bShowAscii)
00293         {
00294             y = 0;
00295             CRect rcd = rcClient;
00296             rcd.TopLeft().x = x = m_offAscii;
00297             if(m_selStart != 0xffffffff && m_currentMode == EDIT_ASCII)
00298             {
00299                 int  i;
00300                 int  n = 0;
00301                 int  selStart = m_selStart, selEnd = m_selEnd;
00302                 if(selStart > selEnd)
00303                     selStart ^= selEnd ^= selStart ^= selEnd;
00304
00305                 for(i = m_topindex; (i < selStart) && (y < height); i++)
00306                 {
00307                     buf[0] = isprint(m_pData[i]) ? m_pData[i] : '.';
00308                     memDC.TextOut(x, y, buf, 1);
00309                     x += m_nullWidth;
00310                     n++;
00311                     if(n == m_bpr)
00312                     {
00313                         n = 0;
00314                         x = m_offAscii;
00315                         y += m_lineHeight;
00316                     }
00317                 }
00318                 memDC.SetTextColor(GetSysColor(COLOR_HIGHLIGHTTEXT));
00319                 memDC.SetBkColor(GetSysColor(COLOR_HIGHLIGHT));
00320                 for(; (i < selEnd) && (y < height); i++)
00321                 {
00322                     buf[0] = isprint(m_pData[i]) ? m_pData[i] : '.';
00323                     memDC.TextOut(x, y, buf, 1);
00324                     x += m_nullWidth;
00325                     n++;
00326                     if(n == m_bpr)
00327                     {
00328                         n = 0;
00329                         x = m_offAscii;
00330                         y += m_lineHeight;
00331                     }
00332                 }
00333                 memDC.SetTextColor(GetSysColor(COLOR_WINDOWTEXT));
00334                 memDC.SetBkColor(GetSysColor(COLOR_WINDOW));
00335                 for(; (i < m_length) && y < height; i++)
00336                 {
00337                     buf[0] = isprint(m_pData[i]) ? m_pData[i] : '.';
00338                     memDC.TextOut(x, y, buf, 1);
00339                     x += m_nullWidth;
00340                     n++;
00341                     if(n == m_bpr)
00342                     {
00343                         n = 0;
00344                         x = m_offAscii;
00345                         y += m_lineHeight;
00346                     }
00347                 }
00348             }
00349             else
00350             {
00351                 for(int  i = m_topindex; (i < m_length) && (rcd.TopLeft().y < height);)
00352                 {
00353                     LPTSTR p = &buf[0];
00354
00355                     for(int  n = 0; (n < m_bpr) && (i < m_length); n++)
00356                     {
00357                         *p++ = isprint(m_pData[i]) ? m_pData[i] : '.';
00358                         i++;
00359                     }
00360
00361                     memDC.DrawText(buf, n, rcd, DT_LEFT|DT_TOP|DT_SINGLELINE|DT_NOPREFIX);
00362                     rcd.TopLeft().y += m_lineHeight;
00363                 }
00364             }
00365         }
00366     }
00367
00368     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00369     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00370
00371     // KStowell - Cleanup resources.
00372     memDC.SelectObject(pOldBitmap);
00373     memDC.SelectObject(pOldFont);
00374     memDC.DeleteDC();
00375     bitmap.DeleteObject();
00376 }
00377
00378 void CCJHexEdit::OnSetFocus(CWnd* pOldWnd)
00379 {
00380     if(m_pData && !IsSelected())
00381     {
00382         if(m_editPos.x == 0 && m_bShowAddress)
00383             CreateAddressCaret();
00384         else
00385             CreateEditCaret();
00386         SetCaretPos(m_editPos);
00387         ShowCaret();
00388     }
00389     CWnd::OnSetFocus(pOldWnd);
00390 }
00391
00392 void CCJHexEdit::OnKillFocus(CWnd* pNewWnd)
00393 {
00394     DestroyCaret();
00395     CWnd::OnKillFocus(pNewWnd);
00396 }
00397
00398 void CCJHexEdit::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
00399 {
00400     UNUSED_ALWAYS(pScrollBar);
00401
00402     if(!m_pData) {
00403         return;
00404     }
00405
00406     int oa = m_topindex;
00407     switch(nSBCode)
00408     {
00409         case SB_LINEDOWN:
00410             if(m_topindex < m_length - m_lpp*m_bpr)
00411             {
00412                 m_topindex += m_bpr;
00413                 RedrawWindow();
00414             }
00415             break;
00416
00417         case SB_LINEUP:
00418             if(m_topindex > 0)
00419             {
00420                 m_topindex -= m_bpr;
00421                 RedrawWindow();
00422             }
00423             break;
00424
00425         case SB_PAGEDOWN:
00426             if(m_topindex < m_length - m_lpp*m_bpr)
00427             {
00428                 m_topindex += m_bpr * m_lpp;
00429                 if(m_topindex > m_length - m_lpp*m_bpr)
00430                     m_topindex = m_length - m_lpp*m_bpr;
00431                 RedrawWindow();
00432             }
00433             break;
00434
00435         case SB_PAGEUP:
00436             if(m_topindex > 0)
00437             {
00438                 m_topindex -= m_bpr * m_lpp;
00439                 if(m_topindex < 0)
00440                     m_topindex = 0;
00441                 RedrawWindow();
00442             }
00443             break;
00444
00445         case SB_THUMBTRACK:
00446             m_topindex = nPos * m_bpr;
00447             RedrawWindow();
00448             break;
00449     }
00450     ::SetScrollPos(this->m_hWnd, SB_VERT, m_topindex / m_bpr, TRUE);
00451     if(!m_bNoAddressChange)
00452         m_currentAddress += (m_topindex - oa);
00453     RepositionCaret(m_currentAddress);
00454 }
00455
00456 BOOL CCJHexEdit::PreCreateWindow(CREATESTRUCT& cs)
00457 {
00458     if(!CEdit::PreCreateWindow(cs)) {
00459         return FALSE;
00460     }
00461
00462     cs.style |= WS_HSCROLL|WS_VSCROLL;
00463     return TRUE;
00464 }
00465
00466 BOOL CCJHexEdit::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
00467 {
00468     if(!CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext)) {
00469         return FALSE;
00470     }
00471
00472     SetFont(&m_Font);
00473     return TRUE;
00474 }
00475
00476 BOOL CCJHexEdit::OnEraseBkgnd(CDC* pDC)
00477 {
00478     // KStowell - overridden for flicker-free drawing.
00479     UNUSED_ALWAYS(pDC);
00480     return TRUE;
00481 }
00482
00483 void CCJHexEdit::OnLButtonDown(UINT nFlags, CPoint point)
00484 {
00485     SetFocus();
00486     if(!m_pData)
00487         return;
00488
00489     if(nFlags & MK_SHIFT)
00490     {
00491         m_selStart = m_currentAddress;
00492     }
00493     CPoint pt = CalcPos(point.x, point.y);
00494     if(pt.x > -1)
00495     {
00496         m_editPos = pt;
00497         pt.x *= m_nullWidth;
00498         pt.y *= m_lineHeight;
00499
00500         if(pt.x == 0 && m_bShowAddress)
00501             CreateAddressCaret();
00502         else
00503             CreateEditCaret();
00504
00505         SetCaretPos(pt);
00506         if(nFlags & MK_SHIFT)
00507         {
00508             m_selEnd = m_currentAddress;
00509             if(m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW)
00510                 m_selEnd++;
00511             RedrawWindow();
00512         }
00513     }
00514     if(!(nFlags & MK_SHIFT))
00515     {
00516         if(::DragDetect(this->m_hWnd, point))
00517         {
00518             m_selStart = m_currentAddress;
00519             m_selEnd   = m_selStart;
00520             SetCapture();
00521         }
00522         else
00523         {
00524             BOOL bsel = m_selStart != 0xffffffff;
00525
00526             m_selStart = 0xffffffff;
00527             m_selEnd   = 0xffffffff;
00528             if(bsel)
00529                 RedrawWindow();
00530         }
00531     }
00532     if(!IsSelected())
00533     {
00534         ShowCaret();
00535     }
00536 }
00537
00538 CPoint CCJHexEdit::CalcPos(int x, int y)
00539 {
00540     y /= m_lineHeight;
00541     if(y < 0 || y > m_lpp)
00542         return CPoint(-1, -1);
00543
00544     if(y * m_bpr > m_length)
00545         return CPoint(-1, -1);
00546
00547     x += m_nullWidth;
00548     x /= m_nullWidth;
00549
00550     int xp;
00551
00552     if(m_bShowAddress && x <= (m_bAddressIsWide ? 8 : 4))
00553     {
00554         m_currentAddress = m_topindex + (m_bpr * y);
00555         m_currentMode = EDIT_NONE;
00556         return CPoint(0, y);
00557     }
00558
00559     xp = (m_offHex  / m_nullWidth) + m_bpr * 3;
00560     if(m_bShowHex && x < xp)
00561     {
00562         if(x%3)
00563             x--;
00564         m_currentAddress = m_topindex + (m_bpr * y) + (x - (m_offHex  / m_nullWidth)) / 3;
00565         m_currentMode =  ((x%3) & 0x01) ? EDIT_LOW : EDIT_HIGH;
00566         return CPoint(x, y);
00567     }
00568
00569     xp = (m_offAscii  / m_nullWidth) + m_bpr;
00570     if(m_bShowAscii && x < xp)
00571     {
00572         m_currentAddress = m_topindex + (m_bpr * y) + (x - (m_offAscii  / m_nullWidth));
00573         m_currentMode = EDIT_ASCII;
00574         return CPoint(x, y);
00575     }
00576
00577     return CPoint(-1,-1);
00578 }
00579
00580 void CCJHexEdit::CreateAddressCaret()
00581 {
00582     DestroyCaret();
00583     CreateSolidCaret(m_nullWidth * (m_bAddressIsWide ? 8 : 4), m_lineHeight);
00584 }
00585
00586 void CCJHexEdit::CreateEditCaret()
00587 {
00588     DestroyCaret();
00589     CreateSolidCaret(m_nullWidth, m_lineHeight);
00590 }
00591
00592 void CCJHexEdit::OnMouseMove(UINT nFlags, CPoint point)
00593 {
00594     if(!m_pData) {
00595         return;
00596     }
00597
00598     if(nFlags & MK_LBUTTON && m_selStart != 0xffffffff)
00599     {
00600         CRect rc;
00601         GetClientRect(&rc);
00602         if(!rc.PtInRect(point))
00603         {
00604             if(point.y < 0)
00605             {
00606                 OnVScroll(SB_LINEUP, 0, NULL);
00607                 point.y = 0;
00608             }
00609             else if(point.y > rc.Height())
00610             {
00611                 OnVScroll(SB_LINEDOWN, 0, NULL);
00612                 point.y = rc.Height() -1;
00613             }
00614         }
00615
00616         //
00617         // we are selecting
00618         //
00619         int  seo = m_selEnd;
00620         CPoint pt = CalcPos(point.x, point.y);
00621         if(pt.x > -1)
00622         {
00623             m_selEnd = m_currentAddress;
00624             if(m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW)
00625                 m_selEnd++;
00626         }
00627         if(IsSelected())
00628             DestroyCaret();
00629
00630         if(seo != m_selEnd)
00631             RedrawWindow();
00632     }
00633 }
00634
00635 void CCJHexEdit::UpdateScrollbars()
00636 {
00637     SCROLLINFO si;
00638
00639     si.cbSize = sizeof(SCROLLINFO);
00640     si.fMask = SIF_ALL;
00641     si.nMin = 0;
00642     si.nMax = (m_length / m_bpr) - 1;
00643     si.nPage = m_lpp;
00644     si.nPos = m_topindex / m_bpr;
00645
00646     ::SetScrollInfo(this->m_hWnd, SB_VERT, &si, TRUE);
00647     if(si.nMax > (int)si.nPage)
00648         ::EnableScrollBar(this->m_hWnd, SB_VERT, ESB_ENABLE_BOTH);
00649
00650     CRect rc;
00651     GetClientRect(&rc);
00652
00653     si.nMin = 0;
00654     si.nMax =((m_bShowAddress ? (m_bAddressIsWide ? 8 : 4) : 0) +
00655               (m_bShowHex ? m_bpr * 3 : 0) +
00656               (m_bShowAscii ? m_bpr : 0) ) * m_nullWidth;
00657     si.nPage = 1;
00658     si.nPos = 0;
00659     ::SetScrollInfo(this->m_hWnd, SB_HORZ, &si, TRUE);
00660 }
00661
00662 void CCJHexEdit::OnLButtonUp(UINT nFlags, CPoint point)
00663 {
00664     if(IsSelected()) {
00665         ReleaseCapture();
00666     }
00667
00668     CWnd::OnLButtonUp(nFlags, point);
00669 }
00670
00671 void CCJHexEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
00672 {
00673     nFlags;nRepCnt;
00674     if(!m_pData)
00675         return;
00676     if(nChar == '\t')
00677         return;
00678     if(GetKeyState(VK_CONTROL) & 0x80000000)
00679     {
00680         switch(nChar)
00681         {
00682             case 0x03:
00683                 if(IsSelected())
00684                     OnEditCopy();
00685                 return;
00686             case 0x16:
00687                 OnEditPaste();
00688                 return;
00689             case 0x18:
00690                 if(IsSelected())
00691                     OnEditCut();
00692                 return;
00693             case 0x1a:
00694                 OnEditUndo();
00695                 return;
00696         }
00697     }
00698
00699     if(nChar == 0x08)
00700     {
00701         if(m_currentAddress > 0)
00702         {
00703             m_currentAddress--;
00704             SelDelete(m_currentAddress, m_currentAddress+1);
00705             RepositionCaret(m_currentAddress);
00706             RedrawWindow();
00707         }
00708         return;
00709     }
00710
00711     SetSel(-1, -1);
00712     switch(m_currentMode)
00713     {
00714         case EDIT_NONE:
00715             return;
00716         case EDIT_HIGH:
00717         case EDIT_LOW:
00718             if((nChar >= '0' && nChar <= '9') || (nChar >= 'a' && nChar <= 'f'))
00719             {
00720                 UINT b = nChar - '0';
00721                 if(b > 9)
00722                     b = 10 + nChar - 'a';
00723
00724                 if(m_currentMode == EDIT_HIGH)
00725                 {
00726                     m_pData[m_currentAddress] = (unsigned char)((m_pData[m_currentAddress] & 0x0f) | (b << 4));
00727                 }
00728                 else
00729                 {
00730                     m_pData[m_currentAddress] = (unsigned char)((m_pData[m_currentAddress] & 0xf0) | b);
00731                 }
00732                 Move(1,0);
00733             }
00734             break;
00735         case EDIT_ASCII:
00736             m_pData[m_currentAddress] = (unsigned char)nChar;
00737             Move(1,0);
00738             break;
00739     }
00740     RedrawWindow();
00741 }
00742
00743 void CCJHexEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
00744 {
00745     nFlags; nRepCnt;
00746
00747     BOOL bShift = GetKeyState(VK_SHIFT) & 0x80000000;
00748     BOOL bac = m_bNoAddressChange;
00749     m_bNoAddressChange = TRUE;
00750     switch(nChar)
00751     {
00752         case VK_DOWN:
00753             if(bShift)
00754             {
00755                 if(!IsSelected())
00756                 {
00757                     m_selStart = m_currentAddress;
00758                 }
00759                 Move(0,1);
00760                 m_selEnd   = m_currentAddress;
00761                 if(m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW)
00762                     m_selEnd++;
00763                 RedrawWindow();
00764                 break;
00765             }
00766             else
00767                 SetSel(-1, -1);
00768             Move(0,1);
00769             break;
00770         case VK_UP:
00771             if(bShift)
00772             {
00773                 if(!IsSelected())
00774                 {
00775                     m_selStart = m_currentAddress;
00776                 }
00777                 Move(0,-1);
00778                 m_selEnd   = m_currentAddress;
00779                 RedrawWindow();
00780                 break;
00781             }
00782             else
00783                 SetSel(-1, -1);
00784             Move(0,-1);
00785             break;
00786         case VK_LEFT:
00787             if(bShift)
00788             {
00789                 if(!IsSelected())
00790                 {
00791                     m_selStart = m_currentAddress;
00792                 }
00793                 Move(-1,0);
00794                 m_selEnd   = m_currentAddress;
00795                 RedrawWindow();
00796                 break;
00797             }
00798             else
00799                 SetSel(-1, -1);
00800             Move(-1,0);
00801             break;
00802         case VK_RIGHT:
00803             if(bShift)
00804             {
00805                 if(!IsSelected())
00806                 {
00807                     m_selStart = m_currentAddress;
00808                 }
00809                 Move(1,0);
00810                 m_selEnd   = m_currentAddress;
00811                 if(m_currentMode == EDIT_HIGH || m_currentMode == EDIT_LOW)
00812                     m_selEnd++;
00813                 RedrawWindow();
00814                 break;
00815             }
00816             else
00817                 SetSel(-1, -1);
00818             Move(1,0);
00819             break;
00820         case VK_PRIOR:
00821             if(bShift)
00822             {
00823                 if(!IsSelected())
00824                 {
00825                     m_selStart = m_currentAddress;
00826                 }
00827                 OnVScroll(SB_PAGEUP, 0, NULL);
00828                 Move(0,0);
00829                 m_selEnd   = m_currentAddress;
00830                 RedrawWindow();
00831                 break;
00832             }
00833             else
00834                 SetSel(-1, -1);
00835             OnVScroll(SB_PAGEUP, 0, NULL);
00836             Move(0,0);
00837             break;
00838         case VK_NEXT:
00839             if(bShift)
00840             {
00841                 if(!IsSelected())
00842                 {
00843                     m_selStart = m_currentAddress;
00844                 }
00845                 OnVScroll(SB_PAGEDOWN, 0, NULL);
00846                 Move(0,0);
00847                 m_selEnd   = m_currentAddress;
00848                 RedrawWindow();
00849                 break;
00850             }
00851             else
00852                 SetSel(-1, -1);
00853             OnVScroll(SB_PAGEDOWN, 0, NULL);
00854             Move(0,0);
00855             break;
00856         case VK_HOME:
00857             if(bShift)
00858             {
00859                 if(!IsSelected())
00860                 {
00861                     m_selStart = m_currentAddress;
00862                 }
00863                 if(GetKeyState(VK_CONTROL) & 0x80000000)
00864                 {
00865                     OnVScroll(SB_THUMBTRACK, 0, NULL);
00866                     Move(0,0);
00867                 }
00868                 else
00869                 {
00870                     m_currentAddress /= m_bpr;
00871                     m_currentAddress *= m_bpr;
00872                     Move(0,0);
00873                 }
00874                 m_selEnd   = m_currentAddress;
00875                 RedrawWindow();
00876                 break;
00877             }
00878             else
00879                 SetSel(-1, -1);
00880             if(GetKeyState(VK_CONTROL) & 0x80000000)
00881             {
00882                 OnVScroll(SB_THUMBTRACK, 0, NULL);
00883                 m_currentAddress = 0;
00884                 Move(0,0);
00885             }
00886             else
00887             {
00888                 m_currentAddress /= m_bpr;
00889                 m_currentAddress *= m_bpr;
00890                 Move(0,0);
00891             }
00892             break;
00893         case VK_END:
00894             if(bShift)
00895             {
00896                 if(!IsSelected())
00897                 {
00898                     m_selStart = m_currentAddress;
00899                 }
00900                 if(GetKeyState(VK_CONTROL) & 0x80000000)
00901                 {
00902                     m_currentAddress = m_length-1;
00903                     OnVScroll(SB_THUMBTRACK, ((m_length+(m_bpr/2)) / m_bpr) - m_lpp, NULL);
00904                     Move(0,0);
00905                 }
00906                 else
00907                 {
00908                     m_currentAddress /= m_bpr;
00909                     m_currentAddress *= m_bpr;
00910                     m_currentAddress += m_bpr - 1;
00911                     if(m_currentAddress > m_length)
00912                         m_currentAddress = m_length-1;
00913                     Move(0,0);
00914                 }
00915                 m_selEnd   = m_currentAddress;
00916                 RedrawWindow();
00917                 break;
00918             }
00919             else
00920                 SetSel(-1, -1);
00921             if(GetKeyState(VK_CONTROL) & 0x80000000)
00922             {
00923                 m_currentAddress = m_length-1;
00924                 if(m_bHalfPage)
00925                     OnVScroll(SB_THUMBTRACK, 0, NULL);
00926                 else
00927                     OnVScroll(SB_THUMBTRACK, ((m_length+(m_bpr/2)) / m_bpr) - m_lpp, NULL);
00928                 Move(0,0);
00929             }
00930             else
00931             {
00932                 m_currentAddress /= m_bpr;
00933                 m_currentAddress *= m_bpr;
00934                 m_currentAddress += m_bpr - 1;
00935                 if(m_currentAddress > m_length)
00936                     m_currentAddress = m_length-1;
00937                 Move(0,0);
00938             }
00939             break;
00940         case VK_INSERT:
00941             SelInsert(m_currentAddress, max(1, m_selEnd-m_selStart));
00942             RedrawWindow();
00943             break;
00944         case VK_DELETE:
00945             if(IsSelected())
00946             {
00947                 OnEditClear();
00948             }
00949             else
00950             {
00951                 SelDelete(m_currentAddress, m_currentAddress+1);
00952                 RedrawWindow();
00953             }
00954             break;
00955         case '\t':
00956             switch(m_currentMode)
00957             {
00958                 case EDIT_NONE:
00959                     m_currentMode = EDIT_HIGH;
00960                     break;
00961                 case EDIT_HIGH:
00962                 case EDIT_LOW:
00963                     m_currentMode = EDIT_ASCII;
00964                     break;
00965                 case EDIT_ASCII:
00966                     m_currentMode = EDIT_HIGH;
00967                     break;
00968             }
00969             Move(0,0);
00970             break;
00971
00972     }
00973     m_bNoAddressChange = bac;
00974 }
00975
00976 void CCJHexEdit::Move(int x, int y)
00977 {
00978     switch(m_currentMode)
00979     {
00980         case EDIT_NONE:
00981             return;
00982         case EDIT_HIGH:
00983             if(x != 0)
00984                 m_currentMode = EDIT_LOW;
00985             if(x == -1)
00986                 m_currentAddress --;
00987             m_currentAddress += y* m_bpr;
00988             break;
00989         case EDIT_LOW:
00990             if(x != 0)
00991                 m_currentMode = EDIT_HIGH;
00992             if(x == 1)
00993                 m_currentAddress++;
00994             m_currentAddress += y* m_bpr;
00995             break;
00996         case EDIT_ASCII:
00997             {
00998                 m_currentAddress += x;
00999                 m_currentAddress += y*m_bpr;
01000             }
01001             break;
01002     }
01003     if(m_currentAddress < 0)
01004         m_currentAddress = 0;
01005
01006     if(m_currentAddress >= m_length)
01007     {
01008         m_currentAddress -= x;
01009         m_currentAddress -= y*m_bpr;
01010     }
01011     m_bNoAddressChange = TRUE;
01012     if(m_currentAddress < m_topindex)
01013     {
01014         OnVScroll(SB_LINEUP, 0, NULL);
01015     }
01016     if(m_currentAddress >= m_topindex + m_lpp*m_bpr)
01017     {
01018         OnVScroll(SB_LINEDOWN, 0, NULL);
01019     }
01020     m_bNoAddressChange = FALSE;
01021     //ScrollIntoView(m_currentAddress);
01022     RepositionCaret(m_currentAddress);
01023 }
01024
01025 void CCJHexEdit::SetSel(int s, int e)
01026 {
01027     DestroyCaret();
01028     m_selStart = s;
01029     m_selEnd = e;
01030     RedrawWindow();
01031     if(m_editPos.x == 0 && m_bShowAddress)
01032         CreateAddressCaret();
01033     else
01034         CreateEditCaret();
01035     SetCaretPos(m_editPos);
01036     ShowCaret();
01037 }
01038
01039 void CCJHexEdit::RepositionCaret(int     p)
01040 {
01041     int x, y;
01042
01043     y = (p - m_topindex) / m_bpr;
01044     x = (p - m_topindex) % m_bpr;
01045
01046     switch(m_currentMode)
01047     {
01048         case EDIT_NONE:
01049             CreateAddressCaret();
01050             x = 0;
01051             break;
01052         case EDIT_HIGH:
01053             CreateEditCaret();
01054             x *= m_nullWidth*3;
01055             x += m_offHex;
01056             break;
01057         case EDIT_LOW:
01058             CreateEditCaret();
01059             x *= m_nullWidth*3;
01060             x += m_nullWidth;
01061             x += m_offHex;
01062             break;
01063         case EDIT_ASCII:
01064             CreateEditCaret();
01065             x *= m_nullWidth;
01066             x += m_offAscii;
01067             break;
01068     }
01069     m_editPos.x = x;
01070     m_editPos.y = y*m_lineHeight;
01071     CRect rc;
01072     GetClientRect(&rc);
01073     if(rc.PtInRect(m_editPos))
01074     {
01075         SetCaretPos(m_editPos);
01076         ShowCaret();
01077     }
01078 }
01079
01080 void CCJHexEdit::ScrollIntoView(int p)
01081 {
01082     if(p < m_topindex || p > m_topindex + m_lpp*m_bpr)
01083     {
01084         m_topindex = (p/m_bpr) * m_bpr;
01085         m_topindex -= (m_lpp / 3) * m_bpr;
01086         if(m_topindex < 0)
01087             m_topindex = 0;
01088
01089         UpdateScrollbars();
01090         RedrawWindow();
01091     }
01092 }
01093
01094 void CCJHexEdit::OnContextMenu(CWnd*, CPoint point)
01095 {
01096     if (point.x == -1 && point.y == -1)
01097     {
01098         //keystroke invocation
01099         CRect rect;
01100         GetClientRect(rect);
01101         ClientToScreen(rect);
01102
01103         point = rect.TopLeft();
01104         point.Offset(5, 5);
01105     }
01106
01107     CMenu menu;
01108     VERIFY(menu.LoadMenu(IDR_POPUP_HEX_EDIT));
01109
01110     CMenu* pPopup = menu.GetSubMenu(0);
01111     ASSERT(pPopup != NULL);
01112
01113     pPopup->EnableMenuItem(ID_EDIT_UNDO, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01114     if(!IsSelected())
01115     {
01116         pPopup->EnableMenuItem(ID_EDIT_CLEAR, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01117         pPopup->EnableMenuItem(ID_EDIT_CUT, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01118         pPopup->EnableMenuItem(ID_EDIT_COPY, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01119     }
01120     {
01121         COleDataObject  obj;
01122         if (obj.AttachClipboard())
01123         {
01124             if(
01125                 !obj.IsDataAvailable(CF_TEXT) && !obj.IsDataAvailable((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData"))))
01126                 pPopup->EnableMenuItem(ID_EDIT_PASTE, MF_GRAYED|MF_DISABLED|MF_BYCOMMAND);
01127         }
01128     }
01129
01130     pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
01131         this);
01132 }
01133
01134 void CCJHexEdit::OnEditClear()
01135 {
01136     m_currentAddress = m_selStart;
01137     SelDelete(m_selStart, m_selEnd);
01138     RepositionCaret(m_currentAddress);
01139     RedrawWindow();
01140 }
01141
01142 void CCJHexEdit::OnEditCopy()
01143 {
01144     COleDataSource*     pSource = new COleDataSource();
01145     EmptyClipboard();
01146     if(m_currentMode != EDIT_ASCII)
01147     {
01148         int         dwLen = (m_selEnd-m_selStart);
01149         HGLOBAL     hMemb = ::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE|GMEM_ZEROINIT, m_selEnd-m_selStart);
01150         HGLOBAL     hMema = ::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE|GMEM_ZEROINIT, (dwLen) * 3);
01151
01152         if (!hMema)
01153             return;
01154
01155         // copy binary
01156         LPBYTE  p = (BYTE*)::GlobalLock(hMemb);
01157         memcpy(p, m_pData+m_selStart, dwLen);
01158         ::GlobalUnlock(hMemb);
01159
01160         // copy ascii
01161         p = (BYTE*)::GlobalLock(hMema);
01162         for(int  i = 0; i < dwLen;)
01163         {
01164             TOHEX(m_pData[m_selStart+i], p);
01165             *p++ = ' ';
01166             i++;
01167         }
01168
01169         ::GlobalUnlock(hMema);
01170
01171         pSource->CacheGlobalData((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData")), hMemb);
01172         pSource->CacheGlobalData(CF_TEXT, hMema);
01173     }
01174     else
01175     {
01176         HGLOBAL             hMemb = ::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE|GMEM_ZEROINIT, m_selEnd-m_selStart);
01177         HGLOBAL             hMema = ::GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE|GMEM_ZEROINIT, m_selEnd-m_selStart);
01178         if (!hMemb || !hMema)
01179             return;
01180
01181         // copy binary
01182         LPBYTE  p = (BYTE*)::GlobalLock(hMemb);
01183         int     dwLen = m_selEnd-m_selStart;
01184
01185         memcpy(p, m_pData+m_selStart, dwLen);
01186         ::GlobalUnlock(hMemb);
01187
01188         // copy ascii
01189         p = (BYTE*)::GlobalLock(hMema);
01190         memcpy(p, m_pData+m_selStart, dwLen);
01191         for(int i = 0; i < dwLen; p++, i++)
01192             if(!isprint(*p))
01193                 *p = '.';
01194         ::GlobalUnlock(hMema);
01195
01196         pSource->CacheGlobalData((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData")), hMemb);
01197         pSource->CacheGlobalData(CF_TEXT, hMema);
01198     }
01199     pSource->SetClipboard();
01200 }
01201
01202 void CCJHexEdit::OnEditCut()
01203 {
01204     OnEditCopy();
01205     SelDelete(m_selStart, m_selEnd);
01206     RedrawWindow();
01207 }
01208
01209 void CCJHexEdit::OnEditPaste()
01210 {
01211     COleDataObject  obj;
01212     if (obj.AttachClipboard())
01213     {
01214         HGLOBAL hmem = NULL;
01215         if (obj.IsDataAvailable((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData"))))
01216         {
01217             hmem = obj.GetGlobalData((CLIPFORMAT)RegisterClipboardFormat( _T("BinaryData")));
01218         }
01219         else if (obj.IsDataAvailable(CF_TEXT))
01220         {
01221             hmem = obj.GetGlobalData(CF_TEXT);
01222         }
01223         if(hmem)
01224         {
01225             LPBYTE  p = (BYTE*)::GlobalLock(hmem);
01226             DWORD   dwLen = ::GlobalSize(hmem);
01227             int     insert;
01228             int     oa = m_currentAddress;
01229
01230             NormalizeSel();
01231             if(m_selStart == 0xffffffff)
01232             {
01233                 if(m_currentMode == EDIT_LOW)
01234                     m_currentAddress++;
01235                 insert = m_currentAddress;
01236                 SelInsert(m_currentAddress, dwLen);
01237             }
01238             else
01239             {
01240                 insert = m_selStart;
01241                 SelDelete(m_selStart, m_selEnd);
01242                 SelInsert(insert, dwLen);
01243                 SetSel(-1, -1);
01244             }
01245
01246             memcpy(m_pData+insert, p, dwLen);
01247
01248             m_currentAddress = oa;
01249             RedrawWindow();
01250             ::GlobalUnlock(hmem);
01251         }
01252     }
01253 }
01254
01255 void CCJHexEdit::OnEditSelectAll()
01256 {
01257     m_selStart = 0;
01258     m_selEnd = m_length;
01259     DestroyCaret();
01260     RedrawWindow();
01261 }
01262
01263 void CCJHexEdit::OnEditUndo()
01264 {
01265     // TODO: Add your command handler code here
01266
01267 }
01268
01269 void CCJHexEdit::NormalizeSel()
01270 {
01271     if(m_selStart > m_selEnd)
01272         m_selStart ^= m_selEnd ^= m_selStart ^= m_selEnd;
01273 }
01274
01275 void CCJHexEdit::SelDelete(int s, int e)
01276 {
01277     LPBYTE p = (LPBYTE) malloc(m_length - (e-s)+1);
01278     memcpy(p, m_pData, s);
01279     if(s < m_length-(e-s))
01280         memcpy(p+s, m_pData+e, (m_length -e));
01281
01282     free(m_pData);
01283     SetSel(-1, -1);
01284     m_pData = p;
01285     m_length = m_length-(e-s);
01286     if(m_currentAddress > m_length)
01287     {
01288         m_currentAddress = m_length;
01289         RepositionCaret(m_currentAddress);
01290     }
01291     m_bUpdate = TRUE;
01292 }
01293
01294 void CCJHexEdit::SelInsert(int s, int l)
01295 {
01296     LPBYTE p = (LPBYTE) calloc(m_length + l, 1);
01297     memcpy(p, m_pData, s);
01298     memcpy(p+s+l, m_pData+s, (m_length-s));
01299     free(m_pData);
01300     SetSel(-1, -1);
01301     m_pData = p;
01302     m_length = m_length+l;
01303     m_bUpdate = TRUE;
01304 }
01305
01306 void CCJHexEdit::SetData(LPBYTE p, int len)
01307 {
01308     free(m_pData);
01309
01310     m_pData = (LPBYTE) malloc(len);
01311     memcpy(m_pData, p, len);
01312
01313     SetSel(-1, -1);
01314     m_length = len;
01315     m_currentAddress = 0;
01316     m_editPos.x = m_editPos.y = 0;
01317     m_currentMode = EDIT_HIGH;
01318     m_topindex = 0;
01319     m_bUpdate = TRUE;
01320 }
01321
01322 void CCJHexEdit::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
01323 {
01324     UNUSED_ALWAYS(nSBCode);
01325     UNUSED_ALWAYS(nPos);
01326     UNUSED_ALWAYS(pScrollBar);
01327 }
01328
01329 void CCJHexEdit::OnLButtonDblClk(UINT nFlags, CPoint point)
01330 {
01331     UNUSED_ALWAYS(nFlags);
01332     UNUSED_ALWAYS(point);
01333 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Win32wstring Member List

This is the complete list of members for Win32wstring, including all inherited members.

convert(unsigned int codepage, const char *s, int inLen) | Win32wstring | [inline, private]
Win32wstring(unsigned int codepage, std::string *s) | Win32wstring | [inline]
Win32wstring(unsigned int codepage, std::string &s) | Win32wstring | [inline]

Generated on Sat Aug 7 22:58:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWinCvsBrowser Member List

This is the complete list of members for CWinCvsBrowser, including all inherited members.

Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL) | CWinCvsBrowser | [virtual]
CWinCvsBrowser() | CWinCvsBrowser | [protected]
DeleteAllItems(HTREEITEM root=0L) | CWinCvsBrowser | [private]
DisableCommon() | CWinCvsBrowser | [private]
GetItemByLocation(const char *path) | CWinCvsBrowser | [private]
GetRoot(void) const | CWinCvsBrowser | [inline]
GetSelectionChanged() const | CWinCvsBrowser | [inline]
GetSelectionNotificationLocked() const | CWinCvsBrowser | [inline]
m_imageList | CWinCvsBrowser | [private, static]
m_resetViewPending | CWinCvsBrowser | [private]
m_root | CWinCvsBrowser | [private]
m_selectionChanged | CWinCvsBrowser | [private]
m_selectionNotificationLocked | CWinCvsBrowser | [private]
NotifySelectionChange() | CWinCvsBrowser |
OnAppCmdline() | CWinCvsBrowser | [protected]
OnAppRtagbranch() | CWinCvsBrowser | [protected]
OnAppRtagcreate() | CWinCvsBrowser | [protected]
OnAppRtagdelete() | CWinCvsBrowser | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CWinCvsBrowser | [protected]
OnCustomize(UINT nID) | CWinCvsBrowser | [protected]
OnDestroy() | CWinCvsBrowser | [protected]
OnDraw(CDC *pDC) | CWinCvsBrowser | [protected, virtual]
OnFilteringChanged() | CWinCvsBrowser |
OnIgnoreChanged() | CWinCvsBrowser |
OnInitialUpdate() | CWinCvsBrowser | [virtual]
OnItemexpanding(NMHDR *pNMHDR, LRESULT *pResult) | CWinCvsBrowser | [protected]
OnMacro(UINT nID) | CWinCvsBrowser | [protected]
OnQueryProperties() | CWinCvsBrowser | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CWinCvsBrowser | [protected]
OnResetView(WPARAM, LPARAM) | CWinCvsBrowser | [protected]
OnSelchanged(NMHDR *pNMHDR, LRESULT *pResult) | CWinCvsBrowser | [protected]
OnSelchanging(NMHDR *pNMHDR, LRESULT *pResult) | CWinCvsBrowser | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CWinCvsBrowser | [protected]
OnUpdateAppCmdline(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateCmd(CCmdUI *pCmdUI, BOOL needCvsInfos) | CWinCvsBrowser | [private]
OnUpdateCustomize(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateMacro(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateQueryProperties(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateViewAdd(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateViewCheckout(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateViewExplore(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateViewImport(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateViewReload(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnUpdateViewUpdate(CCmdUI *pCmdUI) | CWinCvsBrowser | [protected]
OnViewAdd() | CWinCvsBrowser | [protected]
OnViewCheckout() | CWinCvsBrowser | [protected]
OnViewCommit() | CWinCvsBrowser | [protected]
OnViewDiff() | CWinCvsBrowser | [protected]
OnViewEdit() | CWinCvsBrowser | [protected]
OnViewEditors() | CWinCvsBrowser | [protected]
OnViewExplore() | CWinCvsBrowser | [protected]
OnViewForceedit() | CWinCvsBrowser | [protected]
OnViewImport() | CWinCvsBrowser | [protected]
OnViewLog() | CWinCvsBrowser | [protected]
OnViewNewInstance() | CWinCvsBrowser | [protected]
OnViewQueryUpdate() | CWinCvsBrowser | [protected]
OnViewRelease() | CWinCvsBrowser | [protected]
OnViewReload() | CWinCvsBrowser | [protected]
OnViewReservededit() | CWinCvsBrowser | [protected]
OnViewStatus() | CWinCvsBrowser | [protected]
OnViewTagBranch() | CWinCvsBrowser | [protected]
OnViewTagDelete() | CWinCvsBrowser | [protected]
OnViewTagNew() | CWinCvsBrowser | [protected]
OnViewUnedit() | CWinCvsBrowser | [protected]
OnViewUnlock() | CWinCvsBrowser | [protected]
OnViewUpdate() | CWinCvsBrowser | [protected]
OnViewWatchers() | CWinCvsBrowser | [protected]
OnViewWatchOff() | CWinCvsBrowser | [protected]
OnViewWatchOn() | CWinCvsBrowser | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CWinCvsBrowser | [protected, virtual]
ProcessSelectionCommand(KiSelectionHandler *handler) | CWinCvsBrowser | [private]
ResetBrowser(const char *path, bool notifyView=false) | CWinCvsBrowser |
ResetView(bool forceReload=false, bool notifyView=false) | CWinCvsBrowser |
RetrievePath(HTREEITEM item, UStr &path) | CWinCvsBrowser | [private]
SetNewStyle(long lStyleMask, BOOL bSetBits) | CWinCvsBrowser | [private]
SetSelectionChanged(bool selectionChanged) | CWinCvsBrowser | [inline]
SetSelectionNotificationLocked(bool selectionNotificationLocked) | CWinCvsBrowser | [inline]
StepToLocation(const char *path, bool notifyView=false) | CWinCvsBrowser |
StoreExpanded(std::vector< UStr > &allExpanded, HTREEITEM root=0L) | CWinCvsBrowser | [private]
~CWinCvsBrowser() | CWinCvsBrowser | [protected, virtual]

Generated on Sat Aug 7 22:58:27 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UBrush Member List

This is the complete list of members for UBrush, including all inherited members.

CreateSolidBrush(UCOLORREF crColor) | UBrush
DeleteObject(void) | UBrush
UBrush() | UBrush
~UBrush() | UBrush

Generated on Sat Aug 7 22:48:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/Splash.cpp Source File

WinCvs/Splash.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // CG: This file was added by the Splash Screen component.
00022 // Splash.cpp : implementation file
00023 //
00024
00025 #include "stdafx.h"  // e. g. stdafx.h
00026 #include "resource.h"  // e.g. resource.h
00027
00028 #include "Splash.h"  // e.g. splash.h
00029 #include "wincvs.h"  // e.g. splash.h
00030 #include "CPStr.h"  // e.g. splash.h
00031
00032 #ifdef _DEBUG
00033 #define new DEBUG_NEW
00034 #undef THIS_FILE
00035 static char BASED_CODE THIS_FILE[] = __FILE__;
00036 #endif
00037
00038 // right margin of the bitmap
00039 namespace
00040 {
00041 const int gc_nBitmapRightMargin(519 - 491);
00042 }
00043
00045 //   Splash Screen class
00046
00047 BOOL CSplashWnd::c_bShowSplashWnd;
00048 CSplashWnd* CSplashWnd::c_pSplashWnd;
00049 CSplashWnd::CSplashWnd()
00050 {
00051 }
00052
00053 CSplashWnd::~CSplashWnd()
00054 {
00055     // Clear the static window pointer.
00056     ASSERT(c_pSplashWnd == this);
00057     c_pSplashWnd = NULL;
00058 }
00059
00060 BEGIN_MESSAGE_MAP(CSplashWnd, CWnd)
00061     //{{AFX_MSG_MAP(CSplashWnd)
00062     ON_WM_CREATE()
00063     ON_WM_PAINT()
00064     ON_WM_TIMER()
00065     //}}AFX_MSG_MAP
00066 END_MESSAGE_MAP()
00067
00068 void CSplashWnd::EnableSplashScreen(BOOL bEnable /*= TRUE*/)
00069 {
00070     c_bShowSplashWnd = bEnable;
00071 }
00072
00073 void CSplashWnd::ShowSplashScreen(CWnd* pParentWnd /*= NULL*/)
00074 {
00075     if (!c_bShowSplashWnd || c_pSplashWnd != NULL)
00076         return;
00077
00078     // Allocate a new splash screen, and create the window.
00079     c_pSplashWnd = new CSplashWnd;
00080     if (!c_pSplashWnd->Create(pParentWnd))
00081         delete c_pSplashWnd;
00082     else
00083         c_pSplashWnd->UpdateWindow();
00084 }
00085
00086 BOOL CSplashWnd::PreTranslateAppMessage(MSG* pMsg)
00087 {
00088     if (c_pSplashWnd == NULL)
00089         return FALSE;
00090
00091     // If we get a keyboard or mouse message, hide the splash screen.
00092     if (pMsg->message == WM_KEYDOWN ||
00093         pMsg->message == WM_SYSKEYDOWN ||
00094         pMsg->message == WM_LBUTTONDOWN ||
00095         pMsg->message == WM_RBUTTONDOWN ||
00096         pMsg->message == WM_MBUTTONDOWN ||
00097         pMsg->message == WM_NCLBUTTONDOWN ||
00098         pMsg->message == WM_NCRBUTTONDOWN ||
00099         pMsg->message == WM_NCMBUTTONDOWN)
00100     {
00101         c_pSplashWnd->HideSplashScreen();
00102         return TRUE;    // message handled here
00103     }
00104
00105     return FALSE;   // message not handled
00106 }
00107
00108 BOOL CSplashWnd::Create(CWnd* pParentWnd /*= NULL*/)
00109 {
00110     if (!m_bitmap.LoadBitmap(IDB_SPLASH))
00111         return FALSE;
00112
00113     BITMAP bm;
00114     m_bitmap.GetBitmap(&bm);
00115
00116     return CreateEx(0,
00117         AfxRegisterWndClass(0, AfxGetApp()->LoadStandardCursor(IDC_ARROW)),
00118         NULL, WS_POPUP | WS_VISIBLE, 0, 0, bm.bmWidth, bm.bmHeight, pParentWnd->GetSafeHwnd(), NULL);
00119 }
00120
00121 void CSplashWnd::HideSplashScreen()
00122 {
00123     // Destroy the window, and update the mainframe.
00124     DestroyWindow();
00125     AfxGetMainWnd()->UpdateWindow();
00126 }
00127
00128 void CSplashWnd::PostNcDestroy()
00129 {
00130     // Free the C++ class.
00131     delete this;
00132 }
00133
00134 int CSplashWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
00135 {
00136     if (CWnd::OnCreate(lpCreateStruct) == -1)
00137         return -1;
00138
00139     // Center the window.
00140     CenterWindow();
00141
00142     // Set a timer to destroy the splash screen.
00143     SetTimer(1, 750, NULL);
00144
00145     return 0;
00146 }
00147
00148 void CSplashWnd::OnPaint()
00149 {
00150     CPaintDC dc(this);
00151
00152     CDC dcImage;
00153     if (!dcImage.CreateCompatibleDC(&dc))
00154         return;
00155
00156     BITMAP bm;
00157     m_bitmap.GetBitmap(&bm);
00158
00159     // Paint the image.
00160     CBitmap* pOldBitmap = dcImage.SelectObject(&m_bitmap);
00161     dc.BitBlt(0, 0, bm.bmWidth, bm.bmHeight, &dcImage, 0, 0, SRCCOPY);
00162     dcImage.SelectObject(pOldBitmap);
00163
00164     // Get version information from the application
00165     CWincvsApp* app = (CWincvsApp *)AfxGetApp();
00166     CStr vers;
00167
00168     if(app->GetAppVersion(vers))
00169     {
00170         dc.SetBkMode(TRANSPARENT);
00171         dc.SetTextAlign(TA_RIGHT | TA_TOP);
00172         dc.TextOut(bm.bmWidth - gc_nBitmapRightMargin - 10, 219, vers, vers.length());
00173     }
00174 }
00175
00176 void CSplashWnd::OnTimer(UINT nIDEvent)
00177 {
00178     // Destroy the splash screen window.
00179     HideSplashScreen();
00180 }
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CommitDlg.h Source File

common/CommitDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 1998
00019  */
00020
00021 /*
00022  * CommitDlg.h : the cvs commit dialog
00023  */
00024
00025 #if !defined(AFX_COMMITDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_COMMITDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "SmartComboBox.h"
00033
00034 #ifdef WIN32
00035 #   include "MultilineEntryDlg.h"
00036 #   include "HHelpSupport.h"
00037 #endif
00038
00039 class MultiFiles;
00040
00041 bool CompatGetCommit(const MultiFiles* mf,
00042                      CStr& commit, bool& norecurs,
00043                      bool& forceCommit, bool& forceRecurse, CStr& rev, bool& noModuleProgram,
00044                      bool& checkValidEdits);
00045
00046 #ifndef WIN32
00047     void combozify(CStr & str);
00048 #endif
00049
00050 extern CMString gRevNames;
00051
00052 #ifdef WIN32
00053 class CCommit_MAIN : public CHHelpPropertyPage
00054 {
00055     DECLARE_DYNAMIC(CCommit_MAIN)
00056
00057 // Construction
00058 public:
00059     CCommit_MAIN(const MultiFiles* mf, const char* logMsg);
00060     ~CCommit_MAIN();
00061
00062 // Dialog Data
00063     //{{AFX_DATA(CCommit_MAIN)
00064     enum { IDD = IDD_COMMIT_MAIN };
00065     CStatic m_multilineEntryPlaceholder;
00066     CButton m_previewInfo;
00067     CSmartComboBox  m_fileToDiffCombo;
00068     //}}AFX_DATA
00069
00070 // Overrides
00071     // ClassWizard generate virtual function overrides
00072     //{{AFX_VIRTUAL(CCommit_MAIN)
00073     public:
00074     protected:
00075     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00076     //}}AFX_VIRTUAL
00077
00078 // Implementation
00079 protected:
00080     // Generated message map functions
00081     //{{AFX_MSG(CCommit_MAIN)
00082     virtual BOOL OnInitDialog();
00083     afx_msg void OnDiff();
00084     afx_msg void OnSelchangeFiletodiff();
00085     afx_msg void OnDestroy();
00086     //}}AFX_MSG
00087     DECLARE_MESSAGE_MAP()
00088 private:
00089     // Data members
00090     const MultiFiles* m_mf;
00091     CString m_logMsg;
00093     CMultilineEntryDlg m_multilineEntryDlg;
00095     // Methods
00096     virtual void InitHelpID();
00097
00098     void UpdatePreviewInfo();
00099
00100 public:
00101     // Interface
00102     CString GetLogMsg() const;
00103 };
00104
00106 // CCommit_OPTIONS dialog
00107
00108 class CCommit_OPTIONS : public CHHelpPropertyPage
00109 {
00110     DECLARE_DYNAMIC(CCommit_OPTIONS)
00111
00112 // Construction
00113 public:
00114     CCommit_OPTIONS(const MultiFiles* mf);
00115     ~CCommit_OPTIONS();
00116
00117 // Dialog Data
00118     //{{AFX_DATA(CCommit_OPTIONS)
00119     enum { IDD = IDD_COMMIT_OPTIONS };
00120     CSmartComboBox  m_revCombo;
00121     BOOL    m_forceCommit;
00122     CString m_rev;
00123     BOOL    m_forceRecurse;
00124     BOOL    m_forceRevision;
00125     BOOL    m_noModuleProgram;
00126     BOOL    m_noRecurse;
00127     BOOL    m_checkValidEdits;
00128     //}}AFX_DATA
00129
00130
00131 // Overrides
00132     // ClassWizard generate virtual function overrides
00133     //{{AFX_VIRTUAL(CCommit_OPTIONS)
00134     protected:
00135     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00136     //}}AFX_VIRTUAL
00137
00138 // Implementation
00139 protected:
00140     // Generated message map functions
00141     //{{AFX_MSG(CCommit_OPTIONS)
00142     afx_msg void OnForcerevision();
00143     afx_msg void OnBrowseTag();
00144     //}}AFX_MSG
00145     DECLARE_MESSAGE_MAP()
00146 private:
00147     // Data members
00148     const MultiFiles* m_mf;
00149
00150     // Methods
00151     virtual void InitHelpID();
00152 };
00153
00154 //{{AFX_INSERT_LOCATION}}
00155 #endif /* WIN32 */
00156
00157 #endif // !defined(AFX_COMMITDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ColorStatic.h Source File

WinCvs/ColorStatic.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- September 2001
00019  */
00020
00021 /*
00022  * ColorStatic.h --- color sample static control
00023  */
00024
00025 #if !defined(AFX_COLORSTATIC_H__4D2B055E_F042_428F_A662_09ABEA902DCE__INCLUDED_)
00026 #define AFX_COLORSTATIC_H__4D2B055E_F042_428F_A662_09ABEA902DCE__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031 // ColorStatic.h : header file
00032 //
00033
00035 // CColorStatic window
00036
00037 class CColorStatic : public CStatic
00038 {
00039 // Construction
00040 public:
00041     CColorStatic();
00042
00043 // Attributes
00044 public:
00045
00046 // Operations
00047 public:
00048
00049 // Overrides
00050     // ClassWizard generated virtual function overrides
00051     //{{AFX_VIRTUAL(CColorStatic)
00052     //}}AFX_VIRTUAL
00053
00054 // Implementation
00055 public:
00056     COLORREF GetColor();
00057     void SetColor(COLORREF color);
00058     virtual ~CColorStatic();
00059
00060     // Generated message map functions
00061 protected:
00062     //{{AFX_MSG(CColorStatic)
00063     afx_msg void OnPaint();
00064     //}}AFX_MSG
00065
00066     DECLARE_MESSAGE_MAP()
00067 private:
00068     COLORREF m_color;
00069 };
00070
00072
00073 //{{AFX_INSERT_LOCATION}}
00074 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00075
00076 #endif // !defined(AFX_COLORSTATIC_H__4D2B055E_F042_428F_A662_09ABEA902DCE__INCLUDED_)
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/WinCvsBrowser.cpp Source File

WinCvs/WinCvsBrowser.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 // WinCvsBrowser.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025 #include "wincvs.h"
00026 #include "MainFrm.h"
00027 #include "WinCvsBrowser.h"
00028 #include "AppConsole.h"
00029 #include "CvsPrefs.h"
00030 #include "CvsCommands.h"
00031 #include "TclGlue.h"
00032 #include "MacrosSetup.h"
00033 #include "wincvs_winutil.h"
00034 #include "PythonGlue.h"
00035 #include "BrowseViewHandlers.h"
00036 #include "CustomizeMenus.h"
00037
00038 #include "umain.h"
00039
00040 #ifdef WIN32
00041 #   include "resource.h"
00042 #endif /* WIN32 */
00043
00044 #ifdef _DEBUG
00045 #define new DEBUG_NEW
00046 #undef THIS_FILE
00047 static char THIS_FILE[] = __FILE__;
00048 #endif
00049
00051 enum
00052 {
00053     kIconFolderClosed,
00054     kIconFolderOpened,
00055     kIconFolderCVSClosed,
00056     kIconFolderCVSOpened,
00057     kIconFolderIgnoreClosed,
00058     kIconFolderIgnoreOpened,
00059     kIconFolderLost
00060 };
00061
00063 static const int WM_RESETVIEW = WM_APP + 12;
00064
00066 static const char* gDummyFile = "@@@dummy file@@@";
00067
00077 static void SetIcon(CTreeCtrl& treeCtrl, HTREEITEM item, bool hasCvsInfos, bool expand, EntnodeData* data = 0L)
00078 {
00079     TV_ITEM pItem;
00080     pItem.hItem = item;
00081     pItem.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
00082     VERIFY(treeCtrl.GetItem(&pItem));
00083
00084     int newImage;
00085     if( data == 0L )
00086     {
00087         if( expand )
00088             newImage = hasCvsInfos ? kIconFolderCVSOpened : kIconFolderOpened;
00089         else
00090             newImage = hasCvsInfos ? kIconFolderCVSClosed : kIconFolderClosed;
00091     }
00092     else
00093     {
00094         if( expand )
00095         {
00096             if( data->IsIgnored() )
00097                 newImage = kIconFolderIgnoreOpened;
00098             else if( data->IsUnknown() )
00099                 newImage = kIconFolderOpened;
00100             else
00101                 newImage = kIconFolderCVSOpened;
00102         }
00103         else
00104         {
00105             if( data->IsIgnored() )
00106                 newImage = kIconFolderIgnoreClosed;
00107             else if( data->IsUnknown() )
00108                 newImage = kIconFolderClosed;
00109             else
00110                 newImage = kIconFolderCVSClosed;
00111         }
00112     }
00113
00114     if( pItem.iImage != newImage )
00115     {
00116         pItem.iImage = newImage;
00117         pItem.iSelectedImage = newImage;
00118         pItem.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
00119         treeCtrl.SetItem(&pItem);
00120     }
00121 }
00122
00127 static void OnIgnoreChanged(CObject* obj)
00128 {
00129     ((CWinCvsBrowser*)obj)->OnIgnoreChanged();
00130 }
00131
00136 static void OnFilteringChanged(CObject* obj)
00137 {
00138     ((CWinCvsBrowser*)obj)->OnFilteringChanged();
00139 }
00140
00141
00143 // CSelectionChangeNotifier
00144
00145 CSelectionChangeNotifier::CSelectionChangeNotifier(CWinCvsBrowser* view, bool notify)
00146     : m_notify(notify), m_view(view), m_wasLocked(view->GetSelectionNotificationLocked())
00147 {
00148     if( !m_wasLocked )
00149     {
00150         m_view->SetSelectionChanged(false);
00151         m_view->SetSelectionNotificationLocked(true);
00152     }
00153 }
00154
00155 CSelectionChangeNotifier::~CSelectionChangeNotifier()
00156 {
00157     m_view->SetSelectionNotificationLocked(m_wasLocked);
00158     if( !m_wasLocked )
00159     {
00160         if( m_notify )
00161         {
00162             m_view->NotifySelectionChange();
00163         }
00164
00165         m_view->SetSelectionChanged(false);
00166     }
00167 }
00168
00170 // TBrowserFillDummy
00171
00172 TBrowserFillDummy::TBrowserFillDummy(CTreeCtrl& treeCtrl, HTREEITEM root, HTREEITEM item, EntnodeData* data)
00173     : m_root(root), m_item(item), m_treeCtrl(treeCtrl), m_empty(true), m_data(data), m_hascvs(false)
00174 {
00175 }
00176
00177 kTraversal TBrowserFillDummy::EnterDirectory(const char* fullpath, const char* dirname, const FSSpec* macspec)
00178 {
00179     if( m_item == 0L )
00180     {
00181         TV_INSERTSTRUCT tvstruct;
00182         tvstruct.hParent = m_root;
00183         tvstruct.hInsertAfter = TVI_SORT;
00184         tvstruct.item.iImage = kIconFolderClosed;
00185         tvstruct.item.iSelectedImage = kIconFolderClosed;
00186         tvstruct.item.pszText = (char*)dirname;
00187         tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
00188         m_item = m_treeCtrl.InsertItem(&tvstruct);
00189     }
00190
00191     // Assign the entries to this item
00192     if( m_data != 0L )
00193     {
00194         EntnodeData* data = (EntnodeData*)m_treeCtrl.GetItemData(m_item);
00195
00196         if( m_data != 0L )
00197             m_data->Ref();
00198
00199         m_treeCtrl.SetItemData(m_item, (long)m_data);
00200
00201         if( data != 0L )
00202             data->UnRef();
00203     }
00204     else
00205         m_data = (EntnodeData*)m_treeCtrl.GetItemData(m_item);
00206
00207     return kContinueTraversal;
00208 }
00209
00210 kTraversal TBrowserFillDummy::ExitDirectory(const char* fullpath)
00211 {
00212     SetIcon(m_treeCtrl, m_item, m_hascvs, false, m_data);
00213
00214     if( m_empty )
00215         return kContinueTraversal;
00216
00217     // Add a dum': vc*1fg ;lm   my item to simulate the folder
00218     // is not empty. This dummy item will be
00219     // replaced by a complete listing when the
00220     // node is expanding...
00221     TV_INSERTSTRUCT tvstruct;
00222     tvstruct.hParent = m_item;
00223     tvstruct.hInsertAfter = TVI_SORT;
00224     tvstruct.item.pszText = (char*)gDummyFile;
00225     tvstruct.item.mask = TVIF_TEXT;
00226     m_treeCtrl.InsertItem(&tvstruct);
00227
00228     return kContinueTraversal;
00229 }
00230
00231 kTraversal TBrowserFillDummy::OnError(const char* err, int errcode)
00232 {
00233     return kTraversalError;
00234 }
00235
00236 kTraversal TBrowserFillDummy::OnIdle(const char* fullpath)
00237 {
00238     return kContinueTraversal;
00239 }
00240
00241 kTraversal TBrowserFillDummy::OnDirectory(const char* fullpath, const char* fullname, const char* name,
00242                                const struct stat& dir, const FSSpec* macspec)
00243 {
00244     if( stricmp(name, "cvs") == 0 )
00245         m_hascvs = true;
00246     else
00247         m_empty = false;
00248
00249     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00250     vector<CStr> ignlist;
00251
00252     CStr uppath, folder;
00253     if( !SplitPath(fullpath, uppath, folder) || uppath.empty() )
00254     {
00255         uppath = fullpath;
00256         folder = ".";
00257     }
00258
00259     BuildIgnoredList(ignlist, uppath);
00260     EntnodeData* data = Entries_SetVisited(uppath, entries, folder, dir, true, &ignlist);
00261     data->Ref();
00262
00263     m_treeCtrl.SetItemData(m_item, (long)data);
00264
00265     return kSkipFile;
00266 }
00267
00269 // TBrowserFill
00270
00271 TBrowserFill::TBrowserFill(CTreeCtrl& treeCtrl, HTREEITEM root, HTREEITEM item, CSortList<ENTNODE>& entries)
00272     : m_root(root), m_item(item), m_treeCtrl(treeCtrl), m_hascvs(false), m_entries(entries),
00273     m_isShowIgnored(false), m_isHideUnknown(false), m_isHideMissing(false)
00274 {
00275     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
00276     {
00277         m_isShowIgnored = app->GetIgnoreModel()->IsShowIgnored();
00278         m_isHideUnknown = (app->GetFilterModel()->GetFilters() & kFilterHideUnknown) != 0;
00279         m_isHideMissing = (app->GetFilterModel()->GetFilters() & kFilterHideMissing) != 0;
00280     }
00281 }
00282
00283 kTraversal TBrowserFill::EnterDirectory(const char* fullpath, const char* dirname, const FSSpec* macspec)
00284 {
00285     ASSERT(m_item != 0L);
00286
00287     Entries_Open (m_entries, fullpath);
00288     BuildIgnoredList(m_ignlist, fullpath);
00289
00290     return kContinueTraversal;
00291 }
00292
00293 kTraversal TBrowserFill::ExitDirectory(const char* fullpath)
00294 {
00295     m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00296     SetIcon(m_treeCtrl, m_item, m_hascvs, true, (EntnodeData*)m_treeCtrl.GetItemData(m_item));
00297
00298     return kContinueTraversal;
00299 }
00300
00301 kTraversal TBrowserFill::OnError(const char* err, int errcode)
00302 {
00303     return kTraversalError;
00304 }
00305
00306 kTraversal TBrowserFill::OnIdle(const char* fullpath)
00307 {
00308     return kContinueTraversal;
00309 }
00310
00311 kTraversal TBrowserFill::OnDirectory(const char* fullpath, const char* fullname, const char* name,
00312                                const struct stat& dir, const FSSpec* macspec)
00313 {
00314     if( stricmp(name, "cvs") == 0 )
00315     {
00316         m_hascvs = true;
00317         return kSkipFile;
00318     }
00319
00320     EntnodeData* data = Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00321
00322     // Apply filters
00323     if( data->IsIgnored() )
00324     {
00325         // Ignore ignored
00326         if( !m_isShowIgnored )
00327         {
00328             return kSkipFile;
00329         }
00330     }
00331     else if( data->IsUnknown() )
00332     {
00333         // Hide unknown
00334         if( m_isHideUnknown )
00335         {
00336             return kSkipFile;
00337         }
00338     }
00339
00340     // Create the item for the sub-directory
00341     TBrowserFillDummy traverse(m_treeCtrl, m_item, 0L, data);
00342     kTraversal res = FileTraverse(fullname, traverse);
00343
00344     // Assign the icon regarding our Entries info
00345     if( traverse.GetItem() != 0L )
00346     {
00347         SetIcon(m_treeCtrl, traverse.GetItem(), m_hascvs, false, data);
00348     }
00349
00350     return kSkipFile;
00351 }
00352
00354 bool TBrowserFill::IsHideMissing() const
00355 {
00356     return m_isHideMissing;
00357 }
00358
00360 // CWinCvsBrowser
00361
00362 CImageList CWinCvsBrowser::m_imageList;
00363
00364 IMPLEMENT_DYNCREATE(CWinCvsBrowser, CTreeView)
00365
00366 BEGIN_MESSAGE_MAP(CWinCvsBrowser, CTreeView)
00367     //{{AFX_MSG_MAP(CWinCvsBrowser)
00368     ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, OnItemexpanding)
00369     ON_NOTIFY_REFLECT(TVN_SELCHANGING, OnSelchanging)
00370     ON_UPDATE_COMMAND_UI(ID_VIEW_ADD, OnUpdateViewAdd)
00371     ON_UPDATE_COMMAND_UI(ID_VIEW_COMMIT, OnUpdateViewUpdate)
00372     ON_COMMAND(ID_VIEW_ADD, OnViewAdd)
00373     ON_COMMAND(ID_VIEW_COMMIT, OnViewCommit)
00374     ON_COMMAND(ID_VIEW_UPDATE, OnViewUpdate)
00375     ON_COMMAND(ID_VIEW_QUERYUPDATE, OnViewQueryUpdate)
00376     ON_COMMAND(ID_VIEW_DIFF, OnViewDiff)
00377     ON_COMMAND(ID_VIEW_LOG, OnViewLog)
00378     ON_COMMAND(ID_VIEW_STATUS, OnViewStatus)
00379     ON_COMMAND(ID_VIEW_UNLOCKF, OnViewUnlock)
00380     ON_COMMAND(ID_VIEW_WATCHON, OnViewWatchOn)
00381     ON_COMMAND(ID_VIEW_WATCHOFF, OnViewWatchOff)
00382     ON_COMMAND(ID_VIEW_EDIT, OnViewEdit)
00383     ON_COMMAND(ID_VIEW_UNEDIT, OnViewUnedit)
00384     ON_COMMAND(ID_VIEW_WATCHERS, OnViewWatchers)
00385     ON_COMMAND(ID_VIEW_EDITORS, OnViewEditors)
00386     ON_COMMAND(ID_VIEW_RELEASE, OnViewRelease)
00387     ON_COMMAND(ID_VIEW_TAGNEW, OnViewTagNew)
00388     ON_COMMAND(ID_VIEW_TAGDELETE, OnViewTagDelete)
00389     ON_COMMAND(ID_VIEW_TAGBRANCH, OnViewTagBranch)
00390     ON_COMMAND(ID_VIEW_EXPLORE, OnViewExplore)
00391     ON_UPDATE_COMMAND_UI(ID_VIEW_EXPLORE, OnUpdateViewExplore)
00392     ON_COMMAND(ID_VIEW_NEWINSTANCE, OnViewNewInstance)
00393     ON_UPDATE_COMMAND_UI(ID_VIEW_NEWINSTANCE, OnUpdateViewExplore)
00394     ON_UPDATE_COMMAND_UI(ID_VIEW_RELOAD, OnUpdateViewReload)
00395     ON_COMMAND(ID_VIEW_RELOAD, OnViewReload)
00396     ON_COMMAND(ID_VIEW_CHECKOUT, OnViewCheckout)
00397     ON_UPDATE_COMMAND_UI(ID_VIEW_CHECKOUT, OnUpdateViewCheckout)
00398     ON_COMMAND(ID_VIEW_IMPORT, OnViewImport)
00399     ON_UPDATE_COMMAND_UI(ID_VIEW_IMPORT, OnUpdateViewImport)
00400     ON_WM_SETCURSOR()
00401     ON_NOTIFY_REFLECT(TVN_SELCHANGED, OnSelchanged)
00402     ON_WM_DESTROY()
00403     ON_COMMAND(ID_VIEW_RESERVEDEDIT, OnViewReservededit)
00404     ON_COMMAND(ID_VIEW_FORCEEDIT, OnViewForceedit)
00405     ON_COMMAND(ID_APP_CMDLINE, OnAppCmdline)
00406     ON_COMMAND(ID_APP_RTAGBRANCH, OnAppRtagbranch)
00407     ON_COMMAND(ID_APP_RTAGCREATE, OnAppRtagcreate)
00408     ON_COMMAND(ID_APP_RTAGDELETE, OnAppRtagdelete)
00409     ON_UPDATE_COMMAND_UI(ID_APP_CMDLINE, OnUpdateAppCmdline)
00410     ON_WM_CONTEXTMENU()
00411     ON_WM_RBUTTONDOWN()
00412     ON_COMMAND(ID_QUERY_PROPERTIES, OnQueryProperties)
00413     ON_UPDATE_COMMAND_UI(ID_QUERY_PROPERTIES, OnUpdateQueryProperties)
00414     ON_UPDATE_COMMAND_UI(ID_VIEW_DIFF, OnUpdateViewUpdate)
00415     ON_UPDATE_COMMAND_UI(ID_VIEW_EDIT, OnUpdateViewUpdate)
00416     ON_UPDATE_COMMAND_UI(ID_VIEW_RESERVEDEDIT, OnUpdateViewUpdate)
00417     ON_UPDATE_COMMAND_UI(ID_VIEW_FORCEEDIT, OnUpdateViewUpdate)
00418     ON_UPDATE_COMMAND_UI(ID_VIEW_EDITORS, OnUpdateViewUpdate)
00419     ON_UPDATE_COMMAND_UI(ID_VIEW_LOG, OnUpdateViewUpdate)
00420     ON_UPDATE_COMMAND_UI(ID_VIEW_RELEASE, OnUpdateViewUpdate)
00421     ON_UPDATE_COMMAND_UI(ID_VIEW_STATUS, OnUpdateViewUpdate)
00422     ON_UPDATE_COMMAND_UI(ID_VIEW_UNEDIT, OnUpdateViewUpdate)
00423     ON_UPDATE_COMMAND_UI(ID_VIEW_UPDATE, OnUpdateViewUpdate)
00424     ON_UPDATE_COMMAND_UI(ID_VIEW_QUERYUPDATE, OnUpdateViewUpdate)
00425     ON_UPDATE_COMMAND_UI(ID_VIEW_UNLOCKF, OnUpdateViewUpdate)
00426     ON_UPDATE_COMMAND_UI(ID_VIEW_WATCHERS, OnUpdateViewUpdate)
00427     ON_UPDATE_COMMAND_UI(ID_VIEW_WATCHON, OnUpdateViewUpdate)
00428     ON_UPDATE_COMMAND_UI(ID_VIEW_WATCHOFF, OnUpdateViewUpdate)
00429     ON_UPDATE_COMMAND_UI(ID_VIEW_TAGNEW, OnUpdateViewUpdate)
00430     ON_UPDATE_COMMAND_UI(ID_VIEW_TAGDELETE, OnUpdateViewUpdate)
00431     ON_UPDATE_COMMAND_UI(ID_VIEW_TAGBRANCH, OnUpdateViewUpdate)
00432     ON_UPDATE_COMMAND_UI(ID_APP_RTAGBRANCH, OnUpdateViewUpdate)
00433     ON_UPDATE_COMMAND_UI(ID_APP_RTAGCREATE, OnUpdateViewUpdate)
00434     ON_UPDATE_COMMAND_UI(ID_APP_RTAGDELETE, OnUpdateViewUpdate)
00435     //}}AFX_MSG_MAP
00436     ON_UPDATE_COMMAND_UI_RANGE(ID_MACRO_START, ID_MACRO_END, OnUpdateMacro)
00437     ON_COMMAND_EX_RANGE(ID_MACRO_START, ID_MACRO_END, OnMacro)
00438     ON_UPDATE_COMMAND_UI_RANGE(ID_CUST_FILES_MENU, ID_CUST_FOLDER_MENU, OnUpdateCustomize)
00439     ON_COMMAND_EX_RANGE(ID_CUST_FILES_MENU, ID_CUST_FOLDER_MENU, OnCustomize)
00440     ON_MESSAGE(WM_RESETVIEW, OnResetView)
00441 END_MESSAGE_MAP()
00442
00443 CWinCvsBrowser::CWinCvsBrowser()
00444     : m_selectionNotificationLocked(false), m_selectionChanged(false), m_resetViewPending(false)
00445 {
00446 }
00447
00448 CWinCvsBrowser::~CWinCvsBrowser()
00449 {
00450 }
00451
00453 // CWinCvsBrowser drawing
00454
00456 void CWinCvsBrowser::OnDraw(CDC* pDC)
00457 {
00458     // No draw code
00459 }
00460
00462 // CWinCvsBrowser diagnostics
00463
00464 #ifdef _DEBUG
00465 void CWinCvsBrowser::AssertValid() const
00466 {
00467     CTreeView::AssertValid();
00468 }
00469
00470 void CWinCvsBrowser::Dump(CDumpContext& dc) const
00471 {
00472     CTreeView::Dump(dc);
00473 }
00474 #endif //_DEBUG
00475
00477 // CWinCvsBrowser message handlers
00478
00480 BOOL CWinCvsBrowser::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
00481 {
00482     if( !CTreeView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext) )
00483     {
00484         return FALSE;
00485     }
00486
00487     if( m_imageList.m_hImageList == 0L )
00488         m_imageList.Create(IDB_MODULES, 16, 1, RGB(255, 255, 255));
00489
00490     CTreeCtrl& treeCtrl = GetTreeCtrl();
00491     treeCtrl.SetImageList(&m_imageList, TVSIL_NORMAL);
00492
00493     // Set the initial root
00494     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00495     CMainFrame* mainFrm = app->GetMainFrame();
00496     CHistComboBoxEx& hist = mainFrm->GetBrowseHistory();
00497     CStr newpath((const char*)hist.GetOldLoc());
00498     ResetBrowser(newpath, true);
00499
00500     SetNewStyle(TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT, TRUE);
00501
00502     return TRUE;
00503 }
00504
00509 void CWinCvsBrowser::DeleteAllItems(HTREEITEM root /*= 0L*/)
00510 {
00511     // We don't want the file view to be notified when things get deleted
00512     // process selection after we are done with all that jazz below
00513     CSelectionChangeNotifier notifier(this, true);
00514
00515     CTreeCtrl& treeCtrl = GetTreeCtrl();
00516     bool eraseRoot = false;
00517     if( root == 0L )
00518     {
00519         root = treeCtrl.GetRootItem( );
00520         eraseRoot = true;
00521     }
00522
00523     if( root == 0L )
00524         return;
00525
00526     CWndRedrawMngr redrawMngr(this);
00527
00528     HTREEITEM childItem = treeCtrl.GetNextItem(root, TVGN_CHILD);
00529
00530     // Erase all the childs
00531     while( childItem != 0L )
00532     {
00533         EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(childItem);
00534         if( data != 0L )
00535         {
00536             treeCtrl.SetItemData(childItem,0L); //So that subsequent references after UnRef() won't SEGV
00537             data->UnRef();  //Or move this one after DeleteAllItems? so we don't loose one system call. For now, safe way
00538         }
00539
00540         DeleteAllItems(childItem);
00541
00542         HTREEITEM nextItem = treeCtrl.GetNextItem(childItem, TVGN_NEXT);
00543         VERIFY(treeCtrl.DeleteItem(childItem));
00544         childItem = nextItem;
00545     }
00546
00547     // Erase the root only if initially root was 0L
00548     if( eraseRoot )
00549     {
00550         EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(root);
00551         if( data )
00552         {
00553             data->UnRef();
00554         }
00555
00556         VERIFY(treeCtrl.DeleteItem(root));
00557     }
00558 }
00559
00566 void CWinCvsBrowser::ResetBrowser(const char* path, bool notifyView)
00567 {
00568     CWaitCursor doWait;
00569     CWndRedrawMngr redrawMngr(this);
00570
00571     // Must make a copy of 'path' before calling DeleteAllItems(), since
00572     // this function may have been called with 'm_root' passed as the first
00573     // parameter (in fact it is in several places in the code) whose value
00574     // gets deleted by the call to DeleteAllItems() below, making 'path'
00575     // point to an invalid memory location
00576     const CStr pathCopy(path);
00577     DeleteAllItems();
00578
00579     const bool isReload = !pathCopy.empty() && !m_root.empty() && stricmp(m_root, pathCopy) == 0;
00580
00581     const CStr prevRoot(m_root.c_str());
00582     m_root = pathCopy;
00583
00584     if( pathCopy.empty() )
00585         return;
00586
00587     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00588     CMainFrame* mainFrm = app->GetMainFrame();
00589
00590     if( !isReload )
00591     {
00592         // Save the previous root settings first
00593         if( !prevRoot.empty() && HasPersistentSettings(prevRoot) )
00594         {
00595             mainFrm->StoreLocationSettings();
00596             SavePersistentSettings(prevRoot);
00597         }
00598
00599         if( HasPersistentSettings(m_root) )
00600         {
00601             LoadPersistentSettings(m_root);
00602             mainFrm->LoadLocationSettings();
00603         }
00604         else
00605         {
00606             // Check if the path has a CVS folder. If not,
00607             // we don't want the user to be prompted (like when
00608             // WinCvs is starting for the first time).
00609             UStr cvsFolder(m_root);
00610             if( !cvsFolder.endsWith(kPathDelimiter) )
00611                 cvsFolder << kPathDelimiter;
00612
00613             cvsFolder << "CVS";
00614             struct stat sb;
00615             if( stat(cvsFolder, &sb) != -1 && S_ISDIR(sb.st_mode) )
00616                 AskCreatePersistentSettings(m_root);
00617         }
00618     }
00619
00620     if( notifyView )
00621     {
00622         CHistComboBoxEx& hist = mainFrm->GetBrowseHistory();
00623         hist.NewRoot(m_root);
00624     }
00625
00626     CTreeCtrl& treeCtrl = GetTreeCtrl();
00627     TBrowserFillDummy traverse(treeCtrl, 0L, 0L, 0L);
00628     kTraversal res = FileTraverse(m_root, traverse);
00629
00630     CBrowseFileView* fileView = app->GetFileView();
00631     if( fileView != 0L )
00632     {
00633         HTREEITEM root = treeCtrl.GetRootItem();
00634         if( root != 0L )
00635         {
00636             treeCtrl.Expand(root, TVE_EXPAND);
00637             if( notifyView )
00638             {
00639                 VERIFY(treeCtrl.Select(root, TVGN_CARET));
00640             }
00641         }
00642         else
00643         {
00644             fileView->ResetView(pathCopy);
00645         }
00646     }
00647 }
00648
00654 void CWinCvsBrowser::SetNewStyle(long lStyleMask, BOOL bSetBits)
00655 {
00656     long lStyleOld;
00657
00658     lStyleOld = GetWindowLong(m_hWnd, GWL_STYLE);
00659     lStyleOld &= ~lStyleMask;
00660     if( bSetBits )
00661         lStyleOld |= lStyleMask;
00662
00663     SetWindowLong(m_hWnd, GWL_STYLE, lStyleOld);
00664     SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
00665 }
00666
00672 void CWinCvsBrowser::RetrievePath(HTREEITEM item, CStr& path)
00673 {
00674     CTreeCtrl& treeCtrl = GetTreeCtrl();
00675
00676     CStr tmp, newPath;
00677     path = "";
00678     TV_ITEM pItem;
00679     char name[512];
00680
00681     do
00682     {
00683         pItem.hItem = item;
00684         pItem.pszText = name;
00685         pItem.cchTextMax = 512;
00686         pItem.mask = TVIF_HANDLE | TVIF_TEXT;
00687
00688         VERIFY(treeCtrl.GetItem(&pItem));
00689         item = treeCtrl.GetParentItem(item);
00690
00691         tmp = path;
00692         newPath = item == 0L ? (const char*)m_root : pItem.pszText;
00693         if( !newPath.endsWith(kPathDelimiter) )
00694             newPath << kPathDelimiter;
00695
00696         newPath << path;
00697         path = newPath;
00698     } while(item != 0L);
00699 }
00700
00702 void CWinCvsBrowser::OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult)
00703 {
00704     CWndRedrawMngr redrawMngr(this);
00705
00706     // Prevent from changing directory if cvs is running
00707     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00708     if( app->IsCvsRunning() )
00709     {
00710         *pResult = TRUE;
00711         return;
00712     }
00713
00714     CTreeCtrl& treeCtrl = GetTreeCtrl();
00715     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00716
00717     HTREEITEM item = pNMTreeView->itemNew.hItem;
00718
00719     EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(item);
00720     if( data != 0L && data->IsMissing() )
00721     {
00722         *pResult = TRUE;
00723         return;
00724     }
00725
00726     // Erase all the childs
00727     DeleteAllItems(item);
00728
00729     CStr path;
00730     RetrievePath(item, path);
00731
00732     if( pNMTreeView->action & TVE_COLLAPSE )
00733     {
00734         TBrowserFillDummy traverse(treeCtrl, 0L, item, 0L);
00735         kTraversal res = FileTraverse(path, traverse);
00736     }
00737     else if( pNMTreeView->action & TVE_EXPAND )
00738     {
00739         CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00740         TBrowserFill traverse(treeCtrl, 0L, item, entries);
00741         kTraversal res = FileTraverse(path, traverse);
00742
00743         if( !traverse.IsHideMissing() )
00744         {
00745             // Add the missing folders
00746             Entries_SetMissing(entries);
00747
00748             int numEntries = entries.NumOfElements();
00749             for(int i = 0; i < numEntries; i++)
00750             {
00751                 const ENTNODE & theNode = entries.Get(i);
00752                 EntnodeData* data = theNode.Data();
00753                 if( !data->IsMissing() || data->GetType() != ENT_SUBDIR )
00754                     continue;
00755
00756                 TV_INSERTSTRUCT tvstruct;
00757                 tvstruct.hParent = item;
00758                 tvstruct.hInsertAfter = TVI_SORT;
00759                 tvstruct.item.iImage = kIconFolderLost;
00760                 tvstruct.item.iSelectedImage = kIconFolderLost;
00761                 tvstruct.item.pszText = (char*)(*data)[EntnodeData::kName];
00762                 tvstruct.item.lParam = (long)data->Ref();
00763                 tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT | TVIF_PARAM;
00764                 treeCtrl.InsertItem(&tvstruct);
00765             }
00766         }
00767     }
00768
00769     *pResult = 0;
00770 }
00771
00777 void CWinCvsBrowser::OnUpdateCmd(CCmdUI* pCmdUI, BOOL needCvsInfos)
00778 {
00779     if( DisableCommon() )
00780     {
00781         pCmdUI->Enable(FALSE);
00782         return;
00783     }
00784
00785     CTreeCtrl& treeCtrl = GetTreeCtrl();
00786     HTREEITEM selItem = treeCtrl.GetSelectedItem();
00787     if( selItem == 0L )
00788     {
00789         pCmdUI->Enable(FALSE);
00790         return;
00791     }
00792
00793     CStr path;
00794     RetrievePath(selItem, path);
00795     if( !path.endsWith(kPathDelimiter) )
00796         path << kPathDelimiter;
00797
00798     path << "CVS";
00799
00800     struct stat sb;
00801     if( stat(path, &sb) == -1 || !S_ISDIR(sb.st_mode) )
00802         pCmdUI->Enable(!needCvsInfos);
00803     else
00804         pCmdUI->Enable(needCvsInfos);
00805 }
00806
00809 void CWinCvsBrowser::OnRButtonDown(UINT nFlags, CPoint point)
00810 {
00811     // Prevent from changing directory if cvs is running
00812     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00813     if( app->IsCvsRunning() )
00814         return;
00815
00816     CTreeCtrl& treeCtrl = GetTreeCtrl();
00817
00818     UINT pFlags;
00819     HTREEITEM testItem = treeCtrl.HitTest(point, &pFlags);
00820
00821     if( testItem != 0L && (pFlags & (TVHT_ONITEM | TVHT_ONITEMBUTTON | TVHT_ONITEMRIGHT)) != 0 )
00822     {
00823         treeCtrl.SelectItem(testItem);
00824     }
00825
00826     //CTreeView::OnRButtonDown(nFlags, point);
00827 }
00828
00830 void CWinCvsBrowser::OnContextMenu(CWnd* pWnd, CPoint point)
00831 {
00832     // Prevent from changing directory if cvs is running
00833     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00834     if( app->IsCvsRunning() )
00835     {
00836         return;
00837     }
00838
00839     CTreeCtrl& treeCtrl = GetTreeCtrl();
00840     const HTREEITEM item = treeCtrl.GetSelectedItem();
00841     if( item )
00842     {
00843         // Set the track point in case it's not the mouse click
00844         if( -1 == point.x && -1 == point.y )
00845         {
00846             // Get the icon's rectangle
00847             CRect rectItem;
00848             if( treeCtrl.GetItemRect(item, &rectItem, TRUE) )
00849             {
00850                 point = rectItem.CenterPoint();
00851                 ClientToScreen(&point);
00852             }
00853         }
00854
00855         treeCtrl.SelectItem(item);
00856
00857         // Locate the submenu after item selection
00858         std::auto_ptr<CMenu> pCustomMenu(::GetCustomMenu(kCustomBrowserMenu, this));
00859         if( pCustomMenu.get() )
00860         {
00861             pCustomMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, this);
00862         }
00863     }
00864 }
00865
00867 void CWinCvsBrowser::OnSelchanging(NMHDR* pNMHDR, LRESULT* pResult)
00868 {
00869     // Prevent from changing directory if cvs is running
00870     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00871     if( app->IsCvsRunning() )
00872     {
00873         *pResult = TRUE;
00874         return;
00875     }
00876
00877     CTreeCtrl& treeCtrl = GetTreeCtrl();
00878     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00879     HTREEITEM item = pNMTreeView->itemNew.hItem;
00880
00881     EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(item);
00882     if( data != 0L && data->IsMissing() )
00883     {
00884         *pResult = TRUE;
00885         return;
00886     }
00887
00888     *pResult = 0;
00889 }
00890
00892 void CWinCvsBrowser::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
00893 {
00894     NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
00895
00896     m_selectionChanged = true;
00897     NotifySelectionChange();
00898
00899     *pResult = 0;
00900 }
00901
00905 void CWinCvsBrowser::NotifySelectionChange()
00906 {
00907     if( !m_selectionNotificationLocked )
00908     {
00909         if( m_selectionChanged )
00910         {
00911             CStr path;
00912             HTREEITEM item = GetTreeCtrl().GetSelectedItem();
00913             if( item )
00914             {
00915                 RetrievePath(item, path);
00916                 CWincvsApp* app = (CWincvsApp*)AfxGetApp();
00917                 CBrowseFileView* fileView = app->GetFileView();
00918                 if( fileView )
00919                 {
00920                     fileView->ResetView(path);
00921                 }
00922
00923                 gCvsPrefs.SetLastWorkingDir(path);
00924             }
00925         }
00926     }
00927 }
00928
00934 bool CWinCvsBrowser::ProcessSelectionCommand(KiSelectionHandler* handler)
00935 {
00936     bool res = false;
00937
00938     CTreeCtrl& treeCtrl = GetTreeCtrl();
00939     HTREEITEM selItem = treeCtrl.GetSelectedItem();
00940
00941     if( selItem )
00942     {
00943         CStr path;
00944
00945         RetrievePath(selItem, path);
00946         handler->OnFolder(path);
00947
00948         res = true;
00949     }
00950
00951     return res;
00952 }
00953
00955 void CWinCvsBrowser::OnUpdateViewAdd(CCmdUI* pCmdUI)
00956 {
00957     OnUpdateCmd(pCmdUI, FALSE);
00958 }
00959
00961 void CWinCvsBrowser::OnUpdateAppCmdline(CCmdUI* pCmdUI)
00962 {
00963     pCmdUI->Enable(!DisableCommon());
00964 }
00965
00967 void CWinCvsBrowser::OnUpdateViewUpdate(CCmdUI* pCmdUI)
00968 {
00969     OnUpdateCmd(pCmdUI, TRUE);
00970 }
00971
00973 void CWinCvsBrowser::OnViewAdd()
00974 {
00975     KoAddHandler handler;
00976     ProcessSelectionCommand(&handler);
00977 }
00978
00980 void CWinCvsBrowser::OnViewCommit()
00981 {
00982     KoCommitHandler handler;
00983     ProcessSelectionCommand(&handler);
00984 }
00985
00987 void CWinCvsBrowser::OnViewUpdate()
00988 {
00989     KoUpdateHandler handler;
00990     ProcessSelectionCommand(&handler);
00991 }
00992
00994 void CWinCvsBrowser::OnViewQueryUpdate()
00995 {
00996     KoQueryUpdateHandler handler;
00997     ProcessSelectionCommand(&handler);
00998 }
00999
01001 void CWinCvsBrowser::OnViewDiff()
01002 {
01003     KoDiffHandler handler;
01004     ProcessSelectionCommand(&handler);
01005 }
01006
01008 void CWinCvsBrowser::OnViewLog()
01009 {
01010     KoLogHandler handler;
01011     ProcessSelectionCommand(&handler);
01012 }
01013
01015 void CWinCvsBrowser::OnViewStatus()
01016 {
01017     KoStatusHandler handler;
01018     ProcessSelectionCommand(&handler);
01019 }
01020
01022 void CWinCvsBrowser::OnViewUnlock()
01023 {
01024     KoUnlockHandler handler;
01025     ProcessSelectionCommand(&handler);
01026 }
01027
01029 void CWinCvsBrowser::OnViewWatchOn()
01030 {
01031     KoWatchOnHandler handler;
01032     ProcessSelectionCommand(&handler);
01033 }
01034
01036 void CWinCvsBrowser::OnViewWatchOff()
01037 {
01038     KoWatchOffHandler handler;
01039     ProcessSelectionCommand(&handler);
01040 }
01041
01043 void CWinCvsBrowser::OnViewEdit()
01044 {
01045     KoEditHandler handler;
01046     ProcessSelectionCommand(&handler);
01047 }
01048
01050 void CWinCvsBrowser::OnViewReservededit()
01051 {
01052     KoReservedEditHandler handler;
01053     ProcessSelectionCommand(&handler);
01054 }
01055
01057 void CWinCvsBrowser::OnViewForceedit()
01058 {
01059     KoForceEditHandler handler;
01060     ProcessSelectionCommand(&handler);
01061 }
01062
01064 void CWinCvsBrowser::OnViewUnedit()
01065 {
01066     KoUneditHandler handler;
01067     ProcessSelectionCommand(&handler);
01068 }
01069
01071 void CWinCvsBrowser::OnViewWatchers()
01072 {
01073     KoWatchersHandler handler;
01074     ProcessSelectionCommand(&handler);
01075 }
01076
01078 void CWinCvsBrowser::OnViewEditors()
01079 {
01080     KoEditorsHandler handler;
01081     ProcessSelectionCommand(&handler);
01082 }
01083
01085 void CWinCvsBrowser::OnViewRelease()
01086 {
01087     KoReleaseHandler handler;
01088     ProcessSelectionCommand(&handler);
01089 }
01090
01092 void CWinCvsBrowser::OnViewTagNew()
01093 {
01094     KoCreateTagHandler handler;
01095     ProcessSelectionCommand(&handler);
01096 }
01097
01099 void CWinCvsBrowser::OnViewTagDelete()
01100 {
01101     KoDeleteTagHandler handler;
01102     ProcessSelectionCommand(&handler);
01103 }
01104
01106 void CWinCvsBrowser::OnViewTagBranch()
01107 {
01108     KoBranchTagHandler handler;
01109     ProcessSelectionCommand(&handler);
01110 }
01111
01113 void CWinCvsBrowser::OnInitialUpdate()
01114 {
01115     CTreeView::OnInitialUpdate();
01116
01117     CWndRedrawMngr redrawMngr(this);
01118
01119     CTreeCtrl& treeCtrl = GetTreeCtrl();
01120     HTREEITEM root = treeCtrl.GetRootItem();
01121     if( root != 0L )
01122     {
01123         treeCtrl.Expand(root, TVE_EXPAND);
01124         VERIFY(treeCtrl.Select(root, TVGN_CARET));
01125     }
01126
01127     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
01128     {
01129         app->GetFilterModel()->GetNotificationManager()->CheckIn(this, ::OnFilteringChanged);
01130         app->GetIgnoreModel()->GetNotificationManager()->CheckIn(this, ::OnIgnoreChanged);
01131     }
01132 }
01133
01135 void CWinCvsBrowser::OnViewExplore()
01136 {
01137     CTreeCtrl& treeCtrl = GetTreeCtrl();
01138     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01139
01140     CStr path;
01141     RetrievePath(selItem, path);
01142
01143     LaunchExplore(path.c_str());
01144 }
01145
01146 void CWinCvsBrowser::OnViewNewInstance()
01147 {
01148     CTreeCtrl& treeCtrl = GetTreeCtrl();
01149     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01150
01151     CStr path;
01152     RetrievePath(selItem, path);
01153
01154     LaunchNewInst(path.c_str());
01155 }
01156
01158 void CWinCvsBrowser::OnUpdateViewExplore(CCmdUI* pCmdUI)
01159 {
01160     if( DisableCommon() )
01161     {
01162         pCmdUI->Enable(FALSE);
01163         return;
01164     }
01165
01166     CTreeCtrl& treeCtrl = GetTreeCtrl();
01167     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01168     if( selItem == 0L )
01169     {
01170         pCmdUI->Enable(FALSE);
01171         return;
01172     }
01173
01174     pCmdUI->Enable(TRUE);
01175 }
01176
01178 void CWinCvsBrowser::OnQueryProperties()
01179 {
01180     CTreeCtrl& treeCtrl = GetTreeCtrl();
01181     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01182
01183     CStr path;
01184     RetrievePath(selItem, path);
01185
01186     LaunchProperties(path.c_str());
01187 }
01188
01190 void CWinCvsBrowser::OnUpdateQueryProperties(CCmdUI* pCmdUI)
01191 {
01192     CTreeCtrl& treeCtrl = GetTreeCtrl();
01193     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01194
01195     pCmdUI->Enable(selItem != NULL);
01196 }
01197
01204 bool CWinCvsBrowser::StepToLocation(const char* path, bool notifyView /*= false*/)
01205 {
01206     bool bRes = false;
01207
01208     CStr root(m_root);
01209     if( !root.endsWith(kPathDelimiter) )
01210         root << kPathDelimiter;
01211
01212     CStr subpath(path);
01213     if( !subpath.endsWith(kPathDelimiter) )
01214         subpath << kPathDelimiter;
01215
01216     // Check if it is a sub-path
01217     if( strnicmp(root, subpath, root.length()) != 0 )
01218         return false;
01219
01220     CTreeCtrl& treeCtrl = GetTreeCtrl();
01221     HTREEITEM item = treeCtrl.GetRootItem();
01222     HTREEITEM lastitem = 0L;
01223     if( item == 0L )
01224         return false;
01225
01226     CWndRedrawMngr redrawMngr(this);
01227
01228     if( stricmp(root, subpath) == 0 )
01229     {
01230         // Must select root node
01231         lastitem = item;
01232         treeCtrl.Expand(item, TVE_EXPAND);
01233     }
01234     else
01235     {
01236         // Step inside synchronized
01237         const char* tmp = (const char*)subpath + root.length() - 1;
01238         while( (tmp = strchr(tmp, kPathDelimiter)) != 0L )
01239         {
01240             const char* name = ++tmp;
01241             if( name[0] == '\0' )
01242                 break;
01243
01244             CStr subname;
01245             const char* tmp2 = strchr(name, kPathDelimiter);
01246             if( tmp2 == 0L )
01247                 subname = name;
01248             else
01249                 subname.set(name, tmp2 - name);
01250
01251             HTREEITEM childItem = treeCtrl.GetNextItem(item, TVGN_CHILD);
01252
01253             // Find the subitem which matches this name
01254             while( childItem != 0L )
01255             {
01256                 EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(childItem);
01257                 if( data != 0L )
01258                 {
01259                     if( _stricmp((*data)[EntnodeData::kName], subname) == 0 )
01260                     {
01261                         // Found it !
01262                         lastitem = item = childItem;
01263                         treeCtrl.Expand(item, TVE_EXPAND);
01264                         break;
01265                     }
01266                 }
01267
01268                 childItem = treeCtrl.GetNextItem(childItem, TVGN_NEXT);
01269             }
01270         }
01271     }
01272
01273     // In case this is called by the view, turn off notifying when the item gets selected
01274     if( lastitem != 0L )
01275     {
01276         CSelectionChangeNotifier notifier(this, notifyView);
01277         VERIFY( bRes = (treeCtrl.Select(lastitem, TVGN_CARET) != 0) );
01278     }
01279
01280     return bRes;
01281 }
01282
01288 HTREEITEM CWinCvsBrowser::GetItemByLocation(const char* path)
01289 {
01290     CStr root(m_root);
01291     if( !root.endsWith(kPathDelimiter) )
01292         root << kPathDelimiter;
01293
01294     CStr subpath(path);
01295     if( !subpath.endsWith(kPathDelimiter) )
01296         subpath << kPathDelimiter;
01297
01298     // Check if it is a sub-path
01299     if( strncmp(root, subpath, root.length()) != 0 )
01300         return 0L;
01301
01302     CTreeCtrl& treeCtrl = GetTreeCtrl();
01303     HTREEITEM item = treeCtrl.GetRootItem();
01304     if( item == 0L )
01305         return 0L;
01306
01307     // Step inside synchronized
01308     const char* tmp = (const char*)subpath + root.length() - 1;
01309     while( (tmp = strchr(tmp, kPathDelimiter)) != 0L )
01310     {
01311         const char* name = ++tmp;
01312         if( name[0] == '\0' )
01313             break;
01314
01315         CStr subname;
01316         const char* tmp2 = strchr(name, kPathDelimiter);
01317         if( tmp2 == 0L )
01318             subname = name;
01319         else
01320             subname.set(name, tmp2 - name);
01321
01322         HTREEITEM childItem = treeCtrl.GetNextItem(item, TVGN_CHILD);
01323
01324         // Find the subitem which matches this name
01325         while( childItem != 0L )
01326         {
01327             EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(childItem);
01328             if( data != 0L )
01329             {
01330                 if( _stricmp((*data)[EntnodeData::kName], subname) == 0 )
01331                 {
01332                     item = childItem;
01333                     break;
01334                 }
01335             }
01336
01337             childItem = treeCtrl.GetNextItem(childItem, TVGN_NEXT);
01338         }
01339
01340         if( childItem == 0L )
01341             return 0L;
01342     }
01343
01344     return item;
01345 }
01346
01353 void CWinCvsBrowser::StoreExpanded(std::vector<CStr>& allExpanded, HTREEITEM root /*= 0L*/)
01354 {
01355     HTREEITEM item = root;
01356     CTreeCtrl& treeCtrl = GetTreeCtrl();
01357     if( item == 0L )
01358         item = treeCtrl.GetRootItem();
01359
01360     if( item == 0L )
01361         return;
01362
01363     TV_ITEM pItem;
01364     pItem.hItem = item;
01365     pItem.mask = TVIF_STATE;
01366     VERIFY(treeCtrl.GetItem(&pItem));
01367
01368     if( pItem.state & TVIS_EXPANDED )
01369     {
01370         CStr path;
01371         RetrievePath(item, path);
01372         allExpanded.push_back(path);
01373     }
01374
01375     HTREEITEM childItem = treeCtrl.GetNextItem(item, TVGN_CHILD);
01376     while( childItem != 0L )
01377     {
01378         StoreExpanded(allExpanded, childItem);
01379         childItem = treeCtrl.GetNextItem(childItem, TVGN_NEXT);
01380     }
01381 }
01382
01388 void CWinCvsBrowser::ResetView(bool forceReload /*= false*/, bool notifyView /*= false*/)
01389 {
01390     // No outstanding request to reset the view any more
01391     m_resetViewPending = false;
01392
01393     CWaitCursor doWait;
01394     CWndRedrawMngr redrawMngr(this);
01395
01396     bool contentChanged = false;
01397
01398     vector<CStr> allExpanded;
01399     StoreExpanded(allExpanded);
01400
01401     CTreeCtrl& treeCtrl = GetTreeCtrl();
01402     CStr selPath;
01403
01404     HTREEITEM selItem = treeCtrl.GetSelectedItem();
01405     if( selItem != 0L )
01406         RetrievePath(selItem, selPath);
01407
01408     if( forceReload )
01409     {
01410         ResetBrowser(m_root);
01411         contentChanged = true;
01412     }
01413
01414     if( contentChanged )
01415     {
01416         // Restore the expanded paths and the selected item
01417         vector<CStr>::const_iterator i;
01418         for(i = allExpanded.begin(); i != allExpanded.end(); ++i)
01419         {
01420             StepToLocation(*i);
01421         }
01422
01423         if( !selPath.empty() )
01424         {
01425             selItem = GetItemByLocation(selPath);
01426             if( selItem != 0L )
01427             {
01428                 VERIFY(treeCtrl.Select(selItem, TVGN_CARET));
01429                 treeCtrl.EnsureVisible(selItem);
01430             }
01431         }
01432     }
01433
01434     // We don't need to notify the file view if we force the reload because that's already done
01435     if( notifyView )
01436     {
01437         CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01438         app->GetFileView()->ResetView();
01439     }
01440 }
01441
01443 void CWinCvsBrowser::OnUpdateViewReload(CCmdUI* pCmdUI)
01444 {
01445     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01446     pCmdUI->Enable(!app->IsCvsRunning());
01447 }
01448
01450 void CWinCvsBrowser::OnViewReload()
01451 {
01452     ResetView(true, true);
01453 }
01454
01456 BOOL CWinCvsBrowser::OnMacro(UINT nID)
01457 {
01458     PyDoPython(WINCMD_to_UCMD(nID));
01459
01460     return 1;
01461 }
01462
01464 void CWinCvsBrowser::OnUpdateMacro(CCmdUI* pCmdUI)
01465 {
01466     if( DisableCommon() )
01467     {
01468         pCmdUI->Enable(FALSE);
01469         return;
01470     }
01471
01472     // Fill the cache with current selection
01473     if( !PyIsUICacheValid() )
01474     {
01475         CTreeCtrl& treeCtrl = GetTreeCtrl();
01476         HTREEITEM selItem = treeCtrl.GetSelectedItem();
01477         if( selItem != 0L )
01478         {
01479             bool deleteData = false;
01480             EntnodeData* data = (EntnodeData*)treeCtrl.GetItemData(selItem);
01481             if( data == 0L )
01482             {
01483                 CStr selPath;
01484                 RetrievePath(selItem, selPath);
01485
01486                 CStr uppath, folder;
01487                 SplitPath(selPath, uppath, folder);
01488
01489                 deleteData = true;
01490                 EntnodePath *thePath = new EntnodePath(uppath);
01491                 data = new EntnodeFolder(folder, thePath);
01492                 thePath->UnRef();
01493             }
01494
01495             PyAppendCache(data);
01496
01497             if( deleteData )
01498                 data->UnRef();
01499         }
01500     }
01501
01502     UCmdUI ucmdui(WINCMD_to_UCMD(pCmdUI->m_nID));
01503     ucmdui.pCmdUI = pCmdUI;
01504     PyDoCmdUI(&ucmdui);
01505 }
01506
01508 BOOL CWinCvsBrowser::PreCreateWindow(CREATESTRUCT& cs)
01509 {
01510     cs.style |= WS_TABSTOP | TVS_SHOWSELALWAYS;
01511
01512     return CTreeView::PreCreateWindow(cs);
01513 }
01514
01519 bool CWinCvsBrowser::DisableCommon()
01520 {
01521     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01522     return app->IsCvsRunning();
01523 }
01524
01526 void CWinCvsBrowser::OnViewCheckout()
01527 {
01528     KoCheckoutHandler handler;
01529     ProcessSelectionCommand(&handler);
01530 }
01531
01533 void CWinCvsBrowser::OnUpdateViewCheckout(CCmdUI* pCmdUI)
01534 {
01535     if( DisableCommon() )
01536     {
01537         pCmdUI->Enable(FALSE);
01538         return;
01539     }
01540
01541     pCmdUI->Enable(TRUE);
01542     pCmdUI->SetText("Chec&kout module...");
01543 }
01544
01546 void CWinCvsBrowser::OnViewImport()
01547 {
01548     KoImportHandler handler;
01549     ProcessSelectionCommand(&handler);
01550 }
01551
01553 void CWinCvsBrowser::OnUpdateViewImport(CCmdUI* pCmdUI)
01554 {
01555     if( DisableCommon() )
01556     {
01557         pCmdUI->Enable(FALSE);
01558         return;
01559     }
01560
01561     pCmdUI->Enable(TRUE);
01562     pCmdUI->SetText("&Import module...");
01563 }
01564
01566 BOOL CWinCvsBrowser::OnCustomize(UINT nID)
01567 {
01568     CustomizeMenus(nID == ID_CUST_FILES_MENU ? kCustomFilesMenu : kCustomBrowserMenu);
01569     return TRUE;
01570 }
01571
01573 void CWinCvsBrowser::OnUpdateCustomize(CCmdUI* pCmdUI)
01574 {
01575     pCmdUI->Enable(TRUE);
01576 }
01577
01579 BOOL CWinCvsBrowser::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
01580 {
01581     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01582     if( app->IsCvsRunning() )
01583     {
01584         SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
01585         return TRUE;
01586     }
01587
01588     return CTreeView::OnSetCursor(pWnd, nHitTest, message);
01589 }
01590
01592 void CWinCvsBrowser::OnDestroy()
01593 {
01594     if( CWincvsApp* app = (CWincvsApp*)AfxGetApp() )
01595     {
01596         app->GetIgnoreModel()->GetNotificationManager()->CheckOut(this);
01597         app->GetFilterModel()->GetNotificationManager()->CheckOut(this);
01598     }
01599
01600     CTreeView::OnDestroy();
01601 }
01602
01604 void CWinCvsBrowser::OnIgnoreChanged()
01605 {
01606     if( !m_resetViewPending )
01607     {
01608         m_resetViewPending = true;
01609         PostMessage(WM_RESETVIEW);
01610     }
01611 }
01612
01616 void CWinCvsBrowser::OnFilteringChanged()
01617 {
01618     if( !m_resetViewPending )
01619     {
01620         m_resetViewPending = true;
01621         PostMessage(WM_RESETVIEW);
01622     }
01623 }
01624
01626 LRESULT CWinCvsBrowser::OnResetView(WPARAM, LPARAM)
01627 {
01628     ResetView(true, false);
01629     return 0;
01630 }
01631
01633 void CWinCvsBrowser::OnAppCmdline()
01634 {
01635     KoCommandLineHandler handler;
01636     ProcessSelectionCommand(&handler);
01637 }
01638
01640 void CWinCvsBrowser::OnAppRtagbranch()
01641 {
01642     KoRtagBranchHandler handler;
01643     ProcessSelectionCommand(&handler);
01644 }
01645
01647 void CWinCvsBrowser::OnAppRtagcreate()
01648 {
01649     KoRtagCreateHandler handler;
01650     ProcessSelectionCommand(&handler);
01651 }
01652
01654 void CWinCvsBrowser::OnAppRtagdelete()
01655 {
01656     KoRtagDeleteHandler handler;
01657     ProcessSelectionCommand(&handler);
01658 }
Generated on Sat Aug 7 22:43:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CUpdateMerge Member List

This is the complete list of members for CUpdateMerge, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
CUpdateMerge(const MultiFiles *mf, bool isCheckout, const char *rev1, const char *rev2, const char *date1, const char *date2, const bool threeWayConflicts) | CUpdateMerge |
DoDataExchange(CDataExchange *pDX) | CUpdateMerge | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CUpdateMerge |
InitHelpID() | CUpdateMerge | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_branchPointMerge | CUpdateMerge |
m_branchPointMergeCheck | CUpdateMerge |
m_browse1TagButton | CUpdateMerge |
m_browse2TagButton | CUpdateMerge |
m_date1 | CUpdateMerge |
m_date1Combo | CUpdateMerge |
m_date2 | CUpdateMerge |
m_date2Combo | CUpdateMerge |
m_hasDate1 | CUpdateMerge |
m_hasDate1Check | CUpdateMerge |
m_hasDate2 | CUpdateMerge |
m_hasDate2Check | CUpdateMerge |
m_isCheckout | CUpdateMerge | [private]
m_mergeType | CUpdateMerge |
m_mergeTypeCombo | CUpdateMerge |
m_mf | CUpdateMerge | [private]
m_rev1 | CUpdateMerge |
m_rev1Combo | CUpdateMerge |
m_rev2 | CUpdateMerge |
m_rev2Combo | CUpdateMerge |
m_threeWayConflicts | CUpdateMerge |
m_threeWayConflictsCheck | CUpdateMerge |
OnBrowseTag1() | CUpdateMerge | [protected]
OnBrowseTag2() | CUpdateMerge | [protected]
OnCheckdate1() | CUpdateMerge | [protected]
OnCheckdate2() | CUpdateMerge | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
OnSelchangeMergeType() | CUpdateMerge | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CUpdateMerge() | CUpdateMerge |

Generated on Sat Aug 7 22:57:34 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GetPrefs.h Source File

common/GetPrefs.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 #if !defined(AFX_GETPREFS_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00022 #define AFX_GETPREFS_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00023
00024 #if _MSC_VER >= 1000
00025 #pragma once
00026 #endif // _MSC_VER >= 1000
00027
00028 #include "SmartComboBox.h"
00029
00030 #ifdef WIN32
00031 #   include "Authen.h"
00032 #   include "HHelpSupport.h"
00033 #endif
00034
00035 #ifdef qUnix
00036 #include "uwidget.h"
00037 #endif
00038
00039 void CompatGetPrefs(void);
00040
00041 #ifdef WIN32
00042
00044 class CGetPrefs_GLOBALS : public CHHelpPropertyPage
00045 {
00046     DECLARE_DYNCREATE(CGetPrefs_GLOBALS)
00047
00048 // Construction
00049 public:
00050     CGetPrefs_GLOBALS();
00051     ~CGetPrefs_GLOBALS();
00052
00053 // Dialog Data
00054     //{{AFX_DATA(CGetPrefs_GLOBALS)
00055     enum { IDD = IDD_PREFS_GLOBALS };
00056     CSpinButtonCtrl m_logoutSpinButton;
00057     CEdit   m_logoutEdit;
00058     CButton m_logoutCheck;
00059     CSpinButtonCtrl m_zspinSpinButton;
00060     CEdit   m_zlevelEdit;
00061     CButton m_tcpipCheck;
00062     BOOL    m_checkoutro;
00063     BOOL    m_prune;
00064     BOOL    m_tcpip;
00065     BOOL    m_quiet;
00066     BOOL    m_cntladd;
00067     BOOL    m_alwaysroot;
00068     BOOL    m_logout;
00069     BOOL    m_unixlf;
00070     UINT    m_zlevel;
00071     BOOL    m_disableSplashScreen;
00072     UINT    m_logoutTime;
00073     BOOL    m_matchEntriesCase;
00074     BOOL    m_encryptCommunication;
00075     //}}AFX_DATA
00076
00077
00078 // Overrides
00079     // ClassWizard generate virtual function overrides
00080     //{{AFX_VIRTUAL(CGetPrefs_GLOBALS)
00081     protected:
00082     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00083     //}}AFX_VIRTUAL
00084
00085 // Implementation
00086 protected:
00087
00088     // Generated message map functions
00089     //{{AFX_MSG(CGetPrefs_GLOBALS)
00090     afx_msg void OnLogout();
00091     afx_msg void OnCheckunixlf();
00092     afx_msg void OnTcpip();
00093     virtual BOOL OnInitDialog();
00094     //}}AFX_MSG
00095     DECLARE_MESSAGE_MAP()
00096 private:
00097     // Data members
00098     bool m_didInteract;
00100     // Methods
00101     virtual void InitHelpID();
00102
00103 public:
00104     // Interface
00105     void StoreValues();
00106 };
00107
00109 class CGetPrefs_WINCVS : public CHHelpPropertyPage
00110 {
00111     DECLARE_DYNCREATE(CGetPrefs_WINCVS)
00112
00113 // Construction
00114 public:
00115     CGetPrefs_WINCVS();
00116     ~CGetPrefs_WINCVS();
00117
00118 // Dialog Data
00119     //{{AFX_DATA(CGetPrefs_WINCVS)
00120     enum { IDD = IDD_PREFS_WINCVS };
00121     CEdit   m_pythonDllEdit;
00122     CEdit   m_tclDllEdit;
00123     CEdit   m_viewerEdit;
00124     CButton m_extDiffSelButton;
00125     CEdit   m_diffProgEdit;
00126     CButton m_useExtDiffCheck;
00127     CEdit   m_settingsFolderEdit;
00128     CButton m_settingsFolderButton;
00129     CButton m_useSettingsFolderCheck;
00130     CString m_viewer;
00131     BOOL    m_useExtDiff;
00132     CString m_diffProg;
00133     BOOL    m_useSettingsFolder;
00134     CString m_settingsFolder;
00135     CString m_tclDll;
00136     CString m_pythonDll;
00137     //}}AFX_DATA
00138
00139
00140 // Overrides
00141     // ClassWizard generate virtual function overrides
00142     //{{AFX_VIRTUAL(CGetPrefs_WINCVS)
00143     protected:
00144     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00145     //}}AFX_VIRTUAL
00146
00147 // Implementation
00148 protected:
00149
00150     // Generated message map functions
00151     //{{AFX_MSG(CGetPrefs_WINCVS)
00152     afx_msg void OnBtnviewer();
00153     afx_msg void OnExtdiffsel();
00154     afx_msg void OnExtdiff();
00155     afx_msg void OnAltsettingschk();
00156     afx_msg void OnBtnsettings();
00157     afx_msg void OnTcldllsel();
00158     afx_msg void OnPythondllsel();
00159     virtual BOOL OnInitDialog();
00160     //}}AFX_MSG
00161     DECLARE_MESSAGE_MAP()
00162 private:
00163     // Data members
00164     bool m_didInteract;
00166     // Methods
00167     virtual void InitHelpID();
00168
00169 public:
00170     // Interface
00171     void StoreValues();
00172 };
00173
00175 class CGetPrefs_CVS : public CHHelpPropertyPage
00176 {
00177     DECLARE_DYNCREATE(CGetPrefs_CVS)
00178
00179 // Construction
00180 public:
00181     CGetPrefs_CVS();
00182     ~CGetPrefs_CVS();
00183
00184 // Dialog Data
00185     //{{AFX_DATA(CGetPrefs_CVS)
00186     enum { IDD = IDD_PREFS_CVS };
00187     CSmartComboBox  m_altCvsCombo;
00188     CButton m_cvsConsoleCheck;
00189     CSmartComboBox  m_showCvsCombo;
00190     CButton m_selAltCvsButton;
00191     CButton m_useAltCvsCheck;
00192     CEdit   m_homeEdit;
00193     CString m_home;
00194     BOOL    m_useAltCvs;
00195     BOOL    m_cvsConsole;
00196     int     m_showCvs;
00197     CString m_altCvs;
00198     //}}AFX_DATA
00199
00200
00201 // Overrides
00202     // ClassWizard generate virtual function overrides
00203     //{{AFX_VIRTUAL(CGetPrefs_CVS)
00204     protected:
00205     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00206     //}}AFX_VIRTUAL
00207
00208 // Implementation
00209 protected:
00210
00211     // Generated message map functions
00212     //{{AFX_MSG(CGetPrefs_CVS)
00213     afx_msg void OnBtnhome();
00214     afx_msg void OnAltcvschk();
00215     afx_msg void OnAltcvssel();
00216     virtual BOOL OnInitDialog();
00217     afx_msg void OnConsole();
00218     //}}AFX_MSG
00219     DECLARE_MESSAGE_MAP()
00220 private:
00221     // Data members
00222     bool m_didInteract;
00224     // Methods
00225     virtual void InitHelpID();
00226
00227 public:
00228     // Interface
00229     void StoreValues();
00230 };
00231
00233 class CGetPrefs_CVSCMD_DIALOGS : public CHHelpPropertyPage
00234 {
00235     DECLARE_DYNCREATE(CGetPrefs_CVSCMD_DIALOGS)
00236
00237 // Construction
00238 public:
00239     CGetPrefs_CVSCMD_DIALOGS();
00240     ~CGetPrefs_CVSCMD_DIALOGS();
00241
00242     void StoreValues();
00243
00244 // Dialog Data
00245     //{{AFX_DATA(CGetPrefs_CVSCMD_DIALOGS)
00246     enum { IDD = IDD_PREFS_CVSCMD_DIALOGS };
00247     BOOL    m_hideUpdate;
00248     BOOL    m_hideDiff;
00249     BOOL    m_hideGraph;
00250     BOOL    m_hideLog;
00251     int     m_keyForce;
00252     BOOL    m_hideAnnotate;
00253     BOOL    m_hideStatus;
00254     BOOL    m_ctrlPressedOnOK;
00255     BOOL    m_fileAction;
00256     //}}AFX_DATA
00257
00258
00259 // Overrides
00260     // ClassWizard generate virtual function overrides
00261     //{{AFX_VIRTUAL(CGetPrefs_CVSCMD_DIALOGS)
00262     protected:
00263     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00264     //}}AFX_VIRTUAL
00265
00266 // Implementation
00267 protected:
00268
00269     // Generated message map functions
00270     //{{AFX_MSG(CGetPrefs_CVSCMD_DIALOGS)
00271     //}}AFX_MSG
00272     DECLARE_MESSAGE_MAP()
00273 private:
00274     // Data members
00275     bool m_didInteract;
00277     // Methods
00278     virtual void InitHelpID();
00279 };
00280
00281 //{{AFX_INSERT_LOCATION}}
00282 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00283
00284 #endif /* WIN32 */
00285
00286 #ifdef qUnix
00287
00288 class UCvsPrefs_GCVS : public UWidget
00289 {
00290     UDECLARE_DYNAMIC(UCvsPrefs_GCVS)
00291 public:
00292     UCvsPrefs_GCVS();
00293     virtual ~UCvsPrefs_GCVS() {}
00294
00295     enum
00296     {
00297         // program paths
00298         kdiffApp = EV_COMMAND_START,  // 0
00299         kviewerApp,                   // 1
00300         kbrowserApp,                  // 2
00301         khelpApp,                     // 3
00302         kconsoleFont,                 // 4
00303         kcvsApp,                      // 5
00304
00305         // browse button
00306         kdiffBtn,                     // 6
00307         kviewerBtn,                   // 7
00308         kbrowserBtn,                  // 8
00309         khelpBtn,                     // 9
00310         kcvsBtn,                      // 10
00311         kconsoleFontBtn,              // 11
00312
00313         kuseAltCvs                    // 12
00314     };
00315
00316     virtual void DoDataExchange(bool fill);
00317
00318     void StoreValues(void);
00319
00320 protected:
00321     UStr m_diffApp;
00322     UStr m_viewerApp;
00323     UStr m_browserApp;
00324     UStr m_helpApp;
00325     bool m_useAltCvs;
00326     UStr m_cvsApp;
00327     UStr m_consoleFont;
00328
00329     ev_msg int OnPickProgram(int cmd);
00330     ev_msg int OnUseAlternateCvs(void);
00331     ev_msg int UCvsPrefs_GCVS::OnSelectFont(void);
00332
00333     bool checkCVS(const char* filename);
00334
00335     UDECLARE_MESSAGE_MAP()
00336 };
00337 #endif /* qUnix */
00338
00339 #endif // !defined(AFX_GETPREFS_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CFilterMaskOptDlg Member List

This is the complete list of members for CFilterMaskOptDlg, including all inherited members.

CFilterMaskOptDlg(const int reactionSpeed, CWnd *pParent=NULL) | CFilterMaskOptDlg |
CHHelpDialog(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpDialog(UINT nIDTemplate, CWnd *pParentWnd=NULL) | CHHelpDialog |
CHHelpSupport() | CHHelpSupport |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CFilterMaskOptDlg | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CFilterMaskOptDlg |
InitHelpID() | CFilterMaskOptDlg | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_reactionSpeed | CFilterMaskOptDlg |
m_reactionSpeedSpin | CFilterMaskOptDlg |
m_reactionSpeedStatic | CFilterMaskOptDlg |
OnChangeReactionSpeed() | CFilterMaskOptDlg | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpDialog | [protected]
OnHelp() | CFilterMaskOptDlg | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpDialog | [protected]
OnInitDialog() | CFilterMaskOptDlg | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
UpdateReactionSpeedInfo() | CFilterMaskOptDlg | [private]
~CHHelpSupport() | CHHelpSupport |

Generated on Sat Aug 7 22:52:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getopt.c Source File

common/getopt.c

Go to the documentation of this file.
00001 /* Getopt for GNU.
00002    NOTE: getopt is now part of the C library, so if you don't know what
00003    "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
00004    before changing it!
00005
00006    Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94
00007     Free Software Foundation, Inc.
00008
00009    This program is free software; you can redistribute it and/or modify it
00010    under the terms of the GNU General Public License as published by the
00011    Free Software Foundation; either version 2, or (at your option) any
00012    later version.
00013
00014    This program is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017    GNU General Public License for more details.  */
00018
00019 /*
00020  * Modified for WinCvs/MacCVS : Alexandre Parenteau <aubonbeurre@hotmail.com> --- August 1998
00021  */
00022 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
00023    Ditto for AIX 3.2 and <stdlib.h>.  */
00024 #ifndef _NO_PROTO
00025 #define _NO_PROTO
00026 #endif
00027
00028 #ifdef HAVE_CONFIG_H
00029 #if defined (emacs) || defined (CONFIG_BROKETS)
00030 /* We use <config.h> instead of "config.h" so that a compilation
00031    using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
00032    (which it would do because it found this file in $srcdir).  */
00033 #include <config.h>
00034 #else
00035 #include "config.h"
00036 #endif
00037 #endif
00038
00039 #ifndef __STDC__
00040 /* This is a separate conditional since some stdc systems
00041    reject `defined (const)'.  */
00042 #ifndef const
00043 #define const
00044 #endif
00045 #endif
00046
00047 #include <stdio.h>
00048
00049 #ifdef HAVE_STRING_H
00050 #include <string.h>
00051 #endif
00052
00053 #if defined(TARGET_OS_MAC) || defined(WIN32)
00054 #include <stdlib.h>
00055 #endif /* TARGET_OS_MAC || WIN32 */
00056
00057 /* Comment out all this code if we are using the GNU C Library, and are not
00058    actually compiling the library itself.  This code is part of the GNU C
00059    Library, but also included in many other GNU distributions.  Compiling
00060    and linking in this code is a waste when using the GNU C library
00061    (especially if it is a shared library).  Rather than having every GNU
00062    program understand `configure --with-gnu-libc' and omit the object files,
00063    it is simpler to just do this in the source for each such file.  */
00064
00065 #if defined (_LIBC) || !defined (__GNU_LIBRARY__)
00066
00067
00068 /* This needs to come after some library #include
00069    to get __GNU_LIBRARY__ defined.  */
00070 #ifdef  __GNU_LIBRARY__
00071 /* Don't include stdlib.h for non-GNU C libraries because some of them
00072    contain conflicting prototypes for getopt.  */
00073 #include <stdlib.h>
00074 #endif  /* GNU C library.  */
00075
00076 /* This version of `getopt' appears to the caller like standard Unix `getopt'
00077    but it behaves differently for the user, since it allows the user
00078    to intersperse the options with the other arguments.
00079
00080    As `getopt' works, it permutes the elements of ARGV so that,
00081    when it is done, all the options precede everything else.  Thus
00082    all application programs are extended to handle flexible argument order.
00083
00084    Setting the environment variable POSIXLY_CORRECT disables permutation.
00085    Then the behavior is completely standard.
00086
00087    GNU application programs can use a third alternative mode in which
00088    they can distinguish the relative order of options and other arguments.  */
00089
00090 #include "getopt.h"
00091
00092 /* For communication from `getopt' to the caller.
00093    When `getopt' finds an option that takes an argument,
00094    the argument value is returned here.
00095    Also, when `ordering' is RETURN_IN_ORDER,
00096    each non-option ARGV-element is returned here.  */
00097
00098 char *optarg = NULL;
00099
00100 /* Index in ARGV of the next element to be scanned.
00101    This is used for communication to and from the caller
00102    and for communication between successive calls to `getopt'.
00103
00104    On entry to `getopt', zero means this is the first call; initialize.
00105
00106    When `getopt' returns EOF, this is the index of the first of the
00107    non-option elements that the caller should itself scan.
00108
00109    Otherwise, `optind' communicates from one call to the next
00110    how much of ARGV has been scanned so far.  */
00111
00112 /* XXX 1003.2 says this must be 1 before any call.  */
00113 int optind = 0;
00114
00115 /* The next char to be scanned in the option-element
00116    in which the last option character we returned was found.
00117    This allows us to pick up the scan where we left off.
00118
00119    If this is zero, or a null string, it means resume the scan
00120    by advancing to the next ARGV-element.  */
00121
00122 static char *nextchar;
00123
00124 /* Callers store zero here to inhibit the error message
00125    for unrecognized options.  */
00126
00127 int opterr = 1;
00128
00129 /* Set to an option character which was unrecognized.
00130    This must be initialized on some systems to avoid linking in the
00131    system's own getopt implementation.  */
00132
00133 int optopt = '?';
00134
00135 /* Describe how to deal with options that follow non-option ARGV-elements.
00136
00137    If the caller did not specify anything,
00138    the default is REQUIRE_ORDER if the environment variable
00139    POSIXLY_CORRECT is defined, PERMUTE otherwise.
00140
00141    REQUIRE_ORDER means don't recognize them as options;
00142    stop option processing when the first non-option is seen.
00143    This is what Unix does.
00144    This mode of operation is selected by either setting the environment
00145    variable POSIXLY_CORRECT, or using `+' as the first character
00146    of the list of option characters.
00147
00148    PERMUTE is the default.  We permute the contents of ARGV as we scan,
00149    so that eventually all the non-options are at the end.  This allows options
00150    to be given in any order, even with programs that were not written to
00151    expect this.
00152
00153    RETURN_IN_ORDER is an option available to programs that were written
00154    to expect options and other ARGV-elements in any order and that care about
00155    the ordering of the two.  We describe each non-option ARGV-element
00156    as if it were the argument of an option with character code 1.
00157    Using `-' as the first character of the list of option characters
00158    selects this mode of operation.
00159
00160    The special argument `--' forces an end of option-scanning regardless
00161    of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
00162    `--' can cause `getopt' to return EOF with `optind' != ARGC.  */
00163
00164 static enum
00165 {
00166   REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
00167 } ordering;
00168
00169 /* Value of POSIXLY_CORRECT environment variable.  */
00170 static char *posixly_correct;
00171
00172 #ifdef  __GNU_LIBRARY__
00173 /* We want to avoid inclusion of string.h with non-GNU libraries
00174    because there are many ways it can cause trouble.
00175    On some systems, it contains special magic macros that don't work
00176    in GCC.  */
00177 #include <string.h>
00178 #define my_index    strchr
00179 #else
00180
00181 /* Avoid depending on library functions or files
00182    whose names are inconsistent.  */
00183
00184 #ifndef TARGET_OS_MAC
00185 char *getenv ();
00186 #endif /* !TARGET_OS_MAC */
00187
00188 #ifndef __STDC__
00189 static char *
00190 my_index (str, chr)
00191      const char *str;
00192      int chr;
00193 #else /* __STDC__ */
00194 static char *
00195 my_index (const char *str, int chr)
00196 #endif /* __STDC__ */
00197 {
00198   while (*str)
00199     {
00200       if (*str == chr)
00201     return (char *) str;
00202       str++;
00203     }
00204   return 0;
00205 }
00206
00207 /* If using GCC, we can safely declare strlen this way.
00208    If not using GCC, it is ok not to declare it.  */
00209 #ifdef __GNUC__
00210 /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
00211    That was relevant to code that was here before.  */
00212 #ifndef __STDC__
00213 /* gcc with -traditional declares the built-in strlen to return int,
00214    and has done so at least since version 2.4.5. -- rms.  */
00215 extern int strlen (const char *);
00216 #endif /* not __STDC__ */
00217 #endif /* __GNUC__ */
00218
00219 #endif /* not __GNU_LIBRARY__ */
00220
00221 /* Handle permutation of arguments.  */
00222
00223 /* Describe the part of ARGV that contains non-options that have
00224    been skipped.  `first_nonopt' is the index in ARGV of the first of them;
00225    `last_nonopt' is the index after the last of them.  */
00226
00227 static int first_nonopt;
00228 static int last_nonopt;
00229
00230 /* Exchange two adjacent subsequences of ARGV.
00231    One subsequence is elements [first_nonopt,last_nonopt)
00232    which contains all the non-options that have been skipped so far.
00233    The other is elements [last_nonopt,optind), which contains all
00234    the options processed since those non-options were skipped.
00235
00236    `first_nonopt' and `last_nonopt' are relocated so that they describe
00237    the new indices of the non-options in ARGV after they are moved.  */
00238
00239 #ifndef __STDC__
00240 static void
00241 exchange (argv)
00242      char **argv;
00243 #else /* __STDC__ */
00244 static void
00245 exchange (char **argv)
00246 #endif /* __STDC__ */
00247 {
00248   int bottom = first_nonopt;
00249   int middle = last_nonopt;
00250   int top = optind;
00251   char *tem;
00252
00253   /* Exchange the shorter segment with the far end of the longer segment.
00254      That puts the shorter segment into the right place.
00255      It leaves the longer segment in the right place overall,
00256      but it consists of two parts that need to be swapped next.  */
00257
00258   while (top > middle && middle > bottom)
00259     {
00260       if (top - middle > middle - bottom)
00261     {
00262       /* Bottom segment is the short one.  */
00263       int len = middle - bottom;
00264       register int i;
00265
00266       /* Swap it with the top part of the top segment.  */
00267       for (i = 0; i < len; i++)
00268         {
00269           tem = argv[bottom + i];
00270           argv[bottom + i] = argv[top - (middle - bottom) + i];
00271           argv[top - (middle - bottom) + i] = tem;
00272         }
00273       /* Exclude the moved bottom segment from further swapping.  */
00274       top -= len;
00275     }
00276       else
00277     {
00278       /* Top segment is the short one.  */
00279       int len = top - middle;
00280       register int i;
00281
00282       /* Swap it with the bottom part of the bottom segment.  */
00283       for (i = 0; i < len; i++)
00284         {
00285           tem = argv[bottom + i];
00286           argv[bottom + i] = argv[middle + i];
00287           argv[middle + i] = tem;
00288         }
00289       /* Exclude the moved top segment from further swapping.  */
00290       bottom += len;
00291     }
00292     }
00293
00294   /* Update records for the slots the non-options now occupy.  */
00295
00296   first_nonopt += (optind - last_nonopt);
00297   last_nonopt = optind;
00298 }
00299
00300 /* Initialize the internal data when the first call is made.  */
00301
00302 #ifndef __STDC__
00303 static const char *
00304 _getopt_initialize (optstring)
00305      const char *optstring;
00306 #else /* __STDC__ */
00307 static const char *
00308 _getopt_initialize (const char *optstring)
00309 #endif /* __STDC__ */
00310 {
00311   /* Start processing options with ARGV-element 1 (since ARGV-element 0
00312      is the program name); the sequence of previously skipped
00313      non-option ARGV-elements is empty.  */
00314
00315   first_nonopt = last_nonopt = optind = 1;
00316
00317   nextchar = NULL;
00318
00319   posixly_correct = getenv ("POSIXLY_CORRECT");
00320
00321   /* Determine how to handle the ordering of options and nonoptions.  */
00322
00323   if (optstring[0] == '-')
00324     {
00325       ordering = RETURN_IN_ORDER;
00326       ++optstring;
00327     }
00328   else if (optstring[0] == '+')
00329     {
00330       ordering = REQUIRE_ORDER;
00331       ++optstring;
00332     }
00333   else if (posixly_correct != NULL)
00334     ordering = REQUIRE_ORDER;
00335   else
00336     ordering = PERMUTE;
00337
00338   return optstring;
00339 }
00340
00341 /* Scan elements of ARGV (whose length is ARGC) for option characters
00342    given in OPTSTRING.
00343
00344    If an element of ARGV starts with '-', and is not exactly "-" or "--",
00345    then it is an option element.  The characters of this element
00346    (aside from the initial '-') are option characters.  If `getopt'
00347    is called repeatedly, it returns successively each of the option characters
00348    from each of the option elements.
00349
00350    If `getopt' finds another option character, it returns that character,
00351    updating `optind' and `nextchar' so that the next call to `getopt' can
00352    resume the scan with the following option character or ARGV-element.
00353
00354    If there are no more option characters, `getopt' returns `EOF'.
00355    Then `optind' is the index in ARGV of the first ARGV-element
00356    that is not an option.  (The ARGV-elements have been permuted
00357    so that those that are not options now come last.)
00358
00359    OPTSTRING is a string containing the legitimate option characters.
00360    If an option character is seen that is not listed in OPTSTRING,
00361    return '?' after printing an error message.  If you set `opterr' to
00362    zero, the error message is suppressed but we still return '?'.
00363
00364    If a char in OPTSTRING is followed by a colon, that means it wants an arg,
00365    so the following text in the same ARGV-element, or the text of the following
00366    ARGV-element, is returned in `optarg'.  Two colons mean an option that
00367    wants an optional arg; if there is text in the current ARGV-element,
00368    it is returned in `optarg', otherwise `optarg' is set to zero.
00369
00370    If OPTSTRING starts with `-' or `+', it requests different methods of
00371    handling the non-option ARGV-elements.
00372    See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
00373
00374    Long-named options begin with `--' instead of `-'.
00375    Their names may be abbreviated as long as the abbreviation is unique
00376    or is an exact match for some defined option.  If they have an
00377    argument, it follows the option name in the same ARGV-element, separated
00378    from the option name by a `=', or else the in next ARGV-element.
00379    When `getopt' finds a long-named option, it returns 0 if that option's
00380    `flag' field is nonzero, the value of the option's `val' field
00381    if the `flag' field is zero.
00382
00383    The elements of ARGV aren't really const, because we permute them.
00384    But we pretend they're const in the prototype to be compatible
00385    with other systems.
00386
00387    LONGOPTS is a vector of `struct option' terminated by an
00388    element containing a name which is zero.
00389
00390    LONGIND returns the index in LONGOPT of the long-named option found.
00391    It is only valid when a long-named option has been found by the most
00392    recent call.
00393
00394    If LONG_ONLY is nonzero, '-' as well as '--' can introduce
00395    long-named options.  */
00396
00397 #ifndef __STDC__
00398 int
00399 _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
00400      int argc;
00401      char *const *argv;
00402      const char *optstring;
00403      const struct option *longopts;
00404      int *longind;
00405      int long_only;
00406 #else /* __STDC__ */
00407 int
00408 _getopt_internal (int argc, char *const *argv, const char *optstring,
00409      const struct option *longopts, int *longind, int long_only)
00410 #endif /* __STDC__ */
00411 {
00412   optarg = NULL;
00413
00414   if (optind == 0)
00415     optstring = _getopt_initialize (optstring);
00416
00417   if (nextchar == NULL || *nextchar == '\0')
00418     {
00419       /* Advance to the next ARGV-element.  */
00420
00421       if (ordering == PERMUTE)
00422     {
00423       /* If we have just processed some options following some non-options,
00424          exchange them so that the options come first.  */
00425
00426       if (first_nonopt != last_nonopt && last_nonopt != optind)
00427         exchange ((char **) argv);
00428       else if (last_nonopt != optind)
00429         first_nonopt = optind;
00430
00431       /* Skip any additional non-options
00432          and extend the range of non-options previously skipped.  */
00433
00434       while (optind < argc
00435          && (argv[optind][0] != '-' || argv[optind][1] == '\0'))
00436         optind++;
00437       last_nonopt = optind;
00438     }
00439
00440       /* The special ARGV-element `--' means premature end of options.
00441      Skip it like a null option,
00442      then exchange with previous non-options as if it were an option,
00443      then skip everything else like a non-option.  */
00444
00445       if (optind != argc && !strcmp (argv[optind], "--"))
00446     {
00447       optind++;
00448
00449       if (first_nonopt != last_nonopt && last_nonopt != optind)
00450         exchange ((char **) argv);
00451       else if (first_nonopt == last_nonopt)
00452         first_nonopt = optind;
00453       last_nonopt = argc;
00454
00455       optind = argc;
00456     }
00457
00458       /* If we have done all the ARGV-elements, stop the scan
00459      and back over any non-options that we skipped and permuted.  */
00460
00461       if (optind == argc)
00462     {
00463       /* Set the next-arg-index to point at the non-options
00464          that we previously skipped, so the caller will digest them.  */
00465       if (first_nonopt != last_nonopt)
00466         optind = first_nonopt;
00467       return EOF;
00468     }
00469
00470       /* If we have come to a non-option and did not permute it,
00471      either stop the scan or describe it to the caller and pass it by.  */
00472
00473       if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
00474     {
00475       if (ordering == REQUIRE_ORDER)
00476         return EOF;
00477       optarg = argv[optind++];
00478       return 1;
00479     }
00480
00481       /* We have found another option-ARGV-element.
00482      Skip the initial punctuation.  */
00483
00484       nextchar = (argv[optind] + 1
00485           + (longopts != NULL && argv[optind][1] == '-'));
00486     }
00487
00488   /* Decode the current option-ARGV-element.  */
00489
00490   /* Check whether the ARGV-element is a long option.
00491
00492      If long_only and the ARGV-element has the form "-f", where f is
00493      a valid short option, don't consider it an abbreviated form of
00494      a long option that starts with f.  Otherwise there would be no
00495      way to give the -f short option.
00496
00497      On the other hand, if there's a long option "fubar" and
00498      the ARGV-element is "-fu", do consider that an abbreviation of
00499      the long option, just like "--fu", and not "-f" with arg "u".
00500
00501      This distinction seems to be the most useful approach.  */
00502
00503   if (longopts != NULL
00504       && (argv[optind][1] == '-'
00505       || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
00506     {
00507       char *nameend;
00508       const struct option *p;
00509       const struct option *pfound = NULL;
00510       int exact = 0;
00511       int ambig = 0;
00512       int indfound;
00513       int option_index;
00514
00515       for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
00516     /* Do nothing.  */ ;
00517
00518       /* Test all long options for either exact match
00519      or abbreviated matches.  */
00520       for (p = longopts, option_index = 0; p->name; p++, option_index++)
00521     if (!strncmp (p->name, nextchar, nameend - nextchar))
00522       {
00523         if (nameend - nextchar == (int) strlen (p->name))
00524           {
00525         /* Exact match found.  */
00526         pfound = p;
00527         indfound = option_index;
00528         exact = 1;
00529         break;
00530           }
00531         else if (pfound == NULL)
00532           {
00533         /* First nonexact match found.  */
00534         pfound = p;
00535         indfound = option_index;
00536           }
00537         else
00538           /* Second or later nonexact match found.  */
00539           ambig = 1;
00540       }
00541
00542       if (ambig && !exact)
00543     {
00544       if (opterr)
00545         fprintf (stderr, "%s: option `%s' is ambiguous\n",
00546              argv[0], argv[optind]);
00547       nextchar += strlen (nextchar);
00548       optind++;
00549       return '?';
00550     }
00551
00552       if (pfound != NULL)
00553     {
00554       option_index = indfound;
00555       optind++;
00556       if (*nameend)
00557         {
00558           /* Don't test has_arg with >, because some C compilers don't
00559          allow it to be used on enums.  */
00560           if (pfound->has_arg)
00561         optarg = nameend + 1;
00562           else
00563         {
00564           if (opterr)
00565             {
00566               if (argv[optind - 1][1] == '-')
00567             /* --option */
00568             fprintf (stderr,
00569                  "%s: option `--%s' doesn't allow an argument\n",
00570                  argv[0], pfound->name);
00571               else
00572             /* +option or -option */
00573             fprintf (stderr,
00574                  "%s: option `%c%s' doesn't allow an argument\n",
00575                  argv[0], argv[optind - 1][0], pfound->name);
00576             }
00577           nextchar += strlen (nextchar);
00578           return '?';
00579         }
00580         }
00581       else if (pfound->has_arg == 1)
00582         {
00583           if (optind < argc)
00584         optarg = argv[optind++];
00585           else
00586         {
00587           if (opterr)
00588             fprintf (stderr, "%s: option `%s' requires an argument\n",
00589                  argv[0], argv[optind - 1]);
00590           nextchar += strlen (nextchar);
00591           return optstring[0] == ':' ? ':' : '?';
00592         }
00593         }
00594       nextchar += strlen (nextchar);
00595       if (longind != NULL)
00596         *longind = option_index;
00597       if (pfound->flag)
00598         {
00599           *(pfound->flag) = pfound->val;
00600           return 0;
00601         }
00602       return pfound->val;
00603     }
00604
00605       /* Can't find it as a long option.  If this is not getopt_long_only,
00606      or the option starts with '--' or is not a valid short
00607      option, then it's an error.
00608      Otherwise interpret it as a short option.  */
00609       if (!long_only || argv[optind][1] == '-'
00610       || my_index (optstring, *nextchar) == NULL)
00611     {
00612       if (opterr)
00613         {
00614           if (argv[optind][1] == '-')
00615         /* --option */
00616         fprintf (stderr, "%s: unrecognized option `--%s'\n",
00617              argv[0], nextchar);
00618           else
00619         /* +option or -option */
00620         fprintf (stderr, "%s: unrecognized option `%c%s'\n",
00621              argv[0], argv[optind][0], nextchar);
00622         }
00623       nextchar = (char *) "";
00624       optind++;
00625       return '?';
00626     }
00627     }
00628
00629   /* Look at and handle the next short option-character.  */
00630
00631   {
00632     char c = *nextchar++;
00633     char *temp = my_index (optstring, c);
00634
00635     /* Increment `optind' when we start to process its last character.  */
00636     if (*nextchar == '\0')
00637       ++optind;
00638
00639     if (temp == NULL || c == ':')
00640       {
00641     if (opterr)
00642       {
00643         if (posixly_correct)
00644           /* 1003.2 specifies the format of this message.  */
00645           fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
00646         else
00647           fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c);
00648       }
00649     optopt = c;
00650     return '?';
00651       }
00652     if (temp[1] == ':')
00653       {
00654     if (temp[2] == ':')
00655       {
00656         /* This is an option that accepts an argument optionally.  */
00657         if (*nextchar != '\0')
00658           {
00659         optarg = nextchar;
00660         optind++;
00661           }
00662         else
00663           optarg = NULL;
00664         nextchar = NULL;
00665       }
00666     else
00667       {
00668         /* This is an option that requires an argument.  */
00669         if (*nextchar != '\0')
00670           {
00671         optarg = nextchar;
00672         /* If we end this ARGV-element by taking the rest as an arg,
00673            we must advance to the next element now.  */
00674         optind++;
00675           }
00676         else if (optind == argc)
00677           {
00678         if (opterr)
00679           {
00680             /* 1003.2 specifies the format of this message.  */
00681             fprintf (stderr, "%s: option requires an argument -- %c\n",
00682                  argv[0], c);
00683           }
00684         optopt = c;
00685         if (optstring[0] == ':')
00686           c = ':';
00687         else
00688           c = '?';
00689           }
00690         else
00691           /* We already incremented `optind' once;
00692          increment it again when taking next ARGV-elt as argument.  */
00693           optarg = argv[optind++];
00694         nextchar = NULL;
00695       }
00696       }
00697     return c;
00698   }
00699 }
00700
00701 #ifndef __STDC__
00702 int
00703 getopt (argc, argv, optstring)
00704      int argc;
00705      char *const *argv;
00706      const char *optstring;
00707 #else /* __STDC__ */
00708 int getopt (int argc, char *const *argv, const char *optstring)
00709 #endif /* __STDC__ */
00710 {
00711   return _getopt_internal (argc, argv, optstring,
00712                (const struct option *) 0,
00713                (int *) 0,
00714                0);
00715 }
00716
00717 #endif  /* _LIBC or not __GNU_LIBRARY__.  */
00718
00719 #ifdef TEST
00720
00721 /* Compile with -DTEST to make an executable for use in testing
00722    the above definition of `getopt'.  */
00723
00724 int
00725 main (argc, argv)
00726      int argc;
00727      char **argv;
00728 {
00729   int c;
00730   int digit_optind = 0;
00731
00732   while (1)
00733     {
00734       int this_option_optind = optind ? optind : 1;
00735
00736       c = getopt (argc, argv, "abc:d:0123456789");
00737       if (c == EOF)
00738     break;
00739
00740       switch (c)
00741     {
00742     case '0':
00743     case '1':
00744     case '2':
00745     case '3':
00746     case '4':
00747     case '5':
00748     case '6':
00749     case '7':
00750     case '8':
00751     case '9':
00752       if (digit_optind != 0 && digit_optind != this_option_optind)
00753         printf ("digits occur in two different argv-elements.\n");
00754       digit_optind = this_option_optind;
00755       printf ("option %c\n", c);
00756       break;
00757
00758     case 'a':
00759       printf ("option a\n");
00760       break;
00761
00762     case 'b':
00763       printf ("option b\n");
00764       break;
00765
00766     case 'c':
00767       printf ("option c with value `%s'\n", optarg);
00768       break;
00769
00770     case '?':
00771       break;
00772
00773     default:
00774       printf ("?? getopt returned character code 0%o ??\n", c);
00775     }
00776     }
00777
00778   if (optind < argc)
00779     {
00780       printf ("non-option ARGV-elements: ");
00781       while (optind < argc)
00782     printf ("%s ", argv[optind++]);
00783       printf ("\n");
00784     }
00785
00786   exit (0);
00787 }
00788
00789 #endif /* TEST */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTCP2Parse::RGBColor Member List

This is the complete list of members for CTCP2Parse::RGBColor, including all inherited members.

B | CTCP2Parse::RGBColor
G | CTCP2Parse::RGBColor
nul_void_ignore | CTCP2Parse::RGBColor
R | CTCP2Parse::RGBColor
RGB | CTCP2Parse::RGBColor

Generated on Sat Aug 7 22:56:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

COptionalPropertySheet Member List

This is the complete list of members for COptionalPropertySheet, including all inherited members.

CHHelpPropertySheet(UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CHHelpPropertySheet |
CHHelpPropertySheet(LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | CHHelpPropertySheet |
CHHelpSupport() | CHHelpSupport |
COptionalPropertySheet(bool bOptionChecked, UINT nIDCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | COptionalPropertySheet |
COptionalPropertySheet(bool bOptionChecked, LPCTSTR pszCaption, CWnd *pParentWnd=NULL, UINT iSelectPage=0) | COptionalPropertySheet |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoModal() | COptionalPropertySheet | [virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetHideCommandDlg() | COptionalPropertySheet |
GetOptionCheckRect(LPRECT lpRect) | COptionalPropertySheet | [protected]
GetWnd() | CHHelpSupport | [protected, virtual]
InitHelpID() | COptionalPropertySheet | [protected, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_bOptionChecked | COptionalPropertySheet | [protected]
m_optionCheck | COptionalPropertySheet | [protected]
OnCommand(WPARAM wParam, LPARAM lParam) | COptionalPropertySheet | [protected, virtual]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertySheet | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertySheet | [protected]
OnInitDialog() | COptionalPropertySheet | [protected, virtual]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertySheet() | CHHelpPropertySheet | [virtual]
~CHHelpSupport() | CHHelpSupport |
~COptionalPropertySheet() | COptionalPropertySheet | [virtual]

Generated on Sat Aug 7 22:55:30 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CLogin_MAIN Member List

This is the complete list of members for CLogin_MAIN, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CLogin_MAIN(bool forceRoot, const char *cvsroot) | CLogin_MAIN |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CLogin_MAIN | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CLogin_MAIN |
InitHelpID() | CLogin_MAIN | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_cvsroot | CLogin_MAIN |
m_cvsrootCombo | CLogin_MAIN |
m_forceRoot | CLogin_MAIN |
m_forceRootCheck | CLogin_MAIN |
m_helpLogin | CLogin_MAIN |
m_selCvsrootButton | CLogin_MAIN |
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnForceroot() | CLogin_MAIN | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnInitDialog() | CLogin_MAIN | [protected, virtual]
OnSelcvsroot() | CLogin_MAIN | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CLogin_MAIN() | CLogin_MAIN |

Generated on Sat Aug 7 22:54:46 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/PythonGlue.cpp Source File

common/PythonGlue.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- August 2001
00019  */
00020
00021 /*
00022  * PythonGlue.cpp --- glue to the Python language
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #include <stdarg.h>
00028 #include <string.h>
00029 #include <stdlib.h>
00030
00031 #ifdef HAVE_UNISTD_H
00032 #include <unistd.h>
00033 #endif
00034
00035 #ifdef WIN32
00036 #   include "resource.h"
00037 #   include "NoPython.h"
00038 #endif /* WIN32 */
00039
00040 #ifdef qUnix
00041 #   include <iostream>
00042 #   include <fstream>
00043 #   include "UCvsApp.h"
00044 #   include "UCvsMenubar.h"
00045 #   include "UCvsCommands.h"
00046 #   include "support.h"
00047 #endif
00048
00049 #include "PythonGlue.h"
00050 #include "CvsLog.h"
00051 #include "AppConsole.h"
00052 #include "MacrosSetup.h"
00053 #include "umenu.h"
00054 #include "PythonContainer.h"
00055 #include "PythonImpl.h"
00056 #include "TclGlue.h"
00057 #include "AppGlue.h"
00058 #include "CvsArgs.h"
00059 #include "FileTraversal.h"
00060 #include "AskYesNo.h"
00061 #include "dll_loader.h"
00062 #include "CvsPrefs.h"
00063 #include "CvsAlert.h"
00064
00065 #if USE_PYTHON
00066 #   include <osdefs.h>
00067 #endif
00068
00069 #if qMacCvsPP
00070 #   include "MacCvsApp.h"
00071 #   include "MacCvsConstant.h"
00072 #   include "MacMisc.h"
00073 #endif
00074
00075 #if qCarbon
00076 #   include "TclGlue.mac.h"
00077 #endif
00078
00079 #ifdef WIN32
00080 #   ifdef _DEBUG
00081 #   define new DEBUG_NEW
00082 #   undef THIS_FILE
00083     static char THIS_FILE[] = __FILE__;
00084 #   endif
00085 #   include "wincvs_winutil.h"
00086 #endif /* WIN32 */
00087
00088 #ifndef NEW
00089 #define NEW new
00090 #endif
00091
00092 #if TARGET_RT_MAC_MACHO
00093 #   define CompatLoadLibrary CarbonCompatLoadLibrary
00094 #   define CompatCloseLibrary CarbonCompatCloseLibrary
00095 #   define _CompatCallLibrary _CarbonCompatCallLibrary
00096 #endif
00097
00098 #if USE_PYTHON
00099
00100 PyThreadState *CPython_Interp::m_mainInterpreter = 0L;
00101 static bool gUICacheValid = false;
00102 static std::vector<ENTNODE> gUICache;
00103 static PyObject *gUICacheObj = NULL;
00104
00105 class CPyThreadState
00106 {
00107 public:
00108     CPyThreadState(PyThreadState *p) : m_p(p)
00109     {
00110         m_p = PyThreadState_Swap(p);
00111     }
00112     ~CPyThreadState()
00113     {
00114         PyThreadState_Swap(m_p);
00115     }
00116 protected:
00117     PyThreadState *m_p;
00118 };
00119
00120 enum
00121 {
00122     _stdout_style = 15,
00123     _stderr_style = 16,
00124     _trace_style = 17
00125 };
00126
00127 static PyObject *cvsgui_write(PyObject *self, PyObject *args)
00128 {
00129     char *str;
00130     int style;
00131     PyObject *shell;
00132
00133     if(!PyArg_ParseTuple(args, "siO", &str, &style, &shell))
00134         return NULL;
00135
00136     TRY
00137     {
00138         if(style == _stdout_style)
00139             cvs_outstr(str, strlen(str));
00140         else
00141             cvs_errstr(str, strlen(str));
00142     }
00143     CATCH_ALL(e)
00144     {
00145         PyHandleCvsguiError(e);
00146         return NULL;
00147     }
00148     END_CATCH_ALL
00149
00150     return PyContainer::Void();
00151 }
00152
00153 static PyObject *cvsgui_GetMainMenuWidget(PyObject *self, PyObject *args)
00154 {
00155     int res = 0;
00156
00157     if(!PyArg_ParseTuple(args, ""))
00158         return NULL;
00159
00160     TRY
00161     {
00162 #ifdef qUnix
00163         UCvsMenubar *menuBar = (UCvsMenubar *)UEventQueryWidget(kUCvsMenubarID);
00164
00165         res = menuBar->GetWidID();
00166 #endif
00167     }
00168     CATCH_ALL(e)
00169     {
00170         PyHandleCvsguiError(e);
00171         return NULL;
00172     }
00173     END_CATCH_ALL
00174
00175     return PyInt_FromLong(res);
00176 }
00177
00178 static PyObject *cvsgui_GetTopMacroSelectionMenu(PyObject *self, PyObject *args)
00179 {
00180     static UMENU macroMenu = 0L;
00181
00182     if(!PyArg_ParseTuple(args, ""))
00183         return NULL;
00184
00185     PyAutoObject<PyMenuMgr::obj_t> res = PyMenuMgr::New();
00186     if (!res.IsValid())
00187         return NULL;
00188
00189     TRY
00190     {
00191 #ifdef WIN32
00192         int pos;
00193         if(macroMenu == 0L)
00194         {
00195             CMenu *top = GetMenuEntry(ID_MACRO_SEL, pos);
00196             if(top)
00197             {
00198                 top->DeleteMenu(pos, MF_BYPOSITION);
00199                 macroMenu = (UMENU)(HMENU)*top;
00200             }
00201         }
00202 #endif
00203 #if qMacCvsPP
00204         if(macroMenu == 0L)
00205         {
00206             LMenuBar *menuBar   = LMenuBar::GetCurrentMenuBar();
00207             LMenu *menu = menuBar->FetchMenu(menu_MacroSel);
00208             if(menu)
00209                 macroMenu = menu->GetMenuID();
00210         }
00211 #endif
00212 #if qUnix
00213         if(macroMenu == 0L)
00214         {
00215             UCvsMenubar *menuBar = (UCvsMenubar *)UEventQueryWidget(kUCvsMenubarID);
00216             UMenu *menu = (UMenu *)(menuBar->GetWidget(cmdMACROS));
00217
00218             if(menu) {
00219                 UMenuDelete((UMENU)menu, 0);
00220                 macroMenu = (UMENU)menu;
00221             }
00222         }
00223 #endif
00224         res->m_object = new PyMenuMgr(macroMenu);
00225     }
00226     CATCH_ALL(e)
00227     {
00228         PyHandleCvsguiError(e);
00229         return NULL;
00230     }
00231     END_CATCH_ALL
00232
00233     return res.CopyReturn();
00234 }
00235
00236 static PyObject *cvsgui_GetTopMacroAdminMenu(PyObject *self, PyObject *args)
00237 {
00238     static UMENU macroMenu = 0L;
00239
00240     if(!PyArg_ParseTuple(args, ""))
00241         return NULL;
00242
00243     PyAutoObject<PyMenuMgr::obj_t> res = PyMenuMgr::New();
00244     if (!res.IsValid())
00245         return NULL;
00246
00247     TRY
00248     {
00249 #ifdef WIN32
00250         int pos;
00251         if(macroMenu == 0L)
00252         {
00253             CMenu *top = GetMenuEntry(ID_MACRO_ADMIN, pos);
00254             if(top)
00255             {
00256                 top->DeleteMenu(pos, MF_BYPOSITION);
00257                 macroMenu = (UMENU)(HMENU)*top;
00258             }
00259         }
00260 #endif
00261 #if qMacCvsPP
00262         if(macroMenu == 0L)
00263         {
00264             LMenuBar *menuBar   = LMenuBar::GetCurrentMenuBar();
00265             LMenu *menu = menuBar->FetchMenu(menu_MacroAdmin);
00266             if(menu)
00267                 macroMenu = menu->GetMenuID();
00268         }
00269 #endif
00270 #if qUnix
00271         if(macroMenu == 0L)
00272         {
00273             UCvsMenubar *menuBar = (UCvsMenubar *)UEventQueryWidget(kUCvsMenubarID);
00274             UMenu *menu = (UMenu *)(menuBar->GetWidget(cmdADMINMACROS));
00275
00276             if(menu) {
00277                 UMenuDelete((UMENU)menu, 0);
00278                 macroMenu = (UMENU)menu;
00279             }
00280         }
00281 #endif
00282         res->m_object = new PyMenuMgr(macroMenu);
00283     }
00284     CATCH_ALL(e)
00285     {
00286         PyHandleCvsguiError(e);
00287         return NULL;
00288     }
00289     END_CATCH_ALL
00290
00291     return res.CopyReturn();
00292 }
00293
00294 static PyObject *cvsgui_GetSelection(PyObject *self, PyObject *args)
00295 {
00296     if(!PyArg_ParseTuple(args, ""))
00297         return NULL;
00298
00299     if(gUICacheObj != 0L)
00300     {
00301         Py_INCREF(gUICacheObj);
00302         return gUICacheObj;
00303     }
00304
00305     gUICacheObj = PyTuple_New(gUICache.size());
00306     if(gUICacheObj == NULL)
00307         return NULL;
00308
00309     std::vector<ENTNODE>::const_iterator i;
00310     int cnt;
00311     for(cnt = 0, i = gUICache.begin(); i != gUICache.end(); ++i, ++cnt)
00312     {
00313         PyAutoObject<PyCvsEntry::obj_t> res = PyCvsEntry::New();
00314         if (!res.IsValid())
00315             return NULL;
00316
00317         res->m_object = new PyCvsEntry(*i);
00318
00319         PyTuple_SET_ITEM(gUICacheObj, cnt, res.CopyReturn());
00320     }
00321
00322     Py_INCREF(gUICacheObj);
00323     return gUICacheObj;
00324 }
00325
00326 class CFillPyEntries : public TraversalReport
00327 {
00328 public:
00329     CSortList<ENTNODE> & m_entries;
00330     std::vector<CStr> m_ignlist;
00331
00332     CFillPyEntries(CSortList<ENTNODE> & entries) :
00333         m_entries(entries) {}
00334
00335     virtual ~CFillPyEntries() {}
00336
00337     virtual kTraversal EnterDirectory(const char *fullpath, const char *dirname, const UFSSpec * macspec)
00338     {
00339         Entries_Open (m_entries, fullpath);
00340         BuildIgnoredList(m_ignlist, fullpath);
00341         return kContinueTraversal;
00342     }
00343
00344     virtual kTraversal ExitDirectory(const char *fullpath)
00345     {
00346         m_ignlist.erase(m_ignlist.begin(), m_ignlist.end());
00347         return kContinueTraversal;
00348     }
00349
00350     virtual kTraversal OnError(const char *err, int errcode)
00351     {
00352         return kTraversalError;
00353     }
00354
00355     virtual kTraversal OnIdle(const char *fullpath)
00356     {
00357         return kContinueTraversal;
00358     }
00359
00360     virtual kTraversal OnDirectory(const char *fullpath,
00361         const char *fullname,
00362         const char *name,
00363         const struct stat & dir, const UFSSpec * macspec)
00364     {
00365 #if defined(WIN32) || defined(TARGET_OS_MAC)
00366         if(stricmp(name, "CVS") == 0)
00367 #else
00368         if(strcmp(name, "CVS") == 0)
00369 #endif
00370             return kSkipFile;
00371
00372         /*EntnodeData *data = */Entries_SetVisited(fullpath, m_entries, name, dir, true, &m_ignlist);
00373
00374         return kSkipFile;
00375     }
00376
00377     virtual kTraversal OnAlias(const char *fullpath,
00378         const char *fullname,
00379         const char *name,
00380         const struct stat & dir, const UFSSpec * macspec)
00381     {
00382         return OnFile(fullpath, fullname, name, dir, macspec);
00383     }
00384
00385     virtual kTraversal OnFile(const char *fullpath,
00386         const char *fullname,
00387         const char *name,
00388         const struct stat & dir, const UFSSpec * macspec)
00389     {
00390         /*EntnodeData *data = */Entries_SetVisited(fullpath, m_entries, name, dir, false, &m_ignlist);
00391
00392         return kContinueTraversal;
00393     }
00394 };
00395
00396 static PyObject *cvsgui_GetCvsEntries(PyObject *self, PyObject *args)
00397 {
00398     char *path;
00399
00400     if(!PyArg_ParseTuple(args, "s", &path))
00401         return NULL;
00402
00403     CSortList<ENTNODE> entries(200, ENTNODE::Compare);
00404     CFillPyEntries traverse(entries);
00405     /*kTraversal res = */FileTraverse(path, traverse);
00406
00407     // add the missing files
00408     Entries_SetMissing(entries);
00409
00410     int numEntries = entries.NumOfElements();
00411     PyObject *obj = PyTuple_New(numEntries);
00412     if(obj == NULL)
00413         return NULL;
00414
00415     for(int i = 0; i < numEntries; i++)
00416     {
00417         const ENTNODE & theNode = entries.Get(i);
00418         EntnodeData *data = theNode.Data();
00419
00420         PyAutoObject<PyCvsEntry::obj_t> res = PyCvsEntry::New();
00421         if (!res.IsValid())
00422             return NULL;
00423
00424         res->m_object = new PyCvsEntry(data);
00425
00426         PyTuple_SET_ITEM(obj, i, res.CopyReturn());
00427     }
00428
00429     return obj;
00430 }
00431
00432 #if defined(WIN32)
00433 //
00434 // Get correct (UTC) file modification time.
00435 // Used for dealing with notorious DST bug.
00436 //
00437 static PyObject * cvsgui_GetFileModTime(PyObject *self, PyObject *args)
00438 {
00439     struct wnt_stat sb;
00440     struct tm * p_utc = NULL;
00441
00442     const char *path;
00443
00444 // PyObject_Length exists only for debugging version (ActiveState Python 2.1)
00445 #if defined(_DEBUG)
00446     int len = PyObject_Length(args);
00447     if (len < 1)
00448     {
00449         char errstr[255];
00450         sprintf(errstr, "Too few arguments (%d, expected 1)", len);
00451         PyErr_SetString(gCvsguiErr, errstr);
00452         return NULL;
00453     }
00454     else if (len > 1)
00455     {
00456         char errstr[255];
00457         sprintf(errstr, "Too many arguments (%d, expected 1)", len);
00458         PyErr_SetString(gCvsguiErr, errstr);
00459         return NULL;
00460     }
00461 #endif
00462
00463     if(!PyArg_ParseTuple(args, "s", &path))
00464         return NULL;
00465
00466     if (wnt_stat(path, &sb) != 0)
00467     {
00468         char errstr[255];
00469         sprintf(errstr, "Could not find file \"%s\"", path);
00470         PyErr_SetString(gCvsguiErr, errstr);
00471         return NULL;
00472     }
00473
00474     p_utc = gmtime(& sb.st_mtime);
00475     return Py_BuildValue("s", asctime(p_utc));
00476 }
00477 #endif  // defined(_WIN32)
00478
00479 static PyObject *cvsgui_LaunchTclMacro(PyObject *self, PyObject *args)
00480 {
00481     char *macroName;
00482
00483     if(!PyArg_ParseTuple(args, "s", &macroName) || !CTcl_Interp::IsAvail())
00484         return NULL;
00485
00486     std::vector<ENTNODE>::const_iterator i;
00487     TclBrowserReset();
00488     for(i = gUICache.begin(); i != gUICache.end(); ++i)
00489     {
00490         EntnodeData *data = *i;
00491         TclBrowserAppend((*data)[EntnodeData::kPath], data);
00492     }
00493
00494     CTcl_Interp interp;
00495     CStr path = macroName;
00496     CTcl_Interp::Unixfy(path);
00497     interp.DoScriptVar("source \"%s\"", (const char *)path);
00498
00499     return PyContainer::Void();
00500 }
00501
00502 class CBuffer
00503 {
00504 public:
00505     CBuffer() : m_curSize(0)
00506     {
00507     }
00508
00509     void append(const char *ptr, size_t s)
00510     {
00511         if((s + m_curSize) > m_buf.size())
00512         {
00513             size_t step = s > 1024 ? s : 1024;
00514             m_buf.AdjustSize(m_buf.size() + step);
00515         }
00516 #ifdef WIN32
00517         char *tmp = (char *)m_buf + m_curSize;
00518         size_t incs = 0;
00519         while(s--)
00520         {
00521             char c = *ptr++;
00522             if(c == '\r')
00523                 continue;
00524             *tmp++ = c;
00525             incs++;
00526         }
00527         m_curSize += incs;
00528 #elif defined(TARGET_OS_MAC)
00529         char *tmp = (char *)m_buf + m_curSize;
00530         size_t cnt = s;
00531         while(cnt--)
00532         {
00533             char c = *ptr++;
00534             if(c == '\r')
00535                 c = '\n';
00536             *tmp++ = c;
00537         }
00538         m_curSize += s;
00539 #else
00540         memcpy((char *)m_buf + m_curSize, ptr, s * sizeof(char));
00541         m_curSize += s;
00542 #endif
00543     }
00544
00545     inline size_t size() const { return m_curSize; }
00546     inline operator char *(void) const { return m_buf; }
00547
00548 protected:
00549     size_t m_curSize;
00550     CStaticAllocT<char> m_buf;
00551 };
00552
00553 class CPyCvsConsole : public CCvsConsole
00554 {
00555 public:
00556     CPyCvsConsole() {}
00557     virtual ~CPyCvsConsole() {}
00558
00559     virtual long cvs_out(const char *txt, long len)
00560     {
00561         m_out.append(txt, len);
00562         return len;
00563     }
00564
00565     virtual long cvs_err(const char *txt, long len)
00566     {
00567         m_err.append(txt, len);
00568         return len;
00569     }
00570
00571     CBuffer m_out;
00572     CBuffer m_err;
00573 };
00574
00575 static PyObject *cvsgui_PromptMessage(PyObject *self, PyObject *args)
00576 {
00577     char *msg, *title, *ok, *cncl;
00578
00579     if( !PyArg_ParseTuple(args, "ssss", &msg, &title, &ok, &cncl) )
00580         return NULL;
00581
00582     bool res;
00583
00584     TRY
00585     {
00586         CvsAlert cvsAlert(kCvsAlertQuestionIcon, msg, NULL, ok, cncl);
00587         cvsAlert.SetAlertTitle(title);
00588
00589         res = (cvsAlert.ShowAlert() == kCvsAlertOKButton);
00590     }
00591     CATCH_ALL(e)
00592     {
00593         PyHandleCvsguiError(e);
00594         return NULL;
00595     }
00596     END_CATCH_ALL
00597
00598     if( res )
00599     {
00600         return PyContainer::True();
00601     }
00602
00603     return PyContainer::False();
00604 }
00605
00606 static PyObject *cvsgui_PromptEditMessage(PyObject *self, PyObject *args)
00607 {
00608     char *msg, *title, *ok, *cncl, *edit;
00609
00610     if(!PyArg_ParseTuple(args, "sssss", &msg, &edit, &title, &ok, &cncl))
00611         return NULL;
00612
00613     bool res;
00614     UStr ed;
00615
00616     TRY
00617     {
00618         ed = edit;
00619         res = PromptEditMessage(msg, ed, title, ok, cncl);
00620     }
00621     CATCH_ALL(e)
00622     {
00623         PyHandleCvsguiError(e);
00624         return NULL;
00625     }
00626     END_CATCH_ALL
00627
00628     return Py_BuildValue("(is)", res ? 1 : 0, ed.empty() ? "" : ed.c_str());
00629 }
00630
00631 static PyObject *cvsgui_LaunchBrowser(PyObject *self, PyObject *args)
00632 {
00633     char *url;
00634
00635     if(!PyArg_ParseTuple(args, "s", &url))
00636         return NULL;
00637
00638 #ifdef WIN32
00639     ShellExecute(NULL, "open", url, /*postData*/0L, NULL, SW_SHOWNORMAL);
00640 #endif
00641
00642     return PyContainer::Void();
00643 }
00644
00645 static void outputXML(FILE *out, CLogNode *node)
00646 {
00647     switch(node->GetType())
00648     {
00649         case kNodeHeader :
00650         {
00651             fputs("<RCS>\n", out);
00652             const CRcsFile rcs = **(CLogNodeHeader *)node;
00653             fprintf(out, "<RCSFILE>%s</RCSFILE>\n", rcs.RcsFile().c_str());
00654             fprintf(out, "<WORKINGFILE>%s</WORKINGFILE>\n", rcs.WorkingFile().c_str());
00655             fprintf(out, "<HEADREV>%s</HEADREV>\n", rcs.HeadRev().c_str());
00656             fprintf(out, "<BRANCHREV>%s</BRANCHREV>\n", rcs.BranchRev().c_str());
00657             fprintf(out, "<KEYWORDSUBST>%s</KEYWORDSUBST>\n", rcs.KeywordSubst().c_str());
00658             fprintf(out, "<DESCRIPTION>%s</DESCRIPTION>\n", rcs.DescLog().c_str());
00659             fprintf(out, "<SELREVISIONS>%d</SELREVISIONS>\n", rcs.SelRevisions());
00660             fprintf(out, "<TOTREVISIONS>%d</TOTREVISIONS>\n", rcs.TotRevisions());
00661             fprintf(out, "<LOCKSTRICT>%d</LOCKSTRICT>\n", rcs.LockStrict() ? 1 : 0);
00662
00663             fputs("<ACCESSLIST>\n", out);
00664             const std::vector<CLogStr> & ac = rcs.AccessList();
00665             std::vector<CLogStr>::const_iterator i;
00666             for(i = ac.begin(); i != ac.end(); ++i)
00667             {
00668                 fprintf(out, "<ACCESS>%s</ACCESS>\n", (*i).c_str());
00669             }
00670             fputs("</ACCESSLIST>\n", out);
00671
00672             fputs("<SYMBOLICLIST>\n", out);
00673             const std::vector<CRevNumber> & sy = rcs.SymbolicList();
00674             std::vector<CRevNumber>::const_iterator j;
00675             for(j = sy.begin(); j != sy.end(); ++j)
00676             {
00677                 fprintf(out, "<SYMBOLIC>%s</SYMBOLIC>\n", (*j).c_str());
00678             }
00679             fputs("</SYMBOLICLIST>\n", out);
00680
00681             fputs("<LOCKLIST>\n", out);
00682             const std::vector<CRevNumber> & lo = rcs.LocksList();
00683             for(j = lo.begin(); j != lo.end(); ++j)
00684             {
00685                 fprintf(out, "<LOCK>%s</LOCK>\n", (*j).c_str());
00686             }
00687             fputs("</LOCKLIST>\n", out);
00688             break;
00689         }
00690         case kNodeRev :
00691         {
00692             const CRevFile & rev = **(CLogNodeRev *)node;
00693             fputs("<REVISION>\n", out);
00694             fprintf(out, "<NUMBER>%s</NUMBER>\n", rev.RevNum().c_str());
00695             const struct tm & tm = rev.RevTime();
00696             fprintf(out, "<DATE>%d/%d/%d %d:%d:%d</DATE>\n", (tm.tm_year + 1900),
00697                 tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
00698             fprintf(out, "<AUTHOR>%s</AUTHOR>\n", rev.Author().c_str());
00699             fprintf(out, "<STATE>%s</STATE>\n", rev.State().c_str());
00700             fprintf(out, "<CHANGES>+%d%d</CHANGES>\n", rev.ChgPos(), rev.ChgNeg());
00701             fprintf(out, "<DESCRIPTION>%s</DESCRIPTION>\n", rev.DescLog().c_str());
00702
00703             fputs("<BRANCHLIST>\n", out);
00704             const std::vector<CRevNumber> & sy = rev.BranchesList();
00705             std::vector<CRevNumber>::const_iterator j;
00706             for(j = sy.begin(); j != sy.end(); ++j)
00707             {
00708                 fprintf(out, "<REVBRANCH>%s</REVBRANCH>\n", (*j).c_str());
00709             }
00710             fputs("</BRANCHLIST>\n", out);
00711             break;
00712         }
00713         case kNodeBranch :
00714         {
00715             fputs("<BRANCH>\n", out);
00716             const CLogStr & branch = **(CLogNodeBranch *)node;
00717             fprintf(out, "<BRANCHNAME>%s</BRANCHNAME>\n", branch.c_str());
00718             break;
00719         }
00720         case kNodeTag :
00721         {
00722             fputs("<TAG>\n", out);
00723             const CLogStr & tag = **(CLogNodeTag *)node;
00724             fprintf(out, "<TAGNAME>%s</TAGNAME>\n", tag.c_str());
00725             break;
00726         }
00727     }
00728
00729     if(node->Childs().size() > 0)
00730     {
00731         fputs("<REVISIONS>\n", out);
00732         std::vector<CLogNode *>::const_iterator i;
00733         for(i = node->Childs().begin(); i != node->Childs().end(); ++i)
00734         {
00735             outputXML(out, *i);
00736         }
00737         fputs("</REVISIONS>\n", out);
00738     }
00739
00740     switch(node->GetType())
00741     {
00742         case kNodeHeader :
00743             fputs("</RCS>\n", out);
00744             break;
00745         case kNodeRev :
00746             fputs("</REVISION>\n", out);
00747             break;
00748         case kNodeBranch :
00749             fputs("</BRANCH>\n", out);
00750             break;
00751         case kNodeTag :
00752             fputs("</TAG>\n", out);
00753             break;
00754     }
00755
00756     if(node->Next() != 0L)
00757     {
00758         outputXML(out, node->Next());
00759     }
00760 }
00761
00762 static PyObject *cvsgui_GetHistoryAsXML(PyObject *self, PyObject *args)
00763 {
00764     PyObject *logfile, *xmlfile;
00765
00766     if(!PyArg_ParseTuple(args, "O!O!", GetPyFile_Type(), &logfile,
00767         GetPyFile_Type(), &xmlfile))
00768             return NULL;
00769
00770     TRY
00771     {
00772         std::vector<CRcsFile> & allRcs = CvsLogParse(PyFile_AsFile(logfile));
00773
00774         std::vector<CRcsFile>::iterator i;
00775         FILE *xml = PyFile_AsFile(xmlfile);
00776         fputs("<ROOT>\n", xml);
00777         for(i = allRcs.begin(); i != allRcs.end(); ++i)
00778         {
00779             std::auto_ptr<CLogNode> node(CvsLogGraph(*i));
00780             outputXML(xml, node.get());
00781         }
00782         fputs("</ROOT>\n", xml);
00783
00784         CvsLogReset();
00785     }
00786     CATCH_ALL(e)
00787     {
00788         PyHandleCvsguiError(e);
00789         return NULL;
00790     }
00791     END_CATCH_ALL
00792
00793     return PyContainer::Void();
00794 }
00795
00796 static PyObject *cvsgui_RunCvs(PyObject *self, PyObject *args)
00797 {
00798     CvsArgs arg;
00799     PyObject *cargs;
00800     int exitOnError = 1;
00801     int exitc;
00802     CPyCvsConsole console;
00803
00804     if(!PyArg_ParseTuple(args, "O!|i", GetPyTuple_Type(), &cargs, &exitOnError))
00805         return NULL;
00806
00807     TRY
00808     {
00809         int argc = PyTuple_Size(cargs);
00810         for(int i = 0; i < argc; i++)
00811         {
00812             PyObject *o = PyTuple_GET_ITEM(cargs, i);
00813             if(!PyString_Check(o))
00814             {
00815                 PyErr_SetString(gCvsguiErr, "Wrong argument type, should be string");
00816                 return NULL;
00817             }
00818
00819             arg.add(PyString_AsString(o));
00820         }
00821
00822         exitc = launchCVS(0L, arg.Argc(), arg.Argv(), &console);
00823
00824         if(exitOnError && exitc != 0)
00825         {
00826             UStr str;
00827             str.set(console.m_err, console.m_err.size());
00828             str << "cvs returned an non-zero error code (";
00829             str << exitc;
00830             str << ")\n";
00831             PyErr_SetString(gCvsguiErr, str);
00832             return NULL;
00833         }
00834     }
00835     CATCH_ALL(e)
00836     {
00837         PyHandleCvsguiError(e);
00838         return NULL;
00839     }
00840     END_CATCH_ALL
00841
00842     return Py_BuildValue("(is#s#)", exitc, (char *)console.m_out, console.m_out.size(),
00843         (char *)console.m_err, console.m_err.size());
00844 }
00845
00846 static PyMethodDef cvsgui_methods[] =
00847 {
00848     {"write", (PyCFunction)cvsgui_write, METH_VARARGS, ""},
00849     {"GetMainMenuWidget", (PyCFunction)cvsgui_GetMainMenuWidget, METH_VARARGS, ""},
00850     {"GetTopMacroSelectionMenu", (PyCFunction)cvsgui_GetTopMacroSelectionMenu, METH_VARARGS, ""},
00851     {"GetTopMacroAdminMenu", (PyCFunction)cvsgui_GetTopMacroAdminMenu, METH_VARARGS, ""},
00852     {"GetSelection", (PyCFunction)cvsgui_GetSelection, METH_VARARGS, ""},
00853     {"GetCvsEntries", (PyCFunction)cvsgui_GetCvsEntries, METH_VARARGS, ""},
00854 #if defined(WIN32)
00855     {"GetFileModTime", (PyCFunction)cvsgui_GetFileModTime, METH_VARARGS, ""},
00856 #endif
00857     {"LaunchTclMacro", (PyCFunction)cvsgui_LaunchTclMacro, METH_VARARGS, ""},
00858     {"RunCvs", (PyCFunction)cvsgui_RunCvs, METH_VARARGS, ""},
00859     {"PromptMessage", (PyCFunction)cvsgui_PromptMessage, METH_VARARGS, ""},
00860     {"PromptEditMessage", (PyCFunction)cvsgui_PromptEditMessage, METH_VARARGS, ""},
00861     {"LaunchBrowser", (PyCFunction)cvsgui_LaunchBrowser, METH_VARARGS, ""},
00862     {"GetHistoryAsXML", (PyCFunction)cvsgui_GetHistoryAsXML, METH_VARARGS, ""},
00863     {NULL, NULL}
00864 };
00865
00866 static std::vector<PyMethodDef> gAllMethods;
00867
00868 static void InitializeInterp(PyThreadState *interp)
00869 {
00870     CPyThreadState lock(interp);
00871
00872     // first time, create the method table for cvsgui module
00873     if(gAllMethods.empty())
00874     {
00875         PyMethodDef *tmp = cvsgui_methods;
00876         while(tmp->ml_name)
00877         {
00878             gAllMethods.push_back(*tmp);
00879             tmp++;
00880         }
00881
00882         PyRegistry::RegisterAllObjects(gAllMethods);
00883     }
00884
00885     // this module contains the glue code functions
00886     PyObject *m = Py_InitModule4("_cvsgui", &gAllMethods[0],
00887         "The cvsgui glue functions", (PyObject*)NULL,PYTHON_API_VERSION);
00888
00889     if(m == NULL)
00890     {
00891         cvs_err("Could not create the Python cvsgui module !\n");
00892         return;
00893     }
00894
00895     // this is the exception we raised when the error comes from us
00896     PyObject *d = PyModule_GetDict(m);
00897     if(gCvsguiErr == NULL)
00898         gCvsguiErr = PyErr_NewException("_cvsgui.error", NULL, NULL);
00899     if (gCvsguiErr != NULL)
00900         PyDict_SetItemString(d, "error", gCvsguiErr);
00901
00902     PyRegistry::CallInitValues(d);
00903
00904     // Ideally we need to use Jonathan's mechanism
00905     PyObject *ver = PyString_FromString("1.3");
00906     if (ver != NULL) {
00907         PyDict_SetItemString(d, "CVSGUI_VERSION", ver);
00908         Py_DECREF(ver);
00909     }
00910
00911 #ifdef WIN32
00912     char *script = NULL;
00913
00914     HINSTANCE hInst = ::AfxGetInstanceHandle();
00915     HRSRC rsrc = FindResource(hInst, "PYSHELL", "PYSCRIPT");
00916
00917     if(rsrc)
00918     {
00919         HGLOBAL h = LoadResource(hInst, rsrc);
00920         if(h)
00921         {
00922             DWORD size = SizeofResource(hInst, rsrc);
00923             script = (char *)malloc(size + 1);
00924             char *ptr = (char *)LockResource(h);
00925
00926             if(script)
00927             {
00928                 char *tmp = script;
00929                 while(size--)
00930                 {
00931                     char c = *ptr++;
00932                     if(c == '\r')
00933                         continue;
00934                     *tmp++ = c;
00935                 }
00936                 *tmp = '\0';
00937             }
00938
00939             FreeResource(h);
00940         }
00941     }
00942
00943 #endif // WIN32
00944 #ifdef qUnix        // Unix
00945     UStr        filename;
00946     CStr        path;
00947     MacrosGetLoc(path);
00948
00949     filename =  path.c_str();
00950     filename += "/cvsgui/Shell.py";
00951 #endif
00952
00953 #if qMacCvsPP
00954   char *script = NULL;
00955
00956   CFURLRef    scriptURL(CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("mfcshell"), CFSTR("py"), NULL));
00957   if ( scriptURL )
00958   {
00959     CFDataRef   scriptData(NULL);
00960     if ( CFURLCreateDataAndPropertiesFromResource(NULL, scriptURL, &scriptData, NULL, NULL, NULL) )
00961     {
00962       CFIndex   size = CFDataGetLength(scriptData);
00963       script = (char *)malloc(size + 1);
00964       memcpy(script, CFDataGetBytePtr(scriptData), size);
00965       script[size] = '\0';
00966       CFRelease(scriptData);
00967     }
00968     CFRelease(scriptURL);
00969   }
00970 #endif // qMacCvsPP
00971
00972     // augment the library path of python with our library
00973     CStr ourLibPath;
00974     PythonLibGetLoc(ourLibPath);
00975
00976     UStr libPath = Py_GetPath();
00977     if(!ourLibPath.empty())
00978     {
00979         libPath << DELIM;
00980         libPath << ourLibPath;
00981         PySys_SetPath((char*)(const char*)libPath);
00982     }
00983
00984 #ifdef qUnix
00985     FILE *f = fopen(filename, "r");
00986     if(f)
00987     {
00988         PyRun_SimpleFile(f, (const char *)filename);
00989         fclose(f);
00990     }
00991     else
00992     {
00993         cvs_err("Could not initialize properly the Python interpreter !\n");
00994     }
00995 #else
00996     // this is the script to setup stdout/stderr and reroute it
00997     // to the console window
00998     if(script)
00999     {
01000         PyRun_SimpleString(script);
01001
01002         free(script);
01003     }
01004     else
01005     {
01006         cvs_err("Could not initialize properly the Python interpreter !\n");
01007     }
01008 #endif
01009 }
01010 #endif // USE_PYTHON
01011
01012 CPython_Interp::CPython_Interp(bool mainInterp)
01013 {
01014     fInterp = 0L;
01015
01016 #if USE_PYTHON
01017     if( !CPython_Interp::IsAvail() )
01018     {
01019         return;
01020     }
01021
01022     if( mainInterp )
01023     {
01024         fInterp = m_mainInterpreter;
01025         gCvsPrefs.SetTclFileRunning(true);
01026         return;
01027     }
01028
01029     {
01030         CPyThreadState lock(0L);
01031
01032         fInterp = Py_NewInterpreter();
01033         if( fInterp == NULL )
01034             return;
01035     }
01036
01037     InitializeInterp(fInterp);
01038     gCvsPrefs.SetTclFileRunning(true);
01039 #endif
01040 }
01041
01042 CPython_Interp::~CPython_Interp()
01043 {
01044 #if USE_PYTHON
01045     if( fInterp != 0L )
01046     {
01047         gCvsPrefs.SetTclFileRunning(false);
01048
01049         if( fInterp != m_mainInterpreter )
01050         {
01051             CPyThreadState lock(fInterp);
01052
01053             Py_EndInterpreter(fInterp);
01054         }
01055     }
01056 #endif
01057 }
01058
01064 bool CPython_Interp::IsAvail(const bool forceReload /*= false*/)
01065 {
01066 #if USE_PYTHON
01067 #   if (defined(WIN32) && !qCvsDebug) || TARGET_RT_MAC_MACHO
01068     static bool firstTime = true;
01069     static bool pyAvail = false;
01070
01071     if( firstTime || forceReload )
01072     {
01073 #   if defined(WIN32) || TARGET_RT_MAC_MACHO
01074         static CompatConnectID connID = 0L;
01075
01076         if( connID )
01077         {
01078             if( CompatCloseLibrary(&connID) )
01079             {
01080                 connID = 0L;
01081                 pyAvail = false;
01082             }
01083         }
01084 #   endif
01085
01086 #   ifdef WIN32
01087         if( !pyAvail )
01088         {
01089             pyAvail = (gCvsPrefs.PythonLibrary() && CompatLoadLibrary(&connID, gCvsPrefs.PythonLibrary())) ||
01090                 CompatLoadLibrary(&connID, "python23.dll") ||
01091                 CompatLoadLibrary(&connID, "python22.dll") ||
01092                 CompatLoadLibrary(&connID, "python21.dll");
01093         }
01094 #   endif
01095
01096 #   if TARGET_RT_MAC_MACHO
01097         pyAvail = CompatLoadLibrary(&connID, "/Library/Frameworks/Python.framework") ||
01098             CompatLoadLibrary(&connID, "/System/Library/Frameworks/Python.framework");
01099 #   endif
01100
01101 #   if defined(WIN32) || TARGET_RT_MAC_MACHO
01102 #   define LOAD_CODEFRAG(name) \
01103         if( pyAvail ) \
01104             pyAvail = (*(void **)&name##_glue = \
01105                 _CompatCallLibrary(connID, #name)) != 0L
01106 #   endif
01107
01108 #   if defined(WIN32) || TARGET_RT_MAC_MACHO
01109         LOAD_CODEFRAG(PyThreadState_Swap);
01110         LOAD_CODEFRAG(PyDict_SetItemString);
01111         LOAD_CODEFRAG(PyErr_Clear);
01112         LOAD_CODEFRAG(PyInt_FromLong);
01113         LOAD_CODEFRAG(PyErr_SetString);
01114         LOAD_CODEFRAG(PyArg_ParseTuple);
01115         LOAD_CODEFRAG(PyTuple_New);
01116         LOAD_CODEFRAG(Py_BuildValue);
01117         LOAD_CODEFRAG(PyFile_AsFile);
01118         LOAD_CODEFRAG(PyString_AsString);
01119         LOAD_CODEFRAG(PyTuple_Size);
01120         LOAD_CODEFRAG(PyRun_SimpleString);
01121         LOAD_CODEFRAG(PyRun_SimpleFile);
01122         LOAD_CODEFRAG(Py_SetProgramName);
01123         LOAD_CODEFRAG(Py_Initialize);
01124         LOAD_CODEFRAG(Py_Finalize);
01125         LOAD_CODEFRAG(Py_IsInitialized);
01126         LOAD_CODEFRAG(Py_NewInterpreter);
01127         LOAD_CODEFRAG(Py_EndInterpreter);
01128         LOAD_CODEFRAG(PyString_FromString);
01129         LOAD_CODEFRAG(PyErr_NewException);
01130         LOAD_CODEFRAG(PyModule_GetDict);
01131         LOAD_CODEFRAG(Py_InitModule4);
01132         LOAD_CODEFRAG(PyEval_InitThreads);
01133         LOAD_CODEFRAG(Py_FindMethod);
01134         LOAD_CODEFRAG(_PyObject_New);
01135 #   if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 3
01136         LOAD_CODEFRAG(_PyObject_Del);
01137 #   else
01138         LOAD_CODEFRAG(PyObject_Free);
01139 #   endif
01140         LOAD_CODEFRAG(PySys_SetPath);
01141         LOAD_CODEFRAG(Py_GetPath);
01142
01143         LOAD_CODEFRAG(PyType_Type);
01144         LOAD_CODEFRAG(PyFile_Type);
01145         LOAD_CODEFRAG(PyString_Type);
01146         LOAD_CODEFRAG(PyTuple_Type);
01147         LOAD_CODEFRAG(PyInt_Type);
01148         LOAD_CODEFRAG(_Py_NoneStruct);
01149         LOAD_CODEFRAG(_Py_ZeroStruct);
01150         LOAD_CODEFRAG(_Py_TrueStruct);
01151
01152 #       ifdef WIN32
01153         if( !pyAvail )
01154         {
01155             WarnNoPython();
01156         }
01157 #       endif
01158 #   endif /* WIN32 */
01159
01160         firstTime = false;
01161     }
01162
01163     return pyAvail;
01164 #   else
01165     return true;
01166 #   endif
01167 #else // !USE_PYTHON
01168     return false;
01169 #endif // !USE_PYTHON
01170 }
01171
01176 int CPython_Interp::DoScript(const char *script)
01177 {
01178 #if USE_PYTHON
01179     if( fInterp == 0L )
01180         return -1;
01181
01182     CPyThreadState lock(fInterp);
01183
01184     PyRun_SimpleString((char*)script);
01185
01186     return 0;
01187 #else
01188     return -1;
01189 #endif
01190 }
01191
01196 int CPython_Interp::DoScriptVar(const char* format, ...)
01197 {
01198 #if USE_PYTHON
01199     if(fInterp == 0L)
01200         return -1;
01201
01202     va_list args;
01203     char script[1024] = {'\0'};
01204
01205     va_start(args, format);
01206     vsprintf(script, format, args);
01207     va_end (args);
01208
01209     return DoScript(script);
01210 #else
01211     return -1;
01212 #endif
01213 }
01214
01219 int CPython_Interp::DoFile(const char* file)
01220 {
01221 #if USE_PYTHON
01222     if( fInterp == 0L )
01223         return -1;
01224
01225     CPyThreadState lock(fInterp);
01226
01227     FILE* f = fopen(file, "r");
01228     if( f )
01229     {
01230         PyRun_SimpleFile(f, (char*)file);
01231         fclose(f);
01232     }
01233
01234     return 0;
01235 #else
01236     return -1;
01237 #endif
01238 }
01239
01240 void CPython_Interp::InitPythonSupport(const bool forceReload /*= false*/)
01241 {
01242 #if USE_PYTHON
01243     if( !CPython_Interp::IsAvail(forceReload) )
01244         return;
01245
01246     char* programName;
01247
01248 #ifdef WIN32
01249     programName = "wincvs";
01250 #elif TARGET_RT_MAC_MACHO
01251     programName = "maccvsX";
01252 #else
01253     programName = "gcvs";
01254 #endif
01255
01256     Py_SetProgramName(programName);
01257     Py_Initialize();
01258     PyEval_InitThreads();
01259
01260     m_mainInterpreter = PyThreadState_Swap(NULL);
01261
01262     InitializeInterp(m_mainInterpreter);
01263 #endif
01264 }
01265
01266 void CPython_Interp::ClosePythonSupport(void)
01267 {
01268 #if USE_PYTHON
01269     if( !CPython_Interp::IsAvail() )
01270         return;
01271
01272     PyThreadState_Swap(m_mainInterpreter);
01273 //  PyEval_ReleaseLock();
01274
01275     PyInvalUICache();
01276
01277     Py_Finalize();
01278
01279     m_mainInterpreter = 0L;
01280 #endif
01281 }
01282
01286 void PyMacrosReloadAll(void)
01287 {
01288     // Get the macro folder
01289     UStr path;
01290     MacrosGetLoc(path);
01291
01292 #ifdef WIN32
01293     CString newpath(path);
01294     newpath.Replace("\\", "\\\\");
01295     path = newpath;
01296 #endif
01297
01298     CPython_Interp interp;
01299     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01300         "gMacroRegistry.LoadMacros(\"%s\")", (char*)path.c_str());
01301 }
01302
01307 void PyDoCmdUI(UCmdUI* ucmdui)
01308 {
01309     CPython_Interp interp;
01310     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01311         "from cvsgui.CmdUI import *; "
01312 #if defined(SIZEOF_VOID_P) && (SIZEOF_VOID_P == 8)
01313         "gMacroRegistry.DoCmdUI(CmdUI(%llu), %d)", (long long unsigned)ucmdui, ucmdui->m_nID);
01314 #else
01315         "gMacroRegistry.DoCmdUI(CmdUI(%d), %d)", (long)ucmdui, ucmdui->m_nID);
01316 #endif
01317 }
01318
01323 void PyDoPython(int cmd)
01324 {
01325     CPython_Interp interp;
01326     interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
01327         "gMacroRegistry.DoCmd(%d)", cmd);
01328 }
01329
01334 bool PyIsUICacheValid()
01335 {
01336 #if USE_PYTHON
01337     return gUICacheValid;
01338 #else
01339     return false;
01340 #endif
01341 }
01342
01346 void PyValidUICache()
01347 {
01348 #if USE_PYTHON
01349     gUICacheValid = true;
01350 #endif
01351 }
01352
01356 void PyInvalUICache()
01357 {
01358 #if USE_PYTHON
01359     gUICache.erase(gUICache.begin(), gUICache.end());
01360     gUICacheValid = false;
01361     Py_XDECREF(gUICacheObj);
01362     gUICacheObj = 0L;
01363 #endif
01364 }
01365
01370 void PyAppendCache(EntnodeData* data)
01371 {
01372 #if USE_PYTHON
01373     Py_XDECREF(gUICacheObj);
01374     gUICacheObj = 0L;
01375     gUICache.push_back(ENTNODE(data));
01376     gUICacheValid = true;
01377 #endif
01378 }
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

AFX_DLLVERSIONINFO Member List

This is the complete list of members for AFX_DLLVERSIONINFO, including all inherited members.

cbSize | AFX_DLLVERSIONINFO
dwBuildNumber | AFX_DLLVERSIONINFO
dwMajorVersion | AFX_DLLVERSIONINFO
dwMinorVersion | AFX_DLLVERSIONINFO
dwPlatformID | AFX_DLLVERSIONINFO

Generated on Sat Aug 7 22:48:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/MfFileDialog.h Source File

WinCvs/MfFileDialog.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- December 2002
00019  */
00020
00021 /*
00022  * MfFileDialog.h --- class to pick set of files
00023  */
00024
00025 #if !defined(AFX_MFFILEDIALOG_H__66684391_7914_4A0D_9848_022A6CA7573C__INCLUDED_)
00026 #define AFX_MFFILEDIALOG_H__66684391_7914_4A0D_9848_022A6CA7573C__INCLUDED_
00027
00028 #if _MSC_VER > 1000
00029 #pragma once
00030 #endif // _MSC_VER > 1000
00031 // MfFileDialog.h : header file
00032 //
00033
00035 class CPathBuffer
00036 {
00037 public:
00038     // Construction
00039     CPathBuffer();
00040     virtual ~CPathBuffer();
00041
00042 private:
00043     // Data members
00044     int m_bufferSize;
00045     TCHAR* m_buffer;
00047 public:
00048     // Interface
00049     inline void Clear();
00050     inline TCHAR* GetBuffer(int size = 0);
00051 };
00052
00053 class MultiFiles;
00054
00056 // CMfFileDialog dialog
00057
00059 class CMfFileDialog : public CFileDialog
00060 {
00061     DECLARE_DYNAMIC(CMfFileDialog)
00062
00063 public:
00064     CMfFileDialog(MultiFiles& mf,
00065         LPCTSTR lpszDefExt = NULL,
00066         LPCTSTR lpszFileName = NULL,
00067         DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
00068         LPCTSTR lpszFilter = NULL,
00069         CWnd* pParentWnd = NULL);
00070
00071 protected:
00072     //{{AFX_MSG(CMfFileDialog)
00073     //}}AFX_MSG
00074     DECLARE_MESSAGE_MAP()
00075 private:
00076     // Data members
00077     CPathBuffer m_filesBuffer;
00078     CPathBuffer m_folderBuffer;
00080     MultiFiles& m_mf;
00082     // Methods
00083     virtual void OnFileNameChange();
00084
00086     POSITION GetStartPosition () const;
00088     CString GetNextPathName (POSITION& pos) const;
00089
00090 public:
00091     // Interface
00092     virtual int DoModal();
00093 };
00094
00095 //{{AFX_INSERT_LOCATION}}
00096 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00097
00098 #endif // !defined(AFX_MFFILEDIALOG_H__66684391_7914_4A0D_9848_022A6CA7573C__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CImport_OPTIONS Member List

This is the complete list of members for CImport_OPTIONS, including all inherited members.

CHHelpPropertyPage(UINT nIDTemplate, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption=0) | CHHelpPropertyPage |
CHHelpSupport() | CHHelpSupport |
CImport_OPTIONS(const MultiFiles *mf, ReportConflict *&entries, ReportWarning *&warnings, const char *path, const bool useDefIgnore, const bool useFilesTime, const bool createSandbox) | CImport_OPTIONS |
CreateHelpIDsData(tHelpIDsData &helpIDsData) const | CHHelpSupport | [protected]
DoDataExchange(CDataExchange *pDX) | CImport_OPTIONS | [protected, virtual]
DoOnContextMenu(const CWnd *pWnd, CPoint point) | CHHelpSupport | [protected]
DoOnHelpInfo(const HELPINFO *pHelpInfo) | CHHelpSupport | [protected]
EnableWndContextHelp() | CHHelpSupport |
GetHelpFilePath() | CHHelpSupport | [static]
GetWnd() | CHHelpSupport | [protected, virtual]
IDD enum value | CImport_OPTIONS |
ImportFilter(const char *path) | CImport_OPTIONS | [private]
InitHelpID() | CImport_OPTIONS | [private, virtual]
InitHTMLHelp() | CHHelpSupport | [static]
IsHelpCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
IsIgnoredCtrl(const UINT ctrlID) const | CHHelpSupport | [protected]
m_createSandbox | CImport_OPTIONS |
m_entries | CImport_OPTIONS | [private]
m_hasVendorBranch | CImport_OPTIONS |
m_mf | CImport_OPTIONS | [private]
m_path | CImport_OPTIONS |
m_pathCombo | CImport_OPTIONS |
m_useDefIgnore | CImport_OPTIONS |
m_useFilesTime | CImport_OPTIONS |
m_vendorBranch | CImport_OPTIONS |
m_vendorBranchButton | CImport_OPTIONS |
m_vendorBranchCheck | CImport_OPTIONS |
m_vendorBranchCombo | CImport_OPTIONS |
m_warnings | CImport_OPTIONS | [private]
OnBranchid() | CImport_OPTIONS | [protected]
OnBrowseBranchid() | CImport_OPTIONS | [protected]
OnBtnpath() | CImport_OPTIONS | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CHHelpPropertyPage | [protected]
OnHelpInfo(HELPINFO *pHelpInfo) | CHHelpPropertyPage | [protected]
OnImportfilter() | CImport_OPTIONS | [protected]
OnInitDialog() | CHHelpPropertyPage | [protected, virtual]
OnSelchangePath() | CImport_OPTIONS | [protected]
SetCtrlHelpID(const DWORD ctrlID, const const DWORD helpTopic) | CHHelpSupport |
ShowHelp() | CHHelpSupport |
~CHHelpPropertyPage() | CHHelpPropertyPage |
~CHHelpSupport() | CHHelpSupport |
~CImport_OPTIONS() | CImport_OPTIONS |

Generated on Sat Aug 7 22:53:25 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/powerplant/stdafx.h Source File

rf/support/powerplant/stdafx.h

Go to the documentation of this file.
00001 #ifndef __stdafx__
00002 #define __stdafx__
00003
00004 #define qMacPP 1
00005
00006 #if qDebug
00007 #   include <PP_DebugHeaders.cp>
00008 #else
00009 #   include <PP_ClassHeaders.cp>
00010 #endif
00011
00012 /* the MacAPP assert */
00013 #define UASSERT Assert_
00014 #define UTHROW(err) Throw_Err(mFulErr)
00015
00016 extern "C" char *strdup(const char *str);
00017
00018 #endif // __stdafx__
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJTimeEdit Member List

This is the complete list of members for CCJTimeEdit, including all inherited members.

CCJDateEdit() | CCJDateEdit |
CCJMaskEdit() | CCJMaskEdit |
CCJTimeEdit() | CCJTimeEdit |
CheckChar(UINT nChar) | CCJMaskEdit | [virtual]
FormatOleDateTime(CString &strData, COleDateTime dt) | CCJTimeEdit | [virtual]
GetDateTime() | CCJDateEdit | [virtual]
GetWindowDateTime() | CCJDateEdit | [virtual]
m_bMaskKeyInProgress | CCJMaskEdit |
m_bUseMask | CCJMaskEdit |
m_Font | CCJMaskEdit |
m_strHours | CCJTimeEdit |
m_strLiteral | CCJMaskEdit |
m_strMask | CCJMaskEdit |
m_strMaskLiteral | CCJMaskEdit |
m_strMins | CCJTimeEdit |
m_strValid | CCJMaskEdit |
m_strWindowText | CCJMaskEdit |
OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJMaskEdit | [protected]
OnEraseBkgnd(CDC *pDC) | CCJMaskEdit | [protected]
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) | CCJMaskEdit | [protected]
OnPaint() | CCJMaskEdit | [protected]
ProcessMask(UINT nChar, int nEndPos) | CCJTimeEdit | [virtual]
ReadOleDateTime(LPCTSTR lpszData) | CCJDateEdit | [virtual]
SendChar(UINT nChar) | CCJMaskEdit | [virtual]
SetDateTime(COleDateTime &dt) | CCJDateEdit | [virtual]
SetDateTime(CString strDate) | CCJDateEdit | [virtual]
SetEditMask(LPCTSTR lpszMask, LPCTSTR lpszLiteral, LPCTSTR lpszWindowText) | CCJMaskEdit | [virtual]
SetHours(int nHours) | CCJTimeEdit | [virtual]
SetMins(int nMins) | CCJTimeEdit | [virtual]
UpdateFont() | CCJMaskEdit | [virtual]
~CCJMaskEdit() | CCJMaskEdit | [virtual]

Generated on Sat Aug 7 22:50:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacrosSetup.h Source File

common/MacrosSetup.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- August 1998
00019  */
00020
00021 /*
00022  * MacrosSetup.h --- hook the macros files
00023  */
00024
00025 #ifndef MACROSSETUP_H
00026 #define MACROSSETUP_H
00027
00028 #ifdef _MSC_VER
00029     using namespace std;
00030 #endif
00031
00032 #include <vector>
00033 #include "CPStr.h"
00034
00035 #define MACROS_FOLDER "Macros"
00036 #define PYTHONLIB_FOLDER "PythonLib"
00037
00038 // a macro is a file + a display name
00039 class CMacroEntry
00040 {
00041 public:
00042     CMacroEntry() {}
00043     CMacroEntry(const char *fullname, const char *dispname)
00044     {
00045         path = fullname;
00046         name = dispname;
00047     }
00048     CMacroEntry(const CMacroEntry & anentry)
00049     {
00050         *this = anentry;
00051     }
00052
00053     inline CMacroEntry & operator=(const CMacroEntry & anentry)
00054     {
00055         path = anentry.path;
00056         name = anentry.name;
00057         return *this;
00058     }
00059
00060     inline bool operator<(const CMacroEntry & anentry) const
00061     {
00062         return false;
00063     }
00064
00065     inline bool operator==(const CMacroEntry & anentry) const
00066     {
00067         return path.compare(anentry.path) == 0 && name.compare(anentry.name) == 0;
00068     }
00069
00070   CStr path;
00071     CStr name;
00072 };
00073
00074 // a set of macros + a flag to reload menus
00075 class CMacroSet
00076 {
00077 public:
00078     CMacroSet()
00079     {
00080         invalFlag = true;
00081     }
00082
00083     std::vector<CMacroEntry> entries;
00084
00085     bool invalFlag;
00086
00087     void Flush(void)
00088     {
00089         entries.erase(entries.begin(), entries.end());
00090         invalFlag = true;
00091     }
00092
00093     void Add(const char *fullname, const char *name)
00094     {
00095         std::vector<CMacroEntry>::iterator j;
00096
00097         for(j = entries.begin(); j != entries.end(); ++j) {
00098             if( stricmp((*j).name, name) > 0 )
00099                 break;
00100         }
00101
00102         entries.insert(j, CMacroEntry(fullname, name));
00103     }
00104 };
00105
00106 extern CMacroSet gMacrosAdmin;
00107 extern CMacroSet gMacrosSel;
00108
00109 void MacrosReloadAll(void);
00110     // reload the available macros
00111     // TO_OBSOLETE
00112
00113 void MacrosGetLoc(CStr & path);
00114     // return the macros location
00115
00116 void PythonLibGetLoc(CStr & path);
00117     // return python library root path
00118
00119 #endif /* MACROSSETUP_H */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

AREF Member List

This is the complete list of members for AREF, including all inherited members.

bitmap | AREF
cnt | AREF

Generated on Sat Aug 7 22:48:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CBarConsole Member List

This is the complete list of members for CBarConsole, including all inherited members.

CalcDynamicLayout(int nLength, DWORD nMode) | CCJControlBar | [virtual]
CBarConsole() | CBarConsole |
CCJControlBar() | CCJControlBar |
Create(CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName=NULL, CSize sizeDefault=CSize(200, 100), DWORD dwStyle=CBRS_LEFT, BOOL bFlatBorders=FALSE) | CCJControlBar | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJControlBar | [protected, virtual]
DrawGriperCaption(CDC *pDC, LPRECT pRect) | CCJControlBar | [protected, virtual]
DrawGripper(CDC *pDC) | CCJControlBar | [protected, virtual]
EnableDockingOnSizeBar(DWORD dwDockStyle) | CCJControlBar | [virtual]
EnableFlatLook(BOOL bFlat=TRUE) | CCJControlBar | [virtual]
EnableFlatLook(BOOL bGripper, BOOL bBorder, BOOL bButtons) | CCJControlBar | [virtual]
EnableSaveState(bool bAutoSave=true) | CCJControlBar | [virtual]
EraseNonClient() | CCJControlBar | [protected, virtual]
GetButtonRect() | CCJControlBar | [protected, virtual]
GetChildRect(CRect &rect) | CCJControlBar | [virtual]
GetGripperRect() | CCJControlBar | [protected, virtual]
GetHorzSize() | CCJControlBar | [virtual]
GetMenuID() | CCJControlBar | [virtual]
GetMinExt() | CCJControlBar | [virtual]
GetVertSize() | CCJControlBar | [virtual]
HitTest(CPoint &point) | CCJControlBar | [protected, virtual]
IsBottomDocked() const | CCJControlBar | [virtual]
IsFloating() const | CCJControlBar | [virtual]
IsHorzDocked() const | CCJControlBar | [virtual]
IsLeftDocked() const | CCJControlBar | [virtual]
IsRightDocked() const | CCJControlBar | [virtual]
IsTopDocked() const | CCJControlBar | [virtual]
IsVertDocked() const | CCJControlBar | [virtual]
LoadBarState(CSize &size, int nID) | CCJControlBar | [protected, virtual]
m_bAutoSave | CCJControlBar | [protected]
m_bButtons | CCJControlBar | [protected]
m_bDragging | CCJControlBar | [protected]
m_bFlatBorder | CCJControlBar | [protected]
m_bFlatGripper | CCJControlBar | [protected]
m_bFloating | CCJControlBar | [protected]
m_bGripper | CCJControlBar | [protected]
m_bMaximized | CCJControlBar | [protected]
m_bOkToDrag | CCJControlBar | [protected]
m_btnClose | CCJControlBar | [protected]
m_btnMinim | CCJControlBar | [protected]
m_bToFit | CCJControlBar |
m_bUnique | CCJControlBar |
m_cxOffset | CCJControlBar | [protected]
m_cyOffset | CCJControlBar | [protected]
m_eAuxIndex | CCJControlBar | [protected]
m_eChildBorder | CCJControlBar |
m_hAuxIcon | CCJControlBar | [protected]
m_hIcon | CCJControlBar | [protected]
m_ImageList | CCJControlBar | [protected]
m_nID | CCJControlBar | [protected]
m_nPos | CCJControlBar | [protected]
m_pChildWnd | CCJControlBar | [protected]
m_popToolbarID | CCJControlBar | [protected]
m_popupMenu | CCJControlBar | [protected]
m_popupMenuID | CCJControlBar | [protected]
m_ptCurDrag | CCJControlBar | [protected]
m_ptStartDrag | CCJControlBar | [protected]
m_rcTrack | CCJControlBar | [protected]
m_sizeDesired | CCJControlBar | [protected]
m_sizeFloat | CCJControlBar | [protected]
m_sizeHorz | CCJControlBar | [protected]
m_sizeNormal | CCJControlBar | [protected]
m_sizeVert | CCJControlBar | [protected]
m_strSection | CCJControlBar | [protected]
m_ToolTip | CCJControlBar | [protected]
m_view | CBarConsole |
Maximize(int size) | CCJControlBar | [virtual]
Minimize() | CCJControlBar | [virtual]
Normalize() | CCJControlBar | [virtual]
OnButtonClose() | CCJControlBar | [protected]
OnButtonMinimize() | CCJControlBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CBarConsole | [protected]
OnEraseBkgnd(CDC *pDC) | CCJControlBar | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJControlBar | [protected]
OnInvertTracker(const CRect &rect) | CCJControlBar | [protected, virtual]
OnLButtonDown(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJControlBar | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJControlBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnNcHitTest(CPoint point) | CCJControlBar | [protected]
OnNcPaint() | CCJControlBar | [protected]
OnPaint() | CCJControlBar | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJControlBar | [protected]
OnUpdateButtonClose(CCmdUI *pCmdUI) | CCJControlBar | [protected]
OnUpdateButtonMinimize(CCmdUI *pCmdUI) | CCJControlBar | [protected]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CCJControlBar | [virtual]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CCJControlBar | [protected]
PreTranslateMessage(MSG *pMsg) | CCJControlBar | [virtual]
SaveBarState(CSize &size) | CCJControlBar | [protected, virtual]
SetChild(CWnd *pWnd) | CCJControlBar | [protected, virtual]
SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0) | CCJControlBar | [virtual]
SetNormalSize(const CSize &cs) | CCJControlBar | [virtual]
ShowFrameControls(BOOL bGripper=TRUE, BOOL bButtons=TRUE) | CCJControlBar | [virtual]
~CBarConsole() | CBarConsole | [virtual]
~CCJControlBar() | CCJControlBar | [virtual]

Generated on Sat Aug 7 22:48:13 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CBrowseFileView Member List

This is the complete list of members for CBrowseFileView, including all inherited members.

AddColumns() | CBrowseFileView | [private]
CBrowseFileView() | CBrowseFileView | [protected]
CheckChanges(void) | CBrowseFileView | [inline]
DeleteColumns() | CBrowseFileView | [private]
DisableCommon(bool bCheckSelection=true) | CBrowseFileView | [private]
DoDrag() | CBrowseFileView | [private]
EnterFolder(const char *fullpath) | CBrowseFileView | [private]
FormatEntrryPrefix(bool isRecursive) const | CBrowseFileView | [private]
GetColumnModel() const | CBrowseFileView | [inline]
GetEntriesModTime(time_t &newEntriesMod, time_t &newEntriesLogMod) | CBrowseFileView | [private]
GetImageForEntry(EntnodeData *data) | CBrowseFileView | [static]
GetPath() const | CBrowseFileView | [inline]
GetPathLength(LPCTSTR path) | CBrowseFileView | [private]
GetViewType() const | CBrowseFileView | [private]
IsSamePath(LPCTSTR path1, LPCTSTR path2) | CBrowseFileView | [private]
LoadColumns(bool isRecursive) | CBrowseFileView | [private]
m_ascendant | CBrowseFileView | [private]
m_checkChanges | CBrowseFileView | [private]
m_ctrlHeader | CBrowseFileView | [private]
m_entriesLogMod | CBrowseFileView | [private]
m_entriesMod | CBrowseFileView | [private]
m_filterBarFilters | CBrowseFileView | [private]
m_heightOfLines | CBrowseFileView | [private]
m_isFilesChange | CBrowseFileView | [private]
m_isRecursive | CBrowseFileView | [private]
m_isResetViewLocked | CBrowseFileView | [private]
m_isResetViewPending | CBrowseFileView | [private]
m_modelColumns | CBrowseFileView | [private]
m_numberByPages | CBrowseFileView | [private]
m_numberOfLines | CBrowseFileView | [private]
m_numberOfPages | CBrowseFileView | [private]
m_path | CBrowseFileView | [private]
m_smallImageList | CBrowseFileView | [private, static]
m_sort | CBrowseFileView | [private]
m_stateImageList | CBrowseFileView | [private, static]
m_uiFilechangeTimer | CBrowseFileView | [private]
m_watch | CBrowseFileView | [private]
OnAnnotate() | CBrowseFileView | [protected]
OnAppCmdline() | CBrowseFileView | [protected]
OnAppRtagbranch() | CBrowseFileView | [protected]
OnAppRtagcreate() | CBrowseFileView | [protected]
OnAppRtagdelete() | CBrowseFileView | [protected]
OnBegindrag(NMHDR *pNMHDR, LRESULT *pResult) | CBrowseFileView | [protected]
OnBeginPrinting(CDC *pDC, CPrintInfo *pInfo) | CBrowseFileView | [protected, virtual]
OnBeginrdrag(NMHDR *pNMHDR, LRESULT *pResult) | CBrowseFileView | [protected]
OnColumnclick(NMHDR *pNMHDR, LRESULT *pResult) | CBrowseFileView | [protected]
OnContextMenu(CWnd *pWnd, CPoint point) | CBrowseFileView | [protected]
OnCustomize(UINT nID) | CBrowseFileView | [protected]
OnDeleteallitems(NMHDR *pNMHDR, LRESULT *pResult) | CBrowseFileView | [protected]
OnDeleteitem(NMHDR *pNMHDR, LRESULT *pResult) | CBrowseFileView | [protected]
OnDestroy() | CBrowseFileView | [protected]
OnEditSelectAll() | CBrowseFileView | [protected]
OnFileChange(WPARAM, LPARAM) | CBrowseFileView | [protected]
OnFilterBarChanged() | CBrowseFileView |
OnFilteringChanged() | CBrowseFileView |
OnInitialUpdate() | CBrowseFileView | [protected, virtual]
OnItemchanged(NMHDR *pNMHDR, LRESULT *pResult) | CBrowseFileView | [protected]
OnKeydown(NMHDR *pNMHDR, LRESULT *pResult) | CBrowseFileView | [protected]
OnLButtonDblClk(UINT nFlags, CPoint point) | CBrowseFileView | [protected]
OnMacro(UINT nID) | CBrowseFileView | [protected]
OnPreparePrinting(CPrintInfo *pInfo) | CBrowseFileView | [protected, virtual]
OnPrint(CDC *pDC, CPrintInfo *pInfo) | CBrowseFileView | [protected, virtual]
OnQueryProperties() | CBrowseFileView | [protected]
OnQueryShellactionDefault() | CBrowseFileView | [protected]
OnResetView(WPARAM, LPARAM) | CBrowseFileView | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CBrowseFileView | [protected]
OnTimer(UINT nIDEvent) | CBrowseFileView | [protected]
OnUpdateCustomize(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateCvsCmd(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateMacro(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateQueryProperties(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewAdd(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewAddB(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewAnnotate(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewCheckout(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewEditseldef(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewExplore(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewFullRowDetails(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewGraph(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewImport(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewList(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewRelease(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewReload(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewRmv(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewSmallIcons(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewTrash(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewUpdate(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnUpdateViewUpone(CCmdUI *pCmdUI) | CBrowseFileView | [protected]
OnViewAdd() | CBrowseFileView | [protected]
OnViewAddb() | CBrowseFileView | [protected]
OnViewAddu() | CBrowseFileView | [protected]
OnViewCheckout() | CBrowseFileView | [protected]
OnViewCommit() | CBrowseFileView | [protected]
OnViewDiff() | CBrowseFileView | [protected]
OnViewEdit() | CBrowseFileView | [protected]
OnViewEditors() | CBrowseFileView | [protected]
OnViewEditsel() | CBrowseFileView | [protected]
OnViewEditseldef() | CBrowseFileView | [protected]
OnViewExplore() | CBrowseFileView | [protected]
OnViewFilterbarClearall() | CBrowseFileView | [protected]
OnViewFilterbarEnable() | CBrowseFileView | [protected]
OnViewFilterbarOptions() | CBrowseFileView | [protected]
OnViewForceedit() | CBrowseFileView | [protected]
OnViewFullRowDetails() | CBrowseFileView | [protected]
OnViewGraph() | CBrowseFileView | [protected]
OnViewImport() | CBrowseFileView | [protected]
OnViewList() | CBrowseFileView | [protected]
OnViewLog() | CBrowseFileView | [protected]
OnViewNewInstance() | CBrowseFileView | [protected]
OnViewOpensel() | CBrowseFileView | [protected]
OnViewOpenselas() | CBrowseFileView | [protected]
OnViewQueryUpdate() | CBrowseFileView | [protected]
OnViewRelease() | CBrowseFileView | [protected]
OnViewReload() | CBrowseFileView | [protected]
OnViewReservededit() | CBrowseFileView | [protected]
OnViewRmv() | CBrowseFileView | [protected]
OnViewSmallIcons() | CBrowseFileView | [protected]
OnViewStatus() | CBrowseFileView | [protected]
OnViewTagBranch() | CBrowseFileView | [protected]
OnViewTagDelete() | CBrowseFileView | [protected]
OnViewTagNew() | CBrowseFileView | [protected]
OnViewTrash() | CBrowseFileView | [protected]
OnViewUnedit() | CBrowseFileView | [protected]
OnViewUnlock() | CBrowseFileView | [protected]
OnViewUpdate() | CBrowseFileView | [protected]
OnViewUpone() | CBrowseFileView | [protected]
OnViewWatchers() | CBrowseFileView | [protected]
OnViewWatchOff() | CBrowseFileView | [protected]
OnViewWatchOn() | CBrowseFileView | [protected]
PreCreateWindow(CREATESTRUCT &cs) | CBrowseFileView | [virtual]
ProcessSelectionCommand(KiSelectionHandler *handler) | CBrowseFileView | [private]
ResetView(bool notifyBrowser=false, const char *selectFile=0L) | CBrowseFileView |
ResetView(const char *path, bool notifyBrowser=false, const char *selectFile=0L) | CBrowseFileView |
Resort(void) | CBrowseFileView | [private]
SaveColumns(bool isRecursive) | CBrowseFileView | [private]
SetRecursive(bool isRecursive) | CBrowseFileView | [private]
SetViewType(DWORD dwViewType) | CBrowseFileView | [private]
~CBrowseFileView() | CBrowseFileView | [virtual]

Generated on Sat Aug 7 22:48:41 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCvsSandboxInfo Member List

This is the complete list of members for CCvsSandboxInfo, including all inherited members.

CCvsSandboxInfo(const char *path) | CCvsSandboxInfo |
GetRepository() const | CCvsSandboxInfo |
GetRoot() const | CCvsSandboxInfo |
m_path | CCvsSandboxInfo | [private]
ReadAdminFile(const char *name) const | CCvsSandboxInfo | [protected]
~CCvsSandboxInfo() | CCvsSandboxInfo | [virtual]

Generated on Sat Aug 7 22:51:50 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWincvsApp Member List

This is the complete list of members for CWincvsApp, including all inherited members.

ActivateBrowserView(void) | CWincvsApp |
CWincvsApp() | CWincvsApp |
ExitInstance() | CWincvsApp | [virtual]
GetAppModule(UStr &module) const | CWincvsApp |
GetAppPath(UStr &path) const | CWincvsApp |
GetAppVersion(UStr &vers) const | CWincvsApp |
GetBrowserView(void) | CWincvsApp |
GetConsoleView(void) | CWincvsApp |
GetCvsProcess(void) const | CWincvsApp | [inline]
GetDocument(void) | CWincvsApp |
GetEnvMainThread(const char *name) | CWincvsApp |
GetExplorerView(void) | CWincvsApp |
GetFileView(void) | CWincvsApp |
GetFilterModel() const | CWincvsApp |
GetIdleTime(void) const | CWincvsApp | [inline]
GetIgnoreModel() const | CWincvsApp |
GetLogGraph() | CWincvsApp | [inline]
GetMainFrame(void) const | CWincvsApp | [inline]
GetRecursionModel() const | CWincvsApp |
GetRoot() | CWincvsApp |
GetStatusBar() | CWincvsApp |
HasPython() const | CWincvsApp | [inline]
HasTCL() const | CWincvsApp | [inline]
IdleCvsProgress(void) | CWincvsApp |
InitInstance() | CWincvsApp | [virtual]
IsBackgroundProcess(void) const | CWincvsApp | [inline]
IsCvsRunning(void) const | CWincvsApp | [inline]
IsCvsStopping(void) const | CWincvsApp | [inline]
LookForResourceFile(const char *what, UStr &path) | CWincvsApp | [private]
m_CvsProcess | CWincvsApp | [private]
m_CvsRunning | CWincvsApp | [private]
m_CvsStopping | CWincvsApp | [private]
m_hasPY | CWincvsApp | [private]
m_hasTCL | CWincvsApp | [private]
m_idletime | CWincvsApp | [private]
m_isBackgroundProcess | CWincvsApp | [private]
m_logGraph | CWincvsApp | [private]
m_logTempl | CWincvsApp | [private]
m_mainFrame | CWincvsApp | [private]
OnAppAbout() | CWincvsApp | [protected]
OnAppCopyrights() | CWincvsApp | [protected]
OnAppCredits() | CWincvsApp | [protected]
OnFileNew() | CWincvsApp | [protected]
OnHelpCvs() | CWincvsApp | [protected]
OnLogWindowIsPresent(CCmdUI *pCmdUI) | CWincvsApp | [protected]
OnStopcvs() | CWincvsApp | [protected]
OnUpdateStopcvs(CCmdUI *pCmdUI) | CWincvsApp | [protected]
PeekPumpAndIdle(bool doIdle) | CWincvsApp |
PreTranslateMessage(MSG *pMsg) | CWincvsApp | [virtual]
ResetIdleTime(void) | CWincvsApp | [inline]
RestartScriptEngine() | CWincvsApp |
SaveAllModified() | CWincvsApp | [virtual]
SetBackgroundProcess(const bool isBackgroundProcess) | CWincvsApp | [inline]
SetCvsProcess(CvsProcess *proc) | CWincvsApp | [inline]
SetCvsRunning(bool state) | CWincvsApp | [inline]
SetCvsStopping(bool state) | CWincvsApp | [inline]
ShowTipAtStartup(void) | CWincvsApp | [private]
ShowTipOfTheDay(void) | CWincvsApp | [private]
StartScriptEngine(const bool forceReload=false) | CWincvsApp |
StopScriptEngine() | CWincvsApp |
UpdateAllDocsView() | CWincvsApp |

Generated on Sat Aug 7 22:58:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/AppGlue.mac.cpp Source File

common/AppGlue.mac.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * AppGlue.mac.cpp --- glue code to access CVS shared library
00023  */
00024
00025 /* here should be a define, to recorgnize if this file is needed in development-tools */
00026 #ifdef TARGET_OS_MAC
00027
00028 #include "stdafx.h"
00029 #include "AppGlue.mac.h"
00030 #include "AppGlue.h"
00031 #include "MacCvsApp.h"
00032 #include "AppConsole.h"
00033 #include "dll_process.h"
00034 #include "FileTraversal.h"
00035 #include "MacCvsConstant.h"
00036
00037 int glue_eventdispatcher(EventRecord *ev)
00038 {
00039     if(CMacCvsApp::gApp == 0L)
00040         return 0;
00041
00042     if ( CMacCvsApp::gApp->CheckForUserCancel() )
00043     {
00044         // user pressed cancel key combo -> simulate a hit in the "stop" button
00045         //
00046         CMacCvsApp::gApp->ObeyCommand(cmd_Stop, NULL);
00047         return 0;
00048     }
00049
00050     if (!ev) {
00051         CMacCvsApp::gApp->ProcessNextEvent();
00052     } else {
00053         CMacCvsApp::gApp->DispatchEvent(*ev);
00054     }
00055     return 0;
00056 }
00057
00058 #endif /* TARGET_OS_MAC */
Generated on Sat Aug 7 22:42:54 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TGraphCmdStatus Member List

This is the complete list of members for TGraphCmdStatus, including all inherited members.

GetSel1() const | TGraphCmdStatus |
GetSel2() const | TGraphCmdStatus |
GetSelCount() const | TGraphCmdStatus |
m_fSel1 | TGraphCmdStatus | [private]
m_fSel2 | TGraphCmdStatus | [private]
m_selCount | TGraphCmdStatus | [private]
TGraphCmdStatus() | TGraphCmdStatus |
TraverseGraph(CLogNode *node) | TGraph |
TraverseNode(CLogNode *node) | TGraphCmdStatus | [virtual]

Generated on Sat Aug 7 22:56:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

_dirdesc Member List

This is the complete list of members for _dirdesc, including all inherited members.

dd_contents | _dirdesc
dd_cp | _dirdesc
dd_id | _dirdesc
dd_loc | _dirdesc

Generated on Sat Aug 7 22:48:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: rf/support/powerplant/UPseudoSupport.cpp Source File

rf/support/powerplant/UPseudoSupport.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002
00003 #include "UPseudoSupport.h"
00004 #include "uconsole.h"
00005 #include "udraw.h"
00006 #include "umenu.h"
00007
00008 #include <stdio.h>
00009 #include <stdlib.h>
00010
00011 #include <UGAColorRamp.h>
00012 #include <LTableMonoGeometry.h>
00013 #include <LTableMultiGeometry.h>
00014 #include <LTableSingleSelector.h>
00015 #include <LOutlineKeySelector.h>
00016 #include <LOutlineTable.h>
00017 #include <LTextTableView.h>
00018 #include <LCellSizeToFit.h>
00019 #include <LTableArrayStorage.h>
00020 #include <LTextArray.h>
00021 #include <LTableSingleRowSelector.h>
00022 #include <LEditText.h>
00023 #include <LPopupButton.h>
00024 #include <LScrollBar.h>
00025 #include <LPageController.h>
00026 #include <LTabsControl.h>
00027 #include <LSlider.h>
00028 #include <LLittleArrows.h>
00029 #include <LCheckBoxGroupBox.h>
00030
00031 #ifndef NEW
00032 #   define NEW new
00033 #endif
00034
00035 #ifdef __GNUC__
00036 #   include <typeinfo>
00037 #else
00038 #   if __option(RTTI)
00039 #   include <typeinfo>
00040 #   else
00041 #   error "RTTI option disabled -- must be enabled for LPaneTree to function"
00042 #   endif
00043 #endif
00044
00045 bool gTurnOffBroadcast = false;
00046
00047 class UPPMenu : public UMenu
00048 {
00049 public:
00050     UPPMenu();
00051     virtual ~UPPMenu();
00052
00053     static int sPPMenuWidID;
00054 };
00055
00056 class LPseudoDrawAttachment : public LAttachment
00057 {
00058 public:
00059     LPseudoDrawAttachment(int widid, int cmdid);
00060     virtual ~LPseudoDrawAttachment();
00061
00062 protected:
00063     virtual void    ExecuteSelf(
00064                             MessageT        inMessage,
00065                             void*           ioParam);
00066
00067     int m_widid, m_cmdid;
00068 };
00069
00070 static bool macpp_getcmdid(LPane *view, int & cmdid)
00071 {
00072     PaneIDT atype = view->GetPaneID();
00073     const char *atypestr = (char *)&atype;
00074     if(atypestr[0] != 'p' && atypestr[1] != 's')
00075         return false;
00076
00077     if(atypestr[2] < '0' || atypestr[2] > '9')
00078         return false;
00079     if(atypestr[3] < '0' || atypestr[3] > '9')
00080         return false;
00081     cmdid = (int)(atypestr[2] - '0') * 10 + (int)(atypestr[3] - '0') + EV_COMMAND_START;
00082     return true;
00083 }
00084
00085 static bool macpp_getcmdid(PaneIDT atype, int & cmdid)
00086 {
00087     const char *atypestr = (char *)&atype;
00088     if(atypestr[0] != 'p' && atypestr[1] != 's')
00089         return false;
00090
00091     if(atypestr[2] < '0' || atypestr[2] > '9')
00092         return false;
00093     if(atypestr[3] < '0' || atypestr[3] > '9')
00094         return false;
00095     cmdid = (int)(atypestr[2] - '0') * 10 + (int)(atypestr[3] - '0') + EV_COMMAND_START;
00096     return true;
00097 }
00098
00099 LPseudoWinAttachment *macpp_getattachwindow(UWidget *wid)
00100 {
00101     LPane *win = (LPane *)wid->GetWidget(kUMainWidget);
00102     LWindow *wind = dynamic_cast<LWindow *>((LPane *)win);
00103
00104     if(wind != 0L)
00105     {
00106         return macpp_getattachwindow(wind);
00107     }
00108     return 0L;
00109 }
00110
00111 LPseudoWinAttachment *macpp_getattachwindow(LWindow *wind)
00112 {
00113     if(wind != 0L)
00114     {
00115         const TArray<LAttachment*>* theAttachments = wind->GetAttachmentsList();
00116
00117         if (theAttachments != nil)
00118         {
00119             TArrayIterator<LAttachment*> iterate(*theAttachments);
00120
00121             LAttachment*    theAttach;
00122             while (iterate.Next(theAttach))
00123             {
00124                 LPseudoWinAttachment*   theWinAttach = dynamic_cast<LPseudoWinAttachment*>(theAttach);
00125                 if (theWinAttach != nil)
00126                 {
00127                     return theWinAttach;
00128                 }
00129             }
00130         }
00131     }
00132     return 0L;
00133 }
00134
00135 void macpp_fecthview(int widid, LPane *pane)
00136 {
00137     int cmdid;
00138     if(macpp_getcmdid(pane, cmdid))
00139     {
00140         UEventSendMessage(widid, EV_INIT_WIDGET, cmdid, pane);
00141
00142         // look for any attachement we know of
00143         const TArray<LAttachment*>* theAttachments = pane->GetAttachmentsList();
00144         if (theAttachments != nil)
00145         {
00146             TArrayIterator<LAttachment*> iterate(*theAttachments);
00147
00148             LAttachment*    theAttach;
00149             while (iterate.Next(theAttach))
00150             {
00151                 UPseudoPageHider *hider = dynamic_cast<UPseudoPageHider*>(theAttach);
00152                 if(hider != 0L)
00153                     hider->SetWidID(widid);
00154             }
00155         }
00156
00157         // for any control, set the broadcast message to be the Pane ID
00158         LControl *control = dynamic_cast<LControl*>(pane);
00159         if(control != 0L && control->GetValueMessage() == 0)
00160         {
00161             control->SetValueMessage(pane->GetPaneID());
00162         }
00163
00164         // idem
00165         LCheckBoxGroupBox *groupbox = dynamic_cast<LCheckBoxGroupBox*>(pane);
00166         if(groupbox != 0L && groupbox->GetValueMessage() == 0)
00167         {
00168             groupbox->SetValueMessage(pane->GetPaneID());
00169         }
00170
00171         // set the widget id for some custom controls
00172         UPseudoPlaceHolder *holder = dynamic_cast<UPseudoPlaceHolder*>(pane);
00173         if(holder != 0L)
00174         {
00175             holder->SetWidID(widid);
00176             return; // don't fetch inside, it'll be owned by another pseudo widget
00177         }
00178
00179         // this attachment let us fire a EV_CUSTOM_DRAW event when painting
00180         if(typeid(*pane) == typeid(LView))
00181         {
00182             LPseudoDrawAttachment *attach = NEW LPseudoDrawAttachment(widid, cmdid);
00183             pane->AddAttachment(attach);
00184         }
00185     }
00186
00187     // menus with an unspecified menu id need to be created if we want to use
00188     // later on the EV_COMBO_APPEND message on it.
00189     LPopupButton *controler = dynamic_cast<LPopupButton*>(pane);
00190     if(controler != 0L)
00191     {
00192         if(controler->GetMenuID() == MENU_Unspecified && controler->GetMacMenuH() == 0L)
00193             controler->SetMacMenuH(::NewMenu(::UniqueID('MENU'), "\p"), true);
00194     }
00195
00196     // recurse
00197     LView *view = dynamic_cast<LView*>(pane);
00198     if(view == 0L)
00199         return;
00200
00201     TArrayIterator<LPane*> iterator(view->GetSubPanes());
00202     LPane   *theSub;
00203     while (iterator.Next(theSub))
00204     {
00205         macpp_fecthview(widid, theSub);
00206     }
00207 }
00208
00209 void macpp_linkbroadcasters(LPane *pane, LListener *listener)
00210 {
00211     LBroadcaster *broadcaster = dynamic_cast<LBroadcaster *>(pane);
00212     if(broadcaster != 0L && !broadcaster->HasListener(listener))
00213         broadcaster->AddListener(listener);
00214
00215     LView *view = dynamic_cast<LView*>(pane);
00216     if(view == 0L)
00217         return;
00218
00219     TArrayIterator<LPane*> iterator(view->GetSubPanes());
00220     LPane   *theSub;
00221     while (iterator.Next(theSub))
00222     {
00223         macpp_linkbroadcasters(theSub, listener);
00224     }
00225 }
00226
00227 void macpp_preparetable(LOutlineTable *table)
00228 {
00229     if(table->GetTableGeometry() != 0L)
00230         return;
00231
00232     // try to guess a good height for the geometry
00233     int height = 20;
00234     TextTraitsH traitsH = UTextTraits::LoadTextTraits(table->GetTextTraits());
00235     if(traitsH != 0L)
00236         height = ((**traitsH).size * 6) / 4;
00237
00238     LTableMultiGeometry *geom = NEW LTableMultiGeometry(table, 50, height);
00239     if(geom != 0L)
00240         table->SetTableGeometry(geom);
00241     table->SetTableSelector(NEW LTableSingleRowSelector( table ));
00242     table->AddAttachment(NEW LOutlineKeySelector(table, msg_AnyMessage));
00243     table->AddAttachment(NEW LKeyScrollAttachment(table));
00244 }
00245
00246 void macpp_preparetable(void *win, LTextTableView *table)
00247 {
00248     if(table->GetTableGeometry() != 0L)
00249         return;
00250
00251     SDimension16    tableSize;
00252     table->SetCellSizer(NEW LCellSizeToFit());
00253     table->GetFrameSize(tableSize);
00254     table->SetTableGeometry(NEW LTableMonoGeometry(table,
00255         tableSize.width/1 /* col width = width/num Cols */,
00256         12  /* row height */));
00257     table->SetTableSelector(NEW LTableSingleRowSelector( table ));
00258     table->SetTableStorage(NEW LTableArrayStorage(table, (UInt32)0));
00259     table->SetDoubleClickMessage(UTextTableView_DoubleClick);
00260     table->SetSingleClickMessage(UTextTableView_SingleClick);
00261     table->SetCustomHilite(true); // cause there is a hilite bug if we don't
00262 }
00263
00264 static LWindow *macpp_findwindow(LPane *pane)
00265 {
00266     LPane *topView = 0L;
00267     while(pane != 0L)
00268     {
00269         topView = pane;
00270         pane = pane->GetSuperView();
00271     }
00272     return dynamic_cast<LWindow *>(topView);
00273 }
00274
00275 LPseudoDrawAttachment::LPseudoDrawAttachment(int widid, int cmdid) : LAttachment(msg_DrawOrPrint),
00276     m_widid(widid), m_cmdid(cmdid)
00277 {
00278 }
00279
00280 LPseudoDrawAttachment::~LPseudoDrawAttachment()
00281 {
00282 }
00283
00284 void LPseudoDrawAttachment::ExecuteSelf(MessageT inMessage, void *ioParam)
00285 {
00286     SetExecuteHost(true);
00287     LView *view = dynamic_cast<LView*>(GetOwnerHost());
00288     UEventSendMessage(m_widid, EV_CUSTOM_DRAW, m_cmdid, view);
00289 }
00290
00291 LMainPseudoAttachment::LMainPseudoAttachment() : LAttachment(msg_AnyMessage)
00292 {
00293     StartIdling();
00294 }
00295
00296 LMainPseudoAttachment::~LMainPseudoAttachment()
00297 {
00298 }
00299
00300 void LMainPseudoAttachment::SpendTime(const EventRecord&    inMacEvent)
00301 {
00302     ::UEventGiveTime();
00303 }
00304
00305 void LMainPseudoAttachment::ExecuteSelf(MessageT inMessage, void *ioParam)
00306 {
00307     SetExecuteHost(true);
00308
00309     if(UPPMenu::sPPMenuWidID == -1)
00310     {
00311         NEW UPPMenu();
00312     }
00313
00314     if((inMessage > 0 && inMessage < 800) || inMessage >= EV_COMMAND_START)
00315     {
00316         int handledFlag;
00317         int res = UEventSendMessageExt(UPPMenu::sPPMenuWidID, EV_CMD,
00318             inMessage, 0L, &handledFlag);
00319         if(res == 0 && handledFlag)
00320         {
00321             SetExecuteHost(false);
00322             return;
00323         }
00324         else
00325             SetExecuteHost(true);
00326     }
00327
00328     switch (inMessage)
00329     {
00330         case msg_CommandStatus:
00331         {
00332             SCommandStatus *status = static_cast<SCommandStatus*> (ioParam);
00333             CommandT cmdid = status->command;
00334             UPseudoCmdStatusWrapper wrapper;
00335             wrapper.outEnabled = status->enabled;
00336             wrapper.outUsesMark = status->usesMark;
00337             wrapper.outMark = status->mark;
00338             wrapper.outName = status->name;
00339
00340             // first forward the command to the focused widget : if it doesn't want it
00341             // we give it to the next pseudo widget.
00342             int widFocus = UWidget::GetFocus();
00343             if(widFocus != -1)
00344             {
00345                 UCmdUI pUI(cmdid);
00346                 pUI.m_wrapper = &wrapper;
00347                 UEventSendMessage(widFocus, EV_UPDTCMD, pUI.m_nID, &pUI);
00348                 if(!pUI.CanContinue())
00349                 {
00350                     SetExecuteHost(false);
00351                     break;
00352                 }
00353             }
00354
00355             STD map<int, UCmdTarget *>::const_iterator i;
00356             const STD map<int, UCmdTarget *> & targets = UEventGetTargets();
00357             for(i = targets.begin(); i != targets.end(); ++i)
00358             {
00359                 int widid = (*i).first;
00360                 if(widid == widFocus)
00361                     continue;
00362
00363                 UCmdUI pUI(cmdid);
00364                 pUI.m_wrapper = &wrapper;
00365                 UEventSendMessage(widid, EV_UPDTCMD, pUI.m_nID, &pUI);
00366                 if(!pUI.CanContinue())
00367                     break;
00368             }
00369
00370             if(i != targets.end())
00371                 SetExecuteHost(false);
00372             break;
00373         }
00374
00375         case msg_Event:
00376         {
00377             EventRecord *ev = static_cast<EventRecord*> (ioParam);
00378
00379 #if 0
00380             if(ev->what == activateEvt)
00381             {
00382                 bool activate = (ev->modifiers & activeFlag) != 0;
00383                 LWindow *theWindow = LWindow::FetchWindowObject((WindowPtr)ev->message);
00384                 if(theWindow != 0L)
00385                 {
00386                     UEventNotifyMessage(EV_UPDATEFOCUS, !activate, theWindow);
00387                         // so the pseudo widget update its current widget.
00388                         // it's important for the menu handling.
00389                 }
00390             }
00391 #endif
00392             if(ev->what == activateEvt ||
00393                 ev->what == mouseDown ||
00394                 ev->what == mouseUp ||
00395                 ev->what == keyDown ||
00396                 ev->what == keyUp ||
00397                 ev->what == autoKey)
00398             {
00399                 UWidget::DoValidUI(false);
00400                 LCommander::SetUpdateCommandStatus(true);
00401             }
00402             break;
00403         }
00404     }
00405 }
00406
00407 LPseudoWinAttachment::LPseudoWinAttachment(int widid) : LAttachment(msg_GrowZone), m_widid(widid)
00408 {
00409     ::SetRect(&m_lastRect, 0, 0, 0, 0);
00410
00411     CheckWindowSize();
00412 }
00413
00414 LPseudoWinAttachment::~LPseudoWinAttachment()
00415 {
00416     UEventSendMessage(m_widid, EV_DESTROY, 0, 0L);
00417 }
00418
00419 int LPseudoWinAttachment::GetPageValue(int cmdid) const
00420 {
00421     std::map<int, int>::const_iterator i = m_PageValues.find(cmdid);
00422     if(i != m_PageValues.end())
00423         return (*i).second;
00424     return 1;
00425 }
00426
00427 void LPseudoWinAttachment::SetPageValue(int cmdid, int value)
00428 {
00429     std::map<int, int>::value_type val(cmdid, value);
00430     m_PageValues.erase(cmdid);
00431     m_PageValues.insert(val);
00432 }
00433
00434 void LPseudoWinAttachment::ExecuteSelf(MessageT inMessage, void *ioParam)
00435 {
00436     SetExecuteHost(true);
00437
00438     // not used yet
00439 }
00440
00441 void LPseudoWinAttachment::CheckWindowSize(void)
00442 {
00443     LWindow *wind = dynamic_cast<LWindow*>(GetOwnerHost());
00444     if(wind != 0L)
00445     {
00446         Rect r;
00447         wind->GetGlobalBounds(r);
00448         if(!::EqualRect(&r, &m_lastRect))
00449         {
00450             m_lastRect = r;
00451             URect ur(r);
00452             UEventSendMessage(m_widid, EV_RESIZE, kUMainWidget, &ur);
00453         }
00454     }
00455 }
00456
00457 int LPseudoWinAttachment::SearchWidID(LPane *pane)
00458 {
00459     int res = m_widid;
00460
00461     // first ask the cache
00462     std::map<LPane *, int>::iterator i = m_CacheWidgets.find(pane);
00463     if(i != m_CacheWidgets.end())
00464         return (*i).second;
00465
00466     // then look if it belongs to a tab
00467     UCmdTarget *target = UEventQueryWidget(m_widid);
00468     UWidget *wid = UDYNAMIC_CAST(UWidget, target);
00469     if(wid == 0L)
00470         return res;
00471
00472     std::map<int, UWidget *>::iterator t;
00473     for(t = wid->m_tabs.begin(); t != wid->m_tabs.end(); ++t)
00474     {
00475         UWidget *tab = (*t).second;
00476         std::map<int, void *>::iterator s;
00477         for(s = tab->m_widgets.begin(); s != tab->m_widgets.end(); ++s)
00478         {
00479             if((*s).second == (void *)pane)
00480             {
00481                 res = tab->GetWidID();
00482                 break; // it's a tab widget
00483             }
00484         }
00485     }
00486
00487     // so we guess it's in the main widget !
00488     std::map<LPane *, int>::value_type val(pane, res);
00489     m_CacheWidgets.insert(val);
00490
00491     return res;
00492 }
00493
00494 void LPseudoWinAttachment::InvalidCache(UWidget *tab_wid)
00495 {
00496     std::map<int, void *>::iterator s;
00497     for(s = tab_wid->m_widgets.begin(); s != tab_wid->m_widgets.end(); ++s)
00498     {
00499         std::map<LPane *, int>::iterator i = m_CacheWidgets.find((LPane *)(*s).second);
00500         if(i != m_CacheWidgets.end())
00501             m_CacheWidgets.erase(i);
00502     }
00503 }
00504
00505
00506 void LPseudoWinAttachment::ListenToMessage(
00507                             MessageT        inMessage,
00508                             void*           ioParam)
00509 {
00510     int cmdid;
00511     LPane *pane;
00512
00513     if(gTurnOffBroadcast)
00514         return;
00515
00516     if(macpp_getcmdid(inMessage, cmdid))
00517     {
00518         LWindow *wind = dynamic_cast<LWindow*>(GetOwnerHost());
00519         if(wind != 0L)
00520         {
00521             pane = wind->FindPaneByID(inMessage);
00522
00523             if(pane != 0L)
00524             {
00525                 int widid = SearchWidID(pane);
00526
00527                 LEditText *edit;
00528                 LControl *control;
00529                 LMenuController *popup;
00530                 LScrollBar *bar;
00531                 LSlider *slider;
00532                 LLittleArrows *arrows;
00533                 LCheckBoxGroupBox *groupbox;
00534
00535                 if((edit = dynamic_cast<LEditText*>(pane)) != 0L)
00536                     UEventSendMessage(widid, EV_EDITCHANGE, cmdid, 0L);
00537                 else if((popup = dynamic_cast<LMenuController*>(pane)) != 0L &&
00538                     popup->GetMacMenuH() != 0L)
00539                 {
00540                     SInt16 item = popup->GetCurrentMenuItem();
00541                     LStr255 pstr;
00542                     if(item > 0)
00543                         popup->GetMenuItemText(item, pstr);
00544                     UStr content(pstr);
00545                     UEventSendMessage(widid, EV_COMBO_SEL, UMAKEINT(cmdid, item - 1),
00546                         (void *)(const char *)content);
00547                 }
00548                 else if((bar = dynamic_cast<LScrollBar*>(pane)) != 0L)
00549                     UEventSendMessage(widid, EV_SCROLLCHANGE, cmdid, (void *)bar->GetValue());
00550                 else if((slider = dynamic_cast<LSlider*>(pane)) != 0L)
00551                     UEventSendMessage(widid, EV_SCROLLCHANGE, cmdid, (void *)slider->GetValue());
00552                 else if((arrows = dynamic_cast<LLittleArrows*>(pane)) != 0L)
00553                     UEventSendMessage(widid, EV_SCROLLCHANGE, cmdid, (void *)arrows->GetValue());
00554                 else if((control = dynamic_cast<LControl*>(pane)) != 0L)
00555                     UEventSendMessage(widid, EV_CMD, cmdid, 0L);
00556                 else if((groupbox = dynamic_cast<LCheckBoxGroupBox*>(pane)) != 0L)
00557                     UEventSendMessage(widid, EV_CMD, cmdid, 0L);
00558             }
00559         }
00560     }
00561     else switch (inMessage)
00562     {
00563         case msg_ScrollAction:
00564         {
00565             LScrollBar::SScrollMessage *message = static_cast<LScrollBar::SScrollMessage *>(ioParam);
00566             LScrollBar* scrollBar = message->scrollBar;
00567             int fPageStep = 1;
00568             if(macpp_getcmdid(scrollBar->GetPaneID(), cmdid))
00569                 fPageStep = GetPageValue(cmdid);
00570             int fButtonStep = 1;
00571             switch(message->hotSpot)
00572             {
00573             case kControlPageUpPart:
00574                 scrollBar->SetValue(scrollBar->GetValue() - fPageStep);
00575                 break;
00576             case kControlUpButtonPart:
00577                 scrollBar->SetValue(scrollBar->GetValue() - fButtonStep);
00578                 break;
00579             case kControlPageDownPart:
00580                 scrollBar->SetValue(scrollBar->GetValue() + fPageStep);
00581                 break;
00582             case kControlDownButtonPart:
00583                 scrollBar->SetValue(scrollBar->GetValue() + fButtonStep);
00584                 break;
00585             }
00586             break;
00587         }
00588         case UTextTableView_SingleClick:
00589         case UTextTableView_DoubleClick:
00590             pane = static_cast<LPane *>(ioParam);
00591
00592             if(pane != 0L && macpp_getcmdid(pane, cmdid))
00593             {
00594                 UStr name;
00595                 int entry = 0;
00596                 LTextTableView *table = dynamic_cast<LTextTableView *>(pane);
00597                 if(table != 0L)
00598                 {
00599                     STableCell cell = table->GetFirstSelectedCell();
00600                     if(!cell.IsNullCell())
00601                     {
00602                         char tmp[255];
00603                         UInt32 ioDataSize = 255;
00604                         table->GetCellData(cell, tmp, ioDataSize);
00605                         name.set(tmp, ioDataSize);
00606                         entry = cell.row;
00607                     }
00608                 }
00609
00610                 UEventSendMessage(SearchWidID(pane),
00611                     inMessage == UTextTableView_SingleClick ?
00612                     EV_LIST_SELECTING : EV_LIST_DBLCLICK, UMAKEINT(cmdid, entry - 1),
00613                     (void *)(const char *)name);
00614             }
00615             break;
00616     }
00617 }
00618
00619 CPseudoItem::CPseudoItem(int widid, int cmdid) : m_widid(widid), m_cmdid(cmdid), m_data(0L)
00620 {
00621 }
00622
00623 CPseudoItem::~CPseudoItem()
00624 {
00625 }
00626
00627 // this is the routine called to know what to draw within the
00628 // table cell. See the comments in LOutlineItem.cp for more info.
00629 void
00630 CPseudoItem::GetDrawContentsSelf(
00631     const STableCell&       inCell,
00632     SOutlineDrawContents&   ioDrawContents)
00633 {
00634     std::map<int, UStr>::iterator i = m_texts.find(inCell.col);
00635     if(i != m_texts.end())
00636     {
00637         ioDrawContents.outShowSelection = true;
00638         LStr255 pstr((*i).second);
00639         LString::CopyPStr(pstr, ioDrawContents.outTextString);
00640     }
00641 }
00642
00643 // just to be cute, we'll draw an adornment (again, see the LOutlineItem.cp
00644 // comments for more information). We'll draw a groovy gray background
00645 void
00646 CPseudoItem::DrawRowAdornments(
00647     const Rect&     inLocalRowRect )
00648 {
00649     ShadeRow(UGAColorRamp::GetColor(colorRamp_White), inLocalRowRect);
00650     RGBColor c = UGAColorRamp::GetColor(colorRamp_Gray2);
00651     RGBForeColor(&c);
00652     MoveTo(inLocalRowRect.right, inLocalRowRect.top);
00653     LineTo(inLocalRowRect.right, inLocalRowRect.bottom);
00654 }
00655
00656 void CPseudoItem::DrawCell(const STableCell & inCell, const Rect & inLocalCellRect)
00657 {
00658     LOutlineItem::DrawCell(inCell, inLocalCellRect);
00659
00660     RGBColor c = UGAColorRamp::GetColor(colorRamp_Gray2);
00661     RGBForeColor(&c);
00662     MoveTo(inLocalCellRect.right - 1, inLocalCellRect.top);
00663     LineTo(inLocalCellRect.right - 1, inLocalCellRect.bottom);
00664 }
00665
00666 void CPseudoItem::SingleClick(
00667                                 const STableCell&           inCell,
00668                                 const SMouseDownEvent&      inMouseDown,
00669                                 const SOutlineDrawContents& inDrawContents,
00670                                 Boolean                     inHitText)
00671 {
00672     UStr name;
00673     std::map<int, UStr>::iterator i = m_texts.find(inCell.col - 1);
00674     if(i != m_texts.end())
00675     {
00676         name = (*i).second;
00677     }
00678     UEventSendMessage(m_widid,
00679         EV_LIST_SELECTING, UMAKEINT(m_cmdid, inCell.row - 1),
00680         (void *)(const char *)name);
00681
00682     LOutlineItem::SingleClick(inCell, inMouseDown, inDrawContents, inHitText);
00683 }
00684
00685 void
00686 CPseudoItem::DoubleClick(
00687     const STableCell&           inCell,
00688     const SMouseDownEvent&      inMouseDown,
00689     const SOutlineDrawContents& inDrawContents,
00690     Boolean                     inHitText)
00691 {
00692     UStr name;
00693     std::map<int, UStr>::iterator i = m_texts.find(inCell.col - 1);
00694     if(i != m_texts.end())
00695     {
00696         name = (*i).second;
00697     }
00698     UEventSendMessage(m_widid,
00699         EV_LIST_DBLCLICK, UMAKEINT(m_cmdid, inCell.row - 1),
00700         (void *)(const char *)name);
00701
00702     LOutlineItem::DoubleClick(inCell, inMouseDown, inDrawContents, inHitText);
00703 }
00704
00705 int UPPMenu::sPPMenuWidID = -1;
00706
00707 UPPMenu::UPPMenu() : UMenu(::UEventGetWidID())
00708 {
00709     sPPMenuWidID = GetWidID();
00710 }
00711
00712 UPPMenu::~UPPMenu()
00713 {
00714 }
00715
00716 UPseudoRotButton::UPseudoRotButton(LStream *inStream, ClassIDT inImpID) : LBevelButton(inStream, inImpID), fCurrentIcon(0)
00717 {
00718     ReadIconsID(inStream, fIconSuite);
00719
00720     if(fIconSuite.size() != 0)
00721         DoRotate(0, false);
00722 }
00723
00724 UPseudoRotButton::~UPseudoRotButton()
00725 {
00726 }
00727
00728 void UPseudoRotButton::ReadIconsID(LStream *inStream, std::vector<short> & res)
00729 {
00730     LStr255 pstr;
00731
00732     inStream->ReadPString(pstr);
00733     UStr str(pstr);
00734     const char *ptr = str;
00735     while(ptr != 0L)
00736     {
00737         int v;
00738         const char *tmp = strchr(ptr, ',');
00739         if(tmp != 0L)
00740         {
00741             UStr stmp;
00742             size_t offset = tmp - ptr;
00743             stmp.set(ptr, offset);
00744             ptr += offset + 1;
00745             if(sscanf(stmp, "%d", &v) == 1)
00746                 res.push_back(v);
00747         }
00748         else
00749         {
00750             if(sscanf(ptr, "%d", &v) == 1)
00751                 res.push_back(v);
00752             ptr = 0L;
00753         }
00754     }
00755 }
00756
00757 void UPseudoRotButton::DoRotate(int icon, bool refresh)
00758 {
00759     if(fCurrentIcon != icon && icon >= 0 && icon < fIconSuite.size())
00760     {
00761         fCurrentIcon = icon;
00762         ControlButtonContentInfo info;
00763         GetContentInfo(info);
00764         if(info.contentType == kControlContentCIconRes ||
00765             info.contentType == kControlContentIconSuiteRes ||
00766             info.contentType == kControlContentICONRes ||
00767             info.contentType == kControlContentPictRes)
00768         {
00769             info.u.resID = fIconSuite[icon];
00770             SetContentInfo(info);
00771         }
00772         if(refresh)
00773             Refresh();
00774     }
00775 }
00776
00777 UPseudoPlaceHolder::UPseudoPlaceHolder(LStream *inStream) : LPlaceHolder(inStream),
00778     fCurrentView(0L), fWidid(-1)
00779 {
00780     LStr255 pstr;
00781     inStream->ReadPString(pstr);
00782     *inStream >> fController;
00783
00784     UStr str(pstr);
00785     const char *ptr = str;
00786     while(ptr != 0L)
00787     {
00788         int v;
00789         const char *tmp = strchr(ptr, ',');
00790         if(tmp != 0L)
00791         {
00792             UStr stmp;
00793             size_t offset = tmp - ptr;
00794             stmp.set(ptr, offset);
00795             ptr += offset + 1;
00796             if(sscanf(stmp, "%d", &v) == 1)
00797                 fViewSuite.push_back(v);
00798         }
00799         else
00800         {
00801             if(sscanf(ptr, "%d", &v) == 1)
00802                 fViewSuite.push_back(v);
00803             ptr = 0L;
00804         }
00805     }
00806 }
00807
00808 UPseudoPlaceHolder::~UPseudoPlaceHolder()
00809 {
00810 }
00811
00812 void UPseudoPlaceHolder::DoRotate(int entry)
00813 {
00814     int cmdid;
00815     if(macpp_getcmdid(GetPaneID(), cmdid) && entry >= 0 && entry < fViewSuite.size())
00816     {
00817         LWindow *win = macpp_findwindow(this);
00818         if(win == 0L)
00819             return;
00820
00821         LView* samplePanel = UReanimator::CreateView(fViewSuite[entry], this, win);
00822         if(samplePanel == 0L)
00823             return;
00824
00825         InstallOccupant (samplePanel);
00826
00827         LView *oldView = fCurrentView;
00828
00829         if (fCurrentView != 0L)
00830         {
00831             fCurrentView->Hide ();
00832             fCurrentView = nil;
00833         }
00834
00835         Refresh();
00836         fCurrentView = samplePanel;
00837
00838         if(fWidid != -1 && !gTurnOffBroadcast)
00839             UEventSendMessage(fWidid, EV_PAGE_CHANGED, UMAKEINT(cmdid, entry), 0L);
00840
00841         if (oldView != 0L)
00842         {
00843             delete oldView;
00844         }
00845
00846     }
00847 }
00848
00849 void UPseudoPlaceHolder::ListenToMessage(MessageT inMessage, void * ioParam)
00850 {
00851     if(inMessage == fController)
00852     {
00853         SInt32 currPageIndex = *static_cast<SInt32 *>(ioParam);
00854         DoRotate(currPageIndex - 1);
00855     }
00856 }
00857
00858 void UPseudoPlaceHolder::FinishCreateSelf(void)
00859 {
00860     DoRotate(0);
00861
00862     LWindow *win = macpp_findwindow(this);
00863     if(win == 0L)
00864         return;
00865
00866     LPageController *controller = dynamic_cast<LPageController*>(win->FindPaneByID(fController));
00867     if (controller != 0L)
00868     {
00869         controller->StartBroadcasting ();
00870         controller->AddListener (this);
00871     }
00872     LTabsControl *controller2 = dynamic_cast<LTabsControl*>(win->FindPaneByID(fController));
00873     if (controller2 != 0L)
00874     {
00875         controller2->StartBroadcasting ();
00876         controller2->AddListener (this);
00877     }
00878 }
00879
00880 UPseudoPageHider::UPseudoPageHider(LStream *inStream) : LAttachment(inStream),
00881     fWidid(-1), fCurSel(-1), fPageCtrl(0L)
00882 {
00883     SetMessage(msg_FinishCreate);
00884
00885     LStr255 pstr;
00886     inStream->ReadPString(pstr);
00887
00888     UStr str(pstr);
00889     const char *ptr = str;
00890     while(ptr != 0L)
00891     {
00892         PaneIDT paneID;
00893         const char *tmp = strchr(ptr, ',');
00894         if(tmp != 0L)
00895         {
00896             UStr stmp;
00897             size_t offset = tmp - ptr;
00898             stmp.set(ptr, offset);
00899             ptr += offset + 1;
00900             if(stmp.length() == 4)
00901             {
00902                 paneID = *(PaneIDT *)(char *)stmp.c_str();
00903                 fViewSuite.push_back(paneID);
00904             }
00905         }
00906         else
00907         {
00908             if(strlen(ptr) == 4)
00909             {
00910                 paneID = *(PaneIDT *)ptr;
00911                 fViewSuite.push_back(paneID);
00912             }
00913             ptr = 0L;
00914         }
00915     }
00916 }
00917
00918 void    UPseudoPageHider::ExecuteSelf(
00919                         MessageT        inMessage,
00920                         void*           ioParam)
00921 {
00922     if(inMessage == msg_FinishCreate)
00923     {
00924         LPane *pane = reinterpret_cast<LPane*>(ioParam);
00925         fPageCtrl = dynamic_cast<LPageController*>(pane);
00926         if(fPageCtrl == 0L)
00927         {
00928             UAppConsole("The UPseudoPageHider attachement does not have any LPageController to attach to.");
00929         }
00930         else
00931         {
00932             // add ourself to the broadcast so we receive the changes
00933             fPageCtrl->StartBroadcasting ();
00934             fPageCtrl->AddListener (this);
00935         }
00936     }
00937 }
00938
00939 UPseudoPageHider::~UPseudoPageHider()
00940 {
00941 }
00942
00943 void UPseudoPageHider::DoRotate(int entry)
00944 {
00945     if(fPageCtrl == 0L)
00946         return;
00947
00948     int cmdid;
00949     if(macpp_getcmdid(fPageCtrl->GetPaneID(), cmdid) && entry >= 0 && entry < fViewSuite.size() &&
00950         entry != fCurSel)
00951     {
00952         fCurSel = entry;
00953
00954         LWindow *win = macpp_findwindow(fPageCtrl);
00955         if(win == 0L)
00956             return;
00957
00958         LPane* samplePanel;
00959         std::vector<PaneIDT>::iterator i;
00960         for(i = fViewSuite.begin(); i != fViewSuite.end(); ++i)
00961         {
00962             samplePanel = win->FindPaneByID(*i);
00963             if(samplePanel != 0L)
00964                 samplePanel->Hide();
00965         }
00966
00967         samplePanel = win->FindPaneByID(fViewSuite[entry]);
00968         if(samplePanel == 0L)
00969             return;
00970
00971         samplePanel->Show();
00972
00973         if(fWidid != -1)
00974             UEventSendMessage(fWidid, EV_CMD, cmdid, (void *)entry);
00975     }
00976 }
00977
00978 void UPseudoPageHider::ListenToMessage(MessageT inMessage, void * ioParam)
00979 {
00980     if(fPageCtrl != 0L && inMessage == fPageCtrl->GetPaneID())
00981     {
00982         SInt32 currPageIndex = *static_cast<SInt32 *>(ioParam);
00983         DoRotate(currPageIndex - 1);
00984     }
00985 }
00986
00987 UPseudoFakePane::UPseudoFakePane(const SPaneInfo    &inPaneInfo, LPseudoWinAttachment *inAttach) :
00988     LPane(inPaneInfo), m_Attach(inAttach)
00989 {
00990 }
00991
00992 UPseudoFakePane::~UPseudoFakePane()
00993 {
00994 }
00995
00996 void UPseudoFakePane::ActivateSelf()
00997 {
00998     UEventNotifyMessage(EV_UPDATEFOCUS, 0, dynamic_cast<LWindow *>(GetSuperView()));
00999 }
01000
01001 void UPseudoFakePane::DeactivateSelf()
01002 {
01003     UEventNotifyMessage(EV_UPDATEFOCUS, 1, dynamic_cast<LWindow *>(GetSuperView()));
01004 }
01005
01006 void UPseudoFakePane::AdaptToSuperFrameSize(
01007                             SInt32      inSurrWidthDelta,
01008                             SInt32      inSurrHeightDelta,
01009                             Boolean     inRefresh)
01010 {
01011     LPane::AdaptToSuperFrameSize(inSurrWidthDelta, inSurrHeightDelta, inRefresh);
01012
01013     m_Attach->CheckWindowSize();
01014 }
01015
01016
01017 class CDummyClass
01018 {
01019 public:
01020     CDummyClass()
01021     {
01022         RegisterClass_(UPseudoRotButton);
01023         RegisterClass_(UPseudoPlaceHolder);
01024         RegisterClass_(UPseudoPageHider);
01025     }
01026
01027 } sDummyStarter;
Generated on Sat Aug 7 22:43:03 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CLogoutThread Member List

This is the complete list of members for CLogoutThread, including all inherited members.

CLogoutThread() | CLogoutThread |
Delete() | CLogoutThread | [private, virtual]
InitInstance() | CLogoutThread | [private, virtual]
KillThread(void) | CLogoutThread |
m_term | CLogoutThread | [private]
~CLogoutThread() | CLogoutThread | [virtual]

Generated on Sat Aug 7 22:54:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

UPStr Member List

This is the complete list of members for UPStr, including all inherited members.

c_str() const | UPStr | [inline]
clear(void) | UPStr | [protected]
empty(void) const | UPStr | [inline]
endsWith(char c) const | UPStr | [inline]
length(void) const | UPStr | [inline]
m_str | UPStr | [protected]
operator const char *() const | UPStr | [inline]
operator const unsigned char *() const | UPStr | [inline]
operator<<(const char *addToStr) | UPStr |
operator<<(char addToStr) | UPStr |
operator<<(int addToStr) | UPStr |
operator=(const char *newstr) | UPStr |
operator=(const unsigned char *newstr) | UPStr |
operator=(const UPStr &newstr) | UPStr |
p_str() const | UPStr | [inline]
replace(char which, char bywhich) | UPStr |
set(const char *buf, unsigned int len) | UPStr |
UPStr() | UPStr | [inline]
UPStr(const char *newstr) | UPStr | [inline]
UPStr(const unsigned char *newstr) | UPStr | [inline]
UPStr(const UPStr &newstr) | UPStr | [inline]
~UPStr() | UPStr | [virtual]

Generated on Sat Aug 7 22:55:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJFlatHeaderCtrl Member List

This is the complete list of members for CCJFlatHeaderCtrl, including all inherited members.

CCJFlatHeaderCtrl() | CCJFlatHeaderCtrl |
DrawFlatBorder(CDC *pDC) | CCJFlatHeaderCtrl | [protected, virtual]
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CCJFlatHeaderCtrl | [virtual]
GetMenuID() | CCJFlatHeaderCtrl | [virtual]
InitializeHeader(bool bBoldFont) | CCJFlatHeaderCtrl | [virtual]
m_bBoldFont | CCJFlatHeaderCtrl | [protected]
m_bLBtnDown | CCJFlatHeaderCtrl | [protected]
m_bSortAsc | CCJFlatHeaderCtrl | [protected]
m_Font | CCJFlatHeaderCtrl | [protected]
m_nOffset | CCJFlatHeaderCtrl | [protected]
m_nPos | CCJFlatHeaderCtrl | [protected]
m_nSortCol | CCJFlatHeaderCtrl | [protected]
m_popToolbarID | CCJFlatHeaderCtrl | [protected]
m_popupMenu | CCJFlatHeaderCtrl | [protected]
m_popupMenuID | CCJFlatHeaderCtrl | [protected]
m_pParentWnd | CCJFlatHeaderCtrl | [protected]
m_rcOldSize | CCJFlatHeaderCtrl | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJFlatHeaderCtrl | [protected]
OnEraseBkgnd(CDC *pDC) | CCJFlatHeaderCtrl | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJFlatHeaderCtrl | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJFlatHeaderCtrl | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJFlatHeaderCtrl | [protected]
OnPaint() | CCJFlatHeaderCtrl | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJFlatHeaderCtrl | [protected]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CCJFlatHeaderCtrl | [protected]
PreSubclassWindow() | CCJFlatHeaderCtrl | [protected, virtual]
ResizeWindow() | CCJFlatHeaderCtrl | [protected, virtual]
SetFontBold(BOOL bBoldFont=TRUE) | CCJFlatHeaderCtrl | [virtual]
SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0) | CCJFlatHeaderCtrl | [virtual]
SetSortImage(int nCol, BOOL bAsc) | CCJFlatHeaderCtrl | [virtual]
~CCJFlatHeaderCtrl() | CCJFlatHeaderCtrl | [virtual]

Generated on Sat Aug 7 22:49:11 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/HHelp/wincvs.h Source File

WinCvs/HHelp/wincvs.h

Go to the documentation of this file.
00001
00002 // Commands (ID_* and IDM_*)
00003 #define IDH_ID_CANCEL_EDIT_CNTR                 0x18000
00004 #define IDH_ID_APP_PREFERENCES                  0x18007
00005 #define IDH_ID_APP_CMDLINE                      0x18008
00006 #define IDH_ID_APP_LOGIN                        0x1800B
00007 #define IDH_ID_STOPCVS                          0x1801B
00008 #define IDH_ID_BROWSER_OPEN                     0x1801D
00009 #define IDH_ID_VIEW_BROWSER_BAR                 0x1801E
00010 #define IDH_ID_UPDATEBF                         0x1801F
00011 #define IDH_ID_COMMITBF                         0x18020
00012 #define IDH_ID_ADDBF                            0x18021
00013 #define IDH_ID_VIEW_SMALLICONS                  0x18022
00014 #define IDH_ID_VIEW_FULLLIST                    0x18023
00015 #define IDH_ID_VIEW_ROWDETAILS                  0x18024
00016 #define IDH_ID_VIEW_FILES_BAR                   0x18025
00017 #define IDH_ID_VIEW_UPDATE                      0x18026
00018 #define IDH_ID_VIEW_COMMIT                      0x18027
00019 #define IDH_ID_VIEW_ADD                         0x18028
00020 #define IDH_ID_VIEW_WORKSPACE                   0x18029
00021 #define IDH_ID_MENUBAR                          0x1802A
00022 #define IDH_ID_VIEW_ADDB                        0x1802B
00023 #define IDH_ID_VIEW_RMV                         0x1802C
00024 #define IDH_ID_VIEW_RELOAD                      0x1802E
00025 #define IDH_ID_VIEW_UPONE                       0x1803A
00026 #define IDH_ID_VIEW_TRASH                       0x1803E
00027 #define IDH_ID_VIEW_DIFF                        0x18041
00028 #define IDH_ID_VIEW_LOG                         0x18042
00029 #define IDH_ID_VIEW_STATUS                      0x18043
00030 #define IDH_ID_VIEW_LOCKF                       0x18044
00031 #define IDH_ID_VIEW_UNLOCKF                     0x18045
00032 #define IDH_ID_VIEW_MULTI_BAR                   0x18046
00033 #define IDH_ID_MENUITEM32840                    0x18048
00034 #define IDH_ID_VIEW_WATCHON                     0x1804B
00035 #define IDH_ID_VIEW_WATCHOFF                    0x1804C
00036 #define IDH_ID_VIEW_EDIT                        0x1804D
00037 #define IDH_ID_VIEW_UNEDIT                      0x1804E
00038 #define IDH_ID_VIEW_RELEASE                     0x1804F
00039 #define IDH_ID_VIEW_WATCHERS                    0x18059
00040 #define IDH_ID_VIEW_EDITORS                     0x1805A
00041 #define IDH_ID_CUST_FILES_MENU                  0x1805B
00042 #define IDH_ID_CUST_FOLDER_MENU                 0x1805C
00043 #define IDH_ID_APP_CREDITS                      0x18068
00044 #define IDH_ID_APP_COPYRIGHTS                   0x18069
00045 #define IDH_ID_GRAPH_CLOSE                      0x1806A
00046 #define IDH_ID_VIEW_GRAPH                       0x1806B
00047 #define IDH_ID_APP_RTAGCREATE                   0x18071
00048 #define IDH_ID_APP_RTAGDELETE                   0x18072
00049 #define IDH_ID_APP_RTAGBRANCH                   0x18073
00050 #define IDH_ID_VIEW_TAG                         0x18074
00051 #define IDH_ID_VIEW_TAGNEW                      0x18076
00052 #define IDH_ID_VIEW_TAGDELETE                   0x18077
00053 #define IDH_ID_VIEW_TAGBRANCH                   0x18078
00054 #define IDH_ID_VIEW_TAGS_BAR                    0x18079
00055 #define IDH_ID_VIEW_CONSOLE_BAR                 0x18082
00056 #define IDH_ID_VIEW_EXPLORE                     0x18083
00057 #define IDH_ID_HISTORYBROWSE                    0x18084
00058 #define IDH_ID_VIEW_QUERYUPDATE                 0x18085
00059 #define IDH_ID_VIEW_IGNORE                      0x18086
00060 #define IDH_ID_APP_LOGOUT                       0x1808A
00061 #define IDH_ID_VIEW_EDITSEL                     0x1808C
00062 #define IDH_ID_VIEW_EDITSELDEF                  0x1808D
00063 #define IDH_ID_ACCEL32911                       0x1808F
00064 #define IDH_ID_VIEWW_INIT                       0x18090
00065 #define IDH_ID_VIEW_IMPORT                      0x18091
00066 #define IDH_ID_VIEW_INIT                        0x18092
00067 #define IDH_ID_VIEW_CHECKOUT                    0x18093
00068 #define IDH_ID_VIEW_DELREV                      0x18094
00069 #define IDH_ID_VIEW_SELNONSIG                   0x18095
00070 #define IDH_ID_BUTTON32918                      0x18096
00071 #define IDH_ID_BUTTON32919                      0x18097
00072 #define IDH_ID_BUTTON32920                      0x18098
00073 #define IDH_ID_BUTTON32921                      0x18099
00074 #define IDH_ID_SAVESETTINGS                     0x1809A
00075 #define IDH_ID_VIEW_RETRIEVE                    0x1809B
00076 #define IDH_ID_VIEW_RECURSIVE                   0x1809C
00077 #define IDH_ID_VIEW_FILTER_BAR                  0x1809D
00078 #define IDH_ID_VIEW_MODIFIED                    0x1809F
00079 #define IDH_ID_FILTERMASK                       0x180A0
00080 #define IDH_ID_VIEW_CONFLICT                    0x180A1
00081 #define IDH_ID_VIEW_UNKNOWN                     0x180A3
00082 #define IDH_ID_VIEW_MISSING                     0x180A4
00083 #define IDH_ID_VIEW_ADDED                       0x180A7
00084 #define IDH_ID_VIEW_REMOVED                     0x180A8
00085 #define IDH_ID_VIEW_CHANGED                     0x180A9
00086 #define IDH_ID_VIEW_HIDEUNKNOWN                 0x180AA
00087 #define IDH_ID_VIEW_CLEARALL                    0x180AB
00088 #define IDH_ID_BUTTON32940                      0x180AC
00089 #define IDH_ID_QUERY_ANNOTATE                   0x180AD
00090 #define IDH_ID_VIEW_BROWSELOCATION_REMOVEUNWANTED   0x180AF
00091 #define IDH_ID_USE_TCLSHELL                     0x180B0
00092 #define IDH_ID_USE_PYSHELL                      0x180B1
00093 #define IDH_ID_GRAPH_GRAPHOPTIONS               0x180B2
00094 #define IDH_ID_GRAPH_ADMINOPTIONS_CHANGELOGMESSAGE  0x180B6
00095 #define IDH_ID_GRAPH_ADMINOPTIONS_SETSTATE      0x180B7
00096 #define IDH_ID_GRAPH_ADMINOPTIONS_SETDESCRIPTION    0x180B8
00097 #define IDH_ID_VIEW_RESERVEDEDIT                0x180BD
00098 #define IDH_ID_VIEW_FORCEEDIT                   0x180BE
00099 #define IDH_ID_VIEW_ADDU                        0x180C0
00100 #define IDH_ID_VIEW_HIDEMISSING                 0x180CF
00101 #define IDH_ID_VIEW_FILTERBAR_ENABLE            0x180D0
00102 #define IDH_ID_VIEW_FILTERBAR_CLEARALL          0x180D1
00103 #define IDH_ID_VIEW_FILTERBAR_OPTIONS           0x180D2
00104 #define IDH_ID_VIEW_RETRIEVEAS                  0x180D6
00105 #define IDH_ID_VIEW_OPENSEL                     0x180D7
00106 #define IDH_ID_VIEW_OPENSELAS                   0x180D8
00107 #define IDH_ID_QUERY_SHELLACTION_DEFAULT        0x180DA
00108 #define IDH_ID_HELP_CVS                         0x180DB
00109 #define IDH_ID_QUERY_PROPERTIES                 0x180DC
00110 #define IDH_ID_VIEW_NEWINSTANCE                 0x180DD
00111 #define IDH_ID_MACRO_START                      0x184D0
00112 #define IDH_ID_MACRO_SEL                        0x18534
00113 #define IDH_ID_MACRO_ADMIN                      0x18598
00114 #define IDH_ID_MACRO_END                        0x18598
00115
00116 // Prompts (IDP_*)
00117 #define IDH_IDP_OLE_INIT_FAILED                 0x30064
00118 #define IDH_IDP_FAILED_TO_CREATE                0x30066
00119 #define IDH_IDP_SOCKETS_INIT_FAILED             0x30068
00120
00121 // Resources (IDR_*)
00122 #define IDH_IDR_CNTR_INPLACE                    0x20006
00123 #define IDH_IDR_MAINFRAME                       0x20080
00124 #define IDH_IDR_WINCVSTYPE                      0x20081
00125 #define IDH_IDR_BROWSER                         0x20081
00126 #define IDH_IDR_FILELIST                        0x2009D
00127 #define IDH_IDR_MULTIUSER                       0x2009E
00128 #define IDH_IDR_GRAPH                           0x200A1
00129 #define IDH_IDR_STATEICONS                      0x200A4
00130 #define IDH_IDR_TAGS                            0x200A5
00131 #define IDH_IDR_WORKSPACE                       0x200AD
00132 #define IDH_IDR_CUSTMENUS                       0x200B6
00133 #define IDH_IDR_FILTER                          0x200BA
00134 #define IDH_IDR_ITEMLIST                        0x200CF
00135
00136 // Dialogs (IDD_*)
00137 #define IDH_IDD_ABOUTBOX                        0x20064
00138 #define IDH_IDD_TIP                             0x20069
00139 #define IDH_IDD_PASSWRD                         0x20084
00140 #define IDH_IDD_ALERT                           0x20086
00141 #define IDH_IDD_PREFS_GLOBALS                   0x20088
00142 #define IDH_IDD_CHECKOUT_MAIN                   0x20089
00143 #define IDH_IDD_COMMIT_MAIN                     0x2008A
00144 #define IDH_IDD_IMPORT_MAIN                     0x2008B
00145 #define IDH_IDD_IMPORT_OPTIONS                  0x2008C
00146 #define IDH_IDD_CMDLINE_MAIN                    0x2008E
00147 #define IDH_IDD_IMPORTFILTER                    0x2008F
00148 #define IDH_IDD_WARNINGDESC                     0x20091
00149 #define IDH_IDD_ENTRYDESC                       0x20092
00150 #define IDH_IDD_UPDATE_MAIN                     0x20093
00151 #define IDH_IDD_UPDATE_MERGE                    0x20095
00152 #define IDH_IDD_LOG_MAIN                        0x20096
00153 #define IDH_IDD_LOG_FILTERS                     0x20098
00154 #define IDH_IDD_DIFF_OPTIONS                    0x20099
00155 #define IDH_IDD_DIFF_MAIN                       0x2009A
00156 #define IDH_IDD_UPDATE_OPTIONS                  0x2009B
00157 #define IDH_IDD_PREFS_WINCVS                    0x2009C
00158 #define IDH_IDD_INIT_MAIN                       0x200A5
00159 #define IDH_IDD_PROGRESS                        0x200B1
00160 #define IDH_IDD_CUSTOMIZE                       0x200B5
00161 #define IDH_IDD_SAVESETTINGS                    0x200B8
00162 #define IDH_IDD_COMMIT_OPTIONS                  0x200BA
00163 #define IDH_IDD_PREFS_CVSCMD_DIALOGS            0x200BF
00164 #define IDH_IDD_ANNOTATE_MAIN                   0x200C0
00165 #define IDH_IDD_GRAPH_OPTIONS                   0x200C1
00166 #define IDH_IDD_EDITMESSAGE                     0x200C3
00167 #define IDH_IDD_ADMINOPTION                     0x200C4
00168 #define IDH_IDD_EDITORMON                       0x200C5
00169 #define IDH_IDD_NOPYTHON                        0x200C6
00170 #define IDH_IDD_TAG_MAIN                        0x200C7
00171 #define IDH_IDD_RTAG_MAIN                       0x200C8
00172 #define IDH_IDD_RTAG_OPTIONS                    0x200C9
00173 #define IDH_IDD_STATUS_MAIN                     0x200CB
00174 #define IDH_IDD_ITEM_LIST                       0x200CD
00175 #define IDH_IDD_LOGIN_MAIN                      0x200CE
00176 #define IDH_IDD_PREFS_CVS                       0x200CF
00177 #define IDH_IDD_RELEASE_MAIN                    0x200D0
00178 #define IDH_IDD_SELECTION_DETAILS               0x200D1
00179 #define IDH_IDD_FILTERBAR_OPTIONS               0x200D4
00180 #define IDH_IDD_FILTER_SELECTION                0x200D5
00181 #define IDH_IDD_MULTILINE_ENTRY                 0x200D6
00182 #define IDH_IDD_CVSTEMPLATE                     0x200DA
00183 #define IDH_IDD_OPEN_MAIN                       0x200DB
00184 #define IDH_IDD_CVSROOT                         0x200E0
00185 #define IDH_IDD_EDITKEYWORD                     0x200E2
00186
00187 // Frame Controls (IDW_*)
00188
00189 // Dialog Controls (IDC_*)
00190 #define IDH_IDC_OPTIONCHECK_BUTTON              0x71
00191 #define IDH_IDC_CVSROOT                         0x3E8
00192 #define IDH_IDC_BULB                            0x3E9
00193 #define IDH_IDC_CHECKOUT_READ_ONLY              0x3EA
00194 #define IDH_IDC_STARTUP                         0x3EB
00195 #define IDH_IDC_HAS_COMPRESSION                 0x3EC
00196 #define IDH_IDC_NEXTTIP                         0x3ED
00197 #define IDH_IDC_PRUNE_EMPTY_DIR                 0x3EE
00198 #define IDH_IDC_TIPSTRING                       0x3EF
00199 #define IDH_IDC_ENCRYPTION                      0x3F0
00200 #define IDH_IDC_UNIX_LF                         0x3F1
00201 #define IDH_IDC_NO_SPLASH_SCREEN                0x3F3
00202 #define IDH_IDC_QUIET                           0x3F4
00203 #define IDH_IDC_CONTROL_ADDED_FILES             0x3F5
00204 #define IDH_IDC_FILEPATH                        0x3F6
00205 #define IDH_IDC_PROMPTEDIT                      0x3F7
00206 #define IDH_IDC_ALWAYSROOT                      0x3F9
00207 #define IDH_IDC_PASSWORD                        0x3FA
00208 #define IDH_IDC_AUTO_LOGOUT                     0x3FB
00209 #define IDH_IDC_SPIN_AUTO_LOGOUT_TIME           0x3FC
00210 #define IDH_IDC_MATCH_ENTRIES_CASE              0x3FD
00211 #define IDH_IDC_BROWSE_CVSROOT                  0x400
00212 #define IDH_IDC_MULTILINE_ENTRY                 0x401
00213 #define IDH_IDC_STDOUT                          0x403
00214 #define IDH_IDC_MODNAME                         0x404
00215 #define IDH_IDC_BROWSE_PATH                     0x405
00216 #define IDH_IDC_TAGNAME                         0x406
00217 #define IDH_IDC_NORECURS                        0x407
00218 #define IDH_IDC_PATH                            0x408
00219 #define IDH_IDC_FORCE_HEAD_REV                  0x409
00220 #define IDH_IDC_ENTRY                           0x40A
00221 #define IDH_IDC_OVERWRITE                       0x40B
00222 #define IDH_IDC_HAS_REV                         0x40C
00223 #define IDH_IDC_MULTILINE_ENTRY_WRAP            0x40D
00224 #define IDH_IDC_RESET_STICKY                    0x40E
00225 #define IDH_IDC_CREATE_MISSING_DIR              0x40F
00226 #define IDH_IDC_GET_CLEAN_COPY                  0x410
00227 #define IDH_IDC_ENTRIES_LIST                    0x418
00228 #define IDH_IDC_CONFLICT_DESC                   0x419
00229 #define IDH_IDC_ENTRY_EDIT                      0x41A
00230 #define IDH_IDC_WARNING_DESC                    0x41B
00231 #define IDH_IDC_ENTRYSTATE_NO_CHANGE            0x41C
00232 #define IDH_IDC_HAS_DATE                        0x41D
00233 #define IDH_IDC_ENTRYSTATE_FORCE_TEXT           0x41E
00234 #define IDH_IDC_ENTRYSTATE_IGNORE               0x41F
00235 #define IDH_IDC_REV_TAG                         0x420
00236 #define IDH_IDC_ENTRYSTATE_NO_EXPANSION         0x421
00237 #define IDH_IDC_DATE1                           0x423
00238 #define IDH_IDC_STATES                          0x425
00239 #define IDH_IDC_DATE2                           0x426
00240 #define IDH_IDC_REV_TAG2                        0x427
00241 #define IDH_IDC_HAS_USERS                       0x429
00242 #define IDH_IDC_NOTAGS                          0x42A
00243 #define IDH_IDC_HEADERS                         0x42C
00244 #define IDH_IDC_SUPRESS_HEADER                  0x42D
00245 #define IDH_IDC_HAS_PATH                        0x42E
00246 #define IDH_IDC_HEADERS_DESC                    0x42F
00247 #define IDH_IDC_ADD_SELECTION                   0x431
00248 #define IDH_IDC_HOME                            0x432
00249 #define IDH_IDC_ADD_DEFAULT                     0x433
00250 #define IDH_IDC_ENTRYSTATE_FORCE_BINARY         0x434
00251 #define IDH_IDC_DATE                            0x435
00252 #define IDH_IDC_ENTRYSTATE_FORCE_UNICODE        0x436
00253 #define IDH_IDC_USERS                           0x439
00254 #define IDH_IDC_DEFAULT_BRANCH                  0x43A
00255 #define IDH_IDC_COLOR_STATE                     0x43B
00256 #define IDH_IDC_RCS_FILENAMES_ONLY              0x43C
00257 #define IDH_IDC_ISDATE1                         0x43D
00258 #define IDH_IDC_ISDATE2                         0x43E
00259 #define IDH_IDC_REV_TAG1                        0x43F
00260 #define IDH_IDC_BROWSE_EXTERNAL_EDITOR          0x440
00261 #define IDH_IDC_RELEASE_TAG                     0x441
00262 #define IDH_IDC_EXTERNAL_EDITOR                 0x442
00263 #define IDH_IDC_BAR_TREE                        0x443
00264 #define IDH_IDC_USE_EXTERNAL_DIFF               0x444
00265 #define IDH_IDC_BROWSE_ALTERNATE_SETTINGS       0x445
00266 #define IDH_IDC_ATTIC                           0x446
00267 #define IDH_IDC_HAS_EXTERNAL_DIFF               0x447
00268 #define IDH_IDC_BROWSE_EXTERNAL_DIFF            0x448
00269 #define IDH_IDC_EXTERNAL_DIFF                   0x449
00270 #define IDH_IDC_CHECK_UNMODIFIED                0x44A
00271 #define IDH_IDC_MULTILINE_POSITION              0x44B
00272 #define IDH_IDC_HAS_ALTERNATE_CVS               0x44C
00273 #define IDH_IDC_PYTHONDLL                       0x44D
00274 #define IDH_IDC_ALTERNATE_CVS                   0x44E
00275 #define IDH_IDC_BROWSE_PYTHONDLL                0x44F
00276 #define IDH_IDC_MULTILINE_PREV_ENTRY            0x450
00277 #define IDH_IDC_BROWSE_FILENAME                 0x451
00278 #define IDH_IDC_TCLDLL                          0x452
00279 #define IDH_IDC_WINCVSVER                       0x453
00280 #define IDH_IDC_BROWSE_TCLDLL                   0x454
00281 #define IDH_IDC_AUTO_LOGOUT_TIME                0x456
00282 #define IDH_IDC_FORCE_CVSROOT                   0x45A
00283 #define IDH_IDC_EXPORT                          0x45B
00284 #define IDH_IDC_HELP_INIT                       0x45C
00285 #define IDH_IDC_PROGRESS                        0x45E
00286 #define IDH_IDC_COMPRESSION                     0x45F
00287 #define IDH_IDC_SPIN_COMPRESSION                0x460
00288 #define IDH_IDC_WINCVSURL                       0x461
00289 #define IDH_IDC_ALLCMDS                         0x462
00290 #define IDH_IDC_CVSGUISFURL                     0x463
00291 #define IDH_IDC_ADD                             0x465
00292 #define IDH_IDC_REMOVE                          0x466
00293 #define IDH_IDC_UP                              0x467
00294 #define IDH_IDC_DELETE_ALL_FILES                0x468
00295 #define IDH_IDC_DOWN                            0x469
00296 #define IDH_IDC_DELETE_CVS_INFO                 0x46A
00297 #define IDH_IDC_MENULIST                        0x46B
00298 #define IDH_IDC_MULTILINE_WORDWRAP              0x46D
00299 #define IDH_IDC_IGNOREWHITESPACE                0x46F
00300 #define IDH_IDC_IGNORECASE                      0x470
00301 #define IDH_IDC_UNIFIEDDIFF                     0x472
00302 #define IDH_IDC_CHECKOUT_DIR                    0x473
00303 #define IDH_IDC_OVERRIDE_CHECKOUT_DIR           0x474
00304 #define IDH_IDC_DEFAULT_CVSIGNORE               0x475
00305 #define IDH_IDC_FORCE_COMMIT                    0x476
00306 #define IDH_IDC_FILES_MODIFICATION_TIME         0x477
00307 #define IDH_IDC_FORCE_RECURSE                   0x478
00308 #define IDH_IDC_CREATE_SANDBOX                  0x479
00309 #define IDH_IDC_FORCE_REVISION                  0x47A
00310 #define IDH_IDC_NO_MODULE_PROGRAM               0x47B
00311 #define IDH_IDC_VENDOR_TAG                      0x47C
00312 #define IDH_IDC_CHECK_VALID_EDITS               0x47D
00313 #define IDH_IDC_REPOSITORY_PATH                 0x47E
00314 #define IDH_IDC_ALTERNATE_SETTINGS              0x481
00315 #define IDH_IDC_COLOR_SELECTION                 0x482
00316 #define IDH_IDC_SKIP_UPDATE                     0x483
00317 #define IDH_IDC_SKIP_DIFF                       0x484
00318 #define IDH_IDC_SKIP_GRAPH                      0x485
00319 #define IDH_IDC_SKIP_LOG                        0x486
00320 #define IDH_IDC_FORCE_KEY_SHIFT                 0x487
00321 #define IDH_IDC_FORCE_KEY_CTRL                  0x488
00322 #define IDH_IDC_CONSOLE                         0x489
00323 #define IDH_IDC_ISDATE                          0x48A
00324 #define IDH_IDC_SKIP_ANNOTATE                   0x48B
00325 #define IDH_IDC_REV_TAG_DATE                    0x48C
00326 #define IDH_IDC_SKIP_STATUS                     0x48D
00327 #define IDH_IDC_DIFF                            0x48E
00328 #define IDH_IDC_SKIP_FILEACTION                 0x48F
00329 #define IDH_IDC_FILETODIFF                      0x490
00330 #define IDH_IDC_COLOR_MERGE                     0x491
00331 #define IDH_IDC_RESET_COLORS                    0x492
00332 #define IDH_IDC_COLOR_HEADER                    0x493
00333 #define IDH_IDC_COLOR_TAG                       0x494
00334 #define IDH_IDC_RGB_HEADER                      0x495
00335 #define IDH_IDC_RGB_TAG                         0x496
00336 #define IDH_IDC_RGB_BRANCH                      0x497
00337 #define IDH_IDC_RGB_NODE                        0x498
00338 #define IDH_IDC_RGB_DEAD                        0x499
00339 #define IDH_IDC_RGB_STATE                       0x49A
00340 #define IDH_IDC_COLOR_BRANCH                    0x49B
00341 #define IDH_IDC_COLOR_NODE                      0x49C
00342 #define IDH_IDC_SELECTION                       0x49D
00343 #define IDH_IDC_COLOR_SHADOW                    0x49E
00344 #define IDH_IDC_COLOR_DEAD                      0x49F
00345 #define IDH_IDC_RGB_SELECTION                   0x4A0
00346 #define IDH_IDC_RGB_SHADOW                      0x4A1
00347 #define IDH_IDC_RGB_MERGE                       0x4A2
00348 #define IDH_IDC_TEMPFILE                        0x4A3
00349 #define IDH_IDC_REMIND                          0x4A4
00350 #define IDH_IDC_PYTHON_URL                      0x4A5
00351 #define IDH_IDC_PREVIEWINFO                     0x4A6
00352 #define IDH_IDC_HAS_DATE1                       0x4A8
00353 #define IDH_IDC_HAS_DATE2                       0x4A9
00354 #define IDH_IDC_GRPBOX_TEXT                     0x4AA
00355 #define IDH_IDC_TAGDESC_TEXT                    0x4AB
00356 #define IDH_IDC_MODULEDESC_TEXT                 0x4AC
00357 #define IDH_IDC_OUTPUT_QUICK                    0x4AD
00358 #define IDH_IDC_OUTPUT_VERBOSE                  0x4AE
00359 #define IDH_IDC_BROWSE_TAG                      0x4AF
00360 #define IDH_IDC_OUTPUT_STANDARD                 0x4B0
00361 #define IDH_IDC_BROWSE_READ_FROM                0x4B1
00362 #define IDH_IDC_BROWSE_TAG1                     0x4B2
00363 #define IDH_IDC_BROWSE_TAG2                     0x4B3
00364 #define IDH_IDC_BROWSE_MODNAME                  0x4B5
00365 #define IDH_IDC_ITEM_LIST                       0x4B6
00366 #define IDH_IDC_REFRESH_ITEMS                   0x4B7
00367 #define IDH_IDC_READ_FROM                       0x4B9
00368 #define IDH_IDC_ITEM                            0x4BA
00369 #define IDH_IDC_ITEM_LABEL                      0x4BB
00370 #define IDH_IDC_ITEM_LIST_OPTION                0x4BC
00371 #define IDH_IDC_GROUP_OPTIONS                   0x4BF
00372 #define IDH_IDC_HELPLOGIN                       0x4C0
00373 #define IDH_IDC_COMPARE_TYPE                    0x4C1
00374 #define IDH_IDC_KEYWORD_OPT                     0x4C2
00375 #define IDH_IDC_KEYWORD_DESC                    0x4C3
00376 #define IDH_IDC_DIFFOPTIONS                     0x4C4
00377 #define IDH_IDC_BROWSE_DIFFOPTIONS              0x4C5
00378 #define IDH_IDC_HAS_ALTERNATE_SETTINGS          0x4C6
00379 #define IDH_IDC_BROWSE_SELECTION                0x4C7
00380 #define IDH_IDC_DELETE_DIRECTORY                0x4C8
00381 #define IDH_IDC_PROGRESS_TEXT                   0x4C9
00382 #define IDH_IDC_SELECTION_LIST                  0x4CA
00383 #define IDH_IDC_FILENAME                        0x4CB
00384 #define IDH_IDC_REVISION_SPIN                   0x4CC
00385 #define IDH_IDC_REVISION                        0x4CD
00386 #define IDH_IDC_AUTO_REFRESH                    0x4CE
00387 #define IDH_IDC_HAS_BRANCHID                    0x4CF
00388 #define IDH_IDC_BRANCHID                        0x4D0
00389 #define IDH_IDC_BROWSE_BRANCHID                 0x4D1
00390 #define IDH_IDC_MOVDEL_BRANCH                   0x4D2
00391 #define IDH_IDC_DONT_SHORTEN_PATHS              0x4D3
00392 #define IDH_IDC_REACTION_SPEED                  0x4D4
00393 #define IDH_IDC_REACTION_SPEED_SPIN             0x4D5
00394 #define IDH_IDC_FILTER_CONTENTS                 0x4D6
00395 #define IDH_IDC_FILTER                          0x4D7
00396 #define IDH_IDC_REACTION_SPEED_SECONDS          0x4D8
00397 #define IDH_IDC_CTRL_PRESSED_ON_OK              0x4D9
00398 #define IDH_IDC_MULTILINE_TYPE                  0x4DA
00399 #define IDH_IDC_NO_VENDOR_RELEASE_TAGS          0x4DB
00400 #define IDH_IDC_MULTILINE_ENTRY_STATIC          0x4DC
00401 #define IDH_IDC_MULTILINE_GO_ACTION             0x4DD
00402 #define IDH_IDC_OTHER_BUTTON                    0x4DE
00403 #define IDH_IDC_MULTILINE_ACTION                0x4DF
00404 #define IDH_IDC_TEMPLATE_LIST                   0x4E0
00405 #define IDH_IDC_TEMPLATE_PREVIEW                0x4E1
00406 #define IDH_IDC_ICON_STATIC                     0x4E2
00407 #define IDH_IDC_MESSAGE_DETAILS                 0x4E3
00408 #define IDH_IDC_ALERT_MESSAGE                   0x4E4
00409 #define IDH_IDC_SHOW_CVS_METHOD                 0x4E5
00410 #define IDH_IDC_ACTION                          0x4E6
00411 #define IDH_IDC_ACTION_DESC                     0x4E7
00412 #define IDH_IDC_SAME_ACTION_NEXT_TIME           0x4E8
00413 #define IDH_IDC_PROTOCOL_DESC                   0x4E9
00414 #define IDH_IDC_PROTOCOL                        0x4EA
00415 #define IDH_IDC_KEYWORDLIST                     0x4EB
00416 #define IDH_IDC_CLEAR_KEYWORD                   0x4EC
00417 #define IDH_IDC_KEYWORDLIST_DESC                0x4ED
00418 #define IDH_IDC_EDIT_KEYWORD                    0x4EE
00419 #define IDH_IDC_PROTOCOL_KEYWORD                0x4EF
00420 #define IDH_IDC_KEYWORD_DESCRIPTION             0x4F0
00421 #define IDH_IDC_KEYWORD_VALUE                   0x4F1
00422 #define IDH_IDC_OVERWRITE_RELEASE_TAGS          0x4F2
00423 #define IDH_IDC_IMPORT_FILTER                   0x4F3
00424 #define IDH_IDC_CURRENT_DIFF_OPTIONS            0x4F4
00425 #define IDH_IDC_DIFF_OPTION_LIST                0x4F5
00426 #define IDH_IDC_DIFF_OPTION_DESCRIPTION         0x4F6
00427 #define IDH_IDC_STATICGROUP_SELECTOPTIONS       0x4F7
00428 #define IDH_IDC_STATIC_CURRENTOPTIONS           0x4F8
00429 #define IDH_IDC_STATIC_OPTDESC                  0x4F9
00430 #define IDH_IDC_APPLY                           0x4FA
00431 #define IDH_IDC_SETTINGS_NAME                   0x4FB
00432 #define IDH_IDC_COPY_SETTINGS                   0x4FC
00433 #define IDH_IDC_COPY_SETTINGS_NAME              0x4FD
00434 #define IDH_IDC_PREVIEW_CVSROOT                 0x4FE
00435 #define IDH_IDC_RANGE_REV_TAG                   0x4FF
00436 #define IDH_IDC_RANGE_DATE                      0x500
00437 #define IDH_IDC_HAS_STATES                      0x501
00438 #define IDH_IDC_LAST_CHECKIN_TIME               0x502
00439 #define IDH_IDC_CASE_SENSITIVE_NAMES            0x503
00440 #define IDH_IDC_THREE_WAY_CONFLICTS             0x504
00441 #define IDH_IDC_BRANCHPOINT_MERGE               0x505
00442 #define IDH_IDC_MERGE_TYPE                      0x506
00443
Generated on Sat Aug 7 22:43:09 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/NoPython.h Source File

WinCvs/NoPython.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com>
00019  */
00020
00021 #if !defined(AFX_NOPYTHON_H__F675DE42_0FA7_4785_8946_E8FC861BBA57__INCLUDED_)
00022 #define AFX_NOPYTHON_H__F675DE42_0FA7_4785_8946_E8FC861BBA57__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // NoPython.h : header file
00028 //
00029
00030 #include "HHelpSupport.h"
00031
00032 void WarnNoPython(void);
00033
00035 // CNoPython dialog
00036
00037 class CNoPython : public CHHelpDialog
00038 {
00039 // Construction
00040 public:
00041     CNoPython(CWnd* pParent = NULL);   // standard constructor
00042
00043 // Dialog Data
00044     //{{AFX_DATA(CNoPython)
00045     enum { IDD = IDD_NOPYTHON };
00046     CCJHyperLink m_url;
00047     BOOL    m_remind;
00048     //}}AFX_DATA
00049
00050
00051 // Overrides
00052     // ClassWizard generated virtual function overrides
00053     //{{AFX_VIRTUAL(CNoPython)
00054     protected:
00055     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00056     //}}AFX_VIRTUAL
00057
00058 // Implementation
00059 protected:
00060
00061     // Generated message map functions
00062     //{{AFX_MSG(CNoPython)
00063     virtual BOOL OnInitDialog();
00064     afx_msg void OnHelp();
00065     //}}AFX_MSG
00066     DECLARE_MESSAGE_MAP()
00067 private:
00068     // Methods
00069     virtual void InitHelpID();
00070 };
00071
00072 //{{AFX_INSERT_LOCATION}}
00073 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00074
00075 #endif // !defined(AFX_NOPYTHON_H__F675DE42_0FA7_4785_8946_E8FC861BBA57__INCLUDED_)
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/CvsRootDlg.cpp Source File

common/CvsRootDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- March 2004
00019  */
00020
00021 // CvsRootDlg.cpp : implementation file
00022 //
00023
00024 #include "stdafx.h"
00025
00026 #ifdef WIN32
00027 #   include "wincvs.h"
00028 #   include "wincvs_winutil.h"
00029 #endif /* WIN32 */
00030
00031 #include "CvsRootDlg.h"
00032 #include "AppConsole.h"
00033 #include "CvsArgs.h"
00034
00035 #ifdef _DEBUG
00036 #define new DEBUG_NEW
00037 #undef THIS_FILE
00038 static char THIS_FILE[] = __FILE__;
00039 #endif
00040
00042 #define CHR_ROOT_TOKEN_SEPARATOR        ':'
00043
00045 #define CHR_KEYWORD_QUOTE               '\''
00046
00048 #define CHR_PROTOCOL_TOKEN_SEPARATOR    ';'
00049
00051 #define CHR_KEYWORD_TOKEN_SEPARATOR     '='
00052
00053 static CMString gPrevCVsRootRepositoryPaths(20, "P_PrevCvsRootRepositoryPaths");
00054 static CMKeyString gPrevCvsRootKeywords(200, "P_PrevCvsRootKeywords");
00055
00057 // CCvsRootConsole
00058
00059 CCvsRootConsole::CCvsRootConsole()
00060 {
00061     m_launchRes = 0;
00062 }
00063
00064 CCvsRootConsole::~CCvsRootConsole()
00065 {
00066 }
00067
00068 long CCvsRootConsole::cvs_out(const char*txt, long len)
00069 {
00070     m_cvsOut << txt;
00071     return len;
00072 }
00073
00074 long CCvsRootConsole::cvs_err(const char* txt, long len)
00075 {
00076     cvs_errstr(txt, len);
00077     m_cvsErr << txt;
00078
00079     return len;
00080 }
00081
00088 void CCvsRootConsole::Parse(int launchRes)
00089 {
00090     m_launchRes = launchRes;
00091     m_cvsOut.clear();
00092 }
00093
00095 int CCvsRootConsole::GetLaunchRes() const
00096 {
00097     return m_launchRes;
00098 }
00099
00101 stringstream& CCvsRootConsole::GetCvsErr()
00102 {
00103     return m_cvsErr;
00104 }
00105
00107 // CInfoParserConsole
00108
00109 CInfoParserConsole::CInfoParserConsole()
00110 {
00111 }
00112
00113 CInfoParserConsole::~CInfoParserConsole()
00114 {
00115 }
00116
00117 void CInfoParserConsole::Parse(int launchRes)
00118 {
00119     bool protocols = false;
00120
00121     string line;
00122
00123     while( getline(m_cvsOut, line) )
00124     {
00125         if( protocols )
00126         {
00127             stringstream stream;
00128             string protocol;
00129
00130             stream << line;
00131             stream >> protocol;
00132
00133             if( !protocol.empty() )
00134             {
00135                 string description;
00136
00137                 while( !stream.eof() )
00138                 {
00139                     string token;
00140                     stream >> token;
00141
00142                     if( !description.empty() )
00143                     {
00144                         description += " ";
00145                     }
00146
00147                     description += token;
00148                 }
00149
00150                 m_cvsProtocolList.insert(std::make_pair(protocol, description));
00151             }
00152         }
00153
00154         if( line.find("Available protocols:") != string::npos )
00155         {
00156             protocols = true;
00157         }
00158     }
00159
00160     CCvsRootConsole::Parse(launchRes);
00161 }
00162
00167 const CvsProtocolList& CInfoParserConsole::GetCvsProtocolList() const
00168 {
00169     return m_cvsProtocolList;
00170 }
00171
00173 // CProtocolParserConsole
00174
00175 CProtocolParserConsole::CProtocolParserConsole()
00176 {
00177 }
00178
00179 CProtocolParserConsole::~CProtocolParserConsole()
00180 {
00181 }
00182
00183 void CProtocolParserConsole::Parse(int launchRes)
00184 {
00185     bool keywords = false;
00186
00187     string line;
00188
00189     while( getline(m_cvsOut, line) )
00190     {
00191         if( keywords )
00192         {
00193             stringstream stream;
00194             string keyword;
00195
00196             stream << line;
00197             stream >> keyword;
00198
00199             if( !keyword.empty() )
00200             {
00201                 string description;
00202
00203                 while( !stream.eof() )
00204                 {
00205                     string token;
00206                     stream >> token;
00207
00208                     if( !description.empty() )
00209                     {
00210                         if( token.find("(alias:") != string::npos || token.find("(aliases:") != string::npos )
00211                         {
00212                             // Bail out to eliminate alias(es)
00213                             break;
00214                         }
00215
00216                         description += " ";
00217                     }
00218
00219                     description += token;
00220                 }
00221
00222                 KeywordInfo rowInfo;
00223                 rowInfo.m_keyword = keyword;
00224                 rowInfo.m_description = description;
00225
00226                 m_keywordList.push_back(rowInfo);
00227             }
00228         }
00229
00230         if( line.find("Keywords available:") != string::npos )
00231         {
00232             keywords = true;
00233         }
00234     }
00235
00236     CCvsRootConsole::Parse(launchRes);
00237 }
00238
00243 const KeywordList& CProtocolParserConsole::GetKeywordList() const
00244 {
00245     return m_keywordList;
00246 }
00247
00249 // CCvsRootParser
00250
00257 int CCvsRootParser::NormalizeCvsRoot(string& strCvsRoot, const char tokenSeparator) const
00258 {
00259     int tokenCount = 0;
00260
00261     // Eliminate leading token separator
00262     if( !strCvsRoot.empty() && CHR_ROOT_TOKEN_SEPARATOR == *strCvsRoot.begin() )
00263     {
00264         strCvsRoot.erase(strCvsRoot.begin());
00265     }
00266
00267     // Flag token separators
00268     bool inQuoted = false;
00269
00270     for(string::iterator it = strCvsRoot.begin(); it != strCvsRoot.end() ; it++)
00271     {
00272         if( CHR_KEYWORD_QUOTE == *it )
00273         {
00274             inQuoted = !inQuoted;
00275         }
00276
00277         if( inQuoted )
00278         {
00279             // We are inside quoted value
00280             continue;
00281         }
00282
00283         if( 0 == tokenCount )
00284         {
00285             bool isRootTokenSeparator = CHR_ROOT_TOKEN_SEPARATOR == *it;
00286
00287             if( CHR_PROTOCOL_TOKEN_SEPARATOR == *it || isRootTokenSeparator )
00288             {
00289                 *it = tokenSeparator;
00290                 tokenCount++;
00291             }
00292
00293             if( isRootTokenSeparator )
00294             {
00295                 if( it + 1 != strCvsRoot.end() )
00296                 {
00297                     tokenCount++;
00298                 }
00299
00300                 break;
00301             }
00302         }
00303         else if( 1 == tokenCount )
00304         {
00305             if( CHR_ROOT_TOKEN_SEPARATOR == *it )
00306             {
00307                 *it = tokenSeparator;
00308                 tokenCount++;
00309
00310                 if( it + 1 != strCvsRoot.end() )
00311                 {
00312                     tokenCount++;
00313                 }
00314
00315                 break;
00316             }
00317         }
00318     }
00319
00320     return tokenCount;
00321 }
00322
00331 bool CCvsRootParser::SplitCvsRoot(const char* cvsRoot, string& protocol, string& keywords, string& path) const
00332 {
00333     bool res = false;
00334
00335     if( cvsRoot )
00336     {
00337         string strCvsRoot = cvsRoot;
00338
00339         const char tokenSeparator = '\x01';
00340
00341         // Preprocess CVS root to prevent colons posing as a component separator
00342         const int tokenCount = NormalizeCvsRoot(strCvsRoot, tokenSeparator);
00343
00344         // Separate tokens
00345         if( tokenCount > 1 )
00346         {
00347             string token;
00348             stringstream cvsRootStream(strCvsRoot);
00349
00350             // Get the protocol
00351             if( getline(cvsRootStream, token, tokenSeparator) )
00352             {
00353                 protocol = token;
00354
00355                 // Get keywords
00356                 if( tokenCount > 2 )
00357                 {
00358                     if( getline(cvsRootStream, token, tokenSeparator) )
00359                     {
00360                         keywords = token;
00361                     }
00362                 }
00363
00364                 // Get the path
00365                 if( getline(cvsRootStream, token, tokenSeparator) )
00366                 {
00367                     path = token;
00368
00369                     // At this point parsing can be considered a success
00370                     res = true;
00371                 }
00372             }
00373         }
00374     }
00375
00376     return res;
00377 }
00378
00385 bool CCvsRootParser::Parse(const char* cvsRoot, const bool clearData /*= true*/)
00386 {
00387     bool res = false;
00388
00389     if( clearData )
00390     {
00391         Clear();
00392     }
00393
00394     string protocol;
00395     string keywords;
00396     string path;
00397
00398     if( SplitCvsRoot(cvsRoot, protocol, keywords, path) )
00399     {
00400         m_protocol = protocol;
00401         m_path = path;
00402
00403         // Parse the keywords
00404         if( !keywords.empty() )
00405         {
00406             string protocolToken;
00407             stringstream protocolStream(keywords);
00408
00409             // Keywords
00410             while( getline(protocolStream, protocolToken, CHR_PROTOCOL_TOKEN_SEPARATOR) )
00411             {
00412                 string keywordToken;
00413                 string valueToken;
00414                 stringstream keywordStream(protocolToken);
00415
00416                 if( getline(keywordStream, keywordToken, CHR_KEYWORD_TOKEN_SEPARATOR) &&
00417                     getline(keywordStream, valueToken, CHR_KEYWORD_TOKEN_SEPARATOR) )
00418                 {
00419                     valueToken.erase(0, valueToken.find_first_not_of(CHR_KEYWORD_QUOTE));
00420                     valueToken.erase(valueToken.find_last_not_of(CHR_KEYWORD_QUOTE) + 1, string::npos);
00421
00422                     m_cvsProtocolList.erase(keywordToken);
00423                     m_cvsProtocolList.insert(std::make_pair(keywordToken, valueToken));
00424                 }
00425             }
00426         }
00427
00428         res = true;
00429     }
00430
00431     return res;
00432 }
00433
00437 void CCvsRootParser::Clear()
00438 {
00439     m_protocol.erase();
00440     m_path.erase();
00441     m_cvsProtocolList.clear();
00442 }
00443
00448 bool CCvsRootParser::IsEmpty() const
00449 {
00450     return m_protocol.empty() && m_path.empty();
00451 }
00452
00457 const string& CCvsRootParser::GetProtocol() const
00458 {
00459     return m_protocol;
00460 }
00461
00466 const string& CCvsRootParser::GetPath() const
00467 {
00468     return m_path;
00469 }
00470
00475 const CvsProtocolList& CCvsRootParser::GetCvsProtocolList() const
00476 {
00477     return m_cvsProtocolList;
00478 }
00479
00480
00487 static int LaunchCvsRootCommand(CCvsRootConsole* cvsRootConsole, const char* protocol = NULL)
00488 {
00489     CvsArgs args;
00490     args.add("info");
00491
00492     if( protocol )
00493     {
00494         args.add(protocol);
00495     }
00496
00497     const char* dir = NULL;
00498
00499     args.print(dir);
00500
00501     const int launchRes = launchCVS(dir, args.Argc(), args.Argv(), cvsRootConsole);
00502     cvsRootConsole->Parse(launchRes);
00503
00504     return launchRes;
00505 }
00506
00514 static string FormatCvsRoot(const char* protocol, KeywordDisplayInfoList& displayInfoList, const char* path)
00515 {
00516     string cvsroot;
00517
00518     cvsroot = CHR_ROOT_TOKEN_SEPARATOR;
00519
00520     if( protocol )
00521     {
00522         cvsroot += protocol;
00523     }
00524
00525     for(KeywordDisplayInfoList::const_iterator it = displayInfoList.begin(); it != displayInfoList.end(); it++)
00526     {
00527         const KeywordDisplayInfo* displayInfo = *it;
00528         if( displayInfo && !displayInfo->GetValue().empty() )
00529         {
00530             bool needsQuote = displayInfo->GetValue().find(CHR_ROOT_TOKEN_SEPARATOR) != string::npos;
00531
00532             cvsroot += CHR_PROTOCOL_TOKEN_SEPARATOR;
00533             cvsroot += displayInfo->GetRowInfo().m_keyword;
00534             cvsroot += CHR_KEYWORD_TOKEN_SEPARATOR;
00535
00536             if( needsQuote )
00537             {
00538                 cvsroot += CHR_KEYWORD_QUOTE;
00539             }
00540
00541             cvsroot += displayInfo->GetValue();
00542
00543             if( needsQuote )
00544             {
00545                 cvsroot += CHR_KEYWORD_QUOTE;
00546             }
00547         }
00548     }
00549
00550     cvsroot += CHR_ROOT_TOKEN_SEPARATOR;
00551     cvsroot += path;
00552
00553     return cvsroot;
00554 }
00555
00557 // KeywordDisplayInfo
00558
00563 void KeywordDisplayInfo::Create(const KeywordInfo& rowInfo)
00564 {
00565     m_name = rowInfo.m_keyword;
00566
00567     string::iterator it = m_name.begin();
00568     it++;
00569
00570     if( it != m_name.end() )
00571     {
00572         std::transform(m_name.begin(), it, m_name.begin(), toupper);
00573     }
00574
00575     m_rowInfo = rowInfo;
00576 }
00577
00579 const string& KeywordDisplayInfo::GetName() const
00580 {
00581     return m_name;
00582 }
00583
00585 const string& KeywordDisplayInfo::GetValue() const
00586 {
00587     return m_value;
00588 }
00589
00594 void KeywordDisplayInfo::SetValue(const char* value)
00595 {
00596     m_value = value ? value : "";
00597 }
00598
00600 const KeywordInfo& KeywordDisplayInfo::GetRowInfo() const
00601 {
00602     return m_rowInfo;
00603 }
00604
00605 #ifdef WIN32
00606
00607 #define WM_READ_PROTOCOLS   WM_APP + 1
00608
00610 // CEditKeywordDlg dialog
00611
00612
00613 CEditKeywordDlg::CEditKeywordDlg(const char* description, const char* keyword, const char* value,
00614                            CWnd* pParent /*=NULL*/)
00615 : CHHelpDialog(CEditKeywordDlg::IDD, pParent)
00616 {
00617     //{{AFX_DATA_INIT(CEditKeywordDlg)
00618     m_description = description;
00619     m_keyword = keyword;
00620     m_value = value;
00621     //}}AFX_DATA_INIT
00622
00623     m_valueCombo.SetItems(&gPrevCvsRootKeywords);
00624     m_valueCombo.SetKeyword(m_keyword);
00625 }
00626
00627
00628 void CEditKeywordDlg::DoDataExchange(CDataExchange* pDX)
00629 {
00630     CHHelpDialog::DoDataExchange(pDX);
00631     //{{AFX_DATA_MAP(CEditKeywordDlg)
00632     DDX_Control(pDX, IDC_KEYWORD_VALUE, m_valueCombo);
00633     DDX_Text(pDX, IDC_KEYWORD_DESCRIPTION, m_description);
00634     DDX_Text(pDX, IDC_PROTOCOL_KEYWORD, m_keyword);
00635     DDX_CBString(pDX, IDC_KEYWORD_VALUE, m_value);
00636     //}}AFX_DATA_MAP
00637
00638     DDV_MinChars(pDX, m_value, 1);
00639     DDX_ComboMString(pDX, IDC_KEYWORD_VALUE, m_valueCombo);
00640 }
00641
00642
00643 BEGIN_MESSAGE_MAP(CEditKeywordDlg, CHHelpDialog)
00644 //{{AFX_MSG_MAP(CEditKeywordDlg)
00645     ON_BN_CLICKED(IDHELP, OnHelp)
00646     //}}AFX_MSG_MAP
00647 END_MESSAGE_MAP()
00648
00650 // CEditKeywordDlg message handlers
00651
00652 void CEditKeywordDlg::InitHelpID()
00653 {
00654     SetCtrlHelpID(IDC_PROTOCOL_KEYWORD,     IDH_IDC_PROTOCOL_KEYWORD);
00655     SetCtrlHelpID(IDC_KEYWORD_DESCRIPTION,  IDH_IDC_KEYWORD_DESCRIPTION);
00656     SetCtrlHelpID(IDC_KEYWORD_VALUE,        IDH_IDC_KEYWORD_VALUE);
00657 }
00658
00660 void CEditKeywordDlg::OnHelp()
00661 {
00662     ShowHelp();
00663 }
00664
00665
00667 // CCvsRootDlg dialog
00668
00669
00670 CCvsRootDlg::CCvsRootDlg(const char* cvsRoot, CWnd* pParent /*=NULL*/)
00671     : m_protocolCombo(USmartCombo::AutoDropWidth),
00672     CHHelpDialog(CCvsRootDlg::IDD, pParent)
00673 {
00674     //{{AFX_DATA_INIT(CCvsRootDlg)
00675     m_protocol = _T("");
00676     m_cvsroot = _T("");
00677     m_repositoryPath = _T("");
00678     //}}AFX_DATA_INIT
00679
00680     m_cvsroot = cvsRoot;
00681     m_cvsRootParser.Parse(m_cvsroot);
00682
00683     m_cvsStopped = false;
00684     m_repositoryPathCombo.SetItems(&gPrevCVsRootRepositoryPaths);
00685 }
00686
00687
00688 void CCvsRootDlg::DoDataExchange(CDataExchange* pDX)
00689 {
00690     CHHelpDialog::DoDataExchange(pDX);
00691     //{{AFX_DATA_MAP(CCvsRootDlg)
00692     DDX_Control(pDX, IDC_REPOSITORY_PATH, m_repositoryPathCombo);
00693     DDX_Control(pDX, IDC_PREVIEW_CVSROOT, m_cvsrootStatic);
00694     DDX_Control(pDX, IDC_KEYWORDLIST_DESC, m_keywordDescStatic);
00695     DDX_Control(pDX, IDOK, m_okButton);
00696     DDX_Control(pDX, IDCANCEL, m_cancelButton);
00697     DDX_Control(pDX, IDC_PROTOCOL_DESC, m_protocolDescStatic);
00698     DDX_Control(pDX, IDC_CLEAR_KEYWORD, m_clearButton);
00699     DDX_Control(pDX, IDC_EDIT_KEYWORD, m_editButton);
00700     DDX_Control(pDX, IDC_KEYWORDLIST, m_keywordList);
00701     DDX_Control(pDX, IDC_PROTOCOL, m_protocolCombo);
00702     DDX_CBString(pDX, IDC_PROTOCOL, m_protocol);
00703     DDX_Text(pDX, IDC_PREVIEW_CVSROOT, m_cvsroot);
00704     DDX_CBString(pDX, IDC_REPOSITORY_PATH, m_repositoryPath);
00705     //}}AFX_DATA_MAP
00706
00707     DDV_MinChars(pDX, m_repositoryPath, 1);
00708     DDX_ComboMString(pDX, IDC_REPOSITORY_PATH, m_repositoryPathCombo);
00709 }
00710
00711
00712 BEGIN_MESSAGE_MAP(CCvsRootDlg, CHHelpDialog)
00713     //{{AFX_MSG_MAP(CCvsRootDlg)
00714     ON_NOTIFY(NM_DBLCLK, IDC_KEYWORDLIST, OnDblclkKeywordlist)
00715     ON_NOTIFY(LVN_ITEMCHANGED, IDC_KEYWORDLIST, OnItemchangedKeywordlist)
00716     ON_WM_DESTROY()
00717     ON_CBN_SELCHANGE(IDC_PROTOCOL, OnSelchangeProtocol)
00718     ON_BN_CLICKED(IDC_EDIT_KEYWORD, OnEdit)
00719     ON_BN_CLICKED(IDC_CLEAR_KEYWORD, OnClear)
00720     ON_CBN_EDITCHANGE(IDC_REPOSITORY_PATH, OnEditchangePath)
00721     ON_CBN_SELCHANGE(IDC_REPOSITORY_PATH, OnSelchangePath)
00722     ON_BN_CLICKED(IDHELP, OnHelp)
00723     //}}AFX_MSG_MAP
00724     ON_MESSAGE_VOID(WM_READ_PROTOCOLS, OnReadProtocols)
00725 END_MESSAGE_MAP()
00726
00728 // CCvsRootDlg message handlers
00729
00731 BOOL CCvsRootDlg::OnInitDialog()
00732 {
00733     CHHelpDialog::OnInitDialog();
00734
00735     // Extra initialization
00736     SetListCtrlExtendedStyle(&m_keywordList, LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP | LVS_EX_GRIDLINES);
00737
00738     InitListCtrl(kCvsRootDisplayData);
00739
00740     ShowProtocolDescription();
00741
00742     // Force the window to show itself and trigger the reading of available protocols
00743     ShowWindow(SW_SHOW);
00744     PostReadProtocolsMsg();
00745
00746     return TRUE;  // return TRUE unless you set the focus to a control
00747                   // EXCEPTION: OCX Property Pages should return FALSE
00748 }
00749
00750 void CCvsRootDlg::InitHelpID()
00751 {
00752     SetCtrlHelpID(IDC_PROTOCOL,         IDH_IDC_PROTOCOL);
00753     SetCtrlHelpID(IDC_PROTOCOL_DESC,    IDH_IDC_PROTOCOL_DESC);
00754     SetCtrlHelpID(IDC_REPOSITORY_PATH,  IDH_IDC_REPOSITORY_PATH);
00755     SetCtrlHelpID(IDC_KEYWORDLIST,      IDH_IDC_KEYWORDLIST);
00756     SetCtrlHelpID(IDC_KEYWORDLIST_DESC, IDH_IDC_KEYWORDLIST_DESC);
00757     SetCtrlHelpID(IDC_EDIT_KEYWORD,     IDH_IDC_EDIT_KEYWORD);
00758     SetCtrlHelpID(IDC_CLEAR_KEYWORD,    IDH_IDC_CLEAR_KEYWORD);
00759     SetCtrlHelpID(IDC_PREVIEW_CVSROOT,  IDH_IDC_PREVIEW_CVSROOT);
00760 }
00761
00767 void CCvsRootDlg::InitListCtrl(const kCvsRootDisplayType displayType)
00768 {
00769     CWndRedrawMngr redrawMngr(&m_keywordList);
00770
00771     // Remove all items and columns
00772     DeleteAllItems();
00773
00774     int columnCount = m_keywordList.GetHeaderCtrl()->GetItemCount();
00775     while( columnCount-- )
00776     {
00777         m_keywordList.DeleteColumn(0);
00778     }
00779
00780     // Get the client area width to properly size columns
00781     CRect rect;
00782     m_keywordList.GetClientRect(rect);
00783
00784     const int listCtrlWidth = rect.Width();
00785
00786     // Set the appropriate columns
00787     switch( displayType )
00788     {
00789     case kCvsRootDisplayWait:
00790         m_keywordList.InsertColumn(0, _i18n("Action"), LVCFMT_LEFT, listCtrlWidth);
00791
00792         m_keywordList.InsertItem(0, _i18n("Please wait while retrieving data"));
00793         m_keywordList.InsertItem(1, _i18n("You can press Stop button to cancel the operation"));
00794         break;
00795     case kCvsRootDisplayData:
00796         {
00797             const int listCtrlWidthNoScroll = listCtrlWidth - GetSystemMetrics(SM_CXVSCROLL);
00798             const int fistColWidth = 100;
00799
00800             m_keywordList.InsertColumn(0, _i18n("Keyword"), LVCFMT_LEFT, fistColWidth);
00801             m_keywordList.InsertColumn(1, _i18n("Value"), LVCFMT_LEFT, listCtrlWidthNoScroll - fistColWidth);
00802         }
00803         break;
00804     case kCvsRootDisplayInfo:
00805         m_keywordList.InsertColumn(0, _i18n("Information"), LVCFMT_LEFT, listCtrlWidth);
00806         break;
00807     default:
00808         ASSERT(FALSE);  // unknown display type
00809         break;
00810     }
00811 }
00812
00817 void CCvsRootDlg::EnableControls(BOOL enable)
00818 {
00819     m_okButton.EnableWindow(enable);
00820     m_keywordList.EnableWindow(enable);
00821     m_protocolCombo.EnableWindow(enable);
00822     m_editButton.EnableWindow(enable);
00823     m_clearButton.EnableWindow(enable);
00824     m_repositoryPathCombo.EnableWindow(enable);
00825 }
00826
00831 void CCvsRootDlg::EnableEditControls(const KeywordDisplayInfo* displayInfo)
00832 {
00833     if( displayInfo )
00834     {
00835         m_editButton.EnableWindow(TRUE);
00836         m_clearButton.EnableWindow(!displayInfo->GetValue().empty());
00837     }
00838     else
00839     {
00840         m_editButton.EnableWindow(FALSE);
00841         m_clearButton.EnableWindow(FALSE);
00842     }
00843 }
00844
00849 BOOL CCvsRootDlg::PostReadProtocolsMsg()
00850 {
00851     return PostMessage(WM_READ_PROTOCOLS);
00852 }
00853
00855 void CCvsRootDlg::OnReadProtocols()
00856 {
00857     ReadAvailableProtocols();
00858
00859     if( m_protocolCombo.GetCount() > 0 )
00860     {
00861         if( !m_cvsRootParser.IsEmpty() )
00862         {
00863             m_protocolCombo.SelectString(-1, m_cvsRootParser.GetProtocol().c_str());
00864             m_repositoryPathCombo.SetWindowText(m_cvsRootParser.GetPath().c_str());
00865
00866             ShowProtocolDescription();
00867             ReadProtocolDetails();
00868         }
00869     }
00870 }
00871
00876 void CCvsRootDlg::FillProtocolsComboBox(CInfoParserConsole& infoParserConsole)
00877 {
00878     m_protocolCombo.ResetContent();
00879     m_protocolDescStatic.SetWindowText("");
00880
00881     const CvsProtocolList& cvsProtocolList = infoParserConsole.GetCvsProtocolList();
00882     if( cvsProtocolList.size() == 0 )
00883     {
00884         if( !m_cvsStopped )
00885         {
00886             if( infoParserConsole.GetLaunchRes() == 0 )
00887             {
00888                 InitListCtrl(kCvsRootDisplayInfo);
00889                 m_keywordList.InsertItem(0, _i18n("No protocols available, check your CVS configuration"));
00890
00891                 EnableControls(FALSE);
00892             }
00893             else
00894             {
00895                 InitListCtrl(kCvsRootDisplayInfo);
00896
00897                 // Show the error in the list control
00898                 m_keywordList.InsertItem(0, _i18n("Command failed:"));
00899
00900                 string line;
00901                 while( getline(infoParserConsole.GetCvsErr(), line) )
00902                 {
00903                     m_keywordList.InsertItem(m_keywordList.GetItemCount(), line.c_str());
00904                 }
00905
00906                 EnableControls(FALSE);
00907             }
00908         }
00909     }
00910     else
00911     {
00912         // Fill the protocols combobox
00913         for(CvsProtocolList::const_iterator it = cvsProtocolList.begin(); it != cvsProtocolList.end(); it++)
00914         {
00915             const item = m_protocolCombo.AddString((*it).first.c_str());
00916             if( item > -1 )
00917             {
00918                 m_protocolCombo.SetItemData(item, (DWORD)new string((*it).second));
00919             }
00920         }
00921
00922         // Show instructions and enable protocols combobox
00923         InitListCtrl(kCvsRootDisplayInfo);
00924         m_keywordList.InsertItem(0, _i18n("Select the protocol and enter repository path and any keywords required"));
00925
00926         EnableControls(FALSE);
00927         m_protocolCombo.EnableWindow(TRUE);
00928     }
00929 }
00930
00935 void CCvsRootDlg::DisplayKeywords(CProtocolParserConsole& protocolParserConsole)
00936 {
00937     const KeywordList& itemList = protocolParserConsole.GetKeywordList();
00938     if( itemList.size() == 0 )
00939     {
00940         if( !m_cvsStopped )
00941         {
00942             if( protocolParserConsole.GetLaunchRes() == 0 )
00943             {
00944                 InitListCtrl(kCvsRootDisplayInfo);
00945                 m_keywordList.InsertItem(0, _i18n("No keywords available"));
00946
00947                 m_keywordList.EnableWindow(FALSE);
00948                 EnableEditControls(FALSE);
00949             }
00950             else
00951             {
00952                 InitListCtrl(kCvsRootDisplayInfo);
00953
00954                 // Show the error in the list control
00955                 m_keywordList.InsertItem(0, _i18n("Command failed:"));
00956
00957                 string line;
00958                 while( getline(protocolParserConsole.GetCvsErr(), line) )
00959                 {
00960                     m_keywordList.InsertItem(m_keywordList.GetItemCount(), line.c_str());
00961                 }
00962
00963                 EnableControls(FALSE);
00964             }
00965         }
00966     }
00967     else
00968     {
00969         // Insert the items
00970         for(KeywordList::const_iterator it = itemList.begin(); it != itemList.end(); it++)
00971         {
00972             KeywordDisplayInfo* displayInfo = new KeywordDisplayInfo;
00973             if( displayInfo )
00974             {
00975                 displayInfo->Create(*it);
00976
00977                 const int itemIndex = m_keywordList.InsertItem(m_keywordList.GetItemCount(), displayInfo->GetName().c_str());
00978                 if( itemIndex > -1 )
00979                 {
00980                     if( !m_keywordList.SetItemData(itemIndex, (DWORD)displayInfo) )
00981                     {
00982                         delete displayInfo;
00983                     }
00984                 }
00985                 else
00986                 {
00987                     delete displayInfo;
00988                 }
00989             }
00990         }
00991     }
00992 }
00993
00998 void CCvsRootDlg::UpdateKeywords(const CvsProtocolList& protocolList)
00999 {
01000     const int itemCount = m_keywordList.GetItemCount();
01001     for(int nIndex = 0; nIndex < itemCount; nIndex++)
01002     {
01003         KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(nIndex);
01004         if( displayInfo )
01005         {
01006             CvsProtocolList::const_iterator it = protocolList.find(displayInfo->GetRowInfo().m_keyword);
01007             if( it != m_cvsRootParser.GetCvsProtocolList().end() )
01008             {
01009                 displayInfo->SetValue((*it).second.c_str());
01010                 m_keywordList.SetItemText(nIndex, 1, displayInfo->GetValue().c_str());
01011             }
01012         }
01013     }
01014 }
01015
01019 void CCvsRootDlg::DeleteAllItems()
01020 {
01021     const int itemCount = m_keywordList.GetItemCount();
01022     for(int nIndex = 0; nIndex < itemCount; nIndex++)
01023     {
01024         KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(nIndex);
01025         delete displayInfo;
01026     }
01027
01028     m_keywordList.DeleteAllItems();
01029 }
01030
01032 void CCvsRootDlg::OnCancel()
01033 {
01034     CWincvsApp* app = (CWincvsApp*)AfxGetApp();
01035     if( app && app->IsCvsRunning() && !app->IsCvsStopping() )
01036     {
01037         m_keywordList.DeleteAllItems();
01038         m_keywordList.InsertItem(0, _i18n("Stopping..."));
01039
01040         m_cvsStopped = true;
01041         stopCVS();
01042         return;
01043     }
01044
01045     CHHelpDialog::OnCancel();
01046 }
01047
01049 void CCvsRootDlg::OnDblclkKeywordlist(NMHDR* pNMHDR, LRESULT* pResult)
01050 {
01051     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01052     if( pNMListView->iItem > -1 )
01053     {
01054         OnEdit();
01055     }
01056
01057     *pResult = 0;
01058 }
01059
01061 void CCvsRootDlg::OnItemchangedKeywordlist(NMHDR* pNMHDR, LRESULT* pResult)
01062 {
01063     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
01064     if( pNMListView->iItem > -1 &&
01065         pNMListView->uChanged & LVIF_STATE && pNMListView->uNewState & (LVIS_SELECTED | LVIS_FOCUSED) )
01066     {
01067         const KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(pNMListView->iItem);
01068         if( displayInfo )
01069         {
01070             m_keywordDescStatic.SetWindowText(displayInfo->GetRowInfo().m_description.c_str());
01071
01072             EnableEditControls(displayInfo);
01073         }
01074     }
01075
01076     if( m_keywordList.GetNextItem(-1, LVNI_SELECTED) < 0 )
01077     {
01078         m_keywordDescStatic.SetWindowText("");
01079
01080         EnableEditControls(NULL);
01081     }
01082
01083     *pResult = 0;
01084 }
01085
01087 void CCvsRootDlg::OnDestroy()
01088 {
01089     DeleteAllItems();
01090
01091     const int count = m_protocolCombo.GetCount();
01092     for(int nIndex = 0; nIndex < count; nIndex++)
01093     {
01094         delete (string*)m_protocolCombo.GetItemData(nIndex);
01095     }
01096
01097     CHHelpDialog::OnDestroy();
01098 }
01099
01101 void CCvsRootDlg::OnSelchangeProtocol()
01102 {
01103     ShowProtocolDescription();
01104     ReadProtocolDetails();
01105 }
01106
01110 void CCvsRootDlg::ShowProtocolDescription()
01111 {
01112     const int item = m_protocolCombo.GetCurSel();
01113     if( item > -1 )
01114     {
01115         string* description = (string*)m_protocolCombo.GetItemData(item);
01116         if( description )
01117         {
01118             m_protocolDescStatic.SetWindowText(description->c_str());
01119         }
01120     }
01121     else
01122     {
01123         m_protocolDescStatic.SetWindowText("");
01124         m_keywordDescStatic.SetWindowText("");
01125     }
01126 }
01127
01131 void CCvsRootDlg::ReadAvailableProtocols()
01132 {
01133     m_cvsStopped = false;
01134
01135     // Prepare controls
01136     EnableControls(FALSE);
01137
01138     // Change the Cancel button's name to "Stop"
01139     CString strPrevCancelText;
01140     m_cancelButton.GetWindowText(strPrevCancelText);
01141     m_cancelButton.SetWindowText(_i18n("Stop"));
01142
01143     // Display the reading data prompt
01144     InitListCtrl(kCvsRootDisplayWait);
01145
01146     // Launch command
01147     CInfoParserConsole infoParserConsole;
01148     LaunchCvsRootCommand(&infoParserConsole);
01149
01150     // Initialize list control
01151     InitListCtrl(kCvsRootDisplayData);
01152
01153     // Restore control's state
01154     EnableControls(TRUE);
01155
01156     // Display data
01157     FillProtocolsComboBox(infoParserConsole);
01158
01159     // Restore Cancel's button name
01160     m_cancelButton.SetWindowText(strPrevCancelText);
01161
01162     // If there are any protocols set the focus to protocol combobox and enable path entry
01163     if( m_protocolCombo.GetCount() )
01164     {
01165         GotoDlgCtrl(&m_protocolCombo);
01166         m_repositoryPathCombo.EnableWindow(TRUE);
01167     }
01168 }
01169
01173 void CCvsRootDlg::ReadProtocolDetails()
01174 {
01175     m_cvsStopped = false;
01176
01177     m_keywordDescStatic.SetWindowText("");
01178
01179     CString cvsRoot;
01180     m_cvsrootStatic.GetWindowText(cvsRoot);
01181
01182     CString protocol;
01183
01184     {
01185         const int item = m_protocolCombo.GetCurSel();
01186         if( item > -1 )
01187         {
01188             m_protocolCombo.GetLBText(item, protocol);
01189         }
01190         else
01191         {
01192             // No protocol selected
01193             return;
01194         }
01195     }
01196
01197     // Prepare controls
01198     EnableControls(FALSE);
01199
01200     // Change the Cancel button's name to "Stop"
01201     CString strPrevCancelText;
01202     m_cancelButton.GetWindowText(strPrevCancelText);
01203     m_cancelButton.SetWindowText(_i18n("Stop"));
01204
01205     // Display the reading data prompt
01206     InitListCtrl(kCvsRootDisplayWait);
01207
01208     // Launch command
01209     CProtocolParserConsole protocolParserConsole;
01210     LaunchCvsRootCommand(&protocolParserConsole, protocol);
01211
01212     // Initialize list control
01213     InitListCtrl(kCvsRootDisplayData);
01214
01215     // Restore control's state
01216     EnableControls(TRUE);
01217
01218     // Display data
01219     DisplayKeywords(protocolParserConsole);
01220
01221     // Restore Cancel's button name
01222     m_cancelButton.SetWindowText(strPrevCancelText);
01223
01224     // If there are any keywords select the first keyword
01225     if( m_keywordList.IsWindowEnabled() && m_keywordList.GetItemCount() )
01226     {
01227         m_keywordList.SetItemState(0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
01228     }
01229
01230     GotoDlgCtrl(&m_protocolCombo);
01231
01232     m_cvsRootParser.Parse(cvsRoot, false);
01233     UpdateKeywords(m_cvsRootParser.GetCvsProtocolList());
01234
01235     UpdateCvsRoot();
01236 }
01237
01239 void CCvsRootDlg::OnEdit()
01240 {
01241     const int item = m_keywordList.GetNextItem(-1, LVNI_SELECTED);
01242     if( item > -1 )
01243     {
01244         KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(item);
01245         if( displayInfo )
01246         {
01247             CEditKeywordDlg editKeywordDlg(displayInfo->GetRowInfo().m_description.c_str(), displayInfo->GetName().c_str(), displayInfo->GetValue().c_str());
01248
01249             if( editKeywordDlg.DoModal() == IDOK )
01250             {
01251                 displayInfo->SetValue(editKeywordDlg.m_value);
01252                 m_keywordList.SetItemText(item, 1, displayInfo->GetValue().c_str());
01253
01254                 EnableEditControls(displayInfo);
01255                 UpdateCvsRoot();
01256             }
01257         }
01258     }
01259 }
01260
01262 void CCvsRootDlg::OnClear()
01263 {
01264     const int item = m_keywordList.GetNextItem(-1, LVNI_SELECTED);
01265     if( item > -1 )
01266     {
01267         KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(item);
01268         if( displayInfo )
01269         {
01270             displayInfo->SetValue("");
01271             m_keywordList.SetItemText(item, 1, displayInfo->GetValue().c_str());
01272
01273             EnableEditControls(displayInfo);
01274             UpdateCvsRoot();
01275         }
01276     }
01277 }
01278
01280 void CCvsRootDlg::OnEditchangePath()
01281 {
01282     UpdateCvsRoot();
01283 }
01284
01286 void CCvsRootDlg::OnSelchangePath()
01287 {
01288     m_repositoryPathCombo.EnsureSelchangeMatch();
01289
01290     UpdateCvsRoot();
01291 }
01292
01296 void CCvsRootDlg::UpdateCvsRoot()
01297 {
01298     KeywordDisplayInfoList displayInfoList;
01299
01300     const int itemCount = m_keywordList.GetItemCount();
01301     for(int nIndex = 0; nIndex < itemCount; nIndex++)
01302     {
01303         const KeywordDisplayInfo* displayInfo = (KeywordDisplayInfo*)m_keywordList.GetItemData(nIndex);
01304         if( displayInfo )
01305         {
01306             displayInfoList.push_back(displayInfo);
01307         }
01308     }
01309
01310     const CString protocol = m_protocolCombo.GetCurSelText();
01311     const CString path = m_repositoryPathCombo.GetWindowText();
01312     const string cvsroot = FormatCvsRoot(protocol, displayInfoList, path);
01313
01314     m_cvsrootStatic.SetWindowText(cvsroot.c_str());
01315 }
01316
01318 void CCvsRootDlg::OnHelp()
01319 {
01320     ShowHelp();
01321 }
01322
01323 #endif  // WIN32
01324
01326 bool CompatGetCvsRoot(CStr& cvsRoot)
01327 {
01328     bool userHitOK = false;
01329
01330 #ifdef WIN32
01331     CCvsRootDlg cvsRootDlg(cvsRoot);
01332
01333     if( cvsRootDlg.DoModal() == IDOK )
01334     {
01335         cvsRoot = cvsRootDlg.m_cvsroot;
01336
01337         userHitOK = true;
01338     }
01339 #endif /* WIN32 */
01340
01341 #if qUnix
01342 #endif // qUnix
01343
01344 #ifdef qMacCvsPP
01345 #endif /* qMacCvsPP */
01346
01347     return userHitOK;
01348 }
Generated on Sat Aug 7 22:42:56 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CStreamConsole Member List

This is the complete list of members for CStreamConsole, including all inherited members.

CCvsStreamConsole(FILE *fileOut=0L, bool autoClose=true) | CCvsStreamConsole |
CStreamConsole(FILE *fileOut) | CStreamConsole |
cvs_err(const char *txt, long len) | CCvsStreamConsole | [virtual]
cvs_out(const char *txt, long len) | CCvsStreamConsole | [virtual]
IsModeSet() const | CCvsStreamConsole | [protected, virtual]
m_autoClose | CCvsStreamConsole | [protected]
m_fileOut | CCvsStreamConsole | [protected]
m_modeSet | CCvsStreamConsole | [protected]
Open(const char *fileName) | CCvsStreamConsole | [virtual]
SetMode(bool binary) | CCvsStreamConsole | [protected, virtual]
~CCvsStreamConsole() | CCvsStreamConsole | [virtual]

Generated on Sat Aug 7 22:56:39 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TGraph Member List

This is the complete list of members for TGraph, including all inherited members.

TraverseGraph(CLogNode *node) | TGraph |
TraverseNode(CLogNode *node)=0 | TGraph | [pure virtual]

Generated on Sat Aug 7 22:56:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

MACBINMAP Member List

This is the complete list of members for MACBINMAP, including all inherited members.

desc | MACBINMAP
encod | MACBINMAP
ext | MACBINMAP
sig | MACBINMAP
useDefault | MACBINMAP

Generated on Sat Aug 7 22:54:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/OptionalPropertySheet.h Source File

common/OptionalPropertySheet.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- June 2001
00019  */
00020
00021 #if !defined(AFX_OPTIONALPROPERTYSHEET_H__F82DC8BB_73CD_4AEA_8635_1A0932F24C7D__INCLUDED_)
00022 #define AFX_OPTIONALPROPERTYSHEET_H__F82DC8BB_73CD_4AEA_8635_1A0932F24C7D__INCLUDED_
00023
00024 #if _MSC_VER > 1000
00025 #pragma once
00026 #endif // _MSC_VER > 1000
00027 // OptionalPropertySheet.h : header file
00028 //
00029
00030 #include "HHelpSupport.h"
00031
00033 // COptionalPropertySheet
00034
00035 class COptionalPropertySheet : public CHHelpPropertySheet
00036 {
00037     DECLARE_DYNAMIC(COptionalPropertySheet)
00038
00039 // Construction
00040 public:
00041     COptionalPropertySheet(bool bOptionChecked, UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00042     COptionalPropertySheet(bool bOptionChecked, LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
00043
00044 // Attributes
00045 public:
00046
00047 // Operations
00048 public:
00049
00050 // Overrides
00051     // ClassWizard generated virtual function overrides
00052     //{{AFX_VIRTUAL(COptionalPropertySheet)
00053     public:
00054     virtual int DoModal();
00055     protected:
00056     virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00057     //}}AFX_VIRTUAL
00058
00059 // Implementation
00060 public:
00061     virtual ~COptionalPropertySheet();
00062
00063     // Generated message map functions
00064 protected:
00065     //{{AFX_MSG(COptionalPropertySheet)
00066     virtual BOOL OnInitDialog();
00067     //}}AFX_MSG
00068     DECLARE_MESSAGE_MAP()
00069 protected:
00070     // Data members
00071     bool m_bOptionChecked;
00072     CButton m_optionCheck;
00074     // Methods
00075     virtual void InitHelpID();
00076
00077     void GetOptionCheckRect(LPRECT lpRect);
00078
00079 public:
00080     // Interface
00081     bool GetHideCommandDlg();
00082 };
00083
00085
00086 //{{AFX_INSERT_LOCATION}}
00087 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00088
00089 #endif // !defined(AFX_OPTIONALPROPERTYSHEET_H__F82DC8BB_73CD_4AEA_8635_1A0932F24C7D__INCLUDED_)
Generated on Sat Aug 7 22:43:00 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CTagParserConsole Member List

This is the complete list of members for CTagParserConsole, including all inherited members.

CItemListConsole() | CItemListConsole |
CTagParserConsole() | CTagParserConsole |
cvs_err(const char *txt, long len) | CItemListConsole | [virtual]
cvs_out(const char *txt, long len) | CItemListConsole | [virtual]
GetCvsErr() | CItemListConsole |
GetItemList() const | CItemListConsole |
GetLaunchRes() const | CItemListConsole |
m_cvsErr | CItemListConsole | [protected]
m_cvsOut | CItemListConsole | [protected]
m_itemList | CItemListConsole | [protected]
m_launchRes | CItemListConsole | [protected]
Parse(int launchRes) | CTagParserConsole | [virtual]
~CItemListConsole() | CItemListConsole | [virtual]
~CTagParserConsole() | CTagParserConsole | [virtual]

Generated on Sat Aug 7 22:56:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/GraphOptDlg.cpp Source File

common/GraphOptDlg.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Jerzy Kaczorowski <kaczoroj@hotmail.com> --- September 2001
00019  */
00020
00021 /*
00022  * GraphOptDlg.cpp --- graph options dialog
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #ifdef WIN32
00028 #include "wincvs.h"
00029 #include "MainFrm.h"
00030 #include "GraphView.h"
00031 #endif /* WIN32 */
00032
00033 #include "GraphOptDlg.h"
00034 #include "CvsPrefs.h"
00035
00036
00037 #ifdef _DEBUG
00038 #define new DEBUG_NEW
00039 #undef THIS_FILE
00040 static char THIS_FILE[] = __FILE__;
00041 #endif
00042
00044 // CGraphOptDlg dialog
00045
00046 #ifdef WIN32
00047
00048 CGraphOptDlg::CGraphOptDlg(CPersistentInt& selColor, CPersistentInt& shadowColor,
00049                            CPersistentInt& headerColor, CPersistentInt& tagColor, CPersistentInt& branchColor,
00050                            CPersistentInt& nodeColor, CPersistentInt& deadNodeColor, CPersistentInt& userStateNodeColor,
00051                            CPersistentInt& mergeColor, CWnd* pParent /*=NULL*/)
00052     : CHHelpDialog(CGraphOptDlg::IDD, pParent),
00053     m_selColor(selColor), m_shadowColor(shadowColor),
00054     m_headerColor(headerColor), m_tagColor(tagColor), m_branchColor(branchColor),
00055     m_nodeColor(nodeColor), m_deadNodeColor(deadNodeColor), m_userStateNodeColor(userStateNodeColor),
00056     m_mergeColor(mergeColor)
00057 {
00058     //{{AFX_DATA_INIT(CGraphOptDlg)
00059         // NOTE: the ClassWizard will add member initialization here
00060     //}}AFX_DATA_INIT
00061
00062     m_rgbShadow.SetColor((int)m_shadowColor);
00063     m_rgbSelection.SetColor((int)m_selColor);
00064     m_rgbState.SetColor((int)m_userStateNodeColor);
00065     m_rgbDead.SetColor((int)m_deadNodeColor);
00066     m_rgbNode.SetColor((int)m_nodeColor);
00067     m_rgbBranch.SetColor((int)m_branchColor);
00068     m_rgbTag.SetColor((int)m_tagColor);
00069     m_rgbHeader.SetColor((int)m_headerColor);
00070     m_rgbMerge.SetColor((int)m_mergeColor);
00071
00072     m_origSelColor = m_selColor;
00073     m_origShadowColor = m_shadowColor;
00074     m_origHeaderColor = m_headerColor;
00075     m_origTagColor = m_tagColor;
00076     m_origBranchColor = m_branchColor;
00077     m_origNodeColor = m_deadNodeColor;
00078     m_origDeadNodeColor = m_deadNodeColor;
00079     m_origUserStateNodeColor = m_userStateNodeColor;
00080     m_origMergeColor = m_mergeColor;
00081 }
00082
00083
00084 void CGraphOptDlg::DoDataExchange(CDataExchange* pDX)
00085 {
00086     CHHelpDialog::DoDataExchange(pDX);
00087     //{{AFX_DATA_MAP(CGraphOptDlg)
00088     DDX_Control(pDX, IDC_APPLY, m_apply);
00089     DDX_Control(pDX, IDC_RGB_SHADOW, m_rgbShadow);
00090     DDX_Control(pDX, IDC_RGB_SELECTION, m_rgbSelection);
00091     DDX_Control(pDX, IDC_RGB_STATE, m_rgbState);
00092     DDX_Control(pDX, IDC_RGB_DEAD, m_rgbDead);
00093     DDX_Control(pDX, IDC_RGB_NODE, m_rgbNode);
00094     DDX_Control(pDX, IDC_RGB_BRANCH, m_rgbBranch);
00095     DDX_Control(pDX, IDC_RGB_TAG, m_rgbTag);
00096     DDX_Control(pDX, IDC_RGB_HEADER, m_rgbHeader);
00097     DDX_Control(pDX, IDC_RGB_MERGE, m_rgbMerge);
00098     //}}AFX_DATA_MAP
00099 }
00100
00101
00102 BEGIN_MESSAGE_MAP(CGraphOptDlg, CHHelpDialog)
00103     //{{AFX_MSG_MAP(CGraphOptDlg)
00104     ON_BN_CLICKED(IDC_COLOR_HEADER, OnHeader)
00105     ON_BN_CLICKED(IDC_COLOR_TAG, OnTag)
00106     ON_BN_CLICKED(IDC_COLOR_BRANCH, OnBranch)
00107     ON_BN_CLICKED(IDC_COLOR_NODE, OnNode)
00108     ON_BN_CLICKED(IDC_COLOR_DEAD, OnDead)
00109     ON_BN_CLICKED(IDC_COLOR_STATE, OnState)
00110     ON_BN_CLICKED(IDC_COLOR_SELECTION, OnSelection)
00111     ON_BN_CLICKED(IDC_COLOR_SHADOW, OnShadow)
00112     ON_BN_CLICKED(IDC_RESET_COLORS, OnReset)
00113     ON_BN_CLICKED(IDC_COLOR_MERGE, OnMerge)
00114     ON_BN_CLICKED(IDHELP, OnHelp)
00115     ON_BN_CLICKED(IDC_APPLY, OnApplyNow)
00116     //}}AFX_MSG_MAP
00117 END_MESSAGE_MAP()
00118
00120 // CGraphOptDlg message handlers
00121
00122 void CGraphOptDlg::InitHelpID()
00123 {
00124     SetCtrlHelpID(IDC_COLOR_HEADER,     IDH_IDC_COLOR_HEADER);
00125     SetCtrlHelpID(IDC_COLOR_TAG,        IDH_IDC_COLOR_TAG);
00126     SetCtrlHelpID(IDC_COLOR_BRANCH,     IDH_IDC_COLOR_BRANCH);
00127     SetCtrlHelpID(IDC_COLOR_NODE,       IDH_IDC_COLOR_NODE);
00128     SetCtrlHelpID(IDC_COLOR_DEAD,       IDH_IDC_COLOR_DEAD);
00129     SetCtrlHelpID(IDC_COLOR_STATE,      IDH_IDC_COLOR_STATE);
00130     SetCtrlHelpID(IDC_COLOR_SELECTION,  IDH_IDC_COLOR_SELECTION);
00131     SetCtrlHelpID(IDC_COLOR_SHADOW,     IDH_IDC_COLOR_SHADOW);
00132     SetCtrlHelpID(IDC_COLOR_MERGE,      IDH_IDC_COLOR_MERGE);
00133     SetCtrlHelpID(IDC_RGB_HEADER,       IDH_IDC_RGB_HEADER);
00134     SetCtrlHelpID(IDC_RGB_TAG,          IDH_IDC_RGB_TAG);
00135     SetCtrlHelpID(IDC_RGB_BRANCH,       IDH_IDC_RGB_BRANCH);
00136     SetCtrlHelpID(IDC_RGB_NODE,         IDH_IDC_RGB_NODE);
00137     SetCtrlHelpID(IDC_RGB_DEAD,         IDH_IDC_RGB_DEAD);
00138     SetCtrlHelpID(IDC_RGB_STATE,        IDH_IDC_RGB_STATE);
00139     SetCtrlHelpID(IDC_RGB_SELECTION,    IDH_IDC_RGB_SELECTION);
00140     SetCtrlHelpID(IDC_RGB_SHADOW,       IDH_IDC_RGB_SHADOW);
00141     SetCtrlHelpID(IDC_RGB_MERGE,        IDH_IDC_RGB_MERGE);
00142     SetCtrlHelpID(IDC_RESET_COLORS,     IDH_IDC_RESET_COLORS);
00143     SetCtrlHelpID(IDC_APPLY,            IDH_IDC_APPLY);
00144 }
00145
00147 void CGraphOptDlg::OnHelp()
00148 {
00149     ShowHelp();
00150 }
00151
00155 void CGraphOptDlg::GetAllColors()
00156 {
00157     m_shadowColor = (int)m_rgbShadow.GetColor();
00158     m_selColor = (int)m_rgbSelection.GetColor();
00159     m_userStateNodeColor = (int)m_rgbState.GetColor();
00160     m_deadNodeColor = (int)m_rgbDead.GetColor();
00161     m_nodeColor = (int)m_rgbNode.GetColor();
00162     m_branchColor = (int)m_rgbBranch.GetColor();
00163     m_tagColor = (int)m_rgbTag.GetColor();
00164     m_headerColor = (int)m_rgbHeader.GetColor();
00165     m_mergeColor = (int)m_rgbMerge.GetColor();
00166 }
00167
00169 void CGraphOptDlg::OnOK()
00170 {
00171     GetAllColors();
00172
00173     CHHelpDialog::OnOK();
00174 }
00175
00177 void CGraphOptDlg::OnApplyNow()
00178 {
00179     GetAllColors();
00180
00181     CWincvsApp* pApp = (CWincvsApp*)AfxGetApp();
00182     if( pApp )
00183     {
00184         pApp->UpdateAllDocsView();
00185     }
00186
00187     m_apply.EnableWindow(FALSE);
00188 }
00189
00191 void CGraphOptDlg::OnCancel()
00192 {
00193     m_selColor = m_origSelColor;
00194     m_shadowColor = m_origShadowColor;
00195     m_headerColor = m_origHeaderColor;
00196     m_tagColor = m_origTagColor;
00197     m_branchColor = m_origBranchColor;
00198     m_deadNodeColor = m_origNodeColor;
00199     m_deadNodeColor = m_origDeadNodeColor;
00200     m_userStateNodeColor = m_origUserStateNodeColor;
00201     m_mergeColor = m_origMergeColor;
00202
00203     CHHelpDialog::OnCancel();
00204 }
00205
00210 void CGraphOptDlg::PromptForColor(CColorStatic& colorStatic)
00211 {
00212     CColorDialog colorDialog(colorStatic.GetColor());
00213     if( colorDialog.DoModal() == IDOK )
00214     {
00215         if( colorDialog.GetColor() != colorStatic.GetColor() )
00216         {
00217             colorStatic.SetColor(colorDialog.GetColor());
00218             m_apply.EnableWindow();
00219         }
00220     }
00221 }
00222
00224 void CGraphOptDlg::OnHeader()
00225 {
00226     PromptForColor(m_rgbHeader);
00227 }
00228
00230 void CGraphOptDlg::OnTag()
00231 {
00232     PromptForColor(m_rgbTag);
00233 }
00234
00236 void CGraphOptDlg::OnBranch()
00237 {
00238     PromptForColor(m_rgbBranch);
00239 }
00240
00242 void CGraphOptDlg::OnNode()
00243 {
00244     PromptForColor(m_rgbNode);
00245 }
00246
00248 void CGraphOptDlg::OnDead()
00249 {
00250     PromptForColor(m_rgbDead);
00251 }
00252
00254 void CGraphOptDlg::OnState()
00255 {
00256     PromptForColor(m_rgbState);
00257 }
00258
00260 void CGraphOptDlg::OnSelection()
00261 {
00262     PromptForColor(m_rgbSelection);
00263 }
00264
00266 void CGraphOptDlg::OnShadow()
00267 {
00268     PromptForColor(m_rgbShadow);
00269 }
00270
00272 void CGraphOptDlg::OnMerge()
00273 {
00274     PromptForColor(m_rgbMerge);
00275 }
00276
00277
00279 void CGraphOptDlg::OnReset()
00280 {
00281     m_rgbShadow.SetColor(RGB_DEF_SHADOW);
00282     m_rgbSelection.SetColor(RGB_DEF_SEL);
00283     m_rgbState.SetColor(RGB_DEF_USERSTATENODE);
00284     m_rgbDead.SetColor(RGB_DEF_DEADNODE);
00285     m_rgbNode.SetColor(RGB_DEF_NODE);
00286     m_rgbBranch.SetColor(RGB_DEF_BRANCH);
00287     m_rgbTag.SetColor(RGB_DEF_TAG);
00288     m_rgbHeader.SetColor(RGB_DEF_HEADER);
00289     m_rgbMerge.SetColor(RGB_DEF_MERGE);
00290
00291     m_apply.EnableWindow();
00292 }
00293
00294 #endif /* WIN32 */
00295
00297 bool CompatGetGraphOptions(CPersistentInt& selColor, CPersistentInt& shadowColor,
00298                            CPersistentInt& headerColor, CPersistentInt& tagColor, CPersistentInt& branchColor,
00299                            CPersistentInt& nodeColor, CPersistentInt& deadNodeColor, CPersistentInt& userStateNodeColor,
00300                            CPersistentInt& mergeColor)
00301 {
00302     bool userHitOK = false;
00303
00304 #ifdef WIN32
00305     CGraphOptDlg graphOptDlg(selColor, shadowColor,
00306         headerColor, tagColor, branchColor,
00307         nodeColor, deadNodeColor, userStateNodeColor, mergeColor);
00308
00309     if( graphOptDlg.DoModal() == IDOK )
00310     {
00311         userHitOK = true;
00312     }
00313 #endif /* WIN32 */
00314 #ifdef qMacCvsPP
00315 #endif /* qMacCvsPP */
00316 #if qUnix
00317 #endif // qUnix
00318
00319     return userHitOK;
00320 }
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJCaption.h Source File

WinCvs/CJLib/Include/CJCaption.h

Go to the documentation of this file.
00001 // CJCaption.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2002/06/15 17:49:37 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/Include/CJCaption.h $
00011  *
00012  * $History: CJCaption.h $
00013  *
00014  * *****************  Version 15  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:41p
00016  * Updated in $/CodeJock/Include
00017  * Updated OnEraseBkgnd(...) and OnPaint() for flicker free drawing.
00018  *
00019  * Fixed bug when popup window is closed, the mainframe resizes and then
00020  * the popup is reopened and pushpin is pressed, the child will not be
00021  * correctly sized and positioned. Added changes to handle flicker free
00022  * drawing of the control window.
00023  *
00024  * Modified resource include for static builds.
00025  *
00026  * Fixed the bug where the icon on the right hand side of the bar doesn't
00027  * clip when you resize the bar to almost nothing. Added method
00028  * SetTextStyle(...) to set the CDC:: DrawText(...) text styles to be user
00029  * defined. Thanks to Adrian for help with this.
00030  *
00031  * Fixed potential resource and memory leak problems.
00032  *
00033  * Fixed small bug with UNICODE display placing unwanted character at the
00034  * end of the string.
00035  *
00036  * Made class methods virtual for inheritance purposes.
00037  *
00038  * *****************  Version 14  *****************
00039  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00040  * Updated in $/CodeJockey/Include
00041  * Updated copyright and contact information.
00042  *
00043  * *****************  Version 13  *****************
00044  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00045  * Updated in $/CodeJockey/Include
00046  *
00047  * *****************  Version 12  *****************
00048  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00049  * Updated in $/CodeJockey/Include
00050  *
00051  * *****************  Version 11  *****************
00052  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00053  * Updated in $/CodeJockey/Include
00054  *
00055  * *****************  Version 10  *****************
00056  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00057  * Updated in $/CodeJockey/Include
00058  *
00059  * *****************  Version 9  *****************
00060  * User: Kirk Stowell Date: 7/24/99    Time: 9:32p
00061  * Updated in $/CodeJockey/Include
00062  *
00063  * *****************  Version 5  *****************
00064  * User: Kirk Stowell Date: 5/17/99    Time: 8:13p
00065  * Updated in $/CodeJockey/Include
00066  * Fixed painting bug with border, cleaned up inline methods.
00067  *
00068  * *****************  Version 4  *****************
00069  * User: Kirk Stowell Date: 4/03/99    Time: 12:36p
00070  * Updated in $/Code Jockey/Include
00071  * Added comments and cleaned up code.
00072  *
00073  * *****************  Version 3  *****************
00074  * User: Kirk Stowell Date: 3/03/99    Time: 12:27p
00075  * Updated in $/CodeJockey/Include
00076  * Added further functionality to class so that you can define text size,
00077  * text color, border size, border and background color. Basically to
00078  * create a look similar to Outlook's Captions.
00079  *
00080  * *****************  Version 2  *****************
00081  * User: Kirk Stowell Date: 2/01/99    Time: 12:28p
00082  * Updated in $/CodeJockey/Include
00083  * Made some cosmetic fixes.
00084  *
00085  * *****************  Version 1  *****************
00086  * User: Kirk Stowell Date: 1/16/99    Time: 12:27p
00087  * Created in $/CodeJockey/Include
00088  * Initial first release.
00089  *
00090  ***************************************************************************/
00092
00093 #ifndef __CJCAPTION_H__
00094 #define __CJCAPTION_H__
00095
00096 #if _MSC_VER >= 1000
00097 #pragma once
00098 #endif // _MSC_VER >= 1000
00099
00100 #include "CJFlatButton.h"
00101
00102 // CCJCaptionButton is a CCJFlatButton derived class which is used by
00103 // the CCJCaption class to activate a CCJCaptionPopupWnd window.
00104 class _CJX_EXT_CLASS CCJCaptionButton : public CCJFlatButton
00105 {
00106 public:
00107
00108     virtual BOOL SetButtonStyle(CFont* pFont, COLORREF clrBackground, COLORREF clrFont);
00109
00110 // Overrides
00111     // ClassWizard generated virtual function overrides
00112     //{{AFX_VIRTUAL(CCJCaptionButton)
00113     virtual void DrawButtonText(CDC* pDC, UINT nState, CRect& rcItem);
00114     //}}AFX_VIRTUAL
00115
00116 // Generated message map functions
00117 protected:
00118     //{{AFX_MSG(CCJCaptionButton)
00119     afx_msg void OnSysColorChange();
00120     //}}AFX_MSG
00121
00122     DECLARE_MESSAGE_MAP()
00123 };
00124
00125 class CCJCaptionPopupWnd;
00126
00127 #define WS_EX_FLATEDGE  0x01
00128
00129 // CCJCaption is a CStatic derived class which is simular to the
00130 // caption or info bars that are seen in Microsoft Outlook
00131 class _CJX_EXT_CLASS CCJCaption : public CStatic
00132 {
00133 public:
00134
00135     // Default constructor.
00136     //
00137     CCJCaption();
00138
00139     // Virtual destructor
00140     //
00141     virtual ~CCJCaption();
00142
00143 protected:
00144
00145     COLORREF            m_clrBtnHilite; // set to system color COLOR_BTNHILIGHT
00146     COLORREF            m_clrBtnShadow; // set to system color COLOR_BTNSHADOW
00147     COLORREF            m_clrBtnFace;   // set to system color COLOR_BTNFACE
00148     COLORREF            m_clrBorder;    // user defined border color
00149     COLORREF            m_clrBackgnd;   // user defined background color
00150     COLORREF            m_clrFont;      // user defined font color
00151     int                 m_nBorder;      // size in pixels for the caption border
00152     CFont*              m_pFont;        // user defined font pointer, default value NULL
00153     CFont               m_Font;         // default font created by control if m_pFont is NULL
00154     HICON               m_hIcon;        // user defined icon handle, default value NULL
00155     CString             m_strWindText;  // text that will be displayed in caption.
00156     int                 m_cx;           // icon width.
00157     int                 m_cy;           // icon height.
00158     int                 m_nOffset;
00159
00160     CWnd*               m_pChildWnd;
00161     CWnd*               m_pNotifyWnd;
00162     CCJCaptionButton    m_CaptionButton;
00163     CCJCaptionPopupWnd* m_pWndPopDown;
00164     CRect               m_rcChild;
00165     DWORD               m_dwExStyle;
00166     CRect               m_rcClient;
00167     DWORD               m_dwTextStyle;
00168
00169 public:
00170
00171     // Call this member function to set the caption bar border, background and
00172     // font colors.
00173     //
00174     virtual void SetCaptionColors(
00175         // A COLORREF value for the new border color.
00176         COLORREF clrBorder,
00177         // A COLORREF value for the new background color.
00178         COLORREF clrBackground,
00179         // A COLORREF value for the new font color.
00180         COLORREF clrFont);
00181
00182     // Call this function to modify the caption style. You can use this member function
00183     // to set the border size that is drawn around the caption banner, the font that the
00184     // caption will use, the caption text and icon to be displayed.
00185     //
00186     virtual void ModifyCaptionStyle(
00187         // Specifies size in pixels of the banner border.
00188         int nBorderSize,
00189         // Specifies the new caption font.
00190         CFont* pFont=NULL,
00191         // Address of a null-terminated string specifying the new caption text.
00192         LPCTSTR lpszWindText=NULL,
00193         // Handle of the icon to be drawn in the caption.
00194         HICON hIcon=NULL);
00195
00196     virtual void SetChildWindow(CWnd* pChild, CWnd* pNotifyWnd);
00197     virtual void KillChildWindow();
00198
00199     virtual void DrawCaptionBack(CDC* pDC, CRect& rcItem);
00200     virtual void DrawCaptionText(CDC* pDC, CRect& rcItem);
00201     virtual void DrawCaptionIcon(CDC* pDC, CRect& rcItem);
00202
00203 public:
00204     virtual void UpdateFont();
00205     virtual void UpdateCaption(LPCTSTR lpszWindowText, HICON hIcon);
00206     virtual void UpdateCaptionBack(CDC* pDC, CRect& rcItem);
00207     virtual void UpdateCaptionText(CDC* pDC, CRect& rcItem);
00208     virtual void SetTextStyle(DWORD dwStyle);
00209
00210 // Overrides
00211     // ClassWizard generated virtual function overrides
00212     //{{AFX_VIRTUAL(CCJCaption)
00213     public:
00214     virtual BOOL Create(CWnd* pParentWnd, LPCTSTR lpszWindowName, DWORD dwExStyle=WS_EX_FLATEDGE, DWORD dwStyle=WS_VISIBLE|SS_CENTER|SS_CENTERIMAGE, const CRect& rect=CRect(0,0,0,0), UINT nID = 0xffff);
00215     //}}AFX_VIRTUAL
00216
00217     // Generated message map functions
00218
00219 protected:
00220     //{{AFX_MSG(CCJCaption)
00221     afx_msg void OnPaint();
00222     afx_msg void OnSysColorChange();
00223     afx_msg void OnSize(UINT nType, int cx, int cy);
00224     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00225     //}}AFX_MSG
00226     afx_msg void OnCaptButton();
00227     afx_msg LRESULT OnPushPinButton(UINT lParam, LONG wParam);
00228     afx_msg LRESULT OnPushPinCancel(UINT lParam, LONG wParam);
00229
00230     DECLARE_MESSAGE_MAP()
00231 };
00232
00234 //  Inline Functions
00236
00237 _CJXLIB_INLINE void CCJCaption::SetTextStyle(DWORD dwStyle)
00238     { m_dwTextStyle = dwStyle; }
00239
00240 _CJXLIB_INLINE void CCJCaption::SetCaptionColors(COLORREF clrBorder, COLORREF clrBackground, COLORREF clrFont)
00241     { ASSERT(::IsWindow(m_hWnd)); m_clrBorder = clrBorder; m_clrBackgnd = clrBackground; m_clrFont = clrFont; }
00242
00244
00245 //{{AFX_INSERT_LOCATION}}
00246 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00247
00248 #endif // __CJCAPTION_H__
00249
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TclGlue.mac.cpp Source File

common/TclGlue.mac.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2001
00019  */
00020
00021 /*
00022  * TclGlue.mac.cpp --- glue to the TCL language specific to mac/carbon
00023  */
00024
00025 #include "stdafx.h"
00026
00027 #if qCarbon
00028
00029 #ifndef NEW
00030 #define NEW new
00031 #endif
00032
00033 #include "TclGlue.mac.h"
00034 #include <CFBundle.h>
00035 #include <stdlib.h>
00036 #include <string.h>
00037
00038 #include "AppConsole.h"
00039 #include <mach-o/dyld.h>
00040
00041 // struct to keep necessary logistic data for maintaining a connection
00042 // to a shared library on various implementations
00043 //
00044 struct _CompatConnectID
00045 {
00046     CFURLRef          bundleURL;
00047     CFBundleRef     myBundle;
00048     const struct mach_header *      dyld_header;
00049
00050   _CompatConnectID() :
00051       bundleURL(NULL),
00052       myBundle(NULL)
00053      ,dyld_header(NULL)
00054   {
00055   }
00056 };
00057
00058 int CarbonCompatLoadLibrary(CompatConnectID * connID, const char *name_dll)
00059 {
00060     if(connID == 0L)
00061         return 0;
00062
00063     *connID = 0L;
00064
00065     _CompatConnectID *c = new _CompatConnectID;
00066
00067     *connID = (CompatConnectID)c;
00068
00069     if(c == 0L)
00070         return 0;
00071
00072     CFStringRef s = CFStringCreateWithCString(0L, name_dll, kCFStringEncodingUTF8);
00073     if(s == 0L)
00074         goto fail;
00075
00076     c->bundleURL    = CFURLCreateWithFileSystemPath(0L, s, kCFURLPOSIXPathStyle, false );
00077     if(c->bundleURL == 0L)
00078         goto fail;
00079
00080     c->myBundle = CFBundleCreate(0L, c->bundleURL );
00081     if(c->myBundle == 0L)
00082     {
00083     // check whether file exists
00084     //
00085     FSRef   libFile;
00086     FSCatalogInfo   libFileInfo;
00087     if ( CFURLGetFSRef(c->bundleURL, &libFile)  &&
00088          FSGetCatalogInfo(&libFile, kFSCatInfoNodeFlags, &libFileInfo, NULL, NULL, NULL) == noErr  &&
00089          (libFileInfo.nodeFlags & kFSNodeIsDirectoryMask) == 0 )
00090     {
00091       CFRelease(c->bundleURL);
00092       c->bundleURL = 0L;
00093
00094       c->dyld_header = NSAddImage(name_dll, NSADDIMAGE_OPTION_NONE);
00095       if ( c->dyld_header == NULL )
00096       {
00097             cvs_err("Error loading %s\n", name_dll);
00098             goto fail;
00099       }
00100     }
00101     else goto fail; // not a file or file not found
00102   }
00103   else
00104   {
00105         if(!CFBundleLoadExecutable( c->myBundle ))
00106             goto fail;
00107   }
00108
00109     CFRelease( s );
00110     return 1;
00111 fail:
00112     if(s != 0L)
00113         CFRelease( s );
00114     if(c != 0L)
00115     {
00116         if(c->bundleURL != 0L)
00117           CFRelease( c->bundleURL );
00118         if(c->myBundle != 0L)
00119           CFRelease( c->myBundle );
00120         *connID = 0L;
00121         delete c;
00122     }
00123     return 0;
00124 }
00125
00126 int CarbonCompatCloseLibrary(CompatConnectID * connID)
00127 {
00128     if(connID == 0L)
00129         return 0;
00130
00131     _CompatConnectID *c = (_CompatConnectID *)*connID;
00132     if(c != 0L)
00133     {
00134         if ( c->dyld_header )
00135         {
00136 // %%% ??? how to unload an image ???
00137         }
00138         else
00139         {
00140             CFBundleUnloadExecutable( c->myBundle );
00141             CFRelease( c->bundleURL );
00142             CFRelease( c->myBundle );
00143         }
00144         delete c;
00145     }
00146     *connID = 0L;
00147
00148     return 1;
00149 }
00150
00151 void *_CarbonCompatCallLibrary(CompatConnectID connID, const char *name_func)
00152 {
00153     _CompatConnectID *c = (_CompatConnectID *)connID;
00154
00155   if ( c->dyld_header )
00156   {
00157     char funcname[258];
00158
00159     sprintf(funcname, "_%.200s", name_func);
00160     if (NSIsSymbolNameDefinedInImage(c->dyld_header, funcname)) {
00161       NSSymbol theSym;
00162       void* p;
00163         theSym = NSLookupSymbolInImage(c->dyld_header, funcname, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND);
00164         p = NSAddressOfSymbol(theSym);
00165 #if qCvsDebug
00166       if ( p == NULL ) cvs_err("_CarbonCompatCallLibrary(dyld): symbol '%s' not found!\n", name_func);
00167 #endif
00168         return p;
00169     }
00170
00171 #if qCvsDebug
00172     cvs_err("_CarbonCompatCallLibrary(dyld): symbol '%s' not found!\n", name_func);
00173 #endif
00174     return 0L;
00175   }
00176   else
00177     {
00178         CFStringRef s = CFStringCreateWithCString(0L, name_func, kCFStringEncodingMacRoman);
00179         if(s == 0L)
00180             return 0L;
00181
00182         void *ptr = CFBundleGetFunctionPointerForName(c->myBundle, s);
00183         CFRelease( s );
00184
00185 #if qCvsDebug
00186     if ( ptr == NULL ) cvs_err("_CarbonCompatCallLibrary(CFBundle): symbol '%s' not found!\n", name_func);
00187 #endif
00188       return ptr;
00189   }
00190
00191 #if qCvsDebug
00192   cvs_err("_CarbonCompatCallLibrary: symbol '%s' not found!\n", name_func);
00193 #endif
00194
00195     return 0L;
00196 }
00197
00198 #define CompatLoadLibrary CarbonCompatLoadLibrary
00199 #define CompatCloseLibrary CarbonCompatCloseLibrary
00200 #define _CompatCallLibrary _CarbonCompatCallLibrary
00201
00202 #if 0 // TARGET_RT_MAC_MACHO
00203 typedef void *dl_funcptr;
00204
00205 static dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname, const char *pathname)
00206 {
00207     dl_funcptr p = NULL;
00208     char funcname[258];
00209
00210     sprintf(funcname, "_init%.200s", shortname);
00211
00212     /* This is also NeXT-specific. However, frameworks (the new style
00213     of shared library) and rld() can't be used in the same program;
00214     instead, you have to use dyld, which is mostly unimplemented. */
00215     {
00216         NSObjectFileImageReturnCode rc;
00217         NSObjectFileImage image;
00218         NSModule newModule;
00219         NSSymbol theSym;
00220         const char *errString;
00221
00222         if (NSIsSymbolNameDefined(funcname)) {
00223             theSym = NSLookupAndBindSymbol(funcname);
00224             p = (dl_funcptr)NSAddressOfSymbol(theSym);
00225             return p;
00226         }
00227         rc = NSCreateObjectFileImageFromFile(pathname, &image);
00228         switch(rc) {
00229             default:
00230             case NSObjectFileImageFailure:
00231             case NSObjectFileImageFormat:
00232             /* for these a message is printed on stderr by dyld */
00233             errString = "Can't create object file image";
00234             break;
00235             case NSObjectFileImageSuccess:
00236             errString = NULL;
00237             break;
00238             case NSObjectFileImageInappropriateFile:
00239             errString = "Inappropriate file type for dynamic loading";
00240             break;
00241             case NSObjectFileImageArch:
00242             errString = "Wrong CPU type in object file";
00243             break;
00244             case NSObjectFileImageAccess:
00245             errString = "Can't read object file (no access)";
00246             break;
00247         }
00248         if (errString == NULL) {
00249             newModule = NSLinkModule(image, pathname,
00250                 NSLINKMODULE_OPTION_BINDNOW|NSLINKMODULE_OPTION_RETURN_ON_ERROR);
00251             if (!newModule)
00252                 errString = "Failure linking new module";
00253         }
00254         if (errString != NULL) {
00255             cvs_err("%s\n", errString);
00256             return NULL;
00257         }
00258         if (!NSIsSymbolNameDefined(funcname)) {
00259             /* UnlinkModule() isn't implemented in current versions, but calling it does no harm */
00260             NSUnLinkModule(newModule, FALSE);
00261             cvs_err("Loaded module does not contain symbol %.200s", funcname);
00262             return NULL;
00263         }
00264         theSym = NSLookupAndBindSymbol(funcname);
00265         p = (dl_funcptr)NSAddressOfSymbol(theSym);
00266     }
00267
00268     return p;
00269 }
00270
00271 void *_tcl_cfm_macho(void *func)
00272 {
00273   return func;
00274 }
00275
00276 int CarbonCompatLoadLibrary(CompatConnectID * connID, const char *name_dll)
00277 {
00278     NSObjectFileImageReturnCode rc;
00279     NSObjectFileImage image;
00280     NSModule newModule;
00281     NSSymbol theSym;
00282     const char *errString;
00283
00284     *connID = 0L;
00285
00286     rc = NSCreateObjectFileImageFromFile(name_dll, &image);
00287     switch(rc) {
00288         default:
00289         case NSObjectFileImageFailure:
00290         case NSObjectFileImageFormat:
00291         /* for these a message is printed on stderr by dyld */
00292         errString = "Can't create object file image";
00293         break;
00294         case NSObjectFileImageSuccess:
00295         errString = NULL;
00296         break;
00297         case NSObjectFileImageInappropriateFile:
00298         errString = "Inappropriate file type for dynamic loading";
00299         break;
00300         case NSObjectFileImageArch:
00301         errString = "Wrong CPU type in object file";
00302         break;
00303         case NSObjectFileImageAccess:
00304         errString = "Can't read object file (no access)";
00305         break;
00306     }
00307     if (errString == NULL) {
00308         newModule = NSLinkModule(image, name_dll,
00309             NSLINKMODULE_OPTION_BINDNOW|NSLINKMODULE_OPTION_RETURN_ON_ERROR);
00310         if (!newModule)
00311             errString = "Failure linking new module";
00312     }
00313     if (errString != NULL) {
00314         cvs_err(errString);
00315         return 0;
00316     }
00317
00318     *connID = (CompatConnectID)newModule;
00319
00320     return 1;
00321 }
00322
00323 int CarbonCompatCloseLibrary(CompatConnectID * connID)
00324 {
00325     if(connID == 0L || *connID == 0L)
00326         return 0;
00327
00328     NSUnLinkModule((NSModule)*connID, FALSE);
00329     *connID = 0L;
00330
00331     return 1;
00332 }
00333
00334 void *_CarbonCompatCallLibrary(CompatConnectID connID, const char *name_func)
00335 {
00336     dl_funcptr p = NULL;
00337     char funcname[258];
00338
00339     sprintf(funcname, "_init%.200s", name_func);
00340
00341     /* This is also NeXT-specific. However, frameworks (the new style
00342     of shared library) and rld() can't be used in the same program;
00343     instead, you have to use dyld, which is mostly unimplemented. */
00344     NSSymbol theSym;
00345
00346     if (NSIsSymbolNameDefined(funcname)) {
00347         theSym = NSLookupAndBindSymbol(funcname);
00348         p = (dl_funcptr)NSAddressOfSymbol(theSym);
00349         return p;
00350     }
00351
00352     return 0L;
00353 }
00354
00355 #endif // TARGET_RT_MAC_MACHO
00356
00357 #endif // qCarbon
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJMaskEdit.h Source File

WinCvs/CJLib/Include/CJMaskEdit.h

Go to the documentation of this file.
00001 // CJMaskEdit.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the article "A masked edit control (2)" by Jeremy Davis [jmd@jvf.co.uk]
00006 // http://www.codeguru.com/editctrl/masked_edit2.shtml
00007 //
00009 /****************************************************************************
00010  *
00011  * $Date: 1999/11/30 21:45:51 $
00012  * $Revision: 1.1.1.3 $
00013  * $Archive: /CodeJock/Include/CJMaskEdit.h $
00014  *
00015  * $History: CJMaskEdit.h $
00016  *
00017  * *****************  Version 7  *****************
00018  * User: Kirk Stowell Date: 10/30/99   Time: 2:21p
00019  * Updated in $/CodeJock/Include
00020  * Overrode OnPaint() and  OnEraseBkgnd(...) for flicker free drawing.
00021  *
00022  * *****************  Version 6  *****************
00023  * User: Kirk Stowell Date: 10/26/99   Time: 10:44p
00024  * Updated in $/CodeJock/Include
00025  * Made class methods virtual for inheritance purposes.
00026  *
00027  * *****************  Version 5  *****************
00028  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00029  * Updated in $/CodeJockey/Include
00030  * Updated copyright and contact information.
00031  *
00032  * *****************  Version 4  *****************
00033  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00034  * Updated in $/CodeJockey/Include
00035  *
00036  * *****************  Version 3  *****************
00037  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00038  * Updated in $/CodeJockey/Include
00039  *
00040  * *****************  Version 2  *****************
00041  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00042  * Updated in $/CodeJockey/Include
00043  *
00044  * *****************  Version 1  *****************
00045  * User: Kirk Stowell Date: 7/19/99    Time: 12:35a
00046  * Created in $/CodeJockey/Include
00047  * Initial creation and addition to library.
00048  *
00049  ***************************************************************************/
00051
00052 #ifndef __CJMASKEDIT_H__
00053 #define __CJMASKEDIT_H__
00054
00055 #if _MSC_VER >= 1000
00056 #pragma once
00057 #endif // _MSC_VER >= 1000
00058
00059 // CCJMaskEdit is a CEdit derived class which allows text masking to be
00060 // applied to the control to format it for special editing restrictions.
00061 class _CJX_EXT_CLASS CCJMaskEdit : public CEdit
00062 {
00063     DECLARE_DYNAMIC(CCJMaskEdit)
00064
00065 // Construction
00066 public:
00067     CCJMaskEdit();
00068
00069 // Attributes
00070 public:
00071
00072     bool        m_bUseMask;             // true to use edit mask.
00073     bool        m_bMaskKeyInProgress;   // true when
00074     CString     m_strWindowText;        // buffer that holds the actual edit text.
00075     CString     m_strMask;              // buffer that holds the actual edit mask value.
00076     CString     m_strLiteral;
00077     CString     m_strValid;
00078     CString     m_strMaskLiteral;
00079     CFont       m_Font;                 // font used by masked edit control.
00080
00081 // Operations
00082 public:
00083
00084     virtual void SetEditMask(LPCTSTR lpszMask, LPCTSTR lpszLiteral, LPCTSTR lpszWindowText);
00085     virtual void SendChar(UINT nChar);
00086     virtual bool CheckChar(UINT nChar);
00087
00088 // Overrides
00089     // ClassWizard generated virtual function overrides
00090     //{{AFX_VIRTUAL(CCJMaskEdit)
00091     //}}AFX_VIRTUAL
00092
00093     virtual bool ProcessMask(UINT nChar, int nEndPos);
00094
00095 // Implementation
00096 public:
00097     virtual void UpdateFont();
00098     virtual ~CCJMaskEdit();
00099
00100     // Generated message map functions
00101 protected:
00102     //{{AFX_MSG(CCJMaskEdit)
00103     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00104     afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
00105     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00106     afx_msg void OnPaint();
00107     //}}AFX_MSG
00108
00109     DECLARE_MESSAGE_MAP()
00110 };
00111
00112 // CCJDateEdit is a CCJMaskEdit derived class which is specifically
00113 // geared toward editing date fields.
00114 class _CJX_EXT_CLASS CCJDateEdit : public CCJMaskEdit
00115 {
00116     DECLARE_DYNAMIC(CCJDateEdit)
00117
00118 // Construction
00119 public:
00120     CCJDateEdit();
00121
00122     virtual void SetDateTime(COleDateTime& dt);
00123     virtual void SetDateTime(CString strDate);
00124     virtual COleDateTime GetDateTime();
00125     virtual CString GetWindowDateTime();
00126     virtual COleDateTime ReadOleDateTime(LPCTSTR lpszData);
00127
00128     virtual bool ProcessMask(UINT nChar, int nEndPos);
00129     virtual void FormatOleDateTime(CString& strData, COleDateTime dt);
00130 };
00131
00132 // CCJTimeEdit is a CCJDateEdit derived class which is specifically geared
00133 // toward editing time fields.
00134 class _CJX_EXT_CLASS CCJTimeEdit : public CCJDateEdit
00135 {
00136     DECLARE_DYNAMIC(CCJTimeEdit)
00137
00138 // Construction
00139 public:
00140     CCJTimeEdit();
00141
00142     CString     m_strHours;
00143     CString     m_strMins;
00144
00145     virtual void SetHours(int nHours);
00146     virtual void SetMins(int nMins);
00147
00148     virtual bool ProcessMask(UINT nChar, int nEndPos);
00149     virtual void FormatOleDateTime(CString& strData, COleDateTime dt);
00150 };
00151
00153 // DDX for date mask control
00154
00155 void AFXAPI DDX_OleDateTime(CDataExchange* pDX, int nIDC, CCJDateEdit& rControl, COleDateTime& rDateTime);
00156
00158
00159 //{{AFX_INSERT_LOCATION}}
00160 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00161
00162 #endif // __CJMASKEDIT_H__
00163
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/BrowseViewModel.h Source File

common/BrowseViewModel.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 #ifndef __MODEL__H__
00018 #define __MODEL__H__
00019
00020 #include "ustr.h"
00021 #include <vector>
00022 #include <string>
00023 #include <map>
00024
00025
00026 #if qMacPP
00027 #define CObject LPane
00028 #endif
00029
00030 #ifdef qUnix
00031 #define CObject void
00032 #endif
00033
00034 #define FILTER_TOKEN_SEPARATORS " \t;"
00035
00036 // Forward references
00037 class EntnodeData;
00038 class KoColumnContext;
00039
00041 typedef void (*FNOBSERVER)(CObject*);
00042
00044 enum{
00045     kFilterNone         = 0x0000,
00047     kFilterChanged      = 0x0001,
00048     kFilterAdded        = 0x0002,
00049     kFilterRemoved      = 0x0004,
00050     kFilterConflicts    = 0x0010,
00052     kFilterMissing      = 0x0020,
00053     kFilterHideMissing  = 0x0040,
00054     kFilterUnknown      = 0x0100,
00055     kFilterHideUnknown  = 0x0200,
00057     // Combinations
00058     kFilterModified     = kFilterChanged | kFilterAdded | kFilterRemoved | kFilterConflicts
00059 };
00060
00061
00063 class NotificationManager
00064 {
00065 public:
00066     // Construction
00067     NotificationManager();
00068
00069 private:
00071     struct Node
00072     {
00073         CObject* observer;
00074         FNOBSERVER handler;
00076         Node();
00077         Node(CObject* o, FNOBSERVER h);
00078         Node(const Node& n);
00079         Node& operator=(const Node& n);
00080     };
00081
00082 private:
00083     // Data members
00084     std::vector<Node> m_nodes;
00086 public:
00087     // Interface
00088     void CheckIn(CObject* observer, FNOBSERVER handler);
00089     void CheckOut(CObject* observer);
00090     void NotifyAll();
00091 };
00092
00094 class KiFilterBase
00095 {
00096 public:
00097     // Interface
00098
00100     virtual void LoadSettings() = 0;
00101
00103     virtual void SaveSettings() = 0;
00104
00106     virtual NotificationManager* GetNotificationManager() = 0;
00107 };
00108
00110 class KiFilterModel : public KiFilterBase
00111 {
00112 public:
00113     // Interface
00114
00116     virtual bool IsMatch(const EntnodeData* data) const = 0;
00117
00119     virtual int GetFilters() const = 0;
00120 };
00121
00123 class KiRecursionModel : public KiFilterBase
00124 {
00125 public:
00126     // Interface
00127
00129     virtual bool IsShowRecursive() = 0;
00130 };
00131
00133 class KiIgnoreModel : public KiFilterBase
00134 {
00135 public:
00136     // Interface
00137
00139     virtual bool IsShowIgnored() = 0;
00140 };
00141
00143 class KoFilterMask
00144 {
00145 public:
00146     // Construction
00147
00148 private:
00149     // Data members
00150     std::string m_mask;
00151     std::vector<UStr> m_tokens;
00153 public:
00154     // Interface
00155     bool SetMask(const char* mask);
00156     bool IsMatch(const int type, const EntnodeData* data, const KoColumnContext* context) const;
00157     bool Empty() const;
00158 };
00159
00161 typedef std::map<int, KoFilterMask> FilterMaskContainer;
00162
00164 class KoFilterModel : public KiFilterModel
00165 {
00166 public:
00167     // Construction
00168     KoFilterModel();
00169     virtual ~KoFilterModel();
00170
00171 protected:
00172     // Data members
00173     int m_filters;
00175     bool m_filterMasksEnable;
00176     FilterMaskContainer m_filterMask;
00177     KoColumnContext* m_context;
00179     NotificationManager m_manager;
00181     // Methods
00182     void ToggleFilter(int filter);
00183     bool HasFilter(const int filter) const;
00184
00185 public:
00186     // Interface
00187     virtual void LoadSettings();
00188     virtual void SaveSettings();
00189     virtual NotificationManager* GetNotificationManager();
00190
00191     virtual bool IsMatch(const EntnodeData* data) const;
00192     virtual int GetFilters() const;
00193
00194     void ToggleFilterMasksEnable();
00195     bool IsFilterMasksEnable() const;
00196     bool HasFilterMasks() const;
00197
00198     bool IsDefaultMode() const;
00199
00200     void ClearAll();
00201     bool HasFilters() const;
00202     bool HasAnyModified() const;
00203
00204     bool SetMask(int type, const char* mask);
00205     void SetContext(const KoColumnContext* context);
00206
00207     void ToggleModified();
00208     bool IsModified() const;
00209
00210     void ToggleConflict();
00211     bool IsConflict() const;
00212
00213     void ToggleUnknown();
00214     bool IsUnknown() const;
00215
00216     void ToggleHideUnknown();
00217     bool IsHideUnknown() const;
00218
00219     void ToggleMissing();
00220     bool IsMissing() const;
00221
00222     void ToggleHideMissing();
00223     bool IsHideMissing() const;
00224
00225     void ToggleChanged();
00226     bool IsChanged() const;
00227
00228     void ToggleAdded();
00229     bool IsAdded() const;
00230
00231     void ToggleRemoved();
00232     bool IsRemoved() const;
00233 };
00234
00236 class KoRecursionModel : public KiRecursionModel
00237 {
00238 public:
00239     // Construction
00240     KoRecursionModel();
00241     virtual ~KoRecursionModel();
00242
00243 private:
00244     // Date members
00245     NotificationManager m_manager;
00246     bool m_isRecursive;
00248 public:
00249     // Interface
00250     virtual void LoadSettings();
00251     virtual void SaveSettings();
00252     virtual NotificationManager* GetNotificationManager();
00253
00254     virtual bool IsShowRecursive();
00255
00256     void ToggleRecursion();
00257 };
00258
00260 class KoIgnoreModel : public KiIgnoreModel
00261 {
00262 public:
00263     // Construction
00264     KoIgnoreModel();
00265     virtual ~KoIgnoreModel();
00266
00267 private:
00268     // Data members
00269     NotificationManager m_manager;
00270     bool m_isIgnore;
00272 public:
00273     // Interface
00274     virtual void LoadSettings();
00275     virtual void SaveSettings();
00276     virtual NotificationManager* GetNotificationManager();
00277
00278     virtual bool IsShowIgnored();
00279
00280     void ToggleIgnore();
00281 };
00282
00283 #endif
00284 // __MODEL__H__
Generated on Sat Aug 7 22:42:55 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/TagDlg.h Source File

common/TagDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- July 1998
00019  */
00020
00021 /*
00022  * TagDlg.h : the cvs tag dialog
00023  */
00024
00025 #if !defined(AFX_TAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_TAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "SmartComboBox.h"
00033 #include "CvsCommands.h"
00034
00035 #ifdef WIN32
00036 #   include "HHelpSupport.h"
00037 #endif
00038
00039 class MultiFiles;
00040
00041 bool CompatGetTag(const MultiFiles* mf, const kTagCmdType tagType,
00042                   bool& noRecurs, bool& movDelBranch,
00043                   bool& overwriteExisting,
00044                   CStr& tagName, bool& checkUnmod);
00045
00046 #ifdef WIN32
00047
00049 // CTag_MAIN dialog
00050
00051 class CTag_MAIN : public CHHelpPropertyPage
00052 {
00053     DECLARE_DYNAMIC(CTag_MAIN)
00054
00055 // Construction
00056 public:
00057     CTag_MAIN(const MultiFiles* mf, const kTagCmdType type,
00058         const char* sLastTag,
00059         bool noRecurs, bool movDelBranch,
00060         bool checkUnmod = false, bool overwriteExisting = false);
00061     ~CTag_MAIN();
00062
00063 // Dialog Data
00064     //{{AFX_DATA(CTag_MAIN)
00065     enum { IDD = IDD_TAG_MAIN };
00066     CStatic m_tagDescStatic;
00067     CButton m_grpBox;
00068     CButton m_overwriteExistingCheck;
00069     CButton m_checkUnmodCheck;
00070     CSmartComboBox  m_tagCombo;
00071     BOOL    m_noRecurs;
00072     BOOL    m_checkUnmod;
00073     BOOL    m_overwriteExisting;
00074     CString m_tagName;
00075     BOOL    m_movDelBranch;
00076     //}}AFX_DATA
00077
00078
00079 // Overrides
00080     // ClassWizard generate virtual function overrides
00081     //{{AFX_VIRTUAL(CTag_MAIN)
00082     protected:
00083     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00084     //}}AFX_VIRTUAL
00085
00086 // Implementation
00087 protected:
00088     // Generated message map functions
00089     //{{AFX_MSG(CTag_MAIN)
00090     virtual BOOL OnInitDialog();
00091     afx_msg void OnBrowseTag();
00092     //}}AFX_MSG
00093     DECLARE_MESSAGE_MAP()
00094 private:
00095     // Data members
00096     const MultiFiles* m_mf;
00097     kTagCmdType m_type;
00098
00099     // Methods
00100     virtual void InitHelpID();
00101 };
00102
00103 //{{AFX_INSERT_LOCATION}}
00104 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00105 #endif /* WIN32 */
00106
00107 #endif // !defined(AFX_TAGDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:43:01 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCvsStreamConsole Member List

This is the complete list of members for CCvsStreamConsole, including all inherited members.

CCvsStreamConsole(FILE *fileOut=0L, bool autoClose=true) | CCvsStreamConsole |
cvs_err(const char *txt, long len) | CCvsStreamConsole | [virtual]
cvs_out(const char *txt, long len) | CCvsStreamConsole | [virtual]
IsModeSet() const | CCvsStreamConsole | [protected, virtual]
m_autoClose | CCvsStreamConsole | [protected]
m_fileOut | CCvsStreamConsole | [protected]
m_modeSet | CCvsStreamConsole | [protected]
Open(const char *fileName) | CCvsStreamConsole | [virtual]
SetMode(bool binary) | CCvsStreamConsole | [protected, virtual]
~CCvsStreamConsole() | CCvsStreamConsole | [virtual]

Generated on Sat Aug 7 22:51:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TbEntry Member List

This is the complete list of members for TbEntry, including all inherited members.

kind | TbEntry |
TbEntry(tbeKind k) | TbEntry | [inline]
~TbEntry() | TbEntry | [inline, virtual]

Generated on Sat Aug 7 22:56:44 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CPseudoItem Member List

This is the complete list of members for CPseudoItem, including all inherited members.

CPseudoItem(int widid, int cmdid) | CPseudoItem |
CPseudoItem() | CPseudoItem | [private]
CPseudoItem(const CPseudoItem &inOriginal) | CPseudoItem | [private]
DoubleClick(const STableCell &inCell, const SMouseDownEvent &inMouseDown, const SOutlineDrawContents &inDrawContents, Boolean inHitText) | CPseudoItem | [protected, virtual]
DrawCell(const STableCell &inCell, const Rect &inLocalCellRect) | CPseudoItem | [protected, virtual]
DrawRowAdornments(const Rect &inLocalRowRect) | CPseudoItem | [protected, virtual]
GetDrawContentsSelf(const STableCell &inCell, SOutlineDrawContents &ioDrawContents) | CPseudoItem | [protected, virtual]
m_cmdid | CPseudoItem | [protected]
m_data | CPseudoItem |
m_texts | CPseudoItem |
m_widid | CPseudoItem | [protected]
operator=(const CPseudoItem &inOriginal) | CPseudoItem | [private]
SingleClick(const STableCell &inCell, const SMouseDownEvent &inMouseDown, const SOutlineDrawContents &inDrawContents, Boolean inHitText) | CPseudoItem | [protected, virtual]
~CPseudoItem() | CPseudoItem | [virtual]

Generated on Sat Aug 7 22:55:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoGraphHandler Member List

This is the complete list of members for KoGraphHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoGraphHandler() | KoGraphHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KoGraphHandler | [inline, virtual]
OnFiles(MultiFiles *pmf) | KoGraphHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoGraphHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:16 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CWinPlacement Member List

This is the complete list of members for CWinPlacement, including all inherited members.

_GetBaseClass() | CPersistent | [protected, static]
classCPersistent | CPersistent | [protected, static]
classUObject | UObject | [protected, static]
CPersistent(const char *uniqueName, kClassPersistent pclass) | CPersistent |
CreateObject(const char *className) | UObject | [static]
CWinPlacement(const char *uniqueName) | CWinPlacement |
Find(const char *uniqueName) | CPersistent | [static]
GetData(void) const | CWinPlacement | [private, virtual]
GetPlacement() const | CWinPlacement |
GetRuntimeClass() const | CPersistent | [virtual]
GetTimeStamp() const | CPersistent | [inline]
IsHasOne() const | CWinPlacement |
IsKindOf(const URuntimeClass *pClass) const | UObject |
LoadAll(const char *only=0L) | CPersistent | [static]
m_fAllEntries | CPersistent | [protected, static]
m_fTimeStamp | CPersistent | [protected]
m_hasOne | CWinPlacement | [private]
m_placement | CWinPlacement | [private]
NeedSave(bool onlySettings=false) | CPersistent | [static]
operator=(const WINDOWPLACEMENT &newplace) | CWinPlacement |
ResetTimeStamp() | CPersistent | [inline]
rtCPersistent(void) | CPersistent | [static]
rtUObject() | UObject | [static]
SaveAll(void) | CPersistent | [static]
SaveAllSettings(const char *settingFileName, const char *filePath) | CPersistent | [static]
SetData(const void *ptr, unsigned int size) | CWinPlacement | [private, virtual]
SizeOf(void) const | CWinPlacement | [private, virtual]
TouchTimeStamp() | CPersistent | [inline]
UObject() | UObject | [inline, protected]
~CPersistent() | CPersistent | [virtual]
~CWinPlacement() | CWinPlacement | [virtual]
~UObject() | UObject | [inline, virtual]

Generated on Sat Aug 7 22:58:48 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJListView Member List

This is the complete list of members for CCJListView, including all inherited members.

AddColumn(LPCTSTR lpszColHeading, int nWidth=-1, int nFormat=LVCFMT_LEFT) | CCJListView | [virtual]
AutoSaveColumns(LPCTSTR lpszSection=NULL, LPCTSTR lpszEntry=NULL, LPCTSTR lpszDefault=NULL) | CCJListView | [virtual]
AutoSizeColumn(int nCol=-1) | CCJListView | [virtual]
BuildColumns(int nCols, int *nWidth, CString *strColString) | CCJListView | [virtual]
BuildColumns(int nCols, int *nWidth, int *nColString) | CCJListView | [virtual]
CCJListView() | CCJListView |
CopyRow(int nFrom, int nTo) | CCJListView | [virtual]
DisableColumnSizing(bool bDisable) | CCJListView | [virtual]
GetColumnCount() const | CCJListView | [virtual]
GetExtendedStyle() | CCJListView | [virtual]
GetStoredWidth(int nCol) | CCJListView | [virtual]
HitTestEx(CPoint &point, int *col) const | CCJListView | [virtual]
LoadColumnWidths() | CCJListView | [virtual]
m_bAscending | CCJListView | [private]
m_bAutoSave | CCJListView | [private]
m_bNoColSizing | CCJListView | [protected]
m_clrText | CCJListView | [protected]
m_clrTextBk | CCJListView | [protected]
m_nMaxColWidth | CCJListView | [protected]
m_nMinColWidth | CCJListView | [protected]
m_nMinSize | CCJListView | [protected]
m_nSortedCol | CCJListView | [protected]
m_pHeaderCtrl | CCJListView | [protected]
m_pListCtrl | CCJListView | [protected]
m_strDefault | CCJListView | [protected]
m_strEntry | CCJListView | [protected]
m_strSection | CCJListView | [protected]
MoveRow(int nFrom, int nTo) | CCJListView | [virtual]
OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult) | CCJListView | [protected]
OnDestroy() | CCJListView | [protected]
OnDraw(CDC *pDC) | CCJListView | [protected, virtual]
OnEraseBkgnd(CDC *pDC) | CCJListView | [protected]
OnInitialUpdate() | CCJListView | [virtual]
OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *pResult) | CCJListView | [protected, virtual]
SaveColumnWidths() | CCJListView | [virtual]
SetColumnWidth(int nCol) | CCJListView | [virtual]
SetExtendedStyle(DWORD dwExStyle) | CCJListView | [virtual]
SetMinimumColSize(int nSize) | CCJListView | [virtual]
SetRowColors(COLORREF clrText, COLORREF clrTextBk) | CCJListView | [virtual]
SortList(int nCol, bool bAscending) | CCJListView | [virtual]
SubclassHeader(bool bBoldFont=false) | CCJListView | [virtual]
~CCJListView() | CCJListView | [virtual]

Generated on Sat Aug 7 22:49:31 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJHexEdit.h Source File

WinCvs/CJLib/Include/CJHexEdit.h

Go to the documentation of this file.
00001 // CJHexEdit.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based on the article "HexEdit Control" by Andreas Saurwein [saurwein@uniwares.com]
00006 // http://www.codeguru.com/editctrl/hexeditctrl.shtml
00007 //
00009 /****************************************************************************
00010  *
00011  * $Date: 1999/11/30 21:45:51 $
00012  * $Revision: 1.1.1.1 $
00013  * $Archive: /CodeJock/Include/CJHexEdit.h $
00014  *
00015  * $History: CJHexEdit.h $
00016  *
00017  * *****************  Version 1  *****************
00018  * User: Kirk Stowell Date: 10/30/99   Time: 9:20p
00019  * Created in $/CodeJock/Include
00020  *
00021  ***************************************************************************/
00023
00024 #ifndef __CJHEXEDIT_H__
00025 #define __CJHEXEDIT_H__
00026
00027 #if _MSC_VER >= 1000
00028 #pragma once
00029 #endif // _MSC_VER >= 1000
00030
00031 // CCJHexEdit is a CEdit derived class which allows editing in hex
00032 // display format.
00033 class _CJX_EXT_CLASS CCJHexEdit : public CEdit
00034 {
00035     DECLARE_DYNAMIC(CCJHexEdit)
00036
00037 // Construction
00038 public:
00039     CCJHexEdit();
00040
00041 // Attributes
00042 public:
00043
00044     enum EDITMODE{ EDIT_NONE, EDIT_ASCII, EDIT_HIGH, EDIT_LOW } ;
00045
00046     LPBYTE      m_pData;            // pointer to data
00047     int         m_length;           // length of data
00048     int         m_topindex;         // offset of first visible byte on screen
00049     int         m_currentAddress;   // address under cursor
00050     EDITMODE    m_currentMode;      // current editing mode: address/hex/ascii
00051     int         m_selStart;         // start address of selection
00052     int         m_selEnd;           // end address of selection
00053     int         m_bpr;              // byte per row
00054     int         m_lpp;              // lines per page
00055     BOOL        m_bShowAddress;
00056     BOOL        m_bShowAscii;
00057     BOOL        m_bShowHex;
00058     BOOL        m_bAddressIsWide;
00059     BOOL        m_bNoAddressChange; // internally used
00060     BOOL        m_bHalfPage;
00061     CFont       m_Font;
00062     int         m_lineHeight;
00063     int         m_nullWidth;
00064     BOOL        m_bUpdate;
00065     int         m_offHex;
00066     int         m_offAscii;
00067     int         m_offAddress;
00068     CPoint      m_editPos;
00069
00070 // Operations
00071 public:
00072
00073     virtual int     GetData(LPBYTE p, int len);
00074     virtual void    SetData(LPBYTE p, int len);
00075     virtual CSize   GetSel(void);
00076     virtual void    SetSel(int s, int e);
00077     virtual void    SetBPR(int bpr);
00078     virtual void    SetOptions(BOOL a, BOOL h, BOOL c, BOOL w);
00079
00080 protected:
00081
00082     virtual void    ScrollIntoView(int p);
00083     virtual void    RepositionCaret(int p);
00084     virtual void    Move(int x, int y);
00085     virtual BOOL    IsSelected(void);
00086     virtual void    UpdateScrollbars(void);
00087     virtual void    CreateEditCaret(void);
00088     virtual void    CreateAddressCaret(void);
00089     virtual CPoint  CalcPos(int x, int y);
00090     virtual void    SelInsert(int s, int l);
00091     virtual void    SelDelete(int s, int e);
00092     virtual void    NormalizeSel(void);
00093
00094 // Overrides
00095     // ClassWizard generated virtual function overrides
00096     //{{AFX_VIRTUAL(CCJHexEdit)
00097     public:
00098     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
00099     protected:
00100     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00101     //}}AFX_VIRTUAL
00102
00103 // Implementation
00104 public:
00105     virtual ~CCJHexEdit();
00106
00107 // Generated message map functions
00108 protected:
00109     //{{AFX_MSG(CCJHexEdit)
00110     afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
00111     afx_msg void OnKillFocus(CWnd* pNewWnd);
00112     afx_msg void OnPaint();
00113     afx_msg void OnSetFocus(CWnd* pOldWnd);
00114     afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00115     afx_msg UINT OnGetDlgCode();
00116     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00117     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00118     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00119     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00120     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00121     afx_msg void OnEditClear();
00122     afx_msg void OnEditCopy();
00123     afx_msg void OnEditCut();
00124     afx_msg void OnEditPaste();
00125     afx_msg void OnEditSelectAll();
00126     afx_msg void OnEditUndo();
00127     afx_msg void OnContextMenu(CWnd*, CPoint point);
00128     afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00129     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00130     //}}AFX_MSG
00131     DECLARE_MESSAGE_MAP()
00132 };
00133
00135 //  Inline Functions
00137
00138 _CJXLIB_INLINE UINT CCJHexEdit::OnGetDlgCode()
00139     { return DLGC_WANTALLKEYS; }
00140
00141 _CJXLIB_INLINE void CCJHexEdit::SetOptions(BOOL a, BOOL h, BOOL c, BOOL w)
00142     { m_bShowHex = h; m_bShowAscii = c; m_bShowAddress = a; m_bAddressIsWide = w; m_bUpdate = TRUE; }
00143
00144 _CJXLIB_INLINE void CCJHexEdit::SetBPR(int bpr)
00145     { m_bpr = bpr; m_bUpdate = TRUE; }
00146
00147 _CJXLIB_INLINE BOOL CCJHexEdit::IsSelected()
00148     { return m_selStart != 0xffffffff; }
00149
00150 _CJXLIB_INLINE CSize CCJHexEdit::GetSel()
00151     { return CSize(m_selStart, m_selEnd); }
00152
00153 _CJXLIB_INLINE int CCJHexEdit::GetData(LPBYTE p, int len)
00154     { memcpy(p, m_pData, min(len, m_length)); return m_length; }
00155
00157
00158 //{{AFX_INSERT_LOCATION}}
00159 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00160
00161 #endif // __CJHEXEDIT_H__
00162
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/MacMisc.cpp Source File

common/MacMisc.cpp

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- December 1997
00019  */
00020
00021 /*
00022  * MacMisc.cpp --- misc. utilities for mac
00023  */
00024
00025 /* here should be a define, to recorgnize if this file is needed in dev-tools */
00026 #ifdef TARGET_OS_MAC
00027
00028 #include "GUSIInternal.h"
00029 #include "GUSIFileSpec.h"
00030 #include "Persistent.h"
00031 #include "AppConsole.h"
00032
00033 #include "MacMisc.h"
00034 #include "VolsPaths.h"
00035
00036 Handle
00037 GetDItemHdl(DialogPtr dlg, SInt16 Id)
00038 {
00039     SInt16  type;
00040     Handle  item;
00041     Rect    box;
00042
00043     GetDialogItem(dlg, Id, &type, &item, &box);
00044     return item;
00045 }
00046
00047 ControlHandle
00048 GetDItemCtrlHdl(DialogPtr dlg, SInt16 Id)
00049 {
00050     SInt16  type;
00051     Handle  item;
00052     Rect    box;
00053
00054     GetDialogItem(dlg, Id, &type, &item, &box);
00055     return (ControlHandle)item;
00056 }
00057
00058 SInt16 GetDItemMenuSel(DialogPtr dlg, SInt16 Id)
00059 {
00060     ControlHandle ctrl = GetDItemCtrlHdl(dlg, Id);
00061     return ctrl != 0L ? GetControlValue(ctrl) : 0;
00062 }
00063
00064 void SetDItemMenuSel(DialogPtr dlg, SInt16 Id, SInt16 sel)
00065 {
00066     ControlHandle ctrl = GetDItemCtrlHdl(dlg, Id);
00067     if(ctrl != 0L)
00068         SetControlValue(ctrl, sel);
00069 }
00070
00071
00072 OSErr
00073 MacGetSpecialFolder(UFSSpec & theFolder, UStr & thePath, OSType inType,
00074     const char* inDesc, bool createFolder)
00075 {
00076     OSErr err;
00077     err = ::FSFindFolder(kOnAppropriateDisk, inType,
00078                     createFolder, &theFolder);
00079     if (err != noErr)
00080     {
00081         cvs_err("MacCvs: Unable to find the %s folder (error %d)\n", inDesc, err);
00082         return err;
00083     }
00084
00085     GUSIFileSpec spec(theFolder);
00086     thePath = spec.FullPath();
00087
00088     return err;
00089 }
00090
00091 OSErr
00092 MacGetTempFolder(UFSSpec & theFolder, UStr & thePath)
00093 {
00094     static UFSSpec cacheFile = {0, 0, '\0'};
00095     static UStr cachePath;
00096     if(!cachePath.empty())
00097     {
00098         theFolder = cacheFile;
00099         thePath = cachePath;
00100         return noErr;
00101     }
00102
00103     OSErr err = MacGetSpecialFolder (theFolder, thePath, kTemporaryFolderType, "temporary", true);
00104     if(err == noErr)
00105     {
00106         cacheFile = theFolder;
00107         cachePath = thePath;
00108     }
00109
00110     return err;
00111 }
00112
00113 OSErr
00114 MacGetPrefsFolder(UFSSpec & theFolder, UStr & thePath)
00115 {
00116     static UFSSpec cacheFile = {0, 0, '\0'};
00117     static UStr cachePath;
00118     if(!cachePath.empty())
00119     {
00120         theFolder = cacheFile;
00121         thePath = cachePath;
00122         return noErr;
00123     }
00124
00125     OSErr err = MacGetSpecialFolder (theFolder, thePath, kPreferencesFolderType, "preferences");
00126     if(err == noErr)
00127     {
00128         cacheFile = theFolder;
00129         cachePath = thePath;
00130     }
00131
00132     return err;
00133 }
00134
00135 UStr CFString_to_UStr(CFStringRef inStringToConvert, CFStringEncoding inRequestedEncoding, bool *outConversionSuccessful)
00136 {
00137   if ( outConversionSuccessful ) *outConversionSuccessful = true;
00138   if ( inStringToConvert == NULL ) return UStr();
00139
00140   static char*    buf(NULL);
00141   static CFIndex  bufLen(0);
00142   CFIndex         stringLen(CFStringGetLength(inStringToConvert));
00143   CFIndex         maxLen(CFStringGetMaximumSizeForEncoding(stringLen, inRequestedEncoding)+1);
00144
00145   if ( maxLen > bufLen ) {
00146     buf = static_cast<char*>(realloc(buf, maxLen));
00147     if ( buf == NULL ) {
00148       cvs_err("out of memory while trying to convert a string\n");
00149       return UStr();
00150     }
00151     bufLen = maxLen;
00152   }
00153   if ( !CFStringGetCString(inStringToConvert, buf, maxLen, inRequestedEncoding) ) {
00154     // try lossy conversion
00155     CFIndex   byteCount(0);
00156     CFStringGetBytes(inStringToConvert, CFRangeMake(0, stringLen), inRequestedEncoding, '?', false, (UInt8*)buf, maxLen, &byteCount);
00157     buf[byteCount] = 0;
00158     if ( outConversionSuccessful ) *outConversionSuccessful = false;
00159   }
00160   return UStr(buf);
00161 }
00162
00163 UStr ConvertString(const char* inStringToConvert, CFStringEncoding inInputEncoding, CFStringEncoding inOutputEncoding, bool allowLossyConversion)
00164 {
00165   if ( inStringToConvert == NULL  ||  *inStringToConvert == '\0' ) return UStr();
00166
00167   CFStringRef     convStr(CFStringCreateWithCString(NULL, inStringToConvert, inInputEncoding));
00168   if ( convStr == NULL ) return UStr(inStringToConvert);
00169
00170   static char*    buf(NULL);
00171   static CFIndex  bufLen(0);
00172   CFIndex         convStrLen(CFStringGetLength(convStr));
00173   CFIndex         maxLen(CFStringGetMaximumSizeForEncoding(convStrLen, inOutputEncoding)+1);
00174
00175   if ( maxLen > bufLen ) {
00176     buf = static_cast<char*>(realloc(buf, maxLen));
00177     if ( buf == NULL ) {
00178       cvs_err("out of memory while trying to convert a string\n");
00179       return UStr();
00180     }
00181     bufLen = maxLen;
00182   }
00183   if ( !CFStringGetCString(convStr, buf, maxLen, inOutputEncoding) ) {
00184     if ( allowLossyConversion ) {
00185       CFIndex   byteCount(0);
00186       CFStringGetBytes(convStr, CFRangeMake(0, convStrLen), inOutputEncoding, '?', false, (UInt8*)buf, maxLen, &byteCount);
00187       buf[byteCount] = 0;
00188     }
00189     else {
00190       CFRelease(convStr);
00191       cvs_err("couldn't convert '%s' to encoding %d\n", inStringToConvert, inOutputEncoding);
00192       return UStr(inStringToConvert);
00193     }
00194   }
00195   CFRelease(convStr);
00196   return UStr(buf);
00197 }
00198
00199 UStr UTF8_to_SysEncoding(const char* utf8EncodedString, bool allowLossyConversion)
00200 {
00201   return ConvertString(utf8EncodedString, kCFStringEncodingUTF8, CFStringGetSystemEncoding(), allowLossyConversion);
00202 }
00203
00204 UStr SysEncoding_to_UTF8(const char* sysEncodedString, bool allowLossyConversion)
00205 {
00206   return ConvertString(sysEncodedString, CFStringGetSystemEncoding(), kCFStringEncodingUTF8, allowLossyConversion);
00207 }
00208
00209 UStr LString_to_UTF8(const LString& inString, bool allowLossyConversion)
00210 {
00211   LStr255    str(inString);
00212   return SysEncoding_to_UTF8(LString::PToCStr(str), allowLossyConversion);
00213 }
00214
00215 LStr255 UTF8_to_LString(const char* inString, bool allowLossyConversion)
00216 {
00217   return LStr255(UTF8_to_SysEncoding(inString, allowLossyConversion));
00218 }
00219
00220
00221 #endif /* TARGET_OS_MAC */
Generated on Sat Aug 7 22:42:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TPseudoWinAdorner Member List

This is the complete list of members for TPseudoWinAdorner, including all inherited members.

fWidID | TPseudoWinAdorner | [protected]
kPseudoWinAdorner enum value | TPseudoWinAdorner |
MA_DECLARE_CLASS | TPseudoWinAdorner | [private]
SetPseudoWidget(int widid) | TPseudoWinAdorner | [inline, protected]
TPseudoWinAdorner() | TPseudoWinAdorner |
ViewChangedFrame(TView *itsView, const CViewRect &oldFrame, const CViewRect &newFrame, bool invalidate) | TPseudoWinAdorner | [virtual]
~TPseudoWinAdorner() | TPseudoWinAdorner | [virtual]

Generated on Sat Aug 7 22:57:21 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/ImportDlg.h Source File

common/ImportDlg.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * ImportDlg.h : the cvs import dialog
00023  */
00024
00025 #if !defined(AFX_IMPORTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
00026 #define AFX_IMPORTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #include "SmartComboBox.h"
00033
00034 #ifdef WIN32
00035 #   include "MultilineEntryDlg.h"
00036 #   include "HHelpSupport.h"
00037 #endif
00038
00039 class MultiFiles;
00040 class ReportConflict;
00041 class ReportWarning;
00042
00043 bool CompatGetImport(const MultiFiles* mf,
00044                      ReportConflict*& entries, ReportWarning*& warnings,
00045                      CStr& modname, CStr& logmsg,
00046                      CStr& vendortag, CStr& reltag, CStr& vendorBranchId, CStr& path,
00047                      bool& useDefIgnore, bool& useFilesTime, bool& createSandbox,
00048                      bool& dontCreateVendorTag, bool& overwriteReleaseTags,
00049                      bool& forceCvsroot, CStr& cvsroot);
00050
00051 #ifdef WIN32
00052
00054 class CImport_MAIN : public CHHelpPropertyPage
00055 {
00056     DECLARE_DYNAMIC(CImport_MAIN)
00057
00058 // Construction
00059 public:
00060     CImport_MAIN(const MultiFiles* mf,
00061         const char* logMsg, const char* modname,
00062         const char* rtag, const char* vtag, const bool dontCreateVendorTag, const bool overwriteReleaseTags,
00063         bool forceRoot, const char* cvsroot);
00064     ~CImport_MAIN();
00065
00066 // Dialog Data
00067     //{{AFX_DATA(CImport_MAIN)
00068     enum { IDD = IDD_IMPORT_MAIN };
00069     CButton m_overwriteReleaseTagsCheck;
00070     CButton m_forceRootCheck;
00071     CButton m_selCvsrootButton;
00072     CSmartComboBox  m_cvsrootCombo;
00073     CStatic m_multilineEntryPlaceholder;
00074     CButton m_vtagButton;
00075     CButton m_rtagButton;
00076     CButton m_dontCreateVendorTagCheck;
00077     CSmartComboBox  m_moduleCombo;
00078     CSmartComboBox  m_rtagCombo;
00079     CSmartComboBox  m_vtagCombo;
00080     CString m_vtag;
00081     CString m_rtag;
00082     CString m_moduleName;
00083     BOOL    m_dontCreateVendorTag;
00084     CString m_cvsroot;
00085     BOOL    m_forceRoot;
00086     BOOL    m_overwriteReleaseTags;
00087     //}}AFX_DATA
00088
00089
00090 // Overrides
00091     // ClassWizard generate virtual function overrides
00092     //{{AFX_VIRTUAL(CImport_MAIN)
00093     public:
00094     protected:
00095     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00096     //}}AFX_VIRTUAL
00097
00098 // Implementation
00099 protected:
00100     // Generated message map functions
00101     //{{AFX_MSG(CImport_MAIN)
00102     afx_msg void OnBrowseTag1();
00103     afx_msg void OnBrowseTag2();
00104     afx_msg void OnBrowseModules();
00105     virtual BOOL OnInitDialog();
00106     afx_msg void OnDontcreatevendortag();
00107     afx_msg void OnForceroot();
00108     afx_msg void OnSelcvsroot();
00109     //}}AFX_MSG
00110     DECLARE_MESSAGE_MAP()
00111 private:
00112     // Data members
00113     const MultiFiles* m_mf;
00114     CString m_logMsg;
00116     CMultilineEntryDlg m_multilineEntryDlg;
00118     // Methods
00119     virtual void InitHelpID();
00120
00121 public:
00122     // Interface
00123     CString GetLogMsg() const;
00124 };
00125
00127 class CImport_OPTIONS : public CHHelpPropertyPage
00128 {
00129     DECLARE_DYNAMIC(CImport_OPTIONS)
00130
00131 // Construction
00132 public:
00133     CImport_OPTIONS(const MultiFiles* mf,
00134         ReportConflict*& entries, ReportWarning*& warnings,
00135         const char* path, const bool useDefIgnore, const bool useFilesTime, const bool createSandbox);
00136     ~CImport_OPTIONS();
00137
00138 // Dialog Data
00139     //{{AFX_DATA(CImport_OPTIONS)
00140     enum { IDD = IDD_IMPORT_OPTIONS };
00141     CSmartComboBox  m_pathCombo;
00142     CSmartComboBox  m_vendorBranchCombo;
00143     CButton m_vendorBranchButton;
00144     CButton m_vendorBranchCheck;
00145     BOOL    m_useDefIgnore;
00146     BOOL    m_useFilesTime;
00147     BOOL    m_hasVendorBranch;
00148     CString m_vendorBranch;
00149     BOOL    m_createSandbox;
00150     CString m_path;
00151     //}}AFX_DATA
00152
00153
00154 // Overrides
00155     // ClassWizard generate virtual function overrides
00156     //{{AFX_VIRTUAL(CImport_OPTIONS)
00157     protected:
00158     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00159     //}}AFX_VIRTUAL
00160
00161 // Implementation
00162 protected:
00163     // Generated message map functions
00164     //{{AFX_MSG(CImport_OPTIONS)
00165     afx_msg void OnBtnpath();
00166     afx_msg void OnBrowseBranchid();
00167     afx_msg void OnBranchid();
00168     afx_msg void OnImportfilter();
00169     afx_msg void OnSelchangePath();
00170     //}}AFX_MSG
00171     DECLARE_MESSAGE_MAP()
00172 private:
00173     // Data members
00174     const MultiFiles* m_mf;
00175     ReportConflict*& m_entries;
00176     ReportWarning*& m_warnings;
00178     // Methods
00179     virtual void InitHelpID();
00180
00181     bool ImportFilter(const char* path);
00182 };
00183
00184 //{{AFX_INSERT_LOCATION}}
00185 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00186 #endif /* WIN32 */
00187
00188 #endif // !defined(AFX_IMPORTDLG_H__98CCBD22_845B_11D1_8949_444553540000__INCLUDED_)
Generated on Sat Aug 7 22:42:58 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJColorPicker Member List

This is the complete list of members for CCJColorPicker, including all inherited members.

CCJColorPicker() | CCJColorPicker |
CheckTextColor(COLORREF crColor) | CCJColorPicker | [virtual]
DECLARE_DYNCREATE(CCJColorPicker) | CCJColorPicker |
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | CCJColorPicker | [virtual]
GetBkColor() | CCJColorPicker | [inline, virtual]
GetColor() | CCJColorPicker | [virtual]
GetSelectionMode() | CCJColorPicker | [inline, virtual]
GetTextColor() | CCJColorPicker | [inline, virtual]
GetTrackSelection() | CCJColorPicker | [inline, virtual]
m_ArrowRect | CCJColorPicker | [protected]
m_bActive | CCJColorPicker | [protected]
m_bLBtnDown | CCJColorPicker | [protected]
m_bTrackSelection | CCJColorPicker | [protected]
m_crColorBk | CCJColorPicker | [protected]
m_crColorText | CCJColorPicker | [protected]
m_nSelectionMode | CCJColorPicker | [protected]
m_pParentWnd | CCJColorPicker | [protected]
m_strCustomText | CCJColorPicker | [protected]
m_strDefaultText | CCJColorPicker | [protected]
OnClicked() | CCJColorPicker | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJColorPicker | [protected]
OnEraseBkgnd(CDC *pDC) | CCJColorPicker | [protected]
OnPaint() | CCJColorPicker | [protected]
OnSelChange(UINT lParam, LONG wParam) | CCJColorPicker | [protected]
OnSelEndCancel(UINT lParam, LONG wParam) | CCJColorPicker | [protected]
OnSelEndOK(UINT lParam, LONG wParam) | CCJColorPicker | [protected]
PreSubclassWindow() | CCJColorPicker | [protected, virtual]
SetBkColor(COLORREF crColorBk) | CCJColorPicker | [virtual]
SetColor(COLORREF crColor) | CCJColorPicker | [virtual]
SetCustomText(LPCTSTR szCustomText) | CCJColorPicker | [virtual]
SetDefaultText(LPCTSTR szDefaultText) | CCJColorPicker | [virtual]
SetSelectionMode(UINT nMode) | CCJColorPicker | [inline, virtual]
SetTextColor(COLORREF crColorText) | CCJColorPicker | [virtual]
SetTrackSelection(BOOL bTracking=TRUE) | CCJColorPicker | [inline, virtual]
SetWindowSize() | CCJColorPicker | [protected]
~CCJColorPicker() | CCJColorPicker | [virtual]

Generated on Sat Aug 7 22:48:52 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

TViewFill Member List

This is the complete list of members for TViewFill, including all inherited members.

EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TViewFill | [inline, virtual]
EnterDirectory(const char *fullpath, const char *dirname, const FSSpec *macspec) | TViewFill | [virtual]
ExitDirectory(const char *fullpath) | TViewFill | [inline, virtual]
ExitDirectory(const char *fullpath) | TViewFill | [virtual]
GetListCtrl() const | TViewFill | [inline]
GetRefRunning() | TraversalReport | [static]
GetView() const | TViewFill | [inline]
InitItem(EntnodeData *data, void *iImage, const char *tag=0L) | TViewFill | [inline]
InitItem(EntnodeData *data, int iImage, const char *tag=0L) | TViewFill |
IsRecursive() const | TViewFill | [inline]
IsShowIgnored() const | TViewFill | [inline]
m_context | TViewFill |
m_context | TViewFill | [private]
m_entries | TViewFill |
m_entries | TViewFill | [private]
m_ignlist | TViewFill |
m_ignlist | TViewFill | [private]
m_isShowIgnored | TViewFill |
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TViewFill | [inline, virtual]
OnAlias(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TViewFill | [virtual]
OnAnyDevice(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TraversalReport | [virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TViewFill | [inline, virtual]
OnDirectory(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TViewFill | [virtual]
OnError(const char *err, int errcode) | TViewFill | [inline, virtual]
OnError(const char *err, int errcode) | TViewFill | [virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TViewFill | [inline, virtual]
OnFile(const char *fullpath, const char *fullname, const char *name, const struct stat &dir, const FSSpec *macspec) | TViewFill | [virtual]
OnIdle(const char *fullpath) | TViewFill | [inline, virtual]
OnIdle(const char *fullpath) | TViewFill | [virtual]
TViewFill(const KoTraversalContext *context) | TViewFill | [inline]
TViewFill(const KoTraversalContext *context, CSortList< ENTNODE > &entries) | TViewFill | [inline]
TViewFill(const KoFileViewTraversalContext *context) | TViewFill |
~TViewFill() | TViewFill | [inline, virtual]

Generated on Sat Aug 7 22:57:32 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoUpdateMoveToTrashHandler Member List

This is the complete list of members for KoUpdateMoveToTrashHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
IsEnabled() const | KoUpdateMoveToTrashHandler | [inline]
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoUpdateMoveToTrashHandler() | KoUpdateMoveToTrashHandler | [inline]
m_isFiles | KoUpdateMoveToTrashHandler | [private]
m_isFolders | KoUpdateMoveToTrashHandler | [private]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoUpdateMoveToTrashHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoUpdateMoveToTrashHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:36 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/dll_process.h Source File

common/dll_process.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00019  */
00020
00021 /*
00022  * dll_process.h --- allow to simulate a process using the dll mechanism
00023  */
00024
00025 #ifndef DLL_PROCESS_H
00026 #define DLL_PROCESS_H
00027
00028 #ifdef TARGET_OS_MAC
00029 #   include <CodeFragments.h>
00030 #   include <Events.h>
00031 #endif
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037     typedef char * (*dllglue_getenv_func) (const char *);
00038     typedef long (*dllglue_consoleout_func) (char *, long);
00039     typedef long (*dllglue_consolein_func) (char *, long);
00040     typedef int (*dllglue_main_func) (const char *, int, char**);
00041     typedef int (*dllglue_setglue_func) (void *);
00042 #   if TARGET_API_MAC_CARBON
00043     typedef int (*dllglue_eventdispath_func) (EventRecord *);
00044     typedef int (*dllglue_decode_file_func) (char *);
00045 #   endif
00046
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050
00051 #endif /* DLL_PROCESS_H */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CBuffer Member List

This is the complete list of members for CBuffer, including all inherited members.

append(const char *ptr, size_t s) | CBuffer | [inline]
CBuffer() | CBuffer | [inline]
m_buf | CBuffer | [protected]
m_curSize | CBuffer | [protected]
operator char *(void) const | CBuffer | [inline]
size() const | CBuffer | [inline]

Generated on Sat Aug 7 22:48:43 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJShellList.cpp Source File

WinCvs/CJLib/CJLibrary/CJShellList.cpp

Go to the documentation of this file.
00001 // CJShellList.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Based upon the MFCENUM example. MFCENUM is a companion sample application
00006 // for Chapter 14 in "Programming the Windows 95 User Interface" by Nancy Cluts,
00007 // available in the Microsoft(R) Development Library.
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:49 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJock/CJLibrary/CJShellList.cpp $
00015  *
00016  * $History: CJShellList.cpp $
00017  *
00018  * *****************  Version 14  *****************
00019  * User: Kirk Stowell Date: 10/30/99   Time: 7:13p
00020  * Updated in $/CodeJock/CJLibrary
00021  * Fixed bug where the list has been sorted, then the directory changes
00022  * and the sorting is lost.
00023  *
00024  * *****************  Version 13  *****************
00025  * User: Kirk Stowell Date: 10/25/99   Time: 10:52p
00026  * Updated in $/CodeJock/CJLibrary
00027  * Modified resource include for static builds.
00028  *
00029  * *****************  Version 12  *****************
00030  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00031  * Updated in $/CodeJock/CJLibrary
00032  * Fixed potential resource and memory leak problems.
00033  *
00034  * *****************  Version 11  *****************
00035  * User: Kirk Stowell Date: 10/14/99   Time: 10:38a
00036  * Updated in $/CodeJock/CJLibrary
00037  * Fixed memory leaks that were associated with PIDL and
00038  * FindFirstFile(...) operations. Removed hideous "goto" statements in
00039  * code. Fixed validation logic and replaced the calls to
00040  * DoTheMenuThing(...) with DoExplorerMenu(...).
00041  *
00042  * *****************  Version 10  *****************
00043  * User: Kirk Stowell Date: 9/13/99    Time: 5:52a
00044  * Updated in $/CodeJockey/CJLibrary
00045  * Fixed build errors which occured with UNICODE builds.
00046  *
00047  * *****************  Version 9  *****************
00048  * User: Kirk Stowell Date: 8/31/99    Time: 4:39a
00049  * Updated in $/CodeJockey/CJLibrary
00050  * Updated copyright and contact information.
00051  *
00052  * *****************  Version 8  *****************
00053  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00054  * Updated in $/CodeJockey/CJLibrary
00055  *
00056  * *****************  Version 7  *****************
00057  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00058  * Updated in $/CodeJockey/CJLibrary
00059  *
00060  * *****************  Version 6  *****************
00061  * User: Kirk Stowell Date: 6/12/99    Time: 3:00a
00062  * Updated in $/CodeJockey/CJ60Lib
00063  * Cleaned up image list, view initialization and sorting to use base
00064  * class virtual function SortList(...).
00065  *
00066  * *****************  Version 5  *****************
00067  * User: Kirk Stowell Date: 5/12/99    Time: 5:32a
00068  * Updated in $/CodeJockey/CJ60Lib
00069  * Added support for vc5 compatibility
00070  *
00071  * *****************  Version 4  *****************
00072  * User: Kirk Stowell Date: 5/12/99    Time: 1:41a
00073  * Updated in $/CodeJockey/CJ60Lib
00074  * Added wait cursor for lengthly processing.
00075  *
00076  * *****************  Version 3  *****************
00077  * User: Kirk Stowell Date: 5/02/99    Time: 3:38p
00078  * Updated in $/CodeJockey/CJ60Lib
00079  * Added version macro  _WIN32_IE, you will need to have at IE4 or greater
00080  * installed to use this class. This will ensure that the version of
00081  * SHELL32.DLL is compatible.
00082  *
00083  * *****************  Version 2  *****************
00084  * User: Kirk Stowell Date: 5/02/99    Time: 2:05a
00085  * Updated in $/CodeJockey/CJ60Lib
00086  * Added flag m_bBuildingList, set to true whenever the list is refreshed
00087  * or initialized.
00088  *
00089  * *****************  Version 1  *****************
00090  * User: Kirk Stowell Date: 3/19/99    Time: 11:03p
00091  * Created in $/CodeJockey/CJ60Lib
00092  * Initial release.
00093  *
00094  ***************************************************************************/
00096
00097 #include "stdafx.h"
00098 #include "CJResource.h"
00099 #include "CJShellTree.h"
00100 #include "CJShellList.h"
00101 #include "CJSortClass.h"
00102
00103 #ifdef _DEBUG
00104 #define new DEBUG_NEW
00105 #undef THIS_FILE
00106 static char THIS_FILE[] = __FILE__;
00107 #endif
00108
00109 #if _WIN32_IE >= 0x0400 // Need to have at IE4 or greater installed.
00110
00112 // CCJShellList
00113
00114 CCJShellList::CCJShellList()
00115 {
00116     m_pTreeCtrl         = NULL;
00117     m_bBuildingList     = FALSE;
00118     m_bShowHidden       = FALSE;
00119 }
00120
00121 CCJShellList::~CCJShellList()
00122 {
00123
00124 }
00125
00126 IMPLEMENT_DYNAMIC(CCJShellList, CCJListCtrl)
00127
00128 BEGIN_MESSAGE_MAP(CCJShellList, CCJListCtrl)
00129     //{{AFX_MSG_MAP(CCJShellList)
00130     ON_NOTIFY_REFLECT(NM_RCLICK, OnRclick)
00131     ON_NOTIFY_REFLECT(LVN_DELETEITEM, OnDeleteitem)
00132     ON_NOTIFY_REFLECT(LVN_GETDISPINFO, OnGetdispinfo)
00133     ON_NOTIFY_REFLECT(NM_DBLCLK, OnRclick)
00134     //}}AFX_MSG_MAP
00135     ON_MESSAGE(WM_SHELL_NOTIFY, OnShellNotify)
00136 END_MESSAGE_MAP()
00137
00139 // CCJShellList message handlers
00140
00141 static DATA_TYPE m_arrColType[] =
00142 {
00143     DT_STRING,      // col 0 sort type string
00144     DT_INT,         // col 1 sort type int
00145     DT_STRING,      // col 2 sort type string
00146     DT_DATETIME     // col 3 sort type date / time
00147 };
00148
00149 bool CCJShellList::SortList( int nCol, bool bAscending )
00150 {
00151     CCJSortClass csc( this, nCol );
00152     csc.Sort( bAscending, m_arrColType[nCol] );
00153     return true;
00154 }
00155
00156 void CCJShellList::OnRclick(NMHDR* pNMHDR, LRESULT* pResult)
00157 {
00158     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00159     POINT pt;
00160     LV_HITTESTINFO lvhti;
00161     LV_ITEM        lvi;
00162     LPLVITEMDATA   lplvid;  //Long pointer to ListView item data
00163
00164     ::GetCursorPos((LPPOINT)&pt);
00165     ::ScreenToClient(GetSafeHwnd(), &pt);
00166     lvhti.pt=pt;
00167     HitTest(&lvhti);
00168     if (lvhti.flags & LVHT_ONITEM)
00169     {
00170         ::ClientToScreen(GetSafeHwnd(), &pt);
00171         lvi.mask = LVIF_PARAM;
00172         lvi.iItem = lvhti.iItem;
00173         lvi.iSubItem = 0;
00174
00175         if (!GetItem(&lvi))
00176             return;
00177
00178         lplvid=(LPLVITEMDATA)lvi.lParam;
00179
00180         switch (pNMListView->hdr.code)
00181         {
00182         case NM_RCLICK:
00183             {
00184                 CString strFolderPath;
00185                 m_pTreeCtrl->GetSelectedFolderPath(strFolderPath);
00186                 m_shell.DoExplorerMenu(GetSafeHwnd(), strFolderPath, pt);
00187                 break;
00188             }
00189         case NM_DBLCLK:
00190             {
00191                 CString strFolderPath;
00192                 m_pTreeCtrl->GetSelectedFolderPath(strFolderPath);
00193
00194                 if (strFolderPath.GetAt(strFolderPath.GetLength()-1) != '\\')
00195                     strFolderPath += "\\";
00196
00197                 strFolderPath += GetItemText(pNMListView->iItem, 0);
00198
00199                 if ((lplvid->ulAttribs & SFGAO_FOLDER) == SFGAO_FOLDER) {
00200                     m_pTreeCtrl->TunnelTree(strFolderPath);
00201                 }
00202                 else {
00203                     m_shell.ShellExec(strFolderPath, SW_SHOW);
00204                 }
00205             }
00206             break;
00207         }
00208     }
00209
00210     *pResult = 0;
00211 }
00212
00213 void CCJShellList::OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult)
00214 {
00215     NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
00216     HRESULT        hr;
00217     LPMALLOC       lpMalloc;
00218     LPLVITEMDATA   lplvid = (LPLVITEMDATA)pNMListView->lParam;
00219
00220     if (lplvid)
00221     {
00222         //Let's free the memory for the ListView item data...
00223         hr=SHGetMalloc(&lpMalloc);
00224         if (FAILED(hr)) {
00225             return;
00226         }
00227
00228         lplvid->lpsfParent->Release();
00229         lpMalloc->Free(lplvid->lpi);
00230         lpMalloc->Free(lplvid);
00231         lpMalloc->Release();
00232     }
00233
00234     *pResult = 0;
00235 }
00236
00237 void CCJShellList::OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult)
00238 {
00239     LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;
00240     LPLVITEMDATA   lplvid;  //Long pointer to ListView item data
00241     LPTVITEMDATA   lptvid;  //Long pointer to TreeView item data
00242
00243     lplvid = (LPLVITEMDATA)pDispInfo->item.lParam;
00244
00245     if ((pDispInfo) &&(pDispInfo->item.mask & LVIF_IMAGE))
00246     {
00247         ASSERT(m_pTreeCtrl); // Must have a buddy window.
00248
00249         TV_ITEM tvi;
00250         HTREEITEM hti;
00251
00252         hti = m_pTreeCtrl->GetSelectedItem();
00253         tvi.mask = TVIF_PARAM;
00254         tvi.hItem = hti;
00255
00256         m_pTreeCtrl->GetItem(&tvi);
00257
00258         lptvid=(LPTVITEMDATA)tvi.lParam;
00259
00260         pDispInfo->item.iImage = m_shell.GetIcon(m_shell.ConcatPidls(lptvid->lpifq, lplvid->lpi),
00261             SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
00262
00263         if (lplvid->ulAttribs & SFGAO_LINK)
00264         {
00265             pDispInfo->item.mask |= LVIF_STATE;
00266             pDispInfo->item.stateMask = LVIS_OVERLAYMASK;
00267             pDispInfo->item.state = INDEXTOOVERLAYMASK(2);
00268         }
00269         if (pDispInfo->item.mask & LVIF_TEXT)
00270             m_shell.GetName(lplvid->lpsfParent, lplvid->lpi, SHGDN_NORMAL, pDispInfo->item.pszText);
00271     }
00272
00273     *pResult = 0;
00274 }
00275
00276 BOOL CCJShellList::InitSystemImageLists()
00277 {
00278     SHFILEINFO sfi;
00279
00280     HIMAGELIST himlSmall = (HIMAGELIST)::SHGetFileInfo( _T("C:\\"), 0, &sfi,
00281         sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON );
00282
00283     HIMAGELIST himlLarge = (HIMAGELIST)::SHGetFileInfo( _T("C:\\"), 0, &sfi,
00284         sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_LARGEICON );
00285
00286     if( himlSmall && himlLarge ) {
00287         SetImageList( CImageList::FromHandle( himlSmall ), LVSIL_SMALL  );
00288         SetImageList( CImageList::FromHandle( himlLarge ), LVSIL_NORMAL );
00289         return TRUE;
00290     }
00291
00292     return FALSE;
00293 }
00294
00295 BOOL CCJShellList::PopulateListView(LPTVITEMDATA lptvid, LPSHELLFOLDER lpsf)
00296 {
00297     m_bBuildingList = TRUE;
00298     CWaitCursor wait;   // display wait cursor
00299     SetRedraw(FALSE);
00300
00301     // If no image list is defined yet...
00302     if( GetImageList( LVSIL_NORMAL ) == NULL ) {
00303         if( !InitSystemImageLists( )) {
00304             return FALSE;
00305         }
00306     }
00307
00308     // Clear the list control.
00309     DeleteAllItems();
00310
00311     // Initialize the list control.
00312     if ( !InitListViewItems( lptvid, lpsf )) {
00313         m_bBuildingList = FALSE;
00314         return FALSE;
00315     }
00316
00317     // if the list has been previously sorted, sort the
00318     // new contents based upon last sort.
00319     if( m_nSortedCol != -1 ) {
00320         SortList( m_nSortedCol, m_bAscending );
00321     }
00322
00323     m_bBuildingList = FALSE;
00324     SetRedraw();
00325     return TRUE;
00326 }
00327
00328 BOOL CCJShellList::InitListViewItems(LPTVITEMDATA lptvid, LPSHELLFOLDER lpsf)
00329 {
00330     int          iCtr;
00331     HRESULT      hr;
00332     LPMALLOC     lpMalloc;
00333     LPITEMIDLIST lpifqThisItem=NULL;
00334     LPITEMIDLIST lpi=NULL;
00335     LPENUMIDLIST lpe=NULL;
00336     LPLVITEMDATA lplvid;
00337     ULONG        ulFetched, ulAttrs;
00338     HWND         hwnd=::GetParent(GetSafeHwnd());
00339
00340     hr=SHGetMalloc(&lpMalloc);
00341     if (FAILED(hr))
00342        return FALSE;
00343
00344     if (SUCCEEDED(hr))
00345     {
00346         DWORD dwFlags = SHCONTF_FOLDERS | SHCONTF_NONFOLDERS;
00347         if( m_bShowHidden )
00348             dwFlags |= SHCONTF_INCLUDEHIDDEN;
00349         hr=lpsf->EnumObjects( hwnd, dwFlags, &lpe );
00350
00351         if (SUCCEEDED(hr))
00352         {
00353             iCtr = 0;
00354
00355             while (S_OK==lpe->Next(1, &lpi, &ulFetched))
00356             {
00357                 //OK, let's get some memory for our ITEMDATA struct
00358                 lplvid = (LPLVITEMDATA)lpMalloc->Alloc(sizeof(LVITEMDATA));
00359                 if (!lplvid)
00360                 {
00361                     if (lpe) {
00362                         lpe->Release();
00363                     }
00364                     if (lpi && lpMalloc) {
00365                         lpMalloc->Free(lpi);
00366                     }
00367                     if (lpifqThisItem && lpMalloc) {
00368                         lpMalloc->Free(lpifqThisItem);
00369                     }
00370                     if (lpMalloc) {
00371                         lpMalloc->Release();
00372                     }
00373                     return FALSE;
00374                 }
00375
00376                 //Note that since we are interested in the display attributes as well as
00377                 //the other attributes, we need to set ulAttrs to SFGAO_DISPLAYATTRMASK
00378                 //before calling GetAttributesOf();
00379
00380                 ulAttrs=SFGAO_DISPLAYATTRMASK;
00381
00382                 lpsf->GetAttributesOf(1, (const struct _ITEMIDLIST **)&lpi, &ulAttrs);
00383                 lplvid->ulAttribs=ulAttrs;
00384
00385                 lpifqThisItem=m_shell.ConcatPidls(lptvid->lpifq, lpi);
00386
00387                 lplvid->lpsfParent=lpsf;
00388                 lpsf->AddRef();
00389
00390                 //Now, make a copy of the ITEMIDLIST
00391                 lplvid->lpi=m_shell.CopyITEMID(lpMalloc, lpi);
00392
00393                 TCHAR szBuff[256];
00394                 if( m_shell.GetName(lpsf, lpi, SHGDN_NORMAL, szBuff) == FALSE )
00395                 {
00396                     if (lpe) {
00397                         lpe->Release();
00398                     }
00399                     if (lpi && lpMalloc) {
00400                         lpMalloc->Free(lpi);
00401                     }
00402                     if (lpifqThisItem && lpMalloc) {
00403                         lpMalloc->Free(lpifqThisItem);
00404                     }
00405                     if(lplvid && lpMalloc) {
00406                         lplvid->lpsfParent->Release();
00407                         lpMalloc->Free(lplvid->lpi);
00408                         lpMalloc->Free(lplvid);
00409                     }
00410                     if (lpMalloc) {
00411                         lpMalloc->Release();
00412                     }
00413                     return FALSE;
00414                 }
00415
00416                 // Add the item to the listview
00417                 int nIndex = InsertListItem(szBuff);
00418                 if (nIndex != -1)
00419                     SetItemData(nIndex, (LPARAM)lplvid);
00420
00421                 lpMalloc->Free(lpifqThisItem);
00422                 lpMalloc->Free(lpi);  //Finally, free the pidl that the shell gave us...
00423
00424                 lpifqThisItem=0;
00425                 lpi=0;
00426             }
00427         }
00428     }
00429
00430     if (lpe) {
00431         lpe->Release();
00432     }
00433     if (lpMalloc) {
00434         lpMalloc->Release();
00435     }
00436
00437     return TRUE;
00438 }
00439
00440 int CALLBACK CCJShellList::ListViewCompareProc(LPARAM lparam1, LPARAM lparam2, LPARAM /*lparamSort*/)
00441 {
00442     LPLVITEMDATA lplvid1=(LPLVITEMDATA)lparam1;
00443     LPLVITEMDATA lplvid2=(LPLVITEMDATA)lparam2;
00444     HRESULT   hr;
00445
00446     hr = lplvid1->lpsfParent->CompareIDs(0,lplvid1->lpi,lplvid2->lpi);
00447
00448     if (FAILED(hr))
00449         return 0;
00450
00451     return (hr);
00452 }
00453
00454 void CCJShellList::RefreshList()
00455 {
00456     LPTVITEMDATA    lptvid;  //Long pointer to TreeView item data
00457     LPSHELLFOLDER   lpsf2=NULL;
00458     HTREEITEM       hItem = m_pTreeCtrl->GetSelectedItem();
00459     HRESULT         hr;
00460
00461     if( hItem != NULL )
00462     {
00463         lptvid=(LPTVITEMDATA)m_pTreeCtrl->GetItemData(hItem);
00464
00465         if (lptvid && lptvid->lpsfParent && lptvid->lpi)
00466         {
00467             hr=lptvid->lpsfParent->BindToObject(lptvid->lpi,
00468                 0,IID_IShellFolder,(LPVOID *)&lpsf2);
00469
00470             if (SUCCEEDED(hr))
00471             {
00472                 PopulateListView(lptvid,lpsf2);
00473             }
00474         }
00475     }
00476 }
00477
00478 long CCJShellList::OnShellNotify(WPARAM wParam, LPARAM /*lParam*/)
00479 {
00480     switch (wParam)
00481     {
00482     case NM_SH_SHELLMENU:
00483         RefreshList();
00484         break;
00485     }
00486
00487     return 0;
00488 }
00489
00490 int CCJShellList::InsertListItem(CString strFileName, BOOL bParse/*=TRUE*/)
00491 {
00492     WIN32_FIND_DATA FindData;
00493     memset (&FindData, 0, sizeof(WIN32_FIND_DATA));
00494
00495     CString strFolderPath;
00496
00497     if (bParse)
00498     {
00499         m_pTreeCtrl->GetSelectedFolderPath(strFolderPath);
00500
00501         if (strFolderPath.IsEmpty())
00502             return -1;
00503
00504         if (strFolderPath.GetAt(strFolderPath.GetLength()-1) != '\\')
00505             strFolderPath += "\\";
00506
00507         strFolderPath += strFileName;
00508     }
00509
00510     else
00511     {
00512         strFolderPath = strFileName;
00513     }
00514
00515     // First see if the original file exists.
00516     HANDLE hFind = FindFirstFile(strFolderPath, &FindData);
00517
00518     if ( hFind == INVALID_HANDLE_VALUE ) {
00519         strFolderPath += _T(".pif");
00520         hFind = FindFirstFile(strFolderPath, &FindData);
00521     }
00522
00523     if ( hFind != INVALID_HANDLE_VALUE )
00524     {
00525         // close the specified search handle, fixes memory leak.
00526         FindClose(hFind);
00527
00528         CString strBuff;
00529         strBuff.Format(_T("%d"), FindData.nFileSizeLow);
00530
00531         // Add the item to the listview
00532         int nIndex = InsertItem(GetItemCount(),
00533             m_shell.GetDisplayName(strFolderPath), m_shell.GetIconIndex(strFolderPath));
00534
00535         if (nIndex == -1)
00536             return -1;
00537
00538         if (strBuff.Compare(_T("0")))
00539         {
00540             SetItem(nIndex, 1, LVIF_TEXT | LVIF_STATE, m_shell.GetFileSizeString(strBuff),
00541                 0, INDEXTOSTATEIMAGEMASK(1), LVIS_STATEIMAGEMASK, NULL);
00542         }
00543
00544         strBuff = m_shell.GetFileType(strFolderPath);
00545
00546         SetItem(nIndex, 2, LVIF_TEXT | LVIF_STATE, strBuff,
00547             0, INDEXTOSTATEIMAGEMASK(1), LVIS_STATEIMAGEMASK, NULL);
00548         CTime time( FindData.ftLastWriteTime );
00549         strBuff = m_shell.GetLastWriteTime( &time );
00550
00551         SetItem(nIndex, 3, LVIF_TEXT | LVIF_STATE, strBuff,
00552             0, INDEXTOSTATEIMAGEMASK(1), LVIS_STATEIMAGEMASK, NULL);
00553
00554         return nIndex;
00555     }
00556
00557     return -1;
00558 }
00559
00560 void CCJShellList::BuildDefaultColumns()
00561 {
00562     // build the columns used with this control.
00563     int nCols = 4;
00564     int nWidth[] = { 150, 80, 80, 80 };
00565     int nColString[] = { IDS_NAME, IDS_SIZE, IDS_TYPE, IDS_MODIFIED };
00566
00567     BuildColumns(nCols, nWidth, nColString);
00568 }
00569
00570 #endif // (_WIN32_IE >= 0x0400)
Generated on Sat Aug 7 22:43:06 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/fnmatch.c Source File

common/fnmatch.c

Go to the documentation of this file.
00001 /* Copyright (C) 1992 Free Software Foundation, Inc.
00002 This file is part of the GNU C Library.
00003
00004 The GNU C Library is free software; you can redistribute it and/or
00005 modify it under the terms of the GNU Library General Public License as
00006 published by the Free Software Foundation; either version 2 of the
00007 License, or (at your option) any later version.
00008
00009 The GNU C Library is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 Library General Public License for more details.  */
00013
00014 /* Modified slightly by Brian Berliner <berliner@sun.com> and
00015    Jim Blandy <jimb@cyclic.com> for CVS use */
00016
00017 /*
00018  * Modified for WinCvs/MacCVS : Alexandre Parenteau <aubonbeurre@hotmail.com> --- June 1998
00019  */
00020
00021 #ifdef HAVE_CONFIG_H
00022 #include "config.h"
00023 #endif
00024
00025 /* IGNORE(@ */
00026 /* #include <ansidecl.h> */
00027 /* @) */
00028 #include <errno.h>
00029 #include "fnmatch.h"
00030 #ifdef TARGET_OS_MAC
00031 #   define not notnot
00032 #endif /* TARGET_OS_MAC */
00033
00034 /* Some file systems are case-insensitive.  If FOLD_FN_CHAR is
00035    #defined, it maps the character C onto its "canonical" form.  In a
00036    case-insensitive system, it would map all alphanumeric characters
00037    to lower case.  Under Windows NT, / and \ are both path component
00038    separators, so FOLD_FN_CHAR would map them both to /.  */
00039 #ifndef FOLD_FN_CHAR
00040 #define FOLD_FN_CHAR(c) (c)
00041 #endif
00042
00043 #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) && !defined(WIN32) && !defined(TARGET_OS_MAC)
00044 extern int errno;
00045 #endif
00046
00047 /* Match STRING against the filename pattern PATTERN, returning zero if
00048    it matches, nonzero if not.  */
00049 int
00050 #if __STDC__
00051 fnmatch (const char *pattern, const char *string, int flags)
00052 #else
00053 fnmatch (pattern, string, flags)
00054     char *pattern;
00055     char *string;
00056     int flags;
00057 #endif
00058 {
00059   register const char *p = pattern, *n = string;
00060   register char c;
00061
00062   if ((flags & ~__FNM_FLAGS) != 0)
00063     {
00064       errno = EINVAL;
00065       return -1;
00066     }
00067
00068   while ((c = *p++) != '\0')
00069     {
00070       switch (c)
00071     {
00072     case '?':
00073       if (*n == '\0')
00074         return FNM_NOMATCH;
00075       else if ((flags & FNM_PATHNAME) && *n == '/')
00076         return FNM_NOMATCH;
00077       else if ((flags & FNM_PERIOD) && *n == '.' &&
00078            (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00079         return FNM_NOMATCH;
00080       break;
00081
00082     case '\\':
00083       if (!(flags & FNM_NOESCAPE))
00084         c = *p++;
00085       if (*n != c)
00086         return FNM_NOMATCH;
00087       break;
00088
00089     case '*':
00090       if ((flags & FNM_PERIOD) && *n == '.' &&
00091           (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00092         return FNM_NOMATCH;
00093
00094       for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
00095         if (((flags & FNM_PATHNAME) && *n == '/') ||
00096         (c == '?' && *n == '\0'))
00097           return FNM_NOMATCH;
00098
00099       if (c == '\0')
00100         return 0;
00101
00102       {
00103         char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
00104         for (--p; *n != '\0'; ++n)
00105           if ((c == '[' || *n == c1) &&
00106           fnmatch(p, n, flags & ~FNM_PERIOD) == 0)
00107         return 0;
00108         return FNM_NOMATCH;
00109       }
00110
00111     case '[':
00112       {
00113         /* Nonzero if the sense of the character class is inverted.  */
00114         register int not;
00115
00116         if (*n == '\0')
00117           return FNM_NOMATCH;
00118
00119         if ((flags & FNM_PERIOD) && *n == '.' &&
00120         (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
00121           return FNM_NOMATCH;
00122
00123         not = (*p == '!' || *p == '^');
00124         if (not)
00125           ++p;
00126
00127         c = *p++;
00128         for (;;)
00129           {
00130         register char cstart = c, cend = c;
00131
00132         if (!(flags & FNM_NOESCAPE) && c == '\\')
00133           cstart = cend = *p++;
00134
00135         if (c == '\0')
00136           /* [ (unterminated) loses.  */
00137           return FNM_NOMATCH;
00138
00139         c = *p++;
00140
00141         if ((flags & FNM_PATHNAME) && c == '/')
00142           /* [/] can never match.  */
00143           return FNM_NOMATCH;
00144
00145         if (c == '-' && *p != ']')
00146           {
00147             cend = *p++;
00148             if (!(flags & FNM_NOESCAPE) && cend == '\\')
00149               cend = *p++;
00150             if (cend == '\0')
00151               return FNM_NOMATCH;
00152             c = *p++;
00153           }
00154
00155         if (*n >= cstart && *n <= cend)
00156           goto matched;
00157
00158         if (c == ']')
00159           break;
00160           }
00161         if (!not)
00162           return FNM_NOMATCH;
00163         break;
00164
00165       matched:;
00166         /* Skip the rest of the [...] that already matched.  */
00167         while (c != ']')
00168           {
00169         if (c == '\0')
00170           /* [... (unterminated) loses.  */
00171           return FNM_NOMATCH;
00172
00173         c = *p++;
00174         if (!(flags & FNM_NOESCAPE) && c == '\\')
00175           /* 1003.2d11 is unclear if this is right.  %%% */
00176           ++p;
00177           }
00178         if (not)
00179           return FNM_NOMATCH;
00180       }
00181       break;
00182
00183     default:
00184       if (FOLD_FN_CHAR (c) != FOLD_FN_CHAR (*n))
00185         return FNM_NOMATCH;
00186     }
00187
00188       ++n;
00189     }
00190
00191   if (*n == '\0')
00192     return 0;
00193
00194   return FNM_NOMATCH;
00195 }
00196
00197 #if defined (__CYGWIN32__) || defined (WIN32)
00198 #if 0
00199 main ()
00200 {
00201   int c;
00202
00203   for (c = 0; c < 256; c++)
00204     {
00205       int t;
00206
00207       if (c == '\\')
00208         t = '/';
00209       else
00210         t = tolower (c);
00211
00212       if ((c & 0x7) == 0x0)
00213          printf ("    ");
00214       printf ("0x%02x,", t);
00215       if ((c & 0x7) == 0x7)
00216          putchar ('\n');
00217       else if ((c & 0x7) == 0x3)
00218          putchar (' ');
00219     }
00220 }
00221 #endif
00222
00223 unsigned char
00224 WNT_filename_classes[] =
00225 {
00226     0x00,0x01,0x02,0x03, 0x04,0x05,0x06,0x07,
00227     0x08,0x09,0x0a,0x0b, 0x0c,0x0d,0x0e,0x0f,
00228     0x10,0x11,0x12,0x13, 0x14,0x15,0x16,0x17,
00229     0x18,0x19,0x1a,0x1b, 0x1c,0x1d,0x1e,0x1f,
00230     0x20,0x21,0x22,0x23, 0x24,0x25,0x26,0x27,
00231     0x28,0x29,0x2a,0x2b, 0x2c,0x2d,0x2e,0x2f,
00232     0x30,0x31,0x32,0x33, 0x34,0x35,0x36,0x37,
00233     0x38,0x39,0x3a,0x3b, 0x3c,0x3d,0x3e,0x3f,
00234     0x40,0x61,0x62,0x63, 0x64,0x65,0x66,0x67,
00235     0x68,0x69,0x6a,0x6b, 0x6c,0x6d,0x6e,0x6f,
00236     0x70,0x71,0x72,0x73, 0x74,0x75,0x76,0x77,
00237     0x78,0x79,0x7a,0x5b, 0x2f,0x5d,0x5e,0x5f,
00238     0x60,0x61,0x62,0x63, 0x64,0x65,0x66,0x67,
00239     0x68,0x69,0x6a,0x6b, 0x6c,0x6d,0x6e,0x6f,
00240     0x70,0x71,0x72,0x73, 0x74,0x75,0x76,0x77,
00241     0x78,0x79,0x7a,0x7b, 0x7c,0x7d,0x7e,0x7f,
00242     0x80,0x81,0x82,0x83, 0x84,0x85,0x86,0x87,
00243     0x88,0x89,0x8a,0x8b, 0x8c,0x8d,0x8e,0x8f,
00244     0x90,0x91,0x92,0x93, 0x94,0x95,0x96,0x97,
00245     0x98,0x99,0x9a,0x9b, 0x9c,0x9d,0x9e,0x9f,
00246     0xa0,0xa1,0xa2,0xa3, 0xa4,0xa5,0xa6,0xa7,
00247     0xa8,0xa9,0xaa,0xab, 0xac,0xad,0xae,0xaf,
00248     0xb0,0xb1,0xb2,0xb3, 0xb4,0xb5,0xb6,0xb7,
00249     0xb8,0xb9,0xba,0xbb, 0xbc,0xbd,0xbe,0xbf,
00250     0xc0,0xc1,0xc2,0xc3, 0xc4,0xc5,0xc6,0xc7,
00251     0xc8,0xc9,0xca,0xcb, 0xcc,0xcd,0xce,0xcf,
00252     0xd0,0xd1,0xd2,0xd3, 0xd4,0xd5,0xd6,0xd7,
00253     0xd8,0xd9,0xda,0xdb, 0xdc,0xdd,0xde,0xdf,
00254     0xe0,0xe1,0xe2,0xe3, 0xe4,0xe5,0xe6,0xe7,
00255     0xe8,0xe9,0xea,0xeb, 0xec,0xed,0xee,0xef,
00256     0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,0xf6,0xf7,
00257     0xf8,0xf9,0xfa,0xfb, 0xfc,0xfd,0xfe,0xff,
00258 };
00259 #endif /* (__CYGWIN32__) || defined (WIN32) */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CMenuItemInfo Member List

This is the complete list of members for CMenuItemInfo, including all inherited members.

CMenuItemInfo() CMenuItemInfo [inline]

Generated on Sat Aug 7 22:55:12 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoLockHandler Member List

This is the complete list of members for KoLockHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoLockHandler() | KoLockHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoLockHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoLockHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:54:19 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

KoCommitHandler Member List

This is the complete list of members for KoCommitHandler, including all inherited members.

GetNeedSelection() const | KiSelectionHandler |
GetNeedViewReset() const | KiSelectionHandler |
GetSelection() | KiSelectionHandler | [virtual]
GetSelType() const | KiSelectionHandler |
KiSelectionHandler(const char *strCommand, bool needSelection=true, bool needResetView=false) | KiSelectionHandler |
KoCommitHandler() | KoCommitHandler | [inline]
m_needSelection | KiSelectionHandler | [protected]
m_needViewReset | KiSelectionHandler | [protected]
NeedsNormalize() | KiSelectionHandler | [virtual]
OnFiles(MultiFiles *pmf) | KoCommitHandler | [inline, virtual]
OnFolder(const char *fullpath) | KoCommitHandler | [inline, virtual]
~KiSelectionHandler() | KiSelectionHandler | [virtual]

Generated on Sat Aug 7 22:53:59 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJReBarCtrl.h Source File

WinCvs/CJLib/Include/CJReBarCtrl.h

Go to the documentation of this file.
00001 // CJReBarCtrl.h : header file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00005 // Copied from MFC, Visual C++ 6, to extend functionality to Visual C++ 5
00006 // users, with some ideas taken from Luis Barreira's article 'Classes for new IE4 controls'
00007 // http://www.codeguru.com/controls/ie4_controls_classes.shtml
00008 //
00010 /****************************************************************************
00011  *
00012  * $Date: 1999/11/30 21:45:51 $
00013  * $Revision: 1.1.1.3 $
00014  * $Archive: /CodeJockey/Include/CJReBarCtrl.h $
00015  *
00016  * $History: CJReBarCtrl.h $
00017  *
00018  * *****************  Version 7  *****************
00019  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00020  * Updated in $/CodeJockey/Include
00021  * Updated copyright and contact information.
00022  *
00023  * *****************  Version 6  *****************
00024  * User: Kirk Stowell Date: 7/31/99    Time: 4:27p
00025  * Updated in $/CodeJockey/Include
00026  *
00027  * *****************  Version 4  *****************
00028  * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
00029  * Updated in $/CodeJockey/Include
00030  *
00031  * *****************  Version 3  *****************
00032  * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
00033  * Updated in $/CodeJockey/Include
00034  *
00035  * *****************  Version 2  *****************
00036  * User: Kirk Stowell Date: 7/18/99    Time: 10:13p
00037  * Updated in $/CodeJockey/Include
00038  * Cleaned up inline functions, and import/export macro so that class will
00039  * be imported when linked to, and exported at compile time.
00040  *
00041  * *****************  Version 1  *****************
00042  * User: Kirk Stowell Date: 7/14/99    Time: 10:29p
00043  * Created in $/CodeJockey/Include
00044  * Copied from MFC v6 and techno preview for v5. Added to extend
00045  * functionality to Visual C++ 5.0 users.
00046  *
00047  ***************************************************************************/
00049
00050 #ifndef __CJREBARCTRL_H__
00051 #define __CJREBARCTRL_H__
00052
00054
00055   class CImageList;
00056   class CToolTipCtrl;
00057
00058 // The CCJReBarCtrl class encapsulates the functionality of a rebar control,
00059 // which is a container for a child window. The application in which the rebar
00060 // control resides assigns the child window contained by the rebar control to the
00061 // rebar band. The child window is usually another common control.
00062 class _CJX_EXT_CLASS CCJReBarCtrl : public CWnd
00063 {
00064   DECLARE_DYNAMIC(CCJReBarCtrl)
00065
00066 // Construction
00067 public:
00068   CCJReBarCtrl();
00069   BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
00070
00071 // Attributes
00072 public:
00073   UINT GetBandCount() const;
00074   BOOL GetBandInfo(UINT uBand, REBARBANDINFO* prbbi) const;
00075   UINT GetBarHeight() const;
00076   BOOL GetBarInfo(REBARINFO* prbi) const;
00077   COLORREF GetBkColor() const;
00078   IDropTarget* GetDropTarget() const;
00079   BOOL GetRect(UINT uBand, LPRECT prc) const;
00080   UINT GetRowCount() const;
00081   UINT GetRowHeight(UINT uRow) const;
00082   COLORREF GetTextColor() const;
00083   CToolTipCtrl* GetToolTips() const;
00084   int IDToIndex(UINT uBandID) const;
00085   BOOL SetBandInfo(UINT uBand, REBARBANDINFO* prbbi);
00086   BOOL SetBarInfo(REBARINFO* prbi);
00087   COLORREF SetBkColor(COLORREF clr);
00088   CWnd* SetOwner(CWnd* pWnd);
00089   COLORREF SetTextColor(COLORREF clr);
00090   void SetToolTips(CToolTipCtrl* pToolTip);
00091   CImageList* GetImageList() const;
00092   BOOL SetImageList(CImageList* pImageList);
00093   void GetBandBorders(UINT uBand, LPRECT prc) const;
00094   CPalette* GetPalette() const;
00095   CPalette* SetPalette(HPALETTE hPal);
00096   BOOL GetColorScheme(COLORSCHEME* lpcs);
00097   void SetColorScheme(const COLORSCHEME* lpcs);
00098
00099 // Operations
00100 public:
00101   void BeginDrag(UINT uBand, DWORD dwPos = (DWORD)-1);
00102   BOOL DeleteBand(UINT uBand);
00103   void DragMove(DWORD dwPos = (DWORD)-1);
00104   void EndDrag();
00105   int HitTest(RBHITTESTINFO* prbht);
00106   BOOL InsertBand(UINT uIndex, REBARBANDINFO* prbbi);
00107   void MaximizeBand(UINT uBand);
00108   void MinimizeBand(UINT uBand);
00109   BOOL ShowBand(UINT uBand, BOOL fShow = TRUE);
00110   BOOL SizeToRect(CRect& rect);
00111   BOOL MoveBand(UINT uFrom, UINT uTo);
00112 };
00113
00115 //  Inline Functions
00117
00118 _CJXLIB_INLINE UINT CCJReBarCtrl::GetBandCount() const
00119     { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETBANDCOUNT, 0, 0L); }
00120
00121 _CJXLIB_INLINE BOOL CCJReBarCtrl::GetBandInfo(UINT uBand, REBARBANDINFO* prbbi) const
00122     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETBANDINFO, uBand, (LPARAM)prbbi); }
00123
00124 _CJXLIB_INLINE UINT CCJReBarCtrl::GetBarHeight() const
00125     { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETBARHEIGHT, 0, 0L); }
00126
00127 _CJXLIB_INLINE BOOL CCJReBarCtrl::GetBarInfo(REBARINFO* prbi) const
00128     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETBARINFO, 0, (LPARAM)prbi); }
00129
00130 _CJXLIB_INLINE COLORREF CCJReBarCtrl::GetBkColor() const
00131     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_GETBKCOLOR, 0, 0L); }
00132
00133 _CJXLIB_INLINE IDropTarget* CCJReBarCtrl::GetDropTarget() const
00134     { ASSERT(::IsWindow(m_hWnd)); IDropTarget* pdt; ::SendMessage(m_hWnd, RB_GETDROPTARGET, 0, (LPARAM)&pdt); return pdt; }
00135
00136 _CJXLIB_INLINE BOOL CCJReBarCtrl::GetRect(UINT uBand, LPRECT prc) const
00137     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETRECT, uBand, (LPARAM)prc); }
00138
00139 _CJXLIB_INLINE UINT CCJReBarCtrl::GetRowCount() const
00140     { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETROWCOUNT, 0, 0L); }
00141
00142 _CJXLIB_INLINE UINT CCJReBarCtrl::GetRowHeight(UINT uRow) const
00143     { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETROWHEIGHT, uRow, 0L); }
00144
00145 _CJXLIB_INLINE COLORREF CCJReBarCtrl::GetTextColor() const
00146     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_GETTEXTCOLOR, 0, 0L); }
00147
00148 _CJXLIB_INLINE CToolTipCtrl* CCJReBarCtrl::GetToolTips() const
00149     { ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, RB_GETTOOLTIPS, 0, 0L)); }
00150
00151 _CJXLIB_INLINE int CCJReBarCtrl::IDToIndex(UINT uBandID) const
00152     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, RB_IDTOINDEX, uBandID, 0L); }
00153
00154 _CJXLIB_INLINE BOOL CCJReBarCtrl::SetBandInfo(UINT uBand, REBARBANDINFO* prbbi)
00155     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SETBANDINFO, uBand, (LPARAM)prbbi); }
00156
00157 _CJXLIB_INLINE BOOL CCJReBarCtrl::SetBarInfo(REBARINFO* prbi)
00158     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SETBARINFO, 0, (LPARAM)prbi); }
00159
00160 _CJXLIB_INLINE COLORREF CCJReBarCtrl::SetBkColor(COLORREF clr)
00161     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_SETBKCOLOR, 0, (LPARAM)clr); }
00162
00163 _CJXLIB_INLINE CWnd* CCJReBarCtrl::SetOwner(CWnd* pWnd)
00164     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle((HWND)::SendMessage(m_hWnd, RB_SETPARENT, (WPARAM)pWnd->m_hWnd, 0L)); }
00165
00166 _CJXLIB_INLINE COLORREF CCJReBarCtrl::SetTextColor(COLORREF clr)
00167     { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_SETTEXTCOLOR, 0, (LPARAM)clr); }
00168
00169 _CJXLIB_INLINE void CCJReBarCtrl::SetToolTips(CToolTipCtrl* pToolTip)
00170     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_SETTOOLTIPS, (WPARAM)pToolTip->m_hWnd, 0L); }
00171
00172 _CJXLIB_INLINE void CCJReBarCtrl::GetBandBorders(UINT uBand, LPRECT prc) const
00173     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_GETBANDBORDERS, uBand, (LPARAM)prc); }
00174
00175 _CJXLIB_INLINE CPalette* CCJReBarCtrl::GetPalette() const
00176     { ASSERT(::IsWindow(m_hWnd)); return CPalette::FromHandle((HPALETTE)::SendMessage(m_hWnd, RB_GETPALETTE, 0, 0L)); }
00177
00178 _CJXLIB_INLINE CPalette* CCJReBarCtrl::SetPalette(HPALETTE hPal)
00179     { ASSERT(::IsWindow(m_hWnd)); return CPalette::FromHandle((HPALETTE)::SendMessage(m_hWnd, RB_SETPALETTE, 0, (LPARAM)hPal)); }
00180
00181 _CJXLIB_INLINE void CCJReBarCtrl::BeginDrag(UINT uBand, DWORD dwPos)
00182     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_BEGINDRAG, uBand, dwPos); }
00183
00184 _CJXLIB_INLINE BOOL CCJReBarCtrl::DeleteBand(UINT uBand)
00185     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_DELETEBAND, uBand, 0L); }
00186
00187 _CJXLIB_INLINE void CCJReBarCtrl::DragMove(DWORD dwPos)
00188     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_DRAGMOVE, 0, dwPos); }
00189
00190 _CJXLIB_INLINE void CCJReBarCtrl::EndDrag()
00191     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_ENDDRAG, 0, 0L); }
00192
00193 _CJXLIB_INLINE int CCJReBarCtrl::HitTest(RBHITTESTINFO* prbht)
00194     { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, RB_HITTEST, 0, (LPARAM)prbht); }
00195
00196 _CJXLIB_INLINE BOOL CCJReBarCtrl::InsertBand(UINT uIndex, REBARBANDINFO* prbbi)
00197     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_INSERTBAND, uIndex, (LPARAM)prbbi); }
00198
00199 _CJXLIB_INLINE void CCJReBarCtrl::MaximizeBand(UINT uBand)
00200     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_MAXIMIZEBAND, uBand, 0L); }
00201
00202 _CJXLIB_INLINE void CCJReBarCtrl::MinimizeBand(UINT uBand)
00203     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_MINIMIZEBAND, uBand, 0L); }
00204
00205 _CJXLIB_INLINE BOOL CCJReBarCtrl::ShowBand(UINT uBand, BOOL fShow)
00206     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SHOWBAND, uBand, fShow); }
00207
00208 _CJXLIB_INLINE BOOL CCJReBarCtrl::SizeToRect(CRect& rect)
00209     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SIZETORECT, 0, (LPARAM)&rect); }
00210
00211 _CJXLIB_INLINE BOOL CCJReBarCtrl::MoveBand(UINT uFrom, UINT uTo)
00212     { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_MOVEBAND, uFrom, uTo); }
00213
00214 #endif //__CJREBARCTRL_H__
00215
00217
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/ndir.c Source File

WinCvs/ndir.c

Go to the documentation of this file.
00001 /*  msd_dir.c - portable directory routines
00002     Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
00003
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation; either version 1, or (at your option)
00007     any later version.
00008
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.  */
00013
00014 /* Everything non trivial in this code is from: @(#)msd_dir.c 1.4
00015    87/11/06.  A public domain implementation of BSD directory routines
00016    for MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield),
00017    August 1897 */
00018
00019 /*
00020  * Modified for WinCvs : Alexandre Parenteau <aubonbeurre@hotmail.com> --- March 1998
00021  */
00022
00023
00024 #include <io.h>
00025 #include <stdio.h>
00026 #include <stdlib.h>
00027 #include <string.h>
00028 #include <sys/types.h>
00029 #include <sys/stat.h>
00030
00031 #include <dos.h>
00032
00033 #include <ndir.h>
00034
00035 static void free_dircontents (struct _dircontents *);
00036
00037 /* find ALL files! */
00038 #define ATTRIBUTES  (_A_RDONLY | _A_HIDDEN | _A_SYSTEM | _A_SUBDIR)
00039
00040
00041
00042 DIR *
00043 opendir (const char *name)
00044 {
00045   struct _finddata_t find_buf;
00046   DIR *dirp;
00047   struct _dircontents *dp;
00048   char name_buf[_MAX_PATH + 1];
00049   char *slash = "";
00050   long hFile;
00051
00052   if (!name)
00053     name = "";
00054   else if (*name)
00055     {
00056       const char *s;
00057       int l = strlen (name);
00058
00059       s = name + l - 1;
00060       if ( !(l == 2 && *s == ':') && *s != '\\' && *s != '/')
00061     slash = "/";    /* save to insert slash between path and "*.*" */
00062     }
00063
00064   strcat (strcat (strcpy (name_buf, name), slash), "*.*");
00065
00066   dirp = (DIR *) malloc (sizeof (DIR));
00067   if (dirp == (DIR *)0)
00068     return (DIR *)0;
00069
00070   dirp->dd_loc = 0;
00071   dirp->dd_contents = dirp->dd_cp = (struct _dircontents *) 0;
00072
00073   if ((hFile = _findfirst (name_buf, &find_buf)) < 0)
00074     {
00075       free (dirp);
00076       return (DIR *)0;
00077     }
00078
00079   do
00080     {
00081       dp = (struct _dircontents *) malloc (sizeof (struct _dircontents));
00082       if (dp == (struct _dircontents *)0)
00083     {
00084       free_dircontents (dirp->dd_contents);
00085       return (DIR *)0;
00086     }
00087
00088       dp->_d_entry = malloc (strlen (find_buf.name) + 1);
00089       if (dp->_d_entry == (char *)0)
00090     {
00091       free (dp);
00092       free_dircontents (dirp->dd_contents);
00093       return (DIR *)0;
00094     }
00095
00096       if (dirp->dd_contents)
00097     dirp->dd_cp = dirp->dd_cp->_d_next = dp;
00098       else
00099     dirp->dd_contents = dirp->dd_cp = dp;
00100
00101       strcpy (dp->_d_entry, find_buf.name);
00102
00103       dp->_d_next = (struct _dircontents *)0;
00104
00105     } while (!_findnext (hFile, &find_buf));
00106
00107   dirp->dd_cp = dirp->dd_contents;
00108
00109   _findclose(hFile);
00110
00111   return dirp;
00112 }
00113
00114
00115 void
00116 closedir (DIR *dirp)
00117 {
00118   free_dircontents (dirp->dd_contents);
00119   free ((char *) dirp);
00120 }
00121
00122
00123 struct direct *
00124 readdir (DIR *dirp)
00125 {
00126   static struct direct dp;
00127
00128   if (dirp->dd_cp == (struct _dircontents *)0)
00129     return (struct direct *)0;
00130   dp.d_namlen = dp.d_reclen =
00131     strlen (strcpy (dp.d_name, dirp->dd_cp->_d_entry));
00132 #if 0 /* JB */
00133   strlwr (dp.d_name);       /* JF */
00134 #endif
00135   dp.d_ino = 0;
00136   dirp->dd_cp = dirp->dd_cp->_d_next;
00137   dirp->dd_loc++;
00138
00139   return &dp;
00140 }
00141
00142
00143 void
00144 seekdir (DIR *dirp, long off)
00145 {
00146   long i = off;
00147   struct _dircontents *dp;
00148
00149   if (off < 0)
00150     return;
00151   for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next)
00152     ;
00153   dirp->dd_loc = off - (i + 1);
00154   dirp->dd_cp = dp;
00155 }
00156
00157
00158 long
00159 telldir (DIR *dirp)
00160 {
00161   return dirp->dd_loc;
00162 }
00163
00164
00165 /* Garbage collection */
00166
00167 static void
00168 free_dircontents (struct _dircontents *dp)
00169 {
00170   struct _dircontents *odp;
00171
00172   while (dp)
00173     {
00174       if (dp->_d_entry)
00175     free (dp->_d_entry);
00176       dp = (odp = dp)->_d_next;
00177       free (odp);
00178     }
00179 }
00180
00181
00182 #ifdef TEST
00183
00184 void main (int argc, char *argv[]);
00185
00186 void
00187 main (int argc, char *argv[])
00188 {
00189   static DIR *directory;
00190   struct direct *entry = (struct direct *)0;
00191
00192   char *name = "";
00193
00194   if (argc > 1)
00195     name = argv[1];
00196
00197   directory = opendir (name);
00198
00199   if (!directory)
00200     {
00201       fprintf (stderr, "can't open directory `%s'.\n", name);
00202       exit (2);
00203     }
00204
00205   while (entry = readdir (directory))
00206     printf ("> %s\n", entry->d_name);
00207
00208   printf ("done.\n");
00209 }
00210
00211 #endif /* TEST */
00212
00213 /*
00214  * Local Variables:
00215  * mode:C
00216  * ChangeLog:ChangeLog
00217  * compile-command:make
00218  * End:
00219  */
Generated on Sat Aug 7 22:43:10 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getopt.h Source File

common/getopt.h

Go to the documentation of this file.
00001 /* Declarations for getopt.
00002    Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
00003
00004    This program is free software; you can redistribute it and/or modify it
00005    under the terms of the GNU General Public License as published by the
00006    Free Software Foundation; either version 2, or (at your option) any
00007    later version.
00008
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.  */
00013
00014 #ifndef _GETOPT_H
00015 #define _GETOPT_H 1
00016
00017 #ifdef  __cplusplus
00018 extern "C" {
00019 #endif
00020
00021 #if !defined(__STDC__) && (defined(TARGET_OS_MAC) || defined(WIN32))
00022 #   define __STDC__ 1
00023 #   define __GNU_LIBRARY__ 1
00024 #   define _LIBC 1
00025 #endif
00026
00027 /* For communication from `getopt' to the caller.
00028    When `getopt' finds an option that takes an argument,
00029    the argument value is returned here.
00030    Also, when `ordering' is RETURN_IN_ORDER,
00031    each non-option ARGV-element is returned here.  */
00032
00033 extern char *optarg;
00034
00035 /* Index in ARGV of the next element to be scanned.
00036    This is used for communication to and from the caller
00037    and for communication between successive calls to `getopt'.
00038
00039    On entry to `getopt', zero means this is the first call; initialize.
00040
00041    When `getopt' returns EOF, this is the index of the first of the
00042    non-option elements that the caller should itself scan.
00043
00044    Otherwise, `optind' communicates from one call to the next
00045    how much of ARGV has been scanned so far.  */
00046
00047 extern int optind;
00048
00049 /* Callers store zero here to inhibit the error message `getopt' prints
00050    for unrecognized options.  */
00051
00052 extern int opterr;
00053
00054 /* Set to an option character which was unrecognized.  */
00055
00056 extern int optopt;
00057
00058 /* Describe the long-named options requested by the application.
00059    The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
00060    of `struct option' terminated by an element containing a name which is
00061    zero.
00062
00063    The field `has_arg' is:
00064    no_argument      (or 0) if the option does not take an argument,
00065    required_argument    (or 1) if the option requires an argument,
00066    optional_argument    (or 2) if the option takes an optional argument.
00067
00068    If the field `flag' is not NULL, it points to a variable that is set
00069    to the value given in the field `val' when the option is found, but
00070    left unchanged if the option is not found.
00071
00072    To have a long-named option do something other than set an `int' to
00073    a compiled-in constant, such as set a value from `optarg', set the
00074    option's `flag' field to zero and its `val' field to a nonzero
00075    value (the equivalent single-letter option character, if there is
00076    one).  For long options that have a zero `flag' field, `getopt'
00077    returns the contents of the `val' field.  */
00078
00079 struct option
00080 {
00081 #if __STDC__
00082   const char *name;
00083 #else
00084   char *name;
00085 #endif
00086   /* has_arg can't be an enum because some compilers complain about
00087      type mismatches in all the code that assumes it is an int.  */
00088   int has_arg;
00089   int *flag;
00090   int val;
00091 };
00092
00093 /* Names for the values of the `has_arg' field of `struct option'.  */
00094
00095 #define no_argument     0
00096 #define required_argument   1
00097 #define optional_argument   2
00098
00099 #if __STDC__
00100 /* there are problems with FreeBSD and GCC > 2
00101    i don't know why it is buggy, but it won't compile on FreeBSD */
00102 #ifndef __FreeBSD__
00103 #if defined(__GNU_LIBRARY__)
00104 /* Many other libraries have conflicting prototypes for getopt, with
00105    differences in the consts, in stdlib.h.  To avoid compilation
00106    errors, only prototype getopt for the GNU C library.  */
00107 extern int getopt (int argc, char *const *argv, const char *shortopts);
00108 #else /* not __GNU_LIBRARY__ */
00109 extern int getopt ();
00110 #endif /* not __GNU_LIBRARY__ */
00111 #endif /* not __FreeBSD__ */
00112
00113 extern int getopt_long (int argc, char *const *argv, const char *shortopts,
00114                 const struct option *longopts, int *longind);
00115 extern int getopt_long_only (int argc, char *const *argv,
00116                  const char *shortopts,
00117                      const struct option *longopts, int *longind);
00118
00119 /* Internal only.  Users should not call this directly.  */
00120 extern int _getopt_internal (int argc, char *const *argv,
00121                  const char *shortopts,
00122                      const struct option *longopts, int *longind,
00123                  int long_only);
00124 #else /* not __STDC__ */
00125 extern int getopt ();
00126 extern int getopt_long ();
00127 extern int getopt_long_only ();
00128
00129 extern int _getopt_internal ();
00130 #endif /* not __STDC__ */
00131
00132 #ifdef  __cplusplus
00133 }
00134 #endif
00135
00136 #endif /* _GETOPT_H */
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/CJLibrary/CJCaption.cpp Source File

WinCvs/CJLib/CJLibrary/CJCaption.cpp

Go to the documentation of this file.
00001 // CJCaption.cpp : implementation file
00002 // Copyright © 1998-1999 CodeJock.com, All Rights Reserved.
00003 // See ReadMe.txt for TERMS OF USE.
00004 //
00006 /****************************************************************************
00007  *
00008  * $Date: 2002/06/15 17:49:37 $
00009  * $Revision: 1.2 $
00010  * $Archive: /CodeJock/CJLibrary/CJCaption.cpp $
00011  *
00012  * $History: CJCaption.cpp $
00013  *
00014  * *****************  Version 17  *****************
00015  * User: Kirk Stowell Date: 10/31/99   Time: 11:41p
00016  * Updated in $/CodeJock/CJLibrary
00017  * Updated OnEraseBkgnd(...) and OnPaint() for flicker free drawing.
00018  *
00019  * Fixed bug when popup window is closed, the mainframe resizes and then
00020  * the popup is reopened and pushpin is pressed, the child will not be
00021  * correctly sized and positioned. Added changes to handle flicker free
00022  * drawing of the control window.
00023  *
00024  * Modified resource include for static builds.
00025  *
00026  * Fixed the bug where the icon on the right hand side of the bar doesn't
00027  * clip when you resize the bar to almost nothing. Added method
00028  * SetTextStyle(...) to set the CDC:: DrawText(...) text styles to be user
00029  * defined. Thanks to Adrian for help with this.
00030  *
00031  * Fixed potential resource and memory leak problems.
00032  *
00033  * Fixed small bug with UNICODE display placing unwanted character at the
00034  * end of the string.
00035  *
00036  * Made class methods virtual for inheritance purposes.
00037  *
00038  * *****************  Version 16  *****************
00039  * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
00040  * Updated in $/CodeJockey/CJLibrary
00041  * Updated copyright and contact information.
00042  *
00043  * *****************  Version 15  *****************
00044  * User: Kirk Stowell Date: 8/29/99    Time: 9:14p
00045  * Updated in $/CodeJockey/CJLibrary
00046  * Added Unicode compliance, thanks to Barry Burton for his help with
00047  * this.
00048  *
00049  * *****************  Version 14  *****************
00050  * User: Kirk Stowell Date: 6/23/99    Time: 12:36a
00051  * Updated in $/CodeJockey/CJLibrary
00052  *
00053  * *****************  Version 13  *****************
00054  * User: Kirk Stowell Date: 6/23/99    Time: 12:04a
00055  * Updated in $/CodeJockey/CJLibrary
00056  *
00057  * *****************  Version 12  *****************
00058  * User: Kirk Stowell Date: 7/25/99    Time: 10:00p
00059  * Updated in $/CodeJockey/CJLibrary
00060  *
00061  * *****************  Version 11  *****************
00062  * User: Kirk Stowell Date: 7/25/99    Time: 12:30a
00063  * Updated in $/CodeJockey/CJLibrary
00064  *
00065  * *****************  Version 10  *****************
00066  * User: Kirk Stowell Date: 7/25/99    Time: 12:15a
00067  * Updated in $/CodeJockey/CJLibrary
00068  *
00069  * *****************  Version 9  *****************
00070  * User: Kirk Stowell Date: 7/24/99    Time: 9:32p
00071  * Updated in $/CodeJockey/CJLibrary
00072  *
00073  * *****************  Version 6  *****************
00074  * User: Kirk Stowell Date: 7/08/99    Time: 2:43a
00075  * Updated in $/CodeJockey/CJLibrary
00076  * Amundsen - Eirik [eirik.amundsen@siemens.no] - Fixed problem with
00077  * caption repainting when banner is smaller than displayed text.
00078  *
00079  * *****************  Version 5  *****************
00080  * User: Kirk Stowell Date: 5/17/99    Time: 8:13p
00081  * Updated in $/CodeJockey/CJ60Lib
00082  * Fixed painting bug with border, cleaned up inline methods.
00083  *
00084  * *****************  Version 4  *****************
00085  * User: Kirk Stowell Date: 4/03/99    Time: 12:35p
00086  * Updated in $/Code Jockey/CJ60Lib
00087  * Added comments and cleaned up code.
00088  *
00089  * *****************  Version 3  *****************
00090  * User: Kirk Stowell Date: 3/03/99    Time: 12:27p
00091  * Updated in $/CodeJockey/CJ60Lib
00092  * Added further functionality to class so that you can define text size,
00093  * text color, border size, border and background color. Basically to
00094  * create a look similar to Outlook's Captions.
00095  *
00096  * *****************  Version 2  *****************
00097  * User: Kirk Stowell Date: 2/01/99    Time: 12:28p
00098  * Updated in $/CodeJockey/CJ60Lib
00099  * Made some cosmetic fixes.
00100  *
00101  * *****************  Version 1  *****************
00102  * User: Kirk Stowell Date: 1/16/99    Time: 12:27p
00103  * Created in $/CodeJockey/CJ60Lib
00104  * Initial first release.
00105  *
00106  ***************************************************************************/
00108
00109 #include "StdAfx.h"
00110 #include "CJResource.h"
00111 #include "CJCaption.h"
00112 #include "CJCaptionPopupWnd.h"
00113
00114 #ifdef _DEBUG
00115 #define new DEBUG_NEW
00116 #undef THIS_FILE
00117 static char THIS_FILE[] = __FILE__;
00118 #endif
00119
00121 // CCJCaptionButton
00122
00123 BEGIN_MESSAGE_MAP(CCJCaptionButton, CCJFlatButton)
00124     //{{AFX_MSG_MAP(CCJCaptionButton)
00125     //}}AFX_MSG_MAP
00126 END_MESSAGE_MAP()
00127
00128 BOOL CCJCaptionButton::SetButtonStyle(CFont* pFont, COLORREF clrBackground, COLORREF clrFont)
00129 {
00130     m_pFont = pFont;
00131     SetAlternateColors(clrBackground, m_clrHilite, m_clrDkShad, clrFont);
00132     return TRUE;
00133 }
00134
00135 void CCJCaptionButton::DrawButtonText(CDC* pDC, UINT nState, CRect& rcItem)
00136 {
00137     // Get the window text, return if empty.
00138     CString strWindowText; GetWindowText(strWindowText);
00139     if( strWindowText.IsEmpty( ))
00140         return;
00141
00142     if( m_pFont == NULL ) {
00143         m_pFont = &m_Font;
00144     }
00145
00146     CRect rc = rcItem;
00147     rc.DeflateRect( 5,0 );
00148
00149     // Set the text color and select the button font.
00150     pDC->SetTextColor(( nState & ODS_DISABLED )?m_clrTextGy:m_clrTextNm);
00151     CFont *oldFont = pDC->SelectObject( m_pFont );
00152
00153     // get the height of the text to be displayed.
00154     int cy = pDC->DrawText( strWindowText, -1, rc, DT_SINGLELINE|DT_CALCRECT );
00155     rc.top = (rcItem.Height()-cy)/2;
00156
00157     // draw the text, and select the original font.
00158     pDC->DrawState( rc.TopLeft(), strWindowText.GetLength(), strWindowText,
00159         ( nState & ODS_DISABLED )?DSS_DISABLED:DSS_NORMAL, TRUE, 0, (HBRUSH)NULL );
00160
00161     // Set up pen to use for drawing the triangle
00162     CPen pen(PS_SOLID, 1, m_clrTextNm);
00163     CPen *pOldPen = pDC->SelectObject( &pen );
00164
00165     // get the client rect.
00166     CRect rcWnd;
00167     GetClientRect(&rcWnd);
00168
00169     // initialize coordinates for triangle.
00170     int x1 = rcWnd.right-11;
00171     int x2 = rcWnd.right-6;
00172     int y1 = rcWnd.bottom-7;
00173     int y2 = rcWnd.bottom-5;
00174
00175     // draw the triangle.
00176     pDC->MoveTo( x1, y1 );
00177     pDC->LineTo( x2, y1 );
00178     pDC->MoveTo( x1+1, y1+1 );
00179     pDC->LineTo( x2-1, y1+1 );
00180     pDC->SetPixel( x1+2, y2, m_clrTextNm );
00181
00182     // restore old pen and font.
00183     pDC->SelectObject( oldFont );
00184     pDC->SelectObject( pOldPen );
00185
00186     // fix potential resource leak - KStowell - 10-21-99
00187     pen.DeleteObject();
00188 }
00189
00191 // CCJCaption
00192
00193 CCJCaption::CCJCaption()
00194 {
00195     m_strWindText   = _T("");
00196     m_pNotifyWnd    = NULL;
00197     m_pWndPopDown   = NULL;
00198     m_pChildWnd     = NULL;
00199     m_cx            = ::GetSystemMetrics(SM_CXSMICON);
00200     m_cy            = ::GetSystemMetrics(SM_CYSMICON);
00201     m_clrBtnHilite  = ::GetSysColor(COLOR_BTNHILIGHT);
00202     m_clrBtnShadow  = ::GetSysColor(COLOR_BTNSHADOW);
00203     m_clrBtnFace    = ::GetSysColor(COLOR_BTNFACE);
00204     m_clrFont       = ::GetSysColor(COLOR_WINDOWTEXT);
00205     m_clrBorder     = ::GetSysColor(COLOR_BTNFACE);
00206     m_clrBackgnd    = ::GetSysColor(COLOR_BTNFACE);
00207     m_nBorder       = 0;
00208     m_pFont         = NULL;
00209     m_hIcon         = NULL;
00210
00211     SetTextStyle( DT_SINGLELINE|DT_END_ELLIPSIS );
00212 }
00213
00214 CCJCaption::~CCJCaption()
00215 {
00216     // fix potential resource leak - KStowell - 10-22-99.
00217     m_Font.DeleteObject();
00218 }
00219
00220 BEGIN_MESSAGE_MAP(CCJCaption, CStatic)
00221     //{{AFX_MSG_MAP(CCJCaption)
00222     ON_WM_PAINT()
00223     ON_WM_SYSCOLORCHANGE()
00224     ON_WM_SIZE()
00225     ON_WM_ERASEBKGND()
00226     //}}AFX_MSG_MAP
00227     ON_BN_CLICKED(IDC_CAPT_BUTTON, OnCaptButton)
00228     ON_MESSAGE(CM_ONPUSHPINBUTTON, OnPushPinButton)
00229     ON_MESSAGE(CM_ONPUSHPINCANCEL, OnPushPinCancel)
00230 END_MESSAGE_MAP()
00231
00233 // CCJCaption message handlers
00234
00235 void CCJCaption::OnPaint()
00236 {
00237     CPaintDC dc(this); // device context for painting
00238
00239     // KStowell - Get the client rect.
00240     CRect rcClient;
00241     GetClientRect( &rcClient );
00242
00243     // KStowell - Create a memory device-context. This is done to help reduce
00244     // screen flicker, since we will paint the entire control to the
00245     // off screen device context first.
00246     CDC memDC;
00247     CBitmap bitmap;
00248     memDC.CreateCompatibleDC(&dc);
00249     bitmap.CreateCompatibleBitmap(&dc, rcClient.Width(), rcClient.Height());
00250     CBitmap* pOldBitmap = memDC.SelectObject(&bitmap);
00251     memDC.FillSolidRect( rcClient, m_clrBtnFace );
00252
00253     // First let the control do its default drawing.
00254     CWnd::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );
00255
00256     // draw the backgound, text and icon.
00257     DrawCaptionBack( &memDC, rcClient );
00258     DrawCaptionText( &memDC, rcClient );
00259     DrawCaptionIcon( &memDC, rcClient );
00260
00261     // KStowell - Copy the memory device context back into the original DC via BitBlt().
00262     dc.BitBlt(rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), &memDC, 0,0, SRCCOPY);
00263
00264     // KStowell - Cleanup resources.
00265     memDC.SelectObject(pOldBitmap);
00266     memDC.DeleteDC();
00267     bitmap.DeleteObject();
00268 }
00269
00270 void CCJCaption::DrawCaptionBack(CDC* pDC, CRect& rcItem)
00271 {
00272     CRect rc = rcItem;
00273
00274     // Set the background mode to transparent.
00275     pDC->SetBkMode( TRANSPARENT );
00276
00277     // repaint the background.
00278     pDC->FillSolidRect( rc, m_clrBtnFace );
00279
00280     // draw the caption border.
00281     if( m_dwExStyle & WS_EX_FLATEDGE ) {
00282         pDC->Draw3dRect(rc, m_clrBtnHilite, m_clrBtnShadow);
00283     }
00284
00285     // draw the caption banner border.
00286     if( m_nBorder != 0 ) {
00287         rc.DeflateRect( m_nBorder, m_nBorder );
00288         pDC->FillSolidRect(rc, m_clrBackgnd);
00289     }
00290 }
00291
00292 void CCJCaption::DrawCaptionText(CDC* pDC, CRect& rcItem)
00293 {
00294     // if the caption text is empty, return.
00295     if( m_strWindText.IsEmpty( ))
00296         return;
00297
00298     if( m_pFont == NULL ) {
00299         m_pFont = &m_Font;
00300     }
00301
00302     CRect rc = rcItem;
00303     rc.OffsetRect( 10,0 );
00304
00305     // Set the text color and select the caption font.
00306     pDC->SetTextColor( m_clrFont );
00307     CFont* oldFont = pDC->SelectObject( m_pFont );
00308
00309     // get the height of the text to be displayed.
00310     int cy = pDC->DrawText( m_strWindText, -1, rc, DT_SINGLELINE|DT_CALCRECT );
00311     rc.top = (rcItem.Height()-cy)/2;
00312     rc.bottom = rc.top+cy;
00313     rc.right  = rcItem.right-(m_cx + m_nBorder);
00314
00315     // draw the text, and select the original font.
00316     pDC->DrawText( m_strWindText, rc, m_dwTextStyle );
00317     pDC->SelectObject( oldFont );
00318 }
00319
00320 void CCJCaption::DrawCaptionIcon(CDC* pDC, CRect& rcItem)
00321 {
00322     // If no icon was defined, just return.
00323     if( m_hIcon == NULL )
00324         return;
00325
00326     CRect rc = rcItem;
00327     rc.left = ( rc.right - m_cx )-( m_nBorder + 2 );
00328
00329     // stop the icon at the left hand border
00330     if (rc.left < m_nBorder) {
00331         rc.left = m_nBorder;
00332     }
00333
00334     rc.top = ( rcItem.Height() - m_cy )/2;
00335     rc.right = rc.left + m_cx;
00336     rc.bottom = rc.top + m_cy;
00337
00338     // Only draw the icon if it will fit into the space between the borders
00339     if (rc.right < rcItem.right - m_nBorder) {
00340         // draw the icon associated with the caption.
00341         ::DrawIconEx( pDC->GetSafeHdc(), rc.left, rc.top, m_hIcon,
00342             rc.Width(), rc.Height(), NULL, (HBRUSH)NULL, DI_NORMAL);
00343     }
00344 }
00345
00346 void CCJCaption::OnSysColorChange()
00347 {
00348     CStatic::OnSysColorChange();
00349
00350     m_clrBtnHilite = ::GetSysColor(COLOR_BTNHILIGHT);
00351     m_clrBtnShadow = ::GetSysColor(COLOR_BTNSHADOW);
00352     m_clrBtnFace   = ::GetSysColor(COLOR_BTNFACE);
00353 }
00354
00355 BOOL CCJCaption::Create(CWnd* pParentWnd, LPCTSTR lpszWindowName, DWORD dwExStyle, DWORD dwStyle, const CRect& rect, UINT nID)
00356 {
00357     // Let the base class create the control.
00358     if( !CStatic::Create( NULL, dwStyle, rect, pParentWnd, nID ))
00359     {
00360         TRACE(_T("Unable to create caption.\n"));
00361         return FALSE;
00362     }
00363
00364     UpdateFont();
00365
00366     // save the style.
00367     if( dwExStyle & WS_EX_FLATEDGE ) {
00368         m_dwExStyle = dwExStyle;
00369     }
00370
00371     else {
00372         ModifyStyleEx( 0, dwExStyle );
00373     }
00374
00375     // Save the window text.
00376     m_strWindText = lpszWindowName;
00377
00378     // Create the button to be used with child window.
00379     if( !m_CaptionButton.Create( m_strWindText, BS_ICON|BS_OWNERDRAW|BS_VCENTER,
00380         CRect(0,0,0,0), this, IDC_CAPT_BUTTON ))
00381     {
00382         TRACE0( "Unable to create caption button.\n" );
00383         return FALSE;
00384     }
00385
00386     // set the button font and colors.
00387     m_CaptionButton.SetButtonStyle( m_pFont, m_clrBackgnd, m_clrFont );
00388
00389     return TRUE;
00390 }
00391
00392 void CCJCaption::ModifyCaptionStyle(int nBorderSize, CFont* pFont, LPCTSTR lpszWindText, HICON hIcon)
00393 {
00394     ASSERT(::IsWindow(m_hWnd));
00395
00396     if( nBorderSize ) {
00397         m_nBorder = nBorderSize;
00398     }
00399
00400     if( pFont ) {
00401         m_pFont = pFont;
00402         m_CaptionButton.SetButtonStyle( m_pFont, m_clrBackgnd, m_clrFont );
00403     }
00404
00405     if( lpszWindText ) {
00406         m_strWindText = lpszWindText;
00407     }
00408
00409     if( hIcon ) {
00410         m_hIcon = hIcon;
00411     }
00412
00413     Invalidate();
00414 }
00415
00416 void CCJCaption::SetChildWindow(CWnd* pChild, CWnd* pNotifyWnd)
00417 {
00418     ASSERT( pChild != NULL );       // must be valid.
00419     ASSERT( pNotifyWnd != NULL );   // must be valid.
00420
00421     // save window pointers, and show caption button.
00422     m_pChildWnd  = pChild;
00423     m_pNotifyWnd = pNotifyWnd;
00424
00425     // set the size of the child window.
00426     m_pChildWnd->GetWindowRect(&m_rcChild);
00427
00428     CRect rcClient;
00429     m_pChildWnd->GetParent()->GetClientRect(&rcClient);
00430     m_nOffset = rcClient.Height()-m_rcChild.Height();
00431
00432     m_CaptionButton.ModifyStyle( 0, WS_VISIBLE );
00433     Invalidate();
00434 }
00435
00436 void CCJCaption::KillChildWindow()
00437 {
00438     m_CaptionButton.SetState(FALSE);
00439     m_CaptionButton.ModifyStyle( WS_VISIBLE, 0 );
00440     m_pWndPopDown->DestroyWindow();
00441     _delete( m_pWndPopDown );
00442 }
00443
00444 void CCJCaption::OnSize(UINT nType, int cx, int cy)
00445 {
00446     CStatic::OnSize(nType, cx, cy);
00447
00448     if( m_CaptionButton.GetSafeHwnd())
00449     {
00450         CDC* pDC = GetDC();
00451         CFont* pOldFont = pDC->SelectObject(m_pFont);
00452
00453         TEXTMETRIC tm;
00454         pDC->GetTextMetrics(&tm);
00455
00456         CSize size = pDC->GetTextExtent(m_strWindText, m_strWindText.GetLength());
00457         size.cx += tm.tmAveCharWidth+21;
00458         pDC->SelectObject(pOldFont);
00459         ReleaseDC(pDC);
00460
00461         CRect rc( 0, 0, size.cx, cy );
00462         rc.DeflateRect(m_nBorder+1, m_nBorder+1);
00463         m_CaptionButton.MoveWindow(rc);
00464     }
00465 }
00466
00467 void CCJCaption::OnCaptButton()
00468 {
00469     CRect rc;
00470     m_CaptionButton.GetWindowRect(&rc);
00471     rc.right  = rc.left + m_rcChild.Width();
00472     rc.top    = rc.bottom;
00473     rc.bottom = rc.top + m_rcChild.Height();
00474
00475     //if window is already present delete it
00476     _delete( m_pWndPopDown );
00477
00478     // Get the class name and create the window
00479     m_pWndPopDown = new CCJCaptionPopupWnd;
00480     m_pWndPopDown->Create( rc, this, m_pChildWnd );
00481     m_pChildWnd->ShowWindow(SW_SHOW);
00482     m_CaptionButton.SetState(TRUE);
00483 }
00484
00485 LRESULT CCJCaption::OnPushPinButton(UINT lParam, LONG wParam)
00486 {
00487     UNUSED_ALWAYS( lParam );
00488     UNUSED_ALWAYS( wParam );
00489
00490     KillChildWindow();
00491     m_pNotifyWnd->SendMessage(CM_ONPUSHPINBUTTON, 0, 0);
00492     m_pChildWnd->GetParent()->GetClientRect(&m_rcChild);
00493     if(m_nOffset>0) {
00494         m_rcChild.top += m_nOffset;
00495     }
00496     m_pChildWnd->MoveWindow(m_rcChild);
00497     Invalidate();
00498
00499     return 0;
00500 }
00501
00502 LRESULT CCJCaption::OnPushPinCancel(UINT lParam, LONG wParam)
00503 {
00504     UNUSED_ALWAYS( lParam );
00505     UNUSED_ALWAYS( wParam );
00506
00507     m_CaptionButton.SetState(FALSE);
00508     m_pWndPopDown->DestroyWindow();
00509
00510     _delete( m_pWndPopDown );
00511
00512     m_pNotifyWnd->SendMessage(CM_ONPUSHPINCANCEL, 0, 0);
00513
00514     return 0;
00515 }
00516
00517 void CCJCaption::UpdateCaption(LPCTSTR lpszWindowText, HICON hIcon)
00518 {
00519     ASSERT(::IsWindow(m_hWnd));
00520
00521     CRect rcClient;
00522     GetClientRect(&rcClient);
00523     CDC* pDC = GetDC();
00524
00525     UpdateCaptionBack(pDC, rcClient);
00526
00527     if( lpszWindowText )
00528     {
00529         m_strWindText = lpszWindowText;
00530         UpdateCaptionText(pDC, rcClient);
00531     }
00532
00533     if( hIcon ) {
00534         m_hIcon = hIcon;
00535         DrawCaptionIcon( pDC, rcClient );
00536     }
00537
00538     ReleaseDC(pDC);
00539 }
00540
00541 void CCJCaption::UpdateCaptionBack(CDC* pDC, CRect& rcItem)
00542 {
00543     CRect rc = rcItem;
00544
00545     // Set the background mode to transparent.
00546     pDC->SetBkMode( TRANSPARENT );
00547
00548     rc.DeflateRect(1,1);
00549     // repaint the background.
00550     pDC->FillSolidRect( rc, m_clrBtnFace );
00551
00552     // draw the caption banner border.
00553     if( m_nBorder != 0 ) {
00554         rc.DeflateRect( m_nBorder-1, m_nBorder-1 );
00555         pDC->FillSolidRect(rc, m_clrBackgnd);
00556     }
00557 }
00558
00559 void CCJCaption::UpdateCaptionText(CDC* pDC, CRect& rcItem)
00560 {
00561     CFont* pOldFont = pDC->SelectObject(m_pFont);
00562
00563     TEXTMETRIC tm;
00564     pDC->GetTextMetrics(&tm);
00565
00566     CSize size = pDC->GetTextExtent(m_strWindText, m_strWindText.GetLength());
00567     size.cx += tm.tmAveCharWidth+21;
00568     pDC->SelectObject(pOldFont);
00569
00570     CRect rc( 0, 0, size.cx, rcItem.Height() );
00571     rc.DeflateRect(m_nBorder+1, m_nBorder+1);
00572     m_CaptionButton.MoveWindow(rc);
00573     m_CaptionButton.SetWindowText(m_strWindText);
00574
00575     DrawCaptionText( pDC, rcItem );
00576 }
00577
00578 void CCJCaption::UpdateFont()
00579 {
00580     m_Font.DeleteObject();
00581     NONCLIENTMETRICS ncm;
00582     ncm.cbSize = sizeof(ncm);
00583     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
00584     VERIFY(m_Font.CreateFontIndirect(&ncm.lfMessageFont));
00585     m_pFont = &m_Font;
00586 }
00587
00588 BOOL CCJCaption::OnEraseBkgnd(CDC* pDC)
00589 {
00590     // KStowell - overridden for flicker-free drawing.
00591     UNUSED_ALWAYS(pDC);
00592     return TRUE;
00593 }
Generated on Sat Aug 7 22:43:05 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/getline.c Source File

common/getline.c

Go to the documentation of this file.
00001 /* getline.c -- Replacement for GNU C library function getline
00002
00003 Copyright (C) 1993 Free Software Foundation, Inc.
00004
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License as
00007 published by the Free Software Foundation; either version 2 of the
00008 License, or (at your option) any later version.
00009
00010 This program is distributed in the hope that it will be useful, but
00011 WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 General Public License for more details.  */
00014
00015 /* Written by Jan Brittenson, bson@gnu.ai.mit.edu.  */
00016
00017 /*
00018  * Modified for WinCvs/MacCVS : Alexandre Parenteau <aubonbeurre@hotmail.com> --- April 1998
00019  */
00020
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024
00025 #include <sys/types.h>
00026
00027 #include <stdio.h>
00028 #include <assert.h>
00029 #include <errno.h>
00030
00031 #if STDC_HEADERS || defined(WIN32) || defined(TARGET_OS_MAC)
00032 #include <stdlib.h>
00033 #else
00034 char *malloc (), *realloc ();
00035 #endif
00036
00037 #include "getline.h"
00038
00039 /* Always add at least this many bytes when extending the buffer.  */
00040 #define MIN_CHUNK 64
00041
00042 /* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR
00043    + OFFSET (and null-terminate it). *LINEPTR is a pointer returned from
00044    malloc (or NULL), pointing to *N characters of space.  It is realloc'd
00045    as necessary.  Return the number of characters read (not including the
00046    null terminator), or -1 on error or EOF.  On a -1 return, the caller
00047    should check feof(), if not then errno has been set to indicate
00048    the error.  */
00049
00050 int
00051 getstr (char **lineptr, size_t *n, FILE *stream, char terminator, int offset)
00052 {
00053   int nchars_avail;     /* Allocated but unused chars in *LINEPTR.  */
00054   char *read_pos;       /* Where we're reading into *LINEPTR. */
00055   int ret;
00056
00057   if (!lineptr || !n || !stream)
00058     {
00059       errno = EINVAL;
00060       return -1;
00061     }
00062
00063   if (!*lineptr)
00064     {
00065       *n = MIN_CHUNK;
00066       *lineptr = (char *)malloc (*n);
00067       if (!*lineptr)
00068     {
00069       errno = ENOMEM;
00070       return -1;
00071     }
00072     }
00073
00074   nchars_avail = *n - offset;
00075   read_pos = *lineptr + offset;
00076
00077   for (;;)
00078     {
00079       int save_errno;
00080       register int c = getc (stream);
00081
00082       save_errno = errno;
00083
00084       /* We always want at least one char left in the buffer, since we
00085      always (unless we get an error while reading the first char)
00086      NUL-terminate the line buffer.  */
00087
00088       assert((*lineptr + *n) == (read_pos + nchars_avail));
00089       if (nchars_avail < 2)
00090     {
00091       if (*n > MIN_CHUNK)
00092         *n *= 2;
00093       else
00094         *n += MIN_CHUNK;
00095
00096       nchars_avail = *n + *lineptr - read_pos;
00097       *lineptr = (char *)realloc (*lineptr, *n);
00098       if (!*lineptr)
00099         {
00100           errno = ENOMEM;
00101           return -1;
00102         }
00103       read_pos = *n - nchars_avail + *lineptr;
00104       assert((*lineptr + *n) == (read_pos + nchars_avail));
00105     }
00106
00107       if (ferror (stream))
00108     {
00109       /* Might like to return partial line, but there is no
00110          place for us to store errno.  And we don't want to just
00111          lose errno.  */
00112       errno = save_errno;
00113       return -1;
00114     }
00115
00116       if (c == EOF)
00117     {
00118       /* Return partial line, if any.  */
00119       if (read_pos == *lineptr)
00120         return -1;
00121       else
00122         break;
00123     }
00124
00125 #ifdef TARGET_OS_MAC
00126       if (terminator == '\n' && c == '\r')
00127     c = '\n';
00128 #endif
00129
00130       *read_pos++ = c;
00131       nchars_avail--;
00132
00133       if (c == terminator)
00134     /* Return the line.  */
00135     break;
00136    }
00137
00138   /* Done - NUL terminate and return the number of chars read.  */
00139   *read_pos = '\0';
00140
00141   ret = read_pos - (*lineptr + offset);
00142   return ret;
00143 }
00144
00145 __ssize_t
00146 getline (char **lineptr, size_t *n, FILE *stream)
00147 {
00148   return getstr (lineptr, n, stream, '\n', 0);
00149 }
Generated on Sat Aug 7 22:42:57 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJMenuBarFrameHook Member List

This is the complete list of members for CCJMenuBarFrameHook, including all inherited members.

CCJMenuBarFrameHook() | CCJMenuBarFrameHook | [protected]
CSubclassWnd() | CSubclassWnd |
DECLARE_DYNAMIC(CSubclassWnd) | CSubclassWnd |
Default() | CSubclassWnd | [protected, virtual]
HookWindow(HWND hwnd) | CSubclassWnd | [virtual]
HookWindow(CWnd *pWnd) | CSubclassWnd | [inline, virtual]
HookWndProc(HWND, UINT, WPARAM, LPARAM) | CSubclassWnd | [friend]
Install(CCJMenuBar *pMenuBar, HWND hWndToHook) | CCJMenuBarFrameHook | [protected]
IsHooked() | CSubclassWnd | [inline, virtual]
m_hWnd | CSubclassWnd | [protected]
m_pMenuBar | CCJMenuBarFrameHook | [protected]
m_pNext | CSubclassWnd | [protected]
m_pOldWndProc | CSubclassWnd | [protected]
WindowProc(UINT msg, WPARAM wp, LPARAM lp) | CCJMenuBarFrameHook | [protected, virtual]
~CCJMenuBarFrameHook() | CCJMenuBarFrameHook | [protected]
~CSubclassWnd() | CSubclassWnd |

Generated on Sat Aug 7 22:49:53 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: common/UCvsFolders.h Source File

common/UCvsFolders.h

Go to the documentation of this file.
00001 /*
00002 ** This program is free software; you can redistribute it and/or modify
00003 ** it under the terms of the GNU General Public License as published by
00004 ** the Free Software Foundation; either version 1, or (at your option)
00005 ** any later version.
00006
00007 ** This program is distributed in the hope that it will be useful,
00008 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 ** GNU General Public License for more details.
00011
00012 ** You should have received a copy of the GNU General Public License
00013 ** along with this program; if not, write to the Free Software
00014 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00015 */
00016
00017 /*
00018  * Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
00019  */
00020
00021 /*
00022  *
00023  */
00024
00025 #ifndef UCVSFOLDER_H
00026 #define UCVSFOLDER_H
00027
00028 #include "uwidget.h"
00029 #include "CvsEntries.h"
00030 #include "BrowseViewHandlers.h"
00031
00032 class UCvsFolders : public UWidget
00033 {
00034     UDECLARE_DYNAMIC(UCvsFolders)
00035 public:
00036     UCvsFolders();
00037     virtual ~UCvsFolders();
00038
00039     void ResetBrowser(const char *path, bool notifyView = false);
00040         // set the browser root path.
00041
00042     inline const char *GetRoot(void) const { return m_root; }
00043         // get the base of the browser
00044
00045     static void SetDefaultRoot(const char *root);
00046         // set the opening root
00047
00048     void RetrievePath(UTREEITEM item, UStr & path);
00049         // given an item of the tree, guess the full path.
00050
00051     void StepToLocation(const char *path, bool notifyView = false);
00052         // expand and select the path and optionally synchronize the
00053         // file view.
00054
00055     void DeleteAllItems(void);
00056         // used when resetting and take care about our item data
00057         // delete all
00058
00059     void DeleteAllItems(UTREEITEM root);
00060         // used when resetting and take care about our item data
00061         // if root != 0L : delete all childs of root (except root)
00062         // if root == 0L : delete all
00063
00064     void ResetView(bool forceReload = false, bool notifyView = false);
00065         // force reload or check modifications before redrawing
00066         // and optionally synchronize the file view.
00067
00068 protected:
00069     UStr m_root;
00070         // current path of the browser
00071
00072     void OnUpdateGeneric(UCmdUI* pCmdUI, bool needCvsInfos);
00073     bool DisableGeneric();
00074         // used for the handling of EV_UPDTCMD
00075
00076     void StoreExpanded(std::vector<UStr> & allExpanded, UTREEITEM root = 0L);
00077     UTREEITEM GetItemByLocation(const char *path);
00078         // used internally
00079
00080     int ProcessSelectionCommand(KiSelectionHandler& handler);
00081     // Process the selection handler command
00082     // param:  handler Command selection handler
00083     // return: true if the command was processed, false otherwise
00084
00085     ev_msg void OnDestroy();
00086     ev_msg void OnCreate();
00087     ev_msg void OnTreeExpanding(int collapse, UTREEITEM item);
00088     ev_msg void OnTreeSelecting(int deselect, UTREEITEM item);
00089     ev_msg void OnCmdUIMacrosSel(int cmd, UCmdUI *pCmdUI);
00090     ev_msg void OnCmdUIUpdate(UCmdUI *pCmdUI);
00091     ev_msg void OnCmdUIAdd(UCmdUI *pCmdUI);
00092     ev_msg void OnCmdUIExplore(UCmdUI *pCmdUI);
00093     ev_msg void OnCmdUICheckout(UCmdUI *pCmdUI);
00094     ev_msg void OnCmdUIImport(UCmdUI *pCmdUI);
00095     ev_msg void OnCmdUIResEdit(UCmdUI *pCmdUI);
00096     ev_msg int OnCmdUpdate(void);
00097     ev_msg int OnCmdAdd(void);
00098     ev_msg int OnCmdCommit(void);
00099     ev_msg int OnCmdQueryUpdate(void);
00100     ev_msg int OnCmdDiff(void);
00101     ev_msg int OnCmdLog(void);
00102     ev_msg int OnCmdStatus(void);
00103     ev_msg int OnCmdLock(void);
00104     ev_msg int OnCmdUnlock(void);
00105     ev_msg int OnCmdWatchOn(void);
00106     ev_msg int OnCmdWatchOff(void);
00107     ev_msg int OnCmdEdit(void);
00108     ev_msg int OnCmdResEdit(void);
00109     ev_msg int OnCmdUnedit(void);
00110     ev_msg int OnCmdWatchers(void);
00111     ev_msg int OnCmdEditors(void);
00112     ev_msg int OnCmdRelease(void);
00113     ev_msg int OnCmdTagNew(void);
00114     ev_msg int OnCmdTagDelete(void);
00115     ev_msg int OnCmdTagBranch(void);
00116     ev_msg int OnCmdExplore(void);
00117     ev_msg int OnCmdCheckout(void);
00118     ev_msg int OnCmdImport(void);
00119     ev_msg int OnCmdMacrosSel(int cmd);
00120
00121     UDECLARE_MESSAGE_MAP()
00122 };
00123
00124 #endif
Generated on Sat Aug 7 22:43:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: WinCvs/CJLib/Include/CJFlatTabCtrl.h Source File

WinCvs/CJLib/Include/CJFlatTabCtrl.h

Go to the documentation of this file.
00001 // FlatTab.h : header file
00002 //
00003 // Copyright © 1999 Ian Brumby
00004 //
00005 // This source code may be used in compiled form in any way you desire.
00006 // Source file(s) may be redistributed unmodified by any means PROVIDING
00007 // they are not sold for profit without the authors expressed written consent,
00008 // and providing that this notice and the authors name and all copyright
00009 // notices remain intact.
00010 //
00011 // ==========================================================================
00012 // HISTORY:
00013 // ==========================================================================
00014 //          1.4     21 Jul 1999 - Initial release.
00015 //          1.5     30 Aug 1999 - Several enhancements by Phil Baxter
00016 //                  <Phil.Baxter@mrjinx.demon.co.uk>
00017 // ==========================================================================
00018
00019 // Excel uses FF_ROMAN and Font Height = ~(control's height - 4)
00020 // Excel draws its tabs right to left
00021 // Excel has 3DLIGHT highlighting on the left diagonal
00022 // Excel has home/end buttons
00023 // Excel's buttons change width as the control's height changes
00024 //
00026 /****************************************************************************
00027  *
00028  * $Date: 1999/11/30 21:45:51 $
00029  * $Revision: 1.1.1.3 $
00030  * $Archive: /CodeJock/Include/CJFlatTabCtrl.h $
00031  *
00032  * $History: CJFlatTabCtrl.h $
00033  *
00034  * *****************  Version 8  *****************
00035  * User: Kirk Stowell Date: 10/26/99   Time: 10:40p
00036  * Updated in $/CodeJock/Include
00037  * Made class methods virtual for inheritance purposes.
00038  *
00039  * *****************  Version 7  *****************
00040  * User: Kirk Stowell Date: 10/24/99   Time: 12:15a
00041  * Updated in $/CodeJock/Include
00042  * Fixed minor bug with tab font creation.
00043  *
00044  * *****************  Version 6  *****************
00045  * User: Kirk Stowell Date: 10/24/99   Time: 12:01a
00046  * Updated in $/CodeJock/Include
00047  * Fixed potential resource and memory leak problems.
00048  *
00049  * *****************  Version 5  *****************
00050  * User: Kirk Stowell Date: 10/14/99   Time: 12:25p
00051  * Updated in $/CodeJock/Include
00052  * Added source control history to file header.
00053  *
00054  ***************************************************************************/
00056
00057 #ifndef __CCJFLATTABCTRL_H__
00058 #define __CCJFLATTABCTRL_H__
00059
00060 #if _MSC_VER > 1000
00061 #pragma once
00062 #endif // _MSC_VER > 1000
00063
00064 #include <afxtempl.h>
00065 #include "CJMetaFileButton.h"
00066
00067 // control styles
00068 #define FTS_BOTTOM              0x0002
00069 #define FTS_HASARROWS           0x0004
00070 #define FTS_HASHOMEEND          0x0008 // Must be used with FTS_HASARROWS
00071
00072 typedef CList <CString*, CString*> CTabList;
00073
00074 // CCJFlatTabCtrl is a CWnd derived class which is used to create a flat tab
00075 // control simular to DevStudio.
00076 class _CJX_EXT_CLASS CCJFlatTabCtrl : public CWnd
00077 {
00078
00079 // Construction
00080 public:
00081     CCJFlatTabCtrl();
00082
00083 // Attributes
00084 public:
00085
00086 // Operations
00087 public:
00088
00089     virtual BOOL InsertItem(const int nItem, LPCTSTR lpszItem);
00090     virtual BOOL DeleteItem(int nItem);
00091     virtual BOOL DeleteAllItems();
00092     virtual BOOL GetItemRect(int nItem, LPRECT lpRect);
00093     virtual int HitTest(TCHITTESTINFO *pHitTestInfo) const;
00094     virtual int GetCurSel() const {return m_iCurSel;}
00095     virtual int SetCurSel(int nItem);
00096     virtual int GetItemCount() const { return m_TabList.GetCount(); }
00097     virtual void SetTipText(int nItem, LPCTSTR lpszTabTip);
00098     virtual CString GetTipText(int nItem);
00099     virtual void Home();
00100
00101 // Overrides
00102     // ClassWizard generated virtual function overrides
00103     //{{AFX_VIRTUAL(CCJFlatTabCtrl)
00104     protected:
00105     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00106     virtual BOOL PreTranslateMessage(MSG* pMsg);
00107     //}}AFX_VIRTUAL
00108
00109 // Implementation
00110 public:
00111     virtual ~CCJFlatTabCtrl();
00112
00113     // Generated message map functions
00114 protected:
00115     //{{AFX_MSG(CCJFlatTabCtrl)
00116     afx_msg void OnPaint();
00117     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00118     afx_msg void OnSize(UINT nType, int cx, int cy);
00119     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00120     afx_msg void OnLeftArrow();
00121     afx_msg void OnRightArrow();
00122     afx_msg void OnHomeArrow();
00123     afx_msg void OnEndArrow();
00124     //}}AFX_MSG
00125     DECLARE_MESSAGE_MAP()
00126
00127 private:
00128
00129     void CreateTabFont(const int iTabHeight);
00130     int GetTabWidth(const int nItem) const;
00131     int GetTotalArrowWidth(void) const;
00132     int GetTotalTabWidth(void) const;
00133     void InvalidateTabs(void);
00134     void EnableButtons(void);
00135     int DrawTab(CDC &dc, const int x, const int y, const int iHeight, bool bSelected, bool bBottom, LPCTSTR lpszTab) const;
00136
00137     bool m_bHasArrows;
00138     bool m_bHasHomeEnd;
00139     bool m_bTabsOnBottom;
00140     int m_iCurSel;
00141     int m_iClientWidth;
00142     int m_iClientHeight;
00143     int m_iTotalTabWidth;
00144     int m_iXOffset;
00145     CTabList m_TabList;
00146     CTabList m_TabTipList;
00147     CFont m_Font;
00148     CFont m_BoldFont;
00149     CCJMetaFileButton *m_pLeftButton;
00150     CCJMetaFileButton *m_pRightButton;
00151     CCJMetaFileButton *m_pHomeButton;
00152     CCJMetaFileButton *m_pEndButton;
00153     HENHMETAFILE m_hLeftArrow;
00154     HENHMETAFILE m_hLeftArrowDisabled;
00155     HENHMETAFILE m_hRightArrow;
00156     HENHMETAFILE m_hRightArrowDisabled;
00157     HENHMETAFILE m_hHomeArrow;
00158     HENHMETAFILE m_hHomeArrowDisabled;
00159     HENHMETAFILE m_hEndArrow;
00160     HENHMETAFILE m_hEndArrowDisabled;
00161
00162     CToolTipCtrl        m_ToolTip;
00163 };
00164
00166
00167 //{{AFX_INSERT_LOCATION}}
00168 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00169
00170 #endif // __CCJFLATTABCTRL_H__
Generated on Sat Aug 7 22:43:08 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJControlBar Member List

This is the complete list of members for CCJControlBar, including all inherited members.

CalcDynamicLayout(int nLength, DWORD nMode) | CCJControlBar | [virtual]
CCJControlBar() | CCJControlBar |
Create(CWnd *pParentWnd, UINT nID, LPCTSTR lpszWindowName=NULL, CSize sizeDefault=CSize(200, 100), DWORD dwStyle=CBRS_LEFT, BOOL bFlatBorders=FALSE) | CCJControlBar | [virtual]
DrawBorders(CDC *pDC, CRect &rect) | CCJControlBar | [protected, virtual]
DrawGriperCaption(CDC *pDC, LPRECT pRect) | CCJControlBar | [protected, virtual]
DrawGripper(CDC *pDC) | CCJControlBar | [protected, virtual]
EnableDockingOnSizeBar(DWORD dwDockStyle) | CCJControlBar | [virtual]
EnableFlatLook(BOOL bFlat=TRUE) | CCJControlBar | [virtual]
EnableFlatLook(BOOL bGripper, BOOL bBorder, BOOL bButtons) | CCJControlBar | [virtual]
EnableSaveState(bool bAutoSave=true) | CCJControlBar | [virtual]
EraseNonClient() | CCJControlBar | [protected, virtual]
GetButtonRect() | CCJControlBar | [protected, virtual]
GetChildRect(CRect &rect) | CCJControlBar | [virtual]
GetGripperRect() | CCJControlBar | [protected, virtual]
GetHorzSize() | CCJControlBar | [virtual]
GetMenuID() | CCJControlBar | [virtual]
GetMinExt() | CCJControlBar | [virtual]
GetVertSize() | CCJControlBar | [virtual]
HitTest(CPoint &point) | CCJControlBar | [protected, virtual]
IsBottomDocked() const | CCJControlBar | [virtual]
IsFloating() const | CCJControlBar | [virtual]
IsHorzDocked() const | CCJControlBar | [virtual]
IsLeftDocked() const | CCJControlBar | [virtual]
IsRightDocked() const | CCJControlBar | [virtual]
IsTopDocked() const | CCJControlBar | [virtual]
IsVertDocked() const | CCJControlBar | [virtual]
LoadBarState(CSize &size, int nID) | CCJControlBar | [protected, virtual]
m_bAutoSave | CCJControlBar | [protected]
m_bButtons | CCJControlBar | [protected]
m_bDragging | CCJControlBar | [protected]
m_bFlatBorder | CCJControlBar | [protected]
m_bFlatGripper | CCJControlBar | [protected]
m_bFloating | CCJControlBar | [protected]
m_bGripper | CCJControlBar | [protected]
m_bMaximized | CCJControlBar | [protected]
m_bOkToDrag | CCJControlBar | [protected]
m_btnClose | CCJControlBar | [protected]
m_btnMinim | CCJControlBar | [protected]
m_bToFit | CCJControlBar |
m_bUnique | CCJControlBar |
m_cxOffset | CCJControlBar | [protected]
m_cyOffset | CCJControlBar | [protected]
m_eAuxIndex | CCJControlBar | [protected]
m_eChildBorder | CCJControlBar |
m_hAuxIcon | CCJControlBar | [protected]
m_hIcon | CCJControlBar | [protected]
m_ImageList | CCJControlBar | [protected]
m_nID | CCJControlBar | [protected]
m_nPos | CCJControlBar | [protected]
m_pChildWnd | CCJControlBar | [protected]
m_popToolbarID | CCJControlBar | [protected]
m_popupMenu | CCJControlBar | [protected]
m_popupMenuID | CCJControlBar | [protected]
m_ptCurDrag | CCJControlBar | [protected]
m_ptStartDrag | CCJControlBar | [protected]
m_rcTrack | CCJControlBar | [protected]
m_sizeDesired | CCJControlBar | [protected]
m_sizeFloat | CCJControlBar | [protected]
m_sizeHorz | CCJControlBar | [protected]
m_sizeNormal | CCJControlBar | [protected]
m_sizeVert | CCJControlBar | [protected]
m_strSection | CCJControlBar | [protected]
m_ToolTip | CCJControlBar | [protected]
Maximize(int size) | CCJControlBar | [virtual]
Minimize() | CCJControlBar | [virtual]
Normalize() | CCJControlBar | [virtual]
OnButtonClose() | CCJControlBar | [protected]
OnButtonMinimize() | CCJControlBar | [protected]
OnCreate(LPCREATESTRUCT lpCreateStruct) | CCJControlBar | [protected]
OnEraseBkgnd(CDC *pDC) | CCJControlBar | [protected]
OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu) | CCJControlBar | [protected]
OnInvertTracker(const CRect &rect) | CCJControlBar | [protected, virtual]
OnLButtonDown(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnLButtonUp(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) | CCJControlBar | [protected]
OnMenuChar(UINT nChar, UINT nFlags, CMenu *pMenu) | CCJControlBar | [protected]
OnMouseMove(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnNcHitTest(CPoint point) | CCJControlBar | [protected]
OnNcPaint() | CCJControlBar | [protected]
OnPaint() | CCJControlBar | [protected]
OnRButtonDown(UINT nFlags, CPoint point) | CCJControlBar | [protected]
OnSetCursor(CWnd *pWnd, UINT nHitTest, UINT message) | CCJControlBar | [protected]
OnUpdateButtonClose(CCmdUI *pCmdUI) | CCJControlBar | [protected]
OnUpdateButtonMinimize(CCmdUI *pCmdUI) | CCJControlBar | [protected]
OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler) | CCJControlBar | [virtual]
OnWindowPosChanged(WINDOWPOS FAR *lpwndpos) | CCJControlBar | [protected]
PreTranslateMessage(MSG *pMsg) | CCJControlBar | [virtual]
SaveBarState(CSize &size) | CCJControlBar | [protected, virtual]
SetChild(CWnd *pWnd) | CCJControlBar | [protected, virtual]
SetMenuID(UINT popupMenuID, UINT popToolbarID=0, int nPos=0) | CCJControlBar | [virtual]
SetNormalSize(const CSize &cs) | CCJControlBar | [virtual]
ShowFrameControls(BOOL bGripper=TRUE, BOOL bButtons=TRUE) | CCJControlBar | [virtual]
~CCJControlBar() | CCJControlBar | [virtual]

Generated on Sat Aug 7 22:49:02 2004 for WinCvs Source by doxygen 1.3.8


WinCvs Source: Member List

CCJListCtrl Member List

This is the complete list of members for CCJListCtrl, including all inherited members.

AddColumn(LPCTSTR lpszColHeading, int nWidth=-1, int nFormat=LVCFMT_LEFT) | CCJListCtrl | [virtual]
AutoSaveColumns(LPCTSTR lpszSection=NULL, LPCTSTR lpszEntry=NULL, LPCTSTR lpszDefault=NULL) | CCJListCtrl | [virtual]
AutoSizeColumn(int nCol=-1) | CCJListCtrl | [virtual]
BuildColumns(int nCols, int *nWidth, CString *strColString) | CCJListCtrl | [virtual]
BuildColumns(int nCols, int *nWidth, int *nColString) | CCJListCtrl | [virtual]
CCJListCtrl() | CCJListCtrl |
CopyRow(int nFrom, int nTo) | CCJListCtrl | [virtual]
DisableColumnSizing(bool bDisable) | CCJListCtrl | [virtual]
GetColumnCount() const | CCJListCtrl | [virtual]
GetExtendedStyle() | CCJListCtrl | [virtual]
GetStoredWidth(int nCol) | CCJListCtrl | [virtual]
HitTestEx(CPoint &point, int *col) const | CCJListCtrl | [virtual]
LoadColumnWidths() | CCJListCtrl | [virtual]
m_bAscending | CCJListCtrl | [protected]
m_bAutoSave | CCJListCtrl | [private]
m_bNoColSizing | CCJListCtrl | [protected]
m_clrText | CCJListCtrl | [protected]
m_clrTextBk | CCJListCtrl | [protected]
m_nMaxColWidth | CCJListCtrl | [protected]
m_nMinColWidth | CCJListCtrl | [protected]
m_nMinSize | CCJListCtrl | [protected]
m_nSortedCol | CCJListCtrl | [protected]
m_pHeaderCtrl | CCJListCtrl | [protected]
m_pListCtrl | CCJListCtrl | [protected]
m_strDefault | CCJListCtrl | [protected]
m_strEntry | CCJListCtrl | [protected]
m_strSection | CCJListCtrl | [protected]
MoveRow(int nFrom, int nTo) | CCJListCtrl | [virtual]
OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult) | CCJListCtrl | [protected]
OnDestroy() | CCJListCtrl | [protected]
OnEraseBkgnd(CDC *pDC) | CCJListCtrl | [protected]
OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *pResult) | CCJListCtrl | [protected, virtual]
OnPaint() | CCJListCtrl | [protected]
SaveColumnWidths() | CCJListCtrl | [virtual]
SetColumnWidth(int nCol) | CCJListCtrl | [virtual]
SetExtendedStyle(DWORD dwExStyle) | CCJListCtrl | [virtual]
SetMinimumColSize(int nSize) | CCJListCtrl | [virtual]
SetRowColors(COLORREF clrText, COLORREF clrTextBk) | CCJListCtrl | [virtual]
SortList(int nCol, bool bAscending) | CCJListCtrl | [virtual]
SubclassHeader(bool bBoldFont=false) | CCJListCtrl | [virtual]
~CCJListCtrl() | CCJListCtrl | [virtual]

Generated on Sat Aug 7 22:49:29 2004 for WinCvs Source by doxygen 1.3.8